@remits/remits-cli 0.1.129 → 0.1.132
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/README.md +2 -0
- package/index.js +2021 -125
- package/package.json +1 -1
- package/skills/remits-cli/SKILL.md +15 -5
- package/skills/remits-cli/references/branch-variants.md +10 -4
- package/skills/remits-cli/references/cli-state.md +49 -20
- package/skills/remits-cli/references/command-reference.md +58 -10
- package/skills/remits-cli/references/component-integrity.md +2 -1
- package/skills/remits-cli/references/component-resolution.md +7 -0
- package/skills/remits-cli/references/development-loop.md +44 -6
- package/skills/remits-cli/references/support-tickets.md +3 -1
- package/skills/remits-cli/references/tool-reference.md +27 -5
- package/skills/remits-cli/references/troubleshooting.md +10 -8
package/package.json
CHANGED
|
@@ -136,8 +136,13 @@ reference named after it.
|
|
|
136
136
|
returns both lanes mixed; filter it yourself. (`account-targeting.md`)
|
|
137
137
|
- **"Tool call succeeded" means DISPATCHED, not that the tool did what you asked.** A tool that runs and
|
|
138
138
|
refuses returns HTTP 200 with its own `success: false`. For any mutating call, read `result.success`
|
|
139
|
-
from `./.remits-cli/tool-responses/<callId>.json`
|
|
139
|
+
from `./.remits-cli/actors/<local-agent>/tool-responses/<callId>.json` (or the legacy flat fallback
|
|
140
|
+
if `doctor local-state` says the response is there) before reporting the work as done.
|
|
140
141
|
(`tool-reference.md`)
|
|
142
|
+
- **Workspace and local actor are different.** `workspace` is the server-side staging lane namespace;
|
|
143
|
+
`local actor` is the repo-local filesystem namespace for session logs, tool responses, and verification
|
|
144
|
+
mirrors. Use `REMITS_AGENT_ID=<name>` or `--local-agent <name>` when agents share a checkout, and run
|
|
145
|
+
`remits-cli doctor local-state` when inheriting one. (`cli-state.md`, `component-resolution.md`)
|
|
141
146
|
- **Writing the code is not finishing the job.** A change is complete when it is verified — a Test
|
|
142
147
|
component (preferred, because it becomes regression protection) or a browser flow through
|
|
143
148
|
`remits-cli token`. "Just do it" and "that's fine, commit it" are not evidence. If you genuinely
|
|
@@ -183,6 +188,7 @@ reference named after it.
|
|
|
183
188
|
```bash
|
|
184
189
|
remits-cli whoami # account, user, branch, data mode, host for the NEXT tool call
|
|
185
190
|
remits-cli workspace use --auto # your own staging lane, named after this checkout
|
|
191
|
+
remits-cli doctor local-state # active local actor, state dir, tracked .remits-cli, legacy state
|
|
186
192
|
remits-cli components status # trunk or variant checkout, staging lane, workset vs overlay, who else is staging
|
|
187
193
|
remits-cli tools # which tools this account actually has (tools are per-account)
|
|
188
194
|
```
|
|
@@ -197,8 +203,12 @@ non-default host).
|
|
|
197
203
|
**Files that are decision inputs — read the one that governs the decision, do not rely on memory:**
|
|
198
204
|
`~/.remits-cli/account-repos.json` (every local repo, plus the reserved `platform` entry for the core
|
|
199
205
|
platform clone), `~/.remits-cli/sessions.json` (auth state and lanes), `~/.remits-cli/agents.json`
|
|
200
|
-
(agents registered here), `./.remits-cli/tool-responses/<callId>.json` (the full
|
|
201
|
-
repo's `account-info.json`. `cli-state.md` maps every remaining question to its
|
|
206
|
+
(agents registered here), `./.remits-cli/actors/<local-agent>/tool-responses/<callId>.json` (the full
|
|
207
|
+
tool payload), and the repo's `account-info.json`. `cli-state.md` maps every remaining question to its
|
|
208
|
+
file, including legacy flat `.remits-cli/` fallbacks.
|
|
209
|
+
Repo-local session JSONL is intentionally a bounded audit log: request payloads and ordinary response
|
|
210
|
+
bodies are summarized with keys, sizes, hashes, and redaction markers. Open actor-scoped tool response
|
|
211
|
+
files when you need the full tool result.
|
|
202
212
|
|
|
203
213
|
## Efficiency rules
|
|
204
214
|
|
|
@@ -209,8 +219,8 @@ Keep support and development sessions lean:
|
|
|
209
219
|
or for confirming what the live DB has stored after you already understand the files. For a ticket
|
|
210
220
|
with `implementationAccountId`, resolve that account's indexed repo first, pull the appropriate
|
|
211
221
|
branch when the checkout is clean, and inspect `account-info.json` + `components/` there.
|
|
212
|
-
- Do not read entire `.remits-cli/sessions/*.jsonl` or
|
|
213
|
-
to the relevant request, endpoint, tool, or ticket.
|
|
222
|
+
- Do not read entire `.remits-cli/actors/<local-agent>/sessions/*.jsonl` (or legacy flat session logs) or
|
|
223
|
+
large tool response files unless you first narrow to the relevant request, endpoint, tool, or ticket.
|
|
214
224
|
- Prefer targeted Firestore queries: use `documentId`, tight `filters`, narrow `fields`, and low `limit`
|
|
215
225
|
values instead of broad collection scans.
|
|
216
226
|
- Do not call `mcp_account_view` repeatedly once you already have the needed account/component context.
|
|
@@ -170,8 +170,9 @@ resolves `X`.
|
|
|
170
170
|
|
|
171
171
|
**Subscribing to a branch and resolving through it are different facts.** An account subscribes on an
|
|
172
172
|
edge; a *request* resolves through that edge only when something named the path (`--as-account`, the
|
|
173
|
-
edge's own host, an explicit `--variant-branch`)
|
|
174
|
-
|
|
173
|
+
edge's own host, an explicit `--variant-branch`), or when its links leave no doubt — a single upward link, or
|
|
174
|
+
several with exactly one carrying a branch, which every account beneath it inherits too. An account whose
|
|
175
|
+
several links carry several branches refuses to guess a path. So this is a normal, explainable state:
|
|
175
176
|
|
|
176
177
|
```
|
|
177
178
|
"componentBranch": null, // this token resolves TRUNK
|
|
@@ -421,9 +422,14 @@ a confirm-gated override when the removal guard refuses. Preview there is the sa
|
|
|
421
422
|
- A test/tool response reports `testComponentSource` as `staged` | `variant` | `db`, so you can see which
|
|
422
423
|
layer the run resolved without reading logs.
|
|
423
424
|
|
|
424
|
-
> **A
|
|
425
|
+
> **A trunk lane never overrides a variant.** Staged edits from your account's trunk branch do not reach an
|
|
426
|
+
> account whose branch overrides that component — production behaves the same way — so `test run` and `token`
|
|
427
|
+
> list them under **NOT RUN FOR THIS ACCOUNT** (`stagedMaskedByVariant`). To change what that account runs, edit
|
|
428
|
+
> the component on its variant branch.
|
|
429
|
+
>
|
|
430
|
+
> **A populated NON-trunk staging lane makes a variant look broken.** Anything carrying a CLI `TestMode` — a
|
|
425
431
|
> `remits-cli token` URL, `/s/<tokenKey>/...`, an `X-Auth-Token` request, a script-loader embed — resolves
|
|
426
|
-
>
|
|
432
|
+
> a variant-branch or feature-branch lane's STAGED layer, which outranks the variant. So with components staged under the same branch/user, a
|
|
427
433
|
> tokenized page reports `Component Branch: <branch>` but `Variant Applied: none` and renders trunk, while
|
|
428
434
|
> an anonymous `?account_id=` request to the same page reports the variant. That is the documented
|
|
429
435
|
> precedence (staged -> variant -> trunk) working correctly, and it reads exactly like "tokens break
|
|
@@ -36,14 +36,18 @@ These files are decision inputs. Read them when the related decision depends on
|
|
|
36
36
|
- Read when diagnosing service lifecycle, websocket, agent registration, or ticket-routing failures.
|
|
37
37
|
- `~/.remits-cli/sessions.json`
|
|
38
38
|
- Read when authentication state, active accounts, base URLs, websocket topics, or per-account data mode matters.
|
|
39
|
-
- `./.remits-cli/
|
|
40
|
-
-
|
|
41
|
-
- `./.remits-cli/
|
|
42
|
-
- Read
|
|
43
|
-
- `./.remits-cli/
|
|
39
|
+
- `./.remits-cli/workspace`
|
|
40
|
+
- The staging lane selector for this checkout. It is not the local filesystem session namespace.
|
|
41
|
+
- `./.remits-cli/actors/<local-agent>/current-session.txt`
|
|
42
|
+
- Read before opening repo-local session logs so you know which actor-scoped session file is current.
|
|
43
|
+
- `./.remits-cli/actors/<local-agent>/sessions/<current-session>.jsonl`
|
|
44
|
+
- Read when the question is about what HTTP calls this local actor recently made through remits-cli. Request entries and ordinary response bodies contain bounded summaries/hashes by default, not raw nested payloads.
|
|
45
|
+
- `./.remits-cli/actors/<local-agent>/tool-responses/<callId>.json`
|
|
44
46
|
- Read when `remits-cli tool` says the full payload was stored externally.
|
|
45
|
-
- `./.remits-cli/tools/tools.json`
|
|
47
|
+
- `./.remits-cli/shared/tools/tools.json`
|
|
46
48
|
- Read when the question is about available tool names, cached schemas, or why a tool invocation shape may be invalid.
|
|
49
|
+
- `./.remits-cli/actors/<local-agent>/verification/`
|
|
50
|
+
- Local mirror and active pointers for verification envelopes for this actor.
|
|
47
51
|
- `account-info.json`
|
|
48
52
|
- Read in the target repo before making component changes or assuming account ownership.
|
|
49
53
|
- `account-configurations.json`
|
|
@@ -67,15 +71,28 @@ Think about remits-cli as two cooperating layers:
|
|
|
67
71
|
2. **Per-repo state** in `./.remits-cli/`
|
|
68
72
|
- This is the request/response and cache layer for one specific working tree.
|
|
69
73
|
- It answers questions like:
|
|
70
|
-
- which
|
|
74
|
+
- which local actor/session log is current
|
|
71
75
|
- which `/cli/*` calls were made from this repo
|
|
72
76
|
- where a large tool response was written
|
|
73
77
|
- which tool schemas were most recently cached here
|
|
74
78
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
Per-repo state has two independent namespaces:
|
|
80
|
+
|
|
81
|
+
- **Workspace** (`--workspace`, `REMITS_WORKSPACE`, `.remits-cli/workspace`) chooses the server-side
|
|
82
|
+
Redis staging lane. It changes what staged entries a run resolves.
|
|
83
|
+
- **Local actor** (`--local-agent`, `REMITS_AGENT_ID`, generated fallback) chooses the local filesystem
|
|
84
|
+
namespace under `.remits-cli/actors/<local-agent>/`. It changes where session logs, tool responses,
|
|
85
|
+
verification mirrors, and diagnostics are written.
|
|
86
|
+
|
|
87
|
+
Run `remits-cli doctor local-state` to print the active actor, state directory, workspace source,
|
|
88
|
+
foreign actors, git-tracked `.remits-cli` files, legacy flat state, and large/suspicious logs.
|
|
89
|
+
|
|
90
|
+
Tool response files under `./.remits-cli/actors/<local-agent>/tool-responses/` are the full CLI results.
|
|
91
|
+
The CLI may print a size/hash hint for large files so you can inspect them selectively with `jq`, `rg`, or
|
|
92
|
+
byte-range reads, but it does not truncate the local JSON file. Legacy flat
|
|
93
|
+
`./.remits-cli/tool-responses/` files remain readable as fallback; `doctor local-state` labels them as
|
|
94
|
+
legacy state. Do not confuse this with the in-platform OpenRouter client, which can offload large tool
|
|
95
|
+
results inside the model conversation and inject a read-back tool for the AI.
|
|
79
96
|
|
|
80
97
|
When a user asks an indirect question, map it to the right layer first:
|
|
81
98
|
|
|
@@ -143,21 +160,33 @@ If the index file doesn't exist yet, run any `remits-cli` command from an accoun
|
|
|
143
160
|
- This is usually the best forensic file for "what happened?" questions.
|
|
144
161
|
|
|
145
162
|
**Per-repo** (`./.remits-cli/`):
|
|
146
|
-
- `
|
|
163
|
+
- `workspace`
|
|
164
|
+
- Staging lane selector for this checkout. Precedence is `--workspace` > `REMITS_WORKSPACE` >
|
|
165
|
+
`.remits-cli/workspace` > shared default lane. A workspace does not choose local log directories.
|
|
166
|
+
- `shared/tools/tools.json`
|
|
147
167
|
- Cached tool definitions for this repo context.
|
|
148
168
|
- Read this when tool availability or input shape is unclear.
|
|
149
|
-
- `sessions/<name>.jsonl`
|
|
150
|
-
-
|
|
151
|
-
- Tokens are redacted
|
|
169
|
+
- `actors/<local-agent>/sessions/<name>.jsonl`
|
|
170
|
+
- Actor-scoped HTTP request/response log for `/cli/*` calls.
|
|
171
|
+
- Tokens are redacted. Request payloads are summarized with keys, sizes, hashes, and redaction markers
|
|
172
|
+
by default; raw nested tool input is not logged unless `REMITS_CLI_UNSAFE_LOG_PAYLOADS=1` was set.
|
|
173
|
+
- Ordinary response bodies are also summarized so guide syncs, verification packets, and other large
|
|
174
|
+
responses do not bloat the session log. Full `remits-cli tool` results are stored in
|
|
175
|
+
`actors/<local-agent>/tool-responses/<callId>.json`.
|
|
152
176
|
- This is the first file to inspect when the question is "what exactly did remits-cli send or receive from this repo?"
|
|
153
|
-
- `tool-responses/<callId>.json`
|
|
177
|
+
- `actors/<local-agent>/tool-responses/<callId>.json`
|
|
154
178
|
- Full payload for `remits-cli tool` responses that were too large for the session log.
|
|
155
179
|
- Prefer this over terminal summaries when investigating tool behavior.
|
|
156
|
-
- `current-session.txt`
|
|
180
|
+
- `actors/<local-agent>/current-session.txt`
|
|
157
181
|
- Pointer to the active repo-local session log name.
|
|
158
|
-
|
|
182
|
+
- `actors/<local-agent>/verification/`
|
|
183
|
+
- Local verification envelope mirror and active context pointers for this actor.
|
|
184
|
+
- Legacy fallbacks: `sessions/`, `tool-responses/`, `verification/`, `tools/`, and `current-session.txt`
|
|
185
|
+
- New writes do not use these flat paths. Existing files remain readable for compatibility and are
|
|
186
|
+
reported by `remits-cli doctor local-state`.
|
|
159
187
|
|
|
160
188
|
Reading rules:
|
|
161
|
-
- Read `current-session.txt` before opening a session log by name.
|
|
162
|
-
- When a tool call says the response was stored externally, open `tool-responses/<callId>.json` instead of inferring from the terminal summary.
|
|
189
|
+
- Read `actors/<local-agent>/current-session.txt` before opening a session log by name.
|
|
190
|
+
- When a tool call says the response was stored externally, open `actors/<local-agent>/tool-responses/<callId>.json` instead of inferring from the terminal summary.
|
|
191
|
+
- Use `remits-cli doctor local-state` first when inheriting a checkout or when more than one actor directory exists.
|
|
163
192
|
- If a question spans both global and repo-local behavior, inspect both layers and explain which facts came from which layer.
|
|
@@ -85,10 +85,13 @@ deterministically:
|
|
|
85
85
|
remits-cli tool --name "mcp_run_action" --input '{"accountId":49,"actionId":200,"executionMode":"async","actionRunId":"my-stable-run-id","actionInput":{"sourceDocumentId":"..."}}' --data-mode prod
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
Every tool response is saved in full to
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
Every tool response is saved in full to
|
|
89
|
+
`./.remits-cli/actors/<local-agent>/tool-responses/<callId>.json`. Large responses may print an early
|
|
90
|
+
size/hash line and a selective-read hint before any preview text, but the saved CLI file is not truncated
|
|
91
|
+
or offloaded. Legacy flat `./.remits-cli/tool-responses/<callId>.json` files remain readable as fallback;
|
|
92
|
+
`remits-cli doctor local-state` shows which state belongs to the active actor. This is separate from the
|
|
93
|
+
platform's OpenRouter model loop, where the AI client may offload large tool results before feeding
|
|
94
|
+
context back to the model.
|
|
92
95
|
|
|
93
96
|
### Hierarchy-scoped tool reads
|
|
94
97
|
|
|
@@ -170,6 +173,8 @@ remits-cli agent work [--wait SECONDS] [--json]
|
|
|
170
173
|
remits-cli agent status [--state idle|working|paused] [--ticket ID] [--activity "..."] [--step "..."]
|
|
171
174
|
remits-cli agent list [--account-id ID] [--json]
|
|
172
175
|
remits-cli agent map [--account-ids 1,4] [--json] # who is EDITING which repository, from which checkout/branch/staging lane
|
|
176
|
+
remits-cli agent inspect [--account-id ID] [--scope self|children] [--user-id ID|--user-email EMAIL] [--limit N] [--json]
|
|
177
|
+
remits-cli activity inspect [--account-id ID] [--scope self|children] [--user-id ID|--user-email EMAIL] [--limit N] [--json]
|
|
173
178
|
remits-cli agent release
|
|
174
179
|
remits-cli ticket read|accept|status|progress|complete|release|reopen|assign|planning --ticket ID [--status S] [--resolution "..."] [--summary "..."] [--category C] [--assignee EMAIL] [--workstream VALUE] [--planned-in VALUE] [--board-stage VALUE] [--rank N] [--size VALUE] [--blocked-by VALUE] [--notes "..."]
|
|
175
180
|
remits-cli ticket lease|unlease|force-unlease --ticket ID [--reason "..."] # force-unlease breaks SOMEBODY ELSE'S lease; operator only
|
|
@@ -192,6 +197,7 @@ remits-cli start [--foreground true] [--port 8787]
|
|
|
192
197
|
remits-cli stop
|
|
193
198
|
remits-cli status [--base-url URL] [--account-id ID] [--data-mode test|prod] [--json]
|
|
194
199
|
remits-cli whoami [--base-url URL] [--account-id ID] [--data-mode test|prod] [--json]
|
|
200
|
+
remits-cli doctor local-state [--json] # active local actor, workspace source, legacy state, tracked .remits-cli files
|
|
195
201
|
remits-cli listen [stop|status] [--foreground true] # compatibility alias
|
|
196
202
|
remits-cli data-mode [set test|prod]
|
|
197
203
|
remits-cli components stage [--workset | --changed-only] [--branch <name>] [--workspace <name>] [--empty-workset clear] [--data-mode test|prod] [--json|--verbose] # default = FULL SNAPSHOT of the repo; --workset = only what git says changed, lane reconciled to it
|
|
@@ -210,13 +216,29 @@ remits-cli components branch <name> --subscribe <accountId> [--parent-account <i
|
|
|
210
216
|
remits-cli components branch <name> --unsubscribe <accountId> # return that account to trunk
|
|
211
217
|
remits-cli components branch <name> --retire [--force] # delete the branch's overlays
|
|
212
218
|
remits-cli test run --test <id|name> [--branch <stagingScope>] [--names "a|b"] [--watch true|false] [--data-mode test|prod] [--as-account <ID>] [--variant-branch <name|none>] [--json]
|
|
213
|
-
remits-cli test status --task-id <taskId> [--branch <stagingScope>] [--data-mode test|prod] [--json]
|
|
219
|
+
remits-cli test status --task-id <taskId> [--branch <stagingScope>] [--data-mode test|prod] [--json] # falls back to the DURABLE run record once the live status expires
|
|
220
|
+
remits-cli test runs [--test <id|name>] [--limit 20] [--compare] [--as-account <ID>] [--json] # durable run history: pass counts, live AI cost, lane, content hash
|
|
221
|
+
remits-cli test compare --base <taskId> --head <taskId> [--json] # per-case improved / regressed / changed, cost and world deltas
|
|
222
|
+
remits-cli corpus import --manifest corpus-manifest.json [--corpus <name>] [--as-account <ID>] [--data-mode test|prod --confirm-prod] [--json] # seed an evaluation corpus: cases + immutable artifacts; idempotent by caseKey
|
|
223
|
+
remits-cli corpus cases --corpus <name> [--split S] [--tag T|--tags T,U] [--key K|--keys K,L] [--include-values] [--include-retired] [--limit N] [--json]
|
|
224
|
+
remits-cli corpus runs --corpus <name> [--limit 20] [--json] # runs that measured the corpus: outcomes, AI mode (live|MOCKED|none), cost, world
|
|
225
|
+
remits-cli corpus results --corpus <name> [--case <caseKey>] [--task-id <taskId>] [--json]
|
|
226
|
+
remits-cli corpus compare --corpus <name> --base <taskId> --head <taskId> [--json] # per-case direction, metric deltas, expectedChanged
|
|
227
|
+
remits-cli corpus consistency --corpus <name> --case <caseKey> [--json] # did the case produce the same metrics every run?
|
|
228
|
+
remits-cli corpus retire --corpus <name> --case <caseKey> [--case ...] [--restore] [--json] # drop a case from future runs; past measurements stay readable
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
A run labelled **`AI MOCKED`** replayed every AI turn from `aiMock`: it produces the same outcomes, scores and
|
|
232
|
+
metrics a measured run would, so read that label before treating green as evidence. `compare` warns when base and
|
|
233
|
+
head used different AI modes; `consistency` warns before calling a case unstable when its runs mixed modes.
|
|
234
|
+
|
|
235
|
+
```bash
|
|
214
236
|
remits-cli token [--path <embeddablePathOrId>] [--data-mode test|prod] [--as-account <ID>] [--variant-branch <name|none>]
|
|
215
237
|
remits-cli token inspect --token <token|tokenKey|URL> # inspect token metadata, safety/dataMode evidence, and full context
|
|
216
238
|
remits-cli tools [--branch <name>] [--data-mode test|prod] [--variant-branch <name|none>]
|
|
217
239
|
remits-cli tool --name <toolName> [--branch <name>] [--input "{...}"] [--data-mode test|prod] [--variant-branch <name|none>] [--timeout-ms 60000] [--async true --wait true]
|
|
218
240
|
remits-cli tool status --call-id <callId> [--data-mode test|prod]
|
|
219
|
-
remits-cli verify start --summary "..." [--manifest file.json] [--ticket ID]
|
|
241
|
+
remits-cli verify start --summary "..." [--manifest file.json] [--ticket ID] [--data-mode test|prod] # default: test
|
|
220
242
|
remits-cli verify list [--max 50] [--json]
|
|
221
243
|
remits-cli verify use <envelopeId>
|
|
222
244
|
remits-cli verify current
|
|
@@ -241,6 +263,30 @@ remits-cli verify abandon --envelope ID --reason "..."
|
|
|
241
263
|
remits-cli verify supersede --envelope ID --superseded-by <envelopeId> [--reason "..."]
|
|
242
264
|
```
|
|
243
265
|
|
|
266
|
+
### Activity inspection
|
|
267
|
+
|
|
268
|
+
`remits-cli activity inspect` is a read-only operator view for understanding an agent or account
|
|
269
|
+
workstream without touching a checkout or staging lane. It joins the current staging-lane registry,
|
|
270
|
+
verification envelopes, durable Test runs, corpus measurements, and live CLI agent presence, then adds
|
|
271
|
+
heuristic smell signals such as shared lanes, broad overlays, retained staged entries, unfinished
|
|
272
|
+
verification, current evidence failures, repeated test failures, corpus failures, and tests that were run
|
|
273
|
+
outside a verification envelope.
|
|
274
|
+
|
|
275
|
+
Use it from the platform repo when a remote agent fleet is looping or a human reports that work is going
|
|
276
|
+
around in circles:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
remits-cli activity inspect --account-id 4 --scope children --data-mode test
|
|
280
|
+
remits-cli activity inspect --account-id 4 --scope children --user-email jason@example.com --json
|
|
281
|
+
remits-cli agent inspect --account-id 1742 --limit 50
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
`--scope children` expands from the selected account to its hierarchy children, which is usually the right
|
|
285
|
+
shape for platform-level review. `--user-id` / `--user-email` filters the stream to one CLI user when the
|
|
286
|
+
platform can identify them from staged lanes, envelopes, tests, or live agent registration. `--json`
|
|
287
|
+
returns the full structured payload for deeper analysis; the text view is intentionally compact and
|
|
288
|
+
human-readable.
|
|
289
|
+
|
|
244
290
|
### Verification envelopes
|
|
245
291
|
|
|
246
292
|
Use a verification envelope for workflow-shaped work: concrete user journeys, browser-facing changes,
|
|
@@ -254,10 +300,12 @@ remits-cli components status
|
|
|
254
300
|
remits-cli verify start --summary "Hosted upload updates an existing profile" --manifest acceptance.json
|
|
255
301
|
```
|
|
256
302
|
|
|
257
|
-
An active envelope is stored per command world
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
303
|
+
An active envelope is stored per command world (`baseUrl + accountId + branch + workspace + dataMode`)
|
|
304
|
+
inside the active local actor's mirror:
|
|
305
|
+
`./.remits-cli/actors/<local-agent>/verification/active-contexts.json`. The legacy flat
|
|
306
|
+
`./.remits-cli/verification/active` pointer is still understood for compatibility, but normal
|
|
307
|
+
auto-attachment uses the actor-scoped context map, so one actor's localhost envelope does not silently
|
|
308
|
+
capture another actor's production command. Stage/test/token/tool/sync commands attach evidence
|
|
261
309
|
automatically while an envelope is active for that context. The explicit wrappers do the same thing and
|
|
262
310
|
make the intent visible in terminal history:
|
|
263
311
|
|
|
@@ -192,7 +192,8 @@ file is catastrophic.
|
|
|
192
192
|
If sync reports unexpected `deleted` / `created` / `renamed`, uniqueness errors, or missing components — or you
|
|
193
193
|
discover id drift — **stop. Do not re-run sync, do not `components commit`, and do not create replacement
|
|
194
194
|
components to "make ids line up" or replace a deleted component.** Those actions compound the corruption.
|
|
195
|
-
|
|
195
|
+
Run `remits-cli doctor local-state`, preserve the active actor's repo-local session log and tool
|
|
196
|
+
responses, and reconcile source-of-truth first.
|
|
196
197
|
|
|
197
198
|
**Safe recovery pattern (repo ↔ DB drift):**
|
|
198
199
|
1. Establish DB truth: `mcp_account_view` for the full live inventory; `mcp_component_view` to confirm and read
|
|
@@ -202,6 +202,13 @@ account, and the run still resolves whatever committed variant branch the accoun
|
|
|
202
202
|
does **not** have the side effects of inventing a throwaway git branch per agent (which would make a
|
|
203
203
|
commit write `ComponentVariant` overlays for a branch nobody subscribes to).
|
|
204
204
|
|
|
205
|
+
Workspace is not the repo-local filesystem identity. The CLI also has a **local actor** namespace
|
|
206
|
+
(`REMITS_AGENT_ID` or `--local-agent`) for `.remits-cli/actors/<local-agent>/` session logs, tool
|
|
207
|
+
responses, verification mirrors, and diagnostics. Two agents that share one checkout should set distinct
|
|
208
|
+
local actors even if they intentionally use the same or different staging workspaces. Run
|
|
209
|
+
`remits-cli doctor local-state` to see the active actor, state directory, legacy flat state, and other
|
|
210
|
+
actor directories.
|
|
211
|
+
|
|
205
212
|
- `.remits-cli/workspace` is per-checkout and gitignored, so each clone keeps its own lane.
|
|
206
213
|
- Precedence: `--workspace NAME` > `REMITS_WORKSPACE` > `.remits-cli/workspace` > shared default lane.
|
|
207
214
|
- `--no-workspace` targets the shared lane for one command without clearing the file.
|
|
@@ -77,12 +77,32 @@ remits-cli verify start --summary "Hosted upload updates an existing profile" --
|
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
The envelope records the account, host, data lane, branch, workspace, git heads, staging lane, and the
|
|
80
|
-
acceptance manifest. It is mirrored locally under
|
|
81
|
-
|
|
80
|
+
acceptance manifest. It is mirrored locally under
|
|
81
|
+
`.remits-cli/actors/<local-agent>/verification/<envelopeId>/` and becomes active for this local actor and
|
|
82
|
+
command world. While active, `components stage`, `components status`, `test run`, `token`,
|
|
82
83
|
`token inspect`, `tool`, and `components sync` attach evidence packets automatically; pass
|
|
83
84
|
`--verify-envelope <id>` to name one explicitly or `--no-verify-envelope` when a command should not be
|
|
84
85
|
attached.
|
|
85
86
|
|
|
87
|
+
`verify start` proves in the **test** lane unless you pass `--data-mode prod` (your session's lane does not
|
|
88
|
+
decide it). One envelope is active per checkout world (host, account, git branch, workspace); the data lane
|
|
89
|
+
is not part of that selection.
|
|
90
|
+
|
|
91
|
+
Before stage, test run, token, tool, sync or commit runs, the CLI asks the platform whether its evidence
|
|
92
|
+
would count for the active envelope:
|
|
93
|
+
|
|
94
|
+
- **attach**: same world, so the evidence attaches.
|
|
95
|
+
- **refuse**: different world and a required evidence item could use this packet. Nothing ran, and the
|
|
96
|
+
refusal names the fix (`--data-mode prod`, `--as-account 21`, `--workspace x`, ...). Apply the fix that
|
|
97
|
+
matches your intent. Use `--no-verify-envelope` when the run is not meant as proof, or `verify start` when
|
|
98
|
+
it is different work. `--allow-wrong-world-evidence` only records context; that evidence never satisfies
|
|
99
|
+
anything.
|
|
100
|
+
- **detach**: different world and nothing in the manifest could use it. The command runs and one line says
|
|
101
|
+
nothing was attached.
|
|
102
|
+
|
|
103
|
+
`verify current` / `verify use` print whether a plain `test run` from this checkout would attach, so you can
|
|
104
|
+
catch a mismatch before the first run.
|
|
105
|
+
|
|
86
106
|
Use the wrappers when you want the intent to be unmistakable:
|
|
87
107
|
|
|
88
108
|
```bash
|
|
@@ -345,10 +365,26 @@ remits-cli test run --test "Invoice Tests" --names "specific test case"
|
|
|
345
365
|
remits-cli test status --task-id <TASK_ID>
|
|
346
366
|
```
|
|
347
367
|
|
|
348
|
-
Tests run on the platform against your staged snapshot. They stream results in real-time.
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
368
|
+
Tests run on the platform against your staged snapshot. They stream results in real-time. **Read the
|
|
369
|
+
`World:` block printed before the run** — host, execution account, data lane, component world, staging lane
|
|
370
|
+
id + content hash, platform sync vs local HEAD. If it is not the world you meant, stop: the result will be
|
|
371
|
+
about a different world.
|
|
372
|
+
|
|
373
|
+
If cases fail, read the printed summary and pivots first: each case has an `outcome`
|
|
374
|
+
(`failed`, `error`, `budget_exceeded`, `provider_unavailable`, …) with its reason, timing, trace id, AI usage
|
|
375
|
+
(live vs mocked, cost), bounded `report(...)` diagnostics, live HTTP signals, and resolved component
|
|
376
|
+
provenance. Fix the code, re-stage, and re-run only after those pivots explain the failure.
|
|
377
|
+
|
|
378
|
+
Every finished run is recorded durably: `remits-cli test status --task-id <id>` answers after the live status
|
|
379
|
+
expires, `remits-cli test runs --test <name> --compare` compares the latest run with the previous one, and
|
|
380
|
+
`remits-cli test compare --base <id> --head <id>` compares any two. For evaluation suites (a `corpus(name)` of
|
|
381
|
+
cases seeded with `remits-cli corpus import`, one case per corpus case, intentional live AI inside
|
|
382
|
+
`withAiBudget(...)`, measurements compared with `remits-cli corpus compare` / `corpus consistency`), read
|
|
383
|
+
`guides/test-components.md` → *Evaluation Suites And Corpora*.
|
|
384
|
+
Use `remits-cli corpus cases --corpus <name> --split dev --tag reviewed --key case-001` to inspect subsets;
|
|
385
|
+
`split`, repeated/comma-separated tags, keys and `limit` are applied on the platform before rows are returned.
|
|
386
|
+
For per-case AI totals, start and await the workflow inside that `test(...)` case; setup and late async calls are
|
|
387
|
+
only visible in the persisted run-level AI history.
|
|
352
388
|
|
|
353
389
|
Important test-runner constraints:
|
|
354
390
|
- `remits-cli test run` now defaults to `test` dataMode unless you explicitly pass `--data-mode prod`.
|
|
@@ -553,6 +589,8 @@ The CLI now returns the post-sync branch SHA from the platform and verifies that
|
|
|
553
589
|
subcommand help variants such as `remits-cli components commit --help` to discover behavior. Consult the `remits-cli` skill and its references,
|
|
554
590
|
the CLI source, or `remits-cli components` documentation instead. If an exploratory or commit command behaves
|
|
555
591
|
unexpectedly, stop and inspect the repo-local session log before running any mutating follow-up command.
|
|
592
|
+
Use `remits-cli doctor local-state` first if you did not create the checkout; it names the active local
|
|
593
|
+
actor and points at the actor-scoped session log/tool-response directories.
|
|
556
594
|
|
|
557
595
|
**Git is required for durable sync.** The platform syncs by pulling from the git remote (`GitHubClient.syncFromRepository`). If `git push` fails, the server has nothing new to sync. You can still **stage** and **test** without git — only durable sync requires it.
|
|
558
596
|
|
|
@@ -202,7 +202,9 @@ remits-cli verify start --ticket 22454 --summary "Fix hosted upload recovery"
|
|
|
202
202
|
```
|
|
203
203
|
|
|
204
204
|
Keep it active while you stage, run Tests, mint browser tokens, call tools, and sync. Those commands
|
|
205
|
-
attach evidence packets to the platform envelope and mirror them locally under
|
|
205
|
+
attach evidence packets to the platform envelope and mirror them locally under
|
|
206
|
+
`.remits-cli/actors/<local-agent>/verification/`. Use `remits-cli doctor local-state` when handing off a
|
|
207
|
+
checkout so the next agent can see which local actor owns the mirror.
|
|
206
208
|
Before completing or handing off the ticket, run:
|
|
207
209
|
|
|
208
210
|
```bash
|
|
@@ -47,7 +47,9 @@
|
|
|
47
47
|
remits-cli tool --name "mcp_firestore_search" --input '{"accountId": 37, "collection": "invoices"}' --data-mode prod
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
Response saved to `./.remits-cli/tool-responses/<callId>.json`. Read the file to
|
|
50
|
+
Response saved to `./.remits-cli/actors/<local-agent>/tool-responses/<callId>.json`. Read the file to
|
|
51
|
+
see results. Legacy flat `./.remits-cli/tool-responses/<callId>.json` files remain readable as fallback;
|
|
52
|
+
`remits-cli doctor local-state` shows both locations.
|
|
51
53
|
|
|
52
54
|
**"Tool call succeeded" means DISPATCHED, not that the tool did what you asked.** A tool that runs
|
|
53
55
|
and refuses — an unmet precondition, a rejected enum value, a failed validation — returns HTTP 200
|
|
@@ -235,9 +237,10 @@ client accounts beneath it:
|
|
|
235
237
|
> is a fully supported shape: it resolves the branch, **and so do all of its descendants**. You do not need
|
|
236
238
|
> to make the subscriber a structural child of its owner.
|
|
237
239
|
>
|
|
238
|
-
>
|
|
239
|
-
>
|
|
240
|
-
>
|
|
240
|
+
> Several upward links are fine when exactly one carries the branch: the account and its descendants roll up
|
|
241
|
+
> through that subscription. What is NOT resolved by default is genuine **ambiguity** — several links and no
|
|
242
|
+
> single subscription among them. That account (and its descendants) resolve nothing above it until a request
|
|
243
|
+
> names the path: `--as-account`, `--variant-branch`, or the edge's own host.
|
|
241
244
|
> An account that has a `parentId` **and** a separate membership edge carrying the branch is this case: the
|
|
242
245
|
> `parentId` wins, so put the branch on the link the account actually inherits through.
|
|
243
246
|
>
|
|
@@ -373,7 +376,9 @@ Front-stage references:
|
|
|
373
376
|
| Parameter | Required | Description |
|
|
374
377
|
|-----------|----------|-------------|
|
|
375
378
|
| `action` | no | `search` (default), `detail`, or session control `pause`/`unpause`/`interrupt` |
|
|
376
|
-
| `dataMode` | no | Explicit execution lane: `prod` or `test`. Response echoes
|
|
379
|
+
| `dataMode` | no | Explicit execution lane: `prod` or `test`. Response echoes the lane THIS CALL ran in. A grouping's own lane is on each row as `lanes` (from the per-turn lane the platform records). |
|
|
380
|
+
| `testTaskId` | no | Search mode: only groupings caused by this Test suite run (`taskId` from `remits-cli test run`) |
|
|
381
|
+
| `lane` | no | Search mode: `test` or `prod` — the lane the grouping's AI turns ran in |
|
|
377
382
|
| `search` | no | Broad text match against session IDs and grouping IDs |
|
|
378
383
|
| `sessionId` | no | Session ID filter in search mode, or grouping/session key in detail mode |
|
|
379
384
|
| `groupingId` | no | Grouping ID filter in search mode, or grouping key in detail mode |
|
|
@@ -393,6 +398,13 @@ Front-stage references:
|
|
|
393
398
|
| `toolCallIds` | no | Detail mode: return the FULL exact input/result from `ai_tool_call` for these tool-call ids (what the tool PRODUCED — see the lens caveat) |
|
|
394
399
|
| `consolidateContext` | no | When `true`, collapses repeated XML-like prompt context into a consolidated section |
|
|
395
400
|
|
|
401
|
+
Spend: each search row carries `liveRequestCount`, `mockedRequestCount`, `lanes`, `testTaskId` and
|
|
402
|
+
`estimatedCost`/`estimatedCostUsd` = **live spend only** (a mocked turn is never priced, even when it replays a
|
|
403
|
+
recording with a cost). `pageTotals` sums the page. Turns recorded before the platform stored the mock flag are
|
|
404
|
+
`unclassified` — unverified, not spend. A custom `range` with an unparseable `from`/`to`, or an unknown `range`,
|
|
405
|
+
is refused rather than silently widened; the applied bounds are echoed as `filters.rangeStart`/`rangeEnd`.
|
|
406
|
+
To audit one Test run: `{"action":"search","testTaskId":"<taskId>","pageSize":100}`.
|
|
407
|
+
|
|
396
408
|
Audit flow: `action:"search"` to find the grouping → `action:"detail"` + `summaryOnly:true` for the MAP → re-call detail with `recordIds`/`toolCallIds` + `parts` to open exactly what you need. Prefer the map → open flow over a full-detail dump. Remember the two-lens rule: `tool_calls`/`toolCallIds` is what the tool PRODUCED; `conversation_messages`/`transcript` is what the AI CONSUMED (after any `_offload`/`_hideResult`/`_message`/supersede/evict transform).
|
|
397
409
|
|
|
398
410
|
### `mcp_run_action`
|
|
@@ -448,6 +460,16 @@ Returned fields on the async/event start: `actionRunId`, `status:"running"`, `ex
|
|
|
448
460
|
`threadGroupingId`, `componentSource`, `componentSignature`, and (event mode) `eventId`/`eventStatus`. The
|
|
449
461
|
`status` poll adds `result` on completion, or `message`/`error` on failure.
|
|
450
462
|
|
|
463
|
+
Every response (describe, direct, async start, and failures) also states the world the run resolved:
|
|
464
|
+
`executionAccountId`, `componentOwnerAccountId`, `componentSource` (`staged` / `variant` / `db`),
|
|
465
|
+
`componentSignature`, `componentBranch`, `stagingLane`, `dataMode`, `workspace`, and `traceId`. Direct runs add
|
|
466
|
+
`aiUsage` (live vs mocked calls and live cost for the run's trace).
|
|
467
|
+
|
|
468
|
+
**A staged-only `new_` Action runs by name.** Its `actionId` is `null` and the response says why
|
|
469
|
+
(`componentIdNote`) — that is valid, not "missing". When a name does not resolve, the error lists the accounts
|
|
470
|
+
searched, the staging lane (branch + workspace) and the staged Actions it holds, the component branch, and the
|
|
471
|
+
closest existing names; check that the lane named there is the one you staged into.
|
|
472
|
+
|
|
451
473
|
> **In event mode the EVENT is the source of truth, not the promise.** `status` is driven by the Event's
|
|
452
474
|
> own state; the value the dispatch call returned is reported separately as `dispatchResult` and is **not**
|
|
453
475
|
> the Action's result. Read `eventStatus` for the outcome.
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
| Stage shows 0 updated | No changes since last stage (hash dedup) |
|
|
23
23
|
| Test runs old code after edit | You forgot to stage, or you are looking at DB while a staged entry is still active. Run `remits-cli components status`; then `remits-cli components stage` to update staged code or `remits-cli components clear` to fall back to DB. |
|
|
24
24
|
| "Git credentials" or `git push` error | Git auth is required for commit (server pulls from git remote). Fix git authentication (SSH keys or HTTPS credentials) before retrying. Staging and testing still work without git. |
|
|
25
|
-
| Need to learn command behavior | Read the `remits-cli` skill and its references, repo docs, or CLI source. Do not run unsupported mutating subcommand variants such as `remits-cli components commit --help`; if a command unexpectedly mutates or commits,
|
|
25
|
+
| Need to learn command behavior | Read the `remits-cli` skill and its references, repo docs, or CLI source. Do not run unsupported mutating subcommand variants such as `remits-cli components commit --help`; if a command unexpectedly mutates or commits, run `remits-cli doctor local-state` and inspect the active actor's repo-local session log before doing anything else. |
|
|
26
26
|
| Sync response reports unexpected deletes, creates, renames, uniqueness errors, or component ID drift | Stop immediately. Do not rerun sync, do not create replacement components to paper over the mismatch, and do not promote more changes. Preserve session logs/tool responses, compare `account-info.json`, local filenames, live inventory, and git history, then prepare a repair/escalation summary. |
|
|
27
27
|
| 500 / `Internal Server Error` from Remits | Stop normal task work. Capture the exact command, error, and response artifact, then escalate to a Remits system admin. Do not invent a workaround. |
|
|
28
|
-
| Tool parameters rejected | Tool schemas may be cached. Run `remits-cli tools` to refresh `.remits-cli/tools/tools.json` with latest schemas. |
|
|
29
|
-
| Tool response missing |
|
|
28
|
+
| Tool parameters rejected | Tool schemas may be cached. Run `remits-cli tools` to refresh `.remits-cli/shared/tools/tools.json` with latest schemas. |
|
|
29
|
+
| Tool response missing | Run `remits-cli doctor local-state`, then check `./.remits-cli/actors/<local-agent>/tool-responses/` and any legacy flat `./.remits-cli/tool-responses/` fallback it reports. |
|
|
30
30
|
| Long-running tool times out | For `mcp_run_action`/`mcp_run_agent`, use the tool's own `executionMode:"async"` and poll with a `controlAction:"status"` call (see `command-reference.md` → *Tool Execution Lifecycle*). For other long tools without their own async, use `remits-cli tool --async true` and poll `remits-cli tool status --call-id <callId>`. `--timeout-ms` only adjusts the per-request HTTP timeout; it is not a substitute for async. |
|
|
31
|
-
| Need to continue tracking a long Action or Agent after terminal disconnect | Read `./.remits-cli/tool-responses/<callId>.json` for the returned `actionRunId`/`agentRunId`/`sessionId`/`threadGroupingId
|
|
31
|
+
| Need to continue tracking a long Action or Agent after terminal disconnect | Read `./.remits-cli/actors/<local-agent>/tool-responses/<callId>.json` for the returned `actionRunId`/`agentRunId`/`sessionId`/`threadGroupingId` (or the legacy flat fallback if `doctor local-state` reports it there). Re-poll the run with a `controlAction:"status"` call carrying that `actionRunId`/`agentRunId`, or inspect the agent session via `mcp_ai_session_search` with the `sessionId`. |
|
|
32
32
|
| Staged change has no effect in a live (non-CLI) run | Staged overrides resolve only under a CLI TestMode (`branchName`+`cliUserId`). Live webhooks and other non-CLI runtime paths still use the DB (trunk, or the account's subscribed variant). `commit` to make it durable. See `component-resolution.md`. |
|
|
33
33
|
| Need to know an account's shape (role, type, parents, namespace, branch, host/login routes) | Read `resolution` — from the repo's `account-info.json`, or `mcp_account_user_admin` `action:'account'` (cheap), or `mcp_account_view` (full inventory): `role`/`summary`, `type`, `resolvedDatabaseName`, `domainName`/`resolvedDomainName`, `authPath`/`targetPath`, `relationships`, `componentBranch`, plus top-level `componentBranches`. Never infer structure from the account's name. |
|
|
34
34
|
| Need the account tree below an account, or its users | In a local repo, read `account-hierarchy.json` for the generated tree. For live data, use `mcp_account_user_admin` (`action:'hierarchy'` with a `depth`, or `action:'users'`). `account-info.json` deliberately omits the tree. |
|
|
@@ -111,14 +111,16 @@ which is the source served to every account repo. Better guides over time are an
|
|
|
111
111
|
- ticket ID if applicable
|
|
112
112
|
- component names / IDs involved
|
|
113
113
|
- Copies or references for the relevant supporting artifacts:
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
114
|
+
- `remits-cli doctor local-state` output
|
|
115
|
+
- `./.remits-cli/actors/<local-agent>/current-session.txt`
|
|
116
|
+
- the active actor's repo session log from `./.remits-cli/actors/<local-agent>/sessions/`
|
|
117
|
+
- any `./.remits-cli/actors/<local-agent>/tool-responses/<callId>.json` files involved
|
|
118
|
+
- legacy flat `.remits-cli/` files only when `doctor local-state` says the relevant artifact is there
|
|
117
119
|
- `~/.remits-cli/account-repos.json` if repo resolution may be relevant
|
|
118
120
|
- `~/.remits-cli/activity.log` if service / websocket / agent-routing behavior may be relevant
|
|
119
121
|
|
|
120
122
|
2. **Use the global Remits CLI state to make the bundle self-contained.**
|
|
121
|
-
-
|
|
123
|
+
- Run `remits-cli doctor local-state` to identify the active local actor and repo session log directory.
|
|
122
124
|
- Record the exact repo directory and account context from `account-info.json`.
|
|
123
125
|
- If repo selection or account targeting may be part of the issue, include the relevant entry from `~/.remits-cli/account-repos.json`.
|
|
124
126
|
- If the problem involves support-ticket routing, agent registration, or websocket events, include the relevant lines from `~/.remits-cli/activity.log`.
|