@anyforge/control 0.6.2 → 0.7.0

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 (3) hide show
  1. package/README.md +60 -7
  2. package/dist/cli.js +124 -102
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -74,9 +74,26 @@ anyforge oracle download <session-id> <file-id> --output ./downloads
74
74
 
75
75
  Oracle login uses browser authorization with PKCE and stores its credential in
76
76
  `~/.anyforge/oracle`. It leaves your inference proxy and MCP setup unchanged.
77
- `anyforge oracle logout` revokes and clears that Oracle login. For unattended
78
- use, an attributable API key in `ANYFORGE_API_TOKEN` takes precedence over the
79
- saved Oracle login.
77
+ For unattended use, an attributable API key in `ANYFORGE_API_TOKEN` takes
78
+ precedence over saved Oracle logins.
79
+
80
+ Each login belongs to one workspace, and you can keep one per workspace. The
81
+ workspace name shows in the welcome card, the bottom line, `/status` and the
82
+ login message.
83
+
84
+ ```bash
85
+ anyforge oracle login --workspace "Beta Labs" # add a workspace; it becomes active
86
+ anyforge oracle workspaces # list saved workspaces (--json)
87
+ anyforge oracle use "Acme Engineering" # change the active workspace
88
+ anyforge oracle exec "..." --workspace company-2 # one command only
89
+ anyforge oracle logout # the active workspace (--workspace <name>, --all)
90
+ ```
91
+
92
+ `--workspace` on `login` only pre-selects the workspace on the consent page;
93
+ the CLI reports the one you actually connected. In a conversation, `/workspace`
94
+ switches to another saved workspace and starts a new conversation there. With
95
+ `ANYFORGE_API_TOKEN` set, the key's workspace is used and switching is refused
96
+ with an explanation.
80
97
 
81
98
  Interactive conversations are read only by default. Use `oracle login --write`
82
99
  and start with `oracle --write` to enable workspace edits. Consequential edits
@@ -85,9 +102,9 @@ and external MCP writes additionally require `--approve`. `oracle exec` always
85
102
  remains read only.
86
103
 
87
104
  Use Shift+Enter for multiline input. Type `/` for the command palette:
88
- `/help`, `/status` (session, access, model, last turn, usage and limits),
89
- `/new`, `/clear`, `/resume`, `/context`, `/attach`, `/copy`, `/files`,
90
- `/usage`, `/model` and `/exit`. `/design [topic]`, `/catchup` and
105
+ `/help`, `/status` (session, workspace, access, model, last turn, usage and
106
+ limits), `/new`, `/clear`, `/resume`, `/workspace`, `/context`, `/attach`,
107
+ `/copy`, `/files`, `/usage`, `/model` and `/exit`. `/design [topic]`, `/catchup` and
91
108
  `/remember [what]` are answered by the Oracle itself, as in the web widget;
92
109
  acting on `/catchup` decisions needs a session started with `--write --approve`.
93
110
 
@@ -114,7 +131,7 @@ See the [CLI guide](https://anyforge.ai/docs/cli) for the full command contract.
114
131
  |---|---|
115
132
  | `anyforge init` | Authorise this device and patch local agent configs |
116
133
  | `anyforge whoami` | Show the company, scopes and endpoint this key acts as (asks the server) |
117
- | `anyforge status` | Verify the proxy is reachable and your BYOK key is configured |
134
+ | `anyforge status` | Check server identity, local configuration and personal recorded activity (`--json` supported) |
118
135
  | `anyforge logout` | Clear the local credential file **and revert patched configs** (does not revoke server-side) |
119
136
  | `anyforge apply-patch` | Apply a unified diff from a file or stdin via `git apply` |
120
137
 
@@ -202,3 +219,39 @@ Both validate your AnyForge API key, look up your company's BYOK provider key, f
202
219
  ## License
203
220
 
204
221
  Apache-2.0
222
+
223
+ ### Check a Control installation
224
+
225
+ Run `anyforge status` after setup and after making a real request in your agent.
226
+ It authenticates against the saved endpoint (or the explicit endpoint override),
227
+ shows the current user, company and granted scopes, and reads the latest recorded
228
+ Control proxy usage and optional Claude Code subscription telemetry for that user
229
+ in that company, across devices. Role checks still apply to individual actions.
230
+ A successful check verifies the Control API used by MCP; confirm the actual MCP
231
+ connection in your agent client. It does not send an inference request or charge
232
+ for a test call.
233
+
234
+ The three connections are separate:
235
+
236
+ - **MCP** provides access to AnyForge work and tools. It does not route inference
237
+ or capture every local conversation.
238
+ - **Inference proxy** routes supported requests through the company's BYOK key.
239
+ Configured settings and historical usage do not prove forwarding works now.
240
+ - **Subscription telemetry** is optional. Subscription inference stays with the
241
+ provider; exported token counts and estimated cost appear at `/usage`, not as
242
+ full conversation traces at `/traces`. No prompts are exported by this setup.
243
+
244
+ Status inspects the current shell, Claude Code user/project settings and the
245
+ standard stdio MCP configuration written by init. Matching settings are local
246
+ observations, not proof of the client's effective configuration: managed settings,
247
+ other clients and hosted MCP need checking in the client itself. “Not detected”
248
+ does not mean disabled. Missing activity, unavailable history, and an older key
249
+ without user attribution are reported separately. An unavailable history read exits
250
+ 1; authentication failures use the normal Control API error exit code 4.
251
+
252
+ If telemetry has no recorded activity, restart Claude Code after setup, use it,
253
+ allow its exporter interval to complete and rerun status. If inference fails,
254
+ check the company's BYOK provider key and the agent's endpoint. If the displayed
255
+ company or user is wrong, reconnect with `anyforge init` rather than editing an ID.
256
+ The server route and its Firestore indexes must be deployed before a newly built
257
+ CLI can use this diagnostic command; a 404 is not an authentication verdict.