poe-code 3.0.350 → 3.0.352

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.
package/dist/index.js CHANGED
@@ -67664,6 +67664,9 @@ function parseTaskStatus(value, availableSteps, taskId) {
67664
67664
  throw new Error(`Invalid status for task "${taskId}": expected at least one step status.`);
67665
67665
  }
67666
67666
  for (const [stepName, stepStatus] of stepStatuses) {
67667
+ if (stepName.length === 0) {
67668
+ throw new Error(`Invalid status for task "${taskId}": step names must be non-empty.`);
67669
+ }
67667
67670
  if (availableSteps && !Object.hasOwn(availableSteps, stepName)) {
67668
67671
  throw new Error(`Unknown step "${stepName}" referenced by task "${taskId}".`);
67669
67672
  }
@@ -67847,11 +67850,17 @@ function parsePlan(planContent, options = {}) {
67847
67850
  "mcp"
67848
67851
  ]);
67849
67852
  const kind = getOwnEntry25(document, "kind");
67850
- if (kind !== void 0 && kind !== "pipeline") {
67853
+ if (kind === void 0) {
67854
+ throw new Error('Invalid plan YAML: missing required "kind".');
67855
+ }
67856
+ if (kind !== "pipeline") {
67851
67857
  throw new Error('Invalid plan YAML: "kind" must be "pipeline".');
67852
67858
  }
67853
67859
  const version = getOwnEntry25(document, "version");
67854
- if (version !== void 0 && version !== 1) {
67860
+ if (version === void 0) {
67861
+ throw new Error('Invalid plan YAML: missing required "version".');
67862
+ }
67863
+ if (version !== 1) {
67855
67864
  throw new Error('Invalid plan YAML: "version" must be 1.');
67856
67865
  }
67857
67866
  let extendsName = "default";
@@ -67870,6 +67879,9 @@ function parsePlan(planContent, options = {}) {
67870
67879
  }
67871
67880
  stepOverrides = {};
67872
67881
  for (const [stepName, value] of Object.entries(stepsValue)) {
67882
+ if (stepName.length === 0) {
67883
+ throw new Error("Invalid plan YAML: step names must be non-empty.");
67884
+ }
67873
67885
  defineRecordEntry3(stepOverrides, stepName, parseStepOverride(value, `steps.${stepName}`));
67874
67886
  }
67875
67887
  }
@@ -67882,6 +67894,7 @@ function parsePlan(planContent, options = {}) {
67882
67894
  if (!isRecord22(value)) {
67883
67895
  throw new Error(`Invalid tasks[${index}]: expected an object.`);
67884
67896
  }
67897
+ rejectUnknownProperties(value, ["id", "title", "prompt", "status"], `tasks[${index}].`);
67885
67898
  const id = asRequiredString(getOwnEntry25(value, "id"), `tasks[${index}].id`);
67886
67899
  if (ids.has(id)) {
67887
67900
  throw new Error(`Duplicate task id "${id}".`);
@@ -68307,7 +68320,7 @@ function selectFromTask(task) {
68307
68320
  return task.status === "done" ? { kind: "completed" } : { kind: "run", task };
68308
68321
  }
68309
68322
  const stepName = Object.entries(task.status).find(([, value]) => value !== "done")?.[0];
68310
- return stepName ? { kind: "run", task, stepName } : { kind: "completed" };
68323
+ return stepName !== void 0 ? { kind: "run", task, stepName } : { kind: "completed" };
68311
68324
  }
68312
68325
  function selectNextExecution(plan, taskId) {
68313
68326
  const tasks = taskId ? plan.tasks.filter((task) => task.id === taskId) : plan.tasks;
@@ -68395,7 +68408,13 @@ function looksLikeDocPath(value) {
68395
68408
  }
68396
68409
  async function resolveDocVarFromPath(options) {
68397
68410
  const trimmed = options.value.trim();
68398
- const absolutePath = path83.isAbsolute(trimmed) ? trimmed : path83.join(options.cwd, trimmed);
68411
+ const absolutePath = path83.resolve(options.cwd, trimmed);
68412
+ const relativePath = path83.relative(options.cwd, absolutePath);
68413
+ if (relativePath === ".." || relativePath.startsWith(`..${path83.sep}`) || path83.isAbsolute(relativePath)) {
68414
+ throw new Error(
68415
+ `Pipeline doc var "${options.key}" resolves outside the project root: ${trimmed}`
68416
+ );
68417
+ }
68399
68418
  try {
68400
68419
  return await options.readFile(absolutePath, "utf8");
68401
68420
  } catch (error3) {
@@ -93636,6 +93655,7 @@ var init_decimal_integer = __esm({
93636
93655
 
93637
93656
  // src/cli/commands/spawn.ts
93638
93657
  import path145 from "node:path";
93658
+ import { randomUUID as randomUUID39 } from "node:crypto";
93639
93659
  import { Option as Option3 } from "commander";
93640
93660
  function registerSpawnCommand(program, container, options = {}) {
93641
93661
  const spawnServices = container.registry.list().filter((service) => typeof service.spawn === "function" || getSpawnConfig(service.name));
@@ -93842,6 +93862,7 @@ function registerSpawnCommand(program, container, options = {}) {
93842
93862
  mcpServers
93843
93863
  );
93844
93864
  if (flags.dryRun) {
93865
+ validateDryRunBridgeResources(canonicalService, container, spawnOptions);
93845
93866
  await spawnCore(container, canonicalService, spawnOptions, {
93846
93867
  dryRun: true,
93847
93868
  verbose: flags.verbose
@@ -94232,6 +94253,45 @@ function resolveHookOptions(from, strategy, scope, command) {
94232
94253
  ...scope ? { scope } : {}
94233
94254
  };
94234
94255
  }
94256
+ function validateDryRunBridgeResources(service, container, options) {
94257
+ if ((options.skills === void 0 || options.skills.length === 0) && options.hooks === void 0) {
94258
+ return;
94259
+ }
94260
+ const runId = randomUUID39();
94261
+ let skillsManifest;
94262
+ let hooksManifest;
94263
+ try {
94264
+ if (options.skills !== void 0 && options.skills.length > 0) {
94265
+ skillsManifest = bridgeActiveSkills(
94266
+ service,
94267
+ options.cwd ?? container.env.cwd,
94268
+ options.skills,
94269
+ container.env.homeDir,
94270
+ runId
94271
+ );
94272
+ }
94273
+ if (options.hooks !== void 0) {
94274
+ hooksManifest = bridgeHooks(
94275
+ options.hooks.from,
94276
+ service,
94277
+ options.cwd ?? container.env.cwd,
94278
+ container.env.homeDir,
94279
+ runId,
94280
+ {
94281
+ strategy: options.hooks.strategy === "auto" ? void 0 : options.hooks.strategy,
94282
+ ...options.hooks.scope !== void 0 ? { scope: options.hooks.scope } : {}
94283
+ }
94284
+ );
94285
+ }
94286
+ } finally {
94287
+ if (hooksManifest !== void 0) {
94288
+ cleanupBridgedHooks(hooksManifest);
94289
+ }
94290
+ if (skillsManifest !== void 0) {
94291
+ cleanupBridgedSkills(skillsManifest);
94292
+ }
94293
+ }
94294
+ }
94235
94295
  function assertSpawnSupport(label, service, providerSupportsSpawn) {
94236
94296
  if (providerSupportsSpawn) {
94237
94297
  return;
@@ -94263,6 +94323,8 @@ var init_spawn6 = __esm({
94263
94323
  "use strict";
94264
94324
  init_src17();
94265
94325
  init_src7();
94326
+ init_src14();
94327
+ init_src15();
94266
94328
  init_src2();
94267
94329
  init_config5();
94268
94330
  init_shared();
@@ -95773,7 +95835,7 @@ var init_test = __esm({
95773
95835
  });
95774
95836
 
95775
95837
  // src/services/media-download.ts
95776
- import { randomUUID as randomUUID39 } from "node:crypto";
95838
+ import { randomUUID as randomUUID40 } from "node:crypto";
95777
95839
  async function downloadToFile(options) {
95778
95840
  const fetcher = options.fetcher ?? globalThis.fetch;
95779
95841
  if (!fetcher) {
@@ -95804,7 +95866,7 @@ async function downloadToFile(options) {
95804
95866
  outputPath: options.outputPath
95805
95867
  });
95806
95868
  }
95807
- const temporaryPath = `${options.outputPath}.${process.pid}.${randomUUID39()}.tmp`;
95869
+ const temporaryPath = `${options.outputPath}.${process.pid}.${randomUUID40()}.tmp`;
95808
95870
  let temporaryCreated = false;
95809
95871
  try {
95810
95872
  await options.fs.writeFile(temporaryPath, buffer, { flag: "wx" });
@@ -98234,7 +98296,7 @@ var init_dashboard_loop_shared = __esm({
98234
98296
  });
98235
98297
 
98236
98298
  // src/cli/commands/pipeline.ts
98237
- import { randomUUID as randomUUID40 } from "node:crypto";
98299
+ import { randomUUID as randomUUID41 } from "node:crypto";
98238
98300
  import path148 from "node:path";
98239
98301
  import { readFile as readFile39, stat as stat24 } from "node:fs/promises";
98240
98302
  import { fileURLToPath as fileURLToPath10 } from "node:url";
@@ -98314,8 +98376,10 @@ function resolveMaxRuns(value) {
98314
98376
  if (value == null) {
98315
98377
  return void 0;
98316
98378
  }
98317
- const parsed = Number.parseInt(value, 10);
98318
- if (!Number.isFinite(parsed) || parsed < 1) {
98379
+ const trimmed = value.trim();
98380
+ const hasOnlyDigits = trimmed.length > 0 && [...trimmed].every((character) => character >= "0" && character <= "9");
98381
+ const parsed = Number(trimmed);
98382
+ if (!hasOnlyDigits || !Number.isSafeInteger(parsed) || parsed < 1) {
98319
98383
  throw new ValidationError(`Invalid max-runs "${value}". Expected a positive integer.`);
98320
98384
  }
98321
98385
  return parsed;
@@ -98362,15 +98426,19 @@ function formatPipelineTasksSummary(summary) {
98362
98426
  }
98363
98427
  return parts.join(", ");
98364
98428
  }
98365
- function summarizePipelinePlan(plan) {
98429
+ function summarizePipelinePlan(plan, taskId) {
98430
+ const tasks = taskId ? plan.tasks.filter((task) => task.id === taskId) : plan.tasks;
98431
+ if (taskId && tasks.length === 0) {
98432
+ throw new ValidationError(`Task "${taskId}" was not found in the plan.`);
98433
+ }
98366
98434
  const summary = {
98367
98435
  planPath: "",
98368
98436
  done: 0,
98369
98437
  failed: 0,
98370
98438
  open: 0,
98371
- total: plan.tasks.length
98439
+ total: tasks.length
98372
98440
  };
98373
- for (const task of plan.tasks) {
98441
+ for (const task of tasks) {
98374
98442
  const statuses = typeof task.status === "string" ? [task.status] : Object.values(task.status);
98375
98443
  if (statuses.length > 0 && statuses.every((status) => status === "done")) {
98376
98444
  summary.done += 1;
@@ -98391,8 +98459,14 @@ async function dryRunPipelinePlans(options) {
98391
98459
  );
98392
98460
  const content = await options.container.fs.readFile(absolutePath, "utf8");
98393
98461
  const plan = parsePlan(content);
98394
- const summary = summarizePipelinePlan(plan);
98462
+ const summary = summarizePipelinePlan(plan, options.task);
98395
98463
  options.resources.logger.dryRun(`Would run: ${planPath}`);
98464
+ if (options.task) {
98465
+ options.resources.logger.dryRun(`Task: ${options.task}`);
98466
+ }
98467
+ if (options.maxRuns !== void 0) {
98468
+ options.resources.logger.dryRun(`Max runs: ${options.maxRuns}`);
98469
+ }
98396
98470
  options.resources.logger.dryRun(
98397
98471
  `Tasks: ${summary.done} done, ${summary.failed} failed, ${summary.open} open`
98398
98472
  );
@@ -98797,7 +98871,7 @@ async function writePipelineTextFile(fs29, filePath, content, options) {
98797
98871
  }
98798
98872
  return;
98799
98873
  }
98800
- const temporaryPath = `${filePath}.${process.pid}.${randomUUID40()}.tmp`;
98874
+ const temporaryPath = `${filePath}.${process.pid}.${randomUUID41()}.tmp`;
98801
98875
  let temporaryCreated = false;
98802
98876
  try {
98803
98877
  await fs29.writeFile(temporaryPath, content, { encoding: "utf8", flag: "wx" });
@@ -98827,6 +98901,7 @@ function registerPipelineCommand(program, container) {
98827
98901
  if (options.plan && options.plans && options.plans.length > 0) {
98828
98902
  throw new ValidationError("Use either --plan or --plans, not both.");
98829
98903
  }
98904
+ const maxRuns = resolveMaxRuns(options.maxRuns);
98830
98905
  if (flags.dryRun) {
98831
98906
  const commandConfig2 = await resolvePipelineCommandConfig(container, { readOnly: true });
98832
98907
  const planPaths2 = await resolvePlanPaths({
@@ -98842,7 +98917,13 @@ function registerPipelineCommand(program, container) {
98842
98917
  if (!planPaths2 || planPaths2.length === 0) {
98843
98918
  return;
98844
98919
  }
98845
- await dryRunPipelinePlans({ container, resources, planPaths: planPaths2 });
98920
+ await dryRunPipelinePlans({
98921
+ container,
98922
+ resources,
98923
+ planPaths: planPaths2,
98924
+ ...maxRuns !== void 0 ? { maxRuns } : {},
98925
+ ...options.task ? { task: options.task } : {}
98926
+ });
98846
98927
  return;
98847
98928
  }
98848
98929
  if (!flags.assumeYes && !options.agent) {
@@ -98866,7 +98947,6 @@ function registerPipelineCommand(program, container) {
98866
98947
  const agent3 = resolvePipelineAgent(selectedAgent.agent);
98867
98948
  const commandConfig = await resolvePipelineCommandConfig(container);
98868
98949
  integrations = await loadIntegrations(commandConfig.configDoc);
98869
- const maxRuns = resolveMaxRuns(options.maxRuns);
98870
98950
  const planPaths = await resolvePlanPaths({
98871
98951
  cwd: container.env.cwd,
98872
98952
  homeDir: container.env.homeDir,
@@ -99396,7 +99476,7 @@ var init_pipeline5 = __esm({
99396
99476
  });
99397
99477
 
99398
99478
  // src/cli/commands/ralph.ts
99399
- import { randomUUID as randomUUID41 } from "node:crypto";
99479
+ import { randomUUID as randomUUID42 } from "node:crypto";
99400
99480
  import path149 from "node:path";
99401
99481
  function formatRalphAgentSummary(agent3) {
99402
99482
  return Array.isArray(agent3) ? agent3.join(", ") : agent3;
@@ -99641,7 +99721,7 @@ async function writeTextFileAtomically(fs29, filePath, content, options) {
99641
99721
  await fs29.writeFile(filePath, content, { encoding: "utf8" });
99642
99722
  return;
99643
99723
  }
99644
- const temporaryPath = `${filePath}.${process.pid}.${randomUUID41()}.tmp`;
99724
+ const temporaryPath = `${filePath}.${process.pid}.${randomUUID42()}.tmp`;
99645
99725
  let temporaryCreated = false;
99646
99726
  try {
99647
99727
  await fs29.writeFile(temporaryPath, content, { encoding: "utf8", flag: "wx" });
@@ -100995,6 +101075,7 @@ function registerLaunchCommand(program, container) {
100995
101075
  const flags = resolveCommandFlags(program);
100996
101076
  const resources = createExecutionResources(container, flags, `launch:stop:${id}`);
100997
101077
  if (flags.dryRun) {
101078
+ await validateManagedProcessExists(container, id);
100998
101079
  resources.logger.dryRun(`Dry run: would stop managed process ${id}.`);
100999
101080
  return;
101000
101081
  }
@@ -101011,6 +101092,7 @@ function registerLaunchCommand(program, container) {
101011
101092
  const flags = resolveCommandFlags(program);
101012
101093
  const resources = createExecutionResources(container, flags, `launch:restart:${id}`);
101013
101094
  if (flags.dryRun) {
101095
+ await validateManagedProcessExists(container, id);
101014
101096
  resources.logger.dryRun(`Dry run: would restart managed process ${id}.`);
101015
101097
  return;
101016
101098
  }
@@ -101300,6 +101382,15 @@ function formatReadinessWait(readyCheck) {
101300
101382
  }
101301
101383
  return `waiting for TCP port ${readyCheck.port}`;
101302
101384
  }
101385
+ async function validateManagedProcessExists(container, id) {
101386
+ const records = await listLaunches({ homeDir: container.env.homeDir });
101387
+ if (!records.some((record) => getManagedProcessId(record) === id)) {
101388
+ throw new ValidationError(`Managed process not found: ${id}`);
101389
+ }
101390
+ }
101391
+ function getManagedProcessId(record) {
101392
+ return record.spec?.id ?? record.state?.id ?? record.id;
101393
+ }
101303
101394
  function formatManagedProcessStatus(record, fallbackId) {
101304
101395
  const id = record.spec?.id ?? record.state?.id ?? fallbackId;
101305
101396
  if (record.state?.status) {
@@ -102042,10 +102133,10 @@ var init_status = __esm({
102042
102133
  });
102043
102134
 
102044
102135
  // packages/memory/src/atomic-write.ts
102045
- import { randomUUID as randomUUID42 } from "node:crypto";
102136
+ import { randomUUID as randomUUID43 } from "node:crypto";
102046
102137
  import * as fs18 from "node:fs/promises";
102047
102138
  async function writeFileAtomically7(filePath, content) {
102048
- const tempPath = `${filePath}.${process.pid}.${randomUUID42()}.tmp`;
102139
+ const tempPath = `${filePath}.${process.pid}.${randomUUID43()}.tmp`;
102049
102140
  let tempCreated = false;
102050
102141
  try {
102051
102142
  await fs18.writeFile(tempPath, content, { encoding: "utf8", flag: "wx" });
@@ -102455,7 +102546,7 @@ var init_reconcile2 = __esm({
102455
102546
  });
102456
102547
 
102457
102548
  // packages/memory/src/write.ts
102458
- import { randomUUID as randomUUID43 } from "node:crypto";
102549
+ import { randomUUID as randomUUID44 } from "node:crypto";
102459
102550
  import * as fs20 from "node:fs/promises";
102460
102551
  import path158 from "node:path";
102461
102552
  async function writePage(root, relPath, body, opts) {
@@ -102508,8 +102599,8 @@ function parseAppendTarget(originalPage, relPath) {
102508
102599
  }
102509
102600
  async function clearMemory(root) {
102510
102601
  await assertMemoryRootIsNotSymlink(root);
102511
- const stagedRoot = `${root}.clear-${randomUUID43()}`;
102512
- const backupRoot = `${root}.backup-${randomUUID43()}`;
102602
+ const stagedRoot = `${root}.clear-${randomUUID44()}`;
102603
+ const backupRoot = `${root}.backup-${randomUUID44()}`;
102513
102604
  let originalMoved = false;
102514
102605
  try {
102515
102606
  await initMemory(stagedRoot);
@@ -104908,11 +104999,11 @@ async function executeRuntimeBuild(program, container, options) {
104908
104999
  resources.logger.info(`Docker runtime uses pinned image ${runtimeConfig.image}.`);
104909
105000
  return;
104910
105001
  }
105002
+ await requireRuntimeBuildPaths(container, runtimeConfig, "Docker");
104911
105003
  if (flags.dryRun) {
104912
105004
  resources.logger.dryRun("Dry run: would build docker runtime template.");
104913
105005
  return;
104914
105006
  }
104915
- await requireRuntimeBuildPaths(container, runtimeConfig, "Docker");
104916
105007
  const result = await buildDockerRuntimeTemplate({
104917
105008
  cwd: container.env.cwd,
104918
105009
  runtime: runtimeConfig,
@@ -105351,6 +105442,7 @@ async function executeRuntimeJobsAttach(root, container, jobId, options) {
105351
105442
  const resources = createExecutionResources(container, flags, "runtime:jobs:attach");
105352
105443
  const state = createRuntimeState(container);
105353
105444
  const entry = await resolveJob(state, jobId, "running");
105445
+ const since = parseSince(options.since);
105354
105446
  if (flags.dryRun) {
105355
105447
  const syncDetail = options.syncOnExit === true ? " and sync its workspace on exit" : "";
105356
105448
  resources.logger.dryRun(`Dry run: would attach to runtime job ${entry.id}${syncDetail}.`);
@@ -105361,7 +105453,7 @@ async function executeRuntimeJobsAttach(root, container, jobId, options) {
105361
105453
  resources.logger.info(line);
105362
105454
  });
105363
105455
  await streamJobLog(handle, {
105364
- since: parseSince(options.since),
105456
+ since,
105365
105457
  follow: true,
105366
105458
  write(chunk) {
105367
105459
  logWriter.write(chunk);
@@ -105395,6 +105487,7 @@ async function executeRuntimeJobsLogs(root, container, jobId, options) {
105395
105487
  const resources = createExecutionResources(container, flags, "runtime:jobs:logs");
105396
105488
  const state = createRuntimeState(container);
105397
105489
  const entry = await resolveJob(state, jobId, "pullable");
105490
+ const since = parseSince(options.since);
105398
105491
  if (flags.dryRun) {
105399
105492
  resources.logger.dryRun(`Dry run: would read logs for runtime job ${entry.id}.`);
105400
105493
  return;
@@ -105404,7 +105497,7 @@ async function executeRuntimeJobsLogs(root, container, jobId, options) {
105404
105497
  resources.logger.info(line);
105405
105498
  });
105406
105499
  await streamJobLog(handle, {
105407
- since: parseSince(options.since),
105500
+ since,
105408
105501
  follow: false,
105409
105502
  write(chunk) {
105410
105503
  logWriter.write(chunk);
@@ -105495,13 +105588,13 @@ function registerRuntimeJobsSandboxCommand(jobs, root, container) {
105495
105588
  jobs.command("sandbox").description("Open a shell in a runtime sandbox.").argument("<envId>", "Runtime sandbox id").option("--runtime <runtime>", "Runtime backend for the sandbox", "docker").action(async (envId, options) => {
105496
105589
  const flags = resolveCommandFlags(root);
105497
105590
  const resources = createExecutionResources(container, flags, "runtime:jobs:sandbox");
105591
+ const factory = selectExecutionEnvFactory(options.runtime);
105498
105592
  if (flags.dryRun) {
105499
105593
  resources.logger.dryRun(
105500
105594
  `Dry run: would open a shell in ${options.runtime} runtime sandbox ${envId}.`
105501
105595
  );
105502
105596
  return;
105503
105597
  }
105504
- const factory = selectExecutionEnvFactory(options.runtime);
105505
105598
  const job = (await createRuntimeState(container).jobs.list()).filter((entry) => entry.env_id === envId && entry.env_kind === options.runtime).sort((left, right) => Date.parse(right.started_at) - Date.parse(left.started_at))[0];
105506
105599
  const env = await factory.attach(
105507
105600
  envId,
@@ -125616,7 +125709,7 @@ var init_policy = __esm({
125616
125709
  });
125617
125710
 
125618
125711
  // packages/safejs/src/interp/host-call.ts
125619
- import { createHash as createHash10, randomUUID as randomUUID44 } from "node:crypto";
125712
+ import { createHash as createHash10, randomUUID as randomUUID45 } from "node:crypto";
125620
125713
  function validateRestoredRecords(records, runId, sourceHash) {
125621
125714
  const ids = /* @__PURE__ */ new Set();
125622
125715
  let previousOrdinal = 0;
@@ -125730,7 +125823,7 @@ var init_host_call = __esm({
125730
125823
  constructor(sourceHash, records = [], resumeProvider) {
125731
125824
  this.sourceHash = sourceHash;
125732
125825
  this.resumeProvider = resumeProvider;
125733
- this.runId = records[0]?.runId ?? randomUUID44();
125826
+ this.runId = records[0]?.runId ?? randomUUID45();
125734
125827
  this.records = records.map((record) => structuredClone(record));
125735
125828
  validateRestoredRecords(this.records, this.runId, sourceHash);
125736
125829
  this.restored = [...this.records];
@@ -133417,7 +133510,7 @@ var init_error_codes21 = __esm({
133417
133510
  });
133418
133511
 
133419
133512
  // packages/safejs/src/snapshot/backend.ts
133420
- import { randomUUID as randomUUID45 } from "node:crypto";
133513
+ import { randomUUID as randomUUID46 } from "node:crypto";
133421
133514
  import { readFile as readFile52, rename as rename27, stat as stat31, unlink as unlink24, writeFile as writeFile28 } from "node:fs/promises";
133422
133515
  import { dirname as dirname10 } from "node:path";
133423
133516
  async function writeSnapshotAtomically(snapshotPath, snapshot2, options) {
@@ -133426,7 +133519,7 @@ async function writeSnapshotAtomically(snapshotPath, snapshot2, options) {
133426
133519
  await assertParentDirectoryExists(snapshotPath, parentPath);
133427
133520
  for (let attempt = 1; attempt <= options.maxAttempts; attempt += 1) {
133428
133521
  try {
133429
- const temporaryPath = `${snapshotPath}.${randomUUID45()}.tmp`;
133522
+ const temporaryPath = `${snapshotPath}.${randomUUID46()}.tmp`;
133430
133523
  await writeSnapshotOnce(temporaryPath, snapshotPath, contents);
133431
133524
  return;
133432
133525
  } catch (error3) {
@@ -136021,7 +136114,7 @@ var init_extract_schema = __esm({
136021
136114
  });
136022
136115
 
136023
136116
  // packages/agent-harness/src/codegen/emit-schemas.ts
136024
- import { randomUUID as randomUUID46 } from "node:crypto";
136117
+ import { randomUUID as randomUUID47 } from "node:crypto";
136025
136118
  import * as nodeFs21 from "node:fs/promises";
136026
136119
  import path171 from "node:path";
136027
136120
  import { fileURLToPath as fileURLToPath13 } from "node:url";
@@ -136181,7 +136274,7 @@ var init_validate4 = __esm({
136181
136274
  });
136182
136275
 
136183
136276
  // packages/agent-harness/src/loader/run.ts
136184
- import { createHash as createHash11, randomUUID as randomUUID47 } from "node:crypto";
136277
+ import { createHash as createHash11, randomUUID as randomUUID48 } from "node:crypto";
136185
136278
  import { lstat as lstat34, mkdir as mkdir37, readFile as readFile55, rename as rename28, unlink as unlink25, writeFile as writeFile29 } from "node:fs/promises";
136186
136279
  import os22 from "node:os";
136187
136280
  import { dirname as dirname13, join as join14, parse as parse14, resolve as resolve10, sep as sep7 } from "node:path";
@@ -136543,7 +136636,7 @@ async function writeHostCallRecords(storePath, records) {
136543
136636
  await writeTextFileAtomically2(storePath, serialized);
136544
136637
  }
136545
136638
  async function writeTextFileAtomically2(filePath, content) {
136546
- const temporaryPath = `${filePath}.${process.pid}.${randomUUID47()}.tmp`;
136639
+ const temporaryPath = `${filePath}.${process.pid}.${randomUUID48()}.tmp`;
136547
136640
  let temporaryCreated = false;
136548
136641
  try {
136549
136642
  await writeFile29(temporaryPath, content, { encoding: "utf8", flag: "wx" });
@@ -136800,6 +136893,7 @@ async function executeHarnessRun(program, container, mdPath, options) {
136800
136893
  const resources = createExecutionResources(container, flags, "harness:run");
136801
136894
  const selectedPath = mdPath ? path172.resolve(container.env.cwd, mdPath) : (await resolveDiscoveredHarness(container, flags.assumeYes)).mdPath;
136802
136895
  if (flags.dryRun) {
136896
+ await resolvePair(selectedPath, container.fs);
136803
136897
  resources.logger.dryRun(
136804
136898
  `Dry run: would run ${formatDisplayPath3(container, selectedPath)} without executing its script or applying fixes.`
136805
136899
  );
@@ -138584,7 +138678,7 @@ var init_package2 = __esm({
138584
138678
  "package.json"() {
138585
138679
  package_default2 = {
138586
138680
  name: "poe-code",
138587
- version: "3.0.350",
138681
+ version: "3.0.352",
138588
138682
  description: "CLI tool to configure Poe API for developer workflows.",
138589
138683
  type: "module",
138590
138684
  main: "./dist/index.js",