engine7 7.1.148 → 7.1.149

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.
@@ -6023,16 +6023,15 @@ function stripInjectedContext(text2) {
6023
6023
  function escapeRegExp(s) {
6024
6024
  return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
6025
6025
  }
6026
- var SKILL_GATE_HINT_PREFIX, SYSTEM_REMINDER_BLOCK, INJECT_SECTION_HEADS, KNOWN_INJECTED_TEXT, INJECTED_LINE_PREFIXES, XML_BLOCK;
6026
+ var SYSTEM_REMINDER_BLOCK, INJECT_SECTION_HEADS, KNOWN_INJECTED_TEXT, INJECTED_LINE_PREFIXES, XML_BLOCK;
6027
6027
  var init_strip_injected = __esm({
6028
6028
  "src/messages/strip-injected.ts"() {
6029
6029
  "use strict";
6030
- SKILL_GATE_HINT_PREFIX = "\u8FD9\u6761\u6D88\u606F\u662F\u5F00\u53D1\u4EFB\u52A1";
6031
6030
  SYSTEM_REMINDER_BLOCK = /<system-reminder>[\s\S]*?<\/system-reminder>/g;
6032
6031
  INJECT_SECTION_HEADS = /^(本轮对话|当前情绪状态|当前模式)/;
6033
6032
  KNOWN_INJECTED_TEXT = [
6034
- SKILL_GATE_HINT_PREFIX,
6035
- // skill-gate hint 默认/自定义前缀(1007 现行)
6033
+ "\u8FD9\u6761\u6D88\u606F\u662F\u5F00\u53D1\u4EFB\u52A1",
6034
+ // 旧版 skill-gate 提示前缀,兼容未打标签的历史
6036
6035
  "\u5F00\u53D1\u4EFB\u52A1\u8DEF\u6807\uFF0C\u6309\u573A\u666F\u5BF9\u53F7\u5165\u5EA7",
6037
6036
  // skill-gate hint(0912 老文案,历史 JSONL 兼容)
6038
6037
  "\u3010\u5B9A\u65F6\u5FC3\u8DF3\u3011\u8BF7 read HEARTBEAT.md"
@@ -10762,32 +10761,32 @@ CREATE TABLE IF NOT EXISTS cluster_members (
10762
10761
  return { built: !hasStats, ms: Date.now() - started };
10763
10762
  }
10764
10763
  async close() {
10765
- const errors = [];
10764
+ const errors2 = [];
10766
10765
  try {
10767
10766
  this.capture?.close();
10768
10767
  } catch (error) {
10769
- errors.push(error);
10768
+ errors2.push(error);
10770
10769
  }
10771
10770
  try {
10772
10771
  this.db.close();
10773
10772
  } catch (error) {
10774
- errors.push(error);
10773
+ errors2.push(error);
10775
10774
  }
10776
10775
  try {
10777
10776
  await this.vectors?.close();
10778
10777
  } catch (error) {
10779
- errors.push(error);
10778
+ errors2.push(error);
10780
10779
  } finally {
10781
10780
  this.vectors = null;
10782
10781
  }
10783
10782
  try {
10784
10783
  this.releaseRuntimeWriter?.();
10785
10784
  } catch (error) {
10786
- errors.push(error);
10785
+ errors2.push(error);
10787
10786
  } finally {
10788
10787
  this.releaseRuntimeWriter = void 0;
10789
10788
  }
10790
- if (errors.length) throw new AggregateError(errors, "MEM7_CLOSE_FAILED");
10789
+ if (errors2.length) throw new AggregateError(errors2, "MEM7_CLOSE_FAILED");
10791
10790
  }
10792
10791
  // ── memcell 账本 ──────────────────────────────────────────
10793
10792
  insertMemcell(cell) {
@@ -18259,10 +18258,10 @@ function installSQLiteWriteCapture(db2, source) {
18259
18258
  if (db2.isTransaction) throw new Error("REPLICATION_TRANSACTION_ALREADY_OPEN");
18260
18259
  const exec3 = db2.exec, prepare = db2.prepare;
18261
18260
  let active, failed = false, closed = false, reading = false;
18262
- let direct;
18261
+ let direct2;
18263
18262
  const check = () => {
18264
18263
  if (closed) throw new Error("REPLICATION_TRANSACTION_CLOSED");
18265
- direct?.assertOpen();
18264
+ direct2?.assertOpen();
18266
18265
  };
18267
18266
  const wrappedExec = function(sql) {
18268
18267
  check();
@@ -18333,10 +18332,10 @@ function installSQLiteWriteCapture(db2, source) {
18333
18332
  db2.prepare = checkedPrepare;
18334
18333
  const transaction = (operation) => {
18335
18334
  check();
18336
- if (db2.isTransaction) return direct.scope(operation);
18335
+ if (db2.isTransaction) return direct2.scope(operation);
18337
18336
  db2.exec("BEGIN IMMEDIATE");
18338
18337
  try {
18339
- const result = direct.scope(operation);
18338
+ const result = direct2.scope(operation);
18340
18339
  if (result && typeof result.then === "function") throw new Error("REPLICATION_ASYNC_TRANSACTION");
18341
18340
  db2.exec("COMMIT");
18342
18341
  return result;
@@ -18345,10 +18344,10 @@ function installSQLiteWriteCapture(db2, source) {
18345
18344
  throw error;
18346
18345
  }
18347
18346
  };
18348
- direct = installAutocommitCapture(db2, transaction);
18347
+ direct2 = installAutocommitCapture(db2, transaction);
18349
18348
  return {
18350
18349
  assertOpen: check,
18351
- scope: (operation) => direct.scope(operation),
18350
+ scope: (operation) => direct2.scope(operation),
18352
18351
  transaction,
18353
18352
  close() {
18354
18353
  if (closed) return;
@@ -18357,7 +18356,7 @@ function installSQLiteWriteCapture(db2, source) {
18357
18356
  source.endCapture(active);
18358
18357
  active = void 0;
18359
18358
  }
18360
- direct.close();
18359
+ direct2.close();
18361
18360
  db2.prepare = prepare;
18362
18361
  db2.exec = exec3;
18363
18362
  closed = true;
@@ -20518,13 +20517,15 @@ function beginSkillGate(sessionId) {
20518
20517
  function isUserChannel(ch) {
20519
20518
  return !!ch && USER_CHANNELS.has(ch);
20520
20519
  }
20521
- var USER_CHANNELS, loadedBySession, MAX_TRACKED_SESSIONS;
20520
+ var USER_CHANNELS, SKILL_CHANNELS, loadedBySession, MAX_TRACKED_SESSIONS;
20522
20521
  var init_skill_gate = __esm({
20523
20522
  "src/skills/skill-gate.ts"() {
20524
20523
  "use strict";
20525
20524
  init_strip_injected();
20525
+ init_writer();
20526
20526
  init_cpu_router_scene();
20527
20527
  USER_CHANNELS = /* @__PURE__ */ new Set(["discord", "feishu", "wechat", "telegram", "cli", "console", "voice-chat", "deskBuddy", "ccBridge"]);
20528
+ SKILL_CHANNELS = /* @__PURE__ */ new Set([...USER_CHANNELS, "chan7", "webhook"]);
20528
20529
  loadedBySession = /* @__PURE__ */ new Map();
20529
20530
  MAX_TRACKED_SESSIONS = 100;
20530
20531
  }
@@ -28179,7 +28180,7 @@ function formatSkillsListing(skills, contextWindowTokens) {
28179
28180
  function buildSkillToolPrompt() {
28180
28181
  return `Execute a skill within the main conversation
28181
28182
 
28182
- When users ask you to perform tasks, check if any of the available skills match. Skills provide specialized capabilities and domain knowledge.
28183
+ Skills provide specialized capabilities and domain knowledge.
28183
28184
 
28184
28185
  When users reference a "slash command" or "/<something>" (e.g., "/commit", "/review-pr"), they are referring to a skill. Use this tool to invoke it.
28185
28186
 
@@ -28193,16 +28194,13 @@ How to invoke:
28193
28194
 
28194
28195
  Important:
28195
28196
  - Available skills are listed in system-reminder messages in the conversation
28196
- - When a skill matches the user's request, this is a BLOCKING REQUIREMENT: invoke the relevant Skill tool BEFORE generating any other response about the task
28197
- - NEVER mention a skill without actually calling this tool
28198
28197
  - Do not invoke a skill that is already running
28199
28198
  - Do not use this tool for built-in CLI commands (like /help, /clear, etc.)
28200
28199
  - If you see a <${COMMAND_NAME_TAG}> tag in the current conversation turn, the skill has ALREADY been loaded - follow the instructions directly instead of calling this tool again
28201
28200
  `;
28202
28201
  }
28203
- function loadSkillContent(skillName) {
28204
- const entry = cachedSkills.find((s) => s.name === skillName);
28205
- const skillMdPath = entry?.location ? path29.join(skillsDirPath, entry.location.slice("skills/".length)) : path29.join(skillsDirPath, skillName, "SKILL.md");
28202
+ function loadSkillContent(skillsDir, skill) {
28203
+ const skillMdPath = skill.location ? path29.join(skillsDir, skill.location.slice("skills/".length)) : path29.join(skillsDir, skill.name, "SKILL.md");
28206
28204
  if (!fs25.existsSync(skillMdPath)) return null;
28207
28205
  const content = fs25.readFileSync(skillMdPath, "utf-8");
28208
28206
  const dependencies2 = parseFrontmatter(content)["requires-tools"];
@@ -28225,6 +28223,13 @@ function registerSkillTool(skillsDir, skills, contextWindowTokens) {
28225
28223
  skillsDirPath = skillsDir;
28226
28224
  cachedSkills = skills;
28227
28225
  cachedContextWindowTokens = contextWindowTokens;
28226
+ const groupedSkills = /* @__PURE__ */ new Map();
28227
+ for (const skill of skills) {
28228
+ const parts = skill.location?.split("/");
28229
+ if (!parts || parts[0] !== "skills" || parts.length < 4 || skill.name.includes(":")) continue;
28230
+ const qualifiedName = `${parts[1]}:${skill.name}`;
28231
+ if (!groupedSkills.has(qualifiedName)) groupedSkills.set(qualifiedName, skill);
28232
+ }
28228
28233
  const descriptionText = buildSkillToolPrompt();
28229
28234
  cachedListing = formatSkillsListing(cachedSkills, contextWindowTokens);
28230
28235
  registry.register({
@@ -28246,12 +28251,12 @@ function registerSkillTool(skillsDir, skills, contextWindowTokens) {
28246
28251
  return { content: "Invalid skill: empty name", isError: true };
28247
28252
  }
28248
28253
  const normalizedName = skillName.startsWith("/") ? skillName.substring(1) : skillName;
28249
- const skill = cachedSkills.find((s) => s.name === normalizedName);
28254
+ const skill = skills.find((s) => s.name === normalizedName) ?? groupedSkills.get(normalizedName);
28250
28255
  if (!skill) {
28251
- const available = cachedSkills.map((s) => s.name).join(", ");
28256
+ const available = skills.map((s) => s.name).join(", ");
28252
28257
  return { content: `Unknown skill: ${normalizedName}. Available: ${available}`, isError: true };
28253
28258
  }
28254
- const content = loadSkillContent(normalizedName);
28259
+ const content = loadSkillContent(skillsDir, skill);
28255
28260
  if (!content) {
28256
28261
  return { content: `Skill file not found: ${normalizedName}`, isError: true };
28257
28262
  }
@@ -28269,7 +28274,7 @@ ${loaded.content}
28269
28274
  const argLine = skillArgs ? `
28270
28275
 
28271
28276
  User arguments: ${skillArgs}` : "";
28272
- return { content: `Skill "${normalizedName}" loaded.${dependencyContent}
28277
+ return { content: `Skill "${skill.name}" loaded.${dependencyContent}
28273
28278
 
28274
28279
  ${content.content}${argLine}` };
28275
28280
  },
@@ -30560,12 +30565,23 @@ var init_provider = __esm({
30560
30565
  }
30561
30566
  });
30562
30567
 
30568
+ // src/services/adaptive-proxy.ts
30569
+ import { HttpsProxyAgent } from "https-proxy-agent";
30570
+ import { Agent, Client, ProxyAgent, errors } from "undici";
30571
+ var direct;
30572
+ var init_adaptive_proxy = __esm({
30573
+ "src/services/adaptive-proxy.ts"() {
30574
+ "use strict";
30575
+ direct = new Agent();
30576
+ }
30577
+ });
30578
+
30563
30579
  // src/services/withRetry.ts
30564
- import { ProxyAgent } from "undici";
30565
30580
  var FIRST_READ_TIMEOUT_MS, NO_PROGRESS_TIMEOUT_MS;
30566
30581
  var init_withRetry = __esm({
30567
30582
  "src/services/withRetry.ts"() {
30568
30583
  "use strict";
30584
+ init_adaptive_proxy();
30569
30585
  FIRST_READ_TIMEOUT_MS = parseInt(process.env.API_TIMEOUT_MS || "", 10) || 6e5;
30570
30586
  NO_PROGRESS_TIMEOUT_MS = parseInt(process.env.STREAM_NO_PROGRESS_TIMEOUT_MS || "", 10) || 3e5;
30571
30587
  }
@@ -35337,15 +35353,15 @@ async function deletionOverlay(options, runtimeCopies) {
35337
35353
  if (floor <= manifest.deletionWatermark) throw new Error("RECOVERY_OVERLAY_NOT_REQUIRED");
35338
35354
  const handles = [], databases = /* @__PURE__ */ new Map();
35339
35355
  const closeHandles = () => {
35340
- const errors = [];
35356
+ const errors2 = [];
35341
35357
  while (handles.length) {
35342
35358
  try {
35343
35359
  handles.pop().close();
35344
35360
  } catch (error) {
35345
- errors.push(error);
35361
+ errors2.push(error);
35346
35362
  }
35347
35363
  }
35348
- if (errors.length) throw new AggregateError(errors, "RECOVERY_OVERLAY_CLOSE_FAILED");
35364
+ if (errors2.length) throw new AggregateError(errors2, "RECOVERY_OVERLAY_CLOSE_FAILED");
35349
35365
  };
35350
35366
  let memory, capture2 = false;
35351
35367
  try {
@@ -36883,7 +36899,7 @@ var RuntimeCheckpointControl = class {
36883
36899
  };
36884
36900
 
36885
36901
  // src/continuity/recovery-archive-transfer.ts
36886
- import { Agent, createServer as createServer2, request as request3 } from "node:https";
36902
+ import { Agent as Agent2, createServer as createServer2, request as request3 } from "node:https";
36887
36903
  import { gzipSync, gunzipSync as gunzipSync4, createGunzip, brotliCompressSync, brotliDecompressSync, createBrotliCompress, createBrotliDecompress, constants as constants13 } from "node:zlib";
36888
36904
  import { pipeline } from "node:stream";
36889
36905
  import { pipeline as pipelineAsync } from "node:stream/promises";
@@ -37292,7 +37308,7 @@ var RecoveryArchiveClient = class {
37292
37308
  this.timeout = options.timeoutMs ?? 15e3;
37293
37309
  if (!Number.isSafeInteger(this.timeout) || this.timeout < 1 || this.timeout > 6e4) throw new Error("RECOVERY_TRANSFER_CONFIG");
37294
37310
  this.key = Buffer.from(options.key);
37295
- this.agent = new Agent({ ca: options.ca, cert: options.cert, key: this.key, minVersion: "TLSv1.3", rejectUnauthorized: true, keepAlive: true, maxSockets: 2 });
37311
+ this.agent = new Agent2({ ca: options.ca, cert: options.cert, key: this.key, minVersion: "TLSv1.3", rejectUnauthorized: true, keepAlive: true, maxSockets: 2 });
37296
37312
  }
37297
37313
  call(input, maximum, archiveDigest) {
37298
37314
  if (this.closed) return Promise.reject(new Error("RECOVERY_TRANSFER_CLOSED"));
@@ -38190,7 +38206,7 @@ var RuntimeReplicaRepository = class _RuntimeReplicaRepository {
38190
38206
  import { createServer as createServer4 } from "node:https";
38191
38207
 
38192
38208
  // src/continuity/publication-transport.ts
38193
- import { createServer as createServer3, request as request4, Agent as Agent2 } from "node:https";
38209
+ import { createServer as createServer3, request as request4, Agent as Agent3 } from "node:https";
38194
38210
  import { createHash as createHash43 } from "node:crypto";
38195
38211
  init_publication_objects();
38196
38212
  var BODY_LIMIT = PUBLICATION_MANIFEST_BYTES + 65536;
@@ -40003,27 +40019,27 @@ async function admitNormalRecoveryArchives(options) {
40003
40019
  failure2 = error;
40004
40020
  throw error;
40005
40021
  } finally {
40006
- const errors = [];
40022
+ const errors2 = [];
40007
40023
  try {
40008
40024
  await memory?.close();
40009
40025
  } catch (error) {
40010
- errors.push(error);
40026
+ errors2.push(error);
40011
40027
  }
40012
40028
  for (const db2 of handles.reverse()) {
40013
40029
  try {
40014
40030
  db2.close();
40015
40031
  } catch (error) {
40016
- errors.push(error);
40032
+ errors2.push(error);
40017
40033
  }
40018
40034
  }
40019
40035
  for (const release of releases2.reverse()) {
40020
40036
  try {
40021
40037
  release();
40022
40038
  } catch (error) {
40023
- errors.push(error);
40039
+ errors2.push(error);
40024
40040
  }
40025
40041
  }
40026
- if (errors.length) throw new AggregateError(failure2 === void 0 ? errors : [failure2, ...errors], "RECOVERY_CURRENT_CLOSE_FAILED");
40042
+ if (errors2.length) throw new AggregateError(failure2 === void 0 ? errors2 : [failure2, ...errors2], "RECOVERY_CURRENT_CLOSE_FAILED");
40027
40043
  }
40028
40044
  });
40029
40045
  }
@@ -41900,7 +41916,7 @@ var RemoteTravelNodeAuthority = class _RemoteTravelNodeAuthority extends RemoteT
41900
41916
  };
41901
41917
 
41902
41918
  // src/continuity/authority-client.ts
41903
- import { Agent as Agent3, request as request5 } from "node:https";
41919
+ import { Agent as Agent4, request as request5 } from "node:https";
41904
41920
  var publicErrors = /* @__PURE__ */ new Set([
41905
41921
  "TRAVEL_HEARTBEAT_REPLAY",
41906
41922
  "TRAVEL_BOOT_MISMATCH",
@@ -41937,8 +41953,8 @@ var TravelReportClient = class {
41937
41953
  if (!Number.isSafeInteger(this.timeout) || this.timeout < 1 || this.timeout > 6e4) throw new Error("TRAVEL_CONTROL_INVALID_CONFIG");
41938
41954
  this.key = options.key ? Buffer.from(options.key) : void 0;
41939
41955
  const tls2 = { ca: options.ca, cert: options.cert, key: this.key, minVersion: "TLSv1.3", rejectUnauthorized: true, maxSockets: 1 };
41940
- this.agent = new Agent3({ ...tls2, keepAlive: true });
41941
- this.mutationAgent = new Agent3({ ...tls2, keepAlive: false });
41956
+ this.agent = new Agent4({ ...tls2, keepAlive: true });
41957
+ this.mutationAgent = new Agent4({ ...tls2, keepAlive: false });
41942
41958
  }
41943
41959
  agent;
41944
41960
  mutationAgent;
@@ -42127,7 +42143,7 @@ var TravelManagementClient = class extends TravelReportClient {
42127
42143
  };
42128
42144
 
42129
42145
  // src/continuity/gateway-server.ts
42130
- import { Agent as Agent4, createServer as createServer5, request as request6 } from "node:https";
42146
+ import { Agent as Agent5, createServer as createServer5, request as request6 } from "node:https";
42131
42147
  var prefix = "/travel/gateway/v1/";
42132
42148
  var requestLimit2 = 24 * 1024 * 1024;
42133
42149
  var responseLimit = 48 * 1024 * 1024;
@@ -42172,7 +42188,7 @@ var TravelGatewayClient = class {
42172
42188
  this.timeout = options.timeoutMs ?? 15e3;
42173
42189
  if (!Number.isSafeInteger(this.timeout) || this.timeout < 1 || this.timeout > 6e4) throw new Error("TRAVEL_GATEWAY_INVALID_TIMEOUT");
42174
42190
  this.key = Buffer.from(options.key);
42175
- this.agent = new Agent4({ ca: options.ca, cert: options.cert, key: this.key, minVersion: "TLSv1.3", rejectUnauthorized: true, keepAlive: true, maxSockets: 4 });
42191
+ this.agent = new Agent5({ ca: options.ca, cert: options.cert, key: this.key, minVersion: "TLSv1.3", rejectUnauthorized: true, keepAlive: true, maxSockets: 4 });
42176
42192
  }
42177
42193
  async call(action, input, retryStale = true, deadline = performance.now() + this.timeout) {
42178
42194
  const body = Buffer.from(JSON.stringify(input));
@@ -42295,7 +42311,7 @@ var TravelGatewayClient = class {
42295
42311
  };
42296
42312
 
42297
42313
  // src/continuity/node-supervisor-client.ts
42298
- import { Agent as Agent5, request as request7 } from "node:https";
42314
+ import { Agent as Agent6, request as request7 } from "node:https";
42299
42315
 
42300
42316
  // src/continuity/node-supervisor-protocol.ts
42301
42317
  var nodeSupervisorPath = "/travel/node/v1";
@@ -42385,7 +42401,7 @@ var RemoteTravelNodeSupervisor = class {
42385
42401
  this.timeout = options.timeoutMs ?? 18e4;
42386
42402
  if (!Number.isSafeInteger(this.timeout) || this.timeout < 1 || this.timeout > 6e5) throw new Error("TRAVEL_NODE_CLIENT_CONFIG");
42387
42403
  this.key = Buffer.from(options.key);
42388
- const agent = () => new Agent5({ ca: options.ca, cert: options.cert, key: this.key, minVersion: "TLSv1.3", rejectUnauthorized: true, keepAlive: true, maxSockets: 1 });
42404
+ const agent = () => new Agent6({ ca: options.ca, cert: options.cert, key: this.key, minVersion: "TLSv1.3", rejectUnauthorized: true, keepAlive: true, maxSockets: 1 });
42389
42405
  this.agents = { observe: agent(), permit: agent(), operation: agent(), stop: agent() };
42390
42406
  }
42391
42407
  principal;
@@ -11964,12 +11964,11 @@ ${e.outcome}
11964
11964
  };
11965
11965
 
11966
11966
  // src/messages/strip-injected.ts
11967
- var SKILL_GATE_HINT_PREFIX = "\u8FD9\u6761\u6D88\u606F\u662F\u5F00\u53D1\u4EFB\u52A1";
11968
11967
  var SYSTEM_REMINDER_BLOCK = /<system-reminder>[\s\S]*?<\/system-reminder>/g;
11969
11968
  var INJECT_SECTION_HEADS = /^(本轮对话|当前情绪状态|当前模式)/;
11970
11969
  var KNOWN_INJECTED_TEXT = [
11971
- SKILL_GATE_HINT_PREFIX,
11972
- // skill-gate hint 默认/自定义前缀(1007 现行)
11970
+ "\u8FD9\u6761\u6D88\u606F\u662F\u5F00\u53D1\u4EFB\u52A1",
11971
+ // 旧版 skill-gate 提示前缀,兼容未打标签的历史
11973
11972
  "\u5F00\u53D1\u4EFB\u52A1\u8DEF\u6807\uFF0C\u6309\u573A\u666F\u5BF9\u53F7\u5165\u5EA7",
11974
11973
  // skill-gate hint(0912 老文案,历史 JSONL 兼容)
11975
11974
  "\u3010\u5B9A\u65F6\u5FC3\u8DF3\u3011\u8BF7 read HEARTBEAT.md"
@@ -3502,7 +3502,7 @@ async function unpackBundle(body, expected) {
3502
3502
  }
3503
3503
 
3504
3504
  // src/travel/apply-transaction.ts
3505
- import { closeSync as closeSync2, existsSync as existsSync4, fsyncSync as fsyncSync2, lstatSync as lstatSync2, mkdirSync as mkdirSync3, openSync as openSync2, readFileSync as readFileSync5, readSync as readSync2, renameSync as renameSync2, rmSync, writeFileSync as writeFileSync3 } from "node:fs";
3505
+ import { closeSync as closeSync2, existsSync as existsSync4, fsyncSync as fsyncSync2, linkSync, lstatSync as lstatSync2, mkdirSync as mkdirSync3, openSync as openSync2, readFileSync as readFileSync5, readSync as readSync2, renameSync as renameSync2, rmSync, writeFileSync as writeFileSync3 } from "node:fs";
3506
3506
  import { dirname as dirname3, join as join5, resolve as resolve3 } from "node:path";
3507
3507
  var safeRel = (rel) => !!rel && !/[\\:\x00-\x1f]/.test(rel) && rel.split("/").every((p) => p && p !== "." && p !== "..");
3508
3508
  function assertPath(root, rel) {