@zaip-ai/cli 1.3.7 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +26 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/services/adapters.js +4 -4
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/codex-config-template.d.ts +2 -2
- package/dist/services/codex-config-template.d.ts.map +1 -1
- package/dist/services/codex-config-template.js +3 -3
- package/dist/services/codex-config-template.js.map +1 -1
- package/dist/services/codex-rules.d.ts +1 -1
- package/dist/services/codex-rules.d.ts.map +1 -1
- package/dist/services/codex-rules.js +9 -24
- package/dist/services/codex-rules.js.map +1 -1
- package/dist/services/delivery-git-preflight.d.ts +23 -0
- package/dist/services/delivery-git-preflight.d.ts.map +1 -0
- package/dist/services/delivery-git-preflight.js +69 -0
- package/dist/services/delivery-git-preflight.js.map +1 -0
- package/dist/services/doctor.d.ts.map +1 -1
- package/dist/services/doctor.js +13 -1
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +22 -28
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/install-profile.d.ts +8 -0
- package/dist/services/install-profile.d.ts.map +1 -0
- package/dist/services/install-profile.js +56 -0
- package/dist/services/install-profile.js.map +1 -0
- package/dist/services/logger.d.ts.map +1 -1
- package/dist/services/logger.js +6 -5
- package/dist/services/logger.js.map +1 -1
- package/dist/services/stack-git.d.ts +9 -0
- package/dist/services/stack-git.d.ts.map +1 -0
- package/dist/services/stack-git.js +188 -0
- package/dist/services/stack-git.js.map +1 -0
- package/dist/services/stack-install.d.ts +14 -0
- package/dist/services/stack-install.d.ts.map +1 -0
- package/dist/services/stack-install.js +176 -0
- package/dist/services/stack-install.js.map +1 -0
- package/dist/services/stack-node.d.ts +12 -0
- package/dist/services/stack-node.d.ts.map +1 -0
- package/dist/services/stack-node.js +150 -0
- package/dist/services/stack-node.js.map +1 -0
- package/dist/services/stack-package-manager.d.ts +12 -0
- package/dist/services/stack-package-manager.d.ts.map +1 -0
- package/dist/services/stack-package-manager.js +178 -0
- package/dist/services/stack-package-manager.js.map +1 -0
- package/dist/services/stack-plan.d.ts +35 -0
- package/dist/services/stack-plan.d.ts.map +1 -0
- package/dist/services/stack-plan.js +130 -0
- package/dist/services/stack-plan.js.map +1 -0
- package/dist/services/stack-terraform.d.ts +13 -0
- package/dist/services/stack-terraform.d.ts.map +1 -0
- package/dist/services/stack-terraform.js +274 -0
- package/dist/services/stack-terraform.js.map +1 -0
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +14 -1
- package/dist/services/template-manifest.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/.env.example +34 -0
- package/templates/{README.md → .agents/README.md} +124 -60
- package/templates/.agents/config/agents/catalog.yaml +23 -23
- package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +5 -4
- package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +10 -7
- package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +5 -4
- package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +5 -4
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +5 -4
- package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +1 -0
- package/templates/.agents/config/pricing/models.json +25 -1
- package/templates/.agents/config/project.yaml +2 -0
- package/templates/.agents/dashboard/.zaip-managed.json +214 -94
- package/templates/.agents/dashboard/DATA-DICTIONARY.md +1 -1
- package/templates/.agents/dashboard/README.md +58 -19
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-DwVZOmMV.js → CostCalculationGuidePage-snUCQYTC.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog--czwAlcH.js → DashboardHelpDialog-oZVlf-l5.js} +787 -723
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-CyjMXkm8.js → PricingSettingsDialog-BPtVUGgs.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-3Awyaovx.js +3 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-BomxqCBU.css → ProjectSettingsPage-GgzpZ_PY.css} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-CAqYVin1.js → TraceabilityWorkspace-BYjVOHI_.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-DbaLbU2q.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-DXBOtWNI.js → icons-vendor-TPUT2IUt.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Cmlx8OYH.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-ZJFXmK7m.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-DaNXQPyk.js → react-vendor-Ct48XHGL.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-I4AKqVDX.js → traceability-BDe4_Ubl.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +6 -6
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +73 -67
- package/templates/.agents/dashboard/apps/frontend/src/AppLoadingBoundary.tsx +35 -7
- package/templates/.agents/dashboard/apps/frontend/src/AppWorkBoard.ts +55 -0
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +15 -2
- package/templates/.agents/dashboard/apps/frontend/src/ProjectStackEditor.tsx +33 -6
- package/templates/.agents/dashboard/apps/frontend/src/app-loading-boundary.css +98 -0
- package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +5 -5
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-reconciliation.ts +33 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +75 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +9 -8
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +15 -3
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-page.css +0 -104
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +61 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-stack-versions.css +117 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +78 -2
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.test.ts +28 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.ts +8 -5
- package/templates/.agents/dashboard/apps/frontend/src/use-app-effects.ts +180 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/contracts.ts +7 -4
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorContent.tsx +13 -7
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +14 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableDisplay.ts +211 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +152 -157
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +155 -142
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/InvocationManifestQuery.test.ts +145 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +7 -5
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-compact-cost-page.ts +4 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-group-page.ts +4 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-run-page.ts +4 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.ts +4 -4
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +79 -1
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +105 -11
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +477 -327
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +430 -285
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs +14 -2
- package/templates/.agents/dashboard/packages/local-runtime/scripts/rebuild-sqlite-read-model.mjs +6 -26
- package/templates/.agents/dashboard/packages/local-runtime/scripts/validate-sqlite-read-model.mjs +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/scripts/verify-persistent-launch.mjs +268 -0
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +482 -332
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +243 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +252 -41
- package/templates/.agents/dashboard/packages/local-runtime/src/server-agent-assets.ts +39 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-browser-lease.ts +33 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-refresh.test.ts +148 -11
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-result.test.ts +68 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.test.ts +19 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.ts +39 -43
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-revision.test.ts +42 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-revision.ts +26 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +34 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-startup.ts +30 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.test.ts +89 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.ts +88 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +68 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +11 -5
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +129 -99
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-agent-productivity.test.ts +111 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-agent-productivity.ts +140 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.test.ts +127 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.ts +145 -5
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-aggregates.ts +156 -23
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-group-projection.ts +18 -9
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-invocation-projection.ts +52 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-persistence.ts +35 -13
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-force-canonical.test.ts +56 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-cache.test.ts +29 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-cache.ts +136 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-refresh.test.ts +251 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-projection.ts +22 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-cache.test-support.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical-parsing.ts +42 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical.ts +793 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider-duration.test.ts +270 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider-fixture.ts +3 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider.test.ts +18 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.test.ts +87 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +105 -16
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +131 -59
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +1000 -1115
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-cache.ts +13 -92
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-claims.test.mjs +79 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-page.mjs +27 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-lifecycle.mjs +6 -6
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-prerequisites.mjs +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-refresh.mjs +2 -10
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-server.mjs +142 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +231 -239
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +18 -29
- package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +6 -0
- package/templates/.agents/dashboard/stack-dependencies.json +14 -0
- package/templates/.agents/dashboard/zaip-dashboard-windows.exe +0 -0
- package/templates/.agents/requirements/autonomous-assurance.md +1 -1
- package/templates/.agents/requirements/cloud-hostinger-autonomy.md +47 -0
- package/templates/.agents/requirements/comparative-audit.md +1 -1
- package/templates/.agents/requirements/context-engine.md +1 -1
- package/templates/.agents/requirements/cost-observability.md +1 -1
- package/templates/.agents/requirements/dashboard-launch.md +2 -2
- package/templates/.agents/requirements/data-export.md +1 -1
- package/templates/.agents/requirements/design-system.md +1 -1
- package/templates/.agents/requirements/execution-engine.md +1 -1
- package/templates/.agents/requirements/kanban-dashboard.md +1 -1
- package/templates/.agents/requirements/model-orchestration.md +1 -1
- package/templates/.agents/requirements/public-distribution.md +1 -1
- package/templates/.agents/requirements/software-architecture.md +1 -1
- package/templates/.agents/requirements/strategic-improvements.md +1 -1
- package/templates/.agents/requirements/work-lifecycle.md +1 -1
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/rules/autonomy-decision.md +1 -1
- package/templates/.agents/rules/cloud-hostinger-autonomy.md +21 -0
- package/templates/.agents/rules/core.md +5 -4
- package/templates/.agents/rules/local-sqlite-storage.md +18 -0
- package/templates/.agents/rules/meta-mcp.md +21 -0
- package/templates/.agents/rules/workflow.md +1 -0
- package/templates/.agents/runtime/bin/zaip.mjs +305 -137
- package/templates/.agents/runtime/checksums.sha256 +2 -2
- package/templates/.agents/runtime/provenance.json +2 -2
- package/templates/.agents/skills/zaip-skill-api-to-mcp/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-brand-governance/SKILL.md +25 -9
- package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-framework.md +2 -2
- package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-standards.md +2 -2
- package/templates/.agents/skills/zaip-skill-change/references/observable-evidence.md +15 -0
- package/templates/.agents/skills/zaip-skill-dashboard-sqlite/SKILL.md +13 -5
- package/templates/.agents/skills/zaip-skill-data-analyst/SKILL.md +10 -5
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +5 -4
- package/templates/.agents/skills/zaip-skill-frontend-launcher/SKILL.md +4 -3
- package/templates/.agents/skills/zaip-skill-frontend-launcher/references/launcher-contract.md +5 -3
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +5 -5
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs +78 -13
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.test.mjs +59 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/yaml-parser.mjs +157 -0
- package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +11 -6
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/SKILL.md +17 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/agents/openai.yaml +7 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/autonomous-cloud-inputs.example.json +41 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/autonomous-runner.md +84 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/operational-contract.md +19 -0
- package/templates/.agents/skills/zaip-skill-local-credentials/SKILL.md +43 -0
- package/templates/.agents/skills/zaip-skill-local-credentials/agents/openai.yaml +6 -0
- package/templates/.agents/skills/zaip-skill-local-credentials/references/dotenv-resolution.md +47 -0
- package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +8 -3
- package/templates/.agents/skills/zaip-skill-meta-ads/SKILL.md +16 -0
- package/templates/.agents/skills/zaip-skill-meta-ads/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-ads/references/setup.md +3 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/SKILL.md +24 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/references/diagnostics.md +13 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/references/official-sources.md +10 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/references/upstream.md +77 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/references/upstream.md +126 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/references/upstream.md +67 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/references/upstream.md +69 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/references/upstream.md +79 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/references/upstream.md +144 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/references/upstream.md +83 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/references/setup.md +11 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/references/upstream.md +55 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/references/upstream.md +56 -0
- package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +12 -7
- package/templates/.agents/skills/zaip-skill-sqlite-read-model/SKILL.md +11 -4
- package/templates/.agents/skills/zaip-skill-tool-setup/SKILL.md +6 -4
- package/templates/.agents/skills/zaip-skill-tool-setup/references/codex-config.md +4 -2
- package/templates/.agents/skills/zaip-skill-tool-setup/references/secrets.md +1 -0
- package/templates/.agents/tools/catalog.yaml +6 -0
- package/templates/.agents/tools/cloud-runner-dns.mjs +28 -0
- package/templates/.agents/tools/cloud-runner-terraform.mjs +212 -0
- package/templates/.agents/tools/cloud-runner.integration.test.mjs +239 -0
- package/templates/.agents/tools/cloud-runner.mjs +786 -0
- package/templates/.agents/tools/cloud-runner.test.mjs +534 -0
- package/templates/.agents/tools/cloud-terraform-plan-policy.mjs +262 -0
- package/templates/.agents/tools/mcp/development/meta-devtools/README.md +14 -0
- package/templates/.agents/tools/mcp/development/meta-devtools/manifest.yaml +28 -0
- package/templates/.agents/tools/mcp/infra/cloudflare/manifest.yaml +2 -3
- package/templates/.agents/tools/mcp/infra/hostinger/manifest.yaml +1 -3
- package/templates/.agents/tools/mcp/marketing/meta-ads/README.md +15 -13
- package/templates/.agents/tools/mcp/marketing/meta-ads/manifest.yaml +15 -10
- package/templates/.agents/tools/profiles/development.yaml +3 -0
- package/templates/infra/terraform/.terraform.lock.hcl +42 -0
- package/templates/infra/terraform/README.md +31 -0
- package/templates/infra/terraform/backend.tf.json +13 -0
- package/templates/infra/terraform/deployment-inputs.example.yaml +22 -0
- package/templates/infra/terraform/fixtures/approved-targets.json +32 -0
- package/templates/infra/terraform/fixtures/plan-approved.json +67 -0
- package/templates/infra/terraform/main.tf +77 -0
- package/templates/infra/terraform/outputs.tf +20 -0
- package/templates/infra/terraform/terraform.tfvars.example +26 -0
- package/templates/infra/terraform/variables.tf +91 -0
- package/templates/infra/terraform/versions.tf +18 -0
- package/templates/scripts/validate-cloud-hostinger-contract.mjs +89 -0
- package/templates/scripts/validate-cloud-terraform-plan.mjs +1 -0
- package/templates/template-manifest.json +613 -173
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-B_Oj6Dlf.js +0 -3
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-C09KmlSw.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-CblPpexd.js +0 -2
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-hPPfVGQv.css +0 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-stale-seed.ts +0 -50
|
@@ -163,6 +163,54 @@ describe("project settings persistence", () => {
|
|
|
163
163
|
expect(architecture).toContain("- TypeScript");
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
+
it("persists observability and on-demand testing components without requiring local detection", async () => {
|
|
167
|
+
const { filesystem } = await fixtureProject();
|
|
168
|
+
const current = await readProjectSettings(filesystem);
|
|
169
|
+
await filesystem.writeTextAtomic(
|
|
170
|
+
PROJECT_CONFIG_PATH,
|
|
171
|
+
serializeYaml({
|
|
172
|
+
...current,
|
|
173
|
+
stack: {
|
|
174
|
+
...current.stack,
|
|
175
|
+
overrides: { ...current.stack.overrides, components: { future_tool: { enabled: true } } },
|
|
176
|
+
},
|
|
177
|
+
}),
|
|
178
|
+
);
|
|
179
|
+
const updated = await persistProjectSettings(filesystem, {
|
|
180
|
+
...current,
|
|
181
|
+
stack: {
|
|
182
|
+
...current.stack,
|
|
183
|
+
overrides: {
|
|
184
|
+
components: {
|
|
185
|
+
prometheus: {
|
|
186
|
+
name: "Prometheus",
|
|
187
|
+
version: "3.6.0",
|
|
188
|
+
reference: "docker:prom/prometheus",
|
|
189
|
+
},
|
|
190
|
+
grafana: {
|
|
191
|
+
name: "Grafana",
|
|
192
|
+
version: "",
|
|
193
|
+
reference: "docker:grafana/grafana",
|
|
194
|
+
},
|
|
195
|
+
k6: { name: "k6", version: "1.1.0", reference: "docker:grafana/k6" },
|
|
196
|
+
autocannon: { name: "autocannon", version: "", reference: "npm:autocannon" },
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
expect(updated.stack.overrides.components).toMatchObject({
|
|
203
|
+
prometheus: { name: "Prometheus", version: "3.6.0" },
|
|
204
|
+
grafana: { name: "Grafana", version: "" },
|
|
205
|
+
k6: { name: "k6", version: "1.1.0" },
|
|
206
|
+
autocannon: { name: "autocannon", version: "" },
|
|
207
|
+
future_tool: { enabled: true },
|
|
208
|
+
});
|
|
209
|
+
await expect(filesystem.readText(SOFTWARE_ARCHITECTURE_PATH)).resolves.toContain(
|
|
210
|
+
"| Coleta de métricas | Prometheus | 3.6.0 | docker:prom/prometheus |",
|
|
211
|
+
);
|
|
212
|
+
});
|
|
213
|
+
|
|
166
214
|
it("rejects invalid settings before touching the project file", async () => {
|
|
167
215
|
const { configPath, filesystem } = await fixtureProject();
|
|
168
216
|
const original = await readFile(configPath, "utf8");
|
|
@@ -359,7 +407,7 @@ describe("project settings persistence", () => {
|
|
|
359
407
|
expect.objectContaining({ id: "skills", value: 2 }),
|
|
360
408
|
expect.objectContaining({ id: "rules", value: 2 }),
|
|
361
409
|
expect.objectContaining({ id: "hooks", value: 3 }),
|
|
362
|
-
expect.objectContaining({ id: "database", value: "
|
|
410
|
+
expect.objectContaining({ id: "database", value: "Inativo" }),
|
|
363
411
|
],
|
|
364
412
|
stack_components: [
|
|
365
413
|
expect.objectContaining({
|
|
@@ -375,6 +423,11 @@ describe("project settings persistence", () => {
|
|
|
375
423
|
expect.objectContaining({ name: "BullMQ", verification: "unavailable" }),
|
|
376
424
|
expect.objectContaining({ name: "Hono", verification: "unavailable" }),
|
|
377
425
|
expect.objectContaining({ name: "React", verification: "unavailable" }),
|
|
426
|
+
expect.objectContaining({ name: "Git", configured_version: "latest" }),
|
|
427
|
+
expect.objectContaining({
|
|
428
|
+
name: "Terraform",
|
|
429
|
+
configured_version: "1.16.1",
|
|
430
|
+
}),
|
|
378
431
|
],
|
|
379
432
|
areas: expect.arrayContaining([
|
|
380
433
|
expect.objectContaining({
|
|
@@ -424,4 +477,193 @@ describe("project settings persistence", () => {
|
|
|
424
477
|
"growth_strategy",
|
|
425
478
|
]);
|
|
426
479
|
});
|
|
480
|
+
|
|
481
|
+
it("reports the project-local installed version separately from configured stack versions", async () => {
|
|
482
|
+
const { filesystem } = await fixtureProject();
|
|
483
|
+
const current = await readProjectSettings(filesystem);
|
|
484
|
+
await filesystem.writeTextAtomic(
|
|
485
|
+
PROJECT_CONFIG_PATH,
|
|
486
|
+
serializeYaml({
|
|
487
|
+
...current,
|
|
488
|
+
stack: {
|
|
489
|
+
...current.stack,
|
|
490
|
+
overrides: {
|
|
491
|
+
...current.stack.overrides,
|
|
492
|
+
components: { backend_api: { name: "Hono", version: "4.12.34" } },
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
}),
|
|
496
|
+
);
|
|
497
|
+
await filesystem.writeTextAtomic(
|
|
498
|
+
".agents/dashboard/stack-dependencies.json",
|
|
499
|
+
JSON.stringify({
|
|
500
|
+
schema_version: 1,
|
|
501
|
+
node: "22.16.0",
|
|
502
|
+
packages: [
|
|
503
|
+
{ name: "typescript", version: "7.0.2", development: true },
|
|
504
|
+
{ name: "redis", version: "6.2.1", development: false },
|
|
505
|
+
{ name: "hono", version: "4.12.33", development: false },
|
|
506
|
+
],
|
|
507
|
+
}),
|
|
508
|
+
);
|
|
509
|
+
await mkdir(join(filesystem.root, "node_modules", "hono"), { recursive: true });
|
|
510
|
+
await writeFile(
|
|
511
|
+
join(filesystem.root, "node_modules", "hono", "package.json"),
|
|
512
|
+
JSON.stringify({ name: "hono", version: "4.12.35", main: "index.js" }),
|
|
513
|
+
"utf8",
|
|
514
|
+
);
|
|
515
|
+
await writeFile(
|
|
516
|
+
join(filesystem.root, "node_modules", "hono", "index.js"),
|
|
517
|
+
"export {};",
|
|
518
|
+
"utf8",
|
|
519
|
+
);
|
|
520
|
+
|
|
521
|
+
const overview = await readProjectOverview(filesystem);
|
|
522
|
+
|
|
523
|
+
expect(overview.stack_components).toEqual(
|
|
524
|
+
expect.arrayContaining([
|
|
525
|
+
expect.objectContaining({
|
|
526
|
+
name: "Hono",
|
|
527
|
+
version: "4.12.35",
|
|
528
|
+
configured_version: "4.12.34",
|
|
529
|
+
source: "node_modules/hono/package.json",
|
|
530
|
+
installation: "installed",
|
|
531
|
+
verification: "exact",
|
|
532
|
+
}),
|
|
533
|
+
expect.objectContaining({
|
|
534
|
+
name: "TypeScript",
|
|
535
|
+
version: null,
|
|
536
|
+
configured_version: "7.0.2",
|
|
537
|
+
installation: "missing",
|
|
538
|
+
verification: "unavailable",
|
|
539
|
+
}),
|
|
540
|
+
expect.objectContaining({
|
|
541
|
+
name: "Redis",
|
|
542
|
+
version: null,
|
|
543
|
+
configured_version: "6.2.1",
|
|
544
|
+
installation: "missing",
|
|
545
|
+
verification: "unavailable",
|
|
546
|
+
}),
|
|
547
|
+
]),
|
|
548
|
+
);
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
it("only reports Hono and React as bundled when their dashboard artifacts exist", async () => {
|
|
552
|
+
const { filesystem } = await fixtureProject();
|
|
553
|
+
await filesystem.writeTextAtomic(
|
|
554
|
+
".agents/dashboard/stack-dependencies.json",
|
|
555
|
+
JSON.stringify({
|
|
556
|
+
schema_version: 1,
|
|
557
|
+
node: "22.16.0",
|
|
558
|
+
packages: [
|
|
559
|
+
{ name: "hono", version: "4.12.34", development: false },
|
|
560
|
+
{ name: "react", version: "19.2.7", development: false },
|
|
561
|
+
],
|
|
562
|
+
}),
|
|
563
|
+
);
|
|
564
|
+
const absent = await readProjectOverview(filesystem);
|
|
565
|
+
expect(absent.stack_components).toEqual(
|
|
566
|
+
expect.arrayContaining([
|
|
567
|
+
expect.objectContaining({ name: "Hono", installation: "missing", version: null }),
|
|
568
|
+
expect.objectContaining({ name: "React", installation: "missing", version: null }),
|
|
569
|
+
]),
|
|
570
|
+
);
|
|
571
|
+
|
|
572
|
+
await filesystem.writeTextAtomic(
|
|
573
|
+
".agents/dashboard/packages/local-runtime/server.mjs",
|
|
574
|
+
"/* bundled runtime */",
|
|
575
|
+
);
|
|
576
|
+
await filesystem.writeTextAtomic(
|
|
577
|
+
".agents/dashboard/apps/frontend/dist/assets/index.js",
|
|
578
|
+
"/* bundled frontend */",
|
|
579
|
+
);
|
|
580
|
+
const bundled = await readProjectOverview(filesystem);
|
|
581
|
+
expect(bundled.stack_components).toEqual(
|
|
582
|
+
expect.arrayContaining([
|
|
583
|
+
expect.objectContaining({
|
|
584
|
+
name: "Hono",
|
|
585
|
+
version: null,
|
|
586
|
+
configured_version: "4.12.34",
|
|
587
|
+
installation: "bundled",
|
|
588
|
+
verification: "unavailable",
|
|
589
|
+
source: ".agents/dashboard/packages/local-runtime/server.mjs",
|
|
590
|
+
}),
|
|
591
|
+
expect.objectContaining({
|
|
592
|
+
name: "React",
|
|
593
|
+
version: null,
|
|
594
|
+
configured_version: "19.2.7",
|
|
595
|
+
installation: "bundled",
|
|
596
|
+
verification: "unavailable",
|
|
597
|
+
source: ".agents/dashboard/apps/frontend/dist",
|
|
598
|
+
}),
|
|
599
|
+
]),
|
|
600
|
+
);
|
|
601
|
+
});
|
|
602
|
+
|
|
603
|
+
it("reads pnpm workspace manifests and validates their entrypoints", async () => {
|
|
604
|
+
const { filesystem } = await fixtureProject();
|
|
605
|
+
for (const [name, version, directory] of [
|
|
606
|
+
["hono", "4.12.35", ".agents/dashboard/packages/local-runtime/node_modules/hono"],
|
|
607
|
+
["react", "19.2.6", ".agents/dashboard/apps/frontend/node_modules/react"],
|
|
608
|
+
]) {
|
|
609
|
+
await filesystem.writeTextAtomic(
|
|
610
|
+
`${directory}/package.json`,
|
|
611
|
+
JSON.stringify({ name, version, main: "index.js" }),
|
|
612
|
+
);
|
|
613
|
+
await filesystem.writeTextAtomic(`${directory}/index.js`, "export {};");
|
|
614
|
+
const overview = await readProjectOverview(filesystem);
|
|
615
|
+
expect(
|
|
616
|
+
overview.stack_components.find((item) => item.name.toLowerCase() === name),
|
|
617
|
+
).toMatchObject({
|
|
618
|
+
version,
|
|
619
|
+
source: `${directory}/package.json`,
|
|
620
|
+
verification: "exact",
|
|
621
|
+
installation: "installed",
|
|
622
|
+
});
|
|
623
|
+
await filesystem.writeTextAtomic(
|
|
624
|
+
`${directory}/package.json`,
|
|
625
|
+
JSON.stringify({ name, version, main: "missing.js" }),
|
|
626
|
+
);
|
|
627
|
+
const incomplete = await readProjectOverview(filesystem);
|
|
628
|
+
expect(
|
|
629
|
+
incomplete.stack_components.find((item) => item.name.toLowerCase() === name),
|
|
630
|
+
).toMatchObject({
|
|
631
|
+
version: null,
|
|
632
|
+
verification: "unavailable",
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
|
|
637
|
+
it("does not accept a local package without its matching identity and entrypoint", async () => {
|
|
638
|
+
const { filesystem } = await fixtureProject();
|
|
639
|
+
await mkdir(join(filesystem.root, "node_modules", "hono"), { recursive: true });
|
|
640
|
+
await writeFile(
|
|
641
|
+
join(filesystem.root, "node_modules", "hono", "package.json"),
|
|
642
|
+
JSON.stringify({ name: "not-hono", version: "4.12.35", main: "index.js" }),
|
|
643
|
+
"utf8",
|
|
644
|
+
);
|
|
645
|
+
await writeFile(
|
|
646
|
+
join(filesystem.root, "node_modules", "hono", "index.js"),
|
|
647
|
+
"export {};",
|
|
648
|
+
"utf8",
|
|
649
|
+
);
|
|
650
|
+
|
|
651
|
+
const mismatched = await readProjectOverview(filesystem);
|
|
652
|
+
expect(mismatched.stack_components).toEqual(
|
|
653
|
+
expect.arrayContaining([
|
|
654
|
+
expect.objectContaining({ name: "Hono", installation: "missing", version: null }),
|
|
655
|
+
]),
|
|
656
|
+
);
|
|
657
|
+
|
|
658
|
+
await filesystem.writeTextAtomic(
|
|
659
|
+
"node_modules/hono/package.json",
|
|
660
|
+
JSON.stringify({ name: "hono", version: "4.12.35", main: "missing.js" }),
|
|
661
|
+
);
|
|
662
|
+
const incomplete = await readProjectOverview(filesystem);
|
|
663
|
+
expect(incomplete.stack_components).toEqual(
|
|
664
|
+
expect.arrayContaining([
|
|
665
|
+
expect.objectContaining({ name: "Hono", installation: "missing", version: null }),
|
|
666
|
+
]),
|
|
667
|
+
);
|
|
668
|
+
});
|
|
427
669
|
});
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { promisify } from "node:util";
|
|
1
4
|
import {
|
|
2
5
|
PROJECT_CONFIG_PATH,
|
|
3
6
|
type ProjectConfig,
|
|
@@ -11,7 +14,9 @@ import {
|
|
|
11
14
|
const AGENT_CATALOG_PATH = ".agents/config/agents/catalog.yaml";
|
|
12
15
|
const CODEX_CONFIG_PATH = ".codex/config.toml";
|
|
13
16
|
const FRAMEWORK_LOCK_PATH = ".agents/config/framework.lock.yaml";
|
|
14
|
-
const SQLITE_READ_MODEL_PATH = ".local/
|
|
17
|
+
const SQLITE_READ_MODEL_PATH = ".local/sqlite/zaip-aios-dashboard.sqlite";
|
|
18
|
+
const DASHBOARD_STACK_DEPENDENCIES_PATH = ".agents/dashboard/stack-dependencies.json";
|
|
19
|
+
const exec = promisify(execFile);
|
|
15
20
|
export const SOFTWARE_ARCHITECTURE_PATH = ".agents/architecture/software-architecture.md";
|
|
16
21
|
|
|
17
22
|
export type ProjectOverview = {
|
|
@@ -24,8 +29,10 @@ export type ProjectOverview = {
|
|
|
24
29
|
stack_components: Array<{
|
|
25
30
|
name: string;
|
|
26
31
|
version: string | null;
|
|
32
|
+
configured_version: string | null;
|
|
27
33
|
source: string | null;
|
|
28
34
|
verification: "exact" | "constraint" | "unavailable";
|
|
35
|
+
installation: "runtime" | "installed" | "missing" | "bundled";
|
|
29
36
|
}>;
|
|
30
37
|
areas: Array<{
|
|
31
38
|
id:
|
|
@@ -142,63 +149,252 @@ async function countCodexHookEvents(filesystem: WorkspaceFileSystem): Promise<nu
|
|
|
142
149
|
async function readVerifiedStackComponents(
|
|
143
150
|
filesystem: WorkspaceFileSystem,
|
|
144
151
|
): Promise<ProjectOverview["stack_components"]> {
|
|
145
|
-
const [
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
component("BullMQ", packageVersion(rootPackage, "bullmq"), "package.json", "exact"),
|
|
157
|
-
component(
|
|
158
|
-
"Hono",
|
|
159
|
-
packageVersion(dashboardRuntime, "hono"),
|
|
160
|
-
".agents/dashboard/packages/local-runtime/package.json",
|
|
161
|
-
"exact",
|
|
152
|
+
const [project, fallback, bundledRuntime, bundledFrontend, git, terraform] = await Promise.all([
|
|
153
|
+
readProjectSettings(filesystem),
|
|
154
|
+
readDashboardStackDependencies(filesystem),
|
|
155
|
+
hasNonEmptyFile(filesystem, ".agents/dashboard/packages/local-runtime/server.mjs"),
|
|
156
|
+
hasBundledDashboardFrontend(filesystem),
|
|
157
|
+
executableComponent(
|
|
158
|
+
filesystem,
|
|
159
|
+
"Git",
|
|
160
|
+
["--version"],
|
|
161
|
+
"git",
|
|
162
|
+
(output) => /^git version (.+)$/m.exec(output.trim())?.[1] ?? null,
|
|
162
163
|
),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
executableComponent(filesystem, "Terraform", ["version", "-json"], "terraform", (output) => {
|
|
165
|
+
try {
|
|
166
|
+
const version = JSON.parse(output).terraform_version;
|
|
167
|
+
return typeof version === "string" ? version : null;
|
|
168
|
+
} catch {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
}),
|
|
172
|
+
]);
|
|
173
|
+
const configured = configuredStackVersions(project, fallback);
|
|
174
|
+
const packages = await Promise.all(
|
|
175
|
+
["typescript", "vite", "astro", "redis", "bullmq", "hono", "react"].map((name) =>
|
|
176
|
+
readInstalledPackageVersion(filesystem, name),
|
|
168
177
|
),
|
|
178
|
+
);
|
|
179
|
+
const installed = new Map(packages.map((item) => [item.name, item]));
|
|
180
|
+
return [
|
|
181
|
+
runtimeComponent("Node.js", process.versions.node, configured.get("node")),
|
|
182
|
+
packageComponent("TypeScript", "typescript", configured.get("typescript"), installed),
|
|
183
|
+
packageComponent("Vite", "vite", configured.get("vite"), installed),
|
|
184
|
+
packageComponent("Astro", "astro", configured.get("astro"), installed),
|
|
185
|
+
packageComponent("Redis", "redis", configured.get("redis"), installed),
|
|
186
|
+
packageComponent("BullMQ", "bullmq", configured.get("bullmq"), installed),
|
|
187
|
+
packageComponent("Hono", "hono", configured.get("hono"), installed, bundledRuntime),
|
|
188
|
+
packageComponent("React", "react", configured.get("react"), installed, bundledFrontend),
|
|
189
|
+
git,
|
|
190
|
+
terraform,
|
|
169
191
|
];
|
|
170
192
|
}
|
|
171
193
|
|
|
172
|
-
type
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
194
|
+
type InstalledPackage = { name: string; version: string | null; source: string | null };
|
|
195
|
+
type DashboardStackDependencies = { node: string | null; packages: Map<string, string> };
|
|
196
|
+
|
|
197
|
+
async function readInstalledPackageVersion(
|
|
198
|
+
filesystem: WorkspaceFileSystem,
|
|
199
|
+
name: string,
|
|
200
|
+
): Promise<InstalledPackage> {
|
|
201
|
+
const roots = ["node_modules"];
|
|
202
|
+
if (name === "hono") roots.push(".agents/dashboard/packages/local-runtime/node_modules");
|
|
203
|
+
if (name === "react") roots.push(".agents/dashboard/apps/frontend/node_modules");
|
|
204
|
+
for (const root of roots) {
|
|
205
|
+
try {
|
|
206
|
+
const source = `${root}/${name}/package.json`;
|
|
207
|
+
const value = recordValue(JSON.parse(await filesystem.readText(source)));
|
|
208
|
+
const version = stringValue(value.version);
|
|
209
|
+
const entrypoint = packageEntrypoint(value);
|
|
210
|
+
if (
|
|
211
|
+
value.name !== name ||
|
|
212
|
+
version === null ||
|
|
213
|
+
!/^\d+\.\d+\.\d+(?:-[\w.-]+)?(?:\+[\w.-]+)?$/.test(version) ||
|
|
214
|
+
entrypoint === null
|
|
215
|
+
)
|
|
216
|
+
continue;
|
|
217
|
+
await filesystem.readText(`${root}/${name}/${entrypoint}`);
|
|
218
|
+
return { name, version, source };
|
|
219
|
+
} catch {
|
|
220
|
+
// A pnpm workspace can install dependencies in the owning package only.
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return { name, version: null, source: null };
|
|
224
|
+
}
|
|
176
225
|
|
|
177
|
-
async function
|
|
226
|
+
async function readDashboardStackDependencies(
|
|
178
227
|
filesystem: WorkspaceFileSystem,
|
|
179
|
-
|
|
180
|
-
): Promise<PackageJson> {
|
|
228
|
+
): Promise<DashboardStackDependencies> {
|
|
181
229
|
try {
|
|
182
|
-
const
|
|
183
|
-
|
|
230
|
+
const source = recordValue(
|
|
231
|
+
JSON.parse(await filesystem.readText(DASHBOARD_STACK_DEPENDENCIES_PATH)),
|
|
232
|
+
);
|
|
233
|
+
const packages = new Map<string, string>();
|
|
234
|
+
for (const item of Array.isArray(source.packages) ? source.packages : []) {
|
|
235
|
+
const definition = recordValue(item);
|
|
236
|
+
const name = stringValue(definition.name);
|
|
237
|
+
const version = stringValue(definition.version);
|
|
238
|
+
if (name !== null && version !== null) packages.set(name, version);
|
|
239
|
+
}
|
|
240
|
+
return { node: stringValue(source.node), packages };
|
|
184
241
|
} catch {
|
|
185
|
-
return {};
|
|
242
|
+
return { node: null, packages: new Map() };
|
|
186
243
|
}
|
|
187
244
|
}
|
|
188
245
|
|
|
189
|
-
function
|
|
190
|
-
|
|
246
|
+
function configuredStackVersions(
|
|
247
|
+
project: ProjectConfig,
|
|
248
|
+
fallback: DashboardStackDependencies,
|
|
249
|
+
): Map<string, string> {
|
|
250
|
+
const components = recordValue(recordValue(project.stack.overrides).components);
|
|
251
|
+
const configured = new Map(fallback.packages);
|
|
252
|
+
if (fallback.node !== null) configured.set("node", fallback.node);
|
|
253
|
+
for (const [component, packageName] of Object.entries({
|
|
254
|
+
backend_runtime: "node",
|
|
255
|
+
primary_language: "typescript",
|
|
256
|
+
web_language: "typescript",
|
|
257
|
+
web_build: "vite",
|
|
258
|
+
site_framework: "astro",
|
|
259
|
+
cache_messaging: "redis",
|
|
260
|
+
async_queue: "bullmq",
|
|
261
|
+
backend_api: "hono",
|
|
262
|
+
web_framework: "react",
|
|
263
|
+
})) {
|
|
264
|
+
const version = stringValue(recordValue(components[component]).version);
|
|
265
|
+
if (version !== null) configured.set(packageName, version);
|
|
266
|
+
}
|
|
267
|
+
return configured;
|
|
191
268
|
}
|
|
192
269
|
|
|
193
|
-
function
|
|
270
|
+
async function hasBundledDashboardFrontend(filesystem: WorkspaceFileSystem): Promise<boolean> {
|
|
271
|
+
try {
|
|
272
|
+
return (await filesystem.listFiles(".agents/dashboard/apps/frontend/dist", ".js")).length > 0;
|
|
273
|
+
} catch {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
async function hasNonEmptyFile(filesystem: WorkspaceFileSystem, path: string): Promise<boolean> {
|
|
279
|
+
try {
|
|
280
|
+
return (await filesystem.readText(path)).trim().length > 0;
|
|
281
|
+
} catch {
|
|
282
|
+
return false;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
async function executableComponent(
|
|
287
|
+
filesystem: WorkspaceFileSystem,
|
|
288
|
+
name: string,
|
|
289
|
+
args: string[],
|
|
290
|
+
command: "git" | "terraform",
|
|
291
|
+
parse: (output: string) => string | null,
|
|
292
|
+
): Promise<ProjectOverview["stack_components"][number]> {
|
|
293
|
+
const project = await readProjectSettings(filesystem);
|
|
294
|
+
const components = recordValue(recordValue(project.stack.overrides).components);
|
|
295
|
+
const configuredVersion =
|
|
296
|
+
command === "git"
|
|
297
|
+
? "latest"
|
|
298
|
+
: (stringValue(recordValue(components.backend_infrastructure).version) ?? "1.16.1");
|
|
299
|
+
const safeTerraformVersion = /^\d+\.\d+\.\d+$/.test(configuredVersion)
|
|
300
|
+
? configuredVersion
|
|
301
|
+
: "1.16.1";
|
|
302
|
+
const local =
|
|
303
|
+
command === "git"
|
|
304
|
+
? ".local/git/cmd/git.exe"
|
|
305
|
+
: `.local/terraform/v${safeTerraformVersion}-${process.platform}-${process.arch}/${
|
|
306
|
+
process.platform === "win32" ? "terraform.exe" : "terraform"
|
|
307
|
+
}`;
|
|
308
|
+
const localPath = join(filesystem.root, local);
|
|
309
|
+
const executable = (await filesystem.exists(local)) ? localPath : command;
|
|
310
|
+
try {
|
|
311
|
+
const version = parse(
|
|
312
|
+
(await exec(executable, args, { timeout: 10_000, windowsHide: true })).stdout,
|
|
313
|
+
);
|
|
314
|
+
if (version === null) throw new Error("unsupported version output");
|
|
315
|
+
return {
|
|
316
|
+
name,
|
|
317
|
+
version,
|
|
318
|
+
configured_version: configuredVersion,
|
|
319
|
+
source: executable === command ? `Comando do workspace: ${command}` : local,
|
|
320
|
+
verification: "exact",
|
|
321
|
+
installation: executable === command ? "runtime" : "installed",
|
|
322
|
+
};
|
|
323
|
+
} catch {
|
|
324
|
+
return {
|
|
325
|
+
name,
|
|
326
|
+
version: null,
|
|
327
|
+
configured_version: configuredVersion,
|
|
328
|
+
source: null,
|
|
329
|
+
verification: "unavailable",
|
|
330
|
+
installation: "missing",
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function runtimeComponent(
|
|
194
336
|
name: string,
|
|
195
337
|
version: string | null,
|
|
196
|
-
|
|
197
|
-
verification: "exact" | "constraint",
|
|
338
|
+
configuredVersion: string | undefined,
|
|
198
339
|
): ProjectOverview["stack_components"][number] {
|
|
199
|
-
return
|
|
200
|
-
|
|
201
|
-
|
|
340
|
+
return {
|
|
341
|
+
name,
|
|
342
|
+
version,
|
|
343
|
+
configured_version: configuredVersion ?? null,
|
|
344
|
+
source: `Runtime do Dashboard: ${process.execPath}`,
|
|
345
|
+
verification: "exact",
|
|
346
|
+
installation: "runtime",
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function packageComponent(
|
|
351
|
+
name: string,
|
|
352
|
+
packageName: string,
|
|
353
|
+
configuredVersion: string | undefined,
|
|
354
|
+
installed: ReadonlyMap<string, InstalledPackage>,
|
|
355
|
+
bundled = false,
|
|
356
|
+
): ProjectOverview["stack_components"][number] {
|
|
357
|
+
const actual = installed.get(packageName)?.version ?? null;
|
|
358
|
+
if (actual !== null)
|
|
359
|
+
return {
|
|
360
|
+
name,
|
|
361
|
+
version: actual,
|
|
362
|
+
configured_version: configuredVersion ?? null,
|
|
363
|
+
source: installed.get(packageName)?.source ?? null,
|
|
364
|
+
verification: "exact",
|
|
365
|
+
installation: "installed",
|
|
366
|
+
};
|
|
367
|
+
if (bundled)
|
|
368
|
+
return {
|
|
369
|
+
name,
|
|
370
|
+
version: null,
|
|
371
|
+
configured_version: configuredVersion ?? null,
|
|
372
|
+
source:
|
|
373
|
+
packageName === "hono"
|
|
374
|
+
? ".agents/dashboard/packages/local-runtime/server.mjs"
|
|
375
|
+
: ".agents/dashboard/apps/frontend/dist",
|
|
376
|
+
verification: "unavailable",
|
|
377
|
+
installation: "bundled",
|
|
378
|
+
};
|
|
379
|
+
return {
|
|
380
|
+
name,
|
|
381
|
+
version: null,
|
|
382
|
+
configured_version: configuredVersion ?? null,
|
|
383
|
+
source: null,
|
|
384
|
+
verification: "unavailable",
|
|
385
|
+
installation: "missing",
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
function stringValue(value: unknown): string | null {
|
|
390
|
+
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
function packageEntrypoint(pkg: Record<string, unknown>): string | null {
|
|
394
|
+
if (typeof pkg.bin === "string") return pkg.bin;
|
|
395
|
+
const bin = Object.values(recordValue(pkg.bin)).find((value) => typeof value === "string");
|
|
396
|
+
if (typeof bin === "string") return bin;
|
|
397
|
+
return stringValue(pkg.main);
|
|
202
398
|
}
|
|
203
399
|
|
|
204
400
|
export async function persistProjectSettings(
|
|
@@ -211,6 +407,8 @@ export async function persistProjectSettings(
|
|
|
211
407
|
if (requested.tracking.storage_mode !== "tracked_sanitized") {
|
|
212
408
|
throw new TypeError("This project requires Git-native tracked_sanitized storage.");
|
|
213
409
|
}
|
|
410
|
+
const currentComponents = recordValue(current.stack.overrides.components);
|
|
411
|
+
const requestedComponents = recordValue(requested.stack.overrides.components);
|
|
214
412
|
const candidate = parseProjectConfig({
|
|
215
413
|
...requested,
|
|
216
414
|
clients: current.clients,
|
|
@@ -221,6 +419,9 @@ export async function persistProjectSettings(
|
|
|
221
419
|
overrides: {
|
|
222
420
|
...current.stack.overrides,
|
|
223
421
|
...requested.stack.overrides,
|
|
422
|
+
...(Object.keys(currentComponents).length > 0 || Object.keys(requestedComponents).length > 0
|
|
423
|
+
? { components: { ...currentComponents, ...requestedComponents } }
|
|
424
|
+
: {}),
|
|
224
425
|
},
|
|
225
426
|
},
|
|
226
427
|
});
|
|
@@ -250,6 +451,7 @@ const componentLabels: Record<string, string> = {
|
|
|
250
451
|
cache_messaging: "Cache e mensageria",
|
|
251
452
|
async_queue: "Filas e processamento assíncrono",
|
|
252
453
|
backend_infrastructure: "Infraestrutura backend",
|
|
454
|
+
backend_hosting: "Hospedagem do backend",
|
|
253
455
|
web_framework: "Framework do Web App",
|
|
254
456
|
web_language: "Linguagem do Web App",
|
|
255
457
|
web_build: "Build do Web App",
|
|
@@ -259,6 +461,14 @@ const componentLabels: Record<string, string> = {
|
|
|
259
461
|
site_islands: "Componentes interativos",
|
|
260
462
|
site_build: "Build do site",
|
|
261
463
|
site_hosting: "Hospedagem do site",
|
|
464
|
+
prometheus: "Coleta de métricas",
|
|
465
|
+
grafana: "Dashboards",
|
|
466
|
+
uptime_kuma: "Monitoramento de disponibilidade",
|
|
467
|
+
cadvisor: "Métricas de containers",
|
|
468
|
+
node_exporter: "Métricas de host",
|
|
469
|
+
redis_exporter: "Métricas do Redis",
|
|
470
|
+
k6: "Teste de carga",
|
|
471
|
+
autocannon: "Teste HTTP de carga",
|
|
262
472
|
};
|
|
263
473
|
|
|
264
474
|
const architectureLabels: Record<string, string> = {
|
|
@@ -266,6 +476,7 @@ const architectureLabels: Record<string, string> = {
|
|
|
266
476
|
backend_api_and_business_rules: "APIs e regras de negócio",
|
|
267
477
|
backend_async_processing: "Filas e processamento assíncrono",
|
|
268
478
|
backend_infrastructure: "Infraestrutura backend",
|
|
479
|
+
backend_hosting: "Hospedagem do backend",
|
|
269
480
|
};
|
|
270
481
|
|
|
271
482
|
export function renderSoftwareArchitecture(config: ProjectConfig): string {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export const agentPortraitFiles: Record<string, string> = {
|
|
2
|
+
"agent-orchestrator": "1 - Dave - Product Owner.png",
|
|
3
|
+
"agent-builder": "2 - Rafa - Tech Lead.png",
|
|
4
|
+
"agent-task-executor": "3 - Leo - Software Engineer.png",
|
|
5
|
+
"agent-analyst": "4 - Bia - Product Manager.png",
|
|
6
|
+
"agent-finalizer": "5 - Gui - Quality Assurance Lead.png",
|
|
7
|
+
"agent-reviewer": "6 - Nanda - Principal Engineer.png",
|
|
8
|
+
"agent-integrator": "7 - Dani - Integration Engineer.png",
|
|
9
|
+
"agent-auditor": "8 - Ana - Quality Auditor.png",
|
|
10
|
+
"agent-text-summarizer": "9 - Lia - Technical Writer.png",
|
|
11
|
+
"agent-data-analyst": "10 - Gabi - Data Analyst.png",
|
|
12
|
+
"agent-refactoring-specialist": "11 - Tati - Refactoring Specialist.png",
|
|
13
|
+
"agent-frontend": "12 - Doug - Frontend Developer.png",
|
|
14
|
+
"agent-backend": "13 - Will - Backend Developer.png",
|
|
15
|
+
"agent-website-developer": "14 - Jonny - Website Developer.png",
|
|
16
|
+
"agent-designer": "15 - Manu - Product Designer.png",
|
|
17
|
+
"agent-cloud-engineer": "16 - Dan - Cloud Engineer.png",
|
|
18
|
+
"agent-security-auditor": "17 - Luis - Security Auditor.png",
|
|
19
|
+
"agent-marketing-analyst": "18 - Lucia - Marketing Analyst.png",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
interface ActiveWorkItem {
|
|
23
|
+
kind: string;
|
|
24
|
+
id: string;
|
|
25
|
+
status: string | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function openWorkIds(items: readonly ActiveWorkItem[]): string[] {
|
|
29
|
+
const kinds = new Set(["prd", "spec", "change", "task", "execution"]);
|
|
30
|
+
const statuses = new Set(["active", "executing", "verifying", "running", "paused"]);
|
|
31
|
+
return items
|
|
32
|
+
.filter(
|
|
33
|
+
(item) =>
|
|
34
|
+
kinds.has(item.kind) &&
|
|
35
|
+
(statuses.has(item.status ?? "") || (item.kind === "task" && item.status === "planned")),
|
|
36
|
+
)
|
|
37
|
+
.map((item) => item.id)
|
|
38
|
+
.sort();
|
|
39
|
+
}
|