@kodax-ai/kodax 0.7.78 → 0.7.79
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 +3475 -3197
- package/README.md +346 -275
- package/README_CN.md +274 -214
- package/config-templates/config.example.jsonc +11 -1
- package/config-templates/integrations/a2a.example.jsonc +23 -7
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.js +2 -1
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.js +4 -3
- package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/compare-runs.js +4 -3
- package/dist/builtin/skill-creator/scripts/generate-review.js +2 -1
- package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/grade-evals.js +4 -3
- package/dist/builtin/skill-creator/scripts/improve-description.js +2 -1
- package/dist/builtin/skill-creator/scripts/init-skill.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/init-skill.js +4 -3
- package/dist/builtin/skill-creator/scripts/install-skill.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/install-skill.js +4 -3
- package/dist/builtin/skill-creator/scripts/package-skill.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/package-skill.js +4 -3
- package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/quick-validate.js +4 -3
- package/dist/builtin/skill-creator/scripts/run-eval.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/run-eval.js +4 -3
- package/dist/builtin/skill-creator/scripts/run-loop.js +2 -1
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.js +2 -1
- package/dist/builtin/skill-creator/scripts/utils.d.ts +3 -0
- package/dist/builtin/skill-creator/scripts/utils.js +5 -1
- package/dist/chunks/{agent-ASP4MS3X.js → agent-V4AC5JZD.js} +1 -1
- package/dist/chunks/argument-completer-ZPC2MLES.js +2 -0
- package/dist/chunks/{chunk-Z3KFRTSB.js → chunk-67THZRM6.js} +1 -1
- package/dist/chunks/chunk-6GVQDQTQ.js +292 -0
- package/dist/chunks/{chunk-TQDBTTIM.js → chunk-B6UY3VHV.js} +40 -40
- package/dist/chunks/{chunk-7OEBJGHK.js → chunk-BBOVVDQJ.js} +1 -1
- package/dist/chunks/chunk-CR2IF7VF.js +30 -0
- package/dist/chunks/{chunk-UID7BLAB.js → chunk-CXHEZY5G.js} +1 -1
- package/dist/chunks/chunk-EDZ4QILG.js +266 -0
- package/dist/chunks/chunk-GEECPO2H.js +218 -0
- package/dist/chunks/chunk-H5LLM7DB.js +89 -0
- package/dist/chunks/chunk-KLWP7POA.js +467 -0
- package/dist/chunks/{chunk-2CFHBKRE.js → chunk-M4N2JZTZ.js} +2 -2
- package/dist/chunks/{chunk-YAZQTC2L.js → chunk-OWQT3FTE.js} +1 -1
- package/dist/chunks/chunk-Q4M7DJOD.js +319 -0
- package/dist/chunks/{chunk-6FOJVETH.js → chunk-QCZLCLFL.js} +7 -7
- package/dist/chunks/chunk-RQPMGRTR.js +810 -0
- package/dist/chunks/chunk-SG6P4SZS.js +123 -0
- package/dist/chunks/chunk-TSTVAU5E.js +386 -0
- package/dist/chunks/chunk-ZCZZUE5E.js +662 -0
- package/dist/chunks/compaction-config-AEUGVROL.js +2 -0
- package/dist/chunks/{construction-bootstrap-VQLQGWPY.js → construction-bootstrap-K3ZGEN5N.js} +1 -1
- package/dist/chunks/dist-GFJFRPAV.js +2 -0
- package/dist/chunks/{dist-BFT5YIGU.js → dist-JMO47GJV.js} +1 -1
- package/dist/chunks/host-23K2Q6RZ.js +2 -0
- package/dist/chunks/run-manager-PGIR6ITA.js +2 -0
- package/dist/chunks/{utils-SID4HW2Q.js → utils-6LEKJPQN.js} +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.js +2 -2
- package/dist/kodax_bootstrap.js +2 -1
- package/dist/kodax_cli.js +1816 -1458
- package/dist/kodax_resume.js +570 -34
- package/dist/provider-capabilities.json +85 -50
- package/dist/runtime-worker.js +1713 -1361
- package/dist/sandbox-workspace-session.js +285 -19
- package/dist/sdk-a2a.d.ts +19 -13
- package/dist/sdk-a2a.js +8 -8
- package/dist/sdk-agent.d.ts +73 -141
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +29 -60
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +3 -3
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +7 -7
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +25 -26
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +227 -31
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +8 -8
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +283 -18
- package/dist/types-chunks/{base.d-4e74xDdy.d.ts → base.d-DxG0m09Z.d.ts} +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-uAe2Oqda.d.ts → bash-prefix-extractor.d-CNSidpmv.d.ts} +28 -7
- package/dist/types-chunks/{capability-learning.d-CVsdHw4j.d.ts → capability-learning.d-iPSiAmc_.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-BlSv9l3V.d.ts → capsule.d-B3q98pLQ.d.ts} +9 -7
- package/dist/types-chunks/{types.d-BA-Jwpfs.d.ts → controller.d-RGV7Pjv9.d.ts} +328 -3
- package/dist/types-chunks/{guardrail.d-CXDYRgZ3.d.ts → guardrail.d-1NLSFTyN.d.ts} +126 -52
- package/dist/types-chunks/{history-retrieval.d-DtCy7x64.d.ts → history-retrieval.d-BAegI14A.d.ts} +16 -3
- package/dist/types-chunks/{oauth-login.d-Bgb4rdLN.d.ts → oauth-login.d-6i-vidxv.d.ts} +6 -2
- package/dist/types-chunks/{public-api.d-B3AohsxN.d.ts → public-api.d-BpJhHoa7.d.ts} +334 -25
- package/dist/types-chunks/{repl.d-Ie_ZXb_U.d.ts → repl.d-CZ12Ow3X.d.ts} +5 -5
- package/dist/types-chunks/{resolver.d-iAQ9ocLB.d.ts → resolver.d-C9IW4fmU.d.ts} +5 -2
- package/dist/types-chunks/{run-manager.d-D1twIhF9.d.ts → run-manager.d-CX3AUocA.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-DB9KksIx.d.ts → sdk-session-B3cfJKqF.d.ts} +3 -3
- package/dist/types-chunks/{side-query.d-DTuLPcC5.d.ts → side-query.d-CP1LiRiH.d.ts} +8 -2
- package/dist/types-chunks/{types-D3g6XUQr.d.ts → types-Bf3Y3mW-.d.ts} +1 -1
- package/dist/types-chunks/{types.d-BH0ZkTGf.d.ts → types.d-BZ9oXvTV.d.ts} +2 -2
- package/dist/types-chunks/{types.d-DVDTIfB_.d.ts → types.d-C0_rn--1.d.ts} +4 -4
- package/dist/types-chunks/{types.d-DIpZJKUl.d.ts → types.d-CgrXrFrq.d.ts} +16 -2
- package/dist/types-chunks/{utils.d-CVp6bFl9.d.ts → utils.d-CGpHavsU.d.ts} +14 -6
- package/docs/SDK_EMBEDDER_GUIDE.md +1144 -598
- package/package.json +4 -1
- package/dist/chunks/argument-completer-JYQ7FX3W.js +0 -2
- package/dist/chunks/chunk-35PPHOQ2.js +0 -292
- package/dist/chunks/chunk-43QNNDHR.js +0 -29
- package/dist/chunks/chunk-5GO6FH7L.js +0 -458
- package/dist/chunks/chunk-5NDCSFOP.js +0 -78
- package/dist/chunks/chunk-6XM4B6K2.js +0 -48
- package/dist/chunks/chunk-6YZUE6NC.js +0 -240
- package/dist/chunks/chunk-KQLQYHWU.js +0 -386
- package/dist/chunks/chunk-NXO6GWSY.js +0 -46
- package/dist/chunks/chunk-T2XZTLYE.js +0 -316
- package/dist/chunks/chunk-VAT2QYXM.js +0 -765
- package/dist/chunks/chunk-YVRYHC4C.js +0 -655
- package/dist/chunks/compaction-config-BQSSIWK5.js +0 -2
- package/dist/chunks/dist-PCFE24YP.js +0 -2
- package/dist/chunks/host-UTFXCYYM.js +0 -2
- package/dist/chunks/run-manager-PJU3WIFJ.js +0 -2
- package/dist/types-chunks/guardrail.d-BRE_ErEj.d.ts +0 -156
package/dist/sdk-repl.d.ts
CHANGED
|
@@ -1,29 +1,28 @@
|
|
|
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,
|
|
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 { a as BashPrefixExtractor, Q as KodaXEvents, t as KodaXAgentMode,
|
|
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-
|
|
10
|
-
import { d as KodaXCustomProviderConfig } from './types-chunks/types.d-
|
|
11
|
-
export {
|
|
2
|
+
import { A as AppProps, P as Message, av as UIState, h as CreatableHistoryItem, n as HistoryItem, as as ToolCall, au as UIActions, K as KeyInfo, E as KeypressHandler, ak as StreamingState, W as PromptEditingMode, I as InputPromptProps, aj as StatusBarProps, ap as Theme, at as ToolCallStatus, al as Suggestion, aw as UseTextBufferReturn, H as HistoryEntry, R as PastedContent, t as HistoryItemInfo, T as PermissionMode } from './types-chunks/public-api.d-BpJhHoa7.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 FILE_MODIFICATION_TOOLS, k as FileSessionStorage, l as ForkSessionOptions, m as FullTranscriptSessionData, o as HistoryItemAssistant, p as HistoryItemBase, q as HistoryItemError, r as HistoryItemEvent, s as HistoryItemHint, u as HistoryItemSidecar, v as HistoryItemSystem, w as HistoryItemThinking, x as HistoryItemToolGroup, y as HistoryItemType, z as HistoryItemUser, B as KeypressEvent, G as KeypressHandlerPriority, L as LearningBinding, J as LearningSurfaceSnapshot, M as LegacyMessageListProps, N as ListSessionsOptions, O as MemorySessionStorage, Q as PERMISSION_MODES, S as PermissionContext, U as PreparedSessionAppendBaseline, V as PreparedSessionTailDelta, X as PromptSubmitPayload, Y as RewindSessionOptions, Z as RunningSessionInfo, _ as SessionBundleExportDiagnostic, $ as SessionBundleExportFile, a0 as SessionBundleExportOptions, a1 as SessionBundleExportResult, a2 as SessionBundleExportStatus, a3 as SessionConversationHistoryData, a4 as SessionConversationHistoryEntry, a5 as SessionConversationHistoryIssue, a6 as SessionConversationHistoryIssueCode, a7 as SessionConversationHistoryStatus, a8 as SessionConversationMutationBoundary, a9 as SessionData, aa as SessionManager, ab as SessionReadCapture, ac as SessionReadError, ad as SessionReadErrorCode, ae as SessionReadOptions, af as SessionStorage, ag as SessionSummary, ah as SessionTranscriptEntry, ai as SessionTranscriptEntryType, am as TOOL_STATUS_ICONS, an as TextBuffer, ao as TextBufferOptions, aq as ThemeColors, ar as ThemeSymbols, ax as VisualCursor, ay as VisualLayout, az as WatchSessionsCallback, aA as appendClientNotice, aB as archiveSession, aC as compactSession, aD as computeConfirmTools, aE as conversationHistoryFromCapture, aF as createConversationEntryChain, aG as createMemorySessionStorage, aH as createSessionConversationHistoryRevision, aI as createSessionManager, aJ as deleteSession, aK as emptyConversationEntryChain, aL as exportSessionBundle, aM as extendConversationEntryChain, aN as forkSession, aO as isPermissionMode, aP as listRunningSessions, aQ as listSessions, aR as loadFullTranscript, aS as loadSession, aT as normalizePermissionMode, aU as permissionModeDisplayName, aV as readConversationHistory, aW as readFullTranscript, aX as readSessionCapture, aY as rewindSession, aZ as setActiveEntry, a_ as unarchiveSession, a$ as watchSessions } from './types-chunks/public-api.d-BpJhHoa7.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-CZ12Ow3X.js';
|
|
5
|
+
import { a as BashPrefixExtractor, Q as KodaXEvents, t as KodaXAgentMode, b6 as ProviderRecoveryEvent, ad as KodaXResult } from './types-chunks/bash-prefix-extractor.d-CNSidpmv.js';
|
|
6
|
+
import { c as QueuedMessage } from './types-chunks/types.d-BZ9oXvTV.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-B3cfJKqF.js';
|
|
8
|
+
import { c as CommandInfo } from './types-chunks/utils.d-CGpHavsU.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-CGpHavsU.js';
|
|
10
|
+
import { d as KodaXCustomProviderConfig } from './types-chunks/types.d-CgrXrFrq.js';
|
|
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 {
|
|
16
|
-
import {
|
|
17
|
-
import './types-chunks/types.d-BbtGlKZu.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-RGV7Pjv9.js';
|
|
16
|
+
import { Y as SignalCollector, e as AutoModeAskUser, j as AutoModeGuardrailConfig, r as AutoModeSharedState, t as AutoModeToolGuardrail, X as RulesLoadResult } from './types-chunks/guardrail.d-1NLSFTyN.js';
|
|
18
17
|
import 'vscode-languageserver-protocol';
|
|
18
|
+
import './types-chunks/types.d-BbtGlKZu.js';
|
|
19
19
|
import './types-chunks/cost-tracker.d-BeaenODW.js';
|
|
20
|
-
import './types-chunks/types-
|
|
20
|
+
import './types-chunks/types-Bf3Y3mW-.js';
|
|
21
21
|
import './types-chunks/capability.d-K664nHOS.js';
|
|
22
|
-
import './types-chunks/base.d-
|
|
22
|
+
import './types-chunks/base.d-DxG0m09Z.js';
|
|
23
23
|
import 'readline';
|
|
24
24
|
import 'child_process';
|
|
25
|
-
import './types-chunks/
|
|
26
|
-
import './types-chunks/side-query.d-DTuLPcC5.js';
|
|
25
|
+
import './types-chunks/side-query.d-CP1LiRiH.js';
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
28
|
* App - KodaX CLI root component.
|
|
@@ -73,8 +72,8 @@ interface AppHandle {
|
|
|
73
72
|
* substitution `$(...)`, backticks, bare `&`, etc.) — fail-closed to
|
|
74
73
|
* `false` so unmodeled syntax always falls through to confirmation.
|
|
75
74
|
*
|
|
76
|
-
* Per-stage syntactic checks
|
|
77
|
-
*
|
|
75
|
+
* Per-stage syntactic checks use `isShellReadOnlyArgv` so quoted tokens do not
|
|
76
|
+
* need to be joined and parsed a second time.
|
|
78
77
|
*
|
|
79
78
|
* @param command - bash command string
|
|
80
79
|
* @returns true if the command is a safe read operation
|
|
@@ -2134,9 +2133,9 @@ declare function getThemeNames(): string[];
|
|
|
2134
2133
|
declare function listRegisteredCommands(projectRoot?: string): CommandInfo[];
|
|
2135
2134
|
|
|
2136
2135
|
declare const CONFIG_TEMPLATES: {
|
|
2137
|
-
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 // \"timeoutMs\":
|
|
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 // \"timeoutMs\": 30000,\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";
|
|
2138
2137
|
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";
|
|
2139
|
-
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 // 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";
|
|
2138
|
+
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";
|
|
2140
2139
|
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";
|
|
2141
2140
|
};
|
|
2142
2141
|
type ConfigTemplateName = keyof typeof CONFIG_TEMPLATES;
|
|
@@ -2482,6 +2481,8 @@ interface AutoModeBootstrapDeps {
|
|
|
2482
2481
|
readonly projectRoot: string;
|
|
2483
2482
|
/** Directory used to resolve relative tool paths. */
|
|
2484
2483
|
readonly executionCwd: string;
|
|
2484
|
+
/** Whether process environment path aliases equal the executed shell's aliases. */
|
|
2485
|
+
readonly trustProcessEnvironmentPathExpansion?: boolean;
|
|
2485
2486
|
/** Runtime-confirmed ASRT availability for exact workspace shell calls. */
|
|
2486
2487
|
readonly workspaceShellSandboxAvailable?: boolean;
|
|
2487
2488
|
/** Runtime-owned one-shot admission into the workspace shell sandbox. */
|
|
@@ -2502,11 +2503,9 @@ interface AutoModeBootstrapDeps {
|
|
|
2502
2503
|
*/
|
|
2503
2504
|
readonly log?: (level: 'info' | 'warn', msg: string) => void;
|
|
2504
2505
|
/**
|
|
2505
|
-
* Fired
|
|
2506
|
-
*
|
|
2507
|
-
*
|
|
2508
|
-
* state so the engine indicator stays accurate without requiring a
|
|
2509
|
-
* mode toggle to refresh.
|
|
2506
|
+
* Fired when an explicit/manual `setEngine` call changes the selected
|
|
2507
|
+
* engine. Classifier health thresholds are diagnostic and do not mutate the
|
|
2508
|
+
* engine. The REPL uses this callback to keep its status bar current.
|
|
2510
2509
|
*/
|
|
2511
2510
|
readonly onEngineChange?: (engine: 'llm' | 'rules') => void;
|
|
2512
2511
|
/** Session-owned engine/denial/breaker state shared by context-specific guardrails. */
|
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
|
|
3
|
-
`)[0]?.replace(/^#\s*/,"").trim()??"").slice(0,60)||"(prompt command)";
|
|
2
|
+
import{$ as oe,$a as on,$b as er,A as Y,Aa as Re,Ab as kn,B as Z,Ba as ke,Bb as Nn,C as tt,Ca as Ne,Cb as Sn,D as ot,Da as Se,Db as Un,E as et,Ea as Ue,Eb as _n,F as nt,Fa as _e,Fb as vn,G as rt,Ga as ve,Gb as An,H as mt,Ha as Ae,Hb as On,I as at,Ia as Oe,Ib as Fn,J as it,Ja as Fe,Jb as Ln,K as st,Ka as Le,Kb as $n,L as ct,La as $e,Lb as Tn,M as gt,Ma as Te,Mb as In,N as Ct,Na as Ie,Nb as Wn,O as xt,Oa as We,Ob as En,P as yt,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 P,aa as ee,ab as en,ac as nr,b as j,ba as ne,bb as nn,bc as rr,c as R,ca as re,cb as rn,cc as mr,d as k,da as me,db as mn,dc as ar,e as N,ea as ae,eb as an,ec as ir,f as S,fa as ie,fb as sn,fc as sr,g as U,ga as se,gb as cn,gc as cr,h as _,ha as ce,hb as dn,hc as dr,i as v,ia as de,ib as ln,ic as lr,j as A,ja as le,jb as pn,jc as pr,k as O,ka as pe,kb as un,l as F,la as ue,lb as fn,m as L,ma as fe,mb as gn,n as $,na as ge,nb as Cn,o as T,oa as Ce,ob as xn,p as I,pa as xe,pb as yn,q as W,qa as ye,qb as Kn,r as E,ra as Ke,rb as Xn,s as q,sa as Xe,sb as bn,t as z,ta as be,tb as hn,u as B,ua as he,ub as Dn,v as G,va as De,vb as wn,w as H,wa as we,wb as Mn,x as J,xa as Me,xb as Pn,y as Q,ya as Pe,yb as jn,z as V,za as je,zb as Rn}from"./chunks/chunk-Q4M7DJOD.js";import{G as Ko,I as Xo,J as bo,K as ho,L as Do,O as wo,P as Mo,Q as Po,S as jo,T as Ro,V as ko,Va as $o,Wa as To,X as No,Xa as Io,Y as So,Ya as Wo,Za as Eo,a as dt,b as lt,c as pt,d as ut,e as ft,f as Kt,ga as Uo,ha as _o,i as Xt,ia as vo,ja as Ao,k as bt,ka as Oo,l as ht,m as Dt,n as wt,o as co,p as lo,pa as Fo,q as po,qa as Lo,r as uo,s as fo,t as go,u as Co,w as xo,x as yo}from"./chunks/chunk-ZCZZUE5E.js";import{$ as mo,O as Jt,P as Qt,Q as Vt,R as Yt,S as Zt,T as to,U as oo,X as eo,Y as no,_ as ro,aa as ao,b as Mt,c as Pt,ca as io,d as jt,e as Rt,f as kt,g as Nt,ga as so,h as St,i as Ut,j as _t,k as vt,l as At,m as Ot,n as Ft,o as Lt,p as $t,q as Tt,r as It,s as Wt,t as Et,u as qt,w as zt,x as Bt,y as Gt,z as Ht}from"./chunks/chunk-EDZ4QILG.js";import"./chunks/chunk-BBOVVDQJ.js";import"./chunks/chunk-KLWP7POA.js";import"./chunks/chunk-B6UY3VHV.js";import"./chunks/chunk-CXHEZY5G.js";import"./chunks/chunk-67THZRM6.js";import"./chunks/chunk-QCZLCLFL.js";import"./chunks/chunk-TSTVAU5E.js";import"./chunks/chunk-OWQT3FTE.js";import"./chunks/chunk-SG6P4SZS.js";import"./chunks/chunk-RQPMGRTR.js";import{d as x}from"./chunks/chunk-GEECPO2H.js";import"./chunks/chunk-M4N2JZTZ.js";import"./chunks/chunk-H5LLM7DB.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,Mt as CONFIG_TEMPLATES,Ae as ChildActivitySurface,Pn as ConsoleCapturer,qn as ConversationPageCacheCapacityError,jt as CoreConfigWriteConflictError,ft as DEFAULT_UI_STATE,Re as DialogSurface,Zo as DotsIndicator,bt as FILE_MODIFICATION_TOOLS,Bn as FileSessionStorage,de as FullscreenTranscriptLayout,ne as HistoryItemRenderer,Qo as InputPrompt,Nt as IntegrationConfigConflictError,$t as IntegrationConfigController,f as KODAX_COMMANDS_DIR,Wt as KODAX_CONFIG_FILE,Tt as KODAX_DIR,Yt as KODAX_EXAMPLE_CONFIG_FILE,Zt as KODAX_INTEGRATION_EXAMPLE_FILES,It as KODAX_SESSIONS_DIR,Gt as KODAX_VERSION,yt as KeyMatchers,ut as KeypressHandlerPriority,at as KeypressParser,Ct as KeypressProvider,I as LRUCache,ee as LoadingIndicator,Ve as MemorySessionStorage,le as MessageActions,re as MessageList,pe as MessageSelector,Ne as NotificationsSurface,Kt as PERMISSION_MODES,Et 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,co as ProviderSetupConfigConflictError,lo 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,rt as SingleLineTextInput,Yo as Spinner,Ue as StashNotice,ae as StatusBar,Se as StatusNoticesSurface,Fe as StreamingProvider,dt as StreamingState,Pe as SuggestionsDisplay,pt as TOOL_STATUS_ICONS,Ho as TextBuffer,nt as TextInput,oe as ThinkingIndicator,Cn as ToolCallDisplay,lt 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,V as calculateVisualCursorFromLayout,Q as calculateVisualLayout,Po as collectBashWriteTargets,Hn as compactSession,ht as computeConfirmTools,tr as conversationHistoryFromCapture,Rt as coreConfigWriteLockPath,pn as createCliEvents,Wn as createConversationEntryChain,Xe as createHistoryItem,He as createInteractiveContext,un as createJsonEvents,We as createKeyMatcher,gt as createKeypressManager,Ye as createMemorySessionStorage,sn as createRecoveryHistoryItem,mn as createRetryHistoryItem,En as createSessionConversationHistoryRevision,pr as createSessionManager,Oe as createStreamingManager,be as createToolCall,Y as darkTheme,Gn as dedupeSessions,sr as deleteSession,Mn as detectTerminalCapabilities,_ as detectTerminalHostProfile,U as detectTerminalRenderHost,cn as emitRecoveryHistoryItem,an as emitRetryHistoryItem,Tn as emptyConversationEntryChain,oo as ensureExampleConfigFile,to 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,ho as generateSavePattern,jo as getBashOutsideProjectWriteRisk,z as getCharAtCodePoint,W as getCodePointLength,Io as getCommandRegistry,Pt as getConfigTemplate,Un as getCustomProviderConfig,b as getDefaultCommandDir,io as getGitRoot,ct as getKeyDisplayName,On as getMcpServerConfig,Ro as getPlanModeBlockReason,Jt as getProviderList,Ht as getProviderModel,po as getProviderSetupCatalog,L as getTerminalHostCapabilities,Dn as getTerminalWidth,ot as getTheme,et as getThemeNames,Bt as getVersion,q as getVisualWidth,J as getVisualWidthCached,j as hasCursorUpViewportYankRisk,k as hasMainScreenRenderScrollRisk,qt as hydrateProcessEnvFromShell,Co as initializeSetupConfiguration,uo as inspectProviderSetupReadiness,Do as isAlwaysConfirmPath,Ko as isBashReadCommand,Xo as isBashWriteCommand,T as isClassicReplForced,wo as isCommandOnProtectedPath,it as isFunctionKey,$ as isOwnedRendererPreferred,Mo as isPathInsideProject,Dt as isPermissionMode,st as isPrintable,Qt as isProviderConfigured,R as isRemoteConptyHost,wn as isScreenReader,tn as isShellCommand,on as isShellCommandSuccess,N as isTmuxControlMode,bo as isToolCallAllowed,P as isVsCodeTerminalHostEnv,E as isWideChar,Sn as listCustomProviders,An as listMcpServers,$o as listRegisteredCommands,ir as listRunningSessions,Jn as listSessions,No as loadAutoModeSettings,D as loadCommands,Vt as loadConfig,Vn as loadFullTranscript,Qn as loadSession,ve as measureChildActivitySurfaceRows,Ft as migrateLegacyIntegrationConfig,Z as minimalTheme,wt as normalizePermissionMode,Wo as parseCommand,M as parseCommandCall,Ut as parseExtensionsIntegrationDocument,mt as parseKeypress,St as parseMcpIntegrationDocument,Xt as permissionModeDisplayName,fo as persistProviderSetupChoice,Ot as planLegacyIntegrationMigration,eo as prepareRuntimeConfig,w as processCommandCall,Nn as processSpecialSyntax,go as providerSetupRestartInstructions,so as rateLimitedCall,Zn as readConversationHistory,At as readExtensionsIntegration,Yn as readFullTranscript,vt as readMcpIntegration,or as readSessionCapture,zt as registerConfiguredCustomProviders,vn as removeCustomProvider,Ln as removeMcpServer,xo as renderSetupGuide,ko as replBashPathSignalCollector,S as resetTmuxControlModeProbeForTesting,So as resolveAutoModeSettings,v as resolveConfiguredTuiRendererMode,A as resolveEffectiveTuiRendererMode,F as resolveFullscreenPolicy,_t as resolveIntegrationConfigPath,O as resolveInteractiveSurfacePreference,ao as resolveRuntimeEffortSelection,mo as resolveRuntimeModelSelection,ro as resolveRuntimeProviderSelection,nn as restoreHistoryItemsFromSession,mr as rewindSession,dn as runInkInteractiveMode,kn as runInteractiveMode,yo as runProviderSetupWizard,ln as runSessionPicker,no as saveConfig,Uo as seedToHistoryItem,ar as setActiveEntry,B as splitByCodePoints,Xn as supports256Colors,hn as supportsEmoji,Kn as supportsTrueColor,bn as supportsUnicode,tt as themes,Ge as toReplRuntimeAutoModeSettings,_o as toolCallSeedToHistoryToolCall,Je as touchContext,en as trimPersistedUiHistorySnapshot,G as truncateByVisualWidth,dr as unarchiveSession,_n as upsertCustomProvider,Fn as upsertMcpServer,Bo as useAutocomplete,zo as useAutocompleteContext,Go as useInputHistory,Ie as useKeypress,xt 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,H as visualWidthCache,lr as watchSessions,jn as withCapture,Rn as withCaptureSync,kt as withCoreConfigWriteLock,Lt as writeIntegrationDocument};
|