@tekmidian/pai 0.60.0 → 0.61.0

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 (78) hide show
  1. package/dist/{chain-DFlzAfDE.mjs → chain-C5oeyUg4.mjs} +4 -4
  2. package/dist/{chain-DFlzAfDE.mjs.map → chain-C5oeyUg4.mjs.map} +1 -1
  3. package/dist/cli/index.mjs +12 -12
  4. package/dist/cli/program.mjs +12 -12
  5. package/dist/{config-msER8xj_.mjs → config-CQCmH_gV.mjs} +2 -1
  6. package/dist/config-CQCmH_gV.mjs.map +1 -0
  7. package/dist/{config-GceCMUxa.mjs → config-DjXq_W42.mjs} +1 -1
  8. package/dist/{context-handover-cache-DF0xWVB0.mjs → context-handover-cache-BdtJZpgv.mjs} +4 -4
  9. package/dist/{context-handover-cache-DF0xWVB0.mjs.map → context-handover-cache-BdtJZpgv.mjs.map} +1 -1
  10. package/dist/daemon/index.mjs +11 -11
  11. package/dist/{daemon-DArRKBlk.mjs → daemon-DSsIEqzW.mjs} +26 -19
  12. package/dist/{daemon-DArRKBlk.mjs.map → daemon-DSsIEqzW.mjs.map} +1 -1
  13. package/dist/daemon-MoFF4oeg.mjs +19 -0
  14. package/dist/daemon-mcp/index.mjs +9 -11
  15. package/dist/daemon-mcp/index.mjs.map +1 -1
  16. package/dist/{factory-D6I2jmjQ.mjs → factory-DW7BCJJT.mjs} +1 -1
  17. package/dist/{factory-ChfAvCzO.mjs → factory-EUUhSSoq.mjs} +5 -6
  18. package/dist/factory-EUUhSSoq.mjs.map +1 -0
  19. package/dist/{fallback-B7VEMMRn.mjs → fallback-DDbJVaR8.mjs} +12 -14
  20. package/dist/{fallback-B7VEMMRn.mjs.map → fallback-DDbJVaR8.mjs.map} +1 -1
  21. package/dist/hooks/block-sleep-poll.mjs.map +2 -2
  22. package/dist/hooks/context-compression-hook.mjs.map +1 -1
  23. package/dist/hooks/post-compact-inject.mjs.map +1 -1
  24. package/dist/hooks/route-agents-to-worker.mjs +5 -5
  25. package/dist/hooks/route-agents-to-worker.mjs.map +3 -3
  26. package/dist/hooks/security-validator.mjs +60 -60
  27. package/dist/hooks/security-validator.mjs.map +3 -3
  28. package/dist/hooks/stop-hook.mjs +15 -15
  29. package/dist/hooks/stop-hook.mjs.map +3 -3
  30. package/dist/hooks/update-tab-on-action.mjs +14 -12
  31. package/dist/hooks/update-tab-on-action.mjs.map +3 -3
  32. package/dist/hooks/update-tab-titles.mjs +13 -9
  33. package/dist/hooks/update-tab-titles.mjs.map +3 -3
  34. package/dist/hooks/whisper-rules.mjs +2 -2
  35. package/dist/hooks/whisper-rules.mjs.map +3 -3
  36. package/dist/hooks/worker-proxy.mjs +5 -5
  37. package/dist/hooks/worker-proxy.mjs.map +3 -3
  38. package/dist/hooks/worker-status-line.mjs +5 -5
  39. package/dist/hooks/worker-status-line.mjs.map +3 -3
  40. package/dist/hooks/worker-supervision.mjs +5 -5
  41. package/dist/hooks/worker-supervision.mjs.map +3 -3
  42. package/dist/main-resolver-CxOsxtOr.mjs +7 -0
  43. package/dist/{main-resolver-BqTjt-GL.mjs → main-resolver-DIQ6m_RA.mjs} +4 -4
  44. package/dist/{main-resolver-BqTjt-GL.mjs.map → main-resolver-DIQ6m_RA.mjs.map} +1 -1
  45. package/dist/{planner-DbpsMZqY.mjs → planner-D8jAr_sx.mjs} +7 -7
  46. package/dist/{planner-DbpsMZqY.mjs.map → planner-D8jAr_sx.mjs.map} +1 -1
  47. package/dist/{program-QSuci3RH.mjs → program-BTdspOOa.mjs} +131 -81
  48. package/dist/program-BTdspOOa.mjs.map +1 -0
  49. package/dist/{run-BFxuNnIJ.mjs → run-CxxZKEZw.mjs} +336 -174
  50. package/dist/run-CxxZKEZw.mjs.map +1 -0
  51. package/dist/{run-env-kbWVwUvU.mjs → run-env-BE5xyCwy.mjs} +26 -7
  52. package/dist/run-env-BE5xyCwy.mjs.map +1 -0
  53. package/dist/{server-B0vBmfJt.mjs → server-BY6AedmC.mjs} +2 -2
  54. package/dist/{server-B0vBmfJt.mjs.map → server-BY6AedmC.mjs.map} +1 -1
  55. package/dist/{session-keepalive-CUcFa8ld.mjs → session-keepalive-urk--pfa.mjs} +5 -5
  56. package/dist/{session-keepalive-CUcFa8ld.mjs.map → session-keepalive-urk--pfa.mjs.map} +1 -1
  57. package/dist/{tools-CaTZnIau.mjs → tools-qXyHFwNj.mjs} +2 -2
  58. package/dist/{tools-CaTZnIau.mjs.map → tools-qXyHFwNj.mjs.map} +1 -1
  59. package/dist/{tools-_7MF8Ebb.mjs → tools-r-7ZG8B5.mjs} +3 -3
  60. package/dist/{wakeup-CTX3rlz-.mjs → wakeup-C48hcN6O.mjs} +2 -2
  61. package/dist/{wakeup-CTX3rlz-.mjs.map → wakeup-C48hcN6O.mjs.map} +1 -1
  62. package/dist/work-queue-worker-1_VBfI_k.mjs +11 -0
  63. package/dist/{work-queue-worker-B4eZGy5n.mjs → work-queue-worker-DUvPiwGO.mjs} +2 -2
  64. package/dist/{work-queue-worker-B4eZGy5n.mjs.map → work-queue-worker-DUvPiwGO.mjs.map} +1 -1
  65. package/docs/commands/worker.md +1 -0
  66. package/package.json +1 -1
  67. package/src/hooks/ts/lib/tab-title.ts +18 -0
  68. package/src/hooks/ts/post-tool-use/update-tab-on-action.ts +3 -20
  69. package/src/hooks/ts/stop/stop-hook.ts +4 -15
  70. package/src/hooks/ts/user-prompt/update-tab-titles.ts +2 -10
  71. package/dist/config-msER8xj_.mjs.map +0 -1
  72. package/dist/daemon-BppwJtrH.mjs +0 -19
  73. package/dist/factory-ChfAvCzO.mjs.map +0 -1
  74. package/dist/main-resolver-CCojcYr2.mjs +0 -7
  75. package/dist/program-QSuci3RH.mjs.map +0 -1
  76. package/dist/run-BFxuNnIJ.mjs.map +0 -1
  77. package/dist/run-env-kbWVwUvU.mjs.map +0 -1
  78. package/dist/work-queue-worker-DuhZmfDB.mjs +0 -11
@@ -3997,10 +3997,10 @@ var require_resolve_block_map = __commonJS({
3997
3997
  let offset = bm.offset;
3998
3998
  let commentEnd = null;
3999
3999
  for (const collItem of bm.items) {
4000
- const { start, key, sep, value } = collItem;
4000
+ const { start, key, sep: sep2, value } = collItem;
4001
4001
  const keyProps = resolveProps.resolveProps(start, {
4002
4002
  indicator: "explicit-key-ind",
4003
- next: key ?? sep?.[0],
4003
+ next: key ?? sep2?.[0],
4004
4004
  offset,
4005
4005
  onError,
4006
4006
  parentIndent: bm.indent,
@@ -4014,7 +4014,7 @@ var require_resolve_block_map = __commonJS({
4014
4014
  else if ("indent" in key && key.indent !== bm.indent)
4015
4015
  onError(offset, "BAD_INDENT", startColMsg);
4016
4016
  }
4017
- if (!keyProps.anchor && !keyProps.tag && !sep) {
4017
+ if (!keyProps.anchor && !keyProps.tag && !sep2) {
4018
4018
  commentEnd = keyProps.end;
4019
4019
  if (keyProps.comment) {
4020
4020
  if (map.comment)
@@ -4038,7 +4038,7 @@ var require_resolve_block_map = __commonJS({
4038
4038
  ctx.atKey = false;
4039
4039
  if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
4040
4040
  onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
4041
- const valueProps = resolveProps.resolveProps(sep ?? [], {
4041
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
4042
4042
  indicator: "map-value-ind",
4043
4043
  next: value,
4044
4044
  offset: keyNode.range[2],
@@ -4054,7 +4054,7 @@ var require_resolve_block_map = __commonJS({
4054
4054
  if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
4055
4055
  onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
4056
4056
  }
4057
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);
4057
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep2, null, valueProps, onError);
4058
4058
  if (ctx.schema.compat)
4059
4059
  utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError);
4060
4060
  offset = valueNode.range[2];
@@ -4145,7 +4145,7 @@ var require_resolve_end = __commonJS({
4145
4145
  let comment = "";
4146
4146
  if (end) {
4147
4147
  let hasSpace = false;
4148
- let sep = "";
4148
+ let sep2 = "";
4149
4149
  for (const token of end) {
4150
4150
  const { source, type } = token;
4151
4151
  switch (type) {
@@ -4159,13 +4159,13 @@ var require_resolve_end = __commonJS({
4159
4159
  if (!comment)
4160
4160
  comment = cb;
4161
4161
  else
4162
- comment += sep + cb;
4163
- sep = "";
4162
+ comment += sep2 + cb;
4163
+ sep2 = "";
4164
4164
  break;
4165
4165
  }
4166
4166
  case "newline":
4167
4167
  if (comment)
4168
- sep += source;
4168
+ sep2 += source;
4169
4169
  hasSpace = true;
4170
4170
  break;
4171
4171
  default:
@@ -4208,18 +4208,18 @@ var require_resolve_flow_collection = __commonJS({
4208
4208
  let offset = fc.offset + fc.start.source.length;
4209
4209
  for (let i = 0; i < fc.items.length; ++i) {
4210
4210
  const collItem = fc.items[i];
4211
- const { start, key, sep, value } = collItem;
4211
+ const { start, key, sep: sep2, value } = collItem;
4212
4212
  const props = resolveProps.resolveProps(start, {
4213
4213
  flow: fcName,
4214
4214
  indicator: "explicit-key-ind",
4215
- next: key ?? sep?.[0],
4215
+ next: key ?? sep2?.[0],
4216
4216
  offset,
4217
4217
  onError,
4218
4218
  parentIndent: fc.indent,
4219
4219
  startOnNewline: false
4220
4220
  });
4221
4221
  if (!props.found) {
4222
- if (!props.anchor && !props.tag && !sep && !value) {
4222
+ if (!props.anchor && !props.tag && !sep2 && !value) {
4223
4223
  if (i === 0 && props.comma)
4224
4224
  onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
4225
4225
  else if (i < fc.items.length - 1)
@@ -4273,8 +4273,8 @@ var require_resolve_flow_collection = __commonJS({
4273
4273
  }
4274
4274
  }
4275
4275
  }
4276
- if (!isMap && !sep && !props.found) {
4277
- const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep, null, props, onError);
4276
+ if (!isMap && !sep2 && !props.found) {
4277
+ const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep2, null, props, onError);
4278
4278
  coll.items.push(valueNode);
4279
4279
  offset = valueNode.range[2];
4280
4280
  if (isBlock(value))
@@ -4286,7 +4286,7 @@ var require_resolve_flow_collection = __commonJS({
4286
4286
  if (isBlock(key))
4287
4287
  onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
4288
4288
  ctx.atKey = false;
4289
- const valueProps = resolveProps.resolveProps(sep ?? [], {
4289
+ const valueProps = resolveProps.resolveProps(sep2 ?? [], {
4290
4290
  flow: fcName,
4291
4291
  indicator: "map-value-ind",
4292
4292
  next: value,
@@ -4297,8 +4297,8 @@ var require_resolve_flow_collection = __commonJS({
4297
4297
  });
4298
4298
  if (valueProps.found) {
4299
4299
  if (!isMap && !props.found && ctx.options.strict) {
4300
- if (sep)
4301
- for (const st of sep) {
4300
+ if (sep2)
4301
+ for (const st of sep2) {
4302
4302
  if (st === valueProps.found)
4303
4303
  break;
4304
4304
  if (st.type === "newline") {
@@ -4315,7 +4315,7 @@ var require_resolve_flow_collection = __commonJS({
4315
4315
  else
4316
4316
  onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
4317
4317
  }
4318
- const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null;
4318
+ const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep2, null, valueProps, onError) : null;
4319
4319
  if (valueNode) {
4320
4320
  if (isBlock(value))
4321
4321
  onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
@@ -4495,7 +4495,7 @@ var require_resolve_block_scalar = __commonJS({
4495
4495
  chompStart = i + 1;
4496
4496
  }
4497
4497
  let value = "";
4498
- let sep = "";
4498
+ let sep2 = "";
4499
4499
  let prevMoreIndented = false;
4500
4500
  for (let i = 0; i < contentStart; ++i)
4501
4501
  value += lines[i][0].slice(trimIndent) + "\n";
@@ -4512,24 +4512,24 @@ var require_resolve_block_scalar = __commonJS({
4512
4512
  indent = "";
4513
4513
  }
4514
4514
  if (type === Scalar2.Scalar.BLOCK_LITERAL) {
4515
- value += sep + indent.slice(trimIndent) + content;
4516
- sep = "\n";
4515
+ value += sep2 + indent.slice(trimIndent) + content;
4516
+ sep2 = "\n";
4517
4517
  } else if (indent.length > trimIndent || content[0] === " ") {
4518
- if (sep === " ")
4519
- sep = "\n";
4520
- else if (!prevMoreIndented && sep === "\n")
4521
- sep = "\n\n";
4522
- value += sep + indent.slice(trimIndent) + content;
4523
- sep = "\n";
4518
+ if (sep2 === " ")
4519
+ sep2 = "\n";
4520
+ else if (!prevMoreIndented && sep2 === "\n")
4521
+ sep2 = "\n\n";
4522
+ value += sep2 + indent.slice(trimIndent) + content;
4523
+ sep2 = "\n";
4524
4524
  prevMoreIndented = true;
4525
4525
  } else if (content === "") {
4526
- if (sep === "\n")
4526
+ if (sep2 === "\n")
4527
4527
  value += "\n";
4528
4528
  else
4529
- sep = "\n";
4529
+ sep2 = "\n";
4530
4530
  } else {
4531
- value += sep + content;
4532
- sep = " ";
4531
+ value += sep2 + content;
4532
+ sep2 = " ";
4533
4533
  prevMoreIndented = false;
4534
4534
  }
4535
4535
  }
@@ -4712,25 +4712,25 @@ var require_resolve_flow_scalar = __commonJS({
4712
4712
  trimBoth = /^[ \t]+|[ \t]+$/g;
4713
4713
  }
4714
4714
  let res = match[1].replace(trimEnd, "");
4715
- let sep = " ";
4715
+ let sep2 = " ";
4716
4716
  let pos = line.lastIndex;
4717
4717
  while (match = line.exec(source)) {
4718
4718
  const lm = match[1].replace(trimBoth, "");
4719
4719
  if (lm === "") {
4720
- if (sep === "\n")
4721
- res += sep;
4720
+ if (sep2 === "\n")
4721
+ res += sep2;
4722
4722
  else
4723
- sep = "\n";
4723
+ sep2 = "\n";
4724
4724
  } else {
4725
- res += sep + lm;
4726
- sep = " ";
4725
+ res += sep2 + lm;
4726
+ sep2 = " ";
4727
4727
  }
4728
4728
  pos = line.lastIndex;
4729
4729
  }
4730
4730
  const last = /[ \t]*(.*)/sy;
4731
4731
  last.lastIndex = pos;
4732
4732
  match = last.exec(source);
4733
- return res + sep + (match?.[1] ?? "");
4733
+ return res + sep2 + (match?.[1] ?? "");
4734
4734
  }
4735
4735
  function doubleQuotedValue(source, onError) {
4736
4736
  let res = "";
@@ -5540,14 +5540,14 @@ var require_cst_stringify = __commonJS({
5540
5540
  }
5541
5541
  }
5542
5542
  }
5543
- function stringifyItem({ start, key, sep, value }) {
5543
+ function stringifyItem({ start, key, sep: sep2, value }) {
5544
5544
  let res = "";
5545
5545
  for (const st of start)
5546
5546
  res += st.source;
5547
5547
  if (key)
5548
5548
  res += stringifyToken(key);
5549
- if (sep)
5550
- for (const st of sep)
5549
+ if (sep2)
5550
+ for (const st of sep2)
5551
5551
  res += st.source;
5552
5552
  if (value)
5553
5553
  res += stringifyToken(value);
@@ -6714,18 +6714,18 @@ var require_parser = __commonJS({
6714
6714
  if (this.type === "map-value-ind") {
6715
6715
  const prev = getPrevProps(this.peek(2));
6716
6716
  const start = getFirstKeyStartProps(prev);
6717
- let sep;
6717
+ let sep2;
6718
6718
  if (scalar.end) {
6719
- sep = scalar.end;
6720
- sep.push(this.sourceToken);
6719
+ sep2 = scalar.end;
6720
+ sep2.push(this.sourceToken);
6721
6721
  delete scalar.end;
6722
6722
  } else
6723
- sep = [this.sourceToken];
6723
+ sep2 = [this.sourceToken];
6724
6724
  const map = {
6725
6725
  type: "block-map",
6726
6726
  offset: scalar.offset,
6727
6727
  indent: scalar.indent,
6728
- items: [{ start, key: scalar, sep }]
6728
+ items: [{ start, key: scalar, sep: sep2 }]
6729
6729
  };
6730
6730
  this.onKeyLine = true;
6731
6731
  this.stack[this.stack.length - 1] = map;
@@ -6878,15 +6878,15 @@ var require_parser = __commonJS({
6878
6878
  } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
6879
6879
  const start2 = getFirstKeyStartProps(it.start);
6880
6880
  const key = it.key;
6881
- const sep = it.sep;
6882
- sep.push(this.sourceToken);
6881
+ const sep2 = it.sep;
6882
+ sep2.push(this.sourceToken);
6883
6883
  delete it.key;
6884
6884
  delete it.sep;
6885
6885
  this.stack.push({
6886
6886
  type: "block-map",
6887
6887
  offset: this.offset,
6888
6888
  indent: this.indent,
6889
- items: [{ start: start2, key, sep }]
6889
+ items: [{ start: start2, key, sep: sep2 }]
6890
6890
  });
6891
6891
  } else if (start.length > 0) {
6892
6892
  it.sep = it.sep.concat(start, this.sourceToken);
@@ -7080,13 +7080,13 @@ var require_parser = __commonJS({
7080
7080
  const prev = getPrevProps(parent);
7081
7081
  const start = getFirstKeyStartProps(prev);
7082
7082
  fixFlowSeqItems(fc);
7083
- const sep = fc.end.splice(1, fc.end.length);
7084
- sep.push(this.sourceToken);
7083
+ const sep2 = fc.end.splice(1, fc.end.length);
7084
+ sep2.push(this.sourceToken);
7085
7085
  const map = {
7086
7086
  type: "block-map",
7087
7087
  offset: fc.offset,
7088
7088
  indent: fc.indent,
7089
- items: [{ start, key: fc, sep }]
7089
+ items: [{ start, key: fc, sep: sep2 }]
7090
7090
  };
7091
7091
  this.onKeyLine = true;
7092
7092
  this.stack[this.stack.length - 1] = map;
@@ -7366,7 +7366,7 @@ var require_dist = __commonJS({
7366
7366
 
7367
7367
  // src/hooks/ts/pre-tool-use/security-validator.ts
7368
7368
  import { appendFileSync, mkdirSync as mkdirSync3, existsSync as existsSync6 } from "fs";
7369
- import { dirname as dirname5, resolve as resolve3 } from "path";
7369
+ import { dirname as dirname6, resolve as resolve3 } from "path";
7370
7370
 
7371
7371
  // src/hooks/ts/lib/pai-paths.ts
7372
7372
  import { homedir as homedir2 } from "os";
@@ -7634,7 +7634,7 @@ function paiSocketPath() {
7634
7634
 
7635
7635
  // src/config/main-config.ts
7636
7636
  var import_yaml2 = __toESM(require_dist(), 1);
7637
- import { existsSync as existsSync4, readFileSync as readFileSync4, renameSync as renameSync3 } from "node:fs";
7637
+ import { existsSync as existsSync4, readFileSync as readFileSync4, renameSync as renameSync3, chmodSync as chmodSync2 } from "node:fs";
7638
7638
  import { dirname as dirname2, join as join3, basename } from "node:path";
7639
7639
 
7640
7640
  // src/config/json-store.ts
@@ -7766,7 +7766,7 @@ function readMainConfigRaw(path = CONFIG_FILE) {
7766
7766
 
7767
7767
  // src/workers/workers-config.ts
7768
7768
  var import_yaml3 = __toESM(require_dist(), 1);
7769
- import { existsSync as existsSync5, readFileSync as readFileSync5, writeFileSync as writeFileSync2, chmodSync as chmodSync2 } from "node:fs";
7769
+ import { existsSync as existsSync5, readFileSync as readFileSync5, writeFileSync as writeFileSync2, chmodSync as chmodSync3 } from "node:fs";
7770
7770
  import { homedir as homedir4 } from "node:os";
7771
7771
  import { dirname as dirname4, join as join5 } from "node:path";
7772
7772
  var WORKERS_YAML_FILENAME = "workers.yaml";
@@ -7828,7 +7828,7 @@ function parseBuiltinAnthropic(raw, pathPrefix) {
7828
7828
  );
7829
7829
  }
7830
7830
  if (p.models === void 0) return { ...NATIVE_ANTHROPIC_MODELS };
7831
- return parseModelsBlock(`${pathPrefix}.models`, p.models);
7831
+ return { ...NATIVE_ANTHROPIC_MODELS, ...parseModelsBlock(`${pathPrefix}.models`, p.models) };
7832
7832
  }
7833
7833
  function lineOf(doc, path) {
7834
7834
  try {
@@ -7967,8 +7967,8 @@ function readWorkersYaml(yamlPath) {
7967
7967
  // src/workers/config.ts
7968
7968
  var ANTHROPIC_NATIVE = "anthropic";
7969
7969
  var NATIVE_ANTHROPIC_MODELS = {
7970
- default: "claude-sonnet-5",
7971
- fast: "claude-haiku-4-5-20251001"
7970
+ default: "sonnet",
7971
+ fast: "haiku"
7972
7972
  };
7973
7973
  var MODEL_TIERS = ["haiku", "sonnet", "opus"];
7974
7974
  var PROVIDER_TAGS = [
@@ -8461,7 +8461,7 @@ function workersLogDir(config) {
8461
8461
  }
8462
8462
 
8463
8463
  // src/workers/worktree.ts
8464
- import { isAbsolute, join as join7, resolve as resolve2 } from "node:path";
8464
+ import { dirname as dirname5, isAbsolute, join as join7, resolve as resolve2, sep } from "node:path";
8465
8465
  function worktreesDir(logDir) {
8466
8466
  return join7(logDir, "worktrees");
8467
8467
  }
@@ -8546,7 +8546,7 @@ function logSecurityEvent(event) {
8546
8546
  const logPath = securityEventsPath();
8547
8547
  const entry = JSON.stringify({ timestamp: (/* @__PURE__ */ new Date()).toISOString(), ...event }) + "\n";
8548
8548
  try {
8549
- const dir = dirname5(logPath);
8549
+ const dir = dirname6(logPath);
8550
8550
  if (!existsSync6(dir)) {
8551
8551
  mkdirSync3(dir, { recursive: true });
8552
8552
  }