aitododocs Coming soonAutonomous delivery

Projects and tokens

Markdown

The life of a server project: registration, named tokens, and in the end its deletion.

Guideabout 5 min8 commands
On this page

Projects and tokens#

Whoever registers a project on the server is its admin and hands out named tokens (one per person or CI job). The server coordinates (ids, claims, Team AI); the tickets live in the repo's store, or with store: server on the server (A store on the server).

Terminal
$ tkt project register https://tkt.ideathon.me --name Payments
  • Roles: admin ⊇ write ⊇ read; --llm is a separate grant. The last valid admin token cannot be revoked, demoted or given an expiry (ERR_LAST_ADMIN).
  • A token (atk_…) is shown once: share it only over a secure channel, never in a ticket, a commit, a chat or an argument (tkt doctor reports one in a store file: TOKEN_IN_STORE).
  • tkt login reads the token you were given from stdin or a hidden prompt and stores it; AITODO_TOKEN overrides the file (CI). ERR_AUTH_REQUIRED (401): no or unknown token; ERR_AUTH_FORBIDDEN (403): expired, revoked, role too low, or another project's.
Details5 items
  • tkt project register <url> --name N --as alice --force: --as defaults to $USER (USERNAME on Windows; required without both). It writes the pin (.aitodo/server.yaml, {url, project}, no secret: commit it) and the admin token to the credentials file (Server pin and credentials). An existing pin needs --force (else ERR_ID_DUPLICATE).
  • tkt token create ci --role write --llm --expires 90d prints just the token (pipeable); --json: {name, role, llm, created, expires, lastUsed, revoked, token}. --expires 2027-01-31: through that day (UTC). tkt token list --json: never a token value. tkt token update ci --role read --no-llm --no-expires. tkt token revoke ci (name stays reserved). tkt logout drops the stored token.
  • tkt login takes the server from the pin, in a store: server folder from its .aitodo.yaml, else tkt login <url> --project <id>; it checks the token (/whoami) and prints Saved in <path> (from …).
  • All admin tokens lost: the operator runs tkt operator admin-token (HTTP) or tkt server admin-token (on the host).
  • HTTP client: 30 s timeout, system TLS trust plus AITODO_CA_BUNDLE; plain http:// only to localhost. Header: Authorization: Bearer atk_…. It follows a redirect only for a read (GET) and only to the same scheme, host and port, with the token; any other redirect (another host or port, https to http, a redirected write) stops with ERR_COORDINATOR_UNREACHABLE naming only the target's origin, and the token goes nowhere. Then set the server URL to the address the server really answers at. The credentials file: servers: {<url>: {projects: {<id>: {name, token}}}} (URL: scheme + host lower case, no trailing slash).

Deleting a project#

An admin deletes a project and everything the server keeps for it (tokens, LLM usage and caps, id counters, claim leases) in one step: tkt project delete --confirm Payments. The tickets in the store are never touched, and the id is never reused. Without a matching --confirm it asks you to type the name; with no terminal: ERR_CONFIRM_REQUIRED, nothing deleted.

Details1 items

Then it removes your stored token and the .aitodo/server.yaml that points at the project: commit that, the store works locally again. Admin tokens lost: the operator runs tkt operator project-delete (HTTP) or tkt server project-delete (on the host).

Commands on this page#

Generated from the registry: src/aitodo/api/selfdoc_entries/team.py · team.projects, team.project-deletev0.1.298