oh-my-opencode 4.17.0 → 4.17.1

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 (117) hide show
  1. package/.agents/command/publish.md +31 -58
  2. package/.agents/skills/pre-publish-review/SKILL.md +1 -1
  3. package/.agents/skills/publish/SKILL.md +32 -59
  4. package/.opencode/command/publish.md +31 -58
  5. package/.opencode/skills/pre-publish-review/SKILL.md +1 -1
  6. package/dist/cli/index.js +30 -27
  7. package/dist/cli-node/index.js +30 -27
  8. package/dist/index.js +202 -254
  9. package/dist/skills/review-work/SKILL.md +10 -2
  10. package/dist/skills/start-work/SKILL.md +1 -1
  11. package/dist/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
  12. package/dist/skills/ultimate-browsing/engine/templates/package.json +1 -1
  13. package/dist/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  14. package/dist/skills/ulw-plan/SKILL.md +2 -1
  15. package/dist/skills/ulw-plan/references/full-workflow.md +1 -1
  16. package/dist/skills/ulw-plan/references/intent-unclear.md +4 -4
  17. package/dist/skills/visual-qa/SKILL.md +9 -5
  18. package/dist/tui.js +8 -3
  19. package/package.json +13 -13
  20. package/packages/lsp-daemon/dist/cli.js +7 -13
  21. package/packages/lsp-daemon/dist/daemon-client.js +3 -5
  22. package/packages/lsp-daemon/dist/index.js +12 -18
  23. package/packages/lsp-daemon/dist/request-routing.js +6 -8
  24. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  25. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +398 -400
  26. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  27. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  28. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  29. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  30. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  31. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  32. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  33. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  34. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  35. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +14 -14
  36. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  37. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  38. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.5.md +2 -2
  39. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +2 -2
  40. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  41. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  42. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  43. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  44. package/packages/omo-codex/plugin/components/teammode/AGENTS.md +2 -2
  45. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  46. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  47. package/packages/omo-codex/plugin/components/teammode/skills/teammode/SKILL.md +33 -16
  48. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +2 -1
  49. package/packages/omo-codex/plugin/components/teammode/test/v2-spawn-schema.test.ts +69 -0
  50. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  51. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  52. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +3 -3
  53. package/packages/omo-codex/plugin/components/ultrawork/directive.md +29 -17
  54. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  55. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  56. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +29 -17
  57. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +2 -1
  58. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +1 -1
  59. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +4 -4
  60. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +9 -6
  61. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +29 -17
  62. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  63. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  64. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
  65. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +2 -2
  66. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  67. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  68. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  69. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  70. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  71. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  72. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  83. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  84. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  85. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  86. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  87. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  88. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  89. package/packages/omo-codex/plugin/package-lock.json +13 -13
  90. package/packages/omo-codex/plugin/package.json +1 -1
  91. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +10 -2
  92. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +1 -1
  93. package/packages/omo-codex/plugin/skills/teammode/SKILL.md +33 -16
  94. package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +2 -1
  95. package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
  96. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +1 -1
  97. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  98. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +29 -17
  99. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
  100. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +2 -2
  101. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +2 -1
  102. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +1 -1
  103. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +4 -4
  104. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +9 -5
  105. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +1 -1
  106. package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +25 -0
  107. package/packages/omo-codex/plugin/test/ulw-plan-scope-contract.test.mjs +24 -0
  108. package/packages/omo-codex/scripts/install-dist/install-local.mjs +9 -11
  109. package/packages/shared-skills/skills/review-work/SKILL.md +10 -2
  110. package/packages/shared-skills/skills/start-work/SKILL.md +1 -1
  111. package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
  112. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +1 -1
  113. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  114. package/packages/shared-skills/skills/ulw-plan/SKILL.md +2 -1
  115. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +1 -1
  116. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +4 -4
  117. package/packages/shared-skills/skills/visual-qa/SKILL.md +9 -5
package/dist/index.js CHANGED
@@ -13498,7 +13498,8 @@ async function listActiveTeams(config) {
13498
13498
  teamName: runtimeState.teamName,
13499
13499
  status: runtimeState.status,
13500
13500
  memberCount: runtimeState.members.length,
13501
- scope: runtimeState.specSource
13501
+ scope: runtimeState.specSource,
13502
+ ...runtimeState.leadSessionId !== undefined ? { leadSessionId: runtimeState.leadSessionId } : {}
13502
13503
  });
13503
13504
  } catch (error) {
13504
13505
  log5("team runtime state skipped", {
@@ -16584,7 +16585,7 @@ var require_compile = __commonJS((exports) => {
16584
16585
  const schOrFunc = root.refs[ref];
16585
16586
  if (schOrFunc)
16586
16587
  return schOrFunc;
16587
- let _sch = resolve37.call(this, root, ref);
16588
+ let _sch = resolve36.call(this, root, ref);
16588
16589
  if (_sch === undefined) {
16589
16590
  const schema = (_a = root.localRefs) === null || _a === undefined ? undefined : _a[ref];
16590
16591
  const { schemaId } = this.opts;
@@ -16611,7 +16612,7 @@ var require_compile = __commonJS((exports) => {
16611
16612
  function sameSchemaEnv(s1, s2) {
16612
16613
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
16613
16614
  }
16614
- function resolve37(root, ref) {
16615
+ function resolve36(root, ref) {
16615
16616
  let sch;
16616
16617
  while (typeof (sch = this.refs[ref]) == "string")
16617
16618
  ref = sch;
@@ -17197,55 +17198,55 @@ var require_fast_uri = __commonJS((exports, module) => {
17197
17198
  }
17198
17199
  return uri;
17199
17200
  }
17200
- function resolve37(baseURI, relativeURI, options) {
17201
+ function resolve36(baseURI, relativeURI, options) {
17201
17202
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
17202
17203
  const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
17203
17204
  schemelessOptions.skipEscape = true;
17204
17205
  return serialize(resolved, schemelessOptions);
17205
17206
  }
17206
- function resolveComponent(base, relative16, options, skipNormalization) {
17207
+ function resolveComponent(base, relative15, options, skipNormalization) {
17207
17208
  const target = {};
17208
17209
  if (!skipNormalization) {
17209
17210
  base = parse3(serialize(base, options), options);
17210
- relative16 = parse3(serialize(relative16, options), options);
17211
+ relative15 = parse3(serialize(relative15, options), options);
17211
17212
  }
17212
17213
  options = options || {};
17213
- if (!options.tolerant && relative16.scheme) {
17214
- target.scheme = relative16.scheme;
17215
- target.userinfo = relative16.userinfo;
17216
- target.host = relative16.host;
17217
- target.port = relative16.port;
17218
- target.path = removeDotSegments(relative16.path || "");
17219
- target.query = relative16.query;
17214
+ if (!options.tolerant && relative15.scheme) {
17215
+ target.scheme = relative15.scheme;
17216
+ target.userinfo = relative15.userinfo;
17217
+ target.host = relative15.host;
17218
+ target.port = relative15.port;
17219
+ target.path = removeDotSegments(relative15.path || "");
17220
+ target.query = relative15.query;
17220
17221
  } else {
17221
- if (relative16.userinfo !== undefined || relative16.host !== undefined || relative16.port !== undefined) {
17222
- target.userinfo = relative16.userinfo;
17223
- target.host = relative16.host;
17224
- target.port = relative16.port;
17225
- target.path = removeDotSegments(relative16.path || "");
17226
- target.query = relative16.query;
17222
+ if (relative15.userinfo !== undefined || relative15.host !== undefined || relative15.port !== undefined) {
17223
+ target.userinfo = relative15.userinfo;
17224
+ target.host = relative15.host;
17225
+ target.port = relative15.port;
17226
+ target.path = removeDotSegments(relative15.path || "");
17227
+ target.query = relative15.query;
17227
17228
  } else {
17228
- if (!relative16.path) {
17229
+ if (!relative15.path) {
17229
17230
  target.path = base.path;
17230
- if (relative16.query !== undefined) {
17231
- target.query = relative16.query;
17231
+ if (relative15.query !== undefined) {
17232
+ target.query = relative15.query;
17232
17233
  } else {
17233
17234
  target.query = base.query;
17234
17235
  }
17235
17236
  } else {
17236
- if (relative16.path[0] === "/") {
17237
- target.path = removeDotSegments(relative16.path);
17237
+ if (relative15.path[0] === "/") {
17238
+ target.path = removeDotSegments(relative15.path);
17238
17239
  } else {
17239
17240
  if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
17240
- target.path = "/" + relative16.path;
17241
+ target.path = "/" + relative15.path;
17241
17242
  } else if (!base.path) {
17242
- target.path = relative16.path;
17243
+ target.path = relative15.path;
17243
17244
  } else {
17244
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative16.path;
17245
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative15.path;
17245
17246
  }
17246
17247
  target.path = removeDotSegments(target.path);
17247
17248
  }
17248
- target.query = relative16.query;
17249
+ target.query = relative15.query;
17249
17250
  }
17250
17251
  target.userinfo = base.userinfo;
17251
17252
  target.host = base.host;
@@ -17253,7 +17254,7 @@ var require_fast_uri = __commonJS((exports, module) => {
17253
17254
  }
17254
17255
  target.scheme = base.scheme;
17255
17256
  }
17256
- target.fragment = relative16.fragment;
17257
+ target.fragment = relative15.fragment;
17257
17258
  return target;
17258
17259
  }
17259
17260
  function equal(uriA, uriB, options) {
@@ -17456,7 +17457,7 @@ var require_fast_uri = __commonJS((exports, module) => {
17456
17457
  var fastUri = {
17457
17458
  SCHEMES,
17458
17459
  normalize: normalize4,
17459
- resolve: resolve37,
17460
+ resolve: resolve36,
17460
17461
  resolveComponent,
17461
17462
  equal,
17462
17463
  serialize,
@@ -20936,7 +20937,7 @@ var AGENT_MODEL_REQUIREMENTS = {
20936
20937
  {
20937
20938
  providers: ["openai", "vercel"],
20938
20939
  model: "gpt-5.6-sol",
20939
- variant: "medium"
20940
+ variant: "high"
20940
20941
  },
20941
20942
  {
20942
20943
  providers: ["openai", "github-copilot", "opencode", "vercel"],
@@ -21779,6 +21780,14 @@ var DEFAULT_MODEL_RESOLUTION_DEPS = {
21779
21780
  fuzzyMatchModel,
21780
21781
  transformModelForProvider
21781
21782
  };
21783
+ function findFallbackVariantForModel(model, fallbackChain, transformModelForProvider2) {
21784
+ const [provider, ...modelParts] = model.split("/");
21785
+ if (!provider || modelParts.length === 0) {
21786
+ return;
21787
+ }
21788
+ const modelID = modelParts.join("/");
21789
+ return fallbackChain?.find((entry) => entry.providers.includes(provider) && transformModelForProvider2(provider, entry.model) === modelID && entry.variant)?.variant;
21790
+ }
21782
21791
  function resolveModelPipeline(request, providerCache = {
21783
21792
  readConnectedProvidersCache: () => null,
21784
21793
  findProviderModelMetadata: () => {
@@ -21797,8 +21806,9 @@ function resolveModelPipeline(request, providerCache = {
21797
21806
  }
21798
21807
  const normalizedUserModel = normalizeModel(intent?.userModel);
21799
21808
  if (normalizedUserModel) {
21809
+ const inheritedVariant = findFallbackVariantForModel(normalizedUserModel, fallbackChain, deps.transformModelForProvider);
21800
21810
  log3("Model resolved via config override", { model: normalizedUserModel });
21801
- return { model: normalizedUserModel, provenance: "override" };
21811
+ return inheritedVariant ? { model: normalizedUserModel, provenance: "override", variant: inheritedVariant } : { model: normalizedUserModel, provenance: "override" };
21802
21812
  }
21803
21813
  const normalizedCategoryDefault = normalizeModel(intent?.categoryDefaultModel);
21804
21814
  if (normalizedCategoryDefault) {
@@ -79315,7 +79325,7 @@ $ARGUMENTS
79315
79325
  import { existsSync as existsSync28, readdirSync as readdirSync7, readFileSync as readFileSync18 } from "fs";
79316
79326
  import { join as join37 } from "path";
79317
79327
 
79318
- // packages/claude-code-compat-core/src/shared/skill-path-resolver.ts
79328
+ // packages/utils/src/skill-path-resolver.ts
79319
79329
  import { isAbsolute as isAbsolute6, posix as posix3, relative as relative4, resolve as resolve12, win32 as win324 } from "path";
79320
79330
  function toDisplayPath(path8) {
79321
79331
  return path8.replaceAll("\\", "/");
@@ -79364,7 +79374,6 @@ function resolveSkillPathReferences(content, basePath) {
79364
79374
  return relativePath.endsWith("/") && !displayPath.endsWith("/") ? `${displayPath}/` : displayPath;
79365
79375
  });
79366
79376
  }
79367
-
79368
79377
  // packages/claude-code-compat-core/src/features/claude-code-plugin-loader/skill-loader.ts
79369
79378
  function loadPluginSkillsAsCommands(plugins) {
79370
79379
  const skills = {};
@@ -89655,7 +89664,7 @@ function getCachedVersion(options = {}) {
89655
89664
  // package.json
89656
89665
  var package_default = {
89657
89666
  name: "oh-my-opencode",
89658
- version: "4.17.0",
89667
+ version: "4.17.1",
89659
89668
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
89660
89669
  main: "./dist/index.js",
89661
89670
  types: "dist/index.d.ts",
@@ -89866,18 +89875,18 @@ var package_default = {
89866
89875
  typescript: "^6.0.3"
89867
89876
  },
89868
89877
  optionalDependencies: {
89869
- "oh-my-opencode-darwin-arm64": "4.17.0",
89870
- "oh-my-opencode-darwin-x64": "4.17.0",
89871
- "oh-my-opencode-darwin-x64-baseline": "4.17.0",
89872
- "oh-my-opencode-linux-arm64": "4.17.0",
89873
- "oh-my-opencode-linux-arm64-musl": "4.17.0",
89874
- "oh-my-opencode-linux-x64": "4.17.0",
89875
- "oh-my-opencode-linux-x64-baseline": "4.17.0",
89876
- "oh-my-opencode-linux-x64-musl": "4.17.0",
89877
- "oh-my-opencode-linux-x64-musl-baseline": "4.17.0",
89878
- "oh-my-opencode-windows-arm64": "4.17.0",
89879
- "oh-my-opencode-windows-x64": "4.17.0",
89880
- "oh-my-opencode-windows-x64-baseline": "4.17.0"
89878
+ "oh-my-opencode-darwin-arm64": "4.17.1",
89879
+ "oh-my-opencode-darwin-x64": "4.17.1",
89880
+ "oh-my-opencode-darwin-x64-baseline": "4.17.1",
89881
+ "oh-my-opencode-linux-arm64": "4.17.1",
89882
+ "oh-my-opencode-linux-arm64-musl": "4.17.1",
89883
+ "oh-my-opencode-linux-x64": "4.17.1",
89884
+ "oh-my-opencode-linux-x64-baseline": "4.17.1",
89885
+ "oh-my-opencode-linux-x64-musl": "4.17.1",
89886
+ "oh-my-opencode-linux-x64-musl-baseline": "4.17.1",
89887
+ "oh-my-opencode-windows-arm64": "4.17.1",
89888
+ "oh-my-opencode-windows-x64": "4.17.1",
89889
+ "oh-my-opencode-windows-x64-baseline": "4.17.1"
89881
89890
  },
89882
89891
  overrides: {
89883
89892
  "@earendil-works/pi-agent-core": "0.80.3",
@@ -95589,7 +95598,7 @@ Before acting, survey the skills available in this system: scan their descriptio
95589
95598
  | explore agent | Need codebase patterns you don't have | \`task(subagent_type="explore", load_skills=[], run_in_background=true, ...)\` |
95590
95599
  | librarian agent | External library docs, OSS examples | \`task(subagent_type="librarian", load_skills=[], run_in_background=true, ...)\` |
95591
95600
  | oracle agent | Stuck on architecture/debugging after 2+ attempts | \`task(subagent_type="oracle", load_skills=[], run_in_background=false, ...)\` |
95592
- | plan agent | Complex multi-step with dependencies (5+ steps) | \`task(subagent_type="plan", load_skills=[], run_in_background=false, ...)\` |
95601
+ | plan agent | Discovery leaves unresolved design uncertainty: unclear boundaries, competing decompositions, or uncertain dependency order | \`task(subagent_type="plan", load_skills=[], run_in_background=false, ...)\` |
95593
95602
  | task category | Specialized work matching a category | \`task(category="...", load_skills=[...], run_in_background=true)\` |
95594
95603
 
95595
95604
  <tool_usage_rules>
@@ -95624,8 +95633,8 @@ deep_context = background_output(task_id=...)
95624
95633
  // Merge ALL findings for comprehensive understanding
95625
95634
  \`\`\`
95626
95635
 
95627
- **Plan agent (size the scope first):**
95628
- - Count distinct surfaces, files, steps. Invoke for 5+ interdependent steps / multi-file / unclear scope; skip only for genuinely trivial single-step work.
95636
+ **Plan agent (size by what is UNDECIDED, not by step count):**
95637
+ - Invoke only when open design decisions remain after context gathering \u2014 unclear boundaries, several viable decompositions, or a multi-file build whose dependency order is not obvious. A known procedure, however many steps, and work you are delegating to another session never justify it.
95629
95638
  - Invoke AFTER gathering context from both tracks.
95630
95639
  - Then execute in the plan's exact wave order + parallel grouping and run the verification it specifies.
95631
95640
 
@@ -99297,19 +99306,7 @@ ${textPart.text ?? ""}`;
99297
99306
  };
99298
99307
  }
99299
99308
  // packages/skills-loader-core/src/shared/internal-initiator-marker.ts
99300
- var INTERNAL_INITIATOR_MARKER_DETECT_PATTERN2 = /<!--\s*OMO_INTERNAL_INITIATOR\s*-->/;
99301
- function hasInternalInitiatorMarker2(text) {
99302
- return INTERNAL_INITIATOR_MARKER_DETECT_PATTERN2.test(text);
99303
- }
99304
- function isTextPartLike2(part) {
99305
- return part.type === "text" && typeof part.text === "string";
99306
- }
99307
- function isSyntheticOrInternalTextPart2(part) {
99308
- return isTextPartLike2(part) && (part.synthetic === true || hasInternalInitiatorMarker2(part.text));
99309
- }
99310
- function isRealUserTextPart2(part) {
99311
- return isTextPartLike2(part) && !isSyntheticOrInternalTextPart2(part);
99312
- }
99309
+ init_internal_initiator_marker();
99313
99310
 
99314
99311
  // packages/skills-loader-core/src/hooks/auto-slash-command/constants.ts
99315
99312
  var AUTO_SLASH_COMMAND_TAG_OPEN = "<auto-slash-command>";
@@ -99361,7 +99358,7 @@ function detectSlashCommand(text) {
99361
99358
  return parsed;
99362
99359
  }
99363
99360
  function extractPromptText3(parts) {
99364
- const textParts = parts.filter(isRealUserTextPart2);
99361
+ const textParts = parts.filter(isRealUserTextPart);
99365
99362
  const slashPart = textParts.find((p) => (p.text ?? "").trim().startsWith("/"));
99366
99363
  if (slashPart?.text) {
99367
99364
  return slashPart.text;
@@ -99371,7 +99368,7 @@ function extractPromptText3(parts) {
99371
99368
  function findSlashCommandPartIndex(parts) {
99372
99369
  for (let idx = 0;idx < parts.length; idx += 1) {
99373
99370
  const part = parts[idx];
99374
- if (!isRealUserTextPart2(part))
99371
+ if (!isRealUserTextPart(part))
99375
99372
  continue;
99376
99373
  if ((part.text ?? "").trim().startsWith("/")) {
99377
99374
  return idx;
@@ -99654,56 +99651,6 @@ function findProjectOpencodeSkillDirs(startDirectory, stopDirectory) {
99654
99651
  [".opencode", "skill"]
99655
99652
  ], stopDirectory ?? detectWorktreePath2(startDirectory));
99656
99653
  }
99657
- // packages/skills-loader-core/src/shared/skill-path-resolver.ts
99658
- import { isAbsolute as isAbsolute13, posix as posix5, relative as relative12, resolve as resolve22, win32 as win327 } from "path";
99659
- function toDisplayPath2(path17) {
99660
- return path17.replaceAll("\\", "/");
99661
- }
99662
- function isPosixAbsolutePath3(path17) {
99663
- return path17.startsWith("/") && !/^[A-Za-z]:[\\/]/.test(path17);
99664
- }
99665
- function isWindowsAbsolutePath3(path17) {
99666
- return /^[A-Za-z]:[\\/]/.test(path17);
99667
- }
99668
- function looksLikeFilePath2(path17) {
99669
- if (path17.endsWith("/"))
99670
- return true;
99671
- const lastSegment = path17.split("/").pop() ?? "";
99672
- return /\.[a-zA-Z0-9]+$/.test(lastSegment);
99673
- }
99674
- function resolveSkillPathReferences2(content, basePath) {
99675
- const normalizedBase = basePath.replace(/[\\/]$/, "");
99676
- return content.replace(/(?<![a-zA-Z0-9="\(])@([a-zA-Z0-9_-]+\/[a-zA-Z0-9_.\-\/]*)/g, (match, relativePath) => {
99677
- if (!looksLikeFilePath2(relativePath))
99678
- return match;
99679
- if (isWindowsAbsolutePath3(normalizedBase)) {
99680
- const resolvedPath2 = win327.resolve(normalizedBase, relativePath);
99681
- const relativePathFromBase2 = win327.relative(normalizedBase, resolvedPath2);
99682
- if (relativePathFromBase2.startsWith("..") || win327.isAbsolute(relativePathFromBase2)) {
99683
- return match;
99684
- }
99685
- const displayPath2 = toDisplayPath2(resolvedPath2);
99686
- return relativePath.endsWith("/") && !displayPath2.endsWith("/") ? `${displayPath2}/` : displayPath2;
99687
- }
99688
- if (isPosixAbsolutePath3(normalizedBase)) {
99689
- const displayBase = toDisplayPath2(normalizedBase);
99690
- const resolvedPath2 = posix5.resolve(displayBase, relativePath);
99691
- const relativePathFromBase2 = posix5.relative(displayBase, resolvedPath2);
99692
- if (relativePathFromBase2.startsWith("..") || posix5.isAbsolute(relativePathFromBase2)) {
99693
- return match;
99694
- }
99695
- return relativePath.endsWith("/") && !resolvedPath2.endsWith("/") ? `${resolvedPath2}/` : resolvedPath2;
99696
- }
99697
- const resolvedPath = resolve22(normalizedBase, relativePath);
99698
- const relativePathFromBase = relative12(normalizedBase, resolvedPath);
99699
- if (relativePathFromBase.startsWith("..") || isAbsolute13(relativePathFromBase)) {
99700
- return match;
99701
- }
99702
- const displayPath = toDisplayPath2(resolvedPath);
99703
- return relativePath.endsWith("/") && !displayPath.endsWith("/") ? `${displayPath}/` : displayPath;
99704
- });
99705
- }
99706
-
99707
99654
  // packages/skills-loader-core/src/shared/index.ts
99708
99655
  function log6(_message, _context) {}
99709
99656
 
@@ -99894,7 +99841,7 @@ async function loadSkillFromPath(options) {
99894
99841
  const originalDescription = data.description || "";
99895
99842
  const isOpencodeSource = options.scope === "opencode" || options.scope === "opencode-project";
99896
99843
  const formattedDescription = `(${options.scope} - Skill) ${originalDescription}`;
99897
- const resolvedBody = resolveSkillPathReferences2(body.trim(), options.resolvedPath);
99844
+ const resolvedBody = resolveSkillPathReferences(body.trim(), options.resolvedPath);
99898
99845
  const templateContent = `<skill-instruction>
99899
99846
  Base directory for this skill: ${options.resolvedPath}/
99900
99847
  File references (@path) in this skill are relative to this directory.
@@ -100201,7 +100148,7 @@ function builtinToLoadedSkill(builtin) {
100201
100148
  // packages/skills-loader-core/src/features/opencode-skill-loader/merger/config-skill-entry-loader.ts
100202
100149
  init_src();
100203
100150
  import { existsSync as existsSync79, readFileSync as readFileSync50 } from "fs";
100204
- import { dirname as dirname28, isAbsolute as isAbsolute14, resolve as resolve23 } from "path";
100151
+ import { dirname as dirname28, isAbsolute as isAbsolute13, resolve as resolve22 } from "path";
100205
100152
  import { homedir as homedir25 } from "os";
100206
100153
  function resolveFilePath5(from, configDir) {
100207
100154
  let filePath = from;
@@ -100209,13 +100156,13 @@ function resolveFilePath5(from, configDir) {
100209
100156
  filePath = filePath.slice(6, -1);
100210
100157
  }
100211
100158
  if (filePath.startsWith("~/")) {
100212
- return resolve23(homedir25(), filePath.slice(2));
100159
+ return resolve22(homedir25(), filePath.slice(2));
100213
100160
  }
100214
- if (isAbsolute14(filePath)) {
100161
+ if (isAbsolute13(filePath)) {
100215
100162
  return filePath;
100216
100163
  }
100217
100164
  const baseDir = configDir || process.cwd();
100218
- return resolve23(baseDir, filePath);
100165
+ return resolve22(baseDir, filePath);
100219
100166
  }
100220
100167
  function loadSkillFromFile(filePath) {
100221
100168
  try {
@@ -100258,7 +100205,7 @@ function configEntryToLoadedSkill(name, entry, configDir) {
100258
100205
  }
100259
100206
  const description = entry.description || fileMetadata.description || "";
100260
100207
  const resolvedPath = sourcePath ? dirname28(sourcePath) : configDir || process.cwd();
100261
- const resolvedTemplate = resolveSkillPathReferences2(template.trim(), resolvedPath);
100208
+ const resolvedTemplate = resolveSkillPathReferences(template.trim(), resolvedPath);
100262
100209
  const wrappedTemplate = `<skill-instruction>
100263
100210
  Base directory for this skill: ${resolvedPath}/
100264
100211
  File references (@path) in this skill are relative to this directory.
@@ -102459,7 +102406,7 @@ EOF
102459
102406
  // packages/skills-loader-core/src/features/builtin-skills/skills/review-work.ts
102460
102407
  var reviewWorkSkill = {
102461
102408
  name: "review-work",
102462
- description: "Post-implementation review orchestrator. Launches 5 parallel background sub-agents: Oracle (goal/constraint verification), Oracle (code quality), Oracle (security), unspecified-high (hands-on QA execution), unspecified-high (context mining from GitHub/git/Slack/Notion). All must pass for review to pass. MUST USE after completing any significant implementation work. Triggers: 'review work', 'review my work', 'review changes', 'QA my work', 'verify implementation', 'check my work', 'validate changes', 'post-implementation review'.",
102409
+ description: "Post-implementation review orchestrator. Launches 5 parallel background sub-agents: Oracle (goal/constraint verification), Oracle (code quality), Oracle (security), unspecified-high (hands-on QA execution), unspecified-high (context mining from GitHub/git/Slack/Notion). All must pass for review to pass. MUST USE before a PR handoff or when the user explicitly asks to review completed work. Triggers: 'review work', 'review my work', 'review changes', 'QA my work', 'verify implementation', 'check my work', 'validate changes', 'post-implementation review'.",
102463
102410
  template: loadSharedSkillTemplate("review-work")
102464
102411
  };
102465
102412
  // packages/skills-loader-core/src/features/builtin-skills/skills/remove-ai-slops.ts
@@ -103454,7 +103401,7 @@ init_src();
103454
103401
  var import_picomatch2 = __toESM(require_picomatch2(), 1);
103455
103402
  import * as fs20 from "fs/promises";
103456
103403
  import { homedir as homedir26 } from "os";
103457
- import { dirname as dirname30, extname as extname2, isAbsolute as isAbsolute15, join as join97, relative as relative13 } from "path";
103404
+ import { dirname as dirname30, extname as extname2, isAbsolute as isAbsolute14, join as join97, relative as relative12 } from "path";
103458
103405
  var MAX_RECURSIVE_DEPTH = 10;
103459
103406
  function isHttpUrl(path17) {
103460
103407
  return path17.startsWith("http://") || path17.startsWith("https://");
@@ -103466,7 +103413,7 @@ function toAbsolutePath(path17, configDir) {
103466
103413
  if (path17.startsWith("~/")) {
103467
103414
  return join97(homedir26(), path17.slice(2));
103468
103415
  }
103469
- if (isAbsolute15(path17)) {
103416
+ if (isAbsolute14(path17)) {
103470
103417
  return path17;
103471
103418
  }
103472
103419
  return join97(configDir, path17);
@@ -103483,7 +103430,7 @@ function filterByGlob(skills, sourceBaseDir, globPattern) {
103483
103430
  return skills.filter((skill) => {
103484
103431
  if (!skill.path)
103485
103432
  return false;
103486
- const rel = normalizePathForGlob(relative13(sourceBaseDir, skill.path));
103433
+ const rel = normalizePathForGlob(relative12(sourceBaseDir, skill.path));
103487
103434
  return import_picomatch2.default.isMatch(rel, globPattern, { dot: true, bash: true });
103488
103435
  });
103489
103436
  }
@@ -105764,11 +105711,11 @@ function isPrometheusAgent(agentName) {
105764
105711
  }
105765
105712
 
105766
105713
  // packages/omo-opencode/src/hooks/prometheus-md-only/path-policy.ts
105767
- import { relative as relative14, resolve as resolve24, isAbsolute as isAbsolute16 } from "path";
105714
+ import { relative as relative13, resolve as resolve23, isAbsolute as isAbsolute15 } from "path";
105768
105715
  function isAllowedFile(filePath, workspaceRoot) {
105769
- const resolved = resolve24(workspaceRoot, filePath);
105770
- const rel = relative14(workspaceRoot, resolved);
105771
- if (rel.startsWith("..") || isAbsolute16(rel)) {
105716
+ const resolved = resolve23(workspaceRoot, filePath);
105717
+ const rel = relative13(workspaceRoot, resolved);
105718
+ if (rel.startsWith("..") || isAbsolute15(rel)) {
105772
105719
  return false;
105773
105720
  }
105774
105721
  if (!/(^|[/\\])\.omo([/\\]|$)/i.test(rel)) {
@@ -105917,9 +105864,9 @@ init_logger2();
105917
105864
  // packages/omo-opencode/src/hooks/start-work/worktree-detector.ts
105918
105865
  import { execFileSync as execFileSync5 } from "child_process";
105919
105866
  import { existsSync as existsSync82, realpathSync as realpathSync14 } from "fs";
105920
- import { resolve as resolve25, win32 as win328 } from "path";
105867
+ import { resolve as resolve24, win32 as win327 } from "path";
105921
105868
  function normalizePath5(path18) {
105922
- const resolvedPath = process.platform !== "win32" && win328.isAbsolute(path18) ? path18 : resolve25(path18);
105869
+ const resolvedPath = process.platform !== "win32" && win327.isAbsolute(path18) ? path18 : resolve24(path18);
105923
105870
  if (!existsSync82(resolvedPath)) {
105924
105871
  return resolvedPath;
105925
105872
  }
@@ -106464,24 +106411,24 @@ function buildSelectedContextInfo(params) {
106464
106411
  }
106465
106412
 
106466
106413
  // packages/omo-opencode/src/hooks/start-work/session-plan-affinity.ts
106467
- import { posix as posix6, win32 as win329 } from "path";
106414
+ import { posix as posix5, win32 as win328 } from "path";
106468
106415
  init_logger2();
106469
106416
  var PLAN_PATH_PATTERN = /[A-Za-z0-9_./\\:~-]*\.(?:sisyphus|omo)[\\/]plans[\\/][A-Za-z0-9._/\\~-]+\.md/gi;
106470
106417
  function normalizePlanPath(directory, candidate) {
106471
106418
  const trimmedCandidate = candidate.trim().replace(/^["'`]+|["'`]+$/g, "");
106472
106419
  if (looksLikeWindowsAbsolutePath(trimmedCandidate)) {
106473
- return win329.resolve(trimmedCandidate);
106420
+ return win328.resolve(trimmedCandidate);
106474
106421
  }
106475
106422
  if (looksLikeWindowsAbsolutePath(directory)) {
106476
- return win329.resolve(directory, trimmedCandidate);
106423
+ return win328.resolve(directory, trimmedCandidate);
106477
106424
  }
106478
- if (posix6.isAbsolute(trimmedCandidate)) {
106479
- return posix6.resolve(trimmedCandidate);
106425
+ if (posix5.isAbsolute(trimmedCandidate)) {
106426
+ return posix5.resolve(trimmedCandidate);
106480
106427
  }
106481
- return posix6.resolve(directory, trimmedCandidate);
106428
+ return posix5.resolve(directory, trimmedCandidate);
106482
106429
  }
106483
106430
  function normalizePlanPathKey(planPath) {
106484
- const resolvedPath = looksLikeWindowsAbsolutePath(planPath) ? win329.resolve(planPath) : posix6.resolve(planPath);
106431
+ const resolvedPath = looksLikeWindowsAbsolutePath(planPath) ? win328.resolve(planPath) : posix5.resolve(planPath);
106485
106432
  return resolvedPath.replaceAll("\\", "/");
106486
106433
  }
106487
106434
  function looksLikeWindowsAbsolutePath(path18) {
@@ -107810,7 +107757,7 @@ async function validateSubagentSessionId(input) {
107810
107757
  }
107811
107758
 
107812
107759
  // packages/omo-opencode/src/hooks/atlas/tool-execute-after-direct-work.ts
107813
- import { resolve as resolve26 } from "path";
107760
+ import { resolve as resolve25 } from "path";
107814
107761
  init_logger2();
107815
107762
 
107816
107763
  // packages/omo-opencode/src/hooks/atlas/omo-path.ts
@@ -107920,7 +107867,7 @@ async function handleDirectWorkToolAfter(input) {
107920
107867
  const sessionWork = getWorkForSession(ctx.directory, toolInput.sessionID);
107921
107868
  if (sessionWork) {
107922
107869
  const planPath = resolveBoulderPlanPathForWork(ctx.directory, sessionWork);
107923
- if (resolve26(filePath) === resolve26(planPath) && planSnapshot !== undefined) {
107870
+ if (resolve25(filePath) === resolve25(planPath) && planSnapshot !== undefined) {
107924
107871
  const beforeCheckedKeys = parseCheckedTopLevelTaskKeys(planSnapshot);
107925
107872
  const afterCheckedKeys = readCheckedTaskKeysFromPlan(planPath);
107926
107873
  for (const taskKey of afterCheckedKeys) {
@@ -108669,7 +108616,7 @@ function createToolExecuteAfterHandler2(input) {
108669
108616
  // packages/omo-opencode/src/hooks/atlas/tool-execute-before.ts
108670
108617
  init_logger2();
108671
108618
  import { existsSync as existsSync85, readFileSync as readFileSync58 } from "fs";
108672
- import { resolve as resolve27 } from "path";
108619
+ import { resolve as resolve26 } from "path";
108673
108620
  var TASK_SECTION_HEADER_PATTERN = /^##\s*1\.\s*TASK\s*$/i;
108674
108621
  var TODO_TASK_LINE_PATTERN = /^(?:[-*]\s*\[\s*\]\s*)?(\d+)\.\s+(.+)$/;
108675
108622
  var FINAL_WAVE_TASK_LINE_PATTERN = /^(?:[-*]\s*\[\s*\]\s*)?(F\d+)\.\s+(.+)$/i;
@@ -108727,7 +108674,7 @@ function createToolExecuteBeforeHandler2(input) {
108727
108674
  const sessionWork = sessionID ? getWorkForSession(ctx.directory, sessionID) : null;
108728
108675
  const state3 = sessionWork ? null : readBoulderState(ctx.directory);
108729
108676
  const planPath = sessionWork ? resolveBoulderPlanPathForWork(ctx.directory, sessionWork) : state3 ? resolveBoulderPlanPath(ctx.directory, state3) : null;
108730
- if (planPath && resolve27(filePath) === resolve27(planPath) && pendingPlanSnapshots) {
108677
+ if (planPath && resolve26(filePath) === resolve26(planPath) && pendingPlanSnapshots) {
108731
108678
  try {
108732
108679
  if (existsSync85(planPath)) {
108733
108680
  pendingPlanSnapshots.set(toolInput.callID, readFileSync58(planPath, "utf-8"));
@@ -112628,7 +112575,7 @@ function createRuntimeFallbackHook(ctx, options, factoryOverrides = {}) {
112628
112575
  }
112629
112576
  // packages/omo-opencode/src/hooks/write-existing-file-guard/hook.ts
112630
112577
  import { existsSync as existsSync87, realpathSync as realpathSync15 } from "fs";
112631
- import { basename as basename17, dirname as dirname32, isAbsolute as isAbsolute17, join as join101, normalize as normalize2, relative as relative15, resolve as resolve28 } from "path";
112578
+ import { basename as basename17, dirname as dirname32, isAbsolute as isAbsolute16, join as join101, normalize as normalize2, relative as relative14, resolve as resolve27 } from "path";
112632
112579
 
112633
112580
  // packages/omo-opencode/src/hooks/write-existing-file-guard/tool-execute-before-handler.ts
112634
112581
  import { existsSync as existsSync86 } from "fs";
@@ -112800,11 +112747,11 @@ function getPathFromArgs(args) {
112800
112747
  return args?.filePath ?? args?.path ?? args?.file_path;
112801
112748
  }
112802
112749
  function resolveInputPath(ctx, inputPath) {
112803
- return normalize2(isAbsolute17(inputPath) ? inputPath : resolve28(ctx.directory, inputPath));
112750
+ return normalize2(isAbsolute16(inputPath) ? inputPath : resolve27(ctx.directory, inputPath));
112804
112751
  }
112805
112752
  function isPathInsideDirectory(pathToCheck, directory) {
112806
- const relativePath = relative15(directory, pathToCheck);
112807
- return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute17(relativePath);
112753
+ const relativePath = relative14(directory, pathToCheck);
112754
+ return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute16(relativePath);
112808
112755
  }
112809
112756
  function toCanonicalPath2(absolutePath) {
112810
112757
  let canonicalPath = absolutePath;
@@ -115788,7 +115735,7 @@ function createNotepadWriteGuardHook() {
115788
115735
  }
115789
115736
  // packages/omo-opencode/src/hooks/plan-format-validator/hook.ts
115790
115737
  import { existsSync as existsSync89, readFileSync as readFileSync60 } from "fs";
115791
- import { resolve as resolve29 } from "path";
115738
+ import { resolve as resolve28 } from "path";
115792
115739
  init_logger2();
115793
115740
  var WRITE_TOOLS = new Set(["Write", "Edit", "write", "edit"]);
115794
115741
  var CHECKBOX_PATTERN = /^[-*]\s*\[[ xX]\]/m;
@@ -115870,7 +115817,7 @@ function createPlanFormatValidatorHook(_ctx) {
115870
115817
  return;
115871
115818
  if (!isPlanFilePath(filePath))
115872
115819
  return;
115873
- const resolvedPath = resolve29(_ctx.directory, filePath);
115820
+ const resolvedPath = resolve28(_ctx.directory, filePath);
115874
115821
  if (!existsSync89(resolvedPath))
115875
115822
  return;
115876
115823
  const content = readFileSync60(resolvedPath, "utf-8");
@@ -115972,7 +115919,7 @@ function createMonitorStatusInjectorHook(monitorManager, config) {
115972
115919
  };
115973
115920
  }
115974
115921
  // packages/omo-opencode/src/tools/grep/tools.ts
115975
- import { resolve as resolve30 } from "path";
115922
+ import { resolve as resolve29 } from "path";
115976
115923
 
115977
115924
  // node_modules/.bun/@opencode-ai+plugin@1.15.13+8002cb46da36e070/node_modules/@opencode-ai/plugin/dist/tool.js
115978
115925
  import { z as z3 } from "zod";
@@ -116219,10 +116166,10 @@ class Semaphore {
116219
116166
  this.running++;
116220
116167
  return;
116221
116168
  }
116222
- return new Promise((resolve30) => {
116169
+ return new Promise((resolve29) => {
116223
116170
  this.queue.push(() => {
116224
116171
  this.running++;
116225
- resolve30();
116172
+ resolve29();
116226
116173
  });
116227
116174
  });
116228
116175
  }
@@ -116537,7 +116484,7 @@ function createGrepTools(ctx) {
116537
116484
  const globs = args.include ? [args.include] : undefined;
116538
116485
  const runtimeCtx = context;
116539
116486
  const dir = typeof runtimeCtx.directory === "string" ? runtimeCtx.directory : ctx.directory;
116540
- const searchPath = args.path ? resolve30(dir, args.path) : dir;
116487
+ const searchPath = args.path ? resolve29(dir, args.path) : dir;
116541
116488
  const paths = [searchPath];
116542
116489
  const outputMode = args.output_mode ?? "files_with_matches";
116543
116490
  const headLimit = args.head_limit ?? 0;
@@ -116568,11 +116515,11 @@ function createGrepTools(ctx) {
116568
116515
  return { grep };
116569
116516
  }
116570
116517
  // packages/omo-opencode/src/tools/glob/tools.ts
116571
- import { resolve as resolve32 } from "path";
116518
+ import { resolve as resolve31 } from "path";
116572
116519
 
116573
116520
  // packages/omo-opencode/src/tools/glob/cli.ts
116574
116521
  init_bun_spawn_shim();
116575
- import { resolve as resolve31 } from "path";
116522
+ import { resolve as resolve30 } from "path";
116576
116523
 
116577
116524
  // packages/omo-opencode/src/tools/glob/constants.ts
116578
116525
  var DEFAULT_TIMEOUT_MS3 = 60000;
@@ -116700,7 +116647,7 @@ async function runRgFilesInternal(options, resolvedCli, processSpawner = spawn)
116700
116647
  }
116701
116648
  let filePath;
116702
116649
  if (isRg) {
116703
- filePath = cwd ? resolve31(cwd, line) : line;
116650
+ filePath = cwd ? resolve30(cwd, line) : line;
116704
116651
  } else if (isWindows2) {
116705
116652
  filePath = line.trim();
116706
116653
  } else {
@@ -116760,7 +116707,7 @@ function createGlobTools(ctx) {
116760
116707
  const cli = await resolveGrepCliWithAutoInstall();
116761
116708
  const runtimeCtx = context;
116762
116709
  const dir = typeof runtimeCtx.directory === "string" ? runtimeCtx.directory : ctx.directory;
116763
- const searchPath = args.path ? resolve32(dir, args.path) : dir;
116710
+ const searchPath = args.path ? resolve31(dir, args.path) : dir;
116764
116711
  const result = await runRgFiles({
116765
116712
  pattern: args.pattern,
116766
116713
  paths: [searchPath]
@@ -118637,7 +118584,7 @@ init_logger2();
118637
118584
 
118638
118585
  // packages/omo-opencode/src/tools/background-task/delay.ts
118639
118586
  function delay5(ms) {
118640
- return new Promise((resolve33) => setTimeout(resolve33, ms));
118587
+ return new Promise((resolve32) => setTimeout(resolve32, ms));
118641
118588
  }
118642
118589
  // packages/omo-opencode/src/tools/background-task/create-background-output.ts
118643
118590
  init_logger2();
@@ -119495,7 +119442,7 @@ function getClaudeConfigDir3() {
119495
119442
  // packages/claude-code-compat-core/src/shared/opencode-config-dir.ts
119496
119443
  import { existsSync as existsSync93, realpathSync as realpathSync16 } from "fs";
119497
119444
  import { homedir as homedir28 } from "os";
119498
- import { join as join108, posix as posix7, resolve as resolve33, win32 as win3210 } from "path";
119445
+ import { join as join108, posix as posix6, resolve as resolve32, win32 as win329 } from "path";
119499
119446
  var TAURI_APP_IDENTIFIER3 = "ai.opencode.desktop";
119500
119447
  var TAURI_APP_IDENTIFIER_DEV3 = "ai.opencode.desktop.dev";
119501
119448
  function isDevBuild3(version) {
@@ -119510,7 +119457,7 @@ function getTauriConfigDir3(identifier) {
119510
119457
  return join108(homedir28(), "Library", "Application Support", identifier);
119511
119458
  case "win32": {
119512
119459
  const appData = process.env.APPDATA || join108(homedir28(), "AppData", "Roaming");
119513
- return win3210.join(appData, identifier);
119460
+ return win329.join(appData, identifier);
119514
119461
  }
119515
119462
  case "linux":
119516
119463
  default: {
@@ -119521,9 +119468,9 @@ function getTauriConfigDir3(identifier) {
119521
119468
  }
119522
119469
  function resolveConfigPath3(pathValue) {
119523
119470
  if (isWslEnvironment3() && pathValue.startsWith("/")) {
119524
- return posix7.normalize(pathValue);
119471
+ return posix6.normalize(pathValue);
119525
119472
  }
119526
- const resolvedPath = resolve33(pathValue);
119473
+ const resolvedPath = resolve32(pathValue);
119527
119474
  if (!existsSync93(resolvedPath))
119528
119475
  return resolvedPath;
119529
119476
  try {
@@ -119553,13 +119500,13 @@ function getWslLinuxHomeDir3(windowsConfigRoot) {
119553
119500
  return envHome;
119554
119501
  }
119555
119502
  const user = process.env.USER?.trim() || process.env.LOGNAME?.trim() || process.env.SUDO_USER?.trim() || (windowsConfigRoot ? getWindowsUserFromConfigRoot3(windowsConfigRoot) : undefined);
119556
- return user ? posix7.join("/home", user) : null;
119503
+ return user ? posix6.join("/home", user) : null;
119557
119504
  }
119558
119505
  function getCliDefaultConfigDir3() {
119559
119506
  const envXdgConfig = process.env.XDG_CONFIG_HOME?.trim();
119560
119507
  const shouldIgnoreWindowsXdg = envXdgConfig !== undefined && envXdgConfig.length > 0 && isWslEnvironment3() && isWindowsUserConfigRoot3(envXdgConfig);
119561
- const xdgConfig = shouldIgnoreWindowsXdg ? posix7.join(getWslLinuxHomeDir3(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join108(homedir28(), ".config");
119562
- const configDir = isWslEnvironment3() ? posix7.join(xdgConfig, "opencode") : join108(xdgConfig, "opencode");
119508
+ const xdgConfig = shouldIgnoreWindowsXdg ? posix6.join(getWslLinuxHomeDir3(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join108(homedir28(), ".config");
119509
+ const configDir = isWslEnvironment3() ? posix6.join(xdgConfig, "opencode") : join108(xdgConfig, "opencode");
119563
119510
  return resolveConfigPath3(configDir);
119564
119511
  }
119565
119512
  function getCliCustomConfigDir3() {
@@ -119589,7 +119536,7 @@ function getOpenCodeConfigDir3(options) {
119589
119536
  }
119590
119537
  const identifier = isDevBuild3(version) ? TAURI_APP_IDENTIFIER_DEV3 : TAURI_APP_IDENTIFIER3;
119591
119538
  const tauriDirBase = getTauriConfigDir3(identifier);
119592
- const tauriDir = process.platform === "win32" ? win3210.isAbsolute(tauriDirBase) ? win3210.normalize(tauriDirBase) : win3210.resolve(tauriDirBase) : resolveConfigPath3(tauriDirBase);
119539
+ const tauriDir = process.platform === "win32" ? win329.isAbsolute(tauriDirBase) ? win329.normalize(tauriDirBase) : win329.resolve(tauriDirBase) : resolveConfigPath3(tauriDirBase);
119593
119540
  if (checkExisting) {
119594
119541
  const legacyDir = getCliConfigDir3();
119595
119542
  const legacyConfig = join108(legacyDir, "opencode.json");
@@ -119604,11 +119551,11 @@ function getOpenCodeConfigDir3(options) {
119604
119551
  init_src();
119605
119552
  // packages/claude-code-compat-core/src/shared/resolve-agent-definition-paths.ts
119606
119553
  import { homedir as homedir29 } from "os";
119607
- import { isAbsolute as isAbsolute18, join as join109, resolve as resolve34 } from "path";
119554
+ import { isAbsolute as isAbsolute17, join as join109, resolve as resolve33 } from "path";
119608
119555
  function resolveAgentDefinitionPaths2(paths, baseDir, containmentDir) {
119609
119556
  return paths.flatMap((p) => {
119610
119557
  const expanded = p.startsWith("~/") ? join109(homedir29(), p.slice(2)) : p;
119611
- const resolved = isAbsolute18(expanded) ? expanded : resolve34(baseDir, expanded);
119558
+ const resolved = isAbsolute17(expanded) ? expanded : resolve33(baseDir, expanded);
119612
119559
  if (containmentDir !== null && !isWithinProject(resolved, containmentDir)) {
119613
119560
  log4(`agent_definitions path rejected (outside project boundary): ${p} -> ${resolved}`);
119614
119561
  return [];
@@ -119659,10 +119606,10 @@ function getOpenCodeCommandDirs2(options) {
119659
119606
  // packages/claude-code-compat-core/src/shared/project-discovery-dirs.ts
119660
119607
  import { execFileSync as execFileSync6 } from "child_process";
119661
119608
  import { existsSync as existsSync94, realpathSync as realpathSync17 } from "fs";
119662
- import { dirname as dirname37, join as join111, resolve as resolve35, win32 as win3211 } from "path";
119609
+ import { dirname as dirname37, join as join111, resolve as resolve34, win32 as win3210 } from "path";
119663
119610
  var worktreePathCache3 = new Map;
119664
119611
  function normalizePath6(path18) {
119665
- const resolvedPath = process.platform !== "win32" && win3211.isAbsolute(path18) ? path18 : resolve35(path18);
119612
+ const resolvedPath = process.platform !== "win32" && win3210.isAbsolute(path18) ? path18 : resolve34(path18);
119666
119613
  if (!existsSync94(resolvedPath)) {
119667
119614
  return resolvedPath;
119668
119615
  }
@@ -119687,7 +119634,7 @@ function pathKey3(path18) {
119687
119634
  return process.platform === "win32" ? normalized.toLowerCase() : normalized;
119688
119635
  }
119689
119636
  function detectWorktreePath4(directory) {
119690
- const resolvedDirectory = resolve35(directory);
119637
+ const resolvedDirectory = resolve34(directory);
119691
119638
  const cacheKey = pathKey3(normalizePath6(resolvedDirectory));
119692
119639
  if (worktreePathCache3.has(cacheKey)) {
119693
119640
  return worktreePathCache3.get(cacheKey);
@@ -120124,7 +120071,7 @@ Task ID: ${task.id}`;
120124
120071
  if (toolContext.abort?.aborted) {
120125
120072
  break;
120126
120073
  }
120127
- await new Promise((resolve36) => setTimeout(resolve36, WAIT_FOR_SESSION_INTERVAL_MS));
120074
+ await new Promise((resolve35) => setTimeout(resolve35, WAIT_FOR_SESSION_INTERVAL_MS));
120128
120075
  }
120129
120076
  await toolContext.metadata?.({
120130
120077
  title: args.description,
@@ -120204,7 +120151,7 @@ async function waitForCompletion(sessionID, toolContext, ctx) {
120204
120151
  log2(`[call_omo_agent] Aborted by user`);
120205
120152
  throw new Error("Task aborted.");
120206
120153
  }
120207
- await new Promise((resolve36) => setTimeout(resolve36, POLL_INTERVAL_MS));
120154
+ await new Promise((resolve35) => setTimeout(resolve35, POLL_INTERVAL_MS));
120208
120155
  const statusResult = await ctx.client.session.status();
120209
120156
  const allStatuses = normalizeSDKResponse(statusResult, {});
120210
120157
  const sessionStatus = allStatuses[sessionID];
@@ -121407,7 +121354,7 @@ async function waitForLookAtSessionResult(client3, sessionID, options) {
121407
121354
  sawNonIdleStatus
121408
121355
  });
121409
121356
  }
121410
- await new Promise((resolve36) => setTimeout(resolve36, pollInterval));
121357
+ await new Promise((resolve35) => setTimeout(resolve35, pollInterval));
121411
121358
  }
121412
121359
  throw new Error(`[look_at] Polling timed out after ${timeout}ms waiting for session ${sessionID} to become idle`);
121413
121360
  }
@@ -123121,7 +123068,7 @@ async function executeUnstableAgentTask(args, ctx, executorCtx, parentContext, a
123121
123068
 
123122
123069
  Task ID: ${task.id}`;
123123
123070
  }
123124
- await new Promise((resolve36) => setTimeout(resolve36, timing.WAIT_FOR_SESSION_INTERVAL_MS));
123071
+ await new Promise((resolve35) => setTimeout(resolve35, timing.WAIT_FOR_SESSION_INTERVAL_MS));
123125
123072
  const updated = manager.getTask(task.id);
123126
123073
  sessionID = updated?.sessionId;
123127
123074
  }
@@ -123183,7 +123130,7 @@ Session ID: ${sessionID}`;
123183
123130
  }
123184
123131
  const timeoutBudgetMs = syncPollTimeoutMs ?? DEFAULT_SYNC_POLL_TIMEOUT_MS;
123185
123132
  const remainingBudgetMs = timeoutBudgetMs - (Date.now() - pollStart);
123186
- await new Promise((resolve36) => setTimeout(resolve36, Math.min(timingCfg.POLL_INTERVAL_MS, Math.max(1, remainingBudgetMs))));
123133
+ await new Promise((resolve35) => setTimeout(resolve35, Math.min(timingCfg.POLL_INTERVAL_MS, Math.max(1, remainingBudgetMs))));
123187
123134
  const statusResult = await client3.session.status();
123188
123135
  const allStatuses = normalizeSDKResponse(statusResult, {});
123189
123136
  const sessionStatus = allStatuses[sessionID];
@@ -123322,7 +123269,7 @@ function continueSessionSetup(args) {
123322
123269
  (async () => {
123323
123270
  const waitStart = Date.now();
123324
123271
  while (Date.now() - waitStart < args.timing.WAIT_FOR_SESSION_TIMEOUT_MS) {
123325
- await new Promise((resolve36) => setTimeout(resolve36, args.timing.WAIT_FOR_SESSION_INTERVAL_MS));
123272
+ await new Promise((resolve35) => setTimeout(resolve35, args.timing.WAIT_FOR_SESSION_INTERVAL_MS));
123326
123273
  const updated = args.manager.getTask(args.taskID);
123327
123274
  if (!updated) {
123328
123275
  return;
@@ -123360,7 +123307,7 @@ async function waitForBackgroundSessionStart(args) {
123360
123307
  args.onAbort();
123361
123308
  return;
123362
123309
  }
123363
- await new Promise((resolve36) => setTimeout(resolve36, args.timing.WAIT_FOR_SESSION_INTERVAL_MS));
123310
+ await new Promise((resolve35) => setTimeout(resolve35, args.timing.WAIT_FOR_SESSION_INTERVAL_MS));
123364
123311
  }
123365
123312
  return sessionId;
123366
123313
  }
@@ -125065,7 +125012,7 @@ var TaskDeleteInputSchema = z4.object({
125065
125012
  });
125066
125013
 
125067
125014
  // packages/omo-opencode/src/features/claude-tasks/storage.ts
125068
- import { join as join115, dirname as dirname40, basename as basename21, isAbsolute as isAbsolute19 } from "path";
125015
+ import { join as join115, dirname as dirname40, basename as basename21, isAbsolute as isAbsolute18 } from "path";
125069
125016
  import { existsSync as existsSync100, mkdirSync as mkdirSync19, readFileSync as readFileSync66, writeFileSync as writeFileSync20, renameSync as renameSync7, unlinkSync as unlinkSync15, readdirSync as readdirSync24 } from "fs";
125070
125017
  import { randomUUID as randomUUID7 } from "crypto";
125071
125018
  function ignoreClaudeTaskStorageError(error) {
@@ -125077,7 +125024,7 @@ function getTaskDir(config = {}) {
125077
125024
  const tasksConfig = config.sisyphus?.tasks;
125078
125025
  const storagePath = tasksConfig?.storage_path;
125079
125026
  if (storagePath) {
125080
- return isAbsolute19(storagePath) ? storagePath : join115(process.cwd(), storagePath);
125027
+ return isAbsolute18(storagePath) ? storagePath : join115(process.cwd(), storagePath);
125081
125028
  }
125082
125029
  const configDir = getOpenCodeConfigDir({ binary: "opencode" });
125083
125030
  const listId = resolveTaskListId(config);
@@ -125977,6 +125924,9 @@ async function assertTeamAcceptsMessages(teamRunId, config) {
125977
125924
  function resolveRecipients(message, context) {
125978
125925
  if (message.to !== "*") {
125979
125926
  const allowedRecipients = new Set([...context.activeMembers, ...context.reservedRecipients ?? []]);
125927
+ if (context.leadRecipient !== undefined) {
125928
+ allowedRecipients.add(context.leadRecipient);
125929
+ }
125980
125930
  if (!allowedRecipients.has(message.to)) {
125981
125931
  throw new InvalidRecipientError(message.to);
125982
125932
  }
@@ -126046,7 +125996,7 @@ async function sendMessage(message, teamRunId, config, context) {
126046
125996
  if (await fileExists(unreservedPath) || await fileExists(reservedPath)) {
126047
125997
  throw new DuplicateMessageIdError;
126048
125998
  }
126049
- const targetPath = reservedRecipients.has(recipient) ? reservedPath : unreservedPath;
125999
+ const targetPath = recipient !== context.leadRecipient && reservedRecipients.has(recipient) ? reservedPath : unreservedPath;
126050
126000
  await atomicWrite(targetPath, serializedMessage);
126051
126001
  deliveredTo.push(recipient);
126052
126002
  }, { ownerTag: `team-mailbox:${recipient}` });
@@ -127122,9 +127072,9 @@ async function abortWithTimeout(client3, sessionID, timeoutMs = 1e4) {
127122
127072
  });
127123
127073
  return "failed";
127124
127074
  }),
127125
- new Promise((resolve36) => {
127075
+ new Promise((resolve35) => {
127126
127076
  timeoutHandle = setTimeout(() => {
127127
- resolve36("timed_out");
127077
+ resolve35("timed_out");
127128
127078
  }, timeoutMs);
127129
127079
  })
127130
127080
  ]);
@@ -127526,7 +127476,7 @@ class ConcurrencyManager {
127526
127476
  this.counts.set(key, current + 1);
127527
127477
  return;
127528
127478
  }
127529
- return new Promise((resolve36, reject) => {
127479
+ return new Promise((resolve35, reject) => {
127530
127480
  const queue = this.queues.get(key) ?? [];
127531
127481
  const entry = {
127532
127482
  taskId,
@@ -127534,7 +127484,7 @@ class ConcurrencyManager {
127534
127484
  if (entry.settled)
127535
127485
  return;
127536
127486
  entry.settled = true;
127537
- resolve36();
127487
+ resolve35();
127538
127488
  },
127539
127489
  rawReject: reject,
127540
127490
  settled: false
@@ -132254,10 +132204,10 @@ The task was re-queued on a fallback model after a retryable failure.
132254
132204
  return this.scheduledFlushSettledCounts.get(sessionID) ?? 0;
132255
132205
  }
132256
132206
  awaitScheduledFlush(sessionID, sinceCount) {
132257
- return new Promise((resolve36) => {
132207
+ return new Promise((resolve35) => {
132258
132208
  const arm = () => {
132259
132209
  if ((this.scheduledFlushSettledCounts.get(sessionID) ?? 0) > sinceCount) {
132260
- resolve36();
132210
+ resolve35();
132261
132211
  return;
132262
132212
  }
132263
132213
  const waiters = this.scheduledFlushSettledWaiters.get(sessionID) ?? [];
@@ -133364,8 +133314,8 @@ function spawnMonitoredProcess(opts, deps) {
133364
133314
  let watchdogTimer;
133365
133315
  let graceTimer;
133366
133316
  let resolvePublicExit = () => {};
133367
- const publicExit = new Promise((resolve36) => {
133368
- resolvePublicExit = resolve36;
133317
+ const publicExit = new Promise((resolve35) => {
133318
+ resolvePublicExit = resolve35;
133369
133319
  });
133370
133320
  function clearWatchdog() {
133371
133321
  if (watchdogTimer !== undefined) {
@@ -133855,9 +133805,9 @@ import { basename as basename22, dirname as dirname41, join as join124 } from "p
133855
133805
  // packages/mcp-client-core/src/config-dir.ts
133856
133806
  import { existsSync as existsSync102, realpathSync as realpathSync18 } from "fs";
133857
133807
  import { homedir as homedir30 } from "os";
133858
- import { join as join122, resolve as resolve36 } from "path";
133808
+ import { join as join122, resolve as resolve35 } from "path";
133859
133809
  function resolveConfigPath4(pathValue) {
133860
- const resolvedPath = resolve36(pathValue);
133810
+ const resolvedPath = resolve35(pathValue);
133861
133811
  if (!existsSync102(resolvedPath))
133862
133812
  return resolvedPath;
133863
133813
  try {
@@ -134253,7 +134203,7 @@ function buildAuthorizationUrl(authorizationEndpoint, options) {
134253
134203
  }
134254
134204
  var CALLBACK_TIMEOUT_MS = 5 * 60 * 1000;
134255
134205
  function startCallbackServer(port) {
134256
- return new Promise((resolve37, reject) => {
134206
+ return new Promise((resolve36, reject) => {
134257
134207
  let timeoutId;
134258
134208
  const server2 = createServer2((request, response) => {
134259
134209
  clearTimeout(timeoutId);
@@ -134279,7 +134229,7 @@ function startCallbackServer(port) {
134279
134229
  response.writeHead(200, { "content-type": "text/html" });
134280
134230
  response.end("<html><body><h1>Authorization successful. You can close this tab.</h1></body></html>");
134281
134231
  server2.close();
134282
- resolve37({ code, state: state3 });
134232
+ resolve36({ code, state: state3 });
134283
134233
  });
134284
134234
  timeoutId = setTimeout(() => {
134285
134235
  server2.close();
@@ -136054,7 +136004,7 @@ class Protocol {
136054
136004
  return;
136055
136005
  }
136056
136006
  const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1000;
136057
- await new Promise((resolve37) => setTimeout(resolve37, pollInterval));
136007
+ await new Promise((resolve36) => setTimeout(resolve36, pollInterval));
136058
136008
  options?.signal?.throwIfAborted();
136059
136009
  }
136060
136010
  } catch (error) {
@@ -136066,7 +136016,7 @@ class Protocol {
136066
136016
  }
136067
136017
  request(request, resultSchema, options) {
136068
136018
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
136069
- return new Promise((resolve37, reject) => {
136019
+ return new Promise((resolve36, reject) => {
136070
136020
  const earlyReject = (error) => {
136071
136021
  reject(error);
136072
136022
  };
@@ -136144,7 +136094,7 @@ class Protocol {
136144
136094
  if (!parseResult.success) {
136145
136095
  reject(parseResult.error);
136146
136096
  } else {
136147
- resolve37(parseResult.data);
136097
+ resolve36(parseResult.data);
136148
136098
  }
136149
136099
  } catch (error) {
136150
136100
  reject(error);
@@ -136335,12 +136285,12 @@ class Protocol {
136335
136285
  interval = task.pollInterval;
136336
136286
  }
136337
136287
  } catch {}
136338
- return new Promise((resolve37, reject) => {
136288
+ return new Promise((resolve36, reject) => {
136339
136289
  if (signal.aborted) {
136340
136290
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
136341
136291
  return;
136342
136292
  }
136343
- const timeoutId = setTimeout(resolve37, interval);
136293
+ const timeoutId = setTimeout(resolve36, interval);
136344
136294
  signal.addEventListener("abort", () => {
136345
136295
  clearTimeout(timeoutId);
136346
136296
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
@@ -138869,7 +138819,7 @@ class StdioClientTransport {
138869
138819
  if (this._process) {
138870
138820
  throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
138871
138821
  }
138872
- return new Promise((resolve37, reject) => {
138822
+ return new Promise((resolve36, reject) => {
138873
138823
  this._process = import_cross_spawn2.default(this._serverParams.command, this._serverParams.args ?? [], {
138874
138824
  env: {
138875
138825
  ...getDefaultEnvironment(),
@@ -138885,7 +138835,7 @@ class StdioClientTransport {
138885
138835
  this.onerror?.(error);
138886
138836
  });
138887
138837
  this._process.on("spawn", () => {
138888
- resolve37();
138838
+ resolve36();
138889
138839
  });
138890
138840
  this._process.on("close", (_code) => {
138891
138841
  this._process = undefined;
@@ -138932,20 +138882,20 @@ class StdioClientTransport {
138932
138882
  if (this._process) {
138933
138883
  const processToClose = this._process;
138934
138884
  this._process = undefined;
138935
- const closePromise = new Promise((resolve37) => {
138885
+ const closePromise = new Promise((resolve36) => {
138936
138886
  processToClose.once("close", () => {
138937
- resolve37();
138887
+ resolve36();
138938
138888
  });
138939
138889
  });
138940
138890
  try {
138941
138891
  processToClose.stdin?.end();
138942
138892
  } catch {}
138943
- await Promise.race([closePromise, new Promise((resolve37) => setTimeout(resolve37, 2000).unref())]);
138893
+ await Promise.race([closePromise, new Promise((resolve36) => setTimeout(resolve36, 2000).unref())]);
138944
138894
  if (processToClose.exitCode === null) {
138945
138895
  try {
138946
138896
  processToClose.kill("SIGTERM");
138947
138897
  } catch {}
138948
- await Promise.race([closePromise, new Promise((resolve37) => setTimeout(resolve37, 2000).unref())]);
138898
+ await Promise.race([closePromise, new Promise((resolve36) => setTimeout(resolve36, 2000).unref())]);
138949
138899
  }
138950
138900
  if (processToClose.exitCode === null) {
138951
138901
  try {
@@ -138956,15 +138906,15 @@ class StdioClientTransport {
138956
138906
  this._readBuffer.clear();
138957
138907
  }
138958
138908
  send(message) {
138959
- return new Promise((resolve37) => {
138909
+ return new Promise((resolve36) => {
138960
138910
  if (!this._process?.stdin) {
138961
138911
  throw new Error("Not connected");
138962
138912
  }
138963
138913
  const json = serializeMessage(message);
138964
138914
  if (this._process.stdin.write(json)) {
138965
- resolve37();
138915
+ resolve36();
138966
138916
  } else {
138967
- this._process.stdin.once("drain", resolve37);
138917
+ this._process.stdin.once("drain", resolve36);
138968
138918
  }
138969
138919
  });
138970
138920
  }
@@ -139427,7 +139377,7 @@ import { dirname as dirname42 } from "path";
139427
139377
  import { createHash as createHash8 } from "crypto";
139428
139378
  import { realpathSync as realpathSync19 } from "fs";
139429
139379
  import { homedir as homedir31 } from "os";
139430
- import { join as join125, resolve as resolve37 } from "path";
139380
+ import { join as join125, resolve as resolve36 } from "path";
139431
139381
  function mirrorStorageDir() {
139432
139382
  return join125(process.env.XDG_DATA_HOME ?? join125(homedir31(), ".local", "share"), "opencode", "storage", "oh-my-openagent", MIRROR_DIR_NAME);
139433
139383
  }
@@ -139436,7 +139386,7 @@ function canonicalProjectDir(projectDir) {
139436
139386
  return realpathSync19.native(projectDir);
139437
139387
  } catch (error) {
139438
139388
  if (error instanceof Error) {
139439
- return resolve37(projectDir);
139389
+ return resolve36(projectDir);
139440
139390
  }
139441
139391
  throw error;
139442
139392
  }
@@ -140711,8 +140661,8 @@ async function waitForSessionReady(params) {
140711
140661
  } catch (error) {
140712
140662
  log2("[tmux-session-manager] session status check error", { error: String(error) });
140713
140663
  }
140714
- await new Promise((resolve38) => {
140715
- setTimeout(resolve38, SESSION_READY_POLL_INTERVAL_MS);
140664
+ await new Promise((resolve37) => {
140665
+ setTimeout(resolve37, SESSION_READY_POLL_INTERVAL_MS);
140716
140666
  });
140717
140667
  }
140718
140668
  log2("[tmux-session-manager] session ready timeout", {
@@ -142831,7 +142781,7 @@ function markReplyListenerStopped(state3, error) {
142831
142781
 
142832
142782
  // packages/openclaw-core/src/reply-listener-sleep.ts
142833
142783
  function sleep3(ms) {
142834
- return new Promise((resolve38) => setTimeout(resolve38, ms));
142784
+ return new Promise((resolve37) => setTimeout(resolve37, ms));
142835
142785
  }
142836
142786
 
142837
142787
  // packages/openclaw-core/src/reply-listener-signature.ts
@@ -143474,11 +143424,11 @@ async function createRuntimeSkillSourceServer(options, runtimeEnv = runtime6) {
143474
143424
  response.end(error instanceof Error ? error.message : String(error));
143475
143425
  }
143476
143426
  });
143477
- await new Promise((resolve38, reject) => {
143427
+ await new Promise((resolve37, reject) => {
143478
143428
  const onError = (error) => reject(error);
143479
143429
  const onListening = () => {
143480
143430
  server3.off("error", onError);
143481
- resolve38();
143431
+ resolve37();
143482
143432
  };
143483
143433
  server3.once("error", onError);
143484
143434
  server3.once("listening", onListening);
@@ -148718,7 +148668,6 @@ call_omo_agent(subagent_type="librarian", prompt="I'm implementing [technology]
148718
148668
  **Questions to Ask** (AFTER exploration):
148719
148669
  1. Found pattern X in codebase. Should new code follow this, or deviate? Why?
148720
148670
  2. What should explicitly NOT be built? (scope boundaries)
148721
- 3. What's the minimum viable version vs full vision?
148722
148671
 
148723
148672
  **Directives for Prometheus**:
148724
148673
  - MUST: Follow patterns from \`[discovered file:lines]\`
@@ -148805,7 +148754,6 @@ Task(
148805
148754
  **Directives for Prometheus**:
148806
148755
  - MUST: Consult Oracle before finalizing plan
148807
148756
  - MUST: Document architectural decisions with rationale
148808
- - MUST: Define "minimum viable architecture"
148809
148757
  - MUST NOT: Introduce complexity without justification
148810
148758
 
148811
148759
  ---
@@ -148949,13 +148897,13 @@ If the type is genuinely ambiguous between two of these, ask before proceeding;
148949
148897
 
148950
148898
  **Refactoring** \u2014 protect behavior. Recommend the tools that make changes safe: \`lsp_find_references\` to map usages, \`lsp_rename\` / \`lsp_prepare_rename\` for safe renames, and the \`ast-grep\` skill or \`sg --pattern '...' --rewrite '...' --lang ts\` to preview structural transforms. Ask what behavior must be preserved and with which test command, what the rollback is, and whether the change propagates or stays isolated. Direct Prometheus to define pre-refactor verification (exact commands and expected outputs), verify after each change rather than only at the end, never change behavior while restructuring, and never touch adjacent out-of-scope code.
148951
148899
 
148952
- **Build from scratch** \u2014 discover before asking. Fire explore/librarian first to learn the codebase's patterns and the library's best practices, then ask only what the code could not answer: follow the found pattern or deviate; what must explicitly NOT be built; the minimum viable version versus the full vision. Direct Prometheus to follow the discovered patterns by \`file:lines\`, define a "Must NOT Have" section against over-engineering, and add nothing unrequested.
148900
+ **Build from scratch** \u2014 discover before asking. Fire explore/librarian first to learn the codebase's patterns and the library's best practices, then ask only what the code could not answer: follow the found pattern or deviate; what must explicitly NOT be built. Direct Prometheus to follow the discovered patterns by \`file:lines\`, define a "Must NOT Have" section against over-engineering, and add nothing unrequested.
148953
148901
 
148954
148902
  **Mid-sized task** \u2014 define exact boundaries; this is where AI slop creeps in. Ask for the exact outputs (files, endpoints, UI), the explicit exclusions, the hard boundaries, and the done-criteria. Turn the slop patterns into questions: scope inflation ("tests for adjacent modules too?"), premature abstraction ("abstraction or inline?"), over-validation ("minimal or comprehensive error handling?"), documentation bloat ("how much documentation?"). Direct Prometheus to write Must-Have and Must-NOT-Have sections with per-task guardrails.
148955
148903
 
148956
148904
  **Collaborative** \u2014 build understanding through dialogue, no rush. Start from the problem, not the proposed solution; gather context with explore/librarian as the user gives direction; refine incrementally; do not finalize until the user confirms. Ask what problem they are solving, what constraints exist, and what tradeoffs are acceptable. Direct Prometheus to record every decision and flag every assumption.
148957
148905
 
148958
- **Architecture** \u2014 strategic and long-term. Recommend Prometheus consult Oracle with the request and the gathered context for options, tradeoffs, and risks. Ask the expected lifespan, the scale and load, the non-negotiable constraints, and the systems it must integrate with. Guard against over-engineering for hypothetical futures and unnecessary abstraction layers; direct Prometheus to document decisions with rationale and define a minimum viable architecture.
148906
+ **Architecture** \u2014 strategic and long-term. Recommend Prometheus consult Oracle with the request and the gathered context for options, tradeoffs, and risks. Ask the expected lifespan, the scale and load, the non-negotiable constraints, and the systems it must integrate with. Guard against over-engineering for hypothetical futures and unnecessary abstraction layers; direct Prometheus to document decisions with rationale.
148959
148907
 
148960
148908
  **Research** \u2014 bound the investigation. Ask the decision the research informs, the exit criteria, the time box, and the expected output. Structure parallel probes via explore/librarian. Direct Prometheus to define clear exit criteria, parallel tracks, and a synthesis format, and never to research without convergence.
148961
148909
 
@@ -150698,7 +150646,7 @@ createHephaestusAgent.mode = MODE9;
150698
150646
  // packages/omo-opencode/src/agents/builtin-agents/resolve-file-uri.ts
150699
150647
  import { existsSync as existsSync111, readFileSync as readFileSync77 } from "fs";
150700
150648
  import { homedir as homedir34 } from "os";
150701
- import { isAbsolute as isAbsolute20, join as join131, resolve as resolve38 } from "path";
150649
+ import { isAbsolute as isAbsolute19, join as join131, resolve as resolve37 } from "path";
150702
150650
  init_logger2();
150703
150651
  var ALLOWED_HOME_SUBDIRS = [
150704
150652
  join131(homedir34(), ".config", "opencode"),
@@ -150723,7 +150671,7 @@ function resolvePromptAppend(promptAppend, configDir) {
150723
150671
  try {
150724
150672
  const decoded = decodeURIComponent(encoded);
150725
150673
  const expanded = decoded.startsWith("~/") ? decoded.replace(/^~\//, `${homedir34()}/`) : decoded;
150726
- filePath = isAbsolute20(expanded) ? expanded : resolve38(configDir ?? process.cwd(), expanded);
150674
+ filePath = isAbsolute19(expanded) ? expanded : resolve37(configDir ?? process.cwd(), expanded);
150727
150675
  } catch (error) {
150728
150676
  if (!(error instanceof Error)) {
150729
150677
  throw error;
@@ -153810,7 +153758,7 @@ function createCodegraphMcpConfig(options = {}) {
153810
153758
 
153811
153759
  // packages/omo-opencode/src/mcp/lsp.ts
153812
153760
  import { existsSync as existsSync113 } from "fs";
153813
- import { delimiter as delimiter2, dirname as dirname45, resolve as resolve40 } from "path";
153761
+ import { delimiter as delimiter2, dirname as dirname45, resolve as resolve39 } from "path";
153814
153762
  import { fileURLToPath as fileURLToPath8 } from "url";
153815
153763
 
153816
153764
  // packages/omo-opencode/src/mcp/cli-suffix.ts
@@ -153822,7 +153770,7 @@ function hasCliSuffix(candidatePath, suffix) {
153822
153770
  }
153823
153771
 
153824
153772
  // packages/omo-opencode/src/mcp/shared/ancestor-cli-resolver.ts
153825
- import { resolve as resolve39 } from "path";
153773
+ import { resolve as resolve38 } from "path";
153826
153774
  function resolveJavaScriptRuntime(resolveExecutable) {
153827
153775
  const node = resolveExecutable("node");
153828
153776
  return node.available ? node : resolveExecutable("bun");
@@ -153830,9 +153778,9 @@ function resolveJavaScriptRuntime(resolveExecutable) {
153830
153778
  function createAncestorCliCandidates(options) {
153831
153779
  const candidates = [];
153832
153780
  const seenPaths = new Set;
153833
- let currentDirectory = resolve39(options.startDirectory);
153781
+ let currentDirectory = resolve38(options.startDirectory);
153834
153782
  while (true) {
153835
- const distCliPath = resolve39(currentDirectory, options.packageRel, options.distCliRel);
153783
+ const distCliPath = resolve38(currentDirectory, options.packageRel, options.distCliRel);
153836
153784
  if (!seenPaths.has(distCliPath)) {
153837
153785
  const runtime7 = resolveJavaScriptRuntime(options.resolveExecutable);
153838
153786
  seenPaths.add(distCliPath);
@@ -153844,7 +153792,7 @@ function createAncestorCliCandidates(options) {
153844
153792
  runtimeAvailable: runtime7.available
153845
153793
  });
153846
153794
  }
153847
- const sourceCliPath = resolve39(currentDirectory, options.packageRel, options.sourceCliRel);
153795
+ const sourceCliPath = resolve38(currentDirectory, options.packageRel, options.sourceCliRel);
153848
153796
  if (!seenPaths.has(sourceCliPath)) {
153849
153797
  const runtime7 = options.resolveExecutable("bun");
153850
153798
  const sourceCandidateAvailable = options.isSourceCandidateAvailable?.({
@@ -153861,7 +153809,7 @@ function createAncestorCliCandidates(options) {
153861
153809
  runtimeAvailable: runtime7.available
153862
153810
  });
153863
153811
  }
153864
- const parentDirectory = resolve39(currentDirectory, "..");
153812
+ const parentDirectory = resolve38(currentDirectory, "..");
153865
153813
  if (parentDirectory === currentDirectory)
153866
153814
  return candidates;
153867
153815
  currentDirectory = parentDirectory;
@@ -153905,17 +153853,17 @@ function getModuleDirectory(moduleUrl) {
153905
153853
  }
153906
153854
  }
153907
153855
  function findBootstrapRoot(candidates, pathExists) {
153908
- return candidates.find((candidate) => pathExists(resolve40(candidate.root, "package.json")))?.root ?? process.cwd();
153856
+ return candidates.find((candidate) => pathExists(resolve39(candidate.root, "package.json")))?.root ?? process.cwd();
153909
153857
  }
153910
153858
  function createBootstrapCandidate(root, pathExists, resolveExecutable) {
153911
153859
  const runtime7 = resolveJavaScriptRuntime(resolveExecutable);
153912
153860
  const bun = resolveExecutable("bun");
153913
153861
  const npm = resolveExecutable("npm");
153914
- const packageManifestPath = resolve40(root, PACKAGE_REL, "package.json");
153862
+ const packageManifestPath = resolve39(root, PACKAGE_REL, "package.json");
153915
153863
  return {
153916
153864
  command: [runtime7.command, "-e", LSP_BOOTSTRAP_SCRIPT, root, npm.command, bun.command],
153917
153865
  root,
153918
- path: resolve40(root, PACKAGE_REL, DIST_CLI_REL),
153866
+ path: resolve39(root, PACKAGE_REL, DIST_CLI_REL),
153919
153867
  exists: runtime7.available && npm.available && pathExists(packageManifestPath),
153920
153868
  runtimeAvailable: runtime7.available
153921
153869
  };
@@ -153931,7 +153879,7 @@ function resolveLspCommand(options = {}) {
153931
153879
  sourceCliRel: SOURCE_CLI_REL,
153932
153880
  pathExists,
153933
153881
  resolveExecutable,
153934
- isSourceCandidateAvailable: ({ root }) => pathExists(resolve40(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL))
153882
+ isSourceCandidateAvailable: ({ root }) => pathExists(resolve39(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL))
153935
153883
  }) : [];
153936
153884
  const distCandidate = candidates.find((candidate) => hasCliSuffix(candidate.path, DIST_CLI_REL) && candidate.exists);
153937
153885
  if (distCandidate) {
@@ -154561,7 +154509,7 @@ function createTeamModeToolsRecord(args) {
154561
154509
  // node_modules/.bun/@opencode-ai+sdk@1.15.13/node_modules/@opencode-ai/sdk/dist/v2/gen/core/serverSentEvents.gen.js
154562
154510
  var createSseClient2 = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url: url2, ...options }) => {
154563
154511
  let lastEventId;
154564
- const sleep4 = sseSleepFn ?? ((ms) => new Promise((resolve41) => setTimeout(resolve41, ms)));
154512
+ const sleep4 = sseSleepFn ?? ((ms) => new Promise((resolve40) => setTimeout(resolve40, ms)));
154565
154513
  const createStream = async function* () {
154566
154514
  let retryDelay = sseDefaultRetryDelay ?? 3000;
154567
154515
  let attempt = 0;
@@ -158110,7 +158058,7 @@ async function readRuntimeHostSkills(client5) {
158110
158058
  function createRuntimeSkillsResolver(args) {
158111
158059
  const { baseSkills, readRuntimeHostSkills: readHostSkills, buildMergedSkills } = args;
158112
158060
  let inflight;
158113
- const resolve41 = async () => {
158061
+ const resolve40 = async () => {
158114
158062
  const hostSkills = await readHostSkills();
158115
158063
  if (!hostSkills)
158116
158064
  return baseSkills;
@@ -158122,7 +158070,7 @@ function createRuntimeSkillsResolver(args) {
158122
158070
  };
158123
158071
  return () => {
158124
158072
  if (!inflight)
158125
- inflight = resolve41();
158073
+ inflight = resolve40();
158126
158074
  return inflight;
158127
158075
  };
158128
158076
  }
@@ -158962,7 +158910,7 @@ async function waitForTaskSessionId(bgMgr, task, deadlineAt) {
158962
158910
  }
158963
158911
  sessionId = updatedTask?.sessionId;
158964
158912
  if (!sessionId)
158965
- await new Promise((resolve41) => setTimeout(resolve41, SESSION_ID_POLL_MS));
158913
+ await new Promise((resolve40) => setTimeout(resolve40, SESSION_ID_POLL_MS));
158966
158914
  }
158967
158915
  return sessionId;
158968
158916
  }
@@ -160450,13 +160398,13 @@ function logCaughtDbError(message, metadata, error) {
160450
160398
  log2(message, { ...metadata, error: String(error) });
160451
160399
  }
160452
160400
  function nextMicrotask() {
160453
- return new Promise((resolve41) => {
160454
- queueMicrotask(resolve41);
160401
+ return new Promise((resolve40) => {
160402
+ queueMicrotask(resolve40);
160455
160403
  });
160456
160404
  }
160457
160405
  function nextTimerTick() {
160458
- return new Promise((resolve41) => {
160459
- setTimeout(resolve41, 0);
160406
+ return new Promise((resolve40) => {
160407
+ setTimeout(resolve40, 0);
160460
160408
  });
160461
160409
  }
160462
160410
  function closeDbWithLog(db, message, metadata) {
@@ -164336,7 +164284,7 @@ function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetr
164336
164284
  }
164337
164285
 
164338
164286
  // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
164339
- import { dirname as dirname47, posix as posix8, sep as sep3 } from "path";
164287
+ import { dirname as dirname47, posix as posix7, sep as sep3 } from "path";
164340
164288
  function createModulerModifier() {
164341
164289
  const getModuleFromFileName = createGetModuleFromFilename();
164342
164290
  return async (frames) => {
@@ -164351,7 +164299,7 @@ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname47(proc
164351
164299
  if (!filename)
164352
164300
  return;
164353
164301
  const normalizedFilename = isWindows2 ? normalizeWindowsPath(filename) : filename;
164354
- let { dir, base: file2, ext } = posix8.parse(normalizedFilename);
164302
+ let { dir, base: file2, ext } = posix7.parse(normalizedFilename);
164355
164303
  if (ext === ".js" || ext === ".mjs" || ext === ".cjs")
164356
164304
  file2 = file2.slice(0, -1 * ext.length);
164357
164305
  const decodedFile = decodeURIComponent(file2);
@@ -167032,14 +166980,14 @@ async function addSourceContext(frames) {
167032
166980
  return frames;
167033
166981
  }
167034
166982
  function getContextLinesFromFile(path28, ranges, output) {
167035
- return new Promise((resolve41) => {
166983
+ return new Promise((resolve40) => {
167036
166984
  const stream = createReadStream(path28);
167037
166985
  const lineReaded = createInterface({
167038
166986
  input: stream
167039
166987
  });
167040
166988
  function destroyStreamAndResolve() {
167041
166989
  stream.destroy();
167042
- resolve41();
166990
+ resolve40();
167043
166991
  }
167044
166992
  let lineNumber = 0;
167045
166993
  let currentRangeIndex = 0;
@@ -167207,7 +167155,7 @@ function snipLine(line, colno) {
167207
167155
  }
167208
167156
 
167209
167157
  // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs
167210
- import { isAbsolute as isAbsolute21, relative as relative16, sep as sep4 } from "path";
167158
+ import { isAbsolute as isAbsolute20, relative as relative15, sep as sep4 } from "path";
167211
167159
  function createRelativePathModifier(basePath = process.cwd()) {
167212
167160
  const isWindows2 = sep4 === "\\";
167213
167161
  const toUnix = (p) => isWindows2 ? p.replace(/\\/g, "/") : p;
@@ -167215,8 +167163,8 @@ function createRelativePathModifier(basePath = process.cwd()) {
167215
167163
  return async (frames) => {
167216
167164
  for (const frame of frames)
167217
167165
  if (!(!frame.filename || frame.filename.startsWith("node:") || frame.filename.startsWith("data:"))) {
167218
- if (isAbsolute21(frame.filename))
167219
- frame.filename = toUnix(relative16(normalizedBase, toUnix(frame.filename)));
167166
+ if (isAbsolute20(frame.filename))
167167
+ frame.filename = toUnix(relative15(normalizedBase, toUnix(frame.filename)));
167220
167168
  }
167221
167169
  return frames;
167222
167170
  };
@@ -168490,9 +168438,9 @@ class PostHogBackendClient extends PostHogCoreStateless {
168490
168438
  if (this.disabled || this.optedOut)
168491
168439
  return;
168492
168440
  if (!this._waitUntilCycle) {
168493
- let resolve41;
168441
+ let resolve40;
168494
168442
  const promise2 = new Promise((r) => {
168495
- resolve41 = r;
168443
+ resolve40 = r;
168496
168444
  });
168497
168445
  try {
168498
168446
  waitUntil(promise2);
@@ -168500,7 +168448,7 @@ class PostHogBackendClient extends PostHogCoreStateless {
168500
168448
  return;
168501
168449
  }
168502
168450
  this._waitUntilCycle = {
168503
- resolve: resolve41,
168451
+ resolve: resolve40,
168504
168452
  startedAt: Date.now(),
168505
168453
  timer: undefined
168506
168454
  };
@@ -168526,11 +168474,11 @@ class PostHogBackendClient extends PostHogCoreStateless {
168526
168474
  return cycle?.resolve;
168527
168475
  }
168528
168476
  async resolveWaitUntilFlush() {
168529
- const resolve41 = this._consumeWaitUntilCycle();
168477
+ const resolve40 = this._consumeWaitUntilCycle();
168530
168478
  try {
168531
168479
  await super.flush();
168532
168480
  } catch {} finally {
168533
- resolve41?.();
168481
+ resolve40?.();
168534
168482
  }
168535
168483
  }
168536
168484
  getPersistedProperty(key) {
@@ -168630,15 +168578,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
168630
168578
  return true;
168631
168579
  if (this.featureFlagsPoller === undefined)
168632
168580
  return false;
168633
- return new Promise((resolve41) => {
168581
+ return new Promise((resolve40) => {
168634
168582
  const timeout = setTimeout(() => {
168635
168583
  cleanup();
168636
- resolve41(false);
168584
+ resolve40(false);
168637
168585
  }, timeoutMs);
168638
168586
  const cleanup = this._events.on("localEvaluationFlagsLoaded", (count) => {
168639
168587
  clearTimeout(timeout);
168640
168588
  cleanup();
168641
- resolve41(count > 0);
168589
+ resolve40(count > 0);
168642
168590
  });
168643
168591
  });
168644
168592
  }
@@ -169144,13 +169092,13 @@ class PostHogBackendClient extends PostHogCoreStateless {
169144
169092
  this.context?.enter(data, options);
169145
169093
  }
169146
169094
  async _shutdown(shutdownTimeoutMs) {
169147
- const resolve41 = this._consumeWaitUntilCycle();
169095
+ const resolve40 = this._consumeWaitUntilCycle();
169148
169096
  await this.featureFlagsPoller?.stopPoller(shutdownTimeoutMs);
169149
169097
  this.errorTracking.shutdown();
169150
169098
  try {
169151
169099
  return await super._shutdown(shutdownTimeoutMs);
169152
169100
  } finally {
169153
- resolve41?.();
169101
+ resolve40?.();
169154
169102
  }
169155
169103
  }
169156
169104
  async _requestRemoteConfigPayload(flagKey) {