@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
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @file skill-catalog.mjs - one index of everything a person can invoke:
|
|
4
|
+
* the /multi-agent commands, the marketplace plugin skills and the routines
|
|
5
|
+
* saved with /multi-agent:save. The office's skill catalog window renders it
|
|
6
|
+
* (GET /v1/skills); shape: pipeline/schemas/skill-catalog.schema.json.
|
|
7
|
+
*
|
|
8
|
+
* Every file read sits under a fixed root:
|
|
9
|
+
*
|
|
10
|
+
* commands the command tree commands.mjs reads (the source tree
|
|
11
|
+
* beside this script, else the installed copy), plus the
|
|
12
|
+
* `local-only: true` directories of
|
|
13
|
+
* ~/.claude/commands/multi-agent that are not routines;
|
|
14
|
+
* plugin skills ~/.claude/plugins/marketplaces/multi-agent-plugins, the
|
|
15
|
+
* same clone and skill walk stack-toggle.mjs uses, so a
|
|
16
|
+
* symlink out of the clone is never followed;
|
|
17
|
+
* routines prefs `global.routines` through routine-registry.mjs, with
|
|
18
|
+
* the Turkish description from the routine's own SKILL.md.
|
|
19
|
+
*
|
|
20
|
+
* A repository only decides `enabled` for plugin skills: its
|
|
21
|
+
* `.claude/settings.json` enabledPlugins, read by stack-toggle.mjs, plus the
|
|
22
|
+
* always-on plugins. Without one, a plugin skill is `enabled: true` when its
|
|
23
|
+
* plugin is always on and `null` (unknown) otherwise. Commands and routines
|
|
24
|
+
* are always `enabled: true`.
|
|
25
|
+
*
|
|
26
|
+
* A missing source is a note, never an error: no clone means no plugin skills
|
|
27
|
+
* and `{section: "plugin-skill", code: "no-clone"}`; an unreadable routine
|
|
28
|
+
* registry means `{section: "routine", code: "unreadable"}`; no command tree
|
|
29
|
+
* means `{section: "command", code: "no-tree"}`.
|
|
30
|
+
*
|
|
31
|
+
* Both description fields come from SKILL.md frontmatter (`description`,
|
|
32
|
+
* `description-tr`), read with the frontmatter readers the command contract
|
|
33
|
+
* and the skill router already use. Routine text is the user's own and is
|
|
34
|
+
* scrubbed like GET /v1/routines scrubs it.
|
|
35
|
+
*
|
|
36
|
+
* Usage:
|
|
37
|
+
* node skill-catalog.mjs --json [--repo <absolute path>]
|
|
38
|
+
*
|
|
39
|
+
* Exit: 0 printed, 2 usage error, 1 unreadable repository settings.
|
|
40
|
+
*
|
|
41
|
+
* @module pipeline/scripts/skill-catalog
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
45
|
+
import { homedir } from "node:os";
|
|
46
|
+
import { join } from "node:path";
|
|
47
|
+
import { commandsDir } from "./commands.mjs";
|
|
48
|
+
import { frontmatterFields, yamlScalar } from "./_command-contract.mjs";
|
|
49
|
+
import { frontmatter } from "./skill-candidates.mjs";
|
|
50
|
+
import { scrub } from "./_redact.mjs";
|
|
51
|
+
import { RoutineError, listRoutines } from "./routine-registry.mjs";
|
|
52
|
+
import {
|
|
53
|
+
StackError,
|
|
54
|
+
marketplaceClone,
|
|
55
|
+
marketplacePlugins,
|
|
56
|
+
pluginSkillFiles,
|
|
57
|
+
repoEnabledPlugins,
|
|
58
|
+
} from "./stack-toggle.mjs";
|
|
59
|
+
import { runMain } from "../lib/fatal.mjs";
|
|
60
|
+
import { invokedDirectly } from "../lib/invoked-directly.mjs";
|
|
61
|
+
import { ArgsError, parseArgs } from "../lib/args.mjs";
|
|
62
|
+
import { exitOnHelp } from "../lib/cli-help.mjs";
|
|
63
|
+
|
|
64
|
+
exitOnHelp(import.meta.url);
|
|
65
|
+
|
|
66
|
+
export const CONTRACT_VERSION = "1.0.0";
|
|
67
|
+
export const KINDS = ["command", "plugin-skill", "routine"];
|
|
68
|
+
|
|
69
|
+
const NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
70
|
+
const MAX_TEXT = 2000;
|
|
71
|
+
const ROOT_COMMAND = "multi-agent";
|
|
72
|
+
|
|
73
|
+
const home = (env) => env.HOME || homedir();
|
|
74
|
+
const cut = (s) => (s.length > MAX_TEXT ? s.slice(0, MAX_TEXT) : s);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* `description`, `description-tr` and `local-only` of one SKILL.md. A quoted
|
|
78
|
+
* one-line value is unquoted by yamlScalar (escapes included); a `|` or `>`
|
|
79
|
+
* block scalar is folded by the skill router's reader.
|
|
80
|
+
*/
|
|
81
|
+
function skillFront(file) {
|
|
82
|
+
let raw;
|
|
83
|
+
try {
|
|
84
|
+
raw = readFileSync(file, "utf8");
|
|
85
|
+
} catch {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const fields = frontmatterFields(raw.replace(/\r\n/g, "\n"));
|
|
89
|
+
if (!fields) return null;
|
|
90
|
+
let folded = null;
|
|
91
|
+
const text = (key) => {
|
|
92
|
+
const v = fields[key];
|
|
93
|
+
if (v === undefined) return null;
|
|
94
|
+
if (/^[|>][+-]?$/.test(v.trim())) {
|
|
95
|
+
folded ??= frontmatter(raw);
|
|
96
|
+
return folded[key] ? cut(folded[key]) : null;
|
|
97
|
+
}
|
|
98
|
+
const out = yamlScalar(v);
|
|
99
|
+
return out ? cut(out) : null;
|
|
100
|
+
};
|
|
101
|
+
return {
|
|
102
|
+
description: text("description"),
|
|
103
|
+
descriptionTr: text("description-tr"),
|
|
104
|
+
localOnly: yamlScalar(fields["local-only"]) === "true",
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function item(kind, name, invoke, source, front, extra = {}) {
|
|
109
|
+
return {
|
|
110
|
+
id: kind === "plugin-skill" ? `${kind}:${source}:${name}` : `${kind}:${name}`,
|
|
111
|
+
name,
|
|
112
|
+
invoke,
|
|
113
|
+
kind,
|
|
114
|
+
source,
|
|
115
|
+
description: front?.description ?? "",
|
|
116
|
+
descriptionTr: front?.descriptionTr ?? null,
|
|
117
|
+
enabled: true,
|
|
118
|
+
alwaysOn: false,
|
|
119
|
+
localOnly: false,
|
|
120
|
+
...extra,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const dirsIn = (root) => {
|
|
125
|
+
try {
|
|
126
|
+
return readdirSync(root, { withFileTypes: true })
|
|
127
|
+
.filter((e) => e.isDirectory() && NAME.test(e.name))
|
|
128
|
+
.map((e) => e.name)
|
|
129
|
+
.sort();
|
|
130
|
+
} catch {
|
|
131
|
+
return [];
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
function commandItems(commandsRoot, homeCommands, routineNames, notes) {
|
|
136
|
+
const out = [];
|
|
137
|
+
const seen = new Set();
|
|
138
|
+
if (commandsRoot && existsSync(commandsRoot)) {
|
|
139
|
+
const root = skillFront(join(commandsRoot, "SKILL.md"));
|
|
140
|
+
if (root) {
|
|
141
|
+
out.push(item("command", ROOT_COMMAND, "/multi-agent", "pipeline", root));
|
|
142
|
+
seen.add(ROOT_COMMAND);
|
|
143
|
+
}
|
|
144
|
+
for (const id of dirsIn(commandsRoot)) {
|
|
145
|
+
const front = skillFront(join(commandsRoot, id, "SKILL.md"));
|
|
146
|
+
if (!front || routineNames.has(id)) continue;
|
|
147
|
+
out.push(
|
|
148
|
+
item("command", id, `/multi-agent:${id}`, front.localOnly ? "local" : "pipeline", front, {
|
|
149
|
+
localOnly: front.localOnly,
|
|
150
|
+
}),
|
|
151
|
+
);
|
|
152
|
+
seen.add(id);
|
|
153
|
+
}
|
|
154
|
+
} else notes.push({ section: "command", code: "no-tree" });
|
|
155
|
+
for (const id of dirsIn(homeCommands)) {
|
|
156
|
+
if (seen.has(id) || routineNames.has(id)) continue;
|
|
157
|
+
const front = skillFront(join(homeCommands, id, "SKILL.md"));
|
|
158
|
+
if (!front?.localOnly) continue;
|
|
159
|
+
out.push(item("command", id, `/multi-agent:${id}`, "local", front, { localOnly: true }));
|
|
160
|
+
}
|
|
161
|
+
return out;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function pluginItems(enabled, repoGiven, env, notes) {
|
|
165
|
+
if (!existsSync(join(marketplaceClone(env), "plugins"))) {
|
|
166
|
+
notes.push({ section: "plugin-skill", code: "no-clone" });
|
|
167
|
+
return [];
|
|
168
|
+
}
|
|
169
|
+
const { verified, plugins } = marketplacePlugins(enabled ?? {}, env);
|
|
170
|
+
if (!verified) notes.push({ section: "plugin-skill", code: "no-manifest" });
|
|
171
|
+
const out = [];
|
|
172
|
+
for (const p of plugins) {
|
|
173
|
+
for (const s of pluginSkillFiles(p.name, env)) {
|
|
174
|
+
const on = p.alwaysOn || (repoGiven ? p.enabled : null);
|
|
175
|
+
out.push(
|
|
176
|
+
item("plugin-skill", s.name, `${p.name}:${s.name}`, p.name, skillFront(s.file), {
|
|
177
|
+
enabled: on === null ? null : on === true,
|
|
178
|
+
alwaysOn: p.alwaysOn,
|
|
179
|
+
}),
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return out;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function routineItems(h, homeCommands, notes) {
|
|
187
|
+
let entries;
|
|
188
|
+
try {
|
|
189
|
+
entries = listRoutines(h);
|
|
190
|
+
} catch (err) {
|
|
191
|
+
if (!(err instanceof RoutineError)) throw err;
|
|
192
|
+
notes.push({ section: "routine", code: "unreadable" });
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
const out = [];
|
|
196
|
+
for (const r of entries) {
|
|
197
|
+
const name = typeof r?.name === "string" ? r.name : "";
|
|
198
|
+
if (!NAME.test(name) || out.some((x) => x.name === name)) continue;
|
|
199
|
+
const own = skillFront(join(homeCommands, name, "SKILL.md"));
|
|
200
|
+
const description = typeof r.description === "string" ? r.description : own?.description;
|
|
201
|
+
out.push(
|
|
202
|
+
item(
|
|
203
|
+
"routine",
|
|
204
|
+
name,
|
|
205
|
+
`/multi-agent:${name}`,
|
|
206
|
+
"local",
|
|
207
|
+
{
|
|
208
|
+
description: cut(scrub(description ?? "")),
|
|
209
|
+
descriptionTr: own?.descriptionTr ? scrub(own.descriptionTr) : null,
|
|
210
|
+
},
|
|
211
|
+
{ localOnly: true },
|
|
212
|
+
),
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
return out;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The catalog document.
|
|
220
|
+
*
|
|
221
|
+
* @param {object} [opts]
|
|
222
|
+
* @param {string|null} [opts.repoPath] absolute path of an accepted repository
|
|
223
|
+
* @param {string|null} [opts.repoLabel] what to echo as `repo` (the caller's reference)
|
|
224
|
+
* @param {string|null} [opts.commandsRoot] the command tree; undefined finds it, null means none
|
|
225
|
+
* @param {Record<string,string|undefined>} [opts.env]
|
|
226
|
+
*/
|
|
227
|
+
export function skillCatalog({
|
|
228
|
+
repoPath = null,
|
|
229
|
+
repoLabel = null,
|
|
230
|
+
commandsRoot,
|
|
231
|
+
env = process.env,
|
|
232
|
+
} = {}) {
|
|
233
|
+
const h = home(env);
|
|
234
|
+
const homeCommands = join(h, ".claude", "commands", "multi-agent");
|
|
235
|
+
const root = commandsRoot === undefined ? commandsDir() : commandsRoot;
|
|
236
|
+
const enabled = repoPath ? repoEnabledPlugins(repoPath) : null;
|
|
237
|
+
const notes = [];
|
|
238
|
+
const routines = routineItems(h, homeCommands, notes);
|
|
239
|
+
const names = new Set(routines.map((r) => r.name));
|
|
240
|
+
const items = [
|
|
241
|
+
...commandItems(root, homeCommands, names, notes),
|
|
242
|
+
...pluginItems(enabled, repoPath !== null, env, notes),
|
|
243
|
+
...routines,
|
|
244
|
+
];
|
|
245
|
+
return {
|
|
246
|
+
contractVersion: CONTRACT_VERSION,
|
|
247
|
+
repo: repoPath ? (repoLabel ?? repoPath) : null,
|
|
248
|
+
items,
|
|
249
|
+
notes,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const USAGE = "usage: skill-catalog.mjs --json [--repo <absolute path>]\n";
|
|
254
|
+
|
|
255
|
+
function main(argv) {
|
|
256
|
+
let flags;
|
|
257
|
+
try {
|
|
258
|
+
({ flags } = parseArgs(argv, {
|
|
259
|
+
booleans: ["json"],
|
|
260
|
+
values: ["repo"],
|
|
261
|
+
unknown: "error",
|
|
262
|
+
positionals: false,
|
|
263
|
+
equals: false,
|
|
264
|
+
terminator: false,
|
|
265
|
+
valuePrefix: null,
|
|
266
|
+
}));
|
|
267
|
+
} catch (err) {
|
|
268
|
+
if (!(err instanceof ArgsError)) throw err;
|
|
269
|
+
process.stderr.write(`skill-catalog: unknown argument ${err.token}\n${USAGE}`);
|
|
270
|
+
return 2;
|
|
271
|
+
}
|
|
272
|
+
if (flags.repo === true) {
|
|
273
|
+
process.stderr.write(`skill-catalog: --repo needs a value\n${USAGE}`);
|
|
274
|
+
return 2;
|
|
275
|
+
}
|
|
276
|
+
const json = flags.json === true;
|
|
277
|
+
const repo = Object.hasOwn(flags, "repo") ? flags.repo : null;
|
|
278
|
+
try {
|
|
279
|
+
const doc = skillCatalog({ repoPath: repo });
|
|
280
|
+
if (json) process.stdout.write(JSON.stringify(doc, null, 2) + "\n");
|
|
281
|
+
else {
|
|
282
|
+
for (const i of doc.items) {
|
|
283
|
+
const on = i.enabled === null ? "?" : i.enabled ? "on" : "off";
|
|
284
|
+
process.stdout.write(`${i.kind.padEnd(13)} ${on.padEnd(3)} ${i.invoke}\n`);
|
|
285
|
+
}
|
|
286
|
+
for (const n of doc.notes) process.stdout.write(`note: ${n.section} ${n.code}\n`);
|
|
287
|
+
}
|
|
288
|
+
return 0;
|
|
289
|
+
} catch (err) {
|
|
290
|
+
if (err instanceof StackError) {
|
|
291
|
+
process.stderr.write(`skill-catalog: ${err.message}\n`);
|
|
292
|
+
return 1;
|
|
293
|
+
}
|
|
294
|
+
throw err;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (invokedDirectly(import.meta.url)) {
|
|
299
|
+
runMain("skill-catalog", () => {
|
|
300
|
+
process.exitCode = main(process.argv.slice(2));
|
|
301
|
+
});
|
|
302
|
+
}
|
|
@@ -36,12 +36,13 @@ import {
|
|
|
36
36
|
mkdirSync,
|
|
37
37
|
readFileSync,
|
|
38
38
|
readdirSync,
|
|
39
|
+
realpathSync,
|
|
39
40
|
renameSync,
|
|
40
41
|
statSync,
|
|
41
42
|
writeFileSync,
|
|
42
43
|
} from "node:fs";
|
|
43
44
|
import { homedir } from "node:os";
|
|
44
|
-
import { isAbsolute, join } from "node:path";
|
|
45
|
+
import { isAbsolute, join, relative, sep } from "node:path";
|
|
45
46
|
import {
|
|
46
47
|
ALWAYS_ON,
|
|
47
48
|
KNOWN_STACKS,
|
|
@@ -60,6 +61,7 @@ export const CONTRACT_VERSION = "1.0.0";
|
|
|
60
61
|
const SUFFIX = `@${PLUGIN_MARKETPLACE}`;
|
|
61
62
|
const XCODE_KEY = "xcode-integration@xcode-apple";
|
|
62
63
|
const RETIRED = /^ai-[a-z]+-engineering-toolkit@multi-agent-plugins$/;
|
|
64
|
+
const PLUGIN_NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
63
65
|
|
|
64
66
|
export class StackError extends Error {
|
|
65
67
|
constructor(code, message) {
|
|
@@ -91,50 +93,119 @@ function readSettings(repo) {
|
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
|
|
96
|
+
/** The marketplace clone on this machine, the root every plugin skill is read under. */
|
|
97
|
+
export function marketplaceClone(env = process.env) {
|
|
98
|
+
return join(home(env), ".claude", "plugins", "marketplaces", PLUGIN_MARKETPLACE);
|
|
99
|
+
}
|
|
100
|
+
|
|
94
101
|
function marketplaceNames(env) {
|
|
95
|
-
const path = join(
|
|
96
|
-
home(env),
|
|
97
|
-
".claude",
|
|
98
|
-
"plugins",
|
|
99
|
-
"marketplaces",
|
|
100
|
-
PLUGIN_MARKETPLACE,
|
|
101
|
-
".claude-plugin",
|
|
102
|
-
"marketplace.json",
|
|
103
|
-
);
|
|
102
|
+
const path = join(marketplaceClone(env), ".claude-plugin", "marketplace.json");
|
|
104
103
|
try {
|
|
105
104
|
return (JSON.parse(readFileSync(path, "utf8")).plugins || [])
|
|
106
|
-
.map((p) => p
|
|
107
|
-
.filter(
|
|
105
|
+
.map((p) => p?.name)
|
|
106
|
+
.filter((n) => typeof n === "string" && PLUGIN_NAME.test(n));
|
|
108
107
|
} catch {
|
|
109
108
|
return null;
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
111
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
112
|
+
const SKILL_DEPTH = 3;
|
|
113
|
+
const inside = (root, p) => {
|
|
114
|
+
const rel = relative(root, p);
|
|
115
|
+
return rel === "" || (rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel));
|
|
116
|
+
};
|
|
117
|
+
const realOrNull = (p) => {
|
|
118
|
+
try {
|
|
119
|
+
return realpathSync(p);
|
|
120
|
+
} catch {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Every skill under one `skills/` root: `skills/<name>/SKILL.md` and the
|
|
127
|
+
* grouped layout `skills/<group>/<name>/SKILL.md`. A directory or SKILL.md
|
|
128
|
+
* whose real path leaves the root is skipped, so a symlink cannot pull a file
|
|
129
|
+
* from elsewhere into the list.
|
|
130
|
+
*
|
|
131
|
+
* @returns {{name: string, file: string}[]|null} null when the root is unreadable
|
|
132
|
+
*/
|
|
133
|
+
function skillsUnder(root) {
|
|
134
|
+
const realRoot = realOrNull(root);
|
|
135
|
+
if (!realRoot) return null;
|
|
136
|
+
const out = [];
|
|
137
|
+
const walk = (dir, left) => {
|
|
138
|
+
let entries;
|
|
127
139
|
try {
|
|
128
|
-
|
|
129
|
-
.filter((d) => existsSync(join(root, d, "SKILL.md")))
|
|
130
|
-
.sort();
|
|
140
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
131
141
|
} catch {
|
|
132
|
-
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
for (const e of entries) {
|
|
145
|
+
const p = join(dir, e.name);
|
|
146
|
+
const real = realOrNull(p);
|
|
147
|
+
if (!real || !inside(realRoot, real) || !statSync(real).isDirectory()) continue;
|
|
148
|
+
const file = join(p, "SKILL.md");
|
|
149
|
+
const realFile = realOrNull(file);
|
|
150
|
+
if (realFile && inside(realRoot, realFile) && statSync(realFile).isFile()) {
|
|
151
|
+
out.push({ name: e.name, file: realFile });
|
|
152
|
+
} else if (left > 1) walk(p, left - 1);
|
|
133
153
|
}
|
|
154
|
+
};
|
|
155
|
+
walk(root, SKILL_DEPTH);
|
|
156
|
+
const seen = new Set();
|
|
157
|
+
return out
|
|
158
|
+
.sort((a, b) => a.name.localeCompare(b.name) || a.file.localeCompare(b.file))
|
|
159
|
+
.filter((s) => !seen.has(s.name) && seen.add(s.name));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The skills a plugin ships, from its best local root: the marketplace clone
|
|
164
|
+
* first, then the plugin cache, newest version first.
|
|
165
|
+
*
|
|
166
|
+
* @returns {{name: string, file: string}[]}
|
|
167
|
+
*/
|
|
168
|
+
export function pluginSkillFiles(plugin, env = process.env) {
|
|
169
|
+
const marketplaceCopy = join(marketplaceClone(env), "plugins", plugin, "skills");
|
|
170
|
+
for (const root of [marketplaceCopy, ...pluginSkillRootCandidates(home(env), [plugin])]) {
|
|
171
|
+
const found = skillsUnder(root);
|
|
172
|
+
if (found) return found;
|
|
134
173
|
}
|
|
135
174
|
return [];
|
|
136
175
|
}
|
|
137
176
|
|
|
177
|
+
const skillsOf = (plugin, env) => pluginSkillFiles(plugin, env).map((s) => s.name);
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Every marketplace plugin with its enablement in `enabled` (an
|
|
181
|
+
* enabledPlugins block) and its skill names. `verified` is false when the
|
|
182
|
+
* marketplace manifest could not be read and the list is the convention.
|
|
183
|
+
*/
|
|
184
|
+
export function marketplacePlugins(enabled = {}, env = process.env) {
|
|
185
|
+
const listed = marketplaceNames(env);
|
|
186
|
+
const names = listed ?? [...ALWAYS_ON, ...KNOWN_STACKS.map(stackPlugin)];
|
|
187
|
+
return {
|
|
188
|
+
verified: listed !== null,
|
|
189
|
+
plugins: names.map((name) => ({
|
|
190
|
+
name,
|
|
191
|
+
enabled: enabled[`${name}${SUFFIX}`] === true,
|
|
192
|
+
alwaysOn: ALWAYS_ON.includes(name),
|
|
193
|
+
stack: KNOWN_STACKS.find((s) => stackPlugin(s) === name) ?? null,
|
|
194
|
+
skills: skillsOf(name, env),
|
|
195
|
+
})),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* The repository's enabledPlugins block, `{}` when it has none.
|
|
201
|
+
*
|
|
202
|
+
* @param {string} repo absolute path
|
|
203
|
+
*/
|
|
204
|
+
export function repoEnabledPlugins(repo) {
|
|
205
|
+
if (!isAbsolute(repo)) throw new StackError("bad-repo", "the repository path must be absolute");
|
|
206
|
+
return readSettings(repo).enabledPlugins ?? {};
|
|
207
|
+
}
|
|
208
|
+
|
|
138
209
|
/**
|
|
139
210
|
* The repository's current state: which stacks are on, every marketplace
|
|
140
211
|
* plugin with its enablement and skills.
|
|
@@ -142,22 +213,14 @@ function skillsOf(plugin, env) {
|
|
|
142
213
|
* @param {string} repo absolute path
|
|
143
214
|
*/
|
|
144
215
|
export function stackStatus(repo, env = process.env) {
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
const names = marketplaceNames(env) ?? [...ALWAYS_ON, ...KNOWN_STACKS.map(stackPlugin)];
|
|
148
|
-
const plugins = names.map((name) => ({
|
|
149
|
-
name,
|
|
150
|
-
enabled: enabled[`${name}${SUFFIX}`] === true,
|
|
151
|
-
alwaysOn: ALWAYS_ON.includes(name),
|
|
152
|
-
stack: KNOWN_STACKS.find((s) => stackPlugin(s) === name) ?? null,
|
|
153
|
-
skills: skillsOf(name, env),
|
|
154
|
-
}));
|
|
216
|
+
const enabled = repoEnabledPlugins(repo);
|
|
217
|
+
const { verified, plugins } = marketplacePlugins(enabled, env);
|
|
155
218
|
return {
|
|
156
219
|
contractVersion: CONTRACT_VERSION,
|
|
157
220
|
stacks: KNOWN_STACKS.filter((s) => enabled[`${stackPlugin(s)}${SUFFIX}`] === true),
|
|
158
221
|
knownStacks: KNOWN_STACKS,
|
|
159
222
|
plugins,
|
|
160
|
-
manifestVerified:
|
|
223
|
+
manifestVerified: verified,
|
|
161
224
|
};
|
|
162
225
|
}
|
|
163
226
|
|
|
@@ -29,6 +29,7 @@ import { join } from "node:path";
|
|
|
29
29
|
import { invokedDirectly } from "../lib/invoked-directly.mjs";
|
|
30
30
|
import { spawnAsync } from "./_spawn-async.mjs";
|
|
31
31
|
import { exitOnHelp } from "../lib/cli-help.mjs";
|
|
32
|
+
import { SERVER_CHECKOUT_DIRS } from "../lib/mcp-rename.mjs";
|
|
32
33
|
|
|
33
34
|
exitOnHelp(import.meta.url);
|
|
34
35
|
|
|
@@ -90,7 +91,8 @@ async function folderMb(path) {
|
|
|
90
91
|
/**
|
|
91
92
|
* Pipeline processes from `ps`, counted and summed, never listed. A Claude Code
|
|
92
93
|
* session is a process whose executable is `claude`; the toolkit server is a
|
|
93
|
-
* node, npx or npm process whose command line names multi-agent
|
|
94
|
+
* node, npx or npm process whose command line names the multi-agent MCP server's package
|
|
95
|
+
* or checkout (SERVER_CHECKOUT_DIRS).
|
|
94
96
|
*/
|
|
95
97
|
export function countProcesses(psText) {
|
|
96
98
|
const out = { sessions: 0, toolkit: 0, rssMb: 0 };
|
|
@@ -102,7 +104,11 @@ export function countProcesses(psText) {
|
|
|
102
104
|
const rest = m[3] || "";
|
|
103
105
|
if (exe === "claude") out.sessions++;
|
|
104
106
|
// The server runs under node or npx; a grep or tail naming it is not it.
|
|
105
|
-
else if (
|
|
107
|
+
else if (
|
|
108
|
+
/^(node|npx|npm)$/.test(exe) &&
|
|
109
|
+
SERVER_CHECKOUT_DIRS.some((name) => rest.includes(name))
|
|
110
|
+
)
|
|
111
|
+
out.toolkit++;
|
|
106
112
|
else continue;
|
|
107
113
|
out.rssMb += rssKb / 1024;
|
|
108
114
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* A red test is a claim about the change only when the base was green and the
|
|
6
6
|
* test stayed red on a second run. The toolkit's `test_results_classify`
|
|
7
|
-
* (multi-agent-
|
|
7
|
+
* (multi-agent-mcp >= 3.25.0) measures that per test:
|
|
8
8
|
* passed | regression | preexisting | unstable | not_measured. This script
|
|
9
9
|
* takes its answer and applies the pipeline's own rules on top:
|
|
10
10
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @file toolkit-tools.mjs - the multi-agent
|
|
3
|
+
* @file toolkit-tools.mjs - the multi-agent MCP server's tools, for
|
|
4
4
|
* a client that is not an MCP host: list them, and call one with arguments its
|
|
5
5
|
* own inputSchema accepts.
|
|
6
6
|
*
|
|
@@ -67,6 +67,7 @@ import { runMain } from "../lib/fatal.mjs";
|
|
|
67
67
|
import { invokedDirectly } from "../lib/invoked-directly.mjs";
|
|
68
68
|
import { defaultPrefsPath, loadPrefs } from "../lib/prefs-value.mjs";
|
|
69
69
|
import { exitOnHelp } from "../lib/cli-help.mjs";
|
|
70
|
+
import { MCP_SERVER_ID } from "../lib/mcp-rename.mjs";
|
|
70
71
|
|
|
71
72
|
exitOnHelp(import.meta.url);
|
|
72
73
|
|
|
@@ -107,7 +108,7 @@ export function toolkitEntry(env = process.env) {
|
|
|
107
108
|
const home = env.HOME || homedir();
|
|
108
109
|
for (const p of [join(home, ".claude.json"), join(home, ".claude", "settings.json")]) {
|
|
109
110
|
const j = readJson(p);
|
|
110
|
-
const key = j?.mcpServers && Object.keys(j.mcpServers).find((k) =>
|
|
111
|
+
const key = j?.mcpServers && Object.keys(j.mcpServers).find((k) => k === MCP_SERVER_ID);
|
|
111
112
|
if (key && typeof j.mcpServers[key]?.command === "string") return j.mcpServers[key];
|
|
112
113
|
}
|
|
113
114
|
return null;
|
|
@@ -415,7 +416,7 @@ export function createToolkitClient({ env = process.env } = {}) {
|
|
|
415
416
|
const registered = toolkitEntry(env);
|
|
416
417
|
if (!registered) {
|
|
417
418
|
return Promise.reject(
|
|
418
|
-
new ToolError("not-registered", "multi-agent
|
|
419
|
+
new ToolError("not-registered", "multi-agent is not registered as an MCP server"),
|
|
419
420
|
);
|
|
420
421
|
}
|
|
421
422
|
const entry = pinnedEntry(registered, env);
|
|
@@ -2865,7 +2865,19 @@ def check_bash(cmd, cwd, policy, env=None, variables=None, nested=False):
|
|
|
2865
2865
|
return None
|
|
2866
2866
|
|
|
2867
2867
|
|
|
2868
|
-
TOOLKIT_PREFIX = "mcp__multi-
|
|
2868
|
+
TOOLKIT_PREFIX = "mcp__multi-agent__"
|
|
2869
|
+
# The server's tools under its earlier registration id, judged the same way:
|
|
2870
|
+
# a host whose old registration could not be removed still serves them.
|
|
2871
|
+
LEGACY_TOOLKIT_PREFIX = "mcp__multi-agent-toolkit__"
|
|
2872
|
+
TOOLKIT_PREFIXES = (TOOLKIT_PREFIX, LEGACY_TOOLKIT_PREFIX)
|
|
2873
|
+
|
|
2874
|
+
|
|
2875
|
+
def toolkit_short_name(tool):
|
|
2876
|
+
"""The tool's name without its server prefix, or None for another tool."""
|
|
2877
|
+
for prefix in TOOLKIT_PREFIXES:
|
|
2878
|
+
if tool.startswith(prefix):
|
|
2879
|
+
return tool[len(prefix):]
|
|
2880
|
+
return None
|
|
2869
2881
|
|
|
2870
2882
|
|
|
2871
2883
|
# MCP tools run outside the OS sandbox, so the guard is their only path
|
|
@@ -4465,7 +4477,7 @@ def _free_routing_on(env):
|
|
|
4465
4477
|
|
|
4466
4478
|
|
|
4467
4479
|
def check_toolkit(name, ti, policy, env, depth=0, cwd=None):
|
|
4468
|
-
"""A multi-agent
|
|
4480
|
+
"""A multi-agent MCP tool call, by its short name (web_goto,
|
|
4469
4481
|
ios_open_url, agent_run_steps). agent_run_steps dispatches other toolkit
|
|
4470
4482
|
tools, so each step is judged as if it were called directly. Every
|
|
4471
4483
|
path-typed argument is checked, including inside a step."""
|
|
@@ -4485,7 +4497,7 @@ def check_toolkit(name, ti, policy, env, depth=0, cwd=None):
|
|
|
4485
4497
|
if not isinstance(step, dict) or not isinstance(step.get("tool"), str):
|
|
4486
4498
|
return "an agent_run_steps step without a tool name cannot be judged"
|
|
4487
4499
|
sub = step["tool"]
|
|
4488
|
-
sub =
|
|
4500
|
+
sub = toolkit_short_name(sub) or sub
|
|
4489
4501
|
if sub.startswith("agent_"):
|
|
4490
4502
|
return "agent_run_steps may not nest another agent_* tool"
|
|
4491
4503
|
r = check_toolkit(sub, step.get("args") if step.get("args") is not None else {}, policy, env, depth + 1, cwd)
|
|
@@ -4515,8 +4527,9 @@ def check(payload, env=None):
|
|
|
4515
4527
|
cwd = payload.get("cwd") or os.getcwd()
|
|
4516
4528
|
if tool in ("Edit", "Write", "NotebookEdit", "MultiEdit"):
|
|
4517
4529
|
return check_path(ti.get("file_path") or ti.get("notebook_path") or "", cwd, policy, env)
|
|
4518
|
-
|
|
4519
|
-
|
|
4530
|
+
short = toolkit_short_name(tool)
|
|
4531
|
+
if short is not None:
|
|
4532
|
+
return check_toolkit(short, ti, policy, env, cwd=cwd)
|
|
4520
4533
|
if tool == "WebFetch":
|
|
4521
4534
|
url = ti.get("url")
|
|
4522
4535
|
if isinstance(url, str) and url:
|