opencode-skills-collection 4.1.15 → 4.1.17
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/bundled-skills/.antigravity-install-manifest.json +2 -1
- package/bundled-skills/00-andruia-consultant/SKILL.md +23 -10
- package/bundled-skills/10-andruia-skill-smith/SKILL.md +18 -14
- package/bundled-skills/20-andruia-niche-intelligence/SKILL.md +40 -15
- package/bundled-skills/360-feedback-system/SKILL.md +7 -10
- package/bundled-skills/3d-web-experience/SKILL.md +91 -47
- package/bundled-skills/acceptance-orchestrator/SKILL.md +6 -7
- package/bundled-skills/access-matrix/SKILL.md +8 -7
- package/bundled-skills/accessibility-compliance-accessibility-audit/SKILL.md +10 -4
- package/bundled-skills/accessibility-compliance-accessibility-audit/resources/implementation-playbook.md +29 -76
- package/bundled-skills/accesslint-audit/SKILL.md +13 -7
- package/bundled-skills/accesslint-diff/SKILL.md +15 -47
- package/bundled-skills/accesslint-scan/SKILL.md +24 -8
- package/bundled-skills/activecampaign-automation/SKILL.md +8 -4
- package/bundled-skills/ad-campaign-analyzer/SKILL.md +11 -9
- package/bundled-skills/address-github-comments/SKILL.md +12 -6
- package/bundled-skills/adhx/SKILL.md +12 -9
- package/bundled-skills/admin-access-register/SKILL.md +20 -26
- package/bundled-skills/advanced-analytics-dashboard/SKILL.md +12 -13
- package/bundled-skills/aegisops-ai/SKILL.md +19 -19
- package/bundled-skills/agent-creator/SKILL.md +13 -14
- package/bundled-skills/agent-evals/SKILL.md +27 -22
- package/bundled-skills/agent-framework-azure-ai-py/SKILL.md +3 -0
- package/bundled-skills/agent-framework-azure-ai-py/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/agent-framework-azure-ai-py/UPSTREAM-NOTICE.md +14 -0
- package/bundled-skills/agent-framework-azure-ai-py/references/advanced.md +512 -0
- package/bundled-skills/agent-framework-azure-ai-py/references/mcp.md +301 -0
- package/bundled-skills/agent-framework-azure-ai-py/references/threads.md +300 -0
- package/bundled-skills/agent-framework-azure-ai-py/references/tools.md +278 -0
- package/bundled-skills/agent-manager-skill/SKILL.md +10 -4
- package/bundled-skills/agent-memory/SKILL.md +39 -8
- package/bundled-skills/agent-memory-mcp/SKILL.md +11 -2
- package/bundled-skills/agent-memory-systems/SKILL.md +13 -28
- package/bundled-skills/agent-memory-systems/references/detailed-guide.md +59 -257
- package/bundled-skills/agent-orchestration-improve-agent/SKILL.md +12 -7
- package/bundled-skills/agent-orchestration-multi-agent-optimize/SKILL.md +14 -24
- package/bundled-skills/agent-orchestrator/SKILL.md +30 -20
- package/bundled-skills/agent-orchestrator/references/capability-taxonomy.md +9 -9
- package/bundled-skills/agent-orchestrator/references/orchestration-patterns.md +2 -2
- package/bundled-skills/agent-orchestrator/scripts/match_skills.py +49 -51
- package/bundled-skills/agent-orchestrator/scripts/orchestrate.py +71 -32
- package/bundled-skills/agent-orchestrator/scripts/scan_registry.py +92 -68
- package/bundled-skills/agent-self-scheduling/SKILL.md +11 -8
- package/bundled-skills/agent-squad/alex/SKILL.md +6 -1
- package/bundled-skills/agent-squad/aria/SKILL.md +7 -2
- package/bundled-skills/agent-squad/dep/SKILL.md +11 -4
- package/bundled-skills/agent-squad/luna/SKILL.md +10 -5
- package/bundled-skills/agent-squad/mason/SKILL.md +10 -5
- package/bundled-skills/agent-squad/max/SKILL.md +10 -3
- package/bundled-skills/agent-squad/quinn/SKILL.md +12 -5
- package/bundled-skills/agent-squad/rex/SKILL.md +7 -2
- package/bundled-skills/agentflow/SKILL.md +22 -15
- package/bundled-skills/agentfolio/SKILL.md +3 -2
- package/bundled-skills/agentic-actions-auditor/SKILL.md +35 -27
- package/bundled-skills/agentmail/SKILL.md +33 -58
- package/bundled-skills/agents-md/SKILL.md +1 -3
- package/bundled-skills/agents-v2-py/SKILL.md +57 -58
- package/bundled-skills/agenttrace-session-audit/SKILL.md +3 -2
- package/bundled-skills/agy-auto/SKILL.md +11 -10
- package/bundled-skills/ai-agent-development/SKILL.md +6 -0
- package/bundled-skills/ai-agent-evaluation-benchmarking/SKILL.md +15 -10
- package/bundled-skills/ai-agent-tool-routing/SKILL.md +98 -116
- package/bundled-skills/ai-agents-architect/SKILL.md +2 -2
- package/bundled-skills/ai-analyzer/SKILL.md +25 -10
- package/bundled-skills/ai-code-generation-guardrails/SKILL.md +99 -126
- package/bundled-skills/ai-dev-jobs-mcp/SKILL.md +8 -4
- package/bundled-skills/ai-engineer/SKILL.md +13 -7
- package/bundled-skills/ai-engineering-toolkit/SKILL.md +11 -7
- package/bundled-skills/ai-headshot-studio/SKILL.md +9 -7
- package/bundled-skills/ai-image-generation-studio/SKILL.md +9 -7
- package/bundled-skills/ai-inference-service-mesh/SKILL.md +18 -43
- package/bundled-skills/ai-logo-maker/SKILL.md +8 -4
- package/bundled-skills/ai-loop/SKILL.md +4 -4
- package/bundled-skills/ai-ml/SKILL.md +4 -0
- package/bundled-skills/ai-multilingual-dubbing/SKILL.md +9 -3
- package/bundled-skills/ai-native-cli/SKILL.md +10 -7
- package/bundled-skills/ai-photo-restyler/SKILL.md +8 -4
- package/bundled-skills/ai-pipeline-orchestration/SKILL.md +36 -18
- package/bundled-skills/ai-podcast-voiceover/SKILL.md +9 -3
- package/bundled-skills/ai-prompt-regression-testing/SKILL.md +100 -112
- package/bundled-skills/ai-red-teaming/SKILL.md +55 -35
- package/bundled-skills/ai-security-hardening/SKILL.md +17 -25
- package/bundled-skills/ai-sre-incident-response/SKILL.md +8 -8
- package/bundled-skills/ai-studio-image/SKILL.md +8 -0
- package/bundled-skills/akf-trust-metadata/SKILL.md +8 -2
- package/bundled-skills/alerting-oncall/SKILL.md +1 -0
- package/bundled-skills/alerting-oncall/references/details.md +1 -5
- package/bundled-skills/alpha-vantage/SKILL.md +0 -4
- package/bundled-skills/angular-migration/SKILL.md +14 -0
- package/bundled-skills/animejs-animation/SKILL.md +8 -3
- package/bundled-skills/anti-deception/SKILL.md +5 -3
- package/bundled-skills/anti-reversing-techniques/SKILL.md +1 -1
- package/bundled-skills/anti-sleep/SKILL.md +4 -2
- package/bundled-skills/antigravity-design-expert/SKILL.md +3 -3
- package/bundled-skills/antigravity-maintainer-batch-release/SKILL.md +6 -0
- package/bundled-skills/api-analyzer/SKILL.md +7 -29
- package/bundled-skills/api-designer/SKILL.md +9 -0
- package/bundled-skills/api-documentation/SKILL.md +7 -1
- package/bundled-skills/api-sdk-generator/SKILL.md +0 -21
- package/bundled-skills/api-testing-observability-api-mock/resources/implementation-playbook.md +31 -11
- package/bundled-skills/apk-reverse/SKILL.md +14 -0
- package/bundled-skills/apk-reverse/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/apk-reverse/UPSTREAM-NOTICE.md +11 -0
- package/bundled-skills/apk-reverse/scripts/manifest-summary.ps1 +80 -0
- package/bundled-skills/architecture-review/SKILL.md +4 -4
- package/bundled-skills/arm-cortex-expert/SKILL.md +0 -1
- package/bundled-skills/arrowspace/SKILL.md +23 -21
- package/bundled-skills/ask-questions-if-underspecified/SKILL.md +4 -4
- package/bundled-skills/audit-logging/SKILL.md +10 -77
- package/bundled-skills/automated-triage/SKILL.md +3 -0
- package/bundled-skills/automated-triage/UPSTREAM-LICENSE.txt +201 -0
- package/bundled-skills/automated-triage/UPSTREAM-NOTICE.md +12 -0
- package/bundled-skills/automated-triage/references/triage-example.md +115 -0
- package/bundled-skills/automated-triage/references/triage-stages.md +141 -0
- package/bundled-skills/avoid-ai-writing/SKILL.md +4 -2
- package/bundled-skills/awareness-stage-mapper/SKILL.md +16 -8
- package/bundled-skills/aws-cdk-development/SKILL.md +7 -0
- package/bundled-skills/aws-cdk-development/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/aws-cdk-development/UPSTREAM-NOTICE.md +14 -0
- package/bundled-skills/aws-cdk-development/references/cdk-patterns.md +431 -0
- package/bundled-skills/aws-cdk-development/scripts/validate-stack.sh +247 -0
- package/bundled-skills/aws-skills/SKILL.md +16 -21
- package/bundled-skills/aws-sst-development/SKILL.md +3 -0
- package/bundled-skills/aws-sst-development/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/aws-sst-development/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/aws-sst-development/references/authoring.md +506 -0
- package/bundled-skills/aws-sst-development/references/deploy-and-troubleshoot.md +182 -0
- package/bundled-skills/aws-sst-development/references/testing.md +126 -0
- package/bundled-skills/awt-e2e-testing/SKILL.md +7 -1
- package/bundled-skills/azd-deployment/SKILL.md +45 -51
- package/bundled-skills/azure-ai-agents-persistent-java/SKILL.md +35 -19
- package/bundled-skills/azure-ai-projects-py/SKILL.md +7 -0
- package/bundled-skills/azure-ai-projects-py/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-ai-projects-py/UPSTREAM-NOTICE.md +23 -0
- package/bundled-skills/azure-ai-projects-py/references/agents.md +295 -0
- package/bundled-skills/azure-ai-projects-py/references/api-reference.md +1150 -0
- package/bundled-skills/azure-ai-projects-py/references/async-patterns.md +258 -0
- package/bundled-skills/azure-ai-projects-py/references/built-in-evaluators.md +427 -0
- package/bundled-skills/azure-ai-projects-py/references/connections.md +203 -0
- package/bundled-skills/azure-ai-projects-py/references/custom-evaluators.md +450 -0
- package/bundled-skills/azure-ai-projects-py/references/datasets-indexes.md +177 -0
- package/bundled-skills/azure-ai-projects-py/references/deployments.md +134 -0
- package/bundled-skills/azure-ai-projects-py/references/evaluation.md +349 -0
- package/bundled-skills/azure-ai-projects-py/references/tools.md +464 -0
- package/bundled-skills/azure-ai-projects-py/scripts/run_batch_evaluation.py +409 -0
- package/bundled-skills/azure-ai-transcription-py/SKILL.md +30 -50
- package/bundled-skills/azure-ai-voicelive-py/SKILL.md +3 -0
- package/bundled-skills/azure-ai-voicelive-py/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-ai-voicelive-py/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/azure-ai-voicelive-py/references/api-reference.md +344 -0
- package/bundled-skills/azure-ai-voicelive-py/references/examples.md +558 -0
- package/bundled-skills/azure-ai-voicelive-py/references/models.md +737 -0
- package/bundled-skills/azure-communication-callingserver-java/SKILL.md +10 -9
- package/bundled-skills/azure-cosmos-db-py/SKILL.md +7 -0
- package/bundled-skills/azure-cosmos-db-py/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-cosmos-db-py/UPSTREAM-NOTICE.md +20 -0
- package/bundled-skills/azure-cosmos-db-py/assets/conftest_template.py +332 -0
- package/bundled-skills/azure-cosmos-db-py/assets/cosmos_client_template.py +225 -0
- package/bundled-skills/azure-cosmos-db-py/assets/service_template.py +314 -0
- package/bundled-skills/azure-cosmos-db-py/references/client-setup.md +214 -0
- package/bundled-skills/azure-cosmos-db-py/references/error-handling.md +382 -0
- package/bundled-skills/azure-cosmos-db-py/references/partitioning.md +270 -0
- package/bundled-skills/azure-cosmos-db-py/references/service-layer.md +305 -0
- package/bundled-skills/azure-cosmos-db-py/references/testing.md +495 -0
- package/bundled-skills/azure-cosmos-py/SKILL.md +11 -0
- package/bundled-skills/azure-cosmos-py/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-cosmos-py/UPSTREAM-NOTICE.md +14 -0
- package/bundled-skills/azure-cosmos-py/references/partitioning.md +346 -0
- package/bundled-skills/azure-cosmos-py/references/query-patterns.md +395 -0
- package/bundled-skills/azure-cosmos-rust/SKILL.md +30 -22
- package/bundled-skills/azure-eventhub-py/SKILL.md +7 -0
- package/bundled-skills/azure-eventhub-py/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-eventhub-py/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/azure-eventhub-py/references/checkpointing.md +312 -0
- package/bundled-skills/azure-eventhub-py/references/partitions.md +346 -0
- package/bundled-skills/azure-eventhub-py/scripts/setup_consumer.py +422 -0
- package/bundled-skills/azure-eventhub-rust/SKILL.md +28 -13
- package/bundled-skills/azure-identity-rust/SKILL.md +16 -10
- package/bundled-skills/azure-keyvault-keys-rust/SKILL.md +13 -8
- package/bundled-skills/azure-keyvault-secrets-rust/SKILL.md +12 -6
- package/bundled-skills/azure-mgmt-apimanagement-dotnet/SKILL.md +11 -0
- package/bundled-skills/azure-mgmt-apimanagement-dotnet/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-mgmt-apimanagement-dotnet/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/azure-mgmt-apimanagement-dotnet/references/apis-operations.md +168 -0
- package/bundled-skills/azure-mgmt-apimanagement-dotnet/references/products-subscriptions.md +173 -0
- package/bundled-skills/azure-mgmt-apimanagement-dotnet/references/service-management.md +154 -0
- package/bundled-skills/azure-resource-manager-cosmosdb-dotnet/SKILL.md +3 -0
- package/bundled-skills/azure-resource-manager-cosmosdb-dotnet/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-resource-manager-cosmosdb-dotnet/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/azure-resource-manager-cosmosdb-dotnet/references/account-management.md +279 -0
- package/bundled-skills/azure-resource-manager-cosmosdb-dotnet/references/sql-resources.md +373 -0
- package/bundled-skills/azure-resource-manager-cosmosdb-dotnet/references/throughput.md +308 -0
- package/bundled-skills/azure-resource-manager-sql-dotnet/SKILL.md +3 -0
- package/bundled-skills/azure-resource-manager-sql-dotnet/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-resource-manager-sql-dotnet/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/azure-resource-manager-sql-dotnet/references/database-operations.md +268 -0
- package/bundled-skills/azure-resource-manager-sql-dotnet/references/elastic-pools.md +234 -0
- package/bundled-skills/azure-resource-manager-sql-dotnet/references/server-management.md +192 -0
- package/bundled-skills/azure-search-documents-dotnet/SKILL.md +3 -0
- package/bundled-skills/azure-search-documents-dotnet/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-search-documents-dotnet/UPSTREAM-NOTICE.md +14 -0
- package/bundled-skills/azure-search-documents-dotnet/references/semantic-search.md +241 -0
- package/bundled-skills/azure-search-documents-dotnet/references/vector-search.md +236 -0
- package/bundled-skills/azure-servicebus-py/SKILL.md +7 -0
- package/bundled-skills/azure-servicebus-py/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-servicebus-py/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/azure-servicebus-py/references/dead-letter.md +418 -0
- package/bundled-skills/azure-servicebus-py/references/patterns.md +405 -0
- package/bundled-skills/azure-servicebus-py/scripts/setup_servicebus.py +384 -0
- package/bundled-skills/azure-speech-to-text-rest-py/SKILL.md +3 -0
- package/bundled-skills/azure-speech-to-text-rest-py/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/azure-speech-to-text-rest-py/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/azure-speech-to-text-rest-py/references/pronunciation-assessment.md +276 -0
- package/bundled-skills/azure-storage-blob-rust/SKILL.md +29 -21
- package/bundled-skills/baseline-ui/SKILL.md +2 -2
- package/bundled-skills/bash-scripting/SKILL.md +10 -2
- package/bundled-skills/bazel-build-optimization/SKILL.md +0 -1
- package/bundled-skills/bdistill-behavioral-xray/SKILL.md +5 -5
- package/bundled-skills/bdistill-knowledge-extraction/SKILL.md +9 -6
- package/bundled-skills/beautiful-prose/SKILL.md +1 -2
- package/bundled-skills/bevy-ecs-expert/SKILL.md +9 -7
- package/bundled-skills/billing-automation/resources/implementation-playbook.md +56 -513
- package/bundled-skills/binary-analysis-patterns/SKILL.md +0 -1
- package/bundled-skills/biopython/SKILL.md +3 -0
- package/bundled-skills/biopython/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/biopython/UPSTREAM-NOTICE.md +17 -0
- package/bundled-skills/biopython/references/advanced.md +577 -0
- package/bundled-skills/biopython/references/alignment.md +368 -0
- package/bundled-skills/biopython/references/blast.md +455 -0
- package/bundled-skills/biopython/references/databases.md +487 -0
- package/bundled-skills/biopython/references/phylogenetics.md +566 -0
- package/bundled-skills/biopython/references/sequence_io.md +285 -0
- package/bundled-skills/biopython/references/structure.md +564 -0
- package/bundled-skills/blockchain-developer/SKILL.md +0 -1
- package/bundled-skills/blueprint/SKILL.md +6 -8
- package/bundled-skills/brain-to-docs/SKILL.md +4 -4
- package/bundled-skills/brand-growth-system-builder/SKILL.md +10 -0
- package/bundled-skills/brand-perception-psychologist/SKILL.md +15 -7
- package/bundled-skills/browser-bridge/SKILL.md +101 -0
- package/bundled-skills/build/SKILL.md +15 -10
- package/bundled-skills/build/references/detailed-guide.md +38 -14
- package/bundled-skills/burpsuite-project-parser/SKILL.md +7 -0
- package/bundled-skills/buywhere-product-catalog/SKILL.md +6 -5
- package/bundled-skills/c-pro/SKILL.md +8 -6
- package/bundled-skills/c4-architecture-c4-architecture/SKILL.md +0 -1
- package/bundled-skills/c4-code/SKILL.md +0 -1
- package/bundled-skills/c4-component/SKILL.md +0 -1
- package/bundled-skills/c4-container/SKILL.md +0 -1
- package/bundled-skills/c4-context/SKILL.md +0 -1
- package/bundled-skills/cdk-patterns/SKILL.md +7 -0
- package/bundled-skills/changelog-entry/SKILL.md +6 -4
- package/bundled-skills/check-identity-pack/SKILL.md +7 -8
- package/bundled-skills/chrome-extension-developer/SKILL.md +8 -4
- package/bundled-skills/ci-cd-and-automation/SKILL.md +15 -3
- package/bundled-skills/cirq/SKILL.md +3 -0
- package/bundled-skills/cirq/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/cirq/UPSTREAM-NOTICE.md +16 -0
- package/bundled-skills/cirq/references/building.md +307 -0
- package/bundled-skills/cirq/references/experiments.md +572 -0
- package/bundled-skills/cirq/references/hardware.md +527 -0
- package/bundled-skills/cirq/references/noise.md +514 -0
- package/bundled-skills/cirq/references/simulation.md +353 -0
- package/bundled-skills/cirq/references/transformation.md +416 -0
- package/bundled-skills/cis-benchmarks/SKILL.md +16 -9
- package/bundled-skills/clarvia-aeo-check/SKILL.md +9 -9
- package/bundled-skills/claude-ally-health/SKILL.md +17 -6
- package/bundled-skills/claude-code-guide/SKILL.md +9 -5
- package/bundled-skills/claude-scientific-skills/SKILL.md +15 -3
- package/bundled-skills/claude-speed-reader/SKILL.md +13 -3
- package/bundled-skills/claude-win11-speckit-update-skill/SKILL.md +13 -7
- package/bundled-skills/cline-pilot/SKILL.md +10 -0
- package/bundled-skills/closed-loop-delivery/SKILL.md +7 -7
- package/bundled-skills/cloud-architect/SKILL.md +0 -1
- package/bundled-skills/cloudflare-workers-expert/SKILL.md +6 -5
- package/bundled-skills/cloudformation-best-practices/SKILL.md +4 -3
- package/bundled-skills/cmux/SKILL.md +8 -0
- package/bundled-skills/code-refactoring-context-restore/SKILL.md +1 -1
- package/bundled-skills/code-review-ai-ai-review/SKILL.md +8 -1
- package/bundled-skills/code-review-and-quality/SKILL.md +9 -0
- package/bundled-skills/code-reviewer/SKILL.md +0 -1
- package/bundled-skills/codex-review/SKILL.md +3 -2
- package/bundled-skills/commit/SKILL.md +12 -11
- package/bundled-skills/comprehensive-review-full-review/SKILL.md +0 -1
- package/bundled-skills/computer-vision-expert/SKILL.md +9 -8
- package/bundled-skills/concise-planning/SKILL.md +7 -7
- package/bundled-skills/conductor-implement/SKILL.md +0 -1
- package/bundled-skills/conductor-new-track/SKILL.md +0 -1
- package/bundled-skills/conductor-revert/SKILL.md +0 -1
- package/bundled-skills/conductor-setup/SKILL.md +42 -25
- package/bundled-skills/conductor-status/SKILL.md +0 -1
- package/bundled-skills/conductor-validator/SKILL.md +15 -19
- package/bundled-skills/constant-time-analysis/SKILL.md +3 -0
- package/bundled-skills/constant-time-analysis/UPSTREAM-LICENSE.txt +427 -0
- package/bundled-skills/constant-time-analysis/UPSTREAM-NOTICE.md +18 -0
- package/bundled-skills/constant-time-analysis/references/compiled.md +129 -0
- package/bundled-skills/constant-time-analysis/references/javascript.md +136 -0
- package/bundled-skills/constant-time-analysis/references/kotlin.md +252 -0
- package/bundled-skills/constant-time-analysis/references/php.md +172 -0
- package/bundled-skills/constant-time-analysis/references/python.md +179 -0
- package/bundled-skills/constant-time-analysis/references/ruby.md +198 -0
- package/bundled-skills/constant-time-analysis/references/swift.md +288 -0
- package/bundled-skills/constant-time-analysis/references/vm-compiled.md +354 -0
- package/bundled-skills/container-hardening/SKILL.md +23 -24
- package/bundled-skills/content-marketer/SKILL.md +0 -1
- package/bundled-skills/context-kit/SKILL.md +8 -0
- package/bundled-skills/context-management-context-restore/SKILL.md +1 -1
- package/bundled-skills/context-management-context-save/SKILL.md +0 -1
- package/bundled-skills/context-manager/SKILL.md +0 -1
- package/bundled-skills/context7-auto-research/SKILL.md +3 -3
- package/bundled-skills/copy-editing/SKILL.md +4 -0
- package/bundled-skills/copywriting-psychologist/SKILL.md +16 -8
- package/bundled-skills/cost-optimization/SKILL.md +11 -1
- package/bundled-skills/cost-optimization/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/cost-optimization/UPSTREAM-NOTICE.md +11 -0
- package/bundled-skills/cost-optimization/references/tagging-standards.md +23 -0
- package/bundled-skills/cowork-to-code-bridge/SKILL.md +9 -0
- package/bundled-skills/create-issue-gate/SKILL.md +5 -5
- package/bundled-skills/create-pr/SKILL.md +2 -0
- package/bundled-skills/crossframe-suite/SKILL.md +8 -0
- package/bundled-skills/crypto-bd-agent/SKILL.md +1 -2
- package/bundled-skills/csharp-pro/SKILL.md +5 -7
- package/bundled-skills/csv-manual-export/SKILL.md +1 -2
- package/bundled-skills/customer-psychographic-profiler/SKILL.md +15 -7
- package/bundled-skills/customer-support/SKILL.md +0 -1
- package/bundled-skills/data-engineering-data-driven-feature/SKILL.md +0 -1
- package/bundled-skills/data-privacy-controls/SKILL.md +7 -8
- package/bundled-skills/database-admin/SKILL.md +0 -1
- package/bundled-skills/database-design/SKILL.md +5 -1
- package/bundled-skills/database-design/database-selection.md +1 -1
- package/bundled-skills/database-design/orm-selection.md +1 -1
- package/bundled-skills/database-design/scripts/schema_validator.py +17 -8
- package/bundled-skills/database-migration/SKILL.md +14 -1
- package/bundled-skills/database-migrations-sql-migrations/resources/implementation-playbook.md +31 -283
- package/bundled-skills/database-optimizer/SKILL.md +0 -1
- package/bundled-skills/debug-buttercup/SKILL.md +8 -0
- package/bundled-skills/debugger/SKILL.md +4 -3
- package/bundled-skills/debugging-toolkit/SKILL.md +2 -2
- package/bundled-skills/debugging-toolkit-smart-debug/SKILL.md +14 -10
- package/bundled-skills/deep-research/SKILL.md +24 -13
- package/bundled-skills/deep-research/UPSTREAM-LICENSE.txt +190 -0
- package/bundled-skills/deep-research/UPSTREAM-NOTICE.md +11 -0
- package/bundled-skills/deep-research/requirements.txt +2 -0
- package/bundled-skills/deep-research/scripts/research.py +802 -0
- package/bundled-skills/defi-protocol-templates/SKILL.md +16 -1
- package/bundled-skills/defuddle/SKILL.md +9 -6
- package/bundled-skills/delegating-to-agents/SKILL.md +12 -13
- package/bundled-skills/dependency-management-deps-audit/resources/implementation-playbook.md +32 -289
- package/bundled-skills/dependency-upgrade/SKILL.md +14 -1
- package/bundled-skills/deployment-pipeline-design/SKILL.md +11 -111
- package/bundled-skills/deployment-validation-config-validate/SKILL.md +1 -1
- package/bundled-skills/deprecation-and-migration/SKILL.md +2 -2
- package/bundled-skills/design-orchestration/SKILL.md +4 -4
- package/bundled-skills/design-spells/SKILL.md +4 -4
- package/bundled-skills/detect-ai-text/SKILL.md +4 -4
- package/bundled-skills/deterministic-design/SKILL.md +5 -4
- package/bundled-skills/devcontainer-setup/SKILL.md +3 -0
- package/bundled-skills/devcontainer-setup/UPSTREAM-LICENSE.txt +427 -0
- package/bundled-skills/devcontainer-setup/UPSTREAM-NOTICE.md +12 -0
- package/bundled-skills/devcontainer-setup/references/dockerfile-best-practices.md +102 -0
- package/bundled-skills/devcontainer-setup/references/features-vs-dockerfile.md +22 -0
- package/bundled-skills/diagram-generator/SKILL.md +6 -0
- package/bundled-skills/diagram-generator/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/diagram-generator/UPSTREAM-NOTICE.md +11 -0
- package/bundled-skills/diagram-generator/scripts/render_diagram.py +169 -0
- package/bundled-skills/django-access-review/SKILL.md +20 -12
- package/bundled-skills/django-perf-review/SKILL.md +1 -1
- package/bundled-skills/doc-coauthoring/SKILL.md +1 -1
- package/bundled-skills/doc2math/SKILL.md +10 -9
- package/bundled-skills/docker-compose/SKILL.md +17 -11
- package/bundled-skills/docker-expert/SKILL.md +57 -53
- package/bundled-skills/docker-management/SKILL.md +17 -13
- package/bundled-skills/docs-architect/SKILL.md +0 -1
- package/bundled-skills/docs-generator/SKILL.md +7 -1
- package/bundled-skills/docs-generator/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/docs-generator/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/docs-generator/scripts/case-init.ps1 +379 -0
- package/bundled-skills/docs-generator/scripts/lib/HostRuntime.ps1 +58 -0
- package/bundled-skills/docs-generator/scripts/lib/WorkRoot.ps1 +33 -0
- package/bundled-skills/documentation/SKILL.md +5 -1
- package/bundled-skills/documentation-and-adrs/SKILL.md +7 -5
- package/bundled-skills/documentation-templates/SKILL.md +8 -6
- package/bundled-skills/dotnet-architect/SKILL.md +0 -1
- package/bundled-skills/doubt-driven-development/SKILL.md +8 -0
- package/bundled-skills/dx-optimizer/SKILL.md +8 -8
- package/bundled-skills/e2e-testing/SKILL.md +4 -0
- package/bundled-skills/eas-workflows/SKILL.md +60 -27
- package/bundled-skills/eas-workflows/agents/openai.yaml +1 -1
- package/bundled-skills/eas-workflows/scripts/fetch.js +131 -82
- package/bundled-skills/eas-workflows/scripts/package.json +4 -0
- package/bundled-skills/elixir-pro/SKILL.md +5 -7
- package/bundled-skills/emblemai-crypto-wallet/SKILL.md +7 -6
- package/bundled-skills/emotional-arc-designer/SKILL.md +16 -8
- package/bundled-skills/error-debugging-multi-agent-review/SKILL.md +1 -1
- package/bundled-skills/error-detective/SKILL.md +7 -3
- package/bundled-skills/error-diagnostics-smart-debug/SKILL.md +14 -10
- package/bundled-skills/error-handling-patterns/resources/implementation-playbook.md +21 -72
- package/bundled-skills/event-sourcing-architect/SKILL.md +4 -3
- package/bundled-skills/exa-search/SKILL.md +4 -2
- package/bundled-skills/executing-plans/SKILL.md +8 -8
- package/bundled-skills/expo-ui-jetpack-compose/SKILL.md +4 -7
- package/bundled-skills/expo-ui-swift-ui/SKILL.md +5 -8
- package/bundled-skills/fact-check-x-unified/SKILL.md +25 -15
- package/bundled-skills/fact-check-x-unified/UPSTREAM-NOTICE.md +9 -0
- package/bundled-skills/fact-check-x-unified/scripts/fact_check_x.py +10 -5
- package/bundled-skills/fact-check-x-unified/scripts/trusted_search_config.py +49 -8
- package/bundled-skills/fact-check-x-unified/tests/smoke_test.py +1 -1
- package/bundled-skills/fact-check-x-unified/tests/trusted_search_config_test.py +8 -2
- package/bundled-skills/fal-audio/SKILL.md +16 -6
- package/bundled-skills/fal-generate/SKILL.md +16 -6
- package/bundled-skills/fal-image-edit/SKILL.md +16 -6
- package/bundled-skills/fal-platform/SKILL.md +12 -4
- package/bundled-skills/fal-upscale/SKILL.md +12 -4
- package/bundled-skills/fal-workflow/SKILL.md +24 -6
- package/bundled-skills/family-health-analyzer/SKILL.md +17 -16
- package/bundled-skills/fastapi-router-py/SKILL.md +3 -0
- package/bundled-skills/fastapi-router-py/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/fastapi-router-py/UPSTREAM-NOTICE.md +11 -0
- package/bundled-skills/fastapi-router-py/assets/template.py +147 -0
- package/bundled-skills/fda-food-safety-auditor/SKILL.md +9 -8
- package/bundled-skills/fda-medtech-compliance-auditor/SKILL.md +8 -8
- package/bundled-skills/ffuf-claude-skill/SKILL.md +18 -3
- package/bundled-skills/file-organizer/SKILL.md +1 -1
- package/bundled-skills/find-bugs/SKILL.md +4 -4
- package/bundled-skills/find-matching-tenders/SKILL.md +12 -11
- package/bundled-skills/firecrawl-scraper/SKILL.md +4 -2
- package/bundled-skills/firmware-analyst/SKILL.md +10 -1
- package/bundled-skills/fix-review/SKILL.md +5 -1
- package/bundled-skills/fp-either-ref/SKILL.md +10 -4
- package/bundled-skills/fp-option-ref/SKILL.md +12 -6
- package/bundled-skills/fp-pipe-ref/SKILL.md +7 -1
- package/bundled-skills/fp-taskeither-ref/SKILL.md +28 -10
- package/bundled-skills/fp-types-ref/SKILL.md +8 -2
- package/bundled-skills/framework-migration-legacy-modernize/SKILL.md +0 -1
- package/bundled-skills/free-design-resources/SKILL.md +8 -0
- package/bundled-skills/frontend-api-integration-patterns/SKILL.md +11 -8
- package/bundled-skills/frontend-data-contracts/SKILL.md +5 -1
- package/bundled-skills/frontend-mobile-development-component-scaffold/SKILL.md +1 -1
- package/bundled-skills/frontend-mobile-security-xss-scan/SKILL.md +1 -1
- package/bundled-skills/frontend-slides/SKILL.md +1 -0
- package/bundled-skills/frontend-slides-frontend-slides/SKILL.md +15 -0
- package/bundled-skills/frontend-slides-frontend-slides/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/frontend-slides-frontend-slides/UPSTREAM-NOTICE.md +14 -0
- package/bundled-skills/frontend-slides-frontend-slides/scripts/export-pdf.sh +390 -0
- package/bundled-skills/frontend-slides-frontend-slides/scripts/extract-pptx.py +96 -0
- package/bundled-skills/frontend-slides-frontend-slides/scripts/lib/confined-server.mjs +113 -0
- package/bundled-skills/frontend-ui-engineering/SKILL.md +8 -0
- package/bundled-skills/full-output-enforcement/SKILL.md +20 -9
- package/bundled-skills/full-stack-orchestration-full-stack-feature/SKILL.md +0 -1
- package/bundled-skills/game-development/2d-games/SKILL.md +3 -3
- package/bundled-skills/game-development/3d-games/SKILL.md +8 -4
- package/bundled-skills/game-development/game-design/SKILL.md +8 -4
- package/bundled-skills/game-development/mobile-games/SKILL.md +10 -6
- package/bundled-skills/game-development/multiplayer/SKILL.md +9 -5
- package/bundled-skills/game-development/pc-games/SKILL.md +6 -2
- package/bundled-skills/game-development/vr-ar/SKILL.md +12 -6
- package/bundled-skills/gh-review-requests/SKILL.md +14 -42
- package/bundled-skills/gha-security-review/SKILL.md +3 -0
- package/bundled-skills/gha-security-review/UPSTREAM-LICENSE.txt +190 -0
- package/bundled-skills/gha-security-review/UPSTREAM-NOTICE.md +19 -0
- package/bundled-skills/gha-security-review/references/ai-prompt-injection-via-ci.md +181 -0
- package/bundled-skills/gha-security-review/references/comment-triggered-commands.md +195 -0
- package/bundled-skills/gha-security-review/references/credential-escalation.md +225 -0
- package/bundled-skills/gha-security-review/references/expression-injection.md +287 -0
- package/bundled-skills/gha-security-review/references/permissions-and-secrets.md +265 -0
- package/bundled-skills/gha-security-review/references/pwn-request.md +212 -0
- package/bundled-skills/gha-security-review/references/real-world-attacks.md +298 -0
- package/bundled-skills/gha-security-review/references/runner-infrastructure.md +268 -0
- package/bundled-skills/gha-security-review/references/supply-chain.md +225 -0
- package/bundled-skills/git-advanced-workflows/SKILL.md +19 -12
- package/bundled-skills/git-commit-message/SKILL.md +2 -2
- package/bundled-skills/git-pr-review/SKILL.md +6 -9
- package/bundled-skills/git-pr-workflows-onboard/SKILL.md +0 -1
- package/bundled-skills/git-pr-workflows-pr-enhance/SKILL.md +1 -1
- package/bundled-skills/github-actions/SKILL.md +20 -24
- package/bundled-skills/github-actions-debugger/SKILL.md +7 -3
- package/bundled-skills/github-issue-creator/SKILL.md +12 -12
- package/bundled-skills/gitlab-ci-patterns/SKILL.md +5 -7
- package/bundled-skills/global-chat-agent-discovery/SKILL.md +12 -7
- package/bundled-skills/gmail-automation/SKILL.md +9 -0
- package/bundled-skills/godot-4-migration/SKILL.md +12 -4
- package/bundled-skills/google-calendar-automation/SKILL.md +23 -145
- package/bundled-skills/google-docs-automation/SKILL.md +1 -1
- package/bundled-skills/google-drive-automation/SKILL.md +9 -0
- package/bundled-skills/google-sheets-automation/SKILL.md +1 -1
- package/bundled-skills/google-slides-automation/SKILL.md +1 -1
- package/bundled-skills/graphql-architect/SKILL.md +0 -1
- package/bundled-skills/grill-me/SKILL.md +3 -1
- package/bundled-skills/grill-with-docs/SKILL.md +3 -1
- package/bundled-skills/grilling/SKILL.md +1 -1
- package/bundled-skills/handoff/SKILL.md +5 -1
- package/bundled-skills/haskell-pro/SKILL.md +3 -4
- package/bundled-skills/headline-psychologist/SKILL.md +15 -7
- package/bundled-skills/hf-mem/SKILL.md +9 -1
- package/bundled-skills/hosted-agents-v2-py/SKILL.md +56 -57
- package/bundled-skills/hr-pro/SKILL.md +0 -1
- package/bundled-skills/hugging-face-jobs/SKILL.md +0 -1
- package/bundled-skills/hugging-face-tool-builder/SKILL.md +16 -2
- package/bundled-skills/hybrid-cloud-architect/SKILL.md +0 -1
- package/bundled-skills/hybrid-cloud-networking/SKILL.md +11 -1
- package/bundled-skills/hybrid-cloud-networking/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/hybrid-cloud-networking/UPSTREAM-NOTICE.md +11 -0
- package/bundled-skills/hybrid-cloud-networking/references/direct-connect.md +17 -0
- package/bundled-skills/hyperexecute-skill/SKILL.md +7 -0
- package/bundled-skills/hyperexecute-skill/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/hyperexecute-skill/UPSTREAM-NOTICE.md +16 -0
- package/bundled-skills/hyperexecute-skill/scripts/build-command.js +57 -0
- package/bundled-skills/hyperexecute-skill/scripts/doctor.js +81 -0
- package/bundled-skills/hyperexecute-skill/scripts/summarize-artifacts.js +63 -0
- package/bundled-skills/hyperexecute-skill/scripts/validate-config.js +72 -0
- package/bundled-skills/iconsax-library/SKILL.md +6 -4
- package/bundled-skills/ida-reverse/SKILL.md +13 -0
- package/bundled-skills/ida-reverse/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/ida-reverse/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/ida-reverse/scripts/IdaOpenHelpers.ps1 +115 -0
- package/bundled-skills/ida-reverse/scripts/open.ps1 +378 -0
- package/bundled-skills/ida-reverse/scripts/start-gui.ps1 +105 -0
- package/bundled-skills/idea-evaluator/idea-evaluator-con/SKILL.md +4 -2
- package/bundled-skills/idea-evaluator/idea-evaluator-pro/SKILL.md +5 -3
- package/bundled-skills/identity-mirror/SKILL.md +15 -7
- package/bundled-skills/imagen/SKILL.md +15 -5
- package/bundled-skills/imagen/UPSTREAM-LICENSE.txt +190 -0
- package/bundled-skills/imagen/UPSTREAM-NOTICE.md +5 -0
- package/bundled-skills/imagen/scripts/generate_image.py +241 -0
- package/bundled-skills/implement/SKILL.md +4 -4
- package/bundled-skills/incident-response-incident-response/SKILL.md +0 -1
- package/bundled-skills/incident-response-smart-fix/SKILL.md +1 -1
- package/bundled-skills/incident-runbook-templates/SKILL.md +22 -16
- package/bundled-skills/incremental-implementation/SKILL.md +8 -0
- package/bundled-skills/infinite-gratitude/SKILL.md +6 -2
- package/bundled-skills/internal-comms/SKILL.md +1 -1
- package/bundled-skills/interview-coach/SKILL.md +7 -4
- package/bundled-skills/istio-traffic-management/SKILL.md +0 -1
- package/bundled-skills/iterate-pr/SKILL.md +9 -0
- package/bundled-skills/java-pro/SKILL.md +0 -1
- package/bundled-skills/javascript-pro/SKILL.md +1 -1
- package/bundled-skills/javascript-typescript-typescript-scaffold/SKILL.md +1 -1
- package/bundled-skills/julia-pro/SKILL.md +0 -1
- package/bundled-skills/k8s-security-policies/SKILL.md +8 -1
- package/bundled-skills/kotler-macro-analyzer/SKILL.md +4 -0
- package/bundled-skills/kotlin-coroutines-expert/SKILL.md +8 -5
- package/bundled-skills/kubernetes-deployment/SKILL.md +5 -1
- package/bundled-skills/kubernetes-hardening/SKILL.md +9 -1
- package/bundled-skills/langchain-architecture/SKILL.md +15 -1
- package/bundled-skills/legacy-modernizer/SKILL.md +4 -5
- package/bundled-skills/legal-advisor/SKILL.md +9 -6
- package/bundled-skills/lightning-architecture-review/SKILL.md +6 -6
- package/bundled-skills/lightning-channel-factories/SKILL.md +6 -6
- package/bundled-skills/lightning-factory-explainer/SKILL.md +5 -5
- package/bundled-skills/linkerd-patterns/SKILL.md +0 -1
- package/bundled-skills/linux-hardening/SKILL.md +24 -23
- package/bundled-skills/llm-application-dev-ai-assistant/SKILL.md +1 -1
- package/bundled-skills/llm-application-dev-langchain-agent/SKILL.md +0 -1
- package/bundled-skills/llm-application-dev-prompt-optimize/SKILL.md +1 -1
- package/bundled-skills/llm-evaluation/SKILL.md +50 -62
- package/bundled-skills/llm-evaluation/references/benchmarking.md +35 -0
- package/bundled-skills/logic-review/SKILL.md +8 -0
- package/bundled-skills/longbridge/SKILL.md +8 -4
- package/bundled-skills/longbridge-content/SKILL.md +3 -0
- package/bundled-skills/longbridge-content/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/longbridge-content/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/longbridge-content/references/filing.md +48 -0
- package/bundled-skills/longbridge-content/references/news.md +118 -0
- package/bundled-skills/longbridge-content/references/regulatory-kb.md +128 -0
- package/bundled-skills/longbridge-content/references/sec-filings.md +113 -0
- package/bundled-skills/longbridge-content/references/topic.md +53 -0
- package/bundled-skills/longbridge-fundamentals/SKILL.md +3 -0
- package/bundled-skills/longbridge-fundamentals/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/longbridge-fundamentals/UPSTREAM-NOTICE.md +31 -0
- package/bundled-skills/longbridge-fundamentals/references/behavioral-finance.md +108 -0
- package/bundled-skills/longbridge-fundamentals/references/business-segments.md +50 -0
- package/bundled-skills/longbridge-fundamentals/references/company.md +39 -0
- package/bundled-skills/longbridge-fundamentals/references/compare.md +49 -0
- package/bundled-skills/longbridge-fundamentals/references/corp-action.md +42 -0
- package/bundled-skills/longbridge-fundamentals/references/corporate-events.md +89 -0
- package/bundled-skills/longbridge-fundamentals/references/corporate.md +64 -0
- package/bundled-skills/longbridge-fundamentals/references/dcf.md +103 -0
- package/bundled-skills/longbridge-fundamentals/references/dividend.md +51 -0
- package/bundled-skills/longbridge-fundamentals/references/executive.md +39 -0
- package/bundled-skills/longbridge-fundamentals/references/financial-report.md +88 -0
- package/bundled-skills/longbridge-fundamentals/references/financial-statement.md +49 -0
- package/bundled-skills/longbridge-fundamentals/references/industry-valuation.md +86 -0
- package/bundled-skills/longbridge-fundamentals/references/invest-relation.md +39 -0
- package/bundled-skills/longbridge-fundamentals/references/main-business-analysis.md +654 -0
- package/bundled-skills/longbridge-fundamentals/references/operating.md +42 -0
- package/bundled-skills/longbridge-fundamentals/references/smallcap-growth.md +72 -0
- package/bundled-skills/longbridge-fundamentals/references/valuation-methodology.md +86 -0
- package/bundled-skills/longbridge-fundamentals/references/valuation-rank.md +57 -0
- package/bundled-skills/longbridge-fundamentals/references/valuation.md +86 -0
- package/bundled-skills/longbridge-fundamentals/references/value-screen.md +71 -0
- package/bundled-skills/longbridge-market-data/SKILL.md +3 -0
- package/bundled-skills/longbridge-market-data/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/longbridge-market-data/UPSTREAM-NOTICE.md +28 -0
- package/bundled-skills/longbridge-market-data/references/adr-premium.md +63 -0
- package/bundled-skills/longbridge-market-data/references/ah-premium.md +67 -0
- package/bundled-skills/longbridge-market-data/references/capital.md +48 -0
- package/bundled-skills/longbridge-market-data/references/depth.md +40 -0
- package/bundled-skills/longbridge-market-data/references/exchange-rate.md +35 -0
- package/bundled-skills/longbridge-market-data/references/fx-carry.md +59 -0
- package/bundled-skills/longbridge-market-data/references/intraday.md +47 -0
- package/bundled-skills/longbridge-market-data/references/ipo.md +48 -0
- package/bundled-skills/longbridge-market-data/references/kline.md +62 -0
- package/bundled-skills/longbridge-market-data/references/market-status.md +35 -0
- package/bundled-skills/longbridge-market-data/references/market-temp.md +53 -0
- package/bundled-skills/longbridge-market-data/references/participants.md +35 -0
- package/bundled-skills/longbridge-market-data/references/quote.md +78 -0
- package/bundled-skills/longbridge-market-data/references/security-list.md +36 -0
- package/bundled-skills/longbridge-market-data/references/subscriptions.md +23 -0
- package/bundled-skills/longbridge-market-data/references/trade-stats.md +39 -0
- package/bundled-skills/longbridge-market-data/references/trades.md +44 -0
- package/bundled-skills/longbridge-market-data/references/trading.md +40 -0
- package/bundled-skills/loss-aversion-designer/SKILL.md +15 -7
- package/bundled-skills/m365-agents-dotnet/SKILL.md +8 -0
- package/bundled-skills/m365-agents-py/SKILL.md +8 -0
- package/bundled-skills/m365-agents-ts/SKILL.md +8 -0
- package/bundled-skills/machine-learning-ops-ml-pipeline/SKILL.md +0 -1
- package/bundled-skills/macos-screen-recorder/SKILL.md +5 -1
- package/bundled-skills/magic-animator/SKILL.md +4 -2
- package/bundled-skills/magic-ui-generator/SKILL.md +7 -5
- package/bundled-skills/makepad-animation/SKILL.md +8 -0
- package/bundled-skills/makepad-basics/SKILL.md +9 -0
- package/bundled-skills/makepad-deployment/SKILL.md +18 -0
- package/bundled-skills/makepad-dsl/SKILL.md +9 -0
- package/bundled-skills/makepad-event-action/SKILL.md +9 -0
- package/bundled-skills/makepad-font/SKILL.md +8 -0
- package/bundled-skills/makepad-layout/SKILL.md +9 -0
- package/bundled-skills/makepad-platform/SKILL.md +8 -0
- package/bundled-skills/makepad-reference/SKILL.md +5 -3
- package/bundled-skills/makepad-shaders/SKILL.md +9 -0
- package/bundled-skills/makepad-skills/SKILL.md +11 -5
- package/bundled-skills/makepad-splash/SKILL.md +8 -0
- package/bundled-skills/makepad-widgets/SKILL.md +10 -0
- package/bundled-skills/manifest/SKILL.md +20 -113
- package/bundled-skills/markdown-rendering/SKILL.md +3 -3
- package/bundled-skills/market-sizing-analysis/SKILL.md +13 -24
- package/bundled-skills/market-sizing-analysis/examples/saas-market-sizing.md +20 -337
- package/bundled-skills/market-sizing-analysis/references/data-sources.md +10 -22
- package/bundled-skills/markstream-angular/SKILL.md +3 -1
- package/bundled-skills/markstream-nuxt/SKILL.md +3 -1
- package/bundled-skills/markstream-react/SKILL.md +5 -1
- package/bundled-skills/markstream-svelte/SKILL.md +3 -1
- package/bundled-skills/markstream-vue/SKILL.md +3 -1
- package/bundled-skills/markstream-vue2/SKILL.md +5 -1
- package/bundled-skills/markstream-vue2-cli/SKILL.md +5 -1
- package/bundled-skills/markstream-vue2-vite/SKILL.md +5 -1
- package/bundled-skills/matplotlib/SKILL.md +5 -0
- package/bundled-skills/matplotlib/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/matplotlib/UPSTREAM-NOTICE.md +16 -0
- package/bundled-skills/matplotlib/references/api_reference.md +412 -0
- package/bundled-skills/matplotlib/references/common_issues.md +563 -0
- package/bundled-skills/matplotlib/references/plot_types.md +476 -0
- package/bundled-skills/matplotlib/references/styling_guide.md +589 -0
- package/bundled-skills/matplotlib/scripts/plot_template.py +401 -0
- package/bundled-skills/matplotlib/scripts/style_configurator.py +412 -0
- package/bundled-skills/mcp-server-security/SKILL.md +17 -11
- package/bundled-skills/mcp-server-security/references/details.md +51 -90
- package/bundled-skills/memory-forensics/SKILL.md +0 -1
- package/bundled-skills/mermaid-expert/SKILL.md +5 -4
- package/bundled-skills/minecraft-bukkit-pro/SKILL.md +0 -1
- package/bundled-skills/mirrord/SKILL.md +5 -3
- package/bundled-skills/ml-engineer/SKILL.md +0 -1
- package/bundled-skills/ml-pipeline-workflow/SKILL.md +10 -1
- package/bundled-skills/mlops-engineer/SKILL.md +0 -1
- package/bundled-skills/mobile-security-coder/SKILL.md +0 -1
- package/bundled-skills/monopoly/SKILL.md +12 -0
- package/bundled-skills/monopoly/security-checklist/SKILL.md +9 -7
- package/bundled-skills/monorepo-architect/SKILL.md +5 -4
- package/bundled-skills/monte-carlo-analyze-root-cause/SKILL.md +4 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/UPSTREAM-LICENSE.txt +201 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/UPSTREAM-NOTICE.md +19 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/references/common-root-causes.md +79 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/references/data-exploration.md +149 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/references/etl-failure-investigation.md +67 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/references/field-anomaly-investigation.md +107 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/references/freshness-investigation.md +67 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/references/intake-no-incident.md +67 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/references/query-change-investigation.md +55 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/references/schema-investigation.md +48 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/references/volume-investigation.md +53 -0
- package/bundled-skills/monte-carlo-asset-health/SKILL.md +4 -0
- package/bundled-skills/monte-carlo-asset-health/UPSTREAM-LICENSE.txt +201 -0
- package/bundled-skills/monte-carlo-asset-health/UPSTREAM-NOTICE.md +12 -0
- package/bundled-skills/monte-carlo-asset-health/references/parameters.md +111 -0
- package/bundled-skills/monte-carlo-asset-health/references/workflows.md +132 -0
- package/bundled-skills/monte-carlo-monitoring-advisor/SKILL.md +3 -0
- package/bundled-skills/monte-carlo-monitoring-advisor/UPSTREAM-LICENSE.txt +201 -0
- package/bundled-skills/monte-carlo-monitoring-advisor/UPSTREAM-NOTICE.md +12 -0
- package/bundled-skills/monte-carlo-monitoring-advisor/references/agent-monitor-creation.md +471 -0
- package/bundled-skills/monte-carlo-monitoring-advisor/references/data-monitor-creation.md +272 -0
- package/bundled-skills/monte-carlo-performance-diagnosis/SKILL.md +3 -0
- package/bundled-skills/monte-carlo-performance-diagnosis/UPSTREAM-LICENSE.txt +201 -0
- package/bundled-skills/monte-carlo-performance-diagnosis/UPSTREAM-NOTICE.md +12 -0
- package/bundled-skills/monte-carlo-performance-diagnosis/references/investigation-tiers.md +110 -0
- package/bundled-skills/monte-carlo-performance-diagnosis/references/query-analysis.md +50 -0
- package/bundled-skills/monte-carlo-remediation/SKILL.md +3 -0
- package/bundled-skills/monte-carlo-remediation/UPSTREAM-LICENSE.txt +201 -0
- package/bundled-skills/monte-carlo-remediation/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/monte-carlo-remediation/references/patterns.md +295 -0
- package/bundled-skills/monte-carlo-remediation/references/safety.md +160 -0
- package/bundled-skills/monte-carlo-remediation/references/tool-discovery.md +172 -0
- package/bundled-skills/monte-carlo-storage-cost-analysis/SKILL.md +3 -0
- package/bundled-skills/monte-carlo-storage-cost-analysis/UPSTREAM-LICENSE.txt +201 -0
- package/bundled-skills/monte-carlo-storage-cost-analysis/UPSTREAM-NOTICE.md +11 -0
- package/bundled-skills/monte-carlo-storage-cost-analysis/references/output-structure.md +93 -0
- package/bundled-skills/mtls-configuration/SKILL.md +0 -1
- package/bundled-skills/multi-cloud-architecture/SKILL.md +3 -1
- package/bundled-skills/multi-cloud-architecture/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/multi-cloud-architecture/UPSTREAM-NOTICE.md +12 -0
- package/bundled-skills/multi-cloud-architecture/references/multi-cloud-patterns.md +26 -0
- package/bundled-skills/multi-cloud-architecture/references/service-comparison.md +35 -0
- package/bundled-skills/nanobanana-ppt-skills/SKILL.md +13 -4
- package/bundled-skills/native-data-fetching/references/detailed-guide.md +42 -23
- package/bundled-skills/native-data-fetching/references/expo-router-loaders.md +36 -29
- package/bundled-skills/nerdzao-elite/SKILL.md +9 -5
- package/bundled-skills/nerdzao-elite-gemini-high/SKILL.md +7 -3
- package/bundled-skills/network-engineer/SKILL.md +0 -1
- package/bundled-skills/networkx/SKILL.md +3 -0
- package/bundled-skills/networkx/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/networkx/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/networkx/references/algorithms.md +383 -0
- package/bundled-skills/networkx/references/generators.md +378 -0
- package/bundled-skills/networkx/references/graph-basics.md +283 -0
- package/bundled-skills/networkx/references/io.md +441 -0
- package/bundled-skills/networkx/references/visualization.md +529 -0
- package/bundled-skills/new-rails-project/SKILL.md +4 -2
- package/bundled-skills/news-sentiment-engine/SKILL.md +13 -28
- package/bundled-skills/nft-standards/SKILL.md +15 -1
- package/bundled-skills/nsfw-ai-spicyapi/SKILL.md +8 -0
- package/bundled-skills/nx-workspace-patterns/SKILL.md +0 -1
- package/bundled-skills/objection-preemptor/SKILL.md +15 -7
- package/bundled-skills/observability-monitoring-monitor-setup/SKILL.md +1 -1
- package/bundled-skills/obsidian-cli/SKILL.md +4 -2
- package/bundled-skills/odoo-module-developer/SKILL.md +4 -1
- package/bundled-skills/odoo-orm-expert/SKILL.md +4 -2
- package/bundled-skills/odw/SKILL.md +8 -0
- package/bundled-skills/offensive-osint/SKILL.md +76 -70
- package/bundled-skills/offensive-osint/UPSTREAM-LICENSE.txt +395 -0
- package/bundled-skills/offensive-osint/UPSTREAM-NOTICE.md +26 -0
- package/bundled-skills/offensive-osint/references/breach-and-credentials.md +130 -0
- package/bundled-skills/offensive-osint/references/dork-corpus.md +182 -0
- package/bundled-skills/offensive-osint/references/helpers-and-automation.md +266 -0
- package/bundled-skills/offensive-osint/references/identity-fabric.md +309 -0
- package/bundled-skills/offensive-osint/references/people-osint.md +107 -0
- package/bundled-skills/offensive-osint/references/probes-and-wordlists.md +1269 -0
- package/bundled-skills/offensive-osint/references/recon-stack.md +284 -0
- package/bundled-skills/offensive-osint/references/recon-techniques.md +343 -0
- package/bundled-skills/offensive-osint/references/saas-public-surfaces.md +140 -0
- package/bundled-skills/offensive-osint/references/secret-patterns.md +71 -0
- package/bundled-skills/offensive-osint/references/secret-validators.md +334 -0
- package/bundled-skills/offensive-osint/references/sector-notes.md +74 -0
- package/bundled-skills/offensive-osint/references/severity-matrix.md +112 -0
- package/bundled-skills/offensive-osint/references/specialized-osint.md +204 -0
- package/bundled-skills/offensive-osint/references/tooling-install.md +190 -0
- package/bundled-skills/offers/SKILL.md +1 -1
- package/bundled-skills/omp-delegate/SKILL.md +5 -1
- package/bundled-skills/omp-delegate/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/omp-delegate/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/omp-delegate/scripts/relay.mjs +823 -0
- package/bundled-skills/on-call-handoff-patterns/SKILL.md +2 -2
- package/bundled-skills/onboarding/SKILL.md +1 -1
- package/bundled-skills/onboarding-cro/SKILL.md +1 -1
- package/bundled-skills/open-source-marketing/SKILL.md +1 -1
- package/bundled-skills/opencode-delegate/SKILL.md +5 -1
- package/bundled-skills/opencode-delegate/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/opencode-delegate/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/opencode-delegate/scripts/relay.mjs +781 -0
- package/bundled-skills/page-cro/SKILL.md +14 -110
- package/bundled-skills/payment-integration/SKILL.md +0 -1
- package/bundled-skills/paypal-integration/SKILL.md +3 -1
- package/bundled-skills/pentest-tools/src-hunter/SKILL.md +8 -0
- package/bundled-skills/performance-engineer/SKILL.md +1 -1
- package/bundled-skills/performance-optimization/SKILL.md +8 -0
- package/bundled-skills/performance-testing-review-ai-review/SKILL.md +8 -1
- package/bundled-skills/performance-testing-review-multi-agent-review/SKILL.md +1 -1
- package/bundled-skills/php-pro/SKILL.md +0 -1
- package/bundled-skills/pi-delegate/SKILL.md +5 -1
- package/bundled-skills/pi-delegate/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/pi-delegate/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/pi-delegate/scripts/relay.mjs +822 -0
- package/bundled-skills/pitch-psychologist/SKILL.md +18 -10
- package/bundled-skills/planning-and-task-breakdown/SKILL.md +8 -0
- package/bundled-skills/playwright-java/SKILL.md +14 -0
- package/bundled-skills/podcast-generation/SKILL.md +3 -0
- package/bundled-skills/podcast-generation/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/podcast-generation/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/podcast-generation/references/architecture.md +87 -0
- package/bundled-skills/podcast-generation/references/code-examples.md +189 -0
- package/bundled-skills/podcast-generation/scripts/pcm_to_wav.py +73 -0
- package/bundled-skills/polars/SKILL.md +3 -0
- package/bundled-skills/polars/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/polars/UPSTREAM-NOTICE.md +16 -0
- package/bundled-skills/polars/references/best_practices.md +649 -0
- package/bundled-skills/polars/references/core_concepts.md +378 -0
- package/bundled-skills/polars/references/io_guide.md +557 -0
- package/bundled-skills/polars/references/operations.md +602 -0
- package/bundled-skills/polars/references/pandas_migration.md +417 -0
- package/bundled-skills/polars/references/transformations.md +549 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/SKILL.md +3 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/UPSTREAM-NOTICE.md +18 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/references/amendments.md +146 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/references/protocol-spec.md +506 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/references/routing.md +227 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/references/templates.md +438 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/references/troubleshooting.md +216 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/scripts/init_polis.py +559 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/scripts/route_contract.py +19 -0
- package/bundled-skills/polis-protocol-a-self-optimizing-city-of-agents/templates/POLIS_CONSTITUTION.md +293 -0
- package/bundled-skills/posix-shell-pro/SKILL.md +0 -1
- package/bundled-skills/power-user-cultivation/SKILL.md +1 -1
- package/bundled-skills/presentation-deck/SKILL.md +4 -4
- package/bundled-skills/presentation-deck/references/related-skills.md +1 -1
- package/bundled-skills/price-psychology-strategist/SKILL.md +16 -8
- package/bundled-skills/pricing/SKILL.md +1 -1
- package/bundled-skills/product-marketing/SKILL.md +1 -1
- package/bundled-skills/prometheus-configuration/SKILL.md +11 -1
- package/bundled-skills/prompt-engineering-patterns/SKILL.md +0 -1
- package/bundled-skills/public-relations/SKILL.md +1 -1
- package/bundled-skills/pubmed-database/SKILL.md +10 -0
- package/bundled-skills/pypict-skill/SKILL.md +18 -5
- package/bundled-skills/python-testing-patterns/resources/implementation-playbook.md +7 -2
- package/bundled-skills/qiskit/SKILL.md +3 -0
- package/bundled-skills/qiskit/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/qiskit/UPSTREAM-NOTICE.md +18 -0
- package/bundled-skills/qiskit/references/algorithms.md +607 -0
- package/bundled-skills/qiskit/references/backends.md +433 -0
- package/bundled-skills/qiskit/references/circuits.md +197 -0
- package/bundled-skills/qiskit/references/patterns.md +533 -0
- package/bundled-skills/qiskit/references/primitives.md +277 -0
- package/bundled-skills/qiskit/references/setup.md +99 -0
- package/bundled-skills/qiskit/references/transpilation.md +286 -0
- package/bundled-skills/qiskit/references/visualization.md +415 -0
- package/bundled-skills/qoder-delegate/SKILL.md +5 -1
- package/bundled-skills/qoder-delegate/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/qoder-delegate/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/qoder-delegate/scripts/relay.mjs +698 -0
- package/bundled-skills/quant-analyst/SKILL.md +0 -1
- package/bundled-skills/radare2/SKILL.md +9 -0
- package/bundled-skills/react-flow-node-ts/SKILL.md +3 -0
- package/bundled-skills/react-flow-node-ts/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/react-flow-node-ts/UPSTREAM-NOTICE.md +12 -0
- package/bundled-skills/react-flow-node-ts/assets/template.tsx +108 -0
- package/bundled-skills/react-flow-node-ts/assets/types.template.ts +34 -0
- package/bundled-skills/react-state-management/SKILL.md +0 -1
- package/bundled-skills/read-all-adrs/SKILL.md +3 -4
- package/bundled-skills/recsys-pipeline-architect/SKILL.md +8 -0
- package/bundled-skills/reference-builder/SKILL.md +0 -1
- package/bundled-skills/risk-manager/SKILL.md +0 -1
- package/bundled-skills/robius-app-architecture/SKILL.md +10 -0
- package/bundled-skills/robius-event-action/SKILL.md +10 -0
- package/bundled-skills/robius-matrix-integration/SKILL.md +10 -0
- package/bundled-skills/robius-state-management/SKILL.md +10 -0
- package/bundled-skills/robius-widget-patterns/SKILL.md +10 -0
- package/bundled-skills/ruby-pro/SKILL.md +0 -1
- package/bundled-skills/scala-pro/SKILL.md +0 -1
- package/bundled-skills/scanpy/SKILL.md +3 -0
- package/bundled-skills/scanpy/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/scanpy/UPSTREAM-NOTICE.md +15 -0
- package/bundled-skills/scanpy/assets/analysis_template.py +295 -0
- package/bundled-skills/scanpy/references/api_reference.md +251 -0
- package/bundled-skills/scanpy/references/plotting_guide.md +352 -0
- package/bundled-skills/scanpy/references/standard_workflow.md +206 -0
- package/bundled-skills/scanpy/scripts/qc_analysis.py +200 -0
- package/bundled-skills/scarcity-urgency-psychologist/SKILL.md +15 -7
- package/bundled-skills/score-eval/SKILL.md +29 -18
- package/bundled-skills/search-specialist/SKILL.md +0 -1
- package/bundled-skills/security-bluebook-builder/SKILL.md +9 -1
- package/bundled-skills/security-compliance-compliance-check/resources/implementation-playbook.md +46 -177
- package/bundled-skills/security-requirement-extraction/resources/implementation-playbook.md +8 -6
- package/bundled-skills/senior-fullstack/SKILL.md +24 -200
- package/bundled-skills/senior-fullstack/references/architecture_patterns.md +4 -100
- package/bundled-skills/senior-fullstack/references/development_workflows.md +4 -100
- package/bundled-skills/senior-fullstack/references/tech_stack_guide.md +4 -100
- package/bundled-skills/senior-fullstack/scripts/code_quality_analyzer.py +5 -13
- package/bundled-skills/senior-fullstack/scripts/fullstack_scaffolder.py +5 -13
- package/bundled-skills/senior-fullstack/scripts/project_scaffolder.py +5 -13
- package/bundled-skills/seo-authority-builder/SKILL.md +0 -1
- package/bundled-skills/seo-cannibalization-detector/SKILL.md +6 -2
- package/bundled-skills/seo-content/SKILL.md +8 -0
- package/bundled-skills/seo-content-auditor/SKILL.md +3 -1
- package/bundled-skills/seo-directory-backlinks/SKILL.md +8 -0
- package/bundled-skills/seo-image-gen/SKILL.md +14 -0
- package/bundled-skills/seo-keyword-strategist/SKILL.md +0 -1
- package/bundled-skills/seo-meta-optimizer/SKILL.md +0 -1
- package/bundled-skills/seo-schema/SKILL.md +8 -0
- package/bundled-skills/seo-snippet-hunter/SKILL.md +0 -1
- package/bundled-skills/seo-structure-architect/SKILL.md +6 -2
- package/bundled-skills/sequence-psychologist/SKILL.md +15 -7
- package/bundled-skills/service-mesh-expert/SKILL.md +0 -1
- package/bundled-skills/service-mesh-observability/SKILL.md +0 -1
- package/bundled-skills/sharp-edges/SKILL.md +3 -0
- package/bundled-skills/sharp-edges/UPSTREAM-LICENSE.txt +427 -0
- package/bundled-skills/sharp-edges/UPSTREAM-NOTICE.md +26 -0
- package/bundled-skills/sharp-edges/references/auth-patterns.md +252 -0
- package/bundled-skills/sharp-edges/references/case-studies.md +274 -0
- package/bundled-skills/sharp-edges/references/config-patterns.md +333 -0
- package/bundled-skills/sharp-edges/references/crypto-apis.md +190 -0
- package/bundled-skills/sharp-edges/references/lang-c.md +205 -0
- package/bundled-skills/sharp-edges/references/lang-csharp.md +285 -0
- package/bundled-skills/sharp-edges/references/lang-go.md +270 -0
- package/bundled-skills/sharp-edges/references/lang-java.md +263 -0
- package/bundled-skills/sharp-edges/references/lang-javascript.md +269 -0
- package/bundled-skills/sharp-edges/references/lang-kotlin.md +265 -0
- package/bundled-skills/sharp-edges/references/lang-php.md +245 -0
- package/bundled-skills/sharp-edges/references/lang-python.md +274 -0
- package/bundled-skills/sharp-edges/references/lang-ruby.md +273 -0
- package/bundled-skills/sharp-edges/references/lang-rust.md +272 -0
- package/bundled-skills/sharp-edges/references/lang-swift.md +287 -0
- package/bundled-skills/sharp-edges/references/language-specific.md +588 -0
- package/bundled-skills/shellcheck-configuration/SKILL.md +0 -1
- package/bundled-skills/shipping-and-launch/SKILL.md +11 -0
- package/bundled-skills/skill-scanner/SKILL.md +23 -14
- package/bundled-skills/skill-scanner/UPSTREAM-LICENSE.txt +190 -0
- package/bundled-skills/skill-scanner/UPSTREAM-NOTICE.md +14 -0
- package/bundled-skills/skill-scanner/references/dangerous-code-patterns.md +194 -0
- package/bundled-skills/skill-scanner/references/permission-analysis.md +93 -0
- package/bundled-skills/skill-scanner/references/prompt-injection-patterns.md +157 -0
- package/bundled-skills/skill-scanner/scripts/scan_skill.py +800 -0
- package/bundled-skills/skill-seekers/SKILL.md +16 -20
- package/bundled-skills/slideops/SKILL.md +3 -0
- package/bundled-skills/slideops/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/slideops/UPSTREAM-NOTICE.md +16 -0
- package/bundled-skills/slideops/assets/template.html +536 -0
- package/bundled-skills/slideops/references/automation.md +185 -0
- package/bundled-skills/slideops/references/diagrams.md +92 -0
- package/bundled-skills/slideops/references/verification.md +124 -0
- package/bundled-skills/slideops/scripts/check.py +501 -0
- package/bundled-skills/slideops/scripts/cite.py +143 -0
- package/bundled-skills/social-proof-architect/SKILL.md +16 -8
- package/bundled-skills/spark-optimization/SKILL.md +0 -1
- package/bundled-skills/speckit-updater/SKILL.md +7 -0
- package/bundled-skills/speed/SKILL.md +16 -14
- package/bundled-skills/sred-project-organizer/SKILL.md +7 -0
- package/bundled-skills/startup-analyst/SKILL.md +0 -1
- package/bundled-skills/startup-business-analyst-business-case/SKILL.md +0 -1
- package/bundled-skills/startup-business-analyst-financial-projections/SKILL.md +0 -1
- package/bundled-skills/startup-business-analyst-market-opportunity/SKILL.md +0 -1
- package/bundled-skills/startup-financial-modeling/SKILL.md +16 -25
- package/bundled-skills/subject-line-psychologist/SKILL.md +15 -7
- package/bundled-skills/superpowers-lab/SKILL.md +15 -20
- package/bundled-skills/supply-chain-security/SKILL.md +6 -14
- package/bundled-skills/supply-chain-security/references/cicd-pipeline-security.md +3 -39
- package/bundled-skills/swiftui-ui-patterns/SKILL.md +4 -0
- package/bundled-skills/swiftui-ui-patterns/references/async-state.md +14 -8
- package/bundled-skills/swiftui-ui-patterns/references/controls.md +1 -1
- package/bundled-skills/swiftui-ui-patterns/references/form.md +22 -4
- package/bundled-skills/swiftui-ui-patterns/references/lightweight-clients.md +3 -3
- package/bundled-skills/swiftui-ui-patterns/references/list.md +2 -2
- package/bundled-skills/swiftui-ui-patterns/references/matched-transitions.md +3 -1
- package/bundled-skills/swiftui-ui-patterns/references/media.md +3 -0
- package/bundled-skills/swiftui-ui-patterns/references/overlay.md +8 -3
- package/bundled-skills/swiftui-ui-patterns/references/performance.md +2 -5
- package/bundled-skills/swiftui-ui-patterns/references/scroll-reveal.md +3 -1
- package/bundled-skills/swiftui-ui-patterns/references/searchable.md +23 -7
- package/bundled-skills/swiftui-ui-patterns/references/sheets.md +16 -10
- package/bundled-skills/swiftui-ui-patterns/references/split-views.md +4 -1
- package/bundled-skills/systematic-debugging/condition-based-waiting-example.ts +30 -144
- package/bundled-skills/systematic-debugging/condition-based-waiting.md +1 -1
- package/bundled-skills/tdd-orchestrator/SKILL.md +0 -1
- package/bundled-skills/team-composition-analysis/SKILL.md +9 -1
- package/bundled-skills/technical-tutorials/SKILL.md +1 -1
- package/bundled-skills/temporal-python-pro/SKILL.md +0 -1
- package/bundled-skills/temporal-python-testing/SKILL.md +0 -1
- package/bundled-skills/terraform-module-library/SKILL.md +11 -1
- package/bundled-skills/test-automator/SKILL.md +0 -1
- package/bundled-skills/testing-patterns/SKILL.md +6 -6
- package/bundled-skills/trust-calibrator/SKILL.md +15 -7
- package/bundled-skills/tune-monitor/SKILL.md +3 -0
- package/bundled-skills/tune-monitor/UPSTREAM-LICENSE.txt +201 -0
- package/bundled-skills/tune-monitor/UPSTREAM-NOTICE.md +14 -0
- package/bundled-skills/tune-monitor/references/custom-sql-monitor.md +112 -0
- package/bundled-skills/tune-monitor/references/metric-monitor.md +118 -0
- package/bundled-skills/tune-monitor/references/table-monitor.md +138 -0
- package/bundled-skills/tune-monitor/references/validation-monitor.md +132 -0
- package/bundled-skills/turborepo-caching/SKILL.md +0 -1
- package/bundled-skills/tutorial-engineer/SKILL.md +0 -1
- package/bundled-skills/typescript-expert/SKILL.md +10 -8
- package/bundled-skills/typescript-expert/scripts/ts_diagnostic.py +48 -15
- package/bundled-skills/ui-ux-designer/SKILL.md +0 -1
- package/bundled-skills/ui-visual-validator/SKILL.md +0 -1
- package/bundled-skills/uniprot-database/SKILL.md +8 -0
- package/bundled-skills/unity-developer/SKILL.md +0 -1
- package/bundled-skills/usage-based-pricing/SKILL.md +1 -1
- package/bundled-skills/using-agent-skills/SKILL.md +4 -1
- package/bundled-skills/using-agent-skills/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/using-agent-skills/UPSTREAM-NOTICE.md +11 -0
- package/bundled-skills/using-agent-skills/references/definition-of-done.md +67 -0
- package/bundled-skills/using-neon/SKILL.md +21 -0
- package/bundled-skills/ux-persuasion-engineer/SKILL.md +15 -7
- package/bundled-skills/variant-analysis/SKILL.md +10 -0
- package/bundled-skills/vexor-cli/SKILL.md +8 -0
- package/bundled-skills/vibe-delegate/SKILL.md +5 -1
- package/bundled-skills/vibe-delegate/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/vibe-delegate/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/vibe-delegate/scripts/relay.mjs +773 -0
- package/bundled-skills/video-content-extractor/SKILL.md +8 -0
- package/bundled-skills/visual-emotion-engineer/SKILL.md +16 -8
- package/bundled-skills/warp-delegate/SKILL.md +5 -1
- package/bundled-skills/warp-delegate/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/warp-delegate/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/warp-delegate/scripts/relay.mjs +837 -0
- package/bundled-skills/wcag-audit-patterns/resources/implementation-playbook.md +14 -33
- package/bundled-skills/web-performance-optimization/SKILL.md +15 -15
- package/bundled-skills/web-performance-optimization/references/detailed-guide.md +12 -7
- package/bundled-skills/web3-testing/SKILL.md +16 -1
- package/bundled-skills/workflow-orchestration-patterns/SKILL.md +1 -2
- package/bundled-skills/zcode-delegate/SKILL.md +11 -3
- package/bundled-skills/zcode-delegate/UPSTREAM-LICENSE.txt +21 -0
- package/bundled-skills/zcode-delegate/UPSTREAM-NOTICE.md +13 -0
- package/bundled-skills/zcode-delegate/references/dispatch-and-poll.md +4 -4
- package/bundled-skills/zcode-delegate/scripts/relay.mjs +1043 -0
- package/package.json +1 -1
- package/skills_index.json +168 -154
- package/bundled-skills/api-security-testing/SKILL.md +0 -176
|
@@ -0,0 +1,1043 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* delegate-skills · zcode-delegate · relay.mjs
|
|
4
|
+
*
|
|
5
|
+
* Dispatch a self-contained brief to the Z.AI ZCode CLI, capture the run, and
|
|
6
|
+
* write a structured result the orchestrating agent can review. The
|
|
7
|
+
* orchestrator runs this one command and reads the result JSON — every
|
|
8
|
+
* ZCode-specific mechanic lives in here, which keeps the skill
|
|
9
|
+
* orchestrator-agnostic. Verified on Claude Code; other shell-capable agents
|
|
10
|
+
* (OpenCode, Cursor, …) are designed-for but not yet verified.
|
|
11
|
+
*
|
|
12
|
+
* Trust posture: relay.mjs itself makes no network calls, reads or writes no
|
|
13
|
+
* credentials, and sends no telemetry; it has no dependencies (Node built-ins
|
|
14
|
+
* only). It shells out only to `zcode` (or `node <bundle>`) and `git`. The
|
|
15
|
+
* ZCode process it launches does authenticate — exactly as you do at the
|
|
16
|
+
* terminal. Read this file before you run it.
|
|
17
|
+
*
|
|
18
|
+
* It deliberately does NOT commit. Committing is always the orchestrator's
|
|
19
|
+
* job — after it reviews the diff and re-runs the project gates.
|
|
20
|
+
*
|
|
21
|
+
* Finding the CLI: ZCode ships its CLI inside the desktop app rather than on
|
|
22
|
+
* PATH or npm, so the relay resolves it as --zcode-path/ZCODE_CLI → PATH → the
|
|
23
|
+
* installed app bundle, and records which route won in result.json.
|
|
24
|
+
*
|
|
25
|
+
* Usage:
|
|
26
|
+
* node relay.mjs --brief <file> [options]
|
|
27
|
+
* cat brief.txt | node relay.mjs [options]
|
|
28
|
+
*
|
|
29
|
+
* Options:
|
|
30
|
+
* --brief <file> Path to the brief. If omitted, the brief is read from stdin.
|
|
31
|
+
* --cd <dir> Working root for ZCode (default: current directory).
|
|
32
|
+
* --lane <name> Fleet lane from delegate-setup config (dials apply; explicit flags win).
|
|
33
|
+
* --mode <mode> ZCode's own --mode. Only `plan` and `yolo` are accepted
|
|
34
|
+
* (default: yolo). ZCode also documents `build` and `edit`,
|
|
35
|
+
* but a headless run has no permission client, so those two
|
|
36
|
+
* block every write tool and exit 0 having changed nothing;
|
|
37
|
+
* this relay rejects them rather than report that as success.
|
|
38
|
+
* --read-only Shortcut for --mode plan (review/diagnosis, no edits).
|
|
39
|
+
* --disallowed-tools <l> Comma/space-separated tool denylist, e.g. "Write,Edit,Bash".
|
|
40
|
+
* Enforced by ZCode. There is no --allowed-tools counterpart.
|
|
41
|
+
* --resume-last Continue the latest ZCode session for --cd; send only the
|
|
42
|
+
* delta brief. Scoped to the directory, not a global "last".
|
|
43
|
+
* --session <id> Continue a specific ZCode session by its sess_... id (from a
|
|
44
|
+
* prior result.json). Mutually exclusive with --resume-last.
|
|
45
|
+
* --zcode-path <file> Path to the ZCode CLI (a Node bundle or native executable; no shell shims).
|
|
46
|
+
* Overrides PATH and bundle discovery; ZCODE_CLI does the same.
|
|
47
|
+
* --timeout <dur> Relay-side watchdog (default: off). Durations use h/m/s
|
|
48
|
+
* strings like 30m or 2h. On expiry the ZCode child is killed
|
|
49
|
+
* and result.json gets status "timeout". ZCode has no timeout
|
|
50
|
+
* flag of its own, so the watchdog is relay-only.
|
|
51
|
+
* --out-dir <dir> Where to write run artifacts (default: a fresh dir under
|
|
52
|
+
* the system temp dir, so the repo under review stays clean).
|
|
53
|
+
* -h, --help Show this help.
|
|
54
|
+
*
|
|
55
|
+
* Brief delivery: ZCode reads no stdin, so the brief is written to brief.md in
|
|
56
|
+
* the run directory and passed with ZCode's own --attach. That also keeps the
|
|
57
|
+
* brief clear of the command line, which is bounded on Windows.
|
|
58
|
+
*
|
|
59
|
+
* Result: written to <out-dir>/result.json and summarized on stdout —
|
|
60
|
+
* status, exitCode, signal, zcodeVersion, zcodeSource, mode, sessionId (for a later
|
|
61
|
+
* resume), finalMessage (ZCode's own report), touchedFiles (git porcelain, null if git
|
|
62
|
+
* can't report), readOnlyViolation, usage, contextWindow, and the paths to the raw
|
|
63
|
+
* output and final.txt.
|
|
64
|
+
*
|
|
65
|
+
* Exit codes: a pre-run usage error (bad/missing args, empty brief, a rejected
|
|
66
|
+
* --mode) exits 2 before any run and writes no result file; a ZCode CLI that
|
|
67
|
+
* cannot be found — including one named explicitly that does not exist — exits
|
|
68
|
+
* 127 and DOES write one; otherwise the exit code mirrors ZCode's own (0
|
|
69
|
+
* success, non-zero failure). If the child dies on a signal, the exit code is
|
|
70
|
+
* 128 plus the signal number and `result.json` records the signal.
|
|
71
|
+
* Once the brief validates, `result.json` is written on every outcome —
|
|
72
|
+
* completed, failed, timeout (the --timeout watchdog fired), aborted (the relay
|
|
73
|
+
* itself was killed and forwarded the kill to ZCode), or zcode_unavailable. An
|
|
74
|
+
* orchestrator that polls for the file must therefore also treat a non-zero exit
|
|
75
|
+
* with no file as a usage error.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
import {spawn, execFileSync, spawnSync } from "node:child_process";
|
|
79
|
+
import { mkdtempSync, mkdirSync, writeFileSync, renameSync, readFileSync, readdirSync, existsSync, appendFileSync, statSync, readlinkSync, lstatSync, openSync, readSync, closeSync, realpathSync } from "node:fs";
|
|
80
|
+
import {join, resolve, basename, dirname, sep, isAbsolute, relative } from "node:path";
|
|
81
|
+
import { fileURLToPath } from "node:url";
|
|
82
|
+
import { constants, tmpdir, homedir } from "node:os";
|
|
83
|
+
import { StringDecoder } from "node:string_decoder";
|
|
84
|
+
import { createHash } from "node:crypto";
|
|
85
|
+
|
|
86
|
+
const VERSION_PROBE_TIMEOUT_MS = 10_000;
|
|
87
|
+
const MAX_BUFFERED_CHARS = 1_048_576;
|
|
88
|
+
const MAX_TIMER_MS = 2_147_483_647;
|
|
89
|
+
const SCHEMA = "delegate-relay.result.v1";
|
|
90
|
+
// ZCode's own --mode. build/edit are documented by the CLI but omitted here: a
|
|
91
|
+
// headless run has no permission client, so they block every write tool and exit
|
|
92
|
+
// 0 having changed nothing. Reporting that as "completed" is the failure mode
|
|
93
|
+
// this repo already hit once (issue #55), so they are rejected up front instead.
|
|
94
|
+
const ZCODE_MODES = new Set(["plan", "yolo"]);
|
|
95
|
+
const ZCODE_REJECTED_MODES = new Set(["build", "edit"]);
|
|
96
|
+
// Keep ZCode session ids within the documented sess_ token shape.
|
|
97
|
+
const SAFE_SESSION = /^sess_[A-Za-z0-9][A-Za-z0-9._:-]*$/;
|
|
98
|
+
// ZCode accepts comma- or space-separated tool names, optionally with a pattern.
|
|
99
|
+
const SAFE_TOOLS = /^[A-Za-z0-9][A-Za-z0-9 ,.:*()_/-]*$/;
|
|
100
|
+
|
|
101
|
+
// ZCode reads no stdin, so the brief travels as an attached file and the prompt
|
|
102
|
+
// is this fixed instruction. Keep the two in lockstep with writing-the-brief.md.
|
|
103
|
+
const ATTACH_PROMPT = "Follow the attached brief exactly.";
|
|
104
|
+
const BUNDLE_RELATIVE = ["resources", "glm", "zcode.cjs"];
|
|
105
|
+
|
|
106
|
+
const IMPLEMENTER_KEY = "zcode";
|
|
107
|
+
|
|
108
|
+
function applyFleetLane(opts, flagged) {
|
|
109
|
+
if (!opts.lane) return;
|
|
110
|
+
const script = join(dirname(fileURLToPath(import.meta.url)), "../../delegate-setup/scripts/lane.mjs");
|
|
111
|
+
if (!existsSync(script)) {
|
|
112
|
+
fail("--lane requires the delegate-setup skill installed beside this relay");
|
|
113
|
+
}
|
|
114
|
+
const r = spawnSync(
|
|
115
|
+
process.execPath,
|
|
116
|
+
[script, "resolve", "--cwd", opts.cd, "--lane", opts.lane, "--implementer", IMPLEMENTER_KEY],
|
|
117
|
+
{ encoding: "utf8", env: process.env },
|
|
118
|
+
);
|
|
119
|
+
if (r.error) fail(`lane resolve failed: ${r.error.message}`);
|
|
120
|
+
if (r.status !== 0) {
|
|
121
|
+
fail((r.stderr || "lane resolve failed").trim().replace(/^lane\.mjs:\s*/, ""));
|
|
122
|
+
}
|
|
123
|
+
let resolved;
|
|
124
|
+
try {
|
|
125
|
+
const lines = (r.stdout || "").trim().split("\n").filter(Boolean);
|
|
126
|
+
resolved = JSON.parse(lines[lines.length - 1]);
|
|
127
|
+
} catch {
|
|
128
|
+
fail("lane resolve returned invalid JSON");
|
|
129
|
+
}
|
|
130
|
+
opts.laneSource = resolved.source;
|
|
131
|
+
for (const [field, value] of Object.entries(resolved.dials || {})) {
|
|
132
|
+
if (flagged.has(field)) continue;
|
|
133
|
+
if (field === "autonomy" && (flagged.has("autonomy") || flagged.has("sandbox") || flagged.has("readOnly"))) continue;
|
|
134
|
+
if (field === "agent" && (flagged.has("agent") || flagged.has("readOnly"))) continue;
|
|
135
|
+
if (field === "sandbox" && (flagged.has("sandbox") || flagged.has("readOnly"))) continue;
|
|
136
|
+
if (field === "permissionMode" && (flagged.has("permissionMode") || flagged.has("readOnly"))) continue;
|
|
137
|
+
if (field === "planOnly" && (flagged.has("planOnly") || flagged.has("readOnly"))) continue;
|
|
138
|
+
if (field === "readOnly" && (flagged.has("readOnly") || flagged.has("mode"))) continue;
|
|
139
|
+
if (field === "force" && flagged.has("force")) continue;
|
|
140
|
+
opts[field] = value;
|
|
141
|
+
if (field === "sandbox") opts.sandboxConfigured = true;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function fail(message, code = 2) {
|
|
146
|
+
process.stderr.write(`relay: ${message}\n`);
|
|
147
|
+
process.exit(code);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function parseArgs(argv) {
|
|
151
|
+
const flagged = new Set();
|
|
152
|
+
const opts = {
|
|
153
|
+
lane: null,
|
|
154
|
+
laneSource: null,
|
|
155
|
+
brief: null,
|
|
156
|
+
cd: process.cwd(),
|
|
157
|
+
mode: null,
|
|
158
|
+
readOnly: false,
|
|
159
|
+
disallowedTools: null,
|
|
160
|
+
resumeLast: false,
|
|
161
|
+
session: null,
|
|
162
|
+
zcodePath: null,
|
|
163
|
+
timeout: null,
|
|
164
|
+
outDir: null,
|
|
165
|
+
};
|
|
166
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
167
|
+
const arg = argv[i];
|
|
168
|
+
const next = () => {
|
|
169
|
+
const value = argv[i + 1];
|
|
170
|
+
if (value === undefined) fail(`${arg} requires a value`);
|
|
171
|
+
i += 1;
|
|
172
|
+
return value;
|
|
173
|
+
};
|
|
174
|
+
switch (arg) {
|
|
175
|
+
case "-h":
|
|
176
|
+
case "--help":
|
|
177
|
+
process.stdout.write(headerComment());
|
|
178
|
+
process.exit(0);
|
|
179
|
+
break;
|
|
180
|
+
case "--brief": opts.brief = next(); break;
|
|
181
|
+
case "--cd": opts.cd = resolve(next()); break;
|
|
182
|
+
case "--lane": opts.lane = next(); break;
|
|
183
|
+
case "--mode": opts.mode = next(); flagged.add("mode"); flagged.add("permissionMode"); break;
|
|
184
|
+
case "--read-only": opts.readOnly = true; flagged.add("readOnly"); break;
|
|
185
|
+
case "--disallowed-tools": opts.disallowedTools = next(); flagged.add("disallowedTools"); break;
|
|
186
|
+
case "--resume-last": opts.resumeLast = true; break;
|
|
187
|
+
case "--session": opts.session = next(); break;
|
|
188
|
+
case "--zcode-path": opts.zcodePath = resolve(next()); break;
|
|
189
|
+
case "--timeout": opts.timeout = next(); flagged.add("timeout"); break;
|
|
190
|
+
case "--out-dir": opts.outDir = resolve(next()); break;
|
|
191
|
+
default:
|
|
192
|
+
fail(`unknown option: ${arg}`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
applyFleetLane(opts, flagged);
|
|
196
|
+
// delegate-setup carries ZCode's --mode as the `permissionMode` dial, so accept
|
|
197
|
+
// either name from a lane without inventing a second dial vocabulary.
|
|
198
|
+
if (opts.mode === null && typeof opts.permissionMode === "string") opts.mode = opts.permissionMode;
|
|
199
|
+
if (opts.readOnly && opts.mode !== null && opts.mode !== "plan") {
|
|
200
|
+
fail(`--read-only conflicts with --mode ${opts.mode}; read-only runs use ZCode's plan mode`);
|
|
201
|
+
}
|
|
202
|
+
if (opts.mode === null) opts.mode = opts.readOnly ? "plan" : "yolo";
|
|
203
|
+
if (ZCODE_REJECTED_MODES.has(opts.mode)) {
|
|
204
|
+
fail(`--mode ${opts.mode} cannot write in a headless run: ZCode has no permission client there, so its write tools are blocked and the run exits 0 having changed nothing. Use --mode yolo to write, or --read-only for plan mode.`);
|
|
205
|
+
}
|
|
206
|
+
if (!ZCODE_MODES.has(opts.mode)) {
|
|
207
|
+
fail(`invalid --mode "${opts.mode}" (expected: ${[...ZCODE_MODES].join(", ")})`);
|
|
208
|
+
}
|
|
209
|
+
opts.readOnly = opts.mode === "plan";
|
|
210
|
+
if (opts.disallowedTools !== null && !SAFE_TOOLS.test(opts.disallowedTools)) {
|
|
211
|
+
fail("--disallowed-tools contains unsupported characters (allowed: letters, digits, spaces, and , . : * ( ) _ / -)");
|
|
212
|
+
}
|
|
213
|
+
// The watchdog is relay-only (ZCode has no timeout flag), so a malformed
|
|
214
|
+
// --timeout must fail loudly here - a silent no-watchdog fallback would be wrong.
|
|
215
|
+
if (opts.timeout !== null && parseDuration(opts.timeout) === null) {
|
|
216
|
+
fail(`--timeout "${opts.timeout}" is invalid or too long; use a positive h/m/s duration no longer than about 24 days`);
|
|
217
|
+
}
|
|
218
|
+
if (opts.session !== null && opts.resumeLast) {
|
|
219
|
+
fail("--session and --resume-last are mutually exclusive; pass only one");
|
|
220
|
+
}
|
|
221
|
+
// Accept only the sess_ token shape ZCode itself issues.
|
|
222
|
+
if (opts.session !== null && !SAFE_SESSION.test(opts.session)) {
|
|
223
|
+
fail("--session must be a ZCode session id of the form sess_... (letters, digits, . _ : -)");
|
|
224
|
+
}
|
|
225
|
+
return opts;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function parseDuration(duration) {
|
|
229
|
+
const match = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(duration);
|
|
230
|
+
if (!match || (!match[1] && !match[2] && !match[3])) return null;
|
|
231
|
+
try {
|
|
232
|
+
const seconds =
|
|
233
|
+
BigInt(match[1] || 0) * 3600n +
|
|
234
|
+
BigInt(match[2] || 0) * 60n +
|
|
235
|
+
BigInt(match[3] || 0);
|
|
236
|
+
const milliseconds = seconds * 1000n;
|
|
237
|
+
if (milliseconds <= 0n || milliseconds > BigInt(MAX_TIMER_MS)) return null;
|
|
238
|
+
return Number(milliseconds);
|
|
239
|
+
} catch {
|
|
240
|
+
return null;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function killChild(child, signal = "SIGTERM") {
|
|
245
|
+
if (!child || !child.pid) return;
|
|
246
|
+
if (process.platform === "win32") {
|
|
247
|
+
if (signal !== "SIGTERM") return;
|
|
248
|
+
try {
|
|
249
|
+
execFileSync("taskkill", ["/pid", String(child.pid), "/t", "/f"], {
|
|
250
|
+
stdio: ["ignore", "ignore", "inherit"],
|
|
251
|
+
});
|
|
252
|
+
} catch {
|
|
253
|
+
// The process tree already exited.
|
|
254
|
+
}
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
try {
|
|
258
|
+
process.kill(-child.pid, signal);
|
|
259
|
+
} catch {
|
|
260
|
+
try {
|
|
261
|
+
child.kill(signal);
|
|
262
|
+
} catch {
|
|
263
|
+
// The process group already exited.
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function headerComment() {
|
|
269
|
+
// The leading block comment doubles as --help text.
|
|
270
|
+
const src = readFileSync(new URL(import.meta.url), "utf8");
|
|
271
|
+
const match = src.match(/\/\*\*([\s\S]*?)\*\//);
|
|
272
|
+
if (!match) return "relay.mjs — dispatch a brief to the ZCode CLI\n";
|
|
273
|
+
return match[1].replace(/^\s*\* ?/gm, "").trim() + "\n";
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function readBrief(opts) {
|
|
277
|
+
if (opts.brief) {
|
|
278
|
+
if (!existsSync(opts.brief)) fail(`brief file not found: ${opts.brief}`);
|
|
279
|
+
return readFileSync(opts.brief, "utf8");
|
|
280
|
+
}
|
|
281
|
+
// No --brief: read from stdin (fd 0). Empty stdin is an error.
|
|
282
|
+
if (process.stdin.isTTY) {
|
|
283
|
+
fail("no --brief given and stdin is a TTY; pass --brief <file> or pipe the brief on stdin");
|
|
284
|
+
}
|
|
285
|
+
let stdin = "";
|
|
286
|
+
try {
|
|
287
|
+
stdin = readFileSync(0, "utf8");
|
|
288
|
+
} catch {
|
|
289
|
+
stdin = "";
|
|
290
|
+
}
|
|
291
|
+
return stdin;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function versionProbeTimeout(opts) {
|
|
295
|
+
// The watchdog is only armed once ZCode is running, so the preflight needs a bound of
|
|
296
|
+
// its own: a `zcode --version` that never returns would wedge the relay here, before
|
|
297
|
+
// any result.json exists, and --timeout could not reach it.
|
|
298
|
+
const timeoutMs = opts.timeout === null ? null : parseDuration(opts.timeout);
|
|
299
|
+
return timeoutMs === null ? VERSION_PROBE_TIMEOUT_MS : Math.min(timeoutMs, VERSION_PROBE_TIMEOUT_MS);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/** Walk PATH for a bare binary name, honouring PATHEXT on win32. */
|
|
303
|
+
function onPath(binary) {
|
|
304
|
+
const pathValue = process.env.PATH || process.env.Path || "";
|
|
305
|
+
if (!pathValue) return null;
|
|
306
|
+
const entries = pathValue
|
|
307
|
+
.split(process.platform === "win32" ? ";" : ":")
|
|
308
|
+
.map((entry) => entry.replace(/^"(.*)"$/, "$1"))
|
|
309
|
+
.filter((entry) => entry.length > 0);
|
|
310
|
+
const suffixes = process.platform === "win32"
|
|
311
|
+
? (process.env.PATHEXT || ".COM;.EXE;.BAT;.CMD").split(";").map((ext) => ext.trim()).filter(Boolean)
|
|
312
|
+
: [""];
|
|
313
|
+
for (const entry of entries) {
|
|
314
|
+
for (const suffix of suffixes) {
|
|
315
|
+
const candidate = join(resolve(entry), `${binary}${suffix}`);
|
|
316
|
+
try {
|
|
317
|
+
if (statSync(candidate).isFile()) return candidate;
|
|
318
|
+
} catch {
|
|
319
|
+
// keep looking
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/** Where the ZCode desktop app keeps its bundled CLI, per platform. */
|
|
327
|
+
function bundleCandidates() {
|
|
328
|
+
const home = homedir();
|
|
329
|
+
if (process.platform === "win32") {
|
|
330
|
+
const local = process.env.LOCALAPPDATA || join(home, "AppData", "Local");
|
|
331
|
+
return [join(local, "Programs", "ZCode", ...BUNDLE_RELATIVE)];
|
|
332
|
+
}
|
|
333
|
+
if (process.platform === "darwin") {
|
|
334
|
+
return [
|
|
335
|
+
join("/Applications", "ZCode.app", "Contents", "Resources", "glm", "zcode.cjs"),
|
|
336
|
+
join(home, "Applications", "ZCode.app", "Contents", "Resources", "glm", "zcode.cjs"),
|
|
337
|
+
];
|
|
338
|
+
}
|
|
339
|
+
// Linux ships an AppImage with no fixed install path, so there is nothing
|
|
340
|
+
// honest to guess: --zcode-path or ZCODE_CLI is required there.
|
|
341
|
+
return [];
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function asTarget(file, source) {
|
|
345
|
+
// The bundled CLI is a Node bundle, not an executable, so it runs under node
|
|
346
|
+
// and needs no shell. A binary or a .cmd/.bat shim launches as itself.
|
|
347
|
+
return /\.(?:c?js|mjs)$/i.test(file)
|
|
348
|
+
? { command: process.execPath, prefixArgs: [file], display: file, source }
|
|
349
|
+
: { command: file, prefixArgs: [], display: file, source };
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Resolve the ZCode CLI: --zcode-path/ZCODE_CLI → PATH → installed app bundle.
|
|
354
|
+
* Returns null when none is found, which the caller reports as
|
|
355
|
+
* zcode_unavailable (127 WITH a result file) — never a usage error. A CLI named
|
|
356
|
+
* explicitly that does not exist is the same condition as finding none, so it
|
|
357
|
+
* takes the same path rather than exiting 2.
|
|
358
|
+
*/
|
|
359
|
+
function resolveZcode(opts) {
|
|
360
|
+
const named = opts.zcodePath || (process.env.ZCODE_CLI || "").trim();
|
|
361
|
+
if (named) {
|
|
362
|
+
if (!existsSync(named)) return null;
|
|
363
|
+
return asTarget(resolve(named), opts.zcodePath ? "flag" : "env");
|
|
364
|
+
}
|
|
365
|
+
const fromPath = onPath("zcode");
|
|
366
|
+
if (fromPath) return asTarget(fromPath, "path");
|
|
367
|
+
for (const candidate of bundleCandidates()) {
|
|
368
|
+
if (existsSync(candidate)) return asTarget(candidate, "bundle");
|
|
369
|
+
}
|
|
370
|
+
return null;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/** Shell shims are never interpreted; callers must choose a reviewed CLI entry. */
|
|
374
|
+
export function assertDirectExecutable(command) {
|
|
375
|
+
if (/\.(?:cmd|bat)$/i.test(command)) {
|
|
376
|
+
const error = new Error("Shell shims (.cmd/.bat) are unsupported; select the reviewed ZCode Node CLI entry (.cjs/.mjs/.js) or native executable with --zcode-path");
|
|
377
|
+
error.code = "UNSUPPORTED_SHELL_SHIM";
|
|
378
|
+
throw error;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
function zcodeVersion(target, probeTimeoutMs) {
|
|
383
|
+
try {
|
|
384
|
+
// Refuse shell shims before version probing as well as runtime dispatch.
|
|
385
|
+
assertDirectExecutable(target.command);
|
|
386
|
+
const options = {
|
|
387
|
+
encoding: "utf8",
|
|
388
|
+
shell: false,
|
|
389
|
+
timeout: probeTimeoutMs,
|
|
390
|
+
killSignal: "SIGKILL",
|
|
391
|
+
env: process.env,
|
|
392
|
+
};
|
|
393
|
+
const version = execFileSync(target.command, [...target.prefixArgs, "--version"], options).trim();
|
|
394
|
+
return { version: version || "unknown", error: null };
|
|
395
|
+
} catch (error) {
|
|
396
|
+
if (error?.code === "ENOENT") return { version: null, error: null };
|
|
397
|
+
// Anything else — a hung probe we killed, or a real non-zero exit — means ZCode is
|
|
398
|
+
// installed but not usable. Reporting that as "unavailable" would send the caller
|
|
399
|
+
// off to reinstall a CLI that is already there.
|
|
400
|
+
return { version: null, error };
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
const FINGERPRINT_UNREADABLE = "<unreadable>";
|
|
405
|
+
const FINGERPRINT_DIRECTORY = "<directory>";
|
|
406
|
+
|
|
407
|
+
function gitRepoRoot(cwd) {
|
|
408
|
+
// Porcelain paths are relative to the repository ROOT, not to the directory git ran in
|
|
409
|
+
// (--porcelain forces status.relativePaths off). Joining them against a --cd that is a
|
|
410
|
+
// subdirectory would look for <repo>/src/src/file and find nothing at either end.
|
|
411
|
+
try {
|
|
412
|
+
return execFileSync("git", ["rev-parse", "--show-toplevel"], {
|
|
413
|
+
cwd,
|
|
414
|
+
encoding: "utf8",
|
|
415
|
+
timeout: 10_000,
|
|
416
|
+
killSignal: "SIGKILL",
|
|
417
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
418
|
+
}).replace(/\n$/, "") || null;
|
|
419
|
+
} catch {
|
|
420
|
+
return null;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
function gitStatusEntries(cwd) {
|
|
425
|
+
// -z so a path containing a space, a quote, or a newline stays one field rather than being
|
|
426
|
+
// quoted and escaped; -uall so an untracked directory is expanded into its files, because a
|
|
427
|
+
// collapsed "?? dir/" line never changes when a file inside it does.
|
|
428
|
+
try {
|
|
429
|
+
const output = execFileSync("git", ["status", "--porcelain", "-z", "-uall"], {
|
|
430
|
+
cwd,
|
|
431
|
+
timeout: 10_000,
|
|
432
|
+
killSignal: "SIGKILL",
|
|
433
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
434
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
435
|
+
});
|
|
436
|
+
const fields = new TextDecoder("utf-8", { fatal: true }).decode(output)
|
|
437
|
+
.split("\0").filter((field) => field.length > 0);
|
|
438
|
+
const entries = [];
|
|
439
|
+
for (let i = 0; i < fields.length; i += 1) {
|
|
440
|
+
const entry = fields[i];
|
|
441
|
+
const status = entry.slice(0, 2);
|
|
442
|
+
const path = entry.slice(3);
|
|
443
|
+
// R and C can sit in EITHER status column, and under -z such an entry is followed by its
|
|
444
|
+
// origin path as its own unprefixed field. Consume that field in both cases. A rename
|
|
445
|
+
// origin belongs in the dirty set (the file moved away from it); a copy origin does not,
|
|
446
|
+
// since a copy source can be a perfectly clean file.
|
|
447
|
+
const renamed = status.includes("R");
|
|
448
|
+
const copied = status.includes("C");
|
|
449
|
+
let origin = null;
|
|
450
|
+
if (renamed || copied) {
|
|
451
|
+
i += 1;
|
|
452
|
+
origin = fields[i] ?? null;
|
|
453
|
+
}
|
|
454
|
+
entries.push({ status, path, origin });
|
|
455
|
+
}
|
|
456
|
+
return entries;
|
|
457
|
+
} catch {
|
|
458
|
+
return null;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
function dirtyPaths(cwd) {
|
|
463
|
+
const entries = gitStatusEntries(cwd);
|
|
464
|
+
if (entries === null) return null;
|
|
465
|
+
const paths = [];
|
|
466
|
+
for (const entry of entries) {
|
|
467
|
+
paths.push(entry.path);
|
|
468
|
+
if (entry.status.includes("R") && entry.origin !== null) paths.push(entry.origin);
|
|
469
|
+
}
|
|
470
|
+
return paths;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
function asciiFold(value) {
|
|
474
|
+
return value.replace(/[A-Z]/g, (letter) => letter.toLowerCase());
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
function canonicalFilePath(path) {
|
|
478
|
+
const absolute = resolve(path);
|
|
479
|
+
let parent;
|
|
480
|
+
try { parent = realpathSync.native(dirname(absolute)); } catch { return absolute; }
|
|
481
|
+
const leaf = basename(absolute);
|
|
482
|
+
const canonical = join(parent, leaf);
|
|
483
|
+
try { lstatSync(canonical); } catch { return canonical; }
|
|
484
|
+
try {
|
|
485
|
+
const entries = readdirSync(parent);
|
|
486
|
+
if (entries.includes(leaf)) return canonical;
|
|
487
|
+
const matches = entries.filter((entry) => asciiFold(entry) === asciiFold(leaf));
|
|
488
|
+
return join(parent, matches.length === 1 ? matches[0] : leaf);
|
|
489
|
+
} catch {
|
|
490
|
+
return canonical;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
function gitPathKey(root, path) {
|
|
495
|
+
let canonicalRoot;
|
|
496
|
+
try { canonicalRoot = realpathSync.native(root); } catch { canonicalRoot = resolve(root); }
|
|
497
|
+
const key = relative(canonicalRoot, canonicalFilePath(path));
|
|
498
|
+
return process.platform === "win32" ? key.replaceAll("\\", "/") : key;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
function gitPathIsExcluded(root, path, excluded, foldedExcluded) {
|
|
502
|
+
return excluded.has(path) ||
|
|
503
|
+
(foldedExcluded.has(asciiFold(path)) && excluded.has(gitPathKey(root, join(root, path))));
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
function gitTripwireState(cwd, excludedPaths) {
|
|
507
|
+
const root = gitRepoRoot(cwd);
|
|
508
|
+
if (root === null) return null;
|
|
509
|
+
const entries = gitStatusEntries(cwd);
|
|
510
|
+
if (entries === null) return null;
|
|
511
|
+
const excluded = new Set(excludedPaths.map((path) => gitPathKey(root, path)));
|
|
512
|
+
const foldedExcluded = new Set([...excluded].map(asciiFold));
|
|
513
|
+
return entries.flatMap((entry) => [
|
|
514
|
+
[entry.status, "path", entry.path],
|
|
515
|
+
...(entry.origin === null ? [] : [[entry.status.replace(/[^RC]/g, " "), "origin", entry.origin]]),
|
|
516
|
+
]
|
|
517
|
+
.filter(([, , path]) => !gitPathIsExcluded(root, path, excluded, foldedExcluded)));
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
function pathFingerprint(absolutePath) {
|
|
521
|
+
// Identity, not just bytes: a retargeted symlink, a flipped mode bit, or a file replaced by a
|
|
522
|
+
// directory are all writes, and none of them change file contents.
|
|
523
|
+
let stats;
|
|
524
|
+
try {
|
|
525
|
+
stats = lstatSync(absolutePath);
|
|
526
|
+
} catch (error) {
|
|
527
|
+
// Absence is a state, not a failure - it differs from every real fingerprint, so a deletion
|
|
528
|
+
// or a re-creation still registers. Any other errno means we genuinely cannot tell.
|
|
529
|
+
return error && error.code === "ENOENT" ? "absent" : FINGERPRINT_UNREADABLE;
|
|
530
|
+
}
|
|
531
|
+
if (stats.isSymbolicLink()) {
|
|
532
|
+
try {
|
|
533
|
+
return `symlink:${readlinkSync(absolutePath, { encoding: "buffer" }).toString("hex")}`;
|
|
534
|
+
} catch {
|
|
535
|
+
return FINGERPRINT_UNREADABLE;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
// A directory in the dirty set is a submodule, whose contents belong to another repository.
|
|
539
|
+
// Reported as unknown coverage rather than silently passed off as unchanged.
|
|
540
|
+
if (stats.isDirectory()) return FINGERPRINT_DIRECTORY;
|
|
541
|
+
if (!stats.isFile()) return FINGERPRINT_UNREADABLE;
|
|
542
|
+
let fd;
|
|
543
|
+
try {
|
|
544
|
+
// Streamed rather than read whole: an unignored multi-gigabyte artifact must not be pulled
|
|
545
|
+
// into memory just to answer whether it changed.
|
|
546
|
+
const hash = createHash("sha256");
|
|
547
|
+
fd = openSync(absolutePath, "r");
|
|
548
|
+
const buffer = Buffer.allocUnsafe(64 * 1024);
|
|
549
|
+
for (;;) {
|
|
550
|
+
const read = readSync(fd, buffer, 0, buffer.length, null);
|
|
551
|
+
if (read <= 0) break;
|
|
552
|
+
hash.update(buffer.subarray(0, read));
|
|
553
|
+
}
|
|
554
|
+
return `file:${(stats.mode & 0o7777).toString(8)}:${hash.digest("hex")}`;
|
|
555
|
+
} catch {
|
|
556
|
+
return FINGERPRINT_UNREADABLE;
|
|
557
|
+
} finally {
|
|
558
|
+
if (fd !== undefined) {
|
|
559
|
+
try { closeSync(fd); } catch { /* already closed */ }
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
function gitIndexFingerprints(root, paths) {
|
|
565
|
+
if (paths.length === 0) return new Map();
|
|
566
|
+
try {
|
|
567
|
+
const output = execFileSync("git", ["ls-files", "--stage", "-z"], {
|
|
568
|
+
cwd: root,
|
|
569
|
+
timeout: 10_000,
|
|
570
|
+
killSignal: "SIGKILL",
|
|
571
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
572
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
573
|
+
});
|
|
574
|
+
const wanted = new Set(paths);
|
|
575
|
+
const prints = new Map(paths.map((path) => [path, []]));
|
|
576
|
+
for (const field of new TextDecoder("utf-8", { fatal: true }).decode(output).split("\0")) {
|
|
577
|
+
if (!field) continue;
|
|
578
|
+
const separator = field.indexOf("\t");
|
|
579
|
+
if (separator === -1) return null;
|
|
580
|
+
const path = field.slice(separator + 1);
|
|
581
|
+
if (wanted.has(path)) prints.get(path).push(field.slice(0, separator));
|
|
582
|
+
}
|
|
583
|
+
return prints;
|
|
584
|
+
} catch {
|
|
585
|
+
return null;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
function fingerprintPaths(root, paths) {
|
|
590
|
+
// `complete` goes false the moment one path cannot be fingerprinted, so the caller reports
|
|
591
|
+
// "unknown" instead of an unearned clean bill of health.
|
|
592
|
+
const indexPrints = gitIndexFingerprints(root, paths);
|
|
593
|
+
const prints = new Map();
|
|
594
|
+
let complete = indexPrints !== null;
|
|
595
|
+
for (const path of paths) {
|
|
596
|
+
const file = pathFingerprint(join(root, path));
|
|
597
|
+
if (file === FINGERPRINT_UNREADABLE || file === FINGERPRINT_DIRECTORY) complete = false;
|
|
598
|
+
prints.set(path, { file, index: indexPrints?.get(path) ?? null });
|
|
599
|
+
}
|
|
600
|
+
return { prints, complete };
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
function fingerprintDirtyPaths(cwd, excludedPaths) {
|
|
604
|
+
// Only the already-dirty set is covered. A path that is clean at dispatch and gets written
|
|
605
|
+
// surfaces as a brand-new porcelain line anyway, and fingerprinting a whole repository per run
|
|
606
|
+
// would cost far more than the case it covers.
|
|
607
|
+
const root = gitRepoRoot(cwd);
|
|
608
|
+
if (root === null) return null;
|
|
609
|
+
const paths = dirtyPaths(cwd);
|
|
610
|
+
if (paths === null) return null;
|
|
611
|
+
const excluded = new Set(excludedPaths.map((path) => gitPathKey(root, path)));
|
|
612
|
+
const foldedExcluded = new Set([...excluded].map(asciiFold));
|
|
613
|
+
return {
|
|
614
|
+
root,
|
|
615
|
+
...fingerprintPaths(root, paths.filter((path) => !gitPathIsExcluded(root, path, excluded, foldedExcluded))),
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
function changedDirtyPaths(before) {
|
|
620
|
+
// Re-fingerprint exactly the baseline paths, not whatever happens to be dirty now: a path the
|
|
621
|
+
// run newly dirtied is already reported by the porcelain comparison, and letting an unreadable
|
|
622
|
+
// one of those blind this signal would be a regression, not caution.
|
|
623
|
+
if (!before) return { changed: [], complete: false };
|
|
624
|
+
const now = fingerprintPaths(before.root, [...before.prints.keys()]);
|
|
625
|
+
const changed = [];
|
|
626
|
+
for (const [path, print] of before.prints) {
|
|
627
|
+
const current = now.prints.get(path);
|
|
628
|
+
const fileKnown = print.file !== FINGERPRINT_UNREADABLE && current.file !== FINGERPRINT_UNREADABLE;
|
|
629
|
+
const fileChanged = fileKnown &&
|
|
630
|
+
!(print.file === FINGERPRINT_DIRECTORY && current.file === FINGERPRINT_DIRECTORY) &&
|
|
631
|
+
current.file !== print.file;
|
|
632
|
+
const indexChanged = print.index !== null && current.index !== null &&
|
|
633
|
+
JSON.stringify(current.index) !== JSON.stringify(print.index);
|
|
634
|
+
if (fileChanged || indexChanged) changed.push(path);
|
|
635
|
+
}
|
|
636
|
+
return { changed: changed.sort(), complete: before.complete && now.complete };
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
function readOnlyVerdict(beforeTree, afterTree, beforeFingerprints) {
|
|
640
|
+
// Three-valued on purpose. Proof of a write settles it even when the other signal is unknown;
|
|
641
|
+
// only when nothing is proven AND coverage is incomplete is the answer genuinely unknown.
|
|
642
|
+
// Collapsing that last case to false is the false assurance a tripwire must never give.
|
|
643
|
+
const changed = changedDirtyPaths(beforeFingerprints);
|
|
644
|
+
const porcelainMoved =
|
|
645
|
+
beforeTree !== null && afterTree !== null && JSON.stringify(beforeTree) !== JSON.stringify(afterTree);
|
|
646
|
+
if (porcelainMoved || changed.changed.length > 0) return true;
|
|
647
|
+
if (beforeTree === null || afterTree === null || !changed.complete) return null;
|
|
648
|
+
return false;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
function gitTouchedFiles(cwd) {
|
|
652
|
+
try {
|
|
653
|
+
const output = execFileSync("git", ["status", "--porcelain"], {
|
|
654
|
+
cwd,
|
|
655
|
+
encoding: "utf8",
|
|
656
|
+
timeout: 10_000,
|
|
657
|
+
killSignal: "SIGKILL",
|
|
658
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
659
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
660
|
+
});
|
|
661
|
+
return output.split("\n").map((line) => line.trimEnd()).filter(Boolean);
|
|
662
|
+
} catch {
|
|
663
|
+
return null;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function timestamp() {
|
|
668
|
+
// Local script (not a workflow): Date is available and fine here.
|
|
669
|
+
return new Date().toISOString().replace(/[:.]/g, "-");
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
function buildArgv(opts, target, briefPath) {
|
|
673
|
+
// Keep logical argv raw; quote and validate exactly once at the shim boundary.
|
|
674
|
+
const quote = (value) => value; // Quote exactly once at the shim invocation boundary.
|
|
675
|
+
const argv = ["--cwd", quote(opts.cd), "--json", "--no-color", "--mode", opts.mode];
|
|
676
|
+
if (opts.disallowedTools) argv.push("--disallowed-tools", quote(opts.disallowedTools));
|
|
677
|
+
// ZCode's own resume terms: --resume takes a sess_ id, -c continues the latest
|
|
678
|
+
// session for --cwd (directory-scoped, not a global "last").
|
|
679
|
+
if (opts.session) argv.push("--resume", opts.session);
|
|
680
|
+
else if (opts.resumeLast) argv.push("-c");
|
|
681
|
+
// The brief is a file, not prompt text: ZCode reads no stdin, and argv is
|
|
682
|
+
// bounded on Windows. --prompt carries only the fixed instruction.
|
|
683
|
+
argv.push("--attach", quote(briefPath), "--prompt", quote(ATTACH_PROMPT));
|
|
684
|
+
return argv;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* ZCode's --json prints ONE JSON document at the end, not a stream of events —
|
|
689
|
+
* but stdout is not guaranteed to be pure JSON: the bundled AI SDK emits its
|
|
690
|
+
* warning banner through console.info, which is stdout, ahead of the document.
|
|
691
|
+
* So skip to the first brace rather than parsing the whole buffer. Returns null
|
|
692
|
+
* when nothing parses, which the caller reports rather than hides.
|
|
693
|
+
*/
|
|
694
|
+
function parseZcodeOutput(stdout) {
|
|
695
|
+
const start = stdout.indexOf("{");
|
|
696
|
+
if (start === -1) return null;
|
|
697
|
+
try {
|
|
698
|
+
const parsed = JSON.parse(stdout.slice(start));
|
|
699
|
+
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
|
|
700
|
+
} catch {
|
|
701
|
+
return null;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
function prepareRunDir(opts, brief) {
|
|
706
|
+
const startedAt = new Date().toISOString();
|
|
707
|
+
// Default the run dir to system temp so the repo under review stays pristine —
|
|
708
|
+
// the touched-files report must show only ZCode's edits, not relay's artifacts.
|
|
709
|
+
const outDir = opts.outDir || mkdtempSync(join(tmpdir(), "delegate-relay-"));
|
|
710
|
+
if (opts.outDir) {
|
|
711
|
+
if (existsSync(outDir) || (() => { try { return lstatSync(outDir).isSymbolicLink(); } catch { return false; } })()) fail("--out-dir must be a new path; existing artifacts are preserved");
|
|
712
|
+
mkdirSync(outDir, { recursive: true, mode: 0o700 });
|
|
713
|
+
}
|
|
714
|
+
const run = {
|
|
715
|
+
startedAt,
|
|
716
|
+
outputPath: join(outDir, "output.json"),
|
|
717
|
+
finalPath: join(outDir, "final.txt"),
|
|
718
|
+
// .md, and attached rather than piped: ZCode reads no stdin.
|
|
719
|
+
briefPath: join(outDir, "brief.md"),
|
|
720
|
+
resultPath: join(outDir, "result.json"),
|
|
721
|
+
};
|
|
722
|
+
writeFileSync(run.briefPath, brief, { encoding: "utf8", mode: 0o600, flag: "wx" });
|
|
723
|
+
return run;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
function makeResultWriter(opts, version, run, target) {
|
|
727
|
+
// Returns writeResult(extra): merges the per-outcome fields onto the run's
|
|
728
|
+
// standing metadata, persists result.json, and returns the object it just
|
|
729
|
+
// wrote so the caller can hand it straight to printSummary.
|
|
730
|
+
return (extra) => {
|
|
731
|
+
const result = {
|
|
732
|
+
schema: SCHEMA,
|
|
733
|
+
lane: opts.lane,
|
|
734
|
+
laneSource: opts.laneSource,
|
|
735
|
+
workdir: opts.cd,
|
|
736
|
+
mode: opts.mode,
|
|
737
|
+
readOnly: opts.readOnly,
|
|
738
|
+
disallowedTools: opts.disallowedTools,
|
|
739
|
+
resumeLast: opts.resumeLast,
|
|
740
|
+
session: opts.session,
|
|
741
|
+
zcodeVersion: version,
|
|
742
|
+
zcodeSource: target ? target.source : null,
|
|
743
|
+
zcodePath: target ? target.display : null,
|
|
744
|
+
startedAt: run.startedAt,
|
|
745
|
+
finishedAt: new Date().toISOString(),
|
|
746
|
+
briefPath: run.briefPath,
|
|
747
|
+
outputPath: existsSync(run.outputPath) ? run.outputPath : null,
|
|
748
|
+
finalPath: existsSync(run.finalPath) ? run.finalPath : null,
|
|
749
|
+
...extra,
|
|
750
|
+
};
|
|
751
|
+
// Publish atomically so a polling orchestrator never reads a half-written file
|
|
752
|
+
// (same idiom as claude-delegate's writeJsonAtomic and qoder-delegate).
|
|
753
|
+
const temporary = `${run.resultPath}.${process.pid}.tmp`;
|
|
754
|
+
writeFileSync(temporary, `${JSON.stringify(result, null, 2)}\n`, "utf8");
|
|
755
|
+
renameSync(temporary, run.resultPath);
|
|
756
|
+
return result;
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
function reportUnavailable(writeResult, resultPath) {
|
|
761
|
+
const result = writeResult({ status: "zcode_unavailable", exitCode: 127, signal: null, sessionId: null, finalMessage: "", touchedFiles: null, readOnlyViolation: null, usage: null, contextWindow: null });
|
|
762
|
+
printSummary(result, resultPath);
|
|
763
|
+
process.stderr.write("relay: no ZCode CLI found. ZCode ships its CLI inside the desktop app, so point at it with --zcode-path <file> or ZCODE_CLI, put a `zcode` shim on PATH, or install the ZCode desktop app.\n");
|
|
764
|
+
process.exit(127);
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
function reportVersionFailure(opts, writeResult, run, error, probeTimeoutMs) {
|
|
768
|
+
const timedOut = error?.code === "ETIMEDOUT";
|
|
769
|
+
const stderr = String(error?.stderr || "").trim();
|
|
770
|
+
const message = error?.code === "UNSUPPORTED_SHELL_SHIM"
|
|
771
|
+
? "Shell shims (.cmd/.bat) are unsupported; choose a reviewed Node CLI entry or native executable with --zcode-path; ZCode was not dispatched"
|
|
772
|
+
: timedOut
|
|
773
|
+
? `zcode --version preflight timed out after ${probeTimeoutMs}ms; ZCode was not dispatched`
|
|
774
|
+
: `zcode --version preflight failed${Number.isInteger(error?.status) ? ` with exit ${error.status}` : ""}; ZCode was not dispatched`;
|
|
775
|
+
const result = writeResult({
|
|
776
|
+
status: timedOut ? "timeout" : "failed",
|
|
777
|
+
exitCode: timedOut ? 124 : Number.isInteger(error?.status) ? error.status : 1,
|
|
778
|
+
signal: null,
|
|
779
|
+
sessionId: null,
|
|
780
|
+
finalMessage: "",
|
|
781
|
+
touchedFiles: gitTouchedFiles(opts.cd),
|
|
782
|
+
readOnlyViolation: null,
|
|
783
|
+
usage: null,
|
|
784
|
+
contextWindow: null,
|
|
785
|
+
stderrTail: stderr ? stderr.split("\n").slice(-20) : [],
|
|
786
|
+
error: message,
|
|
787
|
+
});
|
|
788
|
+
printSummary(result, run.resultPath);
|
|
789
|
+
process.stderr.write(`relay: ${message}\n`);
|
|
790
|
+
process.exit(result.exitCode);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
function dispatchToZcode(opts, run, target, writeResult, beforeTree, beforeFingerprints, relayArtifacts) {
|
|
794
|
+
const argv = buildArgv(opts, target, run.briefPath);
|
|
795
|
+
assertDirectExecutable(target.command);
|
|
796
|
+
// Pass argv directly; no shell interpreter is involved.
|
|
797
|
+
// detached on POSIX: the child leads a new process group so killChild can fell the whole tree
|
|
798
|
+
const child = spawn(target.command, [...target.prefixArgs, ...argv], {
|
|
799
|
+
cwd: opts.cd,
|
|
800
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
801
|
+
detached: process.platform !== "win32",
|
|
802
|
+
env: process.env,
|
|
803
|
+
shell: false,
|
|
804
|
+
});
|
|
805
|
+
|
|
806
|
+
let stdoutBuf = "";
|
|
807
|
+
let stdoutTruncated = false;
|
|
808
|
+
const stderrTail = [];
|
|
809
|
+
|
|
810
|
+
// Decode across chunk boundaries: a multibyte UTF-8 character split between
|
|
811
|
+
// two data events would otherwise decode as U+FFFD and corrupt the report.
|
|
812
|
+
const stdoutDecoder = new StringDecoder("utf8");
|
|
813
|
+
const stderrDecoder = new StringDecoder("utf8");
|
|
814
|
+
|
|
815
|
+
// ZCode prints ONE JSON document at the end rather than a stream, so stdout is
|
|
816
|
+
// buffered whole and parsed at close. The bound keeps a runaway CLI from
|
|
817
|
+
// exhausting memory; past it we keep the HEAD, since the document starts there
|
|
818
|
+
// and a truncated tail is reported rather than silently parsed.
|
|
819
|
+
child.stdout.on("data", (chunk) => {
|
|
820
|
+
if (stdoutTruncated) return;
|
|
821
|
+
stdoutBuf += stdoutDecoder.write(chunk);
|
|
822
|
+
if (stdoutBuf.length > MAX_BUFFERED_CHARS) {
|
|
823
|
+
stdoutBuf = stdoutBuf.slice(0, MAX_BUFFERED_CHARS);
|
|
824
|
+
stdoutTruncated = true;
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
child.stderr.on("data", (chunk) => {
|
|
829
|
+
process.stderr.write(chunk); // surface ZCode progress live for the orchestrator
|
|
830
|
+
const text = stderrDecoder.write(chunk);
|
|
831
|
+
for (const line of text.split("\n")) {
|
|
832
|
+
if (line.trim()) stderrTail.push(line.trimEnd());
|
|
833
|
+
}
|
|
834
|
+
while (stderrTail.length > 20) stderrTail.shift();
|
|
835
|
+
});
|
|
836
|
+
|
|
837
|
+
let settled = false;
|
|
838
|
+
let watchdogFired = false;
|
|
839
|
+
let watchdogTimer = null;
|
|
840
|
+
let sigkillTimer = null;
|
|
841
|
+
const timeoutMs = opts.timeout === null ? null : parseDuration(opts.timeout);
|
|
842
|
+
if (timeoutMs !== null) {
|
|
843
|
+
watchdogTimer = setTimeout(() => {
|
|
844
|
+
watchdogFired = true;
|
|
845
|
+
child.once("exit", () => {
|
|
846
|
+
child.stdout.destroy();
|
|
847
|
+
child.stderr.destroy();
|
|
848
|
+
});
|
|
849
|
+
killChild(child);
|
|
850
|
+
sigkillTimer = setTimeout(() => {
|
|
851
|
+
if (!settled) killChild(child, "SIGKILL");
|
|
852
|
+
}, 10_000);
|
|
853
|
+
}, timeoutMs);
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
const clearWatchdog = () => {
|
|
857
|
+
if (watchdogTimer) clearTimeout(watchdogTimer);
|
|
858
|
+
if (sigkillTimer) clearTimeout(sigkillTimer);
|
|
859
|
+
};
|
|
860
|
+
|
|
861
|
+
// The relay's own death must still produce a result: without this, a kill from the
|
|
862
|
+
// orchestrator's side (its command timeout, a stopped task, a closed terminal) writes
|
|
863
|
+
// no result.json and leaves the ZCode child running or dying mid-edit with nothing
|
|
864
|
+
// recording why. SIGTERM/SIGHUP registration is a no-op on Windows; SIGINT works there.
|
|
865
|
+
for (const sig of ["SIGTERM", "SIGINT", "SIGHUP"]) {
|
|
866
|
+
process.on(sig, () => {
|
|
867
|
+
if (settled) return;
|
|
868
|
+
settled = true;
|
|
869
|
+
clearWatchdog();
|
|
870
|
+
const partial = parseZcodeOutput(stdoutBuf);
|
|
871
|
+
const abortedFields = {
|
|
872
|
+
status: "aborted",
|
|
873
|
+
exitCode: 128 + (constants.signals[sig] || 15),
|
|
874
|
+
signal: sig,
|
|
875
|
+
sessionId: partial?.sessionId ?? null,
|
|
876
|
+
finalMessage: typeof partial?.response === "string" ? partial.response : "",
|
|
877
|
+
touchedFiles: gitTouchedFiles(opts.cd),
|
|
878
|
+
readOnlyViolation: null,
|
|
879
|
+
usage: partial?.usage ?? null,
|
|
880
|
+
contextWindow: partial?.projection?.contextWindow ?? null,
|
|
881
|
+
stderrTail: stderrTail.slice(-20),
|
|
882
|
+
error: `the relay was killed by ${sig}; ZCode was terminated with it — inspect the working tree before re-dispatching`,
|
|
883
|
+
};
|
|
884
|
+
const result = writeResult(abortedFields);
|
|
885
|
+
printSummary(result, run.resultPath);
|
|
886
|
+
killChild(child);
|
|
887
|
+
setTimeout(() => {
|
|
888
|
+
killChild(child, "SIGKILL");
|
|
889
|
+
// the child may flush files during the grace window; refresh the snapshot so the
|
|
890
|
+
// artifact matches the tree the orchestrator will actually find
|
|
891
|
+
writeResult({ ...abortedFields, touchedFiles: gitTouchedFiles(opts.cd) });
|
|
892
|
+
process.exit(result.exitCode);
|
|
893
|
+
}, 2000);
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
// A grandchild that outlives zcode and inherited the pipes keeps stdout/stderr open, so
|
|
898
|
+
// "close" never fires and the relay waits forever, writing no result. Once zcode itself is
|
|
899
|
+
// gone the pipes hold nothing we still need, so drop them after a short drain grace and let
|
|
900
|
+
// "close" run. This is the normal-exit twin of the stream teardown the watchdog already
|
|
901
|
+
// does on the timeout path.
|
|
902
|
+
child.once("exit", () => {
|
|
903
|
+
// The implementer already exited. Leaving the watchdog armed lets a drain that
|
|
904
|
+
// overlaps the remaining budget fire, set watchdogFired, and report timeout.
|
|
905
|
+
if (!watchdogFired) clearWatchdog();
|
|
906
|
+
const drain = setTimeout(() => {
|
|
907
|
+
if (settled) return;
|
|
908
|
+
child.stdout.destroy();
|
|
909
|
+
child.stderr.destroy();
|
|
910
|
+
}, 500);
|
|
911
|
+
if (typeof drain.unref === "function") drain.unref();
|
|
912
|
+
});
|
|
913
|
+
|
|
914
|
+
child.on("error", (err) => {
|
|
915
|
+
if (settled) return;
|
|
916
|
+
settled = true;
|
|
917
|
+
clearWatchdog();
|
|
918
|
+
const result = writeResult({ status: "failed", exitCode: 1, signal: null, sessionId: null, finalMessage: "", touchedFiles: gitTouchedFiles(opts.cd), readOnlyViolation: null, usage: null, contextWindow: null, error: String(err && err.message ? err.message : err) });
|
|
919
|
+
printSummary(result, run.resultPath);
|
|
920
|
+
process.exit(1);
|
|
921
|
+
});
|
|
922
|
+
|
|
923
|
+
child.on("close", (code, signal) => {
|
|
924
|
+
if (settled) return;
|
|
925
|
+
settled = true;
|
|
926
|
+
clearWatchdog();
|
|
927
|
+
// a descendant that ignored SIGTERM must not outlive the timeout report: once the
|
|
928
|
+
// parent is down, sweep the group (no-op where taskkill already felled the tree)
|
|
929
|
+
if (watchdogFired) killChild(child, "SIGKILL");
|
|
930
|
+
stdoutBuf += stdoutDecoder.end();
|
|
931
|
+
// Preserve the raw stream before parsing, so nothing is lost when the
|
|
932
|
+
// document is malformed and the reviewer has to read it themselves.
|
|
933
|
+
if (stdoutBuf) writeFileSync(run.outputPath, stdoutBuf, "utf8");
|
|
934
|
+
const parsed = parseZcodeOutput(stdoutBuf);
|
|
935
|
+
const finalMessage = typeof parsed?.response === "string" ? parsed.response.trim() : stdoutBuf.trim();
|
|
936
|
+
if (finalMessage) writeFileSync(run.finalPath, `${finalMessage}\n`, "utf8");
|
|
937
|
+
// A timed-out run is never a success even if ZCode handles SIGTERM by exiting 0 -
|
|
938
|
+
// orchestrators key off status and the relay exit code.
|
|
939
|
+
const succeeded = code === 0 && !watchdogFired;
|
|
940
|
+
const mapped = code ?? (constants.signals[signal] ? 128 + constants.signals[signal] : 1);
|
|
941
|
+
// Only a plan-mode run makes a read-only claim worth measuring; a yolo run is
|
|
942
|
+
// supposed to write, so the tripwire stays null rather than reporting noise.
|
|
943
|
+
const readOnlyViolation = opts.readOnly
|
|
944
|
+
? readOnlyVerdict(beforeTree, gitTripwireState(opts.cd, relayArtifacts), beforeFingerprints)
|
|
945
|
+
: null;
|
|
946
|
+
const result = writeResult({
|
|
947
|
+
status: succeeded ? "completed" : watchdogFired ? "timeout" : "failed",
|
|
948
|
+
exitCode: succeeded ? 0 : mapped === 0 ? 1 : mapped,
|
|
949
|
+
signal: signal ?? null,
|
|
950
|
+
sessionId: parsed?.sessionId ?? null,
|
|
951
|
+
finalMessage,
|
|
952
|
+
touchedFiles: gitTouchedFiles(opts.cd),
|
|
953
|
+
readOnlyViolation,
|
|
954
|
+
usage: parsed?.usage ?? null,
|
|
955
|
+
contextWindow: parsed?.projection?.contextWindow ?? null,
|
|
956
|
+
// Say so rather than pretend: a run whose document did not parse still has
|
|
957
|
+
// a status, but its sessionId and usage are unknown and the report is raw.
|
|
958
|
+
...(parsed ? {} : { parseWarning: stdoutTruncated
|
|
959
|
+
? `ZCode's stdout exceeded ${MAX_BUFFERED_CHARS} characters and was truncated; the JSON result could not be parsed. finalMessage is the raw head — read outputPath.`
|
|
960
|
+
: "ZCode's stdout did not contain a parseable JSON result; finalMessage is the raw output — read outputPath." }),
|
|
961
|
+
...(succeeded ? {} : { stderrTail: stderrTail.slice(-20) }),
|
|
962
|
+
...(watchdogFired ? { error: `ZCode did not finish within --timeout ${opts.timeout}; killed by the relay watchdog` } : {}),
|
|
963
|
+
});
|
|
964
|
+
printSummary(result, run.resultPath);
|
|
965
|
+
process.exit(result.exitCode);
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
function main() {
|
|
970
|
+
const opts = parseArgs(process.argv.slice(2));
|
|
971
|
+
const brief = readBrief(opts);
|
|
972
|
+
if (!brief.trim()) fail("empty brief (pass --brief <file> or pipe the brief on stdin)");
|
|
973
|
+
|
|
974
|
+
// Prepare the run dir before probing, so a preflight that times out or fails still has
|
|
975
|
+
// somewhere to publish result.json rather than exiting silently.
|
|
976
|
+
const run = prepareRunDir(opts, brief);
|
|
977
|
+
const probeTimeoutMs = versionProbeTimeout(opts);
|
|
978
|
+
// Resolve before probing: with no CLI there is nothing to ask for a version,
|
|
979
|
+
// and "not found" must stay distinguishable from "found but broken".
|
|
980
|
+
const target = resolveZcode(opts);
|
|
981
|
+
if (!target) {
|
|
982
|
+
reportUnavailable(makeResultWriter(opts, null, run, null), run.resultPath);
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
const probe = zcodeVersion(target, probeTimeoutMs);
|
|
986
|
+
const writeResult = makeResultWriter(opts, probe.version, run, target);
|
|
987
|
+
|
|
988
|
+
if (!probe.version && !probe.error) {
|
|
989
|
+
reportUnavailable(writeResult, run.resultPath);
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
992
|
+
if (probe.error) {
|
|
993
|
+
reportVersionFailure(opts, writeResult, run, probe.error, probeTimeoutMs);
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
// Fingerprint before dispatch so a plan-mode run has something to compare
|
|
998
|
+
// against. ZCode's plan mode refused edits in testing, but whether that is
|
|
999
|
+
// tool-enforced or model compliance is unproven, so this measures instead.
|
|
1000
|
+
// The relay's own artifacts are excluded: --out-dir can point into the repo
|
|
1001
|
+
// under review, and the relay must not trip its own tripwire.
|
|
1002
|
+
const relayArtifacts = [run.briefPath, run.outputPath, run.finalPath, run.resultPath];
|
|
1003
|
+
const beforeTree = opts.readOnly ? gitTripwireState(opts.cd, relayArtifacts) : null;
|
|
1004
|
+
const beforeFingerprints = opts.readOnly ? fingerprintDirtyPaths(opts.cd, relayArtifacts) : null;
|
|
1005
|
+
|
|
1006
|
+
dispatchToZcode(opts, run, target, writeResult, beforeTree, beforeFingerprints, relayArtifacts);
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
function printSummary(result, resultPath) {
|
|
1010
|
+
const lines = [];
|
|
1011
|
+
lines.push("");
|
|
1012
|
+
lines.push(`relay: ${result.status} (exit ${result.exitCode}${result.signal ? `, killed by ${result.signal}` : ""}) · zcode ${result.zcodeVersion ?? "?"}${result.zcodeSource ? ` (${result.zcodeSource})` : ""}`);
|
|
1013
|
+
if (result.signal === "SIGKILL" && result.status === "failed") lines.push("hint: the host killed the process (commonly the OOM killer or a supervisor timeout) — this is not a ZCode error; check host memory and re-dispatch, or split the task into smaller briefs.");
|
|
1014
|
+
if (result.signal === "SIGTERM" && result.status === "failed") lines.push("hint: something outside the relay terminated ZCode (a supervisor, the session ending, or a manual kill) — when the relay itself does the killing it reports status \"timeout\" or \"aborted\" instead; inspect the working tree before re-dispatching.");
|
|
1015
|
+
if (result.mode) lines.push(`mode: ${result.mode}${result.readOnly ? " (read-only)" : ""}`);
|
|
1016
|
+
if (result.resumeLast) lines.push("resume: latest session for this directory");
|
|
1017
|
+
if (result.session) lines.push(`resume: session ${result.session}`);
|
|
1018
|
+
if (result.sessionId) lines.push(`session id (resume with: --session ${result.sessionId}): ${result.sessionId}`);
|
|
1019
|
+
if (result.readOnlyViolation === true) lines.push("READ-ONLY VIOLATION: the tree changed during a plan-mode run — inspect it before trusting this result.");
|
|
1020
|
+
if (result.parseWarning) lines.push(`warning: ${result.parseWarning}`);
|
|
1021
|
+
const touched = result.touchedFiles;
|
|
1022
|
+
if (touched === null) {
|
|
1023
|
+
lines.push("touched files: git unavailable — inspect the working tree directly");
|
|
1024
|
+
} else {
|
|
1025
|
+
lines.push(`touched files: ${touched.length}`);
|
|
1026
|
+
for (const file of touched.slice(0, 40)) lines.push(` ${file}`);
|
|
1027
|
+
if (touched.length > 40) lines.push(` … and ${touched.length - 40} more`);
|
|
1028
|
+
}
|
|
1029
|
+
if (result.stderrTail && result.stderrTail.length) {
|
|
1030
|
+
lines.push("last stderr:");
|
|
1031
|
+
for (const line of result.stderrTail.slice(-8)) lines.push(` ${line}`);
|
|
1032
|
+
}
|
|
1033
|
+
lines.push("");
|
|
1034
|
+
lines.push("--- zcode final report ---");
|
|
1035
|
+
lines.push(result.finalMessage || "(no final message captured)");
|
|
1036
|
+
lines.push("--- end report ---");
|
|
1037
|
+
lines.push("");
|
|
1038
|
+
lines.push(`result: ${resultPath}`);
|
|
1039
|
+
lines.push("relay does not commit. Review the diff, re-run the project gates yourself, then commit from the orchestrator.");
|
|
1040
|
+
process.stdout.write(`${lines.join("\n")}\n`);
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
if (process.argv[1] && existsSync(process.argv[1]) && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) main();
|