heyspex 0.2.5 → 0.2.6
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 +1 -1
- package/bin/hs.mjs +281 -30
- package/dev-factory/lib/dispatch-guard.mjs +75 -0
- package/dev-factory/lib/runner-path.mjs +51 -0
- package/dev-factory/spexcrawl/spexcrawl-cli.mjs +734 -0
- package/dist/cli/hs-connect.mjs +20 -1
- package/dist/cli/hs-defer.mjs +3802 -3744
- package/dist/cli/hs-events.mjs +1296 -0
- package/dist/cli/hs-export-events.mjs +1252 -0
- package/dist/cli/hs-handoff.mjs +2576 -0
- package/dist/cli/hs-index-rebuild.mjs +209 -36
- package/dist/cli/hs-index-reconcile.mjs +212 -39
- package/dist/cli/hs-init.mjs +20 -1
- package/dist/cli/hs-install.mjs +20 -1
- package/dist/cli/hs-join.mjs +20 -1
- package/dist/cli/hs-next-launch.mjs +2698 -0
- package/dist/cli/hs-pin.mjs +1336 -0
- package/dist/cli/hs-prereq.mjs +1380 -0
- package/dist/cli/hs-revalidate.mjs +3257 -0
- package/dist/cli/hs-spawn.mjs +12377 -0
- package/dist/cli/hs-test.mjs +1046 -0
- package/dist/cli/hs-trash.mjs +362 -0
- package/dist/cli/hs-trust.mjs +197 -0
- package/dist/cli/hs-vault-pull.mjs +214 -41
- package/dist/cli/hs-vault-push.mjs +212 -39
- package/dist/cli-templates/harness-commands/claude/hs-res.md +71 -63
- package/dist/cli-templates/harness-commands/cursor/hs-res.md +66 -58
- package/docs/copilot-plugin-install.md +2 -2
- package/package.json +261 -257
- package/plugins/heyspex/.claude-plugin/plugin.json +1 -1
- package/plugins/heyspex/.cursor-plugin/plugin.json +1 -1
- package/scripts/claude-hooks/wip-checkpoint.mjs +17 -2
- package/scripts/claude-statusline/statusline-command.mjs +287 -27
- package/scripts/hs-companion.mjs +8 -0
- package/scripts/install-claude-code-hooks.mjs +104 -3
- package/scripts/install-copilot-hooks.mjs +21 -1
- package/scripts/install-cursor-hooks.mjs +4 -3
- package/scripts/lib/capture-execution-guard.mjs +221 -0
- package/scripts/lib/customer-kit.mjs +48 -0
- package/scripts/lib/hs-companion-settings.mjs +25 -0
- package/scripts/record-grounding.mjs +38 -0
- package/vendor/heyspex-mcp/http-transport.mjs +1 -1
- package/vendor/heyspex-mcp/test-helpers.mjs +37 -23
- package/bin/postinstall.mjs +0 -88
|
@@ -7,61 +7,69 @@ description: Confidence-ladder research method's entrypoint — SpexCrawl via th
|
|
|
7
7
|
|
|
8
8
|
**Usage:** `/hs-res [research question/topic]`
|
|
9
9
|
|
|
10
|
-
# Research (`/hs-res`)
|
|
11
|
-
|
|
12
|
-
> Parity: `.commandcode/skills/hs-res/SKILL.md` · `.cursor/skills/hs-res/SKILL.md` · `.agents/skills/hs-res/SKILL.md`
|
|
13
|
-
|
|
14
|
-
## What to do
|
|
15
|
-
|
|
16
|
-
1. **Take the question.** `$ARGUMENTS` is the research question/topic. If empty, load the
|
|
17
|
-
console doc-toolbar Promote pin via `heyspex_active_research`
|
|
18
|
-
(`.heyspex/research-focus.yaml` → `source_idea_id`, `scope`, `spec_path`) and read the source
|
|
19
|
-
capture body as the question. Either way, restate the scope and confirm with the user.
|
|
20
|
-
|
|
21
|
-
2. **Gather via SpexCrawl (the Companion) — the PRIMARY method** (owner ruling 2026-08-14,
|
|
22
|
-
[[spexcrawl-through-the-companion-is-the]]: "Companion > SpexCrawl is now default method
|
|
23
|
-
for research"). Decompose into a few independent search angles, then per angle:
|
|
24
|
-
`node dev-factory/spexcrawl/spexcrawl-cli.mjs search "<query>" --json` — one call
|
|
25
|
-
searches AND returns the cleaned pages of the top results. Specific extra URLs:
|
|
26
|
-
`node dev-factory/spexcrawl/spexcrawl-cli.mjs scrape "<url>" --json`.
|
|
27
|
-
Prerequisites: the Companion running and paired to the console. LAN mode
|
|
28
|
-
(`npm run console:log:lan`) is needed ONLY when the Companion runs on a DIFFERENT
|
|
29
|
-
machine than the console — since HS-V9WH the Companion polls loopback consoles too
|
|
30
|
-
([[a-queue-is-dead-if-its-only-consumer]]: the LAN line was a bug workaround
|
|
31
|
-
misdocumented as a requirement). When missing, the CLI exits 3 with
|
|
32
|
-
`SPEXCRAWL_UNAVAILABLE` naming the fix; a silent hang means the Companion is not
|
|
33
|
-
running or not polling this console.
|
|
34
|
-
|
|
35
|
-
**Fallback — self-hosted Firecrawl, AUTOMATIC, no permission needed (owner ruling
|
|
36
|
-
2026-08-22).** When the SpexCrawl path malfunctions, times out, hits a gate, or is otherwise
|
|
37
|
-
unavailable, fall back immediately: `node dev-factory/spexcrawl/firecrawl-cli.mjs
|
|
38
|
-
search "<query>" --json` and `node dev-factory/spexcrawl/firecrawl-cli.mjs scrape
|
|
39
|
-
"<url>" --json`. May run on any fleet machine (coffee-geek, basement-geek, spec-ops) —
|
|
40
|
-
prefer other reachable machines over the one the orchestrating session runs on; check
|
|
41
|
-
`docker info`, start Docker/the stack if needed, poll the real endpoint for readiness before
|
|
42
|
-
use. If this task's changed/claimed files are SpexCrawl-related, skip SpexCrawl entirely and
|
|
43
|
-
go straight to Firecrawl. Hosted `api.firecrawl.dev` credits are unchanged — still
|
|
44
|
-
ask-before-spend every time. Full contract: `.commandcode/skills/hs-res/SKILL.md`.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
`
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
10
|
+
# Research (`/hs-res`)
|
|
11
|
+
|
|
12
|
+
> Parity: `.commandcode/skills/hs-res/SKILL.md` · `.cursor/skills/hs-res/SKILL.md` · `.agents/skills/hs-res/SKILL.md`
|
|
13
|
+
|
|
14
|
+
## What to do
|
|
15
|
+
|
|
16
|
+
1. **Take the question.** `$ARGUMENTS` is the research question/topic. If empty, load the
|
|
17
|
+
console doc-toolbar Promote pin via `heyspex_active_research`
|
|
18
|
+
(`.heyspex/research-focus.yaml` → `source_idea_id`, `scope`, `spec_path`) and read the source
|
|
19
|
+
capture body as the question. Either way, restate the scope and confirm with the user.
|
|
20
|
+
|
|
21
|
+
2. **Gather via SpexCrawl (the Companion) — the PRIMARY method** (owner ruling 2026-08-14,
|
|
22
|
+
[[spexcrawl-through-the-companion-is-the]]: "Companion > SpexCrawl is now default method
|
|
23
|
+
for research"). Decompose into a few independent search angles, then per angle:
|
|
24
|
+
`node dev-factory/spexcrawl/spexcrawl-cli.mjs search "<query>" --json` — one call
|
|
25
|
+
searches AND returns the cleaned pages of the top results. Specific extra URLs:
|
|
26
|
+
`node dev-factory/spexcrawl/spexcrawl-cli.mjs scrape "<url>" --json`.
|
|
27
|
+
Prerequisites: the Companion running and paired to the console. LAN mode
|
|
28
|
+
(`npm run console:log:lan`) is needed ONLY when the Companion runs on a DIFFERENT
|
|
29
|
+
machine than the console — since HS-V9WH the Companion polls loopback consoles too
|
|
30
|
+
([[a-queue-is-dead-if-its-only-consumer]]: the LAN line was a bug workaround
|
|
31
|
+
misdocumented as a requirement). When missing, the CLI exits 3 with
|
|
32
|
+
`SPEXCRAWL_UNAVAILABLE` naming the fix; a silent hang means the Companion is not
|
|
33
|
+
running or not polling this console.
|
|
34
|
+
|
|
35
|
+
**Fallback — self-hosted Firecrawl, AUTOMATIC, no permission needed (owner ruling
|
|
36
|
+
2026-08-22).** When the SpexCrawl path malfunctions, times out, hits a gate, or is otherwise
|
|
37
|
+
unavailable, fall back immediately: `node dev-factory/spexcrawl/firecrawl-cli.mjs
|
|
38
|
+
search "<query>" --json` and `node dev-factory/spexcrawl/firecrawl-cli.mjs scrape
|
|
39
|
+
"<url>" --json`. May run on any fleet machine (coffee-geek, basement-geek, spec-ops) —
|
|
40
|
+
prefer other reachable machines over the one the orchestrating session runs on; check
|
|
41
|
+
`docker info`, start Docker/the stack if needed, poll the real endpoint for readiness before
|
|
42
|
+
use. If this task's changed/claimed files are SpexCrawl-related, skip SpexCrawl entirely and
|
|
43
|
+
go straight to Firecrawl. Hosted `api.firecrawl.dev` credits are unchanged — still
|
|
44
|
+
ask-before-spend every time. Full contract: `.commandcode/skills/hs-res/SKILL.md`.
|
|
45
|
+
|
|
46
|
+
**In a repo that uses the `heyspex` npm package** (not a HeySpex platform checkout): the
|
|
47
|
+
package ships only the SpexCrawl client (`dev-factory/spexcrawl/spexcrawl-cli.mjs` under
|
|
48
|
+
`node_modules/heyspex/`). It needs the HeySpex Companion, which the npm package does not
|
|
49
|
+
distribute yet, so it usually exits 3 `SPEXCRAWL_UNAVAILABLE`. The Firecrawl fallback and
|
|
50
|
+
the DeepSeek synthesis CLI (`firecrawl-cli.mjs`, `synthesize-cli.mjs`) are HeySpex-platform
|
|
51
|
+
only and are not in the package. When a CLI named in steps 2 or 4 is missing or reports
|
|
52
|
+
unavailable, stop and tell the user this research method is not available in their install.
|
|
53
|
+
|
|
54
|
+
3. **Assemble a numbered sources block** (`[S1]`, `[S2]`, …) from the gathered
|
|
55
|
+
`{title, url, snippet, markdown}` results, write it plus the question and cite-only
|
|
56
|
+
instructions to a temp prompt file.
|
|
57
|
+
|
|
58
|
+
4. **Synthesize via DeepSeek** —
|
|
59
|
+
`node dev-factory/spexcrawl/synthesize-cli.mjs --prompt-file <path> --json`
|
|
60
|
+
(defaults `--max-tokens` to 32000 and auto-escalates ×3 up to a 96000 ceiling if DeepSeek's
|
|
61
|
+
default-on "thinking" mode burns the whole budget on reasoning — never pass a lower
|
|
62
|
+
`--max-tokens` yourself; the CLI self-heals this failure mode. Exhausted escalation exits 3
|
|
63
|
+
with `SYNTHESIZE_UNAVAILABLE`).
|
|
64
|
+
|
|
65
|
+
5. **Save** via `heyspex_save_research` (or `heyspex_complete_research` under the console pin
|
|
66
|
+
pipeline), with `sources` populated from the gathered URLs.
|
|
67
|
+
|
|
68
|
+
**Never fall back** to `deep-research`/`deep-research-quick|medium|thorough`, the
|
|
69
|
+
`Workflow({ scriptPath: '.claude/workflows/deep-research-*.js' })` launch, or native
|
|
70
|
+
`WebSearch`/`WebFetch` for this method. Self-hosted Firecrawl fallback is automatic (no
|
|
71
|
+
permission needed, 2026-08-22 ruling); hosted `api.firecrawl.dev` credits still need the
|
|
72
|
+
user's explicit per-run permission, every time. If a CLI reports unavailable
|
|
73
|
+
(`SPEXCRAWL_UNAVAILABLE` / `FIRECRAWL_UNAVAILABLE` / `SYNTHESIZE_UNAVAILABLE`, exit 3),
|
|
74
|
+
**stop** and tell the user — never silently substitute another backend. Full method,
|
|
75
|
+
escalation rule, and hard prohibitions: `.commandcode/skills/hs-res/SKILL.md`.
|
|
@@ -32,7 +32,7 @@ The heyspex-app repository is not required and is not available to customers. Ev
|
|
|
32
32
|
works from the published npm package `heyspex` (or a tarball your HeySpex contact hands you), which
|
|
33
33
|
carries the plugin, the marketplace manifest, the hooks and the MCP server.
|
|
34
34
|
|
|
35
|
-
- Node.js 20
|
|
35
|
+
- Node.js 20–24 on PATH (`node --version`; the package requires `>=20 <25`).
|
|
36
36
|
- GitHub Copilot CLI installed and signed in. Any one of: the GitHub Copilot app (its bundled
|
|
37
37
|
`%LOCALAPPDATA%\github-copilot-sdk\cli\<version>\copilot.exe` is auto-detected, newest version
|
|
38
38
|
wins, no PATH entry needed), `npm install -g @github/copilot`, or `winget install GitHub.Copilot`.
|
|
@@ -43,7 +43,7 @@ carries the plugin, the marketplace manifest, the hooks and the MCP server.
|
|
|
43
43
|
```bash
|
|
44
44
|
npm install heyspex
|
|
45
45
|
# or, from a tarball you were given:
|
|
46
|
-
npm install ./heyspex
|
|
46
|
+
npm install ./heyspex-<version>.tgz
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
- Sign the machine in to the HeySpex console so hooks and MCP tools can reach the vault:
|