@kodax-ai/kodax 0.7.58 → 0.7.60
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 +61 -0
- package/README.md +11 -4
- package/README_CN.md +10 -4
- package/dist/chunks/{agent-YJNC2755.js → agent-L5FC3YOY.js} +1 -1
- package/dist/chunks/argument-completer-BQDAYT7W.js +2 -0
- package/dist/chunks/chunk-2RLIKZOZ.js +18 -0
- package/dist/chunks/chunk-4K5BDO7S.js +721 -0
- package/dist/chunks/{chunk-XXEIFNBE.js → chunk-5TRQBMPR.js} +1 -1
- package/dist/chunks/{chunk-QHWXPJEG.js → chunk-6DWXUZMO.js} +166 -167
- package/dist/chunks/{chunk-CV6JHPEO.js → chunk-6OZ5KWG3.js} +1 -1
- package/dist/chunks/chunk-IJN6ZJVI.js +310 -0
- package/dist/chunks/chunk-QFCF3GNT.js +326 -0
- package/dist/chunks/{chunk-HS2K74I4.js → chunk-S4GVQO3W.js} +13 -13
- package/dist/chunks/{chunk-6AU6EPO6.js → chunk-SGNM3UP6.js} +1 -1
- package/dist/chunks/chunk-U6BNMGSK.js +17 -0
- package/dist/chunks/{chunk-526OILYL.js → chunk-UA744TZM.js} +1 -1
- package/dist/chunks/{chunk-NKHXRN7G.js → chunk-XULI4U7I.js} +119 -117
- package/dist/chunks/chunk-ZL5CEANW.js +7 -0
- package/dist/chunks/chunk-ZPD7IUKW.js +322 -0
- package/dist/chunks/compaction-config-E4LN3M53.js +2 -0
- package/dist/chunks/{construction-bootstrap-CIXFH5SE.js → construction-bootstrap-GIFDM4L5.js} +1 -1
- package/dist/chunks/dist-73L4OYPD.js +2 -0
- package/dist/chunks/dist-7PXDYX2R.js +2 -0
- package/dist/chunks/host-FLG7FJZT.js +2 -0
- package/dist/chunks/{paste-Y4DVUWSM.js → paste-FDYM7SZX.js} +1 -1
- package/dist/chunks/run-manager-IU5COC6X.js +2 -0
- package/dist/chunks/{utils-FLVVQHM7.js → utils-NP42DKL3.js} +1 -1
- package/dist/index.d.ts +13 -12
- package/dist/index.js +2 -2
- package/dist/kodax_cli.js +1063 -1020
- package/dist/provider-capabilities.json +971 -986
- package/dist/sdk-agent.d.ts +27 -15
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +84 -17
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.d.ts +6 -6
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +13 -11
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-session.d.ts +7 -6
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.d.ts +4 -231
- package/dist/sdk-skills.js +1 -1
- package/dist/types-chunks/{base.d-BA9Doaj_.d.ts → base.d-DalIRhbb.d.ts} +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-D3cddmyV.d.ts → bash-prefix-extractor.d-Ds1THKeH.d.ts} +88 -27
- package/dist/types-chunks/{capability-learning.d-DRV80ISB.d.ts → capability-learning.d-BQB0M70w.d.ts} +1 -1
- package/dist/types-chunks/{guardrail.d-iK7FwMdW.d.ts → guardrail.d-CdqJwwN7.d.ts} +3 -3
- package/dist/types-chunks/{process.d-DHow2y2G.d.ts → process.d-C93UMgPK.d.ts} +39 -6
- package/dist/types-chunks/{resolver.d-DDOfVYDr.d.ts → resolver.d-CGkfRULj.d.ts} +58 -4
- package/dist/types-chunks/{run-manager.d-ByDcJc5g.d.ts → run-manager.d-DLK3ed-T.d.ts} +5 -5
- package/dist/types-chunks/{sdk-session-21Tt3N_x.d.ts → sdk-session-CtwN7iBO.d.ts} +56 -8
- package/dist/types-chunks/{storage.d-BsZrBPYu.d.ts → storage.d-DlZS0g8w.d.ts} +2 -2
- package/dist/types-chunks/{types.d-Ci5YPFEh.d.ts → types.d-Bp4Lm1jv.d.ts} +37 -3
- package/dist/types-chunks/{types.d-D4ZA8LJV.d.ts → types.d-CSZAMmU-.d.ts} +4 -1
- package/dist/types-chunks/types.d-vJExiRje.d.ts +232 -0
- package/dist/types-chunks/{utils.d-BURxOxFd.d.ts → utils.d-Boz9k2HB.d.ts} +6 -5
- package/package.json +1 -1
- package/dist/chunks/argument-completer-QGBNXTYJ.js +0 -2
- package/dist/chunks/chunk-73Z7BK5H.js +0 -15
- package/dist/chunks/chunk-7QB55SYG.js +0 -326
- package/dist/chunks/chunk-CQ6EQG7E.js +0 -322
- package/dist/chunks/chunk-OBPB5BQ6.js +0 -310
- package/dist/chunks/chunk-P4VF3JEP.js +0 -7
- package/dist/chunks/chunk-PIQWODWN.js +0 -18
- package/dist/chunks/chunk-ZZDC75H4.js +0 -681
- package/dist/chunks/compaction-config-OPMRZSAK.js +0 -2
- package/dist/chunks/dist-JSE7NICF.js +0 -2
- package/dist/chunks/dist-SDNQOW52.js +0 -2
- package/dist/chunks/host-H7FQMMRC.js +0 -2
- package/dist/chunks/run-manager-4H5HWMVW.js +0 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { W as KodaXGoalState, g as AgentMessage,
|
|
2
|
-
import {
|
|
1
|
+
import { W as KodaXGoalState, g as AgentMessage, b9 as StopHookFn, ab as KodaXSessionLineage, a0 as KodaXJsonValue, Q as KodaXExtensionSessionRecord, bx as WorkflowIsolation, R as KodaXExtensionSessionState, a2 as KodaXSessionArtifactLedgerEntry, aW as SessionErrorMetadata, ag as KodaXSessionScope, ah as KodaXSessionStorage, _ as KodaXInputArtifact, C as ChildTaskRegistry, bu as WorkflowEventCorrelation, t as CompactionUpdate, bG as WorkflowProcessEvent, bt as WorkflowEvent, n as AskUserQuestionOptions, l as AskUserMultiOptions, z as Guardrail, w as DiscoveredInstance, bd as TaskAbortRegistry } from './process.d-C93UMgPK.js';
|
|
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';
|
|
3
|
+
import { d as SkillDynamicContextExecutor } from './types.d-vJExiRje.js';
|
|
3
4
|
import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation, WorkspaceSymbol, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-protocol';
|
|
4
5
|
import { K as KodaXLlmTimeoutConfig, a as CostTracker } from './cost-tracker.d-CBLk1fiD.js';
|
|
5
6
|
import { C as CapabilityKind, b as CapabilityResult } from './capability.d-3C62G8Eq.js';
|
|
6
|
-
import { K as KodaXBaseProvider } from './base.d-
|
|
7
|
+
import { K as KodaXBaseProvider } from './base.d-DalIRhbb.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* FEATURE_192 v0.7.44 Phase C — Goal-tools execution context.
|
|
@@ -1382,7 +1383,29 @@ interface KodaXRepoIntelligenceTraceEvent {
|
|
|
1382
1383
|
interface KodaXWorkflowEventMeta {
|
|
1383
1384
|
readonly workflowCorrelation?: WorkflowEventCorrelation;
|
|
1384
1385
|
}
|
|
1385
|
-
|
|
1386
|
+
type KodaXTurnDeliveryKind = 'initial' | 'queued' | 'interrupt' | 'resume';
|
|
1387
|
+
interface KodaXLiveEventMeta {
|
|
1388
|
+
readonly sessionId: string;
|
|
1389
|
+
readonly seq: number;
|
|
1390
|
+
readonly turnId: string;
|
|
1391
|
+
readonly deliveryId?: string;
|
|
1392
|
+
readonly timestamp?: string;
|
|
1393
|
+
}
|
|
1394
|
+
interface KodaXTurnStartedEvent extends KodaXLiveEventMeta {
|
|
1395
|
+
readonly promptId?: string;
|
|
1396
|
+
readonly deliveryKind: KodaXTurnDeliveryKind;
|
|
1397
|
+
}
|
|
1398
|
+
interface KodaXTurnCompletedEvent extends KodaXLiveEventMeta {
|
|
1399
|
+
readonly status: 'completed' | 'cancelled' | 'interrupted';
|
|
1400
|
+
}
|
|
1401
|
+
interface KodaXTurnFailedEvent extends KodaXLiveEventMeta {
|
|
1402
|
+
readonly error: {
|
|
1403
|
+
readonly name: string;
|
|
1404
|
+
readonly message: string;
|
|
1405
|
+
readonly stack?: string;
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
1408
|
+
interface KodaXActivityEventMeta extends KodaXWorkflowEventMeta, Partial<KodaXLiveEventMeta> {
|
|
1386
1409
|
readonly childAgentId?: string;
|
|
1387
1410
|
readonly childAgentName?: string;
|
|
1388
1411
|
readonly parentToolId?: string;
|
|
@@ -1472,8 +1495,11 @@ interface KodaXEvents {
|
|
|
1472
1495
|
onSessionStart?: (info: {
|
|
1473
1496
|
provider: string;
|
|
1474
1497
|
sessionId: string;
|
|
1475
|
-
}) => void;
|
|
1476
|
-
|
|
1498
|
+
} & Partial<KodaXLiveEventMeta>) => void;
|
|
1499
|
+
onTurnStarted?: (event: KodaXTurnStartedEvent) => void;
|
|
1500
|
+
onTurnCompleted?: (event: KodaXTurnCompletedEvent) => void;
|
|
1501
|
+
onTurnFailed?: (event: KodaXTurnFailedEvent) => void;
|
|
1502
|
+
onIterationStart?: (iter: number, maxIter: number, meta?: KodaXActivityEventMeta) => void;
|
|
1477
1503
|
/** Called after each iteration with current token count for UI updates */
|
|
1478
1504
|
onIterationEnd?: (info: {
|
|
1479
1505
|
iter: number;
|
|
@@ -1492,19 +1518,19 @@ interface KodaXEvents {
|
|
|
1492
1518
|
* for backward compatibility.
|
|
1493
1519
|
*/
|
|
1494
1520
|
scope?: 'parent' | 'worker';
|
|
1495
|
-
}) => void;
|
|
1496
|
-
onCompactStart?: () => void;
|
|
1521
|
+
} & Partial<KodaXLiveEventMeta>) => void;
|
|
1522
|
+
onCompactStart?: (meta?: KodaXActivityEventMeta) => void;
|
|
1497
1523
|
/** Emitted when compaction finishes and actually changed the context */
|
|
1498
|
-
onCompact?: (estimatedTokens: number) => void;
|
|
1524
|
+
onCompact?: (estimatedTokens: number, meta?: KodaXActivityEventMeta) => void;
|
|
1499
1525
|
/** Emitted when compaction changes the context so UI can refresh token usage immediately */
|
|
1500
1526
|
onCompactStats?: (info: {
|
|
1501
1527
|
tokensBefore: number;
|
|
1502
1528
|
tokensAfter: number;
|
|
1503
|
-
}) => void;
|
|
1529
|
+
} & Partial<KodaXLiveEventMeta>) => void;
|
|
1504
1530
|
/** Emitted with the rewritten message history when automatic compaction changes the context. */
|
|
1505
|
-
onCompactedMessages?: (messages: KodaXMessage[], update?: CompactionUpdate) => void;
|
|
1531
|
+
onCompactedMessages?: (messages: KodaXMessage[], update?: CompactionUpdate, meta?: KodaXActivityEventMeta) => void;
|
|
1506
1532
|
/** Emitted to silently dismiss the compaction UI if compaction aborted or completed without changes */
|
|
1507
|
-
onCompactEnd?: () => void;
|
|
1533
|
+
onCompactEnd?: (meta?: KodaXActivityEventMeta) => void;
|
|
1508
1534
|
/** Whether the caller has queued follow-up input waiting for the next round */
|
|
1509
1535
|
hasPendingInputs?: () => boolean;
|
|
1510
1536
|
/**
|
|
@@ -1529,7 +1555,7 @@ interface KodaXEvents {
|
|
|
1529
1555
|
* Fires once per Runner iteration boundary, with the array of
|
|
1530
1556
|
* prompt contents in queue order. Empty arrays are not surfaced.
|
|
1531
1557
|
*/
|
|
1532
|
-
onMidTurnUserMessages?: (contents: readonly string[]) => void;
|
|
1558
|
+
onMidTurnUserMessages?: (contents: readonly string[], meta?: KodaXActivityEventMeta) => void;
|
|
1533
1559
|
onRetry?: (reason: string, attempt: number, maxAttempts: number, meta?: KodaXActivityEventMeta) => void;
|
|
1534
1560
|
onProviderRateLimit?: (attempt: number, maxRetries: number, delayMs: number, meta?: KodaXActivityEventMeta) => void;
|
|
1535
1561
|
/**
|
|
@@ -1566,8 +1592,8 @@ interface KodaXEvents {
|
|
|
1566
1592
|
provider: string;
|
|
1567
1593
|
model: string;
|
|
1568
1594
|
effort: string;
|
|
1569
|
-
}) => void;
|
|
1570
|
-
onRepoIntelligenceTrace?: (event: KodaXRepoIntelligenceTraceEvent) => void;
|
|
1595
|
+
} & Partial<KodaXLiveEventMeta>) => void;
|
|
1596
|
+
onRepoIntelligenceTrace?: (event: KodaXRepoIntelligenceTraceEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1571
1597
|
/**
|
|
1572
1598
|
* Fired when the Sidecar Verifier produces an actionable message.
|
|
1573
1599
|
*
|
|
@@ -1577,7 +1603,7 @@ interface KodaXEvents {
|
|
|
1577
1603
|
* `blocked` is surfaced terminally to the user. Accept remains silent here
|
|
1578
1604
|
* because there is no sidecar-to-agent reply to show.
|
|
1579
1605
|
*/
|
|
1580
|
-
onSidecarMessage?: (event: KodaXSidecarMessageEvent) => void;
|
|
1606
|
+
onSidecarMessage?: (event: KodaXSidecarMessageEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1581
1607
|
/**
|
|
1582
1608
|
* FEATURE_097 (v0.7.34): emitted whenever the Scout-seeded todo list
|
|
1583
1609
|
* changes — initial seed at `emit_scout_verdict`, per-item updates from
|
|
@@ -1587,28 +1613,28 @@ interface KodaXEvents {
|
|
|
1587
1613
|
* in one event loop, so subscriber lag is not a real failure mode
|
|
1588
1614
|
* (FEATURE_086 onRepoIntelligenceTrace single-rail precedent).
|
|
1589
1615
|
*/
|
|
1590
|
-
onTodoUpdate?: (items: TodoList) => void;
|
|
1616
|
+
onTodoUpdate?: (items: TodoList, meta?: KodaXActivityEventMeta) => void;
|
|
1591
1617
|
/**
|
|
1592
1618
|
* Warn-only telemetry: a successful real work tool completed while the
|
|
1593
1619
|
* visible todo list had pending items but no item marked in_progress.
|
|
1594
1620
|
* The runner does not mutate the todo list for this signal; it only
|
|
1595
1621
|
* nudges the next model turn to call todo_update explicitly.
|
|
1596
1622
|
*/
|
|
1597
|
-
onTodoDriftWarning?: (event: KodaXTodoDriftWarningEvent) => void;
|
|
1623
|
+
onTodoDriftWarning?: (event: KodaXTodoDriftWarningEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1598
1624
|
/** Structured provider recovery event (Feature 045) */
|
|
1599
1625
|
onProviderRecovery?: (event: ProviderRecoveryEvent, meta?: KodaXActivityEventMeta) => void;
|
|
1600
|
-
onComplete?: () => void;
|
|
1601
|
-
onError?: (error: Error) => void;
|
|
1602
|
-
onManagedTaskStatus?: (status: KodaXManagedTaskStatusEvent) => void;
|
|
1626
|
+
onComplete?: (meta?: KodaXActivityEventMeta) => void;
|
|
1627
|
+
onError?: (error: Error, meta?: KodaXActivityEventMeta) => void;
|
|
1628
|
+
onManagedTaskStatus?: (status: KodaXManagedTaskStatusEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1603
1629
|
/**
|
|
1604
1630
|
* FEATURE_247 (R4) — fired once at managed-task start with the effective
|
|
1605
1631
|
* profile / tool scope / verification snapshot. Lets an SDK embedder confirm
|
|
1606
1632
|
* the intended profile (e.g. Partner) actually entered the SDK managed task
|
|
1607
1633
|
* and diagnose the tools + verification constraints it was given.
|
|
1608
1634
|
*/
|
|
1609
|
-
onEffectiveConfig?: (config: KodaXEffectiveTaskConfig) => void;
|
|
1635
|
+
onEffectiveConfig?: (config: KodaXEffectiveTaskConfig & Partial<KodaXLiveEventMeta>) => void;
|
|
1610
1636
|
/** FEATURE_229: workflow process snapshot stream for SDK/host panels. */
|
|
1611
|
-
onWorkflowProcessEvent?: (event: WorkflowProcessEvent) => void;
|
|
1637
|
+
onWorkflowProcessEvent?: (event: WorkflowProcessEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1612
1638
|
/**
|
|
1613
1639
|
* ADR-049: per-agent digest stream for the inline `run_workflow` path. Fires
|
|
1614
1640
|
* once per workflow child agent reaching a terminal/summary state
|
|
@@ -1617,7 +1643,7 @@ interface KodaXEvents {
|
|
|
1617
1643
|
* and writes it to the transcript — matching the slash `/workflow` path and
|
|
1618
1644
|
* `dispatch_child_task` children, whose summaries persist in scrollback.
|
|
1619
1645
|
*/
|
|
1620
|
-
onWorkflowAgentDigest?: (event: KodaXWorkflowAgentDigestEvent) => void;
|
|
1646
|
+
onWorkflowAgentDigest?: (event: KodaXWorkflowAgentDigestEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1621
1647
|
/**
|
|
1622
1648
|
* Fired when Scout's managed-task completion is inferred but the harness
|
|
1623
1649
|
* detected suspicious signals (mutation expected but none happened, budget
|
|
@@ -1631,7 +1657,7 @@ interface KodaXEvents {
|
|
|
1631
1657
|
signals: KodaXScoutSuspiciousSignal[];
|
|
1632
1658
|
sessionId?: string;
|
|
1633
1659
|
lastTextPreview: string;
|
|
1634
|
-
}) => void;
|
|
1660
|
+
} & Partial<KodaXLiveEventMeta>) => void;
|
|
1635
1661
|
/**
|
|
1636
1662
|
* FEATURE_167 (v0.7.41) — Evaluator terminal-verdict fallback.
|
|
1637
1663
|
*
|
|
@@ -2276,6 +2302,17 @@ interface KodaXContextOptions {
|
|
|
2276
2302
|
promptOverlay?: string;
|
|
2277
2303
|
/** Optional task-engine surface label used to track managed tasks across UX entry points. */
|
|
2278
2304
|
taskSurface?: KodaXTaskSurface;
|
|
2305
|
+
/**
|
|
2306
|
+
* Host-provided live-turn attribution for this invocation. Embedders that
|
|
2307
|
+
* resume, interrupt, or deliver queued prompts outside KodaX's own queue can
|
|
2308
|
+
* preserve the real delivery kind without the SDK guessing from event order.
|
|
2309
|
+
*/
|
|
2310
|
+
liveTurn?: {
|
|
2311
|
+
deliveryKind?: KodaXTurnDeliveryKind;
|
|
2312
|
+
turnId?: string;
|
|
2313
|
+
deliveryId?: string;
|
|
2314
|
+
promptId?: string;
|
|
2315
|
+
};
|
|
2279
2316
|
/** Optional directory where managed task artifacts should be written. */
|
|
2280
2317
|
managedTaskWorkspaceDir?: string;
|
|
2281
2318
|
/** Internal managed-worker protocol emission configuration. */
|
|
@@ -2415,6 +2452,21 @@ interface KodaXCompactionOverride {
|
|
|
2415
2452
|
/** Set false to disable automatic compaction for this run. */
|
|
2416
2453
|
enabled?: boolean;
|
|
2417
2454
|
}
|
|
2455
|
+
/**
|
|
2456
|
+
* FEATURE_222 skill security — host policy for a skill's `!`cmd`` dynamic-context
|
|
2457
|
+
* tokens. By default (both fields unset) the LLM-triggered `skill` tool runs
|
|
2458
|
+
* those commands via the built-in allowlist + `execSync` — fine for the trusted
|
|
2459
|
+
* standalone CLI, but an embedder host (KodaX-Space) wants every shell touch to
|
|
2460
|
+
* go through its own permission broker. Set `execute` to route each `!`cmd``
|
|
2461
|
+
* through the host, or `disable: true` to refuse them outright.
|
|
2462
|
+
*/
|
|
2463
|
+
interface KodaXSkillDynamicContextPolicy {
|
|
2464
|
+
/** Host hook run for each `!`cmd`` token (command, cwd) → stdout. Mediate via
|
|
2465
|
+
* the host's permission broker; throw to refuse a command. */
|
|
2466
|
+
execute?: SkillDynamicContextExecutor;
|
|
2467
|
+
/** When true, every `!`cmd`` token is refused without executing anything. */
|
|
2468
|
+
disable?: boolean;
|
|
2469
|
+
}
|
|
2418
2470
|
interface KodaXOptions {
|
|
2419
2471
|
provider: string;
|
|
2420
2472
|
model?: string;
|
|
@@ -2480,6 +2532,12 @@ interface KodaXOptions {
|
|
|
2480
2532
|
};
|
|
2481
2533
|
/** FEATURE_221: SDK-consumer self-manual injection (product name + topics). */
|
|
2482
2534
|
selfManual?: KodaXSelfManualConfig;
|
|
2535
|
+
/**
|
|
2536
|
+
* FEATURE_222 skill security: host policy for skill `!`cmd`` dynamic-context.
|
|
2537
|
+
* Absent → built-in allowlist+execSync (trusted-CLI default). See
|
|
2538
|
+
* {@link KodaXSkillDynamicContextPolicy}.
|
|
2539
|
+
*/
|
|
2540
|
+
skillDynamicContext?: KodaXSkillDynamicContextPolicy;
|
|
2483
2541
|
/**
|
|
2484
2542
|
* FEATURE_092 (v0.7.33): caller-supplied run-scoped guardrails forwarded
|
|
2485
2543
|
* to `Runner.run` via `RunOptions.guardrails`. Merged with the START
|
|
@@ -2792,6 +2850,9 @@ interface KodaXToolExecutionContext {
|
|
|
2792
2850
|
agentProfile?: KodaXAgentProfile;
|
|
2793
2851
|
/** FEATURE_221: SDK-consumer self-manual injection, forwarded from KodaXOptions. */
|
|
2794
2852
|
selfManual?: KodaXSelfManualConfig;
|
|
2853
|
+
/** FEATURE_222 skill security — host policy for skill `!`cmd`` dynamic-context,
|
|
2854
|
+
* forwarded from `KodaXOptions.skillDynamicContext`. Consumed by the `skill` tool. */
|
|
2855
|
+
skillDynamicContext?: KodaXSkillDynamicContextPolicy;
|
|
2795
2856
|
/** Working directory used to resolve relative paths and execute shell commands. */
|
|
2796
2857
|
executionCwd?: string;
|
|
2797
2858
|
/** Session-scoped directory for helper scripts and scratch outputs. */
|
|
@@ -3345,5 +3406,5 @@ interface CreateBashPrefixExtractorOptions {
|
|
|
3345
3406
|
*/
|
|
3346
3407
|
declare function createBashPrefixExtractor(opts: CreateBashPrefixExtractorOptions): BashPrefixExtractor;
|
|
3347
3408
|
|
|
3348
|
-
export { BASH_POLICY_SPEC as B, LSP_SERVERS as
|
|
3349
|
-
export type {
|
|
3409
|
+
export { BASH_POLICY_SPEC as B, LSP_SERVERS as aB, LspService as aD, buildGoalRuntimeBinding as b6, createBashPrefixExtractor as b7, decideWorkflowInvocation as b8, extractCommandPrefix as b9, getDefaultLspService as ba, makeDisabledGoalToolsContext as bb, providerResilienceConfigFromTimeouts as bc, shutdownDefaultLspService as bd, withGoalBeforeNextTurn as be, withGoalStopHook as bf, workflowStartOutcomeConsumesTurn as bg };
|
|
3410
|
+
export type { KodaXRoleRoundSummary as $, KodaXManagedProtocolPayload as A, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXManagedTask as H, KodaXManagedTaskRuntimeState as I, KodaXManagedTaskStatusEvent as J, KodaXActivityEventMeta as K, KodaXManualSource as L, KodaXManualTopic as M, KodaXManualTopicId as N, KodaXManualTopicInput as O, KodaXMemoryStrategy as P, KodaXOptions as Q, KodaXOrchestrationVerdict as R, KodaXParentReductionContract as S, KodaXProviderPolicyHints as T, KodaXRepoIntelligenceCapability as U, KodaXRepoIntelligenceMode as V, KodaXRepoIntelligenceResolvedMode as W, KodaXRepoIntelligenceTrace as X, KodaXRepoIntelligenceTraceEvent as Y, KodaXRepoRoutingSignals as Z, KodaXResult as _, BashPrefixExtractor as a, WorkflowInvocationSource as a$, KodaXRuntimeVerificationContract as a0, KodaXSelfManualConfig as a1, KodaXSessionControl as a2, KodaXSessionMutators as a3, KodaXSessionOptions as a4, KodaXSidecarMessageEvent as a5, KodaXSkillDynamicContextPolicy as a6, KodaXSkillInvocationContext as a7, KodaXSkillMap as a8, KodaXSkillProjectionConfidence as a9, KodaXWorkflowTimeoutConfig as aA, LspServerInfo as aC, LspServiceConfig as aE, ProviderExecutionState as aF, ProviderRecoveryEvent as aG, ProviderResilienceConfig as aH, ProviderResiliencePolicy as aI, RecoveryAction as aJ, RecoveryDecision as aK, RecoveryLadderStep as aL, RecoveryResult as aM, ResilienceClassification as aN, ResilienceErrorClass as aO, ResolveKodaXManualInput as aP, ResolveKodaXManualOptions as aQ, ResolveKodaXManualResult as aR, RuntimeDefaultsSnapshot as aS, TodoItem as aT, TodoList as aU, TodoStatus as aV, ToolSideEffect as aW, WorkflowHostPolicy as aX, WorkflowInvocationAction as aY, WorkflowInvocationPolicyDecision as aZ, WorkflowInvocationPolicyInput as a_, KodaXTaskCapabilityHint as aa, KodaXTaskContract as ab, KodaXTaskEvidenceArtifact as ac, KodaXTaskEvidenceBundle as ad, KodaXTaskEvidenceEntry as ae, KodaXTaskRole as af, KodaXTaskRoleAssignment as ag, KodaXTaskStatus as ah, KodaXTaskSurface as ai, KodaXTaskToolPolicy as aj, KodaXTaskVerificationContract as ak, KodaXTaskVerificationCriterion as al, KodaXTaskWorkItem as am, KodaXTimeoutConfig as an, KodaXToolEventMeta as ao, KodaXToolExecutionContext as ap, KodaXToolVisibilityMeta as aq, KodaXToolVisibilityPolicy as ar, KodaXTurnCompletedEvent as as, KodaXTurnDeliveryKind as at, KodaXTurnFailedEvent as au, KodaXTurnStartedEvent as av, KodaXVerificationScorecard as aw, KodaXVerificationScorecardCriterion as ax, KodaXWorkflowAgentDigestEvent as ay, KodaXWorkflowEventMeta as az, BashPrefixResult as b, WorkflowRunProgressView as b0, WorkflowStartOutcome as b1, WorkflowToolHost as b2, WorkflowToolHostInlineInput as b3, WorkflowToolHostResult as b4, WorkflowToolHostStartResult as b5, BoundExtensionRuntimeController as c, ChildSnapshotEvent as d, CreateBashPrefixExtractorOptions as e, ExtractCommandPrefixOptions as f, GoalCompleteResult as g, GoalCreateInput as h, GoalLifecycleContext as i, GoalRuntimeBinding as j, GoalRuntimeBindingDeps as k, GoalToolsContext as l, KodaXAgentMode as m, KodaXAgentProfile as n, KodaXBudgetDisclosureZone as o, KodaXBudgetExtensionRequest as p, KodaXChildAgentResult as q, KodaXChildContextBundle as r, KodaXChildExecutionResult as s, KodaXCompactionOverride as t, KodaXContextOptions as u, KodaXContextTokenSnapshot as v, KodaXEffectiveTaskConfig as w, KodaXEvents as x, KodaXLiveEventMeta as y, KodaXManagedBudgetSnapshot as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { M as McpConnectMode, a as McpServerConfig, b as McpServersConfig, c as McpTransportKind } from './config.d-CJy1WENT.js';
|
|
2
|
-
import { K as KodaXBaseProvider } from './base.d-
|
|
2
|
+
import { K as KodaXBaseProvider } from './base.d-DalIRhbb.js';
|
|
3
3
|
import { a as CostTracker } from './cost-tracker.d-CBLk1fiD.js';
|
|
4
|
-
import {
|
|
5
|
-
import { g as ToolGuardrail } from './types.d-
|
|
4
|
+
import { aP as RunnerToolCall } from './process.d-C93UMgPK.js';
|
|
5
|
+
import { g as ToolGuardrail } from './types.d-CSZAMmU-.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* FEATURE_200 Phase F (v0.7.45) — MCP domain types extracted from types.ts.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as KodaXMessage,
|
|
1
|
+
import { j as KodaXMessage, a0 as KodaXToolDefinition, E as KodaXReasoningMode, a8 as KodaXWireReasoningEffort, a2 as KodaXToolResultContentItem, X as KodaXThinkingBlock, H as KodaXRedactedThinkingBlock } from './types.d-Bp4Lm1jv.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @kodax-ai/agent Types
|
|
@@ -35,6 +35,14 @@ interface KodaXSessionEntryBase {
|
|
|
35
35
|
id: string;
|
|
36
36
|
parentId: string | null;
|
|
37
37
|
timestamp: string;
|
|
38
|
+
/**
|
|
39
|
+
* Stable logical identity for this transcript item. Cloned/forked entries get
|
|
40
|
+
* a fresh physical `id` but keep their source entry's `logicalId`, allowing
|
|
41
|
+
* SDK hosts to group or fold cloned history without comparing content.
|
|
42
|
+
*/
|
|
43
|
+
logicalId?: string;
|
|
44
|
+
/** Root physical entry id this item was cloned from, when it is a clone. */
|
|
45
|
+
sourceEntryId?: string;
|
|
38
46
|
}
|
|
39
47
|
interface KodaXSessionMessageEntry extends KodaXSessionEntryBase {
|
|
40
48
|
type: 'message';
|
|
@@ -82,6 +90,13 @@ interface KodaXSessionArchiveMarkerEntry extends KodaXSessionEntryBase {
|
|
|
82
90
|
/** Brief summary of the archived content */
|
|
83
91
|
summary: string;
|
|
84
92
|
}
|
|
93
|
+
interface KodaXSessionClientNoticeEntry extends KodaXSessionEntryBase {
|
|
94
|
+
type: 'client_notice';
|
|
95
|
+
source: string;
|
|
96
|
+
content: string;
|
|
97
|
+
turnId?: string;
|
|
98
|
+
payload?: KodaXJsonValue;
|
|
99
|
+
}
|
|
85
100
|
type KodaXGoalStatus = 'active' | 'paused' | 'budget_limited' | 'blocked' | 'complete';
|
|
86
101
|
/**
|
|
87
102
|
* Persistent user-set goal state. v0.7.44 FEATURE_192 — backs the
|
|
@@ -120,7 +135,7 @@ interface KodaXSessionGoalEntry extends KodaXSessionEntryBase {
|
|
|
120
135
|
goal: KodaXGoalState | null;
|
|
121
136
|
event: KodaXGoalEventType;
|
|
122
137
|
}
|
|
123
|
-
type KodaXSessionEntry = KodaXSessionMessageEntry | KodaXSessionCompactionEntry | KodaXSessionBranchSummaryEntry | KodaXSessionLabelEntry | KodaXSessionArchiveMarkerEntry | KodaXSessionGoalEntry;
|
|
138
|
+
type KodaXSessionEntry = KodaXSessionMessageEntry | KodaXSessionCompactionEntry | KodaXSessionBranchSummaryEntry | KodaXSessionLabelEntry | KodaXSessionArchiveMarkerEntry | KodaXSessionClientNoticeEntry | KodaXSessionGoalEntry;
|
|
124
139
|
interface KodaXSessionArtifactLedgerEntry {
|
|
125
140
|
id: string;
|
|
126
141
|
kind: 'file_read' | 'file_modified' | 'file_created' | 'file_deleted' | 'path_scope' | 'search_scope' | 'command_scope' | 'check_result' | 'decision' | 'image_input' | 'tombstone';
|
|
@@ -157,7 +172,7 @@ interface KodaXSessionNavigationOptions {
|
|
|
157
172
|
summarizeCurrentBranch?: boolean;
|
|
158
173
|
}
|
|
159
174
|
interface KodaXSessionTreeNode {
|
|
160
|
-
entry: Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry>;
|
|
175
|
+
entry: Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry | KodaXSessionClientNoticeEntry>;
|
|
161
176
|
children: KodaXSessionTreeNode[];
|
|
162
177
|
label?: string;
|
|
163
178
|
active: boolean;
|
|
@@ -2605,7 +2620,7 @@ interface FileOperations {
|
|
|
2605
2620
|
* injected clock). The run graph models agent relationships as a
|
|
2606
2621
|
* thread/edge/event stream, not just a final summary blob.
|
|
2607
2622
|
*/
|
|
2608
|
-
type WorkflowEventType = 'workflow_started' | 'phase_started' | 'phase_finished' | 'agent_spawned' | 'agent_message_sent' | 'agent_completed' | 'agent_unverified' | 'agent_failed' | 'agent_summary_updated' | 'agent_stopped' | 'workflow_log' | 'artifact_written' | 'synthesis_completed' | 'workflow_completed' | 'workflow_stopped' | 'workflow_failed';
|
|
2623
|
+
type WorkflowEventType = 'workflow_started' | 'phase_started' | 'phase_finished' | 'agent_spawned' | 'agent_message_sent' | 'agent_completed' | 'agent_unverified' | 'agent_failed' | 'agent_summary_updated' | 'agent_stopped' | 'agent_replayed' | 'workflow_log' | 'artifact_written' | 'synthesis_completed' | 'workflow_completed' | 'workflow_stopped' | 'workflow_failed';
|
|
2609
2624
|
interface WorkflowEvent {
|
|
2610
2625
|
/** Monotonic sequence number — stable append ordering. */
|
|
2611
2626
|
readonly seq: number;
|
|
@@ -2943,6 +2958,13 @@ interface WorkflowRunState {
|
|
|
2943
2958
|
type WorkflowProcessStatus = 'running' | 'paused' | 'completed' | 'failed' | 'cancelled';
|
|
2944
2959
|
type WorkflowProcessItemStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'skipped';
|
|
2945
2960
|
type WorkflowProcessItemKind = 'phase' | 'agent' | 'step' | 'artifact';
|
|
2961
|
+
/**
|
|
2962
|
+
* FEATURE_246 resume telemetry — how an agent item came to be in a resumed run.
|
|
2963
|
+
* `ran` = executed live this run; `replayed-from-cache` = returned instantly from
|
|
2964
|
+
* a prior run's content-addressed result cache (resumeFromRunId). Only populated
|
|
2965
|
+
* on resumed runs; absent on a fresh run (treat absent as `ran`).
|
|
2966
|
+
*/
|
|
2967
|
+
type WorkflowProcessItemOrigin = 'ran' | 'replayed-from-cache';
|
|
2946
2968
|
type WorkflowProcessSummaryStatus = 'pending' | 'result' | 'notice' | 'unavailable';
|
|
2947
2969
|
type WorkflowProcessSource = 'command' | 'amaw' | 'review' | 'sdk' | 'capsule' | 'extension' | 'automation';
|
|
2948
2970
|
interface WorkflowProcessItem {
|
|
@@ -2961,6 +2983,8 @@ interface WorkflowProcessItem {
|
|
|
2961
2983
|
readonly summary?: string;
|
|
2962
2984
|
readonly summaryStatus?: WorkflowProcessSummaryStatus;
|
|
2963
2985
|
readonly error?: string;
|
|
2986
|
+
/** FEATURE_246 resume telemetry — see {@link WorkflowProcessItemOrigin}. */
|
|
2987
|
+
readonly origin?: WorkflowProcessItemOrigin;
|
|
2964
2988
|
}
|
|
2965
2989
|
interface WorkflowEventCorrelation {
|
|
2966
2990
|
readonly workflowRunId: string;
|
|
@@ -2984,6 +3008,10 @@ interface WorkflowProcessProgress {
|
|
|
2984
3008
|
readonly stoppedAgents: number;
|
|
2985
3009
|
readonly agentCap?: number;
|
|
2986
3010
|
readonly plannedItems?: number;
|
|
3011
|
+
/** FEATURE_246 resume telemetry — count of agents that replayed from a prior
|
|
3012
|
+
* run's cache (origin `replayed-from-cache`). Present only when > 0, so a
|
|
3013
|
+
* fresh run's progress is unchanged. */
|
|
3014
|
+
readonly replayedAgents?: number;
|
|
2987
3015
|
}
|
|
2988
3016
|
interface WorkflowProcessTokenUsage {
|
|
2989
3017
|
readonly spent: number;
|
|
@@ -3008,6 +3036,9 @@ interface WorkflowProcessSnapshot {
|
|
|
3008
3036
|
readonly sourceRunId?: string;
|
|
3009
3037
|
readonly sourceWorkflowName?: string;
|
|
3010
3038
|
readonly revisionOf?: string;
|
|
3039
|
+
/** FEATURE_246 resume telemetry — the prior run this run resumed from
|
|
3040
|
+
* (content-addressed replay). Absent on a fresh (non-resumed) run. */
|
|
3041
|
+
readonly resumedFromRunId?: string;
|
|
3011
3042
|
readonly hostMetadata?: Record<string, string>;
|
|
3012
3043
|
readonly activePhaseId?: string;
|
|
3013
3044
|
readonly activePhaseIndex?: number;
|
|
@@ -3042,6 +3073,8 @@ interface WorkflowProcessTrackerOptions {
|
|
|
3042
3073
|
readonly sourceRunId?: string;
|
|
3043
3074
|
readonly sourceWorkflowName?: string;
|
|
3044
3075
|
readonly revisionOf?: string;
|
|
3076
|
+
/** FEATURE_246 resume telemetry — the prior run this run resumed from. */
|
|
3077
|
+
readonly resumedFromRunId?: string;
|
|
3045
3078
|
readonly hostMetadata?: Record<string, string>;
|
|
3046
3079
|
readonly phases?: readonly string[];
|
|
3047
3080
|
readonly maxAgents?: number;
|
|
@@ -3066,5 +3099,5 @@ declare function isFinalWorkflowProcessStatus(status: WorkflowProcessStatus): bo
|
|
|
3066
3099
|
declare function normalizeHostMetadata(value: unknown): Record<string, string> | undefined;
|
|
3067
3100
|
declare function createWorkflowProcessTracker(options: WorkflowProcessTrackerOptions): WorkflowProcessTracker;
|
|
3068
3101
|
|
|
3069
|
-
export { ASK_USER_BACK_SIGNAL as A, DEFAULT_SYSTEM_CAP as D, InvariantSession as N, Runner as
|
|
3070
|
-
export type { KodaXInputArtifactSource as $, GuardrailSpanData as B, ChildTaskRegistry as C, EvidenceSpanData as E, FanoutSpanData as F, GenerationSpanData as G, Handoff as H, HandoffSpanData as I, InMemorySessionOptions as J, InstanceDiscoveryFs as K, InvariantId as L, InvariantResult as M, KodaXCompactMemoryProgress as O, KodaXCompactMemorySeed as P, KodaXExtensionSessionRecord as Q, KodaXExtensionSessionState as R, KodaXExtensionStore as S, KodaXExtensionStoreEntry as T, KodaXFileInputArtifact as U, KodaXGoalEventType as V, KodaXGoalState as W, KodaXGoalStatus as X, KodaXImageInputArtifact as Y, KodaXImageMediaType as Z, KodaXInputArtifact as _, AdmissionAuditOptions as a,
|
|
3102
|
+
export { ASK_USER_BACK_SIGNAL as A, DEFAULT_SYSTEM_CAP as D, InvariantSession as N, Runner as aL, MAX_TOOL_LOOP_ITERATIONS as at, SpanImpl as b2, Tracer as bk, WorkflowEventRecorder as bv, _resetAdmittedAgentBindings as c8, _resetPresetDispatchers as c9, setActiveUserInteraction as cA, setAdmittedAgentBindings as cB, asSingleSelection as ca, buildAssistantMessageFromLlmResult as cb, buildSystemPrompt as cc, buildToolResultMessage as cd, createAgent as ce, createHandoff as cf, createInMemorySession as cg, createInvariantSessionForAgent as ch, createStateWriter as ci, createTrace as cj, createWorkflowProcessTracker as ck, defaultTracer as cl, detectInstructionsInjection as cm, discoverInstances as cn, executeRunnerToolCall as co, extractAssistantTextFromMessage as cp, getActiveUserInteraction as cq, getAdmittedAgentBindings as cr, isFinalWorkflowProcessStatus as cs, isRunnableTool as ct, isRunnerLlmResult as cu, normalizeHostMetadata as cv, registerChildTask as cw, registerPresetDispatcher as cx, requestTaskStop as cy, runAdmissionAudit as cz };
|
|
3103
|
+
export type { KodaXInputArtifactSource as $, GuardrailSpanData as B, ChildTaskRegistry as C, EvidenceSpanData as E, FanoutSpanData as F, GenerationSpanData as G, Handoff as H, HandoffSpanData as I, InMemorySessionOptions as J, InstanceDiscoveryFs as K, InvariantId as L, InvariantResult as M, KodaXCompactMemoryProgress as O, KodaXCompactMemorySeed as P, KodaXExtensionSessionRecord as Q, KodaXExtensionSessionState as R, KodaXExtensionStore as S, KodaXExtensionStoreEntry as T, KodaXFileInputArtifact as U, KodaXGoalEventType as V, KodaXGoalState as W, KodaXGoalStatus as X, KodaXImageInputArtifact as Y, KodaXImageMediaType as Z, KodaXInputArtifact as _, AdmissionAuditOptions as a, Span as a$, KodaXJsonValue as a0, KodaXSessionArchiveMarkerEntry as a1, KodaXSessionArtifactLedgerEntry as a2, KodaXSessionBranchSummaryEntry as a3, KodaXSessionClientNoticeEntry as a4, KodaXSessionCompactionEntry as a5, KodaXSessionData as a6, KodaXSessionEntry as a7, KodaXSessionEntryBase as a8, KodaXSessionGoalEntry as a9, QualityInvariant as aA, ReadonlyMutationTracker as aB, ReadonlyRecorder as aC, ReasoningDepth as aD, RecentlyModifiedFile as aE, RequestTaskStopOptions as aF, RequestTaskStopResult as aG, RunEvent as aH, RunOptions as aI, RunResult as aJ, RunnableTool as aK, RunnerEvent as aM, RunnerLlmResult as aN, RunnerLlmReturn as aO, RunnerToolCall as aP, RunnerToolContext as aQ, RunnerToolObserver as aR, RunnerToolResult as aS, Session as aT, SessionDispatchResult as aU, SessionEntry as aV, SessionErrorMetadata as aW, SessionExtension as aX, SessionForkOptions as aY, SessionMeta as aZ, SessionStateSnapshot as a_, KodaXSessionLabelEntry as aa, KodaXSessionLineage as ab, KodaXSessionMessageEntry as ac, KodaXSessionMeta as ad, KodaXSessionNavigationOptions as ae, KodaXSessionRuntimeInfo as af, KodaXSessionScope as ag, KodaXSessionStorage as ah, KodaXSessionTreeNode as ai, KodaXSessionUiHistoryItem as aj, KodaXSessionUiHistoryItemType as ak, KodaXSessionUiTextHistoryItem as al, KodaXSessionUiTextHistoryItemType as am, KodaXSessionUiToolCall as an, KodaXSessionUiToolCallStatus as ao, KodaXSessionUiToolGroupHistoryItem as ap, KodaXSessionWorkspaceKind as aq, KodaXVideoInputArtifact as ar, KodaXVideoMediaType as as, ManifestPatch as au, MessageEntry as av, ObserveCtx as aw, PersistedSessionState as ax, PresetDispatcher as ay, PresetTracingContext as az, AdmissionCtx as b, WorkflowTaskSnapshot as b$, SpanData as b0, SpanError as b1, SpanImplOptions as b3, StartTraceOptions as b4, StateWriter as b5, StateWriterFs as b6, StateWriterOptions as b7, StopHookContext as b8, StopHookFn as b9, WorkflowMeta as bA, WorkflowModelHint as bB, WorkflowModule as bC, WorkflowParallelOptions as bD, WorkflowProcessArtifact as bE, WorkflowProcessCounts as bF, WorkflowProcessEvent as bG, WorkflowProcessItem as bH, WorkflowProcessItemKind as bI, WorkflowProcessItemOrigin as bJ, WorkflowProcessItemStatus as bK, WorkflowProcessProgress as bL, WorkflowProcessSnapshot as bM, WorkflowProcessSource as bN, WorkflowProcessStatus as bO, WorkflowProcessSummaryStatus as bP, WorkflowProcessTokenUsage as bQ, WorkflowProcessTracker as bR, WorkflowProcessTrackerOptions as bS, WorkflowRun as bT, WorkflowRunState as bU, WorkflowRunStatus as bV, WorkflowSpawnAgentInput as bW, WorkflowSynthesis as bX, WorkflowSynthesizeInput as bY, WorkflowTaskHandle as bZ, WorkflowTaskResult as b_, StopHookResult as ba, StopHookSpanData as bb, SystemCap as bc, TaskAbortRegistry as bd, TerminalCtx as be, ToolCallSpanData as bf, ToolCapability as bg, ToolPermission as bh, Trace as bi, TraceOptions as bj, TracerOptions as bl, UserInteraction as bm, WorkflowAgentBackend as bn, WorkflowApi as bo, WorkflowApproval as bp, WorkflowApprovalSummary as bq, WorkflowArtifactRef as br, WorkflowBudget as bs, WorkflowEvent as bt, WorkflowEventCorrelation as bu, WorkflowEventType as bw, WorkflowIsolation as bx, WorkflowLimits as by, WorkflowLogEvent as bz, AdmissionVerdict as c, WorkflowTaskStatus as c0, WorkflowTaskSummaryEventUpdate as c1, WorkflowTaskSummaryKind as c2, WorkflowTaskSummaryUpdate as c3, WorkflowTaskUsage as c4, WorkflowTaskVerification as c5, WorkflowTaskVerificationResult as c6, WorkflowWaitOptions as c7, AdmittedHandle as d, Agent as e, AgentManifest as f, AgentMessage as g, AgentMiddlewareDeclaration as h, AgentReasoningProfile as i, AgentSpanData as j, AgentTool as k, AskUserMultiOptions as l, AskUserQuestionItem as m, AskUserQuestionOptions as n, CompactionAnchor as o, CompactionConfig as p, CompactionDetails as q, CompactionResult as r, CompactionSpanData as s, CompactionUpdate as t, CurrentTodoSummary as u, Deliverable as v, DiscoveredInstance as w, DiscoveryOptions as x, FileOperations as y, Guardrail as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as KodaXReasoningMode, L as KodaXStableEffortIntent,
|
|
1
|
+
import { E as KodaXReasoningMode, L as KodaXStableEffortIntent, a8 as KodaXWireReasoningEffort, F as KodaXReasoningProfile, Y as KodaXThinkingBudgetMap, Z as KodaXThinkingDepth, p as KodaXProviderConfig, A as KodaXReasoningCapability, G as KodaXReasoningRequest, m as KodaXNormalizedReasoningRequest, U as KodaXTaskType, a6 as KodaXVerifyCredentialResult, a0 as KodaXToolDefinition, j as KodaXMessage, x as KodaXProviderStreamOptions, M as KodaXStreamResult, k as KodaXModelDescriptor, o as KodaXProviderCapabilityProfile, a7 as KodaXVerifyStrategy, d as KodaXCustomProviderConfig, i as KodaXListModelsResult } from './types.d-Bp4Lm1jv.js';
|
|
2
2
|
import Anthropic from '@anthropic-ai/sdk';
|
|
3
|
-
import { K as KodaXBaseProvider } from './base.d-
|
|
3
|
+
import { K as KodaXBaseProvider } from './base.d-DalIRhbb.js';
|
|
4
4
|
import OpenAI from 'openai';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -86,6 +86,60 @@ declare function resolveThinkingBudget(config: KodaXProviderConfig, depth: KodaX
|
|
|
86
86
|
declare function clampThinkingBudget(requestedBudget: number, maxOutputTokens: number, safetyReserve?: number): number;
|
|
87
87
|
declare function mapDepthToOpenAIReasoningEffort(depth: KodaXThinkingDepth): 'low' | 'medium' | 'high' | undefined;
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* FEATURE_222 (R6) — canonical host-facing reasoning-effort resolver.
|
|
91
|
+
*
|
|
92
|
+
* Mapping a user's desired reasoning strength to the actual wire `effort` value
|
|
93
|
+
* for a provider/model means composing several pieces that already exist but
|
|
94
|
+
* were only wired together privately inside the REPL: the model's reasoning
|
|
95
|
+
* profile (`resolveModelCapabilities`), the learned hard-rejection cache
|
|
96
|
+
* (`narrowReasoningProfile`), and the alias/disabled/ceiling/default resolution
|
|
97
|
+
* (`resolveReasoningEffort`). A host that re-assembles these by hand drifts.
|
|
98
|
+
*
|
|
99
|
+
* `resolveWireEffort` is the single entry point: give it a provider/model + the
|
|
100
|
+
* desired effort (+ any learned rejected efforts) and it returns the legal wire
|
|
101
|
+
* effort — or `undefined`, which is a deliberate "omit reasoning_effort" signal
|
|
102
|
+
* (e.g. anthropic-adaptive, or a provider with no reasoning). It reuses the
|
|
103
|
+
* existing pure functions verbatim; no new resolution logic.
|
|
104
|
+
*/
|
|
105
|
+
interface ResolveWireEffortInput {
|
|
106
|
+
/** Provider id (built-in alias or registered custom provider name). */
|
|
107
|
+
readonly provider: string;
|
|
108
|
+
/** Model id. Omit to use the provider's default model. */
|
|
109
|
+
readonly model?: string;
|
|
110
|
+
/** The desired reasoning strength (a wire effort or tier the user requested).
|
|
111
|
+
* Treated as a non-explicit session preference: an unsupported value falls
|
|
112
|
+
* back to a legal one rather than throwing. */
|
|
113
|
+
readonly desiredEffort?: string;
|
|
114
|
+
/** Learned hard-rejected efforts for this provider/model (e.g. from the agent
|
|
115
|
+
* layer's `getCachedRejectedEfforts`). Removed from the ladder before
|
|
116
|
+
* resolving, so a rejected rung is never re-selected. */
|
|
117
|
+
readonly rejectedEfforts?: readonly string[];
|
|
118
|
+
}
|
|
119
|
+
interface ResolvedWireEffort {
|
|
120
|
+
/** The legal wire effort to send, or `undefined` to omit reasoning_effort
|
|
121
|
+
* entirely (adaptive/none — NOT a fallback to `configuredEffort`). */
|
|
122
|
+
readonly effort: string | undefined;
|
|
123
|
+
/** What the input resolved to before profile-driven adjustment (alias/
|
|
124
|
+
* ceiling/disable). Useful for a "requested X → sending Y" status label. */
|
|
125
|
+
readonly configuredEffort: string | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* True when the wire effort differs from the configured one — aliased, ceiled,
|
|
128
|
+
* disabled-folded, or narrowed by a rejection. NOTE: this is also true for a
|
|
129
|
+
* plain `desiredEffort: 'auto'` (configuredEffort `'auto'` resolves to a
|
|
130
|
+
* concrete rung), so do NOT read `adjusted` as "the user's explicit choice was
|
|
131
|
+
* overridden"; compare `configuredEffort` vs `effort` yourself if you need to
|
|
132
|
+
* exclude the auto→concrete case in a status label.
|
|
133
|
+
*/
|
|
134
|
+
readonly adjusted: boolean;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Resolve the wire-level reasoning effort for a provider/model + desired
|
|
138
|
+
* strength, honoring alias/disabled/ceiling/default rules and learned
|
|
139
|
+
* rejections. Pure — no I/O, no throw.
|
|
140
|
+
*/
|
|
141
|
+
declare function resolveWireEffort(input: ResolveWireEffortInput): ResolvedWireEffort;
|
|
142
|
+
|
|
89
143
|
/**
|
|
90
144
|
* KodaX Anthropic Compatible Provider
|
|
91
145
|
*
|
|
@@ -594,5 +648,5 @@ declare function listProviderModels(name: string, _opts?: {
|
|
|
594
648
|
signal?: AbortSignal;
|
|
595
649
|
}): Promise<KodaXListModelsResult>;
|
|
596
650
|
|
|
597
|
-
export {
|
|
598
|
-
export type { ProviderName as P, KodaXModelCapabilities as i };
|
|
651
|
+
export { normalizeReasoningEffortValue as $, getDefaultThinkingDepthForMode as A, getModelCapabilities as B, getProvider as C, getProviderConfiguredCapabilityProfile as D, getProviderConfiguredReasoningCapability as E, getProviderList as F, getProviderModel as G, getProviderModelDescriptors as H, getProviderModels as I, getReasoningCapability as J, KODAX_DEFAULT_PROVIDER as K, getRuntimeModelProvider as L, getRuntimeModelProviderNames as M, isCustomProviderName as N, isKnownProvider as O, isProviderConfigured as Q, isProviderName as S, isReasoningEnabled as T, isRuntimeModelProviderName as U, listAllModelCapabilities as V, listBuiltinModelCapabilities as W, listCustomProviderModelCapabilities as X, listProviderModels as Y, mapDepthToOpenAIReasoningEffort as Z, mapLegacyReasoningModeToEffortIntent as _, KODAX_DEFAULT_THINKING_BUDGETS as a, normalizeReasoningRequest as a0, parseReasoningEffortEnv as a1, registerCustomProviders as a2, registerModelProvider as a3, resolveModelCapabilities as a4, resolveProvider as a5, resolveProviderModelDescriptors as a6, resolveReasoningEffort as a7, resolveReasoningEffortForModelSwitch as a8, resolveThinkingBudget as a9, resolveWireEffort as aa, validateCustomProviderConfig as ab, verifyProviderCredential as ac, KODAX_PROVIDERS as b, KODAX_PROVIDER_SNAPSHOTS as c, KODAX_REASONING_MODE_SEQUENCE as d, KODAX_REASONING_SAFETY_RESERVE as e, KODAX_STABLE_EFFORT_INTENTS as f, KodaXAnthropicCompatProvider as g, KodaXError as h, KodaXNetworkError as j, KodaXOpenAICompatProvider as k, KodaXProviderError as l, KodaXRateLimitError as m, KodaXToolCallIdError as n, clampThinkingBudget as p, clearRuntimeModelProviders as q, createCustomProvider as r, effortToLegacyReasoningMode as s, getAvailableProviderNames as t, getCustomModelCapabilities as u, getCustomProvider as v, getCustomProviderList as w, getCustomProviderModelDescriptors as x, getCustomProviderModels as y, getCustomProviderNames as z };
|
|
652
|
+
export type { ProviderName as P, ResolveWireEffortInput as R, KodaXModelCapabilities as i, ResolvedWireEffort as o };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as KodaXMessage } from './types.d-
|
|
2
|
-
import { Q as QueueEventListener, f as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-
|
|
3
|
-
import { g as AgentMessage,
|
|
1
|
+
import { j as KodaXMessage } from './types.d-Bp4Lm1jv.js';
|
|
2
|
+
import { Q as QueueEventListener, f as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-CSZAMmU-.js';
|
|
3
|
+
import { g as AgentMessage, aV as SessionEntry, aT as Session, aX as SessionExtension, ab as KodaXSessionLineage, a0 as KodaXJsonValue, q as CompactionDetails, P as KodaXCompactMemorySeed, a7 as KodaXSessionEntry, ai as KodaXSessionTreeNode, aa as KodaXSessionLabelEntry, a9 as KodaXSessionGoalEntry, a4 as KodaXSessionClientNoticeEntry, ae as KodaXSessionNavigationOptions, a2 as KodaXSessionArtifactLedgerEntry, y as FileOperations, bA as WorkflowMeta, bB as WorkflowModelHint, bC as WorkflowModule, bS as WorkflowProcessTrackerOptions, bt as WorkflowEvent, bM as WorkflowProcessSnapshot, bG as WorkflowProcessEvent } from './process.d-C93UMgPK.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @kodax-ai/agent Constants
|
|
@@ -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>;
|
|
571
|
+
type NavigableSessionEntry = Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry | KodaXSessionClientNoticeEntry>;
|
|
572
572
|
/**
|
|
573
573
|
* Reconcile a linear message list against an existing lineage tree.
|
|
574
574
|
*
|
|
@@ -846,7 +846,7 @@ declare function buildWorkflowCapsuleIntent(manifest: {
|
|
|
846
846
|
|
|
847
847
|
type ManagedWorkflowStatus = 'running' | 'paused' | 'completed' | 'failed' | 'denied' | 'stopped';
|
|
848
848
|
/** Provenance/display metadata for a run's process tracker. */
|
|
849
|
-
type WorkflowProcessMetadata = Pick<WorkflowProcessTrackerOptions, 'displayName' | 'goal' | 'source' | 'savedWorkflowName' | 'sourceRunId' | 'sourceWorkflowName' | 'revisionOf' | 'hostMetadata'>;
|
|
849
|
+
type WorkflowProcessMetadata = Pick<WorkflowProcessTrackerOptions, 'displayName' | 'goal' | 'source' | 'savedWorkflowName' | 'sourceRunId' | 'sourceWorkflowName' | 'revisionOf' | 'resumedFromRunId' | 'hostMetadata'>;
|
|
850
850
|
interface ManagedWorkflowSnapshot {
|
|
851
851
|
readonly runId: string;
|
|
852
852
|
readonly workflow: string;
|