-
Notifications
You must be signed in to change notification settings - Fork 0
docs(api): document POST /v1/tokens/path endpoint (chain follow-up) #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -57,8 +57,10 @@ type PathTokenIssueRequest = { | |||||
|
|
||||||
| - `POST /v1/tokens/workspace` returns a long-lived `relay_ws_*` workspace token. | ||||||
| - `POST /v1/tokens/agent` accepts that workspace token via `x-api-key` and returns a short-lived `relay_ag_*` token pair for one `agentId`. | ||||||
| - `POST /v1/tokens/path` accepts that same workspace token via `x-api-key` and returns a short-lived `relay_pa_*` token pair whose `relayfile:fs:*` scopes are intersected with the requested `paths`. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 README documents The README at line 60 states that
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||
| - `POST /v1/tokens/refresh` rotates the current pair and preserves the agent-token lineage. Revoking the parent workspace token invalidates all derived agent tokens. | ||||||
| - `POST /v1/tokens/path` is reserved for M5 path-scoped tokens. In M1 it deliberately returns `501 { error: "path_scoped_tokens_not_implemented", code: "not_implemented" }`. | ||||||
|
|
||||||
| `paths` uses the same filesystem constraint model as `relayfile:fs:*` scopes: exact paths or trailing-prefix globs such as `/linear/issues/*`. For compatibility, `/linear/issues/**` is normalized to `/linear/issues/*` during issuance. | ||||||
|
|
||||||
| The TypeScript SDK includes an `AgentTokenSession` helper for transparent agent-token rotation: | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: AgentWorkforce/relayauth
Length of output: 243
🏁 Script executed:
Repository: AgentWorkforce/relayauth
Length of output: 2936
🏁 Script executed:
Repository: AgentWorkforce/relayauth
Length of output: 37526
The POST /v1/tokens/path endpoint is not yet implemented.
The documentation describes functionality that does not currently exist in the codebase. The actual route handler (lines 312–315 of packages/server/src/routes/tokens.ts) returns a 501 Not Implemented error. There is no logic for accepting workspace tokens, generating
relay_pa_*tokens, or intersecting scopes with requested paths. The documentation should either be removed or clearly marked as describing planned functionality, not current behavior.🤖 Prompt for AI Agents