@cleocode/contracts 2026.4.64 → 2026.4.66

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/adapter.d.ts CHANGED
@@ -3,6 +3,34 @@
3
3
  * Every provider adapter must implement this contract.
4
4
  *
5
5
  * @task T5240
6
+ *
7
+ * # Harness Sovereignty Invariants (ADR-049)
8
+ *
9
+ * Every adapter implementation MUST preserve these invariants:
10
+ *
11
+ * 1. **CLEO owns memory.** `brain.db`, `nexus.db` (global), `conduit.db`,
12
+ * and `tasks.db` are ALWAYS local files under CLEO control regardless
13
+ * of which provider is active. An adapter MUST NOT relocate, proxy,
14
+ * or mirror these files to provider-controlled storage.
15
+ * 2. **Provider owns conversation surface, not state.** An adapter MAY
16
+ * own the UI, keybindings, tool-use display, and streaming render
17
+ * for the active provider. It MAY NOT persist CLEO state (tasks,
18
+ * sessions, memory entries) to provider-specific storage.
19
+ * 3. **Spawn is local.** `spawn.ts` launches agents on the local
20
+ * machine via CLI/IPC. Adapters MUST NOT route spawn through a
21
+ * cloud API that retains agent transcripts — that would yield
22
+ * memory to the provider.
23
+ * 4. **Hooks are provider-neutral.** The 31-event CAAMP taxonomy
24
+ * (`packages/caamp/src/core/hooks/generated.ts`) is the contract;
25
+ * adapters implement the transport, not the semantics.
26
+ * 5. **Agent definitions live in provider-native paths.** See
27
+ * `packages/caamp/src/core/instructions/injector.ts` →
28
+ * `getProviderAgentFolder(providerId)` for the per-provider
29
+ * agent-file location (e.g. `~/.claude/agents/`,
30
+ * `~/.config/opencode/agents/`).
31
+ *
32
+ * Full rationale + provider-swap invariant probe design:
33
+ * `.cleo/adrs/ADR-049-harness-sovereignty.md`.
6
34
  */
7
35
  import type { AdapterCapabilities } from './capabilities.js';
8
36
  import type { AdapterContextMonitorProvider } from './context-monitor.js';
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;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mB,CAAC;IAC5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,2EAA2E;IAC3E,OAAO,EAAE,sBAAsB,CAAC;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B;;;;OAIG;IACH,cAAc,CAAC,EAAE,6BAA6B,CAAC;IAC/C;;;;OAIG;IACH,SAAS,CAAC,EAAE,wBAAwB,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,8DAA8D;IAC9D,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,iDAAiD;IACjD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,uDAAuD;IACvD,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC"}
package/dist/adapter.js CHANGED
@@ -3,6 +3,34 @@
3
3
  * Every provider adapter must implement this contract.
4
4
  *
5
5
  * @task T5240
6
+ *
7
+ * # Harness Sovereignty Invariants (ADR-049)
8
+ *
9
+ * Every adapter implementation MUST preserve these invariants:
10
+ *
11
+ * 1. **CLEO owns memory.** `brain.db`, `nexus.db` (global), `conduit.db`,
12
+ * and `tasks.db` are ALWAYS local files under CLEO control regardless
13
+ * of which provider is active. An adapter MUST NOT relocate, proxy,
14
+ * or mirror these files to provider-controlled storage.
15
+ * 2. **Provider owns conversation surface, not state.** An adapter MAY
16
+ * own the UI, keybindings, tool-use display, and streaming render
17
+ * for the active provider. It MAY NOT persist CLEO state (tasks,
18
+ * sessions, memory entries) to provider-specific storage.
19
+ * 3. **Spawn is local.** `spawn.ts` launches agents on the local
20
+ * machine via CLI/IPC. Adapters MUST NOT route spawn through a
21
+ * cloud API that retains agent transcripts — that would yield
22
+ * memory to the provider.
23
+ * 4. **Hooks are provider-neutral.** The 31-event CAAMP taxonomy
24
+ * (`packages/caamp/src/core/hooks/generated.ts`) is the contract;
25
+ * adapters implement the transport, not the semantics.
26
+ * 5. **Agent definitions live in provider-native paths.** See
27
+ * `packages/caamp/src/core/instructions/injector.ts` →
28
+ * `getProviderAgentFolder(providerId)` for the per-provider
29
+ * agent-file location (e.g. `~/.claude/agents/`,
30
+ * `~/.config/opencode/agents/`).
31
+ *
32
+ * Full rationale + provider-swap invariant probe design:
33
+ * `.cleo/adrs/ADR-049-harness-sovereignty.md`.
6
34
  */
7
35
  export {};
8
36
  //# sourceMappingURL=adapter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/contracts",
3
- "version": "2026.4.64",
3
+ "version": "2026.4.66",
4
4
  "description": "Domain types, interfaces, and contracts for the CLEO ecosystem",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/adapter.ts CHANGED
@@ -3,6 +3,34 @@
3
3
  * Every provider adapter must implement this contract.
4
4
  *
5
5
  * @task T5240
6
+ *
7
+ * # Harness Sovereignty Invariants (ADR-049)
8
+ *
9
+ * Every adapter implementation MUST preserve these invariants:
10
+ *
11
+ * 1. **CLEO owns memory.** `brain.db`, `nexus.db` (global), `conduit.db`,
12
+ * and `tasks.db` are ALWAYS local files under CLEO control regardless
13
+ * of which provider is active. An adapter MUST NOT relocate, proxy,
14
+ * or mirror these files to provider-controlled storage.
15
+ * 2. **Provider owns conversation surface, not state.** An adapter MAY
16
+ * own the UI, keybindings, tool-use display, and streaming render
17
+ * for the active provider. It MAY NOT persist CLEO state (tasks,
18
+ * sessions, memory entries) to provider-specific storage.
19
+ * 3. **Spawn is local.** `spawn.ts` launches agents on the local
20
+ * machine via CLI/IPC. Adapters MUST NOT route spawn through a
21
+ * cloud API that retains agent transcripts — that would yield
22
+ * memory to the provider.
23
+ * 4. **Hooks are provider-neutral.** The 31-event CAAMP taxonomy
24
+ * (`packages/caamp/src/core/hooks/generated.ts`) is the contract;
25
+ * adapters implement the transport, not the semantics.
26
+ * 5. **Agent definitions live in provider-native paths.** See
27
+ * `packages/caamp/src/core/instructions/injector.ts` →
28
+ * `getProviderAgentFolder(providerId)` for the per-provider
29
+ * agent-file location (e.g. `~/.claude/agents/`,
30
+ * `~/.config/opencode/agents/`).
31
+ *
32
+ * Full rationale + provider-swap invariant probe design:
33
+ * `.cleo/adrs/ADR-049-harness-sovereignty.md`.
6
34
  */
7
35
 
8
36
  import type { AdapterCapabilities } from './capabilities.js';