@cleocode/cleo-os 2026.4.63 → 2026.4.65

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.
@@ -0,0 +1,134 @@
1
+ /**
2
+ * CleoOS Memory Policy — governs what gets written to `brain.db`.
3
+ *
4
+ * Enforces owner learning L-fe4ba2dc: *"Chat logs are NOT memory. Real memory
5
+ * is extracted artifacts — patterns, decisions, learnings. Raw conversation
6
+ * history should never be stored directly in brain.db."*
7
+ *
8
+ * The default policy allows structured memory types (`observation`, `decision`,
9
+ * `pattern`, `learning`) and rejects raw transcript types (`chatlog`,
10
+ * `transcript`). The policy is configurable via `MemoryPolicyConfig` for
11
+ * extension without adding feature toggles to the skeleton.
12
+ *
13
+ * @see ADR-050 — CleoOS Sovereign Harness: Distribution Binding Charter
14
+ * @see D008 — 7-technique memory architecture (owner decision 2026-04-13)
15
+ * @see L-fe4ba2dc — Chat logs are NOT memory
16
+ * @task T640
17
+ * @epic T636
18
+ * @packageDocumentation
19
+ */
20
+ /**
21
+ * Discriminated union of memory item types recognised by the CleoOS memory gate.
22
+ *
23
+ * @remarks
24
+ * The `chatlog` and `transcript` variants exist to allow callers to explicitly
25
+ * pass raw conversation data through the policy — which will then be rejected
26
+ * with a human-readable reason. This makes the rejection point observable
27
+ * rather than silent.
28
+ */
29
+ export type MemoryItemType = 'observation' | 'decision' | 'pattern' | 'learning' | 'chatlog' | 'transcript';
30
+ /**
31
+ * A candidate item for storage in `brain.db`.
32
+ *
33
+ * The `type` field is the primary discriminant used by `MemoryPolicy.shouldStore()`.
34
+ * The `text` field is the raw content. `metadata` carries any supplementary
35
+ * structured data (source, confidence, timestamps, etc.).
36
+ */
37
+ export interface MemoryItem {
38
+ /** Semantic classification of this memory item. */
39
+ type: MemoryItemType;
40
+ /** Raw text content of the memory item. */
41
+ text: string;
42
+ /**
43
+ * Optional supplementary metadata.
44
+ *
45
+ * Callers may include fields such as `source`, `confidence`, `taskId`, or
46
+ * `timestamp`. The policy does not inspect metadata when making its decision —
47
+ * type and text alone are sufficient for the current skeleton.
48
+ */
49
+ metadata?: Record<string, unknown>;
50
+ }
51
+ /**
52
+ * Configuration object for `MemoryPolicy`.
53
+ *
54
+ * All fields are optional; the default values implement the owner-mandated
55
+ * L-fe4ba2dc rule. Override only when a specific distribution profile needs
56
+ * different behaviour (e.g. a development harness that stores transcripts for
57
+ * debugging — explicitly opt-in, not on by default).
58
+ */
59
+ export interface MemoryPolicyConfig {
60
+ /**
61
+ * Set of `MemoryItemType` values that are ALLOWED through the gate.
62
+ *
63
+ * Defaults to `['observation', 'decision', 'pattern', 'learning']`.
64
+ * Items whose type is NOT in this set are rejected.
65
+ */
66
+ allowedTypes: ReadonlySet<MemoryItemType>;
67
+ /**
68
+ * Minimum character length for `item.text` to be stored.
69
+ *
70
+ * Items with text shorter than this threshold are rejected as likely noise.
71
+ * Defaults to `10`.
72
+ */
73
+ minTextLength: number;
74
+ }
75
+ /**
76
+ * Gate that decides whether a memory item should be written to `brain.db`.
77
+ *
78
+ * @remarks
79
+ * Owner learning L-fe4ba2dc (2026-04-13):
80
+ * *"Chat logs are NOT memory. Real memory is extracted artifacts — patterns,
81
+ * decisions, learnings. Raw conversation history should never be stored
82
+ * directly in brain.db. The extraction pipeline (extraction→consolidation→
83
+ * retrieval) must transform raw transcripts into structured knowledge before
84
+ * storage."*
85
+ *
86
+ * The default configuration enforces this rule. Override via
87
+ * `MemoryPolicyConfig` for specialised distribution profiles.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * const policy = new MemoryPolicy();
92
+ *
93
+ * const obs: MemoryItem = { type: 'observation', text: 'File walker now handles symlinks' };
94
+ * policy.shouldStore(obs); // true
95
+ *
96
+ * const log: MemoryItem = { type: 'chatlog', text: 'User: how does this work?' };
97
+ * policy.shouldStore(log); // false
98
+ * policy.reason(log); // "chatlog items are excluded: store extracted artifacts, not raw chat history"
99
+ * ```
100
+ */
101
+ export declare class MemoryPolicy {
102
+ private readonly config;
103
+ /**
104
+ * Construct a `MemoryPolicy` with optional configuration overrides.
105
+ *
106
+ * @param config - Partial overrides merged with {@link DEFAULT_POLICY_CONFIG}.
107
+ * Omitted fields retain their defaults.
108
+ */
109
+ constructor(config?: Partial<MemoryPolicyConfig>);
110
+ /**
111
+ * Return `true` if `item` should be stored in `brain.db`.
112
+ *
113
+ * Applies two checks in order:
114
+ * 1. **Type gate** — item type must be in `config.allowedTypes`.
115
+ * 2. **Length gate** — `item.text.length` must meet `config.minTextLength`.
116
+ *
117
+ * Both checks must pass for `shouldStore` to return `true`.
118
+ *
119
+ * @param item - Candidate memory item to evaluate.
120
+ * @returns Whether the item passes the memory gate.
121
+ */
122
+ shouldStore(item: MemoryItem): boolean;
123
+ /**
124
+ * Return a human-readable explanation of the policy decision for `item`.
125
+ *
126
+ * Always returns a string — callers can surface this in logs or diagnostic
127
+ * output regardless of whether `shouldStore` returned `true` or `false`.
128
+ *
129
+ * @param item - Memory item to explain the policy decision for.
130
+ * @returns Human-readable rationale string.
131
+ */
132
+ reason(item: MemoryItem): string;
133
+ }
134
+ //# sourceMappingURL=memory-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-policy.d.ts","sourceRoot":"","sources":["../../src/policies/memory-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,GACT,YAAY,CAAC;AAEjB;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,mDAAmD;IACnD,IAAI,EAAE,cAAc,CAAC;IACrB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,YAAY,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IAC1C;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAuBD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;;;OAKG;gBACS,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;IAOhD;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAUtC;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;CAejC"}
@@ -0,0 +1,120 @@
1
+ /**
2
+ * CleoOS Memory Policy — governs what gets written to `brain.db`.
3
+ *
4
+ * Enforces owner learning L-fe4ba2dc: *"Chat logs are NOT memory. Real memory
5
+ * is extracted artifacts — patterns, decisions, learnings. Raw conversation
6
+ * history should never be stored directly in brain.db."*
7
+ *
8
+ * The default policy allows structured memory types (`observation`, `decision`,
9
+ * `pattern`, `learning`) and rejects raw transcript types (`chatlog`,
10
+ * `transcript`). The policy is configurable via `MemoryPolicyConfig` for
11
+ * extension without adding feature toggles to the skeleton.
12
+ *
13
+ * @see ADR-050 — CleoOS Sovereign Harness: Distribution Binding Charter
14
+ * @see D008 — 7-technique memory architecture (owner decision 2026-04-13)
15
+ * @see L-fe4ba2dc — Chat logs are NOT memory
16
+ * @task T640
17
+ * @epic T636
18
+ * @packageDocumentation
19
+ */
20
+ // ---------------------------------------------------------------------------
21
+ // Default configuration
22
+ // ---------------------------------------------------------------------------
23
+ /**
24
+ * Default memory policy configuration.
25
+ *
26
+ * @remarks
27
+ * Implements owner learning L-fe4ba2dc: chat logs and transcripts are
28
+ * categorically excluded from `brain.db`. Only extracted, typed memory
29
+ * artifacts pass through.
30
+ */
31
+ const DEFAULT_POLICY_CONFIG = {
32
+ allowedTypes: new Set(['observation', 'decision', 'pattern', 'learning']),
33
+ minTextLength: 10,
34
+ };
35
+ // ---------------------------------------------------------------------------
36
+ // MemoryPolicy
37
+ // ---------------------------------------------------------------------------
38
+ /**
39
+ * Gate that decides whether a memory item should be written to `brain.db`.
40
+ *
41
+ * @remarks
42
+ * Owner learning L-fe4ba2dc (2026-04-13):
43
+ * *"Chat logs are NOT memory. Real memory is extracted artifacts — patterns,
44
+ * decisions, learnings. Raw conversation history should never be stored
45
+ * directly in brain.db. The extraction pipeline (extraction→consolidation→
46
+ * retrieval) must transform raw transcripts into structured knowledge before
47
+ * storage."*
48
+ *
49
+ * The default configuration enforces this rule. Override via
50
+ * `MemoryPolicyConfig` for specialised distribution profiles.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const policy = new MemoryPolicy();
55
+ *
56
+ * const obs: MemoryItem = { type: 'observation', text: 'File walker now handles symlinks' };
57
+ * policy.shouldStore(obs); // true
58
+ *
59
+ * const log: MemoryItem = { type: 'chatlog', text: 'User: how does this work?' };
60
+ * policy.shouldStore(log); // false
61
+ * policy.reason(log); // "chatlog items are excluded: store extracted artifacts, not raw chat history"
62
+ * ```
63
+ */
64
+ export class MemoryPolicy {
65
+ config;
66
+ /**
67
+ * Construct a `MemoryPolicy` with optional configuration overrides.
68
+ *
69
+ * @param config - Partial overrides merged with {@link DEFAULT_POLICY_CONFIG}.
70
+ * Omitted fields retain their defaults.
71
+ */
72
+ constructor(config) {
73
+ this.config = {
74
+ allowedTypes: config?.allowedTypes ?? DEFAULT_POLICY_CONFIG.allowedTypes,
75
+ minTextLength: config?.minTextLength ?? DEFAULT_POLICY_CONFIG.minTextLength,
76
+ };
77
+ }
78
+ /**
79
+ * Return `true` if `item` should be stored in `brain.db`.
80
+ *
81
+ * Applies two checks in order:
82
+ * 1. **Type gate** — item type must be in `config.allowedTypes`.
83
+ * 2. **Length gate** — `item.text.length` must meet `config.minTextLength`.
84
+ *
85
+ * Both checks must pass for `shouldStore` to return `true`.
86
+ *
87
+ * @param item - Candidate memory item to evaluate.
88
+ * @returns Whether the item passes the memory gate.
89
+ */
90
+ shouldStore(item) {
91
+ if (!this.config.allowedTypes.has(item.type)) {
92
+ return false;
93
+ }
94
+ if (item.text.length < this.config.minTextLength) {
95
+ return false;
96
+ }
97
+ return true;
98
+ }
99
+ /**
100
+ * Return a human-readable explanation of the policy decision for `item`.
101
+ *
102
+ * Always returns a string — callers can surface this in logs or diagnostic
103
+ * output regardless of whether `shouldStore` returned `true` or `false`.
104
+ *
105
+ * @param item - Memory item to explain the policy decision for.
106
+ * @returns Human-readable rationale string.
107
+ */
108
+ reason(item) {
109
+ if (!this.config.allowedTypes.has(item.type)) {
110
+ return (`${item.type} items are excluded: store extracted artifacts, not raw ` +
111
+ `${item.type === 'chatlog' || item.type === 'transcript' ? 'chat history' : 'unstructured content'}`);
112
+ }
113
+ if (item.text.length < this.config.minTextLength) {
114
+ return (`text too short (${item.text.length} chars < minimum ${this.config.minTextLength}): ` +
115
+ `likely noise or empty observation`);
116
+ }
117
+ return `${item.type} item accepted (${item.text.length} chars)`;
118
+ }
119
+ }
120
+ //# sourceMappingURL=memory-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-policy.js","sourceRoot":"","sources":["../../src/policies/memory-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAsEH,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAuB;IAChD,YAAY,EAAE,IAAI,GAAG,CAAiB,CAAC,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACzF,aAAa,EAAE,EAAE;CAClB,CAAC;AAEF,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,YAAY;IACN,MAAM,CAAqB;IAE5C;;;;;OAKG;IACH,YAAY,MAAoC;QAC9C,IAAI,CAAC,MAAM,GAAG;YACZ,YAAY,E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ider adapters.
3
+ *
4
+ * Discovers agents from two sources:
5
+ * 1. **Seed agents** — bundled with CleoOS in `packages/cleo-os/seed-agents/`.
6
+ * 2. **User agents** — installed by individual provider adapters into their
7
+ * provider-specific agent directories (e.g. `~/.claude/agents/`).
8
+ *
9
+ * This module is read-only. It does not install, remove, or modify agents.
10
+ * Provider adapter logic stays in `packages/adapters/`. CleoOS consumes the
11
+ * filesystem artifacts that adapters produce.
12
+ *
13
+ * @remarks
14
+ * Long-term: `loadUserAgents()` should call `adapter.paths?.getAgentInstallDir()`
15
+ * dynamically once T639 exposes the provider-folder contract. For now the 9 paths
16
+ * are hard-coded from each provider's `AdapterPathProvider` defaults.
17
+ *
18
+ * @see ADR-050 — CleoOS Sovereign Harness: Distribution Binding Charter
19
+ * @task T640
20
+ * @epic T636
21
+ * @packageDocumentation
22
+ */
23
+ /**
24
+ * A single agent known to the CleoOS agent catalog.
25
+ *
26
+ * Agents are discovered at runtime from seed directories and provider-specific
27
+ * agent installation folders. The `source` discriminant distinguishes bundled
28
+ * agents from user-installed ones.
29
+ */
30
+ export interface AgentDefinition {
31
+ /** Stable unique identifier for this agent (derived from file name sans extension). */
32
+ id: string;
33
+ /** Human-readable display name (defaults to `id` when no metadata is available). */
34
+ name: string;
35
+ /**
36
+ * Provider that manages this agent's execution context.
37
+ *
38
+ * One of the 9 known CLEO provider IDs: `"claude-code"`, `"claude-sdk"`,
39
+ * `"codex"`, `"cursor"`, `"gemini-cli"`, `"kimi"`, `"openai-sdk"`,
40
+ * `"opencode"`, `"pi"`. Seed agents use `"cleo-os"`.
41
+ */
42
+ provider: string;
43
+ /** Absolute path to the agent definition file on disk. */
44
+ path: string;
45
+ /**
46
+ * Free-form capability tags describing what this agent can do.
47
+ *
48
+ * Common values: `"spawn"`, `"orchestrate"`, `"memory"`, `"review"`, `"test"`.
49
+ * May be empty when no metadata file is available.
50
+ */
51
+ capabilities: string[];
52
+ /**
53
+ * Origin of this agent definition.
54
+ *
55
+ * - `"seed"` — bundled with CleoOS under `packages/cleo-os/seed-agents/`
56
+ * - `"user"` — installed by a provider adapter into its agent directory
57
+ */
58
+ source: 'seed' | 'user';
59
+ }
60
+ /**
61
+ * Read-only catalog of CleoOS agents discovered across all provider adapters.
62
+ *
63
+ * Combines seed agents (bundled with CleoOS) with user-installed agents from
64
+ * each of the 9 provider adapter directories. Results are deduplicated by
65
+ * `path` — a path present in both sources appears once as `"seed"`.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const registry = new AgentRegistry();
70
+ * const all = await registry.listAll();
71
+ * console.log(all.length, 'agents discovered');
72
+ * ```
73
+ */
74
+ export declare class AgentRegistry {
75
+ /**
76
+ * Load seed agents bundled with CleoOS.
77
+ *
78
+ * Reads `packages/cleo-os/seed-agents/` and returns one `AgentDefinition`
79
+ * per agent file found. Returns an empty array when the directory is absent
80
+ * or empty (the directory is created during T640 but initially unpopulated).
81
+ *
82
+ * @returns Array of seed agent definitions; empty if none are installed.
83
+ */
84
+ loadSeedAgents(): Promise<AgentDefinition[]>;
85
+ /**
86
+ * Load user-installed agents from all known provider agent directories.
87
+ *
88
+ * Iterates the 9 provider adapter directories and returns one
89
+ * `AgentDefinition` per agent file found. Directories that do not exist
90
+ * or are unreadable are silently skipped.
91
+ *
92
+ * @returns Array of user agent definitions across all providers.
93
+ */
94
+ loadUserAgents(): Promise<AgentDefinition[]>;
95
+ /**
96
+ * Return all known agents — seed agents followed by user-installed agents.
97
+ *
98
+ * Seed agents take precedence: if the same absolute path appears in both
99
+ * sources (uncommon but possible in development), the seed entry wins and
100
+ * the user entry is omitted.
101
+ *
102
+ * @returns Deduplicated array of all discovered agent definitions.
103
+ */
104
+ listAll(): Promise<AgentDefinition[]>;
105
+ }
106
+ //# sourceMappingURL=agent-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-registry.d.ts","sourceRoot":"","sources":["../../src/registry/agent-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAcH;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAuFD;;;;;;;;;;;;;GAaG;AACH,qBAAa,aAAa;IACxB;;;;;;;;OAQG;IACG,cAAc,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAelD;;;;;;;;OAQG;IACG,cAAc,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAqBlD;;;;;;;;OAQG;IACG,OAAO,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;CAY5C"}
@@ -0,0 +1,195 @@
1
+ /**
2
+ * CleoOS Agent Registry — catalog of installed agents across all provider adapters.
3
+ *
4
+ * Discovers agents from two sources:
5
+ * 1. **Seed agents** — bundled with CleoOS in `packages/cleo-os/seed-agents/`.
6
+ * 2. **User agents** — installed by individual provider adapters into their
7
+ * provider-specific agent directories (e.g. `~/.claude/agents/`).
8
+ *
9
+ * This module is read-only. It does not install, remove, or modify agents.
10
+ * Provider adapter logic stays in `packages/adapters/`. CleoOS consumes the
11
+ * filesystem artifacts that adapters produce.
12
+ *
13
+ * @remarks
14
+ * Long-term: `loadUserAgents()` should call `adapter.paths?.getAgentInstallDir()`
15
+ * dynamically once T639 exposes the provider-folder contract. For now the 9 paths
16
+ * are hard-coded from each provider's `AdapterPathProvider` defaults.
17
+ *
18
+ * @see ADR-050 — CleoOS Sovereign Harness: Distribution Binding Charter
19
+ * @task T640
20
+ * @epic T636
21
+ * @packageDocumentation
22
+ */
23
+ import { existsSync } from 'node:fs';
24
+ import { readdir } from 'node:fs/promises';
25
+ import { homedir } from 'node:os';
26
+ import { dirname, join } from 'node:path';
27
+ import { fileURLToPath } from 'node:url';
28
+ const __dirname = dirname(fileURLToPath(import.meta.url));
29
+ // ---------------------------------------------------------------------------
30
+ // Internal helpers
31
+ // ---------------------------------------------------------------------------
32
+ /**
33
+ * Absolute path to the CleoOS seed-agents directory.
34
+ *
35
+ * Located at `packages/cleo-os/seed-agents/` relative to this source file's
36
+ * compiled output (`dist/registry/`), so we go up two levels from `__dirname`.
37
+ */
38
+ const SEED_AGENTS_DIR = join(__dirname, '..', '..', 'seed-agents');
39
+ /**
40
+ * Known provider IDs and their default agent installation directories.
41
+ *
42
+ * Derived from each provider's `AdapterPathProvider.getAgentInstallDir()` defaults.
43
+ * Update here when a provider changes its agent directory structure.
44
+ *
45
+ * @remarks
46
+ * Long-term replacement: call `adapter.paths?.getAgentInstallDir()` once T639
47
+ * exposes the provider-folder contract via a dynamic registry surface.
48
+ */
49
+ const PROVIDER_AGENT_DIRS = [
50
+ { providerId: 'claude-code', dir: join(homedir(), '.claude', 'agents') },
51
+ { providerId: 'claude-sdk', dir: join(homedir(), '.claude', 'agents') },
52
+ { providerId: 'codex', dir: join(homedir(), '.codex', 'agents') },
53
+ { providerId: 'cursor', dir: join(homedir(), '.cursor', 'agents') },
54
+ { providerId: 'gemini-cli', dir: join(homedir(), '.gemini', 'agents') },
55
+ { providerId: 'kimi', dir: join(homedir(), '.kimi', 'agents') },
56
+ { providerId: 'openai-sdk', dir: join(homedir(), '.openai', 'agents') },
57
+ { providerId: 'opencode', dir: join(homedir(), '.opencode', 'agents') },
58
+ { providerId: 'pi', dir: join(homedir(), '.pi', 'agents') },
59
+ ];
60
+ /**
61
+ * File extensions recognised as agent definition files.
62
+ *
63
+ * Excludes README.md and other documentation files in seed-agents/.
64
+ */
65
+ const AGENT_EXTENSIONS = new Set(['.md', '.json', '.yaml', '.yml', '.ts', '.js']);
66
+ /**
67
+ * Derive a stable agent `id` from a file name by stripping the extension.
68
+ *
69
+ * @param fileName - Base file name (e.g. `"cleo-prime.md"`).
70
+ * @returns ID string (e.g. `"cleo-prime"`).
71
+ */
72
+ function idFromFileName(fileName) {
73
+ const dot = fileName.lastIndexOf('.');
74
+ return dot > 0 ? fileName.slice(0, dot) : fileName;
75
+ }
76
+ /**
77
+ * Read agent file names from a directory, returning an empty array when the
78
+ * directory does not exist or cannot be read.
79
+ *
80
+ * Filters to known agent file extensions and skips `README` files.
81
+ *
82
+ * @param dir - Absolute path to the directory to scan.
83
+ * @returns Array of base file names matching the agent extension filter.
84
+ */
85
+ async function readAgentFileNames(dir) {
86
+ if (!existsSync(dir)) {
87
+ return [];
88
+ }
89
+ try {
90
+ const entries = await readdir(dir, { withFileTypes: true });
91
+ return entries
92
+ .filter((e) => e.isFile())
93
+ .map((e) => e.name)
94
+ .filter((name) => {
95
+ const dot = name.lastIndexOf('.');
96
+ if (dot < 0)
97
+ return false;
98
+ const ext = name.slice(dot);
99
+ return AGENT_EXTENSIONS.has(ext) && !name.toLowerCase().startsWith('readme');
100
+ });
101
+ }
102
+ catch {
103
+ return [];
104
+ }
105
+ }
106
+ // ---------------------------------------------------------------------------
107
+ // AgentRegistry
108
+ // ---------------------------------------------------------------------------
109
+ /**
110
+ * Read-only catalog of CleoOS agents discovered across all provider adapters.
111
+ *
112
+ * Combines seed agents (bundled with CleoOS) with user-installed agents from
113
+ * each of the 9 provider adapter directories. Results are deduplicated by
114
+ * `path` — a path present in both sources appears once as `"seed"`.
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * const registry = new AgentRegistry();
119
+ * const all = await registry.listAll();
120
+ * console.log(all.length, 'agents discovered');
121
+ * ```
122
+ */
123
+ export class AgentRegistry {
124
+ /**
125
+ * Load seed agents bundled with CleoOS.
126
+ *
127
+ * Reads `packages/cleo-os/seed-agents/` and returns one `AgentDefinition`
128
+ * per agent file found. Returns an empty array when the directory is absent
129
+ * or empty (the directory is created during T640 but initially unpopulated).
130
+ *
131
+ * @returns Array of seed agent definitions; empty if none are installed.
132
+ */
133
+ async loadSeedAgents() {
134
+ const fileNames = await readAgentFileNames(SEED_AGENTS_DIR);
135
+ return fileNames.map((fileName) => {
136
+ const id = idFromFileName(fileName);
137
+ return {
138
+ id,
139
+ name: id,
140
+ provider: 'cleo-os',
141
+ path: join(SEED_AGENTS_DIR, fileName),
142
+ capabilities: [],
143
+ source: 'seed',
144
+ };
145
+ });
146
+ }
147
+ /**
148
+ * Load user-installed agents from all known provider agent directories.
149
+ *
150
+ * Iterates the 9 provider adapter directories and returns one
151
+ * `AgentDefinition` per agent file found. Directories that do not exist
152
+ * or are unreadable are silently skipped.
153
+ *
154
+ * @returns Array of user agent definitions across all providers.
155
+ */
156
+ async loadUserAgents() {
157
+ const results = [];
158
+ for (const { providerId, dir } of PROVIDER_AGENT_DIRS) {
159
+ const fileNames = await readAgentFileNames(dir);
160
+ for (const fileName of fileNames) {
161
+ const id = idFromFileName(fileName);
162
+ results.push({
163
+ id,
164
+ name: id,
165
+ provider: providerId,
166
+ path: join(dir, fileName),
167
+ capabilities: [],
168
+ source: 'user',
169
+ });
170
+ }
171
+ }
172
+ return results;
173
+ }
174
+ /**
175
+ * Return all known agents — seed agents followed by user-installed agents.
176
+ *
177
+ * Seed agents take precedence: if the same absolute path appears in both
178
+ * sources (uncommon but possible in development), the seed entry wins and
179
+ * the user entry is omitted.
180
+ *
181
+ * @returns Deduplicated array of all discovered agent definitions.
182
+ */
183
+ async listAll() {
184
+ const [seed, user] = await Promise.all([this.loadSeedAgents(), this.loadUserAgents()]);
185
+ const seenPaths = new Set(seed.map((a) => a.path));
186
+ const deduped = user.filter((a) => {
187
+ if (seenPaths.has(a.path))
188
+ return false;
189
+ seenPaths.add(a.path);
190
+ return true;
191
+ });
192
+ return [...seed, ...deduped];
193
+ }
194
+ }
195
+ //# sourceMappingURL=agent-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-registry.js","sourceRoot":"","sources":["../../src/registry/agent-registry.ts"],"names":[],"mappings":"AAAA;;;;;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AM,EAAE,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;gBACpC,OAAO,CAAC,IAAI,CAAC;oBACX,EAAE;oBACF,IAAI,EAAE,EAAE;oBACR,QAAQ,EAAE,UAAU;oBACpB,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC;oBACzB,YAAY,EAAE,EAAE;oBAChB,MAAM,EAAE,MAAM;iBACf,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,OAAO;QACX,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAEvF,MAAM,SAAS,GAAG,IAAI,GAAG,CAAS,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3D,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;YAChC,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;gBAAE,OAAO,KAAK,CAAC;YACxC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * CleoOS Provider Matrix — read-only health view of the 9 provider adapters.
3
+ *
4
+ * Scans `packages/adapters/src/providers/` at runtime to determine which
5
+ * providers are installed, whether they expose a spawn implementation, and
6
+ * how many hooks they declare. No CLI surface is added in this skeleton;
7
+ * the matrix is consumed programmatically by orchestrators or a future
8
+ * `cleo-os doctor` command (deferred per ADR-050).
9
+ *
10
+ * @remarks
11
+ * The `adapterClass` field is always `"CLEOProviderAdapter"` — the shared
12
+ * interface from `@cleocode/contracts` that every provider adapter implements.
13
+ * It is included in `ProviderMatrixRow` to make the interface name self-documenting
14
+ * for tooling that reflects on the matrix output.
15
+ *
16
+ * @see ADR-050 — CleoOS Sovereign Harness: Distribution Binding Charter
17
+ * @see packages/contracts/src/adapter.ts — CLEOProviderAdapter interface
18
+ * @task T640
19
+ * @epic T636
20
+ * @packageDocumentation
21
+ */
22
+ /**
23
+ * A single row in the CleoOS provider matrix.
24
+ *
25
+ * Each row represents one of the 9 known CLEO provider adapters and summarises
26
+ * its installation state and feature completeness as determined by filesystem
27
+ * inspection.
28
+ */
29
+ export interface ProviderMatrixRow {
30
+ /** Canonical provider identifier (e.g. `"claude-code"`, `"opencode"`). */
31
+ providerId: string;
32
+ /** Human-readable display name for the provider. */
33
+ displayName: string;
34
+ /**
35
+ * Whether the provider directory exists under
36
+ * `packages/adapters/src/providers/<providerId>/`.
37
+ */
38
+ installed: boolean;
39
+ /**
40
+ * Whether `spawn.ts` exists in the provider's directory.
41
+ *
42
+ * A spawn implementation is required for the provider to launch sub-agents.
43
+ */
44
+ spawnImplemented: boolean;
45
+ /**
46
+ * Count of canonical CAAMP hook event names declared in `hooks.ts`.
47
+ *
48
+ * Computed by scanning for known event name identifiers. Returns `0` when
49
+ * `hooks.ts` is absent or contains no recognised declarations.
50
+ */
51
+ hookSupport: number;
52
+ /**
53
+ * Name of the shared adapter interface that this provider implements.
54
+ *
55
+ * Always `"CLEOProviderAdapter"` (from `packages/contracts/src/adapter.ts`).
56
+ * Included for tooling that reflects on matrix rows to identify the contract.
57
+ */
58
+ adapterClass: string;
59
+ }
60
+ /**
61
+ * Read-only health view of all 9 CLEO provider adapters.
62
+ *
63
+ * Inspects the `packages/adapters/src/providers/` directory tree to produce
64
+ * a structured matrix of adapter installation state and feature completeness.
65
+ * All operations are read-only; no files are created or modified.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const matrix = new ProviderMatrix();
70
+ * const rows = await matrix.getMatrix();
71
+ * const ready = rows.filter((r) => r.installed && r.spawnImplemented);
72
+ * console.log(ready.length, 'providers ready to spawn agents');
73
+ * ```
74
+ */
75
+ export declare class ProviderMatrix {
76
+ private readonly providersDir;
77
+ /**
78
+ * Construct a `ProviderMatrix`.
79
+ *
80
+ * @param providersDir - Override the resolved providers directory path.
81
+ * Primarily for testing. Defaults to the monorepo-relative path.
82
+ */
83
+ constructor(providersDir?: string);
84
+ /**
85
+ * Scan all known providers and return their matrix rows.
86
+ *
87
+ * Results are returned in the canonical provider order defined by
88
+ * `KNOWN_PROVIDERS`. Rows are computed concurrently for performance.
89
+ *
90
+ * @returns Array of {@link ProviderMatrixRow} — one per known provider.
91
+ */
92
+ getMatrix(): Promise<ProviderMatrixRow[]>;
93
+ /**
94
+ * List provider IDs discovered under the providers directory.
95
+ *
96
+ * Returns all subdirectory names found at `packages/adapters/src/providers/`,
97
+ * including any that are not in the canonical `KNOWN_PROVIDERS` list. Useful
98
+ * for detecting community-contributed or experimental adapters.
99
+ *
100
+ * @returns Array of directory names (provider IDs) present on disk.
101
+ */
102
+ listInstalledProviderIds(): Promise<string[]>;
103
+ }
104
+ //# sourceMappingURL=provider-matrix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-matrix.d.ts","sourceRoot":"","sources":["../../src/registry/provider-matrix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAaH;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,0EAA0E;IAC1E,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAqJD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC;;;;;OAKG;gBACS,YAAY,CAAC,EAAE,MAAM;IAIjC;;;;;;;OAOG;IACG,SAAS,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAO/C;;;;;;;;OAQG;IACG,wBAAwB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAWpD"}
@@ -0,0 +1,218 @@
1
+ /**
2
+ * CleoOS Provider Matrix — read-only health view of the 9 provider adapters.
3
+ *
4
+ * Scans `packages/adapters/src/providers/` at runtime to determine which
5
+ * providers are installed, whether they expose a spawn implementation, and
6
+ * how many hooks they declare. No CLI surface is added in this skeleton;
7
+ * the matrix is consumed programmatically by orchestrators or a future
8
+ * `cleo-os doctor` command (deferred per ADR-050).
9
+ *
10
+ * @remarks
11
+ * The `adapterClass` field is always `"CLEOProviderAdapter"` — the shared
12
+ * interface from `@cleocode/contracts` that every provider adapter implements.
13
+ * It is included in `ProviderMatrixRow` to make the interface name self-documenting
14
+ * for tooling that reflects on the matrix output.
15
+ *
16
+ * @see ADR-050 — CleoOS Sovereign Harness: Distribution Binding Charter
17
+ * @see packages/contracts/src/adapter.ts — CLEOProviderAdapter interface
18
+ * @task T640
19
+ * @epic T636
20
+ * @packageDocumentation
21
+ */
22
+ import { existsSync } from 'node:fs';
23
+ import { readdir, readFile } from 'node:fs/promises';
24
+ import { dirname, join } from 'node:path';
25
+ import { fileURLToPath } from 'node:url';
26
+ const __dirname = dirname(fileURLToPath(import.meta.url));
27
+ // ---------------------------------------------------------------------------
28
+ // Internal constants
29
+ // ---------------------------------------------------------------------------
30
+ /**
31
+ * The shared adapter interface name — every provider adapter implements this.
32
+ *
33
+ * @see packages/contracts/src/adapter.ts
34
+ */
35
+ const ADAPTER_CLASS = 'CLEOProviderAdapter';
36
+ /**
37
+ * Canonical CAAMP hook event names used to count hook support in `hooks.ts`.
38
+ *
39
+ * Derived from the 16-event CAAMP taxonomy. Scanning for these identifiers
40
+ * gives a conservative lower-bound count of declared hooks.
41
+ */
42
+ const CANONICAL_HOOK_EVENTS = [
43
+ 'PreToolUse',
44
+ 'PostToolUse',
45
+ 'SubagentStart',
46
+ 'SubagentEnd',
47
+ 'PreModel',
48
+ 'PostModel',
49
+ 'SessionStart',
50
+ 'SessionEnd',
51
+ 'Notification',
52
+ 'Stop',
53
+ 'UserPrompt',
54
+ 'AssistantMessage',
55
+ 'ToolResult',
56
+ 'Error',
57
+ 'PreCompact',
58
+ 'PostCompact',
59
+ ];
60
+ /**
61
+ * Known provider IDs paired with their display names.
62
+ *
63
+ * Order matches the canonical 9-provider list. `"shared"` is excluded — it is
64
+ * an internal utilities directory, not a provider adapter.
65
+ */
66
+ const KNOWN_PROVIDERS = [
67
+ { id: 'claude-code', displayName: 'Claude Code' },
68
+ { id: 'claude-sdk', displayName: 'Claude SDK' },
69
+ { id: 'codex', displayName: 'OpenAI Codex' },
70
+ { id: 'cursor', displayName: 'Cursor' },
71
+ { id: 'gemini-cli', displayName: 'Gemini CLI' },
72
+ { id: 'kimi', displayName: 'Kimi' },
73
+ { id: 'openai-sdk', displayName: 'OpenAI Agents SDK' },
74
+ { id: 'opencode', displayName: 'OpenCode' },
75
+ { id: 'pi', displayName: 'Pi Coding Agent' },
76
+ ];
77
+ // ---------------------------------------------------------------------------
78
+ // Internal helpers
79
+ // ---------------------------------------------------------------------------
80
+ /**
81
+ * Resolve the absolute path to `packages/adapters/src/providers/`.
82
+ *
83
+ * Navigates from the compiled output directory (`dist/registry/`) up through
84
+ * the monorepo to reach the adapters package source.
85
+ *
86
+ * @returns Absolute path to the providers directory.
87
+ */
88
+ function resolveProvidersDir() {
89
+ // dist/registry/ → dist/ → packages/cleo-os/ → packages/ → monorepo root
90
+ const monorepoRoot = join(__dirname, '..', '..', '..', '..', '..');
91
+ return join(monorepoRoot, 'packages', 'adapters', 'src', 'providers');
92
+ }
93
+ /**
94
+ * Count canonical hook event names declared in a `hooks.ts` file.
95
+ *
96
+ * Reads the file as text and scans for occurrences of known CAAMP event name
97
+ * identifiers. The count is a lower-bound estimate — it does not parse the
98
+ * TypeScript AST.
99
+ *
100
+ * @param hooksPath - Absolute path to `hooks.ts`.
101
+ * @returns Count of recognised hook event names (0 if file unreadable).
102
+ */
103
+ async function countHookDeclarations(hooksPath) {
104
+ try {
105
+ const source = await readFile(hooksPath, 'utf-8');
106
+ let count = 0;
107
+ for (const event of CANONICAL_HOOK_EVENTS) {
108
+ // Match the event name as a standalone word to avoid false positives
109
+ // e.g. "Stop" should not match "StopEvent"
110
+ const pattern = new RegExp(`\\b${event}\\b`);
111
+ if (pattern.test(source)) {
112
+ count++;
113
+ }
114
+ }
115
+ return count;
116
+ }
117
+ catch {
118
+ return 0;
119
+ }
120
+ }
121
+ /**
122
+ * Build a single `ProviderMatrixRow` by inspecting the provider's directory.
123
+ *
124
+ * @param providerId - Canonical provider ID (e.g. `"claude-code"`).
125
+ * @param displayName - Human-readable display name.
126
+ * @param providersDir - Absolute path to `packages/adapters/src/providers/`.
127
+ * @returns Populated matrix row.
128
+ */
129
+ async function buildRow(providerId, displayName, providersDir) {
130
+ const providerDir = join(providersDir, providerId);
131
+ const installed = existsSync(providerDir);
132
+ if (!installed) {
133
+ return {
134
+ providerId,
135
+ displayName,
136
+ installed: false,
137
+ spawnImplemented: false,
138
+ hookSupport: 0,
139
+ adapterClass: ADAPTER_CLASS,
140
+ };
141
+ }
142
+ const spawnPath = join(providerDir, 'spawn.ts');
143
+ const hooksPath = join(providerDir, 'hooks.ts');
144
+ const spawnImplemented = existsSync(spawnPath);
145
+ const hookSupport = existsSync(hooksPath) ? await countHookDeclarations(hooksPath) : 0;
146
+ return {
147
+ providerId,
148
+ displayName,
149
+ installed: true,
150
+ spawnImplemented,
151
+ hookSupport,
152
+ adapterClass: ADAPTER_CLASS,
153
+ };
154
+ }
155
+ // ---------------------------------------------------------------------------
156
+ // ProviderMatrix
157
+ // ---------------------------------------------------------------------------
158
+ /**
159
+ * Read-only health view of all 9 CLEO provider adapters.
160
+ *
161
+ * Inspects the `packages/adapters/src/providers/` directory tree to produce
162
+ * a structured matrix of adapter installation state and feature completeness.
163
+ * All operations are read-only; no files are created or modified.
164
+ *
165
+ * @example
166
+ * ```ts
167
+ * const matrix = new ProviderMatrix();
168
+ * const rows = await matrix.getMatrix();
169
+ * const ready = rows.filter((r) => r.installed && r.spawnImplemented);
170
+ * console.log(ready.length, 'providers ready to spawn agents');
171
+ * ```
172
+ */
173
+ export class ProviderMatrix {
174
+ providersDir;
175
+ /**
176
+ * Construct a `ProviderMatrix`.
177
+ *
178
+ * @param providersDir - Override the resolved providers directory path.
179
+ * Primarily for testing. Defaults to the monorepo-relative path.
180
+ */
181
+ constructor(providersDir) {
182
+ this.providersDir = providersDir ?? resolveProvidersDir();
183
+ }
184
+ /**
185
+ * Scan all known providers and return their matrix rows.
186
+ *
187
+ * Results are returned in the canonical provider order defined by
188
+ * `KNOWN_PROVIDERS`. Rows are computed concurrently for performance.
189
+ *
190
+ * @returns Array of {@link ProviderMatrixRow} — one per known provider.
191
+ */
192
+ async getMatrix() {
193
+ const rows = await Promise.all(KNOWN_PROVIDERS.map(({ id, displayName }) => buildRow(id, displayName, this.providersDir)));
194
+ return rows;
195
+ }
196
+ /**
197
+ * List provider IDs discovered under the providers directory.
198
+ *
199
+ * Returns all subdirectory names found at `packages/adapters/src/providers/`,
200
+ * including any that are not in the canonical `KNOWN_PROVIDERS` list. Useful
201
+ * for detecting community-contributed or experimental adapters.
202
+ *
203
+ * @returns Array of directory names (provider IDs) present on disk.
204
+ */
205
+ async listInstalledProviderIds() {
206
+ if (!existsSync(this.providersDir)) {
207
+ return [];
208
+ }
209
+ try {
210
+ const entries = await readdir(this.providersDir, { withFileTypes: true });
211
+ return entries.filter((e) => e.isDirectory()).map((e) => e.name);
212
+ }
213
+ catch {
214
+ return [];
215
+ }
216
+ }
217
+ }
218
+ //# sourceMappingURL=provider-matrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-matrix.js","sourceRoot":"","sources":["../../src/registry/provider-matrix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AA6C1D,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,aAAa,GAAG,qBAA8B,CAAC;AAErD;;;;;GAKG;AACH,MAAM,qBAAqB,GAA0B;IACnD,YAAY;IACZ,aAAa;IACb,eAAe;IACf,aAAa;IACb,UAAU;IACV,WAAW;IACX,cAAc;IACd,YAAY;IACZ,cAAc;IACd,MAAM;IACN,YAAY;IACZ,kBAAkB;IAClB,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,aAAa;CACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,eAAe,GAAuD;IAC1E,EAAE,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE;IACjD,EAAE,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE;IAC/C,EAAE,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE;IAC5C,EAAE,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE;IACvC,EAAE,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE;IAC/C,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE;I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,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YACnC,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YAC1E,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACnE,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CleoOS agent monitor — agent activity TUI + Circle of Ten status.
2
+ * CleoOS agent monitor — agent activity TUI + Circle of Eleven status.
3
3
  *
4
4
  * CANONICAL LOCATION: `packages/cleo-os/extensions/cleo-agent-monitor.ts`
5
5
  *
@@ -9,7 +9,7 @@
9
9
  * T442 deliverables:
10
10
  * - `/cleo:agents` command: shows current agent activity in a TUI panel
11
11
  * - `before_agent_start` hook: tracks agent spawns with tier-aware prefixes
12
- * - `/cleo:circle` command: renders Circle of Ten status from CLEO CLI data
12
+ * - `/cleo:circle` command: renders Circle of Eleven status from CLEO CLI data
13
13
  *
14
14
  * Requirements:
15
15
  * - Pi coding agent runtime (`@mariozechner/pi-coding-agent`)
@@ -97,7 +97,7 @@ interface SessionData {
97
97
  focusChanges?: number;
98
98
  }
99
99
  /**
100
- * Combined data for Circle of Ten rendering.
100
+ * Combined data for Circle of Eleven rendering.
101
101
  *
102
102
  * Merges dashboard data, session data, and any in-memory
103
103
  * extension state (e.g. CANT bundle counts from the bridge).
@@ -111,7 +111,7 @@ interface CircleData {
111
111
  cantAgents?: number;
112
112
  }
113
113
  /**
114
- * Build the Circle of Ten status display lines.
114
+ * Build the Circle of Eleven status display lines.
115
115
  *
116
116
  * Each Circle aspect is shown with a filled (active) or hollow (inactive)
117
117
  * dot and a brief status summary. Data is wired from live CLI sources
@@ -132,7 +132,7 @@ export declare function buildCircleOfTenStatus(data: CircleData): string[];
132
132
  * Pi extension factory for the CleoOS agent monitor.
133
133
  *
134
134
  * Registers agent activity tracking, the `/cleo:agents` command, and the
135
- * `/cleo:circle` Circle of Ten status command.
135
+ * `/cleo:circle` Circle of Eleven status command.
136
136
  *
137
137
  * @param pi - The Pi extension API instance.
138
138
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CleoOS agent monitor — agent activity TUI + Circle of Ten status.
2
+ * CleoOS agent monitor — agent activity TUI + Circle of Eleven status.
3
3
  *
4
4
  * CANONICAL LOCATION: `packages/cleo-os/extensions/cleo-agent-monitor.ts`
5
5
  *
@@ -9,7 +9,7 @@
9
9
  * T442 deliverables:
10
10
  * - `/cleo:agents` command: shows current agent activity in a TUI panel
11
11
  * - `before_agent_start` hook: tracks agent spawns with tier-aware prefixes
12
- * - `/cleo:circle` command: renders Circle of Ten status from CLEO CLI data
12
+ * - `/cleo:circle` command: renders Circle of Eleven status from CLEO CLI data
13
13
  *
14
14
  * Requirements:
15
15
  * - Pi coding agent runtime (`@mariozechner/pi-coding-agent`)
@@ -105,7 +105,7 @@ function renderAgentWidget(ctx) {
105
105
  ctx.ui.setWidget(WIDGET_KEY, lines, { placement: "belowEditor" });
106
106
  }
107
107
  /**
108
- * Parse `cleo dash --json` output for Circle of Ten status data.
108
+ * Parse `cleo dash --json` output for Circle of Eleven status data.
109
109
  *
110
110
  * Extracts task summary counts, blocked/high-priority stats, and top labels.
111
111
  * Best-effort: returns empty object on any parse failure.
@@ -190,7 +190,7 @@ function parseSessionOutput(output) {
190
190
  }
191
191
  }
192
192
  /**
193
- * Build the Circle of Ten status display lines.
193
+ * Build the Circle of Eleven status display lines.
194
194
  *
195
195
  * Each Circle aspect is shown with a filled (active) or hollow (inactive)
196
196
  * dot and a brief status summary. Data is wired from live CLI sources
@@ -264,7 +264,7 @@ export function buildCircleOfTenStatus(data) {
264
264
  : null;
265
265
  const lines = [
266
266
  "",
267
- bold(accentPrimary(" The Circle of Ten")),
267
+ bold(accentPrimary(" The Circle of Eleven")),
268
268
  textSecondary(" " + LINE_HORIZONTAL.repeat(36)),
269
269
  ` ${bold("Smiths")} ${textSecondary("(tasks)")} ${smithsDot} ${smithsDetail}`,
270
270
  ` ${bold("Weavers")} ${textSecondary("(pipeline)")} ${weaversDot} ${weaversDetail}`,
@@ -291,7 +291,7 @@ export function buildCircleOfTenStatus(data) {
291
291
  * Pi extension factory for the CleoOS agent monitor.
292
292
  *
293
293
  * Registers agent activity tracking, the `/cleo:agents` command, and the
294
- * `/cleo:circle` Circle of Ten status command.
294
+ * `/cleo:circle` Circle of Eleven status command.
295
295
  *
296
296
  * @param pi - The Pi extension API instance.
297
297
  */
@@ -330,7 +330,7 @@ export default function (pi) {
330
330
  role,
331
331
  action: "spawned",
332
332
  });
333
- // Track unique agents seen for Circle of Ten Artificers zone
333
+ // Track unique agents seen for Circle of Eleven Artificers zone
334
334
  cachedCantAgents = activities.length;
335
335
  renderAgentWidget(ctx);
336
336
  // Return empty object (do not modify system prompt)
@@ -371,10 +371,10 @@ export default function (pi) {
371
371
  },
372
372
  });
373
373
  // -------------------------------------------------------------------------
374
- // Command: /cleo:circle — Circle of Ten status
374
+ // Command: /cleo:circle — Circle of Eleven status
375
375
  // -------------------------------------------------------------------------
376
376
  pi.registerCommand("cleo:circle", {
377
- description: "Show Circle of Ten operational status from CLEO CLI",
377
+ description: "Show Circle of Eleven operational status from CLEO CLI",
378
378
  handler: async (_args, ctx) => {
379
379
  let dashData = {};
380
380
  let sessionData = {};
@@ -407,7 +407,7 @@ export default function (pi) {
407
407
  display: true,
408
408
  }, { triggerTurn: false });
409
409
  if (ctx.hasUI) {
410
- ctx.ui.notify("Circle of Ten status", "info");
410
+ ctx.ui.notify("Circle of Eleven status", "info");
411
411
  }
412
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0E;YAC1E,0EAA0E;YAC1E,MAAM,UAAU,GAAe;gBAC7B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,WAAW;gBACpB,SAAS,EAAE,eAAe;gBAC1B,UAAU,EAAE,gBAAgB;aAC7B,CAAC;YAEF,MAAM,KAAK,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;YAEjD,EAAE,CAAC,WAAW,CACZ;gBACE,UAAU,EAAE,oBAAoB;gBAChC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;gBACzB,OAAO,EAAE,IAAI;aACd,EACD,EAAE,WAAW,EAAE,KAAK,EAAE,CACvB,CAAC;YAEF,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;gBACd,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;KACF,CAAC,CAAC;IAEH,4EAA4E;IAC5E,gCAAgC;IAChC,4EAA4E;IAC5E,EAAE,CAAC,EAAE,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;QACnC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;QACtB,eAAe,GAAG,CAAC,CAAC;QACpB,gBAAgB,GAAG,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CleoOS agent monitor — agent activity TUI + Circle of Ten status.
2
+ * CleoOS agent monitor — agent activity TUI + Circle of Eleven status.
3
3
  *
4
4
  * CANONICAL LOCATION: `packages/cleo-os/extensions/cleo-agent-monitor.ts`
5
5
  *
@@ -9,7 +9,7 @@
9
9
  * T442 deliverables:
10
10
  * - `/cleo:agents` command: shows current agent activity in a TUI panel
11
11
  * - `before_agent_start` hook: tracks agent spawns with tier-aware prefixes
12
- * - `/cleo:circle` command: renders Circle of Ten status from CLEO CLI data
12
+ * - `/cleo:circle` command: renders Circle of Eleven status from CLEO CLI data
13
13
  *
14
14
  * Requirements:
15
15
  * - Pi coding agent runtime (`@mariozechner/pi-coding-agent`)
@@ -51,7 +51,7 @@ const execFileAsync = promisify(execFile);
51
51
  // ANSI color helpers — imported from shared tui-theme.ts
52
52
  // ============================================================================
53
53
  // All styling functions come from tui-theme.ts. The mapping to design tokens:
54
- // accentPrimary → #a855f7 (ANSI 135) — headers, Circle of Ten title
54
+ // accentPrimary → #a855f7 (ANSI 135) — headers, Circle of Eleven title
55
55
  // accentSuccess → #22c55e (ANSI 35) — active dots, orchestrator [O]
56
56
  // accentWarning → #f59e0b (ANSI 214) — paused dots, lead [L]
57
57
  // accentError → #ef4444 (ANSI 196) — error dots, failed states
@@ -168,7 +168,7 @@ function renderAgentWidget(ctx: ExtensionContext): void {
168
168
  }
169
169
 
170
170
  // ============================================================================
171
- // Circle of Ten status
171
+ // Circle of Eleven status
172
172
  // ============================================================================
173
173
 
174
174
  /**
@@ -215,7 +215,7 @@ interface SessionData {
215
215
  }
216
216
 
217
217
  /**
218
- * Combined data for Circle of Ten rendering.
218
+ * Combined data for Circle of Eleven rendering.
219
219
  *
220
220
  * Merges dashboard data, session data, and any in-memory
221
221
  * extension state (e.g. CANT bundle counts from the bridge).
@@ -230,7 +230,7 @@ interface CircleData {
230
230
  }
231
231
 
232
232
  /**
233
- * Parse `cleo dash --json` output for Circle of Ten status data.
233
+ * Parse `cleo dash --json` output for Circle of Eleven status data.
234
234
  *
235
235
  * Extracts task summary counts, blocked/high-priority stats, and top labels.
236
236
  * Best-effort: returns empty object on any parse failure.
@@ -324,7 +324,7 @@ function parseSessionOutput(output: string): SessionData {
324
324
  }
325
325
 
326
326
  /**
327
- * Build the Circle of Ten status display lines.
327
+ * Build the Circle of Eleven status display lines.
328
328
  *
329
329
  * Each Circle aspect is shown with a filled (active) or hollow (inactive)
330
330
  * dot and a brief status summary. Data is wired from live CLI sources
@@ -411,7 +411,7 @@ export function buildCircleOfTenStatus(data: CircleData): string[] {
411
411
 
412
412
  const lines = [
413
413
  "",
414
- bold(accentPrimary(" The Circle of Ten")),
414
+ bold(accentPrimary(" The Circle of Eleven")),
415
415
  textSecondary(" " + LINE_HORIZONTAL.repeat(36)),
416
416
  ` ${bold("Smiths")} ${textSecondary("(tasks)")} ${smithsDot} ${smithsDetail}`,
417
417
  ` ${bold("Weavers")} ${textSecondary("(pipeline)")} ${weaversDot} ${weaversDetail}`,
@@ -443,7 +443,7 @@ export function buildCircleOfTenStatus(data: CircleData): string[] {
443
443
  * Pi extension factory for the CleoOS agent monitor.
444
444
  *
445
445
  * Registers agent activity tracking, the `/cleo:agents` command, and the
446
- * `/cleo:circle` Circle of Ten status command.
446
+ * `/cleo:circle` Circle of Eleven status command.
447
447
  *
448
448
  * @param pi - The Pi extension API instance.
449
449
  */
@@ -498,7 +498,7 @@ export default function (pi: ExtensionAPI): void {
498
498
  action: "spawned",
499
499
  });
500
500
 
501
- // Track unique agents seen for Circle of Ten Artificers zone
501
+ // Track unique agents seen for Circle of Eleven Artificers zone
502
502
  cachedCantAgents = activities.length;
503
503
 
504
504
  renderAgentWidget(ctx);
@@ -550,10 +550,10 @@ export default function (pi: ExtensionAPI): void {
550
550
  });
551
551
 
552
552
  // -------------------------------------------------------------------------
553
- // Command: /cleo:circle — Circle of Ten status
553
+ // Command: /cleo:circle — Circle of Eleven status
554
554
  // -------------------------------------------------------------------------
555
555
  pi.registerCommand("cleo:circle", {
556
- description: "Show Circle of Ten operational status from CLEO CLI",
556
+ description: "Show Circle of Eleven operational status from CLEO CLI",
557
557
  handler: async (_args: string, ctx: ExtensionCommandContext) => {
558
558
  let dashData: DashData = {};
559
559
  let sessionData: SessionData = {};
@@ -595,7 +595,7 @@ export default function (pi: ExtensionAPI): void {
595
595
  );
596
596
 
597
597
  if (ctx.hasUI) {
598
- ctx.ui.notify("Circle of Ten status", "info");
598
+ ctx.ui.notify("Circle of Eleven status", "info");
599
599
  }
600
600
  },
601
601
  });
@@ -87,7 +87,7 @@ export declare const CODE_BORDER_SUBTLE = 236;
87
87
  export declare const CODE_BORDER_FOCUS = 240;
88
88
  /**
89
89
  * Blue accent for worker tier badges (not in the design palette but used
90
- * consistently in the Circle of Ten worker display).
90
+ * consistently in the Circle of Eleven worker display).
91
91
  * ANSI 256-color 75 (#5fafff).
92
92
  */
93
93
  export declare const CODE_TIER_WORKER = 75;
@@ -103,7 +103,7 @@ export declare function fg256(text: string, code: number): string;
103
103
  * Apply `accent-primary` (purple, #a855f7) foreground to text.
104
104
  *
105
105
  * Used for: Pi AI branding, active tab indicators, focus borders,
106
- * Circle of Ten header, banner chrome.
106
+ * Circle of Eleven header, banner chrome.
107
107
  *
108
108
  * @param text - The text to style.
109
109
  * @returns Purple ANSI text.
@@ -169,7 +169,7 @@ export declare function textTertiary(text: string): string;
169
169
  /**
170
170
  * Apply worker tier blue accent foreground to text.
171
171
  *
172
- * Used for: worker agent tier prefix `[W]` in the Circle of Ten display.
172
+ * Used for: worker agent tier prefix `[W]` in the Circle of Eleven display.
173
173
  *
174
174
  * @param text - The text to style.
175
175
  * @returns Blue ANSI text.
@@ -95,7 +95,7 @@ export const CODE_BORDER_SUBTLE = 236;
95
95
  export const CODE_BORDER_FOCUS = 240;
96
96
  /**
97
97
  * Blue accent for worker tier badges (not in the design palette but used
98
- * consistently in the Circle of Ten worker display).
98
+ * consistently in the Circle of Eleven worker display).
99
99
  * ANSI 256-color 75 (#5fafff).
100
100
  */
101
101
  export const CODE_TIER_WORKER = 75;
@@ -116,7 +116,7 @@ export function fg256(text, code) {
116
116
  * Apply `accent-primary` (purple, #a855f7) foreground to text.
117
117
  *
118
118
  * Used for: Pi AI branding, active tab indicators, focus borders,
119
- * Circle of Ten header, banner chrome.
119
+ * Circle of Eleven header, banner chrome.
120
120
  *
121
121
  * @param text - The text to style.
122
122
  * @returns Purple ANSI text.
@@ -196,7 +196,7 @@ export function textTertiary(text) {
196
196
  /**
197
197
  * Apply worker tier blue accent foreground to text.
198
198
  *
199
- * Used for: worker agent tier prefix `[W]` in the Circle of Ten display.
199
+ * Used for: worker agent tier prefix `[W]` in the Circle of Eleven display.
200
200
  *
201
201
  * @param text - The text to style.
202
202
  * @returns Blue ANSI text.
@@ -113,7 +113,7 @@ export const CODE_BORDER_FOCUS = 240;
113
113
 
114
114
  /**
115
115
  * Blue accent for worker tier badges (not in the design palette but used
116
- * consistently in the Circle of Ten worker display).
116
+ * consistently in the Circle of Eleven worker display).
117
117
  * ANSI 256-color 75 (#5fafff).
118
118
  */
119
119
  export const CODE_TIER_WORKER = 75;
@@ -137,7 +137,7 @@ export function fg256(text: string, code: number): string {
137
137
  * Apply `accent-primary` (purple, #a855f7) foreground to text.
138
138
  *
139
139
  * Used for: Pi AI branding, active tab indicators, focus borders,
140
- * Circle of Ten header, banner chrome.
140
+ * Circle of Eleven header, banner chrome.
141
141
  *
142
142
  * @param text - The text to style.
143
143
  * @returns Purple ANSI text.
@@ -224,7 +224,7 @@ export function textTertiary(text: string): string {
224
224
  /**
225
225
  * Apply worker tier blue accent foreground to text.
226
226
  *
227
- * Used for: worker agent tier prefix `[W]` in the Circle of Ten display.
227
+ * Used for: worker agent tier prefix `[W]` in the Circle of Eleven display.
228
228
  *
229
229
  * @param text - The text to style.
230
230
  * @returns Blue ANSI text.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/cleo-os",
3
- "version": "2026.4.63",
3
+ "version": "2026.4.65",
4
4
  "description": "CleoOS — the batteries-included agentic development environment wrapping Pi",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",
@@ -12,9 +12,9 @@
12
12
  "dependencies": {
13
13
  "@mariozechner/pi-coding-agent": ">=0.60.0",
14
14
  "@sinclair/typebox": "^0.34.49",
15
- "@cleocode/cant": "2026.4.63",
16
- "@cleocode/core": "2026.4.63",
17
- "@cleocode/cleo": "2026.4.63"
15
+ "@cleocode/cleo": "2026.4.65",
16
+ "@cleocode/core": "2026.4.65",
17
+ "@cleocode/cant": "2026.4.65"
18
18
  },
19
19
  "devDependencies": {
20
20
  "typescript": "^6.0.2",