lazycodex-ai 5.0.0-beta.17 → 5.0.0-beta.19
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.
- package/dist/cli/index.js +641 -161
- package/dist/cli/runtime-commands.d.ts +1 -1
- package/dist/cli/worktree-sweep/classify.d.ts +16 -0
- package/dist/cli/worktree-sweep/format.d.ts +8 -0
- package/dist/cli/worktree-sweep/git.d.ts +19 -0
- package/dist/cli/worktree-sweep/index.d.ts +7 -0
- package/dist/cli/worktree-sweep/options.d.ts +2 -0
- package/dist/cli/worktree-sweep/parse-worktree-list.d.ts +8 -0
- package/dist/cli/worktree-sweep/sweep.d.ts +2 -0
- package/dist/cli/worktree-sweep/types.d.ts +65 -0
- package/dist/cli/worktree-sweep/worktree-sweep.d.ts +2 -0
- package/dist/cli-node/index.js +641 -161
- package/package.json +1 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/AGENTS.md +47 -0
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/AGENTS.md +9 -0
- package/packages/omo-codex/plugin/components/comment-checker/biome.json +2 -2
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/src/apply-patch.ts +2 -8
- package/packages/omo-codex/plugin/components/comment-checker/src/core.ts +1 -2
- package/packages/omo-codex/plugin/components/comment-checker/src/request-extractor.ts +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/biome.json +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +1 -5
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +1 -5
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +1 -5
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +1 -4
- package/packages/omo-codex/plugin/components/lsp/AGENTS.md +30 -15
- package/packages/omo-codex/plugin/components/lsp/biome.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.js +1 -1
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/lsp/src/daemon-cli-path.ts +1 -5
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +6 -7
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook.test.ts +1 -2
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +11 -1
- package/packages/omo-codex/plugin/components/rules/AGENTS.md +12 -0
- package/packages/omo-codex/plugin/components/rules/biome.json +2 -2
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +43 -30
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +2 -2
- package/packages/omo-codex/plugin/components/rules/src/config.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/src/persistent-cache.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +6 -2
- package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +1 -4
- package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +4 -9
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/dynamic-target-fingerprints.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/engine.test.ts +7 -4
- package/packages/omo-codex/plugin/components/rules/test/finder.test.ts +2 -3
- package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +2 -3
- package/packages/omo-codex/plugin/components/rules/test/hephaestus-model-variant.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/matcher.test.ts +2 -3
- package/packages/omo-codex/plugin/components/rules/test/package-smoke.test.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/test/parser.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/rules-engine-consumption.test.ts +3 -6
- package/packages/omo-codex/plugin/components/rules/test/scanner.test.ts +1 -2
- package/packages/omo-codex/plugin/components/rules/test/sources.test.ts +2 -5
- package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +1 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/biome.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/AGENTS.md +8 -0
- package/packages/omo-codex/plugin/components/telemetry/biome.json +2 -2
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +237 -99
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +237 -99
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/src/codex-hook.ts +1 -4
- package/packages/omo-codex/plugin/components/telemetry/src/posthog.ts +4 -14
- package/packages/omo-codex/plugin/components/telemetry/src/product-identity.ts +1 -1
- package/packages/omo-codex/plugin/components/telemetry/test/diagnostics.test.ts +2 -5
- package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -0
- package/packages/omo-codex/plugin/components/ultrawork/biome.json +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +7 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +7 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +9 -1
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/biome.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +7 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-snapshot.ts +3 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +3 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-snapshot.test.ts +18 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +3 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +8 -5
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +19 -19
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/AGENTS.md +40 -0
- package/packages/omo-codex/plugin/skills/ast-grep/AGENTS.md +51 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/AGENTS.md +62 -0
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +2 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +2 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +2 -0
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +7 -1
- package/packages/omo-codex/plugin/skills/visual-qa/AGENTS.md +58 -0
- package/packages/omo-codex/plugin/test/AGENTS.md +47 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +249 -120
- package/packages/shared-skills/skills/ast-grep/AGENTS.md +51 -0
- package/packages/shared-skills/skills/coding-agent-sessions/AGENTS.md +62 -0
- package/packages/shared-skills/skills/review-work/SKILL.md +3 -3
- package/packages/shared-skills/skills/start-work/SKILL.md +2 -1
- package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +2 -0
- package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +2 -0
- package/packages/shared-skills/skills/visual-qa/AGENTS.md +58 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lazycodex-ai",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.19",
|
|
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",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# plugin — vendored Codex plugin bundle (`@sisyphuslabs/omo-codex-plugin`)
|
|
2
|
+
|
|
3
|
+
**Score 13** (608 files; distinct package boundary between the adapter and 15 component dirs, each with its own AGENTS.md).
|
|
4
|
+
|
|
5
|
+
## OVERVIEW
|
|
6
|
+
|
|
7
|
+
The shipped Codex plugin namespace `omo` (marketplace `sisyphuslabs`), v5.0.0-beta.18. npm workspaces root for the 11 component packages; owns aggregate hook wiring, MCP declarations, and the build/sync pipeline. Component roster, sync-skills pipeline, and install targets are owned by the package AGENTS.md — not repeated here.
|
|
8
|
+
|
|
9
|
+
## STRUCTURE
|
|
10
|
+
|
|
11
|
+
| Path | Role |
|
|
12
|
+
|------|------|
|
|
13
|
+
| `components/` | 11 workspace components + `bootstrap` (standalone, deliberately outside workspaces), `test-support`, `lcx`. Each owns its `AGENTS.md` |
|
|
14
|
+
| `hooks/` | 23 aggregate hook JSON files, assembled from each component's `hooks/hooks.json` by the build |
|
|
15
|
+
| `scripts/` | Build/sync/migration orchestration (own AGENTS.md) |
|
|
16
|
+
| `test/` | node:test black-box contract suite (own AGENTS.md) |
|
|
17
|
+
| `shared/` | `getCodexOmoConfig()` unified-config loader + startup config migration (`src/config-loader.ts`, `src/config-migration.ts`) |
|
|
18
|
+
| `skills/` | GENERATED by `sync-skills.mjs`; gitignored except the two tracked shared copies (`init-deep`, `ulw-plan`) |
|
|
19
|
+
| `.codex-plugin/plugin.json` | Aggregate manifest Codex consumes |
|
|
20
|
+
| `.mcp.json` | 5 servers: `codegraph`, `git_bash`, `lsp` (local stdio) + `grep_app`, `context7` (remote) |
|
|
21
|
+
|
|
22
|
+
## WHERE TO LOOK
|
|
23
|
+
|
|
24
|
+
| Task | Location |
|
|
25
|
+
|------|----------|
|
|
26
|
+
| Add/modify a component hook | Component's `hooks/hooks.json`; the build re-assembles `hooks/*.json` |
|
|
27
|
+
| Aggregate hook side | `hooks/<event>-checking-<component>.json`; only the aggregate copies carry `commandWindows` dispatch |
|
|
28
|
+
| MCP server enable/paths | `.mcp.json`; install-time rewriting in `../src/install/codex-cache-bundled-mcps.ts` |
|
|
29
|
+
| Unified `[codex]` config resolution | `shared/src/config-loader.ts` |
|
|
30
|
+
| Build pipeline internals | `scripts/AGENTS.md` |
|
|
31
|
+
|
|
32
|
+
## CONVENTIONS
|
|
33
|
+
|
|
34
|
+
- Build order is fixed: `sync-version` → `sync-hook-status-messages` → `build-bundled-mcp-runtimes` → `materialize-shared-upstreams` → `sync-skills` → `build-components` (all via `npm run build`).
|
|
35
|
+
- `(OmO <version>)` `statusMessage` stamps are generated by sync scripts; never hand-edit.
|
|
36
|
+
- `skills/` is build output: edit component skill sources, then rebuild. The two tracked shared copies are the exception — they are committed.
|
|
37
|
+
- Tests run with `node --test`, NOT bun/vitest: root `bunfig.toml` excludes `plugin/**` from the root bun suite.
|
|
38
|
+
|
|
39
|
+
## COMMANDS
|
|
40
|
+
|
|
41
|
+
From `packages/omo-codex/plugin/`:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm run build # full sync + components pipeline
|
|
45
|
+
npm test # node --test test/*.test.mjs
|
|
46
|
+
npm run check # build && test
|
|
47
|
+
```
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
|
|
9
9
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
|
|
10
10
|
"timeout": 30,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.19) Checking Bootstrap Provisioning"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sisyphuslabs/codex-bootstrap",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.19",
|
|
4
4
|
"description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": true,
|
|
@@ -10,6 +10,15 @@ Conventions for human contributors and AI agents working on this repository.
|
|
|
10
10
|
- Tabs for indentation. Double quotes for strings.
|
|
11
11
|
- Tests use vitest with `#given .. #when .. #then` descriptions or plain `// given / // when / // then` body comments.
|
|
12
12
|
|
|
13
|
+
## Layout
|
|
14
|
+
|
|
15
|
+
- `src/core.ts`: parse API — `parseApplyPatchRequests`, `extractCommentCheckRequests`, `toHookInput`, `isToolFailureOutput`, `isRecord`.
|
|
16
|
+
- `src/apply-patch.ts`: `apply_patch` extraction supporting Codex `tool_input.command`, raw patch text, and OMO-compatible metadata.
|
|
17
|
+
- `src/request-extractor.ts` / `src/hook-input.ts` / `src/core-values.ts`: request/input shaping and constants.
|
|
18
|
+
- `src/runner.ts`: spawns the checker binary — `runCommentChecker`, `resolveCommentCheckerBinary`, `spawnProcess`.
|
|
19
|
+
- `src/codex-hook.ts`: `PostToolUse` hook + CLI (`extractCodexCommentCheckRequests`, `runCommentCheckerPostToolUse`, `runCodexHookCli`).
|
|
20
|
+
- `hooks/hooks.json`: registration. Heaviest suite: `test/codex-hook.test.ts` (513 LOC).
|
|
21
|
+
|
|
13
22
|
## Commands
|
|
14
23
|
|
|
15
24
|
- `npm install` - install dependencies.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.5.9/schema.json",
|
|
3
3
|
"linter": {
|
|
4
4
|
"enabled": true,
|
|
5
5
|
"rules": {
|
|
6
|
-
"
|
|
6
|
+
"preset": "recommended",
|
|
7
7
|
"style": {
|
|
8
8
|
"noDefaultExport": "error",
|
|
9
9
|
"noEnum": "error",
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
extractApplyPatchEdits,
|
|
3
|
-
getApplyPatchMetadataFiles,
|
|
4
|
-
} from "@oh-my-opencode/comment-checker-core";
|
|
5
1
|
import type { CheckerEdit as CoreApplyPatchEdit } from "@oh-my-opencode/comment-checker-core";
|
|
2
|
+
import { extractApplyPatchEdits, getApplyPatchMetadataFiles } from "@oh-my-opencode/comment-checker-core";
|
|
6
3
|
import type { CommentCheckRequest } from "./types.js";
|
|
7
4
|
|
|
8
5
|
export function extractApplyPatchRequests(event: {
|
|
@@ -27,10 +24,7 @@ function extractApplyPatchMetadataRequests(details: unknown, sourceToolName: str
|
|
|
27
24
|
return toCommentCheckRequests(edits, sourceToolName);
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
function toCommentCheckRequests(
|
|
31
|
-
edits: readonly CoreApplyPatchEdit[],
|
|
32
|
-
sourceToolName: string,
|
|
33
|
-
): CommentCheckRequest[] {
|
|
27
|
+
function toCommentCheckRequests(edits: readonly CoreApplyPatchEdit[], sourceToolName: string): CommentCheckRequest[] {
|
|
34
28
|
const requests: CommentCheckRequest[] = [];
|
|
35
29
|
for (const edit of edits) {
|
|
36
30
|
if (edit.before.length === 0) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export { parseApplyPatchRequests } from "@oh-my-opencode/comment-checker-core";
|
|
1
|
+
export { isRecord, parseApplyPatchRequests } from "@oh-my-opencode/comment-checker-core";
|
|
2
2
|
export { toHookInput } from "./hook-input.js";
|
|
3
|
-
export { isRecord } from "@oh-my-opencode/comment-checker-core";
|
|
4
3
|
export { extractCommentCheckRequests, isToolFailureOutput } from "./request-extractor.js";
|
|
5
4
|
export type {
|
|
6
5
|
CheckerEdit,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { extractApplyPatchRequests } from "./apply-patch.js";
|
|
2
1
|
import { getString, isRecord } from "@oh-my-opencode/comment-checker-core";
|
|
2
|
+
import { extractApplyPatchRequests } from "./apply-patch.js";
|
|
3
3
|
import type { CheckerEdit, CommentCheckRequest, TextContent, ToolResultContent, ToolResultLike } from "./types.js";
|
|
4
4
|
|
|
5
5
|
export function extractCommentCheckRequests(event: ToolResultLike): CommentCheckRequest[] {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
|
|
10
10
|
"timeout": 5,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.19) Recommending Git Bash MCP"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"type": "command",
|
|
21
21
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
|
|
22
22
|
"timeout": 5,
|
|
23
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
23
|
+
"statusMessage": "(OmO 5.0.0-beta.19) Resetting Git Bash MCP Reminder"
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
26
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.5.9/schema.json",
|
|
3
3
|
"linter": {
|
|
4
4
|
"enabled": true,
|
|
5
5
|
"rules": {
|
|
6
|
-
"
|
|
6
|
+
"preset": "recommended",
|
|
7
7
|
"style": {
|
|
8
8
|
"noDefaultExport": "error",
|
|
9
9
|
"noEnum": "error",
|
|
@@ -66,11 +66,7 @@ function isRecord(value) {
|
|
|
66
66
|
var SUBAGENT_STOP_EVENT = "SubagentStop";
|
|
67
67
|
|
|
68
68
|
// components/lazycodex-executor-verify/src/codex-hook.ts
|
|
69
|
-
var RECEIPT_ENFORCED_AGENTS = new Set([
|
|
70
|
-
"lazycodex-worker-low",
|
|
71
|
-
"lazycodex-worker-medium",
|
|
72
|
-
"lazycodex-worker-high"
|
|
73
|
-
]);
|
|
69
|
+
var RECEIPT_ENFORCED_AGENTS = new Set(["lazycodex-worker-low", "lazycodex-worker-medium", "lazycodex-worker-high"]);
|
|
74
70
|
function runSubagentStopHook(input, fs) {
|
|
75
71
|
if (!isSubagentStopInput(input))
|
|
76
72
|
return "";
|
|
@@ -3,11 +3,7 @@ import { isAbsolute, relative, resolve } from "node:path";
|
|
|
3
3
|
import { renderDirective } from "./directive.js";
|
|
4
4
|
import { clearAttemptState, MAX_ATTEMPTS, readAttemptState, writeAttemptState } from "./state.js";
|
|
5
5
|
import { SUBAGENT_STOP_EVENT } from "./types.js";
|
|
6
|
-
const RECEIPT_ENFORCED_AGENTS = new Set([
|
|
7
|
-
"lazycodex-worker-low",
|
|
8
|
-
"lazycodex-worker-medium",
|
|
9
|
-
"lazycodex-worker-high",
|
|
10
|
-
]);
|
|
6
|
+
const RECEIPT_ENFORCED_AGENTS = new Set(["lazycodex-worker-low", "lazycodex-worker-medium", "lazycodex-worker-high"]);
|
|
11
7
|
export function runSubagentStopHook(input, fs) {
|
|
12
8
|
if (!isSubagentStopInput(input))
|
|
13
9
|
return "";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
|
|
10
10
|
"timeout": 10,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.19) Verifying LazyCodex Executor Evidence"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-yeongyu/codex-lazycodex-executor-verify",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.19",
|
|
4
4
|
"description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@11.12.1",
|
|
@@ -6,11 +6,7 @@ import { clearAttemptState, MAX_ATTEMPTS, readAttemptState, writeAttemptState }
|
|
|
6
6
|
import type { HookFileSystem, StopHookOutput, SubagentStopInput } from "./types.js";
|
|
7
7
|
import { SUBAGENT_STOP_EVENT } from "./types.js";
|
|
8
8
|
|
|
9
|
-
const RECEIPT_ENFORCED_AGENTS = new Set([
|
|
10
|
-
"lazycodex-worker-low",
|
|
11
|
-
"lazycodex-worker-medium",
|
|
12
|
-
"lazycodex-worker-high",
|
|
13
|
-
]);
|
|
9
|
+
const RECEIPT_ENFORCED_AGENTS = new Set(["lazycodex-worker-low", "lazycodex-worker-medium", "lazycodex-worker-high"]);
|
|
14
10
|
|
|
15
11
|
export function runSubagentStopHook(input: unknown, fs: HookFileSystem): string {
|
|
16
12
|
if (!isSubagentStopInput(input)) return "";
|
package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts
CHANGED
|
@@ -374,9 +374,7 @@ describe("tier worker receipt enforcement", () => {
|
|
|
374
374
|
|
|
375
375
|
it("#given both hook manifests #when their matchers are applied #then enforced agents match and read-only roles do not", () => {
|
|
376
376
|
// given
|
|
377
|
-
const componentManifest = JSON.parse(
|
|
378
|
-
readFileSync(new URL("../hooks/hooks.json", import.meta.url), "utf8"),
|
|
379
|
-
);
|
|
377
|
+
const componentManifest = JSON.parse(readFileSync(new URL("../hooks/hooks.json", import.meta.url), "utf8"));
|
|
380
378
|
const rootManifest = JSON.parse(
|
|
381
379
|
readFileSync(
|
|
382
380
|
new URL("../../../hooks/subagent-stop-verifying-lazycodex-executor-evidence.json", import.meta.url),
|
|
@@ -394,4 +392,3 @@ describe("tier worker receipt enforcement", () => {
|
|
|
394
392
|
}
|
|
395
393
|
});
|
|
396
394
|
});
|
|
397
|
-
|
|
@@ -1,26 +1,41 @@
|
|
|
1
|
-
#
|
|
1
|
+
# lsp — Codex LSP integration (PostToolUse diagnostics + MCP routing)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Generated:** 2026-08-24 (refresh pass)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## OVERVIEW
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
`@code-yeongyu/codex-lsp` (Node >=20). Codex-specific integration only: a `PostToolUse` hook (matcher `^(apply_patch|Write|Edit|MultiEdit|multi_edit|write|edit|multiedit)$`, 60s timeout) that runs error diagnostics on files mutated by edit tools and injects blocking feedback plus the same diagnostics as additional context, and a `PostCompact` hook that resets the per-session diagnostics cache. The LSP/MCP runtime lives upstream: `src/cli.ts` routes the `mcp` subcommand to the vendored repo-root `packages/lsp-tools-mcp/` + `packages/lsp-daemon/` builds (wired via the component `.mcp.json` → `../../../../lsp-daemon/dist/cli.js mcp`); this component consumes `@oh-my-opencode/lsp-core` and `@code-yeongyu/lsp-daemon/client` and stays standalone.
|
|
8
|
+
|
|
9
|
+
Deletes are ignored (cannot introduce new diagnostics); unsupported extensions and clean files emit no hook output.
|
|
10
|
+
|
|
11
|
+
## KEY FILES
|
|
12
|
+
|
|
13
|
+
| File | Role |
|
|
14
|
+
|------|------|
|
|
15
|
+
| `src/cli.ts` | Entry: routes `mcp` to the upstream runtime; `hook post-tool-use` / `hook post-compact` stay local |
|
|
16
|
+
| `src/codex-hook.ts` | Hook logic: request context, mutated-file extraction, daemon diagnostics call, output shaping (`runLspPostToolUseHook`, `runLspPostCompactHook`, `codexLspRequestContext`) |
|
|
17
|
+
| `src/mutated-file-paths.ts` | Tool-input → file path extraction (`path`/`filePath`/`file_path` aliases, `apply_patch` command parsing) |
|
|
18
|
+
| `src/lsp-session-state.ts` | Per-session post-edit cache, compaction marking, daemon-unreachable detection |
|
|
19
|
+
| `src/daemon-cli-path.ts` | Resolves/vets the lsp-daemon CLI and its env (`resolveLspDaemonCliPath`, `ensureLspDaemonCliEnv`) |
|
|
20
|
+
| `scripts/build-lsp-tools.mjs`, `build-lsp-daemon.mjs`, `build-runtime.mjs` | Vendored upstream builds (run by `prebuild`/`pretest` hooks) |
|
|
21
|
+
| `scripts/test.mjs` | Test driver behind `npm test` |
|
|
12
22
|
|
|
13
|
-
##
|
|
23
|
+
## COMMANDS
|
|
14
24
|
|
|
15
|
-
- `npm install`
|
|
16
|
-
- `npm test`
|
|
17
|
-
- `npm run typecheck`
|
|
18
|
-
- `npm run check` runs typecheck, Biome, and build.
|
|
25
|
+
- `npm install` then `npm run bootstrap` (builds vendored lsp-tools-mcp + lsp-daemon)
|
|
26
|
+
- `npm test` (builds first, then `node scripts/test.mjs`); `npm run test:watch`
|
|
27
|
+
- `npm run typecheck` / `npm run lint` / `npm run check` (typecheck + Biome + build)
|
|
19
28
|
|
|
20
29
|
## LSP Constraints
|
|
21
30
|
|
|
22
|
-
- LSP server processes are owned by `LspManager
|
|
31
|
+
- LSP server processes are owned by `LspManager` (upstream runtime).
|
|
23
32
|
- Tool execution acquires clients through `withLspClient(...)` unless it only reports static status.
|
|
24
33
|
- `lsp.rename` mutates files by applying workspace edits; keep it sequential at the MCP caller level.
|
|
25
|
-
- `.mcp.json` sets `
|
|
34
|
+
- `.mcp.json` sets `startup_timeout_sec: 10` to bound startup; preserve the bound on edits.
|
|
26
35
|
- Do not add pi-coding-agent or omo source dependencies. This package is standalone.
|
|
36
|
+
|
|
37
|
+
## Style
|
|
38
|
+
|
|
39
|
+
- TypeScript strict mode. No `any`, `@ts-ignore`, `@ts-expect-error`, or enums.
|
|
40
|
+
- ESM modules with `.js` suffix in import paths. Tabs. Double quotes.
|
|
41
|
+
- Runtime is Node only; tests use vitest and should exercise Codex hook/MCP behavior before implementation changes.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.5.9/schema.json",
|
|
3
3
|
"linter": {
|
|
4
4
|
"enabled": true,
|
|
5
5
|
"rules": {
|
|
6
|
-
"
|
|
6
|
+
"preset": "recommended",
|
|
7
7
|
"style": {
|
|
8
8
|
"noDefaultExport": "error",
|
|
9
9
|
"noEnum": "error",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "5.0.0-beta.
|
|
4
|
-
"inputDigest": "sha256:
|
|
3
|
+
"version": "5.0.0-beta.19",
|
|
4
|
+
"inputDigest": "sha256:5e634463eb1d631e05f8ae13b5d40cbf83c43068b317957dda9c15e09cbbe425",
|
|
5
5
|
"outputs": [
|
|
6
6
|
{
|
|
7
7
|
"path": "cli.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "daemon-cli-path.js",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "96812ddde5100fc408c6109949f07df3df817282dae48428f01a4c3967b4795a"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"path": "lsp-session-state.d.ts",
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { OMO_LSP_DAEMON_CLI, OMO_LSP_DAEMON_VERSION, resolveDaemonRuntime
|
|
5
|
+
import { OMO_LSP_DAEMON_CLI, OMO_LSP_DAEMON_VERSION, resolveDaemonRuntime } from "@code-yeongyu/lsp-daemon/client";
|
|
6
6
|
const requireFromHere = createRequire(import.meta.url);
|
|
7
7
|
const PACKAGE_LSP_DAEMON_CLI = "@code-yeongyu/lsp-daemon/cli";
|
|
8
8
|
export function ensureLspDaemonCliEnv(env = process.env) {
|
|
@@ -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.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.19) 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.
|
|
24
|
+
"statusMessage": "(OmO 5.0.0-beta.19) Resetting LSP Diagnostics Cache"
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
}
|
|
@@ -4,7 +4,7 @@ import { join, resolve } from "node:path";
|
|
|
4
4
|
|
|
5
5
|
import { callDiagnosticsViaDaemon } from "@code-yeongyu/lsp-daemon/client";
|
|
6
6
|
import { collectPostEditDiagnostics, type PostEditDiagnosticsOutcome } from "@oh-my-opencode/lsp-core/post-edit";
|
|
7
|
-
import {
|
|
7
|
+
import { type LspRequestContext, parseLspRequestContext } from "@oh-my-opencode/lsp-core/request-context";
|
|
8
8
|
|
|
9
9
|
import { ensureLspDaemonCliEnv } from "./daemon-cli-path.js";
|
|
10
10
|
import {
|
|
@@ -3,11 +3,7 @@ import { createRequire } from "node:module";
|
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
OMO_LSP_DAEMON_CLI,
|
|
8
|
-
OMO_LSP_DAEMON_VERSION,
|
|
9
|
-
resolveDaemonRuntime,
|
|
10
|
-
} from "@code-yeongyu/lsp-daemon/client";
|
|
6
|
+
import { OMO_LSP_DAEMON_CLI, OMO_LSP_DAEMON_VERSION, resolveDaemonRuntime } from "@code-yeongyu/lsp-daemon/client";
|
|
11
7
|
|
|
12
8
|
const requireFromHere = createRequire(import.meta.url);
|
|
13
9
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { mkdtempSync, rmSync } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
|
|
5
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
6
4
|
import type { PostEditDiagnosticsOutcome } from "@oh-my-opencode/lsp-core/post-edit";
|
|
5
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
7
6
|
|
|
8
7
|
import { runLspPostCompactHook, runLspPostToolUseHook } from "../src/codex-hook.js";
|
|
9
8
|
|
|
@@ -149,11 +148,11 @@ describe("codex PostToolUse unavailable LSP suppression", () => {
|
|
|
149
148
|
const input = postToolUseInput("session-daemon-down-probe", ".omo/ulw-loop/evidence/note.md");
|
|
150
149
|
let calls = 0;
|
|
151
150
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
151
|
+
await withPluginData(pluginData, async () => {
|
|
152
|
+
await runLspPostToolUseHook(input, async () => {
|
|
153
|
+
calls += 1;
|
|
154
|
+
return markdownNotConfigured();
|
|
155
|
+
});
|
|
157
156
|
await runLspPostToolUseHook(input, async () => {
|
|
158
157
|
calls += 1;
|
|
159
158
|
return "error[markdown] (1000) at 1:1: cached call should have been skipped.";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { mkdtempSync, realpathSync, rmSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
|
|
5
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
6
4
|
import type { PostEditDiagnosticsOutcome } from "@oh-my-opencode/lsp-core/post-edit";
|
|
5
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
7
6
|
|
|
8
7
|
import { codexLspRequestContext, extractMutatedFilePaths, runLspPostToolUseHook } from "../src/codex-hook.js";
|
|
9
8
|
|
|
@@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
|
|
|
2
2
|
import {
|
|
3
3
|
listDirectoryEntries,
|
|
4
4
|
readHooksJson,
|
|
5
|
+
readJsonFile,
|
|
5
6
|
readMcpJson,
|
|
6
7
|
readPackageJson,
|
|
7
8
|
readTextFile,
|
|
@@ -44,7 +45,16 @@ describe("plugin package metadata", () => {
|
|
|
44
45
|
expect(postCompactCommand).toBe(`node "${pluginRoot}/dist/cli.js" hook post-compact`);
|
|
45
46
|
expect(lspServer?.command).toBe("node");
|
|
46
47
|
expect(lspServer?.args).toEqual(["../../../../lsp-daemon/dist/cli.js", "mcp"]);
|
|
47
|
-
expect(
|
|
48
|
+
expect(readJsonFile(".mcp.json")).toEqual({
|
|
49
|
+
mcpServers: {
|
|
50
|
+
lsp: {
|
|
51
|
+
command: "node",
|
|
52
|
+
args: ["../../../../lsp-daemon/dist/cli.js", "mcp"],
|
|
53
|
+
cwd: ".",
|
|
54
|
+
startup_timeout_sec: 10,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
48
58
|
expect(cliSource).not.toContain("./lazy-lsp-mcp.js");
|
|
49
59
|
expect(cliSource).toContain("resolveLspDaemonCliPath");
|
|
50
60
|
expect(daemonCliPathSource).toContain("@code-yeongyu/lsp-daemon/cli");
|
|
@@ -10,6 +10,17 @@ Conventions for human contributors and AI agents working on this repository.
|
|
|
10
10
|
- Tabs for indentation. Double quotes for strings.
|
|
11
11
|
- Tests use vitest with `#given .. #when .. #then` descriptions or plain `// given / // when / // then` body comments.
|
|
12
12
|
|
|
13
|
+
## Layout
|
|
14
|
+
|
|
15
|
+
- `src/cli.ts`: bin `omo-rules`; routes `hook session-start` / `hook user-prompt-submit` / `hook post-tool-use` / `hook post-compact`.
|
|
16
|
+
- `src/codex-hook.ts`: the four lifecycle hook functions (`runSessionStartHook`, `runUserPromptSubmitHook`, `runPostToolUseHook`, `runPostCompactHook`) — config, engine load, budgets, dedup, output formatting. Main behavioral hotspot.
|
|
17
|
+
- `src/persistent-cache.ts` + `src/session-state-lock.ts`: persisted static/dynamic dedup, target fingerprints, post-compact claims (`withPostCompactBudget`, `claimPostCompactPending`), `withSessionStateLock` (`SESSION_STATE_LOCK_CONTENDED`).
|
|
18
|
+
- `src/tool-paths.ts`: Codex file path extraction for reads, edits, `apply_patch`, shell-style tools (`extractCodexToolPaths`).
|
|
19
|
+
- `src/transcript-search.ts` / `src/transcript-rule-filter.ts`: transcript scanning and filtering.
|
|
20
|
+
- `src/rules-engine-factory.ts`: bridges `@oh-my-opencode/rules-engine` (discovery, parsing, matching, config).
|
|
21
|
+
- `bundled-rules/`: shipped Markdown rules (`hephaestus/`, `windows-git-bash.md`); ordering and platform candidates pinned by tests.
|
|
22
|
+
- `hooks/hooks.json`: registration. `scripts/bench-codex-rules.mjs`: benchmark.
|
|
23
|
+
|
|
13
24
|
## Commands
|
|
14
25
|
|
|
15
26
|
- `npm install` - install dependencies.
|
|
@@ -17,6 +28,7 @@ Conventions for human contributors and AI agents working on this repository.
|
|
|
17
28
|
- `npm run typecheck` - strict TypeScript check.
|
|
18
29
|
- `npm run check` - type check, biome, and build.
|
|
19
30
|
- `npm pack --dry-run` - release package smoke test.
|
|
31
|
+
- `npm run bench` - builds then runs the rules benchmark (`node scripts/bench-codex-rules.mjs`).
|
|
20
32
|
- `node dist/cli.js hook session-start < fixture.json` - smoke-test static rule injection.
|
|
21
33
|
- `node dist/cli.js hook post-tool-use < fixture.json` - smoke-test dynamic rule injection.
|
|
22
34
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.5.9/schema.json",
|
|
3
3
|
"linter": {
|
|
4
4
|
"enabled": true,
|
|
5
5
|
"rules": {
|
|
6
|
-
"
|
|
6
|
+
"preset": "recommended",
|
|
7
7
|
"style": {
|
|
8
8
|
"noDefaultExport": "error",
|
|
9
9
|
"noEnum": "error",
|