@vibesdotdev/code-sessions 0.0.0-stage → 1.0.0-rc.0

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 (217) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +165 -2
  3. package/dist/agent/coordinator.agent.descriptor.d.ts +69 -0
  4. package/dist/agent/coordinator.agent.descriptor.d.ts.map +1 -0
  5. package/dist/agent/coordinator.agent.descriptor.js +60 -0
  6. package/dist/agent/coordinator.agent.descriptor.js.map +1 -0
  7. package/dist/agent/coordinator.prompt.descriptor.d.ts +135 -0
  8. package/dist/agent/coordinator.prompt.descriptor.d.ts.map +1 -0
  9. package/dist/agent/coordinator.prompt.descriptor.js +29 -0
  10. package/dist/agent/coordinator.prompt.descriptor.js.map +1 -0
  11. package/dist/agent/coordinator.system-prompt.d.ts +3 -0
  12. package/dist/agent/coordinator.system-prompt.d.ts.map +1 -0
  13. package/dist/agent/coordinator.system-prompt.js +18 -0
  14. package/dist/agent/coordinator.system-prompt.js.map +1 -0
  15. package/dist/agent/developer.agent.descriptor.d.ts +74 -0
  16. package/dist/agent/developer.agent.descriptor.d.ts.map +1 -0
  17. package/dist/agent/developer.agent.descriptor.js +138 -0
  18. package/dist/agent/developer.agent.descriptor.js.map +1 -0
  19. package/dist/agent/developer.prompt.descriptor.d.ts +137 -0
  20. package/dist/agent/developer.prompt.descriptor.d.ts.map +1 -0
  21. package/dist/agent/developer.prompt.descriptor.js +29 -0
  22. package/dist/agent/developer.prompt.descriptor.js.map +1 -0
  23. package/dist/agent/reviewer.agent.descriptor.d.ts +69 -0
  24. package/dist/agent/reviewer.agent.descriptor.d.ts.map +1 -0
  25. package/dist/agent/reviewer.agent.descriptor.js +60 -0
  26. package/dist/agent/reviewer.agent.descriptor.js.map +1 -0
  27. package/dist/agent/reviewer.prompt.descriptor.d.ts +135 -0
  28. package/dist/agent/reviewer.prompt.descriptor.d.ts.map +1 -0
  29. package/dist/agent/reviewer.prompt.descriptor.js +29 -0
  30. package/dist/agent/reviewer.prompt.descriptor.js.map +1 -0
  31. package/dist/agent/reviewer.system-prompt.d.ts +3 -0
  32. package/dist/agent/reviewer.system-prompt.d.ts.map +1 -0
  33. package/dist/agent/reviewer.system-prompt.js +17 -0
  34. package/dist/agent/reviewer.system-prompt.js.map +1 -0
  35. package/dist/agent/system-prompt.d.ts +12 -0
  36. package/dist/agent/system-prompt.d.ts.map +1 -0
  37. package/dist/agent/system-prompt.js +28 -0
  38. package/dist/agent/system-prompt.js.map +1 -0
  39. package/dist/api/code-sessions.api-client.descriptor.d.ts +25 -0
  40. package/dist/api/code-sessions.api-client.descriptor.d.ts.map +1 -0
  41. package/dist/api/code-sessions.api-client.descriptor.js +26 -0
  42. package/dist/api/code-sessions.api-client.descriptor.js.map +1 -0
  43. package/dist/api/code-sessions.api-client.impl.d.ts +156 -0
  44. package/dist/api/code-sessions.api-client.impl.d.ts.map +1 -0
  45. package/dist/api/code-sessions.api-client.impl.js +852 -0
  46. package/dist/api/code-sessions.api-client.impl.js.map +1 -0
  47. package/dist/api/code-sessions.api-client.schemas.d.ts +2 -0
  48. package/dist/api/code-sessions.api-client.schemas.d.ts.map +1 -0
  49. package/dist/api/code-sessions.api-client.schemas.js +2 -0
  50. package/dist/api/code-sessions.api-client.schemas.js.map +1 -0
  51. package/dist/api/code-sessions.api-client.types.d.ts +252 -0
  52. package/dist/api/code-sessions.api-client.types.d.ts.map +1 -0
  53. package/dist/api/code-sessions.api-client.types.js +77 -0
  54. package/dist/api/code-sessions.api-client.types.js.map +1 -0
  55. package/dist/api/index.d.ts +13 -0
  56. package/dist/api/index.d.ts.map +1 -0
  57. package/dist/api/index.js +20 -0
  58. package/dist/api/index.js.map +1 -0
  59. package/dist/capability.d.ts +9 -0
  60. package/dist/capability.d.ts.map +1 -0
  61. package/dist/capability.js +9 -0
  62. package/dist/capability.js.map +1 -0
  63. package/dist/catalog/index.d.ts +2 -0
  64. package/dist/catalog/index.d.ts.map +1 -0
  65. package/dist/catalog/index.js +2 -0
  66. package/dist/catalog/index.js.map +1 -0
  67. package/dist/catalog/session-catalog.d.ts +131 -0
  68. package/dist/catalog/session-catalog.d.ts.map +1 -0
  69. package/dist/catalog/session-catalog.impl.consumer.worker.d.ts +113 -0
  70. package/dist/catalog/session-catalog.impl.consumer.worker.d.ts.map +1 -0
  71. package/dist/catalog/session-catalog.impl.consumer.worker.js +32 -0
  72. package/dist/catalog/session-catalog.impl.consumer.worker.js.map +1 -0
  73. package/dist/catalog/session-catalog.js +126 -0
  74. package/dist/catalog/session-catalog.js.map +1 -0
  75. package/dist/clock/clock.client.d.ts +18 -0
  76. package/dist/clock/clock.client.d.ts.map +1 -0
  77. package/dist/clock/clock.client.js +43 -0
  78. package/dist/clock/clock.client.js.map +1 -0
  79. package/dist/code-sessions.consumer.plugin.d.ts +4 -0
  80. package/dist/code-sessions.consumer.plugin.d.ts.map +1 -0
  81. package/dist/code-sessions.consumer.plugin.js +16 -0
  82. package/dist/code-sessions.consumer.plugin.js.map +1 -0
  83. package/dist/code-sessions.plugin.d.ts +15 -0
  84. package/dist/code-sessions.plugin.d.ts.map +1 -0
  85. package/dist/code-sessions.plugin.js +65 -0
  86. package/dist/code-sessions.plugin.js.map +1 -0
  87. package/dist/config/index.d.ts +9 -0
  88. package/dist/config/index.d.ts.map +1 -0
  89. package/dist/config/index.js +9 -0
  90. package/dist/config/index.js.map +1 -0
  91. package/dist/config/preparation.d.ts +2 -0
  92. package/dist/config/preparation.d.ts.map +1 -0
  93. package/dist/config/preparation.js +2 -0
  94. package/dist/config/preparation.js.map +1 -0
  95. package/dist/docs/code-sessions.docs.descriptor.d.ts +4 -0
  96. package/dist/docs/code-sessions.docs.descriptor.d.ts.map +1 -0
  97. package/dist/docs/code-sessions.docs.descriptor.js +241 -0
  98. package/dist/docs/code-sessions.docs.descriptor.js.map +1 -0
  99. package/dist/index.d.ts +26 -0
  100. package/dist/index.d.ts.map +1 -0
  101. package/dist/index.js +28 -0
  102. package/dist/index.js.map +1 -0
  103. package/dist/pull-request-plan.d.ts +68 -0
  104. package/dist/pull-request-plan.d.ts.map +1 -0
  105. package/dist/pull-request-plan.js +94 -0
  106. package/dist/pull-request-plan.js.map +1 -0
  107. package/dist/schemas/preparation.d.ts +51 -0
  108. package/dist/schemas/preparation.d.ts.map +1 -0
  109. package/dist/schemas/preparation.js +20 -0
  110. package/dist/schemas/preparation.js.map +1 -0
  111. package/dist/schemas/requests.d.ts +411 -0
  112. package/dist/schemas/requests.d.ts.map +1 -0
  113. package/dist/schemas/requests.js +87 -0
  114. package/dist/schemas/requests.js.map +1 -0
  115. package/dist/schemas/responses.d.ts +275 -0
  116. package/dist/schemas/responses.d.ts.map +1 -0
  117. package/dist/schemas/responses.js +90 -0
  118. package/dist/schemas/responses.js.map +1 -0
  119. package/dist/svelte/actions.d.ts +70 -0
  120. package/dist/svelte/actions.d.ts.map +1 -0
  121. package/dist/svelte/actions.js +280 -0
  122. package/dist/svelte/clock.svelte.d.ts +6 -0
  123. package/dist/svelte/clock.svelte.d.ts.map +1 -0
  124. package/dist/svelte/clock.svelte.js +33 -0
  125. package/dist/svelte/components/CreateSessionDialog.svelte +470 -0
  126. package/dist/svelte/components/CreateSessionDialog.svelte.d.ts +57 -0
  127. package/dist/svelte/components/CreateSessionDialog.svelte.d.ts.map +1 -0
  128. package/dist/svelte/components/SessionCard.svelte +216 -0
  129. package/dist/svelte/components/SessionCard.svelte.d.ts +27 -0
  130. package/dist/svelte/components/SessionCard.svelte.d.ts.map +1 -0
  131. package/dist/svelte/components/SessionList.svelte +86 -0
  132. package/dist/svelte/components/SessionList.svelte.d.ts +23 -0
  133. package/dist/svelte/components/SessionList.svelte.d.ts.map +1 -0
  134. package/dist/svelte/components/SessionSeed.svelte +60 -0
  135. package/dist/svelte/components/SessionSeed.svelte.d.ts +9 -0
  136. package/dist/svelte/components/SessionSeed.svelte.d.ts.map +1 -0
  137. package/dist/svelte/components/TranscriptView.svelte +360 -0
  138. package/dist/svelte/components/TranscriptView.svelte.d.ts +26 -0
  139. package/dist/svelte/components/TranscriptView.svelte.d.ts.map +1 -0
  140. package/dist/svelte/create-session-form.d.ts +84 -0
  141. package/dist/svelte/create-session-form.d.ts.map +1 -0
  142. package/dist/svelte/create-session-form.js +107 -0
  143. package/dist/svelte/index.d.ts +20 -0
  144. package/dist/svelte/index.d.ts.map +1 -0
  145. package/dist/svelte/index.js +18 -0
  146. package/dist/svelte/live-session.d.ts +156 -0
  147. package/dist/svelte/live-session.d.ts.map +1 -0
  148. package/dist/svelte/live-session.js +152 -0
  149. package/dist/svelte/loaders.d.ts +74 -0
  150. package/dist/svelte/loaders.d.ts.map +1 -0
  151. package/dist/svelte/loaders.js +124 -0
  152. package/dist/svelte/outcome.d.ts +46 -0
  153. package/dist/svelte/outcome.d.ts.map +1 -0
  154. package/dist/svelte/outcome.js +49 -0
  155. package/dist/svelte/relative-time.d.ts +32 -0
  156. package/dist/svelte/relative-time.d.ts.map +1 -0
  157. package/dist/svelte/relative-time.js +51 -0
  158. package/dist/svelte/session-list-item.d.ts +23 -0
  159. package/dist/svelte/session-list-item.d.ts.map +1 -0
  160. package/dist/svelte/session-list-item.js +1 -0
  161. package/dist/svelte/styles.css +8 -0
  162. package/dist/svelte/transcript-input.d.ts +45 -0
  163. package/dist/svelte/transcript-input.d.ts.map +1 -0
  164. package/dist/svelte/transcript-input.js +188 -0
  165. package/dist/tui/code-sessions-tui.plugin.d.ts +10 -0
  166. package/dist/tui/code-sessions-tui.plugin.d.ts.map +1 -0
  167. package/dist/tui/code-sessions-tui.plugin.js +29 -0
  168. package/dist/tui/code-sessions-tui.plugin.js.map +1 -0
  169. package/dist/tui/code-sessions.tui-app.descriptor.d.ts +7 -0
  170. package/dist/tui/code-sessions.tui-app.descriptor.d.ts.map +1 -0
  171. package/dist/tui/code-sessions.tui-app.descriptor.js +30 -0
  172. package/dist/tui/code-sessions.tui-app.descriptor.js.map +1 -0
  173. package/dist/tui/code-sessions.tui-app.impl.consumer.d.ts +14 -0
  174. package/dist/tui/code-sessions.tui-app.impl.consumer.d.ts.map +1 -0
  175. package/dist/tui/code-sessions.tui-app.impl.consumer.js +453 -0
  176. package/dist/tui/code-sessions.tui-app.impl.consumer.js.map +1 -0
  177. package/dist/tui/code-sessions.tui-client.d.ts +22 -0
  178. package/dist/tui/code-sessions.tui-client.d.ts.map +1 -0
  179. package/dist/tui/code-sessions.tui-client.js +95 -0
  180. package/dist/tui/code-sessions.tui-client.js.map +1 -0
  181. package/dist/tui/code-sessions.tui-open.descriptor.d.ts +7 -0
  182. package/dist/tui/code-sessions.tui-open.descriptor.d.ts.map +1 -0
  183. package/dist/tui/code-sessions.tui-open.descriptor.js +16 -0
  184. package/dist/tui/code-sessions.tui-open.descriptor.js.map +1 -0
  185. package/dist/tui/code-sessions.tui-open.impl.consumer.d.ts +7 -0
  186. package/dist/tui/code-sessions.tui-open.impl.consumer.d.ts.map +1 -0
  187. package/dist/tui/code-sessions.tui-open.impl.consumer.js +11 -0
  188. package/dist/tui/code-sessions.tui-open.impl.consumer.js.map +1 -0
  189. package/dist/tui/code-sessions.tui-state.descriptor.d.ts +16 -0
  190. package/dist/tui/code-sessions.tui-state.descriptor.d.ts.map +1 -0
  191. package/dist/tui/code-sessions.tui-state.descriptor.js +50 -0
  192. package/dist/tui/code-sessions.tui-state.descriptor.js.map +1 -0
  193. package/dist/tui/code-sessions.tui-state.impl.consumer.d.ts +30 -0
  194. package/dist/tui/code-sessions.tui-state.impl.consumer.d.ts.map +1 -0
  195. package/dist/tui/code-sessions.tui-state.impl.consumer.js +533 -0
  196. package/dist/tui/code-sessions.tui-state.impl.consumer.js.map +1 -0
  197. package/dist/tui/code-sessions.tui-state.key.d.ts +322 -0
  198. package/dist/tui/code-sessions.tui-state.key.d.ts.map +1 -0
  199. package/dist/tui/code-sessions.tui-state.key.js +104 -0
  200. package/dist/tui/code-sessions.tui-state.key.js.map +1 -0
  201. package/dist/tui/index.d.ts +9 -0
  202. package/dist/tui/index.d.ts.map +1 -0
  203. package/dist/tui/index.js +8 -0
  204. package/dist/tui/index.js.map +1 -0
  205. package/dist/workspace/index.d.ts +2 -0
  206. package/dist/workspace/index.d.ts.map +1 -0
  207. package/dist/workspace/index.js +2 -0
  208. package/dist/workspace/index.js.map +1 -0
  209. package/dist/workspace/workspace-binding.d.ts +74 -0
  210. package/dist/workspace/workspace-binding.d.ts.map +1 -0
  211. package/dist/workspace/workspace-binding.impl.consumer.worker.d.ts +17 -0
  212. package/dist/workspace/workspace-binding.impl.consumer.worker.d.ts.map +1 -0
  213. package/dist/workspace/workspace-binding.impl.consumer.worker.js +134 -0
  214. package/dist/workspace/workspace-binding.impl.consumer.worker.js.map +1 -0
  215. package/dist/workspace/workspace-binding.js +72 -0
  216. package/dist/workspace/workspace-binding.js.map +1 -0
  217. package/package.json +238 -4
package/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 VIBES DEV LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,166 @@
1
- # Temporary Holding Version
1
+ # @vibesdotdev/code-sessions
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Runtime-owned client package for code-session management. Public, MIT.
4
+
5
+ `code-sessions` owns the `runtime/client` descriptor with id `code-sessions`.
6
+ Consumers resolve it with `getVibesClient<CodeSessionsClient>('code-sessions', runtime)`
7
+ and call `list`, `get`, `getOwned`, `create`, `prepare`, `link`, `run`, `push`,
8
+ `createPullRequest`, `delete`, and `getStartOptions`. Persisted session data is
9
+ owned by `apps/platform-web` at `/api/code-sessions`; this package is the
10
+ canonical cross-surface client, not the data store. The hosted transcript run
11
+ bridge and the consumer-to-cloud transcript proxy live in the premium overlay
12
+ `@vibesdotdev/code-sessions-premium`.
13
+ `get` is display-safe only; authorization decisions must use `getOwned`.
14
+
15
+ ## Surfaces
16
+
17
+ - `code-sessions`: runtime client, API types and response schemas, typed
18
+ failures (`CapabilityError` code and reason), and the docs descriptor.
19
+ - `@vibesdotdev/code-sessions/svelte`: in-package component surface for session lists, create
20
+ dialog, cards, transcript command output, SvelteKit list/detail loader
21
+ helpers, and browser route-action helpers consumed by HQ surfaces.
22
+ - `@vibesdotdev/code-sessions/tui`: in-package Studio TUI inspect route for platform
23
+ code-session records, capability, host, workspace, checkout, preview, auth,
24
+ and service recovery state.
25
+ - `agent-execution/src/code-session`: `agent/code-session` execution kind and
26
+ consumer host implementation.
27
+ - `@vibesdotdev/integrations-cloudflare` `./agent-execution/code-session`:
28
+ cloud sandbox execution adapter.
29
+ - `apps/platform-web`: owner-scoped session persistence and `/api/code-sessions`
30
+ HTTP routes.
31
+ - `apps/chat-web`: Build-mode projection that binds a platform code session to
32
+ `chat_rooms.metadata.buildSession`. Its browser helper calls the app-local
33
+ `/api/build/sessions` projection route; its server routes use
34
+ `CodeSessionsClient` to talk to platform-web.
35
+
36
+ ## Request-Scoped Use
37
+
38
+ Server routes must not mutate the shared runtime client. Resolve the runtime client,
39
+ then fork it for the incoming request:
40
+
41
+ ```ts
42
+ import { getVibesClient } from '@vibesdotdev/kernel/client';
43
+ import { serviceOrigin } from '@vibesdotdev/infra-core/service';
44
+ import type { CodeSessionsClient } from '@vibesdotdev/code-sessions/api';
45
+
46
+ const base = await getVibesClient<CodeSessionsClient>('code-sessions', event.locals.runtime);
47
+ const client = base.forRequest({
48
+ origin: await serviceOrigin(event.locals.runtime, 'platform'),
49
+ token: event.locals.sessionToken,
50
+ fetch: event.fetch
51
+ });
52
+ ```
53
+
54
+ HTTP options accept callable web fetch, including native fetch, request-scoped SvelteKit fetch and Chat transports. The schema-derived SSR adapter uses the same contract; Bun-specific static methods are not required.
55
+
56
+ `createSsrCodeSessionsClient(...)` is a convenience wrapper over the same
57
+ public override path for server-only helpers.
58
+
59
+ ## Verification
60
+
61
+ ```bash
62
+ bun run --cwd code-sessions test
63
+ bun run --cwd code-sessions check
64
+ bun run --cwd code-sessions build
65
+ ```
66
+
67
+ For chat-web projection changes, also run the focused Build route tests and
68
+ `apps/chat-web` check.
69
+
70
+ The real cloud lifecycle probe is intentionally manual because local success
71
+ requires seeded paid entitlement plus either a reachable Sandbox Bridge
72
+ (`SANDBOX_API_URL`) or a real Cloudflare `SANDBOX` binding. Direct Vite can only
73
+ collect blocker evidence; for the real workerd path, start the dedicated PM
74
+ preset first:
75
+
76
+ ```bash
77
+ bun run vibes pm preset start code-session-lifecycle-workerd
78
+ CHAT_E2E_APP_ORIGIN=https://chat.vibes.local \
79
+ CHAT_E2E_AUTH_ORIGIN=https://auth.vibes.local \
80
+ CHAT_E2E_ACCOUNT_ORIGIN=https://account.vibes.local \
81
+ CHAT_E2E_PLATFORM_ORIGIN=https://platform.vibes.local \
82
+ bun run --cwd apps/chat-web probe:code-session:lifecycle --require-workerd-preset --prime-billing
83
+ ```
84
+
85
+ Use `--allow-blocked` when collecting diagnostic evidence on a local stack that
86
+ is expected to be missing the `SANDBOX` binding. Use `--prime-billing` on local
87
+ seeded personas when the account billing fixture has not yet created an active
88
+ plan subscription for that persona. The dev billing fixture must sync account
89
+ plan features and clear the subscription cache; otherwise the probe can fail at
90
+ Build-mode entitlement before it reaches platform session creation.
91
+ Use `--require-workerd-preset` for acceptance evidence so the probe first proves
92
+ the `d1-migrate-dev` task has passed, the dedicated workerd app processes are
93
+ running and healthy, local resources are ready, and no conflicting dev stack
94
+ process is active; omit it only for direct-Vite blocker diagnostics.
95
+
96
+ The package-level Cloudflare adapter path is covered by the integrations repo
97
+ tests at `integrations/cloudflare/src/agent-execution/code-session/cloudflare/__tests__/`
98
+ (`plugin.test.ts`, `sandbox-git-runner.test.ts`). Those prove adapter behavior
99
+ against a fake bridge, not a live chat/platform lifecycle.
100
+
101
+ Command execution is owned by platform-web's
102
+ `POST /api/code-sessions/[id]/run` route and surfaced through
103
+ `CodeSessionsClient.run(...)`. Chat-web Build mode binds rooms to sessions; it
104
+ does not own a separate execution endpoint.
105
+
106
+ Current acceptance gaps are tracked in [SPEC.md](./SPEC.md). Studio now has a
107
+ `/code-sessions` route with runtime-backed create (environment/workspace
108
+ selectors from `getStartOptions()`), list/detail inspect, route-owned
109
+ transcript command-run, and confirmed selected-session delete actions. The
110
+ workerd-stack probe covers chat-web/platform-web create/list/get/run/delete
111
+ plus metadata cleanup from the live session record, and the human Chat Build
112
+ proof covers visible create/bind, Studio inspect, and Chat unbind. The
113
+ remaining route gaps are interactive terminal attach controls plus a Chat
114
+ Build user-visible teardown/delete path; API teardown remains cleanup until
115
+ Chat exposes that control.
116
+
117
+ ## Consumer composition and clock lifecycle
118
+
119
+ Universal/browser/cloud hosts compose the root `codeSessionsPlugin`. Trusted consumer
120
+ workers compose `codeSessionsConsumerPlugin` from
121
+ `@vibesdotdev/code-sessions/consumer/plugin`; it includes the universal plugin and
122
+ adds the original workspace-binding and catalog implementations. Their kinds,
123
+ descriptors and renderer exposures remain canonical. TUI hosts additionally compose
124
+ `@vibesdotdev/code-sessions/tui/plugin`.
125
+
126
+ The TUI plugin registers `runtime/client:code-sessions.tui`. Asynchronous state
127
+ `init` resolves the client through `getVibesClient` and awaits `ensureLoaded`;
128
+ synchronous `reduce` and
129
+ `dispose` use `tryGetVibesClient` after activation. The runtime client owns each
130
+ mount's actions and in-flight create deduplication independently. Disposing a
131
+ mount removes its actions and suppresses pending state updates; runtime disposal
132
+ releases all mounts. The implementation remains on the consumer TUI subpath;
133
+ the state descriptor imports only kinds and schemas. Composed-runtime tests
134
+ exercise the real state and clients with external execution and HTTP fixtures.
135
+
136
+ The registered `runtime/client:code-sessions.clock` owns shared subscriptions and
137
+ one lifecycle interval per runtime. The Svelte `sharedNow()` adapter activates it
138
+ asynchronously before synchronous client access and publishes ticks into reactive
139
+ cells. The final unsubscribe stops the interval; runtime disposal stops it and
140
+ clears subscriptions. SSR starts no effect or timer; SSR and finite runtimes refresh on
141
+ subscription without starting an interval.
142
+
143
+ Request schemas live in `src/schemas/`; existing type and preparation imports
144
+ remain available. Malformed preparation refuses with `INVALID_INPUT /
145
+ preparation-input-invalid`; other malformed mutations and identifiers refuse with
146
+ `INVALID_INPUT / code-session-request-invalid`, before dispatch or mutation.
147
+ Service assertions refuse with `service-identity-invalid`, retaining
148
+ `service-owner-required` and `service-organization-empty` for blank identities.
149
+ Diagnostics contain no caller values. Existing `workspace-path-requires-local`,
150
+ `local-host-target-required` and `repository-required` refusals remain.
151
+ Service clients refuse `create`, `link`, `run`, `push`, `createPullRequest`,
152
+ `delete`, and standard reads (`list`, `get`, `getOwned`, `getStartOptions`)
153
+ with `INVALID_INPUT / service-client-preparation-only` before local resolution,
154
+ execution, record mutation, or non-prepare HTTP dispatch. Request forks retain
155
+ this restriction. Failures contain no caller values; owner-verified `prepare`
156
+ continues to use fresh service credentials and its existing typed refusals.
157
+
158
+ Preparation requires a valid `{ result: preparedSession }` response.
159
+
160
+ `getOwned` consults only the platform: absence (404) and signed-out callers (401)
161
+ return null; typed transport and invalid-response failures propagate. It never
162
+ authorizes from process-local records.
163
+
164
+ Verification: `bun run check` checks every source and test TS/TSX file and Svelte
165
+ components; `bun run test` uses in-process fixtures; `bun run build` emits production
166
+ core and Svelte artifacts separately. Rules and lint also apply.
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Coordinator — the platform's system-owned decision agent for multi-step work.
3
+ *
4
+ * Given what was tried, what failed and why, it decides the next move for each
5
+ * item and answers in the exact shape the caller asks for.
6
+ *
7
+ * A sibling of `developer` (the writing agent): it reads, it never writes. A
8
+ * run's profile names the model (`agents.execution`); the descriptor inherits
9
+ * the user's default, as `developer` does, so it runs on consumer and cloud.
10
+ */
11
+ export declare const coordinatorAgentDescriptor: {
12
+ id: string;
13
+ kind: "tools/agent/instance";
14
+ name: string;
15
+ description: string;
16
+ agentType: "custom" | "extraction" | "chat" | "task" | "assistant" | "react";
17
+ sourceType: "user" | "system";
18
+ version: string;
19
+ loopId: string;
20
+ configuration: {
21
+ [x: string]: unknown;
22
+ maxIterations?: number | undefined;
23
+ temperature?: number | undefined;
24
+ maxTokens?: number | undefined;
25
+ streaming?: boolean | undefined;
26
+ enableThinking?: boolean | undefined;
27
+ enableToolCalls?: boolean | undefined;
28
+ persistToolResults?: boolean | undefined;
29
+ memoryType?: "none" | "summary" | "buffer" | undefined;
30
+ memorySize?: number | undefined;
31
+ memoryProfileId?: string | undefined;
32
+ toolSelectionStrategy?: "user" | "auto" | "specified" | undefined;
33
+ effort?: "none" | "low" | "medium" | "high" | "max" | "xhigh" | undefined;
34
+ checkpointEnabled?: boolean | undefined;
35
+ enableSubagentCalls?: boolean | undefined;
36
+ };
37
+ isPublic: boolean;
38
+ enabled: boolean;
39
+ capabilityCeiling: "0" | "1" | "3" | "2a" | "2b";
40
+ systemAgentId?: string | null | undefined;
41
+ createdById?: string | null | undefined;
42
+ modelId?: string | null | undefined;
43
+ fallbacks?: {
44
+ providerId?: string | undefined;
45
+ modelId?: string | undefined;
46
+ }[] | undefined;
47
+ voice?: {
48
+ providerId: string;
49
+ voiceId: string;
50
+ } | undefined;
51
+ metadata?: Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue> | undefined;
52
+ presentation?: {
53
+ audiences: ("consumer" | "operator")[];
54
+ } | undefined;
55
+ promptId?: string | undefined;
56
+ promptTemplate?: string | null | undefined;
57
+ tools?: {
58
+ source: "custom" | "system";
59
+ toolId: string;
60
+ enabled: boolean;
61
+ order?: number | undefined;
62
+ hardware?: ("consumer" | "cloud")[] | undefined;
63
+ }[] | undefined;
64
+ hardware?: ("consumer" | "cloud")[] | undefined;
65
+ isDefault?: boolean | undefined;
66
+ tags?: string[] | undefined;
67
+ };
68
+ export default coordinatorAgentDescriptor;
69
+ //# sourceMappingURL=coordinator.agent.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator.agent.descriptor.d.ts","sourceRoot":"","sources":["../../src/agent/coordinator.agent.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CrC,CAAC;AAEH,eAAe,0BAA0B,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Coordinator — the platform's system-owned decision agent for multi-step work.
3
+ *
4
+ * Given what was tried, what failed and why, it decides the next move for each
5
+ * item and answers in the exact shape the caller asks for.
6
+ *
7
+ * A sibling of `developer` (the writing agent): it reads, it never writes. A
8
+ * run's profile names the model (`agents.execution`); the descriptor inherits
9
+ * the user's default, as `developer` does, so it runs on consumer and cloud.
10
+ */
11
+ import { AIAgentInstanceDescriptorSchema } from '@vibesdotdev/ai-schemas/agents/schemas/descriptor';
12
+ import { AI_AGENT_PRIMARY_LOOP_ID } from '@vibesdotdev/ai-schemas/agents/constants';
13
+ import { coordinatorAgentSystemPrompt } from "./coordinator.system-prompt.js";
14
+ export const coordinatorAgentDescriptor = AIAgentInstanceDescriptorSchema.parse({
15
+ id: 'coordinator',
16
+ name: 'Coordinator',
17
+ description: 'Decides what happens to work that failed: rework with specific learnings, widen what a fix may touch, or escalate. Reads; never edits.',
18
+ agentType: 'chat',
19
+ loopId: AI_AGENT_PRIMARY_LOOP_ID,
20
+ sourceType: 'system',
21
+ version: '1.0.0',
22
+ configuration: {
23
+ temperature: 0.1,
24
+ streaming: true,
25
+ enableToolCalls: true,
26
+ enableThinking: false,
27
+ memoryType: 'buffer',
28
+ memorySize: 100,
29
+ toolSelectionStrategy: 'auto',
30
+ effort: 'high',
31
+ checkpointEnabled: true
32
+ },
33
+ promptTemplate: coordinatorAgentSystemPrompt,
34
+ // Read-only: inspection, search, the workspace's own checks and rules; no write, run or forge mutation.
35
+ tools: [
36
+ { source: 'system', toolId: 'file-read', enabled: true, order: 1 },
37
+ { source: 'system', toolId: 'git', enabled: true, order: 2 },
38
+ { source: 'system', toolId: 'workspace-search', enabled: true, order: 3, hardware: ['consumer'] },
39
+ { source: 'system', toolId: 'workspace-atlas', enabled: true, order: 4, hardware: ['consumer'] },
40
+ { source: 'system', toolId: 'workspace-fs', enabled: true, order: 5, hardware: ['consumer'] },
41
+ { source: 'system', toolId: 'workspace-lsp', enabled: true, order: 6, hardware: ['consumer'] },
42
+ { source: 'system', toolId: 'workspace-rules', enabled: true, order: 7, hardware: ['consumer'] },
43
+ { source: 'system', toolId: 'forge-read-file', enabled: true, order: 9 },
44
+ { source: 'system', toolId: 'forge-pr-get', enabled: true, order: 10 },
45
+ { source: 'system', toolId: 'forge-pr-files', enabled: true, order: 11 },
46
+ { source: 'system', toolId: 'docs', enabled: true, order: 12 },
47
+ { source: 'system', toolId: 'search', enabled: true, order: 13 },
48
+ { source: 'system', toolId: 'knowledge-search', enabled: true, order: 14 },
49
+ { source: 'system', toolId: 'reasoning', enabled: true, order: 15 },
50
+ { source: 'system', toolId: 'tool-help', enabled: true, order: 16 },
51
+ { source: 'system', toolId: 'tool-search', enabled: true, order: 17 }
52
+ ],
53
+ capabilityCeiling: '2b',
54
+ hardware: ['consumer', 'cloud'],
55
+ isPublic: true,
56
+ enabled: true,
57
+ tags: ['coordinator', 'coordinate', 'planning', 'default']
58
+ });
59
+ export default coordinatorAgentDescriptor;
60
+ //# sourceMappingURL=coordinator.agent.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator.agent.descriptor.js","sourceRoot":"","sources":["../../src/agent/coordinator.agent.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACpG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,MAAM,CAAC,MAAM,0BAA0B,GAAG,+BAA+B,CAAC,KAAK,CAAC;IAC/E,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,wIAAwI;IACrJ,SAAS,EAAE,MAAM;IACjB,MAAM,EAAE,wBAAwB;IAChC,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,OAAO;IAChB,aAAa,EAAE;QACd,WAAW,EAAE,GAAG;QAChB,SAAS,EAAE,IAAI;QACf,eAAe,EAAE,IAAI;QACrB,cAAc,EAAE,KAAK;QACrB,UAAU,EAAE,QAAQ;QACpB,UAAU,EAAE,GAAG;QACf,qBAAqB,EAAE,MAAM;QAC7B,MAAM,EAAE,MAAM;QACd,iBAAiB,EAAE,IAAI;KACvB;IACD,cAAc,EAAE,4BAA4B;IAC5C,wGAAwG;IACxG,KAAK,EAAE;QACN,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;QAClE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;QAC5D,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE;QACjG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE;QAChG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE;QAC7F,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE;QAC9F,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE;QAChG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE;QACxE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QACtE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QACxE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QAC9D,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QAChE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QAC1E,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QACnE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;QACnE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;KACrE;IACD,iBAAiB,EAAE,IAAI;IACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,CAAC;CAC1D,CAAC,CAAC;AAEH,eAAe,0BAA0B,CAAC"}
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Coordinator agent system prompt, projected onto `prompts/manifest`: the role's
3
+ * identity and its instructions (how it decides, what it may never instruct).
4
+ * The native tool loop resolves it by the agent's id.
5
+ */
6
+ export declare const coordinatorPromptManifest: {
7
+ id: string;
8
+ version: string;
9
+ name: string;
10
+ description: string;
11
+ type: "system";
12
+ category: "development";
13
+ tags: string[];
14
+ scope: "builtin";
15
+ isPublic: boolean;
16
+ generator: "static";
17
+ content: string;
18
+ metadata: {
19
+ author: string;
20
+ source: string;
21
+ };
22
+ };
23
+ export declare const coordinatorPromptManifestDescriptor: {
24
+ id: string;
25
+ kind: "prompts/manifest";
26
+ owner: string;
27
+ manifest: {
28
+ id: string;
29
+ version: string;
30
+ name: string;
31
+ description: string;
32
+ type: "system" | "workflow" | "specialist" | "tool" | "extraction";
33
+ tags: string[];
34
+ scope: "user" | "shared" | "builtin" | "project";
35
+ isPublic: boolean;
36
+ content: string;
37
+ generator: "static" | "template" | "dynamic";
38
+ category?: "custom" | "generation" | "extraction" | "development" | "knowledge" | "chat" | "analysis" | "validation" | undefined;
39
+ ownerId?: string | undefined;
40
+ projectId?: string | undefined;
41
+ sections?: {
42
+ key: string;
43
+ title: string;
44
+ content: string;
45
+ order: number;
46
+ collapsible: boolean;
47
+ conditional?: string | undefined;
48
+ }[] | undefined;
49
+ contentPath?: string | undefined;
50
+ tools?: string[] | undefined;
51
+ contextRequired?: string[] | undefined;
52
+ modelConfig?: {
53
+ model?: string | undefined;
54
+ temperature?: number | undefined;
55
+ maxTokens?: number | undefined;
56
+ topP?: number | undefined;
57
+ stopSequences?: string[] | undefined;
58
+ } | undefined;
59
+ knowledgeBaseIds?: string[] | undefined;
60
+ dependencies?: string[] | undefined;
61
+ composedWith?: string[] | undefined;
62
+ inject?: "tools"[] | undefined;
63
+ arguments?: {
64
+ name: string;
65
+ description: string;
66
+ type: "string" | "number" | "boolean" | "file" | "select" | "multiselect" | "text" | "json";
67
+ required: boolean;
68
+ default?: unknown;
69
+ options?: {
70
+ label: string;
71
+ value: string;
72
+ description?: string | undefined;
73
+ }[] | undefined;
74
+ validation?: string | undefined;
75
+ placeholder?: string | undefined;
76
+ }[] | undefined;
77
+ templateEngine?: "handlebars" | "mustache" | "native" | undefined;
78
+ transform?: {
79
+ inputSchema?: Record<string, unknown> | undefined;
80
+ transformPath?: string | undefined;
81
+ transformSpread?: {
82
+ spreadFrom?: ("data" | "user" | "project" | "session")[] | undefined;
83
+ assigns?: Record<string, {
84
+ literal: import("@vibesdotdev/kernel/bootstrap").JsonValue;
85
+ } | {
86
+ path: string;
87
+ }> | undefined;
88
+ } | undefined;
89
+ } | undefined;
90
+ versions?: {
91
+ version: string;
92
+ createdAt: string;
93
+ changelog?: string | undefined;
94
+ parentVersion?: string | undefined;
95
+ author?: string | undefined;
96
+ }[] | undefined;
97
+ currentVersion?: {
98
+ version: string;
99
+ createdAt: string;
100
+ changelog?: string | undefined;
101
+ parentVersion?: string | undefined;
102
+ author?: string | undefined;
103
+ } | undefined;
104
+ metadata?: {
105
+ author?: string | undefined;
106
+ license?: string | undefined;
107
+ source?: string | undefined;
108
+ related?: string[] | undefined;
109
+ custom?: Record<string, unknown> | undefined;
110
+ } | undefined;
111
+ createdAt?: string | undefined;
112
+ updatedAt?: string | undefined;
113
+ };
114
+ name?: string | undefined;
115
+ description?: string | undefined;
116
+ tags?: string[] | undefined;
117
+ hardware?: string[] | undefined;
118
+ enabled?: boolean | undefined;
119
+ priority?: number | undefined;
120
+ capabilityId?: string | undefined;
121
+ requiredContext?: string[] | undefined;
122
+ optionalContext?: string[] | undefined;
123
+ config?: unknown;
124
+ retention?: string | {
125
+ reason: string;
126
+ maxAgeDays?: number | undefined;
127
+ maxEntries?: number | undefined;
128
+ maxBytes?: number | undefined;
129
+ cascadeFrom?: string | undefined;
130
+ ageField?: string | undefined;
131
+ enforcedBy?: string | undefined;
132
+ } | undefined;
133
+ };
134
+ export default coordinatorPromptManifestDescriptor;
135
+ //# sourceMappingURL=coordinator.prompt.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator.prompt.descriptor.d.ts","sourceRoot":"","sources":["../../src/agent/coordinator.prompt.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAgBrC,CAAC;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE9C,CAAC;AAEH,eAAe,mCAAmC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Coordinator agent system prompt, projected onto `prompts/manifest`: the role's
3
+ * identity and its instructions (how it decides, what it may never instruct).
4
+ * The native tool loop resolves it by the agent's id.
5
+ */
6
+ import { definePromptManifestDescriptor } from '@vibesdotdev/ai-schemas';
7
+ import { coordinatorAgentSystemPrompt } from "./coordinator.system-prompt.js";
8
+ export const coordinatorPromptManifest = {
9
+ id: 'coordinator',
10
+ version: '1.1.0',
11
+ name: 'Coordinator Agent',
12
+ description: 'System prompt for the read-only coordinator: how it decides rework, scope or escalation, and what it may never instruct',
13
+ type: 'system',
14
+ category: 'development',
15
+ tags: ['coordinator', 'coordinate', 'agent', 'system'],
16
+ scope: 'builtin',
17
+ isPublic: false,
18
+ generator: 'static',
19
+ content: coordinatorAgentSystemPrompt,
20
+ metadata: {
21
+ author: 'vibes',
22
+ source: 'code-sessions/src/agent/coordinator.system-prompt.ts'
23
+ }
24
+ };
25
+ export const coordinatorPromptManifestDescriptor = definePromptManifestDescriptor(coordinatorPromptManifest, {
26
+ owner: 'code-sessions'
27
+ });
28
+ export default coordinatorPromptManifestDescriptor;
29
+ //# sourceMappingURL=coordinator.prompt.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator.prompt.descriptor.js","sourceRoot":"","sources":["../../src/agent/coordinator.prompt.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,EAAE,EAAE,aAAa;IACjB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,yHAAyH;IACtI,IAAI,EAAE,QAAiB;IACvB,QAAQ,EAAE,aAAsB;IAChC,IAAI,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC;IACtD,KAAK,EAAE,SAAkB;IACzB,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,QAAiB;IAC5B,OAAO,EAAE,4BAA4B;IACrC,QAAQ,EAAE;QACT,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,sDAAsD;KAC9D;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAG,8BAA8B,CAAC,yBAAyB,EAAE;IAC5G,KAAK,EAAE,eAAe;CACtB,CAAC,CAAC;AAEH,eAAe,mCAAmC,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** The coordinator agent's system prompt: decides the next move for failed work, read-only. */
2
+ export declare const coordinatorAgentSystemPrompt = "You are Coordinator, the decision maker for multi-step work inside a Vibes workspace.\n\nYou receive work items that failed or need a decision: what was attempted, by whom, what the checks and reviewers found, and what is allowed. You decide the next move for each one. You read; you never edit files or change state.\n\nCheck results and failures are information for you, not a stop: a participant can get things wrong, and finding it and routing it is your job.\n\nHow to decide:\n- Rework when a specific, actionable learning would let the next attempt succeed. Write the learning as an instruction the next participant can follow: what to change, where, and why the last attempt failed.\n- Propose additional paths only when evidence locates the cause there. Record their owner and required approval/custody; an allow list is scope, not permission to overwrite another participant\u2019s work.\n- Escalate when the same failure repeats without new information, when the fix needs a decision a participant cannot make, or when the cause is outside this work's scope. When the instructions or the definition of correct missed something, say what they should add.\n- For leftover changes, establish who made them and what work they belong to. Decide whether an authorized writer should clear, adopt and recheck, or rework them; name the exact paths and evidence in the rework instruction, or escalate missing authority. You remain read-only; never restore files yourself.\n- Use the evidence you were given and read the code to confirm it (workspace-search, file-read, git); do not guess.\n- Never instruct or accept removing a capability or feature unless the evidence shows it exists in a more canonical or more effective form elsewhere; otherwise rework to restore it, or escalate.\n- Never instruct anyone to weaken a check, skip a test, suppress a rule, hide a failure, or add a check fitted to one case.\n\nAnswer with only the exact shape the request asks for (for example a JSON array or object), with no prose around it.";
3
+ //# sourceMappingURL=coordinator.system-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator.system-prompt.d.ts","sourceRoot":"","sources":["../../src/agent/coordinator.system-prompt.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,eAAO,MAAM,4BAA4B,m/DAe4E,CAAC"}
@@ -0,0 +1,18 @@
1
+ /** The coordinator agent's system prompt: decides the next move for failed work, read-only. */
2
+ export const coordinatorAgentSystemPrompt = `You are Coordinator, the decision maker for multi-step work inside a Vibes workspace.
3
+
4
+ You receive work items that failed or need a decision: what was attempted, by whom, what the checks and reviewers found, and what is allowed. You decide the next move for each one. You read; you never edit files or change state.
5
+
6
+ Check results and failures are information for you, not a stop: a participant can get things wrong, and finding it and routing it is your job.
7
+
8
+ How to decide:
9
+ - Rework when a specific, actionable learning would let the next attempt succeed. Write the learning as an instruction the next participant can follow: what to change, where, and why the last attempt failed.
10
+ - Propose additional paths only when evidence locates the cause there. Record their owner and required approval/custody; an allow list is scope, not permission to overwrite another participant’s work.
11
+ - Escalate when the same failure repeats without new information, when the fix needs a decision a participant cannot make, or when the cause is outside this work's scope. When the instructions or the definition of correct missed something, say what they should add.
12
+ - For leftover changes, establish who made them and what work they belong to. Decide whether an authorized writer should clear, adopt and recheck, or rework them; name the exact paths and evidence in the rework instruction, or escalate missing authority. You remain read-only; never restore files yourself.
13
+ - Use the evidence you were given and read the code to confirm it (workspace-search, file-read, git); do not guess.
14
+ - Never instruct or accept removing a capability or feature unless the evidence shows it exists in a more canonical or more effective form elsewhere; otherwise rework to restore it, or escalate.
15
+ - Never instruct anyone to weaken a check, skip a test, suppress a rule, hide a failure, or add a check fitted to one case.
16
+
17
+ Answer with only the exact shape the request asks for (for example a JSON array or object), with no prose around it.`;
18
+ //# sourceMappingURL=coordinator.system-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator.system-prompt.js","sourceRoot":"","sources":["../../src/agent/coordinator.system-prompt.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;qHAeyE,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Developer — the platform's system-owned coding agent.
3
+ *
4
+ * The agent a person gets when they open Code mode and do not pick anyone. Until
5
+ * now that list offered a general chat agent, a customer's own org assistant, and
6
+ * the onboarding concierge — nobody whose job is writing code. Marshal is the
7
+ * shape this follows (a runtime-discovered, system-owned, public Chat agent whose
8
+ * identity lives on the descriptor so every surface behaves the same); the job is
9
+ * different.
10
+ *
11
+ * It lives in `code-sessions` because that package owns the code-session product
12
+ * surface. An agent whose whole purpose is to work inside a session belongs with
13
+ * the feature that owns sessions, the way Marshal belongs with `workboard` and
14
+ * Druid with `druid`.
15
+ */
16
+ export declare const developerAgentDescriptor: {
17
+ id: string;
18
+ kind: "tools/agent/instance";
19
+ name: string;
20
+ description: string;
21
+ agentType: "custom" | "extraction" | "chat" | "task" | "assistant" | "react";
22
+ sourceType: "user" | "system";
23
+ version: string;
24
+ loopId: string;
25
+ configuration: {
26
+ [x: string]: unknown;
27
+ maxIterations?: number | undefined;
28
+ temperature?: number | undefined;
29
+ maxTokens?: number | undefined;
30
+ streaming?: boolean | undefined;
31
+ enableThinking?: boolean | undefined;
32
+ enableToolCalls?: boolean | undefined;
33
+ persistToolResults?: boolean | undefined;
34
+ memoryType?: "none" | "summary" | "buffer" | undefined;
35
+ memorySize?: number | undefined;
36
+ memoryProfileId?: string | undefined;
37
+ toolSelectionStrategy?: "user" | "auto" | "specified" | undefined;
38
+ effort?: "none" | "low" | "medium" | "high" | "max" | "xhigh" | undefined;
39
+ checkpointEnabled?: boolean | undefined;
40
+ enableSubagentCalls?: boolean | undefined;
41
+ };
42
+ isPublic: boolean;
43
+ enabled: boolean;
44
+ capabilityCeiling: "0" | "1" | "3" | "2a" | "2b";
45
+ systemAgentId?: string | null | undefined;
46
+ createdById?: string | null | undefined;
47
+ modelId?: string | null | undefined;
48
+ fallbacks?: {
49
+ providerId?: string | undefined;
50
+ modelId?: string | undefined;
51
+ }[] | undefined;
52
+ voice?: {
53
+ providerId: string;
54
+ voiceId: string;
55
+ } | undefined;
56
+ metadata?: Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue> | undefined;
57
+ presentation?: {
58
+ audiences: ("consumer" | "operator")[];
59
+ } | undefined;
60
+ promptId?: string | undefined;
61
+ promptTemplate?: string | null | undefined;
62
+ tools?: {
63
+ source: "custom" | "system";
64
+ toolId: string;
65
+ enabled: boolean;
66
+ order?: number | undefined;
67
+ hardware?: ("consumer" | "cloud")[] | undefined;
68
+ }[] | undefined;
69
+ hardware?: ("consumer" | "cloud")[] | undefined;
70
+ isDefault?: boolean | undefined;
71
+ tags?: string[] | undefined;
72
+ };
73
+ export default developerAgentDescriptor;
74
+ //# sourceMappingURL=developer.agent.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"developer.agent.descriptor.d.ts","sourceRoot":"","sources":["../../src/agent/developer.agent.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HnC,CAAC;AAEH,eAAe,wBAAwB,CAAC"}