@kodax-ai/kodax 0.7.67 → 0.7.69
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 +209 -3
- package/README.md +61 -9
- package/README_CN.md +58 -9
- package/config-templates/config.example.jsonc +26 -0
- package/config-templates/integrations/a2a.example.jsonc +54 -0
- package/config-templates/integrations/extensions.example.jsonc +7 -0
- package/config-templates/integrations/mcp.example.jsonc +16 -0
- package/dist/chunks/agent-DQRXT6M7.js +2 -0
- package/dist/chunks/argument-completer-RSK6CCGP.js +2 -0
- package/dist/chunks/chunk-4WIODYOH.js +329 -0
- package/dist/chunks/chunk-AWMTNUDS.js +37 -0
- package/dist/chunks/chunk-F7C7J6IM.js +7 -0
- package/dist/chunks/chunk-I4TPQEJN.js +5 -0
- package/dist/chunks/chunk-M7TCFYTO.js +107 -0
- package/dist/chunks/chunk-NGHQIGVW.js +46 -0
- package/dist/chunks/chunk-NGJURAY5.js +306 -0
- package/dist/chunks/{chunk-KBBGDRER.js → chunk-PA76WUBL.js} +2 -2
- package/dist/chunks/chunk-PQ3XUSY2.js +357 -0
- package/dist/chunks/chunk-UJEMSPM5.js +78 -0
- package/dist/chunks/{chunk-DEICMTHO.js → chunk-URC6ZI6P.js} +1 -1
- package/dist/chunks/{chunk-EN3O2C43.js → chunk-VAZ25MDX.js} +122 -122
- package/dist/chunks/chunk-VYKFM3TB.js +751 -0
- package/dist/chunks/chunk-WW2O2DEP.js +2 -0
- package/dist/chunks/chunk-Y4WOTWUC.js +2 -0
- package/dist/chunks/chunk-Z4PPLJF2.js +60 -0
- package/dist/chunks/chunk-ZG4DMYBS.js +422 -0
- package/dist/chunks/compaction-config-ABLL6UH3.js +2 -0
- package/dist/chunks/{construction-bootstrap-GLEHQ2KB.js → construction-bootstrap-GH6RW6ST.js} +1 -1
- package/dist/chunks/dist-DRBKYVHF.js +2 -0
- package/dist/chunks/dist-RWL2RBO4.js +2 -0
- package/dist/chunks/host-7SAB4WEC.js +2 -0
- package/dist/chunks/run-manager-XMDKTONJ.js +2 -0
- package/dist/chunks/utils-QYE5Y73D.js +2 -0
- package/dist/index.d.ts +19 -19
- package/dist/index.js +6 -6
- package/dist/kodax_cli.js +1497 -1209
- package/dist/runtime-worker.js +1371 -1107
- package/dist/sdk-a2a.d.ts +397 -0
- package/dist/sdk-a2a.js +9 -0
- package/dist/sdk-agent.d.ts +172 -33
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +126 -51
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +618 -0
- package/dist/sdk-experimental-memory.js +2 -0
- package/dist/sdk-llm.d.ts +16 -9
- 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 +35 -101
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +744 -21
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-session.d.ts +7 -7
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +100 -12
- package/dist/types-chunks/{base.d-DalIRhbb.d.ts → base.d-CYjtB68X.d.ts} +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-D57Gt6n8.d.ts → bash-prefix-extractor.d-BkIA8Wto.d.ts} +89 -18
- package/dist/types-chunks/{capability-learning.d-BQB0M70w.d.ts → capability-learning.d-WtsyRv3O.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-BZmqu_HL.d.ts → capsule.d-xJvfh4YR.d.ts} +5 -5
- package/dist/types-chunks/{commands.d-Cg26ud-Y.d.ts → commands.d-DkPfcQWG.d.ts} +4 -4
- package/dist/types-chunks/{cost-tracker.d-CBLk1fiD.d.ts → cost-tracker.d-BeaenODW.d.ts} +4 -1
- package/dist/types-chunks/{guardrail.d-Ds7JHxR1.d.ts → guardrail.d-6ZDbNbHO.d.ts} +1 -1
- package/dist/types-chunks/{guardrail.d-vSaBe64I.d.ts → guardrail.d-R7AiGfrI.d.ts} +4 -4
- package/dist/types-chunks/integration-config.d-ojG4swOP.d.ts +95 -0
- package/dist/types-chunks/{manager.d-Zum9cGHU.d.ts → manager.d-CoEuPRAo.d.ts} +4 -1
- package/dist/types-chunks/{public-api.d-CPBMPDiU.d.ts → public-api.d-7G4--RZE.d.ts} +6 -7
- package/dist/types-chunks/{resolver.d-CGkfRULj.d.ts → resolver.d-CIVoGc97.d.ts} +2 -2
- package/dist/types-chunks/{run-manager.d-lnwnfyNC.d.ts → run-manager.d-BaXtkryp.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-ByoMLoUS.d.ts → sdk-session-BQccrODn.d.ts} +6 -4
- package/dist/types-chunks/{types.d-DG9B4SMm.d.ts → types.d-BtC4yLYO.d.ts} +170 -13
- package/dist/types-chunks/{types.d-DYv3a1ka.d.ts → types.d-C9YHEAmA.d.ts} +38 -7
- package/dist/types-chunks/{types.d-DU9lLkmE.d.ts → types.d-CJR7t6iW.d.ts} +2 -2
- package/dist/types-chunks/{types.d-Bp4Lm1jv.d.ts → types.d-TTvpAGWf.d.ts} +11 -1
- package/dist/types-chunks/{utils.d-DMI-9GTR.d.ts → utils.d-BbB5jzi1.d.ts} +15 -7
- package/docs/SDK_EMBEDDER_GUIDE.md +732 -14
- package/package.json +14 -2
- package/dist/chunks/agent-E4V5SLX6.js +0 -2
- package/dist/chunks/argument-completer-N6RT5KYT.js +0 -2
- package/dist/chunks/chunk-AKMXJSGM.js +0 -56
- package/dist/chunks/chunk-CW32NQFO.js +0 -2
- package/dist/chunks/chunk-D6QVXQNI.js +0 -1
- package/dist/chunks/chunk-NVDK375I.js +0 -729
- package/dist/chunks/chunk-O7N22GJ3.js +0 -31
- package/dist/chunks/chunk-PZTG2C33.js +0 -7
- package/dist/chunks/chunk-QI6SQ2UQ.js +0 -306
- package/dist/chunks/chunk-QJJKMNZF.js +0 -2
- package/dist/chunks/chunk-RS2GAABJ.js +0 -328
- package/dist/chunks/chunk-W2XMNYLK.js +0 -15
- package/dist/chunks/chunk-WCSSXBHR.js +0 -419
- package/dist/chunks/chunk-YH5BTUQO.js +0 -343
- package/dist/chunks/chunk-YRBNXFHY.js +0 -2
- package/dist/chunks/compaction-config-56NO42ZI.js +0 -2
- package/dist/chunks/dist-4PXB7U22.js +0 -2
- package/dist/chunks/dist-4UIRSSFS.js +0 -2
- package/dist/chunks/host-DMREFNSO.js +0 -2
- package/dist/chunks/paste-C33GZQV5.js +0 -2
- package/dist/chunks/run-manager-P5XMSGZ7.js +0 -2
- package/dist/chunks/utils-JENPFKAE.js +0 -2
package/dist/sdk-llm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{$,$a as or,A,Aa as Bo,B,Ba as Co,C,Ca as Do,D,Da as Eo,E,Ea as Fo,F,Fa as Go,G,Ga as Ho,H,Ha as Io,I,Ia as Jo,J,Ja as Ko,K,Ka as Lo,L,La as Mo,M,Ma as No,N,Na as Oo,O,Oa as Po,P,Pa as Qo,Q,Qa as Ro,R,Ra as So,S,Sa as To,T,Ta as Uo,U,Ua as Vo,V,Va as Wo,W,Wa as Xo,X,Xa as Yo,Y,Ya as Zo,Z,Za as _o,_,_a as $o,a as o,aa as oo,b as r,ba as ro,c as e,ca as eo,d as f,da as fo,e as m,ea as mo,f as p,fa as po,g as t,ga as to,h as x,ha as xo,i as a,ia as ao,j as b,ja as bo,k as c,ka as co,l as d,la as go,m as g,ma as ho,n as h,na as io,o as i,oa as jo,p as j,pa as ko,q as k,qa as lo,r as l,ra as no,s as n,sa as qo,t as q,ta as so,u as s,ua as uo,v as u,va as vo,w as v,wa as wo,x as w,xa as yo,y,ya as zo,z,za as Ao}from"./chunks/chunk-
|
|
2
|
+
import{$,$a as or,A,Aa as Bo,B,Ba as Co,C,Ca as Do,D,Da as Eo,E,Ea as Fo,F,Fa as Go,G,Ga as Ho,H,Ha as Io,I,Ia as Jo,J,Ja as Ko,K,Ka as Lo,L,La as Mo,M,Ma as No,N,Na as Oo,O,Oa as Po,P,Pa as Qo,Q,Qa as Ro,R,Ra as So,S,Sa as To,T,Ta as Uo,U,Ua as Vo,V,Va as Wo,W,Wa as Xo,X,Xa as Yo,Y,Ya as Zo,Z,Za as _o,_,_a as $o,a as o,aa as oo,ab as rr,b as r,ba as ro,bb as er,c as e,ca as eo,cb as fr,d as f,da as fo,e as m,ea as mo,f as p,fa as po,g as t,ga as to,h as x,ha as xo,i as a,ia as ao,j as b,ja as bo,k as c,ka as co,l as d,la as go,m as g,ma as ho,n as h,na as io,o as i,oa as jo,p as j,pa as ko,q as k,qa as lo,r as l,ra as no,s as n,sa as qo,t as q,ta as so,u as s,ua as uo,v as u,va as vo,w as v,wa as wo,x as w,xa as yo,y,ya as zo,z,za as Ao}from"./chunks/chunk-UJEMSPM5.js";import"./chunks/chunk-ONUPGMER.js";export{Wo as DEFAULT_COST_RATES,d as KODAX_API_MIN_INTERVAL,b as KODAX_CAPPED_MAX_OUTPUT_TOKENS,co as KODAX_DEFAULT_PROVIDER,w as KODAX_DEFAULT_THINKING_BUDGETS,c as KODAX_ESCALATED_MAX_OUTPUT_TOKENS,a as KODAX_MAX_TOKENS,bo as KODAX_PROVIDERS,ao as KODAX_PROVIDER_SNAPSHOTS,u as KODAX_REASONING_MODE_SEQUENCE,y as KODAX_REASONING_SAFETY_RESERVE,v as KODAX_STABLE_EFFORT_INTENTS,eo as KodaXAnthropicCompatProvider,U as KodaXBaseProvider,f as KodaXError,t as KodaXNetworkError,fo as KodaXOpenAICompatProvider,m as KodaXProviderError,p as KodaXRateLimitError,x as KodaXToolCallIdError,P as WORKFLOW_MAX_CONCURRENCY_ABSOLUTE,O as WORKFLOW_MAX_CONCURRENCY_DEFAULT,n as addRejectedEffort,Yo as calculateCost,j as capabilityCacheKey,K as clampThinkingBudget,W as classifyStopReason,Z as classifyVerifyError,Mo as clearRuntimeModelProviders,Zo as createCostTracker,yo as createCustomProvider,E as effortToLegacyReasoningMode,N as extractHeadersFromError,rr as formatCost,er as formatCostReport,Po as getAvailableProviderNames,mo as getCodexCliDefaultModel,to as getCodexCliKnownModels,Xo as getCostRate,Go as getCustomModelCapabilities,Ao as getCustomProvider,Do as getCustomProviderList,Fo as getCustomProviderModelDescriptors,Eo as getCustomProviderModels,Co as getCustomProviderNames,I as getDefaultThinkingDepthForMode,po as getGeminiCliDefaultModel,xo as getGeminiCliKnownModels,uo as getModelCapabilities,go as getProvider,ko as getProviderConfiguredCapabilityProfile,jo as getProviderConfiguredReasoningCapability,lo as getProviderList,io as getProviderModel,so as getProviderModelDescriptors,no as getProviderModels,z as getReasoningCapability,l as getRejectedEfforts,S as getRunScopedConfig,Jo as getRuntimeModelProvider,Lo as getRuntimeModelProviderNames,r as getScopedProviderCredential,or as getSummary,_ as insertCacheBoundary,$ as isCacheBoundary,X as isCleanStop,Bo as isCustomProviderName,Oo as isKnownProvider,ho as isProviderConfigured,qo as isProviderName,A as isReasoningEnabled,Ko as isRuntimeModelProviderName,So as listAllModelCapabilities,vo as listBuiltinModelCapabilities,Ho as listCustomProviderModelCapabilities,Uo as listProviderModels,oo as lowerCacheBoundaries,L as mapDepthToOpenAIReasoningEffort,D as mapLegacyReasoningModeToEffortIntent,k as narrowReasoningProfile,T as normalizeCapabilityProfile,C as normalizeReasoningEffortValue,B as normalizeReasoningRequest,F as parseReasoningEffortEnv,M as parseRetryAfter,h as parseTimeoutSecEnvMs,V as parseToolInputWithSalvage,_o as recordRetry,$o as recordUsage,e as redactScopedProviderCredential,zo as registerCustomProviders,Io as registerModelProvider,q as removeCacheEntry,i as resolveLlmTimeoutConfig,Ro as resolveModelCapabilities,No as resolveProvider,Qo as resolveProviderModelDescriptors,G as resolveReasoningEffort,H as resolveReasoningEffortForModelSwitch,J as resolveThinkingBudget,Vo as resolveWireEffort,Q as resolveWorkflowMaxConcurrency,Y as runVerifyCredential,o as runWithProviderCredential,R as runWithScopedConfig,s as sanitizeCapabilityCache,fr as sideQuery,ro as stripCacheBoundaries,g as timeoutSecToMs,wo as validateCustomProviderConfig,To as verifyProviderCredential};
|
package/dist/sdk-mcp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as McpServersConfig } from './types-chunks/config.d-CJy1WENT.js';
|
|
2
2
|
export { M as McpConnectMode, a as McpServerConfig, c as McpTransportKind } from './types-chunks/config.d-CJy1WENT.js';
|
|
3
|
-
export { M as McpCapabilityDescriptor, a as McpCapabilityKind, b as McpCapabilityProvider, c as McpCapabilityRisk, d as McpCatalogItem, e as McpElicitRequest, f as McpElicitResult, g as McpIcon, h as McpManager, i as McpProviderOptions, j as McpReverseCapabilities, k as McpRoot, l as McpSamplingRequest, m as McpSamplingResult, n as McpServerCatalog, o as McpServerCatalogSnapshot, p as McpServerLogs, q as McpServerRuntime, r as McpServerRuntimeDiagnostics, s as McpServerStatus, t as McpServerToolList, u as McpToolTaskSupport, v as buildInitializeCapabilities, w as createMcpCapabilityId, x as createMcpManager, y as defaultMcpCacheDir, z as getMcpCachePaths, A as normalizeMcpCapabilityId, B as parseMcpCapabilityId, C as searchMcpCatalog } from './types-chunks/manager.d-
|
|
3
|
+
export { M as McpCapabilityDescriptor, a as McpCapabilityKind, b as McpCapabilityProvider, c as McpCapabilityRisk, d as McpCatalogItem, e as McpElicitRequest, f as McpElicitResult, g as McpIcon, h as McpManager, i as McpProviderOptions, j as McpReverseCapabilities, k as McpRoot, l as McpSamplingRequest, m as McpSamplingResult, n as McpServerCatalog, o as McpServerCatalogSnapshot, p as McpServerLogs, q as McpServerRuntime, r as McpServerRuntimeDiagnostics, s as McpServerStatus, t as McpServerToolList, u as McpToolTaskSupport, v as buildInitializeCapabilities, w as createMcpCapabilityId, x as createMcpManager, y as defaultMcpCacheDir, z as getMcpCachePaths, A as normalizeMcpCapabilityId, B as parseMcpCapabilityId, C as searchMcpCatalog } from './types-chunks/manager.d-CoEuPRAo.js';
|
|
4
4
|
export { A as AuthorizationServerMetadata, D as DiscoveredOAuthEndpoints, M as McpAuthRequiredError, a as McpExpiredSessionError, b as McpTransport, c as McpTransportEvents, O as OAuthClientInfo, d as OAuthLoginConsent, P as PerformOAuthLoginOptions, e as ProtectedResourceMetadata, W as WwwAuthenticateChallenge, f as createMcpTransport, g as discoverAuthorizationServerMetadata, h as discoverOAuthEndpoints, i as discoverProtectedResourceMetadata, j as extractInsufficientScope, k as extractResourceMetadataUrl, l as loadValidToken, p as performOAuthLogin, r as registerOAuthClient } from './types-chunks/oauth-login.d-Bgb4rdLN.js';
|
|
5
5
|
import './types-chunks/capability.d-3C62G8Eq.js';
|
|
6
6
|
|
package/dist/sdk-mcp.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{$
|
|
2
|
+
import{$b as d,Pb as e,Qb as t,Rb as r,Sb as a,Tb as i,Ub as p,Vb as c,Wb as o,Xb as M,Yb as n,Zb as s,_b as l,ac as u,bc as C,cc as v,dc as g,ec as S,fc as h,gc as R,hc as A,ic as b,jc as f}from"./chunks/chunk-VYKFM3TB.js";import"./chunks/chunk-AWMTNUDS.js";import"./chunks/chunk-F7C7J6IM.js";import"./chunks/chunk-NGHQIGVW.js";import"./chunks/chunk-ONUPGMER.js";export{o as McpAuthRequiredError,R as McpCapabilityProvider,c as McpExpiredSessionError,A as McpManager,h as McpServerRuntime,S as buildInitializeCapabilities,t as createMcpCapabilityId,b as createMcpManager,f as createMcpTestServerFixture,M as createMcpTransport,e as defaultMcpCacheDir,d as discoverAuthorizationServerMetadata,u as discoverOAuthEndpoints,l as discoverProtectedResourceMetadata,s as extractInsufficientScope,n as extractResourceMetadataUrl,p as getMcpCachePaths,g as loadValidToken,r as normalizeMcpCapabilityId,a as parseMcpCapabilityId,v as performOAuthLogin,C as registerOAuthClient,i as searchMcpCatalog};
|
package/dist/sdk-media.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as KodaXImageBlock } from './types-chunks/types.d-TTvpAGWf.js';
|
|
2
2
|
|
|
3
3
|
type KodaXMediaErrorCode = 'CLIPBOARD_EMPTY' | 'CLIPBOARD_IMAGE_UNAVAILABLE' | 'UNSUPPORTED_PLATFORM' | 'IMAGE_DECODE_FAILED' | 'IMAGE_TOO_LARGE' | 'UNSUPPORTED_MEDIA_TYPE' | 'MODEL_INPUT_UNSUPPORTED' | 'FILE_ACCESS_DENIED';
|
|
4
4
|
interface KodaXMediaErrorOptions {
|
package/dist/sdk-media.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{
|
|
2
|
+
import{C as u,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s}from"./chunks/chunk-F7C7J6IM.js";import"./chunks/chunk-NGHQIGVW.js";import"./chunks/chunk-ONUPGMER.js";export{r as ImageResizeError,n as KODAX_FILE_MEDIA_TYPES,k as KODAX_IMAGE_MEDIA_TYPES,l as KODAX_VIDEO_MEDIA_TYPES,o as KodaXMediaError,x as MAX_DIMENSION,g as PASTE_TMP_DIR_ENV,h as PASTE_TMP_TTL_MS,a as TARGET_RAW_SIZE_BYTES,p as createFileArtifactFromPath,m as createImageArtifactFromPath,t as createVideoArtifactFromPath,u as enqueueWithArtifacts,q as getModelInputCapabilities,e as inferImageMediaType,f as inferVideoMediaType,b as normalizePastedImage,i as persistImageAsBlock,j as prunePasteTmpDir,d as readAndNormalizeClipboardImage,c as readClipboardImage,s as validateInputArtifactsForModel};
|
package/dist/sdk-repl.d.ts
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
|
-
import { A as AppProps, M as Message, Q as UIState, c as CreatableHistoryItem, e as HistoryItem, N as ToolCall, U as UIActions, K as KeyInfo, t as KeypressHandler, y as StreamingState, v as PromptEditingMode, I as InputPromptProps, S as StatusBarProps, F as Theme, O as ToolCallStatus, z as Suggestion, V as UseTextBufferReturn, H as HistoryEntry, P as PastedContent, k as HistoryItemInfo } from './types-chunks/sdk-session-
|
|
3
|
-
export { a as AppState, C as Completer, b as Completion, d as CursorPosition, D as DEFAULT_UI_STATE, f as HistoryItemAssistant, g as HistoryItemBase, h as HistoryItemError, i as HistoryItemEvent, j as HistoryItemHint, l as HistoryItemSidecar, m as HistoryItemSystem, n as HistoryItemThinking, o as HistoryItemToolGroup, p as HistoryItemType, q as HistoryItemUser, r as HistorySeedSourceMessage, s as KeypressEvent, u as KeypressHandlerPriority, L as LegacyMessageListProps, w as PromptSubmitPayload, R as RestoreHistoryItemsFromSessionInput, x as RestoredHistorySeed, T as TOOL_STATUS_ICONS, B as TextBuffer, E as TextBufferOptions, G as ThemeColors, J as ThemeSymbols, W as VisualCursor, X as VisualLayout, Y as extractHistorySeedsFromMessage, Z as extractHistorySeedsFromMessages, _ as extractTextContent, $ as extractTitle, a0 as formatMessagePreview, a1 as restoreHistoryItemsFromSession, a2 as seedToHistoryItem, a3 as toolCallSeedToHistoryToolCall, a4 as trimPersistedUiHistorySnapshot } from './types-chunks/sdk-session-
|
|
4
|
-
export { B as BUILTIN_COMMANDS, C as Command, I as InkREPLOptions, a as InkRuntimeRunner, b as InkRuntimeRunnerInput, c as InkRuntimeStatusProvider, R as RepLOptions, d as ReplRuntimeRunner, e as ReplRuntimeRunnerInput, f as ReplRuntimeStatusProvider, g as executeCommand, h as getCommandRegistry, p as parseCommand, i as processSpecialSyntax, r as runInkInteractiveMode, j as runInteractiveMode } from './types-chunks/commands.d-
|
|
5
|
-
import { a as BashPrefixExtractor, L as KodaXEvents, r as KodaXAgentMode,
|
|
6
|
-
import { c as QueuedMessage } from './types-chunks/types.d-
|
|
7
|
-
import { f as PermissionMode } from './types-chunks/public-api.d-
|
|
8
|
-
export { A as AppendClientNoticeOptions, C as CompactSessionOptions, a as CompactSessionResult, b as ConfirmResult, D as DeleteSessionResult, F as FILE_MODIFICATION_TOOLS, c as FileSessionStorage, d as FullTranscriptSessionData, L as ListSessionsOptions, M as MemorySessionStorage, P as PERMISSION_MODES, e as PermissionContext, R as RunningSessionInfo, S as SessionData, g as SessionManager, h as SessionStorage, i as SessionSummary, j as SessionTranscriptEntry, k as SessionTranscriptEntryType, W as WatchSessionsCallback, l as appendClientNotice, m as archiveSession, n as compactSession, o as computeConfirmTools, p as createMemorySessionStorage, q as createSessionManager, r as deleteSession, s as forkSession, t as isPermissionMode, u as listRunningSessions, v as listSessions, w as loadFullTranscript, x as loadSession, y as normalizePermissionMode, z as permissionModeDisplayName, B as rewindSession, E as setActiveEntry, G as unarchiveSession, H as watchSessions } from './types-chunks/public-api.d-
|
|
9
|
-
import { c as CommandInfo } from './types-chunks/utils.d-
|
|
10
|
-
export { 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
|
|
11
|
-
import { d as KodaXCustomProviderConfig } from './types-chunks/types.d-
|
|
12
|
-
export {
|
|
2
|
+
import { A as AppProps, M as Message, Q as UIState, c as CreatableHistoryItem, e as HistoryItem, N as ToolCall, U as UIActions, K as KeyInfo, t as KeypressHandler, y as StreamingState, v as PromptEditingMode, I as InputPromptProps, S as StatusBarProps, F as Theme, O as ToolCallStatus, z as Suggestion, V as UseTextBufferReturn, H as HistoryEntry, P as PastedContent, k as HistoryItemInfo } from './types-chunks/sdk-session-BQccrODn.js';
|
|
3
|
+
export { a as AppState, C as Completer, b as Completion, d as CursorPosition, D as DEFAULT_UI_STATE, f as HistoryItemAssistant, g as HistoryItemBase, h as HistoryItemError, i as HistoryItemEvent, j as HistoryItemHint, l as HistoryItemSidecar, m as HistoryItemSystem, n as HistoryItemThinking, o as HistoryItemToolGroup, p as HistoryItemType, q as HistoryItemUser, r as HistorySeedSourceMessage, s as KeypressEvent, u as KeypressHandlerPriority, L as LegacyMessageListProps, w as PromptSubmitPayload, R as RestoreHistoryItemsFromSessionInput, x as RestoredHistorySeed, T as TOOL_STATUS_ICONS, B as TextBuffer, E as TextBufferOptions, G as ThemeColors, J as ThemeSymbols, W as VisualCursor, X as VisualLayout, Y as extractHistorySeedsFromMessage, Z as extractHistorySeedsFromMessages, _ as extractTextContent, $ as extractTitle, a0 as formatMessagePreview, a1 as restoreHistoryItemsFromSession, a2 as seedToHistoryItem, a3 as toolCallSeedToHistoryToolCall, a4 as trimPersistedUiHistorySnapshot } from './types-chunks/sdk-session-BQccrODn.js';
|
|
4
|
+
export { B as BUILTIN_COMMANDS, C as Command, I as InkREPLOptions, a as InkRuntimeRunner, b as InkRuntimeRunnerInput, c as InkRuntimeStatusProvider, R as RepLOptions, d as ReplRuntimeRunner, e as ReplRuntimeRunnerInput, f as ReplRuntimeStatusProvider, g as executeCommand, h as getCommandRegistry, p as parseCommand, i as processSpecialSyntax, r as runInkInteractiveMode, j as runInteractiveMode } from './types-chunks/commands.d-DkPfcQWG.js';
|
|
5
|
+
import { a as BashPrefixExtractor, L as KodaXEvents, r as KodaXAgentMode, aS as ProviderRecoveryEvent, a6 as KodaXResult } from './types-chunks/bash-prefix-extractor.d-BkIA8Wto.js';
|
|
6
|
+
import { c as QueuedMessage } from './types-chunks/types.d-CJR7t6iW.js';
|
|
7
|
+
import { f as PermissionMode } from './types-chunks/public-api.d-7G4--RZE.js';
|
|
8
|
+
export { A as AppendClientNoticeOptions, C as CompactSessionOptions, a as CompactSessionResult, b as ConfirmResult, D as DeleteSessionResult, F as FILE_MODIFICATION_TOOLS, c as FileSessionStorage, d as FullTranscriptSessionData, L as ListSessionsOptions, M as MemorySessionStorage, P as PERMISSION_MODES, e as PermissionContext, R as RunningSessionInfo, S as SessionData, g as SessionManager, h as SessionStorage, i as SessionSummary, j as SessionTranscriptEntry, k as SessionTranscriptEntryType, W as WatchSessionsCallback, l as appendClientNotice, m as archiveSession, n as compactSession, o as computeConfirmTools, p as createMemorySessionStorage, q as createSessionManager, r as deleteSession, s as forkSession, t as isPermissionMode, u as listRunningSessions, v as listSessions, w as loadFullTranscript, x as loadSession, y as normalizePermissionMode, z as permissionModeDisplayName, B as rewindSession, E as setActiveEntry, G as unarchiveSession, H as watchSessions } from './types-chunks/public-api.d-7G4--RZE.js';
|
|
9
|
+
import { c as CommandInfo } from './types-chunks/utils.d-BbB5jzi1.js';
|
|
10
|
+
export { 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 RuntimeSurfaceMode, n as RuntimeSurfaceStatus, o as createInteractiveContext, p as ensureExampleConfigFile, q as ensureExampleConfigFiles, r as getGitRoot, s as getProviderList, t as getProviderModel, u as getVersion, v as hydrateProcessEnvFromShell, w as isProviderConfigured, x as loadConfig, y as prepareRuntimeConfig, z as rateLimitedCall, A as registerConfiguredCustomProviders, B as resolveRuntimeEffortSelection, D as resolveRuntimeModelSelection, E as resolveRuntimeProviderSelection, F as saveConfig, G as touchContext } from './types-chunks/utils.d-BbB5jzi1.js';
|
|
11
|
+
import { d as KodaXCustomProviderConfig } from './types-chunks/types.d-TTvpAGWf.js';
|
|
12
|
+
export { S as KodaXTaskResultMetadata, T as KodaXTaskResultSource } from './types-chunks/types.d-TTvpAGWf.js';
|
|
13
13
|
import { a as McpServerConfig, b as McpServersConfig } from './types-chunks/config.d-CJy1WENT.js';
|
|
14
|
-
export {
|
|
15
|
-
|
|
14
|
+
export { E as ExtensionsIntegrationDocument, I as IntegrationConfigController, a as IntegrationConfigDiagnostic, b as IntegrationConfigListener, c as IntegrationConfigSnapshot, d as IntegrationConfigSource, e as IntegrationConfigStatus, f as IntegrationDocumentValidator, g as IntegrationDomain, L as LegacyIntegrationMigrationDomainPlan, h as LegacyIntegrationMigrationPlan, i as LegacyIntegrationMigrationResult, M as McpIntegrationDocument, m as migrateLegacyIntegrationConfig, p as parseExtensionsIntegrationDocument, j as parseMcpIntegrationDocument, k as planLegacyIntegrationMigration, r as readExtensionsIntegration, l as readMcpIntegration, n as resolveIntegrationConfigPath, w as writeIntegrationDocument } from './types-chunks/integration-config.d-ojG4swOP.js';
|
|
15
|
+
export { bg as KodaXSessionUiHistoryItem, bh as KodaXSessionUiHistoryItemType, bi as KodaXSessionUiTextHistoryItem, bj as KodaXSessionUiTextHistoryItemType, bk as KodaXSessionUiToolCall, bl as KodaXSessionUiToolCallStatus, bm as KodaXSessionUiToolGroupHistoryItem } from './types-chunks/types.d-BtC4yLYO.js';
|
|
16
|
+
import { a as AutoModeAskUser, S as SignalCollector, g as AutoModeToolGuardrail, o as RulesLoadResult } from './types-chunks/guardrail.d-R7AiGfrI.js';
|
|
16
17
|
import './types-chunks/types.d-vJExiRje.js';
|
|
17
18
|
import 'vscode-languageserver-protocol';
|
|
18
|
-
import './types-chunks/cost-tracker.d-
|
|
19
|
+
import './types-chunks/cost-tracker.d-BeaenODW.js';
|
|
19
20
|
import './types-chunks/capability.d-3C62G8Eq.js';
|
|
20
|
-
import './types-chunks/base.d-
|
|
21
|
+
import './types-chunks/base.d-CYjtB68X.js';
|
|
21
22
|
import 'readline';
|
|
22
23
|
import 'child_process';
|
|
23
|
-
import './types-chunks/guardrail.d-
|
|
24
|
+
import './types-chunks/guardrail.d-6ZDbNbHO.js';
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* App - KodaX CLI root component.
|
|
@@ -2086,6 +2087,15 @@ declare function getThemeNames(): string[];
|
|
|
2086
2087
|
|
|
2087
2088
|
declare function listRegisteredCommands(projectRoot?: string): CommandInfo[];
|
|
2088
2089
|
|
|
2090
|
+
declare const CONFIG_TEMPLATES: {
|
|
2091
|
+
readonly core: "// 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 --dry-run` for legacy declarations.\n{\n // \"provider\": \"deepseek\",\n // \"model\": \"deepseek-v4\",\n // \"runtimeMode\": \"embedded\",\n // \"effort\": \"high\",\n // \"agentMode\": \"ama\",\n // \"permissionMode\": \"accept-edits\",\n // \"locale\": \"zh\",\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 // \"reasoning\": { \"efforts\": [\"off\", \"low\", \"high\"], \"default\": \"high\" }\n // }\n // ],\n // \"repoIntelligenceMode\": \"auto\",\n // \"sessionRetentionDays\": 0,\n // \"workflow\": { \"maxConcurrency\": 8 }\n}\n";
|
|
2092
|
+
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";
|
|
2093
|
+
readonly a2a: "// Bidirectional A2A configuration: ~/.kodax/integrations/a2a.json.\n// `agents` calls third-party Agents. The optional singleton `server` exposes\n// one KodaX general task Agent; ACP remains the coding/editor protocol.\n{\n \"version\": 1,\n \"agents\": {}\n\n // Outbound example (keep tokens in the named environment variable):\n // \"agents\": {\n // \"reporting\": {\n // \"cardUrl\": \"https://agents.example.com/.well-known/agent-card.json\",\n // \"credentialEnv\": \"REPORTING_A2A_TOKEN\",\n // \"effect\": \"read\"\n // }\n // },\n\n // Create the inbound block with `kodax a2a expose`; do not copy private\n // Agent instructions, Runtime Skills, model names, or local paths into the\n // public `published.skills` list. Managed workspaces default below\n // ~/kodax_a2a_server_workspace/<server>/contexts/<caller-context>/.\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.69\",\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";
|
|
2094
|
+
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";
|
|
2095
|
+
};
|
|
2096
|
+
type ConfigTemplateName = keyof typeof CONFIG_TEMPLATES;
|
|
2097
|
+
declare function getConfigTemplate(name: ConfigTemplateName): string;
|
|
2098
|
+
|
|
2089
2099
|
/**
|
|
2090
2100
|
* Custom provider CRUD — v0.7.42 (closes gap 7 reported by KodaX Space).
|
|
2091
2101
|
*
|
|
@@ -2168,95 +2178,19 @@ declare function upsertCustomProvider(config: KodaXCustomProviderConfig): KodaXC
|
|
|
2168
2178
|
declare function removeCustomProvider(name: string): boolean;
|
|
2169
2179
|
|
|
2170
2180
|
/**
|
|
2171
|
-
* MCP
|
|
2172
|
-
* KodaX Space).
|
|
2181
|
+
* Typed MCP integration CRUD.
|
|
2173
2182
|
*
|
|
2174
|
-
*
|
|
2175
|
-
*
|
|
2176
|
-
*
|
|
2177
|
-
*
|
|
2178
|
-
*
|
|
2179
|
-
* 3. Write the file back, hoping `mcpServers` shape stayed in sync
|
|
2180
|
-
* with whatever the KodaX SDK currently expects.
|
|
2181
|
-
* 4. Restart the runtime — the existing `McpCapabilityProvider`
|
|
2182
|
-
* caches its server list at construction time so config changes
|
|
2183
|
-
* do NOT take effect mid-process.
|
|
2184
|
-
*
|
|
2185
|
-
* The KodaX Space "MCP popout" panel wants step 4 OUT of the loop:
|
|
2186
|
-
* users add/remove an MCP server, click "save", and have it live
|
|
2187
|
-
* immediately in the next agent turn. That requires (a) a typed CRUD
|
|
2188
|
-
* surface that owns the file format, and (b) an explicit re-hydrate
|
|
2189
|
-
* hook so the next agent run picks up the changes.
|
|
2190
|
-
*
|
|
2191
|
-
* This module covers (a). The re-hydrate hook is implicit: every new
|
|
2192
|
-
* substrate frame reads `loadConfig().mcpServers` at session start
|
|
2193
|
-
* (see `repl/.../bootstrap` flow) — so the next `runKodaX` /
|
|
2194
|
-
* `startKodaX` call sees the new list. In-flight runs continue with
|
|
2195
|
-
* the snapshot the substrate took at start; that matches the
|
|
2196
|
-
* pre-v0.7.42 invariant and avoids surprising tool-list mutations
|
|
2197
|
-
* mid-turn.
|
|
2198
|
-
*
|
|
2199
|
-
* Schema: this module relies on TypeScript's structural typing against
|
|
2200
|
-
* `KodaXMcpServerConfig` exported directly from `@kodax-ai/agent`. Unlike
|
|
2201
|
-
* custom providers, MCP entries have no canonical zod schema in the SDK today,
|
|
2202
|
-
* so the CRUD does shape-level checks only (required `name`, recognized
|
|
2203
|
-
* transport `type`, transport-shape coherence: stdio→command, http-like
|
|
2204
|
-
* transports→url). Embedders that need stricter validation can
|
|
2205
|
-
* layer it on top.
|
|
2206
|
-
*
|
|
2207
|
-
* Path resolution: like `custom-providers.ts`, this module resolves
|
|
2208
|
-
* the config file path on EVERY call via `getAgentConfigPath`, so
|
|
2209
|
-
* `setAgentConfigHome()` overrides (tests, multi-tenant substrate
|
|
2210
|
-
* consumers) take effect immediately.
|
|
2211
|
-
*/
|
|
2212
|
-
|
|
2213
|
-
/**
|
|
2214
|
-
* Return a snapshot of every MCP server currently persisted in
|
|
2215
|
-
* `~/.kodax/config.json` under `mcpServers`. Returned record is a
|
|
2216
|
-
* defensive deep copy — mutating it does NOT change the on-disk
|
|
2217
|
-
* config (use {@link upsertMcpServer} / {@link removeMcpServer} for
|
|
2218
|
-
* mutation). Order is undefined (object key order semantics).
|
|
2183
|
+
* FEATURE_268 stores active declarations in `integrations/mcp.json`. When that
|
|
2184
|
+
* file is absent, reads use the legacy `config.json#mcpServers` field. The
|
|
2185
|
+
* first mutation stages every legacy entry into the new document before
|
|
2186
|
+
* applying the requested change, so creating the authoritative file cannot
|
|
2187
|
+
* silently deactivate an existing server.
|
|
2219
2188
|
*/
|
|
2189
|
+
|
|
2220
2190
|
declare function listMcpServers(): McpServersConfig;
|
|
2221
|
-
/**
|
|
2222
|
-
* Look up a single MCP server config by `name`. Returns `undefined`
|
|
2223
|
-
* if no such server is configured. Returned value is a defensive
|
|
2224
|
-
* deep copy.
|
|
2225
|
-
*/
|
|
2226
2191
|
declare function getMcpServerConfig(name: string): McpServerConfig | undefined;
|
|
2227
|
-
/**
|
|
2228
|
-
* Add a new MCP server OR replace an existing one with the same
|
|
2229
|
-
* name. Shape is validated via {@link validateMcpServerConfig}; on
|
|
2230
|
-
* validation failure the call throws and the config is NOT touched.
|
|
2231
|
-
*
|
|
2232
|
-
* Returns the deep-cloned stored shape (so callers can observe the
|
|
2233
|
-
* normalized value without re-reading the file).
|
|
2234
|
-
*/
|
|
2235
2192
|
declare function upsertMcpServer(name: string, config: McpServerConfig): McpServerConfig;
|
|
2236
|
-
/**
|
|
2237
|
-
* Remove the MCP server identified by `name`. Returns `true` when an
|
|
2238
|
-
* entry was removed, `false` when no server with that name existed
|
|
2239
|
-
* (the file is NOT rewritten in that case — no-op for unknown names
|
|
2240
|
-
* so caller code can be idempotent).
|
|
2241
|
-
*/
|
|
2242
2193
|
declare function removeMcpServer(name: string): boolean;
|
|
2243
|
-
/**
|
|
2244
|
-
* Shape-level validation. Throws on malformed input — used by
|
|
2245
|
-
* {@link upsertMcpServer} before the disk write. Exposed so
|
|
2246
|
-
* embedders can pre-validate user input from a popout form before
|
|
2247
|
-
* showing a "save" button.
|
|
2248
|
-
*
|
|
2249
|
-
* Checks:
|
|
2250
|
-
* - `config` is a plain object
|
|
2251
|
-
* - transport `type` (when set) is one of stdio | sse | streamable-http | http
|
|
2252
|
-
* - stdio transport requires `command`
|
|
2253
|
-
* - sse / streamable-http / http transport requires `url`
|
|
2254
|
-
* - `connect` (when set) is one of lazy | prewarm | disabled
|
|
2255
|
-
*
|
|
2256
|
-
* Does NOT check that `command` resolves on PATH or that `url` is
|
|
2257
|
-
* reachable — both are runtime concerns surfaced by McpServerRuntime
|
|
2258
|
-
* at connection time.
|
|
2259
|
-
*/
|
|
2260
2194
|
declare function validateMcpServerConfig(name: string, config: McpServerConfig): void;
|
|
2261
2195
|
|
|
2262
2196
|
type SessionDedupeSkipReason = 'managed-task-worker' | 'unreadable' | 'no-match' | 'ambiguous-match' | 'move-failed';
|
|
@@ -2422,5 +2356,5 @@ declare function loadCommands(commandDir?: string): Promise<Map<string, KodaXCom
|
|
|
2422
2356
|
declare function processCommandCall(commandName: string, args: string | undefined, commands: Map<string, KodaXCommand>, runAgent: (prompt: string) => Promise<KodaXResult>): Promise<string | null>;
|
|
2423
2357
|
declare function parseCommandCall(input: string): [string, string?] | null;
|
|
2424
2358
|
|
|
2425
|
-
export { App, AppProps, AutocompleteContextProvider, BackgroundTaskBar, ChildActivitySurface, CommandInfo, ConsoleCapturer, 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, 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, collectBashWriteTargets, createCliEvents, createHistoryItem, createJsonEvents, createKeyMatcher, createKeypressManager, createRecoveryHistoryItem, createRetryHistoryItem, createStreamingManager, createToolCall, darkTheme, dedupeSessions, detectTerminalCapabilities, detectTerminalHostProfile, detectTerminalRenderHost, emitRecoveryHistoryItem, emitRetryHistoryItem, executeShellCommand, generateId, generateSavePattern, getBashOutsideProjectWriteRisk, getCharAtCodePoint, getCodePointLength, getCustomProviderConfig, getDefaultCommandDir, getKeyDisplayName, getMcpServerConfig, getPlanModeBlockReason, getTerminalHostCapabilities, getTerminalWidth, getTheme, getThemeNames, getVisualWidth, getVisualWidthCached, hasCursorUpViewportYankRisk, hasMainScreenRenderScrollRisk, isAlwaysConfirmPath, isBashReadCommand, isBashWriteCommand, isClassicReplForced, isCommandOnProtectedPath, isFunctionKey, isOwnedRendererPreferred, isPathInsideProject, isPrintable, isRemoteConptyHost, isScreenReader, isShellCommand, isShellCommandSuccess, isTmuxControlMode, isToolCallAllowed, isVsCodeTerminalHostEnv, isWideChar, listCustomProviders, listMcpServers, listRegisteredCommands, loadCommands, measureChildActivitySurfaceRows, minimalTheme, parseCommandCall, parseKeypress, processCommandCall, removeCustomProvider, removeMcpServer, resetTmuxControlModeProbeForTesting, resolveConfiguredTuiRendererMode, resolveEffectiveTuiRendererMode, resolveFullscreenPolicy, resolveInteractiveSurfacePreference, 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 };
|
|
2426
|
-
export type { AppHandle, AutoModeBootstrapDeps, AutoModeBootstrapResult, BackgroundTaskBarItem, BackgroundTaskBarProps, ChildActivitySurfaceProps, DialogSelectOption, DialogSurfaceConfirmState, DialogSurfaceProps, DialogSurfaceUIRequestState, DotsIndicatorProps, EffectiveTuiRendererMode, FullscreenPolicy, FullscreenTranscriptLayoutProps, HistoryItemRendererProps, InteractiveSurfacePreference, KeypressManager, KeypressProviderProps, KodaXCommand, KodaXCommandContext, LoadingIndicatorProps, LoadingIndicatorType, MessageActionsProps, MessageListProps, MessageSelectorProps, NotificationSurfaceItem, NotificationsSurfaceProps, PendingInputsIndicatorProps, ProgressIndicatorProps, PromptComposerProps, PromptFooterLeftSideProps, PromptFooterProps, PromptFooterRightSideProps, PromptFooterSurfaceItem, PromptHelpMenuProps, PromptSuggestionsSurfaceProps, QueuedCommandsSurfaceProps, ResolvedAutoModeBootstrapSettings, SessionDedupeMatch, SessionDedupeMove, SessionDedupeOptions, SessionDedupeReport, SessionDedupeSkip, SessionDedupeSkipReason, SessionPickerItem, 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 };
|
|
2359
|
+
export { App, AppProps, AutocompleteContextProvider, BackgroundTaskBar, CONFIG_TEMPLATES, ChildActivitySurface, CommandInfo, ConsoleCapturer, 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, 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, collectBashWriteTargets, createCliEvents, createHistoryItem, createJsonEvents, createKeyMatcher, createKeypressManager, createRecoveryHistoryItem, createRetryHistoryItem, createStreamingManager, createToolCall, darkTheme, dedupeSessions, detectTerminalCapabilities, detectTerminalHostProfile, detectTerminalRenderHost, emitRecoveryHistoryItem, emitRetryHistoryItem, executeShellCommand, generateId, generateSavePattern, getBashOutsideProjectWriteRisk, getCharAtCodePoint, getCodePointLength, getConfigTemplate, getCustomProviderConfig, getDefaultCommandDir, getKeyDisplayName, getMcpServerConfig, getPlanModeBlockReason, getTerminalHostCapabilities, getTerminalWidth, getTheme, getThemeNames, getVisualWidth, getVisualWidthCached, hasCursorUpViewportYankRisk, hasMainScreenRenderScrollRisk, isAlwaysConfirmPath, isBashReadCommand, isBashWriteCommand, isClassicReplForced, isCommandOnProtectedPath, isFunctionKey, isOwnedRendererPreferred, isPathInsideProject, isPrintable, isRemoteConptyHost, isScreenReader, isShellCommand, isShellCommandSuccess, isTmuxControlMode, isToolCallAllowed, isVsCodeTerminalHostEnv, isWideChar, listCustomProviders, listMcpServers, listRegisteredCommands, loadCommands, measureChildActivitySurfaceRows, minimalTheme, parseCommandCall, parseKeypress, processCommandCall, removeCustomProvider, removeMcpServer, resetTmuxControlModeProbeForTesting, resolveConfiguredTuiRendererMode, resolveEffectiveTuiRendererMode, resolveFullscreenPolicy, resolveInteractiveSurfacePreference, 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 };
|
|
2360
|
+
export type { AppHandle, AutoModeBootstrapDeps, AutoModeBootstrapResult, BackgroundTaskBarItem, BackgroundTaskBarProps, ChildActivitySurfaceProps, ConfigTemplateName, DialogSelectOption, DialogSurfaceConfirmState, DialogSurfaceProps, DialogSurfaceUIRequestState, DotsIndicatorProps, EffectiveTuiRendererMode, FullscreenPolicy, FullscreenTranscriptLayoutProps, HistoryItemRendererProps, InteractiveSurfacePreference, KeypressManager, KeypressProviderProps, KodaXCommand, KodaXCommandContext, LoadingIndicatorProps, LoadingIndicatorType, MessageActionsProps, MessageListProps, MessageSelectorProps, NotificationSurfaceItem, NotificationsSurfaceProps, PendingInputsIndicatorProps, ProgressIndicatorProps, PromptComposerProps, PromptFooterLeftSideProps, PromptFooterProps, PromptFooterRightSideProps, PromptFooterSurfaceItem, PromptHelpMenuProps, PromptSuggestionsSurfaceProps, QueuedCommandsSurfaceProps, ResolvedAutoModeBootstrapSettings, SessionDedupeMatch, SessionDedupeMove, SessionDedupeOptions, SessionDedupeReport, SessionDedupeSkip, SessionDedupeSkipReason, SessionPickerItem, 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
|
|
3
|
-
`)[0]?.replace(/^#\s*/,"").trim()??"").slice(0,60)||"(prompt command)";n.set(f,{name:f,description:i,content:d,type:"prompt"})}catch{}continue}if(m===".js"||m===".ts")try{let g=await import(c.join(o,t));for(let[i,p]of Object.entries(g))if(i.startsWith("command_")&&typeof p=="function"){let s=i.replace("command_",""),C=p.description??s;n.set(s,{name:s,description:String(C).slice(0,60),content:`[Programmable command: ${s}]`,type:"programmable",execute:p})}}catch{}}}catch{}return n}a(K,"loadCommands");async function X(e,n,o,r){let t=o.get(e);return t?t.type==="prompt"?n?t.content.replace(/{args}/g,n):t.content:t.type==="programmable"&&t.execute?t.execute({args:n,runAgent:r}):null:null}a(X,"processCommandCall");function h(e){if(!e.startsWith("/"))return null;let n=e.slice(1).trim();if(!n)return null;let o=n.search(/\s/);if(o===-1)return[n];let r=n.slice(0,o),t=n.slice(o).trim();return t?[r,t]:[r]}a(h,"parseCommandCall");export{
|
|
2
|
+
import{$ as vn,$a as Io,A as Q,Aa as so,Ab as ce,B as T,Ba as co,Bb as de,C as U,Ca as po,Cb as pe,D as V,Da as lo,Db as le,E as Y,Ea as uo,Eb as ue,F as Z,Fa as fo,Fb as fe,G as tt,Ga as go,Gb as ge,H as nt,Ha as Co,Hb as Ce,I as ot,Ia as xo,Ib as xe,J as et,Ja as yo,Jb as ye,K as rt,Ka as Ko,Kb as Ke,L as at,La as Xo,Lb as Xe,M as pt,Ma as ho,Mb as he,N as lt,Na as Do,Nb as De,O as ut,Oa as Po,Ob as Pe,P as ft,Pa as Mo,Pb as Me,Q as Mn,Qa as bo,Qb as be,R as bn,Ra as wo,Rb as we,S as wn,Sa as No,Sb as Ne,T as Nn,Ta as _o,Tb as _e,U as _n,Ua as jo,Ub as je,V as jn,Va as ko,Vb as ke,W as kn,Wa as Ao,Wb as Ae,X as An,Xa as Oo,Xb as Oe,Y as On,Ya as Ro,Z as Rn,Za as So,_ as Sn,_a as vo,a as D,aa as In,ab as Lo,b as P,ba as Ln,bb as Wo,c as M,ca as Wn,cb as Fo,d as b,da as Fn,db as $o,e as w,ea as $n,eb as qo,f as N,fa as qn,fb as zo,g as _,ga as zn,gb as Bo,h as j,ha as Bn,hb as Eo,i as k,ia as En,ib as Go,j as A,ja as Gn,jb as Ho,k as O,ka as Hn,kb as Jo,l as R,la as Jn,lb as Qo,m as S,ma as Qn,mb as To,n as v,na as Tn,nb as Uo,o as I,oa as Un,ob as Vo,p as L,pa as Vn,pb as Yo,q as W,qa as Yn,qb as Zo,r as F,ra as Zn,rb as te,s as $,sa as to,sb as ne,t as q,ta as no,tb as oe,u as z,ua as oo,ub as ee,v as B,va as eo,vb as re,w as E,wa as ro,wb as ae,x as G,xa as ao,xb as me,y as H,ya as mo,yb as ie,z as J,za as io,zb as se}from"./chunks/chunk-NGJURAY5.js";import{I as ln,J as un,K as fn,L as gn,M as Cn,R as xn,S as yn,a as mt,b as it,c as st,d as ct,e as dt,f as gt,h as Ct,j as xt,k as yt,l as Kt,m as Xt,n as nn,p as on,q as en,r as rn,s as an,t as mn,u as sn,v as cn,va as Kn,w as dn,wa as Xn,x as pn,xa as hn,ya as Dn,za as Pn}from"./chunks/chunk-VAZ25MDX.js";import{K as qt,L as zt,M as Bt,N as Et,O as Gt,P as Ht,Q as Jt,T as Qt,U as Tt,W as Ut,X as Vt,Y as Yt,_ as Zt,b as ht,c as Dt,ca as tn,d as Pt,e as Mt,f as bt,g as wt,h as Nt,i as _t,j as jt,k as kt,l as At,m as Ot,n as Rt,o as St,p as vt,q as It,s as Lt,t as Wt,u as Ft,v as $t}from"./chunks/chunk-M7TCFYTO.js";import"./chunks/chunk-WW2O2DEP.js";import"./chunks/chunk-ZG4DMYBS.js";import"./chunks/chunk-URC6ZI6P.js";import"./chunks/chunk-PA76WUBL.js";import"./chunks/chunk-4WIODYOH.js";import"./chunks/chunk-I4TPQEJN.js";import"./chunks/chunk-Y4WOTWUC.js";import"./chunks/chunk-PQ3XUSY2.js";import"./chunks/chunk-UJEMSPM5.js";import"./chunks/chunk-VYKFM3TB.js";import"./chunks/chunk-AWMTNUDS.js";import"./chunks/chunk-F7C7J6IM.js";import"./chunks/chunk-NGHQIGVW.js";import{a}from"./chunks/chunk-ONUPGMER.js";import l from"fs/promises";import c from"path";import x from"os";var u=c.join(x.homedir(),".kodax","commands");function y(){return u}a(y,"getDefaultCommandDir");async function K(e){let n=new Map,o=e??u;try{await l.mkdir(o,{recursive:!0});let r=await l.readdir(o);for(let t of r){let m=c.extname(t),f=t.replace(m,"");if(m===".md"){try{let d=await l.readFile(c.join(o,t),"utf-8"),i=(d.split(`
|
|
3
|
+
`)[0]?.replace(/^#\s*/,"").trim()??"").slice(0,60)||"(prompt command)";n.set(f,{name:f,description:i,content:d,type:"prompt"})}catch{}continue}if(m===".js"||m===".ts")try{let g=await import(c.join(o,t));for(let[i,p]of Object.entries(g))if(i.startsWith("command_")&&typeof p=="function"){let s=i.replace("command_",""),C=p.description??s;n.set(s,{name:s,description:String(C).slice(0,60),content:`[Programmable command: ${s}]`,type:"programmable",execute:p})}}catch{}}}catch{}return n}a(K,"loadCommands");async function X(e,n,o,r){let t=o.get(e);return t?t.type==="prompt"?n?t.content.replace(/{args}/g,n):t.content:t.type==="programmable"&&t.execute?t.execute({args:n,runAgent:r}):null:null}a(X,"processCommandCall");function h(e){if(!e.startsWith("/"))return null;let n=e.slice(1).trim();if(!n)return null;let o=n.search(/\s/);if(o===-1)return[n];let r=n.slice(0,o),t=n.slice(o).trim();return t?[r,t]:[r]}a(h,"parseCommandCall");export{zn as App,Mn as AutocompleteContextProvider,Xn as BUILTIN_COMMANDS,fo as BackgroundTaskBar,ht as CONFIG_TEMPLATES,Co as ChildActivitySurface,ee as ConsoleCapturer,dt as DEFAULT_UI_STATE,so as DialogSurface,Rn as DotsIndicator,xt as FILE_MODIFICATION_TOOLS,xe as FileSessionStorage,En as FullscreenTranscriptLayout,Ln as HistoryItemRenderer,kn as InputPrompt,At as IntegrationConfigController,u as KODAX_COMMANDS_DIR,St as KODAX_CONFIG_FILE,Ot as KODAX_DIR,Et as KODAX_EXAMPLE_CONFIG_FILE,Gt as KODAX_INTEGRATION_EXAMPLE_FILES,Rt as KODAX_SESSIONS_DIR,Ft as KODAX_VERSION,ft as KeyMatchers,ct as KeypressHandlerPriority,ot as KeypressParser,lt as KeypressProvider,L as LRUCache,In as LoadingIndicator,ko as MemorySessionStorage,Gn as MessageActions,Wn as MessageList,Hn as MessageSelector,po as NotificationsSurface,gt as PERMISSION_MODES,vt as PREVIEW_MAX_LENGTH,To as PendingInputsIndicator,Sn as ProgressIndicator,Qn as PromptComposer,Vn as PromptFooter,Tn as PromptFooterLeftSide,Un as PromptFooterRightSide,Yn as PromptHelpMenu,io as PromptSuggestionsSurface,co as QueuedCommandsSurface,Bn as SimpleApp,An as SimpleInputPrompt,Fn as SimpleMessageDisplay,qn as SimpleStatusBar,tt as SingleLineTextInput,On as Spinner,uo as StashNotice,$n as StatusBar,lo as StatusNoticesSurface,yo as StreamingProvider,mt as StreamingState,mo as SuggestionsDisplay,st as TOOL_STATUS_ICONS,_n as TextBuffer,Z as TextInput,vn as ThinkingIndicator,Jo as ToolCallDisplay,it as ToolCallStatus,Qo as ToolGroup,Ho as ToolProgressBar,Go as ToolStatusBadge,Jn as TranscriptViewport,oo as UIStateProvider,wo as _resetQueuedPromptsCacheForTests,Pe as appendClientNotice,je as archiveSession,jo as bootstrapAutoMode,J as calculateVisualCursorFromLayout,H as calculateVisualLayout,cn as collectBashWriteTargets,Ke as compactSession,yt as computeConfirmTools,Bo as createCliEvents,to as createHistoryItem,No as createInteractiveContext,Eo as createJsonEvents,Po as createKeyMatcher,pt as createKeypressManager,Ao as createMemorySessionStorage,Fo as createRecoveryHistoryItem,Lo as createRetryHistoryItem,Oe as createSessionManager,xo as createStreamingManager,no as createToolCall,Q as darkTheme,ye as dedupeSessions,_e as deleteSession,oe as detectTerminalCapabilities,j as detectTerminalHostProfile,_ as detectTerminalRenderHost,$o as emitRecoveryHistoryItem,Wo as emitRetryHistoryItem,Jt as ensureExampleConfigFile,Ht as ensureExampleConfigFiles,Pn as executeCommand,Oo as executeShellCommand,fn as extractHistorySeedsFromMessage,gn as extractHistorySeedsFromMessages,Cn as extractTextContent,xn as extractTitle,Me as forkSession,yn as formatMessagePreview,Zn as generateId,rn as generateSavePattern,dn as getBashOutsideProjectWriteRisk,q as getCharAtCodePoint,W as getCodePointLength,hn as getCommandRegistry,Dt as getConfigTemplate,ce as getCustomProviderConfig,y as getDefaultCommandDir,Zt as getGitRoot,at as getKeyDisplayName,ue as getMcpServerConfig,pn as getPlanModeBlockReason,qt as getProviderList,$t as getProviderModel,S as getTerminalHostCapabilities,te as getTerminalWidth,V as getTheme,Y as getThemeNames,Wt as getVersion,$ as getVisualWidth,G as getVisualWidthCached,P as hasCursorUpViewportYankRisk,b as hasMainScreenRenderScrollRisk,It as hydrateProcessEnvFromShell,an as isAlwaysConfirmPath,nn as isBashReadCommand,on as isBashWriteCommand,I as isClassicReplForced,mn as isCommandOnProtectedPath,et as isFunctionKey,v as isOwnedRendererPreferred,sn as isPathInsideProject,Kt as isPermissionMode,rt as isPrintable,zt as isProviderConfigured,M as isRemoteConptyHost,ne as isScreenReader,Ro as isShellCommand,So as isShellCommandSuccess,w as isTmuxControlMode,en as isToolCallAllowed,D as isVsCodeTerminalHostEnv,F as isWideChar,se as listCustomProviders,le as listMcpServers,Kn as listRegisteredCommands,Ne as listRunningSessions,Xe as listSessions,K as loadCommands,Bt as loadConfig,De as loadFullTranscript,he as loadSession,go as measureChildActivitySurfaceRows,jt as migrateLegacyIntegrationConfig,T as minimalTheme,Xt as normalizePermissionMode,Dn as parseCommand,h as parseCommandCall,Mt as parseExtensionsIntegrationDocument,nt as parseKeypress,Pt as parseMcpIntegrationDocument,Ct as permissionModeDisplayName,_t as planLegacyIntegrationMigration,Qt as prepareRuntimeConfig,X as processCommandCall,ie as processSpecialSyntax,tn as rateLimitedCall,Nt as readExtensionsIntegration,wt as readMcpIntegration,Lt as registerConfiguredCustomProviders,pe as removeCustomProvider,ge as removeMcpServer,N as resetTmuxControlModeProbeForTesting,k as resolveConfiguredTuiRendererMode,A as resolveEffectiveTuiRendererMode,R as resolveFullscreenPolicy,bt as resolveIntegrationConfigPath,O as resolveInteractiveSurfacePreference,Yt as resolveRuntimeEffortSelection,Vt as resolveRuntimeModelSelection,Ut as resolveRuntimeProviderSelection,Io as restoreHistoryItemsFromSession,be as rewindSession,qo as runInkInteractiveMode,me as runInteractiveMode,zo as runSessionPicker,Tt as saveConfig,ln as seedToHistoryItem,we as setActiveEntry,z as splitByCodePoints,Vo as supports256Colors,Zo as supportsEmoji,Uo as supportsTrueColor,Yo as supportsUnicode,U as themes,un as toolCallSeedToHistoryToolCall,_o as touchContext,vo as trimPersistedUiHistorySnapshot,B as truncateByVisualWidth,ke as unarchiveSession,de as upsertCustomProvider,fe as upsertMcpServer,wn as useAutocomplete,bn as useAutocompleteContext,Nn as useInputHistory,Do as useKeypress,ut as useKeypressManager,bo as useQueuedPromptContents,Mo as useQueuedPrompts,ho as useStreaming,Xo as useStreamingActions,Ko as useStreamingState,jn as useTextBuffer,ao as useUI,ro as useUIActions,eo as useUIState,Ce as validateMcpServerConfig,E as visualWidthCache,Ae as watchSessions,re as withCapture,ae as withCaptureSync,kt as writeIntegrationDocument};
|