oh-my-copilot 4.13.21 → 4.13.45

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 (195) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +8 -0
  4. package/agents/code-reviewer.agent.md +24 -6
  5. package/agents/designer.agent.md +12 -0
  6. package/bridge/cli.cjs +1978 -1214
  7. package/bridge/mcp-server.cjs +678 -261
  8. package/bridge/runtime-cli.cjs +55 -8
  9. package/bridge/team.js +507 -38
  10. package/dist/__tests__/agent-registry.test.js +92 -1
  11. package/dist/__tests__/agent-registry.test.js.map +1 -1
  12. package/dist/__tests__/bedrock-model-routing.test.js +18 -17
  13. package/dist/__tests__/bedrock-model-routing.test.js.map +1 -1
  14. package/dist/__tests__/delegation-enforcer.test.js +46 -6
  15. package/dist/__tests__/delegation-enforcer.test.js.map +1 -1
  16. package/dist/__tests__/hooks/session-end-cleanup.test.d.ts +2 -0
  17. package/dist/__tests__/hooks/session-end-cleanup.test.d.ts.map +1 -0
  18. package/dist/__tests__/hooks/session-end-cleanup.test.js +93 -0
  19. package/dist/__tests__/hooks/session-end-cleanup.test.js.map +1 -0
  20. package/dist/__tests__/hud/stdin.test.d.ts +2 -0
  21. package/dist/__tests__/hud/stdin.test.d.ts.map +1 -0
  22. package/dist/__tests__/hud/stdin.test.js +556 -0
  23. package/dist/__tests__/hud/stdin.test.js.map +1 -0
  24. package/dist/__tests__/model-routing-override-three-site-sync.test.d.ts +2 -0
  25. package/dist/__tests__/model-routing-override-three-site-sync.test.d.ts.map +1 -0
  26. package/dist/__tests__/model-routing-override-three-site-sync.test.js +75 -0
  27. package/dist/__tests__/model-routing-override-three-site-sync.test.js.map +1 -0
  28. package/dist/__tests__/non-claude-provider-detection.test.js +37 -0
  29. package/dist/__tests__/non-claude-provider-detection.test.js.map +1 -1
  30. package/dist/__tests__/package-dir-resolution-regression.test.js +25 -0
  31. package/dist/__tests__/package-dir-resolution-regression.test.js.map +1 -1
  32. package/dist/__tests__/pre-tool-enforcer.test.js +51 -0
  33. package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -1
  34. package/dist/__tests__/session-start-script-context.test.js +121 -0
  35. package/dist/__tests__/session-start-script-context.test.js.map +1 -1
  36. package/dist/__tests__/setup-claude-md-script.test.js +44 -1
  37. package/dist/__tests__/setup-claude-md-script.test.js.map +1 -1
  38. package/dist/agents/definitions.d.ts.map +1 -1
  39. package/dist/agents/definitions.js +2 -1
  40. package/dist/agents/definitions.js.map +1 -1
  41. package/dist/autoresearch/__tests__/decide-outcome.test.d.ts +2 -0
  42. package/dist/autoresearch/__tests__/decide-outcome.test.d.ts.map +1 -0
  43. package/dist/autoresearch/__tests__/decide-outcome.test.js +69 -0
  44. package/dist/autoresearch/__tests__/decide-outcome.test.js.map +1 -0
  45. package/dist/autoresearch/runtime.d.ts.map +1 -1
  46. package/dist/autoresearch/runtime.js +16 -2
  47. package/dist/autoresearch/runtime.js.map +1 -1
  48. package/dist/cli/__tests__/launch.test.js +23 -0
  49. package/dist/cli/__tests__/launch.test.js.map +1 -1
  50. package/dist/cli/__tests__/self-improve-paths.test.js +3 -2
  51. package/dist/cli/__tests__/self-improve-paths.test.js.map +1 -1
  52. package/dist/cli/__tests__/team.test.js +100 -0
  53. package/dist/cli/__tests__/team.test.js.map +1 -1
  54. package/dist/cli/commands/__tests__/team-role-shorthand.test.js +30 -0
  55. package/dist/cli/commands/__tests__/team-role-shorthand.test.js.map +1 -1
  56. package/dist/cli/commands/__tests__/team.test.js +48 -1
  57. package/dist/cli/commands/__tests__/team.test.js.map +1 -1
  58. package/dist/cli/commands/team.d.ts +2 -0
  59. package/dist/cli/commands/team.d.ts.map +1 -1
  60. package/dist/cli/commands/team.js +9 -2
  61. package/dist/cli/commands/team.js.map +1 -1
  62. package/dist/cli/launch.d.ts.map +1 -1
  63. package/dist/cli/launch.js +7 -0
  64. package/dist/cli/launch.js.map +1 -1
  65. package/dist/cli/team.d.ts.map +1 -1
  66. package/dist/cli/team.js +34 -3
  67. package/dist/cli/team.js.map +1 -1
  68. package/dist/config/__tests__/loader.test.js +35 -4
  69. package/dist/config/__tests__/loader.test.js.map +1 -1
  70. package/dist/config/__tests__/models.test.js +126 -3
  71. package/dist/config/__tests__/models.test.js.map +1 -1
  72. package/dist/config/models.d.ts +8 -0
  73. package/dist/config/models.d.ts.map +1 -1
  74. package/dist/config/models.js +119 -8
  75. package/dist/config/models.js.map +1 -1
  76. package/dist/features/delegation-enforcer.d.ts.map +1 -1
  77. package/dist/features/delegation-enforcer.js +10 -9
  78. package/dist/features/delegation-enforcer.js.map +1 -1
  79. package/dist/hooks/__tests__/bridge-routing.test.js +1 -0
  80. package/dist/hooks/__tests__/bridge-routing.test.js.map +1 -1
  81. package/dist/hooks/autopilot/enforcement.d.ts.map +1 -1
  82. package/dist/hooks/autopilot/enforcement.js +19 -0
  83. package/dist/hooks/autopilot/enforcement.js.map +1 -1
  84. package/dist/hooks/bridge.d.ts.map +1 -1
  85. package/dist/hooks/bridge.js +26 -4
  86. package/dist/hooks/bridge.js.map +1 -1
  87. package/dist/hooks/persistent-mode/stop-hook-blocking.test.js +37 -1
  88. package/dist/hooks/persistent-mode/stop-hook-blocking.test.js.map +1 -1
  89. package/dist/hooks/session-end/index.d.ts +9 -2
  90. package/dist/hooks/session-end/index.d.ts.map +1 -1
  91. package/dist/hooks/session-end/index.js +90 -35
  92. package/dist/hooks/session-end/index.js.map +1 -1
  93. package/dist/hud/stdin.d.ts +12 -1
  94. package/dist/hud/stdin.d.ts.map +1 -1
  95. package/dist/hud/stdin.js +123 -18
  96. package/dist/hud/stdin.js.map +1 -1
  97. package/dist/hud/types.d.ts +1 -0
  98. package/dist/hud/types.d.ts.map +1 -1
  99. package/dist/hud/types.js.map +1 -1
  100. package/dist/installer/__tests__/session-start-template.test.d.ts +2 -0
  101. package/dist/installer/__tests__/session-start-template.test.d.ts.map +1 -0
  102. package/dist/installer/__tests__/session-start-template.test.js +174 -0
  103. package/dist/installer/__tests__/session-start-template.test.js.map +1 -0
  104. package/dist/lib/__tests__/mode-state-io.test.js +75 -12
  105. package/dist/lib/__tests__/mode-state-io.test.js.map +1 -1
  106. package/dist/lib/mode-state-io.d.ts +11 -0
  107. package/dist/lib/mode-state-io.d.ts.map +1 -1
  108. package/dist/lib/mode-state-io.js +64 -0
  109. package/dist/lib/mode-state-io.js.map +1 -1
  110. package/dist/lib/worktree-paths.d.ts +12 -0
  111. package/dist/lib/worktree-paths.d.ts.map +1 -1
  112. package/dist/lib/worktree-paths.js +75 -0
  113. package/dist/lib/worktree-paths.js.map +1 -1
  114. package/dist/planning/__tests__/artifacts.test.d.ts +2 -0
  115. package/dist/planning/__tests__/artifacts.test.d.ts.map +1 -0
  116. package/dist/planning/__tests__/artifacts.test.js +486 -0
  117. package/dist/planning/__tests__/artifacts.test.js.map +1 -0
  118. package/dist/planning/artifact-names.d.ts +13 -0
  119. package/dist/planning/artifact-names.d.ts.map +1 -0
  120. package/dist/planning/artifact-names.js +108 -0
  121. package/dist/planning/artifact-names.js.map +1 -0
  122. package/dist/planning/artifacts.d.ts +47 -0
  123. package/dist/planning/artifacts.d.ts.map +1 -0
  124. package/dist/planning/artifacts.js +221 -0
  125. package/dist/planning/artifacts.js.map +1 -0
  126. package/dist/team/__tests__/api-interop.compatibility.test.js +194 -5
  127. package/dist/team/__tests__/api-interop.compatibility.test.js.map +1 -1
  128. package/dist/team/__tests__/model-contract.test.js +92 -2
  129. package/dist/team/__tests__/model-contract.test.js.map +1 -1
  130. package/dist/team/__tests__/runtime-v2.dispatch.test.js +30 -0
  131. package/dist/team/__tests__/runtime-v2.dispatch.test.js.map +1 -1
  132. package/dist/team/__tests__/scaling.test.js +39 -1
  133. package/dist/team/__tests__/scaling.test.js.map +1 -1
  134. package/dist/team/__tests__/worker-bootstrap.test.js +6 -0
  135. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
  136. package/dist/team/api-interop.d.ts.map +1 -1
  137. package/dist/team/api-interop.js +89 -2
  138. package/dist/team/api-interop.js.map +1 -1
  139. package/dist/team/delegation-evidence.d.ts +5 -0
  140. package/dist/team/delegation-evidence.d.ts.map +1 -0
  141. package/dist/team/delegation-evidence.js +29 -0
  142. package/dist/team/delegation-evidence.js.map +1 -0
  143. package/dist/team/model-contract.d.ts +8 -0
  144. package/dist/team/model-contract.d.ts.map +1 -1
  145. package/dist/team/model-contract.js +13 -0
  146. package/dist/team/model-contract.js.map +1 -1
  147. package/dist/team/runtime-v2.d.ts +2 -1
  148. package/dist/team/runtime-v2.d.ts.map +1 -1
  149. package/dist/team/runtime-v2.js +3 -1
  150. package/dist/team/runtime-v2.js.map +1 -1
  151. package/dist/team/state/tasks.d.ts +4 -1
  152. package/dist/team/state/tasks.d.ts.map +1 -1
  153. package/dist/team/state/tasks.js +38 -1
  154. package/dist/team/state/tasks.js.map +1 -1
  155. package/dist/team/team-ops.d.ts +4 -1
  156. package/dist/team/team-ops.d.ts.map +1 -1
  157. package/dist/team/team-ops.js +2 -2
  158. package/dist/team/team-ops.js.map +1 -1
  159. package/dist/team/types.d.ts +22 -1
  160. package/dist/team/types.d.ts.map +1 -1
  161. package/dist/team/types.js.map +1 -1
  162. package/dist/team/worker-bootstrap.d.ts.map +1 -1
  163. package/dist/team/worker-bootstrap.js +6 -1
  164. package/dist/team/worker-bootstrap.js.map +1 -1
  165. package/dist/tools/__tests__/state-tools.test.js +322 -5
  166. package/dist/tools/__tests__/state-tools.test.js.map +1 -1
  167. package/dist/tools/__tests__/wiki-tools-working-directory.test.d.ts +2 -0
  168. package/dist/tools/__tests__/wiki-tools-working-directory.test.d.ts.map +1 -0
  169. package/dist/tools/__tests__/wiki-tools-working-directory.test.js +66 -0
  170. package/dist/tools/__tests__/wiki-tools-working-directory.test.js.map +1 -0
  171. package/dist/tools/state-tools.d.ts +3 -10
  172. package/dist/tools/state-tools.d.ts.map +1 -1
  173. package/dist/tools/state-tools.js +393 -91
  174. package/dist/tools/state-tools.js.map +1 -1
  175. package/dist/tools/wiki-tools.js +8 -8
  176. package/dist/tools/wiki-tools.js.map +1 -1
  177. package/docs/GETTING-STARTED.md +7 -0
  178. package/docs/copilot-instructions.md +1 -1
  179. package/package.json +1 -1
  180. package/scripts/lib/model-routing-override-message.mjs +21 -0
  181. package/scripts/persistent-mode.cjs +36 -0
  182. package/scripts/persistent-mode.mjs +36 -0
  183. package/scripts/post-tool-verifier.mjs +1 -0
  184. package/scripts/pre-tool-enforcer.mjs +60 -0
  185. package/scripts/session-start.mjs +63 -0
  186. package/scripts/setup-copilot-instructions.sh +12 -2
  187. package/skills/configure-notifications/SKILL.md +3 -3
  188. package/skills/mcp-setup/SKILL.md +60 -45
  189. package/skills/omc-setup/SKILL.md +3 -3
  190. package/skills/omc-setup/phases/01-install-claude-md.md +1 -1
  191. package/skills/omc-setup/phases/04-welcome.md +8 -8
  192. package/skills/project-session-manager/SKILL.md +2 -2
  193. package/skills/project-session-manager/psm.sh +1 -1
  194. package/templates/hooks/lib/model-routing-override-message.mjs +21 -0
  195. package/templates/hooks/session-start.mjs +62 -0
@@ -1418,6 +1418,8 @@ function validateAnthropicBaseUrl(urlString) {
1418
1418
  }
1419
1419
 
1420
1420
  // src/config/models.ts
1421
+ var DIRECT_MODEL_ENV_KEYS = ["CLAUDE_MODEL", "ANTHROPIC_MODEL"];
1422
+ var INHERIT_TIER_PRIORITY = ["MEDIUM", "HIGH", "LOW"];
1421
1423
  var TIER_ENV_KEYS = {
1422
1424
  LOW: [
1423
1425
  "OMC_MODEL_LOW",
@@ -1454,15 +1456,42 @@ var BUILTIN_EXTERNAL_MODEL_DEFAULTS = {
1454
1456
  codexModel: "gpt-5.3-codex",
1455
1457
  geminiModel: "gemini-3.1-pro-preview"
1456
1458
  };
1459
+ function readEnvValue(key) {
1460
+ const value = process.env[key]?.trim();
1461
+ return value || void 0;
1462
+ }
1457
1463
  function resolveTierModelFromEnv(tier) {
1458
1464
  for (const key of TIER_ENV_KEYS[tier]) {
1459
- const value = process.env[key]?.trim();
1465
+ const value = readEnvValue(key);
1460
1466
  if (value) {
1461
1467
  return value;
1462
1468
  }
1463
1469
  }
1464
1470
  return void 0;
1465
1471
  }
1472
+ function getDirectModelEnvValue() {
1473
+ for (const key of DIRECT_MODEL_ENV_KEYS) {
1474
+ const value = readEnvValue(key);
1475
+ if (value) {
1476
+ return value;
1477
+ }
1478
+ }
1479
+ return void 0;
1480
+ }
1481
+ function getProviderDetectionModelEnvValues() {
1482
+ const directModel = getDirectModelEnvValue();
1483
+ if (directModel) {
1484
+ return [directModel];
1485
+ }
1486
+ const values = /* @__PURE__ */ new Set();
1487
+ for (const tier of INHERIT_TIER_PRIORITY) {
1488
+ const value = resolveTierModelFromEnv(tier);
1489
+ if (value) {
1490
+ values.add(value);
1491
+ }
1492
+ }
1493
+ return [...values];
1494
+ }
1466
1495
  function getDefaultModelHigh() {
1467
1496
  return resolveTierModelFromEnv("HIGH") || BUILTIN_TIER_MODEL_DEFAULTS.HIGH;
1468
1497
  }
@@ -1495,17 +1524,19 @@ function isBedrock() {
1495
1524
  if (modelId && /^((us|eu|ap|global)\.anthropic\.|anthropic\.claude)/i.test(modelId)) {
1496
1525
  return true;
1497
1526
  }
1527
+ if (modelId && /^arn:aws(-[^:]+)?:bedrock:/i.test(modelId) && /:(inference-profile|application-inference-profile)\//i.test(modelId) && modelId.toLowerCase().includes("claude")) {
1528
+ return true;
1529
+ }
1498
1530
  return false;
1499
1531
  }
1500
1532
  function isVertexAI() {
1501
1533
  if (process.env.CLAUDE_CODE_USE_VERTEX === "1") {
1502
1534
  return true;
1503
1535
  }
1504
- const modelId = process.env.CLAUDE_MODEL || process.env.ANTHROPIC_MODEL || "";
1505
- if (modelId && modelId.toLowerCase().startsWith("vertex_ai/")) {
1506
- return true;
1507
- }
1508
- return false;
1536
+ return hasVertexModelId(getProviderDetectionModelEnvValues());
1537
+ }
1538
+ function hasVertexModelId(modelIds) {
1539
+ return modelIds.some((modelId) => modelId.toLowerCase().startsWith("vertex_ai/"));
1509
1540
  }
1510
1541
  function isProviderSpecificModelId(modelId) {
1511
1542
  return isBedrockModelId(modelId) || isVertexModelId(modelId);
@@ -2463,6 +2494,9 @@ var CC_FAMILY_TO_ALIAS = {
2463
2494
  HAIKU: "haiku"
2464
2495
  };
2465
2496
  function normalizeToCcAlias(model) {
2497
+ if (isProviderSpecificModelId(model)) {
2498
+ return model;
2499
+ }
2466
2500
  const family = resolveClaudeFamily(model);
2467
2501
  return family ? CC_FAMILY_TO_ALIAS[family] ?? model : model;
2468
2502
  }
@@ -2615,6 +2649,9 @@ function resolveCliBinaryPath(binary) {
2615
2649
  resolvedPathCache.set(binary, resolvedPath);
2616
2650
  return resolvedPath;
2617
2651
  }
2652
+ function shouldUseClaudeBareMode(env = process.env) {
2653
+ return typeof env.ANTHROPIC_API_KEY === "string" && env.ANTHROPIC_API_KEY.trim().length > 0;
2654
+ }
2618
2655
  var CONTRACTS = {
2619
2656
  claude: {
2620
2657
  agentType: "claude",
@@ -2622,6 +2659,9 @@ var CONTRACTS = {
2622
2659
  installInstructions: "Install Claude CLI: https://claude.ai/download",
2623
2660
  buildLaunchArgs(model, extraFlags = []) {
2624
2661
  const args = ["--dangerously-skip-permissions"];
2662
+ if (shouldUseClaudeBareMode() && !extraFlags.includes("--bare")) {
2663
+ args.push("--bare");
2664
+ }
2625
2665
  if (model) {
2626
2666
  const resolved = isProviderSpecificModelId(model) ? model : normalizeToCcAlias(model);
2627
2667
  args.push("--model", resolved);
@@ -3060,7 +3100,7 @@ function generateWorkerOverlay(params) {
3060
3100
  const shutdownAckPath = buildTeamStateInstructionPath(teamName, instructionStateRoot, "workers", workerName2, "shutdown-ack.json");
3061
3101
  const claimTaskCommand = formatOmcCliInvocation(`team api claim-task --input "{\\"team_name\\":\\"${teamName}\\",\\"task_id\\":\\"<id>\\",\\"worker\\":\\"${workerName2}\\"}" --json`);
3062
3102
  const sendAckCommand = formatOmcCliInvocation(`team api send-message --input "{\\"team_name\\":\\"${teamName}\\",\\"from_worker\\":\\"${workerName2}\\",\\"to_worker\\":\\"leader-fixed\\",\\"body\\":\\"ACK: ${workerName2} initialized\\"}" --json`);
3063
- const completeTaskCommand = formatOmcCliInvocation(`team api transition-task-status --input "{\\"team_name\\":\\"${teamName}\\",\\"task_id\\":\\"<id>\\",\\"from\\":\\"in_progress\\",\\"to\\":\\"completed\\",\\"claim_token\\":\\"<claim_token>\\"}" --json`);
3103
+ const completeTaskCommand = formatOmcCliInvocation(`team api transition-task-status --input "{\\"team_name\\":\\"${teamName}\\",\\"task_id\\":\\"<id>\\",\\"from\\":\\"in_progress\\",\\"to\\":\\"completed\\",\\"claim_token\\":\\"<claim_token>\\",\\"result\\":\\"Summary: <what changed>\\\\nVerification: <tests/checks run>\\\\nSubagent skip reason: worker protocol forbids nested subagents; completed focused probe in-session\\"}" --json`);
3064
3104
  const failTaskCommand = formatOmcCliInvocation(`team api transition-task-status --input "{\\"team_name\\":\\"${teamName}\\",\\"task_id\\":\\"<id>\\",\\"from\\":\\"in_progress\\",\\"to\\":\\"failed\\",\\"claim_token\\":\\"<claim_token>\\"}" --json`);
3065
3105
  const readTaskCommand = formatOmcCliInvocation(`team api read-task --input "{\\"team_name\\":\\"${teamName}\\",\\"task_id\\":\\"<id>\\"}" --json`);
3066
3106
  const releaseClaimCommand = formatOmcCliInvocation(`team api release-task-claim --input "{\\"team_name\\":\\"${teamName}\\",\\"task_id\\":\\"<id>\\",\\"claim_token\\":\\"<claim_token>\\",\\"worker\\":\\"${workerName2}\\"}" --json`);
@@ -3113,6 +3153,11 @@ Use the CLI API for all task lifecycle operations. Do NOT directly edit task fil
3113
3153
  - Complete task: \`${completeTaskCommand}\`
3114
3154
  - Fail task: \`${failTaskCommand}\`
3115
3155
  - Release claim (rollback): \`${releaseClaimCommand}\`
3156
+ - Delegation compliance evidence (required for broad delegated tasks):
3157
+ - The completion command MUST include a \`result\` string with summary and verification evidence.
3158
+ - Because worker protocol forbids nested sub-agents, use: \`Subagent skip reason: <why in-session execution was safer/sufficient>\`
3159
+ - Only if the leader explicitly grants an exception to spawn nested help, use: \`Subagent spawn evidence: <count, child task names/thread ids, and integrated findings>\`
3160
+ - Completion is rejected with \`missing_delegation_compliance_evidence\` when required evidence is absent.
3116
3161
 
3117
3162
  ## Canonical Team State Root
3118
3163
  - Resolve the team state root in this order: \`OMC_TEAM_STATE_ROOT\` env -> worker identity \`team_state_root\` -> config/manifest \`team_state_root\` -> ${params.cwd}/.omcp/state/team/${teamName}.
@@ -7295,7 +7340,7 @@ function buildV2TaskInstruction(teamName, workerName2, task, taskId, cliOutputCo
7295
7340
  {}
7296
7341
  );
7297
7342
  const completeTaskCommand = formatOmcCliInvocation(
7298
- `team api transition-task-status --input '${JSON.stringify({ team_name: teamName, task_id: taskId, from: "in_progress", to: "completed", claim_token: "<claim_token>" })}' --json`
7343
+ `team api transition-task-status --input '${JSON.stringify({ team_name: teamName, task_id: taskId, from: "in_progress", to: "completed", claim_token: "<claim_token>", result: "Summary: <what changed>\\nVerification: <tests/checks run>\\nSubagent skip reason: worker protocol forbids nested subagents; completed focused probe in-session" })}' --json`
7299
7344
  );
7300
7345
  const failTaskCommand = formatOmcCliInvocation(
7301
7346
  `team api transition-task-status --input '${JSON.stringify({ team_name: teamName, task_id: taskId, from: "in_progress", to: "failed", claim_token: "<claim_token>" })}' --json`
@@ -7310,6 +7355,7 @@ function buildV2TaskInstruction(teamName, workerName2, task, taskId, cliOutputCo
7310
7355
  `2. Do the work described below.`,
7311
7356
  `3. On completion (use claim_token from step 1):`,
7312
7357
  ` ${completeTaskCommand}`,
7358
+ ` The result field is required for completion evidence. For broad delegated tasks, include either "Subagent skip reason: <why no nested worker was needed/allowed>" or, only when explicitly allowed by the leader, "Subagent spawn evidence: <child task names/thread ids and integrated findings>".`,
7313
7359
  `4. On failure (use claim_token from step 1):`,
7314
7360
  ` ${failTaskCommand}`,
7315
7361
  `5. ACK/progress replies are not a stop signal. Keep executing your assigned or next feasible work until the task is actually complete or failed, then transition and exit.`,
@@ -7673,6 +7719,7 @@ async function startTeamV2(config) {
7673
7719
  status: "pending",
7674
7720
  owner: null,
7675
7721
  result: null,
7722
+ ...config.tasks[i].delegation ? { delegation: config.tasks[i].delegation } : {},
7676
7723
  created_at: (/* @__PURE__ */ new Date()).toISOString()
7677
7724
  }, null, 2), "utf-8");
7678
7725
  }