API - CODEX AGENTS: setup packet for local Codex

This commit is contained in:
DCCONSTRUCTIONS
2026-05-14 20:15:42 +03:00
parent 2c1e83dd37
commit fd43f503dd
6 changed files with 155 additions and 9 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ Acceptance:
- local Codex can move card state;
- local Codex cannot delete/archive.
Status: initial product slice implemented. `/mcp` supports JSON-RPC `initialize`, `ping`, `tools/list`, and `tools/call`. REST product endpoints and MCP tools share the same runtime, scope checks, grant checks, idempotency handling, audit events, and Tasker adapter calls. `npm run smoke:mcp:e2e` verifies real local Tasker writes and idempotent replay.
Status: initial product slice implemented. `/mcp` supports JSON-RPC `initialize`, `ping`, `tools/list`, and `tools/call`. REST product endpoints and MCP tools share the same runtime, scope checks, grant checks, idempotency handling, audit events, and Tasker adapter calls. `/api/v1/agent-session/setup` returns the MCP config template and generated AGENTS.md instruction pack. `npm run smoke:mcp:e2e` verifies real local Tasker writes and idempotent replay.
## Phase 6. Agent identity
+13
View File
@@ -336,6 +336,19 @@ tasker_raw_api_request
`tasker_get_agent_instructions` should include the effective card guide. The local Codex setup file should instruct the agent to call this tool before planning Tasker changes.
Agent Gateway also exposes:
```text
GET /api/v1/agent-session/setup
```
This endpoint is authenticated by the same bearer token and returns:
- MCP server config template with `<agent-token>` placeholder;
- tools available to the current agent grants;
- generated AGENTS.md content with NODE.DC Tasker operating rules;
- no raw token echo.
Minimum instruction:
```text