Skip to content

Commit 79e3ab0

Browse files
committed
docs: finish the agent-gateway rename across guides and comments
Sweep the remaining kap-server references in docs, skill guides, and comments to agent-gateway, and drop stale PLAN.md decision pointers.
1 parent 7a601df commit 79e3ab0

26 files changed

Lines changed: 117 additions & 113 deletions

File tree

.agents/skills/agent-core-dev/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ End-to-end procedures that span the stages. Reach for these before reading the s
2929

3030
- [Align (port `agent-core``agent-core-v2`)](align.md): split a v1 class into semantic units, fix each unit's domain / scope / Service / dependencies, then migrate the logic and tests. Use when the task is "move feature X from v1 to v2" or "port `IXxxService` to v2".
3131
- [Commit align (triage a `main` commit against v2)](commit-align.md): given one `main` commit hash + a short note, find the v1 logic it changed, check whether v2 already has the corresponding implementation, bucket it (aligned / partial / missing / not-applicable), and recommend a minimal fix. Use in the `pythinker-code-v2`-catching-up-to-`main` phase, for one commit at a time; escalate to [align.md](align.md) if the gap is a whole domain.
32-
- [Server align (expose `agent-core-v2` over `server-v2`)](server-align.md): wire a v2 domain into `packages/kap-server` over `/api/v2` (native) and `/api/v1` (v1-compatible mirror), keep the wire schema byte-compatible with the established v1 contract by sharing the `@pymodel/protocol` schema, and isolate v1-only behavior in a `<domain>Legacy` edge adapter instead of distorting the native v2 Service. Use when the task is "expose the new v2 Service on the server", "add a route to the `/api/v1` surface", or "keep server-v2 wire-compatible with released v1 clients".
32+
- [Server align (expose `agent-core-v2` over `server-v2`)](server-align.md): wire a v2 domain into `packages/agent-gateway` over `/api/v2` (native) and `/api/v1` (v1-compatible mirror), keep the wire schema byte-compatible with the established v1 contract by sharing the `@pymodel/protocol` schema, and isolate v1-only behavior in a `<domain>Legacy` edge adapter instead of distorting the native v2 Service. Use when the task is "expose the new v2 Service on the server", "add a route to the `/api/v1` surface", or "keep server-v2 wire-compatible with released v1 clients".
3333

3434
## Stages
3535

.agents/skills/agent-core-dev/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ registerSection(MY_SECTION, MySectionSchema, {
270270
});
271271
```
272272

273-
- A deprecated TOML key is **ignored** (its value no longer applies — the schema only knows the new key) and reports a warning `ConfigDiagnostic` while present; the file is never rewritten, so the warning is the migration guide. Diagnostics are recomputed on every load/reload and surface to clients via `IConfigService.diagnostics()` and `onDidChangeDiagnostics` (kap-server republishes them as the global `event.config.warning` WS event).
273+
- A deprecated TOML key is **ignored** (its value no longer applies — the schema only knows the new key) and reports a warning `ConfigDiagnostic` while present; the file is never rewritten, so the warning is the migration guide. Diagnostics are recomputed on every load/reload and surface to clients via `IConfigService.diagnostics()` and `onDidChangeDiagnostics` (agent-gateway republishes them as the global `event.config.warning` WS event).
274274
- A deprecated env var still **resolves** as a fallback (new var first), with the same warning treatment, and `stripEnvBoundFields` treats it as env-owned for writes.
275275
- See `src/agent/loop/configSection.ts` for a worked example (`max_retries_per_step``max_attempts_per_step`).
276276

.agents/skills/agent-core-dev/edge-exposure.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
How a domain's Services become the wire surface (`/api/v2`) and WebSocket events. This is a **design-time** decision: which Services are exposed, under what public `resource:action` name, and which events stream.
44

5+
> **Implementation note (2026-08):** the current `/api/v2` surface is hand-written route files
6+
> under `packages/agent-gateway/src/routes/v2/`, mounted by `src/routes/registerApiV2Routes.ts`
7+
> (see `packages/agent-gateway/AGENTS.md`). There is no generic `actionMap` dispatcher in
8+
> agent-gateway today; the `resource:action` model and tables below are the original v2 edge
9+
> design. The facade rules (§2, §4), the scope-resolution rule, and the WS-event rules (§5)
10+
> still apply to route-file exposure.
11+
512
The transport (`/api/v2` over HTTP + WS) lives in the **edge** layer (`gateway`/`rpc`/`transport`). It borrows business Services by interface; business code never imports it.
613

714
## 1. The edge model
@@ -45,7 +52,7 @@ A Service method is directly exposable iff **all** hold:
4552
3. Errors are `PythinkerError` (coded).
4653
4. It is a command/query, not a factory, stream, byte-store, or sink.
4754

48-
If any fail → add a wire-safe orchestration method to the owning domain Service (e.g. `IAgentPromptService.submit` settles `{turn_id}` instead of returning the live `PromptHandle`) or compose several domain Services at the edge — kap-server's `routes/prompts.ts` is the reference for edge-side composition.
55+
If any fail → add a wire-safe orchestration method to the owning domain Service (e.g. `IAgentPromptService.submit` settles `{turn_id}` instead of returning the live `PromptHandle`) or compose several domain Services at the edge — agent-gateway's `routes/prompts.ts` is the reference for edge-side composition.
4956

5057
## 3. Per-scope `resource:action` map
5158

@@ -160,7 +167,7 @@ The `eventMap` binds a public event name to the scope's `Event` source (analogou
160167

161168
Session-level `onDidChange` sources (metadata / interactions) carry no payload today, so they are not exposed until there is a concrete consumer.
162169

163-
Safety / reliability (carried over from `packages/server/src/ws/connection.ts` and VSCode's `ChannelServer`):
170+
Safety / reliability (carried over from VSCode's `ChannelServer`, and the legacy v1 server those ideas were ported from):
164171

165172
- request ids + active-request table — `cancel` / `unlisten` disposes them;
166173
- heartbeat — `ping` every 30s, `pong` timeout 10s → `terminate`;

0 commit comments

Comments
 (0)