Skip to content

Commit 0d90993

Browse files
Codename-11claude
andcommitted
docs: refresh refs/user-docs for this session's shipped features
- reference/mcp.md: add runs.open + runtimes.archive - forge-cli README: forge task + forge runtimes archive (commands reorg) - automation/api-keys.md: SESSION keys now purged (hourly sweep), not just rejected - guide/settings.md: ephemeralAgentIdleMinutes knob - agents/profiles-and-bindings.md: workspace Delete + instance-admin Remove - agents/runtimes.md: runtimes.archive ADMIN tool + forge runtimes archive Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent af55d57 commit 0d90993

6 files changed

Lines changed: 46 additions & 18 deletions

File tree

‎docs/agents/profiles-and-bindings.md‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ workspace, then layers per-workspace **policy** on top:
4646
Bind, set policy, and unbind from the workspace agents page at
4747
**`/w/[slug]/settings/agents`**. The **catalog** there lists the
4848
profiles available to bind (ones you own, plus instance-shared ones)
49-
that aren't already bound. All three actions — `bind`, `setPolicy`,
50-
`unbind` — are workspace-admin-gated.
51-
52-
::: tip Unbinding is non-destructive
53-
Unbinding archives the binding; runs, chats, and history are preserved.
54-
Re-binding the same profile reuses the archived row.
49+
that aren't already bound. The actions — `bind`, `setPolicy`, `unbind`,
50+
and `remove` — are workspace-admin-gated.
51+
52+
::: tip Unbind vs Delete
53+
**Unbind** archives the binding (reversible) — runs, chats, and history are
54+
preserved, and re-binding the same profile reuses the archived row.
55+
**Delete** (the trash action beside Unbind) is a *smart remove*: it
56+
hard-deletes a genuinely unused agent (no runs, comments, keys, or
57+
assignments) and otherwise archives it — so a deletion can never cascade
58+
away an agent's run history.
5559
:::
5660

5761
## Tier 3 — Instance policy
@@ -65,6 +69,11 @@ Two governance levers belong to the instance admin (see
6569
- **`disabledAt`** — a force-disable. A disabled profile (and all its
6670
bindings) refuses dispatch and chat. Distinct from `archivedAt`
6771
(deletion).
72+
- **Remove** — Instance Admin → Agents has a **Remove** action
73+
(`agents.profiles.remove`) beside Enable/Disable: it deletes a profile no
74+
workspace has bound, and archives one that still has bindings (so those
75+
agents aren't orphaned). Archived profiles drop out of the admin list and
76+
the bind-catalog.
6877

6978
## Requesting a profile
7079

‎docs/agents/runtimes.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,11 @@ Codex, container, and workspace versions from the runtime detail page.
136136

137137
## MCP tools (for runtimes that auto-register)
138138

139-
`runtimes.register`, `runtimes.heartbeat`, and `runtimes.configure` are
140-
`ADMIN`-scoped. The `forge` CLI's `daemon start` calls register/heartbeat;
141-
operators can call configure to set runtime config without direct DB access.
139+
`runtimes.register`, `runtimes.heartbeat`, `runtimes.configure`, and
140+
`runtimes.archive` are `ADMIN`-scoped. The `forge` CLI's `daemon start` calls
141+
register/heartbeat; operators can call configure to set runtime config, or
142+
`runtimes.archive` (`forge runtimes archive <id>`) to deregister a runtime,
143+
without direct DB access.
142144
`runtimes.reportInfo` is agent-linked rather than admin-scoped so a runtime
143145
bootstrap key can report its own sanitized metadata without broad operator
144146
permissions.

‎docs/automation/api-keys.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ wire format and auth path are identical for all kinds.
1414
|---|---|---|
1515
| `AGENT` | Linked to a specific agent via `linkedAgentId`. Permanent until revoked. | Hermes/runtime daemons, custom always-on bridges. |
1616
| `PERSONAL` | No agent link. Permanent until revoked. | Local Claude Code sessions, scripts, personal terminal access. |
17-
| `SESSION` | TTL-bounded via `expiresAt`. Auto-rejected after expiry. | Ephemeral Claude Code sessions, one-off Codex CLI runs. |
17+
| `SESSION` | TTL-bounded via `expiresAt`. Rejected at auth after expiry, then purged from the DB by an hourly sweep. | Ephemeral Claude Code sessions, one-off Codex CLI runs. |
1818

1919
`kind` is inferred automatically when using `access.create`: if `linkedAgentId` is
2020
provided, kind defaults to `AGENT`; otherwise `PERSONAL`. To create a session key,
@@ -231,7 +231,9 @@ Three tRPC mutations create workspace keys:
231231
- **`access.createPersonal`** — shorthand for `kind: PERSONAL` with no agent
232232
link. Suitable for scripts and local dev access.
233233
- **`access.createSession`** — shorthand for `kind: SESSION` with a required
234-
`ttlHours` (1–168, default 24). Auto-rejected after expiry.
234+
`ttlHours` (1–168, default 24). Rejected at auth after expiry, and purged
235+
from the DB by an hourly worker sweep so expired session keys don't
236+
accumulate (PERSONAL/AGENT keys with an expiry are left for an admin).
235237

236238
All three return `rawKey` in the response. Copy it immediately — the plaintext is
237239
shown exactly once and never stored.

‎docs/guide/settings.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ The top-level identity panel.
2525
`agentIdleTimeoutMinutes`, `requiredAckSeconds`,
2626
`autoRedispatchOnStall`, `autoRedispatchOnNoack`,
2727
`slaEnforcementEnabled`.
28+
- **Ephemeral agent cleanup** — `ephemeralAgentIdleMinutes` (0 = off):
29+
auto-archive an EPHEMERAL (session/CLI) agent that hasn't heartbeated for
30+
this long, so abandoned session rows don't pile up. Reversible; PERSISTENT
31+
agents (Hermes, etc.) are never touched.
2832

2933
The full table of knobs lives in
3034
[Workspaces → Workspace knobs](/guide/workspaces.html).

‎docs/reference/mcp.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ the broader Runtime primitive.
470470
| `register` | Create (or restore) a Runtime row. `{ name, kind, endpoint?, providersAvailable, info? }`. `ownerId` is set from the calling key's `userId`; AGENT-kind keys leave it null. |
471471
| `heartbeat` | Bump `Runtime.heartbeatAt`. `{ runtimeId, info? }`. Optional `info` updates sanitized runtime version/environment metadata. |
472472
| `list` | List workspace runtimes. `{ kind?, includeArchived? = false }` → mirror of `trpc.runtime.list` shape, includes `_count: { agents }` + `owner` summary. Secrets are redacted to `hasSecret`. |
473-
| `configure` | Update adapter config. `{ runtimeId, config, merge? = true }`. Hermes accepts `localWorkspaceTools`, `toolCapabilities`, `workspaceRoot`, and `modeToolPolicyEnforced`; Codex app-server also accepts sandbox/approval config. |
473+
| `configure` | Update adapter config. `{ runtimeId, config, merge? = true }`. Hermes accepts `localWorkspaceTools`, `toolCapabilities`, `workspaceRoot`, and `modeToolPolicyEnforced`; Codex app-server also accepts sandbox/approval config. Scope `ADMIN`. |
474+
| `archive` | Deregister (archive) a runtime — `{ runtimeId }` sets `archivedAt`, so it drops out of `list` (unless `includeArchived`). The teardown counterpart of `register`; exposed as `forge runtimes archive <id>`. Scope `ADMIN`. |
474475
| `reportInfo` | Agent-linked runtime metadata report. `{ runtimeId?, info }`; omitted `runtimeId` resolves to the calling agent's attached Runtime. Stores a sanitized whitelist such as `runtimeVersion`, `bridgeVersion`, `codexVersion`, `containerImage`, `hostname`, `os`, `arch`, and `workspaceRoot`. |
475476

476477
**`register`** is intentionally not deduping server-side — the CLI caches
@@ -484,6 +485,7 @@ heartbeat returns a missing-row error.
484485

485486
| Tool | Summary |
486487
|---|---|
488+
| `open` | Open (or resume) a tracked run on an issue **you** are working — `{ issueId, summary?, mode? }`. Requires an agent-linked key; the run belongs to the key's `linkedAgentId`. Resumes an existing ACTIVE/WAITING run for the `(issue, agent)` pair instead of stacking a duplicate, and stamps a STARTED event so it shows in Mission Control. Lets an agent (e.g. a local CLI session) proactively self-report work rather than only getting a run as a dispatch side-effect. Issue-anchored; drive it afterward with `recordUsage` / `setWaiting` / `complete`. Scope `WRITE_ISSUES`. |
487489
| `recordUsage` | Update token + cost columns on an `AgentRun`. `{ runId, tokensIn?, tokensOut?, tokensCached?, costUsd? }`. Idempotent — latest call replaces (cumulative as reported by the agent). |
488490
| `complete` | Close an active/waiting run. `{ runId, summary, producedArtifactIds?, verificationResult?, followUps?, confidence?, verdict? }`. Requires an agent-linked key matching the run. Execute enforces issue artifact/checklist gates; Research requires `confidence`; Review requires `verdict`; Discuss is reply-only. Stores `completionMeta` with the Forge run contract version. |
489491
| `setWaiting` / `resumeWork` | Mark a run blocked on the operator, or resume it. Requires an agent-linked key matching the run. |

‎tools/forge-cli/README.md‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,28 @@ On start the daemon:
9494
there's no `statuses.list` MCP tool to discover the workspace's
9595
category-mapped started status.
9696

97-
## Read-only commands
97+
## Commands
9898

9999
```bash
100+
# Read-only
100101
forge runtimes list # via runtimes.list MCP; --json, --archived
101-
forge runtimes configure <id> \
102-
--local-workspace-tools \
103-
--tool terminal --tool filesystem --tool git \
104-
--workspace-root /home/bailey/forge
105102
forge agents list # workspace bindings via agents.list; --json, --archived, --runtime <id>
106103
forge agents list --global # global AgentProfile defs via agents.profiles.list; --mine, --json, --archived
107104
forge issues list # most recent 25 issues
108105
forge issues list --mine # issues assigned to your linked agent
109-
forge issue assign AXI-42 victor
106+
107+
# Runtime config / teardown (ADMIN)
108+
forge runtimes configure <id> \
109+
--local-workspace-tools \
110+
--tool terminal --tool filesystem --tool git \
111+
--workspace-root /home/bailey/forge
112+
forge runtimes archive <id> # deregister (archive) a runtime via runtimes.archive
113+
114+
# Work
115+
forge issue assign AXI-42 victor # assign an existing issue to an agent
116+
forge task "Add a wake-word toggle" --agent victor # create an issue AND dispatch it
117+
forge task "Fix the flaky sprint test" # no --agent → queue for auto-dispatch
118+
# task also accepts --project <id>, --priority NONE|LOW|MEDIUM|HIGH|URGENT, --title "<title>"
110119
```
111120

112121
## Provider matrix

0 commit comments

Comments
 (0)