@mmerterden/multi-agent-pipeline 20.43.1 → 21.0.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/CHANGELOG.md +111 -0
- package/README.md +49 -37
- package/README.tr.md +48 -37
- package/SECURITY.md +4 -4
- package/docs/architecture.md +6 -6
- package/docs/ecosystem.md +35 -30
- package/docs/facts.json +11 -9
- package/docs/features.md +6 -5
- package/index.js +1 -1
- package/install/_common.mjs +5 -1
- package/install/_mcp-register.mjs +80 -5
- package/install/_plugin-skills.mjs +1 -1
- package/install/_unattended-profile.mjs +12 -3
- package/install/claude.mjs +45 -4
- package/install/codex.mjs +2 -2
- package/install/index.mjs +49 -9
- package/install/templates/claude-hooks.json +2 -2
- package/install/templates/codex-instructions.md +1 -1
- package/install/templates/copilot-instructions.md +7 -7
- package/manifest.json +410 -400
- package/package.json +4 -4
- package/pipeline/agents/security-auditor.md +2 -2
- package/pipeline/agents/test-gen-analyst.md +1 -1
- package/pipeline/commands/archive-guard.md +6 -6
- package/pipeline/commands/multi-agent/SKILL.md +23 -2
- package/pipeline/commands/multi-agent/analysis/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/analysis-jira/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/autopilot-off/SKILL.md +10 -6
- package/pipeline/commands/multi-agent/bug-bash/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/channels/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/create-jira/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/design-check/SKILL.md +9 -1
- package/pipeline/commands/multi-agent/issue/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/jira/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/kill/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/office-off/SKILL.md +3 -4
- package/pipeline/commands/multi-agent/office-on/SKILL.md +2 -6
- package/pipeline/commands/multi-agent/office-status/SKILL.md +1 -6
- package/pipeline/commands/multi-agent/prune-logs/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/purge/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/refactor/SKILL.md +16 -8
- package/pipeline/commands/multi-agent/research/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/resume/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/review/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/review-analysis/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/review-issue/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/review-jira/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/review-priority/SKILL.md +18 -5
- package/pipeline/commands/multi-agent/route-on/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/routines/SKILL.md +36 -14
- package/pipeline/commands/multi-agent/save/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/scaffold/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/search/SKILL.md +4 -4
- package/pipeline/commands/multi-agent/security-review/SKILL.md +9 -4
- package/pipeline/commands/multi-agent/setup/SKILL.md +7 -2
- package/pipeline/commands/multi-agent/store-ready/SKILL.md +5 -3
- package/pipeline/commands/multi-agent/sync/SKILL.md +20 -12
- package/pipeline/commands/multi-agent/test/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/test-accessibility/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/test-dark-mode/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/test-dynamic-type/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/test-gen/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/test-screenshots/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/testflight-validation/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/uninstall/SKILL.md +3 -3
- package/pipeline/commands/multi-agent/update/SKILL.md +17 -12
- package/pipeline/commands/sim-test.md +5 -5
- package/pipeline/contract/CHANGELOG.md +92 -3
- package/pipeline/contract/README.md +92 -85
- package/pipeline/contract/build.mjs +0 -5
- package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
- package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
- package/pipeline/contract/manifest.json +102 -125
- package/pipeline/contract/types/index.d.ts +206 -49
- package/pipeline/lib/credential-inventory.sh +3 -2
- package/pipeline/lib/cross-repo.mjs +11 -6
- package/pipeline/lib/fetch-crashlytics.sh +5 -2
- package/pipeline/lib/mcp-rename.mjs +508 -0
- package/pipeline/lib/model-dispatch.sh +1 -1
- package/pipeline/lib/office-legacy.mjs +207 -0
- package/pipeline/lib/outbound-gate.mjs +8 -2
- package/pipeline/lib/route-state.sh +2 -2
- package/pipeline/lib/routine-secret-scan.mjs +166 -0
- package/pipeline/lib/toolkit-llm.sh +12 -10
- package/pipeline/lib/unattended.mjs +1 -1
- package/pipeline/lib/unattended.sh +1 -1
- package/pipeline/lib/untrusted-fence.mjs +1 -1
- package/pipeline/lib/usage-endpoint.mjs +32 -0
- package/pipeline/lib/usage-token.mjs +76 -0
- package/pipeline/multi-agent-refs/_input-parser.md +22 -0
- package/pipeline/multi-agent-refs/analysis/locked.md +1 -1
- package/pipeline/multi-agent-refs/android-guide.md +2 -2
- package/pipeline/multi-agent-refs/audit-guide.md +1 -1
- package/pipeline/multi-agent-refs/complaint-analysis/phases.md +1 -1
- package/pipeline/multi-agent-refs/cross-cli-contract.md +20 -18
- package/pipeline/multi-agent-refs/design-check/build-launch.md +2 -2
- package/pipeline/multi-agent-refs/design-check/compare.md +2 -2
- package/pipeline/multi-agent-refs/design-check/drive-capture.md +1 -1
- package/pipeline/multi-agent-refs/design-check/export.md +1 -1
- package/pipeline/multi-agent-refs/design-check/init-inventory.md +2 -2
- package/pipeline/multi-agent-refs/design-check/mcp-currency-gate.md +4 -4
- package/pipeline/multi-agent-refs/design-check/scope-and-ledger.md +1 -1
- package/pipeline/multi-agent-refs/features/build-facts.md +115 -0
- package/pipeline/multi-agent-refs/features/code-graph.md +8 -8
- package/pipeline/multi-agent-refs/features/code-intelligence.md +5 -5
- package/pipeline/multi-agent-refs/features/design-conformance.md +4 -4
- package/pipeline/multi-agent-refs/features/doctor.md +43 -4
- package/pipeline/multi-agent-refs/features/exploratory-testing.md +1 -1
- package/pipeline/multi-agent-refs/features/external-context-injection.md +1 -1
- package/pipeline/multi-agent-refs/features/free-models.md +5 -5
- package/pipeline/multi-agent-refs/features/office-threat-model.md +11 -32
- package/pipeline/multi-agent-refs/features/plan-attachment.md +55 -0
- package/pipeline/multi-agent-refs/features/product-context.md +1 -1
- package/pipeline/multi-agent-refs/features/routine-sharing.md +196 -0
- package/pipeline/multi-agent-refs/features/security-audit.md +3 -3
- package/pipeline/multi-agent-refs/features/test-classification.md +2 -2
- package/pipeline/multi-agent-refs/features/unattended-gates.md +1 -1
- package/pipeline/multi-agent-refs/features/unattended-security.md +8 -23
- package/pipeline/multi-agent-refs/features/usage-reporting.md +184 -15
- package/pipeline/multi-agent-refs/features/visual-evidence.md +1 -1
- package/pipeline/multi-agent-refs/help/en.md +138 -274
- package/pipeline/multi-agent-refs/help/tr.md +140 -274
- package/pipeline/multi-agent-refs/keychain.md +2 -2
- package/pipeline/multi-agent-refs/knowledge.md +4 -4
- package/pipeline/multi-agent-refs/orchestrator/copilot-pipeline.md +3 -3
- package/pipeline/multi-agent-refs/orchestrator/dispatcher.md +2 -0
- package/pipeline/multi-agent-refs/outside-the-pipeline.md +2 -2
- package/pipeline/multi-agent-refs/phases/modes.md +17 -0
- package/pipeline/multi-agent-refs/phases/phase-0-init.md +21 -2
- package/pipeline/multi-agent-refs/phases/phase-1-plan.md +8 -5
- package/pipeline/multi-agent-refs/phases/phase-2-dev.md +2 -2
- package/pipeline/multi-agent-refs/phases/phase-3-review.md +4 -4
- package/pipeline/multi-agent-refs/phases/phase-5-report.md +10 -0
- package/pipeline/multi-agent-refs/refactor/sweep.md +4 -4
- package/pipeline/multi-agent-refs/refactor/toolkit-research.md +1 -1
- package/pipeline/multi-agent-refs/research/engine.md +1 -1
- package/pipeline/multi-agent-refs/rules.md +2 -2
- package/pipeline/multi-agent-refs/setup/app-store-connect.md +2 -2
- package/pipeline/multi-agent-refs/setup/firebase.md +3 -2
- package/pipeline/multi-agent-refs/setup/google-play.md +1 -1
- package/pipeline/multi-agent-refs/setup/token-save-flow.md +3 -2
- package/pipeline/multi-agent-refs/store-ready/gate-1-static.md +12 -2
- package/pipeline/multi-agent-refs/store-ready/gate-3-policy.md +3 -3
- package/pipeline/multi-agent-refs/store-ready/gates.md +2 -1
- package/pipeline/multi-agent-refs/store-ready/report.md +10 -1
- package/pipeline/multi-agent-refs/swiftui-guide.md +2 -2
- package/pipeline/multi-agent-refs/sync/codex.md +1 -1
- package/pipeline/multi-agent-refs/sync/dev-toolkit.md +5 -5
- package/pipeline/multi-agent-refs/sync/overview.md +2 -2
- package/pipeline/multi-agent-refs/sync/stack-plugins.md +2 -2
- package/pipeline/multi-agent-refs/tracker-contract.md +1 -1
- package/pipeline/multi-agent-refs/unattended-contract.md +1 -2
- package/pipeline/multi-agent-refs/web-guide.md +2 -2
- package/pipeline/office/index.html +1077 -170
- package/pipeline/office/toolkit.json +1 -1
- package/pipeline/preferences-template.json +6 -6
- package/pipeline/rules/figma-pipeline.md +2 -2
- package/pipeline/rules/outside-the-pipeline.md +1 -1
- package/pipeline/schemas/activity-chat.schema.json +1 -1
- package/pipeline/schemas/activity-roles.schema.json +1 -1
- package/pipeline/schemas/activity.schema.json +1 -1
- package/pipeline/schemas/agent-state.schema.json +36 -2
- package/pipeline/schemas/analysis-output.schema.json +1 -1
- package/pipeline/schemas/answer-request.schema.json +1 -1
- package/pipeline/schemas/answer-result.schema.json +1 -1
- package/pipeline/schemas/autopilot-config.schema.json +1 -1
- package/pipeline/schemas/autopilot-off-request.schema.json +1 -1
- package/pipeline/schemas/autopilot-off.schema.json +1 -1
- package/pipeline/schemas/autopilot-on-request.schema.json +1 -1
- package/pipeline/schemas/autopilot-on.schema.json +1 -1
- package/pipeline/schemas/autopilot-status.schema.json +1 -1
- package/pipeline/schemas/bug-bash-verification.schema.json +1 -1
- package/pipeline/schemas/code-graph.schema.json +1 -1
- package/pipeline/schemas/command-parameters.schema.json +1 -1
- package/pipeline/schemas/constitution.schema.json +1 -1
- package/pipeline/schemas/contract-error.schema.json +7 -13
- package/pipeline/schemas/criteria-manifest.schema.json +1 -1
- package/pipeline/schemas/design-check-config.schema.json +1 -1
- package/pipeline/schemas/diff-risk.schema.json +1 -1
- package/pipeline/schemas/disk-clean-request.schema.json +66 -0
- package/pipeline/schemas/disk-clean.schema.json +243 -0
- package/pipeline/schemas/doctor-report.schema.json +1 -1
- package/pipeline/schemas/explore-run.schema.json +1 -1
- package/pipeline/schemas/figma-project-config.schema.json +1 -1
- package/pipeline/schemas/gc-request.schema.json +1 -1
- package/pipeline/schemas/gc.schema.json +1 -1
- package/pipeline/schemas/issue-maturity.schema.json +1 -1
- package/pipeline/schemas/issues.schema.json +1 -1
- package/pipeline/schemas/job-change.schema.json +1 -1
- package/pipeline/schemas/job-request.schema.json +1 -1
- package/pipeline/schemas/kill-request.schema.json +1 -1
- package/pipeline/schemas/kill.schema.json +1 -1
- package/pipeline/schemas/launch-plan.schema.json +1 -1
- package/pipeline/schemas/launch-request.schema.json +2 -2
- package/pipeline/schemas/launch.schema.json +1 -1
- package/pipeline/schemas/learnings-ledger.schema.json +1 -1
- package/pipeline/schemas/ledger.schema.json +1 -1
- package/pipeline/schemas/office-archive.schema.json +2 -2
- package/pipeline/schemas/office-credentials.schema.json +1 -1
- package/pipeline/schemas/office-jobs.json +25 -0
- package/pipeline/schemas/office-jobs.schema.json +20 -1
- package/pipeline/schemas/office-memory.schema.json +1 -1
- package/pipeline/schemas/office-server-room.schema.json +1 -1
- package/pipeline/schemas/office-settings-request.schema.json +1 -1
- package/pipeline/schemas/office-settings.schema.json +1 -1
- package/pipeline/schemas/permissions.schema.json +1 -1
- package/pipeline/schemas/phases.json +4 -4
- package/pipeline/schemas/phases.schema.json +1 -1
- package/pipeline/schemas/plan-critique.schema.json +1 -1
- package/pipeline/schemas/planning-output.schema.json +1 -1
- package/pipeline/schemas/pr-reach.schema.json +1 -1
- package/pipeline/schemas/pr-request.schema.json +1 -1
- package/pipeline/schemas/prefs.schema.json +40 -18
- package/pipeline/schemas/product-tree-overlay.schema.json +1 -1
- package/pipeline/schemas/product-tree.schema.json +1 -1
- package/pipeline/schemas/prs.schema.json +1 -1
- package/pipeline/schemas/prune-logs-request.schema.json +1 -1
- package/pipeline/schemas/prune-logs.schema.json +1 -1
- package/pipeline/schemas/repo-change.schema.json +1 -1
- package/pipeline/schemas/repo-profile.schema.json +1 -1
- package/pipeline/schemas/repo-request.schema.json +1 -1
- package/pipeline/schemas/repos.schema.json +1 -1
- package/pipeline/schemas/research-output.schema.json +1 -1
- package/pipeline/schemas/resume-request.schema.json +1 -1
- package/pipeline/schemas/review-file-exclusions.schema.json +1 -1
- package/pipeline/schemas/review-verdict-request.schema.json +1 -1
- package/pipeline/schemas/review-verdict.schema.json +1 -1
- package/pipeline/schemas/reviewer-output.schema.json +1 -1
- package/pipeline/schemas/route-config.schema.json +2 -2
- package/pipeline/schemas/routine-delete.schema.json +1 -1
- package/pipeline/schemas/routines.schema.json +1 -1
- package/pipeline/schemas/run-evidence.schema.json +1 -1
- package/pipeline/schemas/run-log.schema.json +1 -1
- package/pipeline/schemas/run-questions.schema.json +1 -1
- package/pipeline/schemas/run-results.schema.json +1 -1
- package/pipeline/schemas/runs-index.schema.json +1 -1
- package/pipeline/schemas/scaffold-manifest.schema.json +1 -1
- package/pipeline/schemas/scope-check.schema.json +1 -1
- package/pipeline/schemas/secret-patterns.schema.json +1 -1
- package/pipeline/schemas/security-finding.schema.json +1 -1
- package/pipeline/schemas/service-read.schema.json +1 -1
- package/pipeline/schemas/shared-routine-import-request.schema.json +43 -0
- package/pipeline/schemas/shared-routine-import.schema.json +118 -0
- package/pipeline/schemas/shared-routine.schema.json +79 -0
- package/pipeline/schemas/shared-routines.schema.json +83 -0
- package/pipeline/schemas/skill-catalog.schema.json +91 -0
- package/pipeline/schemas/stack-adapters.schema.json +1 -1
- package/pipeline/schemas/stack-change.schema.json +1 -1
- package/pipeline/schemas/stack-request.schema.json +1 -1
- package/pipeline/schemas/stack.schema.json +1 -1
- package/pipeline/schemas/steer-request.schema.json +1 -1
- package/pipeline/schemas/steer.schema.json +1 -1
- package/pipeline/schemas/system-status.schema.json +2 -2
- package/pipeline/schemas/test-gap.schema.json +1 -1
- package/pipeline/schemas/test-gen-discovery.schema.json +1 -1
- package/pipeline/schemas/test-gen-gaps.schema.json +1 -1
- package/pipeline/schemas/test-gen-inventory.schema.json +1 -1
- package/pipeline/schemas/test-gen-results.schema.json +1 -1
- package/pipeline/schemas/token-budget.json +4 -4
- package/pipeline/schemas/token-budget.schema.json +1 -1
- package/pipeline/schemas/tool-call-request.schema.json +1 -1
- package/pipeline/schemas/tool-call.schema.json +1 -1
- package/pipeline/schemas/toolkit-path-params.json +56 -2
- package/pipeline/schemas/toolkit-path-params.schema.json +2 -2
- package/pipeline/schemas/tools.schema.json +2 -2
- package/pipeline/schemas/triage-corpus.schema.json +1 -1
- package/pipeline/schemas/triage-output.schema.json +1 -1
- package/pipeline/schemas/unattended-policy.json +8 -4
- package/pipeline/schemas/unattended-policy.schema.json +1 -1
- package/pipeline/schemas/unattended-profile.json +8 -6
- package/pipeline/schemas/unattended-profile.schema.json +1 -1
- package/pipeline/schemas/worktrees.schema.json +1 -1
- package/pipeline/scripts/_contract-core.mjs +1 -1
- package/pipeline/scripts/_contract-routes-catalog.mjs +31 -3
- package/pipeline/scripts/_contract-routes-ops.mjs +25 -2
- package/pipeline/scripts/_contract-routes-routines.mjs +327 -0
- package/pipeline/scripts/_contract-routes-runs.mjs +4 -47
- package/pipeline/scripts/_guard-probe.mjs +1 -1
- package/pipeline/scripts/_renamed-skills.mjs +20 -8
- package/pipeline/scripts/_sibling-root.mjs +1 -1
- package/pipeline/scripts/_stack-routing.mjs +3 -0
- package/pipeline/scripts/_user_guard_rules.py +22 -7
- package/pipeline/scripts/autopilot-control.mjs +14 -2
- package/pipeline/scripts/autopilot-loop.mjs +16 -1
- package/pipeline/scripts/autopilot-runner.mjs +37 -12
- package/pipeline/scripts/bulk-read.sh +1 -1
- package/pipeline/scripts/contract-server.mjs +72 -147
- package/pipeline/scripts/cost-table.json +2 -2
- package/pipeline/scripts/doctor.mjs +171 -10
- package/pipeline/scripts/feedback-send.mjs +2 -36
- package/pipeline/scripts/gen-facts.mjs +21 -1
- package/pipeline/scripts/gen-free-hosts.mjs +2 -2
- package/pipeline/scripts/gen-mode-dispatch.mjs +11 -7
- package/pipeline/scripts/graph-hint.mjs +1 -1
- package/pipeline/scripts/health-report.mjs +4 -3
- package/pipeline/scripts/job-launch.mjs +51 -10
- package/pipeline/scripts/launch-request.mjs +12 -25
- package/pipeline/scripts/migrate-prefs.mjs +21 -1
- package/pipeline/scripts/office-archive.mjs +1 -2
- package/pipeline/scripts/office-control.mjs +17 -92
- package/pipeline/scripts/office-disk.mjs +262 -0
- package/pipeline/scripts/office-server-room.mjs +1 -1
- package/pipeline/scripts/phase0-exit-gate.mjs +1 -1
- package/pipeline/scripts/plan-attachment.mjs +1082 -0
- package/pipeline/scripts/pre-commit-check.sh +4 -0
- package/pipeline/scripts/pre-push-check.sh +1 -1
- package/pipeline/scripts/probe-evidence-capability.sh +1 -1
- package/pipeline/scripts/repo-recommend.mjs +2 -2
- package/pipeline/scripts/routine-registry.mjs +537 -53
- package/pipeline/scripts/routine-share.mjs +442 -0
- package/pipeline/scripts/runs-index.mjs +1 -1
- package/pipeline/scripts/skill-catalog.mjs +302 -0
- package/pipeline/scripts/stack-toggle.mjs +104 -41
- package/pipeline/scripts/system-status.mjs +8 -2
- package/pipeline/scripts/test-classify.mjs +1 -1
- package/pipeline/scripts/toolkit-tools.mjs +4 -3
- package/pipeline/scripts/unattended_policy.py +18 -5
- package/pipeline/scripts/uninstall.mjs +71 -28
- package/pipeline/scripts/usage-access.mjs +384 -0
- package/pipeline/scripts/usage-identity.mjs +81 -14
- package/pipeline/scripts/usage-register.mjs +389 -72
- package/pipeline/scripts/usage-report.mjs +124 -11
- package/pipeline/scripts/work-items.mjs +1 -1
- package/pipeline/scripts/write-store-config.mjs +3 -3
- package/pipeline/skills/.skill-manifest.json +72 -68
- package/pipeline/skills/.skills-index.json +40 -29
- package/pipeline/skills/renamed.json +2 -1
- package/pipeline/skills/shared/README.md +13 -12
- package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +14 -14
- package/pipeline/skills/shared/core/apple-archive-compliance/references/examples.md +1 -1
- package/pipeline/skills/shared/core/apple-archive-compliance/references/version-history.md +3 -3
- package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +1 -1
- package/pipeline/skills/shared/core/google-play-compliance/references/notes.md +1 -1
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +14 -4
- package/pipeline/skills/shared/core/multi-agent-analysis/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-analysis-jira/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-autopilot-off/SKILL.md +6 -3
- package/pipeline/skills/shared/core/multi-agent-bug-bash/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-channels/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-complaint-analysis/SKILL.md +9 -1
- package/pipeline/skills/shared/core/multi-agent-create-jira/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +13 -5
- package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +6 -6
- package/pipeline/skills/shared/core/multi-agent-help/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-issue/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-jira/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-kill/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-office-off/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-office-on/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-office-status/SKILL.md +2 -4
- package/pipeline/skills/shared/core/multi-agent-purge/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-refactor/SKILL.md +16 -8
- package/pipeline/skills/shared/core/multi-agent-research/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-resume/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-review-analysis/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-review-issue/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-review-jira/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-review-priority/SKILL.md +11 -2
- package/pipeline/skills/shared/core/multi-agent-route-on/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-routines/SKILL.md +17 -6
- package/pipeline/skills/shared/core/multi-agent-save/SKILL.md +3 -3
- package/pipeline/skills/shared/core/multi-agent-scaffold/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-search/SKILL.md +3 -3
- package/pipeline/skills/shared/core/multi-agent-security-review/SKILL.md +6 -5
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +7 -2
- package/pipeline/skills/shared/core/multi-agent-store-ready/SKILL.md +20 -8
- package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +18 -10
- package/pipeline/skills/shared/core/multi-agent-test/SKILL.md +5 -3
- package/pipeline/skills/shared/core/multi-agent-test-accessibility/SKILL.md +5 -3
- package/pipeline/skills/shared/core/multi-agent-test-dark-mode/SKILL.md +5 -3
- package/pipeline/skills/shared/core/multi-agent-test-dynamic-type/SKILL.md +5 -3
- package/pipeline/skills/shared/core/multi-agent-test-gen/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-test-screenshots/SKILL.md +5 -3
- package/pipeline/skills/shared/core/multi-agent-testflight-validation/SKILL.md +7 -4
- package/pipeline/skills/shared/core/multi-agent-update/SKILL.md +75 -22
- package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +2 -2
- package/pipeline/skills/shared/external/app-store-review/SKILL.md +1 -1
- package/pipeline/skills/shared/external/e2e-testing/SKILL.md +23 -23
- package/pipeline/skills/shared/external/e2e-testing/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/e2e-testing/references/document-fixtures.md +6 -6
- package/pipeline/skills/shared/external/free-llm-apis/SKILL.md +2 -2
- package/pipeline/skills/shared/external/handle-request/SKILL.md +1 -1
- package/pipeline/skills/shared/external/hig-app-icons/SKILL.md +2 -2
- package/pipeline/skills/shared/external/hig-app-icons/references/icon-workflow.md +1 -1
- package/pipeline/skills/shared/external/ios-design-review/SKILL.md +12 -12
- package/pipeline/skills/shared/external/ios-design-review/evals/evals.json +1 -1
- package/pipeline/skills/shared/external/ios-design-review/references/appearance-matrix.md +17 -17
- package/pipeline/skills/shared/external/ios-design-review/references/checklist.md +1 -1
- package/pipeline/skills/shared/external/ios-simulator-debugging/SKILL.md +5 -5
- package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +4 -4
- package/pipeline/skills/shared/external/release-video/SKILL.md +147 -0
- package/pipeline/skills/shared/external/release-video/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/reverse-engineer-own-app/SKILL.md +231 -0
- package/pipeline/skills/shared/external/reverse-engineer-own-app/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/security-review/SKILL.md +2 -2
- package/pipeline/skills/shared/external/security-review/references/owasp-mobile-top10-2024.md +1 -1
- package/pipeline/skills/shared/external/security-review/references/owasp-web-api-top10-2021.md +1 -1
- package/pipeline/skills/shared/external/short-video-craft/SKILL.md +177 -0
- package/pipeline/skills/shared/external/short-video-craft/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/short-video-craft/references/generated-defaults.md +24 -0
- package/pipeline/skills/shared/external/signal-community/SKILL.md +6 -6
- package/pipeline/skills/shared/external/test-result-triage/SKILL.md +4 -4
- package/pipeline/skills/shared/external/web-testing/SKILL.md +3 -3
- package/pipeline/skills/shared/external/web-testing/references/testing-examples.md +13 -13
- package/pipeline/skills/skills-index.md +9 -8
- package/pipeline/commands/multi-agent/autopilot/SKILL.md +0 -123
- package/pipeline/commands/multi-agent/office-pair/SKILL.md +0 -89
- package/pipeline/contract/fixtures/error-unsigned.json +0 -5
- package/pipeline/lib/office-remote.mjs +0 -228
- package/pipeline/lib/qr-code.mjs +0 -386
- package/pipeline/lib/web-push.mjs +0 -198
- package/pipeline/multi-agent-refs/features/office-remote-protocol.md +0 -317
- package/pipeline/multi-agent-refs/features/phone-api.md +0 -306
- package/pipeline/schemas/phone-devices.schema.json +0 -61
- package/pipeline/schemas/phone-signed-request.schema.json +0 -67
- package/pipeline/scripts/_phone-auth.mjs +0 -485
- package/pipeline/scripts/office-pair.mjs +0 -459
- package/pipeline/scripts/office-push.mjs +0 -613
- package/pipeline/scripts/office-remote-client.mjs +0 -490
- package/pipeline/scripts/phone-devices.mjs +0 -248
- package/pipeline/skills/shared/core/multi-agent-autopilot/SKILL.md +0 -62
- package/pipeline/skills/shared/core/multi-agent-office-pair/SKILL.md +0 -19
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/
|
|
3
|
+
"$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/toolkit-path-params.schema.json",
|
|
4
4
|
"title": "Toolkit path parameters",
|
|
5
|
-
"description": "Shape of toolkit-path-params.json: per multi-agent-
|
|
5
|
+
"description": "Shape of toolkit-path-params.json: per multi-agent-mcp tool, the parameters it writes to and the filesystem paths it reads, as the toolkit's tool-manifest.json declares them. unattended_policy.py confines exactly these; a nested parameter is written as a dotted path with [] for an array item (modules[].report_file).",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["$comment", "toolkitVersion", "tools"],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/
|
|
3
|
+
"$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/tools.schema.json",
|
|
4
4
|
"title": "Toolkit tools",
|
|
5
|
-
"description": "What GET /v1/tools returns (`toolkit-tools.mjs list`): every tool the registered multi-agent
|
|
5
|
+
"description": "What GET /v1/tools returns (`toolkit-tools.mjs list`): every tool the registered multi-agent MCP server serves, with its category (the name's prefix), risk from its own annotations (readOnlyHint read, destructiveHint high, else low) and its inputSchema, from which a client builds the form. Calls are denied by default; allowed says which tools can be called and reason why the others cannot.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["contractVersion", "tools"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/
|
|
3
|
+
"$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/triage-corpus.schema.json",
|
|
4
4
|
"version": "1.0.0",
|
|
5
5
|
"title": "Multi-Agent Pipeline - Triage corpus row",
|
|
6
6
|
"description": "Shape of one row in the JSONL triage corpus at $HOME/.claude/memory/multi-agent/<repo-slug>/triage-corpus.jsonl. Append-only. Each row records a single accepted/deferred/rejected finding from a past triage run plus minimal task context. Used by Phase 1 (similar-task enrichment) and Phase 4 (prior-art lookup).",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/
|
|
3
|
+
"$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/triage-output.schema.json",
|
|
4
4
|
"version": "3.6.0",
|
|
5
5
|
"title": "Multi-Agent Pipeline - Phase 3 triage output",
|
|
6
6
|
"description": "Contract for the Opus triage agent's JSON output in Phase 4 Step 3. Triage consumes merged reviewer findings and splits them into accepted/deferred/rejected. Only `accepted` blocking/important items trigger Phase 3 rework. v3.1.0 adds the optional `consensus` block so triage can surface reviewer-agreement risk (false consensus among same-base-model reviewers) instead of silently merging. v3.2.0 adds the optional per-finding `verification` block written by Phase 3 Step 3.7 (verify-by-test): the empirical repro-test outcome for accepted blocking findings. v3.3.0 carries ruleId + criteriaSource through triage so a finding that cites a stable rule ID keeps that citation into Phase 4 and Phase 5, and the lesson loop can key durable learnings by rule. v3.4.0 adds the optional per-finding fingerprint (finding-fingerprint.mjs) so review-delta.mjs can tell still-present, resolved and new findings apart between rounds. v3.5.0 adds the optional per-finding `quote` (matched against the cited line by verify-citations.mjs) and `preExisting` + `baselineEvidence` on findings and on deferred/rejected items, so a pre-existing claim in an unattended run can be checked against the base commit. v3.6.0 adds the optional `cannotVerify[]`: one settled row per requirement a reviewer could not verify from the diff.",
|
|
@@ -70,10 +70,11 @@
|
|
|
70
70
|
".tmux.conf",
|
|
71
71
|
".vimrc"
|
|
72
72
|
],
|
|
73
|
-
"$commentHomeDirs": "Directory prefixes under $HOME whose whole subtree is host, shell or credential configuration, the guard's twin of the profile's sandbox.filesystem.denyWrite list. ~/.config/git holds the XDG git config, ~/.config/gh the GitHub CLI token, ~/.ssh and ~/.gnupg keys and their config; ~/Library/LaunchAgents holds per-user launchd jobs that run as the operator; ~/.gradle is the operator's Gradle home, and ~/.gradle/init.d runs on every build; ~/.multi-agent-unattended-homes holds the unattended data directory (links into the operator's data directory, rebuilt before every launch) and the quarantine the launcher deletes finished Gradle homes from; ~/.config/multi-agent-pipeline holds a preferences file the pipeline and the guard read, and ~/.config/multi-agent-
|
|
73
|
+
"$commentHomeDirs": "Directory prefixes under $HOME whose whole subtree is host, shell or credential configuration, the guard's twin of the profile's sandbox.filesystem.denyWrite list. ~/.config/git holds the XDG git config, ~/.config/gh the GitHub CLI token, ~/.ssh and ~/.gnupg keys and their config; ~/Library/LaunchAgents holds per-user launchd jobs that run as the operator; ~/.gradle is the operator's Gradle home, and ~/.gradle/init.d runs on every build; ~/.multi-agent-unattended-homes holds the unattended data directory (links into the operator's data directory, rebuilt before every launch) and the quarantine the launcher deletes finished Gradle homes from; ~/.config/multi-agent-pipeline holds a preferences file the pipeline and the guard read, and ~/.config/multi-agent-mcp the toolkit's store reference file, with ~/.config/multi-agent-toolkit, its earlier path, which the server still reads while the current one is absent. A command naming a path under any of those is refused, and so is a move, removal or link of a directory above one of them (protectedAncestorsOf), or of the directory holding the file MULTI_AGENT_PREFS names; ~/.m2, ~/.cargo, ~/.bundle, ~/.pip, ~/.config/pip and ~/.config/fish point a toolchain or shell at a config or index.",
|
|
74
74
|
"protectedAncestorsOf": [
|
|
75
75
|
".multi-agent-unattended-homes",
|
|
76
76
|
".config/multi-agent-pipeline",
|
|
77
|
+
".config/multi-agent-mcp",
|
|
77
78
|
".config/multi-agent-toolkit"
|
|
78
79
|
],
|
|
79
80
|
"protectedHomeDirs": [
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
".gradle/init.d",
|
|
88
89
|
".multi-agent-unattended-homes",
|
|
89
90
|
".config/multi-agent-pipeline",
|
|
91
|
+
".config/multi-agent-mcp",
|
|
90
92
|
".config/multi-agent-toolkit",
|
|
91
93
|
".m2",
|
|
92
94
|
".cargo",
|
|
@@ -131,12 +133,13 @@
|
|
|
131
133
|
"patterns": ["^requirements.*\\.txt$", "^constraints.*\\.txt$"]
|
|
132
134
|
},
|
|
133
135
|
"publisherScripts": {
|
|
134
|
-
"$comment": "Pipeline scripts that write to a tracker, a PR or a wiki,
|
|
136
|
+
"$comment": "Pipeline scripts that write to a tracker, a PR or a wiki, change which devices may reach this machine, turn autopilot on or off, publish or install shared routines, or save, import or remove routines. Under the single-writer model the runner publishes; a run calling one of these directly is blocked. A value of null blocks every invocation; a list blocks only those subcommands.",
|
|
135
137
|
"jira-publish.sh": null,
|
|
136
138
|
"post-pr-review.sh": null,
|
|
137
139
|
"update-issue-progress.sh": null,
|
|
138
140
|
"analysis-jira-write.sh": null,
|
|
139
141
|
"jira-attach.sh": null,
|
|
142
|
+
"plan-attachment.mjs": ["upload"],
|
|
140
143
|
"jira-remote-links.sh": ["apply"],
|
|
141
144
|
"md2confluence-v3.py": ["create", "update"],
|
|
142
145
|
"multi-repo-pipeline.sh": ["push", "pr"],
|
|
@@ -144,7 +147,8 @@
|
|
|
144
147
|
"credential-store.sh": ["get", "set", "delete"],
|
|
145
148
|
"keychain.py": ["get", "set", "delete"],
|
|
146
149
|
"gate-ledger.mjs": ["append"],
|
|
147
|
-
"
|
|
148
|
-
"
|
|
150
|
+
"autopilot-control.mjs": ["on", "off"],
|
|
151
|
+
"routine-registry.mjs": ["add", "import", "remove"],
|
|
152
|
+
"routine-share.mjs": ["share", "import", "update", "delete"]
|
|
149
153
|
}
|
|
150
154
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/
|
|
3
|
+
"$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/unattended-policy.schema.json",
|
|
4
4
|
"title": "Unattended guard policy",
|
|
5
5
|
"description": "The data unattended_policy.py and agent-guard.py judge an unattended command against: the network allowlist, the protected repo and home paths, the manifests a run may not edit, and the publisher scripts it may not call.",
|
|
6
6
|
"type": "object",
|
|
@@ -39,10 +39,7 @@
|
|
|
39
39
|
["TaskUpdate", "the same"],
|
|
40
40
|
["TaskList", "the same"],
|
|
41
41
|
["TaskGet", "the same"],
|
|
42
|
-
[
|
|
43
|
-
"mcp__multi-agent-toolkit__*",
|
|
44
|
-
"simulator, build and design tools; research tools are denied below"
|
|
45
|
-
],
|
|
42
|
+
["mcp__multi-agent__*", "simulator, build and design tools; research tools are denied below"],
|
|
46
43
|
["Bash(git *)", "status, diff, add, commit, log; pushes are denied below and by agent-guard"],
|
|
47
44
|
[
|
|
48
45
|
"Bash(gh *)",
|
|
@@ -180,15 +177,19 @@
|
|
|
180
177
|
"a preferences file the pipeline and agent-guard read, the same as ~/.claude/multi-agent-preferences.json"
|
|
181
178
|
],
|
|
182
179
|
[
|
|
183
|
-
"Edit(~/.config/multi-agent-
|
|
180
|
+
"Edit(~/.config/multi-agent-mcp/**)",
|
|
184
181
|
"the toolkit's store reference file, which names the Keychain items its store tools use"
|
|
185
182
|
],
|
|
183
|
+
[
|
|
184
|
+
"Edit(~/.config/multi-agent-toolkit/**)",
|
|
185
|
+
"the same file at its earlier path, which the toolkit reads while the current one is absent"
|
|
186
|
+
],
|
|
186
187
|
["Edit(~/.lldbinit)", "commands lldb runs at start"],
|
|
187
188
|
["Edit(~/.curlrc)", "options curl applies to every request"],
|
|
188
189
|
["Edit(.git/hooks/**)", "hooks run on the next git command"],
|
|
189
190
|
["Edit(.git/config)", "the repository's git config"],
|
|
190
191
|
["Edit(**/.github/workflows/**)", "CI definitions run with the repo's secrets"],
|
|
191
|
-
["mcp__multi-
|
|
192
|
+
["mcp__multi-agent__research_*", "research tools send the query to an outside service"]
|
|
192
193
|
],
|
|
193
194
|
"env": [
|
|
194
195
|
[
|
|
@@ -266,6 +267,7 @@
|
|
|
266
267
|
"~/.gradle/gradle.properties",
|
|
267
268
|
"~/.multi-agent-unattended-homes",
|
|
268
269
|
"~/.config/multi-agent-pipeline",
|
|
270
|
+
"~/.config/multi-agent-mcp",
|
|
269
271
|
"~/.config/multi-agent-toolkit",
|
|
270
272
|
"~/.gradle",
|
|
271
273
|
"~/.lldbinit",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/
|
|
3
|
+
"$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/unattended-profile.schema.json",
|
|
4
4
|
"title": "Unattended settings profile",
|
|
5
5
|
"description": "The permission profile the installer writes for unattended runs: the default mode, the allow and deny rules, the toolkit environment and the optional sandbox, each rule with the reason it exists.",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/
|
|
3
|
+
"$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/worktrees.schema.json",
|
|
4
4
|
"title": "Run worktrees",
|
|
5
5
|
"description": "What `worktrees.mjs --json` prints: one entry per run that owns a worktree, with its size when --measure was passed. --redact removes every x-sensitivity local field.",
|
|
6
6
|
"type": "object",
|
|
@@ -21,7 +21,7 @@ import { launchRepoAllowed, launchRepos } from "./launch-request.mjs";
|
|
|
21
21
|
import { selectRuns } from "./runs-index.mjs";
|
|
22
22
|
|
|
23
23
|
/** The contract as a whole; pipeline/contract/manifest.json carries the same. */
|
|
24
|
-
export const CONTRACT_VERSION = "
|
|
24
|
+
export const CONTRACT_VERSION = "2.0.0";
|
|
25
25
|
/** Confirm tokens held at once; the oldest is dropped past this. */
|
|
26
26
|
export const MAX_CONFIRMS = 256;
|
|
27
27
|
/** How long a kill or gc confirm token stays valid. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file _contract-routes-catalog.mjs - contract-server reads of fixed
|
|
3
|
-
* documents and lists: commands, Phase 0 questions,
|
|
4
|
-
* launch spec and the permissions placeholder.
|
|
3
|
+
* documents and lists: commands, the skill catalog, Phase 0 questions,
|
|
4
|
+
* issues, worktrees, the launch spec and the permissions placeholder.
|
|
5
5
|
*
|
|
6
6
|
* @module pipeline/scripts/_contract-routes-catalog
|
|
7
7
|
*/
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
import { catalog } from "./commands.mjs";
|
|
10
10
|
import { collect } from "./issues.mjs";
|
|
11
11
|
import { launchSpec, questionsDocument } from "./launch-request.mjs";
|
|
12
|
+
import { skillCatalog } from "./skill-catalog.mjs";
|
|
13
|
+
import { StackError } from "./stack-toggle.mjs";
|
|
12
14
|
import { CONTRACT_VERSION as TOOLS_VERSION } from "./toolkit-tools.mjs";
|
|
13
15
|
import { buildList } from "./worktrees.mjs";
|
|
14
|
-
import { HttpError, flag, one } from "./_contract-core.mjs";
|
|
16
|
+
import { HttpError, flag, one, resolveRepo } from "./_contract-core.mjs";
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* GET /v1/permissions. Claude Code offers no mechanism that records a pending
|
|
@@ -28,6 +30,23 @@ const permissionsDocument = () => ({
|
|
|
28
30
|
requests: [],
|
|
29
31
|
});
|
|
30
32
|
|
|
33
|
+
/**
|
|
34
|
+
* GET /v1/skills. `repo` resolves the way GET /v1/stack resolves it (a
|
|
35
|
+
* configured or registered repository, by name or path, nothing else), and
|
|
36
|
+
* only decides which plugin skills are enabled; every other read sits under a
|
|
37
|
+
* fixed root (skill-catalog.mjs).
|
|
38
|
+
*/
|
|
39
|
+
function skillsGet({ q }) {
|
|
40
|
+
const ref = one(q, "repo");
|
|
41
|
+
const repoPath = ref === null ? null : resolveRepo(ref);
|
|
42
|
+
try {
|
|
43
|
+
return skillCatalog({ repoPath, repoLabel: ref });
|
|
44
|
+
} catch (err) {
|
|
45
|
+
if (err instanceof StackError) throw new HttpError(409, "unreadable-settings", err.message);
|
|
46
|
+
throw err;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
31
50
|
/** The catalog family's route entries; contract-server.mjs orders them in its table. */
|
|
32
51
|
export const catalogRoutes = {
|
|
33
52
|
commands: {
|
|
@@ -41,6 +60,15 @@ export const catalogRoutes = {
|
|
|
41
60
|
return out;
|
|
42
61
|
},
|
|
43
62
|
},
|
|
63
|
+
// Local-only: the catalog names the routines saved on this machine and its
|
|
64
|
+
// local-only commands, which no remote carrier may read.
|
|
65
|
+
skills: {
|
|
66
|
+
method: "GET",
|
|
67
|
+
path: "/v1/skills",
|
|
68
|
+
remote: "local-only",
|
|
69
|
+
query: ["repo"],
|
|
70
|
+
handle: skillsGet,
|
|
71
|
+
},
|
|
44
72
|
questions: {
|
|
45
73
|
method: "GET",
|
|
46
74
|
path: "/v1/questions",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file _contract-routes-ops.mjs - contract-server routes that change what
|
|
3
|
-
* this machine keeps or runs: gc, log pruning, settings, autopilot, routines
|
|
3
|
+
* this machine keeps or runs: gc, log pruning, disk cleaning, settings, autopilot, routines
|
|
4
4
|
* and office jobs. Every write here takes two requests.
|
|
5
5
|
*
|
|
6
6
|
* @module pipeline/scripts/_contract-routes-ops
|
|
@@ -28,6 +28,9 @@ import {
|
|
|
28
28
|
startJob,
|
|
29
29
|
} from "./job-launch.mjs";
|
|
30
30
|
import { launchRepoAllowed } from "./launch-request.mjs";
|
|
31
|
+
import { checkRunAccess } from "./usage-access.mjs";
|
|
32
|
+
import { isUnattended } from "../lib/unattended.mjs";
|
|
33
|
+
import { diskCleanRoute } from "./office-disk.mjs";
|
|
31
34
|
import { AGES as PRUNE_AGES, pruneApply, prunePreview } from "./office-prune.mjs";
|
|
32
35
|
import {
|
|
33
36
|
CHOICES,
|
|
@@ -280,6 +283,7 @@ async function autopilotOnRoute({ body }) {
|
|
|
280
283
|
if (err.code === "internal" || err.code === "launchd-refused") {
|
|
281
284
|
throw new HttpError(500, "internal", err.message);
|
|
282
285
|
}
|
|
286
|
+
if (err.code === "unattended") throw new HttpError(409, "unattended-refused", err.message);
|
|
283
287
|
throw new HttpError(409, err.code, err.message);
|
|
284
288
|
}
|
|
285
289
|
throw err;
|
|
@@ -305,8 +309,14 @@ const routinesGet = () => {
|
|
|
305
309
|
}
|
|
306
310
|
};
|
|
307
311
|
|
|
308
|
-
/**
|
|
312
|
+
/**
|
|
313
|
+
* DELETE /v1/routines/{name}: a preview and token, then ?confirm=<token>
|
|
314
|
+
* removes it. An unattended server refuses both steps: nobody can confirm.
|
|
315
|
+
*/
|
|
309
316
|
function routineDeleteRoute({ params, q }) {
|
|
317
|
+
if (isUnattended(process.env)) {
|
|
318
|
+
throw new HttpError(409, "unattended-refused", "an unattended server removes no routine");
|
|
319
|
+
}
|
|
310
320
|
const name = params.name;
|
|
311
321
|
if (!ROUTINE_NAME.test(name)) throw new HttpError(404, "not-found", "no such routine");
|
|
312
322
|
try {
|
|
@@ -435,6 +445,10 @@ async function jobStart(body) {
|
|
|
435
445
|
requireUnattendedProfile();
|
|
436
446
|
requireWorkspaceTrust(p.repoPath, true);
|
|
437
447
|
requireGuard(p.repoPath);
|
|
448
|
+
// A solo job never passes through Phase 0, so the office asks the access
|
|
449
|
+
// check itself; it fails open like everywhere else.
|
|
450
|
+
const access = await checkRunAccess();
|
|
451
|
+
if (access.exit === 3) throw new HttpError(403, "launch-disabled", access.line);
|
|
438
452
|
const record = await startJob({
|
|
439
453
|
jobId: p.jobId,
|
|
440
454
|
args: p.args,
|
|
@@ -469,6 +483,15 @@ export const opsRoutes = {
|
|
|
469
483
|
risk: "high",
|
|
470
484
|
handle: oneAtATime("prune-logs", pruneRoute),
|
|
471
485
|
},
|
|
486
|
+
diskClean: {
|
|
487
|
+
method: "POST",
|
|
488
|
+
path: "/v1/disk-clean",
|
|
489
|
+
query: [],
|
|
490
|
+
body: true,
|
|
491
|
+
remote: "local-only",
|
|
492
|
+
risk: "high",
|
|
493
|
+
handle: oneAtATime("disk-clean", (ctx) => diskCleanRoute(ctx)),
|
|
494
|
+
},
|
|
472
495
|
settings: {
|
|
473
496
|
method: "GET",
|
|
474
497
|
path: "/v1/settings",
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file _contract-routes-routines.mjs - contract-server routes for routines
|
|
3
|
+
* other site members shared: the list, one routine with its body, and the
|
|
4
|
+
* two-step import.
|
|
5
|
+
*
|
|
6
|
+
* Every route runs routine-share.mjs as a child process, the same client the
|
|
7
|
+
* terminal commands use, so the usage token is resolved and sent there and
|
|
8
|
+
* never passes through this server. Import installs only the payload the
|
|
9
|
+
* preview showed: the preview carries the description, descriptionTr and
|
|
10
|
+
* argument hint exactly as they become frontmatter (unscrubbed, rendered as
|
|
11
|
+
* text) with the body, its sha256 and the payload digest over all of them;
|
|
12
|
+
* the confirmation carries that sha256 and digest, and routine-share.mjs
|
|
13
|
+
* fetches the routine again and refuses it when either no longer matches.
|
|
14
|
+
* Nothing here runs a routine. An unattended server refuses the import,
|
|
15
|
+
* preview included, since nobody is there to read it.
|
|
16
|
+
*
|
|
17
|
+
* @module pipeline/scripts/_contract-routes-routines
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { homedir } from "node:os";
|
|
21
|
+
import { dirname, join } from "node:path";
|
|
22
|
+
import { fileURLToPath } from "node:url";
|
|
23
|
+
import { isUnattended } from "../lib/unattended.mjs";
|
|
24
|
+
import { scrub } from "./_redact.mjs";
|
|
25
|
+
import { spawnAsync } from "./_spawn-async.mjs";
|
|
26
|
+
import { CONTRACT_VERSION as ACTIVITY_VERSION } from "./activity-snapshot.mjs";
|
|
27
|
+
import {
|
|
28
|
+
isValidLocalName,
|
|
29
|
+
listRoutines,
|
|
30
|
+
localNameTaken,
|
|
31
|
+
payloadDigest,
|
|
32
|
+
} from "./routine-registry.mjs";
|
|
33
|
+
import {
|
|
34
|
+
HttpError,
|
|
35
|
+
isToken,
|
|
36
|
+
mintConfirm,
|
|
37
|
+
oneAtATime,
|
|
38
|
+
redeemConfirm,
|
|
39
|
+
requireBody,
|
|
40
|
+
} from "./_contract-core.mjs";
|
|
41
|
+
|
|
42
|
+
const SHARE = join(dirname(fileURLToPath(import.meta.url)), "routine-share.mjs");
|
|
43
|
+
const SHARED_ID = /^[A-Za-z0-9][A-Za-z0-9-]{0,63}$/;
|
|
44
|
+
const SHA256 = /^[0-9a-f]{64}$/;
|
|
45
|
+
const REASONS = new Set([
|
|
46
|
+
"no-usage-token",
|
|
47
|
+
"endpoint-not-allowed",
|
|
48
|
+
"unreachable",
|
|
49
|
+
"redirect-refused",
|
|
50
|
+
]);
|
|
51
|
+
|
|
52
|
+
/** One routine-share.mjs subcommand; its JSON document, ok or a refusal. */
|
|
53
|
+
async function share(args) {
|
|
54
|
+
const r = await spawnAsync(process.execPath, [SHARE, ...args, "--home", homedir()], {
|
|
55
|
+
timeoutMs: 30_000,
|
|
56
|
+
maxBytes: 4 * 1024 * 1024,
|
|
57
|
+
});
|
|
58
|
+
let doc;
|
|
59
|
+
try {
|
|
60
|
+
doc = JSON.parse(r.stdout);
|
|
61
|
+
} catch {
|
|
62
|
+
doc = null;
|
|
63
|
+
}
|
|
64
|
+
if (!doc || typeof doc !== "object" || typeof doc.ok !== "boolean")
|
|
65
|
+
throw new HttpError(502, "upstream-failed", "routine sharing did not finish");
|
|
66
|
+
return doc;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Why sharing could not answer, as one of a fixed set a page can switch on. */
|
|
70
|
+
function reasonOf(doc) {
|
|
71
|
+
if (REASONS.has(doc.error)) return doc.error;
|
|
72
|
+
if (doc.status === 401 || doc.status === 403) return "unauthorized";
|
|
73
|
+
return "upstream-error";
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const isNotFound = (doc) =>
|
|
77
|
+
doc.error === "not-found" || doc.error === "invalid-id" || doc.status === 404;
|
|
78
|
+
|
|
79
|
+
function refusal(doc) {
|
|
80
|
+
if (isNotFound(doc)) return new HttpError(404, "not-found", "no such shared routine");
|
|
81
|
+
if (doc.error === "sha-mismatch")
|
|
82
|
+
return new HttpError(502, "upstream-failed", "the shared body does not match its sha256");
|
|
83
|
+
return new HttpError(502, "upstream-failed", `routine sharing refused: ${reasonOf(doc)}`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const text = (v, max) => (typeof v === "string" ? scrub(v).slice(0, max) : "");
|
|
87
|
+
const textOrNull = (v, max) => (typeof v === "string" && v ? scrub(v).slice(0, max) : null);
|
|
88
|
+
const version = (v) => (Number.isInteger(v) && v >= 1 ? v : 1);
|
|
89
|
+
|
|
90
|
+
function summary(r, importedAs) {
|
|
91
|
+
return {
|
|
92
|
+
id: r.id,
|
|
93
|
+
name: String(r.name ?? ""),
|
|
94
|
+
owner: String(r.owner ?? ""),
|
|
95
|
+
version: version(r.version),
|
|
96
|
+
description: text(r.description, 300),
|
|
97
|
+
descriptionTr: textOrNull(r.descriptionTr, 300),
|
|
98
|
+
sha256: SHA256.test(r.sha256) ? r.sha256 : null,
|
|
99
|
+
updatedAt: typeof r.updatedAt === "string" && r.updatedAt ? r.updatedAt : null,
|
|
100
|
+
mine: r.mine === true,
|
|
101
|
+
importedAs,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** GET /v1/routines/shared: what the site shows this machine, without bodies. */
|
|
106
|
+
async function sharedList() {
|
|
107
|
+
const doc = await share(["browse"]);
|
|
108
|
+
if (!doc.ok) {
|
|
109
|
+
return {
|
|
110
|
+
contractVersion: ACTIVITY_VERSION,
|
|
111
|
+
available: false,
|
|
112
|
+
reason: reasonOf(doc),
|
|
113
|
+
routines: [],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const local = new Map(
|
|
117
|
+
listRoutines(homedir())
|
|
118
|
+
.filter((r) => typeof r?.sharedId === "string")
|
|
119
|
+
.map((r) => [r.sharedId, String(r.name)]),
|
|
120
|
+
);
|
|
121
|
+
const routines = (Array.isArray(doc.routines) ? doc.routines : [])
|
|
122
|
+
.filter((r) => r && typeof r === "object" && SHARED_ID.test(r.id ?? ""))
|
|
123
|
+
.map((r) => summary(r, local.get(r.id) ?? null));
|
|
124
|
+
return { contractVersion: ACTIVITY_VERSION, available: true, routines };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function requireId(id) {
|
|
128
|
+
if (!SHARED_ID.test(id)) throw new HttpError(404, "not-found", "no such shared routine");
|
|
129
|
+
return id;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const rawOrNull = (v) => (typeof v === "string" && v ? v : null);
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The routine with its body, after routine-share.mjs checked the body's
|
|
136
|
+
* sha256, and the import checks it fails ({code, field}, from payloadIssues).
|
|
137
|
+
* The description, descriptionTr and argument hint are the values import
|
|
138
|
+
* would write, unscrubbed, so what the page shows is what the digest covers.
|
|
139
|
+
*/
|
|
140
|
+
async function fetchRoutine(id) {
|
|
141
|
+
const doc = await share(["fetch", "--id", requireId(id)]);
|
|
142
|
+
if (!doc.ok) throw refusal(doc);
|
|
143
|
+
const r = doc.routine ?? {};
|
|
144
|
+
if (typeof r.body !== "string" || !SHA256.test(r.sha256 ?? ""))
|
|
145
|
+
throw new HttpError(502, "upstream-failed", "the shared routine came back incomplete");
|
|
146
|
+
const fields = {
|
|
147
|
+
name: String(r.name ?? ""),
|
|
148
|
+
description: typeof r.description === "string" ? r.description : "",
|
|
149
|
+
descriptionTr: rawOrNull(r.descriptionTr),
|
|
150
|
+
argumentHint: rawOrNull(r.argumentHint),
|
|
151
|
+
body: r.body,
|
|
152
|
+
};
|
|
153
|
+
const digest = payloadDigest(fields);
|
|
154
|
+
if (doc.digest !== digest)
|
|
155
|
+
throw new HttpError(502, "upstream-failed", "the shared routine came back inconsistent");
|
|
156
|
+
const routine = {
|
|
157
|
+
...summary({ ...r, id }, null),
|
|
158
|
+
...fields,
|
|
159
|
+
sha256: r.sha256,
|
|
160
|
+
digest,
|
|
161
|
+
};
|
|
162
|
+
return { routine, issues: Array.isArray(doc.issues) ? doc.issues : [] };
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const withoutImport = ({ importedAs: _i, mine: _m, ...rest }) => rest;
|
|
166
|
+
|
|
167
|
+
/** GET /v1/routines/shared/{id}: the body exactly as import would install it. */
|
|
168
|
+
async function sharedOne({ params }) {
|
|
169
|
+
const { routine } = await fetchRoutine(params.id);
|
|
170
|
+
return {
|
|
171
|
+
contractVersion: ACTIVITY_VERSION,
|
|
172
|
+
routine: withoutImport(routine),
|
|
173
|
+
localNameTaken: isValidLocalName(routine.name) && localNameTaken(homedir(), routine.name),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const refusedUnattended = () =>
|
|
178
|
+
new HttpError(
|
|
179
|
+
409,
|
|
180
|
+
"unattended-refused",
|
|
181
|
+
"an unattended server imports nothing; nobody can confirm",
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
function nameTaken(name) {
|
|
185
|
+
return new HttpError(
|
|
186
|
+
409,
|
|
187
|
+
"name-taken",
|
|
188
|
+
`a routine or command named ${name} already exists; preview again with another name in as`,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
async function importPreview(id, body) {
|
|
193
|
+
if (body.sha256 !== undefined || body.digest !== undefined)
|
|
194
|
+
throw new HttpError(
|
|
195
|
+
400,
|
|
196
|
+
"invalid-body",
|
|
197
|
+
"sha256 and digest belong to the confirmation, not the preview",
|
|
198
|
+
);
|
|
199
|
+
const { routine, issues } = await fetchRoutine(id);
|
|
200
|
+
if (issues.length) {
|
|
201
|
+
const fields = [...new Set(issues.map((i) => text(String(i?.field ?? "payload"), 40)))];
|
|
202
|
+
throw new HttpError(
|
|
203
|
+
502,
|
|
204
|
+
"upstream-failed",
|
|
205
|
+
`the shared routine fails the import checks: ${fields.join(", ")}`,
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
const targetName = body.as ?? routine.name;
|
|
209
|
+
if (!isValidLocalName(targetName))
|
|
210
|
+
throw new HttpError(400, "invalid-body", "that is not a valid local name; send another in as");
|
|
211
|
+
if (localNameTaken(homedir(), targetName)) throw nameTaken(targetName);
|
|
212
|
+
return {
|
|
213
|
+
contractVersion: ACTIVITY_VERSION,
|
|
214
|
+
preview: { ...withoutImport(routine), targetName },
|
|
215
|
+
...mintConfirm("routine-import", id, {
|
|
216
|
+
sha256: routine.sha256,
|
|
217
|
+
digest: routine.digest,
|
|
218
|
+
as: targetName,
|
|
219
|
+
}),
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
async function importConfirm(id, body) {
|
|
224
|
+
if (body.as !== undefined)
|
|
225
|
+
throw new HttpError(400, "invalid-body", "as belongs to the preview, not the confirmation");
|
|
226
|
+
if (body.sha256 === undefined || body.digest === undefined)
|
|
227
|
+
throw new HttpError(
|
|
228
|
+
400,
|
|
229
|
+
"invalid-body",
|
|
230
|
+
"the confirmation carries the sha256 and the digest it previewed",
|
|
231
|
+
);
|
|
232
|
+
const previewed = redeemConfirm(body.confirmToken, "routine-import", id);
|
|
233
|
+
if (body.sha256 !== previewed.sha256 || body.digest !== previewed.digest)
|
|
234
|
+
throw new HttpError(
|
|
235
|
+
409,
|
|
236
|
+
"confirm-mismatch",
|
|
237
|
+
"that is not the sha256 and digest the preview showed",
|
|
238
|
+
);
|
|
239
|
+
const doc = await share([
|
|
240
|
+
"import",
|
|
241
|
+
"--id",
|
|
242
|
+
id,
|
|
243
|
+
"--digest",
|
|
244
|
+
previewed.digest,
|
|
245
|
+
"--sha",
|
|
246
|
+
previewed.sha256,
|
|
247
|
+
"--as",
|
|
248
|
+
previewed.as,
|
|
249
|
+
]);
|
|
250
|
+
if (!doc.ok) {
|
|
251
|
+
if (doc.error === "collision") throw nameTaken(previewed.as);
|
|
252
|
+
if (doc.error === "changed-since-shown")
|
|
253
|
+
throw new HttpError(
|
|
254
|
+
409,
|
|
255
|
+
"state-moved",
|
|
256
|
+
"the shared routine changed since the preview (body, description or argument hint); nothing was installed",
|
|
257
|
+
);
|
|
258
|
+
if (doc.error === "invalid")
|
|
259
|
+
throw new HttpError(
|
|
260
|
+
409,
|
|
261
|
+
"state-moved",
|
|
262
|
+
`the import checks no longer pass; nothing was installed: ${text(doc.detail, 200)}`,
|
|
263
|
+
);
|
|
264
|
+
throw refusal(doc);
|
|
265
|
+
}
|
|
266
|
+
const e = doc.imported ?? {};
|
|
267
|
+
return {
|
|
268
|
+
contractVersion: ACTIVITY_VERSION,
|
|
269
|
+
imported: {
|
|
270
|
+
name: String(e.name ?? previewed.as),
|
|
271
|
+
description: text(e.description, 300),
|
|
272
|
+
source: textOrNull(e.source, 200),
|
|
273
|
+
sha256: previewed.sha256,
|
|
274
|
+
digest: previewed.digest,
|
|
275
|
+
sharedId: id,
|
|
276
|
+
},
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* POST /v1/routines/shared/{id}/import. {} or {as} previews: the full body,
|
|
282
|
+
* its sha256, the fields that become frontmatter, the payload digest and the
|
|
283
|
+
* local name it would get, and a token bound to the routine, that sha256,
|
|
284
|
+
* that digest and that name. {confirmToken, sha256, digest} installs it.
|
|
285
|
+
*/
|
|
286
|
+
async function sharedImport({ params, body }) {
|
|
287
|
+
requireBody(
|
|
288
|
+
body,
|
|
289
|
+
{
|
|
290
|
+
confirmToken: isToken,
|
|
291
|
+
as: isValidLocalName,
|
|
292
|
+
sha256: (v) => typeof v === "string" && SHA256.test(v),
|
|
293
|
+
digest: (v) => typeof v === "string" && SHA256.test(v),
|
|
294
|
+
},
|
|
295
|
+
"shared-routine-import-request.schema.json",
|
|
296
|
+
);
|
|
297
|
+
if (isUnattended(process.env)) throw refusedUnattended();
|
|
298
|
+
const id = requireId(params.id);
|
|
299
|
+
return body.confirmToken === undefined ? importPreview(id, body) : importConfirm(id, body);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/** The shared-routine route entries; contract-server.mjs orders them in its table. */
|
|
303
|
+
export const routineRoutes = {
|
|
304
|
+
sharedList: {
|
|
305
|
+
method: "GET",
|
|
306
|
+
path: "/v1/routines/shared",
|
|
307
|
+
query: [],
|
|
308
|
+
remote: "local-only",
|
|
309
|
+
handle: sharedList,
|
|
310
|
+
},
|
|
311
|
+
sharedOne: {
|
|
312
|
+
method: "GET",
|
|
313
|
+
path: "/v1/routines/shared/{id}",
|
|
314
|
+
query: [],
|
|
315
|
+
remote: "local-only",
|
|
316
|
+
handle: sharedOne,
|
|
317
|
+
},
|
|
318
|
+
sharedImport: {
|
|
319
|
+
method: "POST",
|
|
320
|
+
path: "/v1/routines/shared/{id}/import",
|
|
321
|
+
query: [],
|
|
322
|
+
body: true,
|
|
323
|
+
remote: "local-only",
|
|
324
|
+
risk: "high",
|
|
325
|
+
handle: oneAtATime("routine-import", sharedImport),
|
|
326
|
+
},
|
|
327
|
+
};
|