@kodax-ai/kodax 0.7.96 → 0.7.97-alpha.2
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 +86 -0
- package/README.md +85 -62
- package/README_CN.md +57 -67
- package/config-templates/config.example.jsonc +0 -14
- package/dist/chunks/{agent-7N427EVB.js → agent-J7SHFM5N.js} +1 -1
- package/dist/chunks/argument-completer-ZJQOWTIS.js +2 -0
- package/dist/chunks/{chunk-ABZDFK2X.js → chunk-2GV6MQ4T.js} +14 -14
- package/dist/chunks/{chunk-6QI3GOYG.js → chunk-3PS3YEDS.js} +1 -1
- package/dist/chunks/chunk-4VJMQDTH.js +417 -0
- package/dist/chunks/{chunk-NI7PBPUR.js → chunk-5DSUVP46.js} +1 -1
- package/dist/chunks/chunk-5P7RTSZT.js +21 -0
- package/dist/chunks/{chunk-XXNR6S4Q.js → chunk-6ZAQKFIM.js} +1 -1
- package/dist/chunks/chunk-7V2QBZ73.js +137 -0
- package/dist/chunks/{chunk-C7U542KM.js → chunk-F7DHZH6T.js} +1 -1
- package/dist/chunks/{chunk-7IMWOR34.js → chunk-HSRYDDPF.js} +1 -1
- package/dist/chunks/chunk-K3DQGSQU.js +372 -0
- package/dist/chunks/chunk-NO23K2CB.js +2 -0
- package/dist/chunks/{chunk-NKT3B3DR.js → chunk-OT5WHAX4.js} +1 -1
- package/dist/chunks/{chunk-YEAUDI6U.js → chunk-QGWHJIO4.js} +1 -1
- package/dist/chunks/chunk-QOFFAY5C.js +261 -0
- package/dist/chunks/{chunk-4PFZ7BEE.js → chunk-QVDTORL3.js} +11 -11
- package/dist/chunks/chunk-QZ4B4AWG.js +473 -0
- package/dist/chunks/chunk-RXDS6CNA.js +355 -0
- package/dist/chunks/{chunk-WV3DJVW4.js → chunk-VDGPJQL7.js} +135 -135
- package/dist/chunks/chunk-VEZ4WHPN.js +641 -0
- package/dist/chunks/chunk-ZPPAT25E.js +5 -0
- package/dist/chunks/chunk-ZQYWDI4O.js +1 -0
- package/dist/chunks/chunk-ZS2GUADU.js +498 -0
- package/dist/chunks/{chunk-GN2IY5YE.js → chunk-ZTYZYXGV.js} +1 -1
- package/dist/chunks/{chunk-EM4XJBTK.js → chunk-ZZQ4GDVU.js} +1 -1
- package/dist/chunks/{client-6WZZTTSV.js → client-MXOJ5XUN.js} +1 -1
- package/dist/chunks/{compaction-config-ZMEJU4U7.js → compaction-config-5VZSGKBQ.js} +1 -1
- package/dist/chunks/{construction-bootstrap-RX4DMHI7.js → construction-bootstrap-U2ZU2WAT.js} +1 -1
- package/dist/chunks/dist-CSLNWLOE.js +2 -0
- package/dist/chunks/dist-XXMJMJDU.js +2 -0
- package/dist/chunks/host-RUXYZFYN.js +2 -0
- package/dist/chunks/readline-helpers-JCVULR4C.js +2 -0
- package/dist/chunks/run-manager-DRIM5VNE.js +2 -0
- package/dist/chunks/utils-MQEBGKIX.js +2 -0
- package/dist/index.d.ts +63 -30
- package/dist/index.js +10 -6
- package/dist/kodax_bootstrap.js +1 -1
- package/dist/kodax_cli.js +1745 -1734
- package/dist/kodax_resume.js +32 -35
- package/dist/native/win32-x64/kodax-windows-sandbox.exe +0 -0
- package/dist/native/win32-x64/kodax-windows-text-transaction.node +0 -0
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/sandbox-network-broker.js +77 -77
- package/dist/sdk-a2a.d.ts +33 -18
- package/dist/sdk-a2a.js +8 -9
- package/dist/sdk-agent.d.ts +33 -26
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-client.d.ts +40 -0
- package/dist/sdk-client.js +2 -0
- package/dist/sdk-coding.d.ts +87 -499
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +3 -4
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +11 -9
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +3 -3
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +3 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +317 -70
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +580 -452
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +13 -9
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +57 -57
- package/dist/types-chunks/{base.d-Bt9lhwSV.d.ts → base.d-ZBOdjDUT.d.ts} +2 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-DWFIMg0v.d.ts → bash-prefix-extractor.d-DvswAXKS.d.ts} +136 -66
- package/dist/types-chunks/{capability-learning.d-gRtO03f6.d.ts → capability-learning.d-B4pxKwP4.d.ts} +1 -1
- package/dist/types-chunks/{capability.d-Ch5Vos33.d.ts → capability.d-DOF3r0fJ.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-Dj1n6s0Y.d.ts → capsule.d-B4atvlxE.d.ts} +7 -19
- package/dist/types-chunks/client-contract-A1jdk6xz.d.ts +1993 -0
- package/dist/types-chunks/{controller.d-C0IM1Tud.d.ts → controller.d-BkUJ_3sl.d.ts} +1 -1
- package/dist/types-chunks/{controller.d-J2t1q8Ly.d.ts → controller.d-yyKajPTi.d.ts} +140 -1380
- package/dist/types-chunks/{cost-tracker.d-BWI4lFWn.d.ts → cost-tracker.d-BeaenODW.d.ts} +2 -47
- package/dist/types-chunks/{history-retrieval.d-CPN5PMBV.d.ts → history-retrieval.d-JdFfkeF3.d.ts} +2 -2
- package/dist/types-chunks/{manager.d-rtmywU9M.d.ts → manager.d-C_20XqCV.d.ts} +8 -1
- package/dist/types-chunks/manifest.d-Bw2i-zQi.d.ts +18 -0
- package/dist/types-chunks/provider-credential-context.d-BH2OaB1b.d.ts +47 -0
- package/dist/types-chunks/provider-request-observation.d-jL8T6wVO.d.ts +34 -0
- package/dist/types-chunks/{public-api.d-amBop8Nk.d.ts → public-api.d-Cq8ILMte.d.ts} +52 -13
- package/dist/types-chunks/{resolver.d-BrwLoWNr.d.ts → resolver.d-DLY01RHx.d.ts} +4 -2
- package/dist/types-chunks/{types.d-CSv0_cZC.d.ts → review-inbox.d-BeaLRNHx.d.ts} +251 -3
- package/dist/types-chunks/{shell-command-sets.d-oejwpP_7.d.ts → review-packet.d-D4bbTbq3.d.ts} +46 -3
- package/dist/types-chunks/{exec-policy.d-BPESl90L.d.ts → run-manager.d-C7Q71rin.d.ts} +385 -62
- package/dist/types-chunks/runtime-client-info-CxnlZlW5.d.ts +175 -0
- package/dist/types-chunks/{sdk-session-B6XjHNU1.d.ts → sdk-session-BDFjCpDn.d.ts} +12 -4
- package/dist/types-chunks/{side-query.d-DHWG1JZg.d.ts → side-query.d-DTrhVd_r.d.ts} +4 -3
- package/dist/types-chunks/trusted-repl-entry-vbUM8R6P.d.ts +445 -0
- package/dist/types-chunks/{types.d-CtO8mR1s.d.ts → types.d-BJTN-RZr.d.ts} +5 -5
- package/dist/types-chunks/{types.d-BrQMB-hy.d.ts → types.d-BjOq57-z.d.ts} +6 -0
- package/dist/types-chunks/types.d-o7t9dds4.d.ts +1484 -0
- package/dist/types-chunks/{utils.d-DcznBeQ3.d.ts → utils.d-CWiMhFfu.d.ts} +202 -36
- package/docs/CLIENT_CONTRACT.md +441 -0
- package/docs/SDK_MIGRATION.md +123 -0
- package/docs/SPACE_SDK_SEAMS.md +139 -0
- package/package.json +10 -5
- package/public_docs/README.md +12 -133
- package/public_docs/configuration/config-files.md +8 -14
- package/public_docs/sdk/embedder-guide.md +494 -420
- package/dist/chunks/argument-completer-FAIHW7HZ.js +0 -2
- package/dist/chunks/chunk-66XN5AFU.js +0 -417
- package/dist/chunks/chunk-7O2AIFNE.js +0 -373
- package/dist/chunks/chunk-DSXUXUZG.js +0 -5
- package/dist/chunks/chunk-GYO73UYQ.js +0 -275
- package/dist/chunks/chunk-HPCS3LZ5.js +0 -324
- package/dist/chunks/chunk-HZYRLIOC.js +0 -137
- package/dist/chunks/chunk-SC2ELSUS.js +0 -675
- package/dist/chunks/chunk-TEUD5VPJ.js +0 -471
- package/dist/chunks/chunk-TYZ2ZAYL.js +0 -487
- package/dist/chunks/dist-3UCCMCYR.js +0 -2
- package/dist/chunks/dist-F5IWZSAY.js +0 -2
- package/dist/chunks/host-W2JJ3V3Q.js +0 -2
- package/dist/chunks/run-manager-RBWU3EVE.js +0 -2
- package/dist/chunks/utils-DJ4ZFJGL.js +0 -2
- package/dist/runtime-worker.js +0 -5381
- package/dist/types-chunks/review-inbox.d-CTeUIKda.d.ts +0 -225
- package/dist/types-chunks/run-manager.d-hm1XgEou.d.ts +0 -94
- package/dist/types-chunks/trusted-repl-entry-D0w5M0UZ.d.ts +0 -323
- package/dist/types-chunks/types.d-B1l9pWyX.d.ts +0 -146
package/dist/sdk-runtime.d.ts
CHANGED
|
@@ -1,27 +1,158 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
1
|
+
import { e as ClientCommandService, a4 as ClientReviewInput, d as ClientCommandResult, c as ClientCommandInput, ao as ClientStatisticsService, H as ClientLifecycleService, am as ClientSessionView, Y as ClientObserveOptions, W as ClientObservation, E as ClientItemReadOptions, D as ClientItemContent, v as ClientHistoryReadOptions, u as ClientHistoryPage, w as ClientHistorySearchInput, x as ClientHistorySearchResult, K as ClientLineageSummary, j as ClientCreateSessionInput, aa as ClientSession, ae as ClientSessionFilter, al as ClientSessionSummary, ap as ClientSubmitInput, y as ClientInputAcceptance, z as ClientInteraction, A as ClientInteractionResponse, B as ClientInteractionResult, V as ClientModelSelection, a as ClientCapabilityProbeResult, a1 as ClientProviderInfo } from './types-chunks/client-contract-A1jdk6xz.js';
|
|
2
|
+
import { h as RuntimeExecutionAuthorization, R as RuntimeClientInfo, b as RuntimeCredentialBinding, f as RuntimeCredentialService, o as RuntimeHostToolService, g as RuntimeDaemonClientType } from './types-chunks/runtime-client-info-CxnlZlW5.js';
|
|
3
|
+
export { c as RuntimeCredentialBroker, d as RuntimeCredentialLease, e as RuntimeCredentialRequest, i as RuntimeHostToolDescriptor, j as RuntimeHostToolHandler, k as RuntimeHostToolInvocation, l as RuntimeHostToolInvocationStatus, m as RuntimeHostToolLease, n as RuntimeHostToolResult, p as RuntimeScopedCredentialBroker, q as RuntimeScopedCredentialPurpose, r as RuntimeScopedCredentialRequest, s as RuntimeScopedCredentialTarget } from './types-chunks/runtime-client-info-CxnlZlW5.js';
|
|
4
|
+
import { b9 as MemoryManagementController, by as PendingEpisodeReviewSummary, af as KodaXGoalState, aa as KodaXExtensionSessionRecord, w as AgentExecutionKind, N as AgentTreeSnapshot, s as AgentDetail, M as AgentSpawnInput, Q as AgentTurnRef, r as AgentDataClassification, y as AgentFollowupResult, I as AgentOutput, t as AgentEvent } from './types-chunks/review-inbox.d-BeaLRNHx.js';
|
|
5
|
+
import { G as KodaXReasoningMode, d as KodaXCustomProviderConfig } from './types-chunks/types.d-BjOq57-z.js';
|
|
6
|
+
export { k as KodaXMessage } from './types-chunks/types.d-BjOq57-z.js';
|
|
7
|
+
import { b as KodaXContextOverflowFacts } from './types-chunks/base.d-ZBOdjDUT.js';
|
|
8
|
+
import { j as AgentDispatchContext, aN as LearningQuery, aM as LearningPage, ax as LearnedCapabilityRecord, aP as LearningSurfaceSnapshot, aI as LearningEvent, aO as LearningSubscribeOptions, s as AgentExecutorFactory, k as AgentDispatchPolicy, i as AgentCredentialBroker, b as AgentArtifactPolicy, ak as KodaXImageInputArtifact, an as KodaXInputArtifactSource, ao as KodaXVideoInputArtifact, bt as WorkflowProcessSnapshot, bm as WorkflowProcessEvent, K as AgentRegistrationService, ac as DispatchableAgentQuery, aa as DispatchableAgentListing, G as AgentPreflightInput, H as AgentPreflightResult } from './types-chunks/types.d-o7t9dds4.js';
|
|
9
|
+
import { h as SkillHooks, i as SkillMetadata } from './types-chunks/types.d-Cb8RdrjU.js';
|
|
8
10
|
import { a as McpServerConfig } from './types-chunks/config.d-CJy1WENT.js';
|
|
9
|
-
import { t as McpServerStatus, u as McpServerToolList } from './types-chunks/manager.d-
|
|
10
|
-
import { K as KodaXSessionHistoryHit } from './types-chunks/history-retrieval.d-
|
|
11
|
-
import {
|
|
12
|
-
import { L as LoadedExtensionDiagnostic, v as ExtensionRuntimeDiagnostics } from './types-chunks/types.d-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { n as FullTranscriptSessionData, ak as SessionTranscriptEntry, a5 as SessionConversationHistoryData, a9 as SessionConversationHistoryStatus, a7 as SessionConversationHistoryIssue, a6 as SessionConversationHistoryEntry, e as CompactSessionResult } from './types-chunks/public-api.d-
|
|
11
|
+
import { t as McpServerStatus, u as McpServerToolList } from './types-chunks/manager.d-C_20XqCV.js';
|
|
12
|
+
import { K as KodaXSessionHistoryHit } from './types-chunks/history-retrieval.d-JdFfkeF3.js';
|
|
13
|
+
import { aP as KodaXSkillInvocationContext, aa as KodaXOptions, aB as KodaXShellExecutionContract, W as KodaXExecutionFailure, af as KodaXOutputSegmentProjection, ba as KodaXToolSandboxObservationUpdate, b8 as KodaXToolEventMeta, a3 as KodaXManagedTaskStatusEvent, V as KodaXEvents, at as KodaXResult, S as KodaXContextOptions, ai as KodaXOutputSegmentStarted, K as KodaXActivityEventMeta, bl as KodaXTurnStartedEvent, bi as KodaXTurnCompletedEvent, bk as KodaXTurnFailedEvent, bP as RuntimeContextBudgetSnapshot, al as KodaXPromptCacheDiagnosticEvent, bW as RuntimeToolExposurePlan, _ as KodaXLiveEventMeta, N as KodaXCompactionEndResult, bM as RuntimeCompactionSkippedEvent, Q as KodaXContextCompactionFinishedEvent, R as KodaXContextIdentity } from './types-chunks/bash-prefix-extractor.d-DvswAXKS.js';
|
|
14
|
+
import { L as LoadedExtensionDiagnostic, v as ExtensionRuntimeDiagnostics } from './types-chunks/types.d-BJTN-RZr.js';
|
|
15
|
+
import { W as ExecPolicyRuleInput, h as AutoModeDecisionDiagnostics, r as AutoModeStats, a4 as ManagedWorkflowSnapshot, al as WorkflowRunProcessMetadata } from './types-chunks/run-manager.d-C7Q71rin.js';
|
|
16
|
+
import { Y as saveConfig, d as CommandInfo } from './types-chunks/utils.d-CWiMhFfu.js';
|
|
17
|
+
import { n as FullTranscriptSessionData, ak as SessionTranscriptEntry, a5 as SessionConversationHistoryData, a9 as SessionConversationHistoryStatus, a7 as SessionConversationHistoryIssue, a6 as SessionConversationHistoryEntry, e as CompactSessionResult } from './types-chunks/public-api.d-Cq8ILMte.js';
|
|
18
|
+
import './types-chunks/provider-request-observation.d-jL8T6wVO.js';
|
|
19
|
+
import './types-chunks/provider-credential-context.d-BH2OaB1b.js';
|
|
20
|
+
import './types-chunks/capability.d-DOF3r0fJ.js';
|
|
16
21
|
import 'vscode-languageserver-protocol';
|
|
17
|
-
import './types-chunks/
|
|
22
|
+
import './types-chunks/controller.d-yyKajPTi.js';
|
|
18
23
|
import 'node:child_process';
|
|
24
|
+
import './types-chunks/cost-tracker.d-BeaenODW.js';
|
|
19
25
|
import './types-chunks/types-DDJu9iWX.js';
|
|
20
|
-
import './types-chunks/
|
|
21
|
-
import './types-chunks/
|
|
26
|
+
import './types-chunks/side-query.d-DTrhVd_r.js';
|
|
27
|
+
import './types-chunks/manifest.d-Bw2i-zQi.js';
|
|
22
28
|
import 'readline';
|
|
23
29
|
import 'child_process';
|
|
24
30
|
|
|
31
|
+
interface RuntimeBuildIdentity {
|
|
32
|
+
readonly origin: string;
|
|
33
|
+
readonly fingerprint: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type RuntimePreparedReview = {
|
|
37
|
+
readonly kind: "prepared";
|
|
38
|
+
readonly invocation: {
|
|
39
|
+
readonly prompt: string;
|
|
40
|
+
readonly source: "prompt";
|
|
41
|
+
readonly displayName: string;
|
|
42
|
+
};
|
|
43
|
+
} | {
|
|
44
|
+
readonly kind: "workflow";
|
|
45
|
+
readonly workflow: {
|
|
46
|
+
readonly request: string;
|
|
47
|
+
readonly displayName: string;
|
|
48
|
+
readonly builtinName: "scoped-review";
|
|
49
|
+
readonly builtinArgs: Record<string, unknown>;
|
|
50
|
+
};
|
|
51
|
+
} | {
|
|
52
|
+
readonly kind: "empty";
|
|
53
|
+
} | {
|
|
54
|
+
readonly kind: "error";
|
|
55
|
+
readonly message: string;
|
|
56
|
+
};
|
|
57
|
+
type RuntimePreparedAgentsLean = {
|
|
58
|
+
readonly kind: "prepared";
|
|
59
|
+
readonly invocation: {
|
|
60
|
+
readonly prompt: string;
|
|
61
|
+
readonly source: "prompt";
|
|
62
|
+
readonly displayName: string;
|
|
63
|
+
};
|
|
64
|
+
} | {
|
|
65
|
+
readonly kind: "missing";
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
interface RuntimePreparedSkillInvocation {
|
|
69
|
+
readonly prompt: string;
|
|
70
|
+
readonly source: "skill";
|
|
71
|
+
readonly displayName: string;
|
|
72
|
+
readonly path: string;
|
|
73
|
+
readonly disableModelInvocation?: boolean;
|
|
74
|
+
readonly allowedTools?: string;
|
|
75
|
+
readonly context?: "fork";
|
|
76
|
+
readonly agent?: string;
|
|
77
|
+
readonly argumentHint?: string;
|
|
78
|
+
readonly model?: string;
|
|
79
|
+
readonly hooks?: SkillHooks;
|
|
80
|
+
readonly skillInvocation: Omit<KodaXSkillInvocationContext, "runtimePolicy"> & {
|
|
81
|
+
readonly runtimePolicy: {
|
|
82
|
+
readonly enforceAtRuntime: true;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
type RuntimePreparedSkill = {
|
|
87
|
+
readonly kind: "prepared";
|
|
88
|
+
readonly invocation: RuntimePreparedSkillInvocation;
|
|
89
|
+
} | {
|
|
90
|
+
readonly kind: "unknown";
|
|
91
|
+
};
|
|
92
|
+
/** FEATURE_298 T37 — discovered prompt-command preparation projection. */
|
|
93
|
+
interface RuntimePreparedCommandInvocation {
|
|
94
|
+
readonly prompt: string;
|
|
95
|
+
readonly source: "prompt";
|
|
96
|
+
readonly displayName: string;
|
|
97
|
+
readonly path?: string;
|
|
98
|
+
readonly disableModelInvocation?: boolean;
|
|
99
|
+
readonly userInvocable?: boolean;
|
|
100
|
+
readonly allowedTools?: string;
|
|
101
|
+
readonly context?: "fork";
|
|
102
|
+
readonly agent?: string;
|
|
103
|
+
readonly argumentHint?: string;
|
|
104
|
+
readonly model?: string;
|
|
105
|
+
readonly hooks?: SkillHooks;
|
|
106
|
+
readonly frontmatter?: Record<string, unknown>;
|
|
107
|
+
}
|
|
108
|
+
type RuntimePreparedCommand = {
|
|
109
|
+
readonly kind: "prepared";
|
|
110
|
+
readonly invocation: RuntimePreparedCommandInvocation;
|
|
111
|
+
}
|
|
112
|
+
/** Registry-known non-prompt commands have no discovered prompt to prepare. */
|
|
113
|
+
| {
|
|
114
|
+
readonly kind: "local";
|
|
115
|
+
} | {
|
|
116
|
+
readonly kind: "unknown";
|
|
117
|
+
};
|
|
118
|
+
interface RuntimeInvocationService {
|
|
119
|
+
prepareSkill(input: {
|
|
120
|
+
readonly projectRoot: string;
|
|
121
|
+
readonly name: string;
|
|
122
|
+
readonly argumentsText?: string;
|
|
123
|
+
readonly sessionId?: string;
|
|
124
|
+
}, options?: {
|
|
125
|
+
readonly signal?: AbortSignal;
|
|
126
|
+
}): Promise<RuntimePreparedSkill>;
|
|
127
|
+
prepareCommand(input: {
|
|
128
|
+
readonly projectRoot: string;
|
|
129
|
+
readonly name: string;
|
|
130
|
+
}): Promise<RuntimePreparedCommand>;
|
|
131
|
+
/** FEATURE_298 T37 — /review preparation (git capture + packets Host-side). */
|
|
132
|
+
prepareReview(input: {
|
|
133
|
+
readonly projectRoot: string;
|
|
134
|
+
readonly sessionId: string;
|
|
135
|
+
readonly args: readonly string[];
|
|
136
|
+
}): Promise<RuntimePreparedReview>;
|
|
137
|
+
/** FEATURE_298 T37 — /agents lean prompt preparation. */
|
|
138
|
+
prepareAgentsLean(input: {
|
|
139
|
+
readonly projectRoot: string;
|
|
140
|
+
}): Promise<RuntimePreparedAgentsLean>;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
interface RuntimeProductCommandService {
|
|
144
|
+
readCommandPrompt: ClientCommandService['readPrompt'];
|
|
145
|
+
startReview(input: ClientReviewInput & {
|
|
146
|
+
readonly authorization?: RuntimeExecutionAuthorization;
|
|
147
|
+
}): Promise<ClientCommandResult>;
|
|
148
|
+
startAgentsLean(input: Omit<ClientReviewInput, 'args'> & {
|
|
149
|
+
readonly authorization?: RuntimeExecutionAuthorization;
|
|
150
|
+
}): Promise<ClientCommandResult>;
|
|
151
|
+
executeCommand(input: ClientCommandInput & {
|
|
152
|
+
readonly authorization?: RuntimeExecutionAuthorization;
|
|
153
|
+
}): Promise<ClientCommandResult>;
|
|
154
|
+
}
|
|
155
|
+
|
|
25
156
|
type RuntimePermissionHostPlatform = 'win32' | 'posix';
|
|
26
157
|
interface RuntimePermissionMatcherBase {
|
|
27
158
|
readonly version: 1;
|
|
@@ -164,12 +295,16 @@ interface RuntimeAgentBindingService {
|
|
|
164
295
|
closeOwnerSession(ownerSessionId: string): Promise<void>;
|
|
165
296
|
}
|
|
166
297
|
|
|
298
|
+
interface RuntimeLearningSubscription extends AsyncIterableIterator<LearningEvent> {
|
|
299
|
+
/** Registration only; read a snapshot after awaiting ready. */
|
|
300
|
+
readonly ready: Promise<void>;
|
|
301
|
+
}
|
|
167
302
|
interface RuntimeLearningService {
|
|
168
303
|
list(query?: LearningQuery): Promise<LearningPage>;
|
|
169
304
|
get(nameOrSlugOrId: string): Promise<LearnedCapabilityRecord>;
|
|
170
305
|
getSnapshot(): Promise<LearningSurfaceSnapshot>;
|
|
171
306
|
events(afterRevision?: number): Promise<readonly LearningEvent[]>;
|
|
172
|
-
subscribe(options?: LearningSubscribeOptions):
|
|
307
|
+
subscribe(options?: LearningSubscribeOptions): RuntimeLearningSubscription;
|
|
173
308
|
acknowledge(nameOrSlugOrId: string): Promise<void>;
|
|
174
309
|
snooze(nameOrSlugOrId: string, until: string): Promise<void>;
|
|
175
310
|
reject(nameOrSlugOrId: string): Promise<void>;
|
|
@@ -180,18 +315,55 @@ interface RuntimeLearningService {
|
|
|
180
315
|
trust(nameOrSlugOrId: string): Promise<void>;
|
|
181
316
|
}
|
|
182
317
|
|
|
318
|
+
/**
|
|
319
|
+
* FEATURE_298 T36 — the Host-owned Memory management surface. Callers name a
|
|
320
|
+
* project root; the Host derives the Memory identity itself (the same
|
|
321
|
+
* derivation the run path uses) and owns the storage root, the control
|
|
322
|
+
* plane, index rebuilds, and open-target resolution. The UI keeps only
|
|
323
|
+
* presentation and the editor launch.
|
|
324
|
+
*/
|
|
325
|
+
interface RuntimeMemoryRebuildResult {
|
|
326
|
+
readonly status: "missing-dir" | "no-topics" | "rebuilt";
|
|
327
|
+
readonly memoryRoot: string;
|
|
328
|
+
readonly entrypointPath: string;
|
|
329
|
+
readonly entryCount: number;
|
|
330
|
+
readonly malformedFiles: readonly string[];
|
|
331
|
+
readonly warnings: readonly string[];
|
|
332
|
+
}
|
|
333
|
+
type RuntimeMemoryController = Pick<MemoryManagementController, "listInbox" | "showProposal" | "approveProposal" | "rejectProposal" | "listRefs" | "readRef" | "remember" | "forgetRef">;
|
|
334
|
+
interface RuntimeMemoryPlane {
|
|
335
|
+
readonly controller: RuntimeMemoryController;
|
|
336
|
+
readonly memoryRoot: string;
|
|
337
|
+
readonly entrypointPath: string;
|
|
338
|
+
/** Pending episode reviews for the identities this project actually reads. */
|
|
339
|
+
listReviews(): Promise<readonly PendingEpisodeReviewSummary[]>;
|
|
340
|
+
/** Whether the Host's Memory reviewer Provider is usable. */
|
|
341
|
+
reviewerProviderConfigured(): boolean;
|
|
342
|
+
/** Rebuild the derived MEMORY.md index; topic files are never modified. */
|
|
343
|
+
rebuild(): Promise<RuntimeMemoryRebuildResult>;
|
|
344
|
+
/**
|
|
345
|
+
* Validate a `/memory open` target against the project memory root
|
|
346
|
+
* (mkdir of the untouched root is Host-owned; realpath containment blocks
|
|
347
|
+
* escapes). The editor launch itself stays in the UI.
|
|
348
|
+
*/
|
|
349
|
+
ensureOpenTarget(targetPath: string): Promise<string>;
|
|
350
|
+
}
|
|
351
|
+
interface RuntimeMemoryService {
|
|
352
|
+
forProject(projectRoot: string): RuntimeMemoryPlane | Promise<RuntimeMemoryPlane>;
|
|
353
|
+
}
|
|
354
|
+
|
|
183
355
|
declare const KODAX_DAEMON_PROTOCOL = "kodax-runtime-daemon";
|
|
184
356
|
declare const KODAX_DAEMON_PROTOCOL_VERSION = 1;
|
|
185
|
-
type RuntimeDaemonMethod = 'initialize' | 'runtime.initialize' | 'ping' | 'runtime.identity' | 'runtime.status' | 'runtime.shutdown' | '
|
|
186
|
-
type RuntimeDaemonRetiredMethod = 'agentTasks.list' | 'agentTasks.start' | 'agentTasks.get' | 'agentTasks.events' | 'agentTasks.wait' | 'agentTasks.sendInput' | 'agentTasks.cancel' | 'agentTasks.reconcile';
|
|
357
|
+
type RuntimeDaemonMethod = 'initialize' | 'runtime.initialize' | 'ping' | 'runtime.identity' | 'runtime.status' | 'runtime.shutdown' | 'client.exit.request' | 'client.exit.read' | 'client.exit.pending' | 'session.facts.read' | 'session.facts.requests' | 'session.facts.tools' | 'runtime.capabilities' | 'daemon.status' | 'daemon.stop' | 'daemon.logs' | 'daemon.preflight' | 'daemon.management.get' | 'session.create' | 'session.load' | 'session.list' | 'session.status' | 'session.transcript' | 'session.transcript.page' | 'session.transcript.entryChunk' | 'session.transcript.search' | 'session.conversation' | 'session.conversation.page' | 'session.conversation.entryChunk' | 'session.observe' | 'session.view.observe' | 'session.view.close' | 'session.view.item' | 'session.diagnostics' | 'session.fork' | 'session.recover' | 'session.notice.append' | 'session.goal.get' | 'session.lineage.get' | 'session.lineage.label' | 'session.goal.create' | 'session.goal.pause' | 'session.goal.resume' | 'session.goal.clear' | 'session.rewind' | 'session.identityAlias.confirm' | 'session.active_entry.set' | 'session.activeEntry.set' | 'session.compact' | 'session.archive' | 'session.unarchive' | 'session.cancel' | 'session.delete' | 'session.settings.get' | 'session.settings.getVersioned' | 'session.autoMode.getStats' | 'session.settings.update' | 'session.settings.updateVersioned' | 'input.submit' | 'input.withdraw' | 'run.start' | 'run.input.submit' | 'input.read' | 'run.get' | 'run.list' | 'run.await' | 'run.abort' | 'run.model.set' | 'run.provider.set' | 'run.reasoning.set' | 'run.setModel' | 'run.setProvider' | 'run.setReasoning' | 'request.cancel' | 'request.ack' | 'subscription.close' | 'permission.grants.list' | 'permission.grants.revoke' | 'interaction.list' | 'interaction.respond' | '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' | 'workflow.start' | 'learning.list' | 'learning.get' | 'learning.snapshot' | 'learning.events' | 'learning.subscribe' | 'learning.unsubscribe' | 'learning.acknowledge' | 'learning.snooze' | 'learning.reject' | 'learning.disable' | 'learning.rollback' | 'learning.promote' | 'learning.review' | 'learning.trust' | 'config.read' | 'config.effective' | 'config.patch' | 'config.reload' | 'model.list' | 'provider.list' | 'provider.reasoning.efforts' | 'provider.reasoning.probe' | 'provider.capabilities.forget' | 'provider.custom.list' | 'provider.custom.upsert' | 'provider.custom.remove' | 'mcp.server.list' | 'mcp.server.status' | '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' | 'memory.describe' | 'memory.listReviews' | 'memory.listInbox' | 'memory.showProposal' | 'memory.listRefs' | 'memory.readRef' | 'memory.remember' | 'memory.forgetRef' | 'memory.approveProposal' | 'memory.rejectProposal' | 'memory.rebuild' | 'memory.ensureOpenTarget' | 'invocations.prepareSkill' | 'invocations.prepareCommand' | 'invocations.readCommandPrompt' | 'invocations.executeCommand' | 'invocations.startReview' | 'invocations.startAgentsLean' | 'invocations.prepareReview' | 'invocations.prepareAgentsLean' | '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';
|
|
358
|
+
type RuntimeDaemonRetiredMethod = 'permission.request' | 'permission.list' | 'permission.listPending' | 'permission.respond' | 'user_input.listPending' | 'user_input.respond' | 'user_input.dismiss' | 'agentTasks.list' | 'agentTasks.start' | 'agentTasks.get' | 'agentTasks.events' | 'agentTasks.wait' | 'agentTasks.sendInput' | 'agentTasks.cancel' | 'agentTasks.reconcile';
|
|
187
359
|
type RuntimeDaemonWireMethod = RuntimeDaemonMethod | RuntimeDaemonRetiredMethod;
|
|
188
|
-
type RuntimeDaemonNotificationMethod = 'event' | 'observation.invalidated' | 'credential.request' | 'host_tool.invoke' | 'runtime.warning';
|
|
360
|
+
type RuntimeDaemonNotificationMethod = 'subscription.error' | 'session.view' | 'event' | 'observation.invalidated' | 'credential.request' | 'host_tool.invoke' | 'runtime.warning';
|
|
189
361
|
interface RuntimeDaemonError {
|
|
190
362
|
readonly code: RuntimeDaemonErrorCode;
|
|
191
363
|
readonly message: string;
|
|
192
364
|
readonly data?: unknown;
|
|
193
365
|
}
|
|
194
|
-
type RuntimeDaemonErrorCode = 'invalid_frame' | 'invalid_request' | 'invalid_params' | 'not_initialized' | 'method_not_found' | 'unauthorized' | 'permission_denied' | 'conflict' | 'not_found' | 'session_not_admitted' | 'cancelled' | 'overloaded' | 'client_upgrade_required' | '
|
|
366
|
+
type RuntimeDaemonErrorCode = 'invalid_frame' | 'invalid_request' | 'invalid_params' | 'not_initialized' | 'method_not_found' | 'unauthorized' | 'permission_denied' | 'conflict' | 'not_found' | 'session_not_admitted' | 'cancelled' | 'overloaded' | 'client_upgrade_required' | 'resync_required' | 'read_timeout' | 'read_cancelled' | 'data_changed' | 'observation_invalidated' | 'runtime_changed' | 'data_corrupt' | 'version_incompatible' | 'credential_unavailable' | 'host_tool_unavailable' | 'host_tool_unknown' | 'internal_error';
|
|
195
367
|
interface RuntimeDaemonFrameBase {
|
|
196
368
|
readonly protocol: typeof KODAX_DAEMON_PROTOCOL;
|
|
197
369
|
readonly version: typeof KODAX_DAEMON_PROTOCOL_VERSION;
|
|
@@ -201,11 +373,6 @@ interface RuntimeDaemonRequest<Method extends RuntimeDaemonWireMethod = RuntimeD
|
|
|
201
373
|
readonly id: string;
|
|
202
374
|
readonly method: Method;
|
|
203
375
|
readonly params?: unknown;
|
|
204
|
-
readonly operation?: RuntimeDaemonOperationEnvelope;
|
|
205
|
-
}
|
|
206
|
-
interface RuntimeDaemonOperationEnvelope {
|
|
207
|
-
readonly operationId: string;
|
|
208
|
-
readonly journalEpoch: string;
|
|
209
376
|
}
|
|
210
377
|
interface RuntimeDaemonSuccessResponse extends RuntimeDaemonFrameBase {
|
|
211
378
|
readonly kind: 'response';
|
|
@@ -226,14 +393,13 @@ type RuntimeDaemonFrame = RuntimeDaemonRequest<RuntimeDaemonWireMethod> | Runtim
|
|
|
226
393
|
declare const RUNTIME_DAEMON_METHODS: readonly RuntimeDaemonMethod[];
|
|
227
394
|
|
|
228
395
|
interface RuntimeDaemonClientTransport {
|
|
229
|
-
request(method: RuntimeDaemonMethod, params?: unknown,
|
|
396
|
+
request(method: RuntimeDaemonMethod, params?: unknown, control?: RuntimeDaemonRequestControl): Promise<unknown>;
|
|
230
397
|
subscribe(listener: (notification: RuntimeDaemonNotification) => void): RuntimeSubscription;
|
|
231
398
|
subscribeLifecycle?(listener: (state: RuntimeDaemonTransportLifecycleState) => void): RuntimeSubscription;
|
|
232
399
|
close?(): Promise<void> | void;
|
|
233
400
|
}
|
|
234
401
|
interface RuntimeDaemonRequestControl {
|
|
235
402
|
readonly signal?: AbortSignal;
|
|
236
|
-
readonly onLateResult?: (value: unknown) => void;
|
|
237
403
|
}
|
|
238
404
|
/** Factual state for one daemon connection; disconnected does not imply daemon crash. */
|
|
239
405
|
interface RuntimeDaemonTransportLifecycleState {
|
|
@@ -266,20 +432,6 @@ interface RuntimeDaemonShutdownOutcome {
|
|
|
266
432
|
readonly completedAt: string;
|
|
267
433
|
readonly error?: string;
|
|
268
434
|
}
|
|
269
|
-
interface RuntimeDaemonLockOwner {
|
|
270
|
-
readonly runtimeId: string;
|
|
271
|
-
readonly pid: number;
|
|
272
|
-
readonly createdAt: string;
|
|
273
|
-
readonly kind?: 'daemon' | 'inline';
|
|
274
|
-
/** OS-issued identity used to distinguish a live owner from PID reuse. */
|
|
275
|
-
readonly processStartIdentity?: string;
|
|
276
|
-
/** Present when the daemon was assigned to a Windows Job before user code could start. */
|
|
277
|
-
readonly processContainment?: 'windows-job';
|
|
278
|
-
/** Process outside the Job whose exit proves that the Job became empty. */
|
|
279
|
-
readonly supervisorPid?: number;
|
|
280
|
-
/** OS-issued identity that distinguishes the original supervisor from PID reuse. */
|
|
281
|
-
readonly supervisorProcessStartIdentity?: string;
|
|
282
|
-
}
|
|
283
435
|
|
|
284
436
|
interface RuntimeDaemonShutdownVerificationOwner {
|
|
285
437
|
readonly runtimeId: string;
|
|
@@ -314,71 +466,6 @@ type RuntimeDaemonShutdownVerification = {
|
|
|
314
466
|
*/
|
|
315
467
|
declare function waitForRuntimeDaemonShutdown(input: RuntimeDaemonShutdownVerificationInput): Promise<RuntimeDaemonShutdownVerification>;
|
|
316
468
|
|
|
317
|
-
type RuntimeExitSettlementBlockReason = 'active_work' | 'cleanup_failed' | 'cleanup_unverified' | 'containment_active' | 'containment_unavailable' | 'owner_changed' | 'owner_identity_mismatch' | 'owner_unverified' | 'stop_not_accepted';
|
|
318
|
-
type RuntimeExitSettlement = {
|
|
319
|
-
readonly status: 'clean' | 'recovered';
|
|
320
|
-
readonly repairs: readonly ('windows_process_tree' | 'windows_sandbox_acl')[];
|
|
321
|
-
} | {
|
|
322
|
-
readonly status: 'blocked';
|
|
323
|
-
readonly reason: RuntimeExitSettlementBlockReason;
|
|
324
|
-
readonly nextAction: 'keep-open' | 'relaunch-space' | 'retry-automatically' | 'restart-system' | 'manual-recovery';
|
|
325
|
-
readonly message: string;
|
|
326
|
-
};
|
|
327
|
-
interface RuntimeExitSettlementOwnerPolicy {
|
|
328
|
-
readonly mode: 'daemon' | 'inline';
|
|
329
|
-
readonly revision: number;
|
|
330
|
-
readonly updatedAt: string;
|
|
331
|
-
}
|
|
332
|
-
interface RuntimeExitSettlementRuntime {
|
|
333
|
-
readonly identity: {
|
|
334
|
-
readonly runtimeId: string;
|
|
335
|
-
readonly mode: string;
|
|
336
|
-
};
|
|
337
|
-
readonly daemon: {
|
|
338
|
-
inspect(): Promise<{
|
|
339
|
-
readonly runtimeId: string;
|
|
340
|
-
readonly revision: number;
|
|
341
|
-
readonly ownerPolicy: RuntimeExitSettlementOwnerPolicy;
|
|
342
|
-
readonly owner: RuntimeDaemonLockOwner;
|
|
343
|
-
readonly preflight: {
|
|
344
|
-
readonly blockers: readonly string[];
|
|
345
|
-
readonly canStop: boolean;
|
|
346
|
-
};
|
|
347
|
-
}>;
|
|
348
|
-
stopForInline(input: {
|
|
349
|
-
readonly expectedRuntimeId: string;
|
|
350
|
-
readonly expectedRevision: number;
|
|
351
|
-
readonly expectedOwnerPolicyRevision: number;
|
|
352
|
-
readonly operation?: {
|
|
353
|
-
readonly operationId: string;
|
|
354
|
-
};
|
|
355
|
-
}): Promise<{
|
|
356
|
-
readonly accepted: true;
|
|
357
|
-
}>;
|
|
358
|
-
};
|
|
359
|
-
close(): Promise<void>;
|
|
360
|
-
}
|
|
361
|
-
interface RuntimeExitSettlementInput {
|
|
362
|
-
readonly configHome: string;
|
|
363
|
-
readonly profile?: string;
|
|
364
|
-
readonly runtime?: RuntimeExitSettlementRuntime;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
interface RuntimeWorkerResourceLimits {
|
|
368
|
-
readonly maxOldGenerationSizeMb?: number;
|
|
369
|
-
readonly maxYoungGenerationSizeMb?: number;
|
|
370
|
-
readonly stackSizeMb?: number;
|
|
371
|
-
}
|
|
372
|
-
interface RuntimeWorkerOptions {
|
|
373
|
-
readonly resourceLimits?: RuntimeWorkerResourceLimits;
|
|
374
|
-
readonly shutdownTimeoutMs?: number;
|
|
375
|
-
/**
|
|
376
|
-
* Load `<homeDir>/.kodax/integrations/a2a.json` inside the Worker owner.
|
|
377
|
-
* Defaults to false so SDK hosts explicitly opt into ambient user integration.
|
|
378
|
-
*/
|
|
379
|
-
readonly configuredA2A?: boolean;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
469
|
interface RuntimeDaemonEndpoint {
|
|
383
470
|
readonly kind: 'pipe' | 'unix';
|
|
384
471
|
readonly path: string;
|
|
@@ -443,35 +530,51 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
443
530
|
params: RuntimeDaemonJsonSchema;
|
|
444
531
|
result: RuntimeDaemonJsonSchema;
|
|
445
532
|
};
|
|
446
|
-
'
|
|
533
|
+
'client.exit.request': {
|
|
447
534
|
params: RuntimeDaemonJsonSchema;
|
|
448
535
|
result: RuntimeDaemonJsonSchema;
|
|
449
536
|
};
|
|
450
|
-
'
|
|
537
|
+
'client.exit.read': {
|
|
451
538
|
params: RuntimeDaemonJsonSchema;
|
|
452
539
|
result: RuntimeDaemonJsonSchema;
|
|
453
540
|
};
|
|
454
|
-
'
|
|
541
|
+
'client.exit.pending': {
|
|
455
542
|
params: RuntimeDaemonJsonSchema;
|
|
456
543
|
result: RuntimeDaemonJsonSchema;
|
|
457
544
|
};
|
|
458
|
-
'
|
|
545
|
+
'session.facts.read': {
|
|
459
546
|
params: RuntimeDaemonJsonSchema;
|
|
460
547
|
result: RuntimeDaemonJsonSchema;
|
|
461
548
|
};
|
|
462
|
-
'
|
|
549
|
+
'session.facts.requests': {
|
|
463
550
|
params: RuntimeDaemonJsonSchema;
|
|
464
551
|
result: RuntimeDaemonJsonSchema;
|
|
465
552
|
};
|
|
466
|
-
'
|
|
553
|
+
'session.facts.tools': {
|
|
554
|
+
params: RuntimeDaemonJsonSchema;
|
|
555
|
+
result: RuntimeDaemonJsonSchema;
|
|
556
|
+
};
|
|
557
|
+
'runtime.capabilities': {
|
|
558
|
+
params: RuntimeDaemonJsonSchema;
|
|
559
|
+
result: RuntimeDaemonJsonSchema;
|
|
560
|
+
};
|
|
561
|
+
'daemon.status': {
|
|
467
562
|
params: RuntimeDaemonJsonSchema;
|
|
468
563
|
result: RuntimeDaemonJsonSchema;
|
|
469
564
|
};
|
|
470
|
-
'daemon.
|
|
565
|
+
'daemon.stop': {
|
|
471
566
|
params: RuntimeDaemonJsonSchema;
|
|
472
567
|
result: RuntimeDaemonJsonSchema;
|
|
473
568
|
};
|
|
474
|
-
'
|
|
569
|
+
'daemon.logs': {
|
|
570
|
+
params: RuntimeDaemonJsonSchema;
|
|
571
|
+
result: RuntimeDaemonJsonSchema;
|
|
572
|
+
};
|
|
573
|
+
'daemon.preflight': {
|
|
574
|
+
params: RuntimeDaemonJsonSchema;
|
|
575
|
+
result: RuntimeDaemonJsonSchema;
|
|
576
|
+
};
|
|
577
|
+
'daemon.management.get': {
|
|
475
578
|
params: RuntimeDaemonJsonSchema;
|
|
476
579
|
result: RuntimeDaemonJsonSchema;
|
|
477
580
|
};
|
|
@@ -511,6 +614,18 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
511
614
|
params: RuntimeDaemonJsonSchema;
|
|
512
615
|
result: RuntimeDaemonJsonSchema;
|
|
513
616
|
};
|
|
617
|
+
'session.view.observe': {
|
|
618
|
+
params: RuntimeDaemonJsonSchema;
|
|
619
|
+
result: RuntimeDaemonJsonSchema;
|
|
620
|
+
};
|
|
621
|
+
'session.view.close': {
|
|
622
|
+
params: RuntimeDaemonJsonSchema;
|
|
623
|
+
result: RuntimeDaemonJsonSchema;
|
|
624
|
+
};
|
|
625
|
+
'session.view.item': {
|
|
626
|
+
params: RuntimeDaemonJsonSchema;
|
|
627
|
+
result: RuntimeDaemonJsonSchema;
|
|
628
|
+
};
|
|
514
629
|
'session.conversation': {
|
|
515
630
|
params: RuntimeDaemonJsonSchema;
|
|
516
631
|
result: RuntimeDaemonJsonSchema;
|
|
@@ -531,6 +646,38 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
531
646
|
params: RuntimeDaemonJsonSchema;
|
|
532
647
|
result: RuntimeDaemonJsonSchema;
|
|
533
648
|
};
|
|
649
|
+
'session.recover': {
|
|
650
|
+
params: RuntimeDaemonJsonSchema;
|
|
651
|
+
result: RuntimeDaemonJsonSchema;
|
|
652
|
+
};
|
|
653
|
+
'session.goal.get': {
|
|
654
|
+
params: RuntimeDaemonJsonSchema;
|
|
655
|
+
result: RuntimeDaemonJsonSchema;
|
|
656
|
+
};
|
|
657
|
+
'session.lineage.get': {
|
|
658
|
+
params: RuntimeDaemonJsonSchema;
|
|
659
|
+
result: RuntimeDaemonJsonSchema;
|
|
660
|
+
};
|
|
661
|
+
'session.lineage.label': {
|
|
662
|
+
params: RuntimeDaemonJsonSchema;
|
|
663
|
+
result: RuntimeDaemonJsonSchema;
|
|
664
|
+
};
|
|
665
|
+
'session.goal.create': {
|
|
666
|
+
params: RuntimeDaemonJsonSchema;
|
|
667
|
+
result: RuntimeDaemonJsonSchema;
|
|
668
|
+
};
|
|
669
|
+
'session.goal.pause': {
|
|
670
|
+
params: RuntimeDaemonJsonSchema;
|
|
671
|
+
result: RuntimeDaemonJsonSchema;
|
|
672
|
+
};
|
|
673
|
+
'session.goal.resume': {
|
|
674
|
+
params: RuntimeDaemonJsonSchema;
|
|
675
|
+
result: RuntimeDaemonJsonSchema;
|
|
676
|
+
};
|
|
677
|
+
'session.goal.clear': {
|
|
678
|
+
params: RuntimeDaemonJsonSchema;
|
|
679
|
+
result: RuntimeDaemonJsonSchema;
|
|
680
|
+
};
|
|
534
681
|
'session.notice.append': {
|
|
535
682
|
params: RuntimeDaemonJsonSchema;
|
|
536
683
|
result: RuntimeDaemonJsonSchema;
|
|
@@ -587,6 +734,18 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
587
734
|
params: RuntimeDaemonJsonSchema;
|
|
588
735
|
result: RuntimeDaemonJsonSchema;
|
|
589
736
|
};
|
|
737
|
+
'input.submit': {
|
|
738
|
+
params: RuntimeDaemonJsonSchema;
|
|
739
|
+
result: RuntimeDaemonJsonSchema;
|
|
740
|
+
};
|
|
741
|
+
'input.withdraw': {
|
|
742
|
+
params: RuntimeDaemonJsonSchema;
|
|
743
|
+
result: RuntimeDaemonJsonSchema;
|
|
744
|
+
};
|
|
745
|
+
'input.read': {
|
|
746
|
+
params: RuntimeDaemonJsonSchema;
|
|
747
|
+
result: RuntimeDaemonJsonSchema;
|
|
748
|
+
};
|
|
590
749
|
'run.start': {
|
|
591
750
|
params: RuntimeDaemonJsonSchema;
|
|
592
751
|
result: RuntimeDaemonJsonSchema;
|
|
@@ -647,31 +806,7 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
647
806
|
params: RuntimeDaemonJsonSchema;
|
|
648
807
|
result: RuntimeDaemonJsonSchema;
|
|
649
808
|
};
|
|
650
|
-
'
|
|
651
|
-
params: RuntimeDaemonJsonSchema;
|
|
652
|
-
result: RuntimeDaemonJsonSchema;
|
|
653
|
-
};
|
|
654
|
-
'event.unsubscribe': {
|
|
655
|
-
params: RuntimeDaemonJsonSchema;
|
|
656
|
-
result: RuntimeDaemonJsonSchema;
|
|
657
|
-
};
|
|
658
|
-
'event.replay': {
|
|
659
|
-
params: RuntimeDaemonJsonSchema;
|
|
660
|
-
result: RuntimeDaemonJsonSchema;
|
|
661
|
-
};
|
|
662
|
-
'permission.list': {
|
|
663
|
-
params: RuntimeDaemonJsonSchema;
|
|
664
|
-
result: RuntimeDaemonJsonSchema;
|
|
665
|
-
};
|
|
666
|
-
'permission.listPending': {
|
|
667
|
-
params: RuntimeDaemonJsonSchema;
|
|
668
|
-
result: RuntimeDaemonJsonSchema;
|
|
669
|
-
};
|
|
670
|
-
'permission.request': {
|
|
671
|
-
params: RuntimeDaemonJsonSchema;
|
|
672
|
-
result: RuntimeDaemonJsonSchema;
|
|
673
|
-
};
|
|
674
|
-
'permission.respond': {
|
|
809
|
+
'subscription.close': {
|
|
675
810
|
params: RuntimeDaemonJsonSchema;
|
|
676
811
|
result: RuntimeDaemonJsonSchema;
|
|
677
812
|
};
|
|
@@ -683,15 +818,11 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
683
818
|
params: RuntimeDaemonJsonSchema;
|
|
684
819
|
result: RuntimeDaemonJsonSchema;
|
|
685
820
|
};
|
|
686
|
-
'
|
|
687
|
-
params: RuntimeDaemonJsonSchema;
|
|
688
|
-
result: RuntimeDaemonJsonSchema;
|
|
689
|
-
};
|
|
690
|
-
'user_input.respond': {
|
|
821
|
+
'interaction.list': {
|
|
691
822
|
params: RuntimeDaemonJsonSchema;
|
|
692
823
|
result: RuntimeDaemonJsonSchema;
|
|
693
824
|
};
|
|
694
|
-
'
|
|
825
|
+
'interaction.respond': {
|
|
695
826
|
params: RuntimeDaemonJsonSchema;
|
|
696
827
|
result: RuntimeDaemonJsonSchema;
|
|
697
828
|
};
|
|
@@ -755,6 +886,14 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
755
886
|
params: RuntimeDaemonJsonSchema;
|
|
756
887
|
result: RuntimeDaemonJsonSchema;
|
|
757
888
|
};
|
|
889
|
+
'learning.subscribe': {
|
|
890
|
+
params: RuntimeDaemonJsonSchema;
|
|
891
|
+
result: RuntimeDaemonJsonSchema;
|
|
892
|
+
};
|
|
893
|
+
'learning.unsubscribe': {
|
|
894
|
+
params: RuntimeDaemonJsonSchema;
|
|
895
|
+
result: RuntimeDaemonJsonSchema;
|
|
896
|
+
};
|
|
758
897
|
'workflow.pause': {
|
|
759
898
|
params: RuntimeDaemonJsonSchema;
|
|
760
899
|
result: RuntimeDaemonJsonSchema;
|
|
@@ -767,6 +906,12 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
767
906
|
params: RuntimeDaemonJsonSchema;
|
|
768
907
|
result: RuntimeDaemonJsonSchema;
|
|
769
908
|
};
|
|
909
|
+
'workflow.start': {
|
|
910
|
+
params: RuntimeDaemonJsonSchema;
|
|
911
|
+
result: {
|
|
912
|
+
oneOf: RuntimeDaemonJsonSchema[];
|
|
913
|
+
};
|
|
914
|
+
};
|
|
770
915
|
'learning.list': {
|
|
771
916
|
params: RuntimeDaemonJsonSchema;
|
|
772
917
|
result: RuntimeDaemonJsonSchema;
|
|
@@ -841,6 +986,21 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
841
986
|
params: RuntimeDaemonJsonSchema;
|
|
842
987
|
result: RuntimeDaemonJsonSchema;
|
|
843
988
|
};
|
|
989
|
+
'provider.reasoning.efforts': {
|
|
990
|
+
params: RuntimeDaemonJsonSchema;
|
|
991
|
+
result: {
|
|
992
|
+
type: "array";
|
|
993
|
+
items: RuntimeDaemonJsonSchema;
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
'provider.reasoning.probe': {
|
|
997
|
+
params: RuntimeDaemonJsonSchema;
|
|
998
|
+
result: RuntimeDaemonJsonSchema;
|
|
999
|
+
};
|
|
1000
|
+
'provider.capabilities.forget': {
|
|
1001
|
+
params: RuntimeDaemonJsonSchema;
|
|
1002
|
+
result: RuntimeDaemonJsonSchema;
|
|
1003
|
+
};
|
|
844
1004
|
'provider.custom.list': {
|
|
845
1005
|
params: RuntimeDaemonJsonSchema;
|
|
846
1006
|
result: RuntimeDaemonJsonSchema;
|
|
@@ -857,6 +1017,10 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
857
1017
|
params: RuntimeDaemonJsonSchema;
|
|
858
1018
|
result: RuntimeDaemonJsonSchema;
|
|
859
1019
|
};
|
|
1020
|
+
'mcp.server.status': {
|
|
1021
|
+
params: RuntimeDaemonJsonSchema;
|
|
1022
|
+
result: RuntimeDaemonJsonSchema;
|
|
1023
|
+
};
|
|
860
1024
|
'mcp.server.get': {
|
|
861
1025
|
params: RuntimeDaemonJsonSchema;
|
|
862
1026
|
result: {
|
|
@@ -917,6 +1081,88 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
917
1081
|
params: RuntimeDaemonJsonSchema;
|
|
918
1082
|
result: RuntimeDaemonJsonSchema;
|
|
919
1083
|
};
|
|
1084
|
+
'memory.describe': {
|
|
1085
|
+
params: RuntimeDaemonJsonSchema;
|
|
1086
|
+
result: RuntimeDaemonJsonSchema;
|
|
1087
|
+
};
|
|
1088
|
+
'memory.listReviews': {
|
|
1089
|
+
params: RuntimeDaemonJsonSchema;
|
|
1090
|
+
result: RuntimeDaemonJsonSchema;
|
|
1091
|
+
};
|
|
1092
|
+
'memory.listInbox': {
|
|
1093
|
+
params: RuntimeDaemonJsonSchema;
|
|
1094
|
+
result: RuntimeDaemonJsonSchema;
|
|
1095
|
+
};
|
|
1096
|
+
'memory.rebuild': {
|
|
1097
|
+
params: RuntimeDaemonJsonSchema;
|
|
1098
|
+
result: RuntimeDaemonJsonSchema;
|
|
1099
|
+
};
|
|
1100
|
+
'memory.showProposal': {
|
|
1101
|
+
params: RuntimeDaemonJsonSchema;
|
|
1102
|
+
result: RuntimeDaemonJsonSchema;
|
|
1103
|
+
};
|
|
1104
|
+
'memory.readRef': {
|
|
1105
|
+
params: RuntimeDaemonJsonSchema;
|
|
1106
|
+
result: RuntimeDaemonJsonSchema;
|
|
1107
|
+
};
|
|
1108
|
+
'memory.listRefs': {
|
|
1109
|
+
params: RuntimeDaemonJsonSchema;
|
|
1110
|
+
result: RuntimeDaemonJsonSchema;
|
|
1111
|
+
};
|
|
1112
|
+
'memory.remember': {
|
|
1113
|
+
params: RuntimeDaemonJsonSchema;
|
|
1114
|
+
result: RuntimeDaemonJsonSchema;
|
|
1115
|
+
};
|
|
1116
|
+
'memory.forgetRef': {
|
|
1117
|
+
params: RuntimeDaemonJsonSchema;
|
|
1118
|
+
result: RuntimeDaemonJsonSchema;
|
|
1119
|
+
};
|
|
1120
|
+
'memory.approveProposal': {
|
|
1121
|
+
params: RuntimeDaemonJsonSchema;
|
|
1122
|
+
result: RuntimeDaemonJsonSchema;
|
|
1123
|
+
};
|
|
1124
|
+
'memory.rejectProposal': {
|
|
1125
|
+
params: RuntimeDaemonJsonSchema;
|
|
1126
|
+
result: RuntimeDaemonJsonSchema;
|
|
1127
|
+
};
|
|
1128
|
+
'memory.ensureOpenTarget': {
|
|
1129
|
+
params: RuntimeDaemonJsonSchema;
|
|
1130
|
+
result: RuntimeDaemonJsonSchema;
|
|
1131
|
+
};
|
|
1132
|
+
'invocations.prepareSkill': {
|
|
1133
|
+
params: RuntimeDaemonJsonSchema;
|
|
1134
|
+
result: RuntimeDaemonJsonSchema;
|
|
1135
|
+
};
|
|
1136
|
+
'invocations.prepareCommand': {
|
|
1137
|
+
params: RuntimeDaemonJsonSchema;
|
|
1138
|
+
result: RuntimeDaemonJsonSchema;
|
|
1139
|
+
};
|
|
1140
|
+
'invocations.readCommandPrompt': {
|
|
1141
|
+
params: RuntimeDaemonJsonSchema;
|
|
1142
|
+
result: {
|
|
1143
|
+
oneOf: RuntimeDaemonJsonSchema[];
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
'invocations.startReview': {
|
|
1147
|
+
params: RuntimeDaemonJsonSchema;
|
|
1148
|
+
result: RuntimeDaemonJsonSchema;
|
|
1149
|
+
};
|
|
1150
|
+
'invocations.startAgentsLean': {
|
|
1151
|
+
params: RuntimeDaemonJsonSchema;
|
|
1152
|
+
result: RuntimeDaemonJsonSchema;
|
|
1153
|
+
};
|
|
1154
|
+
'invocations.executeCommand': {
|
|
1155
|
+
params: RuntimeDaemonJsonSchema;
|
|
1156
|
+
result: RuntimeDaemonJsonSchema;
|
|
1157
|
+
};
|
|
1158
|
+
'invocations.prepareReview': {
|
|
1159
|
+
params: RuntimeDaemonJsonSchema;
|
|
1160
|
+
result: RuntimeDaemonJsonSchema;
|
|
1161
|
+
};
|
|
1162
|
+
'invocations.prepareAgentsLean': {
|
|
1163
|
+
params: RuntimeDaemonJsonSchema;
|
|
1164
|
+
result: RuntimeDaemonJsonSchema;
|
|
1165
|
+
};
|
|
920
1166
|
'artifact.create': {
|
|
921
1167
|
params: RuntimeDaemonJsonSchema;
|
|
922
1168
|
result: RuntimeDaemonJsonSchema;
|
|
@@ -993,26 +1239,10 @@ declare const RUNTIME_DAEMON_METHOD_SCHEMAS: {
|
|
|
993
1239
|
params: RuntimeDaemonJsonSchema;
|
|
994
1240
|
result: RuntimeDaemonJsonSchema;
|
|
995
1241
|
};
|
|
996
|
-
'context.budget.get': {
|
|
997
|
-
params: RuntimeDaemonJsonSchema;
|
|
998
|
-
result: {
|
|
999
|
-
oneOf: RuntimeDaemonJsonSchema[];
|
|
1000
|
-
};
|
|
1001
|
-
};
|
|
1002
|
-
'tool.exposure.preview': {
|
|
1003
|
-
params: RuntimeDaemonJsonSchema;
|
|
1004
|
-
result: {
|
|
1005
|
-
oneOf: RuntimeDaemonJsonSchema[];
|
|
1006
|
-
};
|
|
1007
|
-
};
|
|
1008
|
-
'provider.cache.diagnostics.get': {
|
|
1009
|
-
params: RuntimeDaemonJsonSchema;
|
|
1010
|
-
result: {
|
|
1011
|
-
oneOf: RuntimeDaemonJsonSchema[];
|
|
1012
|
-
};
|
|
1013
|
-
};
|
|
1014
1242
|
};
|
|
1015
1243
|
declare const RUNTIME_DAEMON_NOTIFICATION_SCHEMAS: {
|
|
1244
|
+
'subscription.error': RuntimeDaemonJsonSchema;
|
|
1245
|
+
'session.view': RuntimeDaemonJsonSchema;
|
|
1016
1246
|
event: RuntimeDaemonJsonSchema;
|
|
1017
1247
|
'observation.invalidated': RuntimeDaemonJsonSchema;
|
|
1018
1248
|
'credential.request': RuntimeDaemonJsonSchema;
|
|
@@ -1023,14 +1253,6 @@ declare const RUNTIME_DAEMON_PROTOCOL_SCHEMA: RuntimeDaemonProtocolSchema;
|
|
|
1023
1253
|
declare const RUNTIME_DAEMON_PROTOCOL_SCHEMA_JSON: string;
|
|
1024
1254
|
declare function listRuntimeDaemonSchemaMethods(): readonly RuntimeDaemonMethod[];
|
|
1025
1255
|
|
|
1026
|
-
/**
|
|
1027
|
-
* SDK subpath entry - `@kodax-ai/kodax/runtime`.
|
|
1028
|
-
*
|
|
1029
|
-
* FEATURE_253 (v0.7.64): embedded runtime contract. This module composes the
|
|
1030
|
-
* existing coding run loop, REPL-backed session storage, and agent workflow
|
|
1031
|
-
* process manager without introducing a daemon or a fifth workspace package.
|
|
1032
|
-
*/
|
|
1033
|
-
|
|
1034
1256
|
declare class RuntimeDaemonCapabilityUpgradeError extends Error {
|
|
1035
1257
|
readonly preflight?: RuntimeDaemonPreflight | undefined;
|
|
1036
1258
|
readonly code: "daemon_capability_upgrade_required";
|
|
@@ -1047,8 +1269,7 @@ declare class RuntimeAutoModeConfigurationError extends Error {
|
|
|
1047
1269
|
}
|
|
1048
1270
|
|
|
1049
1271
|
type KodaXRuntimeMode = "embedded" | "daemon";
|
|
1050
|
-
type KodaXRuntimeIsolation = "inline" | "
|
|
1051
|
-
|
|
1272
|
+
type KodaXRuntimeIsolation = "inline" | "process";
|
|
1052
1273
|
interface RuntimeInlineOwnerHandle {
|
|
1053
1274
|
readonly profile: string;
|
|
1054
1275
|
readonly ownerId: string;
|
|
@@ -1087,10 +1308,6 @@ declare function acquireKodaXInlineOwner(input?: {
|
|
|
1087
1308
|
readonly profile?: string;
|
|
1088
1309
|
readonly enableRollback?: boolean;
|
|
1089
1310
|
}): RuntimeInlineOwnerHandle;
|
|
1090
|
-
declare function getKodaXRuntimeOwnerPolicy(input?: {
|
|
1091
|
-
readonly homeDir?: string;
|
|
1092
|
-
readonly profile?: string;
|
|
1093
|
-
}): RuntimeOwnerPolicyState;
|
|
1094
1311
|
declare function getKodaXRuntimeOwnerState(input?: {
|
|
1095
1312
|
readonly homeDir?: string;
|
|
1096
1313
|
readonly profile?: string;
|
|
@@ -1122,22 +1339,11 @@ interface RuntimeIdentity {
|
|
|
1122
1339
|
readonly profile: string;
|
|
1123
1340
|
readonly startedAt: string;
|
|
1124
1341
|
readonly version: string;
|
|
1342
|
+
/** Frozen installation identity for the local launcher; not a UI capability version. */
|
|
1343
|
+
readonly build?: RuntimeBuildIdentity;
|
|
1125
1344
|
readonly isolation?: KodaXRuntimeIsolation;
|
|
1126
|
-
readonly workerThreadId?: number;
|
|
1127
1345
|
}
|
|
1128
|
-
|
|
1129
|
-
interface RuntimeClientInfo {
|
|
1130
|
-
readonly name: string;
|
|
1131
|
-
/** Stable host-generated identity used only after daemon authentication. */
|
|
1132
|
-
readonly instanceId?: string;
|
|
1133
|
-
/** Stable host-generated secret; persist in OS keychain to resume client-owned leases. */
|
|
1134
|
-
readonly instanceSecret?: string;
|
|
1135
|
-
readonly title?: string;
|
|
1136
|
-
readonly version?: string;
|
|
1137
|
-
/** Display-only classification; never use it for authorization or process control. */
|
|
1138
|
-
readonly clientType?: RuntimeDaemonClientType;
|
|
1139
|
-
}
|
|
1140
|
-
type RuntimeDaemonClientType = "app" | "cli" | "diagnostic" | "automation" | "unknown";
|
|
1346
|
+
|
|
1141
1347
|
/**
|
|
1142
1348
|
* A read-only connection observation. Display metadata remains client-supplied
|
|
1143
1349
|
* and must not authorize work ownership, destructive actions, or process control.
|
|
@@ -1161,7 +1367,6 @@ interface RuntimeClientCapabilities {
|
|
|
1161
1367
|
readonly skillCatalog?: boolean;
|
|
1162
1368
|
readonly artifactUpload?: boolean;
|
|
1163
1369
|
readonly contextDiagnostics?: boolean;
|
|
1164
|
-
readonly operationDeduplication?: boolean;
|
|
1165
1370
|
}
|
|
1166
1371
|
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";
|
|
1167
1372
|
interface RuntimeExternalAgentsOptions {
|
|
@@ -1176,10 +1381,6 @@ interface RuntimeExternalAgentsOptions {
|
|
|
1176
1381
|
interface CreateKodaXRuntimeOptions {
|
|
1177
1382
|
/** Runtime ownership form. Defaults to a caller-owned embedded Runtime. */
|
|
1178
1383
|
readonly mode?: KodaXRuntimeMode;
|
|
1179
|
-
/** Embedded-only execution location. Daemon mode selects host isolation internally. */
|
|
1180
|
-
readonly isolation?: "inline" | "worker";
|
|
1181
|
-
/** Requires `isolation: 'worker'`; rejected instead of being silently ignored. */
|
|
1182
|
-
readonly worker?: RuntimeWorkerOptions;
|
|
1183
1384
|
/** Base directory that owns `.kodax`, matching CLI `--home`; not the `.kodax` directory used by `KODAX_HOME`. */
|
|
1184
1385
|
readonly homeDir?: string;
|
|
1185
1386
|
readonly profile?: string;
|
|
@@ -1209,7 +1410,7 @@ interface CreateKodaXRuntimeOptions {
|
|
|
1209
1410
|
readonly clientInfo?: RuntimeClientInfo;
|
|
1210
1411
|
readonly capabilities?: RuntimeClientCapabilities;
|
|
1211
1412
|
readonly requirements?: RuntimeCapabilityRequirements;
|
|
1212
|
-
/** Inline host injection. Functions never cross daemon
|
|
1413
|
+
/** Inline host injection. Functions never cross the daemon transport. */
|
|
1213
1414
|
readonly externalAgents?: RuntimeExternalAgentsOptions;
|
|
1214
1415
|
/** Trusted host-owned Exec Policy inputs. Detached daemon mode accepts them only for a new auto-started owner. */
|
|
1215
1416
|
readonly execPolicy?: RuntimeExecPolicyOptions;
|
|
@@ -1229,7 +1430,7 @@ interface RuntimeAutoReviewOptions {
|
|
|
1229
1430
|
}
|
|
1230
1431
|
interface ConnectKodaXRuntimeOptions {
|
|
1231
1432
|
readonly profile?: string;
|
|
1232
|
-
/**
|
|
1433
|
+
/** @deprecated Connect is passive. Use ensureKodaXRuntime for startup; true is rejected here. */
|
|
1233
1434
|
readonly autoStart?: boolean;
|
|
1234
1435
|
readonly endpoint?: string | RuntimeDaemonEndpoint;
|
|
1235
1436
|
readonly transport?: RuntimeDaemonClientTransport;
|
|
@@ -1243,6 +1444,8 @@ interface ConnectKodaXRuntimeOptions {
|
|
|
1243
1444
|
/** AskUser deadline for a newly started daemon. Defaults to five minutes. */
|
|
1244
1445
|
readonly userInputTimeoutMs?: number;
|
|
1245
1446
|
readonly daemonStartupTimeoutMs?: number;
|
|
1447
|
+
/** Local startup cancellation; never crosses the Host protocol. */
|
|
1448
|
+
readonly daemonStartupSignal?: AbortSignal;
|
|
1246
1449
|
readonly daemonConnectTimeoutMs?: number;
|
|
1247
1450
|
/** Auto-started daemon idle-exit policy; see CreateKodaXRuntimeOptions. */
|
|
1248
1451
|
readonly daemonOrphanExitMs?: number;
|
|
@@ -1253,6 +1456,7 @@ interface ConnectKodaXRuntimeOptions {
|
|
|
1253
1456
|
}
|
|
1254
1457
|
/** SDK facts that embedders can inspect before auto-starting a daemon. */
|
|
1255
1458
|
declare const KODAX_RUNTIME_SDK_CAPABILITIES: Readonly<{
|
|
1459
|
+
readonly productClient: 1;
|
|
1256
1460
|
readonly actorSettlementConvergence: 2;
|
|
1257
1461
|
readonly conversationHistory: 2;
|
|
1258
1462
|
readonly crashOutcomeModel: 2;
|
|
@@ -1261,23 +1465,25 @@ declare const KODAX_RUNTIME_SDK_CAPABILITIES: Readonly<{
|
|
|
1261
1465
|
readonly effectiveConfig: 1;
|
|
1262
1466
|
readonly managedRunDurability: 1;
|
|
1263
1467
|
readonly runtimeAutoModeGuardrail: 6;
|
|
1264
|
-
readonly runtimeExitSettlement: 2;
|
|
1265
1468
|
readonly sandboxRuntime: 11;
|
|
1266
|
-
readonly sessionEventJournal: 1;
|
|
1267
1469
|
readonly sharedSessionSettings: 2;
|
|
1268
1470
|
readonly runtimeEventCoalescing: 1;
|
|
1269
1471
|
readonly liveOutputSegments: 1;
|
|
1270
1472
|
}>;
|
|
1271
1473
|
interface RuntimeCapabilityRequirements {
|
|
1272
|
-
|
|
1273
|
-
readonly
|
|
1474
|
+
readonly productExitControl?: 1;
|
|
1475
|
+
readonly productExecutionFacts?: 1;
|
|
1476
|
+
readonly productActorAuthorization?: 1;
|
|
1477
|
+
readonly productHistoryBoundaries?: 1;
|
|
1478
|
+
readonly productExecutionAuthorization?: 1;
|
|
1479
|
+
/** Unified product business operations and current-view lifecycle. */
|
|
1480
|
+
readonly productClient?: 1;
|
|
1274
1481
|
/** Reject hosts that do not advertise an installed external Agent executor plane. */
|
|
1275
1482
|
readonly externalAgents?: boolean;
|
|
1276
1483
|
/** Require owner/revision-fenced external Agent registration administration. */
|
|
1277
1484
|
readonly externalAgentAdmin?: 1;
|
|
1278
1485
|
/** Require a daemon that owns and hot-reconciles its A2A integration config. */
|
|
1279
1486
|
readonly a2aConfigReconciler?: 1;
|
|
1280
|
-
readonly operationDeduplication?: 1;
|
|
1281
1487
|
readonly sessionObservation?: 1;
|
|
1282
1488
|
readonly afterTurnInput?: 1;
|
|
1283
1489
|
readonly learningCenter?: 1;
|
|
@@ -1310,8 +1516,7 @@ interface RuntimeCapabilityRequirements {
|
|
|
1310
1516
|
readonly managedRunDurability?: 1;
|
|
1311
1517
|
/** Require fail-closed root fencing plus automatic same-owner Actor settlement repair. */
|
|
1312
1518
|
readonly actorSettlementConvergence?: 1 | 2;
|
|
1313
|
-
/** Require Session-local
|
|
1314
|
-
readonly sessionEventJournal?: 1;
|
|
1519
|
+
/** Require Session-local event ordering and scoped event access. */
|
|
1315
1520
|
readonly daemonManagement?: 1;
|
|
1316
1521
|
/** Require a read-only inventory of initialized logical daemon clients. */
|
|
1317
1522
|
readonly daemonClientInventory?: 1;
|
|
@@ -1333,46 +1538,10 @@ interface RuntimeCapabilityRequirements {
|
|
|
1333
1538
|
/** Runtime owns Auto[LLM] review at the proven host boundary. */
|
|
1334
1539
|
readonly runtimeAutoModeGuardrail?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
1335
1540
|
}
|
|
1336
|
-
type RuntimeOperationState = "accepted" | "dispatched" | "applied" | "rejected" | "interrupted" | "unknown";
|
|
1337
|
-
interface RuntimeOperationReceipt {
|
|
1338
|
-
readonly operationId: string;
|
|
1339
|
-
readonly journalEpoch: string;
|
|
1340
|
-
readonly principalId: string;
|
|
1341
|
-
readonly method: string;
|
|
1342
|
-
readonly resourceId?: string;
|
|
1343
|
-
readonly requestDigest: string;
|
|
1344
|
-
readonly state: RuntimeOperationState;
|
|
1345
|
-
/** Serialized mutation result when state is applied; exact retries return the same value. */
|
|
1346
|
-
readonly result?: unknown;
|
|
1347
|
-
readonly updatedAt: string;
|
|
1348
|
-
readonly error?: {
|
|
1349
|
-
readonly code: string;
|
|
1350
|
-
readonly message: string;
|
|
1351
|
-
};
|
|
1352
|
-
}
|
|
1353
|
-
interface RuntimeOperationService {
|
|
1354
|
-
get(input: {
|
|
1355
|
-
readonly operationId: string;
|
|
1356
|
-
readonly journalEpoch: string;
|
|
1357
|
-
}): Promise<RuntimeOperationReceipt>;
|
|
1358
|
-
}
|
|
1359
|
-
interface RuntimeDiagnosticFilter {
|
|
1360
|
-
readonly sessionId?: string;
|
|
1361
|
-
readonly runId?: string;
|
|
1362
|
-
/** Defaults to root so child physical requests do not replace root diagnostics. */
|
|
1363
|
-
readonly contextKind?: "root" | "child";
|
|
1364
|
-
readonly agentId?: string;
|
|
1365
|
-
}
|
|
1366
|
-
interface RuntimeDiagnosticsService {
|
|
1367
|
-
latestContextBudget(filter?: RuntimeDiagnosticFilter): Promise<RuntimeContextBudgetSnapshot | null>;
|
|
1368
|
-
latestToolExposure(filter?: RuntimeDiagnosticFilter): Promise<RuntimeToolExposurePlan | null>;
|
|
1369
|
-
latestProviderCacheDiagnostic(filter?: RuntimeDiagnosticFilter): Promise<KodaXPromptCacheDiagnosticEvent | null>;
|
|
1370
|
-
}
|
|
1371
1541
|
interface RuntimeConnectionState {
|
|
1372
1542
|
readonly state: "connected" | "disconnected";
|
|
1373
1543
|
readonly connectionId: string;
|
|
1374
1544
|
readonly runtimeEpoch: string;
|
|
1375
|
-
readonly journalEpoch?: string;
|
|
1376
1545
|
readonly code?: RuntimeDaemonTransportLifecycleState["code"];
|
|
1377
1546
|
readonly reason?: string;
|
|
1378
1547
|
readonly reconnectable: boolean;
|
|
@@ -1382,6 +1551,8 @@ interface RuntimeConnectionService {
|
|
|
1382
1551
|
subscribe(listener: (state: RuntimeConnectionState) => void): RuntimeSubscription;
|
|
1383
1552
|
}
|
|
1384
1553
|
interface KodaXRuntime {
|
|
1554
|
+
readonly statistics?: ClientStatisticsService;
|
|
1555
|
+
readonly lifecycle?: ClientLifecycleService;
|
|
1385
1556
|
readonly identity: RuntimeIdentity;
|
|
1386
1557
|
/** Server-advertised facts. Authorization remains defined by grantedScopes. */
|
|
1387
1558
|
readonly capabilities?: Readonly<Record<string, unknown>>;
|
|
@@ -1391,24 +1562,29 @@ interface KodaXRuntime {
|
|
|
1391
1562
|
readonly events: RuntimeEventService;
|
|
1392
1563
|
readonly permissions: RuntimePermissionService;
|
|
1393
1564
|
readonly userInputs: RuntimeUserInputService;
|
|
1565
|
+
/** Typed Interaction surface: precise request ids, first valid answer wins. */
|
|
1566
|
+
readonly interactions: RuntimeInteractionService;
|
|
1394
1567
|
readonly credentials: RuntimeCredentialService;
|
|
1395
1568
|
readonly hostTools: RuntimeHostToolService;
|
|
1396
|
-
readonly operations: RuntimeOperationService;
|
|
1397
1569
|
readonly workflows: RuntimeWorkflowService;
|
|
1398
1570
|
readonly learning: RuntimeLearningService;
|
|
1571
|
+
readonly memory: RuntimeMemoryService;
|
|
1572
|
+
/** FEATURE_298 T37 — trusted Skill/command preparation lives Host-side. */
|
|
1573
|
+
readonly invocations: RuntimeInvocationService & RuntimeProductCommandService;
|
|
1399
1574
|
readonly config: RuntimeConfigService;
|
|
1400
1575
|
readonly catalog: RuntimeCatalogService;
|
|
1401
1576
|
readonly mcp: RuntimeMcpService;
|
|
1402
1577
|
readonly artifacts: RuntimeArtifactService;
|
|
1403
1578
|
readonly status: RuntimeStatusService;
|
|
1404
|
-
readonly diagnostics: RuntimeDiagnosticsService;
|
|
1405
1579
|
/** Present on daemon facades; emits disconnects without waiting for polling. */
|
|
1406
1580
|
readonly connection?: RuntimeConnectionService;
|
|
1581
|
+
/** Present on daemon facades; the embedded Host's owner closes instead. */
|
|
1582
|
+
readonly daemon?: RuntimeDaemonManagementService;
|
|
1407
1583
|
readonly admin: RuntimeAdminService;
|
|
1408
1584
|
readonly agents: RuntimeAgentService;
|
|
1409
1585
|
/**
|
|
1410
|
-
* Release this facade. Inline closes its private Runtime
|
|
1411
|
-
*
|
|
1586
|
+
* Release this facade. Inline closes its private Runtime and daemon mode
|
|
1587
|
+
* only detaches this client.
|
|
1412
1588
|
*/
|
|
1413
1589
|
close(): Promise<void>;
|
|
1414
1590
|
}
|
|
@@ -1432,7 +1608,9 @@ interface RuntimeAgentService {
|
|
|
1432
1608
|
events(sessionId: string, afterSequence?: number): Promise<readonly AgentEvent[]>;
|
|
1433
1609
|
wait(sessionId: string, afterSequence?: number, timeoutMs?: number, options?: Readonly<Pick<RuntimeReadOptions, "signal">>): Promise<AgentEvent | undefined>;
|
|
1434
1610
|
}
|
|
1435
|
-
type RuntimeConfigPatch =
|
|
1611
|
+
type RuntimeConfigPatch = {
|
|
1612
|
+
[K in RuntimeConfigPatchKey]?: ReplRuntimeConfigPatch[K] | null;
|
|
1613
|
+
};
|
|
1436
1614
|
interface RuntimeConfigReloadResult {
|
|
1437
1615
|
readonly ok: true;
|
|
1438
1616
|
readonly config: unknown;
|
|
@@ -1533,7 +1711,15 @@ interface RuntimeExtensionListResult {
|
|
|
1533
1711
|
readonly diagnostics?: ExtensionRuntimeDiagnostics;
|
|
1534
1712
|
}
|
|
1535
1713
|
interface RuntimeCatalogService {
|
|
1536
|
-
|
|
1714
|
+
reasoningEfforts(input: ClientModelSelection): Promise<readonly string[]>;
|
|
1715
|
+
probeReasoningEfforts(input: ClientModelSelection & {
|
|
1716
|
+
readonly efforts: readonly string[];
|
|
1717
|
+
}): Promise<readonly ClientCapabilityProbeResult[]>;
|
|
1718
|
+
forgetCapabilities(input?: {
|
|
1719
|
+
readonly provider?: string;
|
|
1720
|
+
readonly model?: string;
|
|
1721
|
+
}): Promise<void>;
|
|
1722
|
+
providers(): Promise<readonly ClientProviderInfo[]>;
|
|
1537
1723
|
models(filter?: RuntimeModelListFilter): Promise<unknown>;
|
|
1538
1724
|
commands(projectRoot?: string): Promise<readonly RuntimeCommandInfo[]>;
|
|
1539
1725
|
resolveCommand(input: RuntimeCommandResolveInput): Promise<RuntimeCommandInfo | null>;
|
|
@@ -1561,6 +1747,7 @@ type RuntimeMcpValidateResult = {
|
|
|
1561
1747
|
readonly error: string;
|
|
1562
1748
|
};
|
|
1563
1749
|
interface RuntimeMcpService {
|
|
1750
|
+
status(): Promise<readonly McpServerStatus[]>;
|
|
1564
1751
|
listServers(): Promise<Record<string, McpServerConfig>>;
|
|
1565
1752
|
getServer(name: string): Promise<McpServerConfig | undefined>;
|
|
1566
1753
|
validateServer(name: string, config: unknown): Promise<RuntimeMcpValidateResult>;
|
|
@@ -1596,25 +1783,9 @@ interface RuntimeArtifactService {
|
|
|
1596
1783
|
get(artifactId: string): Promise<RuntimeArtifact | undefined>;
|
|
1597
1784
|
delete(artifactId: string): Promise<boolean>;
|
|
1598
1785
|
}
|
|
1599
|
-
interface RuntimeCreateSessionInput {
|
|
1600
|
-
readonly sessionId?: string;
|
|
1601
|
-
readonly title?: string;
|
|
1602
|
-
readonly projectPath?: string;
|
|
1603
|
-
readonly gitRoot?: string;
|
|
1604
|
-
readonly surface?: string;
|
|
1605
|
-
readonly profileId?: string;
|
|
1606
|
-
readonly tag?: string;
|
|
1607
|
-
readonly operation?: RuntimeOperationOptions;
|
|
1608
|
-
}
|
|
1609
|
-
interface RuntimeSession {
|
|
1610
|
-
readonly id: string;
|
|
1611
|
-
readonly title: string;
|
|
1612
|
-
readonly gitRoot?: string;
|
|
1613
|
-
readonly workspaceRoot?: string;
|
|
1614
|
-
readonly surface?: string;
|
|
1615
|
-
readonly profileId?: string;
|
|
1616
|
-
readonly createdAt?: string;
|
|
1786
|
+
interface RuntimeCreateSessionInput extends ClientCreateSessionInput {
|
|
1617
1787
|
}
|
|
1788
|
+
type RuntimeSession = ClientSession;
|
|
1618
1789
|
/** Payload emitted when an executing run binds its provider session. */
|
|
1619
1790
|
interface RuntimeRunSessionLoadedEventPayload {
|
|
1620
1791
|
readonly provider: string;
|
|
@@ -1624,14 +1795,7 @@ interface RuntimeRunSessionLoadedEventPayload {
|
|
|
1624
1795
|
}
|
|
1625
1796
|
/** Durable compatibility event emitted when a run binds its provider session. */
|
|
1626
1797
|
type RuntimeSessionLoadedEventPayload = RuntimeSession | RuntimeRunSessionLoadedEventPayload;
|
|
1627
|
-
|
|
1628
|
-
/** Opaque continuation token accepted by RuntimeSessionFilter.cursor. */
|
|
1629
|
-
readonly cursor?: string;
|
|
1630
|
-
readonly msgCount: number;
|
|
1631
|
-
readonly tag?: string;
|
|
1632
|
-
readonly projectKey?: string;
|
|
1633
|
-
readonly archived?: boolean;
|
|
1634
|
-
}
|
|
1798
|
+
type RuntimeSessionSummary = ClientSessionSummary;
|
|
1635
1799
|
type RuntimeTranscript = FullTranscriptSessionData;
|
|
1636
1800
|
interface RuntimeConversationHistory extends SessionConversationHistoryData {
|
|
1637
1801
|
/** Content-derived identity shared by direct and paged conversation reads. */
|
|
@@ -1720,7 +1884,7 @@ interface RuntimeSessionDiagnostics {
|
|
|
1720
1884
|
readonly runtimeMode: KodaXRuntimeMode;
|
|
1721
1885
|
readonly sessionId: string;
|
|
1722
1886
|
readonly observation: {
|
|
1723
|
-
readonly
|
|
1887
|
+
readonly seq: number;
|
|
1724
1888
|
readonly transcriptRevision: string;
|
|
1725
1889
|
};
|
|
1726
1890
|
readonly run: RuntimeSessionDiagnosticRun;
|
|
@@ -1770,23 +1934,20 @@ interface RuntimeTranscriptSearchResult {
|
|
|
1770
1934
|
readonly revision: string;
|
|
1771
1935
|
readonly hits: readonly RuntimeTranscriptSearchHit[];
|
|
1772
1936
|
}
|
|
1773
|
-
|
|
1774
|
-
readonly projectRoot?: string;
|
|
1775
|
-
readonly scope?: "user" | "managed-task-worker" | "all";
|
|
1776
|
-
readonly includeArchived?: boolean;
|
|
1777
|
-
readonly limit?: number;
|
|
1778
|
-
readonly before?: string;
|
|
1779
|
-
readonly tag?: string;
|
|
1780
|
-
readonly surface?: string;
|
|
1781
|
-
readonly cursor?: string;
|
|
1782
|
-
}
|
|
1937
|
+
type RuntimeSessionFilter = ClientSessionFilter;
|
|
1783
1938
|
interface RuntimeForkSessionInput {
|
|
1939
|
+
readonly before?: boolean;
|
|
1784
1940
|
readonly sessionId: string;
|
|
1785
1941
|
readonly selector?: string;
|
|
1786
1942
|
readonly newSessionId?: string;
|
|
1787
1943
|
readonly title?: string;
|
|
1788
1944
|
readonly historyBoundary?: RuntimeConversationHistoryBoundary;
|
|
1789
1945
|
}
|
|
1946
|
+
interface RuntimeRecoverSessionInput {
|
|
1947
|
+
readonly sessionId: string;
|
|
1948
|
+
readonly title?: string;
|
|
1949
|
+
readonly reason?: string;
|
|
1950
|
+
}
|
|
1790
1951
|
interface RuntimeConversationHistoryBoundary {
|
|
1791
1952
|
readonly entryId: string;
|
|
1792
1953
|
readonly sourceRevision: string;
|
|
@@ -1797,6 +1958,9 @@ type RuntimeCompactionReasoning = boolean | {
|
|
|
1797
1958
|
readonly effort: NonNullable<KodaXOptions["effort"]>;
|
|
1798
1959
|
};
|
|
1799
1960
|
interface RuntimeSessionSettings {
|
|
1961
|
+
readonly planModeEffort?: KodaXOptions["effort"];
|
|
1962
|
+
readonly repoIntelligenceMode?: NonNullable<KodaXOptions['context']>['repoIntelligenceMode'];
|
|
1963
|
+
readonly repoIntelligenceTrace?: boolean;
|
|
1800
1964
|
/** Shared manual/automatic summary policy; independent of the main turn's effort. */
|
|
1801
1965
|
readonly compactionReasoning?: RuntimeCompactionReasoning;
|
|
1802
1966
|
readonly provider?: string;
|
|
@@ -1813,8 +1977,13 @@ interface RuntimeSessionSettings {
|
|
|
1813
1977
|
readonly compactionTriggerPercent?: number;
|
|
1814
1978
|
/** Optional absolute auto-compaction threshold. Missing or zero is inactive. */
|
|
1815
1979
|
readonly compactionTriggerTokens?: number;
|
|
1980
|
+
/** Per-run iteration fuse; unset falls back to the engine default. */
|
|
1981
|
+
readonly maxIter?: number;
|
|
1816
1982
|
}
|
|
1817
1983
|
interface RuntimeSessionSettingsPatch {
|
|
1984
|
+
readonly planModeEffort?: KodaXOptions["effort"] | null;
|
|
1985
|
+
readonly repoIntelligenceMode?: RuntimeSessionSettings['repoIntelligenceMode'] | null;
|
|
1986
|
+
readonly repoIntelligenceTrace?: boolean | null;
|
|
1818
1987
|
readonly compactionReasoning?: RuntimeCompactionReasoning | null;
|
|
1819
1988
|
readonly provider?: string | null;
|
|
1820
1989
|
readonly model?: string | null;
|
|
@@ -1825,15 +1994,10 @@ interface RuntimeSessionSettingsPatch {
|
|
|
1825
1994
|
readonly executionCwd?: string | null;
|
|
1826
1995
|
readonly shellExecution?: KodaXShellExecutionContract | null;
|
|
1827
1996
|
readonly agentMode?: KodaXOptions["agentMode"] | null;
|
|
1828
|
-
/** @deprecated Accepted as inert migration input. Auto always uses the LLM reviewer. */
|
|
1829
|
-
readonly autoModeEngine?: "llm" | "rules" | null;
|
|
1830
1997
|
readonly autoModeClassifierModel?: string | null;
|
|
1831
|
-
/** @deprecated Accepted as inert migration input. Reviewer deadlines are fixed. */
|
|
1832
|
-
readonly autoModeTimeoutMs?: number | null;
|
|
1833
|
-
/** @deprecated Accepted as inert migration input. Sandbox-first routing has no speculative window. */
|
|
1834
|
-
readonly autoModeSpeculativeWindowMs?: number | null;
|
|
1835
1998
|
readonly compactionTriggerPercent?: number | null;
|
|
1836
1999
|
readonly compactionTriggerTokens?: number | null;
|
|
2000
|
+
readonly maxIter?: number | null;
|
|
1837
2001
|
}
|
|
1838
2002
|
interface RuntimeAppendNoticeInput {
|
|
1839
2003
|
readonly sessionId: string;
|
|
@@ -1843,6 +2007,7 @@ interface RuntimeAppendNoticeInput {
|
|
|
1843
2007
|
interface RuntimeRewindSessionInput {
|
|
1844
2008
|
readonly sessionId: string;
|
|
1845
2009
|
readonly selector?: string;
|
|
2010
|
+
readonly expectedHead?: string | null;
|
|
1846
2011
|
readonly historyBoundary?: RuntimeConversationHistoryBoundary;
|
|
1847
2012
|
}
|
|
1848
2013
|
/** Host-confirmed alias backed by an existing interrupt delivery event. */
|
|
@@ -1863,6 +2028,8 @@ interface RuntimeConfirmIdentityAliasInput {
|
|
|
1863
2028
|
interface RuntimeSetActiveEntryInput {
|
|
1864
2029
|
readonly sessionId: string;
|
|
1865
2030
|
readonly entryId: string;
|
|
2031
|
+
/** FEATURE_298 T34 — summarize the abandoned branch before switching (REPL /branch semantics). */
|
|
2032
|
+
readonly summarizeCurrentBranch?: boolean;
|
|
1866
2033
|
}
|
|
1867
2034
|
interface RuntimeCompactSessionInput {
|
|
1868
2035
|
readonly sessionId: string;
|
|
@@ -1876,12 +2043,15 @@ interface RuntimeCompactSessionInput {
|
|
|
1876
2043
|
readonly triggerTokens?: number;
|
|
1877
2044
|
/** Daemon-issued credential lease used only by this compaction operation. */
|
|
1878
2045
|
readonly credential?: RuntimeCredentialBinding;
|
|
1879
|
-
/** Stable mutation identity for safe retry after a lost daemon response. */
|
|
1880
|
-
readonly operation?: RuntimeOperationOptions;
|
|
1881
2046
|
}
|
|
2047
|
+
/**
|
|
2048
|
+
* FEATURE_298 T30 — agent mutations carry their own domain identity
|
|
2049
|
+
* (followup expectedRevision, actor turn semantics); the generic operation
|
|
2050
|
+
* envelope is deliberately not part of this contract.
|
|
2051
|
+
*/
|
|
1882
2052
|
interface RuntimeAgentOperationOptions {
|
|
1883
2053
|
readonly credential?: RuntimeCredentialBinding;
|
|
1884
|
-
readonly
|
|
2054
|
+
readonly authorization?: RuntimeExecutionAuthorization;
|
|
1885
2055
|
}
|
|
1886
2056
|
interface RuntimeAgentFollowupOptions extends RuntimeAgentOperationOptions {
|
|
1887
2057
|
readonly expectedRevision?: number;
|
|
@@ -1893,7 +2063,7 @@ interface RuntimeVersionedValue<T> {
|
|
|
1893
2063
|
readonly revision: number;
|
|
1894
2064
|
readonly value: T;
|
|
1895
2065
|
}
|
|
1896
|
-
interface RuntimeVersionedUpdateOptions
|
|
2066
|
+
interface RuntimeVersionedUpdateOptions {
|
|
1897
2067
|
readonly expectedRevision: number;
|
|
1898
2068
|
}
|
|
1899
2069
|
interface RuntimeActiveToolProjection {
|
|
@@ -1930,7 +2100,8 @@ interface RuntimeSessionLiveProjection {
|
|
|
1930
2100
|
}
|
|
1931
2101
|
interface RuntimeSessionObservationSnapshot {
|
|
1932
2102
|
readonly runtimeId: string;
|
|
1933
|
-
|
|
2103
|
+
/** Live event ordering high-water at capture; events with seq <= this are already reflected in the snapshot. */
|
|
2104
|
+
readonly seq: number;
|
|
1934
2105
|
/** Content-derived token for the transcript captured at this observation boundary. */
|
|
1935
2106
|
readonly transcriptRevision: string;
|
|
1936
2107
|
readonly session: RuntimeSession;
|
|
@@ -1951,6 +2122,26 @@ interface RuntimeObservationInvalidation {
|
|
|
1951
2122
|
readonly message: string;
|
|
1952
2123
|
}
|
|
1953
2124
|
interface RuntimeSessionService {
|
|
2125
|
+
observeView(sessionId: string, listener: (view: ClientSessionView) => void, options?: ClientObserveOptions): Promise<ClientObservation>;
|
|
2126
|
+
readViewItem(sessionId: string, itemId: string, options?: ClientItemReadOptions): Promise<ClientItemContent | null>;
|
|
2127
|
+
readHistory(sessionId: string, options?: ClientHistoryReadOptions): Promise<ClientHistoryPage>;
|
|
2128
|
+
readHistoryEntry(sessionId: string, itemId: string, options?: ClientItemReadOptions): Promise<ClientItemContent | null>;
|
|
2129
|
+
searchHistory(sessionId: string, input: ClientHistorySearchInput): Promise<ClientHistorySearchResult>;
|
|
2130
|
+
readGoal(sessionId: string): Promise<KodaXGoalState | null>;
|
|
2131
|
+
createGoal(input: {
|
|
2132
|
+
readonly sessionId: string;
|
|
2133
|
+
readonly objective: string;
|
|
2134
|
+
readonly tokenBudget?: number;
|
|
2135
|
+
}): Promise<KodaXGoalState>;
|
|
2136
|
+
pauseGoal(sessionId: string): Promise<KodaXGoalState>;
|
|
2137
|
+
resumeGoal(sessionId: string): Promise<KodaXGoalState>;
|
|
2138
|
+
clearGoal(sessionId: string): Promise<void>;
|
|
2139
|
+
readLineage(sessionId: string): Promise<ClientLineageSummary | null>;
|
|
2140
|
+
labelEntry(input: {
|
|
2141
|
+
readonly sessionId: string;
|
|
2142
|
+
readonly selector: string;
|
|
2143
|
+
readonly label?: string;
|
|
2144
|
+
}): Promise<ClientLineageSummary>;
|
|
1954
2145
|
cancel(input: RuntimeSessionCancelInput): Promise<RuntimeSessionCancelReceipt>;
|
|
1955
2146
|
create(input?: RuntimeCreateSessionInput): Promise<RuntimeSession>;
|
|
1956
2147
|
load(sessionId: string, options?: RuntimeReadOptions): Promise<RuntimeSession>;
|
|
@@ -1970,6 +2161,7 @@ interface RuntimeSessionService {
|
|
|
1970
2161
|
*/
|
|
1971
2162
|
diagnostics(input: RuntimeSessionDiagnosticsInput): Promise<RuntimeSessionDiagnostics>;
|
|
1972
2163
|
fork(input: RuntimeForkSessionInput): Promise<RuntimeSession | null>;
|
|
2164
|
+
recover(input: RuntimeRecoverSessionInput): Promise<RuntimeSession>;
|
|
1973
2165
|
getSettings(sessionId: string): Promise<RuntimeSessionSettings>;
|
|
1974
2166
|
getSettingsVersioned(sessionId: string): Promise<RuntimeVersionedValue<RuntimeSessionSettings>>;
|
|
1975
2167
|
/** Runtime-owned Auto classifier state used by diagnostics and status UI. */
|
|
@@ -2031,7 +2223,10 @@ interface RuntimeArtifactRefInput {
|
|
|
2031
2223
|
type RuntimeInput = RuntimeTextInput | RuntimeImageInput | RuntimeFileInput | RuntimeVideoInput | RuntimeArtifactRefInput;
|
|
2032
2224
|
type RuntimePermissionBroker = "runtime" | "client";
|
|
2033
2225
|
interface RuntimeStartRunInput {
|
|
2226
|
+
readonly authorization?: RuntimeExecutionAuthorization;
|
|
2034
2227
|
readonly sessionId: string;
|
|
2228
|
+
/** Stable product identity for an explicit tool invocation. */
|
|
2229
|
+
readonly inputId?: string;
|
|
2035
2230
|
readonly prompt?: string;
|
|
2036
2231
|
readonly input?: RuntimeInput | readonly RuntimeInput[];
|
|
2037
2232
|
readonly mode?: RuntimeRunMode;
|
|
@@ -2045,7 +2240,6 @@ interface RuntimeStartRunInput {
|
|
|
2045
2240
|
readonly hostTools?: {
|
|
2046
2241
|
readonly leaseId: string;
|
|
2047
2242
|
};
|
|
2048
|
-
readonly operation?: RuntimeOperationOptions;
|
|
2049
2243
|
}
|
|
2050
2244
|
interface RuntimeSubmitInput {
|
|
2051
2245
|
readonly sessionId: string;
|
|
@@ -2057,7 +2251,6 @@ interface RuntimeSubmitInput {
|
|
|
2057
2251
|
readonly hostTools?: {
|
|
2058
2252
|
readonly leaseId: string;
|
|
2059
2253
|
};
|
|
2060
|
-
readonly operation?: RuntimeOperationOptions;
|
|
2061
2254
|
}
|
|
2062
2255
|
type RuntimeSubmitInputResult = {
|
|
2063
2256
|
readonly accepted: true;
|
|
@@ -2082,11 +2275,6 @@ type RuntimeSubmitInputResult = {
|
|
|
2082
2275
|
readonly afterRunId: string;
|
|
2083
2276
|
readonly reason: "stale_run" | "unsupported_capability" | "interrupt_window_closed";
|
|
2084
2277
|
};
|
|
2085
|
-
interface RuntimeOperationOptions {
|
|
2086
|
-
readonly operationId?: string;
|
|
2087
|
-
readonly journalEpoch?: string;
|
|
2088
|
-
readonly expectedRevision?: number;
|
|
2089
|
-
}
|
|
2090
2278
|
type RuntimeKodaXOptions = Omit<KodaXOptions, "provider" | "session" | "events"> & {
|
|
2091
2279
|
readonly provider?: string;
|
|
2092
2280
|
readonly session?: KodaXOptions["session"];
|
|
@@ -2107,6 +2295,10 @@ type KodaXDaemonRuntime = Omit<KodaXRuntime, "runs"> & {
|
|
|
2107
2295
|
readonly daemon: RuntimeDaemonManagementService;
|
|
2108
2296
|
};
|
|
2109
2297
|
interface RuntimeRunStatus {
|
|
2298
|
+
readonly productInput?: {
|
|
2299
|
+
readonly inputId: string;
|
|
2300
|
+
readonly digest: string;
|
|
2301
|
+
};
|
|
2110
2302
|
readonly runId: string;
|
|
2111
2303
|
readonly sessionId: string;
|
|
2112
2304
|
readonly turnId?: string;
|
|
@@ -2130,7 +2322,6 @@ interface RuntimeRunStatus {
|
|
|
2130
2322
|
readonly principalId: string;
|
|
2131
2323
|
readonly clientName?: string;
|
|
2132
2324
|
readonly clientVersion?: string;
|
|
2133
|
-
readonly operationId?: string;
|
|
2134
2325
|
};
|
|
2135
2326
|
readonly model?: string;
|
|
2136
2327
|
readonly reasoning?: KodaXReasoningMode;
|
|
@@ -2208,7 +2399,7 @@ interface RuntimeSessionCancelReceipt extends RuntimeSessionCancelInput {
|
|
|
2208
2399
|
readonly frontier: number;
|
|
2209
2400
|
readonly receipts: readonly RuntimeRunStopReceipt[];
|
|
2210
2401
|
}
|
|
2211
|
-
type RuntimeTerminalCode = "completed" | "run_failed" | "blocked" | "cancelled" | "interrupted" | "runtime_restarted" | "daemon_crashed" | "credential_unavailable" | "host_not_dispatched" | "host_outcome_unknown" | "actor_settlement_not_persisted"
|
|
2402
|
+
type RuntimeTerminalCode = "completed" | "run_failed" | "blocked" | "cancelled" | "interrupted" | "runtime_restarted" | "daemon_crashed" | "credential_unavailable" | "host_not_dispatched" | "host_outcome_unknown" | "actor_settlement_not_persisted";
|
|
2212
2403
|
/** Credential-safe failure category; raw provider error text is never required. */
|
|
2213
2404
|
type RuntimeRunFailureKind = "auth" | "rate_limit" | "network" | "not_found" | "unknown_provider" | "request" | "upstream" | "cancelled" | "provider_aborted" | "invalid_response" | "runtime_cleanup" | "local_execution" | "context_capacity" | "provider";
|
|
2214
2405
|
type RuntimeFailureStage = "catalog" | "credential" | "request_build" | "transport" | "response_stream" | "runtime_control" | "local_execution" | "runtime_settlement";
|
|
@@ -2269,6 +2460,11 @@ interface RuntimeRunFilter {
|
|
|
2269
2460
|
readonly phase?: RuntimeRunPhase | readonly RuntimeRunPhase[];
|
|
2270
2461
|
}
|
|
2271
2462
|
interface RuntimeRunService {
|
|
2463
|
+
acceptInput(input: ClientSubmitInput & {
|
|
2464
|
+
readonly authorization?: RuntimeExecutionAuthorization;
|
|
2465
|
+
}): Promise<ClientInputAcceptance>;
|
|
2466
|
+
getInput(sessionId: string, inputId: string): Promise<ClientInputAcceptance | null>;
|
|
2467
|
+
withdrawInput(sessionId: string, inputId: string): Promise<ClientSubmitInput>;
|
|
2272
2468
|
start(input: RuntimeStartRunInput): Promise<RuntimeRunHandle>;
|
|
2273
2469
|
submitInput(input: RuntimeSubmitInput): Promise<RuntimeSubmitInputResult>;
|
|
2274
2470
|
await(runId: string): Promise<RuntimeRunResult>;
|
|
@@ -2287,7 +2483,7 @@ interface RuntimeRunService {
|
|
|
2287
2483
|
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" | "output.segment.started" | "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";
|
|
2288
2484
|
interface RuntimeTextDeltaEventPayload {
|
|
2289
2485
|
readonly text: string;
|
|
2290
|
-
/** Absent only in
|
|
2486
|
+
/** Absent only in events emitted before liveOutputSegments:1. */
|
|
2291
2487
|
readonly providerRequestId?: string;
|
|
2292
2488
|
readonly meta?: KodaXActivityEventMeta;
|
|
2293
2489
|
}
|
|
@@ -2480,9 +2676,8 @@ type RuntimeEventPayloadMap = Omit<RuntimeEventPayloadDefaults, "session.created
|
|
|
2480
2676
|
};
|
|
2481
2677
|
interface RuntimeEventEnvelope<TPayload = unknown> {
|
|
2482
2678
|
readonly id: string;
|
|
2679
|
+
/** Live in-process ordering hint within one Session; not comparable across restarts or Sessions. */
|
|
2483
2680
|
readonly seq: number;
|
|
2484
|
-
/** Session-bound replay position. Numeric seq values are not comparable across Sessions. */
|
|
2485
|
-
readonly cursor: RuntimeSessionCursor;
|
|
2486
2681
|
readonly time: string;
|
|
2487
2682
|
readonly sessionId: string;
|
|
2488
2683
|
readonly runId: string;
|
|
@@ -2490,11 +2685,6 @@ interface RuntimeEventEnvelope<TPayload = unknown> {
|
|
|
2490
2685
|
readonly type: RuntimeEventType;
|
|
2491
2686
|
readonly payload: TPayload;
|
|
2492
2687
|
}
|
|
2493
|
-
interface RuntimeSessionCursor {
|
|
2494
|
-
readonly sessionId: string;
|
|
2495
|
-
readonly journalEpoch: string;
|
|
2496
|
-
readonly seq: number;
|
|
2497
|
-
}
|
|
2498
2688
|
type RuntimeTypedEvent<TType extends RuntimeEventType = RuntimeEventType> = {
|
|
2499
2689
|
readonly [K in TType]: RuntimeEventEnvelope<RuntimeEventPayloadMap[K]> & {
|
|
2500
2690
|
readonly type: K;
|
|
@@ -2512,17 +2702,9 @@ type RuntimeEventParseResult = {
|
|
|
2512
2702
|
interface RuntimeEventFilterFields {
|
|
2513
2703
|
readonly type?: RuntimeEventType | readonly RuntimeEventType[];
|
|
2514
2704
|
}
|
|
2515
|
-
type RuntimeEventFilter = RuntimeEventFilterFields &
|
|
2705
|
+
type RuntimeEventFilter = RuntimeEventFilterFields & {
|
|
2516
2706
|
readonly sessionId: string;
|
|
2517
2707
|
readonly runId?: string;
|
|
2518
|
-
} | {
|
|
2519
|
-
readonly sessionId?: string;
|
|
2520
|
-
readonly runId: string;
|
|
2521
|
-
});
|
|
2522
|
-
type RuntimeEventReplayFilter = RuntimeEventFilter & {
|
|
2523
|
-
readonly after?: RuntimeSessionCursor;
|
|
2524
|
-
/** Positive safe-integer result bound. */
|
|
2525
|
-
readonly limit?: number;
|
|
2526
2708
|
};
|
|
2527
2709
|
type RuntimeEventListener = (event: RuntimeEvent) => void;
|
|
2528
2710
|
type RuntimeTypedEventListener = (event: RuntimeTypedEvent) => void;
|
|
@@ -2533,7 +2715,6 @@ interface RuntimeSubscription {
|
|
|
2533
2715
|
}
|
|
2534
2716
|
interface RuntimeEventService {
|
|
2535
2717
|
subscribe(filter: RuntimeEventFilter, listener: RuntimeEventListener): RuntimeSubscription;
|
|
2536
|
-
replay(filter: RuntimeEventReplayFilter): Promise<readonly RuntimeEvent[]>;
|
|
2537
2718
|
}
|
|
2538
2719
|
type RuntimePermissionRisk = "low" | "medium" | "high";
|
|
2539
2720
|
interface RuntimePermissionScope {
|
|
@@ -2549,6 +2730,8 @@ interface RuntimePermissionGrantSuggestion {
|
|
|
2549
2730
|
readonly label: string;
|
|
2550
2731
|
}
|
|
2551
2732
|
interface RuntimePermissionRequest {
|
|
2733
|
+
/** Full finalized plan when the pending operation is exit_plan_mode. */
|
|
2734
|
+
readonly plan?: string;
|
|
2552
2735
|
readonly id: string;
|
|
2553
2736
|
readonly sessionId: string;
|
|
2554
2737
|
readonly runId: string;
|
|
@@ -2567,6 +2750,7 @@ interface RuntimePermissionRequest {
|
|
|
2567
2750
|
readonly expiresAt?: string;
|
|
2568
2751
|
}
|
|
2569
2752
|
interface RuntimePermissionRequestInput {
|
|
2753
|
+
readonly plan?: string;
|
|
2570
2754
|
readonly sessionId: string;
|
|
2571
2755
|
readonly runId: string;
|
|
2572
2756
|
readonly turnId?: string;
|
|
@@ -2678,125 +2862,78 @@ interface RuntimeUserInputService {
|
|
|
2678
2862
|
readonly runId?: string;
|
|
2679
2863
|
}): Promise<RuntimeUserInputResolution>;
|
|
2680
2864
|
}
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
/** v1 compatibility: one credential is acquired for the complete Run. */
|
|
2692
|
-
readonly provider: string;
|
|
2693
|
-
} | {
|
|
2694
|
-
readonly leaseId: string;
|
|
2695
|
-
readonly mode: "scoped";
|
|
2696
|
-
/** Operation-local narrowing of the registered v2 lease allowlist. */
|
|
2697
|
-
readonly providers: readonly string[];
|
|
2698
|
-
};
|
|
2699
|
-
type RuntimeScopedCredentialTarget = {
|
|
2700
|
-
readonly kind: "run";
|
|
2701
|
-
readonly runId: string;
|
|
2702
|
-
readonly operationId?: string;
|
|
2703
|
-
} | {
|
|
2704
|
-
readonly kind: "operation";
|
|
2705
|
-
readonly operationId: string;
|
|
2706
|
-
readonly operation: "session.compact";
|
|
2707
|
-
} | {
|
|
2708
|
-
readonly kind: "actor_turn";
|
|
2709
|
-
readonly actorPath: string;
|
|
2710
|
-
readonly turnId: string;
|
|
2711
|
-
readonly parentRunId?: string;
|
|
2712
|
-
} | {
|
|
2713
|
-
readonly kind: "workflow";
|
|
2714
|
-
readonly workflowRunId: string;
|
|
2715
|
-
readonly parentRunId?: string;
|
|
2716
|
-
};
|
|
2717
|
-
type RuntimeScopedCredentialPurpose = "primary" | "fallback" | "classifier" | "sidecar" | "compaction" | "workflow" | "utility";
|
|
2718
|
-
interface RuntimeScopedCredentialRequest {
|
|
2719
|
-
readonly requestId: string;
|
|
2720
|
-
readonly leaseId: string;
|
|
2721
|
-
readonly provider: string;
|
|
2722
|
-
readonly sessionId: string;
|
|
2723
|
-
readonly target: RuntimeScopedCredentialTarget;
|
|
2724
|
-
readonly purpose: RuntimeScopedCredentialPurpose;
|
|
2725
|
-
}
|
|
2726
|
-
type RuntimeScopedCredentialBroker = (request: RuntimeScopedCredentialRequest) => Promise<string | undefined>;
|
|
2727
|
-
interface RuntimeCredentialLease {
|
|
2728
|
-
readonly id: string;
|
|
2729
|
-
readonly providers: readonly string[];
|
|
2730
|
-
readonly expiresAt?: string;
|
|
2731
|
-
/** Absent on legacy v1 daemons. */
|
|
2732
|
-
readonly brokerVersion?: 1 | 2;
|
|
2733
|
-
}
|
|
2734
|
-
interface RuntimeCredentialService {
|
|
2735
|
-
register(input: {
|
|
2736
|
-
readonly providers: readonly string[];
|
|
2737
|
-
readonly expiresAt?: string;
|
|
2738
|
-
}, broker: RuntimeCredentialBroker): Promise<RuntimeCredentialLease>;
|
|
2739
|
-
resume(leaseId: string, broker: RuntimeCredentialBroker): Promise<RuntimeCredentialLease>;
|
|
2740
|
-
registerScoped(input: {
|
|
2741
|
-
readonly providers: readonly string[];
|
|
2742
|
-
readonly expiresAt?: string;
|
|
2743
|
-
}, broker: RuntimeScopedCredentialBroker): Promise<RuntimeCredentialLease>;
|
|
2744
|
-
resumeScoped(leaseId: string, broker: RuntimeScopedCredentialBroker): Promise<RuntimeCredentialLease>;
|
|
2745
|
-
revoke(leaseId: string): Promise<boolean>;
|
|
2746
|
-
}
|
|
2747
|
-
interface RuntimeHostToolDescriptor {
|
|
2748
|
-
readonly name: string;
|
|
2749
|
-
readonly description: string;
|
|
2750
|
-
readonly inputSchema: Readonly<Record<string, unknown>>;
|
|
2751
|
-
readonly sideEffect: "none" | "idempotent" | "non_idempotent";
|
|
2752
|
-
}
|
|
2753
|
-
interface RuntimeHostToolInvocation {
|
|
2754
|
-
readonly invocationId: string;
|
|
2755
|
-
readonly leaseId: string;
|
|
2756
|
-
readonly toolName: string;
|
|
2757
|
-
readonly sessionId: string;
|
|
2758
|
-
readonly runId: string;
|
|
2759
|
-
readonly input: Readonly<Record<string, unknown>>;
|
|
2760
|
-
}
|
|
2761
|
-
interface RuntimeHostToolResult {
|
|
2762
|
-
readonly content: string;
|
|
2763
|
-
readonly structuredContent?: unknown;
|
|
2764
|
-
}
|
|
2765
|
-
type RuntimeHostToolHandler = (invocation: RuntimeHostToolInvocation) => Promise<RuntimeHostToolResult>;
|
|
2766
|
-
interface RuntimeHostToolLease {
|
|
2767
|
-
readonly id: string;
|
|
2768
|
-
readonly tools: readonly RuntimeHostToolDescriptor[];
|
|
2769
|
-
}
|
|
2770
|
-
interface RuntimeHostToolInvocationStatus {
|
|
2771
|
-
readonly invocationId: string;
|
|
2772
|
-
readonly leaseId: string;
|
|
2773
|
-
readonly toolName: string;
|
|
2774
|
-
readonly sessionId: string;
|
|
2775
|
-
readonly runId: string;
|
|
2776
|
-
readonly state: "prepared" | "dispatched" | "completed" | "unknown" | "not_dispatched";
|
|
2777
|
-
readonly updatedAt: string;
|
|
2778
|
-
}
|
|
2779
|
-
interface RuntimeHostToolService {
|
|
2780
|
-
register(tools: readonly RuntimeHostToolDescriptor[], handlers: Readonly<Record<string, RuntimeHostToolHandler>>): Promise<RuntimeHostToolLease>;
|
|
2781
|
-
resume(leaseId: string, handlers: Readonly<Record<string, RuntimeHostToolHandler>>): Promise<RuntimeHostToolLease>;
|
|
2782
|
-
getInvocation(invocationId: string): Promise<RuntimeHostToolInvocationStatus | undefined>;
|
|
2783
|
-
revoke(leaseId: string): Promise<boolean>;
|
|
2865
|
+
/**
|
|
2866
|
+
* Typed Interaction surface over the user-input and permission registries
|
|
2867
|
+
* (FEATURE_298 T05). The client path works with precise request ids only; no
|
|
2868
|
+
* interaction revision or lease is required.
|
|
2869
|
+
*/
|
|
2870
|
+
interface RuntimeInteractionService {
|
|
2871
|
+
list(filter?: {
|
|
2872
|
+
readonly sessionId?: string;
|
|
2873
|
+
}): Promise<readonly ClientInteraction[]>;
|
|
2874
|
+
respond(requestId: string, response: ClientInteractionResponse): Promise<ClientInteractionResult>;
|
|
2784
2875
|
}
|
|
2785
2876
|
interface RuntimeWorkflowFilter {
|
|
2786
2877
|
readonly runId?: string;
|
|
2787
2878
|
readonly activeOnly?: boolean;
|
|
2788
2879
|
readonly limit?: number;
|
|
2789
2880
|
}
|
|
2790
|
-
type RuntimeWorkflowSummary = ManagedWorkflowSnapshot
|
|
2881
|
+
type RuntimeWorkflowSummary = ManagedWorkflowSnapshot & {
|
|
2882
|
+
/** Host process facts; absent on older daemons. */
|
|
2883
|
+
readonly updatedAt?: string;
|
|
2884
|
+
readonly displayName?: string;
|
|
2885
|
+
};
|
|
2791
2886
|
type RuntimeWorkflowSnapshot = WorkflowProcessSnapshot;
|
|
2792
2887
|
type RuntimeWorkflowListener = (event: WorkflowProcessEvent) => void;
|
|
2888
|
+
/**
|
|
2889
|
+
* FEATURE_298 T22 — serializable start sources. `inline`/`request` travel to
|
|
2890
|
+
* the Host verbatim and are validated Host-side (the same gate the run_workflow
|
|
2891
|
+
* tool uses); `name` resolves inside the Host against built-ins and the saved
|
|
2892
|
+
* workflow directories. Clients never send a prepared module.
|
|
2893
|
+
*/
|
|
2894
|
+
type RuntimeWorkflowStartSource = {
|
|
2895
|
+
readonly kind: "inline";
|
|
2896
|
+
readonly manifest: unknown;
|
|
2897
|
+
readonly source: string;
|
|
2898
|
+
} | {
|
|
2899
|
+
readonly kind: "request";
|
|
2900
|
+
readonly request: string;
|
|
2901
|
+
} | {
|
|
2902
|
+
readonly kind: "name";
|
|
2903
|
+
readonly name: string;
|
|
2904
|
+
};
|
|
2905
|
+
interface RuntimeWorkflowStartInput {
|
|
2906
|
+
readonly authorization?: RuntimeExecutionAuthorization;
|
|
2907
|
+
/** Select product defaults; omitted low-level calls retain their existing defaults. */
|
|
2908
|
+
readonly settingsDefaults?: 'product';
|
|
2909
|
+
readonly sessionId?: string;
|
|
2910
|
+
readonly credential?: RuntimeCredentialBinding;
|
|
2911
|
+
readonly projectRoot: string;
|
|
2912
|
+
readonly source: RuntimeWorkflowStartSource;
|
|
2913
|
+
readonly args?: unknown;
|
|
2914
|
+
readonly provider?: string;
|
|
2915
|
+
readonly model?: string;
|
|
2916
|
+
/** FEATURE_298 T22 — serializable run lineage the Host attaches verbatim. */
|
|
2917
|
+
readonly metadata?: WorkflowRunProcessMetadata;
|
|
2918
|
+
}
|
|
2919
|
+
type RuntimeWorkflowStartResult = {
|
|
2920
|
+
readonly kind: "declined";
|
|
2921
|
+
readonly reason: string;
|
|
2922
|
+
} | {
|
|
2923
|
+
readonly kind: "started";
|
|
2924
|
+
readonly runId: string;
|
|
2925
|
+
};
|
|
2793
2926
|
interface RuntimeWorkflowService {
|
|
2794
2927
|
list(filter?: RuntimeWorkflowFilter): Promise<readonly RuntimeWorkflowSummary[]>;
|
|
2795
2928
|
get(runId: string): Promise<RuntimeWorkflowSnapshot | undefined>;
|
|
2796
|
-
subscribe(filter: RuntimeWorkflowFilter, listener: RuntimeWorkflowListener): RuntimeSubscription;
|
|
2929
|
+
subscribe(filter: RuntimeWorkflowFilter, listener: RuntimeWorkflowListener, onError?: (error: unknown) => void): RuntimeSubscription;
|
|
2797
2930
|
pause(runId: string): Promise<boolean>;
|
|
2798
2931
|
resume(runId: string): Promise<boolean>;
|
|
2799
|
-
stop(runId: string
|
|
2932
|
+
stop(runId: string, options?: {
|
|
2933
|
+
readonly sessionId: string;
|
|
2934
|
+
}): Promise<boolean>;
|
|
2935
|
+
/** FEATURE_298 T22 — start a workflow on the Host manager. */
|
|
2936
|
+
start(input: RuntimeWorkflowStartInput): Promise<RuntimeWorkflowStartResult>;
|
|
2800
2937
|
}
|
|
2801
2938
|
interface RuntimeStatusSnapshot {
|
|
2802
2939
|
readonly runtimeId: string;
|
|
@@ -2858,23 +2995,11 @@ interface RuntimeDaemonManagementState {
|
|
|
2858
2995
|
/** Optional integrations never make the core daemon unavailable. */
|
|
2859
2996
|
readonly integrations?: RuntimeIntegrationHealth;
|
|
2860
2997
|
}
|
|
2861
|
-
interface RuntimeDaemonRollbackInput {
|
|
2862
|
-
readonly expectedRuntimeId: string;
|
|
2863
|
-
readonly expectedRevision: number;
|
|
2864
|
-
readonly expectedOwnerPolicyRevision: number;
|
|
2865
|
-
readonly operation?: RuntimeOperationOptions;
|
|
2866
|
-
}
|
|
2867
|
-
interface RuntimeDaemonRollbackResult {
|
|
2868
|
-
readonly accepted: true;
|
|
2869
|
-
readonly runtimeId: string;
|
|
2870
|
-
readonly revision: number;
|
|
2871
|
-
readonly ownerPolicy: RuntimeOwnerPolicyState & {
|
|
2872
|
-
readonly mode: "inline";
|
|
2873
|
-
};
|
|
2874
|
-
}
|
|
2875
2998
|
interface RuntimeDaemonManagementService {
|
|
2999
|
+
shutdown(): Promise<{
|
|
3000
|
+
readonly accepted: true;
|
|
3001
|
+
}>;
|
|
2876
3002
|
inspect(): Promise<RuntimeDaemonManagementState>;
|
|
2877
|
-
stopForInline(input: RuntimeDaemonRollbackInput): Promise<RuntimeDaemonRollbackResult>;
|
|
2878
3003
|
}
|
|
2879
3004
|
interface RuntimeStatusService {
|
|
2880
3005
|
snapshot(): Promise<RuntimeStatusSnapshot>;
|
|
@@ -2885,16 +3010,19 @@ interface RuntimeStatusService {
|
|
|
2885
3010
|
* ownership of, resuming, or otherwise mutating the Session.
|
|
2886
3011
|
*/
|
|
2887
3012
|
declare function captureRuntimeSessionDiagnostics(runtime: KodaXRuntime, input: RuntimeSessionDiagnosticsInput): Promise<RuntimeSessionDiagnostics>;
|
|
3013
|
+
/**
|
|
3014
|
+
* Durable Stop reason marking a user redirect: the old execution is cancelled
|
|
3015
|
+
* but the explicitly requested follow-up input keeps its queue continuation.
|
|
3016
|
+
* Distinct from a plain stop, which never auto-continues queued work.
|
|
3017
|
+
*/
|
|
3018
|
+
declare const RUNTIME_REDIRECT_STOP_REASON = "runtime run redirected by user";
|
|
2888
3019
|
declare function createKodaXRuntime(options: CreateKodaXRuntimeOptions & {
|
|
2889
3020
|
readonly mode: "daemon";
|
|
2890
3021
|
}): Promise<KodaXDaemonRuntime>;
|
|
2891
3022
|
declare function createKodaXRuntime(options?: CreateKodaXRuntimeOptions): Promise<KodaXRuntime>;
|
|
2892
3023
|
declare function connectKodaXRuntime(options?: ConnectKodaXRuntimeOptions): Promise<KodaXDaemonRuntime>;
|
|
2893
|
-
/**
|
|
2894
|
-
|
|
2895
|
-
* a management-only client that does not satisfy the normal execution contract.
|
|
2896
|
-
*/
|
|
2897
|
-
declare function settleKodaXRuntimeExit(input: RuntimeExitSettlementInput): Promise<RuntimeExitSettlement>;
|
|
3024
|
+
/** Starts the product Host when absent and updates an idle older Host before attaching. */
|
|
3025
|
+
declare function ensureKodaXRuntime(options?: Omit<ConnectKodaXRuntimeOptions, "autoStart" | "transport">): Promise<KodaXDaemonRuntime>;
|
|
2898
3026
|
|
|
2899
|
-
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, RuntimeDaemonDisconnectError, RuntimePermissionScopeUpgradeRequiredError, RuntimeToolExposurePlan, RuntimeTransportBoundaryError, SessionTranscriptEntry, acquireKodaXInlineOwner, captureRuntimeSessionDiagnostics, connectKodaXRuntime, createKodaXRuntime, enableKodaXDaemonOwner,
|
|
2900
|
-
export type { ConnectKodaXRuntimeOptions, CreateKodaXRuntimeOptions, KodaXDaemonRuntime, KodaXRuntime, KodaXRuntimeIsolation, KodaXRuntimeMode, RuntimeActiveAgentTurn, RuntimeActiveToolProjection, RuntimeAdminService, RuntimeAgentBindingService, RuntimeAgentFollowupOptions, RuntimeAgentOperationOptions, RuntimeAgentOwnerSession, RuntimeAgentService, RuntimeAppendNoticeInput, RuntimeArtifact, RuntimeArtifactKind, RuntimeArtifactRefInput, RuntimeArtifactService, RuntimeAutoReviewOptions, RuntimeBoundDefaultAgent, RuntimeBoundLocalAgent, RuntimeCapabilityRequirements, RuntimeCatalogService, RuntimeClientCapabilities,
|
|
3027
|
+
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, RUNTIME_REDIRECT_STOP_REASON, RuntimeAutoModeConfigurationError, RuntimeClientInfo, RuntimeContextBudgetSnapshot, RuntimeCredentialBinding, RuntimeCredentialService, RuntimeDaemonCapabilityUpgradeError, RuntimeDaemonClientType, RuntimeDaemonDisconnectError, RuntimeExecutionAuthorization, RuntimeHostToolService, RuntimePermissionScopeUpgradeRequiredError, RuntimeToolExposurePlan, RuntimeTransportBoundaryError, SessionTranscriptEntry, acquireKodaXInlineOwner, captureRuntimeSessionDiagnostics, connectKodaXRuntime, createKodaXRuntime, enableKodaXDaemonOwner, ensureKodaXRuntime, getKodaXRuntimeOwnerState, handleRuntimePermissionRequest, isRuntimeDaemonDisconnectError, listRuntimeDaemonSchemaMethods, parseRuntimeEvent, setKodaXRuntimeOwnerMode, waitForRuntimeDaemonShutdown };
|
|
3028
|
+
export type { ConnectKodaXRuntimeOptions, CreateKodaXRuntimeOptions, KodaXDaemonRuntime, KodaXRuntime, KodaXRuntimeIsolation, KodaXRuntimeMode, RuntimeActiveAgentTurn, RuntimeActiveToolProjection, RuntimeAdminService, RuntimeAgentBindingService, RuntimeAgentFollowupOptions, RuntimeAgentOperationOptions, RuntimeAgentOwnerSession, RuntimeAgentService, RuntimeAppendNoticeInput, RuntimeArtifact, RuntimeArtifactKind, RuntimeArtifactRefInput, RuntimeArtifactService, RuntimeAutoReviewOptions, RuntimeBoundDefaultAgent, RuntimeBoundLocalAgent, RuntimeBuildIdentity, RuntimeCapabilityRequirements, RuntimeCatalogService, RuntimeClientCapabilities, RuntimeCommandInfo, RuntimeCommandResolveInput, RuntimeCompactSessionInput, RuntimeCompactSessionResult, RuntimeCompactionReasoning, RuntimeConfigPatch, RuntimeConfigReloadResult, RuntimeConfigService, RuntimeConfirmIdentityAliasInput, RuntimeConnectionService, RuntimeConnectionState, RuntimeContextCompactionEndedEventPayload, RuntimeContextCompactionFinishedEventPayload, RuntimeContextCompactionMessagesEventPayload, RuntimeContextCompactionSkippedEventPayload, RuntimeContextCompactionStartedEventPayload, RuntimeContextCompactionStatsEventPayload, RuntimeContinuationStatus, RuntimeConversationHistory, RuntimeConversationHistoryBoundary, RuntimeConversationHistoryEntryChunk, RuntimeConversationHistoryEntryChunkInput, RuntimeConversationHistoryPageInput, RuntimeConversationHistorySlice, RuntimeConversationHistorySliceEntry, RuntimeCreateArtifactInput, RuntimeCreateSessionInput, RuntimeDaemonClientSnapshot, RuntimeDaemonClientTransport, RuntimeDaemonContextOptions, RuntimeDaemonDisconnectCode, RuntimeDaemonEndpoint, RuntimeDaemonError, RuntimeDaemonErrorCode, RuntimeDaemonFrame, RuntimeDaemonJsonSchema, RuntimeDaemonKodaXOptions, RuntimeDaemonManagementService, RuntimeDaemonManagementState, RuntimeDaemonMethod, RuntimeDaemonMethodSchema, RuntimeDaemonNotification, RuntimeDaemonNotificationMethod, RuntimeDaemonPreflight, RuntimeDaemonProtocolSchema, RuntimeDaemonRequest, RuntimeDaemonRequestControl, RuntimeDaemonRunService, RuntimeDaemonShutdownVerification, RuntimeDaemonShutdownVerificationInput, RuntimeDaemonShutdownVerificationOwner, RuntimeDaemonStartRunInput, RuntimeDaemonTransportLifecycleState, RuntimeDefaultAgentStartInput, RuntimeDeliveredInterruptInput, RuntimeEffectiveConfigEntry, RuntimeEffectiveConfigSnapshot, RuntimeEffectiveConfigSource, RuntimeEffectiveCredentialEntry, RuntimeEffectiveSkillRef, RuntimeEvent, RuntimeEventEnvelope, RuntimeEventFilter, RuntimeEventListener, RuntimeEventParseResult, RuntimeEventPayloadMap, RuntimeEventService, RuntimeEventType, RuntimeExactCallPermissionMatcher, RuntimeExactCommandPermissionMatcher, RuntimeExactPathPermissionMatcher, RuntimeExecPolicyOptions, RuntimeExecutionToolPolicy, RuntimeExtensionListResult, RuntimeExtensionReloadResult, RuntimeExternalAgentsOptions, RuntimeFailureDetail, RuntimeFailureStage, RuntimeFileInput, RuntimeForkSessionInput, RuntimeGrantedScope, RuntimeIdentity, RuntimeImageInput, RuntimeInlineOwnerHandle, RuntimeInput, RuntimeIntegrationDiagnostic, RuntimeIntegrationDomainStatus, RuntimeIntegrationHealth, RuntimeInteractionResolvedEventPayload, RuntimeInteractionService, RuntimeInterruptInputStatus, RuntimeInvocationService, RuntimeKodaXOptions, RuntimeLearningService, RuntimeLocalAgentStartInput, RuntimeManagedTaskProjection, RuntimeMcpReloadResult, RuntimeMcpService, RuntimeMcpToolListFilter, RuntimeMcpValidateResult, RuntimeMemoryPlane, RuntimeMemoryRebuildResult, RuntimeMemoryService, RuntimeModelListFilter, RuntimeObservationInvalidation, RuntimeOutputSegmentStartedEventPayload, RuntimeOwnerIdentity, RuntimeOwnerPolicyState, RuntimeOwnerState, RuntimePendingUserInputProjection, RuntimePermissionBroker, RuntimePermissionDecision, RuntimePermissionFilter, RuntimePermissionGrant, RuntimePermissionGrantChangedEventPayload, RuntimePermissionGrantSuggestion, RuntimePermissionHostPlatform, RuntimePermissionMatcher, RuntimePermissionMode, RuntimePermissionModeInput, RuntimePermissionPrompt, RuntimePermissionPromptContext, RuntimePermissionPromptResolution, RuntimePermissionRequest, RuntimePermissionRequestInput, RuntimePermissionRespondOptions, RuntimePermissionRisk, RuntimePermissionScope, RuntimePermissionService, RuntimeProviderErrorCode, RuntimeReadOptions, RuntimeRecoverSessionInput, RuntimeResolvedLocalAgent, RuntimeRewindSessionInput, RuntimeRunFailureKind, RuntimeRunFilter, RuntimeRunHandle, RuntimeRunInputDeliveredEventPayload, RuntimeRunInputQueuedEventPayload, RuntimeRunLifecycleError, RuntimeRunMode, RuntimeRunPhase, RuntimeRunProgressEventPayload, RuntimeRunRequirements, RuntimeRunResult, RuntimeRunService, RuntimeRunSessionLoadedEventPayload, RuntimeRunStage, RuntimeRunStatus, RuntimeRunStopReceipt, RuntimeRunStopStatus, RuntimeSession, RuntimeSessionCancelInput, RuntimeSessionCancelReceipt, RuntimeSessionDiagnosticError, RuntimeSessionDiagnosticErrorCode, RuntimeSessionDiagnosticRun, RuntimeSessionDiagnostics, RuntimeSessionDiagnosticsInput, RuntimeSessionFilter, RuntimeSessionLiveProjection, RuntimeSessionLoadedEventPayload, RuntimeSessionObservation, RuntimeSessionObservationSnapshot, RuntimeSessionService, RuntimeSessionSettings, RuntimeSessionSettingsPatch, RuntimeSessionSettingsUpdatedEventPayload, RuntimeSessionStatus, 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, RuntimeWorkflowFilter, RuntimeWorkflowListener, RuntimeWorkflowService, RuntimeWorkflowSnapshot, RuntimeWorkflowStartInput, RuntimeWorkflowStartResult, RuntimeWorkflowStartSource, RuntimeWorkflowSummary, RuntimeWorkspaceBinding };
|