@kodax-ai/kodax 0.7.61 → 0.7.63
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 +115 -1
- package/README.md +2 -2
- package/README_CN.md +2 -2
- package/dist/chunks/{agent-E74WVAFR.js → agent-SL444XLN.js} +1 -1
- package/dist/chunks/argument-completer-EN63ZVJK.js +2 -0
- package/dist/chunks/{chunk-XHOPSZVL.js → chunk-4MIHVNB7.js} +96 -96
- package/dist/chunks/chunk-7MPU7TP6.js +624 -0
- package/dist/chunks/{chunk-QCBKLNN5.js → chunk-HP4FXMEM.js} +2 -2
- package/dist/chunks/{chunk-CGGX3FXE.js → chunk-KCFVGXVK.js} +1 -1
- package/dist/chunks/chunk-KHICMJIR.js +310 -0
- package/dist/chunks/{chunk-KIVYMSRH.js → chunk-L3MF5V64.js} +1 -1
- package/dist/chunks/chunk-LGR7ACBQ.js +326 -0
- package/dist/chunks/{chunk-7COB3EKF.js → chunk-RR7W7UF6.js} +152 -152
- package/dist/chunks/chunk-UGTK2JIJ.js +731 -0
- package/dist/chunks/{chunk-2OEKUAV4.js → chunk-VSWROENP.js} +1 -1
- package/dist/chunks/{compaction-config-GESEZQVA.js → compaction-config-4VIONMFB.js} +1 -1
- package/dist/chunks/{construction-bootstrap-OSXHEIBB.js → construction-bootstrap-EFZBONTK.js} +3 -3
- package/dist/chunks/dist-EDF2YUF6.js +2 -0
- package/dist/chunks/host-J4HPDLFC.js +2 -0
- package/dist/chunks/{run-manager-FGCG7DFF.js → run-manager-ZVSW2OWM.js} +1 -1
- package/dist/chunks/{utils-47QI5MSP.js → utils-5HDLYTZJ.js} +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +2 -2
- package/dist/kodax_cli.js +970 -937
- package/dist/sdk-agent.d.ts +67 -8
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +425 -464
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-repl.d.ts +9 -9
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-session.d.ts +4 -4
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-e1LD2IRl.d.ts → bash-prefix-extractor.d-CZW9fRoa.d.ts} +137 -11
- package/dist/types-chunks/{guardrail.d-CdqJwwN7.d.ts → guardrail.d-MR6LwMB2.d.ts} +2 -2
- package/dist/types-chunks/{process.d-C93UMgPK.d.ts → process.d-CY2g03Mb.d.ts} +274 -15
- package/dist/types-chunks/{run-manager.d-DHPlNYkK.d.ts → run-manager.d-CYTnWhZY.d.ts} +6 -17
- package/dist/types-chunks/{sdk-session-DINrM1pF.d.ts → sdk-session-RBSBBKol.d.ts} +8 -6
- package/dist/types-chunks/{storage.d-xiw7Vgx0.d.ts → storage.d-C6kkAEch.d.ts} +2 -2
- package/dist/types-chunks/{types.d-CSZAMmU-.d.ts → types.d-1CnTg7Sd.d.ts} +1 -1
- package/dist/types-chunks/{utils.d-Dy19-1XR.d.ts → utils.d-C14jZ9ZM.d.ts} +4 -4
- package/package.json +1 -1
- package/dist/chunks/argument-completer-BBFYCVTM.js +0 -2
- package/dist/chunks/chunk-4NSOBQCU.js +0 -322
- package/dist/chunks/chunk-D7CC6YZC.js +0 -600
- package/dist/chunks/chunk-NJW2LQOP.js +0 -722
- package/dist/chunks/chunk-PJXKBM3Y.js +0 -310
- package/dist/chunks/dist-W3OOJP66.js +0 -2
- package/dist/chunks/host-FRQXOEHH.js +0 -2
package/dist/sdk-coding.d.ts
CHANGED
|
@@ -1,29 +1,316 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a8 as KodaXWireReasoningEffort, a0 as KodaXToolDefinition, a2 as KodaXToolResultContentItem, j as KodaXMessage, a5 as KodaXToolUseBlock, c as KodaXContentBlock, o as KodaXProviderCapabilityProfile, A as KodaXReasoningCapability, E as KodaXReasoningMode, U as KodaXTaskType, e as KodaXExecutionMode, T as KodaXTaskRoutingDecision, Z as KodaXThinkingDepth, $ as KodaXTokenUsage } from './types-chunks/types.d-Bp4Lm1jv.js';
|
|
2
2
|
export { b as KodaXChildFanoutClass, d as KodaXCustomProviderConfig, h as KodaXImageBlock, k as KodaXModelDescriptor, m as KodaXNormalizedReasoningRequest, n as KodaXProtocolFamily, p as KodaXProviderConfig, r as KodaXProviderConversationSemantics, u as KodaXProviderMcpSupport, x as KodaXProviderStreamOptions, z as KodaXProviderTransport, B as KodaXReasoningEffortPreset, C as KodaXReasoningEffortRequest, D as KodaXReasoningEffortWireStrategy, F as KodaXReasoningProfile, G as KodaXReasoningRequest, H as KodaXRedactedThinkingBlock, I as KodaXReviewScale, J as KodaXRiskLevel, L as KodaXStableEffortIntent, M as KodaXStreamResult, O as KodaXTaskBudgetOverrides, R as KodaXTaskResultMetadata, S as KodaXTaskResultSource, W as KodaXTextBlock, X as KodaXThinkingBlock, Y as KodaXThinkingBudgetMap, _ as KodaXThinkingWireStrategy, a1 as KodaXToolResultBlock } from './types-chunks/types.d-Bp4Lm1jv.js';
|
|
3
3
|
export { K as KODAX_DEFAULT_PROVIDER, b as KODAX_PROVIDERS, c as KODAX_PROVIDER_SNAPSHOTS, d as KODAX_REASONING_MODE_SEQUENCE, f as KODAX_STABLE_EFFORT_INTENTS, g as KodaXAnthropicCompatProvider, h as KodaXError, i as KodaXModelCapabilities, k as KodaXOpenAICompatProvider, l as KodaXProviderError, m as KodaXRateLimitError, P as ProviderName, R as ResolveWireEffortInput, o as ResolvedWireEffort, q as clearRuntimeModelProviders, r as createCustomProvider, s as effortToLegacyReasoningMode, t as getAvailableProviderNames, u as getCustomModelCapabilities, v as getCustomProvider, w as getCustomProviderList, x as getCustomProviderModelDescriptors, y as getCustomProviderModels, z as getCustomProviderNames, B as getModelCapabilities, C as getProvider, D as getProviderConfiguredCapabilityProfile, E as getProviderConfiguredReasoningCapability, F as getProviderList, G as getProviderModel, H as getProviderModelDescriptors, I as getProviderModels, L as getRuntimeModelProvider, M as getRuntimeModelProviderNames, N as isCustomProviderName, O as isKnownProvider, Q as isProviderConfigured, S as isProviderName, U as isRuntimeModelProviderName, V as listAllModelCapabilities, W as listBuiltinModelCapabilities, X as listCustomProviderModelCapabilities, _ as mapLegacyReasoningModeToEffortIntent, $ as normalizeReasoningEffortValue, a1 as parseReasoningEffortEnv, a2 as registerCustomProviders, a3 as registerModelProvider, a4 as resolveModelCapabilities, a5 as resolveProvider, a6 as resolveProviderModelDescriptors, a7 as resolveReasoningEffort, a8 as resolveReasoningEffortForModelSwitch, aa as resolveWireEffort, ab as validateCustomProviderConfig } from './types-chunks/resolver.d-CGkfRULj.js';
|
|
4
4
|
import { a as CostTracker } from './types-chunks/cost-tracker.d-CBLk1fiD.js';
|
|
5
5
|
export { K as KodaXLlmTimeoutConfig, p as parseTimeoutSecEnvMs, t as timeoutSecToMs } from './types-chunks/cost-tracker.d-CBLk1fiD.js';
|
|
6
6
|
import { K as KodaXBaseProvider } from './types-chunks/base.d-DalIRhbb.js';
|
|
7
7
|
import { C as CapabilityKind, a as CapabilityProvider, b as CapabilityResult } from './types-chunks/capability.d-3C62G8Eq.js';
|
|
8
|
-
import {
|
|
9
|
-
export { B as BASH_POLICY_SPEC, a as BashPrefixExtractor, b as BashPrefixResult, C as CapabilityRuntimeContract, e as CreateBashPrefixExtractorOptions, D as DiagnosticsRequest, f as ExtractCommandPrefixOptions, G as GoalBlockedResult, h as GoalCreateInput, i as GoalLifecycleContext, j as GoalRuntimeBinding, k as GoalRuntimeBindingDeps, l as GoalToolsContext, K as KodaXActivityEventMeta, m as KodaXAgentMode, n as KodaXAgentProfile,
|
|
8
|
+
import { aq as KodaXToolExecutionContext, aX as ToolSideEffect, o as KodaXAgentScope, V as KodaXRepoIntelligenceCapability, Y as KodaXRepoIntelligenceTrace, W as KodaXRepoIntelligenceMode, X as KodaXRepoIntelligenceResolvedMode, _ as KodaXRepoRoutingSignals, R as KodaXOptions, v as KodaXContextOptions, U as KodaXProviderPolicyHints, aI as ProviderResilienceConfig, aJ as ProviderResiliencePolicy, F as FailureStage, aO as ResilienceClassification, aG as ProviderExecutionState, aL as RecoveryDecision, aN as RecoveryResult, $ as KodaXResult, a3 as KodaXSessionControl, a4 as KodaXSessionMutators, H as KodaXManagedProtocolPayload, E as ExtensionRuntimeContract, aT as RuntimeDefaultsSnapshot, c as BoundExtensionRuntimeController, y as KodaXEvents, g as GoalCompleteResult, aQ as ResolveKodaXManualInput, aR as ResolveKodaXManualOptions, aS as ResolveKodaXManualResult, O as KodaXManualTopicId, N as KodaXManualTopic, d as ChildSnapshotEvent, s as KodaXChildContextBundle, t as KodaXChildExecutionResult, aY as WorkflowHostPolicy, ao as KodaXTimeoutConfig } from './types-chunks/bash-prefix-extractor.d-CZW9fRoa.js';
|
|
9
|
+
export { B as BASH_POLICY_SPEC, a as BashPrefixExtractor, b as BashPrefixResult, C as CapabilityRuntimeContract, e as CreateBashPrefixExtractorOptions, D as DiagnosticsRequest, f as ExtractCommandPrefixOptions, G as GoalBlockedResult, h as GoalCreateInput, i as GoalLifecycleContext, j as GoalRuntimeBinding, k as GoalRuntimeBindingDeps, l as GoalToolsContext, K as KodaXActivityEventMeta, m as KodaXAgentMode, n as KodaXAgentProfile, p as KodaXBudgetDisclosureZone, q as KodaXBudgetExtensionRequest, r as KodaXChildAgentResult, u as KodaXCompactionOverride, w as KodaXContextTokenSnapshot, x as KodaXEffectiveTaskConfig, z as KodaXLiveEventMeta, A as KodaXManagedBudgetSnapshot, I as KodaXManagedTask, J as KodaXManagedTaskRuntimeState, L as KodaXManagedTaskStatusEvent, M as KodaXManualSource, P as KodaXManualTopicInput, Q as KodaXMemoryStrategy, S as KodaXOrchestrationVerdict, T as KodaXParentReductionContract, Z as KodaXRepoIntelligenceTraceEvent, a0 as KodaXRoleRoundSummary, a1 as KodaXRuntimeVerificationContract, a2 as KodaXSelfManualConfig, a5 as KodaXSessionOptions, a6 as KodaXSidecarMessageEvent, a7 as KodaXSkillDynamicContextPolicy, a8 as KodaXSkillInvocationContext, a9 as KodaXSkillMap, aa as KodaXSkillProjectionConfidence, ab as KodaXTaskCapabilityHint, ac as KodaXTaskContract, ad as KodaXTaskEvidenceArtifact, ae as KodaXTaskEvidenceBundle, af as KodaXTaskEvidenceEntry, ag as KodaXTaskRole, ah as KodaXTaskRoleAssignment, ai as KodaXTaskStatus, aj as KodaXTaskSurface, ak as KodaXTaskToolPolicy, al as KodaXTaskVerificationContract, am as KodaXTaskVerificationCriterion, an as KodaXTaskWorkItem, ap as KodaXToolEventMeta, ar as KodaXToolVisibilityMeta, as as KodaXToolVisibilityPolicy, at as KodaXTurnCompletedEvent, au as KodaXTurnDeliveryKind, av as KodaXTurnFailedEvent, aw as KodaXTurnStartedEvent, ax as KodaXVerificationScorecard, ay as KodaXVerificationScorecardCriterion, az as KodaXWorkflowAgentDigestEvent, aA as KodaXWorkflowEventMeta, aB as KodaXWorkflowTimeoutConfig, aC as LSP_SERVERS, aD as LspServerInfo, aE as LspService, aF as LspServiceConfig, aH as ProviderRecoveryEvent, aK as RecoveryAction, aM as RecoveryLadderStep, aP as ResilienceErrorClass, aU as TodoItem, aV as TodoList, aW as TodoStatus, aZ as WorkflowInvocationAction, a_ as WorkflowInvocationPolicyDecision, a$ as WorkflowInvocationPolicyInput, b0 as WorkflowInvocationSource, b1 as WorkflowRunProgressView, b2 as WorkflowStartOutcome, b3 as WorkflowToolHost, b4 as WorkflowToolHostInlineInput, b5 as WorkflowToolHostResult, b6 as WorkflowToolHostStartResult, b7 as buildGoalRuntimeBinding, b8 as createBashPrefixExtractor, b9 as decideWorkflowInvocation, ba as drainPendingSwaps, bb as extractCommandPrefix, bc as getDefaultLspService, bd as hasPendingSwap, be as makeDisabledGoalToolsContext, bf as providerResilienceConfigFromTimeouts, bg as resolveConstructedAgent, bh as shutdownDefaultLspService, bi as withGoalBeforeNextTurn, bj as withGoalStopHook, bk as workflowStartOutcomeConsumesTurn } from './types-chunks/bash-prefix-extractor.d-CZW9fRoa.js';
|
|
10
10
|
export { CreateFileArtifactFromPathOptions, CreateImageArtifactFromPathOptions, CreateVideoArtifactFromPathOptions, EnqueueWithArtifactsInput, GetModelInputCapabilitiesInput, ImageResizeError, KODAX_FILE_MEDIA_TYPES, KODAX_IMAGE_MEDIA_TYPES, KODAX_VIDEO_MEDIA_TYPES, KodaXInputCapabilityStatus, KodaXMediaError, KodaXMediaErrorCode, KodaXMediaErrorOptions, KodaXModalityInputCapability, MAX_DIMENSION, ModelInputCapabilities, NormalizeImageOptions, NormalizedImage, PASTE_TMP_DIR_ENV, PASTE_TMP_TTL_MS, PersistImageAsBlockOptions, TARGET_RAW_SIZE_BYTES, ValidateInputArtifactsOptions, createFileArtifactFromPath, createImageArtifactFromPath, createVideoArtifactFromPath, enqueueWithArtifacts, getModelInputCapabilities, inferImageMediaType, inferVideoMediaType, normalizePastedImage, persistImageAsBlock, prunePasteTmpDir, readAndNormalizeClipboardImage, readClipboardImage, validateInputArtifactsForModel } from './sdk-media.js';
|
|
11
|
-
import {
|
|
12
|
-
export {
|
|
13
|
-
import { y as MessageQueue, X as WorkflowScriptManifest, F as WorkflowCapsule, I as WorkflowCapsuleIntent, H as WorkflowCapsuleInputs, N as WorkflowCapsuleRequirements, J as WorkflowCapsuleProvenance, w as ManagedWorkflowSnapshot$1, V as WorkflowRunManager$1, R as WorkflowQualityLintFinding, O as WorkflowPatternId } from './types-chunks/run-manager.d-
|
|
14
|
-
export { C as CompactionContext, a as CompactionEntry, b as CompactionEntryPayload, c as CompactionPolicy, D as DefaultSummaryCompaction, e as DefaultSummaryCompactionOptions, K as KODAX_API_MIN_INTERVAL, f as KODAX_DEFAULT_TIMEOUT, g as KODAX_HARD_TIMEOUT, h as KODAX_MAX_INCOMPLETE_RETRIES, j as KODAX_MAX_RETRIES, k as KODAX_MAX_TOKENS, l as KODAX_RETRY_BASE_DELAY, m as KODAX_STAGGER_DELAY, L as LINEAGE_ENTRY_TYPES, n as LineageArtifactLedgerPayload, o as LineageCompaction, p as LineageCompactionDelegates, q as LineageEntryType, r as LineageExtension, s as LineageLabelPayload, t as LineageTreeNode, x as ManagedWorkflowStatus, P as PROMISE_PATTERN, Y as appendSessionLineageLabel, $ as applySessionCompaction, a0 as archiveOldIslands, a2 as buildSessionTree, a4 as cleanupIncompleteToolCalls, a5 as countActiveLineageMessages, a6 as countTokens, a7 as createSessionLineage, ab as estimateTokens, ac as extractArtifactLedger, ae as extractTitleFromMessages, af as findPreviousUserEntryId, ag as forkSessionLineage, ah as generateSessionId, ai as getAgentConfigHome, aj as getAgentConfigPath, ak as getAppDataDir, an as getSessionLineagePath, ao as getSessionMessagesFromLineage, aq as mergeArtifactLedger, as as resolveSessionLineageTarget, at as rewindSessionLineage, au as setAgentConfigHome, av as setSessionLineageActiveEntry, aw as validateAndFixToolHistory } from './types-chunks/run-manager.d-
|
|
11
|
+
import { h as AgentMessage, f as Agent, bp as RunnerLlmReturn, a4 as KodaXJsonValue, U as KodaXExtensionSessionRecord, W as KodaXExtensionStore, a2 as KodaXInputArtifact, bx as SessionErrorMetadata, bb as QualityInvariant, bT as ToolCapability, bl as RunnableTool, bq as RunnerToolCall, _ as KodaXGoalState, c5 as WorkflowEventCorrelation, J as Guardrail, cE as WorkflowTaskSummaryEventUpdate, b_ as WorkflowAgentBackend, cd as WorkflowModule, ct as WorkflowProcessTrackerOptions, c4 as WorkflowEvent, c2 as WorkflowArtifactRef, cb as WorkflowMeta, cv as WorkflowRunState, c0 as WorkflowApproval, ch as WorkflowProcessEvent, c1 as WorkflowApprovalSummary, c9 as WorkflowLimits, cn as WorkflowProcessSnapshot } from './types-chunks/process.d-CY2g03Mb.js';
|
|
12
|
+
export { j as AgentReasoningProfile, l as AgentTool, m as AskUserAnswer, n as AskUserCustomInputAnswer, o as AskUserMultiOptions, p as AskUserQuestionItem, q as AskUserQuestionOptions, r as AskUserSelectionAnswer, s as CompactionAnchor, v as CompactionResult, x as CompactionUpdate, L as Handoff, N as InMemorySessionOptions, S as KodaXCompactMemoryProgress, T as KodaXCompactMemorySeed, V as KodaXExtensionSessionState, Y as KodaXFileInputArtifact, a0 as KodaXImageInputArtifact, a1 as KodaXImageMediaType, a3 as KodaXInputArtifactSource, a6 as KodaXSessionArtifactLedgerEntry, a7 as KodaXSessionBranchSummaryEntry, a9 as KodaXSessionCompactionEntry, aa as KodaXSessionData, ab as KodaXSessionEntry, ac as KodaXSessionEntryBase, ae as KodaXSessionLabelEntry, af as KodaXSessionLineage, ag as KodaXSessionMessageEntry, ah as KodaXSessionMeta, ai as KodaXSessionNavigationOptions, ak as KodaXSessionRuntimeInfo, al as KodaXSessionScope, am as KodaXSessionStorage, an as KodaXSessionTreeNode, ao as KodaXSessionUiHistoryItem, ap as KodaXSessionUiHistoryItemType, aq as KodaXSessionUiTextHistoryItem, ar as KodaXSessionUiTextHistoryItemType, as as KodaXSessionUiToolCall, at as KodaXSessionUiToolCallStatus, au as KodaXSessionUiToolGroupHistoryItem, av as KodaXSessionWorkspaceKind, aw as KodaXVideoInputArtifact, ax as KodaXVideoMediaType, b6 as MessageEntry, b9 as PresetDispatcher, be as ReasoningDepth, bi as RunEvent, bj as RunOptions, bk as RunResult, bm as Runner, bu as Session, bw as SessionEntry, by as SessionExtension, bz as SessionForkOptions, cR as createAgent, cS as createHandoff, cT as createInMemorySession, d9 as registerPresetDispatcher } from './types-chunks/process.d-CY2g03Mb.js';
|
|
13
|
+
import { y as MessageQueue, X as WorkflowScriptManifest, F as WorkflowCapsule, I as WorkflowCapsuleIntent, H as WorkflowCapsuleInputs, N as WorkflowCapsuleRequirements, J as WorkflowCapsuleProvenance, w as ManagedWorkflowSnapshot$1, V as WorkflowRunManager$1, R as WorkflowQualityLintFinding, O as WorkflowPatternId } from './types-chunks/run-manager.d-CYTnWhZY.js';
|
|
14
|
+
export { C as CompactionContext, a as CompactionEntry, b as CompactionEntryPayload, c as CompactionPolicy, D as DefaultSummaryCompaction, e as DefaultSummaryCompactionOptions, K as KODAX_API_MIN_INTERVAL, f as KODAX_DEFAULT_TIMEOUT, g as KODAX_HARD_TIMEOUT, h as KODAX_MAX_INCOMPLETE_RETRIES, j as KODAX_MAX_RETRIES, k as KODAX_MAX_TOKENS, l as KODAX_RETRY_BASE_DELAY, m as KODAX_STAGGER_DELAY, L as LINEAGE_ENTRY_TYPES, n as LineageArtifactLedgerPayload, o as LineageCompaction, p as LineageCompactionDelegates, q as LineageEntryType, r as LineageExtension, s as LineageLabelPayload, t as LineageTreeNode, x as ManagedWorkflowStatus, P as PROMISE_PATTERN, Y as appendSessionLineageLabel, $ as applySessionCompaction, a0 as archiveOldIslands, a2 as buildSessionTree, a4 as cleanupIncompleteToolCalls, a5 as countActiveLineageMessages, a6 as countTokens, a7 as createSessionLineage, ab as estimateTokens, ac as extractArtifactLedger, ae as extractTitleFromMessages, af as findPreviousUserEntryId, ag as forkSessionLineage, ah as generateSessionId, ai as getAgentConfigHome, aj as getAgentConfigPath, ak as getAppDataDir, an as getSessionLineagePath, ao as getSessionMessagesFromLineage, aq as mergeArtifactLedger, as as resolveSessionLineageTarget, at as rewindSessionLineage, au as setAgentConfigHome, av as setSessionLineageActiveEntry, aw as validateAndFixToolHistory } from './types-chunks/run-manager.d-CYTnWhZY.js';
|
|
15
15
|
import { b as McpServersConfig } from './types-chunks/config.d-CJy1WENT.js';
|
|
16
16
|
export { M as McpConnectMode, a as McpServerConfig, c as McpTransportKind } from './types-chunks/config.d-CJy1WENT.js';
|
|
17
17
|
import { k as McpProviderOptions, c as McpCapabilityProvider, l as McpReverseCapabilities, m as McpRoot } from './types-chunks/manager.d-DBD7SOTT.js';
|
|
18
18
|
export { A as AuthorizationServerMetadata, D as DiscoveredOAuthEndpoints, M as McpAuthRequiredError, a as McpCapabilityDescriptor, b as McpCapabilityKind, d as McpCapabilityRisk, e as McpCatalogItem, f as McpElicitRequest, g as McpElicitResult, h as McpExpiredSessionError, i as McpIcon, j as McpManager, n as McpSamplingRequest, o as McpSamplingResult, p as McpServerCatalog, q as McpServerCatalogSnapshot, r as McpServerLogs, s as McpServerRuntime, t as McpServerRuntimeDiagnostics, u as McpServerStatus, v as McpServerToolList, w as McpToolTaskSupport, x as McpTransport, y as McpTransportEvents, O as OAuthClientInfo, z as OAuthLoginConsent, P as PerformOAuthLoginOptions, B as ProtectedResourceMetadata, W as WwwAuthenticateChallenge, C as buildInitializeCapabilities, E as createMcpCapabilityId, F as createMcpManager, G as createMcpTransport, H as defaultMcpCacheDir, I as discoverAuthorizationServerMetadata, J as discoverOAuthEndpoints, K as discoverProtectedResourceMetadata, L as extractInsufficientScope, N as extractResourceMetadataUrl, Q as getMcpCachePaths, R as loadValidToken, S as normalizeMcpCapabilityId, T as parseMcpCapabilityId, U as performOAuthLogin, V as registerOAuthClient, X as searchMcpCatalog } from './types-chunks/manager.d-DBD7SOTT.js';
|
|
19
|
-
import { h as AutoRules, T as ToolCallSignal, S as SignalCollector } from './types-chunks/guardrail.d-
|
|
20
|
-
export { C as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD, i as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD, A as AgentsFile, a as AutoModeAskUser, b as AutoModeAskUserVerdict, D as AutoModeDenialTracker, c as AutoModeEngine, d as AutoModeGuardrailConfig, e as AutoModeSharedState, f as AutoModeStats, g as AutoModeToolGuardrail, E as BREAKER_ERROR_THRESHOLD, W as BREAKER_WINDOW_MS, j as CircuitBreaker, K as KodaXMcpConnectMode, k as KodaXMcpServerConfig, l as KodaXMcpServersConfig, m as KodaXMcpTransport, L as LoadAgentsOptions, n as LoadedRulesSource, R as RulesLoadError, o as RulesLoadResult, p as SkippedRulesSource, q as TrustState, J as autoModeDenialShouldFallback, M as breakerShouldFallback, r as collectAllSignals, s as computeRulesFingerprint, v as createAutoModeDenialTracker, t as createAutoModeToolGuardrail, u as createCircuitBreaker, w as formatAgentsForPrompt, x as getKodaxGlobalDir, y as loadAgentsFiles, z as loadAutoRules, B as parseAutoRules, F as readTrustState, G as recordAutoModeAllow, H as recordAutoModeBlock, I as recordBreakerError, N as trustProjectRules } from './types-chunks/guardrail.d-
|
|
21
|
-
import { g as ToolGuardrail } from './types-chunks/types.d-
|
|
19
|
+
import { h as AutoRules, T as ToolCallSignal, S as SignalCollector } from './types-chunks/guardrail.d-MR6LwMB2.js';
|
|
20
|
+
export { C as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD, i as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD, A as AgentsFile, a as AutoModeAskUser, b as AutoModeAskUserVerdict, D as AutoModeDenialTracker, c as AutoModeEngine, d as AutoModeGuardrailConfig, e as AutoModeSharedState, f as AutoModeStats, g as AutoModeToolGuardrail, E as BREAKER_ERROR_THRESHOLD, W as BREAKER_WINDOW_MS, j as CircuitBreaker, K as KodaXMcpConnectMode, k as KodaXMcpServerConfig, l as KodaXMcpServersConfig, m as KodaXMcpTransport, L as LoadAgentsOptions, n as LoadedRulesSource, R as RulesLoadError, o as RulesLoadResult, p as SkippedRulesSource, q as TrustState, J as autoModeDenialShouldFallback, M as breakerShouldFallback, r as collectAllSignals, s as computeRulesFingerprint, v as createAutoModeDenialTracker, t as createAutoModeToolGuardrail, u as createCircuitBreaker, w as formatAgentsForPrompt, x as getKodaxGlobalDir, y as loadAgentsFiles, z as loadAutoRules, B as parseAutoRules, F as readTrustState, G as recordAutoModeAllow, H as recordAutoModeBlock, I as recordBreakerError, N as trustProjectRules } from './types-chunks/guardrail.d-MR6LwMB2.js';
|
|
21
|
+
import { g as ToolGuardrail } from './types-chunks/types.d-1CnTg7Sd.js';
|
|
22
22
|
import { Diagnostic } from 'vscode-languageserver-protocol';
|
|
23
23
|
import '@anthropic-ai/sdk';
|
|
24
24
|
import 'openai';
|
|
25
25
|
import './types-chunks/types.d-vJExiRje.js';
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* KodaX Constructed-World types (FEATURE_087, v0.7.28).
|
|
29
|
+
*
|
|
30
|
+
* Runtime-generated capabilities (tools / agents / skills / ...) live in
|
|
31
|
+
* `.kodax/constructed/` and are loaded into the same registries as builtin
|
|
32
|
+
* primitives. v0.7.28 only ships tool generation (FEATURE_088); other kinds
|
|
33
|
+
* land in FEATURE_089 / FEATURE_090.
|
|
34
|
+
*
|
|
35
|
+
* Cross-references:
|
|
36
|
+
* - DD §14 — lifecycle, security model, registry merge semantics.
|
|
37
|
+
* - docs/features/v0.7.28.md — capability schema, generation flow.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Handler script source. v0.7.28 limits language to `'javascript'` so that
|
|
42
|
+
* `loadHandler()` can `await import()` the file directly without an
|
|
43
|
+
* intermediate TS → JS compile step (no esbuild / tsx dependency).
|
|
44
|
+
*
|
|
45
|
+
* TypeScript handlers are explicitly out of scope; Coding Agent generates
|
|
46
|
+
* JS strings on the wire.
|
|
47
|
+
*/
|
|
48
|
+
interface ScriptSource {
|
|
49
|
+
readonly kind: 'script';
|
|
50
|
+
readonly language: 'javascript';
|
|
51
|
+
readonly code: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Capability declaration.
|
|
55
|
+
*
|
|
56
|
+
* v0.7.28 ships the single-dimension form: a whitelist of builtin tool
|
|
57
|
+
* names that the handler may invoke through `ctx.tools.<name>(...)`.
|
|
58
|
+
* All I/O — fs / net / env — must flow through builtin tools (`read` /
|
|
59
|
+
* `write` / `bash` / etc.); handlers do not receive direct `ctx.fs` /
|
|
60
|
+
* `ctx.net` / `ctx.env` entry points.
|
|
61
|
+
*
|
|
62
|
+
* Forward-compatible evolution: if the future demands path/domain-level
|
|
63
|
+
* constraints, this can grow to `(string | { name; constraints })[]`
|
|
64
|
+
* without breaking existing manifests.
|
|
65
|
+
*/
|
|
66
|
+
interface Capabilities {
|
|
67
|
+
readonly tools: readonly string[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Tool-kind artifact body (the `content` of `ConstructionArtifact` when
|
|
71
|
+
* `kind === 'tool'`).
|
|
72
|
+
*/
|
|
73
|
+
interface ToolContent {
|
|
74
|
+
readonly description: string;
|
|
75
|
+
readonly inputSchema: Record<string, unknown>;
|
|
76
|
+
readonly capabilities: Capabilities;
|
|
77
|
+
readonly handler: ScriptSource;
|
|
78
|
+
/**
|
|
79
|
+
* Per-tool timeout override. Defaults to {@link DEFAULT_HANDLER_TIMEOUT_MS}
|
|
80
|
+
* when omitted. Bounded by AbortController in `loadHandler()`.
|
|
81
|
+
*/
|
|
82
|
+
readonly timeoutMs?: number;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Default handler timeout. Picked to match the historical ceiling on
|
|
86
|
+
* builtin streaming tools (30s); revisit if a constructed tool demands
|
|
87
|
+
* longer-running computation.
|
|
88
|
+
*/
|
|
89
|
+
declare const DEFAULT_HANDLER_TIMEOUT_MS = 30000;
|
|
90
|
+
/**
|
|
91
|
+
* Lifecycle state on disk. Drives both the startup glob filter and the
|
|
92
|
+
* `revoke()` semantics. See DD §14.1 — file system is the single source
|
|
93
|
+
* of truth; no separate `_manifest.json` index file (C4 decision).
|
|
94
|
+
*/
|
|
95
|
+
type ArtifactStatus = 'staged' | 'active' | 'revoked';
|
|
96
|
+
/**
|
|
97
|
+
* Reference to a tool by stable id. v0.7.31 (FEATURE_089) introduces
|
|
98
|
+
* Agent manifests that bundle tool refs rather than inline tool bodies;
|
|
99
|
+
* the resolver expands these refs to concrete `KodaXToolDefinition`
|
|
100
|
+
* instances at activate time.
|
|
101
|
+
*
|
|
102
|
+
* `ref` shape:
|
|
103
|
+
* - `builtin:<name>` — a tool from the static registry
|
|
104
|
+
* (e.g. `builtin:read`, `builtin:bash`)
|
|
105
|
+
* - `constructed:<name>@<ver>` — a previously-activated constructed tool
|
|
106
|
+
*/
|
|
107
|
+
interface ToolRef {
|
|
108
|
+
readonly ref: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Reference to a Guardrail by stable id. The Layer A `Guardrail`
|
|
112
|
+
* declaration is name-only (no runtime hooks); resolvers map known
|
|
113
|
+
* names to constructed `ToolGuardrail` / `InputGuardrail` /
|
|
114
|
+
* `OutputGuardrail` instances at activation time.
|
|
115
|
+
*/
|
|
116
|
+
interface GuardrailRef {
|
|
117
|
+
readonly kind: 'input' | 'output' | 'tool';
|
|
118
|
+
readonly ref: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Reference to a handoff target by stable id (another constructed agent
|
|
122
|
+
* or a builtin role). The resolver expands `target.ref` to the actual
|
|
123
|
+
* `Agent` declaration at admission time so the handoff DAG check
|
|
124
|
+
* (`handoffLegality` invariant) sees the full graph.
|
|
125
|
+
*/
|
|
126
|
+
interface AgentHandoffRef {
|
|
127
|
+
readonly target: {
|
|
128
|
+
readonly ref: string;
|
|
129
|
+
};
|
|
130
|
+
readonly kind: 'continuation' | 'as-tool';
|
|
131
|
+
readonly description?: string;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Reasoning profile declaration mirroring the Layer A
|
|
135
|
+
* `AgentReasoningProfile`. Kept structurally identical so the resolver
|
|
136
|
+
* passes the value through without re-shaping.
|
|
137
|
+
*/
|
|
138
|
+
interface AgentReasoningRef {
|
|
139
|
+
readonly default: 'quick' | 'balanced' | 'deep';
|
|
140
|
+
readonly max?: 'quick' | 'balanced' | 'deep';
|
|
141
|
+
readonly escalateOnRevise?: boolean;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Sandbox test case. Used by `sandbox_test_agent` to verify a
|
|
145
|
+
* constructed agent before it can activate. Each case feeds `input`
|
|
146
|
+
* to a sandbox Runner instance and grades the agent's final output:
|
|
147
|
+
*
|
|
148
|
+
* - `expectMatch` — final text must match this regex (string form)
|
|
149
|
+
* - `expectNotMatch` — final text must NOT match this regex
|
|
150
|
+
* - `expectFinalText` — exact substring match (case-sensitive)
|
|
151
|
+
*
|
|
152
|
+
* At least one of the three expect-fields must be present; the cases
|
|
153
|
+
* are graded by `runSandboxAgentTest()` (FEATURE_089 Phase 3.5).
|
|
154
|
+
*/
|
|
155
|
+
interface AgentTestCase {
|
|
156
|
+
readonly id: string;
|
|
157
|
+
readonly input: string;
|
|
158
|
+
readonly expectMatch?: string;
|
|
159
|
+
readonly expectNotMatch?: string;
|
|
160
|
+
readonly expectFinalText?: string;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Agent-kind artifact body (the `content` of `ConstructionArtifact`
|
|
164
|
+
* when `kind === 'agent'`).
|
|
165
|
+
*
|
|
166
|
+
* FEATURE_089 (v0.7.31): all fields except `instructions` are optional;
|
|
167
|
+
* a minimal "echo agent" can be expressed as `{ instructions: '...' }`.
|
|
168
|
+
* Tool / handoff / guardrail refs are resolved at admission time
|
|
169
|
+
* (Runner.admit's 5-step audit expands them and feeds the resolved
|
|
170
|
+
* Agent through the invariant chain).
|
|
171
|
+
*/
|
|
172
|
+
interface AgentContent {
|
|
173
|
+
readonly instructions: string;
|
|
174
|
+
readonly tools?: readonly ToolRef[];
|
|
175
|
+
readonly handoffs?: readonly AgentHandoffRef[];
|
|
176
|
+
readonly reasoning?: AgentReasoningRef;
|
|
177
|
+
readonly guardrails?: readonly GuardrailRef[];
|
|
178
|
+
readonly model?: string;
|
|
179
|
+
readonly provider?: string;
|
|
180
|
+
readonly effort?: KodaXWireReasoningEffort;
|
|
181
|
+
/**
|
|
182
|
+
* FEATURE_191 — one-sentence human-readable summary surfaced in the
|
|
183
|
+
* Worker system prompt's `=== Available specialist agents ===`
|
|
184
|
+
* block (FEATURE_191 A.3) and in `/agents list` UIs. Frontmatter
|
|
185
|
+
* `description` field of `~/.kodax/agents/<name>.md` and the
|
|
186
|
+
* `name`-paired argument of `KodaXExtensionAPI.registerAgent`
|
|
187
|
+
* funnel into this field. Optional for backward compatibility with
|
|
188
|
+
* FEATURE_089 minimal-agent shape (`{ instructions: '...' }`);
|
|
189
|
+
* the SP block renders `(no description)` when absent.
|
|
190
|
+
*/
|
|
191
|
+
readonly description?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Optional structured-output schema mirroring `Agent.outputSchema`.
|
|
194
|
+
* Pure pass-through to the runtime — admission does not validate
|
|
195
|
+
* shape semantics here, only well-formed JSON.
|
|
196
|
+
*/
|
|
197
|
+
readonly outputSchema?: Record<string, unknown>;
|
|
198
|
+
/**
|
|
199
|
+
* Optional sandbox test cases. When present, `sandbox_test_agent`
|
|
200
|
+
* runs them; when absent, the test step performs only the static
|
|
201
|
+
* checks (manifest schema + admission audit).
|
|
202
|
+
*/
|
|
203
|
+
readonly testCases?: readonly AgentTestCase[];
|
|
204
|
+
/**
|
|
205
|
+
* Maximum total budget (iteration count) the agent may consume.
|
|
206
|
+
* Plumbed onto the resolved `AgentManifest.maxBudget` and clamped by
|
|
207
|
+
* `budgetCeiling` invariant during admission.
|
|
208
|
+
*/
|
|
209
|
+
readonly maxBudget?: number;
|
|
210
|
+
/**
|
|
211
|
+
* Voluntary additional invariants the LLM declares this agent
|
|
212
|
+
* commits to. Plumbed onto `AgentManifest.declaredInvariants`;
|
|
213
|
+
* unioned on top of the required set during admission.
|
|
214
|
+
*/
|
|
215
|
+
readonly declaredInvariants?: readonly string[];
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Persisted artifact shape (one JSON file per name/version under
|
|
219
|
+
* `.kodax/constructed/<kind>s/<name>/<version>.json`).
|
|
220
|
+
*
|
|
221
|
+
* Discriminated union over `kind`:
|
|
222
|
+
* - `kind: 'tool'` — v0.7.28 (FEATURE_088) tool generation
|
|
223
|
+
* - `kind: 'agent'` — v0.7.31 (FEATURE_089) agent generation; passes
|
|
224
|
+
* through `Runner.admit()` at activation time
|
|
225
|
+
*
|
|
226
|
+
* Lifecycle fields (status / timestamps / contentHash / sourceAgent /
|
|
227
|
+
* signedBy) are common to all kinds.
|
|
228
|
+
*/
|
|
229
|
+
type ConstructionArtifact = ToolArtifact | AgentArtifact;
|
|
230
|
+
interface ConstructionArtifactBase {
|
|
231
|
+
readonly name: string;
|
|
232
|
+
readonly version: string;
|
|
233
|
+
status: ArtifactStatus;
|
|
234
|
+
readonly signedBy?: string;
|
|
235
|
+
readonly createdAt: number;
|
|
236
|
+
readonly sourceAgent?: string;
|
|
237
|
+
testedAt?: number;
|
|
238
|
+
activatedAt?: number;
|
|
239
|
+
revokedAt?: number;
|
|
240
|
+
/**
|
|
241
|
+
* SHA-256 of `JSON.stringify(content)` captured at activate time.
|
|
242
|
+
* `rehydrateActiveArtifacts()` recomputes and compares — a mismatch
|
|
243
|
+
* indicates the manifest was edited between activation and the next
|
|
244
|
+
* boot (naive cross-session tampering, e.g. an LLM rewriting the .json
|
|
245
|
+
* via the Write tool without recomputing the hash). Mismatched
|
|
246
|
+
* artifacts are skipped at rehydrate with a stderr warning. This is
|
|
247
|
+
* NOT a defense against a coordinated attacker who recomputes the
|
|
248
|
+
* hash; the threat model is single-user CLI integrity, not multi-user
|
|
249
|
+
* supply chain.
|
|
250
|
+
*/
|
|
251
|
+
contentHash?: string;
|
|
252
|
+
}
|
|
253
|
+
interface ToolArtifact extends ConstructionArtifactBase {
|
|
254
|
+
readonly kind: 'tool';
|
|
255
|
+
readonly content: ToolContent;
|
|
256
|
+
}
|
|
257
|
+
interface AgentArtifact extends ConstructionArtifactBase {
|
|
258
|
+
readonly kind: 'agent';
|
|
259
|
+
readonly content: AgentContent;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Returned by {@link ConstructionRuntime.stage}; opaque handle that
|
|
263
|
+
* downstream `test()` / `activate()` calls bind to.
|
|
264
|
+
*/
|
|
265
|
+
interface StagedHandle {
|
|
266
|
+
readonly artifact: ConstructionArtifact;
|
|
267
|
+
readonly stagedAt: number;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Outcome of {@link ConstructionRuntime.test}. `ok=false` blocks
|
|
271
|
+
* activation; `warnings` surface but do not block.
|
|
272
|
+
*/
|
|
273
|
+
interface TestResult {
|
|
274
|
+
readonly ok: boolean;
|
|
275
|
+
readonly errors?: readonly string[];
|
|
276
|
+
readonly warnings?: readonly string[];
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Policy gate — invoked once per `activate()` before the artifact is
|
|
280
|
+
* registered. Default rejects implicit auto-approval; the REPL surface
|
|
281
|
+
* binds a dialog-based policy in `packages/repl/src/common/construction-
|
|
282
|
+
* bootstrap.ts` so user approval flows through the live askUser channel.
|
|
283
|
+
*
|
|
284
|
+
* Modeled as a function type rather than an interface (D3 decision):
|
|
285
|
+
* keeps the contract surface tiny, no class boilerplate.
|
|
286
|
+
*
|
|
287
|
+
* No declarative `kodax.config.ts` override hatch is provided — see the
|
|
288
|
+
* "Deferred Design Decisions" section in `features/v0.7.28.md` for why
|
|
289
|
+
* a `risk_mode` enum (when truly needed) is preferred over user-authored
|
|
290
|
+
* policy functions.
|
|
291
|
+
*/
|
|
292
|
+
type ConstructionPolicy = (artifact: ConstructionArtifact) => Promise<ConstructionPolicyVerdict>;
|
|
293
|
+
type ConstructionPolicyVerdict = 'approve' | 'reject' | 'ask-user';
|
|
294
|
+
/** Default policy: always ask the user; no implicit approvals. */
|
|
295
|
+
declare const defaultPolicy: ConstructionPolicy;
|
|
296
|
+
/**
|
|
297
|
+
* Thrown by `CtxProxy` when handler attempts to access a tool not declared
|
|
298
|
+
* in `capabilities.tools`. Caught in tracer; surfaces as a tool error.
|
|
299
|
+
*/
|
|
300
|
+
declare class CapabilityDeniedError extends Error {
|
|
301
|
+
readonly toolName: string;
|
|
302
|
+
readonly declaredTools: readonly string[];
|
|
303
|
+
constructor(toolName: string, declaredTools: readonly string[]);
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Thrown when a manifest cannot be parsed / is missing required fields.
|
|
307
|
+
* Surfaces during stage() / startup glob; tracer records details.
|
|
308
|
+
*/
|
|
309
|
+
declare class ConstructionManifestError extends Error {
|
|
310
|
+
readonly path?: string;
|
|
311
|
+
constructor(message: string, path?: string);
|
|
312
|
+
}
|
|
313
|
+
|
|
27
314
|
/**
|
|
28
315
|
* KodaX Core Errors
|
|
29
316
|
*
|
|
@@ -328,405 +615,118 @@ declare function getAllRegisteredTools(): RegisteredToolDefinition[];
|
|
|
328
615
|
*/
|
|
329
616
|
declare function isToolPlanModeAllowed(name: string): boolean;
|
|
330
617
|
/**
|
|
331
|
-
* v0.7.42 — does this tool mutate the filesystem?
|
|
332
|
-
*
|
|
333
|
-
* Wraps `sideEffect === 'mutates-fs'`. Used by the REPL permission
|
|
334
|
-
* pipeline's gitRoot guard and Space's permission broker. Replaces the
|
|
335
|
-
* previous practice of hardcoding `Set(["write", "edit"])`-style lookups
|
|
336
|
-
* scattered across 5+ callsites.
|
|
337
|
-
*/
|
|
338
|
-
declare function isToolFileMutation(name: string): boolean;
|
|
339
|
-
/**
|
|
340
|
-
* FEATURE_247 — does this tool perform a read-only network request
|
|
341
|
-
* (`sideEffect === 'reads-network'`)?
|
|
342
|
-
*
|
|
343
|
-
* Lets an SDK embedder's permission broker (e.g. KodaX-Space Partner) allow
|
|
344
|
-
* web research / MCP reads (`web_search`, `mcp_read_resource`, `mcp_get_prompt`)
|
|
345
|
-
* while still blocking mutating network calls (`web_fetch`, `mcp_call` →
|
|
346
|
-
* `mutates-network`). Fail-closed: unknown names return `false`.
|
|
347
|
-
*
|
|
348
|
-
* Note: `isToolMutation` intentionally still returns `true` for a
|
|
349
|
-
* `reads-network` tool (only `readonly` is treated as non-mutating there), so
|
|
350
|
-
* existing mutation-gate behavior is unchanged — use THIS predicate, or the
|
|
351
|
-
* `sideEffect` value directly, to select the read-network class.
|
|
352
|
-
*/
|
|
353
|
-
declare function isToolNetworkRead(name: string): boolean;
|
|
354
|
-
/**
|
|
355
|
-
* v0.7.42 — does this tool mutate anything (FS, shell, network, state)?
|
|
356
|
-
*
|
|
357
|
-
* True for every `sideEffect` except `'readonly'`. Fail-closed (unknown
|
|
358
|
-
* names return `true` — assumed mutating until proven otherwise).
|
|
359
|
-
*/
|
|
360
|
-
declare function isToolMutation(name: string): boolean;
|
|
361
|
-
declare function getRequiredToolParams(name: string): string[];
|
|
362
|
-
declare function listTools(): string[];
|
|
363
|
-
declare function listToolDefinitions(): KodaXToolDefinition[];
|
|
364
|
-
declare function executeTool(name: string, input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
365
|
-
|
|
366
|
-
declare function toolRead(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string | readonly KodaXToolResultContentItem[]>;
|
|
367
|
-
|
|
368
|
-
declare function toolWrite(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
369
|
-
|
|
370
|
-
type EditToolErrorCode = 'EDIT_NOT_FOUND' | 'EDIT_AMBIGUOUS' | 'EDIT_TOO_LARGE';
|
|
371
|
-
interface EditRecoveryDiagnostic {
|
|
372
|
-
code: EditToolErrorCode;
|
|
373
|
-
filePath: string;
|
|
374
|
-
candidates: Array<{
|
|
375
|
-
startLine: number;
|
|
376
|
-
endLine: number;
|
|
377
|
-
preview: string;
|
|
378
|
-
excerpt: string;
|
|
379
|
-
}>;
|
|
380
|
-
}
|
|
381
|
-
declare function toolEdit(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
382
|
-
declare function parseEditToolError(result: string): EditToolErrorCode | undefined;
|
|
383
|
-
declare function inspectEditFailure(pathValue: string, oldString: string, ctx: KodaXToolExecutionContext, windowLines: number): Promise<EditRecoveryDiagnostic>;
|
|
384
|
-
|
|
385
|
-
declare function toolInsertAfterAnchor(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
386
|
-
|
|
387
|
-
declare function toolBash(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* KodaX Glob Tool
|
|
391
|
-
*
|
|
392
|
-
* 文件搜索工具
|
|
393
|
-
*/
|
|
394
|
-
|
|
395
|
-
declare function toolGlob(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
396
|
-
|
|
397
|
-
declare function toolGrep(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* KodaX Undo Tool
|
|
401
|
-
*
|
|
402
|
-
* 撤销工具 - 恢复最后一次文件修改
|
|
403
|
-
*/
|
|
404
|
-
|
|
405
|
-
declare function toolUndo(_input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* KodaX AskUserQuestion Tool
|
|
409
|
-
*
|
|
410
|
-
* 交互式提问工具 - 允许 LLM 在需要时主动向用户提问
|
|
411
|
-
* Supports: single-select, multi-select, free-text input, and multi-question modes.
|
|
412
|
-
*/
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Ask user a question with multiple interaction modes.
|
|
416
|
-
*
|
|
417
|
-
* This tool requires context.askUser (select) or context.askUserInput (input)
|
|
418
|
-
* callback to be provided by the REPL layer.
|
|
419
|
-
*/
|
|
420
|
-
declare function toolAskUserQuestion(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
421
|
-
|
|
422
|
-
declare function toolRepoOverview(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
423
|
-
|
|
424
|
-
declare function toolChangedScope(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
425
|
-
|
|
426
|
-
declare function toolChangedDiff(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
427
|
-
|
|
428
|
-
declare function toolModuleContext(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
429
|
-
|
|
430
|
-
declare function toolSymbolContext(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
431
|
-
|
|
432
|
-
declare function toolProcessContext(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
433
|
-
|
|
434
|
-
declare function toolImpactEstimate(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
435
|
-
|
|
436
|
-
declare function toolWebSearch(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
437
|
-
|
|
438
|
-
declare function toolWebFetch(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
439
|
-
|
|
440
|
-
declare function toolCodeSearch(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
441
|
-
|
|
442
|
-
declare function toolSemanticLookup(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* KodaX Constructed-World types (FEATURE_087, v0.7.28).
|
|
446
|
-
*
|
|
447
|
-
* Runtime-generated capabilities (tools / agents / skills / ...) live in
|
|
448
|
-
* `.kodax/constructed/` and are loaded into the same registries as builtin
|
|
449
|
-
* primitives. v0.7.28 only ships tool generation (FEATURE_088); other kinds
|
|
450
|
-
* land in FEATURE_089 / FEATURE_090.
|
|
451
|
-
*
|
|
452
|
-
* Cross-references:
|
|
453
|
-
* - DD §14 — lifecycle, security model, registry merge semantics.
|
|
454
|
-
* - docs/features/v0.7.28.md — capability schema, generation flow.
|
|
455
|
-
*/
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Handler script source. v0.7.28 limits language to `'javascript'` so that
|
|
459
|
-
* `loadHandler()` can `await import()` the file directly without an
|
|
460
|
-
* intermediate TS → JS compile step (no esbuild / tsx dependency).
|
|
461
|
-
*
|
|
462
|
-
* TypeScript handlers are explicitly out of scope; Coding Agent generates
|
|
463
|
-
* JS strings on the wire.
|
|
464
|
-
*/
|
|
465
|
-
interface ScriptSource {
|
|
466
|
-
readonly kind: 'script';
|
|
467
|
-
readonly language: 'javascript';
|
|
468
|
-
readonly code: string;
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* Capability declaration.
|
|
472
|
-
*
|
|
473
|
-
* v0.7.28 ships the single-dimension form: a whitelist of builtin tool
|
|
474
|
-
* names that the handler may invoke through `ctx.tools.<name>(...)`.
|
|
475
|
-
* All I/O — fs / net / env — must flow through builtin tools (`read` /
|
|
476
|
-
* `write` / `bash` / etc.); handlers do not receive direct `ctx.fs` /
|
|
477
|
-
* `ctx.net` / `ctx.env` entry points.
|
|
478
|
-
*
|
|
479
|
-
* Forward-compatible evolution: if the future demands path/domain-level
|
|
480
|
-
* constraints, this can grow to `(string | { name; constraints })[]`
|
|
481
|
-
* without breaking existing manifests.
|
|
482
|
-
*/
|
|
483
|
-
interface Capabilities {
|
|
484
|
-
readonly tools: readonly string[];
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* Tool-kind artifact body (the `content` of `ConstructionArtifact` when
|
|
488
|
-
* `kind === 'tool'`).
|
|
489
|
-
*/
|
|
490
|
-
interface ToolContent {
|
|
491
|
-
readonly description: string;
|
|
492
|
-
readonly inputSchema: Record<string, unknown>;
|
|
493
|
-
readonly capabilities: Capabilities;
|
|
494
|
-
readonly handler: ScriptSource;
|
|
495
|
-
/**
|
|
496
|
-
* Per-tool timeout override. Defaults to {@link DEFAULT_HANDLER_TIMEOUT_MS}
|
|
497
|
-
* when omitted. Bounded by AbortController in `loadHandler()`.
|
|
498
|
-
*/
|
|
499
|
-
readonly timeoutMs?: number;
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Default handler timeout. Picked to match the historical ceiling on
|
|
503
|
-
* builtin streaming tools (30s); revisit if a constructed tool demands
|
|
504
|
-
* longer-running computation.
|
|
505
|
-
*/
|
|
506
|
-
declare const DEFAULT_HANDLER_TIMEOUT_MS = 30000;
|
|
507
|
-
/**
|
|
508
|
-
* Lifecycle state on disk. Drives both the startup glob filter and the
|
|
509
|
-
* `revoke()` semantics. See DD §14.1 — file system is the single source
|
|
510
|
-
* of truth; no separate `_manifest.json` index file (C4 decision).
|
|
511
|
-
*/
|
|
512
|
-
type ArtifactStatus = 'staged' | 'active' | 'revoked';
|
|
513
|
-
/**
|
|
514
|
-
* Reference to a tool by stable id. v0.7.31 (FEATURE_089) introduces
|
|
515
|
-
* Agent manifests that bundle tool refs rather than inline tool bodies;
|
|
516
|
-
* the resolver expands these refs to concrete `KodaXToolDefinition`
|
|
517
|
-
* instances at activate time.
|
|
518
|
-
*
|
|
519
|
-
* `ref` shape:
|
|
520
|
-
* - `builtin:<name>` — a tool from the static registry
|
|
521
|
-
* (e.g. `builtin:read`, `builtin:bash`)
|
|
522
|
-
* - `constructed:<name>@<ver>` — a previously-activated constructed tool
|
|
523
|
-
*/
|
|
524
|
-
interface ToolRef {
|
|
525
|
-
readonly ref: string;
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* Reference to a Guardrail by stable id. The Layer A `Guardrail`
|
|
529
|
-
* declaration is name-only (no runtime hooks); resolvers map known
|
|
530
|
-
* names to constructed `ToolGuardrail` / `InputGuardrail` /
|
|
531
|
-
* `OutputGuardrail` instances at activation time.
|
|
532
|
-
*/
|
|
533
|
-
interface GuardrailRef {
|
|
534
|
-
readonly kind: 'input' | 'output' | 'tool';
|
|
535
|
-
readonly ref: string;
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* Reference to a handoff target by stable id (another constructed agent
|
|
539
|
-
* or a builtin role). The resolver expands `target.ref` to the actual
|
|
540
|
-
* `Agent` declaration at admission time so the handoff DAG check
|
|
541
|
-
* (`handoffLegality` invariant) sees the full graph.
|
|
542
|
-
*/
|
|
543
|
-
interface AgentHandoffRef {
|
|
544
|
-
readonly target: {
|
|
545
|
-
readonly ref: string;
|
|
546
|
-
};
|
|
547
|
-
readonly kind: 'continuation' | 'as-tool';
|
|
548
|
-
readonly description?: string;
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* Reasoning profile declaration mirroring the Layer A
|
|
552
|
-
* `AgentReasoningProfile`. Kept structurally identical so the resolver
|
|
553
|
-
* passes the value through without re-shaping.
|
|
554
|
-
*/
|
|
555
|
-
interface AgentReasoningRef {
|
|
556
|
-
readonly default: 'quick' | 'balanced' | 'deep';
|
|
557
|
-
readonly max?: 'quick' | 'balanced' | 'deep';
|
|
558
|
-
readonly escalateOnRevise?: boolean;
|
|
559
|
-
}
|
|
560
|
-
/**
|
|
561
|
-
* Sandbox test case. Used by `sandbox_test_agent` to verify a
|
|
562
|
-
* constructed agent before it can activate. Each case feeds `input`
|
|
563
|
-
* to a sandbox Runner instance and grades the agent's final output:
|
|
564
|
-
*
|
|
565
|
-
* - `expectMatch` — final text must match this regex (string form)
|
|
566
|
-
* - `expectNotMatch` — final text must NOT match this regex
|
|
567
|
-
* - `expectFinalText` — exact substring match (case-sensitive)
|
|
568
|
-
*
|
|
569
|
-
* At least one of the three expect-fields must be present; the cases
|
|
570
|
-
* are graded by `runSandboxAgentTest()` (FEATURE_089 Phase 3.5).
|
|
571
|
-
*/
|
|
572
|
-
interface AgentTestCase {
|
|
573
|
-
readonly id: string;
|
|
574
|
-
readonly input: string;
|
|
575
|
-
readonly expectMatch?: string;
|
|
576
|
-
readonly expectNotMatch?: string;
|
|
577
|
-
readonly expectFinalText?: string;
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* Agent-kind artifact body (the `content` of `ConstructionArtifact`
|
|
581
|
-
* when `kind === 'agent'`).
|
|
618
|
+
* v0.7.42 — does this tool mutate the filesystem?
|
|
582
619
|
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
* Agent through the invariant chain).
|
|
620
|
+
* Wraps `sideEffect === 'mutates-fs'`. Used by the REPL permission
|
|
621
|
+
* pipeline's gitRoot guard and Space's permission broker. Replaces the
|
|
622
|
+
* previous practice of hardcoding `Set(["write", "edit"])`-style lookups
|
|
623
|
+
* scattered across 5+ callsites.
|
|
588
624
|
*/
|
|
589
|
-
|
|
590
|
-
readonly instructions: string;
|
|
591
|
-
readonly tools?: readonly ToolRef[];
|
|
592
|
-
readonly handoffs?: readonly AgentHandoffRef[];
|
|
593
|
-
readonly reasoning?: AgentReasoningRef;
|
|
594
|
-
readonly guardrails?: readonly GuardrailRef[];
|
|
595
|
-
readonly model?: string;
|
|
596
|
-
readonly provider?: string;
|
|
597
|
-
readonly effort?: KodaXWireReasoningEffort;
|
|
598
|
-
/**
|
|
599
|
-
* FEATURE_191 — one-sentence human-readable summary surfaced in the
|
|
600
|
-
* Worker system prompt's `=== Available specialist agents ===`
|
|
601
|
-
* block (FEATURE_191 A.3) and in `/agents list` UIs. Frontmatter
|
|
602
|
-
* `description` field of `~/.kodax/agents/<name>.md` and the
|
|
603
|
-
* `name`-paired argument of `KodaXExtensionAPI.registerAgent`
|
|
604
|
-
* funnel into this field. Optional for backward compatibility with
|
|
605
|
-
* FEATURE_089 minimal-agent shape (`{ instructions: '...' }`);
|
|
606
|
-
* the SP block renders `(no description)` when absent.
|
|
607
|
-
*/
|
|
608
|
-
readonly description?: string;
|
|
609
|
-
/**
|
|
610
|
-
* Optional structured-output schema mirroring `Agent.outputSchema`.
|
|
611
|
-
* Pure pass-through to the runtime — admission does not validate
|
|
612
|
-
* shape semantics here, only well-formed JSON.
|
|
613
|
-
*/
|
|
614
|
-
readonly outputSchema?: Record<string, unknown>;
|
|
615
|
-
/**
|
|
616
|
-
* Optional sandbox test cases. When present, `sandbox_test_agent`
|
|
617
|
-
* runs them; when absent, the test step performs only the static
|
|
618
|
-
* checks (manifest schema + admission audit).
|
|
619
|
-
*/
|
|
620
|
-
readonly testCases?: readonly AgentTestCase[];
|
|
621
|
-
/**
|
|
622
|
-
* Maximum total budget (iteration count) the agent may consume.
|
|
623
|
-
* Plumbed onto the resolved `AgentManifest.maxBudget` and clamped by
|
|
624
|
-
* `budgetCeiling` invariant during admission.
|
|
625
|
-
*/
|
|
626
|
-
readonly maxBudget?: number;
|
|
627
|
-
/**
|
|
628
|
-
* Voluntary additional invariants the LLM declares this agent
|
|
629
|
-
* commits to. Plumbed onto `AgentManifest.declaredInvariants`;
|
|
630
|
-
* unioned on top of the required set during admission.
|
|
631
|
-
*/
|
|
632
|
-
readonly declaredInvariants?: readonly string[];
|
|
633
|
-
}
|
|
625
|
+
declare function isToolFileMutation(name: string): boolean;
|
|
634
626
|
/**
|
|
635
|
-
*
|
|
636
|
-
*
|
|
627
|
+
* FEATURE_247 — does this tool perform a read-only network request
|
|
628
|
+
* (`sideEffect === 'reads-network'`)?
|
|
637
629
|
*
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
*
|
|
641
|
-
*
|
|
630
|
+
* Lets an SDK embedder's permission broker (e.g. KodaX-Space Partner) allow
|
|
631
|
+
* web research / MCP reads (`web_search`, `mcp_read_resource`, `mcp_get_prompt`)
|
|
632
|
+
* while still blocking mutating network calls (`web_fetch`, `mcp_call` →
|
|
633
|
+
* `mutates-network`). Fail-closed: unknown names return `false`.
|
|
642
634
|
*
|
|
643
|
-
*
|
|
644
|
-
*
|
|
635
|
+
* Note: `isToolMutation` intentionally still returns `true` for a
|
|
636
|
+
* `reads-network` tool (only `readonly` is treated as non-mutating there), so
|
|
637
|
+
* existing mutation-gate behavior is unchanged — use THIS predicate, or the
|
|
638
|
+
* `sideEffect` value directly, to select the read-network class.
|
|
645
639
|
*/
|
|
646
|
-
|
|
647
|
-
interface ConstructionArtifactBase {
|
|
648
|
-
readonly name: string;
|
|
649
|
-
readonly version: string;
|
|
650
|
-
status: ArtifactStatus;
|
|
651
|
-
readonly signedBy?: string;
|
|
652
|
-
readonly createdAt: number;
|
|
653
|
-
readonly sourceAgent?: string;
|
|
654
|
-
testedAt?: number;
|
|
655
|
-
activatedAt?: number;
|
|
656
|
-
revokedAt?: number;
|
|
657
|
-
/**
|
|
658
|
-
* SHA-256 of `JSON.stringify(content)` captured at activate time.
|
|
659
|
-
* `rehydrateActiveArtifacts()` recomputes and compares — a mismatch
|
|
660
|
-
* indicates the manifest was edited between activation and the next
|
|
661
|
-
* boot (naive cross-session tampering, e.g. an LLM rewriting the .json
|
|
662
|
-
* via the Write tool without recomputing the hash). Mismatched
|
|
663
|
-
* artifacts are skipped at rehydrate with a stderr warning. This is
|
|
664
|
-
* NOT a defense against a coordinated attacker who recomputes the
|
|
665
|
-
* hash; the threat model is single-user CLI integrity, not multi-user
|
|
666
|
-
* supply chain.
|
|
667
|
-
*/
|
|
668
|
-
contentHash?: string;
|
|
669
|
-
}
|
|
670
|
-
interface ToolArtifact extends ConstructionArtifactBase {
|
|
671
|
-
readonly kind: 'tool';
|
|
672
|
-
readonly content: ToolContent;
|
|
673
|
-
}
|
|
674
|
-
interface AgentArtifact extends ConstructionArtifactBase {
|
|
675
|
-
readonly kind: 'agent';
|
|
676
|
-
readonly content: AgentContent;
|
|
677
|
-
}
|
|
640
|
+
declare function isToolNetworkRead(name: string): boolean;
|
|
678
641
|
/**
|
|
679
|
-
*
|
|
680
|
-
*
|
|
642
|
+
* v0.7.42 — does this tool mutate anything (FS, shell, network, state)?
|
|
643
|
+
*
|
|
644
|
+
* True for every `sideEffect` except `'readonly'`. Fail-closed (unknown
|
|
645
|
+
* names return `true` — assumed mutating until proven otherwise).
|
|
681
646
|
*/
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
647
|
+
declare function isToolMutation(name: string): boolean;
|
|
648
|
+
declare function getRequiredToolParams(name: string): string[];
|
|
649
|
+
declare function listTools(): string[];
|
|
650
|
+
declare function listToolDefinitions(): KodaXToolDefinition[];
|
|
651
|
+
declare function executeTool(name: string, input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
652
|
+
|
|
653
|
+
declare function toolRead(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string | readonly KodaXToolResultContentItem[]>;
|
|
654
|
+
|
|
655
|
+
declare function toolWrite(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
656
|
+
|
|
657
|
+
type EditToolErrorCode = 'EDIT_NOT_FOUND' | 'EDIT_AMBIGUOUS' | 'EDIT_TOO_LARGE';
|
|
658
|
+
interface EditRecoveryDiagnostic {
|
|
659
|
+
code: EditToolErrorCode;
|
|
660
|
+
filePath: string;
|
|
661
|
+
candidates: Array<{
|
|
662
|
+
startLine: number;
|
|
663
|
+
endLine: number;
|
|
664
|
+
preview: string;
|
|
665
|
+
excerpt: string;
|
|
666
|
+
}>;
|
|
685
667
|
}
|
|
668
|
+
declare function toolEdit(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
669
|
+
declare function parseEditToolError(result: string): EditToolErrorCode | undefined;
|
|
670
|
+
declare function inspectEditFailure(pathValue: string, oldString: string, ctx: KodaXToolExecutionContext, windowLines: number): Promise<EditRecoveryDiagnostic>;
|
|
671
|
+
|
|
672
|
+
declare function toolInsertAfterAnchor(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
673
|
+
|
|
674
|
+
declare function toolBash(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
675
|
+
|
|
686
676
|
/**
|
|
687
|
-
*
|
|
688
|
-
*
|
|
677
|
+
* KodaX Glob Tool
|
|
678
|
+
*
|
|
679
|
+
* 文件搜索工具
|
|
689
680
|
*/
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
681
|
+
|
|
682
|
+
declare function toolGlob(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
683
|
+
|
|
684
|
+
declare function toolGrep(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
685
|
+
|
|
695
686
|
/**
|
|
696
|
-
*
|
|
697
|
-
* registered. Default rejects implicit auto-approval; the REPL surface
|
|
698
|
-
* binds a dialog-based policy in `packages/repl/src/common/construction-
|
|
699
|
-
* bootstrap.ts` so user approval flows through the live askUser channel.
|
|
700
|
-
*
|
|
701
|
-
* Modeled as a function type rather than an interface (D3 decision):
|
|
702
|
-
* keeps the contract surface tiny, no class boilerplate.
|
|
687
|
+
* KodaX Undo Tool
|
|
703
688
|
*
|
|
704
|
-
*
|
|
705
|
-
* "Deferred Design Decisions" section in `features/v0.7.28.md` for why
|
|
706
|
-
* a `risk_mode` enum (when truly needed) is preferred over user-authored
|
|
707
|
-
* policy functions.
|
|
689
|
+
* 撤销工具 - 恢复最后一次文件修改
|
|
708
690
|
*/
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
declare const defaultPolicy: ConstructionPolicy;
|
|
691
|
+
|
|
692
|
+
declare function toolUndo(_input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
693
|
+
|
|
713
694
|
/**
|
|
714
|
-
*
|
|
715
|
-
*
|
|
695
|
+
* KodaX AskUserQuestion Tool
|
|
696
|
+
*
|
|
697
|
+
* Lets the LLM ask the user interactive questions. Supports single-select,
|
|
698
|
+
* multi-select, free-text input, and multi-question modes.
|
|
716
699
|
*/
|
|
717
|
-
|
|
718
|
-
readonly toolName: string;
|
|
719
|
-
readonly declaredTools: readonly string[];
|
|
720
|
-
constructor(toolName: string, declaredTools: readonly string[]);
|
|
721
|
-
}
|
|
700
|
+
|
|
722
701
|
/**
|
|
723
|
-
*
|
|
724
|
-
*
|
|
702
|
+
* Ask user a question with multiple interaction modes.
|
|
703
|
+
*
|
|
704
|
+
* This tool requires context.askUser (select), context.askUserMulti
|
|
705
|
+
* (multi-question), or context.askUserInput (input) from the host.
|
|
725
706
|
*/
|
|
726
|
-
declare
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
707
|
+
declare function toolAskUserQuestion(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
708
|
+
|
|
709
|
+
declare function toolRepoOverview(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
710
|
+
|
|
711
|
+
declare function toolChangedScope(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
712
|
+
|
|
713
|
+
declare function toolChangedDiff(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
714
|
+
|
|
715
|
+
declare function toolModuleContext(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
716
|
+
|
|
717
|
+
declare function toolSymbolContext(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
718
|
+
|
|
719
|
+
declare function toolProcessContext(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
720
|
+
|
|
721
|
+
declare function toolImpactEstimate(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
722
|
+
|
|
723
|
+
declare function toolWebSearch(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
724
|
+
|
|
725
|
+
declare function toolWebFetch(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
726
|
+
|
|
727
|
+
declare function toolCodeSearch(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
728
|
+
|
|
729
|
+
declare function toolSemanticLookup(input: Record<string, unknown>, ctx: KodaXToolExecutionContext): Promise<string>;
|
|
730
730
|
|
|
731
731
|
/**
|
|
732
732
|
* FEATURE_089 Phase 3.5 — Sandbox Agent Test Runner.
|
|
@@ -1157,77 +1157,6 @@ declare function findByVersion(name: string, version: string): RegisteredToolDef
|
|
|
1157
1157
|
*/
|
|
1158
1158
|
declare function listAll(): RegisteredToolDefinition[];
|
|
1159
1159
|
|
|
1160
|
-
/**
|
|
1161
|
-
* FEATURE_089 (v0.7.31) Phase 3.4 — Constructed Agent Resolver.
|
|
1162
|
-
*
|
|
1163
|
-
* Module-singleton registry mapping `name` → runnable `Agent` for
|
|
1164
|
-
* agents that have passed admission and been activated through
|
|
1165
|
-
* `ConstructionRuntime.activate()`. Mirrors the way TOOL_REGISTRY
|
|
1166
|
-
* holds activated constructed tools, but for agents.
|
|
1167
|
-
*
|
|
1168
|
-
* Why a separate registry (not in TOOL_REGISTRY):
|
|
1169
|
-
*
|
|
1170
|
-
* - Tools and Agents are different runtime types. A `KodaXToolDefinition`
|
|
1171
|
-
* has `input_schema` + `handler`; an `Agent` has `instructions` +
|
|
1172
|
-
* `tools` + `handoffs` + `reasoning`. Conflating them would force
|
|
1173
|
-
* consumers to discriminate on every lookup.
|
|
1174
|
-
* - Resolution semantics differ: a tool lookup returns the executable
|
|
1175
|
-
* handler; an agent lookup returns the declarative spec (Runner.run
|
|
1176
|
-
* drives the loop separately).
|
|
1177
|
-
*
|
|
1178
|
-
* Resolution surface:
|
|
1179
|
-
*
|
|
1180
|
-
* - `resolveConstructedAgent(name)` — name → Agent | undefined
|
|
1181
|
-
* - `listConstructedAgents()` — snapshot of activated agents
|
|
1182
|
-
* - `registerConstructedAgent(artifact)` → unregister fn (called by
|
|
1183
|
-
* runtime on activate, captured in the runtime's `_activated` map)
|
|
1184
|
-
* - `_resetAgentResolverForTesting()` — test isolation
|
|
1185
|
-
*
|
|
1186
|
-
* Tool / handoff ref resolution:
|
|
1187
|
-
* - Tool refs are resolved against TOOL_REGISTRY at activation time —
|
|
1188
|
-
* a snapshot. If a referenced tool is later revoked, the agent
|
|
1189
|
-
* keeps its stale ref; Phase 3.5 sandbox testing catches this.
|
|
1190
|
-
* - Handoff target refs lift to stub Agent objects (`name` only) when
|
|
1191
|
-
* the target hasn't been activated yet. Transitive admission ran
|
|
1192
|
-
* at test time so the graph is known to be acyclic; runtime
|
|
1193
|
-
* traversal just walks the names.
|
|
1194
|
-
*
|
|
1195
|
-
* Non-goal: full referential consistency between tools / agents /
|
|
1196
|
-
* handoffs. The threat model is single-user CLI integrity (DD §14.5);
|
|
1197
|
-
* stale refs are an LLM-authoring footgun, not a security bypass.
|
|
1198
|
-
*/
|
|
1199
|
-
|
|
1200
|
-
/**
|
|
1201
|
-
* Look up an activated constructed agent by name. Returns the
|
|
1202
|
-
* resolved `Agent` (with tools / handoffs lifted from refs). Returns
|
|
1203
|
-
* `undefined` when no agent at that name has been activated.
|
|
1204
|
-
*/
|
|
1205
|
-
declare function resolveConstructedAgent(name: string): Agent | undefined;
|
|
1206
|
-
/**
|
|
1207
|
-
* FEATURE_090 — `true` iff a self-modify activation has been staged
|
|
1208
|
-
* for `name` but has not yet been drained into the active registry.
|
|
1209
|
-
* Surfaces for tooling that wants to display "next run will use
|
|
1210
|
-
* version X" hints, and as a sanity-check assertion in tests.
|
|
1211
|
-
*/
|
|
1212
|
-
declare function hasPendingSwap(name: string): boolean;
|
|
1213
|
-
/**
|
|
1214
|
-
* FEATURE_090 — promote every pending self-modify entry into
|
|
1215
|
-
* `AGENT_REGISTRY`, replacing the prior active version. Returns the
|
|
1216
|
-
* names that were drained so the caller can surface a hint
|
|
1217
|
-
* ("alpha is now running version 1.1.0").
|
|
1218
|
-
*
|
|
1219
|
-
* Idempotent: calling on an empty pending map is a no-op. Atomic at
|
|
1220
|
-
* the JS event-loop level (a single synchronous pass); drain cannot
|
|
1221
|
-
* partially complete.
|
|
1222
|
-
*
|
|
1223
|
-
* Integration contract: the REPL surface calls this immediately after
|
|
1224
|
-
* any top-level `Runner.run` returns. KodaX is single-process and
|
|
1225
|
-
* single-user, so "the run that triggered the change" and "all
|
|
1226
|
-
* in-flight runs" are the same set — no concurrent-run coordination
|
|
1227
|
-
* needed.
|
|
1228
|
-
*/
|
|
1229
|
-
declare function drainPendingSwaps(): readonly string[];
|
|
1230
|
-
|
|
1231
1160
|
/**
|
|
1232
1161
|
* FEATURE_191 (v0.7.43) — markdown-defined agent loader.
|
|
1233
1162
|
*
|
|
@@ -1262,6 +1191,7 @@ declare function drainPendingSwaps(): readonly string[];
|
|
|
1262
1191
|
* decision. Ignoring them silently keeps user `.md` files
|
|
1263
1192
|
* forward-compatible across future feature versions.
|
|
1264
1193
|
*/
|
|
1194
|
+
|
|
1265
1195
|
/**
|
|
1266
1196
|
* Per-file failure record returned to the boot caller. Mirrors
|
|
1267
1197
|
* claudecode's `getAgentDefinitionsWithOverrides.failedFiles` shape so
|
|
@@ -1291,6 +1221,36 @@ interface LoadAgentsFromMarkdownOptions {
|
|
|
1291
1221
|
*/
|
|
1292
1222
|
readonly configHome?: string;
|
|
1293
1223
|
}
|
|
1224
|
+
interface LoadMarkdownAgentScopeOptions extends LoadAgentsFromMarkdownOptions {
|
|
1225
|
+
/** Stable host-chosen id for diagnostics. Defaults to the resolved project cwd. */
|
|
1226
|
+
readonly id?: string;
|
|
1227
|
+
}
|
|
1228
|
+
interface MarkdownAgentToolFilter {
|
|
1229
|
+
readonly name: string;
|
|
1230
|
+
readonly reason: 'not-registered' | 'admission-clamped';
|
|
1231
|
+
}
|
|
1232
|
+
interface MarkdownAgentLoadWarning {
|
|
1233
|
+
readonly path: string;
|
|
1234
|
+
readonly agentName?: string;
|
|
1235
|
+
readonly reason: string;
|
|
1236
|
+
}
|
|
1237
|
+
interface LoadedMarkdownAgent {
|
|
1238
|
+
readonly name: string;
|
|
1239
|
+
readonly description: string;
|
|
1240
|
+
readonly source: 'markdown:user' | 'markdown:project';
|
|
1241
|
+
readonly path: string;
|
|
1242
|
+
readonly requestedTools?: readonly string[];
|
|
1243
|
+
readonly effectiveTools?: readonly string[];
|
|
1244
|
+
readonly filteredTools: readonly MarkdownAgentToolFilter[];
|
|
1245
|
+
readonly admissionWarnings: readonly string[];
|
|
1246
|
+
}
|
|
1247
|
+
interface LoadMarkdownAgentScopeResult {
|
|
1248
|
+
readonly scope: KodaXAgentScope;
|
|
1249
|
+
readonly loaded: readonly LoadedMarkdownAgent[];
|
|
1250
|
+
readonly failed: readonly MarkdownLoadFailure[];
|
|
1251
|
+
readonly warnings: readonly MarkdownAgentLoadWarning[];
|
|
1252
|
+
dispose(): Promise<void>;
|
|
1253
|
+
}
|
|
1294
1254
|
/**
|
|
1295
1255
|
* FEATURE_197 (v0.7.43) — discovered markdown agent metadata.
|
|
1296
1256
|
*
|
|
@@ -1341,6 +1301,7 @@ interface DiscoverMarkdownAgentsResult {
|
|
|
1341
1301
|
* not break boot.
|
|
1342
1302
|
*/
|
|
1343
1303
|
declare function loadAgentsFromMarkdown(opts?: LoadAgentsFromMarkdownOptions): Promise<LoadAgentsFromMarkdownResult>;
|
|
1304
|
+
declare function loadMarkdownAgentScope(opts?: LoadMarkdownAgentScopeOptions): Promise<LoadMarkdownAgentScopeResult>;
|
|
1344
1305
|
/**
|
|
1345
1306
|
* FEATURE_197 (v0.7.43) — read-only counterpart to
|
|
1346
1307
|
* `loadAgentsFromMarkdown`. Scans the same two-tier path (user dir
|
|
@@ -5791,5 +5752,5 @@ interface AuthorWorkflowViaWorkerHandle {
|
|
|
5791
5752
|
*/
|
|
5792
5753
|
declare function authorWorkflowViaWorker(input: AuthorWorkflowViaWorkerInput): AuthorWorkflowViaWorkerHandle;
|
|
5793
5754
|
|
|
5794
|
-
export { Agent, AgentMessage, AutoRules, BLOCKER_REQUIRED_CONSECUTIVE_TURNS, BUILTIN_WORKFLOWS, BoundExtensionRuntimeController, CANCELLED_TOOL_RESULT_MESSAGE, CANCELLED_TOOL_RESULT_PREFIX, CODING_AGENT_MARKER, CODING_INVARIANTS, CODING_SUMMARY_PROMPT, CODING_UPDATE_SUMMARY_PROMPT, CapabilityDeniedError, CapabilityKind, CapabilityProvider, CapabilityResult, KodaXClient as Client, CombinedExtensionRuntime, ConstructionManifestError, DEFAULT_CODING_AGENT_NAME, DEFAULT_DANGEROUS_PATTERNS, DEFAULT_HANDLER_TIMEOUT_MS, DEFAULT_RESILIENCE_CONFIG, DEFAULT_SAFE_PATTERNS, DEFAULT_SELF_MODIFY_BUDGET, DEFAULT_WINDOW_MS as DEFAULT_SPECULATIVE_WINDOW_MS, DEFAULT_TOOL_OUTPUT_MAX_BYTES, DEFAULT_TOOL_OUTPUT_MAX_LINES, DEFAULT_WORKFLOW_GENERATION_TIMEOUT_MS, EMIT_VERDICT_TOOL_NAME, ErrorCategory, ExtensionRuntimeContract, FailureStage, GENERATOR_AGENT_NAME, GoalCompleteResult, Guardrail, KODAX_TOOLS, KODAX_UNDERLYING_CAPABILITY_TOPICS, KodaXBaseProvider, KodaXChildContextBundle, KodaXClient, KodaXContentBlock, KodaXContextOptions, KodaXEvents, KodaXExecutionMode, KodaXExtensionRuntime, KodaXExtensionSessionRecord, KodaXInputArtifact, KodaXJsonValue, KodaXManualTopic, KodaXManualTopicId, KodaXMessage, KodaXOptions, KodaXProviderCapabilityProfile, KodaXProviderPolicyHints, KodaXReasoningCapability, KodaXReasoningMode, KodaXRepoIntelligenceCapability, KodaXRepoIntelligenceMode, KodaXRepoIntelligenceResolvedMode, KodaXRepoIntelligenceTrace, KodaXRepoRoutingSignals, KodaXResult, KodaXSessionControl, KodaXSessionError, KodaXSessionMutators, KodaXTaskRoutingDecision, KodaXTaskType, KodaXTerminalError, KodaXThinkingDepth, KodaXTimeoutConfig, KodaXTokenUsage, KodaXToolDefinition, KodaXToolError, KodaXToolExecutionContext, KodaXToolUseBlock, KodaXWireReasoningEffort, MANUAL_REGISTRY, MANUAL_TOPIC_IDS, McpCapabilityProvider, McpProviderOptions, McpReverseCapabilities, McpRoot, McpServersConfig, PLANNER_AGENT_NAME, PROMPT_SECTION_REGISTRY, PROTOCOL_EMITTER_TOOLS, ProviderExecutionState, ProviderRecoveryCoordinator, ProviderResilienceConfig, ProviderResiliencePolicy, READ_DEFAULT_LIMIT, READ_MAX_LINE_CHARS, READ_PREFLIGHT_SIZE_BYTES, REPO_EXPLORER_AGENT_NAME, REPO_EXPLORER_TOOL_NAMES, RecoveryDecision, RecoveryResult, ResilienceClassification, ResolveKodaXManualInput, ResolveKodaXManualOptions, ResolveKodaXManualResult, RuntimeDefaultsSnapshot, SCOUT_AGENT_NAME, SCOUT_THEN_AUTHOR_PROMPT_LINES, SELF_KNOWLEDGE_ROUTING_RULE, SYSTEM_PROMPT, SYSTEM_WORKFLOW_LIMITS, SessionErrorMetadata, SignalCollector, StableBoundaryTracker, TASK_ENGINE_ROLE_AGENTS, TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME, TRACING_ENV, ToolCallSignal, ToolSideEffect, WORKER_AGENT_NAME, WORKFLOW_GENERATION_SYSTEM_PROMPT, WorkflowEventCorrelation, WorkflowHostPolicy, _resetRuntimeForTesting, activate, analyzeChangedScope, appendAuditEntry, applyAccountingDelta, applyToolResultGuardrail, authorWorkflowViaWorker, bashSignalCollector, bootstrapTracing, boundedRevise, budgetCeiling, buildApprovalSummary, buildBlockedGoal, buildCapabilityContextSections, buildClassifierPrompt, buildCompleteGoal, buildCreatedGoal, buildFallbackRoutingDecision, buildLlmReviewPrompt, buildManualToolDescription, buildMcpReverseCapabilities, buildPausedGoal, buildPromptMessageContent, buildPromptSnapshot, buildProviderCapabilitySnapshot, buildProviderPolicyHintsForDecision, buildProviderPolicyPromptNotes, buildRepoIntelligenceContext, buildRepoIntelligenceIndex, buildRepoOverview, buildResumedGoal, buildScoutThenAuthorPrompt, buildSelfKnowledgeRoutingRule, buildSystemPrompt, buildSystemPromptSnapshot, buildWorkflowGenerationSkillContext, buildWorkflowGenerationUserPrompt, checkAbsoluteDeny, checkIncompleteToolCalls, checkPromiseSignal, clampWorkflowLimits, classify, classifyBashCommand, classifyError, classifyResilienceError, combineExtensionRuntimes, computeInputSignature, configureRuntime, convertCapabilityReadResult, convertProviderSearchResults, createBashClassifierConfig, createBuiltinToolDefinition, createCodingWorkflowBackend, createCtxProxy, createDefaultCodingAgent, createDenialTracker, createExtensionRuntime, createKodaXTaskRunner, createPromptSection, createReasoningPlan, createRunGraphWriter, createSessionControl, createToolResultTruncationGuardrail, createWorkflowLifecycleController, createWorkflowPatternTemplateModule, createWorkflowRunManager, dedupeExtensionPathsByEntrypoint, defaultPolicy, deleteSavedWorkflow, disableSelfModify, discoverDefaultExtensions, discoverExtensionsInDirectory, discoverExtensionsInDirectoryDetailed, discoverMarkdownAgents, discoverSavedWorkflows,
|
|
5795
|
-
export type { AbsoluteDenyMatch, AbsoluteDenyMiss, AbsoluteDenyResult, AgentArtifact, ArtifactStatus, AstCheckResult, AstRuleId, AstRuleViolation, AuditEntry, AuditEventKind, AuthorWorkflowViaWorkerHandle, AuthorWorkflowViaWorkerInput, BashClassificationResult, BashClassifierConfig, BashRiskLevel, BlockerAttemptResult, BootstrapTracingOptions, BudgetState, BuildClassifierPromptInput, BuildPromptInput, Capabilities, ChangedFileEntry, ChangedFileStatus, ChangedScopeAreaSummary, ChangedScopeReport, ClassifierDecision, ClassifierPrompt, ClassifyDecision, ClassifyOptions, CodingWorkflowBackendDeps, ConstructionArtifact, ConstructionPolicy, ConstructionPolicyVerdict, CreateCtxProxyOptions, CreateKodaXTaskRunnerOptions, CreateWorkflowLifecycleControllerOptions, DeleteSavedWorkflowInput, DeleteWorkflowRunOptions, DenialRecord, DenialTracker, DisableState, DiscoverMarkdownAgentsResult, DiscoveredMarkdownAgent, EditRecoveryDiagnostic, EditToolErrorCode, ErrorClassification, ExecOptions, ExecResult, ExtensionCommandContext, ExtensionCommandDefinition, ExtensionCommandInvocation, ExtensionCommandResult, ExtensionContributionSource, ExtensionDiscoveryResult, ExtensionDiscoverySkipReason, ExtensionEventMap, ExtensionFailureDiagnostic, ExtensionFailureStage, ExtensionHookMap, ExtensionLoadSource, ExtensionLogger, ExtensionRuntimeController, ExtensionRuntimeDiagnostics, ExtensionToolBeforeHookContext, GenerateWorkflowFromOptionsInput, GenerateWorkflowInput, GeneratedWorkflow, GoalCompletionVerifier, ImpactEstimateResult, InvestigationFinding, KodaXAgentWorkerSpec, KodaXExtensionAPI, KodaXExtensionActivationResult, KodaXExtensionModule, KodaXPromptSection, KodaXPromptSectionDefinition, KodaXPromptSectionSlot, KodaXPromptSectionStability, KodaXPromptSnapshot, KodaXPromptSnapshotMetadata, KodaXProviderCapabilitySnapshot, KodaXProviderPolicyDecision, KodaXProviderPolicyIssue, KodaXProviderPolicyIssueSeverity, KodaXProviderSourceKind, KodaXRetrievalArtifact, KodaXRetrievalFreshness, KodaXRetrievalItem, KodaXRetrievalResult, KodaXRetrievalScope, KodaXRetrievalToolName, KodaXRetrievalTrust, LanguageCapabilityTier, LlmReviewClient, LlmReviewResult, LlmReviewVerdict, LoadAgentsFromMarkdownOptions, LoadAgentsFromMarkdownResult, LoadGeneratedWorkflowFromRunInput, LoadHandlerOptions, LoadHandlerScope, LoadedExtensionDiagnostic, LoadedGeneratedWorkflowFromRun, LocalToolDefinition, ManagedWorkflowRun, ManagedWorkflowSnapshot, ManagedWorkflowSource, MarkdownLoadFailure, McpReverseWorkspace, ModelProviderRegistration, ModuleCapsule, ModuleContextResult, OfficialSandboxMode, OfficialSandboxOptions, OrchestrationArtifact, OrchestrationCompletedTask, OrchestrationRunEvents, OrchestrationRunOptions, OrchestrationRunResult, OrchestrationTaskBudget, OrchestrationTaskContext, OrchestrationTaskExecution, OrchestrationTaskStatus, OrchestrationTraceEvent, OrchestrationWorkerResult, OrchestrationWorkerRunner, OrchestrationWorkerSpec, ParallelDispatchDirective, ParallelDispatchResult, ParallelInvestigationArgs, ParallelInvestigationResult, ParallelSubtask, ParsedModelSpec, ProcessCapsule, ProcessContextResult, ProcessStep, ProtocolEmitterMetadata, RegisteredCapabilityProviderDiagnostic, RegisteredCommandDiagnostic, RegisteredHookDiagnostic, RegisteredToolDefinition, RegisteredToolDiagnostic, RenameSavedWorkflowInput, ReplaceSavedWorkflowInput, ReplaceSavedWorkflowResult, RepoAreaKind, RepoAreaOverview, RepoIntelligenceIndex, RepoIntelligenceRuntimeInspection, RepoLanguageId, RepoLanguageSupport, RepoOverview, RepoSymbolKind, RepoSymbolRecord, RepoSymbolReference, ResolveClassifierModelOptions, ResolveSource, ResolvedClassifierModel, RollbackResult, RunGraphWriter, RunGraphWriterDeps, RunJsonInput, RunWorkflowFromOptionsInput, RunWorkflowModuleOptions, RunWorkflowModuleOutcome, RunningSession, SaveGeneratedWorkflowFromRunInput, SaveGeneratedWorkflowInput, SavedGeneratedWorkflowFile, SavedWorkflowDirs, SavedWorkflowExecution, SavedWorkflowRef, SavedWorkflowSource, SchemaProvider, SchemaValidationResult, ScriptSource, SelfModifyAskUser, SelfModifyAskUserInput, SelfModifyDiffSeverity, SelfModifyDiffSummary, SkippedExtensionDiscoveryEntry, SpeculativeResult, StagedHandle, StartManagedWorkflowInput, StartManagedWorkflowResult, StripOptions, SymbolContextResult, TestArtifactOptions, TestResult, TierZeroPatternId, ToolContent, ToolDefinitionSource, ToolHandler, ToolRegistrationOptions, ToolRegistry, VerifyGoalCompletionOptions, WebhookOptions, WebhookResult, WorkflowCapsulePreflightEnvironment, WorkflowCapsulePreflightInput, WorkflowCapsulePreflightIssue, WorkflowCapsulePreflightResult, WorkflowChildOptions, WorkflowGenerationResult, WorkflowGenerationTextFn, WorkflowGenerationTextRequest, WorkflowIdentityResolution, WorkflowIdentityResolverInput, WorkflowLifecycleController, WorkflowPatternTemplate, WorkflowRunListOptions, WorkflowRunManager, WorkflowRunProcessMetadata, WorkflowRunRetentionOptions, WorkflowRunRetentionResult, WorkflowScriptSnapshotInput, WorkflowScriptSnapshotRef };
|
|
5755
|
+
export { Agent, AgentMessage, AutoRules, BLOCKER_REQUIRED_CONSECUTIVE_TURNS, BUILTIN_WORKFLOWS, BoundExtensionRuntimeController, CANCELLED_TOOL_RESULT_MESSAGE, CANCELLED_TOOL_RESULT_PREFIX, CODING_AGENT_MARKER, CODING_INVARIANTS, CODING_SUMMARY_PROMPT, CODING_UPDATE_SUMMARY_PROMPT, CapabilityDeniedError, CapabilityKind, CapabilityProvider, CapabilityResult, KodaXClient as Client, CombinedExtensionRuntime, ConstructionManifestError, DEFAULT_CODING_AGENT_NAME, DEFAULT_DANGEROUS_PATTERNS, DEFAULT_HANDLER_TIMEOUT_MS, DEFAULT_RESILIENCE_CONFIG, DEFAULT_SAFE_PATTERNS, DEFAULT_SELF_MODIFY_BUDGET, DEFAULT_WINDOW_MS as DEFAULT_SPECULATIVE_WINDOW_MS, DEFAULT_TOOL_OUTPUT_MAX_BYTES, DEFAULT_TOOL_OUTPUT_MAX_LINES, DEFAULT_WORKFLOW_GENERATION_TIMEOUT_MS, EMIT_VERDICT_TOOL_NAME, ErrorCategory, ExtensionRuntimeContract, FailureStage, GENERATOR_AGENT_NAME, GoalCompleteResult, Guardrail, KODAX_TOOLS, KODAX_UNDERLYING_CAPABILITY_TOPICS, KodaXAgentScope, KodaXBaseProvider, KodaXChildContextBundle, KodaXClient, KodaXContentBlock, KodaXContextOptions, KodaXEvents, KodaXExecutionMode, KodaXExtensionRuntime, KodaXExtensionSessionRecord, KodaXInputArtifact, KodaXJsonValue, KodaXManualTopic, KodaXManualTopicId, KodaXMessage, KodaXOptions, KodaXProviderCapabilityProfile, KodaXProviderPolicyHints, KodaXReasoningCapability, KodaXReasoningMode, KodaXRepoIntelligenceCapability, KodaXRepoIntelligenceMode, KodaXRepoIntelligenceResolvedMode, KodaXRepoIntelligenceTrace, KodaXRepoRoutingSignals, KodaXResult, KodaXSessionControl, KodaXSessionError, KodaXSessionMutators, KodaXTaskRoutingDecision, KodaXTaskType, KodaXTerminalError, KodaXThinkingDepth, KodaXTimeoutConfig, KodaXTokenUsage, KodaXToolDefinition, KodaXToolError, KodaXToolExecutionContext, KodaXToolUseBlock, KodaXWireReasoningEffort, MANUAL_REGISTRY, MANUAL_TOPIC_IDS, McpCapabilityProvider, McpProviderOptions, McpReverseCapabilities, McpRoot, McpServersConfig, PLANNER_AGENT_NAME, PROMPT_SECTION_REGISTRY, PROTOCOL_EMITTER_TOOLS, ProviderExecutionState, ProviderRecoveryCoordinator, ProviderResilienceConfig, ProviderResiliencePolicy, READ_DEFAULT_LIMIT, READ_MAX_LINE_CHARS, READ_PREFLIGHT_SIZE_BYTES, REPO_EXPLORER_AGENT_NAME, REPO_EXPLORER_TOOL_NAMES, RecoveryDecision, RecoveryResult, ResilienceClassification, ResolveKodaXManualInput, ResolveKodaXManualOptions, ResolveKodaXManualResult, RuntimeDefaultsSnapshot, SCOUT_AGENT_NAME, SCOUT_THEN_AUTHOR_PROMPT_LINES, SELF_KNOWLEDGE_ROUTING_RULE, SYSTEM_PROMPT, SYSTEM_WORKFLOW_LIMITS, SessionErrorMetadata, SignalCollector, StableBoundaryTracker, TASK_ENGINE_ROLE_AGENTS, TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME, TRACING_ENV, ToolCallSignal, ToolSideEffect, WORKER_AGENT_NAME, WORKFLOW_GENERATION_SYSTEM_PROMPT, WorkflowEventCorrelation, WorkflowHostPolicy, _resetRuntimeForTesting, activate, analyzeChangedScope, appendAuditEntry, applyAccountingDelta, applyToolResultGuardrail, authorWorkflowViaWorker, bashSignalCollector, bootstrapTracing, boundedRevise, budgetCeiling, buildApprovalSummary, buildBlockedGoal, buildCapabilityContextSections, buildClassifierPrompt, buildCompleteGoal, buildCreatedGoal, buildFallbackRoutingDecision, buildLlmReviewPrompt, buildManualToolDescription, buildMcpReverseCapabilities, buildPausedGoal, buildPromptMessageContent, buildPromptSnapshot, buildProviderCapabilitySnapshot, buildProviderPolicyHintsForDecision, buildProviderPolicyPromptNotes, buildRepoIntelligenceContext, buildRepoIntelligenceIndex, buildRepoOverview, buildResumedGoal, buildScoutThenAuthorPrompt, buildSelfKnowledgeRoutingRule, buildSystemPrompt, buildSystemPromptSnapshot, buildWorkflowGenerationSkillContext, buildWorkflowGenerationUserPrompt, checkAbsoluteDeny, checkIncompleteToolCalls, checkPromiseSignal, clampWorkflowLimits, classify, classifyBashCommand, classifyError, classifyResilienceError, combineExtensionRuntimes, computeInputSignature, configureRuntime, convertCapabilityReadResult, convertProviderSearchResults, createBashClassifierConfig, createBuiltinToolDefinition, createCodingWorkflowBackend, createCtxProxy, createDefaultCodingAgent, createDenialTracker, createExtensionRuntime, createKodaXTaskRunner, createPromptSection, createReasoningPlan, createRunGraphWriter, createSessionControl, createToolResultTruncationGuardrail, createWorkflowLifecycleController, createWorkflowPatternTemplateModule, createWorkflowRunManager, dedupeExtensionPathsByEntrypoint, defaultPolicy, deleteSavedWorkflow, disableSelfModify, discoverDefaultExtensions, discoverExtensionsInDirectory, discoverExtensionsInDirectoryDetailed, discoverMarkdownAgents, discoverSavedWorkflows, emitVerdict, emitWorkflowAgentDigest, ensureBuiltinRepoExplorerAgent, evaluateProviderPolicy, excludeExtensionPathsByEntrypoint, exec, executeTool, extractComparableUserMessageText, extractHtmlTitle, extractPromptComparableText, fileSignalCollector, finalizeRetrievalResult, findByVersion, formatParallelDispatchResult, formatSize, generateWorkflow, generateWorkflowFromOptions, getActiveExtensionRuntime, getAllRegisteredTools, getBuiltinRegisteredToolDefinition, getBuiltinToolDefinition, getBuiltinWorkflow, getDefaultExtensionDirectory, getDefaultWorkflowRunManager, getDenialContext, getImpactEstimate, getModuleContext, getProcessContext, getRegisteredToolDefinition, getRepoIntelligenceIndex, getRepoOverview, getRepoRoutingSignals, getRequiredToolParams, getSymbolContext, getTool, getToolDefinition, getToolRegistrations, getToolResultPolicy, getWorkflowPatternTemplate, goalTokenDelta, inferTaskType, inspectEditFailure, inspectRepoIntelligenceRuntime, isDeniedRecently, isParallelDispatchDirective, isSessionRecoveryCandidateError, isSupportedExtensionModulePath, isToolFileMutation, isToolMutation, isToolNetworkRead, isToolPlanModeAllowed, isValidTokenBudget, languageIdForPath, listAll, list as listArtifacts, listBuiltinToolDefinitions, listBuiltinWorkflows, listConstructed, listToolDefinitions, listTools, listWorkflowPatternTemplates, loadAgentsFromMarkdown, loadGeneratedWorkflowFromRun, loadHandler, loadMarkdownAgentScope, loadSavedWorkflow, loadSavedWorkflowCapsule, mcpRootsFromWorkspace, normalizeWorkflowModule, orderPromptSections, parallelInvestigation, parseClassifierOutput, parseEditToolError, parseLlmReviewVerdict, parseModelSpec, parseWorkflowGeneration, persistToolOutput, preflightWorkflowCapsule, prewarmRepoIntelligenceCaches, readArtifact, readAuditEntries, readBudget, readDisableState, readWindowFromEnv as readSpeculativeWindowFromEnv, reasoningModeToDepth, reconstructMessagesWithToolGuard, recordBlockerAttempt, recordDenial, registerCodingInvariants, registerConfiguredMcpCapabilityProvider, registerOfficialSandboxExtension, registerTool, rehydrateActiveArtifacts, remaining as remainingSelfModifyBudget, renameSavedWorkflow, renderChangedScope, renderImpactEstimate, renderModuleContext, renderProcessContext, renderPromptSections, renderRepoOverview, renderRetrievalResult, renderSymbolContext, replaceSavedWorkflow, report as reportLspDiagnostics, resetBlockerCounter, resetBudget, resolveClassifierModel, resolveExtensionEntrypoint, resolveKodaXManual, resolveReasoningMode, resolveRepoIntelligenceMode, resolveRepoIntelligenceRuntimeConfig, resolveResilienceConfig, resolveToolCapability, resolveWorkflowGenerationTimeoutMs, resolveWorkflowIdentity, revoke, rollbackSelfModify, runAstRules, runKodaX, runLlmReview, runManagedTask, runOrchestration, runWorkflowFromOptions, runWorkflowModule, safeWorkflowArtifactName, saveGeneratedWorkflow, saveGeneratedWorkflowFromRun, setActiveExtensionRuntime, shouldFlipBudgetLimited, speculativeRace, stage, startKodaX, startManagedWorkflow, stripAssistantText, stripHtmlToText, test as testArtifact, toolAskUserQuestion, toolBash, toolChangedDiff, toolChangedScope, toolCodeSearch, toolEdit, toolGlob, toolGrep, toolImpactEstimate, toolInsertAfterAnchor, toolModuleContext, toolPermission, toolProcessContext, toolRead, toolRepoOverview, toolSemanticLookup, toolSymbolContext, toolUndo, toolWebFetch, toolWebSearch, toolWrite, truncateHead, truncateLine, truncateTail, turnWallTimeDelta, validateGeneratedWorkflowSource, validateSubtaskIndependence, validateToolSchemaForProvider, verifyGoalCompletion, webhook, withManualToolBranding, workerAgent };
|
|
5756
|
+
export type { AbsoluteDenyMatch, AbsoluteDenyMiss, AbsoluteDenyResult, AgentArtifact, ArtifactStatus, AstCheckResult, AstRuleId, AstRuleViolation, AuditEntry, AuditEventKind, AuthorWorkflowViaWorkerHandle, AuthorWorkflowViaWorkerInput, BashClassificationResult, BashClassifierConfig, BashRiskLevel, BlockerAttemptResult, BootstrapTracingOptions, BudgetState, BuildClassifierPromptInput, BuildPromptInput, Capabilities, ChangedFileEntry, ChangedFileStatus, ChangedScopeAreaSummary, ChangedScopeReport, ClassifierDecision, ClassifierPrompt, ClassifyDecision, ClassifyOptions, CodingWorkflowBackendDeps, ConstructionArtifact, ConstructionPolicy, ConstructionPolicyVerdict, CreateCtxProxyOptions, CreateKodaXTaskRunnerOptions, CreateWorkflowLifecycleControllerOptions, DeleteSavedWorkflowInput, DeleteWorkflowRunOptions, DenialRecord, DenialTracker, DisableState, DiscoverMarkdownAgentsResult, DiscoveredMarkdownAgent, EditRecoveryDiagnostic, EditToolErrorCode, ErrorClassification, ExecOptions, ExecResult, ExtensionCommandContext, ExtensionCommandDefinition, ExtensionCommandInvocation, ExtensionCommandResult, ExtensionContributionSource, ExtensionDiscoveryResult, ExtensionDiscoverySkipReason, ExtensionEventMap, ExtensionFailureDiagnostic, ExtensionFailureStage, ExtensionHookMap, ExtensionLoadSource, ExtensionLogger, ExtensionRuntimeController, ExtensionRuntimeDiagnostics, ExtensionToolBeforeHookContext, GenerateWorkflowFromOptionsInput, GenerateWorkflowInput, GeneratedWorkflow, GoalCompletionVerifier, ImpactEstimateResult, InvestigationFinding, KodaXAgentWorkerSpec, KodaXExtensionAPI, KodaXExtensionActivationResult, KodaXExtensionModule, KodaXPromptSection, KodaXPromptSectionDefinition, KodaXPromptSectionSlot, KodaXPromptSectionStability, KodaXPromptSnapshot, KodaXPromptSnapshotMetadata, KodaXProviderCapabilitySnapshot, KodaXProviderPolicyDecision, KodaXProviderPolicyIssue, KodaXProviderPolicyIssueSeverity, KodaXProviderSourceKind, KodaXRetrievalArtifact, KodaXRetrievalFreshness, KodaXRetrievalItem, KodaXRetrievalResult, KodaXRetrievalScope, KodaXRetrievalToolName, KodaXRetrievalTrust, LanguageCapabilityTier, LlmReviewClient, LlmReviewResult, LlmReviewVerdict, LoadAgentsFromMarkdownOptions, LoadAgentsFromMarkdownResult, LoadGeneratedWorkflowFromRunInput, LoadHandlerOptions, LoadHandlerScope, LoadMarkdownAgentScopeOptions, LoadMarkdownAgentScopeResult, LoadedExtensionDiagnostic, LoadedGeneratedWorkflowFromRun, LoadedMarkdownAgent, LocalToolDefinition, ManagedWorkflowRun, ManagedWorkflowSnapshot, ManagedWorkflowSource, MarkdownAgentLoadWarning, MarkdownAgentToolFilter, MarkdownLoadFailure, McpReverseWorkspace, ModelProviderRegistration, ModuleCapsule, ModuleContextResult, OfficialSandboxMode, OfficialSandboxOptions, OrchestrationArtifact, OrchestrationCompletedTask, OrchestrationRunEvents, OrchestrationRunOptions, OrchestrationRunResult, OrchestrationTaskBudget, OrchestrationTaskContext, OrchestrationTaskExecution, OrchestrationTaskStatus, OrchestrationTraceEvent, OrchestrationWorkerResult, OrchestrationWorkerRunner, OrchestrationWorkerSpec, ParallelDispatchDirective, ParallelDispatchResult, ParallelInvestigationArgs, ParallelInvestigationResult, ParallelSubtask, ParsedModelSpec, ProcessCapsule, ProcessContextResult, ProcessStep, ProtocolEmitterMetadata, RegisteredCapabilityProviderDiagnostic, RegisteredCommandDiagnostic, RegisteredHookDiagnostic, RegisteredToolDefinition, RegisteredToolDiagnostic, RenameSavedWorkflowInput, ReplaceSavedWorkflowInput, ReplaceSavedWorkflowResult, RepoAreaKind, RepoAreaOverview, RepoIntelligenceIndex, RepoIntelligenceRuntimeInspection, RepoLanguageId, RepoLanguageSupport, RepoOverview, RepoSymbolKind, RepoSymbolRecord, RepoSymbolReference, ResolveClassifierModelOptions, ResolveSource, ResolvedClassifierModel, RollbackResult, RunGraphWriter, RunGraphWriterDeps, RunJsonInput, RunWorkflowFromOptionsInput, RunWorkflowModuleOptions, RunWorkflowModuleOutcome, RunningSession, SaveGeneratedWorkflowFromRunInput, SaveGeneratedWorkflowInput, SavedGeneratedWorkflowFile, SavedWorkflowDirs, SavedWorkflowExecution, SavedWorkflowRef, SavedWorkflowSource, SchemaProvider, SchemaValidationResult, ScriptSource, SelfModifyAskUser, SelfModifyAskUserInput, SelfModifyDiffSeverity, SelfModifyDiffSummary, SkippedExtensionDiscoveryEntry, SpeculativeResult, StagedHandle, StartManagedWorkflowInput, StartManagedWorkflowResult, StripOptions, SymbolContextResult, TestArtifactOptions, TestResult, TierZeroPatternId, ToolContent, ToolDefinitionSource, ToolHandler, ToolRegistrationOptions, ToolRegistry, VerifyGoalCompletionOptions, WebhookOptions, WebhookResult, WorkflowCapsulePreflightEnvironment, WorkflowCapsulePreflightInput, WorkflowCapsulePreflightIssue, WorkflowCapsulePreflightResult, WorkflowChildOptions, WorkflowGenerationResult, WorkflowGenerationTextFn, WorkflowGenerationTextRequest, WorkflowIdentityResolution, WorkflowIdentityResolverInput, WorkflowLifecycleController, WorkflowPatternTemplate, WorkflowRunListOptions, WorkflowRunManager, WorkflowRunProcessMetadata, WorkflowRunRetentionOptions, WorkflowRunRetentionResult, WorkflowScriptSnapshotInput, WorkflowScriptSnapshotRef };
|