@anyforge/control 0.8.1 → 0.9.1

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 +59 -0
  2. package/dist/cli.js +221 -111
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -96,6 +96,15 @@ Oracle login uses browser authorization with PKCE and stores its credential in
96
96
  For unattended use, an attributable API key in `ANYFORGE_API_TOKEN` takes
97
97
  precedence over saved Oracle logins.
98
98
 
99
+ Credential changes are serialized across CLI processes. Version 0.9.1 adds a
100
+ non-expiring admission guard before recovering an older refresh lock. Ordinary
101
+ completion, errors and process signal exit release both locks. A SIGKILL or OS
102
+ crash can leave `~/.anyforge/oracle.refresh-admission` behind; the CLI waits for a
103
+ bounded period and reports that exact path instead of risking reuse of a rotated
104
+ token. Stop **all** AnyForge CLI commands, then remove that directory and retry.
105
+ Do not remove it while another command is running. Older CLI versions do not
106
+ honor this guard: upgrade every concurrently used installation to 0.9.1 or later.
107
+
99
108
  Each login belongs to one workspace, and you can keep one per workspace. The
100
109
  workspace name shows in the welcome card, the bottom line, `/status` and the
101
110
  login message.
@@ -312,3 +321,53 @@ check the company's BYOK provider key and the agent's endpoint. If the displayed
312
321
  company or user is wrong, reconnect with `anyforge init` rather than editing an ID.
313
322
  The server route and its Firestore indexes must be deployed before a newly built
314
323
  CLI can use this diagnostic command; a 404 is not an authentication verdict.
324
+
325
+
326
+ ### Code Studio
327
+
328
+ Studio commands require `@anyforge/control` **0.9.0 or later** and a deployed
329
+ Studio API. Install with `npm install -g @anyforge/control@^0.9.0` after its npm
330
+ release; a repository build or application deployment does not update an
331
+ installed CLI. Run `anyforge --version` to check the installed version.
332
+
333
+ Use a dedicated Studio key from Settings → API keys. Standard `write` and legacy
334
+ keys do not authorize Studio execution or publication. Owners and operators, plus editors explicitly enabled by their company owner, can
335
+ use these commands; service accounts cannot own interactive Studio sessions.
336
+
337
+ ```sh
338
+ anyforge studio list --json
339
+ anyforge studio usage SESSION --json
340
+ anyforge studio create --repo acme/app --branch feature/fix --context "Fix the form" --json
341
+ anyforge studio continue SESSION --file src/form.ts --context "Review this local reference"
342
+ anyforge studio open SESSION
343
+ anyforge studio run SESSION --context "Implement and test the fix" --input '{"maxTotalTokens":40000}'
344
+ anyforge studio events RUN --cursor 12 --json
345
+ anyforge studio answer RUN --context "Use option A" --input '{"questionId":"QUESTION"}'
346
+ anyforge studio cancel RUN
347
+ anyforge studio changes SESSION
348
+ anyforge studio commit SESSION --input '{"message":"Fix form","expectedRevision":"REVISION"}'
349
+ anyforge studio push SESSION --input '{"expectedHeadSha":"SHA"}'
350
+ ```
351
+
352
+ `create` and `continue` prepare context without running code. `--file` sends only
353
+ that file (20 KB maximum), labels its local branch/commit and uncommitted state,
354
+ and does not copy local edits into the remote checkout. `--initiative ID` assigns
355
+ a new session to an existing initiative; omission starts direct work. Keep the
356
+ returned session/run IDs and event cursor to reconnect. Reuse an explicit
357
+ `idempotencyKey` in `--input` when retrying a create or run request.
358
+
359
+ `studio usage SESSION` reads the owned session's recorded billing subtotal,
360
+ limited to the newest 200 rows, grouped by actual model, product, run and leg.
361
+ It preserves the API's `truncated`, `coverage` and `pending` fields. Historical
362
+ coverage may be incomplete; missing attribution is unavailable cost, not zero.
363
+ Provider cost and platform fee remain separate fields. This read never starts a
364
+ run or calculates prices locally.
365
+
366
+ Read access requires `studio:read`; preparation requires `studio:write`; runs and
367
+ local Git operations require `studio:execute`; pushing and PR lifecycle actions
368
+ require `studio:publish`. External runs use audited local coding, reads and reviews. Hosted shell, browser,
369
+ connectors, Oracle, crew dispatch, workflows and approvals require browser Studio
370
+ with its separate role and confirmation gates; publish scope does not unlock them. Opted-in editors can edit, review, commit and publish
371
+ with their own GitHub identity, but cannot dispatch crews or approve work.
372
+ Review changes before committing, prefer draft PRs, and confirm ready/merge in browser Studio only
373
+ for a specific PR and exact head after checks and review pass.