@kodax-ai/kodax 0.7.79 → 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 +93 -12
- package/README.md +31 -8
- package/README_CN.md +25 -5
- package/config-templates/config.example.jsonc +14 -2
- package/dist/chunks/agent-5PHGNFW3.js +2 -0
- package/dist/chunks/argument-completer-FXRZFMTC.js +2 -0
- package/dist/chunks/{chunk-H5LLM7DB.js → chunk-6UENDY33.js} +2 -2
- package/dist/chunks/{chunk-QCZLCLFL.js → chunk-BWX4YZX3.js} +2 -2
- package/dist/chunks/{chunk-EDZ4QILG.js → chunk-CDCCTM5I.js} +17 -5
- package/dist/chunks/chunk-CEB5FDND.js +810 -0
- package/dist/chunks/{chunk-M4N2JZTZ.js → chunk-E7C4DRD2.js} +1 -1
- package/dist/chunks/{chunk-GEECPO2H.js → chunk-EVXIJPZ6.js} +66 -66
- package/dist/chunks/chunk-FQ7NVMSU.js +319 -0
- package/dist/chunks/chunk-GC4JBMBS.js +385 -0
- package/dist/chunks/{chunk-67THZRM6.js → chunk-HTVLCHWH.js} +1 -1
- package/dist/chunks/chunk-IHPH3444.js +655 -0
- package/dist/chunks/{chunk-OWQT3FTE.js → chunk-KHEFUT6O.js} +1 -1
- package/dist/chunks/{chunk-BBOVVDQJ.js → chunk-PMKAG4SZ.js} +1 -1
- package/dist/chunks/chunk-RPF5RGWZ.js +479 -0
- package/dist/chunks/{chunk-CXHEZY5G.js → chunk-RXXKDR6Y.js} +1 -1
- package/dist/chunks/{chunk-6GVQDQTQ.js → chunk-T5U4OP2N.js} +1 -1
- package/dist/chunks/{chunk-SG6P4SZS.js → chunk-TRNAWSXP.js} +21 -21
- package/dist/chunks/{chunk-CR2IF7VF.js → chunk-UZSHBQER.js} +5 -5
- package/dist/chunks/{chunk-B6UY3VHV.js → chunk-VECRQTSD.js} +44 -44
- package/dist/chunks/compaction-config-6J6XCBJS.js +2 -0
- package/dist/chunks/{construction-bootstrap-K3ZGEN5N.js → construction-bootstrap-KPCAE3VN.js} +1 -1
- package/dist/chunks/dist-RWEVZOFK.js +2 -0
- package/dist/chunks/{dist-JMO47GJV.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-6LEKJPQN.js → utils-2YHRUZYC.js} +1 -1
- package/dist/index.d.ts +13 -12
- package/dist/index.js +4 -4
- package/dist/kodax_bootstrap.js +1 -1
- package/dist/kodax_cli.js +1301 -1285
- package/dist/kodax_resume.js +63 -63
- package/dist/runtime-worker.js +1205 -1189
- package/dist/sandbox-workspace-session.js +43 -43
- package/dist/sdk-a2a.d.ts +8 -8
- package/dist/sdk-a2a.js +1 -1
- package/dist/sdk-agent.d.ts +15 -17
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +171 -20
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +19 -200
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +11 -8
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +4 -4
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +44 -44
- package/dist/types-chunks/{bash-prefix-extractor.d-CNSidpmv.d.ts → bash-prefix-extractor.d-DStqKIlu.d.ts} +4 -2
- package/dist/types-chunks/{capsule.d-B3q98pLQ.d.ts → capsule.d-BuFJaYxA.d.ts} +6 -15
- package/dist/types-chunks/{controller.d-RGV7Pjv9.d.ts → controller.d-C2aHqzHj.d.ts} +18 -10
- package/dist/types-chunks/{guardrail.d-1NLSFTyN.d.ts → guardrail.d-DM-OK0m3.d.ts} +74 -77
- package/dist/types-chunks/{history-retrieval.d-BAegI14A.d.ts → history-retrieval.d-DImTKgO6.d.ts} +1 -1
- package/dist/types-chunks/{public-api.d-BpJhHoa7.d.ts → public-api.d-CewTvUKV.d.ts} +5 -17
- package/dist/types-chunks/{repl.d-CZ12Ow3X.d.ts → repl.d-DvXQtgr7.d.ts} +5 -5
- package/dist/types-chunks/{run-manager.d-CX3AUocA.d.ts → run-manager.d-C6ahvZqK.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-B3cfJKqF.d.ts → sdk-session-C59RUrri.d.ts} +2 -2
- package/dist/types-chunks/shell-command-sets.d-Dp4UvPLL.d.ts +297 -0
- package/dist/types-chunks/{types.d-BZ9oXvTV.d.ts → types.d-BzpPDBPV.d.ts} +1 -1
- package/dist/types-chunks/{types.d-C0_rn--1.d.ts → types.d-yuJzE82x.d.ts} +2 -2
- package/dist/types-chunks/{utils.d-CGpHavsU.d.ts → utils.d-BpACJmzt.d.ts} +15 -5
- package/docs/SDK_EMBEDDER_GUIDE.md +36 -32
- package/package.json +3 -3
- package/dist/chunks/agent-V4AC5JZD.js +0 -2
- package/dist/chunks/argument-completer-ZPC2MLES.js +0 -2
- package/dist/chunks/chunk-KLWP7POA.js +0 -467
- package/dist/chunks/chunk-Q4M7DJOD.js +0 -319
- package/dist/chunks/chunk-RQPMGRTR.js +0 -810
- package/dist/chunks/chunk-TSTVAU5E.js +0 -386
- package/dist/chunks/chunk-ZCZZUE5E.js +0 -662
- package/dist/chunks/compaction-config-AEUGVROL.js +0 -2
- package/dist/chunks/dist-GFJFRPAV.js +0 -2
- package/dist/chunks/host-23K2Q6RZ.js +0 -2
- package/dist/chunks/run-manager-PGIR6ITA.js +0 -2
package/dist/sdk-repl.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
|
-
import { A as AppProps,
|
|
3
|
-
export { a as AppState, b as AppendClientNoticeOptions, C as CompactSessionOptions, c as CompactSessionResult, d as Completer, e as Completion, f as ConfirmResult, g as ConversationPageCacheCapacityError, i as CursorPosition, D as DEFAULT_UI_STATE, j as DeleteSessionResult, F as
|
|
4
|
-
export { B as BUILTIN_COMMANDS, C as Command, I as InkREPLOptions, a as InkRuntimeRunner, b as InkRuntimeRunnerInput, c as InkRuntimeStatusProvider, d as InkTransientNotice, R as RUNTIME_PERMISSION_PENDING_NOTICE, e as RepLOptions, f as ReplRuntimeAutoModeControl, g as ReplRuntimeAutoModeSettings, h as ReplRuntimePermissionDecision, i as ReplRuntimePermissionGrantSuggestion, j as ReplRuntimePermissionPrompt, k as ReplRuntimePermissionRequest, l as ReplRuntimeRunner, m as ReplRuntimeRunnerInput, n as ReplRuntimeStatusProvider, o as executeCommand, p as getCommandRegistry, q as parseCommand, r as processSpecialSyntax, s as runInkInteractiveMode, t as runInteractiveMode, u as toReplRuntimeAutoModeSettings } from './types-chunks/repl.d-
|
|
5
|
-
import {
|
|
6
|
-
import { c as QueuedMessage } from './types-chunks/types.d-
|
|
7
|
-
export { H as HistorySeedSourceMessage, R as RestoreHistoryItemsFromSessionInput, a as RestoredHistorySeed, e as extractHistorySeedsFromMessage, b as extractHistorySeedsFromMessages, c as extractTextContent, d as extractTitle, f as formatMessagePreview, r as restoreHistoryItemsFromSession, s as seedToHistoryItem, t as toolCallSeedToHistoryToolCall, g as trimPersistedUiHistorySnapshot } from './types-chunks/sdk-session-
|
|
8
|
-
import { c as CommandInfo } from './types-chunks/utils.d-
|
|
9
|
-
export { A as AutoModeSettings, a as CommandCallbacks, g as CurrentConfig, I as InteractiveContext, h as InteractiveMode, K as KODAX_CONFIG_FILE, i as KODAX_DIR, j as KODAX_EXAMPLE_CONFIG_FILE, k as KODAX_INTEGRATION_EXAMPLE_FILES, l as KODAX_SESSIONS_DIR, m as KODAX_VERSION, P as PREVIEW_MAX_LENGTH, R as ResolveAutoModeSettingsInput, n as ResolvedAutoModeSettings, o as RuntimeSurfaceMode, p as RuntimeSurfaceStatus, q as createInteractiveContext, r as ensureExampleConfigFile, s as ensureExampleConfigFiles, t as getGitRoot, u as getProviderList, v as getProviderModel, w as getVersion, x as hydrateProcessEnvFromShell, y as isProviderConfigured, z as loadAutoModeSettings, B as loadConfig, D as prepareRuntimeConfig, E as rateLimitedCall, F as registerConfiguredCustomProviders, G as resolveAutoModeSettings, H as resolveRuntimeEffortSelection, J as resolveRuntimeModelSelection, L as resolveRuntimeProviderSelection, M as saveConfig, N as touchContext } from './types-chunks/utils.d-
|
|
2
|
+
import { A as AppProps, O as Message, au as UIState, h as CreatableHistoryItem, m as HistoryItem, ar as ToolCall, at as UIActions, K as KeyInfo, B as KeypressHandler, aj as StreamingState, V as PromptEditingMode, I as InputPromptProps, ai as StatusBarProps, ao as Theme, as as ToolCallStatus, ak as Suggestion, av as UseTextBufferReturn, H as HistoryEntry, Q as PastedContent, s as HistoryItemInfo, S as PermissionMode } from './types-chunks/public-api.d-CewTvUKV.js';
|
|
3
|
+
export { a as AppState, b as AppendClientNoticeOptions, C as CompactSessionOptions, c as CompactSessionResult, d as Completer, e as Completion, f as ConfirmResult, g as ConversationPageCacheCapacityError, i as CursorPosition, D as DEFAULT_UI_STATE, j as DeleteSessionResult, F as FileSessionStorage, k as ForkSessionOptions, l as FullTranscriptSessionData, n as HistoryItemAssistant, o as HistoryItemBase, p as HistoryItemError, q as HistoryItemEvent, r as HistoryItemHint, t as HistoryItemSidecar, u as HistoryItemSystem, v as HistoryItemThinking, w as HistoryItemToolGroup, x as HistoryItemType, y as HistoryItemUser, z as KeypressEvent, E as KeypressHandlerPriority, L as LearningBinding, G as LearningSurfaceSnapshot, J as LegacyMessageListProps, M as ListSessionsOptions, N as MemorySessionStorage, P as PERMISSION_MODES, R as PermissionContext, T as PreparedSessionAppendBaseline, U as PreparedSessionTailDelta, W as PromptSubmitPayload, X as RewindSessionOptions, Y as RunningSessionInfo, Z as SessionBundleExportDiagnostic, _ as SessionBundleExportFile, $ as SessionBundleExportOptions, a0 as SessionBundleExportResult, a1 as SessionBundleExportStatus, a2 as SessionConversationHistoryData, a3 as SessionConversationHistoryEntry, a4 as SessionConversationHistoryIssue, a5 as SessionConversationHistoryIssueCode, a6 as SessionConversationHistoryStatus, a7 as SessionConversationMutationBoundary, a8 as SessionData, a9 as SessionManager, aa as SessionReadCapture, ab as SessionReadError, ac as SessionReadErrorCode, ad as SessionReadOptions, ae as SessionStorage, af as SessionSummary, ag as SessionTranscriptEntry, ah as SessionTranscriptEntryType, al as TOOL_STATUS_ICONS, am as TextBuffer, an as TextBufferOptions, ap as ThemeColors, aq as ThemeSymbols, aw as VisualCursor, ax as VisualLayout, ay as WatchSessionsCallback, az as appendClientNotice, aA as archiveSession, aB as compactSession, aC as computeConfirmTools, aD as conversationHistoryFromCapture, aE as createConversationEntryChain, aF as createMemorySessionStorage, aG as createSessionConversationHistoryRevision, aH as createSessionManager, aI as deleteSession, aJ as emptyConversationEntryChain, aK as exportSessionBundle, aL as extendConversationEntryChain, aM as forkSession, aN as isPermissionMode, aO as listRunningSessions, aP as listSessions, aQ as loadFullTranscript, aR as loadSession, aS as normalizePermissionMode, aT as permissionModeDisplayName, aU as readConversationHistory, aV as readFullTranscript, aW as readSessionCapture, aX as rewindSession, aY as setActiveEntry, aZ as unarchiveSession, a_ as watchSessions } from './types-chunks/public-api.d-CewTvUKV.js';
|
|
4
|
+
export { B as BUILTIN_COMMANDS, C as Command, I as InkREPLOptions, a as InkRuntimeRunner, b as InkRuntimeRunnerInput, c as InkRuntimeStatusProvider, d as InkTransientNotice, R as RUNTIME_PERMISSION_PENDING_NOTICE, e as RepLOptions, f as ReplRuntimeAutoModeControl, g as ReplRuntimeAutoModeSettings, h as ReplRuntimePermissionDecision, i as ReplRuntimePermissionGrantSuggestion, j as ReplRuntimePermissionPrompt, k as ReplRuntimePermissionRequest, l as ReplRuntimeRunner, m as ReplRuntimeRunnerInput, n as ReplRuntimeStatusProvider, o as executeCommand, p as getCommandRegistry, q as parseCommand, r as processSpecialSyntax, s as runInkInteractiveMode, t as runInteractiveMode, u as toReplRuntimeAutoModeSettings } from './types-chunks/repl.d-DvXQtgr7.js';
|
|
5
|
+
import { Q as KodaXEvents, t as KodaXAgentMode, b6 as ProviderRecoveryEvent, ad as KodaXResult } from './types-chunks/bash-prefix-extractor.d-DStqKIlu.js';
|
|
6
|
+
import { c as QueuedMessage } from './types-chunks/types.d-BzpPDBPV.js';
|
|
7
|
+
export { H as HistorySeedSourceMessage, R as RestoreHistoryItemsFromSessionInput, a as RestoredHistorySeed, e as extractHistorySeedsFromMessage, b as extractHistorySeedsFromMessages, c as extractTextContent, d as extractTitle, f as formatMessagePreview, r as restoreHistoryItemsFromSession, s as seedToHistoryItem, t as toolCallSeedToHistoryToolCall, g as trimPersistedUiHistorySnapshot } from './types-chunks/sdk-session-C59RUrri.js';
|
|
8
|
+
import { c as CommandInfo } from './types-chunks/utils.d-BpACJmzt.js';
|
|
9
|
+
export { A as AutoModeSettings, a as CommandCallbacks, g as CurrentConfig, I as InteractiveContext, h as InteractiveMode, K as KODAX_CONFIG_FILE, i as KODAX_DIR, j as KODAX_EXAMPLE_CONFIG_FILE, k as KODAX_INTEGRATION_EXAMPLE_FILES, l as KODAX_SESSIONS_DIR, m as KODAX_VERSION, P as PREVIEW_MAX_LENGTH, R as ResolveAutoModeSettingsInput, n as ResolvedAutoModeSettings, o as RuntimeSurfaceMode, p as RuntimeSurfaceStatus, q as createInteractiveContext, r as ensureExampleConfigFile, s as ensureExampleConfigFiles, t as getGitRoot, u as getProviderList, v as getProviderModel, w as getVersion, x as hydrateProcessEnvFromShell, y as isProviderConfigured, z as loadAutoModeSettings, B as loadConfig, D as prepareRuntimeConfig, E as rateLimitedCall, F as registerConfiguredCustomProviders, G as resolveAutoModeSettings, H as resolveRuntimeEffortSelection, J as resolveRuntimeModelSelection, L as resolveRuntimeProviderSelection, M as saveConfig, N as touchContext } from './types-chunks/utils.d-BpACJmzt.js';
|
|
10
10
|
import { d as KodaXCustomProviderConfig } from './types-chunks/types.d-CgrXrFrq.js';
|
|
11
11
|
export { T as KodaXTaskResultMetadata, U as KodaXTaskResultSource } from './types-chunks/types.d-CgrXrFrq.js';
|
|
12
12
|
import { Readable, Writable } from 'node:stream';
|
|
13
13
|
import { a as McpServerConfig, b as McpServersConfig } from './types-chunks/config.d-CJy1WENT.js';
|
|
14
14
|
export { E as ExtensionsIntegrationDocument, I as IntegrationConfigConflictError, a as IntegrationConfigController, b as IntegrationConfigDiagnostic, c as IntegrationConfigListener, d as IntegrationConfigSnapshot, e as IntegrationConfigSource, f as IntegrationConfigStatus, g as IntegrationDocumentValidator, h as IntegrationDomain, L as LegacyIntegrationMigrationDomainPlan, i as LegacyIntegrationMigrationPlan, j as LegacyIntegrationMigrationResult, M as McpIntegrationDocument, m as migrateLegacyIntegrationConfig, p as parseExtensionsIntegrationDocument, k as parseMcpIntegrationDocument, l as planLegacyIntegrationMigration, r as readExtensionsIntegration, n as readMcpIntegration, o as resolveIntegrationConfigPath, w as writeIntegrationDocument } from './types-chunks/integration-config.d-BNowXE8k.js';
|
|
15
|
-
export { cc as KodaXSessionUiHistoryItem, cd as KodaXSessionUiHistoryItemType, ce as KodaXSessionUiTextHistoryItem, cf as KodaXSessionUiTextHistoryItemType, cg as KodaXSessionUiToolCall, ch as KodaXSessionUiToolCallStatus, ci as KodaXSessionUiToolGroupHistoryItem } from './types-chunks/controller.d-
|
|
16
|
-
|
|
15
|
+
export { cc as KodaXSessionUiHistoryItem, cd as KodaXSessionUiHistoryItemType, ce as KodaXSessionUiTextHistoryItem, cf as KodaXSessionUiTextHistoryItemType, cg as KodaXSessionUiToolCall, ch as KodaXSessionUiToolCallStatus, ci as KodaXSessionUiToolGroupHistoryItem } from './types-chunks/controller.d-C2aHqzHj.js';
|
|
16
|
+
export { F as FILE_MODIFICATION_TOOLS, c as collectBashWriteTargets, g as generateSavePattern, d as getBashOutsideProjectWriteRisk, j as getPlanModeBlockReason, m as isAlwaysConfirmPath, n as isBashReadCommand, o as isBashWriteCommand, p as isCommandOnProtectedPath, r as isPathInsideProject, u as isToolCallAllowed } from './types-chunks/shell-command-sets.d-Dp4UvPLL.js';
|
|
17
|
+
import { Z as SignalCollector, e as AutoModeAskUser, j as AutoModeGuardrailConfig, r as AutoModeSharedState, t as AutoModeToolGuardrail, Y as RulesLoadResult } from './types-chunks/guardrail.d-DM-OK0m3.js';
|
|
17
18
|
import 'vscode-languageserver-protocol';
|
|
18
19
|
import './types-chunks/types.d-BbtGlKZu.js';
|
|
19
20
|
import './types-chunks/cost-tracker.d-BeaenODW.js';
|
|
@@ -45,197 +46,16 @@ interface AppHandle {
|
|
|
45
46
|
setTool: (tool: string | undefined) => void;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
/**
|
|
49
|
-
* Permission Utilities
|
|
50
|
-
*
|
|
51
|
-
* 权限工具函数 - 模式解析、匹配、路径检查
|
|
52
|
-
*
|
|
53
|
-
* Pattern format (ONLY for Bash tool in accept-edits mode):
|
|
54
|
-
* - "Bash(npm install)" - exact command match
|
|
55
|
-
* - "Bash(git commit:*)" - prefix wildcard match (matches "git commit -m 'msg'" etc.)
|
|
56
|
-
* - "Bash(npm:*)" - command prefix wildcard (matches "npm install", "npm run build" etc.)
|
|
57
|
-
*
|
|
58
|
-
* Note: Bash(*) is REJECTED for safety. Use specific command patterns.
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Check if a bash command is strictly a safe read-only operation (Whitelist).
|
|
63
|
-
*
|
|
64
|
-
* FEATURE_152 (v0.7.38): replaces the pre-AST regex strip-then-classify
|
|
65
|
-
* pipeline with `parseBashCommand` from `bash-ast.ts`. The AST gives us:
|
|
66
|
-
* - statements split on `&&` / `||` / `;` (we only allow null and `&&`),
|
|
67
|
-
* - pipeline stages split on `|` (every stage must be a safe-read command),
|
|
68
|
-
* - per-stage redirections (input redirects rejected; output redirects only
|
|
69
|
-
* allowed when the target is a null device, which discards output rather
|
|
70
|
-
* than writing — preserves Issue 129 behavior),
|
|
71
|
-
* - `unparseable: true` for inputs we can't model (heredocs, command
|
|
72
|
-
* substitution `$(...)`, backticks, bare `&`, etc.) — fail-closed to
|
|
73
|
-
* `false` so unmodeled syntax always falls through to confirmation.
|
|
74
|
-
*
|
|
75
|
-
* Per-stage syntactic checks use `isShellReadOnlyArgv` so quoted tokens do not
|
|
76
|
-
* need to be joined and parsed a second time.
|
|
77
|
-
*
|
|
78
|
-
* @param command - bash command string
|
|
79
|
-
* @returns true if the command is a safe read operation
|
|
80
|
-
*/
|
|
81
|
-
declare function isBashReadCommand(command: string): boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Check if a bash command is a write operation.
|
|
84
|
-
*
|
|
85
|
-
* FEATURE_152 (v0.7.38): replaces the pre-AST regex blacklist with
|
|
86
|
-
* `parseBashCommand` from `bash-ast.ts`. The AST eliminates two whole
|
|
87
|
-
* classes of false positives the regex chain had:
|
|
88
|
-
* 1. **Issue 129 strip-then-classify**: pre-AST code regex-stripped
|
|
89
|
-
* `2>NUL` / `2>/dev/null` BEFORE pattern matching, then ran a
|
|
90
|
-
* blacklist of pre-compiled regexes. The strip was fragile — any
|
|
91
|
-
* future fd-redirect form would re-introduce the false positive.
|
|
92
|
-
* Now redirections are structured tokens with a `target` field;
|
|
93
|
-
* `isNullDevice(target)` is the single source of truth.
|
|
94
|
-
* 2. **Substring matches inside argv strings**: pre-AST `\\bset-content\\b`
|
|
95
|
-
* matched `set-content` even when it appeared inside a quoted string
|
|
96
|
-
* argument or inside a path. AST argv tokens are post-quote-stripping
|
|
97
|
-
* so PowerShell verb checks compare against actual command names.
|
|
98
|
-
*
|
|
99
|
-
* Detection rules (per-stage):
|
|
100
|
-
* - argv[0] OR argv[0..1] (joined with space) matches any entry in
|
|
101
|
-
* `BASH_WRITE_COMMANDS` (handles both `rm` and `git commit`).
|
|
102
|
-
* - any argv token matches a `POWERSHELL_WRITE_TOKENS` entry (these can
|
|
103
|
-
* appear inline, not just at stage start, due to PowerShell pipeline
|
|
104
|
-
* conventions — `ls | Set-Content foo` puts the verb at argv[0] of
|
|
105
|
-
* stage 2, but `New-Item -Path foo -Value bar` has it as argv[0] of
|
|
106
|
-
* stage 1; we cover both with a token-anywhere check).
|
|
107
|
-
* - any non-input redirection whose target is NOT a null device.
|
|
108
|
-
*
|
|
109
|
-
* Unparseable inputs (heredocs, `$(...)`) are conservatively returned as
|
|
110
|
-
* `false` to match the pre-AST regex chain's behavior — those inputs just
|
|
111
|
-
* didn't match anything in the regex blacklist either. Plan-mode and
|
|
112
|
-
* auto-mode handle the unparseable case via separate confirmation paths.
|
|
113
|
-
*
|
|
114
|
-
* @param command - bash command string
|
|
115
|
-
* @returns true if the command is a write operation
|
|
116
|
-
*/
|
|
117
|
-
declare function isBashWriteCommand(command: string): boolean;
|
|
118
|
-
/**
|
|
119
|
-
* Check if a tool call is allowed by the user's allowlist patterns.
|
|
120
|
-
*
|
|
121
|
-
* FEATURE_153 (v0.7.38) — When `extractor` is supplied, bash commands are
|
|
122
|
-
* routed through the LLM-backed prefix extractor, which:
|
|
123
|
-
* - Returns the SAFE PREFIX of the command (e.g. `git commit` for
|
|
124
|
-
* `git commit -m "msg"`)
|
|
125
|
-
* - Returns `injection_detected` for inputs containing command injection
|
|
126
|
-
* (`git commit -m "x" $(curl evil.com)`)
|
|
127
|
-
* - Returns `no_prefix` when no safe prefix can be determined
|
|
128
|
-
* Patterns then match against the extracted prefix exactly. This eliminates
|
|
129
|
-
* the pre-FEATURE_153 startsWith-based injection surface.
|
|
130
|
-
*
|
|
131
|
-
* When `extractor` is NOT supplied, falls back to the legacy
|
|
132
|
-
* `command.startsWith(pattern)` matcher. Documented as insecure in
|
|
133
|
-
* `matchesBashPatternLegacy` — KodaX's REPL always supplies an extractor in
|
|
134
|
-
* production; the legacy branch exists for tests and headless SDK consumers
|
|
135
|
-
* without LLM access.
|
|
136
|
-
*
|
|
137
|
-
* Note: Only Bash tool is supported for pattern matching.
|
|
138
|
-
*
|
|
139
|
-
* @param toolName — tool name (only "bash" / "Bash" matched)
|
|
140
|
-
* @param input — tool call input; reads `input.command`
|
|
141
|
-
* @param allowedPatterns — entries like `Bash(git commit:*)` from
|
|
142
|
-
* `~/.kodax/config.json` `alwaysAllowTools`
|
|
143
|
-
* @param extractor — optional LLM-backed bash prefix extractor (FEATURE_153)
|
|
144
|
-
* @param signal — optional abort signal forwarded to the extractor
|
|
145
|
-
*/
|
|
146
|
-
declare function isToolCallAllowed(toolName: string, input: Record<string, unknown>, allowedPatterns: string[], extractor?: BashPrefixExtractor, signal?: AbortSignal): Promise<boolean>;
|
|
147
|
-
/**
|
|
148
|
-
* Generate pattern string for saving
|
|
149
|
-
*/
|
|
150
|
-
declare function generateSavePattern(toolName: string, input: Record<string, unknown>, allowAll: boolean): string;
|
|
151
|
-
/**
|
|
152
|
-
* Check if target path requires always-confirm (permanent protection zones)
|
|
153
|
-
*
|
|
154
|
-
* Protected zones (always require confirmation, regardless of mode):
|
|
155
|
-
* - .kodax/ project config directory
|
|
156
|
-
* - ~/.kodax/ user config directory
|
|
157
|
-
* - Paths outside the project root AND outside the system temp directory
|
|
158
|
-
*
|
|
159
|
-
* System temp directories (`os.tmpdir()` and `$TEMP` / `$TMP` / `$TMPDIR`) are
|
|
160
|
-
* treated as a safe scratchpad in all modes — writing there is auto-allowed.
|
|
161
|
-
* This aligns with plan mode's `isPlanModeAllowedPath` semantics: both modes
|
|
162
|
-
* already explicitly permit system-temp writes, so accept-edits and
|
|
163
|
-
* auto-in-project should not be stricter than plan mode on this dimension.
|
|
164
|
-
*/
|
|
165
|
-
declare function isAlwaysConfirmPath(targetPath: string, projectRoot: string): boolean;
|
|
166
|
-
/**
|
|
167
|
-
* Check if a bash command operates on any protected paths
|
|
168
|
-
* Issue 052: Prevent "always" option for bash commands on protected paths
|
|
169
|
-
*/
|
|
170
|
-
declare function isCommandOnProtectedPath(command: string, projectRoot: string, executionCwd?: string): boolean;
|
|
171
|
-
/**
|
|
172
|
-
* Check whether a path stays inside the project root after resolution.
|
|
173
|
-
*/
|
|
174
|
-
declare function isPathInsideProject(targetPath: string, projectRoot: string): boolean;
|
|
175
|
-
/**
|
|
176
|
-
* Collect the file targets that a bash command might write to. Used by
|
|
177
|
-
* plan-mode (`getPlanModeBlockReason`) and `getBashOutsideProjectWriteRisk`.
|
|
178
|
-
*
|
|
179
|
-
* FEATURE_152 (v0.7.38): backed by `parseBashCommand` AST. The pre-AST
|
|
180
|
-
* version concatenated four overlapping regex sweeps over the raw command
|
|
181
|
-
* string — each had its own substring-vs-token pitfalls (e.g. `tee`
|
|
182
|
-
* matched as substring in `committee.txt`). The AST gives clean argv
|
|
183
|
-
* tokens with quoting stripped, and per-stage redirection targets.
|
|
184
|
-
*/
|
|
185
|
-
declare function collectBashWriteTargets(command: string): string[];
|
|
186
|
-
declare function getBashOutsideProjectWriteRisk(command: string, projectRoot: string): {
|
|
187
|
-
dangerous: boolean;
|
|
188
|
-
reason?: string;
|
|
189
|
-
};
|
|
190
|
-
/**
|
|
191
|
-
* v0.7.42 — Metadata-driven plan-mode gate.
|
|
192
|
-
*
|
|
193
|
-
* Decision order (first match wins):
|
|
194
|
-
*
|
|
195
|
-
* 1. Tool has `planModeAllowed: true` in its `LocalToolDefinition` →
|
|
196
|
-
* permitted (`null`). Covers planning-loop tools whose effect IS the
|
|
197
|
-
* planning workflow: `exit_plan_mode`, `task_stop`, `todo_*`,
|
|
198
|
-
* `ask_user_question`, plus read-class network queries
|
|
199
|
-
* (`web_search`, `mcp_search` / `mcp_describe` /
|
|
200
|
-
* `mcp_read_resource` / `mcp_get_prompt`).
|
|
201
|
-
* 2. Tool has `sideEffect === 'readonly'` AND not explicitly disallowed →
|
|
202
|
-
* permitted (`null`). Read tools never need plan-mode gating.
|
|
203
|
-
* 3. Path-aware FS-write escape: tools in `FILE_MODIFICATION_TOOLS`
|
|
204
|
-
* (computed from `sideEffect === 'mutates-fs' AND requires path`)
|
|
205
|
-
* can write IF the target path is `.agent/plan_mode_doc.md` or the
|
|
206
|
-
* system temp dir.
|
|
207
|
-
* 4. `bash` special case: command-content-aware check via
|
|
208
|
-
* `isBashWriteCommand` + `collectBashWriteTargets` — read-only bash
|
|
209
|
-
* (`git status`, `ls`, …) is permitted; write bash with all targets
|
|
210
|
-
* in the plan-doc / temp escape is permitted; everything else
|
|
211
|
-
* blocks.
|
|
212
|
-
* 5. Everything else with a side effect → blocked with a generic
|
|
213
|
-
* reason naming the side-effect class.
|
|
214
|
-
*
|
|
215
|
-
* Pre-v0.7.42 this function only gated `write`, `edit`, `undo`, `bash` —
|
|
216
|
-
* a hardcoded 4-tool list that silently let `multi_edit`,
|
|
217
|
-
* `insert_after_anchor`, `worktree_*`, `scaffold_*`, `stage_*`,
|
|
218
|
-
* `dispatch_child_task`, `send_message`, `web_fetch`, `mcp_call` etc.
|
|
219
|
-
* fall through to `return null` (permitted). The metadata-driven gate
|
|
220
|
-
* closes that gap structurally — new mutating tools auto-block until
|
|
221
|
-
* explicitly opted in via `planModeAllowed: true`.
|
|
222
|
-
*/
|
|
223
|
-
declare function getPlanModeBlockReason(toolName: string, input: Record<string, unknown>, projectRoot?: string, executionCwd?: string | undefined): string | null;
|
|
224
|
-
|
|
225
49
|
/**
|
|
226
50
|
* REPL-side path-aware bash signal collector — FEATURE_158 Step 8 (v0.7.39).
|
|
227
51
|
*
|
|
228
|
-
* Bridges the coding-side `SignalCollector` contract to
|
|
52
|
+
* Bridges the coding-side `SignalCollector` contract to coding-owned path
|
|
229
53
|
* utilities (`extractPathsFromCommand`, `isAlwaysConfirmPath`,
|
|
230
54
|
* `getBashOutsideProjectWriteRisk`, `collectBashWriteTargets`).
|
|
231
55
|
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
* `@kodax/coding` is a separate refactor (out of FEATURE_158 scope per
|
|
236
|
-
* ADR-025 design decision). Instead, the guardrail accepts an
|
|
237
|
-
* `extraCollectors` config knob and the REPL injects this collector at
|
|
238
|
-
* bootstrap. Layer boundary preserved; no parallel paths.
|
|
56
|
+
* This integration collector stays in @kodax/repl because it adds REPL-owned
|
|
57
|
+
* protected-path policy. The shared AST, path extraction, and permission
|
|
58
|
+
* helpers live in @kodax/coding and remain usable by direct SDK consumers.
|
|
239
59
|
*
|
|
240
60
|
* Signal kinds produced (bash-only):
|
|
241
61
|
* - protected_path (~/.kodax or <projectRoot>/.kodax)
|
|
@@ -2133,7 +1953,7 @@ declare function getThemeNames(): string[];
|
|
|
2133
1953
|
declare function listRegisteredCommands(projectRoot?: string): CommandInfo[];
|
|
2134
1954
|
|
|
2135
1955
|
declare const CONFIG_TEMPLATES: {
|
|
2136
|
-
readonly core: "// Split configs: ~/.kodax/integrations/mcp.json, extensions.json, and a2a.json.\n// KodaX core configuration template.\n// Copy only the fields you need to ~/.kodax/config.json (strict JSON).\n// MCP, A2A, and Extensions live in ~/.kodax/integrations/*.json; use\n// `kodax integrations migrate` to preview legacy declarations.\n{\n // Active provider alias and optional model override. Run `kodax setup` or\n // `/model` instead of editing these manually when possible.\n // \"provider\": \"deepseek\",\n // \"model\": \"deepseek-v4-flash\",\n // Add or reorder model ids shown by `/model` for a provider.\n // \"providerModels\": {\n // \"deepseek\": [\"deepseek-v4-flash\", \"deepseek-v4-pro\"]\n // },\n\n // Interactive Runtime hosting: \"embedded\" (this process) or \"daemon\".\n // \"runtimeMode\": \"embedded\",\n\n // Native model reasoning. `effort` is the preferred explicit depth;\n // `reasoningCeiling` is the session ceiling. `reasoningMode` and `thinking`\n // remain accepted for backward compatibility.\n // \"effort\": \"high\",\n // \"planModeEffort\": \"high\",\n // \"reasoningCeiling\": \"auto\",\n // \"reasoningMode\": \"auto\",\n // \"thinking\": true,\n\n // Agent harness: \"ama\" enables adaptive multi-agent use; \"sa\" forces one\n // agent. Permission mode is \"plan\", \"accept-edits\", or classifier-backed\n // \"auto\".\n // \"agentMode\": \"ama\",\n // \"permissionMode\": \"accept-edits\",\n // User-level Bash allow patterns. Project additions belong in\n // <project>/.kodax/config.local.json. Broad Bash(*) is rejected.\n // \"alwaysAllowTools\": [\"Bash(npm test)\", \"Bash(git status:*)\"],\n // \"autoMode\": {\n // \"engine\": \"llm\",\n // \"classifierModel\": \"provider:model\",\n //
|
|
1956
|
+
readonly core: "// Split configs: ~/.kodax/integrations/mcp.json, extensions.json, and a2a.json.\n// KodaX core configuration template.\n// Copy only the fields you need to ~/.kodax/config.json (strict JSON).\n// MCP, A2A, and Extensions live in ~/.kodax/integrations/*.json; use\n// `kodax integrations migrate` to preview legacy declarations.\n{\n // Active provider alias and optional model override. Run `kodax setup` or\n // `/model` instead of editing these manually when possible.\n // \"provider\": \"deepseek\",\n // \"model\": \"deepseek-v4-flash\",\n // Add or reorder model ids shown by `/model` for a provider.\n // \"providerModels\": {\n // \"deepseek\": [\"deepseek-v4-flash\", \"deepseek-v4-pro\"]\n // },\n\n // Interactive Runtime hosting: \"embedded\" (this process) or \"daemon\".\n // \"runtimeMode\": \"embedded\",\n\n // Worker-hosted embedded Runtime options. `configuredA2A` lets a\n // Worker-hosted embedded Runtime load and reconcile\n // ~/.kodax/integrations/a2a.json inside the Worker owner, so configured\n // outbound A2A Agents appear as `external:<name>` and can be dispatched\n // with spawn_agent. Default inline (non-Worker) CLI sessions already load\n // the configured A2A plane automatically; this key switches the embedded\n // session to a Worker-hosted Runtime and loads the plane in that mode.\n // \"worker\": {\n // \"configuredA2A\": true\n // },\n\n // Native model reasoning. `effort` is the preferred explicit depth;\n // `reasoningCeiling` is the session ceiling. `reasoningMode` and `thinking`\n // remain accepted for backward compatibility.\n // \"effort\": \"high\",\n // \"planModeEffort\": \"high\",\n // \"reasoningCeiling\": \"auto\",\n // \"reasoningMode\": \"auto\",\n // \"thinking\": true,\n\n // Agent harness: \"ama\" enables adaptive multi-agent use; \"sa\" forces one\n // agent. Permission mode is \"plan\", \"accept-edits\", or classifier-backed\n // \"auto\".\n // \"agentMode\": \"ama\",\n // \"permissionMode\": \"accept-edits\",\n // User-level Bash allow patterns. Project additions belong in\n // <project>/.kodax/config.local.json. Broad Bash(*) is rejected.\n // \"alwaysAllowTools\": [\"Bash(npm test)\", \"Bash(git status:*)\"],\n // \"autoMode\": {\n // \"engine\": \"llm\",\n // \"classifierModel\": \"provider:model\",\n // // Omit timeoutMs for the 45s first-attempt / 90s retry defaults.\n // // A configured timeoutMs applies the same deadline to both attempts.\n // \"speculativeWindowMs\": 500\n // },\n\n // UI/manual locale.\n // \"locale\": \"zh\",\n\n // Sensitive environment variables are filtered from model-issued commands by\n // default. List exact host variable names here to pass them to the command\n // target (including ASRT); values are never stored in this file. Project\n // config cannot extend this user-level list. Execution-control variables such\n // as NODE_OPTIONS and BASH_ENV remain blocked.\n // \"sandbox\": {\n // \"envPass\": [\"GH_TOKEN\", \"GITHUB_TOKEN\", \"OPENAI_API_KEY\"]\n // },\n\n // Custom providers store public connection metadata only. Put the actual\n // credential in the named environment variable, never in this file. Use\n // `kodax setup --custom` for the guided writer.\n // \"customProviders\": [\n // {\n // \"name\": \"my-relay\",\n // \"protocol\": \"openai\",\n // \"baseUrl\": \"https://api.example.com/v1\",\n // \"apiKeyEnv\": \"MY_RELAY_API_KEY\",\n // \"model\": \"provider/model\",\n // \"models\": [\"provider/model\", \"provider/fast-model\"],\n // \"reasoning\": { \"efforts\": [\"off\", \"low\", \"high\"], \"default\": \"high\" },\n // \"userAgentMode\": \"compat\",\n // \"contextWindow\": 128000,\n // \"maxOutputTokens\": 8192,\n // \"maxOutputTokensField\": \"max_completion_tokens\",\n // \"thinkingBudgetCap\": 32000,\n // \"promptCacheAffinity\": false,\n // \"replayReasoningContent\": false,\n // \"strictThinkingSignature\": false,\n // \"streamMaxDurationMs\": 300000,\n // \"verifyStrategy\": \"models-list\"\n // }\n // ],\n\n // Repository intelligence. Mode: \"auto\", \"full\", \"light\", or \"off\".\n // \"repoIntelligenceMode\": \"auto\",\n // \"repoIntelligenceTrace\": false,\n // \"repoIntelligence\": {\n // \"toolWaitMs\": 250,\n // \"workerTimeoutMs\": 30000,\n // \"workerOldSpaceMb\": 1024,\n // \"storageDir\": \"~/.kodax/repo-intelligence\"\n // },\n\n // Runtime/provider diagnostics and timeouts.\n // \"streamIdleTimeoutMs\": 120000,\n // \"verifierLog\": false,\n // \"stallLog\": false,\n\n // Ordered provider fallback for child tasks and optional model tiers used by\n // workflow/dispatch model hints.\n // \"fallbackProviders\": [\"ark-coding\", \"kimi-code\"],\n // \"fastProvider\": \"openai\",\n // \"fastModel\": \"gpt-5-mini\",\n // \"deepProvider\": \"anthropic\",\n // \"deepModel\": \"claude-opus-4-6\",\n\n // Provider/LSP/ACP process settings.\n // \"maxOutputTokens\": 8192,\n // \"disablePromptCache\": false,\n // \"lsp\": true,\n // \"lspAutoDownload\": false,\n // \"acpLogLevel\": \"info\",\n\n // Automatic large compaction is always enabled. Percentage defaults to 75\n // and is clamped to 15..90. A missing/zero absolute threshold is inactive;\n // otherwise the smaller percentage, absolute, and physical limit wins.\n // \"compaction\": {\n // \"enabled\": true,\n // \"contextWindow\": 128000,\n // \"triggerPercent\": 75,\n // \"triggerTokens\": 0\n // },\n\n // 0 disables automatic session pruning.\n // \"sessionRetentionDays\": 0,\n\n // Workflow host concurrency. The Runtime still applies its system cap.\n // \"workflow\": { \"maxConcurrency\": 8 }\n}\n";
|
|
2137
1957
|
readonly mcp: "// User MCP declarations: ~/.kodax/integrations/mcp.json (strict JSON).\n// The whole file hot-reloads; healthy entries remain active if one new entry\n// fails to prepare. Keep credentials in ${env:NAME} references.\n{\n \"version\": 1,\n \"servers\": {}\n // Example:\n // \"servers\": {\n // \"reporting\": {\n // \"type\": \"streamable-http\",\n // \"url\": \"https://mcp.example.com\",\n // \"headers\": { \"Authorization\": \"Bearer ${env:REPORTING_MCP_TOKEN}\" },\n // \"connect\": \"lazy\"\n // }\n // }\n}\n";
|
|
2138
1958
|
readonly a2a: "// Bidirectional A2A configuration: ~/.kodax/integrations/a2a.json.\n// `agents` calls many third-party Agents. The optional singleton `server`\n// exposes exactly one KodaX general task Agent; ACP remains the coding/editor\n// protocol. Uncomment only the entries you need; no token value belongs here.\n// Legacy version 1 files remain readable. Non-empty files require an explicit\n// stopped-daemon migration; new/empty files and every later write use version 2.\n{\n \"version\": 2,\n\n // Create this inbound block with `kodax a2a expose`; config never starts a\n // listener by itself. Do not copy private Agent instructions, Runtime Skills,\n // model names, or local paths into the public `published.skills` list.\n // Managed workspaces default below\n // ~/kodax_a2a_server_workspace/<runtime-profile>/contexts/<context-key>/.\n // Native read/grep/glob remains available according to workspace access.\n // Arbitrary shell is never exposed. Skill instructions/assets need no\n // process authority. An exact checked-in scripts/... entry requires\n // process=\"isolated\", skillScripts admission, and `kodax sandbox doctor`.\n // ASRT receives no KodaX credentials or ambient ~/.srt-settings.json and its\n // script quota is observed; hostile tenants also require an outer container/VM.\n //\n // \"server\": {\n // \"execution\": {\n // \"kind\": \"local-agent\",\n // \"agentRef\": { \"source\": \"markdown:user\", \"name\": \"report-agent\" },\n // \"workspace\": { \"mode\": \"managed\" },\n // \"toolPolicy\": {\n // \"workspace\": \"write\",\n // \"process\": \"deny\",\n // \"network\": { \"mode\": \"deny\" },\n // \"tools\": [],\n // \"mcp\": {},\n // \"skillScripts\": {},\n // \"subagents\": \"deny\"\n // }\n // },\n // \"published\": {\n // \"name\": \"KodaX Agent\",\n // \"description\": \"Completes approved general tasks.\",\n // \"version\": \"0.7.71\",\n // \"skills\": [{ \"id\": \"general\", \"name\": \"General\", \"description\": \"Complete general tasks.\", \"tags\": [] }],\n // \"inputModes\": [\"text/plain\"],\n // \"outputModes\": [\"text/plain\"]\n // },\n // \"authentication\": { \"type\": \"bearer-env\", \"tokenEnv\": \"KODAX_A2A_TOKEN\", \"principalId\": \"configured-client\" },\n // \"dataDir\": \"~/.kodax/a2a/tasks\"\n // },\n\n // Production OAuth2 resource-server alternative for the server above. The\n // external Authorization Server issues access tokens and, for JWT tokens,\n // signs them. KodaX holds no issuer signing key; it validates RFC 9068 tokens\n // against the issuer's rotating JWKS, audience, expiry, subject, and scopes.\n // Replace the server.authentication value above with:\n // {\n // \"type\": \"oauth2-jwt\",\n // \"scheme\": \"enterprise-oauth\",\n // \"issuer\": \"https://identity.example.com\",\n // \"audience\": \"https://agent.example.com/a2a\",\n // \"jwksUrl\": \"https://identity.example.com/.well-known/jwks.json\",\n // \"tokenUrl\": \"https://identity.example.com/oauth/token\",\n // \"metadataUrl\": \"https://identity.example.com/.well-known/oauth-authorization-server\",\n // \"requiredScopes\": [\"a2a.invoke\"]\n // }\n\n \"agents\": {\n // Fixed Bearer compatibility example. `enabled` is hot desired state:\n // disabled Agents remain configured but are not candidates for new\n // orchestration, while already admitted remote tasks may finish.\n // \"reporting\": {\n // \"cardUrl\": \"https://agents.example.com/.well-known/agent-card.json\",\n // \"enabled\": true,\n // \"credentialEnv\": \"REPORTING_A2A_TOKEN\",\n // \"effect\": \"read\"\n // },\n\n // Private addresses and plaintext HTTP are separate, default-deny\n // permissions. Exact loopback HTTP needs neither. Private HTTP needs both;\n // private HTTPS needs only allowPrivateAddresses. Prefer TLS whenever it is\n // available. The equivalent CLI flags are `--allow-private` and\n // `--allow-insecure-http`. OAuth token endpoints keep their stricter\n // HTTPS-or-exact-loopback rule even when Agent transport HTTP is allowed.\n // \"intranet\": {\n // \"cardUrl\": \"http://10.20.30.40/.well-known/agent-card.json\",\n // \"enabled\": true,\n // \"network\": {\n // \"allowPrivateAddresses\": true,\n // \"allowInsecureHttp\": true\n // },\n // \"effect\": \"read\"\n // },\n\n // Standards-based machine-to-machine OAuth2 example. The external\n // Authorization Server issues access tokens; KodaX obtains and caches them\n // only in process memory. `tokenUrl` must exactly match the selected Card\n // OAuth2 clientCredentials flow. Use `kodax a2a enable|disable <name>` to\n // mutate `enabled` atomically; the owning Runtime applies it asynchronously.\n // \"reviewer\": {\n // \"cardUrl\": \"https://reviewer.example.com/.well-known/agent-card.json\",\n // \"enabled\": false,\n // \"effect\": \"read\",\n // \"authentication\": {\n // \"type\": \"oauth2-client-credentials\",\n // \"scheme\": \"enterprise-oauth\",\n // \"issuer\": \"https://identity.example.com\",\n // \"tokenUrl\": \"https://identity.example.com/oauth/token\",\n // \"clientId\": \"kodax-reviewer\",\n // \"clientSecretEnv\": \"REVIEWER_CLIENT_SECRET\",\n // \"scopes\": [\"a2a.invoke\"],\n // \"resource\": \"https://reviewer.example.com/\",\n // \"clientAuthentication\": \"client-secret-basic\"\n // }\n // }\n }\n}\n";
|
|
2139
1959
|
readonly extensions: "// Trusted user Extension paths: ~/.kodax/integrations/extensions.json.\n// Extensions are host code. Reload is whole-domain atomic; use MCP for\n// capabilities that should remain outside the KodaX process.\n{\n \"version\": 1,\n \"paths\": []\n}\n";
|
|
@@ -2515,9 +2335,8 @@ interface AutoModeBootstrapDeps {
|
|
|
2515
2335
|
* coding-side defaults (`bashSignalCollector` + `fileSignalCollector`).
|
|
2516
2336
|
* The REPL passes `replBashPathSignalCollector` here so bash commands
|
|
2517
2337
|
* targeting protected paths (~/.kodax / <projectRoot>/.kodax) or
|
|
2518
|
-
* redirecting outside the project produce signals
|
|
2519
|
-
*
|
|
2520
|
-
* injection point.
|
|
2338
|
+
* redirecting outside the project produce signals. The collector remains a
|
|
2339
|
+
* REPL integration, while its shell/path utilities are coding-owned.
|
|
2521
2340
|
*/
|
|
2522
2341
|
readonly extraCollectors?: readonly SignalCollector[];
|
|
2523
2342
|
}
|
|
@@ -2575,5 +2394,5 @@ declare function loadCommands(commandDir?: string): Promise<Map<string, KodaXCom
|
|
|
2575
2394
|
declare function processCommandCall(commandName: string, args: string | undefined, commands: Map<string, KodaXCommand>, runAgent: (prompt: string) => Promise<KodaXResult>): Promise<string | null>;
|
|
2576
2395
|
declare function parseCommandCall(input: string): [string, string?] | null;
|
|
2577
2396
|
|
|
2578
|
-
export { App, AppProps, AutocompleteContextProvider, BackgroundTaskBar, CONFIG_TEMPLATES, ChildActivitySurface, CommandInfo, ConsoleCapturer, CoreConfigWriteConflictError, CreatableHistoryItem, DialogSurface, DotsIndicator, FullscreenTranscriptLayout, HistoryEntry, HistoryItem, HistoryItemInfo, HistoryItemRenderer, InputPrompt, InputPromptProps, KODAX_COMMANDS_DIR, KeyInfo, KeyMatchers, KeypressHandler, KeypressParser, KeypressProvider, LRUCache, LoadingIndicator, Message, MessageActions, MessageList, MessageSelector, NotificationsSurface, PendingInputsIndicator, PermissionMode, ProgressIndicator, PromptComposer, PromptEditingMode, PromptFooter, PromptFooterLeftSide, PromptFooterRightSide, PromptHelpMenu, PromptSuggestionsSurface, ProviderSetupConfigConflictError, ProviderSetupInvalidConfigError, QueuedCommandsSurface, SimpleApp, SimpleInputPrompt, SimpleMessageDisplay, SimpleStatusBar, SingleLineTextInput, Spinner, StashNotice, StatusBar, StatusBarProps, StatusNoticesSurface, StreamingProvider, StreamingState, Suggestion, SuggestionsDisplay, TextInput, Theme, ThinkingIndicator, ToolCall, ToolCallDisplay, ToolCallStatus, ToolGroup, ToolProgressBar, ToolStatusBadge, TranscriptViewport, UIActions, UIState, UIStateProvider, UseTextBufferReturn, _resetQueuedPromptsCacheForTests, bootstrapAutoMode, calculateVisualCursorFromLayout, calculateVisualLayout,
|
|
2397
|
+
export { App, AppProps, AutocompleteContextProvider, BackgroundTaskBar, CONFIG_TEMPLATES, ChildActivitySurface, CommandInfo, ConsoleCapturer, CoreConfigWriteConflictError, CreatableHistoryItem, DialogSurface, DotsIndicator, FullscreenTranscriptLayout, HistoryEntry, HistoryItem, HistoryItemInfo, HistoryItemRenderer, InputPrompt, InputPromptProps, KODAX_COMMANDS_DIR, KeyInfo, KeyMatchers, KeypressHandler, KeypressParser, KeypressProvider, LRUCache, LoadingIndicator, Message, MessageActions, MessageList, MessageSelector, NotificationsSurface, PendingInputsIndicator, PermissionMode, ProgressIndicator, PromptComposer, PromptEditingMode, PromptFooter, PromptFooterLeftSide, PromptFooterRightSide, PromptHelpMenu, PromptSuggestionsSurface, ProviderSetupConfigConflictError, ProviderSetupInvalidConfigError, QueuedCommandsSurface, SimpleApp, SimpleInputPrompt, SimpleMessageDisplay, SimpleStatusBar, SingleLineTextInput, Spinner, StashNotice, StatusBar, StatusBarProps, StatusNoticesSurface, StreamingProvider, StreamingState, Suggestion, SuggestionsDisplay, TextInput, Theme, ThinkingIndicator, ToolCall, ToolCallDisplay, ToolCallStatus, ToolGroup, ToolProgressBar, ToolStatusBadge, TranscriptViewport, UIActions, UIState, UIStateProvider, UseTextBufferReturn, _resetQueuedPromptsCacheForTests, bootstrapAutoMode, calculateVisualCursorFromLayout, calculateVisualLayout, coreConfigWriteLockPath, createCliEvents, createHistoryItem, createJsonEvents, createKeyMatcher, createKeypressManager, createRecoveryHistoryItem, createRetryHistoryItem, createStreamingManager, createToolCall, darkTheme, dedupeSessions, detectTerminalCapabilities, detectTerminalHostProfile, detectTerminalRenderHost, emitRecoveryHistoryItem, emitRetryHistoryItem, executeShellCommand, findMostRecentResumableSession, generateId, getCharAtCodePoint, getCodePointLength, getConfigTemplate, getCustomProviderConfig, getDefaultCommandDir, getKeyDisplayName, getMcpServerConfig, getProviderSetupCatalog, getTerminalHostCapabilities, getTerminalWidth, getTheme, getThemeNames, getVisualWidth, getVisualWidthCached, hasCursorUpViewportYankRisk, hasMainScreenRenderScrollRisk, initializeSetupConfiguration, inspectProviderSetupReadiness, isClassicReplForced, isFunctionKey, isOwnedRendererPreferred, isPrintable, isRemoteConptyHost, isScreenReader, isShellCommand, isShellCommandSuccess, isTmuxControlMode, isVsCodeTerminalHostEnv, isWideChar, listCustomProviders, listMcpServers, listRegisteredCommands, loadCommands, measureChildActivitySurfaceRows, minimalTheme, parseCommandCall, parseKeypress, persistProviderSetupChoice, processCommandCall, providerSetupRestartInstructions, removeCustomProvider, removeMcpServer, renderSetupGuide, replBashPathSignalCollector, resetTmuxControlModeProbeForTesting, resolveConfiguredTuiRendererMode, resolveEffectiveTuiRendererMode, resolveFullscreenPolicy, resolveInteractiveSurfacePreference, runProviderSetupWizard, runSessionPicker, splitByCodePoints, supports256Colors, supportsEmoji, supportsTrueColor, supportsUnicode, themes, truncateByVisualWidth, upsertCustomProvider, upsertMcpServer, useAutocomplete, useAutocompleteContext, useInputHistory, useKeypress, useKeypressManager, useQueuedPromptContents, useQueuedPrompts, useStreaming, useStreamingActions, useStreamingState, useTextBuffer, useUI, useUIActions, useUIState, validateMcpServerConfig, visualWidthCache, withCapture, withCaptureSync, withCoreConfigWriteLock };
|
|
2579
2398
|
export type { AppHandle, AutoModeBootstrapDeps, AutoModeBootstrapResult, BackgroundTaskBarItem, BackgroundTaskBarProps, ChildActivitySurfaceProps, ConfigTemplateName, DialogSelectOption, DialogSurfaceConfirmState, DialogSurfaceProps, DialogSurfaceUIRequestState, DotsIndicatorProps, EffectiveTuiRendererMode, FullscreenPolicy, FullscreenTranscriptLayoutProps, HistoryItemRendererProps, InitializeSetupConfigurationInput, InteractiveSurfacePreference, KeypressManager, KeypressProviderProps, KodaXCommand, KodaXCommandContext, LoadingIndicatorProps, LoadingIndicatorType, MessageActionsProps, MessageListProps, MessageSelectorProps, NotificationSurfaceItem, NotificationsSurfaceProps, PendingInputsIndicatorProps, PersistedProviderSetupChoice, ProgressIndicatorProps, PromptComposerProps, PromptFooterLeftSideProps, PromptFooterProps, PromptFooterRightSideProps, PromptFooterSurfaceItem, PromptHelpMenuProps, PromptSuggestionsSurfaceProps, ProviderSetupCatalogEntry, ProviderSetupChoice, ProviderSetupCustomProviderMetadata, ProviderSetupInteraction, ProviderSetupReadiness, ProviderSetupWizardResult, QueuedCommandsSurfaceProps, RenderSetupGuideInput, ResolvedAutoModeBootstrapSettings, RunProviderSetupWizardInput, SessionDedupeMatch, SessionDedupeMove, SessionDedupeOptions, SessionDedupeReport, SessionDedupeSkip, SessionDedupeSkipReason, SessionPickerItem, SetupConfigDomain, SetupConfigFileKind, SetupConfigFileResult, SetupConfigFileStatus, SetupConfigurationResult, ShellExecutorConfig, SpinnerProps, StashNoticeProps, StatusNoticesSurfaceProps, StreamingActions, StreamingContextValue, StreamingManager, StreamingProviderProps, StreamingStateListener, SuggestionsDisplayProps, TerminalCapabilities, TerminalHostCapabilities, TerminalHostDetectionOptions, TerminalHostProfile, TerminalRenderHost, TextInputProps, ThinkingIndicatorProps, ToolCallDisplayProps, ToolGroupProps, ToolProgressBarProps, ToolStatusBadgeProps, TranscriptViewportProps, TuiRendererMode, UIStateProviderProps, UseAutocompleteOptions, UseAutocompleteReturn, UseInputHistoryOptions, UseInputHistoryReturn, UseKeypressOptions, UseTextBufferOptions };
|
package/dist/sdk-repl.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{$ as oe,$a as on,$b as er,A as
|
|
3
|
-
`)[0]?.replace(/^#\s*/,"").trim()??"").slice(0,60)||"(prompt command)";t.set(g,{name:g,description:l,content:m,type:"prompt"})}catch{}continue}if(s===".js"||s===".ts"){let m=i.join(e,o);try{let l=await import(h(m).href);for(let[C,p]of Object.entries(l))if(C.startsWith("command_")&&typeof p=="function"){let c=C.replace("command_",""),y=p.description??c;t.set(c,{name:c,description:String(y).slice(0,60),content:`[Programmable command: ${c}]`,type:"programmable",execute:p})}}catch(d){x({source:"cli:commands",level:"warn",message:s===".ts"?`Failed to load TypeScript programmable command ${m}; enable a TypeScript loader or compile it to .js.`:`Failed to load programmable command module ${m}.`,detail:d})}}}}catch{}return t}a(D,"loadCommands");async function w(n,t,e,r){let o=e.get(n);return o?o.type==="prompt"?t?o.content.replace(/{args}/g,t):o.content:o.type==="programmable"&&o.execute?o.execute({args:t,runAgent:r}):null:null}a(w,"processCommandCall");function M(n){if(!n.startsWith("/"))return null;let t=n.slice(1).trim();if(!t)return null;let e=t.search(/\s/);if(e===-1)return[t];let r=t.slice(0,e),o=t.slice(e).trim();return o?[r,o]:[r]}a(M,"parseCommandCall");export{se as App,qo as AutocompleteContextProvider,To as BUILTIN_COMMANDS,_e as BackgroundTaskBar,
|
|
2
|
+
import{$ as oe,$a as on,$b as er,A as ct,Aa as Re,Ab as kn,B as dt,Ba as ke,Bb as Nn,C as lt,Ca as Ne,Cb as Sn,D as pt,Da as Se,Db as Un,E as ut,Ea as Ue,Eb as _n,F as ft,Fa as _e,Fb as vn,G as gt,Ga as ve,Gb as An,H as Ct,Ha as Ae,Hb as On,I as xt,Ia as Oe,Ib as Fn,J as yt,Ja as Fe,Jb as Ln,K as Kt,Ka as Le,Kb as $n,L as Xt,La as $e,Lb as Tn,M as Pt,Ma as Te,Mb as In,N as jt,Na as Ie,Nb as Wn,O as Rt,Oa as We,Ob as En,P as kt,Pa as Ee,Pb as qn,Q as qo,Qa as qe,Qb as zn,R as zo,Ra as ze,Rb as Bn,S as Bo,Sa as Be,Sb as Gn,T as Go,Ta as Ge,Tb as Hn,U as Ho,Ua as He,Ub as Jn,V as Jo,Va as Je,Vb as Qn,W as Qo,Wa as Qe,Wb as Vn,X as Vo,Xa as Ve,Xb as Yn,Y as Yo,Ya as Ye,Yb as Zn,Z as Zo,Za as Ze,Zb as tr,_ as te,_a as tn,_b as or,a as F,aa as ee,ab as en,ac as nr,b as L,ba as ne,bb as nn,bc as rr,c as $,ca as re,cb as rn,cc as mr,d as T,da as me,db as mn,dc as ar,e as I,ea as ae,eb as an,ec as ir,f as W,fa as ie,fb as sn,fc as sr,g as E,ga as se,gb as cn,gc as cr,h as q,ha as ce,hb as dn,hc as dr,i as z,ia as de,ib as ln,ic as lr,j as B,ja as le,jb as pn,jc as pr,k as G,ka as pe,kb as un,l as H,la as ue,lb as fn,m as J,ma as fe,mb as gn,n as Q,na as ge,nb as Cn,o as V,oa as Ce,ob as xn,p as Y,pa as xe,pb as yn,q as Z,qa as ye,qb as Kn,r as tt,ra as Ke,rb as Xn,s as ot,sa as Xe,sb as bn,t as et,ta as be,tb as hn,u as nt,ua as he,ub as Dn,v as rt,va as De,vb as wn,w as mt,wa as we,wb as Mn,x as at,xa as Me,xb as Pn,y as it,ya as Pe,yb as jn,z as st,za as je,zb as Rn}from"./chunks/chunk-FQ7NVMSU.js";import{A as No,Aa as Io,B as So,Ba as Wo,Ca as Eo,L as Uo,M as _o,N as vo,O as Ao,P as Oo,U as Fo,V as Lo,a as bt,b as ht,c as Dt,d as wt,e as Mt,f as Nt,i as St,k as Ut,l as _t,m as vt,n as Xo,o as bo,p as ho,q as Do,r as wo,s as Mo,t as Po,v as jo,w as Ro,y as ko,ya as $o,za as To}from"./chunks/chunk-IHPH3444.js";import{$ as Co,O as mo,P as ao,Q as io,R as so,S as co,T as lo,U as po,X as uo,Y as fo,_ as go,aa as xo,b as At,c as Ot,ca as yo,d as Ft,e as Lt,f as $t,g as Tt,ga as Ko,h as It,i as Wt,j as Et,k as qt,l as zt,m as Bt,n as Gt,o as Ht,p as Jt,q as Qt,r as Vt,s as Yt,t as Zt,u as to,w as oo,x as eo,y as no,z as ro}from"./chunks/chunk-CDCCTM5I.js";import"./chunks/chunk-PMKAG4SZ.js";import{Ca as U,Da as _,Ga as v,Ia as A,Ja as O,ea as P,ta as j,va as R,xa as k,ya as N,za as S}from"./chunks/chunk-RPF5RGWZ.js";import"./chunks/chunk-VECRQTSD.js";import"./chunks/chunk-RXXKDR6Y.js";import"./chunks/chunk-HTVLCHWH.js";import"./chunks/chunk-BWX4YZX3.js";import"./chunks/chunk-GC4JBMBS.js";import"./chunks/chunk-KHEFUT6O.js";import"./chunks/chunk-TRNAWSXP.js";import"./chunks/chunk-CEB5FDND.js";import{d as x}from"./chunks/chunk-EVXIJPZ6.js";import"./chunks/chunk-E7C4DRD2.js";import"./chunks/chunk-6UENDY33.js";import{a}from"./chunks/chunk-ONUPGMER.js";import u from"fs/promises";import i from"path";import K from"os";import{pathToFileURL as X}from"node:url";var f=i.join(K.homedir(),".kodax","commands");function b(){return f}a(b,"getDefaultCommandDir");function h(n){let t=i.extname(n);if(t!==".js"&&t!==".ts")throw new Error(`Unsupported programmable command module extension: ${t||"<none>"}.`);return X(i.resolve(n))}a(h,"resolveProgrammableCommandModuleUrl");async function D(n){let t=new Map,e=n??f;try{await u.mkdir(e,{recursive:!0});let r=await u.readdir(e);for(let o of r){let s=i.extname(o),g=o.replace(s,"");if(s===".md"){try{let m=await u.readFile(i.join(e,o),"utf-8"),l=(m.split(`
|
|
3
|
+
`)[0]?.replace(/^#\s*/,"").trim()??"").slice(0,60)||"(prompt command)";t.set(g,{name:g,description:l,content:m,type:"prompt"})}catch{}continue}if(s===".js"||s===".ts"){let m=i.join(e,o);try{let l=await import(h(m).href);for(let[C,p]of Object.entries(l))if(C.startsWith("command_")&&typeof p=="function"){let c=C.replace("command_",""),y=p.description??c;t.set(c,{name:c,description:String(y).slice(0,60),content:`[Programmable command: ${c}]`,type:"programmable",execute:p})}}catch(d){x({source:"cli:commands",level:"warn",message:s===".ts"?`Failed to load TypeScript programmable command ${m}; enable a TypeScript loader or compile it to .js.`:`Failed to load programmable command module ${m}.`,detail:d})}}}}catch{}return t}a(D,"loadCommands");async function w(n,t,e,r){let o=e.get(n);return o?o.type==="prompt"?t?o.content.replace(/{args}/g,t):o.content:o.type==="programmable"&&o.execute?o.execute({args:t,runAgent:r}):null:null}a(w,"processCommandCall");function M(n){if(!n.startsWith("/"))return null;let t=n.slice(1).trim();if(!t)return null;let e=t.search(/\s/);if(e===-1)return[t];let r=t.slice(0,e),o=t.slice(e).trim();return o?[r,o]:[r]}a(M,"parseCommandCall");export{se as App,qo as AutocompleteContextProvider,To as BUILTIN_COMMANDS,_e as BackgroundTaskBar,At as CONFIG_TEMPLATES,Ae as ChildActivitySurface,Pn as ConsoleCapturer,qn as ConversationPageCacheCapacityError,Ft as CoreConfigWriteConflictError,Mt as DEFAULT_UI_STATE,Re as DialogSurface,Zo as DotsIndicator,P as FILE_MODIFICATION_TOOLS,Bn as FileSessionStorage,de as FullscreenTranscriptLayout,ne as HistoryItemRenderer,Qo as InputPrompt,Tt as IntegrationConfigConflictError,Jt as IntegrationConfigController,f as KODAX_COMMANDS_DIR,Yt as KODAX_CONFIG_FILE,Qt as KODAX_DIR,so as KODAX_EXAMPLE_CONFIG_FILE,co as KODAX_INTEGRATION_EXAMPLE_FILES,Vt as KODAX_SESSIONS_DIR,no as KODAX_VERSION,kt as KeyMatchers,wt as KeypressHandlerPriority,xt as KeypressParser,jt as KeypressProvider,Y as LRUCache,ee as LoadingIndicator,Ve as MemorySessionStorage,le as MessageActions,re as MessageList,pe as MessageSelector,Ne as NotificationsSurface,Nt as PERMISSION_MODES,Zt as PREVIEW_MAX_LENGTH,yn as PendingInputsIndicator,te as ProgressIndicator,fe as PromptComposer,xe as PromptFooter,ge as PromptFooterLeftSide,Ce as PromptFooterRightSide,ye as PromptHelpMenu,je as PromptSuggestionsSurface,Xo as ProviderSetupConfigConflictError,bo as ProviderSetupInvalidConfigError,ke as QueuedCommandsSurface,Be as RUNTIME_PERMISSION_PENDING_NOTICE,zn as SessionReadError,ce as SimpleApp,Vo as SimpleInputPrompt,me as SimpleMessageDisplay,ie as SimpleStatusBar,gt as SingleLineTextInput,Yo as Spinner,Ue as StashNotice,ae as StatusBar,Se as StatusNoticesSurface,Fe as StreamingProvider,bt as StreamingState,Pe as SuggestionsDisplay,Dt as TOOL_STATUS_ICONS,Ho as TextBuffer,ft as TextInput,oe as ThinkingIndicator,Cn as ToolCallDisplay,ht as ToolCallStatus,xn as ToolGroup,gn as ToolProgressBar,fn as ToolStatusBadge,ue as TranscriptViewport,he as UIStateProvider,ze as _resetQueuedPromptsCacheForTests,nr as appendClientNotice,cr as archiveSession,Qe as bootstrapAutoMode,st as calculateVisualCursorFromLayout,it as calculateVisualLayout,v as collectBashWriteTargets,Hn as compactSession,Ut as computeConfirmTools,tr as conversationHistoryFromCapture,Lt as coreConfigWriteLockPath,pn as createCliEvents,Wn as createConversationEntryChain,Xe as createHistoryItem,He as createInteractiveContext,un as createJsonEvents,We as createKeyMatcher,Pt as createKeypressManager,Ye as createMemorySessionStorage,sn as createRecoveryHistoryItem,mn as createRetryHistoryItem,En as createSessionConversationHistoryRevision,pr as createSessionManager,Oe as createStreamingManager,be as createToolCall,ct as darkTheme,Gn as dedupeSessions,sr as deleteSession,Mn as detectTerminalCapabilities,q as detectTerminalHostProfile,E as detectTerminalRenderHost,cn as emitRecoveryHistoryItem,an as emitRetryHistoryItem,Tn as emptyConversationEntryChain,po as ensureExampleConfigFile,lo as ensureExampleConfigFiles,Eo as executeCommand,Ze as executeShellCommand,er as exportSessionBundle,In as extendConversationEntryChain,vo as extractHistorySeedsFromMessage,Ao as extractHistorySeedsFromMessages,Oo as extractTextContent,Fo as extractTitle,rn as findMostRecentResumableSession,rr as forkSession,Lo as formatMessagePreview,Ke as generateId,N as generateSavePattern,A as getBashOutsideProjectWriteRisk,et as getCharAtCodePoint,Z as getCodePointLength,Io as getCommandRegistry,Ot as getConfigTemplate,Un as getCustomProviderConfig,b as getDefaultCommandDir,yo as getGitRoot,Xt as getKeyDisplayName,On as getMcpServerConfig,O as getPlanModeBlockReason,mo as getProviderList,ro as getProviderModel,ho as getProviderSetupCatalog,J as getTerminalHostCapabilities,Dn as getTerminalWidth,pt as getTheme,ut as getThemeNames,eo as getVersion,ot as getVisualWidth,at as getVisualWidthCached,L as hasCursorUpViewportYankRisk,T as hasMainScreenRenderScrollRisk,to as hydrateProcessEnvFromShell,Po as initializeSetupConfiguration,Do as inspectProviderSetupReadiness,S as isAlwaysConfirmPath,j as isBashReadCommand,R as isBashWriteCommand,V as isClassicReplForced,U as isCommandOnProtectedPath,yt as isFunctionKey,Q as isOwnedRendererPreferred,_ as isPathInsideProject,_t as isPermissionMode,Kt as isPrintable,ao as isProviderConfigured,$ as isRemoteConptyHost,wn as isScreenReader,tn as isShellCommand,on as isShellCommandSuccess,I as isTmuxControlMode,k as isToolCallAllowed,F as isVsCodeTerminalHostEnv,tt as isWideChar,Sn as listCustomProviders,An as listMcpServers,$o as listRegisteredCommands,ir as listRunningSessions,Jn as listSessions,No as loadAutoModeSettings,D as loadCommands,io as loadConfig,Vn as loadFullTranscript,Qn as loadSession,ve as measureChildActivitySurfaceRows,Gt as migrateLegacyIntegrationConfig,dt as minimalTheme,vt as normalizePermissionMode,Wo as parseCommand,M as parseCommandCall,Wt as parseExtensionsIntegrationDocument,Ct as parseKeypress,It as parseMcpIntegrationDocument,St as permissionModeDisplayName,wo as persistProviderSetupChoice,Bt as planLegacyIntegrationMigration,uo as prepareRuntimeConfig,w as processCommandCall,Nn as processSpecialSyntax,Mo as providerSetupRestartInstructions,Ko as rateLimitedCall,Zn as readConversationHistory,zt as readExtensionsIntegration,Yn as readFullTranscript,qt as readMcpIntegration,or as readSessionCapture,oo as registerConfiguredCustomProviders,vn as removeCustomProvider,Ln as removeMcpServer,jo as renderSetupGuide,ko as replBashPathSignalCollector,W as resetTmuxControlModeProbeForTesting,So as resolveAutoModeSettings,z as resolveConfiguredTuiRendererMode,B as resolveEffectiveTuiRendererMode,H as resolveFullscreenPolicy,Et as resolveIntegrationConfigPath,G as resolveInteractiveSurfacePreference,xo as resolveRuntimeEffortSelection,Co as resolveRuntimeModelSelection,go as resolveRuntimeProviderSelection,nn as restoreHistoryItemsFromSession,mr as rewindSession,dn as runInkInteractiveMode,kn as runInteractiveMode,Ro as runProviderSetupWizard,ln as runSessionPicker,fo as saveConfig,Uo as seedToHistoryItem,ar as setActiveEntry,nt as splitByCodePoints,Xn as supports256Colors,hn as supportsEmoji,Kn as supportsTrueColor,bn as supportsUnicode,lt as themes,Ge as toReplRuntimeAutoModeSettings,_o as toolCallSeedToHistoryToolCall,Je as touchContext,en as trimPersistedUiHistorySnapshot,rt as truncateByVisualWidth,dr as unarchiveSession,_n as upsertCustomProvider,Fn as upsertMcpServer,Bo as useAutocomplete,zo as useAutocompleteContext,Go as useInputHistory,Ie as useKeypress,Rt as useKeypressManager,qe as useQueuedPromptContents,Ee as useQueuedPrompts,Te as useStreaming,$e as useStreamingActions,Le as useStreamingState,Jo as useTextBuffer,Me as useUI,we as useUIActions,De as useUIState,$n as validateMcpServerConfig,mt as visualWidthCache,lr as watchSessions,jn as withCapture,Rn as withCaptureSync,$t as withCoreConfigWriteLock,Ht as writeIntegrationDocument};
|
package/dist/sdk-runtime.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { G as KodaXReasoningMode, d as KodaXCustomProviderConfig } from './types-chunks/types.d-CgrXrFrq.js';
|
|
2
2
|
export { k as KodaXMessage } from './types-chunks/types.d-CgrXrFrq.js';
|
|
3
|
-
import { I as AgentDispatchContext, cT as LearningQuery, cS as LearningPage, cv as LearnedCapabilityRecord, cY as LearningSurfaceSnapshot, cO as LearningEvent, cX as LearningSubscribeOptions, W as AgentExecutorFactory, J as AgentDispatchPolicy, F as AgentCredentialBroker, q as AgentArtifactPolicy, bK as KodaXImageInputArtifact, bN as KodaXInputArtifactSource, ck as KodaXVideoInputArtifact,
|
|
3
|
+
import { I as AgentDispatchContext, cT as LearningQuery, cS as LearningPage, cv as LearnedCapabilityRecord, cY as LearningSurfaceSnapshot, cO as LearningEvent, cX as LearningSubscribeOptions, W as AgentExecutorFactory, J as AgentDispatchPolicy, F as AgentCredentialBroker, q as AgentArtifactPolicy, bK as KodaXImageInputArtifact, bN as KodaXInputArtifactSource, ck as KodaXVideoInputArtifact, fb as WorkflowProcessSnapshot, f5 as WorkflowProcessEvent, S as AgentExecutionKind, ar as AgentRegistrationService, ba as DispatchableAgentQuery, b8 as DispatchableAgentListing, aj as AgentPreflightInput, ak as AgentPreflightResult, aG as AgentTreeSnapshot, H as AgentDetail, at as AgentSpawnInput, aJ as AgentTurnRef, G as AgentDataClassification, a5 as AgentFollowupResult, ai as AgentOutput, P as AgentEvent } from './types-chunks/controller.d-C2aHqzHj.js';
|
|
4
4
|
import { i as SkillMetadata } from './types-chunks/types.d-BbtGlKZu.js';
|
|
5
5
|
import { a as McpServerConfig } from './types-chunks/config.d-CJy1WENT.js';
|
|
6
6
|
import { t as McpServerStatus, u as McpServerToolList } from './types-chunks/manager.d-B67TmPO1.js';
|
|
7
|
-
import { K as KodaXSessionHistoryHit } from './types-chunks/history-retrieval.d-
|
|
8
|
-
import { c as ManagedWorkflowSnapshot } from './types-chunks/run-manager.d-
|
|
9
|
-
import { a1 as KodaXOptions, al as KodaXShellExecutionContract, aR as KodaXToolSandboxObservationUpdate, aP as KodaXToolEventMeta, W as KodaXManagedTaskStatusEvent, Q as KodaXEvents, ad as KodaXResult, bl as RuntimeContextBudgetSnapshot, bs as RuntimeToolExposurePlan, a5 as KodaXPromptCacheDiagnosticEvent, N as KodaXContextOptions, K as KodaXActivityEventMeta, aX as KodaXTurnStartedEvent, aU as KodaXTurnCompletedEvent, aW as KodaXTurnFailedEvent, L as KodaXContextCompactionFinishedEvent, M as KodaXContextIdentity } from './types-chunks/bash-prefix-extractor.d-
|
|
10
|
-
import { L as LoadedExtensionDiagnostic, u as ExtensionRuntimeDiagnostics } from './types-chunks/types.d-
|
|
11
|
-
import { h as AutoModeDecisionDiagnostics, s as AutoModeStats } from './types-chunks/guardrail.d-
|
|
12
|
-
import { M as saveConfig, c as CommandInfo } from './types-chunks/utils.d-
|
|
13
|
-
import {
|
|
7
|
+
import { K as KodaXSessionHistoryHit } from './types-chunks/history-retrieval.d-DImTKgO6.js';
|
|
8
|
+
import { c as ManagedWorkflowSnapshot } from './types-chunks/run-manager.d-C6ahvZqK.js';
|
|
9
|
+
import { a1 as KodaXOptions, al as KodaXShellExecutionContract, aR as KodaXToolSandboxObservationUpdate, aP as KodaXToolEventMeta, W as KodaXManagedTaskStatusEvent, Q as KodaXEvents, ad as KodaXResult, bl as RuntimeContextBudgetSnapshot, bs as RuntimeToolExposurePlan, a5 as KodaXPromptCacheDiagnosticEvent, N as KodaXContextOptions, K as KodaXActivityEventMeta, aX as KodaXTurnStartedEvent, aU as KodaXTurnCompletedEvent, aW as KodaXTurnFailedEvent, L as KodaXContextCompactionFinishedEvent, M as KodaXContextIdentity } from './types-chunks/bash-prefix-extractor.d-DStqKIlu.js';
|
|
10
|
+
import { L as LoadedExtensionDiagnostic, u as ExtensionRuntimeDiagnostics } from './types-chunks/types.d-yuJzE82x.js';
|
|
11
|
+
import { h as AutoModeDecisionDiagnostics, s as AutoModeStats } from './types-chunks/guardrail.d-DM-OK0m3.js';
|
|
12
|
+
import { M as saveConfig, c as CommandInfo } from './types-chunks/utils.d-BpACJmzt.js';
|
|
13
|
+
import { l as FullTranscriptSessionData, ag as SessionTranscriptEntry, a2 as SessionConversationHistoryData, a6 as SessionConversationHistoryStatus, a4 as SessionConversationHistoryIssue, a3 as SessionConversationHistoryEntry, c as CompactSessionResult } from './types-chunks/public-api.d-CewTvUKV.js';
|
|
14
14
|
import './types-chunks/capability.d-K664nHOS.js';
|
|
15
15
|
import 'vscode-languageserver-protocol';
|
|
16
16
|
import './types-chunks/cost-tracker.d-BeaenODW.js';
|
|
@@ -1069,6 +1069,7 @@ interface ConnectKodaXRuntimeOptions {
|
|
|
1069
1069
|
/** SDK facts that embedders can inspect before auto-starting a daemon. */
|
|
1070
1070
|
declare const KODAX_RUNTIME_SDK_CAPABILITIES: Readonly<{
|
|
1071
1071
|
readonly daemonOrphanExit: 1;
|
|
1072
|
+
readonly managedRunDurability: 1;
|
|
1072
1073
|
readonly runtimeEventCoalescing: 1;
|
|
1073
1074
|
}>;
|
|
1074
1075
|
interface RuntimeCapabilityRequirements {
|
|
@@ -1108,6 +1109,8 @@ interface RuntimeCapabilityRequirements {
|
|
|
1108
1109
|
readonly daemonSafeRunInput?: 1;
|
|
1109
1110
|
readonly sharedSessionSettings?: 1;
|
|
1110
1111
|
readonly durableRecoveryQueries?: 1;
|
|
1112
|
+
/** Require durable accepted-input and completed-turn boundaries for managed Runs. */
|
|
1113
|
+
readonly managedRunDurability?: 1;
|
|
1111
1114
|
readonly daemonManagement?: 1;
|
|
1112
1115
|
/** Require an auto-started daemon whose current host has orphan idle-exit enabled. */
|
|
1113
1116
|
readonly daemonOrphanExit?: 1;
|
package/dist/sdk-runtime.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v}from"./chunks/chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v}from"./chunks/chunk-UZSHBQER.js";import"./chunks/chunk-T5U4OP2N.js";import"./chunks/chunk-FQ7NVMSU.js";import"./chunks/chunk-IHPH3444.js";import"./chunks/chunk-CDCCTM5I.js";import"./chunks/chunk-PMKAG4SZ.js";import"./chunks/chunk-RPF5RGWZ.js";import"./chunks/chunk-VECRQTSD.js";import"./chunks/chunk-RXXKDR6Y.js";import"./chunks/chunk-HTVLCHWH.js";import"./chunks/chunk-BWX4YZX3.js";import"./chunks/chunk-GC4JBMBS.js";import"./chunks/chunk-KHEFUT6O.js";import"./chunks/chunk-TRNAWSXP.js";import"./chunks/chunk-CEB5FDND.js";import"./chunks/chunk-EVXIJPZ6.js";import"./chunks/chunk-E7C4DRD2.js";import"./chunks/chunk-6UENDY33.js";import"./chunks/chunk-ONUPGMER.js";export{b as KODAX_DAEMON_PROTOCOL,c as KODAX_DAEMON_PROTOCOL_VERSION,s as KODAX_RUNTIME_SDK_CAPABILITIES,d as RUNTIME_DAEMON_METHODS,g as RUNTIME_DAEMON_METHOD_SCHEMAS,h as RUNTIME_DAEMON_NOTIFICATION_SCHEMAS,i as RUNTIME_DAEMON_PROTOCOL_SCHEMA,j as RUNTIME_DAEMON_PROTOCOL_SCHEMA_JSON,m as RuntimeAutoModeConfigurationError,l as RuntimeDaemonCapabilityUpgradeError,f as RuntimePermissionScopeUpgradeRequiredError,e as RuntimeTransportBoundaryError,n as acquireKodaXInlineOwner,t as captureRuntimeSessionDiagnostics,v as connectKodaXRuntime,u as createKodaXRuntime,q as enableKodaXDaemonOwner,o as getKodaXRuntimeOwnerPolicy,p as getKodaXRuntimeOwnerState,k as listRuntimeDaemonSchemaMethods,a as parseRuntimeEvent,r as setKodaXRuntimeOwnerMode};
|
package/dist/sdk-sandbox.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import"./chunks/chunk-5BNQXXGY.js";import{a,b,c,d,e,f,g}from"./chunks/chunk-
|
|
2
|
+
import"./chunks/chunk-5BNQXXGY.js";import{a,b,c,d,e,f,g}from"./chunks/chunk-T5U4OP2N.js";import"./chunks/chunk-CEB5FDND.js";import"./chunks/chunk-EVXIJPZ6.js";import"./chunks/chunk-E7C4DRD2.js";import"./chunks/chunk-6UENDY33.js";import"./chunks/chunk-ONUPGMER.js";export{a as KODAX_ASRT_VERSION,f as activateKodaXSandbox,c as doctorKodaXSandbox,b as getKodaXSandboxCapability,e as getKodaXSandboxSetupGuidance,g as runKodaXSandboxed,d as setupKodaXSandbox};
|
package/dist/sdk-session.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { b as AppendClientNoticeOptions, C as CompactSessionOptions, c as CompactSessionResult, h as CreatableHistoryItem, j as DeleteSessionResult,
|
|
1
|
+
export { b as AppendClientNoticeOptions, C as CompactSessionOptions, c as CompactSessionResult, h as CreatableHistoryItem, j as DeleteSessionResult, k as ForkSessionOptions, l as FullTranscriptSessionData, M as ListSessionsOptions, T as PreparedSessionAppendBaseline, U as PreparedSessionTailDelta, X as RewindSessionOptions, Y as RunningSessionInfo, Z as SessionBundleExportDiagnostic, _ as SessionBundleExportFile, $ as SessionBundleExportOptions, a0 as SessionBundleExportResult, a1 as SessionBundleExportStatus, a2 as SessionConversationHistoryData, a3 as SessionConversationHistoryEntry, a4 as SessionConversationHistoryIssue, a5 as SessionConversationHistoryIssueCode, a6 as SessionConversationHistoryStatus, a7 as SessionConversationMutationBoundary, a9 as SessionManager, ab as SessionReadError, ac as SessionReadErrorCode, ad as SessionReadOptions, af as SessionSummary, ag as SessionTranscriptEntry, ah as SessionTranscriptEntryType, ay as WatchSessionsCallback, az as appendClientNotice, aA as archiveSession, aB as compactSession, aH as createSessionManager, aI as deleteSession, aK as exportSessionBundle, aM as forkSession, aO as listRunningSessions, aP as listSessions, aQ as loadFullTranscript, aR as loadSession, aU as readConversationHistory, aV as readFullTranscript, aX as rewindSession, aY as setActiveEntry, aZ as unarchiveSession, a_ as watchSessions } from './types-chunks/public-api.d-CewTvUKV.js';
|
|
2
2
|
export { T as KodaXTaskResultMetadata, U as KodaXTaskResultSource } from './types-chunks/types.d-CgrXrFrq.js';
|
|
3
|
-
export { cc as KodaXSessionUiHistoryItem, cd as KodaXSessionUiHistoryItemType, ce as KodaXSessionUiTextHistoryItem, cf as KodaXSessionUiTextHistoryItemType, cg as KodaXSessionUiToolCall, ch as KodaXSessionUiToolCallStatus, ci as KodaXSessionUiToolGroupHistoryItem } from './types-chunks/controller.d-
|
|
4
|
-
export { H as HistorySeedSourceMessage, R as RestoreHistoryItemsFromSessionInput, a as RestoredHistorySeed, e as extractHistorySeedsFromMessage, b as extractHistorySeedsFromMessages, r as restoreHistoryItemsFromSession } from './types-chunks/sdk-session-
|
|
5
|
-
import './types-chunks/bash-prefix-extractor.d-
|
|
3
|
+
export { cc as KodaXSessionUiHistoryItem, cd as KodaXSessionUiHistoryItemType, ce as KodaXSessionUiTextHistoryItem, cf as KodaXSessionUiTextHistoryItemType, cg as KodaXSessionUiToolCall, ch as KodaXSessionUiToolCallStatus, ci as KodaXSessionUiToolGroupHistoryItem } from './types-chunks/controller.d-C2aHqzHj.js';
|
|
4
|
+
export { H as HistorySeedSourceMessage, R as RestoreHistoryItemsFromSessionInput, a as RestoredHistorySeed, e as extractHistorySeedsFromMessage, b as extractHistorySeedsFromMessages, r as restoreHistoryItemsFromSession } from './types-chunks/sdk-session-C59RUrri.js';
|
|
5
|
+
import './types-chunks/bash-prefix-extractor.d-DStqKIlu.js';
|
|
6
6
|
import 'vscode-languageserver-protocol';
|
|
7
7
|
import './types-chunks/types.d-BbtGlKZu.js';
|
|
8
8
|
import './types-chunks/cost-tracker.d-BeaenODW.js';
|
package/dist/sdk-session.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{$b as l,Qb as i,Tb as n,Ub as t,Vb as r,Wb as a,Xb as S,Yb as d,ac as p,bb as o,bc as u,cc as y,dc as c,ec as m,fc as H,gc as C,hc as T,ic as x,jc as R}from"./chunks/chunk-
|
|
2
|
+
import{$b as l,Qb as i,Tb as n,Ub as t,Vb as r,Wb as a,Xb as S,Yb as d,ac as p,bb as o,bc as u,cc as y,dc as c,ec as m,fc as H,gc as C,hc as T,ic as x,jc as R}from"./chunks/chunk-FQ7NVMSU.js";import{N as s,O as e}from"./chunks/chunk-IHPH3444.js";import"./chunks/chunk-CDCCTM5I.js";import"./chunks/chunk-PMKAG4SZ.js";import"./chunks/chunk-RPF5RGWZ.js";import"./chunks/chunk-VECRQTSD.js";import"./chunks/chunk-RXXKDR6Y.js";import"./chunks/chunk-HTVLCHWH.js";import"./chunks/chunk-BWX4YZX3.js";import"./chunks/chunk-GC4JBMBS.js";import"./chunks/chunk-KHEFUT6O.js";import"./chunks/chunk-TRNAWSXP.js";import"./chunks/chunk-CEB5FDND.js";import"./chunks/chunk-EVXIJPZ6.js";import"./chunks/chunk-E7C4DRD2.js";import"./chunks/chunk-6UENDY33.js";import"./chunks/chunk-ONUPGMER.js";export{i as SessionReadError,p as appendClientNotice,C as archiveSession,n as compactSession,R as createSessionManager,H as deleteSession,l as exportSessionBundle,s as extractHistorySeedsFromMessage,e as extractHistorySeedsFromMessages,u as forkSession,m as listRunningSessions,t as listSessions,a as loadFullTranscript,r as loadSession,d as readConversationHistory,S as readFullTranscript,o as restoreHistoryItemsFromSession,y as rewindSession,c as setActiveEntry,T as unarchiveSession,x as watchSessions};
|
package/dist/sdk-skills.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import"./chunks/chunk-
|
|
2
|
+
import"./chunks/chunk-CEB5FDND.js";import{$a as h,D as l,E as e,F as i,G as t,H as o,I as a,M as k,N as r,O as S,P as s,Ta as n,Ua as g,Va as u,Wa as c,Xa as d,Ya as x,Za as P,_a as R,ab as p,bb as v,cb as y,db as M,eb as f,fb as m,gb as E}from"./chunks/chunk-EVXIJPZ6.js";import"./chunks/chunk-E7C4DRD2.js";import"./chunks/chunk-6UENDY33.js";import"./chunks/chunk-ONUPGMER.js";export{y as SkillExecutor,R as SkillRegistry,d as VariableResolver,t as clearPluginSkillPaths,M as createExecutor,x as createResolver,n as discoverSkills,u as discoverSkillsWithMonorepo,f as executeSkill,m as expandSkillForLLM,E as formatSkillActivationMessage,o as getDefaultSkillPaths,g as getNestedSkillPaths,a as getSkillPathsFlat,h as getSkillRegistry,p as initializeSkillRegistry,i as listPluginSkillPaths,S as loadFullSkill,s as loadSkillFileContent,r as loadSkillMetadata,c as parseArguments,k as parseSkillMarkdown,l as registerPluginSkillPath,v as resetSkillRegistry,P as resolveSkillContent,e as unregisterPluginSkillPath};
|