@kodax-ai/kodax 0.7.76 → 0.7.77
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 +595 -380
- package/LICENSE +158 -158
- package/README.md +1608 -1550
- package/README_CN.md +942 -896
- package/config-templates/config.example.jsonc +33 -33
- package/config-templates/integrations/a2a.example.jsonc +98 -98
- package/config-templates/integrations/extensions.example.jsonc +7 -7
- package/config-templates/integrations/mcp.example.jsonc +16 -16
- package/dist/builtin/code-review/SKILL.md +22 -22
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.d.ts +46 -46
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +46 -46
- package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +62 -62
- package/dist/builtin/skill-creator/scripts/generate-review.d.ts +33 -33
- package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +73 -73
- package/dist/builtin/skill-creator/scripts/improve-description.d.ts +23 -23
- package/dist/builtin/skill-creator/scripts/init-skill.d.ts +14 -14
- package/dist/builtin/skill-creator/scripts/install-skill.d.ts +29 -29
- package/dist/builtin/skill-creator/scripts/package-skill.d.ts +38 -38
- package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +8 -8
- package/dist/builtin/skill-creator/scripts/run-eval.d.ts +66 -66
- package/dist/builtin/skill-creator/scripts/run-loop.d.ts +49 -49
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.d.ts +58 -58
- package/dist/chunks/agent-NGSWFE73.js +2 -0
- package/dist/chunks/argument-completer-WGGZPEEO.js +2 -0
- package/dist/chunks/chunk-27QLRH3D.js +5 -0
- package/dist/chunks/chunk-2MQPVY6P.js +770 -0
- package/dist/chunks/chunk-3DD4QEBH.js +22 -0
- package/dist/chunks/chunk-6WAPVAGQ.js +74 -0
- package/dist/chunks/chunk-AOENDSVN.js +448 -0
- package/dist/chunks/{chunk-PXKSE54E.js → chunk-EH7AOMJ7.js} +1 -1
- package/dist/chunks/{chunk-SMT2JSM3.js → chunk-FNW2XUL5.js} +9 -9
- package/dist/chunks/chunk-FSXI4MAV.js +78 -0
- package/dist/chunks/{chunk-RDXRM3UI.js → chunk-HORNWBYR.js} +1 -1
- package/dist/chunks/chunk-HV2GMZUZ.js +343 -0
- package/dist/chunks/chunk-IQT4RPCE.js +46 -0
- package/dist/chunks/{chunk-4PWPNCNK.js → chunk-JS2BHGJP.js} +2 -2
- package/dist/chunks/chunk-OAMKECRG.js +381 -0
- package/dist/chunks/{chunk-HS3XHF3R.js → chunk-ON2WG2LG.js} +2 -2
- package/dist/chunks/{chunk-HGT6WQ24.js → chunk-RUGAAHTF.js} +17 -17
- package/dist/chunks/chunk-TGCG7U2W.js +37 -0
- package/dist/chunks/chunk-XSA37BVM.js +5 -0
- package/dist/chunks/compaction-config-BE7VYWH6.js +2 -0
- package/dist/chunks/{construction-bootstrap-5F5KF2BZ.js → construction-bootstrap-RPRL3L7R.js} +1 -1
- package/dist/chunks/dist-FDSOIR35.js +2 -0
- package/dist/chunks/dist-ZZBNVTKU.js +2 -0
- package/dist/chunks/host-QAKQVC4A.js +2 -0
- package/dist/chunks/run-manager-N4UFWA2D.js +2 -0
- package/dist/chunks/{utils-X3TEH6IO.js → utils-AUHCI4D5.js} +1 -1
- package/dist/index.d.ts +17 -16
- package/dist/index.js +2 -2
- package/dist/kodax_bootstrap.js +25 -25
- package/dist/kodax_cli.js +1276 -1229
- package/dist/provider-capabilities.json +392 -362
- package/dist/runtime-worker.js +1162 -1115
- package/dist/sdk-a2a.d.ts +12 -11
- package/dist/sdk-a2a.js +1 -1
- package/dist/sdk-agent.d.ts +56 -21
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +120 -21
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +14 -597
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +218 -6
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +15 -14
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-runtime.d.ts +34 -18
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-session.d.ts +7 -6
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +14 -14
- package/dist/types-chunks/{base.d-ChvpaKjZ.d.ts → base.d-4e74xDdy.d.ts} +13 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-r1beOESM.d.ts → bash-prefix-extractor.d-pZdu6qt7.d.ts} +197 -5
- package/dist/types-chunks/{capability-learning.d-DPrYxRjF.d.ts → capability-learning.d-CVsdHw4j.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-zeqV4IQX.d.ts → capsule.d-CxCm1KZz.d.ts} +2 -2
- package/dist/types-chunks/{commands.d-DUxnK2TU.d.ts → commands.d-BccESAMV.d.ts} +5 -5
- package/dist/types-chunks/{guardrail.d-qjuKJZ31.d.ts → guardrail.d-B0PwAZVR.d.ts} +3 -3
- package/dist/types-chunks/{guardrail.d-CWYD1bdL.d.ts → guardrail.d-CJx9RRd3.d.ts} +1 -1
- package/dist/types-chunks/{history-retrieval.d-BKTJIrVd.d.ts → history-retrieval.d-B__aEN62.d.ts} +2 -2
- package/dist/types-chunks/{public-api.d-CX4B11qY.d.ts → public-api.d--fF88JrC.d.ts} +3 -3
- package/dist/types-chunks/{run-manager.d-B9fEIjZk.d.ts → run-manager.d-B47hIqnI.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-B0fhAOPa.d.ts → sdk-session-CLWf8Adb.d.ts} +3 -3
- package/dist/types-chunks/{side-query.d-DWTMsndP.d.ts → side-query.d-5JvXhuOZ.d.ts} +22 -10
- package/dist/types-chunks/types-LanCEDj8.d.ts +623 -0
- package/dist/types-chunks/{types.d-DEctY20M.d.ts → types.d-CODuyyqy.d.ts} +2 -2
- package/dist/types-chunks/{types.d-Bm_y6YuM.d.ts → types.d-DCsKM8aT.d.ts} +4 -4
- package/dist/types-chunks/{types.d-CSmF0t0n.d.ts → types.d-DIpZJKUl.d.ts} +15 -0
- package/dist/types-chunks/{types.d-sRLugmjy.d.ts → types.d-RdWRfUEs.d.ts} +47 -4
- package/dist/types-chunks/{utils.d-D0wPxz8y.d.ts → utils.d-CDduqbFw.d.ts} +5 -5
- package/docs/SDK_EMBEDDER_GUIDE.md +197 -68
- package/package.json +2 -1
- package/scripts/kodax-bin.cjs +28 -28
- package/scripts/production-env.cjs +25 -25
- package/dist/chunks/agent-7X5CFET2.js +0 -2
- package/dist/chunks/argument-completer-3NHIKB4N.js +0 -2
- package/dist/chunks/chunk-7FJNLJLF.js +0 -369
- package/dist/chunks/chunk-COQYLD4U.js +0 -5
- package/dist/chunks/chunk-D3T24FJW.js +0 -78
- package/dist/chunks/chunk-EI4JBQKL.js +0 -46
- package/dist/chunks/chunk-IDCGNQ4H.js +0 -5
- package/dist/chunks/chunk-KAY2XLCP.js +0 -74
- package/dist/chunks/chunk-OD6LVXU6.js +0 -329
- package/dist/chunks/chunk-OSF3H4RR.js +0 -22
- package/dist/chunks/chunk-TGMBHGZO.js +0 -427
- package/dist/chunks/chunk-VWSLC2WO.js +0 -770
- package/dist/chunks/chunk-Y3AMP22L.js +0 -37
- package/dist/chunks/compaction-config-7J2XE35D.js +0 -2
- package/dist/chunks/dist-2RA7LSH3.js +0 -2
- package/dist/chunks/dist-URKXBOC6.js +0 -2
- package/dist/chunks/host-RKZ2OGFT.js +0 -2
- package/dist/chunks/run-manager-7RM4HEH6.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as KodaXMessage, a1 as KodaXToolDefinition, F as KodaXReasoningMode, a9 as KodaXWireReasoningEffort, a3 as KodaXToolResultContentItem, Y as KodaXThinkingBlock, I as KodaXRedactedThinkingBlock } from './types.d-
|
|
1
|
+
import { k as KodaXMessage, a1 as KodaXToolDefinition, F as KodaXReasoningMode, a9 as KodaXWireReasoningEffort, a3 as KodaXToolResultContentItem, Y as KodaXThinkingBlock, I as KodaXRedactedThinkingBlock } from './types.d-DIpZJKUl.js';
|
|
2
2
|
|
|
3
3
|
type AgentActorState = 'running' | 'idle' | 'closed';
|
|
4
4
|
type AgentTurnState = 'accepted' | 'running' | 'completed' | 'failed' | 'interrupted';
|
|
@@ -195,10 +195,14 @@ interface AgentExecutionResult {
|
|
|
195
195
|
readonly artifacts?: readonly string[];
|
|
196
196
|
readonly artifactDetails?: readonly AgentArtifactDescriptor[];
|
|
197
197
|
readonly structured?: AgentMetadataValue;
|
|
198
|
+
/** Runtime-observed completion facts merged into the durable Turn metadata. */
|
|
199
|
+
readonly turnMetadata?: Readonly<Record<string, AgentMetadataValue>>;
|
|
198
200
|
}
|
|
199
201
|
interface AgentMutationOptions {
|
|
200
202
|
/** Optimistic Actor revision checked inside the serialized durable mutation. */
|
|
201
203
|
readonly expectedRevision?: number;
|
|
204
|
+
/** Optimistic tree revision checked inside the serialized durable mutation. */
|
|
205
|
+
readonly expectedTreeRevision?: number;
|
|
202
206
|
}
|
|
203
207
|
interface AgentTurnExecutor {
|
|
204
208
|
execute(input: AgentExecutionInput): Promise<AgentExecutionResult>;
|
|
@@ -223,7 +227,7 @@ interface AgentActorStore {
|
|
|
223
227
|
/** Runtime-bound actor control surface. The caller path is minted by Runtime. */
|
|
224
228
|
interface AgentActorClient {
|
|
225
229
|
readonly callerPath: string;
|
|
226
|
-
spawn(input: AgentSpawnInput): Promise<AgentTurnRef>;
|
|
230
|
+
spawn(input: AgentSpawnInput, options?: AgentMutationOptions): Promise<AgentTurnRef>;
|
|
227
231
|
send(targetPath: string, content: string, classification?: AgentDataClassification, forwardedMessageId?: string): Promise<AgentMailboxMessage>;
|
|
228
232
|
followup(targetPath: string, objective: string, metadata?: Readonly<Record<string, AgentMetadataValue>>, options?: AgentMutationOptions): Promise<AgentFollowupResult>;
|
|
229
233
|
interrupt(targetPath: string, reason?: string, scope?: AgentInterruptScope): Promise<void>;
|
|
@@ -974,10 +978,16 @@ interface MemoryDecisionTraceReceipt {
|
|
|
974
978
|
readonly decisionRevision: string;
|
|
975
979
|
readonly policyVersion: string;
|
|
976
980
|
readonly candidateSetFingerprint: string;
|
|
981
|
+
readonly candidateIds: readonly string[];
|
|
982
|
+
readonly selectedCandidateIds: readonly string[];
|
|
983
|
+
readonly injectedEvidenceRefs: readonly string[];
|
|
984
|
+
readonly triggers?: readonly ('tool_failure' | 'verification_failure' | 'context_compacted')[];
|
|
977
985
|
readonly candidateRefs: readonly string[];
|
|
978
986
|
readonly selectedRefs: readonly string[];
|
|
979
987
|
readonly injectedRefs: readonly string[];
|
|
980
|
-
readonly selectionModes: readonly ('task_hint' | 'exact'
|
|
988
|
+
readonly selectionModes: readonly ('task_hint' | 'exact'
|
|
989
|
+
/** @deprecated Retained for source compatibility; F275 no longer emits this mode. */
|
|
990
|
+
| 'semantic_prefetch' | 'semantic_intervention' | 'deliberate_query')[];
|
|
981
991
|
readonly actionSignature?: string;
|
|
982
992
|
readonly throughSequence: number;
|
|
983
993
|
}
|
|
@@ -1791,6 +1801,13 @@ interface RunnerLlmResult {
|
|
|
1791
1801
|
readonly text: string;
|
|
1792
1802
|
readonly toolCalls?: readonly RunnerToolCall[];
|
|
1793
1803
|
readonly stopReason?: string;
|
|
1804
|
+
/**
|
|
1805
|
+
* Provider-visible input messages synthesized by the LLM adapter for this
|
|
1806
|
+
* exact generation (for example a runtime reminder). Runner commits them
|
|
1807
|
+
* immediately before the generated assistant message so the authoritative
|
|
1808
|
+
* transcript remains a faithful prefix of the next provider request.
|
|
1809
|
+
*/
|
|
1810
|
+
readonly injectedInputMessages?: readonly AgentMessage[];
|
|
1794
1811
|
/**
|
|
1795
1812
|
* v0.7.26 parity: extended-thinking blocks from the provider stream.
|
|
1796
1813
|
* Must be preserved on the assistant message so (a) session resume can
|
|
@@ -2123,6 +2140,32 @@ interface RunOptions {
|
|
|
2123
2140
|
/** Executed tool names from the iteration that reached this boundary. */
|
|
2124
2141
|
readonly lastTurnToolNames: readonly string[];
|
|
2125
2142
|
}) => Promise<readonly AgentMessage[]>;
|
|
2143
|
+
/**
|
|
2144
|
+
* Active-run input continuation owned by an embedder that accepts input
|
|
2145
|
+
* against a specific in-flight run.
|
|
2146
|
+
*
|
|
2147
|
+
* Unlike `beforeNextTurn`, this hook is consulted at a terminal candidate:
|
|
2148
|
+
* a no-tool model response or a terminal tool signal. Runner synchronously
|
|
2149
|
+
* closes admission as soon as it recognizes the candidate, then drains input
|
|
2150
|
+
* that was already accepted. A non-empty drain is committed to the
|
|
2151
|
+
* transcript, admission reopens, and the same run continues.
|
|
2152
|
+
* Lifecycle continuations may reserve only a small fixed number of turns
|
|
2153
|
+
* beyond the configured iteration cap; the final absolute turn keeps
|
|
2154
|
+
* admission closed.
|
|
2155
|
+
*
|
|
2156
|
+
* REPL hosts should omit this option so their existing round boundary keeps
|
|
2157
|
+
* ownership of queued follow-ups.
|
|
2158
|
+
*/
|
|
2159
|
+
readonly terminalContinuation?: {
|
|
2160
|
+
readonly closeInputWindow: () => void;
|
|
2161
|
+
readonly reopenInputWindow: () => void;
|
|
2162
|
+
readonly drain: (ctx: {
|
|
2163
|
+
readonly agent: Agent;
|
|
2164
|
+
readonly transcript: readonly AgentMessage[];
|
|
2165
|
+
readonly iteration: number;
|
|
2166
|
+
readonly lastTurnToolNames: readonly string[];
|
|
2167
|
+
}) => Promise<readonly AgentMessage[]>;
|
|
2168
|
+
};
|
|
2126
2169
|
/**
|
|
2127
2170
|
* FEATURE_166 (v0.7.41 follow-up) — agent-switch hook.
|
|
2128
2171
|
*
|
|
@@ -2921,7 +2964,7 @@ interface MemoryPackInput {
|
|
|
2921
2964
|
readonly includeSensitive?: boolean;
|
|
2922
2965
|
readonly includeSnippets?: boolean;
|
|
2923
2966
|
readonly ignoreMemory?: boolean;
|
|
2924
|
-
readonly purpose?: 'automatic' | 'deliberate_query';
|
|
2967
|
+
readonly purpose?: 'automatic' | 'deliberate_query' | 'intervention';
|
|
2925
2968
|
}
|
|
2926
2969
|
interface MemoryPackHint {
|
|
2927
2970
|
readonly ref: MemoryItemRef;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { k as KodaXMessage, F as KodaXReasoningMode, d as KodaXCustomProviderConfig, p as KodaXProviderCapabilityProfile } from './types.d-
|
|
2
|
-
import { O as KodaXContextTokenSnapshot,
|
|
3
|
-
import { bX as KodaXSessionUiHistoryItem, bM as KodaXSessionLineage, bD as KodaXSessionArtifactLedgerEntry, bn as KodaXExtensionSessionState, bm as KodaXExtensionSessionRecord, bT as KodaXSessionRuntimeInfo, eb as WorkflowProcessSource } from './types.d-
|
|
4
|
-
import { d as AgentsFile, r as AutoModeStats, x as KodaXMcpServersConfig } from './guardrail.d-
|
|
1
|
+
import { k as KodaXMessage, F as KodaXReasoningMode, d as KodaXCustomProviderConfig, p as KodaXProviderCapabilityProfile } from './types.d-DIpZJKUl.js';
|
|
2
|
+
import { O as KodaXContextTokenSnapshot, an as KodaXSkillDynamicContextPolicy, t as KodaXAgentMode, a7 as KodaXRepoIntelligenceMode, a1 as KodaXOptions, ao as KodaXSkillInvocationContext } from './bash-prefix-extractor.d-pZdu6qt7.js';
|
|
3
|
+
import { bX as KodaXSessionUiHistoryItem, bM as KodaXSessionLineage, bD as KodaXSessionArtifactLedgerEntry, bn as KodaXExtensionSessionState, bm as KodaXExtensionSessionRecord, bT as KodaXSessionRuntimeInfo, eb as WorkflowProcessSource } from './types.d-RdWRfUEs.js';
|
|
4
|
+
import { d as AgentsFile, r as AutoModeStats, x as KodaXMcpServersConfig } from './guardrail.d-B0PwAZVR.js';
|
|
5
5
|
import * as readline from 'readline';
|
|
6
|
-
import { R as PermissionMode, L as LearningBinding, E as LearningSurfaceSnapshot } from './public-api.d
|
|
6
|
+
import { R as PermissionMode, L as LearningBinding, E as LearningSurfaceSnapshot } from './public-api.d--fF88JrC.js';
|
|
7
7
|
import { SpawnSyncReturns } from 'child_process';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -28,13 +28,13 @@ are NOT obvious from inspecting the type definitions alone:
|
|
|
28
28
|
18. [External-agent executor plane](#18-external-agent-executor-plane-feature_258-v0767)
|
|
29
29
|
19. [Session surface filtering and cursor pagination](#19-session-surface-filtering-and-cursor-pagination-feature_261-v0767)
|
|
30
30
|
20. [Cost-disciplined workflow routing and telemetry](#20-cost-disciplined-workflow-routing-and-telemetry-feature_259-v0767)
|
|
31
|
-
21. [Experimental governed memory — `/experimental-memory`](#21-experimental-governed-memory--experimental-memory-feature_260-
|
|
31
|
+
21. [Experimental governed memory — `/experimental-memory`](#21-experimental-governed-memory--experimental-memory-feature_260--feature_275-v0768v0777)
|
|
32
32
|
22. [Bidirectional A2A 1.0 — `/a2a`](#22-bidirectional-a2a-10--a2a-feature_267-v0769)
|
|
33
33
|
23. [Shared Coder daemon for Space and IDE hosts](#23-shared-coder-daemon-for-space-and-ide-hosts-feature_269-v0769)
|
|
34
34
|
24. [Runtime-owned Auto Mode and plan-approval bridges](#24-runtime-owned-auto-mode-and-plan-approval-bridges-v0772v0773)
|
|
35
|
-
25. [Always-on context compaction and bounded transcript recovery](#25-always-on-context-compaction-and-bounded-transcript-recovery-v0774)
|
|
36
|
-
26. [Agent mailbox control versus SDK event telemetry](#26-agent-mailbox-control-versus-sdk-event-telemetry-v0774)
|
|
37
|
-
27. [Windows GUI background subprocess visibility](#27-windows-gui-background-subprocess-visibility-v0775)
|
|
35
|
+
25. [Always-on context compaction and bounded transcript recovery](#25-always-on-context-compaction-and-bounded-transcript-recovery-v0774)
|
|
36
|
+
26. [Agent mailbox control versus SDK event telemetry](#26-agent-mailbox-control-versus-sdk-event-telemetry-v0774)
|
|
37
|
+
27. [Windows GUI background subprocess visibility](#27-windows-gui-background-subprocess-visibility-v0775)
|
|
38
38
|
|
|
39
39
|
§1–§3 (and the Phase-7/8 MCP-popout surface in §1) land in v0.7.42
|
|
40
40
|
under FEATURE_186 (see [ADR-032](ADR.md#adr-032-sdk-embedder-surface-closure-feature_186-v0742)).
|
|
@@ -2775,11 +2775,11 @@ await runtime.mcp.upsertServer('filesystem', {
|
|
|
2775
2775
|
});
|
|
2776
2776
|
await runtime.mcp.reloadServers();
|
|
2777
2777
|
|
|
2778
|
-
const commands = await runtime.catalog.commands(process.cwd());
|
|
2779
|
-
const skills = await runtime.catalog.skills({ projectRoot: process.cwd() });
|
|
2780
|
-
```
|
|
2781
|
-
|
|
2782
|
-
This is the intended path for KodaX Space, IDE adapters, and settings UIs:
|
|
2778
|
+
const commands = await runtime.catalog.commands(process.cwd());
|
|
2779
|
+
const skills = await runtime.catalog.skills({ projectRoot: process.cwd() });
|
|
2780
|
+
```
|
|
2781
|
+
|
|
2782
|
+
This is the intended path for KodaX Space, IDE adapters, and settings UIs:
|
|
2783
2783
|
session defaults go through `sessions.updateSettings()`, one-turn overrides go
|
|
2784
2784
|
through `runs.start({ options })`, and daemon/profile config goes through
|
|
2785
2785
|
`config`, `catalog`, and `mcp`.
|
|
@@ -2799,12 +2799,19 @@ engine:
|
|
|
2799
2799
|
Hosts that set `capabilities.contextDiagnostics: true` can read:
|
|
2800
2800
|
|
|
2801
2801
|
```ts
|
|
2802
|
-
const budget = await runtime.diagnostics.latestContextBudget({ sessionId });
|
|
2803
|
-
const exposure = await runtime.diagnostics.latestToolExposure({ sessionId });
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2802
|
+
const budget = await runtime.diagnostics.latestContextBudget({ sessionId });
|
|
2803
|
+
const exposure = await runtime.diagnostics.latestToolExposure({ sessionId });
|
|
2804
|
+
const cache = await runtime.diagnostics.latestProviderCacheDiagnostic({ sessionId });
|
|
2805
|
+
```
|
|
2806
|
+
|
|
2807
|
+
Pass `{ sessionId, contextKind: 'child', agentId }` to query one logical child
|
|
2808
|
+
even though its physical transcript uses an isolated Session. Diagnostic
|
|
2809
|
+
payloads carry `contextId` and, for children, `parentContextId`; reconnecting
|
|
2810
|
+
hosts can use the same latest APIs instead of fabricating identity fields.
|
|
2811
|
+
These diagnostics are designed for status panels and debugging. Budget
|
|
2812
|
+
snapshots contain counts, and cache diagnostics contain hashes plus
|
|
2813
|
+
Provider-reported usage; they do not contain raw prompt or sensitive tool
|
|
2814
|
+
input/output.
|
|
2808
2815
|
|
|
2809
2816
|
### Protocol schema and versioning
|
|
2810
2817
|
|
|
@@ -3219,7 +3226,7 @@ workflow's structured findings, verification results, and quality gates.
|
|
|
3219
3226
|
|
|
3220
3227
|
---
|
|
3221
3228
|
|
|
3222
|
-
## 21. Experimental governed memory — `/experimental-memory` (FEATURE_260, v0.7.68)
|
|
3229
|
+
## 21. Experimental governed memory — `/experimental-memory` (FEATURE_260 + FEATURE_275, v0.7.68–v0.7.77)
|
|
3223
3230
|
|
|
3224
3231
|
KodaX has one durable memory plane: the F228 Memory Control Plane. FEATURE_260
|
|
3225
3232
|
adds a thin, opt-in agent/session API over that plane; it does not add a second
|
|
@@ -3280,11 +3287,53 @@ await session.complete({
|
|
|
3280
3287
|
await session.close();
|
|
3281
3288
|
```
|
|
3282
3289
|
|
|
3283
|
-
`recall()` is synchronous
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3290
|
+
`recall()` is synchronous and exact. `query()` is deliberate and read-only; one
|
|
3291
|
+
distinct query is admitted per decision epoch, and the result is bounded to at
|
|
3292
|
+
most three prompt-safe hints and 512 estimated tokens. `undefined` means there
|
|
3293
|
+
is no governed reminder to inject.
|
|
3294
|
+
|
|
3295
|
+
### Sparse foreground intervention (FEATURE_275, v0.7.77)
|
|
3296
|
+
|
|
3297
|
+
`MemorySession.intervene()` replaces the old timing-ineffective semantic
|
|
3298
|
+
prefetch. It is awaited only after `tool_failure`, `verification_failure`, or a
|
|
3299
|
+
durably committed `context_compacted` event, then supplies at most three
|
|
3300
|
+
prompt-safe, low-authority evidence items to the next Action-LLM request. The
|
|
3301
|
+
candidate set is rebuilt from current objective/open todos, recent governed
|
|
3302
|
+
observations, and a fresh F228 pack. Exact selection is deterministic; stale,
|
|
3303
|
+
unknown, malformed, timed-out, cancelled, or failed semantic results are
|
|
3304
|
+
discarded without blocking the coding run.
|
|
3305
|
+
|
|
3306
|
+
Top-level coding runs wire the deterministic path automatically and make zero
|
|
3307
|
+
selector calls by default. An inline host that deliberately wants semantic
|
|
3308
|
+
selection can provide the coding-owned forced-tool runner:
|
|
3309
|
+
|
|
3310
|
+
```ts
|
|
3311
|
+
import {
|
|
3312
|
+
createCodingMemoryInterventionRunner,
|
|
3313
|
+
runKodaX,
|
|
3314
|
+
} from '@kodax-ai/kodax/coding';
|
|
3315
|
+
import { resolveProvider } from '@kodax-ai/kodax/llm';
|
|
3316
|
+
|
|
3317
|
+
const memoryRecallRunner = createCodingMemoryInterventionRunner({
|
|
3318
|
+
provider: resolveProvider('zhipu-coding'),
|
|
3319
|
+
model: 'glm-5.2',
|
|
3320
|
+
});
|
|
3321
|
+
|
|
3322
|
+
await runKodaX(
|
|
3323
|
+
{
|
|
3324
|
+
provider: 'zhipu-coding',
|
|
3325
|
+
model: 'glm-5.2',
|
|
3326
|
+
memoryRecallRunner,
|
|
3327
|
+
},
|
|
3328
|
+
'Finish the repository migration and verify it.',
|
|
3329
|
+
);
|
|
3330
|
+
```
|
|
3331
|
+
|
|
3332
|
+
`memoryRecallRunner` is a process-local function binding. Worker and daemon DTO
|
|
3333
|
+
options reject it instead of silently dropping it; configure the binding
|
|
3334
|
+
inside the Runtime owner or keep this run inline. The selector can return only
|
|
3335
|
+
exact IDs from the closed offered set and is capped at three calls per memory
|
|
3336
|
+
Session.
|
|
3288
3337
|
|
|
3289
3338
|
### Evidence, tracing, and persistence boundaries
|
|
3290
3339
|
|
|
@@ -3294,9 +3343,11 @@ decision epoch, and the result is bounded to at most three prompt-safe hints and
|
|
|
3294
3343
|
material. `rewind()` removes observations after a sequence boundary.
|
|
3295
3344
|
- `complete()` can emit an Outcome Digest through `persistOutcomeDigest` and run
|
|
3296
3345
|
bounded episode review through `reviewEpisode`; cancellation creates neither.
|
|
3297
|
-
- `onTrace` receives policy-versioned `MemoryDecisionReceipt` metadata that links
|
|
3298
|
-
|
|
3299
|
-
|
|
3346
|
+
- `onTrace` receives policy-versioned `MemoryDecisionReceipt` metadata that links
|
|
3347
|
+
offered `candidateIds`, validated `selectedCandidateIds`, exposed
|
|
3348
|
+
`injectedEvidenceRefs`, triggers, and later outcome influence. Receipts are
|
|
3349
|
+
trace-only and contain no hidden reasoning; exposure is not proof of
|
|
3350
|
+
causality.
|
|
3300
3351
|
- Durable memory mutation remains owned by F228's
|
|
3301
3352
|
proposal/preview/fingerprint/apply flow. `/memory` is the CLI governance
|
|
3302
3353
|
surface; direct file/shell writes to managed memory roots are denied.
|
|
@@ -3945,13 +3996,17 @@ complete ordered batch. Exact operation retries return the same `inputId`.
|
|
|
3945
3996
|
The accepted result's `runId` is the existing owning Run (equal to
|
|
3946
3997
|
`afterRunId`), not a newly created continuation.
|
|
3947
3998
|
|
|
3948
|
-
Interrupt admission closes when the Runner publishes its final completion or
|
|
3949
|
-
terminal error signal, or when the Run's supplied `abortSignal` aborts, even if
|
|
3950
|
-
the outer Run is still settling. Non-terminal observer diagnostics do not close
|
|
3951
|
-
the window.
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3999
|
+
Interrupt admission closes when the Runner publishes its final completion or
|
|
4000
|
+
terminal error signal, or when the Run's supplied `abortSignal` aborts, even if
|
|
4001
|
+
the outer Run is still settling. Non-terminal observer diagnostics do not close
|
|
4002
|
+
the window. Same-Run lifecycle continuations also have a fixed internal
|
|
4003
|
+
allowance beyond the configured iteration ceiling; the Runner closes admission
|
|
4004
|
+
before its final absolute generation so repeated submissions cannot keep one
|
|
4005
|
+
Run alive indefinitely. The allowance never expands an admitted manifest's
|
|
4006
|
+
`maxIterations` governance cap. A submission after closure returns
|
|
4007
|
+
`accepted:false` with `reason:'interrupt_window_closed'` and is not queued. Keep
|
|
4008
|
+
the original input available for retry after the Run ends; do not silently
|
|
4009
|
+
change its delivery to `after_turn`. As a final race/recovery
|
|
3955
4010
|
guard, inspect terminal Run status: any `interruptInputs` entry whose state is
|
|
3956
4011
|
`terminal` was not delivered. Reconcile it by `inputId` and present a visible
|
|
3957
4012
|
non-delivery outcome rather than leaving a pending queue indicator.
|
|
@@ -3968,13 +4023,13 @@ const interrupted = await runtime.runs.submitInput({
|
|
|
3968
4023
|
|
|
3969
4024
|
Run status exposes acceptance/start/queue times, authenticated origin,
|
|
3970
4025
|
`sessionOrder`, and a single terminal fact. Important terminal codes include
|
|
3971
|
-
`runtime_restarted`, `daemon_crashed`, `credential_unavailable`,
|
|
3972
|
-
`host_not_dispatched`, `host_outcome_unknown`, and
|
|
3973
|
-
`control_history_untrusted`. Managed tasks that require user input use
|
|
3974
|
-
`terminal.code = 'blocked'`; surface `terminal.message` when present instead of
|
|
3975
|
-
replacing it with a generic run failure. Respect `effectOutcome`; `unknown` must
|
|
3976
|
-
never be presented as success or automatically retried. After a lost response,
|
|
3977
|
-
query `runtime.operations.get({ operationId, journalEpoch })`; applied receipts
|
|
4026
|
+
`runtime_restarted`, `daemon_crashed`, `credential_unavailable`,
|
|
4027
|
+
`host_not_dispatched`, `host_outcome_unknown`, and
|
|
4028
|
+
`control_history_untrusted`. Managed tasks that require user input use
|
|
4029
|
+
`terminal.code = 'blocked'`; surface `terminal.message` when present instead of
|
|
4030
|
+
replacing it with a generic run failure. Respect `effectOutcome`; `unknown` must
|
|
4031
|
+
never be presented as success or automatically retried. After a lost response,
|
|
4032
|
+
query `runtime.operations.get({ operationId, journalEpoch })`; applied receipts
|
|
3978
4033
|
include the canonical result. Permission grants remain daemon-owned and
|
|
3979
4034
|
revisioned.
|
|
3980
4035
|
|
|
@@ -4609,49 +4664,123 @@ parent transcript commits and acknowledges the completion, later restores do
|
|
|
4609
4664
|
not replay it. Legacy snapshots without the explicit pending set do not infer
|
|
4610
4665
|
replay work from historical mailbox content.
|
|
4611
4666
|
|
|
4612
|
-
This separation changes no Actor event capability or daemon version: existing
|
|
4613
|
-
SDK snapshot, replay, and long-poll clients keep their telemetry surface. It
|
|
4614
|
-
only prevents high-frequency progress from becoming a model control signal.
|
|
4667
|
+
This separation changes no Actor event capability or daemon version: existing
|
|
4668
|
+
SDK snapshot, replay, and long-poll clients keep their telemetry surface. It
|
|
4669
|
+
only prevents high-frequency progress from becoming a model control signal.
|
|
4670
|
+
|
|
4671
|
+
---
|
|
4672
|
+
|
|
4673
|
+
## 27. Windows GUI background subprocess visibility (v0.7.75)
|
|
4674
|
+
|
|
4675
|
+
KodaX SDK hosts do not need to add process-wide console suppression around the
|
|
4676
|
+
Runtime. In the v0.7.75 release candidate, Runtime Worker-reachable
|
|
4677
|
+
non-interactive/background child processes request `windowsHide: true` at their
|
|
4678
|
+
own spawn boundary. The covered paths include:
|
|
4679
|
+
|
|
4680
|
+
- memory and Git metadata probes;
|
|
4681
|
+
- provider CLI execution and ACP servers;
|
|
4682
|
+
- LSP acquisition and language servers;
|
|
4683
|
+
- clipboard helpers, worktrees, review commands, and extension commands;
|
|
4684
|
+
- managed-task checkpoints and sandbox helpers.
|
|
4685
|
+
|
|
4686
|
+
The contract is intentionally narrow. Explicit external editors, terminal
|
|
4687
|
+
commands, and PTY sessions remain interactive. POSIX-only `ps`, `tmux`, and
|
|
4688
|
+
sandbox branches are reviewed bundle-audit exceptions rather than Windows
|
|
4689
|
+
visibility paths.
|
|
4690
|
+
|
|
4691
|
+
`npm run build:bundle` audits every statically identifiable child-process call
|
|
4692
|
+
reachable from `dist/runtime-worker.js`. The packaged Electron daemon smoke then
|
|
4693
|
+
runs 20 ordinary queries with a Win32 probe and checks that the expected Git
|
|
4694
|
+
children never own a visible console window. These checks validate the SDK
|
|
4695
|
+
boundary, but they do not replace product-level validation in the packaged host.
|
|
4696
|
+
KodaX Space should install the exact v0.7.75 tarball and complete
|
|
4697
|
+
[`ISSUE_205_v0.7.75_REGRESSION_GUIDE.md`](test-guides/ISSUE_205_v0.7.75_REGRESSION_GUIDE.md)
|
|
4698
|
+
on Windows 10 and Windows 11 as a non-blocking product validation follow-up.
|
|
4699
|
+
This follow-up does not gate SDK packaging, tagging, or publication.
|
|
4615
4700
|
|
|
4616
4701
|
---
|
|
4617
4702
|
|
|
4618
|
-
##
|
|
4703
|
+
## 28. Host-configurable Shell Execution Contract (v0.7.77)
|
|
4619
4704
|
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
own spawn boundary. The covered paths include:
|
|
4705
|
+
The shared daemon is long-lived, so its startup `process.env.PATH` is not a
|
|
4706
|
+
reliable description of every project's toolchain. A host can opt a Session
|
|
4707
|
+
into a serializable shell contract:
|
|
4624
4708
|
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4709
|
+
```ts
|
|
4710
|
+
await runtime.sessions.updateSettings(session.id, {
|
|
4711
|
+
executionCwd: projectDirectory,
|
|
4712
|
+
shellExecution: {
|
|
4713
|
+
version: 1,
|
|
4714
|
+
shell: {
|
|
4715
|
+
kind: 'pwsh', // pwsh | powershell | cmd | bash | zsh
|
|
4716
|
+
profile: 'default',
|
|
4717
|
+
},
|
|
4718
|
+
environment: {
|
|
4719
|
+
inherit: 'filtered',
|
|
4720
|
+
// Trusted host code, not model input. Use it for a directory-aware
|
|
4721
|
+
// activation command when the shell profile does not switch on cwd.
|
|
4722
|
+
setup: 'fnm use --silent-if-unchanged',
|
|
4723
|
+
windowsPath: 'registry',
|
|
4724
|
+
},
|
|
4725
|
+
cache: {
|
|
4726
|
+
ttlMs: 30_000,
|
|
4727
|
+
refreshToken: 'toolchain-revision-1',
|
|
4728
|
+
},
|
|
4729
|
+
probeTimeoutMs: 10_000,
|
|
4730
|
+
},
|
|
4731
|
+
});
|
|
4732
|
+
```
|
|
4630
4733
|
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4734
|
+
An individual Run can supply `options.context.shellExecution`; a concrete Run
|
|
4735
|
+
contract overrides the Session setting. An omitted value or explicit
|
|
4736
|
+
`undefined` does not erase the Session setting. Use a `null` Session patch to
|
|
4737
|
+
remove it.
|
|
4635
4738
|
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4739
|
+
The contract supports an optional absolute `shell.executable` (for example Git
|
|
4740
|
+
Bash) and bounded fixed `shell.args`. Command/file/persistence/profile/server
|
|
4741
|
+
and working-directory control flags are rejected from those fixed arguments.
|
|
4742
|
+
`environment.set` is for non-secret host variables. `denyPatterns` can remove
|
|
4743
|
+
additional names but cannot weaken the built-in Provider credential deny set.
|
|
4744
|
+
`inherit: "none"` retains only the OS variables required to start the selected
|
|
4745
|
+
shell. On Windows, `windowsPath: "registry"` re-reads current Machine/User
|
|
4746
|
+
environment values instead of reusing the daemon's startup PATH.
|
|
4747
|
+
|
|
4748
|
+
Resolution is two-stage and uses the effective cwd:
|
|
4749
|
+
|
|
4750
|
+
1. sanitize the bootstrap environment, including credentials for built-in,
|
|
4751
|
+
custom, active, inactive, and stacked runtime Providers;
|
|
4752
|
+
2. start the selected shell, load the requested profile/setup, capture a
|
|
4753
|
+
random-framed environment, validate and sanitize it again;
|
|
4754
|
+
3. execute the actual command through that same explicit interpreter.
|
|
4755
|
+
|
|
4756
|
+
The cache is in-memory and isolated by normalized contract, canonical cwd,
|
|
4757
|
+
Session scratch identity, credential deny names, and refresh generation. TTL
|
|
4758
|
+
is bounded to ten minutes; zero disables caching. Daemon restart clears it.
|
|
4759
|
+
`clearShellExecutionEnvironmentCache()` is available for an in-process owner
|
|
4760
|
+
that needs immediate global invalidation.
|
|
4761
|
+
|
|
4762
|
+
Native children, nested Actor turns, Workflow child paths, and deterministic
|
|
4763
|
+
build/test/lint evaluators inherit the effective contract. Runtime exact-command
|
|
4764
|
+
permission grants bind the interpreter family and contract fingerprint, so a
|
|
4765
|
+
grant created under cmd cannot silently authorize the same command after a
|
|
4766
|
+
switch to PowerShell or Bash.
|
|
4767
|
+
|
|
4768
|
+
Configured-shell failures are visible and fail closed: KodaX does not reinterpret
|
|
4769
|
+
the command through another shell. When `shellExecution` is absent, KodaX keeps
|
|
4770
|
+
the pre-v0.7.77 platform-shell behavior for compatibility. See
|
|
4771
|
+
[`ISSUE_214_v0.7.77_REGRESSION_GUIDE.md`](test-guides/ISSUE_214_v0.7.77_REGRESSION_GUIDE.md)
|
|
4772
|
+
for cross-project, cache, cancellation, credential, and Windows argv checks.
|
|
4645
4773
|
|
|
4646
4774
|
---
|
|
4647
4775
|
|
|
4648
4776
|
## See also
|
|
4649
|
-
|
|
4650
|
-
- [README.md](../README.md) — end-user CLI quick start
|
|
4777
|
+
|
|
4778
|
+
- [README.md](../README.md) — end-user CLI quick start
|
|
4651
4779
|
- [docs/ADR.md ADR-024](ADR.md#adr-024-npm-发布物正名-kodax-aikodax--sdk-subpath-exports-形式化-v0739) — SDK subpath architecture rationale
|
|
4652
4780
|
- [docs/ADR.md ADR-032](ADR.md#adr-032-sdk-embedder-surface-closure-feature_186-v0742) — FEATURE_186 design record (all 8 phases)
|
|
4653
4781
|
- [docs/ADR.md ADR-057](ADR.md#adr-057-large-compaction-is-an-always-on-context-scoped-full-coverage-transaction) — v0.7.74 compaction and exact-history ownership
|
|
4654
|
-
- [docs/ADR.md ADR-058](ADR.md#adr-058-model-agent-wait-is-mailbox-control-not-event-telemetry) — mailbox control versus Actor telemetry
|
|
4655
|
-
- [docs/features/v0.7.42.md FEATURE_186](features/v0.7.42.md#feature_186-sdk-embedder-surface-closure--kodax-space-gap-list--mcp-popout) — gap-by-gap landing matrix
|
|
4782
|
+
- [docs/ADR.md ADR-058](ADR.md#adr-058-model-agent-wait-is-mailbox-control-not-event-telemetry) — mailbox control versus Actor telemetry
|
|
4783
|
+
- [docs/features/v0.7.42.md FEATURE_186](features/v0.7.42.md#feature_186-sdk-embedder-surface-closure--kodax-space-gap-list--mcp-popout) — gap-by-gap landing matrix
|
|
4656
4784
|
- [docs/features/v0.7.74.md](features/v0.7.74.md) — v0.7.74 release-candidate design and verification record
|
|
4657
4785
|
- [docs/features/v0.7.75.md](features/v0.7.75.md) — v0.7.75 Windows GUI and Sidecar/Runtime stabilization candidate
|
|
4786
|
+
- [docs/features/v0.7.77.md](features/v0.7.77.md) — v0.7.77 adaptive-quality, governed-memory, and release-hardening record
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodax-ai/kodax",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.77",
|
|
4
4
|
"description": "KodaX lightweight coding agent - TypeScript implementation with 16 built-in LLM provider aliases, published as a Node-free single-file CLI and SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"dev:mem-snapshot": "node scripts/mem-diag-launch.cjs 2",
|
|
80
80
|
"probe:reasoning": "tsx scripts/probe-reasoning.ts",
|
|
81
81
|
"probe:max-tokens": "node scripts/probe-max-tokens.mjs",
|
|
82
|
+
"probe:prompt-cache": "node scripts/probe-prompt-cache.mjs",
|
|
82
83
|
"start": "node --max-old-space-size=4096 --require ./scripts/production-env.cjs dist/kodax_bootstrap.js",
|
|
83
84
|
"build:binary": "node scripts/build-binary.mjs",
|
|
84
85
|
"build:binary:all": "node scripts/build-binary.mjs --all",
|
package/scripts/kodax-bin.cjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* KodaX bin entry — CJS shim.
|
|
4
|
-
*
|
|
5
|
-
* Purpose: set NODE_ENV=production BEFORE any ESM module is evaluated.
|
|
6
|
-
* Background: when users invoke `kodax` via `npm link` / global install,
|
|
7
|
-
* node runs this bin directly without the --require preload used by
|
|
8
|
-
* `npm run dev` / `npm run start`. ESM static imports are hoisted and
|
|
9
|
-
* evaluated before module-body code runs, so setting NODE_ENV inside
|
|
10
|
-
* `src/kodax_cli.ts` is too late — React would already have loaded its
|
|
11
|
-
* development reconciler, leaking ~100 MB/turn of profiling objects.
|
|
12
|
-
*
|
|
13
|
-
* This CJS file runs synchronously first, requires the env preload,
|
|
14
|
-
* then dynamic-imports the lightweight compiled bootstrap.
|
|
15
|
-
*
|
|
16
|
-
* Opt back into development by setting KODAX_DEV=1.
|
|
17
|
-
*/
|
|
18
|
-
'use strict';
|
|
19
|
-
|
|
20
|
-
require('./production-env.cjs');
|
|
21
|
-
|
|
22
|
-
import('../dist/kodax_bootstrap.js').then(
|
|
23
|
-
({ runKodaXBootstrapAsEntry }) => runKodaXBootstrapAsEntry(),
|
|
24
|
-
).catch((err) => {
|
|
25
|
-
// Surface unexpected errors with a full stack — this path should be rare.
|
|
26
|
-
// eslint-disable-next-line no-console
|
|
27
|
-
console.error(err);
|
|
28
|
-
process.exit(1);
|
|
29
|
-
});
|
|
2
|
+
/**
|
|
3
|
+
* KodaX bin entry — CJS shim.
|
|
4
|
+
*
|
|
5
|
+
* Purpose: set NODE_ENV=production BEFORE any ESM module is evaluated.
|
|
6
|
+
* Background: when users invoke `kodax` via `npm link` / global install,
|
|
7
|
+
* node runs this bin directly without the --require preload used by
|
|
8
|
+
* `npm run dev` / `npm run start`. ESM static imports are hoisted and
|
|
9
|
+
* evaluated before module-body code runs, so setting NODE_ENV inside
|
|
10
|
+
* `src/kodax_cli.ts` is too late — React would already have loaded its
|
|
11
|
+
* development reconciler, leaking ~100 MB/turn of profiling objects.
|
|
12
|
+
*
|
|
13
|
+
* This CJS file runs synchronously first, requires the env preload,
|
|
14
|
+
* then dynamic-imports the lightweight compiled bootstrap.
|
|
15
|
+
*
|
|
16
|
+
* Opt back into development by setting KODAX_DEV=1.
|
|
17
|
+
*/
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
require('./production-env.cjs');
|
|
21
|
+
|
|
22
|
+
import('../dist/kodax_bootstrap.js').then(
|
|
23
|
+
({ runKodaXBootstrapAsEntry }) => runKodaXBootstrapAsEntry(),
|
|
24
|
+
).catch((err) => {
|
|
25
|
+
// Surface unexpected errors with a full stack — this path should be rare.
|
|
26
|
+
// eslint-disable-next-line no-console
|
|
27
|
+
console.error(err);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
});
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Preload script — must execute before any ESM module evaluation.
|
|
3
|
-
* Loaded via: node --require ./scripts/production-env.cjs ...
|
|
4
|
-
*
|
|
5
|
-
* React ships two runtimes: development (with PerformanceMeasure tracking,
|
|
6
|
-
* prop diff strings, component profiling) and production (zero overhead).
|
|
7
|
-
* Development mode creates ~100 MB/turn of profiling objects that are never
|
|
8
|
-
* released, causing inevitable OOM after 10-20 conversation rounds.
|
|
9
|
-
*
|
|
10
|
-
* Default to production. Set KODAX_DEV=1 to opt-in to development mode.
|
|
11
|
-
*/
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
|
-
if (!process.env.NODE_ENV) {
|
|
15
|
-
process.env.NODE_ENV = process.env.KODAX_DEV === '1' ? 'development' : 'production';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Bootstrap hardening must run before the first application ESM import.
|
|
19
|
-
// ELECTRON_RUN_AS_NODE is a one-shot exec-boundary switch and is never kept.
|
|
20
|
-
delete process.env.ELECTRON_RUN_AS_NODE;
|
|
21
|
-
if (process.env.KODAX_DISABLE_HARDENING !== '1') {
|
|
22
|
-
delete process.env.LD_PRELOAD;
|
|
23
|
-
delete process.env.DYLD_INSERT_LIBRARIES;
|
|
24
|
-
delete process.env.DYLD_LIBRARY_PATH;
|
|
25
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Preload script — must execute before any ESM module evaluation.
|
|
3
|
+
* Loaded via: node --require ./scripts/production-env.cjs ...
|
|
4
|
+
*
|
|
5
|
+
* React ships two runtimes: development (with PerformanceMeasure tracking,
|
|
6
|
+
* prop diff strings, component profiling) and production (zero overhead).
|
|
7
|
+
* Development mode creates ~100 MB/turn of profiling objects that are never
|
|
8
|
+
* released, causing inevitable OOM after 10-20 conversation rounds.
|
|
9
|
+
*
|
|
10
|
+
* Default to production. Set KODAX_DEV=1 to opt-in to development mode.
|
|
11
|
+
*/
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
if (!process.env.NODE_ENV) {
|
|
15
|
+
process.env.NODE_ENV = process.env.KODAX_DEV === '1' ? 'development' : 'production';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Bootstrap hardening must run before the first application ESM import.
|
|
19
|
+
// ELECTRON_RUN_AS_NODE is a one-shot exec-boundary switch and is never kept.
|
|
20
|
+
delete process.env.ELECTRON_RUN_AS_NODE;
|
|
21
|
+
if (process.env.KODAX_DISABLE_HARDENING !== '1') {
|
|
22
|
+
delete process.env.LD_PRELOAD;
|
|
23
|
+
delete process.env.DYLD_INSERT_LIBRARIES;
|
|
24
|
+
delete process.env.DYLD_LIBRARY_PATH;
|
|
25
|
+
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{Ea as i,Ka as j,da as d,ea as e,fa as f,j as c,ua as g,wa as h}from"./chunk-OD6LVXU6.js";import"./chunk-IDCGNQ4H.js";import"./chunk-PXKSE54E.js";import"./chunk-7FJNLJLF.js";import"./chunk-D3T24FJW.js";import{sb as a,tb as b}from"./chunk-VWSLC2WO.js";import"./chunk-Y3AMP22L.js";import"./chunk-COQYLD4U.js";import"./chunk-EI4JBQKL.js";import"./chunk-ONUPGMER.js";export{e as bucketProviderPayloadSize,g as buildAutoRepoIntelligenceContext,f as checkPromiseSignal,b as cleanupIncompleteToolCalls,h as describeTransientProviderRetry,c as emitResilienceDebug,d as estimateProviderPayloadBytes,j as runKodaX,i as saveSessionSnapshot,a as validateAndFixToolHistory};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{Ja as a,Ka as b}from"./chunk-HS3XHF3R.js";import"./chunk-4PWPNCNK.js";import"./chunk-RDXRM3UI.js";import"./chunk-TGMBHGZO.js";import"./chunk-SMT2JSM3.js";import"./chunk-OSF3H4RR.js";import"./chunk-OD6LVXU6.js";import"./chunk-IDCGNQ4H.js";import"./chunk-PXKSE54E.js";import"./chunk-7FJNLJLF.js";import"./chunk-D3T24FJW.js";import"./chunk-VWSLC2WO.js";import"./chunk-Y3AMP22L.js";import"./chunk-COQYLD4U.js";import"./chunk-EI4JBQKL.js";import"./chunk-ONUPGMER.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
|