API - CODEX AGENTS: setup packet for local Codex
This commit is contained in:
@@ -26,6 +26,7 @@ All writes go through NODE.DC Agent Gateway, are scoped by agent grants, and are
|
||||
- Internal REST endpoints for agent profile, grant, and token lifecycle.
|
||||
- Opaque agent tokens are generated once and stored only as SHA-256 hashes.
|
||||
- Authenticated agent-session endpoint returns effective grants/scopes for future MCP calls.
|
||||
- Agent setup endpoint returns an MCP config template and AGENTS.md instruction pack without echoing the raw token.
|
||||
- Product tool endpoints validate agent token, scopes, and project grants before calling Tasker internal adapter.
|
||||
- MCP JSON-RPC endpoint `/mcp` exposes the same tool runtime as REST product endpoints.
|
||||
- Write tools require idempotency keys and replay successful duplicate requests without creating duplicate Tasker writes.
|
||||
@@ -75,6 +76,20 @@ curl http://127.0.0.1:4100/api/v1/agent-session \
|
||||
|
||||
Do not expose these lifecycle endpoints publicly before the Launcher/internal auth layer is added.
|
||||
|
||||
Generate a local Codex setup packet:
|
||||
|
||||
```bash
|
||||
curl http://127.0.0.1:4100/api/v1/agent-session/setup \
|
||||
-H "Authorization: Bearer $TOKEN" | jq -r .setup.agents_md
|
||||
```
|
||||
|
||||
The setup packet includes:
|
||||
|
||||
- MCP endpoint and header template with `<agent-token>` placeholder;
|
||||
- available tools for the current grants;
|
||||
- AGENTS.md rules for Tasker card writing, no-delete boundary, and required `idempotency_key`;
|
||||
- no raw token echo.
|
||||
|
||||
Call MCP tools through the JSON-RPC endpoint:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user