diff --git a/api-reference/error-codes.mdx b/api-reference/error-codes.mdx index d17120b..e0bd8fc 100644 --- a/api-reference/error-codes.mdx +++ b/api-reference/error-codes.mdx @@ -151,11 +151,10 @@ A conflict response also contains `current_state`. Some errors contain `user_mes |---|---|---|---|---| | `UZ-AGT-003` | 424 | Fleet credential missing | A required credential is not in the vault. Add it with: `agentsfleet secret create ` | Use fleet identifiers from the current workspace. | | `UZ-AGT-004` | 500 | Fleet unavailable | The fleet could not accept work. Check that the fleet exists and is active, then retry. | Use fleet identifiers from the current workspace. | -| `UZ-AGT-006` | 409 | Fleet name already exists | A Fleet with this name already exists. Pass `--name ` to install the same bundle again — this keeps the existing Fleet. Freeing the name instead means `agentsfleet kill ` then `agentsfleet delete `, which is irreversible and takes the Fleet's events, sessions, schedules, grants, and memory with it. | Use fleet identifiers from the current workspace. | +| `UZ-AGT-006` | 409 | Fleet name already exists | A Fleet with this name already exists. Review the draft again under a different `--name` to save it under a free name — this keeps the existing Fleet. Freeing the name instead means `agentsfleet kill ` then `agentsfleet delete `, which is irreversible and takes the Fleet's events, sessions, schedules, grants, and memory with it. | Use fleet identifiers from the current workspace. | | `UZ-AGT-008` | 400 | Invalid fleet config | That fleet's config isn't valid. Check the trigger, tools, credentials, and budget fields, then try again. | Use fleet identifiers from the current workspace. | | `UZ-AGT-009` | 404 | Fleet not found | We couldn't find that Fleet. It may have been deleted, or the identifier doesn't match one in this workspace. | Use fleet identifiers from the current workspace. | | `UZ-AGT-010` | 409 | Fleet state transition not allowed | That action isn't available for this Fleet right now — check its current status and try again. | Use fleet identifiers from the current workspace. | -| `UZ-AGT-011` | 400 | Fleet files disagree on `name:` | This Fleet Bundle's files disagree on its name. `SKILL.md` and `TRIGGER.md` must match. Fix the source and try again. | Use fleet identifiers from the current workspace. | | `UZ-AGT-012` | 409 | Fleet is paused | This Fleet is paused. Resume it before sending new work. | Use fleet identifiers from the current workspace. | | `UZ-AGT-013` | 500 | Fleet install rolled back | We couldn't finish setting up your fleet. Nothing was created — try again. | Use fleet identifiers from the current workspace. | | `UZ-AGT-014` | 412 | Fleet source is stale | Someone else edited this Fleet's source since you opened it. Reload to see their change, then re-apply your edit. | Use fleet identifiers from the current workspace. | @@ -178,15 +177,28 @@ A conflict response also contains `current_state`. Some errors contain `user_mes | `UZ-SCHED-010` | 403 | Schedule not created by the fleet | A fleet can change or delete only the schedules it created. A person created this one. Change it from the schedules page or `agentsfleet schedule`. | A fleet reads every schedule of its own fleet and changes only those with source `fleet`. | | `UZ-SCHED-011` | 409 | Schedule cannot run now | The schedule is paused or being removed, or the current run was started by a schedule. The response names the state in `current_state`. | Resume the schedule first. A scheduled run plans its next follow-up with `schedule` or `cron_add` instead. | -### Fleet Bundles +### Drafts and setup + +These codes answer private drafts, Save, Apply, and Library publication. | Code | HTTP | Title | Why and fix | Prevent | |---|---|---|---|---| -| `UZ-BUNDLE-001` | 400 | Invalid Fleet Bundle | That Fleet Bundle isn't valid. It's missing `SKILL.md`, or has an unsafe or oversized file. Check the source and try again. | Check Fleet Bundle files and limits before upload. | -| `UZ-BUNDLE-002` | 404 | Fleet Bundle not found | We couldn't find that Fleet Bundle. It may not be installed in this workspace yet — check the Fleet library. | Check Fleet Bundle files and limits before upload. | -| `UZ-BUNDLE-003` | 424 | Fleet Bundle secrets missing | This Fleet Bundle needs secrets this workspace doesn't have yet. Add the missing secrets, then install again. | Check Fleet Bundle files and limits before upload. | -| `UZ-BUNDLE-004` | 502 | Fleet Bundle fetch failed | We couldn't fetch that Fleet Bundle from GitHub. Check the source and try again. | Check Fleet Bundle files and limits before upload. | -| `UZ-BUNDLE-005` | 503 | Fleet Bundle storage unavailable | We couldn't store your Fleet Bundle right now. Try again shortly. | Check Fleet Bundle files and limits before upload. | +| `UZ-AUTHOR-001` | 404 | Setup resource not found | This setup is unavailable. The draft, fleet, or Library entry is missing, belongs to another person or workspace, or is a platform entry you cannot change. Use a resource available to you in this workspace. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-002` | 409 | Setup state conflict | Finish or stop the current work before changing setup. The response names the state in `current_state`. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-003` | 412 | Setup version changed | This setup changed. Fetch the current resource and retry with its `ETag` in `If-Match`. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-004` | 428 | Setup version required | Send the resource `ETag` in `If-Match`. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-005` | 409 | Operation key conflict | That operation key already belongs to a different request. Reuse a key only for the same request from the same person. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-006` | 409 | Setup review changed | This setup changed. Review it before saving. The response carries the fresh `review_digest`. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-007` | 402 | Authoring balance insufficient | The workspace balance cannot cover this authoring request. The workspace owner adds credit, or the request waits for earlier usage to settle. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-008` | 409 | Authoring model unavailable | Choose an available authoring model. The selected model is missing, disabled, or not eligible for authoring. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-009` | 409 | Setup policy changed | This setup needs a new review. Review the current setup before continuing. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-010` | 422 | Authoring context too large | This request exceeds the authoring model's context limit. Shorten the request or choose a model with a larger window. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-011` | 400 | Invalid setup cursor | Reload this list to continue. A cursor works only with the same person, filters, and page size. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-012` | 409 | Authoring lease lost | This authoring attempt can no longer update the draft. Refresh the draft before sending another message. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-013` | 410 | Setup resource purged | This setup was deleted. Start a new operation. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-014` | 502 | Authoring provider failed | The authoring provider could not finish this request. Send the message again. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-015` | 409 | Authoring usage unresolved | This model request is waiting for accounting. Wait before sending again. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | +| `UZ-AUTHOR-016` | 504 | Authoring attempt timed out | This authoring attempt ran out of time. Send the message again once its accounting settles. | Review the current setup before each Save, Apply, or publish, and keep the operation key for retries. | ### Secrets @@ -230,21 +242,11 @@ A conflict response also contains `current_state`. Some errors contain `user_mes | `UZ-PREFS-001` | 400 | Unknown preference key | That setting doesn't exist. Reload the page and try again. | Write only preference keys the dashboard declares, with small values. | | `UZ-PREFS-002` | 400 | Preference value too large | That setting is too large to save. Reload the page and try again. | Write only preference keys the dashboard declares, with small values. | -### Fleet library catalog - -| Code | HTTP | Title | Why and fix | Prevent | -|---|---|---|---|---| -| `UZ-CATALOG-001` | 404 | Fleet library entry not found | We couldn't find that fleet. It may have already been removed — refresh the page. | Fetch a bundle before publishing a fleet, and unpublish before deleting one. | -| `UZ-CATALOG-002` | 409 | Cannot publish a fleet with no bundle | There's no bundle for this fleet yet. Fetch it from its repository first, then publish. | Fetch a bundle before publishing a fleet, and unpublish before deleting one. | -| `UZ-CATALOG-003` | 409 | Cannot delete a published fleet | This fleet is published. Unpublish it first, then delete it. | Fetch a bundle before publishing a fleet, and unpublish before deleting one. | -| `UZ-CATALOG-004` | 409 | Catalog id already taken by another repository | A different repository already owns this fleet's name. Rename the bundle, or confirm you want to replace it. | Fetch a bundle before publishing a fleet, and unpublish before deleting one. | -| `UZ-CATALOG-005` | 412 | Catalog entry changed since you loaded it | Someone else edited this catalog entry since you opened it. Refresh to see their change, then re-apply your edit. | Fetch a bundle before publishing a fleet, and unpublish before deleting one. | - ### Library listings -These codes answer both library reads: the gallery at `/v1/workspaces/{workspace_id}/fleet-libraries`, and the entries a workspace owns at `/v1/workspaces/{workspace_id}/library-entries`. Each read issues its own page cursor. Spending one collection's cursor on the other earns `UZ-LIBRARY-001`. +Paged model reads use these codes. The Fleet library reads at `/v1/workspaces/{workspace_id}/fleet-libraries` and `/v1/workspaces/{workspace_id}/fleet-libraries/owned` answer a malformed or mismatched cursor with `UZ-AUTHOR-011` instead. -Removing an entry adds no code of its own. An `entry_id` that is not a UUIDv7 earns a plain 400 with no library code. A removal that reaches the database and fails earns `UZ-LIBRARY-006`. +Removing a Library entry answers `UZ-AUTHOR-001` when the entry is not one this workspace owns. | Code | HTTP | Title | Why and fix | Prevent | |---|---|---|---|---| @@ -280,7 +282,7 @@ Removing an entry adds no code of its own. An `entry_id` that is not a UUIDv7 ea | `UZ-RUN-012` | 402 | Lease renewal blocked: no credits | The tenant balance cannot cover another run slice. The lease does not renew, and the run stops cleanly. | Keep runner settings and lease health within configured limits. | | `UZ-RUN-013` | 400 | Renew body malformed | The renew request body could not be parsed. Token counts become zero, but the renewed slice still charges for runtime. The lease still renews. | Keep runner settings and lease health within configured limits. | | `UZ-RUN-014` | 404 | Runner not found | We couldn't find that runner. It may have been removed — refresh the list. | Keep runner settings and lease health within configured limits. | -| `UZ-RUN-015` | 402 | Lease renewal blocked: fleet budget exhausted | The fleet reached its daily_dollars or monthly_dollars limit from `TRIGGER.md`, so the run stops. The tenant balance is fine; this is the fleet's own budget. | Keep runner settings and lease health within configured limits. | +| `UZ-RUN-015` | 402 | Lease renewal blocked: fleet budget exhausted | The fleet reached its `daily_nanos` or `monthly_nanos` limit from its reviewed setup, so the run stops. The tenant balance is fine; this is the fleet's own budget. | Keep runner settings and lease health within configured limits. | | `UZ-RUN-016` | 409 | Active runner must be revoked before deletion | This runner is still live. Revoke it first, then delete it. | Keep runner settings and lease health within configured limits. | | `UZ-RUN-019` | 409 | Event has no thread to message | The run came from an API steer, a webhook, or a schedule, so no thread is waiting. Say it in the run's answer instead. | Use `message` only in fleets a Slack mention starts. | | `UZ-RUN-020` | 409 | Run message limit reached | A run can post at most 8 messages before it answers. Put the rest in the run's answer. | Post progress at milestones, not on every step. | @@ -309,7 +311,7 @@ Removing an entry adds no code of its own. An `entry_id` that is not a UUIDv7 ea | Code | HTTP | Title | Why and fix | Prevent | |---|---|---|---|---| -| `UZ-APPROVAL-001` | 400 | Approval parse failed | That approval gate's config is invalid. Check the gates section in TRIGGER.md. | Resolve only current approval requests. | +| `UZ-APPROVAL-001` | 400 | Approval parse failed | That approval gate's config is invalid. Check `gates` in the fleet's Definition. | Resolve only current approval requests. | | `UZ-APPROVAL-002` | 404 | Approval not found | That approval action wasn't found. It may have already timed out or been resolved elsewhere. | Resolve only current approval requests. | | `UZ-APPROVAL-003` | 401 | Approval invalid signature | That approval callback couldn't be verified. Check the signing secret configuration. | Resolve only current approval requests. | | `UZ-APPROVAL-004` | 503 | Approval service unavailable | Approvals are temporarily unavailable. We deny requests while this service is down. Try again shortly. | Resolve only current approval requests. | @@ -341,9 +343,9 @@ Removing an entry adds no code of its own. An `entry_id` that is not a UUIDv7 ea | Code | HTTP | Title | Why and fix | Prevent | |---|---|---|---|---| | `UZ-REPAIR-010` | 403 | Write mint requires an approved gate | **Retired.** A repository write is authorised by the fleet's integration grant, so no per-event approval can be missing. A run without an approved grant returns [`UZ-GRANT-001`](#UZ-GRANT-001) instead. | Check the grant with `agentsfleet grant list --fleet `. | -| `UZ-REPAIR-011` | 403 | Fleet binding changed since approval | **Retired.** Nothing records a binding at approval time, so nothing can drift from one. A minted token still reaches only the repositories the fleet declares. | Keep `repositories:` in `TRIGGER.md` naming every repository the fleet must reach. | +| `UZ-REPAIR-011` | 403 | Fleet binding changed since approval | **Retired.** Nothing records a binding at approval time, so nothing can drift from one. A minted token still reaches only the repositories the fleet declares. | Keep `repositories` in the fleet's Definition naming every repository the fleet must reach. | | `UZ-REPAIR-012` | 200 | Duplicate repair link refused | A repair Pull Request already links this incident, so a second one is acknowledged and not recorded. Close the surplus Pull Request on GitHub. | Have a human approve the repository-write gate before the run mints a write-scoped token. | -| `UZ-REPAIR-013` | 403 | Write request allowance exhausted | **Retired.** The 32-request allowance was counted per approval, so a long run drew more than the number its card showed. `budget.daily_dollars` bounds a fleet's spending instead. | Set `budget.daily_dollars` in `TRIGGER.md` to the most a fleet may spend in a day. | +| `UZ-REPAIR-013` | 403 | Write request allowance exhausted | **Retired.** The 32-request allowance was counted per approval, so a long run drew more than the number its card showed. `budget.daily_nanos` bounds a fleet's spending instead. | Set `budget.daily_nanos` in the fleet's Definition to the most a fleet may spend in a day. | | `UZ-REPAIR-014` | 200 | Repair provenance refused | The repair branch does not match an approved write gate on workspace, Fleet, event, installation, repository, and App author. The delivery is acknowledged and nothing is recorded. | Have a human approve the repository-write gate before the run mints a write-scoped token. | ### Integration grants diff --git a/api-reference/scopes.mdx b/api-reference/scopes.mdx index 5e0a3f3..489080d 100644 --- a/api-reference/scopes.mdx +++ b/api-reference/scopes.mdx @@ -32,7 +32,7 @@ curl -s https://api.agentsfleet.net/v1/fleets -H 'Authorization: Bearer af_test_ | Scope | Effect | Included by | |---|---|---| | `fleet:read` | Reads fleets, events, and memory. | `fleet:write`, `fleet:admin` | -| `fleet:write` | Creates, updates, and messages fleets. | `fleet:admin` | +| `fleet:write` | Creates, updates, and messages fleets. Also reads and writes your own private drafts. | `fleet:admin` | | `fleet:admin` | Deletes fleets. | None | | `secret:read` | Lists secret names and metadata. | `secret:write` | | `secret:write` | Creates, rotates, and deletes secrets. Deleting a secret named for a connector also needs `connector:write`. | None | @@ -45,8 +45,8 @@ curl -s https://api.agentsfleet.net/v1/fleets -H 'Authorization: Bearer af_test_ | `connector:write` | Starts a connector setup flow and disconnects a connector, including by deleting its secret. | None | | `billing:read` | Reads the tenant balance and charges. | None | | `workspace:admin` | Creates and lists workspaces. | None | -| `library:write` | Adds an entry to a workspace library, and removes one the workspace onboarded. | None | -| `platform-library:write` | Adds an entry to the platform library. | None | +| `library:write` | Publishes a reviewed draft as a workspace library entry or revision, and removes an entry the workspace owns. | None | +| `platform-library:write` | Stages a reviewed draft as a platform library entry, and edits, publishes, withdraws, or deletes platform entries. | None | | `approval:read` | Reads pending approvals. | `approval:resolve` | | `approval:resolve` | Approves or denies a request. | None | diff --git a/billing/budgets.mdx b/billing/budgets.mdx index 1c83e53..47d0cb7 100644 --- a/billing/budgets.mdx +++ b/billing/budgets.mdx @@ -3,7 +3,7 @@ title: Fleet budgets description: Daily and monthly spending limits for one fleet. type: explanation audience: user -verified: 2026-09-12 +verified: 2026-10-15 executable: false --- @@ -11,15 +11,20 @@ executable: false ## What it is -A fleet budget limits how much one fleet can spend. The fleet author sets the budget in `TRIGGER.md`. +A fleet budget limits how much one fleet can spend. The fleet author sets the budget in `budget` under `config["x-agentsfleet"]` in the fleet's Definition. -```yaml -budget: - daily_dollars: 5.0 - monthly_dollars: 29.0 +```json +{ + "budget": { + "daily_nanos": "5000000000", + "monthly_nanos": "29000000000" + } +} ``` -`daily_dollars` is required. `monthly_dollars` is optional. +Each limit is a decimal string of whole nanodollars. One dollar is `"1000000000"`, so the example allows 5 dollars a day and 29 dollars a month. + +`daily_nanos` is required. `monthly_nanos` is optional; leave it out for no monthly limit. ## Why it exists @@ -27,7 +32,7 @@ Every workspace under one tenant shares the same credit balance. A fleet budget The dashboard header shows what is left of that balance on every page, as a **Credits** chip beside the workspace switcher. It appears on screens at least 640px wide. Select the chip to open **Settings → Billing**, which holds the live figure and the charge history. -The fleet owns its budget. Updating the fleet replaces the limits, and deleting the fleet removes them. +The fleet owns its budget. Applying a reviewed setup change replaces the limits, and deleting the fleet removes them. ## How it behaves @@ -35,7 +40,7 @@ The daily limit covers a rolling 24-hour window. The monthly limit covers one Co `agentsfleet` checks the limits before a run and while the run continues. A reached limit blocks new work and stops an active run at its next billing check. -A blocked event does not retry. Raise the limit, update the fleet, and send a new event. +A blocked event does not retry. Raise the limit in an improvement chat, apply the change, and send a new event. The fleet, memory, and activity stream survive a budget stop. A stopped run has no final result. @@ -43,10 +48,12 @@ The fleet, memory, and activity stream survive a budget stop. A stopped run has | Field | Default | Unit | Valid range | |---|---|---|---| -| `daily_dollars` | None; required | Dollars per rolling 24 hours | More than `$0` and at most `$1,000` | -| `monthly_dollars` | None | Dollars per UTC month | More than `$0` and at most `$10,000` | +| `daily_nanos` | None; required | Nanodollars per rolling 24 hours | `"1"` through `"1000000000000"`, which is `$1,000` | +| `monthly_nanos` | None | Nanodollars per UTC month | `"1"` through `"10000000000000"`, which is `$10,000` | + +Zero, signs, decimal points, exponents, and numbers outside the range are refused. A JSON number in place of the string is refused too. -An invalid budget blocks fleet installation. A stored budget that cannot be read blocks the next run. +An invalid budget blocks review and Save with `UZ-REQ-001`. A stored budget that cannot be read blocks the next run. `UZ-RUN-015` marks a budget stop during a run. `UZ-EXEC-015` records the final failure class. diff --git a/changelog.mdx b/changelog.mdx index 815d2a1..36065f2 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -7,6 +7,54 @@ description: "Stay up to date with the latest agentsfleet product updates, new f agentsfleet is in **stealth-mode testing** and pre-production. APIs and agent behavior may change between releases without long deprecation windows. Email [agentsfleet@agentmail.to](mailto:agentsfleet@agentmail.to) if you want a hand calibrating an agent or to join as a design partner. + + ## Fleets are written in a private chat, reviewed, and saved + + A fleet now starts as a private draft in the dashboard or in `agentsfleet chat`. You review its exact setup, then choose Save; publishing to the Fleet library is a separate choice. `SKILL.md` and `TRIGGER.md` bundles are removed, with every command and route that imported or exported them. Run `agentsfleet-runner` 0.61.0 or later; an earlier runner is refused. [Author a fleet](/fleets/authoring) covers the new flow. + + ## Upgrading + + - **Bundle storage is dropped** — migration `950_drop_fleet_bundle_storage.sql` drops `core.fleet_library`, `core.tenant_fleet_library`, and the `core.fleets` columns `source_markdown`, `trigger_markdown`, `bundle_content_hash`, and `bundle_snapshot_key`. Run `agentsfleetd migrate` in the rollout that replaces the binary. + - **Runners upgrade with the daemon** — `POST /v1/runners/me/leases` now requires `accepted_kinds`, so a runner from an earlier build is refused. + - **Budgets are whole nanodollars** — `daily_nanos` and `monthly_nanos` replace `daily_dollars` and `monthly_dollars`, as decimal strings. `"1000000000"` is one dollar; the caps are `"1000000000000"` a day and `"10000000000000"` a month. + - **Platform entries start over** — repository-imported entries leave with `core.fleet_library`. An operator stages a reviewed draft, then publishes it from **Fleet library** under Platform. + - **Webhook URLs name their source** — `POST /v1/webhooks/{fleet_id}` is removed. Each webhook trigger receives deliveries at `POST /v1/webhooks/{fleet_id}/{source}`, so register the `url` from the fleet's `webhook_urls` with the provider again. + - **Every webhook source must be verifiable** — a webhook `source` must be `github`, `linear`, or `slack`, or its trigger must declare `signature.secret_ref` for a Svix-signed provider. A Definition with any other source is refused, and so is one that sets `signature.header`, `signature.prefix`, or `signature.ts_header`. + - **The `api` trigger is removed** — `triggers` may be empty or absent, and such a fleet runs only when it is sent a message. A Definition that names `{"type": "api"}` is refused. + + ## What's new + + - **Private drafts** — only the person who starts a draft can read it. Each chat message is charged to the workspace owner's balance, and a short balance fails the message with `UZ-AUTHOR-007`. + - **Review before Save** — a review shows the full Definition, its required access, its readiness checks, and a `review_digest`. Save, Apply, and publish refuse a stale digest with `UZ-AUTHOR-006`. + - **Setup can wait** — a Save with an unmet check leaves the fleet `installing` and names each check. Saving raises the fleet's integration grant; `agentsfleet resume` finishes setup once it is approved, and `agentsfleet kill` cancels it. + - **Improve, then Apply** — **Setup → Improve in private chat** opens a draft pinned to the fleet's setup revision. **Apply reviewed setup** makes it the next revision; running work keeps the one it started with. + - **Library publication is explicit** — Save never publishes. Publishing creates an entry or appends an immutable revision, and fleets keep the revision they were saved from. + - **Slack channels live in the Definition** — a `mention` trigger with `"source": "slack"` and one ID in `channels` attaches a fleet to a channel. [Answer mentions in Slack](/fleets/slack) shows the entry. + + ## API reference + + - **Drafts** — `GET` and `POST /v1/workspaces/{workspace_id}/drafts`; `GET`, `PATCH`, and `DELETE /v1/workspaces/{workspace_id}/drafts/{draft_id}`; `GET` and `POST .../drafts/{draft_id}/messages`; `POST .../drafts/{draft_id}/cancellations`; `GET .../drafts/{draft_id}/events/stream`. + - **Library revisions** — `GET /v1/workspaces/{workspace_id}/fleet-libraries/owned`; `GET` and `DELETE .../fleet-libraries/{library_id}`; `GET` and `POST .../fleet-libraries/{library_id}/revisions`; `GET .../revisions/{revision_id}`. + - **Models and fleet revisions** — `GET /v1/workspaces/{workspace_id}/models?purpose=authoring` lists the owner's eligible models. `POST /v1/workspaces/{workspace_id}/fleets/{fleet_id}/revisions` applies a reviewed improvement under `If-Match` and `Idempotency-Key`. + - **Runner authoring routes** — `POST /v1/runners/me/authoring-leases/{lease_id}/renew`, `/activity`, `/reports`, and `/model-calls`. A `lease_id` that is not a version 7 Universally Unique Identifier (UUIDv7) answers `400` with `UZ-REQ-001`. + - **Save takes a reviewed source** — `POST /v1/workspaces/{workspace_id}/fleets` requires an `Idempotency-Key` header and `{source, name, review_digest, start}`. `source` is a draft candidate or a Library revision; `platform_library_id`, `tenant_library_id`, and `slack_channel_id` are gone. + - **Save and run now reports its first run** — with `start` set to `{"kind": "run_now", "message": ""}`, Save answers `201` even when the first run's queue receipt is not saved yet. The reply's `start.state` reads `pending` until then and `accepted` after, and a retry with the same `Idempotency-Key` confirms the same run. + - **Runner `PATCH` edits labels** — `PATCH /v1/fleets/runners/{runner_id}` takes `labels` alone or with `assigned_policy`, and replaces the runner's whole label set. A runner holds at most 32 labels of at most 64 bytes each. + - **Fleet `PATCH` sets status and name only** — `If-Match` is required, and a missing tag answers `428` with `UZ-AUTHOR-004`. `source_markdown`, `trigger_markdown`, and `config_json` are gone from the body. + - **Publication bodies** — `POST /v1/workspaces/{workspace_id}/fleet-libraries` takes `{draft_candidate_id, label}` with an `Idempotency-Key` header. `POST /v1/admin/fleet-libraries` stages `{workspace_id, draft_candidate_id, label}`, and `PATCH` with `published` publishes or withdraws. + - **Removed routes** — `GET /v1/workspaces/{workspace_id}/library-entries` (use `.../fleet-libraries/owned`), `DELETE .../library-entries/{entry_id}` (use `DELETE .../fleet-libraries/{library_id}`), `GET /v1/fleets/bundles`, `GET /v1/runners/me/bundles/{content_hash}`, `GET /v1/workspaces/{workspace_id}/preferences`, `DELETE /v1/auth/sessions/{session_id}` (use `DELETE /v1/auth/sessions`), `GET /v1/connectors/{provider}/callback`, and `POST /v1/webhooks/{fleet_id}`. No alias remains. + - **Typed Definition schemas** — `FleetDefinition` and the `Definition*` schemas describe the setup document `{schema_version, description, instructions_md, config}`, and fleet reads return `definition` in place of Markdown. `description` is required; it and `instructions_md` each allow 32,768 characters. + - **Error codes** — `UZ-AUTHOR-001` through `UZ-AUTHOR-016` are new. `UZ-BUNDLE-001` through `UZ-BUNDLE-006`, `UZ-CATALOG-001` through `UZ-CATALOG-005`, and `UZ-AGT-011` are retired. + + ## CLI + + - **`agentsfleet chat`** — starts or resumes a private draft. `--definition `, `--library --revision `, and `--fleet --setup-revision ` start one without a message. + - **Scripted setup** — with `--no-input`, `--review` prints `Review digest: `. `--save`, `--apply`, and `--publish + ## Logout ends its own unfinished sign-ins, and the daemon refuses an unsafe identity base diff --git a/cli/agentsfleet.mdx b/cli/agentsfleet.mdx index 7bd23d2..94ced98 100644 --- a/cli/agentsfleet.mdx +++ b/cli/agentsfleet.mdx @@ -28,19 +28,22 @@ agentsfleet --help ``` ```text -Usage: agentsfleet [options] [command] - -Options: - -v, --version Show version - --api API base URL - --json Machine-readable JSON output - - -Commands: - login [options] Authenticate via browser - workspace Manage workspaces - fleet Fleet management subcommands - +DESCRIPTION + agentsfleet cli + +USAGE + agentsfleet [flags] + +FLAGS + --api API base URL + --json Machine-readable JSON output + +SUBCOMMANDS + login Authenticate via browser + + chat Create, resume, and review a private workspace chat + fleet Fleet management subcommands + ``` ## Options @@ -95,24 +98,100 @@ Write these after `login`. Only `agentsfleet login` reads them. | `agentsfleet grant list --fleet ` | Lists integration grants for one fleet. | | `agentsfleet grant delete --fleet ` | Revokes one grant. Later access through that grant fails. | +### Chat + +`agentsfleet chat` creates, resumes, and reviews a private draft. It is the only way to create a fleet or a Library entry from the terminal. Only the person who starts a draft can read it. + +| Command | Effect | +|---|---| +| `agentsfleet chat --model ` | Starts a blank draft and opens an interactive chat. | +| `agentsfleet chat ` | Resumes a draft and prints its earlier messages. | +| `agentsfleet chat --definition --model ` | Starts a draft from a Definition JSON file, with no chat message. | +| `agentsfleet chat --library --revision --model ` | Starts a draft from one Library revision, with no chat message. | +| `agentsfleet chat --fleet --setup-revision --model ` | Starts a draft that improves an existing fleet, with no chat message. | + +`` is the `ref` of an authoring model from `GET /v1/workspaces/{workspace_id}/models?purpose=authoring`. `` is the fleet's `setup_revision` field from `agentsfleet --json fleet show `. + +In an interactive chat, ordinary text is a message. These actions start with `/`: + +| Slash command | Effect | +|---|---| +| `/review [INSTANCE_NAME]` | Prints the full setup, its required access, its readiness checks, and its review digest. The name selects the fleet name. | +| `/save` | Saves the reviewed setup as a new fleet. | +| `/run ` | Saves the reviewed setup and sends the fleet `` once. | +| `/publish