@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.
- package/dist/__tests__/operation-def.test.js +4 -1
- package/dist/__tests__/operation-def.test.js.map +1 -1
- package/dist/__tests__/provider-def.test.d.ts +12 -0
- package/dist/__tests__/provider-def.test.d.ts.map +1 -0
- package/dist/__tests__/provider-def.test.js +84 -0
- package/dist/__tests__/provider-def.test.js.map +1 -0
- package/dist/__tests__/service-provider.test.d.ts +17 -0
- package/dist/__tests__/service-provider.test.d.ts.map +1 -0
- package/dist/__tests__/service-provider.test.js +108 -0
- package/dist/__tests__/service-provider.test.js.map +1 -0
- package/dist/boundary.d.ts +52 -0
- package/dist/boundary.d.ts.map +1 -1
- package/dist/boundary.js +23 -0
- package/dist/boundary.js.map +1 -1
- package/dist/conduit.d.ts +171 -0
- package/dist/conduit.d.ts.map +1 -1
- package/dist/config/index.d.ts +23 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +22 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config.d.ts +2 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.d.ts +21 -0
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.d.ts.map +1 -0
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.js +84 -0
- package/dist/dispatch/__tests__/tasks-gateway-crud-ops.test.js.map +1 -0
- package/dist/dispatch/identity.d.ts +1 -1
- package/dist/dispatch/identity.d.ts.map +1 -1
- package/dist/dispatch/identity.js +20 -0
- package/dist/dispatch/identity.js.map +1 -1
- package/dist/dispatch/operation-def.d.ts +20 -0
- package/dist/dispatch/operation-def.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.js +1030 -46
- package/dist/dispatch/operations-registry.js.map +1 -1
- package/dist/index.d.ts +15 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/lease-ipc/__tests__/freeze.test.js +92 -0
- package/dist/lease-ipc/__tests__/freeze.test.js.map +1 -1
- package/dist/lease-ipc/index.d.ts +2 -2
- package/dist/lease-ipc/index.d.ts.map +1 -1
- package/dist/lease-ipc/index.js +1 -1
- package/dist/lease-ipc/index.js.map +1 -1
- package/dist/lease-ipc/messages.d.ts +167 -3
- package/dist/lease-ipc/messages.d.ts.map +1 -1
- package/dist/lease-ipc/messages.js +93 -0
- package/dist/lease-ipc/messages.js.map +1 -1
- package/dist/llm/catalog-schema.d.ts +242 -0
- package/dist/llm/catalog-schema.d.ts.map +1 -0
- package/dist/llm/catalog-schema.js +153 -0
- package/dist/llm/catalog-schema.js.map +1 -0
- package/dist/llm/catalog-schema.json +139 -0
- package/dist/llm/index.d.ts +15 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +14 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/oauth.d.ts +16 -2
- package/dist/llm/oauth.d.ts.map +1 -1
- package/dist/llm/onboarding.d.ts +126 -0
- package/dist/llm/onboarding.d.ts.map +1 -0
- package/dist/llm/onboarding.js +34 -0
- package/dist/llm/onboarding.js.map +1 -0
- package/dist/llm/provider-def.d.ts +254 -0
- package/dist/llm/provider-def.d.ts.map +1 -0
- package/dist/llm/provider-def.js +93 -0
- package/dist/llm/provider-def.js.map +1 -0
- package/dist/llm/system-resolver.d.ts +42 -0
- package/dist/llm/system-resolver.d.ts.map +1 -1
- package/dist/operations/admin.d.ts +124 -1
- package/dist/operations/admin.d.ts.map +1 -1
- package/dist/operations/entities.d.ts +110 -0
- package/dist/operations/entities.d.ts.map +1 -0
- package/dist/operations/entities.js +695 -0
- package/dist/operations/entities.js.map +1 -0
- package/dist/operations/llm.d.ts +15 -0
- package/dist/operations/llm.d.ts.map +1 -1
- package/dist/operations/output-contracts-data.d.ts.map +1 -1
- package/dist/operations/output-contracts-data.js +230 -0
- package/dist/operations/output-contracts-data.js.map +1 -1
- package/dist/operations/service.d.ts +68 -0
- package/dist/operations/service.d.ts.map +1 -0
- package/dist/operations/service.js +336 -0
- package/dist/operations/service.js.map +1 -0
- package/dist/operations/tasks.d.ts +109 -0
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js.map +1 -1
- package/dist/playbook.d.ts +56 -0
- package/dist/playbook.d.ts.map +1 -1
- package/dist/release/plan.d.ts +5 -5
- package/dist/vault/service-provider.d.ts +343 -0
- package/dist/vault/service-provider.d.ts.map +1 -0
- package/dist/vault/service-provider.js +857 -0
- package/dist/vault/service-provider.js.map +1 -0
- package/dist/workgraph.d.ts +12 -12
- package/package.json +10 -2
- package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
- package/src/__tests__/operation-def.test.ts +6 -1
- package/src/__tests__/provider-def.test.ts +93 -0
- package/src/__tests__/service-provider.test.ts +129 -0
- package/src/boundary.ts +69 -0
- package/src/conduit.ts +200 -0
- package/src/config/index.ts +35 -0
- package/src/config.ts +2 -1
- package/src/dispatch/__tests__/tasks-gateway-crud-ops.test.ts +99 -0
- package/src/dispatch/identity.ts +20 -0
- package/src/dispatch/operation-def.ts +21 -0
- package/src/dispatch/operations-registry.ts +1062 -36
- package/src/index.ts +137 -1
- package/src/lease-ipc/__tests__/freeze.test.ts +96 -0
- package/src/lease-ipc/index.ts +12 -0
- package/src/lease-ipc/messages.ts +117 -0
- package/src/llm/catalog-schema.json +139 -0
- package/src/llm/catalog-schema.ts +184 -0
- package/src/llm/index.ts +29 -0
- package/src/llm/oauth.ts +16 -2
- package/src/llm/onboarding.ts +131 -0
- package/src/llm/provider-def.ts +291 -0
- package/src/llm/system-resolver.ts +45 -0
- package/src/operations/admin.ts +144 -0
- package/src/operations/entities.ts +758 -0
- package/src/operations/llm.ts +15 -0
- package/src/operations/output-contracts-data.ts +264 -0
- package/src/operations/service.ts +360 -0
- package/src/operations/tasks.ts +119 -0
- package/src/playbook.ts +56 -0
- package/src/vault/service-provider.ts +1137 -0
package/src/dispatch/identity.ts
CHANGED
|
@@ -104,6 +104,26 @@ export const CANONICAL_DOMAINS = [
|
|
|
104
104
|
// regression emits ONE leased `selfimprove_dhq` row + ONE DRAFT PR. Default
|
|
105
105
|
// OFF (requires --execute); the engine lives in CORE (P5 self-improvement spec).
|
|
106
106
|
'selfimprove',
|
|
107
|
+
// T11939 (epic T11765 · M2): 'cleo service auth-url|exchange|refresh|self-heal'
|
|
108
|
+
// — the universal service-vault OAuth flow. auth-url builds a PKCE auth URL;
|
|
109
|
+
// exchange persists encrypted tokens; refresh/self-heal renew them honoring the
|
|
110
|
+
// per-provider RefreshConfig. The flow lives in CORE (store/service-oauth.ts),
|
|
111
|
+
// driven by the declarative SERVICE_PROVIDERS registry (contracts).
|
|
112
|
+
'service',
|
|
113
|
+
// T11700 (epic T11666 · M3 · North-Star §2): the 5-entity provider experience —
|
|
114
|
+
// the addressable Provider / Alias / Account / Model / Profile surface.
|
|
115
|
+
// 'account' — 'cleo account add|list|remove' (the credential pool; add is
|
|
116
|
+
// secret-bearing/cli-only, MCP-default-denied).
|
|
117
|
+
// 'provider' — 'cleo provider list|show|connect' (the declarative providers
|
|
118
|
+
// table #1039 + alias resolution; connect is secret-bearing).
|
|
119
|
+
// 'model' — 'cleo model query|show' (the models_catalog table #1037; QUERY-ONLY).
|
|
120
|
+
// 'profile' — 'cleo profile create|list|pin|use' (the named account+model
|
|
121
|
+
// binding persisted into llm.profiles[name], the resolver SSoT).
|
|
122
|
+
// Each dispatches to the CORE entity-ops layer (llm/entity-ops.ts).
|
|
123
|
+
'account',
|
|
124
|
+
'provider',
|
|
125
|
+
'model',
|
|
126
|
+
'profile',
|
|
107
127
|
] as const;
|
|
108
128
|
|
|
109
129
|
/**
|
|
@@ -95,6 +95,27 @@ export interface OperationDef {
|
|
|
95
95
|
*/
|
|
96
96
|
mcpExposed?: boolean;
|
|
97
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Whether this operation is a **streaming** operation served over the gateway
|
|
100
|
+
* HTTP/SSE transport as `GET /v1/<domain>/<operation>` (T11921).
|
|
101
|
+
*
|
|
102
|
+
* **Default-deny**: absent / `false` means the operation is unary only — it is
|
|
103
|
+
* dispatched via the POST path and returns a single LAFS envelope. When
|
|
104
|
+
* `streaming: true`, the `/v1` HTTP listener routes a `GET` to the same
|
|
105
|
+
* `(domain, operation)` pair through {@link createSseStream}, emitting a
|
|
106
|
+
* sequence of `GatewayStreamEvent` frames (`data` … terminated by `done` or
|
|
107
|
+
* `error`) over a `text/event-stream` body. This is the realtime transport the
|
|
108
|
+
* Studio Kanban (T11929) and Pi-TUI (T11936) consume.
|
|
109
|
+
*
|
|
110
|
+
* A streaming op is still a normal registry entry (it has a `gateway`, a
|
|
111
|
+
* `domain`, an `operation`, a `tier`), so it co-exists with the unary POST
|
|
112
|
+
* routes and is discoverable by every existing registry helper — only the wire
|
|
113
|
+
* framing (a long-lived SSE body vs a single JSON response) differs.
|
|
114
|
+
*
|
|
115
|
+
* @task T11921 — gateway SSE streaming on `/v1`
|
|
116
|
+
*/
|
|
117
|
+
streaming?: boolean;
|
|
118
|
+
|
|
98
119
|
/**
|
|
99
120
|
* Schema-first INPUT contract for this operation (DHQ-033 / T11692).
|
|
100
121
|
*
|