@coreplane/switchboard 1.201.0 → 1.202.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 (29) hide show
  1. package/README.md +1 -1
  2. package/bin/switchboard.js +26 -0
  3. package/dist/assets/deploy/cloudflare-resident/refresh.ts +238 -0
  4. package/dist/assets/deploy/cloudflare-resident/shared.ts +80 -0
  5. package/dist/assets/deploy/cloudflare-resident/tsconfig.json +1 -1
  6. package/dist/assets/deploy/cloudflare-resident/worker.ts +67 -285
  7. package/dist/assets/deploy/cloudflare-resident/wrangler.template.jsonc +2 -1
  8. package/dist/assets/package-lock.json +481 -4
  9. package/dist/assets/package.json +1 -1
  10. package/dist/assets/project.json +1 -1
  11. package/dist/assets/source.json +3 -3
  12. package/dist/assets/src/core/authz/policy.ts +3 -0
  13. package/dist/assets/src/execution/residentRefresh.ts +29 -0
  14. package/dist/assets/web/dist/.vite/manifest.json +43 -43
  15. package/dist/assets/web/dist/assets/{AppShell-CjDyTiip.js → AppShell-CJLPO_aI.js} +1 -1
  16. package/dist/assets/web/dist/assets/{CostsPage-CMAh3G74.js → CostsPage-C6ZvnAmH.js} +1 -1
  17. package/dist/assets/web/dist/assets/{NotFoundPage-CbEKm0tY.js → NotFoundPage-BdLcY60r.js} +1 -1
  18. package/dist/assets/web/dist/assets/{ResidentDetailPage-CcfmOAIP.js → ResidentDetailPage-hXWrr8T6.js} +1 -1
  19. package/dist/assets/web/dist/assets/{ResidentsIndexPage-9Z5jcteM.js → ResidentsIndexPage-YLu4JwxJ.js} +1 -1
  20. package/dist/assets/web/dist/assets/{RunRoutePage-Cdimh4e0.js → RunRoutePage-BDhHRJVO.js} +1 -1
  21. package/dist/assets/web/dist/assets/{RunsIndexPage-CvgDXrO4.js → RunsIndexPage-D7zZ5a0l.js} +1 -1
  22. package/dist/assets/web/dist/assets/{RunsTabs-rEjVQG6H.js → RunsTabs-BOUlSa2W.js} +1 -1
  23. package/dist/assets/web/dist/assets/{ScheduledPage-C5bG9qvd.js → ScheduledPage-BciOQcC-.js} +1 -1
  24. package/dist/assets/web/dist/assets/{StatusDot-D_IPK3WP.js → StatusDot-CTDLBv92.js} +1 -1
  25. package/dist/assets/web/dist/assets/{Tooltip-JlZp3OVC.js → Tooltip-DD2v9Gxx.js} +1 -1
  26. package/dist/assets/web/dist/assets/{favicon-DZDjc8ab.js → favicon-C4Q8cRsP.js} +1 -1
  27. package/dist/assets/web/dist/assets/{main-BKKzFAnK.js → main-DrSlUcMg.js} +2 -2
  28. package/dist/cli.js +629 -207
  29. package/package.json +3 -2
@@ -230,6 +230,35 @@ export function classifyRefreshFailure(input: {
230
230
  return { interrupted: false, diskFull: false, reason: `${step}-failed: ${message}` };
231
231
  }
232
232
 
233
+ /** What the wake path does with a failed restore. `down` is the rule: the
234
+ * SDK's restore cannot be cancelled, so a stalled or capped one may still be
235
+ * streaming into the disk, and a `down` resident's only exit is a rebuild
236
+ * that starts on an empty container — the stream must not land on it. The
237
+ * one exception is the failure that proves nothing is streaming: the runtime
238
+ * was replaced under the restore (a resident Worker deploy rolled the
239
+ * container; `RUNTIME_REPLACEMENT_WORDING`), so the disk it wrote to is gone
240
+ * with it. That is `interrupted`, the same class a refresh step earns when a
241
+ * deploy kills it: not evidence about the repo, re-armed short, and the next
242
+ * wake restores again. The caller may also say the error IS a replacement
243
+ * (`runtimeReplaced`, from the Worker's typed and cause-chain check, since
244
+ * the SDK throws typed replacement errors whose top-level message carries no
245
+ * wording); the message check stays for the untyped ones. A message that
246
+ * also says the command timed out stays `down` either way — the timeout
247
+ * means the stream ran on before the replacement. */
248
+ export function restoreFailureDisposition(
249
+ message: string,
250
+ facts: { runtimeReplaced?: boolean } = {},
251
+ ): { action: "interrupted"; reason: string } | { action: "down"; reason: string } {
252
+ const timedOut = /\(timed out\)/.test(message);
253
+ if (!timedOut && (facts.runtimeReplaced === true || RUNTIME_REPLACEMENT_WORDING.test(message))) {
254
+ return { action: "interrupted", reason: `restore-interrupted: ${message}` };
255
+ }
256
+ return {
257
+ action: "down",
258
+ reason: `r2-restore-failed: ${message} — container stopped so the transfer cannot land on a rebuild`,
259
+ };
260
+ }
261
+
233
262
  /** Re-arm delay after a cycle that did not run to completion for a reason
234
263
  * outside the repo — an interrupted step, or an image-stale container stop.
235
264
  * 45 s: comfortably longer than a container restart plus rehydration
@@ -27,52 +27,52 @@
27
27
  "file": "assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2",
28
28
  "src": "../node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-vietnamese-wght-normal.woff2"
29
29
  },
30
- "_AppShell-CjDyTiip.js": {
31
- "file": "assets/AppShell-CjDyTiip.js",
30
+ "_AppShell-CJLPO_aI.js": {
31
+ "file": "assets/AppShell-CJLPO_aI.js",
32
32
  "name": "AppShell",
33
33
  "imports": [
34
34
  "_seed-B8mQEhhw.js"
35
35
  ]
36
36
  },
37
- "_NotFoundPage-CbEKm0tY.js": {
38
- "file": "assets/NotFoundPage-CbEKm0tY.js",
37
+ "_NotFoundPage-BdLcY60r.js": {
38
+ "file": "assets/NotFoundPage-BdLcY60r.js",
39
39
  "name": "NotFoundPage",
40
40
  "imports": [
41
- "_AppShell-CjDyTiip.js",
41
+ "_AppShell-CJLPO_aI.js",
42
42
  "_seed-B8mQEhhw.js",
43
- "_RunsTabs-rEjVQG6H.js"
43
+ "_RunsTabs-BOUlSa2W.js"
44
44
  ]
45
45
  },
46
- "_RunsTabs-rEjVQG6H.js": {
47
- "file": "assets/RunsTabs-rEjVQG6H.js",
46
+ "_RunsTabs-BOUlSa2W.js": {
47
+ "file": "assets/RunsTabs-BOUlSa2W.js",
48
48
  "name": "RunsTabs",
49
49
  "imports": [
50
- "_AppShell-CjDyTiip.js",
50
+ "_AppShell-CJLPO_aI.js",
51
51
  "_seed-B8mQEhhw.js"
52
52
  ]
53
53
  },
54
- "_StatusDot-D_IPK3WP.js": {
55
- "file": "assets/StatusDot-D_IPK3WP.js",
54
+ "_StatusDot-CTDLBv92.js": {
55
+ "file": "assets/StatusDot-CTDLBv92.js",
56
56
  "name": "StatusDot",
57
57
  "imports": [
58
58
  "_seed-B8mQEhhw.js",
59
- "_Tooltip-JlZp3OVC.js"
59
+ "_Tooltip-DD2v9Gxx.js"
60
60
  ]
61
61
  },
62
- "_Tooltip-JlZp3OVC.js": {
63
- "file": "assets/Tooltip-JlZp3OVC.js",
62
+ "_Tooltip-DD2v9Gxx.js": {
63
+ "file": "assets/Tooltip-DD2v9Gxx.js",
64
64
  "name": "Tooltip",
65
65
  "imports": [
66
- "_AppShell-CjDyTiip.js",
66
+ "_AppShell-CJLPO_aI.js",
67
67
  "_seed-B8mQEhhw.js",
68
68
  "src/main.ts"
69
69
  ]
70
70
  },
71
- "_favicon-DZDjc8ab.js": {
72
- "file": "assets/favicon-DZDjc8ab.js",
71
+ "_favicon-C4Q8cRsP.js": {
72
+ "file": "assets/favicon-C4Q8cRsP.js",
73
73
  "name": "favicon",
74
74
  "imports": [
75
- "_AppShell-CjDyTiip.js",
75
+ "_AppShell-CJLPO_aI.js",
76
76
  "_seed-B8mQEhhw.js",
77
77
  "_localIso-L06jV29p.js"
78
78
  ]
@@ -97,7 +97,7 @@
97
97
  ]
98
98
  },
99
99
  "src/main.ts": {
100
- "file": "assets/main-BKKzFAnK.js",
100
+ "file": "assets/main-DrSlUcMg.js",
101
101
  "name": "main",
102
102
  "src": "src/main.ts",
103
103
  "isEntry": true,
@@ -111,7 +111,7 @@
111
111
  "src/pages/ResidentsIndexPage.vue",
112
112
  "src/pages/ResidentDetailPage.vue",
113
113
  "src/pages/CostsPage.vue",
114
- "_NotFoundPage-CbEKm0tY.js"
114
+ "_NotFoundPage-BdLcY60r.js"
115
115
  ],
116
116
  "css": [
117
117
  "assets/main-DoTjwE-G.css"
@@ -127,53 +127,53 @@
127
127
  ]
128
128
  },
129
129
  "src/pages/CostsPage.vue": {
130
- "file": "assets/CostsPage-CMAh3G74.js",
130
+ "file": "assets/CostsPage-C6ZvnAmH.js",
131
131
  "name": "CostsPage",
132
132
  "src": "src/pages/CostsPage.vue",
133
133
  "isDynamicEntry": true,
134
134
  "imports": [
135
- "_AppShell-CjDyTiip.js",
135
+ "_AppShell-CJLPO_aI.js",
136
136
  "_seed-B8mQEhhw.js"
137
137
  ]
138
138
  },
139
139
  "src/pages/ResidentDetailPage.vue": {
140
- "file": "assets/ResidentDetailPage-CcfmOAIP.js",
140
+ "file": "assets/ResidentDetailPage-hXWrr8T6.js",
141
141
  "name": "ResidentDetailPage",
142
142
  "src": "src/pages/ResidentDetailPage.vue",
143
143
  "isDynamicEntry": true,
144
144
  "imports": [
145
- "_AppShell-CjDyTiip.js",
145
+ "_AppShell-CJLPO_aI.js",
146
146
  "_seed-B8mQEhhw.js",
147
- "_StatusDot-D_IPK3WP.js",
147
+ "_StatusDot-CTDLBv92.js",
148
148
  "_residentDiskBudget-BMBKlYRH.js"
149
149
  ]
150
150
  },
151
151
  "src/pages/ResidentsIndexPage.vue": {
152
- "file": "assets/ResidentsIndexPage-9Z5jcteM.js",
152
+ "file": "assets/ResidentsIndexPage-YLu4JwxJ.js",
153
153
  "name": "ResidentsIndexPage",
154
154
  "src": "src/pages/ResidentsIndexPage.vue",
155
155
  "isDynamicEntry": true,
156
156
  "imports": [
157
- "_AppShell-CjDyTiip.js",
157
+ "_AppShell-CJLPO_aI.js",
158
158
  "_seed-B8mQEhhw.js",
159
- "_StatusDot-D_IPK3WP.js",
159
+ "_StatusDot-CTDLBv92.js",
160
160
  "_residentDiskBudget-BMBKlYRH.js",
161
161
  "_wallClock-DI4HIEN5.js"
162
162
  ]
163
163
  },
164
164
  "src/pages/RunRoutePage.vue": {
165
- "file": "assets/RunRoutePage-Cdimh4e0.js",
165
+ "file": "assets/RunRoutePage-BDhHRJVO.js",
166
166
  "name": "RunRoutePage",
167
167
  "src": "src/pages/RunRoutePage.vue",
168
168
  "isDynamicEntry": true,
169
169
  "imports": [
170
- "_AppShell-CjDyTiip.js",
170
+ "_AppShell-CJLPO_aI.js",
171
171
  "_seed-B8mQEhhw.js",
172
- "_Tooltip-JlZp3OVC.js",
172
+ "_Tooltip-DD2v9Gxx.js",
173
173
  "src/main.ts",
174
- "_NotFoundPage-CbEKm0tY.js",
174
+ "_NotFoundPage-BdLcY60r.js",
175
175
  "_wallClock-DI4HIEN5.js",
176
- "_favicon-DZDjc8ab.js",
176
+ "_favicon-C4Q8cRsP.js",
177
177
  "_localIso-L06jV29p.js"
178
178
  ],
179
179
  "css": [
@@ -181,31 +181,31 @@
181
181
  ]
182
182
  },
183
183
  "src/pages/RunsIndexPage.vue": {
184
- "file": "assets/RunsIndexPage-CvgDXrO4.js",
184
+ "file": "assets/RunsIndexPage-D7zZ5a0l.js",
185
185
  "name": "RunsIndexPage",
186
186
  "src": "src/pages/RunsIndexPage.vue",
187
187
  "isDynamicEntry": true,
188
188
  "imports": [
189
- "_AppShell-CjDyTiip.js",
189
+ "_AppShell-CJLPO_aI.js",
190
190
  "_seed-B8mQEhhw.js",
191
- "_Tooltip-JlZp3OVC.js",
192
- "_RunsTabs-rEjVQG6H.js",
193
- "_StatusDot-D_IPK3WP.js",
191
+ "_Tooltip-DD2v9Gxx.js",
192
+ "_RunsTabs-BOUlSa2W.js",
193
+ "_StatusDot-CTDLBv92.js",
194
194
  "_wallClock-DI4HIEN5.js",
195
- "_favicon-DZDjc8ab.js",
195
+ "_favicon-C4Q8cRsP.js",
196
196
  "_localIso-L06jV29p.js"
197
197
  ]
198
198
  },
199
199
  "src/pages/ScheduledPage.vue": {
200
- "file": "assets/ScheduledPage-C5bG9qvd.js",
200
+ "file": "assets/ScheduledPage-BciOQcC-.js",
201
201
  "name": "ScheduledPage",
202
202
  "src": "src/pages/ScheduledPage.vue",
203
203
  "isDynamicEntry": true,
204
204
  "imports": [
205
- "_AppShell-CjDyTiip.js",
205
+ "_AppShell-CJLPO_aI.js",
206
206
  "_seed-B8mQEhhw.js",
207
- "_Tooltip-JlZp3OVC.js",
208
- "_RunsTabs-rEjVQG6H.js",
207
+ "_Tooltip-DD2v9Gxx.js",
208
+ "_RunsTabs-BOUlSa2W.js",
209
209
  "_wallClock-DI4HIEN5.js",
210
210
  "_localIso-L06jV29p.js"
211
211
  ]