feat(ai-tools): omp shared + OpenCode/omp sessions, tokens, subagents; Grok hooks; resume by id
- omp-usage.js / opencode-usage.js: poll each CLI's own session store into sessions (tool omp/opencode), token_usage per model and subagent agents; transcript routes read them (omp journals, OpenCode's opencode.db). - Grok runs the Claude hooks in ~/.claude/settings.json: its hooks are now recognised (hookEventName + workspaceRoot), tagged tool=grok, and their transcript_path dropped instead of being parsed as a Claude transcript. - Catalog `resumeById`: omp/Grok/Cursor `--resume <id>`, OpenCode `--session <id>`; session ids may carry `_`. The client offers Resume for any tool that resumes by id. - Kimi Code and GitHub Copilot leave the catalog (their session stores could not be verified).
This commit is contained in:
@@ -88,7 +88,7 @@ function validate(doc, source) {
|
||||
if (typeof doc.label !== "string" || !doc.label.trim()) return null;
|
||||
if (!isStrArray(doc.detect, CMD_RE) || !doc.detect.length) return null;
|
||||
if (doc.requires !== undefined && !isStrArray(doc.requires, CMD_RE)) return null;
|
||||
for (const k of ["args", "resume", "bypass"]) {
|
||||
for (const k of ["args", "resume", "resumeById", "bypass"]) {
|
||||
if (doc[k] !== undefined && !isStrArray(doc[k])) return null;
|
||||
}
|
||||
if (doc.bypassEnv !== undefined) {
|
||||
@@ -145,6 +145,9 @@ function validate(doc, source) {
|
||||
faviconDomain: typeof doc.faviconDomain === "string" ? doc.faviconDomain : null,
|
||||
prompt,
|
||||
resume: doc.resume || null,
|
||||
// `resumeById`: the flag(s) a NAMED session's id follows, as one more argv
|
||||
// element (`omp --resume <id>`) — the id is validated at spawn time.
|
||||
resumeById: doc.resumeById || null,
|
||||
bypass: doc.bypass || null,
|
||||
bypassEnv: doc.bypassEnv || null,
|
||||
launcher,
|
||||
@@ -416,6 +419,8 @@ function view() {
|
||||
launcher: t.launcher,
|
||||
prompt: t.prompt ? { mode: t.prompt.mode } : null,
|
||||
resume: !!t.resume,
|
||||
// claude/codex resume a named session through their own argv builders.
|
||||
resumeById: Boolean(t.resumeById || t.launcher),
|
||||
bypass: !!(t.bypass || t.bypassEnv),
|
||||
proxyCapable: PROXY_CAPABLE.has(t.id),
|
||||
// claude/codex take a model through their own argv builders.
|
||||
|
||||
Reference in New Issue
Block a user