oh-my-opencode 4.15.1 → 4.16.0

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 (142) hide show
  1. package/dist/cli/doctor/checks/tui-plugin-config.d.ts +4 -4
  2. package/dist/cli/index.js +673 -678
  3. package/dist/cli/install-senpi/index.d.ts +1 -0
  4. package/dist/cli/run/poll-for-completion.d.ts +4 -0
  5. package/dist/cli/run/session-resolver.d.ts +1 -0
  6. package/dist/cli/senpi-platform-flag.d.ts +4 -0
  7. package/dist/cli/types.d.ts +2 -1
  8. package/dist/cli-node/index.js +673 -678
  9. package/dist/features/background-agent/manager.d.ts +16 -0
  10. package/dist/hooks/anthropic-context-window-limit-recovery/aggressive-truncation-strategy.d.ts +1 -0
  11. package/dist/index.js +1334 -1146
  12. package/dist/skills/debugging/references/methodology/06-fix.md +6 -0
  13. package/dist/skills/frontend/ATTRIBUTION.md +10 -1
  14. package/dist/skills/frontend/SKILL.md +8 -3
  15. package/dist/skills/frontend/references/design/README.md +1 -1
  16. package/dist/skills/frontend/references/design/_INDEX.md +1 -1
  17. package/dist/skills/frontend/references/design/lazyweb.md +77 -0
  18. package/dist/skills/frontend/references/design/stitch-design-example.md +121 -0
  19. package/dist/skills/programming/SKILL.md +10 -1
  20. package/dist/skills/programming/references/logging.md +91 -0
  21. package/dist/skills/ulw-plan/SKILL.md +5 -5
  22. package/dist/skills/ulw-plan/references/full-workflow.md +7 -7
  23. package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
  24. package/dist/skills/ulw-research/ATTRIBUTION.md +2 -2
  25. package/dist/skills/ulw-research/SKILL.md +28 -7
  26. package/dist/tools/skill/description-formatter.d.ts +1 -0
  27. package/dist/tools/skill/description-formatter.test-support.d.ts +9 -0
  28. package/dist/tools/skill/zauc-mocks-skill-tools/test-support.d.ts +25 -0
  29. package/dist/tui.js +121 -419
  30. package/package.json +32 -15
  31. package/packages/git-bash-mcp/dist/cli.js +2 -2
  32. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  33. package/packages/omo-codex/plugin/components/bootstrap/AGENTS.md +55 -0
  34. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +19 -16
  35. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  36. package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +51 -0
  37. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +936 -248
  38. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +233 -135
  39. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  40. package/packages/omo-codex/plugin/components/codegraph/src/cache-gc.ts +29 -0
  41. package/packages/omo-codex/plugin/components/codegraph/src/cli.ts +13 -0
  42. package/packages/omo-codex/plugin/components/codegraph/src/hook-sweep.ts +25 -0
  43. package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
  44. package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +30 -1
  45. package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +16 -2
  46. package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +80 -0
  47. package/packages/omo-codex/plugin/components/codegraph/test/cache-gc.test.ts +34 -0
  48. package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +107 -0
  49. package/packages/omo-codex/plugin/components/codegraph/test/hook-registration.test.ts +26 -0
  50. package/packages/omo-codex/plugin/components/codegraph/test/hook-sweep.test.ts +29 -0
  51. package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +8 -21
  52. package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +108 -0
  53. package/packages/omo-codex/plugin/components/codegraph/test/serve-built-wrapper.test.ts +76 -0
  54. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +17 -111
  55. package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +1 -1
  56. package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +45 -67
  57. package/packages/omo-codex/plugin/components/codegraph/test/sweep-cli.test.ts +56 -0
  58. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  59. package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +31 -0
  60. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  61. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +45 -0
  62. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  63. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  64. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +37 -102
  65. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  66. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  67. package/packages/omo-codex/plugin/components/teammode/AGENTS.md +46 -0
  68. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  69. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +6 -0
  70. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +6 -0
  71. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  72. package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -2
  73. package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +2 -0
  74. package/packages/omo-codex/plugin/components/ultrawork/README.md +3 -3
  75. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +51 -2
  76. package/packages/omo-codex/plugin/components/ultrawork/package.json +2 -1
  77. package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +14 -1
  78. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +380 -0
  79. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +5 -2
  80. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +4 -4
  81. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +2 -2
  82. package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +5 -3
  83. package/packages/omo-codex/plugin/components/ultrawork/src/skill-pointer.ts +56 -0
  84. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +4 -4
  85. package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +12 -0
  86. package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +1 -0
  87. package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +82 -0
  88. package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +1 -0
  89. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +56 -5
  90. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +1 -0
  91. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +5 -1
  92. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.d.ts +2 -1
  93. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.js +5 -3
  94. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.d.ts +7 -0
  95. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.js +46 -0
  96. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  97. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +5 -1
  98. package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-directive.ts +9 -3
  99. package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-skill-pointer.ts +55 -0
  100. package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +49 -0
  101. package/packages/omo-codex/plugin/package-lock.json +13 -13
  102. package/packages/omo-codex/plugin/package.json +1 -1
  103. package/packages/omo-codex/plugin/scripts/build-components.mjs +63 -17
  104. package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +10 -3
  105. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +1 -0
  106. package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +18 -0
  107. package/packages/omo-codex/plugin/skills/debugging/references/methodology/06-fix.md +6 -0
  108. package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +10 -1
  109. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +8 -3
  110. package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +1 -1
  111. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -1
  112. package/packages/omo-codex/plugin/skills/frontend/references/design/lazyweb.md +77 -0
  113. package/packages/omo-codex/plugin/skills/frontend/references/design/stitch-design-example.md +121 -0
  114. package/packages/omo-codex/plugin/skills/programming/SKILL.md +10 -1
  115. package/packages/omo-codex/plugin/skills/programming/references/logging.md +91 -0
  116. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +380 -0
  117. package/packages/omo-codex/plugin/skills/ultrawork/agents/openai.yaml +2 -0
  118. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +5 -2
  119. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +4 -4
  120. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +2 -2
  121. package/packages/omo-codex/plugin/skills/ulw-research/ATTRIBUTION.md +2 -2
  122. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +28 -7
  123. package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +1 -1
  124. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -0
  125. package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +56 -0
  126. package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +98 -0
  127. package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +6 -6
  128. package/packages/omo-codex/scripts/install-dist/install-local.mjs +259 -3954
  129. package/packages/shared-skills/skills/debugging/references/methodology/06-fix.md +6 -0
  130. package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +10 -1
  131. package/packages/shared-skills/skills/frontend/SKILL.md +8 -3
  132. package/packages/shared-skills/skills/frontend/references/design/README.md +1 -1
  133. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -1
  134. package/packages/shared-skills/skills/frontend/references/design/lazyweb.md +77 -0
  135. package/packages/shared-skills/skills/frontend/references/design/stitch-design-example.md +121 -0
  136. package/packages/shared-skills/skills/programming/SKILL.md +10 -1
  137. package/packages/shared-skills/skills/programming/references/logging.md +91 -0
  138. package/packages/shared-skills/skills/ulw-plan/SKILL.md +5 -5
  139. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +7 -7
  140. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
  141. package/packages/shared-skills/skills/ulw-research/ATTRIBUTION.md +2 -2
  142. package/packages/shared-skills/skills/ulw-research/SKILL.md +28 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "./dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,6 +14,7 @@
14
14
  "packages/lsp-core",
15
15
  "packages/utils",
16
16
  "packages/model-core",
17
+ "packages/omo-config-core",
17
18
  "packages/prompts-core",
18
19
  "packages/comment-checker-core",
19
20
  "packages/hashline-core",
@@ -27,6 +28,10 @@
27
28
  "packages/agents-md-core",
28
29
  "packages/shared-skills",
29
30
  "packages/omo-codex",
31
+ "packages/omo-senpi",
32
+ "packages/senpi-task",
33
+ "packages/pi-goal",
34
+ "packages/pi-webfetch",
30
35
  "packages/omo-opencode"
31
36
  ],
32
37
  "bin": {
@@ -83,6 +88,7 @@
83
88
  "packages/omo-codex/plugin/.codex-plugin",
84
89
  "!packages/omo-codex/plugin/node_modules",
85
90
  "!packages/omo-codex/plugin/**/node_modules",
91
+ "!packages/omo-codex/plugin/components/workflow-selector",
86
92
  "packages/omo-codex/scripts",
87
93
  "!packages/omo-codex/scripts/install"
88
94
  ],
@@ -96,10 +102,11 @@
96
102
  "./schema.json": "./dist/oh-my-opencode.schema.json"
97
103
  },
98
104
  "scripts": {
99
- "build": "bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && bun run build:codex-plugin && bun build packages/omo-opencode/src/index.ts --outdir dist --target bun --format esm --external zod && bun build packages/omo-opencode/src/tui.ts --outdir dist --target bun --format esm --external @opentui/core --external @opentui/keymap --external @opentui/solid && bun run build:shared-skills-assets && bun run build:node-require-shim && tsc --emitDeclarationOnly && bun build packages/omo-opencode/src/cli/index.ts --outdir dist/cli --target bun --format esm && bun run build:cli-node && bun run build:codex-install && bun run build:schema",
105
+ "build": "bun run script/build.ts",
100
106
  "build:cli-node": "bun run script/build-cli-node.ts",
101
107
  "build:codex-install": "bun run script/build-codex-install.ts",
102
108
  "build:codex-plugin": "npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build",
109
+ "build:senpi-plugin": "node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check",
103
110
  "build:materialize-frontend": "node packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs --strict",
104
111
  "build:shared-skills-assets": "bun run build:materialize-frontend && rm -rf dist/skills && cp -R packages/shared-skills/skills dist/skills",
105
112
  "build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
@@ -116,10 +123,11 @@
116
123
  "prepublishOnly": "bun run clean && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && bun run build",
117
124
  "test:model-capabilities": "bun test packages/model-core/src/model-capability-aliases.test.ts packages/model-core/src/model-capability-guardrails.test.ts packages/model-core/src/model-capabilities.test.ts packages/omo-opencode/src/cli/doctor/checks/model-resolution.test.ts --bail",
118
125
  "typecheck": "tsgo --noEmit && bun run typecheck:script && bun run typecheck:packages",
119
- "typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json",
126
+ "typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && tsgo --noEmit -p packages/senpi-task/tsconfig.json && tsgo --noEmit -p packages/pi-goal/tsconfig.json && tsgo --noEmit -p packages/pi-webfetch/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json",
120
127
  "typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
121
128
  "test": "bun test",
122
129
  "test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build && npm --prefix packages/omo-codex/plugin/components/codegraph run typecheck && npm --prefix packages/omo-codex/plugin/components/codegraph test && node scripts/check-third-party-notices.mjs --ship && bun test packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
130
+ "test:senpi": "node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check && bun test packages/omo-senpi",
123
131
  "test:windows-codex": "bun run test:codex",
124
132
  "build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build"
125
133
  },
@@ -178,7 +186,12 @@
178
186
  "@oh-my-opencode/team-core": "workspace:*",
179
187
  "@oh-my-opencode/openclaw-core": "workspace:*",
180
188
  "@oh-my-opencode/model-core": "workspace:*",
189
+ "@oh-my-opencode/omo-config-core": "workspace:*",
181
190
  "@oh-my-opencode/omo-codex": "workspace:*",
191
+ "@oh-my-opencode/omo-senpi": "workspace:*",
192
+ "@oh-my-opencode/senpi-task": "workspace:*",
193
+ "@oh-my-opencode/pi-goal": "workspace:*",
194
+ "@oh-my-opencode/pi-webfetch": "workspace:*",
182
195
  "@oh-my-opencode/prompts-core": "workspace:*",
183
196
  "@oh-my-opencode/rules-engine": "workspace:*",
184
197
  "@oh-my-opencode/shared-skills": "workspace:*",
@@ -191,20 +204,24 @@
191
204
  "typescript": "^6.0.3"
192
205
  },
193
206
  "optionalDependencies": {
194
- "oh-my-opencode-darwin-arm64": "4.15.1",
195
- "oh-my-opencode-darwin-x64": "4.15.1",
196
- "oh-my-opencode-darwin-x64-baseline": "4.15.1",
197
- "oh-my-opencode-linux-arm64": "4.15.1",
198
- "oh-my-opencode-linux-arm64-musl": "4.15.1",
199
- "oh-my-opencode-linux-x64": "4.15.1",
200
- "oh-my-opencode-linux-x64-baseline": "4.15.1",
201
- "oh-my-opencode-linux-x64-musl": "4.15.1",
202
- "oh-my-opencode-linux-x64-musl-baseline": "4.15.1",
203
- "oh-my-opencode-windows-arm64": "4.15.1",
204
- "oh-my-opencode-windows-x64": "4.15.1",
205
- "oh-my-opencode-windows-x64-baseline": "4.15.1"
207
+ "oh-my-opencode-darwin-arm64": "4.16.0",
208
+ "oh-my-opencode-darwin-x64": "4.16.0",
209
+ "oh-my-opencode-darwin-x64-baseline": "4.16.0",
210
+ "oh-my-opencode-linux-arm64": "4.16.0",
211
+ "oh-my-opencode-linux-arm64-musl": "4.16.0",
212
+ "oh-my-opencode-linux-x64": "4.16.0",
213
+ "oh-my-opencode-linux-x64-baseline": "4.16.0",
214
+ "oh-my-opencode-linux-x64-musl": "4.16.0",
215
+ "oh-my-opencode-linux-x64-musl-baseline": "4.16.0",
216
+ "oh-my-opencode-windows-arm64": "4.16.0",
217
+ "oh-my-opencode-windows-x64": "4.16.0",
218
+ "oh-my-opencode-windows-x64-baseline": "4.16.0"
206
219
  },
207
220
  "overrides": {
221
+ "@earendil-works/pi-agent-core": "0.80.3",
222
+ "@earendil-works/pi-ai": "0.80.3",
223
+ "@earendil-works/pi-coding-agent": "0.80.3",
224
+ "@earendil-works/pi-tui": "0.80.3",
208
225
  "hono": "^4.12.18",
209
226
  "@hono/node-server": "^1.19.13",
210
227
  "express-rate-limit": "^8.5.1",
@@ -286,7 +286,7 @@ function whereCommand(command) {
286
286
  }
287
287
  }
288
288
  // src/runner.ts
289
- import { spawn as spawn2 } from "node:child_process";
289
+ import { spawn } from "node:child_process";
290
290
  import { closeSync, mkdtempSync, openSync, readFileSync, rmSync } from "node:fs";
291
291
  import { tmpdir } from "node:os";
292
292
  import { join } from "node:path";
@@ -313,7 +313,7 @@ async function runGitBashCommand(input) {
313
313
  rmSync(outputDirectory, { recursive: true, force: true });
314
314
  return { stdout, stderr };
315
315
  }
316
- const child = spawn2(input.bashPath, ["-lc", input.command], {
316
+ const child = spawn(input.bashPath, ["-lc", input.command], {
317
317
  cwd: input.cwd,
318
318
  env: input.env,
319
319
  windowsHide: true,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omo",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "One Codex plugin namespace for Yeongyu's local Codex components.",
5
5
  "author": {
6
6
  "name": "Yeongyu Kim",
@@ -0,0 +1,55 @@
1
+ # bootstrap: Codex SessionStart Runtime Provisioner
2
+
3
+ **Generated:** 2026-07-03
4
+
5
+ ## OVERVIEW
6
+
7
+ `@sisyphuslabs/codex-bootstrap` (private, engines node >=20). Runs on every Codex `SessionStart` via `hooks/hooks.json`: POSIX runs `node dist/cli.js hook session-start`, Windows runs `scripts/bootstrap.ps1` through `commandWindows` (30s timeout). The hook drains stdin, reads the plugin version from `<PLUGIN_ROOT>/.codex-plugin/plugin.json`, and skips when `state.json` already marks `completedForVersion` for that version, when a fresh lock exists, or when `PLUGIN_ROOT`/`PLUGIN_DATA` are missing. Otherwise it spawns a detached, unref'd worker (`process.execPath dist/cli.js worker`) and emits a `hookSpecificOutput.additionalContext` restart notice. Every path exits 0.
8
+
9
+ The worker acquires BOTH the bootstrap and auto-update locks under `PLUGIN_DATA`, re-checks completion under lock (TOCTOU), then runs two steps:
10
+ - `setup` (`src/setup.ts`): idempotent, degraded-not-fatal re-run of the installer surface: Git Bash preflight (win32), bundled agent TOML linking (staged under `PLUGIN_DATA`, never `PLUGIN_ROOT`), `config.toml` blocks + trusted-hook-hash re-stamp, `git_bash` MCP env stamp, version-aware component bin links plus the `omo` runtime wrapper.
11
+ - `sg` (`src/provision.ts`): pinned ast-grep binary into `<CODEX_HOME>/runtime/ast-grep/<slug>/`; skipped when a preexisting binary resolves unless `OMO_BOOTSTRAP_FORCE_PROVISION=1`; a `--version` probe must match `SG_PINNED_VERSION` or the binary is deleted.
12
+
13
+ Result is written to `state.json` (`completedForVersion`, `lastStatus: success|degraded`, degraded ledger) and JSONL log lines to `<PLUGIN_DATA>/bootstrap/bootstrap.log`. Runtime failures NEVER exit non-zero; the degraded ledger plus the `npx lazycodex-ai doctor` hint is the error channel.
14
+
15
+ CLI: `hook session-start` | `worker [--codex-home <dir>] [--once] [--only <step>] [--manifest-dir <dir>]` | `download <manifest> <platform> <destination-dir>`.
16
+
17
+ ## KEY FILES
18
+
19
+ | File | Purpose |
20
+ |------|---------|
21
+ | `src/cli.ts` | Entry + barrel exports; command routing; entry guard via `realpathSync` |
22
+ | `src/hook.ts` | SessionStart handler: skip logic, detached worker spawn, restart notice |
23
+ | `src/worker.ts` | Worker orchestration: flags, locks, state.json, bootstrap.log, step runner |
24
+ | `src/setup.ts` | Setup step; esbuild inlines `packages/omo-codex/src/install/*` at build time |
25
+ | `src/provision.ts` | ast-grep provisioning via `packages/utils/src/ast-grep` helpers |
26
+ | `src/download.ts` | Checksummed manifest downloader: sha256 verify, `.partial` temp + rename, no proxy tunneling in v1 |
27
+ | `src/environment.ts` | `CODEX_HOME` resolution (env, then 6-level walk-up for `config.toml`, then `~/.codex`); install-flow detection (npx-local vs marketplace via `lazycodex-install.json` + marketplace source); lock/state paths |
28
+ | `hooks/hooks.json` | SessionStart wiring, `commandWindows` PowerShell branch |
29
+ | `scripts/bootstrap.ps1` | Windows PowerShell 5.1 hook (see NOTES) |
30
+ | `scripts/node-dispatch.ps1` | Generic Windows Node resolver/dispatcher for hook targets; exit 127 when Node unresolved |
31
+ | `manifests/node.json` | Pinned Node LTS (win32-x64 zip URL + sha256) |
32
+ | `scripts/generate-manifests.mjs` | Regenerates `manifests/node.json`; the ONLY network-touching code here |
33
+ | `scripts/build.mjs` | `bun x esbuild` bundle to `dist/cli.js`; keeps a prebuilt dist when esbuild is unavailable |
34
+ | `test/*.test.ts` | bun:test suites: download, environment, provision |
35
+
36
+ ## WHERE TO LOOK
37
+
38
+ | Task | Location |
39
+ |------|----------|
40
+ | Add a worker step | `src/worker.ts` `defaultWorkerSteps()`; return `{ degraded }`, never throw upward |
41
+ | Change skip/lock semantics | `src/hook.ts` + `src/environment.ts` `bootstrapLocks()` (stale window from `plugin/scripts/auto-update-state.mjs`) |
42
+ | Move the pinned Node LTS | `node scripts/generate-manifests.mjs [--node-version <x.y.z>]`, review + commit the manifest diff |
43
+ | Installer-parity behavior | `src/setup.ts`, which wraps `packages/omo-codex/src/install/` modules |
44
+ | Windows Node/Git Bash resolution | `scripts/bootstrap.ps1`; hook-level parity checks in `packages/omo-codex/plugin/test/bootstrap-ps-guard.test.mjs` |
45
+ | Cross-component orchestration tests | `packages/omo-codex/plugin/test/bootstrap-{hooks,setup,binlinks,orchestration,ps-guard}.test.mjs` |
46
+
47
+ ## NOTES
48
+
49
+ - **Deliberately NOT in the plugin workspaces array** (`packages/omo-codex/plugin/package.json`). `plugin/scripts/build-components.mjs` builds it on the standalone path: component-local `npm run build`, then a `bun build` re-bundle with `node:` import normalization. Keeping it out of workspaces lets esbuild inline cross-package TS sources (`packages/omo-codex/src/install/*`, `packages/utils/src/ast-grep`) so `PLUGIN_ROOT` ships nothing beyond `dist/cli.js`.
50
+ - **Ships in the published payload explicitly:** root `package.json` `files` lists `components/bootstrap/dist/cli.js`, `scripts/bootstrap.ps1`, and `scripts/node-dispatch.ps1` (other component sources are covered by the broader `packages/omo-codex/plugin` glob, but bootstrap's dist is pinned by name).
51
+ - **Never persists under `PLUGIN_ROOT`** (the Codex-managed marketplace cache). All state, staging, and logs live under `PLUGIN_DATA` (default `~/.local/share/lazycodex`).
52
+ - **Never writes permission keys.** `updateCodexConfig` is called with `autonomousPermissions: false`; approval/sandbox/network policies stay installer-flag-only.
53
+ - **Windows:** Codex runs hooks through `%COMSPEC%`, so Node may be absent from PATH. `bootstrap.ps1` resolves Node via `NODE_REPL_NODE_PATH` (env or `config.toml`), then the portable zip pinned by `manifests/node.json` (sha256-verified into `<CODEX_HOME>/runtime/node/`), then common install dirs and PATH; when still unresolved it emits a provisioning-incomplete notice instead of delegating. It resolves Git Bash best-effort (persists `OMO_CODEX_GIT_BASH_PATH` in the USER environment when found via PATH), never mutates the user PATH, logs to `<PLUGIN_DATA>/bootstrap/ps-bootstrap.log`, and always exits 0.
54
+ - **Manifests are committed, never generated at build time.** Builds stay offline and deterministic; unit tests inject `fetchImpl`, never the network.
55
+ - Component tests run with `bun test test/*.test.ts` even though the runtime is Node; typecheck is `noEmit` with `allowImportingTsExtensions`.
@@ -146,7 +146,7 @@ async function downloadFromManifest(options) {
146
146
  }
147
147
 
148
148
  // components/bootstrap/src/hook.ts
149
- import { spawn as spawn2 } from "node:child_process";
149
+ import { spawn } from "node:child_process";
150
150
  import { stat as stat6 } from "node:fs/promises";
151
151
  import { fileURLToPath as fileURLToPath3 } from "node:url";
152
152
 
@@ -493,6 +493,7 @@ function runtimeSlug(platform = process.platform, arch = process.arch) {
493
493
  function sgBinaryName(platform = process.platform) {
494
494
  return normalizeRuntimePlatform(platform) === "win32" ? "sg.exe" : "sg";
495
495
  }
496
+
496
497
  // ../../utils/src/ast-grep/sg-provisioner.ts
497
498
  import { createHash as createHash2, randomUUID as randomUUID2 } from "node:crypto";
498
499
  import { chmod, mkdir as mkdir3, rename as rename2, rm as rm3, writeFile as writeFile2 } from "node:fs/promises";
@@ -644,6 +645,7 @@ async function provisionSgBinary(options) {
644
645
  throw new SgProvisionError("write_failed", `failed to provision ast-grep ${SG_PINNED_VERSION} into ${targetDir}: ${describeFailure2(error)}`, { cause: error });
645
646
  }
646
647
  }
648
+
647
649
  // ../../utils/src/ast-grep/sg-resolver.ts
648
650
  import { execFileSync } from "node:child_process";
649
651
  import { existsSync, statSync } from "node:fs";
@@ -781,6 +783,7 @@ function findSgBinarySync(options = {}) {
781
783
  return null;
782
784
  }
783
785
  }
786
+
784
787
  // components/bootstrap/src/provision.ts
785
788
  var SG_PROVISION_COMPONENT = "ast_grep";
786
789
  var SG_FORCE_PROVISION_ENV_KEY = "OMO_BOOTSTRAP_FORCE_PROVISION";
@@ -2545,9 +2548,14 @@ function readBooleanSetting(sectionText, key) {
2545
2548
  // ../src/install/codex-config-toml.ts
2546
2549
  async function updateCodexConfig(input) {
2547
2550
  await mkdir6(dirname7(input.configPath), { recursive: true });
2548
- let config = "";
2549
- if (await exists3(input.configPath))
2551
+ let config;
2552
+ try {
2550
2553
  config = await readFile10(input.configPath, "utf8");
2554
+ } catch (error) {
2555
+ if (!isMissingFileError(error))
2556
+ throw error;
2557
+ config = "";
2558
+ }
2551
2559
  const pluginSet = new Set(input.pluginNames);
2552
2560
  for (const legacyMarketplaceName of legacyMarketplaceNames(input.marketplaceName)) {
2553
2561
  config = removeMarketplaceBlock(config, legacyMarketplaceName);
@@ -2581,15 +2589,8 @@ async function updateCodexConfig(input) {
2581
2589
  await writeFileAtomic(input.configPath, `${config.trimEnd()}
2582
2590
  `);
2583
2591
  }
2584
- async function exists3(path) {
2585
- try {
2586
- await readFile10(path, "utf8");
2587
- return true;
2588
- } catch (error) {
2589
- if (error instanceof Error)
2590
- return false;
2591
- return false;
2592
- }
2592
+ function isMissingFileError(error) {
2593
+ return error instanceof Error && "code" in error && error.code === "ENOENT";
2593
2594
  }
2594
2595
 
2595
2596
  // ../src/install/codex-git-bash-mcp-env.ts
@@ -2653,7 +2654,7 @@ var EVENT_LABELS = new Map([
2653
2654
  ]);
2654
2655
  async function trustedHookStatesForPlugin(input) {
2655
2656
  const manifestPath = join17(input.pluginRoot, ".codex-plugin", "plugin.json");
2656
- if (!await exists4(manifestPath))
2657
+ if (!await exists3(manifestPath))
2657
2658
  return [];
2658
2659
  const manifest = JSON.parse(await readFile12(manifestPath, "utf8"));
2659
2660
  if (!isPlainRecord(manifest))
@@ -2661,7 +2662,7 @@ async function trustedHookStatesForPlugin(input) {
2661
2662
  const states = [];
2662
2663
  for (const hookPath of hookManifestPaths(manifest.hooks)) {
2663
2664
  const hooksPath = join17(input.pluginRoot, hookPath);
2664
- if (!await exists4(hooksPath))
2665
+ if (!await exists3(hooksPath))
2665
2666
  continue;
2666
2667
  const parsed = JSON.parse(await readFile12(hooksPath, "utf8"));
2667
2668
  if (!isPlainRecord(parsed) || !isPlainRecord(parsed.hooks))
@@ -2744,7 +2745,7 @@ function canonicalJson(value) {
2744
2745
  function stripDotSlash(value) {
2745
2746
  return value.startsWith("./") ? value.slice(2) : value;
2746
2747
  }
2747
- async function exists4(path) {
2748
+ async function exists3(path) {
2748
2749
  try {
2749
2750
  await readFile12(path, "utf8");
2750
2751
  return true;
@@ -2769,6 +2770,7 @@ function resolveCodexInstallerBinDir(input) {
2769
2770
  return join18(resolvedCodexHome, "bin");
2770
2771
  return resolve6(homeDir, ".local", "bin");
2771
2772
  }
2773
+
2772
2774
  // ../../utils/src/runtime/git-bash.ts
2773
2775
  import { execFileSync as execFileSync2 } from "node:child_process";
2774
2776
  import { existsSync as existsSync2 } from "node:fs";
@@ -2851,6 +2853,7 @@ function whereCommand(command) {
2851
2853
  throw error;
2852
2854
  }
2853
2855
  }
2856
+
2854
2857
  // ../src/install/git-bash.ts
2855
2858
  var resolveGitBashForCurrentProcess2 = (input = {}) => {
2856
2859
  return toCodexResolution(resolveGitBashForCurrentProcess(input));
@@ -3306,7 +3309,7 @@ async function executeSessionStartHook(options) {
3306
3309
  return { action: "spawned", exitCode: 0 };
3307
3310
  }
3308
3311
  function spawnDetachedWorker(invocation) {
3309
- const child = spawn2(invocation.command, [...invocation.args], {
3312
+ const child = spawn(invocation.command, [...invocation.args], {
3310
3313
  detached: true,
3311
3314
  env: invocation.env,
3312
3315
  stdio: "ignore"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/codex-bootstrap",
3
- "version": "4.15.1",
3
+ "version": "4.16.0",
4
4
  "description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.",
5
5
  "type": "module",
6
6
  "private": true,
@@ -0,0 +1,51 @@
1
+ # packages/omo-codex/plugin/components/codegraph/ — CodeGraph MCP Wrapper + Bootstrap Hooks
2
+
3
+ **Generated:** 2026-07-03
4
+
5
+ ## OVERVIEW
6
+
7
+ `@sisyphuslabs/codex-codegraph` (private, Node >=20, bin `omo-codegraph`). Wraps the external CodeGraph CLI (`@colbymchenry/codegraph`, pinned `1.0.1` as optionalDependency + `CODEGRAPH_VERSION` constant) behind a stdio MCP server plus Codex lifecycle hooks. Two committed dists ship in the published payload; rebuild `dist/` in the same change as `src/` edits.
8
+
9
+ Codex wiring (all repo-relative to `packages/omo-codex/plugin/`):
10
+ - **MCP:** `.mcp.json` server `codegraph` → `node components/codegraph/dist/serve.js` (`required: false`).
11
+ - **SessionStart hook:** `hooks/session-start-checking-codegraph-bootstrap.json` → `dist/cli.js hook session-start` (timeout 5).
12
+ - **PostToolUse hook:** `hooks/post-tool-use-checking-codegraph-init-guidance.json`, matcher `^(codegraph[._].*|mcp__codegraph__.*)$` → `dist/cli.js hook post-tool-use`.
13
+ - Both hooks registered in `.codex-plugin/plugin.json`; Windows variants dispatch via `components/bootstrap/scripts/node-dispatch.ps1`.
14
+
15
+ Serve pipeline (`src/serve.ts`): OMO SOT config gate (`[codex].codegraph.enabled=false` → unavailable stub) → resolve binary (`OMO_CODEGRAPH_BIN` env → bundled → provisioned `~/.omo/codegraph/bin` → PATH) → Node support gate (major 20–24; >=25 crashes CodeGraph mid-indexing; `CODEGRAPH_ALLOW_UNSAFE_NODE=1` overrides) → auto-provision into `~/.omo/codegraph` unless `codegraph.auto_provision=false` → bridge JSON-RPC to `codegraph serve --mcp`. Project cwd resolved from `OMO_CODEGRAPH_PROJECT_CWD` → `OMO_CODEGRAPH_SESSION_START_CWD` → `PWD` → wrapper cwd. When the binary is missing/disabled, `mcp-unavailable.ts` still answers `initialize`/`tools/*` with the skip reason so Codex startup never fails.
16
+
17
+ Hook pipeline (`src/hook.ts` + `src/session-start-worker.ts`): `hook session-start` probes `status --json` (2s timeout); uninitialized project → spawns a detached `hook session-start-worker` (prepare workspace + gitignore → `status --json` → `init` or `sync`, 60s per command) and emits a SessionStart `additionalContext` notice. Worker outcomes append to `~/.omo/codegraph/session-start.jsonl`. `hook post-tool-use` emits init guidance when a codegraph tool result indicates an uninitialized project. `cli.js` with no hook subcommand falls through to serve.
18
+
19
+ ## includeCode CONTRACT (commit 4cf383c5b)
20
+
21
+ `src/mcp-bridge.ts` rewrites the upstream `codegraph_node` contract in-flight: `tools/list` responses get a clarified description + `includeCode` schema description, and `tools/call` results replace "Structural outline only" text. Contract: `includeCode=true` returns leaf-symbol source only; container symbols (classes, interfaces, structs, enums, modules, namespaces) return structural outlines with member lists BY DESIGN — for container source, request a specific member symbol or file mode with `symbolsOnly=false` plus `offset`/`limit`. Pinned by `test/serve-mcp-bridge.test.ts`.
22
+
23
+ ## KEY FILES
24
+
25
+ | File | Purpose |
26
+ |------|---------|
27
+ | `src/serve.ts` | MCP entry: config/resolution/Node gates, provisioning, bridge or unavailable stub |
28
+ | `src/cli.ts` | Hook CLI router: `hook session-start` / `hook post-tool-use` / `hook session-start-worker` / serve fallback |
29
+ | `src/hook.ts` | SessionStart probe + detached worker spawn, PostToolUse guidance emission |
30
+ | `src/session-start-worker.ts` | Background bootstrap: provision → workspace prep → `init`/`sync`, jsonl outcome log |
31
+ | `src/mcp-bridge.ts` | Stdio JSON-RPC forwarder; per-request framed/line response-mode tracking; codegraph_node contract rewrites |
32
+ | `src/mcp-unavailable.ts` | Reason-bearing stub MCP server for disabled/missing binary |
33
+ | `src/serve-invocation.ts` | win32 invocation shim: `.cmd`/`.bat` via `cmd.exe /d /s /c`, `.js`/`.mjs`/`.cjs` via `process.execPath` (mirrored by `resolveCodegraphCommandInvocation` in session-start-worker) |
34
+ | `src/hook-types.ts` | Shared hook/worker option + outcome types |
35
+
36
+ ## WHERE TO LOOK
37
+
38
+ | Task | Location |
39
+ |------|----------|
40
+ | Resolution order, provisioning, Node gate, env, gitignore/workspace prep | `packages/utils/src/codegraph/` (`resolve.ts`, `provision.ts`, `node-support.ts`, `env.ts`, `workspace.ts`, `guidance.ts`) — bundled at build time |
41
+ | `[codex].codegraph` config keys (`enabled`, `auto_provision`, `trustedCodegraphInstallDir`) | `packages/omo-codex/plugin/shared/src/config-loader.ts` |
42
+ | JSON-RPC framing primitives | `packages/mcp-stdio-core/src/` |
43
+ | Build / test / typecheck | `bun run build` (bun build → `dist/serve.js` + `dist/cli.js`, target node ESM), `bun test ./test`, `tsc --noEmit` |
44
+
45
+ ## NOTES
46
+
47
+ - This component tests with `bun test` (unlike the vitest-based `lsp` sibling); given/when/then style.
48
+ - `src/` imports reach sibling packages via relative paths (`../../../../../utils/src/...`); they are inlined by `bun build`, so runtime `dist/` has zero deps beyond Node.
49
+ - `CODEGRAPH_VERSION` is duplicated in `serve.ts` and `session-start-worker.ts` and must match the `@colbymchenry/codegraph` optionalDependency version.
50
+ - `trustedCodegraphInstallDir` overrides the `~/.omo/codegraph` install dir and is forwarded to children as `CODEGRAPH_INSTALL_DIR`.
51
+ - `resolution.source === "env"` is never auto-provisioned over: a user-set `OMO_CODEGRAPH_BIN` pointing at a missing file skips the MCP instead of silently substituting a download.