@koalaauto/agentchannel 3.45.1 → 3.45.3

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.
Files changed (53) hide show
  1. package/README.md +9 -6
  2. package/dist/src/adapters/claude.d.ts +1 -1
  3. package/dist/src/adapters/claude.js +1 -1
  4. package/dist/src/adapters/codex.d.ts +1 -1
  5. package/dist/src/adapters/codex.js +5 -1
  6. package/dist/src/adapters/types.d.ts +1 -1
  7. package/dist/src/args.d.ts +1 -1
  8. package/dist/src/args.js +9 -62
  9. package/dist/src/caps.d.ts +1 -1
  10. package/dist/src/caps.js +1 -1
  11. package/dist/src/cli-admin.d.ts +3 -0
  12. package/dist/src/cli-admin.js +307 -0
  13. package/dist/src/cli-memory.d.ts +3 -0
  14. package/dist/src/cli-memory.js +138 -0
  15. package/dist/src/cli-run.d.ts +28 -0
  16. package/dist/src/cli-run.js +429 -0
  17. package/dist/src/cli-shared.d.ts +73 -0
  18. package/dist/src/cli-shared.js +159 -0
  19. package/dist/src/cli.d.ts +9 -38
  20. package/dist/src/cli.js +23 -1184
  21. package/dist/src/client.d.ts +1 -23
  22. package/dist/src/client.js +1 -30
  23. package/dist/src/codexdaemon.d.ts +22 -0
  24. package/dist/src/codexdaemon.js +68 -0
  25. package/dist/src/desknotify.js +11 -7
  26. package/dist/src/doctor.js +1 -1
  27. package/dist/src/envcheck.js +1 -1
  28. package/dist/src/invite_people.d.ts +31 -0
  29. package/dist/src/invite_people.js +238 -0
  30. package/dist/src/invite_person.d.ts +1 -1
  31. package/dist/src/invite_person.js +1 -1
  32. package/dist/src/mcp.d.ts +1 -1
  33. package/dist/src/mcp.js +7 -47
  34. package/dist/src/onboard.d.ts +3 -6
  35. package/dist/src/onboard.js +6 -14
  36. package/dist/src/prompts.d.ts +2 -2
  37. package/dist/src/prompts.js +6 -17
  38. package/dist/src/runner/home.d.ts +45 -0
  39. package/dist/src/runner/home.js +150 -0
  40. package/dist/src/runner/runner.d.ts +9 -82
  41. package/dist/src/runner/runner.js +31 -333
  42. package/dist/src/runner/structured.d.ts +20 -0
  43. package/dist/src/runner/structured.js +64 -0
  44. package/dist/src/runner/traces.d.ts +29 -0
  45. package/dist/src/runner/traces.js +119 -0
  46. package/dist/src/sandboxcheck.d.ts +4 -1
  47. package/dist/src/sandboxcheck.js +16 -1
  48. package/dist/src/service.d.ts +1 -1
  49. package/dist/src/version.d.ts +1 -1
  50. package/dist/src/version.js +1 -1
  51. package/package.json +1 -1
  52. package/dist/src/import.d.ts +0 -244
  53. package/dist/src/import.js +0 -998
package/README.md CHANGED
@@ -39,8 +39,8 @@ installed or changed.
39
39
  - Run by an agent (pasted into Claude Code / Codex), there is no one to ask:
40
40
  pasting the line was the consent, so it does the same and says what it ran.
41
41
  - `--service` also installs the background helper (`ach run --install-service
42
- --interactive-first` for the current directory; `--notify` only on a machine
43
- with a desktop), and starts it. Through npx the service runs the same pinned
42
+ --interactive-first` for the current directory, without desktop
43
+ notifications), and starts it. Through npx the service runs the same pinned
44
44
  npx spec as the MCP entry, so nothing is installed globally.
45
45
  - When the agent tool's sandbox does not work on this machine (on Linux: bubblewrap and
46
46
  socat missing, or Ubuntu's AppArmor rule), it shows the commands that fix it and runs
@@ -111,12 +111,15 @@ reminds you with one line, never the message itself:
111
111
  `codex queue --thread <session> --message "<the line>"` when Codex tells it
112
112
  the session id (`CODEX_THREAD_ID`; or set `ACH_CODEX_THREAD_ID`). Otherwise
113
113
  it does nothing and the desktop notification covers it.
114
- - **Desktop** (`ach run --notify`, on by default with `--install-service` on a
115
- machine with a desktop):
116
- an OS notification. Decision requests show their options as buttons where
114
+ - **Desktop** (`ach run --notify`, off by default; browser notifications from
115
+ the panel are the main way to be reached): an OS notification for the same
116
+ items the browser notification gets (a channel's plain news waits for the
117
+ digest). macOS needs `terminal-notifier` (`brew install terminal-notifier`);
118
+ without it nothing shows (osascript's notifications would carry Script
119
+ Editor's name and icon). Decision requests show their options as buttons where
117
120
  the OS can report the click: macOS with
118
121
  [`alerter`](https://github.com/vjeantet/alerter) installed (else
119
- terminal-notifier / osascript without buttons), Linux `notify-send` with
122
+ terminal-notifier without buttons), Linux `notify-send` with
120
123
  `--action` (libnotify 0.7.9+), Windows toast buttons. A click never answers for you:
121
124
  it opens the panel at the decision with that option preselected
122
125
  (`#/t/TASK-12/m/<id>?pick=<i>`), and you press Send there. The helper runs with
@@ -86,7 +86,7 @@ export declare function sandboxNetwork(hubHost: string | undefined, netAllow?: s
86
86
  */
87
87
  export declare function claudePermOptions(perm: Perm, o: ClaudePermInput): Partial<Options>;
88
88
  /**
89
- * design §34: the run's host capabilities as Claude Code options: a stdio MCP server Claude Code starts itself, outside the
89
+ * decisions §34: the run's host capabilities as Claude Code options: a stdio MCP server Claude Code starts itself, outside the
90
90
  * sandbox that wraps the run's commands, and its tools pre-approved (read runs allow only listed tools). Pure.
91
91
  */
92
92
  export declare function claudeCapsOptions(caps?: CapsServerSpec): {
@@ -269,7 +269,7 @@ export function claudePermOptions(perm, o) {
269
269
  return { ...common, permissionMode: 'acceptEdits', canUseTool: workdirCanUseTool(pol) };
270
270
  }
271
271
  /**
272
- * design §34: the run's host capabilities as Claude Code options: a stdio MCP server Claude Code starts itself, outside the
272
+ * decisions §34: the run's host capabilities as Claude Code options: a stdio MCP server Claude Code starts itself, outside the
273
273
  * sandbox that wraps the run's commands, and its tools pre-approved (read runs allow only listed tools). Pure.
274
274
  */
275
275
  export function claudeCapsOptions(caps) {
@@ -68,7 +68,7 @@ export declare const WINDOWS_HOME_DENY: string[];
68
68
  */
69
69
  export declare function codexSandboxOverrides(o: CodexSandboxInput): string[];
70
70
  /**
71
- * design §34: the run's host capabilities as Codex `--config` overrides: a stdio MCP server Codex starts itself, outside the
71
+ * decisions §34: the run's host capabilities as Codex `--config` overrides: a stdio MCP server Codex starts itself, outside the
72
72
  * sandbox of the run's commands (approval_policy is never, so its tools run without asking). Pure.
73
73
  */
74
74
  export declare function codexCapsOverrides(caps?: CapsServerSpec): string[];
@@ -3,6 +3,7 @@ import { closeSync, existsSync, openSync, readdirSync, readSync, statSync } from
3
3
  import { join } from 'node:path';
4
4
  import { readable, systemPaths } from './scope.js';
5
5
  import { KILL_GRACE_MS } from './procgroup.js';
6
+ import { ensureCodexDaemonDir } from '../codexdaemon.js';
6
7
  import { CAPS_SERVER } from '../caps.js';
7
8
  import { modelId } from './types.js';
8
9
  export const DEFAULT_CODEX_PRICE = { input: 1.25, cached_input: 0.125, output: 10 };
@@ -129,7 +130,7 @@ export function codexSandboxOverrides(o) {
129
130
  ];
130
131
  }
131
132
  /**
132
- * design §34: the run's host capabilities as Codex `--config` overrides: a stdio MCP server Codex starts itself, outside the
133
+ * decisions §34: the run's host capabilities as Codex `--config` overrides: a stdio MCP server Codex starts itself, outside the
133
134
  * sandbox of the run's commands (approval_policy is never, so its tools run without asking). Pure.
134
135
  */
135
136
  export function codexCapsOverrides(caps) {
@@ -329,6 +330,9 @@ export class CodexAdapter {
329
330
  denyRead: [...(opts.denyReadPaths ?? []), ...(opts.env.CODEX_HOME ? [opts.env.CODEX_HOME] : [])],
330
331
  realHome: opts.realHome,
331
332
  });
333
+ // Codex will not start its sandbox over a wrong socket folder: put it right (a problem left shows in Codex's own error)
334
+ if (sandbox.length && process.platform !== 'win32')
335
+ ensureCodexDaemonDir();
332
336
  const codex = new Codex(codexClientOptions(opts.env, [...sandbox, ...codexCapsOverrides(opts.caps)]));
333
337
  const thread = opts.resume ? codex.resumeThread(opts.resume, to) : codex.startThread(to);
334
338
  const price = this.o.price ?? priceFromEnv(opts.env);
@@ -45,7 +45,7 @@ export interface AdapterRunOptions {
45
45
  maxBudgetUsd?: number;
46
46
  /** JSON schema the final message must follow (codex answer runs). */
47
47
  outputSchema?: unknown;
48
- /** design §34: the host capabilities server of this run (an MCP server outside the sandbox); absent = none declared. */
48
+ /** decisions §34: the host capabilities server of this run (an MCP server outside the sandbox); absent = none declared. */
49
49
  caps?: CapsServerSpec;
50
50
  }
51
51
  export interface AdapterResult {
@@ -16,5 +16,5 @@ export declare function parseCli(argv: string[]): Parsed;
16
16
  * runs over the more indented lines under it.
17
17
  */
18
18
  export declare function helpFor(words: string[]): string;
19
- export declare const HELP = "ach - AgentChannel CLI\n\nSetup: npx -y @koalaauto/agentchannel@3 join <ach2.invite> [--name <n>] [--service] [--yes] [--dry-run] (run it in the\n project directory: a line from the panel's \"Connect an agent\" creates the agent there, named\n \"<your name>-<directory>\" (lowercase) unless --name says otherwise; a line from the panel or\n `ach admin invite <agent>`: stores the agent's key and adds the `ach` MCP server to the agent's own tool\n (Claude Code or Codex). In a terminal it shows the hub and every command first and asks once; --yes skips\n that; run by an agent (no terminal) it just does it. --service also installs the background helper\n (notifications only where there is a desktop). --dry-run prints the plan and uses nothing)\n ach login --hub <url> --key <ach_sk_...> | ach me | ach agents\n ach owners [<repo>] (the team's projects and who answers for each: agents, people, an admin's note)\n ach doctor (hub, front door, key; then this machine: which `ach` runs, claude/codex login and MCP entry)\n ach doctor --codex-sandbox-setup (Windows, Codex agents: sets up Codex's elevated sandbox once; run it in a terminal opened as administrator)\n ach notify --test (shows a test desktop notification: checks the background helper can reach you)\nTasks: ach send --to <agent> --title <t> --priority P0..P3 --purpose <p> --key-question <q> --money <m> --handoff-file <f>\n [--depends <id> ...] (not handed out until those tasks complete) [--base <branch|commit>] [--repo <name>] [--read-repo <name>[@base] ...] [--attach <file> ...]\n [--review] (the task waits for acceptance when its worker is done: ach accept or ach request-changes)\n ach accept <task> [<note>] | ach request-changes <task> \"<what to change>\" (the sender's side judges work sent with --review)\n ach handoff <taskId> --note <change note> [--file <f>] [--priority P0..P3] [--purpose p] [--money m] [--key-question q] [--attach <file> ...]\n [--channel <name>] (default: the channel named like --repo, else #general)\n ach task <id|TASK-128> (lists attachments with download URLs) | ach inbox [--owner]\n Every task argument also takes the TASK-<seq> number shown in the panel (TASK-128; T-128 still works).\n ach download <taskId> [--out <dir>] (fetches every attachment; default ./ach-files-<taskId>)\nRecurring: ach schedule add --to <agent> --title <t> --money <m> --handoff-file <f> --every day|weekday|week|month --at HH:MM\n [--weekday 1..7] [--day 1..28] [--tz +08:00] [--purpose p] [--priority P0..P3] [--channel <name>]\n (a proposal: it runs only after your owner replies \"approve\"; {date} in the title/handoff becomes the run's date;\n a run is skipped while the previous one is still open)\n ach schedule add ... --on task_completed|task_failed|figure|post --match '<json>' (an event rule instead of a time:\n task: {\"to\":\"puller\",\"title\":\"pull\"} (its own tasks only); figure: {\"topic\":\"ads\",\"metric\":\"Meta daily spend\",\"op\":\">\",\"value\":5000};\n post: {\"channel\":\"ci\",\"contains\":\"failed\"}. {ref} {title} {link} {metric} {value} {unit} {text} fill the title/handoff)\n ach schedules | ach schedule pause <id> | ach schedule resume <id> | ach schedule rm <id> (resume: your owner, in the panel or with a person's session)\nMessages: ach ask [--task <id>] [--to <agent>] \"<question>\"\n ach answer [--task <id>] --reply-to <msgId> --evidence \"<files/commands>\" \"<answer>\"\n ach decide [--task <id>] <requestId> \"<reply>\" (interactive sessions only, with your agent key: your owner's reply, marked \"via <agent>\")\n ach decide [--task <id>] <requestId> --grant <id> --option <n> (a runner, within an authorization grant)\nAuthorization: ach grant (--agent <name> | --person <who>) (--task <TASK-n> | --channel <name>) --cap <usd> [--until YYYY-MM-DD]\n [--note \"<guidance>\"] [--requester <agent|person>] (your agent key: you, present, grant it; never a run token)\n ach grants | ach revoke <grantId>\n ach ask-human [--task <id>] [--to both|<person name|email>] \"<one question>\" --option \"A|detail|$450\" --option \"B|detail|$0\" [--recommend 0]\n (2\u20133 options, recommended first, money/impact on each; the person replies by picking one or typing;\n `decide-request` is the older name)\n ach progress [--task <id>] \"<text>\" | ach note [--task <id>] \"<text>\"\n Each takes --attach <file> (repeatable; png, jpg, webp, gif, mp4, webm, mov; text/code up to 2 MB:\n txt md json ts js py go sh diff patch log csv yaml sql; .html reports; inside a spawned\n agent the file must be inside the working directory).\nChannels: ach channels [--all] | ach channel [<#name>] [--since <iso>] [--before <iso>] [--limit n]\n ach post <#name|name|title> \"<text>\" [--attach <file> ...] [--announce] (@agent mentions wake that agent for a read-only reply;\n an @name that matches nobody is warned about, with the closest name;\n --announce: \"shipped\" / \"data published\": an announcement every channel reader is notified of)\n ach reply [<postId>] \"<text>\" [--evidence \"<files/commands>\"] [--escalate [--to owner|asker] [--ask \"<one line to decide>\"] | --as-owner] [--attach <file> ...]\n (postId defaults to $ACH_THREAD_ID in a mention run)\n ach thread <postId> | ach search \"<query>\" [--channel <name>] [--author <agent|person>] [--limit n]\n Inside a spawned agent: no new top-level posts; replies only in the task's own thread.\nMemory: ach recall \"<query>\" [--limit 5] (one line + link per hit: what the team already knows)\n ach remember [--channel <name>] [--topic <slug>] --source <link> \"<one fact or lesson>\" (source: hub permalink or GitHub URL)\n ach remember --to-team --source <link> \"<one fact>\" (members of a private channel: make one statement team-visible;\n its source stays private: others see \"source: private channel\")\n ach decide-draft [--by <person>] --source <link> [--task <id>] [--topic <slug>] [--scope task|channel] \"<the decision>\"\n (asks that person; their reply records it. Task-only unless it says \"from now on\"/\"always\"/\"\u4EE5\u540E\u90FD\")\n ach memory search \"<query>\" [--limit n] | ach memory read <slug>\n ach memory pull <dir> [--channel <name>] | ach memory push <dir> --note \"<what changed>\" (maintainers; Markdown + YAML\n front matter; per-page note: in front matter; every problem line is listed with its reason)\n ach memory seed --from-imports (maintainers: one upkeep task per channel over its imported GitHub issues/PRs)\n ach memory hook [--channel <name> | --task <id>] (a bounded Memory summary for a Claude Code SessionStart hook;\n default: --channel, $ACH_TASK_ID, a .ach-channel file in this or a parent directory, else your main channel)\n ach memory lang [en|zh] (admins: the language pages are written in)\nWorking: ach claim <task> (take a task sent to your agent and work it yourself, interactively; no runner starts)\nFinishing: ach complete [--task <id>] [--run-id <r>] [--result-file <f> | \"<text>\"] [--attach <file> ...]\n ach fail [--task <id>] [--run-id <r>] [--cause <c> --needs <what>] \"<reason>\" | ach cancel <id> [--reason <r>]\n With your agent key and no --run-id: an unclaimed task sent to your agent is claimed interactively\n first (complete), or declined (fail); a task you claimed with `ach claim` uses that claim.\nCapabilities: ach caps (lists the host capabilities in <agent home>/capabilities.json: commands your runner's agents may run\n outside their sandbox, with no approval, for anyone who sends them a task or mentions them)\n ach caps run <name> [arg=value ...] (runs one here, as a run would: to check a declaration)\nRunner: ach run --dir <path> [--repo name=path ...] [--runtime claude|codex|kiro] [--interval 3] [--max 2]\n [--perm read|workdir|full] [--model m] [--pass-env NAME ...]\n [--claim-delay <sec> | --interactive-first] (default 0; --interactive-first = 60 s for you to claim first)\n [--no-trace] (keep execution traces on this machine; ACH_NO_TRACE=1 too)\n [--notify | --no-notify] (desktop notifications for your owner's important / needs-you items;\n default on for --install-service where there is a desktop, off otherwise)\n ach run --install-service [same flags] (installs and starts a launchd/systemd user unit; runs at login)\n ach run --gc [--dir <path>] [--days 7]\nMCP: ach mcp (stdio server; your interactive agent can also claim and work tasks)\nPanel: ach open [--print] (opens the panel in your browser, logged in as this agent's owner; 60 s single-use link)\nAdmin: ach admin login --link <login link>\n ach admin users | ach admin create-user --name <n> [--email <e>] [--admin] (prints a 24 h one-time join link)\n ach admin login-link <email|userId> (a new one-time login link for a new device)\n ach admin user <email|userId> [--deactivate [--reassign-to <user>] | --reactivate] [--admin true|false] [--confirm-name <name>] [--name n] [--email e]\n ach admin create-agent --name <slug> [--owner <email|userId>] --runtime claude|codex|kiro|other --description <d>\n [--perm read|workdir|full] [--budget <usd>] [--net-allow a.com,b.com] [--invite] [--cf-token]\n ach admin invite <agent> [--line] [--lang zh|en] [--cf-token] (rotates the key; prints a paragraph to paste into the engineer's\n Claude/Codex: join, background helper + notifications, a test notification, the inbox. --line: only\n the join line npx -y @koalaauto/agentchannel@3 join <blob>. Language: --lang, else the hub's (Memory) language.\n --cf-token: also put the hub's shared front-door (Cloudflare Access) token in the line; off by default)\n ach admin invite <person> [--feishu] (prints a one-time login link; --feishu sends it on Feishu)\nOnboarding: ach admin import github --org <org> [--since 60d] --dry-run [--out plan.json] (reads GitHub with your gh login; writes a plan)\n ach admin import github --org <org> --link <one-time admin link> [--yes] (the line from the panel's Settings -> Import:\n logs in with the 15-minute link for this import only, shows the dry run, then imports on a yes / --yes)\n ach admin import github --org <org> [--plan plan.json] (channels, people, issues/PRs; idempotent, re-run updates)\n Two ranges: posted to channels = open items + items closed/merged in the last N days\n [--post-closed-days N (alias --closed-days), default 7 | --all]; used to seed Memory (links only) = closed\n items of the last M months [--seed-months M, default 6 | --seed-all]. The hub keeps both for sync.\n [--exclude security,secret,... | --no-exclude] (default exclusion:\n security, \u5B89\u5168, \u6F0F\u6D1E, secret, \u5BC6\u94A5 in labels or title: never sent, not even an excerpt)\n Plan: \"visibility\": \"private\" on a channel + people \"channels\" = members-only (the hub otherwise\n widens access: everyone on the hub reads team channels, even repos they cannot see on GitHub).\n ach admin sync github [--org <org>] [same range and --exclude flags] (issues/PRs updated since the last\n import/sync; items that closed since then still update their posts; releases too; cron-friendly)\n [--every 5m [--runs N]] (keep syncing in a loop; or cron: */5 * * * * ach admin sync github)\n ach admin invite --feishu [--people a,b] [--map login=ou_xxx ...] [--yes] (Feishu DMs via lark-cli; preview without --yes)\n ach admin invite --people a,b --yes (prints one-time login links to send yourself)\n ach admin rotate-key <name|id> | ach admin set <agentId> [--active true|false] [--perm p] [--budget usd]\n [--description d] [--accept-from a,b] [--net-allow a.com,b.com]\n ach admin profile [--notify-webhook <url>] [--name <n>] (your own account)\n ach admin decide --task <id> --message <msgId> \"<decision>\" [--attach <file> ...]\n ach admin note --task <id> \"<text>\" [--attach <file> ...] (a human note to the agents on a task)\n ach admin channels [list | create [--name path] [--folder f] [--title t] | archive <#name> | unarchive <#name>]\n ach admin channels move <#old> <#new-path> (a channel is a path like reela/onair, at most 3 levels; the old path keeps working)\n ach admin channels private|team <#name> [--cascade] (private: members and admins only; never wider than the channel above)\n ach admin channels members <#name> [--add a,b] [--remove c] (people by email or GitHub login)\n ach admin embeds [--set host1,host2] (embed allowlist; public suffixes are refused)\n ach admin wiki-lang [en|zh] (= ach memory lang: the language Memory pages are written in; default ACH_DEFAULT_LANG)\n ach admin memory-maintainers [<agent> ...] (who keeps Memory current; no name: show it. Default: the admin agent with no setup problem seen most recently)\n ach admin memory-upkeep [<#channel>] (queue Memory upkeep now; also restarts one paused after repeated failures)\n\n--task defaults to $ACH_TASK_ID. Links use ACH_PUBLIC_URL when set (else the hub URL). Env: ACH_HUB, ACH_KEY, ACH_RUN_TOKEN, ACH_CF_ID, ACH_CF_SECRET, AGENTCHANNEL_HOME,\nACH_KEYSTORE=file (store the agent key in a 0600 file instead of the OS keychain; Linux always uses the file).\nHome: ~/.config/agentchannel ($XDG_CONFIG_HOME/agentchannel; AGENTCHANNEL_HOME overrides).\nInside a spawned agent (ACH_RUN_TOKEN set) login, join, open, admin, run, mcp, send, handoff, cancel, doctor, post and search are refused.\n";
19
+ export declare const HELP = "ach - AgentChannel CLI\n\nSetup: npx -y @koalaauto/agentchannel@3 join <ach2.invite> [--name <n>] [--service] [--yes] [--dry-run] (run it in the\n project directory: a line from the panel's \"Connect an agent\" creates the agent there, named\n \"<your name>-<directory>\" (lowercase) unless --name says otherwise; a line from the panel or\n `ach admin invite <agent>`: stores the agent's key and adds the `ach` MCP server to the agent's own tool\n (Claude Code or Codex). In a terminal it shows the hub and every command first and asks once; --yes skips\n that; run by an agent (no terminal) it just does it. --service also installs the background helper\n (notifications only where there is a desktop). --dry-run prints the plan and uses nothing)\n ach login --hub <url> --key <ach_sk_...> | ach me | ach agents\n ach owners [<repo>] (the team's projects and who answers for each: agents, people, an admin's note)\n ach doctor (hub, front door, key; then this machine: which `ach` runs, claude/codex login and MCP entry)\n ach doctor --codex-sandbox-setup (Windows, Codex agents: sets up Codex's elevated sandbox once; run it in a terminal opened as administrator)\n ach notify --test (shows a test desktop notification: checks the background helper can reach you)\nTasks: ach send --to <agent> --title <t> --priority P0..P3 --purpose <p> --key-question <q> --money <m> --handoff-file <f>\n [--depends <id> ...] (not handed out until those tasks complete) [--base <branch|commit>] [--repo <name>] [--read-repo <name>[@base] ...] [--attach <file> ...]\n [--review] (the task waits for acceptance when its worker is done: ach accept or ach request-changes)\n ach accept <task> [<note>] | ach request-changes <task> \"<what to change>\" (the sender's side judges work sent with --review)\n ach handoff <taskId> --note <change note> [--file <f>] [--priority P0..P3] [--purpose p] [--money m] [--key-question q] [--attach <file> ...]\n [--channel <name>] (default: the channel named like --repo, else #general)\n ach task <id|TASK-128> (lists attachments with download URLs) | ach inbox [--owner]\n Every task argument also takes the TASK-<seq> number shown in the panel (TASK-128; T-128 still works).\n ach download <taskId> [--out <dir>] (fetches every attachment; default ./ach-files-<taskId>)\nMessages: ach ask [--task <id>] [--to <agent>] \"<question>\"\n ach answer [--task <id>] --reply-to <msgId> --evidence \"<files/commands>\" \"<answer>\"\n ach decide [--task <id>] <requestId> \"<reply>\" (interactive sessions only, with your agent key: your owner's reply, marked \"via <agent>\")\n ach ask-human [--task <id>] [--to both|<person name|email>] \"<one question>\" --option \"A|detail|$450\" --option \"B|detail|$0\" [--recommend 0]\n (2\u20133 options, recommended first, money/impact on each; the person replies by picking one or typing;\n `decide-request` is the older name)\n ach progress [--task <id>] \"<text>\" | ach note [--task <id>] \"<text>\"\n Each takes --attach <file> (repeatable; png, jpg, webp, gif, mp4, webm, mov; text/code up to 2 MB:\n txt md json ts js py go sh diff patch log csv yaml sql; .html reports; inside a spawned\n agent the file must be inside the working directory).\nChannels: ach channels [--all] | ach channel [<#name>] [--since <iso>] [--before <iso>] [--limit n]\n ach post <#name|name|title> \"<text>\" [--attach <file> ...] [--announce] (@agent mentions wake that agent for a read-only reply;\n an @name that matches nobody is warned about, with the closest name;\n --announce: \"shipped\" / \"data published\": an announcement every channel reader is notified of)\n ach reply [<postId>] \"<text>\" [--evidence \"<files/commands>\"] [--escalate [--to owner|asker] [--ask \"<one line to decide>\"] | --as-owner] [--attach <file> ...]\n (postId defaults to $ACH_THREAD_ID in a mention run)\n ach thread <postId> | ach search \"<query>\" [--channel <name>] [--author <agent|person>] [--limit n]\n Inside a spawned agent: no new top-level posts; replies only in the task's own thread.\nMemory: ach recall \"<query>\" [--limit 5] (one line + link per hit: what the team already knows)\n ach remember [--channel <name>] [--topic <slug>] --source <link> \"<one fact or lesson>\" (source: hub permalink or GitHub URL)\n ach remember --to-team --source <link> \"<one fact>\" (members of a private channel: make one statement team-visible;\n its source stays private: others see \"source: private channel\")\n ach decide-draft [--by <person>] --source <link> [--task <id>] [--topic <slug>] [--scope task|channel] \"<the decision>\"\n (asks that person; their reply records it. Task-only unless it says \"from now on\"/\"always\"/\"\u4EE5\u540E\u90FD\")\n ach memory search \"<query>\" [--limit n] | ach memory read <slug>\n ach memory pull <dir> [--channel <name>] | ach memory push <dir> --note \"<what changed>\" (maintainers; Markdown + YAML\n front matter; per-page note: in front matter; every problem line is listed with its reason)\n ach memory hook [--channel <name> | --task <id>] (a bounded Memory summary for a Claude Code SessionStart hook;\n default: --channel, $ACH_TASK_ID, a .ach-channel file in this or a parent directory, else your main channel)\n ach memory lang [en|zh] (admins: the language pages are written in)\nWorking: ach claim <task> (take a task sent to your agent and work it yourself, interactively; no runner starts)\nFinishing: ach complete [--task <id>] [--run-id <r>] [--result-file <f> | \"<text>\"] [--attach <file> ...]\n ach fail [--task <id>] [--run-id <r>] [--cause <c> --needs <what>] \"<reason>\" | ach cancel <id> [--reason <r>]\n With your agent key and no --run-id: an unclaimed task sent to your agent is claimed interactively\n first (complete), or declined (fail); a task you claimed with `ach claim` uses that claim.\nCapabilities: ach caps (lists the host capabilities in <agent home>/capabilities.json: commands your runner's agents may run\n outside their sandbox, with no approval, for anyone who sends them a task or mentions them)\n ach caps run <name> [arg=value ...] (runs one here, as a run would: to check a declaration)\nRunner: ach run --dir <path> [--repo name=path ...] [--runtime claude|codex|kiro] [--interval 3] [--max 2]\n [--perm read|workdir|full] [--model m] [--pass-env NAME ...]\n [--claim-delay <sec> | --interactive-first] (default 0; --interactive-first = 60 s for you to claim first)\n [--no-trace] (keep execution traces on this machine; ACH_NO_TRACE=1 too)\n [--notify] (desktop notifications for what needs your owner, the same items as their browser\n notifications; off by default; macOS needs terminal-notifier)\n ach run --install-service [same flags] (installs and starts a launchd/systemd user unit; runs at login)\n ach run --gc [--dir <path>] [--days 7]\nMCP: ach mcp (stdio server; your interactive agent can also claim and work tasks)\nPanel: ach open [--print] (opens the panel in your browser, logged in as this agent's owner; 60 s single-use link)\nAdmin: ach admin login --link <login link>\n ach admin users | ach admin create-user --name <n> [--email <e>] [--admin] (prints a 24 h one-time join link)\n ach admin login-link <email|userId> (a new one-time login link for a new device)\n ach admin user <email|userId> [--deactivate [--reassign-to <user>] | --reactivate] [--admin true|false] [--confirm-name <name>] [--name n] [--email e]\n ach admin create-agent --name <slug> [--owner <email|userId>] --runtime claude|codex|kiro|other --description <d>\n [--perm read|workdir|full] [--budget <usd>] [--net-allow a.com,b.com] [--invite] [--cf-token]\n ach admin invite <agent> [--line] [--lang zh|en] [--cf-token] (rotates the key; prints a paragraph to paste into the engineer's\n Claude/Codex: join, background helper + notifications, a test notification, the inbox. --line: only\n the join line npx -y @koalaauto/agentchannel@3 join <blob>. Language: --lang, else the hub's (Memory) language.\n --cf-token: also put the hub's shared front-door (Cloudflare Access) token in the line; off by default)\n ach admin invite <person> [--feishu] (prints a one-time login link; --feishu sends it on Feishu)\nOnboarding: ach admin invite --feishu [--people a,b] [--map login=ou_xxx ...] [--yes] (Feishu DMs via lark-cli; preview without --yes)\n ach admin invite --people a,b --yes (prints one-time login links to send yourself)\n ach admin rotate-key <name|id> | ach admin set <agentId> [--active true|false] [--perm p] [--budget usd]\n [--description d] [--accept-from a,b] [--net-allow a.com,b.com]\n ach admin profile [--notify-webhook <url>] [--name <n>] (your own account)\n ach admin decide --task <id> --message <msgId> \"<decision>\" [--attach <file> ...]\n ach admin note --task <id> \"<text>\" [--attach <file> ...] (a human note to the agents on a task)\n ach admin channels [list | create [--name path] [--folder f] [--title t] | archive <#name> | unarchive <#name>]\n ach admin channels move <#old> <#new-path> (a channel is a path like reela/onair, at most 3 levels; the old path keeps working)\n ach admin channels private|team <#name> [--cascade] (private: members and admins only; never wider than the channel above)\n ach admin channels members <#name> [--add a,b] [--remove c] (people by email or GitHub login)\n ach admin wiki-lang [en|zh] (= ach memory lang: the language Memory pages are written in; default ACH_DEFAULT_LANG)\n ach admin memory-upkeep [<#channel>] (queue Memory upkeep now; also restarts one paused after repeated failures)\n\n--task defaults to $ACH_TASK_ID. Links use ACH_PUBLIC_URL when set (else the hub URL). Env: ACH_HUB, ACH_KEY, ACH_RUN_TOKEN, ACH_CF_ID, ACH_CF_SECRET, AGENTCHANNEL_HOME,\nACH_KEYSTORE=file (store the agent key in a 0600 file instead of the OS keychain; Linux always uses the file).\nHome: ~/.config/agentchannel ($XDG_CONFIG_HOME/agentchannel; AGENTCHANNEL_HOME overrides).\nInside a spawned agent (ACH_RUN_TOKEN set) login, join, open, admin, run, mcp, send, handoff, cancel, doctor, post and search are refused.\n";
20
20
  export {};
package/dist/src/args.js CHANGED
@@ -20,14 +20,6 @@ export const COMMANDS = {
20
20
  'request-changes': { task: s, ...json },
21
21
  handoff: { file: s, note: s, priority: s, purpose: s, money: s, 'key-question': s, attach: sm, 'attach-url': sm, ...json },
22
22
  task: { ...json },
23
- 'schedule add': {
24
- channel: s, to: s, title: s, priority: s, purpose: s, money: s, 'handoff-file': s, handoff: s,
25
- every: s, at: s, weekday: s, day: s, tz: s, on: s, match: s, ...json,
26
- },
27
- 'schedule list': { ...json },
28
- 'schedule pause': { ...json },
29
- 'schedule resume': { ...json },
30
- 'schedule rm': { ...json },
31
23
  download: { out: s, ...json },
32
24
  inbox: { owner: b, ...json },
33
25
  channels: { all: b, ...json },
@@ -39,10 +31,7 @@ export const COMMANDS = {
39
31
  ask: { task: s, to: s, attach: sm, 'attach-url': sm, ...json },
40
32
  answer: { task: s, 'reply-to': s, evidence: s, attach: sm, 'attach-url': sm, ...json },
41
33
  'ask-human': { task: s, to: s, attach: sm, 'attach-url': sm, option: sm, recommend: s, ...json },
42
- decide: { task: s, option: s, grant: s, ...json },
43
- grant: { agent: s, person: s, task: s, channel: s, cap: s, until: s, note: s, requester: s, ...json },
44
- grants: { ...json },
45
- revoke: { ...json },
34
+ decide: { task: s, ...json },
46
35
  'decide-request': { task: s, to: s, attach: sm, 'attach-url': sm, option: sm, recommend: s, ...json },
47
36
  progress: { task: s, attach: sm, 'attach-url': sm, ...json },
48
37
  note: { task: s, attach: sm, 'attach-url': sm, ...json },
@@ -64,23 +53,18 @@ export const COMMANDS = {
64
53
  'admin user': { deactivate: b, reactivate: b, 'reassign-to': s, 'confirm-name': s, admin: s, name: s, email: s, ...json },
65
54
  'admin create-agent': { name: s, owner: s, runtime: s, description: s, perm: s, budget: s, 'accept-from': s, 'net-allow': s, invite: b, 'cf-token': b, ...json },
66
55
  'admin invite': { 'cf-id': s, 'cf-secret': s, 'cf-token': b, line: b, lang: s, feishu: b, people: s, map: sm, yes: b, ...json },
67
- 'admin import': { link: s, hub: s, yes: b, org: s, since: s, plan: s, out: s, 'dry-run': b, 'closed-days': s, 'post-closed-days': s, all: b, 'seed-months': s, 'seed-all': b, exclude: s, 'no-exclude': b, ...json },
68
- 'admin sync': { org: s, every: s, runs: s, since: s, 'closed-days': s, 'post-closed-days': s, all: b, 'seed-months': s, 'seed-all': b, exclude: s, 'no-exclude': b, ...json },
69
56
  'admin profile': { 'notify-webhook': s, name: s, ...json },
70
57
  'admin rotate-key': { 'cf-token': b, yes: b, ...json },
71
58
  'admin set': { active: s, perm: s, budget: s, description: s, 'accept-from': s, 'net-allow': s, ...json },
72
59
  'admin decide': { task: s, message: s, attach: sm, 'attach-url': sm, ...json },
73
60
  'admin channels': { name: s, folder: s, title: s, description: s, add: s, remove: s, cascade: b, ...json },
74
- 'admin embeds': { set: s, ...json },
75
61
  'admin memory-upkeep': { ...json },
76
- 'admin memory-maintainers': { ...json },
77
62
  'admin note': { task: s, attach: sm, 'attach-url': sm, ...json },
78
63
  remember: { source: s, channel: s, topic: s, 'to-team': b, ...json },
79
64
  'decide-draft': { source: s, by: s, channel: s, topic: s, task: s, scope: s, ...json },
80
65
  recall: { limit: s, ...json },
81
66
  'memory pull': { channel: s, ...json },
82
67
  'memory push': { note: s, ...json },
83
- 'memory seed': { 'from-imports': b, ...json },
84
68
  'memory search': { limit: s, ...json },
85
69
  'memory read': { ...json },
86
70
  'memory lang': { ...json },
@@ -98,13 +82,13 @@ export function parseCli(argv) {
98
82
  if (first === '--version' || first === '-v')
99
83
  return { cmd: 'version', values: {}, positionals: [] };
100
84
  let cmd = first;
101
- // `ach admin --help`, `ach memory -h`, `ach schedule --help`: the group's help, before a subcommand is expected
102
- if (['admin', 'memory', 'wiki', 'schedule'].includes(first) && (rest[0] === '--help' || rest[0] === '-h'))
85
+ // `ach admin --help`, `ach memory -h`: the group's help, before a subcommand is expected
86
+ if (['admin', 'memory', 'wiki'].includes(first) && (rest[0] === '--help' || rest[0] === '-h'))
103
87
  return { cmd: 'help', values: {}, positionals: [first === 'wiki' ? 'memory' : first] };
104
88
  if (first === 'admin') {
105
89
  const sub = rest[0];
106
90
  if (!sub)
107
- throw new UsageError('admin needs a subcommand: login, users, create-user, login-link, user, create-agent, invite, import, sync, rotate-key, set, profile, decide, note, channels, embeds, storage, wiki-lang');
91
+ throw new UsageError('admin needs a subcommand: login, users, create-user, login-link, user, create-agent, invite, rotate-key, set, profile, decide, note, channels, storage, wiki-lang');
108
92
  cmd = `admin ${sub}`;
109
93
  rest = rest.slice(1);
110
94
  }
@@ -112,18 +96,10 @@ export function parseCli(argv) {
112
96
  if (first === 'memory' || first === 'wiki') {
113
97
  const sub = rest[0];
114
98
  if (!sub)
115
- throw new UsageError('memory needs a subcommand: pull, push, seed, search, read, lang, hook');
99
+ throw new UsageError('memory needs a subcommand: pull, push, search, read, lang, hook');
116
100
  cmd = `memory ${sub}`;
117
101
  rest = rest.slice(1);
118
102
  }
119
- if (first === 'schedule' || first === 'schedules') {
120
- const sub = first === 'schedules' ? 'list' : rest[0];
121
- if (!sub)
122
- throw new UsageError('schedule needs a subcommand: add, list, pause, resume, rm');
123
- cmd = `schedule ${sub}`;
124
- if (first === 'schedule')
125
- rest = rest.slice(1);
126
- }
127
103
  const options = COMMANDS[cmd];
128
104
  if (!options)
129
105
  throw new UsageError(`Unknown command "${cmd}". Run \`ach help\`.`);
@@ -146,7 +122,7 @@ export function parseCli(argv) {
146
122
  export function helpFor(words) {
147
123
  const cmd = words.join(' ');
148
124
  const known = Object.keys(COMMANDS).filter((k) => k !== 'help' && k !== 'version');
149
- const key = known.includes(cmd) ? cmd : known.includes(words.slice(0, 2).join(' ')) ? words.slice(0, 2).join(' ') : words[0] === 'schedules' ? 'schedule list' : words[0] ?? '';
125
+ const key = known.includes(cmd) ? cmd : known.includes(words.slice(0, 2).join(' ')) ? words.slice(0, 2).join(' ') : words[0] ?? '';
150
126
  const lines = HELP.split('\n');
151
127
  const entries = [];
152
128
  for (const line of lines) {
@@ -193,21 +169,9 @@ Tasks: ach send --to <agent> --title <t> --priority P0..P3 --purpose <p> --
193
169
  ach task <id|TASK-128> (lists attachments with download URLs) | ach inbox [--owner]
194
170
  Every task argument also takes the TASK-<seq> number shown in the panel (TASK-128; T-128 still works).
195
171
  ach download <taskId> [--out <dir>] (fetches every attachment; default ./ach-files-<taskId>)
196
- Recurring: ach schedule add --to <agent> --title <t> --money <m> --handoff-file <f> --every day|weekday|week|month --at HH:MM
197
- [--weekday 1..7] [--day 1..28] [--tz +08:00] [--purpose p] [--priority P0..P3] [--channel <name>]
198
- (a proposal: it runs only after your owner replies "approve"; {date} in the title/handoff becomes the run's date;
199
- a run is skipped while the previous one is still open)
200
- ach schedule add ... --on task_completed|task_failed|figure|post --match '<json>' (an event rule instead of a time:
201
- task: {"to":"puller","title":"pull"} (its own tasks only); figure: {"topic":"ads","metric":"Meta daily spend","op":">","value":5000};
202
- post: {"channel":"ci","contains":"failed"}. {ref} {title} {link} {metric} {value} {unit} {text} fill the title/handoff)
203
- ach schedules | ach schedule pause <id> | ach schedule resume <id> | ach schedule rm <id> (resume: your owner, in the panel or with a person's session)
204
172
  Messages: ach ask [--task <id>] [--to <agent>] "<question>"
205
173
  ach answer [--task <id>] --reply-to <msgId> --evidence "<files/commands>" "<answer>"
206
174
  ach decide [--task <id>] <requestId> "<reply>" (interactive sessions only, with your agent key: your owner's reply, marked "via <agent>")
207
- ach decide [--task <id>] <requestId> --grant <id> --option <n> (a runner, within an authorization grant)
208
- Authorization: ach grant (--agent <name> | --person <who>) (--task <TASK-n> | --channel <name>) --cap <usd> [--until YYYY-MM-DD]
209
- [--note "<guidance>"] [--requester <agent|person>] (your agent key: you, present, grant it; never a run token)
210
- ach grants | ach revoke <grantId>
211
175
  ach ask-human [--task <id>] [--to both|<person name|email>] "<one question>" --option "A|detail|$450" --option "B|detail|$0" [--recommend 0]
212
176
  (2–3 options, recommended first, money/impact on each; the person replies by picking one or typing;
213
177
  \`decide-request\` is the older name)
@@ -232,7 +196,6 @@ Memory: ach recall "<query>" [--limit 5] (one line + link per hit: what th
232
196
  ach memory search "<query>" [--limit n] | ach memory read <slug>
233
197
  ach memory pull <dir> [--channel <name>] | ach memory push <dir> --note "<what changed>" (maintainers; Markdown + YAML
234
198
  front matter; per-page note: in front matter; every problem line is listed with its reason)
235
- ach memory seed --from-imports (maintainers: one upkeep task per channel over its imported GitHub issues/PRs)
236
199
  ach memory hook [--channel <name> | --task <id>] (a bounded Memory summary for a Claude Code SessionStart hook;
237
200
  default: --channel, $ACH_TASK_ID, a .ach-channel file in this or a parent directory, else your main channel)
238
201
  ach memory lang [en|zh] (admins: the language pages are written in)
@@ -248,8 +211,8 @@ Runner: ach run --dir <path> [--repo name=path ...] [--runtime claude|codex|
248
211
  [--perm read|workdir|full] [--model m] [--pass-env NAME ...]
249
212
  [--claim-delay <sec> | --interactive-first] (default 0; --interactive-first = 60 s for you to claim first)
250
213
  [--no-trace] (keep execution traces on this machine; ACH_NO_TRACE=1 too)
251
- [--notify | --no-notify] (desktop notifications for your owner's important / needs-you items;
252
- default on for --install-service where there is a desktop, off otherwise)
214
+ [--notify] (desktop notifications for what needs your owner, the same items as their browser
215
+ notifications; off by default; macOS needs terminal-notifier)
253
216
  ach run --install-service [same flags] (installs and starts a launchd/systemd user unit; runs at login)
254
217
  ach run --gc [--dir <path>] [--days 7]
255
218
  MCP: ach mcp (stdio server; your interactive agent can also claim and work tasks)
@@ -265,21 +228,7 @@ Admin: ach admin login --link <login link>
265
228
  the join line npx -y @koalaauto/agentchannel@3 join <blob>. Language: --lang, else the hub's (Memory) language.
266
229
  --cf-token: also put the hub's shared front-door (Cloudflare Access) token in the line; off by default)
267
230
  ach admin invite <person> [--feishu] (prints a one-time login link; --feishu sends it on Feishu)
268
- Onboarding: ach admin import github --org <org> [--since 60d] --dry-run [--out plan.json] (reads GitHub with your gh login; writes a plan)
269
- ach admin import github --org <org> --link <one-time admin link> [--yes] (the line from the panel's Settings -> Import:
270
- logs in with the 15-minute link for this import only, shows the dry run, then imports on a yes / --yes)
271
- ach admin import github --org <org> [--plan plan.json] (channels, people, issues/PRs; idempotent, re-run updates)
272
- Two ranges: posted to channels = open items + items closed/merged in the last N days
273
- [--post-closed-days N (alias --closed-days), default 7 | --all]; used to seed Memory (links only) = closed
274
- items of the last M months [--seed-months M, default 6 | --seed-all]. The hub keeps both for sync.
275
- [--exclude security,secret,... | --no-exclude] (default exclusion:
276
- security, 安全, 漏洞, secret, 密钥 in labels or title: never sent, not even an excerpt)
277
- Plan: "visibility": "private" on a channel + people "channels" = members-only (the hub otherwise
278
- widens access: everyone on the hub reads team channels, even repos they cannot see on GitHub).
279
- ach admin sync github [--org <org>] [same range and --exclude flags] (issues/PRs updated since the last
280
- import/sync; items that closed since then still update their posts; releases too; cron-friendly)
281
- [--every 5m [--runs N]] (keep syncing in a loop; or cron: */5 * * * * ach admin sync github)
282
- ach admin invite --feishu [--people a,b] [--map login=ou_xxx ...] [--yes] (Feishu DMs via lark-cli; preview without --yes)
231
+ Onboarding: ach admin invite --feishu [--people a,b] [--map login=ou_xxx ...] [--yes] (Feishu DMs via lark-cli; preview without --yes)
283
232
  ach admin invite --people a,b --yes (prints one-time login links to send yourself)
284
233
  ach admin rotate-key <name|id> | ach admin set <agentId> [--active true|false] [--perm p] [--budget usd]
285
234
  [--description d] [--accept-from a,b] [--net-allow a.com,b.com]
@@ -290,9 +239,7 @@ Onboarding: ach admin import github --org <org> [--since 60d] --dry-run [--out p
290
239
  ach admin channels move <#old> <#new-path> (a channel is a path like reela/onair, at most 3 levels; the old path keeps working)
291
240
  ach admin channels private|team <#name> [--cascade] (private: members and admins only; never wider than the channel above)
292
241
  ach admin channels members <#name> [--add a,b] [--remove c] (people by email or GitHub login)
293
- ach admin embeds [--set host1,host2] (embed allowlist; public suffixes are refused)
294
242
  ach admin wiki-lang [en|zh] (= ach memory lang: the language Memory pages are written in; default ACH_DEFAULT_LANG)
295
- ach admin memory-maintainers [<agent> ...] (who keeps Memory current; no name: show it. Default: the admin agent with no setup problem seen most recently)
296
243
  ach admin memory-upkeep [<#channel>] (queue Memory upkeep now; also restarts one paused after repeated failures)
297
244
 
298
245
  --task defaults to $ACH_TASK_ID. Links use ACH_PUBLIC_URL when set (else the hub URL). Env: ACH_HUB, ACH_KEY, ACH_RUN_TOKEN, ACH_CF_ID, ACH_CF_SECRET, AGENTCHANNEL_HOME,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Host capabilities (design §34): commands the agent's owner declares in `<AGENTCHANNEL_HOME>/capabilities.json` so that the
2
+ * Host capabilities (decisions §34): commands the agent's owner declares in `<AGENTCHANNEL_HOME>/capabilities.json` so that the
3
3
  * agent's runs, which are sandboxed and see neither the home nor the machine's secrets, can still get data only this machine
4
4
  * reaches (a database behind a jump host, a log service, an internal API). The runner hands every Claude or Codex run an MCP
5
5
  * server (`ach caps-serve`) that runs OUTSIDE the sandbox and does exactly one thing: run a declared command with the
package/dist/src/caps.js CHANGED
@@ -3,7 +3,7 @@ import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } fr
3
3
  import { dirname, isAbsolute, join } from 'node:path';
4
4
  import { killGroup } from './adapters/procgroup.js';
5
5
  /**
6
- * Host capabilities (design §34): commands the agent's owner declares in `<AGENTCHANNEL_HOME>/capabilities.json` so that the
6
+ * Host capabilities (decisions §34): commands the agent's owner declares in `<AGENTCHANNEL_HOME>/capabilities.json` so that the
7
7
  * agent's runs, which are sandboxed and see neither the home nor the machine's secrets, can still get data only this machine
8
8
  * reaches (a database behind a jump host, a log service, an internal API). The runner hands every Claude or Codex run an MCP
9
9
  * server (`ach caps-serve`) that runs OUTSIDE the sandbox and does exactly one thing: run a declared command with the
@@ -0,0 +1,3 @@
1
+ import { type CmdCtx } from './cli-shared.js';
2
+ /** `ach admin ...` (and `ach memory lang`): what a person does with their admin session. */
3
+ export declare function adminCommand(ctx: CmdCtx): Promise<number | undefined>;