@kodax-ai/kodax 0.7.62 → 0.7.66
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 +2300 -2145
- package/README.md +81 -9
- package/README_CN.md +54 -5
- package/dist/chunks/{agent-4ZMCIEGD.js → agent-KER4WDNO.js} +1 -1
- package/dist/chunks/argument-completer-HK3MHA3K.js +2 -0
- package/dist/chunks/{chunk-ARUWXX25.js → chunk-35P7QL2Q.js} +1 -1
- package/dist/chunks/chunk-3HKBBY74.js +339 -0
- package/dist/chunks/chunk-AKBH2EEE.js +8 -0
- package/dist/chunks/{chunk-OGRJQGKO.js → chunk-ALS32RNZ.js} +1 -1
- package/dist/chunks/chunk-MHRN2LQV.js +328 -0
- package/dist/chunks/{chunk-JILSZHCQ.js → chunk-NBQW7PNZ.js} +2 -2
- package/dist/chunks/{chunk-S4GVQO3W.js → chunk-O7N22GJ3.js} +1 -1
- package/dist/chunks/chunk-ONUPGMER.js +2 -0
- package/dist/chunks/{chunk-ZL5CEANW.js → chunk-PZTG2C33.js} +1 -1
- package/dist/chunks/{chunk-AY3BLB4Q.js → chunk-QAQ2HNXD.js} +112 -112
- package/dist/chunks/{chunk-6OZ5KWG3.js → chunk-QJJKMNZF.js} +1 -1
- package/dist/chunks/chunk-QJVZZSEO.js +56 -0
- package/dist/chunks/chunk-TLJGOKBT.js +729 -0
- package/dist/chunks/{chunk-6HTR3GHZ.js → chunk-VS4CDDEF.js} +245 -245
- package/dist/chunks/chunk-WBBEJIAY.js +306 -0
- package/dist/chunks/{chunk-HO6P6CPU.js → chunk-WMIZCY2J.js} +1 -1
- package/dist/chunks/{chunk-UA744TZM.js → chunk-YRBNXFHY.js} +1 -1
- package/dist/chunks/compaction-config-7GMUFNPB.js +2 -0
- package/dist/chunks/{construction-bootstrap-4ZNFZFX2.js → construction-bootstrap-3XDS2D5K.js} +1 -1
- package/dist/chunks/{devtools-4CRULTR2.js → devtools-CD6KSIHE.js} +1 -1
- package/dist/chunks/{devtools-YINBSZC7.js → devtools-XR5F2C6T.js} +1 -1
- package/dist/chunks/{dist-73L4OYPD.js → dist-4PXB7U22.js} +1 -1
- package/dist/chunks/dist-4YAYT2TO.js +2 -0
- package/dist/chunks/host-KG3456QP.js +2 -0
- package/dist/chunks/{paste-FDYM7SZX.js → paste-C33GZQV5.js} +1 -1
- package/dist/chunks/run-manager-6CAH3KTA.js +2 -0
- package/dist/chunks/utils-OT5ENFUL.js +2 -0
- package/dist/constructed-handler-worker.js +2 -0
- package/dist/index.d.ts +22 -11
- package/dist/index.js +6 -6
- package/dist/kodax_cli.js +1117 -1090
- package/dist/runtime-worker.js +2843 -0
- package/dist/sdk-agent.d.ts +29 -10
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +108 -1091
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +2 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +198 -184
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +982 -0
- package/dist/sdk-runtime.js +2 -0
- package/dist/sdk-session.d.ts +4 -4
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +191 -10
- package/dist/types-chunks/{bash-prefix-extractor.d-Do_TCAmA.d.ts → bash-prefix-extractor.d-BjkITAva.d.ts} +266 -4
- package/dist/types-chunks/{run-manager.d-CYY3pZeJ.d.ts → capsule.d-hVhPNkHd.d.ts} +9 -107
- package/dist/types-chunks/commands.d-C3B1TdGM.d.ts +213 -0
- package/dist/types-chunks/{types.d-DFf4Sfys.d.ts → guardrail.d-C_Siraua.d.ts} +3 -128
- package/dist/types-chunks/{guardrail.d-DRp0Lqvx.d.ts → guardrail.d-wk-s0psS.d.ts} +3 -3
- package/dist/types-chunks/{manager.d-DBD7SOTT.d.ts → manager.d-Zum9cGHU.d.ts} +3 -173
- package/dist/types-chunks/oauth-login.d-Bgb4rdLN.d.ts +174 -0
- package/dist/types-chunks/{process.d-DXkRD7hj.d.ts → process.d-CY2g03Mb.d.ts} +11 -4
- package/dist/types-chunks/public-api.d-jtREVfEq.d.ts +596 -0
- package/dist/types-chunks/run-manager.d-CFknOfo1.d.ts +91 -0
- package/dist/types-chunks/{sdk-session-BGGOC0cT.d.ts → sdk-session-CLqyfAmf.d.ts} +8 -304
- package/dist/types-chunks/types.d-BMLxKV69.d.ts +128 -0
- package/dist/types-chunks/types.d-CUN_bZU7.d.ts +975 -0
- package/dist/types-chunks/{utils.d-ChOEH3NF.d.ts → utils.d-C1rpoeDh.d.ts} +84 -72
- package/package.json +7 -1
- package/dist/chunks/argument-completer-5PWSKFKI.js +0 -2
- package/dist/chunks/chunk-2F4R7WM7.js +0 -52
- package/dist/chunks/chunk-3KD26NCI.js +0 -310
- package/dist/chunks/chunk-E2Q4RIOD.js +0 -731
- package/dist/chunks/chunk-S4ISEA6F.js +0 -341
- package/dist/chunks/chunk-V4WSBIXB.js +0 -2
- package/dist/chunks/chunk-WFE6FBQ2.js +0 -326
- package/dist/chunks/compaction-config-SP3REMFR.js +0 -2
- package/dist/chunks/dist-IKWRJW6J.js +0 -2
- package/dist/chunks/host-XL5CH7QP.js +0 -2
- package/dist/chunks/run-manager-UXIPDVVF.js +0 -2
- package/dist/chunks/utils-XKWEVPE3.js +0 -2
- package/dist/types-chunks/storage.d-C3umBC4g.d.ts +0 -280
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as KodaXGoalState, h as AgentMessage,
|
|
2
|
-
import { $ as KodaXTokenUsage, j as KodaXMessage, a8 as KodaXWireReasoningEffort, T as KodaXTaskRoutingDecision, U as KodaXTaskType, V as KodaXTaskWorkIntent, P as KodaXTaskComplexity, J as KodaXRiskLevel, g as KodaXHarnessProfile, e as KodaXExecutionMode, b as KodaXChildFanoutClass, E as KodaXReasoningMode, I as KodaXReviewScale } from './types.d-Bp4Lm1jv.js';
|
|
1
|
+
import { _ as KodaXGoalState, h as AgentMessage, bM as StopHookFn, af as KodaXSessionLineage, a4 as KodaXJsonValue, U as KodaXExtensionSessionRecord, f as Agent, c8 as WorkflowIsolation, V as KodaXExtensionSessionState, a6 as KodaXSessionArtifactLedgerEntry, bx as SessionErrorMetadata, al as KodaXSessionScope, am as KodaXSessionStorage, a2 as KodaXInputArtifact, C as ChildTaskRegistry, c5 as WorkflowEventCorrelation, x as CompactionUpdate, ch as WorkflowProcessEvent, c4 as WorkflowEvent, q as AskUserQuestionOptions, m as AskUserAnswer, o as AskUserMultiOptions, b0 as MemoryReviewPlan, b1 as MemoryReviewRunner, J as Guardrail, B as DiscoveredInstance, bQ as TaskAbortRegistry } from './process.d-CY2g03Mb.js';
|
|
2
|
+
import { $ as KodaXTokenUsage, j as KodaXMessage, a0 as KodaXToolDefinition, a8 as KodaXWireReasoningEffort, T as KodaXTaskRoutingDecision, U as KodaXTaskType, V as KodaXTaskWorkIntent, P as KodaXTaskComplexity, J as KodaXRiskLevel, g as KodaXHarnessProfile, e as KodaXExecutionMode, b as KodaXChildFanoutClass, E as KodaXReasoningMode, I as KodaXReviewScale } from './types.d-Bp4Lm1jv.js';
|
|
3
3
|
import { d as SkillDynamicContextExecutor } from './types.d-vJExiRje.js';
|
|
4
4
|
import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation, WorkspaceSymbol, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-protocol';
|
|
5
5
|
import { K as KodaXLlmTimeoutConfig, a as CostTracker } from './cost-tracker.d-CBLk1fiD.js';
|
|
@@ -1130,6 +1130,134 @@ interface KodaXTimeoutConfig {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
declare function providerResilienceConfigFromTimeouts(timeouts: KodaXTimeoutConfig | undefined): ProviderResilienceConfig | undefined;
|
|
1132
1132
|
|
|
1133
|
+
type RuntimeContextOptimizationProfile = 'off' | 'report_only' | 'balanced' | 'small_window' | 'aggressive';
|
|
1134
|
+
type RuntimeContextPressure = 'low' | 'medium' | 'high' | 'critical';
|
|
1135
|
+
interface RuntimeContextBudgetBreakdown {
|
|
1136
|
+
readonly systemPrompt: number;
|
|
1137
|
+
readonly toolSchemas: number;
|
|
1138
|
+
readonly skillCatalog: number;
|
|
1139
|
+
readonly mcpCatalog: number;
|
|
1140
|
+
readonly transcript: number;
|
|
1141
|
+
readonly pendingInput: number;
|
|
1142
|
+
readonly recentToolResults: number;
|
|
1143
|
+
readonly reservedResponse: number;
|
|
1144
|
+
readonly total: number;
|
|
1145
|
+
}
|
|
1146
|
+
interface RuntimeContextBudgetSnapshot {
|
|
1147
|
+
readonly sessionId?: string;
|
|
1148
|
+
readonly runId?: string;
|
|
1149
|
+
readonly turnId?: string;
|
|
1150
|
+
readonly provider?: string;
|
|
1151
|
+
readonly model?: string;
|
|
1152
|
+
readonly profile: RuntimeContextOptimizationProfile;
|
|
1153
|
+
readonly contextWindow: number;
|
|
1154
|
+
readonly smallWindow: boolean;
|
|
1155
|
+
readonly pressure: RuntimeContextPressure;
|
|
1156
|
+
readonly tokenBreakdown: RuntimeContextBudgetBreakdown;
|
|
1157
|
+
readonly usedTokens: number;
|
|
1158
|
+
readonly availableTokens: number;
|
|
1159
|
+
readonly usedRatio: number;
|
|
1160
|
+
readonly toolSchemaRatio: number;
|
|
1161
|
+
readonly recommendations: readonly RuntimeContextBudgetRecommendation[];
|
|
1162
|
+
readonly createdAt: string;
|
|
1163
|
+
}
|
|
1164
|
+
type RuntimeContextBudgetRecommendation = 'prefer_progressive_tool_exposure' | 'compact_or_summarize_history' | 'trim_recent_tool_results' | 'reserve_response_budget';
|
|
1165
|
+
interface RuntimeContextBudgetSnapshotInput {
|
|
1166
|
+
readonly sessionId?: string;
|
|
1167
|
+
readonly runId?: string;
|
|
1168
|
+
readonly turnId?: string;
|
|
1169
|
+
readonly provider?: string;
|
|
1170
|
+
readonly model?: string;
|
|
1171
|
+
readonly profile?: RuntimeContextOptimizationProfile;
|
|
1172
|
+
readonly contextWindow: number;
|
|
1173
|
+
readonly systemPrompt?: string;
|
|
1174
|
+
readonly toolDefinitions?: readonly KodaXToolDefinition[];
|
|
1175
|
+
readonly skillCatalogText?: string;
|
|
1176
|
+
readonly mcpCatalogText?: string;
|
|
1177
|
+
readonly messages?: readonly KodaXMessage[];
|
|
1178
|
+
readonly pendingInput?: string;
|
|
1179
|
+
readonly recentToolResults?: readonly string[];
|
|
1180
|
+
readonly reservedResponseTokens?: number;
|
|
1181
|
+
readonly now?: () => Date;
|
|
1182
|
+
}
|
|
1183
|
+
declare function estimateToolSchemaTokens(definition: KodaXToolDefinition, descriptionOverride?: string): number;
|
|
1184
|
+
declare function createRuntimeContextBudgetSnapshot(input: RuntimeContextBudgetSnapshotInput): RuntimeContextBudgetSnapshot;
|
|
1185
|
+
|
|
1186
|
+
type RuntimeToolExposureMode = 'resident' | 'hint' | 'bridge' | 'native_deferred' | 'hidden';
|
|
1187
|
+
type RuntimeToolExposureReason = 'profile_off' | 'protected_core' | 'already_unlocked' | 'low_pressure' | 'deferred_hint' | 'portable_bridge' | 'native_deferred' | 'bridge_unavailable';
|
|
1188
|
+
interface RuntimeToolExposureDecision {
|
|
1189
|
+
readonly toolName: string;
|
|
1190
|
+
readonly mode: RuntimeToolExposureMode;
|
|
1191
|
+
readonly recommendedMode: RuntimeToolExposureMode;
|
|
1192
|
+
readonly reason: RuntimeToolExposureReason;
|
|
1193
|
+
readonly estimatedTokensBefore: number;
|
|
1194
|
+
readonly estimatedTokensAfter: number;
|
|
1195
|
+
readonly estimatedTokensIfApplied: number;
|
|
1196
|
+
readonly modelVisible: boolean;
|
|
1197
|
+
}
|
|
1198
|
+
interface RuntimeToolExposurePlan {
|
|
1199
|
+
readonly profile: RuntimeContextOptimizationProfile;
|
|
1200
|
+
readonly reportOnly: boolean;
|
|
1201
|
+
readonly pressure: RuntimeContextPressure;
|
|
1202
|
+
readonly bridgeAvailable: boolean;
|
|
1203
|
+
readonly nativeDeferredAvailable: boolean;
|
|
1204
|
+
readonly decisions: readonly RuntimeToolExposureDecision[];
|
|
1205
|
+
readonly modelVisibleToolNames: readonly string[];
|
|
1206
|
+
readonly estimatedToolSchemaTokensBefore: number;
|
|
1207
|
+
readonly estimatedToolSchemaTokensAfter: number;
|
|
1208
|
+
readonly estimatedToolSchemaTokensIfApplied: number;
|
|
1209
|
+
readonly estimatedTokensSaved: number;
|
|
1210
|
+
readonly estimatedTokensSavedIfApplied: number;
|
|
1211
|
+
readonly residentToolCount: number;
|
|
1212
|
+
readonly hintedToolCount: number;
|
|
1213
|
+
readonly bridgeToolCount: number;
|
|
1214
|
+
readonly nativeDeferredToolCount: number;
|
|
1215
|
+
readonly hiddenToolCount: number;
|
|
1216
|
+
}
|
|
1217
|
+
interface RuntimeToolExposurePlanInput {
|
|
1218
|
+
readonly tools: readonly KodaXToolDefinition[];
|
|
1219
|
+
readonly budget: RuntimeContextBudgetSnapshot;
|
|
1220
|
+
readonly profile?: RuntimeContextOptimizationProfile;
|
|
1221
|
+
readonly bridgeAvailable?: boolean;
|
|
1222
|
+
readonly nativeDeferredAvailable?: boolean;
|
|
1223
|
+
readonly unlockedDeferredTools?: ReadonlySet<string>;
|
|
1224
|
+
}
|
|
1225
|
+
declare const ALWAYS_RESIDENT_TOOL_NAMES: ReadonlySet<string>;
|
|
1226
|
+
declare function planToolExposure(input: RuntimeToolExposurePlanInput): RuntimeToolExposurePlan;
|
|
1227
|
+
|
|
1228
|
+
interface CompactionAntiThrashState {
|
|
1229
|
+
readonly lowSavingsStreak: number;
|
|
1230
|
+
readonly cooldownTurnsRemaining: number;
|
|
1231
|
+
}
|
|
1232
|
+
interface CompactionSavingsSample {
|
|
1233
|
+
readonly tokensBefore: number;
|
|
1234
|
+
readonly tokensAfter: number;
|
|
1235
|
+
}
|
|
1236
|
+
interface CompactionAntiThrashConfig {
|
|
1237
|
+
readonly lowSavingsRatio?: number;
|
|
1238
|
+
readonly lowSavingsStreakLimit?: number;
|
|
1239
|
+
readonly cooldownTurns?: number;
|
|
1240
|
+
}
|
|
1241
|
+
interface CompactionSavingsDecision {
|
|
1242
|
+
readonly state: CompactionAntiThrashState;
|
|
1243
|
+
readonly savingsRatio: number;
|
|
1244
|
+
readonly lowSavings: boolean;
|
|
1245
|
+
readonly enteredCooldown: boolean;
|
|
1246
|
+
}
|
|
1247
|
+
type CompactionSkipReason = 'low_savings_cooldown';
|
|
1248
|
+
interface RuntimeCompactionSkippedEvent {
|
|
1249
|
+
readonly reason: CompactionSkipReason;
|
|
1250
|
+
readonly currentTokens: number;
|
|
1251
|
+
readonly contextWindow: number;
|
|
1252
|
+
readonly triggerPercent: number;
|
|
1253
|
+
readonly cooldownTurnsRemaining: number;
|
|
1254
|
+
readonly lowSavingsStreak: number;
|
|
1255
|
+
}
|
|
1256
|
+
declare function createCompactionAntiThrashState(): CompactionAntiThrashState;
|
|
1257
|
+
declare function shouldSkipLlmCompaction(state: CompactionAntiThrashState | undefined): boolean;
|
|
1258
|
+
declare function consumeCompactionCooldown(state: CompactionAntiThrashState | undefined): CompactionAntiThrashState;
|
|
1259
|
+
declare function recordCompactionSavings(state: CompactionAntiThrashState | undefined, sample: CompactionSavingsSample, config?: CompactionAntiThrashConfig): CompactionSavingsDecision;
|
|
1260
|
+
|
|
1133
1261
|
/**
|
|
1134
1262
|
* FEATURE_093 (v0.7.24): minimal contract interfaces for the coding extension
|
|
1135
1263
|
* runtime. Extracted so `@kodax-ai/coding/src/types.ts` can reference the
|
|
@@ -1240,6 +1368,121 @@ interface ExtensionRuntimeContract extends CapabilityRuntimeContract {
|
|
|
1240
1368
|
*/
|
|
1241
1369
|
type ToolSideEffect = 'readonly' | 'reads-network' | 'mutates-fs' | 'mutates-shell' | 'mutates-network' | 'mutates-state';
|
|
1242
1370
|
|
|
1371
|
+
/**
|
|
1372
|
+
* FEATURE_089 (v0.7.31) Phase 3.4 — Constructed Agent Resolver.
|
|
1373
|
+
*
|
|
1374
|
+
* Module-singleton registry mapping `name` → runnable `Agent` for
|
|
1375
|
+
* agents that have passed admission and been activated through
|
|
1376
|
+
* `ConstructionRuntime.activate()`. Mirrors the way TOOL_REGISTRY
|
|
1377
|
+
* holds activated constructed tools, but for agents.
|
|
1378
|
+
*
|
|
1379
|
+
* Why a separate registry (not in TOOL_REGISTRY):
|
|
1380
|
+
*
|
|
1381
|
+
* - Tools and Agents are different runtime types. A `KodaXToolDefinition`
|
|
1382
|
+
* has `input_schema` + `handler`; an `Agent` has `instructions` +
|
|
1383
|
+
* `tools` + `handoffs` + `reasoning`. Conflating them would force
|
|
1384
|
+
* consumers to discriminate on every lookup.
|
|
1385
|
+
* - Resolution semantics differ: a tool lookup returns the executable
|
|
1386
|
+
* handler; an agent lookup returns the declarative spec (Runner.run
|
|
1387
|
+
* drives the loop separately).
|
|
1388
|
+
*
|
|
1389
|
+
* Resolution surface:
|
|
1390
|
+
*
|
|
1391
|
+
* - `resolveConstructedAgent(name)` — name → Agent | undefined
|
|
1392
|
+
* - `listConstructedAgents()` — snapshot of activated agents
|
|
1393
|
+
* - `registerConstructedAgent(artifact)` → unregister fn (called by
|
|
1394
|
+
* runtime on activate, captured in the runtime's `_activated` map)
|
|
1395
|
+
* - `_resetAgentResolverForTesting()` — test isolation
|
|
1396
|
+
*
|
|
1397
|
+
* Tool / handoff ref resolution:
|
|
1398
|
+
* - Tool refs are resolved against TOOL_REGISTRY at activation time —
|
|
1399
|
+
* a snapshot. If a referenced tool is later revoked, the agent
|
|
1400
|
+
* keeps its stale ref; Phase 3.5 sandbox testing catches this.
|
|
1401
|
+
* - Handoff target refs lift to stub Agent objects (`name` only) when
|
|
1402
|
+
* the target hasn't been activated yet. Transitive admission ran
|
|
1403
|
+
* at test time so the graph is known to be acyclic; runtime
|
|
1404
|
+
* traversal just walks the names.
|
|
1405
|
+
*
|
|
1406
|
+
* Non-goal: full referential consistency between tools / agents /
|
|
1407
|
+
* handoffs. The threat model is single-user CLI integrity (DD §14.5);
|
|
1408
|
+
* stale refs are an LLM-authoring footgun, not a security bypass.
|
|
1409
|
+
*/
|
|
1410
|
+
|
|
1411
|
+
interface ConstructedAgentToolPolicy {
|
|
1412
|
+
readonly declaredTools: boolean;
|
|
1413
|
+
readonly effectiveToolNames: readonly string[];
|
|
1414
|
+
}
|
|
1415
|
+
interface KodaXAgentScope {
|
|
1416
|
+
readonly kind: 'constructed-agent-scope';
|
|
1417
|
+
readonly id: string;
|
|
1418
|
+
readonly disposed: boolean;
|
|
1419
|
+
resolve(name: string): ConstructedAgentEntry | undefined;
|
|
1420
|
+
list(): readonly ConstructedAgentEntry[];
|
|
1421
|
+
dispose(): void;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* FEATURE_191 — registration source enum. Used in-memory to disambiguate
|
|
1425
|
+
* which loader registered an agent so REPL `/agents list` can group by
|
|
1426
|
+
* origin and same-name precedence is enforced via load order rather
|
|
1427
|
+
* than a precedence stack. Not persisted to `AgentArtifact` (the
|
|
1428
|
+
* artifact schema stays untouched to avoid migration).
|
|
1429
|
+
*
|
|
1430
|
+
* Load-order convention (boot path registers in this order; subsequent
|
|
1431
|
+
* registrations overwrite earlier ones via last-write-wins):
|
|
1432
|
+
* built-in < extension < markdown:user < markdown:project <
|
|
1433
|
+
* constructed:cli < constructed:llm
|
|
1434
|
+
*/
|
|
1435
|
+
type ConstructedAgentSource = 'built-in' | 'extension' | 'markdown:user' | 'markdown:project' | 'constructed:cli' | 'constructed:llm';
|
|
1436
|
+
/**
|
|
1437
|
+
* Look up an activated constructed agent by name. Returns the
|
|
1438
|
+
* resolved `Agent` (with tools / handoffs lifted from refs). Returns
|
|
1439
|
+
* `undefined` when no agent at that name has been activated.
|
|
1440
|
+
*/
|
|
1441
|
+
declare function resolveConstructedAgent(name: string, scope?: KodaXAgentScope): Agent | undefined;
|
|
1442
|
+
/**
|
|
1443
|
+
* FEATURE_191 — enriched snapshot exposing both the resolved Agent and
|
|
1444
|
+
* the in-memory source tag. Consumers that need provenance (REPL
|
|
1445
|
+
* `/agents list --by-source`, debug surfaces) call this instead of
|
|
1446
|
+
* `listConstructedAgents()`. The plain-Agent list keeps its signature
|
|
1447
|
+
* for backward compatibility with all pre-FEATURE_191 callers.
|
|
1448
|
+
*
|
|
1449
|
+
* @internal v0.7.43 surface — exposed for the planned v0.7.46+
|
|
1450
|
+
* `/agents list` REPL command and for source-tag round-trip tests
|
|
1451
|
+
* (see `agent-resolver.test.ts` FEATURE_191 B.3 block). NOT yet a
|
|
1452
|
+
* stable SDK surface; embedders SHOULD continue using
|
|
1453
|
+
* `listConstructedAgents()` (which is byte-identical post-F191).
|
|
1454
|
+
* Promoted to public when the REPL `/agents list` consumer ships.
|
|
1455
|
+
*/
|
|
1456
|
+
interface ConstructedAgentEntry {
|
|
1457
|
+
readonly agent: Agent;
|
|
1458
|
+
readonly source: ConstructedAgentSource | undefined;
|
|
1459
|
+
readonly toolPolicy?: ConstructedAgentToolPolicy;
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* FEATURE_090 — `true` iff a self-modify activation has been staged
|
|
1463
|
+
* for `name` but has not yet been drained into the active registry.
|
|
1464
|
+
* Surfaces for tooling that wants to display "next run will use
|
|
1465
|
+
* version X" hints, and as a sanity-check assertion in tests.
|
|
1466
|
+
*/
|
|
1467
|
+
declare function hasPendingSwap(name: string): boolean;
|
|
1468
|
+
/**
|
|
1469
|
+
* FEATURE_090 — promote every pending self-modify entry into
|
|
1470
|
+
* `AGENT_REGISTRY`, replacing the prior active version. Returns the
|
|
1471
|
+
* names that were drained so the caller can surface a hint
|
|
1472
|
+
* ("alpha is now running version 1.1.0").
|
|
1473
|
+
*
|
|
1474
|
+
* Idempotent: calling on an empty pending map is a no-op. Atomic at
|
|
1475
|
+
* the JS event-loop level (a single synchronous pass); drain cannot
|
|
1476
|
+
* partially complete.
|
|
1477
|
+
*
|
|
1478
|
+
* Integration contract: the REPL surface calls this immediately after
|
|
1479
|
+
* any top-level `Runner.run` returns. KodaX is single-process and
|
|
1480
|
+
* single-user, so "the run that triggered the change" and "all
|
|
1481
|
+
* in-flight runs" are the same set — no concurrent-run coordination
|
|
1482
|
+
* needed.
|
|
1483
|
+
*/
|
|
1484
|
+
declare function drainPendingSwaps(): readonly string[];
|
|
1485
|
+
|
|
1243
1486
|
/**
|
|
1244
1487
|
* FEATURE_200 Phase F (v0.7.45) — Todo domain types extracted from types.ts.
|
|
1245
1488
|
* Self-contained (no other coding-type deps); re-exported from ../types.ts
|
|
@@ -1594,6 +1837,12 @@ interface KodaXEvents {
|
|
|
1594
1837
|
effort: string;
|
|
1595
1838
|
} & Partial<KodaXLiveEventMeta>) => void;
|
|
1596
1839
|
onRepoIntelligenceTrace?: (event: KodaXRepoIntelligenceTraceEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1840
|
+
/** Optional bounded context diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
1841
|
+
onContextBudgetSnapshot?: (event: RuntimeContextBudgetSnapshot & Partial<KodaXLiveEventMeta>) => void;
|
|
1842
|
+
/** Optional bounded tool-exposure diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
1843
|
+
onToolExposurePlanned?: (event: RuntimeToolExposurePlan & Partial<KodaXLiveEventMeta>) => void;
|
|
1844
|
+
/** Optional bounded compaction-pressure diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
1845
|
+
onContextCompactionSkipped?: (event: RuntimeCompactionSkippedEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1597
1846
|
/**
|
|
1598
1847
|
* Fired when the Sidecar Verifier produces an actionable message.
|
|
1599
1848
|
*
|
|
@@ -2282,6 +2531,11 @@ interface KodaXContextOptions {
|
|
|
2282
2531
|
repoIntelligenceMode?: KodaXRepoIntelligenceMode;
|
|
2283
2532
|
/** Optional repo-intelligence trace toggle for this run. */
|
|
2284
2533
|
repoIntelligenceTrace?: boolean;
|
|
2534
|
+
/**
|
|
2535
|
+
* Optional runtime-context diagnostics for SDK/daemon hosts. When false or
|
|
2536
|
+
* omitted, no extra budget/exposure calculation is performed.
|
|
2537
|
+
*/
|
|
2538
|
+
contextDiagnostics?: boolean;
|
|
2285
2539
|
disableAutoTaskReroute?: boolean;
|
|
2286
2540
|
/**
|
|
2287
2541
|
* FEATURE_087/088 (v0.7.28): when true, the prompt builder injects a
|
|
@@ -2302,6 +2556,12 @@ interface KodaXContextOptions {
|
|
|
2302
2556
|
inputArtifacts?: KodaXInputArtifact[];
|
|
2303
2557
|
/** Internal execution-mode overlay appended to the system prompt */
|
|
2304
2558
|
promptOverlay?: string;
|
|
2559
|
+
/**
|
|
2560
|
+
* Scoped specialist-agent resolver for embedders that run multiple
|
|
2561
|
+
* projects/sessions in one process. When absent, constructed-agent
|
|
2562
|
+
* lookups use the legacy process-global registry.
|
|
2563
|
+
*/
|
|
2564
|
+
agentScope?: KodaXAgentScope;
|
|
2305
2565
|
/** Optional task-engine surface label used to track managed tasks across UX entry points. */
|
|
2306
2566
|
taskSurface?: KodaXTaskSurface;
|
|
2307
2567
|
/**
|
|
@@ -2851,6 +3111,8 @@ interface KodaXToolExecutionContext {
|
|
|
2851
3111
|
* from `options.context.agentProfile`. Absent ⇒ default Coding Agent.
|
|
2852
3112
|
*/
|
|
2853
3113
|
agentProfile?: KodaXAgentProfile;
|
|
3114
|
+
/** Scoped specialist-agent resolver inherited from KodaXOptions.context. */
|
|
3115
|
+
agentScope?: KodaXAgentScope;
|
|
2854
3116
|
/** FEATURE_221: SDK-consumer self-manual injection, forwarded from KodaXOptions. */
|
|
2855
3117
|
selfManual?: KodaXSelfManualConfig;
|
|
2856
3118
|
/** FEATURE_222 skill security — host policy for skill `!`cmd`` dynamic-context,
|
|
@@ -3416,5 +3678,5 @@ interface CreateBashPrefixExtractorOptions {
|
|
|
3416
3678
|
*/
|
|
3417
3679
|
declare function createBashPrefixExtractor(opts: CreateBashPrefixExtractorOptions): BashPrefixExtractor;
|
|
3418
3680
|
|
|
3419
|
-
export { BASH_POLICY_SPEC as B, LSP_SERVERS as
|
|
3420
|
-
export type {
|
|
3681
|
+
export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B, LSP_SERVERS as aI, LspService as aK, makeDisabledGoalToolsContext as bA, planToolExposure as bB, providerResilienceConfigFromTimeouts as bC, recordCompactionSavings as bD, resolveConstructedAgent as bE, shouldSkipLlmCompaction as bF, shutdownDefaultLspService as bG, withGoalBeforeNextTurn as bH, withGoalStopHook as bI, workflowStartOutcomeConsumesTurn as bJ, buildGoalRuntimeBinding as bp, consumeCompactionCooldown as bq, createBashPrefixExtractor as br, createCompactionAntiThrashState as bs, createRuntimeContextBudgetSnapshot as bt, decideWorkflowInvocation as bu, drainPendingSwaps as bv, estimateToolSchemaTokens as bw, extractCommandPrefix as bx, getDefaultLspService as by, hasPendingSwap as bz };
|
|
3682
|
+
export type { KodaXRepoIntelligenceCapability as $, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXContextOptions as H, KodaXContextTokenSnapshot as I, KodaXEffectiveTaskConfig as J, KodaXActivityEventMeta as K, KodaXEvents as L, KodaXLiveEventMeta as M, KodaXManagedBudgetSnapshot as N, KodaXManagedProtocolPayload as O, KodaXManagedTask as P, KodaXManagedTaskRuntimeState as Q, KodaXManagedTaskStatusEvent as R, KodaXManualSource as S, KodaXManualTopic as T, KodaXManualTopicId as U, KodaXManualTopicInput as V, KodaXMemoryStrategy as W, KodaXOptions as X, KodaXOrchestrationVerdict as Y, KodaXParentReductionContract as Z, KodaXProviderPolicyHints as _, BashPrefixExtractor as a, RuntimeContextBudgetRecommendation as a$, KodaXRepoIntelligenceMode as a0, KodaXRepoIntelligenceResolvedMode as a1, KodaXRepoIntelligenceTrace as a2, KodaXRepoIntelligenceTraceEvent as a3, KodaXRepoRoutingSignals as a4, KodaXResult as a5, KodaXRoleRoundSummary as a6, KodaXRuntimeVerificationContract as a7, KodaXSelfManualConfig as a8, KodaXSessionControl as a9, KodaXTurnDeliveryKind as aA, KodaXTurnFailedEvent as aB, KodaXTurnStartedEvent as aC, KodaXVerificationScorecard as aD, KodaXVerificationScorecardCriterion as aE, KodaXWorkflowAgentDigestEvent as aF, KodaXWorkflowEventMeta as aG, KodaXWorkflowTimeoutConfig as aH, LspServerInfo as aJ, LspServiceConfig as aL, ProviderExecutionState as aM, ProviderRecoveryEvent as aN, ProviderResilienceConfig as aO, ProviderResiliencePolicy as aP, RecoveryAction as aQ, RecoveryDecision as aR, RecoveryLadderStep as aS, RecoveryResult as aT, ResilienceClassification as aU, ResilienceErrorClass as aV, ResolveKodaXManualInput as aW, ResolveKodaXManualOptions as aX, ResolveKodaXManualResult as aY, RuntimeCompactionSkippedEvent as aZ, RuntimeContextBudgetBreakdown as a_, KodaXSessionMutators as aa, KodaXSessionOptions as ab, KodaXSidecarMessageEvent as ac, KodaXSkillDynamicContextPolicy as ad, KodaXSkillInvocationContext as ae, KodaXSkillMap as af, KodaXSkillProjectionConfidence as ag, KodaXTaskCapabilityHint as ah, KodaXTaskContract as ai, KodaXTaskEvidenceArtifact as aj, KodaXTaskEvidenceBundle as ak, KodaXTaskEvidenceEntry as al, KodaXTaskRole as am, KodaXTaskRoleAssignment as an, KodaXTaskStatus as ao, KodaXTaskSurface as ap, KodaXTaskToolPolicy as aq, KodaXTaskVerificationContract as ar, KodaXTaskVerificationCriterion as as, KodaXTaskWorkItem as at, KodaXTimeoutConfig as au, KodaXToolEventMeta as av, KodaXToolExecutionContext as aw, KodaXToolVisibilityMeta as ax, KodaXToolVisibilityPolicy as ay, KodaXTurnCompletedEvent as az, BashPrefixResult as b, RuntimeContextBudgetSnapshot as b0, RuntimeContextBudgetSnapshotInput as b1, RuntimeContextOptimizationProfile as b2, RuntimeContextPressure as b3, RuntimeDefaultsSnapshot as b4, RuntimeToolExposureDecision as b5, RuntimeToolExposureMode as b6, RuntimeToolExposurePlan as b7, RuntimeToolExposurePlanInput as b8, RuntimeToolExposureReason as b9, TodoItem as ba, TodoList as bb, TodoStatus as bc, ToolSideEffect as bd, WorkflowHostPolicy as be, WorkflowInvocationAction as bf, WorkflowInvocationPolicyDecision as bg, WorkflowInvocationPolicyInput as bh, WorkflowInvocationSource as bi, WorkflowRunProgressView as bj, WorkflowStartOutcome as bk, WorkflowToolHost as bl, WorkflowToolHostInlineInput as bm, WorkflowToolHostResult as bn, WorkflowToolHostStartResult as bo, BoundExtensionRuntimeController as c, ChildSnapshotEvent as d, CompactionAntiThrashConfig as e, CompactionAntiThrashState as f, CompactionSavingsDecision as g, CompactionSavingsSample as h, CompactionSkipReason as i, CreateBashPrefixExtractorOptions as j, ExtractCommandPrefixOptions as k, GoalCompleteResult as l, GoalCreateInput as m, GoalLifecycleContext as n, GoalRuntimeBinding as o, GoalRuntimeBindingDeps as p, GoalToolsContext as q, KodaXAgentMode as r, KodaXAgentProfile as s, KodaXAgentScope as t, KodaXBudgetDisclosureZone as u, KodaXBudgetExtensionRequest as v, KodaXChildAgentResult as w, KodaXChildContextBundle as x, KodaXChildExecutionResult as y, KodaXCompactionOverride as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as KodaXMessage } from './types.d-Bp4Lm1jv.js';
|
|
2
|
-
import { Q as QueueEventListener,
|
|
3
|
-
import { h as AgentMessage,
|
|
2
|
+
import { Q as QueueEventListener, c as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-BMLxKV69.js';
|
|
3
|
+
import { h as AgentMessage, bw as SessionEntry, bu as Session, by as SessionExtension, af as KodaXSessionLineage, a4 as KodaXJsonValue, u as CompactionDetails, T as KodaXCompactMemorySeed, ab as KodaXSessionEntry, an as KodaXSessionTreeNode, ae as KodaXSessionLabelEntry, ad as KodaXSessionGoalEntry, a8 as KodaXSessionClientNoticeEntry, aj as KodaXSessionRewindMarkerEntry, ai as KodaXSessionNavigationOptions, a6 as KodaXSessionArtifactLedgerEntry, H as FileOperations, cb as WorkflowMeta, cc as WorkflowModelHint, cd as WorkflowModule } from './process.d-CY2g03Mb.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @kodax-ai/agent Constants
|
|
@@ -33,7 +33,7 @@ declare const PROMISE_PATTERN: RegExp;
|
|
|
33
33
|
* - 内容文本
|
|
34
34
|
* - 工具调用和结果
|
|
35
35
|
*/
|
|
36
|
-
declare function estimateTokens(messages: KodaXMessage[]): number;
|
|
36
|
+
declare function estimateTokens(messages: readonly KodaXMessage[]): number;
|
|
37
37
|
/**
|
|
38
38
|
* 计算单个文本的 token 数量(便捷函数)
|
|
39
39
|
*/
|
|
@@ -568,7 +568,7 @@ declare function generateSessionId(): Promise<string>;
|
|
|
568
568
|
*/
|
|
569
569
|
declare function extractTitleFromMessages(messages: KodaXMessage[]): string;
|
|
570
570
|
|
|
571
|
-
type NavigableSessionEntry = Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry | KodaXSessionClientNoticeEntry>;
|
|
571
|
+
type NavigableSessionEntry = Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry | KodaXSessionClientNoticeEntry | KodaXSessionRewindMarkerEntry>;
|
|
572
572
|
/**
|
|
573
573
|
* Reconcile a linear message list against an existing lineage tree.
|
|
574
574
|
*
|
|
@@ -591,6 +591,9 @@ declare function getSessionLineagePath(lineage: KodaXSessionLineage, targetId?:
|
|
|
591
591
|
* slicer-layer concern, which preserves the contract
|
|
592
592
|
* `entryMatchesContextMessage` and FEATURE_073's future firstKeptEntryId-based
|
|
593
593
|
* slicing both depend on.
|
|
594
|
+
* Native rewind audits are `rewind_marker` entries and never reach this path;
|
|
595
|
+
* the `reason !== 'rewind'` guard keeps legacy persisted rewind compactions
|
|
596
|
+
* context-silent.
|
|
594
597
|
*/
|
|
595
598
|
declare function getSessionMessagesFromLineage(lineage: KodaXSessionLineage, targetId?: string | null): KodaXMessage[];
|
|
596
599
|
/**
|
|
@@ -651,20 +654,6 @@ declare function applySessionCompaction(lineage: KodaXSessionLineage | undefined
|
|
|
651
654
|
* defines the helper; no production caller yet.
|
|
652
655
|
*/
|
|
653
656
|
declare function applyLineageTruncation(lineage: KodaXSessionLineage | undefined, trimmedMessages: KodaXMessage[]): KodaXSessionLineage;
|
|
654
|
-
/**
|
|
655
|
-
* Rewind the current session lineage to a target entry, truncating all entries after it.
|
|
656
|
-
* Records a rewind event in the lineage for auditability.
|
|
657
|
-
* Returns null if targetEntryId is not found.
|
|
658
|
-
*
|
|
659
|
-
* @param lineage - The session lineage to rewind
|
|
660
|
-
* @param targetEntryId - The entry ID to rewind to (inclusive)
|
|
661
|
-
* @returns A new lineage with entries truncated after the target, or null if target not found
|
|
662
|
-
*/
|
|
663
|
-
/**
|
|
664
|
-
* Find the entry ID of the second-to-last user message in the lineage.
|
|
665
|
-
* Used by `/rewind` (no argument) to go back one conversational turn.
|
|
666
|
-
* Returns null if fewer than 2 user messages exist.
|
|
667
|
-
*/
|
|
668
657
|
declare function findPreviousUserEntryId(lineage: KodaXSessionLineage): string | null;
|
|
669
658
|
declare function rewindSessionLineage(lineage: KodaXSessionLineage, targetEntryId: string): KodaXSessionLineage | null;
|
|
670
659
|
declare function forkSessionLineage(lineage: KodaXSessionLineage, selector?: string): KodaXSessionLineage | null;
|
|
@@ -842,92 +831,5 @@ declare function buildWorkflowCapsuleIntent(manifest: {
|
|
|
842
831
|
readonly originalRequest?: string;
|
|
843
832
|
}): WorkflowCapsuleIntent;
|
|
844
833
|
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
*
|
|
848
|
-
* Domain-neutral run registry + lifecycle (pause / resume / stop), process-event
|
|
849
|
-
* tracking, and terminal settle — lifted out of `@kodax-ai/coding` so any agent
|
|
850
|
-
* (including non-coding SDK hosts) can host and manage workflow runs.
|
|
851
|
-
*
|
|
852
|
-
* It never knows HOW a run executes: the caller injects a `runFn` thunk that
|
|
853
|
-
* receives lifecycle hooks (`onEvent` / `signal` / `beforeSpawn`) and returns a
|
|
854
|
-
* caller-shaped outcome, plus a `classify` mapping that outcome to a neutral
|
|
855
|
-
* terminal status and an `onError` that synthesizes a failure outcome. The
|
|
856
|
-
* coding layer wires `runFn` to its `runWorkflowModule` / `runWorkflowFromOptions`
|
|
857
|
-
* (backend + run-graph + worktrees); SDK hosts wire their own. Dependency arrows
|
|
858
|
-
* therefore point only coding → agent — no cycle.
|
|
859
|
-
*/
|
|
860
|
-
|
|
861
|
-
type ManagedWorkflowStatus = 'running' | 'paused' | 'completed' | 'failed' | 'denied' | 'stopped';
|
|
862
|
-
/** Provenance/display metadata for a run's process tracker. */
|
|
863
|
-
type WorkflowProcessMetadata = Pick<WorkflowProcessTrackerOptions, 'displayName' | 'goal' | 'source' | 'savedWorkflowName' | 'sourceRunId' | 'sourceWorkflowName' | 'revisionOf' | 'resumedFromRunId' | 'hostMetadata'>;
|
|
864
|
-
interface ManagedWorkflowSnapshot {
|
|
865
|
-
readonly runId: string;
|
|
866
|
-
readonly workflow: string;
|
|
867
|
-
readonly status: ManagedWorkflowStatus;
|
|
868
|
-
readonly totalSpawned: number;
|
|
869
|
-
readonly eventCount: number;
|
|
870
|
-
readonly startedAt: number;
|
|
871
|
-
readonly endedAt?: number;
|
|
872
|
-
readonly error?: string;
|
|
873
|
-
readonly resultText?: string;
|
|
874
|
-
}
|
|
875
|
-
interface ManagedWorkflowRun<TOutcome = unknown> {
|
|
876
|
-
readonly runId: string;
|
|
877
|
-
readonly done: Promise<TOutcome>;
|
|
878
|
-
getSnapshot(): ManagedWorkflowSnapshot | undefined;
|
|
879
|
-
getProcessSnapshot(): WorkflowProcessSnapshot | undefined;
|
|
880
|
-
}
|
|
881
|
-
/** Lifecycle hooks the manager injects into the caller's `runFn`. */
|
|
882
|
-
interface ManagedRunHooks {
|
|
883
|
-
/** Forward every workflow event so the manager can track spawn/progress. */
|
|
884
|
-
readonly onEvent: (event: WorkflowEvent) => void;
|
|
885
|
-
/** Abort signal owned by the manager (fires on stop()). */
|
|
886
|
-
readonly signal: AbortSignal;
|
|
887
|
-
/** Await before launching each agent so pause() can gate new spawns. */
|
|
888
|
-
readonly beforeSpawn: () => Promise<void>;
|
|
889
|
-
}
|
|
890
|
-
/** Neutral terminal classification of a caller-shaped outcome. */
|
|
891
|
-
interface ManagedRunClassification {
|
|
892
|
-
readonly status: 'completed' | 'failed' | 'denied';
|
|
893
|
-
readonly error?: Error;
|
|
894
|
-
readonly resultText?: string;
|
|
895
|
-
}
|
|
896
|
-
interface StartManagedRunInput<TOutcome> {
|
|
897
|
-
readonly runId: string;
|
|
898
|
-
/** Display name (usually the workflow's `meta.name`). */
|
|
899
|
-
readonly workflow: string;
|
|
900
|
-
readonly phases?: readonly string[];
|
|
901
|
-
readonly maxAgents?: number;
|
|
902
|
-
readonly plannedAgents?: number;
|
|
903
|
-
readonly tokenBudget?: number;
|
|
904
|
-
readonly processMetadata?: WorkflowProcessMetadata;
|
|
905
|
-
readonly signal?: AbortSignal;
|
|
906
|
-
/** Executes the run with the manager's lifecycle hooks injected. */
|
|
907
|
-
readonly runFn: (hooks: ManagedRunHooks) => Promise<TOutcome>;
|
|
908
|
-
/** Map the caller's terminal outcome to a neutral status for the snapshot. */
|
|
909
|
-
readonly classify: (outcome: TOutcome) => ManagedRunClassification;
|
|
910
|
-
/** Synthesize a caller-shaped outcome when `runFn` throws. */
|
|
911
|
-
readonly onError: (error: unknown) => TOutcome;
|
|
912
|
-
}
|
|
913
|
-
interface WorkflowRunManager {
|
|
914
|
-
start<TOutcome>(input: StartManagedRunInput<TOutcome>): ManagedWorkflowRun<TOutcome>;
|
|
915
|
-
list(): readonly ManagedWorkflowSnapshot[];
|
|
916
|
-
get(runId: string): ManagedWorkflowSnapshot | undefined;
|
|
917
|
-
subscribeWorkflowProcess(listener: (event: WorkflowProcessEvent) => void): () => void;
|
|
918
|
-
getWorkflowProcessSnapshot(runId: string): WorkflowProcessSnapshot | undefined;
|
|
919
|
-
listWorkflowProcessSnapshots(options?: {
|
|
920
|
-
readonly activeOnly?: boolean;
|
|
921
|
-
readonly limit?: number;
|
|
922
|
-
}): readonly WorkflowProcessSnapshot[];
|
|
923
|
-
pause(runId: string): boolean;
|
|
924
|
-
resume(runId: string): boolean;
|
|
925
|
-
stop(runId: string, reason?: string): boolean;
|
|
926
|
-
}
|
|
927
|
-
declare function createWorkflowRunManager(deps?: {
|
|
928
|
-
readonly now?: () => number;
|
|
929
|
-
}): WorkflowRunManager;
|
|
930
|
-
declare function getDefaultWorkflowRunManager(): WorkflowRunManager;
|
|
931
|
-
|
|
932
|
-
export { applySessionCompaction as $, WORKFLOW_CAPSULE_FORMAT as A, WORKFLOW_CAPSULE_VERSION as B, DefaultSummaryCompaction as D, WORKFLOW_PATTERN_IDS as E, KODAX_API_MIN_INTERVAL as K, LINEAGE_ENTRY_TYPES as L, PROMISE_PATTERN as P, WORKFLOW_CAPSULE_API_VERSION as W, appendSessionLineageLabel as Y, applyLineageTruncation as Z, _resetMessageQueueForTests as _, archiveOldIslands as a0, assertRestrictedWorkflowQuality as a1, buildSessionTree as a2, buildWorkflowCapsuleIntent as a3, cleanupIncompleteToolCalls as a4, countActiveLineageMessages as a5, countTokens as a6, createSessionLineage as a7, createWorkflowCapsule as a8, createWorkflowModuleFromCapsule as a9, createWorkflowRunManager as aa, estimateTokens as ab, extractArtifactLedger as ac, extractFileOps as ad, extractTitleFromMessages as ae, findPreviousUserEntryId as af, forkSessionLineage as ag, generateSessionId as ah, getAgentConfigHome as ai, getAgentConfigPath as aj, getAppDataDir as ak, getDefaultWorkflowRunManager as al, getMessageQueue as am, getSessionLineagePath as an, getSessionMessagesFromLineage as ao, lintRestrictedWorkflowSource as ap, mergeArtifactLedger as aq, mergeFileOps as ar, resolveSessionLineageTarget as as, rewindSessionLineage as at, setAgentConfigHome as au, setSessionLineageActiveEntry as av, validateAndFixToolHistory as aw, validateWorkflowCapsule as ax, validateWorkflowScriptManifest as ay, KODAX_DEFAULT_TIMEOUT as f, KODAX_HARD_TIMEOUT as g, KODAX_MAX_INCOMPLETE_RETRIES as h, KODAX_MAX_MAXTOKENS_RETRIES as i, KODAX_MAX_RETRIES as j, KODAX_MAX_TOKENS as k, KODAX_RETRY_BASE_DELAY as l, KODAX_STAGGER_DELAY as m, LineageCompaction as o, LineageExtension as r, MessageQueue as y };
|
|
933
|
-
export type { CompactionContext as C, WorkflowCapsule as F, WorkflowCapsuleEnvironmentRequirement as G, WorkflowCapsuleInputs as H, WorkflowCapsuleIntent as I, WorkflowCapsuleProvenance as J, ManagedRunClassification as M, WorkflowCapsuleRequirements as N, WorkflowPatternId as O, WorkflowProcessMetadata as Q, WorkflowQualityLintFinding as R, StartManagedRunInput as S, WorkflowQualityLintOptions as T, WorkflowQualityLintSeverity as U, WorkflowRunManager as V, WorkflowScriptManifest as X, CompactionEntry as a, CompactionEntryPayload as b, CompactionPolicy as c, CreateWorkflowCapsuleInput as d, DefaultSummaryCompactionOptions as e, LineageArtifactLedgerPayload as n, LineageCompactionDelegates as p, LineageEntryType as q, LineageLabelPayload as s, LineageTreeNode as t, ManagedRunHooks as u, ManagedWorkflowRun as v, ManagedWorkflowSnapshot as w, ManagedWorkflowStatus as x, PolicyCompactionResult as z };
|
|
834
|
+
export { createSessionLineage as $, DefaultSummaryCompaction as D, KODAX_API_MIN_INTERVAL as K, LINEAGE_ENTRY_TYPES as L, MessageQueue as M, appendSessionLineageLabel as O, PROMISE_PATTERN as P, applyLineageTruncation as Q, applySessionCompaction as R, archiveOldIslands as S, assertRestrictedWorkflowQuality as T, buildSessionTree as U, buildWorkflowCapsuleIntent as V, WORKFLOW_CAPSULE_API_VERSION as W, cleanupIncompleteToolCalls as X, countActiveLineageMessages as Y, countTokens as Z, _resetMessageQueueForTests as _, createWorkflowCapsule as a0, createWorkflowModuleFromCapsule as a1, estimateTokens as a2, extractArtifactLedger as a3, extractFileOps as a4, extractTitleFromMessages as a5, findPreviousUserEntryId as a6, forkSessionLineage as a7, generateSessionId as a8, getAgentConfigHome as a9, getAgentConfigPath as aa, getAppDataDir as ab, getMessageQueue as ac, getSessionLineagePath as ad, getSessionMessagesFromLineage as ae, lintRestrictedWorkflowSource as af, mergeArtifactLedger as ag, mergeFileOps as ah, resolveSessionLineageTarget as ai, rewindSessionLineage as aj, setAgentConfigHome as ak, setSessionLineageActiveEntry as al, validateAndFixToolHistory as am, validateWorkflowCapsule as an, validateWorkflowScriptManifest as ao, KODAX_DEFAULT_TIMEOUT as f, KODAX_HARD_TIMEOUT as g, KODAX_MAX_INCOMPLETE_RETRIES as h, KODAX_MAX_MAXTOKENS_RETRIES as i, KODAX_MAX_RETRIES as j, KODAX_MAX_TOKENS as k, KODAX_RETRY_BASE_DELAY as l, KODAX_STAGGER_DELAY as m, LineageCompaction as o, LineageExtension as r, WORKFLOW_CAPSULE_FORMAT as v, WORKFLOW_CAPSULE_VERSION as w, WORKFLOW_PATTERN_IDS as x };
|
|
835
|
+
export type { WorkflowCapsuleInputs as A, WorkflowCapsuleIntent as B, CompactionContext as C, WorkflowCapsuleProvenance as E, WorkflowCapsuleRequirements as F, WorkflowPatternId as G, WorkflowQualityLintFinding as H, WorkflowQualityLintOptions as I, WorkflowQualityLintSeverity as J, WorkflowScriptManifest as N, CompactionEntry as a, CompactionEntryPayload as b, CompactionPolicy as c, CreateWorkflowCapsuleInput as d, DefaultSummaryCompactionOptions as e, LineageArtifactLedgerPayload as n, LineageCompactionDelegates as p, LineageEntryType as q, LineageLabelPayload as s, LineageTreeNode as t, PolicyCompactionResult as u, WorkflowCapsule as y, WorkflowCapsuleEnvironmentRequirement as z };
|