@jr2/orchestrator 0.2.1 → 0.4.1

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 (75) hide show
  1. package/bin/server.ts +7 -4
  2. package/console/canvas.ts +27 -14
  3. package/console/components/app.ts +10 -1
  4. package/console/components/fleet.ts +39 -6
  5. package/console/components/machine-pane.ts +89 -2
  6. package/console/components/nav.ts +1 -1
  7. package/console/components/schema-form.ts +12 -4
  8. package/console/json-field.ts +23 -0
  9. package/console/main.ts +110 -39
  10. package/console/store.ts +221 -17
  11. package/console/style.css +90 -0
  12. package/package.json +4 -5
  13. package/src/actor.ts +507 -54
  14. package/src/agent.ts +2 -2
  15. package/src/ambient.ts +2 -0
  16. package/src/assembly-checks.ts +165 -0
  17. package/src/assembly-tar.ts +494 -0
  18. package/src/assembly.ts +721 -0
  19. package/src/chart.ts +2050 -0
  20. package/src/charts.ts +720 -0
  21. package/src/config.ts +233 -22
  22. package/src/content-hash.ts +105 -0
  23. package/src/custodian.lua +313 -0
  24. package/src/custodian.ts +951 -0
  25. package/src/customize.ts +216 -25
  26. package/src/effect-checks.ts +557 -0
  27. package/src/effect.ts +905 -0
  28. package/src/effector-wire.ts +525 -0
  29. package/src/fingerprint.ts +4 -3
  30. package/src/gate.ts +8 -0
  31. package/src/git-clone.ts +65 -0
  32. package/src/git-push.ts +336 -0
  33. package/src/harness-client.ts +247 -25
  34. package/src/held-secrets.ts +643 -0
  35. package/src/holds.ts +156 -0
  36. package/src/http-effect.ts +981 -0
  37. package/src/http.ts +514 -119
  38. package/src/images.ts +58 -31
  39. package/src/index.ts +49 -4
  40. package/src/instance.ts +445 -59
  41. package/src/kube-client.ts +333 -0
  42. package/src/machine-doc.ts +88 -6
  43. package/src/model-keys.ts +92 -0
  44. package/src/mount-digest.ts +53 -0
  45. package/src/names.ts +89 -7
  46. package/src/notices.ts +88 -0
  47. package/src/open-body.ts +1444 -0
  48. package/src/open-effect.ts +144 -0
  49. package/src/open.ts +4 -4
  50. package/src/parts.ts +530 -33
  51. package/src/party.ts +468 -0
  52. package/src/pick.ts +309 -0
  53. package/src/pool.ts +1 -1
  54. package/src/registration.ts +301 -17
  55. package/src/repo-fetch.ts +61 -86
  56. package/src/repos.ts +63 -74
  57. package/src/rest.ts +133 -0
  58. package/src/run-host.ts +1841 -105
  59. package/src/sandbox-effect.ts +891 -0
  60. package/src/sandbox-effector.ts +111 -0
  61. package/src/sandbox-kube.ts +1719 -0
  62. package/src/sandbox-watch.ts +260 -0
  63. package/src/secret-placement.ts +494 -0
  64. package/src/server.ts +285 -89
  65. package/src/setup.ts +589 -70
  66. package/src/size.ts +342 -0
  67. package/src/snapshot-store.ts +64 -13
  68. package/src/stub-harness.ts +5 -0
  69. package/src/sync-client.ts +54 -0
  70. package/src/timers.ts +178 -0
  71. package/src/tokens.ts +44 -12
  72. package/src/vocabulary.ts +66 -1
  73. package/src/wire.ts +156 -2
  74. package/src/workspace.ts +529 -194
  75. package/src/sandbox-kubectl.ts +0 -1144
package/console/style.css CHANGED
@@ -162,6 +162,96 @@ main {
162
162
  display: none;
163
163
  }
164
164
 
165
+ /* Who may send what, per state (ADR-0015) — structure, folded by default so the diagram keeps the
166
+ pane; open, it scrolls inside its own cap rather than push the diagram out. */
167
+ #seats {
168
+ margin: 0 28px 16px;
169
+ max-width: 720px;
170
+ }
171
+ #root-transitions:empty + #seats {
172
+ margin-top: 28px;
173
+ }
174
+ #seats summary {
175
+ cursor: pointer;
176
+ color: var(--text-dim);
177
+ }
178
+ #seats .seats-warned {
179
+ color: var(--amber);
180
+ }
181
+ #seats ul {
182
+ list-style: none;
183
+ margin: 8px 0 0;
184
+ padding: 0;
185
+ max-height: 30vh;
186
+ overflow: auto;
187
+ }
188
+ #seats .seat-list li {
189
+ padding: 2px 0;
190
+ }
191
+ #seats .seat-names {
192
+ color: var(--blue);
193
+ }
194
+ #seats .seat-warnings li {
195
+ border: 1px solid var(--amber);
196
+ border-radius: 4px;
197
+ padding: 6px 10px;
198
+ margin-bottom: 6px;
199
+ color: var(--amber);
200
+ }
201
+
202
+ /* A wait for capacity (ADR-0064): the selected run's Workspaces in "placing", and why. Amber like
203
+ the notice — the run is not wrong, it is waiting on the cluster. */
204
+ #waiting {
205
+ list-style: none;
206
+ margin: 0 28px 16px;
207
+ padding: 0;
208
+ max-width: 720px;
209
+ }
210
+
211
+ #waiting:empty {
212
+ display: none;
213
+ }
214
+
215
+ #waiting li {
216
+ border: 1px solid var(--amber);
217
+ border-radius: 4px;
218
+ padding: 8px 12px;
219
+ margin-bottom: 8px;
220
+ }
221
+
222
+ #waiting .waiting-head {
223
+ color: var(--amber);
224
+ }
225
+
226
+ #waiting .waiting-message {
227
+ margin-top: 4px;
228
+ font-family: var(--mono);
229
+ color: var(--text-dim);
230
+ }
231
+
232
+ /* An outstanding pick (ADR-0024): an Agent's Turn held while the workflow runs its pick. */
233
+ #held {
234
+ list-style: none;
235
+ margin: 0 28px 16px;
236
+ padding: 0;
237
+ max-width: 720px;
238
+ }
239
+
240
+ #held:empty {
241
+ display: none;
242
+ }
243
+
244
+ #held li {
245
+ border: 1px solid var(--line);
246
+ border-radius: 4px;
247
+ padding: 8px 12px;
248
+ margin-bottom: 8px;
249
+ }
250
+
251
+ #held .held-head {
252
+ font-family: var(--mono);
253
+ }
254
+
165
255
  /* ---- Machine (SVG) ---- */
166
256
 
167
257
  /* Every box is click-to-select (outline only — the click is reserved beyond that). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jr2/orchestrator",
3
- "version": "0.2.1",
3
+ "version": "0.4.1",
4
4
  "description": "The jr2 Orchestrator: xstate runtime, HTTP API and Console, and the kit pieces a Workflow imports.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -35,18 +35,17 @@
35
35
  "types": "./src/index.ts",
36
36
  "dependencies": {
37
37
  "@hono/node-server": "^2.0.6",
38
- "@modelcontextprotocol/sdk": "^1.29.0",
39
38
  "elkjs": "^0.11.1",
40
39
  "hono": "^4.12.27",
41
40
  "preact": "^10.29.8",
42
41
  "ts-blank-space": "^0.9.0",
43
42
  "xstate": "^5.18.0",
44
43
  "zod": "^4.4.3",
45
- "@jr2/agent-protocol": "0.2.1"
44
+ "@jr2/agent-protocol": "0.4.1"
46
45
  },
47
46
  "devDependencies": {
48
47
  "@types/node": "^26.0.1",
49
- "@jr2/harness": "0.2.1"
48
+ "@jr2/harness": "0.4.1"
50
49
  },
51
50
  "files": [
52
51
  "bin",
@@ -56,6 +55,6 @@
56
55
  ],
57
56
  "scripts": {
58
57
  "typecheck": "tsc --noEmit && tsc -p console --noEmit",
59
- "test": "node --test"
58
+ "test": "node --test --test-global-setup=../../scripts/test-tmpdir.ts"
60
59
  }
61
60
  }