psyclaw 0.24.0 → 0.25.2
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/README.md +46 -53
- package/{dist/apps → apps}/panel/index.html +28 -50
- package/package.json +10 -20
- package/scripts/__pycache__/build_dist.cpython-314.pyc +0 -0
- package/scripts/__pycache__/build_whitepaper_docx.cpython-314.pyc +0 -0
- package/scripts/build_preprint_docx.py +729 -0
- package/scripts/build_preprint_figures.py +238 -0
- package/scripts/build_three_line_table_fixture.py +56 -0
- package/scripts/build_whitepaper_docx.py +768 -0
- package/scripts/check-branding.mjs +159 -0
- package/scripts/copy-panel.mjs +11 -0
- package/scripts/rebrand-pi.mjs +292 -0
- package/scripts/verify_docx.py +41 -0
- package/skills/core/citation-audit/SKILL.md +9 -9
- package/skills/core/evidence-capture/SKILL.md +9 -9
- package/skills/core/manifest.json +15 -15
- package/skills/core/research-brief/SKILL.md +8 -8
- package/skills/core/research-intake/SKILL.md +9 -9
- package/dist/src/adapters/pi/extension.d.ts +0 -19
- package/dist/src/adapters/pi/extension.js +0 -735
- package/dist/src/adapters/pi/extension.js.map +0 -1
- package/dist/src/adapters/pi/model.d.ts +0 -72
- package/dist/src/adapters/pi/model.js +0 -152
- package/dist/src/adapters/pi/model.js.map +0 -1
- package/dist/src/adapters/pi/resources.d.ts +0 -23
- package/dist/src/adapters/pi/resources.js +0 -54
- package/dist/src/adapters/pi/resources.js.map +0 -1
- package/dist/src/adapters/pi/rpc.d.ts +0 -56
- package/dist/src/adapters/pi/rpc.js +0 -248
- package/dist/src/adapters/pi/rpc.js.map +0 -1
- package/dist/src/adapters/pi/session.d.ts +0 -30
- package/dist/src/adapters/pi/session.js +0 -64
- package/dist/src/adapters/pi/session.js.map +0 -1
- package/dist/src/agents/catalog.d.ts +0 -30
- package/dist/src/agents/catalog.js +0 -118
- package/dist/src/agents/catalog.js.map +0 -1
- package/dist/src/agents/discover.d.ts +0 -28
- package/dist/src/agents/discover.js +0 -127
- package/dist/src/agents/discover.js.map +0 -1
- package/dist/src/agents/import.d.ts +0 -67
- package/dist/src/agents/import.js +0 -801
- package/dist/src/agents/import.js.map +0 -1
- package/dist/src/analysis/hooks.d.ts +0 -81
- package/dist/src/analysis/hooks.js +0 -139
- package/dist/src/analysis/hooks.js.map +0 -1
- package/dist/src/analysis/pre-registration.d.ts +0 -18
- package/dist/src/analysis/pre-registration.js +0 -86
- package/dist/src/analysis/pre-registration.js.map +0 -1
- package/dist/src/branding.d.ts +0 -43
- package/dist/src/branding.js +0 -127
- package/dist/src/branding.js.map +0 -1
- package/dist/src/chat.d.ts +0 -16
- package/dist/src/chat.js +0 -67
- package/dist/src/chat.js.map +0 -1
- package/dist/src/cli.d.ts +0 -2
- package/dist/src/cli.js +0 -316
- package/dist/src/cli.js.map +0 -1
- package/dist/src/core/citations.d.ts +0 -44
- package/dist/src/core/citations.js +0 -48
- package/dist/src/core/citations.js.map +0 -1
- package/dist/src/core/contracts.d.ts +0 -119
- package/dist/src/core/contracts.js +0 -2
- package/dist/src/core/contracts.js.map +0 -1
- package/dist/src/core/docx.d.ts +0 -11
- package/dist/src/core/docx.js +0 -46
- package/dist/src/core/docx.js.map +0 -1
- package/dist/src/core/doi.d.ts +0 -41
- package/dist/src/core/doi.js +0 -82
- package/dist/src/core/doi.js.map +0 -1
- package/dist/src/core/evidence-policy.d.ts +0 -24
- package/dist/src/core/evidence-policy.js +0 -308
- package/dist/src/core/evidence-policy.js.map +0 -1
- package/dist/src/core/filekind.d.ts +0 -15
- package/dist/src/core/filekind.js +0 -82
- package/dist/src/core/filekind.js.map +0 -1
- package/dist/src/core/hash.d.ts +0 -2
- package/dist/src/core/hash.js +0 -17
- package/dist/src/core/hash.js.map +0 -1
- package/dist/src/core/pricing.d.ts +0 -38
- package/dist/src/core/pricing.js +0 -110
- package/dist/src/core/pricing.js.map +0 -1
- package/dist/src/core/redact.d.ts +0 -12
- package/dist/src/core/redact.js +0 -48
- package/dist/src/core/redact.js.map +0 -1
- package/dist/src/core/references.d.ts +0 -55
- package/dist/src/core/references.js +0 -102
- package/dist/src/core/references.js.map +0 -1
- package/dist/src/core/schemas.d.ts +0 -162
- package/dist/src/core/schemas.js +0 -160
- package/dist/src/core/schemas.js.map +0 -1
- package/dist/src/extension.d.ts +0 -1
- package/dist/src/extension.js +0 -2
- package/dist/src/extension.js.map +0 -1
- package/dist/src/index.d.ts +0 -72
- package/dist/src/index.js +0 -73
- package/dist/src/index.js.map +0 -1
- package/dist/src/install/installer.d.ts +0 -147
- package/dist/src/install/installer.js +0 -743
- package/dist/src/install/installer.js.map +0 -1
- package/dist/src/integrations/contracts.d.ts +0 -35
- package/dist/src/integrations/contracts.js +0 -27
- package/dist/src/integrations/contracts.js.map +0 -1
- package/dist/src/integrations/mcp.d.ts +0 -155
- package/dist/src/integrations/mcp.js +0 -826
- package/dist/src/integrations/mcp.js.map +0 -1
- package/dist/src/knowledge-map/contracts.d.ts +0 -20
- package/dist/src/knowledge-map/contracts.js +0 -2
- package/dist/src/knowledge-map/contracts.js.map +0 -1
- package/dist/src/knowledge-map/index.d.ts +0 -4
- package/dist/src/knowledge-map/index.js +0 -39
- package/dist/src/knowledge-map/index.js.map +0 -1
- package/dist/src/literature/contracts.d.ts +0 -106
- package/dist/src/literature/contracts.js +0 -2
- package/dist/src/literature/contracts.js.map +0 -1
- package/dist/src/literature/fulltext.d.ts +0 -7
- package/dist/src/literature/fulltext.js +0 -24
- package/dist/src/literature/fulltext.js.map +0 -1
- package/dist/src/literature/knowledge-map.d.ts +0 -2
- package/dist/src/literature/knowledge-map.js +0 -20
- package/dist/src/literature/knowledge-map.js.map +0 -1
- package/dist/src/literature/ledger.d.ts +0 -3
- package/dist/src/literature/ledger.js +0 -17
- package/dist/src/literature/ledger.js.map +0 -1
- package/dist/src/literature/metadata.d.ts +0 -6
- package/dist/src/literature/metadata.js +0 -32
- package/dist/src/literature/metadata.js.map +0 -1
- package/dist/src/memory/store.d.ts +0 -22
- package/dist/src/memory/store.js +0 -73
- package/dist/src/memory/store.js.map +0 -1
- package/dist/src/orchestration/contracts.d.ts +0 -61
- package/dist/src/orchestration/contracts.js +0 -2
- package/dist/src/orchestration/contracts.js.map +0 -1
- package/dist/src/orchestration/pi-executor.d.ts +0 -28
- package/dist/src/orchestration/pi-executor.js +0 -169
- package/dist/src/orchestration/pi-executor.js.map +0 -1
- package/dist/src/orchestration/runner.d.ts +0 -196
- package/dist/src/orchestration/runner.js +0 -991
- package/dist/src/orchestration/runner.js.map +0 -1
- package/dist/src/orchestration/scheduler.d.ts +0 -8
- package/dist/src/orchestration/scheduler.js +0 -335
- package/dist/src/orchestration/scheduler.js.map +0 -1
- package/dist/src/panel/events.d.ts +0 -20
- package/dist/src/panel/events.js +0 -93
- package/dist/src/panel/events.js.map +0 -1
- package/dist/src/panel/extension.d.ts +0 -8
- package/dist/src/panel/extension.js +0 -114
- package/dist/src/panel/extension.js.map +0 -1
- package/dist/src/panel/literature-map.d.ts +0 -26
- package/dist/src/panel/literature-map.js +0 -34
- package/dist/src/panel/literature-map.js.map +0 -1
- package/dist/src/panel/projection.d.ts +0 -51
- package/dist/src/panel/projection.js +0 -288
- package/dist/src/panel/projection.js.map +0 -1
- package/dist/src/panel/server.d.ts +0 -46
- package/dist/src/panel/server.js +0 -1610
- package/dist/src/panel/server.js.map +0 -1
- package/dist/src/panel/usage.d.ts +0 -53
- package/dist/src/panel/usage.js +0 -150
- package/dist/src/panel/usage.js.map +0 -1
- package/dist/src/project/bootstrap.d.ts +0 -10
- package/dist/src/project/bootstrap.js +0 -83
- package/dist/src/project/bootstrap.js.map +0 -1
- package/dist/src/project/hitl.d.ts +0 -12
- package/dist/src/project/hitl.js +0 -43
- package/dist/src/project/hitl.js.map +0 -1
- package/dist/src/project/jsonl.d.ts +0 -16
- package/dist/src/project/jsonl.js +0 -93
- package/dist/src/project/jsonl.js.map +0 -1
- package/dist/src/project/manuscript.d.ts +0 -21
- package/dist/src/project/manuscript.js +0 -74
- package/dist/src/project/manuscript.js.map +0 -1
- package/dist/src/project/paths.d.ts +0 -38
- package/dist/src/project/paths.js +0 -166
- package/dist/src/project/paths.js.map +0 -1
- package/dist/src/project/versions.d.ts +0 -10
- package/dist/src/project/versions.js +0 -14
- package/dist/src/project/versions.js.map +0 -1
- package/dist/src/psyclaw-theme.d.ts +0 -88
- package/dist/src/psyclaw-theme.js +0 -89
- package/dist/src/psyclaw-theme.js.map +0 -1
- package/dist/src/research/brief.d.ts +0 -11
- package/dist/src/research/brief.js +0 -81
- package/dist/src/research/brief.js.map +0 -1
- package/dist/src/research/ledger.d.ts +0 -12
- package/dist/src/research/ledger.js +0 -43
- package/dist/src/research/ledger.js.map +0 -1
- package/dist/src/run.d.ts +0 -20
- package/dist/src/run.js +0 -34
- package/dist/src/run.js.map +0 -1
- package/dist/src/setup.d.ts +0 -54
- package/dist/src/setup.js +0 -221
- package/dist/src/setup.js.map +0 -1
- package/dist/src/skills/contracts.d.ts +0 -105
- package/dist/src/skills/contracts.js +0 -3
- package/dist/src/skills/contracts.js.map +0 -1
- package/dist/src/skills/preflight.d.ts +0 -10
- package/dist/src/skills/preflight.js +0 -39
- package/dist/src/skills/preflight.js.map +0 -1
- package/dist/src/skills/registry.d.ts +0 -28
- package/dist/src/skills/registry.js +0 -556
- package/dist/src/skills/registry.js.map +0 -1
- package/dist/src/style/artifact.d.ts +0 -6
- package/dist/src/style/artifact.js +0 -61
- package/dist/src/style/artifact.js.map +0 -1
- package/dist/src/style/cli-ui.d.ts +0 -41
- package/dist/src/style/cli-ui.js +0 -119
- package/dist/src/style/cli-ui.js.map +0 -1
- package/dist/src/style/contracts.d.ts +0 -34
- package/dist/src/style/contracts.js +0 -2
- package/dist/src/style/contracts.js.map +0 -1
- package/dist/src/style/registry.d.ts +0 -16
- package/dist/src/style/registry.js +0 -50
- package/dist/src/style/registry.js.map +0 -1
- package/dist/src/trust/manifest.d.ts +0 -42
- package/dist/src/trust/manifest.js +0 -53
- package/dist/src/trust/manifest.js.map +0 -1
- package/dist/src/trust/sbom.d.ts +0 -54
- package/dist/src/trust/sbom.js +0 -77
- package/dist/src/trust/sbom.js.map +0 -1
- package/dist/src/tui/app.d.ts +0 -3
- package/dist/src/tui/app.js +0 -103
- package/dist/src/tui/app.js.map +0 -1
- package/dist/src/tui/model.d.ts +0 -13
- package/dist/src/tui/model.js +0 -25
- package/dist/src/tui/model.js.map +0 -1
- package/dist/src/updates/check.d.ts +0 -43
- package/dist/src/updates/check.js +0 -68
- package/dist/src/updates/check.js.map +0 -1
- package/dist/src/updates/manifest.d.ts +0 -19
- package/dist/src/updates/manifest.js +0 -58
- package/dist/src/updates/manifest.js.map +0 -1
- package/dist/src/updates/registry.d.ts +0 -21
- package/dist/src/updates/registry.js +0 -82
- package/dist/src/updates/registry.js.map +0 -1
- package/dist/src/updates/skills.d.ts +0 -15
- package/dist/src/updates/skills.js +0 -39
- package/dist/src/updates/skills.js.map +0 -1
- package/dist/src/updates/status.d.ts +0 -7
- package/dist/src/updates/status.js +0 -37
- package/dist/src/updates/status.js.map +0 -1
- package/dist/src/updates/update.d.ts +0 -43
- package/dist/src/updates/update.js +0 -126
- package/dist/src/updates/update.js.map +0 -1
- package/dist/src/wizard.d.ts +0 -7
- package/dist/src/wizard.js +0 -90
- package/dist/src/wizard.js.map +0 -1
- package/dist/src/workflows/analysis-delegation.d.ts +0 -3
- package/dist/src/workflows/analysis-delegation.js +0 -96
- package/dist/src/workflows/analysis-delegation.js.map +0 -1
- package/dist/src/workflows/expert-review-runner.d.ts +0 -29
- package/dist/src/workflows/expert-review-runner.js +0 -35
- package/dist/src/workflows/expert-review-runner.js.map +0 -1
- package/dist/src/workflows/expert-review.d.ts +0 -140
- package/dist/src/workflows/expert-review.js +0 -111
- package/dist/src/workflows/expert-review.js.map +0 -1
- package/dist/src/workflows/institutional-fulltext.d.ts +0 -16
- package/dist/src/workflows/institutional-fulltext.js +0 -110
- package/dist/src/workflows/institutional-fulltext.js.map +0 -1
- package/dist/src/workflows/literature-review.d.ts +0 -3
- package/dist/src/workflows/literature-review.js +0 -76
- package/dist/src/workflows/literature-review.js.map +0 -1
- package/dist/src/workflows/meta-analysis.d.ts +0 -38
- package/dist/src/workflows/meta-analysis.js +0 -185
- package/dist/src/workflows/meta-analysis.js.map +0 -1
- package/dist/src/workflows/publish.d.ts +0 -51
- package/dist/src/workflows/publish.js +0 -153
- package/dist/src/workflows/publish.js.map +0 -1
- package/dist/src/workflows/spec.d.ts +0 -51
- package/dist/src/workflows/spec.js +0 -157
- package/dist/src/workflows/spec.js.map +0 -1
- package/dist/src/workflows/style-contract.d.ts +0 -24
- package/dist/src/workflows/style-contract.js +0 -23
- package/dist/src/workflows/style-contract.js.map +0 -1
- package/dist/src/workflows/writing-review.d.ts +0 -15
- package/dist/src/workflows/writing-review.js +0 -82
- package/dist/src/workflows/writing-review.js.map +0 -1
- package/package.json.psyclaw +0 -21
package/dist/src/index.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
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
|
package/dist/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,147 +0,0 @@
|
|
|
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>;
|