claude-simple 0.2.5 → 0.2.7
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/README.md +2 -0
- package/bin/edge-ctl.js +28 -6
- package/dist/app.0.2.7.min.js +1039 -0
- package/dist/index.html +2 -2
- package/dist/style.0.2.7.min.css +1598 -0
- package/package.json +1 -1
- package/public/agent-panel.js +245 -1
- package/public/api.js +2 -0
- package/public/chat.js +81 -11
- package/public/index.html +2 -2
- package/public/shell/dashboard.js +39 -10
- package/public/shell/layout.js +39 -9
- package/public/shell/session-list.js +22 -14
- package/public/shell/session-nav.js +18 -0
- package/public/shell/templates.js +27 -7
- package/public/shell.js +32 -1
- package/public/state.js +4 -6
- package/public/style.css +100 -6
- package/public/sw.js +2 -2
- package/public/terminal.js +77 -3
- package/src/agents/claude.js +1 -1
- package/src/agents/codex.js +1 -0
- package/src/agents/grok.js +3 -2
- package/src/agents/meta-agent.js +332 -1
- package/src/agents/sessions.js +106 -26
- package/src/app.js +88 -11
- package/dist/app.0.2.5.min.js +0 -953
- package/dist/style.0.2.5.min.css +0 -1504
package/README.md
CHANGED
|
@@ -213,6 +213,8 @@ Legacy Node hub: `npm run gateway` → `gateway.js` (prefer the Go binary).
|
|
|
213
213
|
| Codex | `codex exec --json` / `codex exec resume <id>` | thread_id | `~/.codex/sessions/**/rollout-*.jsonl` |
|
|
214
214
|
| Grok | `grok -p … --output-format streaming-json` | `--resume <id>` | `~/.grok/sessions/<cwd>/<id>/` |
|
|
215
215
|
|
|
216
|
+
The Memory tab lists files for the selected session's agent and loads their contents on click: Claude project memory, Codex account memory, or Grok session memory. Meta Agent can use `get_session_jsonl` to inspect a specific agent session's raw JSONL in bounded pages.
|
|
217
|
+
|
|
216
218
|
## Scripts
|
|
217
219
|
|
|
218
220
|
| Script | Description |
|
package/bin/edge-ctl.js
CHANGED
|
@@ -10,6 +10,7 @@ import { spawn, spawnSync } from 'child_process';
|
|
|
10
10
|
import fs from 'fs';
|
|
11
11
|
import os from 'os';
|
|
12
12
|
import path from 'path';
|
|
13
|
+
import { fileURLToPath } from 'url';
|
|
13
14
|
|
|
14
15
|
const LAUNCHD_LABEL = 'system/com.claude-simple.edge';
|
|
15
16
|
const LAUNCHD_PLIST = '/Library/LaunchDaemons/com.claude-simple.edge.plist';
|
|
@@ -63,15 +64,31 @@ function detectBackend() {
|
|
|
63
64
|
return null;
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
function isRoot() {
|
|
68
|
+
return typeof process.getuid === 'function' && process.getuid() === 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Re-exec this CLI via sudo so launchctl/systemctl can touch the system unit. */
|
|
72
|
+
function ensureRoot() {
|
|
73
|
+
if (isRoot()) return;
|
|
74
|
+
if (!hasCmd('sudo')) return;
|
|
75
|
+
const script = fileURLToPath(import.meta.url);
|
|
76
|
+
const args = process.argv.slice(2);
|
|
77
|
+
const candidates = ['/usr/local/bin/claude-edge', process.argv[1], script].filter(Boolean);
|
|
78
|
+
const seen = new Set();
|
|
79
|
+
for (const entry of candidates) {
|
|
80
|
+
const resolved = path.resolve(entry);
|
|
81
|
+
if (seen.has(resolved) || !fs.existsSync(resolved)) continue;
|
|
82
|
+
seen.add(resolved);
|
|
83
|
+
const r = spawnSync('sudo', ['-n', resolved, ...args], { stdio: 'inherit' });
|
|
84
|
+
if (r.status === 0) process.exit(0);
|
|
85
|
+
}
|
|
86
|
+
const r = spawnSync('sudo', [process.execPath, script, ...args], { stdio: 'inherit' });
|
|
87
|
+
process.exit(r.status ?? 1);
|
|
70
88
|
}
|
|
71
89
|
|
|
72
90
|
function runRoot(cmd, args, opts = {}) {
|
|
73
|
-
|
|
74
|
-
return run(t.cmd, t.args, opts);
|
|
91
|
+
return run(cmd, args, opts);
|
|
75
92
|
}
|
|
76
93
|
|
|
77
94
|
function fail(msg, extra) {
|
|
@@ -108,6 +125,7 @@ function tailFile(file, n) {
|
|
|
108
125
|
}
|
|
109
126
|
|
|
110
127
|
function cmdStatus(backend) {
|
|
128
|
+
ensureRoot();
|
|
111
129
|
if (backend === 'launchd') {
|
|
112
130
|
const r = runRoot('launchctl', ['print', LAUNCHD_LABEL]);
|
|
113
131
|
if (r.status !== 0) {
|
|
@@ -156,6 +174,7 @@ function cmdStatus(backend) {
|
|
|
156
174
|
}
|
|
157
175
|
|
|
158
176
|
function cmdStart(backend) {
|
|
177
|
+
ensureRoot();
|
|
159
178
|
if (backend === 'launchd') {
|
|
160
179
|
runRoot('launchctl', ['enable', LAUNCHD_LABEL]);
|
|
161
180
|
const loaded = runRoot('launchctl', ['print', LAUNCHD_LABEL]);
|
|
@@ -174,6 +193,7 @@ function cmdStart(backend) {
|
|
|
174
193
|
}
|
|
175
194
|
|
|
176
195
|
function cmdStop(backend) {
|
|
196
|
+
ensureRoot();
|
|
177
197
|
if (backend === 'launchd') {
|
|
178
198
|
runRoot('launchctl', ['disable', LAUNCHD_LABEL]);
|
|
179
199
|
runRoot('launchctl', ['bootout', LAUNCHD_LABEL]);
|
|
@@ -186,6 +206,7 @@ function cmdStop(backend) {
|
|
|
186
206
|
}
|
|
187
207
|
|
|
188
208
|
function cmdRestart(backend) {
|
|
209
|
+
ensureRoot();
|
|
189
210
|
if (backend === 'launchd') {
|
|
190
211
|
runRoot('launchctl', ['enable', LAUNCHD_LABEL]);
|
|
191
212
|
const loaded = runRoot('launchctl', ['print', LAUNCHD_LABEL]);
|
|
@@ -204,6 +225,7 @@ function cmdRestart(backend) {
|
|
|
204
225
|
}
|
|
205
226
|
|
|
206
227
|
function cmdLogs(backend, mode) {
|
|
228
|
+
if (backend === 'systemd') ensureRoot();
|
|
207
229
|
if (backend === 'launchd') {
|
|
208
230
|
if (mode === '-f' || mode === '--follow') {
|
|
209
231
|
const child = spawn('tail', ['-n', '50', '-F', MAC_OUT, MAC_ERR], { stdio: 'inherit' });
|