@kodax-ai/kodax 0.7.49 → 0.7.51

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +1800 -1741
  2. package/README.md +1215 -1210
  3. package/README_CN.md +636 -632
  4. package/dist/chunks/agent-EFA7BSE7.js +2 -0
  5. package/dist/chunks/argument-completer-MAJVHSE7.js +2 -0
  6. package/dist/chunks/{chunk-TYZAH3YP.js → chunk-CCZMQE3Q.js} +1 -1
  7. package/dist/chunks/chunk-E3HENKTX.js +420 -0
  8. package/dist/chunks/chunk-FAIGYAEX.js +301 -0
  9. package/dist/chunks/chunk-HMATTIU6.js +574 -0
  10. package/dist/chunks/{chunk-YW4RQV7U.js → chunk-JJTUBNQX.js} +1 -1
  11. package/dist/chunks/chunk-ODVA5VTE.js +492 -0
  12. package/dist/chunks/chunk-PEWH3AAL.js +31 -0
  13. package/dist/chunks/chunk-WQTVG2T5.js +648 -0
  14. package/dist/chunks/{compaction-config-BQBYOWX2.js → compaction-config-UBPCNGC2.js} +1 -1
  15. package/dist/chunks/{construction-bootstrap-5TFGMSWQ.js → construction-bootstrap-WY5MDXRX.js} +1 -1
  16. package/dist/chunks/{dist-BL7IBQHD.js → dist-B73FQEAA.js} +1 -1
  17. package/dist/chunks/dist-BTWS2ENP.js +2 -0
  18. package/dist/chunks/utils-HVOJRR5C.js +2 -0
  19. package/dist/index.d.ts +11 -11
  20. package/dist/index.js +4 -4
  21. package/dist/kodax_cli.js +1091 -984
  22. package/dist/provider-capabilities.json +2 -0
  23. package/dist/sdk-agent.d.ts +25 -11
  24. package/dist/sdk-agent.js +1 -1
  25. package/dist/sdk-coding.d.ts +160 -34
  26. package/dist/sdk-coding.js +1 -1
  27. package/dist/sdk-llm.d.ts +3 -5
  28. package/dist/sdk-llm.js +1 -1
  29. package/dist/sdk-mcp.js +1 -1
  30. package/dist/sdk-repl.d.ts +38 -727
  31. package/dist/sdk-repl.js +2 -2
  32. package/dist/sdk-session.d.ts +8 -200
  33. package/dist/sdk-session.js +1 -1
  34. package/dist/sdk-skills.js +1 -1
  35. package/dist/types-chunks/{types.d-rPRl2LSB.d.ts → base.d-GZ6jvICS.d.ts} +270 -3
  36. package/dist/types-chunks/{bash-prefix-extractor.d-CI_xcPhn.d.ts → bash-prefix-extractor.d-DTOiDMlG.d.ts} +84 -537
  37. package/dist/types-chunks/{capsule.d-DaPuhyyK.d.ts → capsule.d-CXGdLGAn.d.ts} +6 -3
  38. package/dist/types-chunks/guardrail.d-D47yu9AO.d.ts +518 -0
  39. package/dist/types-chunks/{types.d-BR9oNWup.d.ts → process.d-B8kEBnQD.d.ts} +487 -275
  40. package/dist/types-chunks/{resolver.d-B_wm409c.d.ts → resolver.d-D75XFRH2.d.ts} +23 -6
  41. package/dist/types-chunks/sdk-session-BKQJN9oH.d.ts +977 -0
  42. package/dist/types-chunks/{storage.d-J2GqOgaX.d.ts → storage.d-BN1xIn8R.d.ts} +78 -3
  43. package/dist/types-chunks/types.d-DQ_hdN70.d.ts +273 -0
  44. package/dist/types-chunks/{utils.d-BJ_-y8gC.d.ts → utils.d-ZfRDo-kX.d.ts} +8 -80
  45. package/package.json +2 -2
  46. package/dist/chunks/argument-completer-GDG5OHN7.js +0 -2
  47. package/dist/chunks/chunk-67SWUEEN.js +0 -1035
  48. package/dist/chunks/chunk-C5PKZX5Z.js +0 -291
  49. package/dist/chunks/chunk-ISGHUKRY.js +0 -428
  50. package/dist/chunks/chunk-JTHMWRXM.js +0 -566
  51. package/dist/chunks/chunk-YACQ4OST.js +0 -31
  52. package/dist/chunks/dist-D7HOETCE.js +0 -2
  53. package/dist/chunks/utils-XWDT3W5X.js +0 -2
  54. package/dist/types-chunks/base.d-C4jYVjJh.d.ts +0 -270
  55. package/dist/types-chunks/types.d-BnjX2Gn4.d.ts +0 -297
@@ -1,6 +1,5 @@
1
- import { E as KodaXReasoningMode, V as KodaXThinkingBudgetMap, W as KodaXThinkingDepth, s as KodaXProviderConfig, D as KodaXReasoningCapability, G as KodaXReasoningRequest, R as KodaXTaskType, F as KodaXReasoningOverride, a2 as KodaXVerifyCredentialResult, Y as KodaXToolDefinition, n as KodaXMessage, A as KodaXProviderStreamOptions, L as KodaXStreamResult, o as KodaXModelDescriptor, r as KodaXProviderCapabilityProfile, a3 as KodaXVerifyStrategy, h as KodaXCustomProviderConfig, m as KodaXListModelsResult } from './types.d-rPRl2LSB.js';
1
+ import { G as KodaXReasoningMode, Y as KodaXThinkingBudgetMap, Z as KodaXThinkingDepth, u as KodaXProviderConfig, F as KodaXReasoningCapability, I as KodaXReasoningRequest, U as KodaXTaskType, H as KodaXReasoningOverride, f as KodaXBaseProvider, a5 as KodaXVerifyCredentialResult, $ as KodaXToolDefinition, o as KodaXMessage, C as KodaXProviderStreamOptions, O as KodaXStreamResult, p as KodaXModelDescriptor, t as KodaXProviderCapabilityProfile, a6 as KodaXVerifyStrategy, i as KodaXCustomProviderConfig, n as KodaXListModelsResult } from './base.d-GZ6jvICS.js';
2
2
  import Anthropic from '@anthropic-ai/sdk';
3
- import { K as KodaXBaseProvider } from './base.d-C4jYVjJh.js';
4
3
  import OpenAI from 'openai';
5
4
 
6
5
  /**
@@ -61,8 +60,17 @@ declare abstract class KodaXAnthropicCompatProvider extends KodaXBaseProvider {
61
60
  abstract readonly name: string;
62
61
  readonly supportsThinking = true;
63
62
  protected abstract readonly config: KodaXProviderConfig;
64
- protected client: Anthropic;
65
- protected initClient(): void;
63
+ private _client?;
64
+ /**
65
+ * The SDK client is built lazily on first use. Constructing it requires the
66
+ * API key (`getApiKey()` throws when the env var is unset), so deferring it
67
+ * lets callers construct a provider and read static metadata (context
68
+ * window, model descriptors) without a key. This also keeps key-less unit
69
+ * tests (which mock the actual LLM calls) from failing at construction time.
70
+ */
71
+ protected get client(): Anthropic;
72
+ protected set client(client: Anthropic);
73
+ protected buildClient(): Anthropic;
66
74
  protected onStaleConnection(): void;
67
75
  /**
68
76
  * FEATURE_216 v0.7.45 — Lightweight credential verification.
@@ -122,8 +130,17 @@ declare abstract class KodaXOpenAICompatProvider extends KodaXBaseProvider {
122
130
  abstract readonly name: string;
123
131
  readonly supportsThinking = true;
124
132
  protected abstract readonly config: KodaXProviderConfig;
125
- protected client: OpenAI;
126
- protected initClient(): void;
133
+ private _client?;
134
+ /**
135
+ * The SDK client is built lazily on first use. Constructing it requires the
136
+ * API key (`getApiKey()` throws when the env var is unset), so deferring it
137
+ * lets callers construct a provider and read static metadata (context
138
+ * window, model descriptors) without a key. This also keeps key-less unit
139
+ * tests (which mock the actual LLM calls) from failing at construction time.
140
+ */
141
+ protected get client(): OpenAI;
142
+ protected set client(client: OpenAI);
143
+ protected buildClient(): OpenAI;
127
144
  protected onStaleConnection(): void;
128
145
  /**
129
146
  * FEATURE_216 v0.7.45 — Lightweight credential verification.