@kodax-ai/kodax 0.7.63 → 0.7.67
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/CHANGELOG.md +2390 -2189
- package/README.md +118 -16
- package/README_CN.md +78 -12
- package/dist/chunks/{agent-SL444XLN.js → agent-E4V5SLX6.js} +1 -1
- package/dist/chunks/argument-completer-N6RT5KYT.js +2 -0
- package/dist/chunks/{chunk-ARUWXX25.js → chunk-35P7QL2Q.js} +1 -1
- package/dist/chunks/chunk-AKMXJSGM.js +56 -0
- package/dist/chunks/{chunk-L3MF5V64.js → chunk-CW32NQFO.js} +1 -1
- package/dist/chunks/{chunk-KCFVGXVK.js → chunk-DEICMTHO.js} +9 -9
- package/dist/chunks/{chunk-7MPU7TP6.js → chunk-EN3O2C43.js} +270 -270
- package/dist/chunks/chunk-KBBGDRER.js +22 -0
- package/dist/chunks/chunk-NVDK375I.js +729 -0
- package/dist/chunks/{chunk-S4GVQO3W.js → chunk-O7N22GJ3.js} +1 -1
- package/dist/chunks/chunk-ONUPGMER.js +2 -0
- package/dist/chunks/{chunk-ZL5CEANW.js → chunk-PZTG2C33.js} +1 -1
- package/dist/chunks/chunk-QI6SQ2UQ.js +306 -0
- package/dist/chunks/{chunk-6OZ5KWG3.js → chunk-QJJKMNZF.js} +1 -1
- package/dist/chunks/chunk-RS2GAABJ.js +328 -0
- package/dist/chunks/chunk-W2XMNYLK.js +15 -0
- package/dist/chunks/chunk-WCSSXBHR.js +419 -0
- package/dist/chunks/chunk-YH5BTUQO.js +343 -0
- package/dist/chunks/{chunk-UA744TZM.js → chunk-YRBNXFHY.js} +1 -1
- package/dist/chunks/compaction-config-56NO42ZI.js +2 -0
- package/dist/chunks/{construction-bootstrap-EFZBONTK.js → construction-bootstrap-GLEHQ2KB.js} +1 -1
- package/dist/chunks/{devtools-4CRULTR2.js → devtools-CD6KSIHE.js} +1 -1
- package/dist/chunks/{devtools-YINBSZC7.js → devtools-XR5F2C6T.js} +1 -1
- package/dist/chunks/{dist-73L4OYPD.js → dist-4PXB7U22.js} +1 -1
- package/dist/chunks/dist-4UIRSSFS.js +2 -0
- package/dist/chunks/host-DMREFNSO.js +2 -0
- package/dist/chunks/{paste-FDYM7SZX.js → paste-C33GZQV5.js} +1 -1
- package/dist/chunks/run-manager-P5XMSGZ7.js +2 -0
- package/dist/chunks/utils-JENPFKAE.js +2 -0
- package/dist/constructed-handler-worker.js +2 -0
- package/dist/index.d.ts +25 -11
- package/dist/index.js +6 -6
- package/dist/kodax_cli.js +1282 -1232
- package/dist/runtime-worker.js +2872 -0
- package/dist/sdk-agent.d.ts +46 -10
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +337 -1020
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +2 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +208 -185
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +1070 -0
- package/dist/sdk-runtime.js +2 -0
- package/dist/sdk-session.d.ts +4 -4
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +191 -10
- package/dist/types-chunks/{bash-prefix-extractor.d-CZW9fRoa.d.ts → bash-prefix-extractor.d-D57Gt6n8.d.ts} +186 -12
- package/dist/types-chunks/{run-manager.d-CYTnWhZY.d.ts → capsule.d-BZmqu_HL.d.ts} +5 -92
- package/dist/types-chunks/commands.d-Cg26ud-Y.d.ts +213 -0
- package/dist/types-chunks/{types.d-1CnTg7Sd.d.ts → guardrail.d-Ds7JHxR1.d.ts} +3 -128
- package/dist/types-chunks/{guardrail.d-MR6LwMB2.d.ts → guardrail.d-vSaBe64I.d.ts} +3 -3
- package/dist/types-chunks/{manager.d-DBD7SOTT.d.ts → manager.d-Zum9cGHU.d.ts} +3 -173
- package/dist/types-chunks/oauth-login.d-Bgb4rdLN.d.ts +174 -0
- package/dist/types-chunks/public-api.d-CPBMPDiU.d.ts +602 -0
- package/dist/types-chunks/run-manager.d-lnwnfyNC.d.ts +91 -0
- package/dist/types-chunks/{sdk-session-RBSBBKol.d.ts → sdk-session-ByoMLoUS.d.ts} +8 -306
- package/dist/types-chunks/{process.d-CY2g03Mb.d.ts → types.d-DG9B4SMm.d.ts} +369 -4
- package/dist/types-chunks/types.d-DU9lLkmE.d.ts +128 -0
- package/dist/types-chunks/types.d-DYv3a1ka.d.ts +975 -0
- package/dist/types-chunks/{utils.d-C14jZ9ZM.d.ts → utils.d-DMI-9GTR.d.ts} +88 -72
- package/docs/SDK_EMBEDDER_GUIDE.md +3079 -0
- package/package.json +8 -1
- package/dist/chunks/argument-completer-EN63ZVJK.js +0 -2
- package/dist/chunks/chunk-4MIHVNB7.js +0 -405
- package/dist/chunks/chunk-HP4FXMEM.js +0 -18
- package/dist/chunks/chunk-KHICMJIR.js +0 -310
- package/dist/chunks/chunk-LGR7ACBQ.js +0 -326
- package/dist/chunks/chunk-RR7W7UF6.js +0 -341
- package/dist/chunks/chunk-UGTK2JIJ.js +0 -731
- package/dist/chunks/chunk-V4WSBIXB.js +0 -2
- package/dist/chunks/chunk-VSWROENP.js +0 -52
- package/dist/chunks/compaction-config-4VIONMFB.js +0 -2
- package/dist/chunks/dist-EDF2YUF6.js +0 -2
- package/dist/chunks/host-J4HPDLFC.js +0 -2
- package/dist/chunks/run-manager-ZVSW2OWM.js +0 -2
- package/dist/chunks/utils-5HDLYTZJ.js +0 -2
- package/dist/types-chunks/storage.d-C6kkAEch.d.ts +0 -280
|
@@ -0,0 +1,1070 @@
|
|
|
1
|
+
import { E as KodaXReasoningMode, d as KodaXCustomProviderConfig } from './types-chunks/types.d-Bp4Lm1jv.js';
|
|
2
|
+
export { j as KodaXMessage } from './types-chunks/types.d-Bp4Lm1jv.js';
|
|
3
|
+
import { X as KodaXOptions, L as KodaXEvents, a5 as KodaXResult, b0 as RuntimeContextBudgetSnapshot, b7 as RuntimeToolExposurePlan } from './types-chunks/bash-prefix-extractor.d-D57Gt6n8.js';
|
|
4
|
+
import { x as AgentExecutorFactory, p as AgentDispatchPolicy, n as AgentCredentialBroker, g as AgentArtifactPolicy, o as AgentDispatchContext, aP as KodaXImageInputArtifact, aS as KodaXInputArtifactSource, bj as KodaXVideoInputArtifact, dc as WorkflowProcessSnapshot, d6 as WorkflowProcessEvent, N as AgentRegistrationService, am as DispatchableAgentQuery, ak as DispatchableAgentListing, K as AgentPreflightInput, L as AgentPreflightResult, V as AgentTaskService } from './types-chunks/types.d-DG9B4SMm.js';
|
|
5
|
+
import { i as SkillMetadata } from './types-chunks/types.d-vJExiRje.js';
|
|
6
|
+
import { a as McpServerConfig } from './types-chunks/config.d-CJy1WENT.js';
|
|
7
|
+
import { s as McpServerStatus, t as McpServerToolList } from './types-chunks/manager.d-Zum9cGHU.js';
|
|
8
|
+
import { c as ManagedWorkflowSnapshot } from './types-chunks/run-manager.d-lnwnfyNC.js';
|
|
9
|
+
import { L as LoadedExtensionDiagnostic, u as ExtensionRuntimeDiagnostics } from './types-chunks/types.d-DYv3a1ka.js';
|
|
10
|
+
import { D as saveConfig, c as CommandInfo } from './types-chunks/utils.d-DMI-9GTR.js';
|
|
11
|
+
import { d as FullTranscriptSessionData, j as SessionTranscriptEntry, a as CompactSessionResult } from './types-chunks/public-api.d-CPBMPDiU.js';
|
|
12
|
+
import 'vscode-languageserver-protocol';
|
|
13
|
+
import './types-chunks/cost-tracker.d-CBLk1fiD.js';
|
|
14
|
+
import './types-chunks/capability.d-3C62G8Eq.js';
|
|
15
|
+
import './types-chunks/base.d-DalIRhbb.js';
|
|
16
|
+
import './types-chunks/guardrail.d-vSaBe64I.js';
|
|
17
|
+
import './types-chunks/guardrail.d-Ds7JHxR1.js';
|
|
18
|
+
import 'readline';
|
|
19
|
+
import 'child_process';
|
|
20
|
+
|
|
21
|
+
declare const KODAX_DAEMON_PROTOCOL = "kodax-runtime-daemon";
|
|
22
|
+
declare const KODAX_DAEMON_PROTOCOL_VERSION = 1;
|
|
23
|
+
type RuntimeDaemonMethod = 'initialize' | 'runtime.initialize' | 'ping' | 'runtime.identity' | 'runtime.status' | 'runtime.shutdown' | 'runtime.capabilities' | 'daemon.status' | 'daemon.stop' | 'daemon.logs' | 'session.create' | 'session.load' | 'session.list' | 'session.transcript' | 'session.fork' | 'session.notice.append' | 'session.rewind' | 'session.active_entry.set' | 'session.activeEntry.set' | 'session.compact' | 'session.archive' | 'session.unarchive' | 'session.delete' | 'session.settings.get' | 'session.settings.update' | 'run.start' | 'run.get' | 'run.list' | 'run.await' | 'run.abort' | 'run.model.set' | 'run.provider.set' | 'run.reasoning.set' | 'run.setModel' | 'run.setProvider' | 'run.setReasoning' | 'event.subscribe' | 'event.unsubscribe' | 'event.replay' | 'permission.list' | 'permission.listPending' | 'permission.request' | 'permission.respond' | 'workflow.list' | 'workflow.get' | 'workflow.subscribe' | 'workflow.unsubscribe' | 'workflow.pause' | 'workflow.resume' | 'workflow.stop' | 'config.read' | 'config.patch' | 'config.reload' | 'model.list' | 'provider.list' | 'provider.custom.list' | 'provider.custom.upsert' | 'provider.custom.remove' | 'mcp.server.list' | 'mcp.server.get' | 'mcp.server.validate' | 'mcp.server.upsert' | 'mcp.server.delete' | 'mcp.server.remove' | 'mcp.server.reload' | 'mcp.tool.list' | 'extension.list' | 'extension.reload' | 'command.list' | 'command.resolve' | 'skill.list' | 'skill.describe' | 'skill.read' | 'artifact.create' | 'artifact.get' | 'artifact.delete' | 'agentRegistrations.list' | 'agentRegistrations.upsert' | 'agentRegistrations.remove' | 'agents.listDispatchable' | 'agents.describe' | 'agents.preflight' | 'agentTasks.list' | 'agentTasks.start' | 'agentTasks.get' | 'agentTasks.events' | 'agentTasks.wait' | 'agentTasks.sendInput' | 'agentTasks.cancel' | 'agentTasks.reconcile' | 'context.budget.get' | 'tool.exposure.preview';
|
|
24
|
+
type RuntimeDaemonNotificationMethod = 'event' | 'runtime.warning';
|
|
25
|
+
interface RuntimeDaemonError {
|
|
26
|
+
readonly code: RuntimeDaemonErrorCode;
|
|
27
|
+
readonly message: string;
|
|
28
|
+
readonly data?: unknown;
|
|
29
|
+
}
|
|
30
|
+
type RuntimeDaemonErrorCode = 'invalid_frame' | 'invalid_request' | 'invalid_params' | 'not_initialized' | 'method_not_found' | 'unauthorized' | 'permission_denied' | 'conflict' | 'not_found' | 'cancelled' | 'overloaded' | 'internal_error';
|
|
31
|
+
interface RuntimeDaemonFrameBase {
|
|
32
|
+
readonly protocol: typeof KODAX_DAEMON_PROTOCOL;
|
|
33
|
+
readonly version: typeof KODAX_DAEMON_PROTOCOL_VERSION;
|
|
34
|
+
}
|
|
35
|
+
interface RuntimeDaemonRequest extends RuntimeDaemonFrameBase {
|
|
36
|
+
readonly kind: 'request';
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly method: RuntimeDaemonMethod;
|
|
39
|
+
readonly params?: unknown;
|
|
40
|
+
}
|
|
41
|
+
interface RuntimeDaemonSuccessResponse extends RuntimeDaemonFrameBase {
|
|
42
|
+
readonly kind: 'response';
|
|
43
|
+
readonly id: string;
|
|
44
|
+
readonly result: unknown;
|
|
45
|
+
}
|
|
46
|
+
interface RuntimeDaemonErrorResponse extends RuntimeDaemonFrameBase {
|
|
47
|
+
readonly kind: 'error';
|
|
48
|
+
readonly id?: string;
|
|
49
|
+
readonly error: RuntimeDaemonError;
|
|
50
|
+
}
|
|
51
|
+
interface RuntimeDaemonNotification extends RuntimeDaemonFrameBase {
|
|
52
|
+
readonly kind: 'notification';
|
|
53
|
+
readonly method: RuntimeDaemonNotificationMethod;
|
|
54
|
+
readonly params?: unknown;
|
|
55
|
+
}
|
|
56
|
+
type RuntimeDaemonFrame = RuntimeDaemonRequest | RuntimeDaemonSuccessResponse | RuntimeDaemonErrorResponse | RuntimeDaemonNotification;
|
|
57
|
+
declare const RUNTIME_DAEMON_METHODS: readonly RuntimeDaemonMethod[];
|
|
58
|
+
|
|
59
|
+
interface RuntimeDaemonClientTransport {
|
|
60
|
+
request(method: RuntimeDaemonMethod, params?: unknown): Promise<unknown>;
|
|
61
|
+
subscribe(listener: (notification: RuntimeDaemonNotification) => void): RuntimeSubscription;
|
|
62
|
+
close?(): Promise<void> | void;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface RuntimeWorkerResourceLimits {
|
|
66
|
+
readonly maxOldGenerationSizeMb?: number;
|
|
67
|
+
readonly maxYoungGenerationSizeMb?: number;
|
|
68
|
+
readonly stackSizeMb?: number;
|
|
69
|
+
}
|
|
70
|
+
interface RuntimeWorkerOptions {
|
|
71
|
+
readonly resourceLimits?: RuntimeWorkerResourceLimits;
|
|
72
|
+
readonly shutdownTimeoutMs?: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface RuntimeDaemonEndpoint {
|
|
76
|
+
readonly kind: 'pipe' | 'unix';
|
|
77
|
+
readonly path: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type RuntimeDaemonJsonSchemaType = 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';
|
|
81
|
+
interface RuntimeDaemonJsonSchema {
|
|
82
|
+
readonly type?: RuntimeDaemonJsonSchemaType | readonly RuntimeDaemonJsonSchemaType[];
|
|
83
|
+
readonly description?: string;
|
|
84
|
+
readonly enum?: readonly (string | number | boolean | null)[];
|
|
85
|
+
readonly properties?: Record<string, RuntimeDaemonJsonSchema>;
|
|
86
|
+
readonly required?: readonly string[];
|
|
87
|
+
readonly additionalProperties?: boolean | RuntimeDaemonJsonSchema;
|
|
88
|
+
readonly items?: RuntimeDaemonJsonSchema;
|
|
89
|
+
readonly oneOf?: readonly RuntimeDaemonJsonSchema[];
|
|
90
|
+
}
|
|
91
|
+
interface RuntimeDaemonMethodSchema {
|
|
92
|
+
readonly params: RuntimeDaemonJsonSchema;
|
|
93
|
+
readonly result: RuntimeDaemonJsonSchema;
|
|
94
|
+
}
|
|
95
|
+
interface RuntimeDaemonProtocolSchema {
|
|
96
|
+
readonly protocol: typeof KODAX_DAEMON_PROTOCOL;
|
|
97
|
+
readonly version: typeof KODAX_DAEMON_PROTOCOL_VERSION;
|
|
98
|
+
readonly methods: Record<RuntimeDaemonMethod, RuntimeDaemonMethodSchema>;
|
|
99
|
+
readonly notifications: Record<RuntimeDaemonNotificationMethod, RuntimeDaemonJsonSchema>;
|
|
100
|
+
}
|
|
101
|
+
declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
102
|
+
initialize: {
|
|
103
|
+
params: RuntimeDaemonJsonSchema;
|
|
104
|
+
result: RuntimeDaemonJsonSchema;
|
|
105
|
+
};
|
|
106
|
+
'runtime.initialize': {
|
|
107
|
+
params: RuntimeDaemonJsonSchema;
|
|
108
|
+
result: RuntimeDaemonJsonSchema;
|
|
109
|
+
};
|
|
110
|
+
ping: {
|
|
111
|
+
params: RuntimeDaemonJsonSchema;
|
|
112
|
+
result: RuntimeDaemonJsonSchema;
|
|
113
|
+
};
|
|
114
|
+
'runtime.identity': {
|
|
115
|
+
params: RuntimeDaemonJsonSchema;
|
|
116
|
+
result: RuntimeDaemonJsonSchema;
|
|
117
|
+
};
|
|
118
|
+
'runtime.status': {
|
|
119
|
+
params: RuntimeDaemonJsonSchema;
|
|
120
|
+
result: RuntimeDaemonJsonSchema;
|
|
121
|
+
};
|
|
122
|
+
'runtime.shutdown': {
|
|
123
|
+
params: RuntimeDaemonJsonSchema;
|
|
124
|
+
result: RuntimeDaemonJsonSchema;
|
|
125
|
+
};
|
|
126
|
+
'runtime.capabilities': {
|
|
127
|
+
params: RuntimeDaemonJsonSchema;
|
|
128
|
+
result: RuntimeDaemonJsonSchema;
|
|
129
|
+
};
|
|
130
|
+
'daemon.status': {
|
|
131
|
+
params: RuntimeDaemonJsonSchema;
|
|
132
|
+
result: RuntimeDaemonJsonSchema;
|
|
133
|
+
};
|
|
134
|
+
'daemon.stop': {
|
|
135
|
+
params: RuntimeDaemonJsonSchema;
|
|
136
|
+
result: RuntimeDaemonJsonSchema;
|
|
137
|
+
};
|
|
138
|
+
'daemon.logs': {
|
|
139
|
+
params: RuntimeDaemonJsonSchema;
|
|
140
|
+
result: RuntimeDaemonJsonSchema;
|
|
141
|
+
};
|
|
142
|
+
'session.create': {
|
|
143
|
+
params: RuntimeDaemonJsonSchema;
|
|
144
|
+
result: RuntimeDaemonJsonSchema;
|
|
145
|
+
};
|
|
146
|
+
'session.load': {
|
|
147
|
+
params: RuntimeDaemonJsonSchema;
|
|
148
|
+
result: RuntimeDaemonJsonSchema;
|
|
149
|
+
};
|
|
150
|
+
'session.list': {
|
|
151
|
+
params: RuntimeDaemonJsonSchema;
|
|
152
|
+
result: RuntimeDaemonJsonSchema;
|
|
153
|
+
};
|
|
154
|
+
'session.transcript': {
|
|
155
|
+
params: RuntimeDaemonJsonSchema;
|
|
156
|
+
result: RuntimeDaemonJsonSchema;
|
|
157
|
+
};
|
|
158
|
+
'session.fork': {
|
|
159
|
+
params: RuntimeDaemonJsonSchema;
|
|
160
|
+
result: RuntimeDaemonJsonSchema;
|
|
161
|
+
};
|
|
162
|
+
'session.notice.append': {
|
|
163
|
+
params: RuntimeDaemonJsonSchema;
|
|
164
|
+
result: RuntimeDaemonJsonSchema;
|
|
165
|
+
};
|
|
166
|
+
'session.rewind': {
|
|
167
|
+
params: RuntimeDaemonJsonSchema;
|
|
168
|
+
result: RuntimeDaemonJsonSchema;
|
|
169
|
+
};
|
|
170
|
+
'session.active_entry.set': {
|
|
171
|
+
params: RuntimeDaemonJsonSchema;
|
|
172
|
+
result: RuntimeDaemonJsonSchema;
|
|
173
|
+
};
|
|
174
|
+
'session.activeEntry.set': {
|
|
175
|
+
params: RuntimeDaemonJsonSchema;
|
|
176
|
+
result: RuntimeDaemonJsonSchema;
|
|
177
|
+
};
|
|
178
|
+
'session.compact': {
|
|
179
|
+
params: RuntimeDaemonJsonSchema;
|
|
180
|
+
result: RuntimeDaemonJsonSchema;
|
|
181
|
+
};
|
|
182
|
+
'session.archive': {
|
|
183
|
+
params: RuntimeDaemonJsonSchema;
|
|
184
|
+
result: RuntimeDaemonJsonSchema;
|
|
185
|
+
};
|
|
186
|
+
'session.unarchive': {
|
|
187
|
+
params: RuntimeDaemonJsonSchema;
|
|
188
|
+
result: RuntimeDaemonJsonSchema;
|
|
189
|
+
};
|
|
190
|
+
'session.delete': {
|
|
191
|
+
params: RuntimeDaemonJsonSchema;
|
|
192
|
+
result: RuntimeDaemonJsonSchema;
|
|
193
|
+
};
|
|
194
|
+
'session.settings.get': {
|
|
195
|
+
params: RuntimeDaemonJsonSchema;
|
|
196
|
+
result: RuntimeDaemonJsonSchema;
|
|
197
|
+
};
|
|
198
|
+
'session.settings.update': {
|
|
199
|
+
params: RuntimeDaemonJsonSchema;
|
|
200
|
+
result: RuntimeDaemonJsonSchema;
|
|
201
|
+
};
|
|
202
|
+
'run.start': {
|
|
203
|
+
params: RuntimeDaemonJsonSchema;
|
|
204
|
+
result: RuntimeDaemonJsonSchema;
|
|
205
|
+
};
|
|
206
|
+
'run.get': {
|
|
207
|
+
params: RuntimeDaemonJsonSchema;
|
|
208
|
+
result: RuntimeDaemonJsonSchema;
|
|
209
|
+
};
|
|
210
|
+
'run.list': {
|
|
211
|
+
params: RuntimeDaemonJsonSchema;
|
|
212
|
+
result: RuntimeDaemonJsonSchema;
|
|
213
|
+
};
|
|
214
|
+
'run.await': {
|
|
215
|
+
params: RuntimeDaemonJsonSchema;
|
|
216
|
+
result: RuntimeDaemonJsonSchema;
|
|
217
|
+
};
|
|
218
|
+
'run.abort': {
|
|
219
|
+
params: RuntimeDaemonJsonSchema;
|
|
220
|
+
result: RuntimeDaemonJsonSchema;
|
|
221
|
+
};
|
|
222
|
+
'run.model.set': {
|
|
223
|
+
params: RuntimeDaemonJsonSchema;
|
|
224
|
+
result: RuntimeDaemonJsonSchema;
|
|
225
|
+
};
|
|
226
|
+
'run.provider.set': {
|
|
227
|
+
params: RuntimeDaemonJsonSchema;
|
|
228
|
+
result: RuntimeDaemonJsonSchema;
|
|
229
|
+
};
|
|
230
|
+
'run.reasoning.set': {
|
|
231
|
+
params: RuntimeDaemonJsonSchema;
|
|
232
|
+
result: RuntimeDaemonJsonSchema;
|
|
233
|
+
};
|
|
234
|
+
'run.setModel': {
|
|
235
|
+
params: RuntimeDaemonJsonSchema;
|
|
236
|
+
result: RuntimeDaemonJsonSchema;
|
|
237
|
+
};
|
|
238
|
+
'run.setProvider': {
|
|
239
|
+
params: RuntimeDaemonJsonSchema;
|
|
240
|
+
result: RuntimeDaemonJsonSchema;
|
|
241
|
+
};
|
|
242
|
+
'run.setReasoning': {
|
|
243
|
+
params: RuntimeDaemonJsonSchema;
|
|
244
|
+
result: RuntimeDaemonJsonSchema;
|
|
245
|
+
};
|
|
246
|
+
'event.subscribe': {
|
|
247
|
+
params: RuntimeDaemonJsonSchema;
|
|
248
|
+
result: RuntimeDaemonJsonSchema;
|
|
249
|
+
};
|
|
250
|
+
'event.unsubscribe': {
|
|
251
|
+
params: RuntimeDaemonJsonSchema;
|
|
252
|
+
result: RuntimeDaemonJsonSchema;
|
|
253
|
+
};
|
|
254
|
+
'event.replay': {
|
|
255
|
+
params: RuntimeDaemonJsonSchema;
|
|
256
|
+
result: RuntimeDaemonJsonSchema;
|
|
257
|
+
};
|
|
258
|
+
'permission.list': {
|
|
259
|
+
params: RuntimeDaemonJsonSchema;
|
|
260
|
+
result: RuntimeDaemonJsonSchema;
|
|
261
|
+
};
|
|
262
|
+
'permission.listPending': {
|
|
263
|
+
params: RuntimeDaemonJsonSchema;
|
|
264
|
+
result: RuntimeDaemonJsonSchema;
|
|
265
|
+
};
|
|
266
|
+
'permission.request': {
|
|
267
|
+
params: RuntimeDaemonJsonSchema;
|
|
268
|
+
result: RuntimeDaemonJsonSchema;
|
|
269
|
+
};
|
|
270
|
+
'permission.respond': {
|
|
271
|
+
params: RuntimeDaemonJsonSchema;
|
|
272
|
+
result: RuntimeDaemonJsonSchema;
|
|
273
|
+
};
|
|
274
|
+
'workflow.list': {
|
|
275
|
+
params: RuntimeDaemonJsonSchema;
|
|
276
|
+
result: RuntimeDaemonJsonSchema;
|
|
277
|
+
};
|
|
278
|
+
'workflow.get': {
|
|
279
|
+
params: RuntimeDaemonJsonSchema;
|
|
280
|
+
result: {
|
|
281
|
+
oneOf: RuntimeDaemonJsonSchema[];
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
'workflow.subscribe': {
|
|
285
|
+
params: RuntimeDaemonJsonSchema;
|
|
286
|
+
result: RuntimeDaemonJsonSchema;
|
|
287
|
+
};
|
|
288
|
+
'workflow.unsubscribe': {
|
|
289
|
+
params: RuntimeDaemonJsonSchema;
|
|
290
|
+
result: RuntimeDaemonJsonSchema;
|
|
291
|
+
};
|
|
292
|
+
'workflow.pause': {
|
|
293
|
+
params: RuntimeDaemonJsonSchema;
|
|
294
|
+
result: RuntimeDaemonJsonSchema;
|
|
295
|
+
};
|
|
296
|
+
'workflow.resume': {
|
|
297
|
+
params: RuntimeDaemonJsonSchema;
|
|
298
|
+
result: RuntimeDaemonJsonSchema;
|
|
299
|
+
};
|
|
300
|
+
'workflow.stop': {
|
|
301
|
+
params: RuntimeDaemonJsonSchema;
|
|
302
|
+
result: RuntimeDaemonJsonSchema;
|
|
303
|
+
};
|
|
304
|
+
'config.read': {
|
|
305
|
+
params: RuntimeDaemonJsonSchema;
|
|
306
|
+
result: RuntimeDaemonJsonSchema;
|
|
307
|
+
};
|
|
308
|
+
'config.patch': {
|
|
309
|
+
params: RuntimeDaemonJsonSchema;
|
|
310
|
+
result: RuntimeDaemonJsonSchema;
|
|
311
|
+
};
|
|
312
|
+
'config.reload': {
|
|
313
|
+
params: RuntimeDaemonJsonSchema;
|
|
314
|
+
result: RuntimeDaemonJsonSchema;
|
|
315
|
+
};
|
|
316
|
+
'model.list': {
|
|
317
|
+
params: RuntimeDaemonJsonSchema;
|
|
318
|
+
result: {
|
|
319
|
+
oneOf: RuntimeDaemonJsonSchema[];
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
'provider.list': {
|
|
323
|
+
params: RuntimeDaemonJsonSchema;
|
|
324
|
+
result: RuntimeDaemonJsonSchema;
|
|
325
|
+
};
|
|
326
|
+
'provider.custom.list': {
|
|
327
|
+
params: RuntimeDaemonJsonSchema;
|
|
328
|
+
result: RuntimeDaemonJsonSchema;
|
|
329
|
+
};
|
|
330
|
+
'provider.custom.upsert': {
|
|
331
|
+
params: RuntimeDaemonJsonSchema;
|
|
332
|
+
result: RuntimeDaemonJsonSchema;
|
|
333
|
+
};
|
|
334
|
+
'provider.custom.remove': {
|
|
335
|
+
params: RuntimeDaemonJsonSchema;
|
|
336
|
+
result: RuntimeDaemonJsonSchema;
|
|
337
|
+
};
|
|
338
|
+
'mcp.server.list': {
|
|
339
|
+
params: RuntimeDaemonJsonSchema;
|
|
340
|
+
result: RuntimeDaemonJsonSchema;
|
|
341
|
+
};
|
|
342
|
+
'mcp.server.get': {
|
|
343
|
+
params: RuntimeDaemonJsonSchema;
|
|
344
|
+
result: {
|
|
345
|
+
oneOf: RuntimeDaemonJsonSchema[];
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
'mcp.server.validate': {
|
|
349
|
+
params: RuntimeDaemonJsonSchema;
|
|
350
|
+
result: {
|
|
351
|
+
oneOf: RuntimeDaemonJsonSchema[];
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
'mcp.server.upsert': {
|
|
355
|
+
params: RuntimeDaemonJsonSchema;
|
|
356
|
+
result: RuntimeDaemonJsonSchema;
|
|
357
|
+
};
|
|
358
|
+
'mcp.server.delete': {
|
|
359
|
+
params: RuntimeDaemonJsonSchema;
|
|
360
|
+
result: RuntimeDaemonJsonSchema;
|
|
361
|
+
};
|
|
362
|
+
'mcp.server.remove': {
|
|
363
|
+
params: RuntimeDaemonJsonSchema;
|
|
364
|
+
result: RuntimeDaemonJsonSchema;
|
|
365
|
+
};
|
|
366
|
+
'mcp.server.reload': {
|
|
367
|
+
params: RuntimeDaemonJsonSchema;
|
|
368
|
+
result: RuntimeDaemonJsonSchema;
|
|
369
|
+
};
|
|
370
|
+
'mcp.tool.list': {
|
|
371
|
+
params: RuntimeDaemonJsonSchema;
|
|
372
|
+
result: RuntimeDaemonJsonSchema;
|
|
373
|
+
};
|
|
374
|
+
'extension.list': {
|
|
375
|
+
params: RuntimeDaemonJsonSchema;
|
|
376
|
+
result: RuntimeDaemonJsonSchema;
|
|
377
|
+
};
|
|
378
|
+
'extension.reload': {
|
|
379
|
+
params: RuntimeDaemonJsonSchema;
|
|
380
|
+
result: RuntimeDaemonJsonSchema;
|
|
381
|
+
};
|
|
382
|
+
'command.list': {
|
|
383
|
+
params: RuntimeDaemonJsonSchema;
|
|
384
|
+
result: RuntimeDaemonJsonSchema;
|
|
385
|
+
};
|
|
386
|
+
'command.resolve': {
|
|
387
|
+
params: RuntimeDaemonJsonSchema;
|
|
388
|
+
result: RuntimeDaemonJsonSchema;
|
|
389
|
+
};
|
|
390
|
+
'skill.list': {
|
|
391
|
+
params: RuntimeDaemonJsonSchema;
|
|
392
|
+
result: RuntimeDaemonJsonSchema;
|
|
393
|
+
};
|
|
394
|
+
'skill.describe': {
|
|
395
|
+
params: RuntimeDaemonJsonSchema;
|
|
396
|
+
result: RuntimeDaemonJsonSchema;
|
|
397
|
+
};
|
|
398
|
+
'skill.read': {
|
|
399
|
+
params: RuntimeDaemonJsonSchema;
|
|
400
|
+
result: RuntimeDaemonJsonSchema;
|
|
401
|
+
};
|
|
402
|
+
'artifact.create': {
|
|
403
|
+
params: RuntimeDaemonJsonSchema;
|
|
404
|
+
result: RuntimeDaemonJsonSchema;
|
|
405
|
+
};
|
|
406
|
+
'artifact.get': {
|
|
407
|
+
params: RuntimeDaemonJsonSchema;
|
|
408
|
+
result: RuntimeDaemonJsonSchema;
|
|
409
|
+
};
|
|
410
|
+
'artifact.delete': {
|
|
411
|
+
params: RuntimeDaemonJsonSchema;
|
|
412
|
+
result: RuntimeDaemonJsonSchema;
|
|
413
|
+
};
|
|
414
|
+
'agentRegistrations.list': {
|
|
415
|
+
params: RuntimeDaemonJsonSchema;
|
|
416
|
+
result: RuntimeDaemonJsonSchema;
|
|
417
|
+
};
|
|
418
|
+
'agentRegistrations.upsert': {
|
|
419
|
+
params: RuntimeDaemonJsonSchema;
|
|
420
|
+
result: RuntimeDaemonJsonSchema;
|
|
421
|
+
};
|
|
422
|
+
'agentRegistrations.remove': {
|
|
423
|
+
params: RuntimeDaemonJsonSchema;
|
|
424
|
+
result: RuntimeDaemonJsonSchema;
|
|
425
|
+
};
|
|
426
|
+
'agents.listDispatchable': {
|
|
427
|
+
params: RuntimeDaemonJsonSchema;
|
|
428
|
+
result: RuntimeDaemonJsonSchema;
|
|
429
|
+
};
|
|
430
|
+
'agents.describe': {
|
|
431
|
+
params: RuntimeDaemonJsonSchema;
|
|
432
|
+
result: RuntimeDaemonJsonSchema;
|
|
433
|
+
};
|
|
434
|
+
'agents.preflight': {
|
|
435
|
+
params: RuntimeDaemonJsonSchema;
|
|
436
|
+
result: RuntimeDaemonJsonSchema;
|
|
437
|
+
};
|
|
438
|
+
'agentTasks.list': {
|
|
439
|
+
params: RuntimeDaemonJsonSchema;
|
|
440
|
+
result: RuntimeDaemonJsonSchema;
|
|
441
|
+
};
|
|
442
|
+
'agentTasks.start': {
|
|
443
|
+
params: RuntimeDaemonJsonSchema;
|
|
444
|
+
result: RuntimeDaemonJsonSchema;
|
|
445
|
+
};
|
|
446
|
+
'agentTasks.get': {
|
|
447
|
+
params: RuntimeDaemonJsonSchema;
|
|
448
|
+
result: RuntimeDaemonJsonSchema;
|
|
449
|
+
};
|
|
450
|
+
'agentTasks.events': {
|
|
451
|
+
params: RuntimeDaemonJsonSchema;
|
|
452
|
+
result: RuntimeDaemonJsonSchema;
|
|
453
|
+
};
|
|
454
|
+
'agentTasks.wait': {
|
|
455
|
+
params: RuntimeDaemonJsonSchema;
|
|
456
|
+
result: RuntimeDaemonJsonSchema;
|
|
457
|
+
};
|
|
458
|
+
'agentTasks.sendInput': {
|
|
459
|
+
params: RuntimeDaemonJsonSchema;
|
|
460
|
+
result: RuntimeDaemonJsonSchema;
|
|
461
|
+
};
|
|
462
|
+
'agentTasks.cancel': {
|
|
463
|
+
params: RuntimeDaemonJsonSchema;
|
|
464
|
+
result: RuntimeDaemonJsonSchema;
|
|
465
|
+
};
|
|
466
|
+
'agentTasks.reconcile': {
|
|
467
|
+
params: RuntimeDaemonJsonSchema;
|
|
468
|
+
result: RuntimeDaemonJsonSchema;
|
|
469
|
+
};
|
|
470
|
+
'context.budget.get': {
|
|
471
|
+
params: RuntimeDaemonJsonSchema;
|
|
472
|
+
result: {
|
|
473
|
+
oneOf: RuntimeDaemonJsonSchema[];
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
'tool.exposure.preview': {
|
|
477
|
+
params: RuntimeDaemonJsonSchema;
|
|
478
|
+
result: {
|
|
479
|
+
oneOf: RuntimeDaemonJsonSchema[];
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
declare const RUNTIME_DAEMON_NOTIFICATION_SCHEMAS: {
|
|
484
|
+
event: RuntimeDaemonJsonSchema;
|
|
485
|
+
'runtime.warning': RuntimeDaemonJsonSchema;
|
|
486
|
+
};
|
|
487
|
+
declare const RUNTIME_DAEMON_PROTOCOL_SCHEMA: RuntimeDaemonProtocolSchema;
|
|
488
|
+
declare const RUNTIME_DAEMON_PROTOCOL_SCHEMA_JSON: string;
|
|
489
|
+
declare function listRuntimeDaemonSchemaMethods(): readonly RuntimeDaemonMethod[];
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* SDK subpath entry - `@kodax-ai/kodax/runtime`.
|
|
493
|
+
*
|
|
494
|
+
* FEATURE_253 (v0.7.64): embedded runtime contract. This module composes the
|
|
495
|
+
* existing coding run loop, REPL-backed session storage, and agent workflow
|
|
496
|
+
* process manager without introducing a daemon or a fifth workspace package.
|
|
497
|
+
*/
|
|
498
|
+
|
|
499
|
+
type KodaXRuntimeMode = 'embedded' | 'daemon';
|
|
500
|
+
type KodaXRuntimeIsolation = 'inline' | 'worker' | 'process';
|
|
501
|
+
|
|
502
|
+
type ReplRuntimeConfigPatch = Parameters<typeof saveConfig>[0];
|
|
503
|
+
declare const RUNTIME_CONFIG_PATCH_KEYS: readonly ["provider", "model", "effort", "planModeEffort", "thinking", "reasoningMode", "agentMode", "permissionMode", "locale", "providerModels", "extensions", "repoIntelligenceMode", "repoIntelligenceTrace", "verifierLog", "stallLog", "fallbackProviders", "fastProvider", "fastModel", "deepProvider", "deepModel", "maxOutputTokens", "disablePromptCache", "lsp", "lspAutoDownload", "acpLogLevel", "sessionRetentionDays", "repoIntelligence", "workflow"];
|
|
504
|
+
type RuntimeConfigPatchKey = typeof RUNTIME_CONFIG_PATCH_KEYS[number];
|
|
505
|
+
interface RuntimeIdentity {
|
|
506
|
+
readonly runtimeId: string;
|
|
507
|
+
readonly mode: KodaXRuntimeMode;
|
|
508
|
+
readonly profile: string;
|
|
509
|
+
readonly startedAt: string;
|
|
510
|
+
readonly version: string;
|
|
511
|
+
readonly isolation?: KodaXRuntimeIsolation;
|
|
512
|
+
readonly workerThreadId?: number;
|
|
513
|
+
}
|
|
514
|
+
interface RuntimeClientInfo {
|
|
515
|
+
readonly name: string;
|
|
516
|
+
readonly title?: string;
|
|
517
|
+
readonly version?: string;
|
|
518
|
+
}
|
|
519
|
+
interface RuntimeClientCapabilities {
|
|
520
|
+
readonly richEvents?: boolean;
|
|
521
|
+
readonly permissionPrompts?: boolean;
|
|
522
|
+
readonly configAdmin?: boolean;
|
|
523
|
+
readonly commandCatalog?: boolean;
|
|
524
|
+
readonly skillCatalog?: boolean;
|
|
525
|
+
readonly artifactUpload?: boolean;
|
|
526
|
+
readonly contextDiagnostics?: boolean;
|
|
527
|
+
}
|
|
528
|
+
interface RuntimeExternalAgentsOptions {
|
|
529
|
+
readonly factories: readonly AgentExecutorFactory[];
|
|
530
|
+
readonly policy: AgentDispatchPolicy;
|
|
531
|
+
readonly credentialBroker?: AgentCredentialBroker;
|
|
532
|
+
/** Authorizes an executor before it materializes any remote artifact. Defaults to deny. */
|
|
533
|
+
readonly artifactPolicy?: AgentArtifactPolicy;
|
|
534
|
+
/** Default host-derived context for Worker tools; run.start may override it. */
|
|
535
|
+
readonly defaultContext?: AgentDispatchContext;
|
|
536
|
+
}
|
|
537
|
+
interface CreateKodaXRuntimeOptions {
|
|
538
|
+
/** Runtime ownership form. Defaults to a caller-owned embedded Runtime. */
|
|
539
|
+
readonly mode?: KodaXRuntimeMode;
|
|
540
|
+
/** Embedded-only execution location. Daemon mode selects host isolation internally. */
|
|
541
|
+
readonly isolation?: 'inline' | 'worker';
|
|
542
|
+
/** Requires `isolation: 'worker'`; rejected instead of being silently ignored. */
|
|
543
|
+
readonly worker?: RuntimeWorkerOptions;
|
|
544
|
+
readonly homeDir?: string;
|
|
545
|
+
readonly profile?: string;
|
|
546
|
+
readonly sessionsDir?: string;
|
|
547
|
+
readonly defaultProvider?: string;
|
|
548
|
+
readonly defaultModel?: string;
|
|
549
|
+
readonly permissionTimeoutMs?: number;
|
|
550
|
+
readonly daemonStartupTimeoutMs?: number;
|
|
551
|
+
readonly daemonConnectTimeoutMs?: number;
|
|
552
|
+
readonly daemonTransport?: RuntimeDaemonClientTransport;
|
|
553
|
+
readonly daemonEndpoint?: string | RuntimeDaemonEndpoint;
|
|
554
|
+
/** Defaults to true for daemon mode unless a transport or endpoint is supplied. */
|
|
555
|
+
readonly autoStartDaemon?: boolean;
|
|
556
|
+
readonly daemonToken?: string;
|
|
557
|
+
readonly clientInfo?: RuntimeClientInfo;
|
|
558
|
+
readonly capabilities?: RuntimeClientCapabilities;
|
|
559
|
+
readonly requirements?: RuntimeCapabilityRequirements;
|
|
560
|
+
/** Inline host injection. Functions never cross daemon or Worker transport. */
|
|
561
|
+
readonly externalAgents?: RuntimeExternalAgentsOptions;
|
|
562
|
+
}
|
|
563
|
+
interface ConnectKodaXRuntimeOptions {
|
|
564
|
+
readonly profile?: string;
|
|
565
|
+
/** Attach-only by default; set true to start or reuse the local profile daemon. */
|
|
566
|
+
readonly autoStart?: boolean;
|
|
567
|
+
readonly endpoint?: string | RuntimeDaemonEndpoint;
|
|
568
|
+
readonly transport?: RuntimeDaemonClientTransport;
|
|
569
|
+
readonly homeDir?: string;
|
|
570
|
+
readonly sessionsDir?: string;
|
|
571
|
+
readonly defaultProvider?: string;
|
|
572
|
+
readonly defaultModel?: string;
|
|
573
|
+
readonly permissionTimeoutMs?: number;
|
|
574
|
+
readonly daemonStartupTimeoutMs?: number;
|
|
575
|
+
readonly daemonConnectTimeoutMs?: number;
|
|
576
|
+
readonly daemonToken?: string;
|
|
577
|
+
readonly clientInfo?: RuntimeClientInfo;
|
|
578
|
+
readonly capabilities?: RuntimeClientCapabilities;
|
|
579
|
+
readonly requirements?: RuntimeCapabilityRequirements;
|
|
580
|
+
}
|
|
581
|
+
interface RuntimeCapabilityRequirements {
|
|
582
|
+
/** Reject inline and shared daemon hosts; only a Worker-hosted Runtime satisfies this. */
|
|
583
|
+
readonly hardDispose?: boolean;
|
|
584
|
+
/** Reject hosts that do not advertise an installed external Agent executor plane. */
|
|
585
|
+
readonly externalAgents?: boolean;
|
|
586
|
+
}
|
|
587
|
+
interface RuntimeDiagnosticFilter {
|
|
588
|
+
readonly sessionId?: string;
|
|
589
|
+
readonly runId?: string;
|
|
590
|
+
}
|
|
591
|
+
interface RuntimeDiagnosticsService {
|
|
592
|
+
latestContextBudget(filter?: RuntimeDiagnosticFilter): Promise<RuntimeContextBudgetSnapshot | null>;
|
|
593
|
+
latestToolExposure(filter?: RuntimeDiagnosticFilter): Promise<RuntimeToolExposurePlan | null>;
|
|
594
|
+
}
|
|
595
|
+
interface KodaXRuntime {
|
|
596
|
+
readonly identity: RuntimeIdentity;
|
|
597
|
+
readonly sessions: RuntimeSessionService;
|
|
598
|
+
readonly runs: RuntimeRunService;
|
|
599
|
+
readonly events: RuntimeEventService;
|
|
600
|
+
readonly permissions: RuntimePermissionService;
|
|
601
|
+
readonly workflows: RuntimeWorkflowService;
|
|
602
|
+
readonly config: RuntimeConfigService;
|
|
603
|
+
readonly catalog: RuntimeCatalogService;
|
|
604
|
+
readonly mcp: RuntimeMcpService;
|
|
605
|
+
readonly artifacts: RuntimeArtifactService;
|
|
606
|
+
readonly status: RuntimeStatusService;
|
|
607
|
+
readonly diagnostics: RuntimeDiagnosticsService;
|
|
608
|
+
readonly admin: RuntimeAdminService;
|
|
609
|
+
readonly agents: RuntimeAgentService;
|
|
610
|
+
readonly agentTasks: RuntimeAgentTaskService;
|
|
611
|
+
/**
|
|
612
|
+
* Release this facade. Inline closes its private Runtime, Worker mode shuts
|
|
613
|
+
* down and terminates its Worker, and daemon mode only detaches this client.
|
|
614
|
+
*/
|
|
615
|
+
close(): Promise<void>;
|
|
616
|
+
}
|
|
617
|
+
interface RuntimeAdminService {
|
|
618
|
+
readonly agentRegistrations: AgentRegistrationService;
|
|
619
|
+
}
|
|
620
|
+
interface RuntimeAgentService {
|
|
621
|
+
readonly enabled: boolean;
|
|
622
|
+
listDispatchable(query: DispatchableAgentQuery): Promise<readonly DispatchableAgentListing[]>;
|
|
623
|
+
describe(agentId: string, query: DispatchableAgentQuery): Promise<DispatchableAgentListing | undefined>;
|
|
624
|
+
preflight(input: AgentPreflightInput): Promise<AgentPreflightResult>;
|
|
625
|
+
}
|
|
626
|
+
type RuntimeAgentTaskService = Pick<AgentTaskService, 'start' | 'list' | 'get' | 'events' | 'wait' | 'sendInput' | 'cancel' | 'reconcile'>;
|
|
627
|
+
type RuntimeConfigPatch = Partial<Pick<ReplRuntimeConfigPatch, RuntimeConfigPatchKey>>;
|
|
628
|
+
interface RuntimeConfigReloadResult {
|
|
629
|
+
readonly ok: true;
|
|
630
|
+
readonly config: unknown;
|
|
631
|
+
}
|
|
632
|
+
interface RuntimeConfigService {
|
|
633
|
+
read(): Promise<unknown>;
|
|
634
|
+
patch(patch: RuntimeConfigPatch): Promise<unknown>;
|
|
635
|
+
reload(): Promise<RuntimeConfigReloadResult>;
|
|
636
|
+
}
|
|
637
|
+
interface RuntimeModelListFilter {
|
|
638
|
+
readonly provider?: string;
|
|
639
|
+
}
|
|
640
|
+
interface RuntimeCommandResolveInput {
|
|
641
|
+
readonly name: string;
|
|
642
|
+
readonly projectRoot?: string;
|
|
643
|
+
}
|
|
644
|
+
interface RuntimeCommandInfo {
|
|
645
|
+
readonly name: string;
|
|
646
|
+
readonly aliases?: readonly string[];
|
|
647
|
+
readonly description: string;
|
|
648
|
+
readonly source: CommandInfo['source'];
|
|
649
|
+
readonly usage?: string;
|
|
650
|
+
readonly argumentHint?: string;
|
|
651
|
+
readonly location?: CommandInfo['location'];
|
|
652
|
+
readonly path?: string;
|
|
653
|
+
readonly userInvocable?: boolean;
|
|
654
|
+
readonly disableModelInvocation?: boolean;
|
|
655
|
+
readonly allowedTools?: string;
|
|
656
|
+
readonly context?: 'fork';
|
|
657
|
+
readonly agent?: string;
|
|
658
|
+
readonly model?: string;
|
|
659
|
+
}
|
|
660
|
+
interface RuntimeSkillListFilter {
|
|
661
|
+
readonly projectRoot?: string;
|
|
662
|
+
readonly userInvocableOnly?: boolean;
|
|
663
|
+
}
|
|
664
|
+
interface RuntimeSkillDescribeInput {
|
|
665
|
+
readonly name: string;
|
|
666
|
+
readonly projectRoot?: string;
|
|
667
|
+
}
|
|
668
|
+
interface RuntimeSkillFileSummary {
|
|
669
|
+
readonly name: string;
|
|
670
|
+
readonly path: string;
|
|
671
|
+
readonly relativePath: string;
|
|
672
|
+
}
|
|
673
|
+
interface RuntimeSkillSummary {
|
|
674
|
+
readonly name: string;
|
|
675
|
+
readonly description: string;
|
|
676
|
+
readonly userInvocable: boolean;
|
|
677
|
+
readonly argumentHint?: string;
|
|
678
|
+
readonly path: string;
|
|
679
|
+
readonly source: SkillMetadata['source'];
|
|
680
|
+
readonly disableModelInvocation: boolean;
|
|
681
|
+
}
|
|
682
|
+
interface RuntimeSkillDescription extends RuntimeSkillSummary {
|
|
683
|
+
readonly content: string;
|
|
684
|
+
readonly skillFilePath: string;
|
|
685
|
+
readonly scripts?: readonly RuntimeSkillFileSummary[];
|
|
686
|
+
readonly references?: readonly RuntimeSkillFileSummary[];
|
|
687
|
+
readonly assets?: readonly RuntimeSkillFileSummary[];
|
|
688
|
+
readonly templates?: readonly RuntimeSkillFileSummary[];
|
|
689
|
+
readonly resources?: readonly RuntimeSkillFileSummary[];
|
|
690
|
+
}
|
|
691
|
+
interface RuntimeExtensionReloadResult {
|
|
692
|
+
readonly ok: true;
|
|
693
|
+
readonly active: boolean;
|
|
694
|
+
readonly diagnostics?: ExtensionRuntimeDiagnostics;
|
|
695
|
+
}
|
|
696
|
+
interface RuntimeExtensionListResult {
|
|
697
|
+
readonly active: boolean;
|
|
698
|
+
readonly extensions: readonly LoadedExtensionDiagnostic[];
|
|
699
|
+
readonly diagnostics?: ExtensionRuntimeDiagnostics;
|
|
700
|
+
}
|
|
701
|
+
interface RuntimeCatalogService {
|
|
702
|
+
providers(): Promise<unknown>;
|
|
703
|
+
models(filter?: RuntimeModelListFilter): Promise<unknown>;
|
|
704
|
+
commands(projectRoot?: string): Promise<readonly RuntimeCommandInfo[]>;
|
|
705
|
+
resolveCommand(input: RuntimeCommandResolveInput): Promise<RuntimeCommandInfo | null>;
|
|
706
|
+
skills(filter?: RuntimeSkillListFilter): Promise<readonly RuntimeSkillSummary[]>;
|
|
707
|
+
describeSkill(input: RuntimeSkillDescribeInput): Promise<RuntimeSkillDescription | null>;
|
|
708
|
+
customProviders(): Promise<readonly KodaXCustomProviderConfig[]>;
|
|
709
|
+
upsertCustomProvider(config: KodaXCustomProviderConfig): Promise<KodaXCustomProviderConfig>;
|
|
710
|
+
deleteCustomProvider(name: string): Promise<boolean>;
|
|
711
|
+
extensions(): Promise<RuntimeExtensionListResult>;
|
|
712
|
+
reloadExtensions(): Promise<RuntimeExtensionReloadResult>;
|
|
713
|
+
}
|
|
714
|
+
interface RuntimeMcpToolListFilter {
|
|
715
|
+
readonly server?: string;
|
|
716
|
+
readonly forceRefresh?: boolean;
|
|
717
|
+
}
|
|
718
|
+
interface RuntimeMcpReloadResult {
|
|
719
|
+
readonly ok: true;
|
|
720
|
+
readonly servers: readonly McpServerStatus[];
|
|
721
|
+
}
|
|
722
|
+
type RuntimeMcpValidateResult = {
|
|
723
|
+
readonly ok: true;
|
|
724
|
+
readonly config: McpServerConfig;
|
|
725
|
+
} | {
|
|
726
|
+
readonly ok: false;
|
|
727
|
+
readonly error: string;
|
|
728
|
+
};
|
|
729
|
+
interface RuntimeMcpService {
|
|
730
|
+
listServers(): Promise<Record<string, McpServerConfig>>;
|
|
731
|
+
getServer(name: string): Promise<McpServerConfig | undefined>;
|
|
732
|
+
validateServer(name: string, config: unknown): Promise<RuntimeMcpValidateResult>;
|
|
733
|
+
upsertServer(name: string, config: McpServerConfig): Promise<McpServerConfig>;
|
|
734
|
+
deleteServer(name: string): Promise<boolean>;
|
|
735
|
+
reloadServers(): Promise<RuntimeMcpReloadResult>;
|
|
736
|
+
listTools(filter?: RuntimeMcpToolListFilter): Promise<readonly McpServerToolList[]>;
|
|
737
|
+
}
|
|
738
|
+
type RuntimeArtifactKind = 'image' | 'file' | 'video';
|
|
739
|
+
interface RuntimeCreateArtifactInput {
|
|
740
|
+
readonly kind: RuntimeArtifactKind;
|
|
741
|
+
readonly path: string;
|
|
742
|
+
readonly mediaType?: string;
|
|
743
|
+
readonly mimeType?: string;
|
|
744
|
+
readonly name?: string;
|
|
745
|
+
readonly source?: KodaXInputArtifactSource;
|
|
746
|
+
readonly description?: string;
|
|
747
|
+
}
|
|
748
|
+
interface RuntimeArtifact {
|
|
749
|
+
readonly id: string;
|
|
750
|
+
readonly kind: RuntimeArtifactKind;
|
|
751
|
+
readonly path: string;
|
|
752
|
+
readonly sizeBytes: number;
|
|
753
|
+
readonly mediaType?: string;
|
|
754
|
+
readonly mimeType?: string;
|
|
755
|
+
readonly name?: string;
|
|
756
|
+
readonly source?: KodaXInputArtifactSource;
|
|
757
|
+
readonly description?: string;
|
|
758
|
+
readonly createdAt: string;
|
|
759
|
+
}
|
|
760
|
+
interface RuntimeArtifactService {
|
|
761
|
+
create(input: RuntimeCreateArtifactInput): Promise<RuntimeArtifact>;
|
|
762
|
+
get(artifactId: string): Promise<RuntimeArtifact | undefined>;
|
|
763
|
+
delete(artifactId: string): Promise<boolean>;
|
|
764
|
+
}
|
|
765
|
+
interface RuntimeCreateSessionInput {
|
|
766
|
+
readonly sessionId?: string;
|
|
767
|
+
readonly title?: string;
|
|
768
|
+
readonly projectPath?: string;
|
|
769
|
+
readonly gitRoot?: string;
|
|
770
|
+
readonly surface?: string;
|
|
771
|
+
readonly profileId?: string;
|
|
772
|
+
readonly tag?: string;
|
|
773
|
+
}
|
|
774
|
+
interface RuntimeSession {
|
|
775
|
+
readonly id: string;
|
|
776
|
+
readonly title: string;
|
|
777
|
+
readonly gitRoot?: string;
|
|
778
|
+
readonly workspaceRoot?: string;
|
|
779
|
+
readonly surface?: string;
|
|
780
|
+
readonly profileId?: string;
|
|
781
|
+
readonly createdAt?: string;
|
|
782
|
+
}
|
|
783
|
+
interface RuntimeSessionSummary extends RuntimeSession {
|
|
784
|
+
/** Opaque continuation token accepted by RuntimeSessionFilter.cursor. */
|
|
785
|
+
readonly cursor?: string;
|
|
786
|
+
readonly msgCount: number;
|
|
787
|
+
readonly tag?: string;
|
|
788
|
+
readonly projectKey?: string;
|
|
789
|
+
readonly archived?: boolean;
|
|
790
|
+
}
|
|
791
|
+
type RuntimeTranscript = FullTranscriptSessionData;
|
|
792
|
+
interface RuntimeSessionFilter {
|
|
793
|
+
readonly projectRoot?: string;
|
|
794
|
+
readonly scope?: 'user' | 'managed-task-worker' | 'all';
|
|
795
|
+
readonly includeArchived?: boolean;
|
|
796
|
+
readonly limit?: number;
|
|
797
|
+
readonly before?: string;
|
|
798
|
+
readonly tag?: string;
|
|
799
|
+
readonly surface?: string;
|
|
800
|
+
readonly cursor?: string;
|
|
801
|
+
}
|
|
802
|
+
interface RuntimeForkSessionInput {
|
|
803
|
+
readonly sessionId: string;
|
|
804
|
+
readonly selector?: string;
|
|
805
|
+
readonly newSessionId?: string;
|
|
806
|
+
readonly title?: string;
|
|
807
|
+
}
|
|
808
|
+
interface RuntimeSessionSettings {
|
|
809
|
+
readonly provider?: string;
|
|
810
|
+
readonly model?: string;
|
|
811
|
+
readonly effort?: KodaXOptions['effort'];
|
|
812
|
+
readonly thinking?: boolean;
|
|
813
|
+
readonly reasoningMode?: KodaXReasoningMode;
|
|
814
|
+
readonly permissionMode?: string;
|
|
815
|
+
readonly executionCwd?: string;
|
|
816
|
+
}
|
|
817
|
+
interface RuntimeSessionSettingsPatch {
|
|
818
|
+
readonly provider?: string | null;
|
|
819
|
+
readonly model?: string | null;
|
|
820
|
+
readonly effort?: KodaXOptions['effort'] | null;
|
|
821
|
+
readonly thinking?: boolean | null;
|
|
822
|
+
readonly reasoningMode?: KodaXReasoningMode | null;
|
|
823
|
+
readonly permissionMode?: string | null;
|
|
824
|
+
readonly executionCwd?: string | null;
|
|
825
|
+
}
|
|
826
|
+
interface RuntimeAppendNoticeInput {
|
|
827
|
+
readonly sessionId: string;
|
|
828
|
+
readonly content: string;
|
|
829
|
+
readonly source?: string;
|
|
830
|
+
}
|
|
831
|
+
interface RuntimeRewindSessionInput {
|
|
832
|
+
readonly sessionId: string;
|
|
833
|
+
readonly selector?: string;
|
|
834
|
+
}
|
|
835
|
+
interface RuntimeSetActiveEntryInput {
|
|
836
|
+
readonly sessionId: string;
|
|
837
|
+
readonly entryId: string;
|
|
838
|
+
}
|
|
839
|
+
interface RuntimeCompactSessionInput {
|
|
840
|
+
readonly sessionId: string;
|
|
841
|
+
readonly provider?: string;
|
|
842
|
+
readonly model?: string;
|
|
843
|
+
readonly customInstructions?: string;
|
|
844
|
+
readonly contextWindow?: number;
|
|
845
|
+
}
|
|
846
|
+
interface RuntimeCompactSessionResult extends CompactSessionResult {
|
|
847
|
+
readonly session?: RuntimeSession;
|
|
848
|
+
}
|
|
849
|
+
interface RuntimeSessionService {
|
|
850
|
+
create(input?: RuntimeCreateSessionInput): Promise<RuntimeSession>;
|
|
851
|
+
load(sessionId: string): Promise<RuntimeSession>;
|
|
852
|
+
list(filter?: RuntimeSessionFilter): Promise<readonly RuntimeSessionSummary[]>;
|
|
853
|
+
transcript(sessionId: string): Promise<RuntimeTranscript | null>;
|
|
854
|
+
fork(input: RuntimeForkSessionInput): Promise<RuntimeSession | null>;
|
|
855
|
+
getSettings(sessionId: string): Promise<RuntimeSessionSettings>;
|
|
856
|
+
updateSettings(sessionId: string, patch: RuntimeSessionSettingsPatch): Promise<RuntimeSessionSettings>;
|
|
857
|
+
appendNotice(input: RuntimeAppendNoticeInput): Promise<SessionTranscriptEntry | null>;
|
|
858
|
+
rewind(input: RuntimeRewindSessionInput): Promise<RuntimeSession | null>;
|
|
859
|
+
setActiveEntry(input: RuntimeSetActiveEntryInput): Promise<RuntimeSession | null>;
|
|
860
|
+
compact(input: RuntimeCompactSessionInput): Promise<RuntimeCompactSessionResult>;
|
|
861
|
+
archive(sessionId: string): Promise<void>;
|
|
862
|
+
unarchive(sessionId: string): Promise<void>;
|
|
863
|
+
delete(sessionId: string): Promise<void>;
|
|
864
|
+
}
|
|
865
|
+
type RuntimeRunPhase = 'queued' | 'running' | 'waiting_permission' | 'waiting_user_input' | 'completed' | 'failed' | 'cancelled' | 'interrupted';
|
|
866
|
+
type RuntimeRunMode = 'coding' | 'managed_task';
|
|
867
|
+
interface RuntimeTextInput {
|
|
868
|
+
readonly type: 'text';
|
|
869
|
+
readonly text: string;
|
|
870
|
+
}
|
|
871
|
+
interface RuntimeImageInput {
|
|
872
|
+
readonly type: 'image';
|
|
873
|
+
readonly path: string;
|
|
874
|
+
readonly mediaType?: KodaXImageInputArtifact['mediaType'];
|
|
875
|
+
readonly source?: KodaXInputArtifactSource;
|
|
876
|
+
readonly description?: string;
|
|
877
|
+
}
|
|
878
|
+
interface RuntimeFileInput {
|
|
879
|
+
readonly type: 'file';
|
|
880
|
+
readonly path: string;
|
|
881
|
+
readonly mediaType?: string;
|
|
882
|
+
readonly mimeType?: string;
|
|
883
|
+
readonly name?: string;
|
|
884
|
+
readonly source?: KodaXInputArtifactSource;
|
|
885
|
+
readonly description?: string;
|
|
886
|
+
}
|
|
887
|
+
interface RuntimeVideoInput {
|
|
888
|
+
readonly type: 'video';
|
|
889
|
+
readonly path: string;
|
|
890
|
+
readonly mediaType: KodaXVideoInputArtifact['mediaType'];
|
|
891
|
+
readonly name?: string;
|
|
892
|
+
readonly source?: KodaXInputArtifactSource;
|
|
893
|
+
readonly description?: string;
|
|
894
|
+
}
|
|
895
|
+
interface RuntimeArtifactRefInput {
|
|
896
|
+
readonly type: 'artifact_ref';
|
|
897
|
+
readonly artifactId: string;
|
|
898
|
+
readonly description?: string;
|
|
899
|
+
}
|
|
900
|
+
type RuntimeInput = RuntimeTextInput | RuntimeImageInput | RuntimeFileInput | RuntimeVideoInput | RuntimeArtifactRefInput;
|
|
901
|
+
type RuntimePermissionBroker = 'runtime' | 'client';
|
|
902
|
+
interface RuntimeStartRunInput {
|
|
903
|
+
readonly sessionId: string;
|
|
904
|
+
readonly prompt?: string;
|
|
905
|
+
readonly input?: RuntimeInput | readonly RuntimeInput[];
|
|
906
|
+
readonly mode?: RuntimeRunMode;
|
|
907
|
+
readonly permissionBroker?: RuntimePermissionBroker;
|
|
908
|
+
readonly options?: RuntimeKodaXOptions;
|
|
909
|
+
/** Host-derived dispatch identity; never accepted from an LLM tool payload. */
|
|
910
|
+
readonly agentContext?: AgentDispatchContext;
|
|
911
|
+
}
|
|
912
|
+
type RuntimeKodaXOptions = Omit<KodaXOptions, 'provider' | 'session' | 'events'> & {
|
|
913
|
+
readonly provider?: string;
|
|
914
|
+
readonly session?: KodaXOptions['session'];
|
|
915
|
+
readonly events?: KodaXEvents;
|
|
916
|
+
};
|
|
917
|
+
interface RuntimeRunStatus {
|
|
918
|
+
readonly runId: string;
|
|
919
|
+
readonly sessionId: string;
|
|
920
|
+
readonly turnId?: string;
|
|
921
|
+
readonly phase: RuntimeRunPhase;
|
|
922
|
+
readonly startedAt: string;
|
|
923
|
+
readonly endedAt?: string;
|
|
924
|
+
readonly provider: string;
|
|
925
|
+
readonly model?: string;
|
|
926
|
+
readonly reasoning?: KodaXReasoningMode;
|
|
927
|
+
readonly error?: string;
|
|
928
|
+
}
|
|
929
|
+
interface RuntimeRunResult {
|
|
930
|
+
readonly runId: string;
|
|
931
|
+
readonly sessionId: string;
|
|
932
|
+
readonly phase: RuntimeRunPhase;
|
|
933
|
+
readonly result?: KodaXResult;
|
|
934
|
+
readonly error?: Error;
|
|
935
|
+
}
|
|
936
|
+
interface RuntimeRunHandle {
|
|
937
|
+
readonly runId: string;
|
|
938
|
+
readonly sessionId: string;
|
|
939
|
+
readonly turnId?: string;
|
|
940
|
+
readonly result: Promise<RuntimeRunResult>;
|
|
941
|
+
}
|
|
942
|
+
interface RuntimeRunFilter {
|
|
943
|
+
readonly sessionId?: string;
|
|
944
|
+
readonly phase?: RuntimeRunPhase | readonly RuntimeRunPhase[];
|
|
945
|
+
}
|
|
946
|
+
interface RuntimeRunService {
|
|
947
|
+
start(input: RuntimeStartRunInput): Promise<RuntimeRunHandle>;
|
|
948
|
+
await(runId: string): Promise<RuntimeRunResult>;
|
|
949
|
+
get(runId: string): Promise<RuntimeRunStatus>;
|
|
950
|
+
list(filter?: RuntimeRunFilter): Promise<readonly RuntimeRunStatus[]>;
|
|
951
|
+
abort(runId: string): Promise<void>;
|
|
952
|
+
setModel(runId: string, model: string | undefined): Promise<void>;
|
|
953
|
+
setProvider(runId: string, provider: string): Promise<void>;
|
|
954
|
+
setReasoning(runId: string, reasoning: KodaXReasoningMode | undefined): Promise<void>;
|
|
955
|
+
}
|
|
956
|
+
type RuntimeEventType = 'session.created' | 'session.loaded' | 'session.settings.updated' | 'session.notice.appended' | 'session.rewound' | 'session.active_entry.updated' | 'session.compacted' | 'run.queued' | 'run.started' | 'run.progress' | 'turn.started' | 'turn.completed' | 'turn.failed' | 'assistant.delta' | 'thinking.delta' | 'thinking.finished' | 'tool.started' | 'tool.progress' | 'tool.finished' | 'user_input.requested' | 'user_input.resolved' | 'permission.requested' | 'permission.resolved' | 'workflow.started' | 'workflow.updated' | 'workflow.finished' | 'context.compaction.started' | 'context.compaction.stats' | 'context.compaction.finished' | 'context.compaction.messages' | 'context.compaction.ended' | 'context.compaction.skipped' | 'context.budget.snapshot' | 'tool.exposure.planned' | 'child_activity.finished' | 'provider.retry' | 'provider.recovery' | 'repo_intelligence.trace' | 'todo.updated' | 'todo.warning' | 'sidecar.message' | 'run.completed' | 'run.failed' | 'run.cancelled' | 'run.interrupted' | 'artifact.created' | 'config.effective' | 'runtime.warning';
|
|
957
|
+
interface RuntimeEventEnvelope<TPayload = unknown> {
|
|
958
|
+
readonly id: string;
|
|
959
|
+
readonly seq: number;
|
|
960
|
+
readonly time: string;
|
|
961
|
+
readonly sessionId: string;
|
|
962
|
+
readonly runId: string;
|
|
963
|
+
readonly turnId?: string;
|
|
964
|
+
readonly type: RuntimeEventType;
|
|
965
|
+
readonly payload: TPayload;
|
|
966
|
+
}
|
|
967
|
+
type RuntimeEvent = RuntimeEventEnvelope;
|
|
968
|
+
interface RuntimeEventFilter {
|
|
969
|
+
readonly sessionId?: string;
|
|
970
|
+
readonly runId?: string;
|
|
971
|
+
readonly type?: RuntimeEventType | readonly RuntimeEventType[];
|
|
972
|
+
}
|
|
973
|
+
interface RuntimeEventReplayFilter extends RuntimeEventFilter {
|
|
974
|
+
readonly sinceSeq?: number;
|
|
975
|
+
readonly limit?: number;
|
|
976
|
+
}
|
|
977
|
+
type RuntimeEventListener = (event: RuntimeEvent) => void;
|
|
978
|
+
interface RuntimeSubscription {
|
|
979
|
+
close(): void;
|
|
980
|
+
}
|
|
981
|
+
interface RuntimeEventService {
|
|
982
|
+
subscribe(filter: RuntimeEventFilter, listener: RuntimeEventListener): RuntimeSubscription;
|
|
983
|
+
replay(filter?: RuntimeEventReplayFilter): Promise<readonly RuntimeEvent[]>;
|
|
984
|
+
}
|
|
985
|
+
type RuntimePermissionRisk = 'low' | 'medium' | 'high';
|
|
986
|
+
interface RuntimePermissionScope {
|
|
987
|
+
readonly toolName?: string;
|
|
988
|
+
readonly sessionId?: string;
|
|
989
|
+
}
|
|
990
|
+
interface RuntimePermissionRequest {
|
|
991
|
+
readonly id: string;
|
|
992
|
+
readonly sessionId: string;
|
|
993
|
+
readonly runId: string;
|
|
994
|
+
readonly turnId?: string;
|
|
995
|
+
readonly toolCallId?: string;
|
|
996
|
+
readonly toolName: string;
|
|
997
|
+
readonly reason?: string;
|
|
998
|
+
readonly risk?: RuntimePermissionRisk;
|
|
999
|
+
readonly inputPreview?: string;
|
|
1000
|
+
readonly createdAt: string;
|
|
1001
|
+
readonly expiresAt?: string;
|
|
1002
|
+
}
|
|
1003
|
+
interface RuntimePermissionRequestInput {
|
|
1004
|
+
readonly sessionId: string;
|
|
1005
|
+
readonly runId: string;
|
|
1006
|
+
readonly turnId?: string;
|
|
1007
|
+
readonly toolCallId?: string;
|
|
1008
|
+
readonly toolName: string;
|
|
1009
|
+
readonly reason?: string;
|
|
1010
|
+
readonly risk?: RuntimePermissionRisk;
|
|
1011
|
+
readonly inputPreview?: string;
|
|
1012
|
+
readonly expiresAt?: string;
|
|
1013
|
+
readonly timeoutMs?: number;
|
|
1014
|
+
}
|
|
1015
|
+
type RuntimePermissionDecision = {
|
|
1016
|
+
readonly type: 'allow_once';
|
|
1017
|
+
} | {
|
|
1018
|
+
readonly type: 'allow_always';
|
|
1019
|
+
readonly scope: RuntimePermissionScope;
|
|
1020
|
+
} | {
|
|
1021
|
+
readonly type: 'reject';
|
|
1022
|
+
readonly reason?: string;
|
|
1023
|
+
};
|
|
1024
|
+
interface RuntimePermissionFilter {
|
|
1025
|
+
readonly sessionId?: string;
|
|
1026
|
+
readonly runId?: string;
|
|
1027
|
+
readonly toolName?: string;
|
|
1028
|
+
}
|
|
1029
|
+
interface RuntimePermissionRespondOptions {
|
|
1030
|
+
readonly runId?: string;
|
|
1031
|
+
}
|
|
1032
|
+
interface RuntimePermissionService {
|
|
1033
|
+
request(input: RuntimePermissionRequestInput): Promise<RuntimePermissionDecision>;
|
|
1034
|
+
listPending(filter?: RuntimePermissionFilter): Promise<readonly RuntimePermissionRequest[]>;
|
|
1035
|
+
respond(requestId: string, decision: RuntimePermissionDecision, options?: RuntimePermissionRespondOptions): Promise<boolean>;
|
|
1036
|
+
}
|
|
1037
|
+
interface RuntimeWorkflowFilter {
|
|
1038
|
+
readonly runId?: string;
|
|
1039
|
+
readonly activeOnly?: boolean;
|
|
1040
|
+
readonly limit?: number;
|
|
1041
|
+
}
|
|
1042
|
+
type RuntimeWorkflowSummary = ManagedWorkflowSnapshot;
|
|
1043
|
+
type RuntimeWorkflowSnapshot = WorkflowProcessSnapshot;
|
|
1044
|
+
type RuntimeWorkflowListener = (event: WorkflowProcessEvent) => void;
|
|
1045
|
+
interface RuntimeWorkflowService {
|
|
1046
|
+
list(filter?: RuntimeWorkflowFilter): Promise<readonly RuntimeWorkflowSummary[]>;
|
|
1047
|
+
get(runId: string): Promise<RuntimeWorkflowSnapshot | undefined>;
|
|
1048
|
+
subscribe(filter: RuntimeWorkflowFilter, listener: RuntimeWorkflowListener): RuntimeSubscription;
|
|
1049
|
+
pause(runId: string): Promise<boolean>;
|
|
1050
|
+
resume(runId: string): Promise<boolean>;
|
|
1051
|
+
stop(runId: string): Promise<boolean>;
|
|
1052
|
+
}
|
|
1053
|
+
interface RuntimeStatusSnapshot {
|
|
1054
|
+
readonly runtimeId: string;
|
|
1055
|
+
readonly mode: KodaXRuntimeMode;
|
|
1056
|
+
readonly profile: string;
|
|
1057
|
+
readonly startedAt: string;
|
|
1058
|
+
readonly sessions: readonly RuntimeSessionSummary[];
|
|
1059
|
+
readonly runs: readonly RuntimeRunStatus[];
|
|
1060
|
+
readonly pendingPermissions: readonly RuntimePermissionRequest[];
|
|
1061
|
+
readonly workflows: readonly RuntimeWorkflowSummary[];
|
|
1062
|
+
}
|
|
1063
|
+
interface RuntimeStatusService {
|
|
1064
|
+
snapshot(): Promise<RuntimeStatusSnapshot>;
|
|
1065
|
+
}
|
|
1066
|
+
declare function createKodaXRuntime(options?: CreateKodaXRuntimeOptions): Promise<KodaXRuntime>;
|
|
1067
|
+
declare function connectKodaXRuntime(options?: ConnectKodaXRuntimeOptions): Promise<KodaXRuntime>;
|
|
1068
|
+
|
|
1069
|
+
export { KODAX_DAEMON_PROTOCOL, KODAX_DAEMON_PROTOCOL_VERSION, KodaXEvents, KodaXResult, RUNTIME_DAEMON_METHODS, RUNTIME_DAEMON_METHOD_SCHEMAS, RUNTIME_DAEMON_NOTIFICATION_SCHEMAS, RUNTIME_DAEMON_PROTOCOL_SCHEMA, RUNTIME_DAEMON_PROTOCOL_SCHEMA_JSON, RuntimeContextBudgetSnapshot, RuntimeToolExposurePlan, SessionTranscriptEntry, connectKodaXRuntime, createKodaXRuntime, listRuntimeDaemonSchemaMethods };
|
|
1070
|
+
export type { ConnectKodaXRuntimeOptions, CreateKodaXRuntimeOptions, KodaXRuntime, KodaXRuntimeIsolation, KodaXRuntimeMode, RuntimeAdminService, RuntimeAgentService, RuntimeAgentTaskService, RuntimeAppendNoticeInput, RuntimeArtifact, RuntimeArtifactKind, RuntimeArtifactRefInput, RuntimeArtifactService, RuntimeCapabilityRequirements, RuntimeCatalogService, RuntimeClientCapabilities, RuntimeClientInfo, RuntimeCommandInfo, RuntimeCommandResolveInput, RuntimeCompactSessionInput, RuntimeCompactSessionResult, RuntimeConfigPatch, RuntimeConfigReloadResult, RuntimeConfigService, RuntimeCreateArtifactInput, RuntimeCreateSessionInput, RuntimeDaemonClientTransport, RuntimeDaemonEndpoint, RuntimeDaemonError, RuntimeDaemonErrorCode, RuntimeDaemonFrame, RuntimeDaemonJsonSchema, RuntimeDaemonMethod, RuntimeDaemonMethodSchema, RuntimeDaemonNotification, RuntimeDaemonNotificationMethod, RuntimeDaemonProtocolSchema, RuntimeDaemonRequest, RuntimeDiagnosticFilter, RuntimeDiagnosticsService, RuntimeEvent, RuntimeEventEnvelope, RuntimeEventFilter, RuntimeEventListener, RuntimeEventReplayFilter, RuntimeEventService, RuntimeEventType, RuntimeExtensionListResult, RuntimeExtensionReloadResult, RuntimeExternalAgentsOptions, RuntimeFileInput, RuntimeForkSessionInput, RuntimeIdentity, RuntimeImageInput, RuntimeInput, RuntimeKodaXOptions, RuntimeMcpReloadResult, RuntimeMcpService, RuntimeMcpToolListFilter, RuntimeMcpValidateResult, RuntimeModelListFilter, RuntimePermissionBroker, RuntimePermissionDecision, RuntimePermissionFilter, RuntimePermissionRequest, RuntimePermissionRequestInput, RuntimePermissionRespondOptions, RuntimePermissionRisk, RuntimePermissionScope, RuntimePermissionService, RuntimeRewindSessionInput, RuntimeRunFilter, RuntimeRunHandle, RuntimeRunMode, RuntimeRunPhase, RuntimeRunResult, RuntimeRunService, RuntimeRunStatus, RuntimeSession, RuntimeSessionFilter, RuntimeSessionService, RuntimeSessionSettings, RuntimeSessionSettingsPatch, RuntimeSessionSummary, RuntimeSetActiveEntryInput, RuntimeSkillDescribeInput, RuntimeSkillDescription, RuntimeSkillFileSummary, RuntimeSkillListFilter, RuntimeSkillSummary, RuntimeStartRunInput, RuntimeStatusService, RuntimeStatusSnapshot, RuntimeSubscription, RuntimeTextInput, RuntimeTranscript, RuntimeVideoInput, RuntimeWorkerOptions, RuntimeWorkerResourceLimits, RuntimeWorkflowFilter, RuntimeWorkflowListener, RuntimeWorkflowService, RuntimeWorkflowSnapshot, RuntimeWorkflowSummary };
|