@outerlayer/cli 0.8.0 → 0.8.2

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 (91) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +27 -9
  3. package/dist/{agent-setup-C7PLRXZO.js → agent-setup-C5X4356W.js} +10 -10
  4. package/dist/{build-MS34XEGN.js → build-3FSJR5OO.js} +1 -1
  5. package/dist/build-info.json +1 -1
  6. package/dist/{builder-G52A6GW2.js → builder-QZA2Z3M3.js} +3 -3
  7. package/dist/{check-FOF3PUKI.js → check-HQHFAOXW.js} +30 -29
  8. package/dist/{chunk-R7STSBLC.js → chunk-2E2MG3KW.js} +1 -1
  9. package/dist/{chunk-OD2VTIHN.js → chunk-2FWL7CE2.js} +3 -2
  10. package/dist/{chunk-K35RW5HP.js → chunk-33GOCSRO.js} +4 -4
  11. package/dist/{chunk-4A5E2G4E.js → chunk-3J476JZC.js} +11 -11
  12. package/dist/{chunk-MQ3IPHIZ.js → chunk-47RS42OZ.js} +6 -3
  13. package/dist/{chunk-3S4P55NE.js → chunk-4ZZR5SKG.js} +3 -3
  14. package/dist/{chunk-PWBILI5P.js → chunk-7KI224YS.js} +1 -1
  15. package/dist/{chunk-5TNS3PL7.js → chunk-CLURXEWV.js} +4 -3
  16. package/dist/{chunk-7ZR5UPMB.js → chunk-CMFCCIQN.js} +167 -1
  17. package/dist/{chunk-AX23QKHS.js → chunk-CRLAB4PM.js} +1 -1
  18. package/dist/{chunk-CM5QTKM4.js → chunk-EQG7L6LM.js} +311 -29
  19. package/dist/{chunk-OEK4JEB3.js → chunk-ERI5GBNI.js} +18 -3
  20. package/dist/{chunk-ILEA3YHM.js → chunk-EWBM2USM.js} +2 -2
  21. package/dist/{chunk-EV3M3EH7.js → chunk-G54QHBTI.js} +2 -2
  22. package/dist/{chunk-M3SQ4YGD.js → chunk-GXSMDL4M.js} +1 -1
  23. package/dist/{chunk-GAYWY4GI.js → chunk-HN2JBGSI.js} +2 -1
  24. package/dist/{chunk-ZOAEPWGL.js → chunk-HWMYGAKF.js} +1 -1
  25. package/dist/chunk-I2UOAV7X.js +133 -0
  26. package/dist/{chunk-ABIWDUMS.js → chunk-IS4DIGBQ.js} +13 -1
  27. package/dist/{chunk-WVGSB3Z2.js → chunk-J5DPVNL3.js} +2 -2
  28. package/dist/{chunk-VXLJORHL.js → chunk-JXH6LEEH.js} +1 -1
  29. package/dist/{chunk-JPR2WHHF.js → chunk-KI7VPNKC.js} +1 -1
  30. package/dist/{chunk-TUUMW4TC.js → chunk-LSPJHYHM.js} +1 -1
  31. package/dist/{chunk-7VNURP6M.js → chunk-M2F2RAMK.js} +82 -26
  32. package/dist/{chunk-NALVDFIS.js → chunk-MJLUWGUD.js} +2 -2
  33. package/dist/{chunk-5FWNEQNZ.js → chunk-NACLOOXP.js} +5 -5
  34. package/dist/{chunk-U3GOI2B4.js → chunk-NPBLDMSD.js} +1 -1
  35. package/dist/{chunk-BOLTI6LR.js → chunk-PLMTLGYH.js} +1 -1
  36. package/dist/{chunk-IRCBTGWF.js → chunk-QJPO42VI.js} +6 -6
  37. package/dist/{chunk-5QLNZGAQ.js → chunk-R5SPFO6F.js} +6 -6
  38. package/dist/{chunk-M5POMKKW.js → chunk-V7NIVOFD.js} +5 -5
  39. package/dist/{chunk-IJBVPLZZ.js → chunk-VUGDEUMM.js} +71 -143
  40. package/dist/{chunk-4ACZCY4I.js → chunk-WMPO3SKK.js} +3 -3
  41. package/dist/{chunk-TTNFGMHO.js → chunk-Y7UQHKFY.js} +19 -1
  42. package/dist/{chunk-BCLJSQCV.js → chunk-YO4PSLVB.js} +1 -1
  43. package/dist/{chunk-AIL2R4SI.js → chunk-YU4Z2O3W.js} +5 -5
  44. package/dist/{chunk-ZZXLM64C.js → chunk-ZJ3WRVRG.js} +1 -1
  45. package/dist/{cli-AOJPAVFX.js → cli-OWM54BIU.js} +120 -93
  46. package/dist/{command-SY3SVLAI.js → command-LIHTWJHQ.js} +31 -25
  47. package/dist/{config-Z3USDBLU.js → config-OOBPCY7Q.js} +2 -2
  48. package/dist/{connect-cmd-PNZ6IJLJ.js → connect-cmd-NV7WVBY7.js} +3 -3
  49. package/dist/{context-adopt-CE4KDXS3.js → context-adopt-PPCNSN5D.js} +7 -7
  50. package/dist/{context-materialize-QL33HDJN.js → context-materialize-YR3JQCUF.js} +7 -7
  51. package/dist/{dist-3ZTZF2TP.js → dist-2LNAXGPZ.js} +1 -1
  52. package/dist/{docker-676FD3CQ.js → docker-RSALMGPL.js} +4 -4
  53. package/dist/{doctor-WR6TRPSU.js → doctor-PKT42NOJ.js} +59 -25
  54. package/dist/{emit-artifact-cmd-AVM4YXMQ.js → emit-artifact-cmd-BZYXRBCV.js} +8 -8
  55. package/dist/{emit-cmd-2QRMYPYO.js → emit-cmd-IRYNFHPM.js} +3 -3
  56. package/dist/{emit-criteria-cmd-LDBE4YDS.js → emit-criteria-cmd-PSZYZ32B.js} +6 -6
  57. package/dist/{emit-finding-cmd-6R5WBPCH.js → emit-finding-cmd-VTSYDJYZ.js} +6 -6
  58. package/dist/{emit-result-cmd-2DMN6O6U.js → emit-result-cmd-5P7ZFWMZ.js} +8 -8
  59. package/dist/{exec-client-NPYNUAF3.js → exec-client-2UX6NHAO.js} +3 -3
  60. package/dist/{guest-init-JWNNAH2H.js → guest-init-VHQNFCFS.js} +3 -3
  61. package/dist/{hook-fast-XBOZ3N6L.js → hook-fast-OCHVQZTU.js} +1 -1
  62. package/dist/{host-key-KDYZ5ECC.js → host-key-YMLXY6QB.js} +1 -1
  63. package/dist/{import-capture-cmd-T4556ELW.js → import-capture-cmd-2QFLZQFY.js} +3 -3
  64. package/dist/{import-ruler-cmd-SG3UVGI7.js → import-ruler-cmd-BD22GUJS.js} +1 -1
  65. package/dist/index.js +3 -3
  66. package/dist/{init-R2FJ5KNS.js → init-CY4IMZE4.js} +22 -22
  67. package/dist/{init-KDK5QLQZ.js → init-TQUN5RF7.js} +20 -20
  68. package/dist/{init-cmd-BYZYAJ5P.js → init-cmd-F4TZXQJH.js} +11 -11
  69. package/dist/{install-FHTVJZS6.js → install-C33LT5KQ.js} +3 -3
  70. package/dist/{install-cmd-DCF7TVXD.js → install-cmd-5HYMXLEW.js} +2 -1
  71. package/dist/{loop-AG3PLXPO.js → loop-NZP5FAC3.js} +30 -29
  72. package/dist/{machine-LV6WBRRK.js → machine-RUSNVLKO.js} +19 -19
  73. package/dist/{mcp-install-cmd-RLK4SO3N.js → mcp-install-cmd-4AQMSIGY.js} +1 -1
  74. package/dist/{mcp-serve-cmd-N6UD2KBX.js → mcp-serve-cmd-3KVYEUXG.js} +3 -3
  75. package/dist/{real-deps-SU24ZA2K.js → real-deps-TK6JMQSW.js} +3 -2
  76. package/dist/{session-sender-Q5HAMOL2.js → session-sender-EECVKXTC.js} +7 -7
  77. package/dist/{starter-pack-MUXMAU4S.js → starter-pack-VNWPYP5U.js} +3 -3
  78. package/dist/{status-HH4OSOHR.js → status-KCONQLOD.js} +31 -25
  79. package/dist/{sync-cmd-CAEPJR7B.js → sync-cmd-R54ZBHXX.js} +6 -6
  80. package/dist/{watch-LAAZFBHH.js → watch-YTFNBO3S.js} +6 -6
  81. package/dist/{work-claim-cmd-ARIYZARE.js → work-claim-cmd-HRPJ4VUF.js} +10 -10
  82. package/dist/{work-cmd-B3FOXZAL.js → work-cmd-W4GQUUBC.js} +7 -7
  83. package/dist/{work-comment-cmd-O5WGRI6K.js → work-comment-cmd-DDZ4SZ35.js} +7 -7
  84. package/dist/{work-open-pr-cmd-M6CQW7KW.js → work-open-pr-cmd-GXULDTSC.js} +8 -8
  85. package/dist/{work-pr-cmd-C4YEGKD6.js → work-pr-cmd-T6SU4TYN.js} +7 -7
  86. package/package.json +2 -2
  87. package/skill-pack/maintained/amend/SKILL.md +22 -6
  88. package/skill-pack/maintained/outerlayer/SKILL.md +12 -2
  89. package/skill-pack/maintained/outerlayer/references/open-pull-request.md +29 -0
  90. package/skill-pack/template/build/SKILL.md +3 -2
  91. package/skill-pack/template/build/references/release.md +11 -2
@@ -0,0 +1,133 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+
4
+ createRequire(import.meta.url);
5
+
6
+ // src/runner/update/version-order.ts
7
+ function parse(version) {
8
+ const match = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(version);
9
+ if (match === null) return void 0;
10
+ return { core: [Number(match[1]), Number(match[2]), Number(match[3])], pre: match[4] };
11
+ }
12
+ function comparePre(a, b) {
13
+ const left = a.split(".");
14
+ const right = b.split(".");
15
+ for (let i = 0; i < Math.max(left.length, right.length); i++) {
16
+ const x = left[i];
17
+ const y = right[i];
18
+ if (x === void 0) return -1;
19
+ if (y === void 0) return 1;
20
+ const xNum = /^\d+$/.test(x);
21
+ const yNum = /^\d+$/.test(y);
22
+ if (xNum && yNum) {
23
+ const difference = Number(x) - Number(y);
24
+ if (difference !== 0) return Math.sign(difference);
25
+ } else if (xNum !== yNum) {
26
+ return xNum ? -1 : 1;
27
+ } else if (x < y) {
28
+ return -1;
29
+ } else if (x > y) {
30
+ return 1;
31
+ }
32
+ }
33
+ return 0;
34
+ }
35
+ function compareVersions(a, b) {
36
+ const left = parse(a);
37
+ const right = parse(b);
38
+ if (left === void 0 || right === void 0) return void 0;
39
+ for (let i = 0; i < 3; i++) {
40
+ const difference = left.core[i] - right.core[i];
41
+ if (difference !== 0) return Math.sign(difference);
42
+ }
43
+ if (left.pre === right.pre) return 0;
44
+ if (left.pre === void 0) return 1;
45
+ if (right.pre === void 0) return -1;
46
+ return comparePre(left.pre, right.pre);
47
+ }
48
+ function compareCores(a, b) {
49
+ for (let i = 0; i < 3; i++) {
50
+ const difference = a[i] - b[i];
51
+ if (difference !== 0) return Math.sign(difference);
52
+ }
53
+ return 0;
54
+ }
55
+ function parsePartial(text) {
56
+ if (text === "" || text === "*" || text === "x" || text === "X") return [];
57
+ const match = /^v?(\d+|[xX*])(?:\.(\d+|[xX*]))?(?:\.(\d+|[xX*]))?$/.exec(text);
58
+ if (match === null) return void 0;
59
+ const numbers = [];
60
+ for (const part of [match[1], match[2], match[3]]) {
61
+ if (part === void 0 || !/^\d+$/.test(part)) break;
62
+ numbers.push(Number(part));
63
+ }
64
+ return numbers;
65
+ }
66
+ function bumpLast(numbers) {
67
+ const core = [numbers[0] ?? 0, numbers[1] ?? 0, numbers[2] ?? 0];
68
+ const last = numbers.length - 1;
69
+ core[last] = core[last] + 1;
70
+ for (let i = last + 1; i < 3; i++) core[i] = 0;
71
+ return core;
72
+ }
73
+ function fill(numbers) {
74
+ return [numbers[0] ?? 0, numbers[1] ?? 0, numbers[2] ?? 0];
75
+ }
76
+ function meets(version, comparator) {
77
+ const match = /^(>=|<=|>|<|=|\^|~)?(.*)$/.exec(comparator);
78
+ const op = match[1] ?? "";
79
+ const numbers = parsePartial(match[2]);
80
+ if (numbers === void 0) return void 0;
81
+ if (numbers.length === 0) return op === "" || op === "=" || op === ">=" || op === "<=" ? true : void 0;
82
+ const low = fill(numbers);
83
+ const whole = numbers.length === 3;
84
+ switch (op) {
85
+ case ">=":
86
+ return compareCores(version, low) >= 0;
87
+ case ">":
88
+ return whole ? compareCores(version, low) > 0 : compareCores(version, bumpLast(numbers)) >= 0;
89
+ case "<":
90
+ return compareCores(version, low) < 0;
91
+ case "<=":
92
+ return whole ? compareCores(version, low) <= 0 : compareCores(version, bumpLast(numbers)) < 0;
93
+ case "~":
94
+ return compareCores(version, low) >= 0 && compareCores(version, bumpLast(numbers.slice(0, Math.min(numbers.length, 2)))) < 0;
95
+ case "^": {
96
+ let pivot = numbers.findIndex((n) => n !== 0);
97
+ if (pivot === -1) pivot = numbers.length - 1;
98
+ return compareCores(version, low) >= 0 && compareCores(version, bumpLast(numbers.slice(0, pivot + 1))) < 0;
99
+ }
100
+ default:
101
+ return compareCores(version, low) >= 0 && (whole ? compareCores(version, low) <= 0 : compareCores(version, bumpLast(numbers)) < 0);
102
+ }
103
+ }
104
+ function satisfiesRange(version, range) {
105
+ const parsed = parse(version.trim().replace(/^v/, ""));
106
+ if (parsed === void 0 || parsed.pre !== void 0) return void 0;
107
+ let anyUnreadable = false;
108
+ for (const alternative of range.split("||")) {
109
+ if (/\s-\s/.test(alternative)) {
110
+ anyUnreadable = true;
111
+ continue;
112
+ }
113
+ const comparators = alternative.trim().replace(/(>=|<=|>|<|=|\^|~)\s+/g, "$1").split(/\s+/).filter((c) => c !== "");
114
+ if (comparators.length === 0) comparators.push("*");
115
+ let all = true;
116
+ for (const comparator of comparators) {
117
+ const met = meets(parsed.core, comparator);
118
+ if (met === void 0) {
119
+ anyUnreadable = true;
120
+ all = false;
121
+ break;
122
+ }
123
+ if (!met) {
124
+ all = false;
125
+ break;
126
+ }
127
+ }
128
+ if (all) return true;
129
+ }
130
+ return anyUnreadable ? void 0 : false;
131
+ }
132
+
133
+ export { compareVersions, satisfiesRange };
@@ -6,6 +6,18 @@ import { join, dirname } from 'path';
6
6
  import { createHash } from 'crypto';
7
7
 
8
8
  createRequire(import.meta.url);
9
+
10
+ // src/runner/update/installed-switch.ts
11
+ function decideInstalledSwitch(input) {
12
+ const to = input.current;
13
+ if (to === void 0 || to === input.own || !input.fromCurrent) return { kind: "none" };
14
+ if (!input.installed) return { kind: "missing", to };
15
+ if (!input.underService) return { kind: "foreground", to };
16
+ return { kind: "restart", to };
17
+ }
18
+ function startedByService(env, parentPid) {
19
+ return (env.INVOCATION_ID ?? "") !== "" && parentPid === 1;
20
+ }
9
21
  var REGISTRY_URL = "https://registry.npmjs.org";
10
22
  var PACKAGE_NAME = "@outerlayer/cli";
11
23
  var PACKAGE_PATH = "@outerlayer%2fcli";
@@ -101,4 +113,4 @@ async function auditSignatures(runNpm, dir) {
101
113
  return { ok: true };
102
114
  }
103
115
 
104
- export { auditSignatures, fetchProvenance, fetchTarballDigest, fetchVersionMeta, installVersion, npmSupportsProvenance, npmVersion, realRunNode, realRunNpm };
116
+ export { auditSignatures, decideInstalledSwitch, fetchProvenance, fetchTarballDigest, fetchVersionMeta, installVersion, npmSupportsProvenance, npmVersion, realRunNode, realRunNpm, startedByService };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { EXEC_PORT } from './chunk-R7STSBLC.js';
4
- import { RELAY_PORT } from './chunk-OD2VTIHN.js';
3
+ import { EXEC_PORT } from './chunk-2E2MG3KW.js';
4
+ import { RELAY_PORT } from './chunk-2FWL7CE2.js';
5
5
  import { spawn, spawnSync } from 'child_process';
6
6
  import { writeFileSync, chmodSync, mkdirSync } from 'fs';
7
7
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { splitRawFile } from './chunk-7ZR5UPMB.js';
3
+ import { splitRawFile } from './chunk-CMFCCIQN.js';
4
4
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
5
5
  import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from 'fs';
6
6
  import { join, dirname } from 'path';
@@ -628,7 +628,7 @@ async function runHookFast(event, home = homeFromEnv(), read = readStdin, env =
628
628
  recordHookErrorsSeen(home, hookErrorsBytes);
629
629
  if (contextPossiblyGoverned(sessionCwd, home)) {
630
630
  try {
631
- const { materializeContext: materialize } = await import('./context-materialize-QL33HDJN.js');
631
+ const { materializeContext: materialize } = await import('./context-materialize-YR3JQCUF.js');
632
632
  const sessionId = typeof payload.session_id === "string" ? payload.session_id : "unknown";
633
633
  const result = await materialize({ cwd: sessionCwd, sessionId, home });
634
634
  materializeMessage = result.message;
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { MIN_ENGINE_MAJOR } from './chunk-CM5QTKM4.js';
3
+ import { MIN_ENGINE_MAJOR } from './chunk-EQG7L6LM.js';
4
4
  import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-CX22S5BA.js';
5
5
  import { spawnSync } from 'child_process';
6
6
  import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
@@ -1,27 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { writeJobFile, readJobFile } from './chunk-T6OIJQRT.js';
4
- import { senderPidfile } from './chunk-3S4P55NE.js';
5
- import { DOCKERD_LOG } from './chunk-WVGSB3Z2.js';
6
- import { installScrubContext } from './chunk-AIL2R4SI.js';
7
- import { AssetError, describeCallFailure, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createBuildDisk, machineConfig, refusalCode, resolveAgentUser, AgentUserError, runBuildSteps, removeStagedContext, stageGovernedContext, shellQuote, createRunnerLog, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, formatDuration, retrySend, formatClock, containerSenderCommand, syncInContainer, GH_CONFIG_YML, ghHostsYml, ADDED_USER, isLiteralAddress, signalInContainer, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, senderSignalScript } from './chunk-CM5QTKM4.js';
8
- import { readBranchHead, fetchCommit } from './chunk-TTNFGMHO.js';
4
+ import { senderPidfile } from './chunk-4ZZR5SKG.js';
5
+ import { DOCKERD_LOG } from './chunk-J5DPVNL3.js';
6
+ import { installScrubContext } from './chunk-YU4Z2O3W.js';
7
+ import { AssetError, describeCallFailure, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createBuildDisk, machineConfig, refusalCode, resolveAgentUser, AgentUserError, runBuildSteps, removeStagedContext, stageGovernedContext, shellQuote, createRunnerLog, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, formatDuration, retrySend, formatClock, containerSenderCommand, syncInContainer, copyTranscriptsFromContainer, GH_CONFIG_YML, ghHostsYml, ADDED_USER, isLiteralAddress, signalInContainer, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript } from './chunk-EQG7L6LM.js';
8
+ import { readBranchHead, diffBetween, fetchCommit } from './chunk-Y7UQHKFY.js';
9
9
  import { isSameProcess, startTimeOf } from './chunk-N5FOE5PS.js';
10
- import { childEnvironment } from './chunk-U3GOI2B4.js';
10
+ import { childEnvironment } from './chunk-NPBLDMSD.js';
11
11
  import { CLAUDE_CODE_VERSION } from './chunk-CX22S5BA.js';
12
- import { waitForAgent, vmExecArgs } from './chunk-ZOAEPWGL.js';
13
- import { socketPathProblem, vsockLinks, linkVsockSockets } from './chunk-R7STSBLC.js';
14
- import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-5QLNZGAQ.js';
12
+ import { waitForAgent, vmExecArgs } from './chunk-HWMYGAKF.js';
13
+ import { socketPathProblem, vsockLinks, linkVsockSockets } from './chunk-2E2MG3KW.js';
14
+ import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-R5SPFO6F.js';
15
15
  import { planArtifactUpload } from './chunk-ZYHKJKSU.js';
16
- import { scrubText } from './chunk-GAYWY4GI.js';
17
- import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-PWBILI5P.js';
16
+ import { scrubText } from './chunk-HN2JBGSI.js';
17
+ import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-7KI224YS.js';
18
18
  import { parseSize } from './chunk-7RQ73DLO.js';
19
- import { claudeCredential, buildEnvironment, JOB_MOUNT, CHECKOUT_DIR, parseIsolation, proxyEnvironment, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, startBuildServices, BUILT_IN_NAMES, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, withTunnelRecord, RELAY_PORT, checkEnvironment } from './chunk-OD2VTIHN.js';
19
+ import { claudeCredential, buildEnvironment, JOB_MOUNT, CHECKOUT_DIR, parseIsolation, proxyEnvironment, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, startBuildServices, BUILT_IN_NAMES, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, withTunnelRecord, RELAY_PORT, checkEnvironment, EVAL_INPUT_DIR } from './chunk-2FWL7CE2.js';
20
20
  import { withHooksPath, authorEnvironment, commitIdentityRecord } from './chunk-HKMPVPO7.js';
21
- import { parsePolicy } from './chunk-7ZR5UPMB.js';
21
+ import { parsePolicy } from './chunk-CMFCCIQN.js';
22
22
  import { readCloudConfig } from './chunk-EABW6AJQ.js';
23
23
  import { resolveVersion } from './chunk-RA3O54FC.js';
24
- import { signerFor } from './chunk-M5POMKKW.js';
24
+ import { signerFor } from './chunk-V7NIVOFD.js';
25
25
  import { runnerDir, buildDir, vsockPath, RUNNER_FILE_MODE } from './chunk-ZM2IMMYN.js';
26
26
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
27
27
  import { spawn, spawnSync } from 'child_process';
@@ -43,6 +43,9 @@ var DOCKER_LOG_LINES = 20;
43
43
  var GUEST_GH_DIR = `${JOB_MOUNT}/gh`;
44
44
  var GUEST_HOOKS_DIR = `${JOB_MOUNT}/git-hooks`;
45
45
  var GUEST_CONTEXT_DIR = `${JOB_MOUNT}/context`;
46
+ function buildMemoryBytes(config) {
47
+ return parseSize(config.build?.memory ?? DEFAULT_MEMORY) ?? parseSize(DEFAULT_MEMORY);
48
+ }
46
49
  function firstLine(text2) {
47
50
  return text2.trim().split("\n")[0] ?? "";
48
51
  }
@@ -72,8 +75,8 @@ async function writeGuestGhConfig(runtime, state, token) {
72
75
  const result = await asRoot(runtime, state, ["/bin/sh", "-c", script], ghHostsYml(token));
73
76
  if (result.status !== 0) throw new Error(`writing gh's configuration in the guest failed (exit ${result.status}): ${firstLine(result.stderr)}`);
74
77
  }
75
- async function unpackIntoGuest(runtime, state, dir, target) {
76
- const script = `set -e; mkdir -p ${target}; tar -x --no-same-owner -C ${target}; chmod -R a+rX ${target}`;
78
+ async function unpackIntoGuest(runtime, state, dir, target, opts = {}) {
79
+ const script = opts.readOnly === true ? `set -e; rm -rf ${target}; mkdir -p ${target}; tar -x --no-same-owner -C ${target}; chmod -R a+rX,a-w ${target}` : `set -e; mkdir -p ${target}; tar -x --no-same-owner -C ${target}; chmod -R a+rX ${target}`;
77
80
  const result = await asRoot(runtime, state, ["/bin/sh", "-c", script], tarOf(dir));
78
81
  if (result.status !== 0) throw new Error(`unpacking into ${target} in the guest failed (exit ${result.status}): ${firstLine(result.stderr)}`);
79
82
  }
@@ -166,7 +169,7 @@ async function provisionMicroVm(input) {
166
169
  if (input.aborted()) return bail("", true);
167
170
  let imageConfig;
168
171
  try {
169
- state.rootfs = await ensureRootfs({ host: vm.rootfs, runnerDir: runnerDirPath, imageId: report.imageId });
172
+ state.rootfs = await ensureRootfs({ host: vm.rootfs, runnerDir: runnerDirPath, imageId: report.imageId, memoryBytes: buildMemoryBytes(config) });
170
173
  imageConfig = await vm.rootfs.imageConfig(report.imageId);
171
174
  } catch (err) {
172
175
  return bail(`the image could not be converted to a root disk: ${describeCallFailure(err)}`);
@@ -186,14 +189,14 @@ async function provisionMicroVm(input) {
186
189
  }
187
190
  const limits = {
188
191
  cpus: config.build?.cpus ?? DEFAULT_CPUS,
189
- memoryBytes: parseSize(config.build?.memory ?? DEFAULT_MEMORY) ?? parseSize(DEFAULT_MEMORY),
192
+ memoryBytes: buildMemoryBytes(config),
190
193
  diskBytes: parseSize(config.build?.disk ?? DEFAULT_DISK) ?? parseSize(DEFAULT_DISK)
191
194
  };
192
195
  const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: true });
193
196
  const configPath = join(buildDir2, "vm.json");
194
197
  try {
195
198
  linkVsockSockets({ buildDir: buildDir2, vsockPath: state.vsockPath, links });
196
- await createBuildDisk({ host: vm.rootfs, runnerDir: runnerDirPath, bytes: limits.diskBytes, dest: state.buildDisk });
199
+ await createBuildDisk({ host: vm.rootfs, runnerDir: runnerDirPath, bytes: limits.diskBytes, dest: state.buildDisk, memoryBytes: limits.memoryBytes });
197
200
  writeFileSync(
198
201
  configPath,
199
202
  JSON.stringify(
@@ -304,6 +307,7 @@ async function provisionMicroVm(input) {
304
307
  removeStagedContext: () => removeStagedContext(buildDir2)
305
308
  });
306
309
  if (!steps.ok) return bail(steps.reason, steps.aborted === true);
310
+ state.startCommit = steps.startCommit;
307
311
  return { ok: true, workdir: CHECKOUT_DIR, state, environment };
308
312
  }
309
313
  async function waitForDocker(runtime, state, agentUser, now) {
@@ -406,6 +410,10 @@ async function copyHookErrors(runtime, state, jobDir) {
406
410
  } catch {
407
411
  }
408
412
  }
413
+ async function copyTranscriptsFromMicroVm(runtime, state) {
414
+ if (!isRunning(runtime, state)) return { ok: false, reason: "the build's microVM is gone" };
415
+ return copyTranscripts((argv) => asRoot(runtime, state, argv));
416
+ }
409
417
  async function startCheckMicroVm(input) {
410
418
  const { config, runtime, job, jobDir, tokens, log } = input;
411
419
  const { vm } = runtime;
@@ -455,7 +463,7 @@ async function startCheckMicroVm(input) {
455
463
  }
456
464
  if (abandoned()) return fail(ABANDONED);
457
465
  try {
458
- state.rootfs = await ensureRootfs({ host: vm.rootfs, runnerDir: runnerDirPath, imageId: built.imageId });
466
+ state.rootfs = await ensureRootfs({ host: vm.rootfs, runnerDir: runnerDirPath, imageId: built.imageId, memoryBytes: buildMemoryBytes(config) });
459
467
  } catch (err) {
460
468
  return fail(`the image could not be converted to a root disk: ${describeCallFailure(err)}`);
461
469
  }
@@ -473,14 +481,14 @@ async function startCheckMicroVm(input) {
473
481
  if (abandoned()) return fail(ABANDONED);
474
482
  const limits = {
475
483
  cpus: config.build?.cpus ?? DEFAULT_CPUS,
476
- memoryBytes: parseSize(config.build?.memory ?? DEFAULT_MEMORY) ?? parseSize(DEFAULT_MEMORY),
484
+ memoryBytes: buildMemoryBytes(config),
477
485
  diskBytes: parseSize(config.build?.disk ?? DEFAULT_DISK) ?? parseSize(DEFAULT_DISK)
478
486
  };
479
487
  const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: false });
480
488
  const configPath = join(buildDir2, "vm.json");
481
489
  try {
482
490
  linkVsockSockets({ buildDir: buildDir2, vsockPath: state.vsockPath, links });
483
- await createBuildDisk({ host: vm.rootfs, runnerDir: runnerDirPath, bytes: limits.diskBytes, dest: state.buildDisk });
491
+ await createBuildDisk({ host: vm.rootfs, runnerDir: runnerDirPath, bytes: limits.diskBytes, dest: state.buildDisk, memoryBytes: limits.memoryBytes });
484
492
  writeFileSync(
485
493
  configPath,
486
494
  JSON.stringify(
@@ -520,10 +528,16 @@ async function startCheckMicroVm(input) {
520
528
  if (failed !== void 0) return fail(failed);
521
529
  if (abandoned()) return fail(ABANDONED);
522
530
  const env = checkEnvironment({ config, item: job.item, repository, hostEnv: runtime.hostEnv, containerEnv: built.containerEnv ?? {} });
531
+ const evalInput = { dir: join(checksDir, EVAL_INPUT_NAME), delivered: false };
532
+ const deliverEvalInput = async () => {
533
+ await unpackIntoGuest(runtime, state, evalInput.dir, EVAL_INPUT_DIR, { readOnly: true });
534
+ evalInput.delivered = true;
535
+ };
523
536
  return {
524
537
  ok: true,
525
538
  environment: {
526
539
  state,
540
+ evalInput: { dir: evalInput.dir, deliver: deliverEvalInput },
527
541
  exec: async (argv, workdir, opts) => {
528
542
  const ran = await vm.exec(state.vsockPath, { argv, user: agentUser, cwd: workdir, env: execEnvironment(state.imageEnv, env) });
529
543
  if (opts?.logPath !== void 0) appendFileSync(opts.logPath, ran.stdout + ran.stderr);
@@ -533,7 +547,9 @@ async function startCheckMicroVm(input) {
533
547
  try {
534
548
  await vm.firecracker.stop(state.firecracker);
535
549
  rmSync(state.vsockPath, { force: true });
536
- return await boot() === void 0;
550
+ if (await boot() !== void 0) return false;
551
+ if (evalInput.delivered) await deliverEvalInput();
552
+ return true;
537
553
  } catch {
538
554
  return false;
539
555
  }
@@ -782,10 +798,15 @@ function parseEvaluation(value) {
782
798
  }
783
799
  return { verdict, sentence: text(raw.sentence), waitingOn: raw.waitingOn, open };
784
800
  }
801
+ async function readWorkItem(config, item, fetchImpl) {
802
+ const { data } = await getJson(config.url, `/v1/work-items/${item}`, config.apiKey, config.appId, fetchImpl, await signerFor(config.configPath));
803
+ return data;
804
+ }
785
805
  async function readItemEvaluation(config, item, fetchImpl) {
786
806
  try {
787
- const { data } = await getJson(config.url, `/v1/work-items/${item}`, config.apiKey, config.appId, fetchImpl, await signerFor(config.configPath));
788
- return { ok: true, evaluation: parseEvaluation(fields(data).evaluation) };
807
+ const body = fields(await readWorkItem(config, item, fetchImpl));
808
+ const hasPullRequest = Array.isArray(body.pullRequests) ? body.pullRequests.length > 0 : void 0;
809
+ return { ok: true, evaluation: parseEvaluation(body.evaluation), hasPullRequest };
789
810
  } catch (err) {
790
811
  return { ok: false, reason: describeCallFailure(err) };
791
812
  }
@@ -803,6 +824,9 @@ function fit(prefix, parts) {
803
824
  }
804
825
  function decideFromEvaluation(read) {
805
826
  if (!read.ok) return { outcome: "incomplete", reason: fit("the item's status could not be read: ", [read.reason]) };
827
+ if (read.hasPullRequest === false) {
828
+ return { outcome: "incomplete", reason: "the build opened no pull request for the item" };
829
+ }
806
830
  const evaluation = read.evaluation;
807
831
  if (evaluation === void 0) return { outcome: "ok" };
808
832
  if (evaluation === null) return { outcome: "incomplete", reason: "the item has no evidence evaluation yet" };
@@ -1032,6 +1056,14 @@ async function runHostChecks(input) {
1032
1056
  const limitMinutes = config.checks?.timeLimitMinutes ?? DEFAULT_CHECK_TIME_LIMIT_MINUTES;
1033
1057
  const minutes = `${limitMinutes} ${limitMinutes === 1 ? "minute" : "minutes"}`;
1034
1058
  const environmentLog = join(jobDir, "checks", "environment.log");
1059
+ let transcripts = { ok: false, reason: "the runner holds no way to read the build's sessions" };
1060
+ if (deps.collectSessions !== void 0) {
1061
+ try {
1062
+ transcripts = await deps.collectSessions();
1063
+ } catch (err) {
1064
+ transcripts = { ok: false, reason: describeCallFailure(err) };
1065
+ }
1066
+ }
1035
1067
  if (job.microvm !== void 0) {
1036
1068
  if (deps.endBuildMicroVm === void 0) return await failAll("the runner has no way to stop the build's microVM, so no check environment was made");
1037
1069
  try {
@@ -1110,6 +1142,24 @@ async function runHostChecks(input) {
1110
1142
  }
1111
1143
  if (typeof settled === "string") return await failAll(settled);
1112
1144
  const ready = settled;
1145
+ try {
1146
+ await writeEvalInput({
1147
+ job,
1148
+ dir: ready.evalInput.dir,
1149
+ scratch,
1150
+ remote,
1151
+ readToken,
1152
+ branchHead: read.sha,
1153
+ transcripts,
1154
+ scrub: transcriptScrub(config, [config.apiKey, job.itemKey, readToken]),
1155
+ readWorkItem: () => readWorkItem(config, job.item, deps.fetchImpl),
1156
+ fetchDiff: deps.fetchDiff ?? ((input2) => diffBetween(input2)),
1157
+ log
1158
+ });
1159
+ await ready.evalInput.deliver();
1160
+ } catch (err) {
1161
+ return await failAll(`the checks' input could not be written: ${describeCallFailure(err)}`);
1162
+ }
1113
1163
  let usable = true;
1114
1164
  for (const check of checks) {
1115
1165
  if (!usable) {
@@ -1160,6 +1210,7 @@ async function runHostChecks(input) {
1160
1210
  writeJobFile(jobFilePath, job);
1161
1211
  }
1162
1212
  rmSync(scratch, { recursive: true, force: true });
1213
+ rmSync(join(jobDir, "checks", EVAL_INPUT_NAME), { recursive: true, force: true });
1163
1214
  if (existsSync(scratch)) log.error(`${tag} the checks' scratch directory could not be removed`);
1164
1215
  log.line(`${tag} checks done (${formatDuration(now().getTime() - startedMs)})`);
1165
1216
  }
@@ -1359,6 +1410,10 @@ function releaseScrub(config, home) {
1359
1410
  const secrets = [...headerVariables(config.build?.destinations), ...CLAUDE_CREDENTIAL_VARIABLES].map((name) => process.env[name] ?? "");
1360
1411
  return { literals: [...scrubList(merged?.literals), ...secrets], patterns: scrubList(merged?.patterns) };
1361
1412
  }
1413
+ function transcriptScrub(config, secrets) {
1414
+ const base = releaseScrub(config, homeFromEnv());
1415
+ return { literals: [...scrubList(base.literals), ...secrets.filter((secret) => secret !== void 0 && secret !== "")], patterns: scrubList(base.patterns) };
1416
+ }
1362
1417
  function stripUnsendableReasonChars(text2) {
1363
1418
  return text2.replace(/\u0000/g, "").replace(/\p{Cs}/gu, "");
1364
1419
  }
@@ -1668,6 +1723,7 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
1668
1723
  }
1669
1724
  await stopBuildMicroVm(vmBuild.runtime, vmBuild.state, jobDirPath);
1670
1725
  };
1726
+ const collectSessions = build !== void 0 ? () => copyTranscriptsFromContainer(build.runtime, build.state) : vmBuild !== void 0 ? () => copyTranscriptsFromMicroVm(vmBuild.runtime, vmBuild.state) : void 0;
1671
1727
  if (job.checkContainer !== void 0 && job.checksRan === true) {
1672
1728
  try {
1673
1729
  await cleanupContainer(deps.container ?? createContainerRuntime(), job.checkContainer);
@@ -1695,7 +1751,7 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
1695
1751
  config,
1696
1752
  job,
1697
1753
  jobDir: jobDirPath,
1698
- deps: { fetchImpl: deps.fetchImpl, runtime: deps.container ?? createContainerRuntime(), log, now: deps.now, endBuildMicroVm, ...deps.hostChecks }
1754
+ deps: { fetchImpl: deps.fetchImpl, runtime: deps.container ?? createContainerRuntime(), log, now: deps.now, endBuildMicroVm, collectSessions, ...deps.hostChecks }
1699
1755
  });
1700
1756
  } catch (err) {
1701
1757
  log.error(`${tag} the host's checks stopped: ${describeCallFailure(err)} \xB7 continuing`);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-TUUMW4TC.js';
4
- import { MIN_ENGINE_MAJOR } from './chunk-CM5QTKM4.js';
3
+ import { detectMachine, supportsContainerBuilds, reachDockerStep, describeMachineDocker, supportsMicroVmBuilds } from './chunk-LSPJHYHM.js';
4
+ import { MIN_ENGINE_MAJOR } from './chunk-EQG7L6LM.js';
5
5
  import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE } from './chunk-ZM2IMMYN.js';
6
6
  import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
7
7
  import { dirname } from 'path';
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { appendContextProvenance } from './chunk-ZJSNLVCE.js';
4
- import { readPin, pinExists, readBuildHold, readContextManifest, manifestFilesPresent, writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, SOURCE_CACHE_TTL_SUCCESS_MS, isLastCheckFresh, readDegraded, touchLastCheck, clearDegraded, writeContextManifest, writePinIfChanged, readSourceCache, isSourceCacheFresh } from './chunk-ZZXLM64C.js';
5
- import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-VXLJORHL.js';
6
- import { parseGoverns, normalizeRepoName, CONTEXT_SOURCE_CONFIG_PATH, parseOuterlayerConfig, classifyTree, emitTree } from './chunk-7ZR5UPMB.js';
7
- import { defaultFetch } from './chunk-BCLJSQCV.js';
8
- import { resolveGatewayCredentials } from './chunk-BOLTI6LR.js';
4
+ import { readPin, pinExists, readBuildHold, readContextManifest, manifestFilesPresent, writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, SOURCE_CACHE_TTL_SUCCESS_MS, isLastCheckFresh, readDegraded, touchLastCheck, clearDegraded, writeContextManifest, writePinIfChanged, readSourceCache, isSourceCacheFresh } from './chunk-ZJ3WRVRG.js';
5
+ import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-JXH6LEEH.js';
6
+ import { parseGoverns, normalizeRepoName, CONTEXT_SOURCE_CONFIG_PATH, parseOuterlayerConfig, classifyTree, emitTree } from './chunk-CMFCCIQN.js';
7
+ import { defaultFetch } from './chunk-YO4PSLVB.js';
8
+ import { resolveGatewayCredentials } from './chunk-PLMTLGYH.js';
9
9
  import { ensureContextExcludes, ensurePreCommitGuardHook } from './chunk-XCCLFVXM.js';
10
10
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
11
11
  import { execFileSync } from 'child_process';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { RecipeError } from './chunk-QOZKPLVJ.js';
4
- import { trackImageBuild, isOutOfMemory, ensureBuilder } from './chunk-5TNS3PL7.js';
4
+ import { trackImageBuild, isOutOfMemory, ensureBuilder } from './chunk-CLURXEWV.js';
5
5
  import { spawn } from 'child_process';
6
6
  import { existsSync, mkdirSync, createWriteStream, rmSync, readFileSync } from 'fs';
7
7
  import { join, dirname } from 'path';
@@ -28,7 +28,7 @@ function resolveGatewayCredentials(sources = {}) {
28
28
  return { ok: false, message, url, credential, appId, kind };
29
29
  }
30
30
  if (!url || !credential || !appId) {
31
- const missing = [!url && "--url", !credential && "--api-key", !appId && "--app-id"].filter(Boolean).join(", ");
31
+ const missing = [!url && "--url", !credential && "a login or OUTERLAYER_API_KEY", !appId && "--app-id"].filter(Boolean).join(", ");
32
32
  return { ok: false, message: `missing ${missing}. ${MISSING_HELP}`, url, credential, appId, kind };
33
33
  }
34
34
  return { ok: true, url, credential, appId, kind };
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { isPlaceholderCommand } from './chunk-NALVDFIS.js';
4
- import { describeCallFailure } from './chunk-CM5QTKM4.js';
5
- import { WorkCommandError, getJson } from './chunk-5QLNZGAQ.js';
3
+ import { isPlaceholderCommand } from './chunk-MJLUWGUD.js';
4
+ import { describeCallFailure } from './chunk-EQG7L6LM.js';
5
+ import { WorkCommandError, getJson } from './chunk-R5SPFO6F.js';
6
6
  import { sanitizeTerminal } from './chunk-ZYHKJKSU.js';
7
- import { builtinKind } from './chunk-PWBILI5P.js';
8
- import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential } from './chunk-OD2VTIHN.js';
9
- import { signerFor } from './chunk-M5POMKKW.js';
7
+ import { builtinKind } from './chunk-7KI224YS.js';
8
+ import { CLAUDE_CREDENTIAL_VARIABLES, claudeCredential } from './chunk-2FWL7CE2.js';
9
+ import { signerFor } from './chunk-V7NIVOFD.js';
10
10
 
11
11
  createRequire(import.meta.url);
12
12
 
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { autoConnect } from './chunk-4ACZCY4I.js';
3
+ import { autoConnect } from './chunk-WMPO3SKK.js';
4
4
  import { detectActiveSession } from './chunk-BFESLKPP.js';
5
5
  import { sanitizeTerminal } from './chunk-ZYHKJKSU.js';
6
- import { resolveRepoIdentity } from './chunk-GAYWY4GI.js';
6
+ import { resolveRepoIdentity } from './chunk-HN2JBGSI.js';
7
7
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
8
- import { defaultFetch } from './chunk-BCLJSQCV.js';
9
- import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-BOLTI6LR.js';
10
- import { signRunnerRequest } from './chunk-M5POMKKW.js';
8
+ import { defaultFetch } from './chunk-YO4PSLVB.js';
9
+ import { resolveGatewayCredentials, unauthorizedMessage } from './chunk-PLMTLGYH.js';
10
+ import { signRunnerRequest } from './chunk-V7NIVOFD.js';
11
11
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
12
12
 
13
13
  createRequire(import.meta.url);
@@ -347,7 +347,7 @@ async function runWorkLinkSession(opts) {
347
347
  return await linkSession(opts);
348
348
  } catch (err) {
349
349
  if (opts.logFailures) {
350
- const { logHookError } = await import('./hook-fast-XBOZ3N6L.js');
350
+ const { logHookError } = await import('./hook-fast-OCHVQZTU.js');
351
351
  const reason = err instanceof Error ? err.message : String(err);
352
352
  logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
353
353
  }
@@ -6,7 +6,7 @@ import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
6
6
 
7
7
  createRequire(import.meta.url);
8
8
 
9
- // ../../node_modules/structured-headers/dist/util.js
9
+ // ../../node_modules/http-message-sig/node_modules/structured-headers/dist/util.js
10
10
  var asciiRe = /^[\x20-\x7E]*$/;
11
11
  var tokenRe = /^[a-zA-Z*][:/!#$%&'*+\-.^_`|~A-Za-z0-9]*$/;
12
12
  var keyRe = /^[a-z*][*\-_.a-z0-9]*$/;
@@ -40,7 +40,7 @@ function base64ToArrayBuffer(b64) {
40
40
  return bytes.buffer;
41
41
  }
42
42
 
43
- // ../../node_modules/structured-headers/dist/token.js
43
+ // ../../node_modules/http-message-sig/node_modules/structured-headers/dist/token.js
44
44
  var Token = class {
45
45
  constructor(value) {
46
46
  if (!isValidTokenStr(value)) {
@@ -53,7 +53,7 @@ var Token = class {
53
53
  }
54
54
  };
55
55
 
56
- // ../../node_modules/structured-headers/dist/displaystring.js
56
+ // ../../node_modules/http-message-sig/node_modules/structured-headers/dist/displaystring.js
57
57
  var DisplayString = class {
58
58
  constructor(value) {
59
59
  this.value = value;
@@ -63,7 +63,7 @@ var DisplayString = class {
63
63
  }
64
64
  };
65
65
 
66
- // ../../node_modules/structured-headers/dist/serializer.js
66
+ // ../../node_modules/http-message-sig/node_modules/structured-headers/dist/serializer.js
67
67
  var SerializeError = class extends Error {
68
68
  };
69
69
  function serializeDictionary(input) {
@@ -186,7 +186,7 @@ function serializeKey(input) {
186
186
  return input;
187
187
  }
188
188
 
189
- // ../../node_modules/structured-headers/dist/parser.js
189
+ // ../../node_modules/http-message-sig/node_modules/structured-headers/dist/parser.js
190
190
  function parseDictionary(input) {
191
191
  const parser = new Parser(input);
192
192
  return parser.parseDictionary();