@owlmeans/viable-sdk 0.1.18-rc.4 → 0.1.18-rc.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +8 -5
  2. package/agent-meta/manifest.json +16 -0
  3. package/agent-meta/skills/viable-sdk/SKILL.md +558 -0
  4. package/build/api/remote.d.ts +16 -2
  5. package/build/api/remote.d.ts.map +1 -1
  6. package/build/api/remote.js +88 -26
  7. package/build/api/remote.js.map +1 -1
  8. package/build/consts.d.ts +30 -14
  9. package/build/consts.d.ts.map +1 -1
  10. package/build/consts.js +34 -14
  11. package/build/consts.js.map +1 -1
  12. package/build/context/index.d.ts +10 -1
  13. package/build/context/index.d.ts.map +1 -1
  14. package/build/context/index.js +67 -23
  15. package/build/context/index.js.map +1 -1
  16. package/build/executor/errors.d.ts +15 -0
  17. package/build/executor/errors.d.ts.map +1 -1
  18. package/build/executor/errors.js +17 -0
  19. package/build/executor/errors.js.map +1 -1
  20. package/build/executor/files.d.ts +58 -0
  21. package/build/executor/files.d.ts.map +1 -1
  22. package/build/executor/files.js +256 -15
  23. package/build/executor/files.js.map +1 -1
  24. package/build/executor/git.d.ts +14 -1
  25. package/build/executor/git.d.ts.map +1 -1
  26. package/build/executor/git.js +20 -1
  27. package/build/executor/git.js.map +1 -1
  28. package/build/executor/index.d.ts.map +1 -1
  29. package/build/executor/index.js +16 -0
  30. package/build/executor/index.js.map +1 -1
  31. package/build/executor/shell.d.ts.map +1 -1
  32. package/build/executor/shell.js +24 -7
  33. package/build/executor/shell.js.map +1 -1
  34. package/build/harness/templates.d.ts +2 -2
  35. package/build/harness/templates.d.ts.map +1 -1
  36. package/build/harness/templates.js +47 -20
  37. package/build/harness/templates.js.map +1 -1
  38. package/build/project/setup.d.ts +1 -1
  39. package/build/session/index.d.ts +2 -0
  40. package/build/session/index.d.ts.map +1 -1
  41. package/build/session/index.js +40 -3
  42. package/build/session/index.js.map +1 -1
  43. package/build/session/questions.d.ts +16 -0
  44. package/build/session/questions.d.ts.map +1 -0
  45. package/build/session/questions.js +17 -0
  46. package/build/session/questions.js.map +1 -0
  47. package/build/session/queue.d.ts +54 -0
  48. package/build/session/queue.d.ts.map +1 -0
  49. package/build/session/queue.js +102 -0
  50. package/build/session/queue.js.map +1 -0
  51. package/build/session/tasks.d.ts +7 -32
  52. package/build/session/tasks.d.ts.map +1 -1
  53. package/build/session/tasks.js +8 -81
  54. package/build/session/tasks.js.map +1 -1
  55. package/build/task/envelope.d.ts.map +1 -1
  56. package/build/task/envelope.js +5 -1
  57. package/build/task/envelope.js.map +1 -1
  58. package/build/task/index.d.ts +1 -0
  59. package/build/task/index.d.ts.map +1 -1
  60. package/build/task/index.js +1 -0
  61. package/build/task/index.js.map +1 -1
  62. package/build/task/inquiry.d.ts +53 -0
  63. package/build/task/inquiry.d.ts.map +1 -0
  64. package/build/task/inquiry.js +232 -0
  65. package/build/task/inquiry.js.map +1 -0
  66. package/build/tools/catalogue.d.ts +2 -2
  67. package/build/tools/catalogue.d.ts.map +1 -1
  68. package/build/tools/catalogue.js +718 -86
  69. package/build/tools/catalogue.js.map +1 -1
  70. package/build/tools/index.d.ts +5 -1
  71. package/build/tools/index.d.ts.map +1 -1
  72. package/build/tools/index.js +5 -1
  73. package/build/tools/index.js.map +1 -1
  74. package/build/tools/kits.d.ts +4 -0
  75. package/build/tools/kits.d.ts.map +1 -0
  76. package/build/tools/kits.js +29 -0
  77. package/build/tools/kits.js.map +1 -0
  78. package/build/tools/mcp.d.ts +2 -2
  79. package/build/tools/mcp.d.ts.map +1 -1
  80. package/build/tools/mcp.js +64 -17
  81. package/build/tools/mcp.js.map +1 -1
  82. package/build/tools/platform.d.ts +96 -0
  83. package/build/tools/platform.d.ts.map +1 -0
  84. package/build/tools/platform.js +407 -0
  85. package/build/tools/platform.js.map +1 -0
  86. package/build/tools/refusal.d.ts +72 -0
  87. package/build/tools/refusal.d.ts.map +1 -0
  88. package/build/tools/refusal.js +522 -0
  89. package/build/tools/refusal.js.map +1 -0
  90. package/build/tools/settings.d.ts +45 -0
  91. package/build/tools/settings.d.ts.map +1 -0
  92. package/build/tools/settings.js +86 -0
  93. package/build/tools/settings.js.map +1 -0
  94. package/build/tools/status.d.ts +17 -0
  95. package/build/tools/status.d.ts.map +1 -0
  96. package/build/tools/status.js +104 -0
  97. package/build/tools/status.js.map +1 -0
  98. package/build/tools/stories.d.ts +57 -0
  99. package/build/tools/stories.d.ts.map +1 -0
  100. package/build/tools/stories.js +102 -0
  101. package/build/tools/stories.js.map +1 -0
  102. package/build/tools/types.d.ts +18 -5
  103. package/build/tools/types.d.ts.map +1 -1
  104. package/build/tools/types.js +10 -5
  105. package/build/tools/types.js.map +1 -1
  106. package/build/types.d.ts +94 -24
  107. package/build/types.d.ts.map +1 -1
  108. package/package.json +20 -17
  109. package/build/tools/jobs.d.ts +0 -12
  110. package/build/tools/jobs.d.ts.map +0 -1
  111. package/build/tools/jobs.js +0 -47
  112. package/build/tools/jobs.js.map +0 -1
package/README.md CHANGED
@@ -51,8 +51,11 @@ const session = await openSession({
51
51
  const job = await api.project.create('a tool for tracking gym workouts', ConnectTarget.Local)
52
52
  ```
53
53
 
54
- The session runs its own loop from that point: operations arrive, the executor answers them, model
55
- tasks queue for the parent agent.
54
+ `apiUrl` is the platform's public API origin — path-less, the host that serves the connector,
55
+ planning, `/mcp` and the OAuth sign-in (`CONNECT_DEFAULT_API_URL` in production).
56
+
57
+ The session runs its own loop from that point — a long poll: operations arrive, the executor
58
+ answers them, model tasks queue for the parent agent.
56
59
 
57
60
  ## Rules worth knowing before you change something
58
61
 
@@ -68,8 +71,8 @@ then refused is one an agent tries once and remembers as broken.
68
71
  platform believes it is the only writer of. Two concurrent template writes into one tree is not a
69
72
  throughput problem, it is a corrupted tree.
70
73
 
71
- **Results are cached by operation id.** A connector that reconnects is handed everything still
72
- outstanding, including what it had already answered when the connection dropped. Re-running a build
74
+ **Results are cached by operation id.** A connector that polls again after a restart or a lost
75
+ answer is handed everything still outstanding, including what it had already answered. Re-running a build
73
76
  because an acknowledgement was lost is exactly the cost that cache avoids.
74
77
 
75
78
  **A malformed model-task answer is refused locally.** `parseTaskResult` checks the answer against
@@ -93,7 +96,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
93
96
  your project's skill store (`.agents/skills/`):
94
97
 
95
98
  ```sh
96
- npx @owlmeans/agent-skills@^0.1.18-rc.15
99
+ npx @owlmeans/agent-skills@^0.1.18-rc.46
97
100
  ```
98
101
 
99
102
  The embedded files are version-matched to this package release. Do not edit them
@@ -0,0 +1,16 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "package": "@owlmeans/viable-sdk",
4
+ "version": "0.1.18-rc.41",
5
+ "generatedAt": "2026-10-03T15:33:53.018Z",
6
+ "canonicalRepo": "https://github.com/owlmeans/common",
7
+ "entries": [
8
+ {
9
+ "kind": "skill",
10
+ "name": "viable-sdk",
11
+ "category": "package-specific",
12
+ "file": "skills/viable-sdk/SKILL.md",
13
+ "canonicalPath": ".agents/skills/viable-sdk/SKILL.md"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,558 @@
1
+ ---
2
+ name: viable-sdk
3
+ description: How to use @owlmeans/viable-sdk — the connector SDK an external coding agent drives the OwlMeans Viable platform with — the token-authenticated client context, the two host kinds and their tool catalogue, the session operation loop, the local slot executor and local run, the model-task envelope, and the harness installer. Auto-invoked when building or changing a connector, an MCP host, a connector tool, the task envelope, or anything that executes platform slot commands on a developer's machine.
4
+ user-invocable: false
5
+ ---
6
+ <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
7
+
8
+ # @owlmeans/viable-sdk
9
+
10
+ **Layer:** Tooling (Node/Bun; not a browser or React package)
11
+ **Install:** `"@owlmeans/viable-sdk": "^0.1.18-rc.41"` in `dependencies`
12
+ **Subpaths:** `.` · `./executor` · `./run` · `./tools` · `./task` · `./harness`
13
+ **Contracts:** `@owlmeans/viable-common` (`./connect`, `./slot`, `./integrity`, and the planning
14
+ vocabulary — story type and story flow) and `@owlmeans/planning` (the planning protocol tree
15
+ and facade) — every name on the wire is declared there, so the SDK and the platform cannot spell one
16
+ differently.
17
+
18
+ Everything a coding agent needs in order to drive the platform: authenticate with one access token,
19
+ attach a session to a project, execute the platform's slot commands against a directory on this
20
+ machine, deliver its model calls to the parent agent, and run the generated application locally.
21
+ `@owlmeans/viable-mcp` is one host built on it.
22
+
23
+ ## Key Exports
24
+
25
+ | Export | Description |
26
+ |--------|-------------|
27
+ | `makeSdkContext({ apiUrl, token, service?, onRejected? })` | A client context authenticated by one token — a literal or a thunk — with the connector protocols and the planning tree bound and the planning client registered |
28
+ | `makeRemoteConnectorApi(context)` | `ConnectorApi` over HTTP; its `planning` is the context's planning client facade |
29
+ | `openSession(opts)` → `SessionRuntime` | One attached session: the operation loop, the task queue, `stats` |
30
+ | `renderTaskEnvelope(task, { harness })` · `parseTaskResult(task, raw)` | What the parent agent is told; what its answer is checked against |
31
+ | `makeModelTaskDriver({ models })` · `TaskDriver` | A reference parent agent backed by a chat model (tests, CLIs) |
32
+ | `installHarness(dir, harness, opts?)` · `describeHarness(harness)` · `WORKING_RULE` | Set a coding agent up; preview it first |
33
+ | `catalogue` · `visibleTools(host)` · `toolByName` · `registerCatalogue(server, deps)` · `serverInstructions({ host })` | The tools and how they reach an MCP server |
34
+ | `renderProjectStatus`, `renderStoryStatus(status, { landing? })`, `renderPipelineStatus`, `conversionNext` | Domain status as concise lines ending in the next valid action |
35
+ | `resolveStory(deps, projectId, ref)` · `storyQuery(projectId, filter?)` · `renderStories(items, page, total)` · `STORY_ORDER` · `isLandingStory(card)` · `LANDING_MARK` · `LANDING_NOTE` | The story tools' reading of planning cards |
36
+ | `PROJECT_SETTINGS` · `projectSettingOf(key)` · `settingsPatch(args)` · `renderProjectSettings(projectId, settings)` · `settingsReach(target)` | The project-settings tools: each setting's label and rule, the patch a call asks for, the rendering |
37
+ | `PLATFORM_CATALOGUE` (`pipelines`, `features`, `capabilities`) · `renderPlatform(catalogue, host)` · `GENERATED_SUMMARY` | What `describe_platform` renders, and the one-sentence product summary `describe_capabilities` ends with |
38
+ | `ToolHostKind` (`Stdio`/`Http`) · `ToolHost` · `ToolDeps` · `anyHost`/`localTarget`/`cloudTarget`/`withExecutor`/`delegatedLlm`/`sessionCapable`/`performsModelTasks` | The host description and the availability predicates |
39
+ | `./executor`: `makeLocalSlotExecutor(dir, opts?)`, `createLocalFileHelper`, `createLocalShellHelper`, `dispatchGitCommand`, `verifyTarget`/`forgetIntegrity`, `targetPaths`/`apiPath`/`webPath`/`workerPath`, `backendEnv`/`frontendEnv`, `classifyTargetHealth`/`readTargetHealth`, `runBootCheck`, `confineToProject`, the spawn helpers | The publisher's workload, on somebody's laptop |
40
+ | `./run`: `runLocal`, `stopLocal`, `localStatus`, `createLocalServer`, `startApi`/`startWorker`/`restartApi`/`stopProcess`, `readRun`/`writeRun`/`clearRun` | Building and running the generated app locally |
41
+ | `readMarker`/`writeMarker`/`discoverProject`/`isViableTree` · `readEnv`/`writeEnv`/`envStatus`/`replaceManagedBlock` | The `.viable/connect.json` marker and the managed `.env` block |
42
+ | `SdkError`, `SdkAuthError`, `SdkMisconfigured`, `SdkUnsupported` | Registered `ResilientError` classes |
43
+ | `ENV_TOKEN`, `ENV_API_URL`, `ENV_MCP_URL`, `ENV_TARGET`, `ENV_LLM`, `ENV_HARNESS`, `ENV_PROJECT_DIR` · `DEFAULT_MCP_URL` · `resolveMcpUrl(values)` · `TOOL_DEADLINE_MS` (45 s) · `COMMIT_WAIT_MS` (20 s) · `COMMIT_POLL_SEC` · `STORY_PAGE_SIZE` · `NEXT_TASK_WAIT_MS` · `PULL_WAIT_MS` | Configuration and deadlines |
44
+
45
+ ## One credential, and the routes the server declares
46
+
47
+ `makeSdkContext` registers `makeTokenCarrierGuard` under `DEFAULT_GUARD` and binds the SAME
48
+ immutable `connectProtocols({ guard })` tree the server mounts (on the platform's public API host),
49
+ so a path or a schema cannot be right on one end and wrong on the other. The planning tree is bound
50
+ the same way: `makePlanningProtocols({ base: { alias: 'viable:manager-api:planning', path:
51
+ '/planning' }, guards: DEFAULT_GUARD, socketBase: <the /update base> })` — the platform's mount minus
52
+ its ownership gate, which is the server's to apply — followed by `appendPlanningClient(context, {
53
+ protocols, bind: false, poll: COMMIT_POLL_SEC, timeout: TOOL_DEADLINE_MS, schemas: false })`. The
54
+ base alias and path are literals beside the `/update` base for the same reason that one is: they
55
+ belong to the platform, and every planning alias and path derives from them. The aliases are this
56
+ context's registry keys only; the wire is the path, which is why the platform may register its copy
57
+ under aliases of its own. No socket opener is passed, so a commit is awaited by long
58
+ poll only, and the schema bundle is not fetched at startup — nothing a tool does reads a flow, and a
59
+ server nobody has asked anything yet makes no call. There is deliberately **no second credential path**: a connector that could
60
+ fall back to another form of authentication is a connector whose access nobody can revoke by
61
+ revoking a token. A literal token that is empty or lacks `CONNECT_TOKEN_PREFIX` is refused locally
62
+ (`SdkMisconfigured` / `SdkAuthError`), because a 401 says nothing about which of several plausible
63
+ mistakes was made and the answer is always the same one.
64
+
65
+ **`token` may be a thunk** (`() => string | Promise<string>`), resolved on every request — what a
66
+ credential holder (`@owlmeans/cli-auth`) hands over, since it is `''` until a browser sign-in
67
+ completes and a real token after, with no reconfiguration. Only a literal is validated eagerly; a
68
+ thunk's value is unknown at construction, and an empty one is simply "not signed in". `onRejected`
69
+ is passed to the carrier guard and fires when the platform 401s the presented token, which is where
70
+ the holder forgets a dead file token (or reports a dead environment one) — see [[auth-token]].
71
+
72
+ **The `/mcp` URL is a value the SDK resolves, never one it derives:** `resolveMcpUrl(values)` returns
73
+ `values[ENV_MCP_URL]` (`VIABLE_MCP_URL`, empty = unset) else `DEFAULT_MCP_URL`
74
+ (`https://api.owlmeans.com/mcp`), trailing slash dropped so a resource URI has one spelling. The
75
+ caller passes the already merged environment + `~/.owlmeans` values (environment wins). A deployment's
76
+ own resource identifier stays host-derived on the server.
77
+
78
+ **The context must also declare the platform's `/update` base itself.** The planning commit feed
79
+ hangs under that namespace (the SDK never opens it), and a parent an entrypoint registry cannot
80
+ resolve fails the **whole context at init** rather than the one call that would have used it — a server that exited at startup
81
+ with `Entrypoint viable:manager-api:update:base not found`. It is declared with the path the
82
+ platform declares and never binds: it is a namespace, and nothing calls it.
83
+
84
+ **`cfg.webService` names the API CLIENT, never the backend.** It is the alias the entrypoint handler
85
+ looks up with `context.service(...)`, and the only thing registered under it is the `ApiClient` that
86
+ `makeClientContext` appends (`web-client`). Naming the backend service there — which is exactly what
87
+ `addWebService` does — makes every call fail with `Service <backend> not found` before a request is
88
+ sent. The backend belongs in `cfg.services` as an ordinary descriptor marked `default: true`; the
89
+ connect routes name no service of their own, so that is the one they resolve to. Its host is `apiUrl`,
90
+ the platform's PUBLIC API origin (path-less: the connector tree, planning, `/mcp`, OAuth); its alias
91
+ (`service`, default `viable-manager-api`) is a registry key of this context only, never on the wire.
92
+
93
+ **A POST with nothing to say still sends `{}`.** The client sets no `Content-Type` for an absent
94
+ body, and Fastify answers **415 Unsupported Media Type** before the handler runs — an error about
95
+ media types for a call whose only fault was having no arguments. `makeRemoteConnectorApi` fills an
96
+ empty body for any POST route that was given none; `session.close` is exactly that shape.
97
+
98
+ ## Two hosts, one interface
99
+
100
+ `ConnectorApi` is an interface because two implementations must stay interchangeable — one calling
101
+ the API over HTTP (`makeRemoteConnectorApi`, the npx server) and one calling the platform's own
102
+ handlers in process (`makeInProcessConnectorApi` in `viable-public-api`, behind `POST /mcp`). Every
103
+ tool is written against it, so a tool cannot accidentally work in only one of the two. Which route
104
+ `openSession` calls fixes the mode: the delegated route carries the entitlement gate, so a caller
105
+ without the capability is refused at the boundary rather than by a check somewhere inside.
106
+
107
+ `ConnectorApi` has exactly one member per connector route plus the planning facade — the session
108
+ (`openSession`, `closeSession`, `pullOps`, `submitOp`), projects, branding, story status, files,
109
+ pipeline state, conversion (`create`, `check`, `start`, `proceed`, `status`, `purge`) and inquiry
110
+ answers. There is no capability view, no session read or heartbeat and no conversion cancel, and a
111
+ project's inference settings are not a connector call: a person sets them in the browser, through
112
+ the platform's own API. A member is added together with the route in `connectProtocols` and its
113
+ `connectRef` entry — never one without the others.
114
+
115
+ ## A SESSION belongs to a host that stays; `sessionCapable` is what says so
116
+
117
+ A session is a connector ATTACHED — a process that drains the project's operations and holds a model
118
+ task until its answer comes back. The URL-configured host answers one request and forgets, so
119
+ opening one there would claim the project's single connector slot, **supersede the stdio connector
120
+ legitimately holding it**, and be abandoned before the first operation was delivered.
121
+
122
+ So `ensureSession` — what `confirm_project`, `reinitialize_project`, `develop_story`,
123
+ `modify_project`, `apply_planning_kit` and `resume_pipeline` call before returning their job — opens one only on a
124
+ `sessionCapable` host, and `next_task`/`submit_task_result` are available on `performsModelTasks`
125
+ (delegated **and** session-capable) rather than on the account setting alone. `serverInstructions`
126
+ reads the same predicate: a parent told to call `next_task` when the tool is not in its list is a
127
+ parent that waits for a run nobody will advance. A host that cannot serve the delegated mode says so
128
+ in one sentence instead, naming the stdio connector.
129
+
130
+ The in-process implementation refuses the four session verbs (`openSession`, `closeSession`,
131
+ `pullOps`, `submitOp`) with a message naming `@owlmeans/viable-mcp`, because "unsupported" alone
132
+ leaves the reader with nothing to do about it.
133
+
134
+ ## A tool that cannot work in a mode is HIDDEN, not failing
135
+
136
+ `ToolDefinition.availability` and `visibleTools(host)` decide the catalogue a parent actually sees. A
137
+ tool a host cannot serve is a tool the parent tries once, is refused, and remembers as broken — so
138
+ the list it reads is exactly the set of things that work for it. Predicates: `anyHost`,
139
+ `localTarget`, `cloudTarget`, `withExecutor`, `delegatedLlm`.
140
+
141
+ ## 45 seconds is the ceiling, so long operations return domain status
142
+
143
+ Every MCP host bounds a tool call and the strictest default in the field is sixty seconds (Codex).
144
+ `TOOL_DEADLINE_MS` leaves room for the round trip and keeps the connector inside every host's
145
+ ceiling without configuration. A tool that outlives its host's ceiling is reported to the user as a
146
+ **broken server**, and the true answer — the platform was slow — never reaches them.
147
+
148
+ Anything that takes minutes returns the owning domain's status and continues server-side.
149
+ `project_status`, `story_status`, `conversion_status` and `pipeline_status` compose the durable
150
+ records and run state a parent needs. `registerCatalogue` enforces the deadline per call and
151
+ converts a throw into an `isError` result the model can read and act on, because an exception
152
+ crossing the transport tells it only that something went wrong somewhere. Each status renderer
153
+ ends with a single `next:` line so the parent follows the domain workflow and does not invent a
154
+ polling strategy or treat a parked run as failed.
155
+
156
+ ## The story tools speak planning
157
+
158
+ A user story is a planning CARD of `VIABLE_STORY_TYPE` under its project card, and every change to one
159
+ is a transition executed through `ConnectorApi.planning` — a `PlanningFacade`: the client facade
160
+ `appendPlanningClient` registers over HTTP, and `ensurePlanningService(ctx).for(scope)` in the
161
+ platform's in-process host. The scope a call answers for is the CREDENTIAL's; a tool sends none.
162
+
163
+ | Tool | Facade call |
164
+ |---|---|
165
+ | `list_stories` | `cards.list({ ...storyQuery(project, { status, area }), page, size, sort: STORY_ORDER })` → `renderStories` |
166
+ | `search_stories` | the same with `{ q }` |
167
+ | `create_story` | `execute({ action: create, card: { kind: card, type: VIABLE_STORY_TYPE, parent, title, fields: { primary: false } } }, { wait: true, timeout: COMMIT_WAIT_MS })` |
168
+ | `update_story` | `resolveStory` → `execute({ card, action: update, changes: { title }, expectSeq: head ?? seq }, { wait: true, … })` |
169
+ | `delete_story` | `resolveStory` → `execute({ card, action: delete }, { wait: true, … })` → the project-lock poll |
170
+ | `develop_story` | `resolveStory` → `execute({ card, action: transit, transition: start }, { wait: true, … })`, tolerating `CommitTimeout` → `story.status(project, card.id)` |
171
+ | `story_status` | `resolveStory` → the card, its development run, pending inquiry, warning and landing mark |
172
+
173
+ Rules the table rests on:
174
+
175
+ - **A tool NAME is a parent agent's vocabulary and is never renamed**, and neither is an argument:
176
+ `storyId` stays `storyId` although the platform keys on card ids. New facts are added (`designSystem`
177
+ on `confirm_project`, the project status line and the design-system section of `project_status`),
178
+ never substituted.
179
+ - **`storyId` accepts a code or an id**, because `list_stories` prints the CODE — the handle every
180
+ generated file names a story by. `resolveStory` asks for both at once, the id wins, a code is also
181
+ tried uppercased, and neither answers for a story of another project (`ProjectStoryNotFound`).
182
+ - **Development is the story's `start`, not a call of its own.** The platform begins the run once that
183
+ move COMMITS, and refuses it there too (the flow, one story in progress, the balance). The wait is
184
+ `COMMIT_WAIT_MS`, well inside the tool deadline; a late commit is not a failure — the transition is
185
+ durable — so `develop_story` answers from `story_status` rather than outliving the host's ceiling.
186
+ - **A story a person writes goes as written, with no area.** Re-formatting the narrative and deciding
187
+ the area are the platform's, done in its planning middleware for the `connect` channel; a connector
188
+ that guessed an area would be a second answer. `update_story` carries only `title` and the head it
189
+ read, so a change made in between is refused (`WorkcardConflict`) rather than overwritten.
190
+ - **The delete commit is no proof the slot is done.** It says the card is gone and nothing about the
191
+ placeholder screens still being retired under the project lock, so `delete_story` keeps its two
192
+ unlocked observations.
193
+ - **Stories are read in `order`, then `createdAt`**: `order` is the analysis's flow ordinal (a
194
+ connective story sits at a fraction between two steps). `renderStories` keeps the line shape a parent
195
+ already reads — `code · status[ · primary][ · landing gate][ · area]` over the narrative — under a
196
+ header counting the page by intrinsic state. A new fact is a new FLAG beside `primary`; the area
197
+ stays last.
198
+ - **The landing gate story is read off the card the tool already holds** (`fields.landing`, at most
199
+ one per project, decided by the platform at initialization — a connector never sets it). The list
200
+ flags it; `story_status` and `develop_story` pass the resolved card to `renderStoryStatus`, which
201
+ adds `LANDING_NOTE` under the status line, and their structured result gains `landing: true`. No
202
+ second call and no change to `connect.story.status`: that route carries the run, not the card's
203
+ fields. It is said because developing that story also replaces the guest-home sketch with the real
204
+ component, which the narrative alone never tells a parent.
205
+ - **A planning refusal is phrased like any other**: `planning:illegal-transition:`,
206
+ `workcard-conflict:`, `workcard-not-found:`, `fields-invalid:`, `commit-timeout:`, `commit-failed:`
207
+ and the story markers (`viable-project:story:not-found:` / `:missconfigured:`) each have a sentence in
208
+ `REFUSALS`.
209
+
210
+ - **A sign-in refusal is phrased**: `oauth:sign-in-required:` (detail `<url> <code>`, the code absent
211
+ while no device sign-in is pending), `oauth:token-rejected:` (an environment token that was refused
212
+ is never replaced) and `api:auth:guard:auth-token` (a file token the platform refused — forgotten,
213
+ the next call signs in). Each ends with "call this tool again".
214
+
215
+ ## The project settings are ONE record, and the platform is the only validator
216
+
217
+ `project_settings` and `update_project_settings` read and change what a person edits on the project's
218
+ control panel — the copyright line, the organization name, the Terms and Privacy links and the Google
219
+ tag — through `ConnectorApi.projectBranding(projectId)` and
220
+ `saveProjectBranding(projectId, patch)` (`connect.project.branding.get` / `.save`,
221
+ `ConnectProjectBranding` / `ConnectProjectBrandingSave` from `@owlmeans/viable-common`).
222
+
223
+ - **A save is a PATCH.** `settingsPatch` keeps exactly the settings the call named, trimmed; an
224
+ omitted one keeps its stored value, and an EMPTY string is sent as given — for the Google tag that
225
+ is the removal, for the others a value the platform refuses. A call naming none is refused locally
226
+ and saves nothing. The answer is the merged record the platform stored, led by where the change
227
+ shows (`settingsReach`): a cloud preview is rebuilt, production takes it at the next Publish; a
228
+ local project gets it in its `.env` and `run_local` builds with it.
229
+ - **The connector states the rules and checks none of them.** `PROJECT_SETTINGS[].rule` is the web
230
+ save's validation in words — never-empty copyright and organization; an `https://` address without
231
+ credentials or a single-slash path on the application (`/terms`, `/privacy` are the generated
232
+ pages); a `GTM-`/`G-`/`GT-`/`AW-`/`DC-` id or `''` — used by the tool description and by the
233
+ refusal. A second copy of the check would be a second answer that drifts from the platform's.
234
+ - **A refusal names the setting and its rule.** The platform refuses a field with
235
+ `AuthenPayloadError(<wire field>)`; the `authen:payload:` phrase answers a known setting with its
236
+ label and rule and "Nothing was changed", any other field with a generic sentence. The tool runs in
237
+ `answering`, so the refusal is its own `isError` result and is still logged.
238
+ - **The save attaches the connector first** (`ensureSession`), like a story mutation: it ends in the
239
+ platform's configuration push, which for a local project is a `Configure` operation this connector
240
+ answers.
241
+ - **A relative link is annotated, never "fixed"**: `/terms` renders as "the generated Terms page", so
242
+ a parent does not rewrite it into an absolute address that points away from the generated page.
243
+ - **The credit switch is not reachable.** It is a paid capability with its own gated route;
244
+ neither the record nor the patch carries it.
245
+
246
+ ## Planning kits are described, then applied; the platform writes and rebuilds
247
+
248
+ A planning kit is a ready set of card types and status flows for one kind of work-management
249
+ product, which the platform writes into the target's common package (`PLANNING`).
250
+ `describe_planning_kits` (`ConnectorApi.project.kitDescribe(projectId)`, GET
251
+ `connect.project.kit.describe` → `{ kits: PlanningKitView[] }`) lists each kit's purpose, container,
252
+ types with their main flow and each flow's statuses; it opens no session. `apply_planning_kit`
253
+ (`project.kitApply(projectId, { kit, types? })`, POST `connect.project.kit.apply` →
254
+ `{ applied, skipped, warnings }`) refuses a call without `kit` locally, attaches the connector first
255
+ (`ensureSession`: the write is a file operation a local project's connector answers), runs in
256
+ `answering`, and answers what was written, left out and warned. `types` keeps those kit type keys;
257
+ omitted keeps all. Both are offered on every host, in the `planning-kits` capability group. The SDK
258
+ never renders the literals or rebuilds — the platform does, inside the 45-second ceiling.
259
+
260
+ ## `describe_platform` also says what a generated application CARRIES
261
+
262
+ `PLATFORM_CATALOGUE.features` holds facts about the product the runs produce — the landing gate, the
263
+ generated Terms and Privacy pages, the consent-gated Google tag, the look, production builds without
264
+ preview scaffolding — rendered whole on every host under "WHAT A GENERATED APPLICATION CARRIES", with
265
+ only their `tools` narrowed to what the host offers. A parent that is not told the platform generates
266
+ the legal pages writes its own beside them. `describe_capabilities` ends with `GENERATED_SUMMARY`, the
267
+ same facts in one sentence, because it is read at the same moment by a parent that may never call
268
+ `describe_platform`; the two sit side by side in `platform.ts`. The pipelines' `stages` name the steps
269
+ a run can stop at (`landing` and `legal` in init, `landing` in story development).
270
+
271
+ ## A balance or consent refusal is phrased for a person, and pushed through `notify`
272
+
273
+ `registerCatalogue`'s catch special-cases the two refusals only a PERSON can resolve
274
+ (`@owlmeans/viable-common` `connect/errors.ts`), by `instanceof`:
275
+
276
+ - `ConnectOutOfCredits` — rather than the raw `viable-connect:out-of-credits:...` marker, the tool
277
+ result reads as a sentence: what it needed, what the account has, and a link to top up.
278
+ - `ConnectConsentRequired` — the EU spend consent: "Nothing was started", why (credits bought less
279
+ than 14 days ago may only be used once a person expressly asks, the purchase still withdrawable up
280
+ to the last day), the `consentUrl` to open and confirm in the browser, and that the call must NOT
281
+ be retried automatically — only after the user says they confirmed (`consentRequiredPhrase(url,
282
+ deadline)` in `tools/refusal.ts`, shared with the stored-text entry below).
283
+
284
+ Their fields travel packed into the message (only `type` and `message` survive the platform's
285
+ internal HTTP hop) and are read back with `finalizeUnmarshal()`. Both are also handed to the
286
+ optional `ToolDeps.notify?('warning', text)`, which a host wires to its own out-of-band channel —
287
+ the stdio `viable-mcp` host sends an MCP `notifications/message`; the platform's stateless `/mcp`
288
+ host has no channel and omits it, so `notify` is always best-effort and optional. Every other
289
+ error returns through `refusalPhrase` and never calls `notify`.
290
+
291
+ The same refusals also arrive where no class survives, and `REFUSALS` phrases them by marker:
292
+ `viable-connect:consent-required:` (a stored run error; the URL and deadline parsed from the
293
+ detail), `performance-consent-required` (the web refusal inside a planning `commit-failed:` or a
294
+ stored error — no URL, so "Billing in the OwlMeans web application") — both ABOVE the planning
295
+ markers, because the consent is what the person acts on — and, for a production body that carries
296
+ only an incident id (`@owlmeans/api` `ApiStatusError`), `api:client:status:428` (the consent
297
+ sentence) and `api:client:status:402` (the balance sentence).
298
+
299
+ ## The session loop: serial, and free to redeliver
300
+
301
+ `openSession` pulls operations, answers them **one at a time**, and puts model tasks aside. Serial
302
+ because the thing on the other end of a local operation is a filesystem the platform believes it is
303
+ the only writer of — two concurrent template writes into one tree is not a throughput problem, it is
304
+ a corrupted tree.
305
+
306
+ Results are remembered by operation id. A connector that reconnects is handed everything still
307
+ outstanding, **including whatever it had already answered when the connection dropped**, and the
308
+ cached result answers it without doing the work again — re-executing a build or a model task because
309
+ an acknowledgement was lost is exactly the cost this avoids. A failed `submitOp` is logged, never
310
+ thrown: the operation stays in the platform's store and is redelivered.
311
+
312
+ Model tasks are **not executed here at all** — they are the parent agent's to run in its own clean
313
+ subagent, and what the loop owes them is delivery. The operation id is kept beside each task and
314
+ never shown to the parent: a parent that could name one could answer an operation it was never
315
+ given.
316
+
317
+ A local operation that fails reports `ConnectOpErrorKind.Refused`, never `Unavailable`. The
318
+ connector ran and could not do the thing; `Unavailable` tells the platform to give up on a run that
319
+ is fine.
320
+
321
+ **The pull long-poll is the only transport.** It works through every proxy and needs no
322
+ reconnection logic, and the URL-configured host opens no session at all, so it never pulls. The
323
+ contract declares no connector socket, and `SessionStats.transport` is `'pull'` or `'none'`;
324
+ presence is refreshed by every pull and every submit.
325
+
326
+ ## An answer is READ in the shapes models produce, not only the one asked for
327
+
328
+ The tool-call instruction asks for a JSON array and models mostly comply — but a single call comes
329
+ back as a bare object often enough, and some wrap the array in `{tool_calls: […]}`, that assuming
330
+ the array is a defect rather than strictness. The reference driver cast straight to an array, so a
331
+ bare object threw `parsed.map is not a function`; the TypeError was handed back AS the answer, the
332
+ model ladder read that as a bad answer and asked again with feedback that said nothing about what
333
+ was wrong, and the story failed with `retry-exceeded` having never been told. `toolCallsOf` accepts
334
+ all three shapes and still throws for an answer carrying no call at all — an empty answer is a bad
335
+ answer, and the retry is the right response to it.
336
+
337
+ The same rule is why `parseTaskResult` refuses with a described reason rather than a stack trace:
338
+ whatever comes back becomes a model's next prompt, so it has to be readable by one.
339
+
340
+ ## A redelivered model task must NOT be handed over twice
341
+
342
+ The platform redelivers every unanswered operation on each poll — that is what makes a connector
343
+ restart cost a round trip instead of a run, and for a slot command it is free because the result
344
+ cache answers it. A MODEL task is different: it is answered by a parent agent in tens of seconds,
345
+ and every poll during that window used to queue another copy. The parent then ran the same task
346
+ over and over — real model calls, paid for by the user, thrown away — while the job stayed blocked,
347
+ because only the first answer routed to a live operation and every later one reported that no
348
+ operation was waiting.
349
+
350
+ `TaskQueue` therefore remembers every task id it has handed over and ignores a second delivery of
351
+ one, keeping the memory after the task settles so a redelivery that raced the platform's deletion
352
+ is ignored rather than answered again. The operation id IS refreshed on a redelivery, because the
353
+ answer must route to the operation the platform is currently waiting on. `push` returns whether the
354
+ task was accepted, and `tasksDelivered` counts only accepted ones — a counter that grew per poll
355
+ would make a stuck run look busy.
356
+
357
+ ## The task envelope is text for a model to act on
358
+
359
+ The reader is a language model working from a tool result, so it must be able to act without a
360
+ schema in front of it. Everything it must do is stated **in order and before the material** — how to
361
+ run it (in a clean subagent, per harness), what to call afterwards (`submit_task_result`, with the
362
+ id spelled out), and what shape the answer takes — so a model that stops reading early has still
363
+ read the instruction. The task id appears at the top and in the follow-up call because it is the
364
+ only thing that routes an answer back: a parent that paraphrases the rest but copies the id still
365
+ works. A retry says which attempt it is and why the previous answer was refused. Harnesses differ
366
+ only in the isolation mechanism, never in what is asked; `Other` gets the request stated rather than
367
+ mechanised.
368
+
369
+ For Codex, the parent gives a fresh `viable-worker` only the task's system prompt, then its
370
+ conversation, then the requested result shape: the outer handoff instruction and
371
+ `submit_task_result` call are parent-only. It passes that final response through unchanged, but must
372
+ preserve the mode: a `text` task returns the requested source or text and never a JSON tool-call
373
+ array; that array belongs only to `tools` mode.
374
+
375
+ **`parseTaskResult` refuses a malformed answer locally**, and returns a `problem` rather than
376
+ throwing. The refusal is worth more than the parse: an answer that reaches the platform malformed
377
+ costs a whole retry — another task, another subagent, another wait — while one caught here is a
378
+ sentence the parent can act on immediately, with the subagent's context still open. It unfences,
379
+ rejects an array or a scalar in `Json` mode, and rejects a tool name the task never offered.
380
+
381
+ A task is handed out ONCE, and the platform then waits on it for up to 45 minutes. So the loop has
382
+ to survive a parent that lost the envelope — a compacted conversation, a subagent that died before
383
+ answering. `next_task` takes an optional `taskId` that re-reads a task already handed out, and when
384
+ nothing new is queued but something is unanswered it NAMES the outstanding ids rather than re-handing
385
+ them: re-handing would have a parent whose subagent is still working run the same task twice. A
386
+ refused answer keeps the task outstanding for exactly the same reason.
387
+
388
+ ## The harness installer is idempotent by construction, and never writes the token
389
+
390
+ A section is replaced between `<!-- viable:begin -->` and `<!-- viable:end -->`, a JSON entry is
391
+ merged under its own key, and a file whose content would not change is skipped. An instruction file
392
+ belongs to its project: overwriting it to add a paragraph deletes whatever else was in it, and
393
+ appending unconditionally grows a duplicate on every install. That is what makes `install_harness`
394
+ safe to offer as a tool the agent may call whenever it is unsure. A configuration that is not valid
395
+ JSON is **refused** — somebody is editing it, and overwriting would destroy every other server they
396
+ had configured.
397
+
398
+ **No file it writes contains the token**, and none REQUIRES one: a person who signed in with a browser
399
+ has the token in `~/.owlmeans`, which the server reads itself. So each configuration references
400
+ `VIABLE_API_TOKEN` in its harness's own syntax only where that cannot break a machine that never set
401
+ it — claude-code's `.mcp.json` uses `${VIABLE_API_TOKEN:-}` (an unset `${VAR}` makes Claude Code refuse
402
+ the whole file; the server ignores the empty value), Copilot's `.vscode/mcp.json` has no token prompt
403
+ at all, and Codex's `env_vars` lists `VIABLE_API_TOKEN`, `OWLMEANS_CREDENTIALS` and `HOME` (its filtered
404
+ environment otherwise hides the credentials file). The result is safe to commit. `WORKING_RULE` is written once and rendered
405
+ into every harness's instruction file, so the four cannot drift into four different protocols.
406
+
407
+ **The server command is written once, too.** Every harness configuration starts the connector from
408
+ `MCP_COMMAND` in `src/harness/templates.ts` — viable-mcp through `npx -y`, pinned with a caret at the
409
+ viable-mcp release, on ONE line with its `npx` so the release pin audit reads it as an install
410
+ command and moves it with every viable-mcp bump. Never a tag (`@next` is refused by that audit) and
411
+ never a per-harness literal: three copies spelled `@next` while the fourth carried the pin.
412
+ `tests/harness.spec.ts` asserts all four configurations name the viable-mcp manifest's version, that no
413
+ file contains a `vib_…` secret, and the optional-token shapes above.
414
+
415
+ ## The executor is the publisher's job, on somebody's laptop
416
+
417
+ `makeLocalSlotExecutor(dir)` answers the platform's slot commands against a directory here. The
418
+ dispatcher is the publisher's, switch for switch: the platform's remote helpers parse the ANSWERS
419
+ and cannot tell whether a pod or a laptop produced one, so an ordinary failure comes back in the
420
+ same shape ("error text or null"), and only an unknown command — a protocol fault rather than a
421
+ project fault — escapes as an exception. Everything is resolved per call rather than closed over,
422
+ because a re-initialization replaces the tree under a running connector. The integrity verdict is
423
+ forgotten after every command that changes the tree.
424
+
425
+ Five rules the local half adds, each learned from a defect:
426
+
427
+ - **`backendEnv` reads the root `.env` and `frontendEnv` the web package's own — the file split IS
428
+ the leak boundary.** The publisher has an allow-list (`frontendEnvVars`/`frontendSecrets`); here
429
+ the two files are never merged in either direction, because `FRONTEND_ENV_KEYS` announces
430
+ everything in the frontend set to the bundler and a merge would compile `OIDC_SECRET` and
431
+ `DATABASE_URL` into a bundle every visitor downloads.
432
+ - **`Discard` passes `git clean -fd -e .viable`.** `.viable/connect.json` is untracked until someone
433
+ commits it, and a discard that swept it leaves a tree no later session can recognise as a platform
434
+ project at all.
435
+ - **The always-keep list must not leave empty parent shells.** A wipe keeps `.viable`, `.env`, the
436
+ web package's `.env` and `.git` whatever the caller asked, so a directory holding a kept path is
437
+ walked and pruned rather than removed — and a keep that was not there (the web `.env` every
438
+ project without local branding lacks) must not leave the walked directory behind as a skeleton the
439
+ install then lands in.
440
+ - **An absolute path from elsewhere on the machine is re-rooted inside the project**, not refused —
441
+ the publisher's own behaviour, kept deliberately and pinned by a test. Concatenating it onto the
442
+ root instead builds a shadow tree: the write reports success, a later read of the same name
443
+ resolves to the untouched original, and the change looks silently ignored. `resolveInProject`
444
+ (exported as `confineToProject`) then compares the fully resolved path to the root — confinement,
445
+ not sanitization, and applied on **every** fs call rather than a `..`-to-`.` replace at one caller.
446
+ - **`run/state.ts` sits below both the shell commands and the run**, so the three do not form a
447
+ cycle: `DbSync` bounces the api child, `DbSync` is a shell command, and the shell commands are
448
+ reached through the executor the run is built on. Everything that touches a child process lives
449
+ there, and the run record is a file because the processes outlive the call — and, on a restarted
450
+ connector, the process — that started them.
451
+
452
+ ## Attaching a session is what writes the project marker
453
+
454
+ `.viable/connect.json` is how a connector started in a directory tomorrow knows which project it
455
+ is, and `attach_project` finds a project by its directory through it. It was declared, read at MCP
456
+ startup and documented in `mcp.md` before anything wrote it — a marker nothing writes is a lookup
457
+ that always misses.
458
+
459
+ `openSession` writes it when the session names a project and a directory, which is the moment the
460
+ directory becomes that project's. Best-effort and idempotent: a session that works is worth more
461
+ than a note about it, and it is skipped when the marker already names the same project. It holds
462
+ no secret and is meant to be committed, which is why the API URL and the slug are in it and the
463
+ token never is.
464
+
465
+ ## The managed block yields to every key the user assigned
466
+
467
+ A `.env` gives the LAST assignment of a key and the platform's block is appended, so a platform line
468
+ silently outranks whatever the user wrote above it. That made the documented promise — everything
469
+ outside the block is yours — false for the one value the platform cannot supply: `DATABASE_URL`, the
470
+ line the setup guide tells people to write. The application connected to the placeholder no matter
471
+ what its owner put in the file.
472
+
473
+ `writeEnv` therefore reads the file with the block cut out, and replaces any block line assigning a
474
+ key the user already assigns with a comment saying so. The rule is about VALUES, not lines: a key the
475
+ user has not claimed is still the platform's to set, and a key they later delete goes back to the
476
+ platform on the next push.
477
+
478
+ ## The two services a local project needs are ASKED for, never assumed
479
+
480
+ The platform provisions nothing on somebody's own machine, so a database — and, for a project with a
481
+ worker, a queue store — is the one thing it cannot supply and must not guess. `local_setup_guide`
482
+ reports what the machine already provides and, where something is missing, returns a QUESTION with
483
+ three answers: the user already has one, wants one installed here, or wants a free hosted plan.
484
+ Guessing means either a container on somebody's machine they did not ask for, or a connection string
485
+ invented for a database that does not exist — and the second surfaces minutes later as a boot error
486
+ about a connection, which sends the reader looking for a database rather than for a typo.
487
+
488
+ `set_local_service` records what they answered: it writes the value into the project's own half of
489
+ the `.env`, replacing that key rather than appending a second copy, and PROBES it immediately, so a
490
+ string that does not connect is caught while the user is still in the conversation. A credential
491
+ never reaches the marker, a harness configuration, or the platform, and the guide warns when the
492
+ file is not git-ignored.
493
+
494
+ ## A detached child outlives the connector, so the port is RECLAIMED before it is used
495
+
496
+ Every target process is spawned detached — that is what keeps a build from dying with the tool that
497
+ started it — and detaching is also why a connector killed mid-run (a host restart, a Ctrl-C, a
498
+ crashed test) leaves one alive. What survives holds port 3000, and the next attempt fails with the
499
+ TARGET's own "the api port is already in use", which reads as a defect in the generated app rather
500
+ than as a leftover.
501
+
502
+ Two rules, both ported from the publisher because a laptop needs them more than a pod does:
503
+ - `killGroupAndWait` never returns early on the child's own exit code. The child is a shell wrapping
504
+ `bun`, so a signal the shell dies from leaves `bun` alive while `exitCode` says gone; the wait
505
+ polls the GROUP instead of the child's exit event.
506
+ - `reclaimPort` runs before a spawn as well as after one, and matches on the script AND the process
507
+ marker (`--viable-api`, `--viable-worker`, `--viable-boot-check`) — never a port alone, and never
508
+ a marker alone, since reclaiming sends SIGKILL and a marker on its own matches any command line
509
+ that merely mentions it.
510
+
511
+ ## Running the generated app locally
512
+
513
+ `runLocal` builds and starts the api, the worker (when the project has one) and a local server that
514
+ holds the web port and proxies `/api` to the api process on the same origin — the generated app's
515
+ configuration assumes one origin, and splitting them across two loopback ports would put its CORS
516
+ setup in the path of a developer's first page load. There is no respawn ladder, no reconciler and no
517
+ health route: a developer watching their own terminal is the supervisor. What IS reproduced is the
518
+ shape — the same ports, the same argv marker, the same environment, and the same "port ownership is
519
+ the only proof" rule about restarts. Nothing from the publisher's public-hostname policy (robots,
520
+ CSP, the preview error reporter, the build-state header) is reproduced: a loopback address has no
521
+ reputation to spend and no crawler to answer.
522
+
523
+ `run_local` refuses to start a project whose `.env` is still missing a required key, because an app
524
+ launched without a database URL fails at boot with a message about a connection, which sends the
525
+ reader looking for a database that was never configured.
526
+
527
+ ## Tests
528
+
529
+ `bun test ./tests` — offline: the envelope and its parser, the harness installer, the tool catalogue,
530
+ the `registerCatalogue` out-of-credits, consent and planning-refusal phrasing and `notify` wiring
531
+ (`mcp-catalogue.spec.ts`; the consent marker, the bare 428/402 statuses and a consent inside a
532
+ commit failure in `catalogue.spec.ts`), the executor's files/git/layout rules, and the marker + managed-`.env`
533
+ block. The story tools run over a REAL `@owlmeans/server-planning` service (memory store, the Viable
534
+ types and flows, one plugin standing in for the platform's format seam) built in `tests/context.ts`,
535
+ the landing mark included; the settings and planning-kit tools over a recorded `ConnectorApi` (order of
536
+ session and save or apply, the patch or kit body sent, the phrased refusal). `platform.spec.ts` pins that every tool a
537
+ pipeline, feature or group names exists and every tool is in a group; `planning-wiring.spec.ts` pins
538
+ the planning aliases and paths a context binds, and `remote.spec.ts` drives the remote facade, the
539
+ settings and the kit routes through a captured transport to pin their paths and deadlines, and pins that the remote
540
+ `ConnectorApi` has no member without a connector route and every connector alias is bound.
541
+
542
+ ## Depends On
543
+
544
+ - `@owlmeans/viable-common` — the whole wire contract · `@owlmeans/auth-token` — the carrier guard
545
+ - `@owlmeans/planning` — the protocol tree, the facade contract and its refusals ·
546
+ `@owlmeans/client-planning` — the remote facade and the long-poll commit wait
547
+ - `@owlmeans/api`, `@owlmeans/client-context`, `@owlmeans/client-entrypoint`, `@owlmeans/client-config`,
548
+ `@owlmeans/auth-common`, `@owlmeans/entrypoint`, `@owlmeans/route`, `@owlmeans/socket`,
549
+ `@owlmeans/config`, `@owlmeans/context`, `@owlmeans/error`, `@owlmeans/basic-ids`
550
+ - `@modelcontextprotocol/sdk` (types only, structurally), `zod`, `fs-extra`, `globby`, `ajv`
551
+
552
+ ## Related
553
+
554
+ - [[viable-mcp]] — the npx stdio server built on this
555
+ - [[auth-token]] — the credential and its carrier guard
556
+ - [[client-planning]] · [[planning]] — the facade the story tools write through
557
+ - `@owlmeans/llm-delegate` (`internal` monorepo, skill `llm-delegate`) — the other end of a model
558
+ task, inside the platform