@kodax-ai/kodax 0.7.55 → 0.7.56
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 +17 -0
- package/README.md +1 -1
- package/README_CN.md +1 -1
- package/dist/chunks/agent-MAAKRAF2.js +2 -0
- package/dist/chunks/argument-completer-OWEXGWNL.js +2 -0
- package/dist/chunks/{chunk-RGPPZOD5.js → chunk-4OHXHC2S.js} +4 -4
- package/dist/chunks/{chunk-HQCLPWRI.js → chunk-5YJIAP6C.js} +2 -2
- package/dist/chunks/{chunk-FRI7UQSB.js → chunk-7EAGBLRV.js} +1 -1
- package/dist/chunks/{chunk-7C2QUBLE.js → chunk-CDGOEK3T.js} +6 -6
- package/dist/chunks/{chunk-MX4G42EV.js → chunk-DHETLULC.js} +3 -3
- package/dist/chunks/{chunk-THAKTCPE.js → chunk-NZVJ3DFC.js} +174 -170
- package/dist/chunks/chunk-QI3MRJGU.js +5 -0
- package/dist/chunks/chunk-XXQ3RLA2.js +2 -0
- package/dist/chunks/{construction-bootstrap-4CIVZMQ5.js → construction-bootstrap-EDDVNP2B.js} +1 -1
- package/dist/chunks/dist-2267YGB5.js +2 -0
- package/dist/chunks/dist-GW32CHO5.js +2 -0
- package/dist/chunks/paste-5IDBBQQ3.js +2 -0
- package/dist/chunks/utils-J7XBBZGB.js +2 -0
- package/dist/index.d.ts +12 -11
- package/dist/index.js +2 -2
- package/dist/kodax_cli.js +874 -870
- package/dist/provider-capabilities.json +2 -0
- package/dist/sdk-agent.d.ts +9 -8
- package/dist/sdk-coding.d.ts +99 -14
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.d.ts +10 -5
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-media.d.ts +99 -0
- package/dist/sdk-media.js +2 -0
- package/dist/sdk-repl.d.ts +11 -10
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-session.d.ts +6 -5
- package/dist/sdk-session.js +1 -1
- package/dist/types-chunks/base.d-CwPfI8WQ.d.ts +271 -0
- package/dist/types-chunks/{bash-prefix-extractor.d-LUGkQHcd.d.ts → bash-prefix-extractor.d-DZF1gDDz.d.ts} +14 -10
- package/dist/types-chunks/{capsule.d-CNonpwAZ.d.ts → capsule.d-D0kjnqYy.d.ts} +3 -3
- package/dist/types-chunks/{guardrail.d-B18oO1gt.d.ts → guardrail.d-DQQknOfb.d.ts} +3 -3
- package/dist/types-chunks/{process.d-Bj82oJhD.d.ts → process.d-BdiIUr8T.d.ts} +1 -1
- package/dist/types-chunks/{resolver.d-CCX9NXWP.d.ts → resolver.d-Djq8KlCE.d.ts} +2 -1
- package/dist/types-chunks/{sdk-session-SjrnWb4-.d.ts → sdk-session-BP6ZNpOp.d.ts} +4 -4
- package/dist/types-chunks/{storage.d-BAuJ0Ks7.d.ts → storage.d-CkydxFsV.d.ts} +2 -2
- package/dist/types-chunks/{base.d-BBNUF9nz.d.ts → types.d-BJmoMf5H.d.ts} +1 -269
- package/dist/types-chunks/{types.d-D4jL-gAA.d.ts → types.d-BKuHSiR0.d.ts} +1 -1
- package/dist/types-chunks/{utils.d-C9MUY8n3.d.ts → utils.d-bC97IuQZ.d.ts} +5 -5
- package/package.json +5 -1
- package/dist/chunks/agent-PYSVWY7M.js +0 -2
- package/dist/chunks/argument-completer-CTDNNWV3.js +0 -2
- package/dist/chunks/chunk-EVIDQWMF.js +0 -5
- package/dist/chunks/dist-7KTO2PUU.js +0 -2
- package/dist/chunks/dist-BNKIZRCP.js +0 -2
- package/dist/chunks/paste-5DSTHQGK.js +0 -2
- package/dist/chunks/utils-2QXBKYPJ.js +0 -2
|
@@ -482,272 +482,4 @@ interface KodaXProviderStreamOptions {
|
|
|
482
482
|
signal?: AbortSignal;
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
|
|
486
|
-
* Retry-After header parsing — FEATURE_130 (v0.7.36).
|
|
487
|
-
*
|
|
488
|
-
* Handles the four forms KodaX's 12 provider adapters encounter when a
|
|
489
|
-
* model returns 429 (rate limit) or 503/529 (overloaded):
|
|
490
|
-
*
|
|
491
|
-
* 1. `Retry-After: 120` — integer seconds (HTTP 7231 standard)
|
|
492
|
-
* 2. `Retry-After: <HTTP-date>` — RFC 7231 IMF-fixdate
|
|
493
|
-
* e.g. "Wed, 21 Oct 2026 07:28:00 GMT"
|
|
494
|
-
* 3. `retry-after-ms: 45000` — Anthropic millisecond extension
|
|
495
|
-
* 4. (no Retry-After header present) — falls back to exponential backoff
|
|
496
|
-
* capped at `maxBackoffMs`, with optional jitter for the
|
|
497
|
-
* "thundering herd" protection.
|
|
498
|
-
*
|
|
499
|
-
* All return values are normalized to whole milliseconds and clamped to
|
|
500
|
-
* a sensible upper bound — never block the user for more than 120s, and
|
|
501
|
-
* never honor a header advertising a wait longer than `maxHeaderWaitMs`
|
|
502
|
-
* (default 120s). Beyond that limit we still extract the header but cap
|
|
503
|
-
* it; the calling provider can check `cappedFromHeader` to decide
|
|
504
|
-
* whether to surface a "rate limit exceeded — please wait" error to the
|
|
505
|
-
* user instead of silently sleeping for two minutes.
|
|
506
|
-
*
|
|
507
|
-
* Pattern-B (FEATURE_119) interaction: the helper is referentially
|
|
508
|
-
* transparent and stateless — it can be invoked concurrently by N
|
|
509
|
-
* parallel children without coordination. The retry loop in each
|
|
510
|
-
* provider holds its own attempt counter; this helper only translates
|
|
511
|
-
* headers/attempts into wait durations.
|
|
512
|
-
*
|
|
513
|
-
* Reference: opencode session/retry.ts:14-123 (4-form coverage).
|
|
514
|
-
*/
|
|
515
|
-
type RetryAfterSource = 'retry-after-seconds' | 'retry-after-date' | 'retry-after-ms' | 'exponential-backoff';
|
|
516
|
-
type RetryAfterResult = {
|
|
517
|
-
readonly type: 'header';
|
|
518
|
-
readonly waitMs: number;
|
|
519
|
-
readonly source: 'retry-after-seconds' | 'retry-after-date' | 'retry-after-ms';
|
|
520
|
-
/** True when the header value exceeded `maxHeaderWaitMs` and was clamped. */
|
|
521
|
-
readonly cappedFromHeader: boolean;
|
|
522
|
-
} | {
|
|
523
|
-
readonly type: 'backoff';
|
|
524
|
-
readonly waitMs: number;
|
|
525
|
-
readonly source: 'exponential-backoff';
|
|
526
|
-
readonly attempt: number;
|
|
527
|
-
};
|
|
528
|
-
interface ParseRetryAfterOptions {
|
|
529
|
-
/** Zero-based attempt index used by the backoff branch (0 = first retry). */
|
|
530
|
-
readonly attempt: number;
|
|
531
|
-
/** Base delay for exponential backoff. Default 1000ms. */
|
|
532
|
-
readonly baseBackoffMs?: number;
|
|
533
|
-
/** Maximum exponential backoff cap. Default 30000ms. */
|
|
534
|
-
readonly maxBackoffMs?: number;
|
|
535
|
-
/** Maximum wait honored from a header. Default 120000ms. */
|
|
536
|
-
readonly maxHeaderWaitMs?: number;
|
|
537
|
-
/**
|
|
538
|
-
* Override the "now" reference used by the HTTP-date branch.
|
|
539
|
-
* Test-only escape hatch — production code should leave this undefined.
|
|
540
|
-
*/
|
|
541
|
-
readonly now?: () => number;
|
|
542
|
-
/**
|
|
543
|
-
* Whether the backoff branch adds 0-25% jitter on top of the base
|
|
544
|
-
* exponential. Default true (matches the legacy `withRateLimit`
|
|
545
|
-
* jitter contract). Tests can pass `false` for deterministic output.
|
|
546
|
-
*/
|
|
547
|
-
readonly withJitter?: boolean;
|
|
548
|
-
}
|
|
549
|
-
type HeadersLike = Headers | Record<string, string | string[] | undefined> | undefined;
|
|
550
|
-
/**
|
|
551
|
-
* Parse rate-limit/overload retry-after headers (4 forms) and decide
|
|
552
|
-
* how long the caller should sleep before retrying. Returns either:
|
|
553
|
-
*
|
|
554
|
-
* - `{type: 'header', ...}` when one of the supported headers was found
|
|
555
|
-
* and converted into a wait duration; OR
|
|
556
|
-
* - `{type: 'backoff', ...}` falling back to exponential backoff for
|
|
557
|
-
* the given `attempt` index when no header is present.
|
|
558
|
-
*/
|
|
559
|
-
declare function parseRetryAfter(headers: HeadersLike, options: ParseRetryAfterOptions): RetryAfterResult;
|
|
560
|
-
/**
|
|
561
|
-
* Pull headers off a thrown error in the various shapes produced across
|
|
562
|
-
* provider SDKs (Anthropic, OpenAI, fetch-based custom providers).
|
|
563
|
-
* Returns `undefined` when no headers can be located — the helper then
|
|
564
|
-
* falls through to exponential backoff.
|
|
565
|
-
*/
|
|
566
|
-
declare function extractHeadersFromError(error: unknown): HeadersLike;
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* KodaX Base Provider
|
|
570
|
-
*
|
|
571
|
-
* Provider 抽象基类 - 所有 Provider 的公共基础
|
|
572
|
-
*/
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* FEATURE_130 (v0.7.36): structured payload fired through
|
|
576
|
-
* `KodaXEvents.onRetryAfter` whenever a provider's `withRateLimit`
|
|
577
|
-
* loop catches a 429 / 503 / 529 response and decides to wait. The
|
|
578
|
-
* `source` field carries which retry-after header form (or fallback)
|
|
579
|
-
* produced the wait duration so UI surfaces can show "provider asked
|
|
580
|
-
* us to wait 45s" vs "no header, exp-backoff guess of 4s".
|
|
581
|
-
*/
|
|
582
|
-
interface KodaXRetryAfterEvent {
|
|
583
|
-
readonly provider: string;
|
|
584
|
-
readonly waitMs: number;
|
|
585
|
-
readonly reason: 'rate-limit' | 'overloaded';
|
|
586
|
-
readonly source: RetryAfterSource;
|
|
587
|
-
readonly attempt: number;
|
|
588
|
-
readonly maxAttempts: number;
|
|
589
|
-
}
|
|
590
|
-
type KodaXOnRetryAfterCallback = (event: KodaXRetryAfterEvent) => void;
|
|
591
|
-
declare abstract class KodaXBaseProvider {
|
|
592
|
-
abstract readonly name: string;
|
|
593
|
-
abstract readonly supportsThinking: boolean;
|
|
594
|
-
protected abstract readonly config: KodaXProviderConfig;
|
|
595
|
-
/**
|
|
596
|
-
* Per-request override for `max_tokens` in the next provider call. Consumed
|
|
597
|
-
* once and cleared in `withRateLimit` after the next successful response.
|
|
598
|
-
* Two callers set this:
|
|
599
|
-
* 1. Context-overflow recovery inside `withRateLimit` (reduces budget
|
|
600
|
-
* when the model reports "prompt too long").
|
|
601
|
-
* 2. The agent loop's max_tokens escalation path, which flips this to
|
|
602
|
-
* `KODAX_ESCALATED_MAX_OUTPUT_TOKENS` when a capped-budget turn
|
|
603
|
-
* returns `stop_reason: max_tokens`. See `coding/src/agent.ts`.
|
|
604
|
-
*/
|
|
605
|
-
protected maxOutputTokensOverride?: number;
|
|
606
|
-
/**
|
|
607
|
-
* Public setter for the one-shot override above. Callers outside the
|
|
608
|
-
* provider package (notably the agent loop's escalation branch) use this
|
|
609
|
-
* to stage a larger budget for the next stream call in the same logical
|
|
610
|
-
* turn. Pass `undefined` to clear a stale override explicitly.
|
|
611
|
-
*/
|
|
612
|
-
setMaxOutputTokensOverride(value: number | undefined): void;
|
|
613
|
-
/**
|
|
614
|
-
* Returns the max_tokens value the provider will currently use on its
|
|
615
|
-
* next request. Precedence (highest to lowest):
|
|
616
|
-
* 1. One-shot override (agent escalation, context-overflow recovery)
|
|
617
|
-
* 2. User env var `KODAX_MAX_OUTPUT_TOKENS` (explicit user intent)
|
|
618
|
-
* 3. Active model descriptor's `maxOutputTokens` (FEATURE_098)
|
|
619
|
-
* 4. Provider config default
|
|
620
|
-
* 5. Global `KODAX_MAX_TOKENS` fallback
|
|
621
|
-
* Used by provider stream() paths and by the agent loop to decide
|
|
622
|
-
* whether escalation is applicable (see `coding/src/agent.ts`).
|
|
623
|
-
*/
|
|
624
|
-
getEffectiveMaxOutputTokens(model?: string): number;
|
|
625
|
-
/**
|
|
626
|
-
* Hard cap on a single streaming request's wall-clock duration (ms).
|
|
627
|
-
* Returns undefined when no cap is configured. Consumed by the
|
|
628
|
-
* resilience layer to abort a doomed stream before the server-side
|
|
629
|
-
* kill window fires; routed through `non_streaming_fallback`.
|
|
630
|
-
*
|
|
631
|
-
* Cascade (highest to lowest):
|
|
632
|
-
* 1. Active model descriptor's `streamMaxDurationMs`
|
|
633
|
-
* 2. Provider config default
|
|
634
|
-
* 3. undefined (watchdog disabled)
|
|
635
|
-
*/
|
|
636
|
-
getStreamMaxDurationMs(model?: string): number | undefined;
|
|
637
|
-
/**
|
|
638
|
-
* Resolves whether OpenAI-compat `reasoning_content` should echo back
|
|
639
|
-
* on replayed assistant messages for the given model. Same cascade as
|
|
640
|
-
* `getStreamMaxDurationMs`. Defaults to false when neither layer sets it.
|
|
641
|
-
*/
|
|
642
|
-
getEffectiveReplayReasoningContent(model?: string): boolean;
|
|
643
|
-
/**
|
|
644
|
-
* Resolves whether Anthropic-style thinking signatures must verify
|
|
645
|
-
* strictly (Anthropic proper only). Same cascade as
|
|
646
|
-
* `getStreamMaxDurationMs`. Defaults to false (lenient) when neither
|
|
647
|
-
* layer sets it — matches third-party Anthropic-compat behavior.
|
|
648
|
-
*/
|
|
649
|
-
getEffectiveStrictThinkingSignature(model?: string): boolean;
|
|
650
|
-
abstract stream(messages: KodaXMessage[], tools: KodaXToolDefinition[], system: string, reasoning?: boolean | KodaXReasoningRequest, streamOptions?: KodaXProviderStreamOptions, signal?: AbortSignal): Promise<KodaXStreamResult>;
|
|
651
|
-
supportsNonStreamingFallback(): boolean;
|
|
652
|
-
complete(_messages: KodaXMessage[], _tools: KodaXToolDefinition[], _system: string, _reasoning?: boolean | KodaXReasoningRequest, _streamOptions?: KodaXProviderStreamOptions, _signal?: AbortSignal): Promise<KodaXStreamResult>;
|
|
653
|
-
isConfigured(): boolean;
|
|
654
|
-
/**
|
|
655
|
-
* FEATURE_216 v0.7.45 — Lightweight credential verification. Returns
|
|
656
|
-
* a never-throws envelope with `ok` + categorized `error`. Concrete
|
|
657
|
-
* compat base classes (`KodaXAnthropicCompatProvider`,
|
|
658
|
-
* `KodaXOpenAICompatProvider`) override this to dispatch by the
|
|
659
|
-
* `verifyStrategy` field. The default here returns `unsupported` so
|
|
660
|
-
* Provider classes that don't extend a compat base — or future ones
|
|
661
|
-
* yet to be wired — fail safely instead of throwing.
|
|
662
|
-
*
|
|
663
|
-
* Distinct from `isConfigured()`: that one is env-only (no network);
|
|
664
|
-
* this one hits the wire (zero or ~7 tokens depending on strategy)
|
|
665
|
-
* and verifies the key is actually accepted by the upstream.
|
|
666
|
-
*/
|
|
667
|
-
verifyCredential(_opts?: {
|
|
668
|
-
timeoutMs?: number;
|
|
669
|
-
signal?: AbortSignal;
|
|
670
|
-
}): Promise<KodaXVerifyCredentialResult>;
|
|
671
|
-
getModel(): string;
|
|
672
|
-
getAvailableModels(): string[];
|
|
673
|
-
getModelDescriptor(modelId?: string): KodaXModelDescriptor | undefined;
|
|
674
|
-
getBaseUrl(): string | undefined;
|
|
675
|
-
getApiKeyEnv(): string;
|
|
676
|
-
getCapabilityProfile(): KodaXProviderCapabilityProfile;
|
|
677
|
-
getConfiguredReasoningCapability(modelOverride?: string): KodaXReasoningCapability;
|
|
678
|
-
getReasoningCapability(modelOverride?: string): KodaXReasoningCapability;
|
|
679
|
-
getReasoningOverride(modelOverride?: string): KodaXReasoningOverride | undefined;
|
|
680
|
-
getReasoningOverrideKey(modelOverride?: string): string;
|
|
681
|
-
protected persistReasoningCapabilityOverride(capability: KodaXReasoningCapability, modelOverride?: string): void;
|
|
682
|
-
protected shouldFallbackForReasoningError(error: unknown, ...terms: string[]): boolean;
|
|
683
|
-
protected shouldFallbackForSpecificReasoningError(error: unknown, ...terms: string[]): boolean;
|
|
684
|
-
protected shouldFallbackForForcedToolChoiceError(error: unknown): boolean;
|
|
685
|
-
protected isServerError(error: unknown): boolean;
|
|
686
|
-
protected getReasoningFallbackChain(capability: KodaXReasoningCapability): KodaXReasoningCapability[];
|
|
687
|
-
/**
|
|
688
|
-
* 获取模型的上下文窗口大小
|
|
689
|
-
*
|
|
690
|
-
* Backwards-compatible no-arg form: resolves against the provider's
|
|
691
|
-
* default model descriptor. New call sites that know the active
|
|
692
|
-
* model should use `getEffectiveContextWindow(model)` directly.
|
|
693
|
-
* @returns 上下文窗口大小 (tokens)
|
|
694
|
-
*/
|
|
695
|
-
getContextWindow(): number;
|
|
696
|
-
/**
|
|
697
|
-
* Resolves the context window for a specific model.
|
|
698
|
-
* Precedence (highest to lowest):
|
|
699
|
-
* 1. Active model descriptor's `contextWindow` (FEATURE_098)
|
|
700
|
-
* 2. Provider config default
|
|
701
|
-
* 3. 200_000 fallback
|
|
702
|
-
* The user-level `compaction.contextWindow` is layered on top of
|
|
703
|
-
* this at the call site, so it remains the highest-priority manual
|
|
704
|
-
* override.
|
|
705
|
-
*/
|
|
706
|
-
getEffectiveContextWindow(model?: string): number;
|
|
707
|
-
protected getApiKey(): string;
|
|
708
|
-
protected shouldLogStreamDiagnostics(): boolean;
|
|
709
|
-
protected logStreamDiagnostic(...args: unknown[]): void;
|
|
710
|
-
protected normalizeReasoning(reasoning?: boolean | KodaXReasoningRequest): Required<KodaXReasoningRequest>;
|
|
711
|
-
/**
|
|
712
|
-
* Called when ECONNRESET/EPIPE is detected, indicating a stale keep-alive
|
|
713
|
-
* socket. Subclasses should override to rebuild their HTTP client with a
|
|
714
|
-
* fresh connection pool so the next retry uses a new TCP connection.
|
|
715
|
-
*/
|
|
716
|
-
protected onStaleConnection(): void;
|
|
717
|
-
protected isRateLimitError(error: unknown): boolean;
|
|
718
|
-
/**
|
|
719
|
-
* FEATURE_130: classify a rate-limit error as either a 429-style
|
|
720
|
-
* "rate-limit" or a 503/529-style "overloaded" condition. The
|
|
721
|
-
* distinction matters for UI: "rate-limit" usually surfaces a
|
|
722
|
-
* provider-supplied retry-after window; "overloaded" tends to fall
|
|
723
|
-
* through to exponential backoff with no header. Both flow through
|
|
724
|
-
* the same retry path; this only labels the event.
|
|
725
|
-
*/
|
|
726
|
-
protected classifyRateLimitReason(error: unknown): 'rate-limit' | 'overloaded';
|
|
727
|
-
/**
|
|
728
|
-
* Extract Retry-After delay from error headers (429/529 responses).
|
|
729
|
-
* Returns milliseconds, or undefined when no usable header is present.
|
|
730
|
-
*
|
|
731
|
-
* FEATURE_130 (v0.7.36): now delegates to the shared `parseRetryAfter`
|
|
732
|
-
* helper so all 12 provider adapters get 4-form coverage without each
|
|
733
|
-
* adapter rolling its own parser. The 4 forms supported are:
|
|
734
|
-
* - `Retry-After: <integer-seconds>`
|
|
735
|
-
* - `Retry-After: <HTTP-date>`
|
|
736
|
-
* - `retry-after-ms: <milliseconds>` (Anthropic extension)
|
|
737
|
-
* - exponential-backoff fallback (returned via `withRateLimit`,
|
|
738
|
-
* not through this helper — it is `undefined` here when no
|
|
739
|
-
* header is present, which the caller then resolves to backoff)
|
|
740
|
-
*/
|
|
741
|
-
protected extractRetryAfterMs(error: unknown): number | undefined;
|
|
742
|
-
/**
|
|
743
|
-
* Detect "prompt too long / context window exceeded" errors and compute
|
|
744
|
-
* a reduced max_tokens for retry. Returns undefined if not a context
|
|
745
|
-
* overflow error.
|
|
746
|
-
*/
|
|
747
|
-
protected parseContextOverflow(error: unknown): number | undefined;
|
|
748
|
-
protected isContextOverflowError(error: unknown): boolean;
|
|
749
|
-
protected withRateLimit<T>(fn: () => Promise<T>, signal?: AbortSignal, retries?: number, onRateLimit?: (attempt: number, maxRetries: number, delayMs: number) => void, onRetryAfter?: KodaXOnRetryAfterCallback): Promise<T>;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
export { extractHeadersFromError as aa, parseRetryAfter as ab, KodaXBaseProvider as f };
|
|
753
|
-
export type { KodaXToolDefinition as $, KodaXProviderMultimodalSupport as A, KodaXProviderSessionSupport as B, KodaXProviderStreamOptions as C, KodaXProviderToolCallingFidelity as D, KodaXProviderTransport as E, KodaXReasoningCapability as F, KodaXReasoningMode as G, KodaXReasoningOverride as H, KodaXReasoningRequest as I, KodaXRedactedThinkingBlock as J, KodaXAmaControllerDecision as K, KodaXRetryAfterEvent as L, KodaXReviewScale as M, KodaXRiskLevel as N, KodaXStreamResult as O, KodaXTaskActionability as P, KodaXTaskBudgetOverrides as Q, KodaXTaskComplexity as R, KodaXTaskFamily as S, KodaXTaskRoutingDecision as T, KodaXTaskType as U, KodaXTaskWorkIntent as V, KodaXTextBlock as W, KodaXThinkingBlock as X, KodaXThinkingBudgetMap as Y, KodaXThinkingDepth as Z, KodaXTokenUsage as _, KodaXAmaFanoutClass as a, KodaXToolResultBlock as a0, KodaXToolResultContentItem as a1, KodaXToolResultImageItem as a2, KodaXToolResultTextItem as a3, KodaXToolUseBlock as a4, KodaXVerifyCredentialResult as a5, KodaXVerifyStrategy as a6, ParseRetryAfterOptions as a7, RetryAfterResult as a8, RetryAfterSource as a9, KodaXAmaFanoutPolicy as b, KodaXAmaProfile as c, KodaXAmaTactic as d, KodaXAssuranceIntent as e, KodaXCacheBoundary as g, KodaXContentBlock as h, KodaXCustomProviderConfig as i, KodaXExecutionMode as j, KodaXExecutionPattern as k, KodaXHarnessProfile as l, KodaXImageBlock as m, KodaXListModelsResult as n, KodaXMessage as o, KodaXModelDescriptor as p, KodaXMutationSurface as q, KodaXOnRetryAfterCallback as r, KodaXProtocolFamily as s, KodaXProviderCapabilityProfile as t, KodaXProviderConfig as u, KodaXProviderContextFidelity as v, KodaXProviderConversationSemantics as w, KodaXProviderEvidenceSupport as x, KodaXProviderLongRunningSupport as y, KodaXProviderMcpSupport as z };
|
|
485
|
+
export type { KodaXToolResultImageItem as $, KodaXProviderStreamOptions as A, KodaXProviderToolCallingFidelity as B, KodaXProviderTransport as C, KodaXReasoningCapability as D, KodaXReasoningMode as E, KodaXReasoningOverride as F, KodaXReasoningRequest as G, KodaXRedactedThinkingBlock as H, KodaXReviewScale as I, KodaXRiskLevel as J, KodaXAmaControllerDecision as K, KodaXStreamResult as L, KodaXTaskActionability as M, KodaXTaskBudgetOverrides as N, KodaXTaskComplexity as O, KodaXTaskFamily as P, KodaXTaskRoutingDecision as Q, KodaXTaskType as R, KodaXTaskWorkIntent as S, KodaXTextBlock as T, KodaXThinkingBlock as U, KodaXThinkingBudgetMap as V, KodaXThinkingDepth as W, KodaXTokenUsage as X, KodaXToolDefinition as Y, KodaXToolResultBlock as Z, KodaXToolResultContentItem as _, KodaXAmaFanoutClass as a, KodaXToolResultTextItem as a0, KodaXToolUseBlock as a1, KodaXVerifyCredentialResult as a2, KodaXVerifyStrategy as a3, KodaXAmaFanoutPolicy as b, KodaXAmaProfile as c, KodaXAmaTactic as d, KodaXAssuranceIntent as e, KodaXCacheBoundary as f, KodaXContentBlock as g, KodaXCustomProviderConfig as h, KodaXExecutionMode as i, KodaXExecutionPattern as j, KodaXHarnessProfile as k, KodaXImageBlock as l, KodaXListModelsResult as m, KodaXMessage as n, KodaXModelDescriptor as o, KodaXMutationSurface as p, KodaXProtocolFamily as q, KodaXProviderCapabilityProfile as r, KodaXProviderConfig as s, KodaXProviderContextFidelity as t, KodaXProviderConversationSemantics as u, KodaXProviderEvidenceSupport as v, KodaXProviderLongRunningSupport as w, KodaXProviderMcpSupport as x, KodaXProviderMultimodalSupport as y, KodaXProviderSessionSupport as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as Guardrail, aG as RunnerToolCall, d as Agent, f as AgentMessage, aJ as RunnerToolResult, aS as Span } from './process.d-
|
|
1
|
+
import { y as Guardrail, aG as RunnerToolCall, d as Agent, f as AgentMessage, aJ as RunnerToolResult, aS as Span } from './process.d-BdiIUr8T.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Guardrail Runtime — FEATURE_085 (v0.7.26).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as SessionStorage$1, b as PermissionMode } from './storage.d-
|
|
3
|
-
import { ac as KodaXSessionUiHistoryItem, a4 as KodaXSessionLineage, Y as KodaXSessionArtifactLedgerEntry, Q as KodaXExtensionSessionState, P as KodaXExtensionSessionRecord, a8 as KodaXSessionRuntimeInfo, aa as KodaXSessionStorage, $ as KodaXSessionData, bD as WorkflowProcessSource } from './process.d-
|
|
4
|
-
import {
|
|
5
|
-
import { A as AgentsFile, f as AutoModeStats, l as KodaXMcpServersConfig } from './guardrail.d-
|
|
1
|
+
import { U as KodaXOptions, u as KodaXContextTokenSnapshot, m as KodaXAgentMode, Z as KodaXRepoIntelligenceMode, aa as KodaXSkillInvocationContext } from './bash-prefix-extractor.d-DZF1gDDz.js';
|
|
2
|
+
import { c as SessionStorage$1, b as PermissionMode } from './storage.d-CkydxFsV.js';
|
|
3
|
+
import { ac as KodaXSessionUiHistoryItem, a4 as KodaXSessionLineage, Y as KodaXSessionArtifactLedgerEntry, Q as KodaXExtensionSessionState, P as KodaXExtensionSessionRecord, a8 as KodaXSessionRuntimeInfo, aa as KodaXSessionStorage, $ as KodaXSessionData, bD as WorkflowProcessSource } from './process.d-BdiIUr8T.js';
|
|
4
|
+
import { n as KodaXMessage, E as KodaXReasoningMode, r as KodaXProviderCapabilityProfile, F as KodaXReasoningOverride, h as KodaXCustomProviderConfig } from './types.d-BJmoMf5H.js';
|
|
5
|
+
import { A as AgentsFile, f as AutoModeStats, l as KodaXMcpServersConfig } from './guardrail.d-DQQknOfb.js';
|
|
6
6
|
import * as readline from 'readline';
|
|
7
7
|
import { SpawnSyncReturns } from 'child_process';
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodax-ai/kodax",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.56",
|
|
4
4
|
"description": "极致轻量化 Coding Agent - TypeScript 实现,支持 12 个 LLM 提供商,可发布为免 Node 单文件二进制",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"types": "./dist/sdk-coding.d.ts",
|
|
33
33
|
"import": "./dist/sdk-coding.js"
|
|
34
34
|
},
|
|
35
|
+
"./media": {
|
|
36
|
+
"types": "./dist/sdk-media.d.ts",
|
|
37
|
+
"import": "./dist/sdk-media.js"
|
|
38
|
+
},
|
|
35
39
|
"./repl": {
|
|
36
40
|
"types": "./dist/sdk-repl.d.ts",
|
|
37
41
|
"import": "./dist/sdk-repl.js"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{Pb as c,Qb as d,Rb as e,Sb as f,kc as g,lc as h,pd as i,ud as j}from"./chunk-THAKTCPE.js";import"./chunk-7C2QUBLE.js";import{jb as a,kb as b}from"./chunk-JCDO2FR4.js";import"./chunk-V4WSBIXB.js";export{d as bucketProviderPayloadSize,g as buildAutoRepoIntelligenceContext,e as checkPromiseSignal,b as cleanupIncompleteToolCalls,h as describeTransientProviderRetry,f as emitResilienceDebug,c as estimateProviderPayloadBytes,j as runKodaX,i as saveSessionSnapshot,a as validateAndFixToolHistory};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{wa as a,xa as b}from"./chunk-HQCLPWRI.js";import"./chunk-FRI7UQSB.js";import"./chunk-ZBK3DZ3S.js";import"./chunk-MX4G42EV.js";import"./chunk-THAKTCPE.js";import"./chunk-7C2QUBLE.js";import"./chunk-JCDO2FR4.js";import"./chunk-V4WSBIXB.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{a as r}from"./chunk-V4WSBIXB.js";var N="\x1B[?2004h",j="\x1B[?2004l",b=!1,f=!1;function C(){if(!f)try{process.stdout.write(N),f=!0}catch{}}r(C,"enableBracketedPasteMode");function T(){if(f)try{process.stdout.write(j)}catch{}finally{f=!1}}r(T,"disableBracketedPasteMode");function L(){return f}r(L,"isBracketedPasteModeEnabled");function O(){if(b)return;b=!0;let e=r(()=>T(),"handler");process.once("beforeExit",e),process.once("exit",e),process.once("SIGINT",()=>{e(),process.kill(process.pid,"SIGINT")}),process.once("SIGTERM",()=>{e(),process.kill(process.pid,"SIGTERM")}),process.once("uncaughtException",t=>{throw e(),t})}r(O,"installBracketedPasteShutdownGuard");import{readFile as ae}from"node:fs/promises";import{spawn as E}from"node:child_process";import{mkdtemp as F,readFile as I,rm as z}from"node:fs/promises";import{tmpdir as W}from"node:os";import k from"node:path";var P=5e3;async function p(){switch(process.platform){case"darwin":return X();case"win32":return q();case"linux":return J();default:return null}}r(p,"readClipboardImage");async function _(e){let t=await F(k.join(W(),"kodax-clip-")),a=k.join(t,"clip.png");try{return await e(a)}finally{await z(t,{recursive:!0,force:!0}).catch(()=>{})}}r(_,"runWithTempPng");async function X(){return _(async e=>{let t=`set png_data to (the clipboard as \xABclass PNGf\xBB)
|
|
3
|
-
set fh to open for access POSIX file "${e.replace(/"/g,'\\"')}" with write permission
|
|
4
|
-
write png_data to fh
|
|
5
|
-
close access fh`;if(!await M("osascript",["-e",t]))return null;try{let n=await I(e);return n.length>0?n:null}catch{return null}})}r(X,"readMacClipboard");async function q(){return _(async e=>{let t=["Add-Type -AssemblyName System.Drawing | Out-Null","$img = Get-Clipboard -Format Image","if ($null -eq $img) { exit 1 }",`$img.Save('${e.replace(/'/g,"''")}', [System.Drawing.Imaging.ImageFormat]::Png)`].join("; ");if(!await M("powershell",["-NoProfile","-Command",t]))return null;try{let n=await I(e);return n.length>0?n:null}catch{return null}})}r(q,"readWinClipboard");async function J(){let e=await Y();return e||Z()}r(J,"readLinuxClipboard");async function Y(){return S("wl-paste",["--type","image/png"])}r(Y,"readLinuxWaylandClipboard");async function Z(){return S("xclip",["-selection","clipboard","-t","image/png","-o"])}r(Z,"readLinuxX11Clipboard");function M(e,t){return new Promise(a=>{let n=!1,i=E(e,t,{stdio:"ignore"}),o=setTimeout(()=>{if(!n){n=!0;try{i.kill()}catch{}a(!1)}},P);i.once("error",()=>{n||(n=!0,clearTimeout(o),a(!1))}),i.once("exit",s=>{n||(n=!0,clearTimeout(o),a(s===0))})})}r(M,"runCommand");function S(e,t){return new Promise(a=>{let n=!1,i=[],o;try{o=E(e,t,{stdio:["ignore","pipe","ignore"]})}catch{a(null);return}let s=setTimeout(()=>{if(!n){n=!0;try{o.kill()}catch{}a(null)}},P);o.stdout?.on("data",l=>i.push(l)),o.once("error",()=>{n||(n=!0,clearTimeout(s),a(null))}),o.once("exit",l=>{if(n)return;if(n=!0,clearTimeout(s),l!==0){a(null);return}let c=Buffer.concat(i);a(c.length>0?c:null)})})}r(S,"collectStdoutBytes");import{Jimp as H}from"jimp";var g=2e3,d=Math.floor(3.75*1024*1024),u=class extends Error{static{r(this,"ImageResizeError")}constructor(t){super(t),this.name="ImageResizeError"}},U=[80,60,40];async function h(e){if(e.length===0)throw new u("Empty image buffer.");let t;try{t=await H.read(e)}catch(c){let m=c instanceof Error?c.message:String(c);throw new u(`Failed to decode image: ${m}`)}let{width:a,height:n}=t.bitmap,i=Math.max(a,n);if(i>g){let c=g/i;t.resize({w:Math.max(1,Math.round(a*c)),h:Math.max(1,Math.round(n*c))})}let o=t.bitmap.width,s=t.bitmap.height,l=await t.getBuffer("image/png");if(l.length<=d)return{buffer:Buffer.from(l),mediaType:"image/png",width:o,height:s};for(let c of U){let m=await t.getBuffer("image/jpeg",{quality:c});if(m.length<=d)return{buffer:Buffer.from(m),mediaType:"image/jpeg",width:o,height:s}}throw new u(`Image still exceeds budget (${d} bytes raw) after PNG and JPEG q40 compression. Try a smaller image or take a fresh screenshot of a smaller region.`)}r(h,"normalizePastedImage");import{mkdir as V,readdir as K,stat as Q,unlink as v,writeFile as ee}from"node:fs/promises";import{tmpdir as te}from"node:os";import w from"node:path";import{createHash as re}from"node:crypto";var B="KODAX_PASTE_TMP_DIR",A=1440*60*1e3;function D(){return process.env[B]??w.join(te(),"kodax-paste")}r(D,"resolvePasteTmpDir");async function x(e){let t=D();await V(t,{recursive:!0});let a=e.mediaType==="image/jpeg"?".jpg":".png",i=`paste-${re("sha256").update(e.buffer).digest("hex").slice(0,16)}${a}`,o=w.join(t,i);return await ee(o,e.buffer),{type:"image",path:o,mediaType:e.mediaType}}r(x,"persistImageAsBlock");async function ne(e=Date.now()){let t=D(),a;try{a=await K(t)}catch{return 0}let n=e-A,i=0;return await Promise.all(a.filter(o=>o.startsWith("paste-")).map(async o=>{let s=w.join(t,o);try{(await Q(s)).mtimeMs<n&&(await v(s),i+=1)}catch{}})),i}r(ne,"prunePasteTmpDir");var oe=/\.(png|jpe?g|gif|webp|bmp)$/i;async function ie(e){if(e.length===0)return process.platform==="darwin"?R():{kind:"text",text:""};let t=G(e);return t.length>0?ce(t,e):{kind:"text",text:e}}r(ie,"handleBracketedPaste");async function se(){return R()}r(se,"triggerExplicitClipboardImage");async function R(){let e;try{e=await p()}catch(t){return{kind:"error",message:`Failed to read clipboard image: ${y(t)}`}}return e?$(e):{kind:"noop"}}r(R,"readClipboardAsImagesOutcome");async function ce(e,t){let a=[],n=[];for(let i of e){let o;try{o=await ae(i)}catch(l){n.push(`Failed to read ${i}: ${y(l)}`);continue}let s=await $(o);s.kind==="images"?a.push(...s.blocks):s.kind==="error"&&n.push(s.message)}return a.length===0?n.length>0?{kind:"error",message:n.join("; ")}:{kind:"text",text:t}:{kind:"images",blocks:a}}r(ce,"readImagePathsAsOutcome");async function $(e){try{let t=await h(e);return{kind:"images",blocks:[await x(t)]}}catch(t){return t instanceof u?{kind:"error",message:t.message}:{kind:"error",message:`Failed to process pasted image: ${y(t)}`}}}r($,"decodeBufferToOutcome");function G(e){return e.split(/ (?=\/|[A-Za-z]:\\)/).filter(a=>oe.test(a.trim()))}r(G,"extractImagePaths");function y(e){return e instanceof Error?e.message:String(e)}r(y,"describeError");export{C as a,T as b,L as c,O as d,p as e,g as f,d as g,u as h,h as i,B as j,A as k,x as l,ne as m,ie as n,se as o,G as p};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{$ as Wf,$a as Wg,A as vf,Aa as vg,B as wf,Ba as wg,C as xf,Ca as xg,D as yf,Da as yg,E as zf,Ea as zg,F as Af,Fa as Ag,G as Bf,Ga as Bg,H as Cf,Ha as Cg,I as Df,Ia as Dg,J as Ef,Ja as Eg,K as Ff,Ka as Fg,L as Gf,La as Gg,M as Hf,Ma as Hg,N as If,Na as Ig,O as Jf,Oa as Jg,P as Kf,Pa as Kg,Q as Lf,Qa as Lg,R as Mf,Ra as Mg,S as Nf,Sa as Ng,T as Of,Ta as Og,U as Pf,Ua as Pg,V as Qf,Va as Qg,W as Rf,Wa as Rg,X as Sf,Xa as Sg,Y as Tf,Ya as Tg,Z as Uf,Za as Ug,_ as Vf,_a as Vg,a as X,aa as Xf,ab as Xg,b as Y,ba as Yf,bb as Yg,c as Z,ca as Zf,cb as Zg,d as Ze,da as _f,db as _g,e as _e,ea as $f,eb as $g,f as $e,fa as ag,fb as ah,g as af,ga as bg,gb as bh,h as bf,ha as cg,hb as ch,i as cf,ia as dg,ib as dh,j as df,ja as eg,jb as eh,k as ef,ka as fg,kb as fh,l as ff,la as gg,lb as gh,m as gf,ma as hg,mb as hh,n as hf,na as ig,nb as ih,o as jf,oa as jg,ob as jh,p as kf,pa as kg,pb as kh,q as lf,qa as lg,qb as lh,r as mf,ra as mg,rb as mh,s as nf,sa as ng,sb as nh,t as of,ta as og,tb as oh,u as pf,ua as pg,v as qf,va as qg,w as rf,wa as rg,x as sf,xa as sg,y as tf,ya as tg,z as uf,za as ug}from"./chunk-MX4G42EV.js";import{$ as Xb,$b as kd,$c as ie,$d as Se,A as Ab,Aa as uc,Ac as Jd,B as Bb,Ba as vc,Bc as Kd,Bd as we,C as Cb,Ca as wc,Cc as Ld,Cd as xe,D as Db,Dc as Md,Dd as ye,E as Eb,Eb as Xc,Ec as Nd,Ed as ze,F as Fb,Fb as Yc,Fc as Od,Fd as Ae,G as Gb,Gc as Pd,Gd as Be,H as Hb,Hc as Qd,Hd as Ce,I as Ib,Ia as xc,Ic as Rd,Id as De,Ja as yc,Jb as Zc,Jc as Sd,Jd as Ee,Ka as zc,Kb as _c,Kc as Td,Kd as Fe,L as Jb,Lb as $c,Lc as Ud,Ld as Ge,M as Kb,Mb as ad,Mc as Vd,N as Lb,Na as Ac,Nb as bd,Nc as Wd,O as Mb,Oa as Bc,Ob as cd,Oc as Xd,P as Nb,Pa as Cc,Pc as Yd,Q as Ob,Qa as Dc,Qc as Zd,Qd as He,R as Pb,Ra as Ec,Rb as dd,Rc as _d,Rd as Ie,S as Qb,Sa as Fc,Sc as $d,Sd as Je,T as Rb,Ta as Gc,Tc as ae,Td as Ke,Ua as Hc,Ub as ed,Uc as be,Ud as Le,Va as Ic,Vb as fd,Vc as ce,Vd as Me,W as Sb,Wb as gd,Wc as de,Wd as Ne,X as Tb,Xb as hd,Xc as ee,Xd as Oe,Y as Ub,Yb as id,Yc as fe,Yd as Pe,Z as Vb,Zb as jd,Zc as ge,Zd as Qe,_ as Wb,_c as he,_d as Re,a as _,aa as Yb,ac as ld,ad as je,ae as Te,b as $,ba as Zb,bb as Jc,bc as md,bd as ke,be as Ue,ca as _b,cb as Kc,cc as nd,cd as le,ce as Ve,db as Lc,dc as od,dd as me,de as We,ea as $b,eb as Mc,ec as pd,ed as ne,ee as Xe,f as kb,fa as ac,fb as Nc,fc as qd,fd as oe,g as lb,ga as bc,gb as Oc,gc as rd,gd as pe,ge as Ye,ha as cc,hb as Pc,hc as sd,hd as qe,ia as dc,ic as td,ja as ec,jc as ud,k as mb,ka as fc,l as nb,ld as re,m as ob,ma as gc,mb as Qc,mc as vd,md as se,n as pb,na as hc,nb as Rc,nc as wd,o as qb,oa as ic,oc as xd,p as rb,pa as jc,pc as yd,q as sb,qa as kc,qc as zd,r as tb,ra as lc,rc as Ad,s as ub,sa as mc,sb as Sc,sc as Bd,sd as te,t as vb,ta as nc,tb as Tc,tc as Cd,td as ue,u as wb,ua as oc,uc as Dd,ud as ve,v as xb,va as pc,vb as Uc,vc as Ed,w as yb,wa as qc,wb as Vc,wc as Fd,xa as rc,xb as Wc,xc as Gd,y as zb,ya as sc,yc as Hd,za as tc,zc as Id}from"./chunk-THAKTCPE.js";import{$ as y,C as k,K as l,L as m,Q as n,R as o,S as p,T as q,U as r,V as s,W as t,X as u,Y as v,Z as w,_ as x,a,aa as z,b,ba as A,c,ca as B,da as C,ea as D,fa as E,ga as F,ha as G,ia as H,j as d,ja as I,ka as J,la as K,ma as L,na as M,oa as N,pa as O,qa as P,ra as Q,sa as R,t as e,ta as S,u as f,ua as T,v as g,va as U,w as h,wa as V,x as i,xa as W,y as j}from"./chunk-7C2QUBLE.js";import{$b as Ba,Uc as Sa,Vc as Ta,Wc as Ua,Xb as xa,Xc as Va,Yb as ya,Yc as Wa,Zb as za,_b as Aa,a as aa,ac as Ca,b as ba,bc as Da,c as ca,cc as Ea,d as da,dc as Fa,dd as Xa,e as ea,ec as Ga,ed as Ya,f as fa,fc as Ha,fd as Za,gc as Ia,gd as _a,h as ga,hc as Ja,hd as $a,i as ha,ic as Ka,id as ab,j as ia,jb as va,jc as La,jd as bb,k as ja,ka as pa,kb as wa,kc as Ma,l as ka,lc as Na,ld as cb,m as la,mc as Oa,md as db,n as ma,na as qa,nc as Pa,nd as eb,o as na,oc as Qa,od as fb,p as oa,pc as Ra,pd as gb,qd as hb,ua as ra,va as sa,wa as ta,xa as ua,xd as ib,yd as jb}from"./chunk-JCDO2FR4.js";import"./chunk-V4WSBIXB.js";export{cg as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD,dg as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD,xg as BASH_POLICY_SPEC,tf as BLOCKER_REQUIRED_CONSECUTIVE_TURNS,ig as BREAKER_ERROR_THRESHOLD,jg as BREAKER_WINDOW_MS,mh as BUILTIN_WORKFLOWS,lb as CANCELLED_TOOL_RESULT_MESSAGE,kb as CANCELLED_TOOL_RESULT_PREFIX,Uf as CODING_AGENT_MARKER,df as CODING_INVARIANTS,re as CODING_SUMMARY_PROMPT,se as CODING_UPDATE_SUMMARY_PROMPT,Hd as CapabilityDeniedError,ff as Client,me as CombinedExtensionRuntime,Id as ConstructionManifestError,te as DEFAULT_CODING_AGENT_NAME,Jf as DEFAULT_DANGEROUS_PATTERNS,Fd as DEFAULT_HANDLER_TIMEOUT_MS,Jc as DEFAULT_RESILIENCE_CONFIG,If as DEFAULT_SAFE_PATTERNS,Sd as DEFAULT_SELF_MODIFY_BUDGET,tg as DEFAULT_SPECULATIVE_WINDOW_MS,nb as DEFAULT_TOOL_OUTPUT_MAX_BYTES,mb as DEFAULT_TOOL_OUTPUT_MAX_LINES,$g as DEFAULT_WORKFLOW_GENERATION_TIMEOUT_MS,oa as DefaultSummaryCompaction,Rf as EMIT_VERDICT_TOOL_NAME,_ as ErrorCategory,Cc as GENERATOR_AGENT_NAME,ha as KODAX_API_MIN_INTERVAL,p as KODAX_DEFAULT_PROVIDER,ba as KODAX_DEFAULT_TIMEOUT,ca as KODAX_HARD_TIMEOUT,fa as KODAX_MAX_INCOMPLETE_RETRIES,da as KODAX_MAX_RETRIES,aa as KODAX_MAX_TOKENS,o as KODAX_PROVIDERS,n as KODAX_PROVIDER_SNAPSHOTS,d as KODAX_REASONING_MODE_SEQUENCE,ea as KODAX_RETRY_BASE_DELAY,ga as KODAX_STAGGER_DELAY,He as KODAX_TOOLS,l as KodaXAnthropicCompatProvider,k as KodaXBaseProvider,ff as KodaXClient,a as KodaXError,le as KodaXExtensionRuntime,m as KodaXOpenAICompatProvider,b as KodaXProviderError,c as KodaXRateLimitError,Y as KodaXSessionError,Z as KodaXTerminalError,X as KodaXToolError,Sa as LINEAGE_ENTRY_TYPES,gd as LSP_SERVERS,Ua as LineageCompaction,Ta as LineageExtension,hd as LspService,xb as MANUAL_TOPIC_IDS,Da as McpAuthRequiredError,Pa as McpCapabilityProvider,Ca as McpExpiredSessionError,Qa as McpManager,Oa as McpServerRuntime,Bc as PLANNER_AGENT_NAME,ia as PROMISE_PATTERN,ld as PROMPT_SECTION_REGISTRY,Tf as PROTOCOL_EMITTER_TOOLS,Pc as ProviderRecoveryCoordinator,ob as READ_DEFAULT_LIMIT,qb as READ_MAX_LINE_CHARS,pb as READ_PREFLIGHT_SIZE_BYTES,Wb as REPOINTEL_DEFAULT_ENDPOINT,qa as Runner,Ac as SCOUT_AGENT_NAME,rd as SELF_KNOWLEDGE_ROUTING_RULE,kd as SYSTEM_PROMPT,Gg as SYSTEM_WORKFLOW_LIMITS,Nc as StableBoundaryTracker,Fc as TASK_ENGINE_ROLE_AGENTS,pf as TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME,Ag as TRACING_ENV,Dc as WORKER_AGENT_NAME,_g as WORKFLOW_GENERATION_SYSTEM_PROMPT,Zd as _resetRuntimeForTesting,ae as activate,Nb as analyzeChangedScope,Qd as appendAuditEntry,ab as appendSessionLineageLabel,Be as applyAccountingDelta,lf as applyFanoutBranchTransition,bb as applySessionCompaction,mc as applyToolResultGuardrail,hb as archiveOldIslands,mf as assignFanoutBranchWorker,hg as autoModeDenialShouldFallback,qg as bashSignalCollector,Bg as bootstrapTracing,$e as boundedRevise,mg as breakerShouldFallback,af as budgetCeiling,ad as buildAmaControllerDecision,Hg as buildApprovalSummary,Ee as buildBlockedGoal,sd as buildCapabilityContextSections,Vf as buildClassifierPrompt,Fe as buildCompleteGoal,Ae as buildCreatedGoal,_c as buildFallbackRoutingDecision,hf as buildFanoutSchedulerPlan,xf as buildGoalRuntimeBinding,Na as buildInitializeCapabilities,Nd as buildLlmReviewPrompt,Bf as buildMcpReverseCapabilities,Ce as buildPausedGoal,Qc as buildPromptMessageContent,bd as buildPromptOverlay,pd as buildPromptSnapshot,Uc as buildProviderCapabilitySnapshot,$c as buildProviderPolicyHintsForDecision,Vc as buildProviderPolicyPromptNotes,g as buildReasoningOverrideKey,Mb as buildRepoIntelligenceContext,$b as buildRepoIntelligenceIndex,Jb as buildRepoOverview,De as buildResumedGoal,qd as buildSelfKnowledgeRoutingRule,fb as buildSessionTree,ud as buildSystemPrompt,td as buildSystemPromptSnapshot,dh as buildWorkflowGenerationSkillContext,ch as buildWorkflowGenerationUserPrompt,pg as checkAbsoluteDeny,Rc as checkIncompleteToolCalls,dd as checkPromiseSignal,Ig as clampWorkflowLimits,Xf as classify,Lf as classifyBashCommand,$ as classifyError,Lc as classifyResilienceError,wa as cleanupIncompleteToolCalls,j as clearReasoningOverride,Q as clearRuntimeModelProviders,sg as collectAllSignals,ne as combineExtensionRuntimes,Nf as computeInputSignature,Yf as computeRulesFingerprint,Yd as configureRuntime,qc as convertCapabilityReadResult,pc as convertProviderSearchResults,kf as countActiveFanoutBranches,gb as countActiveLineageMessages,ka as countTokens,la as createAgent,eg as createAutoModeDenialTracker,wg as createAutoModeToolGuardrail,Kf as createBashClassifierConfig,zg as createBashPrefixExtractor,Pe as createBuiltinToolDefinition,kg as createCircuitBreaker,Dg as createCodingWorkflowBackend,Jd as createCtxProxy,C as createCustomProvider,ue as createDefaultCodingAgent,Mf as createDenialTracker,oe as createExtensionRuntime,gf as createFanoutSchedulerInput,ma as createHandoff,na as createInMemorySession,Ef as createKodaXTaskRunner,ya as createMcpCapabilityId,Ra as createMcpManager,Ea as createMcpTransport,md as createPromptSection,cd as createReasoningPlan,Fg as createRunGraphWriter,Ze as createSessionControl,Xa as createSessionLineage,qf as createToolResultTruncationGuardrail,Zg as createWorkflowLifecycleController,jh as createWorkflowPatternTemplateModule,Wg as createWorkflowRunManager,kh as decideWorkflowInvocation,Ad as dedupeExtensionPathsByEntrypoint,xa as defaultMcpCacheDir,Gd as defaultPolicy,Rg as deleteSavedWorkflow,Xd as disableSelfModify,Ia as discoverAuthorizationServerMetadata,Ed as discoverDefaultExtensions,Dd as discoverExtensionsInDirectory,Cd as discoverExtensionsInDirectoryDetailed,je as discoverMarkdownAgents,Ja as discoverOAuthEndpoints,Ha as discoverProtectedResourceMetadata,Lg as discoverSavedWorkflows,Ic as drainPendingSwaps,Sf as emitVerdict,ja as estimateTokens,Wc as evaluateProviderPolicy,Bd as excludeExtensionPathsByEntrypoint,vd as exec,Ye as executeTool,ib as extractArtifactLedger,yg as extractCommandPrefix,Tc as extractComparableUserMessageText,oc as extractHtmlTitle,Ga as extractInsufficientScope,Sc as extractPromptComparableText,Fa as extractResourceMetadataUrl,Wa as extractTitleFromMessages,rg as fileSignalCollector,sc as finalizeRetrievalResult,ge as findByVersion,cb as findPreviousUserEntryId,eb as forkSessionLineage,zc as formatAgentsForPrompt,Gf as formatParallelDispatchResult,rb as formatSize,Va as generateSessionId,fh as generateWorkflow,gh as generateWorkflowFromOptions,qe as getActiveExtensionRuntime,sa as getAgentConfigHome,ta as getAgentConfigPath,Re as getAllRegisteredTools,ua as getAppDataDir,T as getAvailableProviderNames,Oe as getBuiltinRegisteredToolDefinition,Ne as getBuiltinToolDefinition,nh as getBuiltinWorkflow,K as getCustomModelCapabilities,E as getCustomProvider,H as getCustomProviderList,J as getCustomProviderModelDescriptors,I as getCustomProviderModels,G as getCustomProviderNames,yd as getDefaultExtensionDirectory,id as getDefaultLspService,Xg as getDefaultWorkflowRunManager,Qf as getDenialContext,jf as getFanoutBranch,ec as getImpactEstimate,xc as getKodaxGlobalDir,Ba as getMcpCachePaths,z as getModelCapabilities,bc as getModuleContext,dc as getProcessContext,q as getProvider,u as getProviderConfiguredCapabilityProfile,t as getProviderConfiguredReasoningCapability,v as getProviderList,s as getProviderModel,y as getProviderModelDescriptors,w as getProviderModels,Le as getRegisteredToolDefinition,ac as getRepoIntelligenceIndex,Kb as getRepoOverview,fc as getRepoRoutingSignals,Ve as getRequiredToolParams,N as getRuntimeModelProvider,P as getRuntimeModelProviderNames,Ya as getSessionLineagePath,Za as getSessionMessagesFromLineage,cc as getSymbolContext,Je as getTool,Ke as getToolDefinition,Me as getToolRegistrations,lc as getToolResultPolicy,ih as getWorkflowPatternTemplate,xe as goalTokenDelta,Hc as hasPendingSwap,Zc as inferTaskType,Cb as inspectEditFailure,Zb as inspectRepoIntelligenceRuntime,F as isCustomProviderName,Pf as isDeniedRecently,S as isKnownProvider,Ff as isParallelDispatchDirective,r as isProviderConfigured,x as isProviderName,O as isRuntimeModelProviderName,Mc as isSessionRecoveryCandidateError,xd as isSupportedExtensionModulePath,Te as isToolFileMutation,Ue as isToolMutation,Se as isToolPlanModeAllowed,Ge as isValidTokenBudget,ed as languageIdForPath,he as listAll,W as listAllModelCapabilities,de as listArtifacts,A as listBuiltinModelCapabilities,Qe as listBuiltinToolDefinitions,oh as listBuiltinWorkflows,fe as listConstructed,L as listCustomProviderModelCapabilities,Xe as listToolDefinitions,We as listTools,hh as listWorkflowPatternTemplates,yc as loadAgentsFiles,ie as loadAgentsFromMarkdown,ag as loadAutoRules,Tg as loadGeneratedWorkflowFromRun,Kd as loadHandler,h as loadReasoningOverride,Og as loadSavedWorkflow,Ng as loadSavedWorkflowCapsule,Ma as loadValidToken,we as makeDisabledGoalToolsContext,of as markFanoutBranchCancelled,nf as markFanoutBranchCompleted,Af as mcpRootsFromWorkspace,jb as mergeArtifactLedger,Mg as normalizeWorkflowModule,nd as orderPromptSections,Cg as parallelInvestigation,$f as parseAutoRules,Wf as parseClassifierOutput,Bb as parseEditToolError,Od as parseLlmReviewVerdict,za as parseMcpCapabilityId,ng as parseModelSpec,eh as parseWorkflowGeneration,La as performOAuthLogin,vb as persistToolOutput,Vg as preflightWorkflowCapsule,gc as prewarmRepoIntelligenceCaches,ee as readArtifact,Rd as readAuditEntries,Td as readBudget,Wd as readDisableState,ug as readSpeculativeWindowFromEnv,Zf as readTrustState,e as reasoningCapabilityToOverride,Yc as reasoningModeToDepth,f as reasoningOverrideToCapability,Oc as reconstructMessagesWithToolGuard,gg as recordAutoModeAllow,fg as recordAutoModeBlock,rf as recordBlockerAttempt,lg as recordBreakerError,Of as recordDenial,ef as registerCodingInvariants,zf as registerConfiguredMcpCapabilityProvider,D as registerCustomProviders,M as registerModelProvider,Ka as registerOAuthClient,Cf as registerOfficialSandboxExtension,pa as registerPresetDispatcher,Ie as registerTool,be as rehydrateActiveArtifacts,Ud as remainingSelfModifyBudget,Qg as renameSavedWorkflow,Ob as renderChangedScope,Vb as renderImpactEstimate,Sb as renderModuleContext,Ub as renderProcessContext,od as renderPromptSections,Lb as renderRepoOverview,rc as renderRetrievalResult,Tb as renderSymbolContext,Sg as replaceSavedWorkflow,fd as reportLspDiagnostics,sf as resetBlockerCounter,Vd as resetBudget,og as resolveClassifierModel,Gc as resolveConstructedAgent,zd as resolveExtensionEntrypoint,yb as resolveKodaXManual,V as resolveModelCapabilities,R as resolveProvider,U as resolveProviderModelDescriptors,Xc as resolveReasoningMode,Yb as resolveRepoIntelligenceMode,Xb as resolveRepoIntelligenceRuntimeConfig,Kc as resolveResilienceConfig,_a as resolveSessionLineageTarget,bf as resolveToolCapability,ah as resolveWorkflowGenerationTimeoutMs,Yg as resolveWorkflowIdentity,ce as revoke,db as rewindSessionLineage,ke as rollbackSelfModify,Ld as runAstRules,ve as runKodaX,Pd as runLlmReview,yf as runManagedTask,Df as runOrchestration,Kg as runWorkflowFromOptions,Jg as runWorkflowModule,Eg as safeWorkflowArtifactName,Pg as saveGeneratedWorkflow,Ug as saveGeneratedWorkflowFromRun,i as saveReasoningOverride,Aa as searchMcpCatalog,pe as setActiveExtensionRuntime,ra as setAgentConfigHome,$a as setSessionLineageActiveEntry,ze as shouldFlipBudgetLimited,jd as shutdownDefaultLspService,vg as speculativeRace,_d as stage,_e as startKodaX,bg as stripAssistantText,nc as stripHtmlToText,$d as testArtifact,Ib as toolAskUserQuestion,Eb as toolBash,Rb as toolChangedDiff,Qb as toolChangedScope,vc as toolCodeSearch,Ab as toolEdit,Fb as toolGlob,Gb as toolGrep,kc as toolImpactEstimate,Db as toolInsertAfterAnchor,hc as toolModuleContext,cf as toolPermission,jc as toolProcessContext,wb as toolRead,Pb as toolRepoOverview,wc as toolSemanticLookup,ic as toolSymbolContext,Hb as toolUndo,uc as toolWebFetch,tc as toolWebSearch,zb as toolWrite,sb as truncateHead,ub as truncateLine,tb as truncateTail,_f as trustProjectRules,ye as turnWallTimeDelta,va as validateAndFixToolHistory,B as validateCustomProviderConfig,bh as validateGeneratedWorkflowSource,Hf as validateSubtaskIndependence,Md as validateToolSchemaForProvider,wf as verifyGoalCompletion,_b as warmRepoIntelligenceRuntime,wd as webhook,uf as withGoalBeforeNextTurn,vf as withGoalStopHook,Ec as workerAgent,lh as workflowStartOutcomeConsumesTurn};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{$,A,Aa,B,Ba,C,Ca,D,Da,E,Ea,F,Fa,G,Ga,H,Ha,I,Ia,J,Ja,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"./chunk-7C2QUBLE.js";import"./chunk-V4WSBIXB.js";export{Aa as DEFAULT_COST_RATES,i as KODAX_API_MIN_INTERVAL,g as KODAX_CAPPED_MAX_OUTPUT_TOKENS,S as KODAX_DEFAULT_PROVIDER,k as KODAX_DEFAULT_THINKING_BUDGETS,h as KODAX_ESCALATED_MAX_OUTPUT_TOKENS,f as KODAX_MAX_TOKENS,R as KODAX_PROVIDERS,Q as KODAX_PROVIDER_SNAPSHOTS,j as KODAX_REASONING_MODE_SEQUENCE,l as KODAX_REASONING_SAFETY_RESERVE,K as KodaXAnthropicCompatProvider,C as KodaXBaseProvider,a as KodaXError,d as KodaXNetworkError,L as KodaXOpenAICompatProvider,b as KodaXProviderError,c as KodaXRateLimitError,e as KodaXToolCallIdError,v as buildReasoningOverrideKey,Ca as calculateCost,r as clampThinkingBudget,F as classifyVerifyError,y as clearReasoningOverride,ra as clearRuntimeModelProviders,Da as createCostTracker,da as createCustomProvider,A as extractHeadersFromError,Ha as formatCost,Ia as formatCostReport,ua as getAvailableProviderNames,M as getCodexCliDefaultModel,O as getCodexCliKnownModels,Ba as getCostRate,la as getCustomModelCapabilities,fa as getCustomProvider,ia as getCustomProviderList,ka as getCustomProviderModelDescriptors,ja as getCustomProviderModels,ha as getCustomProviderNames,p as getDefaultThinkingDepthForMode,N as getGeminiCliDefaultModel,P as getGeminiCliKnownModels,aa as getModelCapabilities,T as getProvider,X as getProviderConfiguredCapabilityProfile,W as getProviderConfiguredReasoningCapability,Y as getProviderList,V as getProviderModel,$ as getProviderModelDescriptors,Z as getProviderModels,m as getReasoningCapability,oa as getRuntimeModelProvider,qa as getRuntimeModelProviderNames,Ga as getSummary,G as insertCacheBoundary,H as isCacheBoundary,ga as isCustomProviderName,ta as isKnownProvider,U as isProviderConfigured,_ as isProviderName,n as isReasoningEnabled,pa as isRuntimeModelProviderName,xa as listAllModelCapabilities,ba as listBuiltinModelCapabilities,ma as listCustomProviderModelCapabilities,za as listProviderModels,w as loadReasoningOverride,I as lowerCacheBoundaries,s as mapDepthToOpenAIReasoningEffort,B as normalizeCapabilityProfile,o as normalizeReasoningRequest,z as parseRetryAfter,D as parseToolInputWithSalvage,t as reasoningCapabilityToOverride,u as reasoningOverrideToCapability,Ea as recordRetry,Fa as recordUsage,ea as registerCustomProviders,na as registerModelProvider,wa as resolveModelCapabilities,sa as resolveProvider,va as resolveProviderModelDescriptors,q as resolveThinkingBudget,E as runVerifyCredential,x as saveReasoningOverride,Ja as sideQuery,J as stripCacheBoundaries,ca as validateCustomProviderConfig,ya as verifyProviderCredential};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-EVIDQWMF.js";import"./chunk-V4WSBIXB.js";export{h as ImageResizeError,f as MAX_DIMENSION,j as PASTE_TMP_DIR_ENV,k as PASTE_TMP_TTL_MS,g as TARGET_RAW_SIZE_BYTES,b as disableBracketedPasteMode,a as enableBracketedPasteMode,p as extractImagePaths,n as handleBracketedPaste,d as installBracketedPasteShutdownGuard,c as isBracketedPasteModeEnabled,i as normalizePastedImage,l as persistImageAsBlock,m as prunePasteTmpDir,e as readClipboardImage,o as triggerExplicitClipboardImage};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{A as z,B as A,C as B,D as C,b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u,w as v,x as w,y as x,z as y}from"./chunk-FRI7UQSB.js";import"./chunk-MX4G42EV.js";import"./chunk-THAKTCPE.js";import"./chunk-7C2QUBLE.js";import"./chunk-JCDO2FR4.js";import"./chunk-V4WSBIXB.js";export{c as KODAX_CONFIG_FILE,a as KODAX_DIR,b as KODAX_SESSIONS_DIR,i as KODAX_VERSION,d as PREVIEW_MAX_LENGTH,p as describeProviderCapabilitySummary,r as describeReasoningCapabilityControl,s as describeReasoningExecution,A as formatProviderCapabilityDetailLines,z as formatProviderSourceKind,q as formatReasoningCapabilityShort,y as getGitRoot,k as getProviderAvailableModels,m as getProviderCapabilityProfile,n as getProviderCapabilitySnapshot,B as getProviderCommonPolicyScenarios,t as getProviderList,j as getProviderModel,o as getProviderPolicyDecision,l as getProviderReasoningCapability,h as getVersion,e as hydrateProcessEnvFromShell,u as isProviderConfigured,v as loadConfig,w as prepareRuntimeConfig,C as rateLimitedCall,g as registerConfiguredCustomProviders,f as resetShellEnvironmentHydrationForTesting,x as saveConfig};
|