@cleocode/adapters 2026.11.1-canary.5 → 2026.11.1-canary.7

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 (50) hide show
  1. package/dist/.source-stamp.json +1 -1
  2. package/dist/index.js +105 -217
  3. package/dist/index.js.map +3 -3
  4. package/dist/providers/claude-code/spawn.d.ts +19 -0
  5. package/dist/providers/claude-code/spawn.d.ts.map +1 -1
  6. package/dist/providers/claude-sdk/spawn.d.ts +6 -0
  7. package/dist/providers/claude-sdk/spawn.d.ts.map +1 -1
  8. package/dist/providers/codex/spawn.d.ts +2 -0
  9. package/dist/providers/codex/spawn.d.ts.map +1 -1
  10. package/dist/providers/cursor/spawn.d.ts +2 -0
  11. package/dist/providers/cursor/spawn.d.ts.map +1 -1
  12. package/dist/providers/gemini-cli/spawn.d.ts +2 -0
  13. package/dist/providers/gemini-cli/spawn.d.ts.map +1 -1
  14. package/dist/providers/kimi/spawn.d.ts +2 -0
  15. package/dist/providers/kimi/spawn.d.ts.map +1 -1
  16. package/dist/providers/openai-sdk/adapter.d.ts +1 -1
  17. package/dist/providers/openai-sdk/index.d.ts +0 -1
  18. package/dist/providers/openai-sdk/index.d.ts.map +1 -1
  19. package/dist/providers/openai-sdk/spawn.d.ts +4 -2
  20. package/dist/providers/openai-sdk/spawn.d.ts.map +1 -1
  21. package/dist/providers/openai-sdk/tracing.d.ts +8 -82
  22. package/dist/providers/openai-sdk/tracing.d.ts.map +1 -1
  23. package/dist/providers/opencode/spawn.d.ts +2 -0
  24. package/dist/providers/opencode/spawn.d.ts.map +1 -1
  25. package/dist/providers/pi/spawn.d.ts +2 -0
  26. package/dist/providers/pi/spawn.d.ts.map +1 -1
  27. package/dist/providers/shared/lead-tool-strip.d.ts +52 -0
  28. package/dist/providers/shared/lead-tool-strip.d.ts.map +1 -0
  29. package/package.json +6 -6
  30. package/src/__tests__/harness-interop.test.ts +0 -7
  31. package/src/providers/claude-code/spawn.ts +28 -10
  32. package/src/providers/claude-sdk/__tests__/spawn.test.ts +44 -3
  33. package/src/providers/claude-sdk/spawn.ts +14 -1
  34. package/src/providers/codex/spawn.ts +5 -0
  35. package/src/providers/cursor/spawn.ts +3 -0
  36. package/src/providers/gemini-cli/spawn.ts +5 -0
  37. package/src/providers/kimi/spawn.ts +5 -0
  38. package/src/providers/openai-sdk/__tests__/openai-sdk-spawn.test.ts +0 -80
  39. package/src/providers/openai-sdk/adapter.ts +1 -1
  40. package/src/providers/openai-sdk/index.ts +0 -1
  41. package/src/providers/openai-sdk/manifest.json +1 -1
  42. package/src/providers/openai-sdk/spawn.ts +10 -16
  43. package/src/providers/openai-sdk/tracing.ts +8 -169
  44. package/src/providers/opencode/spawn.ts +5 -0
  45. package/src/providers/pi/spawn.ts +5 -0
  46. package/src/providers/shared/__tests__/lead-tool-strip.test.ts +86 -0
  47. package/src/providers/shared/lead-tool-strip.ts +76 -0
  48. package/dist/providers/shared/conduit-trace-writer.d.ts +0 -72
  49. package/dist/providers/shared/conduit-trace-writer.d.ts.map +0 -1
  50. package/src/providers/shared/conduit-trace-writer.ts +0 -101
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "schema": 2,
3
- "sourceHash": "79af05ee5a21e77aae05600f90b6bd976e7356305d9f6cd4de1f97cb630f7704"
3
+ "sourceHash": "7df29811fa914e44b232d26641d31b5da6924c476227aba4c2fe2f0d6ded3a68"
4
4
  }
package/dist/index.js CHANGED
@@ -3067,12 +3067,6 @@ var init_operations_registry = __esm({
3067
3067
  required: false,
3068
3068
  description: "Include lifecycle stage history in the response"
3069
3069
  },
3070
- {
3071
- name: "ivtr-history",
3072
- type: "boolean",
3073
- required: false,
3074
- description: "Include IVTR phase chain history in the response"
3075
- },
3076
3070
  {
3077
3071
  name: "relations",
3078
3072
  type: "boolean",
@@ -3860,114 +3854,6 @@ var init_operations_registry = __esm({
3860
3854
  }
3861
3855
  ]
3862
3856
  },
3863
- // T811 — IVTR multi-agent enforcement
3864
- {
3865
- gateway: "query",
3866
- domain: "orchestrate",
3867
- operation: "ivtr.status",
3868
- description: "orchestrate.ivtr.status (query) \u2014 current IVTR phase + history",
3869
- tier: 1,
3870
- idempotent: true,
3871
- sessionRequired: false,
3872
- requiredParams: ["taskId"],
3873
- params: [
3874
- {
3875
- name: "taskId",
3876
- type: "string",
3877
- required: true,
3878
- description: "taskId parameter",
3879
- cli: { positional: true }
3880
- }
3881
- ]
3882
- },
3883
- {
3884
- gateway: "mutate",
3885
- domain: "orchestrate",
3886
- operation: "ivtr.start",
3887
- description: "orchestrate.ivtr.start (mutate) \u2014 begin Implement phase",
3888
- tier: 1,
3889
- idempotent: false,
3890
- sessionRequired: true,
3891
- requiredParams: ["taskId"],
3892
- params: [
3893
- {
3894
- name: "taskId",
3895
- type: "string",
3896
- required: true,
3897
- description: "taskId parameter",
3898
- cli: { positional: true }
3899
- }
3900
- ]
3901
- },
3902
- {
3903
- gateway: "mutate",
3904
- domain: "orchestrate",
3905
- operation: "ivtr.next",
3906
- description: "orchestrate.ivtr.next (mutate) \u2014 advance to next phase (requires prior evidence)",
3907
- tier: 1,
3908
- idempotent: false,
3909
- sessionRequired: true,
3910
- requiredParams: ["taskId"],
3911
- params: [
3912
- {
3913
- name: "taskId",
3914
- type: "string",
3915
- required: true,
3916
- description: "taskId parameter",
3917
- cli: { positional: true }
3918
- }
3919
- ]
3920
- },
3921
- {
3922
- gateway: "mutate",
3923
- domain: "orchestrate",
3924
- operation: "ivtr.release",
3925
- description: "orchestrate.ivtr.release (mutate) \u2014 final gate, requires I+V+T evidence",
3926
- tier: 1,
3927
- idempotent: false,
3928
- sessionRequired: true,
3929
- requiredParams: ["taskId"],
3930
- params: [
3931
- {
3932
- name: "taskId",
3933
- type: "string",
3934
- required: true,
3935
- description: "taskId parameter",
3936
- cli: { positional: true }
3937
- }
3938
- ]
3939
- },
3940
- {
3941
- gateway: "mutate",
3942
- domain: "orchestrate",
3943
- operation: "ivtr.loop-back",
3944
- description: "orchestrate.ivtr.loop-back (mutate) \u2014 rewind to phase on failure",
3945
- tier: 1,
3946
- idempotent: false,
3947
- sessionRequired: true,
3948
- requiredParams: ["taskId", "phase", "reason"],
3949
- params: [
3950
- {
3951
- name: "taskId",
3952
- type: "string",
3953
- required: true,
3954
- description: "taskId parameter",
3955
- cli: { positional: true }
3956
- },
3957
- {
3958
- name: "phase",
3959
- type: "string",
3960
- required: true,
3961
- description: "phase parameter"
3962
- },
3963
- {
3964
- name: "reason",
3965
- type: "string",
3966
- required: true,
3967
- description: "reason parameter"
3968
- }
3969
- ]
3970
- },
3971
3857
  {
3972
3858
  gateway: "query",
3973
3859
  domain: "orchestrate",
@@ -11405,7 +11291,20 @@ var init_operations_registry = __esm({
11405
11291
  idempotent: true,
11406
11292
  sessionRequired: false,
11407
11293
  requiredParams: [],
11408
- params: []
11294
+ params: [
11295
+ {
11296
+ name: "limit",
11297
+ type: "number",
11298
+ required: false,
11299
+ description: "At most this many docs per run, oldest first (T14329); default all. Run again to continue"
11300
+ },
11301
+ {
11302
+ name: "dryRun",
11303
+ type: "boolean",
11304
+ required: false,
11305
+ description: "Report the plan counts and write nothing (T14331)"
11306
+ }
11307
+ ]
11409
11308
  },
11410
11309
  // ── docs.modernize (T14113 — Epic T14106) ─────────────────────────────────
11411
11310
  {
@@ -12094,99 +11993,10 @@ var init_operations_registry = __esm({
12094
11993
  // Release domain — T1726 SDK surface parity
12095
11994
  //
12096
11995
  // Release ops dispatched via ReleaseHandler (registered under 'release' in
12097
- // the DomainHandler map) were absent from OPERATIONS. Adding gate +
12098
- // ivtr-suggest (the two ops ReleaseHandler serves) plus the canonical
12099
- // 4-step pipeline ops (start, verify, publish, reconcile) introduced by
12100
- // T1597 / ADR-063 that route through the core release module directly.
11996
+ // the DomainHandler map). The IVTR-only ops `release.gate` and
11997
+ // `release.ivtr-suggest` were deleted in T14311 with the retired
11998
+ // `ivtr_state` column.
12101
11999
  // ---------------------------------------------------------------------------
12102
- // release query: gate
12103
- {
12104
- gateway: "query",
12105
- domain: "release",
12106
- operation: "gate",
12107
- description: "release.gate (query) \u2014 check all IVTR loops in a release epic have reached the released phase before allowing release.ship (T820 RELEASE-03)",
12108
- tier: 1,
12109
- idempotent: true,
12110
- sessionRequired: false,
12111
- requiredParams: ["epicId"],
12112
- params: [
12113
- {
12114
- name: "epicId",
12115
- type: "string",
12116
- required: true,
12117
- description: "Epic ID whose child tasks should be inspected"
12118
- },
12119
- {
12120
- name: "force",
12121
- type: "boolean",
12122
- required: false,
12123
- description: "Bypass the IVTR gate \u2014 requires explicit owner confirmation"
12124
- }
12125
- ]
12126
- },
12127
- // release mutate: gate
12128
- {
12129
- gateway: "mutate",
12130
- domain: "release",
12131
- operation: "gate",
12132
- description: "release.gate (mutate) \u2014 same IVTR gate check as query.gate; safe in both gateways (no DB writes)",
12133
- tier: 1,
12134
- idempotent: true,
12135
- sessionRequired: false,
12136
- requiredParams: ["epicId"],
12137
- params: [
12138
- {
12139
- name: "epicId",
12140
- type: "string",
12141
- required: true,
12142
- description: "Epic ID whose child tasks should be inspected"
12143
- },
12144
- {
12145
- name: "force",
12146
- type: "boolean",
12147
- required: false,
12148
- description: "Bypass the IVTR gate \u2014 requires explicit owner confirmation"
12149
- }
12150
- ]
12151
- },
12152
- // release query: ivtr-suggest
12153
- {
12154
- gateway: "query",
12155
- domain: "release",
12156
- operation: "ivtr-suggest",
12157
- description: "release.ivtr-suggest (query) \u2014 check if all epic tasks are released and suggest cleo release ship (T820 RELEASE-07)",
12158
- tier: 1,
12159
- idempotent: true,
12160
- sessionRequired: false,
12161
- requiredParams: ["taskId"],
12162
- params: [
12163
- {
12164
- name: "taskId",
12165
- type: "string",
12166
- required: true,
12167
- description: "Task ID that just reached the released phase"
12168
- }
12169
- ]
12170
- },
12171
- // release mutate: ivtr-suggest
12172
- {
12173
- gateway: "mutate",
12174
- domain: "release",
12175
- operation: "ivtr-suggest",
12176
- description: "release.ivtr-suggest (mutate) \u2014 same auto-suggest as query.ivtr-suggest; safe in both gateways (no DB writes)",
12177
- tier: 1,
12178
- idempotent: true,
12179
- sessionRequired: false,
12180
- requiredParams: ["taskId"],
12181
- params: [
12182
- {
12183
- name: "taskId",
12184
- type: "string",
12185
- required: true,
12186
- description: "Task ID that just reached the released phase"
12187
- }
12188
- ]
12189
- },
12190
12000
  // release.start / release.verify / release.publish removed in T9540
12191
12001
  // (Phase 6 of T9499) — backing functions in
12192
12002
  // `packages/core/src/release/pipeline.ts` (the legacy 4-step pipeline)
@@ -12856,7 +12666,7 @@ var init_operations_registry = __esm({
12856
12666
  gateway: "query",
12857
12667
  domain: "worktree",
12858
12668
  operation: "list",
12859
- description: "worktree.list (query) \u2014 enumerate git worktrees with 5 status categories (active|stale|merged|orphan|locked). Reads tasks.db for owning-task status. 60s git timeout (T9546).",
12669
+ description: "worktree.list (query) \u2014 enumerate git worktrees with 4 status categories (active|redundant|keep|unknown) from the disposal proof (T14274). Reads tasks.db for owning-task status. 60s git timeout (T9546).",
12860
12670
  tier: 1,
12861
12671
  idempotent: true,
12862
12672
  sessionRequired: false,
@@ -14273,9 +14083,11 @@ var init_enums = __esm({
14273
14083
  });
14274
14084
 
14275
14085
  // packages/contracts/src/exit-codes.ts
14086
+ var E_LEAD_TOOLS_UNSTRIPPED;
14276
14087
  var init_exit_codes = __esm({
14277
14088
  "packages/contracts/src/exit-codes.ts"() {
14278
14089
  "use strict";
14090
+ E_LEAD_TOOLS_UNSTRIPPED = "E_LEAD_TOOLS_UNSTRIPPED";
14279
14091
  }
14280
14092
  });
14281
14093
 
@@ -15352,7 +15164,9 @@ var init_sync_write_invariants = __esm({
15352
15164
  "docs_attachments",
15353
15165
  ["lifecycle_status"],
15354
15166
  ["D04", "D05", "D31", "D32", "D39", "D50"],
15355
- "superseded is sticky; lifecycle transitions follow a matrix"
15167
+ "superseded is sticky; lifecycle transitions follow a matrix",
15168
+ // T14288: the doc's identity row mirrors the metadata under the same rule.
15169
+ ["docs_attachments", "conduit_attachments"]
15356
15170
  )
15357
15171
  ),
15358
15172
  // T13354 (D11165) — CleoDocs re-keyed history family; the typed merge rules
@@ -15409,6 +15223,17 @@ var init_sync_write_invariants = __esm({
15409
15223
  sites: [],
15410
15224
  reason: "two devices adopting one legacy doc must mint one uid: the shell takes the legacy birth and sentinel facts, so (uid, birth_fp) converge and receive places the peer copy as a duplicate; a lost local write is refused loudly at the writer"
15411
15225
  },
15226
+ // T13360 — the legacy docs import mints natural uids (the doc over its
15227
+ // slug, the receipt over its slug), so a re-run or a second device's import
15228
+ // is an ON CONFLICT no-op. Tagged at the accessors since T13360; registered
15229
+ // by T14288, which touched the import.
15230
+ {
15231
+ id: "docs.docs-migration.idempotent-import",
15232
+ class: "identity-layer",
15233
+ tables: ["conduit_attachments", "conduit_doc_migration_ledger"],
15234
+ sites: [],
15235
+ reason: "the docs migration imports each legacy doc once: natural uids over the slug make a re-run a verified no-op, and receipts are never updated or deleted"
15236
+ },
15412
15237
  // T14118 — a slug is an alias, not an identity: renaming one moves the
15413
15238
  // live slug on the registry row and the conduit identity row together and
15414
15239
  // records the old slug in the append-only alias table.
@@ -19376,6 +19201,7 @@ var init_src = __esm({
19376
19201
  init_nexus();
19377
19202
  init_nexus_scope_map();
19378
19203
  init_nexus_user_profile();
19204
+ init_orchestrate();
19379
19205
  init_output_contracts_data();
19380
19206
  init_params();
19381
19207
  init_service();
@@ -19445,6 +19271,45 @@ var init_credentials2 = __esm({
19445
19271
  }
19446
19272
  });
19447
19273
 
19274
+ // packages/adapters/src/providers/shared/lead-tool-strip.ts
19275
+ function leadDeniedTools(context) {
19276
+ const denied = context.leadDeniedTools;
19277
+ return denied !== void 0 && denied.length > 0 ? denied : null;
19278
+ }
19279
+ function assertLeadToolsStrippable(providerId, support, context) {
19280
+ const denied = leadDeniedTools(context);
19281
+ if (denied !== null && support !== "enforced") {
19282
+ throw new LeadToolsUnstrippedError(providerId, denied);
19283
+ }
19284
+ }
19285
+ var LeadToolsUnstrippedError;
19286
+ var init_lead_tool_strip = __esm({
19287
+ "packages/adapters/src/providers/shared/lead-tool-strip.ts"() {
19288
+ "use strict";
19289
+ init_src();
19290
+ LeadToolsUnstrippedError = class extends Error {
19291
+ /**
19292
+ * @param providerId - Provider that refused the lead spawn.
19293
+ * @param deniedTools - Tools the lead had to lose.
19294
+ */
19295
+ constructor(providerId, deniedTools) {
19296
+ super(
19297
+ `${E_LEAD_TOOLS_UNSTRIPPED}: provider '${providerId}' cannot strip the lead's denied tools [${deniedTools.join(", ")}]. Spawn the lead on a provider that enforces the strip (claude-code, claude-sdk) or turn off orchestrate.leadWorker.v1.`
19298
+ );
19299
+ this.providerId = providerId;
19300
+ this.deniedTools = deniedTools;
19301
+ this.name = "LeadToolsUnstrippedError";
19302
+ }
19303
+ providerId;
19304
+ deniedTools;
19305
+ /** Stable LAFS error code string for envelope emission. */
19306
+ code = E_LEAD_TOOLS_UNSTRIPPED;
19307
+ /** Numeric exit code aligned with {@link ExitCode.SPAWN_VALIDATION_FAILED} (63). */
19308
+ exitCode = 63 /* SPAWN_VALIDATION_FAILED */;
19309
+ };
19310
+ }
19311
+ });
19312
+
19448
19313
  // packages/adapters/src/providers/claude-sdk/session-store.ts
19449
19314
  var SessionStore;
19450
19315
  var init_session_store = __esm({
@@ -45295,10 +45160,17 @@ var init_spawn = __esm({
45295
45160
  "use strict";
45296
45161
  init_src();
45297
45162
  init_credentials2();
45163
+ init_lead_tool_strip();
45298
45164
  init_session_store();
45299
45165
  init_tool_bridge();
45300
45166
  DEFAULT_MODEL = "claude-sonnet-4-5";
45301
45167
  ClaudeSDKSpawnProvider = class {
45168
+ /**
45169
+ * `generateText()` is called with no `tools`, so a spawned agent can call no
45170
+ * tool at all; for a lead the denied tools are also dropped from the recorded
45171
+ * allowlist (T14357).
45172
+ */
45173
+ leadToolStrip = "enforced";
45302
45174
  /** In-memory session registry. */
45303
45175
  sessions = new SessionStore();
45304
45176
  /**
@@ -45362,7 +45234,10 @@ var init_spawn = __esm({
45362
45234
  }
45363
45235
  const anthropicProvider = createAnthropic2({ apiKey });
45364
45236
  const toolAllowlist = context.options?.toolAllowlist;
45365
- const allowedTools = resolveTools(toolAllowlist);
45237
+ const denied = leadDeniedTools(context);
45238
+ const allowedTools = resolveTools(toolAllowlist).filter(
45239
+ (tool2) => denied === null || !denied.includes(tool2)
45240
+ );
45366
45241
  const modelId = context.options?.model ?? DEFAULT_MODEL;
45367
45242
  const result = await generateText({
45368
45243
  model: anthropicProvider(modelId),
@@ -47283,15 +47158,23 @@ var init_suite_reaper = __esm({
47283
47158
  // packages/adapters/src/providers/claude-code/spawn.ts
47284
47159
  import { spawn as nodeSpawn } from "node:child_process";
47285
47160
  import { findOnPath } from "@cleocode/paths";
47161
+ function buildClaudeArgs(context, promptFile) {
47162
+ const denied = leadDeniedTools(context);
47163
+ const permissionArgs = denied === null ? ["--dangerously-skip-permissions"] : ["--disallowedTools", denied.join(",")];
47164
+ return ["--print", ...permissionArgs, "--output-format", "json", promptFile];
47165
+ }
47286
47166
  var ClaudeCodeSpawnProvider;
47287
47167
  var init_spawn2 = __esm({
47288
47168
  "packages/adapters/src/providers/claude-code/spawn.ts"() {
47289
47169
  "use strict";
47290
47170
  init_src();
47291
47171
  init_agent_spawn_wrapper();
47172
+ init_lead_tool_strip();
47292
47173
  init_prompt_file();
47293
47174
  init_suite_reaper();
47294
47175
  ClaudeCodeSpawnProvider = class {
47176
+ /** Lead spawns lose their denied tools through `--disallowedTools` (T14357). */
47177
+ leadToolStrip = "enforced";
47295
47178
  /** Map of instance IDs to tracked process info. */
47296
47179
  processMap = /* @__PURE__ */ new Map();
47297
47180
  /**
@@ -47331,13 +47214,7 @@ var init_spawn2 = __esm({
47331
47214
  } catch {
47332
47215
  }
47333
47216
  tmpFile = await writeSpawnPromptFile("claude-spawn", enrichedPrompt);
47334
- const claudeArgs = [
47335
- "--print",
47336
- "--dangerously-skip-permissions",
47337
- "--output-format",
47338
- "json",
47339
- tmpFile
47340
- ];
47217
+ const claudeArgs = buildClaudeArgs(context, tmpFile);
47341
47218
  const spawnBuild = buildAgentSpawnArgs("claude", claudeArgs, instanceId);
47342
47219
  const isSystemd = spawnBuild.ownership.mode === "systemd";
47343
47220
  const spawnOpts = {
@@ -48778,10 +48655,13 @@ var init_spawn3 = __esm({
48778
48655
  "packages/adapters/src/providers/opencode/spawn.ts"() {
48779
48656
  "use strict";
48780
48657
  init_cli_spawn();
48658
+ init_lead_tool_strip();
48781
48659
  init_paths2();
48782
48660
  OPENCODE_SUBAGENT_NAME = "cleo-subagent";
48783
48661
  OPENCODE_FALLBACK_AGENT = "general";
48784
48662
  OpenCodeSpawnProvider = class {
48663
+ /** Cannot remove tools from a spawned agent: a lead spawn is refused (T14357). */
48664
+ leadToolStrip = "unsupported";
48785
48665
  /** Map of instance IDs to tracked process info. */
48786
48666
  processMap = /* @__PURE__ */ new Map();
48787
48667
  /**
@@ -48803,6 +48683,7 @@ var init_spawn3 = __esm({
48803
48683
  * @returns Spawn result with instance ID and status
48804
48684
  */
48805
48685
  async spawn(context) {
48686
+ assertLeadToolsStrippable("opencode", this.leadToolStrip, context);
48806
48687
  const instanceId = `opencode-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
48807
48688
  const startTime = (/* @__PURE__ */ new Date()).toISOString();
48808
48689
  const workingDirectory = context.workingDirectory ?? process.cwd();
@@ -49319,8 +49200,11 @@ var init_spawn4 = __esm({
49319
49200
  "use strict";
49320
49201
  init_src();
49321
49202
  init_cli_spawn();
49203
+ init_lead_tool_strip();
49322
49204
  init_prompt_file();
49323
49205
  PiSpawnProvider = class {
49206
+ /** Cannot remove tools from a spawned agent: a lead spawn is refused (T14357). */
49207
+ leadToolStrip = "unsupported";
49324
49208
  /** Map of instance IDs to tracked process info. */
49325
49209
  processMap = /* @__PURE__ */ new Map();
49326
49210
  /**
@@ -49344,6 +49228,7 @@ var init_spawn4 = __esm({
49344
49228
  * @returns Spawn result with instance ID and status
49345
49229
  */
49346
49230
  async spawn(context) {
49231
+ assertLeadToolsStrippable("pi", this.leadToolStrip, context);
49347
49232
  const instanceId = `pi-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
49348
49233
  const startTime = (/* @__PURE__ */ new Date()).toISOString();
49349
49234
  let tmpFile;
@@ -50112,6 +49997,7 @@ var CodexAdapter = class {
50112
49997
  // packages/adapters/src/providers/codex/spawn.ts
50113
49998
  init_src();
50114
49999
  init_cli_spawn();
50000
+ init_lead_tool_strip();
50115
50001
  init_prompt_file();
50116
50002
  import { findOnPath as findOnPath4 } from "@cleocode/paths";
50117
50003
 
@@ -50403,6 +50289,7 @@ var GeminiCliAdapter = class {
50403
50289
  // packages/adapters/src/providers/gemini-cli/spawn.ts
50404
50290
  init_src();
50405
50291
  init_cli_spawn();
50292
+ init_lead_tool_strip();
50406
50293
  import { findOnPath as findOnPath6 } from "@cleocode/paths";
50407
50294
 
50408
50295
  // packages/adapters/src/providers/gemini-cli/index.ts
@@ -50657,6 +50544,7 @@ var KimiAdapter = class {
50657
50544
 
50658
50545
  // packages/adapters/src/providers/kimi/spawn.ts
50659
50546
  init_src();
50547
+ init_lead_tool_strip();
50660
50548
  import { findOnPath as findOnPath8 } from "@cleocode/paths";
50661
50549
 
50662
50550
  // packages/adapters/src/providers/kimi/index.ts