@xmoon76/dsh-pi-tui 0.5.4 → 0.5.6

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 (50) hide show
  1. package/README.en.md +46 -42
  2. package/README.md +46 -27
  3. package/cordis.patch.yml +77 -7
  4. package/dist/bootstrap-DQ4YPL-7.mjs +113583 -0
  5. package/dist/builtins.mjs +3 -9
  6. package/dist/{runtime-vc4mdr-R.mjs → client-bootstrap-Cr1JCaF5.mjs} +3670 -2277
  7. package/dist/disposal-BYBbEpVY.mjs +54 -0
  8. package/dist/dist-CIsR7cz4.mjs +15717 -0
  9. package/dist/{entry-control-DvSrndWd.mjs → entry-control-DnduyDiw.mjs} +12 -31
  10. package/dist/{extensions-CcuMY4n2.mjs → extensions-Bp0L37lP.mjs} +1239 -271
  11. package/dist/extensions.mjs +1 -1
  12. package/dist/host-bootstrap-DilsvA6f.mjs +281 -0
  13. package/dist/host-foundation-probe--5jtvHVe.mjs +413 -0
  14. package/dist/host-runtime.d.mts +30 -0
  15. package/dist/host-runtime.mjs +1317 -0
  16. package/dist/index.d.mts +19 -18
  17. package/dist/index.mjs +18410 -8836
  18. package/dist/local-client.mjs +2027 -187
  19. package/dist/local-discovery-C9VMjc0K.mjs +759 -0
  20. package/dist/local-discovery-CDaQHA_R.mjs +2 -0
  21. package/dist/local-host.mjs +1088 -87
  22. package/dist/local-transport-BVwFYq_Y.mjs +513 -0
  23. package/dist/{context-summary-DAisTA_7.mjs → pasted-path-range-CMnxuGPx.mjs} +7613 -216
  24. package/dist/pasted-path-range-r6qzV_tC.mjs +17510 -0
  25. package/dist/performance-host.d.mts +2 -2
  26. package/dist/performance-host.mjs +258 -1
  27. package/dist/pi-tui-remote-contribution-B0EQsP0N.mjs +85 -0
  28. package/dist/pi-tui-terminal-progress-contract-CdBH9j78.mjs +70 -0
  29. package/dist/pi-tui-terminal-progress-contract-MLXZ-i3t.mjs +905 -0
  30. package/dist/pi-tui-web-access-contract-BN8Cc_Ho.mjs +118 -0
  31. package/dist/{runtime-status-0lp9CM0V.mjs → runtime-status-Cj1nFOdS.mjs} +72 -214
  32. package/dist/session-BKGXyh80.mjs +15794 -0
  33. package/dist/{session-tdJHLnJR.mjs → session-CPt_U8_f.mjs} +10707 -3657
  34. package/dist/{startup-JaVZoTIl.mjs → startup-7BYWuvBU.mjs} +124 -8
  35. package/dist/startup.d.mts +1 -1
  36. package/dist/startup.mjs +1 -1
  37. package/dist/{client-bootstrap-F5DHFI9t.mjs → terminal-progress-source-DrqQhtT8.mjs} +3653 -2969
  38. package/dist/visual-tools.d.mts +2 -2
  39. package/dist/visual-tools.mjs +26 -31
  40. package/dist/web-preferences.d.mts +29 -0
  41. package/dist/web-preferences.mjs +15 -0
  42. package/dist/web-roster-CjqnUXNk.mjs +285 -0
  43. package/generated/dsh-presets/cordis.patch.yml +5 -3
  44. package/generated/dsh-presets/ptc.patch.yml +7 -7
  45. package/generated/dsh-presets/standard.patch.yml +6 -4
  46. package/package.json +195 -172
  47. package/dist/host-bootstrap-DAgKknbY.mjs +0 -119
  48. package/dist/performance-host-CcDJjjVA.mjs +0 -266
  49. package/dist/rolldown-runtime-8H4AJuhK.mjs +0 -14
  50. package/dist/terminal-progress-source-xor3vakJ.mjs +0 -2256
@@ -0,0 +1,54 @@
1
+ //#region src/runtime/process/disposal.ts
2
+ /**
3
+ * The ONE synchronous disposal primitive (M3-6 PR3 plan D1): attempt every
4
+ * cleanup step in caller-provided order, then surface the collected failure.
5
+ *
6
+ * The helper answers exactly one question — "attempt every synchronous
7
+ * cleanup step in this order, then surface collected failure(s)" — and owns
8
+ * nothing else: no async support, no ownership state, no logging, no retries
9
+ * and no fallback. Ownership slots stay inside the owning module; every
10
+ * orchestrator (bootstrap, TuiApp, SurfaceRuntime, the per-owner dispose
11
+ * methods) keeps its own order and passes it here.
12
+ *
13
+ * Failure contract:
14
+ * - zero failures: return;
15
+ * - exactly one failure: rethrow the EXACT original thrown value;
16
+ * - two or more failures: throw `AggregateError(failures, label)`.
17
+ *
18
+ * A throwing step never truncates its siblings.
19
+ * @module @xmoon76/dsh-pi-tui/runtime/process/disposal
20
+ */
21
+ /** Attempt every synchronous disposal step in order, surfacing failures. */
22
+ function runSyncDisposalSteps(label, steps) {
23
+ const failures = [];
24
+ for (const step of steps) try {
25
+ step();
26
+ } catch (error) {
27
+ failures.push(error);
28
+ }
29
+ if (failures.length === 1) throw failures[0];
30
+ if (failures.length > 1) throw new AggregateError(failures, label);
31
+ }
32
+ /**
33
+ * The same non-truncating attempt, for a batch that rolls back a PRIMARY failure:
34
+ * every rollback step is attempted in caller-provided order, then the PRIMARY
35
+ * value is thrown — aggregated by IDENTITY with the collected rollback failures,
36
+ * the primary first and the rollback values FLAT, in step order
37
+ * (`AggregateError([primary, r1, r2])`). One rollback obligation must never be
38
+ * skipped because an earlier one threw, and every value a step threw stays ONE
39
+ * entry — a user `AggregateError` is never flattened into its `.errors`. The step
40
+ * loop is inlined (not delegated to {@link runSyncDisposalSteps}, which would
41
+ * nest its own aggregate one level down).
42
+ */
43
+ function runSyncDisposalStepsWithPrimary(label, primary, steps) {
44
+ const failures = [];
45
+ for (const step of steps) try {
46
+ step();
47
+ } catch (error) {
48
+ failures.push(error);
49
+ }
50
+ if (failures.length === 0) throw primary;
51
+ throw new AggregateError([primary, ...failures], label);
52
+ }
53
+ //#endregion
54
+ export { runSyncDisposalStepsWithPrimary as n, runSyncDisposalSteps as t };