@north-light/crouter 0.3.300 → 0.3.302

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 (51) hide show
  1. package/dist/api/dto/reports.d.ts +8 -8
  2. package/dist/clients/attach/session/profile-files.d.ts +6 -3
  3. package/dist/clients/attach/session/profile-files.js +39 -10
  4. package/dist/clients/attach/viewer.js +663 -663
  5. package/dist/commands/memory/__tests__/command-selector-and-mutation-guards.test.js +30 -1
  6. package/dist/commands/memory/read.js +12 -14
  7. package/dist/commands/node/create.js +1 -1
  8. package/dist/commands/node/lifecycle.js +36 -8
  9. package/dist/commands/push.js +4 -4
  10. package/dist/core/__tests__/human-action-delivery.test.js +13 -11
  11. package/dist/core/__tests__/integration/revive.test.js +3 -3
  12. package/dist/core/__tests__/node-outcome.test.js +1 -6
  13. package/dist/core/__tests__/seam/dormancy-release.test.js +42 -0
  14. package/dist/core/__tests__/stop-guard.test.js +64 -0
  15. package/dist/core/bash-jobs.d.ts +22 -0
  16. package/dist/core/bash-jobs.js +38 -1
  17. package/dist/core/canvas/crons.d.ts +20 -4
  18. package/dist/core/canvas/crons.js +54 -7
  19. package/dist/core/canvas/delivery-contract.d.ts +19 -0
  20. package/dist/core/canvas/delivery-contract.js +8 -0
  21. package/dist/core/canvas/human-deliveries.d.ts +3 -17
  22. package/dist/core/canvas/node-outcome-deliveries.d.ts +3 -19
  23. package/dist/core/canvas/node-outcome-deliveries.js +0 -4
  24. package/dist/core/keybindings/catalog.js +1 -1
  25. package/dist/core/memory-resolver.d.ts +3 -1
  26. package/dist/core/memory-resolver.js +3 -3
  27. package/dist/core/nested-stores.d.ts +1 -1
  28. package/dist/core/nested-stores.js +3 -3
  29. package/dist/core/runtime/bearings-render.js +1 -1
  30. package/dist/core/runtime/close.js +8 -6
  31. package/dist/core/runtime/stop-guard.js +6 -6
  32. package/dist/core/worktree.js +3 -6
  33. package/dist/daemon/__tests__/node-outcome-delivery.test.js +3 -2
  34. package/dist/daemon/api/__tests__/seam/leaf-api-parity.test.js +21 -11
  35. package/dist/daemon/api/handlers/reports.js +1 -1
  36. package/dist/daemon/api/map.d.ts +1 -1
  37. package/dist/daemon/api/map.js +2 -2
  38. package/dist/daemon/cron/sinks.d.ts +1 -1
  39. package/dist/daemon/cron/sinks.js +2 -2
  40. package/dist/daemon/delivery/run-delivery.d.ts +25 -0
  41. package/dist/daemon/delivery/run-delivery.js +164 -0
  42. package/dist/daemon/human/deliver-action.d.ts +1 -14
  43. package/dist/daemon/human/deliver-action.js +5 -165
  44. package/dist/daemon/node-outcome/deliver-outcome.d.ts +1 -12
  45. package/dist/daemon/node-outcome/deliver-outcome.js +6 -152
  46. package/dist/daemon/reconcilers/live-obligation.js +2 -2
  47. package/dist/pi-extensions/canvas-bash-valve.js +7 -10
  48. package/package.json +1 -1
  49. package/runtime.lock.json +5 -5
  50. package/dist/daemon/cron-sink.d.ts +0 -26
  51. package/dist/daemon/cron-sink.js +0 -43
@@ -1,26 +0,0 @@
1
- /** The one decoder for a cron's stored sink JSON.
2
- *
3
- * A sink is armed as a CLI spec string (`node:<id>` | `spawn:<kind>` |
4
- * `human`), validated and encoded to JSON once at arm time
5
- * (`api/handlers/crons.ts`), and thereafter read back in exactly two places:
6
- * the runner, which dispatches a delivery on it, and the DTO mapper, which
7
- * renders it. Both go through here so the stored shape has a single reader.
8
- *
9
- * A malformed stored value decodes as no-sink rather than throwing: a cron
10
- * that cannot deliver must still run, and must still list.
11
- */
12
- export type ParsedSink = {
13
- kind: 'node';
14
- node: string;
15
- } | {
16
- kind: 'spawn';
17
- spawn: string;
18
- } | {
19
- kind: 'human';
20
- } | null;
21
- /** Stored JSON → typed shape. `{}`, malformed JSON, and an unrecognised shape
22
- * all read as null (no sink). */
23
- export declare function parseSink(sinkJson: string): ParsedSink;
24
- /** Stored JSON → the display spec the CLI armed with, or null when the cron
25
- * never delivers. The exact inverse of the arm-time encoding. */
26
- export declare function sinkDisplay(sinkJson: string): string | null;
@@ -1,43 +0,0 @@
1
- /** The one decoder for a cron's stored sink JSON.
2
- *
3
- * A sink is armed as a CLI spec string (`node:<id>` | `spawn:<kind>` |
4
- * `human`), validated and encoded to JSON once at arm time
5
- * (`api/handlers/crons.ts`), and thereafter read back in exactly two places:
6
- * the runner, which dispatches a delivery on it, and the DTO mapper, which
7
- * renders it. Both go through here so the stored shape has a single reader.
8
- *
9
- * A malformed stored value decodes as no-sink rather than throwing: a cron
10
- * that cannot deliver must still run, and must still list.
11
- */
12
- /** Stored JSON → typed shape. `{}`, malformed JSON, and an unrecognised shape
13
- * all read as null (no sink). */
14
- export function parseSink(sinkJson) {
15
- try {
16
- const s = JSON.parse(sinkJson);
17
- if (typeof s['node'] === 'string')
18
- return { kind: 'node', node: s['node'] };
19
- if (typeof s['spawn'] === 'string')
20
- return { kind: 'spawn', spawn: s['spawn'] };
21
- if (s['human'] === true)
22
- return { kind: 'human' };
23
- }
24
- catch {
25
- // malformed stored sink reads as no-sink; callers report it in their own terms
26
- }
27
- return null;
28
- }
29
- /** Stored JSON → the display spec the CLI armed with, or null when the cron
30
- * never delivers. The exact inverse of the arm-time encoding. */
31
- export function sinkDisplay(sinkJson) {
32
- const sink = parseSink(sinkJson);
33
- if (sink === null)
34
- return null;
35
- switch (sink.kind) {
36
- case 'node':
37
- return `node:${sink.node}`;
38
- case 'spawn':
39
- return `spawn:${sink.spawn}`;
40
- case 'human':
41
- return 'human';
42
- }
43
- }