@moreih29/nexus-core 0.17.0 → 0.18.2
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/README.md +101 -67
- package/dist/cli/sync.d.ts +3 -0
- package/dist/cli/sync.d.ts.map +1 -0
- package/dist/cli/sync.js +59 -0
- package/dist/cli/sync.js.map +1 -0
- package/dist/generate/index.d.ts +3 -0
- package/dist/generate/index.d.ts.map +1 -0
- package/dist/generate/index.js +2 -0
- package/dist/generate/index.js.map +1 -0
- package/dist/generate/load-data.d.ts +8 -0
- package/dist/generate/load-data.d.ts.map +1 -0
- package/dist/generate/load-data.js +45 -0
- package/dist/generate/load-data.js.map +1 -0
- package/dist/generate/load-spec.d.ts +3 -0
- package/dist/generate/load-spec.d.ts.map +1 -0
- package/dist/generate/load-spec.js +48 -0
- package/dist/generate/load-spec.js.map +1 -0
- package/dist/generate/macros/expand.d.ts +3 -0
- package/dist/generate/macros/expand.d.ts.map +1 -0
- package/dist/generate/macros/expand.js +48 -0
- package/dist/generate/macros/expand.js.map +1 -0
- package/dist/generate/macros/parse.d.ts +4 -0
- package/dist/generate/macros/parse.d.ts.map +1 -0
- package/dist/generate/macros/parse.js +142 -0
- package/dist/generate/macros/parse.js.map +1 -0
- package/dist/generate/macros/validate.d.ts +3 -0
- package/dist/generate/macros/validate.d.ts.map +1 -0
- package/dist/generate/macros/validate.js +23 -0
- package/dist/generate/macros/validate.js.map +1 -0
- package/dist/generate/renderers/claude.d.ts +3 -0
- package/dist/generate/renderers/claude.d.ts.map +1 -0
- package/dist/generate/renderers/claude.js +48 -0
- package/dist/generate/renderers/claude.js.map +1 -0
- package/dist/generate/renderers/codex.d.ts +3 -0
- package/dist/generate/renderers/codex.d.ts.map +1 -0
- package/dist/generate/renderers/codex.js +79 -0
- package/dist/generate/renderers/codex.js.map +1 -0
- package/dist/generate/renderers/markdown.d.ts +2 -0
- package/dist/generate/renderers/markdown.d.ts.map +1 -0
- package/dist/generate/renderers/markdown.js +6 -0
- package/dist/generate/renderers/markdown.js.map +1 -0
- package/dist/generate/renderers/opencode.d.ts +3 -0
- package/dist/generate/renderers/opencode.d.ts.map +1 -0
- package/dist/generate/renderers/opencode.js +69 -0
- package/dist/generate/renderers/opencode.js.map +1 -0
- package/dist/generate/sync.d.ts +4 -0
- package/dist/generate/sync.d.ts.map +1 -0
- package/dist/generate/sync.js +60 -0
- package/dist/generate/sync.js.map +1 -0
- package/dist/generate/types.d.ts +74 -0
- package/dist/generate/types.d.ts.map +1 -0
- package/dist/generate/types.js +2 -0
- package/dist/generate/types.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/definitions/artifact.d.ts +20 -0
- package/dist/mcp/definitions/artifact.d.ts.map +1 -0
- package/dist/mcp/definitions/artifact.js +14 -0
- package/dist/mcp/definitions/artifact.js.map +1 -0
- package/dist/mcp/definitions/history.d.ts +20 -0
- package/dist/mcp/definitions/history.d.ts.map +1 -0
- package/dist/mcp/definitions/history.js +18 -0
- package/dist/mcp/definitions/history.js.map +1 -0
- package/dist/mcp/definitions/index.d.ts +276 -0
- package/dist/mcp/definitions/index.d.ts.map +1 -0
- package/dist/mcp/definitions/index.js +16 -0
- package/dist/mcp/definitions/index.js.map +1 -0
- package/dist/mcp/definitions/plan.d.ts +111 -0
- package/dist/mcp/definitions/plan.d.ts.map +1 -0
- package/dist/mcp/definitions/plan.js +89 -0
- package/dist/mcp/definitions/plan.js.map +1 -0
- package/dist/mcp/definitions/task.d.ts +138 -0
- package/dist/mcp/definitions/task.d.ts.map +1 -0
- package/dist/mcp/definitions/task.js +78 -0
- package/dist/mcp/definitions/task.js.map +1 -0
- package/dist/mcp/handlers/artifact.d.ts.map +1 -0
- package/dist/mcp/handlers/artifact.js +42 -0
- package/dist/mcp/handlers/artifact.js.map +1 -0
- package/dist/mcp/handlers/history.d.ts.map +1 -0
- package/dist/mcp/handlers/history.js +35 -0
- package/dist/mcp/handlers/history.js.map +1 -0
- package/dist/mcp/handlers/plan.d.ts.map +1 -0
- package/dist/mcp/handlers/plan.js +324 -0
- package/dist/mcp/handlers/plan.js.map +1 -0
- package/dist/mcp/handlers/task.d.ts.map +1 -0
- package/dist/mcp/handlers/task.js +216 -0
- package/dist/mcp/handlers/task.js.map +1 -0
- package/dist/{src/mcp → mcp}/server.d.ts +1 -1
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +58 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/shared/json-store.d.ts.map +1 -0
- package/dist/{src/shared → shared}/json-store.js +5 -4
- package/dist/shared/json-store.js.map +1 -0
- package/dist/shared/mcp-utils.d.ts.map +1 -0
- package/dist/shared/mcp-utils.js.map +1 -0
- package/dist/{src/shared → shared}/paths.d.ts +0 -6
- package/dist/shared/paths.d.ts.map +1 -0
- package/dist/shared/paths.js +62 -0
- package/dist/shared/paths.js.map +1 -0
- package/dist/shared/register-tool.d.ts +20 -0
- package/dist/shared/register-tool.d.ts.map +1 -0
- package/dist/shared/register-tool.js +15 -0
- package/dist/shared/register-tool.js.map +1 -0
- package/dist/{src/types → types}/state.d.ts +65 -65
- package/dist/types/state.d.ts.map +1 -0
- package/dist/{src/types → types}/state.js +1 -1
- package/dist/types/state.js.map +1 -0
- package/harness/claude/agent-rules.yml +21 -0
- package/harness/claude/invocations.yml +11 -0
- package/harness/claude/layout.yml +3 -0
- package/harness/codex/agent-rules.yml +28 -0
- package/harness/codex/invocations.yml +13 -0
- package/harness/codex/layout.yml +3 -0
- package/harness/opencode/agent-rules.yml +18 -0
- package/harness/opencode/invocations.yml +12 -0
- package/harness/opencode/layout.yml +3 -0
- package/package.json +38 -43
- package/{assets → spec}/agents/architect/body.ko.md +92 -84
- package/spec/agents/architect/body.md +185 -0
- package/spec/agents/designer/body.ko.md +330 -0
- package/spec/agents/designer/body.md +330 -0
- package/spec/agents/engineer/body.ko.md +166 -0
- package/spec/agents/engineer/body.md +166 -0
- package/spec/agents/lead/body.ko.md +276 -0
- package/spec/agents/lead/body.md +276 -0
- package/{assets → spec}/agents/postdoc/body.ko.md +116 -46
- package/spec/agents/postdoc/body.md +192 -0
- package/{assets → spec}/agents/researcher/body.ko.md +131 -45
- package/spec/agents/researcher/body.md +223 -0
- package/spec/agents/reviewer/body.ko.md +219 -0
- package/spec/agents/reviewer/body.md +219 -0
- package/{assets → spec}/agents/strategist/body.ko.md +108 -35
- package/spec/agents/strategist/body.md +187 -0
- package/spec/agents/tester/body.ko.md +272 -0
- package/spec/agents/tester/body.md +272 -0
- package/{assets → spec}/agents/writer/body.ko.md +109 -33
- package/spec/agents/writer/body.md +198 -0
- package/spec/skills/nx-auto-plan/body.ko.md +150 -0
- package/spec/skills/nx-auto-plan/body.md +150 -0
- package/spec/skills/nx-plan/body.ko.md +159 -0
- package/spec/skills/nx-plan/body.md +159 -0
- package/spec/skills/nx-run/body.ko.md +132 -0
- package/spec/skills/nx-run/body.md +132 -0
- package/vocabulary/enums/task-register-state.yml +4 -0
- package/vocabulary/invocations.yml +43 -0
- package/assets/agents/architect/body.md +0 -177
- package/assets/agents/designer/body.ko.md +0 -125
- package/assets/agents/designer/body.md +0 -125
- package/assets/agents/engineer/body.ko.md +0 -106
- package/assets/agents/engineer/body.md +0 -106
- package/assets/agents/lead/body.ko.md +0 -70
- package/assets/agents/lead/body.md +0 -70
- package/assets/agents/postdoc/body.md +0 -122
- package/assets/agents/researcher/body.md +0 -137
- package/assets/agents/reviewer/body.ko.md +0 -138
- package/assets/agents/reviewer/body.md +0 -138
- package/assets/agents/strategist/body.md +0 -116
- package/assets/agents/tester/body.ko.md +0 -195
- package/assets/agents/tester/body.md +0 -195
- package/assets/agents/writer/body.md +0 -122
- package/assets/capability-matrix.yml +0 -200
- package/assets/hooks/agent-bootstrap/handler.test.ts +0 -369
- package/assets/hooks/agent-bootstrap/handler.ts +0 -132
- package/assets/hooks/agent-bootstrap/meta.yml +0 -10
- package/assets/hooks/agent-finalize/handler.test.ts +0 -368
- package/assets/hooks/agent-finalize/handler.ts +0 -76
- package/assets/hooks/agent-finalize/meta.yml +0 -10
- package/assets/hooks/capability-matrix.yml +0 -313
- package/assets/hooks/post-tool-telemetry/handler.test.ts +0 -302
- package/assets/hooks/post-tool-telemetry/handler.ts +0 -49
- package/assets/hooks/post-tool-telemetry/meta.yml +0 -10
- package/assets/hooks/prompt-router/handler.test.ts +0 -801
- package/assets/hooks/prompt-router/handler.ts +0 -272
- package/assets/hooks/prompt-router/meta.yml +0 -11
- package/assets/hooks/session-init/handler.test.ts +0 -274
- package/assets/hooks/session-init/handler.ts +0 -31
- package/assets/hooks/session-init/meta.yml +0 -9
- package/assets/lsp-servers.json +0 -55
- package/assets/schema/lsp-servers.schema.json +0 -67
- package/assets/skills/nx-init/body.ko.md +0 -197
- package/assets/skills/nx-init/body.md +0 -197
- package/assets/skills/nx-plan/body.ko.md +0 -361
- package/assets/skills/nx-plan/body.md +0 -361
- package/assets/skills/nx-run/body.ko.md +0 -161
- package/assets/skills/nx-run/body.md +0 -160
- package/assets/skills/nx-sync/body.ko.md +0 -92
- package/assets/skills/nx-sync/body.md +0 -92
- package/assets/tools/tool-name-map.yml +0 -353
- package/dist/assets/hooks/agent-bootstrap/handler.d.ts +0 -4
- package/dist/assets/hooks/agent-bootstrap/handler.d.ts.map +0 -1
- package/dist/assets/hooks/agent-bootstrap/handler.js +0 -114
- package/dist/assets/hooks/agent-bootstrap/handler.js.map +0 -1
- package/dist/assets/hooks/agent-finalize/handler.d.ts +0 -4
- package/dist/assets/hooks/agent-finalize/handler.d.ts.map +0 -1
- package/dist/assets/hooks/agent-finalize/handler.js +0 -63
- package/dist/assets/hooks/agent-finalize/handler.js.map +0 -1
- package/dist/assets/hooks/post-tool-telemetry/handler.d.ts +0 -4
- package/dist/assets/hooks/post-tool-telemetry/handler.d.ts.map +0 -1
- package/dist/assets/hooks/post-tool-telemetry/handler.js +0 -40
- package/dist/assets/hooks/post-tool-telemetry/handler.js.map +0 -1
- package/dist/assets/hooks/prompt-router/handler.d.ts +0 -4
- package/dist/assets/hooks/prompt-router/handler.d.ts.map +0 -1
- package/dist/assets/hooks/prompt-router/handler.js +0 -214
- package/dist/assets/hooks/prompt-router/handler.js.map +0 -1
- package/dist/assets/hooks/session-init/handler.d.ts +0 -4
- package/dist/assets/hooks/session-init/handler.d.ts.map +0 -1
- package/dist/assets/hooks/session-init/handler.js +0 -22
- package/dist/assets/hooks/session-init/handler.js.map +0 -1
- package/dist/claude/.claude-plugin/marketplace.json +0 -75
- package/dist/claude/.claude-plugin/plugin.json +0 -67
- package/dist/claude/agents/architect.md +0 -172
- package/dist/claude/agents/designer.md +0 -120
- package/dist/claude/agents/engineer.md +0 -98
- package/dist/claude/agents/lead.md +0 -59
- package/dist/claude/agents/postdoc.md +0 -117
- package/dist/claude/agents/researcher.md +0 -132
- package/dist/claude/agents/reviewer.md +0 -133
- package/dist/claude/agents/strategist.md +0 -111
- package/dist/claude/agents/tester.md +0 -190
- package/dist/claude/agents/writer.md +0 -114
- package/dist/claude/dist/hooks/agent-bootstrap.js +0 -238
- package/dist/claude/dist/hooks/agent-finalize.js +0 -180
- package/dist/claude/dist/hooks/post-tool-telemetry.js +0 -71
- package/dist/claude/dist/hooks/prompt-router.js +0 -7336
- package/dist/claude/dist/hooks/session-init.js +0 -50
- package/dist/claude/hooks/hooks.json +0 -64
- package/dist/claude/settings.json +0 -3
- package/dist/claude/skills/nx-init/SKILL.md +0 -189
- package/dist/claude/skills/nx-plan/SKILL.md +0 -353
- package/dist/claude/skills/nx-run/SKILL.md +0 -154
- package/dist/claude/skills/nx-sync/SKILL.md +0 -87
- package/dist/codex/agents/architect.toml +0 -175
- package/dist/codex/agents/designer.toml +0 -123
- package/dist/codex/agents/engineer.toml +0 -105
- package/dist/codex/agents/lead.toml +0 -64
- package/dist/codex/agents/postdoc.toml +0 -120
- package/dist/codex/agents/researcher.toml +0 -136
- package/dist/codex/agents/reviewer.toml +0 -137
- package/dist/codex/agents/strategist.toml +0 -114
- package/dist/codex/agents/tester.toml +0 -194
- package/dist/codex/agents/writer.toml +0 -121
- package/dist/codex/dist/hooks/agent-bootstrap.js +0 -238
- package/dist/codex/dist/hooks/agent-finalize.js +0 -180
- package/dist/codex/dist/hooks/prompt-router.js +0 -7336
- package/dist/codex/dist/hooks/session-init.js +0 -50
- package/dist/codex/hooks/hooks.json +0 -28
- package/dist/codex/install/AGENTS.fragment.md +0 -60
- package/dist/codex/install/config.fragment.toml +0 -5
- package/dist/codex/install/install.sh +0 -60
- package/dist/codex/package.json +0 -20
- package/dist/codex/plugin/.codex-plugin/plugin.json +0 -57
- package/dist/codex/plugin/skills/nx-init/SKILL.md +0 -189
- package/dist/codex/plugin/skills/nx-plan/SKILL.md +0 -353
- package/dist/codex/plugin/skills/nx-run/SKILL.md +0 -154
- package/dist/codex/plugin/skills/nx-sync/SKILL.md +0 -87
- package/dist/codex/prompts/architect.md +0 -166
- package/dist/codex/prompts/designer.md +0 -114
- package/dist/codex/prompts/engineer.md +0 -97
- package/dist/codex/prompts/lead.md +0 -60
- package/dist/codex/prompts/postdoc.md +0 -111
- package/dist/codex/prompts/researcher.md +0 -127
- package/dist/codex/prompts/reviewer.md +0 -128
- package/dist/codex/prompts/strategist.md +0 -105
- package/dist/codex/prompts/tester.md +0 -185
- package/dist/codex/prompts/writer.md +0 -113
- package/dist/hooks/agent-bootstrap.js +0 -238
- package/dist/hooks/agent-finalize.js +0 -180
- package/dist/hooks/post-tool-telemetry.js +0 -71
- package/dist/hooks/prompt-router.js +0 -7336
- package/dist/hooks/session-init.js +0 -50
- package/dist/manifests/claude-hooks.json +0 -64
- package/dist/manifests/codex-hooks.json +0 -28
- package/dist/manifests/opencode-manifest.json +0 -54
- package/dist/manifests/portability-report.json +0 -75
- package/dist/opencode/.opencode/skills/nx-init/SKILL.md +0 -189
- package/dist/opencode/.opencode/skills/nx-plan/SKILL.md +0 -353
- package/dist/opencode/.opencode/skills/nx-run/SKILL.md +0 -154
- package/dist/opencode/.opencode/skills/nx-sync/SKILL.md +0 -87
- package/dist/opencode/package.json +0 -23
- package/dist/opencode/src/agents/architect.ts +0 -176
- package/dist/opencode/src/agents/designer.ts +0 -124
- package/dist/opencode/src/agents/engineer.ts +0 -105
- package/dist/opencode/src/agents/lead.ts +0 -66
- package/dist/opencode/src/agents/postdoc.ts +0 -121
- package/dist/opencode/src/agents/researcher.ts +0 -136
- package/dist/opencode/src/agents/reviewer.ts +0 -137
- package/dist/opencode/src/agents/strategist.ts +0 -115
- package/dist/opencode/src/agents/tester.ts +0 -194
- package/dist/opencode/src/agents/writer.ts +0 -121
- package/dist/opencode/src/index.ts +0 -25
- package/dist/opencode/src/plugin.ts +0 -6
- package/dist/scripts/build-agents.d.ts +0 -170
- package/dist/scripts/build-agents.d.ts.map +0 -1
- package/dist/scripts/build-agents.js +0 -907
- package/dist/scripts/build-agents.js.map +0 -1
- package/dist/scripts/build-hooks.d.ts +0 -57
- package/dist/scripts/build-hooks.d.ts.map +0 -1
- package/dist/scripts/build-hooks.js +0 -562
- package/dist/scripts/build-hooks.js.map +0 -1
- package/dist/scripts/cli.d.ts +0 -54
- package/dist/scripts/cli.d.ts.map +0 -1
- package/dist/scripts/cli.js +0 -504
- package/dist/scripts/cli.js.map +0 -1
- package/dist/scripts/smoke/smoke-claude.d.ts +0 -2
- package/dist/scripts/smoke/smoke-claude.d.ts.map +0 -1
- package/dist/scripts/smoke/smoke-claude.js +0 -58
- package/dist/scripts/smoke/smoke-claude.js.map +0 -1
- package/dist/scripts/smoke/smoke-codex.d.ts +0 -2
- package/dist/scripts/smoke/smoke-codex.d.ts.map +0 -1
- package/dist/scripts/smoke/smoke-codex.js +0 -50
- package/dist/scripts/smoke/smoke-codex.js.map +0 -1
- package/dist/scripts/smoke/smoke-consumer.d.ts +0 -2
- package/dist/scripts/smoke/smoke-consumer.d.ts.map +0 -1
- package/dist/scripts/smoke/smoke-consumer.js +0 -230
- package/dist/scripts/smoke/smoke-consumer.js.map +0 -1
- package/dist/scripts/smoke/smoke-opencode.d.ts +0 -2
- package/dist/scripts/smoke/smoke-opencode.d.ts.map +0 -1
- package/dist/scripts/smoke/smoke-opencode.js +0 -99
- package/dist/scripts/smoke/smoke-opencode.js.map +0 -1
- package/dist/src/hooks/opencode-mount.d.ts +0 -35
- package/dist/src/hooks/opencode-mount.d.ts.map +0 -1
- package/dist/src/hooks/opencode-mount.js +0 -352
- package/dist/src/hooks/opencode-mount.js.map +0 -1
- package/dist/src/hooks/runtime.d.ts +0 -37
- package/dist/src/hooks/runtime.d.ts.map +0 -1
- package/dist/src/hooks/runtime.js +0 -274
- package/dist/src/hooks/runtime.js.map +0 -1
- package/dist/src/hooks/types.d.ts +0 -196
- package/dist/src/hooks/types.d.ts.map +0 -1
- package/dist/src/hooks/types.js +0 -85
- package/dist/src/hooks/types.js.map +0 -1
- package/dist/src/lsp/cache.d.ts +0 -9
- package/dist/src/lsp/cache.d.ts.map +0 -1
- package/dist/src/lsp/cache.js +0 -216
- package/dist/src/lsp/cache.js.map +0 -1
- package/dist/src/lsp/client.d.ts +0 -24
- package/dist/src/lsp/client.d.ts.map +0 -1
- package/dist/src/lsp/client.js +0 -166
- package/dist/src/lsp/client.js.map +0 -1
- package/dist/src/lsp/detect.d.ts +0 -77
- package/dist/src/lsp/detect.d.ts.map +0 -1
- package/dist/src/lsp/detect.js +0 -116
- package/dist/src/lsp/detect.js.map +0 -1
- package/dist/src/mcp/server.d.ts.map +0 -1
- package/dist/src/mcp/server.js +0 -34
- package/dist/src/mcp/server.js.map +0 -1
- package/dist/src/mcp/tools/artifact.d.ts.map +0 -1
- package/dist/src/mcp/tools/artifact.js +0 -36
- package/dist/src/mcp/tools/artifact.js.map +0 -1
- package/dist/src/mcp/tools/history.d.ts.map +0 -1
- package/dist/src/mcp/tools/history.js +0 -29
- package/dist/src/mcp/tools/history.js.map +0 -1
- package/dist/src/mcp/tools/lsp.d.ts +0 -13
- package/dist/src/mcp/tools/lsp.d.ts.map +0 -1
- package/dist/src/mcp/tools/lsp.js +0 -225
- package/dist/src/mcp/tools/lsp.js.map +0 -1
- package/dist/src/mcp/tools/plan.d.ts.map +0 -1
- package/dist/src/mcp/tools/plan.js +0 -317
- package/dist/src/mcp/tools/plan.js.map +0 -1
- package/dist/src/mcp/tools/task.d.ts.map +0 -1
- package/dist/src/mcp/tools/task.js +0 -252
- package/dist/src/mcp/tools/task.js.map +0 -1
- package/dist/src/shared/invocations.d.ts +0 -74
- package/dist/src/shared/invocations.d.ts.map +0 -1
- package/dist/src/shared/invocations.js +0 -247
- package/dist/src/shared/invocations.js.map +0 -1
- package/dist/src/shared/json-store.d.ts.map +0 -1
- package/dist/src/shared/json-store.js.map +0 -1
- package/dist/src/shared/mcp-utils.d.ts.map +0 -1
- package/dist/src/shared/mcp-utils.js.map +0 -1
- package/dist/src/shared/package-root.d.ts +0 -6
- package/dist/src/shared/package-root.d.ts.map +0 -1
- package/dist/src/shared/package-root.js +0 -19
- package/dist/src/shared/package-root.js.map +0 -1
- package/dist/src/shared/paths.d.ts.map +0 -1
- package/dist/src/shared/paths.js +0 -117
- package/dist/src/shared/paths.js.map +0 -1
- package/dist/src/shared/tool-log.d.ts +0 -8
- package/dist/src/shared/tool-log.d.ts.map +0 -1
- package/dist/src/shared/tool-log.js +0 -22
- package/dist/src/shared/tool-log.js.map +0 -1
- package/dist/src/types/agent-config.d.ts +0 -22
- package/dist/src/types/agent-config.d.ts.map +0 -1
- package/dist/src/types/agent-config.js +0 -2
- package/dist/src/types/agent-config.js.map +0 -1
- package/dist/src/types/index.d.ts +0 -2
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js +0 -2
- package/dist/src/types/index.js.map +0 -1
- package/dist/src/types/state.d.ts.map +0 -1
- package/dist/src/types/state.js.map +0 -1
- package/docs/consuming/codex-lead-merge.md +0 -106
- package/docs/contract/harness-io.md +0 -333
- package/docs/plugin-guide.md +0 -355
- package/docs/plugin-template/claude/.github/workflows/build.yml +0 -60
- package/docs/plugin-template/claude/README.md +0 -110
- package/docs/plugin-template/claude/package.json +0 -16
- package/docs/plugin-template/codex/.github/workflows/build.yml +0 -51
- package/docs/plugin-template/codex/README.md +0 -147
- package/docs/plugin-template/codex/install/install.sh +0 -60
- package/docs/plugin-template/codex/package.json +0 -17
- package/docs/plugin-template/opencode/.github/workflows/build.yml +0 -61
- package/docs/plugin-template/opencode/README.md +0 -121
- package/docs/plugin-template/opencode/package.json +0 -25
- package/docs/plugin-template/opencode/src/plugin.ts +0 -6
- /package/dist/{src/mcp/tools → mcp/handlers}/artifact.d.ts +0 -0
- /package/dist/{src/mcp/tools → mcp/handlers}/history.d.ts +0 -0
- /package/dist/{src/mcp/tools → mcp/handlers}/plan.d.ts +0 -0
- /package/dist/{src/mcp/tools → mcp/handlers}/task.d.ts +0 -0
- /package/dist/{src/shared → shared}/json-store.d.ts +0 -0
- /package/dist/{src/shared → shared}/mcp-utils.d.ts +0 -0
- /package/dist/{src/shared → shared}/mcp-utils.js +0 -0
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
// src/shared/json-store.js
|
|
2
|
-
import fs from "node:fs/promises";
|
|
3
|
-
import { constants as fsConstants, appendFileSync, mkdirSync } from "node:fs";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { randomUUID } from "node:crypto";
|
|
6
|
-
var inProcessQueues = new Map;
|
|
7
|
-
async function runWithInProcessLock(filePath, action) {
|
|
8
|
-
const previous = inProcessQueues.get(filePath) ?? Promise.resolve();
|
|
9
|
-
let release = () => {};
|
|
10
|
-
const gate = new Promise((resolve) => {
|
|
11
|
-
release = resolve;
|
|
12
|
-
});
|
|
13
|
-
const entry = previous.then(() => gate);
|
|
14
|
-
inProcessQueues.set(filePath, entry);
|
|
15
|
-
await previous;
|
|
16
|
-
try {
|
|
17
|
-
return await action();
|
|
18
|
-
} finally {
|
|
19
|
-
release();
|
|
20
|
-
entry.finally(() => {
|
|
21
|
-
if (inProcessQueues.get(filePath) === entry) {
|
|
22
|
-
inProcessQueues.delete(filePath);
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
var LOCK_RETRY_INTERVAL_MS = 100;
|
|
28
|
-
var LOCK_MAX_RETRIES = 50;
|
|
29
|
-
var LOCK_STALE_MS = 30000;
|
|
30
|
-
function lockPath(filePath) {
|
|
31
|
-
return `${filePath}.lock`;
|
|
32
|
-
}
|
|
33
|
-
async function acquireFsLock(filePath) {
|
|
34
|
-
const lp = lockPath(filePath);
|
|
35
|
-
for (let attempt = 0;attempt <= LOCK_MAX_RETRIES; attempt++) {
|
|
36
|
-
try {
|
|
37
|
-
const fd = await fs.open(lp, fsConstants.O_WRONLY | fsConstants.O_CREAT | fsConstants.O_EXCL);
|
|
38
|
-
await fd.close();
|
|
39
|
-
return;
|
|
40
|
-
} catch (err) {
|
|
41
|
-
const e = err;
|
|
42
|
-
if (e.code !== "EEXIST")
|
|
43
|
-
throw err;
|
|
44
|
-
try {
|
|
45
|
-
const stat = await fs.stat(lp);
|
|
46
|
-
const ageMs = Date.now() - stat.mtimeMs;
|
|
47
|
-
if (ageMs > LOCK_STALE_MS) {
|
|
48
|
-
await fs.unlink(lp).catch(() => {
|
|
49
|
-
return;
|
|
50
|
-
});
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
} catch {
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
if (attempt === LOCK_MAX_RETRIES) {
|
|
57
|
-
throw new Error(`Failed to acquire lock for "${filePath}" after ${LOCK_MAX_RETRIES} retries`);
|
|
58
|
-
}
|
|
59
|
-
await new Promise((resolve) => setTimeout(resolve, LOCK_RETRY_INTERVAL_MS));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
async function releaseFsLock(filePath) {
|
|
64
|
-
await fs.unlink(lockPath(filePath)).catch(() => {
|
|
65
|
-
return;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
async function readJsonFile(filePath, defaultValue) {
|
|
69
|
-
let raw;
|
|
70
|
-
try {
|
|
71
|
-
raw = await fs.readFile(filePath, "utf8");
|
|
72
|
-
} catch (err) {
|
|
73
|
-
const e = err;
|
|
74
|
-
if (e.code === "ENOENT")
|
|
75
|
-
return defaultValue;
|
|
76
|
-
throw err;
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
return JSON.parse(raw);
|
|
80
|
-
} catch {
|
|
81
|
-
return defaultValue;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
async function writeJsonFile(filePath, data) {
|
|
85
|
-
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
86
|
-
const tmpPath = `${filePath}.tmp.${process.pid}.${Date.now()}.${randomUUID()}`;
|
|
87
|
-
await fs.writeFile(tmpPath, JSON.stringify(data, null, 2) + `
|
|
88
|
-
`, "utf8");
|
|
89
|
-
await fs.rename(tmpPath, filePath);
|
|
90
|
-
}
|
|
91
|
-
async function updateJsonFileLocked(filePath, defaultValue, updater) {
|
|
92
|
-
return runWithInProcessLock(filePath, async () => {
|
|
93
|
-
await acquireFsLock(filePath);
|
|
94
|
-
try {
|
|
95
|
-
const current = await readJsonFile(filePath, defaultValue);
|
|
96
|
-
const next = await updater(current);
|
|
97
|
-
await writeJsonFile(filePath, next);
|
|
98
|
-
return next;
|
|
99
|
-
} finally {
|
|
100
|
-
await releaseFsLock(filePath);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
var APPEND_SIZE_WARN_THRESHOLD = 4 * 1024;
|
|
105
|
-
|
|
106
|
-
// assets/hooks/agent-finalize/handler.ts
|
|
107
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
108
|
-
import { join } from "node:path";
|
|
109
|
-
var handler = async (input) => {
|
|
110
|
-
if (input.hook_event_name !== "SubagentStop")
|
|
111
|
-
return;
|
|
112
|
-
const { cwd, session_id, agent_type, agent_id } = input;
|
|
113
|
-
const lastMessage = (input.last_assistant_message ?? "").slice(0, 500);
|
|
114
|
-
const sessionDir = join(cwd, ".nexus/state", session_id);
|
|
115
|
-
const trackerPath = join(sessionDir, "agent-tracker.json");
|
|
116
|
-
const toolLogPath = join(sessionDir, "tool-log.jsonl");
|
|
117
|
-
const tasksPath = join(sessionDir, "tasks.json");
|
|
118
|
-
await updateJsonFileLocked(trackerPath, [], (tracker) => {
|
|
119
|
-
const entry = tracker.find((e) => e["agent_id"] === agent_id);
|
|
120
|
-
if (!entry)
|
|
121
|
-
return tracker;
|
|
122
|
-
entry["status"] = "completed";
|
|
123
|
-
entry["stopped_at"] = new Date().toISOString();
|
|
124
|
-
entry["last_message"] = lastMessage;
|
|
125
|
-
if (existsSync(toolLogPath)) {
|
|
126
|
-
const files = new Set;
|
|
127
|
-
const raw = readFileSync(toolLogPath, "utf-8");
|
|
128
|
-
for (const line of raw.split(`
|
|
129
|
-
`)) {
|
|
130
|
-
if (!line.trim())
|
|
131
|
-
continue;
|
|
132
|
-
try {
|
|
133
|
-
const log = JSON.parse(line);
|
|
134
|
-
if (log["agent_id"] === agent_id && typeof log["file"] === "string") {
|
|
135
|
-
files.add(log["file"]);
|
|
136
|
-
}
|
|
137
|
-
} catch {}
|
|
138
|
-
}
|
|
139
|
-
entry["files_touched"] = [...files];
|
|
140
|
-
}
|
|
141
|
-
return tracker;
|
|
142
|
-
});
|
|
143
|
-
if (!existsSync(tasksPath))
|
|
144
|
-
return;
|
|
145
|
-
try {
|
|
146
|
-
const tasksData = JSON.parse(readFileSync(tasksPath, "utf-8"));
|
|
147
|
-
const tasks = Array.isArray(tasksData?.["tasks"]) ? tasksData["tasks"] : [];
|
|
148
|
-
const incomplete = tasks.filter((t) => t["owner"]?.["role"] === agent_type && t["status"] !== "completed");
|
|
149
|
-
if (incomplete.length === 0)
|
|
150
|
-
return;
|
|
151
|
-
const ids = incomplete.map((t) => t["id"]).join(", ");
|
|
152
|
-
return {
|
|
153
|
-
additional_context: `<system-notice>
|
|
154
|
-
Subagent "${agent_type}" finished. Tasks still pending with this role: ${ids}. Review status and coordinate remaining subagent delegation.
|
|
155
|
-
</system-notice>`
|
|
156
|
-
};
|
|
157
|
-
} catch {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
var handler_default = handler;
|
|
162
|
-
|
|
163
|
-
// ../../../../../tmp/nexus-hook-entry-agent-finalize-1776690665695/agent-finalize-entry.ts
|
|
164
|
-
import { readFileSync as readFileSync2 } from "node:fs";
|
|
165
|
-
async function main() {
|
|
166
|
-
let raw = "";
|
|
167
|
-
try {
|
|
168
|
-
raw = readFileSync2(0, "utf-8");
|
|
169
|
-
} catch {}
|
|
170
|
-
const input = raw ? JSON.parse(raw) : {};
|
|
171
|
-
const result = await handler_default(input);
|
|
172
|
-
if (result != null && result !== undefined) {
|
|
173
|
-
process.stdout.write(JSON.stringify(result));
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
main().then(() => process.exit(0), (err) => {
|
|
177
|
-
process.stderr.write(String(err?.stack ?? err) + `
|
|
178
|
-
`);
|
|
179
|
-
process.exit(1);
|
|
180
|
-
});
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// src/shared/json-store.js
|
|
2
|
-
import { constants as fsConstants, appendFileSync, mkdirSync } from "node:fs";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
var inProcessQueues = new Map;
|
|
5
|
-
var APPEND_SIZE_WARN_THRESHOLD = 4 * 1024;
|
|
6
|
-
function appendJsonLine(filePath, record) {
|
|
7
|
-
const line = JSON.stringify(record) + `
|
|
8
|
-
`;
|
|
9
|
-
if (line.length > APPEND_SIZE_WARN_THRESHOLD) {
|
|
10
|
-
console.error(`[json-store] appendJsonLine line exceeds ${APPEND_SIZE_WARN_THRESHOLD} bytes ` + `(${line.length}) — write may not be atomic on some filesystems. path=${filePath}`);
|
|
11
|
-
}
|
|
12
|
-
mkdirSync(path.dirname(filePath), { recursive: true });
|
|
13
|
-
appendFileSync(filePath, line);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// assets/hooks/post-tool-telemetry/handler.ts
|
|
17
|
-
import { join, resolve, relative } from "node:path";
|
|
18
|
-
var EDIT_TOOLS = new Set(["Edit", "Write", "MultiEdit", "ApplyPatch", "NotebookEdit"]);
|
|
19
|
-
function isWithinMemory(filePath, projectRoot) {
|
|
20
|
-
const memRoot = resolve(projectRoot, ".nexus/memory");
|
|
21
|
-
const abs = resolve(filePath);
|
|
22
|
-
return abs.startsWith(memRoot + "/") || abs === memRoot;
|
|
23
|
-
}
|
|
24
|
-
var handler = async (input) => {
|
|
25
|
-
if (input.hook_event_name !== "PostToolUse")
|
|
26
|
-
return;
|
|
27
|
-
const { cwd, session_id, tool_name, agent_id } = input;
|
|
28
|
-
const toolInput = input.tool_input ?? {};
|
|
29
|
-
if (tool_name === "Read") {
|
|
30
|
-
const filePath = toolInput.file_path;
|
|
31
|
-
if (filePath && isWithinMemory(filePath, cwd)) {
|
|
32
|
-
appendJsonLine(join(cwd, ".nexus/memory-access.jsonl"), {
|
|
33
|
-
path: relative(cwd, resolve(filePath)),
|
|
34
|
-
accessed_at: new Date().toISOString(),
|
|
35
|
-
agent: agent_id ?? null
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (EDIT_TOOLS.has(tool_name) && agent_id) {
|
|
40
|
-
const filePath = toolInput.file_path ?? toolInput.notebook_path;
|
|
41
|
-
if (filePath) {
|
|
42
|
-
appendJsonLine(join(cwd, ".nexus/state", session_id, "tool-log.jsonl"), {
|
|
43
|
-
ts: new Date().toISOString(),
|
|
44
|
-
agent_id,
|
|
45
|
-
tool: tool_name,
|
|
46
|
-
file: relative(cwd, resolve(filePath)),
|
|
47
|
-
status: "ok"
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
var handler_default = handler;
|
|
53
|
-
|
|
54
|
-
// ../../../../../tmp/nexus-hook-entry-post-tool-telemetry-1776690665643/post-tool-telemetry-entry.ts
|
|
55
|
-
import { readFileSync } from "node:fs";
|
|
56
|
-
async function main() {
|
|
57
|
-
let raw = "";
|
|
58
|
-
try {
|
|
59
|
-
raw = readFileSync(0, "utf-8");
|
|
60
|
-
} catch {}
|
|
61
|
-
const input = raw ? JSON.parse(raw) : {};
|
|
62
|
-
const result = await handler_default(input);
|
|
63
|
-
if (result != null && result !== undefined) {
|
|
64
|
-
process.stdout.write(JSON.stringify(result));
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
main().then(() => process.exit(0), (err) => {
|
|
68
|
-
process.stderr.write(String(err?.stack ?? err) + `
|
|
69
|
-
`);
|
|
70
|
-
process.exit(1);
|
|
71
|
-
});
|