@puddle-code/cli 0.4.8 → 0.4.10

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 (112) hide show
  1. package/CHANGELOG.md +58 -8
  2. package/README.md +19 -4
  3. package/dist/host-control.mjs +86 -21
  4. package/dist/index.js +652 -147
  5. package/dist/install.sh +28 -0
  6. package/dist/public/assets/App-DZPlytdY.js +63 -0
  7. package/dist/public/assets/{CompilationCommandForm-Csg3VkC6.js → CompilationCommandForm-B-CEimt-.js} +1 -1
  8. package/dist/public/assets/Dashboard-D0qSbNc_.js +1 -0
  9. package/dist/public/assets/EditorTabClose-DoclvCbs.js +1 -0
  10. package/dist/public/assets/FindWidget-CNxi2b9L.js +1 -0
  11. package/dist/public/assets/LazyTerminal-BffV6rzu.js +2 -0
  12. package/dist/public/assets/{ModelRefcount-CHKuXiJY.js → ModelRefcount-BeuZdwWp.js} +1 -1
  13. package/dist/public/assets/{NotebookWidget-CCRsiBIE.js → NotebookWidget-CpzrWj4z.js} +2 -2
  14. package/dist/public/assets/PaneEditorBody-C5SVOXKv.js +284 -0
  15. package/dist/public/assets/{PdfViewer-BX025YLW.js → PdfViewer-BH-FXEVV.js} +1 -1
  16. package/dist/public/assets/{ReleaseNotesDialog-CbFYKoYM.js → ReleaseNotesDialog-CN7W2Evg.js} +1 -1
  17. package/dist/public/assets/SettingsDialog-D5CH5-vH.js +8 -0
  18. package/dist/public/assets/Terminal-D7rw4Zu8.js +67 -0
  19. package/dist/public/assets/{Workspace-Bf0VMnaa.css → Workspace-CuAYZ1-B.css} +1 -1
  20. package/dist/public/assets/Workspace-Cvhx3oi9.js +20 -0
  21. package/dist/public/assets/{api-BOuyloUi.js → api-CULxlzTe.js} +1 -1
  22. package/dist/public/assets/archive-i9DnVa-v.js +1 -0
  23. package/dist/public/assets/{auth-olLlgxc3.js → auth-C3ruG3fE.js} +1 -1
  24. package/dist/public/assets/{buffer-store-DIOiWz9q.js → buffer-store-Bh2IilxW.js} +3 -3
  25. package/dist/public/assets/button-C-dovHYo.js +1 -0
  26. package/dist/public/assets/client-settings-Cy225e3b.js +1 -0
  27. package/dist/public/assets/command-klU_3huY.js +1 -0
  28. package/dist/public/assets/{context-CSOKgBuW.js → context-D1MuDP6X.js} +1 -1
  29. package/dist/public/assets/control-tray-CG26TqqQ.css +1 -0
  30. package/dist/public/assets/control-tray-c9uXOo-i.js +1 -0
  31. package/dist/public/assets/{cssMode-CSjHtANE.js → cssMode-C63oO3vc.js} +1 -1
  32. package/dist/public/assets/dialog-B0poBDCr.js +41 -0
  33. package/dist/public/assets/dist-C4YjL9GW.js +1 -0
  34. package/dist/public/assets/{dist-Dge3wHdO.js → dist-DDTfSNTu.js} +1 -1
  35. package/dist/public/assets/dist-Duc5nm48.js +1 -0
  36. package/dist/public/assets/{editor.api2-4X9Vh9Zw.js → editor.api2-DTL_SiN1.js} +2 -2
  37. package/dist/public/assets/errors-efDAjyqa.js +1 -0
  38. package/dist/public/assets/expanding-content-Bens1wCS.js +1 -0
  39. package/dist/public/assets/forward-link-DWN_hZ7A.js +1 -0
  40. package/dist/public/assets/{freemarker2-DsOTa0Uq.js → freemarker2-DKWtaCtp.js} +1 -1
  41. package/dist/public/assets/{handlebars-DGS-lUwt.js → handlebars-uU1ujPOt.js} +1 -1
  42. package/dist/public/assets/{html-eVYoRhea.js → html-CrP_wDJ5.js} +1 -1
  43. package/dist/public/assets/{htmlMode-CIHMS93l.js → htmlMode-lNJ18wA0.js} +1 -1
  44. package/dist/public/assets/index-CHGSBAX2.css +2 -0
  45. package/dist/public/assets/index-OKzoyhKK.js +10 -0
  46. package/dist/public/assets/{javascript-Cq9FwqGi.js → javascript-WHxEzdgn.js} +1 -1
  47. package/dist/public/assets/{jsonMode-BijgXT6I.js → jsonMode-xHnT5kRj.js} +1 -1
  48. package/dist/public/assets/{liquid-BcLxSFu3.js → liquid-B1ddyofJ.js} +1 -1
  49. package/dist/public/assets/{lspLanguageFeatures-x2nWJpem.js → lspLanguageFeatures-CCO_e4_t.js} +1 -1
  50. package/dist/public/assets/markdown-mermaid-TizVRNLQ.js +2 -0
  51. package/dist/public/assets/{mdx-BDgbCiou.js → mdx-m1X3FtyX.js} +1 -1
  52. package/dist/public/assets/media-refresh-store-odkzJbkh.js +1 -0
  53. package/dist/public/assets/{monaco.contribution-C0TYpF88.js → monaco.contribution-BXkMDWX9.js} +2 -2
  54. package/dist/public/assets/motion-CxPWS8Fa.js +1 -0
  55. package/dist/public/assets/notification-delivery-BHHCcyI1.js +1 -0
  56. package/dist/public/assets/notification-delivery-BZzMYzIP.css +1 -0
  57. package/dist/public/assets/popover-Cv4S_Eut.js +1 -0
  58. package/dist/public/assets/{protocol-support-BApsXw77.js → protocol-support-BwRR1kRO.js} +1 -1
  59. package/dist/public/assets/{python-D5mUty3a.js → python-CRTN4ovU.js} +1 -1
  60. package/dist/public/assets/{razor-DAAn8j2s.js → razor-Cj7Cr6Fr.js} +1 -1
  61. package/dist/public/assets/{scroll-restoration-CwXbvZvT.js → scroll-restoration-wdDB8mmu.js} +1 -1
  62. package/dist/public/assets/select-C0AnT3e9.js +1 -0
  63. package/dist/public/assets/{selection-actions-Cm0Oytya.js → selection-actions-gU_r-7v_.js} +1 -1
  64. package/dist/public/assets/session-order-rnLHD6HV.js +1 -0
  65. package/dist/public/assets/switch-DllF_QQT.js +1 -0
  66. package/dist/public/assets/theme-swfNLod9.js +1 -0
  67. package/dist/public/assets/{tsMode-B7q3gz7a.js → tsMode-D0nEO9DL.js} +1 -1
  68. package/dist/public/assets/{typescript-DvKdOnR-.js → typescript-CQjjq4UE.js} +1 -1
  69. package/dist/public/assets/use-ui-state-2r7YwqCy.js +1 -0
  70. package/dist/public/assets/{view-state-store-Cy9sQJoZ.js → view-state-store-DVvLMbeY.js} +1 -1
  71. package/dist/public/assets/whole-word-BJjKpISQ.js +1 -0
  72. package/dist/public/assets/{workers-Ck67TJT4.js → workers-m2qsiPbB.js} +1 -1
  73. package/dist/public/assets/ws-B_QsPbsD.js +1 -0
  74. package/dist/public/assets/{xml-DDMTG7kD.js → xml-Ci2P6_gm.js} +1 -1
  75. package/dist/public/assets/{yaml-hCGJvPOb.js → yaml-76T3bIWj.js} +1 -1
  76. package/dist/public/index.html +5 -4
  77. package/dist/pudl.js +129 -79
  78. package/package.json +1 -1
  79. package/dist/public/assets/App-D-hMqX7b.js +0 -13
  80. package/dist/public/assets/Dashboard-C0AvtM5m.js +0 -1
  81. package/dist/public/assets/EditorTabClose-QgdaqA1X.js +0 -1
  82. package/dist/public/assets/FindWidget-DG1YP6Zx.js +0 -1
  83. package/dist/public/assets/LazyTerminal-Dp2CN0Y8.js +0 -2
  84. package/dist/public/assets/NewProjectDialog-DMixZDC_.js +0 -1
  85. package/dist/public/assets/PaneEditorBody-DD8UshBi.js +0 -284
  86. package/dist/public/assets/SettingsDialog-DgMm212x.js +0 -8
  87. package/dist/public/assets/Terminal-CYeh8_uU.js +0 -66
  88. package/dist/public/assets/Workspace-CrZkK55U.js +0 -20
  89. package/dist/public/assets/button-C_Rvtcwg.js +0 -1
  90. package/dist/public/assets/chevron-right-BEy-IXEZ.js +0 -1
  91. package/dist/public/assets/client-settings-DhfHheKR.js +0 -1
  92. package/dist/public/assets/command-BV8ZEhQz.js +0 -1
  93. package/dist/public/assets/context-menu-D3ZhKA9s.js +0 -1
  94. package/dist/public/assets/control-tray-CdoVaVhT.js +0 -1
  95. package/dist/public/assets/control-tray-DE2RhHP3.css +0 -1
  96. package/dist/public/assets/dialog-D-Axqpzg.js +0 -41
  97. package/dist/public/assets/dist-BmSuHjIq.js +0 -1
  98. package/dist/public/assets/dist-Cq-O0n8n.js +0 -1
  99. package/dist/public/assets/forward-link-DMvLf0Xw.js +0 -1
  100. package/dist/public/assets/hotkeys-Cu0t6sbz.js +0 -1
  101. package/dist/public/assets/index-BqOVeoIr.js +0 -10
  102. package/dist/public/assets/index-LpAqnBR3.css +0 -2
  103. package/dist/public/assets/markdown-mermaid-SyDYdSZz.js +0 -2
  104. package/dist/public/assets/media-refresh-store-NSkvkBxN.js +0 -1
  105. package/dist/public/assets/motion-OSLfKoC0.js +0 -1
  106. package/dist/public/assets/notification-delivery-BBt_CJ19.js +0 -1
  107. package/dist/public/assets/popover-D-jcaKGN.js +0 -1
  108. package/dist/public/assets/select-p5KTVHbg.js +0 -1
  109. package/dist/public/assets/session-order-2oedrwDu.js +0 -1
  110. package/dist/public/assets/switch-OMx-_DY7.js +0 -1
  111. package/dist/public/assets/use-ui-state-DdnTFosh.js +0 -1
  112. package/dist/public/assets/ws-Dgc69_w8.js +0 -1
package/dist/index.js CHANGED
@@ -40,11 +40,20 @@ var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__
40
40
  mod
41
41
  ));
42
42
 
43
+ // <define:__PUDDLE_COMPONENT_VERSIONS__>
44
+ var define_PUDDLE_COMPONENT_VERSIONS_default;
45
+ var init_define_PUDDLE_COMPONENT_VERSIONS = __esm({
46
+ "<define:__PUDDLE_COMPONENT_VERSIONS__>"() {
47
+ define_PUDDLE_COMPONENT_VERSIONS_default = { cockpit: "0.4.10", daemon: "0.4.10", runtime: "0.4.10" };
48
+ }
49
+ });
50
+
43
51
  // src/lib/types.ts
44
52
  var silentLogger, CliError;
45
53
  var init_types = __esm({
46
54
  "src/lib/types.ts"() {
47
55
  "use strict";
56
+ init_define_PUDDLE_COMPONENT_VERSIONS();
48
57
  silentLogger = { info() {
49
58
  }, warn() {
50
59
  } };
@@ -63,6 +72,7 @@ var init_types = __esm({
63
72
  var require_constants = __commonJS({
64
73
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js"(exports, module) {
65
74
  "use strict";
75
+ init_define_PUDDLE_COMPONENT_VERSIONS();
66
76
  var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
67
77
  var hasBlob = typeof Blob !== "undefined";
68
78
  if (hasBlob) BINARY_TYPES.push("blob");
@@ -86,6 +96,7 @@ var require_constants = __commonJS({
86
96
  var require_buffer_util = __commonJS({
87
97
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js"(exports, module) {
88
98
  "use strict";
99
+ init_define_PUDDLE_COMPONENT_VERSIONS();
89
100
  var { EMPTY_BUFFER } = require_constants();
90
101
  var FastBuffer = Buffer[Symbol.species];
91
102
  function concat(list, totalLength) {
@@ -161,6 +172,7 @@ var require_buffer_util = __commonJS({
161
172
  var require_limiter = __commonJS({
162
173
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js"(exports, module) {
163
174
  "use strict";
175
+ init_define_PUDDLE_COMPONENT_VERSIONS();
164
176
  var kDone = Symbol("kDone");
165
177
  var kRun = Symbol("kRun");
166
178
  var Limiter = class {
@@ -211,6 +223,7 @@ var require_limiter = __commonJS({
211
223
  var require_permessage_deflate = __commonJS({
212
224
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
213
225
  "use strict";
226
+ init_define_PUDDLE_COMPONENT_VERSIONS();
214
227
  var zlib = __require("zlib");
215
228
  var bufferUtil = require_buffer_util();
216
229
  var Limiter = require_limiter();
@@ -594,6 +607,7 @@ var require_permessage_deflate = __commonJS({
594
607
  var require_validation = __commonJS({
595
608
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js"(exports, module) {
596
609
  "use strict";
610
+ init_define_PUDDLE_COMPONENT_VERSIONS();
597
611
  var { isUtf8 } = __require("buffer");
598
612
  var { hasBlob } = require_constants();
599
613
  var tokenChars = [
@@ -795,6 +809,7 @@ var require_validation = __commonJS({
795
809
  var require_receiver = __commonJS({
796
810
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js"(exports, module) {
797
811
  "use strict";
812
+ init_define_PUDDLE_COMPONENT_VERSIONS();
798
813
  var { Writable: Writable2 } = __require("stream");
799
814
  var PerMessageDeflate2 = require_permessage_deflate();
800
815
  var {
@@ -1427,6 +1442,7 @@ var require_receiver = __commonJS({
1427
1442
  var require_sender = __commonJS({
1428
1443
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js"(exports, module) {
1429
1444
  "use strict";
1445
+ init_define_PUDDLE_COMPONENT_VERSIONS();
1430
1446
  var { Duplex: Duplex2 } = __require("stream");
1431
1447
  var { randomFillSync } = __require("crypto");
1432
1448
  var {
@@ -1920,6 +1936,7 @@ var require_sender = __commonJS({
1920
1936
  var require_event_target = __commonJS({
1921
1937
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js"(exports, module) {
1922
1938
  "use strict";
1939
+ init_define_PUDDLE_COMPONENT_VERSIONS();
1923
1940
  var { kForOnEventAttribute, kListener } = require_constants();
1924
1941
  var kCode = Symbol("kCode");
1925
1942
  var kData = Symbol("kData");
@@ -2149,6 +2166,7 @@ var require_event_target = __commonJS({
2149
2166
  var require_extension = __commonJS({
2150
2167
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js"(exports, module) {
2151
2168
  "use strict";
2169
+ init_define_PUDDLE_COMPONENT_VERSIONS();
2152
2170
  var { tokenChars } = require_validation();
2153
2171
  function push(dest, name, elem) {
2154
2172
  if (dest[name] === void 0) dest[name] = [elem];
@@ -2302,6 +2320,7 @@ var require_extension = __commonJS({
2302
2320
  var require_websocket = __commonJS({
2303
2321
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js"(exports, module) {
2304
2322
  "use strict";
2323
+ init_define_PUDDLE_COMPONENT_VERSIONS();
2305
2324
  var EventEmitter = __require("events");
2306
2325
  var https = __require("https");
2307
2326
  var http = __require("http");
@@ -3198,6 +3217,7 @@ var require_websocket = __commonJS({
3198
3217
  var require_stream = __commonJS({
3199
3218
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js"(exports, module) {
3200
3219
  "use strict";
3220
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3201
3221
  var WebSocket2 = require_websocket();
3202
3222
  var { Duplex: Duplex2 } = __require("stream");
3203
3223
  function emitClose(stream) {
@@ -3296,6 +3316,7 @@ var require_stream = __commonJS({
3296
3316
  var require_subprotocol = __commonJS({
3297
3317
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js"(exports, module) {
3298
3318
  "use strict";
3319
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3299
3320
  var { tokenChars } = require_validation();
3300
3321
  function parse3(header) {
3301
3322
  const protocols = /* @__PURE__ */ new Set();
@@ -3341,6 +3362,7 @@ var require_subprotocol = __commonJS({
3341
3362
  var require_websocket_server = __commonJS({
3342
3363
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js"(exports, module) {
3343
3364
  "use strict";
3365
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3344
3366
  var EventEmitter = __require("events");
3345
3367
  var http = __require("http");
3346
3368
  var { Duplex: Duplex2 } = __require("stream");
@@ -3742,6 +3764,7 @@ var require_websocket_server = __commonJS({
3742
3764
  var import_stream, import_extension, import_permessage_deflate, import_receiver, import_sender, import_subprotocol, import_websocket, import_websocket_server, wrapper_default;
3743
3765
  var init_wrapper = __esm({
3744
3766
  "../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/wrapper.mjs"() {
3767
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3745
3768
  import_stream = __toESM(require_stream(), 1);
3746
3769
  import_extension = __toESM(require_extension(), 1);
3747
3770
  import_permessage_deflate = __toESM(require_permessage_deflate(), 1);
@@ -3812,6 +3835,7 @@ function connectGateway(port, authority) {
3812
3835
  var init_ws_client = __esm({
3813
3836
  "src/lib/transport/ws-client.ts"() {
3814
3837
  "use strict";
3838
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3815
3839
  init_wrapper();
3816
3840
  init_types();
3817
3841
  }
@@ -3911,21 +3935,36 @@ var DETACH;
3911
3935
  var init_attach = __esm({
3912
3936
  "src/lib/connection/attach.ts"() {
3913
3937
  "use strict";
3938
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3914
3939
  init_ws_client();
3915
3940
  init_types();
3916
3941
  DETACH = 29;
3917
3942
  }
3918
3943
  });
3919
3944
 
3945
+ // src/index.ts
3946
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3947
+
3920
3948
  // src/cli/args.ts
3949
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3921
3950
  init_types();
3922
3951
 
3952
+ // ../shared/src/index.ts
3953
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3954
+
3923
3955
  // ../shared/src/protocol.ts
3924
- var PROTOCOL_VERSION = { major: 26, minor: 1 };
3956
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3957
+ var PROTOCOL_VERSION = { major: 26, minor: 6 };
3925
3958
  function supportsApplicationFeature(peer, introduced, client = PROTOCOL_VERSION) {
3926
3959
  return peer?.major === client.major && (peer.major > introduced.major || peer.major === introduced.major && peer.minor >= introduced.minor);
3927
3960
  }
3928
3961
 
3962
+ // ../shared/src/notifications.ts
3963
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3964
+
3965
+ // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/index.js
3966
+ init_define_PUDDLE_COMPONENT_VERSIONS();
3967
+
3929
3968
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
3930
3969
  var external_exports = {};
3931
3970
  __export(external_exports, {
@@ -4168,6 +4207,7 @@ __export(external_exports, {
4168
4207
  xid: () => xid2,
4169
4208
  xor: () => xor
4170
4209
  });
4210
+ init_define_PUDDLE_COMPONENT_VERSIONS();
4171
4211
 
4172
4212
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/index.js
4173
4213
  var core_exports2 = {};
@@ -4447,8 +4487,10 @@ __export(core_exports2, {
4447
4487
  util: () => util_exports,
4448
4488
  version: () => version
4449
4489
  });
4490
+ init_define_PUDDLE_COMPONENT_VERSIONS();
4450
4491
 
4451
4492
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
4493
+ init_define_PUDDLE_COMPONENT_VERSIONS();
4452
4494
  var _a;
4453
4495
  var NEVER = /* @__PURE__ */ Object.freeze({
4454
4496
  status: "aborted"
@@ -4525,6 +4567,12 @@ function config(newConfig) {
4525
4567
  return globalConfig;
4526
4568
  }
4527
4569
 
4570
+ // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
4571
+ init_define_PUDDLE_COMPONENT_VERSIONS();
4572
+
4573
+ // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
4574
+ init_define_PUDDLE_COMPONENT_VERSIONS();
4575
+
4528
4576
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
4529
4577
  var util_exports = {};
4530
4578
  __export(util_exports, {
@@ -4592,6 +4640,7 @@ __export(util_exports, {
4592
4640
  uint8ArrayToHex: () => uint8ArrayToHex,
4593
4641
  unwrapMessage: () => unwrapMessage
4594
4642
  });
4643
+ init_define_PUDDLE_COMPONENT_VERSIONS();
4595
4644
  function assertEqual(val) {
4596
4645
  return val;
4597
4646
  }
@@ -5448,6 +5497,12 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
5448
5497
  };
5449
5498
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
5450
5499
 
5500
+ // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
5501
+ init_define_PUDDLE_COMPONENT_VERSIONS();
5502
+
5503
+ // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
5504
+ init_define_PUDDLE_COMPONENT_VERSIONS();
5505
+
5451
5506
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
5452
5507
  var regexes_exports = {};
5453
5508
  __export(regexes_exports, {
@@ -5511,6 +5566,7 @@ __export(regexes_exports, {
5511
5566
  uuid7: () => uuid7,
5512
5567
  xid: () => xid
5513
5568
  });
5569
+ init_define_PUDDLE_COMPONENT_VERSIONS();
5514
5570
  var cuid = /^[cC][0-9a-z]{6,}$/;
5515
5571
  var cuid2 = /^[0-9a-z]+$/;
5516
5572
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
@@ -6156,6 +6212,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
6156
6212
  });
6157
6213
 
6158
6214
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.js
6215
+ init_define_PUDDLE_COMPONENT_VERSIONS();
6159
6216
  var Doc = class {
6160
6217
  constructor(args = []) {
6161
6218
  this.content = [];
@@ -6192,6 +6249,7 @@ var Doc = class {
6192
6249
  };
6193
6250
 
6194
6251
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
6252
+ init_define_PUDDLE_COMPONENT_VERSIONS();
6195
6253
  var version = {
6196
6254
  major: 4,
6197
6255
  minor: 4,
@@ -8347,8 +8405,10 @@ __export(locales_exports, {
8347
8405
  zhCN: () => zh_CN_default,
8348
8406
  zhTW: () => zh_TW_default
8349
8407
  });
8408
+ init_define_PUDDLE_COMPONENT_VERSIONS();
8350
8409
 
8351
8410
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ar.js
8411
+ init_define_PUDDLE_COMPONENT_VERSIONS();
8352
8412
  var error = () => {
8353
8413
  const Sizable = {
8354
8414
  string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
@@ -8456,6 +8516,7 @@ function ar_default() {
8456
8516
  }
8457
8517
 
8458
8518
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/az.js
8519
+ init_define_PUDDLE_COMPONENT_VERSIONS();
8459
8520
  var error2 = () => {
8460
8521
  const Sizable = {
8461
8522
  string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
@@ -8562,6 +8623,7 @@ function az_default() {
8562
8623
  }
8563
8624
 
8564
8625
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/be.js
8626
+ init_define_PUDDLE_COMPONENT_VERSIONS();
8565
8627
  function getBelarusianPlural(count2, one, few, many) {
8566
8628
  const absCount = Math.abs(count2);
8567
8629
  const lastDigit = absCount % 10;
@@ -8719,6 +8781,7 @@ function be_default() {
8719
8781
  }
8720
8782
 
8721
8783
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/bg.js
8784
+ init_define_PUDDLE_COMPONENT_VERSIONS();
8722
8785
  var error4 = () => {
8723
8786
  const Sizable = {
8724
8787
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
@@ -8840,6 +8903,7 @@ function bg_default() {
8840
8903
  }
8841
8904
 
8842
8905
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ca.js
8906
+ init_define_PUDDLE_COMPONENT_VERSIONS();
8843
8907
  var error5 = () => {
8844
8908
  const Sizable = {
8845
8909
  string: { unit: "car\xE0cters", verb: "contenir" },
@@ -8949,6 +9013,7 @@ function ca_default() {
8949
9013
  }
8950
9014
 
8951
9015
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/cs.js
9016
+ init_define_PUDDLE_COMPONENT_VERSIONS();
8952
9017
  var error6 = () => {
8953
9018
  const Sizable = {
8954
9019
  string: { unit: "znak\u016F", verb: "m\xEDt" },
@@ -9061,6 +9126,7 @@ function cs_default() {
9061
9126
  }
9062
9127
 
9063
9128
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/da.js
9129
+ init_define_PUDDLE_COMPONENT_VERSIONS();
9064
9130
  var error7 = () => {
9065
9131
  const Sizable = {
9066
9132
  string: { unit: "tegn", verb: "havde" },
@@ -9177,6 +9243,7 @@ function da_default() {
9177
9243
  }
9178
9244
 
9179
9245
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/de.js
9246
+ init_define_PUDDLE_COMPONENT_VERSIONS();
9180
9247
  var error8 = () => {
9181
9248
  const Sizable = {
9182
9249
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -9286,6 +9353,7 @@ function de_default() {
9286
9353
  }
9287
9354
 
9288
9355
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/el.js
9356
+ init_define_PUDDLE_COMPONENT_VERSIONS();
9289
9357
  var error9 = () => {
9290
9358
  const Sizable = {
9291
9359
  string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
@@ -9396,6 +9464,7 @@ function el_default() {
9396
9464
  }
9397
9465
 
9398
9466
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/en.js
9467
+ init_define_PUDDLE_COMPONENT_VERSIONS();
9399
9468
  var error10 = () => {
9400
9469
  const Sizable = {
9401
9470
  string: { unit: "characters", verb: "to have" },
@@ -9509,6 +9578,7 @@ function en_default() {
9509
9578
  }
9510
9579
 
9511
9580
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/eo.js
9581
+ init_define_PUDDLE_COMPONENT_VERSIONS();
9512
9582
  var error11 = () => {
9513
9583
  const Sizable = {
9514
9584
  string: { unit: "karaktrojn", verb: "havi" },
@@ -9619,6 +9689,7 @@ function eo_default() {
9619
9689
  }
9620
9690
 
9621
9691
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/es.js
9692
+ init_define_PUDDLE_COMPONENT_VERSIONS();
9622
9693
  var error12 = () => {
9623
9694
  const Sizable = {
9624
9695
  string: { unit: "caracteres", verb: "tener" },
@@ -9752,6 +9823,7 @@ function es_default() {
9752
9823
  }
9753
9824
 
9754
9825
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fa.js
9826
+ init_define_PUDDLE_COMPONENT_VERSIONS();
9755
9827
  var error13 = () => {
9756
9828
  const Sizable = {
9757
9829
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -9867,6 +9939,7 @@ function fa_default() {
9867
9939
  }
9868
9940
 
9869
9941
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fi.js
9942
+ init_define_PUDDLE_COMPONENT_VERSIONS();
9870
9943
  var error14 = () => {
9871
9944
  const Sizable = {
9872
9945
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
@@ -9980,6 +10053,7 @@ function fi_default() {
9980
10053
  }
9981
10054
 
9982
10055
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr.js
10056
+ init_define_PUDDLE_COMPONENT_VERSIONS();
9983
10057
  var error15 = () => {
9984
10058
  const Sizable = {
9985
10059
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -10106,6 +10180,7 @@ function fr_default() {
10106
10180
  }
10107
10181
 
10108
10182
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.js
10183
+ init_define_PUDDLE_COMPONENT_VERSIONS();
10109
10184
  var error16 = () => {
10110
10185
  const Sizable = {
10111
10186
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -10214,6 +10289,7 @@ function fr_CA_default() {
10214
10289
  }
10215
10290
 
10216
10291
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/he.js
10292
+ init_define_PUDDLE_COMPONENT_VERSIONS();
10217
10293
  var error17 = () => {
10218
10294
  const TypeNames = {
10219
10295
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
@@ -10409,6 +10485,7 @@ function he_default() {
10409
10485
  }
10410
10486
 
10411
10487
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hr.js
10488
+ init_define_PUDDLE_COMPONENT_VERSIONS();
10412
10489
  var error18 = () => {
10413
10490
  const Sizable = {
10414
10491
  string: { unit: "znakova", verb: "imati" },
@@ -10532,6 +10609,7 @@ function hr_default() {
10532
10609
  }
10533
10610
 
10534
10611
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hu.js
10612
+ init_define_PUDDLE_COMPONENT_VERSIONS();
10535
10613
  var error19 = () => {
10536
10614
  const Sizable = {
10537
10615
  string: { unit: "karakter", verb: "legyen" },
@@ -10641,6 +10719,7 @@ function hu_default() {
10641
10719
  }
10642
10720
 
10643
10721
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hy.js
10722
+ init_define_PUDDLE_COMPONENT_VERSIONS();
10644
10723
  function getArmenianPlural(count2, one, many) {
10645
10724
  return Math.abs(count2) === 1 ? one : many;
10646
10725
  }
@@ -10789,6 +10868,7 @@ function hy_default() {
10789
10868
  }
10790
10869
 
10791
10870
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/id.js
10871
+ init_define_PUDDLE_COMPONENT_VERSIONS();
10792
10872
  var error21 = () => {
10793
10873
  const Sizable = {
10794
10874
  string: { unit: "karakter", verb: "memiliki" },
@@ -10896,6 +10976,7 @@ function id_default() {
10896
10976
  }
10897
10977
 
10898
10978
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/is.js
10979
+ init_define_PUDDLE_COMPONENT_VERSIONS();
10899
10980
  var error22 = () => {
10900
10981
  const Sizable = {
10901
10982
  string: { unit: "stafi", verb: "a\xF0 hafa" },
@@ -11006,6 +11087,7 @@ function is_default() {
11006
11087
  }
11007
11088
 
11008
11089
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/it.js
11090
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11009
11091
  var error23 = () => {
11010
11092
  const Sizable = {
11011
11093
  string: { unit: "caratteri", verb: "avere" },
@@ -11115,6 +11197,7 @@ function it_default() {
11115
11197
  }
11116
11198
 
11117
11199
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ja.js
11200
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11118
11201
  var error24 = () => {
11119
11202
  const Sizable = {
11120
11203
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
@@ -11223,6 +11306,7 @@ function ja_default() {
11223
11306
  }
11224
11307
 
11225
11308
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ka.js
11309
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11226
11310
  var error25 = () => {
11227
11311
  const Sizable = {
11228
11312
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -11335,7 +11419,11 @@ function ka_default() {
11335
11419
  };
11336
11420
  }
11337
11421
 
11422
+ // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/kh.js
11423
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11424
+
11338
11425
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/km.js
11426
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11339
11427
  var error26 = () => {
11340
11428
  const Sizable = {
11341
11429
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -11452,6 +11540,7 @@ function kh_default() {
11452
11540
  }
11453
11541
 
11454
11542
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ko.js
11543
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11455
11544
  var error27 = () => {
11456
11545
  const Sizable = {
11457
11546
  string: { unit: "\uBB38\uC790", verb: "to have" },
@@ -11564,6 +11653,7 @@ function ko_default() {
11564
11653
  }
11565
11654
 
11566
11655
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/lt.js
11656
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11567
11657
  var capitalizeFirstCharacter = (text2) => {
11568
11658
  return text2.charAt(0).toUpperCase() + text2.slice(1);
11569
11659
  };
@@ -11768,6 +11858,7 @@ function lt_default() {
11768
11858
  }
11769
11859
 
11770
11860
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/mk.js
11861
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11771
11862
  var error29 = () => {
11772
11863
  const Sizable = {
11773
11864
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -11878,6 +11969,7 @@ function mk_default() {
11878
11969
  }
11879
11970
 
11880
11971
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ms.js
11972
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11881
11973
  var error30 = () => {
11882
11974
  const Sizable = {
11883
11975
  string: { unit: "aksara", verb: "mempunyai" },
@@ -11986,6 +12078,7 @@ function ms_default() {
11986
12078
  }
11987
12079
 
11988
12080
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/nl.js
12081
+ init_define_PUDDLE_COMPONENT_VERSIONS();
11989
12082
  var error31 = () => {
11990
12083
  const Sizable = {
11991
12084
  string: { unit: "tekens", verb: "heeft" },
@@ -12097,6 +12190,7 @@ function nl_default() {
12097
12190
  }
12098
12191
 
12099
12192
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/no.js
12193
+ init_define_PUDDLE_COMPONENT_VERSIONS();
12100
12194
  var error32 = () => {
12101
12195
  const Sizable = {
12102
12196
  string: { unit: "tegn", verb: "\xE5 ha" },
@@ -12206,6 +12300,7 @@ function no_default() {
12206
12300
  }
12207
12301
 
12208
12302
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ota.js
12303
+ init_define_PUDDLE_COMPONENT_VERSIONS();
12209
12304
  var error33 = () => {
12210
12305
  const Sizable = {
12211
12306
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
@@ -12316,6 +12411,7 @@ function ota_default() {
12316
12411
  }
12317
12412
 
12318
12413
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ps.js
12414
+ init_define_PUDDLE_COMPONENT_VERSIONS();
12319
12415
  var error34 = () => {
12320
12416
  const Sizable = {
12321
12417
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
@@ -12431,6 +12527,7 @@ function ps_default() {
12431
12527
  }
12432
12528
 
12433
12529
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pl.js
12530
+ init_define_PUDDLE_COMPONENT_VERSIONS();
12434
12531
  var error35 = () => {
12435
12532
  const Sizable = {
12436
12533
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
@@ -12541,6 +12638,7 @@ function pl_default() {
12541
12638
  }
12542
12639
 
12543
12640
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pt.js
12641
+ init_define_PUDDLE_COMPONENT_VERSIONS();
12544
12642
  var error36 = () => {
12545
12643
  const Sizable = {
12546
12644
  string: { unit: "caracteres", verb: "ter" },
@@ -12650,6 +12748,7 @@ function pt_default() {
12650
12748
  }
12651
12749
 
12652
12750
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ro.js
12751
+ init_define_PUDDLE_COMPONENT_VERSIONS();
12653
12752
  var error37 = () => {
12654
12753
  const Sizable = {
12655
12754
  string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
@@ -12770,6 +12869,7 @@ function ro_default() {
12770
12869
  }
12771
12870
 
12772
12871
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ru.js
12872
+ init_define_PUDDLE_COMPONENT_VERSIONS();
12773
12873
  function getRussianPlural(count2, one, few, many) {
12774
12874
  const absCount = Math.abs(count2);
12775
12875
  const lastDigit = absCount % 10;
@@ -12927,6 +13027,7 @@ function ru_default() {
12927
13027
  }
12928
13028
 
12929
13029
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sl.js
13030
+ init_define_PUDDLE_COMPONENT_VERSIONS();
12930
13031
  var error39 = () => {
12931
13032
  const Sizable = {
12932
13033
  string: { unit: "znakov", verb: "imeti" },
@@ -13037,6 +13138,7 @@ function sl_default() {
13037
13138
  }
13038
13139
 
13039
13140
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sv.js
13141
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13040
13142
  var error40 = () => {
13041
13143
  const Sizable = {
13042
13144
  string: { unit: "tecken", verb: "att ha" },
@@ -13148,6 +13250,7 @@ function sv_default() {
13148
13250
  }
13149
13251
 
13150
13252
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ta.js
13253
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13151
13254
  var error41 = () => {
13152
13255
  const Sizable = {
13153
13256
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -13259,6 +13362,7 @@ function ta_default() {
13259
13362
  }
13260
13363
 
13261
13364
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/th.js
13365
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13262
13366
  var error42 = () => {
13263
13367
  const Sizable = {
13264
13368
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -13370,6 +13474,7 @@ function th_default() {
13370
13474
  }
13371
13475
 
13372
13476
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/tr.js
13477
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13373
13478
  var error43 = () => {
13374
13479
  const Sizable = {
13375
13480
  string: { unit: "karakter", verb: "olmal\u0131" },
@@ -13475,7 +13580,11 @@ function tr_default() {
13475
13580
  };
13476
13581
  }
13477
13582
 
13583
+ // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ua.js
13584
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13585
+
13478
13586
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uk.js
13587
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13479
13588
  var error44 = () => {
13480
13589
  const Sizable = {
13481
13590
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -13590,6 +13699,7 @@ function ua_default() {
13590
13699
  }
13591
13700
 
13592
13701
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ur.js
13702
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13593
13703
  var error45 = () => {
13594
13704
  const Sizable = {
13595
13705
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
@@ -13701,6 +13811,7 @@ function ur_default() {
13701
13811
  }
13702
13812
 
13703
13813
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uz.js
13814
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13704
13815
  var error46 = () => {
13705
13816
  const Sizable = {
13706
13817
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
@@ -13812,6 +13923,7 @@ function uz_default() {
13812
13923
  }
13813
13924
 
13814
13925
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/vi.js
13926
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13815
13927
  var error47 = () => {
13816
13928
  const Sizable = {
13817
13929
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
@@ -13921,6 +14033,7 @@ function vi_default() {
13921
14033
  }
13922
14034
 
13923
14035
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.js
14036
+ init_define_PUDDLE_COMPONENT_VERSIONS();
13924
14037
  var error48 = () => {
13925
14038
  const Sizable = {
13926
14039
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
@@ -14031,6 +14144,7 @@ function zh_CN_default() {
14031
14144
  }
14032
14145
 
14033
14146
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.js
14147
+ init_define_PUDDLE_COMPONENT_VERSIONS();
14034
14148
  var error49 = () => {
14035
14149
  const Sizable = {
14036
14150
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
@@ -14139,6 +14253,7 @@ function zh_TW_default() {
14139
14253
  }
14140
14254
 
14141
14255
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/yo.js
14256
+ init_define_PUDDLE_COMPONENT_VERSIONS();
14142
14257
  var error50 = () => {
14143
14258
  const Sizable = {
14144
14259
  string: { unit: "\xE0mi", verb: "n\xED" },
@@ -14247,6 +14362,7 @@ function yo_default() {
14247
14362
  }
14248
14363
 
14249
14364
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
14365
+ init_define_PUDDLE_COMPONENT_VERSIONS();
14250
14366
  var _a2;
14251
14367
  var $output = Symbol("ZodOutput");
14252
14368
  var $input = Symbol("ZodInput");
@@ -14297,6 +14413,7 @@ function registry() {
14297
14413
  var globalRegistry = globalThis.__zod_globalRegistry;
14298
14414
 
14299
14415
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
14416
+ init_define_PUDDLE_COMPONENT_VERSIONS();
14300
14417
  // @__NO_SIDE_EFFECTS__
14301
14418
  function _string(Class2, params) {
14302
14419
  return new Class2({
@@ -15336,6 +15453,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
15336
15453
  }
15337
15454
 
15338
15455
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
15456
+ init_define_PUDDLE_COMPONENT_VERSIONS();
15339
15457
  function initializeContext(params) {
15340
15458
  let target2 = params?.target ?? "draft-2020-12";
15341
15459
  if (target2 === "draft-4")
@@ -15695,6 +15813,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
15695
15813
  };
15696
15814
 
15697
15815
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
15816
+ init_define_PUDDLE_COMPONENT_VERSIONS();
15698
15817
  var formatMap = {
15699
15818
  guid: "uuid",
15700
15819
  url: "uri",
@@ -16239,6 +16358,7 @@ function toJSONSchema(input, params) {
16239
16358
  }
16240
16359
 
16241
16360
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
16361
+ init_define_PUDDLE_COMPONENT_VERSIONS();
16242
16362
  var JSONSchemaGenerator = class {
16243
16363
  /** @deprecated Access via ctx instead */
16244
16364
  get metadataRegistry() {
@@ -16315,6 +16435,7 @@ var JSONSchemaGenerator = class {
16315
16435
 
16316
16436
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
16317
16437
  var json_schema_exports = {};
16438
+ init_define_PUDDLE_COMPONENT_VERSIONS();
16318
16439
 
16319
16440
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
16320
16441
  var schemas_exports2 = {};
@@ -16486,6 +16607,7 @@ __export(schemas_exports2, {
16486
16607
  xid: () => xid2,
16487
16608
  xor: () => xor
16488
16609
  });
16610
+ init_define_PUDDLE_COMPONENT_VERSIONS();
16489
16611
 
16490
16612
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/checks.js
16491
16613
  var checks_exports2 = {};
@@ -16520,6 +16642,7 @@ __export(checks_exports2, {
16520
16642
  trim: () => _trim,
16521
16643
  uppercase: () => _uppercase
16522
16644
  });
16645
+ init_define_PUDDLE_COMPONENT_VERSIONS();
16523
16646
 
16524
16647
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
16525
16648
  var iso_exports = {};
@@ -16533,6 +16656,7 @@ __export(iso_exports, {
16533
16656
  duration: () => duration2,
16534
16657
  time: () => time2
16535
16658
  });
16659
+ init_define_PUDDLE_COMPONENT_VERSIONS();
16536
16660
  var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
16537
16661
  $ZodISODateTime.init(inst, def);
16538
16662
  ZodStringFormat.init(inst, def);
@@ -16562,7 +16686,11 @@ function duration2(params) {
16562
16686
  return _isoDuration(ZodISODuration, params);
16563
16687
  }
16564
16688
 
16689
+ // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
16690
+ init_define_PUDDLE_COMPONENT_VERSIONS();
16691
+
16565
16692
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
16693
+ init_define_PUDDLE_COMPONENT_VERSIONS();
16566
16694
  var initializer2 = (inst, issues) => {
16567
16695
  $ZodError.init(inst, issues);
16568
16696
  inst.name = "ZodError";
@@ -17907,6 +18035,7 @@ function preprocess(fn, schema) {
17907
18035
  }
17908
18036
 
17909
18037
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.js
18038
+ init_define_PUDDLE_COMPONENT_VERSIONS();
17910
18039
  var ZodIssueCode = {
17911
18040
  invalid_type: "invalid_type",
17912
18041
  too_big: "too_big",
@@ -17933,6 +18062,7 @@ var ZodFirstPartyTypeKind;
17933
18062
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
17934
18063
 
17935
18064
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.js
18065
+ init_define_PUDDLE_COMPONENT_VERSIONS();
17936
18066
  var z = {
17937
18067
  ...schemas_exports2,
17938
18068
  ...checks_exports2,
@@ -18421,6 +18551,7 @@ __export(coerce_exports, {
18421
18551
  number: () => number3,
18422
18552
  string: () => string3
18423
18553
  });
18554
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18424
18555
  function string3(params) {
18425
18556
  return _coercedString(ZodString, params);
18426
18557
  }
@@ -18441,6 +18572,7 @@ function date4(params) {
18441
18572
  config(en_default());
18442
18573
 
18443
18574
  // ../shared/src/api/common.ts
18575
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18444
18576
  var errorResponseSchema = external_exports.object({
18445
18577
  error: external_exports.object({
18446
18578
  code: external_exports.string(),
@@ -18492,7 +18624,14 @@ var agentNotificationSchema = external_exports.object({
18492
18624
  content: notificationContentSchema.optional()
18493
18625
  });
18494
18626
 
18627
+ // ../shared/src/notification-title.ts
18628
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18629
+
18630
+ // ../shared/src/project-abbrev.ts
18631
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18632
+
18495
18633
  // ../shared/src/api/connection/version.ts
18634
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18496
18635
  var versionResponseSchema = external_exports.object({
18497
18636
  version: external_exports.string(),
18498
18637
  /** Added by the host connector; absent on direct daemon responses and older connectors. */
@@ -18508,6 +18647,7 @@ var versionResponseSchema = external_exports.object({
18508
18647
  });
18509
18648
 
18510
18649
  // ../shared/src/api/connection/release-notes.ts
18650
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18511
18651
  var RELEASE_NOTES_MAX_BYTES = 256 * 1024;
18512
18652
  var releaseNotesSchema = external_exports.object({
18513
18653
  releases: external_exports.array(
@@ -18519,7 +18659,17 @@ var releaseNotesSchema = external_exports.object({
18519
18659
  ).max(2).refine((entries) => new Set(entries.map((entry) => entry.component)).size === entries.length)
18520
18660
  });
18521
18661
 
18662
+ // ../shared/src/api/connection/host-updates.ts
18663
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18664
+
18665
+ // ../shared/src/installation/update.ts
18666
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18667
+
18668
+ // ../shared/src/installation/stage.ts
18669
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18670
+
18522
18671
  // ../shared/src/installation/version.ts
18672
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18523
18673
  function isNewerVersion(candidate, current) {
18524
18674
  const parse3 = (value) => {
18525
18675
  if (value.length > 129) return null;
@@ -18689,11 +18839,17 @@ function hostUpdateTerminal(phase) {
18689
18839
  }
18690
18840
 
18691
18841
  // ../shared/src/installation/catalogue.ts
18842
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18692
18843
  var releaseRepositorySchema = external_exports.string().max(201).regex(/^[A-Za-z0-9][A-Za-z0-9_.-]*\/[A-Za-z0-9_.-]+$/).refine((value) => ![".", ".."].includes(value.split("/")[1]));
18844
+ var availableRelease = external_exports.object({
18845
+ version: external_exports.string().max(64).regex(/^[0-9]+\.[0-9]+\.[0-9]+$/),
18846
+ host_asset: external_exports.boolean()
18847
+ }).strict();
18693
18848
  var timestamp2 = external_exports.number().int().nonnegative().safe();
18694
18849
  var hostReleaseCheckSchema = external_exports.object({
18695
18850
  repository: releaseRepositorySchema.nullable(),
18696
18851
  state: external_exports.enum(["unconfigured", "checking", "ready", "failed"]),
18852
+ components: external_exports.object({ daemon: availableRelease, runtime: availableRelease }).strict().optional(),
18697
18853
  checked_at: timestamp2.nullable(),
18698
18854
  succeeded_at: timestamp2.nullable(),
18699
18855
  latest: external_exports.object({
@@ -18734,7 +18890,8 @@ var hostUpdateCommandSchema = external_exports.discriminatedUnion("action", [
18734
18890
  /** Recorded continuation metadata, capability-detected from application 25.12. */
18735
18891
  include_recovery: external_exports.literal(true).optional(),
18736
18892
  /** Host-wide versions and coalesced release discovery (25.14), never admission evidence. */
18737
- include_catalogue: external_exports.literal(true).optional()
18893
+ include_catalogue: external_exports.literal(true).optional(),
18894
+ include_component_releases: external_exports.literal(true).optional()
18738
18895
  }).strict().refine(
18739
18896
  (command) => !command.adoption_nonce || command.id !== void 0,
18740
18897
  "Adoption inspection requires an exact operation"
@@ -18809,6 +18966,7 @@ var hostUpdateControlResponseSchema = external_exports.object({
18809
18966
  }).strict();
18810
18967
 
18811
18968
  // ../shared/src/api/connection/connector-inspection.ts
18969
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18812
18970
  var connectorInspectionRequestSchema = external_exports.object({ t: external_exports.literal("inspect"), nonce: external_exports.uuid() }).strict();
18813
18971
  var connectorInspectionResponseSchema = external_exports.object({
18814
18972
  t: external_exports.literal("inspection"),
@@ -18825,6 +18983,7 @@ var connectorInspectionResponseSchema = external_exports.object({
18825
18983
  }).strip();
18826
18984
 
18827
18985
  // ../shared/src/api/agents/agent-signal.ts
18986
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18828
18987
  var statusSignalSchema = external_exports.object({
18829
18988
  nonce: external_exports.string().min(16),
18830
18989
  state: external_exports.enum(["working", "waiting_input"])
@@ -18857,6 +19016,7 @@ var agentSignalRequestSchema = external_exports.union([
18857
19016
  ]);
18858
19017
 
18859
19018
  // ../shared/src/api/config.ts
19019
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18860
19020
  var fields = {
18861
19021
  port: external_exports.number().int().min(1).max(65535),
18862
19022
  autoResume: external_exports.boolean(),
@@ -18895,6 +19055,7 @@ var daemonConfigSchema = external_exports.object({
18895
19055
  var daemonConfigPatchSchema = external_exports.object(fields).partial();
18896
19056
 
18897
19057
  // ../shared/src/api/fs.ts
19058
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18898
19059
  var fsDirEntrySchema = external_exports.object({
18899
19060
  path: external_exports.string(),
18900
19061
  name: external_exports.string(),
@@ -18905,6 +19066,7 @@ var fsDirsResponseSchema = external_exports.object({
18905
19066
  });
18906
19067
 
18907
19068
  // ../shared/src/api/connection/host.ts
19069
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18908
19070
  var hostInfoSchema = external_exports.object({
18909
19071
  username: external_exports.string(),
18910
19072
  hostname: external_exports.string(),
@@ -18919,6 +19081,7 @@ var hostInfoSchema = external_exports.object({
18919
19081
  });
18920
19082
 
18921
19083
  // ../shared/src/api/profiles.ts
19084
+ init_define_PUDDLE_COMPONENT_VERSIONS();
18922
19085
  var fsSafeName = external_exports.string().min(1).max(64).regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/, "letters, digits, dot, underscore and hyphen only");
18923
19086
  var RULES_TOKEN = "{{rules}}";
18924
19087
  var DEFAULT_ONBOARDING_TEMPLATE = `This is a freshly created git worktree for this task. Before starting, set up the environment as appropriate by reading any setup rules (see below) and inspecting the codebase. If the user states a rule for all future worktrees, write the complete updated rules to \`.puddle/onboarding-notes.md\` in this worktree. Setup rules:${RULES_TOKEN}`;
@@ -18937,7 +19100,7 @@ var profileSchema = external_exports.object({
18937
19100
  branch_prefix: external_exports.string(),
18938
19101
  /** Lucide icon name (kebab-case, e.g. `rocket`); null → the default person glyph. */
18939
19102
  icon: external_exports.string().nullable().default(null),
18940
- /** A `PROFILE_ICON_COLOURS` key; null → the default heading colour. */
19103
+ /** A `PROFILE_ICON_COLOURS` key or six-digit hex colour; null → the default colour. */
18941
19104
  icon_colour: external_exports.string().nullable().default(null),
18942
19105
  created_at: isoTimestamp
18943
19106
  });
@@ -18950,7 +19113,7 @@ var patchProfileRequestSchema = external_exports.object({
18950
19113
  branch_prefix: external_exports.string().max(64).optional(),
18951
19114
  /** Set/clear the profile's lucide icon (kebab-case name); null clears it. */
18952
19115
  icon: external_exports.string().max(64).nullable().optional(),
18953
- /** Set/clear the icon colour (a `PROFILE_ICON_COLOURS` key); null clears it. */
19116
+ /** Set/clear the icon colour (a palette key or six-digit hex); null clears it. */
18954
19117
  icon_colour: external_exports.string().max(32).nullable().optional()
18955
19118
  });
18956
19119
  var sessionSeedSchema = external_exports.looseObject({
@@ -18963,6 +19126,9 @@ var sessionDefaultsSchema = external_exports.looseObject({
18963
19126
  terminal: sessionSeedSchema.optional()
18964
19127
  });
18965
19128
  var profileSettingsSchema = external_exports.looseObject({
19129
+ /** Host identity for this profile on this daemon; deliberately excluded from sync. */
19130
+ hostIcon: external_exports.string().max(64).nullable().optional(),
19131
+ hostColour: external_exports.union([external_exports.enum(PROFILE_ICON_COLOURS), external_exports.string().regex(/^#[0-9a-fA-F]{6}$/)]).nullable().optional(),
18966
19132
  allowSkipPermissions: external_exports.boolean().default(false),
18967
19133
  /**
18968
19134
  * Captured session environment (SPEC §4): whether this profile's session
@@ -19030,6 +19196,7 @@ var putUntitledRequestSchema = external_exports.object({ content: external_expor
19030
19196
  var putUntitledResponseSchema = external_exports.object({ mtime_ms: external_exports.number() });
19031
19197
 
19032
19198
  // ../shared/src/api/agents/accounts.ts
19199
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19033
19200
  var accountSchema = external_exports.object({
19034
19201
  id: rowId,
19035
19202
  profile_id: profileId,
@@ -19101,6 +19268,7 @@ var accountUsageSchema = external_exports.looseObject({
19101
19268
  });
19102
19269
 
19103
19270
  // ../shared/src/api/agents/agents.ts
19271
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19104
19272
  var agentTypeSchema = external_exports.object({
19105
19273
  id: external_exports.string(),
19106
19274
  display_name: external_exports.string(),
@@ -19124,6 +19292,7 @@ var agentTypeSchema = external_exports.object({
19124
19292
  });
19125
19293
 
19126
19294
  // ../shared/src/api/workspace/repos.ts
19295
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19127
19296
  var repoSchema = external_exports.object({
19128
19297
  id: rowId,
19129
19298
  path: external_exports.string(),
@@ -19187,6 +19356,7 @@ var patchRepoRequestSchema = external_exports.object({
19187
19356
  });
19188
19357
 
19189
19358
  // ../shared/src/api/agents/sessions.ts
19359
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19190
19360
  var sessionStatusSchema = external_exports.enum([
19191
19361
  "starting",
19192
19362
  "running",
@@ -19354,8 +19524,12 @@ var archiveRequestSchema = external_exports.object({
19354
19524
  });
19355
19525
 
19356
19526
  // ../shared/src/api/workspace/projects.ts
19527
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19357
19528
  var projectAbbrev2 = external_exports.string().min(1).max(5);
19358
- var projectColourSchema = external_exports.enum(PROFILE_ICON_COLOURS);
19529
+ var projectColourSchema = external_exports.union([
19530
+ external_exports.enum(PROFILE_ICON_COLOURS),
19531
+ external_exports.string().regex(/^#[0-9a-f]{6}$/i)
19532
+ ]);
19359
19533
  var projectSchema = external_exports.object({
19360
19534
  id: projectId,
19361
19535
  profile_id: profileId,
@@ -19391,6 +19565,7 @@ var projectDetailSchema = external_exports.object({
19391
19565
  });
19392
19566
 
19393
19567
  // ../shared/src/api/workspace/scratchpad.ts
19568
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19394
19569
  var scratchpadScopeSchema = external_exports.enum(["project", "profile"]);
19395
19570
  var scratchpadEntrySchema = external_exports.object({
19396
19571
  id: rowId,
@@ -19425,7 +19600,14 @@ var patchScratchpadRequestSchema = external_exports.object({
19425
19600
  position: external_exports.number().optional()
19426
19601
  });
19427
19602
 
19603
+ // ../shared/src/api/workspace/layouts.ts
19604
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19605
+
19606
+ // ../shared/src/api/workspace/ui-state.ts
19607
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19608
+
19428
19609
  // ../shared/src/api/compilation.ts
19610
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19429
19611
  var compilationModeSchema = external_exports.enum(["on_demand", "eager"]);
19430
19612
  var compilationFileTargetSchema = external_exports.object({
19431
19613
  session: sessionId,
@@ -19719,6 +19901,7 @@ var patchLayoutRequestSchema = external_exports.object({
19719
19901
  });
19720
19902
 
19721
19903
  // ../shared/src/api/notebooks/notebooks.ts
19904
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19722
19905
  var notebookKernelSpecSchema = external_exports.object({
19723
19906
  name: external_exports.string().min(1),
19724
19907
  display_name: external_exports.string().min(1),
@@ -19764,6 +19947,7 @@ var notebookKernelActionSchema = external_exports.discriminatedUnion("action", [
19764
19947
  ]);
19765
19948
 
19766
19949
  // ../shared/src/api/latex.ts
19950
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19767
19951
  var latexSynctexRequestSchema = compilationFileTargetSchema.extend({
19768
19952
  root: external_exports.string().min(1),
19769
19953
  page: external_exports.number().int().positive(),
@@ -19778,6 +19962,7 @@ var latexSynctexResponseSchema = compilationFileTargetSchema.extend({
19778
19962
  });
19779
19963
 
19780
19964
  // ../shared/src/api/worktrees/worktrees.ts
19965
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19781
19966
  var pasteImageMimeSchema = external_exports.enum(["image/png", "image/jpeg", "image/gif", "image/webp"]);
19782
19967
  var pasteImageRequestSchema = external_exports.object({
19783
19968
  mime: pasteImageMimeSchema,
@@ -19813,6 +19998,7 @@ var resolvePathResponseSchema = external_exports.object({
19813
19998
  });
19814
19999
 
19815
20000
  // ../shared/src/api/worktrees/worktree-files.ts
20001
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19816
20002
  var treeEntrySchema = external_exports.object({
19817
20003
  name: external_exports.string(),
19818
20004
  /**
@@ -19865,6 +20051,7 @@ var uploadResponseSchema = external_exports.object({
19865
20051
  });
19866
20052
 
19867
20053
  // ../shared/src/api/worktrees/worktree-fs.ts
20054
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19868
20055
  var createEntryRequestSchema = external_exports.object({
19869
20056
  path: external_exports.string().min(1),
19870
20057
  kind: external_exports.enum(["file", "dir"])
@@ -19895,6 +20082,7 @@ var fsOpResponseSchema = external_exports.object({
19895
20082
  });
19896
20083
 
19897
20084
  // ../shared/src/api/worktrees/worktree-git.ts
20085
+ init_define_PUDDLE_COMPONENT_VERSIONS();
19898
20086
  var diffStatusSchema = external_exports.enum(["added", "modified", "deleted", "renamed"]);
19899
20087
  var gitAreaSchema = external_exports.enum(["staged", "unstaged"]);
19900
20088
  var diffEntrySchema = external_exports.object({
@@ -19962,6 +20150,10 @@ var gitRepositoryRequestSchema = external_exports.object({ repository: external_
19962
20150
  var gitPathsRequestSchema = gitRepositoryRequestSchema.extend({
19963
20151
  paths: external_exports.array(external_exports.string().min(1)).min(1)
19964
20152
  });
20153
+ var gitRestoreRequestSchema = gitRepositoryRequestSchema.extend({
20154
+ path: external_exports.string().min(1),
20155
+ delete_untracked: external_exports.boolean().optional()
20156
+ });
19965
20157
  var gitCommitRequestSchema = gitRepositoryRequestSchema.extend({
19966
20158
  message: external_exports.string().trim().min(1),
19967
20159
  /** Stage every change immediately before committing, under the same repo lock. */
@@ -20023,6 +20215,7 @@ var showCommitResponseSchema = external_exports.object({
20023
20215
  });
20024
20216
 
20025
20217
  // ../shared/src/api/worktrees/worktree-search.ts
20218
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20026
20219
  var searchMatchSchema = external_exports.object({
20027
20220
  line: external_exports.number().int().positive(),
20028
20221
  text: external_exports.string()
@@ -20042,6 +20235,7 @@ var searchResponseSchema = external_exports.object({
20042
20235
  });
20043
20236
 
20044
20237
  // ../shared/src/api/ports.ts
20238
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20045
20239
  var sessionPortSchema = external_exports.object({
20046
20240
  port: external_exports.number().int().min(1).max(65535),
20047
20241
  pid: external_exports.number().int(),
@@ -20056,6 +20250,7 @@ var sessionPortsResponseSchema = external_exports.object({
20056
20250
  });
20057
20251
 
20058
20252
  // ../shared/src/api/connection/cockpit.ts
20253
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20059
20254
  var cockpitRefreshRequestSchema = external_exports.object({ refreshId: external_exports.string().uuid() }).strict();
20060
20255
  var cockpitRefreshResponseSchema = external_exports.object({
20061
20256
  status: external_exports.literal("refreshing"),
@@ -20070,6 +20265,7 @@ var cockpitRevealRequestSchema = external_exports.object({
20070
20265
  }).strict();
20071
20266
 
20072
20267
  // ../shared/src/api/connection/cockpit-updates.ts
20268
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20073
20269
  var onlineHostUpdateRequestSchema = external_exports.discriminatedUnion("action", [
20074
20270
  external_exports.object({ action: external_exports.literal("prepare"), targets: hostUpdateTargetsSchema }).strict(),
20075
20271
  external_exports.object({ action: external_exports.literal("inspect"), reference: hostUpdateReferenceSchema }).strict(),
@@ -20090,7 +20286,7 @@ var cockpitHostUpdateRequestSchema = external_exports.discriminatedUnion("action
20090
20286
  ...onlineHostUpdateRequestSchema.options,
20091
20287
  external_exports.object({ action: external_exports.literal("continue-offline"), reference: hostUpdateReferenceSchema }).strict()
20092
20288
  ]);
20093
- var cockpitHostUpdateQuerySchema = external_exports.object({ id: external_exports.uuid().optional() }).strict();
20289
+ var cockpitHostUpdateQuerySchema = external_exports.object({ id: external_exports.uuid().optional(), components: external_exports.literal("1").optional() }).strict();
20094
20290
  var operation = hostUpdateOperationSchema.shape;
20095
20291
  var cockpitHostUpdateOperationSchema = external_exports.object({
20096
20292
  id: operation.id,
@@ -20135,8 +20331,13 @@ var cockpitHostUpdateStatusSchema = external_exports.object({
20135
20331
  }).strict();
20136
20332
 
20137
20333
  // ../shared/src/api/connection/host-maintenance.ts
20334
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20138
20335
  var hostMaintenanceCommandSchema = external_exports.discriminatedUnion("action", [
20139
- external_exports.object({ action: external_exports.literal("status"), id: external_exports.uuid().optional() }).strict(),
20336
+ external_exports.object({
20337
+ action: external_exports.literal("status"),
20338
+ id: external_exports.uuid().optional(),
20339
+ include_component_releases: external_exports.literal(true).optional()
20340
+ }).strict(),
20140
20341
  ...onlineHostUpdateRequestSchema.options
20141
20342
  ]);
20142
20343
  var hostMaintenanceReplySchema = external_exports.discriminatedUnion("kind", [
@@ -20155,6 +20356,7 @@ var hostMaintenanceControlResponseSchema = external_exports.object({
20155
20356
  }).strict();
20156
20357
 
20157
20358
  // ../shared/src/installation/presentation.ts
20359
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20158
20360
  function presentHostUpdate(reply, options = {}) {
20159
20361
  const source = reply.operation;
20160
20362
  const operation2 = source ? {
@@ -20183,7 +20385,14 @@ function presentHostUpdate(reply, options = {}) {
20183
20385
  );
20184
20386
  }
20185
20387
 
20388
+ // ../shared/src/remote/maintenance.ts
20389
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20390
+
20391
+ // ../shared/src/remote/protocol.ts
20392
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20393
+
20186
20394
  // ../shared/src/ws/messages.ts
20395
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20187
20396
  var termId = external_exports.string().regex(/^(agent|shell-[0-9]+)$/);
20188
20397
  var dims = {
20189
20398
  cols: external_exports.number().int().min(2).max(1e3),
@@ -20400,7 +20609,11 @@ var remoteMaintenanceClaimSchema = external_exports.object({
20400
20609
  grant: remoteIdSchema
20401
20610
  }).strict();
20402
20611
 
20612
+ // ../shared/src/api/connection/cockpit-remote.ts
20613
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20614
+
20403
20615
  // ../shared/src/remote/service.ts
20616
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20404
20617
  var remoteHostSchema = external_exports.object({
20405
20618
  id: remoteIdSchema,
20406
20619
  label: remoteLabelSchema,
@@ -20495,6 +20708,7 @@ var connectorAdminSchema = external_exports.object({ profile: profileId, request
20495
20708
  var connectorConfigureSchema = external_exports.object({ profile: profileId, setup: connectorSetupSchema }).strict();
20496
20709
 
20497
20710
  // ../shared/src/api/connection/connection-auth.ts
20711
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20498
20712
  var CONNECTION_POLICY = {
20499
20713
  participationMs: 15e3,
20500
20714
  leaseMs: 45e3,
@@ -20583,6 +20797,7 @@ var browserAuthorityStateSchema = external_exports.object({
20583
20797
  });
20584
20798
 
20585
20799
  // ../shared/src/remote/image-upload.ts
20800
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20586
20801
  var IMAGE_UPLOAD_POLICY = {
20587
20802
  imageBytes: 4 * 1024 * 1024,
20588
20803
  chunkBytes: 64 * 1024,
@@ -20613,6 +20828,7 @@ var imageUploadProgressSchema = external_exports.object({
20613
20828
  });
20614
20829
 
20615
20830
  // ../shared/src/remote/notifications.ts
20831
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20616
20832
  var notificationPreviewKeySchema = external_exports.object({ id: remoteIdSchema, secret: remoteSecretSchema }).strict();
20617
20833
  var encryptedNotificationSchema = external_exports.object({
20618
20834
  key: remoteIdSchema,
@@ -20662,6 +20878,7 @@ var pushDispatchResultSchema = external_exports.object({ accepted: external_expo
20662
20878
  var pushPreferenceResultSchema = external_exports.object({ enabled: external_exports.boolean() }).strict();
20663
20879
 
20664
20880
  // ../shared/src/api/agents/puddlang.ts
20881
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20665
20882
  var PUDDLANG_MAX_SOURCE = 256 * 1024;
20666
20883
  var sourceSchema = external_exports.string().min(1).max(PUDDLANG_MAX_SOURCE).refine(
20667
20884
  (source) => new TextEncoder().encode(source).length <= PUDDLANG_MAX_SOURCE,
@@ -20756,6 +20973,7 @@ var puddlangContextSchema = external_exports.object({
20756
20973
  });
20757
20974
 
20758
20975
  // ../shared/src/api/agents/puddlang-outcomes.ts
20976
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20759
20977
  var puddlangOutcomeOperationSchema = external_exports.number().int().safe();
20760
20978
  var puddlangOutcomeActionSchema = external_exports.enum(["read", "discard"]);
20761
20979
  var fingerprint3 = external_exports.string().regex(/^[a-f0-9]{64}$/);
@@ -20794,6 +21012,7 @@ var puddlangOutcomeResponseSchema = external_exports.object({
20794
21012
  }).strict();
20795
21013
 
20796
21014
  // ../shared/src/api/agents/puddlang-mcp.ts
21015
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20797
21016
  var puddlangMcpRequestSchema = external_exports.object({
20798
21017
  jsonrpc: external_exports.literal("2.0"),
20799
21018
  id: external_exports.union([external_exports.string(), external_exports.number()]).optional(),
@@ -20874,6 +21093,7 @@ var puddlangMcpTools = definitions.map(([name, description, schema, readOnlyHint
20874
21093
  }));
20875
21094
 
20876
21095
  // ../shared/src/api/notebooks/notebook-execution.ts
21096
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20877
21097
  var cellId = external_exports.string().min(1).max(128);
20878
21098
  var cellSource = external_exports.object({ id: cellId, source: external_exports.string().max(1024 * 1024) });
20879
21099
  var notebookExecuteSchema = external_exports.object({
@@ -20907,10 +21127,22 @@ var notebookExecutionSchema = external_exports.object({
20907
21127
  input: notebookInputSchema.optional(),
20908
21128
  error: external_exports.string().max(32768).optional()
20909
21129
  });
20910
- var notebookExecutionRequestSchema = external_exports.object({ source: compilationFileTargetSchema });
21130
+ var notebookRevisionSchema = external_exports.object({
21131
+ id: external_exports.string().uuid(),
21132
+ revision: external_exports.number().int().nonnegative()
21133
+ }).nullable();
21134
+ var notebookExecutionRequestSchema = external_exports.object({
21135
+ source: compilationFileTargetSchema,
21136
+ /** Opt in to an unchanged reply; omission always asks for a full snapshot. */
21137
+ known: notebookRevisionSchema.optional()
21138
+ });
20911
21139
  var notebookExecutionResponseSchema = external_exports.object({
20912
21140
  execution: notebookExecutionSchema.nullable()
20913
21141
  });
21142
+ var notebookObservationResponseSchema = external_exports.union([
21143
+ notebookExecutionResponseSchema,
21144
+ external_exports.object({ unchanged: external_exports.literal(true) })
21145
+ ]);
20914
21146
  var notebookInputReplySchema = external_exports.object({
20915
21147
  source: compilationFileTargetSchema,
20916
21148
  run_id: external_exports.string().uuid(),
@@ -20919,6 +21151,7 @@ var notebookInputReplySchema = external_exports.object({
20919
21151
  });
20920
21152
 
20921
21153
  // ../shared/src/api/notebooks/notebook-intelligence.ts
21154
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20922
21155
  var notebookIntelligenceRequestSchema = external_exports.object({
20923
21156
  source: compilationFileTargetSchema,
20924
21157
  kind: external_exports.enum(["complete", "inspect"]),
@@ -20934,6 +21167,7 @@ var notebookIntelligenceResponseSchema = external_exports.object({
20934
21167
  });
20935
21168
 
20936
21169
  // ../shared/src/api/notebooks/notebook-widgets.ts
21170
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20937
21171
  var id = external_exports.string().min(1).max(128);
20938
21172
  var json2 = external_exports.record(external_exports.string(), external_exports.unknown());
20939
21173
  var binary = external_exports.string().max(2 * 1024 * 1024).regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/);
@@ -20990,7 +21224,11 @@ var notebookWidgetCommSchema = external_exports.object({
20990
21224
  })
20991
21225
  });
20992
21226
 
21227
+ // ../shared/src/notebook-widget-state.ts
21228
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21229
+
20993
21230
  // ../shared/src/api/storage.ts
21231
+ init_define_PUDDLE_COMPONENT_VERSIONS();
20994
21232
  var storageStatusSchema = external_exports.object({
20995
21233
  checked_at: external_exports.string().nullable(),
20996
21234
  volumes: external_exports.array(
@@ -21005,8 +21243,12 @@ var storageStatusSchema = external_exports.object({
21005
21243
  database_degraded: external_exports.boolean()
21006
21244
  });
21007
21245
 
21246
+ // ../shared/src/api/agents/runtime.ts
21247
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21248
+
21008
21249
  // ../shared/src/runtime/protocol.ts
21009
- var RUNTIME_PROTOCOL_VERSION = { major: 1, minor: 0 };
21250
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21251
+ var RUNTIME_PROTOCOL_VERSION = { major: 1, minor: 1 };
21010
21252
  var RUNTIME_LIMITS = {
21011
21253
  frameBytes: 8 * 1024 * 1024,
21012
21254
  inputBytes: 64 * 1024,
@@ -21476,6 +21718,7 @@ var restartSessionRuntimeRequestSchema = external_exports.object({
21476
21718
  }).strict();
21477
21719
 
21478
21720
  // ../shared/src/runtime/storage.ts
21721
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21479
21722
  var runtimeAssetsSchema = external_exports.object({
21480
21723
  format: external_exports.literal(1),
21481
21724
  node_path: external_exports.string().max(4096).refine((value) => value.startsWith("/") && !value.includes("\0")),
@@ -21538,6 +21781,7 @@ var runtimeSupervisorSchema = external_exports.object({
21538
21781
  });
21539
21782
 
21540
21783
  // ../shared/src/installation/collection.ts
21784
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21541
21785
  var HOST_RELEASE_COLLECTION_LIMIT = 32;
21542
21786
  var HOST_RELEASE_COLLECTION_BYTES = 64 * 1024;
21543
21787
  var hostReleaseCollectionSchema = external_exports.object({
@@ -21575,7 +21819,11 @@ var hostReleaseCollectionSchema = external_exports.object({
21575
21819
  }
21576
21820
  });
21577
21821
 
21822
+ // ../shared/src/installation/worker.ts
21823
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21824
+
21578
21825
  // ../shared/src/installation/supervision.ts
21826
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21579
21827
  var hostServiceReplacementSchema = external_exports.object({
21580
21828
  kind: external_exports.enum(["systemd", "launchd"]),
21581
21829
  component: external_exports.enum(["daemon", "connector"]).optional(),
@@ -21592,6 +21840,7 @@ var hostServiceReplacementSchema = external_exports.object({
21592
21840
  );
21593
21841
 
21594
21842
  // ../shared/src/installation/connector.ts
21843
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21595
21844
  var hostConnectorReplacementSchema = external_exports.discriminatedUnion("state", [
21596
21845
  external_exports.object({ state: external_exports.literal("absent") }).strict(),
21597
21846
  external_exports.object({
@@ -21645,6 +21894,7 @@ var hostUpdateWorkerLifetimeSchema = external_exports.object({
21645
21894
  }).strict();
21646
21895
 
21647
21896
  // ../shared/src/installation/actions.ts
21897
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21648
21898
  var hostUpdateActionSchema = external_exports.enum([
21649
21899
  "stop-connector",
21650
21900
  "stop-daemon",
@@ -21677,7 +21927,11 @@ var hostUpdateActionsSchema = external_exports.object({
21677
21927
  }
21678
21928
  });
21679
21929
 
21930
+ // ../shared/src/installation/recovery.ts
21931
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21932
+
21680
21933
  // ../shared/src/installation/checkpoint.ts
21934
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21681
21935
  var HOST_UPDATE_CHECKPOINT_OWNERS = 4096;
21682
21936
  var HOST_UPDATE_CHECKPOINT_BYTES = 8 * 1024 * 1024;
21683
21937
  var hostUpdateCheckpointReferenceSchema = external_exports.object({
@@ -21776,6 +22030,7 @@ var hostUpdateRecoveryLedgerSchema = external_exports.object({
21776
22030
  });
21777
22031
 
21778
22032
  // ../shared/src/installation/adoption.ts
22033
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21779
22034
  var hostUpdateAdoptionSchema = hostUpdateCheckpointReferenceSchema.extend({
21780
22035
  format: external_exports.literal(1),
21781
22036
  nonce: external_exports.uuid(),
@@ -21803,6 +22058,7 @@ var hostUpdateAdoptionSchema = hostUpdateCheckpointReferenceSchema.extend({
21803
22058
  );
21804
22059
 
21805
22060
  // ../shared/src/installation/capabilities.ts
22061
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21806
22062
  var SUPPORTED_RUNTIME_MAJORS = [RUNTIME_PROTOCOL_VERSION.major];
21807
22063
  var hostReleaseCapabilitiesSchema = external_exports.object({
21808
22064
  format: external_exports.literal(1),
@@ -21815,7 +22071,42 @@ var hostReleaseCapabilitiesSchema = external_exports.object({
21815
22071
  database_schema_version: external_exports.number().int().nonnegative().max(2 ** 31 - 1).optional()
21816
22072
  }).strict();
21817
22073
 
22074
+ // ../shared/src/installation/release-manifest.ts
22075
+ init_define_PUDDLE_COMPONENT_VERSIONS();
22076
+ var releaseVersionSchema = external_exports.string().max(64).regex(/^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/);
22077
+ var releaseComponentSchema = external_exports.enum(["cockpit", "daemon", "runtime"]);
22078
+ var releaseManifestSchema = external_exports.object({
22079
+ format: external_exports.literal(1),
22080
+ version: releaseVersionSchema,
22081
+ components: external_exports.object({
22082
+ cockpit: releaseVersionSchema,
22083
+ daemon: releaseVersionSchema,
22084
+ runtime: releaseVersionSchema
22085
+ }).strict()
22086
+ }).strict().superRefine((manifest, context) => {
22087
+ if (![manifest.version, ...Object.values(manifest.components)].every(
22088
+ (version2) => releaseVersionSchema.safeParse(version2).success
22089
+ ))
22090
+ return;
22091
+ for (const [component2, version2] of Object.entries(manifest.components)) {
22092
+ if (compareReleaseVersions(version2, manifest.version) > 0)
22093
+ context.addIssue({ code: "custom", message: `${component2} points beyond its release` });
22094
+ }
22095
+ if (manifest.components.cockpit !== manifest.version)
22096
+ context.addIssue({ code: "custom", message: "Every release publishes its cockpit" });
22097
+ });
22098
+ function compareReleaseVersions(a, b) {
22099
+ const left = a.split(".").map(BigInt);
22100
+ const right = b.split(".").map(BigInt);
22101
+ for (let i = 0; i < 3; i++) {
22102
+ if (left[i] < right[i]) return -1;
22103
+ if (left[i] > right[i]) return 1;
22104
+ }
22105
+ return 0;
22106
+ }
22107
+
21818
22108
  // ../shared/src/installation/removal/services.ts
22109
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21819
22110
  var service = hostServiceReplacementSchema.shape;
21820
22111
  var target = external_exports.object({ kind: service.kind, name: service.name, domain: service.domain }).strict();
21821
22112
  var process3 = target.extend({
@@ -21906,6 +22197,7 @@ var hostRemovalServicesSchema = external_exports.object({
21906
22197
  var HOST_REMOVAL_SERVICES_BYTES = 256 * 1024;
21907
22198
 
21908
22199
  // ../shared/src/installation/removal/restore.ts
22200
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21909
22201
  var hostRemovalRestoreActionSchema = external_exports.enum([
21910
22202
  "restore-connector",
21911
22203
  "restore-daemon",
@@ -21946,6 +22238,7 @@ var hostRemovalRestoreSchema = external_exports.object({
21946
22238
  });
21947
22239
 
21948
22240
  // ../shared/src/installation/removal/status.ts
22241
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21949
22242
  var hostRemovalStatusSchema = external_exports.discriminatedUnion("state", [
21950
22243
  external_exports.object({ state: external_exports.literal("none") }).strict(),
21951
22244
  external_exports.object({
@@ -21955,6 +22248,7 @@ var hostRemovalStatusSchema = external_exports.discriminatedUnion("state", [
21955
22248
  ]);
21956
22249
 
21957
22250
  // ../shared/src/installation/removal/runtime.ts
22251
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21958
22252
  var HOST_REMOVAL_RUNTIME_LIMIT = 1024;
21959
22253
  var fingerprint5 = external_exports.string().regex(/^[0-9a-f]{64}$/);
21960
22254
  var hostRemovalRuntimeReviewSchema = external_exports.object({
@@ -21978,6 +22272,7 @@ var hostRemovalFinishSchema = external_exports.object({
21978
22272
  }).strict();
21979
22273
 
21980
22274
  // ../shared/src/installation/removal/purge.ts
22275
+ init_define_PUDDLE_COMPONENT_VERSIONS();
21981
22276
  var fingerprint6 = external_exports.string().regex(/^[a-f0-9]{64}$/);
21982
22277
  var HOST_PURGE_RECORD_BYTES = 4 * 1024 * 1024;
21983
22278
  var HOST_PURGE_ANCHORS = [
@@ -22030,15 +22325,18 @@ var hostPurgeApplySchema = external_exports.object({
22030
22325
  }).strict();
22031
22326
 
22032
22327
  // src/cli/remote.ts
22328
+ init_define_PUDDLE_COMPONENT_VERSIONS();
22033
22329
  import { createInterface } from "node:readline";
22034
22330
  import { Writable } from "node:stream";
22035
22331
 
22036
22332
  // src/lib/transport/local.ts
22333
+ init_define_PUDDLE_COMPONENT_VERSIONS();
22037
22334
  import { spawn } from "node:child_process";
22038
22335
  import { copyFileSync, mkdirSync, readFileSync } from "node:fs";
22039
22336
  import { dirname } from "node:path";
22040
22337
 
22041
22338
  // src/lib/paths.ts
22339
+ init_define_PUDDLE_COMPONENT_VERSIONS();
22042
22340
  import { homedir } from "node:os";
22043
22341
  import { join } from "node:path";
22044
22342
  function clientHome(env = process.env) {
@@ -22057,39 +22355,51 @@ var hostPaths = {
22057
22355
  pid: `${HOST_HOME}/puddled.pid`
22058
22356
  };
22059
22357
 
22358
+ // src/lib/transport/exec-output.ts
22359
+ init_define_PUDDLE_COMPONENT_VERSIONS();
22360
+ var STDERR_TAIL_LENGTH = 64 * 1024;
22361
+ function collectExecOutput(child, opts) {
22362
+ return new Promise((resolve6) => {
22363
+ let stdout = "";
22364
+ let stderr = "";
22365
+ const appendStderr = (text2) => {
22366
+ stderr += text2;
22367
+ if (opts.capture === "stream") stderr = stderr.slice(-STDERR_TAIL_LENGTH);
22368
+ };
22369
+ let timer;
22370
+ if (opts.timeoutMs !== void 0) {
22371
+ timer = setTimeout(() => child.kill("SIGKILL"), opts.timeoutMs);
22372
+ timer.unref();
22373
+ }
22374
+ child.stdout.setEncoding("utf8");
22375
+ child.stderr.setEncoding("utf8");
22376
+ child.stdout.on("data", (text2) => {
22377
+ if (opts.capture !== "stream") stdout += text2;
22378
+ opts.onStdout?.(text2);
22379
+ });
22380
+ child.stderr.on("data", appendStderr);
22381
+ child.on("error", (err) => {
22382
+ if (timer) clearTimeout(timer);
22383
+ appendStderr(String(err));
22384
+ resolve6({ code: -1, stdout, stderr });
22385
+ });
22386
+ child.on("close", (code) => {
22387
+ if (timer) clearTimeout(timer);
22388
+ resolve6({ code: code ?? -1, stdout, stderr });
22389
+ });
22390
+ child.stdin.on("error", () => {
22391
+ });
22392
+ child.stdin.end(opts.stdin);
22393
+ });
22394
+ }
22395
+
22060
22396
  // src/lib/transport/local.ts
22061
22397
  var LocalTransport = class {
22062
22398
  kind = "local";
22063
22399
  label = "this machine";
22064
22400
  exec(command, opts = {}) {
22065
- return new Promise((resolve6) => {
22066
- const child = spawn("sh", ["-c", command], { stdio: ["pipe", "pipe", "pipe"] });
22067
- let stdout = "";
22068
- let stderr = "";
22069
- let timer;
22070
- if (opts.timeoutMs !== void 0) {
22071
- timer = setTimeout(() => child.kill("SIGKILL"), opts.timeoutMs);
22072
- timer.unref();
22073
- }
22074
- child.stdout.on("data", (chunk) => {
22075
- const text2 = chunk.toString();
22076
- stdout += text2;
22077
- opts.onStdout?.(text2);
22078
- });
22079
- child.stderr.on("data", (chunk) => stderr += chunk.toString());
22080
- child.on("error", (err) => {
22081
- if (timer) clearTimeout(timer);
22082
- resolve6({ code: -1, stdout, stderr: stderr + String(err) });
22083
- });
22084
- child.on("close", (code) => {
22085
- if (timer) clearTimeout(timer);
22086
- resolve6({ code: code ?? -1, stdout, stderr });
22087
- });
22088
- child.stdin.on("error", () => {
22089
- });
22090
- if (opts.stdin !== void 0) child.stdin.end(opts.stdin);
22091
- else child.stdin.end();
22092
- });
22401
+ const child = spawn("sh", ["-c", command], { stdio: ["pipe", "pipe", "pipe"] });
22402
+ return collectExecOutput(child, opts);
22093
22403
  }
22094
22404
  readFile(path2) {
22095
22405
  try {
@@ -22112,6 +22422,7 @@ function expandHome(path2) {
22112
22422
  }
22113
22423
 
22114
22424
  // src/lib/transport/ssh.ts
22425
+ init_define_PUDDLE_COMPONENT_VERSIONS();
22115
22426
  import { Duplex } from "node:stream";
22116
22427
  import { spawn as spawn2 } from "node:child_process";
22117
22428
  import { mkdirSync as mkdirSync2 } from "node:fs";
@@ -22236,37 +22547,11 @@ var SshTransport = class {
22236
22547
  });
22237
22548
  }
22238
22549
  exec(command, opts = {}) {
22239
- return new Promise((resolve6) => {
22240
- const child = spawn2(this.ssh, this.args(this.host, "--", `sh -c ${shellQuote(command)}`), {
22241
- stdio: ["pipe", "pipe", "pipe"],
22242
- env: this.spawnEnv()
22243
- });
22244
- let stdout = "";
22245
- let stderr = "";
22246
- let timer;
22247
- if (opts.timeoutMs !== void 0) {
22248
- timer = setTimeout(() => child.kill("SIGKILL"), opts.timeoutMs);
22249
- timer.unref();
22250
- }
22251
- child.stdout.on("data", (chunk) => {
22252
- const text2 = chunk.toString();
22253
- stdout += text2;
22254
- opts.onStdout?.(text2);
22255
- });
22256
- child.stderr.on("data", (chunk) => stderr += chunk.toString());
22257
- child.on("error", (err) => {
22258
- if (timer) clearTimeout(timer);
22259
- resolve6({ code: -1, stdout, stderr: stderr + String(err) });
22260
- });
22261
- child.on("close", (code) => {
22262
- if (timer) clearTimeout(timer);
22263
- resolve6({ code: code ?? -1, stdout, stderr });
22264
- });
22265
- child.stdin.on("error", () => {
22266
- });
22267
- if (opts.stdin !== void 0) child.stdin.end(opts.stdin);
22268
- else child.stdin.end();
22550
+ const child = spawn2(this.ssh, this.args(this.host, "--", `sh -c ${shellQuote(command)}`), {
22551
+ stdio: ["pipe", "pipe", "pipe"],
22552
+ env: this.spawnEnv()
22269
22553
  });
22554
+ return collectExecOutput(child, opts);
22270
22555
  }
22271
22556
  /**
22272
22557
  * Run a command through a live SSH channel instead of waiting for a detached
@@ -22587,8 +22872,14 @@ uninstalls a component after confirmation. On persistent hosts, daemon removal
22587
22872
  disables remote access and stops daemon-owned work, then retains independent
22588
22873
  runtimes by default. --stop-runtimes explicitly stops the reviewed runtimes and
22589
22874
  their shell jobs. Data and pinned releases remain for 'puddle install daemon'.
22590
- Coordinated --purge on persistent hosts is not implemented yet; it refuses before
22591
- mutation. Legacy removal keeps data unless you separately confirm --purge.`;
22875
+ Coordinated --purge requires a compatible daemon (feature introduced in application
22876
+ 25.20) and separate runtime-stop consent (--yes --purge --stop-runtimes for
22877
+ non-interactive use). After removal,
22878
+ reboot the target and rerun the explicit purge command to delete reviewed managed
22879
+ data. Installation locks, private recovery records and retained releases remain.
22880
+ Unsupported persistent hosts refuse purge before mutation; upgrade first or use a
22881
+ compatible removal client to retain data.
22882
+ Legacy removal keeps data unless you separately confirm --purge.`;
22592
22883
  function parseArgs(argv) {
22593
22884
  const [cmd, ...rest] = argv;
22594
22885
  if (cmd === "remote") return parseRemoteArgs(rest);
@@ -22885,7 +23176,14 @@ function argvFor(command) {
22885
23176
  return argv;
22886
23177
  }
22887
23178
 
23179
+ // src/cli/run.ts
23180
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23181
+
23182
+ // src/cli/daemon-upgrade-prompt.ts
23183
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23184
+
22888
23185
  // src/lib/installation/host/approval.ts
23186
+ init_define_PUDDLE_COMPONENT_VERSIONS();
22889
23187
  function hostUpdateInterruptionMessage(host, { operation: operation2, review }) {
22890
23188
  const { terminals, notebooks, compilation, programmes } = review.affected;
22891
23189
  const targets = operation2.targets.map(({ component: component2, version: version2 }) => `${component2} ${version2}`);
@@ -22898,6 +23196,7 @@ Their shell jobs and in-memory state will be lost. Independently hosted runtimes
22898
23196
  import { randomUUID } from "node:crypto";
22899
23197
 
22900
23198
  // src/lib/connection/handshake.ts
23199
+ init_define_PUDDLE_COMPONENT_VERSIONS();
22901
23200
  init_types();
22902
23201
  var CLI_UPGRADE_COMMAND = "puddle upgrade cli";
22903
23202
  function decideHandshake(cli, daemon) {
@@ -22979,6 +23278,7 @@ async function runHandshake(opts) {
22979
23278
  }
22980
23279
 
22981
23280
  // src/cli/prompt.ts
23281
+ init_define_PUDDLE_COMPONENT_VERSIONS();
22982
23282
  init_types();
22983
23283
  import { createInterface as createInterface2 } from "node:readline";
22984
23284
  async function ask(question, def) {
@@ -23079,7 +23379,154 @@ function relayDaemonUpgradePrompt(child, ask2 = askToUpgrade) {
23079
23379
  };
23080
23380
  }
23081
23381
 
23382
+ // src/lib/auth/connection-authority.ts
23383
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23384
+
23385
+ // ../shared/src/node/host-control.ts
23386
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23387
+
23388
+ // ../shared/src/node/releases/components.ts
23389
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23390
+
23391
+ // ../shared/src/node/releases/github.ts
23392
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23393
+ var assetSchema = external_exports.object({
23394
+ name: external_exports.string().min(1).max(256),
23395
+ browser_download_url: external_exports.string().max(2048).url().refine((value) => value.startsWith("https://"))
23396
+ });
23397
+ var releaseSchema = external_exports.object({
23398
+ tag_name: external_exports.string().max(129).regex(/^v?[0-9]+\.[0-9]+\.[0-9]+$/),
23399
+ draft: external_exports.literal(false).optional(),
23400
+ prerelease: external_exports.literal(false).optional(),
23401
+ assets: external_exports.array(assetSchema).max(1024).default([])
23402
+ });
23403
+ async function latestGitHubRelease(repository, options = {}) {
23404
+ return githubRelease(repository, "latest", options);
23405
+ }
23406
+ async function githubRelease(repository, ref, options = {}) {
23407
+ releaseRepositorySchema.parse(repository);
23408
+ const timeout = AbortSignal.timeout(1e4);
23409
+ const signal = options.signal ? AbortSignal.any([timeout, options.signal]) : timeout;
23410
+ const response = await (options.fetchFn ?? fetch)(
23411
+ `https://api.github.com/repos/${repository}/releases/${ref}`,
23412
+ {
23413
+ headers: { accept: "application/vnd.github+json", "user-agent": "puddle" },
23414
+ signal
23415
+ }
23416
+ );
23417
+ if (!response.ok) {
23418
+ await response.body?.cancel().catch(() => {
23419
+ });
23420
+ throw new Error(`release lookup failed (HTTP ${response.status})`);
23421
+ }
23422
+ if (!response.body) throw new Error("Release lookup returned no body");
23423
+ const reader = response.body.getReader();
23424
+ const chunks = [];
23425
+ let size2 = 0;
23426
+ try {
23427
+ while (true) {
23428
+ signal.throwIfAborted();
23429
+ const { value, done } = await reader.read();
23430
+ if (done) break;
23431
+ size2 += value.byteLength;
23432
+ if (size2 > 1024 * 1024) throw new Error("Release metadata exceeds its limit");
23433
+ chunks.push(value);
23434
+ }
23435
+ const release = releaseSchema.parse(JSON.parse(Buffer.concat(chunks).toString("utf8")));
23436
+ return { version: release.tag_name.replace(/^v/, ""), assets: release.assets };
23437
+ } finally {
23438
+ await reader.cancel().catch(() => {
23439
+ });
23440
+ reader.releaseLock();
23441
+ }
23442
+ }
23443
+
23444
+ // ../shared/src/node/releases/components.ts
23445
+ var RELEASE_MANIFEST_ASSET = "release-manifest.json";
23446
+ async function releaseManifest(repository, release, options = {}) {
23447
+ releaseRepositorySchema.parse(repository);
23448
+ releaseVersionSchema.parse(release.version);
23449
+ const legacy = {
23450
+ format: 1,
23451
+ version: release.version,
23452
+ components: { cockpit: release.version, daemon: release.version, runtime: release.version }
23453
+ };
23454
+ if (!release.assets.some((asset) => asset.name === RELEASE_MANIFEST_ASSET))
23455
+ return releaseManifestSchema.parse(legacy);
23456
+ const response = await (options.fetchFn ?? fetch)(
23457
+ `https://github.com/${repository}/releases/download/v${release.version}/${RELEASE_MANIFEST_ASSET}`,
23458
+ {
23459
+ signal: options.signal ? AbortSignal.any([options.signal, AbortSignal.timeout(1e4)]) : AbortSignal.timeout(1e4)
23460
+ }
23461
+ );
23462
+ if (!response.ok || !response.body) {
23463
+ await response.body?.cancel().catch(() => {
23464
+ });
23465
+ throw new Error("Release manifest is unavailable");
23466
+ }
23467
+ const reader = response.body.getReader();
23468
+ const chunks = [];
23469
+ let size2 = 0;
23470
+ try {
23471
+ while (true) {
23472
+ const { done, value } = await reader.read();
23473
+ if (done) break;
23474
+ size2 += value.byteLength;
23475
+ if (size2 > 16 * 1024) throw new Error("Release manifest exceeds its limit");
23476
+ chunks.push(value);
23477
+ }
23478
+ const manifest = releaseManifestSchema.parse(
23479
+ JSON.parse(Buffer.concat(chunks).toString("utf8"))
23480
+ );
23481
+ if (manifest.version !== release.version) throw new Error("Release manifest tag mismatch");
23482
+ return manifest;
23483
+ } finally {
23484
+ await reader.cancel().catch(() => {
23485
+ });
23486
+ reader.releaseLock();
23487
+ }
23488
+ }
23489
+ async function latestComponentReleases(repository, options = {}) {
23490
+ const latest = await latestGitHubRelease(repository, options);
23491
+ const manifest = await releaseManifest(repository, latest, options);
23492
+ const versions = /* @__PURE__ */ new Map([[latest.version, latest]]);
23493
+ for (const version2 of new Set(Object.values(manifest.components))) {
23494
+ if (versions.has(version2)) continue;
23495
+ const release = await githubRelease(repository, `tags/v${version2}`, options);
23496
+ if (release.version !== version2) throw new Error("Component release tag mismatch");
23497
+ versions.set(version2, release);
23498
+ }
23499
+ for (const component2 of ["daemon", "runtime"]) {
23500
+ const version2 = manifest.components[component2];
23501
+ if (version2 === latest.version) continue;
23502
+ const target2 = versions.get(version2);
23503
+ const targetManifest = await releaseManifest(repository, target2, options);
23504
+ if (targetManifest.components[component2] !== version2)
23505
+ throw new Error(`Manifest refers to an unpublished ${component2}`);
23506
+ }
23507
+ return {
23508
+ version: latest.version,
23509
+ components: {
23510
+ cockpit: versions.get(manifest.components.cockpit),
23511
+ daemon: versions.get(manifest.components.daemon),
23512
+ runtime: versions.get(manifest.components.runtime)
23513
+ }
23514
+ };
23515
+ }
23516
+ async function componentReleaseAt(repository, component2, version2, options = {}) {
23517
+ releaseVersionSchema.parse(version2);
23518
+ const release = await githubRelease(repository, `tags/v${version2}`, options);
23519
+ if (release.version !== version2) throw new Error("Component release tag mismatch");
23520
+ const manifest = await releaseManifest(repository, release, options);
23521
+ if (manifest.components[component2] !== version2)
23522
+ throw new Error(
23523
+ `No ${component2} was published for v${version2}; this release uses v${manifest.components[component2]}`
23524
+ );
23525
+ return { ...release, manifest };
23526
+ }
23527
+
23082
23528
  // ../shared/src/node/control/update-authority.ts
23529
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23083
23530
  var HostUpdateOnlyScope = class {
23084
23531
  outgoing;
23085
23532
  targetVersion;
@@ -23148,11 +23595,13 @@ var HostUpdateOnlyScope = class {
23148
23595
  };
23149
23596
 
23150
23597
  // ../shared/src/node/installation/capabilities.ts
23598
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23151
23599
  import { constants as constants2 } from "node:fs";
23152
23600
  import { open, realpath } from "node:fs/promises";
23153
23601
  import { dirname as dirname3, join as join3 } from "node:path";
23154
23602
 
23155
23603
  // ../shared/src/node/security.ts
23604
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23156
23605
  import { createHash, randomBytes } from "node:crypto";
23157
23606
  import {
23158
23607
  chmodSync,
@@ -23395,60 +23844,13 @@ async function readInstalledCapabilities(root2) {
23395
23844
  }
23396
23845
 
23397
23846
  // ../shared/src/node/installation/boot.ts
23847
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23398
23848
  import { execFile } from "node:child_process";
23399
23849
  import { promisify } from "node:util";
23400
23850
  var execute = promisify(execFile);
23401
23851
 
23402
- // ../shared/src/node/releases/github.ts
23403
- var assetSchema = external_exports.object({
23404
- name: external_exports.string().min(1).max(256),
23405
- browser_download_url: external_exports.string().max(2048).url().refine((value) => value.startsWith("https://"))
23406
- });
23407
- var releaseSchema = external_exports.object({
23408
- tag_name: external_exports.string().max(129).regex(/^v?[0-9]+\.[0-9]+\.[0-9]+$/),
23409
- draft: external_exports.literal(false).optional(),
23410
- prerelease: external_exports.literal(false).optional(),
23411
- assets: external_exports.array(assetSchema).max(1024).default([])
23412
- });
23413
- async function latestGitHubRelease(repository, options = {}) {
23414
- releaseRepositorySchema.parse(repository);
23415
- const timeout = AbortSignal.timeout(1e4);
23416
- const signal = options.signal ? AbortSignal.any([timeout, options.signal]) : timeout;
23417
- const response = await (options.fetchFn ?? fetch)(
23418
- `https://api.github.com/repos/${repository}/releases/latest`,
23419
- {
23420
- headers: { accept: "application/vnd.github+json", "user-agent": "puddle" },
23421
- signal
23422
- }
23423
- );
23424
- if (!response.ok) {
23425
- await response.body?.cancel().catch(() => {
23426
- });
23427
- throw new Error(`release lookup failed (HTTP ${response.status})`);
23428
- }
23429
- if (!response.body) throw new Error("Release lookup returned no body");
23430
- const reader = response.body.getReader();
23431
- const chunks = [];
23432
- let size2 = 0;
23433
- try {
23434
- while (true) {
23435
- signal.throwIfAborted();
23436
- const { value, done } = await reader.read();
23437
- if (done) break;
23438
- size2 += value.byteLength;
23439
- if (size2 > 1024 * 1024) throw new Error("Release metadata exceeds its limit");
23440
- chunks.push(value);
23441
- }
23442
- const release = releaseSchema.parse(JSON.parse(Buffer.concat(chunks).toString("utf8")));
23443
- return { version: release.tag_name.replace(/^v/, ""), assets: release.assets };
23444
- } finally {
23445
- await reader.cancel().catch(() => {
23446
- });
23447
- reader.releaseLock();
23448
- }
23449
- }
23450
-
23451
23852
  // ../shared/src/node/releases/source.ts
23853
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23452
23854
  function releaseRepository(env = process.env) {
23453
23855
  const value = env.PUDDLE_REPO || (false ? void 0 : "PerceptronV/puddle-code");
23454
23856
  const parsed = releaseRepositorySchema.safeParse(value);
@@ -23456,6 +23858,7 @@ function releaseRepository(env = process.env) {
23456
23858
  }
23457
23859
 
23458
23860
  // ../shared/src/node/installation/workers.ts
23861
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23459
23862
  import { accessSync, constants as constants3, realpathSync as realpathSync2, statSync } from "node:fs";
23460
23863
  import { dirname as dirname4, isAbsolute, join as join4 } from "node:path";
23461
23864
  function updateWorkerExecutables(home, release) {
@@ -23480,7 +23883,23 @@ function updateWorkerExecutables(home, release) {
23480
23883
  };
23481
23884
  }
23482
23885
 
23886
+ // ../shared/src/node/installation/removal.ts
23887
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23888
+
23889
+ // ../shared/src/node/installation/removal-records.ts
23890
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23891
+
23892
+ // ../shared/src/node/installation/purge.ts
23893
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23894
+
23895
+ // ../shared/src/node/installation/participation.ts
23896
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23897
+
23898
+ // ../shared/src/node/control/updates.ts
23899
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23900
+
23483
23901
  // ../shared/src/node/control/requests.ts
23902
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23484
23903
  import { randomUUID as randomUUID2 } from "node:crypto";
23485
23904
  var HOST_CONTROL_REQUEST_LIMITS = {
23486
23905
  pending: 4,
@@ -23550,6 +23969,7 @@ var HostUpdateRequests = class extends HostControlRequests {
23550
23969
  };
23551
23970
 
23552
23971
  // ../shared/src/node/installation/preparation.ts
23972
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23553
23973
  var HostUpdatePreparationError = class extends Error {
23554
23974
  constructor(code, message) {
23555
23975
  super(message);
@@ -23609,6 +24029,7 @@ async function prepareHostUpdateOperation(input, deps) {
23609
24029
  }
23610
24030
 
23611
24031
  // ../shared/src/node/installation/stage-receipt.ts
24032
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23612
24033
  function validateHostStageReceipt(value) {
23613
24034
  const receipt = hostStageReceiptSchema.parse(value);
23614
24035
  if (digest(`${JSON.stringify(receipt.record)}
@@ -23628,6 +24049,7 @@ function parseHostStageOutput(output, component2, version2) {
23628
24049
  }
23629
24050
 
23630
24051
  // ../shared/src/node/installation/recovery.ts
24052
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23631
24053
  import { join as join5 } from "node:path";
23632
24054
  function updateRecoveryDirectory(home, operationId) {
23633
24055
  hostUpdateOperationSchema.shape.id.parse(operationId);
@@ -23663,6 +24085,7 @@ function inspectRecordedRecovery(home, operation2) {
23663
24085
  }
23664
24086
 
23665
24087
  // ../shared/src/node/installation/updates.ts
24088
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23666
24089
  import { lstatSync as lstatSync2 } from "node:fs";
23667
24090
  import { join as join6 } from "node:path";
23668
24091
  function validateHostUpdateLedger(value) {
@@ -23969,6 +24392,7 @@ var HostControlClient = class {
23969
24392
  init_types();
23970
24393
 
23971
24394
  // src/lib/auth/control-channel.ts
24395
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23972
24396
  init_types();
23973
24397
  import { randomUUID as randomUUID3 } from "node:crypto";
23974
24398
  import { connect as connect3 } from "node:net";
@@ -23977,6 +24401,7 @@ import { dirname as dirname5, join as join9 } from "node:path";
23977
24401
  import { fileURLToPath } from "node:url";
23978
24402
 
23979
24403
  // src/lib/auth/host-inspection.ts
24404
+ init_define_PUDDLE_COMPONENT_VERSIONS();
23980
24405
  import { connect as connect2 } from "node:net";
23981
24406
  init_types();
23982
24407
  import { readFile } from "node:fs/promises";
@@ -24073,6 +24498,7 @@ async function inspectHostLocally(home) {
24073
24498
  }
24074
24499
 
24075
24500
  // src/lib/host/updates/inspection.ts
24501
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24076
24502
  function inspectStoredHostUpdate(home, input) {
24077
24503
  const command = hostUpdateCommandSchema.parse(input);
24078
24504
  if (command.action !== "status" || command.adoption_nonce)
@@ -24091,6 +24517,7 @@ function inspectStoredHostUpdate(home, input) {
24091
24517
  }
24092
24518
 
24093
24519
  // src/lib/host/updates/continuation.ts
24520
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24094
24521
  import { execFile as execFile2 } from "node:child_process";
24095
24522
  import { join as join8 } from "node:path";
24096
24523
  function supportsParticipatingRecovery(protocol2) {
@@ -24164,6 +24591,7 @@ async function continueStoredHostUpdate(home, input, participation) {
24164
24591
  }
24165
24592
 
24166
24593
  // src/lib/host/updates/channel.ts
24594
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24167
24595
  async function requestParticipatingUpdate(channel, command, signal, authorised) {
24168
24596
  const requests = new HostUpdateRequests(channel);
24169
24597
  const close = () => {
@@ -24357,6 +24785,7 @@ import { dirname as dirname15, join as join22 } from "node:path";
24357
24785
  import { fileURLToPath as fileURLToPath5 } from "node:url";
24358
24786
 
24359
24787
  // src/lib/serve/browser.ts
24788
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24360
24789
  import { spawn as spawn3 } from "node:child_process";
24361
24790
  function openBrowser(url2, platform = process.platform) {
24362
24791
  const command = platform === "darwin" ? { bin: "open", args: [url2] } : platform === "win32" ? { bin: "cmd", args: ["/c", "start", "", url2] } : { bin: "xdg-open", args: [url2] };
@@ -24372,6 +24801,7 @@ function openBrowser(url2, platform = process.platform) {
24372
24801
  }
24373
24802
 
24374
24803
  // src/lib/installation/component-versions.ts
24804
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24375
24805
  import {
24376
24806
  existsSync as existsSync2,
24377
24807
  mkdirSync as mkdirSync4,
@@ -24383,6 +24813,7 @@ import {
24383
24813
  import { dirname as dirname8, join as join12, resolve as resolve2 } from "node:path";
24384
24814
 
24385
24815
  // src/lib/installation/desktop-update.ts
24816
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24386
24817
  import { createHash as createHash2 } from "node:crypto";
24387
24818
  import { spawn as spawn4 } from "node:child_process";
24388
24819
  import { constants as constants4, createReadStream, createWriteStream } from "node:fs";
@@ -24393,11 +24824,12 @@ import { pipeline } from "node:stream/promises";
24393
24824
  init_types();
24394
24825
 
24395
24826
  // src/lib/version.ts
24827
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24396
24828
  import { readFileSync as readFileSync4 } from "node:fs";
24397
24829
  import { dirname as dirname6, join as join10 } from "node:path";
24398
24830
  import { fileURLToPath as fileURLToPath2 } from "node:url";
24399
24831
  function cliVersion() {
24400
- if (true) return "0.4.8";
24832
+ if (true) return "0.4.10";
24401
24833
  const here = dirname6(fileURLToPath2(import.meta.url));
24402
24834
  for (const candidate of [
24403
24835
  join10(here, "..", "..", "package.json"),
@@ -24412,7 +24844,10 @@ function cliVersion() {
24412
24844
  return "0.0.0";
24413
24845
  }
24414
24846
  function pinnedDaemonVersion() {
24415
- return cliVersion();
24847
+ return pinnedHostVersion("daemon");
24848
+ }
24849
+ function pinnedHostVersion(component2) {
24850
+ return typeof define_PUDDLE_COMPONENT_VERSIONS_default === "undefined" ? cliVersion() : define_PUDDLE_COMPONENT_VERSIONS_default[component2];
24416
24851
  }
24417
24852
 
24418
24853
  // src/lib/installation/desktop-update.ts
@@ -24801,7 +25236,9 @@ var RELEASE_PROTOCOLS = {
24801
25236
  "0.4.5": { major: 26, minor: 1 },
24802
25237
  "0.4.6": { major: 26, minor: 1 },
24803
25238
  "0.4.7": { major: 26, minor: 1 },
24804
- "0.4.8": { major: 26, minor: 1 }
25239
+ "0.4.8": { major: 26, minor: 1 },
25240
+ "0.4.9": { major: 26, minor: 3 },
25241
+ "0.4.10": { major: 26, minor: 6 }
24805
25242
  };
24806
25243
  function validProtocol(value) {
24807
25244
  if (typeof value !== "object" || value === null) return false;
@@ -24948,12 +25385,18 @@ function formatComponentVersions(components) {
24948
25385
  }
24949
25386
 
24950
25387
  // src/lib/connection/connect.ts
25388
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24951
25389
  import { join as join17 } from "node:path";
24952
25390
 
24953
25391
  // src/lib/connection/attached-daemon.ts
25392
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24954
25393
  import { randomUUID as randomUUID4 } from "node:crypto";
24955
25394
 
25395
+ // src/lib/auth/readiness.ts
25396
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25397
+
24956
25398
  // src/lib/transport/net.ts
25399
+ init_define_PUDDLE_COMPONENT_VERSIONS();
24957
25400
  import { connect as connect4, createServer as createServer2 } from "node:net";
24958
25401
  function findFreePort() {
24959
25402
  return new Promise((resolve6, reject) => {
@@ -25191,6 +25634,7 @@ var AttachedDaemon = class {
25191
25634
  };
25192
25635
 
25193
25636
  // src/lib/connection/daemon-client.ts
25637
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25194
25638
  init_types();
25195
25639
  var LIVE = /* @__PURE__ */ new Set(["starting", "running", "waiting_input"]);
25196
25640
  var DaemonClient = class {
@@ -25260,7 +25704,11 @@ async function readDaemonPort(transport) {
25260
25704
  return 7434;
25261
25705
  }
25262
25706
 
25707
+ // src/lib/connection/cockpit.ts
25708
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25709
+
25263
25710
  // src/lib/installation/bootstrap.ts
25711
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25264
25712
  import { existsSync as existsSync3, readFileSync as readFileSync6 } from "node:fs";
25265
25713
  import { dirname as dirname9, join as join13, resolve as resolve3 } from "node:path";
25266
25714
  import { fileURLToPath as fileURLToPath3 } from "node:url";
@@ -25285,7 +25733,7 @@ async function installHostComponent(transport, component2, opts = {}) {
25285
25733
  }
25286
25734
  async function bootstrapHostComponent(transport, component2, opts = {}, action = "install") {
25287
25735
  const logger = opts.logger ?? silentLogger;
25288
- const version2 = opts.version ?? pinnedDaemonVersion();
25736
+ const version2 = opts.version ?? pinnedHostVersion(component2);
25289
25737
  const args = ["--version", version2, "--component", component2];
25290
25738
  if (action === "stage") args.push("--stage-only");
25291
25739
  if (opts.tarball !== void 0 && !/^https?:\/\//.test(opts.tarball)) {
@@ -25321,6 +25769,17 @@ async function bootstrapHostComponent(transport, component2, opts = {}, action =
25321
25769
  "pass --tarball <path> (pnpm build:tarball produces one) or set PUDDLE_REPO=owner/repo"
25322
25770
  );
25323
25771
  }
25772
+ if (action === "install" && component2 === "daemon") {
25773
+ const release = await componentReleaseAt(slug2, "daemon", version2);
25774
+ const runtimeVersion = release.manifest.components.runtime;
25775
+ if (runtimeVersion !== version2 && await installedVersion(transport, "runtime") === null)
25776
+ await bootstrapHostComponent(
25777
+ transport,
25778
+ "runtime",
25779
+ { ...opts, version: runtimeVersion, repository: slug2 },
25780
+ "install"
25781
+ );
25782
+ }
25324
25783
  args.push("--repo", slug2);
25325
25784
  }
25326
25785
  logger.info(
@@ -25367,6 +25826,7 @@ function readInstallScript() {
25367
25826
  init_types();
25368
25827
 
25369
25828
  // src/lib/installation/host/presence.ts
25829
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25370
25830
  init_types();
25371
25831
  async function hasPersistentHostInstallation(transport) {
25372
25832
  const markers = [
@@ -25388,6 +25848,7 @@ async function hasPersistentHostInstallation(transport) {
25388
25848
  }
25389
25849
 
25390
25850
  // src/lib/installation/host/start.ts
25851
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25391
25852
  init_types();
25392
25853
  function startInstalledDaemon(transport, timeoutMs = 2e4) {
25393
25854
  return startSelectedDaemon(transport, () => waitForStartedDaemon(transport, timeoutMs));
@@ -25416,12 +25877,15 @@ async function startSelectedDaemon(transport, observe2) {
25416
25877
  }
25417
25878
 
25418
25879
  // src/lib/installation/upgrade.ts
25880
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25419
25881
  init_types();
25420
25882
 
25421
25883
  // src/lib/installation/host/upgrade.ts
25884
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25422
25885
  init_types();
25423
25886
 
25424
25887
  // src/lib/installation/host/apply.ts
25888
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25425
25889
  import { setTimeout as delay } from "node:timers/promises";
25426
25890
  init_types();
25427
25891
  var reference2 = ({ id: id3, revision: revision2 }) => ({ id: id3, revision: revision2 });
@@ -25536,14 +26000,16 @@ async function applyHostUpdate(authority, initial, onProgress = () => {
25536
26000
  }
25537
26001
 
25538
26002
  // src/lib/installation/host/updates.ts
26003
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25539
26004
  init_types();
25540
26005
 
25541
26006
  // src/lib/installation/host/staging.ts
26007
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25542
26008
  init_types();
25543
26009
  async function stageHostComponent(transport, component2, options = {}) {
25544
26010
  const output = await bootstrapHostComponent(transport, component2, options, "stage");
25545
26011
  try {
25546
- return parseHostStageOutput(output, component2, options.version ?? pinnedDaemonVersion());
26012
+ return parseHostStageOutput(output, component2, options.version ?? pinnedHostVersion(component2));
25547
26013
  } catch (error51) {
25548
26014
  throw new CliError(
25549
26015
  "not_installed",
@@ -25730,10 +26196,12 @@ async function detachedNohupWasReaped(transport) {
25730
26196
  }
25731
26197
 
25732
26198
  // src/lib/serve/ui-server.ts
26199
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25733
26200
  import { randomUUID as randomUUID5 } from "node:crypto";
25734
26201
  import { createServer as createServer3 } from "node:http";
25735
26202
 
25736
26203
  // src/lib/auth/launcher.ts
26204
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25737
26205
  import { connect as connect5 } from "node:net";
25738
26206
  import { join as join14 } from "node:path";
25739
26207
  function secretFile(home, path2) {
@@ -25800,6 +26268,7 @@ async function requestInvitation(home, path2) {
25800
26268
  init_types();
25801
26269
 
25802
26270
  // src/lib/serve/browser-authority.ts
26271
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25803
26272
  import { join as join15 } from "node:path";
25804
26273
  var BrowserAuthority = class {
25805
26274
  constructor(home, origin, target2, now = Date.now) {
@@ -25957,6 +26426,7 @@ var BrowserAuthority = class {
25957
26426
  };
25958
26427
 
25959
26428
  // src/lib/serve/http-auth.ts
26429
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25960
26430
  function json3(res, status, body) {
25961
26431
  res.writeHead(status, { "content-type": "application/json", "cache-control": "no-store" });
25962
26432
  res.end(JSON.stringify(body));
@@ -25983,6 +26453,7 @@ function exactOrigin(req, origin, required2 = false) {
25983
26453
  }
25984
26454
 
25985
26455
  // src/lib/serve/local-sync.ts
26456
+ init_define_PUDDLE_COMPONENT_VERSIONS();
25986
26457
  import { mkdirSync as mkdirSync5, readFileSync as readFileSync7, renameSync as renameSync3, writeFileSync as writeFileSync3 } from "node:fs";
25987
26458
  import { dirname as dirname10 } from "node:path";
25988
26459
  var MAX_BODY_BYTES = 5 * 1024 * 1024;
@@ -26052,6 +26523,7 @@ function handleLocalSync(req, res, opts, authorised) {
26052
26523
  }
26053
26524
 
26054
26525
  // src/lib/serve/static.ts
26526
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26055
26527
  import { createReadStream as createReadStream2, existsSync as existsSync4, statSync as statSync2 } from "node:fs";
26056
26528
  import { extname, join as join16, normalize, resolve as resolve4, sep } from "node:path";
26057
26529
  var MIME = {
@@ -26106,7 +26578,14 @@ function createStaticHandler(rootDir) {
26106
26578
  };
26107
26579
  }
26108
26580
 
26581
+ // src/lib/serve/proxy-gateway.ts
26582
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26583
+
26584
+ // src/lib/serve/proxy-recovery.ts
26585
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26586
+
26109
26587
  // src/lib/serve/guard.ts
26588
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26110
26589
  var LOCAL_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
26111
26590
  function hostnameOf(hostHeader) {
26112
26591
  if (hostHeader.startsWith("[")) return hostHeader.slice(0, hostHeader.indexOf("]") + 1);
@@ -26135,10 +26614,12 @@ function recoverProxiedPath(referer, requestUrl) {
26135
26614
  }
26136
26615
 
26137
26616
  // src/lib/serve/proxy.ts
26617
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26138
26618
  import { request as httpRequest } from "node:http";
26139
26619
  import { Transform } from "node:stream";
26140
26620
 
26141
26621
  // src/lib/serve/access.ts
26622
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26142
26623
  function openAccess(access2, close) {
26143
26624
  const resource = access2.authority.resource(close);
26144
26625
  const unbind = access2.browsers.bind(access2.browser, close);
@@ -26411,6 +26892,7 @@ fetch('./exchange', {method:'POST',headers:{'content-type':'application/json'},b
26411
26892
  }
26412
26893
 
26413
26894
  // src/lib/serve/ws-bridge.ts
26895
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26414
26896
  init_wrapper();
26415
26897
  var WsBridge = class {
26416
26898
  constructor(browsers, authority, target2) {
@@ -26531,6 +27013,7 @@ var WsBridge = class {
26531
27013
  };
26532
27014
 
26533
27015
  // src/lib/serve/remote-access.ts
27016
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26534
27017
  function remoteAccessHandler(control) {
26535
27018
  let busy = false;
26536
27019
  return async (req, res, authorised) => {
@@ -26564,6 +27047,7 @@ function remoteAccessHandler(control) {
26564
27047
  }
26565
27048
 
26566
27049
  // src/lib/serve/remote-registration.ts
27050
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26567
27051
  async function checkRemoteRegistration(req, res, authorised) {
26568
27052
  if (req.method !== "POST") return fail(res, 405, "method_not_allowed");
26569
27053
  const { service: service2, code } = cockpitRegistrationCheckSchema.parse(await readJson(req));
@@ -26599,6 +27083,7 @@ async function checkRemoteRegistration(req, res, authorised) {
26599
27083
  }
26600
27084
 
26601
27085
  // src/lib/serve/file-manager.ts
27086
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26602
27087
  function fileManagerHandler(manager) {
26603
27088
  let busy = false;
26604
27089
  return async (req, res, authorised) => {
@@ -26627,6 +27112,7 @@ function fileManagerHandler(manager) {
26627
27112
  }
26628
27113
 
26629
27114
  // src/lib/serve/host-updates.ts
27115
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26630
27116
  function hostUpdatesHandler(control) {
26631
27117
  let mutating = false;
26632
27118
  let readers = 0;
@@ -26635,7 +27121,7 @@ function hostUpdatesHandler(control) {
26635
27121
  if (req.method !== "GET" && req.method !== "POST") return fail(res, 405, "method_not_allowed");
26636
27122
  const url2 = new URL(req.url, "http://localhost");
26637
27123
  const query = cockpitHostUpdateQuerySchema.parse(Object.fromEntries(url2.searchParams));
26638
- if (url2.searchParams.getAll("id").length > 1 || req.method === "POST" && url2.search)
27124
+ if ([...url2.searchParams.keys()].some((key) => url2.searchParams.getAll(key).length > 1) || req.method === "POST" && url2.search)
26639
27125
  return fail(res, 400, "bad_request");
26640
27126
  const request = req.method === "POST" ? cockpitHostUpdateRequestSchema.parse(await readJson(req)) : null;
26641
27127
  if (!authorised()) return fail(res, 401, "browser_rejected");
@@ -26646,7 +27132,7 @@ function hostUpdatesHandler(control) {
26646
27132
  if (request) mutating = true;
26647
27133
  else readers++;
26648
27134
  try {
26649
- const result = request ? await control.request(request, authorised, signal) : await control.status(query.id, authorised, signal);
27135
+ const result = request ? await control.request(request, authorised, signal) : await control.status(query.id, authorised, signal, query.components === "1");
26650
27136
  if (!authorised()) return fail(res, 401, "browser_rejected");
26651
27137
  json3(res, 200, result);
26652
27138
  } catch {
@@ -26874,6 +27360,7 @@ async function listen(server, startPort, strict, avoidPort) {
26874
27360
  }
26875
27361
 
26876
27362
  // src/lib/host/remote-access.ts
27363
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26877
27364
  var binary2 = `${hostPaths.current}/bin/node ${hostPaths.current}/daemon/connector.mjs`;
26878
27365
  var RemoteAccessControl = class {
26879
27366
  constructor(transport) {
@@ -26946,6 +27433,7 @@ var RemoteAccessControl = class {
26946
27433
  };
26947
27434
 
26948
27435
  // src/lib/host/updates/cockpit.ts
27436
+ init_define_PUDDLE_COMPONENT_VERSIONS();
26949
27437
  var CockpitHostUpdates = class {
26950
27438
  constructor(transport, authority) {
26951
27439
  this.transport = transport;
@@ -26971,7 +27459,7 @@ var CockpitHostUpdates = class {
26971
27459
  }
26972
27460
  };
26973
27461
  }
26974
- async status(id3, authorised, signal) {
27462
+ async status(id3, authorised, signal, components = false) {
26975
27463
  if (!authorised() || signal.aborted) throw new Error("Browser authorisation expired");
26976
27464
  const generation = this.authority.generation;
26977
27465
  const availability = this.authority.state !== "ready" ? "unavailable" : this.supports(7) ? "ready" : "upgrade_required";
@@ -26987,7 +27475,8 @@ var CockpitHostUpdates = class {
26987
27475
  action: "status",
26988
27476
  ...id3 ? { id: id3 } : {},
26989
27477
  ...capabilities.continue_recovery ? { include_recovery: true } : {},
26990
- ...this.supports(14) ? { include_catalogue: true } : {}
27478
+ ...this.supports(14) ? { include_catalogue: true } : {},
27479
+ ...components && supportsApplicationFeature(this.authority.version?.protocol, { major: 26, minor: 2 }) ? { include_component_releases: true } : {}
26991
27480
  })
26992
27481
  ) : availability === "unavailable" ? await inspectHostUpdate(this.transport, id3, true) : null;
26993
27482
  if (!authorised() || signal.aborted) throw new Error("Browser authorisation expired");
@@ -27083,6 +27572,7 @@ var CockpitHostUpdates = class {
27083
27572
  };
27084
27573
 
27085
27574
  // src/lib/transport/tunnel.ts
27575
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27086
27576
  import { spawn as spawn5 } from "node:child_process";
27087
27577
  init_types();
27088
27578
  var RECONNECT_INITIAL_MS = 500;
@@ -27423,6 +27913,7 @@ async function closeRemoteResources(ui, oauthForward, endpoint, tunnel, ssh) {
27423
27913
  }
27424
27914
 
27425
27915
  // src/lib/logs.ts
27916
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27426
27917
  init_types();
27427
27918
  async function showLogs(transport, opts) {
27428
27919
  if (opts.session !== void 0) {
@@ -27430,6 +27921,7 @@ async function showLogs(transport, opts) {
27430
27921
  const command2 = opts.follow ? `tail -f -c 262144 ${file2}` : `tail -c 262144 ${file2}`;
27431
27922
  const result = await transport.exec(command2, {
27432
27923
  onStdout: opts.write,
27924
+ capture: "stream",
27433
27925
  ...opts.follow ? {} : { timeoutMs: 3e4 }
27434
27926
  });
27435
27927
  if (result.code !== 0 && !opts.follow) {
@@ -27442,10 +27934,11 @@ async function showLogs(transport, opts) {
27442
27934
  return;
27443
27935
  }
27444
27936
  const command = `if command -v journalctl >/dev/null 2>&1 && journalctl --user -u puddled -n 1 >/dev/null 2>&1; then journalctl --user -u puddled -n 200 --no-pager${opts.follow ? " -f" : ""}; elif [ -f ${hostPaths.logs}/puddled.out.log ]; then tail ${opts.follow ? "-f " : ""}-n 200 ${hostPaths.logs}/puddled.out.log ${hostPaths.logs}/puddled.err.log 2>/dev/null; else echo 'no daemon logs found \u2014 the daemon logs to its supervisor (journalctl --user -u puddled / ~/.puddle/logs)'; fi`;
27445
- await transport.exec(command, { onStdout: opts.write });
27937
+ await transport.exec(command, { onStdout: opts.write, capture: "stream" });
27446
27938
  }
27447
27939
 
27448
27940
  // src/lib/registry.ts
27941
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27449
27942
  import { readdirSync, readFileSync as readFileSync8, rmSync as rmSync2 } from "node:fs";
27450
27943
  import { join as join18 } from "node:path";
27451
27944
  function cockpitsDir(env) {
@@ -27551,10 +28044,12 @@ function sanitise(record2) {
27551
28044
  }
27552
28045
 
27553
28046
  // src/lib/connection/start.ts
28047
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27554
28048
  import { join as join19 } from "node:path";
27555
28049
  init_types();
27556
28050
 
27557
28051
  // src/lib/host/file-manager.ts
28052
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27558
28053
  import { execFile as execFile3, spawn as spawn6 } from "node:child_process";
27559
28054
  import { lstat, stat } from "node:fs/promises";
27560
28055
  import { dirname as dirname11, isAbsolute as isAbsolute2, win32 } from "node:path";
@@ -27682,6 +28177,7 @@ async function startLocal(opts) {
27682
28177
  }
27683
28178
 
27684
28179
  // src/lib/connection/status.ts
28180
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27685
28181
  var LIVE_FIRST = {
27686
28182
  running: 0,
27687
28183
  waiting_input: 1,
@@ -27705,12 +28201,17 @@ async function statusReport(client) {
27705
28201
  // src/cli/run.ts
27706
28202
  init_types();
27707
28203
 
28204
+ // src/cli/manage.ts
28205
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28206
+
27708
28207
  // src/cli/manage-cli.ts
28208
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27709
28209
  init_types();
27710
28210
  import { spawn as spawn8 } from "node:child_process";
27711
28211
  import { dirname as dirname13 } from "node:path";
27712
28212
 
27713
28213
  // src/lib/installation/standalone-cli.ts
28214
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27714
28215
  init_types();
27715
28216
  import { spawn as spawn7 } from "node:child_process";
27716
28217
  import { existsSync as existsSync5, lstatSync as lstatSync3, readFileSync as readFileSync9, realpathSync as realpathSync4 } from "node:fs";
@@ -27885,6 +28386,7 @@ import { homedir as homedir2 } from "node:os";
27885
28386
  import { join as join21 } from "node:path";
27886
28387
 
27887
28388
  // src/lib/installation/releases.ts
28389
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27888
28390
  init_types();
27889
28391
  async function latestReleaseVersion(opts = {}) {
27890
28392
  const slug2 = releaseRepository();
@@ -27896,7 +28398,7 @@ async function latestReleaseVersion(opts = {}) {
27896
28398
  );
27897
28399
  }
27898
28400
  try {
27899
- return (await latestGitHubRelease(slug2, opts)).version;
28401
+ return (await latestComponentReleases(slug2, opts)).components[opts.component ?? "daemon"].version;
27900
28402
  } catch (error51) {
27901
28403
  throw new CliError(
27902
28404
  "not_installed",
@@ -27907,6 +28409,7 @@ async function latestReleaseVersion(opts = {}) {
27907
28409
  }
27908
28410
 
27909
28411
  // src/lib/installation/remove-daemon.ts
28412
+ init_define_PUDDLE_COMPONENT_VERSIONS();
27910
28413
  init_types();
27911
28414
  async function sweepDirtyWorktrees(transport) {
27912
28415
  const script = `
@@ -28002,6 +28505,7 @@ fi`;
28002
28505
  }
28003
28506
 
28004
28507
  // src/lib/transport/open.ts
28508
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28005
28509
  async function openHostTransport(host) {
28006
28510
  const transport = host === void 0 || host === "local" ? new LocalTransport() : new SshTransport(host);
28007
28511
  if (transport instanceof SshTransport) {
@@ -28019,9 +28523,11 @@ async function openHostTransport(host) {
28019
28523
  init_types();
28020
28524
 
28021
28525
  // src/lib/installation/host/restore.ts
28526
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28022
28527
  init_types();
28023
28528
 
28024
28529
  // src/lib/installation/host/helper.ts
28530
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28025
28531
  init_types();
28026
28532
  var selectedHostHelper = `${hostPaths.current}/bin/node ${hostPaths.current}/daemon/host-update.mjs --home ${hostPaths.home}`;
28027
28533
  var removalFailure = () => new CliError(
@@ -28096,6 +28602,7 @@ async function restoreInstalledDaemon(transport) {
28096
28602
  }
28097
28603
 
28098
28604
  // src/cli/detach.ts
28605
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28099
28606
  import { spawn as spawn9 } from "node:child_process";
28100
28607
  import { closeSync as closeSync2, mkdirSync as mkdirSync6, openSync as openSync2, readFileSync as readFileSync10 } from "node:fs";
28101
28608
  import { dirname as dirname14 } from "node:path";
@@ -28247,9 +28754,11 @@ async function presentInvitation(record2, noBrowser, logger) {
28247
28754
  }
28248
28755
 
28249
28756
  // src/cli/manage-host-removal.ts
28757
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28250
28758
  init_types();
28251
28759
 
28252
28760
  // src/lib/installation/host/remove.ts
28761
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28253
28762
  init_types();
28254
28763
  import { randomUUID as randomUUID6 } from "node:crypto";
28255
28764
  async function requireHostRemovalSupport(transport) {
@@ -28304,6 +28813,7 @@ async function finishHostRemoval(transport, input) {
28304
28813
  }
28305
28814
 
28306
28815
  // src/lib/installation/host/purge.ts
28816
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28307
28817
  import { randomUUID as randomUUID7 } from "node:crypto";
28308
28818
  init_types();
28309
28819
  function failure() {
@@ -28319,7 +28829,7 @@ async function requireHostPurgeSupport(transport) {
28319
28829
  throw new CliError(
28320
28830
  "upgrade_failed",
28321
28831
  "This host does not support coordinated data purge",
28322
- "Upgrade the daemon before purging; ordinary removal can retain all data."
28832
+ "Coordinated purge was introduced in application 25.20 and requires a daemon compatible with this CLI. Upgrade the daemon before purging, or retain data with a compatible removal client."
28323
28833
  );
28324
28834
  }
28325
28835
  async function inspectHostPurge(transport) {
@@ -28376,6 +28886,7 @@ async function applyHostPurge(transport, review, timeoutMs = 12e4) {
28376
28886
  }
28377
28887
 
28378
28888
  // src/cli/manage-host-purge.ts
28889
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28379
28890
  async function purgeRemovedHost(cmd, transport, logger, id3) {
28380
28891
  const review = await prepareHostPurge(transport, id3);
28381
28892
  if (review.phase === "reboot_required") {
@@ -28501,19 +29012,11 @@ function assertLocal(what, host, verb) {
28501
29012
  `ssh into ${host} and run it there \u2014 user@host targets daemon and runtime components`
28502
29013
  );
28503
29014
  }
28504
- async function resolveHostVersion(logger) {
28505
- try {
28506
- return await latestReleaseVersion();
28507
- } catch (e) {
28508
- const pinned = pinnedDaemonVersion();
28509
- logger.warn(
28510
- `cannot resolve the newest release (${e instanceof Error ? e.message : String(e)}) \u2014 using this CLI's version train v${pinned}`
28511
- );
28512
- return pinned;
28513
- }
29015
+ async function resolveHostVersion(component2 = "daemon") {
29016
+ return latestReleaseVersion({ component: component2 });
28514
29017
  }
28515
29018
  function pinWarning(logger, version2) {
28516
- if (version2 === cliVersion()) return;
29019
+ if (version2 === pinnedDaemonVersion()) return;
28517
29020
  logger.warn(
28518
29021
  `pinning the daemon to v${version2} while this CLI is v${cliVersion()} \u2014 if the two speak different protocol majors, the next \`puddle launch\` will upgrade the daemon back (or refuse). Pin the CLI too (puddle upgrade cli@v${version2}) or launch with --no-upgrade.`
28519
29022
  );
@@ -28550,7 +29053,7 @@ async function runInstall(cmd, logger) {
28550
29053
  }
28551
29054
  }
28552
29055
  async function installDaemonAt(transport, explicit, tarball, logger, explicitPin = true) {
28553
- const version2 = explicit ?? (tarball !== void 0 ? void 0 : await resolveHostVersion(logger));
29056
+ const version2 = explicit ?? (tarball !== void 0 ? void 0 : await resolveHostVersion());
28554
29057
  if (explicit !== void 0 && explicitPin) pinWarning(logger, explicit);
28555
29058
  const result = await upgradeDaemon(transport, {
28556
29059
  ...version2 !== void 0 ? { version: version2 } : {},
@@ -28574,7 +29077,7 @@ Continue?`);
28574
29077
  async function installRuntimeAt(transport, explicit, tarball, logger) {
28575
29078
  if (tarball !== void 0 && explicit === void 0)
28576
29079
  throw new CliError("bad_arguments", "A runtime --tarball requires an explicit @version");
28577
- const version2 = explicit ?? await resolveHostVersion(logger);
29080
+ const version2 = explicit ?? await resolveHostVersion("runtime");
28578
29081
  const result = await upgradeHostComponent(transport, "runtime", { version: version2, tarball, logger });
28579
29082
  logger.info(
28580
29083
  `puddler default ${result.from ?? "(not installed)"} \u2192 ${result.to} on ${transport.label}; running runtimes keep their pinned build`
@@ -28615,9 +29118,9 @@ async function runUpgrade(cmd, logger) {
28615
29118
  const runtimeInstalled2 = await installedVersion(transport2, "runtime") !== null;
28616
29119
  if (runtimeInstalled2 && cmd.tarball !== void 0 && cmd.version === void 0)
28617
29120
  throw new CliError("bad_arguments", "A runtime --tarball requires an explicit @version");
28618
- const version2 = cmd.version ?? (cmd.tarball ? void 0 : await resolveHostVersion(logger));
29121
+ const version2 = cmd.version ?? (cmd.tarball ? void 0 : await resolveHostVersion());
28619
29122
  await installDaemonAt(transport2, version2, cmd.tarball, logger, cmd.version !== void 0);
28620
- if (runtimeInstalled2) await installRuntimeAt(transport2, version2, cmd.tarball, logger);
29123
+ if (runtimeInstalled2) await installRuntimeAt(transport2, cmd.version, cmd.tarball, logger);
28621
29124
  return 0;
28622
29125
  } finally {
28623
29126
  transport2.dispose();
@@ -28629,11 +29132,11 @@ async function runUpgrade(cmd, logger) {
28629
29132
  if (runtimeInstalled && cmd.tarball !== void 0 && cmd.version === void 0)
28630
29133
  throw new CliError("bad_arguments", "A runtime --tarball requires an explicit @version");
28631
29134
  const desktopInstalled = process.platform === "darwin" && await findInstalledDesktopApp() !== null;
28632
- const hostVersion2 = daemonInstalled || runtimeInstalled ? cmd.version ?? (cmd.tarball ? void 0 : await resolveHostVersion(logger)) : cmd.version;
29135
+ const hostVersion2 = daemonInstalled || runtimeInstalled ? cmd.version ?? (cmd.tarball ? void 0 : await resolveHostVersion()) : cmd.version;
28633
29136
  if (daemonInstalled)
28634
29137
  await installDaemonAt(transport, hostVersion2, cmd.tarball, logger, cmd.version !== void 0);
28635
29138
  else logger.info("no daemon installed on this machine \u2014 skipping (puddle install daemon)");
28636
- if (runtimeInstalled) await installRuntimeAt(transport, hostVersion2, cmd.tarball, logger);
29139
+ if (runtimeInstalled) await installRuntimeAt(transport, cmd.version, cmd.tarball, logger);
28637
29140
  if (desktopInstalled) await setDesktop({ version: cmd.version, verb: "upgrade" }, logger);
28638
29141
  else if (process.platform === "darwin") logger.info("no desktop app installed \u2014 skipping");
28639
29142
  return upgradeCli(cmd.version, logger);
@@ -28879,6 +29382,7 @@ async function removeDaemonCmd(cmd, logger) {
28879
29382
  }
28880
29383
 
28881
29384
  // src/cli/management/updates.ts
29385
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28882
29386
  init_types();
28883
29387
  async function runUpdates(command, logger) {
28884
29388
  const transport = await openHostTransport(command.host);
@@ -28969,6 +29473,7 @@ async function runUpdates(command, logger) {
28969
29473
  }
28970
29474
 
28971
29475
  // src/cli/output.ts
29476
+ init_define_PUDDLE_COMPONENT_VERSIONS();
28972
29477
  function terminalLogger() {
28973
29478
  return {
28974
29479
  info(message) {