@cleocode/cleo-os 2026.4.36 → 2026.4.38
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/cli.d.ts +4 -15
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +20 -41
- package/dist/cli.js.map +1 -1
- package/extensions/cleo-startup.d.ts +5 -79
- package/extensions/cleo-startup.d.ts.map +1 -1
- package/extensions/cleo-startup.js +66 -335
- package/extensions/cleo-startup.js.map +1 -1
- package/extensions/cleo-startup.ts +94 -463
- package/package.json +3 -3
package/dist/cli.d.ts
CHANGED
|
@@ -2,22 +2,11 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* CleoOS launcher — the batteries-included agentic development environment.
|
|
4
4
|
*
|
|
5
|
-
* Wraps Pi's `main()` entry point with
|
|
6
|
-
* Pi stays upstream (ULTRAPLAN L1). This is a thin
|
|
7
|
-
* CleoOS extensions into Pi's CLI argument list.
|
|
5
|
+
* Wraps Pi's `main()` entry point with the cleo-cant-bridge pre-loaded
|
|
6
|
+
* as an extension. Pi stays upstream (ULTRAPLAN L1). This is a thin
|
|
7
|
+
* launcher that injects CleoOS extensions into Pi's CLI argument list.
|
|
8
8
|
*
|
|
9
|
-
* Usage: `cleoos [pi-args...]` — launches Pi with
|
|
10
|
-
*
|
|
11
|
-
* Extension loading order is intentional (see `CANONICAL_EXTENSIONS`):
|
|
12
|
-
* 1. cleo-startup — branded banner + Hearth commands (aboveEditor)
|
|
13
|
-
* 2. cleo-cant-bridge — CANT DSL compilation + system prompt injection
|
|
14
|
-
* 3. cleo-hooks-bridge — Pi event → CAAMP hook translation
|
|
15
|
-
* 4. cleo-agent-monitor — agent activity TUI + Circle of Ten
|
|
16
|
-
* 5. cleo-chatroom — inter-agent messaging tools
|
|
17
|
-
*
|
|
18
|
-
* Unknown `.js` files placed in the extensions directory are ignored to
|
|
19
|
-
* keep the load set deterministic (no accidental loading of type declarations
|
|
20
|
-
* or helper modules).
|
|
9
|
+
* Usage: `cleoos [pi-args...]` — launches Pi with CANT bridge extension.
|
|
21
10
|
*
|
|
22
11
|
* @packageDocumentation
|
|
23
12
|
*/
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG"}
|
package/dist/cli.js
CHANGED
|
@@ -2,62 +2,41 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* CleoOS launcher — the batteries-included agentic development environment.
|
|
4
4
|
*
|
|
5
|
-
* Wraps Pi's `main()` entry point with
|
|
6
|
-
* Pi stays upstream (ULTRAPLAN L1). This is a thin
|
|
7
|
-
* CleoOS extensions into Pi's CLI argument list.
|
|
5
|
+
* Wraps Pi's `main()` entry point with the cleo-cant-bridge pre-loaded
|
|
6
|
+
* as an extension. Pi stays upstream (ULTRAPLAN L1). This is a thin
|
|
7
|
+
* launcher that injects CleoOS extensions into Pi's CLI argument list.
|
|
8
8
|
*
|
|
9
|
-
* Usage: `cleoos [pi-args...]` — launches Pi with
|
|
10
|
-
*
|
|
11
|
-
* Extension loading order is intentional (see `CANONICAL_EXTENSIONS`):
|
|
12
|
-
* 1. cleo-startup — branded banner + Hearth commands (aboveEditor)
|
|
13
|
-
* 2. cleo-cant-bridge — CANT DSL compilation + system prompt injection
|
|
14
|
-
* 3. cleo-hooks-bridge — Pi event → CAAMP hook translation
|
|
15
|
-
* 4. cleo-agent-monitor — agent activity TUI + Circle of Ten
|
|
16
|
-
* 5. cleo-chatroom — inter-agent messaging tools
|
|
17
|
-
*
|
|
18
|
-
* Unknown `.js` files placed in the extensions directory are ignored to
|
|
19
|
-
* keep the load set deterministic (no accidental loading of type declarations
|
|
20
|
-
* or helper modules).
|
|
9
|
+
* Usage: `cleoos [pi-args...]` — launches Pi with CANT bridge extension.
|
|
21
10
|
*
|
|
22
11
|
* @packageDocumentation
|
|
23
12
|
*/
|
|
24
13
|
import { existsSync } from 'node:fs';
|
|
25
14
|
import { join } from 'node:path';
|
|
26
15
|
import { resolveCleoOsPaths } from './xdg.js';
|
|
27
|
-
/**
|
|
28
|
-
* Canonical extension filenames in load order.
|
|
29
|
-
*
|
|
30
|
-
* Order matters:
|
|
31
|
-
* - cleo-startup must be first so the welcome banner appears before any
|
|
32
|
-
* status bar entries set by subsequent extensions.
|
|
33
|
-
* - cleo-hooks-bridge after cleo-cant-bridge so CAAMP hook observations
|
|
34
|
-
* don't interfere with CANT prompt compilation.
|
|
35
|
-
* - cleo-chatroom last since it only registers tools (no startup UI).
|
|
36
|
-
*/
|
|
37
|
-
const CANONICAL_EXTENSIONS = [
|
|
38
|
-
'cleo-startup.js',
|
|
39
|
-
'cleo-cant-bridge.js',
|
|
40
|
-
'cleo-hooks-bridge.js',
|
|
41
|
-
'cleo-agent-monitor.js',
|
|
42
|
-
'cleo-chatroom.js',
|
|
43
|
-
];
|
|
44
16
|
/**
|
|
45
17
|
* Collect CleoOS extension paths that exist on disk.
|
|
46
18
|
*
|
|
47
|
-
* Resolves the
|
|
48
|
-
* Only returns paths for extensions that actually exist on the filesystem
|
|
49
|
-
* missing extensions are silently skipped rather than causing a startup error.
|
|
19
|
+
* Resolves the CANT bridge extension from the XDG data directory.
|
|
20
|
+
* Only returns paths for extensions that actually exist on the filesystem.
|
|
50
21
|
*
|
|
51
|
-
* @returns Array of absolute extension file paths
|
|
22
|
+
* @returns Array of absolute extension file paths.
|
|
52
23
|
*/
|
|
53
24
|
function collectExtensionPaths() {
|
|
54
25
|
const paths = resolveCleoOsPaths();
|
|
55
26
|
const extensions = [];
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
27
|
+
// cleo-startup: branded session banner + memory bridge display (load first
|
|
28
|
+
// so the welcome panel appears before CANT bridge status bar entries)
|
|
29
|
+
const startupPath = join(paths.extensions, 'cleo-startup.js');
|
|
30
|
+
if (existsSync(startupPath)) {
|
|
31
|
+
extensions.push(startupPath);
|
|
32
|
+
}
|
|
33
|
+
const bridgePath = join(paths.extensions, 'cleo-cant-bridge.js');
|
|
34
|
+
if (existsSync(bridgePath)) {
|
|
35
|
+
extensions.push(bridgePath);
|
|
36
|
+
}
|
|
37
|
+
const monitorPath = join(paths.extensions, 'cleo-agent-monitor.js');
|
|
38
|
+
if (existsSync(monitorPath)) {
|
|
39
|
+
extensions.push(monitorPath);
|
|
61
40
|
}
|
|
62
41
|
return extensions;
|
|
63
42
|
}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;;;;GAOG;AACH,SAAS,qBAAqB;IAC5B,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,2EAA2E;IAC3E,sEAAsE;IACtE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAC9D,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC5B,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/B,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;IACjE,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC3B,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,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACjF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -7,19 +7,10 @@
|
|
|
7
7
|
* Loaded by: Pi via `--extension <path>` injected by CleoOS cli.ts
|
|
8
8
|
*
|
|
9
9
|
* On `session_start`, displays a branded CleoOS welcome panel with:
|
|
10
|
-
* - ASCII art CLEO logo
|
|
11
10
|
* - Project name and CLEO task summary (pending / active / done)
|
|
12
|
-
* - Last 3 brain decisions ("what we decided recently")
|
|
13
|
-
* - Memory bridge summary (total entries, % verified, top 3 cited)
|
|
14
|
-
* - Quick action hints based on current state
|
|
15
11
|
* - Current focused task (if any)
|
|
16
12
|
* - Last session handoff note from the memory bridge
|
|
17
13
|
*
|
|
18
|
-
* Also registers:
|
|
19
|
-
* - `/cleo:status` — on-demand project status refresh
|
|
20
|
-
* - `/cleo:focus <task-id>` — focus on a task
|
|
21
|
-
* - `/cleo:end-session [note]` — end the current session
|
|
22
|
-
*
|
|
23
14
|
* All data is fetched via the `cleo` CLI (best-effort). If any call
|
|
24
15
|
* fails, the banner degrades gracefully — Pi is never crashed.
|
|
25
16
|
*
|
|
@@ -81,33 +72,6 @@ interface CurrentTask {
|
|
|
81
72
|
/** Task status. */
|
|
82
73
|
status: string;
|
|
83
74
|
}
|
|
84
|
-
/**
|
|
85
|
-
* A single decision entry from `cleo memory decision-find --json`.
|
|
86
|
-
*/
|
|
87
|
-
interface DecisionEntry {
|
|
88
|
-
/** Short decision ID. */
|
|
89
|
-
id: string;
|
|
90
|
-
/** Decision title or summary text. */
|
|
91
|
-
title: string;
|
|
92
|
-
/** ISO date string. */
|
|
93
|
-
date: string;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Memory bridge statistics parsed from `.cleo/memory-bridge.md`.
|
|
97
|
-
*/
|
|
98
|
-
interface MemoryBridgeStats {
|
|
99
|
-
/** Total entry count found in memory bridge sections. */
|
|
100
|
-
totalEntries: number;
|
|
101
|
-
/** Top 3 cited items (label lines from the bridge). */
|
|
102
|
-
topThree: string[];
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Quick-action hints built from task/session state.
|
|
106
|
-
*/
|
|
107
|
-
interface QuickHints {
|
|
108
|
-
/** Array of short hint strings to display. */
|
|
109
|
-
hints: string[];
|
|
110
|
-
}
|
|
111
75
|
/**
|
|
112
76
|
* Parse task summary from `cleo dash --json` output.
|
|
113
77
|
*
|
|
@@ -132,36 +96,6 @@ export declare function parseSessionInfo(stdout: string): SessionInfo;
|
|
|
132
96
|
* @returns Parsed current task, or null if none active.
|
|
133
97
|
*/
|
|
134
98
|
export declare function parseCurrentTask(stdout: string): CurrentTask | null;
|
|
135
|
-
/**
|
|
136
|
-
* Parse the last 3 decisions from `cleo memory decision-find --json` output.
|
|
137
|
-
*
|
|
138
|
-
* @param stdout - Raw stdout from the CLI call.
|
|
139
|
-
* @returns Array of up to 3 decision entries.
|
|
140
|
-
*/
|
|
141
|
-
export declare function parseRecentDecisions(stdout: string): DecisionEntry[];
|
|
142
|
-
/**
|
|
143
|
-
* Parse memory bridge statistics from `.cleo/memory-bridge.md`.
|
|
144
|
-
*
|
|
145
|
-
* Counts total list items across all sections and extracts the
|
|
146
|
-
* top 3 cited items (items appearing in the "Recent Decisions" or
|
|
147
|
-
* "Key Learnings" sections).
|
|
148
|
-
*
|
|
149
|
-
* @param content - Raw memory-bridge.md content.
|
|
150
|
-
* @returns Memory bridge statistics.
|
|
151
|
-
*/
|
|
152
|
-
export declare function parseMemoryBridgeStats(content: string): MemoryBridgeStats;
|
|
153
|
-
/**
|
|
154
|
-
* Build quick-action hints based on current project state.
|
|
155
|
-
*
|
|
156
|
-
* Generates context-sensitive suggestions so the operator knows
|
|
157
|
-
* immediately what to do next without running extra commands.
|
|
158
|
-
*
|
|
159
|
-
* @param tasks - Task summary counts.
|
|
160
|
-
* @param session - Current session state.
|
|
161
|
-
* @param currentTask - Currently focused task, or null.
|
|
162
|
-
* @returns Quick-action hints.
|
|
163
|
-
*/
|
|
164
|
-
export declare function buildQuickHints(tasks: TaskSummary, session: SessionInfo, currentTask: CurrentTask | null): QuickHints;
|
|
165
99
|
/**
|
|
166
100
|
* Read the last session handoff note from `.cleo/memory-bridge.md`.
|
|
167
101
|
*
|
|
@@ -176,12 +110,8 @@ export declare function readMemoryBridgeNote(projectDir: string): string | null;
|
|
|
176
110
|
* Build the full CleoOS startup banner.
|
|
177
111
|
*
|
|
178
112
|
* Renders a box-drawing widget with:
|
|
179
|
-
* - ASCII art CLEO logo
|
|
180
113
|
* - Branded header with forge icon
|
|
181
114
|
* - Task counts (active / pending / done / blocked)
|
|
182
|
-
* - Last 3 brain decisions
|
|
183
|
-
* - Memory bridge summary
|
|
184
|
-
* - Quick action hints
|
|
185
115
|
* - Current task title (if any)
|
|
186
116
|
* - Session info (name + ID)
|
|
187
117
|
* - Last session handoff note (from memory-bridge.md or session data)
|
|
@@ -191,12 +121,9 @@ export declare function readMemoryBridgeNote(projectDir: string): string | null;
|
|
|
191
121
|
* @param currentTask - Currently focused task, or null.
|
|
192
122
|
* @param handoffNote - Last session handoff note, or null.
|
|
193
123
|
* @param projectName - Project display name.
|
|
194
|
-
* @param decisions - Recent brain decisions (up to 3).
|
|
195
|
-
* @param memStats - Memory bridge statistics.
|
|
196
|
-
* @param hints - Quick-action hints.
|
|
197
124
|
* @returns Array of ANSI-styled banner lines.
|
|
198
125
|
*/
|
|
199
|
-
export declare function buildStartupBanner(tasks: TaskSummary, session: SessionInfo, currentTask: CurrentTask | null, handoffNote: string | null, projectName: string
|
|
126
|
+
export declare function buildStartupBanner(tasks: TaskSummary, session: SessionInfo, currentTask: CurrentTask | null, handoffNote: string | null, projectName: string): string[];
|
|
200
127
|
/**
|
|
201
128
|
* Detect the project name for display in the startup banner.
|
|
202
129
|
*
|
|
@@ -212,11 +139,10 @@ export declare function detectProjectName(projectDir: string): string;
|
|
|
212
139
|
/**
|
|
213
140
|
* Pi extension factory for the CleoOS branded startup experience.
|
|
214
141
|
*
|
|
215
|
-
* Registers:
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* - `/cleo:end-session [note]` — end the current session from inside Pi
|
|
142
|
+
* Registers a `session_start` handler that:
|
|
143
|
+
* 1. Fetches project, task, and session data via `cleo` CLI in parallel
|
|
144
|
+
* 2. Reads the memory-bridge.md handoff note
|
|
145
|
+
* 3. Renders the branded startup banner as a Pi UI widget
|
|
220
146
|
*
|
|
221
147
|
* All operations are best-effort — failures are silently swallowed so Pi
|
|
222
148
|
* is never blocked by CLEO unavailability.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cleo-startup.d.ts","sourceRoot":"","sources":["cleo-startup.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cleo-startup.d.ts","sourceRoot":"","sources":["cleo-startup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAMH,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,+BAA+B,CAAC;AA2BvC;;GAEG;AACH,UAAU,WAAW;IACnB,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,UAAU,WAAW;IACnB,6CAA6C;IAC7C,MAAM,EAAE,OAAO,CAAC;IAChB,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IA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