clinkx 1.3.0 → 1.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 (179) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +13 -6
  3. package/clinkx-workflows/dist/child-env.d.ts +3 -0
  4. package/clinkx-workflows/dist/child-env.js +11 -0
  5. package/clinkx-workflows/dist/child-env.js.map +1 -1
  6. package/clinkx-workflows/dist/dashboard/api-routes.d.ts +21 -0
  7. package/clinkx-workflows/dist/dashboard/api-routes.js +27 -0
  8. package/clinkx-workflows/dist/dashboard/api-routes.js.map +1 -1
  9. package/clinkx-workflows/dist/dashboard/auth/challenge-store.d.ts +13 -0
  10. package/clinkx-workflows/dist/dashboard/auth/challenge-store.js.map +1 -1
  11. package/clinkx-workflows/dist/dashboard/auth/controller.d.ts +27 -0
  12. package/clinkx-workflows/dist/dashboard/auth/controller.js +262 -23
  13. package/clinkx-workflows/dist/dashboard/auth/controller.js.map +1 -1
  14. package/clinkx-workflows/dist/dashboard/auth/settings-step-up.d.ts +62 -0
  15. package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js +70 -0
  16. package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js.map +1 -0
  17. package/clinkx-workflows/dist/dashboard/request-admission.d.ts +6 -0
  18. package/clinkx-workflows/dist/dashboard/request-admission.js +9 -0
  19. package/clinkx-workflows/dist/dashboard/request-admission.js.map +1 -1
  20. package/clinkx-workflows/dist/dashboard/server-factory.js +15 -1
  21. package/clinkx-workflows/dist/dashboard/server-factory.js.map +1 -1
  22. package/clinkx-workflows/dist/dashboard/settings-contract.d.ts +1806 -0
  23. package/clinkx-workflows/dist/dashboard/settings-contract.js +630 -0
  24. package/clinkx-workflows/dist/dashboard/settings-contract.js.map +1 -0
  25. package/clinkx-workflows/dist/dashboard/settings-process-reader.d.ts +48 -0
  26. package/clinkx-workflows/dist/dashboard/settings-process-reader.js +195 -0
  27. package/clinkx-workflows/dist/dashboard/settings-process-reader.js.map +1 -0
  28. package/clinkx-workflows/dist/dashboard/settings-routes.d.ts +87 -0
  29. package/clinkx-workflows/dist/dashboard/settings-routes.js +690 -0
  30. package/clinkx-workflows/dist/dashboard/settings-routes.js.map +1 -0
  31. package/clinkx-workflows/dist/dashboard-ui/assets/index-CX4FrhYN.js +122 -0
  32. package/clinkx-workflows/dist/dashboard-ui/assets/style-C5guUjwN.css +1 -0
  33. package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
  34. package/clinkx-workflows/dist/durable-file-core.d.ts +76 -0
  35. package/clinkx-workflows/dist/durable-file-core.js +146 -0
  36. package/clinkx-workflows/dist/durable-file-core.js.map +1 -0
  37. package/clinkx-workflows/dist/durable-file.d.ts +8 -64
  38. package/clinkx-workflows/dist/durable-file.js +14 -137
  39. package/clinkx-workflows/dist/durable-file.js.map +1 -1
  40. package/clinkx-workflows/dist/index.js +68 -2
  41. package/clinkx-workflows/dist/index.js.map +1 -1
  42. package/clinkx-workflows/dist/settings/audit.d.ts +101 -0
  43. package/clinkx-workflows/dist/settings/audit.js +318 -0
  44. package/clinkx-workflows/dist/settings/audit.js.map +1 -0
  45. package/clinkx-workflows/dist/settings/bootstrap.d.ts +35 -0
  46. package/clinkx-workflows/dist/settings/bootstrap.js +52 -0
  47. package/clinkx-workflows/dist/settings/bootstrap.js.map +1 -0
  48. package/clinkx-workflows/dist/settings/codec.d.ts +51 -0
  49. package/clinkx-workflows/dist/settings/codec.js +410 -0
  50. package/clinkx-workflows/dist/settings/codec.js.map +1 -0
  51. package/clinkx-workflows/dist/settings/durable-write.d.ts +48 -0
  52. package/clinkx-workflows/dist/settings/durable-write.js +31 -0
  53. package/clinkx-workflows/dist/settings/durable-write.js.map +1 -0
  54. package/clinkx-workflows/dist/settings/index.d.ts +20 -0
  55. package/clinkx-workflows/dist/settings/index.js +23 -0
  56. package/clinkx-workflows/dist/settings/index.js.map +1 -0
  57. package/clinkx-workflows/dist/settings/loader.d.ts +80 -0
  58. package/clinkx-workflows/dist/settings/loader.js +577 -0
  59. package/clinkx-workflows/dist/settings/loader.js.map +1 -0
  60. package/clinkx-workflows/dist/settings/lock.d.ts +108 -0
  61. package/clinkx-workflows/dist/settings/lock.js +344 -0
  62. package/clinkx-workflows/dist/settings/lock.js.map +1 -0
  63. package/clinkx-workflows/dist/settings/paths.d.ts +65 -0
  64. package/clinkx-workflows/dist/settings/paths.js +173 -0
  65. package/clinkx-workflows/dist/settings/paths.js.map +1 -0
  66. package/clinkx-workflows/dist/settings/process-heartbeat.d.ts +47 -0
  67. package/clinkx-workflows/dist/settings/process-heartbeat.js +305 -0
  68. package/clinkx-workflows/dist/settings/process-heartbeat.js.map +1 -0
  69. package/clinkx-workflows/dist/settings/registry.d.ts +178 -0
  70. package/clinkx-workflows/dist/settings/registry.js +1290 -0
  71. package/clinkx-workflows/dist/settings/registry.js.map +1 -0
  72. package/clinkx-workflows/dist/settings/schema.d.ts +404 -0
  73. package/clinkx-workflows/dist/settings/schema.js +415 -0
  74. package/clinkx-workflows/dist/settings/schema.js.map +1 -0
  75. package/clinkx-workflows/dist/settings/store.d.ts +157 -0
  76. package/clinkx-workflows/dist/settings/store.js +842 -0
  77. package/clinkx-workflows/dist/settings/store.js.map +1 -0
  78. package/clinkx-workflows/dist/stdio-entry.d.ts +2 -0
  79. package/clinkx-workflows/dist/stdio-entry.js +52 -0
  80. package/clinkx-workflows/dist/stdio-entry.js.map +1 -0
  81. package/dist/dashboard-cli.d.ts +11 -3
  82. package/dist/dashboard-cli.js +199 -33
  83. package/dist/dashboard-cli.js.map +1 -1
  84. package/dist/dashboard-companion/client.d.ts +14 -0
  85. package/dist/dashboard-companion/client.js +16 -0
  86. package/dist/dashboard-companion/client.js.map +1 -1
  87. package/dist/dashboard-companion/credential-expectation.d.ts +23 -0
  88. package/dist/dashboard-companion/credential-expectation.js +50 -0
  89. package/dist/dashboard-companion/credential-expectation.js.map +1 -0
  90. package/dist/dashboard-companion/host-channel.d.ts +36 -0
  91. package/dist/dashboard-companion/host-channel.js +78 -0
  92. package/dist/dashboard-companion/host-channel.js.map +1 -0
  93. package/dist/dashboard-companion/host-status.d.ts +179 -0
  94. package/dist/dashboard-companion/host-status.js +122 -0
  95. package/dist/dashboard-companion/host-status.js.map +1 -0
  96. package/dist/dashboard-companion/protocol.js +17 -0
  97. package/dist/dashboard-companion/protocol.js.map +1 -1
  98. package/dist/dashboard-companion/standalone-assets.d.ts +8 -0
  99. package/dist/dashboard-companion/standalone-assets.js +7 -1
  100. package/dist/dashboard-companion/standalone-assets.js.map +1 -1
  101. package/dist/dashboard-companion/standalone-entry.js +34 -13
  102. package/dist/dashboard-companion/standalone-entry.js.map +1 -1
  103. package/dist/dashboard-gateway/control-plane/contracts.d.ts +38 -38
  104. package/dist/dashboard-gateway/tunnel-http.js +20 -0
  105. package/dist/dashboard-gateway/tunnel-http.js.map +1 -1
  106. package/dist/desktop-host/child-env.d.ts +23 -0
  107. package/dist/desktop-host/child-env.js +70 -0
  108. package/dist/desktop-host/child-env.js.map +1 -0
  109. package/dist/desktop-host/daemon-entry.d.ts +2 -0
  110. package/dist/desktop-host/daemon-entry.js +50 -0
  111. package/dist/desktop-host/daemon-entry.js.map +1 -0
  112. package/dist/desktop-host/daemon-env.d.ts +12 -0
  113. package/dist/desktop-host/daemon-env.js +35 -0
  114. package/dist/desktop-host/daemon-env.js.map +1 -0
  115. package/dist/desktop-host/daemon-protocol.d.ts +210 -0
  116. package/dist/desktop-host/daemon-protocol.js +56 -0
  117. package/dist/desktop-host/daemon-protocol.js.map +1 -0
  118. package/dist/desktop-host/daemon.d.ts +50 -0
  119. package/dist/desktop-host/daemon.js +441 -0
  120. package/dist/desktop-host/daemon.js.map +1 -0
  121. package/dist/desktop-host/enrollment.d.ts +17 -0
  122. package/dist/desktop-host/enrollment.js +25 -0
  123. package/dist/desktop-host/enrollment.js.map +1 -0
  124. package/dist/desktop-host/import.d.ts +14 -0
  125. package/dist/desktop-host/import.js +95 -0
  126. package/dist/desktop-host/import.js.map +1 -0
  127. package/dist/desktop-host/profile.d.ts +130 -0
  128. package/dist/desktop-host/profile.js +176 -0
  129. package/dist/desktop-host/profile.js.map +1 -0
  130. package/dist/desktop-host/service.d.ts +6 -0
  131. package/dist/desktop-host/service.js +7 -0
  132. package/dist/desktop-host/service.js.map +1 -0
  133. package/dist/desktop-host/supervisor.d.ts +57 -0
  134. package/dist/desktop-host/supervisor.js +256 -0
  135. package/dist/desktop-host/supervisor.js.map +1 -0
  136. package/dist/desktop-host/view-state.d.ts +138 -0
  137. package/dist/desktop-host/view-state.js +27 -0
  138. package/dist/desktop-host/view-state.js.map +1 -0
  139. package/dist/elaris/config.d.ts +10 -0
  140. package/dist/elaris/config.js +27 -1
  141. package/dist/elaris/config.js.map +1 -1
  142. package/dist/elaris/tools.js +4 -1
  143. package/dist/elaris/tools.js.map +1 -1
  144. package/dist/index.d.ts +0 -31
  145. package/dist/index.js +41 -404
  146. package/dist/index.js.map +1 -1
  147. package/dist/lib.d.ts +17 -0
  148. package/dist/lib.js +17 -0
  149. package/dist/lib.js.map +1 -0
  150. package/dist/progress-report/lock.d.ts +17 -59
  151. package/dist/progress-report/lock.js +25 -329
  152. package/dist/progress-report/lock.js.map +1 -1
  153. package/dist/registry.d.ts +7 -0
  154. package/dist/registry.js +21 -7
  155. package/dist/registry.js.map +1 -1
  156. package/dist/server.js +75 -4
  157. package/dist/server.js.map +1 -1
  158. package/dist/settings-cli/clients.d.ts +137 -0
  159. package/dist/settings-cli/clients.js +1124 -0
  160. package/dist/settings-cli/clients.js.map +1 -0
  161. package/dist/settings-cli/commands.d.ts +67 -0
  162. package/dist/settings-cli/commands.js +726 -0
  163. package/dist/settings-cli/commands.js.map +1 -0
  164. package/dist/settings-cli/format.d.ts +34 -0
  165. package/dist/settings-cli/format.js +40 -0
  166. package/dist/settings-cli/format.js.map +1 -0
  167. package/dist/settings-cli/main.d.ts +18 -0
  168. package/dist/settings-cli/main.js +256 -0
  169. package/dist/settings-cli/main.js.map +1 -0
  170. package/dist/stdio-main.d.ts +73 -0
  171. package/dist/stdio-main.js +455 -0
  172. package/dist/stdio-main.js.map +1 -0
  173. package/docs/configuration.md +340 -39
  174. package/docs/security.md +150 -6
  175. package/docs/verification/README.md +28 -2
  176. package/docs/verification/workflow-handoff.md +86 -0
  177. package/package.json +3 -3
  178. package/clinkx-workflows/dist/dashboard-ui/assets/index-DRId2DVA.js +0 -119
  179. package/clinkx-workflows/dist/dashboard-ui/assets/style-CHAw57y5.css +0 -1
@@ -167,6 +167,7 @@ export declare const EntitlementStatusSchema: z.ZodEffects<z.ZodEffects<z.ZodObj
167
167
  stale: z.ZodBoolean;
168
168
  }, "strict", z.ZodTypeAny, {
169
169
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
170
+ stale: boolean;
170
171
  suspended: boolean;
171
172
  access: "denied" | "granted";
172
173
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -174,9 +175,9 @@ export declare const EntitlementStatusSchema: z.ZodEffects<z.ZodEffects<z.ZodObj
174
175
  grace_deadline: string | null;
175
176
  grant_until: string | null;
176
177
  last_reconciled_at: string | null;
177
- stale: boolean;
178
178
  }, {
179
179
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
180
+ stale: boolean;
180
181
  suspended: boolean;
181
182
  access: "denied" | "granted";
182
183
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -184,9 +185,9 @@ export declare const EntitlementStatusSchema: z.ZodEffects<z.ZodEffects<z.ZodObj
184
185
  grace_deadline: string | null;
185
186
  grant_until: string | null;
186
187
  last_reconciled_at: string | null;
187
- stale: boolean;
188
188
  }>, {
189
189
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
190
+ stale: boolean;
190
191
  suspended: boolean;
191
192
  access: "denied" | "granted";
192
193
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -194,9 +195,9 @@ export declare const EntitlementStatusSchema: z.ZodEffects<z.ZodEffects<z.ZodObj
194
195
  grace_deadline: string | null;
195
196
  grant_until: string | null;
196
197
  last_reconciled_at: string | null;
197
- stale: boolean;
198
198
  }, {
199
199
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
200
+ stale: boolean;
200
201
  suspended: boolean;
201
202
  access: "denied" | "granted";
202
203
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -204,9 +205,9 @@ export declare const EntitlementStatusSchema: z.ZodEffects<z.ZodEffects<z.ZodObj
204
205
  grace_deadline: string | null;
205
206
  grant_until: string | null;
206
207
  last_reconciled_at: string | null;
207
- stale: boolean;
208
208
  }>, {
209
209
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
210
+ stale: boolean;
210
211
  suspended: boolean;
211
212
  access: "denied" | "granted";
212
213
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -214,9 +215,9 @@ export declare const EntitlementStatusSchema: z.ZodEffects<z.ZodEffects<z.ZodObj
214
215
  grace_deadline: string | null;
215
216
  grant_until: string | null;
216
217
  last_reconciled_at: string | null;
217
- stale: boolean;
218
218
  }, {
219
219
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
220
+ stale: boolean;
220
221
  suspended: boolean;
221
222
  access: "denied" | "granted";
222
223
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -224,7 +225,6 @@ export declare const EntitlementStatusSchema: z.ZodEffects<z.ZodEffects<z.ZodObj
224
225
  grace_deadline: string | null;
225
226
  grant_until: string | null;
226
227
  last_reconciled_at: string | null;
227
- stale: boolean;
228
228
  }>;
229
229
  export type EntitlementStatus = z.infer<typeof EntitlementStatusSchema>;
230
230
  export declare const WorkstationLabelSchema: z.ZodString;
@@ -307,6 +307,7 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
307
307
  stale: z.ZodBoolean;
308
308
  }, "strict", z.ZodTypeAny, {
309
309
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
310
+ stale: boolean;
310
311
  suspended: boolean;
311
312
  access: "denied" | "granted";
312
313
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -314,9 +315,9 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
314
315
  grace_deadline: string | null;
315
316
  grant_until: string | null;
316
317
  last_reconciled_at: string | null;
317
- stale: boolean;
318
318
  }, {
319
319
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
320
+ stale: boolean;
320
321
  suspended: boolean;
321
322
  access: "denied" | "granted";
322
323
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -324,9 +325,9 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
324
325
  grace_deadline: string | null;
325
326
  grant_until: string | null;
326
327
  last_reconciled_at: string | null;
327
- stale: boolean;
328
328
  }>, {
329
329
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
330
+ stale: boolean;
330
331
  suspended: boolean;
331
332
  access: "denied" | "granted";
332
333
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -334,9 +335,9 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
334
335
  grace_deadline: string | null;
335
336
  grant_until: string | null;
336
337
  last_reconciled_at: string | null;
337
- stale: boolean;
338
338
  }, {
339
339
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
340
+ stale: boolean;
340
341
  suspended: boolean;
341
342
  access: "denied" | "granted";
342
343
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -344,9 +345,9 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
344
345
  grace_deadline: string | null;
345
346
  grant_until: string | null;
346
347
  last_reconciled_at: string | null;
347
- stale: boolean;
348
348
  }>, {
349
349
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
350
+ stale: boolean;
350
351
  suspended: boolean;
351
352
  access: "denied" | "granted";
352
353
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -354,9 +355,9 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
354
355
  grace_deadline: string | null;
355
356
  grant_until: string | null;
356
357
  last_reconciled_at: string | null;
357
- stale: boolean;
358
358
  }, {
359
359
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
360
+ stale: boolean;
360
361
  suspended: boolean;
361
362
  access: "denied" | "granted";
362
363
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -364,7 +365,6 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
364
365
  grace_deadline: string | null;
365
366
  grant_until: string | null;
366
367
  last_reconciled_at: string | null;
367
- stale: boolean;
368
368
  }>;
369
369
  /** `false`: the billing routes do not exist and access comes only from operator grants. */
370
370
  billing_enabled: z.ZodBoolean;
@@ -416,6 +416,7 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
416
416
  };
417
417
  entitlement: {
418
418
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
419
+ stale: boolean;
419
420
  suspended: boolean;
420
421
  access: "denied" | "granted";
421
422
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -423,7 +424,6 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
423
424
  grace_deadline: string | null;
424
425
  grant_until: string | null;
425
426
  last_reconciled_at: string | null;
426
- stale: boolean;
427
427
  };
428
428
  billing_enabled: boolean;
429
429
  max_workstations: 2;
@@ -444,6 +444,7 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
444
444
  };
445
445
  entitlement: {
446
446
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
447
+ stale: boolean;
447
448
  suspended: boolean;
448
449
  access: "denied" | "granted";
449
450
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -451,7 +452,6 @@ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
451
452
  grace_deadline: string | null;
452
453
  grant_until: string | null;
453
454
  last_reconciled_at: string | null;
454
- stale: boolean;
455
455
  };
456
456
  billing_enabled: boolean;
457
457
  max_workstations: 2;
@@ -605,6 +605,7 @@ export declare const BillingStatusResponseSchema: z.ZodObject<{
605
605
  stale: z.ZodBoolean;
606
606
  }, "strict", z.ZodTypeAny, {
607
607
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
608
+ stale: boolean;
608
609
  suspended: boolean;
609
610
  access: "denied" | "granted";
610
611
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -612,9 +613,9 @@ export declare const BillingStatusResponseSchema: z.ZodObject<{
612
613
  grace_deadline: string | null;
613
614
  grant_until: string | null;
614
615
  last_reconciled_at: string | null;
615
- stale: boolean;
616
616
  }, {
617
617
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
618
+ stale: boolean;
618
619
  suspended: boolean;
619
620
  access: "denied" | "granted";
620
621
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -622,9 +623,9 @@ export declare const BillingStatusResponseSchema: z.ZodObject<{
622
623
  grace_deadline: string | null;
623
624
  grant_until: string | null;
624
625
  last_reconciled_at: string | null;
625
- stale: boolean;
626
626
  }>, {
627
627
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
628
+ stale: boolean;
628
629
  suspended: boolean;
629
630
  access: "denied" | "granted";
630
631
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -632,9 +633,9 @@ export declare const BillingStatusResponseSchema: z.ZodObject<{
632
633
  grace_deadline: string | null;
633
634
  grant_until: string | null;
634
635
  last_reconciled_at: string | null;
635
- stale: boolean;
636
636
  }, {
637
637
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
638
+ stale: boolean;
638
639
  suspended: boolean;
639
640
  access: "denied" | "granted";
640
641
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -642,9 +643,9 @@ export declare const BillingStatusResponseSchema: z.ZodObject<{
642
643
  grace_deadline: string | null;
643
644
  grant_until: string | null;
644
645
  last_reconciled_at: string | null;
645
- stale: boolean;
646
646
  }>, {
647
647
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
648
+ stale: boolean;
648
649
  suspended: boolean;
649
650
  access: "denied" | "granted";
650
651
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -652,9 +653,9 @@ export declare const BillingStatusResponseSchema: z.ZodObject<{
652
653
  grace_deadline: string | null;
653
654
  grant_until: string | null;
654
655
  last_reconciled_at: string | null;
655
- stale: boolean;
656
656
  }, {
657
657
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
658
+ stale: boolean;
658
659
  suspended: boolean;
659
660
  access: "denied" | "granted";
660
661
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -662,11 +663,11 @@ export declare const BillingStatusResponseSchema: z.ZodObject<{
662
663
  grace_deadline: string | null;
663
664
  grant_until: string | null;
664
665
  last_reconciled_at: string | null;
665
- stale: boolean;
666
666
  }>;
667
667
  }, "strict", z.ZodTypeAny, {
668
668
  entitlement: {
669
669
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
670
+ stale: boolean;
670
671
  suspended: boolean;
671
672
  access: "denied" | "granted";
672
673
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -674,11 +675,11 @@ export declare const BillingStatusResponseSchema: z.ZodObject<{
674
675
  grace_deadline: string | null;
675
676
  grant_until: string | null;
676
677
  last_reconciled_at: string | null;
677
- stale: boolean;
678
678
  };
679
679
  }, {
680
680
  entitlement: {
681
681
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
682
+ stale: boolean;
682
683
  suspended: boolean;
683
684
  access: "denied" | "granted";
684
685
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -686,7 +687,6 @@ export declare const BillingStatusResponseSchema: z.ZodObject<{
686
687
  grace_deadline: string | null;
687
688
  grant_until: string | null;
688
689
  last_reconciled_at: string | null;
689
- stale: boolean;
690
690
  };
691
691
  }>;
692
692
  export type BillingStatusResponse = z.infer<typeof BillingStatusResponseSchema>;
@@ -848,6 +848,7 @@ export declare const CONTROL_ROUTES: {
848
848
  stale: z.ZodBoolean;
849
849
  }, "strict", z.ZodTypeAny, {
850
850
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
851
+ stale: boolean;
851
852
  suspended: boolean;
852
853
  access: "denied" | "granted";
853
854
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -855,9 +856,9 @@ export declare const CONTROL_ROUTES: {
855
856
  grace_deadline: string | null;
856
857
  grant_until: string | null;
857
858
  last_reconciled_at: string | null;
858
- stale: boolean;
859
859
  }, {
860
860
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
861
+ stale: boolean;
861
862
  suspended: boolean;
862
863
  access: "denied" | "granted";
863
864
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -865,9 +866,9 @@ export declare const CONTROL_ROUTES: {
865
866
  grace_deadline: string | null;
866
867
  grant_until: string | null;
867
868
  last_reconciled_at: string | null;
868
- stale: boolean;
869
869
  }>, {
870
870
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
871
+ stale: boolean;
871
872
  suspended: boolean;
872
873
  access: "denied" | "granted";
873
874
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -875,9 +876,9 @@ export declare const CONTROL_ROUTES: {
875
876
  grace_deadline: string | null;
876
877
  grant_until: string | null;
877
878
  last_reconciled_at: string | null;
878
- stale: boolean;
879
879
  }, {
880
880
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
881
+ stale: boolean;
881
882
  suspended: boolean;
882
883
  access: "denied" | "granted";
883
884
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -885,9 +886,9 @@ export declare const CONTROL_ROUTES: {
885
886
  grace_deadline: string | null;
886
887
  grant_until: string | null;
887
888
  last_reconciled_at: string | null;
888
- stale: boolean;
889
889
  }>, {
890
890
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
891
+ stale: boolean;
891
892
  suspended: boolean;
892
893
  access: "denied" | "granted";
893
894
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -895,9 +896,9 @@ export declare const CONTROL_ROUTES: {
895
896
  grace_deadline: string | null;
896
897
  grant_until: string | null;
897
898
  last_reconciled_at: string | null;
898
- stale: boolean;
899
899
  }, {
900
900
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
901
+ stale: boolean;
901
902
  suspended: boolean;
902
903
  access: "denied" | "granted";
903
904
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -905,7 +906,6 @@ export declare const CONTROL_ROUTES: {
905
906
  grace_deadline: string | null;
906
907
  grant_until: string | null;
907
908
  last_reconciled_at: string | null;
908
- stale: boolean;
909
909
  }>;
910
910
  /** `false`: the billing routes do not exist and access comes only from operator grants. */
911
911
  billing_enabled: z.ZodBoolean;
@@ -957,6 +957,7 @@ export declare const CONTROL_ROUTES: {
957
957
  };
958
958
  entitlement: {
959
959
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
960
+ stale: boolean;
960
961
  suspended: boolean;
961
962
  access: "denied" | "granted";
962
963
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -964,7 +965,6 @@ export declare const CONTROL_ROUTES: {
964
965
  grace_deadline: string | null;
965
966
  grant_until: string | null;
966
967
  last_reconciled_at: string | null;
967
- stale: boolean;
968
968
  };
969
969
  billing_enabled: boolean;
970
970
  max_workstations: 2;
@@ -985,6 +985,7 @@ export declare const CONTROL_ROUTES: {
985
985
  };
986
986
  entitlement: {
987
987
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
988
+ stale: boolean;
988
989
  suspended: boolean;
989
990
  access: "denied" | "granted";
990
991
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -992,7 +993,6 @@ export declare const CONTROL_ROUTES: {
992
993
  grace_deadline: string | null;
993
994
  grant_until: string | null;
994
995
  last_reconciled_at: string | null;
995
- stale: boolean;
996
996
  };
997
997
  billing_enabled: boolean;
998
998
  max_workstations: 2;
@@ -1159,6 +1159,7 @@ export declare const CONTROL_ROUTES: {
1159
1159
  stale: z.ZodBoolean;
1160
1160
  }, "strict", z.ZodTypeAny, {
1161
1161
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1162
+ stale: boolean;
1162
1163
  suspended: boolean;
1163
1164
  access: "denied" | "granted";
1164
1165
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -1166,9 +1167,9 @@ export declare const CONTROL_ROUTES: {
1166
1167
  grace_deadline: string | null;
1167
1168
  grant_until: string | null;
1168
1169
  last_reconciled_at: string | null;
1169
- stale: boolean;
1170
1170
  }, {
1171
1171
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1172
+ stale: boolean;
1172
1173
  suspended: boolean;
1173
1174
  access: "denied" | "granted";
1174
1175
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -1176,9 +1177,9 @@ export declare const CONTROL_ROUTES: {
1176
1177
  grace_deadline: string | null;
1177
1178
  grant_until: string | null;
1178
1179
  last_reconciled_at: string | null;
1179
- stale: boolean;
1180
1180
  }>, {
1181
1181
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1182
+ stale: boolean;
1182
1183
  suspended: boolean;
1183
1184
  access: "denied" | "granted";
1184
1185
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -1186,9 +1187,9 @@ export declare const CONTROL_ROUTES: {
1186
1187
  grace_deadline: string | null;
1187
1188
  grant_until: string | null;
1188
1189
  last_reconciled_at: string | null;
1189
- stale: boolean;
1190
1190
  }, {
1191
1191
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1192
+ stale: boolean;
1192
1193
  suspended: boolean;
1193
1194
  access: "denied" | "granted";
1194
1195
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -1196,9 +1197,9 @@ export declare const CONTROL_ROUTES: {
1196
1197
  grace_deadline: string | null;
1197
1198
  grant_until: string | null;
1198
1199
  last_reconciled_at: string | null;
1199
- stale: boolean;
1200
1200
  }>, {
1201
1201
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1202
+ stale: boolean;
1202
1203
  suspended: boolean;
1203
1204
  access: "denied" | "granted";
1204
1205
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -1206,9 +1207,9 @@ export declare const CONTROL_ROUTES: {
1206
1207
  grace_deadline: string | null;
1207
1208
  grant_until: string | null;
1208
1209
  last_reconciled_at: string | null;
1209
- stale: boolean;
1210
1210
  }, {
1211
1211
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1212
+ stale: boolean;
1212
1213
  suspended: boolean;
1213
1214
  access: "denied" | "granted";
1214
1215
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -1216,11 +1217,11 @@ export declare const CONTROL_ROUTES: {
1216
1217
  grace_deadline: string | null;
1217
1218
  grant_until: string | null;
1218
1219
  last_reconciled_at: string | null;
1219
- stale: boolean;
1220
1220
  }>;
1221
1221
  }, "strict", z.ZodTypeAny, {
1222
1222
  entitlement: {
1223
1223
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1224
+ stale: boolean;
1224
1225
  suspended: boolean;
1225
1226
  access: "denied" | "granted";
1226
1227
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -1228,11 +1229,11 @@ export declare const CONTROL_ROUTES: {
1228
1229
  grace_deadline: string | null;
1229
1230
  grant_until: string | null;
1230
1231
  last_reconciled_at: string | null;
1231
- stale: boolean;
1232
1232
  };
1233
1233
  }, {
1234
1234
  entitlement: {
1235
1235
  reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1236
+ stale: boolean;
1236
1237
  suspended: boolean;
1237
1238
  access: "denied" | "granted";
1238
1239
  subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
@@ -1240,7 +1241,6 @@ export declare const CONTROL_ROUTES: {
1240
1241
  grace_deadline: string | null;
1241
1242
  grant_until: string | null;
1242
1243
  last_reconciled_at: string | null;
1243
- stale: boolean;
1244
1244
  };
1245
1245
  }>;
1246
1246
  };
@@ -4,6 +4,15 @@ export const MAX_FORWARD_PATH_BYTES = 2_048;
4
4
  export const MAX_FORWARD_HEADER_BYTES = 64 * 1024;
5
5
  export const MAX_V2_IN_FLIGHT = 8;
6
6
  const MAX_V2_SMALL_POST_BYTES = 4 * 1024;
7
+ /**
8
+ * Settings POST tiers (B2-1), matching the dashboard's own route caps so a
9
+ * body the gateway admits is never rejected downstream: a save may carry a
10
+ * WebAuthn assertion (clientDataJSON + authenticatorData + signature, base64)
11
+ * next to up to 64 ops, so it needs its own tier well above the 4 KiB small
12
+ * tier; the step-up options request carries only the intent projection.
13
+ */
14
+ const MAX_V2_SETTINGS_STEP_UP_POST_BYTES = 16 * 1024;
15
+ const MAX_V2_SETTINGS_SAVE_POST_BYTES = 64 * 1024;
7
16
  export const DEFAULT_REQUEST_TIMEOUT_MS = 30_000;
8
17
  export const DEFAULT_PING_INTERVAL_MS = 10_000;
9
18
  export const COMPANION_UNAVAILABLE = "dashboard_companion_unavailable";
@@ -35,7 +44,18 @@ export function oneHeader(request, name) {
35
44
  }
36
45
  const V2_PROGRESS_REPORT_STATUS_OVERRIDE_PATH = /^\/api\/progress-reports\/[A-Za-z0-9][A-Za-z0-9_-]{0,63}\/status-override$/;
37
46
  export function v2PostBodyLimit(path) {
47
+ // Local literals (the gateway graph must stay closed); protocol.test.ts
48
+ // pins them against the frozen settings contract constants.
49
+ if (path === "/api/settings/step-up") {
50
+ return MAX_V2_SETTINGS_STEP_UP_POST_BYTES;
51
+ }
52
+ if (path === "/api/settings/save" || path === "/api/settings/secrets/save") {
53
+ return MAX_V2_SETTINGS_SAVE_POST_BYTES;
54
+ }
55
+ // L2: assert/options carries an empty body (small tier); assert/verify
56
+ // carries a WebAuthn assertion and stays on the default large tier below.
38
57
  return path === "/api/auth/register/options"
58
+ || path === "/api/auth/register/assert/options"
39
59
  || path === "/api/auth/login/options"
40
60
  || path === "/api/auth/logout"
41
61
  || V2_PROGRESS_REPORT_STATUS_OVERRIDE_PATH.test(path)
@@ -1 +1 @@
1
- {"version":3,"file":"tunnel-http.js","sourceRoot":"","sources":["../../src/dashboard-gateway/tunnel-http.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iCAAiC,GAElC,MAAM,oCAAoC,CAAC;AAE5C,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACtD,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,GAAG,IAAI,CAAC;AAClD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,uBAAuB,GAAG,CAAC,GAAG,IAAI,CAAC;AACzC,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AACjD,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,iCAAiC,CAAC;AACvE,MAAM,CAAC,MAAM,6BAA6B,GAAG,yCAAyC,CAAC;AACvF,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEjD,MAAM,UAAU,QAAQ,CAAC,QAAwB,EAAE,MAAc,EAAE,IAAY;IAC7E,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE;QACzB,eAAe,EAAE,UAAU;QAC3B,cAAc,EAAE,2BAA2B;KAC5C,CAAC,CAAC;IACH,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC;AAED,MAAM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AC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;QAClF,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC;QACtE,GAAG,CAAC,OAAO,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAG,CAAC,CAAC,CAAC,EAAE,8BAA8B,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAClH,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC;KACjC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { DesktopProfile } from "./profile.js";
2
+ /** Whether `key` has the grammar the profile's gateway mode accepts. */
3
+ export declare function isWorkstationKeyForMode(key: string, mode: DesktopProfile["service"]["mode"]): boolean;
4
+ export interface CompanionEnvironmentInput {
5
+ readonly profile: DesktopProfile;
6
+ readonly workstationKey: string;
7
+ /** The user's home directory, resolved by the host (not taken from the ambient environment). */
8
+ readonly home: string;
9
+ readonly tmpdir: string;
10
+ readonly platform: NodeJS.Platform;
11
+ /** Source of the OS baseline only. */
12
+ readonly ambient: NodeJS.ProcessEnv;
13
+ }
14
+ /**
15
+ * The companion's complete environment. A packaged Node runtime does not get
16
+ * the SEA's protection from ambient startup options, so nothing is inherited
17
+ * wholesale: NODE_OPTIONS, NODE_PATH, dynamic-loader variables (DYLD_*,
18
+ * LD_*), proxies, and terminal configuration never reach the child. The key
19
+ * travels only here, never in argv, where other local users could read it.
20
+ */
21
+ export declare function buildCompanionEnvironment(input: CompanionEnvironmentInput): Record<string, string>;
22
+ /** Arguments for a supervised start; the listener port is ephemeral because only the gateway tunnel reaches it. */
23
+ export declare function buildCompanionArguments(profile: DesktopProfile): string[];
@@ -0,0 +1,70 @@
1
+ import { isDashboardPairingToken } from "../dashboard-pairing-token.js";
2
+ import { isDeviceApiKey } from "../dashboard-companion/config.js";
3
+ /** Windows variables Node and the OS need to start a process; nothing else is inherited. */
4
+ const WINDOWS_BASELINE = [
5
+ "SystemRoot",
6
+ "windir",
7
+ "SystemDrive",
8
+ "ProgramData",
9
+ "APPDATA",
10
+ "LOCALAPPDATA",
11
+ "USERPROFILE",
12
+ "TEMP",
13
+ "TMP",
14
+ ];
15
+ /** Locale only: the companion spawns nothing, so no search path or tool configuration is needed. */
16
+ const POSIX_BASELINE = ["LANG", "LC_ALL", "LC_CTYPE", "TZ"];
17
+ /** Whether `key` has the grammar the profile's gateway mode accepts. */
18
+ export function isWorkstationKeyForMode(key, mode) {
19
+ return mode === "tenant" ? isDeviceApiKey(key) : isDashboardPairingToken(key);
20
+ }
21
+ /**
22
+ * The companion's complete environment. A packaged Node runtime does not get
23
+ * the SEA's protection from ambient startup options, so nothing is inherited
24
+ * wholesale: NODE_OPTIONS, NODE_PATH, dynamic-loader variables (DYLD_*,
25
+ * LD_*), proxies, and terminal configuration never reach the child. The key
26
+ * travels only here, never in argv, where other local users could read it.
27
+ */
28
+ export function buildCompanionEnvironment(input) {
29
+ const { profile } = input;
30
+ if (!isWorkstationKeyForMode(input.workstationKey, profile.service.mode)) {
31
+ throw new Error(profile.service.mode === "tenant"
32
+ ? "the workstation key must be a clxd_ API key from the ClinkX workspace screen"
33
+ : "the pairing token must be the gateway's 43-character pairing secret");
34
+ }
35
+ const env = {};
36
+ const baseline = input.platform === "win32" ? WINDOWS_BASELINE : POSIX_BASELINE;
37
+ for (const name of baseline) {
38
+ const value = input.ambient[name];
39
+ if (value !== undefined && value !== "")
40
+ env[name] = value;
41
+ }
42
+ if (input.platform !== "win32")
43
+ env["PATH"] = "/usr/bin:/bin";
44
+ env["HOME"] = input.home;
45
+ if (input.platform === "win32")
46
+ env["USERPROFILE"] = input.home;
47
+ else
48
+ env["TMPDIR"] = input.tmpdir;
49
+ Object.assign(env, {
50
+ CLINKX_WORKFLOWS_DASHBOARD_AUTH_MODE: "passkey",
51
+ CLINKX_WORKFLOWS_DASHBOARD_PUBLIC_API_ORIGIN: profile.service.origin,
52
+ CLINKX_WORKFLOWS_DASHBOARD_UI_ORIGIN: profile.service.origin,
53
+ CLINKX_DASHBOARD_GATEWAY_URL: profile.service.gatewayUrl,
54
+ CLINKX_DASHBOARD_GATEWAY_TOKEN: input.workstationKey,
55
+ CLINKX_WORKFLOWS_STATE_DIR: profile.roots.state,
56
+ CLINKX_CONTEXT_BUILDER_RUNS_DIR: profile.roots.contextRuns,
57
+ CLINKX_WORKFLOWS_WORKSPACE_ROOT: profile.roots.workspace,
58
+ CLINKX_SETTINGS_DIR: profile.roots.settings,
59
+ CLINKX_WORKFLOWS_DASHBOARD_CREDENTIAL_DIR: profile.roots.credentials,
60
+ CLINKX_WORKFLOWS_PROGRESS_REPORT_OVERRIDE_DIR: profile.roots.binding,
61
+ });
62
+ if (profile.roots.adapters !== undefined)
63
+ env["CLINKX_CONFIG_PATH"] = profile.roots.adapters;
64
+ return env;
65
+ }
66
+ /** Arguments for a supervised start; the listener port is ephemeral because only the gateway tunnel reaches it. */
67
+ export function buildCompanionArguments(profile) {
68
+ return ["--host-managed", "--port", "0", "--credential-expectation", profile.credentialExpectation];
69
+ }
70
+ //# sourceMappingURL=child-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"child-env.js","sourceRoot":"","sources":["../../src/desktop-host/child-env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGlE,4FAA4F;AAC5F,MAAM,gBAAgB,GAAG;IACvB,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,aAAa;IACb,SAAS;IACT,cAAc;IACd,aAAa;IACb,MAAM;IACN,KAAK;CACG,CAAC;AAEX,oGAAoG;AACpG,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,I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