oh-my-opencode 5.0.0-beta.5 → 5.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +12 -1
  2. package/dist/cli/index.js +341 -214
  3. package/dist/cli-node/index.js +341 -214
  4. package/dist/index.js +1217 -1112
  5. package/dist/skills/coding-agent-sessions/SKILL.md +3 -2
  6. package/dist/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  7. package/dist/skills/coding-agent-sessions/references/senpi.md +4 -4
  8. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
  9. package/dist/tui.js +97 -5
  10. package/package.json +15 -14
  11. package/packages/lsp-core/src/lsp/client-wrapper.test.ts +60 -7
  12. package/packages/lsp-core/src/lsp/client-wrapper.ts +69 -16
  13. package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +20 -1
  14. package/packages/lsp-core/src/tools/diagnostics.ts +3 -3
  15. package/packages/lsp-core/src/tools/navigation.ts +4 -2
  16. package/packages/lsp-core/src/tools/rename.ts +4 -2
  17. package/packages/lsp-core/src/tools/symbols.ts +1 -1
  18. package/packages/lsp-daemon/dist/cli.js +83 -29
  19. package/packages/lsp-daemon/dist/client.js +76 -22
  20. package/packages/lsp-daemon/dist/index.js +81 -27
  21. package/packages/lsp-tools-mcp/dist/cli.js +76 -22
  22. package/packages/lsp-tools-mcp/dist/mcp.js +76 -22
  23. package/packages/lsp-tools-mcp/dist/tools.js +76 -22
  24. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  25. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  26. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  27. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +90 -4
  28. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +90 -4
  29. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  30. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  31. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  32. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  33. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  34. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  35. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  36. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  37. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +83 -29
  38. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  39. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  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/hooks/hooks.json +1 -1
  45. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  46. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +24 -12
  47. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +24 -12
  48. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  49. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  50. package/packages/omo-codex/plugin/components/ultrawork/directive.md +6 -0
  51. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  52. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  53. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +6 -0
  54. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +6 -0
  55. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  56. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  57. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +3 -2
  58. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +106 -0
  59. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -0
  60. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  61. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  62. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  63. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  64. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  65. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  66. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  67. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  68. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  69. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  70. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  71. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  72. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  83. package/packages/omo-codex/plugin/package-lock.json +13 -13
  84. package/packages/omo-codex/plugin/package.json +1 -1
  85. package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +3 -2
  86. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  87. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +4 -4
  88. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
  89. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +6 -0
  90. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +3 -2
  91. package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +106 -0
  92. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -0
  93. package/packages/omo-codex/scripts/install-dist/install-local.mjs +39 -16
  94. package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +3 -2
  95. package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  96. package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +4 -4
  97. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "5.0.0-beta.5",
4
- "inputDigest": "sha256:df8cb1c7886db1829da7323c7b94ce4ed7c13f104961a10b5bb15b0f98e2c0a9",
3
+ "version": "5.0.0-beta.7",
4
+ "inputDigest": "sha256:8a84cb04f394489ea0398adc626f998d153d9d3b31f2e12b91f5d06e389862c9",
5
5
  "outputs": [
6
6
  {
7
7
  "path": "cli.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "path": "cli.js",
12
- "sha256": "805d158f4d99b2fcc318f995efbbf219a8c577952b0785d0da63916d52fc33f8"
12
+ "sha256": "8b31921f00d7333877fa0ba3b50e7318096656ad92249b285148c6fada11459d"
13
13
  },
14
14
  {
15
15
  "path": "codex-hook-cli.d.ts",
@@ -8,7 +8,7 @@ import { argv, execPath as execPath2, stderr } from "node:process";
8
8
  import { stdin as processStdin } from "node:process";
9
9
 
10
10
  // src/codex-hook.ts
11
- import { readFileSync as readFileSync9, realpathSync as realpathSync6 } from "node:fs";
11
+ import { readFileSync as readFileSync9, realpathSync as realpathSync7 } from "node:fs";
12
12
  import { homedir as homedir3 } from "node:os";
13
13
  import { join as join11, resolve as resolve11 } from "node:path";
14
14
 
@@ -42,8 +42,8 @@ import * as path from "node:path";
42
42
  import { fileURLToPath } from "node:url";
43
43
  import { statSync as statSync2 } from "node:fs";
44
44
  import { isAbsolute as isAbsolute2 } from "node:path";
45
- import { existsSync as existsSync10, statSync as statSync4 } from "node:fs";
46
- import { dirname as dirname8, join as join4, resolve as resolve7 } from "node:path";
45
+ import { existsSync as existsSync10, realpathSync as realpathSync4, statSync as statSync4 } from "node:fs";
46
+ import { basename as basename3, dirname as dirname8, join as join4, resolve as resolve7 } from "node:path";
47
47
  import { basename as basename2, extname } from "node:path";
48
48
  import { resolve as resolve6 } from "node:path";
49
49
  import { pathToFileURL as pathToFileURL3 } from "node:url";
@@ -4117,32 +4117,86 @@ function isDirectoryPath(filePath) {
4117
4117
  }
4118
4118
  }
4119
4119
  function findWorkspaceRoot(filePath) {
4120
- const abs = resolvePathInsideContext(filePath);
4120
+ const cwd = contextCwd();
4121
+ const abs = resolveReadablePathInsideContext(filePath);
4121
4122
  let dir = abs;
4122
4123
  if (!isDirectoryPath(dir)) {
4123
4124
  dir = dirname8(dir);
4124
4125
  }
4125
- let prevDir = "";
4126
- while (dir !== prevDir) {
4127
- for (const marker of WORKSPACE_MARKERS) {
4128
- if (existsSync10(join4(dir, marker))) {
4129
- return dir;
4126
+ const fallbackRoot = nearestExistingDirectoryInsideContext(dir, cwd) ?? cwd;
4127
+ while (isPathInside(cwd, dir)) {
4128
+ const canonicalDir = existingDirectoryInsideContext(dir, cwd);
4129
+ if (canonicalDir !== undefined) {
4130
+ for (const marker of WORKSPACE_MARKERS) {
4131
+ if (existsSync10(join4(dir, marker))) {
4132
+ return canonicalDir;
4133
+ }
4130
4134
  }
4131
4135
  }
4132
- prevDir = dir;
4136
+ if (dir === cwd)
4137
+ break;
4133
4138
  dir = dirname8(dir);
4134
4139
  }
4135
- return dirname8(abs);
4140
+ return fallbackRoot;
4136
4141
  }
4137
- function resolvePathInsideContext(filePath) {
4142
+ function resolveReadablePathInsideContext(filePath) {
4138
4143
  const cwd = contextCwd();
4139
4144
  const abs = resolve7(cwd, filePath);
4145
+ if (isPathInside(cwd, abs))
4146
+ return abs;
4147
+ const rebased = rebaseThroughCanonicalAncestor(abs, cwd);
4148
+ if (rebased !== undefined)
4149
+ return rebased;
4150
+ const canonical = canonicalizeExistingOrNearestAncestor(abs);
4151
+ if (isPathInside(cwd, canonical))
4152
+ return canonical;
4153
+ throw new LspInvalidPathError(`LSP file path must be inside request cwd: ${filePath}`);
4154
+ }
4155
+ function resolvePathInsideContext(filePath) {
4156
+ const cwd = contextCwd();
4157
+ const abs = resolveReadablePathInsideContext(filePath);
4140
4158
  const canonical = canonicalizeExistingOrNearestAncestor(abs);
4141
4159
  if (!isPathInside(cwd, canonical)) {
4142
4160
  throw new LspInvalidPathError(`LSP file path must be inside request cwd: ${filePath}`);
4143
4161
  }
4144
4162
  return canonical;
4145
4163
  }
4164
+ function rebaseThroughCanonicalAncestor(path2, cwd) {
4165
+ let current = path2;
4166
+ const suffix = [];
4167
+ while (true) {
4168
+ if (existsSync10(current)) {
4169
+ const canonical = realpathSync4(current);
4170
+ if (isPathInside(cwd, canonical))
4171
+ return suffix.length === 0 ? canonical : join4(canonical, ...suffix);
4172
+ }
4173
+ const parent = dirname8(current);
4174
+ if (parent === current)
4175
+ return;
4176
+ suffix.unshift(basename3(current));
4177
+ current = parent;
4178
+ }
4179
+ }
4180
+ function existingDirectoryInsideContext(directory, cwd) {
4181
+ if (!existsSync10(directory))
4182
+ return;
4183
+ const canonical = realpathSync4(directory);
4184
+ if (!statSync4(canonical).isDirectory())
4185
+ return;
4186
+ return isPathInside(cwd, canonical) ? canonical : undefined;
4187
+ }
4188
+ function nearestExistingDirectoryInsideContext(directory, cwd) {
4189
+ let current = directory;
4190
+ while (isPathInside(cwd, current)) {
4191
+ const canonical = existingDirectoryInsideContext(current, cwd);
4192
+ if (canonical !== undefined)
4193
+ return canonical;
4194
+ if (current === cwd)
4195
+ return;
4196
+ current = dirname8(current);
4197
+ }
4198
+ return;
4199
+ }
4146
4200
  function formatServerLookupError(result) {
4147
4201
  if (result.status === "not_installed") {
4148
4202
  return formatNotInstalled(result);
@@ -4213,7 +4267,7 @@ function formatNotInstalled(result) {
4213
4267
  ].join(`
4214
4268
  `);
4215
4269
  }
4216
- var READ_ONLY_RETRY_TOOLS = new Set([
4270
+ var READ_ONLY_TOOLS = new Set([
4217
4271
  "diagnostics",
4218
4272
  "definition",
4219
4273
  "references",
@@ -4222,7 +4276,7 @@ var READ_ONLY_RETRY_TOOLS = new Set([
4222
4276
  "prepareRename"
4223
4277
  ]);
4224
4278
  async function withLspClient(filePath, fn, toolName, options = {}) {
4225
- const absPath = resolvePathInsideContext(filePath);
4279
+ const absPath = READ_ONLY_TOOLS.has(toolName) ? resolveReadablePathInsideContext(filePath) : resolvePathInsideContext(filePath);
4226
4280
  if (isDirectoryPath(absPath)) {
4227
4281
  throw new LspInvalidPathError("Directory paths are not supported by this LSP tool. " + "Use lsp.diagnostics with a directory path for directory diagnostics.");
4228
4282
  }
@@ -4237,9 +4291,9 @@ async function withLspClient(filePath, fn, toolName, options = {}) {
4237
4291
  const acquireAndCall = async (allowRetry) => {
4238
4292
  const client = await manager.getClient(root, server2, options.signal);
4239
4293
  try {
4240
- return await fn(client, root);
4294
+ return await fn(client, root, absPath);
4241
4295
  } catch (err) {
4242
- if (allowRetry && READ_ONLY_RETRY_TOOLS.has(toolName) && isLspDeadConnectionError(err)) {
4296
+ if (allowRetry && READ_ONLY_TOOLS.has(toolName) && isLspDeadConnectionError(err)) {
4243
4297
  manager.invalidateClient(root, server2.id, client);
4244
4298
  return acquireAndCall(false);
4245
4299
  }
@@ -4669,7 +4723,7 @@ async function executeLspDiagnostics(params, signal) {
4669
4723
  const filePath = requireString(params, "filePath");
4670
4724
  const severity = severityFilter(params);
4671
4725
  try {
4672
- const absPath = resolvePathInsideContext(filePath);
4726
+ const absPath = resolveReadablePathInsideContext(filePath);
4673
4727
  if (isDirectoryPath(absPath)) {
4674
4728
  const extension = inferExtensionFromDirectory(absPath);
4675
4729
  if (!extension) {
@@ -4698,7 +4752,7 @@ async function executeLspDiagnostics(params, signal) {
4698
4752
  };
4699
4753
  return text(output2.output, details2);
4700
4754
  }
4701
- const result = await withLspClient(filePath, async (client) => client.diagnostics(filePath, signal), "diagnostics", clientOptions(signal));
4755
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.diagnostics(resolvedFilePath, signal), "diagnostics", clientOptions(signal));
4702
4756
  if (result.transientError) {
4703
4757
  const message = result.transientError.message;
4704
4758
  const details2 = {
@@ -4770,7 +4824,7 @@ async function executeLspGotoDefinition(params, signal) {
4770
4824
  const line = requireNumber(params, "line");
4771
4825
  const character = requireNumber(params, "character");
4772
4826
  try {
4773
- const result = await withLspClient(filePath, async (client) => client.definition(filePath, line, character, signal), "definition", clientOptions(signal));
4827
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.definition(resolvedFilePath, line, character, signal), "definition", clientOptions(signal));
4774
4828
  const locations = !result ? [] : Array.isArray(result) ? result : [result];
4775
4829
  const details = { filePath, line, character, locations };
4776
4830
  if (locations.length === 0)
@@ -4795,7 +4849,7 @@ async function executeLspFindReferences(params, signal) {
4795
4849
  const character = requireNumber(params, "character");
4796
4850
  const includeDeclaration = optionalBoolean(params, "includeDeclaration") ?? true;
4797
4851
  try {
4798
- const result = await withLspClient(filePath, async (client) => client.references(filePath, line, character, includeDeclaration, signal), "references", clientOptions(signal));
4852
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.references(resolvedFilePath, line, character, includeDeclaration, signal), "references", clientOptions(signal));
4799
4853
  const references = Array.isArray(result) ? result : [];
4800
4854
  const total = references.length;
4801
4855
  const truncated = total > DEFAULT_MAX_REFERENCES;
@@ -4835,7 +4889,7 @@ async function executeLspPrepareRename(params, signal) {
4835
4889
  const line = requireNumber(params, "line");
4836
4890
  const character = requireNumber(params, "character");
4837
4891
  try {
4838
- const result = await withLspClient(filePath, async (client) => client.prepareRename(filePath, line, character, signal), "prepareRename", clientOptions(signal));
4892
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.prepareRename(resolvedFilePath, line, character, signal), "prepareRename", clientOptions(signal));
4839
4893
  const details = { filePath, line, character, result };
4840
4894
  return text(formatPrepareRenameResult(result), details);
4841
4895
  } catch (error) {
@@ -4856,7 +4910,7 @@ async function executeLspRename(params, signal) {
4856
4910
  const character = requireNumber(params, "character");
4857
4911
  const newName = requireString(params, "newName");
4858
4912
  try {
4859
- const result = await withLspClient(filePath, async (client) => client.rename(filePath, line, character, newName, signal), "rename", clientOptions(signal));
4913
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.rename(resolvedFilePath, line, character, newName, signal), "rename", clientOptions(signal));
4860
4914
  const details = { filePath, line, character, newName, apply: result.apply, edit: result.edit };
4861
4915
  return text(formatApplyResult(result.apply), details, !result.apply.success);
4862
4916
  } catch (error) {
@@ -4930,7 +4984,7 @@ async function executeLspSymbols(params, signal) {
4930
4984
  const symbols2 = await withLspClient(filePath, async (client) => client.workspaceSymbols(query, signal), "workspaceSymbols", clientOptions(signal));
4931
4985
  return formatSymbolsResult(filePath, scope, symbols2, limit, query);
4932
4986
  }
4933
- const symbols = await withLspClient(filePath, async (client) => client.documentSymbols(filePath, signal), "documentSymbols", clientOptions(signal));
4987
+ const symbols = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.documentSymbols(resolvedFilePath, signal), "documentSymbols", clientOptions(signal));
4934
4988
  return formatSymbolsResult(filePath, scope, symbols, limit);
4935
4989
  } catch (error) {
4936
4990
  const query = optionalString(params, "query");
@@ -5400,8 +5454,8 @@ function extensionKey(filePath) {
5400
5454
  }
5401
5455
  // ../../../../lsp-core/src/request-context.ts
5402
5456
  import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
5403
- import { existsSync as existsSync12, realpathSync as realpathSync4, statSync as statSync6 } from "node:fs";
5404
- import { basename as basename3, delimiter as delimiter4, dirname as dirname2, isAbsolute as isAbsolute6, join as join7, relative as relative5, resolve as resolve9 } from "node:path";
5457
+ import { existsSync as existsSync12, realpathSync as realpathSync5, statSync as statSync6 } from "node:fs";
5458
+ import { basename as basename4, delimiter as delimiter4, dirname as dirname2, isAbsolute as isAbsolute6, join as join7, relative as relative5, resolve as resolve9 } from "node:path";
5405
5459
 
5406
5460
  class LspRequestContextParseError2 extends Error {
5407
5461
  code;
@@ -5447,14 +5501,14 @@ function canonicalCwd2(cwd) {
5447
5501
  if (!existsSync12(resolved) || !statSync6(resolved).isDirectory()) {
5448
5502
  throw new LspRequestContextParseError2("invalid_cwd", `LSP request cwd must be an existing directory: ${cwd}`);
5449
5503
  }
5450
- return realpathSync4(resolved);
5504
+ return realpathSync5(resolved);
5451
5505
  }
5452
5506
  function canonicalizeExistingOrNearestAncestor2(path2) {
5453
5507
  let current = resolve9(path2);
5454
5508
  const suffix = [];
5455
5509
  while (true) {
5456
5510
  try {
5457
- const existing = realpathSync4(current);
5511
+ const existing = realpathSync5(current);
5458
5512
  return suffix.length === 0 ? existing : join7(existing, ...suffix);
5459
5513
  } catch (error) {
5460
5514
  if (!isMissingPathError2(error))
@@ -5462,7 +5516,7 @@ function canonicalizeExistingOrNearestAncestor2(path2) {
5462
5516
  const parent = dirname2(current);
5463
5517
  if (parent === current)
5464
5518
  throw error;
5465
- suffix.unshift(basename3(current));
5519
+ suffix.unshift(basename4(current));
5466
5520
  current = parent;
5467
5521
  }
5468
5522
  }
@@ -5775,7 +5829,7 @@ function notConfiguredAvailability(details) {
5775
5829
  return typeof extension === "string" && extension.length > 0 ? { extension } : undefined;
5776
5830
  }
5777
5831
  function codexLspRequestContext(env = process.env, cwd = process.cwd()) {
5778
- const canonicalCwd3 = realpathSync6(resolve11(cwd));
5832
+ const canonicalCwd3 = realpathSync7(resolve11(cwd));
5779
5833
  const codexHome = resolve11(env["CODEX_HOME"]?.trim() || join11(homedir3(), ".codex"));
5780
5834
  return parseLspRequestContext2({
5781
5835
  cwd: canonicalCwd3,
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 60,
11
- "statusMessage": "(OmO 5.0.0-beta.5) Checking LSP Diagnostics"
11
+ "statusMessage": "(OmO 5.0.0-beta.7) Checking LSP Diagnostics"
12
12
  }
13
13
  ]
14
14
  }
@@ -21,7 +21,7 @@
21
21
  "type": "command",
22
22
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
23
23
  "timeout": 5,
24
- "statusMessage": "(OmO 5.0.0-beta.5) Resetting LSP Diagnostics Cache"
24
+ "statusMessage": "(OmO 5.0.0-beta.7) Resetting LSP Diagnostics Cache"
25
25
  }
26
26
  ]
27
27
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-lsp",
3
- "version": "5.0.0-beta.5",
3
+ "version": "5.0.0-beta.7",
4
4
  "description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.0.0-beta.5) Loading Project Rules"
10
+ "statusMessage": "(OmO 5.0.0-beta.7) Loading Project Rules"
11
11
  }
12
12
  ]
13
13
  }
@@ -19,7 +19,7 @@
19
19
  "type": "command",
20
20
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
21
21
  "timeout": 10,
22
- "statusMessage": "(OmO 5.0.0-beta.5) Loading Project Rules"
22
+ "statusMessage": "(OmO 5.0.0-beta.7) Loading Project Rules"
23
23
  }
24
24
  ]
25
25
  }
@@ -32,7 +32,7 @@
32
32
  "type": "command",
33
33
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
34
34
  "timeout": 10,
35
- "statusMessage": "(OmO 5.0.0-beta.5) Matching Project Rules"
35
+ "statusMessage": "(OmO 5.0.0-beta.7) Matching Project Rules"
36
36
  }
37
37
  ]
38
38
  }
@@ -45,7 +45,7 @@
45
45
  "type": "command",
46
46
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
47
47
  "timeout": 10,
48
- "statusMessage": "(OmO 5.0.0-beta.5) Resetting Project Rule Cache"
48
+ "statusMessage": "(OmO 5.0.0-beta.7) Resetting Project Rule Cache"
49
49
  }
50
50
  ]
51
51
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-rules",
3
- "version": "5.0.0-beta.5",
3
+ "version": "5.0.0-beta.7",
4
4
  "description": "Codex plugin that injects project rule files into model context through lifecycle hooks.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 5.0.0-beta.5) Checking Start-Work Continuation"
10
+ "statusMessage": "(OmO 5.0.0-beta.7) Checking Start-Work Continuation"
11
11
  }
12
12
  ]
13
13
  }
@@ -19,7 +19,7 @@
19
19
  "type": "command",
20
20
  "command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop",
21
21
  "timeout": 10,
22
- "statusMessage": "(OmO 5.0.0-beta.5) Checking Start-Work Continuation"
22
+ "statusMessage": "(OmO 5.0.0-beta.7) Checking Start-Work Continuation"
23
23
  }
24
24
  ]
25
25
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-start-work-continuation",
3
- "version": "5.0.0-beta.5",
3
+ "version": "5.0.0-beta.7",
4
4
  "description": "Codex Stop hook continuation injector for omo-codex start-work plans.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 10,
11
- "statusMessage": "(OmO 5.0.0-beta.5) Checking Thread Title Hygiene"
11
+ "statusMessage": "(OmO 5.0.0-beta.7) Checking Thread Title Hygiene"
12
12
  }
13
13
  ]
14
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/codex-teammode",
3
- "version": "5.0.0-beta.5",
3
+ "version": "5.0.0-beta.7",
4
4
  "description": "Codex team-mode hook component that keeps background thread titles descriptive after create_thread.",
5
5
  "type": "module",
6
6
  "private": true,
@@ -174,6 +174,7 @@ function writePostHogActivityState(stateDir, nextState, diagnostics) {
174
174
  // ../../telemetry-core/src/constants.ts
175
175
  var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com";
176
176
  var DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
177
+ var UNCONFIGURED_POSTHOG_API_KEY = "phc_REPLACE_ME_OMO_NATIVE";
177
178
 
178
179
  // ../../telemetry-core/src/diagnostics.ts
179
180
  import { appendFileSync, existsSync as existsSync2, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
@@ -310,6 +311,9 @@ function shouldDisableTelemetry(input) {
310
311
  const env = input.env ?? process.env;
311
312
  const globalPrefix = input.globalEnvPrefix ?? "OMO";
312
313
  const prefixes = Array.from(new Set([globalPrefix, input.productEnvPrefix]));
314
+ if (isDisableFlag(env["DO_NOT_TRACK"])) {
315
+ return true;
316
+ }
313
317
  for (const prefix of prefixes) {
314
318
  if (isDisableFlag(env[`${prefix}_DISABLE_POSTHOG`])) {
315
319
  return true;
@@ -323,18 +327,15 @@ function shouldDisableTelemetry(input) {
323
327
  function getTelemetryApiKey(env = process.env, defaultApiKey = DEFAULT_POSTHOG_API_KEY) {
324
328
  return env["POSTHOG_API_KEY"]?.trim() ?? defaultApiKey;
325
329
  }
326
- function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
327
- return env["POSTHOG_HOST"]?.trim() || defaultHost;
330
+ function isConfiguredTelemetryApiKey(apiKey) {
331
+ const normalized = apiKey.trim();
332
+ return normalized.length > 0 && normalized !== UNCONFIGURED_POSTHOG_API_KEY;
328
333
  }
329
-
330
- // ../../telemetry-core/src/machine-id.ts
331
- import { createHash } from "node:crypto";
332
- import os2 from "node:os";
333
- function getDefaultTelemetryOsProvider() {
334
- return os2;
334
+ function hasTelemetryApiKey(env, defaultApiKey) {
335
+ return isConfiguredTelemetryApiKey(getTelemetryApiKey(env, defaultApiKey));
335
336
  }
336
- function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
337
- return createHash("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
337
+ function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
338
+ return env["POSTHOG_HOST"]?.trim() || defaultHost;
338
339
  }
339
340
 
340
341
  // ../../../node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
@@ -5504,6 +5505,16 @@ class PostHog extends PostHogBackendClient {
5504
5505
  }
5505
5506
  }
5506
5507
 
5508
+ // ../../telemetry-core/src/machine-id.ts
5509
+ import { createHash } from "node:crypto";
5510
+ import os2 from "node:os";
5511
+ function getDefaultTelemetryOsProvider() {
5512
+ return os2;
5513
+ }
5514
+ function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
5515
+ return createHash("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
5516
+ }
5517
+
5507
5518
  // ../../telemetry-core/src/posthog-client.ts
5508
5519
  var NO_OP_CLIENT = {
5509
5520
  enabled: false,
@@ -5538,7 +5549,7 @@ function createDefaultPostHogTransport(apiKey, options) {
5538
5549
  }
5539
5550
  function isTelemetryClientEnabled(input) {
5540
5551
  const env = input.env ?? process.env;
5541
- return !shouldDisableTelemetry({ env, productEnvPrefix: input.product.productEnvPrefix }) && getTelemetryApiKey(env, input.product.defaultApiKey).length > 0;
5552
+ return !shouldDisableTelemetry({ env, productEnvPrefix: input.product.productEnvPrefix }) && hasTelemetryApiKey(env, input.product.defaultApiKey);
5542
5553
  }
5543
5554
  function createTelemetryClient(input) {
5544
5555
  if (!isTelemetryClientEnabled(input)) {
@@ -5604,7 +5615,8 @@ function createTransport(input) {
5604
5615
  flushAt: 1,
5605
5616
  flushInterval: 0,
5606
5617
  host: getTelemetryHost(env, input.product.defaultHost),
5607
- disableGeoip: false
5618
+ disableGeoip: input.product.disableGeoip ?? false,
5619
+ ...input.product.transportOptions
5608
5620
  });
5609
5621
  } catch (error) {
5610
5622
  input.diagnostics?.({
@@ -170,6 +170,7 @@ function writePostHogActivityState(stateDir, nextState, diagnostics) {
170
170
  // ../../../../telemetry-core/src/constants.ts
171
171
  var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com";
172
172
  var DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
173
+ var UNCONFIGURED_POSTHOG_API_KEY = "phc_REPLACE_ME_OMO_NATIVE";
173
174
 
174
175
  // ../../../../telemetry-core/src/diagnostics.ts
175
176
  import { appendFileSync, existsSync as existsSync2, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
@@ -306,6 +307,9 @@ function shouldDisableTelemetry(input) {
306
307
  const env = input.env ?? process.env;
307
308
  const globalPrefix = input.globalEnvPrefix ?? "OMO";
308
309
  const prefixes = Array.from(new Set([globalPrefix, input.productEnvPrefix]));
310
+ if (isDisableFlag(env["DO_NOT_TRACK"])) {
311
+ return true;
312
+ }
309
313
  for (const prefix of prefixes) {
310
314
  if (isDisableFlag(env[`${prefix}_DISABLE_POSTHOG`])) {
311
315
  return true;
@@ -319,18 +323,15 @@ function shouldDisableTelemetry(input) {
319
323
  function getTelemetryApiKey(env = process.env, defaultApiKey = DEFAULT_POSTHOG_API_KEY) {
320
324
  return env["POSTHOG_API_KEY"]?.trim() ?? defaultApiKey;
321
325
  }
322
- function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
323
- return env["POSTHOG_HOST"]?.trim() || defaultHost;
326
+ function isConfiguredTelemetryApiKey(apiKey) {
327
+ const normalized = apiKey.trim();
328
+ return normalized.length > 0 && normalized !== UNCONFIGURED_POSTHOG_API_KEY;
324
329
  }
325
-
326
- // ../../../../telemetry-core/src/machine-id.ts
327
- import { createHash } from "node:crypto";
328
- import os2 from "node:os";
329
- function getDefaultTelemetryOsProvider() {
330
- return os2;
330
+ function hasTelemetryApiKey(env, defaultApiKey) {
331
+ return isConfiguredTelemetryApiKey(getTelemetryApiKey(env, defaultApiKey));
331
332
  }
332
- function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
333
- return createHash("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
333
+ function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
334
+ return env["POSTHOG_HOST"]?.trim() || defaultHost;
334
335
  }
335
336
 
336
337
  // ../../../../../node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
@@ -5500,6 +5501,16 @@ class PostHog extends PostHogBackendClient {
5500
5501
  }
5501
5502
  }
5502
5503
 
5504
+ // ../../../../telemetry-core/src/machine-id.ts
5505
+ import { createHash } from "node:crypto";
5506
+ import os2 from "node:os";
5507
+ function getDefaultTelemetryOsProvider() {
5508
+ return os2;
5509
+ }
5510
+ function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
5511
+ return createHash("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
5512
+ }
5513
+
5503
5514
  // ../../../../telemetry-core/src/posthog-client.ts
5504
5515
  var NO_OP_CLIENT = {
5505
5516
  enabled: false,
@@ -5534,7 +5545,7 @@ function createDefaultPostHogTransport(apiKey, options) {
5534
5545
  }
5535
5546
  function isTelemetryClientEnabled(input) {
5536
5547
  const env = input.env ?? process.env;
5537
- return !shouldDisableTelemetry({ env, productEnvPrefix: input.product.productEnvPrefix }) && getTelemetryApiKey(env, input.product.defaultApiKey).length > 0;
5548
+ return !shouldDisableTelemetry({ env, productEnvPrefix: input.product.productEnvPrefix }) && hasTelemetryApiKey(env, input.product.defaultApiKey);
5538
5549
  }
5539
5550
  function createTelemetryClient(input) {
5540
5551
  if (!isTelemetryClientEnabled(input)) {
@@ -5600,7 +5611,8 @@ function createTransport(input) {
5600
5611
  flushAt: 1,
5601
5612
  flushInterval: 0,
5602
5613
  host: getTelemetryHost(env, input.product.defaultHost),
5603
- disableGeoip: false
5614
+ disableGeoip: input.product.disableGeoip ?? false,
5615
+ ...input.product.transportOptions
5604
5616
  });
5605
5617
  } catch (error) {
5606
5618
  input.diagnostics?.({
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.0.0-beta.5) Recording Session Telemetry"
10
+ "statusMessage": "(OmO 5.0.0-beta.7) Recording Session Telemetry"
11
11
  }
12
12
  ]
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-telemetry",
3
- "version": "5.0.0-beta.5",
3
+ "version": "5.0.0-beta.7",
4
4
  "description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -126,6 +126,12 @@ exactly `objective`; do not include `status`. Only when no goal tool
126
126
  exists on this surface, open your reply with a `# Goal` block treated
127
127
  as binding. Goals are unlimited; never invent a numeric budget or
128
128
  limit.
129
+ Check `get_goal` first: continue a matching active goal instead of
130
+ duplicating one; surface a conflicting one. Write the objective
131
+ outcome-first: the concrete thing that will be TRUE when done (an
132
+ outcome, never an activity), the named deliverable surfaces, and
133
+ explicit scope bounds — a vague objective produces vague criteria,
134
+ and vague criteria cannot be proven.
129
135
  The criteria MUST list, upfront:
130
136
  - The user-visible deliverable in one line, and the tier with its
131
137
  justification.
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
9
9
  "timeout": 5,
10
- "statusMessage": "(OmO 5.0.0-beta.5) Checking Ultrawork Trigger"
10
+ "statusMessage": "(OmO 5.0.0-beta.7) Checking Ultrawork Trigger"
11
11
  }
12
12
  ]
13
13
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-ultrawork",
3
- "version": "5.0.0-beta.5",
3
+ "version": "5.0.0-beta.7",
4
4
  "description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -133,6 +133,12 @@ exactly `objective`; do not include `status`. Only when no goal tool
133
133
  exists on this surface, open your reply with a `# Goal` block treated
134
134
  as binding. Goals are unlimited; never invent a numeric budget or
135
135
  limit.
136
+ Check `get_goal` first: continue a matching active goal instead of
137
+ duplicating one; surface a conflicting one. Write the objective
138
+ outcome-first: the concrete thing that will be TRUE when done (an
139
+ outcome, never an activity), the named deliverable surfaces, and
140
+ explicit scope bounds — a vague objective produces vague criteria,
141
+ and vague criteria cannot be proven.
136
142
  The criteria MUST list, upfront:
137
143
  - The user-visible deliverable in one line, and the tier with its
138
144
  justification.
@@ -126,6 +126,12 @@ exactly `objective`; do not include `status`. Only when no goal tool
126
126
  exists on this surface, open your reply with a `# Goal` block treated
127
127
  as binding. Goals are unlimited; never invent a numeric budget or
128
128
  limit.
129
+ Check `get_goal` first: continue a matching active goal instead of
130
+ duplicating one; surface a conflicting one. Write the objective
131
+ outcome-first: the concrete thing that will be TRUE when done (an
132
+ outcome, never an activity), the named deliverable surfaces, and
133
+ explicit scope bounds — a vague objective produces vague criteria,
134
+ and vague criteria cannot be proven.
129
135
  The criteria MUST list, upfront:
130
136
  - The user-visible deliverable in one line, and the tier with its
131
137
  justification.