@kodax-ai/kodax 0.7.78 → 0.7.80
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 +3556 -3197
- package/README.md +371 -277
- package/README_CN.md +295 -215
- package/config-templates/config.example.jsonc +24 -2
- package/config-templates/integrations/a2a.example.jsonc +23 -7
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.js +2 -1
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.js +4 -3
- package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/compare-runs.js +4 -3
- package/dist/builtin/skill-creator/scripts/generate-review.js +2 -1
- package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/grade-evals.js +4 -3
- package/dist/builtin/skill-creator/scripts/improve-description.js +2 -1
- package/dist/builtin/skill-creator/scripts/init-skill.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/init-skill.js +4 -3
- package/dist/builtin/skill-creator/scripts/install-skill.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/install-skill.js +4 -3
- package/dist/builtin/skill-creator/scripts/package-skill.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/package-skill.js +4 -3
- package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/quick-validate.js +4 -3
- package/dist/builtin/skill-creator/scripts/run-eval.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/run-eval.js +4 -3
- package/dist/builtin/skill-creator/scripts/run-loop.js +2 -1
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.js +2 -1
- package/dist/builtin/skill-creator/scripts/utils.d.ts +3 -0
- package/dist/builtin/skill-creator/scripts/utils.js +5 -1
- package/dist/chunks/agent-5PHGNFW3.js +2 -0
- package/dist/chunks/argument-completer-FXRZFMTC.js +2 -0
- package/dist/chunks/chunk-6UENDY33.js +89 -0
- package/dist/chunks/{chunk-6FOJVETH.js → chunk-BWX4YZX3.js} +7 -7
- package/dist/chunks/chunk-CDCCTM5I.js +278 -0
- package/dist/chunks/chunk-CEB5FDND.js +810 -0
- package/dist/chunks/{chunk-2CFHBKRE.js → chunk-E7C4DRD2.js} +2 -2
- package/dist/chunks/chunk-EVXIJPZ6.js +218 -0
- package/dist/chunks/chunk-FQ7NVMSU.js +319 -0
- package/dist/chunks/chunk-GC4JBMBS.js +385 -0
- package/dist/chunks/{chunk-Z3KFRTSB.js → chunk-HTVLCHWH.js} +1 -1
- package/dist/chunks/chunk-IHPH3444.js +655 -0
- package/dist/chunks/{chunk-YAZQTC2L.js → chunk-KHEFUT6O.js} +1 -1
- package/dist/chunks/{chunk-7OEBJGHK.js → chunk-PMKAG4SZ.js} +1 -1
- package/dist/chunks/chunk-RPF5RGWZ.js +479 -0
- package/dist/chunks/{chunk-UID7BLAB.js → chunk-RXXKDR6Y.js} +1 -1
- package/dist/chunks/chunk-T5U4OP2N.js +292 -0
- package/dist/chunks/chunk-TRNAWSXP.js +123 -0
- package/dist/chunks/chunk-UZSHBQER.js +30 -0
- package/dist/chunks/{chunk-TQDBTTIM.js → chunk-VECRQTSD.js} +44 -44
- package/dist/chunks/compaction-config-6J6XCBJS.js +2 -0
- package/dist/chunks/{construction-bootstrap-VQLQGWPY.js → construction-bootstrap-KPCAE3VN.js} +1 -1
- package/dist/chunks/dist-RWEVZOFK.js +2 -0
- package/dist/chunks/{dist-BFT5YIGU.js → dist-WWL2DNIJ.js} +1 -1
- package/dist/chunks/host-OGS2R5J4.js +2 -0
- package/dist/chunks/run-manager-2YMM3BOT.js +2 -0
- package/dist/chunks/{utils-SID4HW2Q.js → utils-2YHRUZYC.js} +1 -1
- package/dist/index.d.ts +21 -20
- package/dist/index.js +4 -4
- package/dist/kodax_bootstrap.js +2 -1
- package/dist/kodax_cli.js +1850 -1476
- package/dist/kodax_resume.js +570 -34
- package/dist/provider-capabilities.json +85 -50
- package/dist/runtime-worker.js +1737 -1369
- package/dist/sandbox-workspace-session.js +285 -19
- package/dist/sdk-a2a.d.ts +19 -13
- package/dist/sdk-a2a.js +8 -8
- package/dist/sdk-agent.d.ts +80 -150
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +186 -66
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +3 -3
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +7 -7
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +31 -213
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +230 -31
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +8 -8
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +283 -18
- package/dist/types-chunks/{base.d-4e74xDdy.d.ts → base.d-DxG0m09Z.d.ts} +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-uAe2Oqda.d.ts → bash-prefix-extractor.d-DStqKIlu.d.ts} +31 -8
- package/dist/types-chunks/{capability-learning.d-CVsdHw4j.d.ts → capability-learning.d-iPSiAmc_.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-BlSv9l3V.d.ts → capsule.d-BuFJaYxA.d.ts} +14 -21
- package/dist/types-chunks/{types.d-BA-Jwpfs.d.ts → controller.d-C2aHqzHj.d.ts} +344 -11
- package/dist/types-chunks/{guardrail.d-CXDYRgZ3.d.ts → guardrail.d-DM-OK0m3.d.ts} +187 -116
- package/dist/types-chunks/{history-retrieval.d-DtCy7x64.d.ts → history-retrieval.d-DImTKgO6.d.ts} +16 -3
- package/dist/types-chunks/{oauth-login.d-Bgb4rdLN.d.ts → oauth-login.d-6i-vidxv.d.ts} +6 -2
- package/dist/types-chunks/{public-api.d-B3AohsxN.d.ts → public-api.d-CewTvUKV.d.ts} +335 -38
- package/dist/types-chunks/{repl.d-Ie_ZXb_U.d.ts → repl.d-DvXQtgr7.d.ts} +5 -5
- package/dist/types-chunks/{resolver.d-iAQ9ocLB.d.ts → resolver.d-C9IW4fmU.d.ts} +5 -2
- package/dist/types-chunks/{run-manager.d-D1twIhF9.d.ts → run-manager.d-C6ahvZqK.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-DB9KksIx.d.ts → sdk-session-C59RUrri.d.ts} +3 -3
- package/dist/types-chunks/shell-command-sets.d-Dp4UvPLL.d.ts +297 -0
- package/dist/types-chunks/{side-query.d-DTuLPcC5.d.ts → side-query.d-CP1LiRiH.d.ts} +8 -2
- package/dist/types-chunks/{types-D3g6XUQr.d.ts → types-Bf3Y3mW-.d.ts} +1 -1
- package/dist/types-chunks/{types.d-BH0ZkTGf.d.ts → types.d-BzpPDBPV.d.ts} +2 -2
- package/dist/types-chunks/{types.d-DIpZJKUl.d.ts → types.d-CgrXrFrq.d.ts} +16 -2
- package/dist/types-chunks/{types.d-DVDTIfB_.d.ts → types.d-yuJzE82x.d.ts} +4 -4
- package/dist/types-chunks/{utils.d-CVp6bFl9.d.ts → utils.d-BpACJmzt.d.ts} +24 -6
- package/docs/SDK_EMBEDDER_GUIDE.md +1148 -598
- package/package.json +6 -3
- package/dist/chunks/agent-ASP4MS3X.js +0 -2
- package/dist/chunks/argument-completer-JYQ7FX3W.js +0 -2
- package/dist/chunks/chunk-35PPHOQ2.js +0 -292
- package/dist/chunks/chunk-43QNNDHR.js +0 -29
- package/dist/chunks/chunk-5GO6FH7L.js +0 -458
- package/dist/chunks/chunk-5NDCSFOP.js +0 -78
- package/dist/chunks/chunk-6XM4B6K2.js +0 -48
- package/dist/chunks/chunk-6YZUE6NC.js +0 -240
- package/dist/chunks/chunk-KQLQYHWU.js +0 -386
- package/dist/chunks/chunk-NXO6GWSY.js +0 -46
- package/dist/chunks/chunk-T2XZTLYE.js +0 -316
- package/dist/chunks/chunk-VAT2QYXM.js +0 -765
- package/dist/chunks/chunk-YVRYHC4C.js +0 -655
- package/dist/chunks/compaction-config-BQSSIWK5.js +0 -2
- package/dist/chunks/dist-PCFE24YP.js +0 -2
- package/dist/chunks/host-UTFXCYYM.js +0 -2
- package/dist/chunks/run-manager-PJU3WIFJ.js +0 -2
- package/dist/types-chunks/guardrail.d-BRE_ErEj.d.ts +0 -156
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as KodaXMessage,
|
|
1
|
+
import { k as KodaXMessage, a2 as KodaXToolDefinition, G as KodaXReasoningMode, aa as KodaXWireReasoningEffort, a4 as KodaXToolResultContentItem, Z as KodaXThinkingBlock, J as KodaXRedactedThinkingBlock } from './types.d-CgrXrFrq.js';
|
|
2
2
|
|
|
3
3
|
type AgentActorState = 'running' | 'idle' | 'closed';
|
|
4
4
|
type AgentTurnState = 'accepted' | 'running' | 'completed' | 'failed' | 'interrupted';
|
|
@@ -124,6 +124,8 @@ interface AgentTreeSnapshot {
|
|
|
124
124
|
readonly activeNonRootTurns: number;
|
|
125
125
|
readonly maxConcurrentThreads: number;
|
|
126
126
|
readonly revision: number;
|
|
127
|
+
/** Turn-admission state revision; absent only on older/custom clients. */
|
|
128
|
+
readonly admissionRevision?: number;
|
|
127
129
|
}
|
|
128
130
|
interface AgentTurnSummary {
|
|
129
131
|
readonly turnId: string;
|
|
@@ -203,12 +205,16 @@ interface AgentMutationOptions {
|
|
|
203
205
|
readonly expectedRevision?: number;
|
|
204
206
|
/** Optimistic tree revision checked inside the serialized durable mutation. */
|
|
205
207
|
readonly expectedTreeRevision?: number;
|
|
208
|
+
/** Optimistic turn-admission revision, excluding progress and mailbox writes. */
|
|
209
|
+
readonly expectedAdmissionRevision?: number;
|
|
206
210
|
}
|
|
207
211
|
interface AgentTurnExecutor {
|
|
208
212
|
execute(input: AgentExecutionInput): Promise<AgentExecutionResult>;
|
|
209
213
|
}
|
|
210
214
|
interface AgentActorSnapshotContents {
|
|
211
215
|
readonly revision: number;
|
|
216
|
+
/** Added after schema v2; legacy snapshots derive it from revision on load. */
|
|
217
|
+
readonly admissionRevision?: number;
|
|
212
218
|
readonly maxConcurrentThreads: number;
|
|
213
219
|
readonly actors: readonly AgentActor[];
|
|
214
220
|
readonly turns: readonly AgentTurn[];
|
|
@@ -246,6 +252,8 @@ interface AgentActorStore {
|
|
|
246
252
|
/** Runtime-bound actor control surface. The caller path is minted by Runtime. */
|
|
247
253
|
interface AgentActorClient {
|
|
248
254
|
readonly callerPath: string;
|
|
255
|
+
/** Stable in-process identity shared by clients bound to the same Actor tree. */
|
|
256
|
+
readonly admissionScope?: object;
|
|
249
257
|
spawn(input: AgentSpawnInput, options?: AgentMutationOptions): Promise<AgentTurnRef>;
|
|
250
258
|
send(targetPath: string, content: string, classification?: AgentDataClassification, forwardedMessageId?: string): Promise<AgentMailboxMessage>;
|
|
251
259
|
followup(targetPath: string, objective: string, metadata?: Readonly<Record<string, AgentMetadataValue>>, options?: AgentMutationOptions): Promise<AgentFollowupResult>;
|
|
@@ -1979,6 +1987,172 @@ declare function buildAssistantMessageFromLlmResult(result: RunnerLlmResult): Ag
|
|
|
1979
1987
|
*/
|
|
1980
1988
|
declare function buildToolResultMessage(calls: readonly RunnerToolCall[], results: readonly RunnerToolResult[]): AgentMessage;
|
|
1981
1989
|
|
|
1990
|
+
/**
|
|
1991
|
+
* Guardrail Runtime — FEATURE_085 (v0.7.26).
|
|
1992
|
+
*
|
|
1993
|
+
* Three-tier runtime for Agent guardrails:
|
|
1994
|
+
*
|
|
1995
|
+
* - `InputGuardrail`: runs once before the first LLM turn, inspects the
|
|
1996
|
+
* full input transcript, may allow / rewrite / block / escalate.
|
|
1997
|
+
* - `OutputGuardrail`: runs once before returning, inspects the final
|
|
1998
|
+
* assistant message, may allow / rewrite / block / escalate.
|
|
1999
|
+
* - `ToolGuardrail`: runs before and/or after each tool invocation,
|
|
2000
|
+
* inspects the call / result, may allow / rewrite / block / escalate.
|
|
2001
|
+
*
|
|
2002
|
+
* The four verdict actions:
|
|
2003
|
+
*
|
|
2004
|
+
* - `allow`: continue with the current value.
|
|
2005
|
+
* - `rewrite`: replace the current value with `payload`.
|
|
2006
|
+
* - `block`: throw `GuardrailBlockedError` (for input/output) or surface
|
|
2007
|
+
* an error tool_result (for tool-before); the LLM / caller sees a
|
|
2008
|
+
* rejection and must adapt.
|
|
2009
|
+
* - `escalate`: throw `GuardrailEscalateError`; the SDK consumer catches
|
|
2010
|
+
* and decides whether to prompt the user, retry under different
|
|
2011
|
+
* constraints, etc.
|
|
2012
|
+
*
|
|
2013
|
+
* Every guardrail invocation emits a `GuardrailSpan` under the agent's
|
|
2014
|
+
* span when tracing is active.
|
|
2015
|
+
*
|
|
2016
|
+
* @experimental API shape may adjust during v0.7.x rollout.
|
|
2017
|
+
*/
|
|
2018
|
+
|
|
2019
|
+
/**
|
|
2020
|
+
* Runtime-authenticated intent metadata for permission guardrails.
|
|
2021
|
+
*
|
|
2022
|
+
* This is deliberately separate from the model-visible transcript: a child
|
|
2023
|
+
* briefing is context generated by the Runtime, not a new user authorization.
|
|
2024
|
+
*/
|
|
2025
|
+
interface GuardrailPermissionIntent {
|
|
2026
|
+
readonly rootUserIntent?: string;
|
|
2027
|
+
readonly delegatedObjective?: string;
|
|
2028
|
+
readonly bindingConstraints?: readonly string[];
|
|
2029
|
+
readonly scopeHint?: string;
|
|
2030
|
+
readonly readOnly?: boolean;
|
|
2031
|
+
}
|
|
2032
|
+
/**
|
|
2033
|
+
* Shared execution context passed to every guardrail.
|
|
2034
|
+
*
|
|
2035
|
+
* `messages` is the live conversation transcript at the moment this
|
|
2036
|
+
* guardrail fires. For tool-side guardrails this is the transcript at
|
|
2037
|
+
* call-site time — it does NOT yet include the assistant turn that
|
|
2038
|
+
* emitted the current tool_use, since that turn is appended only after
|
|
2039
|
+
* the full tool batch settles. Optional so existing guardrails that
|
|
2040
|
+
* don't read context still type-check; populated by the Runner for all
|
|
2041
|
+
* production hook points.
|
|
2042
|
+
*
|
|
2043
|
+
* Added in FEATURE_092 (v0.7.33) so the auto-mode classifier guardrail
|
|
2044
|
+
* can extract intent context (user prompt + prior tool_use / tool_result
|
|
2045
|
+
* blocks) without reaching into Runner internals.
|
|
2046
|
+
*/
|
|
2047
|
+
interface GuardrailContext {
|
|
2048
|
+
readonly agent: Agent;
|
|
2049
|
+
readonly abortSignal?: AbortSignal;
|
|
2050
|
+
readonly messages?: readonly AgentMessage[];
|
|
2051
|
+
readonly permissionIntent?: GuardrailPermissionIntent;
|
|
2052
|
+
}
|
|
2053
|
+
/**
|
|
2054
|
+
* Outcome of a single guardrail check. `payload` shape depends on the hook
|
|
2055
|
+
* point — see the specific guardrail interface for the expected type.
|
|
2056
|
+
*/
|
|
2057
|
+
type GuardrailVerdict = {
|
|
2058
|
+
readonly action: 'allow';
|
|
2059
|
+
} | {
|
|
2060
|
+
readonly action: 'rewrite';
|
|
2061
|
+
readonly payload: unknown;
|
|
2062
|
+
readonly reason?: string;
|
|
2063
|
+
} | {
|
|
2064
|
+
readonly action: 'block';
|
|
2065
|
+
readonly reason: string;
|
|
2066
|
+
} | {
|
|
2067
|
+
readonly action: 'escalate';
|
|
2068
|
+
readonly reason: string;
|
|
2069
|
+
};
|
|
2070
|
+
/**
|
|
2071
|
+
* Input-side guardrail. Expected `rewrite` payload shape:
|
|
2072
|
+
* `readonly AgentMessage[]` — the replacement transcript.
|
|
2073
|
+
*/
|
|
2074
|
+
interface InputGuardrail extends Guardrail {
|
|
2075
|
+
readonly kind: 'input';
|
|
2076
|
+
check(input: readonly AgentMessage[], ctx: GuardrailContext): Promise<GuardrailVerdict>;
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* Output-side guardrail. Expected `rewrite` payload shape:
|
|
2080
|
+
* `AgentMessage` — the replacement final assistant message.
|
|
2081
|
+
*/
|
|
2082
|
+
interface OutputGuardrail extends Guardrail {
|
|
2083
|
+
readonly kind: 'output';
|
|
2084
|
+
check(output: AgentMessage, ctx: GuardrailContext): Promise<GuardrailVerdict>;
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Tool-side guardrail. `beforeTool` rewrite payload shape: `RunnerToolCall`
|
|
2088
|
+
* (replacement call). `afterTool` rewrite payload shape: `RunnerToolResult`
|
|
2089
|
+
* (replacement result). Either hook is optional.
|
|
2090
|
+
*/
|
|
2091
|
+
interface ToolGuardrail extends Guardrail {
|
|
2092
|
+
readonly kind: 'tool';
|
|
2093
|
+
beforeTool?(call: RunnerToolCall, ctx: GuardrailContext): Promise<GuardrailVerdict>;
|
|
2094
|
+
afterTool?(call: RunnerToolCall, result: RunnerToolResult, ctx: GuardrailContext): Promise<GuardrailVerdict>;
|
|
2095
|
+
}
|
|
2096
|
+
/**
|
|
2097
|
+
* Thrown when any guardrail returns `{ action: 'block' }`. The Runner
|
|
2098
|
+
* propagates this up to the caller — the run is aborted at that point.
|
|
2099
|
+
*/
|
|
2100
|
+
declare class GuardrailBlockedError extends Error {
|
|
2101
|
+
readonly guardrailName: string;
|
|
2102
|
+
readonly hookPoint: 'input' | 'output' | 'tool';
|
|
2103
|
+
constructor(guardrailName: string, hookPoint: 'input' | 'output' | 'tool', reason: string);
|
|
2104
|
+
}
|
|
2105
|
+
/**
|
|
2106
|
+
* Thrown when any guardrail returns `{ action: 'escalate' }`. Callers can
|
|
2107
|
+
* catch and prompt the user or apply a stricter policy before retrying.
|
|
2108
|
+
*/
|
|
2109
|
+
declare class GuardrailEscalateError extends Error {
|
|
2110
|
+
readonly guardrailName: string;
|
|
2111
|
+
readonly hookPoint: 'input' | 'output' | 'tool';
|
|
2112
|
+
constructor(guardrailName: string, hookPoint: 'input' | 'output' | 'tool', reason: string);
|
|
2113
|
+
}
|
|
2114
|
+
/** Filter a guardrail list by hook-point. */
|
|
2115
|
+
declare function collectGuardrails(guardrails: readonly Guardrail[] | undefined): {
|
|
2116
|
+
input: readonly InputGuardrail[];
|
|
2117
|
+
output: readonly OutputGuardrail[];
|
|
2118
|
+
tool: readonly ToolGuardrail[];
|
|
2119
|
+
};
|
|
2120
|
+
/**
|
|
2121
|
+
* Run all input guardrails in declaration order. Returns the (possibly
|
|
2122
|
+
* rewritten) transcript. Throws on block / escalate.
|
|
2123
|
+
*/
|
|
2124
|
+
declare function runInputGuardrails(transcript: readonly AgentMessage[], guardrails: readonly InputGuardrail[], ctx: GuardrailContext, agentSpan: Span | null): Promise<readonly AgentMessage[]>;
|
|
2125
|
+
/**
|
|
2126
|
+
* Run all output guardrails in declaration order. Returns the (possibly
|
|
2127
|
+
* rewritten) final assistant message. Throws on block / escalate.
|
|
2128
|
+
*/
|
|
2129
|
+
declare function runOutputGuardrails(output: AgentMessage, guardrails: readonly OutputGuardrail[], ctx: GuardrailContext, agentSpan: Span | null): Promise<AgentMessage>;
|
|
2130
|
+
/**
|
|
2131
|
+
* Outcome of the before-tool guardrail stage.
|
|
2132
|
+
* - `{ kind: 'allow', call }`: continue to executeRunnerToolCall with `call`
|
|
2133
|
+
* - `{ kind: 'block', result }`: skip execution; return `result` as the
|
|
2134
|
+
* tool_result to the LLM (so it sees the rejection and can adapt)
|
|
2135
|
+
*/
|
|
2136
|
+
type ToolBeforeOutcome = {
|
|
2137
|
+
readonly kind: 'allow';
|
|
2138
|
+
readonly call: RunnerToolCall;
|
|
2139
|
+
} | {
|
|
2140
|
+
readonly kind: 'block';
|
|
2141
|
+
readonly call: RunnerToolCall;
|
|
2142
|
+
readonly result: RunnerToolResult;
|
|
2143
|
+
};
|
|
2144
|
+
/**
|
|
2145
|
+
* Run before-tool guardrails in declaration order. Rewrite replaces the
|
|
2146
|
+
* tool call. Block surfaces an error tool_result to the LLM instead of
|
|
2147
|
+
* throwing — the LLM sees the rejection and adapts. Escalate still throws.
|
|
2148
|
+
*/
|
|
2149
|
+
declare function runToolBeforeGuardrails(call: RunnerToolCall, guardrails: readonly ToolGuardrail[], ctx: GuardrailContext, agentSpan: Span | null): Promise<ToolBeforeOutcome>;
|
|
2150
|
+
/**
|
|
2151
|
+
* Run after-tool guardrails in declaration order. Rewrite replaces the
|
|
2152
|
+
* result content. Block replaces with an error result. Escalate throws.
|
|
2153
|
+
*/
|
|
2154
|
+
declare function runToolAfterGuardrails(call: RunnerToolCall, result: RunnerToolResult, guardrails: readonly ToolGuardrail[], ctx: GuardrailContext, agentSpan: Span | null): Promise<RunnerToolResult>;
|
|
2155
|
+
|
|
1982
2156
|
/**
|
|
1983
2157
|
* Layer A Primitive: Runner
|
|
1984
2158
|
*
|
|
@@ -2055,18 +2229,21 @@ interface RunOptions {
|
|
|
2055
2229
|
* this union. See `@kodax-ai/agent/primitives/guardrail.ts` for shape.
|
|
2056
2230
|
*/
|
|
2057
2231
|
readonly guardrails?: readonly Guardrail[];
|
|
2232
|
+
/** Trusted authority context kept separate from the conversation transcript. */
|
|
2233
|
+
readonly permissionIntent?: GuardrailPermissionIntent;
|
|
2058
2234
|
/**
|
|
2059
2235
|
* Per-run override for the tool-loop iteration cap. When omitted, the
|
|
2060
|
-
* loop uses `MAX_TOOL_LOOP_ITERATIONS` (20)
|
|
2061
|
-
* stand-alone
|
|
2062
|
-
*
|
|
2063
|
-
* higher cap because the iteration counter is shared across every
|
|
2064
|
-
* role in the chain. Legacy `runManagedTask` gave each role its own
|
|
2065
|
-
* `DEFAULT_MANAGED_WORK_BUDGET` (200) — the Runner-driven path passes
|
|
2066
|
-
* that value here so long investigations don't trip the safety valve
|
|
2067
|
-
* after ~20 tool calls.
|
|
2236
|
+
* loop uses `MAX_TOOL_LOOP_ITERATIONS` (20), a safe ceiling for
|
|
2237
|
+
* stand-alone runs. Terminal continuations may consume the Runner's small
|
|
2238
|
+
* bounded continuation reserve unless `maxTotalIterations` narrows it.
|
|
2068
2239
|
*/
|
|
2069
2240
|
readonly maxToolLoopIterations?: number;
|
|
2241
|
+
/**
|
|
2242
|
+
* Optional absolute per-run ceiling that continuation reserves cannot
|
|
2243
|
+
* extend. Callers that omit it retain the bounded continuation reserve;
|
|
2244
|
+
* managed orchestration uses it as a mechanical runaway fuse.
|
|
2245
|
+
*/
|
|
2246
|
+
readonly maxTotalIterations?: number;
|
|
2070
2247
|
/**
|
|
2071
2248
|
* v0.7.26 parity: observer callbacks fired around every tool
|
|
2072
2249
|
* invocation. Legacy `runManagedTask` emitted `events.onToolResult`
|
|
@@ -2349,6 +2526,13 @@ interface RunnerRecoveryTranscriptCarrier {
|
|
|
2349
2526
|
}
|
|
2350
2527
|
declare function attachRunnerRecoveryTranscript(error: Error, messages: readonly AgentMessage[]): void;
|
|
2351
2528
|
declare function readRunnerRecoveryTranscript(error: unknown): readonly AgentMessage[] | undefined;
|
|
2529
|
+
/** Structured failure emitted when a Runner exhausts its mechanical fuse. */
|
|
2530
|
+
declare class RunnerIterationLimitError extends Error {
|
|
2531
|
+
readonly code = "RUNNER_ITERATION_LIMIT";
|
|
2532
|
+
readonly limitReached = true;
|
|
2533
|
+
constructor(message: string, messages: readonly AgentMessage[]);
|
|
2534
|
+
}
|
|
2535
|
+
declare function isRunnerIterationLimitError(error: unknown): error is RunnerIterationLimitError;
|
|
2352
2536
|
/**
|
|
2353
2537
|
* Stream events emitted by `Runner.runStream`. The event surface is
|
|
2354
2538
|
* intentionally small in v0.7.23; FEATURE_084 expands it to mirror the
|
|
@@ -4592,5 +4776,154 @@ interface CreateAgentExecutorPlaneOptions {
|
|
|
4592
4776
|
readonly closeTimeoutMs?: number;
|
|
4593
4777
|
}
|
|
4594
4778
|
|
|
4595
|
-
|
|
4596
|
-
export type { AgentExecutorProtocol as $, AgentContinuationInput as B, AgentCredentialBroker as C, AgentDataClassification as D, AgentDetail as E, AgentDispatchContext as F, AgentDispatchPolicy as G, AgentDispatchPolicyDecision as H, AgentDispatchPolicyInput as I, AgentDispatchabilitySnapshot as J, AgentDispatchabilityStatus as K, AgentEffectDeclaration as L, AgentEvent as M, AgentEventKind as N, AgentExecutionInput as O, AgentExecutionKind as P, AgentExecutionResult as Q, AgentExecutor as R, AgentExecutorEvent as S, AgentExecutorFactory as T, AgentExecutorFactoryContext as U, AgentExecutorPlane as V, AgentExecutorPlaneBackgroundErrorContext as W, AgentExecutorPlaneBackgroundErrorHandler as X, AgentExecutorPlaneBinding as Y, AgentExecutorPlaneStore as Z, AgentExecutorPreflightResult as _, AgentExecutorTaskReference as a0, AgentExecutorTaskSnapshot as a1, AgentFollowupResult as a2, AgentForkTurns as a3, AgentInterruptScope as a4, AgentJsonObject as a5, AgentJsonValue as a6, AgentLimitReached as a7, AgentListEntry as a8, AgentMailboxMessage as a9, AgentTaskState as aA, AgentTaskUsage as aB, AgentTool as aC, AgentTreeSnapshot as aD, AgentTurn as aE, AgentTurnExecutor as aF, AgentTurnRef as aG, AgentTurnState as aH, AgentTurnSummary as aI, AskUserAnswer as aJ, AskUserCustomInputAnswer as aK, AskUserMultiOptions as aL, AskUserQuestionItem as aM, AskUserQuestionOptions as aN, AskUserSelectionAnswer as aO, CapabilitySupport as aP, CommitLearnedSkillRevisionInput as aQ, CompactionAnchor as aR, CompactionConfig as aS, CompactionDetails as aT, CompactionReport as aU, CompactionResult as aV, CompactionSpanData as aW, CompactionUpdate as aX, CreateAgentExecutorPlaneOptions as aY, CreateLearnedSkillRecordInput as aZ, CurrentTodoSummary as a_, AgentManifest as aa, AgentMessage as ab, AgentMetadataValue as ac, AgentMiddlewareDeclaration as ad, AgentMutationOptions as ae, AgentOutput as af, AgentPreflightInput as ag, AgentPreflightResult as ah, AgentProgressItem as ai, AgentProgressKind as aj, AgentProgressUpdate as ak, AgentReasoningProfile as al, AgentRegistrationEnabledMutationOptions as am, AgentRegistrationMutationOptions as an, AgentRegistrationService as ao, AgentSpanData as ap, AgentSpawnInput as aq, AgentTaskCancellation as ar, AgentTaskCorrelation as as, AgentTaskEvent as at, AgentTaskFilter as au, AgentTaskProgress as av, AgentTaskRegistrationSnapshot as aw, AgentTaskService as ax, AgentTaskSnapshot as ay, AgentTaskStartInput as az, AdmissionAuditOptions as b, KodaXSessionRuntimeInfo as b$, DeclarativeSkillSpec as b0, Deliverable as b1, DiscoveredInstance as b2, DiscoveryOptions as b3, DispatchableAgentDescriptor as b4, DispatchableAgentListing as b5, DispatchableAgentOrigin as b6, DispatchableAgentQuery as b7, EvidenceSpanData as b8, ExactInvokedSkillSnapshot as b9, KodaXGoalStatus as bA, KodaXImageInputArtifact as bB, KodaXImageMediaType as bC, KodaXInputArtifact as bD, KodaXInputArtifactSource as bE, KodaXJsonValue as bF, KodaXMemoryInfluenceRef as bG, KodaXMemoryIntent as bH, KodaXMemoryOutcomeDigest as bI, KodaXMemoryOutcomeEvidence as bJ, KodaXSessionArchiveMarkerEntry as bK, KodaXSessionArtifactLedgerEntry as bL, KodaXSessionBranchSummaryEntry as bM, KodaXSessionClientNoticeEntry as bN, KodaXSessionCompactionEntry as bO, KodaXSessionData as bP, KodaXSessionEntry as bQ, KodaXSessionEntryBase as bR, KodaXSessionGoalEntry as bS, KodaXSessionLabelEntry as bT, KodaXSessionLineage as bU, KodaXSessionMemoryOutcomeDigestEntry as bV, KodaXSessionMemoryReviewReceiptEntry as bW, KodaXSessionMessageEntry as bX, KodaXSessionMeta as bY, KodaXSessionNavigationOptions as bZ, KodaXSessionRewindMarkerEntry as b_, ExternalAgentEffectDeclaration as ba, ExternalAgentHealth as bb, ExternalAgentProtocol as bc, ExternalAgentRegistration as bd, ExternalAgentRegistrationSummary as be, FanoutSpanData as bf, FileOperations as bg, GenerationSpanData as bh, Guardrail as bi, GuardrailSpanData as bj, Handoff as bk, HandoffSpanData as bl, InMemorySessionOptions as bm, InstanceDiscoveryFs as bn, InvariantId as bo, InvariantResult as bp, KodaXCompactMemoryProgress as br, KodaXCompactMemorySeed as bs, KodaXExtensionSessionRecord as bt, KodaXExtensionSessionState as bu, KodaXExtensionStore as bv, KodaXExtensionStoreEntry as bw, KodaXFileInputArtifact as bx, KodaXGoalEventType as by, KodaXGoalState as bz, AdmissionCtx as c, MemoryAutoCuratorResult as c$, KodaXSessionScope as c0, KodaXSessionStorage as c1, KodaXSessionTreeNode as c2, KodaXSessionUiHistoryItem as c3, KodaXSessionUiHistoryItemType as c4, KodaXSessionUiTextHistoryItem as c5, KodaXSessionUiTextHistoryItemType as c6, KodaXSessionUiToolCall as c7, KodaXSessionUiToolCallStatus as c8, KodaXSessionUiToolGroupHistoryItem as c9, LearningActionDriver as cA, LearningCapabilityErrorCode as cC, LearningClientEventState as cD, LearningClientRecord as cE, LearningEvent as cF, LearningEventKind as cG, LearningExplicitUserAuthority as cH, LearningNotificationState as cI, LearningPage as cJ, LearningQuery as cK, LearningReviewEvidencePacket as cL, LearningReviewQualification as cM, LearningReviewVerifierFact as cN, LearningSubscribeOptions as cO, LearningSurfaceSnapshot as cP, LocalAgentTaskInput as cQ, LocalAgentTaskUpdate as cR, ManifestPatch as cT, MemoryActionProposal as cU, MemoryApplicability as cV, MemoryApplyPreview as cW, MemoryApplyResult as cX, MemoryApproval as cY, MemoryAuthority as cZ, MemoryAutoCuratorInput as c_, KodaXSessionWorkspaceKind as ca, KodaXVideoInputArtifact as cb, KodaXVideoMediaType as cc, LearnedAreaPaths as cd, LearnedCapabilityArtifact as cf, LearnedCapabilityCanary as cg, LearnedCapabilityCanaryBinding as ch, LearnedCapabilityCanaryInvocation as ci, LearnedCapabilityCarrier as cj, LearnedCapabilityLifecycle as ck, LearnedCapabilityProvenance as cl, LearnedCapabilityRecord as cm, LearnedCapabilityRecordV1 as cn, LearnedCapabilityRecordV2 as co, LearnedCapabilityScope as cp, LearnedCapabilitySource as cq, LearnedSkillBindingAdmission as cr, LearnedSkillCanaryOutcome as cs, LearnedSkillDecisionDisposition as ct, LearnedSkillInvocationAdmission as cu, LearnedSkillInvokedReceipt as cv, LearnedSkillOfferedReceipt as cw, LearnedSkillOutcomeReceipt as cx, LearnedSkillUsageReceipt as cy, LearningAction as cz, AdmissionVerdict as d, SessionEntry as d$, MemoryBodySnapshot as d0, MemoryClaimKind as d1, MemoryContextIdentity as d2, MemoryController as d3, MemoryCuratorInput as d4, MemoryDecisionTraceReceipt as d5, MemoryEpisodeReviewResult as d6, MemoryEvent as d7, MemoryGovernanceFinding as d8, MemoryGovernanceFindingKind as d9, NormalizedLearnedSkillDecision as dA, ObserveCtx as dB, PersistedSessionState as dC, PresetDispatcher as dD, PresetTracingContext as dE, QualityInvariant as dF, ReadonlyMutationTracker as dG, ReadonlyRecorder as dH, ReasoningDepth as dI, RecentlyModifiedFile as dJ, RunEvent as dK, RunOptions as dL, RunResult as dM, RunnableTool as dN, RunnerEvent as dP, RunnerLlmResult as dQ, RunnerLlmReturn as dR, RunnerRecoveryTranscriptCarrier as dS, RunnerToolCall as dT, RunnerToolContext as dU, RunnerToolObserver as dV, RunnerToolResult as dW, RunnerToolResultBatch as dX, RunnerToolResultBatchTransform as dY, Session as dZ, SessionDispatchResult as d_, MemoryGovernanceReport as da, MemoryItemRef as db, MemoryLifecycle as dc, MemoryLifecycleOperationResult as dd, MemoryPack as de, MemoryPackHint as df, MemoryPackInput as dg, MemoryPackTraceMetadata as dh, MemoryProposalAction as di, MemoryRefFilter as dj, MemoryRefKind as dk, MemoryRejectResult as dl, MemoryReviewCandidateRef as dm, MemoryReviewDraftAction as dn, MemoryReviewInput as dp, MemoryReviewModelInput as dq, MemoryReviewPersistenceDecision as dr, MemoryReviewPersistenceKind as ds, MemoryReviewPlan as dt, MemoryReviewRunner as du, MemoryReviewTrigger as dv, MemoryScope as dw, MemorySourceAdapter as dx, MemoryVisibility as dy, MessageEntry as dz, AdmittedHandle as e, WorkflowProcessSource as e$, SessionErrorMetadata as e0, SessionExtension as e1, SessionForkOptions as e2, SessionMeta as e3, SessionStateSnapshot as e4, Span as e5, SpanData as e6, SpanError as e7, SpanImplOptions as e9, WorkflowArtifactRef as eA, WorkflowBudget as eB, WorkflowEvent as eC, WorkflowEventCorrelation as eD, WorkflowEventType as eF, WorkflowIsolation as eG, WorkflowLimits as eH, WorkflowLogEvent as eI, WorkflowMeta as eJ, WorkflowModelHint as eK, WorkflowModule as eL, WorkflowOutcome as eM, WorkflowOutcomeError as eN, WorkflowOutcomeResult as eO, WorkflowOutcomeStatus as eP, WorkflowOutcomeUsage as eQ, WorkflowParallelOptions as eR, WorkflowProcessArtifact as eS, WorkflowProcessCounts as eT, WorkflowProcessEvent as eU, WorkflowProcessItem as eV, WorkflowProcessItemKind as eW, WorkflowProcessItemOrigin as eX, WorkflowProcessItemStatus as eY, WorkflowProcessProgress as eZ, WorkflowProcessSnapshot as e_, StagedLearnedSkillArtifact as ea, StartTraceOptions as eb, StateWriter as ec, StateWriterFs as ed, StateWriterOptions as ee, StopHookContext as ef, StopHookFn as eg, StopHookResult as eh, StopHookSpanData as ei, SystemCap as ej, TerminalCtx as ek, ToolCallSpanData as el, ToolCapability as em, ToolPermission as en, Trace as eo, TraceOptions as ep, TracerOptions as er, UnifiedLearningReviewModelInput as es, UnifiedLearningReviewResult as et, UnifiedLearningReviewRunner as eu, UserInteraction as ev, WorkflowAgentBackend as ew, WorkflowApi as ex, WorkflowApproval as ey, WorkflowApprovalSummary as ez, Agent as f, WorkflowProcessStatus as f0, WorkflowProcessSummaryStatus as f1, WorkflowProcessTokenUsage as f2, WorkflowProcessTracker as f3, WorkflowProcessTrackerOptions as f4, WorkflowRun as f5, WorkflowRunState as f6, WorkflowRunStatus as f7, WorkflowSpawnAgentInput as f8, WorkflowSynthesis as f9, WorkflowSynthesizeInput as fa, WorkflowTaskHandle as fb, WorkflowTaskResult as fc, WorkflowTaskSnapshot as fd, WorkflowTaskStatus as fe, WorkflowTaskSummaryEventUpdate as ff, WorkflowTaskSummaryKind as fg, WorkflowTaskSummaryUpdate as fh, WorkflowTaskUsage as fi, WorkflowTaskVerification as fj, WorkflowTaskVerificationResult as fk, WorkflowWaitOptions as fl, AgentActor as g, AgentActorClient as h, AgentActorOwner as i, AgentActorSnapshot as j, AgentActorSnapshotV1 as k, AgentActorSnapshotV2 as l, AgentActorState as m, AgentActorStore as n, AgentArtifactDescriptor as o, AgentArtifactPolicy as p, AgentArtifactPolicyDecision as q, AgentArtifactPolicyInput as r, AgentArtifactReference as s, AgentBudgetAdmission as t, AgentBudgetAdmissionInput as u, AgentBudgetExhausted as v, AgentBudgetPort as w, AgentCapabilities as x, AgentCapabilityDeclaration as y, AgentCapabilityRequirements as z };
|
|
4779
|
+
interface AgentControllerOptions {
|
|
4780
|
+
readonly maxConcurrentThreadsPerSession?: number;
|
|
4781
|
+
readonly rootCapabilities?: AgentCapabilities;
|
|
4782
|
+
readonly executor?: AgentTurnExecutor;
|
|
4783
|
+
readonly executorFor?: (kind: AgentExecutionKind) => AgentTurnExecutor;
|
|
4784
|
+
readonly budget?: AgentBudgetPort;
|
|
4785
|
+
readonly store?: AgentActorStore;
|
|
4786
|
+
/** Unique Runtime/controller claim for one durable Session Actor tree. */
|
|
4787
|
+
readonly owner?: AgentActorOwner;
|
|
4788
|
+
/** Conservative liveness probe for a persisted foreign owner. Omitted means alive. */
|
|
4789
|
+
readonly isOwnerAlive?: (owner: AgentActorOwner) => boolean | Promise<boolean>;
|
|
4790
|
+
readonly now?: () => string;
|
|
4791
|
+
readonly warn?: (message: string) => void;
|
|
4792
|
+
readonly onBackgroundError?: (error: unknown) => void;
|
|
4793
|
+
readonly onHealthChanged?: (health: AgentControllerHealth) => void;
|
|
4794
|
+
/** Post-durability event sink. Callback failures never roll back committed actor state. */
|
|
4795
|
+
readonly onEventCommitted?: (event: AgentEvent) => void | Promise<void>;
|
|
4796
|
+
/** Post-durability mailbox sink. Callback failures never roll back committed actor state. */
|
|
4797
|
+
readonly onMessageCommitted?: (message: AgentMailboxMessage) => void | Promise<void>;
|
|
4798
|
+
}
|
|
4799
|
+
interface AgentControllerHealth {
|
|
4800
|
+
readonly state: 'healthy' | 'recovering' | 'unknown';
|
|
4801
|
+
readonly code?: 'actor_settlement_not_persisted';
|
|
4802
|
+
readonly turnId?: string;
|
|
4803
|
+
readonly message?: string;
|
|
4804
|
+
}
|
|
4805
|
+
declare class AgentActorController {
|
|
4806
|
+
private readonly options;
|
|
4807
|
+
private readonly actors;
|
|
4808
|
+
private readonly turns;
|
|
4809
|
+
private readonly mailboxes;
|
|
4810
|
+
private readonly acknowledgedCompletionTurnIds;
|
|
4811
|
+
private readonly pendingRootCompletionTurnIds;
|
|
4812
|
+
private readonly eventsLog;
|
|
4813
|
+
private readonly abortControllers;
|
|
4814
|
+
private readonly waiters;
|
|
4815
|
+
private readonly pendingSettlements;
|
|
4816
|
+
private readonly settlementRecoveryMessages;
|
|
4817
|
+
private readonly scheduler;
|
|
4818
|
+
private readonly budget;
|
|
4819
|
+
private readonly now;
|
|
4820
|
+
private readonly admissionScope;
|
|
4821
|
+
private mutationTail;
|
|
4822
|
+
private revision;
|
|
4823
|
+
private admissionRevision;
|
|
4824
|
+
private snapshotSchemaVersion;
|
|
4825
|
+
private durableOwner?;
|
|
4826
|
+
private initialized;
|
|
4827
|
+
private ownershipLost;
|
|
4828
|
+
private ownershipReleased;
|
|
4829
|
+
private closing;
|
|
4830
|
+
private settlementGeneration;
|
|
4831
|
+
private settlementValidityGeneration;
|
|
4832
|
+
private shutdownFailure?;
|
|
4833
|
+
private indeterminateFailure?;
|
|
4834
|
+
private shutdownPromise?;
|
|
4835
|
+
private committedSnapshot;
|
|
4836
|
+
private health;
|
|
4837
|
+
constructor(options?: AgentControllerOptions);
|
|
4838
|
+
healthSnapshot(): AgentControllerHealth;
|
|
4839
|
+
initialize(): Promise<void>;
|
|
4840
|
+
ownsDurableFence(): boolean;
|
|
4841
|
+
bind(callerPath: string): AgentActorClient;
|
|
4842
|
+
/** Trusted host API: register a zero-slot Workflow protocol owner in this tree. */
|
|
4843
|
+
createProtocolOwner(callerPath: string, ownerId: string): Promise<AgentActorClient>;
|
|
4844
|
+
/** Trusted host API: settle a zero-slot Workflow protocol owner. */
|
|
4845
|
+
settleProtocolOwner(ownerPath: string, state: 'completed' | 'failed' | 'interrupted', result: AgentExecutionResult & {
|
|
4846
|
+
readonly error?: string;
|
|
4847
|
+
}): Promise<void>;
|
|
4848
|
+
/** Trusted host API: cancellation signal for a zero-slot Workflow protocol owner. */
|
|
4849
|
+
protocolOwnerSignal(ownerPath: string): AbortSignal;
|
|
4850
|
+
spawn(callerPath: string, input: AgentSpawnInput, options?: AgentMutationOptions): Promise<AgentTurnRef>;
|
|
4851
|
+
send(callerPath: string, targetPath: string, content: string, classification?: AgentDataClassification, forwardedMessageId?: string): Promise<AgentMailboxMessage>;
|
|
4852
|
+
acknowledgeCompletions(callerPath: string, turnIds: readonly string[]): Promise<number>;
|
|
4853
|
+
followup(callerPath: string, targetPath: string, objective: string, metadata?: Readonly<Record<string, AgentMetadataValue>>, options?: AgentMutationOptions): Promise<AgentFollowupResult>;
|
|
4854
|
+
interrupt(callerPath: string, targetPath: string, reason?: string, scope?: AgentInterruptScope): Promise<void>;
|
|
4855
|
+
close(callerPath: string, targetPath: string, reason?: string): Promise<void>;
|
|
4856
|
+
/**
|
|
4857
|
+
* Final local teardown after the host has durably removed the backing store.
|
|
4858
|
+
* No mutation is allowed here because there is no longer a snapshot to save.
|
|
4859
|
+
*/
|
|
4860
|
+
disposeAfterStoreRemoval(reason?: string): void;
|
|
4861
|
+
/** Interrupts every local execution while retaining the durable owner fence. */
|
|
4862
|
+
quiesce(reason?: string): Promise<void>;
|
|
4863
|
+
/** Stops in-flight work for process shutdown while preserving reusable Actor identities. */
|
|
4864
|
+
shutdown(reason?: string): Promise<void>;
|
|
4865
|
+
private performShutdown;
|
|
4866
|
+
list(callerPath: string): AgentTreeSnapshot;
|
|
4867
|
+
get(callerPath: string, targetPath: string): AgentDetail;
|
|
4868
|
+
output(callerPath: string, targetPath: string, turnId?: string): AgentOutput;
|
|
4869
|
+
eventSnapshot(callerPath: string, afterSequence?: number): readonly AgentEvent[];
|
|
4870
|
+
private isAcknowledgedDirectChildTerminal;
|
|
4871
|
+
wait(callerPath: string, afterSequence?: number, timeoutMs?: number, signal?: AbortSignal): Promise<AgentEvent | undefined>;
|
|
4872
|
+
private prepareSpawn;
|
|
4873
|
+
private prepareExistingTurn;
|
|
4874
|
+
private admitTurn;
|
|
4875
|
+
private commitStart;
|
|
4876
|
+
private launch;
|
|
4877
|
+
private trackSettlement;
|
|
4878
|
+
private flushPendingSettlements;
|
|
4879
|
+
private completeExecution;
|
|
4880
|
+
private failExecution;
|
|
4881
|
+
private commitExecutionSettlement;
|
|
4882
|
+
private setHealth;
|
|
4883
|
+
private publishSettlementHealth;
|
|
4884
|
+
private finishTurn;
|
|
4885
|
+
private appendCompletion;
|
|
4886
|
+
private drainMailbox;
|
|
4887
|
+
private unreadMailbox;
|
|
4888
|
+
private recordProgress;
|
|
4889
|
+
private resolveForwarding;
|
|
4890
|
+
private appendMessage;
|
|
4891
|
+
private appendEvent;
|
|
4892
|
+
private requireControl;
|
|
4893
|
+
private assertMessagePermission;
|
|
4894
|
+
private isVisible;
|
|
4895
|
+
private visibleActors;
|
|
4896
|
+
private latestTurnSummary;
|
|
4897
|
+
private descendantsInclusive;
|
|
4898
|
+
private createActor;
|
|
4899
|
+
private createTurn;
|
|
4900
|
+
private requireActor;
|
|
4901
|
+
private requireTurn;
|
|
4902
|
+
private requireCommittedActor;
|
|
4903
|
+
private requireCommittedTurn;
|
|
4904
|
+
private requireCommittedControl;
|
|
4905
|
+
private installRoot;
|
|
4906
|
+
private mutate;
|
|
4907
|
+
private snapshot;
|
|
4908
|
+
private restore;
|
|
4909
|
+
private republishUnacknowledgedRootCompletions;
|
|
4910
|
+
private recoverUnmatchedTurns;
|
|
4911
|
+
private claimOwnership;
|
|
4912
|
+
private releaseOwnershipAfterInitializationFailure;
|
|
4913
|
+
private assertWritableOwner;
|
|
4914
|
+
private fenceUnknownSettlement;
|
|
4915
|
+
private stopLocalWork;
|
|
4916
|
+
private fenceAfterSnapshotConflict;
|
|
4917
|
+
private isInterruptionDurable;
|
|
4918
|
+
private notify;
|
|
4919
|
+
private publishCommittedEvent;
|
|
4920
|
+
private publishCommittedMessage;
|
|
4921
|
+
private reportBackgroundError;
|
|
4922
|
+
private reportBackgroundCallbackFailure;
|
|
4923
|
+
private assertExpectedTreeRevision;
|
|
4924
|
+
private assertExpectedAdmissionRevision;
|
|
4925
|
+
}
|
|
4926
|
+
declare function createAgentActorController(options?: AgentControllerOptions): Promise<AgentActorController>;
|
|
4927
|
+
|
|
4928
|
+
export { ASK_USER_BACK_SIGNAL as A, ASK_USER_CUSTOM_INPUT_SIGNAL as a, DEFAULT_SYSTEM_CAP as b2, GuardrailBlockedError as bm, GuardrailEscalateError as bo, InvariantSession as bz, MAX_TOOL_LOOP_ITERATIONS as c$, LearningCapabilityError as cK, LearnedAreaStore as cn, Runner as dY, RunnerIterationLimitError as d_, Tracer as eD, WorkflowEventRecorder as eR, SpanImpl as ej, eventFromCapability as f$, _resetPresetDispatchers as fA, admitAndRecordLearnedSkillInvocation as fB, admitLearnedSkillBinding as fC, asSingleSelection as fD, assertLearnedCapabilityTransition as fE, attachRunnerRecoveryTranscript as fF, buildAssistantMessageFromLlmResult as fG, buildSystemPrompt as fH, buildToolResultMessage as fI, canTransitionLearnedCapability as fJ, collectGuardrails as fK, commitLearnedSkillRevision as fL, completeLearnedSkillOutcome as fM, completeLearnedSkillSessionOutcomes as fN, createAgent as fO, createAgentActorController as fP, createHandoff as fQ, createInMemorySession as fR, createInvariantSessionForAgent as fS, createLearnedCapabilityScope as fT, createLearnedSkillRecord as fU, createStateWriter as fV, createTrace as fW, createWorkflowProcessTracker as fX, defaultTracer as fY, detectInstructionsInjection as fZ, discoverInstances as f_, _resetAdmittedAgentBindings as fz, exactInvokedSkillSnapshotForSession as g0, executeRunnerToolCall as g1, extractAssistantTextFromMessage as g2, getActiveUserInteraction as g3, getAdmittedAgentBindings as g4, hashMemoryIdentityComponent as g5, invokeLearnedSkillCanary as g6, isAskUserCustomInputAnswer as g7, isFinalWorkflowProcessStatus as g8, isLearnedCapabilityRecordV2 as g9, setActiveUserInteraction as gA, setAdmittedAgentBindings as gB, slugifyLearnedCapabilityName as gC, stageLearnedSkillRevision as gD, validateDeclarativeSkillSpec as gE, isRunnableTool as ga, isRunnerIterationLimitError as gb, isRunnerLlmResult as gc, isUnifiedLearningReviewModelInput as gd, learningEventIdFor as ge, learningEventKindForLifecycle as gf, listLearnedSkillUsageReceipts as gg, matchesMemoryApplicability as gh, memoryApplicabilityFingerprint as gi, normalizeHostMetadata as gj, normalizeUnifiedLearningReview as gk, quarantineLearnedSkillRevision as gl, readRunnerRecoveryTranscript as gm, reconcileLearnedSkillBindingOutcomes as gn, recordLearnedSkillOffered as go, registerPresetDispatcher as gp, releaseLearnedSkillBinding as gq, renderDeclarativeSkill as gr, resolveLearnedAreaPaths as gs, resolveProjectLearnedAreaRoot as gt, runAdmissionAudit as gu, runInputGuardrails as gv, runOutputGuardrails as gw, runToolAfterGuardrails as gx, runToolBeforeGuardrails as gy, sanitizeUnifiedLearningReviewInput as gz, AgentActorController as i };
|
|
4929
|
+
export type { AgentExecutorPlaneBinding as $, AgentCapabilityRequirements as B, AgentContinuationInput as C, AgentControllerHealth as D, AgentControllerOptions as E, AgentCredentialBroker as F, AgentDataClassification as G, AgentDetail as H, AgentDispatchContext as I, AgentDispatchPolicy as J, AgentDispatchPolicyDecision as K, AgentDispatchPolicyInput as L, AgentDispatchabilitySnapshot as M, AgentDispatchabilityStatus as N, AgentEffectDeclaration as O, AgentEvent as P, AgentEventKind as Q, AgentExecutionInput as R, AgentExecutionKind as S, AgentExecutionResult as T, AgentExecutor as U, AgentExecutorEvent as V, AgentExecutorFactory as W, AgentExecutorFactoryContext as X, AgentExecutorPlane as Y, AgentExecutorPlaneBackgroundErrorContext as Z, AgentExecutorPlaneBackgroundErrorHandler as _, CreateAgentExecutorPlaneOptions as a$, AgentExecutorPlaneStore as a0, AgentExecutorPreflightResult as a1, AgentExecutorProtocol as a2, AgentExecutorTaskReference as a3, AgentExecutorTaskSnapshot as a4, AgentFollowupResult as a5, AgentForkTurns as a6, AgentInterruptScope as a7, AgentJsonObject as a8, AgentJsonValue as a9, AgentTaskService as aA, AgentTaskSnapshot as aB, AgentTaskStartInput as aC, AgentTaskState as aD, AgentTaskUsage as aE, AgentTool as aF, AgentTreeSnapshot as aG, AgentTurn as aH, AgentTurnExecutor as aI, AgentTurnRef as aJ, AgentTurnState as aK, AgentTurnSummary as aL, AskUserAnswer as aM, AskUserCustomInputAnswer as aN, AskUserMultiOptions as aO, AskUserQuestionItem as aP, AskUserQuestionOptions as aQ, AskUserSelectionAnswer as aR, CapabilitySupport as aS, CommitLearnedSkillRevisionInput as aT, CompactionAnchor as aU, CompactionConfig as aV, CompactionDetails as aW, CompactionReport as aX, CompactionResult as aY, CompactionSpanData as aZ, CompactionUpdate as a_, AgentLimitReached as aa, AgentListEntry as ab, AgentMailboxMessage as ac, AgentManifest as ad, AgentMessage as ae, AgentMetadataValue as af, AgentMiddlewareDeclaration as ag, AgentMutationOptions as ah, AgentOutput as ai, AgentPreflightInput as aj, AgentPreflightResult as ak, AgentProgressItem as al, AgentProgressKind as am, AgentProgressUpdate as an, AgentReasoningProfile as ao, AgentRegistrationEnabledMutationOptions as ap, AgentRegistrationMutationOptions as aq, AgentRegistrationService as ar, AgentSpanData as as, AgentSpawnInput as at, AgentTaskCancellation as au, AgentTaskCorrelation as av, AgentTaskEvent as aw, AgentTaskFilter as ax, AgentTaskProgress as ay, AgentTaskRegistrationSnapshot as az, AdmissionAuditOptions as b, KodaXSessionGoalEntry as b$, CreateLearnedSkillRecordInput as b0, CurrentTodoSummary as b1, DeclarativeSkillSpec as b3, Deliverable as b4, DiscoveredInstance as b5, DiscoveryOptions as b6, DispatchableAgentDescriptor as b7, DispatchableAgentListing as b8, DispatchableAgentOrigin as b9, KodaXCompactMemoryProgress as bA, KodaXCompactMemorySeed as bB, KodaXExtensionSessionRecord as bC, KodaXExtensionSessionState as bD, KodaXExtensionStore as bE, KodaXExtensionStoreEntry as bF, KodaXFileInputArtifact as bG, KodaXGoalEventType as bH, KodaXGoalState as bI, KodaXGoalStatus as bJ, KodaXImageInputArtifact as bK, KodaXImageMediaType as bL, KodaXInputArtifact as bM, KodaXInputArtifactSource as bN, KodaXJsonValue as bO, KodaXMemoryInfluenceRef as bP, KodaXMemoryIntent as bQ, KodaXMemoryOutcomeDigest as bR, KodaXMemoryOutcomeEvidence as bS, KodaXSessionArchiveMarkerEntry as bT, KodaXSessionArtifactLedgerEntry as bU, KodaXSessionBranchSummaryEntry as bV, KodaXSessionClientNoticeEntry as bW, KodaXSessionCompactionEntry as bX, KodaXSessionData as bY, KodaXSessionEntry as bZ, KodaXSessionEntryBase as b_, DispatchableAgentQuery as ba, EvidenceSpanData as bb, ExactInvokedSkillSnapshot as bc, ExternalAgentEffectDeclaration as bd, ExternalAgentHealth as be, ExternalAgentProtocol as bf, ExternalAgentRegistration as bg, ExternalAgentRegistrationSummary as bh, FanoutSpanData as bi, FileOperations as bj, GenerationSpanData as bk, Guardrail as bl, GuardrailContext as bn, GuardrailPermissionIntent as bp, GuardrailSpanData as bq, GuardrailVerdict as br, Handoff as bs, HandoffSpanData as bt, InMemorySessionOptions as bu, InputGuardrail as bv, InstanceDiscoveryFs as bw, InvariantId as bx, InvariantResult as by, AdmissionCtx as c, KodaXSessionLabelEntry as c0, KodaXSessionLineage as c1, KodaXSessionMemoryOutcomeDigestEntry as c2, KodaXSessionMemoryReviewReceiptEntry as c3, KodaXSessionMessageEntry as c4, KodaXSessionMeta as c5, KodaXSessionNavigationOptions as c6, KodaXSessionRewindMarkerEntry as c7, KodaXSessionRuntimeInfo as c8, KodaXSessionScope as c9, LearnedSkillBindingAdmission as cA, LearnedSkillCanaryOutcome as cB, LearnedSkillDecisionDisposition as cC, LearnedSkillInvocationAdmission as cD, LearnedSkillInvokedReceipt as cE, LearnedSkillOfferedReceipt as cF, LearnedSkillOutcomeReceipt as cG, LearnedSkillUsageReceipt as cH, LearningAction as cI, LearningActionDriver as cJ, LearningCapabilityErrorCode as cL, LearningClientEventState as cM, LearningClientRecord as cN, LearningEvent as cO, LearningEventKind as cP, LearningExplicitUserAuthority as cQ, LearningNotificationState as cR, LearningPage as cS, LearningQuery as cT, LearningReviewEvidencePacket as cU, LearningReviewQualification as cV, LearningReviewVerifierFact as cW, LearningSubscribeOptions as cX, LearningSurfaceSnapshot as cY, LocalAgentTaskInput as cZ, LocalAgentTaskUpdate as c_, KodaXSessionStorage as ca, KodaXSessionTreeNode as cb, KodaXSessionUiHistoryItem as cc, KodaXSessionUiHistoryItemType as cd, KodaXSessionUiTextHistoryItem as ce, KodaXSessionUiTextHistoryItemType as cf, KodaXSessionUiToolCall as cg, KodaXSessionUiToolCallStatus as ch, KodaXSessionUiToolGroupHistoryItem as ci, KodaXSessionWorkspaceKind as cj, KodaXVideoInputArtifact as ck, KodaXVideoMediaType as cl, LearnedAreaPaths as cm, LearnedCapabilityArtifact as co, LearnedCapabilityCanary as cp, LearnedCapabilityCanaryBinding as cq, LearnedCapabilityCanaryInvocation as cr, LearnedCapabilityCarrier as cs, LearnedCapabilityLifecycle as ct, LearnedCapabilityProvenance as cu, LearnedCapabilityRecord as cv, LearnedCapabilityRecordV1 as cw, LearnedCapabilityRecordV2 as cx, LearnedCapabilityScope as cy, LearnedCapabilitySource as cz, AdmissionVerdict as d, RunnerLlmResult as d$, ManifestPatch as d0, MemoryActionProposal as d1, MemoryApplicability as d2, MemoryApplyPreview as d3, MemoryApplyResult as d4, MemoryApproval as d5, MemoryAuthority as d6, MemoryAutoCuratorInput as d7, MemoryAutoCuratorResult as d8, MemoryBodySnapshot as d9, MemoryReviewPersistenceDecision as dA, MemoryReviewPersistenceKind as dB, MemoryReviewPlan as dC, MemoryReviewRunner as dD, MemoryReviewTrigger as dE, MemoryScope as dF, MemorySourceAdapter as dG, MemoryVisibility as dH, MessageEntry as dI, NormalizedLearnedSkillDecision as dJ, ObserveCtx as dK, OutputGuardrail as dL, PersistedSessionState as dM, PresetDispatcher as dN, PresetTracingContext as dO, QualityInvariant as dP, ReadonlyMutationTracker as dQ, ReadonlyRecorder as dR, ReasoningDepth as dS, RecentlyModifiedFile as dT, RunEvent as dU, RunOptions as dV, RunResult as dW, RunnableTool as dX, RunnerEvent as dZ, MemoryClaimKind as da, MemoryContextIdentity as db, MemoryController as dc, MemoryCuratorInput as dd, MemoryDecisionTraceReceipt as de, MemoryEpisodeReviewResult as df, MemoryEvent as dg, MemoryGovernanceFinding as dh, MemoryGovernanceFindingKind as di, MemoryGovernanceReport as dj, MemoryItemRef as dk, MemoryLifecycle as dl, MemoryLifecycleOperationResult as dm, MemoryPack as dn, MemoryPackHint as dp, MemoryPackInput as dq, MemoryPackTraceMetadata as dr, MemoryProposalAction as ds, MemoryRefFilter as dt, MemoryRefKind as du, MemoryRejectResult as dv, MemoryReviewCandidateRef as dw, MemoryReviewDraftAction as dx, MemoryReviewInput as dy, MemoryReviewModelInput as dz, AdmittedHandle as e, WorkflowOutcomeResult as e$, RunnerLlmReturn as e0, RunnerRecoveryTranscriptCarrier as e1, RunnerToolCall as e2, RunnerToolContext as e3, RunnerToolObserver as e4, RunnerToolResult as e5, RunnerToolResultBatch as e6, RunnerToolResultBatchTransform as e7, Session as e8, SessionDispatchResult as e9, ToolPermission as eA, Trace as eB, TraceOptions as eC, TracerOptions as eE, UnifiedLearningReviewModelInput as eF, UnifiedLearningReviewResult as eG, UnifiedLearningReviewRunner as eH, UserInteraction as eI, WorkflowAgentBackend as eJ, WorkflowApi as eK, WorkflowApproval as eL, WorkflowApprovalSummary as eM, WorkflowArtifactRef as eN, WorkflowBudget as eO, WorkflowEvent as eP, WorkflowEventCorrelation as eQ, WorkflowEventType as eS, WorkflowIsolation as eT, WorkflowLimits as eU, WorkflowLogEvent as eV, WorkflowMeta as eW, WorkflowModelHint as eX, WorkflowModule as eY, WorkflowOutcome as eZ, WorkflowOutcomeError as e_, SessionEntry as ea, SessionErrorMetadata as eb, SessionExtension as ec, SessionForkOptions as ed, SessionMeta as ee, SessionStateSnapshot as ef, Span as eg, SpanData as eh, SpanError as ei, SpanImplOptions as ek, StagedLearnedSkillArtifact as el, StartTraceOptions as em, StateWriter as en, StateWriterFs as eo, StateWriterOptions as ep, StopHookContext as eq, StopHookFn as er, StopHookResult as es, StopHookSpanData as et, SystemCap as eu, TerminalCtx as ev, ToolBeforeOutcome as ew, ToolCallSpanData as ex, ToolCapability as ey, ToolGuardrail as ez, Agent as f, WorkflowOutcomeStatus as f0, WorkflowOutcomeUsage as f1, WorkflowParallelOptions as f2, WorkflowProcessArtifact as f3, WorkflowProcessCounts as f4, WorkflowProcessEvent as f5, WorkflowProcessItem as f6, WorkflowProcessItemKind as f7, WorkflowProcessItemOrigin as f8, WorkflowProcessItemStatus as f9, WorkflowProcessProgress as fa, WorkflowProcessSnapshot as fb, WorkflowProcessSource as fc, WorkflowProcessStatus as fd, WorkflowProcessSummaryStatus as fe, WorkflowProcessTokenUsage as ff, WorkflowProcessTracker as fg, WorkflowProcessTrackerOptions as fh, WorkflowRun as fi, WorkflowRunState as fj, WorkflowRunStatus as fk, WorkflowSpawnAgentInput as fl, WorkflowSynthesis as fm, WorkflowSynthesizeInput as fn, WorkflowTaskHandle as fo, WorkflowTaskResult as fp, WorkflowTaskSnapshot as fq, WorkflowTaskStatus as fr, WorkflowTaskSummaryEventUpdate as fs, WorkflowTaskSummaryKind as ft, WorkflowTaskSummaryUpdate as fu, WorkflowTaskUsage as fv, WorkflowTaskVerification as fw, WorkflowTaskVerificationResult as fx, WorkflowWaitOptions as fy, AgentActor as g, AgentActorClient as h, AgentActorOwner as j, AgentActorSnapshot as k, AgentActorSnapshotV1 as l, AgentActorSnapshotV2 as m, AgentActorState as n, AgentActorStore as o, AgentArtifactDescriptor as p, AgentArtifactPolicy as q, AgentArtifactPolicyDecision as r, AgentArtifactPolicyInput as s, AgentArtifactReference as t, AgentBudgetAdmission as u, AgentBudgetAdmissionInput as v, AgentBudgetExhausted as w, AgentBudgetPort as x, AgentCapabilities as y, AgentCapabilityDeclaration as z };
|