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:
@@ -6,6 +6,15 @@ One JSON file per AI coding CLI AgentHub can run in a lane. Loaded by
|
||||
`DASHBOARD_AI_TOOLS_DIR` with the same `id` replaces the built-in one (it may
|
||||
not set `launcher`).
|
||||
|
||||
## Resume by id
|
||||
|
||||
`resumeById` (string array, e.g. `["--resume"]`): the flag(s) a NAMED session's
|
||||
id follows, as one more argv element — `pty-run.js` emits them in place of
|
||||
`resume` when a start carries `resumeSessionId`, and only for an id that starts
|
||||
with a letter or digit. A tool without it (and without a `launcher`) refuses a
|
||||
resume by id (`EUNSUPPORTED`) rather than start fresh under a "resume".
|
||||
Built-in: omp, Grok and Cursor (`--resume`), OpenCode (`--session`). A session id may carry `_` (OpenCode's `ses_…`).
|
||||
|
||||
## Install / update (A2)
|
||||
|
||||
Two optional fields, honoured only in built-in files and in the copy of the
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"id": "copilot",
|
||||
"label": "GitHub Copilot",
|
||||
"detect": [
|
||||
"copilot"
|
||||
],
|
||||
"prompt": {
|
||||
"mode": "flag",
|
||||
"flag": "-i"
|
||||
},
|
||||
"bypass": [
|
||||
"--yolo"
|
||||
],
|
||||
"homepageUrl": "https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli",
|
||||
"install": {
|
||||
"kind": "npm",
|
||||
"package": "@github/copilot"
|
||||
},
|
||||
"update": {
|
||||
"kind": "npm"
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,9 @@
|
||||
"resume": [
|
||||
"--continue"
|
||||
],
|
||||
"resumeById": [
|
||||
"--resume"
|
||||
],
|
||||
"bypass": [
|
||||
"--yolo"
|
||||
],
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
"resume": [
|
||||
"--continue"
|
||||
],
|
||||
"resumeById": [
|
||||
"--resume"
|
||||
],
|
||||
"bypass": [
|
||||
"--permission-mode",
|
||||
"bypassPermissions"
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"id": "kimi",
|
||||
"label": "Kimi Code",
|
||||
"detect": [
|
||||
"kimi"
|
||||
],
|
||||
"prompt": {
|
||||
"mode": "after-start"
|
||||
},
|
||||
"model": {
|
||||
"flag": "--model"
|
||||
},
|
||||
"resume": [
|
||||
"--continue"
|
||||
],
|
||||
"bypass": [
|
||||
"--auto"
|
||||
],
|
||||
"homepageUrl": "https://www.kimi.com/code/docs/",
|
||||
"faviconDomain": "kimi.com",
|
||||
"install": {
|
||||
"kind": "script",
|
||||
"url": "https://code.kimi.com/kimi-code/install.sh"
|
||||
},
|
||||
"update": {
|
||||
"kind": "self",
|
||||
"args": [
|
||||
"upgrade",
|
||||
"-y"
|
||||
]
|
||||
},
|
||||
"config": [
|
||||
{
|
||||
"path": "~/.kimi-code/config.toml"
|
||||
},
|
||||
{
|
||||
"path": "~/.kimi-code/tui.toml"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,12 +7,35 @@
|
||||
"prompt": {
|
||||
"mode": "argv"
|
||||
},
|
||||
"model": {
|
||||
"flag": "--model"
|
||||
},
|
||||
"resume": [
|
||||
"--continue"
|
||||
],
|
||||
"resumeById": [
|
||||
"--resume"
|
||||
],
|
||||
"bypass": [
|
||||
"--auto-approve"
|
||||
],
|
||||
"homepageUrl": "https://omp.sh",
|
||||
"faviconDomain": "omp.sh",
|
||||
"install": {
|
||||
"kind": "script",
|
||||
"url": "https://omp.sh/install"
|
||||
},
|
||||
"update": {
|
||||
"kind": "script"
|
||||
}
|
||||
},
|
||||
"config": [
|
||||
{
|
||||
"path": "~/.omp/agent/config.yml",
|
||||
"format": "text"
|
||||
},
|
||||
{
|
||||
"path": "~/.omp/agent/models.yml",
|
||||
"format": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
"model": {
|
||||
"flag": "--model"
|
||||
},
|
||||
"resume": [
|
||||
"--continue"
|
||||
],
|
||||
"resumeById": [
|
||||
"--session"
|
||||
],
|
||||
"homepageUrl": "https://opencode.ai/docs/cli/",
|
||||
"install": {
|
||||
"kind": "npm",
|
||||
|
||||
Reference in New Issue
Block a user