@zaip-ai/cli 1.3.8 → 1.4.2

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.
Files changed (317) hide show
  1. package/README.md +58 -3
  2. package/dist/commands/init.d.ts +1 -0
  3. package/dist/commands/init.d.ts.map +1 -1
  4. package/dist/commands/init.js +17 -6
  5. package/dist/commands/init.js.map +1 -1
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +2 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/services/adapters.js +4 -4
  11. package/dist/services/adapters.js.map +1 -1
  12. package/dist/services/codex-config-template.d.ts +2 -2
  13. package/dist/services/codex-config-template.d.ts.map +1 -1
  14. package/dist/services/codex-config-template.js +3 -3
  15. package/dist/services/codex-config-template.js.map +1 -1
  16. package/dist/services/codex-rules.d.ts +1 -1
  17. package/dist/services/codex-rules.d.ts.map +1 -1
  18. package/dist/services/codex-rules.js +9 -24
  19. package/dist/services/codex-rules.js.map +1 -1
  20. package/dist/services/delivery-git-preflight.d.ts +23 -0
  21. package/dist/services/delivery-git-preflight.d.ts.map +1 -0
  22. package/dist/services/delivery-git-preflight.js +69 -0
  23. package/dist/services/delivery-git-preflight.js.map +1 -0
  24. package/dist/services/doctor.d.ts.map +1 -1
  25. package/dist/services/doctor.js +13 -1
  26. package/dist/services/doctor.js.map +1 -1
  27. package/dist/services/install-agents-template.d.ts.map +1 -1
  28. package/dist/services/install-agents-template.js +22 -28
  29. package/dist/services/install-agents-template.js.map +1 -1
  30. package/dist/services/install-profile.d.ts +8 -0
  31. package/dist/services/install-profile.d.ts.map +1 -0
  32. package/dist/services/install-profile.js +56 -0
  33. package/dist/services/install-profile.js.map +1 -0
  34. package/dist/services/logger.d.ts.map +1 -1
  35. package/dist/services/logger.js +6 -5
  36. package/dist/services/logger.js.map +1 -1
  37. package/dist/services/stack-git.d.ts +9 -0
  38. package/dist/services/stack-git.d.ts.map +1 -0
  39. package/dist/services/stack-git.js +188 -0
  40. package/dist/services/stack-git.js.map +1 -0
  41. package/dist/services/stack-plan.d.ts +3 -1
  42. package/dist/services/stack-plan.d.ts.map +1 -1
  43. package/dist/services/stack-plan.js +15 -1
  44. package/dist/services/stack-plan.js.map +1 -1
  45. package/dist/services/stack-terraform.d.ts +13 -0
  46. package/dist/services/stack-terraform.d.ts.map +1 -0
  47. package/dist/services/stack-terraform.js +274 -0
  48. package/dist/services/stack-terraform.js.map +1 -0
  49. package/dist/services/template-manifest.d.ts.map +1 -1
  50. package/dist/services/template-manifest.js +14 -1
  51. package/dist/services/template-manifest.js.map +1 -1
  52. package/dist/types.d.ts +1 -0
  53. package/dist/types.d.ts.map +1 -1
  54. package/package.json +1 -1
  55. package/templates/.agents/.env.example +34 -0
  56. package/templates/{README.md → .agents/README.md} +124 -60
  57. package/templates/.agents/config/agents/catalog.yaml +23 -23
  58. package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +1 -0
  59. package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +1 -0
  60. package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +5 -4
  61. package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +1 -0
  62. package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +1 -0
  63. package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +10 -7
  64. package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +1 -0
  65. package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +1 -0
  66. package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +1 -0
  67. package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +5 -4
  68. package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +1 -0
  69. package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +1 -0
  70. package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +1 -0
  71. package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +1 -0
  72. package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +5 -4
  73. package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +1 -0
  74. package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +1 -0
  75. package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +1 -0
  76. package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +1 -0
  77. package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +1 -0
  78. package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +1 -0
  79. package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +5 -4
  80. package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +1 -0
  81. package/templates/.agents/config/pricing/models.json +25 -1
  82. package/templates/.agents/config/project.yaml +2 -0
  83. package/templates/.agents/dashboard/.zaip-managed.json +208 -88
  84. package/templates/.agents/dashboard/DATA-DICTIONARY.md +1 -1
  85. package/templates/.agents/dashboard/README.md +58 -19
  86. package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-DwVZOmMV.js → CostCalculationGuidePage-snUCQYTC.js} +1 -1
  87. package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-VcLx9iOO.js → DashboardHelpDialog-oZVlf-l5.js} +72 -8
  88. package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-CyjMXkm8.js → PricingSettingsDialog-BPtVUGgs.js} +1 -1
  89. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-3Awyaovx.js +3 -0
  90. package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-DFZwIXSC.js → TraceabilityWorkspace-BYjVOHI_.js} +1 -1
  91. package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-DbaLbU2q.js +68 -0
  92. package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-DXBOtWNI.js → icons-vendor-TPUT2IUt.js} +1 -1
  93. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Cmlx8OYH.css +1 -0
  94. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-ZJFXmK7m.js +2 -0
  95. package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-DaNXQPyk.js → react-vendor-Ct48XHGL.js} +1 -1
  96. package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-I4AKqVDX.js → traceability-BDe4_Ubl.js} +1 -1
  97. package/templates/.agents/dashboard/apps/frontend/dist/index.html +6 -6
  98. package/templates/.agents/dashboard/apps/frontend/src/App.tsx +73 -67
  99. package/templates/.agents/dashboard/apps/frontend/src/AppLoadingBoundary.tsx +35 -7
  100. package/templates/.agents/dashboard/apps/frontend/src/AppWorkBoard.ts +55 -0
  101. package/templates/.agents/dashboard/apps/frontend/src/ProjectStackEditor.tsx +11 -0
  102. package/templates/.agents/dashboard/apps/frontend/src/app-loading-boundary.css +98 -0
  103. package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +5 -5
  104. package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-reconciliation.ts +33 -0
  105. package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +75 -0
  106. package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +7 -8
  107. package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +14 -2
  108. package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +35 -0
  109. package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +78 -2
  110. package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.test.ts +28 -0
  111. package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.ts +8 -5
  112. package/templates/.agents/dashboard/apps/frontend/src/use-app-effects.ts +180 -1
  113. package/templates/.agents/dashboard/modules/cost-monitor/src/contracts.ts +7 -4
  114. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorContent.tsx +13 -7
  115. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +14 -0
  116. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableDisplay.ts +211 -0
  117. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +152 -157
  118. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +155 -142
  119. package/templates/.agents/dashboard/modules/cost-monitor/src/react/InvocationManifestQuery.test.ts +145 -0
  120. package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +7 -5
  121. package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-compact-cost-page.ts +4 -1
  122. package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-group-page.ts +4 -1
  123. package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-run-page.ts +4 -1
  124. package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.ts +4 -4
  125. package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +79 -1
  126. package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +105 -11
  127. package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +482 -332
  128. package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +430 -285
  129. package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs +14 -2
  130. package/templates/.agents/dashboard/packages/local-runtime/scripts/rebuild-sqlite-read-model.mjs +6 -26
  131. package/templates/.agents/dashboard/packages/local-runtime/scripts/validate-sqlite-read-model.mjs +1 -1
  132. package/templates/.agents/dashboard/packages/local-runtime/scripts/verify-persistent-launch.mjs +268 -0
  133. package/templates/.agents/dashboard/packages/local-runtime/server.mjs +482 -332
  134. package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +90 -1
  135. package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +112 -22
  136. package/templates/.agents/dashboard/packages/local-runtime/src/server-agent-assets.ts +39 -0
  137. package/templates/.agents/dashboard/packages/local-runtime/src/server-browser-lease.ts +33 -0
  138. package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-refresh.test.ts +148 -11
  139. package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-result.test.ts +68 -0
  140. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.test.ts +19 -0
  141. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.ts +39 -43
  142. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-revision.test.ts +42 -0
  143. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-revision.ts +26 -0
  144. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +34 -0
  145. package/templates/.agents/dashboard/packages/local-runtime/src/server-startup.ts +30 -0
  146. package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.test.ts +89 -0
  147. package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.ts +88 -0
  148. package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +68 -7
  149. package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +11 -5
  150. package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +129 -99
  151. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-agent-productivity.test.ts +111 -0
  152. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-agent-productivity.ts +140 -0
  153. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.test.ts +127 -4
  154. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.ts +145 -5
  155. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-aggregates.ts +156 -23
  156. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-group-projection.ts +18 -9
  157. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-invocation-projection.ts +52 -0
  158. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-persistence.ts +35 -13
  159. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-force-canonical.test.ts +56 -0
  160. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-cache.test.ts +29 -0
  161. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-cache.ts +136 -0
  162. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-refresh.test.ts +251 -0
  163. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-projection.ts +22 -7
  164. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-cache.test-support.ts +1 -1
  165. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical-parsing.ts +42 -0
  166. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical.ts +793 -0
  167. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider-duration.test.ts +270 -0
  168. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider-fixture.ts +3 -2
  169. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider.test.ts +18 -4
  170. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.test.ts +87 -0
  171. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +105 -16
  172. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +131 -59
  173. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +1000 -1115
  174. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-cache.ts +13 -92
  175. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-claims.test.mjs +79 -0
  176. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-page.mjs +27 -0
  177. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-lifecycle.mjs +6 -6
  178. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-prerequisites.mjs +1 -1
  179. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-refresh.mjs +2 -10
  180. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-runtime-selection.mjs +36 -0
  181. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-runtime-selection.test.mjs +63 -0
  182. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-server.mjs +142 -0
  183. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +262 -267
  184. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +18 -29
  185. package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +6 -0
  186. package/templates/.agents/dashboard/zaip-dashboard-windows.exe +0 -0
  187. package/templates/.agents/requirements/autonomous-assurance.md +1 -1
  188. package/templates/.agents/requirements/cloud-hostinger-autonomy.md +47 -0
  189. package/templates/.agents/requirements/comparative-audit.md +1 -1
  190. package/templates/.agents/requirements/context-engine.md +1 -1
  191. package/templates/.agents/requirements/cost-observability.md +1 -1
  192. package/templates/.agents/requirements/dashboard-launch.md +2 -2
  193. package/templates/.agents/requirements/data-export.md +1 -1
  194. package/templates/.agents/requirements/design-system.md +1 -1
  195. package/templates/.agents/requirements/execution-engine.md +1 -1
  196. package/templates/.agents/requirements/kanban-dashboard.md +1 -1
  197. package/templates/.agents/requirements/model-orchestration.md +1 -1
  198. package/templates/.agents/requirements/public-distribution.md +1 -1
  199. package/templates/.agents/requirements/software-architecture.md +1 -1
  200. package/templates/.agents/requirements/strategic-improvements.md +1 -1
  201. package/templates/.agents/requirements/work-lifecycle.md +1 -1
  202. package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
  203. package/templates/.agents/rules/autonomy-decision.md +1 -1
  204. package/templates/.agents/rules/cloud-hostinger-autonomy.md +21 -0
  205. package/templates/.agents/rules/core.md +5 -4
  206. package/templates/.agents/rules/local-sqlite-storage.md +18 -0
  207. package/templates/.agents/rules/meta-mcp.md +21 -0
  208. package/templates/.agents/rules/workflow.md +1 -0
  209. package/templates/.agents/runtime/bin/zaip.mjs +305 -137
  210. package/templates/.agents/runtime/checksums.sha256 +2 -2
  211. package/templates/.agents/runtime/provenance.json +2 -2
  212. package/templates/.agents/skills/zaip-skill-api-to-mcp/SKILL.md +4 -0
  213. package/templates/.agents/skills/zaip-skill-brand-governance/SKILL.md +25 -9
  214. package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-framework.md +2 -2
  215. package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-standards.md +2 -2
  216. package/templates/.agents/skills/zaip-skill-change/references/observable-evidence.md +15 -0
  217. package/templates/.agents/skills/zaip-skill-dashboard-sqlite/SKILL.md +13 -5
  218. package/templates/.agents/skills/zaip-skill-data-analyst/SKILL.md +10 -5
  219. package/templates/.agents/skills/zaip-skill-execution/SKILL.md +5 -4
  220. package/templates/.agents/skills/zaip-skill-frontend-launcher/SKILL.md +4 -3
  221. package/templates/.agents/skills/zaip-skill-frontend-launcher/references/launcher-contract.md +5 -3
  222. package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +5 -5
  223. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs +78 -13
  224. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.test.mjs +59 -0
  225. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/yaml-parser.mjs +157 -0
  226. package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +11 -6
  227. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/SKILL.md +17 -0
  228. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/agents/openai.yaml +7 -0
  229. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/autonomous-cloud-inputs.example.json +41 -0
  230. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/autonomous-runner.md +84 -0
  231. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/operational-contract.md +19 -0
  232. package/templates/.agents/skills/zaip-skill-local-credentials/SKILL.md +43 -0
  233. package/templates/.agents/skills/zaip-skill-local-credentials/agents/openai.yaml +6 -0
  234. package/templates/.agents/skills/zaip-skill-local-credentials/references/dotenv-resolution.md +47 -0
  235. package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +8 -3
  236. package/templates/.agents/skills/zaip-skill-meta-ads/SKILL.md +16 -0
  237. package/templates/.agents/skills/zaip-skill-meta-ads/agents/openai.yaml +4 -0
  238. package/templates/.agents/skills/zaip-skill-meta-ads/references/setup.md +3 -0
  239. package/templates/.agents/skills/zaip-skill-meta-ads-setup/SKILL.md +24 -0
  240. package/templates/.agents/skills/zaip-skill-meta-ads-setup/agents/openai.yaml +4 -0
  241. package/templates/.agents/skills/zaip-skill-meta-ads-setup/references/diagnostics.md +13 -0
  242. package/templates/.agents/skills/zaip-skill-meta-ads-setup/references/official-sources.md +10 -0
  243. package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/SKILL.md +12 -0
  244. package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/agents/openai.yaml +4 -0
  245. package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/references/LICENSE +21 -0
  246. package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/references/upstream.md +77 -0
  247. package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/SKILL.md +12 -0
  248. package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/agents/openai.yaml +4 -0
  249. package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/references/LICENSE +21 -0
  250. package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/references/upstream.md +126 -0
  251. package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/SKILL.md +12 -0
  252. package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/agents/openai.yaml +4 -0
  253. package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/references/LICENSE +21 -0
  254. package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/references/upstream.md +67 -0
  255. package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/SKILL.md +12 -0
  256. package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/agents/openai.yaml +4 -0
  257. package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/references/LICENSE +21 -0
  258. package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/references/upstream.md +69 -0
  259. package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/SKILL.md +12 -0
  260. package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/agents/openai.yaml +4 -0
  261. package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/references/LICENSE +21 -0
  262. package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/references/upstream.md +79 -0
  263. package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/SKILL.md +14 -0
  264. package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/agents/openai.yaml +4 -0
  265. package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/references/LICENSE +21 -0
  266. package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/references/upstream.md +144 -0
  267. package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/SKILL.md +12 -0
  268. package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/agents/openai.yaml +4 -0
  269. package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/references/LICENSE +21 -0
  270. package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/references/upstream.md +83 -0
  271. package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/SKILL.md +10 -0
  272. package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/agents/openai.yaml +4 -0
  273. package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/references/LICENSE +21 -0
  274. package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/references/setup.md +11 -0
  275. package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/references/upstream.md +55 -0
  276. package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/SKILL.md +12 -0
  277. package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/agents/openai.yaml +4 -0
  278. package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/references/LICENSE +21 -0
  279. package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/references/upstream.md +56 -0
  280. package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +12 -7
  281. package/templates/.agents/skills/zaip-skill-sqlite-read-model/SKILL.md +11 -4
  282. package/templates/.agents/skills/zaip-skill-tool-setup/SKILL.md +6 -4
  283. package/templates/.agents/skills/zaip-skill-tool-setup/references/codex-config.md +4 -2
  284. package/templates/.agents/skills/zaip-skill-tool-setup/references/secrets.md +1 -0
  285. package/templates/.agents/tools/catalog.yaml +6 -0
  286. package/templates/.agents/tools/cloud-runner-dns.mjs +28 -0
  287. package/templates/.agents/tools/cloud-runner-terraform.mjs +212 -0
  288. package/templates/.agents/tools/cloud-runner.integration.test.mjs +239 -0
  289. package/templates/.agents/tools/cloud-runner.mjs +786 -0
  290. package/templates/.agents/tools/cloud-runner.test.mjs +534 -0
  291. package/templates/.agents/tools/cloud-terraform-plan-policy.mjs +262 -0
  292. package/templates/.agents/tools/mcp/development/meta-devtools/README.md +14 -0
  293. package/templates/.agents/tools/mcp/development/meta-devtools/manifest.yaml +28 -0
  294. package/templates/.agents/tools/mcp/infra/cloudflare/manifest.yaml +2 -3
  295. package/templates/.agents/tools/mcp/infra/hostinger/manifest.yaml +1 -3
  296. package/templates/.agents/tools/mcp/marketing/meta-ads/README.md +15 -13
  297. package/templates/.agents/tools/mcp/marketing/meta-ads/manifest.yaml +15 -10
  298. package/templates/.agents/tools/profiles/development.yaml +3 -0
  299. package/templates/infra/terraform/.terraform.lock.hcl +42 -0
  300. package/templates/infra/terraform/README.md +31 -0
  301. package/templates/infra/terraform/backend.tf.json +13 -0
  302. package/templates/infra/terraform/deployment-inputs.example.yaml +22 -0
  303. package/templates/infra/terraform/fixtures/approved-targets.json +32 -0
  304. package/templates/infra/terraform/fixtures/plan-approved.json +67 -0
  305. package/templates/infra/terraform/main.tf +77 -0
  306. package/templates/infra/terraform/outputs.tf +20 -0
  307. package/templates/infra/terraform/terraform.tfvars.example +26 -0
  308. package/templates/infra/terraform/variables.tf +91 -0
  309. package/templates/infra/terraform/versions.tf +18 -0
  310. package/templates/scripts/validate-cloud-hostinger-contract.mjs +89 -0
  311. package/templates/scripts/validate-cloud-terraform-plan.mjs +1 -0
  312. package/templates/template-manifest.json +607 -167
  313. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-BwnJpl02.js +0 -3
  314. package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-C09KmlSw.js +0 -68
  315. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Dyo_wpL4.js +0 -2
  316. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-hPPfVGQv.css +0 -1
  317. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-stale-seed.ts +0 -50
@@ -13,6 +13,7 @@ export function useCostRunPage({
13
13
  limit = 10,
14
14
  range,
15
15
  refresh,
16
+ revision,
16
17
  load,
17
18
  }: {
18
19
  view: CostView;
@@ -23,6 +24,8 @@ export function useCostRunPage({
23
24
  limit?: number;
24
25
  range: { from: string; to: string } | undefined;
25
26
  refresh: string | null;
27
+ /** Changes when the host promotes a new immutable dashboard snapshot. */
28
+ revision: number;
26
29
  load: typeof loadCostMonitorRunPage | undefined;
27
30
  }) {
28
31
  const [offset, setOffset] = useState(0);
@@ -37,7 +40,7 @@ export function useCostRunPage({
37
40
  const rangeTo = range?.to;
38
41
  const effectiveFilters = { ...filters, query: filters.query || globalQuery };
39
42
  const paginationKey = `${Object.values(effectiveFilters).join("\u0000")}\u0000${rangeFrom ?? ""}\u0000${rangeTo ?? ""}`;
40
- const requestKey = `${view}\u0000${eligible}\u0000${currency}\u0000${limit}\u0000${paginationKey}\u0000${refresh ?? ""}`;
43
+ const requestKey = `${view}\u0000${eligible}\u0000${currency}\u0000${limit}\u0000${paginationKey}\u0000${refresh ?? ""}\u0000${revision}`;
41
44
  const requestInputRef = useRef({
42
45
  view,
43
46
  eligible,
@@ -637,10 +637,10 @@ function mergePeriodRows(rows: readonly CostGroupRow[], prefixLength: number): C
637
637
  tasksCreated: values.reduce((total, row) => total + (row.tasksCreated ?? 0), 0),
638
638
  tasksActive: values.reduce((total, row) => total + (row.tasksActive ?? 0), 0),
639
639
  taskDaysActive: values.reduce((total, row) => total + (row.taskDaysActive ?? 0), 0),
640
- prd_count: values.reduce((total, row) => total + row.prd_count, 0),
641
- spec_count: values.reduce((total, row) => total + row.spec_count, 0),
642
- evidence_count: values.reduce((total, row) => total + row.evidence_count, 0),
643
- test_count: values.reduce((total, row) => total + row.test_count, 0),
640
+ prd_count: values.reduce((total, row) => total + (row.prd_count ?? 0), 0),
641
+ spec_count: values.reduce((total, row) => total + (row.spec_count ?? 0), 0),
642
+ evidence_count: values.reduce((total, row) => total + (row.evidence_count ?? 0), 0),
643
+ test_count: values.reduce((total, row) => total + (row.test_count ?? 0), 0),
644
644
  event_count: values.reduce((total, row) => total + row.event_count, 0),
645
645
  total_tokens: mergeNullableMetric(values.map((row) => row.total_tokens)),
646
646
  estimated_usd: mergeNullableMetric(values.map((row) => row.estimated_usd)),
@@ -2,20 +2,24 @@ import { describe, expect, it } from "vitest";
2
2
  import {
3
3
  AGENT_INVOCATION_EXPORT_COLUMNS,
4
4
  COMPACT_LIFECYCLE_EXPORT_COLUMNS,
5
+ COST_AGENT_EXPORT_COLUMNS,
5
6
  COST_GROUP_EXPORT_COLUMNS,
6
7
  DEVELOPER_EXPORT_COLUMNS,
7
8
  EXECUTION_EXPORT_COLUMNS,
8
9
  EXPORT_SUCCESS_TOAST_MS,
9
10
  exportAgentInvocationRows,
10
11
  exportCompactLifecycleRows,
12
+ exportCostAgentRows,
11
13
  exportCostGroupRows,
12
14
  exportDeveloperRows,
13
15
  exportExecutionRows,
14
16
  exportHeadersForView,
17
+ exportModelCostGroupRows,
15
18
  exportPageSourceRows,
16
19
  exportRowsWithDurationHours,
17
20
  exportWorkRows,
18
21
  KANBAN_EXPORT_COLUMNS,
22
+ MODEL_COST_GROUP_EXPORT_COLUMNS,
19
23
  WORK_EXPORT_COLUMNS,
20
24
  } from "./ExcelExportAction.js";
21
25
 
@@ -489,7 +493,7 @@ it("does not append raw keys to any explicitly schema-bound Cost view", () => {
489
493
  expect(exportHeadersForView("cost-specs", raw)).toEqual(COMPACT_LIFECYCLE_EXPORT_COLUMNS);
490
494
  expect(exportHeadersForView("cost-prds", raw)).toEqual(COMPACT_LIFECYCLE_EXPORT_COLUMNS);
491
495
  expect(exportHeadersForView("cost-conversations", raw)).toEqual(COMPACT_LIFECYCLE_EXPORT_COLUMNS);
492
- expect(exportHeadersForView("cost-agents", raw)).toEqual(COST_GROUP_EXPORT_COLUMNS);
496
+ expect(exportHeadersForView("cost-agents", raw)).toEqual(COST_AGENT_EXPORT_COLUMNS);
493
497
  expect(exportHeadersForView("cost-agent-calls", raw)).toEqual(AGENT_INVOCATION_EXPORT_COLUMNS);
494
498
  expect(exportHeadersForView("operations-conversations", raw)).toEqual(
495
499
  expect.not.arrayContaining(["internal_only"]),
@@ -524,6 +528,80 @@ it("exports model, provider, and ZAIP Agent groups with their populated metrics"
524
528
  ]);
525
529
  });
526
530
 
531
+ it("exports model analysis in table order with explicit numeric zeroes", () => {
532
+ expect(MODEL_COST_GROUP_EXPORT_COLUMNS).toEqual([
533
+ "model",
534
+ "prds",
535
+ "specs",
536
+ "tasks",
537
+ "conversations",
538
+ "runs",
539
+ "tests",
540
+ "evidences",
541
+ "duration_hours",
542
+ "tokens",
543
+ "costs",
544
+ ]);
545
+ expect(exportHeadersForView("cost-models", [])).toEqual(MODEL_COST_GROUP_EXPORT_COLUMNS);
546
+ expect(
547
+ exportModelCostGroupRows([
548
+ {
549
+ key: "gpt-6-astra",
550
+ prd_count: 2,
551
+ spec_count: 3,
552
+ task_count: null,
553
+ conversation_count: null,
554
+ run_count: 8,
555
+ test_count: 1,
556
+ evidence_count: 4,
557
+ duration_ms: 1_800_000,
558
+ total_tokens: 7_900_000,
559
+ estimated_brl: 77.23,
560
+ },
561
+ ]),
562
+ ).toEqual([
563
+ {
564
+ model: "gpt-6-astra",
565
+ prds: 2,
566
+ specs: 3,
567
+ tasks: 0,
568
+ conversations: 0,
569
+ runs: 8,
570
+ tests: 1,
571
+ evidences: 4,
572
+ duration_hours: 0.5,
573
+ tokens: 7_900_000,
574
+ costs: 77.23,
575
+ },
576
+ ]);
577
+ });
578
+
527
579
  it("clears pending success when a new export starts", () => {
528
580
  expect("running").not.toBe("completed");
529
581
  });
582
+
583
+ it("exports Agent tasks as participations and fills every missing numeric cell with zero", () => {
584
+ expect(COST_AGENT_EXPORT_COLUMNS).toEqual([
585
+ "Persona",
586
+ "Cargo",
587
+ "Zaip Agentes",
588
+ "PRDs",
589
+ "SPECs",
590
+ "Tarefas",
591
+ "Runs",
592
+ "Testes",
593
+ "Evidências",
594
+ "Tempo",
595
+ "Tokens",
596
+ "Custos",
597
+ ]);
598
+ const rows = exportCostAgentRows([
599
+ { key: "dave", task_count: 2 },
600
+ { key: "leo", task_count: 2 },
601
+ {},
602
+ ]);
603
+ expect(rows[0]?.Tarefas).toBe(2);
604
+ expect(rows[1]?.Tarefas).toBe(2);
605
+ for (const key of COST_AGENT_EXPORT_COLUMNS.slice(3)) expect(rows[2]?.[key]).toBe(0);
606
+ expect(rows[0]).not.toHaveProperty("tasks_created");
607
+ });
@@ -27,6 +27,7 @@ export const PERIOD_EXPORT_COLUMNS = [
27
27
  "prds",
28
28
  "specs",
29
29
  "tasks",
30
+ "conversations",
30
31
  "runs",
31
32
  "tests",
32
33
  "evidences",
@@ -118,6 +119,37 @@ export const COST_GROUP_EXPORT_COLUMNS = [
118
119
  "duration_hours",
119
120
  ] as const;
120
121
 
122
+ /** Agent exports count Task participation, including repeated Tasks across agents. */
123
+ export const COST_AGENT_EXPORT_COLUMNS = [
124
+ "Persona",
125
+ "Cargo",
126
+ "Zaip Agentes",
127
+ "PRDs",
128
+ "SPECs",
129
+ "Tarefas",
130
+ "Runs",
131
+ "Testes",
132
+ "Evidências",
133
+ "Tempo",
134
+ "Tokens",
135
+ "Custos",
136
+ ] as const;
137
+
138
+ /** The model audit mirrors its table: entity links precede financial facts. */
139
+ export const MODEL_COST_GROUP_EXPORT_COLUMNS = [
140
+ "model",
141
+ "prds",
142
+ "specs",
143
+ "tasks",
144
+ "conversations",
145
+ "runs",
146
+ "tests",
147
+ "evidences",
148
+ "duration_hours",
149
+ "tokens",
150
+ "costs",
151
+ ] as const;
152
+
121
153
  // Cost Monitor developer attribution is a factual aggregate with coverage
122
154
  // counters. Keep the workbook schema aligned with that table and retain null
123
155
  // facts instead of allowing them to be inferred as zero by a spreadsheet.
@@ -354,6 +386,54 @@ export function exportCostGroupRows(
354
386
  });
355
387
  }
356
388
 
389
+ export function exportCostAgentRows(
390
+ rows: readonly Record<string, unknown>[],
391
+ ): Record<string, unknown>[] {
392
+ return rows.map((row) => {
393
+ const durationMs = numberValue(row.duration_ms) ?? numberValue(row.total_duration);
394
+ return {
395
+ Persona: row.persona ?? null,
396
+ Cargo: row.job ?? null,
397
+ "Zaip Agentes": row.label ?? row.key ?? null,
398
+ PRDs: numberValue(row.prd_count) ?? 0,
399
+ SPECs: numberValue(row.spec_count) ?? 0,
400
+ Tarefas: numberValue(row.task_count) ?? 0,
401
+ Runs: numberValue(row.run_count) ?? numberValue(row.invocation_count) ?? 0,
402
+ Testes: numberValue(row.test_count) ?? numberValue(row.validation_count) ?? 0,
403
+ Evidências: numberValue(row.evidence_count) ?? 0,
404
+ Tempo: (durationMs ?? 0) / 3_600_000,
405
+ Tokens: numberValue(row.total_tokens) ?? 0,
406
+ Custos: numberValue(row.estimated_brl) ?? numberValue(row.total_cost_brl) ?? 0,
407
+ };
408
+ });
409
+ }
410
+
411
+ /**
412
+ * Preserve the factual model-attribution contract in the workbook. In
413
+ * The requested model-analysis surface is fully numeric, while the raw
414
+ * projection keeps attribution nulls for auditability.
415
+ */
416
+ export function exportModelCostGroupRows(
417
+ rows: readonly Record<string, unknown>[],
418
+ ): Record<string, unknown>[] {
419
+ return rows.map((row) => {
420
+ const durationMs = numberValue(row.duration_ms) ?? numberValue(row.total_duration);
421
+ return {
422
+ model: row.label ?? row.model ?? row.key ?? null,
423
+ prds: numberValue(row.prd_count) ?? 0,
424
+ specs: numberValue(row.spec_count) ?? 0,
425
+ tasks: numberValue(row.task_count) ?? 0,
426
+ conversations: numberValue(row.conversation_count) ?? 0,
427
+ runs: numberValue(row.run_count) ?? numberValue(row.invocation_count) ?? 0,
428
+ tests: numberValue(row.test_count) ?? numberValue(row.validation_count) ?? 0,
429
+ evidences: numberValue(row.evidence_count) ?? 0,
430
+ duration_hours: durationMs === null ? 0 : durationMs / 3_600_000,
431
+ tokens: numberValue(row.total_tokens) ?? 0,
432
+ costs: numberValue(row.estimated_brl) ?? numberValue(row.total_cost_brl) ?? 0,
433
+ };
434
+ });
435
+ }
436
+
357
437
  /** Normalize Cost Monitor developer facts into the fixed XLSX schema. */
358
438
  export function exportDeveloperRows(
359
439
  rows: readonly Record<string, unknown>[],
@@ -524,6 +604,8 @@ export function exportHeadersForView(
524
604
  const isOperationsConversationView = view === "operations-conversations";
525
605
  const isCompactLifecycleView =
526
606
  /-(?:tasks|specs|prds|conversations)$/.test(view) && !isOperationsConversationView;
607
+ const isModelCostGroupView = view === "cost-models";
608
+ const isCostAgentView = view === "cost-agents";
527
609
  const isCostGroupView = /-(?:agents|models|providers)$/.test(view);
528
610
  const isDeveloperView = view === "cost-developers";
529
611
  const isChangeView = view === "operations-changes";
@@ -534,7 +616,9 @@ export function exportHeadersForView(
534
616
  if (isCostExecutionView) headers.push(...COMPACT_LIFECYCLE_EXPORT_COLUMNS);
535
617
  if (isAgentInvocationView) headers.push(...AGENT_INVOCATION_EXPORT_COLUMNS);
536
618
  if (isCompactLifecycleView) headers.push(...COMPACT_LIFECYCLE_EXPORT_COLUMNS);
537
- if (isCostGroupView) headers.push(...COST_GROUP_EXPORT_COLUMNS);
619
+ if (isCostAgentView) headers.push(...COST_AGENT_EXPORT_COLUMNS);
620
+ else if (isModelCostGroupView) headers.push(...MODEL_COST_GROUP_EXPORT_COLUMNS);
621
+ else if (isCostGroupView) headers.push(...COST_GROUP_EXPORT_COLUMNS);
538
622
  if (isDeveloperView) headers.push(...DEVELOPER_EXPORT_COLUMNS);
539
623
  if (isOperationsConversationView) headers.push(...CONVERSATION_EXPORT_COLUMNS);
540
624
  if (isChangeView) headers.push(...CHANGE_EXPORT_COLUMNS);
@@ -592,6 +676,8 @@ export function ExcelExportAction({ filters, pageSource, rows, view }: ExcelExpo
592
676
  const isOperationsConversationView = view === "operations-conversations";
593
677
  const isCompactLifecycleView =
594
678
  /-(?:tasks|specs|prds|conversations)$/.test(view) && !isOperationsConversationView;
679
+ const isModelCostGroupView = view === "cost-models";
680
+ const isCostAgentView = view === "cost-agents";
595
681
  const isCostGroupView = /-(?:agents|models|providers)$/.test(view);
596
682
  const isDeveloperView = view === "cost-developers";
597
683
  const isChangeView = view === "operations-changes";
@@ -631,11 +717,15 @@ export function ExcelExportAction({ filters, pageSource, rows, view }: ExcelExpo
631
717
  ? exportAgentInvocationRows
632
718
  : isCompactLifecycleView
633
719
  ? exportCompactLifecycleRows
634
- : isCostGroupView
635
- ? exportCostGroupRows
636
- : isDeveloperView
637
- ? exportDeveloperRows
638
- : exportRowsWithDurationHours,
720
+ : isCostAgentView
721
+ ? exportCostAgentRows
722
+ : isModelCostGroupView
723
+ ? exportModelCostGroupRows
724
+ : isCostGroupView
725
+ ? exportCostGroupRows
726
+ : isDeveloperView
727
+ ? exportDeveloperRows
728
+ : exportRowsWithDurationHours,
639
729
  );
640
730
  return;
641
731
  }
@@ -659,11 +749,15 @@ export function ExcelExportAction({ filters, pageSource, rows, view }: ExcelExpo
659
749
  ? exportAgentInvocationRows
660
750
  : isCompactLifecycleView
661
751
  ? exportCompactLifecycleRows
662
- : isCostGroupView
663
- ? exportCostGroupRows
664
- : isDeveloperView
665
- ? exportDeveloperRows
666
- : exportRowsWithDurationHours
752
+ : isCostAgentView
753
+ ? exportCostAgentRows
754
+ : isModelCostGroupView
755
+ ? exportModelCostGroupRows
756
+ : isCostGroupView
757
+ ? exportCostGroupRows
758
+ : isDeveloperView
759
+ ? exportDeveloperRows
760
+ : exportRowsWithDurationHours
667
761
  )(rows.slice(offset, offset + 500));
668
762
  },
669
763
  });