Repository navigation
docs: manage secrets and automations from the CLI and the API (write API) - #181
Merged
Merged
Conversation
…writes, scopes) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e scopes, CLI session Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…CLI and the API (EN, ES) The write scopes and their warning, one-time webhook URL and signing secret, the rollout answers, rate limits and updated_by. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, as the CLI does Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…al order, realistic examples - Stripe: the CLI rotates only the URL; add reads signing_secret from the file - the write commands' credential order (--token-file, session, NAN_TOKEN) - API keys never reach secrets or automation changes (overview) - nan_whsec_ examples, trigger 404 message, secrets newest first - browser_session_required examples on automation writes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cret-file/--signing-secret-stdin Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… over NAN_TOKEN, Stripe add wording, URL base Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Docs for the NaN community write API (spec: helmcode/nan-devops
AGENT-AUTOMATIONS-PHASE3-WRITE-API.md; backend: helmcode/nan-cloud-api#348, 0.8.261; CLI: nan-cli 0.1.33). EN + ES.Idempotency-Key, one-time webhook URL and signing secret,Cache-Control: no-store), who can write (CLI session, tokens withautomations:write/secrets:write; neversk-or workspace keys,403 credential_not_allowed), the warning (a write credential is as powerful as your secrets; nevernan auth logininside a workspace; least scopes),updated_by/ Last changed from, the rollout answers (CLI exit 64,403 browser_session_required,404on/v1/secrets). Tokens table gains the three scopes, independence of scopes, browser-only minting and a warning callout. Limits table gains the write rate limits. "Why some actions need the browser" and the FAQ rewritten: approving and minting write-scoped tokens stay browser-only.triggers add,triggers rotatewith--url/--secret/--no-grace).nan secrets set; the "needs the browser" note removed.src/data/openapi.json): newSecretstag and/v1/secretsroutes (list, get, create withIdempotency-Key201/200 replay, PATCH, PUT value, DELETE 204,secret_in_use/secrets_too_largewitherror.automations); automation writes (POST, PATCH, DELETE) and trigger writes (POST, PATCH, rotate, DELETE) withTriggerCreated/TriggerRotatedone-time answers;updated_byon Secret, Automation and Trigger; newcliSessionsecurity scheme; scopes,credential_not_allowed, updatedbrowser_session_requiredmessage, 429rate_limitedwith the per-member budgets (secrets 30/120 per hour shared with the portal; automations 30/300 per hour).Every shape was checked against cloud-api origin/main 95414e4 (
handlers/account_secrets.go,automations.go,automation_triggers.go,middleware/write_credential.go,secrets/api.go,automations/api.go). The JSON was re-serialised by a script, so integer response keys are now in ascending order (no semantic change).Tests
src/lib/openapiWriteApi.test.ts: every write operation's tag, security, scope wording, 401/403 bodies (exacttoken_scope_deniedandcredential_not_allowedmessages), 429 on writes only, Secret/request schemas in handler field order, no value field, Idempotency-Key, 409s, no-store, trigger one-time answers, golden files, every example validated against its schema, reference text, no em-dashes.openapiAutomations,openapiByok,openapiRuns,openapiSpec(surface list) andautomationsDocs(commands, never a value on the command line, warning, rollout, rate limits, scopes, EN/ES parity).updated_by, newtrigger_rotate.json).npm test: 2311 passed.npm run build: OK.Deploy
Merge after all of:
WRITE_API_ENABLEDflips totruein prod, nan-cli 0.1.33 is released (helmcode/nan-cli#53), and cloud-ui with the write scopes and Last changed from is deployed (helmcode/nan-cloud-ui#160). The pages describe the write API as rolling out per account, but the commands and portal labels must exist first.Review follow-ups: Stripe triggers from the CLI (
--signing-secret-file/--signing-secret-stdinon rotate,signing_secretin the add file), the write commands' credential order (--token-file, session,NAN_TOKEN, saved token), realistic examples (nan_whsec_, trigger 404 message, secrets newest first),browser_session_requiredon automation writes, API keys never on Secrets.🤖 Generated with Claude Code