@remits/remits-cli 0.1.110 → 0.1.113

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 CHANGED
@@ -21,6 +21,7 @@ remits-cli stop
21
21
  remits-cli install --skills
22
22
  remits-cli tools
23
23
  remits-cli tool --base-url http://localhost:8080 --name "My Tool" --input '{"foo":"bar"}'
24
+ remits-cli tool --name mcp_firestore_search --input '{"collection":"statements","documentId":"1234"}' --scope children
24
25
  remits-cli components stage
25
26
  remits-cli components status
26
27
  remits-cli components clear
@@ -70,7 +71,8 @@ remits-cli install --skills --overwrite true
70
71
  - `components commit` is a convenience wrapper that performs local git commit/push, then `components sync`, then local `git fetch`/`git pull --ff-only`.
71
72
  - `components sync` returns the post-sync branch SHA produced by the platform. `components commit` verifies that `origin/<branch>` and local `HEAD` both match that exact SHA after the final pull.
72
73
  - `components push` is deprecated and currently behaves the same as `components stage`.
73
- - `accountId` resolution for CLI commands: explicit `--account-id` flag wins, then the current repo's `account-info.json` (`resolution.accountId`, then the short-lived `repoContext.accountInfoAccountId`, then the legacy top-level id — legacy files are rooted at the hierarchy ROOT, so their top-level `id` may be an ancestor), then the active session. For `remits-cli tool` calls the server applies a further precedence — explicit `--account-id` > `input.accountId` > session/repo default — so a tool can execute against a different account than the surrounding repo.
74
+ - `accountId` resolution for CLI commands: explicit `--account-id` flag wins, then the current repo's `account-info.json` (`resolution.accountId`, then the short-lived `repoContext.accountInfoAccountId`, then the legacy top-level id — legacy files are rooted at the hierarchy ROOT, so their top-level `id` may be an ancestor), then the active session.
75
+ - For `remits-cli tool`, read/discovery tools treat that resolved account as the **scope root**. You do not need the owning child account id for an exact document/record lookup: pass `--scope children`, or put `scope:"children"` in `--input`, and use the returned `resolvedTargetAccountId` for follow-up writes/runs. Use `--target-account-id` when you already know the exact owner, `--account-ids` for an explicit bounded owner list, and `--anchor-account-id` only to disambiguate multi-parent paths. Mutating tools still require an exact target.
74
76
  - Auth sessions are stored per `accountId + dataMode + baseUrl`, so the same account can stay authenticated against both localhost and production without overwriting the other session.
75
77
  - `--base-url` and `--data-mode` are independent. `--base-url` chooses the Remits host (`http://localhost:8080` vs deployed prod), while `--data-mode` chooses the data segment on that host (`test` vs `prod`). Do not assume `--data-mode prod` means the deployed prod host, or that `--data-mode test` means localhost.
76
78
  - `remits-cli start` scans the machine for `account-info.json` files and rebuilds `~/.remits-cli/account-repos.json` before bringing up the background service.
@@ -112,33 +114,30 @@ remits-cli install --skills --overwrite true
112
114
  - If the machine sleeps, the network drops, or auth sessions change while the daemon is already running, the service now attempts to reconnect and resubscribe automatically once connectivity returns.
113
115
  - Incoming websocket messages of type `remits-cli` are dispatched into dedicated tmux windows so the selected agent can continue working interactively with a full terminal view.
114
116
  - The listener creates a shared tmux session named `remits-listener`.
115
- - Support tickets are the primary unit of dispatched work. Each ticket gets its own tmux window/workstream.
116
- - The listener enables tmux mouse support, increases scrollback history, and keeps exited panes visible for inspection.
117
- - Follow-up messages with the same `ticketId` are routed back to the existing pane when it is still alive.
118
- - Legacy payloads that only include `taskId` are still supported as a fallback routing key.
119
- - If a pane for a tracked ticket has exited or is dead, the listener removes that mapping and creates a replacement pane.
120
- - Pane commands are launched through the user's login shell so the pane inherits the normal interactive `PATH`.
121
- - The preferred agent comes from `remits-cli config set --agent claude|codex|gemini`. The default is `claude`.
117
+ - Support tickets are the primary unit of dispatched work. A serving agent launches one fresh worker process per routed ticket.
118
+ - Agent sessions register themselves with `remits-cli agent register` or `remits-cli agent serve`; `serve` also starts the local supervisor.
119
+ - Tickets are delivered by durable routing on the ticket record, then the agent asks for routed work with `remits-cli agent work`.
120
+ - The preferred worker comes from `remits-cli config set --agent claude|codex|gemini`. The default is `claude`.
122
121
 
123
122
  ## Support Tickets
124
123
 
125
124
  - Support tickets are stored as documents in the `support_tickets` collection.
126
- - New tickets and ticket updates are delivered over the `remits-cli` websocket channel and appear as local tmux workstreams.
127
- - Think of this as a lightweight local support queue: the platform creates and updates tickets centrally, and local agents receive those tickets to investigate and resolve.
125
+ - New tickets and ticket updates are recorded centrally; local agents receive work by polling for tickets routed to their registered session.
126
+ - Think of this as a lightweight local support queue: the platform owns the record and lifecycle verbs, while account components can layer their own helpdesk workflow on top.
128
127
  - `accountId` / `accountName` identify the account that owns the ticket.
129
128
  - If present, `implementationAccountId` / `implementationAccountName` identify the platform or product context that owns the shared implementation.
130
- - Listener repo dispatch prefers `implementationAccountId` when present, then falls back to `accountId`. If one of those repos is indexed locally in `~/.remits-cli/account-repos.json`, it will be preferred as the tmux working directory.
129
+ - Worker repo resolution prefers `implementationAccountId` when present, then falls back to `accountId`. If one of those repos is indexed locally in `~/.remits-cli/account-repos.json`, it is used as the worker's directory.
131
130
  - Agents must resolve account `type` (`PLATFORM`, `PRODUCT`, `CLIENT`) before deciding which local repo to use. A `CLIENT` ticket may still require code changes in a parent `PLATFORM` or `PRODUCT` repo.
132
- - Use `mcp_support_ticket` to manage ticket state:
131
+ - Use `remits-cli ticket` to manage the generic platform ticket lifecycle:
133
132
 
134
133
  ```bash
135
- remits-cli tool --name "mcp_support_ticket" --input '{"action":"read","ticketId":"123"}' --data-mode prod
136
- remits-cli tool --name "mcp_support_ticket" --input '{"action":"accept","ticketId":"123","assignee":"codex"}' --data-mode prod
137
- remits-cli tool --name "mcp_support_ticket" --input '{"action":"update_status","ticketId":"123","status":"in_progress","notes":"Investigating logs"}' --data-mode prod
138
- remits-cli tool --name "mcp_support_ticket" --input '{"action":"complete","ticketId":"123","resolution":"Fixed and verified"}' --data-mode prod
134
+ remits-cli ticket read --ticket 123 --data-mode prod
135
+ remits-cli ticket accept --ticket 123 --data-mode prod
136
+ remits-cli ticket status --ticket 123 --status in_progress --notes "Investigating logs" --data-mode prod
137
+ remits-cli ticket complete --ticket 123 --resolution "Fixed and verified" --data-mode prod
139
138
  ```
140
139
 
141
- - Recommended ticket flow: `read` first, then `accept`, then `update_status` as work progresses, then `complete` or `release`.
140
+ - Recommended ticket flow: `read` first, then `accept`, then `status` as work progresses, then `complete`, `ask`, or `release`.
142
141
 
143
142
  ## Logging and State Files
144
143