archal 0.9.17 → 0.9.19

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.
@@ -21,7 +21,7 @@ import {
21
21
  requestedSeedsMatchSession,
22
22
  sleep,
23
23
  trimEnv
24
- } from "./chunk-CJJ32YQF.js";
24
+ } from "./chunk-WZ7SA4CK.js";
25
25
 
26
26
  // ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js
27
27
  var require_code = __commonJS({
@@ -2974,7 +2974,7 @@ var require_compile = __commonJS({
2974
2974
  const schOrFunc = root.refs[ref];
2975
2975
  if (schOrFunc)
2976
2976
  return schOrFunc;
2977
- let _sch = resolve7.call(this, root, ref);
2977
+ let _sch = resolve8.call(this, root, ref);
2978
2978
  if (_sch === void 0) {
2979
2979
  const schema = (_a2 = root.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref];
2980
2980
  const { schemaId } = this.opts;
@@ -3001,7 +3001,7 @@ var require_compile = __commonJS({
3001
3001
  function sameSchemaEnv(s1, s2) {
3002
3002
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
3003
3003
  }
3004
- function resolve7(root, ref) {
3004
+ function resolve8(root, ref) {
3005
3005
  let sch;
3006
3006
  while (typeof (sch = this.refs[ref]) == "string")
3007
3007
  ref = sch;
@@ -3576,55 +3576,55 @@ var require_fast_uri = __commonJS({
3576
3576
  }
3577
3577
  return uri;
3578
3578
  }
3579
- function resolve7(baseURI, relativeURI, options) {
3579
+ function resolve8(baseURI, relativeURI, options) {
3580
3580
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3581
3581
  const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
3582
3582
  schemelessOptions.skipEscape = true;
3583
3583
  return serialize(resolved, schemelessOptions);
3584
3584
  }
3585
- function resolveComponent(base, relative2, options, skipNormalization) {
3585
+ function resolveComponent(base, relative3, options, skipNormalization) {
3586
3586
  const target = {};
3587
3587
  if (!skipNormalization) {
3588
3588
  base = parse3(serialize(base, options), options);
3589
- relative2 = parse3(serialize(relative2, options), options);
3589
+ relative3 = parse3(serialize(relative3, options), options);
3590
3590
  }
3591
3591
  options = options || {};
3592
- if (!options.tolerant && relative2.scheme) {
3593
- target.scheme = relative2.scheme;
3594
- target.userinfo = relative2.userinfo;
3595
- target.host = relative2.host;
3596
- target.port = relative2.port;
3597
- target.path = removeDotSegments(relative2.path || "");
3598
- target.query = relative2.query;
3592
+ if (!options.tolerant && relative3.scheme) {
3593
+ target.scheme = relative3.scheme;
3594
+ target.userinfo = relative3.userinfo;
3595
+ target.host = relative3.host;
3596
+ target.port = relative3.port;
3597
+ target.path = removeDotSegments(relative3.path || "");
3598
+ target.query = relative3.query;
3599
3599
  } else {
3600
- if (relative2.userinfo !== void 0 || relative2.host !== void 0 || relative2.port !== void 0) {
3601
- target.userinfo = relative2.userinfo;
3602
- target.host = relative2.host;
3603
- target.port = relative2.port;
3604
- target.path = removeDotSegments(relative2.path || "");
3605
- target.query = relative2.query;
3600
+ if (relative3.userinfo !== void 0 || relative3.host !== void 0 || relative3.port !== void 0) {
3601
+ target.userinfo = relative3.userinfo;
3602
+ target.host = relative3.host;
3603
+ target.port = relative3.port;
3604
+ target.path = removeDotSegments(relative3.path || "");
3605
+ target.query = relative3.query;
3606
3606
  } else {
3607
- if (!relative2.path) {
3607
+ if (!relative3.path) {
3608
3608
  target.path = base.path;
3609
- if (relative2.query !== void 0) {
3610
- target.query = relative2.query;
3609
+ if (relative3.query !== void 0) {
3610
+ target.query = relative3.query;
3611
3611
  } else {
3612
3612
  target.query = base.query;
3613
3613
  }
3614
3614
  } else {
3615
- if (relative2.path[0] === "/") {
3616
- target.path = removeDotSegments(relative2.path);
3615
+ if (relative3.path[0] === "/") {
3616
+ target.path = removeDotSegments(relative3.path);
3617
3617
  } else {
3618
3618
  if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
3619
- target.path = "/" + relative2.path;
3619
+ target.path = "/" + relative3.path;
3620
3620
  } else if (!base.path) {
3621
- target.path = relative2.path;
3621
+ target.path = relative3.path;
3622
3622
  } else {
3623
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative2.path;
3623
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative3.path;
3624
3624
  }
3625
3625
  target.path = removeDotSegments(target.path);
3626
3626
  }
3627
- target.query = relative2.query;
3627
+ target.query = relative3.query;
3628
3628
  }
3629
3629
  target.userinfo = base.userinfo;
3630
3630
  target.host = base.host;
@@ -3632,7 +3632,7 @@ var require_fast_uri = __commonJS({
3632
3632
  }
3633
3633
  target.scheme = base.scheme;
3634
3634
  }
3635
- target.fragment = relative2.fragment;
3635
+ target.fragment = relative3.fragment;
3636
3636
  return target;
3637
3637
  }
3638
3638
  function equal(uriA, uriB, options) {
@@ -3803,7 +3803,7 @@ var require_fast_uri = __commonJS({
3803
3803
  var fastUri = {
3804
3804
  SCHEMES,
3805
3805
  normalize,
3806
- resolve: resolve7,
3806
+ resolve: resolve8,
3807
3807
  resolveComponent,
3808
3808
  equal,
3809
3809
  serialize,
@@ -6833,11 +6833,14 @@ var RouteRuntimePolicyError = class extends Error {
6833
6833
  service;
6834
6834
  url;
6835
6835
  constructor(input) {
6836
- super(input.message);
6837
- this.name = "RouteRuntimePolicyError";
6838
- this.code = input.code;
6839
- this.service = input.service;
6840
- this.url = input.url;
6836
+ super("Network request failed");
6837
+ this.name = "TypeError";
6838
+ Object.defineProperties(this, {
6839
+ code: { value: input.code, enumerable: false },
6840
+ service: { value: input.service, enumerable: false },
6841
+ url: { value: input.url, enumerable: false },
6842
+ policyMessage: { value: input.message, enumerable: false }
6843
+ });
6841
6844
  }
6842
6845
  };
6843
6846
 
@@ -7277,6 +7280,7 @@ var slackRouteManifest = {
7277
7280
  exactDomain("slack.com"),
7278
7281
  exactDomain("api.slack.com")
7279
7282
  ],
7283
+ upstreamBasePath: "/api",
7280
7284
  // Block adjacent Slack-owned domains that tests don't need and that can be
7281
7285
  // abused as data-exfiltration channels. hooks.slack.com and files.slack.com
7282
7286
  // in particular are ideal POST targets for a malicious dependency trying to
@@ -8208,7 +8212,7 @@ var ROUTE_RUNTIME_DISPATCHING_ROUTE_KINDS = new Set(ROUTE_RUNTIME_PUBLIC_ROUTE_K
8208
8212
  var stripeCompatibilityProfile = buildServiceCompatibilityProfile(stripeRouteManifest);
8209
8213
 
8210
8214
  // ../route-runtime-core/src/hosted-capabilities.ts
8211
- import { createHash as createHash5 } from "crypto";
8215
+ import { createHash as createHash6 } from "crypto";
8212
8216
 
8213
8217
  // ../../twins/core/src/control-plane-auth.ts
8214
8218
  import { timingSafeEqual } from "crypto";
@@ -27617,13 +27621,96 @@ import { randomUUID as randomUUID3 } from "crypto";
27617
27621
  import { performance as performance2 } from "perf_hooks";
27618
27622
 
27619
27623
  // ../../twins/core/src/fixture-oracle.ts
27620
- import { existsSync as existsSync2, readdirSync as readdirSync2, readFileSync as readFileSync3 } from "fs";
27621
- import { dirname as dirname3, resolve as resolve3 } from "path";
27624
+ import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync5 } from "fs";
27625
+ import { dirname as dirname5, resolve as resolve5 } from "path";
27622
27626
  import { fileURLToPath as fileURLToPath3 } from "url";
27623
27627
 
27628
+ // ../../twins/core/src/legacy-asset-cache.ts
27629
+ import { createHash as createHash4 } from "crypto";
27630
+ import {
27631
+ existsSync as existsSync3,
27632
+ mkdirSync as mkdirSync2,
27633
+ readFileSync as readFileSync4,
27634
+ renameSync as renameSync3,
27635
+ writeFileSync as writeFileSync3
27636
+ } from "fs";
27637
+ import { homedir as homedir2 } from "os";
27638
+ import { dirname as dirname4, relative as relative2, resolve as resolve4 } from "path";
27639
+
27640
+ // ../../twins/core/src/recording-fetcher.ts
27641
+ import { createHash as createHash3 } from "crypto";
27642
+ import {
27643
+ existsSync as existsSync2,
27644
+ mkdirSync,
27645
+ readFileSync as readFileSync3,
27646
+ renameSync as renameSync2,
27647
+ statSync,
27648
+ writeFileSync as writeFileSync2
27649
+ } from "fs";
27650
+ import { homedir } from "os";
27651
+ import { dirname as dirname3, resolve as resolve3 } from "path";
27652
+ var RecordingManifestEntrySchema = external_exports3.object({
27653
+ filename: external_exports3.string(),
27654
+ sha256: external_exports3.string().regex(/^[0-9a-f]{64}$/, "sha256 must be 64 lowercase hex chars"),
27655
+ size: external_exports3.number().optional(),
27656
+ sizeBytes: external_exports3.number().optional(),
27657
+ uploadedAt: external_exports3.string().optional(),
27658
+ // Optional symbolic tags that map fixture-oracle / replay lookups onto this
27659
+ // recording. Lets twins keep tag→file resolution inside the manifest itself
27660
+ // rather than depending on a separate provenance.json (which is excluded
27661
+ // from the in-tree fixture allowlist for graduated twins). Codex P2 on
27662
+ // tavily #3603 — fixture-oracle previously required provenance.json to
27663
+ // resolve `rest-profile:tavily:tavily_search_basic` → filename.
27664
+ tags: external_exports3.array(external_exports3.string()).optional()
27665
+ }).loose();
27666
+ var RecordingManifestSchema = external_exports3.object({
27667
+ service: external_exports3.string().min(1),
27668
+ version: external_exports3.number().int(),
27669
+ container: external_exports3.string().min(1),
27670
+ baseUrl: external_exports3.string().optional(),
27671
+ entries: external_exports3.array(RecordingManifestEntrySchema)
27672
+ }).loose();
27673
+ var DEFAULT_BASE_URL = process.env["ARCHAL_FIXTURE_BASE_URL"] ?? "https://archalforge8f96908966.blob.core.windows.net/archal-fixture-artifacts?sv=2023-11-03&spr=https&se=2031-05-10T00%3A00%3A00Z&sr=c&sp=rl&sig=r3%2FC3EwzilSHls8z3Pn5ZR%2BkinwQw1C6%2BDKObIZSIu0%3D";
27674
+ var DEFAULT_CACHE_ROOT = process.env["ARCHAL_FIXTURE_CACHE_ROOT"] ?? resolve3(homedir(), ".archal", "forge", "recordings-cache");
27675
+ function warnIfSasExpiresSoon(baseUrl) {
27676
+ if (process.env["ARCHAL_FIXTURE_SAS_WARN"] === "0") return;
27677
+ const queryIdx = baseUrl.indexOf("?");
27678
+ if (queryIdx < 0) return;
27679
+ const query = baseUrl.slice(queryIdx + 1);
27680
+ const seParam = query.split("&").find((p) => p.startsWith("se="));
27681
+ if (!seParam) return;
27682
+ const seValue = decodeURIComponent(seParam.slice(3));
27683
+ const expiresAt = Date.parse(seValue);
27684
+ if (Number.isNaN(expiresAt)) return;
27685
+ const now2 = Date.now();
27686
+ const daysRemaining = Math.floor((expiresAt - now2) / (1e3 * 60 * 60 * 24));
27687
+ if (daysRemaining < 365) {
27688
+ console.warn(
27689
+ `[recording-fetcher] SAS token in ARCHAL_FIXTURE_BASE_URL expires in ${daysRemaining}d (${seValue}). Rotate via scripts/rotate-fixture-sas.mjs before expiry.`
27690
+ );
27691
+ }
27692
+ }
27693
+ warnIfSasExpiresSoon(DEFAULT_BASE_URL);
27694
+
27695
+ // ../../twins/core/src/legacy-asset-cache.ts
27696
+ var DEFAULT_CACHE_ROOT2 = process.env["ARCHAL_LEGACY_ASSET_CACHE_ROOT"] ?? resolve4(homedir2(), ".archal", "forge", "legacy-assets-cache");
27697
+ var LegacyAssetEntrySchema = external_exports3.object({
27698
+ relativePath: external_exports3.string().min(1),
27699
+ sha256: external_exports3.string().regex(/^[0-9a-f]{64}$/, "sha256 must be 64 lowercase hex chars"),
27700
+ sizeBytes: external_exports3.number().optional(),
27701
+ uploadedAt: external_exports3.string().optional()
27702
+ }).loose();
27703
+ var LegacyAssetManifestSchema = external_exports3.object({
27704
+ service: external_exports3.string().min(1),
27705
+ version: external_exports3.number().int(),
27706
+ container: external_exports3.string().min(1),
27707
+ layout: external_exports3.string().optional(),
27708
+ entries: external_exports3.array(LegacyAssetEntrySchema)
27709
+ }).loose();
27710
+
27624
27711
  // ../../twins/core/src/run-twin-cli.ts
27625
- import { accessSync, constants, realpathSync, statSync } from "fs";
27626
- import { resolve as resolve4 } from "path";
27712
+ import { accessSync, constants, realpathSync, statSync as statSync2 } from "fs";
27713
+ import { resolve as resolve6 } from "path";
27627
27714
 
27628
27715
  // ../../twins/manifest.json
27629
27716
  var manifest_default = [
@@ -27674,6 +27761,12 @@ var manifest_default = [
27674
27761
  package: "@archal/twin-firecrawl",
27675
27762
  path: "twins/firecrawl",
27676
27763
  stage: "internal",
27764
+ display: {
27765
+ icon: "FC",
27766
+ name: "Firecrawl",
27767
+ description: "Scraping, crawling, mapping, search, and extraction.",
27768
+ toolCount: 6
27769
+ },
27677
27770
  transport: "rest",
27678
27771
  hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
27679
27772
  cli: { bundleAssets: false, bundleToolSnapshot: false },
@@ -27741,6 +27834,12 @@ var manifest_default = [
27741
27834
  package: "@archal/twin-hubspot",
27742
27835
  path: "twins/hubspot",
27743
27836
  stage: "internal",
27837
+ display: {
27838
+ icon: "HS",
27839
+ name: "HubSpot",
27840
+ description: "CRM contacts, companies, deals, tickets, and engagements.",
27841
+ toolCount: 45
27842
+ },
27744
27843
  transport: "rest",
27745
27844
  hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
27746
27845
  cli: { bundleAssets: false, bundleToolSnapshot: false },
@@ -27817,6 +27916,12 @@ var manifest_default = [
27817
27916
  package: "@archal/twin-sendgrid",
27818
27917
  path: "twins/sendgrid",
27819
27918
  stage: "internal",
27919
+ display: {
27920
+ icon: "SG",
27921
+ name: "SendGrid",
27922
+ description: "Mail send, contacts, lists, templates, and stats.",
27923
+ toolCount: 28
27924
+ },
27820
27925
  transport: "rest",
27821
27926
  hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
27822
27927
  cli: { bundleAssets: false, bundleToolSnapshot: false },
@@ -27913,6 +28018,12 @@ var manifest_default = [
27913
28018
  package: "@archal/twin-telegram",
27914
28019
  path: "twins/telegram",
27915
28020
  stage: "internal",
28021
+ display: {
28022
+ icon: "TG",
28023
+ name: "Telegram",
28024
+ description: "Bot messages, chats, updates, and webhooks.",
28025
+ toolCount: 32
28026
+ },
27916
28027
  transport: "both",
27917
28028
  hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
27918
28029
  cli: { bundleAssets: false, bundleToolSnapshot: false },
@@ -27925,6 +28036,12 @@ var manifest_default = [
27925
28036
  package: "@archal/twin-twilio",
27926
28037
  path: "twins/twilio",
27927
28038
  stage: "internal",
28039
+ display: {
28040
+ icon: "TW",
28041
+ name: "Twilio",
28042
+ description: "Messages, calls, phone numbers, and verifications.",
28043
+ toolCount: 35
28044
+ },
27928
28045
  transport: "rest",
27929
28046
  hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
27930
28047
  cli: { bundleAssets: false, bundleToolSnapshot: false },
@@ -27937,6 +28054,12 @@ var manifest_default = [
27937
28054
  package: "@archal/twin-unipile",
27938
28055
  path: "twins/unipile",
27939
28056
  stage: "internal",
28057
+ display: {
28058
+ icon: "UP",
28059
+ name: "Unipile",
28060
+ description: "LinkedIn and email messaging, accounts, and chats.",
28061
+ toolCount: 24
28062
+ },
27940
28063
  transport: "rest",
27941
28064
  hostedRuntime: { enabled: true, requiresDist: true, requiresEmptySeed: true },
27942
28065
  cli: { bundleAssets: false, bundleToolSnapshot: false },
@@ -27955,7 +28078,7 @@ var CLONE_PACKAGES = CLONE_MANIFEST.map((t) => t.package);
27955
28078
  var TWIN_PREFIX_PATTERN = new RegExp(`^(${CLONE_NAMES.join("|")})_`, "i");
27956
28079
 
27957
28080
  // ../../twins/core/src/session-run-id.ts
27958
- import { createHash as createHash3 } from "crypto";
28081
+ import { createHash as createHash5 } from "crypto";
27959
28082
 
27960
28083
  // ../../twins/core/src/webhook-signing.ts
27961
28084
  import { createHmac, timingSafeEqual as timingSafeEqual2 } from "crypto";
@@ -28096,61 +28219,6 @@ var SCENARIO_RISK_TAXONOMY = SCENARIO_RISK_RULES.map(
28096
28219
  ({ id, label, description }) => ({ id, label, description })
28097
28220
  );
28098
28221
 
28099
- // ../../twins/core/src/recording-fetcher.ts
28100
- import { createHash as createHash4 } from "crypto";
28101
- import {
28102
- existsSync as existsSync3,
28103
- mkdirSync,
28104
- readFileSync as readFileSync4,
28105
- renameSync as renameSync2,
28106
- statSync as statSync2,
28107
- writeFileSync as writeFileSync2
28108
- } from "fs";
28109
- import { homedir } from "os";
28110
- import { dirname as dirname4, resolve as resolve5 } from "path";
28111
- var RecordingManifestEntrySchema = external_exports3.object({
28112
- filename: external_exports3.string(),
28113
- sha256: external_exports3.string().regex(/^[0-9a-f]{64}$/, "sha256 must be 64 lowercase hex chars"),
28114
- size: external_exports3.number().optional(),
28115
- sizeBytes: external_exports3.number().optional(),
28116
- uploadedAt: external_exports3.string().optional(),
28117
- // Optional symbolic tags that map fixture-oracle / replay lookups onto this
28118
- // recording. Lets twins keep tag→file resolution inside the manifest itself
28119
- // rather than depending on a separate provenance.json (which is excluded
28120
- // from the in-tree fixture allowlist for graduated twins). Codex P2 on
28121
- // tavily #3603 — fixture-oracle previously required provenance.json to
28122
- // resolve `rest-profile:tavily:tavily_search_basic` → filename.
28123
- tags: external_exports3.array(external_exports3.string()).optional()
28124
- }).loose();
28125
- var RecordingManifestSchema = external_exports3.object({
28126
- service: external_exports3.string().min(1),
28127
- version: external_exports3.number().int(),
28128
- container: external_exports3.string().min(1),
28129
- baseUrl: external_exports3.string().optional(),
28130
- entries: external_exports3.array(RecordingManifestEntrySchema)
28131
- }).loose();
28132
- var DEFAULT_BASE_URL = process.env["ARCHAL_FIXTURE_BASE_URL"] ?? "https://archalforge8f96908966.blob.core.windows.net/archal-fixture-artifacts?sv=2023-11-03&spr=https&se=2031-05-10T00%3A00%3A00Z&sr=c&sp=rl&sig=r3%2FC3EwzilSHls8z3Pn5ZR%2BkinwQw1C6%2BDKObIZSIu0%3D";
28133
- var DEFAULT_CACHE_ROOT = process.env["ARCHAL_FIXTURE_CACHE_ROOT"] ?? resolve5(homedir(), ".archal", "forge", "recordings-cache");
28134
- function warnIfSasExpiresSoon(baseUrl) {
28135
- if (process.env["ARCHAL_FIXTURE_SAS_WARN"] === "0") return;
28136
- const queryIdx = baseUrl.indexOf("?");
28137
- if (queryIdx < 0) return;
28138
- const query = baseUrl.slice(queryIdx + 1);
28139
- const seParam = query.split("&").find((p) => p.startsWith("se="));
28140
- if (!seParam) return;
28141
- const seValue = decodeURIComponent(seParam.slice(3));
28142
- const expiresAt = Date.parse(seValue);
28143
- if (Number.isNaN(expiresAt)) return;
28144
- const now2 = Date.now();
28145
- const daysRemaining = Math.floor((expiresAt - now2) / (1e3 * 60 * 60 * 24));
28146
- if (daysRemaining < 365) {
28147
- console.warn(
28148
- `[recording-fetcher] SAS token in ARCHAL_FIXTURE_BASE_URL expires in ${daysRemaining}d (${seValue}). Rotate via scripts/rotate-fixture-sas.mjs before expiry.`
28149
- );
28150
- }
28151
- }
28152
- warnIfSasExpiresSoon(DEFAULT_BASE_URL);
28153
-
28154
28222
  // src/runtime/service-profiles.ts
28155
28223
  function unsupportedServiceMessage(unsupportedServices) {
28156
28224
  const supportedServices = listSharedRouteManifests().map((manifest) => manifest.service).sort();
@@ -28180,10 +28248,10 @@ function resolveArchalVitestServiceProfiles(services) {
28180
28248
  }
28181
28249
 
28182
28250
  // src/runtime/hosted-session-provider.ts
28183
- import { createHash as createHash6, randomUUID as randomUUID4 } from "crypto";
28251
+ import { createHash as createHash7, randomUUID as randomUUID4 } from "crypto";
28184
28252
  import { spawn } from "child_process";
28185
28253
  import { promises as fs } from "fs";
28186
- import { join, resolve as resolve6 } from "path";
28254
+ import { join, resolve as resolve7 } from "path";
28187
28255
  import { tmpdir } from "os";
28188
28256
 
28189
28257
  // src/url-resolution.ts
@@ -28233,15 +28301,15 @@ function toSafeCoordinatorDirectoryName(sessionKey) {
28233
28301
  return sessionKey;
28234
28302
  }
28235
28303
  const slug = sessionKey.replace(/[^a-zA-Z0-9._-]+/g, "-").replace(/^[.-]+|[.-]+$/g, "").slice(0, 48);
28236
- const hash2 = createHash6("sha256").update(sessionKey).digest("hex").slice(0, 12);
28304
+ const hash2 = createHash7("sha256").update(sessionKey).digest("hex").slice(0, 12);
28237
28305
  return `${slug || "session"}-${hash2}`;
28238
28306
  }
28239
28307
  function resolveCoordinatorPaths(config2) {
28240
- const baseDirectory = resolve6(
28308
+ const baseDirectory = resolve7(
28241
28309
  trimEnv("ARCHAL_VITEST_COORDINATOR_DIR") ?? join(tmpdir(), "archal-vitest")
28242
28310
  );
28243
28311
  const sessionKey = config2.sessionKey ?? `${config2.projectName}-${randomUUID4()}`;
28244
- const directory = resolve6(baseDirectory, toSafeCoordinatorDirectoryName(sessionKey));
28312
+ const directory = resolve7(baseDirectory, toSafeCoordinatorDirectoryName(sessionKey));
28245
28313
  return {
28246
28314
  directory,
28247
28315
  lockDirectory: join(directory, "lock"),
@@ -29167,11 +29235,11 @@ async function buildRuntimeConfig(scope) {
29167
29235
  };
29168
29236
  scope[GLOBAL_SESSION_KEY] = redactSessionSnapshot(session);
29169
29237
  try {
29170
- const { writeFileSync: writeFileSync3, mkdirSync: mkdirSync2 } = await import("fs");
29171
- const { dirname: dirname5 } = await import("path");
29238
+ const { writeFileSync: writeFileSync4, mkdirSync: mkdirSync3 } = await import("fs");
29239
+ const { dirname: dirname6 } = await import("path");
29172
29240
  const sessionIdPath = getSessionIdFilePath(config2.sessionKey);
29173
- mkdirSync2(dirname5(sessionIdPath), { recursive: true });
29174
- writeFileSync3(sessionIdPath, session.sessionId, "utf-8");
29241
+ mkdirSync3(dirname6(sessionIdPath), { recursive: true });
29242
+ writeFileSync4(sessionIdPath, session.sessionId, "utf-8");
29175
29243
  } catch {
29176
29244
  }
29177
29245
  return {