@codex-native/sdk 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/codex_native.darwin-arm64.node +0 -0
- package/dist/cli.cjs +16 -17
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +16 -17
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/npm/darwin-arm64/package.json +1 -1
- package/npm/darwin-x64/package.json +1 -1
- package/npm/linux-arm64-gnu/package.json +1 -1
- package/npm/linux-arm64-musl/package.json +1 -1
- package/npm/linux-x64-gnu/package.json +1 -1
- package/npm/linux-x64-musl/package.json +1 -1
- package/npm/win32-arm64-msvc/package.json +1 -1
- package/npm/win32-x64-msvc/package.json +1 -1
- package/package.json +16 -17
- package/index.d.ts +0 -487
- package/index.js +0 -626
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codex-native/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Native NAPI-based Codex SDK - complete standalone implementation.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"dist",
|
|
20
20
|
"README.md",
|
|
21
21
|
"npm",
|
|
22
|
-
"*.node"
|
|
23
|
-
"index.js",
|
|
24
|
-
"index.d.ts"
|
|
22
|
+
"*.node"
|
|
25
23
|
],
|
|
26
24
|
"dependencies": {
|
|
27
25
|
"@modelcontextprotocol/sdk": "^1.22.0",
|
|
28
|
-
"@
|
|
26
|
+
"@openai/agents": "^0.3.3",
|
|
27
|
+
"@openai/agents-core": "^0.3.3",
|
|
28
|
+
"@opencode-ai/sdk": "^1.0.134",
|
|
29
29
|
"@toon-format/toon": "^1.0.0",
|
|
30
30
|
"pyright": "^1.1.386",
|
|
31
31
|
"typescript-language-server": "^4.3.3",
|
|
@@ -41,8 +41,7 @@
|
|
|
41
41
|
"build:napi": "napi build --platform --release --features napi-bindings",
|
|
42
42
|
"build:napi:debug": "napi build --platform --features napi-bindings",
|
|
43
43
|
"build:ts": "tsup",
|
|
44
|
-
"verify:build": "node -e \"const fs=require('fs');const hasNode=fs.readdirSync('.').some(f=>f.endsWith('.node'));const hasDist=fs.existsSync('dist/index.mjs')&&fs.existsSync('dist/index.d.ts');
|
|
45
|
-
"verify:pack": "node ./scripts/verify-pack.mjs",
|
|
44
|
+
"verify:build": "node -e \"const fs=require('fs');const hasNode=fs.readdirSync('.').some(f=>f.endsWith('.node'));const hasDist=fs.existsSync('dist/index.mjs')&&fs.existsSync('dist/index.d.ts');if(!hasNode||!hasDist){console.error('Build incomplete: missing .node or dist files');process.exit(1)}console.log('✓ Build verification passed')\"",
|
|
46
45
|
"create-npm-dirs": "napi create-npm-dirs",
|
|
47
46
|
"artifacts": "napi artifacts",
|
|
48
47
|
"prepublishOnly": "napi prepublish -t npm",
|
|
@@ -57,8 +56,8 @@
|
|
|
57
56
|
"release:minor": "npm version minor && npm run release",
|
|
58
57
|
"release:major": "npm version major && npm run release",
|
|
59
58
|
"publish:platforms": "npm run create-npm-dirs && node scripts/publish-platform-packages.mjs",
|
|
60
|
-
"release": "npm run build && npm run test && npm run
|
|
61
|
-
"release:dry": "npm run build && npm run test && npm
|
|
59
|
+
"release": "npm run build && npm run test && npm run publish:platforms && node scripts/publish-sdk.mjs",
|
|
60
|
+
"release:dry": "npm run build && npm run test && npm publish --dry-run"
|
|
62
61
|
},
|
|
63
62
|
"napi": {
|
|
64
63
|
"binaryName": "codex_native",
|
|
@@ -74,14 +73,14 @@
|
|
|
74
73
|
]
|
|
75
74
|
},
|
|
76
75
|
"optionalDependencies": {
|
|
77
|
-
"@codex-native/sdk-darwin-arm64": "0.0.
|
|
78
|
-
"@codex-native/sdk-darwin-x64": "0.0.
|
|
79
|
-
"@codex-native/sdk-linux-arm64-gnu": "0.0.
|
|
80
|
-
"@codex-native/sdk-linux-x64-gnu": "0.0.
|
|
81
|
-
"@codex-native/sdk-linux-arm64-musl": "0.0.
|
|
82
|
-
"@codex-native/sdk-linux-x64-musl": "0.0.
|
|
83
|
-
"@codex-native/sdk-win32-arm64-msvc": "0.0.
|
|
84
|
-
"@codex-native/sdk-win32-x64-msvc": "0.0.
|
|
76
|
+
"@codex-native/sdk-darwin-arm64": "0.0.5",
|
|
77
|
+
"@codex-native/sdk-darwin-x64": "0.0.5",
|
|
78
|
+
"@codex-native/sdk-linux-arm64-gnu": "0.0.5",
|
|
79
|
+
"@codex-native/sdk-linux-x64-gnu": "0.0.5",
|
|
80
|
+
"@codex-native/sdk-linux-arm64-musl": "0.0.5",
|
|
81
|
+
"@codex-native/sdk-linux-x64-musl": "0.0.5",
|
|
82
|
+
"@codex-native/sdk-win32-arm64-msvc": "0.0.5",
|
|
83
|
+
"@codex-native/sdk-win32-x64-msvc": "0.0.5"
|
|
85
84
|
},
|
|
86
85
|
"engines": {
|
|
87
86
|
"node": ">=18"
|
package/index.d.ts
DELETED
|
@@ -1,487 +0,0 @@
|
|
|
1
|
-
/* auto-generated by NAPI-RS */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
export declare class AgentOrchestrator {
|
|
4
|
-
constructor()
|
|
5
|
-
addAgent(id: string, config: AgentConfig): void
|
|
6
|
-
removeAgent(id: string): void
|
|
7
|
-
setViewMode(mode: string): void
|
|
8
|
-
switchToAgent(id: string): void
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export declare class AgentView {
|
|
12
|
-
constructor(threadId: string, title?: string | undefined | null)
|
|
13
|
-
sendMessage(message: string): void
|
|
14
|
-
receiveMessage(message: string): void
|
|
15
|
-
updateStatus(status: string): void
|
|
16
|
-
appendOutput(output: string): void
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export declare class LayoutManager {
|
|
20
|
-
constructor()
|
|
21
|
-
setSplit(orientation: string, ratio: number, leftId: string, rightId: string): void
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export declare class StatusBoard {
|
|
25
|
-
constructor(layout?: string | undefined | null)
|
|
26
|
-
addTextTile(id: string, title: string, value: string): void
|
|
27
|
-
addProgressTile(id: string, title: string, value: number): void
|
|
28
|
-
updateTile(id: string, value: string): void
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export declare class TuiApp {
|
|
32
|
-
constructor(title?: string | undefined | null, width?: number | undefined | null, height?: number | undefined | null)
|
|
33
|
-
addComponent(id: string, componentType: WidgetType): void
|
|
34
|
-
startTerminal(): void
|
|
35
|
-
stopTerminal(): void
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export declare class TuiSession {
|
|
39
|
-
wait(): Promise<TuiExitInfo>
|
|
40
|
-
shutdown(): void
|
|
41
|
-
get closed(): boolean
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface AgentConfig {
|
|
45
|
-
name: string
|
|
46
|
-
model?: string
|
|
47
|
-
task?: string
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export declare function callToolBuiltin(token: string, invocation?: JsToolInvocation): Promise<NativeToolResponse>
|
|
51
|
-
|
|
52
|
-
export declare function clearRegisteredTools(): void
|
|
53
|
-
|
|
54
|
-
export declare function cloudTasksApply(taskId: string, diffOverride?: string | undefined | null, baseUrl?: string | undefined | null, apiKey?: string | undefined | null): Promise<string>
|
|
55
|
-
|
|
56
|
-
export declare function cloudTasksApplyPreflight(taskId: string, diffOverride?: string | undefined | null, baseUrl?: string | undefined | null, apiKey?: string | undefined | null): Promise<string>
|
|
57
|
-
|
|
58
|
-
export declare function cloudTasksCreate(envId: string, prompt: string, gitRef?: string | undefined | null, qaMode?: boolean | undefined | null, bestOfN?: number | undefined | null, baseUrl?: string | undefined | null, apiKey?: string | undefined | null): Promise<string>
|
|
59
|
-
|
|
60
|
-
export declare function cloudTasksGetDiff(taskId: string, baseUrl?: string | undefined | null, apiKey?: string | undefined | null): Promise<string>
|
|
61
|
-
|
|
62
|
-
export declare function cloudTasksList(envFilter?: string | undefined | null, baseUrl?: string | undefined | null, apiKey?: string | undefined | null): Promise<string>
|
|
63
|
-
|
|
64
|
-
export declare function collectRepoDiffSummary(cwd: string, baseBranchOverride?: string | undefined | null, options?: RepoDiffOptions | undefined | null): Promise<RepoDiffSummary>
|
|
65
|
-
|
|
66
|
-
export declare function compactThread(req: RunRequest): Promise<Array<string>>
|
|
67
|
-
|
|
68
|
-
export interface ConversationConfigRequest {
|
|
69
|
-
model?: string
|
|
70
|
-
modelProvider?: string
|
|
71
|
-
oss?: boolean
|
|
72
|
-
sandboxMode?: string
|
|
73
|
-
approvalMode?: string
|
|
74
|
-
workspaceWriteOptions?: WorkspaceWriteOptions
|
|
75
|
-
workingDirectory?: string
|
|
76
|
-
skipGitRepoCheck?: boolean
|
|
77
|
-
baseUrl?: string
|
|
78
|
-
apiKey?: string
|
|
79
|
-
linuxSandboxPath?: string
|
|
80
|
-
reasoningEffort?: string
|
|
81
|
-
reasoningSummary?: string
|
|
82
|
-
fullAuto?: boolean
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface ConversationListPage {
|
|
86
|
-
conversations: Array<ConversationSummary>
|
|
87
|
-
nextCursor?: string
|
|
88
|
-
numScannedFiles: number
|
|
89
|
-
reachedScanCap: boolean
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface ConversationSummary {
|
|
93
|
-
id: string
|
|
94
|
-
path: string
|
|
95
|
-
createdAt?: string
|
|
96
|
-
updatedAt?: string
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export declare function deleteConversation(req: DeleteConversationRequest): Promise<DeleteConversationResult>
|
|
100
|
-
|
|
101
|
-
export interface DeleteConversationRequest {
|
|
102
|
-
id: string
|
|
103
|
-
config?: ConversationConfigRequest
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export interface DeleteConversationResult {
|
|
107
|
-
deleted: boolean
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface Dimensions {
|
|
111
|
-
width: number
|
|
112
|
-
height: number
|
|
113
|
-
x: number
|
|
114
|
-
y: number
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export declare function emitBackgroundEvent(req: JsEmitBackgroundEventRequest): void
|
|
118
|
-
|
|
119
|
-
export declare function emitPlanUpdate(req: JsEmitPlanUpdateRequest): void
|
|
120
|
-
|
|
121
|
-
export declare function ensureTokioRuntime(): void
|
|
122
|
-
|
|
123
|
-
export declare function evAssistantMessage(id: string, text: string): string
|
|
124
|
-
|
|
125
|
-
export declare function evCompleted(id: string): string
|
|
126
|
-
|
|
127
|
-
export declare function evFunctionCall(callId: string, name: string, args: string): string
|
|
128
|
-
|
|
129
|
-
export declare function evResponseCreated(id: string): string
|
|
130
|
-
|
|
131
|
-
export declare function fastEmbedEmbed(req: FastEmbedEmbedRequest): Promise<Array<Array<number>>>
|
|
132
|
-
|
|
133
|
-
export interface FastEmbedEmbedRequest {
|
|
134
|
-
inputs: Array<string>
|
|
135
|
-
batchSize?: number
|
|
136
|
-
normalize?: boolean
|
|
137
|
-
projectRoot?: string
|
|
138
|
-
cache?: boolean
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export declare function fastEmbedInit(opts: FastEmbedInitOptions): Promise<void>
|
|
142
|
-
|
|
143
|
-
export interface FastEmbedInitOptions {
|
|
144
|
-
model?: string
|
|
145
|
-
cacheDir?: string
|
|
146
|
-
maxLength?: number
|
|
147
|
-
showDownloadProgress?: boolean
|
|
148
|
-
/** Enable CoreML execution provider for Metal/ANE acceleration on macOS */
|
|
149
|
-
useCoreml?: boolean
|
|
150
|
-
/** Use Apple Neural Engine only (vs ANE + GPU) */
|
|
151
|
-
coremlAneOnly?: boolean
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export interface ForkRequest {
|
|
155
|
-
threadId: string
|
|
156
|
-
nthUserMessage?: number
|
|
157
|
-
model?: string
|
|
158
|
-
modelProvider?: string
|
|
159
|
-
oss?: boolean
|
|
160
|
-
sandboxMode?: string
|
|
161
|
-
approvalMode?: string
|
|
162
|
-
workspaceWriteOptions?: WorkspaceWriteOptions
|
|
163
|
-
workingDirectory?: string
|
|
164
|
-
skipGitRepoCheck?: boolean
|
|
165
|
-
baseUrl?: string
|
|
166
|
-
apiKey?: string
|
|
167
|
-
linuxSandboxPath?: string
|
|
168
|
-
reasoningEffort?: string
|
|
169
|
-
reasoningSummary?: string
|
|
170
|
-
fullAuto?: boolean
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export interface ForkResult {
|
|
174
|
-
threadId: string
|
|
175
|
-
rolloutPath: string
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export declare function forkThread(req: ForkRequest): Promise<ForkResult>
|
|
179
|
-
|
|
180
|
-
export declare function isTokioRuntimeAvailable(): boolean
|
|
181
|
-
|
|
182
|
-
export interface JsApprovalRequest {
|
|
183
|
-
type: string
|
|
184
|
-
details?: JsonValue
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface JsEmitBackgroundEventRequest {
|
|
188
|
-
threadId: string
|
|
189
|
-
message: string
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export interface JsEmitPlanUpdateRequest {
|
|
193
|
-
threadId: string
|
|
194
|
-
explanation?: string
|
|
195
|
-
plan: Array<JsPlanItem>
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export interface JsModifyPlanRequest {
|
|
199
|
-
threadId: string
|
|
200
|
-
operations: Array<JsPlanOperation>
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export interface JsPlanItem {
|
|
204
|
-
step: string
|
|
205
|
-
status?: string
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export interface JsPlanOperation {
|
|
209
|
-
type: string
|
|
210
|
-
item?: JsPlanItem
|
|
211
|
-
index?: number
|
|
212
|
-
updates?: JsPlanUpdate
|
|
213
|
-
newOrder?: Array<number>
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface JsPlanUpdate {
|
|
217
|
-
step?: string
|
|
218
|
-
status?: string
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export interface JsToolInterceptorContext {
|
|
222
|
-
invocation: JsToolInvocation
|
|
223
|
-
token: string
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export interface JsToolInvocation {
|
|
227
|
-
callId: string
|
|
228
|
-
toolName: string
|
|
229
|
-
arguments?: string
|
|
230
|
-
input?: string
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export declare const enum LayoutType {
|
|
234
|
-
Split = 0,
|
|
235
|
-
Tabs = 1,
|
|
236
|
-
Grid = 2,
|
|
237
|
-
Stack = 3
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export declare function listConversations(req: ListConversationsRequest): Promise<ConversationListPage>
|
|
241
|
-
|
|
242
|
-
export interface ListConversationsRequest {
|
|
243
|
-
config?: ConversationConfigRequest
|
|
244
|
-
pageSize?: number
|
|
245
|
-
cursor?: string
|
|
246
|
-
modelProviders?: Array<string>
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export declare function modifyPlan(req: JsModifyPlanRequest): void
|
|
250
|
-
|
|
251
|
-
export interface NativeToolInfo {
|
|
252
|
-
name: string
|
|
253
|
-
description?: string
|
|
254
|
-
parameters?: JsonValue
|
|
255
|
-
strict?: boolean
|
|
256
|
-
supportsParallel?: boolean
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
export interface NativeToolResponse {
|
|
260
|
-
output?: string
|
|
261
|
-
success?: boolean
|
|
262
|
-
error?: string
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export declare function registerApprovalCallback(handler: (request: JsApprovalRequest) => boolean | Promise<boolean>): void
|
|
266
|
-
|
|
267
|
-
export declare function registerTool(info: NativeToolInfo, handler: (call: JsToolInvocation) => NativeToolResponse | Promise<NativeToolResponse>): void
|
|
268
|
-
|
|
269
|
-
export declare function registerToolInterceptor(toolName: string, handler: (context: JsToolInterceptorContext) => NativeToolResponse | Promise<NativeToolResponse>): void
|
|
270
|
-
|
|
271
|
-
export interface RepoDiffFileChange {
|
|
272
|
-
path: string
|
|
273
|
-
status: string
|
|
274
|
-
diff: string
|
|
275
|
-
truncated: boolean
|
|
276
|
-
previousPath?: string
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export interface RepoDiffOptions {
|
|
280
|
-
maxFiles?: number
|
|
281
|
-
diffContextLines?: number
|
|
282
|
-
diffCharLimit?: number
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export interface RepoDiffSummary {
|
|
286
|
-
repoPath: string
|
|
287
|
-
branch: string
|
|
288
|
-
baseBranch: string
|
|
289
|
-
upstreamRef?: string
|
|
290
|
-
mergeBase: string
|
|
291
|
-
statusSummary: string
|
|
292
|
-
diffStat: string
|
|
293
|
-
recentCommits: string
|
|
294
|
-
changedFiles: Array<RepoDiffFileChange>
|
|
295
|
-
totalChangedFiles: number
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
export declare function resumeConversationFromRollout(req: ResumeFromRolloutRequest): Promise<ForkResult>
|
|
299
|
-
|
|
300
|
-
export interface ResumeFromRolloutRequest {
|
|
301
|
-
rolloutPath: string
|
|
302
|
-
config?: ConversationConfigRequest
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export interface ReverieConversation {
|
|
306
|
-
id: string
|
|
307
|
-
path: string
|
|
308
|
-
createdAt?: string
|
|
309
|
-
updatedAt?: string
|
|
310
|
-
headRecords: Array<string>
|
|
311
|
-
tailRecords: Array<string>
|
|
312
|
-
headRecordsToon: Array<string>
|
|
313
|
-
tailRecordsToon: Array<string>
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export declare function reverieGetConversationInsights(conversationPath: string, query?: string | undefined | null): Promise<Array<string>>
|
|
317
|
-
|
|
318
|
-
export declare function reverieIndexSemantic(codexHomePath: string, options?: ReverieSemanticSearchOptions | undefined | null): Promise<ReverieSemanticIndexStats>
|
|
319
|
-
|
|
320
|
-
export declare function reverieListConversations(codexHomePath: string, limit?: number | undefined | null, offset?: number | undefined | null): Promise<Array<ReverieConversation>>
|
|
321
|
-
|
|
322
|
-
/** Search using blocks from the current ongoing conversation to find similar past sessions */
|
|
323
|
-
export declare function reverieSearchByConversation(codexHomePath: string, conversationMessages: Array<string>, options?: ReverieSemanticSearchOptions | undefined | null): Promise<Array<ReverieSearchResult>>
|
|
324
|
-
|
|
325
|
-
export declare function reverieSearchConversations(codexHomePath: string, query: string, limit?: number | undefined | null): Promise<Array<ReverieSearchResult>>
|
|
326
|
-
|
|
327
|
-
export interface ReverieSearchResult {
|
|
328
|
-
conversation: ReverieConversation
|
|
329
|
-
relevanceScore: number
|
|
330
|
-
matchingExcerpts: Array<string>
|
|
331
|
-
insights: Array<string>
|
|
332
|
-
rerankerScore?: number
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export declare function reverieSearchSemantic(codexHomePath: string, contextText: string, options?: ReverieSemanticSearchOptions | undefined | null): Promise<Array<ReverieSearchResult>>
|
|
336
|
-
|
|
337
|
-
export interface ReverieSemanticIndexStats {
|
|
338
|
-
conversationsIndexed: number
|
|
339
|
-
documentsEmbedded: number
|
|
340
|
-
batches: number
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
export interface ReverieSemanticSearchOptions {
|
|
344
|
-
limit?: number
|
|
345
|
-
maxCandidates?: number
|
|
346
|
-
projectRoot?: string
|
|
347
|
-
batchSize?: number
|
|
348
|
-
normalize?: boolean
|
|
349
|
-
cache?: boolean
|
|
350
|
-
rerankerModel?: string
|
|
351
|
-
rerankerCacheDir?: string
|
|
352
|
-
rerankerMaxLength?: number
|
|
353
|
-
rerankerShowProgress?: boolean
|
|
354
|
-
rerankerBatchSize?: number
|
|
355
|
-
rerankerTopK?: number
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
export declare function runApplyPatch(patch: string): void
|
|
359
|
-
|
|
360
|
-
export interface RunRequest {
|
|
361
|
-
prompt: string
|
|
362
|
-
threadId?: string
|
|
363
|
-
images?: Array<string>
|
|
364
|
-
model?: string
|
|
365
|
-
modelProvider?: string
|
|
366
|
-
oss?: boolean
|
|
367
|
-
sandboxMode?: string
|
|
368
|
-
approvalMode?: string
|
|
369
|
-
workspaceWriteOptions?: WorkspaceWriteOptions
|
|
370
|
-
reviewMode?: boolean
|
|
371
|
-
reviewHint?: string
|
|
372
|
-
workingDirectory?: string
|
|
373
|
-
skipGitRepoCheck?: boolean
|
|
374
|
-
outputSchema?: JsonValue
|
|
375
|
-
baseUrl?: string
|
|
376
|
-
apiKey?: string
|
|
377
|
-
linuxSandboxPath?: string
|
|
378
|
-
reasoningEffort?: string
|
|
379
|
-
reasoningSummary?: string
|
|
380
|
-
fullAuto?: boolean
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
export declare function runThread(req: RunRequest): Promise<unknown>
|
|
384
|
-
|
|
385
|
-
export declare function runThreadStream(req: RunRequest, onEvent: (err: unknown, eventJson?: string) => void): Promise<unknown>
|
|
386
|
-
|
|
387
|
-
export declare function runTui(req: TuiRequest): Promise<TuiExitInfo>
|
|
388
|
-
|
|
389
|
-
export declare function sse(events: Array<string>): string
|
|
390
|
-
|
|
391
|
-
export declare function startTui(req: TuiRequest): TuiSession
|
|
392
|
-
|
|
393
|
-
export interface TokenizerBaseOptions {
|
|
394
|
-
model?: string
|
|
395
|
-
encoding?: "o200k_base" | "cl100k_base"
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
export declare function tokenizerCount(text: string, options?: TokenizerBaseOptions | undefined | null): number
|
|
399
|
-
|
|
400
|
-
export declare function tokenizerDecode(tokens: Array<number>, options?: TokenizerBaseOptions | undefined | null): string
|
|
401
|
-
|
|
402
|
-
export declare function tokenizerEncode(text: string, options?: TokenizerEncodeOptions | undefined | null): Array<number>
|
|
403
|
-
|
|
404
|
-
export interface TokenizerEncodeOptions {
|
|
405
|
-
model?: string
|
|
406
|
-
encoding?: "o200k_base" | "cl100k_base"
|
|
407
|
-
withSpecialTokens?: boolean
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
export interface TokenUsageSummary {
|
|
411
|
-
inputTokens: number
|
|
412
|
-
cachedInputTokens: number
|
|
413
|
-
outputTokens: number
|
|
414
|
-
reasoningOutputTokens: number
|
|
415
|
-
totalTokens: number
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
export declare function toonEncode(value: JsonValue): string
|
|
419
|
-
|
|
420
|
-
export interface TuiExitInfo {
|
|
421
|
-
tokenUsage: TokenUsageSummary
|
|
422
|
-
conversationId?: string
|
|
423
|
-
updateAction?: UpdateActionInfo
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
export interface TuiRequest {
|
|
427
|
-
prompt?: string
|
|
428
|
-
images?: Array<string>
|
|
429
|
-
model?: string
|
|
430
|
-
oss?: boolean
|
|
431
|
-
sandboxMode?: string
|
|
432
|
-
approvalMode?: string
|
|
433
|
-
resumeSessionId?: string
|
|
434
|
-
resumeLast?: boolean
|
|
435
|
-
resumePicker?: boolean
|
|
436
|
-
fullAuto?: boolean
|
|
437
|
-
dangerouslyBypassApprovalsAndSandbox?: boolean
|
|
438
|
-
workingDirectory?: string
|
|
439
|
-
configProfile?: string
|
|
440
|
-
configOverrides?: Array<string>
|
|
441
|
-
addDir?: Array<string>
|
|
442
|
-
webSearch?: boolean
|
|
443
|
-
linuxSandboxPath?: string
|
|
444
|
-
baseUrl?: string
|
|
445
|
-
apiKey?: string
|
|
446
|
-
reasoningEffort?: string
|
|
447
|
-
reasoningSummary?: string
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
export interface TuiTestRequest {
|
|
451
|
-
width: number
|
|
452
|
-
height: number
|
|
453
|
-
viewport: TuiTestViewport
|
|
454
|
-
lines: Array<string>
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
export declare function tuiTestRun(req: TuiTestRequest): Array<string>
|
|
458
|
-
|
|
459
|
-
export interface TuiTestViewport {
|
|
460
|
-
x: number
|
|
461
|
-
y: number
|
|
462
|
-
width: number
|
|
463
|
-
height: number
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
export interface UpdateActionInfo {
|
|
467
|
-
kind: string
|
|
468
|
-
command: string
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
export declare const enum WidgetType {
|
|
472
|
-
Text = 0,
|
|
473
|
-
Chat = 1,
|
|
474
|
-
Terminal = 2,
|
|
475
|
-
ProgressBar = 3,
|
|
476
|
-
StatusLine = 4,
|
|
477
|
-
Table = 5,
|
|
478
|
-
FileTree = 6,
|
|
479
|
-
Markdown = 7
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
export interface WorkspaceWriteOptions {
|
|
483
|
-
networkAccess?: boolean
|
|
484
|
-
writableRoots?: Array<string>
|
|
485
|
-
excludeTmpdirEnvVar?: boolean
|
|
486
|
-
excludeSlashTmp?: boolean
|
|
487
|
-
}
|