@kodax-ai/kodax 0.7.76 → 0.7.78
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 +758 -371
- package/LICENSE +158 -158
- package/README.md +1702 -1508
- package/README_CN.md +1019 -869
- package/config-templates/config.example.jsonc +86 -4
- package/config-templates/integrations/a2a.example.jsonc +98 -98
- package/config-templates/integrations/extensions.example.jsonc +7 -7
- package/config-templates/integrations/mcp.example.jsonc +16 -16
- package/dist/builtin/code-review/SKILL.md +22 -22
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.d.ts +46 -46
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +46 -46
- package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +62 -62
- package/dist/builtin/skill-creator/scripts/generate-review.d.ts +33 -33
- package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +73 -73
- package/dist/builtin/skill-creator/scripts/improve-description.d.ts +23 -23
- package/dist/builtin/skill-creator/scripts/init-skill.d.ts +14 -14
- package/dist/builtin/skill-creator/scripts/install-skill.d.ts +29 -29
- package/dist/builtin/skill-creator/scripts/package-skill.d.ts +38 -38
- package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +8 -8
- package/dist/builtin/skill-creator/scripts/run-eval.d.ts +66 -66
- package/dist/builtin/skill-creator/scripts/run-loop.d.ts +49 -49
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.d.ts +58 -58
- package/dist/chunks/agent-ASP4MS3X.js +2 -0
- package/dist/chunks/argument-completer-JYQ7FX3W.js +2 -0
- package/dist/chunks/chunk-2CFHBKRE.js +5 -0
- package/dist/chunks/chunk-35PPHOQ2.js +292 -0
- package/dist/chunks/chunk-43QNNDHR.js +29 -0
- package/dist/chunks/chunk-5BNQXXGY.js +1 -0
- package/dist/chunks/chunk-5GO6FH7L.js +458 -0
- package/dist/chunks/chunk-5NDCSFOP.js +78 -0
- package/dist/chunks/chunk-6FOJVETH.js +22 -0
- package/dist/chunks/chunk-6XM4B6K2.js +48 -0
- package/dist/chunks/chunk-6YZUE6NC.js +240 -0
- package/dist/chunks/{chunk-RDXRM3UI.js → chunk-7OEBJGHK.js} +1 -1
- package/dist/chunks/chunk-KQLQYHWU.js +386 -0
- package/dist/chunks/chunk-NXO6GWSY.js +46 -0
- package/dist/chunks/chunk-T2XZTLYE.js +316 -0
- package/dist/chunks/chunk-TQDBTTIM.js +348 -0
- package/dist/chunks/{chunk-SMT2JSM3.js → chunk-UID7BLAB.js} +9 -9
- package/dist/chunks/chunk-VAT2QYXM.js +765 -0
- package/dist/chunks/chunk-YAZQTC2L.js +5 -0
- package/dist/chunks/chunk-YVRYHC4C.js +655 -0
- package/dist/chunks/{chunk-PXKSE54E.js → chunk-Z3KFRTSB.js} +1 -1
- package/dist/chunks/compaction-config-BQSSIWK5.js +2 -0
- package/dist/chunks/{construction-bootstrap-5F5KF2BZ.js → construction-bootstrap-VQLQGWPY.js} +1 -1
- package/dist/chunks/dist-BFT5YIGU.js +2 -0
- package/dist/chunks/dist-PCFE24YP.js +2 -0
- package/dist/chunks/host-UTFXCYYM.js +2 -0
- package/dist/chunks/run-manager-PJU3WIFJ.js +2 -0
- package/dist/chunks/utils-SID4HW2Q.js +2 -0
- package/dist/index.d.ts +21 -19
- package/dist/index.js +6 -6
- package/dist/kodax_bootstrap.js +25 -25
- package/dist/kodax_cli.js +1787 -1341
- package/dist/kodax_resume.js +17 -17
- package/dist/provider-capabilities.json +392 -362
- package/dist/runtime-worker.js +1707 -1279
- package/dist/sandbox-workspace-session.js +563 -0
- package/dist/sdk-a2a.d.ts +18 -17
- package/dist/sdk-a2a.js +8 -8
- package/dist/sdk-agent.d.ts +320 -70
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +135 -168
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +14 -597
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +219 -6
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +70 -27
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +212 -149
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.d.ts +93 -0
- package/dist/sdk-sandbox.js +2 -0
- package/dist/sdk-session.d.ts +8 -8
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.d.ts +2 -2
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +15 -15
- package/dist/types-chunks/{base.d-ChvpaKjZ.d.ts → base.d-4e74xDdy.d.ts} +13 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-r1beOESM.d.ts → bash-prefix-extractor.d-uAe2Oqda.d.ts} +319 -9
- package/dist/types-chunks/{capability-learning.d-DPrYxRjF.d.ts → capability-learning.d-CVsdHw4j.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-zeqV4IQX.d.ts → capsule.d-BlSv9l3V.d.ts} +2 -2
- package/dist/types-chunks/{guardrail.d-CWYD1bdL.d.ts → guardrail.d-BRE_ErEj.d.ts} +1 -1
- package/dist/types-chunks/{guardrail.d-qjuKJZ31.d.ts → guardrail.d-CXDYRgZ3.d.ts} +201 -35
- package/dist/types-chunks/{history-retrieval.d-BKTJIrVd.d.ts → history-retrieval.d-DtCy7x64.d.ts} +2 -2
- package/dist/types-chunks/{integration-config.d-ojG4swOP.d.ts → integration-config.d-BNowXE8k.d.ts} +23 -8
- package/dist/types-chunks/{public-api.d-CX4B11qY.d.ts → public-api.d-B3AohsxN.d.ts} +37 -8
- package/dist/types-chunks/{commands.d-DUxnK2TU.d.ts → repl.d-Ie_ZXb_U.d.ts} +89 -78
- package/dist/types-chunks/{side-query.d-DWTMsndP.d.ts → resolver.d-iAQ9ocLB.d.ts} +23 -74
- package/dist/types-chunks/{run-manager.d-B9fEIjZk.d.ts → run-manager.d-D1twIhF9.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-B0fhAOPa.d.ts → sdk-session-DB9KksIx.d.ts} +3 -3
- package/dist/types-chunks/side-query.d-DTuLPcC5.d.ts +77 -0
- package/dist/types-chunks/types-D3g6XUQr.d.ts +662 -0
- package/dist/types-chunks/{types.d-sRLugmjy.d.ts → types.d-BA-Jwpfs.d.ts} +506 -11
- package/dist/types-chunks/{types.d-DEctY20M.d.ts → types.d-BH0ZkTGf.d.ts} +2 -2
- package/dist/types-chunks/{types.d-DCQVBqVn.d.ts → types.d-BbtGlKZu.d.ts} +25 -3
- package/dist/types-chunks/{types.d-CSmF0t0n.d.ts → types.d-DIpZJKUl.d.ts} +15 -0
- package/dist/types-chunks/{types.d-Bm_y6YuM.d.ts → types.d-DVDTIfB_.d.ts} +4 -4
- package/dist/types-chunks/{utils.d-D0wPxz8y.d.ts → utils.d-CVp6bFl9.d.ts} +23 -7
- package/docs/SDK_EMBEDDER_GUIDE.md +592 -119
- package/package.json +9 -1
- package/scripts/kodax-bin.cjs +28 -28
- package/scripts/production-env.cjs +25 -25
- package/dist/chunks/agent-7X5CFET2.js +0 -2
- package/dist/chunks/argument-completer-3NHIKB4N.js +0 -2
- package/dist/chunks/chunk-4PWPNCNK.js +0 -158
- package/dist/chunks/chunk-7FJNLJLF.js +0 -369
- package/dist/chunks/chunk-COQYLD4U.js +0 -5
- package/dist/chunks/chunk-D3T24FJW.js +0 -78
- package/dist/chunks/chunk-EI4JBQKL.js +0 -46
- package/dist/chunks/chunk-HGT6WQ24.js +0 -321
- package/dist/chunks/chunk-HS3XHF3R.js +0 -622
- package/dist/chunks/chunk-IDCGNQ4H.js +0 -5
- package/dist/chunks/chunk-KAY2XLCP.js +0 -74
- package/dist/chunks/chunk-OD6LVXU6.js +0 -329
- package/dist/chunks/chunk-OSF3H4RR.js +0 -22
- package/dist/chunks/chunk-TGMBHGZO.js +0 -427
- package/dist/chunks/chunk-VWSLC2WO.js +0 -770
- package/dist/chunks/chunk-Y3AMP22L.js +0 -37
- package/dist/chunks/compaction-config-7J2XE35D.js +0 -2
- package/dist/chunks/dist-2RA7LSH3.js +0 -2
- package/dist/chunks/dist-URKXBOC6.js +0 -2
- package/dist/chunks/host-RKZ2OGFT.js +0 -2
- package/dist/chunks/run-manager-7RM4HEH6.js +0 -2
- package/dist/chunks/utils-X3TEH6IO.js +0 -2
- package/dist/types-chunks/center-types.d-BBT122uJ.d.ts +0 -91
package/dist/sdk-runtime.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { F as KodaXReasoningMode, d as KodaXCustomProviderConfig } from './types-chunks/types.d-
|
|
2
|
-
export { k as KodaXMessage } from './types-chunks/types.d-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as SkillMetadata } from './types-chunks/types.d-DCQVBqVn.js';
|
|
1
|
+
import { F as KodaXReasoningMode, d as KodaXCustomProviderConfig } from './types-chunks/types.d-DIpZJKUl.js';
|
|
2
|
+
export { k as KodaXMessage } from './types-chunks/types.d-DIpZJKUl.js';
|
|
3
|
+
import { F as AgentDispatchContext, cK as LearningQuery, cJ as LearningPage, cm as LearnedCapabilityRecord, cP as LearningSurfaceSnapshot, cF as LearningEvent, cO as LearningSubscribeOptions, T as AgentExecutorFactory, G as AgentDispatchPolicy, C as AgentCredentialBroker, p as AgentArtifactPolicy, bB as KodaXImageInputArtifact, bE as KodaXInputArtifactSource, cb as KodaXVideoInputArtifact, e_ as WorkflowProcessSnapshot, eU as WorkflowProcessEvent, P as AgentExecutionKind, ao as AgentRegistrationService, b7 as DispatchableAgentQuery, b5 as DispatchableAgentListing, ag as AgentPreflightInput, ah as AgentPreflightResult, aD as AgentTreeSnapshot, E as AgentDetail, aq as AgentSpawnInput, aG as AgentTurnRef, D as AgentDataClassification, a2 as AgentFollowupResult, af as AgentOutput, M as AgentEvent } from './types-chunks/types.d-BA-Jwpfs.js';
|
|
4
|
+
import { i as SkillMetadata } from './types-chunks/types.d-BbtGlKZu.js';
|
|
6
5
|
import { a as McpServerConfig } from './types-chunks/config.d-CJy1WENT.js';
|
|
7
6
|
import { t as McpServerStatus, u as McpServerToolList } from './types-chunks/manager.d-B67TmPO1.js';
|
|
8
|
-
import { K as KodaXSessionHistoryHit } from './types-chunks/history-retrieval.d-
|
|
9
|
-
import { c as ManagedWorkflowSnapshot } from './types-chunks/run-manager.d-
|
|
10
|
-
import { L as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
7
|
+
import { K as KodaXSessionHistoryHit } from './types-chunks/history-retrieval.d-DtCy7x64.js';
|
|
8
|
+
import { c as ManagedWorkflowSnapshot } from './types-chunks/run-manager.d-D1twIhF9.js';
|
|
9
|
+
import { a1 as KodaXOptions, ak as KodaXShellExecutionContract, aQ as KodaXToolSandboxObservationUpdate, aO as KodaXToolEventMeta, W as KodaXManagedTaskStatusEvent, Q as KodaXEvents, ad as KodaXResult, bk as RuntimeContextBudgetSnapshot, br as RuntimeToolExposurePlan, a5 as KodaXPromptCacheDiagnosticEvent, N as KodaXContextOptions, K as KodaXActivityEventMeta, aW as KodaXTurnStartedEvent, aT as KodaXTurnCompletedEvent, aV as KodaXTurnFailedEvent, L as KodaXContextCompactionFinishedEvent, M as KodaXContextIdentity } from './types-chunks/bash-prefix-extractor.d-uAe2Oqda.js';
|
|
10
|
+
import { L as LoadedExtensionDiagnostic, u as ExtensionRuntimeDiagnostics } from './types-chunks/types.d-DVDTIfB_.js';
|
|
11
|
+
import { h as AutoModeDecisionDiagnostics, s as AutoModeStats } from './types-chunks/guardrail.d-CXDYRgZ3.js';
|
|
12
|
+
import { M as saveConfig, c as CommandInfo } from './types-chunks/utils.d-CVp6bFl9.js';
|
|
13
|
+
import { k as FullTranscriptSessionData, Z as SessionTranscriptEntry, c as CompactSessionResult } from './types-chunks/public-api.d-B3AohsxN.js';
|
|
14
|
+
import './types-chunks/capability.d-K664nHOS.js';
|
|
15
15
|
import 'vscode-languageserver-protocol';
|
|
16
16
|
import './types-chunks/cost-tracker.d-BeaenODW.js';
|
|
17
|
-
import './types-chunks/
|
|
18
|
-
import './types-chunks/base.d-
|
|
19
|
-
import './types-chunks/guardrail.d-
|
|
17
|
+
import './types-chunks/types-D3g6XUQr.js';
|
|
18
|
+
import './types-chunks/base.d-4e74xDdy.js';
|
|
19
|
+
import './types-chunks/guardrail.d-BRE_ErEj.js';
|
|
20
|
+
import './types-chunks/side-query.d-DTuLPcC5.js';
|
|
20
21
|
import 'readline';
|
|
21
22
|
import 'child_process';
|
|
22
23
|
|
|
@@ -28,7 +29,9 @@ interface RuntimePermissionMatcherBase {
|
|
|
28
29
|
}
|
|
29
30
|
interface RuntimeExactCommandPermissionMatcher extends RuntimePermissionMatcherBase {
|
|
30
31
|
readonly kind: 'exact-command';
|
|
31
|
-
readonly shell: 'cmd' | 'posix';
|
|
32
|
+
readonly shell: 'cmd' | 'posix' | 'powershell';
|
|
33
|
+
/** Hash of the host-owned interpreter/environment contract, when configured. */
|
|
34
|
+
readonly shellContractFingerprint?: string;
|
|
32
35
|
/** SHA-256 of the normalized concrete command; raw command text is never persisted. */
|
|
33
36
|
readonly commandFingerprint: string;
|
|
34
37
|
readonly cwd: string;
|
|
@@ -160,23 +163,23 @@ interface RuntimeAgentBindingService {
|
|
|
160
163
|
|
|
161
164
|
interface RuntimeLearningService {
|
|
162
165
|
list(query?: LearningQuery): Promise<LearningPage>;
|
|
163
|
-
get(
|
|
166
|
+
get(nameOrSlugOrId: string): Promise<LearnedCapabilityRecord>;
|
|
164
167
|
getSnapshot(): Promise<LearningSurfaceSnapshot>;
|
|
165
168
|
events(afterRevision?: number): Promise<readonly LearningEvent[]>;
|
|
166
169
|
subscribe(options?: LearningSubscribeOptions): AsyncIterable<LearningEvent>;
|
|
167
|
-
acknowledge(
|
|
168
|
-
snooze(
|
|
169
|
-
reject(
|
|
170
|
-
disable(
|
|
171
|
-
rollback(
|
|
172
|
-
promote(
|
|
173
|
-
review(
|
|
174
|
-
trust(
|
|
170
|
+
acknowledge(nameOrSlugOrId: string): Promise<void>;
|
|
171
|
+
snooze(nameOrSlugOrId: string, until: string): Promise<void>;
|
|
172
|
+
reject(nameOrSlugOrId: string): Promise<void>;
|
|
173
|
+
disable(nameOrSlugOrId: string): Promise<void>;
|
|
174
|
+
rollback(nameOrSlugOrId: string): Promise<void>;
|
|
175
|
+
promote(nameOrSlugOrId: string, scope: 'user'): Promise<void>;
|
|
176
|
+
review(nameOrSlugOrId: string): Promise<void>;
|
|
177
|
+
trust(nameOrSlugOrId: string): Promise<void>;
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
declare const KODAX_DAEMON_PROTOCOL = "kodax-runtime-daemon";
|
|
178
181
|
declare const KODAX_DAEMON_PROTOCOL_VERSION = 1;
|
|
179
|
-
type RuntimeDaemonMethod = 'initialize' | 'runtime.initialize' | 'ping' | 'runtime.identity' | 'runtime.status' | 'runtime.shutdown' | 'runtime.capabilities' | 'daemon.status' | 'daemon.stop' | 'daemon.logs' | 'daemon.preflight' | 'daemon.management.get' | 'daemon.rollbackToInline' | 'operation.get' | 'session.create' | 'session.load' | 'session.list' | 'session.transcript' | 'session.transcript.page' | 'session.transcript.entryChunk' | 'session.transcript.search' | 'session.observe' | '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.getVersioned' | 'session.autoMode.getStats' | 'session.settings.update' | 'session.settings.updateVersioned' | 'run.start' | 'run.input.submit' | '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' | 'permission.grants.list' | 'permission.grants.revoke' | 'user_input.listPending' | 'user_input.respond' | 'user_input.dismiss' | 'credential.register' | 'credential.get' | 'credential.revoke' | 'credential.supply' | 'host_tool.register' | 'host_tool.get' | 'host_tool.invocation.get' | 'host_tool.revoke' | 'host_tool.complete' | 'workflow.list' | 'workflow.get' | 'workflow.subscribe' | 'workflow.unsubscribe' | 'workflow.pause' | 'workflow.resume' | 'workflow.stop' | 'learning.list' | 'learning.get' | 'learning.snapshot' | 'learning.events' | 'learning.acknowledge' | 'learning.snooze' | 'learning.reject' | 'learning.disable' | 'learning.rollback' | 'learning.promote' | 'learning.review' | 'learning.trust' | '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.setEnabled' | 'agentRegistrations.remove' | 'agents.listDispatchable' | 'agents.describe' | 'agents.preflight' | 'agents.tree' | 'agents.detail' | 'agents.spawn' | 'agents.send' | 'agents.followup' | 'agents.interrupt' | 'agents.output' | 'agents.events' | 'agents.wait' | 'context.budget.get' | 'tool.exposure.preview';
|
|
182
|
+
type RuntimeDaemonMethod = 'initialize' | 'runtime.initialize' | 'ping' | 'runtime.identity' | 'runtime.status' | 'runtime.shutdown' | 'runtime.capabilities' | 'daemon.status' | 'daemon.stop' | 'daemon.logs' | 'daemon.preflight' | 'daemon.management.get' | 'daemon.rollbackToInline' | 'operation.get' | 'session.create' | 'session.load' | 'session.list' | 'session.transcript' | 'session.transcript.page' | 'session.transcript.entryChunk' | 'session.transcript.search' | 'session.observe' | '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.getVersioned' | 'session.autoMode.getStats' | 'session.settings.update' | 'session.settings.updateVersioned' | 'run.start' | 'run.input.submit' | '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' | 'permission.grants.list' | 'permission.grants.revoke' | 'user_input.listPending' | 'user_input.respond' | 'user_input.dismiss' | 'credential.register' | 'credential.get' | 'credential.revoke' | 'credential.supply' | 'host_tool.register' | 'host_tool.get' | 'host_tool.invocation.get' | 'host_tool.revoke' | 'host_tool.complete' | 'workflow.list' | 'workflow.get' | 'workflow.subscribe' | 'workflow.unsubscribe' | 'workflow.pause' | 'workflow.resume' | 'workflow.stop' | 'learning.list' | 'learning.get' | 'learning.snapshot' | 'learning.events' | 'learning.acknowledge' | 'learning.snooze' | 'learning.reject' | 'learning.disable' | 'learning.rollback' | 'learning.promote' | 'learning.review' | 'learning.trust' | '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.setEnabled' | 'agentRegistrations.remove' | 'agents.listDispatchable' | 'agents.describe' | 'agents.preflight' | 'agents.tree' | 'agents.detail' | 'agents.spawn' | 'agents.send' | 'agents.followup' | 'agents.interrupt' | 'agents.output' | 'agents.events' | 'agents.wait' | 'context.budget.get' | 'tool.exposure.preview' | 'provider.cache.diagnostics.get';
|
|
180
183
|
type RuntimeDaemonRetiredMethod = 'agentTasks.list' | 'agentTasks.start' | 'agentTasks.get' | 'agentTasks.events' | 'agentTasks.wait' | 'agentTasks.sendInput' | 'agentTasks.cancel' | 'agentTasks.reconcile';
|
|
181
184
|
type RuntimeDaemonWireMethod = RuntimeDaemonMethod | RuntimeDaemonRetiredMethod;
|
|
182
185
|
type RuntimeDaemonNotificationMethod = 'event' | 'credential.request' | 'host_tool.invoke' | 'runtime.warning';
|
|
@@ -830,6 +833,12 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
830
833
|
oneOf: RuntimeDaemonJsonSchema[];
|
|
831
834
|
};
|
|
832
835
|
};
|
|
836
|
+
'provider.cache.diagnostics.get': {
|
|
837
|
+
params: RuntimeDaemonJsonSchema;
|
|
838
|
+
result: {
|
|
839
|
+
oneOf: RuntimeDaemonJsonSchema[];
|
|
840
|
+
};
|
|
841
|
+
};
|
|
833
842
|
};
|
|
834
843
|
declare const RUNTIME_DAEMON_NOTIFICATION_SCHEMAS: {
|
|
835
844
|
event: RuntimeDaemonJsonSchema;
|
|
@@ -852,10 +861,10 @@ declare function listRuntimeDaemonSchemaMethods(): readonly RuntimeDaemonMethod[
|
|
|
852
861
|
declare class RuntimeDaemonCapabilityUpgradeError extends Error {
|
|
853
862
|
readonly preflight?: RuntimeDaemonPreflight | undefined;
|
|
854
863
|
readonly code: "daemon_capability_upgrade_required";
|
|
855
|
-
readonly capability: "runtimeAutoModeGuardrail";
|
|
856
864
|
readonly recoverable: true;
|
|
857
865
|
readonly restartRequired: true;
|
|
858
|
-
|
|
866
|
+
readonly capability: string;
|
|
867
|
+
constructor(message: string, preflight?: RuntimeDaemonPreflight | undefined, options?: ErrorOptions, capability?: string);
|
|
859
868
|
}
|
|
860
869
|
/** A recoverable Auto LLM configuration error that must never become approval work. */
|
|
861
870
|
declare class RuntimeAutoModeConfigurationError extends Error {
|
|
@@ -864,8 +873,8 @@ declare class RuntimeAutoModeConfigurationError extends Error {
|
|
|
864
873
|
constructor(message: string);
|
|
865
874
|
}
|
|
866
875
|
|
|
867
|
-
type KodaXRuntimeMode =
|
|
868
|
-
type KodaXRuntimeIsolation =
|
|
876
|
+
type KodaXRuntimeMode = "embedded" | "daemon";
|
|
877
|
+
type KodaXRuntimeIsolation = "inline" | "worker" | "process";
|
|
869
878
|
|
|
870
879
|
interface RuntimeInlineOwnerHandle {
|
|
871
880
|
readonly profile: string;
|
|
@@ -874,7 +883,7 @@ interface RuntimeInlineOwnerHandle {
|
|
|
874
883
|
close(): void;
|
|
875
884
|
}
|
|
876
885
|
interface RuntimeOwnerPolicyState {
|
|
877
|
-
readonly mode:
|
|
886
|
+
readonly mode: "daemon" | "inline";
|
|
878
887
|
readonly revision: number;
|
|
879
888
|
readonly updatedAt: string;
|
|
880
889
|
}
|
|
@@ -882,12 +891,12 @@ interface RuntimeOwnerIdentity {
|
|
|
882
891
|
readonly runtimeId: string;
|
|
883
892
|
readonly pid: number;
|
|
884
893
|
readonly createdAt: string;
|
|
885
|
-
readonly kind?:
|
|
894
|
+
readonly kind?: "daemon" | "inline";
|
|
886
895
|
}
|
|
887
896
|
interface RuntimeOwnerState {
|
|
888
897
|
readonly profile: string;
|
|
889
898
|
readonly policy: RuntimeOwnerPolicyState;
|
|
890
|
-
readonly ownerStatus:
|
|
899
|
+
readonly ownerStatus: "unowned" | "owned" | "unreadable";
|
|
891
900
|
readonly owner: RuntimeOwnerIdentity | null;
|
|
892
901
|
}
|
|
893
902
|
/**
|
|
@@ -913,12 +922,12 @@ declare function enableKodaXDaemonOwner(input?: {
|
|
|
913
922
|
readonly profile?: string;
|
|
914
923
|
}): RuntimeOwnerPolicyState;
|
|
915
924
|
declare function setKodaXRuntimeOwnerMode(input: {
|
|
916
|
-
readonly mode:
|
|
925
|
+
readonly mode: "daemon" | "inline";
|
|
917
926
|
readonly expectedRevision: number;
|
|
918
927
|
readonly homeDir?: string;
|
|
919
928
|
readonly profile?: string;
|
|
920
929
|
}): {
|
|
921
|
-
readonly mode:
|
|
930
|
+
readonly mode: "daemon" | "inline";
|
|
922
931
|
readonly revision: number;
|
|
923
932
|
readonly updatedAt: string;
|
|
924
933
|
};
|
|
@@ -953,7 +962,7 @@ interface RuntimeClientCapabilities {
|
|
|
953
962
|
readonly contextDiagnostics?: boolean;
|
|
954
963
|
readonly operationDeduplication?: boolean;
|
|
955
964
|
}
|
|
956
|
-
type RuntimeGrantedScope =
|
|
965
|
+
type RuntimeGrantedScope = "session:observe" | "session:write" | "run:control" | "interaction:respond" | "permission:respond" | "permission:grant-admin" | "integration:admin" | "workflow:control" | "learning:read" | "learning:control" | "artifact:write" | "agent:control" | "credential:register" | "host-tool:register" | "owner:admin" | "daemon:admin";
|
|
957
966
|
interface RuntimeExternalAgentsOptions {
|
|
958
967
|
readonly factories: readonly AgentExecutorFactory[];
|
|
959
968
|
readonly policy: AgentDispatchPolicy;
|
|
@@ -967,7 +976,7 @@ interface CreateKodaXRuntimeOptions {
|
|
|
967
976
|
/** Runtime ownership form. Defaults to a caller-owned embedded Runtime. */
|
|
968
977
|
readonly mode?: KodaXRuntimeMode;
|
|
969
978
|
/** Embedded-only execution location. Daemon mode selects host isolation internally. */
|
|
970
|
-
readonly isolation?:
|
|
979
|
+
readonly isolation?: "inline" | "worker";
|
|
971
980
|
/** Requires `isolation: 'worker'`; rejected instead of being silently ignored. */
|
|
972
981
|
readonly worker?: RuntimeWorkerOptions;
|
|
973
982
|
/** Base directory that owns `.kodax`, matching CLI `--home`; not the `.kodax` directory used by `KODAX_HOME`. */
|
|
@@ -983,6 +992,11 @@ interface CreateKodaXRuntimeOptions {
|
|
|
983
992
|
readonly daemonHostRuntimeId?: string;
|
|
984
993
|
readonly daemonStartupTimeoutMs?: number;
|
|
985
994
|
readonly daemonConnectTimeoutMs?: number;
|
|
995
|
+
/**
|
|
996
|
+
* Auto-started daemon only: after the last logical client disconnects,
|
|
997
|
+
* stop once governed work is idle. Omit to keep the normal persistent daemon.
|
|
998
|
+
*/
|
|
999
|
+
readonly daemonOrphanExitMs?: number;
|
|
986
1000
|
readonly daemonTransport?: RuntimeDaemonClientTransport;
|
|
987
1001
|
readonly daemonEndpoint?: string | RuntimeDaemonEndpoint;
|
|
988
1002
|
/** Defaults to true for daemon mode unless a transport or endpoint is supplied. */
|
|
@@ -1008,11 +1022,17 @@ interface ConnectKodaXRuntimeOptions {
|
|
|
1008
1022
|
readonly permissionTimeoutMs?: number;
|
|
1009
1023
|
readonly daemonStartupTimeoutMs?: number;
|
|
1010
1024
|
readonly daemonConnectTimeoutMs?: number;
|
|
1025
|
+
/** Auto-started daemon idle-exit policy; see CreateKodaXRuntimeOptions. */
|
|
1026
|
+
readonly daemonOrphanExitMs?: number;
|
|
1011
1027
|
readonly daemonToken?: string;
|
|
1012
1028
|
readonly clientInfo?: RuntimeClientInfo;
|
|
1013
1029
|
readonly capabilities?: RuntimeClientCapabilities;
|
|
1014
1030
|
readonly requirements?: RuntimeCapabilityRequirements;
|
|
1015
1031
|
}
|
|
1032
|
+
/** SDK facts that embedders can inspect before auto-starting a daemon. */
|
|
1033
|
+
declare const KODAX_RUNTIME_SDK_CAPABILITIES: Readonly<{
|
|
1034
|
+
readonly daemonOrphanExit: 1;
|
|
1035
|
+
}>;
|
|
1016
1036
|
interface RuntimeCapabilityRequirements {
|
|
1017
1037
|
/** Reject inline and shared daemon hosts; only a Worker-hosted Runtime satisfies this. */
|
|
1018
1038
|
readonly hardDispose?: boolean;
|
|
@@ -1026,6 +1046,7 @@ interface RuntimeCapabilityRequirements {
|
|
|
1026
1046
|
readonly sessionObservation?: 1;
|
|
1027
1047
|
readonly afterTurnInput?: 1;
|
|
1028
1048
|
readonly learningCenter?: 1;
|
|
1049
|
+
readonly skillLearningLoop?: 1;
|
|
1029
1050
|
readonly interruptInput?: 1;
|
|
1030
1051
|
readonly askUserTransport?: 1;
|
|
1031
1052
|
readonly permissionCas?: 1;
|
|
@@ -1048,11 +1069,15 @@ interface RuntimeCapabilityRequirements {
|
|
|
1048
1069
|
readonly sharedSessionSettings?: 1;
|
|
1049
1070
|
readonly durableRecoveryQueries?: 1;
|
|
1050
1071
|
readonly daemonManagement?: 1;
|
|
1072
|
+
/** Require an auto-started daemon whose current host has orphan idle-exit enabled. */
|
|
1073
|
+
readonly daemonOrphanExit?: 1;
|
|
1074
|
+
/** Optional integration failures are isolated, observable, and hot-recoverable. */
|
|
1075
|
+
readonly integrationConfigResilience?: 1;
|
|
1051
1076
|
readonly actorControlPlane?: 1;
|
|
1052
1077
|
/** Runtime owns Auto LLM/rules classification before shared permission brokering. */
|
|
1053
|
-
readonly runtimeAutoModeGuardrail?: 1 | 2 | 3;
|
|
1078
|
+
readonly runtimeAutoModeGuardrail?: 1 | 2 | 3 | 4;
|
|
1054
1079
|
}
|
|
1055
|
-
type RuntimeOperationState =
|
|
1080
|
+
type RuntimeOperationState = "accepted" | "dispatched" | "applied" | "rejected" | "interrupted" | "unknown";
|
|
1056
1081
|
interface RuntimeOperationReceipt {
|
|
1057
1082
|
readonly operationId: string;
|
|
1058
1083
|
readonly journalEpoch: string;
|
|
@@ -1078,13 +1103,17 @@ interface RuntimeOperationService {
|
|
|
1078
1103
|
interface RuntimeDiagnosticFilter {
|
|
1079
1104
|
readonly sessionId?: string;
|
|
1080
1105
|
readonly runId?: string;
|
|
1106
|
+
/** Defaults to root so child physical requests do not replace root diagnostics. */
|
|
1107
|
+
readonly contextKind?: "root" | "child";
|
|
1108
|
+
readonly agentId?: string;
|
|
1081
1109
|
}
|
|
1082
1110
|
interface RuntimeDiagnosticsService {
|
|
1083
1111
|
latestContextBudget(filter?: RuntimeDiagnosticFilter): Promise<RuntimeContextBudgetSnapshot | null>;
|
|
1084
1112
|
latestToolExposure(filter?: RuntimeDiagnosticFilter): Promise<RuntimeToolExposurePlan | null>;
|
|
1113
|
+
latestProviderCacheDiagnostic(filter?: RuntimeDiagnosticFilter): Promise<KodaXPromptCacheDiagnosticEvent | null>;
|
|
1085
1114
|
}
|
|
1086
1115
|
interface RuntimeConnectionState {
|
|
1087
|
-
readonly state:
|
|
1116
|
+
readonly state: "connected" | "disconnected";
|
|
1088
1117
|
readonly connectionId: string;
|
|
1089
1118
|
readonly runtimeEpoch: string;
|
|
1090
1119
|
readonly journalEpoch?: string;
|
|
@@ -1169,15 +1198,15 @@ interface RuntimeCommandInfo {
|
|
|
1169
1198
|
readonly name: string;
|
|
1170
1199
|
readonly aliases?: readonly string[];
|
|
1171
1200
|
readonly description: string;
|
|
1172
|
-
readonly source: CommandInfo[
|
|
1201
|
+
readonly source: CommandInfo["source"];
|
|
1173
1202
|
readonly usage?: string;
|
|
1174
1203
|
readonly argumentHint?: string;
|
|
1175
|
-
readonly location?: CommandInfo[
|
|
1204
|
+
readonly location?: CommandInfo["location"];
|
|
1176
1205
|
readonly path?: string;
|
|
1177
1206
|
readonly userInvocable?: boolean;
|
|
1178
1207
|
readonly disableModelInvocation?: boolean;
|
|
1179
1208
|
readonly allowedTools?: string;
|
|
1180
|
-
readonly context?:
|
|
1209
|
+
readonly context?: "fork";
|
|
1181
1210
|
readonly agent?: string;
|
|
1182
1211
|
readonly model?: string;
|
|
1183
1212
|
}
|
|
@@ -1200,7 +1229,7 @@ interface RuntimeSkillSummary {
|
|
|
1200
1229
|
readonly userInvocable: boolean;
|
|
1201
1230
|
readonly argumentHint?: string;
|
|
1202
1231
|
readonly path: string;
|
|
1203
|
-
readonly source: SkillMetadata[
|
|
1232
|
+
readonly source: SkillMetadata["source"];
|
|
1204
1233
|
readonly disableModelInvocation: boolean;
|
|
1205
1234
|
}
|
|
1206
1235
|
interface RuntimeSkillDescription extends RuntimeSkillSummary {
|
|
@@ -1259,7 +1288,7 @@ interface RuntimeMcpService {
|
|
|
1259
1288
|
reloadServers(): Promise<RuntimeMcpReloadResult>;
|
|
1260
1289
|
listTools(filter?: RuntimeMcpToolListFilter): Promise<readonly McpServerToolList[]>;
|
|
1261
1290
|
}
|
|
1262
|
-
type RuntimeArtifactKind =
|
|
1291
|
+
type RuntimeArtifactKind = "image" | "file" | "video";
|
|
1263
1292
|
interface RuntimeCreateArtifactInput {
|
|
1264
1293
|
readonly kind: RuntimeArtifactKind;
|
|
1265
1294
|
readonly path: string;
|
|
@@ -1351,7 +1380,7 @@ interface RuntimeTranscriptEntryChunk {
|
|
|
1351
1380
|
readonly revision: string;
|
|
1352
1381
|
readonly entryIndex: number;
|
|
1353
1382
|
readonly entryId?: string;
|
|
1354
|
-
readonly encoding:
|
|
1383
|
+
readonly encoding: "base64-json";
|
|
1355
1384
|
readonly data: string;
|
|
1356
1385
|
readonly hasMore: boolean;
|
|
1357
1386
|
readonly nextCursor?: string;
|
|
@@ -1360,8 +1389,8 @@ interface RuntimeTranscriptSearchInput {
|
|
|
1360
1389
|
readonly sessionId: string;
|
|
1361
1390
|
readonly query: string;
|
|
1362
1391
|
readonly limit?: number;
|
|
1363
|
-
readonly role?:
|
|
1364
|
-
readonly scope?:
|
|
1392
|
+
readonly role?: "user" | "assistant";
|
|
1393
|
+
readonly scope?: "compacted" | "all";
|
|
1365
1394
|
}
|
|
1366
1395
|
interface RuntimeTranscriptSearchHit extends KodaXSessionHistoryHit {
|
|
1367
1396
|
/** Index accepted by transcriptEntryChunk for this exact transcript revision. */
|
|
@@ -1373,7 +1402,7 @@ interface RuntimeTranscriptSearchResult {
|
|
|
1373
1402
|
}
|
|
1374
1403
|
interface RuntimeSessionFilter {
|
|
1375
1404
|
readonly projectRoot?: string;
|
|
1376
|
-
readonly scope?:
|
|
1405
|
+
readonly scope?: "user" | "managed-task-worker" | "all";
|
|
1377
1406
|
readonly includeArchived?: boolean;
|
|
1378
1407
|
readonly limit?: number;
|
|
1379
1408
|
readonly before?: string;
|
|
@@ -1390,13 +1419,14 @@ interface RuntimeForkSessionInput {
|
|
|
1390
1419
|
interface RuntimeSessionSettings {
|
|
1391
1420
|
readonly provider?: string;
|
|
1392
1421
|
readonly model?: string;
|
|
1393
|
-
readonly effort?: KodaXOptions[
|
|
1422
|
+
readonly effort?: KodaXOptions["effort"];
|
|
1394
1423
|
readonly thinking?: boolean;
|
|
1395
1424
|
readonly reasoningMode?: KodaXReasoningMode;
|
|
1396
1425
|
readonly permissionMode?: string;
|
|
1397
1426
|
readonly executionCwd?: string;
|
|
1398
|
-
readonly
|
|
1399
|
-
readonly
|
|
1427
|
+
readonly shellExecution?: KodaXShellExecutionContract;
|
|
1428
|
+
readonly agentMode?: KodaXOptions["agentMode"];
|
|
1429
|
+
readonly autoModeEngine?: "llm" | "rules";
|
|
1400
1430
|
readonly autoModeClassifierModel?: string;
|
|
1401
1431
|
readonly autoModeTimeoutMs?: number;
|
|
1402
1432
|
readonly autoModeSpeculativeWindowMs?: number;
|
|
@@ -1408,13 +1438,14 @@ interface RuntimeSessionSettings {
|
|
|
1408
1438
|
interface RuntimeSessionSettingsPatch {
|
|
1409
1439
|
readonly provider?: string | null;
|
|
1410
1440
|
readonly model?: string | null;
|
|
1411
|
-
readonly effort?: KodaXOptions[
|
|
1441
|
+
readonly effort?: KodaXOptions["effort"] | null;
|
|
1412
1442
|
readonly thinking?: boolean | null;
|
|
1413
1443
|
readonly reasoningMode?: KodaXReasoningMode | null;
|
|
1414
1444
|
readonly permissionMode?: string | null;
|
|
1415
1445
|
readonly executionCwd?: string | null;
|
|
1416
|
-
readonly
|
|
1417
|
-
readonly
|
|
1446
|
+
readonly shellExecution?: KodaXShellExecutionContract | null;
|
|
1447
|
+
readonly agentMode?: KodaXOptions["agentMode"] | null;
|
|
1448
|
+
readonly autoModeEngine?: "llm" | "rules" | null;
|
|
1418
1449
|
readonly autoModeClassifierModel?: string | null;
|
|
1419
1450
|
readonly autoModeTimeoutMs?: number | null;
|
|
1420
1451
|
readonly autoModeSpeculativeWindowMs?: number | null;
|
|
@@ -1461,6 +1492,7 @@ interface RuntimeActiveToolProjection {
|
|
|
1461
1492
|
readonly turnId?: string;
|
|
1462
1493
|
readonly started: unknown;
|
|
1463
1494
|
readonly progress?: unknown;
|
|
1495
|
+
readonly sandbox?: RuntimeToolSandboxEventPayload;
|
|
1464
1496
|
}
|
|
1465
1497
|
interface RuntimePendingUserInputProjection {
|
|
1466
1498
|
readonly requestId: string;
|
|
@@ -1520,21 +1552,21 @@ interface RuntimeSessionService {
|
|
|
1520
1552
|
unarchive(sessionId: string): Promise<void>;
|
|
1521
1553
|
delete(sessionId: string): Promise<void>;
|
|
1522
1554
|
}
|
|
1523
|
-
type RuntimeRunPhase =
|
|
1524
|
-
type RuntimeRunMode =
|
|
1555
|
+
type RuntimeRunPhase = "queued" | "running" | "waiting_permission" | "waiting_user_input" | "completed" | "failed" | "cancelled" | "interrupted";
|
|
1556
|
+
type RuntimeRunMode = "coding" | "managed_task";
|
|
1525
1557
|
interface RuntimeTextInput {
|
|
1526
|
-
readonly type:
|
|
1558
|
+
readonly type: "text";
|
|
1527
1559
|
readonly text: string;
|
|
1528
1560
|
}
|
|
1529
1561
|
interface RuntimeImageInput {
|
|
1530
|
-
readonly type:
|
|
1562
|
+
readonly type: "image";
|
|
1531
1563
|
readonly path: string;
|
|
1532
|
-
readonly mediaType?: KodaXImageInputArtifact[
|
|
1564
|
+
readonly mediaType?: KodaXImageInputArtifact["mediaType"];
|
|
1533
1565
|
readonly source?: KodaXInputArtifactSource;
|
|
1534
1566
|
readonly description?: string;
|
|
1535
1567
|
}
|
|
1536
1568
|
interface RuntimeFileInput {
|
|
1537
|
-
readonly type:
|
|
1569
|
+
readonly type: "file";
|
|
1538
1570
|
readonly path: string;
|
|
1539
1571
|
readonly mediaType?: string;
|
|
1540
1572
|
readonly mimeType?: string;
|
|
@@ -1543,20 +1575,20 @@ interface RuntimeFileInput {
|
|
|
1543
1575
|
readonly description?: string;
|
|
1544
1576
|
}
|
|
1545
1577
|
interface RuntimeVideoInput {
|
|
1546
|
-
readonly type:
|
|
1578
|
+
readonly type: "video";
|
|
1547
1579
|
readonly path: string;
|
|
1548
|
-
readonly mediaType: KodaXVideoInputArtifact[
|
|
1580
|
+
readonly mediaType: KodaXVideoInputArtifact["mediaType"];
|
|
1549
1581
|
readonly name?: string;
|
|
1550
1582
|
readonly source?: KodaXInputArtifactSource;
|
|
1551
1583
|
readonly description?: string;
|
|
1552
1584
|
}
|
|
1553
1585
|
interface RuntimeArtifactRefInput {
|
|
1554
|
-
readonly type:
|
|
1586
|
+
readonly type: "artifact_ref";
|
|
1555
1587
|
readonly artifactId: string;
|
|
1556
1588
|
readonly description?: string;
|
|
1557
1589
|
}
|
|
1558
1590
|
type RuntimeInput = RuntimeTextInput | RuntimeImageInput | RuntimeFileInput | RuntimeVideoInput | RuntimeArtifactRefInput;
|
|
1559
|
-
type RuntimePermissionBroker =
|
|
1591
|
+
type RuntimePermissionBroker = "runtime" | "client";
|
|
1560
1592
|
interface RuntimeStartRunInput {
|
|
1561
1593
|
readonly sessionId: string;
|
|
1562
1594
|
readonly prompt?: string;
|
|
@@ -1580,7 +1612,7 @@ interface RuntimeStartRunInput {
|
|
|
1580
1612
|
interface RuntimeSubmitInput {
|
|
1581
1613
|
readonly sessionId: string;
|
|
1582
1614
|
readonly afterRunId: string;
|
|
1583
|
-
readonly delivery:
|
|
1615
|
+
readonly delivery: "after_turn" | "interrupt";
|
|
1584
1616
|
readonly input: RuntimeInput | readonly RuntimeInput[];
|
|
1585
1617
|
/** Continuations receive only bindings explicitly supplied for this input. */
|
|
1586
1618
|
readonly credential?: {
|
|
@@ -1594,14 +1626,14 @@ interface RuntimeSubmitInput {
|
|
|
1594
1626
|
}
|
|
1595
1627
|
type RuntimeSubmitInputResult = {
|
|
1596
1628
|
readonly accepted: true;
|
|
1597
|
-
readonly delivery:
|
|
1629
|
+
readonly delivery: "after_turn";
|
|
1598
1630
|
readonly runId: string;
|
|
1599
1631
|
readonly sessionId: string;
|
|
1600
1632
|
readonly afterRunId: string;
|
|
1601
1633
|
readonly sessionOrder: number;
|
|
1602
1634
|
} | {
|
|
1603
1635
|
readonly accepted: true;
|
|
1604
|
-
readonly delivery:
|
|
1636
|
+
readonly delivery: "interrupt";
|
|
1605
1637
|
readonly inputId: string;
|
|
1606
1638
|
/** The existing active Run that owns this input; no new Run is created. */
|
|
1607
1639
|
readonly runId: string;
|
|
@@ -1610,32 +1642,32 @@ type RuntimeSubmitInputResult = {
|
|
|
1610
1642
|
readonly sessionOrder: number;
|
|
1611
1643
|
} | {
|
|
1612
1644
|
readonly accepted: false;
|
|
1613
|
-
readonly delivery:
|
|
1645
|
+
readonly delivery: "after_turn" | "interrupt";
|
|
1614
1646
|
readonly sessionId: string;
|
|
1615
1647
|
readonly afterRunId: string;
|
|
1616
|
-
readonly reason:
|
|
1648
|
+
readonly reason: "stale_run" | "unsupported_capability" | "interrupt_window_closed";
|
|
1617
1649
|
};
|
|
1618
1650
|
interface RuntimeOperationOptions {
|
|
1619
1651
|
readonly operationId?: string;
|
|
1620
1652
|
readonly journalEpoch?: string;
|
|
1621
1653
|
readonly expectedRevision?: number;
|
|
1622
1654
|
}
|
|
1623
|
-
type RuntimeKodaXOptions = Omit<KodaXOptions,
|
|
1655
|
+
type RuntimeKodaXOptions = Omit<KodaXOptions, "provider" | "session" | "events"> & {
|
|
1624
1656
|
readonly provider?: string;
|
|
1625
|
-
readonly session?: KodaXOptions[
|
|
1657
|
+
readonly session?: KodaXOptions["session"];
|
|
1626
1658
|
readonly events?: KodaXEvents;
|
|
1627
1659
|
};
|
|
1628
|
-
type RuntimeDaemonContextOptions = Pick<KodaXContextOptions,
|
|
1629
|
-
type RuntimeDaemonKodaXOptions = Pick<RuntimeKodaXOptions,
|
|
1660
|
+
type RuntimeDaemonContextOptions = Pick<KodaXContextOptions, "gitRoot" | "executionCwd" | "shellExecution" | "contextTokenSnapshot" | "projectSnapshot" | "longRunning" | "providerPolicyHints" | "repoRoutingSignals" | "repoIntelligenceMode" | "repoIntelligenceTrace" | "contextDiagnostics" | "disableAutoTaskReroute" | "toolConstructionMode" | "skillsPrompt" | "rawUserInput" | "skillInvocation" | "repoIntelligenceContext" | "inputArtifacts" | "promptOverlay" | "taskSurface" | "liveTurn" | "managedTaskWorkspaceDir" | "managedProtocolEmission" | "excludeTools" | "systemPromptOverride" | "taskMetadata" | "taskVerification" | "agentProfile" | "currentAgentId" | "parentAgentId">;
|
|
1661
|
+
type RuntimeDaemonKodaXOptions = Pick<RuntimeKodaXOptions, "provider" | "model" | "modelOverride" | "effort" | "thinking" | "reasoningMode" | "agentMode" | "maxIter" | "workflowHostPolicy" | "workflowRunsBaseDir" | "modelTiers" | "maxOutputTokens" | "disablePromptCache" | "lsp" | "workflow" | "selfManual" | "compaction" | "timeouts"> & {
|
|
1630
1662
|
readonly context?: RuntimeDaemonContextOptions;
|
|
1631
1663
|
};
|
|
1632
|
-
type RuntimeDaemonStartRunInput = Omit<RuntimeStartRunInput,
|
|
1664
|
+
type RuntimeDaemonStartRunInput = Omit<RuntimeStartRunInput, "options" | "agentContext" | "permissionBroker"> & {
|
|
1633
1665
|
readonly options?: RuntimeDaemonKodaXOptions;
|
|
1634
1666
|
};
|
|
1635
|
-
interface RuntimeDaemonRunService extends Omit<RuntimeRunService,
|
|
1667
|
+
interface RuntimeDaemonRunService extends Omit<RuntimeRunService, "start"> {
|
|
1636
1668
|
start(input: RuntimeDaemonStartRunInput): Promise<RuntimeRunHandle>;
|
|
1637
1669
|
}
|
|
1638
|
-
type KodaXDaemonRuntime = Omit<KodaXRuntime,
|
|
1670
|
+
type KodaXDaemonRuntime = Omit<KodaXRuntime, "runs"> & {
|
|
1639
1671
|
readonly runs: RuntimeDaemonRunService;
|
|
1640
1672
|
readonly daemon: RuntimeDaemonManagementService;
|
|
1641
1673
|
};
|
|
@@ -1672,36 +1704,36 @@ interface RuntimeRunRequirements {
|
|
|
1672
1704
|
readonly credential?: {
|
|
1673
1705
|
readonly leaseId: string;
|
|
1674
1706
|
readonly provider: string;
|
|
1675
|
-
readonly state:
|
|
1707
|
+
readonly state: "ready" | "expired" | "terminal";
|
|
1676
1708
|
};
|
|
1677
1709
|
readonly hostTools?: {
|
|
1678
1710
|
readonly leaseId: string;
|
|
1679
|
-
readonly state:
|
|
1711
|
+
readonly state: "ready" | "waiting_host" | "expired" | "terminal";
|
|
1680
1712
|
};
|
|
1681
1713
|
}
|
|
1682
1714
|
interface RuntimeContinuationStatus {
|
|
1683
1715
|
readonly inputId: string;
|
|
1684
1716
|
readonly afterRunId: string;
|
|
1685
|
-
readonly delivery:
|
|
1686
|
-
readonly state:
|
|
1717
|
+
readonly delivery: "after_turn";
|
|
1718
|
+
readonly state: "queued" | "delivered" | "terminal";
|
|
1687
1719
|
readonly contentPreview: string;
|
|
1688
1720
|
}
|
|
1689
1721
|
interface RuntimeInterruptInputStatus {
|
|
1690
1722
|
readonly inputId: string;
|
|
1691
1723
|
readonly afterRunId: string;
|
|
1692
|
-
readonly delivery:
|
|
1693
|
-
readonly state:
|
|
1724
|
+
readonly delivery: "interrupt";
|
|
1725
|
+
readonly state: "queued" | "delivered" | "terminal";
|
|
1694
1726
|
readonly contentPreview: string;
|
|
1695
1727
|
readonly queuedAt: string;
|
|
1696
1728
|
readonly deliveredAt?: string;
|
|
1697
|
-
readonly origin?: RuntimeRunStatus[
|
|
1729
|
+
readonly origin?: RuntimeRunStatus["origin"];
|
|
1698
1730
|
}
|
|
1699
|
-
type RuntimeTerminalCode =
|
|
1731
|
+
type RuntimeTerminalCode = "completed" | "run_failed" | "blocked" | "cancelled" | "interrupted" | "runtime_restarted" | "daemon_crashed" | "credential_unavailable" | "host_not_dispatched" | "host_outcome_unknown" | "control_history_untrusted";
|
|
1700
1732
|
interface RuntimeTerminalFact {
|
|
1701
1733
|
readonly revision: number;
|
|
1702
|
-
readonly kind:
|
|
1734
|
+
readonly kind: "completed" | "failed" | "cancelled" | "interrupted";
|
|
1703
1735
|
readonly code: RuntimeTerminalCode;
|
|
1704
|
-
readonly effectOutcome:
|
|
1736
|
+
readonly effectOutcome: "none" | "known" | "unknown";
|
|
1705
1737
|
readonly message?: string;
|
|
1706
1738
|
}
|
|
1707
1739
|
interface RuntimeRunResult {
|
|
@@ -1733,7 +1765,7 @@ interface RuntimeRunService {
|
|
|
1733
1765
|
setProvider(runId: string, provider: string): Promise<void>;
|
|
1734
1766
|
setReasoning(runId: string, reasoning: KodaXReasoningMode | undefined): Promise<void>;
|
|
1735
1767
|
}
|
|
1736
|
-
type RuntimeEventType =
|
|
1768
|
+
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.updated" | "run.progress" | "run.input.queued" | "run.input.delivered" | "turn.started" | "turn.completed" | "turn.failed" | "assistant.delta" | "thinking.delta" | "thinking.finished" | "tool.started" | "tool.progress" | "tool.sandbox" | "tool.finished" | "user_input.requested" | "user_input.resolved" | "permission.requested" | "permission.resolved" | "permission.grant.changed" | "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" | "provider.cache.diagnostics" | "repo_intelligence.trace" | "todo.updated" | "todo.warning" | "sidecar.message" | "run.completed" | "run.failed" | "run.cancelled" | "run.interrupted" | "artifact.created" | "config.effective" | "runtime.warning";
|
|
1737
1769
|
interface RuntimeTextDeltaEventPayload {
|
|
1738
1770
|
readonly text: string;
|
|
1739
1771
|
readonly meta?: KodaXActivityEventMeta;
|
|
@@ -1761,6 +1793,10 @@ type RuntimeToolProgressEventPayload = {
|
|
|
1761
1793
|
readonly partialJson: string;
|
|
1762
1794
|
readonly meta?: KodaXToolEventMeta;
|
|
1763
1795
|
};
|
|
1796
|
+
interface RuntimeToolSandboxEventPayload {
|
|
1797
|
+
readonly update: KodaXToolSandboxObservationUpdate;
|
|
1798
|
+
readonly meta?: KodaXToolEventMeta;
|
|
1799
|
+
}
|
|
1764
1800
|
interface RuntimeToolFinishedEventPayload {
|
|
1765
1801
|
readonly result: {
|
|
1766
1802
|
readonly id: string;
|
|
@@ -1770,21 +1806,21 @@ interface RuntimeToolFinishedEventPayload {
|
|
|
1770
1806
|
readonly meta?: KodaXToolEventMeta;
|
|
1771
1807
|
}
|
|
1772
1808
|
type RuntimeRunProgressEventPayload = {
|
|
1773
|
-
readonly kind:
|
|
1809
|
+
readonly kind: "managed_task_status";
|
|
1774
1810
|
readonly status: KodaXManagedTaskStatusEvent;
|
|
1775
1811
|
} | {
|
|
1776
|
-
readonly kind:
|
|
1812
|
+
readonly kind: "stream_end" | "complete";
|
|
1777
1813
|
readonly meta?: KodaXActivityEventMeta;
|
|
1778
1814
|
} | {
|
|
1779
|
-
readonly kind:
|
|
1815
|
+
readonly kind: "iteration_start";
|
|
1780
1816
|
readonly iter: number;
|
|
1781
1817
|
readonly maxIter: number;
|
|
1782
1818
|
readonly meta?: KodaXActivityEventMeta;
|
|
1783
1819
|
} | {
|
|
1784
|
-
readonly kind:
|
|
1820
|
+
readonly kind: "iteration_end";
|
|
1785
1821
|
readonly info: Readonly<Record<string, unknown>>;
|
|
1786
1822
|
} | {
|
|
1787
|
-
readonly kind:
|
|
1823
|
+
readonly kind: "mid_turn_user_messages";
|
|
1788
1824
|
readonly contents: readonly string[];
|
|
1789
1825
|
readonly meta?: KodaXActivityEventMeta;
|
|
1790
1826
|
};
|
|
@@ -1801,7 +1837,7 @@ interface RuntimeDeliveredInterruptInput {
|
|
|
1801
1837
|
readonly input: RuntimeInput | readonly RuntimeInput[];
|
|
1802
1838
|
readonly queuedAt: string;
|
|
1803
1839
|
readonly deliveredAt: string;
|
|
1804
|
-
readonly origin?: RuntimeRunStatus[
|
|
1840
|
+
readonly origin?: RuntimeRunStatus["origin"];
|
|
1805
1841
|
}
|
|
1806
1842
|
interface RuntimeRunInputDeliveredEventPayload {
|
|
1807
1843
|
readonly inputs: readonly RuntimeDeliveredInterruptInput[];
|
|
@@ -1813,7 +1849,7 @@ interface RuntimeInteractionResolvedEventPayload {
|
|
|
1813
1849
|
readonly kind?: RuntimeUserInputKind;
|
|
1814
1850
|
}
|
|
1815
1851
|
interface RuntimePermissionGrantChangedEventPayload {
|
|
1816
|
-
readonly action:
|
|
1852
|
+
readonly action: "created" | "revoked" | "expired";
|
|
1817
1853
|
readonly grant: RuntimePermissionGrant;
|
|
1818
1854
|
readonly revision: number;
|
|
1819
1855
|
}
|
|
@@ -1856,43 +1892,45 @@ type RuntimeUserInputRequestedEventPayload = RuntimeUserInputRequest | {
|
|
|
1856
1892
|
type RuntimeEventPayloadDefaults = {
|
|
1857
1893
|
readonly [K in RuntimeEventType]: unknown;
|
|
1858
1894
|
};
|
|
1859
|
-
type RuntimeEventPayloadMap = Omit<RuntimeEventPayloadDefaults,
|
|
1860
|
-
readonly
|
|
1861
|
-
readonly
|
|
1862
|
-
readonly
|
|
1863
|
-
readonly
|
|
1864
|
-
readonly
|
|
1865
|
-
readonly
|
|
1866
|
-
readonly
|
|
1867
|
-
readonly
|
|
1868
|
-
readonly
|
|
1869
|
-
readonly
|
|
1870
|
-
readonly
|
|
1871
|
-
readonly
|
|
1872
|
-
readonly
|
|
1873
|
-
readonly
|
|
1874
|
-
readonly
|
|
1875
|
-
readonly
|
|
1876
|
-
readonly
|
|
1877
|
-
readonly
|
|
1878
|
-
readonly
|
|
1879
|
-
readonly
|
|
1880
|
-
readonly
|
|
1881
|
-
readonly
|
|
1882
|
-
readonly
|
|
1883
|
-
readonly
|
|
1884
|
-
readonly
|
|
1885
|
-
readonly
|
|
1886
|
-
readonly
|
|
1887
|
-
readonly
|
|
1888
|
-
readonly
|
|
1889
|
-
readonly
|
|
1890
|
-
readonly
|
|
1891
|
-
readonly
|
|
1892
|
-
readonly
|
|
1893
|
-
readonly
|
|
1894
|
-
readonly
|
|
1895
|
-
readonly
|
|
1895
|
+
type RuntimeEventPayloadMap = Omit<RuntimeEventPayloadDefaults, "session.created" | "session.loaded" | "run.queued" | "run.started" | "run.updated" | "run.completed" | "run.failed" | "run.cancelled" | "run.interrupted" | "assistant.delta" | "thinking.delta" | "thinking.finished" | "tool.started" | "tool.progress" | "tool.sandbox" | "tool.finished" | "run.progress" | "run.input.queued" | "run.input.delivered" | "todo.updated" | "user_input.requested" | "user_input.resolved" | "permission.requested" | "permission.resolved" | "permission.grant.changed" | "session.settings.updated" | "turn.started" | "turn.completed" | "turn.failed" | "workflow.started" | "workflow.updated" | "workflow.finished" | "context.budget.snapshot" | "provider.cache.diagnostics" | "tool.exposure.planned" | "context.compaction.messages" | "context.compaction.finished" | "runtime.warning"> & {
|
|
1896
|
+
readonly "session.created": RuntimeSession;
|
|
1897
|
+
readonly "session.loaded": RuntimeSessionLoadedEventPayload;
|
|
1898
|
+
readonly "run.queued": RuntimeRunStatus;
|
|
1899
|
+
readonly "run.started": RuntimeRunStatus;
|
|
1900
|
+
readonly "run.updated": RuntimeRunStatus;
|
|
1901
|
+
readonly "run.completed": RuntimeRunStatus;
|
|
1902
|
+
readonly "run.failed": RuntimeRunStatus;
|
|
1903
|
+
readonly "run.cancelled": RuntimeRunStatus;
|
|
1904
|
+
readonly "run.interrupted": RuntimeRunStatus;
|
|
1905
|
+
readonly "assistant.delta": RuntimeTextDeltaEventPayload;
|
|
1906
|
+
readonly "thinking.delta": RuntimeTextDeltaEventPayload;
|
|
1907
|
+
readonly "thinking.finished": RuntimeThinkingFinishedEventPayload;
|
|
1908
|
+
readonly "tool.started": RuntimeToolStartedEventPayload;
|
|
1909
|
+
readonly "tool.progress": RuntimeToolProgressEventPayload;
|
|
1910
|
+
readonly "tool.sandbox": RuntimeToolSandboxEventPayload;
|
|
1911
|
+
readonly "tool.finished": RuntimeToolFinishedEventPayload;
|
|
1912
|
+
readonly "run.progress": RuntimeRunProgressEventPayload;
|
|
1913
|
+
readonly "run.input.queued": RuntimeRunInputQueuedEventPayload;
|
|
1914
|
+
readonly "run.input.delivered": RuntimeRunInputDeliveredEventPayload;
|
|
1915
|
+
readonly "todo.updated": RuntimeTodoUpdatedEventPayload;
|
|
1916
|
+
readonly "user_input.requested": RuntimeUserInputRequestedEventPayload;
|
|
1917
|
+
readonly "user_input.resolved": RuntimeInteractionResolvedEventPayload;
|
|
1918
|
+
readonly "permission.requested": RuntimePermissionRequest;
|
|
1919
|
+
readonly "permission.resolved": RuntimeInteractionResolvedEventPayload;
|
|
1920
|
+
readonly "permission.grant.changed": RuntimePermissionGrantChangedEventPayload;
|
|
1921
|
+
readonly "session.settings.updated": RuntimeSessionSettingsUpdatedEventPayload;
|
|
1922
|
+
readonly "turn.started": KodaXTurnStartedEvent;
|
|
1923
|
+
readonly "turn.completed": KodaXTurnCompletedEvent;
|
|
1924
|
+
readonly "turn.failed": KodaXTurnFailedEvent;
|
|
1925
|
+
readonly "workflow.started": WorkflowProcessEvent;
|
|
1926
|
+
readonly "workflow.updated": WorkflowProcessEvent;
|
|
1927
|
+
readonly "workflow.finished": WorkflowProcessEvent;
|
|
1928
|
+
readonly "context.budget.snapshot": RuntimeContextBudgetSnapshot;
|
|
1929
|
+
readonly "provider.cache.diagnostics": KodaXPromptCacheDiagnosticEvent;
|
|
1930
|
+
readonly "tool.exposure.planned": RuntimeToolExposurePlan;
|
|
1931
|
+
readonly "context.compaction.messages": RuntimeContextCompactionMessagesEventPayload;
|
|
1932
|
+
readonly "context.compaction.finished": RuntimeContextCompactionFinishedEventPayload;
|
|
1933
|
+
readonly "runtime.warning": RuntimeWarningEventPayload;
|
|
1896
1934
|
};
|
|
1897
1935
|
interface RuntimeEventEnvelope<TPayload = unknown> {
|
|
1898
1936
|
readonly id: string;
|
|
@@ -1938,7 +1976,7 @@ interface RuntimeEventService {
|
|
|
1938
1976
|
subscribe(filter: RuntimeEventFilter, listener: RuntimeEventListener): RuntimeSubscription;
|
|
1939
1977
|
replay(filter?: RuntimeEventReplayFilter): Promise<readonly RuntimeEvent[]>;
|
|
1940
1978
|
}
|
|
1941
|
-
type RuntimePermissionRisk =
|
|
1979
|
+
type RuntimePermissionRisk = "low" | "medium" | "high";
|
|
1942
1980
|
interface RuntimePermissionScope {
|
|
1943
1981
|
readonly toolName?: string;
|
|
1944
1982
|
readonly sessionId?: string;
|
|
@@ -1948,7 +1986,7 @@ interface RuntimePermissionScope {
|
|
|
1948
1986
|
interface RuntimePermissionGrantSuggestion {
|
|
1949
1987
|
/** Opaque pending-request-local identifier; clients must return it unchanged. */
|
|
1950
1988
|
readonly id: string;
|
|
1951
|
-
readonly kind:
|
|
1989
|
+
readonly kind: "session" | "persistent";
|
|
1952
1990
|
readonly label: string;
|
|
1953
1991
|
}
|
|
1954
1992
|
interface RuntimePermissionRequest {
|
|
@@ -1963,6 +2001,8 @@ interface RuntimePermissionRequest {
|
|
|
1963
2001
|
readonly inputPreview?: string;
|
|
1964
2002
|
/** Effective directory used to resolve relative tool paths for this run. */
|
|
1965
2003
|
readonly executionCwd?: string;
|
|
2004
|
+
/** Structured Auto[LLM] decision metadata; never includes prompt or response text. */
|
|
2005
|
+
readonly autoModeDiagnostics?: AutoModeDecisionDiagnostics;
|
|
1966
2006
|
readonly grantSuggestions?: readonly RuntimePermissionGrantSuggestion[];
|
|
1967
2007
|
readonly createdAt: string;
|
|
1968
2008
|
readonly expiresAt?: string;
|
|
@@ -1977,6 +2017,8 @@ interface RuntimePermissionRequestInput {
|
|
|
1977
2017
|
readonly risk?: RuntimePermissionRisk;
|
|
1978
2018
|
readonly inputPreview?: string;
|
|
1979
2019
|
readonly executionCwd?: string;
|
|
2020
|
+
/** Structured Auto[LLM] decision metadata; never includes prompt or response text. */
|
|
2021
|
+
readonly autoModeDiagnostics?: AutoModeDecisionDiagnostics;
|
|
1980
2022
|
readonly expiresAt?: string;
|
|
1981
2023
|
readonly timeoutMs?: number;
|
|
1982
2024
|
/**
|
|
@@ -1986,12 +2028,12 @@ interface RuntimePermissionRequestInput {
|
|
|
1986
2028
|
readonly toolInput?: Readonly<Record<string, unknown>>;
|
|
1987
2029
|
}
|
|
1988
2030
|
type RuntimePermissionDecision = {
|
|
1989
|
-
readonly type:
|
|
2031
|
+
readonly type: "allow_once";
|
|
1990
2032
|
} | {
|
|
1991
|
-
readonly type:
|
|
2033
|
+
readonly type: "allow_session";
|
|
1992
2034
|
readonly suggestionId: string;
|
|
1993
2035
|
} | {
|
|
1994
|
-
readonly type:
|
|
2036
|
+
readonly type: "allow_always";
|
|
1995
2037
|
readonly suggestionId: string;
|
|
1996
2038
|
}
|
|
1997
2039
|
/**
|
|
@@ -1999,11 +2041,12 @@ type RuntimePermissionDecision = {
|
|
|
1999
2041
|
* its narrower concrete candidate and never persists the supplied scope.
|
|
2000
2042
|
*/
|
|
2001
2043
|
| {
|
|
2002
|
-
readonly type:
|
|
2044
|
+
readonly type: "allow_always";
|
|
2003
2045
|
readonly scope: RuntimePermissionScope;
|
|
2004
2046
|
} | {
|
|
2005
|
-
readonly type:
|
|
2047
|
+
readonly type: "reject";
|
|
2006
2048
|
readonly reason?: string;
|
|
2049
|
+
readonly cause?: "approval_timeout";
|
|
2007
2050
|
};
|
|
2008
2051
|
interface RuntimePermissionFilter {
|
|
2009
2052
|
readonly sessionId?: string;
|
|
@@ -2017,7 +2060,7 @@ interface RuntimePermissionGrant {
|
|
|
2017
2060
|
readonly id: string;
|
|
2018
2061
|
readonly scope: RuntimePermissionScope;
|
|
2019
2062
|
readonly createdAt: string;
|
|
2020
|
-
readonly persistence?:
|
|
2063
|
+
readonly persistence?: "session" | "persistent";
|
|
2021
2064
|
readonly label?: string;
|
|
2022
2065
|
readonly sourcePermissionId?: string;
|
|
2023
2066
|
}
|
|
@@ -2028,7 +2071,7 @@ interface RuntimePermissionService {
|
|
|
2028
2071
|
listGrants(): Promise<RuntimeVersionedValue<readonly RuntimePermissionGrant[]>>;
|
|
2029
2072
|
revokeGrant(grantId: string, expectedRevision: number): Promise<boolean>;
|
|
2030
2073
|
}
|
|
2031
|
-
type RuntimeUserInputKind =
|
|
2074
|
+
type RuntimeUserInputKind = "askUser" | "askUserMulti" | "askUserInput";
|
|
2032
2075
|
interface RuntimeUserInputRequest {
|
|
2033
2076
|
readonly id: string;
|
|
2034
2077
|
readonly revision: number;
|
|
@@ -2047,7 +2090,7 @@ interface RuntimeUserInputFilter {
|
|
|
2047
2090
|
interface RuntimeUserInputResolution {
|
|
2048
2091
|
readonly requestId: string;
|
|
2049
2092
|
readonly accepted: boolean;
|
|
2050
|
-
readonly status:
|
|
2093
|
+
readonly status: "answered" | "dismissed" | "already_resolved";
|
|
2051
2094
|
}
|
|
2052
2095
|
interface RuntimeUserInputService {
|
|
2053
2096
|
listPending(filter?: RuntimeUserInputFilter): Promise<readonly RuntimeUserInputRequest[]>;
|
|
@@ -2084,7 +2127,7 @@ interface RuntimeHostToolDescriptor {
|
|
|
2084
2127
|
readonly name: string;
|
|
2085
2128
|
readonly description: string;
|
|
2086
2129
|
readonly inputSchema: Readonly<Record<string, unknown>>;
|
|
2087
|
-
readonly sideEffect:
|
|
2130
|
+
readonly sideEffect: "none" | "idempotent" | "non_idempotent";
|
|
2088
2131
|
}
|
|
2089
2132
|
interface RuntimeHostToolInvocation {
|
|
2090
2133
|
readonly invocationId: string;
|
|
@@ -2109,7 +2152,7 @@ interface RuntimeHostToolInvocationStatus {
|
|
|
2109
2152
|
readonly toolName: string;
|
|
2110
2153
|
readonly sessionId: string;
|
|
2111
2154
|
readonly runId: string;
|
|
2112
|
-
readonly state:
|
|
2155
|
+
readonly state: "prepared" | "dispatched" | "completed" | "unknown" | "not_dispatched";
|
|
2113
2156
|
readonly updatedAt: string;
|
|
2114
2157
|
}
|
|
2115
2158
|
interface RuntimeHostToolService {
|
|
@@ -2155,7 +2198,7 @@ interface RuntimeDaemonPreflight {
|
|
|
2155
2198
|
readonly activeAgentTasks: readonly RuntimeActiveAgentTurn[];
|
|
2156
2199
|
readonly pendingPermissions: readonly RuntimePermissionRequest[];
|
|
2157
2200
|
readonly pendingUserInputs: readonly RuntimeUserInputRequest[];
|
|
2158
|
-
readonly blockers: readonly (
|
|
2201
|
+
readonly blockers: readonly ("connected_clients" | "active_runs" | "queued_runs" | "active_workflows" | "active_agent_turns" | "active_agent_tasks" | "pending_interactions")[];
|
|
2159
2202
|
readonly canStop: boolean;
|
|
2160
2203
|
}
|
|
2161
2204
|
interface RuntimeActiveAgentTurn {
|
|
@@ -2164,6 +2207,24 @@ interface RuntimeActiveAgentTurn {
|
|
|
2164
2207
|
readonly turnId: string;
|
|
2165
2208
|
readonly kind: AgentExecutionKind;
|
|
2166
2209
|
}
|
|
2210
|
+
interface RuntimeIntegrationDiagnostic {
|
|
2211
|
+
readonly code: "invalid-config" | "activation-failed" | "watcher-degraded";
|
|
2212
|
+
readonly message: string;
|
|
2213
|
+
readonly time: string;
|
|
2214
|
+
}
|
|
2215
|
+
interface RuntimeIntegrationDomainStatus {
|
|
2216
|
+
readonly domain: "mcp" | "a2a" | "extensions";
|
|
2217
|
+
readonly path: string;
|
|
2218
|
+
readonly revision?: string;
|
|
2219
|
+
readonly source?: "user" | "legacy-user" | "default";
|
|
2220
|
+
readonly lastReloadAt?: string;
|
|
2221
|
+
readonly diagnostic?: RuntimeIntegrationDiagnostic;
|
|
2222
|
+
readonly watching: boolean;
|
|
2223
|
+
}
|
|
2224
|
+
interface RuntimeIntegrationHealth {
|
|
2225
|
+
readonly state: "healthy" | "degraded";
|
|
2226
|
+
readonly domains: readonly RuntimeIntegrationDomainStatus[];
|
|
2227
|
+
}
|
|
2167
2228
|
interface RuntimeDaemonManagementState {
|
|
2168
2229
|
readonly runtimeId: string;
|
|
2169
2230
|
/** Monotonic for logical client, mutation, Runtime event, and preflight state changes. */
|
|
@@ -2171,6 +2232,8 @@ interface RuntimeDaemonManagementState {
|
|
|
2171
2232
|
readonly ownerPolicy: RuntimeOwnerPolicyState;
|
|
2172
2233
|
readonly owner: RuntimeOwnerIdentity;
|
|
2173
2234
|
readonly preflight: RuntimeDaemonPreflight;
|
|
2235
|
+
/** Optional integrations never make the core daemon unavailable. */
|
|
2236
|
+
readonly integrations?: RuntimeIntegrationHealth;
|
|
2174
2237
|
}
|
|
2175
2238
|
interface RuntimeDaemonRollbackInput {
|
|
2176
2239
|
readonly expectedRuntimeId: string;
|
|
@@ -2183,7 +2246,7 @@ interface RuntimeDaemonRollbackResult {
|
|
|
2183
2246
|
readonly runtimeId: string;
|
|
2184
2247
|
readonly revision: number;
|
|
2185
2248
|
readonly ownerPolicy: RuntimeOwnerPolicyState & {
|
|
2186
|
-
readonly mode:
|
|
2249
|
+
readonly mode: "inline";
|
|
2187
2250
|
};
|
|
2188
2251
|
}
|
|
2189
2252
|
interface RuntimeDaemonManagementService {
|
|
@@ -2195,10 +2258,10 @@ interface RuntimeStatusService {
|
|
|
2195
2258
|
preflight(): Promise<RuntimeDaemonPreflight>;
|
|
2196
2259
|
}
|
|
2197
2260
|
declare function createKodaXRuntime(options: CreateKodaXRuntimeOptions & {
|
|
2198
|
-
readonly mode:
|
|
2261
|
+
readonly mode: "daemon";
|
|
2199
2262
|
}): Promise<KodaXDaemonRuntime>;
|
|
2200
2263
|
declare function createKodaXRuntime(options?: CreateKodaXRuntimeOptions): Promise<KodaXRuntime>;
|
|
2201
2264
|
declare function connectKodaXRuntime(options?: ConnectKodaXRuntimeOptions): Promise<KodaXDaemonRuntime>;
|
|
2202
2265
|
|
|
2203
|
-
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, RuntimeAutoModeConfigurationError, RuntimeContextBudgetSnapshot, RuntimeDaemonCapabilityUpgradeError, RuntimePermissionScopeUpgradeRequiredError, RuntimeToolExposurePlan, RuntimeTransportBoundaryError, SessionTranscriptEntry, acquireKodaXInlineOwner, connectKodaXRuntime, createKodaXRuntime, enableKodaXDaemonOwner, getKodaXRuntimeOwnerPolicy, getKodaXRuntimeOwnerState, listRuntimeDaemonSchemaMethods, parseRuntimeEvent, setKodaXRuntimeOwnerMode };
|
|
2204
|
-
export type { ConnectKodaXRuntimeOptions, CreateKodaXRuntimeOptions, KodaXDaemonRuntime, KodaXRuntime, KodaXRuntimeIsolation, KodaXRuntimeMode, RuntimeActiveAgentTurn, RuntimeActiveToolProjection, RuntimeAdminService, RuntimeAgentBindingService, RuntimeAgentOwnerSession, RuntimeAgentService, RuntimeAppendNoticeInput, RuntimeArtifact, RuntimeArtifactKind, RuntimeArtifactRefInput, RuntimeArtifactService, RuntimeBoundDefaultAgent, RuntimeBoundLocalAgent, RuntimeCapabilityRequirements, RuntimeCatalogService, RuntimeClientCapabilities, RuntimeClientInfo, RuntimeCommandInfo, RuntimeCommandResolveInput, RuntimeCompactSessionInput, RuntimeCompactSessionResult, RuntimeConfigPatch, RuntimeConfigReloadResult, RuntimeConfigService, RuntimeConnectionService, RuntimeConnectionState, RuntimeContextCompactionFinishedEventPayload, RuntimeContextCompactionMessagesEventPayload, RuntimeContinuationStatus, RuntimeCreateArtifactInput, RuntimeCreateSessionInput, RuntimeCredentialBroker, RuntimeCredentialLease, RuntimeCredentialRequest, RuntimeCredentialService, RuntimeDaemonClientTransport, RuntimeDaemonContextOptions, RuntimeDaemonEndpoint, RuntimeDaemonError, RuntimeDaemonErrorCode, RuntimeDaemonFrame, RuntimeDaemonJsonSchema, RuntimeDaemonKodaXOptions, RuntimeDaemonManagementService, RuntimeDaemonManagementState, RuntimeDaemonMethod, RuntimeDaemonMethodSchema, RuntimeDaemonNotification, RuntimeDaemonNotificationMethod, RuntimeDaemonPreflight, RuntimeDaemonProtocolSchema, RuntimeDaemonRequest, RuntimeDaemonRollbackInput, RuntimeDaemonRollbackResult, RuntimeDaemonRunService, RuntimeDaemonStartRunInput, RuntimeDaemonTransportLifecycleState, RuntimeDefaultAgentStartInput, RuntimeDeliveredInterruptInput, RuntimeDiagnosticFilter, RuntimeDiagnosticsService, RuntimeEffectiveSkillRef, RuntimeEvent, RuntimeEventEnvelope, RuntimeEventFilter, RuntimeEventListener, RuntimeEventParseResult, RuntimeEventPayloadMap, RuntimeEventReplayFilter, RuntimeEventService, RuntimeEventType, RuntimeExactCallPermissionMatcher, RuntimeExactCommandPermissionMatcher, RuntimeExactPathPermissionMatcher, RuntimeExecutionToolPolicy, RuntimeExtensionListResult, RuntimeExtensionReloadResult, RuntimeExternalAgentsOptions, RuntimeFileInput, RuntimeForkSessionInput, RuntimeGrantedScope, RuntimeHostToolDescriptor, RuntimeHostToolHandler, RuntimeHostToolInvocation, RuntimeHostToolInvocationStatus, RuntimeHostToolLease, RuntimeHostToolResult, RuntimeHostToolService, RuntimeIdentity, RuntimeImageInput, RuntimeInlineOwnerHandle, RuntimeInput, RuntimeInteractionResolvedEventPayload, RuntimeInterruptInputStatus, RuntimeKodaXOptions, RuntimeLocalAgentStartInput, RuntimeManagedTaskProjection, RuntimeMcpReloadResult, RuntimeMcpService, RuntimeMcpToolListFilter, RuntimeMcpValidateResult, RuntimeModelListFilter, RuntimeOperationOptions, RuntimeOperationReceipt, RuntimeOperationService, RuntimeOperationState, RuntimeOwnerIdentity, RuntimeOwnerPolicyState, RuntimeOwnerState, RuntimePendingUserInputProjection, RuntimePermissionBroker, RuntimePermissionDecision, RuntimePermissionFilter, RuntimePermissionGrant, RuntimePermissionGrantChangedEventPayload, RuntimePermissionGrantSuggestion, RuntimePermissionHostPlatform, RuntimePermissionMatcher, RuntimePermissionRequest, RuntimePermissionRequestInput, RuntimePermissionRespondOptions, RuntimePermissionRisk, RuntimePermissionScope, RuntimePermissionService, RuntimeResolvedLocalAgent, RuntimeRewindSessionInput, RuntimeRunFilter, RuntimeRunHandle, RuntimeRunInputDeliveredEventPayload, RuntimeRunInputQueuedEventPayload, RuntimeRunMode, RuntimeRunPhase, RuntimeRunProgressEventPayload, RuntimeRunRequirements, RuntimeRunResult, RuntimeRunService, RuntimeRunSessionLoadedEventPayload, RuntimeRunStatus, RuntimeSession, RuntimeSessionFilter, RuntimeSessionLiveProjection, RuntimeSessionLoadedEventPayload, RuntimeSessionObservation, RuntimeSessionObservationSnapshot, RuntimeSessionService, RuntimeSessionSettings, RuntimeSessionSettingsPatch, RuntimeSessionSettingsUpdatedEventPayload, RuntimeSessionSummary, RuntimeSetActiveEntryInput, RuntimeSkillDescribeInput, RuntimeSkillDescription, RuntimeSkillFileSummary, RuntimeSkillListFilter, RuntimeSkillSummary, RuntimeStartRunInput, RuntimeStatusService, RuntimeStatusSnapshot, RuntimeSubmitInput, RuntimeSubmitInputResult, RuntimeSubscription, RuntimeTerminalCode, RuntimeTerminalFact, RuntimeTextDeltaEventPayload, RuntimeTextInput, RuntimeThinkingFinishedEventPayload, RuntimeTodoUpdatedEventPayload, RuntimeToolFinishedEventPayload, RuntimeToolProgressEventPayload, RuntimeToolStartedEventPayload, RuntimeTranscript, RuntimeTranscriptEntryChunk, RuntimeTranscriptEntryChunkInput, RuntimeTranscriptPageInput, RuntimeTranscriptSearchHit, RuntimeTranscriptSearchInput, RuntimeTranscriptSearchResult, RuntimeTranscriptSlice, RuntimeTranscriptSliceEntry, RuntimeTypedEvent, RuntimeTypedEventListener, RuntimeUserInputFilter, RuntimeUserInputKind, RuntimeUserInputRequest, RuntimeUserInputRequestedEventPayload, RuntimeUserInputResolution, RuntimeUserInputService, RuntimeUserMarkdownAgentRef, RuntimeVersionedUpdateOptions, RuntimeVersionedValue, RuntimeVideoInput, RuntimeWarningEventPayload, RuntimeWorkerOptions, RuntimeWorkerResourceLimits, RuntimeWorkflowFilter, RuntimeWorkflowListener, RuntimeWorkflowService, RuntimeWorkflowSnapshot, RuntimeWorkflowSummary, RuntimeWorkspaceBinding };
|
|
2266
|
+
export { KODAX_DAEMON_PROTOCOL, KODAX_DAEMON_PROTOCOL_VERSION, KODAX_RUNTIME_SDK_CAPABILITIES, KodaXEvents, KodaXPromptCacheDiagnosticEvent, KodaXResult, RUNTIME_DAEMON_METHODS, RUNTIME_DAEMON_METHOD_SCHEMAS, RUNTIME_DAEMON_NOTIFICATION_SCHEMAS, RUNTIME_DAEMON_PROTOCOL_SCHEMA, RUNTIME_DAEMON_PROTOCOL_SCHEMA_JSON, RuntimeAutoModeConfigurationError, RuntimeContextBudgetSnapshot, RuntimeDaemonCapabilityUpgradeError, RuntimePermissionScopeUpgradeRequiredError, RuntimeToolExposurePlan, RuntimeTransportBoundaryError, SessionTranscriptEntry, acquireKodaXInlineOwner, connectKodaXRuntime, createKodaXRuntime, enableKodaXDaemonOwner, getKodaXRuntimeOwnerPolicy, getKodaXRuntimeOwnerState, listRuntimeDaemonSchemaMethods, parseRuntimeEvent, setKodaXRuntimeOwnerMode };
|
|
2267
|
+
export type { ConnectKodaXRuntimeOptions, CreateKodaXRuntimeOptions, KodaXDaemonRuntime, KodaXRuntime, KodaXRuntimeIsolation, KodaXRuntimeMode, RuntimeActiveAgentTurn, RuntimeActiveToolProjection, RuntimeAdminService, RuntimeAgentBindingService, RuntimeAgentOwnerSession, RuntimeAgentService, RuntimeAppendNoticeInput, RuntimeArtifact, RuntimeArtifactKind, RuntimeArtifactRefInput, RuntimeArtifactService, RuntimeBoundDefaultAgent, RuntimeBoundLocalAgent, RuntimeCapabilityRequirements, RuntimeCatalogService, RuntimeClientCapabilities, RuntimeClientInfo, RuntimeCommandInfo, RuntimeCommandResolveInput, RuntimeCompactSessionInput, RuntimeCompactSessionResult, RuntimeConfigPatch, RuntimeConfigReloadResult, RuntimeConfigService, RuntimeConnectionService, RuntimeConnectionState, RuntimeContextCompactionFinishedEventPayload, RuntimeContextCompactionMessagesEventPayload, RuntimeContinuationStatus, RuntimeCreateArtifactInput, RuntimeCreateSessionInput, RuntimeCredentialBroker, RuntimeCredentialLease, RuntimeCredentialRequest, RuntimeCredentialService, RuntimeDaemonClientTransport, RuntimeDaemonContextOptions, RuntimeDaemonEndpoint, RuntimeDaemonError, RuntimeDaemonErrorCode, RuntimeDaemonFrame, RuntimeDaemonJsonSchema, RuntimeDaemonKodaXOptions, RuntimeDaemonManagementService, RuntimeDaemonManagementState, RuntimeDaemonMethod, RuntimeDaemonMethodSchema, RuntimeDaemonNotification, RuntimeDaemonNotificationMethod, RuntimeDaemonPreflight, RuntimeDaemonProtocolSchema, RuntimeDaemonRequest, RuntimeDaemonRollbackInput, RuntimeDaemonRollbackResult, RuntimeDaemonRunService, RuntimeDaemonStartRunInput, RuntimeDaemonTransportLifecycleState, RuntimeDefaultAgentStartInput, RuntimeDeliveredInterruptInput, RuntimeDiagnosticFilter, RuntimeDiagnosticsService, RuntimeEffectiveSkillRef, RuntimeEvent, RuntimeEventEnvelope, RuntimeEventFilter, RuntimeEventListener, RuntimeEventParseResult, RuntimeEventPayloadMap, RuntimeEventReplayFilter, RuntimeEventService, RuntimeEventType, RuntimeExactCallPermissionMatcher, RuntimeExactCommandPermissionMatcher, RuntimeExactPathPermissionMatcher, RuntimeExecutionToolPolicy, RuntimeExtensionListResult, RuntimeExtensionReloadResult, RuntimeExternalAgentsOptions, RuntimeFileInput, RuntimeForkSessionInput, RuntimeGrantedScope, RuntimeHostToolDescriptor, RuntimeHostToolHandler, RuntimeHostToolInvocation, RuntimeHostToolInvocationStatus, RuntimeHostToolLease, RuntimeHostToolResult, RuntimeHostToolService, RuntimeIdentity, RuntimeImageInput, RuntimeInlineOwnerHandle, RuntimeInput, RuntimeIntegrationDiagnostic, RuntimeIntegrationDomainStatus, RuntimeIntegrationHealth, RuntimeInteractionResolvedEventPayload, RuntimeInterruptInputStatus, RuntimeKodaXOptions, RuntimeLearningService, RuntimeLocalAgentStartInput, RuntimeManagedTaskProjection, RuntimeMcpReloadResult, RuntimeMcpService, RuntimeMcpToolListFilter, RuntimeMcpValidateResult, RuntimeModelListFilter, RuntimeOperationOptions, RuntimeOperationReceipt, RuntimeOperationService, RuntimeOperationState, RuntimeOwnerIdentity, RuntimeOwnerPolicyState, RuntimeOwnerState, RuntimePendingUserInputProjection, RuntimePermissionBroker, RuntimePermissionDecision, RuntimePermissionFilter, RuntimePermissionGrant, RuntimePermissionGrantChangedEventPayload, RuntimePermissionGrantSuggestion, RuntimePermissionHostPlatform, RuntimePermissionMatcher, RuntimePermissionRequest, RuntimePermissionRequestInput, RuntimePermissionRespondOptions, RuntimePermissionRisk, RuntimePermissionScope, RuntimePermissionService, RuntimeResolvedLocalAgent, RuntimeRewindSessionInput, RuntimeRunFilter, RuntimeRunHandle, RuntimeRunInputDeliveredEventPayload, RuntimeRunInputQueuedEventPayload, RuntimeRunMode, RuntimeRunPhase, RuntimeRunProgressEventPayload, RuntimeRunRequirements, RuntimeRunResult, RuntimeRunService, RuntimeRunSessionLoadedEventPayload, RuntimeRunStatus, RuntimeSession, RuntimeSessionFilter, RuntimeSessionLiveProjection, RuntimeSessionLoadedEventPayload, RuntimeSessionObservation, RuntimeSessionObservationSnapshot, RuntimeSessionService, RuntimeSessionSettings, RuntimeSessionSettingsPatch, RuntimeSessionSettingsUpdatedEventPayload, RuntimeSessionSummary, RuntimeSetActiveEntryInput, RuntimeSkillDescribeInput, RuntimeSkillDescription, RuntimeSkillFileSummary, RuntimeSkillListFilter, RuntimeSkillSummary, RuntimeStartRunInput, RuntimeStatusService, RuntimeStatusSnapshot, RuntimeSubmitInput, RuntimeSubmitInputResult, RuntimeSubscription, RuntimeTerminalCode, RuntimeTerminalFact, RuntimeTextDeltaEventPayload, RuntimeTextInput, RuntimeThinkingFinishedEventPayload, RuntimeTodoUpdatedEventPayload, RuntimeToolFinishedEventPayload, RuntimeToolProgressEventPayload, RuntimeToolSandboxEventPayload, RuntimeToolStartedEventPayload, RuntimeTranscript, RuntimeTranscriptEntryChunk, RuntimeTranscriptEntryChunkInput, RuntimeTranscriptPageInput, RuntimeTranscriptSearchHit, RuntimeTranscriptSearchInput, RuntimeTranscriptSearchResult, RuntimeTranscriptSlice, RuntimeTranscriptSliceEntry, RuntimeTypedEvent, RuntimeTypedEventListener, RuntimeUserInputFilter, RuntimeUserInputKind, RuntimeUserInputRequest, RuntimeUserInputRequestedEventPayload, RuntimeUserInputResolution, RuntimeUserInputService, RuntimeUserMarkdownAgentRef, RuntimeVersionedUpdateOptions, RuntimeVersionedValue, RuntimeVideoInput, RuntimeWarningEventPayload, RuntimeWorkerOptions, RuntimeWorkerResourceLimits, RuntimeWorkflowFilter, RuntimeWorkflowListener, RuntimeWorkflowService, RuntimeWorkflowSnapshot, RuntimeWorkflowSummary, RuntimeWorkspaceBinding };
|