greprag 5.80.0 → 5.82.0
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/capture-manifest.js +2 -1
- package/dist/codex-fast-hook.js +6 -0
- package/dist/codex-steering.js +1 -1
- package/dist/commands/app-model.js +0 -1
- package/dist/commands/arm-reminder.js +9 -7
- package/dist/commands/collision-check.js +7 -6
- package/dist/commands/corpus/client.js +13 -3
- package/dist/commands/delivery-reminder.js +35 -14
- package/dist/commands/deploy-gate.js +55 -0
- package/dist/commands/deploy-lock.js +100 -0
- package/dist/commands/deploy-record.js +145 -0
- package/dist/commands/deploy-verify.js +111 -0
- package/dist/commands/inbox-primer-reminder.js +5 -5
- package/dist/commands/inbox-watch.js +2 -4
- package/dist/commands/init.js +82 -0
- package/dist/commands/load.js +40 -0
- package/dist/commands/loadout-reminder.js +1 -1
- package/dist/commands/merge-guard.js +419 -0
- package/dist/commands/merge-lock.js +176 -0
- package/dist/commands/parity-reminder.js +53 -0
- package/dist/commands/persona-reminder.js +11 -0
- package/dist/commands/persona.js +50 -0
- package/dist/commands/procedure.js +77 -6
- package/dist/commands/reminder-registry.js +21 -5
- package/dist/commands/repodoc.js +433 -0
- package/dist/commands/search.js +149 -0
- package/dist/commands/skillgain.js +33 -25
- package/dist/delivery-lifecycle.js +16 -1
- package/dist/deploy-gate.js +355 -0
- package/dist/deploy-locks.js +339 -0
- package/dist/deploy-verify.js +209 -0
- package/dist/env-redaction.js +157 -0
- package/dist/harness-limits.js +17 -0
- package/dist/hook-runtime.js +11 -1
- package/dist/hook.js +170 -88
- package/dist/index.js +593 -567
- package/dist/inline-atom-episode.js +15 -7
- package/dist/inline-atom.js +8 -2
- package/dist/native-skill-adoption.js +11 -0
- package/dist/native-skill-mirror.js +8 -1
- package/dist/node-identity.bundle.js +1166 -0
- package/dist/opencode-plugin.bundle.js +307 -119
- package/dist/procedure-enabled.js +55 -0
- package/dist/procedure-runtime.js +6 -0
- package/dist/procedure-scope.js +190 -0
- package/dist/procedure-watch.js +29 -16
- package/dist/procedure.js +111 -5
- package/dist/project-anchor.js +1 -14
- package/dist/reminder-injector.js +11 -10
- package/dist/repodoc-client.js +296 -0
- package/dist/session-id.js +7 -8
- package/dist/skill-landing.js +57 -2
- package/dist/skill-mirror-client.js +14 -0
- package/dist/skill-mirror-files.js +18 -0
- package/package.json +2 -2
- package/scripts/bundle-node-identity.mjs +47 -0
- package/skill/templates/chip-spawn.md +7 -1
- package/skill/templates/delivery.md +105 -0
- package/skill/templates/prompt-audit.md +196 -0
- package/skill/templates/skill-change.md +25 -2
- package/dist/assistant-doctrine.js +0 -85
- package/dist/commands/assistant-reminder.js +0 -19
- package/dist/commands/assistant.js +0 -95
package/dist/index.js
CHANGED
|
@@ -60,14 +60,20 @@ const load_1 = require("./commands/load");
|
|
|
60
60
|
const project_1 = require("./commands/project");
|
|
61
61
|
const procedure_1 = require("./commands/procedure");
|
|
62
62
|
const delivery_1 = require("./commands/delivery");
|
|
63
|
+
const deploy_gate_1 = require("./commands/deploy-gate");
|
|
64
|
+
const merge_lock_1 = require("./commands/merge-lock");
|
|
65
|
+
const deploy_lock_1 = require("./commands/deploy-lock");
|
|
66
|
+
const deploy_record_1 = require("./commands/deploy-record");
|
|
67
|
+
const deploy_verify_1 = require("./commands/deploy-verify");
|
|
63
68
|
const skillgain_1 = require("./commands/skillgain");
|
|
64
69
|
const docptr_1 = require("./commands/docptr");
|
|
65
70
|
const doc_1 = require("./commands/doc");
|
|
66
71
|
const parity_1 = require("./commands/parity");
|
|
72
|
+
const repodoc_1 = require("./commands/repodoc");
|
|
73
|
+
const search_1 = require("./commands/search");
|
|
67
74
|
const agents_1 = require("./commands/agents");
|
|
68
75
|
const loadout_1 = require("./commands/loadout");
|
|
69
76
|
const persona_1 = require("./commands/persona");
|
|
70
|
-
const assistant_1 = require("./commands/assistant");
|
|
71
77
|
const email_1 = require("./commands/email");
|
|
72
78
|
const sms_1 = require("./commands/sms");
|
|
73
79
|
const codex_1 = require("./commands/codex");
|
|
@@ -201,80 +207,78 @@ async function apiDelete(url, apiKey) {
|
|
|
201
207
|
throw new Error(`API ${res.status}: ${await res.text()}`);
|
|
202
208
|
return res.json();
|
|
203
209
|
}
|
|
204
|
-
const INBOX_HELP = `greprag inbox — read + manage your async message inbox.
|
|
205
|
-
|
|
206
|
-
greprag inbox List unread for THIS session: its own lines
|
|
207
|
-
only (sender or recipient). Other sessions'
|
|
208
|
-
private lines AND the front desk are hidden —
|
|
209
|
-
the front desk is opt-in (--front-desk).
|
|
210
|
-
greprag inbox --front-desk Read the front desk: the tenant catch-all
|
|
211
|
-
(cold opens + inbound email). Add --peek to
|
|
212
|
-
survey without marking read.
|
|
213
|
-
greprag inbox --all Audit peek: drop the per-session scope (every
|
|
214
|
-
session's lines) AND include already-read.
|
|
215
|
-
greprag inbox --peek List WITHOUT marking read (non-mutating).
|
|
216
|
-
greprag inbox --session <8hex> Scope to one specific session's view.
|
|
217
|
-
greprag inbox --project <name> Filter to one project's inbox.
|
|
218
|
-
greprag inbox watch [...] Long-lived SSE stream (run under Monitor).
|
|
219
|
-
[--receptionist] Attend the front desk — wake live on a cold
|
|
220
|
-
open / inbound email (else only manual check).
|
|
221
|
-
[--
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
greprag inbox
|
|
230
|
-
|
|
231
|
-
greprag inbox
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
greprag send --to
|
|
238
|
-
greprag send "msg" --to <
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
Codex
|
|
244
|
-
target's Codex turn hooks surface them at SessionStart/UserPromptSubmit
|
|
245
|
-
boundaries. Codex-to-Codex coordination uses
|
|
210
|
+
const INBOX_HELP = `greprag inbox — read + manage your async message inbox.
|
|
211
|
+
|
|
212
|
+
greprag inbox List unread for THIS session: its own lines
|
|
213
|
+
only (sender or recipient). Other sessions'
|
|
214
|
+
private lines AND the front desk are hidden —
|
|
215
|
+
the front desk is opt-in (--front-desk).
|
|
216
|
+
greprag inbox --front-desk Read the front desk: the tenant catch-all
|
|
217
|
+
(cold opens + inbound email). Add --peek to
|
|
218
|
+
survey without marking read.
|
|
219
|
+
greprag inbox --all Audit peek: drop the per-session scope (every
|
|
220
|
+
session's lines) AND include already-read.
|
|
221
|
+
greprag inbox --peek List WITHOUT marking read (non-mutating).
|
|
222
|
+
greprag inbox --session <8hex> Scope to one specific session's view.
|
|
223
|
+
greprag inbox --project <name> Filter to one project's inbox.
|
|
224
|
+
greprag inbox watch [...] Long-lived SSE stream (run under Monitor).
|
|
225
|
+
[--receptionist] Attend the front desk — wake live on a cold
|
|
226
|
+
open / inbound email (else only manual check).
|
|
227
|
+
[--mechanic] Live Mechanic — normal delivery PLUS a wake
|
|
228
|
+
on tenant mechanic_friction events.
|
|
229
|
+
greprag inbox watchers [--json] List live armed GrepRAG/Claude/OpenCode
|
|
230
|
+
watchers under your tenant. Codex task
|
|
231
|
+
discovery, including repo/workspace, uses
|
|
232
|
+
codex_app.list_threads.
|
|
233
|
+
greprag inbox reap Kill orphaned watcher processes (consumer gone)
|
|
234
|
+
+ sweep stale pidfiles. Runs auto at session start.
|
|
235
|
+
greprag inbox claim <id> Receptionist: claim a front-desk record so a
|
|
236
|
+
co-armed receptionist stands down (no dup reply).
|
|
237
|
+
greprag inbox keep <id> Extend a message's TTL.
|
|
238
|
+
greprag inbox delete <id> Delete a message.
|
|
239
|
+
|
|
240
|
+
To SEND or REPLY (top-level command, NOT an inbox subcommand):
|
|
241
|
+
greprag send --to discord:<snowflake> "reply" Reply to a Discord DM.
|
|
242
|
+
greprag send "msg" --to <handle>@greprag.com Cold open (tenant catch-all).
|
|
243
|
+
greprag send "msg" --to <handle>@greprag.com/<session> Message a specific session.
|
|
244
|
+
greprag send "msg" --to <h>@greprag.com/<session> --in-reply-to <front-desk-id>
|
|
245
|
+
Reply that threads a cold open.
|
|
246
|
+
|
|
247
|
+
Codex session-targeted sends are ordinary durable recipient messages. The
|
|
248
|
+
target's Codex turn hooks surface them at SessionStart/UserPromptSubmit
|
|
249
|
+
boundaries. Codex-to-Codex coordination uses
|
|
246
250
|
codex_app.send_message_to_thread.`;
|
|
247
|
-
const INBOX_WATCH_HELP = `greprag inbox watch — long-lived SSE subscriber for live inbox delivery.
|
|
248
|
-
|
|
249
|
-
Run under the Claude Code Monitor tool: each printed line becomes one
|
|
250
|
-
notification, so a parent waiting on a chip report gets it the instant it
|
|
251
|
-
lands instead of polling.
|
|
252
|
-
|
|
253
|
-
greprag inbox watch Tenant-wide stream.
|
|
254
|
-
greprag inbox watch --project <name> Only messages addressed to this project.
|
|
255
|
-
greprag inbox watch --session <id> Only messages targeting this session.
|
|
256
|
-
Strictest — cold opens never wake it
|
|
257
|
-
(use --receptionist for the front desk).
|
|
258
|
-
greprag inbox watch --since <id|iso> Resume from a known cursor.
|
|
259
|
-
greprag inbox watch --json One JSON object per line (preferred under Monitor).
|
|
260
|
-
greprag inbox watch --quiet JSON on stdout only. Auto-on when GROK_SESSION_ID is set.
|
|
261
|
-
greprag inbox watch --receptionist Attend the front desk — wake live on a
|
|
262
|
-
cold open / inbound email.
|
|
263
|
-
greprag inbox watch --mechanic Attend as the live Mechanic — wake on
|
|
264
|
-
mechanic_friction events.
|
|
265
|
-
greprag inbox watch --no-supervise Run the SSE loop directly, skipping the
|
|
266
|
-
in-process supervisor (tests/debugging).
|
|
267
|
-
greprag inbox watch --owner-pid <n> Owning claude.exe PID (stamped by the arm
|
|
268
|
-
directive; the reaper keeps this watcher
|
|
269
|
-
iff that PID is a live claude.exe).
|
|
270
|
-
|
|
271
|
-
Arm it BARE under Monitor (persistent:true) — no "while true ... sleep 1" wrapper
|
|
272
|
-
(removed 2026-06-04; it orphaned and OOM-crashed the host). Resilience by default:
|
|
273
|
-
the watch SUPERVISES itself — a parent spawns the SSE loop as a child (Win32
|
|
274
|
-
CreateProcess, not Cygwin fork) and respawns it on any non-clean exit (crash,
|
|
275
|
-
undici error, OS kill); and it SELF-TERMINATES when its Monitor consumer's pipe
|
|
276
|
-
breaks (session reload/end) so it never orphans. Within-session robustness only;
|
|
277
|
-
a watcher cannot survive session reload / --resume / /compact.
|
|
251
|
+
const INBOX_WATCH_HELP = `greprag inbox watch — long-lived SSE subscriber for live inbox delivery.
|
|
252
|
+
|
|
253
|
+
Run under the Claude Code Monitor tool: each printed line becomes one
|
|
254
|
+
notification, so a parent waiting on a chip report gets it the instant it
|
|
255
|
+
lands instead of polling.
|
|
256
|
+
|
|
257
|
+
greprag inbox watch Tenant-wide stream.
|
|
258
|
+
greprag inbox watch --project <name> Only messages addressed to this project.
|
|
259
|
+
greprag inbox watch --session <id> Only messages targeting this session.
|
|
260
|
+
Strictest — cold opens never wake it
|
|
261
|
+
(use --receptionist for the front desk).
|
|
262
|
+
greprag inbox watch --since <id|iso> Resume from a known cursor.
|
|
263
|
+
greprag inbox watch --json One JSON object per line (preferred under Monitor).
|
|
264
|
+
greprag inbox watch --quiet JSON on stdout only. Auto-on when GROK_SESSION_ID is set.
|
|
265
|
+
greprag inbox watch --receptionist Attend the front desk — wake live on a
|
|
266
|
+
cold open / inbound email.
|
|
267
|
+
greprag inbox watch --mechanic Attend as the live Mechanic — wake on
|
|
268
|
+
mechanic_friction events.
|
|
269
|
+
greprag inbox watch --no-supervise Run the SSE loop directly, skipping the
|
|
270
|
+
in-process supervisor (tests/debugging).
|
|
271
|
+
greprag inbox watch --owner-pid <n> Owning claude.exe PID (stamped by the arm
|
|
272
|
+
directive; the reaper keeps this watcher
|
|
273
|
+
iff that PID is a live claude.exe).
|
|
274
|
+
|
|
275
|
+
Arm it BARE under Monitor (persistent:true) — no "while true ... sleep 1" wrapper
|
|
276
|
+
(removed 2026-06-04; it orphaned and OOM-crashed the host). Resilience by default:
|
|
277
|
+
the watch SUPERVISES itself — a parent spawns the SSE loop as a child (Win32
|
|
278
|
+
CreateProcess, not Cygwin fork) and respawns it on any non-clean exit (crash,
|
|
279
|
+
undici error, OS kill); and it SELF-TERMINATES when its Monitor consumer's pipe
|
|
280
|
+
breaks (session reload/end) so it never orphans. Within-session robustness only;
|
|
281
|
+
a watcher cannot survive session reload / --resume / /compact.
|
|
278
282
|
adr: adr/monitor-resilience.md`;
|
|
279
283
|
function readProjectRegistry() {
|
|
280
284
|
try {
|
|
@@ -354,6 +358,14 @@ async function inbox(args) {
|
|
|
354
358
|
console.log(INBOX_WATCH_HELP);
|
|
355
359
|
return;
|
|
356
360
|
}
|
|
361
|
+
// The Assistant role was removed 2026-09-03 (adr/assistant-role.md). Fail
|
|
362
|
+
// loudly rather than silently arming a stock watcher — 5.44.0 already
|
|
363
|
+
// shipped a build where `--assistant` was dropped without error and the
|
|
364
|
+
// operator got a watcher that was not the one they asked for.
|
|
365
|
+
if (subArgs.includes('--assistant')) {
|
|
366
|
+
console.error('Error: --assistant is retired — the GrepRAG Assistant role was removed. Drop the flag for a normal watcher, or use --receptionist for the front desk.');
|
|
367
|
+
process.exit(1);
|
|
368
|
+
}
|
|
357
369
|
await (0, inbox_watch_1.runInboxWatch)({
|
|
358
370
|
project: getFlag(subArgs, '--project'),
|
|
359
371
|
session: getFlag(subArgs, '--session'),
|
|
@@ -362,10 +374,6 @@ async function inbox(args) {
|
|
|
362
374
|
// --receptionist: attend the front desk — wake live on tenant catch-all
|
|
363
375
|
// (cold open / inbound email). adr: adr/address-grammar.md
|
|
364
376
|
receptionist: subArgs.includes('--receptionist'),
|
|
365
|
-
// --assistant: attend as the executive assistant — normal session/project
|
|
366
|
-
// delivery PLUS a wake on inbound EMAIL arrivals only (not cold opens).
|
|
367
|
-
// adr: adr/assistant-role.md
|
|
368
|
-
assistant: subArgs.includes('--assistant'),
|
|
369
377
|
mechanic: subArgs.includes('--mechanic'),
|
|
370
378
|
// --no-supervise: run the SSE loop directly, skipping the in-process
|
|
371
379
|
// supervisor. For tests/debugging — the default supervises.
|
|
@@ -1264,375 +1272,383 @@ async function retract(args) {
|
|
|
1264
1272
|
console.log((0, inbox_retract_1.formatRetractResult)(result.status));
|
|
1265
1273
|
}
|
|
1266
1274
|
// -- Main ------------------------------------------------------------------
|
|
1267
|
-
const INIT_HELP = `greprag init — configure GrepRAG for an agent client.
|
|
1268
|
-
|
|
1269
|
-
greprag init
|
|
1270
|
-
greprag init --codex [--api-key <existing-key>]
|
|
1271
|
-
greprag init --claude [--api-key <existing-key>]
|
|
1272
|
-
greprag init --opencode [--api-key <existing-key>]
|
|
1273
|
-
greprag init --grok [--api-key <existing-key>]
|
|
1274
|
-
greprag init --all [--root <path>]
|
|
1275
|
-
greprag init --global [--name <name>]
|
|
1276
|
-
|
|
1277
|
-
Options:
|
|
1278
|
-
--api-key <key> Use an existing GrepRAG API key. New accounts are closed.
|
|
1279
|
-
--codex Configure Codex hooks + /greprag skill.
|
|
1280
|
-
--claude Configure Claude Code hooks + /greprag skill.
|
|
1281
|
-
--opencode Configure OpenCode plugin.
|
|
1282
|
-
--grok Configure Grok Build hooks + skill + rules.
|
|
1283
|
-
|
|
1284
|
-
Codex Desktop trust step:
|
|
1285
|
-
After init, start a fresh Codex session, then open Settings -> Settings -> Hooks
|
|
1275
|
+
const INIT_HELP = `greprag init — configure GrepRAG for an agent client.
|
|
1276
|
+
|
|
1277
|
+
greprag init
|
|
1278
|
+
greprag init --codex [--api-key <existing-key>]
|
|
1279
|
+
greprag init --claude [--api-key <existing-key>]
|
|
1280
|
+
greprag init --opencode [--api-key <existing-key>]
|
|
1281
|
+
greprag init --grok [--api-key <existing-key>]
|
|
1282
|
+
greprag init --all [--root <path>]
|
|
1283
|
+
greprag init --global [--name <name>]
|
|
1284
|
+
|
|
1285
|
+
Options:
|
|
1286
|
+
--api-key <key> Use an existing GrepRAG API key. New accounts are closed.
|
|
1287
|
+
--codex Configure Codex hooks + /greprag skill.
|
|
1288
|
+
--claude Configure Claude Code hooks + /greprag skill.
|
|
1289
|
+
--opencode Configure OpenCode plugin.
|
|
1290
|
+
--grok Configure Grok Build hooks + skill + rules.
|
|
1291
|
+
|
|
1292
|
+
Codex Desktop trust step:
|
|
1293
|
+
After init, start a fresh Codex session, then open Settings -> Settings -> Hooks
|
|
1286
1294
|
and trust the GrepRAG hooks.`;
|
|
1287
|
-
const HELP = `
|
|
1288
|
-
greprag — agent memory for Claude Code, Codex, OpenCode, and Grok Build
|
|
1289
|
-
|
|
1290
|
-
Commands:
|
|
1291
|
-
(no command) Open the local GrepRAG app
|
|
1292
|
-
app | dashboard [--port N] Open the local app (use --no-open on remote machines)
|
|
1293
|
-
init [--api-key <existing-key>]
|
|
1294
|
-
Auto-detect/ask for Codex, Claude Code, or OpenCode
|
|
1295
|
-
init --claude [--api-key <existing-key>]
|
|
1296
|
-
Configure hooks + API key for Claude Code
|
|
1297
|
-
init --global [--name <name>] Create ~/.greprag/project.json (global anchor)
|
|
1298
|
-
init --opencode [--api-key <existing-key>]
|
|
1299
|
-
Configure plugin + anchor for OpenCode
|
|
1300
|
-
init --codex [--api-key <existing-key>]
|
|
1301
|
-
Configure lifecycle hooks + anchor for Codex
|
|
1302
|
-
init --grok [--api-key <existing-key>]
|
|
1303
|
-
Configure Grok Build hooks + skill + rules
|
|
1304
|
-
grok spawn [--cwd <path>] [--prompt "<text>"]
|
|
1305
|
-
Open a fresh Grok TUI in a new terminal
|
|
1306
|
-
(Windows schtasks bootloader — survives the
|
|
1307
|
-
tool Job Object; child arms its own watch)
|
|
1308
|
-
init --all [--root <path>] Standard init for cwd, then bulk-register every
|
|
1309
|
-
other git repo at depth 1 under <path> (default:
|
|
1310
|
-
parent of repo root). Each becomes inbox-addressable.
|
|
1311
|
-
status [--json] [--claude|--codex|--opencode|--grok]
|
|
1312
|
-
Installation, auth, platform hooks/plugins, and project state
|
|
1313
|
-
codex doctor Diagnose Codex hooks, trust setup, and current thread
|
|
1314
|
-
project-id Print the current project_id
|
|
1315
|
-
session-id [--full] Print this session's id (8-hex, 16-hex for UUIDv7, or full UUID with --full).
|
|
1316
|
-
discover [--json] Tenant-wide structure: every project, per-shape row counts,
|
|
1317
|
-
activity ranges. For cross-project advisors.
|
|
1318
|
-
doc <command> Mirror, search, and read project Markdown docs.
|
|
1319
|
-
docptr <command> Document-pointer registry and reference backfill.
|
|
1320
|
-
parity [seed] Doctrine drift-from-canon: the parity table (unit ·
|
|
1321
|
-
lead · stale followers), plus the operator-run seed.
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
--
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
memory
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
fix
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
search
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
greprag
|
|
1633
|
-
|
|
1634
|
-
greprag
|
|
1635
|
-
|
|
1295
|
+
const HELP = `
|
|
1296
|
+
greprag — agent memory for Claude Code, Codex, OpenCode, and Grok Build
|
|
1297
|
+
|
|
1298
|
+
Commands:
|
|
1299
|
+
(no command) Open the local GrepRAG app
|
|
1300
|
+
app | dashboard [--port N] Open the local app (use --no-open on remote machines)
|
|
1301
|
+
init [--api-key <existing-key>]
|
|
1302
|
+
Auto-detect/ask for Codex, Claude Code, or OpenCode
|
|
1303
|
+
init --claude [--api-key <existing-key>]
|
|
1304
|
+
Configure hooks + API key for Claude Code
|
|
1305
|
+
init --global [--name <name>] Create ~/.greprag/project.json (global anchor)
|
|
1306
|
+
init --opencode [--api-key <existing-key>]
|
|
1307
|
+
Configure plugin + anchor for OpenCode
|
|
1308
|
+
init --codex [--api-key <existing-key>]
|
|
1309
|
+
Configure lifecycle hooks + anchor for Codex
|
|
1310
|
+
init --grok [--api-key <existing-key>]
|
|
1311
|
+
Configure Grok Build hooks + skill + rules
|
|
1312
|
+
grok spawn [--cwd <path>] [--prompt "<text>"]
|
|
1313
|
+
Open a fresh Grok TUI in a new terminal
|
|
1314
|
+
(Windows schtasks bootloader — survives the
|
|
1315
|
+
tool Job Object; child arms its own watch)
|
|
1316
|
+
init --all [--root <path>] Standard init for cwd, then bulk-register every
|
|
1317
|
+
other git repo at depth 1 under <path> (default:
|
|
1318
|
+
parent of repo root). Each becomes inbox-addressable.
|
|
1319
|
+
status [--json] [--claude|--codex|--opencode|--grok]
|
|
1320
|
+
Installation, auth, platform hooks/plugins, and project state
|
|
1321
|
+
codex doctor Diagnose Codex hooks, trust setup, and current thread
|
|
1322
|
+
project-id Print the current project_id
|
|
1323
|
+
session-id [--full] Print this session's id (8-hex, 16-hex for UUIDv7, or full UUID with --full).
|
|
1324
|
+
discover [--json] Tenant-wide structure: every project, per-shape row counts,
|
|
1325
|
+
activity ranges. For cross-project advisors.
|
|
1326
|
+
doc <command> Mirror, search, and read project Markdown docs.
|
|
1327
|
+
docptr <command> Document-pointer registry and reference backfill.
|
|
1328
|
+
parity [seed] Doctrine drift-from-canon: the parity table (unit ·
|
|
1329
|
+
lead · stale followers), plus the operator-run seed.
|
|
1330
|
+
repodoc <index|status> Stable identity for a repo's own Markdown: blocks keep
|
|
1331
|
+
their ids through edits, splits, merges and renames.
|
|
1332
|
+
agents <adopt|optimize|sync|status>
|
|
1333
|
+
Canonical global/repo CLAUDE.md + AGENTS.md doctrine.
|
|
1334
|
+
doctor [--inspect] [--yes] Diagnose + repair orphan project_ids and identity drift
|
|
1335
|
+
desk [--json] Inspect the Agent Front Desk and live routing state.
|
|
1336
|
+
sms <command> Configure or inspect SMS front-desk routing.
|
|
1337
|
+
smell "<text>" Shortcut for \`greprag fix log "<text>"\`.
|
|
1338
|
+
context status [--session <id>] Context-size governor readout: live tokens, threshold,
|
|
1339
|
+
% consumed, turns since the crossover advisory last fired.
|
|
1340
|
+
"context --help" for config (threshold + off-switch).
|
|
1341
|
+
delivery <command> Resolve and inspect repo delivery profiles.
|
|
1342
|
+
deploy-gate [--target <id>] Repo-independent deploy pre-flight: may a deploy run
|
|
1343
|
+
from here, is one already running, what is shipping.
|
|
1344
|
+
Read-only; the artifact proof stays with the repo.
|
|
1345
|
+
merge-lock <acquire|release|status> Serialise merges into a shared canonical
|
|
1346
|
+
checkout. Take it before you merge, release after.
|
|
1347
|
+
deploy-lock <acquire|release|status> --target <id>
|
|
1348
|
+
One deploy at a time per target. Pass --pid so the
|
|
1349
|
+
lock names the deploying process, not this command.
|
|
1350
|
+
deploy-record --target <id> Remember what this checkout last shipped, so the
|
|
1351
|
+
gate can say what a deploy is about to ship.
|
|
1352
|
+
deploy-verify --origin <url> --sha <commit>
|
|
1353
|
+
Prove production is serving the commit you shipped.
|
|
1354
|
+
Refuses if the build stamp is edge-cacheable.
|
|
1355
|
+
procedure <command> Governed operational procedure watches and runs.
|
|
1356
|
+
skillgain <command> Skill-learning queue and installation helpers.
|
|
1357
|
+
|
|
1358
|
+
Inbox (email-style messaging across tenants):
|
|
1359
|
+
inbox [--all] [--front-desk] [--session <id>] [--project <name>] [--peek]
|
|
1360
|
+
List unread, auto-scoped to THIS session: its own
|
|
1361
|
+
lines (sender OR recipient) only. Other sessions'
|
|
1362
|
+
private lines AND the front desk are hidden by
|
|
1363
|
+
default — the front desk (cold opens + inbound
|
|
1364
|
+
email) is opt-in via --front-desk.
|
|
1365
|
+
--all = audit peek: drop the per-session scope
|
|
1366
|
+
(every session's lines) AND include read history.
|
|
1367
|
+
--session scopes to one specific session's view.
|
|
1368
|
+
--project filters by project name.
|
|
1369
|
+
--peek: NON-MUTATING — does not mark any message read.
|
|
1370
|
+
inbox watchers [--json] List currently-attached live watchers
|
|
1371
|
+
(Claude / Codex / OpenCode / Grok). Each row:
|
|
1372
|
+
project · title (session_id) [platform] repo —
|
|
1373
|
+
project + nano title from session memory, repo
|
|
1374
|
+
from ~/.greprag/projects.json. Codex task
|
|
1375
|
+
discovery also uses codex_app.list_threads.
|
|
1376
|
+
inbox watch Long-lived SSE stream — prints each message as it lands.
|
|
1377
|
+
Self-supervising by default: a parent process
|
|
1378
|
+
respawns the SSE loop (via CreateProcess) on any
|
|
1379
|
+
non-clean exit — within-session robustness, not
|
|
1380
|
+
reload-survival. "inbox watch --help" for details.
|
|
1381
|
+
[--project <name>] Filter to one project inbox (default: tenant-wide).
|
|
1382
|
+
[--session <id>] Filter to messages targeting this session
|
|
1383
|
+
(cold opens never wake it — use --receptionist).
|
|
1384
|
+
[--receptionist] Attend the front desk — wake live on a tenant
|
|
1385
|
+
catch-all (cold open / inbound email). Without it,
|
|
1386
|
+
cold opens surface only on a manual inbox check.
|
|
1387
|
+
[--mechanic] Live Mechanic — keep normal session/project
|
|
1388
|
+
delivery AND wake on tenant mechanic_friction events.
|
|
1389
|
+
[--since <id|iso>] Resume after a message id or timestamp.
|
|
1390
|
+
[--json] Emit raw JSON per line (for piping to Monitor).
|
|
1391
|
+
[--quiet] JSON on stdout only (Grok monitor). Auto-on under GROK_SESSION_ID.
|
|
1392
|
+
[--no-supervise] Run the SSE loop directly (no supervisor) — tests/debug.
|
|
1393
|
+
inbox claim <id> Receptionist: claim a front-desk record (cold open /
|
|
1394
|
+
inbound email). First claimant wins; a co-armed
|
|
1395
|
+
receptionist stands down — no double-reply.
|
|
1396
|
+
inbox keep <id> Extend a read message's TTL (default delete after 14 days)
|
|
1397
|
+
inbox delete <id> Permanently delete a message
|
|
1398
|
+
send "body" --to <addr> Send a message. Body is markdown.
|
|
1399
|
+
<addr> is a bare handle (tenant catch-all) or
|
|
1400
|
+
handle/<target> — see Addresses below.
|
|
1401
|
+
send --body-file <path> --to <addr>
|
|
1402
|
+
Send a long/multiline body from a file.
|
|
1403
|
+
send --stdin --to <addr> Read message body from stdin.
|
|
1404
|
+
--from-session <id> Sender's session — denormalized so the recipient can
|
|
1405
|
+
reply by session without re-discovery.
|
|
1406
|
+
--memory <uuid> (repeatable) back-pointer to a memory row
|
|
1407
|
+
--artifact <type:id> (repeatable) e.g. commit:abc123, pr:#42, deploy:def
|
|
1408
|
+
--file <path[:lines]> (repeatable) e.g. src/auth.ts, src/auth.ts:42, src/x.ts:10-15
|
|
1409
|
+
--ref-json '<json>' escape hatch — full references object
|
|
1410
|
+
--in-reply-to <id> Thread a reply back to a front-desk record (cold open /
|
|
1411
|
+
inbound email) — sets references.in_reply_to so the
|
|
1412
|
+
ensuing private line continues that conversation.
|
|
1413
|
+
--to-desk Self-addressed internal mail — posts to THIS project's own
|
|
1414
|
+
desk (no recipient; omit --to). Requires --type.
|
|
1415
|
+
--type <internal-type> Internal messageType for --to-desk (e.g. lore_smell). Queue
|
|
1416
|
+
item drained by its consumer — never wakes a watcher and is
|
|
1417
|
+
hidden from the default inbox (audit via 'inbox --all').
|
|
1418
|
+
retract <code> Pull back a previously-sent message (code is printed on send).
|
|
1419
|
+
discord pair Pair Discord DMs to this project — generates a code to DM the bot.
|
|
1420
|
+
discord unpair Remove the Discord pairing.
|
|
1421
|
+
discord me Show current Discord pairing + handoff state.
|
|
1422
|
+
discord handoff [--ttl N] Pin DMs to this session for N min (default 60); bot DMs a confirmation.
|
|
1423
|
+
discord unhandoff Clear the handoff pin (DMs revert to default project).
|
|
1424
|
+
discord typing Refresh the "typing…" indicator on the paired DM thread.
|
|
1425
|
+
send "body" --to discord:<snowflake>
|
|
1426
|
+
Outbound DM to a paired Discord user from any session.
|
|
1427
|
+
Unread → hard delete. Read → body replaced with a retracted notice.
|
|
1428
|
+
Idempotent: double-retract is a no-op.
|
|
1429
|
+
|
|
1430
|
+
Addresses:
|
|
1431
|
+
Cold open: <handle>@greprag.com tenant catch-all — first contact when
|
|
1432
|
+
you don't know their session. Lands in
|
|
1433
|
+
their inbox for a manual check; silent
|
|
1434
|
+
(no session wake, no operator ping).
|
|
1435
|
+
Session: <handle>@greprag.com/<session-uuid> session-to-session (normal, live)
|
|
1436
|
+
Self-desk: --to-desk --type <internal-type> internal queue item on your own project
|
|
1437
|
+
desk — no recipient, no wake; drained by
|
|
1438
|
+
its typed consumer (e.g. lore_smell).
|
|
1439
|
+
--session and --project flags were removed; the address carries the target.
|
|
1440
|
+
Project broadcasts (<handle>@greprag.com/<project-name>) were removed.
|
|
1441
|
+
|
|
1442
|
+
Email (agent-email front desk — drain inbound attachments to local disk):
|
|
1443
|
+
email [pending] List pending front-desk email (envelope only).
|
|
1444
|
+
email pull --id <record> Pull ONE record's attachments to local disk.
|
|
1445
|
+
email pull --all-pending Pull EVERY pending record's attachments.
|
|
1446
|
+
[--to <dir>] Save dir. Default: --to > $GREPRAG_EMAIL_DIR >
|
|
1447
|
+
anchor email_dir > ~/.greprag/email/<project>.
|
|
1448
|
+
[--quiet] Only print the one-line summary.
|
|
1449
|
+
Saved as <subject-slug>-<index>.<ext>; re-pulls
|
|
1450
|
+
are idempotent. Auto-save: set email_autosave=true
|
|
1451
|
+
in .greprag/project.json so the mail hook pulls
|
|
1452
|
+
new attachments each turn.
|
|
1453
|
+
|
|
1454
|
+
Memory (episodic project memory — turn/hourly/daily/ship-event):
|
|
1455
|
+
memory search "<query>" Lexical retrieval over the project's memory.
|
|
1456
|
+
Same v5 RRF + adjacency pipeline as 'corpus
|
|
1457
|
+
search'. Use when looking up a specific
|
|
1458
|
+
problem, bug, or topic.
|
|
1459
|
+
[--limit N=5] [--shape <name>] [--project <name>] [--format markdown|json]
|
|
1460
|
+
memory recap Recent daily summaries (SessionStart shape).
|
|
1461
|
+
[--daily-last N=7] [--project <name>] [--format markdown|json]
|
|
1462
|
+
memory daily [--last N=7] Most-recent daily summaries.
|
|
1463
|
+
memory hourly [--last N=24] Most-recent hourly summaries.
|
|
1464
|
+
memory turns [--last N=20] Raw per-turn envelopes (21-day TTL).
|
|
1465
|
+
memory ships [--last N=50] Ship-event rows (commits/PRs/deploys/releases).
|
|
1466
|
+
Common flags: [--project <name>] [--from ISO --to ISO] [--format markdown|json]
|
|
1467
|
+
memory compact <hour|day|week> [--now ISO]
|
|
1468
|
+
Manual compaction trigger (backfill / admin use).
|
|
1469
|
+
memory delete Bulk-delete nodes by filters (combinable). DRY
|
|
1470
|
+
RUN by default; pass --yes to execute. ≥1 filter
|
|
1471
|
+
required.
|
|
1472
|
+
[--project <name>] [--shape <name>] [--from ISO] [--to ISO] [--session <id>] [--yes]
|
|
1473
|
+
(Aliases: 'briefing' → 'recap' (renamed v5.16.0); 'odyssey' → 'memory'
|
|
1474
|
+
top-level verb (kept for v5.8.0 scripts).)
|
|
1475
|
+
|
|
1476
|
+
Project fixes (emergent friction → fix → repair):
|
|
1477
|
+
fix spawn --type <harness|doctrine|injection|env|code> "<one unit>"
|
|
1478
|
+
[--parent-session <id>]
|
|
1479
|
+
THE friction reflex: emit a FIX CHIP mission for
|
|
1480
|
+
exactly this typed friction, now; the chip investigates,
|
|
1481
|
+
then >=90 repairs autonomously, <90 parks findings.
|
|
1482
|
+
fix log "<text>" [--scope <S>] [--repaired] [--project <name>] [--source-session <id>]
|
|
1483
|
+
Audit/design-input note only, NOT the friction reflex.
|
|
1484
|
+
--repaired records a known durable rule directly
|
|
1485
|
+
(requires --scope).
|
|
1486
|
+
Top-level alias: greprag smell "<text>".
|
|
1487
|
+
fix list [--all] [--repaired] [--project <name>] [--format json]
|
|
1488
|
+
Open queue by default; --repaired = resolved durable
|
|
1489
|
+
rules grouped by scope; --all = tenant-wide census.
|
|
1490
|
+
fix repair <id> "<rule>" [--scope <S>] [--project <name>]
|
|
1491
|
+
Resolve a fix: record the durable rule, close the entry.
|
|
1492
|
+
fix land <id> --commits <h1,h2> --summary "..." [--files <f,..>] [--units <u,..>] [--harness <h,..>]
|
|
1493
|
+
Close a fix with repair-ledger write-back.
|
|
1494
|
+
fix ledger [--limit N] [--project <name>] [--format json]
|
|
1495
|
+
Fleet-activity digest: what chips repaired, when.
|
|
1496
|
+
fix delete <nodeId> [--project <name>]
|
|
1497
|
+
Hard-remove a fix (noise / cleanup).
|
|
1498
|
+
fix search "<query>" [--scope <S>] [--limit N=10] [--project <name>] [--format markdown|json]
|
|
1499
|
+
Lexical search across the project's fixes.
|
|
1500
|
+
fix scopes [--project <name>] Distinct scope labels present in this project.
|
|
1501
|
+
|
|
1502
|
+
Mechanic control plane (repairs as data — 'greprag mechanic --help'):
|
|
1503
|
+
mechanic status [--format json] Inventory of live repairs; ⚑ = ready to graduate.
|
|
1504
|
+
mechanic set | unset Mark / unmark THIS project as the live Mechanic role.
|
|
1505
|
+
mechanic role [status] Show whether THIS project is the live Mechanic.
|
|
1506
|
+
mechanic friction "<summary>" RETIRED: use 'greprag fix spawn --type <type> "<unit>"'.
|
|
1507
|
+
mechanic reply --to <8hex> "<msg>" Reply on the typed mechanic rail.
|
|
1508
|
+
mechanic attest <nodeId> ... Record operator-attested regression evidence.
|
|
1509
|
+
mechanic enable <nodeId> Ratify a shadow repair → active.
|
|
1510
|
+
mechanic disable <nodeId> [--retire] active → shadow (default) or terminal retire.
|
|
1511
|
+
mechanic why <nodeId> Provenance: friction → fix → repair chain.
|
|
1512
|
+
mechanic off | on Panic switch — suspend/resume ALL repairs (local file).
|
|
1513
|
+
|
|
1514
|
+
Corpus (upload + search arbitrary text — books, codebases, references):
|
|
1515
|
+
corpus upload <file|url> --raw|--enriched Create a store + ingest. Mode REQUIRED:
|
|
1516
|
+
[--name <N>] [--kind <K>] --raw (lexical — docs/code) | --enriched (per-node
|
|
1517
|
+
[--refresh hourly|daily|manual|off] LLM vocab bridge — prose/voice). K: docs|
|
|
1518
|
+
prose|transcript|codebase|voice|generic (default docs). html/pdf/docx/
|
|
1519
|
+
xlsx/csv convert server-side. --refresh tracks a URL
|
|
1520
|
+
for the freshness loop (URLs only; default off).
|
|
1521
|
+
search "<query>" [--limit 8] [--kind K] [--store <ref>] [--section "<h>"] [--json]
|
|
1522
|
+
One search across EVERYTHING greprag holds —
|
|
1523
|
+
reference banks, repo markdown, skills, memory.
|
|
1524
|
+
Start here; the corpus forms below are narrower.
|
|
1525
|
+
corpus search <store> "<intent>" [--limit 5] [--section "<h>"] [--shape S]
|
|
1526
|
+
Single-store search. <store> is a UUID or name.
|
|
1527
|
+
corpus search "<intent>" --all|--store <ref>... [--kind K] [--limit 8]
|
|
1528
|
+
Multistore search (RRF-fused). --all = every store.
|
|
1529
|
+
corpus section <store> "<heading>"
|
|
1530
|
+
Every node under a heading (forgiving: any depth,
|
|
1531
|
+
dash/case-insensitive).
|
|
1532
|
+
corpus walk <store> <nodeId> [--before 2 --after 2]
|
|
1533
|
+
Show a node and its surrounding context.
|
|
1534
|
+
corpus status <store> Write-side enrichment progress (per-node vocab bridge).
|
|
1535
|
+
corpus refresh <store> Manually re-check a tracked source (re-ingest changed blocks).
|
|
1536
|
+
corpus sources <store> Freshness state: source, policy, last change, next check.
|
|
1537
|
+
corpus list [--kind K] List stores under this tenant.
|
|
1538
|
+
corpus delete <store> [--yes] Delete a store and its nodes.
|
|
1539
|
+
|
|
1540
|
+
Crush (pre-LLM tool-output compression — safe inside pipes, always exits 0):
|
|
1541
|
+
crush --type <log|search|json> [--ccr] [--query "words"]
|
|
1542
|
+
Read stdin, write the crushed version to stdout.
|
|
1543
|
+
log = build/test output (keep errors/traces/summaries),
|
|
1544
|
+
search = grep/rg output (keep scored top matches),
|
|
1545
|
+
json = large arrays (keep errors/outliers/first+last).
|
|
1546
|
+
--ccr stashes the ORIGINAL locally and appends a
|
|
1547
|
+
trailing <<ccr:HASH>> marker. If compression wouldn't
|
|
1548
|
+
save tokens (or input is tiny), stdin passes through
|
|
1549
|
+
verbatim — never breaks the pipe.
|
|
1550
|
+
crush stats Totals + ratios from the pipe-wrap stats log
|
|
1551
|
+
(~/.greprag/crush-stats.jsonl — one record per
|
|
1552
|
+
--stats invocation; the PreToolUse pipe-wrap
|
|
1553
|
+
hook passes --stats on every rewrite).
|
|
1554
|
+
retrieve <hash> Print a CCR-stashed original back to stdout.
|
|
1555
|
+
Store: ~/.greprag/ccr.db (override GREPRAG_CCR_DB).
|
|
1556
|
+
ccr put --type <t> Internal: stash stdin byte-exact in the CCR store,
|
|
1557
|
+
print its 16-hex hash (the opencode inline crusher
|
|
1558
|
+
uses this to persist originals it crushed in-process).
|
|
1559
|
+
|
|
1560
|
+
Archive (governed compact — lossless PNG snapshot of the pre-compact transcript):
|
|
1561
|
+
archive render --transcript <path> [--out-dir <dir>] [--session <8hex>]
|
|
1562
|
+
Render the transcript main chain to pixel-font
|
|
1563
|
+
PNGs (~30K chars/page, pixel round-trip verified)
|
|
1564
|
+
and index pages in the CCR store. The PreCompact
|
|
1565
|
+
hook runs this automatically before compaction.
|
|
1566
|
+
archive list [--session <id>] Indexed archives with page -> turn ranges.
|
|
1567
|
+
archive snippet [--session <id>]
|
|
1568
|
+
Print the documented /compact instruction block
|
|
1569
|
+
(preserve/compress rules + archive pointer line).
|
|
1570
|
+
|
|
1571
|
+
Identity (public handle + vanity alias — real email is auth-only, never a routing address):
|
|
1572
|
+
identity show | whoami Print numeric handle + claimed aliases.
|
|
1573
|
+
identity claim <alias> Claim a vanity alias (e.g. "travis" → travis@greprag.com).
|
|
1574
|
+
identity release <alias> Drop a claimed alias.
|
|
1575
|
+
|
|
1576
|
+
Skills (opt-in advisor skills bundled with the CLI):
|
|
1577
|
+
skill list Show bundled skills and install status
|
|
1578
|
+
skill install <name> Install a bundled advisor (e.g. discord, content-advisor)
|
|
1579
|
+
skill uninstall <name> Remove a previously-installed advisor
|
|
1580
|
+
skill source stamp <name> --project <p> --path <rel> [--path <rel>...] [--baseline <ref>]
|
|
1581
|
+
Stamp a skill-staleness baseline against local Git
|
|
1582
|
+
|
|
1583
|
+
Load (on-demand doctrine — the CLI is the payload, no .md files):
|
|
1584
|
+
load Browse the catalog (chip-spawn, codex chips, mechanic, …)
|
|
1585
|
+
load <name> Print that entry's full method inline
|
|
1586
|
+
|
|
1587
|
+
Loadout (gift a skill bundle to another tenant — offer, never auto-install):
|
|
1588
|
+
loadout send --to <handle>@greprag.com --skill <name> [--skill <n> …]
|
|
1589
|
+
[--dir <path>] [--advisor <name>] [--note "…"]
|
|
1590
|
+
Freeze + send a loadout. --skill pulls from your
|
|
1591
|
+
mirror; --dir snapshots a skill dir from disk.
|
|
1592
|
+
loadout list Offered loadouts waiting at your front desk.
|
|
1593
|
+
loadout open <id> Manifest + a bounded content preview (never ingests).
|
|
1594
|
+
loadout equip <id> Equip it (alias: accept) — copies skills to your load
|
|
1595
|
+
store + self-inflates via 'greprag load'.
|
|
1596
|
+
loadout decline <id> Decline — GCs the snapshot.
|
|
1597
|
+
loadout status Loadouts you've sent (offered/equipped/declined).
|
|
1598
|
+
loadout unequip <name> [--delete-skills]
|
|
1599
|
+
Stop a loadout's auto-inflate.
|
|
1600
|
+
|
|
1601
|
+
Persona (tenant-scoped speaking instructions):
|
|
1602
|
+
persona list List built-in Persona templates.
|
|
1603
|
+
persona use <template> Activate a built-in Persona template.
|
|
1604
|
+
persona set <text>|--file <f>|--stdin
|
|
1605
|
+
Save and activate a custom Persona verbatim.
|
|
1606
|
+
persona show Show the active Persona.
|
|
1607
|
+
persona clear Remove the active Persona.
|
|
1608
|
+
|
|
1609
|
+
GrepRAG Instructions (canonical global/repo CLAUDE.md + AGENTS.md):
|
|
1610
|
+
instructions pull <file> [--scope global|repo] [--push]
|
|
1611
|
+
Pull disk instructions into canon.
|
|
1612
|
+
instructions push [--scope global|repo|all] [--check] [--force]
|
|
1613
|
+
Render canon back to managed instruction files.
|
|
1614
|
+
agents ... Deprecated alias for instructions.
|
|
1615
|
+
|
|
1616
|
+
Project metadata (rename / merge / list):
|
|
1617
|
+
project rename <new-name> [--yes]
|
|
1618
|
+
Rename the project at cwd (anchor + registry + API
|
|
1619
|
+
+ store metadata). Confirms before writing.
|
|
1620
|
+
project merge --from <X> --into <Y> [--apply] [--name <override>] [--json]
|
|
1621
|
+
Consolidate one project into another. Defaults to
|
|
1622
|
+
dry-run. --from/--into accept a UUID or project_name.
|
|
1623
|
+
--name renames the target in the same step.
|
|
1624
|
+
project list [--json] Every project under this tenant, with anchor + rows.
|
|
1625
|
+
|
|
1626
|
+
Opencode (bridge inbox SSE into a running opencode desktop session — the
|
|
1627
|
+
Monitor equivalent, since opencode is turn-based by default):
|
|
1628
|
+
opencode relay --session <id> [options]
|
|
1629
|
+
Subscribe to /v1/inbox/stream and inject each
|
|
1630
|
+
message as a fresh turn in the named opencode
|
|
1631
|
+
desktop session via /session/{id}/prompt_async.
|
|
1632
|
+
See \`greprag opencode --help\` for flags.
|
|
1633
|
+
|
|
1634
|
+
Other:
|
|
1635
|
+
expand --chunk <id> Expand a memory cluster (siblings, adjacent, linked)
|
|
1636
|
+
help [--all] Show this overview. --all appends every command's
|
|
1637
|
+
full --help — the complete, always-current guide.
|
|
1638
|
+
|
|
1639
|
+
Examples:
|
|
1640
|
+
greprag # open the local customer app
|
|
1641
|
+
greprag init # standard repo setup
|
|
1642
|
+
greprag init --global # Cowork / unanchored sessions
|
|
1643
|
+
greprag init --all # register every sibling repo for inbox
|
|
1644
|
+
greprag init --all --root C:\\ # scan a specific directory
|
|
1645
|
+
greprag inbox
|
|
1646
|
+
greprag send "done with migration" --to alice@greprag.com/abc12345
|
|
1647
|
+
# session-targeted (normal)
|
|
1648
|
+
greprag send "deploy approved" --to alice@greprag.com
|
|
1649
|
+
# cold open — alice's front desk
|
|
1650
|
+
greprag send "Bug in auth flow — repro at line 42" --to alice@greprag.com/abc12345 \
|
|
1651
|
+
--file src/auth.ts:42 --artifact commit:abc123
|
|
1636
1652
|
`.trim();
|
|
1637
1653
|
/** Groups that ship their own detailed `--help`. `help --all` invokes each one
|
|
1638
1654
|
* live and captures its output, so the assembled guide is rendered from the
|
|
@@ -1652,7 +1668,11 @@ const HELP_ALL_GROUPS = [
|
|
|
1652
1668
|
['identity', identity_1.runIdentity],
|
|
1653
1669
|
['project', project_1.runProject],
|
|
1654
1670
|
['delivery', delivery_1.runDelivery],
|
|
1655
|
-
['
|
|
1671
|
+
['deploy-gate', deploy_gate_1.runDeployGate],
|
|
1672
|
+
['merge-lock', merge_lock_1.runMergeLock],
|
|
1673
|
+
['deploy-lock', deploy_lock_1.runDeployLock],
|
|
1674
|
+
['deploy-record', deploy_record_1.runDeployRecord],
|
|
1675
|
+
['deploy-verify', deploy_verify_1.runDeployVerify],
|
|
1656
1676
|
['instructions', agents_1.runInstructions],
|
|
1657
1677
|
['persona', persona_1.runPersona],
|
|
1658
1678
|
['doc', doc_1.runDoc],
|
|
@@ -1661,125 +1681,125 @@ const HELP_ALL_GROUPS = [
|
|
|
1661
1681
|
['crush', crush_1.runCrush],
|
|
1662
1682
|
['archive', archive_1.runArchive],
|
|
1663
1683
|
];
|
|
1664
|
-
const OPENCODE_HELP = `greprag opencode — bridge greprag inbox into a running opencode desktop
|
|
1665
|
-
session, plus a file-watching capture pipeline for episodic memory.
|
|
1666
|
-
|
|
1667
|
-
Two subcommands:
|
|
1668
|
-
|
|
1669
|
-
greprag opencode relay Bridge greprag inbox into a running opencode
|
|
1670
|
-
desktop session. Single POST to
|
|
1671
|
-
/session/{id}/prompt_async enqueues a fresh turn;
|
|
1672
|
-
the desktop app renders it into the conversation
|
|
1673
|
-
feed via the same SSE channel the engine uses.
|
|
1674
|
-
Desktop-only by design — the TUI control plane
|
|
1675
|
-
is deprecated.
|
|
1676
|
-
|
|
1677
|
-
Session-to-session by default: the relay derives
|
|
1678
|
-
the greprag 8-hex from the opencode session UUID
|
|
1679
|
-
and filters the inbox stream to only messages
|
|
1680
|
-
addressed to THIS session. Use --tenant-wide to
|
|
1681
|
-
opt into the noisy debug mode (every message in
|
|
1682
|
-
the tenant, including messages for other
|
|
1683
|
-
sessions).
|
|
1684
|
-
|
|
1685
|
-
greprag opencode chip Spawn OpenCode Desktop chips (session.create + prompt_async).
|
|
1686
|
-
greprag opencode watch Long-lived SQLite poller on opencode's local DB.
|
|
1687
|
-
Captures every (user, assistant) turn pair to
|
|
1688
|
-
greprag memory. Bypasses opencode's event bus
|
|
1689
|
-
entirely — reads the same rows the engine writes
|
|
1690
|
-
the moment a turn completes.
|
|
1691
|
-
|
|
1692
|
-
opencode is turn-based: it has no built-in "Monitor" tool like Claude Code.
|
|
1693
|
-
\`relay\` is the bridge for live inbox delivery. \`watch\` is the capture
|
|
1694
|
-
pipeline. Run both, in separate processes, as long-lived siblings.
|
|
1695
|
-
|
|
1696
|
-
opencode relay — bridge greprag inbox into a running opencode desktop
|
|
1697
|
-
session.
|
|
1698
|
-
|
|
1699
|
-
This command subscribes to /v1/inbox/stream (same SSE channel inbox watch
|
|
1700
|
-
uses) and POSTs every inbound message to /session/{id}/prompt_async on
|
|
1701
|
-
the running opencode server. The receiving desktop session renders the
|
|
1702
|
-
injected prompt as a fresh turn in its conversation feed.
|
|
1703
|
-
|
|
1704
|
-
Usage:
|
|
1705
|
-
greprag opencode relay --session <opencode-session-id> [options]
|
|
1706
|
-
|
|
1707
|
-
Required:
|
|
1708
|
-
--session <id> opencode session id (UUID). Find via
|
|
1709
|
-
\`opencode session list\` or the session header in
|
|
1710
|
-
the opencode UI.
|
|
1711
|
-
|
|
1712
|
-
Options:
|
|
1713
|
-
--opencode-url <u> opencode server base URL.
|
|
1714
|
-
Default http://127.0.0.1:4096.
|
|
1715
|
-
Env override: OPENCODE_URL.
|
|
1716
|
-
--project <name> Filter the inbox stream to one project.
|
|
1717
|
-
--inbox-session <8hex> Filter to one greprag session (8-hex id). Default
|
|
1718
|
-
is auto-derived from --session (truncateSessionId)
|
|
1719
|
-
so the relay only sees messages addressed to THIS
|
|
1720
|
-
opencode session. Pass explicitly to override
|
|
1721
|
-
(e.g. share one greprag session across multiple
|
|
1722
|
-
opencode sessions).
|
|
1723
|
-
--tenant-wide See every message in the tenant's inbox stream,
|
|
1724
|
-
including messages addressed to other sessions.
|
|
1725
|
-
Debug flag — noisy, usually wrong.
|
|
1726
|
-
--since <id-or-iso> Resume cursor.
|
|
1727
|
-
--print Pretty-print each message to stdout.
|
|
1728
|
-
--dry-run Resolve + format, do not POST.
|
|
1729
|
-
|
|
1730
|
-
Resilience mirrors inbox-watch: exponential backoff, idle timeout,
|
|
1731
|
-
cursor-preserving reconnect. Production wraps this in a \`while true\` shell
|
|
1732
|
-
loop so process death auto-restarts:
|
|
1733
|
-
|
|
1734
|
-
while true; do greprag opencode relay --session <id>; \\
|
|
1735
|
-
echo "[restart]" >&2; sleep 1; done
|
|
1736
|
-
|
|
1737
|
-
Senders reach THIS session by addressing
|
|
1738
|
-
\`<handle>@greprag.com/<8hex>\` where <8hex> is the first 8 hex chars of the
|
|
1739
|
-
opencode session id (or pass \`--from-session <8hex>\` so the recipient can
|
|
1740
|
-
reply back by session without re-discovering it).
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
opencode watch — SQLite-polling turn capture for episodic memory.
|
|
1744
|
-
|
|
1745
|
-
opencode persists every message + part as a row in
|
|
1746
|
-
%USERPROFILE%\\.local\\share\\opencode\\opencode.db (SQLite, WAL mode)
|
|
1747
|
-
the moment the AI finishes streaming. This command polls that DB every
|
|
1748
|
-
1-2s, joins \`message\` to \`session\` to recover the working directory,
|
|
1749
|
-
walks up to the greprag anchor, and POSTs the (user, assistant) pair to
|
|
1750
|
-
/v1/memory/turn. No event bus. No sidecar auth. No plugin loader.
|
|
1751
|
-
|
|
1752
|
-
Why this exists: opencode Desktop's event bus does not reliably emit
|
|
1753
|
-
\`message.updated\` for the user's active session, so a plugin hook is
|
|
1754
|
-
unreliable for capture. The on-disk DB is the source of truth — it is
|
|
1755
|
-
written by the engine itself the moment a turn completes.
|
|
1756
|
-
|
|
1757
|
-
Usage:
|
|
1758
|
-
greprag opencode watch [options]
|
|
1759
|
-
|
|
1760
|
-
Options:
|
|
1761
|
-
--interval <ms> Poll interval. Default 1500.
|
|
1762
|
-
--db <path> Override DB path. Default
|
|
1763
|
-
%USERPROFILE%\\.local\\share\\opencode\\opencode.db
|
|
1764
|
-
--project <dir> Only capture turns whose session.directory
|
|
1765
|
-
resolves to this directory (anchor walk-up
|
|
1766
|
-
target). Useful when running this once per
|
|
1767
|
-
worktree.
|
|
1768
|
-
--since <ms> Resume from this epoch ms. Default reads the
|
|
1769
|
-
cursor (~/.greprag/opencode-watch.cursor).
|
|
1770
|
-
On first run, captures every historical turn.
|
|
1771
|
-
--cursor <file> Override the cursor file path.
|
|
1772
|
-
--reset-cursor Delete the cursor file before starting. Use
|
|
1773
|
-
with --since <ms> to re-capture from a point.
|
|
1774
|
-
--json Print one JSON object per captured turn to
|
|
1775
|
-
stdout, instead of human-readable status to
|
|
1776
|
-
stderr.
|
|
1777
|
-
--dry-run Print the would-be POST body, do not send.
|
|
1778
|
-
|
|
1779
|
-
Run under a long-lived shell loop or as a Windows service:
|
|
1780
|
-
|
|
1781
|
-
while true; do greprag opencode watch; \\
|
|
1782
|
-
echo "[restart]" >&2; sleep 1; done
|
|
1684
|
+
const OPENCODE_HELP = `greprag opencode — bridge greprag inbox into a running opencode desktop
|
|
1685
|
+
session, plus a file-watching capture pipeline for episodic memory.
|
|
1686
|
+
|
|
1687
|
+
Two subcommands:
|
|
1688
|
+
|
|
1689
|
+
greprag opencode relay Bridge greprag inbox into a running opencode
|
|
1690
|
+
desktop session. Single POST to
|
|
1691
|
+
/session/{id}/prompt_async enqueues a fresh turn;
|
|
1692
|
+
the desktop app renders it into the conversation
|
|
1693
|
+
feed via the same SSE channel the engine uses.
|
|
1694
|
+
Desktop-only by design — the TUI control plane
|
|
1695
|
+
is deprecated.
|
|
1696
|
+
|
|
1697
|
+
Session-to-session by default: the relay derives
|
|
1698
|
+
the greprag 8-hex from the opencode session UUID
|
|
1699
|
+
and filters the inbox stream to only messages
|
|
1700
|
+
addressed to THIS session. Use --tenant-wide to
|
|
1701
|
+
opt into the noisy debug mode (every message in
|
|
1702
|
+
the tenant, including messages for other
|
|
1703
|
+
sessions).
|
|
1704
|
+
|
|
1705
|
+
greprag opencode chip Spawn OpenCode Desktop chips (session.create + prompt_async).
|
|
1706
|
+
greprag opencode watch Long-lived SQLite poller on opencode's local DB.
|
|
1707
|
+
Captures every (user, assistant) turn pair to
|
|
1708
|
+
greprag memory. Bypasses opencode's event bus
|
|
1709
|
+
entirely — reads the same rows the engine writes
|
|
1710
|
+
the moment a turn completes.
|
|
1711
|
+
|
|
1712
|
+
opencode is turn-based: it has no built-in "Monitor" tool like Claude Code.
|
|
1713
|
+
\`relay\` is the bridge for live inbox delivery. \`watch\` is the capture
|
|
1714
|
+
pipeline. Run both, in separate processes, as long-lived siblings.
|
|
1715
|
+
|
|
1716
|
+
opencode relay — bridge greprag inbox into a running opencode desktop
|
|
1717
|
+
session.
|
|
1718
|
+
|
|
1719
|
+
This command subscribes to /v1/inbox/stream (same SSE channel inbox watch
|
|
1720
|
+
uses) and POSTs every inbound message to /session/{id}/prompt_async on
|
|
1721
|
+
the running opencode server. The receiving desktop session renders the
|
|
1722
|
+
injected prompt as a fresh turn in its conversation feed.
|
|
1723
|
+
|
|
1724
|
+
Usage:
|
|
1725
|
+
greprag opencode relay --session <opencode-session-id> [options]
|
|
1726
|
+
|
|
1727
|
+
Required:
|
|
1728
|
+
--session <id> opencode session id (UUID). Find via
|
|
1729
|
+
\`opencode session list\` or the session header in
|
|
1730
|
+
the opencode UI.
|
|
1731
|
+
|
|
1732
|
+
Options:
|
|
1733
|
+
--opencode-url <u> opencode server base URL.
|
|
1734
|
+
Default http://127.0.0.1:4096.
|
|
1735
|
+
Env override: OPENCODE_URL.
|
|
1736
|
+
--project <name> Filter the inbox stream to one project.
|
|
1737
|
+
--inbox-session <8hex> Filter to one greprag session (8-hex id). Default
|
|
1738
|
+
is auto-derived from --session (truncateSessionId)
|
|
1739
|
+
so the relay only sees messages addressed to THIS
|
|
1740
|
+
opencode session. Pass explicitly to override
|
|
1741
|
+
(e.g. share one greprag session across multiple
|
|
1742
|
+
opencode sessions).
|
|
1743
|
+
--tenant-wide See every message in the tenant's inbox stream,
|
|
1744
|
+
including messages addressed to other sessions.
|
|
1745
|
+
Debug flag — noisy, usually wrong.
|
|
1746
|
+
--since <id-or-iso> Resume cursor.
|
|
1747
|
+
--print Pretty-print each message to stdout.
|
|
1748
|
+
--dry-run Resolve + format, do not POST.
|
|
1749
|
+
|
|
1750
|
+
Resilience mirrors inbox-watch: exponential backoff, idle timeout,
|
|
1751
|
+
cursor-preserving reconnect. Production wraps this in a \`while true\` shell
|
|
1752
|
+
loop so process death auto-restarts:
|
|
1753
|
+
|
|
1754
|
+
while true; do greprag opencode relay --session <id>; \\
|
|
1755
|
+
echo "[restart]" >&2; sleep 1; done
|
|
1756
|
+
|
|
1757
|
+
Senders reach THIS session by addressing
|
|
1758
|
+
\`<handle>@greprag.com/<8hex>\` where <8hex> is the first 8 hex chars of the
|
|
1759
|
+
opencode session id (or pass \`--from-session <8hex>\` so the recipient can
|
|
1760
|
+
reply back by session without re-discovering it).
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
opencode watch — SQLite-polling turn capture for episodic memory.
|
|
1764
|
+
|
|
1765
|
+
opencode persists every message + part as a row in
|
|
1766
|
+
%USERPROFILE%\\.local\\share\\opencode\\opencode.db (SQLite, WAL mode)
|
|
1767
|
+
the moment the AI finishes streaming. This command polls that DB every
|
|
1768
|
+
1-2s, joins \`message\` to \`session\` to recover the working directory,
|
|
1769
|
+
walks up to the greprag anchor, and POSTs the (user, assistant) pair to
|
|
1770
|
+
/v1/memory/turn. No event bus. No sidecar auth. No plugin loader.
|
|
1771
|
+
|
|
1772
|
+
Why this exists: opencode Desktop's event bus does not reliably emit
|
|
1773
|
+
\`message.updated\` for the user's active session, so a plugin hook is
|
|
1774
|
+
unreliable for capture. The on-disk DB is the source of truth — it is
|
|
1775
|
+
written by the engine itself the moment a turn completes.
|
|
1776
|
+
|
|
1777
|
+
Usage:
|
|
1778
|
+
greprag opencode watch [options]
|
|
1779
|
+
|
|
1780
|
+
Options:
|
|
1781
|
+
--interval <ms> Poll interval. Default 1500.
|
|
1782
|
+
--db <path> Override DB path. Default
|
|
1783
|
+
%USERPROFILE%\\.local\\share\\opencode\\opencode.db
|
|
1784
|
+
--project <dir> Only capture turns whose session.directory
|
|
1785
|
+
resolves to this directory (anchor walk-up
|
|
1786
|
+
target). Useful when running this once per
|
|
1787
|
+
worktree.
|
|
1788
|
+
--since <ms> Resume from this epoch ms. Default reads the
|
|
1789
|
+
cursor (~/.greprag/opencode-watch.cursor).
|
|
1790
|
+
On first run, captures every historical turn.
|
|
1791
|
+
--cursor <file> Override the cursor file path.
|
|
1792
|
+
--reset-cursor Delete the cursor file before starting. Use
|
|
1793
|
+
with --since <ms> to re-capture from a point.
|
|
1794
|
+
--json Print one JSON object per captured turn to
|
|
1795
|
+
stdout, instead of human-readable status to
|
|
1796
|
+
stderr.
|
|
1797
|
+
--dry-run Print the would-be POST body, do not send.
|
|
1798
|
+
|
|
1799
|
+
Run under a long-lived shell loop or as a Windows service:
|
|
1800
|
+
|
|
1801
|
+
while true; do greprag opencode watch; \\
|
|
1802
|
+
echo "[restart]" >&2; sleep 1; done
|
|
1783
1803
|
`;
|
|
1784
1804
|
/** greprag opencode <subcommand> — TUI bridge + capture watcher. */
|
|
1785
1805
|
async function opencode(args) {
|
|
@@ -1922,6 +1942,7 @@ async function main() {
|
|
|
1922
1942
|
case 'sms': return (0, sms_1.runSms)(subArgs);
|
|
1923
1943
|
case 'codex': return (0, codex_1.runCodex)(subArgs);
|
|
1924
1944
|
case 'expand': return expand(subArgs);
|
|
1945
|
+
case 'search': return (0, search_1.runSearch)(subArgs); // one lexical search across everything (adr/searchable-store-kinds.md)
|
|
1925
1946
|
case 'corpus': return (0, corpus_1.runCorpus)(subArgs);
|
|
1926
1947
|
case 'session': return (0, session_1.runSession)(subArgs);
|
|
1927
1948
|
case 'discover': return (0, discover_1.runDiscover)(subArgs);
|
|
@@ -1945,16 +1966,21 @@ async function main() {
|
|
|
1945
1966
|
case 'load': return (0, load_1.runLoad)(subArgs); // Interrupt System doctrine loader: bare = catalog, <name> = full entry
|
|
1946
1967
|
case 'project': return (0, project_1.runProject)(subArgs);
|
|
1947
1968
|
case 'delivery': return (0, delivery_1.runDelivery)(subArgs); // transitional repo delivery profile resolver
|
|
1969
|
+
case 'deploy-gate': return (0, deploy_gate_1.runDeployGate)(subArgs); // portable deploy pre-flight (adr/deploy-gate-cli.md)
|
|
1970
|
+
case 'merge-lock': return (0, merge_lock_1.runMergeLock)(subArgs); // serialise merges into a shared checkout
|
|
1971
|
+
case 'deploy-lock': return (0, deploy_lock_1.runDeployLock)(subArgs); // one deploy at a time per target (adr/deploy-gate-cli.md)
|
|
1972
|
+
case 'deploy-record': return (0, deploy_record_1.runDeployRecord)(subArgs); // remember what this checkout last shipped
|
|
1973
|
+
case 'deploy-verify': return (0, deploy_verify_1.runDeployVerify)(subArgs); // did production take the upload? (adr/deploy-gate-cli.md)
|
|
1948
1974
|
case 'procedure': return (0, procedure_1.runProcedure)(subArgs); // Procedure System: operational recipes (docs/procedure-system.md)
|
|
1949
1975
|
case 'skillgain': return (0, skillgain_1.runSkillGain)(subArgs); // Skill Learning Loop: gain queue verbs (docs/skill-learning-loop.md)
|
|
1950
1976
|
case 'doc': return (0, doc_1.runDoc)(subArgs); // Project Markdown mirror: sync/search/read exact docs through GrepRAG
|
|
1951
1977
|
case 'docptr': return (0, docptr_1.runDocPtr)(subArgs); // Document Pointer System: backfill the doc registry (docs/doc-pointer-system.md)
|
|
1952
1978
|
case 'parity': return (0, parity_1.runParity)(subArgs); // Parity System: doctrine drift table + manifest seed (docs/parity-system.md)
|
|
1979
|
+
case 'repodoc': return (0, repodoc_1.runRepoDoc)(subArgs); // Repo markdown identity that survives edits (docs/node-identity-port.md)
|
|
1953
1980
|
case 'instructions': return (0, agents_1.runInstructions)(subArgs); // Canonical GrepRAG Instructions + rendered followers
|
|
1954
1981
|
case 'agents': return (0, agents_1.runAgents)(subArgs); // Deprecated alias for GrepRAG Instructions
|
|
1955
1982
|
case 'loadout': return (0, loadout_1.runLoadout)(subArgs); // Loadout: cross-tenant skill-bundle gifting (docs/loadout.md)
|
|
1956
1983
|
case 'persona': return (0, persona_1.runPersona)(subArgs); // tenant-scoped speaking instructions
|
|
1957
|
-
case 'assistant': return (0, assistant_1.runAssistant)(subArgs); // designate this project as the tenant's Assistant (role flag)
|
|
1958
1984
|
case 'opencode': return opencode(subArgs);
|
|
1959
1985
|
case 'grok': return (0, grok_spawn_1.runGrok)(subArgs);
|
|
1960
1986
|
default:
|