-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
120 lines (112 loc) · 3.23 KB
/
Copy pathtypes.ts
File metadata and controls
120 lines (112 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/**
* SolRouter SDK Types
*/
export interface SolRouterConfig {
/** Your SolRouter API key (starts with sk_solrouter_) */
apiKey: string;
/** API base URL (defaults to https://solrouter-obb4.onrender.com) */
baseUrl?: string;
/** Enable encryption (defaults to true) */
encrypted?: boolean;
}
export interface ChatOptions {
/** Model to use (defaults to gpt-oss-20b). Privacy mode: self-hosted Nosana open-weight models only. */
model?: 'gpt-oss-20b' | 'qwen3-8b';
/** System prompt */
systemPrompt?: string;
/** Enable encryption for this request (overrides client setting) */
encrypted?: boolean;
/** Conversation ID for multi-turn conversations */
chatId?: string;
/** Enable RAG (knowledge base retrieval) */
useRAG?: boolean;
/** RAG collection to use */
ragCollection?: string;
/** Enable live web search */
useLiveSearch?: boolean;
/** Reasoning mode: 'default' for standard, 'braid' for BRAID-guided reasoning */
reasoning?: 'default' | 'braid';
/** BRAID-specific options (only used when reasoning is 'braid') */
braidOptions?: {
/** Include GRD execution trace in the response */
includeTrace?: boolean;
/** Force a specific GRD by ID */
forceGrdId?: string;
};
}
export interface ChatResponse {
/** The AI response message */
message: string;
/** Model used for generation */
model: string;
/** Token usage statistics */
usage?: {
promptTokens: number;
completionTokens: number;
totalTokens: number;
};
/** Cost of this request in USDC */
cost?: number;
/** Whether the request was encrypted */
encrypted: boolean;
/** Privacy attestation ID (if encrypted) */
privacyAttestationId?: string;
/** BRAID execution trace (when reasoning: 'braid' and braidOptions.includeTrace: true) */
braidTrace?: {
grdId: string;
grdMermaid: string;
intent: string;
nodes: Array<{
nodeId: string;
label: string;
type: string;
status: string;
durationMs?: number;
tokensUsed?: number;
}>;
totalDurationMs: number;
totalTokens: number;
ppd?: number;
};
}
export interface EncryptedData {
ciphertext: string;
nonce: string;
publicKey: string;
ephemeralPrivateKey?: string;
// Encoding tag the TEE echoes on its response ('1.0' = 1 byte/element,
// '2.0-packed31' = 31 bytes/element). Drives version-aware decoding.
version?: string;
}
export interface BalanceResponse {
balance: number;
balanceFormatted: string;
}
/** Summary returned by GET /skills — one entry per installed SKILL.md */
export interface SkillSummary {
id: string;
name: string;
description: string;
version: string | null;
compatibility?: string | null;
metadata?: Record<string, unknown> | null;
bodyLength: number;
}
/** Full SKILL.md detail returned by GET /skills/:id */
export interface Skill {
id: string;
name: string;
description: string;
version: string | null;
license: string | null;
compatibility: string | null;
metadata: Record<string, unknown> | null;
/** Full markdown body of SKILL.md (after YAML frontmatter) */
body: string;
}
/** A matched skill from POST /skills/match — description trimmed for UI */
export interface SkillMatch {
id: string;
name: string;
description: string;
}