@kodax-ai/kodax 0.7.47 → 0.7.49
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 +1741 -1702
- package/README.md +80 -27
- package/README_CN.md +60 -15
- package/dist/builtin/code-review/SKILL.md +1 -1
- package/dist/chunks/argument-completer-GDG5OHN7.js +2 -0
- package/dist/chunks/{chunk-VGRG2F6H.js → chunk-67SWUEEN.js} +424 -276
- package/dist/chunks/chunk-C5PKZX5Z.js +291 -0
- package/dist/chunks/chunk-ISGHUKRY.js +428 -0
- package/dist/chunks/chunk-JTHMWRXM.js +566 -0
- package/dist/chunks/chunk-TYZAH3YP.js +2 -0
- package/dist/chunks/chunk-YACQ4OST.js +31 -0
- package/dist/chunks/{chunk-2SMCCP44.js → chunk-YW4RQV7U.js} +1 -1
- package/dist/chunks/{compaction-config-YU7SI6L6.js → compaction-config-BQBYOWX2.js} +1 -1
- package/dist/chunks/{construction-bootstrap-6UN3OY7X.js → construction-bootstrap-5TFGMSWQ.js} +1 -1
- package/dist/chunks/{dist-IDNOAB4M.js → dist-BL7IBQHD.js} +1 -1
- package/dist/chunks/dist-D7HOETCE.js +2 -0
- package/dist/chunks/{utils-3ISOUEFC.js → utils-XWDT3W5X.js} +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +5 -5
- package/dist/kodax_cli.js +1337 -888
- package/dist/provider-capabilities.json +193 -190
- package/dist/sdk-agent.d.ts +207 -105
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +569 -37
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.d.ts +5 -5
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +3 -3
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-repl.d.ts +16 -15
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-session.d.ts +6 -3
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/types-chunks/{base.d-BdJKSPO2.d.ts → base.d-C4jYVjJh.d.ts} +2 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-D6hL0Cuv.d.ts → bash-prefix-extractor.d-CI_xcPhn.d.ts} +70 -35
- package/dist/types-chunks/{file-tracker.d-BNTIvsdb.d.ts → capsule.d-DaPuhyyK.d.ts} +170 -5
- package/dist/types-chunks/{config.d-BfJUXxC0.d.ts → config.d-CJy1WENT.d.ts} +17 -7
- package/dist/types-chunks/manager.d-DLmDhX3i.d.ts +696 -0
- package/dist/types-chunks/{resolver.d-DkgJlEzr.d.ts → resolver.d-B_wm409c.d.ts} +2 -2
- package/dist/types-chunks/{storage.d-B1Jk6ryM.d.ts → storage.d-J2GqOgaX.d.ts} +4 -1
- package/dist/types-chunks/{types.d-D2RNa5Y7.d.ts → types.d-BR9oNWup.d.ts} +429 -4
- package/dist/types-chunks/{types.d-B_MIIApc.d.ts → types.d-BnjX2Gn4.d.ts} +6 -1
- package/dist/types-chunks/{types.d-Cf-GCzac.d.ts → types.d-rPRl2LSB.d.ts} +4 -0
- package/dist/types-chunks/{utils.d-umRKgMAu.d.ts → utils.d-BJ_-y8gC.d.ts} +42 -8
- package/package.json +1 -1
- package/dist/chunks/chunk-66B6ZOU7.js +0 -31
- package/dist/chunks/chunk-KRHAO2T3.js +0 -567
- package/dist/chunks/chunk-QZFZIGPF.js +0 -2
- package/dist/chunks/chunk-VX6HN3JP.js +0 -415
- package/dist/chunks/dist-DS2KIZQG.js +0 -2
- package/dist/types-chunks/manager.d-U3UEwY1P.d.ts +0 -385
- package/dist/types-chunks/types.d-C5mHR87z.d.ts +0 -119
package/dist/sdk-coding.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { Y as KodaXToolDefinition, _ as KodaXToolResultContentItem, E as KodaXReasoningMode, n as KodaXMessage, a1 as KodaXToolUseBlock, g as KodaXContentBlock, r as KodaXProviderCapabilityProfile, D as KodaXReasoningCapability, R as KodaXTaskType, i as KodaXExecutionMode, Q as KodaXTaskRoutingDecision, K as KodaXAmaControllerDecision, W as KodaXThinkingDepth, X as KodaXTokenUsage } from './types-chunks/types.d-
|
|
2
|
-
export { a as KodaXAmaFanoutClass, b as KodaXAmaFanoutPolicy, c as KodaXAmaProfile, d as KodaXAmaTactic, h as KodaXCustomProviderConfig, l as KodaXImageBlock, o as KodaXModelDescriptor, q as KodaXProtocolFamily, s as KodaXProviderConfig, u as KodaXProviderConversationSemantics, x as KodaXProviderMcpSupport, A as KodaXProviderStreamOptions, C as KodaXProviderTransport, F as KodaXReasoningOverride, G as KodaXReasoningRequest, H as KodaXRedactedThinkingBlock, I as KodaXReviewScale, J as KodaXRiskLevel, L as KodaXStreamResult, N as KodaXTaskBudgetOverrides, T as KodaXTextBlock, U as KodaXThinkingBlock, V as KodaXThinkingBudgetMap, Z as KodaXToolResultBlock } from './types-chunks/types.d-
|
|
3
|
-
export { K as KODAX_DEFAULT_PROVIDER, b as KODAX_PROVIDERS, c as KODAX_PROVIDER_SNAPSHOTS, d as KODAX_REASONING_MODE_SEQUENCE, f as KodaXAnthropicCompatProvider, g as KodaXError, h as KodaXModelCapabilities, j as KodaXOpenAICompatProvider, k as KodaXProviderError, l as KodaXRateLimitError, P as ProviderName, n as buildReasoningOverrideKey, p as clearReasoningOverride, q as clearRuntimeModelProviders, r as createCustomProvider, s as getAvailableProviderNames, t as getCustomModelCapabilities, u as getCustomProvider, v as getCustomProviderList, w as getCustomProviderModelDescriptors, x as getCustomProviderModels, y as getCustomProviderNames, A as getModelCapabilities, B as getProvider, C as getProviderConfiguredCapabilityProfile, D as getProviderConfiguredReasoningCapability, E as getProviderList, F as getProviderModel, G as getProviderModelDescriptors, H as getProviderModels, J as getRuntimeModelProvider, L as getRuntimeModelProviderNames, M as isCustomProviderName, N as isKnownProvider, O as isProviderConfigured, Q as isProviderName, S as isRuntimeModelProviderName, T as listAllModelCapabilities, U as listBuiltinModelCapabilities, V as listCustomProviderModelCapabilities, X as loadReasoningOverride, _ as reasoningCapabilityToOverride, $ as reasoningOverrideToCapability, a0 as registerCustomProviders, a1 as registerModelProvider, a2 as resolveModelCapabilities, a3 as resolveProvider, a4 as resolveProviderModelDescriptors, a6 as saveReasoningOverride, a7 as validateCustomProviderConfig } from './types-chunks/resolver.d-
|
|
4
|
-
import { K as KodaXBaseProvider } from './types-chunks/base.d-
|
|
1
|
+
import { Y as KodaXToolDefinition, _ as KodaXToolResultContentItem, E as KodaXReasoningMode, n as KodaXMessage, a1 as KodaXToolUseBlock, g as KodaXContentBlock, r as KodaXProviderCapabilityProfile, D as KodaXReasoningCapability, R as KodaXTaskType, i as KodaXExecutionMode, Q as KodaXTaskRoutingDecision, K as KodaXAmaControllerDecision, W as KodaXThinkingDepth, X as KodaXTokenUsage } from './types-chunks/types.d-rPRl2LSB.js';
|
|
2
|
+
export { a as KodaXAmaFanoutClass, b as KodaXAmaFanoutPolicy, c as KodaXAmaProfile, d as KodaXAmaTactic, h as KodaXCustomProviderConfig, l as KodaXImageBlock, o as KodaXModelDescriptor, q as KodaXProtocolFamily, s as KodaXProviderConfig, u as KodaXProviderConversationSemantics, x as KodaXProviderMcpSupport, A as KodaXProviderStreamOptions, C as KodaXProviderTransport, F as KodaXReasoningOverride, G as KodaXReasoningRequest, H as KodaXRedactedThinkingBlock, I as KodaXReviewScale, J as KodaXRiskLevel, L as KodaXStreamResult, N as KodaXTaskBudgetOverrides, T as KodaXTextBlock, U as KodaXThinkingBlock, V as KodaXThinkingBudgetMap, Z as KodaXToolResultBlock } from './types-chunks/types.d-rPRl2LSB.js';
|
|
3
|
+
export { K as KODAX_DEFAULT_PROVIDER, b as KODAX_PROVIDERS, c as KODAX_PROVIDER_SNAPSHOTS, d as KODAX_REASONING_MODE_SEQUENCE, f as KodaXAnthropicCompatProvider, g as KodaXError, h as KodaXModelCapabilities, j as KodaXOpenAICompatProvider, k as KodaXProviderError, l as KodaXRateLimitError, P as ProviderName, n as buildReasoningOverrideKey, p as clearReasoningOverride, q as clearRuntimeModelProviders, r as createCustomProvider, s as getAvailableProviderNames, t as getCustomModelCapabilities, u as getCustomProvider, v as getCustomProviderList, w as getCustomProviderModelDescriptors, x as getCustomProviderModels, y as getCustomProviderNames, A as getModelCapabilities, B as getProvider, C as getProviderConfiguredCapabilityProfile, D as getProviderConfiguredReasoningCapability, E as getProviderList, F as getProviderModel, G as getProviderModelDescriptors, H as getProviderModels, J as getRuntimeModelProvider, L as getRuntimeModelProviderNames, M as isCustomProviderName, N as isKnownProvider, O as isProviderConfigured, Q as isProviderName, S as isRuntimeModelProviderName, T as listAllModelCapabilities, U as listBuiltinModelCapabilities, V as listCustomProviderModelCapabilities, X as loadReasoningOverride, _ as reasoningCapabilityToOverride, $ as reasoningOverrideToCapability, a0 as registerCustomProviders, a1 as registerModelProvider, a2 as resolveModelCapabilities, a3 as resolveProvider, a4 as resolveProviderModelDescriptors, a6 as saveReasoningOverride, a7 as validateCustomProviderConfig } from './types-chunks/resolver.d-B_wm409c.js';
|
|
4
|
+
import { K as KodaXBaseProvider } from './types-chunks/base.d-C4jYVjJh.js';
|
|
5
5
|
import { C as CapabilityKind, a as CapabilityProvider, b as CapabilityResult } from './types-chunks/capability.d-3C62G8Eq.js';
|
|
6
|
-
import { aB as KodaXToolExecutionContext, a8 as KodaXRepoIntelligenceCapability, ab as KodaXRepoIntelligenceTrace, a9 as KodaXRepoIntelligenceMode, ad as KodaXRepoRoutingSignals, aa as KodaXRepoIntelligenceResolvedMode, a4 as KodaXOptions, T as KodaXInputArtifact, L as KodaXContextOptions, a7 as KodaXProviderPolicyHints, aM as ProviderResilienceConfig, aN as ProviderResiliencePolicy, F as FailureStage, aS as ResilienceClassification, aK as ProviderExecutionState, aP as RecoveryDecision, aR as RecoveryResult, ae as KodaXResult, ai as KodaXSessionControl, aj as KodaXSessionMutators, S as KodaXFanoutSchedulerPlan, Q as KodaXFanoutBranchTransition, R as KodaXFanoutSchedulerInput,
|
|
7
|
-
export { C as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD,
|
|
8
|
-
import { i as KodaXJsonValue, b as KodaXExtensionSessionRecord, d as KodaXExtensionStore, S as SessionErrorMetadata, g as KodaXGoalState } from './types-chunks/types.d-
|
|
9
|
-
export { K as KodaXCompactMemoryProgress, a as KodaXCompactMemorySeed, c as KodaXExtensionSessionState, k as KodaXSessionArtifactLedgerEntry, l as KodaXSessionBranchSummaryEntry, m as KodaXSessionCompactionEntry, n as KodaXSessionData, o as KodaXSessionEntry, p as KodaXSessionEntryBase, r as KodaXSessionLabelEntry, s as KodaXSessionLineage, t as KodaXSessionMessageEntry, u as KodaXSessionMeta, v as KodaXSessionNavigationOptions, w as KodaXSessionRuntimeInfo, x as KodaXSessionScope, y as KodaXSessionStorage, z as KodaXSessionTreeNode, A as KodaXSessionUiHistoryItem, B as KodaXSessionUiHistoryItemType, C as KodaXSessionWorkspaceKind } from './types-chunks/types.d-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
import { aB as KodaXToolExecutionContext, a8 as KodaXRepoIntelligenceCapability, ab as KodaXRepoIntelligenceTrace, a9 as KodaXRepoIntelligenceMode, ad as KodaXRepoRoutingSignals, aa as KodaXRepoIntelligenceResolvedMode, a4 as KodaXOptions, T as KodaXInputArtifact, L as KodaXContextOptions, a7 as KodaXProviderPolicyHints, aM as ProviderResilienceConfig, aN as ProviderResiliencePolicy, F as FailureStage, aS as ResilienceClassification, aK as ProviderExecutionState, aP as RecoveryDecision, aR as RecoveryResult, ae as KodaXResult, ai as KodaXSessionControl, aj as KodaXSessionMutators, S as KodaXFanoutSchedulerPlan, Q as KodaXFanoutBranchTransition, R as KodaXFanoutSchedulerInput, H as KodaXChildContextBundle, a6 as KodaXParentReductionContract, P as KodaXFanoutBranchRecord, V as KodaXManagedProtocolPayload, p as ExtensionRuntimeContract, N as KodaXEvents, h as AutoRules, b2 as ToolCallSignal, aZ as SignalCollector, r as GoalCompleteResult, aU as ResolveKodaXManualInput, aV as ResolveKodaXManualOptions, aW as ResolveKodaXManualResult, Z as KodaXManualTopicId, l as ChildSnapshotEvent, I as KodaXChildExecutionResult, K as KodaXAgentMode } from './types-chunks/bash-prefix-extractor.d-CI_xcPhn.js';
|
|
7
|
+
export { C as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD, k 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, B as BASH_POLICY_SPEC, E as BREAKER_ERROR_THRESHOLD, b4 as BREAKER_WINDOW_MS, i as BashPrefixExtractor, j as BashPrefixResult, m as CircuitBreaker, n as CreateBashPrefixExtractorOptions, o as DiagnosticsRequest, q as ExtractCommandPrefixOptions, G as GoalBlockedResult, s as GoalCreateInput, t as GoalLifecycleContext, u as GoalRuntimeBinding, v as GoalRuntimeBindingDeps, w as GoalToolsContext, x as KodaXBudgetDisclosureZone, y as KodaXBudgetExtensionRequest, z as KodaXChildAgentResult, J as KodaXCompactionOverride, M as KodaXContextTokenSnapshot, O as KodaXFanoutBranchLifecycle, U as KodaXManagedBudgetSnapshot, W as KodaXManagedTask, X as KodaXManagedTaskRuntimeState, Y as KodaXManagedTaskStatusEvent, _ as KodaXManualTopicInput, $ as KodaXMcpConnectMode, a0 as KodaXMcpServerConfig, a1 as KodaXMcpServersConfig, a2 as KodaXMcpTransport, a3 as KodaXMemoryStrategy, a5 as KodaXOrchestrationVerdict, ac as KodaXRepoIntelligenceTraceEvent, af as KodaXRoleRoundSummary, ag as KodaXRuntimeVerificationContract, ah as KodaXSelfManualConfig, ak as KodaXSessionOptions, al as KodaXSkillInvocationContext, am as KodaXSkillMap, an as KodaXSkillProjectionConfidence, ao as KodaXTaskCapabilityHint, ap as KodaXTaskContract, aq as KodaXTaskEvidenceArtifact, ar as KodaXTaskEvidenceBundle, as as KodaXTaskEvidenceEntry, at as KodaXTaskRole, au as KodaXTaskRoleAssignment, av as KodaXTaskStatus, aw as KodaXTaskSurface, ax as KodaXTaskToolPolicy, ay as KodaXTaskVerificationContract, az as KodaXTaskVerificationCriterion, aA as KodaXTaskWorkItem, aC as KodaXVerificationScorecard, aD as KodaXVerificationScorecardCriterion, aE as LSP_SERVERS, aF as LoadAgentsOptions, aG as LoadedRulesSource, aH as LspServerInfo, aI as LspService, aJ as LspServiceConfig, aL as ProviderRecoveryEvent, aO as RecoveryAction, aQ as RecoveryLadderStep, aT as ResilienceErrorClass, aX as RulesLoadError, aY as RulesLoadResult, a_ as SkippedRulesSource, a$ as TodoItem, b0 as TodoList, b1 as TodoStatus, b3 as TrustState, bo as autoModeDenialShouldFallback, bp as breakerShouldFallback, b5 as buildGoalRuntimeBinding, b6 as collectAllSignals, b7 as computeRulesFingerprint, bb as createAutoModeDenialTracker, b8 as createAutoModeToolGuardrail, b9 as createBashPrefixExtractor, ba as createCircuitBreaker, bc as extractCommandPrefix, bd as formatAgentsForPrompt, be as getDefaultLspService, bf as getKodaxGlobalDir, bg as loadAgentsFiles, bh as loadAutoRules, bi as makeDisabledGoalToolsContext, bj as parseAutoRules, bk as readTrustState, bl as recordAutoModeAllow, bm as recordAutoModeBlock, bn as recordBreakerError, bq as shutdownDefaultLspService, br as trustProjectRules, bs as withGoalBeforeNextTurn, bt as withGoalStopHook } from './types-chunks/bash-prefix-extractor.d-CI_xcPhn.js';
|
|
8
|
+
import { i as KodaXJsonValue, b as KodaXExtensionSessionRecord, d as KodaXExtensionStore, S as SessionErrorMetadata, g as KodaXGoalState } from './types-chunks/types.d-BnjX2Gn4.js';
|
|
9
|
+
export { K as KodaXCompactMemoryProgress, a as KodaXCompactMemorySeed, c as KodaXExtensionSessionState, k as KodaXSessionArtifactLedgerEntry, l as KodaXSessionBranchSummaryEntry, m as KodaXSessionCompactionEntry, n as KodaXSessionData, o as KodaXSessionEntry, p as KodaXSessionEntryBase, r as KodaXSessionLabelEntry, s as KodaXSessionLineage, t as KodaXSessionMessageEntry, u as KodaXSessionMeta, v as KodaXSessionNavigationOptions, w as KodaXSessionRuntimeInfo, x as KodaXSessionScope, y as KodaXSessionStorage, z as KodaXSessionTreeNode, A as KodaXSessionUiHistoryItem, B as KodaXSessionUiHistoryItemType, C as KodaXSessionWorkspaceKind } from './types-chunks/types.d-BnjX2Gn4.js';
|
|
10
|
+
import { M as MessageQueue, H as WorkflowScriptManifest, y as WorkflowCapsule, B as WorkflowCapsuleIntent, A as WorkflowCapsuleInputs, F as WorkflowCapsuleRequirements, E as WorkflowCapsuleProvenance, G as WorkflowPatternId } from './types-chunks/capsule.d-DaPuhyyK.js';
|
|
11
|
+
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, P as PROMISE_PATTERN, I as appendSessionLineageLabel, N as applySessionCompaction, O as archiveOldIslands, Q as buildSessionTree, R as cleanupIncompleteToolCalls, S as countActiveLineageMessages, T as countTokens, U as createSessionLineage, Y as estimateTokens, Z as extractArtifactLedger, a0 as extractTitleFromMessages, a1 as findPreviousUserEntryId, a2 as forkSessionLineage, a3 as generateSessionId, a4 as getAgentConfigHome, a5 as getAgentConfigPath, a6 as getAppDataDir, a8 as getSessionLineagePath, a9 as getSessionMessagesFromLineage, aa as mergeArtifactLedger, ac as resolveSessionLineageTarget, ad as rewindSessionLineage, ae as setAgentConfigHome, af as setSessionLineageActiveEntry, ag as validateAndFixToolHistory } from './types-chunks/capsule.d-DaPuhyyK.js';
|
|
12
|
+
import { a2 as QualityInvariant, aM as ToolCapability, ae as RunnableTool, d as Agent, aN as ToolGuardrail, f as AgentMessage, ai as RunnerLlmReturn, aj as RunnerToolCall, B as Guardrail, aU as WorkflowAgentBackend, b6 as WorkflowModule, a_ as WorkflowEvent, aY as WorkflowArtifactRef, b4 as WorkflowMeta, b9 as WorkflowRunState, aX as WorkflowApprovalSummary, aW as WorkflowApproval, b2 as WorkflowLimits } from './types-chunks/types.d-BR9oNWup.js';
|
|
13
|
+
export { h as AgentReasoningProfile, j as AgentTool, k as AskUserMultiOptions, l as AskUserQuestionItem, m as AskUserQuestionOptions, n as CompactionAnchor, q as CompactionResult, s as CompactionUpdate, M as Handoff, O as InMemorySessionOptions, W as MessageEntry, a0 as PresetDispatcher, a7 as ReasoningDepth, ab as RunEvent, ac as RunOptions, ad as RunResult, af as Runner, an as Session, ap as SessionEntry, aq as SessionExtension, ar as SessionForkOptions, bq as createAgent, br as createHandoff, bs as createInMemorySession, bG as registerPresetDispatcher } from './types-chunks/types.d-BR9oNWup.js';
|
|
14
|
+
import { b as McpServersConfig } from './types-chunks/config.d-CJy1WENT.js';
|
|
15
|
+
export { M as McpConnectMode, a as McpServerConfig, c as McpTransportKind } from './types-chunks/config.d-CJy1WENT.js';
|
|
16
|
+
import { k as McpProviderOptions, c as McpCapabilityProvider, l as McpReverseCapabilities, m as McpRoot } from './types-chunks/manager.d-DLmDhX3i.js';
|
|
17
|
+
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 parseMcpCapabilityId, T as performOAuthLogin, U as registerOAuthClient, V as searchMcpCatalog } from './types-chunks/manager.d-DLmDhX3i.js';
|
|
17
18
|
import { a as CostTracker } from './types-chunks/cost-tracker.d-wRtyEW9d.js';
|
|
18
19
|
import { Diagnostic } from 'vscode-languageserver-protocol';
|
|
19
20
|
import '@anthropic-ai/sdk';
|
|
@@ -2619,6 +2620,37 @@ declare function getActiveExtensionRuntime(): KodaXExtensionRuntime | null;
|
|
|
2619
2620
|
|
|
2620
2621
|
declare function registerConfiguredMcpCapabilityProvider(runtime: KodaXExtensionRuntime, servers: McpServersConfig | undefined, options?: McpProviderOptions): Promise<McpCapabilityProvider | undefined>;
|
|
2621
2622
|
|
|
2623
|
+
/**
|
|
2624
|
+
* FEATURE_222 — build the MCP reverse-capability handlers from the host's
|
|
2625
|
+
* workspace + interaction surface, to inject into `McpCapabilityProvider`.
|
|
2626
|
+
*
|
|
2627
|
+
* This is the production wiring the CLI / ACP host uses so the agent-layer
|
|
2628
|
+
* reverse seam (roots / elicitation) is actually advertised + served, instead
|
|
2629
|
+
* of staying dormant (every reverse request -> -32601). Elicitation is opt-in
|
|
2630
|
+
* because it needs a live host UI.
|
|
2631
|
+
*/
|
|
2632
|
+
|
|
2633
|
+
interface McpReverseWorkspace {
|
|
2634
|
+
/** The directory KodaX is operating in (the project root). */
|
|
2635
|
+
readonly cwd: string;
|
|
2636
|
+
/** The git root, when it differs from cwd. */
|
|
2637
|
+
readonly gitRoot?: string;
|
|
2638
|
+
/** Extra working directories to expose as roots. */
|
|
2639
|
+
readonly extraRoots?: readonly string[];
|
|
2640
|
+
/**
|
|
2641
|
+
* Advertise + serve elicitation (form + url) by routing server requests to the
|
|
2642
|
+
* live user-interaction surface registered via `setActiveUserInteraction`.
|
|
2643
|
+
* When no surface is live (headless / between turns) the handler declines.
|
|
2644
|
+
*/
|
|
2645
|
+
readonly enableElicitation?: boolean;
|
|
2646
|
+
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Compute the workspace roots a server should see, as `file://` URIs (the spec
|
|
2649
|
+
* requires `file://`). De-duplicated; the project cwd comes first.
|
|
2650
|
+
*/
|
|
2651
|
+
declare function mcpRootsFromWorkspace(workspace: McpReverseWorkspace): McpRoot[];
|
|
2652
|
+
declare function buildMcpReverseCapabilities(workspace: McpReverseWorkspace): McpReverseCapabilities | undefined;
|
|
2653
|
+
|
|
2622
2654
|
type OfficialSandboxMode = 'enforced' | 'best_effort';
|
|
2623
2655
|
interface OfficialSandboxOptions {
|
|
2624
2656
|
workspaceRoot: string;
|
|
@@ -4695,8 +4727,8 @@ declare function isValidTokenBudget(value: unknown): value is number | null;
|
|
|
4695
4727
|
* agent-layer `RunOptions.stopHook` fires. This module:
|
|
4696
4728
|
*
|
|
4697
4729
|
* 1. Runs a second-pass LLM verification call (independent context,
|
|
4698
|
-
* configurable model — usually a strong family)
|
|
4699
|
-
* `
|
|
4730
|
+
* configurable model — usually a strong family) with a forced
|
|
4731
|
+
* `emit_sidecar_verdict` tool call
|
|
4700
4732
|
* 2. Maps the 3-state verdict ('accept' / 'revise' / 'blocked') to
|
|
4701
4733
|
* the agent-layer `StopHookResult` 3-state surface
|
|
4702
4734
|
* (undefined / string / {abort, reason})
|
|
@@ -4704,26 +4736,23 @@ declare function isValidTokenBudget(value: unknown): value is number | null;
|
|
|
4704
4736
|
* call, or parse failure → default `'accept'` (do not block the
|
|
4705
4737
|
* happy path)
|
|
4706
4738
|
*
|
|
4739
|
+
* **FEATURE_215 (v0.7.49)**: the domain-neutral invocation skeleton
|
|
4740
|
+
* (stream → fuzzy-match → parse → timeout-race → fail-open) now lives in
|
|
4741
|
+
* `@kodax-ai/agent` as `invokeLlmJudge` / `createLlmJudgedStopHook`. This
|
|
4742
|
+
* module is a thin consumer: it injects the verifier-specific prompt,
|
|
4743
|
+
* report tool, verdict parser, default-verdict mapping, and verdict
|
|
4744
|
+
* landing. Per ADR-030 the concrete judging (prompt, file-edit evidence,
|
|
4745
|
+
* recorder bridge) stays here in coding.
|
|
4746
|
+
*
|
|
4707
4747
|
* **Model selection**: by default the verifier **inherits the Main
|
|
4708
|
-
* Agent's provider+model** (see `verifier-provider-resolver.ts`).
|
|
4709
|
-
*
|
|
4710
|
-
*
|
|
4711
|
-
* the in-chain Evaluator role), NOT automatic model-family decoupling.
|
|
4712
|
-
* Users who want to route around model quirks (e.g. zhipu/glm-5.1
|
|
4713
|
-
* intent-vs-action floor, memory: project_feature_167) can opt into
|
|
4714
|
-
* cross-family verification via `KODAX_VERIFIER_PROVIDER` +
|
|
4715
|
-
* `KODAX_VERIFIER_MODEL` env vars — provider injection here is the
|
|
4716
|
-
* indirection that makes that override possible.
|
|
4717
|
-
*
|
|
4718
|
-
* Phase D.1 scope (this commit): substrate module only. The
|
|
4719
|
-
* `createSidecarVerifierStopHook` factory returns a `StopHookFn` but it
|
|
4720
|
-
* is NOT yet wired into `runner-driven.ts`'s `runOnce` RunOptions —
|
|
4721
|
-
* that wiring is Phase D.2 (atomic swap with C.1/C.2/C.3).
|
|
4748
|
+
* Agent's provider+model** (see `verifier-provider-resolver.ts`). Users
|
|
4749
|
+
* who want cross-family verification can opt in via
|
|
4750
|
+
* `KODAX_VERIFIER_PROVIDER` + `KODAX_VERIFIER_MODEL` env vars.
|
|
4722
4751
|
*
|
|
4723
4752
|
* Design references:
|
|
4724
4753
|
* - ADR-030 (docs/ADR.md)
|
|
4725
4754
|
* - v0.7.45.md §FEATURE_184 Phase D
|
|
4726
|
-
* -
|
|
4755
|
+
* - v0.7.49.md §FEATURE_215 — kernel extraction
|
|
4727
4756
|
*
|
|
4728
4757
|
* DI-clean: provider injection is the only external surface. Tests
|
|
4729
4758
|
* pass a fake provider returning canned `{textBlocks, toolBlocks}`.
|
|
@@ -4781,15 +4810,15 @@ interface SidecarVerifierInvokeOptions {
|
|
|
4781
4810
|
readonly provider: KodaXBaseProvider;
|
|
4782
4811
|
/** Specific model id on the provider. When omitted, the provider's
|
|
4783
4812
|
* registered default model is used. Production wiring passes the
|
|
4784
|
-
* resolved model string from `resolveVerifierProvider()
|
|
4785
|
-
* selection is explicit (rather than implicitly inheriting whatever
|
|
4786
|
-
* default model the provider happens to ship). */
|
|
4813
|
+
* resolved model string from `resolveVerifierProvider()`. */
|
|
4787
4814
|
readonly model?: string;
|
|
4788
4815
|
/** Verifier context built by the caller (`buildVerifierContext`). */
|
|
4789
4816
|
readonly inputs: SidecarVerifierContextInputs;
|
|
4790
4817
|
/** Timeout in ms. Default 15000 (verification is heavier than F178
|
|
4791
4818
|
* anomaly detection's 5s budget). */
|
|
4792
4819
|
readonly timeoutMs?: number;
|
|
4820
|
+
/** Caller cancellation signal; forwarded to the verifier provider call. */
|
|
4821
|
+
readonly abortSignal?: AbortSignal;
|
|
4793
4822
|
}
|
|
4794
4823
|
|
|
4795
4824
|
/**
|
|
@@ -4928,5 +4957,508 @@ declare function languageIdForPath(filePath: string): string | undefined;
|
|
|
4928
4957
|
*/
|
|
4929
4958
|
declare function report(file: string, issues: readonly Diagnostic[]): string;
|
|
4930
4959
|
|
|
4931
|
-
|
|
4932
|
-
|
|
4960
|
+
/**
|
|
4961
|
+
* Predicate the parent REPL injects so the child executor can enforce plan-mode
|
|
4962
|
+
* constraints without `packages/coding` reverse-depending on `packages/repl`.
|
|
4963
|
+
*
|
|
4964
|
+
* The predicate MUST read the parent's permission mode lazily (e.g., through a
|
|
4965
|
+
* closure over a ref), so mid-run mode toggles propagate to in-flight child tool
|
|
4966
|
+
* calls. Returns the block reason (string) for tools/inputs that are currently
|
|
4967
|
+
* plan-mode-violating, or `null` when the call is allowed right now.
|
|
4968
|
+
*/
|
|
4969
|
+
type PlanModeBlockCheck = (tool: string, input: Record<string, unknown>) => string | null;
|
|
4970
|
+
interface ChildExecutorOptions {
|
|
4971
|
+
readonly maxParallel: number;
|
|
4972
|
+
readonly maxIterationsPerChild: number;
|
|
4973
|
+
readonly abortSignal?: AbortSignal;
|
|
4974
|
+
readonly parentOptions: Readonly<Partial<Pick<KodaXOptions, 'provider' | 'model' | 'reasoningMode' | 'extensionRuntime'>>>;
|
|
4975
|
+
readonly parentRole: string;
|
|
4976
|
+
readonly parentHarness: string;
|
|
4977
|
+
/**
|
|
4978
|
+
* FEATURE_217 (v0.7.49): set by the workflow agent backend to enable the
|
|
4979
|
+
* one-turn, no-tool self-distill digest for workflow-launched children.
|
|
4980
|
+
* Distinct from `parentHarness` because workflow children must keep
|
|
4981
|
+
* `parentHarness:'tool-dispatch'` so `validateWriteBundles` still admits
|
|
4982
|
+
* write children — the two concerns cannot share one field.
|
|
4983
|
+
*/
|
|
4984
|
+
readonly workflowChild?: boolean;
|
|
4985
|
+
/** Progress callback for REPL status display. Called when children start, progress, and complete. */
|
|
4986
|
+
readonly onProgress?: (status: string) => void;
|
|
4987
|
+
/**
|
|
4988
|
+
* FEATURE_074: Predicate provided by the parent REPL to evaluate plan-mode block
|
|
4989
|
+
* reasons at each child tool call. The predicate closes over parent state so
|
|
4990
|
+
* mid-run mode toggles propagate to in-flight children. When absent, children
|
|
4991
|
+
* run without plan-mode enforcement.
|
|
4992
|
+
*/
|
|
4993
|
+
readonly planModeBlockCheck?: PlanModeBlockCheck;
|
|
4994
|
+
/**
|
|
4995
|
+
* FEATURE_092 phase 2b.7b slice D: parent-Runner guardrails forwarded into
|
|
4996
|
+
* each child's `Runner.run` via `KodaXOptions.guardrails`. The auto-mode
|
|
4997
|
+
* guardrail's mutable state (engine + denialTracker + circuitBreaker) is
|
|
4998
|
+
* shared by passing the SAME instance — preventing children from reaching
|
|
4999
|
+
* a fresh threshold and bypassing the parent's downgrade.
|
|
5000
|
+
*/
|
|
5001
|
+
readonly guardrails?: readonly Guardrail[];
|
|
5002
|
+
/**
|
|
5003
|
+
* FEATURE_177 v0.7.45: optional bridge that feeds per-child events
|
|
5004
|
+
* (iteration start, tool-use start) into the parent's snapshot map.
|
|
5005
|
+
* Closes over `ctx.childProgressSnapshots` at the dispatch site so
|
|
5006
|
+
* the writer and `task_output` reader share one Map instance. Absent
|
|
5007
|
+
* on the sync-dispatch path (no in-flight state to peek at).
|
|
5008
|
+
*/
|
|
5009
|
+
readonly snapshotUpdater?: (event: ChildSnapshotEvent) => void;
|
|
5010
|
+
}
|
|
5011
|
+
|
|
5012
|
+
/**
|
|
5013
|
+
* FEATURE_217 (v0.7.49) Phase B — Coding workflow agent backend.
|
|
5014
|
+
*
|
|
5015
|
+
* Bridges the domain-neutral `WorkflowAgentBackend` (from
|
|
5016
|
+
* `@kodax-ai/agent/workflow`) onto KodaX's existing child-dispatch
|
|
5017
|
+
* substrate: `executeChildAgents` + per-child AbortController registry +
|
|
5018
|
+
* `childProgressSnapshots` + `MessageQueue` routing. It does NOT
|
|
5019
|
+
* duplicate the child state model — spawn/wait/output/stop/send all
|
|
5020
|
+
* reuse the same primitives `dispatch_child_task` / `task_output` /
|
|
5021
|
+
* `task_stop` / `send_message` already use.
|
|
5022
|
+
*
|
|
5023
|
+
* Each `spawn` launches one bundle through `executeChildAgents`
|
|
5024
|
+
* (maxParallel:1) without awaiting; the workflow runtime owns the
|
|
5025
|
+
* concurrency gate (Semaphore) so each backend spawn is a single child.
|
|
5026
|
+
*
|
|
5027
|
+
* Test seams (DI): `runChild` (defaults to `executeChildAgents`),
|
|
5028
|
+
* `queue`, `generateId`, `now`. Tests inject a fake `runChild` + a
|
|
5029
|
+
* minimal ctx so no real agents run.
|
|
5030
|
+
*/
|
|
5031
|
+
|
|
5032
|
+
/** The subset of `ChildExecutorOptions` the caller fixes once per run;
|
|
5033
|
+
* the adapter adds `maxParallel` / `abortSignal` / `snapshotUpdater`
|
|
5034
|
+
* per spawn. */
|
|
5035
|
+
type WorkflowChildOptions = Omit<ChildExecutorOptions, 'maxParallel' | 'abortSignal' | 'snapshotUpdater'>;
|
|
5036
|
+
interface CodingWorkflowBackendDeps {
|
|
5037
|
+
/** Parent tool-execution context (carries abort + snapshot registries). */
|
|
5038
|
+
readonly ctx: KodaXToolExecutionContext;
|
|
5039
|
+
/** Fixed per-run child options (parentRole / parentHarness / parentOptions
|
|
5040
|
+
* / maxIterationsPerChild / guardrails / …). */
|
|
5041
|
+
readonly childOptions: WorkflowChildOptions;
|
|
5042
|
+
/** Seam: child runner. Defaults to `executeChildAgents`. */
|
|
5043
|
+
readonly runChild?: (bundles: readonly KodaXChildContextBundle[], ctx: KodaXToolExecutionContext, options: ChildExecutorOptions) => Promise<KodaXChildExecutionResult>;
|
|
5044
|
+
/** Seam: message queue. Defaults to the process-global singleton. */
|
|
5045
|
+
readonly queue?: MessageQueue;
|
|
5046
|
+
/** Seam: unique child id generator. */
|
|
5047
|
+
readonly generateId?: () => string;
|
|
5048
|
+
/** Seam: clock for snapshot timestamps. */
|
|
5049
|
+
readonly now?: () => number;
|
|
5050
|
+
}
|
|
5051
|
+
/**
|
|
5052
|
+
* Build a `WorkflowAgentBackend` over the coding child-dispatch substrate.
|
|
5053
|
+
*/
|
|
5054
|
+
declare function createCodingWorkflowBackend(deps: CodingWorkflowBackendDeps): WorkflowAgentBackend;
|
|
5055
|
+
|
|
5056
|
+
/**
|
|
5057
|
+
* FEATURE_217 (v0.7.49) Phase C — Built-in read-only workflow.
|
|
5058
|
+
*
|
|
5059
|
+
* `parallel-investigation`: fan out several READ-ONLY investigators over
|
|
5060
|
+
* a question (optionally split by target areas), then synthesize their
|
|
5061
|
+
* findings into one ranked, evidence-keeping report. A failing
|
|
5062
|
+
* investigator degrades the synthesis (its gap is noted) rather than
|
|
5063
|
+
* crashing the whole run. Writes nothing — purely investigative.
|
|
5064
|
+
*/
|
|
5065
|
+
|
|
5066
|
+
interface ParallelInvestigationArgs {
|
|
5067
|
+
/** What to investigate. */
|
|
5068
|
+
readonly question: string;
|
|
5069
|
+
/** Optional target areas/paths — one investigator per target. When
|
|
5070
|
+
* absent, a small default set of generic angles is used. */
|
|
5071
|
+
readonly targets?: readonly string[];
|
|
5072
|
+
/** Synthesis rubric; sensible default when omitted. */
|
|
5073
|
+
readonly rubric?: string;
|
|
5074
|
+
/** Lifetime agent cap (investigators + 1 synthesizer). */
|
|
5075
|
+
readonly maxAgents?: number;
|
|
5076
|
+
/** In-flight investigator cap. */
|
|
5077
|
+
readonly maxConcurrency?: number;
|
|
5078
|
+
}
|
|
5079
|
+
interface InvestigationFinding {
|
|
5080
|
+
readonly angle: string;
|
|
5081
|
+
readonly status: 'completed' | 'failed';
|
|
5082
|
+
readonly text: string;
|
|
5083
|
+
}
|
|
5084
|
+
interface ParallelInvestigationResult {
|
|
5085
|
+
readonly synthesis: string;
|
|
5086
|
+
readonly findings: readonly InvestigationFinding[];
|
|
5087
|
+
/** True when ≥1 investigator failed and the synthesis ran degraded. */
|
|
5088
|
+
readonly degraded: boolean;
|
|
5089
|
+
}
|
|
5090
|
+
declare const parallelInvestigation: WorkflowModule<ParallelInvestigationArgs, ParallelInvestigationResult>;
|
|
5091
|
+
|
|
5092
|
+
/**
|
|
5093
|
+
* FEATURE_217 (v0.7.49) Phase D — Durable workflow run graph.
|
|
5094
|
+
*
|
|
5095
|
+
* Persists a workflow run as `run.json` + append-only `events.jsonl` +
|
|
5096
|
+
* `artifacts/` under a caller-supplied run directory (the REPL points
|
|
5097
|
+
* this at `~/.kodax/workflow-runs/<project-key>/<runId>/` via
|
|
5098
|
+
* `getAgentConfigPath`). Modelling the run as an event stream — not a
|
|
5099
|
+
* single summary blob — keeps the agent relationships (spawn / message /
|
|
5100
|
+
* complete / synthesize) inspectable after the fact.
|
|
5101
|
+
*
|
|
5102
|
+
* `appendFileSync` is used for events so the on-disk order matches the
|
|
5103
|
+
* recorder's `seq` order with no async interleave.
|
|
5104
|
+
*/
|
|
5105
|
+
|
|
5106
|
+
interface RunGraphWriterDeps {
|
|
5107
|
+
/** Clock for the per-event `ts` stamp. Defaults to `Date.now`. */
|
|
5108
|
+
readonly now?: () => number;
|
|
5109
|
+
}
|
|
5110
|
+
interface RunJsonInput {
|
|
5111
|
+
readonly meta: WorkflowMeta;
|
|
5112
|
+
readonly args: unknown;
|
|
5113
|
+
readonly state: WorkflowRunState;
|
|
5114
|
+
readonly startedAt: number;
|
|
5115
|
+
readonly endedAt: number;
|
|
5116
|
+
readonly scriptSnapshot?: WorkflowScriptSnapshotRef;
|
|
5117
|
+
}
|
|
5118
|
+
interface WorkflowScriptSnapshotInput {
|
|
5119
|
+
readonly source: string;
|
|
5120
|
+
readonly manifest?: WorkflowScriptManifest;
|
|
5121
|
+
}
|
|
5122
|
+
interface WorkflowScriptSnapshotRef {
|
|
5123
|
+
readonly scriptPath: string;
|
|
5124
|
+
readonly manifestPath?: string;
|
|
5125
|
+
}
|
|
5126
|
+
interface RunGraphWriter {
|
|
5127
|
+
readonly runDir: string;
|
|
5128
|
+
/** Append one event to `events.jsonl`. */
|
|
5129
|
+
onEvent(event: WorkflowEvent): void;
|
|
5130
|
+
/** Persist an artifact under `artifacts/<safe-name>.json`. */
|
|
5131
|
+
writeArtifact(name: string, value: unknown): WorkflowArtifactRef;
|
|
5132
|
+
/** Persist generated workflow source + optional manifest beside run.json. */
|
|
5133
|
+
writeScriptSnapshot(input: WorkflowScriptSnapshotInput): WorkflowScriptSnapshotRef;
|
|
5134
|
+
/** Write the terminal `run.json` summary. */
|
|
5135
|
+
writeRunJson(input: RunJsonInput): void;
|
|
5136
|
+
}
|
|
5137
|
+
declare function safeWorkflowArtifactName(name: string): string;
|
|
5138
|
+
declare function createRunGraphWriter(runDir: string, deps?: RunGraphWriterDeps): RunGraphWriter;
|
|
5139
|
+
|
|
5140
|
+
interface WorktreeSweepDeps {
|
|
5141
|
+
/** Run a git subcommand from `cwd`, resolving stdout. Defaults to `execFile`. */
|
|
5142
|
+
readonly runGit?: (args: readonly string[], cwd: string) => Promise<string>;
|
|
5143
|
+
/** Worktree directory mtime in ms. Defaults to `statSync`. Layer 3 only. */
|
|
5144
|
+
readonly mtimeMs?: (path: string) => number;
|
|
5145
|
+
/** Clock for staleness comparison. Defaults to `Date.now`. Layer 3 only. */
|
|
5146
|
+
readonly now?: () => number;
|
|
5147
|
+
}
|
|
5148
|
+
|
|
5149
|
+
/**
|
|
5150
|
+
* FEATURE_217 (v0.7.49) Phase D — Headless workflow orchestrator.
|
|
5151
|
+
*
|
|
5152
|
+
* Ties together: the approval gate, the coding agent backend (Phase B),
|
|
5153
|
+
* the durable run-graph writer, and the agent-layer `runWorkflow`
|
|
5154
|
+
* envelope. This is the REPL-agnostic core the `/workflow` command
|
|
5155
|
+
* (Phase D.2) drives; it is fully testable with a fake backend + temp
|
|
5156
|
+
* run dir + a stub approval callback.
|
|
5157
|
+
*/
|
|
5158
|
+
|
|
5159
|
+
declare const SYSTEM_WORKFLOW_LIMITS: {
|
|
5160
|
+
readonly maxAgents: 64;
|
|
5161
|
+
readonly maxConcurrency: 16;
|
|
5162
|
+
readonly tokenBudget: 200000;
|
|
5163
|
+
};
|
|
5164
|
+
interface RunWorkflowModuleOptions {
|
|
5165
|
+
readonly module: WorkflowModule;
|
|
5166
|
+
readonly args: unknown;
|
|
5167
|
+
readonly runId: string;
|
|
5168
|
+
/** Directory for the durable run graph (run.json / events.jsonl / artifacts). */
|
|
5169
|
+
readonly runDir: string;
|
|
5170
|
+
/** Parent context — required when the backend is built internally. */
|
|
5171
|
+
readonly ctx?: KodaXToolExecutionContext;
|
|
5172
|
+
/** Per-run child options — required when the backend is built internally. */
|
|
5173
|
+
readonly childOptions?: WorkflowChildOptions;
|
|
5174
|
+
/** Pre-built backend (test seam). When omitted, built from ctx + childOptions. */
|
|
5175
|
+
readonly backend?: WorkflowAgentBackend;
|
|
5176
|
+
/** Approval gate. When omitted, the run auto-proceeds (SDK / headless). */
|
|
5177
|
+
readonly approval?: WorkflowApproval;
|
|
5178
|
+
readonly signal?: AbortSignal;
|
|
5179
|
+
/** Extra event sink (e.g. live UI), in addition to the durable writer. */
|
|
5180
|
+
readonly onEvent?: (event: WorkflowEvent) => void;
|
|
5181
|
+
readonly now?: () => number;
|
|
5182
|
+
readonly scriptSnapshot?: WorkflowScriptSnapshotInput;
|
|
5183
|
+
/** Optional lifecycle gate, used by WorkflowRunManager pause/resume. */
|
|
5184
|
+
readonly beforeSpawn?: () => Promise<void>;
|
|
5185
|
+
/** Test seam: inject git/mtime for the worktree sweep (FEATURE_217 Layer 2/3). */
|
|
5186
|
+
readonly worktreeSweepDeps?: WorktreeSweepDeps;
|
|
5187
|
+
}
|
|
5188
|
+
type RunWorkflowModuleOutcome = {
|
|
5189
|
+
readonly kind: 'denied';
|
|
5190
|
+
readonly summary: WorkflowApprovalSummary;
|
|
5191
|
+
} | {
|
|
5192
|
+
readonly kind: 'completed';
|
|
5193
|
+
readonly result: unknown;
|
|
5194
|
+
readonly state: WorkflowRunState;
|
|
5195
|
+
} | {
|
|
5196
|
+
readonly kind: 'failed';
|
|
5197
|
+
readonly error: Error;
|
|
5198
|
+
readonly state: WorkflowRunState;
|
|
5199
|
+
};
|
|
5200
|
+
/** Build the pre-run approval summary from a workflow module's metadata. */
|
|
5201
|
+
declare function buildApprovalSummary(module: WorkflowModule): WorkflowApprovalSummary;
|
|
5202
|
+
declare function clampWorkflowLimits(meta: WorkflowMeta): WorkflowLimits;
|
|
5203
|
+
/**
|
|
5204
|
+
* Run a workflow module end-to-end: approval → runtime + backend +
|
|
5205
|
+
* durable run graph → terminal `run.json`. A workflow execution failure
|
|
5206
|
+
* surfaces as `{ kind: 'failed' }` and a denied approval as
|
|
5207
|
+
* `{ kind: 'denied' }`. Only a misconfiguration (no backend AND no
|
|
5208
|
+
* ctx+childOptions) throws — that is a programmer precondition error.
|
|
5209
|
+
*/
|
|
5210
|
+
declare function runWorkflowModule(opts: RunWorkflowModuleOptions): Promise<RunWorkflowModuleOutcome>;
|
|
5211
|
+
interface RunWorkflowFromOptionsInput {
|
|
5212
|
+
readonly module: WorkflowModule;
|
|
5213
|
+
readonly args: unknown;
|
|
5214
|
+
readonly options: KodaXOptions;
|
|
5215
|
+
readonly runId: string;
|
|
5216
|
+
readonly runDir: string;
|
|
5217
|
+
readonly approval?: WorkflowApproval;
|
|
5218
|
+
readonly signal?: AbortSignal;
|
|
5219
|
+
readonly onEvent?: (event: WorkflowEvent) => void;
|
|
5220
|
+
readonly now?: () => number;
|
|
5221
|
+
readonly scriptSnapshot?: WorkflowScriptSnapshotInput;
|
|
5222
|
+
readonly beforeSpawn?: () => Promise<void>;
|
|
5223
|
+
}
|
|
5224
|
+
/**
|
|
5225
|
+
* High-level entry: build a tool-execution context + child options from
|
|
5226
|
+
* `KodaXOptions` (provider / model / extensionRuntime) and run the
|
|
5227
|
+
* workflow module. ctx construction stays inside `@kodax-ai/coding` — the
|
|
5228
|
+
* REPL passes plain `KodaXOptions` (from `createKodaXOptions`) rather than
|
|
5229
|
+
* reaching into run-loop internals.
|
|
5230
|
+
*/
|
|
5231
|
+
declare function runWorkflowFromOptions(input: RunWorkflowFromOptionsInput): Promise<RunWorkflowModuleOutcome>;
|
|
5232
|
+
|
|
5233
|
+
/**
|
|
5234
|
+
* FEATURE_217 (v0.7.49) Phase E — Saved workflow discovery + loading.
|
|
5235
|
+
*
|
|
5236
|
+
* Discovers user-authored workflows from `.kodax/workflows/` (project)
|
|
5237
|
+
* and `~/.kodax/workflows/` (personal), project winning on name
|
|
5238
|
+
* conflict. Loading reuses the proven Self-Construction pattern
|
|
5239
|
+
* (`await import(pathToFileURL(...))`, FEATURE_088 load-handler) — no
|
|
5240
|
+
* transpiler dependency: `.ts` resolves under a tsx runtime (dev), `.js`
|
|
5241
|
+
* / `.mjs` resolve in compiled binaries.
|
|
5242
|
+
*
|
|
5243
|
+
* SECURITY: loading a saved workflow EXECUTES local code. The REPL gates
|
|
5244
|
+
* the first run of any discovered file behind a trusted-local
|
|
5245
|
+
* confirmation (Phase D.2 command) — discovery itself only reads paths.
|
|
5246
|
+
*/
|
|
5247
|
+
|
|
5248
|
+
type SavedWorkflowSource = 'project' | 'personal';
|
|
5249
|
+
type SavedWorkflowExecution = 'trusted-local' | 'capability-generated';
|
|
5250
|
+
interface SavedWorkflowRef {
|
|
5251
|
+
/** Workflow name = filename without extension. */
|
|
5252
|
+
readonly name: string;
|
|
5253
|
+
readonly path: string;
|
|
5254
|
+
readonly source: SavedWorkflowSource;
|
|
5255
|
+
readonly execution: SavedWorkflowExecution;
|
|
5256
|
+
}
|
|
5257
|
+
interface SavedWorkflowDirs {
|
|
5258
|
+
/** `.kodax/workflows` relative to the project root. */
|
|
5259
|
+
readonly project?: string;
|
|
5260
|
+
/** `~/.kodax/workflows`. */
|
|
5261
|
+
readonly personal?: string;
|
|
5262
|
+
}
|
|
5263
|
+
interface SavedGeneratedWorkflowFile {
|
|
5264
|
+
readonly manifest: WorkflowScriptManifest;
|
|
5265
|
+
readonly source: string;
|
|
5266
|
+
readonly capsule?: WorkflowCapsule;
|
|
5267
|
+
readonly legacy?: boolean;
|
|
5268
|
+
}
|
|
5269
|
+
interface SaveGeneratedWorkflowInput {
|
|
5270
|
+
readonly dir: string;
|
|
5271
|
+
readonly name: string;
|
|
5272
|
+
readonly manifest: WorkflowScriptManifest;
|
|
5273
|
+
readonly source: string;
|
|
5274
|
+
readonly intent?: WorkflowCapsuleIntent;
|
|
5275
|
+
readonly inputs?: WorkflowCapsuleInputs;
|
|
5276
|
+
readonly requires?: WorkflowCapsuleRequirements;
|
|
5277
|
+
readonly provenance?: WorkflowCapsuleProvenance;
|
|
5278
|
+
readonly minKodaxVersion?: string;
|
|
5279
|
+
}
|
|
5280
|
+
interface SaveGeneratedWorkflowFromRunInput {
|
|
5281
|
+
readonly runDir: string;
|
|
5282
|
+
readonly targetDir: string;
|
|
5283
|
+
readonly name: string;
|
|
5284
|
+
}
|
|
5285
|
+
interface LoadGeneratedWorkflowFromRunInput {
|
|
5286
|
+
readonly runDir: string;
|
|
5287
|
+
}
|
|
5288
|
+
interface LoadedGeneratedWorkflowFromRun {
|
|
5289
|
+
readonly capsule: WorkflowCapsule;
|
|
5290
|
+
readonly module: WorkflowModule;
|
|
5291
|
+
}
|
|
5292
|
+
interface WorkflowCapsulePreflightIssue {
|
|
5293
|
+
readonly severity: 'error' | 'warning';
|
|
5294
|
+
readonly requirement: string;
|
|
5295
|
+
readonly message: string;
|
|
5296
|
+
}
|
|
5297
|
+
interface WorkflowCapsulePreflightResult {
|
|
5298
|
+
readonly ok: boolean;
|
|
5299
|
+
readonly issues: readonly WorkflowCapsulePreflightIssue[];
|
|
5300
|
+
}
|
|
5301
|
+
interface WorkflowCapsulePreflightEnvironment {
|
|
5302
|
+
readonly kodaxVersion?: string;
|
|
5303
|
+
readonly isGitRepo?: boolean;
|
|
5304
|
+
readonly worktreeCapable?: boolean;
|
|
5305
|
+
readonly availableTools?: readonly string[];
|
|
5306
|
+
readonly availableMcp?: readonly string[];
|
|
5307
|
+
readonly availableSkills?: readonly string[];
|
|
5308
|
+
}
|
|
5309
|
+
/**
|
|
5310
|
+
* Discover saved workflows across the project + personal dirs. On a name
|
|
5311
|
+
* conflict the project copy wins. Result is sorted by name.
|
|
5312
|
+
*/
|
|
5313
|
+
declare function discoverSavedWorkflows(dirs: SavedWorkflowDirs): Promise<SavedWorkflowRef[]>;
|
|
5314
|
+
/**
|
|
5315
|
+
* Normalize a loaded module into a `WorkflowModule`. Accepts:
|
|
5316
|
+
* - `export default { meta, run }`
|
|
5317
|
+
* - `export const workflow = {...}` (meta) + `export default <run fn>`
|
|
5318
|
+
* - `export const meta` + `export const run`
|
|
5319
|
+
*/
|
|
5320
|
+
declare function normalizeWorkflowModule(mod: Record<string, unknown>): WorkflowModule;
|
|
5321
|
+
declare function loadSavedWorkflowCapsule(filePath: string): Promise<WorkflowCapsule>;
|
|
5322
|
+
/** Dynamically import + normalize a saved workflow file. Executes local code. */
|
|
5323
|
+
declare function loadSavedWorkflow(filePath: string): Promise<WorkflowModule>;
|
|
5324
|
+
declare function saveGeneratedWorkflow(input: SaveGeneratedWorkflowInput): Promise<SavedWorkflowRef>;
|
|
5325
|
+
declare function loadGeneratedWorkflowFromRun(input: LoadGeneratedWorkflowFromRunInput): Promise<LoadedGeneratedWorkflowFromRun>;
|
|
5326
|
+
declare function saveGeneratedWorkflowFromRun(input: SaveGeneratedWorkflowFromRunInput): Promise<SavedWorkflowRef>;
|
|
5327
|
+
declare function preflightWorkflowCapsule(capsule: WorkflowCapsule, env?: WorkflowCapsulePreflightEnvironment): WorkflowCapsulePreflightResult;
|
|
5328
|
+
|
|
5329
|
+
type ManagedWorkflowStatus = 'running' | 'paused' | 'completed' | 'failed' | 'denied' | 'stopped';
|
|
5330
|
+
interface ManagedWorkflowSnapshot {
|
|
5331
|
+
readonly runId: string;
|
|
5332
|
+
readonly workflow: string;
|
|
5333
|
+
readonly status: ManagedWorkflowStatus;
|
|
5334
|
+
readonly runDir: string;
|
|
5335
|
+
readonly totalSpawned: number;
|
|
5336
|
+
readonly eventCount: number;
|
|
5337
|
+
readonly startedAt: number;
|
|
5338
|
+
readonly endedAt?: number;
|
|
5339
|
+
readonly error?: string;
|
|
5340
|
+
readonly resultText?: string;
|
|
5341
|
+
}
|
|
5342
|
+
interface ManagedWorkflowRun {
|
|
5343
|
+
readonly runId: string;
|
|
5344
|
+
readonly done: Promise<RunWorkflowModuleOutcome>;
|
|
5345
|
+
readonly getSnapshot?: () => ManagedWorkflowSnapshot | undefined;
|
|
5346
|
+
}
|
|
5347
|
+
interface WorkflowRunManager {
|
|
5348
|
+
start(opts: RunWorkflowModuleOptions): ManagedWorkflowRun;
|
|
5349
|
+
startFromOptions(input: RunWorkflowFromOptionsInput): ManagedWorkflowRun;
|
|
5350
|
+
list(): readonly ManagedWorkflowSnapshot[];
|
|
5351
|
+
get(runId: string): ManagedWorkflowSnapshot | undefined;
|
|
5352
|
+
pause(runId: string): boolean;
|
|
5353
|
+
resume(runId: string): boolean;
|
|
5354
|
+
stop(runId: string, reason?: string): boolean;
|
|
5355
|
+
}
|
|
5356
|
+
declare function createWorkflowRunManager(deps?: {
|
|
5357
|
+
readonly now?: () => number;
|
|
5358
|
+
}): WorkflowRunManager;
|
|
5359
|
+
declare function getDefaultWorkflowRunManager(): WorkflowRunManager;
|
|
5360
|
+
|
|
5361
|
+
/**
|
|
5362
|
+
* FEATURE_217 (v0.7.49) Phase G — LLM-generated workflow scripts.
|
|
5363
|
+
*
|
|
5364
|
+
* The generator is intentionally small: one text-only LLM call must return
|
|
5365
|
+
* structured JSON, which is validated before it can become a capability-routed
|
|
5366
|
+
* workflow module. Execution safety belongs to the WorkflowApi command bridge;
|
|
5367
|
+
* this file adds an earlier prompt/output gate so bad generations fail closed.
|
|
5368
|
+
*/
|
|
5369
|
+
|
|
5370
|
+
declare const WORKFLOW_GENERATION_SYSTEM_PROMPT: string;
|
|
5371
|
+
declare const DEFAULT_WORKFLOW_GENERATION_TIMEOUT_MS = 120000;
|
|
5372
|
+
interface WorkflowGenerationTextRequest {
|
|
5373
|
+
readonly system: string;
|
|
5374
|
+
readonly prompt: string;
|
|
5375
|
+
readonly signal?: AbortSignal;
|
|
5376
|
+
}
|
|
5377
|
+
type WorkflowGenerationTextFn = (request: WorkflowGenerationTextRequest) => Promise<string>;
|
|
5378
|
+
interface GenerateWorkflowInput {
|
|
5379
|
+
readonly request: string;
|
|
5380
|
+
readonly generateText: WorkflowGenerationTextFn;
|
|
5381
|
+
readonly signal?: AbortSignal;
|
|
5382
|
+
}
|
|
5383
|
+
interface GenerateWorkflowFromOptionsInput {
|
|
5384
|
+
readonly request: string;
|
|
5385
|
+
readonly options: KodaXOptions;
|
|
5386
|
+
readonly timeoutMs?: number;
|
|
5387
|
+
readonly signal?: AbortSignal;
|
|
5388
|
+
}
|
|
5389
|
+
interface GeneratedWorkflow {
|
|
5390
|
+
readonly manifest: WorkflowScriptManifest;
|
|
5391
|
+
readonly source: string;
|
|
5392
|
+
readonly module: WorkflowModule;
|
|
5393
|
+
readonly scriptSnapshot: WorkflowScriptSnapshotInput;
|
|
5394
|
+
readonly approvalSummary: string;
|
|
5395
|
+
readonly rawText: string;
|
|
5396
|
+
}
|
|
5397
|
+
type WorkflowGenerationResult = {
|
|
5398
|
+
readonly kind: 'declined';
|
|
5399
|
+
readonly reason: string;
|
|
5400
|
+
readonly rawText: string;
|
|
5401
|
+
} | ({
|
|
5402
|
+
readonly kind: 'generated';
|
|
5403
|
+
} & GeneratedWorkflow);
|
|
5404
|
+
declare function resolveWorkflowGenerationTimeoutMs(env?: NodeJS.ProcessEnv): number;
|
|
5405
|
+
declare function validateGeneratedWorkflowSource(source: string): string;
|
|
5406
|
+
declare function buildWorkflowGenerationUserPrompt(request: string): string;
|
|
5407
|
+
interface ParseWorkflowGenerationOptions {
|
|
5408
|
+
readonly request?: string;
|
|
5409
|
+
}
|
|
5410
|
+
declare function parseWorkflowGeneration(rawText: string, options?: ParseWorkflowGenerationOptions): WorkflowGenerationResult;
|
|
5411
|
+
declare function generateWorkflow(input: GenerateWorkflowInput): Promise<WorkflowGenerationResult>;
|
|
5412
|
+
declare function generateWorkflowFromOptions(input: GenerateWorkflowFromOptionsInput): Promise<WorkflowGenerationResult>;
|
|
5413
|
+
|
|
5414
|
+
/**
|
|
5415
|
+
* FEATURE_217 (v0.7.49) Phase J — small reusable workflow pattern templates.
|
|
5416
|
+
*
|
|
5417
|
+
* These are examples, not a new abstraction layer. They give the generator
|
|
5418
|
+
* and users concrete Claude-style workflow shapes without forcing every task
|
|
5419
|
+
* through a static harness.
|
|
5420
|
+
*/
|
|
5421
|
+
|
|
5422
|
+
interface WorkflowPatternTemplate {
|
|
5423
|
+
readonly name: string;
|
|
5424
|
+
readonly pattern: WorkflowPatternId;
|
|
5425
|
+
readonly description: string;
|
|
5426
|
+
readonly manifest: WorkflowScriptManifest;
|
|
5427
|
+
readonly source: string;
|
|
5428
|
+
}
|
|
5429
|
+
declare function listWorkflowPatternTemplates(): readonly WorkflowPatternTemplate[];
|
|
5430
|
+
declare function getWorkflowPatternTemplate(name: string): WorkflowPatternTemplate | undefined;
|
|
5431
|
+
declare function createWorkflowPatternTemplateModule(name: string): WorkflowModule;
|
|
5432
|
+
|
|
5433
|
+
type WorkflowInvocationSource = 'natural-language' | 'command';
|
|
5434
|
+
type WorkflowInvocationAction = 'none' | 'suggest' | 'auto-start';
|
|
5435
|
+
type WorkflowInvocationTrigger = 'explicit' | 'complexity' | 'negated' | 'none';
|
|
5436
|
+
interface WorkflowInvocationPolicyInput {
|
|
5437
|
+
readonly agentMode: KodaXAgentMode;
|
|
5438
|
+
readonly source: WorkflowInvocationSource;
|
|
5439
|
+
readonly input: string;
|
|
5440
|
+
}
|
|
5441
|
+
interface WorkflowInvocationPolicyDecision {
|
|
5442
|
+
readonly action: WorkflowInvocationAction;
|
|
5443
|
+
readonly trigger: WorkflowInvocationTrigger;
|
|
5444
|
+
readonly reason: string;
|
|
5445
|
+
}
|
|
5446
|
+
declare function decideWorkflowInvocation(input: WorkflowInvocationPolicyInput): WorkflowInvocationPolicyDecision;
|
|
5447
|
+
|
|
5448
|
+
/**
|
|
5449
|
+
* FEATURE_217 (v0.7.49) — `@kodax-ai/coding` workflows barrel.
|
|
5450
|
+
*
|
|
5451
|
+
* Exposes the workflow agent backend (Phase B), the built-in read-only
|
|
5452
|
+
* workflows (Phase C), and a name-keyed registry the REPL `/workflow`
|
|
5453
|
+
* command (Phase D) resolves against.
|
|
5454
|
+
*/
|
|
5455
|
+
|
|
5456
|
+
/** All built-in workflows shipped with KodaX. */
|
|
5457
|
+
declare const BUILTIN_WORKFLOWS: readonly WorkflowModule[];
|
|
5458
|
+
/** Resolve a built-in workflow by its declared `meta.name`. */
|
|
5459
|
+
declare function getBuiltinWorkflow(name: string): WorkflowModule | undefined;
|
|
5460
|
+
/** List built-in workflow metadata (for `/workflow` listing). */
|
|
5461
|
+
declare function listBuiltinWorkflows(): readonly WorkflowModule['meta'][];
|
|
5462
|
+
|
|
5463
|
+
export { Agent, AgentMessage, AutoRules, BLOCKER_REQUIRED_CONSECUTIVE_TURNS, BUILTIN_WORKFLOWS, 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, 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, FailureStage, GENERATOR_AGENT_NAME, GoalCompleteResult, Guardrail, KODAX_TOOLS, KodaXAgentMode, KodaXAmaControllerDecision, KodaXBaseProvider, KodaXChildContextBundle, KodaXClient, KodaXContentBlock, KodaXContextOptions, KodaXEvents, KodaXExecutionMode, KodaXExtensionRuntime, KodaXExtensionSessionRecord, KodaXFanoutBranchRecord, KodaXFanoutBranchTransition, KodaXFanoutSchedulerInput, KodaXFanoutSchedulerPlan, KodaXInputArtifact, KodaXJsonValue, KodaXManualTopicId, KodaXMessage, KodaXOptions, KodaXParentReductionContract, KodaXProviderCapabilityProfile, KodaXProviderPolicyHints, KodaXReasoningCapability, KodaXReasoningMode, KodaXRepoIntelligenceCapability, KodaXRepoIntelligenceMode, KodaXRepoIntelligenceResolvedMode, KodaXRepoIntelligenceTrace, KodaXRepoRoutingSignals, KodaXResult, KodaXSessionControl, KodaXSessionError, KodaXSessionMutators, KodaXTaskRoutingDecision, KodaXTaskType, KodaXTerminalError, KodaXThinkingDepth, KodaXTokenUsage, KodaXToolDefinition, KodaXToolError, KodaXToolExecutionContext, KodaXToolUseBlock, 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, REPOINTEL_DEFAULT_ENDPOINT, RecoveryDecision, RecoveryResult, ResilienceClassification, ResolveKodaXManualInput, ResolveKodaXManualOptions, ResolveKodaXManualResult, SCOUT_AGENT_NAME, SELF_KNOWLEDGE_ROUTING_RULE, SYSTEM_PROMPT, SYSTEM_WORKFLOW_LIMITS, SessionErrorMetadata, SignalCollector, StableBoundaryTracker, TASK_ENGINE_ROLE_AGENTS, TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME, TRACING_ENV, ToolCallSignal, WORKER_AGENT_NAME, WORKFLOW_GENERATION_SYSTEM_PROMPT, _resetRuntimeForTesting, activate, analyzeChangedScope, appendAuditEntry, applyAccountingDelta, applyFanoutBranchTransition, applyToolResultGuardrail, assignFanoutBranchWorker, bashSignalCollector, bootstrapTracing, boundedRevise, budgetCeiling, buildAmaControllerDecision, buildApprovalSummary, buildBlockedGoal, buildCapabilityContextSections, buildClassifierPrompt, buildCompleteGoal, buildCreatedGoal, buildFallbackRoutingDecision, buildFanoutSchedulerPlan, buildLlmReviewPrompt, buildMcpReverseCapabilities, buildPausedGoal, buildPromptMessageContent, buildPromptOverlay, buildPromptSnapshot, buildProviderCapabilitySnapshot, buildProviderPolicyHintsForDecision, buildProviderPolicyPromptNotes, buildRepoIntelligenceContext, buildRepoIntelligenceIndex, buildRepoOverview, buildResumedGoal, buildSelfKnowledgeRoutingRule, buildSystemPrompt, buildSystemPromptSnapshot, buildWorkflowGenerationUserPrompt, checkAbsoluteDeny, checkIncompleteToolCalls, checkPromiseSignal, clampWorkflowLimits, classify, classifyBashCommand, classifyError, classifyResilienceError, computeInputSignature, configureRuntime, convertCapabilityReadResult, convertProviderSearchResults, countActiveFanoutBranches, createBashClassifierConfig, createBuiltinToolDefinition, createCodingWorkflowBackend, createCtxProxy, createDefaultCodingAgent, createDenialTracker, createExtensionRuntime, createFanoutSchedulerInput, createKodaXTaskRunner, createPromptSection, createReasoningPlan, createRunGraphWriter, createSessionControl, createToolResultTruncationGuardrail, createWorkflowPatternTemplateModule, createWorkflowRunManager, decideWorkflowInvocation, defaultPolicy, disableSelfModify, discoverMarkdownAgents, discoverSavedWorkflows, drainPendingSwaps, emitVerdict, evaluateProviderPolicy, exec, executeTool, extractComparableUserMessageText, extractHtmlTitle, extractPromptComparableText, fileSignalCollector, finalizeRetrievalResult, findByVersion, formatParallelDispatchResult, formatSize, generateWorkflow, generateWorkflowFromOptions, getActiveExtensionRuntime, getAllRegisteredTools, getBuiltinRegisteredToolDefinition, getBuiltinToolDefinition, getBuiltinWorkflow, getDefaultWorkflowRunManager, getDenialContext, getFanoutBranch, getImpactEstimate, getModuleContext, getProcessContext, getRegisteredToolDefinition, getRepoIntelligenceIndex, getRepoOverview, getRepoRoutingSignals, getRequiredToolParams, getSymbolContext, getTool, getToolDefinition, getToolRegistrations, getToolResultPolicy, getWorkflowPatternTemplate, goalTokenDelta, hasPendingSwap, inferTaskType, inspectEditFailure, inspectRepoIntelligenceRuntime, isDeniedRecently, isParallelDispatchDirective, isToolFileMutation, isToolMutation, isToolPlanModeAllowed, isValidTokenBudget, languageIdForPath, listAll, list as listArtifacts, listBuiltinToolDefinitions, listBuiltinWorkflows, listConstructed, listToolDefinitions, listTools, listWorkflowPatternTemplates, loadAgentsFromMarkdown, loadGeneratedWorkflowFromRun, loadHandler, loadSavedWorkflow, loadSavedWorkflowCapsule, markFanoutBranchCancelled, markFanoutBranchCompleted, 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, renderChangedScope, renderImpactEstimate, renderModuleContext, renderProcessContext, renderPromptSections, renderRepoOverview, renderRetrievalResult, renderSymbolContext, report as reportLspDiagnostics, resetBlockerCounter, resetBudget, resolveClassifierModel, resolveConstructedAgent, resolveKodaXManual, resolveReasoningMode, resolveRepoIntelligenceMode, resolveRepoIntelligenceRuntimeConfig, resolveResilienceConfig, resolveToolCapability, resolveWorkflowGenerationTimeoutMs, revoke, rollbackSelfModify, runAstRules, runKodaX, runLlmReview, runManagedTask, runOrchestration, runWorkflowFromOptions, runWorkflowModule, safeWorkflowArtifactName, saveGeneratedWorkflow, saveGeneratedWorkflowFromRun, setActiveExtensionRuntime, shouldFlipBudgetLimited, speculativeRace, stage, startKodaX, 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, warmRepoIntelligenceRuntime, webhook, workerAgent };
|
|
5464
|
+
export type { AbsoluteDenyMatch, AbsoluteDenyMiss, AbsoluteDenyResult, AgentArtifact, ArtifactStatus, AstCheckResult, AstRuleId, AstRuleViolation, AuditEntry, AuditEventKind, BashClassificationResult, BashClassifierConfig, BashRiskLevel, BlockerAttemptResult, BootstrapTracingOptions, BudgetState, BuildClassifierPromptInput, BuildPromptInput, Capabilities, ChangedFileEntry, ChangedFileStatus, ChangedScopeAreaSummary, ChangedScopeReport, ClassifierDecision, ClassifierPrompt, ClassifyDecision, ClassifyOptions, CodingWorkflowBackendDeps, ConstructionArtifact, ConstructionPolicy, ConstructionPolicyVerdict, CreateCtxProxyOptions, CreateKodaXTaskRunnerOptions, DenialRecord, DenialTracker, DisableState, DiscoverMarkdownAgentsResult, DiscoveredMarkdownAgent, EditRecoveryDiagnostic, EditToolErrorCode, ErrorClassification, ExecOptions, ExecResult, ExtensionCommandContext, ExtensionCommandDefinition, ExtensionCommandInvocation, ExtensionCommandResult, ExtensionContributionSource, 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, ManagedWorkflowStatus, 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, RepoAreaKind, RepoAreaOverview, RepoIntelligenceIndex, RepoIntelligenceRuntimeInspection, RepoIntelligenceRuntimeWarmResult, 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, SpeculativeResult, StagedHandle, StripOptions, SymbolContextResult, TestArtifactOptions, TestResult, TierZeroPatternId, ToolContent, ToolDefinitionSource, ToolHandler, ToolRegistrationOptions, ToolRegistry, ToolSideEffect, VerifyGoalCompletionOptions, WebhookOptions, WebhookResult, WorkflowCapsulePreflightEnvironment, WorkflowCapsulePreflightIssue, WorkflowCapsulePreflightResult, WorkflowChildOptions, WorkflowGenerationResult, WorkflowGenerationTextFn, WorkflowGenerationTextRequest, WorkflowInvocationAction, WorkflowInvocationPolicyDecision, WorkflowInvocationPolicyInput, WorkflowInvocationSource, WorkflowInvocationTrigger, WorkflowPatternTemplate, WorkflowRunManager, WorkflowScriptSnapshotInput, WorkflowScriptSnapshotRef };
|