@llblab/pi-kit 0.1.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/AGENTS.md +35 -0
- package/BACKLOG.md +3 -0
- package/CHANGELOG.md +9 -0
- package/LICENSE +21 -0
- package/README.md +43 -0
- package/node_modules/@llblab/pi-actors/AGENTS.md +150 -0
- package/node_modules/@llblab/pi-actors/BACKLOG.md +6 -0
- package/node_modules/@llblab/pi-actors/CHANGELOG.md +865 -0
- package/node_modules/@llblab/pi-actors/README.md +231 -0
- package/node_modules/@llblab/pi-actors/banner.jpg +0 -0
- package/node_modules/@llblab/pi-actors/dist/fixtures/protocol/artifact-manifest.json +9 -0
- package/node_modules/@llblab/pi-actors/dist/fixtures/protocol/control-endpoint.json +6 -0
- package/node_modules/@llblab/pi-actors/dist/fixtures/protocol/control-record.json +9 -0
- package/node_modules/@llblab/pi-actors/dist/fixtures/protocol/recipe-summary.json +8 -0
- package/node_modules/@llblab/pi-actors/dist/fixtures/protocol/run-state.json +10 -0
- package/node_modules/@llblab/pi-actors/dist/fixtures/protocol/trace-event.json +9 -0
- package/node_modules/@llblab/pi-actors/dist/index.d.ts +7 -0
- package/node_modules/@llblab/pi-actors/dist/index.js +17 -0
- package/node_modules/@llblab/pi-actors/dist/lib/async-runs.d.ts +146 -0
- package/node_modules/@llblab/pi-actors/dist/lib/async-runs.js +800 -0
- package/node_modules/@llblab/pi-actors/dist/lib/automatic-review-runtime.d.ts +20 -0
- package/node_modules/@llblab/pi-actors/dist/lib/automatic-review-runtime.js +103 -0
- package/node_modules/@llblab/pi-actors/dist/lib/command-templates.d.ts +85 -0
- package/node_modules/@llblab/pi-actors/dist/lib/command-templates.js +804 -0
- package/node_modules/@llblab/pi-actors/dist/lib/config.d.ts +34 -0
- package/node_modules/@llblab/pi-actors/dist/lib/config.js +216 -0
- package/node_modules/@llblab/pi-actors/dist/lib/control-projection.d.ts +20 -0
- package/node_modules/@llblab/pi-actors/dist/lib/control-projection.js +66 -0
- package/node_modules/@llblab/pi-actors/dist/lib/control.d.ts +15 -0
- package/node_modules/@llblab/pi-actors/dist/lib/control.js +97 -0
- package/node_modules/@llblab/pi-actors/dist/lib/draft-consolidation-transaction.d.ts +65 -0
- package/node_modules/@llblab/pi-actors/dist/lib/draft-consolidation-transaction.js +610 -0
- package/node_modules/@llblab/pi-actors/dist/lib/draft-consolidation.d.ts +35 -0
- package/node_modules/@llblab/pi-actors/dist/lib/draft-consolidation.js +126 -0
- package/node_modules/@llblab/pi-actors/dist/lib/draft-review.d.ts +56 -0
- package/node_modules/@llblab/pi-actors/dist/lib/draft-review.js +254 -0
- package/node_modules/@llblab/pi-actors/dist/lib/draft-sleep.d.ts +65 -0
- package/node_modules/@llblab/pi-actors/dist/lib/draft-sleep.js +467 -0
- package/node_modules/@llblab/pi-actors/dist/lib/execution-output.d.ts +25 -0
- package/node_modules/@llblab/pi-actors/dist/lib/execution-output.js +88 -0
- package/node_modules/@llblab/pi-actors/dist/lib/execution-sessions.d.ts +17 -0
- package/node_modules/@llblab/pi-actors/dist/lib/execution-sessions.js +85 -0
- package/node_modules/@llblab/pi-actors/dist/lib/execution.d.ts +99 -0
- package/node_modules/@llblab/pi-actors/dist/lib/execution.js +725 -0
- package/node_modules/@llblab/pi-actors/dist/lib/extension-runtime.d.ts +21 -0
- package/node_modules/@llblab/pi-actors/dist/lib/extension-runtime.js +141 -0
- package/node_modules/@llblab/pi-actors/dist/lib/file-state.d.ts +18 -0
- package/node_modules/@llblab/pi-actors/dist/lib/file-state.js +310 -0
- package/node_modules/@llblab/pi-actors/dist/lib/identity.d.ts +9 -0
- package/node_modules/@llblab/pi-actors/dist/lib/identity.js +27 -0
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-actions.d.ts +16 -0
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-actions.js +57 -0
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-command.d.ts +7 -0
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-command.js +37 -0
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-overlay.d.ts +100 -0
- package/node_modules/@llblab/pi-actors/dist/lib/inspector-overlay.js +824 -0
- package/node_modules/@llblab/pi-actors/dist/lib/inspector.d.ts +20 -0
- package/node_modules/@llblab/pi-actors/dist/lib/inspector.js +136 -0
- package/node_modules/@llblab/pi-actors/dist/lib/limits.d.ts +28 -0
- package/node_modules/@llblab/pi-actors/dist/lib/limits.js +28 -0
- package/node_modules/@llblab/pi-actors/dist/lib/model-context.d.ts +56 -0
- package/node_modules/@llblab/pi-actors/dist/lib/model-context.js +220 -0
- package/node_modules/@llblab/pi-actors/dist/lib/observability.d.ts +186 -0
- package/node_modules/@llblab/pi-actors/dist/lib/observability.js +951 -0
- package/node_modules/@llblab/pi-actors/dist/lib/paths.d.ts +27 -0
- package/node_modules/@llblab/pi-actors/dist/lib/paths.js +72 -0
- package/node_modules/@llblab/pi-actors/dist/lib/pi.d.ts +19 -0
- package/node_modules/@llblab/pi-actors/dist/lib/pi.js +21 -0
- package/node_modules/@llblab/pi-actors/dist/lib/preflight-diagnostics.d.ts +27 -0
- package/node_modules/@llblab/pi-actors/dist/lib/preflight-diagnostics.js +86 -0
- package/node_modules/@llblab/pi-actors/dist/lib/prompts.d.ts +24 -0
- package/node_modules/@llblab/pi-actors/dist/lib/prompts.js +49 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipe-control.d.ts +7 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipe-control.js +43 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-context.d.ts +36 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-context.js +197 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-discovery.d.ts +77 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-discovery.js +783 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-references.d.ts +113 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-references.js +1108 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-usage.d.ts +21 -0
- package/node_modules/@llblab/pi-actors/dist/lib/recipes-usage.js +494 -0
- package/node_modules/@llblab/pi-actors/dist/lib/registry.d.ts +67 -0
- package/node_modules/@llblab/pi-actors/dist/lib/registry.js +504 -0
- package/node_modules/@llblab/pi-actors/dist/lib/review-control.d.ts +14 -0
- package/node_modules/@llblab/pi-actors/dist/lib/review-control.js +110 -0
- package/node_modules/@llblab/pi-actors/dist/lib/review-diagnostics.d.ts +11 -0
- package/node_modules/@llblab/pi-actors/dist/lib/review-diagnostics.js +148 -0
- package/node_modules/@llblab/pi-actors/dist/lib/review-projection.d.ts +14 -0
- package/node_modules/@llblab/pi-actors/dist/lib/review-projection.js +166 -0
- package/node_modules/@llblab/pi-actors/dist/lib/run-evidence-policy.d.ts +95 -0
- package/node_modules/@llblab/pi-actors/dist/lib/run-evidence-policy.js +177 -0
- package/node_modules/@llblab/pi-actors/dist/lib/run-ui-runtime.d.ts +18 -0
- package/node_modules/@llblab/pi-actors/dist/lib/run-ui-runtime.js +125 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-artifacts.d.ts +21 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-artifacts.js +68 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-control-delivery.d.ts +28 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-control-delivery.js +150 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-control.d.ts +21 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-control.js +89 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-controls.d.ts +39 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-controls.js +283 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-identity.d.ts +5 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-identity.js +11 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-index.d.ts +27 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-index.js +142 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-ownership.d.ts +7 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-ownership.js +96 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-parent-teardown.d.ts +51 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-parent-teardown.js +172 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-process.d.ts +22 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-process.js +125 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-retention.d.ts +18 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-retention.js +108 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-start.d.ts +12 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-start.js +68 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-status.d.ts +10 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-status.js +68 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-trace.d.ts +48 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runs-trace.js +491 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runtime-identity.d.ts +7 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runtime-identity.js +35 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runtime-triage.d.ts +29 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runtime-triage.js +60 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runtime.d.ts +69 -0
- package/node_modules/@llblab/pi-actors/dist/lib/runtime.js +339 -0
- package/node_modules/@llblab/pi-actors/dist/lib/schema.d.ts +60 -0
- package/node_modules/@llblab/pi-actors/dist/lib/schema.js +428 -0
- package/node_modules/@llblab/pi-actors/dist/lib/session-evidence.d.ts +45 -0
- package/node_modules/@llblab/pi-actors/dist/lib/session-evidence.js +204 -0
- package/node_modules/@llblab/pi-actors/dist/lib/state-readers.d.ts +21 -0
- package/node_modules/@llblab/pi-actors/dist/lib/state-readers.js +74 -0
- package/node_modules/@llblab/pi-actors/dist/lib/temp.d.ts +10 -0
- package/node_modules/@llblab/pi-actors/dist/lib/temp.js +90 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review-lineage-transaction.d.ts +27 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review-lineage-transaction.js +597 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review-lineage.d.ts +24 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review-lineage.js +98 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review-scheduler.d.ts +80 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review-scheduler.js +494 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review-transaction.d.ts +50 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review-transaction.js +362 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review.d.ts +56 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tool-review.js +197 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-access.d.ts +19 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-access.js +44 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-inspect.d.ts +15 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-inspect.js +532 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-local.d.ts +17 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-local.js +191 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-message.d.ts +9 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-message.js +139 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-register.d.ts +18 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-register.js +41 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-response.d.ts +20 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-response.js +243 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-spawn.d.ts +15 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools-spawn.js +133 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools.d.ts +28 -0
- package/node_modules/@llblab/pi-actors/dist/lib/tools.js +49 -0
- package/node_modules/@llblab/pi-actors/dist/lib/trace-projection.d.ts +22 -0
- package/node_modules/@llblab/pi-actors/dist/lib/trace-projection.js +231 -0
- package/node_modules/@llblab/pi-actors/dist/pi-actors/index.js +1 -0
- package/node_modules/@llblab/pi-actors/dist/scripts/async-runner.mjs +555 -0
- package/node_modules/@llblab/pi-actors/dist/scripts/build-dist.mjs +60 -0
- package/node_modules/@llblab/pi-actors/dist/scripts/conformance.mjs +63 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/SKILL.md +126 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/recipes/command-validate.json +13 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/recipes/jsonl-tail.json +10 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/recipes/recipe-validate.json +11 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/recipes/resource-locker-snapshot.json +11 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/recipes/resource-locker.json +25 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/recipes/run-ops-snapshot.json +15 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/recipes/run-state-files.json +13 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/recipes/run-summary.json +9 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/references/diagnostics.md +44 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/references/persistent-tools.md +76 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/references/recipes.md +51 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/references/runs.md +41 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/scripts/resource-locker.mjs +425 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/scripts/run-utils.mjs +164 -0
- package/node_modules/@llblab/pi-actors/dist/skills/actors/scripts/validate-recipe.mjs +370 -0
- package/node_modules/@llblab/pi-actors/dist/skills/artifacts/SKILL.md +33 -0
- package/node_modules/@llblab/pi-actors/dist/skills/artifacts/recipes/bundle.json +77 -0
- package/node_modules/@llblab/pi-actors/dist/skills/artifacts/recipes/file-write.json +14 -0
- package/node_modules/@llblab/pi-actors/dist/skills/artifacts/recipes/manifest.json +14 -0
- package/node_modules/@llblab/pi-actors/dist/skills/artifacts/recipes/report.json +39 -0
- package/node_modules/@llblab/pi-actors/dist/skills/artifacts/recipes/write.json +53 -0
- package/node_modules/@llblab/pi-actors/dist/skills/artifacts/scripts/artifact-utils.mjs +63 -0
- package/node_modules/@llblab/pi-actors/dist/skills/music-player/SKILL.md +57 -0
- package/node_modules/@llblab/pi-actors/dist/skills/music-player/genapps/music-player.mjs +360 -0
- package/node_modules/@llblab/pi-actors/dist/skills/music-player/recipes/playback.json +29 -0
- package/node_modules/@llblab/pi-actors/dist/skills/music-player/scripts/playback-client.mjs +143 -0
- package/node_modules/@llblab/pi-actors/dist/skills/music-player/scripts/playback.mjs +1446 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/SKILL.md +37 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/changelog-head.json +11 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/changelog-section.json +11 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/docs-maintenance.json +66 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/git-log.json +11 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/git-status.json +9 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/markdown-index.json +14 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/package-summary.json +9 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/release-readiness.json +115 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/release-summary.json +74 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/repo-health.json +75 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/run-ops.json +56 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/recipes/skill-summary.json +11 -0
- package/node_modules/@llblab/pi-actors/dist/skills/project-work/scripts/project-utils.mjs +89 -0
- package/node_modules/@llblab/pi-actors/dist/skills/recipe-memory/SKILL.md +36 -0
- package/node_modules/@llblab/pi-actors/dist/skills/recipe-memory/recipes/draft-review.json +14 -0
- package/node_modules/@llblab/pi-actors/dist/skills/recipe-memory/recipes/tool-review.json +14 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/SKILL.md +84 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/architect.json +82 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/checkpoint-continuation.json +51 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/development-tasking.json +67 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/lens-review.json +63 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/quorum-review.json +65 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/research-synthesis.json +81 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/review-readiness.json +59 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-artifact.json +21 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-checkpoint.json +21 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-conflict-report.json +19 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-contradiction-map.json +20 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-critic.json +22 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-evidence-map.json +20 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-followup.json +21 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-judge.json +22 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-merge.json +24 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-normalize.json +20 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-plan.json +20 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-preflight.json +18 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-prompt.json +16 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-prompts.json +39 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-quorum.json +31 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-review-coordinator.json +170 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-review.json +26 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-task-card.json +22 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-tools.json +15 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/recipes/subagent-verify.json +23 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/references/development-swarm.md +189 -0
- package/node_modules/@llblab/pi-actors/dist/skills/swarm/references/review-swarms.md +115 -0
- package/node_modules/@llblab/pi-actors/docs/README.md +20 -0
- package/node_modules/@llblab/pi-actors/docs/actor-inspector.md +50 -0
- package/node_modules/@llblab/pi-actors/docs/async-runs.md +141 -0
- package/node_modules/@llblab/pi-actors/docs/command-templates.md +321 -0
- package/node_modules/@llblab/pi-actors/docs/recipe-library.md +89 -0
- package/node_modules/@llblab/pi-actors/docs/releasing.md +28 -0
- package/node_modules/@llblab/pi-actors/docs/template-recipes.md +175 -0
- package/node_modules/@llblab/pi-actors/docs/tool-registry.md +90 -0
- package/node_modules/@llblab/pi-actors/fixtures/protocol/artifact-manifest.json +9 -0
- package/node_modules/@llblab/pi-actors/fixtures/protocol/control-endpoint.json +6 -0
- package/node_modules/@llblab/pi-actors/fixtures/protocol/control-record.json +9 -0
- package/node_modules/@llblab/pi-actors/fixtures/protocol/recipe-summary.json +8 -0
- package/node_modules/@llblab/pi-actors/fixtures/protocol/run-state.json +10 -0
- package/node_modules/@llblab/pi-actors/fixtures/protocol/trace-event.json +9 -0
- package/node_modules/@llblab/pi-actors/index.ts +30 -0
- package/node_modules/@llblab/pi-actors/lib/async-runs.ts +1245 -0
- package/node_modules/@llblab/pi-actors/lib/automatic-review-runtime.ts +148 -0
- package/node_modules/@llblab/pi-actors/lib/command-templates.ts +1116 -0
- package/node_modules/@llblab/pi-actors/lib/config.ts +261 -0
- package/node_modules/@llblab/pi-actors/lib/control-projection.ts +105 -0
- package/node_modules/@llblab/pi-actors/lib/control.ts +117 -0
- package/node_modules/@llblab/pi-actors/lib/draft-consolidation-transaction.ts +821 -0
- package/node_modules/@llblab/pi-actors/lib/draft-consolidation.ts +181 -0
- package/node_modules/@llblab/pi-actors/lib/draft-review.ts +325 -0
- package/node_modules/@llblab/pi-actors/lib/draft-sleep.ts +575 -0
- package/node_modules/@llblab/pi-actors/lib/execution-output.ts +123 -0
- package/node_modules/@llblab/pi-actors/lib/execution-sessions.ts +111 -0
- package/node_modules/@llblab/pi-actors/lib/execution.ts +1153 -0
- package/node_modules/@llblab/pi-actors/lib/extension-runtime.ts +181 -0
- package/node_modules/@llblab/pi-actors/lib/file-state.ts +306 -0
- package/node_modules/@llblab/pi-actors/lib/identity.ts +29 -0
- package/node_modules/@llblab/pi-actors/lib/inspector-actions.ts +79 -0
- package/node_modules/@llblab/pi-actors/lib/inspector-command.ts +54 -0
- package/node_modules/@llblab/pi-actors/lib/inspector-overlay.ts +901 -0
- package/node_modules/@llblab/pi-actors/lib/inspector.ts +204 -0
- package/node_modules/@llblab/pi-actors/lib/limits.ts +29 -0
- package/node_modules/@llblab/pi-actors/lib/model-context.ts +359 -0
- package/node_modules/@llblab/pi-actors/lib/observability.ts +1337 -0
- package/node_modules/@llblab/pi-actors/lib/paths.ts +111 -0
- package/node_modules/@llblab/pi-actors/lib/pi.ts +47 -0
- package/node_modules/@llblab/pi-actors/lib/preflight-diagnostics.ts +132 -0
- package/node_modules/@llblab/pi-actors/lib/prompts.ts +69 -0
- package/node_modules/@llblab/pi-actors/lib/recipe-control.ts +52 -0
- package/node_modules/@llblab/pi-actors/lib/recipes-context.ts +268 -0
- package/node_modules/@llblab/pi-actors/lib/recipes-discovery.ts +1060 -0
- package/node_modules/@llblab/pi-actors/lib/recipes-references.ts +1598 -0
- package/node_modules/@llblab/pi-actors/lib/recipes-usage.ts +638 -0
- package/node_modules/@llblab/pi-actors/lib/registry.ts +806 -0
- package/node_modules/@llblab/pi-actors/lib/review-control.ts +136 -0
- package/node_modules/@llblab/pi-actors/lib/review-diagnostics.ts +164 -0
- package/node_modules/@llblab/pi-actors/lib/review-projection.ts +196 -0
- package/node_modules/@llblab/pi-actors/lib/run-evidence-policy.ts +242 -0
- package/node_modules/@llblab/pi-actors/lib/run-ui-runtime.ts +155 -0
- package/node_modules/@llblab/pi-actors/lib/runs-artifacts.ts +96 -0
- package/node_modules/@llblab/pi-actors/lib/runs-control-delivery.ts +209 -0
- package/node_modules/@llblab/pi-actors/lib/runs-control.ts +148 -0
- package/node_modules/@llblab/pi-actors/lib/runs-controls.ts +282 -0
- package/node_modules/@llblab/pi-actors/lib/runs-identity.ts +14 -0
- package/node_modules/@llblab/pi-actors/lib/runs-index.ts +192 -0
- package/node_modules/@llblab/pi-actors/lib/runs-ownership.ts +136 -0
- package/node_modules/@llblab/pi-actors/lib/runs-parent-teardown.ts +257 -0
- package/node_modules/@llblab/pi-actors/lib/runs-process.ts +174 -0
- package/node_modules/@llblab/pi-actors/lib/runs-retention.ts +140 -0
- package/node_modules/@llblab/pi-actors/lib/runs-start.ts +113 -0
- package/node_modules/@llblab/pi-actors/lib/runs-status.ts +101 -0
- package/node_modules/@llblab/pi-actors/lib/runs-trace.ts +611 -0
- package/node_modules/@llblab/pi-actors/lib/runtime-identity.ts +39 -0
- package/node_modules/@llblab/pi-actors/lib/runtime-triage.ts +106 -0
- package/node_modules/@llblab/pi-actors/lib/runtime.ts +430 -0
- package/node_modules/@llblab/pi-actors/lib/schema.ts +525 -0
- package/node_modules/@llblab/pi-actors/lib/session-evidence.ts +302 -0
- package/node_modules/@llblab/pi-actors/lib/state-readers.ts +93 -0
- package/node_modules/@llblab/pi-actors/lib/temp.ts +99 -0
- package/node_modules/@llblab/pi-actors/lib/tool-review-lineage-transaction.ts +881 -0
- package/node_modules/@llblab/pi-actors/lib/tool-review-lineage.ts +145 -0
- package/node_modules/@llblab/pi-actors/lib/tool-review-scheduler.ts +635 -0
- package/node_modules/@llblab/pi-actors/lib/tool-review-transaction.ts +563 -0
- package/node_modules/@llblab/pi-actors/lib/tool-review.ts +270 -0
- package/node_modules/@llblab/pi-actors/lib/tools-access.ts +68 -0
- package/node_modules/@llblab/pi-actors/lib/tools-inspect.ts +673 -0
- package/node_modules/@llblab/pi-actors/lib/tools-local.ts +303 -0
- package/node_modules/@llblab/pi-actors/lib/tools-message.ts +176 -0
- package/node_modules/@llblab/pi-actors/lib/tools-register.ts +63 -0
- package/node_modules/@llblab/pi-actors/lib/tools-response.ts +285 -0
- package/node_modules/@llblab/pi-actors/lib/tools-spawn.ts +212 -0
- package/node_modules/@llblab/pi-actors/lib/tools.ts +88 -0
- package/node_modules/@llblab/pi-actors/lib/trace-projection.ts +306 -0
- package/node_modules/@llblab/pi-actors/package.json +76 -0
- package/node_modules/@llblab/pi-actors/scripts/async-runner.mjs +555 -0
- package/node_modules/@llblab/pi-actors/scripts/build-dist.mjs +60 -0
- package/node_modules/@llblab/pi-actors/scripts/conformance.mjs +63 -0
- package/node_modules/@llblab/pi-actors/skills/actors/SKILL.md +126 -0
- package/node_modules/@llblab/pi-actors/skills/actors/recipes/command-validate.json +13 -0
- package/node_modules/@llblab/pi-actors/skills/actors/recipes/jsonl-tail.json +10 -0
- package/node_modules/@llblab/pi-actors/skills/actors/recipes/recipe-validate.json +11 -0
- package/node_modules/@llblab/pi-actors/skills/actors/recipes/resource-locker-snapshot.json +11 -0
- package/node_modules/@llblab/pi-actors/skills/actors/recipes/resource-locker.json +25 -0
- package/node_modules/@llblab/pi-actors/skills/actors/recipes/run-ops-snapshot.json +15 -0
- package/node_modules/@llblab/pi-actors/skills/actors/recipes/run-state-files.json +13 -0
- package/node_modules/@llblab/pi-actors/skills/actors/recipes/run-summary.json +9 -0
- package/node_modules/@llblab/pi-actors/skills/actors/references/diagnostics.md +44 -0
- package/node_modules/@llblab/pi-actors/skills/actors/references/persistent-tools.md +76 -0
- package/node_modules/@llblab/pi-actors/skills/actors/references/recipes.md +51 -0
- package/node_modules/@llblab/pi-actors/skills/actors/references/runs.md +41 -0
- package/node_modules/@llblab/pi-actors/skills/actors/scripts/resource-locker.mjs +425 -0
- package/node_modules/@llblab/pi-actors/skills/actors/scripts/run-utils.mjs +164 -0
- package/node_modules/@llblab/pi-actors/skills/actors/scripts/validate-recipe.mjs +370 -0
- package/node_modules/@llblab/pi-actors/skills/artifacts/SKILL.md +33 -0
- package/node_modules/@llblab/pi-actors/skills/artifacts/recipes/bundle.json +77 -0
- package/node_modules/@llblab/pi-actors/skills/artifacts/recipes/file-write.json +14 -0
- package/node_modules/@llblab/pi-actors/skills/artifacts/recipes/manifest.json +14 -0
- package/node_modules/@llblab/pi-actors/skills/artifacts/recipes/report.json +39 -0
- package/node_modules/@llblab/pi-actors/skills/artifacts/recipes/write.json +53 -0
- package/node_modules/@llblab/pi-actors/skills/artifacts/scripts/artifact-utils.mjs +63 -0
- package/node_modules/@llblab/pi-actors/skills/music-player/SKILL.md +57 -0
- package/node_modules/@llblab/pi-actors/skills/music-player/genapps/music-player.mjs +360 -0
- package/node_modules/@llblab/pi-actors/skills/music-player/recipes/playback.json +29 -0
- package/node_modules/@llblab/pi-actors/skills/music-player/scripts/playback-client.mjs +143 -0
- package/node_modules/@llblab/pi-actors/skills/music-player/scripts/playback.mjs +1446 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/SKILL.md +37 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/changelog-head.json +11 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/changelog-section.json +11 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/docs-maintenance.json +66 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/git-log.json +11 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/git-status.json +9 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/markdown-index.json +14 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/package-summary.json +9 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/release-readiness.json +115 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/release-summary.json +74 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/repo-health.json +75 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/run-ops.json +56 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/recipes/skill-summary.json +11 -0
- package/node_modules/@llblab/pi-actors/skills/project-work/scripts/project-utils.mjs +89 -0
- package/node_modules/@llblab/pi-actors/skills/recipe-memory/SKILL.md +36 -0
- package/node_modules/@llblab/pi-actors/skills/recipe-memory/recipes/draft-review.json +14 -0
- package/node_modules/@llblab/pi-actors/skills/recipe-memory/recipes/tool-review.json +14 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/SKILL.md +84 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/architect.json +82 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/checkpoint-continuation.json +51 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/development-tasking.json +67 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/lens-review.json +63 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/quorum-review.json +65 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/research-synthesis.json +81 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/review-readiness.json +59 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-artifact.json +21 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-checkpoint.json +21 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-conflict-report.json +19 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-contradiction-map.json +20 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-critic.json +22 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-evidence-map.json +20 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-followup.json +21 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-judge.json +22 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-merge.json +24 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-normalize.json +20 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-plan.json +20 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-preflight.json +18 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-prompt.json +16 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-prompts.json +39 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-quorum.json +31 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-review-coordinator.json +170 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-review.json +26 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-task-card.json +22 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-tools.json +15 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/recipes/subagent-verify.json +23 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/references/development-swarm.md +189 -0
- package/node_modules/@llblab/pi-actors/skills/swarm/references/review-swarms.md +115 -0
- package/node_modules/@llblab/pi-codex-usage/AGENTS.md +17 -0
- package/node_modules/@llblab/pi-codex-usage/BACKLOG.md +8 -0
- package/node_modules/@llblab/pi-codex-usage/CHANGELOG.md +80 -0
- package/node_modules/@llblab/pi-codex-usage/LICENSE +22 -0
- package/node_modules/@llblab/pi-codex-usage/README.md +113 -0
- package/node_modules/@llblab/pi-codex-usage/banner.jpg +0 -0
- package/node_modules/@llblab/pi-codex-usage/index.ts +1525 -0
- package/node_modules/@llblab/pi-codex-usage/package.json +59 -0
- package/node_modules/@llblab/pi-grow-loop/AGENTS.md +56 -0
- package/node_modules/@llblab/pi-grow-loop/BACKLOG.md +3 -0
- package/node_modules/@llblab/pi-grow-loop/CHANGELOG.md +126 -0
- package/node_modules/@llblab/pi-grow-loop/README.md +216 -0
- package/node_modules/@llblab/pi-grow-loop/banner.jpg +0 -0
- package/node_modules/@llblab/pi-grow-loop/index.ts +219 -0
- package/node_modules/@llblab/pi-grow-loop/package.json +64 -0
- package/node_modules/@llblab/pi-grow-loop/skills/grow-loop/SKILL.md +131 -0
- package/node_modules/@llblab/pi-grow-loop/skills/while-true/SKILL.md +233 -0
- package/node_modules/@llblab/pi-telegram/AGENTS.md +157 -0
- package/node_modules/@llblab/pi-telegram/BACKLOG.md +15 -0
- package/node_modules/@llblab/pi-telegram/CHANGELOG.md +886 -0
- package/node_modules/@llblab/pi-telegram/README.md +330 -0
- package/node_modules/@llblab/pi-telegram/api/activity.ts +15 -0
- package/node_modules/@llblab/pi-telegram/api/commands.ts +11 -0
- package/node_modules/@llblab/pi-telegram/api/delivery.ts +21 -0
- package/node_modules/@llblab/pi-telegram/api/inbound.ts +14 -0
- package/node_modules/@llblab/pi-telegram/api/keyboard.ts +11 -0
- package/node_modules/@llblab/pi-telegram/api/outbound.ts +11 -0
- package/node_modules/@llblab/pi-telegram/api/sections.ts +17 -0
- package/node_modules/@llblab/pi-telegram/api/status.ts +12 -0
- package/node_modules/@llblab/pi-telegram/api/updates.ts +16 -0
- package/node_modules/@llblab/pi-telegram/api/voice.ts +24 -0
- package/node_modules/@llblab/pi-telegram/docs/README.md +25 -0
- package/node_modules/@llblab/pi-telegram/docs/activity.md +304 -0
- package/node_modules/@llblab/pi-telegram/docs/architecture.md +418 -0
- package/node_modules/@llblab/pi-telegram/docs/callback-namespaces.md +48 -0
- package/node_modules/@llblab/pi-telegram/docs/command-templates.md +365 -0
- package/node_modules/@llblab/pi-telegram/docs/compact-matrix-literal.md +176 -0
- package/node_modules/@llblab/pi-telegram/docs/delivery.md +225 -0
- package/node_modules/@llblab/pi-telegram/docs/generative-apps.md +310 -0
- package/node_modules/@llblab/pi-telegram/docs/inbound.md +136 -0
- package/node_modules/@llblab/pi-telegram/docs/multi-instance-bus.md +467 -0
- package/node_modules/@llblab/pi-telegram/docs/outbound.md +193 -0
- package/node_modules/@llblab/pi-telegram/docs/public-api.md +599 -0
- package/node_modules/@llblab/pi-telegram/docs/sections.md +452 -0
- package/node_modules/@llblab/pi-telegram/docs/ui-style.md +256 -0
- package/node_modules/@llblab/pi-telegram/docs/updates.md +171 -0
- package/node_modules/@llblab/pi-telegram/docs/voice.md +217 -0
- package/node_modules/@llblab/pi-telegram/index.ts +1336 -0
- package/node_modules/@llblab/pi-telegram/lib/activity-verbosity.ts +714 -0
- package/node_modules/@llblab/pi-telegram/lib/activity.ts +782 -0
- package/node_modules/@llblab/pi-telegram/lib/agent-messages.ts +121 -0
- package/node_modules/@llblab/pi-telegram/lib/bindings.ts +1129 -0
- package/node_modules/@llblab/pi-telegram/lib/bus-api.ts +379 -0
- package/node_modules/@llblab/pi-telegram/lib/bus-follower.ts +1941 -0
- package/node_modules/@llblab/pi-telegram/lib/bus-leader.ts +2119 -0
- package/node_modules/@llblab/pi-telegram/lib/bus-transport.ts +244 -0
- package/node_modules/@llblab/pi-telegram/lib/bus.ts +2645 -0
- package/node_modules/@llblab/pi-telegram/lib/command-templates.ts +954 -0
- package/node_modules/@llblab/pi-telegram/lib/commands.ts +1854 -0
- package/node_modules/@llblab/pi-telegram/lib/config.ts +1143 -0
- package/node_modules/@llblab/pi-telegram/lib/delivery.ts +891 -0
- package/node_modules/@llblab/pi-telegram/lib/generative-app-worker.mjs +104 -0
- package/node_modules/@llblab/pi-telegram/lib/generative-apps.ts +958 -0
- package/node_modules/@llblab/pi-telegram/lib/inbound.ts +824 -0
- package/node_modules/@llblab/pi-telegram/lib/journal.ts +3140 -0
- package/node_modules/@llblab/pi-telegram/lib/keyboard.ts +59 -0
- package/node_modules/@llblab/pi-telegram/lib/lifecycle.ts +623 -0
- package/node_modules/@llblab/pi-telegram/lib/locks.ts +1422 -0
- package/node_modules/@llblab/pi-telegram/lib/logs.ts +393 -0
- package/node_modules/@llblab/pi-telegram/lib/media.ts +921 -0
- package/node_modules/@llblab/pi-telegram/lib/menu-model.ts +1182 -0
- package/node_modules/@llblab/pi-telegram/lib/menu-queue.ts +926 -0
- package/node_modules/@llblab/pi-telegram/lib/menu-settings.ts +876 -0
- package/node_modules/@llblab/pi-telegram/lib/menu-status.ts +274 -0
- package/node_modules/@llblab/pi-telegram/lib/menu-thinking.ts +185 -0
- package/node_modules/@llblab/pi-telegram/lib/menu.ts +867 -0
- package/node_modules/@llblab/pi-telegram/lib/model.ts +672 -0
- package/node_modules/@llblab/pi-telegram/lib/outbound-attachments.ts +981 -0
- package/node_modules/@llblab/pi-telegram/lib/outbound-buttons.ts +331 -0
- package/node_modules/@llblab/pi-telegram/lib/outbound-markup.ts +515 -0
- package/node_modules/@llblab/pi-telegram/lib/outbound-voice.ts +285 -0
- package/node_modules/@llblab/pi-telegram/lib/outbound.ts +1007 -0
- package/node_modules/@llblab/pi-telegram/lib/ownership.ts +298 -0
- package/node_modules/@llblab/pi-telegram/lib/paths.ts +127 -0
- package/node_modules/@llblab/pi-telegram/lib/pi.ts +197 -0
- package/node_modules/@llblab/pi-telegram/lib/polling.ts +1588 -0
- package/node_modules/@llblab/pi-telegram/lib/preview.ts +846 -0
- package/node_modules/@llblab/pi-telegram/lib/prompt-templates.ts +158 -0
- package/node_modules/@llblab/pi-telegram/lib/prompts.ts +218 -0
- package/node_modules/@llblab/pi-telegram/lib/queue.ts +3075 -0
- package/node_modules/@llblab/pi-telegram/lib/recovery.ts +464 -0
- package/node_modules/@llblab/pi-telegram/lib/rendering.ts +1213 -0
- package/node_modules/@llblab/pi-telegram/lib/replies.ts +892 -0
- package/node_modules/@llblab/pi-telegram/lib/routing.ts +2889 -0
- package/node_modules/@llblab/pi-telegram/lib/runtime.ts +628 -0
- package/node_modules/@llblab/pi-telegram/lib/sections.ts +710 -0
- package/node_modules/@llblab/pi-telegram/lib/setup.ts +220 -0
- package/node_modules/@llblab/pi-telegram/lib/skills.ts +21 -0
- package/node_modules/@llblab/pi-telegram/lib/status.ts +1550 -0
- package/node_modules/@llblab/pi-telegram/lib/sync.ts +883 -0
- package/node_modules/@llblab/pi-telegram/lib/target.ts +49 -0
- package/node_modules/@llblab/pi-telegram/lib/telegram-api.ts +1747 -0
- package/node_modules/@llblab/pi-telegram/lib/text-groups.ts +487 -0
- package/node_modules/@llblab/pi-telegram/lib/thread-reconciler.ts +1002 -0
- package/node_modules/@llblab/pi-telegram/lib/threads.ts +3183 -0
- package/node_modules/@llblab/pi-telegram/lib/time-injection.ts +78 -0
- package/node_modules/@llblab/pi-telegram/lib/turns.ts +753 -0
- package/node_modules/@llblab/pi-telegram/lib/updates.ts +4950 -0
- package/node_modules/@llblab/pi-telegram/lib/voice.ts +340 -0
- package/node_modules/@llblab/pi-telegram/package.json +83 -0
- package/node_modules/@llblab/pi-telegram/screenshot.png +0 -0
- package/node_modules/@llblab/pi-telegram/scripts/check-downgrade.mjs +435 -0
- package/node_modules/@llblab/pi-telegram/skills/generated-control-surface/SKILL.md +241 -0
- package/node_modules/@llblab/pi-telegram/skills/generative-apps/SKILL.md +114 -0
- package/node_modules/@llblab/pi-telegram/skills/telegram-bridge/SKILL.md +149 -0
- package/package.json +67 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Template recipe validator CLI.
|
|
5
|
+
*
|
|
6
|
+
* Owns CLI parsing and report formatting directly. Recipe parsing remains in
|
|
7
|
+
* the reusable recipe-reference domain.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { existsSync, readdirSync, statSync } from "node:fs";
|
|
11
|
+
import { homedir } from "node:os";
|
|
12
|
+
import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
13
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
14
|
+
|
|
15
|
+
function packageRoot() {
|
|
16
|
+
return dirname(dirname(dirname(dirname(fileURLToPath(import.meta.url)))));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async function importRuntimeModule(name) {
|
|
20
|
+
const root = packageRoot();
|
|
21
|
+
const localCompiled = join(root, "lib", `${name}.js`);
|
|
22
|
+
const installedCompiled = join(root, "dist", "lib", `${name}.js`);
|
|
23
|
+
const source = join(root, "lib", `${name}.ts`);
|
|
24
|
+
const module = existsSync(localCompiled)
|
|
25
|
+
? localCompiled
|
|
26
|
+
: root.includes(`${sep}node_modules${sep}`) && existsSync(installedCompiled)
|
|
27
|
+
? installedCompiled
|
|
28
|
+
: source;
|
|
29
|
+
return await import(pathToFileURL(module).href);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const {
|
|
33
|
+
createActiveSkillRecipeContext,
|
|
34
|
+
readRawRecipeConfig,
|
|
35
|
+
readResolvedRecipeConfig,
|
|
36
|
+
} = await importRuntimeModule("recipes-references");
|
|
37
|
+
|
|
38
|
+
const skillsDir = join(packageRoot(), "skills");
|
|
39
|
+
const packageSkillContext = createActiveSkillRecipeContext(
|
|
40
|
+
existsSync(skillsDir)
|
|
41
|
+
? readdirSync(skillsDir, { withFileTypes: true })
|
|
42
|
+
.filter((entry) => entry.isDirectory())
|
|
43
|
+
.map((entry) => ({
|
|
44
|
+
name: entry.name,
|
|
45
|
+
baseDir: join(skillsDir, entry.name),
|
|
46
|
+
}))
|
|
47
|
+
: [],
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
export function validateRecipeUsage() {
|
|
51
|
+
return `Usage:
|
|
52
|
+
validate-recipe.mjs <recipe-file-or-dir> [--all] [--skills] [--qa] [--summary]
|
|
53
|
+
|
|
54
|
+
Validates one template Recipe file or all direct *.json/*.md files in a directory with --all. Use --skills on a Skills root to validate every direct <skill>/recipes component and reject nested files or duplicate stems. Add --qa for shipped-component capability checks, where diagnostics and warnings fail validation. Add --summary for compact CLI output.`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function expandPath(value) {
|
|
58
|
+
return resolve(String(value).replace(/^~(?=\/|$)/, process.env.HOME ?? homedir()));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function templateKind(template) {
|
|
62
|
+
if (typeof template === "string") return "leaf";
|
|
63
|
+
if (Array.isArray(template)) return "sequence";
|
|
64
|
+
if (template && typeof template === "object") {
|
|
65
|
+
const node = template;
|
|
66
|
+
if (typeof node.template === "string") return "leaf";
|
|
67
|
+
if (Array.isArray(node.template))
|
|
68
|
+
return node.parallel === true ? "parallel" : "sequence";
|
|
69
|
+
if (node.parallel === true) return "parallel";
|
|
70
|
+
return "object";
|
|
71
|
+
}
|
|
72
|
+
return "unknown";
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function recipeFiles(target, all) {
|
|
76
|
+
if (!existsSync(target)) throw new Error(`Recipe path not found: ${target}`);
|
|
77
|
+
const stat = statSync(target);
|
|
78
|
+
if (stat.isFile()) return [target];
|
|
79
|
+
if (!stat.isDirectory())
|
|
80
|
+
throw new Error(`Recipe path is not a file or directory: ${target}`);
|
|
81
|
+
if (!all) throw new Error("Directory validation requires --all.");
|
|
82
|
+
return readdirSync(target)
|
|
83
|
+
.filter((file) => file.endsWith(".json") || file.endsWith(".md"))
|
|
84
|
+
.sort((a, b) => a.localeCompare(b))
|
|
85
|
+
.map((file) => resolve(target, file));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function nestedRecipeFiles(root) {
|
|
89
|
+
return readdirSync(root, { withFileTypes: true }).flatMap((entry) => {
|
|
90
|
+
const path = join(root, entry.name);
|
|
91
|
+
if (entry.isDirectory()) return nestedRecipeFiles(path);
|
|
92
|
+
return entry.isFile() && /\.(?:json|md)$/.test(entry.name) ? [path] : [];
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function scanSkillRecipes(target) {
|
|
97
|
+
if (!existsSync(target) || !statSync(target).isDirectory())
|
|
98
|
+
throw new Error(`Skills root is not a directory: ${target}`);
|
|
99
|
+
const skills = readdirSync(target, { withFileTypes: true })
|
|
100
|
+
.filter((entry) => entry.isDirectory())
|
|
101
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
102
|
+
const files = [];
|
|
103
|
+
const failures = [];
|
|
104
|
+
for (const skill of skills) {
|
|
105
|
+
const recipeDir = join(target, skill.name, "recipes");
|
|
106
|
+
if (!existsSync(recipeDir)) continue;
|
|
107
|
+
const direct = readdirSync(recipeDir, { withFileTypes: true });
|
|
108
|
+
const byStem = new Map();
|
|
109
|
+
const singletonFiles = [];
|
|
110
|
+
for (const entry of direct) {
|
|
111
|
+
const path = join(recipeDir, entry.name);
|
|
112
|
+
if (entry.isDirectory()) {
|
|
113
|
+
for (const nested of nestedRecipeFiles(path)) {
|
|
114
|
+
failures.push({
|
|
115
|
+
file: nested,
|
|
116
|
+
ok: false,
|
|
117
|
+
error: `Nested Skill Recipe files are not allowed: ${relative(recipeDir, nested)}`,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (!entry.isFile() || !/\.(?:json|md)$/.test(entry.name)) continue;
|
|
123
|
+
files.push(path);
|
|
124
|
+
if (readRawRecipeConfig(path)?.singleton === true) singletonFiles.push(path);
|
|
125
|
+
const stem = basename(entry.name, extname(entry.name));
|
|
126
|
+
const previous = byStem.get(stem);
|
|
127
|
+
if (previous) {
|
|
128
|
+
failures.push({
|
|
129
|
+
file: path,
|
|
130
|
+
ok: false,
|
|
131
|
+
error: `Skill Recipe stem collision: ${skill.name}/${stem} has both ${extname(previous)} and ${extname(path)} files`,
|
|
132
|
+
});
|
|
133
|
+
} else byStem.set(stem, path);
|
|
134
|
+
}
|
|
135
|
+
if (singletonFiles.length > 1) {
|
|
136
|
+
failures.push({
|
|
137
|
+
file: recipeDir,
|
|
138
|
+
ok: false,
|
|
139
|
+
error: `Skill ${skill.name} declares more than one singleton Recipe: ${singletonFiles.map((file) => basename(file)).join(", ")}`,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
let skillContext = packageSkillContext;
|
|
144
|
+
try {
|
|
145
|
+
skillContext = createActiveSkillRecipeContext(
|
|
146
|
+
skills.map((entry) => ({ name: entry.name, baseDir: join(target, entry.name) })),
|
|
147
|
+
);
|
|
148
|
+
} catch (error) {
|
|
149
|
+
failures.push({
|
|
150
|
+
file: target,
|
|
151
|
+
ok: false,
|
|
152
|
+
error: error instanceof Error ? error.message : String(error),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
files: files.sort((a, b) => a.localeCompare(b)),
|
|
157
|
+
failures,
|
|
158
|
+
skillContext,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function collectStrings(value, out = []) {
|
|
163
|
+
if (typeof value === "string") out.push(value);
|
|
164
|
+
else if (Array.isArray(value)) value.forEach((item) => collectStrings(item, out));
|
|
165
|
+
else if (value && typeof value === "object")
|
|
166
|
+
Object.values(value).forEach((item) => collectStrings(item, out));
|
|
167
|
+
return out;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function collectTemplateStrings(value, out = []) {
|
|
171
|
+
if (typeof value === "string") out.push(value);
|
|
172
|
+
else if (Array.isArray(value)) value.forEach((item) => collectTemplateStrings(item, out));
|
|
173
|
+
else if (value && typeof value === "object") {
|
|
174
|
+
collectTemplateStrings(value.template, out);
|
|
175
|
+
collectTemplateStrings(value.recover, out);
|
|
176
|
+
}
|
|
177
|
+
return out;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function hasPlatformNote(config) {
|
|
181
|
+
const text = [
|
|
182
|
+
config.description,
|
|
183
|
+
config.platforms,
|
|
184
|
+
config.platform_notes,
|
|
185
|
+
config.requirements,
|
|
186
|
+
]
|
|
187
|
+
.filter(Boolean)
|
|
188
|
+
.join(" ");
|
|
189
|
+
return /linux|macos|darwin|windows|win32|unix|wsl|cross-platform|portable/i.test(text);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function validateArtifactDeclarations(config) {
|
|
193
|
+
const diagnostics = [];
|
|
194
|
+
const artifacts = config.artifacts;
|
|
195
|
+
if (artifacts === undefined) return diagnostics;
|
|
196
|
+
if (!artifacts || typeof artifacts !== "object" || Array.isArray(artifacts)) {
|
|
197
|
+
diagnostics.push("artifacts: must be an object of named artifact paths");
|
|
198
|
+
return diagnostics;
|
|
199
|
+
}
|
|
200
|
+
for (const [name, value] of Object.entries(artifacts)) {
|
|
201
|
+
const path = typeof value === "string" ? value : value?.path;
|
|
202
|
+
if (typeof path !== "string" || !path.trim())
|
|
203
|
+
diagnostics.push(`artifacts.${name}: must declare a non-empty path`);
|
|
204
|
+
if (typeof path === "string" && /^\/home\//.test(path))
|
|
205
|
+
diagnostics.push(`artifacts.${name}: must not use a machine-local absolute path`);
|
|
206
|
+
}
|
|
207
|
+
return diagnostics;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function validateHelperPaths(file, config) {
|
|
211
|
+
const diagnostics = [];
|
|
212
|
+
const skillDir = dirname(dirname(file));
|
|
213
|
+
for (const template of collectTemplateStrings(config.template)) {
|
|
214
|
+
if (/(^|\s)(?:node\s+)?scripts\/[\w.-]+\.mjs/.test(template))
|
|
215
|
+
diagnostics.push("template: Skill helper scripts must be referenced through {skill_dir}/scripts");
|
|
216
|
+
for (const match of template.matchAll(/\{skill_dir\}\/([^\s"']+)/g)) {
|
|
217
|
+
const target = match[1].replace(/[),;]+$/, "");
|
|
218
|
+
if (!existsSync(join(skillDir, target)))
|
|
219
|
+
diagnostics.push(`template: referenced Skill helper not found: ${target}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return diagnostics;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function validatePortablePaths(config) {
|
|
226
|
+
const diagnostics = [];
|
|
227
|
+
for (const value of collectStrings(config)) {
|
|
228
|
+
if (/^(?:\/home\/|\/Users\/|[A-Za-z]:[\\/])/.test(value))
|
|
229
|
+
diagnostics.push(`recipe: must not use a machine-local absolute path: ${value}`);
|
|
230
|
+
}
|
|
231
|
+
return diagnostics;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function qaDiagnostics(file, config) {
|
|
235
|
+
const diagnostics = [];
|
|
236
|
+
const warnings = [];
|
|
237
|
+
if (config.mailbox !== undefined)
|
|
238
|
+
diagnostics.push("recipe.mailbox was removed; use control actions and Trace events");
|
|
239
|
+
if (config.singleton === true && config.async !== true)
|
|
240
|
+
diagnostics.push("singleton: requires async: true");
|
|
241
|
+
diagnostics.push(...validateArtifactDeclarations(config));
|
|
242
|
+
diagnostics.push(...validatePortablePaths(config));
|
|
243
|
+
diagnostics.push(...validateHelperPaths(file, config));
|
|
244
|
+
const platformSpecificTemplate = collectTemplateStrings(config.template).some(
|
|
245
|
+
(template) =>
|
|
246
|
+
/(^|\s)(?:systemctl|launchctl|osascript|powershell|pwsh|cmd\.exe|apt|apt-get|dnf|yum|brew|pacman|apk)(\s|$)/i.test(
|
|
247
|
+
template,
|
|
248
|
+
),
|
|
249
|
+
);
|
|
250
|
+
if (platformSpecificTemplate && !hasPlatformNote(config))
|
|
251
|
+
diagnostics.push("platform: platform-specific templates must document platform scope");
|
|
252
|
+
return { diagnostics, warnings };
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function qaOk(qaReport) {
|
|
256
|
+
return qaReport.diagnostics.length === 0 && qaReport.warnings.length === 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
function validateFile(file, qa = false, skillContext = packageSkillContext) {
|
|
260
|
+
try {
|
|
261
|
+
const rawConfig = readRawRecipeConfig(file);
|
|
262
|
+
const config = readResolvedRecipeConfig(file, [], { skillContext });
|
|
263
|
+
if (!config?.template)
|
|
264
|
+
throw new Error("Recipe must define a non-empty template.");
|
|
265
|
+
const expectedName = basename(file, extname(file));
|
|
266
|
+
if (config.name !== expectedName)
|
|
267
|
+
throw new Error(`Recipe identity mismatch: expected ${expectedName}, received ${config.name ?? "<none>"}`);
|
|
268
|
+
const qaReport = qa ? qaDiagnostics(file, rawConfig) : { diagnostics: [], warnings: [] };
|
|
269
|
+
return {
|
|
270
|
+
file,
|
|
271
|
+
ok: qaOk(qaReport),
|
|
272
|
+
name: config.name ?? "",
|
|
273
|
+
async: Boolean(config.async),
|
|
274
|
+
singleton: Boolean(config.singleton),
|
|
275
|
+
args: Array.isArray(config.args) ? config.args : [],
|
|
276
|
+
defaults:
|
|
277
|
+
config.defaults && typeof config.defaults === "object"
|
|
278
|
+
? Object.keys(config.defaults).sort()
|
|
279
|
+
: [],
|
|
280
|
+
imports:
|
|
281
|
+
config.imports && typeof config.imports === "object"
|
|
282
|
+
? Object.keys(config.imports).sort()
|
|
283
|
+
: [],
|
|
284
|
+
control: Array.isArray(config.control) ? config.control : undefined,
|
|
285
|
+
...(qa
|
|
286
|
+
? {
|
|
287
|
+
qa: {
|
|
288
|
+
ok: qaOk(qaReport),
|
|
289
|
+
diagnostics: qaReport.diagnostics,
|
|
290
|
+
warnings: qaReport.warnings,
|
|
291
|
+
},
|
|
292
|
+
}
|
|
293
|
+
: {}),
|
|
294
|
+
template: templateKind(config.template),
|
|
295
|
+
};
|
|
296
|
+
} catch (error) {
|
|
297
|
+
return {
|
|
298
|
+
file,
|
|
299
|
+
ok: false,
|
|
300
|
+
error: error instanceof Error ? error.message : String(error),
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export function validateRecipes(argv) {
|
|
306
|
+
const targetArg = argv.find((arg) => !arg.startsWith("-"));
|
|
307
|
+
const all = argv.includes("--all");
|
|
308
|
+
const skills = argv.includes("--skills");
|
|
309
|
+
const qa = argv.includes("--qa");
|
|
310
|
+
if (!targetArg || argv.includes("--help") || argv.includes("-h")) {
|
|
311
|
+
return { help: true, ok: Boolean(targetArg), usage: validateRecipeUsage() };
|
|
312
|
+
}
|
|
313
|
+
const target = expandPath(targetArg);
|
|
314
|
+
const scan = skills
|
|
315
|
+
? scanSkillRecipes(target)
|
|
316
|
+
: { files: recipeFiles(target, all), failures: [], skillContext: packageSkillContext };
|
|
317
|
+
const results = [
|
|
318
|
+
...scan.failures,
|
|
319
|
+
...scan.files.map((file) => validateFile(file, qa, scan.skillContext)),
|
|
320
|
+
];
|
|
321
|
+
const failed = results.filter((result) => !result.ok).length;
|
|
322
|
+
return {
|
|
323
|
+
ok: failed === 0,
|
|
324
|
+
total: results.length,
|
|
325
|
+
passed: results.length - failed,
|
|
326
|
+
failed,
|
|
327
|
+
results,
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
function summarizeReport(report) {
|
|
332
|
+
const results = Array.isArray(report.results) ? report.results : [];
|
|
333
|
+
return {
|
|
334
|
+
ok: report.ok,
|
|
335
|
+
total: report.total,
|
|
336
|
+
passed: report.passed,
|
|
337
|
+
failed: report.failed,
|
|
338
|
+
diagnostics: results.reduce(
|
|
339
|
+
(total, result) => total + (result.qa?.diagnostics?.length ?? 0),
|
|
340
|
+
0,
|
|
341
|
+
),
|
|
342
|
+
warnings: results.reduce(
|
|
343
|
+
(total, result) => total + (result.qa?.warnings?.length ?? 0),
|
|
344
|
+
0,
|
|
345
|
+
),
|
|
346
|
+
failed_files: results
|
|
347
|
+
.filter((result) => !result.ok)
|
|
348
|
+
.map((result) => ({
|
|
349
|
+
file: result.file,
|
|
350
|
+
...(result.error ? { error: result.error } : {}),
|
|
351
|
+
...(result.qa?.diagnostics?.length
|
|
352
|
+
? { diagnostics: result.qa.diagnostics }
|
|
353
|
+
: {}),
|
|
354
|
+
...(result.qa?.warnings?.length
|
|
355
|
+
? { warnings: result.qa.warnings }
|
|
356
|
+
: {}),
|
|
357
|
+
})),
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
try {
|
|
362
|
+
const argv = process.argv.slice(2);
|
|
363
|
+
const report = validateRecipes(argv);
|
|
364
|
+
if (report.help) console.error(report.usage);
|
|
365
|
+
else console.log(JSON.stringify(argv.includes("--summary") ? summarizeReport(report) : report, null, 2));
|
|
366
|
+
process.exit(report.ok ? 0 : 1);
|
|
367
|
+
} catch (error) {
|
|
368
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
369
|
+
process.exit(1);
|
|
370
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: artifacts
|
|
3
|
+
description: Use when an actor workflow must write reusable files, reports, manifests, or bundles with deterministic paths and declared outputs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Artifacts
|
|
7
|
+
|
|
8
|
+
Use this Skill after the desired durable-output outcome is known. For generic Recipe execution, Runs, persistence, or diagnosis, follow `actors`; this Skill only selects artifact behavior.
|
|
9
|
+
|
|
10
|
+
## Choose the outcome
|
|
11
|
+
|
|
12
|
+
| Desired outcome | Recipe | Result |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| Write one generated artifact and a machine-readable manifest, with optional validation first | `artifacts/bundle` | Primary artifact plus manifest |
|
|
15
|
+
| Generate bounded normalized report content without committing a filesystem write | `artifacts/report` | Report content for review or later composition |
|
|
16
|
+
| Generate and write one artifact | `artifacts/write` | Declared artifact path written with explicit mode |
|
|
17
|
+
| Describe one existing or intended artifact | `artifacts/manifest` | Manifest JSON on stdout; no write |
|
|
18
|
+
| Write prior pipeline output exactly | `artifacts/file-write` | Supporting stdin-to-file write; normally use inside composition |
|
|
19
|
+
|
|
20
|
+
Prefer `bundle` when both durable content and inventory evidence are required. Prefer `write` for one accepted file. Use `report` while content still needs review. Do not use `file-write` as a content generator. If one selected outcome should become a recurring named tool, use the persistent-capability workflow in `actors`; do not copy its graph.
|
|
21
|
+
|
|
22
|
+
## Inputs and boundaries
|
|
23
|
+
|
|
24
|
+
- Keep `input` bounded and evidence-based; choose the current model explicitly where the Recipe requires `model`.
|
|
25
|
+
- Supply caller-owned `artifact_path` and, for `bundle`, a distinct `manifest_path`.
|
|
26
|
+
- `write_mode=create` is the safe default and stops if the target exists. Use `overwrite` or `append` only when the requested mutation is explicit.
|
|
27
|
+
- Parent directories are created by the writer. `~` is resolved for artifact paths.
|
|
28
|
+
- `manifest` reports existence, size, and modification evidence; it does not validate artifact meaning.
|
|
29
|
+
- Validation in `bundle` runs only when `run_validation=true` and uses the caller-supplied trusted command and scope.
|
|
30
|
+
|
|
31
|
+
## Stop rules
|
|
32
|
+
|
|
33
|
+
Stop rather than guessing when the target path, overwrite policy, accepted content, model, or validation command is unclear. Do not claim a durable artifact from `report` or `manifest` alone. After a Run starts, use the `actors` evidence and lifecycle protocol; this Skill does not redefine it.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"async": true,
|
|
3
|
+
"imports": {
|
|
4
|
+
"artifactWrite": "artifacts/write",
|
|
5
|
+
"manifest": "artifacts/manifest",
|
|
6
|
+
"manifestWrite": "artifacts/file-write",
|
|
7
|
+
"validation": "actors/command-validate"
|
|
8
|
+
},
|
|
9
|
+
"args": [
|
|
10
|
+
"input:string",
|
|
11
|
+
"artifact_path:path",
|
|
12
|
+
"manifest_path:path",
|
|
13
|
+
"artifact_title:string",
|
|
14
|
+
"artifact_format:string",
|
|
15
|
+
"artifact_status:enum(draft,ready,blocked,accepted)",
|
|
16
|
+
"write_mode:enum(create,overwrite,append)",
|
|
17
|
+
"run_validation:bool",
|
|
18
|
+
"validation_command:string",
|
|
19
|
+
"validation_scope:string",
|
|
20
|
+
"validation_timeout_ms:int",
|
|
21
|
+
"model:string",
|
|
22
|
+
"tools:string"
|
|
23
|
+
],
|
|
24
|
+
"defaults": {
|
|
25
|
+
"artifact_title": "Artifact Bundle",
|
|
26
|
+
"artifact_format": "Markdown sections: Summary, Findings, Evidence, Risks, Next Actions.",
|
|
27
|
+
"artifact_status": "ready",
|
|
28
|
+
"write_mode": "create",
|
|
29
|
+
"run_validation": "false",
|
|
30
|
+
"validation_command": "true",
|
|
31
|
+
"validation_scope": ".",
|
|
32
|
+
"validation_timeout_ms": "300000",
|
|
33
|
+
"tools": ""
|
|
34
|
+
},
|
|
35
|
+
"artifacts": {
|
|
36
|
+
"artifact": "{artifact_path}",
|
|
37
|
+
"manifest": "{manifest_path}"
|
|
38
|
+
},
|
|
39
|
+
"template": [
|
|
40
|
+
{
|
|
41
|
+
"when": "run_validation",
|
|
42
|
+
"name": "validation",
|
|
43
|
+
"values": {
|
|
44
|
+
"command": "{validation_command}",
|
|
45
|
+
"scope": "{validation_scope}",
|
|
46
|
+
"timeout_ms": "{validation_timeout_ms}"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "artifactWrite",
|
|
51
|
+
"values": {
|
|
52
|
+
"input": "{input}",
|
|
53
|
+
"artifact_path": "{artifact_path}",
|
|
54
|
+
"artifact_format": "{artifact_format}",
|
|
55
|
+
"write_mode": "{write_mode}",
|
|
56
|
+
"model": "{model}",
|
|
57
|
+
"tools": "{tools}"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "manifest",
|
|
62
|
+
"values": {
|
|
63
|
+
"artifact_path": "{artifact_path}",
|
|
64
|
+
"title": "{artifact_title}",
|
|
65
|
+
"status": "{artifact_status}",
|
|
66
|
+
"summary": "Artifact bundle manifest for {artifact_path}."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "manifestWrite",
|
|
71
|
+
"values": {
|
|
72
|
+
"artifact_path": "{manifest_path}",
|
|
73
|
+
"mode": "{write_mode}"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"async": false,
|
|
3
|
+
"args": [
|
|
4
|
+
"artifact_path:path",
|
|
5
|
+
"mode:enum(create,overwrite,append)"
|
|
6
|
+
],
|
|
7
|
+
"defaults": {
|
|
8
|
+
"mode": "create"
|
|
9
|
+
},
|
|
10
|
+
"template": {
|
|
11
|
+
"template": "{skill_dir}/scripts/artifact-utils.mjs write {artifact_path} {mode}",
|
|
12
|
+
"output": "stdout"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"args": [
|
|
3
|
+
"artifact_path:path",
|
|
4
|
+
"title:string",
|
|
5
|
+
"status:enum(draft,ready,blocked,accepted)",
|
|
6
|
+
"summary:string"
|
|
7
|
+
],
|
|
8
|
+
"defaults": {
|
|
9
|
+
"title": "Artifact",
|
|
10
|
+
"status": "draft",
|
|
11
|
+
"summary": "Machine-readable artifact manifest."
|
|
12
|
+
},
|
|
13
|
+
"template": "{skill_dir}/scripts/artifact-utils.mjs manifest {artifact_path} {title} {status} {summary}"
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"async": true,
|
|
3
|
+
"imports": {
|
|
4
|
+
"normalizer": "swarm/subagent-normalize",
|
|
5
|
+
"artifact": "swarm/subagent-artifact"
|
|
6
|
+
},
|
|
7
|
+
"args": [
|
|
8
|
+
"input:string",
|
|
9
|
+
"artifact_path:path",
|
|
10
|
+
"artifact_format:string",
|
|
11
|
+
"model:string",
|
|
12
|
+
"tools:string"
|
|
13
|
+
],
|
|
14
|
+
"defaults": {
|
|
15
|
+
"artifact_format": "Markdown sections: Summary, Findings, Evidence, Risks, Next Actions.",
|
|
16
|
+
"tools": ""
|
|
17
|
+
},
|
|
18
|
+
"template": [
|
|
19
|
+
{
|
|
20
|
+
"name": "normalizer",
|
|
21
|
+
"values": {
|
|
22
|
+
"input": "{input}",
|
|
23
|
+
"format": "{artifact_format}",
|
|
24
|
+
"model": "{model}",
|
|
25
|
+
"tools": "{tools}"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "artifact",
|
|
30
|
+
"values": {
|
|
31
|
+
"input": "Use normalized report from stdin.",
|
|
32
|
+
"artifact_path": "{artifact_path}",
|
|
33
|
+
"artifact_format": "{artifact_format}",
|
|
34
|
+
"model": "{model}",
|
|
35
|
+
"tools": "{tools}"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"async": true,
|
|
3
|
+
"imports": {
|
|
4
|
+
"normalizer": "swarm/subagent-normalize",
|
|
5
|
+
"artifact": "swarm/subagent-artifact",
|
|
6
|
+
"writer": "artifacts/file-write"
|
|
7
|
+
},
|
|
8
|
+
"args": [
|
|
9
|
+
"input:string",
|
|
10
|
+
"artifact_path:path",
|
|
11
|
+
"artifact_format:string",
|
|
12
|
+
"write_mode:enum(create,overwrite,append)",
|
|
13
|
+
"model:string",
|
|
14
|
+
"tools:string"
|
|
15
|
+
],
|
|
16
|
+
"defaults": {
|
|
17
|
+
"artifact_format": "Markdown sections: Summary, Findings, Evidence, Risks, Next Actions.",
|
|
18
|
+
"write_mode": "create",
|
|
19
|
+
"tools": ""
|
|
20
|
+
},
|
|
21
|
+
"artifacts": {
|
|
22
|
+
"artifact": "{artifact_path}"
|
|
23
|
+
},
|
|
24
|
+
"template": [
|
|
25
|
+
{
|
|
26
|
+
"name": "normalizer",
|
|
27
|
+
"values": {
|
|
28
|
+
"input": "{input}",
|
|
29
|
+
"format": "{artifact_format}",
|
|
30
|
+
"model": "{model}",
|
|
31
|
+
"tools": "{tools}"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "artifact",
|
|
36
|
+
"values": {
|
|
37
|
+
"input": "Use normalized report from stdin.",
|
|
38
|
+
"artifact_path": "{artifact_path}",
|
|
39
|
+
"artifact_format": "{artifact_format}",
|
|
40
|
+
"write_policy": "The caller selected deterministic write mode {write_mode}; produce only the artifact content that should be written, with no surrounding commentary outside the artifact body.",
|
|
41
|
+
"model": "{model}",
|
|
42
|
+
"tools": "{tools}"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "writer",
|
|
47
|
+
"values": {
|
|
48
|
+
"artifact_path": "{artifact_path}",
|
|
49
|
+
"mode": "{write_mode}"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/** Artifact-owned deterministic manifest and write helpers. */
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
appendFileSync,
|
|
7
|
+
existsSync,
|
|
8
|
+
mkdirSync,
|
|
9
|
+
readFileSync,
|
|
10
|
+
statSync,
|
|
11
|
+
writeFileSync,
|
|
12
|
+
} from "node:fs";
|
|
13
|
+
import { dirname, resolve } from "node:path";
|
|
14
|
+
|
|
15
|
+
function fail(message) {
|
|
16
|
+
console.error(message);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function pathOf(value) {
|
|
21
|
+
return resolve(String(value).replace(/^~(?=\/|$)/, process.env.HOME ?? "~"));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function manifest(pathValue, title = "Artifact", status = "draft", summary = "") {
|
|
25
|
+
const path = pathOf(pathValue);
|
|
26
|
+
const exists = existsSync(path);
|
|
27
|
+
const stat = exists ? statSync(path) : undefined;
|
|
28
|
+
console.log(JSON.stringify({
|
|
29
|
+
title,
|
|
30
|
+
status,
|
|
31
|
+
path,
|
|
32
|
+
exists,
|
|
33
|
+
bytes: stat?.size ?? 0,
|
|
34
|
+
modified: stat?.mtime?.toISOString?.() ?? null,
|
|
35
|
+
summary,
|
|
36
|
+
}, null, 2));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function write(pathValue, mode = "create") {
|
|
40
|
+
const path = pathOf(pathValue);
|
|
41
|
+
if (!["create", "overwrite", "append"].includes(mode))
|
|
42
|
+
fail(`Invalid artifact write mode: ${mode}`);
|
|
43
|
+
if (mode === "create" && existsSync(path)) fail(`Artifact already exists: ${path}`);
|
|
44
|
+
const content = readFileSync(0, "utf8");
|
|
45
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
46
|
+
if (mode === "append") appendFileSync(path, content);
|
|
47
|
+
else writeFileSync(path, content, "utf8");
|
|
48
|
+
console.log(JSON.stringify({
|
|
49
|
+
path,
|
|
50
|
+
mode,
|
|
51
|
+
bytes: statSync(path).size,
|
|
52
|
+
written: true,
|
|
53
|
+
}, null, 2));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const [command, ...args] = process.argv.slice(2);
|
|
57
|
+
try {
|
|
58
|
+
if (command === "manifest") manifest(args[0] ?? "artifact.md", args[1], args[2], args[3]);
|
|
59
|
+
else if (command === "write") write(args[0] ?? "artifact.md", args[1]);
|
|
60
|
+
else fail(`Unknown artifact command: ${command ?? ""}`);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
fail(error instanceof Error ? error.message : String(error));
|
|
63
|
+
}
|