dsh-pstack 0.2.0-beta.1 → 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/LICENSE +2 -3
- package/README.md +148 -84
- package/README.zh.md +198 -0
- package/assets/pstack-config-entry.png +0 -0
- package/cordis.patch.yml +105 -27
- package/dist/client.mjs +2341 -0
- package/dist/client.mjs.map +1 -0
- package/dist/host-contract-CUPSpeNk.d.mts +22 -0
- package/dist/index.d.mts +49 -238
- package/dist/index.mjs +250 -123
- package/dist/models.d.mts +44 -0
- package/dist/models.mjs +201 -0
- package/dist/paths-BT77khwm.mjs +48 -0
- package/dist/pstack/LICENSE +21 -0
- package/dist/pstack/README.md +291 -0
- package/dist/pstack/agents/poteto-agent.md +9 -0
- package/{assets → dist/pstack}/docs/guide/01-setup.md +13 -11
- package/{assets → dist/pstack}/docs/guide/02-poteto-mode.md +4 -4
- package/{assets → dist/pstack}/docs/guide/04-design.md +4 -4
- package/{assets → dist/pstack}/docs/guide/05-build-and-clean.md +2 -2
- package/{assets → dist/pstack}/docs/guide/06-verify-and-ship.md +13 -3
- package/{assets → dist/pstack}/docs/guide/07-overnight.md +15 -13
- package/{assets → dist/pstack}/docs/guide/09-make-it-yours.md +6 -2
- package/{assets → dist/pstack}/docs/guide/10-recipes-and-pitfalls.md +7 -5
- package/{assets → dist/pstack}/docs/guide/README.md +1 -1
- package/dist/pstack/docs/harness/dsh.md +98 -0
- package/{assets → dist/pstack}/skills/architect/SKILL.md +12 -12
- package/dist/pstack/skills/arena/SKILL.md +50 -0
- package/{assets → dist/pstack}/skills/automate-me/SKILL.md +14 -14
- package/{assets → dist/pstack}/skills/benchmark-checklist/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/blast-radius/SKILL.md +4 -6
- package/{assets → dist/pstack}/skills/correct/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/create-formal-verification-skill/SKILL.md +4 -2
- package/{assets → dist/pstack}/skills/create-verification-skill/SKILL.md +5 -5
- package/dist/pstack/skills/figure-it-out/SKILL.md +54 -0
- package/dist/pstack/skills/how/SKILL.md +38 -0
- package/{assets → dist/pstack}/skills/in-your-own-words/SKILL.md +1 -1
- package/dist/pstack/skills/interrogate/SKILL.md +33 -0
- package/{assets → dist/pstack}/skills/ketchup/SKILL.md +3 -5
- package/dist/pstack/skills/ketchup-video/SKILL.md +29 -0
- package/{assets → dist/pstack}/skills/maintain-formal-verification-skill/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/maintain-verification-skill/SKILL.md +3 -3
- package/dist/pstack/skills/make-bot-ui/SKILL.md +117 -0
- package/dist/pstack/skills/no-comments/SKILL.md +26 -0
- package/{assets → dist/pstack}/skills/poteto-help/SKILL.md +34 -31
- package/{assets → dist/pstack}/skills/poteto-help/references/prompting.md +1 -1
- package/{assets → dist/pstack}/skills/poteto-help/references/recipes.md +3 -3
- package/{assets → dist/pstack}/skills/poteto-mode/SKILL.md +20 -19
- package/dist/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/dist/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/dist/pstack/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
- package/dist/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +8 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/babysit.md +4 -4
- package/dist/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/eval.md +3 -3
- package/dist/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/hillclimb.md +3 -3
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/investigation.md +2 -2
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/multi-phase-plan.md +23 -23
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/opening-a-pr.md +6 -6
- package/dist/pstack/skills/poteto-mode/playbooks/orchestrate.md +25 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/pause-safely.md +2 -2
- package/dist/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/prototype.md +4 -4
- package/dist/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/dist/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/dist/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/shipping.md +2 -2
- package/{assets → dist/pstack}/skills/poteto-mode/playbooks/trace-forensics.md +2 -2
- package/dist/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/dist/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +12 -0
- package/{assets → dist/pstack}/skills/poteto-mode/scripts/check-plan.mjs +6 -8
- package/dist/pstack/skills/poteto-mode/scripts/check-plan.test.mjs +128 -0
- package/{assets/skills/poteto-mode/scripts/check-plan.test.mjs → dist/pstack/skills/poteto-mode/scripts/expect.mjs} +12 -101
- package/dist/pstack/skills/poteto-mode/scripts/support.mjs +93 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.mjs +123 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +217 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.mjs +119 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.mjs +626 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/github.test.mjs +521 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.mjs +657 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +523 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/render.mjs +106 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/types.mjs +9 -0
- package/dist/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +5 -0
- package/{assets → dist/pstack}/skills/poteto-mode/scripts/worktree-audit.mjs +15 -22
- package/dist/pstack/skills/poteto-mode/scripts/worktree-audit.test.mjs +134 -0
- package/{assets → dist/pstack}/skills/principle-attack-the-premise/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-boundary-discipline/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-encode-lessons-in-structure/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-exhaust-the-design-space/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-experience-first/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-explain-the-number/SKILL.md +3 -2
- package/{assets → dist/pstack}/skills/principle-fix-root-causes/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-laziness-protocol/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-make-operations-idempotent/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-minimize-reader-load/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-model-the-domain/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-never-block-on-the-human/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-outcome-oriented-execution/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-prove-it-works/SKILL.md +2 -2
- package/{assets → dist/pstack}/skills/principle-redesign-from-first-principles/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-separate-before-serializing-shared-state/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-sequence-verifiable-units/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-subtract-before-you-add/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-test-behavior-not-implementation/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/principle-type-system-discipline/SKILL.md +1 -1
- package/dist/pstack/skills/recall/SKILL.md +37 -0
- package/dist/pstack/skills/reflect/SKILL.md +71 -0
- package/{assets → dist/pstack}/skills/reflect/references/divergent-reviewer.md +4 -4
- package/{assets → dist/pstack}/skills/reflect/references/judgment-reviewer.md +2 -2
- package/{assets → dist/pstack}/skills/reflect/references/synthesizer.md +5 -5
- package/{assets → dist/pstack}/skills/reflect/references/tooling-reviewer.md +2 -2
- package/dist/pstack/skills/setup-pstack/SKILL.md +80 -0
- package/{assets → dist/pstack}/skills/sharpen/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/show-me-your-work/SKILL.md +8 -8
- package/{assets → dist/pstack}/skills/show-me-your-work/scripts/log.mjs +1 -3
- package/dist/pstack/skills/show-me-your-work/scripts/log.test.mjs +56 -0
- package/dist/pstack/skills/statechart/SKILL.md +82 -0
- package/dist/pstack/skills/statechart/references/render.md +93 -0
- package/dist/pstack/skills/statechart/scripts/backends/cfg.mjs +31 -0
- package/dist/pstack/skills/statechart/scripts/backends/mermaid.mjs +186 -0
- package/dist/pstack/skills/statechart/scripts/backends/plain-text.mjs +62 -0
- package/dist/pstack/skills/statechart/scripts/backends/report.mjs +84 -0
- package/dist/pstack/skills/statechart/scripts/frontends/config.mjs +268 -0
- package/dist/pstack/skills/statechart/scripts/frontends/dot.mjs +67 -0
- package/dist/pstack/skills/statechart/scripts/frontends/marks.mjs +94 -0
- package/dist/pstack/skills/statechart/scripts/frontends/messages.mjs +48 -0
- package/dist/pstack/skills/statechart/scripts/frontends/spec.mjs +101 -0
- package/dist/pstack/skills/statechart/scripts/frontends/trace.mjs +39 -0
- package/dist/pstack/skills/statechart/scripts/frontends/value.mjs +180 -0
- package/dist/pstack/skills/statechart/scripts/frontends/verdict.mjs +40 -0
- package/dist/pstack/skills/statechart/scripts/frontends/view.mjs +99 -0
- package/dist/pstack/skills/statechart/scripts/ir.mjs +277 -0
- package/dist/pstack/skills/statechart/scripts/passes/annotate.mjs +92 -0
- package/dist/pstack/skills/statechart/scripts/passes/label.mjs +210 -0
- package/dist/pstack/skills/statechart/scripts/passes/lift.mjs +84 -0
- package/dist/pstack/skills/statechart/scripts/passes/loop-check.mjs +47 -0
- package/dist/pstack/skills/statechart/scripts/passes/paths.mjs +72 -0
- package/dist/pstack/skills/statechart/scripts/passes/reach.mjs +135 -0
- package/dist/pstack/skills/statechart/scripts/passes/region-check.mjs +82 -0
- package/dist/pstack/skills/statechart/scripts/passes/regions.mjs +268 -0
- package/dist/pstack/skills/statechart/scripts/pipeline.mjs +72 -0
- package/dist/pstack/skills/statechart/scripts/run.mjs +440 -0
- package/dist/pstack/skills/statechart/scripts/statechart.mjs +155 -0
- package/dist/pstack/skills/statechart/scripts/statechart.test.mjs +198 -0
- package/dist/pstack/skills/statechart/scripts/worker.mjs +31 -0
- package/dist/pstack/skills/swarm/SKILL.md +43 -0
- package/{assets → dist/pstack}/skills/tdd/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/teach/SKILL.md +2 -2
- package/{assets → dist/pstack}/skills/technical-writing/SKILL.md +1 -1
- package/{assets → dist/pstack}/skills/typescript-best-practices/SKILL.md +3 -6
- package/{assets → dist/pstack}/skills/why/SKILL.md +8 -8
- package/dist/remote.d.mts +27 -0
- package/dist/remote.mjs +234 -0
- package/dist/role-config-NNn5r1JX.mjs +415 -0
- package/dist/role-manifest-C3fUzjLI.d.mts +19 -0
- package/dist/role-wire-DZwTn2wF.d.mts +55 -0
- package/dist/roles.d.mts +18 -0
- package/dist/roles.mjs +323 -0
- package/dist/script.d.mts +9 -111
- package/dist/script.mjs +32 -329
- package/dist/skill.d.mts +38 -0
- package/dist/skill.mjs +183 -0
- package/dist/skills/authored/decision-audit/SKILL.md +103 -0
- package/dist/skills/authored/decision-audit/SKILL.zh.md +103 -0
- package/dist/skills/authored/decision-audit/references/recover-commit.md +17 -0
- package/dist/skills/authored/decision-audit/references/recover-commit.zh.md +17 -0
- package/dist/skills/authored/decision-write/SKILL.md +133 -0
- package/dist/skills/authored/decision-write/SKILL.zh.md +133 -0
- package/dist/skills/authored/decision-write/references/land.md +48 -0
- package/dist/skills/authored/decision-write/references/land.zh.md +48 -0
- package/dist/skills/authored/decision-write/references/scope.md +16 -0
- package/dist/skills/authored/decision-write/references/scope.zh.md +16 -0
- package/dist/skills/authored/docs-drift/SKILL.md +120 -0
- package/dist/skills/authored/docs-drift/SKILL.zh.md +120 -0
- package/dist/skills/authored/setup-project-docs/SKILL.md +63 -0
- package/dist/skills/authored/setup-project-docs/SKILL.zh.md +63 -0
- package/dist/skills/authored/setup-project-docs/references/decision-conventions.md +13 -0
- package/dist/skills/authored/setup-project-docs/references/decision-conventions.zh.md +13 -0
- package/dist/skills/vendored/retro/SKILL.md +44 -0
- package/dist/skills/vendored/retro/agents/openai.yaml +5 -0
- package/dist/skills/vendored/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/dist/skills/vendored/writing-for-agents/SKILL.md +81 -0
- package/dist/skills/vendored/writing-for-agents/agents/openai.yaml +3 -0
- package/dist/subagent.d.mts +54 -206
- package/dist/subagent.mjs +258 -963
- package/locale/en.json +3 -2
- package/locale/zh.json +3 -2
- package/package.json +93 -66
- package/assets/agents/poteto-agent.md +0 -8
- package/assets/docs/harness/dsh.md +0 -60
- package/assets/docs/pstack-models.example.md +0 -54
- package/assets/skills/arena/SKILL.md +0 -50
- package/assets/skills/figure-it-out/SKILL.md +0 -54
- package/assets/skills/how/SKILL.md +0 -38
- package/assets/skills/interrogate/SKILL.md +0 -71
- package/assets/skills/interrogate/references/code-quality-review.md +0 -47
- package/assets/skills/interrogate/references/lead-judgment.md +0 -39
- package/assets/skills/interrogate/references/reviewer-prompt.md +0 -62
- package/assets/skills/interrogate/references/rubric.md +0 -77
- package/assets/skills/no-comments/SKILL.md +0 -26
- package/assets/skills/poteto-mode/playbooks/authoring-a-skill.md +0 -12
- package/assets/skills/poteto-mode/playbooks/autonomous-run.md +0 -15
- package/assets/skills/poteto-mode/playbooks/autopilot-full.md +0 -25
- package/assets/skills/poteto-mode/playbooks/autopilot-stack.md +0 -12
- package/assets/skills/poteto-mode/playbooks/bug-fix.md +0 -15
- package/assets/skills/poteto-mode/playbooks/feature.md +0 -21
- package/assets/skills/poteto-mode/playbooks/orchestrate.md +0 -112
- package/assets/skills/poteto-mode/playbooks/perf-issue.md +0 -25
- package/assets/skills/poteto-mode/playbooks/refactoring.md +0 -16
- package/assets/skills/poteto-mode/playbooks/runtime-forensics.md +0 -11
- package/assets/skills/poteto-mode/playbooks/session-pickup.md +0 -11
- package/assets/skills/poteto-mode/playbooks/visual-parity.md +0 -11
- package/assets/skills/poteto-mode/playbooks/worktree-cleanup.md +0 -20
- package/assets/skills/poteto-mode/scripts/orch/orch.mjs +0 -4282
- package/assets/skills/poteto-mode/scripts/orch/orch.test.mjs +0 -2042
- package/assets/skills/poteto-mode/scripts/watch-pr/cli.test.mjs +0 -5101
- package/assets/skills/poteto-mode/scripts/watch-pr/github.test.mjs +0 -1177
- package/assets/skills/poteto-mode/scripts/watch-pr/policy.test.mjs +0 -1441
- package/assets/skills/poteto-mode/scripts/watch-pr/watch-pr.mjs +0 -4601
- package/assets/skills/recall/SKILL.md +0 -37
- package/assets/skills/reflect/SKILL.md +0 -69
- package/assets/skills/setup-pstack/SKILL.md +0 -67
- package/assets/skills/swarm/SKILL.md +0 -43
- package/dist/frontmatter-BQX3ekwP.mjs +0 -229
- package/dist/frontmatter-BQX3ekwP.mjs.map +0 -1
- package/dist/history.d.mts +0 -429
- package/dist/history.mjs +0 -1129
- package/dist/history.mjs.map +0 -1
- package/dist/host-contract-o47JH_r8.d.mts +0 -527
- package/dist/index.mjs.map +0 -1
- package/dist/paths-D_JlVmBk.mjs +0 -42
- package/dist/paths-D_JlVmBk.mjs.map +0 -1
- package/dist/script.mjs.map +0 -1
- package/dist/subagent.mjs.map +0 -1
- /package/{static/icon.png → assets/logo.png} +0 -0
- /package/{assets → dist/pstack}/agents/comment-sicko.md +0 -0
- /package/{assets → dist/pstack}/docs/guide/03-understand.md +0 -0
- /package/{assets → dist/pstack}/docs/guide/08-principles.md +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/design.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/overnight.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/recipes.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/router.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/understanding.jpg +0 -0
- /package/{assets → dist/pstack}/docs/guide/images/verification.jpg +0 -0
- /package/{assets → dist/pstack}/skills/architect/references/design-red-flags.md +0 -0
- /package/{assets → dist/pstack}/skills/architect/references/rationale-template.md +0 -0
- /package/{assets → dist/pstack}/skills/architect/references/runner-prompt.md +0 -0
- /package/{assets → dist/pstack}/skills/bro/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/README.md +0 -0
- /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/create-note.md +0 -0
- /package/{assets → dist/pstack}/skills/create-verification-skill/references/feature-map-example/search.md +0 -0
- /package/{assets → dist/pstack}/skills/how/references/explainer-prompt.md +0 -0
- /package/{assets → dist/pstack}/skills/how/references/explorer-prompt.md +0 -0
- /package/{assets → dist/pstack}/skills/poteto-mode/references/bugbot-triage.md +0 -0
- /package/{assets → dist/pstack}/skills/principle-build-the-lever/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/principle-foundational-thinking/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/principle-guard-the-context-window/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/show-me-your-work/references/decision-log-template.tsv +0 -0
- /package/{assets → dist/pstack}/skills/typescript-best-practices/references/patterns.md +0 -0
- /package/{assets → dist/pstack}/skills/unslop/SKILL.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/epistemics.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/investigator-prompt.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/source-playbook.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/code-archaeology.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/databricks.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/datadog.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/incident-postmortem.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/linear.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/notion.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/sentry.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/sources/slack.md +0 -0
- /package/{assets → dist/pstack}/skills/why/references/synthesizer-prompt.md +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { key, show } from "./ir.mjs";
|
|
2
|
+
import { plainText } from "./backends/plain-text.mjs";
|
|
3
|
+
import { compile } from "./pipeline.mjs";
|
|
4
|
+
import { readConfig } from "./frontends/config.mjs";
|
|
5
|
+
import { parseValue } from "./frontends/value.mjs";
|
|
6
|
+
import { readMessages } from "./frontends/messages.mjs";
|
|
7
|
+
import { readChecks } from "./frontends/spec.mjs";
|
|
8
|
+
import { checkView, json } from "./frontends/view.mjs";
|
|
9
|
+
import { chmodSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { tmpdir } from "node:os";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
import { spawnSync } from "node:child_process";
|
|
13
|
+
import { test } from "node:test";
|
|
14
|
+
import { inspect } from "node:util";
|
|
15
|
+
import assert from "node:assert/strict";
|
|
16
|
+
// runtime/skills/statechart/scripts/statechart.test.ts
|
|
17
|
+
const invariant = {
|
|
18
|
+
kind: "invariant",
|
|
19
|
+
name: "Inv"
|
|
20
|
+
};
|
|
21
|
+
function graphWithBreak() {
|
|
22
|
+
return {
|
|
23
|
+
states: /* @__PURE__ */ new Map([["s0", {
|
|
24
|
+
vars: { x: 0 },
|
|
25
|
+
start: true,
|
|
26
|
+
breaks: []
|
|
27
|
+
}], ["s1", {
|
|
28
|
+
vars: { x: 1 },
|
|
29
|
+
start: false,
|
|
30
|
+
breaks: [invariant]
|
|
31
|
+
}]]),
|
|
32
|
+
steps: [{
|
|
33
|
+
from: "s0",
|
|
34
|
+
to: "s1",
|
|
35
|
+
action: "Next"
|
|
36
|
+
}]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function resultWithBreak() {
|
|
40
|
+
return {
|
|
41
|
+
spec: {
|
|
42
|
+
module: "Test",
|
|
43
|
+
folder: "/tmp",
|
|
44
|
+
variables: ["x"],
|
|
45
|
+
invariants: ["Inv"],
|
|
46
|
+
properties: [],
|
|
47
|
+
deadlock: false,
|
|
48
|
+
written: []
|
|
49
|
+
},
|
|
50
|
+
graph: graphWithBreak(),
|
|
51
|
+
paths: void 0,
|
|
52
|
+
rules: [{
|
|
53
|
+
rule: invariant,
|
|
54
|
+
outcome: "broken",
|
|
55
|
+
messages: ["Inv is violated"]
|
|
56
|
+
}],
|
|
57
|
+
properties: [],
|
|
58
|
+
exit: 1,
|
|
59
|
+
stop: void 0,
|
|
60
|
+
drawing: void 0,
|
|
61
|
+
states: {
|
|
62
|
+
distinct: 2,
|
|
63
|
+
initial: 1,
|
|
64
|
+
complete: true,
|
|
65
|
+
cut: false
|
|
66
|
+
},
|
|
67
|
+
messages: ["TLC finished"]
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
test("reads the TLA+ value grammar the skill documents", () => {
|
|
71
|
+
assert.deepEqual(json(parseValue("<<1, \"a\", <<>>>>")), {
|
|
72
|
+
1: 1,
|
|
73
|
+
2: "a",
|
|
74
|
+
3: {}
|
|
75
|
+
});
|
|
76
|
+
assert.deepEqual(json(parseValue("{r1, -2}")), ["r1", -2]);
|
|
77
|
+
assert.deepEqual(json(parseValue("-1..2")), [
|
|
78
|
+
-1,
|
|
79
|
+
0,
|
|
80
|
+
1,
|
|
81
|
+
2
|
|
82
|
+
]);
|
|
83
|
+
assert.deepEqual(json(parseValue("[ok |-> TRUE, msg |-> \"say \\\"hi\\\"\"]")), {
|
|
84
|
+
ok: true,
|
|
85
|
+
msg: "say \"hi\""
|
|
86
|
+
});
|
|
87
|
+
assert.throws(() => parseValue("1.."), /cannot read TLA\+ value/);
|
|
88
|
+
});
|
|
89
|
+
test("prints each value in TLA+ and compares by TLA+ equality", () => {
|
|
90
|
+
assert.equal(show(parseValue("<<0>>")), "<<0>>");
|
|
91
|
+
assert.equal(show(parseValue("[a |-> 1]")), "[a |-> 1]");
|
|
92
|
+
assert.equal(key(parseValue("1..3")), key(parseValue("{3, 1, 2, 2}")));
|
|
93
|
+
assert.notEqual(key(parseValue("\"A\"")), key(parseValue("A")));
|
|
94
|
+
});
|
|
95
|
+
test("reads a TLC config into the checks the report names", () => {
|
|
96
|
+
const config = readConfig({
|
|
97
|
+
file: "Min.cfg",
|
|
98
|
+
text: "INIT Init\nNEXT Next\nINVARIANT Inv\nPROPERTY Live\n"
|
|
99
|
+
});
|
|
100
|
+
assert.equal(config.init, "Init");
|
|
101
|
+
assert.equal(config.next, "Next");
|
|
102
|
+
assert.deepEqual(config.invariants, ["Inv"]);
|
|
103
|
+
assert.deepEqual(config.properties, ["Live"]);
|
|
104
|
+
const checks = readChecks({
|
|
105
|
+
configFile: "Min.cfg",
|
|
106
|
+
config
|
|
107
|
+
});
|
|
108
|
+
assert.equal(checks.deadlock, true);
|
|
109
|
+
});
|
|
110
|
+
test("prints TLC's -tool messages as plain text", () => {
|
|
111
|
+
const text = [
|
|
112
|
+
"@!@!@STARTMSG 2262:0 @!@!@",
|
|
113
|
+
"TLC2 Version 2.19",
|
|
114
|
+
"@!@!@ENDMSG 2262 @!@!@"
|
|
115
|
+
].join("\n");
|
|
116
|
+
assert.equal([...plainText(readMessages(text))].join(""), "TLC2 Version 2.19\n");
|
|
117
|
+
});
|
|
118
|
+
test("compiles a broken rule into report.md, chart.mmd, and tlc.out", () => {
|
|
119
|
+
const compiled = compile(resultWithBreak(), checkView({}, inspect));
|
|
120
|
+
assert.equal(compiled.exit, 1);
|
|
121
|
+
const report = compiled.report;
|
|
122
|
+
assert.match(report, /Inv/);
|
|
123
|
+
assert.match(report, /Next/);
|
|
124
|
+
const chart = [...compiled.files.get("chart.mmd") ?? []].join("");
|
|
125
|
+
assert.match(chart, /stateDiagram/);
|
|
126
|
+
assert.match(chart, /Next/);
|
|
127
|
+
assert.ok(compiled.files.has("report.md"));
|
|
128
|
+
assert.ok(compiled.files.has("tlc.out"));
|
|
129
|
+
});
|
|
130
|
+
test("the CLI rejects a missing spec with usage and exit 2", () => {
|
|
131
|
+
const here = import.meta.dirname;
|
|
132
|
+
const entry = join(here, import.meta.url.endsWith(".ts") ? "statechart.ts" : "statechart.mjs");
|
|
133
|
+
const result = spawnSync(process.execPath, [entry], { encoding: "utf8" });
|
|
134
|
+
assert.equal(result.status, 2);
|
|
135
|
+
assert.match(result.stderr, /Give one SPEC\.tla\./);
|
|
136
|
+
assert.match(result.stderr, /Usage: statechart SPEC\.tla/);
|
|
137
|
+
});
|
|
138
|
+
test("the CLI runs the worker against TLC and writes the report, chart, and tlc.out", () => {
|
|
139
|
+
const root = mkdtempSync(join(tmpdir(), "statechart-worker-"));
|
|
140
|
+
try {
|
|
141
|
+
const caseDir = join(root, "case");
|
|
142
|
+
mkdirSync(caseDir);
|
|
143
|
+
writeFileSync(join(caseDir, "Smoke.tla"), "---- MODULE Smoke ----\n====\n");
|
|
144
|
+
writeFileSync(join(caseDir, "Smoke.cfg"), "INIT Init\nNEXT Next\n");
|
|
145
|
+
const fakeJava = join(root, "fake-java.mjs");
|
|
146
|
+
writeFileSync(fakeJava, String.raw`#!/usr/bin/env node
|
|
147
|
+
import fs from "node:fs";
|
|
148
|
+
const args = process.argv.slice(2);
|
|
149
|
+
if (args.includes("tla2sany.xml.XMLExporter")) {
|
|
150
|
+
process.stdout.write('<modules><context><entry><UID>1</UID><OpDeclNode><uniquename>x</uniquename><kind>3</kind></OpDeclNode></entry><entry><UID>2</UID><ModuleNode><uniquename>Smoke</uniquename><OpDeclNodeRef><UID>1</UID></OpDeclNodeRef></ModuleNode></entry></context><RootModule>Smoke</RootModule></modules>');
|
|
151
|
+
process.exit(0);
|
|
152
|
+
}
|
|
153
|
+
const dump = args.indexOf("-dump");
|
|
154
|
+
if (dump !== -1) {
|
|
155
|
+
fs.writeFileSync(args[dump + 2] + ".dot", [
|
|
156
|
+
"strict digraph DiskGraph {",
|
|
157
|
+
'1 [label="/\\\\ x = 0",style = filled]',
|
|
158
|
+
'2 [label="/\\\\ x = 1"]',
|
|
159
|
+
'1 -> 2 [label="Next"];',
|
|
160
|
+
"}",
|
|
161
|
+
].join("\n"));
|
|
162
|
+
}
|
|
163
|
+
process.stdout.write("@!@!@STARTMSG 2199:0 @!@!@\n2 distinct states found.\n@!@!@ENDMSG 2199 @!@!@\n");
|
|
164
|
+
process.exit(0);
|
|
165
|
+
`);
|
|
166
|
+
chmodSync(fakeJava, 493);
|
|
167
|
+
const here = import.meta.dirname;
|
|
168
|
+
const entry = join(here, import.meta.url.endsWith(".ts") ? "statechart.ts" : "statechart.mjs");
|
|
169
|
+
const out = join(root, "out");
|
|
170
|
+
const result = spawnSync(process.execPath, [
|
|
171
|
+
entry,
|
|
172
|
+
join(caseDir, "Smoke.tla"),
|
|
173
|
+
"--out",
|
|
174
|
+
out
|
|
175
|
+
], {
|
|
176
|
+
encoding: "utf8",
|
|
177
|
+
env: {
|
|
178
|
+
...process.env,
|
|
179
|
+
JAVA: fakeJava,
|
|
180
|
+
TLA2TOOLS: "tla2tools.jar"
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
assert.equal(result.status, 0, result.stderr);
|
|
184
|
+
assert.deepEqual(readdirSync(out).sort(), [
|
|
185
|
+
"chart.mmd",
|
|
186
|
+
"report.md",
|
|
187
|
+
"tlc.out"
|
|
188
|
+
]);
|
|
189
|
+
assert.match(readFileSync(join(out, "report.md"), "utf8"), /# Smoke[\s\S]*NoDeadlock/);
|
|
190
|
+
assert.match(readFileSync(join(out, "chart.mmd"), "utf8"), /stateDiagram/);
|
|
191
|
+
} finally {
|
|
192
|
+
rmSync(root, {
|
|
193
|
+
recursive: true,
|
|
194
|
+
force: true
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { compile } from "./pipeline.mjs";
|
|
2
|
+
import { check, messageOf } from "./run.mjs";
|
|
3
|
+
import { checkView } from "./frontends/view.mjs";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { inspect } from "node:util";
|
|
7
|
+
import { pathToFileURL } from "node:url";
|
|
8
|
+
import { Buffer } from "node:buffer";
|
|
9
|
+
// runtime/skills/statechart/scripts/worker.ts
|
|
10
|
+
const [stage, specFile, configFile, viewFile] = process.argv.slice(2);
|
|
11
|
+
try {
|
|
12
|
+
const view = checkView(viewFile ? await import(pathToFileURL(path.resolve(viewFile)).href) : {}, inspect);
|
|
13
|
+
const { files, exit } = compile(await check(specFile, configFile), view);
|
|
14
|
+
const draft = path.join(stage, "draft");
|
|
15
|
+
fs.mkdirSync(draft);
|
|
16
|
+
for (const [name, parts] of files) {
|
|
17
|
+
const fd = fs.openSync(path.join(draft, name), "wx");
|
|
18
|
+
try {
|
|
19
|
+
for (const part of parts) fs.writeSync(fd, typeof part === "string" ? Buffer.from(part) : part);
|
|
20
|
+
fs.writeSync(fd, "\n");
|
|
21
|
+
} finally {
|
|
22
|
+
fs.closeSync(fd);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
fs.renameSync(draft, path.join(stage, "done"));
|
|
26
|
+
process.exit(exit);
|
|
27
|
+
} catch (error) {
|
|
28
|
+
console.error(messageOf(error));
|
|
29
|
+
process.exit(2);
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: swarm
|
|
3
|
+
description: "Fan out N parallel workers, drain them, and return one report. Use for /swarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Swarm
|
|
8
|
+
|
|
9
|
+
In DeepSeek Harness, read [the DSH adapter](../../docs/harness/dsh.md) once per session before you follow this skill. It maps the Cursor names in pstack skills to DeepSeek Harness.
|
|
10
|
+
|
|
11
|
+
## Start
|
|
12
|
+
|
|
13
|
+
Open a todolist with one entry per phase before launching anything.
|
|
14
|
+
|
|
15
|
+
1. Frame
|
|
16
|
+
2. Fan out
|
|
17
|
+
3. Aggregate
|
|
18
|
+
4. Report
|
|
19
|
+
|
|
20
|
+
## Phase A: Frame
|
|
21
|
+
|
|
22
|
+
1. State the done predicate and the artifact or report the swarm must return.
|
|
23
|
+
2. Choose the shape. Partition into slices, race N workers on identical briefs, or mix both. For a race or mixed shape, declare `first pass`, `rank all`, or `best-of` before spawning.
|
|
24
|
+
3. Pick the worker model from the `swarm workers` line in `~/.cursor/rules/pstack-models.mdc`. If the rule or that line is missing, use `grok-4.7-xhigh-fast`. For `auto` or `inherit-parent`, omit `model` so the workers run on the parent model. If the Task tool rejects a slug, use the default and say so. If it rejects the default, use the closest valid slug of the same family from its error message. For a model race, name each arm's model up front. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill.
|
|
25
|
+
4. Give each worker its own writable output when it writes. When workers verify or measure commits, each brief names the exact SHAs. A measurement brief also names the method (sample count, what one sample is, order). The worker records both in its result.
|
|
26
|
+
|
|
27
|
+
## Phase B: Fan out
|
|
28
|
+
|
|
29
|
+
Spawn all N workers in one message with `subagent_type: generalPurpose`, `environment: "cloud"`, `run_in_background: true`, and the step 3 model, left unset for `auto` or `inherit-parent`. Use `environment: "local"` only when the worker needs access to something on the user's computer.
|
|
30
|
+
|
|
31
|
+
When a worker must start from a non-default pushed branch, pass `cloud_base_branch`.
|
|
32
|
+
|
|
33
|
+
Every brief stands alone. Include the goal, scope, exact slice or race arm, how to verify, and what to report. Reports use `PASS`, `ISSUES`, or `BLOCKED` with evidence. A worker that can prove a defect reports `ISSUES` and lists every issue it can prove, not only the first.
|
|
34
|
+
|
|
35
|
+
If a worker drops out, proceed with N-1 and note it.
|
|
36
|
+
|
|
37
|
+
## Phase C: Aggregate
|
|
38
|
+
|
|
39
|
+
Read the terminal results. Drop a result that does not record the SHAs and method its brief names, and respawn that worker once. After a second miss, record a gap. A gap does not count as a pass. For coverage, every required slice needs a result. For a race, apply the selection rule declared up front. Use first pass, rank all, or best-of. Do not paste raw worker dumps.
|
|
40
|
+
|
|
41
|
+
## Phase D: Report
|
|
42
|
+
|
|
43
|
+
Return one consolidated in-chat report with a result table, issue one-liners, gaps or dropouts, and the race rule when used.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tdd
|
|
3
|
-
description: Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.
|
|
3
|
+
description: "Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested."
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: teach
|
|
3
|
-
description: Explain a body of work plainly so a person actually understands it. Runs the `how` and `why` skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'.
|
|
3
|
+
description: "Explain a body of work plainly so a person actually understands it. Runs the `how` and `why` skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'."
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Teach
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
In DeepSeek Harness, read [the DSH adapter](../../docs/harness/dsh.md) once per session before you follow this skill. It maps the Cursor names in pstack skills to DeepSeek Harness.
|
|
10
10
|
|
|
11
11
|
**You explain what a thing is, how it works, and why it's built that way, in one plain account at the person's pace. The goal is that they understand it, not that you change anything.**
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ disable-model-invocation: true
|
|
|
6
6
|
|
|
7
7
|
# Technical writing
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
In DeepSeek Harness, read [the DSH adapter](../../docs/harness/dsh.md) once per session before you follow this skill. It maps the Cursor names in pstack skills to DeepSeek Harness.
|
|
10
10
|
|
|
11
11
|
Write so a tired engineer understands on the first read. Apply all four layers.
|
|
12
12
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: typescript-best-practices
|
|
3
3
|
description: TypeScript best practices. Use when reading or editing any .ts or .tsx file.
|
|
4
|
+
paths: ["**/*.ts", "**/*.tsx"]
|
|
4
5
|
disable-model-invocation: true
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# TypeScript best practices
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Apply `principle-type-system-discipline` first; read its `SKILL.md` at its absolute resource path.
|
|
10
|
+
Apply the **type-system-discipline** principle skill first.
|
|
12
11
|
|
|
13
12
|
| Rule | Summary |
|
|
14
13
|
|------|---------|
|
|
@@ -23,12 +22,10 @@ Apply `principle-type-system-discipline` first; read its `SKILL.md` at its absol
|
|
|
23
22
|
| Type guards | Must verify the claim. A lying guard is worse than `as` because the bug hides behind a name that says it's safe. Name them `isX` or `hasX`. |
|
|
24
23
|
| Exhaustiveness | Inline `const _exhaustive: never = x;` in default arms so the compiler errors when a new variant is added. |
|
|
25
24
|
| `satisfies` over `as` | Validates the value without widening literal types. |
|
|
26
|
-
| Boundary validation | Parse where data crosses in, into a named domain type. `Record<string, unknown>` (however spelled) stops at that parse. Trust types inside. See
|
|
25
|
+
| Boundary validation | Parse where data crosses in, into a named domain type. `Record<string, unknown>` (however spelled) stops at that parse. Trust types inside. See the **boundary-discipline** principle skill. |
|
|
27
26
|
| Schema-derived types | Reach for `Pick`/`Omit`/`Parameters`/`ReturnType`/`Awaited`/`typeof` before declaring a new interface. |
|
|
28
27
|
| Object args | Pass objects, not positional, so argument order is self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |
|
|
29
28
|
| Real tests | Don't mock what you can run. Prefer the framework's real test primitives with leak/disposable checks, and verify UI in a running build. Mock only what you can't run locally. |
|
|
30
29
|
| Structured telemetry | Prefer structured logger diagnostics with enough context to debug from an id. No `console.log` in shipped code. |
|
|
31
30
|
|
|
32
31
|
Examples: `references/patterns.md`.
|
|
33
|
-
|
|
34
|
-
This skill is explicit-invocation only. DSH does not consume a `paths` glob, so opening a `.ts` or `.tsx` file does not attach it: load it by name when you want it applied.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: why
|
|
3
|
-
description: Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
|
|
3
|
+
description: "Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior."
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Why
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
In DeepSeek Harness, read [the DSH adapter](../../docs/harness/dsh.md) once per session before you follow this skill. It maps the Cursor names in pstack skills to DeepSeek Harness.
|
|
10
10
|
|
|
11
|
-
Investigate the motivation and intent behind code. The companion `how` skill answers what the code does and how it works
|
|
11
|
+
Investigate the motivation and intent behind code. The companion `how` skill answers what the code does and how it works. `why` answers what forces led to its shape.
|
|
12
12
|
|
|
13
|
-
Each spawn below names a role
|
|
13
|
+
Each spawn below names a role line in the `pstack-models.mdc` rule and a default. Set `model` to that line's value, or to the default if the rule or the line is missing. Leave `model` unset when the value is `auto` or `inherit-parent`. If the Task tool rejects a slug, use the default and say so. If it rejects the default, use the closest valid slug of the same family from its error message. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the **poteto-mode** skill.
|
|
14
14
|
|
|
15
|
-
Every spawn is `
|
|
15
|
+
Every spawn is `generalPurpose` with `readonly: false` (agent mode). **Do not use readonly/Ask mode.** It strips MCP access, which disables the MCP-backed investigators and the synthesizer's citation spot-checks. Investigators still shouldn't write anything.
|
|
16
16
|
|
|
17
17
|
## Operating Posture
|
|
18
18
|
|
|
@@ -34,7 +34,7 @@ Before spawning investigators, build the seed context inline: file paths and lin
|
|
|
34
34
|
|
|
35
35
|
### Discovery
|
|
36
36
|
|
|
37
|
-
Before spawning investigators, list the
|
|
37
|
+
Before spawning investigators, list the available MCPs from the Cursor environment. Use the available-tools map when present. Otherwise inspect the `mcps/` directory Cursor exposes for enabled MCP servers.
|
|
38
38
|
|
|
39
39
|
Map each available MCP to one evidence category:
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ Map each available MCP to one evidence category:
|
|
|
48
48
|
|
|
49
49
|
Source control is always available through git and `gh`. For the other six, classify using the MCP name, server instructions, tool names, and resource descriptors. If an MCP could fit more than one category, choose the one matching its primary evidence. Record ambiguous cases in the coverage map.
|
|
50
50
|
|
|
51
|
-
Spawn one investigator per category that has a matching MCP, all in
|
|
51
|
+
Spawn one investigator per category that has a matching MCP, all in a single message so they run concurrently, each owning exactly one tool or MCP. Don't ask one agent to cover multiple MCPs. `model`: the `why investigators` line, default `grok-4.7-xhigh-fast`.
|
|
52
52
|
|
|
53
53
|
Each investigator's prompt is `references/investigator-prompt.md` filled in, plus:
|
|
54
54
|
- the category playbook `references/sources/<source>.md` for the selected MCP, adapted from the examples in `references/source-playbook.md`
|
|
@@ -78,7 +78,7 @@ If your scope assessment suggests a single-commit trivial target where the PR de
|
|
|
78
78
|
|
|
79
79
|
## Step 4. Synthesize
|
|
80
80
|
|
|
81
|
-
Spawn one synthesizer
|
|
81
|
+
Spawn one synthesizer. `model`: the `why synthesizer` line, default `claude-opus-5-5-xhigh`. It gets:
|
|
82
82
|
1. The investigator findings, including any null results and any categories skipped with justification
|
|
83
83
|
2. The code anchor
|
|
84
84
|
3. The user's original question
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CatalogueResult } from "./models.mjs";
|
|
2
|
+
import { n as SaveRoleRequest, r as SaveRoleResult, t as RoleFileSnapshot } from "./role-wire-DZwTn2wF.mjs";
|
|
3
|
+
import { RemoteResult, TypertRemoteContribution, TypertRemoteInfo } from "@deepseek-ai/dsh-typert-protocol";
|
|
4
|
+
/** npm package that owns these methods. */
|
|
5
|
+
export declare const REMOTE_PACKAGE = "dsh-pstack";
|
|
6
|
+
/** Cordis service key and wire namespace of the Host role service. */
|
|
7
|
+
export declare const ROLES_SERVICE = "pstackRoles";
|
|
8
|
+
/** Parse one save request from the wire. */
|
|
9
|
+
export declare function parseSaveRoleRequest(value: unknown): SaveRoleRequest;
|
|
10
|
+
/** Parse a role-file snapshot from the wire. */
|
|
11
|
+
export declare function parseRoleFileSnapshot(value: unknown): RoleFileSnapshot;
|
|
12
|
+
/** Parse a save result from the wire. */
|
|
13
|
+
export declare function parseSaveRoleResult(value: unknown): SaveRoleResult;
|
|
14
|
+
/** Parse the live catalogue the page offers. */
|
|
15
|
+
export declare function parseCatalogue(value: unknown): CatalogueResult;
|
|
16
|
+
/** The typed Client face installed by `$mount`. */
|
|
17
|
+
export interface PstackRolesNamespace {
|
|
18
|
+
readonly pstackRoles: {
|
|
19
|
+
status(): Promise<RemoteResult<RoleFileSnapshot>>;
|
|
20
|
+
catalogue(signal?: AbortSignal): Promise<RemoteResult<CatalogueResult>>;
|
|
21
|
+
save(request: SaveRoleRequest, signal?: AbortSignal): Promise<RemoteResult<SaveRoleResult>>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** Mountable contribution the Client passes to `ctx.remote.$mount()`. */
|
|
25
|
+
export declare const pstackRolesRemote: TypertRemoteInfo;
|
|
26
|
+
/** The same descriptors registered by the Host as its strict definitions. */
|
|
27
|
+
export declare const pstackRolesContribution: TypertRemoteContribution;
|