psyclaw 0.24.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 +21 -0
- package/README.md +67 -0
- package/dist/apps/panel/index.html +3416 -0
- package/dist/src/adapters/pi/extension.d.ts +19 -0
- package/dist/src/adapters/pi/extension.js +735 -0
- package/dist/src/adapters/pi/extension.js.map +1 -0
- package/dist/src/adapters/pi/model.d.ts +72 -0
- package/dist/src/adapters/pi/model.js +152 -0
- package/dist/src/adapters/pi/model.js.map +1 -0
- package/dist/src/adapters/pi/resources.d.ts +23 -0
- package/dist/src/adapters/pi/resources.js +54 -0
- package/dist/src/adapters/pi/resources.js.map +1 -0
- package/dist/src/adapters/pi/rpc.d.ts +56 -0
- package/dist/src/adapters/pi/rpc.js +248 -0
- package/dist/src/adapters/pi/rpc.js.map +1 -0
- package/dist/src/adapters/pi/session.d.ts +30 -0
- package/dist/src/adapters/pi/session.js +64 -0
- package/dist/src/adapters/pi/session.js.map +1 -0
- package/dist/src/agents/catalog.d.ts +30 -0
- package/dist/src/agents/catalog.js +118 -0
- package/dist/src/agents/catalog.js.map +1 -0
- package/dist/src/agents/discover.d.ts +28 -0
- package/dist/src/agents/discover.js +127 -0
- package/dist/src/agents/discover.js.map +1 -0
- package/dist/src/agents/import.d.ts +67 -0
- package/dist/src/agents/import.js +801 -0
- package/dist/src/agents/import.js.map +1 -0
- package/dist/src/analysis/hooks.d.ts +81 -0
- package/dist/src/analysis/hooks.js +139 -0
- package/dist/src/analysis/hooks.js.map +1 -0
- package/dist/src/analysis/pre-registration.d.ts +18 -0
- package/dist/src/analysis/pre-registration.js +86 -0
- package/dist/src/analysis/pre-registration.js.map +1 -0
- package/dist/src/branding.d.ts +43 -0
- package/dist/src/branding.js +127 -0
- package/dist/src/branding.js.map +1 -0
- package/dist/src/chat.d.ts +16 -0
- package/dist/src/chat.js +67 -0
- package/dist/src/chat.js.map +1 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +316 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/core/citations.d.ts +44 -0
- package/dist/src/core/citations.js +48 -0
- package/dist/src/core/citations.js.map +1 -0
- package/dist/src/core/contracts.d.ts +119 -0
- package/dist/src/core/contracts.js +2 -0
- package/dist/src/core/contracts.js.map +1 -0
- package/dist/src/core/docx.d.ts +11 -0
- package/dist/src/core/docx.js +46 -0
- package/dist/src/core/docx.js.map +1 -0
- package/dist/src/core/doi.d.ts +41 -0
- package/dist/src/core/doi.js +82 -0
- package/dist/src/core/doi.js.map +1 -0
- package/dist/src/core/evidence-policy.d.ts +24 -0
- package/dist/src/core/evidence-policy.js +308 -0
- package/dist/src/core/evidence-policy.js.map +1 -0
- package/dist/src/core/filekind.d.ts +15 -0
- package/dist/src/core/filekind.js +82 -0
- package/dist/src/core/filekind.js.map +1 -0
- package/dist/src/core/hash.d.ts +2 -0
- package/dist/src/core/hash.js +17 -0
- package/dist/src/core/hash.js.map +1 -0
- package/dist/src/core/pricing.d.ts +38 -0
- package/dist/src/core/pricing.js +110 -0
- package/dist/src/core/pricing.js.map +1 -0
- package/dist/src/core/redact.d.ts +12 -0
- package/dist/src/core/redact.js +48 -0
- package/dist/src/core/redact.js.map +1 -0
- package/dist/src/core/references.d.ts +55 -0
- package/dist/src/core/references.js +102 -0
- package/dist/src/core/references.js.map +1 -0
- package/dist/src/core/schemas.d.ts +162 -0
- package/dist/src/core/schemas.js +160 -0
- package/dist/src/core/schemas.js.map +1 -0
- package/dist/src/extension.d.ts +1 -0
- package/dist/src/extension.js +2 -0
- package/dist/src/extension.js.map +1 -0
- package/dist/src/index.d.ts +72 -0
- package/dist/src/index.js +73 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/install/installer.d.ts +147 -0
- package/dist/src/install/installer.js +743 -0
- package/dist/src/install/installer.js.map +1 -0
- package/dist/src/integrations/contracts.d.ts +35 -0
- package/dist/src/integrations/contracts.js +27 -0
- package/dist/src/integrations/contracts.js.map +1 -0
- package/dist/src/integrations/mcp.d.ts +155 -0
- package/dist/src/integrations/mcp.js +826 -0
- package/dist/src/integrations/mcp.js.map +1 -0
- package/dist/src/knowledge-map/contracts.d.ts +20 -0
- package/dist/src/knowledge-map/contracts.js +2 -0
- package/dist/src/knowledge-map/contracts.js.map +1 -0
- package/dist/src/knowledge-map/index.d.ts +4 -0
- package/dist/src/knowledge-map/index.js +39 -0
- package/dist/src/knowledge-map/index.js.map +1 -0
- package/dist/src/literature/contracts.d.ts +106 -0
- package/dist/src/literature/contracts.js +2 -0
- package/dist/src/literature/contracts.js.map +1 -0
- package/dist/src/literature/fulltext.d.ts +7 -0
- package/dist/src/literature/fulltext.js +24 -0
- package/dist/src/literature/fulltext.js.map +1 -0
- package/dist/src/literature/knowledge-map.d.ts +2 -0
- package/dist/src/literature/knowledge-map.js +20 -0
- package/dist/src/literature/knowledge-map.js.map +1 -0
- package/dist/src/literature/ledger.d.ts +3 -0
- package/dist/src/literature/ledger.js +17 -0
- package/dist/src/literature/ledger.js.map +1 -0
- package/dist/src/literature/metadata.d.ts +6 -0
- package/dist/src/literature/metadata.js +32 -0
- package/dist/src/literature/metadata.js.map +1 -0
- package/dist/src/memory/store.d.ts +22 -0
- package/dist/src/memory/store.js +73 -0
- package/dist/src/memory/store.js.map +1 -0
- package/dist/src/orchestration/contracts.d.ts +61 -0
- package/dist/src/orchestration/contracts.js +2 -0
- package/dist/src/orchestration/contracts.js.map +1 -0
- package/dist/src/orchestration/pi-executor.d.ts +28 -0
- package/dist/src/orchestration/pi-executor.js +169 -0
- package/dist/src/orchestration/pi-executor.js.map +1 -0
- package/dist/src/orchestration/runner.d.ts +196 -0
- package/dist/src/orchestration/runner.js +991 -0
- package/dist/src/orchestration/runner.js.map +1 -0
- package/dist/src/orchestration/scheduler.d.ts +8 -0
- package/dist/src/orchestration/scheduler.js +335 -0
- package/dist/src/orchestration/scheduler.js.map +1 -0
- package/dist/src/panel/events.d.ts +20 -0
- package/dist/src/panel/events.js +93 -0
- package/dist/src/panel/events.js.map +1 -0
- package/dist/src/panel/extension.d.ts +8 -0
- package/dist/src/panel/extension.js +114 -0
- package/dist/src/panel/extension.js.map +1 -0
- package/dist/src/panel/literature-map.d.ts +26 -0
- package/dist/src/panel/literature-map.js +34 -0
- package/dist/src/panel/literature-map.js.map +1 -0
- package/dist/src/panel/projection.d.ts +51 -0
- package/dist/src/panel/projection.js +288 -0
- package/dist/src/panel/projection.js.map +1 -0
- package/dist/src/panel/server.d.ts +46 -0
- package/dist/src/panel/server.js +1610 -0
- package/dist/src/panel/server.js.map +1 -0
- package/dist/src/panel/usage.d.ts +53 -0
- package/dist/src/panel/usage.js +150 -0
- package/dist/src/panel/usage.js.map +1 -0
- package/dist/src/project/bootstrap.d.ts +10 -0
- package/dist/src/project/bootstrap.js +83 -0
- package/dist/src/project/bootstrap.js.map +1 -0
- package/dist/src/project/hitl.d.ts +12 -0
- package/dist/src/project/hitl.js +43 -0
- package/dist/src/project/hitl.js.map +1 -0
- package/dist/src/project/jsonl.d.ts +16 -0
- package/dist/src/project/jsonl.js +93 -0
- package/dist/src/project/jsonl.js.map +1 -0
- package/dist/src/project/manuscript.d.ts +21 -0
- package/dist/src/project/manuscript.js +74 -0
- package/dist/src/project/manuscript.js.map +1 -0
- package/dist/src/project/paths.d.ts +38 -0
- package/dist/src/project/paths.js +166 -0
- package/dist/src/project/paths.js.map +1 -0
- package/dist/src/project/versions.d.ts +10 -0
- package/dist/src/project/versions.js +14 -0
- package/dist/src/project/versions.js.map +1 -0
- package/dist/src/psyclaw-theme.d.ts +88 -0
- package/dist/src/psyclaw-theme.js +89 -0
- package/dist/src/psyclaw-theme.js.map +1 -0
- package/dist/src/research/brief.d.ts +11 -0
- package/dist/src/research/brief.js +81 -0
- package/dist/src/research/brief.js.map +1 -0
- package/dist/src/research/ledger.d.ts +12 -0
- package/dist/src/research/ledger.js +43 -0
- package/dist/src/research/ledger.js.map +1 -0
- package/dist/src/run.d.ts +20 -0
- package/dist/src/run.js +34 -0
- package/dist/src/run.js.map +1 -0
- package/dist/src/setup.d.ts +54 -0
- package/dist/src/setup.js +221 -0
- package/dist/src/setup.js.map +1 -0
- package/dist/src/skills/contracts.d.ts +105 -0
- package/dist/src/skills/contracts.js +3 -0
- package/dist/src/skills/contracts.js.map +1 -0
- package/dist/src/skills/preflight.d.ts +10 -0
- package/dist/src/skills/preflight.js +39 -0
- package/dist/src/skills/preflight.js.map +1 -0
- package/dist/src/skills/registry.d.ts +28 -0
- package/dist/src/skills/registry.js +556 -0
- package/dist/src/skills/registry.js.map +1 -0
- package/dist/src/style/artifact.d.ts +6 -0
- package/dist/src/style/artifact.js +61 -0
- package/dist/src/style/artifact.js.map +1 -0
- package/dist/src/style/cli-ui.d.ts +41 -0
- package/dist/src/style/cli-ui.js +119 -0
- package/dist/src/style/cli-ui.js.map +1 -0
- package/dist/src/style/contracts.d.ts +34 -0
- package/dist/src/style/contracts.js +2 -0
- package/dist/src/style/contracts.js.map +1 -0
- package/dist/src/style/registry.d.ts +16 -0
- package/dist/src/style/registry.js +50 -0
- package/dist/src/style/registry.js.map +1 -0
- package/dist/src/trust/manifest.d.ts +42 -0
- package/dist/src/trust/manifest.js +53 -0
- package/dist/src/trust/manifest.js.map +1 -0
- package/dist/src/trust/sbom.d.ts +54 -0
- package/dist/src/trust/sbom.js +77 -0
- package/dist/src/trust/sbom.js.map +1 -0
- package/dist/src/tui/app.d.ts +3 -0
- package/dist/src/tui/app.js +103 -0
- package/dist/src/tui/app.js.map +1 -0
- package/dist/src/tui/model.d.ts +13 -0
- package/dist/src/tui/model.js +25 -0
- package/dist/src/tui/model.js.map +1 -0
- package/dist/src/updates/check.d.ts +43 -0
- package/dist/src/updates/check.js +68 -0
- package/dist/src/updates/check.js.map +1 -0
- package/dist/src/updates/manifest.d.ts +19 -0
- package/dist/src/updates/manifest.js +58 -0
- package/dist/src/updates/manifest.js.map +1 -0
- package/dist/src/updates/registry.d.ts +21 -0
- package/dist/src/updates/registry.js +82 -0
- package/dist/src/updates/registry.js.map +1 -0
- package/dist/src/updates/skills.d.ts +15 -0
- package/dist/src/updates/skills.js +39 -0
- package/dist/src/updates/skills.js.map +1 -0
- package/dist/src/updates/status.d.ts +7 -0
- package/dist/src/updates/status.js +37 -0
- package/dist/src/updates/status.js.map +1 -0
- package/dist/src/updates/update.d.ts +43 -0
- package/dist/src/updates/update.js +126 -0
- package/dist/src/updates/update.js.map +1 -0
- package/dist/src/wizard.d.ts +7 -0
- package/dist/src/wizard.js +90 -0
- package/dist/src/wizard.js.map +1 -0
- package/dist/src/workflows/analysis-delegation.d.ts +3 -0
- package/dist/src/workflows/analysis-delegation.js +96 -0
- package/dist/src/workflows/analysis-delegation.js.map +1 -0
- package/dist/src/workflows/expert-review-runner.d.ts +29 -0
- package/dist/src/workflows/expert-review-runner.js +35 -0
- package/dist/src/workflows/expert-review-runner.js.map +1 -0
- package/dist/src/workflows/expert-review.d.ts +140 -0
- package/dist/src/workflows/expert-review.js +111 -0
- package/dist/src/workflows/expert-review.js.map +1 -0
- package/dist/src/workflows/institutional-fulltext.d.ts +16 -0
- package/dist/src/workflows/institutional-fulltext.js +110 -0
- package/dist/src/workflows/institutional-fulltext.js.map +1 -0
- package/dist/src/workflows/literature-review.d.ts +3 -0
- package/dist/src/workflows/literature-review.js +76 -0
- package/dist/src/workflows/literature-review.js.map +1 -0
- package/dist/src/workflows/meta-analysis.d.ts +38 -0
- package/dist/src/workflows/meta-analysis.js +185 -0
- package/dist/src/workflows/meta-analysis.js.map +1 -0
- package/dist/src/workflows/publish.d.ts +51 -0
- package/dist/src/workflows/publish.js +153 -0
- package/dist/src/workflows/publish.js.map +1 -0
- package/dist/src/workflows/spec.d.ts +51 -0
- package/dist/src/workflows/spec.js +157 -0
- package/dist/src/workflows/spec.js.map +1 -0
- package/dist/src/workflows/style-contract.d.ts +24 -0
- package/dist/src/workflows/style-contract.js +23 -0
- package/dist/src/workflows/style-contract.js.map +1 -0
- package/dist/src/workflows/writing-review.d.ts +15 -0
- package/dist/src/workflows/writing-review.js +82 -0
- package/dist/src/workflows/writing-review.js.map +1 -0
- package/package.json +73 -0
- package/package.json.psyclaw +21 -0
- package/skills/core/citation-audit/SKILL.md +9 -0
- package/skills/core/evidence-capture/SKILL.md +9 -0
- package/skills/core/manifest.json +15 -0
- package/skills/core/research-brief/SKILL.md +11 -0
- package/skills/core/research-intake/SKILL.md +9 -0
- package/skills/recommended/catalog.json +52 -0
- package/skills/recommended/mcp-catalog.json +118 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export * from "./agents/catalog.js";
|
|
2
|
+
export * from "./agents/discover.js";
|
|
3
|
+
export * from "./agents/import.js";
|
|
4
|
+
export * from "./branding.js";
|
|
5
|
+
export * from "./psyclaw-theme.js";
|
|
6
|
+
export * from "./chat.js";
|
|
7
|
+
export * from "./run.js";
|
|
8
|
+
export * from "./setup.js";
|
|
9
|
+
export * from "./core/contracts.js";
|
|
10
|
+
export * from "./core/docx.js";
|
|
11
|
+
export * from "./core/evidence-policy.js";
|
|
12
|
+
export * from "./core/filekind.js";
|
|
13
|
+
export * from "./core/hash.js";
|
|
14
|
+
export * from "./core/redact.js";
|
|
15
|
+
export * from "./core/schemas.js";
|
|
16
|
+
export * from "./project/bootstrap.js";
|
|
17
|
+
export * from "./project/jsonl.js";
|
|
18
|
+
export * from "./project/paths.js";
|
|
19
|
+
export * from "./project/versions.js";
|
|
20
|
+
export * from "./project/hitl.js";
|
|
21
|
+
export * from "./integrations/contracts.js";
|
|
22
|
+
export * from "./orchestration/contracts.js";
|
|
23
|
+
export * from "./research/ledger.js";
|
|
24
|
+
export * from "./research/brief.js";
|
|
25
|
+
export * from "./memory/store.js";
|
|
26
|
+
export * from "./orchestration/scheduler.js";
|
|
27
|
+
export * from "./orchestration/runner.js";
|
|
28
|
+
export * from "./integrations/mcp.js";
|
|
29
|
+
export * from "./install/installer.js";
|
|
30
|
+
export * from "./panel/events.js";
|
|
31
|
+
export * from "./panel/projection.js";
|
|
32
|
+
export * from "./panel/server.js";
|
|
33
|
+
export * from "./skills/contracts.js";
|
|
34
|
+
export * from "./skills/preflight.js";
|
|
35
|
+
export * from "./skills/registry.js";
|
|
36
|
+
export * from "./trust/manifest.js";
|
|
37
|
+
export * from "./trust/sbom.js";
|
|
38
|
+
export * from "./workflows/spec.js";
|
|
39
|
+
export * from "./workflows/literature-review.js";
|
|
40
|
+
export * from "./workflows/analysis-delegation.js";
|
|
41
|
+
export * from "./workflows/meta-analysis.js";
|
|
42
|
+
export * from "./workflows/publish.js";
|
|
43
|
+
export * from "./core/citations.js";
|
|
44
|
+
export * from "./workflows/writing-review.js";
|
|
45
|
+
export * from "./workflows/institutional-fulltext.js";
|
|
46
|
+
export * from "./workflows/expert-review.js";
|
|
47
|
+
export * from "./workflows/expert-review-runner.js";
|
|
48
|
+
export * from "./workflows/style-contract.js";
|
|
49
|
+
export * from "./style/contracts.js";
|
|
50
|
+
export * from "./style/registry.js";
|
|
51
|
+
export * from "./style/artifact.js";
|
|
52
|
+
export * from "./literature/contracts.js";
|
|
53
|
+
export * from "./literature/fulltext.js";
|
|
54
|
+
export * from "./literature/ledger.js";
|
|
55
|
+
export * from "./literature/knowledge-map.js";
|
|
56
|
+
export * from "./literature/metadata.js";
|
|
57
|
+
export { buildKnowledgeMap } from "./knowledge-map/index.js";
|
|
58
|
+
export * from "./analysis/hooks.js";
|
|
59
|
+
export * from "./analysis/pre-registration.js";
|
|
60
|
+
export * from "./updates/registry.js";
|
|
61
|
+
export * from "./updates/status.js";
|
|
62
|
+
export * from "./updates/skills.js";
|
|
63
|
+
export * from "./updates/manifest.js";
|
|
64
|
+
export * from "./updates/check.js";
|
|
65
|
+
export * from "./updates/update.js";
|
|
66
|
+
export * from "./adapters/pi/model.js";
|
|
67
|
+
export * from "./branding.js";
|
|
68
|
+
export * from "./adapters/pi/resources.js";
|
|
69
|
+
export * from "./adapters/pi/session.js";
|
|
70
|
+
export * from "./adapters/pi/rpc.js";
|
|
71
|
+
export * from "./orchestration/pi-executor.js";
|
|
72
|
+
export { default as psyclawPanelExtension } from "./panel/extension.js";
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { Effect, ToolReceipt } from "../core/contracts.js";
|
|
2
|
+
import type { AgentInstallSpec } from "../agents/catalog.js";
|
|
3
|
+
export type InstallKind = "agent" | "skill" | "package";
|
|
4
|
+
export interface InstallDependency {
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
license?: string;
|
|
8
|
+
sha256?: string;
|
|
9
|
+
status?: "ready" | "missing" | "blocked";
|
|
10
|
+
}
|
|
11
|
+
export interface InstallSbom {
|
|
12
|
+
format: "CycloneDX";
|
|
13
|
+
specVersion: "1.5";
|
|
14
|
+
/** Relative path inside the staging directory. */
|
|
15
|
+
path: string;
|
|
16
|
+
sha256: string;
|
|
17
|
+
}
|
|
18
|
+
export interface InstallPlan {
|
|
19
|
+
schemaVersion: "psyclaw/install-plan/v1";
|
|
20
|
+
id: string;
|
|
21
|
+
kind: InstallKind;
|
|
22
|
+
targetId: string;
|
|
23
|
+
sourceRef: string;
|
|
24
|
+
/** Pinned version/ref. `unpinned` is never a verified install. */
|
|
25
|
+
ref: string;
|
|
26
|
+
command: string;
|
|
27
|
+
effect: Effect;
|
|
28
|
+
/** Activation target path. Required for skill/package installs. */
|
|
29
|
+
target?: string;
|
|
30
|
+
/** Controlled staging directory the runner must download into. */
|
|
31
|
+
stagingDir?: string;
|
|
32
|
+
/** File inside `stagingDir` whose SHA-256 is the content pin. */
|
|
33
|
+
contentFile?: string;
|
|
34
|
+
expectedSha256?: string;
|
|
35
|
+
license?: string;
|
|
36
|
+
/** Optional license evidence file inside staging. */
|
|
37
|
+
licenseFile?: string;
|
|
38
|
+
licenseSha256?: string;
|
|
39
|
+
/** Exact dependency pins audited before activation. */
|
|
40
|
+
dependencies?: readonly InstallDependency[];
|
|
41
|
+
/** Optional CycloneDX 1.5 SBOM descriptor for the staged package. */
|
|
42
|
+
sbom?: InstallSbom;
|
|
43
|
+
/** Optional project root used to enforce containment and symlink checks. */
|
|
44
|
+
projectRoot?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface InstallApproval {
|
|
47
|
+
approved: boolean;
|
|
48
|
+
actor: string;
|
|
49
|
+
reason: string;
|
|
50
|
+
}
|
|
51
|
+
export interface InstallRunner {
|
|
52
|
+
(command: string, context?: {
|
|
53
|
+
plan: InstallPlan;
|
|
54
|
+
stagingDir?: string;
|
|
55
|
+
target?: string;
|
|
56
|
+
}): Promise<{
|
|
57
|
+
exitCode: number;
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
60
|
+
/** Idempotency ledger: a given install identity must execute at most once. */
|
|
61
|
+
export interface InstallLedger {
|
|
62
|
+
alreadyRecorded(key: string): Promise<boolean>;
|
|
63
|
+
record(key: string): Promise<void>;
|
|
64
|
+
/** Atomically reserve a key before an external command is started. */
|
|
65
|
+
reserve?(key: string): Promise<boolean>;
|
|
66
|
+
/** Release a reservation when the command fails before it is recorded. */
|
|
67
|
+
release?(key: string): Promise<void>;
|
|
68
|
+
}
|
|
69
|
+
export declare class InMemoryInstallLedger implements InstallLedger {
|
|
70
|
+
private readonly keys;
|
|
71
|
+
private readonly reservations;
|
|
72
|
+
alreadyRecorded(key: string): Promise<boolean>;
|
|
73
|
+
reserve(key: string): Promise<boolean>;
|
|
74
|
+
record(key: string): Promise<void>;
|
|
75
|
+
release(key: string): Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
/** Project-local append-only install ledger (`.psyclaw/installs.jsonl`). */
|
|
78
|
+
export declare class FileInstallLedger implements InstallLedger {
|
|
79
|
+
private readonly root;
|
|
80
|
+
constructor(root: string);
|
|
81
|
+
private path;
|
|
82
|
+
private lockPath;
|
|
83
|
+
alreadyRecorded(key: string): Promise<boolean>;
|
|
84
|
+
reserve(key: string): Promise<boolean>;
|
|
85
|
+
record(key: string): Promise<void>;
|
|
86
|
+
release(key: string): Promise<void>;
|
|
87
|
+
}
|
|
88
|
+
export interface SkillInstallPlanOptions {
|
|
89
|
+
targetId: string;
|
|
90
|
+
sourceRef: string;
|
|
91
|
+
/** A commit/tag/package version. Omitted only for the deprecated legacy path. */
|
|
92
|
+
ref?: string;
|
|
93
|
+
command: string;
|
|
94
|
+
target?: string;
|
|
95
|
+
stagingDir?: string;
|
|
96
|
+
contentFile?: string;
|
|
97
|
+
expectedSha256?: string;
|
|
98
|
+
license?: string;
|
|
99
|
+
licenseFile?: string;
|
|
100
|
+
licenseSha256?: string;
|
|
101
|
+
dependencies?: readonly InstallDependency[];
|
|
102
|
+
sbom?: InstallSbom;
|
|
103
|
+
projectRoot?: string;
|
|
104
|
+
}
|
|
105
|
+
export declare function planAgentInstall(agent: {
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
install?: AgentInstallSpec;
|
|
109
|
+
}, options?: {
|
|
110
|
+
projectRoot?: string;
|
|
111
|
+
}): InstallPlan;
|
|
112
|
+
export declare function planSkillInstall(options: SkillInstallPlanOptions): InstallPlan;
|
|
113
|
+
/** Verify a downloaded file against an expected SHA-256 before trusting it. */
|
|
114
|
+
export declare function verifyFileSha256(path: string, expected: string): Promise<{
|
|
115
|
+
ok: boolean;
|
|
116
|
+
reason?: string;
|
|
117
|
+
}>;
|
|
118
|
+
export interface InstallRecord {
|
|
119
|
+
schemaVersion: "psyclaw/install-record/v1";
|
|
120
|
+
status: "installed" | "already-recorded" | "blocked" | "failed";
|
|
121
|
+
plan: InstallPlan;
|
|
122
|
+
receipt: ToolReceipt;
|
|
123
|
+
verified: boolean;
|
|
124
|
+
verificationReason?: string;
|
|
125
|
+
recordedAt: string;
|
|
126
|
+
contentSha256?: string;
|
|
127
|
+
sbomSha256?: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Execute an approved agent install through an injectable runner. Reservation
|
|
131
|
+
* happens before the runner starts; an unknown runner exception keeps the
|
|
132
|
+
* reservation so a retry cannot repeat an unobserved side effect.
|
|
133
|
+
*/
|
|
134
|
+
export declare function runInstall(plan: InstallPlan, approval: InstallApproval, runner: InstallRunner, options?: {
|
|
135
|
+
now?: () => string;
|
|
136
|
+
ledger?: InstallLedger;
|
|
137
|
+
}): Promise<ToolReceipt>;
|
|
138
|
+
/**
|
|
139
|
+
* Download a skill/package into a fresh controlled staging directory, verify
|
|
140
|
+
* hash, license, exact dependencies and CycloneDX SBOM, then atomically
|
|
141
|
+
* activate it. Verification failures never activate or overwrite a target.
|
|
142
|
+
*/
|
|
143
|
+
export declare function installSkillPackage(plan: InstallPlan, approval: InstallApproval, runner: InstallRunner, options: {
|
|
144
|
+
now?: () => string;
|
|
145
|
+
ledger?: InstallLedger;
|
|
146
|
+
downloadPath?: string;
|
|
147
|
+
}): Promise<InstallRecord>;
|