poe-code 3.0.187 → 3.0.188

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 (90) hide show
  1. package/dist/cli/commands/experiment.js +1 -1
  2. package/dist/cli/commands/experiment.js.map +1 -1
  3. package/dist/cli/commands/pipeline-init.js +1 -1
  4. package/dist/cli/commands/pipeline-init.js.map +1 -1
  5. package/dist/cli/commands/pipeline.js +1 -1
  6. package/dist/cli/commands/pipeline.js.map +1 -1
  7. package/dist/cli/commands/spawn.js +2 -1
  8. package/dist/cli/commands/spawn.js.map +1 -1
  9. package/dist/cli/program.js +6 -6
  10. package/dist/cli/program.js.map +1 -1
  11. package/dist/index.js +122 -225
  12. package/dist/index.js.map +4 -4
  13. package/dist/providers/claude-code.js +2 -76
  14. package/dist/providers/claude-code.js.map +4 -4
  15. package/dist/providers/codex.js +2 -76
  16. package/dist/providers/codex.js.map +4 -4
  17. package/dist/providers/goose.js +2 -76
  18. package/dist/providers/goose.js.map +4 -4
  19. package/dist/providers/kimi.js +2 -76
  20. package/dist/providers/kimi.js.map +4 -4
  21. package/dist/providers/opencode.js +2 -76
  22. package/dist/providers/opencode.js.map +4 -4
  23. package/dist/providers/poe-agent.js +23 -107
  24. package/dist/providers/poe-agent.js.map +4 -4
  25. package/dist/sdk/experiment.js +1 -1
  26. package/dist/sdk/experiment.js.map +1 -1
  27. package/package.json +10 -30
  28. package/packages/design-system/dist/prompts/primitives/cancel.d.ts +1 -1
  29. package/packages/design-system/dist/prompts/primitives/cancel.js +1 -1
  30. package/packages/cmdkit/dist/cli.compile-check.d.ts +0 -1
  31. package/packages/cmdkit/dist/cli.compile-check.js +0 -26
  32. package/packages/cmdkit/dist/cli.d.ts +0 -12
  33. package/packages/cmdkit/dist/cli.js +0 -2331
  34. package/packages/cmdkit/dist/cli.js.map +0 -7
  35. package/packages/cmdkit/dist/index.compile-check.d.ts +0 -1
  36. package/packages/cmdkit/dist/index.compile-check.js +0 -50
  37. package/packages/cmdkit/dist/index.d.ts +0 -164
  38. package/packages/cmdkit/dist/index.js +0 -561
  39. package/packages/cmdkit/dist/index.js.map +0 -7
  40. package/packages/cmdkit/dist/mcp.compile-check.d.ts +0 -1
  41. package/packages/cmdkit/dist/mcp.compile-check.js +0 -26
  42. package/packages/cmdkit/dist/mcp.d.ts +0 -31
  43. package/packages/cmdkit/dist/mcp.js +0 -1254
  44. package/packages/cmdkit/dist/mcp.js.map +0 -7
  45. package/packages/cmdkit/dist/number-schema.d.ts +0 -3
  46. package/packages/cmdkit/dist/number-schema.js +0 -8
  47. package/packages/cmdkit/dist/renderer.d.ts +0 -5
  48. package/packages/cmdkit/dist/renderer.js +0 -164
  49. package/packages/cmdkit/dist/renderer.js.map +0 -7
  50. package/packages/cmdkit/dist/schema-scope.d.ts +0 -4
  51. package/packages/cmdkit/dist/schema-scope.js +0 -34
  52. package/packages/cmdkit/dist/sdk.compile-check.d.ts +0 -1
  53. package/packages/cmdkit/dist/sdk.compile-check.js +0 -79
  54. package/packages/cmdkit/dist/sdk.d.ts +0 -63
  55. package/packages/cmdkit/dist/sdk.js +0 -369
  56. package/packages/cmdkit/dist/sdk.js.map +0 -7
  57. package/packages/cmdkit-openapi/dist/api-command.d.ts +0 -7
  58. package/packages/cmdkit-openapi/dist/api-command.js +0 -4
  59. package/packages/cmdkit-openapi/dist/auth/bearer-token-auth.d.ts +0 -8
  60. package/packages/cmdkit-openapi/dist/auth/bearer-token-auth.js +0 -216
  61. package/packages/cmdkit-openapi/dist/auth/types.d.ts +0 -9
  62. package/packages/cmdkit-openapi/dist/auth/types.js +0 -1
  63. package/packages/cmdkit-openapi/dist/bin/generate.d.ts +0 -40
  64. package/packages/cmdkit-openapi/dist/bin/generate.js +0 -248
  65. package/packages/cmdkit-openapi/dist/define-client.d.ts +0 -20
  66. package/packages/cmdkit-openapi/dist/define-client.js +0 -148
  67. package/packages/cmdkit-openapi/dist/generate.d.ts +0 -210
  68. package/packages/cmdkit-openapi/dist/generate.js +0 -1131
  69. package/packages/cmdkit-openapi/dist/group-by-noun.d.ts +0 -6
  70. package/packages/cmdkit-openapi/dist/group-by-noun.js +0 -17
  71. package/packages/cmdkit-openapi/dist/http.d.ts +0 -26
  72. package/packages/cmdkit-openapi/dist/http.js +0 -123
  73. package/packages/cmdkit-openapi/dist/index.d.ts +0 -12
  74. package/packages/cmdkit-openapi/dist/index.js +0 -6
  75. package/packages/cmdkit-openapi/dist/interpreter.d.ts +0 -6
  76. package/packages/cmdkit-openapi/dist/interpreter.js +0 -289
  77. package/packages/cmdkit-openapi/dist/lock.d.ts +0 -14
  78. package/packages/cmdkit-openapi/dist/lock.js +0 -48
  79. package/packages/cmdkit-openapi/dist/naming.d.ts +0 -24
  80. package/packages/cmdkit-openapi/dist/naming.js +0 -218
  81. package/packages/cmdkit-openapi/dist/request-shape.d.ts +0 -15
  82. package/packages/cmdkit-openapi/dist/request-shape.js +0 -5
  83. package/packages/cmdkit-openapi/dist/runtime.d.ts +0 -13
  84. package/packages/cmdkit-openapi/dist/runtime.js +0 -94
  85. package/packages/cmdkit-openapi/dist/spec-source.d.ts +0 -11
  86. package/packages/cmdkit-openapi/dist/spec-source.js +0 -63
  87. package/packages/cmdkit-schema/dist/index.compile-check.d.ts +0 -1
  88. package/packages/cmdkit-schema/dist/index.compile-check.js +0 -12
  89. package/packages/cmdkit-schema/dist/index.d.ts +0 -124
  90. package/packages/cmdkit-schema/dist/index.js +0 -175
package/dist/index.js CHANGED
@@ -5479,8 +5479,8 @@ function parseDelimiter(input, start, marker) {
5479
5479
  }
5480
5480
  function matchDelimiterPairs(delimiters) {
5481
5481
  const pairs = [];
5482
- const previous = delimiters.map((_2, index) => index - 1);
5483
- const next = delimiters.map((_2, index) => index + 1 < delimiters.length ? index + 1 : -1);
5482
+ const previous = delimiters.map((_, index) => index - 1);
5483
+ const next = delimiters.map((_, index) => index + 1 < delimiters.length ? index + 1 : -1);
5484
5484
  const active = delimiters.map(() => true);
5485
5485
  let sequence = 0;
5486
5486
  let closerIndex = 0;
@@ -8211,14 +8211,14 @@ function renderTable2(node, context) {
8211
8211
  return "";
8212
8212
  }
8213
8213
  const renderedRows = rows.map(
8214
- (row) => Array.from({ length: columnCount }, (_2, columnIndex) => {
8214
+ (row) => Array.from({ length: columnCount }, (_, columnIndex) => {
8215
8215
  const cell = row.children[columnIndex];
8216
8216
  return cell?.type === "tableCell" ? renderTableCell(cell, context) : "";
8217
8217
  })
8218
8218
  );
8219
8219
  const columnWidths = Array.from(
8220
8220
  { length: columnCount },
8221
- (_2, columnIndex) => Math.max(...renderedRows.map((row) => stripAnsi2(row[columnIndex] ?? "").length), 0)
8221
+ (_, columnIndex) => Math.max(...renderedRows.map((row) => stripAnsi2(row[columnIndex] ?? "").length), 0)
8222
8222
  );
8223
8223
  if (getRenderedTableWidth(columnWidths) > context.width) {
8224
8224
  return renderStackedTable(rows, columnCount, context);
@@ -8256,7 +8256,7 @@ function renderStackedTable(rows, columnCount, context) {
8256
8256
  if (dataRows.length === 0) {
8257
8257
  const headerLines = Array.from(
8258
8258
  { length: columnCount },
8259
- (_2, columnIndex) => tokenizeText(getStackedTableLabel(headerRow.children[columnIndex], columnIndex, context), [typography.bold])
8259
+ (_, columnIndex) => tokenizeText(getStackedTableLabel(headerRow.children[columnIndex], columnIndex, context), [typography.bold])
8260
8260
  ).flatMap((tokens) => wrapTokens(tokens, context.width));
8261
8261
  return headerLines.length === 0 ? "" : `${headerLines.join("\n")}
8262
8262
 
@@ -8265,7 +8265,7 @@ function renderStackedTable(rows, columnCount, context) {
8265
8265
  const blocks = dataRows.map(
8266
8266
  (row) => Array.from(
8267
8267
  { length: columnCount },
8268
- (_2, columnIndex) => renderStackedTableField(headerRow.children[columnIndex], row.children[columnIndex], columnIndex, context)
8268
+ (_, columnIndex) => renderStackedTableField(headerRow.children[columnIndex], row.children[columnIndex], columnIndex, context)
8269
8269
  ).filter((field) => field.length > 0).join("\n")
8270
8270
  ).filter((block) => block.length > 0);
8271
8271
  return blocks.length === 0 ? "" : `${blocks.join("\n\n")}
@@ -10633,92 +10633,9 @@ var init_dashboard2 = __esm({
10633
10633
  }
10634
10634
  });
10635
10635
 
10636
- // node_modules/sisteransi/src/index.js
10637
- var require_src = __commonJS({
10638
- "node_modules/sisteransi/src/index.js"(exports, module) {
10639
- "use strict";
10640
- var ESC2 = "\x1B";
10641
- var CSI = `${ESC2}[`;
10642
- var beep = "\x07";
10643
- var cursor = {
10644
- to(x, y) {
10645
- if (!y) return `${CSI}${x + 1}G`;
10646
- return `${CSI}${y + 1};${x + 1}H`;
10647
- },
10648
- move(x, y) {
10649
- let ret = "";
10650
- if (x < 0) ret += `${CSI}${-x}D`;
10651
- else if (x > 0) ret += `${CSI}${x}C`;
10652
- if (y < 0) ret += `${CSI}${-y}A`;
10653
- else if (y > 0) ret += `${CSI}${y}B`;
10654
- return ret;
10655
- },
10656
- up: (count = 1) => `${CSI}${count}A`,
10657
- down: (count = 1) => `${CSI}${count}B`,
10658
- forward: (count = 1) => `${CSI}${count}C`,
10659
- backward: (count = 1) => `${CSI}${count}D`,
10660
- nextLine: (count = 1) => `${CSI}E`.repeat(count),
10661
- prevLine: (count = 1) => `${CSI}F`.repeat(count),
10662
- left: `${CSI}G`,
10663
- hide: `${CSI}?25l`,
10664
- show: `${CSI}?25h`,
10665
- save: `${ESC2}7`,
10666
- restore: `${ESC2}8`
10667
- };
10668
- var scroll = {
10669
- up: (count = 1) => `${CSI}S`.repeat(count),
10670
- down: (count = 1) => `${CSI}T`.repeat(count)
10671
- };
10672
- var erase = {
10673
- screen: `${CSI}2J`,
10674
- up: (count = 1) => `${CSI}1J`.repeat(count),
10675
- down: (count = 1) => `${CSI}J`.repeat(count),
10676
- line: `${CSI}2K`,
10677
- lineEnd: `${CSI}K`,
10678
- lineStart: `${CSI}1K`,
10679
- lines(count) {
10680
- let clear = "";
10681
- for (let i = 0; i < count; i++)
10682
- clear += this.line + (i < count - 1 ? cursor.up() : "");
10683
- if (count)
10684
- clear += cursor.left;
10685
- return clear;
10686
- }
10687
- };
10688
- module.exports = { cursor, scroll, erase, beep };
10689
- }
10690
- });
10691
-
10692
- // node_modules/@clack/core/dist/index.mjs
10693
- import { stdout as R, stdin as q } from "node:process";
10694
- import * as k from "node:readline";
10695
- import ot from "node:readline";
10696
- import { ReadStream as J } from "node:tty";
10697
- function Ct(t) {
10698
- return t === z;
10699
- }
10700
- var import_sisteransi, P, ct, pt, ft, j, Q, dt, U, et, At, _, bt, z;
10701
- var init_dist = __esm({
10702
- "node_modules/@clack/core/dist/index.mjs"() {
10703
- import_sisteransi = __toESM(require_src(), 1);
10704
- P = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
10705
- ct = new RegExp("\\p{M}+", "gu");
10706
- pt = { limit: 1 / 0, ellipsis: "" };
10707
- ft = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
10708
- j = "\x07";
10709
- Q = "[";
10710
- dt = "]";
10711
- U = `${dt}8;;`;
10712
- et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
10713
- At = ["up", "down", "left", "right", "space", "enter", "cancel"];
10714
- _ = { actions: new Set(At), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true };
10715
- bt = globalThis.process.platform.startsWith("win");
10716
- z = /* @__PURE__ */ Symbol("clack:cancel");
10717
- }
10718
- });
10719
-
10720
10636
  // packages/design-system/src/prompts/primitives/cancel.ts
10721
10637
  import chalk10 from "chalk";
10638
+ import { isCancel } from "@clack/prompts";
10722
10639
  function cancel(msg = "") {
10723
10640
  if (resolveOutputFormat() !== "terminal") {
10724
10641
  return;
@@ -10730,7 +10647,6 @@ function cancel(msg = "") {
10730
10647
  var init_cancel = __esm({
10731
10648
  "packages/design-system/src/prompts/primitives/cancel.ts"() {
10732
10649
  "use strict";
10733
- init_dist();
10734
10650
  init_output_format();
10735
10651
  }
10736
10652
  });
@@ -10978,7 +10894,7 @@ async function confirm2(opts) {
10978
10894
  }
10979
10895
  async function confirmOrCancel(opts) {
10980
10896
  const result = await confirm2(opts);
10981
- if (Ct(result)) {
10897
+ if (isCancel(result)) {
10982
10898
  cancel("Operation cancelled.");
10983
10899
  throw new PromptCancelledError();
10984
10900
  }
@@ -12725,7 +12641,7 @@ var init_src7 = __esm({
12725
12641
  import path10 from "node:path";
12726
12642
  import { homedir as homedir3 } from "node:os";
12727
12643
  import { open, readdir } from "node:fs/promises";
12728
- import { createInterface as createInterface2 } from "node:readline";
12644
+ import { createInterface } from "node:readline";
12729
12645
  var init_replay = __esm({
12730
12646
  "packages/agent-spawn/src/acp/replay.ts"() {
12731
12647
  "use strict";
@@ -13420,7 +13336,7 @@ function toAcpMcpServers(servers) {
13420
13336
  name,
13421
13337
  command: server.command,
13422
13338
  args: server.args ?? [],
13423
- env: server.env ? Object.entries(server.env).map(([k2, v]) => ({ name: k2, value: v })) : []
13339
+ env: server.env ? Object.entries(server.env).map(([k, v]) => ({ name: k, value: v })) : []
13424
13340
  }));
13425
13341
  }
13426
13342
  function createAbortError3() {
@@ -15337,7 +15253,7 @@ function toToolErrorText(value) {
15337
15253
  async function waitForToolAck(options) {
15338
15254
  assertNotAborted(options.signal);
15339
15255
  let abortListener;
15340
- const abortPromise = new Promise((_2, reject) => {
15256
+ const abortPromise = new Promise((_, reject) => {
15341
15257
  abortListener = () => {
15342
15258
  reject(new AbortError("Run aborted.", options.signal.reason));
15343
15259
  };
@@ -19848,7 +19764,7 @@ var init_internal = __esm({
19848
19764
  }
19849
19765
  const signal = options.signal;
19850
19766
  let abortListener;
19851
- const abortPromise = new Promise((_2, reject) => {
19767
+ const abortPromise = new Promise((_, reject) => {
19852
19768
  const rejectWithAbortReason = () => {
19853
19769
  if (requestId !== void 0) {
19854
19770
  messageLayer.sendNotification("notifications/cancelled", { requestId });
@@ -22022,7 +21938,7 @@ var init_tasks = __esm({
22022
21938
  }
22023
21939
  });
22024
21940
 
22025
- // packages/agent-kit/src/paths.ts
21941
+ // packages/agent-harness-tools/src/paths.ts
22026
21942
  import path19 from "node:path";
22027
21943
  function resolveWorkflowPath(inputPath, cwd, homeDir) {
22028
21944
  if (inputPath.startsWith("~/")) {
@@ -22092,12 +22008,12 @@ async function discoverWorkflowDocs(options) {
22092
22008
  return [...docsByFileName.values()].sort((left, right) => left.localeCompare(right));
22093
22009
  }
22094
22010
  var init_paths = __esm({
22095
- "packages/agent-kit/src/paths.ts"() {
22011
+ "packages/agent-harness-tools/src/paths.ts"() {
22096
22012
  "use strict";
22097
22013
  }
22098
22014
  });
22099
22015
 
22100
- // packages/agent-kit/src/participant.ts
22016
+ // packages/agent-harness-tools/src/participant.ts
22101
22017
  function isRecord4(value) {
22102
22018
  return typeof value === "object" && value !== null && !Array.isArray(value);
22103
22019
  }
@@ -22172,13 +22088,13 @@ function selectParticipantAgent(participant, iteration) {
22172
22088
  return participant.agent[iteration % participant.agent.length];
22173
22089
  }
22174
22090
  var init_participant = __esm({
22175
- "packages/agent-kit/src/participant.ts"() {
22091
+ "packages/agent-harness-tools/src/participant.ts"() {
22176
22092
  "use strict";
22177
22093
  init_src2();
22178
22094
  }
22179
22095
  });
22180
22096
 
22181
- // packages/agent-kit/src/hooks.ts
22097
+ // packages/agent-harness-tools/src/hooks.ts
22182
22098
  function resolveDefaultParticipant(participants) {
22183
22099
  const defaultParticipant = participants.default;
22184
22100
  if (defaultParticipant !== void 0) {
@@ -22216,13 +22132,13 @@ async function runWorkflowHook(hook, context) {
22216
22132
  });
22217
22133
  }
22218
22134
  var init_hooks2 = __esm({
22219
- "packages/agent-kit/src/hooks.ts"() {
22135
+ "packages/agent-harness-tools/src/hooks.ts"() {
22220
22136
  "use strict";
22221
22137
  init_participant();
22222
22138
  }
22223
22139
  });
22224
22140
 
22225
- // packages/agent-kit/src/stage.ts
22141
+ // packages/agent-harness-tools/src/stage.ts
22226
22142
  function resolveStageParticipant(stage, participants) {
22227
22143
  const participant = participants[stage.participant];
22228
22144
  if (participant === void 0) {
@@ -22265,13 +22181,13 @@ async function runWorkflowStage(stage, context) {
22265
22181
  }
22266
22182
  }
22267
22183
  var init_stage = __esm({
22268
- "packages/agent-kit/src/stage.ts"() {
22184
+ "packages/agent-harness-tools/src/stage.ts"() {
22269
22185
  "use strict";
22270
22186
  init_participant();
22271
22187
  }
22272
22188
  });
22273
22189
 
22274
- // packages/agent-kit/src/lock.ts
22190
+ // packages/agent-harness-tools/src/lock.ts
22275
22191
  import * as fsPromises5 from "node:fs/promises";
22276
22192
  function createAbortError4() {
22277
22193
  const error2 = new Error("The operation was aborted.");
@@ -22379,12 +22295,12 @@ async function lockWorkflow(docPath, options = {}) {
22379
22295
  throw new Error(`Failed to acquire lock on "${docPath}".`);
22380
22296
  }
22381
22297
  var init_lock = __esm({
22382
- "packages/agent-kit/src/lock.ts"() {
22298
+ "packages/agent-harness-tools/src/lock.ts"() {
22383
22299
  "use strict";
22384
22300
  }
22385
22301
  });
22386
22302
 
22387
- // packages/agent-kit/src/runner.ts
22303
+ // packages/agent-harness-tools/src/runner.ts
22388
22304
  function isRecord5(value) {
22389
22305
  return typeof value === "object" && value !== null && !Array.isArray(value);
22390
22306
  }
@@ -22603,7 +22519,7 @@ async function runDocumentWorkflow(options) {
22603
22519
  }
22604
22520
  }
22605
22521
  var init_runner = __esm({
22606
- "packages/agent-kit/src/runner.ts"() {
22522
+ "packages/agent-harness-tools/src/runner.ts"() {
22607
22523
  "use strict";
22608
22524
  init_hooks2();
22609
22525
  init_lock();
@@ -22612,15 +22528,15 @@ var init_runner = __esm({
22612
22528
  }
22613
22529
  });
22614
22530
 
22615
- // packages/agent-kit/src/sequence.ts
22531
+ // packages/agent-harness-tools/src/sequence.ts
22616
22532
  var init_sequence = __esm({
22617
- "packages/agent-kit/src/sequence.ts"() {
22533
+ "packages/agent-harness-tools/src/sequence.ts"() {
22618
22534
  "use strict";
22619
22535
  init_runner();
22620
22536
  }
22621
22537
  });
22622
22538
 
22623
- // packages/agent-kit/src/run-logs.ts
22539
+ // packages/agent-harness-tools/src/run-logs.ts
22624
22540
  import path20 from "node:path";
22625
22541
  function resolveRunLogDir(options) {
22626
22542
  const slug = slugifyPlanPath(options.planPath);
@@ -22678,12 +22594,12 @@ function pad2(value, width) {
22678
22594
  return String(value).padStart(width, "0");
22679
22595
  }
22680
22596
  var init_run_logs = __esm({
22681
- "packages/agent-kit/src/run-logs.ts"() {
22597
+ "packages/agent-harness-tools/src/run-logs.ts"() {
22682
22598
  "use strict";
22683
22599
  }
22684
22600
  });
22685
22601
 
22686
- // packages/agent-kit/src/skill-config.ts
22602
+ // packages/agent-harness-tools/src/skill-config.ts
22687
22603
  function skillPlanConfigSection(subcommand) {
22688
22604
  return `## Plan Directory
22689
22605
 
@@ -22692,14 +22608,14 @@ Run \`poe-code ${subcommand} plan-path\` to get the resolved plan directory path
22692
22608
  Write the plan file to \`<plan-directory>/<name>.md\`.`;
22693
22609
  }
22694
22610
  var init_skill_config = __esm({
22695
- "packages/agent-kit/src/skill-config.ts"() {
22611
+ "packages/agent-harness-tools/src/skill-config.ts"() {
22696
22612
  "use strict";
22697
22613
  }
22698
22614
  });
22699
22615
 
22700
- // packages/agent-kit/src/index.ts
22616
+ // packages/agent-harness-tools/src/index.ts
22701
22617
  var init_src11 = __esm({
22702
- "packages/agent-kit/src/index.ts"() {
22618
+ "packages/agent-harness-tools/src/index.ts"() {
22703
22619
  "use strict";
22704
22620
  init_paths();
22705
22621
  init_participant();
@@ -24038,7 +23954,7 @@ var init_loop = __esm({
24038
23954
  }
24039
23955
  });
24040
23956
 
24041
- // packages/cmdkit-schema/src/index.ts
23957
+ // packages/toolcraft-schema/src/index.ts
24042
23958
  function withMetadata(schema, jsonSchema) {
24043
23959
  if (schema.description !== void 0) {
24044
23960
  jsonSchema.description = schema.description;
@@ -24166,7 +24082,7 @@ function toJsonSchema(schema) {
24166
24082
  }
24167
24083
  var S;
24168
24084
  var init_src12 = __esm({
24169
- "packages/cmdkit-schema/src/index.ts"() {
24085
+ "packages/toolcraft-schema/src/index.ts"() {
24170
24086
  "use strict";
24171
24087
  S = {
24172
24088
  String(options = {}) {
@@ -24219,7 +24135,7 @@ var init_src12 = __esm({
24219
24135
  }
24220
24136
  });
24221
24137
 
24222
- // packages/cmdkit/src/index.ts
24138
+ // packages/toolcraft/src/index.ts
24223
24139
  import { fileURLToPath as fileURLToPath2 } from "node:url";
24224
24140
  function cloneScope(scope) {
24225
24141
  return scope === void 0 ? void 0 : [...scope];
@@ -24292,7 +24208,7 @@ function inferCommandSourcePath() {
24292
24208
  if (candidate === void 0) {
24293
24209
  continue;
24294
24210
  }
24295
- if (candidate.includes("/packages/cmdkit/src/index.ts") || candidate.includes("/packages/cmdkit/dist/index.js")) {
24211
+ if (candidate.includes("/packages/toolcraft/src/index.ts") || candidate.includes("/packages/toolcraft/dist/index.js") || candidate.includes("/node_modules/toolcraft/dist/index.js")) {
24296
24212
  continue;
24297
24213
  }
24298
24214
  return candidate;
@@ -24585,12 +24501,12 @@ function getCommandSourcePath(command) {
24585
24501
  }
24586
24502
  var commandConfigSymbol, groupConfigSymbol, commandSourcePathSymbol, UserError;
24587
24503
  var init_src13 = __esm({
24588
- "packages/cmdkit/src/index.ts"() {
24504
+ "packages/toolcraft/src/index.ts"() {
24589
24505
  "use strict";
24590
24506
  init_src12();
24591
- commandConfigSymbol = /* @__PURE__ */ Symbol("cmdkit.command.config");
24592
- groupConfigSymbol = /* @__PURE__ */ Symbol("cmdkit.group.config");
24593
- commandSourcePathSymbol = /* @__PURE__ */ Symbol("cmdkit.command.sourcePath");
24507
+ commandConfigSymbol = /* @__PURE__ */ Symbol("toolcraft.command.config");
24508
+ groupConfigSymbol = /* @__PURE__ */ Symbol("toolcraft.group.config");
24509
+ commandSourcePathSymbol = /* @__PURE__ */ Symbol("toolcraft.command.sourcePath");
24594
24510
  UserError = class extends Error {
24595
24511
  constructor(message2) {
24596
24512
  super(message2);
@@ -25819,7 +25735,7 @@ async function resolveDocPath(options) {
25819
25735
  })),
25820
25736
  initialValue: docs[0]
25821
25737
  });
25822
- if (Ct(selected)) {
25738
+ if (isCancel(selected)) {
25823
25739
  cancel("Operation cancelled.");
25824
25740
  throw new UserError("Operation cancelled.");
25825
25741
  }
@@ -26588,13 +26504,13 @@ async function migrateServicesProviderIfNeeded(fs18, filePath) {
26588
26504
  }
26589
26505
  let needsMigration = false;
26590
26506
  const migrated = {};
26591
- for (const [k2, entry] of Object.entries(rawServices)) {
26507
+ for (const [k, entry] of Object.entries(rawServices)) {
26592
26508
  if (!isRecord10(entry)) continue;
26593
26509
  if (typeof entry.provider !== "string") {
26594
26510
  needsMigration = true;
26595
- migrated[k2] = { ...entry, provider: "poe" };
26511
+ migrated[k] = { ...entry, provider: "poe" };
26596
26512
  } else {
26597
- migrated[k2] = entry;
26513
+ migrated[k] = entry;
26598
26514
  }
26599
26515
  }
26600
26516
  if (needsMigration) {
@@ -33013,7 +32929,7 @@ async function runPlanBrowser(options) {
33013
32929
  value: plan.absolutePath
33014
32930
  }))
33015
32931
  });
33016
- if (Ct(selectedPath)) {
32932
+ if (isCancel(selectedPath)) {
33017
32933
  return;
33018
32934
  }
33019
32935
  const selectedPlan = plans.find((plan) => plan.absolutePath === selectedPath);
@@ -33032,7 +32948,7 @@ async function runPlanBrowser(options) {
33032
32948
  { label: "Delete", value: "delete" }
33033
32949
  ]
33034
32950
  });
33035
- if (Ct(action) || action === "back") {
32951
+ if (isCancel(action) || action === "back") {
33036
32952
  continue;
33037
32953
  }
33038
32954
  if (action === "edit") {
@@ -34187,7 +34103,7 @@ var init_src23 = __esm({
34187
34103
  }
34188
34104
  });
34189
34105
 
34190
- // packages/cmdkit/src/number-schema.ts
34106
+ // packages/toolcraft/src/number-schema.ts
34191
34107
  function isValidNumberSchemaValue(value, schema) {
34192
34108
  return typeof value === "number" && Number.isFinite(value) && (schema.jsonType !== "integer" || Number.isInteger(value));
34193
34109
  }
@@ -34195,12 +34111,12 @@ function getExpectedNumberDescription(schema) {
34195
34111
  return schema.jsonType === "integer" ? "an integer" : "a number";
34196
34112
  }
34197
34113
  var init_number_schema = __esm({
34198
- "packages/cmdkit/src/number-schema.ts"() {
34114
+ "packages/toolcraft/src/number-schema.ts"() {
34199
34115
  "use strict";
34200
34116
  }
34201
34117
  });
34202
34118
 
34203
- // packages/cmdkit/src/schema-scope.ts
34119
+ // packages/toolcraft/src/schema-scope.ts
34204
34120
  function filterSchemaForScope(schema, scope) {
34205
34121
  if (schema.scope !== void 0 && !schema.scope.includes(scope)) {
34206
34122
  return void 0;
@@ -34238,12 +34154,12 @@ function filterSchemaForScope(schema, scope) {
34238
34154
  }
34239
34155
  }
34240
34156
  var init_schema_scope = __esm({
34241
- "packages/cmdkit/src/schema-scope.ts"() {
34157
+ "packages/toolcraft/src/schema-scope.ts"() {
34242
34158
  "use strict";
34243
34159
  }
34244
34160
  });
34245
34161
 
34246
- // packages/cmdkit/src/mcp.ts
34162
+ // packages/toolcraft/src/mcp.ts
34247
34163
  import { access, readFile as readFile14, writeFile as writeFile10 } from "node:fs/promises";
34248
34164
  function normalizeRoots(roots) {
34249
34165
  if (!Array.isArray(roots)) {
@@ -34600,7 +34516,7 @@ async function runMCP(roots, options) {
34600
34516
  }
34601
34517
  var RESERVED_SERVICE_NAMES;
34602
34518
  var init_mcp2 = __esm({
34603
- "packages/cmdkit/src/mcp.ts"() {
34519
+ "packages/toolcraft/src/mcp.ts"() {
34604
34520
  "use strict";
34605
34521
  init_src23();
34606
34522
  init_src12();
@@ -34637,8 +34553,8 @@ var init_package = __esm({
34637
34553
  "dist"
34638
34554
  ],
34639
34555
  dependencies: {
34640
- "@poe-code/cmdkit": "*",
34641
- "@poe-code/cmdkit-schema": "*",
34556
+ toolcraft: "*",
34557
+ "toolcraft-schema": "*",
34642
34558
  "@poe-code/design-system": "*"
34643
34559
  }
34644
34560
  };
@@ -34856,7 +34772,7 @@ async function resolveSelectedPlan(options) {
34856
34772
  value: plan.absolutePath
34857
34773
  }))
34858
34774
  });
34859
- if (Ct(selected)) {
34775
+ if (isCancel(selected)) {
34860
34776
  throw new ValidationError("Plan selection cancelled.");
34861
34777
  }
34862
34778
  const matched = options.plans.find((plan) => plan.absolutePath === selected);
@@ -35182,7 +35098,7 @@ async function resolvePlanQuestion(value, assumeYes) {
35182
35098
  const entered = await text3({
35183
35099
  message: "What do you want to plan?"
35184
35100
  });
35185
- if (Ct(entered)) {
35101
+ if (isCancel(entered)) {
35186
35102
  cancel("Plan session cancelled.");
35187
35103
  return null;
35188
35104
  }
@@ -35240,7 +35156,7 @@ async function resolvePlanAgent(container, value, assumeYes) {
35240
35156
  message: "Select agent to install the plan skill for:",
35241
35157
  options: supportedAgents.map((name) => ({ value: name, label: name }))
35242
35158
  });
35243
- if (Ct(selected)) {
35159
+ if (isCancel(selected)) {
35244
35160
  cancel("Plan install cancelled.");
35245
35161
  return null;
35246
35162
  }
@@ -35263,7 +35179,7 @@ async function resolvePlanScope(options, assumeYes) {
35263
35179
  { value: "global", label: "Global" }
35264
35180
  ]
35265
35181
  });
35266
- if (Ct(selected)) {
35182
+ if (isCancel(selected)) {
35267
35183
  cancel("Plan install cancelled.");
35268
35184
  return null;
35269
35185
  }
@@ -38381,7 +38297,7 @@ async function selectAutomationName(message2, automations) {
38381
38297
  message: message2,
38382
38298
  options: automations.map((a) => ({ label: a.label ?? formatLabel(a.name), value: a.name }))
38383
38299
  });
38384
- if (Ct(selected)) {
38300
+ if (isCancel(selected)) {
38385
38301
  cancel("Operation cancelled.");
38386
38302
  throw new UserError("Operation cancelled.");
38387
38303
  }
@@ -39823,7 +39739,7 @@ var init_poe_agent2 = __esm({
39823
39739
  }
39824
39740
  });
39825
39741
 
39826
- // packages/cmdkit/src/renderer.ts
39742
+ // packages/toolcraft/src/renderer.ts
39827
39743
  function isObject(value) {
39828
39744
  return value !== null && typeof value === "object" && !Array.isArray(value);
39829
39745
  }
@@ -39984,22 +39900,22 @@ function renderResult(command, result, output, primitives, write2 = (chunk) => {
39984
39900
  }
39985
39901
  }
39986
39902
  var init_renderer3 = __esm({
39987
- "packages/cmdkit/src/renderer.ts"() {
39903
+ "packages/toolcraft/src/renderer.ts"() {
39988
39904
  "use strict";
39989
39905
  }
39990
39906
  });
39991
39907
 
39992
- // packages/cmdkit/src/cli.ts
39908
+ // packages/toolcraft/src/cli.ts
39993
39909
  import { access as access3, readFile as readFile20, writeFile as writeFile13 } from "node:fs/promises";
39994
39910
  import path64 from "node:path";
39995
39911
  import { Command as CommanderCommand, CommanderError, InvalidArgumentError, Option } from "commander";
39996
39912
  function inferProgramName(argv) {
39997
39913
  const entrypoint = argv[1];
39998
39914
  if (typeof entrypoint !== "string" || entrypoint.length === 0) {
39999
- return "cmdkit";
39915
+ return "toolcraft";
40000
39916
  }
40001
39917
  const parsed = path64.parse(entrypoint);
40002
- return parsed.name.length > 0 ? parsed.name : "cmdkit";
39918
+ return parsed.name.length > 0 ? parsed.name : "toolcraft";
40003
39919
  }
40004
39920
  function normalizeRoots2(roots, argv) {
40005
39921
  if (!Array.isArray(roots)) {
@@ -40604,7 +40520,7 @@ async function promptForField(field) {
40604
40520
  options,
40605
40521
  initialValue: field.hasDefault ? field.defaultValue : void 0
40606
40522
  });
40607
- if (Ct(selected)) {
40523
+ if (isCancel(selected)) {
40608
40524
  cancel("Operation cancelled.");
40609
40525
  throw new UserError("Operation cancelled.");
40610
40526
  }
@@ -40615,7 +40531,7 @@ async function promptForField(field) {
40615
40531
  message: field.displayPath,
40616
40532
  initialValue: field.hasDefault ? Boolean(field.defaultValue) : void 0
40617
40533
  });
40618
- if (Ct(selected)) {
40534
+ if (isCancel(selected)) {
40619
40535
  cancel("Operation cancelled.");
40620
40536
  throw new UserError("Operation cancelled.");
40621
40537
  }
@@ -40625,7 +40541,7 @@ async function promptForField(field) {
40625
40541
  message: field.displayPath,
40626
40542
  initialValue: field.hasDefault && field.defaultValue !== void 0 ? formatResolvedValue(field.defaultValue) : void 0
40627
40543
  });
40628
- if (Ct(entered)) {
40544
+ if (isCancel(entered)) {
40629
40545
  cancel("Operation cancelled.");
40630
40546
  throw new UserError("Operation cancelled.");
40631
40547
  }
@@ -41046,7 +40962,7 @@ function createFixtureEnvValues(command) {
41046
40962
  return values;
41047
40963
  }
41048
40964
  async function resolveFixtureRuntime(command, services, requirementOptions) {
41049
- const selector = process.env.CMDKIT_FIXTURE;
40965
+ const selector = process.env.TOOLCRAFT_FIXTURE;
41050
40966
  if (selector === void 0 || selector.length === 0) {
41051
40967
  return {
41052
40968
  env: createEnv2(),
@@ -41193,7 +41109,7 @@ async function executeCommand(state, services, requirementOptions) {
41193
41109
  message: "Proceed?",
41194
41110
  initialValue: true
41195
41111
  });
41196
- if (Ct(proceed)) {
41112
+ if (isCancel(proceed)) {
41197
41113
  cancel("Operation cancelled.");
41198
41114
  throw new UserError("Operation cancelled.");
41199
41115
  }
@@ -41274,7 +41190,7 @@ async function runCLI(roots, options = {}) {
41274
41190
  }
41275
41191
  var RESERVED_SERVICE_NAMES2, HELP_FLAGS, GLOBAL_LONG_OPTION_FLAGS, DESIGN_SYSTEM_OUTPUT_BY_MODE;
41276
41192
  var init_cli = __esm({
41277
- "packages/cmdkit/src/cli.ts"() {
41193
+ "packages/toolcraft/src/cli.ts"() {
41278
41194
  "use strict";
41279
41195
  init_src6();
41280
41196
  init_src13();
@@ -41408,7 +41324,7 @@ function createCliContainer(dependencies) {
41408
41324
  checkAuth: async (apiKey) => await checkAuth({ apiKey }) !== null,
41409
41325
  confirm: async (message2) => {
41410
41326
  const result = await confirm2({ message: message2 });
41411
- if (Ct(result)) {
41327
+ if (isCancel(result)) {
41412
41328
  cancel("Operation cancelled.");
41413
41329
  throw new OperationCancelledError();
41414
41330
  }
@@ -42020,7 +41936,7 @@ async function confirmUnconfiguredService(container, service, label, flags) {
42020
41936
  const shouldProceed = await confirm2({
42021
41937
  message: `${label} is not configured via poe. Do you want to proceed?`
42022
41938
  });
42023
- if (Ct(shouldProceed)) {
41939
+ if (isCancel(shouldProceed)) {
42024
41940
  throw new OperationCancelledError();
42025
41941
  }
42026
41942
  return shouldProceed === true;
@@ -42080,8 +41996,9 @@ function parseMcpSpawnConfig2(input) {
42080
41996
  "--mcp-servers must be an object in this shape: {name: {command, args?, env?}}"
42081
41997
  );
42082
41998
  }
41999
+ const source = "mcpServers" in parsed && isObjectRecord6(parsed.mcpServers) ? parsed.mcpServers : parsed;
42083
42000
  const servers = {};
42084
- for (const [name, value] of Object.entries(parsed)) {
42001
+ for (const [name, value] of Object.entries(source)) {
42085
42002
  if (!isObjectRecord6(value)) {
42086
42003
  throw new ValidationError(
42087
42004
  `--mcp-servers entry "${name}" must be an object: {command, args?, env?}`
@@ -42286,7 +42203,7 @@ async function isolatedEnvRunner(input) {
42286
42203
  ...details.env
42287
42204
  }
42288
42205
  });
42289
- return await new Promise((_2, reject) => {
42206
+ return await new Promise((_, reject) => {
42290
42207
  child.on("error", (error2) => {
42291
42208
  reject(error2);
42292
42209
  });
@@ -43094,7 +43011,7 @@ function registerUtilsSymlinkSkillsCommand(parent, container) {
43094
43011
  { value: "local", label: "Local" }
43095
43012
  ]
43096
43013
  });
43097
- if (Ct(selected)) {
43014
+ if (isCancel(selected)) {
43098
43015
  cancel("Operation cancelled");
43099
43016
  return;
43100
43017
  }
@@ -44590,7 +44507,7 @@ ${formatMcpToolsDocs()}`).action(async (options) => {
44590
44507
  message: "Select agent to configure:",
44591
44508
  options: supportedAgents2.map((a) => ({ value: a, label: a }))
44592
44509
  });
44593
- if (Ct(selected)) {
44510
+ if (isCancel(selected)) {
44594
44511
  cancel("Operation cancelled");
44595
44512
  return;
44596
44513
  }
@@ -44737,7 +44654,7 @@ function registerSkillCommand(program, container) {
44737
44654
  message: "Select agent to configure:",
44738
44655
  options: supportedAgents.map((a) => ({ value: a, label: a }))
44739
44656
  });
44740
- if (Ct(selected)) {
44657
+ if (isCancel(selected)) {
44741
44658
  cancel("Operation cancelled");
44742
44659
  return;
44743
44660
  }
@@ -44770,7 +44687,7 @@ function registerSkillCommand(program, container) {
44770
44687
  { value: "local", label: "Local" }
44771
44688
  ]
44772
44689
  });
44773
- if (Ct(selected)) {
44690
+ if (isCancel(selected)) {
44774
44691
  cancel("Operation cancelled");
44775
44692
  return;
44776
44693
  }
@@ -44820,7 +44737,7 @@ function registerSkillCommand(program, container) {
44820
44737
  message: "Select agent to unconfigure:",
44821
44738
  options: supportedAgents.map((a) => ({ value: a, label: a }))
44822
44739
  });
44823
- if (Ct(selected)) {
44740
+ if (isCancel(selected)) {
44824
44741
  cancel("Operation cancelled");
44825
44742
  return;
44826
44743
  }
@@ -44851,7 +44768,7 @@ function registerSkillCommand(program, container) {
44851
44768
  { value: "local", label: "Local" }
44852
44769
  ]
44853
44770
  });
44854
- if (Ct(selected)) {
44771
+ if (isCancel(selected)) {
44855
44772
  cancel("Operation cancelled");
44856
44773
  return;
44857
44774
  }
@@ -45213,7 +45130,7 @@ function registerUsageCommand(program, container) {
45213
45130
  startingAfter = result.data[result.data.length - 1].query_id;
45214
45131
  if (maxPages === void 0) {
45215
45132
  const shouldContinue = await confirm2({ message: "Load more?" });
45216
- if (Ct(shouldContinue)) {
45133
+ if (isCancel(shouldContinue)) {
45217
45134
  throw new OperationCancelledError();
45218
45135
  }
45219
45136
  if (!shouldContinue) {
@@ -46148,7 +46065,7 @@ function registerPipelineCommand(program, container) {
46148
46065
  label: value
46149
46066
  }))
46150
46067
  });
46151
- if (Ct(selected)) {
46068
+ if (isCancel(selected)) {
46152
46069
  cancel("Pipeline run cancelled.");
46153
46070
  return;
46154
46071
  }
@@ -46170,7 +46087,7 @@ function registerPipelineCommand(program, container) {
46170
46087
  fs: container.fs,
46171
46088
  selectPlans: async (input) => {
46172
46089
  const selected = await multiselect2(input);
46173
- if (Ct(selected)) {
46090
+ if (isCancel(selected)) {
46174
46091
  cancel("Pipeline run cancelled.");
46175
46092
  return null;
46176
46093
  }
@@ -46178,7 +46095,7 @@ function registerPipelineCommand(program, container) {
46178
46095
  },
46179
46096
  promptForPath: async (input) => {
46180
46097
  const value = await text3(input);
46181
- if (Ct(value)) {
46098
+ if (isCancel(value)) {
46182
46099
  cancel("Pipeline run cancelled.");
46183
46100
  return null;
46184
46101
  }
@@ -46304,7 +46221,7 @@ function registerPipelineCommand(program, container) {
46304
46221
  label: value
46305
46222
  }))
46306
46223
  });
46307
- if (Ct(selected)) {
46224
+ if (isCancel(selected)) {
46308
46225
  cancel("Pipeline init cancelled.");
46309
46226
  return;
46310
46227
  }
@@ -46337,7 +46254,7 @@ function registerPipelineCommand(program, container) {
46337
46254
  })),
46338
46255
  required: true
46339
46256
  });
46340
- if (Ct(selected)) {
46257
+ if (isCancel(selected)) {
46341
46258
  cancel("Pipeline init cancelled.");
46342
46259
  return;
46343
46260
  }
@@ -46507,7 +46424,7 @@ function registerPipelineCommand(program, container) {
46507
46424
  label: value
46508
46425
  }))
46509
46426
  });
46510
- if (Ct(selected)) {
46427
+ if (isCancel(selected)) {
46511
46428
  cancel("Pipeline install cancelled.");
46512
46429
  return;
46513
46430
  }
@@ -46533,7 +46450,7 @@ function registerPipelineCommand(program, container) {
46533
46450
  { value: "global", label: "Global" }
46534
46451
  ]
46535
46452
  });
46536
- if (Ct(selected)) {
46453
+ if (isCancel(selected)) {
46537
46454
  cancel("Pipeline install cancelled.");
46538
46455
  return;
46539
46456
  }
@@ -46895,7 +46812,7 @@ async function resolveDocPath2(options) {
46895
46812
  value: doc.path
46896
46813
  }))
46897
46814
  });
46898
- if (Ct(selected)) {
46815
+ if (isCancel(selected)) {
46899
46816
  cancel("Ralph run cancelled.");
46900
46817
  return null;
46901
46818
  }
@@ -46943,7 +46860,7 @@ async function promptForAgent(container, program) {
46943
46860
  value: config.agentId
46944
46861
  }))
46945
46862
  });
46946
- if (Ct(selected)) {
46863
+ if (isCancel(selected)) {
46947
46864
  cancel("Ralph run cancelled.");
46948
46865
  return null;
46949
46866
  }
@@ -46975,7 +46892,7 @@ async function resolveRunIterations(options) {
46975
46892
  const entered = await text3({
46976
46893
  message: "How many Ralph iterations should run?"
46977
46894
  });
46978
- if (Ct(entered)) {
46895
+ if (isCancel(entered)) {
46979
46896
  cancel("Ralph run cancelled.");
46980
46897
  return null;
46981
46898
  }
@@ -46999,7 +46916,7 @@ async function resolveInitIterations(options) {
46999
46916
  const entered = await text3({
47000
46917
  message: "How many Ralph iterations should run?"
47001
46918
  });
47002
- if (Ct(entered)) {
46919
+ if (isCancel(entered)) {
47003
46920
  cancel("Ralph init cancelled.");
47004
46921
  return null;
47005
46922
  }
@@ -47031,7 +46948,7 @@ function expandAgentList(agent2, iterations) {
47031
46948
  return [];
47032
46949
  }
47033
46950
  const count = normalizeConfiguredIterations(iterations) ?? agent2.length;
47034
- return Array.from({ length: count }, (_2, index) => agent2[index % agent2.length]);
46951
+ return Array.from({ length: count }, (_, index) => agent2[index % agent2.length]);
47035
46952
  }
47036
46953
  function registerRalphCommand(program, container) {
47037
46954
  const ralph = program.command("ralph").description("Run a simple iterative markdown loop.").addHelpCommand(false);
@@ -47539,7 +47456,7 @@ async function resolveDocPath3(options) {
47539
47456
  value: doc.path
47540
47457
  }))
47541
47458
  });
47542
- if (Ct(selected)) {
47459
+ if (isCancel(selected)) {
47543
47460
  cancel(options.cancelMessage);
47544
47461
  return null;
47545
47462
  }
@@ -47573,7 +47490,7 @@ async function promptForAgent2(container, program) {
47573
47490
  value: config.agentId
47574
47491
  }))
47575
47492
  });
47576
- if (Ct(selected)) {
47493
+ if (isCancel(selected)) {
47577
47494
  cancel("Experiment run cancelled.");
47578
47495
  return null;
47579
47496
  }
@@ -47664,7 +47581,7 @@ function registerExperimentCommand(program, container) {
47664
47581
  resources.logger.info(` Reset to ${targetHash.slice(0, 7)}`);
47665
47582
  },
47666
47583
  onExperimentComplete(index, entry) {
47667
- const scores = entry.scores ? Object.entries(entry.scores).map(([k2, v]) => `${k2}=${v}`).join(", ") : "-";
47584
+ const scores = entry.scores ? Object.entries(entry.scores).map(([k, v]) => `${k}=${v}`).join(", ") : "-";
47668
47585
  resources.logger.info(
47669
47586
  `Experiment ${index} ${entry.status} in ${formatDashboardDuration(entry.durationMs)} \xB7 scores: ${scores}`
47670
47587
  );
@@ -47731,7 +47648,7 @@ function registerExperimentCommand(program, container) {
47731
47648
  const rows = entries.map((entry, index) => ({
47732
47649
  index: String(index + 1),
47733
47650
  status: entry.status,
47734
- scores: entry.scores ? Object.entries(entry.scores).map(([k2, v]) => `${k2}=${v}`).join(", ") : "-",
47651
+ scores: entry.scores ? Object.entries(entry.scores).map(([k, v]) => `${k}=${v}`).join(", ") : "-",
47735
47652
  duration: formatDashboardDuration(entry.durationMs),
47736
47653
  timestamp: entry.timestamp,
47737
47654
  commit: entry.commit,
@@ -47875,7 +47792,7 @@ function registerExperimentCommand(program, container) {
47875
47792
  label: value
47876
47793
  }))
47877
47794
  });
47878
- if (Ct(selected)) {
47795
+ if (isCancel(selected)) {
47879
47796
  cancel("Experiment install cancelled.");
47880
47797
  return;
47881
47798
  }
@@ -47901,7 +47818,7 @@ function registerExperimentCommand(program, container) {
47901
47818
  { value: "global", label: "Global" }
47902
47819
  ]
47903
47820
  });
47904
- if (Ct(selected)) {
47821
+ if (isCancel(selected)) {
47905
47822
  cancel("Experiment install cancelled.");
47906
47823
  return;
47907
47824
  }
@@ -48156,7 +48073,7 @@ async function resolveProcessId(value) {
48156
48073
  const entered = await text3({
48157
48074
  message: "Process ID"
48158
48075
  });
48159
- if (Ct(entered)) {
48076
+ if (isCancel(entered)) {
48160
48077
  cancel("Launch start cancelled.");
48161
48078
  return null;
48162
48079
  }
@@ -48173,7 +48090,7 @@ async function resolveCommandParts(commandArgs) {
48173
48090
  const entered = await text3({
48174
48091
  message: "Command to run"
48175
48092
  });
48176
- if (Ct(entered)) {
48093
+ if (isCancel(entered)) {
48177
48094
  cancel("Launch start cancelled.");
48178
48095
  return null;
48179
48096
  }
@@ -48197,7 +48114,7 @@ async function resolveRuntime(options) {
48197
48114
  { label: "docker", value: "docker" }
48198
48115
  ]
48199
48116
  });
48200
- if (Ct(selected)) {
48117
+ if (isCancel(selected)) {
48201
48118
  cancel("Launch start cancelled.");
48202
48119
  return null;
48203
48120
  }
@@ -48210,7 +48127,7 @@ async function resolveDockerImage(value) {
48210
48127
  const entered = await text3({
48211
48128
  message: "Docker image"
48212
48129
  });
48213
- if (Ct(entered)) {
48130
+ if (isCancel(entered)) {
48214
48131
  cancel("Launch start cancelled.");
48215
48132
  return null;
48216
48133
  }
@@ -48235,7 +48152,7 @@ async function resolveRestart(restart, assumeYes) {
48235
48152
  { label: "always", value: "always" }
48236
48153
  ]
48237
48154
  });
48238
- if (Ct(selected)) {
48155
+ if (isCancel(selected)) {
48239
48156
  cancel("Launch start cancelled.");
48240
48157
  return null;
48241
48158
  }
@@ -49632,7 +49549,7 @@ var init_package2 = __esm({
49632
49549
  "package.json"() {
49633
49550
  package_default2 = {
49634
49551
  name: "poe-code",
49635
- version: "3.0.187",
49552
+ version: "3.0.188",
49636
49553
  description: "CLI tool to configure Poe API for developer workflows.",
49637
49554
  type: "module",
49638
49555
  main: "./dist/index.js",
@@ -49642,29 +49559,9 @@ var init_package2 = __esm({
49642
49559
  types: "./dist/index.d.ts",
49643
49560
  import: "./dist/index.js"
49644
49561
  },
49645
- "./cmdkit": {
49646
- types: "./packages/cmdkit/dist/index.d.ts",
49647
- import: "./packages/cmdkit/dist/index.js"
49648
- },
49649
- "./cmdkit/cli": {
49650
- types: "./packages/cmdkit/dist/cli.d.ts",
49651
- import: "./packages/cmdkit/dist/cli.js"
49652
- },
49653
- "./cmdkit/mcp": {
49654
- types: "./packages/cmdkit/dist/mcp.d.ts",
49655
- import: "./packages/cmdkit/dist/mcp.js"
49656
- },
49657
- "./cmdkit/sdk": {
49658
- types: "./packages/cmdkit/dist/sdk.d.ts",
49659
- import: "./packages/cmdkit/dist/sdk.js"
49660
- },
49661
49562
  "./memory": {
49662
49563
  types: "./packages/memory/dist/index.d.ts",
49663
49564
  import: "./packages/memory/dist/index.js"
49664
- },
49665
- "./cmdkit-openapi": {
49666
- types: "./packages/cmdkit-openapi/dist/index.d.ts",
49667
- import: "./packages/cmdkit-openapi/dist/index.js"
49668
49565
  }
49669
49566
  },
49670
49567
  workspaces: [
@@ -49723,7 +49620,9 @@ var init_package2 = __esm({
49723
49620
  "metric:test_duration": "node scripts/metric-test-duration.mjs",
49724
49621
  "demo:dashboard": "tsx packages/design-system/src/dashboard/demo.ts",
49725
49622
  replay: "tsx packages/agent-spawn/src/acp/replay-cli.ts",
49726
- "codegen:plan-schemas": "tsx scripts/generate-plan-schemas.ts"
49623
+ "codegen:plan-schemas": "tsx scripts/generate-plan-schemas.ts",
49624
+ "smoke:toolcraft-standalone": "node scripts/verify-toolcraft-standalone.mjs",
49625
+ "sync-skills": "tsx scripts/sync-skills.ts"
49727
49626
  },
49728
49627
  bin: {
49729
49628
  poe: "dist/bin.cjs",
@@ -49739,9 +49638,6 @@ var init_package2 = __esm({
49739
49638
  "dist",
49740
49639
  "packages/agent-mcp-config/dist",
49741
49640
  "packages/agent-skill-config/dist",
49742
- "packages/cmdkit/dist",
49743
- "packages/cmdkit-openapi/dist",
49744
- "packages/cmdkit-schema/dist",
49745
49641
  "packages/config-mutations/dist",
49746
49642
  "packages/design-system/dist",
49747
49643
  "packages/memory/dist",
@@ -49774,14 +49670,11 @@ var init_package2 = __esm({
49774
49670
  "@eslint/js": "^9.0.0",
49775
49671
  "@modelcontextprotocol/sdk": "^1.26.0",
49776
49672
  "@poe-code/agent-defs": "*",
49777
- "@poe-code/agent-kit": "*",
49673
+ "@poe-code/agent-harness-tools": "*",
49778
49674
  "@poe-code/agent-mcp-config": "*",
49779
49675
  "@poe-code/agent-skill-config": "*",
49780
49676
  "@poe-code/agent-spawn": "*",
49781
49677
  "@poe-code/cached-resource": "*",
49782
- "@poe-code/cmdkit": "*",
49783
- "@poe-code/cmdkit-openapi": "*",
49784
- "@poe-code/cmdkit-schema": "*",
49785
49678
  "@poe-code/config-extends": "*",
49786
49679
  "@poe-code/config-mutations": "*",
49787
49680
  "@poe-code/design-system": "*",
@@ -49796,8 +49689,9 @@ var init_package2 = __esm({
49796
49689
  "@poe-code/poe-agent": "*",
49797
49690
  "@poe-code/poe-code-config": "*",
49798
49691
  "@poe-code/process-launcher": "*",
49799
- "@poe-code/providers": "*",
49800
49692
  "@poe-code/process-runner": "*",
49693
+ "@poe-code/providers": "*",
49694
+ "@poe-code/py-poe-spawn": "*",
49801
49695
  "@poe-code/ralph": "*",
49802
49696
  "@poe-code/superintendent": "*",
49803
49697
  "@poe-code/workspace-resolver": "*",
@@ -49806,6 +49700,9 @@ var init_package2 = __esm({
49806
49700
  "@types/node": "^25.2.2",
49807
49701
  "@types/semver": "^7.7.1",
49808
49702
  "@vitest/coverage-v8": "^4.1.4",
49703
+ toolcraft: "*",
49704
+ "toolcraft-openapi": "*",
49705
+ "toolcraft-schema": "*",
49809
49706
  "auth-store": "*",
49810
49707
  bats: "^1.13.0",
49811
49708
  eslint: "^9.0.0",
@@ -50033,7 +49930,7 @@ function resolveRootHelpHeading(argv) {
50033
49930
  }
50034
49931
  return "Poe - poe-code";
50035
49932
  }
50036
- function buildCmdkitArgv(argv, group) {
49933
+ function buildToolcraftArgv(argv, group) {
50037
49934
  const entry = argv[0] ?? "node";
50038
49935
  const script = argv[1] ?? "cli";
50039
49936
  const commandNames = /* @__PURE__ */ new Set([group.name, ...group.aliases]);
@@ -50041,7 +49938,7 @@ function buildCmdkitArgv(argv, group) {
50041
49938
  if (commandIndex < 0) {
50042
49939
  return [entry, script];
50043
49940
  }
50044
- const forwardedFlags = argv.slice(2, commandIndex).filter((value) => FORWARDABLE_CMDKIT_FLAGS.has(value));
49941
+ const forwardedFlags = argv.slice(2, commandIndex).filter((value) => FORWARDABLE_TOOLCRAFT_FLAGS.has(value));
50045
49942
  const commandArgs = argv.slice(commandIndex + 1);
50046
49943
  if (commandArgs.length === 0) {
50047
49944
  return [entry, script, ...forwardedFlags, "--help"];
@@ -50104,7 +50001,7 @@ function bootstrapProgram(container) {
50104
50001
  registerProviderCommand(program, container);
50105
50002
  program.command(ghGroup.name).description(ghGroup.description ?? "").aliases(ghGroup.aliases).argument("[args...]").allowUnknownOption().allowExcessArguments().helpOption(false).action(async () => {
50106
50003
  const originalArgv = [...process.argv];
50107
- process.argv = buildCmdkitArgv(originalArgv, ghGroup);
50004
+ process.argv = buildToolcraftArgv(originalArgv, ghGroup);
50108
50005
  try {
50109
50006
  await runCLI(ghGroup, { rootDisplayName: `Poe - ${ghGroup.name}`, rootUsageName: `${usageCommand} ${ghGroup.name}` });
50110
50007
  } finally {
@@ -50113,7 +50010,7 @@ function bootstrapProgram(container) {
50113
50010
  });
50114
50011
  program.command(superintendentGroup.name).description(superintendentGroup.description ?? "").aliases(superintendentGroup.aliases).argument("[args...]").allowUnknownOption().allowExcessArguments().helpOption(false).action(async () => {
50115
50012
  const originalArgv = [...process.argv];
50116
- process.argv = buildCmdkitArgv(originalArgv, superintendentGroup);
50013
+ process.argv = buildToolcraftArgv(originalArgv, superintendentGroup);
50117
50014
  try {
50118
50015
  await runCLI(superintendentGroup, {
50119
50016
  rootDisplayName: `Poe - ${superintendentGroup.name}`,
@@ -50157,7 +50054,7 @@ function suppressCommanderOutput(command) {
50157
50054
  suppressCommanderOutput(child);
50158
50055
  }
50159
50056
  }
50160
- var ROOT_HELP_COMMAND_SPECS, FORWARDABLE_CMDKIT_FLAGS;
50057
+ var ROOT_HELP_COMMAND_SPECS, FORWARDABLE_TOOLCRAFT_FLAGS;
50161
50058
  var init_program = __esm({
50162
50059
  async "src/cli/program.ts"() {
50163
50060
  "use strict";
@@ -50238,7 +50135,7 @@ var init_program = __esm({
50238
50135
  { path: ["usage", "list"] },
50239
50136
  { path: ["utils", "config"] }
50240
50137
  ];
50241
- FORWARDABLE_CMDKIT_FLAGS = /* @__PURE__ */ new Set(["-y", "--yes", "--verbose"]);
50138
+ FORWARDABLE_TOOLCRAFT_FLAGS = /* @__PURE__ */ new Set(["-y", "--yes", "--verbose"]);
50242
50139
  }
50243
50140
  });
50244
50141
 
@@ -50262,7 +50159,7 @@ function createPromptRunner(adapter = {
50262
50159
  text: text3,
50263
50160
  password: password2,
50264
50161
  select: select2,
50265
- isCancel: Ct,
50162
+ isCancel,
50266
50163
  cancel
50267
50164
  }) {
50268
50165
  const runPrompt = async (descriptor) => {