@runweave/server-win32-x64 0.1.27 → 0.1.28

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 (81) hide show
  1. package/manifest.json +156 -154
  2. package/native.tar.gz +0 -0
  3. package/package.json +1 -1
  4. package/payload/app-server/build-info.json +4 -4
  5. package/payload/app-server/index.cjs +636 -315
  6. package/payload/app-server/index.cjs.map +1 -1
  7. package/payload/backend/build-info.json +4 -4
  8. package/payload/backend/index.cjs +673 -291
  9. package/payload/frontend/dist/assets/{_baseUniq-CvQ_Kf6J.js → _baseUniq-CMN8EMJe.js} +1 -1
  10. package/payload/frontend/dist/assets/{access-BM48T8pi.js → access-DFaVCfwr.js} +1 -1
  11. package/payload/frontend/dist/assets/{advanced-tiNwdsWg.js → advanced-CKAJ9tXg.js} +1 -1
  12. package/payload/frontend/dist/assets/{appearance-BkACCLPd.js → appearance-CKvvyFpM.js} +1 -1
  13. package/payload/frontend/dist/assets/{arc-CG4ZorIz.js → arc-Cbf15wI1.js} +1 -1
  14. package/payload/frontend/dist/assets/{architectureDiagram-Q4EWVU46-ChTaJQWa.js → architectureDiagram-Q4EWVU46-Bvi3ZBt1.js} +1 -1
  15. package/payload/frontend/dist/assets/{blockDiagram-DXYQGD6D-wyOyxXn6.js → blockDiagram-DXYQGD6D-DgDkN-KK.js} +1 -1
  16. package/payload/frontend/dist/assets/{c4Diagram-AHTNJAMY-aTSGv6b-.js → c4Diagram-AHTNJAMY-CWt609Q-.js} +1 -1
  17. package/payload/frontend/dist/assets/channel-CdBTczzC.js +1 -0
  18. package/payload/frontend/dist/assets/{chunk-4BX2VUAB-CL1i1VLL.js → chunk-4BX2VUAB-BFqHquBR.js} +1 -1
  19. package/payload/frontend/dist/assets/{chunk-4TB4RGXK-DIeWEhjD.js → chunk-4TB4RGXK-CW5WaIJq.js} +1 -1
  20. package/payload/frontend/dist/assets/{chunk-55IACEB6-Cggk_br2.js → chunk-55IACEB6-DHJtIfsv.js} +1 -1
  21. package/payload/frontend/dist/assets/{chunk-EDXVE4YY-B9bwitXJ.js → chunk-EDXVE4YY-CGOb1mZr.js} +1 -1
  22. package/payload/frontend/dist/assets/{chunk-FMBD7UC4-BY4GYa45.js → chunk-FMBD7UC4-CSoB33q_.js} +1 -1
  23. package/payload/frontend/dist/assets/{chunk-OYMX7WX6-CsZ8Gk1p.js → chunk-OYMX7WX6-C01d--Rs.js} +1 -1
  24. package/payload/frontend/dist/assets/{chunk-QZHKN3VN-m0WQ1QIW.js → chunk-QZHKN3VN-CUx1bRVL.js} +1 -1
  25. package/payload/frontend/dist/assets/{chunk-YZCP3GAM-BJFF_8vq.js → chunk-YZCP3GAM-ClNvKMAO.js} +1 -1
  26. package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-DarZ1ILp.js +1 -0
  27. package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-DarZ1ILp.js +1 -0
  28. package/payload/frontend/dist/assets/clone--jdpc5ik.js +1 -0
  29. package/payload/frontend/dist/assets/{connection-xS-NfZnK.js → connection-DVMHE60_.js} +1 -1
  30. package/payload/frontend/dist/assets/{connections-BNpmNrpN.js → connections-C_lEmoKc.js} +1 -1
  31. package/payload/frontend/dist/assets/{cose-bilkent-S5V4N54A-Dfl9Zac8.js → cose-bilkent-S5V4N54A-1sgd6Ms5.js} +1 -1
  32. package/payload/frontend/dist/assets/{dagre-KV5264BT-CbufX2f3.js → dagre-KV5264BT-DPn4YqGI.js} +1 -1
  33. package/payload/frontend/dist/assets/{desktop-CJFLIWqk.js → desktop-CSZOBxgD.js} +1 -1
  34. package/payload/frontend/dist/assets/{diagram-5BDNPKRD-Bv4HpQAy.js → diagram-5BDNPKRD-BHjywjmP.js} +1 -1
  35. package/payload/frontend/dist/assets/{diagram-G4DWMVQ6-qCQp8RdH.js → diagram-G4DWMVQ6-S7iEdHyz.js} +1 -1
  36. package/payload/frontend/dist/assets/{diagram-MMDJMWI5-B_XnhIdh.js → diagram-MMDJMWI5-DqMZnrHB.js} +1 -1
  37. package/payload/frontend/dist/assets/{diagram-TYMM5635-CLa1LRaH.js → diagram-TYMM5635-BYTMiif1.js} +1 -1
  38. package/payload/frontend/dist/assets/{erDiagram-SMLLAGMA-CeaiozYq.js → erDiagram-SMLLAGMA-B4hCkvwX.js} +1 -1
  39. package/payload/frontend/dist/assets/{flowDiagram-DWJPFMVM-DvZ6HuiB.js → flowDiagram-DWJPFMVM-DDkmdUVE.js} +1 -1
  40. package/payload/frontend/dist/assets/{ganttDiagram-T4ZO3ILL-Cr27GUzO.js → ganttDiagram-T4ZO3ILL-BGIkOL1N.js} +1 -1
  41. package/payload/frontend/dist/assets/{gitGraphDiagram-UUTBAWPF-D7cLIKdE.js → gitGraphDiagram-UUTBAWPF-CqEnUqEN.js} +1 -1
  42. package/payload/frontend/dist/assets/{graph-D3h2OtRH.js → graph-CE7npIW2.js} +1 -1
  43. package/payload/frontend/dist/assets/{image-pr8iiZ6b.js → image-BsntFN4u.js} +1 -1
  44. package/payload/frontend/dist/assets/{index-BTUcEYWC.js → index-DY03KvB5.js} +6 -6
  45. package/payload/frontend/dist/assets/{infoDiagram-42DDH7IO-D-898NXw.js → infoDiagram-42DDH7IO-DKWMe4K7.js} +1 -1
  46. package/payload/frontend/dist/assets/{ishikawaDiagram-UXIWVN3A-FCDV3drO.js → ishikawaDiagram-UXIWVN3A-DeYvcKaA.js} +1 -1
  47. package/payload/frontend/dist/assets/{journeyDiagram-VCZTEJTY-CGbhVJdx.js → journeyDiagram-VCZTEJTY-BQ8mdvF0.js} +1 -1
  48. package/payload/frontend/dist/assets/{kanban-definition-6JOO6SKY-BdZMqjYd.js → kanban-definition-6JOO6SKY-B7Ke9FjO.js} +1 -1
  49. package/payload/frontend/dist/assets/{layout-CSVX6YJ2.js → layout-DcxgNsVh.js} +1 -1
  50. package/payload/frontend/dist/assets/{linear-BC2CbN34.js → linear-DSV9ubbU.js} +1 -1
  51. package/payload/frontend/dist/assets/{main-B5-ZQCYl.js → main-CpzvlGm1.js} +144 -144
  52. package/payload/frontend/dist/assets/{min-BOM36O-V.js → min-Dd3QZ8lP.js} +1 -1
  53. package/payload/frontend/dist/assets/{mindmap-definition-QFDTVHPH-K1lKJajL.js → mindmap-definition-QFDTVHPH-DaFx6hc6.js} +1 -1
  54. package/payload/frontend/dist/assets/{monitoring-Cper7Dw-.js → monitoring-CsBkbvRU.js} +1 -1
  55. package/payload/frontend/dist/assets/{notifications-DrRwAV8g.js → notifications-BYk1WjVP.js} +1 -1
  56. package/payload/frontend/dist/assets/{pieDiagram-DEJITSTG-Cln37rnp.js → pieDiagram-DEJITSTG-VQsbwxkg.js} +1 -1
  57. package/payload/frontend/dist/assets/{quadrantDiagram-34T5L4WZ-DBP5Cea5.js → quadrantDiagram-34T5L4WZ-tLKlVC0j.js} +1 -1
  58. package/payload/frontend/dist/assets/{record-content-CsOXQ3vx.js → record-content-DWUPk_tO.js} +1 -1
  59. package/payload/frontend/dist/assets/{requirementDiagram-MS252O5E-C6DUCDR4.js → requirementDiagram-MS252O5E-DDfjmbNt.js} +1 -1
  60. package/payload/frontend/dist/assets/{sankeyDiagram-XADWPNL6-D-neOSXc.js → sankeyDiagram-XADWPNL6-SaxuUxjL.js} +1 -1
  61. package/payload/frontend/dist/assets/{sequenceDiagram-FGHM5R23-ok7v11We.js → sequenceDiagram-FGHM5R23-C2bw8Wko.js} +1 -1
  62. package/payload/frontend/dist/assets/{stateDiagram-FHFEXIEX-t2YXr83_.js → stateDiagram-FHFEXIEX-BgrY776w.js} +1 -1
  63. package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-BuYWor8l.js +1 -0
  64. package/payload/frontend/dist/assets/{status-DEsW_4J3.js → status-BQ_1tMq6.js} +1 -1
  65. package/payload/frontend/dist/assets/suiji-Bct1RCM_.js +1 -0
  66. package/payload/frontend/dist/assets/{svg-BATDsnTM.js → svg-CrC4YdVu.js} +1 -1
  67. package/payload/frontend/dist/assets/{tabs-dzJwAbvS.js → tabs-BvO6o4wK.js} +1 -1
  68. package/payload/frontend/dist/assets/{timeline-definition-GMOUNBTQ-DeW1BaAA.js → timeline-definition-GMOUNBTQ-N9V5Dskh.js} +1 -1
  69. package/payload/frontend/dist/assets/{vennDiagram-DHZGUBPP-DIaLa_Oo.js → vennDiagram-DHZGUBPP-gAjWqrE-.js} +1 -1
  70. package/payload/frontend/dist/assets/{wardley-RL74JXVD-DcfvLEAe.js → wardley-RL74JXVD-DV4R7zd5.js} +1 -1
  71. package/payload/frontend/dist/assets/{wardleyDiagram-NUSXRM2D-C0FuVPkb.js → wardleyDiagram-NUSXRM2D-DBzyAlhE.js} +1 -1
  72. package/payload/frontend/dist/assets/{xychartDiagram-5P7HB3ND-DIa6gq2O.js → xychartDiagram-5P7HB3ND-BGAjyxZd.js} +1 -1
  73. package/payload/frontend/dist/build-info.json +4 -4
  74. package/payload/frontend/dist/companion.html +1 -1
  75. package/payload/frontend/dist/index.html +2 -2
  76. package/payload/frontend/dist/assets/channel-CsCfvOaJ.js +0 -1
  77. package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-esUmDk_l.js +0 -1
  78. package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-esUmDk_l.js +0 -1
  79. package/payload/frontend/dist/assets/clone-DIPLBiAi.js +0 -1
  80. package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-Bl3BtoZ6.js +0 -1
  81. package/payload/frontend/dist/assets/suiji-C5flJh58.js +0 -1
@@ -1,4 +1,4 @@
1
- /* runweave:build-info */var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"20261115T000240923Z-40755ba7","sourceRevision":"40755ba790534201ad805db1dd99aac96e266c40","sourceDirty":false,"builtAt":"2026-11-15T00:02:40.923Z","contentSha256":"4d84a3de9dc84c34c7c2aac7ab830e8e741062c4eb54b3b0d7fccc785326346e"};
1
+ /* runweave:build-info */var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"20261115T232604679Z-06d2bd51","sourceRevision":"06d2bd5167dce947cb3e3e42805a5e97c5a8563f","sourceDirty":false,"builtAt":"2026-11-15T23:26:04.679Z","contentSha256":"840aea24e9d014adc43885e950c39f4a737e3227e3d91bdf7eb93ffff835ad0a"};
2
2
  const __IMPORT_META_URL__ = require('url').pathToFileURL(__filename).href;
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -93,13 +93,13 @@ var require_identity = __commonJS({
93
93
  var require_visit = __commonJS({
94
94
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/visit.js"(exports2) {
95
95
  "use strict";
96
- var identity = require_identity();
96
+ var identity2 = require_identity();
97
97
  var BREAK = Symbol("break visit");
98
98
  var SKIP = Symbol("skip children");
99
99
  var REMOVE = Symbol("remove node");
100
100
  function visit(node, visitor) {
101
101
  const visitor_ = initVisitor(visitor);
102
- if (identity.isDocument(node)) {
102
+ if (identity2.isDocument(node)) {
103
103
  const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
104
104
  if (cd === REMOVE)
105
105
  node.contents = null;
@@ -111,12 +111,12 @@ var require_visit = __commonJS({
111
111
  visit.REMOVE = REMOVE;
112
112
  function visit_(key, node, visitor, path24) {
113
113
  const ctrl = callVisitor(key, node, visitor, path24);
114
- if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
114
+ if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
115
115
  replaceNode(key, path24, ctrl);
116
116
  return visit_(key, ctrl, visitor, path24);
117
117
  }
118
118
  if (typeof ctrl !== "symbol") {
119
- if (identity.isCollection(node)) {
119
+ if (identity2.isCollection(node)) {
120
120
  path24 = Object.freeze(path24.concat(node));
121
121
  for (let i = 0; i < node.items.length; ++i) {
122
122
  const ci = visit_(i, node.items[i], visitor, path24);
@@ -129,7 +129,7 @@ var require_visit = __commonJS({
129
129
  i -= 1;
130
130
  }
131
131
  }
132
- } else if (identity.isPair(node)) {
132
+ } else if (identity2.isPair(node)) {
133
133
  path24 = Object.freeze(path24.concat(node));
134
134
  const ck = visit_("key", node.key, visitor, path24);
135
135
  if (ck === BREAK)
@@ -147,7 +147,7 @@ var require_visit = __commonJS({
147
147
  }
148
148
  async function visitAsync(node, visitor) {
149
149
  const visitor_ = initVisitor(visitor);
150
- if (identity.isDocument(node)) {
150
+ if (identity2.isDocument(node)) {
151
151
  const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
152
152
  if (cd === REMOVE)
153
153
  node.contents = null;
@@ -159,12 +159,12 @@ var require_visit = __commonJS({
159
159
  visitAsync.REMOVE = REMOVE;
160
160
  async function visitAsync_(key, node, visitor, path24) {
161
161
  const ctrl = await callVisitor(key, node, visitor, path24);
162
- if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
162
+ if (identity2.isNode(ctrl) || identity2.isPair(ctrl)) {
163
163
  replaceNode(key, path24, ctrl);
164
164
  return visitAsync_(key, ctrl, visitor, path24);
165
165
  }
166
166
  if (typeof ctrl !== "symbol") {
167
- if (identity.isCollection(node)) {
167
+ if (identity2.isCollection(node)) {
168
168
  path24 = Object.freeze(path24.concat(node));
169
169
  for (let i = 0; i < node.items.length; ++i) {
170
170
  const ci = await visitAsync_(i, node.items[i], visitor, path24);
@@ -177,7 +177,7 @@ var require_visit = __commonJS({
177
177
  i -= 1;
178
178
  }
179
179
  }
180
- } else if (identity.isPair(node)) {
180
+ } else if (identity2.isPair(node)) {
181
181
  path24 = Object.freeze(path24.concat(node));
182
182
  const ck = await visitAsync_("key", node.key, visitor, path24);
183
183
  if (ck === BREAK)
@@ -214,31 +214,31 @@ var require_visit = __commonJS({
214
214
  function callVisitor(key, node, visitor, path24) {
215
215
  if (typeof visitor === "function")
216
216
  return visitor(key, node, path24);
217
- if (identity.isMap(node))
217
+ if (identity2.isMap(node))
218
218
  return visitor.Map?.(key, node, path24);
219
- if (identity.isSeq(node))
219
+ if (identity2.isSeq(node))
220
220
  return visitor.Seq?.(key, node, path24);
221
- if (identity.isPair(node))
221
+ if (identity2.isPair(node))
222
222
  return visitor.Pair?.(key, node, path24);
223
- if (identity.isScalar(node))
223
+ if (identity2.isScalar(node))
224
224
  return visitor.Scalar?.(key, node, path24);
225
- if (identity.isAlias(node))
225
+ if (identity2.isAlias(node))
226
226
  return visitor.Alias?.(key, node, path24);
227
227
  return void 0;
228
228
  }
229
229
  function replaceNode(key, path24, node) {
230
230
  const parent = path24[path24.length - 1];
231
- if (identity.isCollection(parent)) {
231
+ if (identity2.isCollection(parent)) {
232
232
  parent.items[key] = node;
233
- } else if (identity.isPair(parent)) {
233
+ } else if (identity2.isPair(parent)) {
234
234
  if (key === "key")
235
235
  parent.key = node;
236
236
  else
237
237
  parent.value = node;
238
- } else if (identity.isDocument(parent)) {
238
+ } else if (identity2.isDocument(parent)) {
239
239
  parent.contents = node;
240
240
  } else {
241
- const pt = identity.isAlias(parent) ? "alias" : "scalar";
241
+ const pt = identity2.isAlias(parent) ? "alias" : "scalar";
242
242
  throw new Error(`Cannot replace node with ${pt} parent`);
243
243
  }
244
244
  }
@@ -251,7 +251,7 @@ var require_visit = __commonJS({
251
251
  var require_directives = __commonJS({
252
252
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/directives.js"(exports2) {
253
253
  "use strict";
254
- var identity = require_identity();
254
+ var identity2 = require_identity();
255
255
  var visit = require_visit();
256
256
  var escapeChars = {
257
257
  "!": "%21",
@@ -394,10 +394,10 @@ var require_directives = __commonJS({
394
394
  const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
395
395
  const tagEntries = Object.entries(this.tags);
396
396
  let tagNames;
397
- if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) {
397
+ if (doc && tagEntries.length > 0 && identity2.isNode(doc.contents)) {
398
398
  const tags = {};
399
399
  visit.visit(doc.contents, (_key, node) => {
400
- if (identity.isNode(node) && node.tag)
400
+ if (identity2.isNode(node) && node.tag)
401
401
  tags[node.tag] = true;
402
402
  });
403
403
  tagNames = Object.keys(tags);
@@ -422,7 +422,7 @@ var require_directives = __commonJS({
422
422
  var require_anchors = __commonJS({
423
423
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/anchors.js"(exports2) {
424
424
  "use strict";
425
- var identity = require_identity();
425
+ var identity2 = require_identity();
426
426
  var visit = require_visit();
427
427
  function anchorIsValid(anchor) {
428
428
  if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
@@ -469,7 +469,7 @@ var require_anchors = __commonJS({
469
469
  setAnchors: () => {
470
470
  for (const source of aliasObjects) {
471
471
  const ref = sourceObjects.get(source);
472
- if (typeof ref === "object" && ref.anchor && (identity.isScalar(ref.node) || identity.isCollection(ref.node))) {
472
+ if (typeof ref === "object" && ref.anchor && (identity2.isScalar(ref.node) || identity2.isCollection(ref.node))) {
473
473
  ref.node.anchor = ref.anchor;
474
474
  } else {
475
475
  const error = new Error("Failed to resolve repeated object (this should not happen)");
@@ -542,12 +542,12 @@ var require_applyReviver = __commonJS({
542
542
  var require_toJS = __commonJS({
543
543
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/toJS.js"(exports2) {
544
544
  "use strict";
545
- var identity = require_identity();
545
+ var identity2 = require_identity();
546
546
  function toJS(value, arg, ctx) {
547
547
  if (Array.isArray(value))
548
548
  return value.map((v, i) => toJS(v, String(i), ctx));
549
549
  if (value && typeof value.toJSON === "function") {
550
- if (!ctx || !identity.hasAnchor(value))
550
+ if (!ctx || !identity2.hasAnchor(value))
551
551
  return value.toJSON(arg, ctx);
552
552
  const data = { aliasCount: 0, count: 1, res: void 0 };
553
553
  ctx.anchors.set(value, data);
@@ -573,11 +573,11 @@ var require_Node = __commonJS({
573
573
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Node.js"(exports2) {
574
574
  "use strict";
575
575
  var applyReviver = require_applyReviver();
576
- var identity = require_identity();
576
+ var identity2 = require_identity();
577
577
  var toJS = require_toJS();
578
578
  var NodeBase = class {
579
579
  constructor(type) {
580
- Object.defineProperty(this, identity.NODE_TYPE, { value: type });
580
+ Object.defineProperty(this, identity2.NODE_TYPE, { value: type });
581
581
  }
582
582
  /** Create a copy of this node. */
583
583
  clone() {
@@ -588,7 +588,7 @@ var require_Node = __commonJS({
588
588
  }
589
589
  /** A plain JavaScript representation of this node. */
590
590
  toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
591
- if (!identity.isDocument(doc))
591
+ if (!identity2.isDocument(doc))
592
592
  throw new TypeError("A document argument is required");
593
593
  const ctx = {
594
594
  anchors: /* @__PURE__ */ new Map(),
@@ -615,12 +615,12 @@ var require_Alias = __commonJS({
615
615
  "use strict";
616
616
  var anchors = require_anchors();
617
617
  var visit = require_visit();
618
- var identity = require_identity();
618
+ var identity2 = require_identity();
619
619
  var Node = require_Node();
620
620
  var toJS = require_toJS();
621
621
  var Alias = class extends Node.NodeBase {
622
622
  constructor(source) {
623
- super(identity.ALIAS);
623
+ super(identity2.ALIAS);
624
624
  this.source = source;
625
625
  Object.defineProperty(this, "tag", {
626
626
  set() {
@@ -640,7 +640,7 @@ var require_Alias = __commonJS({
640
640
  nodes = [];
641
641
  visit.visit(doc, {
642
642
  Node: (_key, node) => {
643
- if (identity.isAlias(node) || identity.hasAnchor(node))
643
+ if (identity2.isAlias(node) || identity2.hasAnchor(node))
644
644
  nodes.push(node);
645
645
  }
646
646
  });
@@ -700,11 +700,11 @@ var require_Alias = __commonJS({
700
700
  }
701
701
  };
702
702
  function getAliasCount(doc, node, anchors2) {
703
- if (identity.isAlias(node)) {
703
+ if (identity2.isAlias(node)) {
704
704
  const source = node.resolve(doc);
705
705
  const anchor = anchors2 && source && anchors2.get(source);
706
706
  return anchor ? anchor.count * anchor.aliasCount : 0;
707
- } else if (identity.isCollection(node)) {
707
+ } else if (identity2.isCollection(node)) {
708
708
  let count = 0;
709
709
  for (const item of node.items) {
710
710
  const c = getAliasCount(doc, item, anchors2);
@@ -712,7 +712,7 @@ var require_Alias = __commonJS({
712
712
  count = c;
713
713
  }
714
714
  return count;
715
- } else if (identity.isPair(node)) {
715
+ } else if (identity2.isPair(node)) {
716
716
  const kc = getAliasCount(doc, node.key, anchors2);
717
717
  const vc = getAliasCount(doc, node.value, anchors2);
718
718
  return Math.max(kc, vc);
@@ -727,13 +727,13 @@ var require_Alias = __commonJS({
727
727
  var require_Scalar = __commonJS({
728
728
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Scalar.js"(exports2) {
729
729
  "use strict";
730
- var identity = require_identity();
730
+ var identity2 = require_identity();
731
731
  var Node = require_Node();
732
732
  var toJS = require_toJS();
733
733
  var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
734
734
  var Scalar = class extends Node.NodeBase {
735
735
  constructor(value) {
736
- super(identity.SCALAR);
736
+ super(identity2.SCALAR);
737
737
  this.value = value;
738
738
  }
739
739
  toJSON(arg, ctx) {
@@ -758,7 +758,7 @@ var require_createNode = __commonJS({
758
758
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/doc/createNode.js"(exports2) {
759
759
  "use strict";
760
760
  var Alias = require_Alias();
761
- var identity = require_identity();
761
+ var identity2 = require_identity();
762
762
  var Scalar = require_Scalar();
763
763
  var defaultTagPrefix = "tag:yaml.org,2002:";
764
764
  function findTagObject(value, tagName, tags) {
@@ -772,12 +772,12 @@ var require_createNode = __commonJS({
772
772
  return tags.find((t) => t.identify?.(value) && !t.format);
773
773
  }
774
774
  function createNode(value, tagName, ctx) {
775
- if (identity.isDocument(value))
775
+ if (identity2.isDocument(value))
776
776
  value = value.contents;
777
- if (identity.isNode(value))
777
+ if (identity2.isNode(value))
778
778
  return value;
779
- if (identity.isPair(value)) {
780
- const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx);
779
+ if (identity2.isPair(value)) {
780
+ const map = ctx.schema[identity2.MAP].createNode?.(ctx.schema, null, ctx);
781
781
  map.items.push(value);
782
782
  return map;
783
783
  }
@@ -809,7 +809,7 @@ var require_createNode = __commonJS({
809
809
  ref.node = node2;
810
810
  return node2;
811
811
  }
812
- tagObj = value instanceof Map ? schema[identity.MAP] : Symbol.iterator in Object(value) ? schema[identity.SEQ] : schema[identity.MAP];
812
+ tagObj = value instanceof Map ? schema[identity2.MAP] : Symbol.iterator in Object(value) ? schema[identity2.SEQ] : schema[identity2.MAP];
813
813
  }
814
814
  if (onTagObj) {
815
815
  onTagObj(tagObj);
@@ -833,7 +833,7 @@ var require_Collection = __commonJS({
833
833
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/nodes/Collection.js"(exports2) {
834
834
  "use strict";
835
835
  var createNode = require_createNode();
836
- var identity = require_identity();
836
+ var identity2 = require_identity();
837
837
  var Node = require_Node();
838
838
  function collectionFromPath(schema, path24, value) {
839
839
  let v = value;
@@ -877,7 +877,7 @@ var require_Collection = __commonJS({
877
877
  const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
878
878
  if (schema)
879
879
  copy.schema = schema;
880
- copy.items = copy.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it);
880
+ copy.items = copy.items.map((it) => identity2.isNode(it) || identity2.isPair(it) ? it.clone(schema) : it);
881
881
  if (this.range)
882
882
  copy.range = this.range.slice();
883
883
  return copy;
@@ -893,7 +893,7 @@ var require_Collection = __commonJS({
893
893
  else {
894
894
  const [key, ...rest] = path24;
895
895
  const node = this.get(key, true);
896
- if (identity.isCollection(node))
896
+ if (identity2.isCollection(node))
897
897
  node.addIn(rest, value);
898
898
  else if (node === void 0 && this.schema)
899
899
  this.set(key, collectionFromPath(this.schema, rest, value));
@@ -910,7 +910,7 @@ var require_Collection = __commonJS({
910
910
  if (rest.length === 0)
911
911
  return this.delete(key);
912
912
  const node = this.get(key, true);
913
- if (identity.isCollection(node))
913
+ if (identity2.isCollection(node))
914
914
  return node.deleteIn(rest);
915
915
  else
916
916
  throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
@@ -924,16 +924,16 @@ var require_Collection = __commonJS({
924
924
  const [key, ...rest] = path24;
925
925
  const node = this.get(key, true);
926
926
  if (rest.length === 0)
927
- return !keepScalar && identity.isScalar(node) ? node.value : node;
927
+ return !keepScalar && identity2.isScalar(node) ? node.value : node;
928
928
  else
929
- return identity.isCollection(node) ? node.getIn(rest, keepScalar) : void 0;
929
+ return identity2.isCollection(node) ? node.getIn(rest, keepScalar) : void 0;
930
930
  }
931
931
  hasAllNullValues(allowScalar) {
932
932
  return this.items.every((node) => {
933
- if (!identity.isPair(node))
933
+ if (!identity2.isPair(node))
934
934
  return false;
935
935
  const n = node.value;
936
- return n == null || allowScalar && identity.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
936
+ return n == null || allowScalar && identity2.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
937
937
  });
938
938
  }
939
939
  /**
@@ -944,7 +944,7 @@ var require_Collection = __commonJS({
944
944
  if (rest.length === 0)
945
945
  return this.has(key);
946
946
  const node = this.get(key, true);
947
- return identity.isCollection(node) ? node.hasIn(rest) : false;
947
+ return identity2.isCollection(node) ? node.hasIn(rest) : false;
948
948
  }
949
949
  /**
950
950
  * Sets a value in this collection. For `!!set`, `value` needs to be a
@@ -956,7 +956,7 @@ var require_Collection = __commonJS({
956
956
  this.set(key, value);
957
957
  } else {
958
958
  const node = this.get(key, true);
959
- if (identity.isCollection(node))
959
+ if (identity2.isCollection(node))
960
960
  node.setIn(rest, value);
961
961
  else if (node === void 0 && this.schema)
962
962
  this.set(key, collectionFromPath(this.schema, rest, value));
@@ -1412,7 +1412,7 @@ var require_stringify = __commonJS({
1412
1412
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringify.js"(exports2) {
1413
1413
  "use strict";
1414
1414
  var anchors = require_anchors();
1415
- var identity = require_identity();
1415
+ var identity2 = require_identity();
1416
1416
  var stringifyComment = require_stringifyComment();
1417
1417
  var stringifyString = require_stringifyString();
1418
1418
  function createStringifyContext(doc, options) {
@@ -1464,7 +1464,7 @@ var require_stringify = __commonJS({
1464
1464
  }
1465
1465
  let tagObj = void 0;
1466
1466
  let obj;
1467
- if (identity.isScalar(item)) {
1467
+ if (identity2.isScalar(item)) {
1468
1468
  obj = item.value;
1469
1469
  let match = tags.filter((t) => t.identify?.(obj));
1470
1470
  if (match.length > 1) {
@@ -1487,7 +1487,7 @@ var require_stringify = __commonJS({
1487
1487
  if (!doc.directives)
1488
1488
  return "";
1489
1489
  const props = [];
1490
- const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor;
1490
+ const anchor = (identity2.isScalar(node) || identity2.isCollection(node)) && node.anchor;
1491
1491
  if (anchor && anchors.anchorIsValid(anchor)) {
1492
1492
  anchors$1.add(anchor);
1493
1493
  props.push(`&${anchor}`);
@@ -1498,9 +1498,9 @@ var require_stringify = __commonJS({
1498
1498
  return props.join(" ");
1499
1499
  }
1500
1500
  function stringify(item, ctx, onComment, onChompKeep) {
1501
- if (identity.isPair(item))
1501
+ if (identity2.isPair(item))
1502
1502
  return item.toString(ctx, onComment, onChompKeep);
1503
- if (identity.isAlias(item)) {
1503
+ if (identity2.isAlias(item)) {
1504
1504
  if (ctx.doc.directives)
1505
1505
  return item.toString(ctx);
1506
1506
  if (ctx.resolvedAliases?.has(item)) {
@@ -1514,15 +1514,15 @@ var require_stringify = __commonJS({
1514
1514
  }
1515
1515
  }
1516
1516
  let tagObj = void 0;
1517
- const node = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
1517
+ const node = identity2.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
1518
1518
  tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
1519
1519
  const props = stringifyProps(node, tagObj, ctx);
1520
1520
  if (props.length > 0)
1521
1521
  ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
1522
- const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
1522
+ const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity2.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
1523
1523
  if (!props)
1524
1524
  return str;
1525
- return identity.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
1525
+ return identity2.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
1526
1526
  ${ctx.indent}${str}`;
1527
1527
  }
1528
1528
  exports2.createStringifyContext = createStringifyContext;
@@ -1534,23 +1534,23 @@ ${ctx.indent}${str}`;
1534
1534
  var require_stringifyPair = __commonJS({
1535
1535
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyPair.js"(exports2) {
1536
1536
  "use strict";
1537
- var identity = require_identity();
1537
+ var identity2 = require_identity();
1538
1538
  var Scalar = require_Scalar();
1539
1539
  var stringify = require_stringify();
1540
1540
  var stringifyComment = require_stringifyComment();
1541
1541
  function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
1542
1542
  const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
1543
- let keyComment = identity.isNode(key) && key.comment || null;
1543
+ let keyComment = identity2.isNode(key) && key.comment || null;
1544
1544
  if (simpleKeys) {
1545
1545
  if (keyComment) {
1546
1546
  throw new Error("With simple keys, key nodes cannot have comments");
1547
1547
  }
1548
- if (identity.isCollection(key) || !identity.isNode(key) && typeof key === "object") {
1548
+ if (identity2.isCollection(key) || !identity2.isNode(key) && typeof key === "object") {
1549
1549
  const msg = "With simple keys, collection cannot be used as a key value";
1550
1550
  throw new Error(msg);
1551
1551
  }
1552
1552
  }
1553
- let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity.isCollection(key) || (identity.isScalar(key) ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL : typeof key === "object"));
1553
+ let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity2.isCollection(key) || (identity2.isScalar(key) ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL : typeof key === "object"));
1554
1554
  ctx = Object.assign({}, ctx, {
1555
1555
  allNullValues: false,
1556
1556
  implicitKey: !explicitKey && (simpleKeys || !allNullValues),
@@ -1591,7 +1591,7 @@ ${indent}:`;
1591
1591
  str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment));
1592
1592
  }
1593
1593
  let vsb, vcb, valueComment;
1594
- if (identity.isNode(value)) {
1594
+ if (identity2.isNode(value)) {
1595
1595
  vsb = !!value.spaceBefore;
1596
1596
  vcb = value.commentBefore;
1597
1597
  valueComment = value.comment;
@@ -1603,10 +1603,10 @@ ${indent}:`;
1603
1603
  value = doc.createNode(value);
1604
1604
  }
1605
1605
  ctx.implicitKey = false;
1606
- if (!explicitKey && !keyComment && identity.isScalar(value))
1606
+ if (!explicitKey && !keyComment && identity2.isScalar(value))
1607
1607
  ctx.indentAtStart = str.length + 1;
1608
1608
  chompKeep = false;
1609
- if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) {
1609
+ if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity2.isSeq(value) && !value.flow && !value.tag && !value.anchor) {
1610
1610
  ctx.indent = ctx.indent.substring(2);
1611
1611
  }
1612
1612
  let valueCommentDone = false;
@@ -1626,7 +1626,7 @@ ${stringifyComment.indentComment(cs, ctx.indent)}`;
1626
1626
  ws += `
1627
1627
  ${ctx.indent}`;
1628
1628
  }
1629
- } else if (!explicitKey && identity.isCollection(value)) {
1629
+ } else if (!explicitKey && identity2.isCollection(value)) {
1630
1630
  const vs0 = valueStr[0];
1631
1631
  const nl0 = valueStr.indexOf("\n");
1632
1632
  const hasNewline = nl0 !== -1;
@@ -1689,7 +1689,7 @@ var require_log = __commonJS({
1689
1689
  var require_merge = __commonJS({
1690
1690
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports2) {
1691
1691
  "use strict";
1692
- var identity = require_identity();
1692
+ var identity2 = require_identity();
1693
1693
  var Scalar = require_Scalar();
1694
1694
  var MERGE_KEY = "<<";
1695
1695
  var merge = {
@@ -1702,10 +1702,10 @@ var require_merge = __commonJS({
1702
1702
  }),
1703
1703
  stringify: () => MERGE_KEY
1704
1704
  };
1705
- var isMergeKey = (ctx, key) => (merge.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
1705
+ var isMergeKey = (ctx, key) => (merge.identify(key) || identity2.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
1706
1706
  function addMergeToJSMap(ctx, map, value) {
1707
- value = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
1708
- if (identity.isSeq(value))
1707
+ value = ctx && identity2.isAlias(value) ? value.resolve(ctx.doc) : value;
1708
+ if (identity2.isSeq(value))
1709
1709
  for (const it of value.items)
1710
1710
  mergeValue(ctx, map, it);
1711
1711
  else if (Array.isArray(value))
@@ -1715,8 +1715,8 @@ var require_merge = __commonJS({
1715
1715
  mergeValue(ctx, map, value);
1716
1716
  }
1717
1717
  function mergeValue(ctx, map, value) {
1718
- const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value;
1719
- if (!identity.isMap(source))
1718
+ const source = ctx && identity2.isAlias(value) ? value.resolve(ctx.doc) : value;
1719
+ if (!identity2.isMap(source))
1720
1720
  throw new Error("Merge sources must be maps or map aliases");
1721
1721
  const srcMap = source.toJSON(null, ctx, Map);
1722
1722
  for (const [key, value2] of srcMap) {
@@ -1749,10 +1749,10 @@ var require_addPairToJSMap = __commonJS({
1749
1749
  var log = require_log();
1750
1750
  var merge = require_merge();
1751
1751
  var stringify = require_stringify();
1752
- var identity = require_identity();
1752
+ var identity2 = require_identity();
1753
1753
  var toJS = require_toJS();
1754
1754
  function addPairToJSMap(ctx, map, { key, value }) {
1755
- if (identity.isNode(key) && key.addToJSMap)
1755
+ if (identity2.isNode(key) && key.addToJSMap)
1756
1756
  key.addToJSMap(ctx, map, value);
1757
1757
  else if (merge.isMergeKey(ctx, key))
1758
1758
  merge.addMergeToJSMap(ctx, map, value);
@@ -1783,7 +1783,7 @@ var require_addPairToJSMap = __commonJS({
1783
1783
  return "";
1784
1784
  if (typeof jsKey !== "object")
1785
1785
  return String(jsKey);
1786
- if (identity.isNode(key) && ctx?.doc) {
1786
+ if (identity2.isNode(key) && ctx?.doc) {
1787
1787
  const strCtx = stringify.createStringifyContext(ctx.doc, {});
1788
1788
  strCtx.anchors = /* @__PURE__ */ new Set();
1789
1789
  for (const node of ctx.anchors.keys())
@@ -1813,7 +1813,7 @@ var require_Pair = __commonJS({
1813
1813
  var createNode = require_createNode();
1814
1814
  var stringifyPair = require_stringifyPair();
1815
1815
  var addPairToJSMap = require_addPairToJSMap();
1816
- var identity = require_identity();
1816
+ var identity2 = require_identity();
1817
1817
  function createPair(key, value, ctx) {
1818
1818
  const k = createNode.createNode(key, void 0, ctx);
1819
1819
  const v = createNode.createNode(value, void 0, ctx);
@@ -1821,15 +1821,15 @@ var require_Pair = __commonJS({
1821
1821
  }
1822
1822
  var Pair = class _Pair {
1823
1823
  constructor(key, value = null) {
1824
- Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });
1824
+ Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.PAIR });
1825
1825
  this.key = key;
1826
1826
  this.value = value;
1827
1827
  }
1828
1828
  clone(schema) {
1829
1829
  let { key, value } = this;
1830
- if (identity.isNode(key))
1830
+ if (identity2.isNode(key))
1831
1831
  key = key.clone(schema);
1832
- if (identity.isNode(value))
1832
+ if (identity2.isNode(value))
1833
1833
  value = value.clone(schema);
1834
1834
  return new _Pair(key, value);
1835
1835
  }
@@ -1850,7 +1850,7 @@ var require_Pair = __commonJS({
1850
1850
  var require_stringifyCollection = __commonJS({
1851
1851
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports2) {
1852
1852
  "use strict";
1853
- var identity = require_identity();
1853
+ var identity2 = require_identity();
1854
1854
  var stringify = require_stringify();
1855
1855
  var stringifyComment = require_stringifyComment();
1856
1856
  function stringifyCollection(collection, ctx, options) {
@@ -1866,14 +1866,14 @@ var require_stringifyCollection = __commonJS({
1866
1866
  for (let i = 0; i < items.length; ++i) {
1867
1867
  const item = items[i];
1868
1868
  let comment2 = null;
1869
- if (identity.isNode(item)) {
1869
+ if (identity2.isNode(item)) {
1870
1870
  if (!chompKeep && item.spaceBefore)
1871
1871
  lines.push("");
1872
1872
  addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
1873
1873
  if (item.comment)
1874
1874
  comment2 = item.comment;
1875
- } else if (identity.isPair(item)) {
1876
- const ik = identity.isNode(item.key) ? item.key : null;
1875
+ } else if (identity2.isPair(item)) {
1876
+ const ik = identity2.isNode(item.key) ? item.key : null;
1877
1877
  if (ik) {
1878
1878
  if (!chompKeep && ik.spaceBefore)
1879
1879
  lines.push("");
@@ -1921,14 +1921,14 @@ ${indent}${line}` : "\n";
1921
1921
  for (let i = 0; i < items.length; ++i) {
1922
1922
  const item = items[i];
1923
1923
  let comment = null;
1924
- if (identity.isNode(item)) {
1924
+ if (identity2.isNode(item)) {
1925
1925
  if (item.spaceBefore)
1926
1926
  lines.push("");
1927
1927
  addCommentBefore(ctx, lines, item.commentBefore, false);
1928
1928
  if (item.comment)
1929
1929
  comment = item.comment;
1930
- } else if (identity.isPair(item)) {
1931
- const ik = identity.isNode(item.key) ? item.key : null;
1930
+ } else if (identity2.isPair(item)) {
1931
+ const ik = identity2.isNode(item.key) ? item.key : null;
1932
1932
  if (ik) {
1933
1933
  if (ik.spaceBefore)
1934
1934
  lines.push("");
@@ -1936,7 +1936,7 @@ ${indent}${line}` : "\n";
1936
1936
  if (ik.comment)
1937
1937
  reqNewline = true;
1938
1938
  }
1939
- const iv = identity.isNode(item.value) ? item.value : null;
1939
+ const iv = identity2.isNode(item.value) ? item.value : null;
1940
1940
  if (iv) {
1941
1941
  if (iv.comment)
1942
1942
  comment = iv.comment;
@@ -1997,16 +1997,16 @@ var require_YAMLMap = __commonJS({
1997
1997
  var stringifyCollection = require_stringifyCollection();
1998
1998
  var addPairToJSMap = require_addPairToJSMap();
1999
1999
  var Collection = require_Collection();
2000
- var identity = require_identity();
2000
+ var identity2 = require_identity();
2001
2001
  var Pair = require_Pair();
2002
2002
  var Scalar = require_Scalar();
2003
2003
  function findPair(items, key) {
2004
- const k = identity.isScalar(key) ? key.value : key;
2004
+ const k = identity2.isScalar(key) ? key.value : key;
2005
2005
  for (const it of items) {
2006
- if (identity.isPair(it)) {
2006
+ if (identity2.isPair(it)) {
2007
2007
  if (it.key === key || it.key === k)
2008
2008
  return it;
2009
- if (identity.isScalar(it.key) && it.key.value === k)
2009
+ if (identity2.isScalar(it.key) && it.key.value === k)
2010
2010
  return it;
2011
2011
  }
2012
2012
  }
@@ -2017,7 +2017,7 @@ var require_YAMLMap = __commonJS({
2017
2017
  return "tag:yaml.org,2002:map";
2018
2018
  }
2019
2019
  constructor(schema) {
2020
- super(identity.MAP, schema);
2020
+ super(identity2.MAP, schema);
2021
2021
  this.items = [];
2022
2022
  }
2023
2023
  /**
@@ -2055,7 +2055,7 @@ var require_YAMLMap = __commonJS({
2055
2055
  */
2056
2056
  add(pair, overwrite) {
2057
2057
  let _pair;
2058
- if (identity.isPair(pair))
2058
+ if (identity2.isPair(pair))
2059
2059
  _pair = pair;
2060
2060
  else if (!pair || typeof pair !== "object" || !("key" in pair)) {
2061
2061
  _pair = new Pair.Pair(pair, pair?.value);
@@ -2066,7 +2066,7 @@ var require_YAMLMap = __commonJS({
2066
2066
  if (prev) {
2067
2067
  if (!overwrite)
2068
2068
  throw new Error(`Key ${_pair.key} already set`);
2069
- if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))
2069
+ if (identity2.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))
2070
2070
  prev.value.value = _pair.value;
2071
2071
  else
2072
2072
  prev.value = _pair.value;
@@ -2090,7 +2090,7 @@ var require_YAMLMap = __commonJS({
2090
2090
  get(key, keepScalar) {
2091
2091
  const it = findPair(this.items, key);
2092
2092
  const node = it?.value;
2093
- return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? void 0;
2093
+ return (!keepScalar && identity2.isScalar(node) ? node.value : node) ?? void 0;
2094
2094
  }
2095
2095
  has(key) {
2096
2096
  return !!findPair(this.items, key);
@@ -2115,7 +2115,7 @@ var require_YAMLMap = __commonJS({
2115
2115
  if (!ctx)
2116
2116
  return JSON.stringify(this);
2117
2117
  for (const item of this.items) {
2118
- if (!identity.isPair(item))
2118
+ if (!identity2.isPair(item))
2119
2119
  throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
2120
2120
  }
2121
2121
  if (!ctx.allNullValues && this.hasAllNullValues(false))
@@ -2138,7 +2138,7 @@ var require_YAMLMap = __commonJS({
2138
2138
  var require_map = __commonJS({
2139
2139
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/map.js"(exports2) {
2140
2140
  "use strict";
2141
- var identity = require_identity();
2141
+ var identity2 = require_identity();
2142
2142
  var YAMLMap = require_YAMLMap();
2143
2143
  var map = {
2144
2144
  collection: "map",
@@ -2146,7 +2146,7 @@ var require_map = __commonJS({
2146
2146
  nodeClass: YAMLMap.YAMLMap,
2147
2147
  tag: "tag:yaml.org,2002:map",
2148
2148
  resolve(map2, onError) {
2149
- if (!identity.isMap(map2))
2149
+ if (!identity2.isMap(map2))
2150
2150
  onError("Expected a mapping for this tag");
2151
2151
  return map2;
2152
2152
  },
@@ -2163,7 +2163,7 @@ var require_YAMLSeq = __commonJS({
2163
2163
  var createNode = require_createNode();
2164
2164
  var stringifyCollection = require_stringifyCollection();
2165
2165
  var Collection = require_Collection();
2166
- var identity = require_identity();
2166
+ var identity2 = require_identity();
2167
2167
  var Scalar = require_Scalar();
2168
2168
  var toJS = require_toJS();
2169
2169
  var YAMLSeq = class extends Collection.Collection {
@@ -2171,7 +2171,7 @@ var require_YAMLSeq = __commonJS({
2171
2171
  return "tag:yaml.org,2002:seq";
2172
2172
  }
2173
2173
  constructor(schema) {
2174
- super(identity.SEQ, schema);
2174
+ super(identity2.SEQ, schema);
2175
2175
  this.items = [];
2176
2176
  }
2177
2177
  add(value) {
@@ -2197,7 +2197,7 @@ var require_YAMLSeq = __commonJS({
2197
2197
  if (typeof idx !== "number")
2198
2198
  return void 0;
2199
2199
  const it = this.items[idx];
2200
- return !keepScalar && identity.isScalar(it) ? it.value : it;
2200
+ return !keepScalar && identity2.isScalar(it) ? it.value : it;
2201
2201
  }
2202
2202
  /**
2203
2203
  * Checks if the collection includes a value with the key `key`.
@@ -2221,7 +2221,7 @@ var require_YAMLSeq = __commonJS({
2221
2221
  if (typeof idx !== "number")
2222
2222
  throw new Error(`Expected a valid index, not ${key}.`);
2223
2223
  const prev = this.items[idx];
2224
- if (identity.isScalar(prev) && Scalar.isScalarValue(value))
2224
+ if (identity2.isScalar(prev) && Scalar.isScalarValue(value))
2225
2225
  prev.value = value;
2226
2226
  else
2227
2227
  this.items[idx] = value;
@@ -2263,7 +2263,7 @@ var require_YAMLSeq = __commonJS({
2263
2263
  }
2264
2264
  };
2265
2265
  function asItemIndex(key) {
2266
- let idx = identity.isScalar(key) ? key.value : key;
2266
+ let idx = identity2.isScalar(key) ? key.value : key;
2267
2267
  if (idx && typeof idx === "string")
2268
2268
  idx = Number(idx);
2269
2269
  return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
@@ -2276,7 +2276,7 @@ var require_YAMLSeq = __commonJS({
2276
2276
  var require_seq = __commonJS({
2277
2277
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/common/seq.js"(exports2) {
2278
2278
  "use strict";
2279
- var identity = require_identity();
2279
+ var identity2 = require_identity();
2280
2280
  var YAMLSeq = require_YAMLSeq();
2281
2281
  var seq = {
2282
2282
  collection: "seq",
@@ -2284,7 +2284,7 @@ var require_seq = __commonJS({
2284
2284
  nodeClass: YAMLSeq.YAMLSeq,
2285
2285
  tag: "tag:yaml.org,2002:seq",
2286
2286
  resolve(seq2, onError) {
2287
- if (!identity.isSeq(seq2))
2287
+ if (!identity2.isSeq(seq2))
2288
2288
  onError("Expected a sequence for this tag");
2289
2289
  return seq2;
2290
2290
  },
@@ -2638,17 +2638,17 @@ var require_binary = __commonJS({
2638
2638
  var require_pairs = __commonJS({
2639
2639
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports2) {
2640
2640
  "use strict";
2641
- var identity = require_identity();
2641
+ var identity2 = require_identity();
2642
2642
  var Pair = require_Pair();
2643
2643
  var Scalar = require_Scalar();
2644
2644
  var YAMLSeq = require_YAMLSeq();
2645
2645
  function resolvePairs(seq, onError) {
2646
- if (identity.isSeq(seq)) {
2646
+ if (identity2.isSeq(seq)) {
2647
2647
  for (let i = 0; i < seq.items.length; ++i) {
2648
2648
  let item = seq.items[i];
2649
- if (identity.isPair(item))
2649
+ if (identity2.isPair(item))
2650
2650
  continue;
2651
- else if (identity.isMap(item)) {
2651
+ else if (identity2.isMap(item)) {
2652
2652
  if (item.items.length > 1)
2653
2653
  onError("Each pair must have its own sequence indicator");
2654
2654
  const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null));
@@ -2662,7 +2662,7 @@ ${cn.comment}` : item.comment;
2662
2662
  }
2663
2663
  item = pair;
2664
2664
  }
2665
- seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item);
2665
+ seq.items[i] = identity2.isPair(item) ? item : new Pair.Pair(item);
2666
2666
  }
2667
2667
  } else
2668
2668
  onError("Expected a sequence for this tag");
@@ -2716,7 +2716,7 @@ ${cn.comment}` : item.comment;
2716
2716
  var require_omap = __commonJS({
2717
2717
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports2) {
2718
2718
  "use strict";
2719
- var identity = require_identity();
2719
+ var identity2 = require_identity();
2720
2720
  var toJS = require_toJS();
2721
2721
  var YAMLMap = require_YAMLMap();
2722
2722
  var YAMLSeq = require_YAMLSeq();
@@ -2743,7 +2743,7 @@ var require_omap = __commonJS({
2743
2743
  ctx.onCreate(map);
2744
2744
  for (const pair of this.items) {
2745
2745
  let key, value;
2746
- if (identity.isPair(pair)) {
2746
+ if (identity2.isPair(pair)) {
2747
2747
  key = toJS.toJS(pair.key, "", ctx);
2748
2748
  value = toJS.toJS(pair.value, key, ctx);
2749
2749
  } else {
@@ -2773,7 +2773,7 @@ var require_omap = __commonJS({
2773
2773
  const pairs$1 = pairs.resolvePairs(seq, onError);
2774
2774
  const seenKeys = [];
2775
2775
  for (const { key } of pairs$1.items) {
2776
- if (identity.isScalar(key)) {
2776
+ if (identity2.isScalar(key)) {
2777
2777
  if (seenKeys.includes(key.value)) {
2778
2778
  onError(`Ordered maps must not include duplicate keys: ${key.value}`);
2779
2779
  } else {
@@ -2954,7 +2954,7 @@ var require_int2 = __commonJS({
2954
2954
  var require_set = __commonJS({
2955
2955
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports2) {
2956
2956
  "use strict";
2957
- var identity = require_identity();
2957
+ var identity2 = require_identity();
2958
2958
  var Pair = require_Pair();
2959
2959
  var YAMLMap = require_YAMLMap();
2960
2960
  var YAMLSet = class _YAMLSet extends YAMLMap.YAMLMap {
@@ -2964,7 +2964,7 @@ var require_set = __commonJS({
2964
2964
  }
2965
2965
  add(key) {
2966
2966
  let pair;
2967
- if (identity.isPair(key))
2967
+ if (identity2.isPair(key))
2968
2968
  pair = key;
2969
2969
  else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null)
2970
2970
  pair = new Pair.Pair(key.key, null);
@@ -2980,7 +2980,7 @@ var require_set = __commonJS({
2980
2980
  */
2981
2981
  get(key, keepPair) {
2982
2982
  const pair = YAMLMap.findPair(this.items, key);
2983
- return !keepPair && identity.isPair(pair) ? identity.isScalar(pair.key) ? pair.key.value : pair.key : pair;
2983
+ return !keepPair && identity2.isPair(pair) ? identity2.isScalar(pair.key) ? pair.key.value : pair.key : pair;
2984
2984
  }
2985
2985
  set(key, value) {
2986
2986
  if (typeof value !== "boolean")
@@ -3024,7 +3024,7 @@ var require_set = __commonJS({
3024
3024
  tag: "tag:yaml.org,2002:set",
3025
3025
  createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),
3026
3026
  resolve(map, onError) {
3027
- if (identity.isMap(map)) {
3027
+ if (identity2.isMap(map)) {
3028
3028
  if (map.hasAllNullValues(true))
3029
3029
  return Object.assign(new YAMLSet(), map);
3030
3030
  else
@@ -3269,7 +3269,7 @@ var require_tags = __commonJS({
3269
3269
  var require_Schema = __commonJS({
3270
3270
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/schema/Schema.js"(exports2) {
3271
3271
  "use strict";
3272
- var identity = require_identity();
3272
+ var identity2 = require_identity();
3273
3273
  var map = require_map();
3274
3274
  var seq = require_seq();
3275
3275
  var string = require_string();
@@ -3282,9 +3282,9 @@ var require_Schema = __commonJS({
3282
3282
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
3283
3283
  this.tags = tags.getTags(customTags, this.name, merge);
3284
3284
  this.toStringOptions = toStringDefaults ?? null;
3285
- Object.defineProperty(this, identity.MAP, { value: map.map });
3286
- Object.defineProperty(this, identity.SCALAR, { value: string.string });
3287
- Object.defineProperty(this, identity.SEQ, { value: seq.seq });
3285
+ Object.defineProperty(this, identity2.MAP, { value: map.map });
3286
+ Object.defineProperty(this, identity2.SCALAR, { value: string.string });
3287
+ Object.defineProperty(this, identity2.SEQ, { value: seq.seq });
3288
3288
  this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null;
3289
3289
  }
3290
3290
  clone() {
@@ -3301,7 +3301,7 @@ var require_Schema = __commonJS({
3301
3301
  var require_stringifyDocument = __commonJS({
3302
3302
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports2) {
3303
3303
  "use strict";
3304
- var identity = require_identity();
3304
+ var identity2 = require_identity();
3305
3305
  var stringify = require_stringify();
3306
3306
  var stringifyComment = require_stringifyComment();
3307
3307
  function stringifyDocument(doc, options) {
@@ -3328,7 +3328,7 @@ var require_stringifyDocument = __commonJS({
3328
3328
  let chompKeep = false;
3329
3329
  let contentComment = null;
3330
3330
  if (doc.contents) {
3331
- if (identity.isNode(doc.contents)) {
3331
+ if (identity2.isNode(doc.contents)) {
3332
3332
  if (doc.contents.spaceBefore && hasDirectives)
3333
3333
  lines.push("");
3334
3334
  if (doc.contents.commentBefore) {
@@ -3383,7 +3383,7 @@ var require_Document = __commonJS({
3383
3383
  "use strict";
3384
3384
  var Alias = require_Alias();
3385
3385
  var Collection = require_Collection();
3386
- var identity = require_identity();
3386
+ var identity2 = require_identity();
3387
3387
  var Pair = require_Pair();
3388
3388
  var toJS = require_toJS();
3389
3389
  var Schema = require_Schema();
@@ -3398,7 +3398,7 @@ var require_Document = __commonJS({
3398
3398
  this.comment = null;
3399
3399
  this.errors = [];
3400
3400
  this.warnings = [];
3401
- Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC });
3401
+ Object.defineProperty(this, identity2.NODE_TYPE, { value: identity2.DOC });
3402
3402
  let _replacer = null;
3403
3403
  if (typeof replacer === "function" || Array.isArray(replacer)) {
3404
3404
  _replacer = replacer;
@@ -3434,7 +3434,7 @@ var require_Document = __commonJS({
3434
3434
  */
3435
3435
  clone() {
3436
3436
  const copy = Object.create(_Document.prototype, {
3437
- [identity.NODE_TYPE]: { value: identity.DOC }
3437
+ [identity2.NODE_TYPE]: { value: identity2.DOC }
3438
3438
  });
3439
3439
  copy.commentBefore = this.commentBefore;
3440
3440
  copy.comment = this.comment;
@@ -3444,7 +3444,7 @@ var require_Document = __commonJS({
3444
3444
  if (this.directives)
3445
3445
  copy.directives = this.directives.clone();
3446
3446
  copy.schema = this.schema.clone();
3447
- copy.contents = identity.isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents;
3447
+ copy.contents = identity2.isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents;
3448
3448
  if (this.range)
3449
3449
  copy.range = this.range.slice();
3450
3450
  return copy;
@@ -3507,7 +3507,7 @@ var require_Document = __commonJS({
3507
3507
  sourceObjects
3508
3508
  };
3509
3509
  const node = createNode.createNode(value, tag, ctx);
3510
- if (flow && identity.isCollection(node))
3510
+ if (flow && identity2.isCollection(node))
3511
3511
  node.flow = true;
3512
3512
  setAnchors();
3513
3513
  return node;
@@ -3547,7 +3547,7 @@ var require_Document = __commonJS({
3547
3547
  * `true` (collections are always returned intact).
3548
3548
  */
3549
3549
  get(key, keepScalar) {
3550
- return identity.isCollection(this.contents) ? this.contents.get(key, keepScalar) : void 0;
3550
+ return identity2.isCollection(this.contents) ? this.contents.get(key, keepScalar) : void 0;
3551
3551
  }
3552
3552
  /**
3553
3553
  * Returns item at `path`, or `undefined` if not found. By default unwraps
@@ -3556,14 +3556,14 @@ var require_Document = __commonJS({
3556
3556
  */
3557
3557
  getIn(path24, keepScalar) {
3558
3558
  if (Collection.isEmptyPath(path24))
3559
- return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;
3560
- return identity.isCollection(this.contents) ? this.contents.getIn(path24, keepScalar) : void 0;
3559
+ return !keepScalar && identity2.isScalar(this.contents) ? this.contents.value : this.contents;
3560
+ return identity2.isCollection(this.contents) ? this.contents.getIn(path24, keepScalar) : void 0;
3561
3561
  }
3562
3562
  /**
3563
3563
  * Checks if the document includes a value with the key `key`.
3564
3564
  */
3565
3565
  has(key) {
3566
- return identity.isCollection(this.contents) ? this.contents.has(key) : false;
3566
+ return identity2.isCollection(this.contents) ? this.contents.has(key) : false;
3567
3567
  }
3568
3568
  /**
3569
3569
  * Checks if the document includes a value at `path`.
@@ -3571,7 +3571,7 @@ var require_Document = __commonJS({
3571
3571
  hasIn(path24) {
3572
3572
  if (Collection.isEmptyPath(path24))
3573
3573
  return this.contents !== void 0;
3574
- return identity.isCollection(this.contents) ? this.contents.hasIn(path24) : false;
3574
+ return identity2.isCollection(this.contents) ? this.contents.hasIn(path24) : false;
3575
3575
  }
3576
3576
  /**
3577
3577
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -3678,7 +3678,7 @@ var require_Document = __commonJS({
3678
3678
  }
3679
3679
  };
3680
3680
  function assertCollection(contents) {
3681
- if (identity.isCollection(contents))
3681
+ if (identity2.isCollection(contents))
3682
3682
  return true;
3683
3683
  throw new Error("Expected a YAML collection as document contents");
3684
3684
  }
@@ -3949,12 +3949,12 @@ var require_util_flow_indent_check = __commonJS({
3949
3949
  var require_util_map_includes = __commonJS({
3950
3950
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/util-map-includes.js"(exports2) {
3951
3951
  "use strict";
3952
- var identity = require_identity();
3952
+ var identity2 = require_identity();
3953
3953
  function mapIncludes(ctx, items, search) {
3954
3954
  const { uniqueKeys } = ctx.options;
3955
3955
  if (uniqueKeys === false)
3956
3956
  return false;
3957
- const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || identity.isScalar(a) && identity.isScalar(b) && a.value === b.value;
3957
+ const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || identity2.isScalar(a) && identity2.isScalar(b) && a.value === b.value;
3958
3958
  return items.some((pair) => isEqual(pair.key, search));
3959
3959
  }
3960
3960
  exports2.mapIncludes = mapIncludes;
@@ -4167,7 +4167,7 @@ var require_resolve_end = __commonJS({
4167
4167
  var require_resolve_flow_collection = __commonJS({
4168
4168
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports2) {
4169
4169
  "use strict";
4170
- var identity = require_identity();
4170
+ var identity2 = require_identity();
4171
4171
  var Pair = require_Pair();
4172
4172
  var YAMLMap = require_YAMLMap();
4173
4173
  var YAMLSeq = require_YAMLSeq();
@@ -4246,7 +4246,7 @@ var require_resolve_flow_collection = __commonJS({
4246
4246
  }
4247
4247
  if (prevItemComment) {
4248
4248
  let prev = coll.items[coll.items.length - 1];
4249
- if (identity.isPair(prev))
4249
+ if (identity2.isPair(prev))
4250
4250
  prev = prev.value ?? prev.key;
4251
4251
  if (prev.comment)
4252
4252
  prev.comment += "\n" + prevItemComment;
@@ -4361,7 +4361,7 @@ var require_resolve_flow_collection = __commonJS({
4361
4361
  var require_compose_collection = __commonJS({
4362
4362
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-collection.js"(exports2) {
4363
4363
  "use strict";
4364
- var identity = require_identity();
4364
+ var identity2 = require_identity();
4365
4365
  var Scalar = require_Scalar();
4366
4366
  var YAMLMap = require_YAMLMap();
4367
4367
  var YAMLSeq = require_YAMLSeq();
@@ -4411,7 +4411,7 @@ var require_compose_collection = __commonJS({
4411
4411
  }
4412
4412
  const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);
4413
4413
  const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
4414
- const node = identity.isNode(res) ? res : new Scalar.Scalar(res);
4414
+ const node = identity2.isNode(res) ? res : new Scalar.Scalar(res);
4415
4415
  node.range = coll.range;
4416
4416
  node.tag = tagName;
4417
4417
  if (tag?.format)
@@ -4828,7 +4828,7 @@ var require_resolve_flow_scalar = __commonJS({
4828
4828
  var require_compose_scalar = __commonJS({
4829
4829
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-scalar.js"(exports2) {
4830
4830
  "use strict";
4831
- var identity = require_identity();
4831
+ var identity2 = require_identity();
4832
4832
  var Scalar = require_Scalar();
4833
4833
  var resolveBlockScalar = require_resolve_block_scalar();
4834
4834
  var resolveFlowScalar = require_resolve_flow_scalar();
@@ -4837,17 +4837,17 @@ var require_compose_scalar = __commonJS({
4837
4837
  const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
4838
4838
  let tag;
4839
4839
  if (ctx.options.stringKeys && ctx.atKey) {
4840
- tag = ctx.schema[identity.SCALAR];
4840
+ tag = ctx.schema[identity2.SCALAR];
4841
4841
  } else if (tagName)
4842
4842
  tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError);
4843
4843
  else if (token.type === "scalar")
4844
4844
  tag = findScalarTagByTest(ctx, value, token, onError);
4845
4845
  else
4846
- tag = ctx.schema[identity.SCALAR];
4846
+ tag = ctx.schema[identity2.SCALAR];
4847
4847
  let scalar;
4848
4848
  try {
4849
4849
  const res = tag.resolve(value, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options);
4850
- scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);
4850
+ scalar = identity2.isScalar(res) ? res : new Scalar.Scalar(res);
4851
4851
  } catch (error) {
4852
4852
  const msg = error instanceof Error ? error.message : String(error);
4853
4853
  onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg);
@@ -4867,7 +4867,7 @@ var require_compose_scalar = __commonJS({
4867
4867
  }
4868
4868
  function findScalarTagByName(schema, value, tagName, tagToken, onError) {
4869
4869
  if (tagName === "!")
4870
- return schema[identity.SCALAR];
4870
+ return schema[identity2.SCALAR];
4871
4871
  const matchWithTest = [];
4872
4872
  for (const tag of schema.tags) {
4873
4873
  if (!tag.collection && tag.tag === tagName) {
@@ -4886,12 +4886,12 @@ var require_compose_scalar = __commonJS({
4886
4886
  return kt;
4887
4887
  }
4888
4888
  onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str");
4889
- return schema[identity.SCALAR];
4889
+ return schema[identity2.SCALAR];
4890
4890
  }
4891
4891
  function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {
4892
- const tag = schema.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema[identity.SCALAR];
4892
+ const tag = schema.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && tag2.test?.test(value)) || schema[identity2.SCALAR];
4893
4893
  if (schema.compat) {
4894
- const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity.SCALAR];
4894
+ const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity2.SCALAR];
4895
4895
  if (tag.tag !== compat.tag) {
4896
4896
  const ts = directives.tagString(tag.tag);
4897
4897
  const cs = directives.tagString(compat.tag);
@@ -4940,7 +4940,7 @@ var require_compose_node = __commonJS({
4940
4940
  "node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/dist/compose/compose-node.js"(exports2) {
4941
4941
  "use strict";
4942
4942
  var Alias = require_Alias();
4943
- var identity = require_identity();
4943
+ var identity2 = require_identity();
4944
4944
  var composeCollection = require_compose_collection();
4945
4945
  var composeScalar = require_compose_scalar();
4946
4946
  var resolveEnd = require_resolve_end();
@@ -4981,7 +4981,7 @@ var require_compose_node = __commonJS({
4981
4981
  }
4982
4982
  if (anchor && node.anchor === "")
4983
4983
  onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
4984
- if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
4984
+ if (atKey && ctx.options.stringKeys && (!identity2.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
4985
4985
  const msg = "With stringKeys, all keys must be strings";
4986
4986
  onError(tag ?? token, "NON_STRING_KEY", msg);
4987
4987
  }
@@ -5087,7 +5087,7 @@ var require_composer = __commonJS({
5087
5087
  var directives = require_directives();
5088
5088
  var Document2 = require_Document();
5089
5089
  var errors = require_errors();
5090
- var identity = require_identity();
5090
+ var identity2 = require_identity();
5091
5091
  var composeDoc = require_compose_doc();
5092
5092
  var resolveEnd = require_resolve_end();
5093
5093
  function getErrorPos(src) {
@@ -5149,9 +5149,9 @@ var require_composer = __commonJS({
5149
5149
  ${comment}` : comment;
5150
5150
  } else if (afterEmptyLine || doc.directives.docStart || !dc) {
5151
5151
  doc.commentBefore = comment;
5152
- } else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) {
5152
+ } else if (identity2.isCollection(dc) && !dc.flow && dc.items.length > 0) {
5153
5153
  let it = dc.items[0];
5154
- if (identity.isPair(it))
5154
+ if (identity2.isPair(it))
5155
5155
  it = it.key;
5156
5156
  const cb = it.commentBefore;
5157
5157
  it.commentBefore = cb ? `${comment}
@@ -7180,7 +7180,7 @@ var require_public_api = __commonJS({
7180
7180
  var Document2 = require_Document();
7181
7181
  var errors = require_errors();
7182
7182
  var log = require_log();
7183
- var identity = require_identity();
7183
+ var identity2 = require_identity();
7184
7184
  var lineCounter = require_line_counter();
7185
7185
  var parser = require_parser();
7186
7186
  function parseOptions(options) {
@@ -7258,7 +7258,7 @@ var require_public_api = __commonJS({
7258
7258
  if (!keepUndefined)
7259
7259
  return void 0;
7260
7260
  }
7261
- if (identity.isDocument(value) && !_replacer)
7261
+ if (identity2.isDocument(value) && !_replacer)
7262
7262
  return value.toString(options);
7263
7263
  return new Document2.Document(value, _replacer, options).toString(options);
7264
7264
  }
@@ -7278,7 +7278,7 @@ var require_dist = __commonJS({
7278
7278
  var Schema = require_Schema();
7279
7279
  var errors = require_errors();
7280
7280
  var Alias = require_Alias();
7281
- var identity = require_identity();
7281
+ var identity2 = require_identity();
7282
7282
  var Pair = require_Pair();
7283
7283
  var Scalar = require_Scalar();
7284
7284
  var YAMLMap = require_YAMLMap();
@@ -7296,14 +7296,14 @@ var require_dist = __commonJS({
7296
7296
  exports2.YAMLParseError = errors.YAMLParseError;
7297
7297
  exports2.YAMLWarning = errors.YAMLWarning;
7298
7298
  exports2.Alias = Alias.Alias;
7299
- exports2.isAlias = identity.isAlias;
7300
- exports2.isCollection = identity.isCollection;
7301
- exports2.isDocument = identity.isDocument;
7302
- exports2.isMap = identity.isMap;
7303
- exports2.isNode = identity.isNode;
7304
- exports2.isPair = identity.isPair;
7305
- exports2.isScalar = identity.isScalar;
7306
- exports2.isSeq = identity.isSeq;
7299
+ exports2.isAlias = identity2.isAlias;
7300
+ exports2.isCollection = identity2.isCollection;
7301
+ exports2.isDocument = identity2.isDocument;
7302
+ exports2.isMap = identity2.isMap;
7303
+ exports2.isNode = identity2.isNode;
7304
+ exports2.isPair = identity2.isPair;
7305
+ exports2.isScalar = identity2.isScalar;
7306
+ exports2.isSeq = identity2.isSeq;
7307
7307
  exports2.Pair = Pair.Pair;
7308
7308
  exports2.Scalar = Scalar.Scalar;
7309
7309
  exports2.YAMLMap = YAMLMap.YAMLMap;
@@ -25745,13 +25745,13 @@ var require_view = __commonJS({
25745
25745
  View.prototype.resolve = function resolve2(dir, file) {
25746
25746
  var ext = this.ext;
25747
25747
  var path25 = join(dir, file);
25748
- var stat3 = tryStat(path25);
25749
- if (stat3 && stat3.isFile()) {
25748
+ var stat4 = tryStat(path25);
25749
+ if (stat4 && stat4.isFile()) {
25750
25750
  return path25;
25751
25751
  }
25752
25752
  path25 = join(dir, basename(file, ext), "index" + ext);
25753
- stat3 = tryStat(path25);
25754
- if (stat3 && stat3.isFile()) {
25753
+ stat4 = tryStat(path25);
25754
+ if (stat4 && stat4.isFile()) {
25755
25755
  return path25;
25756
25756
  }
25757
25757
  };
@@ -26021,9 +26021,9 @@ var require_etag = __commonJS({
26021
26021
  }
26022
26022
  return obj && typeof obj === "object" && "ctime" in obj && toString.call(obj.ctime) === "[object Date]" && "mtime" in obj && toString.call(obj.mtime) === "[object Date]" && "ino" in obj && typeof obj.ino === "number" && "size" in obj && typeof obj.size === "number";
26023
26023
  }
26024
- function stattag(stat3) {
26025
- var mtime = stat3.mtime.getTime().toString(16);
26026
- var size = stat3.size.toString(16);
26024
+ function stattag(stat4) {
26025
+ var mtime = stat4.mtime.getTime().toString(16);
26026
+ var size = stat4.size.toString(16);
26027
26027
  return '"' + size + "-" + mtime + '"';
26028
26028
  }
26029
26029
  }
@@ -26636,8 +26636,8 @@ var require_send = __commonJS({
26636
26636
  this.sendFile(path25);
26637
26637
  return res;
26638
26638
  };
26639
- SendStream.prototype.send = function send3(path25, stat3) {
26640
- var len = stat3.size;
26639
+ SendStream.prototype.send = function send3(path25, stat4) {
26640
+ var len = stat4.size;
26641
26641
  var options = this.options;
26642
26642
  var opts = {};
26643
26643
  var res = this.res;
@@ -26649,7 +26649,7 @@ var require_send = __commonJS({
26649
26649
  return;
26650
26650
  }
26651
26651
  debug('pipe "%s"', path25);
26652
- this.setHeader(path25, stat3);
26652
+ this.setHeader(path25, stat4);
26653
26653
  this.type(path25);
26654
26654
  if (this.isConditionalGET()) {
26655
26655
  if (this.isPreconditionFailure()) {
@@ -26705,14 +26705,14 @@ var require_send = __commonJS({
26705
26705
  var i = 0;
26706
26706
  var self = this;
26707
26707
  debug('stat "%s"', path25);
26708
- fs.stat(path25, function onstat(err, stat3) {
26708
+ fs.stat(path25, function onstat(err, stat4) {
26709
26709
  if (err && err.code === "ENOENT" && !extname(path25) && path25[path25.length - 1] !== sep) {
26710
26710
  return next(err);
26711
26711
  }
26712
26712
  if (err) return self.onStatError(err);
26713
- if (stat3.isDirectory()) return self.redirect(path25);
26714
- self.emit("file", path25, stat3);
26715
- self.send(path25, stat3);
26713
+ if (stat4.isDirectory()) return self.redirect(path25);
26714
+ self.emit("file", path25, stat4);
26715
+ self.send(path25, stat4);
26716
26716
  });
26717
26717
  function next(err) {
26718
26718
  if (self._extensions.length <= i) {
@@ -26720,11 +26720,11 @@ var require_send = __commonJS({
26720
26720
  }
26721
26721
  var p = path25 + "." + self._extensions[i++];
26722
26722
  debug('stat "%s"', p);
26723
- fs.stat(p, function(err2, stat3) {
26723
+ fs.stat(p, function(err2, stat4) {
26724
26724
  if (err2) return next(err2);
26725
- if (stat3.isDirectory()) return next();
26726
- self.emit("file", p, stat3);
26727
- self.send(p, stat3);
26725
+ if (stat4.isDirectory()) return next();
26726
+ self.emit("file", p, stat4);
26727
+ self.send(p, stat4);
26728
26728
  });
26729
26729
  }
26730
26730
  };
@@ -26738,11 +26738,11 @@ var require_send = __commonJS({
26738
26738
  }
26739
26739
  var p = join(path25, self._index[i]);
26740
26740
  debug('stat "%s"', p);
26741
- fs.stat(p, function(err2, stat3) {
26741
+ fs.stat(p, function(err2, stat4) {
26742
26742
  if (err2) return next(err2);
26743
- if (stat3.isDirectory()) return next();
26744
- self.emit("file", p, stat3);
26745
- self.send(p, stat3);
26743
+ if (stat4.isDirectory()) return next();
26744
+ self.emit("file", p, stat4);
26745
+ self.send(p, stat4);
26746
26746
  });
26747
26747
  }
26748
26748
  next();
@@ -26777,9 +26777,9 @@ var require_send = __commonJS({
26777
26777
  debug("content-type %s", type2);
26778
26778
  res.setHeader("Content-Type", type2 + (charset ? "; charset=" + charset : ""));
26779
26779
  };
26780
- SendStream.prototype.setHeader = function setHeader(path25, stat3) {
26780
+ SendStream.prototype.setHeader = function setHeader(path25, stat4) {
26781
26781
  var res = this.res;
26782
- this.emit("headers", res, path25, stat3);
26782
+ this.emit("headers", res, path25, stat4);
26783
26783
  if (this._acceptRanges && !res.getHeader("Accept-Ranges")) {
26784
26784
  debug("accept ranges");
26785
26785
  res.setHeader("Accept-Ranges", "bytes");
@@ -26793,12 +26793,12 @@ var require_send = __commonJS({
26793
26793
  res.setHeader("Cache-Control", cacheControl);
26794
26794
  }
26795
26795
  if (this._lastModified && !res.getHeader("Last-Modified")) {
26796
- var modified = stat3.mtime.toUTCString();
26796
+ var modified = stat4.mtime.toUTCString();
26797
26797
  debug("modified %s", modified);
26798
26798
  res.setHeader("Last-Modified", modified);
26799
26799
  }
26800
26800
  if (this._etag && !res.getHeader("ETag")) {
26801
- var val = etag(stat3);
26801
+ var val = etag(stat4);
26802
26802
  debug("etag %s", val);
26803
26803
  res.setHeader("ETag", val);
26804
26804
  }
@@ -33014,7 +33014,7 @@ var require_stream = __commonJS({
33014
33014
  };
33015
33015
  duplex._final = function(callback) {
33016
33016
  if (ws.readyState === ws.CONNECTING) {
33017
- ws.once("open", function open9() {
33017
+ ws.once("open", function open10() {
33018
33018
  duplex._final(callback);
33019
33019
  });
33020
33020
  return;
@@ -33035,7 +33035,7 @@ var require_stream = __commonJS({
33035
33035
  };
33036
33036
  duplex._write = function(chunk, encoding, callback) {
33037
33037
  if (ws.readyState === ws.CONNECTING) {
33038
- ws.once("open", function open9() {
33038
+ ws.once("open", function open10() {
33039
33039
  duplex._write(chunk, encoding, callback);
33040
33040
  });
33041
33041
  return;
@@ -33560,17 +33560,17 @@ async function scanConversationSource(file, consume, signal, validateSource) {
33560
33560
  try {
33561
33561
  if (await (0, import_promises.realpath)(file) !== file) return null;
33562
33562
  handle = await (0, import_promises.open)(file, import_node_fs2.constants.O_RDONLY | import_node_fs2.constants.O_NOFOLLOW | (validateSource ? import_node_fs2.constants.O_NONBLOCK : 0));
33563
- const stat3 = await handle.stat();
33564
- if (!stat3.isFile()) return null;
33565
- await validateSource?.(stat3);
33563
+ const stat4 = await handle.stat();
33564
+ if (!stat4.isFile()) return null;
33565
+ await validateSource?.(stat4);
33566
33566
  const windowBytes = 64 * 1024 * 1024;
33567
- const truncated = stat3.size > windowBytes;
33567
+ const truncated = stat4.size > windowBytes;
33568
33568
  let partial = truncated;
33569
33569
  const chunk = Buffer.alloc(256 * 1024);
33570
33570
  const ranges = truncated ? [
33571
- { start: 0, end: Math.min(chunk.length, stat3.size), header: true },
33572
- { start: stat3.size - windowBytes, end: stat3.size, header: false }
33573
- ] : [{ start: 0, end: stat3.size, header: false }];
33571
+ { start: 0, end: Math.min(chunk.length, stat4.size), header: true },
33572
+ { start: stat4.size - windowBytes, end: stat4.size, header: false }
33573
+ ] : [{ start: 0, end: stat4.size, header: false }];
33574
33574
  for (const range of ranges) {
33575
33575
  let position = range.start;
33576
33576
  let lineOffset = position;
@@ -33647,7 +33647,7 @@ var AnalysisEvidenceReader = class {
33647
33647
  const handle = await (0, import_promises2.open)(file, "r");
33648
33648
  try {
33649
33649
  const info = await handle.stat();
33650
- const identity = (0, import_node_crypto.createHash)("sha256").update(`${threadID}:${info.dev}:${info.ino}:${info.birthtimeMs}`).digest("hex");
33650
+ const identity2 = (0, import_node_crypto.createHash)("sha256").update(`${threadID}:${info.dev}:${info.ino}:${info.birthtimeMs}`).digest("hex");
33651
33651
  const prefix = Buffer.alloc(Math.min(info.size, 128 * 1024));
33652
33652
  await handle.read(prefix, 0, prefix.length, 0);
33653
33653
  const first = prefix.toString("utf8").split("\n")[0];
@@ -33664,7 +33664,7 @@ var AnalysisEvidenceReader = class {
33664
33664
  if (cursor) {
33665
33665
  try {
33666
33666
  const c = JSON.parse(Buffer.from(cursor, "base64url").toString());
33667
- if (c.identity !== identity || !Number.isSafeInteger(c.offset) || c.offset < 0 || c.offset > info.size) throw new Error();
33667
+ if (c.identity !== identity2 || !Number.isSafeInteger(c.offset) || c.offset < 0 || c.offset > info.size) throw new Error();
33668
33668
  offset = c.offset;
33669
33669
  skip = c.skip === true;
33670
33670
  missing2 = c.missing === true;
@@ -33755,7 +33755,7 @@ var AnalysisEvidenceReader = class {
33755
33755
  bytes += cost;
33756
33756
  consumed = end;
33757
33757
  }
33758
- return { events, nextCursor: Buffer.from(JSON.stringify({ identity, offset: offset + consumed, skip, derived, calls, missing: missing2 || truncated })).toString("base64url"), coverage: missing2 || truncated || offset + consumed < info.size ? "partial" : "complete", bytes, sourceVersion: identity };
33758
+ return { events, nextCursor: Buffer.from(JSON.stringify({ identity: identity2, offset: offset + consumed, skip, derived, calls, missing: missing2 || truncated })).toString("base64url"), coverage: missing2 || truncated || offset + consumed < info.size ? "partial" : "complete", bytes, sourceVersion: identity2 };
33759
33759
  } finally {
33760
33760
  await handle.close();
33761
33761
  }
@@ -34036,7 +34036,7 @@ var SupervisionConversationReader = class {
34036
34036
  const prefix = Buffer.alloc(Math.min(1024, info.size));
34037
34037
  await handle.read(prefix, 0, prefix.length, 0);
34038
34038
  const sessionEnd = prefix.indexOf(10);
34039
- const identity = `${info.dev}:${info.ino}:${info.birthtimeMs}:${(0, import_node_crypto2.createHash)(
34039
+ const identity2 = `${info.dev}:${info.ino}:${info.birthtimeMs}:${(0, import_node_crypto2.createHash)(
34040
34040
  "sha256"
34041
34041
  ).update(sessionEnd >= 0 ? prefix.subarray(0, sessionEnd) : prefix).digest("hex")}`;
34042
34042
  const key = (0, import_node_crypto2.createHash)("sha256").update(threadId).digest("hex");
@@ -34056,7 +34056,7 @@ var SupervisionConversationReader = class {
34056
34056
  }
34057
34057
  cached = {
34058
34058
  index: index2 ?? {
34059
- identity,
34059
+ identity: identity2,
34060
34060
  source,
34061
34061
  offset: 0,
34062
34062
  valid: false,
@@ -34069,11 +34069,11 @@ var SupervisionConversationReader = class {
34069
34069
  this.caches.set(key, cached);
34070
34070
  }
34071
34071
  const rewritten = info.size < (cached.index.sourceSize ?? 0) || info.size === cached.index.sourceSize && info.mtimeMs !== cached.index.sourceMtime;
34072
- if (cached.index.identity !== identity || cached.index.source !== source || cached.position > info.size || rewritten) {
34072
+ if (cached.index.identity !== identity2 || cached.index.source !== source || cached.position > info.size || rewritten) {
34073
34073
  cached = {
34074
34074
  index: {
34075
- identity,
34076
- version: `${identity}:${(0, import_node_crypto2.randomUUID)()}`,
34075
+ identity: identity2,
34076
+ version: `${identity2}:${(0, import_node_crypto2.randomUUID)()}`,
34077
34077
  source,
34078
34078
  offset: 0,
34079
34079
  valid: false,
@@ -34305,7 +34305,7 @@ var SupervisionConversationReader = class {
34305
34305
  ...empty2,
34306
34306
  availability: "available",
34307
34307
  indexing: false,
34308
- sourceVersion: index.version ?? identity,
34308
+ sourceVersion: index.version ?? identity2,
34309
34309
  scannedBytes: cached.position,
34310
34310
  sourceBytes: info.size,
34311
34311
  runtimeError: index.error,
@@ -34563,8 +34563,8 @@ var ClaudeConversationReader = class {
34563
34563
  constructor(sessions) {
34564
34564
  this.sessions = sessions;
34565
34565
  }
34566
- isSourceUnchanged(threadId, signature) {
34567
- return this.sessions.isUnchanged(threadId, signature);
34566
+ isSourceUnchanged(threadId, signature2) {
34567
+ return this.sessions.isUnchanged(threadId, signature2);
34568
34568
  }
34569
34569
  async read(thread, signal) {
34570
34570
  if (thread.agent !== "claude") return null;
@@ -35083,29 +35083,29 @@ function assertWindowsPrivatePath(file) {
35083
35083
 
35084
35084
  // packages/config-node/src/private-file.ts
35085
35085
  function privateDirectoryStat(directory) {
35086
- const stat3 = (0, import_node_fs5.lstatSync)(directory);
35087
- if (!stat3.isDirectory() || stat3.isSymbolicLink() || process.platform !== "win32" && stat3.mode & 63 || typeof process.getuid === "function" && stat3.uid !== process.getuid()) throw new ConfigurationError("CONFIG_ROOT_PERMISSIONS_INVALID");
35088
- return stat3;
35086
+ const stat4 = (0, import_node_fs5.lstatSync)(directory);
35087
+ if (!stat4.isDirectory() || stat4.isSymbolicLink() || process.platform !== "win32" && stat4.mode & 63 || typeof process.getuid === "function" && stat4.uid !== process.getuid()) throw new ConfigurationError("CONFIG_ROOT_PERMISSIONS_INVALID");
35088
+ return stat4;
35089
35089
  }
35090
35090
  function privateDescriptorStat(fd, maxBytes) {
35091
- const stat3 = (0, import_node_fs5.fstatSync)(fd);
35092
- if (!stat3.isFile() || stat3.nlink !== 1) throw new ConfigurationError("CONFIG_FILE_NOT_PRIVATE_REGULAR");
35093
- if (typeof process.getuid === "function" && stat3.uid !== process.getuid()) throw new ConfigurationError("CONFIG_FILE_OWNER_MISMATCH");
35094
- if (process.platform !== "win32" && stat3.mode & 63) throw new ConfigurationError("CONFIG_FILE_PERMISSIONS_INVALID");
35095
- if (stat3.size > maxBytes) throw new ConfigurationError("CONFIG_FILE_TOO_LARGE");
35096
- return stat3;
35091
+ const stat4 = (0, import_node_fs5.fstatSync)(fd);
35092
+ if (!stat4.isFile() || stat4.nlink !== 1) throw new ConfigurationError("CONFIG_FILE_NOT_PRIVATE_REGULAR");
35093
+ if (typeof process.getuid === "function" && stat4.uid !== process.getuid()) throw new ConfigurationError("CONFIG_FILE_OWNER_MISMATCH");
35094
+ if (process.platform !== "win32" && stat4.mode & 63) throw new ConfigurationError("CONFIG_FILE_PERMISSIONS_INVALID");
35095
+ if (stat4.size > maxBytes) throw new ConfigurationError("CONFIG_FILE_TOO_LARGE");
35096
+ return stat4;
35097
35097
  }
35098
35098
  function assertPrivateDirectory(directory) {
35099
35099
  privateDirectoryStat(directory);
35100
35100
  assertWindowsPrivatePath(directory);
35101
35101
  }
35102
35102
  function assertPrivateDescriptor(fd, maxBytes = 1024 * 1024, file) {
35103
- const stat3 = privateDescriptorStat(fd, Infinity);
35103
+ const stat4 = privateDescriptorStat(fd, Infinity);
35104
35104
  if (process.platform === "win32") {
35105
35105
  if (!file) throw new ConfigurationError("CONFIG_PRIVATE_PATH_REQUIRED");
35106
35106
  assertWindowsPrivatePath(file);
35107
35107
  }
35108
- if (stat3.size > maxBytes) throw new ConfigurationError("CONFIG_FILE_TOO_LARGE");
35108
+ if (stat4.size > maxBytes) throw new ConfigurationError("CONFIG_FILE_TOO_LARGE");
35109
35109
  }
35110
35110
  function readPrivateFile(file, maxBytes = 1024 * 1024) {
35111
35111
  const fd = (0, import_node_fs5.openSync)(file, import_node_fs5.constants.O_RDONLY | import_node_fs5.constants.O_NOFOLLOW);
@@ -35530,12 +35530,12 @@ function parseConfigurationYaml(source, context) {
35530
35530
  return { document: document2, value, digest: (0, import_node_crypto4.createHash)("sha256").update(source).digest("hex"), issues: validateDomains(value, context) };
35531
35531
  }
35532
35532
  function assertPrivateFile(file, fd) {
35533
- const stat3 = fd === void 0 ? (0, import_node_fs8.lstatSync)(file) : (0, import_node_fs8.fstatSync)(fd);
35534
- if (!stat3.isFile() || stat3.isSymbolicLink() || stat3.nlink !== 1) throw new ConfigurationError("CONFIG_FILE_NOT_PRIVATE_REGULAR");
35535
- if (typeof process.getuid === "function" && stat3.uid !== process.getuid()) throw new ConfigurationError("CONFIG_FILE_OWNER_MISMATCH");
35536
- if (process.platform !== "win32" && (stat3.mode & 63) !== 0) throw new ConfigurationError("CONFIG_FILE_PERMISSIONS_INVALID");
35533
+ const stat4 = fd === void 0 ? (0, import_node_fs8.lstatSync)(file) : (0, import_node_fs8.fstatSync)(fd);
35534
+ if (!stat4.isFile() || stat4.isSymbolicLink() || stat4.nlink !== 1) throw new ConfigurationError("CONFIG_FILE_NOT_PRIVATE_REGULAR");
35535
+ if (typeof process.getuid === "function" && stat4.uid !== process.getuid()) throw new ConfigurationError("CONFIG_FILE_OWNER_MISMATCH");
35536
+ if (process.platform !== "win32" && (stat4.mode & 63) !== 0) throw new ConfigurationError("CONFIG_FILE_PERMISSIONS_INVALID");
35537
35537
  assertWindowsPrivatePath(file);
35538
- if (stat3.size > MAX_BYTES) throw new ConfigurationError("CONFIG_FILE_TOO_LARGE", [], { line: 1, column: 1 });
35538
+ if (stat4.size > MAX_BYTES) throw new ConfigurationError("CONFIG_FILE_TOO_LARGE", [], { line: 1, column: 1 });
35539
35539
  }
35540
35540
  var ConfigurationStore = class {
35541
35541
  constructor(context) {
@@ -36029,34 +36029,34 @@ var ClaudeSessionReader = class {
36029
36029
  async scan(threadId, consume, signal) {
36030
36030
  const source = await this.locate(threadId, signal);
36031
36031
  if (!source) return null;
36032
- const signature = sourceSignature(source);
36033
- const result = await scanConversationSource(source.file, consume, signal, async (stat3) => {
36034
- await this.validateSource(source, stat3);
36032
+ const signature2 = sourceSignature(source);
36033
+ const result = await scanConversationSource(source.file, consume, signal, async (stat4) => {
36034
+ await this.validateSource(source, stat4);
36035
36035
  });
36036
- return result ? { ...result, file: source.file, signature } : null;
36036
+ return result ? { ...result, file: source.file, signature: signature2 } : null;
36037
36037
  }
36038
36038
  /** Revalidate the unique source before reusing only an existing short-text projection. */
36039
- async isUnchanged(threadId, signature) {
36039
+ async isUnchanged(threadId, signature2) {
36040
36040
  const source = await this.locate(threadId);
36041
- if (!source || sourceSignature(source) !== signature) return false;
36041
+ if (!source || sourceSignature(source) !== signature2) return false;
36042
36042
  const handle = await (0, import_promises4.open)(source.file, import_node_fs9.constants.O_RDONLY | import_node_fs9.constants.O_NOFOLLOW | import_node_fs9.constants.O_NONBLOCK);
36043
36043
  try {
36044
- const stat3 = await handle.stat();
36045
- await this.validateSource(source, stat3);
36044
+ const stat4 = await handle.stat();
36045
+ await this.validateSource(source, stat4);
36046
36046
  const current = await handle.stat();
36047
36047
  await this.validateSource(source, current);
36048
- return sourceSignature({ ...source, stat: stat3 }) === signature && sourceSignature({ ...source, stat: current }) === signature;
36048
+ return sourceSignature({ ...source, stat: stat4 }) === signature2 && sourceSignature({ ...source, stat: current }) === signature2;
36049
36049
  } finally {
36050
36050
  await handle.close();
36051
36051
  }
36052
36052
  }
36053
- async validateSource(source, stat3) {
36053
+ async validateSource(source, stat4) {
36054
36054
  const [root, project, current] = await Promise.all([
36055
36055
  (0, import_promises4.lstat)(this.projectsRoot),
36056
36056
  (0, import_promises4.lstat)(import_node_path10.default.dirname(source.file)),
36057
36057
  (0, import_promises4.lstat)(source.file)
36058
36058
  ]);
36059
- if (!sameFile(root, source.root) || !sameFile(project, source.project) || !sameSourceVersion(current, source.stat) || !sameSourceVersion(stat3, source.stat) || await (0, import_promises4.realpath)(source.file) !== source.file) {
36059
+ if (!sameFile(root, source.root) || !sameFile(project, source.project) || !sameSourceVersion(current, source.stat) || !sameSourceVersion(stat4, source.stat) || await (0, import_promises4.realpath)(source.file) !== source.file) {
36060
36060
  throw unsafeSource();
36061
36061
  }
36062
36062
  }
@@ -36084,11 +36084,11 @@ var ClaudeSessionReader = class {
36084
36084
  signal?.throwIfAborted();
36085
36085
  if (candidate.status === "rejected") throw candidate.reason;
36086
36086
  if (!candidate.value) continue;
36087
- const { file, projectPath, stat: stat3 } = candidate.value;
36087
+ const { file, projectPath, stat: stat4 } = candidate.value;
36088
36088
  const project = await (0, import_promises4.lstat)(projectPath);
36089
- if (!project.isDirectory() || project.isSymbolicLink() || !stat3.isFile() || stat3.isSymbolicLink() || stat3.nlink !== 1 || await (0, import_promises4.realpath)(file) !== file) throw unsafeSource();
36089
+ if (!project.isDirectory() || project.isSymbolicLink() || !stat4.isFile() || stat4.isSymbolicLink() || stat4.nlink !== 1 || await (0, import_promises4.realpath)(file) !== file) throw unsafeSource();
36090
36090
  if (found) throw new ConversationReadError(409, "CLAUDE_SESSION_AMBIGUOUS", "Claude \u4F1A\u8BDD\u6765\u6E90\u4E0D\u552F\u4E00");
36091
- found = { file, stat: stat3, project, root };
36091
+ found = { file, stat: stat4, project, root };
36092
36092
  }
36093
36093
  }
36094
36094
  return found;
@@ -36099,18 +36099,18 @@ var ClaudeSessionReader = class {
36099
36099
  }
36100
36100
  };
36101
36101
  function sourceSignature(source) {
36102
- const { file, stat: stat3, project, root } = source;
36102
+ const { file, stat: stat4, project, root } = source;
36103
36103
  return JSON.stringify([
36104
36104
  file,
36105
36105
  root.dev,
36106
36106
  root.ino,
36107
36107
  project.dev,
36108
36108
  project.ino,
36109
- stat3.dev,
36110
- stat3.ino,
36111
- stat3.size,
36112
- stat3.mtimeMs,
36113
- stat3.ctimeMs
36109
+ stat4.dev,
36110
+ stat4.ino,
36111
+ stat4.size,
36112
+ stat4.mtimeMs,
36113
+ stat4.ctimeMs
36114
36114
  ]);
36115
36115
  }
36116
36116
  function sameFile(left, right) {
@@ -36296,8 +36296,8 @@ var PiSessionReader = class {
36296
36296
  try {
36297
36297
  if (await (0, import_promises5.realpath)(file) !== file) return null;
36298
36298
  handle = await (0, import_promises5.open)(file, "r");
36299
- const stat3 = await handle.stat();
36300
- if (!stat3.isFile() || stat3.size > 64 * 1024 * 1024) return null;
36299
+ const stat4 = await handle.stat();
36300
+ if (!stat4.isFile() || stat4.size > 64 * 1024 * 1024) return null;
36301
36301
  const content = await handle.readFile("utf8");
36302
36302
  const lines = content.split("\n");
36303
36303
  lines.pop();
@@ -36427,7 +36427,7 @@ ${entry.summary}`
36427
36427
  preview,
36428
36428
  status: status === "running" ? "active" : status === "idle" ? "idle" : "notLoaded",
36429
36429
  createdAt: String(header.timestamp ?? ""),
36430
- updatedAt: new Date(stat3.mtimeMs).toISOString(),
36430
+ updatedAt: new Date(stat4.mtimeMs).toISOString(),
36431
36431
  turns
36432
36432
  },
36433
36433
  latest
@@ -36798,15 +36798,15 @@ var ThreadPreviewReader = class {
36798
36798
  }
36799
36799
  const handle = await (0, import_promises7.open)(file, "r");
36800
36800
  try {
36801
- const stat3 = await handle.stat();
36802
- if (!stat3.isFile()) {
36801
+ const stat4 = await handle.stat();
36802
+ if (!stat4.isFile()) {
36803
36803
  entry.ready = false;
36804
36804
  entry.availability = "source_missing";
36805
36805
  return;
36806
36806
  }
36807
- if (entry.file !== file || entry.inode !== stat3.ino || stat3.size < entry.offset) {
36807
+ if (entry.file !== file || entry.inode !== stat4.ino || stat4.size < entry.offset) {
36808
36808
  entry.file = file;
36809
- entry.inode = stat3.ino;
36809
+ entry.inode = stat4.ino;
36810
36810
  entry.offset = 0;
36811
36811
  entry.pending = Buffer.alloc(0);
36812
36812
  entry.skippingLine = false;
@@ -36818,11 +36818,11 @@ var ThreadPreviewReader = class {
36818
36818
  entry.leaf = null;
36819
36819
  entry.piCursor = null;
36820
36820
  }
36821
- const buffer = Buffer.alloc(Math.min(READ_BYTES, stat3.size - entry.offset));
36821
+ const buffer = Buffer.alloc(Math.min(READ_BYTES, stat4.size - entry.offset));
36822
36822
  const { bytesRead } = await handle.read(buffer, 0, buffer.length, entry.offset);
36823
36823
  entry.offset += bytesRead;
36824
36824
  this.consume(entry, buffer.subarray(0, bytesRead));
36825
- if (entry.offset < stat3.size) {
36825
+ if (entry.offset < stat4.size) {
36826
36826
  this.queued.add(entry);
36827
36827
  return;
36828
36828
  }
@@ -36949,7 +36949,7 @@ function messageText(content) {
36949
36949
  // app-server/src/index.ts
36950
36950
  var import_node_http = __toESM(require("node:http"), 1);
36951
36951
  var import_node_crypto7 = require("node:crypto");
36952
- var import_promises14 = require("node:fs/promises");
36952
+ var import_promises15 = require("node:fs/promises");
36953
36953
 
36954
36954
  // app-server/package.json
36955
36955
  var package_default = {
@@ -37784,12 +37784,12 @@ var CodexRolloutLifecycleReader = class {
37784
37784
  this.threadPaths.clear();
37785
37785
  this.snapshots.clear();
37786
37786
  }
37787
- async findThreadPath(threadId) {
37787
+ async findThreadPath(threadId, refresh = false) {
37788
37788
  const cached = this.threadPaths.get(threadId);
37789
37789
  if (cached) {
37790
37790
  return cached;
37791
37791
  }
37792
- if (!this.indexPromise && Date.now() - this.indexedAt >= 3e4) {
37792
+ if (!this.indexPromise && (refresh || Date.now() - this.indexedAt >= 3e4)) {
37793
37793
  this.indexPromise = (async () => {
37794
37794
  for (const root of this.sessionsRoots) {
37795
37795
  for (const candidate of await listJsonlFiles2(root)) {
@@ -37810,8 +37810,8 @@ async function readFileLifecycle(filePath, previous) {
37810
37810
  const handle = await (0, import_promises10.open)(filePath, "r");
37811
37811
  try {
37812
37812
  const { size, dev, ino, mtimeMs, ctimeMs } = await handle.stat();
37813
- const signature = `${filePath}:${dev}:${ino}:${size}:${mtimeMs}:${ctimeMs}`;
37814
- if (signature === previous?.signature) return previous;
37813
+ const signature2 = `${filePath}:${dev}:${ino}:${size}:${mtimeMs}:${ctimeMs}`;
37814
+ if (signature2 === previous?.signature) return previous;
37815
37815
  const floor = Math.max(0, size - ROLLOUT_LOOKBACK_BYTES);
37816
37816
  let end = size;
37817
37817
  let suffix = Buffer.alloc(0);
@@ -37820,7 +37820,7 @@ async function readFileLifecycle(filePath, previous) {
37820
37820
  const start = Math.max(floor, end - ROLLOUT_TAIL_BYTES);
37821
37821
  const buffer = Buffer.alloc(end - start);
37822
37822
  const { bytesRead } = await handle.read(buffer, 0, buffer.length, start);
37823
- if (bytesRead !== buffer.length) return { signature, lifecycle: null };
37823
+ if (bytesRead !== buffer.length) return { signature: signature2, lifecycle: null };
37824
37824
  const value = Buffer.concat([buffer, suffix]);
37825
37825
  const boundary = start > 0 ? value.indexOf(10) : -1;
37826
37826
  const complete = start === 0 ? value : boundary < 0 ? Buffer.alloc(0) : value.subarray(boundary + 1);
@@ -37830,8 +37830,8 @@ async function readFileLifecycle(filePath, previous) {
37830
37830
  }
37831
37831
  const current = await (0, import_promises10.stat)(filePath);
37832
37832
  if (current.dev !== dev || current.ino !== ino || current.size !== size || current.mtimeMs !== mtimeMs || current.ctimeMs !== ctimeMs)
37833
- return { signature, lifecycle: null };
37834
- return { signature, lifecycle };
37833
+ return { signature: signature2, lifecycle: null };
37834
+ return { signature: signature2, lifecycle };
37835
37835
  } finally {
37836
37836
  await handle.close();
37837
37837
  }
@@ -37901,6 +37901,266 @@ function readString3(value) {
37901
37901
  return typeof value === "string" && value.trim() ? value.trim() : null;
37902
37902
  }
37903
37903
 
37904
+ // app-server/src/codex/lifecycle-monitor.ts
37905
+ var import_node_fs12 = require("node:fs");
37906
+ var import_promises11 = require("node:fs/promises");
37907
+ var MAX_THREADS2 = 100;
37908
+ var MAX_IN_FLIGHT = 4;
37909
+ var MAX_LINE_BYTES2 = 256 * 1024;
37910
+ var READ_BATCH_BYTES = 1024 * 1024;
37911
+ var CodexLifecycleMonitor = class {
37912
+ constructor(reader, onHint) {
37913
+ this.reader = reader;
37914
+ this.onHint = onHint;
37915
+ }
37916
+ subscriptions = /* @__PURE__ */ new Map();
37917
+ lastTurns = /* @__PURE__ */ new Map();
37918
+ pending = /* @__PURE__ */ new Set();
37919
+ jobs = /* @__PURE__ */ new Set();
37920
+ generation = 0;
37921
+ stopped = false;
37922
+ reads = 0;
37923
+ bytesRead = 0;
37924
+ hints = 0;
37925
+ track(thread, newPrompt = false) {
37926
+ const active2 = thread.agent === "codex" && thread.terminalSessionId && thread.terminalPanelId && (thread.status === "running" || thread.status === "starting");
37927
+ let entry = this.subscriptions.get(thread.threadId);
37928
+ if (!active2 || this.stopped) {
37929
+ if (entry) this.remove(entry);
37930
+ return;
37931
+ }
37932
+ if (entry && (entry.thread.terminalSessionId !== thread.terminalSessionId || entry.thread.terminalPanelId !== thread.terminalPanelId)) {
37933
+ this.remove(entry);
37934
+ entry = void 0;
37935
+ }
37936
+ if (!entry) {
37937
+ if (this.subscriptions.size >= MAX_THREADS2) return;
37938
+ entry = {
37939
+ thread,
37940
+ generation: ++this.generation,
37941
+ initialized: false,
37942
+ baseline: true,
37943
+ offset: 0,
37944
+ partial: Buffer.alloc(0),
37945
+ skipLine: false,
37946
+ ignoredTurn: this.lastTurns.get(thread.threadId) ?? null,
37947
+ promptTurn: null,
37948
+ awaitingStart: thread.lastHookEvent === "UserPromptSubmit",
37949
+ start: null,
37950
+ latest: null
37951
+ };
37952
+ this.subscriptions.set(thread.threadId, entry);
37953
+ this.schedule(entry);
37954
+ } else {
37955
+ if (newPrompt) {
37956
+ entry.generation = ++this.generation;
37957
+ entry.ignoredTurn = entry.promptTurn ?? entry.ignoredTurn;
37958
+ entry.promptTurn = null;
37959
+ entry.awaitingStart = true;
37960
+ entry.start = null;
37961
+ entry.latest = null;
37962
+ entry.baseline = true;
37963
+ this.schedule(entry);
37964
+ }
37965
+ entry.thread = thread;
37966
+ }
37967
+ }
37968
+ sync(threads) {
37969
+ const ids = new Set(threads.map((thread) => thread.threadId));
37970
+ for (const entry of this.subscriptions.values()) if (!ids.has(entry.thread.threadId)) this.remove(entry);
37971
+ for (const thread of threads) this.track(thread);
37972
+ }
37973
+ request(threadId) {
37974
+ const entry = this.subscriptions.get(threadId);
37975
+ if (entry) this.schedule(entry);
37976
+ }
37977
+ isCurrent(hint) {
37978
+ const entry = this.subscriptions.get(hint.threadId);
37979
+ if (this.stopped || !entry?.file || entry.generation !== hint.generation || entry.start?.turnId !== hint.lifecycle.turnId || entry.latest?.cursor !== hint.lifecycle.cursor) return false;
37980
+ try {
37981
+ return signature((0, import_node_fs12.statSync)(entry.file)) === hint.signature;
37982
+ } catch {
37983
+ return false;
37984
+ }
37985
+ }
37986
+ getStatusSnapshot() {
37987
+ return {
37988
+ subscriptions: this.subscriptions.size,
37989
+ pending: this.pending.size,
37990
+ inFlight: this.jobs.size,
37991
+ reads: this.reads,
37992
+ bytesRead: this.bytesRead,
37993
+ hints: this.hints
37994
+ };
37995
+ }
37996
+ async stop() {
37997
+ this.stopped = true;
37998
+ for (const entry of this.subscriptions.values()) this.remove(entry);
37999
+ await Promise.allSettled([...this.jobs]);
38000
+ this.lastTurns.clear();
38001
+ }
38002
+ current(entry, generation) {
38003
+ return !this.stopped && this.subscriptions.get(entry.thread.threadId) === entry && entry.generation === generation;
38004
+ }
38005
+ remove(entry) {
38006
+ if (this.subscriptions.get(entry.thread.threadId) !== entry) return;
38007
+ const turn = entry.promptTurn ?? entry.start?.turnId;
38008
+ if (turn) {
38009
+ this.lastTurns.delete(entry.thread.threadId);
38010
+ this.lastTurns.set(entry.thread.threadId, turn);
38011
+ if (this.lastTurns.size > MAX_THREADS2) this.lastTurns.delete(this.lastTurns.keys().next().value);
38012
+ }
38013
+ entry.watcher?.close();
38014
+ if (entry.timer) clearTimeout(entry.timer);
38015
+ this.pending.delete(entry);
38016
+ this.subscriptions.delete(entry.thread.threadId);
38017
+ }
38018
+ schedule(entry) {
38019
+ if (this.stopped || entry.timer) return;
38020
+ entry.timer = setTimeout(() => {
38021
+ entry.timer = void 0;
38022
+ if (this.subscriptions.get(entry.thread.threadId) !== entry || this.stopped) return;
38023
+ this.pending.add(entry);
38024
+ this.pump();
38025
+ }, 100);
38026
+ entry.timer.unref();
38027
+ }
38028
+ reading = /* @__PURE__ */ new Set();
38029
+ pump() {
38030
+ for (const entry of this.pending) {
38031
+ if (this.stopped || this.jobs.size >= MAX_IN_FLIGHT) break;
38032
+ if (this.reading.has(entry)) continue;
38033
+ this.pending.delete(entry);
38034
+ this.reading.add(entry);
38035
+ const generation = entry.generation;
38036
+ const job = this.read(entry, generation).catch(() => {
38037
+ if (this.current(entry, generation)) this.remove(entry);
38038
+ }).finally(() => {
38039
+ this.jobs.delete(job);
38040
+ this.reading.delete(entry);
38041
+ this.pump();
38042
+ });
38043
+ this.jobs.add(job);
38044
+ }
38045
+ }
38046
+ async read(entry, generation) {
38047
+ const threadId = entry.thread.threadId;
38048
+ const file = entry.file ?? await this.reader.findThreadPath(threadId, true);
38049
+ if (!file || !this.current(entry, generation)) {
38050
+ if (this.current(entry, generation)) this.remove(entry);
38051
+ return;
38052
+ }
38053
+ const handle = await (0, import_promises11.open)(file, "r");
38054
+ try {
38055
+ const before = await handle.stat();
38056
+ if (!this.current(entry, generation)) return;
38057
+ if (!entry.initialized) {
38058
+ const head = Buffer.alloc(Math.min(before.size, 64 * 1024));
38059
+ await handle.read(head, 0, head.length, 0);
38060
+ if (!this.current(entry, generation)) return;
38061
+ const metadata = JSON.parse(head.toString("utf8").split("\n")[0] ?? "");
38062
+ if (metadata.type !== "session_meta" || metadata.payload?.id !== threadId) {
38063
+ this.remove(entry);
38064
+ return;
38065
+ }
38066
+ entry.file = file;
38067
+ entry.identity = identity(before);
38068
+ entry.watcher = (0, import_node_fs12.watch)(file, { persistent: false }, (event) => {
38069
+ if (event === "rename") this.remove(entry);
38070
+ else this.schedule(entry);
38071
+ });
38072
+ entry.watcher.on("error", () => this.remove(entry));
38073
+ entry.initialized = true;
38074
+ }
38075
+ if (entry.identity !== identity(before) || before.size < entry.offset) {
38076
+ this.remove(entry);
38077
+ return;
38078
+ }
38079
+ if (entry.baseline) {
38080
+ const latest = await this.reader.readLatestLifecycle(threadId);
38081
+ if (!this.current(entry, generation)) return;
38082
+ const after2 = await (0, import_promises11.stat)(file);
38083
+ if (signature(after2) !== signature(before)) {
38084
+ this.schedule(entry);
38085
+ return;
38086
+ }
38087
+ entry.start = latest?.type === "task_started" && latest.turnId !== entry.ignoredTurn ? latest : null;
38088
+ if (entry.start && entry.awaitingStart) {
38089
+ entry.promptTurn = entry.start.turnId;
38090
+ entry.awaitingStart = false;
38091
+ }
38092
+ entry.latest = entry.start;
38093
+ entry.offset = before.size;
38094
+ const tail = Buffer.alloc(1);
38095
+ if (before.size) await handle.read(tail, 0, 1, before.size - 1);
38096
+ entry.partial = Buffer.alloc(0);
38097
+ entry.skipLine = before.size > 0 && tail[0] !== 10;
38098
+ entry.baseline = false;
38099
+ return;
38100
+ }
38101
+ const size = Math.min(before.size - entry.offset, READ_BATCH_BYTES);
38102
+ if (size > 0) {
38103
+ const buffer = Buffer.alloc(size);
38104
+ const { bytesRead } = await handle.read(buffer, 0, size, entry.offset);
38105
+ if (!this.current(entry, generation)) return;
38106
+ this.reads++;
38107
+ this.bytesRead += bytesRead;
38108
+ entry.offset += bytesRead;
38109
+ this.consume(entry, buffer.subarray(0, bytesRead));
38110
+ }
38111
+ const after = await (0, import_promises11.stat)(file);
38112
+ if (!this.current(entry, generation)) return;
38113
+ if (signature(before) !== signature(after) || entry.offset < after.size) {
38114
+ this.schedule(entry);
38115
+ return;
38116
+ }
38117
+ const lifecycle = entry.latest;
38118
+ if (lifecycle?.status !== "idle" || !lifecycle.turnId || entry.start?.turnId !== lifecycle.turnId || Date.parse(lifecycle.timestamp) < Date.parse(entry.thread.updatedAt)) return;
38119
+ this.hints++;
38120
+ await this.onHint({ threadId, generation, lifecycle, signature: signature(after) });
38121
+ } finally {
38122
+ await handle.close();
38123
+ }
38124
+ }
38125
+ consume(entry, buffer) {
38126
+ let offset = 0;
38127
+ while (offset < buffer.length) {
38128
+ const end = buffer.indexOf(10, offset);
38129
+ const part = buffer.subarray(offset, end < 0 ? buffer.length : end);
38130
+ if (!entry.skipLine) {
38131
+ if (entry.partial.length + part.length <= MAX_LINE_BYTES2) entry.partial = Buffer.concat([entry.partial, part]);
38132
+ else {
38133
+ entry.partial = Buffer.alloc(0);
38134
+ entry.skipLine = true;
38135
+ }
38136
+ }
38137
+ if (end < 0) break;
38138
+ if (!entry.skipLine) {
38139
+ const lifecycle = parseLatestLifecycle(entry.partial.toString("utf8"));
38140
+ if (lifecycle) {
38141
+ entry.latest = lifecycle;
38142
+ if (lifecycle.type === "task_started") {
38143
+ entry.start = lifecycle.turnId !== entry.ignoredTurn ? lifecycle : null;
38144
+ if (entry.start && entry.awaitingStart) {
38145
+ entry.promptTurn = entry.start.turnId;
38146
+ entry.awaitingStart = false;
38147
+ }
38148
+ }
38149
+ }
38150
+ }
38151
+ entry.partial = Buffer.alloc(0);
38152
+ entry.skipLine = false;
38153
+ offset = end + 1;
38154
+ }
38155
+ }
38156
+ };
38157
+ function identity(value) {
38158
+ return `${value.dev}:${value.ino}`;
38159
+ }
38160
+ function signature(value) {
38161
+ return `${identity(value)}:${value.size}:${value.mtimeMs}:${value.ctimeMs}`;
38162
+ }
38163
+
37904
38164
  // app-server/src/state/reconciler.ts
37905
38165
  var DEFAULT_START_DELAY_MS = 1e4;
37906
38166
  var DEFAULT_INTERVAL_MS = 3e4;
@@ -37930,19 +38190,40 @@ var AgentThreadStatusReconciler = class {
37930
38190
  lastCompletedAt = null;
37931
38191
  lastFailedAt = null;
37932
38192
  consecutiveFailures = 0;
38193
+ monitor = null;
38194
+ unsubscribe = null;
38195
+ round = null;
37933
38196
  start() {
37934
38197
  if (this.startTimer || this.intervalTimer) {
37935
38198
  return;
37936
38199
  }
37937
38200
  this.stopped = false;
38201
+ if (this.options.codexRolloutLifecycleReader.findThreadPath) {
38202
+ this.monitor = new CodexLifecycleMonitor(
38203
+ this.options.codexRolloutLifecycleReader,
38204
+ (hint) => this.reconcileNativeHint(hint)
38205
+ );
38206
+ this.unsubscribe = this.options.eventCenter.subscribe((event) => {
38207
+ const id = event.correlationId;
38208
+ if (!id || this.stopped) return;
38209
+ const thread = this.options.eventCenter.getStateStore().getThread(id);
38210
+ if (!thread || thread.agent !== "codex") return;
38211
+ const payload = event.payload;
38212
+ const hook = event.kind === "agent.hook" ? String(payload?.stateHookEvent ?? payload?.normalizedEvent ?? payload?.rawHookEvent ?? "").replaceAll("_", "").toLowerCase() : "";
38213
+ if (event.kind === "thread.state.changed" || hook === "sessionstart" || hook === "userpromptsubmit")
38214
+ this.monitor?.track(thread, hook === "userpromptsubmit" || hook === "sessionstart");
38215
+ if (hook === "interrupt") this.monitor?.request(id);
38216
+ });
38217
+ this.monitor.sync(this.collectCandidates());
38218
+ }
37938
38219
  this.startTimer = setTimeout(() => {
37939
38220
  this.startTimer = null;
37940
38221
  if (this.stopped) {
37941
38222
  return;
37942
38223
  }
37943
- void this.tick();
38224
+ this.scheduleTick();
37944
38225
  this.intervalTimer = setInterval(() => {
37945
- void this.tick();
38226
+ this.scheduleTick();
37946
38227
  }, this.intervalMs);
37947
38228
  this.intervalTimer.unref?.();
37948
38229
  }, this.startDelayMs);
@@ -37954,7 +38235,7 @@ var AgentThreadStatusReconciler = class {
37954
38235
  providers: [...RECONCILED_AGENTS]
37955
38236
  });
37956
38237
  }
37957
- stop() {
38238
+ async stop() {
37958
38239
  this.stopped = true;
37959
38240
  if (this.startTimer) {
37960
38241
  clearTimeout(this.startTimer);
@@ -37964,6 +38245,11 @@ var AgentThreadStatusReconciler = class {
37964
38245
  clearInterval(this.intervalTimer);
37965
38246
  this.intervalTimer = null;
37966
38247
  }
38248
+ this.unsubscribe?.();
38249
+ this.unsubscribe = null;
38250
+ await this.monitor?.stop();
38251
+ await this.round;
38252
+ this.monitor = null;
37967
38253
  this.options.codexStatusReader.shutdown();
37968
38254
  this.options.codexRolloutLifecycleReader.shutdown();
37969
38255
  this.options.traeLifecycleReader.shutdown();
@@ -37977,9 +38263,35 @@ var AgentThreadStatusReconciler = class {
37977
38263
  lastStartedAt: this.lastStartedAt,
37978
38264
  lastCompletedAt: this.lastCompletedAt,
37979
38265
  lastFailedAt: this.lastFailedAt,
37980
- consecutiveFailures: this.consecutiveFailures
38266
+ consecutiveFailures: this.consecutiveFailures,
38267
+ nativeMonitor: this.monitor?.getStatusSnapshot() ?? null
37981
38268
  };
37982
38269
  }
38270
+ scheduleTick() {
38271
+ if (this.stopped || this.round) return;
38272
+ this.round = this.tick().finally(() => {
38273
+ this.round = null;
38274
+ });
38275
+ }
38276
+ async reconcileNativeHint(hint) {
38277
+ const monitor = this.monitor;
38278
+ if (!monitor?.isCurrent(hint)) return;
38279
+ const thread = this.options.eventCenter.getStateStore().getThread(hint.threadId);
38280
+ if (!thread || thread.agent !== "codex" || !["running", "starting"].includes(thread.status)) return;
38281
+ const lifecycle = await this.options.codexRolloutLifecycleReader.readLatestLifecycle(hint.threadId);
38282
+ if (!lifecycle || lifecycle.status !== "idle" || lifecycle.cursor !== hint.lifecycle.cursor || lifecycle.turnId !== hint.lifecycle.turnId || isOlderThanThreadProjection(lifecycle.timestamp, thread)) return;
38283
+ const observed = {
38284
+ status: "idle",
38285
+ lifecycleType: `rollout:${lifecycle.type}`,
38286
+ lifecycleCursor: lifecycle.cursor,
38287
+ detailStatus: null,
38288
+ preview: null,
38289
+ turnId: lifecycle.turnId,
38290
+ error: lifecycle.error
38291
+ };
38292
+ if (this.isAlreadyProjected(thread, observed)) return;
38293
+ await this.recordObservation(thread, observed, () => !this.stopped && monitor.isCurrent(hint) && this.options.eventCenter.getStateStore().getThread(thread.threadId)?.lastEventId === thread.lastEventId);
38294
+ }
37983
38295
  async tick() {
37984
38296
  if (this.running) {
37985
38297
  return;
@@ -38002,7 +38314,9 @@ var AgentThreadStatusReconciler = class {
38002
38314
  }
38003
38315
  }
38004
38316
  async reconcileOnce() {
38005
- for (const thread of this.collectCandidates()) {
38317
+ const candidates = this.collectCandidates();
38318
+ this.monitor?.sync(candidates);
38319
+ for (const thread of candidates) {
38006
38320
  let observed = null;
38007
38321
  try {
38008
38322
  observed = await this.readObservedState(thread);
@@ -38019,6 +38333,7 @@ var AgentThreadStatusReconciler = class {
38019
38333
  if (!observed) {
38020
38334
  continue;
38021
38335
  }
38336
+ if (this.stopped) return;
38022
38337
  const currentThread = this.options.eventCenter.getStateStore().getThread(thread.threadId);
38023
38338
  if (!currentThread || currentThread.lastEventId !== thread.lastEventId || this.isAlreadyProjected(currentThread, observed) || this.shouldDeferCodexMismatch(currentThread, observed)) {
38024
38339
  continue;
@@ -38053,18 +38368,7 @@ var AgentThreadStatusReconciler = class {
38053
38368
  };
38054
38369
  }
38055
38370
  if (thread.agent === "codex") {
38056
- let status = null;
38057
- let statusReadError = null;
38058
- try {
38059
- status = await this.options.codexStatusReader.readThreadStatus(
38060
- thread.threadId
38061
- );
38062
- } catch (error) {
38063
- statusReadError = error;
38064
- }
38065
- const lifecycle2 = await this.options.codexRolloutLifecycleReader.readLatestLifecycle(
38066
- thread.threadId
38067
- );
38371
+ const lifecycle2 = await this.options.codexRolloutLifecycleReader.readLatestLifecycle(thread.threadId);
38068
38372
  if (lifecycle2?.status === "running" && (thread.status === "running" || !isOlderThanThreadProjection(lifecycle2.timestamp, thread))) {
38069
38373
  return {
38070
38374
  status: "running",
@@ -38075,6 +38379,15 @@ var AgentThreadStatusReconciler = class {
38075
38379
  turnId: lifecycle2.turnId
38076
38380
  };
38077
38381
  }
38382
+ let status = null;
38383
+ let statusReadError = null;
38384
+ try {
38385
+ status = await this.options.codexStatusReader.readThreadStatus(
38386
+ thread.threadId
38387
+ );
38388
+ } catch (error) {
38389
+ statusReadError = error;
38390
+ }
38078
38391
  const sameObservedFailure = lifecycle2?.error && thread.status === "idle" && thread.lastLifecycleType === `rollout:${lifecycle2.type}` && thread.lastLifecycleCursor === lifecycle2.cursor;
38079
38392
  const followsObservedStart = lifecycle2 && thread.lastLifecycleType === "rollout:task_started" && newerRolloutCursor(lifecycle2.cursor, thread.lastLifecycleCursor);
38080
38393
  if (lifecycle2?.status === "idle" && (!isOlderThanThreadProjection(lifecycle2.timestamp, thread) || sameObservedFailure || followsObservedStart) && // A terminal error is a fact even if a Hook already marked the thread
@@ -38137,9 +38450,9 @@ var AgentThreadStatusReconciler = class {
38137
38450
  const updatedAtMs = Date.parse(thread.updatedAt);
38138
38451
  return Number.isFinite(updatedAtMs) && Date.now() - updatedAtMs < this.intervalMs;
38139
38452
  }
38140
- async recordObservation(thread, observed) {
38453
+ async recordObservation(thread, observed, isCurrent) {
38141
38454
  const compensation = observed.status !== thread.status;
38142
- const result = await this.options.eventCenter.record({
38455
+ const input = {
38143
38456
  kind: "agent.lifecycle.observed",
38144
38457
  source: {
38145
38458
  app: "app-server",
@@ -38180,8 +38493,9 @@ var AgentThreadStatusReconciler = class {
38180
38493
  previousAppServerStatus: thread.status,
38181
38494
  lastProjectedEventId: thread.lastEventId
38182
38495
  }
38183
- });
38184
- if (!result.created) {
38496
+ };
38497
+ const result = isCurrent ? await this.options.eventCenter.recordIfCurrent(input, isCurrent) : await this.options.eventCenter.record(input);
38498
+ if (!result?.created) {
38185
38499
  return;
38186
38500
  }
38187
38501
  logInfo("agent-thread-status-reconciler.observed", {
@@ -38274,6 +38588,12 @@ var AppServerEventCenter = class {
38274
38588
  }
38275
38589
  return result;
38276
38590
  }
38591
+ /** Evaluate projection fences inside the same queue that commits events. */
38592
+ recordIfCurrent(input, isCurrent) {
38593
+ const operation = this.recordQueue.then(() => isCurrent() ? this.recordSerial(input) : null);
38594
+ this.recordQueue = operation.then(() => void 0, () => void 0);
38595
+ return operation;
38596
+ }
38277
38597
  listAfter(options) {
38278
38598
  return this.store.listAfter(options);
38279
38599
  }
@@ -38349,7 +38669,7 @@ var AppServerEventCenter = class {
38349
38669
 
38350
38670
  // app-server/src/events/store.ts
38351
38671
  var import_node_crypto6 = require("node:crypto");
38352
- var import_promises11 = require("node:fs/promises");
38672
+ var import_promises12 = require("node:fs/promises");
38353
38673
  var import_node_path20 = __toESM(require("node:path"), 1);
38354
38674
  var DEFAULT_EVENT_RETENTION_DAYS = 7;
38355
38675
  var DEFAULT_RETENTION_PRUNE_INTERVAL_MS = 60 * 60 * 1e3;
@@ -38370,17 +38690,17 @@ var AppServerEventStore = class {
38370
38690
  retentionMs;
38371
38691
  pruneIntervalMs;
38372
38692
  async initialize() {
38373
- await (0, import_promises11.mkdir)(import_node_path20.default.dirname(this.eventLogPath), { recursive: true });
38693
+ await (0, import_promises12.mkdir)(import_node_path20.default.dirname(this.eventLogPath), { recursive: true });
38374
38694
  let content = "";
38375
38695
  try {
38376
- content = await (0, import_promises11.readFile)(this.eventLogPath, "utf8");
38696
+ content = await (0, import_promises12.readFile)(this.eventLogPath, "utf8");
38377
38697
  } catch (error) {
38378
38698
  if (!isNodeError(error) || error.code !== "ENOENT") {
38379
38699
  throw error;
38380
38700
  }
38381
38701
  this.events = [];
38382
38702
  this.nextId = 1;
38383
- await (0, import_promises11.writeFile)(this.eventLogPath, "", { flag: "a" });
38703
+ await (0, import_promises12.writeFile)(this.eventLogPath, "", { flag: "a" });
38384
38704
  this.lastPrunedAtMs = Date.now();
38385
38705
  return;
38386
38706
  }
@@ -38423,7 +38743,7 @@ var AppServerEventStore = class {
38423
38743
  payload: input.payload,
38424
38744
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
38425
38745
  };
38426
- await (0, import_promises11.writeFile)(this.eventLogPath, `${JSON.stringify(event)}
38746
+ await (0, import_promises12.writeFile)(this.eventLogPath, `${JSON.stringify(event)}
38427
38747
  `, {
38428
38748
  encoding: "utf8",
38429
38749
  flag: "a"
@@ -38468,7 +38788,7 @@ var AppServerEventStore = class {
38468
38788
  async rewriteEventLog(events) {
38469
38789
  const temporaryPath = `${this.eventLogPath}.${(0, import_node_crypto6.randomUUID)()}.tmp`;
38470
38790
  try {
38471
- const file = await (0, import_promises11.open)(temporaryPath, "wx", 384);
38791
+ const file = await (0, import_promises12.open)(temporaryPath, "wx", 384);
38472
38792
  try {
38473
38793
  await file.writeFile(
38474
38794
  events.map((event) => JSON.stringify(event)).join("\n") + (events.length > 0 ? "\n" : ""),
@@ -38478,15 +38798,16 @@ var AppServerEventStore = class {
38478
38798
  } finally {
38479
38799
  await file.close();
38480
38800
  }
38481
- await (0, import_promises11.rename)(temporaryPath, this.eventLogPath);
38482
- const directory = await (0, import_promises11.open)(import_node_path20.default.dirname(this.eventLogPath), "r");
38801
+ await (0, import_promises12.rename)(temporaryPath, this.eventLogPath);
38802
+ if (process.platform === "win32") return;
38803
+ const directory = await (0, import_promises12.open)(import_node_path20.default.dirname(this.eventLogPath), "r");
38483
38804
  try {
38484
38805
  await directory.sync();
38485
38806
  } finally {
38486
38807
  await directory.close();
38487
38808
  }
38488
38809
  } finally {
38489
- await (0, import_promises11.unlink)(temporaryPath).catch(() => void 0);
38810
+ await (0, import_promises12.unlink)(temporaryPath).catch(() => void 0);
38490
38811
  }
38491
38812
  }
38492
38813
  };
@@ -42613,7 +42934,7 @@ var coerce = {
42613
42934
  var NEVER = INVALID;
42614
42935
 
42615
42936
  // app-server/src/singleton.ts
42616
- var import_promises12 = require("node:fs/promises");
42937
+ var import_promises13 = require("node:fs/promises");
42617
42938
  var import_node_path21 = __toESM(require("node:path"), 1);
42618
42939
  var APP_SERVER_SERVICE_NAME = "runweave-app-server";
42619
42940
  var APP_SERVER_PROTOCOL_VERSION = 1;
@@ -42625,14 +42946,14 @@ async function preflightSingleton(lockPath) {
42625
42946
  if (isPidAlive(lock.pid) && await healthCheck(lock)) {
42626
42947
  return { status: "owned", lock };
42627
42948
  }
42628
- await (0, import_promises12.rm)(lockPath, { force: true });
42949
+ await (0, import_promises13.rm)(lockPath, { force: true });
42629
42950
  return { status: "available" };
42630
42951
  }
42631
42952
  async function acquireSingletonLock(lockPath, lock) {
42632
- await (0, import_promises12.mkdir)(import_node_path21.default.dirname(lockPath), { recursive: true });
42953
+ await (0, import_promises13.mkdir)(import_node_path21.default.dirname(lockPath), { recursive: true });
42633
42954
  for (let attempt = 0; attempt < 2; attempt += 1) {
42634
42955
  try {
42635
- await (0, import_promises12.writeFile)(lockPath, `${JSON.stringify(lock, null, 2)}
42956
+ await (0, import_promises13.writeFile)(lockPath, `${JSON.stringify(lock, null, 2)}
42636
42957
  `, {
42637
42958
  encoding: "utf8",
42638
42959
  flag: "wx"
@@ -42648,13 +42969,13 @@ async function acquireSingletonLock(lockPath, lock) {
42648
42969
  if (existing2 && isPidAlive(existing2.pid) && await healthCheck(existing2)) {
42649
42970
  return { status: "owned", lock: existing2 };
42650
42971
  }
42651
- await (0, import_promises12.rm)(lockPath, { force: true });
42972
+ await (0, import_promises13.rm)(lockPath, { force: true });
42652
42973
  }
42653
42974
  const existing = await readAppServerLock(lockPath);
42654
42975
  if (existing && isPidAlive(existing.pid) && await healthCheck(existing)) {
42655
42976
  return { status: "owned", lock: existing };
42656
42977
  }
42657
- await (0, import_promises12.writeFile)(lockPath, `${JSON.stringify(lock, null, 2)}
42978
+ await (0, import_promises13.writeFile)(lockPath, `${JSON.stringify(lock, null, 2)}
42658
42979
  `, {
42659
42980
  encoding: "utf8",
42660
42981
  flag: "wx"
@@ -42666,14 +42987,14 @@ async function releaseLock(lockPath) {
42666
42987
  if (!current || current.pid !== process.pid) {
42667
42988
  return;
42668
42989
  }
42669
- await (0, import_promises12.rm)(lockPath, { force: true });
42990
+ await (0, import_promises13.rm)(lockPath, { force: true });
42670
42991
  }
42671
42992
  async function readLock(lockPath) {
42672
42993
  return readAppServerLock(lockPath);
42673
42994
  }
42674
42995
  async function readAppServerLock(lockPath) {
42675
42996
  try {
42676
- const parsed = JSON.parse(await (0, import_promises12.readFile)(lockPath, "utf8"));
42997
+ const parsed = JSON.parse(await (0, import_promises13.readFile)(lockPath, "utf8"));
42677
42998
  return isLock(parsed) ? parsed : null;
42678
42999
  } catch {
42679
43000
  return null;
@@ -43094,7 +43415,7 @@ function claudeHookStatus(context) {
43094
43415
  }
43095
43416
 
43096
43417
  // app-server/src/state/store.ts
43097
- var import_promises13 = require("node:fs/promises");
43418
+ var import_promises14 = require("node:fs/promises");
43098
43419
  var import_node_path22 = __toESM(require("node:path"), 1);
43099
43420
  var AppServerStateStore = class {
43100
43421
  constructor(threadStatePath) {
@@ -43103,7 +43424,7 @@ var AppServerStateStore = class {
43103
43424
  threads = /* @__PURE__ */ new Map();
43104
43425
  threadTmuxPaneIds = /* @__PURE__ */ new Map();
43105
43426
  async initialize() {
43106
- await (0, import_promises13.mkdir)(import_node_path22.default.dirname(this.threadStatePath), { recursive: true });
43427
+ await (0, import_promises14.mkdir)(import_node_path22.default.dirname(this.threadStatePath), { recursive: true });
43107
43428
  this.threads.clear();
43108
43429
  this.threadTmuxPaneIds.clear();
43109
43430
  for (const persistedThread of await readStateArray(
@@ -43188,12 +43509,12 @@ var AppServerStateStore = class {
43188
43509
  }
43189
43510
  }
43190
43511
  };
43191
- function buildFallbackThreadId(identity) {
43512
+ function buildFallbackThreadId(identity2) {
43192
43513
  return [
43193
43514
  "unknown-thread",
43194
- identity.agent,
43195
- identity.terminalSessionId ?? "none",
43196
- identity.terminalPanelId ?? "none"
43515
+ identity2.agent,
43516
+ identity2.terminalSessionId ?? "none",
43517
+ identity2.terminalPanelId ?? "none"
43197
43518
  ].join(":");
43198
43519
  }
43199
43520
  function isFallbackThreadId(threadId) {
@@ -43211,15 +43532,15 @@ function filterStateRefs(items, options) {
43211
43532
  }
43212
43533
  async function readStateArray(filePath, predicate) {
43213
43534
  try {
43214
- const parsed = JSON.parse(await (0, import_promises13.readFile)(filePath, "utf8"));
43535
+ const parsed = JSON.parse(await (0, import_promises14.readFile)(filePath, "utf8"));
43215
43536
  return Array.isArray(parsed) ? parsed.filter(predicate) : [];
43216
43537
  } catch {
43217
43538
  return [];
43218
43539
  }
43219
43540
  }
43220
43541
  async function writeJsonFile2(filePath, value) {
43221
- await (0, import_promises13.mkdir)(import_node_path22.default.dirname(filePath), { recursive: true });
43222
- await (0, import_promises13.writeFile)(filePath, `${JSON.stringify(value, null, 2)}
43542
+ await (0, import_promises14.mkdir)(import_node_path22.default.dirname(filePath), { recursive: true });
43543
+ await (0, import_promises14.writeFile)(filePath, `${JSON.stringify(value, null, 2)}
43223
43544
  `, "utf8");
43224
43545
  }
43225
43546
  function isThreadRef(value) {
@@ -43666,7 +43987,7 @@ async function startAppServer(prepareRuntime) {
43666
43987
  const owner = acquireConfigurationOwner(configuration().context, "app-server");
43667
43988
  process.once("exit", () => owner.release());
43668
43989
  const serviceInstanceId = config.serviceInstanceId ?? `app-server:${(0, import_node_crypto7.randomUUID)()}`;
43669
- await (0, import_promises14.mkdir)(config.stateDir, { recursive: true });
43990
+ await (0, import_promises15.mkdir)(config.stateDir, { recursive: true });
43670
43991
  const preflight = await preflightSingleton(config.lockPath);
43671
43992
  if (preflight.status === "owned") {
43672
43993
  logInfo2("Runweave app-server already running", {
@@ -43847,7 +44168,7 @@ function attachShutdownHandlers(server, eventStreamServer, lockPath, agentThread
43847
44168
  return;
43848
44169
  }
43849
44170
  shuttingDown = true;
43850
- agentThreadStatusReconciler.stop();
44171
+ await agentThreadStatusReconciler.stop();
43851
44172
  await threadPreviews.stop();
43852
44173
  await closeEventStreamServer(eventStreamServer);
43853
44174
  await closeServer(server);