heyspex 0.1.0 → 0.2.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.
- package/README.md +21 -0
- package/bin/hs.mjs +931 -98
- package/bin/spexcode.mjs +262 -0
- package/dev-factory/engine/worktree.mjs +740 -0
- package/dev-factory/lib/code-repo-root.mjs +67 -0
- package/dev-factory/lib/context-budget.mjs +84 -0
- package/dev-factory/lib/epic-detect.mjs +190 -0
- package/dev-factory/lib/fleet-queue-file.mjs +846 -0
- package/dev-factory/lib/fleet-queue.mjs +426 -0
- package/dev-factory/lib/fleet-state.mjs +14 -18
- package/dev-factory/lib/model-catalog.mjs +338 -0
- package/dev-factory/lib/seat-context.mjs +199 -0
- package/dev-factory/lib/spec-io.mjs +93 -0
- package/dev-factory/lib/sufficiency-score.mjs +8 -2
- package/dev-factory/lib/worktree-allocator.mjs +744 -0
- package/dev-factory/model-catalog.json +222 -0
- package/dist/cli/hs-check.mjs +1085 -103
- package/dist/cli/hs-claim.mjs +936 -63
- package/dist/cli/hs-connect.mjs +9786 -1910
- package/dist/cli/hs-defer.mjs +5267 -3053
- package/dist/cli/hs-dev.mjs +564 -0
- package/dist/cli/hs-env.mjs +385 -299
- package/dist/cli/hs-index-rebuild.mjs +7129 -0
- package/dist/cli/hs-index-reconcile.mjs +7852 -0
- package/dist/cli/hs-init.mjs +777 -138
- package/dist/cli/hs-install.mjs +6583 -485
- package/dist/cli/hs-join.mjs +10137 -2368
- package/dist/cli/hs-vault-pull.mjs +4659 -5882
- package/dist/cli/hs-vault.mjs +3793 -1537
- package/dist/cli/hs-workspace.mjs +2550 -524
- package/dist/cli-templates/customer-vault/specs/entity-model.md +594 -601
- package/dist/cli-templates/customer-vault/specs/protocols/canonical-frontmatter-templates.md +110 -177
- package/dist/cli-templates/customer-vault/specs/protocols/destructive-action-checklist.md +122 -0
- package/dist/cli-templates/customer-vault/specs/protocols/memory-protocol.md +13 -15
- package/dist/cli-templates/customer-vault/specs/protocols/session-close-protocol.md +91 -0
- package/dist/cli-templates/customer-vault/specs/protocols/spec-hierarchy.md +150 -168
- package/dist/cli-templates/customer-vault/specs/protocols/spec-summary-authoring.md +83 -0
- package/dist/cli-templates/harness-commands/claude/hs-auto.md +36 -0
- package/dist/cli-templates/harness-commands/claude/hs-backfill.md +28 -0
- package/dist/cli-templates/harness-commands/claude/hs-capture.md +62 -0
- package/dist/cli-templates/harness-commands/claude/hs-defer.md +29 -0
- package/dist/cli-templates/harness-commands/claude/hs-dev.md +20 -0
- package/dist/cli-templates/harness-commands/claude/hs-doctor.md +32 -0
- package/dist/cli-templates/harness-commands/claude/hs-ground.md +28 -0
- package/dist/cli-templates/harness-commands/claude/hs-handoff.md +33 -0
- package/dist/cli-templates/harness-commands/claude/hs-log.md +27 -0
- package/dist/cli-templates/harness-commands/claude/hs-next.md +29 -0
- package/dist/cli-templates/harness-commands/claude/hs-promote.md +70 -0
- package/dist/cli-templates/harness-commands/claude/hs-push.md +35 -0
- package/dist/cli-templates/harness-commands/claude/hs-qc.md +27 -0
- package/dist/cli-templates/harness-commands/claude/hs-res.md +63 -0
- package/dist/cli-templates/harness-commands/claude/hs-resolve.md +23 -0
- package/dist/cli-templates/harness-commands/claude/hs-review.md +23 -0
- package/dist/cli-templates/harness-commands/claude/hs-view.md +26 -0
- package/dist/cli-templates/harness-commands/claude/kill-ports.md +32 -0
- package/dist/cli-templates/harness-commands/claude/prototype.md +91 -0
- package/dist/cli-templates/harness-commands/cursor/hs-auto.md +40 -0
- package/dist/cli-templates/harness-commands/cursor/hs-backfill.md +31 -0
- package/dist/cli-templates/harness-commands/cursor/hs-capture.md +65 -0
- package/dist/cli-templates/harness-commands/cursor/hs-defer.md +32 -0
- package/dist/cli-templates/harness-commands/cursor/hs-dev.md +24 -0
- package/dist/cli-templates/harness-commands/cursor/hs-doctor.md +36 -0
- package/dist/cli-templates/harness-commands/cursor/hs-ground.md +31 -0
- package/dist/cli-templates/harness-commands/cursor/hs-handoff.md +37 -0
- package/dist/cli-templates/harness-commands/cursor/hs-log.md +31 -0
- package/dist/cli-templates/harness-commands/cursor/hs-next.md +32 -0
- package/dist/cli-templates/harness-commands/cursor/hs-promote.md +73 -0
- package/dist/cli-templates/harness-commands/cursor/hs-push.md +38 -0
- package/dist/cli-templates/harness-commands/cursor/hs-qc.md +30 -0
- package/dist/cli-templates/harness-commands/cursor/hs-res.md +67 -0
- package/dist/cli-templates/harness-commands/cursor/hs-resolve.md +26 -0
- package/dist/cli-templates/harness-commands/cursor/hs-review.md +26 -0
- package/dist/cli-templates/harness-commands/cursor/hs-view.md +30 -0
- package/dist/cli-templates/harness-commands/cursor/kill-ports.md +35 -0
- package/dist/cli-templates/harness-commands/cursor/prototype.md +95 -0
- package/docs/mcp-client-config.md +259 -6
- package/package.json +231 -124
- package/plugins/heyspex/.claude-plugin/plugin.json +12 -0
- package/plugins/heyspex/.cursor-plugin/plugin.json +15 -0
- package/plugins/heyspex/.mcp.json +12 -0
- package/plugins/heyspex/bin/launch-mcp.mjs +95 -0
- package/plugins/heyspex/bin/run-hook.mjs +62 -0
- package/plugins/heyspex/hooks/cursor-hooks.json +227 -0
- package/plugins/heyspex/hooks/hooks.json +361 -0
- package/plugins/heyspex/mcp.json +13 -0
- package/scripts/check-mcp-freshness.mjs +17 -9
- package/scripts/claude-hooks/_env-vault-events.mjs +68 -0
- package/scripts/claude-hooks/_guardrail-events.mjs +96 -0
- package/scripts/claude-hooks/_guardrail-loader.mjs +494 -0
- package/scripts/claude-hooks/_intent-classifier-router.mjs +410 -0
- package/scripts/claude-hooks/_intent-classifier-semantic.mjs +351 -0
- package/scripts/claude-hooks/_run.mjs +120 -0
- package/scripts/claude-hooks/_transcript-text.mjs +60 -0
- package/scripts/claude-hooks/_vault-retrieval.mjs +322 -0
- package/scripts/claude-hooks/agent-spawn-delegation-gate.mjs +133 -0
- package/scripts/claude-hooks/capture-workflow-gate.mjs +11 -0
- package/scripts/claude-hooks/check-auto-memory-budget.mjs +396 -0
- package/scripts/claude-hooks/check-claude-md-budget.mjs +327 -0
- package/scripts/claude-hooks/check-mcp-freshness-hook.mjs +14 -0
- package/scripts/claude-hooks/claim-before-code-gate.mjs +11 -0
- package/scripts/claude-hooks/claim-liveness-shared.mjs +575 -0
- package/scripts/claude-hooks/close-terminal-on-ship.mjs +64 -0
- package/scripts/claude-hooks/coo-denylist-gate.mjs +11 -0
- package/scripts/claude-hooks/coo-guard-check.mjs +11 -0
- package/scripts/claude-hooks/deep-research-cost-gate.mjs +11 -0
- package/scripts/claude-hooks/dev-server-task-reminder.mjs +15 -0
- package/scripts/claude-hooks/emit-claim-status.mjs +41 -0
- package/scripts/claude-hooks/enforce-session-sequence.mjs +11 -0
- package/scripts/claude-hooks/enforce-vault-naming.mjs +11 -0
- package/scripts/claude-hooks/env-vault-guard.mjs +11 -0
- package/scripts/claude-hooks/epic-milestone-phrasing-gate.mjs +11 -0
- package/scripts/claude-hooks/git-identity-guard.mjs +11 -0
- package/scripts/claude-hooks/git-reflog-audit.mjs +15 -0
- package/scripts/claude-hooks/git-stash-gate.mjs +11 -0
- package/scripts/claude-hooks/guard-auto-memory-writes.mjs +137 -0
- package/scripts/claude-hooks/id-display-format-gate.mjs +11 -0
- package/scripts/claude-hooks/inject-communication-style.mjs +66 -0
- package/scripts/claude-hooks/inject-coo-seat.mjs +78 -0
- package/scripts/claude-hooks/inject-dev-server-awareness.mjs +11 -0
- package/scripts/claude-hooks/inject-doctrine.mjs +13 -0
- package/scripts/claude-hooks/inject-vault-context.mjs +14 -0
- package/scripts/claude-hooks/intent-classifier-trigger.mjs +247 -0
- package/scripts/claude-hooks/log-session-activity.mjs +341 -0
- package/scripts/claude-hooks/naughty-list-gate.mjs +11 -0
- package/scripts/claude-hooks/notify-status-flip.mjs +72 -0
- package/scripts/claude-hooks/plan-exit-ingest-gate.mjs +170 -0
- package/scripts/claude-hooks/plan-ingest-close-reminder.mjs +66 -0
- package/scripts/claude-hooks/plan-review-gate.mjs +11 -0
- package/scripts/claude-hooks/preflight-reminder.mjs +262 -0
- package/scripts/claude-hooks/protected-action-intent.mjs +221 -0
- package/scripts/claude-hooks/research-method-guard.mjs +398 -0
- package/scripts/claude-hooks/research-protocol-gate.mjs +11 -0
- package/scripts/claude-hooks/session-end.mjs +449 -0
- package/scripts/claude-hooks/settings-write-gate.mjs +11 -0
- package/scripts/claude-hooks/settlement-check-gate.mjs +39 -0
- package/scripts/claude-hooks/status-flip-detect.mjs +17 -0
- package/scripts/claude-hooks/terminal-close-shared.mjs +426 -0
- package/scripts/claude-hooks/terminal-close-watcher.mjs +122 -0
- package/scripts/claude-hooks/wip-checkpoint.mjs +298 -0
- package/scripts/cursor-hooks/manifest.mjs +235 -0
- package/scripts/dev-server-status.mjs +34 -13
- package/scripts/dev-server-stop.mjs +313 -0
- package/scripts/heyspex-mode.mjs +268 -0
- package/scripts/hs-auto-resolve.mjs +240 -0
- package/scripts/hs-auto-source.mjs +398 -0
- package/scripts/hs-auto.mjs +134 -0
- package/scripts/hs-capture-cli.mjs +326 -0
- package/scripts/hs-classifier.mjs +136 -0
- package/scripts/hs-companion.mjs +88 -0
- package/scripts/hs-gateway.mjs +115 -0
- package/scripts/hs-mode.mjs +125 -0
- package/scripts/hs-next.mjs +441 -0
- package/scripts/hs-settings.mjs +338 -0
- package/scripts/hs-view.mjs +333 -0
- package/scripts/hs-worktree.mjs +201 -0
- package/scripts/install-claude-code-hooks.mjs +270 -0
- package/scripts/install-cursor-hooks.mjs +471 -0
- package/scripts/lib/agent-env-markers.mjs +38 -0
- package/scripts/lib/console-url-resolver.mjs +197 -60
- package/scripts/lib/customer-kit.mjs +886 -0
- package/scripts/lib/dev-mode.mjs +244 -28
- package/scripts/lib/heyspex-home.mjs +72 -0
- package/scripts/lib/hs-command.mjs +277 -0
- package/scripts/lib/hs-companion-settings.mjs +472 -0
- package/scripts/lib/hs-source-commit.mjs +59 -5
- package/scripts/lib/hs-source-identity.mjs +526 -0
- package/scripts/lib/hs-source-log.mjs +11 -21
- package/scripts/lib/hs-source-push.mjs +107 -58
- package/scripts/lib/hs-worktree-args.mjs +115 -0
- package/scripts/lib/shared-path-helpers.mjs +134 -0
- package/scripts/lib/standalone-doctor.mjs +540 -3
- package/scripts/lib/subagent-git-lock.mjs +109 -0
- package/scripts/lib/template-pin.mjs +34 -0
- package/scripts/provenance-lib.mjs +91 -0
- package/scripts/stamp-provenance-on-edit.mjs +222 -0
- package/scripts/wip-ledger-health.mjs +653 -0
- package/spexharness/doctrine/baseline/SPEXCODE-DOCTRINE.baseline.json +29 -0
- package/spexharness/src/adapters/audit.mjs +197 -0
- package/spexharness/src/adapters/claude-code.mjs +441 -0
- package/spexharness/src/chat/tui/ansi.mjs +448 -0
- package/spexharness/src/chat/tui/palette.mjs +22 -0
- package/spexharness/src/chat/tui/select.mjs +208 -0
- package/spexharness/src/config-root.mjs +54 -0
- package/spexharness/src/context-budget.mjs +141 -0
- package/spexharness/src/dev-server-control.mjs +389 -0
- package/spexharness/src/doctrine/behaviour.mjs +371 -0
- package/spexharness/src/doctrine/corpus.mjs +733 -0
- package/spexharness/src/doctrine/inject.mjs +338 -0
- package/spexharness/src/doctrine/merge.mjs +184 -0
- package/spexharness/src/doctrine/sources.mjs +252 -0
- package/spexharness/src/doctrine/synthesize.mjs +401 -0
- package/spexharness/src/doctrine/vault-source.mjs +574 -0
- package/spexharness/src/doctrine/writer.mjs +176 -0
- package/spexharness/src/events.mjs +84 -0
- package/spexharness/src/gates/capture-workflow-gate.mjs +202 -0
- package/spexharness/src/gates/claim-before-code-gate.decide.mjs +33 -0
- package/spexharness/src/gates/claim-before-code-gate.mjs +129 -0
- package/spexharness/src/gates/deep-research-cost-gate.mjs +274 -0
- package/spexharness/src/gates/enforce-session-sequence.mjs +895 -0
- package/spexharness/src/gates/enforce-vault-naming.mjs +215 -0
- package/spexharness/src/gates/epic-milestone-phrasing-gate.mjs +233 -0
- package/spexharness/src/gates/git-identity-guard.decide.mjs +436 -0
- package/spexharness/src/gates/git-identity-guard.mjs +61 -0
- package/spexharness/src/gates/git-reflog-audit.mjs +151 -0
- package/spexharness/src/gates/git-stash-gate.decide.mjs +361 -0
- package/spexharness/src/gates/git-stash-gate.mjs +159 -0
- package/spexharness/src/gates/id-display-format-gate.mjs +190 -0
- package/spexharness/src/gates/inject-doctrine-gate.mjs +89 -0
- package/spexharness/src/gates/inject-vault-context.mjs +239 -0
- package/spexharness/src/gates/naughty-list-gate.mjs +213 -0
- package/spexharness/src/gates/plan-review-gate.mjs +233 -0
- package/spexharness/src/gates/preflight-reminder-gate.mjs +265 -0
- package/spexharness/src/gates/research-protocol-gate.mjs +175 -0
- package/spexharness/src/gates/settings-write-gate.decide.mjs +96 -0
- package/spexharness/src/gates/settings-write-gate.mjs +104 -0
- package/spexharness/src/git-reflog-audit.mjs +294 -0
- package/spexharness/src/intent-classifier.mjs +194 -0
- package/spexharness/src/intent-directive.mjs +541 -0
- package/spexharness/src/profile/learn.mjs +551 -0
- package/spexharness/src/profile/proposals.mjs +357 -0
- package/spexharness/src/profile/vault-inclusion.mjs +386 -0
- package/spexharness/src/redact.mjs +151 -0
- package/spexharness/src/rule-table.mjs +819 -0
- package/spexharness/src/seat-context.mjs +122 -0
- package/spexharness/src/session-bootstrap.mjs +512 -0
- package/spexharness/src/session-record.mjs +815 -0
- package/spexharness/src/token-inventory.mjs +207 -0
- package/vendor/heyspex-mcp/account-switch.mjs +95 -0
- package/vendor/heyspex-mcp/alignment-gate.mjs +315 -1
- package/vendor/heyspex-mcp/blocker-resolver.mjs +37 -2
- package/vendor/heyspex-mcp/breakdown-ladder.mjs +119 -4
- package/vendor/heyspex-mcp/breakdown-source.mjs +271 -0
- package/vendor/heyspex-mcp/breakdown-writer.mjs +23 -3
- package/vendor/heyspex-mcp/capture-buffer-patches.mjs +46 -5
- package/vendor/heyspex-mcp/capture-channel.mjs +55 -5
- package/vendor/heyspex-mcp/capture-console-client.mjs +80 -1
- package/vendor/heyspex-mcp/capture-focus.mjs +1035 -29
- package/vendor/heyspex-mcp/capture-outbox.mjs +5 -1
- package/vendor/heyspex-mcp/capture-tools.mjs +1219 -0
- package/vendor/heyspex-mcp/claim-tools.mjs +1124 -0
- package/vendor/heyspex-mcp/cli-verbs.mjs +2076 -0
- package/vendor/heyspex-mcp/cli.mjs +201 -15524
- package/vendor/heyspex-mcp/cloud-tool-surface.mjs +128 -0
- package/vendor/heyspex-mcp/cloud-vault-writes.mjs +412 -0
- package/vendor/heyspex-mcp/config-seed.yaml +15 -0
- package/vendor/heyspex-mcp/config-settings.mjs +290 -7
- package/vendor/heyspex-mcp/console-fetch.mjs +657 -16
- package/vendor/heyspex-mcp/console-transport.mjs +166 -0
- package/vendor/heyspex-mcp/credentials.mjs +584 -0
- package/vendor/heyspex-mcp/defer-spec.mjs +44 -4
- package/vendor/heyspex-mcp/deferred-reclaim.mjs +29 -3
- package/vendor/heyspex-mcp/design-handlers.mjs +31 -0
- package/vendor/heyspex-mcp/design-tools.mjs +4 -1
- package/vendor/heyspex-mcp/dev-factory-bridge.mjs +4 -4
- package/vendor/heyspex-mcp/dev-mode-core.mjs +45 -0
- package/vendor/heyspex-mcp/dev-tools.mjs +124 -0
- package/vendor/heyspex-mcp/diagnose-handlers.mjs +54 -0
- package/vendor/heyspex-mcp/events-tools.mjs +207 -0
- package/vendor/heyspex-mcp/filing-tools.mjs +688 -0
- package/vendor/heyspex-mcp/fleet-handlers.mjs +37 -0
- package/vendor/heyspex-mcp/fleet-queue-tools.mjs +69 -14
- package/vendor/heyspex-mcp/focus-tools.mjs +190 -0
- package/vendor/heyspex-mcp/folder-trust-store.mjs +59 -0
- package/vendor/heyspex-mcp/http-transport.mjs +300 -0
- package/vendor/heyspex-mcp/list-tools.mjs +257 -0
- package/vendor/heyspex-mcp/login-handoff.mjs +15 -1
- package/vendor/heyspex-mcp/mcp-config.mjs +94 -0
- package/vendor/heyspex-mcp/memory-tools.mjs +523 -0
- package/vendor/heyspex-mcp/mvp-mode.mjs +53 -6
- package/vendor/heyspex-mcp/occupied-keys.mjs +141 -0
- package/vendor/heyspex-mcp/on-deck-brief.mjs +3360 -0
- package/vendor/heyspex-mcp/on-deck-scheduler.mjs +1708 -0
- package/vendor/heyspex-mcp/package-root.mjs +32 -0
- package/vendor/heyspex-mcp/peer-presence.mjs +8 -1
- package/vendor/heyspex-mcp/plan-ground.mjs +621 -652
- package/vendor/heyspex-mcp/plan-push.mjs +906 -21
- package/vendor/heyspex-mcp/plan-review.mjs +124 -30
- package/vendor/heyspex-mcp/preflight-gate.mjs +0 -0
- package/vendor/heyspex-mcp/procedure-handlers.mjs +325 -0
- package/vendor/heyspex-mcp/procedure-tools.mjs +540 -351
- package/vendor/heyspex-mcp/promote-capture.mjs +386 -69
- package/vendor/heyspex-mcp/promote-diagnose.mjs +74 -0
- package/vendor/heyspex-mcp/promote-research-to-diagnose.mjs +9 -2
- package/vendor/heyspex-mcp/promote-research.mjs +660 -53
- package/vendor/heyspex-mcp/promotion-helpers.mjs +251 -0
- package/vendor/heyspex-mcp/prompts.mjs +1460 -0
- package/vendor/heyspex-mcp/read-path.mjs +29 -9
- package/vendor/heyspex-mcp/receipt-shape.mjs +146 -0
- package/vendor/heyspex-mcp/recipe-handlers.mjs +117 -0
- package/vendor/heyspex-mcp/regen-tasks.mjs +210 -3
- package/vendor/heyspex-mcp/register-spec.mjs +266 -54
- package/vendor/heyspex-mcp/request-context.mjs +59 -0
- package/vendor/heyspex-mcp/research-focus.mjs +207 -4
- package/vendor/heyspex-mcp/research-handlers.mjs +623 -0
- package/vendor/heyspex-mcp/research-tools.mjs +4 -4
- package/vendor/heyspex-mcp/response-budget.mjs +348 -0
- package/vendor/heyspex-mcp/review-focus.mjs +25 -1
- package/vendor/heyspex-mcp/search-specs.mjs +280 -0
- package/vendor/heyspex-mcp/seat-block-ledger.mjs +113 -0
- package/vendor/heyspex-mcp/seat-identity.mjs +2 -6
- package/vendor/heyspex-mcp/session-owner.mjs +108 -0
- package/vendor/heyspex-mcp/session-tools.mjs +152 -0
- package/vendor/heyspex-mcp/settings-registry.mjs +232 -0
- package/vendor/heyspex-mcp/settings-tools.mjs +85 -12
- package/vendor/heyspex-mcp/spec-edit-tools.mjs +446 -0
- package/vendor/heyspex-mcp/spec-id-lib.mjs +93 -17
- package/vendor/heyspex-mcp/split-research.mjs +301 -56
- package/vendor/heyspex-mcp/stdio-rpc.mjs +22 -0
- package/vendor/heyspex-mcp/submit-for-review.mjs +132 -6
- package/vendor/heyspex-mcp/summary-contract.mjs +105 -0
- package/vendor/heyspex-mcp/summary-write-tools.mjs +224 -0
- package/vendor/heyspex-mcp/symptom-query.mjs +146 -0
- package/vendor/heyspex-mcp/test-helpers.mjs +108 -1
- package/vendor/heyspex-mcp/tool-catalog.mjs +2813 -0
- package/vendor/heyspex-mcp/tool-dispatch.mjs +639 -0
- package/vendor/heyspex-mcp/tool-helpers.mjs +325 -0
- package/vendor/heyspex-mcp/validate-linkage.mjs +414 -27
- package/vendor/heyspex-mcp/vault-io.mjs +724 -0
- package/vendor/heyspex-mcp/vault-less-endpoints.mjs +52 -0
- package/vendor/heyspex-mcp/vault-resolve.mjs +366 -68
- package/vendor/heyspex-mcp/verify-reproduction.mjs +270 -30
- package/vendor/heyspex-mcp/whoami.mjs +91 -0
package/package.json
CHANGED
|
@@ -1,124 +1,231 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "heyspex",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "HeySpex CLI + MCP server — connect Claude Code, Cursor, and any MCP client to your HeySpex spec vault",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"heyspex",
|
|
7
|
-
"mcp",
|
|
8
|
-
"model-context-protocol",
|
|
9
|
-
"claude-code",
|
|
10
|
-
"cursor",
|
|
11
|
-
"spec-driven-development",
|
|
12
|
-
"agents"
|
|
13
|
-
],
|
|
14
|
-
"type": "module",
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/pwhermanson/workflow-protocol.git"
|
|
19
|
-
},
|
|
20
|
-
"engines": {
|
|
21
|
-
"node": ">=20.0.0 <25.0.0"
|
|
22
|
-
},
|
|
23
|
-
"workspaces": [
|
|
24
|
-
"spex-console",
|
|
25
|
-
"pm-control-center",
|
|
26
|
-
"companion/extension"
|
|
27
|
-
],
|
|
28
|
-
"bin": {
|
|
29
|
-
"hs": "bin/hs.mjs",
|
|
30
|
-
"heyspex": "bin/hs.mjs",
|
|
31
|
-
"heyspex-mcp": "vendor/heyspex-mcp/cli.mjs"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"./
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"bin/
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"scripts/
|
|
45
|
-
"scripts/
|
|
46
|
-
"scripts/lib
|
|
47
|
-
"scripts/lib/
|
|
48
|
-
"scripts/
|
|
49
|
-
"scripts/lib/
|
|
50
|
-
"
|
|
51
|
-
"scripts/lib/
|
|
52
|
-
"dev-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "heyspex",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "HeySpex CLI + MCP server — connect Claude Code, Cursor, and any MCP client to your HeySpex spec vault",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"heyspex",
|
|
7
|
+
"mcp",
|
|
8
|
+
"model-context-protocol",
|
|
9
|
+
"claude-code",
|
|
10
|
+
"cursor",
|
|
11
|
+
"spec-driven-development",
|
|
12
|
+
"agents"
|
|
13
|
+
],
|
|
14
|
+
"type": "module",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/pwhermanson/workflow-protocol.git"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20.0.0 <25.0.0"
|
|
22
|
+
},
|
|
23
|
+
"workspaces": [
|
|
24
|
+
"spex-console",
|
|
25
|
+
"pm-control-center",
|
|
26
|
+
"companion/extension"
|
|
27
|
+
],
|
|
28
|
+
"bin": {
|
|
29
|
+
"hs": "bin/hs.mjs",
|
|
30
|
+
"heyspex": "bin/hs.mjs",
|
|
31
|
+
"heyspex-mcp": "vendor/heyspex-mcp/cli.mjs",
|
|
32
|
+
"spexcode": "bin/spexcode.mjs"
|
|
33
|
+
},
|
|
34
|
+
"exports": {
|
|
35
|
+
"./package.json": "./package.json",
|
|
36
|
+
"./console-url-resolver": "./scripts/lib/console-url-resolver.mjs"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"bin/hs.mjs",
|
|
40
|
+
"bin/postinstall.mjs",
|
|
41
|
+
"vendor/heyspex-mcp/**/*.mjs",
|
|
42
|
+
"!vendor/heyspex-mcp/**/*.test.mjs",
|
|
43
|
+
"vendor/heyspex-mcp/config-seed.yaml",
|
|
44
|
+
"scripts/check-mcp-freshness.mjs",
|
|
45
|
+
"scripts/gateway-skills-lib.mjs",
|
|
46
|
+
"scripts/vault-id-lib.mjs",
|
|
47
|
+
"scripts/lib/console-url-resolver.mjs",
|
|
48
|
+
"scripts/lib/hs-link.mjs",
|
|
49
|
+
"scripts/lib/dev-mode.mjs",
|
|
50
|
+
"scripts/lib/hs-command.mjs",
|
|
51
|
+
"scripts/lib/shared-path-helpers.mjs",
|
|
52
|
+
"scripts/dev-server-status.mjs",
|
|
53
|
+
"scripts/lib/hs-source-*.mjs",
|
|
54
|
+
"scripts/lib/agent-env-markers.mjs",
|
|
55
|
+
"!scripts/lib/hs-source-*.test.mjs",
|
|
56
|
+
"scripts/lib/standalone-doctor.mjs",
|
|
57
|
+
"dev-factory/lib/fleet-readiness.mjs",
|
|
58
|
+
"dev-factory/lib/fleet-state.mjs",
|
|
59
|
+
"dev-factory/lib/code-repo-root.mjs",
|
|
60
|
+
"dev-factory/lib/sufficiency-score.mjs",
|
|
61
|
+
"dev-factory/lib/model-catalog.mjs",
|
|
62
|
+
"dev-factory/model-catalog.json",
|
|
63
|
+
"docs/mcp-client-config.md",
|
|
64
|
+
"dist/cli/*.mjs",
|
|
65
|
+
"dist/cli-templates/**",
|
|
66
|
+
"LICENSE",
|
|
67
|
+
"scripts/install-claude-code-hooks.mjs",
|
|
68
|
+
"scripts/install-cursor-hooks.mjs",
|
|
69
|
+
"scripts/lib/customer-kit.mjs",
|
|
70
|
+
"scripts/lib/template-pin.mjs",
|
|
71
|
+
"scripts/cursor-hooks/manifest.mjs",
|
|
72
|
+
"scripts/dev-server-stop.mjs",
|
|
73
|
+
"scripts/wip-ledger-health.mjs",
|
|
74
|
+
"scripts/hs-worktree.mjs",
|
|
75
|
+
"scripts/lib/hs-worktree-args.mjs",
|
|
76
|
+
"dev-factory/lib/worktree-allocator.mjs",
|
|
77
|
+
"dev-factory/engine/worktree.mjs",
|
|
78
|
+
"scripts/hs-view.mjs",
|
|
79
|
+
"scripts/hs-capture-cli.mjs",
|
|
80
|
+
"scripts/lib/heyspex-home.mjs",
|
|
81
|
+
"scripts/hs-companion.mjs",
|
|
82
|
+
"scripts/lib/hs-companion-settings.mjs",
|
|
83
|
+
"scripts/hs-next.mjs",
|
|
84
|
+
"scripts/hs-mode.mjs",
|
|
85
|
+
"scripts/heyspex-mode.mjs",
|
|
86
|
+
"scripts/hs-gateway.mjs",
|
|
87
|
+
"scripts/hs-settings.mjs",
|
|
88
|
+
"scripts/hs-classifier.mjs",
|
|
89
|
+
"scripts/hs-auto.mjs",
|
|
90
|
+
"scripts/hs-auto-resolve.mjs",
|
|
91
|
+
"scripts/hs-auto-source.mjs",
|
|
92
|
+
"dev-factory/lib/spec-io.mjs",
|
|
93
|
+
"dev-factory/lib/epic-detect.mjs",
|
|
94
|
+
"plugins/heyspex/bin/launch-mcp.mjs",
|
|
95
|
+
"plugins/heyspex/bin/run-hook.mjs",
|
|
96
|
+
"plugins/heyspex/.claude-plugin/plugin.json",
|
|
97
|
+
"plugins/heyspex/.mcp.json",
|
|
98
|
+
"plugins/heyspex/.cursor-plugin/plugin.json",
|
|
99
|
+
"plugins/heyspex/mcp.json",
|
|
100
|
+
"plugins/heyspex/hooks/*.json",
|
|
101
|
+
"scripts/claude-hooks/*.mjs",
|
|
102
|
+
"!scripts/claude-hooks/*.test.mjs",
|
|
103
|
+
"!scripts/claude-hooks/*.smoke.mjs",
|
|
104
|
+
"!scripts/claude-hooks/*.fixtures.mjs",
|
|
105
|
+
"!scripts/claude-hooks/*.measure.mjs",
|
|
106
|
+
"scripts/stamp-provenance-on-edit.mjs",
|
|
107
|
+
"scripts/provenance-lib.mjs",
|
|
108
|
+
"scripts/lib/subagent-git-lock.mjs",
|
|
109
|
+
"dev-factory/lib/seat-context.mjs",
|
|
110
|
+
"dev-factory/lib/context-budget.mjs",
|
|
111
|
+
"dev-factory/lib/fleet-queue.mjs",
|
|
112
|
+
"dev-factory/lib/fleet-queue-file.mjs",
|
|
113
|
+
"spexharness/src/adapters/*.mjs",
|
|
114
|
+
"spexharness/src/gates/capture-workflow-gate.mjs",
|
|
115
|
+
"spexharness/src/gates/claim-before-code-gate.decide.mjs",
|
|
116
|
+
"spexharness/src/gates/claim-before-code-gate.mjs",
|
|
117
|
+
"spexharness/src/gates/deep-research-cost-gate.mjs",
|
|
118
|
+
"spexharness/src/gates/enforce-session-sequence.mjs",
|
|
119
|
+
"spexharness/src/gates/enforce-vault-naming.mjs",
|
|
120
|
+
"spexharness/src/gates/epic-milestone-phrasing-gate.mjs",
|
|
121
|
+
"spexharness/src/gates/git-identity-guard.decide.mjs",
|
|
122
|
+
"spexharness/src/gates/git-identity-guard.mjs",
|
|
123
|
+
"spexharness/src/gates/git-reflog-audit.mjs",
|
|
124
|
+
"spexharness/src/gates/git-stash-gate.decide.mjs",
|
|
125
|
+
"spexharness/src/gates/git-stash-gate.mjs",
|
|
126
|
+
"spexharness/src/gates/id-display-format-gate.mjs",
|
|
127
|
+
"spexharness/src/gates/inject-doctrine-gate.mjs",
|
|
128
|
+
"spexharness/src/gates/inject-vault-context.mjs",
|
|
129
|
+
"spexharness/src/gates/naughty-list-gate.mjs",
|
|
130
|
+
"spexharness/src/gates/plan-review-gate.mjs",
|
|
131
|
+
"spexharness/src/gates/preflight-reminder-gate.mjs",
|
|
132
|
+
"spexharness/src/gates/research-protocol-gate.mjs",
|
|
133
|
+
"spexharness/src/gates/settings-write-gate.decide.mjs",
|
|
134
|
+
"spexharness/src/gates/settings-write-gate.mjs",
|
|
135
|
+
"spexharness/src/profile/*.mjs",
|
|
136
|
+
"spexharness/src/doctrine/*.mjs",
|
|
137
|
+
"spexharness/doctrine/baseline/SPEXCODE-DOCTRINE.baseline.json",
|
|
138
|
+
"spexharness/src/chat/tui/ansi.mjs",
|
|
139
|
+
"spexharness/src/chat/tui/palette.mjs",
|
|
140
|
+
"spexharness/src/chat/tui/select.mjs",
|
|
141
|
+
"spexharness/src/config-root.mjs",
|
|
142
|
+
"spexharness/src/context-budget.mjs",
|
|
143
|
+
"spexharness/src/dev-server-control.mjs",
|
|
144
|
+
"spexharness/src/events.mjs",
|
|
145
|
+
"spexharness/src/git-reflog-audit.mjs",
|
|
146
|
+
"spexharness/src/intent-classifier.mjs",
|
|
147
|
+
"spexharness/src/intent-directive.mjs",
|
|
148
|
+
"spexharness/src/redact.mjs",
|
|
149
|
+
"spexharness/src/rule-table.mjs",
|
|
150
|
+
"spexharness/src/seat-context.mjs",
|
|
151
|
+
"spexharness/src/session-bootstrap.mjs",
|
|
152
|
+
"spexharness/src/session-record.mjs",
|
|
153
|
+
"spexharness/src/token-inventory.mjs",
|
|
154
|
+
"!spexharness/**/*.test.mjs"
|
|
155
|
+
],
|
|
156
|
+
"dependencies": {
|
|
157
|
+
"js-yaml": ">=3.13.0 <5.0.0"
|
|
158
|
+
},
|
|
159
|
+
"devDependencies": {
|
|
160
|
+
"esbuild": "^0.24.2"
|
|
161
|
+
},
|
|
162
|
+
"scripts": {
|
|
163
|
+
"prepack": "node scripts/build-cli-bundle.mjs && node scripts/prepack-closure-gate.mjs",
|
|
164
|
+
"build:cli": "node scripts/build-cli-bundle.mjs",
|
|
165
|
+
"postinstall": "node bin/postinstall.mjs",
|
|
166
|
+
"setup": "node scripts/heyspex-doctor.mjs --fix",
|
|
167
|
+
"doctor": "node scripts/heyspex-doctor.mjs",
|
|
168
|
+
"heyspex:on": "node scripts/hs-mode.mjs on",
|
|
169
|
+
"heyspex:off": "node scripts/hs-mode.mjs off",
|
|
170
|
+
"heyspex:status": "node scripts/hs-mode.mjs status",
|
|
171
|
+
"commandcode:install": "node scripts/install-commandcode.mjs",
|
|
172
|
+
"commandcode:check": "node scripts/install-commandcode.mjs --check",
|
|
173
|
+
"commandcode:uninstall": "node scripts/install-commandcode.mjs --uninstall",
|
|
174
|
+
"seats:sync": "node scripts/sync-seat-context.mjs",
|
|
175
|
+
"seats:check": "node scripts/sync-seat-context.mjs --check",
|
|
176
|
+
"skills:sync": "node scripts/sync-skills.mjs",
|
|
177
|
+
"skills:check": "node scripts/sync-skills.mjs --check",
|
|
178
|
+
"pm:dashboard": "node bin/cli.mjs dashboard",
|
|
179
|
+
"pm:control-center": "node bin/cli.mjs control-center",
|
|
180
|
+
"pm:parallel-check": "node bin/cli.mjs parallel-check",
|
|
181
|
+
"validate:vault-ids": "node scripts/validate-vault-ids.mjs --require-family",
|
|
182
|
+
"validate:vault-naming": "node scripts/validate-vault-naming.mjs",
|
|
183
|
+
"validate:vault-blockers": "node scripts/validate-vault-blockers.mjs",
|
|
184
|
+
"validate:vault-frontmatter": "node scripts/validate-vault-frontmatter.mjs",
|
|
185
|
+
"validate:vault-encoding": "node scripts/fix-mojibake.mjs --check",
|
|
186
|
+
"fix:vault-encoding": "node scripts/fix-mojibake.mjs --apply",
|
|
187
|
+
"validate:review-backlinks": "node scripts/validate-review-backlinks.mjs",
|
|
188
|
+
"build:procedure-catalog": "node scripts/build-procedure-catalog.mjs",
|
|
189
|
+
"validate:procedure-catalog": "node scripts/build-procedure-catalog.mjs --check",
|
|
190
|
+
"build:guardrails": "node scripts/build-guardrails.mjs",
|
|
191
|
+
"validate:guardrails": "node scripts/build-guardrails.mjs --check",
|
|
192
|
+
"compile:agents": "node scripts/compile-agents.mjs",
|
|
193
|
+
"validate:agents": "node scripts/compile-agents.mjs --check",
|
|
194
|
+
"build:vault-index": "node scripts/build-vault-index.mjs",
|
|
195
|
+
"validate:vault-index": "node scripts/build-vault-index.mjs --check",
|
|
196
|
+
"check:retired-names": "node scripts/check-retired-names.mjs",
|
|
197
|
+
"check:model-ids": "node scripts/check-model-ids.mjs",
|
|
198
|
+
"check:shared-helpers": "node scripts/check-shared-helpers.mjs",
|
|
199
|
+
"check:no-process-exit": "node scripts/check-no-process-exit.mjs",
|
|
200
|
+
"check:epic-milestone-phrasing": "node scripts/check-epic-milestone-phrasing.mjs",
|
|
201
|
+
"smoke:cli-help": "node scripts/smoke-cli-help.mjs",
|
|
202
|
+
"commit": "node scripts/human-commit.mjs",
|
|
203
|
+
"commit:owner": "node scripts/owner-commit.mjs",
|
|
204
|
+
"hooks:install": "node scripts/install-git-hooks.mjs",
|
|
205
|
+
"hooks:install-claude": "node scripts/install-claude-code-hooks.mjs",
|
|
206
|
+
"hooks:check-claude": "node scripts/install-claude-code-hooks.mjs --check",
|
|
207
|
+
"hooks:install-cursor": "node scripts/install-cursor-hooks.mjs",
|
|
208
|
+
"hooks:check-cursor": "node scripts/install-cursor-hooks.mjs --check",
|
|
209
|
+
"hooks:smoke-cursor": "node scripts/cursor-hooks/_run.smoke.mjs",
|
|
210
|
+
"companion": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action start",
|
|
211
|
+
"companion:stop": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action stop",
|
|
212
|
+
"companion:status": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action status",
|
|
213
|
+
"spexcompanion": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action start",
|
|
214
|
+
"spexcompanion:stop": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action stop",
|
|
215
|
+
"spexcompanion:status": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action status",
|
|
216
|
+
"console": "npm run dev -w spex-console",
|
|
217
|
+
"console:log": "pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/run-console-devlog.ps1",
|
|
218
|
+
"console:log:lan": "pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/run-console-devlog.ps1 -Lan",
|
|
219
|
+
"console:stop": "node scripts/dev-server-stop.mjs",
|
|
220
|
+
"console:status": "node scripts/dev-server-status.mjs",
|
|
221
|
+
"//test": "`npm test` is an ALIAS for `test:all` (scripts/run-all-tests.mjs) - the repo-health sweep over all four suites. It is deliberately NOT wired into CI or any git/Claude hook: .github/workflows/ci.yml runs `npm test --workspace spex-console`, which is a different script and is unaffected.",
|
|
222
|
+
"test": "npm run test:all",
|
|
223
|
+
"test:all": "node scripts/run-all-tests.mjs",
|
|
224
|
+
"test:mcp": "node --test vendor/heyspex-mcp/*.test.mjs scripts/lib/*.test.mjs dev-factory/lib/*.test.mjs",
|
|
225
|
+
"test:harness": "node --test spexharness/**/*.test.mjs",
|
|
226
|
+
"verify:package": "node scripts/verify-mcp-package.mjs",
|
|
227
|
+
"verify:onboarding": "node scripts/verify-onboarding-scenario.mjs --fake",
|
|
228
|
+
"sweep": "node scripts/sweep.mjs"
|
|
229
|
+
},
|
|
230
|
+
"//files": "PUBLISHED SURFACE - every entry is verified by `node scripts/verify-mcp-package.mjs`. It must cover the STATIC import closure of vendor/heyspex-mcp/cli.mjs, plus (since [[HS-LGG2-WW9R-TASK-ship-the-hook-runtime-in-the-npm]]) the customer hook kit: scripts/claude-hooks/_run.mjs, every HOOK_SCOPES customer hook (scripts/lib/customer-kit.mjs) and their static closure under spexharness/src, dev-factory/lib and scripts/ - the hookTargets check names any file that falls out - plus the run-time data files in customer-kit.mjs CUSTOMER_HOOK_DATA (only the baseline edition of SpexCode Doctrine, never the learned spexharness/doctrine/SPEXCODE-DOCTRINE.json; [[HS-A2PO-WW9R-TASK-owner-ruling-does-inject-doctrine-ship]]) - and nothing else. SpexFleet internals (dev-factory/router.mjs, cloud-clients.mjs, cost-tracker.mjs, spexcrawl/) are deliberately absent - research-tools.mjs reaches them through the lazy dev-factory-bridge.mjs. Do not add a path here without re-running the verifier; npm publish is a one-way door ([[HS-ZJSP-0JNK-TASK-ship-the-heyspex-mcp-server-as-an]] / [[HS-8DET-0JNK-TASK-confirm-the-open-core-boundary-and]]). `dist/cli/*.mjs` + `dist/cli-templates/**` are a SEPARATE published surface (`hs-init`, `hs-install`, `hs-claim`, `hs-check`, `hs-env`, `hs-connect`, `hs-join`, `hs-vault`, `hs-workspace`, `hs-defer`, `hs-vault-pull`, `hs-dev`, `hs-index-rebuild`, `hs-index-reconcile` bundled by `scripts/build-cli-bundle.mjs`'s `ENTRIES` array, regenerated fresh every `prepack` - `dist/` itself stays git-ignored) - see that script's doc comment for the entry scope decision and [[HS-JOQX-0JNK-TASK-published-package-runs-hs-init-and-hs]]."
|
|
231
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "heyspex",
|
|
3
|
+
"displayName": "SpexCode plugin (for Claude Code)",
|
|
4
|
+
"description": "HeySpex vault integration for Claude Code: MCP server (spec vault tools + hs-* prompts) and lifecycle hooks. Prototype packaging per HS-QTBK — additive; the project-level .mcp.json/settings.json wiring remains the live source of truth until cutover.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "pwher",
|
|
7
|
+
"email": "paul@monstergrowth.com"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/pwher/workflow-protocol",
|
|
10
|
+
"license": "UNLICENSED",
|
|
11
|
+
"keywords": ["heyspex", "spec-vault", "mcp", "hooks"]
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "heyspex",
|
|
3
|
+
"displayName": "SpexCode plugin (for Claude Code)",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "HeySpex vault integration for Cursor: MCP server (spec vault tools + hs-* workflows) and the full lifecycle hook set. Prototype packaging — additive; the project-level .cursor/mcp.json and .cursor/hooks.json wiring remains the live source of truth until cutover.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "pwher",
|
|
8
|
+
"email": "paul@monstergrowth.com"
|
|
9
|
+
},
|
|
10
|
+
"repository": "https://github.com/pwher/workflow-protocol",
|
|
11
|
+
"license": "UNLICENSED",
|
|
12
|
+
"keywords": ["heyspex", "spec-vault", "mcp", "hooks"],
|
|
13
|
+
"mcp": "mcp.json",
|
|
14
|
+
"hooks": "hooks/cursor-hooks.json"
|
|
15
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// HeySpex plugin MCP launcher (post-repo-split — HS-S1BX; prototype stage: HS-QTBK).
|
|
3
|
+
//
|
|
4
|
+
// The heyspex MCP server (vendor/heyspex-mcp/cli.mjs) reaches a customer machine
|
|
5
|
+
// two ways: bundled inside the `heyspex` npm package (node_modules/heyspex/
|
|
6
|
+
// vendor/heyspex-mcp/cli.mjs, once `npm install heyspex` has run), or via a
|
|
7
|
+
// source checkout of the heyspex-app repo. This shim locates whichever is
|
|
8
|
+
// reachable and hands off in-process, failing with an actionable message
|
|
9
|
+
// instead of a silent MCP connection error.
|
|
10
|
+
//
|
|
11
|
+
// Resolution order:
|
|
12
|
+
// 1. HEYSPEX_MCP_ENTRY — explicit override (absolute path to cli.mjs)
|
|
13
|
+
// 2. node_modules/heyspex/vendor/heyspex-mcp/cli.mjs — found by walking up
|
|
14
|
+
// from THIS launcher's own location for the containing node_modules/heyspex
|
|
15
|
+
// install. Package-first is correct for the plugin use case: plugins run
|
|
16
|
+
// on customer machines, where a plain `npm install heyspex` is the one
|
|
17
|
+
// artifact that's always there — a source checkout of heyspex-app is not a
|
|
18
|
+
// safe assumption. When this launcher itself ships inside that install
|
|
19
|
+
// (node_modules/heyspex/plugins/heyspex/bin/launch-mcp.mjs), the walk finds
|
|
20
|
+
// the package root in a single hop; if the launcher is running from
|
|
21
|
+
// somewhere else (a source checkout, a plugin cache outside node_modules),
|
|
22
|
+
// the walk finds nothing and this candidate is skipped.
|
|
23
|
+
// 3. $CLAUDE_PROJECT_DIR/vendor/heyspex-mcp/cli.mjs (source checkout)
|
|
24
|
+
// 4. $CURSOR_PROJECT_DIR/vendor/heyspex-mcp/cli.mjs (Cursor sets both, but
|
|
25
|
+
// only CLAUDE_PROJECT_DIR as a compatibility alias — do not rely on it)
|
|
26
|
+
// 5. $HEYSPEX_VAULT_ROOT/vendor/heyspex-mcp/cli.mjs (source checkout)
|
|
27
|
+
// 6. <cwd>/vendor/heyspex-mcp/cli.mjs (source checkout)
|
|
28
|
+
|
|
29
|
+
import { existsSync } from "node:fs";
|
|
30
|
+
import { dirname, resolve, sep } from "node:path";
|
|
31
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Walk up from `fromFile` looking for the `node_modules/heyspex` directory that
|
|
35
|
+
* contains it, and return the vendor/heyspex-mcp/cli.mjs path under that package
|
|
36
|
+
* root — or null if this file isn't nested inside such an install.
|
|
37
|
+
*/
|
|
38
|
+
function findPackagedEntry(fromFile) {
|
|
39
|
+
let dir = dirname(fromFile);
|
|
40
|
+
for (;;) {
|
|
41
|
+
const parent = dirname(dir);
|
|
42
|
+
if (parent === dir) return null; // reached the filesystem root
|
|
43
|
+
const base = dir.split(sep).pop();
|
|
44
|
+
const parentBase = parent.split(sep).pop();
|
|
45
|
+
if (base === "heyspex" && parentBase === "node_modules") {
|
|
46
|
+
return resolve(dir, "vendor/heyspex-mcp/cli.mjs");
|
|
47
|
+
}
|
|
48
|
+
dir = parent;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const packagedEntry = findPackagedEntry(fileURLToPath(import.meta.url));
|
|
53
|
+
|
|
54
|
+
const candidates = [
|
|
55
|
+
process.env.HEYSPEX_MCP_ENTRY,
|
|
56
|
+
packagedEntry,
|
|
57
|
+
process.env.CLAUDE_PROJECT_DIR &&
|
|
58
|
+
resolve(process.env.CLAUDE_PROJECT_DIR, "vendor/heyspex-mcp/cli.mjs"),
|
|
59
|
+
process.env.CURSOR_PROJECT_DIR &&
|
|
60
|
+
resolve(process.env.CURSOR_PROJECT_DIR, "vendor/heyspex-mcp/cli.mjs"),
|
|
61
|
+
process.env.HEYSPEX_VAULT_ROOT &&
|
|
62
|
+
resolve(process.env.HEYSPEX_VAULT_ROOT, "vendor/heyspex-mcp/cli.mjs"),
|
|
63
|
+
resolve(process.cwd(), "vendor/heyspex-mcp/cli.mjs"),
|
|
64
|
+
].filter(Boolean);
|
|
65
|
+
|
|
66
|
+
const entry = candidates.find((p) => existsSync(p));
|
|
67
|
+
|
|
68
|
+
if (!entry) {
|
|
69
|
+
console.error(
|
|
70
|
+
[
|
|
71
|
+
"[heyspex plugin] Could not locate the HeySpex MCP server (vendor/heyspex-mcp/cli.mjs).",
|
|
72
|
+
"Searched:",
|
|
73
|
+
...candidates.map((p) => ` - ${p}`),
|
|
74
|
+
"",
|
|
75
|
+
"Fixes:",
|
|
76
|
+
" - Run `npm install heyspex` in this project, then restart — the plugin",
|
|
77
|
+
" boots the server from node_modules/heyspex.",
|
|
78
|
+
" - Or point this at a source checkout of the heyspex-app repo, e.g. by",
|
|
79
|
+
" setting CLAUDE_PROJECT_DIR or HEYSPEX_VAULT_ROOT to its path.",
|
|
80
|
+
" - Or set HEYSPEX_MCP_ENTRY to the absolute path of cli.mjs directly.",
|
|
81
|
+
].join("\n"),
|
|
82
|
+
);
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// The guessed "grandparent of vendor/heyspex-mcp" vault root only makes sense
|
|
87
|
+
// for a source checkout, where that directory IS the vault. For the packaged
|
|
88
|
+
// entry it resolves to node_modules/heyspex, which is never the customer's
|
|
89
|
+
// vault — leave HEYSPEX_VAULT_ROOT alone in that case and let the server's own
|
|
90
|
+
// multi-tier vault resolver (vault-resolve.mjs) find the real one.
|
|
91
|
+
if (!process.env.HEYSPEX_VAULT_ROOT && entry !== packagedEntry) {
|
|
92
|
+
process.env.HEYSPEX_VAULT_ROOT = resolve(entry, "../../..");
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
await import(pathToFileURL(entry).href);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// HeySpex plugin hook launcher — the hooks.json counterpart of launch-mcp.mjs.
|
|
3
|
+
//
|
|
4
|
+
// Every command in ../hooks/hooks.json is
|
|
5
|
+
// node "${CLAUDE_PLUGIN_ROOT}/bin/run-hook.mjs" <hook> [args]
|
|
6
|
+
// The hook bodies and their shim (scripts/claude-hooks/_run.mjs) live in the
|
|
7
|
+
// HeySpex PLATFORM checkout, not in the plugin cache and not in the customer
|
|
8
|
+
// repo — so `$CLAUDE_PROJECT_DIR/scripts/...` (the old form) only ever
|
|
9
|
+
// resolved inside heyspex-app and failed with MODULE_NOT_FOUND everywhere else
|
|
10
|
+
// (non-blocking, so every gate was silently off). This launcher finds the
|
|
11
|
+
// platform and hands off in-process, so the shim still owns stdin and the exit
|
|
12
|
+
// code, exactly as if Claude Code had invoked it directly.
|
|
13
|
+
//
|
|
14
|
+
// Resolution order (first that has scripts/claude-hooks/_run.mjs):
|
|
15
|
+
// 1. HEYSPEX_PLATFORM_ROOT (explicit override)
|
|
16
|
+
// 2. HEYSPEX_MCP_ENTRY → <root>/vendor/heyspex-mcp/cli.mjs — `hs install`
|
|
17
|
+
// writes this into the customer repo's .claude/settings.json env
|
|
18
|
+
// 3. this launcher's own checkout (<root>/plugins/heyspex/bin/)
|
|
19
|
+
// 4. node_modules/heyspex containing this launcher (published package)
|
|
20
|
+
// 5. $CLAUDE_PROJECT_DIR, $CURSOR_PROJECT_DIR (the platform repo itself)
|
|
21
|
+
//
|
|
22
|
+
// Fail-open like the shim: nothing found → one stderr line, exit 0.
|
|
23
|
+
|
|
24
|
+
import { existsSync } from 'node:fs';
|
|
25
|
+
import { dirname, resolve, sep } from 'node:path';
|
|
26
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
27
|
+
|
|
28
|
+
const SHIM_REL = ['scripts', 'claude-hooks', '_run.mjs'];
|
|
29
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
30
|
+
|
|
31
|
+
function packagedRoot(fromDir) {
|
|
32
|
+
let dir = fromDir;
|
|
33
|
+
for (;;) {
|
|
34
|
+
const parent = dirname(dir);
|
|
35
|
+
if (parent === dir) return null;
|
|
36
|
+
if (dir.split(sep).pop() === 'heyspex' && parent.split(sep).pop() === 'node_modules') return dir;
|
|
37
|
+
dir = parent;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const env = process.env;
|
|
42
|
+
const candidates = [
|
|
43
|
+
env.HEYSPEX_PLATFORM_ROOT?.trim(),
|
|
44
|
+
env.HEYSPEX_MCP_ENTRY?.trim() && resolve(env.HEYSPEX_MCP_ENTRY.trim(), '..', '..', '..'),
|
|
45
|
+
resolve(here, '..', '..', '..'),
|
|
46
|
+
packagedRoot(here),
|
|
47
|
+
env.CLAUDE_PROJECT_DIR?.trim(),
|
|
48
|
+
env.CURSOR_PROJECT_DIR?.trim(),
|
|
49
|
+
].filter(Boolean);
|
|
50
|
+
|
|
51
|
+
const shim = candidates.map((root) => resolve(root, ...SHIM_REL)).find((p) => existsSync(p));
|
|
52
|
+
|
|
53
|
+
if (!shim) {
|
|
54
|
+
process.stderr.write(
|
|
55
|
+
`[heyspex plugin] hook ${process.argv[2] ?? '?'} skipped: no HeySpex platform checkout found ` +
|
|
56
|
+
`(set HEYSPEX_MCP_ENTRY via \`hs install\`, or HEYSPEX_PLATFORM_ROOT). Searched: ${candidates.join(', ')}\n`,
|
|
57
|
+
);
|
|
58
|
+
process.exit(0);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// argv is already [node, <this>, <hook>, ...args] — the shape _run.mjs reads.
|
|
62
|
+
await import(pathToFileURL(shim).href);
|