@zaip-ai/cli 1.3.8 → 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 +58 -3
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +17 -6
- 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 +2 -0
- 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-plan.d.ts +3 -1
- package/dist/services/stack-plan.d.ts.map +1 -1
- package/dist/services/stack-plan.js +15 -1
- package/dist/services/stack-plan.js.map +1 -1
- 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 +1 -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 +200 -88
- 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-VcLx9iOO.js → DashboardHelpDialog-oZVlf-l5.js} +72 -8
- 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/{TraceabilityWorkspace-DFZwIXSC.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/ProjectStackEditor.tsx +11 -0
- 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 +7 -8
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +14 -2
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +35 -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 +482 -332
- 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 +90 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +112 -22
- 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/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 +599 -167
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-BwnJpl02.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-Dyo_wpL4.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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
|
-
import { mkdir, mkdtemp, readdir, readFile, rename, utimes, writeFile } from "node:fs/promises";
|
|
2
|
+
import { mkdir, mkdtemp, readdir, readFile, rename, rm, utimes, writeFile } from "node:fs/promises";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { DatabaseSync } from "node:sqlite";
|
|
5
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
5
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { createDashboardApp, projectAllTimeTopTasks } from "./server.js";
|
|
7
7
|
import { expectFastCostPagesMatchCanonical } from "./sqlite-cost-fast-page-parity.test-support.js";
|
|
8
8
|
import {
|
|
@@ -24,6 +24,8 @@ async function createSqliteTestRoot(): Promise<string> {
|
|
|
24
24
|
return mkdtemp(join(sqliteTestTempRoot, "fixture-"));
|
|
25
25
|
}
|
|
26
26
|
afterEach(async () => {
|
|
27
|
+
vi.useRealTimers();
|
|
28
|
+
vi.restoreAllMocks();
|
|
27
29
|
await Promise.all(
|
|
28
30
|
roots
|
|
29
31
|
.splice(0)
|
|
@@ -33,6 +35,93 @@ afterEach(async () => {
|
|
|
33
35
|
);
|
|
34
36
|
});
|
|
35
37
|
describe("SQLite dashboard read model", () => {
|
|
38
|
+
it("materializes a fresh workspace without opening a nonexistent checkpoint database", async () => {
|
|
39
|
+
const root = await createSqliteTestRoot();
|
|
40
|
+
roots.push(root);
|
|
41
|
+
await mkdir(join(root, ".agents/config"), { recursive: true });
|
|
42
|
+
await writeFile(join(root, ".agents/config/project.yaml"), "zaip:\n enabled: true\n");
|
|
43
|
+
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({ cache: "rebuilt" });
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("serves an existing model immediately, refreshes on the SP day boundary and removes deleted sources in place", async () => {
|
|
47
|
+
const root = await createSqliteTestRoot();
|
|
48
|
+
roots.push(root);
|
|
49
|
+
await mkdir(join(root, ".agents/config"), { recursive: true });
|
|
50
|
+
await mkdir(join(root, ".agents/records/tasks"), { recursive: true });
|
|
51
|
+
await writeFile(join(root, ".agents/config/project.yaml"), "zaip:\n enabled: true\n");
|
|
52
|
+
const task = join(root, ".agents/records/tasks/task.md");
|
|
53
|
+
await writeFile(task, "# initial\n");
|
|
54
|
+
vi.useFakeTimers({ toFake: ["Date"] });
|
|
55
|
+
vi.setSystemTime(new Date("2026-09-05T02:59:00Z"));
|
|
56
|
+
const first = await rebuildSqliteReadModel(root);
|
|
57
|
+
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({ cache: "generation" });
|
|
58
|
+
await rm(task);
|
|
59
|
+
await expect(rebuildSqliteReadModel(root, { preferExisting: true })).resolves.toMatchObject({
|
|
60
|
+
cache: "stale_seed",
|
|
61
|
+
files: 2,
|
|
62
|
+
path: first.path,
|
|
63
|
+
});
|
|
64
|
+
const next = await rebuildSqliteReadModel(root);
|
|
65
|
+
expect(next).toMatchObject({ cache: "rebuilt", files: 1, path: first.path });
|
|
66
|
+
vi.setSystemTime(new Date("2026-09-05T03:01:00Z"));
|
|
67
|
+
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({
|
|
68
|
+
cache: "rebuilt",
|
|
69
|
+
path: first.path,
|
|
70
|
+
});
|
|
71
|
+
expect(
|
|
72
|
+
(await readdir(join(root, ".local/sqlite"))).filter((name) => name.endsWith(".sqlite")),
|
|
73
|
+
).toEqual(["zaip-aios-dashboard.sqlite"]);
|
|
74
|
+
const database = new DatabaseSync(first.path, { readOnly: true });
|
|
75
|
+
try {
|
|
76
|
+
expect(
|
|
77
|
+
database
|
|
78
|
+
.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key='source_fingerprint'")
|
|
79
|
+
.get(),
|
|
80
|
+
).toMatchObject({ value: expect.stringContaining("current_day=2026-09-05") });
|
|
81
|
+
} finally {
|
|
82
|
+
database.close();
|
|
83
|
+
}
|
|
84
|
+
const filesystem = new SqliteReadModelFileSystem(root);
|
|
85
|
+
try {
|
|
86
|
+
await expect(filesystem.exists(".agents/records/tasks/task.md")).resolves.toBe(false);
|
|
87
|
+
} finally {
|
|
88
|
+
filesystem.close();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it("rolls back a failed refresh including first-fold payloads while a reader remains open", async () => {
|
|
93
|
+
const root = await createSqliteTestRoot();
|
|
94
|
+
roots.push(root);
|
|
95
|
+
await mkdir(join(root, ".agents/config"), { recursive: true });
|
|
96
|
+
const source = join(root, ".agents/config/project.yaml");
|
|
97
|
+
await writeFile(source, "zaip:\n enabled: true\n");
|
|
98
|
+
const original = await rebuildSqliteReadModel(root);
|
|
99
|
+
const reader = new SqliteReadModelFileSystem(root);
|
|
100
|
+
try {
|
|
101
|
+
expect(await reader.readText(".agents/config/project.yaml")).not.toContain("changed");
|
|
102
|
+
await writeFile(source, "zaip:\n enabled: true\nproject:\n id: changed\n");
|
|
103
|
+
const exec = DatabaseSync.prototype.exec;
|
|
104
|
+
const fault = vi.spyOn(DatabaseSync.prototype, "exec").mockImplementation(function (
|
|
105
|
+
this: DatabaseSync,
|
|
106
|
+
sql: string,
|
|
107
|
+
) {
|
|
108
|
+
if (sql.trim() === "COMMIT;") throw new Error("injected pre-commit failure");
|
|
109
|
+
return exec.call(this, sql);
|
|
110
|
+
});
|
|
111
|
+
await expect(rebuildSqliteReadModel(root)).rejects.toThrow("injected pre-commit failure");
|
|
112
|
+
fault.mockRestore();
|
|
113
|
+
reader.refresh();
|
|
114
|
+
expect(await reader.readText(".agents/config/project.yaml")).not.toContain("changed");
|
|
115
|
+
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({
|
|
116
|
+
path: original.path,
|
|
117
|
+
cache: "rebuilt",
|
|
118
|
+
});
|
|
119
|
+
reader.refresh();
|
|
120
|
+
expect(await reader.readText(".agents/config/project.yaml")).toContain("changed");
|
|
121
|
+
} finally {
|
|
122
|
+
reader.close();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
36
125
|
it("snapshots sorted eligible canonical sources once for fingerprinting and ingestion", async () => {
|
|
37
126
|
const root = await createSqliteTestRoot();
|
|
38
127
|
roots.push(root);
|
|
@@ -59,6 +148,12 @@ describe("SQLite dashboard read model", () => {
|
|
|
59
148
|
await utimes(included, changedAt, changedAt);
|
|
60
149
|
const after = await sourceFingerprint(root);
|
|
61
150
|
expect(after.fingerprint).not.toBe(before.fingerprint);
|
|
151
|
+
await writeFile(included, "# replaced\n", "utf8");
|
|
152
|
+
await utimes(included, changedAt, changedAt);
|
|
153
|
+
const preservedMetadata = await sourceFingerprint(root);
|
|
154
|
+
expect(preservedMetadata.candidates.at(-1)?.size).toBe(after.candidates.at(-1)?.size);
|
|
155
|
+
expect(preservedMetadata.candidates.at(-1)?.mtimeMs).toBe(after.candidates.at(-1)?.mtimeMs);
|
|
156
|
+
expect(preservedMetadata.fingerprint).not.toBe(after.fingerprint);
|
|
62
157
|
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({ files: 2 });
|
|
63
158
|
});
|
|
64
159
|
|
|
@@ -87,7 +182,7 @@ describe("SQLite dashboard read model", () => {
|
|
|
87
182
|
".agents/records/lifecycle/views/foreign.json",
|
|
88
183
|
);
|
|
89
184
|
});
|
|
90
|
-
it("
|
|
185
|
+
it("rebuilds the persistent database after a canonical change", async () => {
|
|
91
186
|
const root = await createSqliteTestRoot();
|
|
92
187
|
roots.push(root);
|
|
93
188
|
const task = join(root, ".agents", "records", "tasks", "task.md");
|
|
@@ -101,25 +196,11 @@ describe("SQLite dashboard read model", () => {
|
|
|
101
196
|
await writeFile(task, "# original\n", "utf8");
|
|
102
197
|
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({ cache: "rebuilt" });
|
|
103
198
|
await writeFile(task, "# changed canonically\n", "utf8");
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({
|
|
110
|
-
cache: "stale_seed",
|
|
111
|
-
files: 2,
|
|
112
|
-
});
|
|
113
|
-
await expect(rebuildSqliteReadModel(root, { forceCanonical: true })).resolves.toMatchObject({
|
|
114
|
-
cache: "rebuilt",
|
|
115
|
-
files: 2,
|
|
116
|
-
});
|
|
117
|
-
} finally {
|
|
118
|
-
if (previousPath === undefined) delete process.env.ZAIP_SQLITE_DB_PATH;
|
|
119
|
-
else process.env.ZAIP_SQLITE_DB_PATH = previousPath;
|
|
120
|
-
if (previousSeed === undefined) delete process.env.ZAIP_SQLITE_PREFER_LAST_VALID_SEED;
|
|
121
|
-
else process.env.ZAIP_SQLITE_PREFER_LAST_VALID_SEED = previousSeed;
|
|
122
|
-
}
|
|
199
|
+
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({
|
|
200
|
+
cache: "rebuilt",
|
|
201
|
+
files: 2,
|
|
202
|
+
path: join(root, ".local", "sqlite", "zaip-aios-dashboard.sqlite"),
|
|
203
|
+
});
|
|
123
204
|
});
|
|
124
205
|
|
|
125
206
|
it("keeps an exact cached range valid with future facts and fast-paths an empty later month", async () => {
|
|
@@ -133,7 +214,7 @@ describe("SQLite dashboard read model", () => {
|
|
|
133
214
|
"utf8",
|
|
134
215
|
);
|
|
135
216
|
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({ cache: "rebuilt" });
|
|
136
|
-
const path = join(root, ".local", "
|
|
217
|
+
const path = join(root, ".local", "sqlite", "zaip-aios-dashboard.sqlite");
|
|
137
218
|
const database = new DatabaseSync(path);
|
|
138
219
|
database
|
|
139
220
|
.prepare(
|
|
@@ -199,7 +280,7 @@ describe("SQLite dashboard read model", () => {
|
|
|
199
280
|
}
|
|
200
281
|
});
|
|
201
282
|
|
|
202
|
-
it("
|
|
283
|
+
it("uses only the official persistent path after a rebuild", async () => {
|
|
203
284
|
const root = await createSqliteTestRoot();
|
|
204
285
|
roots.push(root);
|
|
205
286
|
await mkdir(join(root, ".agents", "records", "tasks"), { recursive: true });
|
|
@@ -210,33 +291,20 @@ describe("SQLite dashboard read model", () => {
|
|
|
210
291
|
"utf8",
|
|
211
292
|
);
|
|
212
293
|
await writeFile(join(root, ".agents", "records", "tasks", "task.md"), "# task\n", "utf8");
|
|
213
|
-
await
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
);
|
|
218
|
-
expect(
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
)
|
|
226
|
-
|
|
227
|
-
oldSeed.close();
|
|
228
|
-
const priorPath = process.env.ZAIP_SQLITE_DB_PATH;
|
|
229
|
-
const priorSeed = process.env.ZAIP_SQLITE_PREFER_LAST_VALID_SEED;
|
|
230
|
-
try {
|
|
231
|
-
process.env.ZAIP_SQLITE_DB_PATH = join(root, ".local", "dashboard-sqlite", "migrated.sqlite");
|
|
232
|
-
process.env.ZAIP_SQLITE_PREFER_LAST_VALID_SEED = "1";
|
|
233
|
-
await expect(rebuildSqliteReadModel(root)).resolves.toMatchObject({ cache: "rebuilt" });
|
|
234
|
-
} finally {
|
|
235
|
-
if (priorPath === undefined) delete process.env.ZAIP_SQLITE_DB_PATH;
|
|
236
|
-
else process.env.ZAIP_SQLITE_DB_PATH = priorPath;
|
|
237
|
-
if (priorSeed === undefined) delete process.env.ZAIP_SQLITE_PREFER_LAST_VALID_SEED;
|
|
238
|
-
else process.env.ZAIP_SQLITE_PREFER_LAST_VALID_SEED = priorSeed;
|
|
239
|
-
}
|
|
294
|
+
const result = await rebuildSqliteReadModel(root);
|
|
295
|
+
expect(result.path).toBe(join(root, ".local", "sqlite", "zaip-aios-dashboard.sqlite"));
|
|
296
|
+
expect(await readdir(join(root, ".local", "sqlite"))).toEqual(
|
|
297
|
+
expect.arrayContaining(["zaip-aios-dashboard.sqlite"]),
|
|
298
|
+
);
|
|
299
|
+
expect(
|
|
300
|
+
(await readdir(join(root, ".local", "sqlite"))).every((name) =>
|
|
301
|
+
[
|
|
302
|
+
"zaip-aios-dashboard.sqlite",
|
|
303
|
+
"zaip-aios-dashboard.sqlite-shm",
|
|
304
|
+
"zaip-aios-dashboard.sqlite-wal",
|
|
305
|
+
].includes(name),
|
|
306
|
+
),
|
|
307
|
+
).toBe(true);
|
|
240
308
|
});
|
|
241
309
|
|
|
242
310
|
it("rateia sobreposição e virada de dia na fato temporal aditiva", () => {
|
|
@@ -797,7 +865,7 @@ created_at: 2026-08-10T11:01:00.000Z
|
|
|
797
865
|
"utf8",
|
|
798
866
|
);
|
|
799
867
|
await rebuildSqliteReadModel(root);
|
|
800
|
-
const database = new DatabaseSync(resolve(root, ".local/
|
|
868
|
+
const database = new DatabaseSync(resolve(root, ".local/sqlite/zaip-aios-dashboard.sqlite"), {
|
|
801
869
|
readOnly: true,
|
|
802
870
|
});
|
|
803
871
|
expect(
|
|
@@ -1176,7 +1244,7 @@ created_at: 2026-08-10T11:01:00.000Z
|
|
|
1176
1244
|
);
|
|
1177
1245
|
|
|
1178
1246
|
await rebuildSqliteReadModel(root);
|
|
1179
|
-
const snapshot = new DatabaseSync(resolve(root, ".local/
|
|
1247
|
+
const snapshot = new DatabaseSync(resolve(root, ".local/sqlite/zaip-aios-dashboard.sqlite"), {
|
|
1180
1248
|
readOnly: true,
|
|
1181
1249
|
});
|
|
1182
1250
|
try {
|
|
@@ -1184,7 +1252,7 @@ created_at: 2026-08-10T11:01:00.000Z
|
|
|
1184
1252
|
snapshot
|
|
1185
1253
|
.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key='schema_version'")
|
|
1186
1254
|
.get(),
|
|
1187
|
-
).toEqual({ value: "
|
|
1255
|
+
).toEqual({ value: "73" });
|
|
1188
1256
|
} finally {
|
|
1189
1257
|
snapshot.close();
|
|
1190
1258
|
}
|
|
@@ -1671,11 +1739,15 @@ created_at: 2026-08-10T11:01:00.000Z
|
|
|
1671
1739
|
"utf8",
|
|
1672
1740
|
);
|
|
1673
1741
|
await rebuildSqliteReadModel(root);
|
|
1674
|
-
const database = new DatabaseSync(resolve(root, ".local/
|
|
1742
|
+
const database = new DatabaseSync(resolve(root, ".local/sqlite/zaip-aios-dashboard.sqlite"), {
|
|
1675
1743
|
readOnly: true,
|
|
1676
1744
|
});
|
|
1677
1745
|
expect(
|
|
1678
|
-
database
|
|
1746
|
+
database
|
|
1747
|
+
.prepare(
|
|
1748
|
+
"SELECT duration_ms, duration_provenance FROM zaip_aios_activities WHERE payload_type IS NULL",
|
|
1749
|
+
)
|
|
1750
|
+
.get(),
|
|
1679
1751
|
).toEqual({ duration_ms: 1_800_000, duration_provenance: "attributed_token_active" });
|
|
1680
1752
|
database.close();
|
|
1681
1753
|
});
|
|
@@ -1776,7 +1848,7 @@ created_at: 2026-08-10T11:01:00.000Z
|
|
|
1776
1848
|
"utf8",
|
|
1777
1849
|
);
|
|
1778
1850
|
await rebuildSqliteReadModel(root);
|
|
1779
|
-
const database = new DatabaseSync(resolve(root, ".local/
|
|
1851
|
+
const database = new DatabaseSync(resolve(root, ".local/sqlite/zaip-aios-dashboard.sqlite"), {
|
|
1780
1852
|
readOnly: true,
|
|
1781
1853
|
});
|
|
1782
1854
|
expect(
|
|
@@ -1971,7 +2043,7 @@ created_at: 2026-08-10T11:01:00.000Z
|
|
|
1971
2043
|
`${[historicalStarted, ...historicalRecords.slice(1)].map((record) => JSON.stringify(record)).join("\n")}\n`,
|
|
1972
2044
|
);
|
|
1973
2045
|
await rebuildSqliteReadModel(root);
|
|
1974
|
-
const database = new DatabaseSync(resolve(root, ".local/
|
|
2046
|
+
const database = new DatabaseSync(resolve(root, ".local/sqlite/zaip-aios-dashboard.sqlite"), {
|
|
1975
2047
|
readOnly: true,
|
|
1976
2048
|
});
|
|
1977
2049
|
expect(
|
|
@@ -3276,7 +3348,7 @@ created_at: 2026-08-10T11:01:00.000Z
|
|
|
3276
3348
|
cost_brl: null,
|
|
3277
3349
|
execution_day_count: 0,
|
|
3278
3350
|
});
|
|
3279
|
-
const database = new DatabaseSync(resolve(root, ".local/
|
|
3351
|
+
const database = new DatabaseSync(resolve(root, ".local/sqlite/zaip-aios-dashboard.sqlite"), {
|
|
3280
3352
|
readOnly: true,
|
|
3281
3353
|
});
|
|
3282
3354
|
const columns = (table: string) =>
|