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
package/dist/index.d.mts
CHANGED
|
@@ -1,118 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
import { _ as ToolsHost, d as SkillProvider, f as SkillProviderControl, u as SkillInvocationPolicy } from "./host-contract-CUPSpeNk.mjs";
|
|
2
|
+
import { LoadSkillResult, SkillResourceResult, SkillsHost, TOOL_NAME, createPstackSkillTool, readSkillResource, renderLoadedSkill } from "./skill.mjs";
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
* that ship inside this package.
|
|
5
|
-
*
|
|
6
|
-
* The provider contract below mirrors `@deepseek-ai/dsh-skill` 0.2.1-rc.3, which
|
|
7
|
-
* was read through the host Inspect provider (`Service.listService` with
|
|
8
|
-
* `service: "skills"`) and the installed type declarations. It is restated here
|
|
9
|
-
* as a structural contract instead of imported so the plugin keeps zero runtime
|
|
10
|
-
* imports from the host packages: a workspace-directory bundle is linked from
|
|
11
|
-
* its checkout, where `@deepseek-ai/*` is not resolvable.
|
|
4
|
+
* Package-internal resource locations.
|
|
12
5
|
*
|
|
13
|
-
*
|
|
6
|
+
* Every shipped resource is read from `dist/` and nowhere else. The bundler writes the
|
|
7
|
+
* public entries at `dist/*.mjs` and shared helper chunks under `dist/internal/`, the
|
|
8
|
+
* pstack build writes `dist/pstack/`, and the packaging step writes `dist/skills/`.
|
|
14
9
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* from the catalog, so a broken asset is a startup error rather than a skill
|
|
19
|
-
* users silently cannot see.
|
|
20
|
-
* - `get()` only accepts a locator this provider produced. Directory names are
|
|
21
|
-
* never joined from caller input.
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Standard precedence rank for packaged skill providers, re-exported by
|
|
25
|
-
* `@deepseek-ai/dsh-skill` as `BUNDLED_SKILL_RANK`. Restated to keep the package
|
|
26
|
-
* dependency-free; a mismatch only changes which provider wins a name collision.
|
|
10
|
+
* `PACKAGE_ROOT` therefore sits either one level above this module (an entry bundle in
|
|
11
|
+
* `dist/`) or two (a helper chunk in `dist/internal/`). Both layouts are known, so the
|
|
12
|
+
* directory name decides instead of probing for `dist` first and falling back.
|
|
27
13
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
14
|
+
/** Absolute path of the package root. */
|
|
15
|
+
export declare const PACKAGE_ROOT: string;
|
|
16
|
+
/** Absolute path of the generated pstack tree. */
|
|
17
|
+
export declare const PORT_ROOT: string;
|
|
18
|
+
/** Absolute path of the ported pstack skill directories. */
|
|
19
|
+
export declare const SKILLS_ROOT: string;
|
|
20
|
+
/** Absolute path of the vendored skill directories (`skills/vendored` at pack time). */
|
|
21
|
+
export declare const VENDORED_SKILLS_ROOT: string;
|
|
22
|
+
/** Absolute path of the skills authored in this repository. */
|
|
23
|
+
export declare const AUTHORED_SKILLS_ROOT: string;
|
|
24
|
+
/** Absolute path of the shipped harness mapping document. */
|
|
25
|
+
export declare const HARNESS_DOC_PATH: string;
|
|
26
|
+
/** One skill root the provider loads, labelled for collision errors. */
|
|
27
|
+
interface SkillRoot {
|
|
36
28
|
readonly path: string;
|
|
37
|
-
|
|
38
|
-
readonly kind: "url";
|
|
39
|
-
readonly url: string;
|
|
40
|
-
} | {
|
|
41
|
-
readonly kind: "opaque";
|
|
42
|
-
readonly description: string;
|
|
43
|
-
};
|
|
44
|
-
/** Invocation controls shared by skill discovery consumers. */
|
|
45
|
-
interface SkillInvocationPolicy {
|
|
46
|
-
/** Whether model-facing catalogs and loaders include this skill. */
|
|
47
|
-
readonly modelInvocable: boolean;
|
|
48
|
-
/** Whether human-facing command catalogs and loaders include this skill. */
|
|
49
|
-
readonly userInvocable: boolean;
|
|
50
|
-
}
|
|
51
|
-
/** Invocation-neutral skill metadata returned by `ctx.skills.list()`. */
|
|
52
|
-
interface SkillSummary {
|
|
53
|
-
/** Absolute instruction file path. */
|
|
54
|
-
readonly path?: string;
|
|
55
|
-
/** Kebab-case identifier used to address the skill. */
|
|
56
|
-
readonly name: string;
|
|
57
|
-
/** Short routing description shown by discovery consumers. */
|
|
58
|
-
readonly description: string;
|
|
59
|
-
/** Optional extra routing guidance. */
|
|
60
|
-
readonly whenToUse?: string;
|
|
61
|
-
/** Resolved model and user invocation controls. */
|
|
62
|
-
readonly invocation: SkillInvocationPolicy;
|
|
63
|
-
/** Discovery source that produced this skill. */
|
|
64
|
-
readonly source: SkillSource;
|
|
65
|
-
/** Provider that owns this skill body. */
|
|
66
|
-
readonly provider: string;
|
|
67
|
-
/** Provider-specific base for relative resources. */
|
|
68
|
-
readonly resourceBase?: SkillResourceBase;
|
|
69
|
-
}
|
|
70
|
-
/** Provider catalog entry used by the registry to merge and later load skills. */
|
|
71
|
-
interface SkillCandidate extends SkillSummary {
|
|
72
|
-
/** Lower ranks win duplicate skill names. */
|
|
73
|
-
readonly rank: number;
|
|
74
|
-
/** Opaque provider-owned handle passed back to `provider.get()`. */
|
|
75
|
-
readonly locator: unknown;
|
|
76
|
-
/** Parsed optional metadata object from provider-specific skill frontmatter. */
|
|
77
|
-
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
78
|
-
}
|
|
79
|
-
/** Complete parsed skill definition, including the body loaded by `ctx.skills.get()`. */
|
|
80
|
-
interface SkillDefinition extends SkillSummary {
|
|
81
|
-
/** Markdown instruction body after frontmatter removal. */
|
|
82
|
-
readonly content: string;
|
|
83
|
-
/** Parsed optional metadata object from frontmatter. */
|
|
84
|
-
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
85
|
-
}
|
|
86
|
-
/** Caller context used for cwd-sensitive and abortable provider work. */
|
|
87
|
-
interface SkillLookupOptions {
|
|
88
|
-
/** Workspace selector for the current lookup. */
|
|
89
|
-
readonly cwd?: string | undefined;
|
|
90
|
-
/** Abort discovery or loading work for the current caller. */
|
|
91
|
-
readonly signal?: AbortSignal | undefined;
|
|
92
|
-
}
|
|
93
|
-
/** Registration-scoped lifecycle capability handed to a provider factory. */
|
|
94
|
-
interface SkillProviderControl {
|
|
95
|
-
/** Aborts when registration fails or the exact provider registration is disposed. */
|
|
96
|
-
readonly signal: AbortSignal;
|
|
97
|
-
/** Invalidate completed catalogs and notify consumers. */
|
|
98
|
-
readonly invalidate: () => void;
|
|
99
|
-
}
|
|
100
|
-
/** Provider interface for one source of skills. */
|
|
101
|
-
interface SkillProvider {
|
|
102
|
-
/** Unique provider name in the `ctx.skills` registry. */
|
|
103
|
-
readonly name: string;
|
|
104
|
-
/** List available skill candidates for the current lookup context. */
|
|
105
|
-
readonly list: (options: SkillLookupOptions) => Promise<readonly SkillCandidate[]>;
|
|
106
|
-
/** Load a complete skill body for a previously listed candidate. */
|
|
107
|
-
readonly get: (candidate: SkillCandidate, options: SkillLookupOptions) => Promise<SkillDefinition | undefined>;
|
|
29
|
+
readonly label: string;
|
|
108
30
|
}
|
|
31
|
+
/** Every skill root, in load order. Recursive discovery handles each root's nesting. */
|
|
32
|
+
export declare const SKILL_ROOTS: readonly SkillRoot[];
|
|
33
|
+
/** Standard precedence rank for packaged skill providers. */
|
|
34
|
+
export declare const BUNDLED_SKILL_RANK = 600;
|
|
35
|
+
/** Default provider name. */
|
|
36
|
+
export declare const DEFAULT_PROVIDER_NAME = "pstack";
|
|
109
37
|
/** One validated on-disk bundled skill. */
|
|
110
38
|
interface BundledSkill {
|
|
111
39
|
readonly name: string;
|
|
112
40
|
readonly description: string;
|
|
113
41
|
readonly whenToUse?: string;
|
|
114
42
|
readonly invocation: SkillInvocationPolicy;
|
|
115
|
-
/** Absolute skill directory; the
|
|
43
|
+
/** Absolute skill directory; also the resource base. */
|
|
116
44
|
readonly directory: string;
|
|
117
45
|
/** Absolute `SKILL.md` path. */
|
|
118
46
|
readonly instructionFile: string;
|
|
@@ -124,155 +52,38 @@ export declare class BundledSkillError extends Error {
|
|
|
124
52
|
constructor(message: string);
|
|
125
53
|
}
|
|
126
54
|
/**
|
|
127
|
-
* Read and validate every bundled skill
|
|
55
|
+
* Read and validate every bundled skill under every root.
|
|
128
56
|
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* dropping a skill from the catalog.
|
|
133
|
-
*
|
|
134
|
-
* @param skillsRoot - absolute path of the directory holding the skill directories.
|
|
135
|
-
* @returns validated skills keyed by absolute skill directory, sorted by name.
|
|
136
|
-
* @throws {BundledSkillError} when the tree or any skill in it is malformed.
|
|
57
|
+
* A skill name may appear in only one root; a duplicate is a packaging mistake, so it
|
|
58
|
+
* fails activation rather than letting one silently shadow the other. A root that does
|
|
59
|
+
* not exist is skipped, but an empty merged catalog fails.
|
|
137
60
|
*/
|
|
138
|
-
export declare function
|
|
61
|
+
export declare function loadBundledSkillIndexes(roots: readonly SkillRoot[]): BundledSkillIndex;
|
|
139
62
|
/**
|
|
140
63
|
* Build the provider over an already validated index.
|
|
141
64
|
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* @returns a read-only provider whose catalog never changes until the package does.
|
|
65
|
+
* The catalog is sorted by name so two installs present the same order, and it never
|
|
66
|
+
* changes until the package does.
|
|
145
67
|
*/
|
|
146
68
|
export declare function createPstackSkillProvider(index: BundledSkillIndex, providerName?: string): SkillProvider;
|
|
147
|
-
/**
|
|
148
|
-
* Load the index and build the provider in one step, failing on a malformed tree.
|
|
149
|
-
*
|
|
150
|
-
* `apply()` uses this exact function, so the startup failure path and the
|
|
151
|
-
* provider used in tests are the same code.
|
|
152
|
-
*
|
|
153
|
-
* @param skillsRoot - absolute path of the bundled skill root.
|
|
154
|
-
* @param providerName - registry name for this provider.
|
|
155
|
-
* @returns the provider over the validated index.
|
|
156
|
-
*/
|
|
157
|
-
export declare function createPstackSkillProviderFromRoot(skillsRoot: string, providerName?: string): SkillProvider;
|
|
158
|
-
//#endregion
|
|
159
|
-
//#region src/paths.d.ts
|
|
160
|
-
/**
|
|
161
|
-
* Package-internal resource locations.
|
|
162
|
-
*
|
|
163
|
-
* The provider reads generated assets in place instead of copying them into a
|
|
164
|
-
* user-visible skills directory, so every path here is resolved from this
|
|
165
|
-
* module's own location. The modules run from `src/` in a checkout and from the
|
|
166
|
-
* bundled `dist/index.mjs` in an installed package; both sit one directory below
|
|
167
|
-
* the package root, so the same expression holds in both cases.
|
|
168
|
-
*/
|
|
169
|
-
/** Absolute path of the package root: the repository in a checkout, the install directory after packing. */
|
|
170
|
-
export declare const PACKAGE_ROOT: string;
|
|
171
|
-
/** Absolute path of the generated, committed assets directory. */
|
|
172
|
-
export declare const ASSETS_ROOT: string;
|
|
173
|
-
/** Absolute path of the directory holding the 55 bundled skill directories. */
|
|
174
|
-
export declare const SKILLS_ROOT: string;
|
|
175
|
-
/** Absolute path of the generated harness mapping document. */
|
|
176
|
-
export declare const HARNESS_DOC_PATH: string;
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region src/frontmatter.d.ts
|
|
179
|
-
/**
|
|
180
|
-
* Frontmatter parsing for pstack skills and agents.
|
|
181
|
-
*
|
|
182
|
-
* This is a deliberately small YAML subset, not YAML. It reads the shapes the
|
|
183
|
-
* upstream files use: plain scalars, single and double quotes, folded (`>` and
|
|
184
|
-
* `>-`) and literal (`|` and `|-`) blocks, comments, and blank lines. Nesting
|
|
185
|
-
* and multi-document streams are rejected rather than half-supported.
|
|
186
|
-
*/
|
|
187
|
-
export interface Frontmatter {
|
|
188
|
-
readonly data: Readonly<Record<string, string>>;
|
|
189
|
-
readonly body: string;
|
|
190
|
-
}
|
|
191
|
-
export interface SkillFrontmatter {
|
|
192
|
-
readonly name: string;
|
|
193
|
-
readonly description: string;
|
|
194
|
-
readonly disableModelInvocation: boolean;
|
|
195
|
-
readonly userInvocable: boolean;
|
|
196
|
-
readonly whenToUse?: string;
|
|
197
|
-
}
|
|
198
|
-
export interface AgentFrontmatter {
|
|
199
|
-
readonly name: string;
|
|
200
|
-
readonly description: string;
|
|
201
|
-
}
|
|
202
|
-
export interface DroppedFrontmatterField {
|
|
203
|
-
readonly file: string;
|
|
204
|
-
readonly field: string;
|
|
205
|
-
readonly value: string;
|
|
206
|
-
}
|
|
207
|
-
export declare const SKILL_CONSUMED_FIELDS: readonly ["name", "description", "disable-model-invocation", "user-invocable", "whenToUse"];
|
|
208
|
-
export declare const SKILL_DROPPED_FIELDS: readonly ["icon", "color", "paths"];
|
|
209
|
-
export declare const AGENT_CONSUMED_FIELDS: readonly ["name", "description"];
|
|
210
|
-
export declare const AGENT_DROPPED_FIELDS: readonly ["is_background"];
|
|
211
|
-
export declare const MAX_SKILL_NAME_LENGTH = 64;
|
|
212
|
-
export declare class FrontmatterError extends Error {
|
|
213
|
-
constructor(message: string);
|
|
214
|
-
}
|
|
215
|
-
export declare function parseFrontmatter(source: string): Frontmatter;
|
|
216
|
-
export declare function validateSkillFrontmatter(data: Readonly<Record<string, string>>, source: string): SkillFrontmatter;
|
|
217
|
-
export declare function validateAgentFrontmatter(data: Readonly<Record<string, string>>, source: string): AgentFrontmatter;
|
|
218
|
-
export declare function serializeSkillFrontmatter(data: SkillFrontmatter): string;
|
|
219
|
-
export declare function serializeAgentFrontmatter(data: AgentFrontmatter): string;
|
|
220
|
-
export declare function skillDroppedFields(data: Readonly<Record<string, string>>, source: string): readonly DroppedFrontmatterField[];
|
|
221
|
-
export declare function agentDroppedFields(data: Readonly<Record<string, string>>, source: string): readonly DroppedFrontmatterField[];
|
|
222
|
-
//#endregion
|
|
223
|
-
//#region src/index.d.ts
|
|
224
|
-
/** Plugin name used by Loader diagnostics for this row. */
|
|
69
|
+
/** Cordis row name, used by Loader diagnostics. */
|
|
225
70
|
export declare const name = "pstack";
|
|
226
|
-
/** The
|
|
71
|
+
/** The row needs the skill registry and the tool registry. */
|
|
227
72
|
export declare const inject: string[];
|
|
228
|
-
/** Row configuration. Every field is optional; an omitted `config` is valid. */
|
|
229
|
-
export interface PstackConfig {
|
|
230
|
-
/** Registry name for the provider; change it when two rows must coexist. */
|
|
231
|
-
readonly providerName?: string;
|
|
232
|
-
}
|
|
233
|
-
interface StandardSchemaIssue {
|
|
234
|
-
readonly message: string;
|
|
235
|
-
readonly path?: readonly (string | number)[];
|
|
236
|
-
}
|
|
237
|
-
type StandardSchemaResult = {
|
|
238
|
-
readonly value: PstackConfig;
|
|
239
|
-
readonly issues?: undefined;
|
|
240
|
-
} | {
|
|
241
|
-
readonly issues: readonly StandardSchemaIssue[];
|
|
242
|
-
};
|
|
243
|
-
/**
|
|
244
|
-
* Minimal Standard Schema validator for this plugin's row config.
|
|
245
|
-
*
|
|
246
|
-
* Cordis validates `apply()`'s second argument with `Config["~standard"]` and
|
|
247
|
-
* substitutes the returned `value`, so an omitted row `config` resolves to the
|
|
248
|
-
* documented defaults without a schemastery dependency.
|
|
249
|
-
*/
|
|
250
|
-
export declare const Config: {
|
|
251
|
-
"~standard": {
|
|
252
|
-
version: number;
|
|
253
|
-
vendor: string;
|
|
254
|
-
validate(value: unknown): StandardSchemaResult;
|
|
255
|
-
};
|
|
256
|
-
};
|
|
257
73
|
/** The slice of the Cordis context this plugin requires. */
|
|
258
74
|
export interface PstackSkillHost {
|
|
259
|
-
readonly skills: {
|
|
75
|
+
readonly skills: SkillsHost & {
|
|
260
76
|
registerProvider(create: (control: SkillProviderControl) => SkillProvider): () => void;
|
|
261
77
|
};
|
|
78
|
+
readonly tools: ToolsHost;
|
|
79
|
+
/** Optional-service read for `systemPrompt`; absent is fine. */
|
|
80
|
+
get?(name: string): unknown;
|
|
262
81
|
}
|
|
263
82
|
/**
|
|
264
|
-
* Register the bundled pstack skill provider.
|
|
265
|
-
*
|
|
266
|
-
* The bundled tree is validated before the provider registers, so a malformed
|
|
267
|
-
* `SKILL.md` fails plugin activation with a path-qualified error instead of
|
|
268
|
-
* removing one skill from the catalog. Nothing is copied out of the package and
|
|
269
|
-
* nothing is watched: reinstalling the package is the refresh boundary.
|
|
83
|
+
* Register the bundled pstack skill provider and the trusted loader.
|
|
270
84
|
*
|
|
271
|
-
* @param ctx - host context carrying the skill
|
|
272
|
-
* @
|
|
273
|
-
* @throws {import("./provider.ts").BundledSkillError} when the bundled tree is malformed.
|
|
85
|
+
* @param ctx - host context carrying the skill and tool registries.
|
|
86
|
+
* @throws {import("./internal/skill-provider.ts").BundledSkillError} when the tree is malformed.
|
|
274
87
|
*/
|
|
275
|
-
export declare function apply(ctx: PstackSkillHost
|
|
276
|
-
|
|
277
|
-
export type { BundledSkill, BundledSkillIndex, SkillCandidate, SkillDefinition, SkillInvocationPolicy, SkillLookupOptions, SkillProvider, SkillProviderControl, SkillResourceBase, SkillSource, SkillSummary };
|
|
278
|
-
//# sourceMappingURL=index.d.mts.map
|
|
88
|
+
export declare function apply(ctx: PstackSkillHost): void;
|
|
89
|
+
export { type LoadSkillResult, TOOL_NAME as PSTACK_SKILL_TOOL_NAME, type SkillResourceResult, type SkillRoot, createPstackSkillTool, readSkillResource, renderLoadedSkill };
|