@cleocode/contracts 2026.6.13 → 2026.6.14

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 (128) hide show
  1. package/dist/__tests__/operation-def.test.js +4 -1
  2. package/dist/__tests__/operation-def.test.js.map +1 -1
  3. package/dist/__tests__/provider-def.test.d.ts +12 -0
  4. package/dist/__tests__/provider-def.test.d.ts.map +1 -0
  5. package/dist/__tests__/provider-def.test.js +84 -0
  6. package/dist/__tests__/provider-def.test.js.map +1 -0
  7. package/dist/__tests__/service-provider.test.d.ts +17 -0
  8. package/dist/__tests__/service-provider.test.d.ts.map +1 -0
  9. package/dist/__tests__/service-provider.test.js +108 -0
  10. package/dist/__tests__/service-provider.test.js.map +1 -0
  11. package/dist/boundary.d.ts +52 -0
  12. package/dist/boundary.d.ts.map +1 -1
  13. package/dist/boundary.js +23 -0
  14. package/dist/boundary.js.map +1 -1
  15. package/dist/conduit.d.ts +171 -0
  16. package/dist/conduit.d.ts.map +1 -1
  17. package/dist/config/index.d.ts +23 -0
  18. package/dist/config/index.d.ts.map +1 -0
  19. package/dist/config/index.js +22 -0
  20. package/dist/config/index.js.map +1 -0
  21. package/dist/config.d.ts +2 -1
  22. package/dist/config.d.ts.map +1 -1
  23. package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.d.ts +21 -0
  24. package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.d.ts.map +1 -0
  25. package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.js +84 -0
  26. package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.js.map +1 -0
  27. package/dist/dispatch/identity.d.ts +1 -1
  28. package/dist/dispatch/identity.d.ts.map +1 -1
  29. package/dist/dispatch/identity.js +20 -0
  30. package/dist/dispatch/identity.js.map +1 -1
  31. package/dist/dispatch/operation-def.d.ts +20 -0
  32. package/dist/dispatch/operation-def.d.ts.map +1 -1
  33. package/dist/dispatch/operations-registry.d.ts.map +1 -1
  34. package/dist/dispatch/operations-registry.js +1030 -46
  35. package/dist/dispatch/operations-registry.js.map +1 -1
  36. package/dist/index.d.ts +15 -6
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +15 -2
  39. package/dist/index.js.map +1 -1
  40. package/dist/lease-ipc/__tests__/freeze.test.js +92 -0
  41. package/dist/lease-ipc/__tests__/freeze.test.js.map +1 -1
  42. package/dist/lease-ipc/index.d.ts +2 -2
  43. package/dist/lease-ipc/index.d.ts.map +1 -1
  44. package/dist/lease-ipc/index.js +1 -1
  45. package/dist/lease-ipc/index.js.map +1 -1
  46. package/dist/lease-ipc/messages.d.ts +167 -3
  47. package/dist/lease-ipc/messages.d.ts.map +1 -1
  48. package/dist/lease-ipc/messages.js +93 -0
  49. package/dist/lease-ipc/messages.js.map +1 -1
  50. package/dist/llm/catalog-schema.d.ts +242 -0
  51. package/dist/llm/catalog-schema.d.ts.map +1 -0
  52. package/dist/llm/catalog-schema.js +153 -0
  53. package/dist/llm/catalog-schema.js.map +1 -0
  54. package/dist/llm/catalog-schema.json +139 -0
  55. package/dist/llm/index.d.ts +15 -0
  56. package/dist/llm/index.d.ts.map +1 -0
  57. package/dist/llm/index.js +14 -0
  58. package/dist/llm/index.js.map +1 -0
  59. package/dist/llm/oauth.d.ts +16 -2
  60. package/dist/llm/oauth.d.ts.map +1 -1
  61. package/dist/llm/onboarding.d.ts +126 -0
  62. package/dist/llm/onboarding.d.ts.map +1 -0
  63. package/dist/llm/onboarding.js +34 -0
  64. package/dist/llm/onboarding.js.map +1 -0
  65. package/dist/llm/provider-def.d.ts +254 -0
  66. package/dist/llm/provider-def.d.ts.map +1 -0
  67. package/dist/llm/provider-def.js +93 -0
  68. package/dist/llm/provider-def.js.map +1 -0
  69. package/dist/llm/system-resolver.d.ts +42 -0
  70. package/dist/llm/system-resolver.d.ts.map +1 -1
  71. package/dist/operations/admin.d.ts +124 -1
  72. package/dist/operations/admin.d.ts.map +1 -1
  73. package/dist/operations/entities.d.ts +110 -0
  74. package/dist/operations/entities.d.ts.map +1 -0
  75. package/dist/operations/entities.js +695 -0
  76. package/dist/operations/entities.js.map +1 -0
  77. package/dist/operations/llm.d.ts +15 -0
  78. package/dist/operations/llm.d.ts.map +1 -1
  79. package/dist/operations/output-contracts-data.d.ts.map +1 -1
  80. package/dist/operations/output-contracts-data.js +230 -0
  81. package/dist/operations/output-contracts-data.js.map +1 -1
  82. package/dist/operations/service.d.ts +68 -0
  83. package/dist/operations/service.d.ts.map +1 -0
  84. package/dist/operations/service.js +336 -0
  85. package/dist/operations/service.js.map +1 -0
  86. package/dist/operations/tasks.d.ts +109 -0
  87. package/dist/operations/tasks.d.ts.map +1 -1
  88. package/dist/operations/tasks.js.map +1 -1
  89. package/dist/playbook.d.ts +56 -0
  90. package/dist/playbook.d.ts.map +1 -1
  91. package/dist/release/plan.d.ts +5 -5
  92. package/dist/vault/service-provider.d.ts +343 -0
  93. package/dist/vault/service-provider.d.ts.map +1 -0
  94. package/dist/vault/service-provider.js +857 -0
  95. package/dist/vault/service-provider.js.map +1 -0
  96. package/dist/workgraph.d.ts +12 -12
  97. package/package.json +10 -2
  98. package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
  99. package/src/__tests__/operation-def.test.ts +6 -1
  100. package/src/__tests__/provider-def.test.ts +93 -0
  101. package/src/__tests__/service-provider.test.ts +129 -0
  102. package/src/boundary.ts +69 -0
  103. package/src/conduit.ts +200 -0
  104. package/src/config/index.ts +35 -0
  105. package/src/config.ts +2 -1
  106. package/src/dispatch/__tests__/tasks-gateway-crud-ops.test.ts +99 -0
  107. package/src/dispatch/identity.ts +20 -0
  108. package/src/dispatch/operation-def.ts +21 -0
  109. package/src/dispatch/operations-registry.ts +1062 -36
  110. package/src/index.ts +137 -1
  111. package/src/lease-ipc/__tests__/freeze.test.ts +96 -0
  112. package/src/lease-ipc/index.ts +12 -0
  113. package/src/lease-ipc/messages.ts +117 -0
  114. package/src/llm/catalog-schema.json +139 -0
  115. package/src/llm/catalog-schema.ts +184 -0
  116. package/src/llm/index.ts +29 -0
  117. package/src/llm/oauth.ts +16 -2
  118. package/src/llm/onboarding.ts +131 -0
  119. package/src/llm/provider-def.ts +291 -0
  120. package/src/llm/system-resolver.ts +45 -0
  121. package/src/operations/admin.ts +144 -0
  122. package/src/operations/entities.ts +758 -0
  123. package/src/operations/llm.ts +15 -0
  124. package/src/operations/output-contracts-data.ts +264 -0
  125. package/src/operations/service.ts +360 -0
  126. package/src/operations/tasks.ts +119 -0
  127. package/src/playbook.ts +56 -0
  128. package/src/vault/service-provider.ts +1137 -0
@@ -0,0 +1,254 @@
1
+ /**
2
+ * Declarative `ProviderDef` contract — the DATA shape of one LLM provider.
3
+ *
4
+ * M3 Provider SSoT (epic T11667 · task T11702). `ProviderDef` is the DECLARATIVE,
5
+ * serializable description of a provider: its identity, aliases, auth methods, wire
6
+ * endpoint (a discriminated union keyed on the `transport` literal), models.dev
7
+ * catalog key, default headers, optional OAuth flow, and a single request-quirk hook
8
+ * signature. It is the contract the `providers` global-DB table (T11703) persists and
9
+ * the alias resolver (T11704) reads.
10
+ *
11
+ * ## ProviderDef vs {@link ProviderProfile} — declarative DATA vs runtime BEHAVIOUR
12
+ *
13
+ * The pre-existing {@link ProviderProfile} (T9262 · T11756) is the RUNTIME provider
14
+ * shape carried in the in-process registry: it bundles live hook FUNCTIONS
15
+ * (`prepareMessages`, `buildExtraBody`, `buildApiKwargsExtras`, `fetchModels`) that
16
+ * cannot be serialized into a DB row. `ProviderDef` is the DECLARATIVE projection of
17
+ * the same provider — only serializable DATA — so it can be a `providers` table row,
18
+ * shipped as a seed, diffed, and resolved without importing provider-specific code.
19
+ * The builtin `ProviderProfile` set is the SEED SOURCE for the builtin `ProviderDef`
20
+ * set (the core mapper derives one from the other); the non-serializable hooks stay
21
+ * on `ProviderProfile`, reduced here to the single declarative {@link RequestQuirk}
22
+ * descriptor that records WHICH quirk a provider needs without embedding a closure.
23
+ *
24
+ * ## Endpoint is a discriminated union (AC5)
25
+ *
26
+ * {@link ProviderEndpoint} is a closed discriminated union keyed on the literal
27
+ * `transport` field — one variant per wire protocol CLEO knows how to speak. No
28
+ * `any`/`unknown` shortcut: every variant carries its own typed fields. This is the
29
+ * declarative analog of {@link ApiMode}; the core transport adapter table (T11767)
30
+ * maps a `transport` value to its `Transport` constructor.
31
+ *
32
+ * ## Contracts purity (Gate 10)
33
+ *
34
+ * This module is TYPES ONLY — interfaces, type aliases, and `as const` literal arrays.
35
+ * It exports NO bodied runtime helper. The builtin-set construction and the seed/upsert
36
+ * logic live in `@cleocode/core` (T11703 · T11704), never here.
37
+ *
38
+ * @module llm/provider-def
39
+ * @task T11702
40
+ * @epic T11667
41
+ * @see ./provider-profile.ts — the RUNTIME provider shape (hooks) this projects from
42
+ * @see ./provider-id.ts — {@link ApiMode} / {@link BuiltinProviderId} the transport mirrors
43
+ * @see ./oauth.ts — {@link ProviderOAuthConfig} the OAuth flow placeholder reuses
44
+ * @see ../../../core/src/store/schema/cleo-global/providers.ts — the persisted table (T11703)
45
+ */
46
+ import type { StoredAuthTypeWire } from '../operations/llm.js';
47
+ import type { ProviderOAuthConfig } from './oauth.js';
48
+ import type { ProviderId } from './provider-id.js';
49
+ /**
50
+ * Wire-transport discriminant for a {@link ProviderEndpoint} variant.
51
+ *
52
+ * Closed union — one literal per protocol CLEO has a transport for. The
53
+ * declarative analog of {@link import('./provider-id.js').ApiMode}:
54
+ *
55
+ * - `openai-completions` — OpenAI `/chat/completions` shape (OpenAI, OpenRouter,
56
+ * Moonshot, Kimi, xAI, Gemini-via-OpenAI-compat) — `ApiMode 'chat_completions'`.
57
+ * - `openai-responses` — OpenAI Responses API (Codex backend, xAI-responses) —
58
+ * `ApiMode 'codex_responses'`.
59
+ * - `anthropic-messages` — native Anthropic Messages API (prompt-cache + thinking) —
60
+ * `ApiMode 'anthropic_messages'`.
61
+ * - `aisdk` — routed through the Vercel AI-SDK provider factory (the data-driven
62
+ * `apiMode → provider` adapter, T11767) rather than a bespoke CLEO transport.
63
+ *
64
+ * @task T11702
65
+ */
66
+ export declare const PROVIDER_TRANSPORTS: readonly ["openai-completions", "openai-responses", "anthropic-messages", "aisdk"];
67
+ /** TypeScript union derived from {@link PROVIDER_TRANSPORTS}. */
68
+ export type ProviderTransport = (typeof PROVIDER_TRANSPORTS)[number];
69
+ /**
70
+ * Endpoint for the `openai-completions` transport — the OpenAI
71
+ * `/chat/completions` wire shape (OpenAI, OpenRouter, Moonshot, Kimi, xAI,
72
+ * Gemini-via-compat). `baseUrl` has NO trailing slash.
73
+ *
74
+ * @task T11702
75
+ */
76
+ export interface OpenAICompletionsEndpoint {
77
+ /** Discriminant — the OpenAI chat-completions wire protocol. */
78
+ readonly transport: 'openai-completions';
79
+ /** Base URL for the provider's API — no trailing slash. */
80
+ readonly baseUrl: string;
81
+ }
82
+ /**
83
+ * Endpoint for the `openai-responses` transport — the OpenAI Responses API
84
+ * (Codex backend, xAI-responses). `baseUrl` has NO trailing slash.
85
+ *
86
+ * @task T11702
87
+ */
88
+ export interface OpenAIResponsesEndpoint {
89
+ /** Discriminant — the OpenAI Responses wire protocol. */
90
+ readonly transport: 'openai-responses';
91
+ /** Base URL for the Responses endpoint — no trailing slash. */
92
+ readonly baseUrl: string;
93
+ }
94
+ /**
95
+ * Endpoint for the `anthropic-messages` transport — the native Anthropic
96
+ * Messages API (full prompt-cache + extended thinking). `baseUrl` has NO
97
+ * trailing slash.
98
+ *
99
+ * @task T11702
100
+ */
101
+ export interface AnthropicMessagesEndpoint {
102
+ /** Discriminant — the native Anthropic Messages wire protocol. */
103
+ readonly transport: 'anthropic-messages';
104
+ /** Base URL for the Anthropic API — no trailing slash. */
105
+ readonly baseUrl: string;
106
+ }
107
+ /**
108
+ * Endpoint for the `aisdk` transport — the provider is reached through the
109
+ * Vercel AI-SDK provider factory (the data-driven adapter table, T11767) keyed
110
+ * by `aiSdkProvider`, rather than a bespoke CLEO transport.
111
+ *
112
+ * @task T11702
113
+ */
114
+ export interface AiSdkEndpoint {
115
+ /** Discriminant — routed through the AI-SDK provider factory. */
116
+ readonly transport: 'aisdk';
117
+ /** Base URL passed to the AI-SDK provider factory — no trailing slash. */
118
+ readonly baseUrl: string;
119
+ /**
120
+ * The AI-SDK provider-factory key (e.g. `openai-compatible` | `google` |
121
+ * `bedrock`) the adapter table maps to a `create*` factory. NEVER an inline
122
+ * client construction — the factory call is the LLM chokepoint (T11783).
123
+ */
124
+ readonly aiSdkProvider: string;
125
+ }
126
+ /**
127
+ * A provider's wire endpoint — a discriminated union keyed on the `transport`
128
+ * literal (AC5). Exactly one variant per {@link ProviderTransport}; each carries
129
+ * its own typed fields, with no `any`/`unknown` shortcut.
130
+ *
131
+ * @task T11702
132
+ */
133
+ export type ProviderEndpoint = OpenAICompletionsEndpoint | OpenAIResponsesEndpoint | AnthropicMessagesEndpoint | AiSdkEndpoint;
134
+ /**
135
+ * Known request-quirk kinds — the DECLARATIVE record of WHICH provider-specific
136
+ * request adjustment a provider needs, WITHOUT embedding the closure.
137
+ *
138
+ * The live closures stay on {@link ProviderProfile} (`buildExtraBody` /
139
+ * `buildApiKwargsExtras` / `prepareMessages`); a `ProviderDef` row records only
140
+ * the quirk's stable kind so the table/seed stays serializable. The runtime maps
141
+ * a {@link RequestQuirk} `kind` back to its hook implementation.
142
+ *
143
+ * - `grok-conv-id` — inject the process-scoped `x-grok-conv-id` header (xAI).
144
+ * - `gemini-thinking-config` — inject `thinking_config` in `extra_body` (Gemini).
145
+ * - `kimi-reasoning-effort` — top-level `reasoning_effort` kwarg (Kimi Code).
146
+ * - `moonshot-schema-sanitize` — shallow tool-schema sanitization (Moonshot).
147
+ * - `openrouter-pareto` — inject the Pareto price-router plugin (OpenRouter).
148
+ *
149
+ * @task T11702
150
+ */
151
+ export declare const REQUEST_QUIRK_KINDS: readonly ["grok-conv-id", "gemini-thinking-config", "kimi-reasoning-effort", "moonshot-schema-sanitize", "openrouter-pareto"];
152
+ /** TypeScript union derived from {@link REQUEST_QUIRK_KINDS}. */
153
+ export type RequestQuirkKind = (typeof REQUEST_QUIRK_KINDS)[number];
154
+ /**
155
+ * A single declarative request-quirk descriptor (AC4 — the "request-quirk hook
156
+ * signature"). Records the quirk's stable {@link RequestQuirkKind} so a
157
+ * `ProviderDef` row stays serializable; the runtime resolves the `kind` to its
158
+ * hook implementation on {@link ProviderProfile}. The signature the hook MUST
159
+ * satisfy is `(model: string) => Record<string, unknown>` (the declarative shape
160
+ * of `buildExtraBody` / `buildApiKwargsExtras`), captured here only as the
161
+ * documented contract — never as an embedded closure.
162
+ *
163
+ * @task T11702
164
+ */
165
+ export interface RequestQuirk {
166
+ /** The stable quirk kind this provider needs. */
167
+ readonly kind: RequestQuirkKind;
168
+ }
169
+ /**
170
+ * OAuth flow placeholder embedded on a {@link ProviderDef} (AC4).
171
+ *
172
+ * For M3 this is the existing {@link ProviderOAuthConfig} shape (PKCE / device-code
173
+ * endpoints + client id), aliased so the M4 vault work (T10409) can widen it without
174
+ * a contract rename. A `ProviderDef` carries `oauth` only when the provider supports
175
+ * an OAuth login flow (anthropic, openai, kimi-code); it is omitted otherwise.
176
+ *
177
+ * @task T11702
178
+ */
179
+ export type OAuthFlowDef = ProviderOAuthConfig;
180
+ /**
181
+ * Declarative description of one LLM provider — the serializable DATA SSoT.
182
+ *
183
+ * The contract persisted as a `providers` table row (T11703) and read by the alias
184
+ * resolver (T11704). Derived from the runtime {@link ProviderProfile} set: identity
185
+ * + aliases + auth + endpoint + catalog key + headers + optional OAuth + the
186
+ * declarative request quirks. Carries NO closures — only serializable DATA.
187
+ *
188
+ * @task T11702
189
+ */
190
+ export interface ProviderDef {
191
+ /**
192
+ * Canonical provider id (lower-cased). For builtins this is a
193
+ * {@link BuiltinProviderId}; plugin providers may use any non-empty string.
194
+ */
195
+ readonly id: ProviderId;
196
+ /** Human-readable display name shown in pickers and diagnostic output. */
197
+ readonly displayName: string;
198
+ /**
199
+ * Alternate names that resolve to this provider (case-insensitive). The SINGLE
200
+ * source the alias resolver (T11704) reads — `codex`/`chatgpt` → `openai`,
201
+ * `claude` → `anthropic`, `google` → `gemini`, … An alias colliding with another
202
+ * provider's primary `id` is a resolution error (T11704 AC2).
203
+ */
204
+ readonly aliases: ReadonlyArray<string>;
205
+ /**
206
+ * Authentication mechanisms this provider supports (`api_key` | `oauth` |
207
+ * `aws_sdk`). The {@link StoredAuthTypeWire} wire enum.
208
+ */
209
+ readonly authMethods: ReadonlyArray<StoredAuthTypeWire>;
210
+ /**
211
+ * The provider's wire endpoint — a discriminated union keyed on `transport`
212
+ * (AC5). A provider that speaks multiple protocols (e.g. xAI completions +
213
+ * responses) carries the multiple variants in {@link altEndpoints}.
214
+ */
215
+ readonly endpoint: ProviderEndpoint;
216
+ /**
217
+ * Additional wire endpoints this provider also speaks, beyond the primary
218
+ * {@link endpoint}. Collapses the prior per-ApiMode profile duplication into ONE
219
+ * row (T11703 AC4 — xAI's completions + responses become one `ProviderDef`).
220
+ * Empty/omitted for single-protocol providers.
221
+ */
222
+ readonly altEndpoints?: ReadonlyArray<ProviderEndpoint>;
223
+ /**
224
+ * The models.dev catalog provider key joining this provider to the
225
+ * `models_catalog` table (T11733). Usually equals {@link id}; carried distinctly
226
+ * because a provider id and its catalog key can differ (e.g. `kimi-code` →
227
+ * `moonshot`).
228
+ */
229
+ readonly modelsDevId: string;
230
+ /**
231
+ * HTTP headers sent with every request to this provider, merged into the
232
+ * client's `defaultHeaders` (e.g. `{ 'anthropic-version': '2023-06-01' }`).
233
+ * Omitted when the provider needs no pinned headers.
234
+ */
235
+ readonly defaultHeaders?: Readonly<Record<string, string>>;
236
+ /**
237
+ * Environment variable names that may supply this provider's API key (e.g.
238
+ * `['ANTHROPIC_API_KEY']`). Resolver chains may check these before the vault.
239
+ * Omitted when the provider has no env-var credential path.
240
+ */
241
+ readonly envVars?: ReadonlyArray<string>;
242
+ /**
243
+ * OAuth flow placeholder (AC4) — present only when the provider supports an
244
+ * OAuth login flow (anthropic, openai, kimi-code). See {@link OAuthFlowDef}.
245
+ */
246
+ readonly oauth?: OAuthFlowDef;
247
+ /**
248
+ * Declarative request quirks this provider needs (AC4) — the stable
249
+ * {@link RequestQuirk} descriptors WITHOUT the closures (those stay on
250
+ * {@link ProviderProfile}). Empty/omitted when the provider needs no quirk.
251
+ */
252
+ readonly requestQuirks?: ReadonlyArray<RequestQuirk>;
253
+ }
254
+ //# sourceMappingURL=provider-def.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-def.d.ts","sourceRoot":"","sources":["../../src/llm/provider-def.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Declarative `ProviderDef` contract — the DATA shape of one LLM provider.
3
+ *
4
+ * M3 Provider SSoT (epic T11667 · task T11702). `ProviderDef` is the DECLARATIVE,
5
+ * serializable description of a provider: its identity, aliases, auth methods, wire
6
+ * endpoint (a discriminated union keyed on the `transport` literal), models.dev
7
+ * catalog key, default headers, optional OAuth flow, and a single request-quirk hook
8
+ * signature. It is the contract the `providers` global-DB table (T11703) persists and
9
+ * the alias resolver (T11704) reads.
10
+ *
11
+ * ## ProviderDef vs {@link ProviderProfile} — declarative DATA vs runtime BEHAVIOUR
12
+ *
13
+ * The pre-existing {@link ProviderProfile} (T9262 · T11756) is the RUNTIME provider
14
+ * shape carried in the in-process registry: it bundles live hook FUNCTIONS
15
+ * (`prepareMessages`, `buildExtraBody`, `buildApiKwargsExtras`, `fetchModels`) that
16
+ * cannot be serialized into a DB row. `ProviderDef` is the DECLARATIVE projection of
17
+ * the same provider — only serializable DATA — so it can be a `providers` table row,
18
+ * shipped as a seed, diffed, and resolved without importing provider-specific code.
19
+ * The builtin `ProviderProfile` set is the SEED SOURCE for the builtin `ProviderDef`
20
+ * set (the core mapper derives one from the other); the non-serializable hooks stay
21
+ * on `ProviderProfile`, reduced here to the single declarative {@link RequestQuirk}
22
+ * descriptor that records WHICH quirk a provider needs without embedding a closure.
23
+ *
24
+ * ## Endpoint is a discriminated union (AC5)
25
+ *
26
+ * {@link ProviderEndpoint} is a closed discriminated union keyed on the literal
27
+ * `transport` field — one variant per wire protocol CLEO knows how to speak. No
28
+ * `any`/`unknown` shortcut: every variant carries its own typed fields. This is the
29
+ * declarative analog of {@link ApiMode}; the core transport adapter table (T11767)
30
+ * maps a `transport` value to its `Transport` constructor.
31
+ *
32
+ * ## Contracts purity (Gate 10)
33
+ *
34
+ * This module is TYPES ONLY — interfaces, type aliases, and `as const` literal arrays.
35
+ * It exports NO bodied runtime helper. The builtin-set construction and the seed/upsert
36
+ * logic live in `@cleocode/core` (T11703 · T11704), never here.
37
+ *
38
+ * @module llm/provider-def
39
+ * @task T11702
40
+ * @epic T11667
41
+ * @see ./provider-profile.ts — the RUNTIME provider shape (hooks) this projects from
42
+ * @see ./provider-id.ts — {@link ApiMode} / {@link BuiltinProviderId} the transport mirrors
43
+ * @see ./oauth.ts — {@link ProviderOAuthConfig} the OAuth flow placeholder reuses
44
+ * @see ../../../core/src/store/schema/cleo-global/providers.ts — the persisted table (T11703)
45
+ */
46
+ /**
47
+ * Wire-transport discriminant for a {@link ProviderEndpoint} variant.
48
+ *
49
+ * Closed union — one literal per protocol CLEO has a transport for. The
50
+ * declarative analog of {@link import('./provider-id.js').ApiMode}:
51
+ *
52
+ * - `openai-completions` — OpenAI `/chat/completions` shape (OpenAI, OpenRouter,
53
+ * Moonshot, Kimi, xAI, Gemini-via-OpenAI-compat) — `ApiMode 'chat_completions'`.
54
+ * - `openai-responses` — OpenAI Responses API (Codex backend, xAI-responses) —
55
+ * `ApiMode 'codex_responses'`.
56
+ * - `anthropic-messages` — native Anthropic Messages API (prompt-cache + thinking) —
57
+ * `ApiMode 'anthropic_messages'`.
58
+ * - `aisdk` — routed through the Vercel AI-SDK provider factory (the data-driven
59
+ * `apiMode → provider` adapter, T11767) rather than a bespoke CLEO transport.
60
+ *
61
+ * @task T11702
62
+ */
63
+ export const PROVIDER_TRANSPORTS = [
64
+ 'openai-completions',
65
+ 'openai-responses',
66
+ 'anthropic-messages',
67
+ 'aisdk',
68
+ ];
69
+ /**
70
+ * Known request-quirk kinds — the DECLARATIVE record of WHICH provider-specific
71
+ * request adjustment a provider needs, WITHOUT embedding the closure.
72
+ *
73
+ * The live closures stay on {@link ProviderProfile} (`buildExtraBody` /
74
+ * `buildApiKwargsExtras` / `prepareMessages`); a `ProviderDef` row records only
75
+ * the quirk's stable kind so the table/seed stays serializable. The runtime maps
76
+ * a {@link RequestQuirk} `kind` back to its hook implementation.
77
+ *
78
+ * - `grok-conv-id` — inject the process-scoped `x-grok-conv-id` header (xAI).
79
+ * - `gemini-thinking-config` — inject `thinking_config` in `extra_body` (Gemini).
80
+ * - `kimi-reasoning-effort` — top-level `reasoning_effort` kwarg (Kimi Code).
81
+ * - `moonshot-schema-sanitize` — shallow tool-schema sanitization (Moonshot).
82
+ * - `openrouter-pareto` — inject the Pareto price-router plugin (OpenRouter).
83
+ *
84
+ * @task T11702
85
+ */
86
+ export const REQUEST_QUIRK_KINDS = [
87
+ 'grok-conv-id',
88
+ 'gemini-thinking-config',
89
+ 'kimi-reasoning-effort',
90
+ 'moonshot-schema-sanitize',
91
+ 'openrouter-pareto',
92
+ ];
93
+ //# sourceMappingURL=provider-def.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-def.js","sourceRoot":"","sources":["../../src/llm/provider-def.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAMH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,oBAAoB;IACpB,kBAAkB;IAClB,oBAAoB;IACpB,OAAO;CACC,CAAC;AA+EX;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,cAAc;IACd,wBAAwB;IACxB,uBAAuB;IACvB,0BAA0B;IAC1B,mBAAmB;CACX,CAAC"}
@@ -110,5 +110,47 @@ export interface ResolveLLMForSystemOptions {
110
110
  * @internal
111
111
  */
112
112
  skipCatalogDefault?: boolean;
113
+ /**
114
+ * Raw prompt used to derive a role from complexity when neither an explicit
115
+ * tier/role nor a role-mapped system label is available (L1 proposer · T11906).
116
+ *
117
+ * When the `system` argument is the flat `'default'` label (which maps to NO
118
+ * role) and `roleOverride` is unset, the resolver runs the L1 complexity
119
+ * classifier over this prompt and proposes a {@link RoleName} from the
120
+ * resulting tier (`low → hygiene`, `mid → consolidation`, `high → judgement`).
121
+ * This is a COMPLEMENT to the resolver — it only supplies a role when one is
122
+ * otherwise absent; an explicit label, descriptor, or `roleOverride` always
123
+ * wins. The classifier returns a TIER only and constructs no LLM client.
124
+ *
125
+ * Ignored when the role is already determined by the input or `roleOverride`.
126
+ */
127
+ complexityPrompt?: string;
128
+ /**
129
+ * Explicit encoded system-of-use key for the `llm.systems[key]` granular
130
+ * override tier (T11759 · M4).
131
+ *
132
+ * The flat-label input form derives this key from `system` itself; this option
133
+ * lets a caller resolving an OPEN-axis system (whose identity is NOT a flat
134
+ * {@link SystemOfUseLabel}) — e.g. a `.cantbook` node keyed
135
+ * `cantbook:<playbook>#<nodeId>` — supply that identity as the granular
136
+ * override + audit key while passing a resolvable background label as
137
+ * `system`. When set, it OVERRIDES the label-derived key. Omit it and the
138
+ * pre-T11759 derivation is unchanged.
139
+ *
140
+ * @task T11759
141
+ */
142
+ systemKey?: string;
143
+ /**
144
+ * Optional named profile (a key of `llm.profiles`) that pins the resolution to
145
+ * a specific provider/model/credential, winning over the role tier (T11759 ·
146
+ * M4).
147
+ *
148
+ * Threaded down to `ResolveLLMForRoleOptions.profileOverride`. A `.cantbook`
149
+ * stage's `profile:` flows through here. When the named profile is
150
+ * absent/incomplete, resolution falls through the normal chain unchanged.
151
+ *
152
+ * @task T11759
153
+ */
154
+ profile?: string;
113
155
  }
114
156
  //# sourceMappingURL=system-resolver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-resolver.d.ts","sourceRoot":"","sources":["../../src/llm/system-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,QAAQ,GACR,eAAe,GACf,SAAS,GACT,SAAS,GACT,QAAQ,GACR,aAAa,GACb,SAAS,CAAC;AAEd;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,QAAQ,GAAG,IAAI,CAAC,CAUtE,CAAC;AAEX;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC;IAExB;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
1
+ {"version":3,"file":"system-resolver.d.ts","sourceRoot":"","sources":["../../src/llm/system-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,QAAQ,GACR,eAAe,GACf,SAAS,GACT,SAAS,GACT,QAAQ,GACR,aAAa,GACb,SAAS,CAAC;AAEd;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,QAAQ,GAAG,IAAI,CAAC,CAUtE,CAAC;AAEX;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC;IAExB;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;;;;;OAaG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -335,7 +335,7 @@ export interface AdminPresetChange {
335
335
  * Query operations are read-only. Mutate operations write to the filesystem,
336
336
  * SQLite, or trigger side-effectful system actions.
337
337
  */
338
- export type AdminOp = 'admin.version' | 'admin.health' | 'admin.config.show' | 'admin.config.presets' | 'admin.stats' | 'admin.context' | 'admin.context.pull' | 'admin.runtime' | 'admin.paths' | 'admin.job' | 'admin.dash' | 'admin.log' | 'admin.sequence' | 'admin.help' | 'admin.token' | 'admin.adr.find' | 'admin.adr.show' | 'admin.backup' | 'admin.export' | 'admin.map' | 'admin.roadmap' | 'admin.smoke' | 'admin.smoke.provider' | 'admin.hooks.matrix' | 'admin.init' | 'admin.scaffold-hub' | 'admin.health.mutate' | 'admin.config.set' | 'admin.config.set-preset' | 'admin.backup.mutate' | 'admin.migrate' | 'admin.cleanup' | 'admin.job.cancel' | 'admin.safestop' | 'admin.inject.generate' | 'admin.adr.sync' | 'admin.import' | 'admin.detect' | 'admin.token.mutate' | 'admin.context.inject' | 'admin.map.mutate' | 'admin.install.global';
338
+ export type AdminOp = 'admin.version' | 'admin.health' | 'admin.config.show' | 'admin.config.presets' | 'admin.config.get' | 'admin.config.list' | 'admin.config.validate' | 'admin.stats' | 'admin.context' | 'admin.context.pull' | 'admin.runtime' | 'admin.paths' | 'admin.job' | 'admin.dash' | 'admin.log' | 'admin.sequence' | 'admin.help' | 'admin.token' | 'admin.adr.find' | 'admin.adr.show' | 'admin.backup' | 'admin.export' | 'admin.map' | 'admin.roadmap' | 'admin.smoke' | 'admin.smoke.provider' | 'admin.hooks.matrix' | 'admin.init' | 'admin.scaffold-hub' | 'admin.health.mutate' | 'admin.config.set' | 'admin.config.set-preset' | 'admin.config.unset' | 'admin.backup.mutate' | 'admin.migrate' | 'admin.cleanup' | 'admin.job.cancel' | 'admin.safestop' | 'admin.inject.generate' | 'admin.adr.sync' | 'admin.import' | 'admin.detect' | 'admin.token.mutate' | 'admin.context.inject' | 'admin.map.mutate' | 'admin.install.global';
339
339
  /** Parameters for `admin.version` — none required. */
340
340
  export type AdminVersionParams = Record<string, never>;
341
341
  /** Result of `admin.version`. */
@@ -400,6 +400,90 @@ export interface AdminConfigPresetsResult {
400
400
  /** Available strictness presets with their settings. */
401
401
  presets: AdminPresetDefinition[];
402
402
  }
403
+ /**
404
+ * Cascade slice selector for the config-as-domain query ops.
405
+ *
406
+ * - `'global'` — read ONLY `~/.cleo/config.json` (precedence 10)
407
+ * - `'project'` — read ONLY `<project>/.cleo/config.json` (precedence 20)
408
+ * - `'merged'` — read the deep-merge `{ ...global, ...project }` (default)
409
+ *
410
+ * Mirrors the `ResolveScope` of the `resolveCleoConfig` cascade resolver.
411
+ *
412
+ * @task T11917
413
+ */
414
+ export type AdminConfigScope = 'global' | 'project' | 'merged';
415
+ /** Parameters for `admin.config.get`. */
416
+ export interface AdminConfigGetParams {
417
+ /** Dot-notation config key to read a single value (required). */
418
+ key: string;
419
+ /** Cascade slice to read from. Defaults to `'merged'`. */
420
+ scope?: AdminConfigScope;
421
+ }
422
+ /**
423
+ * Result of `admin.config.get`.
424
+ *
425
+ * Returns the resolved value for `key`, or `null` when the key is absent in the
426
+ * selected cascade slice. `found` disambiguates a present `null` value from an
427
+ * absent key.
428
+ *
429
+ * @task T11917
430
+ */
431
+ export interface AdminConfigGetResult {
432
+ /** The dot-notation key that was resolved. */
433
+ key: string;
434
+ /** Cascade slice the value was resolved against. */
435
+ scope: AdminConfigScope;
436
+ /** Resolved value, or `null` when the key is absent. */
437
+ value: unknown;
438
+ /** `true` IFF the key resolved to a defined value in the cascade. */
439
+ found: boolean;
440
+ }
441
+ /** Parameters for `admin.config.list`. */
442
+ export interface AdminConfigListParams {
443
+ /** Cascade slice to project. Defaults to `'merged'`. */
444
+ scope?: AdminConfigScope;
445
+ }
446
+ /**
447
+ * Result of `admin.config.list`.
448
+ *
449
+ * Returns the full resolved config object for the selected cascade slice plus
450
+ * the flattened dot-notation key list for discovery.
451
+ *
452
+ * @task T11917
453
+ */
454
+ export interface AdminConfigListResult {
455
+ /** Cascade slice the config was resolved against. */
456
+ scope: AdminConfigScope;
457
+ /** Full resolved config object for the slice. */
458
+ config: Record<string, unknown>;
459
+ /** Flattened dot-notation keys present in the resolved config. */
460
+ keys: string[];
461
+ }
462
+ /** Parameters for `admin.config.validate`. */
463
+ export interface AdminConfigValidateParams {
464
+ /**
465
+ * Scope to validate. Only the cascade-participating scopes are valid —
466
+ * `'merged'` is rejected because validation runs against a single file's
467
+ * manifest entry schema. Defaults to `'project'`.
468
+ */
469
+ scope?: 'global' | 'project';
470
+ }
471
+ /**
472
+ * Result of `admin.config.validate`.
473
+ *
474
+ * `ok` is `true` IFF the file passed its manifest entry's schema gate (or no
475
+ * schema was configured). `issues` carries human-readable rejection reasons.
476
+ *
477
+ * @task T11917
478
+ */
479
+ export interface AdminConfigValidateResult {
480
+ /** Scope that was validated. */
481
+ scope: 'global' | 'project';
482
+ /** `true` IFF every gate passed. */
483
+ ok: boolean;
484
+ /** Human-readable schema issues. Empty when `ok === true`. */
485
+ issues: string[];
486
+ }
403
487
  /** Parameters for `admin.stats`. */
404
488
  export interface AdminStatsParams {
405
489
  /** Rolling measurement period in days (default 30). */
@@ -1189,6 +1273,29 @@ export interface AdminConfigSetResult {
1189
1273
  /** New value assigned. */
1190
1274
  value: unknown;
1191
1275
  }
1276
+ /** Parameters for `admin.config.unset`. */
1277
+ export interface AdminConfigUnsetParams {
1278
+ /** Dot-notation config key to remove (required). */
1279
+ key: string;
1280
+ /** Remove from the global file instead of the project file. */
1281
+ global?: boolean;
1282
+ }
1283
+ /**
1284
+ * Result of `admin.config.unset`.
1285
+ *
1286
+ * `removed` is `true` IFF the key existed and was deleted; `false` when the key
1287
+ * was already absent (idempotent no-op).
1288
+ *
1289
+ * @task T11917
1290
+ */
1291
+ export interface AdminConfigUnsetResult {
1292
+ /** Config key that was targeted. */
1293
+ key: string;
1294
+ /** Scope the key was removed from. */
1295
+ scope: 'project' | 'global';
1296
+ /** `true` IFF a value was actually deleted. */
1297
+ removed: boolean;
1298
+ }
1192
1299
  /** Parameters for `admin.config.set-preset`. */
1193
1300
  export interface AdminConfigSetPresetParams {
1194
1301
  /** Preset to apply (`strict`, `standard`, or `minimal`). */
@@ -1627,6 +1734,18 @@ export type AdminOps = {
1627
1734
  op: 'admin.config.presets';
1628
1735
  params: AdminConfigPresetsParams;
1629
1736
  result: AdminConfigPresetsResult;
1737
+ } | {
1738
+ op: 'admin.config.get';
1739
+ params: AdminConfigGetParams;
1740
+ result: AdminConfigGetResult;
1741
+ } | {
1742
+ op: 'admin.config.list';
1743
+ params: AdminConfigListParams;
1744
+ result: AdminConfigListResult;
1745
+ } | {
1746
+ op: 'admin.config.validate';
1747
+ params: AdminConfigValidateParams;
1748
+ result: AdminConfigValidateResult;
1630
1749
  } | {
1631
1750
  op: 'admin.stats';
1632
1751
  params: AdminStatsParams;
@@ -1727,6 +1846,10 @@ export type AdminOps = {
1727
1846
  op: 'admin.config.set-preset';
1728
1847
  params: AdminConfigSetPresetParams;
1729
1848
  result: AdminConfigSetPresetResult;
1849
+ } | {
1850
+ op: 'admin.config.unset';
1851
+ params: AdminConfigUnsetParams;
1852
+ result: AdminConfigUnsetResult;
1730
1853
  } | {
1731
1854
  op: 'admin.backup.mutate';
1732
1855
  params: AdminBackupMutateParams;