@kodax-ai/kodax 0.7.46 → 0.7.47
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 +19 -1
- package/dist/chunks/{chunk-Z4UT32NN.js → chunk-2SMCCP44.js} +1 -1
- package/dist/chunks/{chunk-2GEKCIIW.js → chunk-66B6ZOU7.js} +13 -13
- package/dist/chunks/{chunk-JRT447X5.js → chunk-KRHAO2T3.js} +217 -215
- package/dist/chunks/{chunk-K4RBLNSY.js → chunk-QZFZIGPF.js} +1 -1
- package/dist/chunks/{chunk-XUEINS3X.js → chunk-VGRG2F6H.js} +301 -263
- package/dist/chunks/chunk-VX6HN3JP.js +415 -0
- package/dist/chunks/{compaction-config-PFTBIGQT.js → compaction-config-YU7SI6L6.js} +1 -1
- package/dist/chunks/{construction-bootstrap-2FKNOZZE.js → construction-bootstrap-6UN3OY7X.js} +1 -1
- package/dist/chunks/dist-DS2KIZQG.js +2 -0
- package/dist/chunks/{dist-QTV5M2JW.js → dist-IDNOAB4M.js} +1 -1
- package/dist/chunks/{utils-LY3LB65Z.js → utils-3ISOUEFC.js} +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.js +5 -5
- package/dist/kodax_cli.js +736 -706
- package/dist/provider-capabilities.json +3 -8
- package/dist/sdk-agent.d.ts +34 -3
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +65 -5
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-repl.d.ts +4 -3
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-BICYx8pt.d.ts → bash-prefix-extractor.d-D6hL0Cuv.d.ts} +280 -2
- package/dist/types-chunks/{manager.d-87belpiS.d.ts → manager.d-U3UEwY1P.d.ts} +15 -0
- package/dist/types-chunks/{utils.d-pzHPkrb8.d.ts → utils.d-umRKgMAu.d.ts} +1 -1
- package/package.json +2 -1
- package/dist/chunks/chunk-VBIVZOSD.js +0 -425
- package/dist/chunks/dist-JLMKDPEL.js +0 -2
|
@@ -2,6 +2,7 @@ import { M as McpConnectMode, a as McpServerConfig, b as McpServersConfig, c as
|
|
|
2
2
|
import { g as KodaXGoalState, s as KodaXSessionLineage, x as KodaXSessionScope, y as KodaXSessionStorage, i as KodaXJsonValue, k as KodaXSessionArtifactLedgerEntry, S as SessionErrorMetadata } from './types.d-B_MIIApc.js';
|
|
3
3
|
import { X as KodaXTokenUsage, n as KodaXMessage, E as KodaXReasoningMode, k as KodaXHarnessProfile, S as KodaXTaskWorkIntent, I as KodaXReviewScale, O as KodaXTaskComplexity, a as KodaXAmaFanoutClass, Q as KodaXTaskRoutingDecision, R as KodaXTaskType, J as KodaXRiskLevel, i as KodaXExecutionMode, c as KodaXAmaProfile, d as KodaXAmaTactic, b as KodaXAmaFanoutPolicy } from './types.d-Cf-GCzac.js';
|
|
4
4
|
import { f as AgentMessage, av as StopHookFn, C as ChildTaskRegistry, p as CompactionUpdate, v as Guardrail, s as DiscoveredInstance, az as TaskAbortRegistry, aa as RunnerToolCall, aE as ToolGuardrail } from './types.d-D2RNa5Y7.js';
|
|
5
|
+
import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation } from 'vscode-languageserver-protocol';
|
|
5
6
|
import { C as CapabilityKind, b as CapabilityResult } from './capability.d-3C62G8Eq.js';
|
|
6
7
|
import { K as KodaXBaseProvider } from './base.d-BdJKSPO2.js';
|
|
7
8
|
import { a as CostTracker } from './cost-tracker.d-wRtyEW9d.js';
|
|
@@ -391,6 +392,200 @@ interface TodoStore {
|
|
|
391
392
|
reset(): void;
|
|
392
393
|
}
|
|
393
394
|
|
|
395
|
+
/**
|
|
396
|
+
* FEATURE_132 — language-server registry + discovery (cascade step ①).
|
|
397
|
+
*
|
|
398
|
+
* Each `LspServerInfo` is data describing one server: which languageIds it
|
|
399
|
+
* serves, the project-root markers it should be rooted at, how to discover
|
|
400
|
+
* an installed binary, an optional opt-in `acquire()` (cascade step ②), and
|
|
401
|
+
* one line of actionable install guidance for when it is absent (step ③).
|
|
402
|
+
* Adding a language = appending one entry here (data-driven, LLM-First).
|
|
403
|
+
*
|
|
404
|
+
* Phase A: TypeScript/JavaScript. Phase B: Python (pyright) + Go (gopls).
|
|
405
|
+
* Phase C appends Rust, Java.
|
|
406
|
+
*/
|
|
407
|
+
|
|
408
|
+
/** A resolved server launch: program + args + optional init options. */
|
|
409
|
+
interface LspServerLaunch {
|
|
410
|
+
readonly command: string;
|
|
411
|
+
readonly args: readonly string[];
|
|
412
|
+
readonly initializationOptions?: Record<string, unknown>;
|
|
413
|
+
}
|
|
414
|
+
interface DiscoverContext {
|
|
415
|
+
/** Project root the server will be rooted at. */
|
|
416
|
+
readonly root: string;
|
|
417
|
+
/** `import.meta.url` of the LSP module, used for bundled-TypeScript fallback. */
|
|
418
|
+
readonly moduleUrl?: string;
|
|
419
|
+
}
|
|
420
|
+
interface AcquireContext {
|
|
421
|
+
readonly root: string;
|
|
422
|
+
readonly signal?: AbortSignal;
|
|
423
|
+
readonly onProgress?: (message: string) => void;
|
|
424
|
+
readonly debug?: (message: string) => void;
|
|
425
|
+
}
|
|
426
|
+
interface LspServerInfo {
|
|
427
|
+
readonly id: string;
|
|
428
|
+
readonly languageIds: readonly string[];
|
|
429
|
+
readonly rootMarkers: readonly string[];
|
|
430
|
+
/** Locate an installed server, or `undefined` if not installed. */
|
|
431
|
+
discover(ctx: DiscoverContext): LspServerLaunch | undefined;
|
|
432
|
+
/**
|
|
433
|
+
* Opt-in auto-install (only attempted when `KODAX_LSP_DOWNLOAD=1`). Installs
|
|
434
|
+
* the server, then returns its launch (typically by re-running discovery).
|
|
435
|
+
* Absent for servers KodaX won't auto-install.
|
|
436
|
+
*/
|
|
437
|
+
acquire?(ctx: AcquireContext): Promise<LspServerLaunch | undefined>;
|
|
438
|
+
/** One actionable line shown when discovery + acquire fail (step ③). */
|
|
439
|
+
readonly installGuidance: string;
|
|
440
|
+
}
|
|
441
|
+
/** All servers KodaX knows how to drive. */
|
|
442
|
+
declare const LSP_SERVERS: readonly LspServerInfo[];
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* FEATURE_132 — JSON-RPC LSP client (one spawned server, one project root).
|
|
446
|
+
*
|
|
447
|
+
* Push-diagnostics model: after `didOpen`/`didChange`, the server emits
|
|
448
|
+
* `textDocument/publishDiagnostics`; we cache the latest set per file and
|
|
449
|
+
* let callers wait (debounced) for a fresh publish. All five servers KodaX
|
|
450
|
+
* targets (typescript-language-server, pyright, gopls, rust-analyzer, jdtls)
|
|
451
|
+
* push diagnostics, so we deliberately do NOT port opencode's pull-diagnostic
|
|
452
|
+
* machinery (YAGNI — add it only if a future server requires it).
|
|
453
|
+
*
|
|
454
|
+
* Navigation requests (definition/hover/references/symbols) are added in
|
|
455
|
+
* Phase E.
|
|
456
|
+
*/
|
|
457
|
+
|
|
458
|
+
interface DiagnosticsWaitOptions {
|
|
459
|
+
/** Only a publish with timestamp ≥ this counts as fresh (set before notify). */
|
|
460
|
+
readonly afterMs: number;
|
|
461
|
+
/** Give up waiting after this long and return what we have. */
|
|
462
|
+
readonly timeoutMs: number;
|
|
463
|
+
}
|
|
464
|
+
interface LspClient {
|
|
465
|
+
readonly serverId: string;
|
|
466
|
+
readonly root: string;
|
|
467
|
+
/**
|
|
468
|
+
* Send didOpen (first touch) or didChange (subsequent) for a file, and
|
|
469
|
+
* return the timestamp the notification was sent — pass it as
|
|
470
|
+
* `waitForDiagnostics`'s `afterMs` so only a publish triggered by THIS
|
|
471
|
+
* change counts as fresh.
|
|
472
|
+
*/
|
|
473
|
+
notifyOpenOrChange(file: string): Promise<number>;
|
|
474
|
+
/** Resolve once a fresh diagnostics publish arrives for the file, or on timeout. */
|
|
475
|
+
waitForDiagnostics(file: string, options: DiagnosticsWaitOptions): Promise<void>;
|
|
476
|
+
/** Latest cached diagnostics for a file (empty when none/unknown). */
|
|
477
|
+
diagnostics(file: string): readonly Diagnostic[];
|
|
478
|
+
/** Resolve the definition site(s) of the symbol at a position. */
|
|
479
|
+
definition(file: string, position: Position): Promise<Location[]>;
|
|
480
|
+
/** Type/signature/doc hover for the symbol at a position (null if none). */
|
|
481
|
+
hover(file: string, position: Position): Promise<Hover | null>;
|
|
482
|
+
/** All references to the symbol at a position (incl. its declaration). */
|
|
483
|
+
references(file: string, position: Position): Promise<Location[]>;
|
|
484
|
+
/** The document's symbol outline. */
|
|
485
|
+
documentSymbols(file: string): Promise<Array<DocumentSymbol | SymbolInformation>>;
|
|
486
|
+
/** Graceful shutdown (await server exit so the OS releases handles). */
|
|
487
|
+
shutdown(): Promise<void>;
|
|
488
|
+
/** Synchronous best-effort kill, for a `process.on('exit')` last resort. */
|
|
489
|
+
killSync(): void;
|
|
490
|
+
}
|
|
491
|
+
interface CreateLspClientParams {
|
|
492
|
+
readonly serverId: string;
|
|
493
|
+
readonly root: string;
|
|
494
|
+
readonly launch: LspServerLaunch;
|
|
495
|
+
readonly initializeTimeoutMs?: number;
|
|
496
|
+
readonly debug?: (message: string) => void;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* FEATURE_132 — LSP service: spawns/caches one client per (root, server) and
|
|
501
|
+
* exposes the post-edit diagnostics façade the write-family tools call.
|
|
502
|
+
*
|
|
503
|
+
* State machine mirrors opencode:
|
|
504
|
+
* - `clients` — live clients, keyed `root|serverId`.
|
|
505
|
+
* - `broken` — keys that failed discovery or startup; skipped forever
|
|
506
|
+
* (no retry storm — a one-shot blacklist).
|
|
507
|
+
* - `spawning` — in-flight startups, so concurrent edits never double-spawn.
|
|
508
|
+
*
|
|
509
|
+
* `getDiagnosticsBlock` is deliberately SILENT when no server is installed
|
|
510
|
+
* (returns `""`): nagging an install hint on every edit would be noise.
|
|
511
|
+
* Install guidance is surfaced on explicit, user-initiated surfaces instead
|
|
512
|
+
* (Phase E navigation tools / status), not the diagnostics reflux path.
|
|
513
|
+
*/
|
|
514
|
+
|
|
515
|
+
/** Per-edit hints the service needs to root + cancel work. */
|
|
516
|
+
interface DiagnosticsRequest {
|
|
517
|
+
/** Project root (git root) — bounds the upward root-marker search. */
|
|
518
|
+
readonly gitRoot?: string;
|
|
519
|
+
/** Cancels the work when the host aborts the turn. */
|
|
520
|
+
readonly signal?: AbortSignal;
|
|
521
|
+
/** Live progress line (e.g. "Starting typescript language server…"). */
|
|
522
|
+
readonly onProgress?: (message: string) => void;
|
|
523
|
+
}
|
|
524
|
+
interface LspServiceConfig {
|
|
525
|
+
/** `import.meta.url` used to resolve the bundled TypeScript fallback. */
|
|
526
|
+
readonly moduleUrl?: string;
|
|
527
|
+
/** How long to wait for a fresh diagnostics publish per file. Default 5s. */
|
|
528
|
+
readonly documentTimeoutMs?: number;
|
|
529
|
+
/** Server registry override (tests). Defaults to {@link LSP_SERVERS}. */
|
|
530
|
+
readonly servers?: readonly LspServerInfo[];
|
|
531
|
+
/** Client factory override (tests). Defaults to {@link createLspClient}. */
|
|
532
|
+
readonly createClient?: (params: CreateLspClientParams) => Promise<LspClient>;
|
|
533
|
+
/** Debug sink (off unless wired). */
|
|
534
|
+
readonly debug?: (message: string) => void;
|
|
535
|
+
}
|
|
536
|
+
declare class LspService {
|
|
537
|
+
private readonly config;
|
|
538
|
+
private readonly clients;
|
|
539
|
+
private readonly broken;
|
|
540
|
+
private readonly spawning;
|
|
541
|
+
private readonly servers;
|
|
542
|
+
private shuttingDown;
|
|
543
|
+
constructor(config?: LspServiceConfig);
|
|
544
|
+
/**
|
|
545
|
+
* Touch a just-written file and return an appendable diagnostics block
|
|
546
|
+
* (`"\n\n…"`) when the language server reports errors, or `""` when there
|
|
547
|
+
* are none / no server is available. Never throws.
|
|
548
|
+
*/
|
|
549
|
+
getDiagnosticsBlock(file: string, request?: DiagnosticsRequest): Promise<string>;
|
|
550
|
+
/** Definition site(s) of the symbol at `position` (0-based), as text. */
|
|
551
|
+
getDefinition(file: string, position: Position, request?: DiagnosticsRequest): Promise<string>;
|
|
552
|
+
/** Hover (type/signature/doc) for the symbol at `position` (0-based). */
|
|
553
|
+
getHover(file: string, position: Position, request?: DiagnosticsRequest): Promise<string>;
|
|
554
|
+
/** All references to the symbol at `position` (0-based), as text. */
|
|
555
|
+
getReferences(file: string, position: Position, request?: DiagnosticsRequest): Promise<string>;
|
|
556
|
+
/** The file's symbol outline, as indented text. */
|
|
557
|
+
getDocumentSymbols(file: string, request?: DiagnosticsRequest): Promise<string>;
|
|
558
|
+
/**
|
|
559
|
+
* Resolve the primary client for a navigation request, opening the file so
|
|
560
|
+
* the server has current content. Returns guidance text when no server is
|
|
561
|
+
* installed (navigation is user-initiated, so — unlike diagnostics — it is
|
|
562
|
+
* NOT silent), or an unsupported message for non-LSP file types.
|
|
563
|
+
*/
|
|
564
|
+
private navClient;
|
|
565
|
+
/** Shut down all spawned servers gracefully (call on session teardown). */
|
|
566
|
+
shutdownAll(): Promise<void>;
|
|
567
|
+
/** Synchronous best-effort kill of all servers — for `process.on('exit')`. */
|
|
568
|
+
killAllSync(): void;
|
|
569
|
+
/**
|
|
570
|
+
* Clear the broken blacklist so a server that failed earlier (e.g. installed
|
|
571
|
+
* mid-session, or a transient startup failure) can be retried. Pass a
|
|
572
|
+
* `root|serverId` key to clear one entry, or omit to clear all.
|
|
573
|
+
*/
|
|
574
|
+
resetBroken(key?: string): void;
|
|
575
|
+
private getClient;
|
|
576
|
+
private spawnClient;
|
|
577
|
+
/** Cascade step ②: opt-in auto-install, only when the user enabled it. */
|
|
578
|
+
private acquireIfEnabled;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Process-wide default service used by the write-family tools when the host
|
|
582
|
+
* does not inject one. `KODAX_LSP=0` disables it entirely (returns undefined,
|
|
583
|
+
* so tools no-op). `KODAX_DEBUG_LSP` routes internal logs to stderr.
|
|
584
|
+
*/
|
|
585
|
+
declare function getDefaultLspService(): LspService | undefined;
|
|
586
|
+
/** Gracefully shut down the process-wide default service (host teardown). */
|
|
587
|
+
declare function shutdownDefaultLspService(): Promise<void>;
|
|
588
|
+
|
|
394
589
|
/**
|
|
395
590
|
* FEATURE_192 v0.7.44 Phase B — Goal lifecycle hook composer.
|
|
396
591
|
*
|
|
@@ -630,6 +825,58 @@ interface GoalRuntimeBinding {
|
|
|
630
825
|
*/
|
|
631
826
|
declare function buildGoalRuntimeBinding(deps: GoalRuntimeBindingDeps): GoalRuntimeBinding;
|
|
632
827
|
|
|
828
|
+
/**
|
|
829
|
+
* FEATURE_218 — KodaX Self-Knowledge Manual types.
|
|
830
|
+
*
|
|
831
|
+
* A bundled, version-bound product manual that answers "how do I use /
|
|
832
|
+
* configure / install / troubleshoot KodaX?" questions. Pure data + a
|
|
833
|
+
* deterministic resolver — no RAG, no vector store, no network fetch.
|
|
834
|
+
*/
|
|
835
|
+
type KodaXManualTopicId = 'overview' | 'install' | 'quickstart' | 'providers' | 'custom-providers' | 'config' | 'permissions' | 'commands' | 'tools' | 'agents' | 'skills' | 'mcp' | 'repo-intelligence' | 'sessions' | 'doctor' | 'sdk' | 'troubleshooting';
|
|
836
|
+
/** A pointer to the code/doc the topic is derived from (for traceability). */
|
|
837
|
+
interface KodaXManualSource {
|
|
838
|
+
readonly label: string;
|
|
839
|
+
readonly path: string;
|
|
840
|
+
}
|
|
841
|
+
interface ResolveKodaXManualInput {
|
|
842
|
+
/** Exact topic id or alias. Takes precedence over `query`. */
|
|
843
|
+
readonly topic?: string;
|
|
844
|
+
/** Free-text question; resolved by alias + token overlap. */
|
|
845
|
+
readonly query?: string;
|
|
846
|
+
}
|
|
847
|
+
/**
|
|
848
|
+
* FEATURE_221 — a topic an SDK consumer (e.g. a product built on KodaX)
|
|
849
|
+
* injects via `KodaXOptions.selfManual.topics`. Same shape as a KodaX base
|
|
850
|
+
* topic but `id` is a free string (new id = add; existing base id = override),
|
|
851
|
+
* and aliases/nextTopics/sources are optional to lower the authoring burden.
|
|
852
|
+
* Bodies are still byte-capped by the resolver (no unbounded items).
|
|
853
|
+
*/
|
|
854
|
+
interface KodaXManualTopicInput {
|
|
855
|
+
readonly id: string;
|
|
856
|
+
readonly title: string;
|
|
857
|
+
readonly summary: string;
|
|
858
|
+
readonly body: string;
|
|
859
|
+
readonly aliases?: readonly string[];
|
|
860
|
+
readonly nextTopics?: readonly string[];
|
|
861
|
+
readonly sources?: readonly KodaXManualSource[];
|
|
862
|
+
}
|
|
863
|
+
/** Per-call resolver options — consumer topic injection + product re-branding. */
|
|
864
|
+
interface ResolveKodaXManualOptions {
|
|
865
|
+
/** Injected consumer topics, merged over the KodaX base (override by id). */
|
|
866
|
+
readonly extraTopics?: readonly KodaXManualTopicInput[];
|
|
867
|
+
/** Product name used in the scope anchor (default "KodaX"). */
|
|
868
|
+
readonly productName?: string;
|
|
869
|
+
}
|
|
870
|
+
interface ResolveKodaXManualResult {
|
|
871
|
+
/** A topic id (KodaX base or injected consumer topic), or 'index'. */
|
|
872
|
+
readonly matchedTopic: string;
|
|
873
|
+
readonly title: string;
|
|
874
|
+
/** Assembled, byte-capped content (scope anchor + body, or index list). */
|
|
875
|
+
readonly content: string;
|
|
876
|
+
readonly sources: readonly KodaXManualSource[];
|
|
877
|
+
readonly nextTopics: readonly string[];
|
|
878
|
+
}
|
|
879
|
+
|
|
633
880
|
/**
|
|
634
881
|
* FEATURE_093 (v0.7.24): minimal contract interface for the coding extension
|
|
635
882
|
* runtime. Extracted so `@kodax-ai/coding/src/types.ts` can reference the
|
|
@@ -1695,6 +1942,26 @@ interface KodaXContextOptions {
|
|
|
1695
1942
|
* the lifecycle hooks pass through unmodified.
|
|
1696
1943
|
*/
|
|
1697
1944
|
goalRuntime?: GoalRuntimeBinding;
|
|
1945
|
+
/**
|
|
1946
|
+
* FEATURE_132 (v0.7.47) — native LSP service for edit-time diagnostics
|
|
1947
|
+
* reflux. When omitted, `buildToolExecutionContext` falls back to the
|
|
1948
|
+
* process-wide default (`getDefaultLspService()`), so diagnostics work
|
|
1949
|
+
* out of the box; hosts/tests inject their own to control or disable it.
|
|
1950
|
+
*
|
|
1951
|
+
* See `packages/coding/src/lsp/service.ts`.
|
|
1952
|
+
*/
|
|
1953
|
+
lspService?: LspService;
|
|
1954
|
+
}
|
|
1955
|
+
/**
|
|
1956
|
+
* FEATURE_221 — an SDK consumer (a product built on KodaX, e.g. KodaX-Space)
|
|
1957
|
+
* injects its own product manual so that when ITS users ask "how do I use /
|
|
1958
|
+
* configure <product>?", the kodax_manual tool answers with the consumer's
|
|
1959
|
+
* topics. `topics` extend the KodaX base (override by id); `productName`
|
|
1960
|
+
* re-brands the routing rule + scope anchor. Topics are still byte-capped.
|
|
1961
|
+
*/
|
|
1962
|
+
interface KodaXSelfManualConfig {
|
|
1963
|
+
readonly productName?: string;
|
|
1964
|
+
readonly topics?: readonly KodaXManualTopicInput[];
|
|
1698
1965
|
}
|
|
1699
1966
|
interface KodaXOptions {
|
|
1700
1967
|
provider: string;
|
|
@@ -1708,6 +1975,8 @@ interface KodaXOptions {
|
|
|
1708
1975
|
context?: KodaXContextOptions;
|
|
1709
1976
|
events?: KodaXEvents;
|
|
1710
1977
|
extensionRuntime?: ExtensionRuntimeContract;
|
|
1978
|
+
/** FEATURE_221: SDK-consumer self-manual injection (product name + topics). */
|
|
1979
|
+
selfManual?: KodaXSelfManualConfig;
|
|
1711
1980
|
/**
|
|
1712
1981
|
* FEATURE_092 (v0.7.33): caller-supplied run-scoped guardrails forwarded
|
|
1713
1982
|
* to `Runner.run` via `RunOptions.guardrails`. Merged with the START
|
|
@@ -2001,6 +2270,8 @@ interface KodaXToolExecutionContext {
|
|
|
2001
2270
|
backups: Map<string, string>;
|
|
2002
2271
|
/** Git root directory - Git 根目录 */
|
|
2003
2272
|
gitRoot?: string;
|
|
2273
|
+
/** FEATURE_221: SDK-consumer self-manual injection, forwarded from KodaXOptions. */
|
|
2274
|
+
selfManual?: KodaXSelfManualConfig;
|
|
2004
2275
|
/** Working directory used to resolve relative paths and execute shell commands. */
|
|
2005
2276
|
executionCwd?: string;
|
|
2006
2277
|
/** Shared extension capability runtime used by retrieval-family tools. */
|
|
@@ -2160,6 +2431,13 @@ interface KodaXToolExecutionContext {
|
|
|
2160
2431
|
* See `packages/coding/src/multi-instance/content-hash-cache.ts`.
|
|
2161
2432
|
*/
|
|
2162
2433
|
contentHashCache?: ContentHashCache;
|
|
2434
|
+
/**
|
|
2435
|
+
* FEATURE_132 (v0.7.47) — native LSP service. The write-family tools call
|
|
2436
|
+
* `getDiagnosticsBlock(filePath, …)` after a successful write to reflux any
|
|
2437
|
+
* type errors into the tool result. Forwarded by `buildToolExecutionContext`
|
|
2438
|
+
* from `options.context.lspService` or the process-wide default.
|
|
2439
|
+
*/
|
|
2440
|
+
lspService?: LspService;
|
|
2163
2441
|
/**
|
|
2164
2442
|
* FEATURE_177 v0.7.42 — per-task read-file-state cache (anti-loop).
|
|
2165
2443
|
*
|
|
@@ -2921,5 +3199,5 @@ interface CreateBashPrefixExtractorOptions {
|
|
|
2921
3199
|
*/
|
|
2922
3200
|
declare function createBashPrefixExtractor(opts: CreateBashPrefixExtractorOptions): BashPrefixExtractor;
|
|
2923
3201
|
|
|
2924
|
-
export { BASH_POLICY_SPEC as B, CONSECUTIVE_THRESHOLD as C, ERROR_THRESHOLD as E,
|
|
2925
|
-
export type {
|
|
3202
|
+
export { BASH_POLICY_SPEC as B, CONSECUTIVE_THRESHOLD as C, ERROR_THRESHOLD as E, LSP_SERVERS as aE, LspService as aI, WINDOW_MS as b4, buildGoalRuntimeBinding as b5, collectAllSignals as b6, computeRulesFingerprint as b7, createAutoModeToolGuardrail as b8, createBashPrefixExtractor as b9, createCircuitBreaker as ba, createDenialTracker as bb, extractCommandPrefix as bc, formatAgentsForPrompt as bd, getDefaultLspService as be, getKodaxGlobalDir as bf, loadAgentsFiles as bg, loadAutoRules as bh, makeDisabledGoalToolsContext as bi, parseAutoRules as bj, readTrustState as bk, recordAllow as bl, recordBlock as bm, recordError as bn, shouldFallback$1 as bo, shouldFallback as bp, shutdownDefaultLspService as bq, trustProjectRules as br, withGoalBeforeNextTurn as bs, withGoalStopHook as bt, CUMULATIVE_THRESHOLD as n };
|
|
3203
|
+
export type { KodaXMcpConnectMode as $, AgentsFile as A, DenialTracker as D, FailureStage as F, GoalBlockedResult as G, KodaXBudgetExtensionRequest as H, KodaXChildAgentResult as I, KodaXChildContextBundle as J, KodaXAgentMode as K, KodaXContextOptions as L, KodaXContextTokenSnapshot as M, KodaXEvents as N, KodaXFanoutBranchLifecycle as O, KodaXFanoutBranchRecord as P, KodaXFanoutBranchTransition as Q, KodaXFanoutSchedulerInput as R, KodaXFanoutSchedulerPlan as S, KodaXInputArtifact as T, KodaXManagedBudgetSnapshot as U, KodaXManagedProtocolPayload as V, KodaXManagedTask as W, KodaXManagedTaskRuntimeState as X, KodaXManagedTaskStatusEvent as Y, KodaXManualTopicId as Z, KodaXManualTopicInput as _, AskUserMultiOptions as a, TodoItem as a$, KodaXMcpServerConfig as a0, KodaXMcpServersConfig as a1, KodaXMcpTransport as a2, KodaXMemoryStrategy as a3, KodaXOptions as a4, KodaXOrchestrationVerdict as a5, KodaXParentReductionContract as a6, KodaXProviderPolicyHints as a7, KodaXRepoIntelligenceCapability as a8, KodaXRepoIntelligenceMode as a9, KodaXTaskWorkItem as aA, KodaXToolExecutionContext as aB, KodaXVerificationScorecard as aC, KodaXVerificationScorecardCriterion as aD, LoadAgentsOptions as aF, LoadedRulesSource as aG, LspServerInfo as aH, LspServiceConfig as aJ, ProviderExecutionState as aK, ProviderRecoveryEvent as aL, ProviderResilienceConfig as aM, ProviderResiliencePolicy as aN, RecoveryAction as aO, RecoveryDecision as aP, RecoveryLadderStep as aQ, RecoveryResult as aR, ResilienceClassification as aS, ResilienceErrorClass as aT, ResolveKodaXManualInput as aU, ResolveKodaXManualOptions as aV, ResolveKodaXManualResult as aW, RulesLoadError as aX, RulesLoadResult as aY, SignalCollector as aZ, SkippedRulesSource as a_, KodaXRepoIntelligenceResolvedMode as aa, KodaXRepoIntelligenceTrace as ab, KodaXRepoIntelligenceTraceEvent as ac, KodaXRepoRoutingSignals as ad, KodaXResult as ae, KodaXRoleRoundSummary as af, KodaXRuntimeVerificationContract as ag, KodaXSelfManualConfig as ah, KodaXSessionControl as ai, KodaXSessionMutators as aj, KodaXSessionOptions as ak, KodaXSkillInvocationContext as al, KodaXSkillMap as am, KodaXSkillProjectionConfidence as an, KodaXTaskCapabilityHint as ao, KodaXTaskContract as ap, KodaXTaskEvidenceArtifact as aq, KodaXTaskEvidenceBundle as ar, KodaXTaskEvidenceEntry as as, KodaXTaskRole as at, KodaXTaskRoleAssignment as au, KodaXTaskStatus as av, KodaXTaskSurface as aw, KodaXTaskToolPolicy as ax, KodaXTaskVerificationContract as ay, KodaXTaskVerificationCriterion as az, AskUserQuestionItem as b, TodoList as b0, TodoStatus as b1, ToolCallSignal as b2, TrustState as b3, AskUserQuestionOptions as c, AutoModeAskUser as d, AutoModeAskUserVerdict as e, AutoModeEngine as f, AutoModeGuardrailConfig as g, AutoModeSharedState as h, AutoModeStats as i, AutoModeToolGuardrail as j, AutoRules as k, BashPrefixExtractor as l, BashPrefixResult as m, CircuitBreaker as o, CreateBashPrefixExtractorOptions as p, DiagnosticsRequest as q, ExtensionRuntimeContract as r, ExtractCommandPrefixOptions as s, GoalCompleteResult as t, GoalCreateInput as u, GoalLifecycleContext as v, GoalRuntimeBinding as w, GoalRuntimeBindingDeps as x, GoalToolsContext as y, KodaXBudgetDisclosureZone as z };
|
|
@@ -3,6 +3,15 @@ import { a as CapabilityProvider, C as CapabilityKind, b as CapabilityResult } f
|
|
|
3
3
|
|
|
4
4
|
type McpCapabilityKind = 'tool' | 'resource' | 'prompt';
|
|
5
5
|
type McpCapabilityRisk = 'read' | 'write' | 'network' | 'exec';
|
|
6
|
+
/** Per-tool task-augmentation support (2025-11-25 `execution.taskSupport`). */
|
|
7
|
+
type McpToolTaskSupport = 'forbidden' | 'optional' | 'required';
|
|
8
|
+
/** Icon metadata (2025-11-25) attached to tools / resources / prompts. */
|
|
9
|
+
interface McpIcon {
|
|
10
|
+
src: string;
|
|
11
|
+
mimeType?: string;
|
|
12
|
+
sizes?: string[];
|
|
13
|
+
theme?: 'light' | 'dark';
|
|
14
|
+
}
|
|
6
15
|
interface McpCatalogItem {
|
|
7
16
|
id: string;
|
|
8
17
|
serverId: string;
|
|
@@ -21,6 +30,10 @@ interface McpCapabilityDescriptor extends McpCatalogItem {
|
|
|
21
30
|
promptArgsSchema?: unknown;
|
|
22
31
|
uri?: string;
|
|
23
32
|
mimeType?: string;
|
|
33
|
+
/** Sanitized icon metadata (unsafe-scheme icons dropped). */
|
|
34
|
+
icons?: McpIcon[];
|
|
35
|
+
/** Tool only — `execution.taskSupport`. Absent is treated as 'forbidden'. */
|
|
36
|
+
taskSupport?: McpToolTaskSupport;
|
|
24
37
|
}
|
|
25
38
|
interface McpServerCatalogSnapshot {
|
|
26
39
|
serverId: string;
|
|
@@ -96,6 +109,7 @@ declare class McpServerRuntime {
|
|
|
96
109
|
private doConnect;
|
|
97
110
|
private listDescriptors;
|
|
98
111
|
private request;
|
|
112
|
+
private sendRequest;
|
|
99
113
|
private notify;
|
|
100
114
|
private handleMessage;
|
|
101
115
|
private failPending;
|
|
@@ -180,6 +194,7 @@ interface McpTransport {
|
|
|
180
194
|
open(events: McpTransportEvents): Promise<void>;
|
|
181
195
|
/** Send a JSON string. The transport handles framing. */
|
|
182
196
|
send(json: string): Promise<void>;
|
|
197
|
+
setProtocolVersion?(version: string | undefined): void;
|
|
183
198
|
close(): Promise<void>;
|
|
184
199
|
readonly connected: boolean;
|
|
185
200
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as BashPrefixExtractor,
|
|
1
|
+
import { l as BashPrefixExtractor, a4 as KodaXOptions, M as KodaXContextTokenSnapshot, K as KodaXAgentMode, a9 as KodaXRepoIntelligenceMode, A as AgentsFile, i as AutoModeStats, al as KodaXSkillInvocationContext, a1 as KodaXMcpServersConfig } from './bash-prefix-extractor.d-D6hL0Cuv.js';
|
|
2
2
|
import { a as SessionStorage$1 } from './storage.d-B1Jk6ryM.js';
|
|
3
3
|
import { y as KodaXSessionStorage, n as KodaXSessionData, A as KodaXSessionUiHistoryItem, s as KodaXSessionLineage, k as KodaXSessionArtifactLedgerEntry, w as KodaXSessionRuntimeInfo } from './types.d-B_MIIApc.js';
|
|
4
4
|
import { n as KodaXMessage, E as KodaXReasoningMode, r as KodaXProviderCapabilityProfile, F as KodaXReasoningOverride, h as KodaXCustomProviderConfig } from './types.d-Cf-GCzac.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodax-ai/kodax",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.47",
|
|
4
4
|
"description": "极致轻量化 Coding Agent - TypeScript 实现,支持 12 个 LLM 提供商,可发布为免 Node 单文件二进制",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
"terminal-size": "^4.0.1",
|
|
123
123
|
"tsx": "^4.21.0",
|
|
124
124
|
"typescript": "^5.9.3",
|
|
125
|
+
"vscode-languageserver-protocol": "^3.17.5",
|
|
125
126
|
"widest-line": "^6.0.0",
|
|
126
127
|
"wrap-ansi": "^8.1.0",
|
|
127
128
|
"ws": "^8.18.0",
|