heyspex 0.2.2 → 0.2.4
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/.claude-plugin/marketplace.json +2 -1
- package/README.md +11 -0
- package/bin/hs-vault-binding.mjs +157 -0
- package/bin/hs.mjs +83 -79
- package/bin/spexcode.mjs +91 -0
- package/dev-factory/engine/worktree.mjs +36 -7
- package/dev-factory/lib/epic-detect.mjs +2 -2
- package/dev-factory/lib/fleet-readiness.mjs +3 -5
- package/dev-factory/lib/fleet-state.mjs +2 -2
- package/dev-factory/lib/sufficiency-score.mjs +3 -5
- package/dist/cli/hs-check.mjs +76 -46
- package/dist/cli/hs-claim.mjs +63 -33
- package/dist/cli/hs-connect.mjs +520 -214
- package/dist/cli/hs-defer.mjs +161 -19
- package/dist/cli/hs-dev.mjs +11 -5
- package/dist/cli/hs-env.mjs +187 -161
- package/dist/cli/hs-index-rebuild.mjs +123 -78
- package/dist/cli/hs-index-reconcile.mjs +203 -107
- package/dist/cli/hs-init.mjs +426 -179
- package/dist/cli/hs-install.mjs +759 -437
- package/dist/cli/hs-join.mjs +590 -383
- package/dist/cli/hs-vault-pull.mjs +359 -254
- package/dist/cli/hs-vault-push.mjs +151 -113
- package/dist/cli/hs-vault.mjs +271 -104
- package/dist/cli/hs-workspace.mjs +90 -57
- package/dist/cli-templates/customer-vault/specs/protocols/session-close-protocol.md +178 -91
- package/docs/copilot-plugin-install.md +200 -177
- package/docs/driving-heyspex-from-copilot.md +174 -165
- package/docs/mcp-client-config.md +93 -25
- package/package.json +257 -250
- package/plugins/heyspex/.claude-plugin/plugin.json +13 -12
- package/plugins/heyspex/.cursor-plugin/plugin.json +16 -15
- package/plugins/heyspex/.mcp.json +3 -4
- package/plugins/heyspex/README.md +323 -312
- package/plugins/heyspex/assets/heyspex-glyph-128.png +0 -0
- package/plugins/heyspex/assets/heyspex-glyph-256.png +0 -0
- package/plugins/heyspex/assets/heyspex-glyph.svg +12 -0
- package/plugins/heyspex/bin/launch-mcp.mjs +21 -7
- package/plugins/heyspex/mcp.json +12 -13
- package/scripts/check-mcp-freshness.mjs +6 -4
- package/scripts/claude-hooks/_intent-classifier-router.mjs +518 -456
- package/scripts/claude-hooks/intent-classifier-trigger.mjs +305 -279
- package/scripts/claude-hooks/research-method-guard.mjs +2 -2
- package/scripts/claude-hooks/wip-checkpoint.mjs +33 -9
- package/scripts/claude-statusline/fonts/HeySpexIcons.ttf +0 -0
- package/scripts/claude-statusline/statusline-command.mjs +1073 -0
- package/scripts/copilot-statusline.mjs +130 -0
- package/scripts/dev-server-status.mjs +3 -2
- package/scripts/dev-server-stop.mjs +3 -2
- package/scripts/hs-capture-cli.mjs +2 -2
- package/scripts/hs-settings.mjs +2 -2
- package/scripts/hs-view.mjs +3 -2
- package/scripts/install-copilot-hooks.mjs +152 -36
- package/scripts/lib/copilot-cli.mjs +108 -0
- package/scripts/lib/customer-kit.mjs +223 -30
- package/scripts/lib/dev-mode.mjs +28 -2
- package/scripts/lib/shared-path-helpers.mjs +32 -0
- package/scripts/lib/standalone-doctor.mjs +131 -32
- package/scripts/wip-ledger-health.mjs +3 -2
- package/spexharness/src/gates/vault-mirror-catchup.mjs +113 -24
- package/spexharness/src/gates/vault-mirror-catchup.runner.mjs +52 -0
- package/spexharness/src/intent-directive.mjs +839 -626
- package/spexharness/src/rule-table.mjs +1 -1
- package/vendor/heyspex-mcp/cli-verbs.mjs +16 -2
- package/vendor/heyspex-mcp/cli.mjs +20 -4
- package/vendor/heyspex-mcp/console-fetch.mjs +15 -3
- package/vendor/heyspex-mcp/dev-tools.mjs +11 -4
- package/vendor/heyspex-mcp/events-tools.mjs +1 -1
- package/vendor/heyspex-mcp/factory-run-status.mjs +42 -0
- package/vendor/heyspex-mcp/http-transport.mjs +6 -1
- package/vendor/heyspex-mcp/mcp-config.mjs +4 -2
- package/vendor/heyspex-mcp/server-identity.mjs +13 -0
- package/vendor/heyspex-mcp/spec-edit-tools.mjs +26 -1
- package/vendor/heyspex-mcp/test-helpers.mjs +5 -2
- package/vendor/heyspex-mcp/tool-catalog.mjs +12 -0
- package/vendor/heyspex-mcp/tool-dispatch.mjs +63 -23
- package/vendor/heyspex-mcp/usable-dir-env.mjs +82 -0
- package/vendor/heyspex-mcp/vault-binding.mjs +839 -0
- package/vendor/heyspex-mcp/vault-resolve.mjs +353 -245
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512" role="img" aria-label="HeySpex">
|
|
2
|
+
<title>HeySpex</title>
|
|
3
|
+
<rect width="512" height="512" rx="112" fill="#1c1c1c"/>
|
|
4
|
+
<g fill="#00fa8e" transform="translate(97.5 78) scale(0.62)">
|
|
5
|
+
<g>
|
|
6
|
+
<path d="M492.09,442.88c-65.92,38.17-133.04,85.08-200.61,119.86-22.67,11.67-37.56,16.13-62.07,4.5-61.39-39.16-127.24-71.73-188.76-110.57-18.29-11.55-32.09-22.94-34.82-46.35-1.61-13.78-2.31-66.54.21-78.91,4.31-21.18,37.08-24.95,45.67-5.85,7.53,16.75.59,54.94,2.95,74.84.62,5.21,2.18,7.48,5.88,11.03l184.72,109.54c13.76,9.11,26.71-2.74,38.87-9.54,51.46-28.76,113.11-63.02,161.72-95.32,15-9.97,20.67-18.96,10.78-36.34-28.71-21.71-67.83-35.99-96.42-56.61-23.64-17.06-12.01-47.51,14.98-45.36,1.83.15,8.91,2.25,10.53,3.14,33.32,18.24,63.31,34.57,93.3,55.33,37.69,26.08,43.46,72.24,13.08,106.64Z"/>
|
|
7
|
+
<path d="M243.69.85c12.8-1.85,26.6-.86,38.25,4.84,62.2,41.11,135.65,72.85,197.08,114.09,17.62,11.83,30.42,26.6,32.33,48.84.94,10.91,1.45,52.76-1.36,61.33-5.34,16.31-28.33,21.56-40.21,8.99-14.65-15.5,2.93-59.4-11.75-74.5l-191.41-111.29c-13.78-6.07-14.69-3.43-27.04,2.78-61.47,30.91-118.4,69.68-179.46,102.42-2.08,1.12-6.61,6.79-7.92,8.75-4.63,6.91-5.05,15.42-1.49,23.04,1.11,2.38,6.69,10.57,16.31,18.03,9.62,7.47,79.88,43.77,79.88,43.77,0,0,8.04,5.6,11.22,9.33,32.8,38.48,78.67,72.23,109.62,110.4,9.39,11.58,16.25,24.24,3.26,36.99-4.39,4.31-19.18,8.74-26.16,3.21-52.15-41.35-104.86-107.39-115.17-115.21-34.22-25.96-113.6-51.84-126.21-93.64-8.65-28.69-1.2-62.67,24.3-79.87C92.85,88.7,155.73,43.65,220.97,10.27c7.03-3.6,14.88-8.28,22.72-9.42Z"/>
|
|
8
|
+
<path d="M288.09,263.38l63.24-63.56c17.83-21.25-3.94-49.23-28.94-35.71-17.77,9.61-44.6,47.97-63.02,62.12-.73.56-15.17,15.68-26.6,26.29-6.28,5.83-8.03,13.22-1.96,19.27,3.26,3.25,7.75,7.71,11.01,10.96,6.72,6.68,18.09,6.17,25.39.12,8.5-7.04,16.82-16.05,20.89-19.49Z"/>
|
|
9
|
+
<path d="M273.49,316.01c-37.73-38.63-74.58-78.18-113-116.16-14.21-20.09-.54-43.95,24.53-38.05,17.67,4.16,54.53,53.37,70.29,66.79,2.42,2.43,32.78,34.79,32.78,34.79l86.21,87.95c17.85,24.27-9.57,53.48-38.08,29.63-19.24-16.1-44.11-45.89-62.72-64.94Z"/>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</svg>
|
|
@@ -83,13 +83,27 @@ if (!entry) {
|
|
|
83
83
|
process.exit(1);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
// No HEYSPEX_VAULT_ROOT guess here (HS-TYJA, owner ruling 2026-10-14). It used
|
|
87
|
+
// to pin the "grandparent of vendor/heyspex-mcp" for a source checkout, which
|
|
88
|
+
// since the repo split is the CODE repo, not a vault. HEYSPEX_VAULT_ROOT is now
|
|
89
|
+
// a true override above the cwd walk, so a guess would beat the repo's own
|
|
90
|
+
// heyspex.yaml `vault:` binding. The server's resolver (vault-resolve.mjs)
|
|
91
|
+
// finds the vault from the folder it was launched in.
|
|
92
|
+
|
|
93
|
+
// HS-C0NW: hosts that do not expand `${CLAUDE_PROJECT_DIR}` in a manifest `env` block (GitHub
|
|
94
|
+
// Copilot CLI) hand the server the literal text. Drop HEYSPEX_VAULT_ROOT / CLAUDE_PROJECT_DIR /
|
|
95
|
+
// CURSOR_PROJECT_DIR when they hold an unexpanded placeholder, a relative path or a missing dir,
|
|
96
|
+
// so the server's resolver falls through to the folder it was launched in. The check lives in
|
|
97
|
+
// the server tree (one helper shared with vault-resolve.mjs), next to the entry we just found.
|
|
98
|
+
// A HEYSPEX_VAULT_ROOT naming an absolute path that does not exist locally is kept: it may be a
|
|
99
|
+
// registered cloud-reliance vault, which the resolver validates itself.
|
|
100
|
+
try {
|
|
101
|
+
const { scrubUnusableDirEnv } = await import(
|
|
102
|
+
pathToFileURL(resolve(dirname(entry), "usable-dir-env.mjs")).href
|
|
103
|
+
);
|
|
104
|
+
scrubUnusableDirEnv(process.env, { requireExisting: { HEYSPEX_VAULT_ROOT: false } });
|
|
105
|
+
} catch {
|
|
106
|
+
// Older server tree without the helper: its own resolver is the only line of defence.
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
await import(pathToFileURL(entry).href);
|
package/plugins/heyspex/mcp.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_comment": "Cursor plugin MCP declaration (HS-2HII). Boots through the plugin's own bin/launch-mcp.mjs, the same launcher .mcp.json uses for Claude Code. Cursor expands ${CURSOR_PLUGIN_ROOT} to the plugin's install path in command/args/env/cwd (cursor.com/docs/reference/plugins), so this works from a plain `npm install heyspex`: the launcher resolves node_modules/heyspex first, then CURSOR_PROJECT_DIR and the other source-checkout fallbacks. Never point this at vendor/heyspex-mcp/cli.mjs directly: that path exists only inside the platform checkout.",
|
|
3
|
-
"mcpServers": {
|
|
4
|
-
"heyspex": {
|
|
5
|
-
"type": "stdio",
|
|
6
|
-
"command": "node",
|
|
7
|
-
"args": [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Cursor plugin MCP declaration (HS-2HII). Boots through the plugin's own bin/launch-mcp.mjs, the same launcher .mcp.json uses for Claude Code. Cursor expands ${CURSOR_PLUGIN_ROOT} to the plugin's install path in command/args/env/cwd (cursor.com/docs/reference/plugins), so this works from a plain `npm install heyspex`: the launcher resolves node_modules/heyspex first, then CURSOR_PROJECT_DIR and the other source-checkout fallbacks. Never point this at vendor/heyspex-mcp/cli.mjs directly: that path exists only inside the platform checkout. No HEYSPEX_VAULT_ROOT pin (HS-TYJA, owner ruling 2026-10-14): the server resolves its vault from the folder it is launched in (a heyspex.yaml vault: binding or a vault checkout); a pin here would override every repo binding.",
|
|
3
|
+
"mcpServers": {
|
|
4
|
+
"heyspex": {
|
|
5
|
+
"type": "stdio",
|
|
6
|
+
"command": "node",
|
|
7
|
+
"args": [
|
|
8
|
+
"${CURSOR_PLUGIN_ROOT}/bin/launch-mcp.mjs"
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
import { createHash } from 'node:crypto';
|
|
49
49
|
import fs from 'node:fs';
|
|
50
50
|
import path from 'node:path';
|
|
51
|
-
import { fileURLToPath
|
|
51
|
+
import { fileURLToPath } from 'node:url';
|
|
52
|
+
import { isMainModule } from './lib/shared-path-helpers.mjs';
|
|
52
53
|
|
|
53
54
|
function defaultVaultRoot() {
|
|
54
55
|
// Honor the same override the hs CLI / dev-server-status.mjs use; otherwise
|
|
@@ -342,8 +343,9 @@ export function checkFreshness({ vaultRoot, vendorDir, buildFile, buildsDir, pid
|
|
|
342
343
|
status: 'unknown',
|
|
343
344
|
message:
|
|
344
345
|
'heyspex MCP server freshness: unknown freshness (no build record at ' +
|
|
345
|
-
'.heyspex/mcp-server-build.json —
|
|
346
|
-
'
|
|
346
|
+
'.heyspex/mcp-server-build.json — no HeySpex MCP server has started for this vault yet; ' +
|
|
347
|
+
'the record is written at server start. If one is running, it predates the freshness ' +
|
|
348
|
+
'handshake or the file is missing/corrupt — restart it to establish one).',
|
|
347
349
|
scope,
|
|
348
350
|
current,
|
|
349
351
|
recorded: null,
|
|
@@ -366,7 +368,7 @@ export function checkFreshness({ vaultRoot, vendorDir, buildFile, buildsDir, pid
|
|
|
366
368
|
|
|
367
369
|
// ---- CLI entrypoint --------------------------------------------------------
|
|
368
370
|
|
|
369
|
-
const invokedDirectly =
|
|
371
|
+
const invokedDirectly = isMainModule(import.meta.url);
|
|
370
372
|
if (invokedDirectly) {
|
|
371
373
|
const argv = process.argv.slice(2);
|
|
372
374
|
const asJson = argv.includes('--json');
|