@zaip-ai/cli 1.0.6 → 1.0.7
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 +4 -2
- package/dist/services/adapter-hook-sources.d.ts +3 -0
- package/dist/services/adapter-hook-sources.d.ts.map +1 -0
- package/dist/services/adapter-hook-sources.js +3 -0
- package/dist/services/adapter-hook-sources.js.map +1 -0
- package/dist/services/adapters.d.ts.map +1 -1
- package/dist/services/adapters.js +75 -600
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/adapters.test.js +41 -0
- package/dist/services/adapters.test.js.map +1 -1
- package/dist/services/agent-adapters.d.ts +7 -0
- package/dist/services/agent-adapters.d.ts.map +1 -1
- package/dist/services/agent-adapters.js +81 -13
- package/dist/services/agent-adapters.js.map +1 -1
- package/dist/services/agent-adapters.test.js +56 -7
- package/dist/services/agent-adapters.test.js.map +1 -1
- package/dist/services/claude-settings-template.d.ts +2 -0
- package/dist/services/claude-settings-template.d.ts.map +1 -0
- package/dist/services/claude-settings-template.js +8 -0
- package/dist/services/claude-settings-template.js.map +1 -0
- package/dist/services/codex-config-template.d.ts +3 -0
- package/dist/services/codex-config-template.d.ts.map +1 -0
- package/dist/services/codex-config-template.js +98 -0
- package/dist/services/codex-config-template.js.map +1 -0
- package/dist/services/codex-pre-tool-hook-template.d.ts +2 -0
- package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -0
- package/dist/services/codex-pre-tool-hook-template.js +472 -0
- package/dist/services/codex-pre-tool-hook-template.js.map +1 -0
- 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 +22 -13
- package/dist/services/codex-rules.js.map +1 -1
- package/dist/services/codex-subagent-hook-template.d.ts +2 -0
- package/dist/services/codex-subagent-hook-template.d.ts.map +1 -0
- package/dist/services/codex-subagent-hook-template.js +250 -0
- package/dist/services/codex-subagent-hook-template.js.map +1 -0
- package/dist/services/doctor.d.ts.map +1 -1
- package/dist/services/doctor.js +8 -35
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/global-codex-config.d.ts +12 -6
- package/dist/services/global-codex-config.d.ts.map +1 -1
- package/dist/services/global-codex-config.js +72 -53
- package/dist/services/global-codex-config.js.map +1 -1
- package/dist/services/global-codex-config.test.js +35 -84
- package/dist/services/global-codex-config.test.js.map +1 -1
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +55 -19
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/local-state-migration.d.ts +19 -0
- package/dist/services/local-state-migration.d.ts.map +1 -0
- package/dist/services/local-state-migration.js +122 -0
- package/dist/services/local-state-migration.js.map +1 -0
- package/dist/services/logger.d.ts.map +1 -1
- package/dist/services/logger.js +4 -6
- package/dist/services/logger.js.map +1 -1
- package/dist/services/logger.test.js +36 -3
- package/dist/services/logger.test.js.map +1 -1
- package/dist/services/runtime-template.test.js +22 -18
- package/dist/services/runtime-template.test.js.map +1 -1
- package/dist/services/template-manifest.d.ts +1 -0
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +31 -11
- package/dist/services/template-manifest.js.map +1 -1
- package/dist/services/transactional-files.d.ts.map +1 -1
- package/dist/services/transactional-files.js +84 -27
- package/dist/services/transactional-files.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/templates/.agents/config/agents/catalog.yaml +1081 -145
- package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +37 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +35 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +32 -0
- package/templates/.agents/config/clients.yaml +152 -0
- package/templates/{.zaip-aios → .agents/config}/pricing/models.json +4 -13
- package/templates/.agents/config/project.yaml +24 -1
- package/templates/.agents/dashboard/.zaip-managed.json +1140 -12
- package/templates/.agents/dashboard/README.md +23 -4
- package/templates/.agents/dashboard/apps/frontend/dist/assets/AgentCatalogSettingsPage-CLYIi7Vo.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/AgentCatalogSettingsPage-DTDNVQGX.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-Cv-JcoxP.js +1320 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-Je5nK-Et.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/PricingSettingsDialog-CzEggcRb.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-05YKn6Z4.js +3 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-YO3yqtgV.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/dashboard-localization-C98LGC-Q.js +231 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-8AzCnl3a.js +77 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DdBYQ_8D.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +2 -2
- package/templates/{.zaip-aios/dashboard/apps/frontend/dist → .agents/dashboard/apps/frontend}/index.html +1 -2
- package/templates/.agents/dashboard/apps/frontend/package.json +22 -0
- package/templates/.agents/dashboard/apps/frontend/src/AgentCatalogSettingsPage.tsx +617 -0
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +766 -0
- package/templates/.agents/dashboard/apps/frontend/src/AppLoadingPanels.tsx +134 -0
- package/templates/.agents/dashboard/apps/frontend/src/DashboardCapabilityNav.tsx +117 -0
- package/templates/.agents/dashboard/apps/frontend/src/DashboardHelpDialog.tsx +242 -0
- package/templates/.agents/dashboard/apps/frontend/src/PricingSettingsDialog.tsx +295 -0
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +719 -0
- package/templates/.agents/dashboard/apps/frontend/src/TraceabilityWorkspace.tsx +72 -0
- package/templates/.agents/dashboard/apps/frontend/src/agent-catalog-settings-page.css +660 -0
- package/templates/.agents/dashboard/apps/frontend/src/agent-catalog-settings.test.ts +249 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +31 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +374 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-capability-nav.css +81 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-help-dialog.css +202 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.test.ts +72 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.ts +361 -0
- package/templates/.agents/dashboard/apps/frontend/src/loading-feedback.css +42 -0
- package/templates/{.zaip-aios/design/apps/catalog → .agents/dashboard/apps/frontend}/src/main.tsx +5 -1
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.test.ts +18 -0
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.ts +22 -0
- package/templates/.agents/dashboard/apps/frontend/src/pricing-settings-dialog.css +309 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +129 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-page.css +335 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +57 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +79 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.ts +17 -0
- package/templates/.agents/dashboard/apps/frontend/src/styles.css +761 -0
- package/templates/.agents/dashboard/apps/frontend/src/traceability-workspace.css +70 -0
- package/templates/{.zaip-aios/design/apps/catalog → .agents/dashboard/apps/frontend}/tsconfig.json +1 -7
- package/templates/.agents/dashboard/apps/frontend/vite.config.ts +22 -0
- package/templates/{.zaip-aios/design/apps/catalog → .agents/dashboard/apps/frontend}/vitest.config.ts +3 -1
- package/templates/.agents/dashboard/dashboard.config.json +4 -0
- package/templates/.agents/dashboard/modules/cost-monitor/composition-root.ts +6 -0
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +24 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/agent-groups.test.ts +43 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/agent-groups.ts +40 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/contracts.ts +221 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/provider.test.ts +19 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/provider.ts +5 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.test.ts +75 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.tsx +260 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostFilters.tsx +351 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostModelsAuditTable.test.ts +51 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostModelsAuditTable.tsx +327 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorIcons.tsx +50 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +251 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +775 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostPeriodAverageCards.tsx +89 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostSummary.tsx +64 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableIcons.tsx +9 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +708 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +797 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/MacroCostTable.test.ts +79 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/MacroCostTable.tsx +218 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-duration.ts +17 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-copy.ts +84 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-embedded.css +11 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-layout.test.ts +28 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-responsive.css +123 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-summary.ts +130 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor.css +683 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-run-origin.css +28 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-table-metrics.ts +77 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/index.ts +2 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.test.ts +111 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +140 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/run-display.ts +10 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/aggregate.test.ts +213 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/aggregate.ts +86 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-pricing.test.ts +132 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection-filtering.test.ts +193 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection-pricing.test.ts +167 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test-fixtures.ts +213 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test.ts +793 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.ts +622 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/index.ts +2 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/run-telemetry.test.ts +36 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/run-telemetry.ts +22 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/task-cost-groups.test.ts +137 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/task-cost-groups.ts +64 -0
- package/templates/.agents/dashboard/modules/cost-monitor/tsconfig.json +10 -0
- package/templates/.agents/dashboard/modules/operations/composition-root.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/package.json +30 -0
- package/templates/.agents/dashboard/modules/operations/src/contracts.ts +409 -0
- package/templates/.agents/dashboard/modules/operations/src/duration-population.test.ts +16 -0
- package/templates/.agents/dashboard/modules/operations/src/duration-population.ts +35 -0
- package/templates/.agents/dashboard/modules/operations/src/react/EntityDetailsDialog.tsx +309 -0
- package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.test.ts +33 -0
- package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.tsx +491 -0
- package/templates/.agents/dashboard/modules/operations/src/react/MacroBoard.test.ts +28 -0
- package/templates/.agents/dashboard/modules/operations/src/react/MacroBoard.tsx +313 -0
- package/templates/.agents/dashboard/modules/operations/src/react/MacroGrid.tsx +61 -0
- package/templates/.agents/dashboard/modules/operations/src/react/MacroPlanningDialog.tsx +427 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationDateFilters.test.ts +32 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationDateFilters.tsx +124 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsIcons.tsx +58 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.helpers.tsx +412 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +498 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +621 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +800 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageDetails.tsx +113 -0
- package/templates/.agents/dashboard/modules/operations/src/react/PeriodSummaryTable.tsx +248 -0
- package/templates/.agents/dashboard/modules/operations/src/react/PrdDocumentDialog.tsx +235 -0
- package/templates/.agents/dashboard/modules/operations/src/react/TaskBoard.test.ts +141 -0
- package/templates/.agents/dashboard/modules/operations/src/react/TaskBoard.tsx +352 -0
- package/templates/.agents/dashboard/modules/operations/src/react/TaskDetailsDialog.tsx +134 -0
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.tsx +502 -0
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.test.ts +48 -0
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.tsx +298 -0
- package/templates/.agents/dashboard/modules/operations/src/react/card-elapsed-time.css +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/card-elapsed-time.test.ts +47 -0
- package/templates/.agents/dashboard/modules/operations/src/react/card-elapsed-time.ts +66 -0
- package/templates/.agents/dashboard/modules/operations/src/react/card-type-colors.css +35 -0
- package/templates/.agents/dashboard/modules/operations/src/react/conversation-rows.test.ts +50 -0
- package/templates/.agents/dashboard/modules/operations/src/react/conversation-rows.ts +75 -0
- package/templates/.agents/dashboard/modules/operations/src/react/entity-details-dialog.css +76 -0
- package/templates/.agents/dashboard/modules/operations/src/react/execution-metrics.test.ts +170 -0
- package/templates/.agents/dashboard/modules/operations/src/react/execution-metrics.ts +88 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +32 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +93 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExportProgressToast.tsx +26 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/export-layout.test.ts +67 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/export-session.test.ts +208 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/export-session.ts +194 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/export.css +31 -0
- package/templates/.agents/dashboard/modules/operations/src/react/format-card-created-at.test.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/format-card-created-at.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/format-rounded-duration.test.ts +27 -0
- package/templates/.agents/dashboard/modules/operations/src/react/format-rounded-duration.ts +14 -0
- package/templates/.agents/dashboard/modules/operations/src/react/fullscreen-dialog.test.tsx +113 -0
- package/templates/.agents/dashboard/modules/operations/src/react/index.ts +10 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-dialog-data.test.ts +70 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-dialog-data.ts +24 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-dialog-usage.tsx +83 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-planning-dialog-responsive.css +74 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-planning-dialog.css +752 -0
- package/templates/.agents/dashboard/modules/operations/src/react/metric-accessibility.test.ts +17 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-date-range.test.ts +55 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-date-range.ts +135 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.test.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.ts +27 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-date-filters.css +154 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-filter-panel.css +187 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-layout.test.ts +15 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +69 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview.css +588 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-page-filters.ts +51 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-responsive.css +94 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-table-badges.css +57 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-view-order.test.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations.css +753 -0
- package/templates/.agents/dashboard/modules/operations/src/react/period-summary.css +12 -0
- package/templates/.agents/dashboard/modules/operations/src/react/period-summary.test.ts +472 -0
- package/templates/.agents/dashboard/modules/operations/src/react/period-summary.ts +237 -0
- package/templates/.agents/dashboard/modules/operations/src/react/popup-localization.test.ts +48 -0
- package/templates/.agents/dashboard/modules/operations/src/react/run-scope.test.ts +29 -0
- package/templates/.agents/dashboard/modules/operations/src/react/run-scope.ts +25 -0
- package/templates/.agents/dashboard/modules/operations/src/react/sort-by-created-at.test.ts +35 -0
- package/templates/.agents/dashboard/modules/operations/src/react/sort-by-created-at.ts +11 -0
- package/templates/.agents/dashboard/modules/operations/src/react/status-labels.ts +36 -0
- package/templates/.agents/dashboard/modules/operations/src/react/table-order.test.ts +34 -0
- package/templates/.agents/dashboard/modules/operations/src/react/table-order.ts +15 -0
- package/templates/.agents/dashboard/modules/operations/src/react/task-origin-badge.css +23 -0
- package/templates/.agents/dashboard/modules/operations/src/react/task-origin.test.ts +46 -0
- package/templates/.agents/dashboard/modules/operations/src/react/task-origin.ts +27 -0
- package/templates/.agents/dashboard/modules/operations/src/react/unified-work-board.css +187 -0
- package/templates/.agents/dashboard/modules/operations/src/react/use-current-time.ts +12 -0
- package/templates/.agents/dashboard/modules/operations/src/react/use-infinite-column.ts +29 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.test.ts +247 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.ts +179 -0
- package/templates/.agents/dashboard/modules/operations/src/server/build-operations-projection-helpers.ts +43 -0
- package/templates/.agents/dashboard/modules/operations/src/server/build-operations-projection.test.ts +364 -0
- package/templates/.agents/dashboard/modules/operations/src/server/build-operations-projection.ts +787 -0
- package/templates/.agents/dashboard/modules/operations/src/server/canonical-compat.ts +176 -0
- package/templates/.agents/dashboard/modules/operations/src/server/canonical-run-projection.ts +140 -0
- package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.test.ts +137 -0
- package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.ts +121 -0
- package/templates/.agents/dashboard/modules/operations/src/server/filter.test.ts +33 -0
- package/templates/.agents/dashboard/modules/operations/src/server/filter.ts +17 -0
- package/templates/.agents/dashboard/modules/operations/src/server/index.ts +2 -0
- package/templates/.agents/dashboard/modules/operations/src/server/internal.ts +8 -0
- package/templates/.agents/dashboard/modules/operations/src/server/macro.ts +68 -0
- package/templates/.agents/dashboard/modules/operations/src/server/metric-coverage.ts +60 -0
- package/templates/.agents/dashboard/modules/operations/src/server/planned-task-previews.test.ts +22 -0
- package/templates/.agents/dashboard/modules/operations/src/server/planned-task-previews.ts +55 -0
- package/templates/.agents/dashboard/modules/operations/src/server/read-task-detail.ts +86 -0
- package/templates/.agents/dashboard/modules/operations/src/server/run-order.test.ts +23 -0
- package/templates/.agents/dashboard/modules/operations/src/server/run-order.ts +11 -0
- package/templates/.agents/dashboard/modules/operations/src/server/runs.test.ts +27 -0
- package/templates/.agents/dashboard/modules/operations/src/server/runs.ts +77 -0
- package/templates/.agents/dashboard/modules/operations/src/server/task-test-counts.test.ts +32 -0
- package/templates/.agents/dashboard/modules/operations/src/server/task-test-counts.ts +49 -0
- package/templates/.agents/dashboard/modules/operations/src/server/usage.test.ts +25 -0
- package/templates/.agents/dashboard/modules/operations/src/server/usage.ts +139 -0
- package/templates/.agents/dashboard/modules/operations/src/work-readiness.ts +26 -0
- package/templates/.agents/dashboard/modules/operations/tsconfig.json +10 -0
- package/templates/.agents/dashboard/modules/traceability/composition-root.ts +7 -0
- package/templates/.agents/dashboard/modules/traceability/golden/golden-view.test.ts +27 -0
- package/templates/.agents/dashboard/modules/traceability/golden/golden-view.ts +57 -0
- package/templates/.agents/dashboard/modules/traceability/golden/index.ts +1 -0
- package/templates/.agents/dashboard/modules/traceability/package.json +26 -0
- package/templates/.agents/dashboard/modules/traceability/src/contracts.ts +76 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TaskTracePanel.test.ts +80 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TaskTracePanel.tsx +681 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TraceDocumentDialog.tsx +34 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TraceStageDetail.tsx +129 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TraceStageDialog.tsx +49 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/index.ts +1 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-embedded.css +9 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-navigation.css +122 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-stage-detail.css +175 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-stage-dialog.css +127 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-usage.css +120 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability.css +727 -0
- package/templates/.agents/dashboard/modules/traceability/src/server/build-task-trace.test.ts +311 -0
- package/templates/.agents/dashboard/modules/traceability/src/server/build-task-trace.ts +421 -0
- package/templates/.agents/dashboard/modules/traceability/src/server/index.ts +1 -0
- package/templates/.agents/dashboard/modules/traceability/tsconfig.json +10 -0
- package/templates/.agents/dashboard/packages/branding/package.json +14 -0
- package/templates/.agents/dashboard/packages/branding/src/index.ts +10 -0
- package/templates/.agents/dashboard/packages/branding/tsconfig.json +7 -0
- package/templates/.agents/dashboard/packages/contracts/package.json +17 -0
- package/templates/.agents/dashboard/packages/contracts/src/export.ts +29 -0
- package/templates/.agents/dashboard/packages/contracts/src/index.ts +155 -0
- package/templates/.agents/dashboard/packages/contracts/src/period-counts.test.ts +48 -0
- package/templates/.agents/dashboard/packages/contracts/tsconfig.json +7 -0
- package/templates/.agents/dashboard/packages/data-export/package.json +19 -0
- package/templates/.agents/dashboard/packages/data-export/src/index.test.ts +268 -0
- package/templates/.agents/dashboard/packages/data-export/src/index.ts +84 -0
- package/templates/.agents/dashboard/packages/data-export/src/ooxml-stream.test.ts +19 -0
- package/templates/.agents/dashboard/packages/data-export/src/ooxml-stream.ts +260 -0
- package/templates/.agents/dashboard/packages/local-runtime/package.json +31 -0
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +68 -46
- package/templates/.agents/dashboard/packages/local-runtime/src/agent-catalog-settings.test.ts +224 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/agent-catalog-settings.ts +320 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/export/index.ts +7 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/manifest-runs.ts +204 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +92 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +32 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/runtime.mjs +222 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-settings.test.ts +217 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +526 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-summary-helpers.ts +73 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test-fixtures.ts +147 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +580 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +799 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/start-dashboard.mjs +81 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +85 -33
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +378 -0
- package/templates/.agents/dashboard/packages/local-runtime/tsconfig.json +8 -0
- package/templates/.agents/dashboard/packages/ui/package.json +18 -0
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.test.mjs +20 -0
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.tsx +273 -0
- package/templates/.agents/dashboard/packages/ui/src/DataTable.test.tsx +61 -0
- package/templates/.agents/dashboard/packages/ui/src/DataTable.tsx +292 -0
- package/templates/.agents/dashboard/packages/ui/src/PeriodAverageCards.test.tsx +27 -0
- package/templates/.agents/dashboard/packages/ui/src/PeriodAverageCards.tsx +27 -0
- package/templates/.agents/dashboard/packages/ui/src/format.test.ts +54 -0
- package/templates/.agents/dashboard/packages/ui/src/format.ts +81 -0
- package/templates/.agents/dashboard/packages/ui/src/index.ts +6 -0
- package/templates/.agents/dashboard/packages/ui/src/period-average-cards.css +64 -0
- package/templates/.agents/dashboard/packages/ui/src/ui.css +451 -0
- package/templates/.agents/dashboard/packages/ui/tsconfig.json +10 -0
- package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +214 -0
- package/templates/.agents/dashboard/packages/windows-launcher/ZaipDashboardLauncher.csproj +11 -0
- package/templates/.agents/dashboard/packages/windows-launcher/build-dashboard-launcher.ps1 +142 -0
- package/templates/.agents/dashboard/packages/windows-launcher/zaip-dashboard.cmd +4 -0
- package/templates/.agents/dashboard/tests/e2e/package.json +18 -0
- package/templates/.agents/dashboard/tests/e2e/playwright.config.ts +33 -0
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +531 -0
- package/templates/.agents/dashboard/tests/e2e/tsconfig.json +9 -0
- package/templates/.agents/dashboard/zaip-dashboard.exe +0 -0
- package/templates/{.zaip-aios → .agents}/design/.zaip-managed.json +62 -50
- package/templates/.agents/design/DESIGN.md +7 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-BEmIE7WE.css +1 -0
- package/templates/{.zaip-aios/design/apps/catalog/dist/assets/index-Bvwc3Bgw.js → .agents/design/apps/catalog/dist/assets/index-CqqYWY2f.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/assets/{index-Bvwc3Bgw.js → index-D9pj7Jlf.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/index.html +2 -2
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/CatalogShell-BWY-80s4.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{Color-6AOWCN3U-D8qyAXo4.js → Color-6AOWCN3U-B-kAgAjB.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-Be2mDUQj.js +27 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-DRx9blDs.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{DocsRenderer-JROSPFPF-LmiVo77Q.js → DocsRenderer-JROSPFPF-BVN7xHtv.js} +4 -4
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{WithTooltip-7X4HQR7L-CTMWAwDe.js → WithTooltip-7X4HQR7L-CDHtKYkz.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-DRQKCCAG-DUhJxxRU.js → chunk-DRQKCCAG-D6AsDkMK.js} +1 -1
- package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-9RCn9-l7.js → .agents/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-B4m5uloN.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{components-BX1OfYUi.js → components-CN8YyTUg.js} +5 -5
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-EwuTh8Zk.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{iframe-LMhZM1ce.js → iframe-9yZfIsdT.js} +3 -3
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-BEmIE7WE.css +1 -0
- package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/react-18-jAz3avmR.js → .agents/design/apps/catalog/dist/storybook/assets/react-18-BoCSnq6H.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-DyL61NPT.js +1 -0
- package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-DV8X2acD.js → .agents/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-Bnn_nMwJ.js} +1 -1
- package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/theming-CHbHkcNi.js → .agents/design/apps/catalog/dist/storybook/assets/theming-DS_ue2sb.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/iframe.html +2 -2
- package/templates/.agents/design/apps/catalog/dist/storybook/index.json +1 -1
- package/templates/.agents/design/apps/catalog/src/components/Primitives.tsx +168 -2
- package/templates/.agents/design/apps/catalog/src/components/dialog-focus.test.ts +42 -0
- package/templates/.agents/design/apps/catalog/src/components/dialog-focus.ts +38 -0
- package/templates/.agents/design/apps/catalog/src/design-contract.test.ts +37 -8
- package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +89 -28
- package/templates/.agents/design/apps/catalog/src/stories/Components.stories.tsx +54 -0
- package/templates/.agents/design/apps/catalog/src/styles/components.css +204 -3
- package/templates/.agents/design/apps/catalog/src/styles/design-system.css +2 -0
- package/templates/.agents/design/apps/catalog/src/styles.css +5 -0
- package/templates/.agents/design/tokens.json +9 -1
- package/templates/.agents/requirements/autonomous-assurance.md +9 -10
- package/templates/.agents/requirements/comparative-audit.md +22 -0
- package/templates/.agents/requirements/context-engine.md +5 -5
- package/templates/.agents/requirements/cost-observability.md +3 -2
- package/templates/.agents/requirements/data-export.md +57 -0
- package/templates/.agents/requirements/design-system.md +2 -2
- package/templates/.agents/requirements/execution-engine.md +8 -6
- package/templates/.agents/requirements/kanban-dashboard.md +3 -3
- package/templates/.agents/requirements/model-orchestration.md +11 -11
- package/templates/.agents/requirements/public-distribution.md +4 -4
- package/templates/.agents/requirements/software-architecture.md +4 -4
- package/templates/.agents/requirements/strategic-improvements.md +24 -0
- package/templates/.agents/requirements/work-lifecycle.md +20 -10
- package/templates/.agents/requirements/zaip-strategic-95.md +20 -0
- package/templates/.agents/rules/{zaip/architecture.md → architecture.md} +1 -1
- package/templates/{.zaip-aios/templates/rules/zaip → .agents/rules}/context.md +3 -3
- package/templates/.agents/rules/core.md +21 -0
- package/templates/.agents/rules/{zaip/evolution.md → evolution.md} +1 -1
- package/templates/.agents/rules/frontend-lite.md +18 -0
- package/templates/{.zaip-aios/templates/rules/zaip → .agents/rules}/model-orchestration.md +1 -1
- package/templates/.agents/rules/run-lifecycle-closure.md +24 -0
- package/templates/{.zaip-aios/templates/rules/zaip → .agents/rules}/security.md +1 -1
- package/templates/.agents/rules/text-writing-utf8.md +12 -0
- package/templates/.agents/rules/workflow.md +25 -0
- package/templates/{.zaip-aios → .agents/runtime}/bin/zaip.mjs +399 -195
- package/templates/.agents/runtime/checksums.sha256 +9 -0
- package/templates/.agents/runtime/manifest.json +16 -0
- package/templates/{.zaip-aios → .agents/runtime}/sbom.cdx.json +532 -10
- package/templates/.agents/skills/criar-pasta-obsidian/SKILL.md +20 -0
- package/templates/.agents/skills/criar-pasta-obsidian/agents/openai.yaml +4 -0
- package/templates/.agents/skills/criar-pasta-obsidian/scripts/generate-obsidian-vault.mjs +414 -0
- package/templates/.agents/skills/criar-pasta-obsidian/scripts/generate-obsidian-vault.test.mjs +144 -0
- package/templates/.agents/skills/zaip-aios/SKILL.md +2 -2
- package/templates/.agents/skills/zaip-aios/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-adapters/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-backend/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-backend/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-cloud-engineering/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-cloud-engineering/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-config/SKILL.md +3 -3
- package/templates/.agents/skills/zaip-skill-data-analyst/SKILL.md +23 -0
- package/templates/.agents/skills/zaip-skill-data-analyst/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-design-system/SKILL.md +50 -0
- package/templates/.agents/skills/zaip-skill-design-system/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-design-system/references/scope.md +21 -0
- package/templates/.agents/skills/zaip-skill-enforce-architecture/SKILL.md +2 -2
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +11 -8
- package/templates/.agents/skills/zaip-skill-execution/references/prepared-plan.md +2 -0
- package/templates/.agents/skills/zaip-skill-frontend/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-frontend/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +41 -15
- package/templates/.agents/skills/zaip-skill-github-deploy/agents/openai.yaml +2 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +80 -0
- package/templates/.agents/skills/zaip-skill-github-setup/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-marketing/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-move-prd/SKILL.md +10 -6
- package/templates/.agents/skills/zaip-skill-move-spec/SKILL.md +9 -6
- package/templates/.agents/skills/zaip-skill-observability/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-prd/SKILL.md +27 -11
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/SKILL.md +3 -4
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +59 -13
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +131 -28
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +81 -2
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.mjs +167 -0
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.test.mjs +267 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/SKILL.md +55 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/references/refactor-map-contract.md +33 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/references/visual-modes.md +17 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/scripts/inventory-source.mjs +181 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/scripts/refactor-scripts.test.mjs +293 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/scripts/validate-refactor-map.mjs +294 -0
- package/templates/.agents/skills/zaip-skill-requirements/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-review/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-rules/SKILL.md +4 -4
- package/templates/.agents/skills/zaip-skill-setup/SKILL.md +2 -2
- package/templates/.agents/skills/zaip-skill-spec/SKILL.md +10 -10
- package/templates/.agents/skills/zaip-skill-task/SKILL.md +3 -3
- package/templates/.agents/skills/zaip-skill-tool-setup/references/secrets.md +1 -1
- package/templates/.agents/skills/zaip-skill-tool-setup/scripts/tool-state.mjs +1 -1
- package/templates/.agents/skills/zaip-skill-website-readiness/SKILL.md +53 -0
- package/templates/.agents/skills/zaip-skill-website-readiness/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-website-readiness/references/capability-checklist.md +32 -0
- package/templates/.agents/tools/catalog.yaml +0 -6
- package/templates/.agents/zaip-aios/README.md +1 -1
- package/templates/.agents/zaip-aios/guides/01-primeiros-passos.md +4 -2
- package/templates/.agents/zaip-aios/guides/03-tasks.md +6 -0
- package/templates/.agents/zaip-aios/guides/04-specs.md +7 -3
- package/templates/.agents/zaip-aios/guides/05-prds.md +26 -1
- package/templates/.agents/zaip-aios/guides/06-execucao.md +10 -0
- package/templates/.agents/zaip-aios/guides/08-contexto-e-tokens.md +1 -1
- package/templates/.agents/zaip-aios/guides/11-observabilidade-e-custos.md +2 -0
- package/templates/.agents/zaip-aios/guides/13-boas-praticas.md +3 -0
- package/templates/.agents/zaip-aios/guides/14-troubleshooting.md +3 -1
- package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +7 -1
- package/templates/.local/gitignore.template +2 -0
- package/templates/template-manifest.json +1650 -1859
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-_yxs47Hd.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-ehU9Etwm.js +0 -1207
- package/templates/.agents/design/apps/catalog/dist/assets/index-B4pfFtvJ.css +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-DkBtOSHX.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-BttERyCr.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Primitives-HZpQ6PjX.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-9RCn9-l7.js +0 -18
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-Bu6KfEwW.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-B4pfFtvJ.css +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-18-jAz3avmR.js +0 -9
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-DvDPBd6Q.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-DV8X2acD.js +0 -6
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/theming-CHbHkcNi.js +0 -39
- package/templates/.agents/rules/project/.gitkeep +0 -0
- package/templates/.agents/rules/zaip/context.md +0 -22
- package/templates/.agents/rules/zaip/core.md +0 -24
- package/templates/.agents/rules/zaip/model-orchestration.md +0 -48
- package/templates/.agents/rules/zaip/security.md +0 -20
- package/templates/.agents/rules/zaip/workflow.md +0 -35
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/inspect-local-sqlite.py +0 -52
- package/templates/.agents/tools/mcp/development/sqlite/README.md +0 -20
- package/templates/.agents/tools/mcp/development/sqlite/manifest.yaml +0 -25
- package/templates/.zaip-aios/checksums.sha256 +0 -370
- package/templates/.zaip-aios/dashboard/.zaip-managed.json +0 -46
- package/templates/.zaip-aios/dashboard/README.md +0 -91
- package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/index-_yxs47Hd.css +0 -1
- package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/index-ehU9Etwm.js +0 -1207
- package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/logo_novo_azul-BBx5pA2B.png +0 -0
- package/templates/.zaip-aios/dashboard/packages/local-runtime/server.mjs +0 -199
- package/templates/.zaip-aios/dashboard/packages/local-runtime/start-dashboard.mjs +0 -726
- package/templates/.zaip-aios/dashboard/zaip-dashboard.exe +0 -0
- package/templates/.zaip-aios/design/DESIGN.md +0 -180
- package/templates/.zaip-aios/design/README.md +0 -47
- package/templates/.zaip-aios/design/apps/catalog/.storybook/main.ts +0 -15
- package/templates/.zaip-aios/design/apps/catalog/.storybook/preview.ts +0 -21
- package/templates/.zaip-aios/design/apps/catalog/dist/assets/index-B4pfFtvJ.css +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/index.html +0 -14
- package/templates/.zaip-aios/design/apps/catalog/dist/logo_novo_azul.png +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Color-6AOWCN3U-D8qyAXo4.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Components.stories-DkBtOSHX.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-BttERyCr.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/DocsRenderer-JROSPFPF-LmiVo77Q.js +0 -46
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Primitives-HZpQ6PjX.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/WithTooltip-7X4HQR7L-CTMWAwDe.js +0 -9
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/axe-Bk3eEgJf.js +0 -20
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-242VQQM5-DB2JSNUA.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-DRQKCCAG-DUhJxxRU.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-QQBDHPVZ-nYh9QWsm.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/components-BX1OfYUi.js +0 -243
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-Bu6KfEwW.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/iframe-B4pfFtvJ.css +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/iframe-LMhZM1ce.js +0 -1154
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/jsx-runtime-f3rHp9ZU.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/matchers-JIUQ3HVY-9iRExWZO.js +0 -28
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/preload-helper-BdFrVu1K.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/react-DvDPBd6Q.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/favicon-wrapper.svg +0 -46
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/favicon.svg +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/iframe.html +0 -710
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/index.html +0 -152
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/index.json +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/logo_novo_azul.png +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-bold-italic.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-bold.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-italic.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-regular.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/a11y-2/manager-bundle.js +0 -57
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/docs-1/manager-bundle.js +0 -18
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -632
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/favicon-wrapper.svg +0 -46
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/favicon.svg +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/globals-runtime.js +0 -78957
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/globals.js +0 -24
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/manager-stores.js +0 -23
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/runtime.js +0 -28253
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/vite-inject-mocker-entry.js +0 -2
- package/templates/.zaip-aios/design/apps/catalog/index.html +0 -13
- package/templates/.zaip-aios/design/apps/catalog/package.json +0 -32
- package/templates/.zaip-aios/design/apps/catalog/public/logo_novo_azul.png +0 -0
- package/templates/.zaip-aios/design/apps/catalog/src/App.tsx +0 -29
- package/templates/.zaip-aios/design/apps/catalog/src/components/CatalogShell.tsx +0 -78
- package/templates/.zaip-aios/design/apps/catalog/src/components/Primitives.tsx +0 -137
- package/templates/.zaip-aios/design/apps/catalog/src/design-contract.test.ts +0 -33
- package/templates/.zaip-aios/design/apps/catalog/src/pages/ComponentsPage.tsx +0 -83
- package/templates/.zaip-aios/design/apps/catalog/src/pages/DesignSystemPage.tsx +0 -185
- package/templates/.zaip-aios/design/apps/catalog/src/stories/Components.stories.tsx +0 -12
- package/templates/.zaip-aios/design/apps/catalog/src/stories/DesignSystem.stories.tsx +0 -12
- package/templates/.zaip-aios/design/apps/catalog/src/styles/catalog.css +0 -315
- package/templates/.zaip-aios/design/apps/catalog/src/styles/components.css +0 -228
- package/templates/.zaip-aios/design/apps/catalog/src/styles/design-system.css +0 -137
- package/templates/.zaip-aios/design/apps/catalog/src/styles.css +0 -85
- package/templates/.zaip-aios/design/apps/catalog/vite.config.ts +0 -10
- package/templates/.zaip-aios/design/packages/local-runtime/package.json +0 -9
- package/templates/.zaip-aios/design/packages/local-runtime/runtime.mjs +0 -238
- package/templates/.zaip-aios/design/packages/local-runtime/runtime.test.mjs +0 -66
- package/templates/.zaip-aios/design/packages/local-runtime/start-design.mjs +0 -46
- package/templates/.zaip-aios/design/packages/windows-launcher/Program.cs +0 -110
- package/templates/.zaip-aios/design/packages/windows-launcher/build-design-launcher.ps1 +0 -107
- package/templates/.zaip-aios/design/tokens.json +0 -52
- package/templates/.zaip-aios/design/zaip-design.exe +0 -0
- package/templates/.zaip-aios/manifest.json +0 -377
- package/templates/.zaip-aios/profiles/clients.json +0 -506
- package/templates/.zaip-aios/profiles/fixtures/architecture/negative/modules/orders/application/queries/list.query.ts +0 -5
- package/templates/.zaip-aios/profiles/fixtures/architecture/negative/modules/orders/domain/order.ts +0 -3
- package/templates/.zaip-aios/profiles/fixtures/architecture/positive/modules/orders/application/queries/list.query.ts +0 -5
- package/templates/.zaip-aios/profiles/typescript-hono-kysely.json +0 -41
- package/templates/.zaip-aios/templates/config/agents/catalog.yaml +0 -246
- package/templates/.zaip-aios/templates/requirements/.gitkeep +0 -0
- package/templates/.zaip-aios/templates/requirements/autonomous-assurance.md +0 -63
- package/templates/.zaip-aios/templates/requirements/context-engine.md +0 -44
- package/templates/.zaip-aios/templates/requirements/cost-observability.md +0 -39
- package/templates/.zaip-aios/templates/requirements/design-system.md +0 -48
- package/templates/.zaip-aios/templates/requirements/execution-engine.md +0 -60
- package/templates/.zaip-aios/templates/requirements/kanban-dashboard.md +0 -30
- package/templates/.zaip-aios/templates/requirements/model-orchestration.md +0 -58
- package/templates/.zaip-aios/templates/requirements/public-distribution.md +0 -40
- package/templates/.zaip-aios/templates/requirements/software-architecture.md +0 -57
- package/templates/.zaip-aios/templates/requirements/work-lifecycle.md +0 -82
- package/templates/.zaip-aios/templates/rules/project/.gitkeep +0 -0
- package/templates/.zaip-aios/templates/rules/zaip/architecture.md +0 -28
- package/templates/.zaip-aios/templates/rules/zaip/core.md +0 -24
- package/templates/.zaip-aios/templates/rules/zaip/evolution.md +0 -22
- package/templates/.zaip-aios/templates/rules/zaip/workflow.md +0 -35
- package/templates/.zaip-aios/templates/skills/.gitkeep +0 -0
- package/templates/.zaip-aios/templates/skills/zaip-aios/SKILL.md +0 -9
- package/templates/.zaip-aios/templates/skills/zaip-skill-adapt-stack/SKILL.md +0 -11
- package/templates/.zaip-aios/templates/skills/zaip-skill-adapt-stack/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-adapters/SKILL.md +0 -15
- package/templates/.zaip-aios/templates/skills/zaip-skill-adapters/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/SKILL.md +0 -19
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/assets/adapter.example.yaml +0 -26
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/references/security-contract.md +0 -10
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/references/server-layout.md +0 -19
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/scripts/inspect-openapi.mjs +0 -60
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/scripts/scaffold-local-mcp.mjs +0 -47
- package/templates/.zaip-aios/templates/skills/zaip-skill-author-skills/SKILL.md +0 -21
- package/templates/.zaip-aios/templates/skills/zaip-skill-author-skills/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-change/SKILL.md +0 -20
- package/templates/.zaip-aios/templates/skills/zaip-skill-change/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-config/SKILL.md +0 -22
- package/templates/.zaip-aios/templates/skills/zaip-skill-config/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-context/SKILL.md +0 -16
- package/templates/.zaip-aios/templates/skills/zaip-skill-context/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-cqrs/SKILL.md +0 -11
- package/templates/.zaip-aios/templates/skills/zaip-skill-cqrs/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-decisions/SKILL.md +0 -14
- package/templates/.zaip-aios/templates/skills/zaip-skill-decisions/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-enforce-architecture/SKILL.md +0 -14
- package/templates/.zaip-aios/templates/skills/zaip-skill-enforce-architecture/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-eval/SKILL.md +0 -14
- package/templates/.zaip-aios/templates/skills/zaip-skill-eval/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-execution/SKILL.md +0 -36
- package/templates/.zaip-aios/templates/skills/zaip-skill-execution/agents/openai.yaml +0 -6
- package/templates/.zaip-aios/templates/skills/zaip-skill-execution/references/prepared-plan.md +0 -31
- package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/SKILL.md +0 -29
- package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/references/launcher-contract.md +0 -36
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/SKILL.md +0 -75
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/agents/openai.yaml +0 -6
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/scripts/preflight.mjs +0 -256
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-setup/SKILL.md +0 -80
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-setup/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-move-prd/SKILL.md +0 -37
- package/templates/.zaip-aios/templates/skills/zaip-skill-move-prd/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-move-spec/SKILL.md +0 -38
- package/templates/.zaip-aios/templates/skills/zaip-skill-move-spec/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-navigate-work/SKILL.md +0 -16
- package/templates/.zaip-aios/templates/skills/zaip-skill-navigate-work/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-observability/SKILL.md +0 -24
- package/templates/.zaip-aios/templates/skills/zaip-skill-observability/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/SKILL.md +0 -17
- package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/references/routing.md +0 -11
- package/templates/.zaip-aios/templates/skills/zaip-skill-prd/SKILL.md +0 -44
- package/templates/.zaip-aios/templates/skills/zaip-skill-prd/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-preview/SKILL.md +0 -16
- package/templates/.zaip-aios/templates/skills/zaip-skill-preview/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/SKILL.md +0 -39
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/inspect-local-sqlite.py +0 -52
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/normalize-run-agents.mjs +0 -63
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +0 -698
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +0 -361
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +0 -187
- package/templates/.zaip-aios/templates/skills/zaip-skill-requirements/SKILL.md +0 -16
- package/templates/.zaip-aios/templates/skills/zaip-skill-requirements/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-review/SKILL.md +0 -18
- package/templates/.zaip-aios/templates/skills/zaip-skill-review/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-rules/SKILL.md +0 -19
- package/templates/.zaip-aios/templates/skills/zaip-skill-rules/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-security/SKILL.md +0 -30
- package/templates/.zaip-aios/templates/skills/zaip-skill-security/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-setup/SKILL.md +0 -25
- package/templates/.zaip-aios/templates/skills/zaip-skill-setup/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-spec/SKILL.md +0 -45
- package/templates/.zaip-aios/templates/skills/zaip-skill-spec/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-task/SKILL.md +0 -41
- package/templates/.zaip-aios/templates/skills/zaip-skill-task/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-text-encoding/SKILL.md +0 -27
- package/templates/.zaip-aios/templates/skills/zaip-skill-text-encoding/agents/openai.yaml +0 -6
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/SKILL.md +0 -22
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/references/codex-config.md +0 -24
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/references/secrets.md +0 -8
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/configure-local-mcp.mjs +0 -52
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/inspect-tool.mjs +0 -35
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/tool-state.mjs +0 -26
- package/templates/.zaip-aios/templates/tools/README.md +0 -9
- package/templates/.zaip-aios/templates/tools/api/asaas/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/asaas/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/github/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/github/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/google-ads/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/google-ads/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/google-analytics/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/google-analytics/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/google-search-console/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/api/google-search-console/manifest.yaml +0 -19
- package/templates/.zaip-aios/templates/tools/api/google-tag-manager/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/google-tag-manager/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/hubspot/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/hubspot/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/instagram-graph/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/instagram-graph/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/kommo-crm/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/kommo-crm/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/linkedin-ads/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/linkedin-ads/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/meta-ads/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/meta-ads/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/openai/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/openai/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/shopify/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/shopify/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/slack/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/slack/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/stripe/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/stripe/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/tiktok-ads/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/tiktok-ads/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/youtube-analytics/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/youtube-analytics/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/catalog.yaml +0 -358
- package/templates/.zaip-aios/templates/tools/mcp/development/browser/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/browser/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/development/filesystem/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/filesystem/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/development/git/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/git/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/development/github/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/github/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/gitlab/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/gitlab/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/jira/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/development/jira/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/development/linear/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/linear/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/notion/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/notion/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/openai-docs/README.md +0 -15
- package/templates/.zaip-aios/templates/tools/mcp/development/openai-docs/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/development/postgresql/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/postgresql/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/slack/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/slack/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/sqlite/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/sqlite/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/infra/aws/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/infra/aws/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/infra/azure/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/azure/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/infra/cloudflare/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/infra/cloudflare/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/infra/docker/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/docker/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/infra/gcp/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/infra/gcp/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/infra/hostinger/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/hostinger/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/infra/kubernetes/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/kubernetes/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/infra/terraform/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/terraform/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-ads/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-ads/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-analytics/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-analytics/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-search-console/README.md +0 -19
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-search-console/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-tag-manager/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-tag-manager/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/hubspot/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/marketing/hubspot/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/marketing/instagram-insights/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/instagram-insights/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/linkedin-ads/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/linkedin-ads/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/mailchimp/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/mailchimp/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/meta-ads/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/meta-ads/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/semrush/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/marketing/semrush/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/marketing/tiktok-ads/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/tiktok-ads/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/youtube-analytics/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/youtube-analytics/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/cloudwatch/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/cloudwatch/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/datadog/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/datadog/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/elasticsearch/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/elasticsearch/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/grafana/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/grafana/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/kibana/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/kibana/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/loki/README.md +0 -19
- package/templates/.zaip-aios/templates/tools/mcp/observability/loki/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/observability/new-relic/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/new-relic/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/opentelemetry/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/observability/opentelemetry/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/observability/prometheus/README.md +0 -19
- package/templates/.zaip-aios/templates/tools/mcp/observability/prometheus/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/observability/sentry/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/sentry/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/policies/approval-rules.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/policies/financial-limits.yaml +0 -6
- package/templates/.zaip-aios/templates/tools/policies/permissions.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/policies/secret-handling.md +0 -7
- package/templates/.zaip-aios/templates/tools/profiles/business.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/profiles/default.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/profiles/development.yaml +0 -13
- package/templates/.zaip-aios/templates/tools/profiles/infrastructure.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/profiles/marketing.yaml +0 -9
- package/templates/.zaip-aios/templates/tools/profiles/observability.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/runtime/README.md +0 -3
- package/templates/.zaip-aios/templates/tools/runtime/api-mcp-runtime.mjs +0 -217
- package/templates/.zaip-aios/templates/tools/runtime/api-mcp-runtime.test.mjs +0 -56
- package/templates/.zaip-aios/templates/tools/runtime/fixtures/definition.json +0 -17
- package/templates/.zaip-aios/templates/tools/runtime/runner.mjs +0 -16
- package/templates/.zaip-aios/templates/tools/runtime/stdio.test.mjs +0 -32
- package/templates/.zaip-aios/templates/tools/state.example.yaml +0 -8
- package/templates/.zaip-aios/templates/zaip-aios/INDEX.md +0 -26
- package/templates/.zaip-aios/templates/zaip-aios/README.md +0 -13
- package/templates/.zaip-aios/templates/zaip-aios/VERSION +0 -1
- package/templates/.zaip-aios/templates/zaip-aios/guides/01-primeiros-passos.md +0 -10
- package/templates/.zaip-aios/templates/zaip-aios/guides/02-requirements.md +0 -12
- package/templates/.zaip-aios/templates/zaip-aios/guides/03-tasks.md +0 -12
- package/templates/.zaip-aios/templates/zaip-aios/guides/04-specs.md +0 -16
- package/templates/.zaip-aios/templates/zaip-aios/guides/05-prds.md +0 -13
- package/templates/.zaip-aios/templates/zaip-aios/guides/06-execucao.md +0 -13
- package/templates/.zaip-aios/templates/zaip-aios/guides/07-revisao-e-validacao.md +0 -8
- package/templates/.zaip-aios/templates/zaip-aios/guides/08-contexto-e-tokens.md +0 -10
- package/templates/.zaip-aios/templates/zaip-aios/guides/09-agentes-e-squads.md +0 -8
- package/templates/.zaip-aios/templates/zaip-aios/guides/10-seguranca.md +0 -206
- package/templates/.zaip-aios/templates/zaip-aios/guides/11-observabilidade-e-custos.md +0 -10
- package/templates/.zaip-aios/templates/zaip-aios/guides/12-instalacao-e-upgrade.md +0 -10
- package/templates/.zaip-aios/templates/zaip-aios/guides/13-boas-praticas.md +0 -12
- package/templates/.zaip-aios/templates/zaip-aios/guides/14-troubleshooting.md +0 -12
- package/templates/.zaip-aios/templates/zaip-aios/guides/15-tools-e-codex.md +0 -25
- package/templates/.zaip-aios/templates/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +0 -47
- /package/templates/{.zaip-aios → .agents/config}/pricing/fx/2026/07/12/usd-brl.json +0 -0
- /package/templates/{.zaip-aios/dashboard/apps/frontend/dist → .agents/dashboard/apps/frontend/public}/icon_zaip.png +0 -0
- /package/templates/{.zaip-aios/dashboard/apps/frontend/dist → .agents/dashboard/apps/frontend/public}/logo_novo_azul.png +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/LICENSE +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/THIRD_PARTY_NOTICES.md +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/VERSION +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/migrations/001-layout-v1.json +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/migrations/002-layout-v2.json +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/schemas/contracts.schema.json +0 -0
|
@@ -0,0 +1,793 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import {
|
|
3
|
+
buildCostMonitorProjection,
|
|
4
|
+
effectiveCostRunPhase,
|
|
5
|
+
} from "./build-cost-monitor-projection.js";
|
|
6
|
+
import {
|
|
7
|
+
catalogWithInputRate,
|
|
8
|
+
emptyOperations,
|
|
9
|
+
fxRate,
|
|
10
|
+
gpt54Catalog,
|
|
11
|
+
metric,
|
|
12
|
+
operationsWithPricedRun,
|
|
13
|
+
usage,
|
|
14
|
+
} from "./build-cost-monitor-projection.test-fixtures.js";
|
|
15
|
+
|
|
16
|
+
describe("Cost Monitor V2", () => {
|
|
17
|
+
it("normalizes legacy Task captures without calling them conversations", () => {
|
|
18
|
+
expect(effectiveCostRunPhase({ entrypoint: "task", phase: "conversation" })).toBe("planning");
|
|
19
|
+
expect(effectiveCostRunPhase({ entrypoint: "task", phase: "execution" })).toBe("execution");
|
|
20
|
+
expect(effectiveCostRunPhase({ entrypoint: "conversation", phase: "conversation" })).toBe(
|
|
21
|
+
"conversation",
|
|
22
|
+
);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it("merges missing, unknown, codex, and openai provider rows into openai", () => {
|
|
26
|
+
const operations = operationsWithPricedRun();
|
|
27
|
+
const source = operations.runs[0];
|
|
28
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
29
|
+
operations.runs = [null, "unknown", "codex", "openai"].map((provider, index) => ({
|
|
30
|
+
...source,
|
|
31
|
+
id: `RUN-PROVIDER-${index}`,
|
|
32
|
+
provider,
|
|
33
|
+
}));
|
|
34
|
+
|
|
35
|
+
const projection = buildCostMonitorProjection(operations);
|
|
36
|
+
|
|
37
|
+
expect(projection.filters_available.providers).toEqual(["openai"]);
|
|
38
|
+
expect(projection.groups.providers).toHaveLength(1);
|
|
39
|
+
expect(projection.groups.providers[0]).toMatchObject({ key: "openai", run_count: 4 });
|
|
40
|
+
expect(projection.runs.every((run) => run.provider === "openai")).toBe(true);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it("preserves unavailable usage as null instead of inventing zero", () => {
|
|
44
|
+
const projection = buildCostMonitorProjection(emptyOperations());
|
|
45
|
+
expect(projection).toMatchObject({
|
|
46
|
+
schema_version: 2,
|
|
47
|
+
layout_version: 2,
|
|
48
|
+
readonly: true,
|
|
49
|
+
source: ".agents/data",
|
|
50
|
+
overview: {
|
|
51
|
+
total_tokens: null,
|
|
52
|
+
estimated_usd: null,
|
|
53
|
+
estimated_brl: null,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
expect(projection.runs).toEqual([]);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("preserves Runs without complete telemetry with unavailable financial fields", () => {
|
|
60
|
+
const operations = operationsWithPricedRun();
|
|
61
|
+
const source = operations.runs[0];
|
|
62
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
63
|
+
operations.runs.push({
|
|
64
|
+
...source,
|
|
65
|
+
id: "RUN-MANUAL-WITHOUT-TELEMETRY",
|
|
66
|
+
provider: null,
|
|
67
|
+
model: "manual",
|
|
68
|
+
usage: usage(metric({ tokens: null, brl: null, usd: null, events: 0 })),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const projection = buildCostMonitorProjection(operations);
|
|
72
|
+
|
|
73
|
+
expect(projection.runs).toContainEqual(
|
|
74
|
+
expect.objectContaining({
|
|
75
|
+
run_id: "RUN-MANUAL-WITHOUT-TELEMETRY",
|
|
76
|
+
total_tokens: null,
|
|
77
|
+
estimated_usd: null,
|
|
78
|
+
estimated_brl: null,
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("keeps priced Runs whose duration was not observed", () => {
|
|
84
|
+
const operations = operationsWithPricedRun();
|
|
85
|
+
const source = operations.runs[0];
|
|
86
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
87
|
+
operations.runs.push({
|
|
88
|
+
...source,
|
|
89
|
+
id: "RUN-WITHOUT-OBSERVED-DURATION",
|
|
90
|
+
source_duration_ms: null,
|
|
91
|
+
source_started_at: null,
|
|
92
|
+
source_finished_at: null,
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
const projection = buildCostMonitorProjection(operations);
|
|
96
|
+
|
|
97
|
+
expect(projection.runs).toContainEqual(
|
|
98
|
+
expect.objectContaining({
|
|
99
|
+
run_id: "RUN-WITHOUT-OBSERVED-DURATION",
|
|
100
|
+
duration_ms: null,
|
|
101
|
+
duration_provenance: "unavailable",
|
|
102
|
+
}),
|
|
103
|
+
);
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it("keeps numeric legacy duration unavailable while preserving an observed zero", () => {
|
|
107
|
+
const operations = operationsWithPricedRun();
|
|
108
|
+
const source = operations.runs[0];
|
|
109
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
110
|
+
source.source_duration_ms = null;
|
|
111
|
+
operations.runs.push({
|
|
112
|
+
...source,
|
|
113
|
+
id: "RUN-OBSERVED-ZERO",
|
|
114
|
+
source_duration_ms: 0,
|
|
115
|
+
duration_ms: 60_000,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
const projection = buildCostMonitorProjection(operations);
|
|
119
|
+
|
|
120
|
+
expect(projection.runs).toContainEqual(
|
|
121
|
+
expect.objectContaining({
|
|
122
|
+
run_id: source.id,
|
|
123
|
+
duration_ms: null,
|
|
124
|
+
duration_provenance: "unavailable",
|
|
125
|
+
}),
|
|
126
|
+
);
|
|
127
|
+
expect(projection.runs).toContainEqual(
|
|
128
|
+
expect.objectContaining({
|
|
129
|
+
run_id: "RUN-OBSERVED-ZERO",
|
|
130
|
+
duration_ms: 0,
|
|
131
|
+
duration_provenance: "observed",
|
|
132
|
+
}),
|
|
133
|
+
);
|
|
134
|
+
});
|
|
135
|
+
it("uses source duration only and ignores lifecycle and reconciled timestamp outliers", () => {
|
|
136
|
+
const operations = operationsWithPricedRun();
|
|
137
|
+
const source = operations.runs[0];
|
|
138
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
139
|
+
const withTimestamp = (finished_at: string) => {
|
|
140
|
+
operations.runs = [
|
|
141
|
+
{
|
|
142
|
+
...source,
|
|
143
|
+
id: "ROOT-OBSERVED",
|
|
144
|
+
parent_run_id: null,
|
|
145
|
+
started_at: "2026-08-01T00:00:00.000Z",
|
|
146
|
+
source_duration_ms: 3_600_000,
|
|
147
|
+
duration_ms: 3_600_000,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
...source,
|
|
151
|
+
id: "ROOT-RECONCILED",
|
|
152
|
+
parent_run_id: null,
|
|
153
|
+
started_at: "2026-08-01T00:00:00.000Z",
|
|
154
|
+
source_duration_ms: null,
|
|
155
|
+
duration_ms: 1_800_000,
|
|
156
|
+
duration_provenance: "reconciled",
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
...source,
|
|
160
|
+
id: "ROOT-LEGACY",
|
|
161
|
+
parent_run_id: null,
|
|
162
|
+
started_at: "2026-08-01T00:00:00.000Z",
|
|
163
|
+
source_duration_ms: null,
|
|
164
|
+
duration_ms: 900_000,
|
|
165
|
+
duration_provenance: "legacy_inferred",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
...source,
|
|
169
|
+
id: "CHILD",
|
|
170
|
+
parent_run_id: "ROOT-OBSERVED",
|
|
171
|
+
started_at: "2026-08-01T00:00:00.000Z",
|
|
172
|
+
source_duration_ms: 7_200_000,
|
|
173
|
+
duration_ms: 7_200_000,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
...source,
|
|
177
|
+
id: "OUTLIER",
|
|
178
|
+
parent_run_id: null,
|
|
179
|
+
source_duration_ms: null,
|
|
180
|
+
duration_ms: 828_360_000,
|
|
181
|
+
duration_provenance: "estimated",
|
|
182
|
+
started_at: "2026-08-01T00:00:00.000Z",
|
|
183
|
+
finished_at,
|
|
184
|
+
},
|
|
185
|
+
];
|
|
186
|
+
return buildCostMonitorProjection(operations).groups.daily;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const outlier = withTimestamp("2026-08-10T14:06:00.000Z");
|
|
190
|
+
const bounded = withTimestamp("2026-08-01T00:01:00.000Z");
|
|
191
|
+
|
|
192
|
+
expect(outlier).toEqual(bounded);
|
|
193
|
+
expect(outlier).toContainEqual(
|
|
194
|
+
expect.objectContaining({
|
|
195
|
+
duration_ms: null,
|
|
196
|
+
duration: { known_sum: 10_800_000, unknown: 3, complete: false, coverage_ratio: 0.4 },
|
|
197
|
+
}),
|
|
198
|
+
);
|
|
199
|
+
});
|
|
200
|
+
it("does not infer macro duration from lifecycle timestamps", () => {
|
|
201
|
+
const operations = operationsWithPricedRun();
|
|
202
|
+
const root = operations.runs[0];
|
|
203
|
+
if (root === undefined) throw new Error("priced Run fixture is missing");
|
|
204
|
+
root.spec_id = "SPEC-DURATION";
|
|
205
|
+
root.source_duration_ms = null;
|
|
206
|
+
root.duration_ms = null;
|
|
207
|
+
root.started_at = "2026-07-13T01:00:00.000Z";
|
|
208
|
+
root.finished_at = "2026-07-16T00:09:21.600Z";
|
|
209
|
+
operations.runs.push({
|
|
210
|
+
...root,
|
|
211
|
+
id: "RUN-CHILD-DURATION",
|
|
212
|
+
parent_run_id: root.id,
|
|
213
|
+
run_kind: "subrun",
|
|
214
|
+
source_duration_ms: 7_200_000,
|
|
215
|
+
});
|
|
216
|
+
operations.specs.push({
|
|
217
|
+
id: "SPEC-DURATION",
|
|
218
|
+
title: "Tempo operacional",
|
|
219
|
+
created_at: null,
|
|
220
|
+
kind: "spec",
|
|
221
|
+
parent_id: null,
|
|
222
|
+
artifact_path: ".agents/data/specs/spec-duration.md",
|
|
223
|
+
lifecycle_status: "executing",
|
|
224
|
+
work_status: "executing",
|
|
225
|
+
execution_ids: [],
|
|
226
|
+
task_ids: [],
|
|
227
|
+
planned_tasks: [],
|
|
228
|
+
run_ids: [],
|
|
229
|
+
execution_count: 0,
|
|
230
|
+
task_count: 0,
|
|
231
|
+
run_count: 2,
|
|
232
|
+
duration_ms: 0,
|
|
233
|
+
decisions: { human: 0, agent: 0 },
|
|
234
|
+
rework_run_count: 0,
|
|
235
|
+
quality: operations.summary.quality,
|
|
236
|
+
usage: operations.summary.usage,
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
const projection = buildCostMonitorProjection(operations);
|
|
240
|
+
|
|
241
|
+
expect(projection.specs).toContainEqual(
|
|
242
|
+
expect.objectContaining({ id: "SPEC-DURATION", duration_ms: null }),
|
|
243
|
+
);
|
|
244
|
+
});
|
|
245
|
+
it("retains the canonical parent and child when the parent has unavailable cost", () => {
|
|
246
|
+
const operations = operationsWithPricedRun();
|
|
247
|
+
const parent = operations.runs[0];
|
|
248
|
+
if (parent === undefined) throw new Error("priced Run fixture is missing");
|
|
249
|
+
parent.spec_id = "SPEC-VISIBLE-ROOT";
|
|
250
|
+
parent.usage = usage(metric({ tokens: null, brl: null, usd: null, events: 0 }));
|
|
251
|
+
operations.runs.push({
|
|
252
|
+
...parent,
|
|
253
|
+
id: "RUN-PRICED-CHILD",
|
|
254
|
+
parent_run_id: parent.id,
|
|
255
|
+
run_kind: "subrun",
|
|
256
|
+
phase: "planning",
|
|
257
|
+
source_duration_ms: 7_200_000,
|
|
258
|
+
duration_ms: 7_200_000,
|
|
259
|
+
usage: operationsWithPricedRun().runs[0]?.usage ?? parent.usage,
|
|
260
|
+
});
|
|
261
|
+
operations.specs.push({
|
|
262
|
+
id: "SPEC-VISIBLE-ROOT",
|
|
263
|
+
title: "Raiz financeira visível",
|
|
264
|
+
created_at: null,
|
|
265
|
+
kind: "spec",
|
|
266
|
+
parent_id: null,
|
|
267
|
+
artifact_path: ".agents/data/specs/spec-visible-root.md",
|
|
268
|
+
lifecycle_status: "executing",
|
|
269
|
+
work_status: "executing",
|
|
270
|
+
execution_ids: [],
|
|
271
|
+
task_ids: [],
|
|
272
|
+
planned_tasks: [],
|
|
273
|
+
run_ids: [parent.id, "RUN-PRICED-CHILD"],
|
|
274
|
+
execution_count: 0,
|
|
275
|
+
task_count: 0,
|
|
276
|
+
run_count: 2,
|
|
277
|
+
duration_ms: null,
|
|
278
|
+
decisions: { human: 0, agent: 0 },
|
|
279
|
+
rework_run_count: 0,
|
|
280
|
+
quality: operations.summary.quality,
|
|
281
|
+
usage: operations.summary.usage,
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
const projection = buildCostMonitorProjection(operations);
|
|
285
|
+
|
|
286
|
+
expect(projection.runs.map((run) => run.run_id)).toEqual([
|
|
287
|
+
"RUN-PRICE-A7K2",
|
|
288
|
+
"RUN-PRICED-CHILD",
|
|
289
|
+
]);
|
|
290
|
+
expect(projection.specs).toContainEqual(
|
|
291
|
+
expect.objectContaining({ id: "SPEC-VISIBLE-ROOT", duration_ms: 40_000 }),
|
|
292
|
+
);
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
it("retains lifecycle-only Sub-Runs in Cost Monitor agent groups", () => {
|
|
296
|
+
const operations = operationsWithPricedRun();
|
|
297
|
+
const source = operations.runs[0];
|
|
298
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
299
|
+
operations.runs.push({
|
|
300
|
+
...source,
|
|
301
|
+
id: "RUN-SUBAGENT-WITHOUT-TELEMETRY",
|
|
302
|
+
parent_run_id: source.id,
|
|
303
|
+
run_kind: "subrun",
|
|
304
|
+
run_purpose: "review",
|
|
305
|
+
agent: "agent-reviewer",
|
|
306
|
+
agent_name: "zaip-agent-reviewer",
|
|
307
|
+
provider: null,
|
|
308
|
+
model: "gpt-5.6-sol",
|
|
309
|
+
usage: usage(metric({ tokens: null, brl: null, usd: null, events: 0 })),
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
const projection = buildCostMonitorProjection(operations);
|
|
313
|
+
|
|
314
|
+
expect(projection.runs).toContainEqual(
|
|
315
|
+
expect.objectContaining({
|
|
316
|
+
run_id: "RUN-SUBAGENT-WITHOUT-TELEMETRY",
|
|
317
|
+
total_tokens: null,
|
|
318
|
+
estimated_brl: null,
|
|
319
|
+
}),
|
|
320
|
+
);
|
|
321
|
+
expect(projection.groups.agents).toContainEqual(
|
|
322
|
+
expect.objectContaining({ key: "zaip-agent-reviewer", run_count: 1 }),
|
|
323
|
+
);
|
|
324
|
+
expect(projection.usage.total.cost.brl).toBe(operations.summary.usage.total.cost.brl);
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
it("keeps canonical unavailable cost while exposing pricing audit for collected usage", () => {
|
|
328
|
+
const operations = operationsWithPricedRun();
|
|
329
|
+
const source = operations.runs[0];
|
|
330
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
331
|
+
source.source_started_at = null;
|
|
332
|
+
source.source_finished_at = null;
|
|
333
|
+
source.source_duration_ms = null;
|
|
334
|
+
|
|
335
|
+
const projection = buildCostMonitorProjection(operations, {
|
|
336
|
+
catalog: catalogWithInputRate(1),
|
|
337
|
+
fxRate: fxRate(5),
|
|
338
|
+
currency: "BRL",
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
expect(projection.runs).toContainEqual(
|
|
342
|
+
expect.objectContaining({
|
|
343
|
+
run_id: source.id,
|
|
344
|
+
duration_ms: null,
|
|
345
|
+
duration_provenance: "unavailable",
|
|
346
|
+
estimated_brl: null,
|
|
347
|
+
}),
|
|
348
|
+
);
|
|
349
|
+
expect(projection.runs[0]?.standard_cost_usd).toBe(1);
|
|
350
|
+
expect(projection.overview.estimated_brl).toBeNull();
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
it("projects V2 Run attribution and coverage", () => {
|
|
354
|
+
const operations = emptyOperations();
|
|
355
|
+
const measured = usage(metric({ tokens: 120, brl: 0.5, usd: 0.1, events: 1 }));
|
|
356
|
+
operations.summary.usage = measured;
|
|
357
|
+
operations.tasks.push({
|
|
358
|
+
schema_version: 2,
|
|
359
|
+
id: "TASK-2026-07-13-01-00-COST-A7K2",
|
|
360
|
+
revision: 1,
|
|
361
|
+
change_id: "CHG-2026-07-13-01-00-COST-A7K2",
|
|
362
|
+
title: "Measure cost",
|
|
363
|
+
short_name: "measure-cost",
|
|
364
|
+
objective: "Measure",
|
|
365
|
+
status: "completed",
|
|
366
|
+
attempt_count: 1,
|
|
367
|
+
risk: "standard",
|
|
368
|
+
priority: "high",
|
|
369
|
+
owner: null,
|
|
370
|
+
requirement_ids: ["REQ-COST-001"],
|
|
371
|
+
acceptance_ids: ["AC-COST-001-01"],
|
|
372
|
+
depends_on: [],
|
|
373
|
+
write_scopes: [],
|
|
374
|
+
created_at: "2026-07-13T01:00:00.000Z",
|
|
375
|
+
updated_at: "2026-07-13T01:00:00.000Z",
|
|
376
|
+
started_at: "2026-07-13T01:00:00.000Z",
|
|
377
|
+
finished_at: "2026-07-13T01:01:00.000Z",
|
|
378
|
+
result: { summary: "done", changed_files: [], evidence_ids: ["EVD-1"] },
|
|
379
|
+
artifact_path: ".agents/data/tasks/2026/07/13/task.md",
|
|
380
|
+
progress: 100,
|
|
381
|
+
spec_id: null,
|
|
382
|
+
execution_started: true,
|
|
383
|
+
});
|
|
384
|
+
operations.summary.task_count = 1;
|
|
385
|
+
operations.summary.run_count = 1;
|
|
386
|
+
operations.runs.push({
|
|
387
|
+
id: "RUN-2026-07-13-01-00-COST-A7K2",
|
|
388
|
+
artifact_path: ".agents/data/runs/2026/07/13/run.jsonl",
|
|
389
|
+
status: "completed",
|
|
390
|
+
phase: "execution",
|
|
391
|
+
entrypoint: "task",
|
|
392
|
+
work_type: "new",
|
|
393
|
+
run_role: "orchestrator",
|
|
394
|
+
run_kind: "run",
|
|
395
|
+
run_purpose: "orchestration",
|
|
396
|
+
requires_finalizer: true,
|
|
397
|
+
parent_run_id: null,
|
|
398
|
+
client: "codex",
|
|
399
|
+
agent: "developer",
|
|
400
|
+
agent_name: "developer",
|
|
401
|
+
provider: "openai",
|
|
402
|
+
model: "gpt-5",
|
|
403
|
+
reasoning_effort: "medium",
|
|
404
|
+
effective_model: "gpt-5",
|
|
405
|
+
effective_reasoning_effort: "medium",
|
|
406
|
+
effective_config_mixed: false,
|
|
407
|
+
call_count: 1,
|
|
408
|
+
terminal_call_count: 1,
|
|
409
|
+
failed_call_count: 0,
|
|
410
|
+
cancelled_call_count: 0,
|
|
411
|
+
conversation_id: "CONVERSATION-A7K2",
|
|
412
|
+
execution_id: "EXEC-2026-07-13-01-00-COST-A7K2",
|
|
413
|
+
task_id: operations.tasks[0]?.id ?? null,
|
|
414
|
+
spec_id: null,
|
|
415
|
+
prd_id: null,
|
|
416
|
+
change_id: operations.tasks[0]?.change_id ?? null,
|
|
417
|
+
started_at: "2026-07-13T01:00:00.000Z",
|
|
418
|
+
finished_at: "2026-07-13T01:01:00.000Z",
|
|
419
|
+
duration_ms: 60_000,
|
|
420
|
+
source_started_at: "2026-07-13T01:00:10.000Z",
|
|
421
|
+
source_finished_at: "2026-07-13T01:00:50.000Z",
|
|
422
|
+
source_duration_ms: 40_000,
|
|
423
|
+
capture_lag_ms: 10_000,
|
|
424
|
+
usage: measured,
|
|
425
|
+
});
|
|
426
|
+
const projection = buildCostMonitorProjection(operations);
|
|
427
|
+
expect(projection.runs[0]).toMatchObject({
|
|
428
|
+
conversation_id: "CONVERSATION-A7K2",
|
|
429
|
+
task_title: "Measure cost",
|
|
430
|
+
run_role: "orchestrator",
|
|
431
|
+
agent_name: "developer",
|
|
432
|
+
duration_ms: 40_000,
|
|
433
|
+
capture_lag_ms: 10_000,
|
|
434
|
+
requested_model: "gpt-5",
|
|
435
|
+
model: "gpt-5",
|
|
436
|
+
reasoning_effort: "medium",
|
|
437
|
+
call_count: 1,
|
|
438
|
+
total_tokens: 120,
|
|
439
|
+
estimated_brl: 0.5,
|
|
440
|
+
origin: "task",
|
|
441
|
+
work_type: "new",
|
|
442
|
+
coverage: { events: 1, tokens: 1, usd: 1, brl: 1 },
|
|
443
|
+
});
|
|
444
|
+
expect(projection.groups).toMatchObject({
|
|
445
|
+
daily: [
|
|
446
|
+
{
|
|
447
|
+
key: "2026-07-12",
|
|
448
|
+
duration: { known_sum: 40_000, unknown: 0, complete: true, coverage_ratio: 1 },
|
|
449
|
+
},
|
|
450
|
+
],
|
|
451
|
+
monthly: [
|
|
452
|
+
{
|
|
453
|
+
key: "2026-07",
|
|
454
|
+
duration: { known_sum: 40_000, unknown: 0, complete: true, coverage_ratio: 1 },
|
|
455
|
+
},
|
|
456
|
+
],
|
|
457
|
+
annual: [
|
|
458
|
+
{
|
|
459
|
+
key: "2026",
|
|
460
|
+
duration: { known_sum: 40_000, unknown: 0, complete: true, coverage_ratio: 1 },
|
|
461
|
+
},
|
|
462
|
+
],
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
|
|
466
|
+
it("normalizes legacy Task captures into planning instead of conversation", () => {
|
|
467
|
+
const operations = operationsWithPricedRun();
|
|
468
|
+
const run = operations.runs[0];
|
|
469
|
+
if (!run) throw new Error("priced Run fixture is missing");
|
|
470
|
+
run.phase = "conversation";
|
|
471
|
+
const projection = buildCostMonitorProjection(operations);
|
|
472
|
+
|
|
473
|
+
expect(projection.runs[0]?.phase).toBe("planning");
|
|
474
|
+
expect(projection.groups.conversations).toEqual([]);
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
it("groups and filters by the canonical visible Agent name", () => {
|
|
478
|
+
const operations = operationsWithPricedRun();
|
|
479
|
+
const source = operations.runs[0];
|
|
480
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
481
|
+
operations.runs = [
|
|
482
|
+
{
|
|
483
|
+
...source,
|
|
484
|
+
id: "RUN-BUILDER",
|
|
485
|
+
agent: "agent-builder",
|
|
486
|
+
agent_name: "zaip-agent-builder",
|
|
487
|
+
model: "gpt-5.6-terra",
|
|
488
|
+
effective_model: "gpt-5.6-terra",
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
...source,
|
|
492
|
+
id: "RUN-AUDITOR",
|
|
493
|
+
agent: "agent-auditor",
|
|
494
|
+
agent_name: "zaip-agent-auditor",
|
|
495
|
+
model: "gpt-5.6-sol",
|
|
496
|
+
effective_model: "gpt-5.6-sol",
|
|
497
|
+
},
|
|
498
|
+
];
|
|
499
|
+
|
|
500
|
+
const projection = buildCostMonitorProjection(operations);
|
|
501
|
+
|
|
502
|
+
expect(projection.filters_available.agents).toEqual([
|
|
503
|
+
"zaip-agent-auditor",
|
|
504
|
+
"zaip-agent-builder",
|
|
505
|
+
]);
|
|
506
|
+
expect(projection.groups.agents.map(({ key }) => key)).toEqual(
|
|
507
|
+
expect.arrayContaining(["zaip-agent-auditor", "zaip-agent-builder"]),
|
|
508
|
+
);
|
|
509
|
+
expect(projection.runs).toEqual(
|
|
510
|
+
expect.arrayContaining([
|
|
511
|
+
expect.objectContaining({
|
|
512
|
+
run_id: "RUN-BUILDER",
|
|
513
|
+
agent: "agent-builder",
|
|
514
|
+
agent_name: "zaip-agent-builder",
|
|
515
|
+
requested_model: "gpt-5.6-terra",
|
|
516
|
+
model: "gpt-5.6-terra",
|
|
517
|
+
}),
|
|
518
|
+
expect.objectContaining({
|
|
519
|
+
run_id: "RUN-AUDITOR",
|
|
520
|
+
agent: "agent-auditor",
|
|
521
|
+
agent_name: "zaip-agent-auditor",
|
|
522
|
+
requested_model: "gpt-5.6-sol",
|
|
523
|
+
model: "gpt-5.6-sol",
|
|
524
|
+
}),
|
|
525
|
+
]),
|
|
526
|
+
);
|
|
527
|
+
});
|
|
528
|
+
|
|
529
|
+
it("includes every configured ZAIP Agent even when it has no Runs", () => {
|
|
530
|
+
const operations = operationsWithPricedRun();
|
|
531
|
+
const source = operations.runs[0];
|
|
532
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
533
|
+
operations.runs = [
|
|
534
|
+
{
|
|
535
|
+
...source,
|
|
536
|
+
agent: "agent-builder",
|
|
537
|
+
agent_name: "zaip-agent-builder",
|
|
538
|
+
},
|
|
539
|
+
];
|
|
540
|
+
|
|
541
|
+
const agentNames = [
|
|
542
|
+
"zaip-agent-orchestrator",
|
|
543
|
+
"zaip-agent-builder",
|
|
544
|
+
"zaip-agent-reviewer",
|
|
545
|
+
"zaip-agent-integrator",
|
|
546
|
+
"zaip-agent-auditor",
|
|
547
|
+
];
|
|
548
|
+
const projection = buildCostMonitorProjection(operations, undefined, { agentNames });
|
|
549
|
+
|
|
550
|
+
expect(projection.configured_agents).toEqual(agentNames.slice().sort());
|
|
551
|
+
expect(projection.groups.agents).toEqual(
|
|
552
|
+
expect.arrayContaining([
|
|
553
|
+
expect.objectContaining({ key: "zaip-agent-builder", run_count: 1 }),
|
|
554
|
+
expect.objectContaining({ key: "zaip-agent-reviewer", run_count: 0 }),
|
|
555
|
+
expect.objectContaining({ key: "zaip-agent-integrator", run_count: 0 }),
|
|
556
|
+
expect.objectContaining({ key: "zaip-agent-auditor", run_count: 0 }),
|
|
557
|
+
expect.objectContaining({ key: "zaip-agent-orchestrator", run_count: 0 }),
|
|
558
|
+
]),
|
|
559
|
+
);
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
it("preserves legacy codex rows when no ZAIP agent actually ran", () => {
|
|
563
|
+
const operations = operationsWithPricedRun();
|
|
564
|
+
const source = operations.runs[0];
|
|
565
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
566
|
+
source.agent = "codex";
|
|
567
|
+
source.agent_name = "codex";
|
|
568
|
+
source.run_role = "orchestrator";
|
|
569
|
+
|
|
570
|
+
const projection = buildCostMonitorProjection(operations, undefined, {
|
|
571
|
+
agentNames: ["zaip-agent-builder"],
|
|
572
|
+
agentNamesById: { "agent-builder": "zaip-agent-builder" },
|
|
573
|
+
agentNamesByRole: { builder: "zaip-agent-builder" },
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
expect(projection.runs[0]?.agent).toBe("codex");
|
|
577
|
+
expect(projection.runs[0]?.agent_name).toBe("codex");
|
|
578
|
+
|
|
579
|
+
source.run_role = "intake";
|
|
580
|
+
const intake = buildCostMonitorProjection(operations, undefined, {
|
|
581
|
+
agentNamesByRole: { orchestrator: "zaip-agent-orchestrator" },
|
|
582
|
+
});
|
|
583
|
+
expect(intake.runs[0]?.agent_name).toBe("codex");
|
|
584
|
+
|
|
585
|
+
source.agent = "agent-reviewer";
|
|
586
|
+
const specialized = buildCostMonitorProjection(operations, undefined, {
|
|
587
|
+
agentNamesById: { "agent-reviewer": "zaip-agent-reviewer" },
|
|
588
|
+
});
|
|
589
|
+
expect(specialized.runs[0]?.agent_name).toBe("zaip-agent-reviewer");
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
it("uses the catalog agent id for Sub-Runs even when their inherited name is stale", () => {
|
|
593
|
+
const operations = operationsWithPricedRun();
|
|
594
|
+
const source = operations.runs[0];
|
|
595
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
596
|
+
source.agent = "agent-finalizer";
|
|
597
|
+
source.agent_name = "zaip-agent-orchestrator";
|
|
598
|
+
source.run_kind = "subrun";
|
|
599
|
+
source.parent_run_id = "RUN-PARENT";
|
|
600
|
+
|
|
601
|
+
const projection = buildCostMonitorProjection(operations, undefined, {
|
|
602
|
+
agentNamesById: { "agent-finalizer": "zaip-agent-finalizer" },
|
|
603
|
+
});
|
|
604
|
+
|
|
605
|
+
expect(projection.runs[0]?.agent_name).toBe("zaip-agent-finalizer");
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
it("maps an unmapped orchestrator internal id through its catalog role", () => {
|
|
609
|
+
const operations = operationsWithPricedRun();
|
|
610
|
+
const source = operations.runs[0];
|
|
611
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
612
|
+
source.agent = "orchestrator";
|
|
613
|
+
source.agent_name = "orchestrator";
|
|
614
|
+
|
|
615
|
+
const projection = buildCostMonitorProjection(operations, undefined, {
|
|
616
|
+
agentNamesByRole: { orchestrator: "zaip-agent-orchestrator" },
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
expect(projection.runs[0]?.agent_name).toBe("zaip-agent-orchestrator");
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
it("maps the canonical orchestrator id when catalog loading is unavailable", () => {
|
|
623
|
+
const operations = operationsWithPricedRun();
|
|
624
|
+
const source = operations.runs[0];
|
|
625
|
+
if (source === undefined) throw new Error("priced Run fixture is missing");
|
|
626
|
+
source.agent = "agent-orchestrator";
|
|
627
|
+
source.agent_name = "agent-orchestrator";
|
|
628
|
+
|
|
629
|
+
expect(buildCostMonitorProjection(operations).runs[0]?.agent_name).toBe(
|
|
630
|
+
"zaip-agent-orchestrator",
|
|
631
|
+
);
|
|
632
|
+
});
|
|
633
|
+
|
|
634
|
+
it("does not classify Task-attributed Runs as conversations", () => {
|
|
635
|
+
const operations = operationsWithPricedRun();
|
|
636
|
+
const run = operations.runs[0];
|
|
637
|
+
if (!run) throw new Error("priced Run fixture is missing");
|
|
638
|
+
run.phase = "conversation";
|
|
639
|
+
run.entrypoint = "task";
|
|
640
|
+
run.task_id = "TASK-ATTRIBUTED";
|
|
641
|
+
|
|
642
|
+
const projection = buildCostMonitorProjection(operations);
|
|
643
|
+
|
|
644
|
+
expect(projection.runs[0]).toMatchObject({ origin: "task", phase: "planning" });
|
|
645
|
+
expect(projection.groups.conversations).toEqual([]);
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
it("keeps canonical metrics while recalculating pricing audit from the current catalog", () => {
|
|
649
|
+
const operations = operationsWithPricedRun();
|
|
650
|
+
const low = buildCostMonitorProjection(operations, {
|
|
651
|
+
catalog: catalogWithInputRate(1),
|
|
652
|
+
fxRate: fxRate(5),
|
|
653
|
+
currency: "BRL",
|
|
654
|
+
});
|
|
655
|
+
const high = buildCostMonitorProjection(operations, {
|
|
656
|
+
catalog: catalogWithInputRate(3),
|
|
657
|
+
fxRate: fxRate(5),
|
|
658
|
+
currency: "BRL",
|
|
659
|
+
});
|
|
660
|
+
|
|
661
|
+
expect(low.overview.estimated_usd).toBeNull();
|
|
662
|
+
expect(low.overview.estimated_brl).toBeNull();
|
|
663
|
+
expect(high.overview.estimated_usd).toBeNull();
|
|
664
|
+
expect(high.overview.estimated_brl).toBeNull();
|
|
665
|
+
expect(low.runs[0]?.standard_cost_usd).toBe(1);
|
|
666
|
+
expect(high.runs[0]?.standard_cost_usd).toBe(3);
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
it("preserves a recorded total when service tier is unavailable", () => {
|
|
670
|
+
const operations = operationsWithPricedRun();
|
|
671
|
+
const run = operations.runs[0];
|
|
672
|
+
if (!run) throw new Error("priced Run fixture is missing");
|
|
673
|
+
run.service_tier = null;
|
|
674
|
+
run.usage = usage(
|
|
675
|
+
metric({
|
|
676
|
+
tokens: 1_000_000,
|
|
677
|
+
input: 1_000_000,
|
|
678
|
+
cached: 0,
|
|
679
|
+
output: 0,
|
|
680
|
+
reasoning: 0,
|
|
681
|
+
usd: 1.25,
|
|
682
|
+
brl: 6.25,
|
|
683
|
+
events: 1,
|
|
684
|
+
}),
|
|
685
|
+
);
|
|
686
|
+
|
|
687
|
+
const projection = buildCostMonitorProjection(operations, {
|
|
688
|
+
catalog: catalogWithInputRate(99),
|
|
689
|
+
fxRate: fxRate(5.5),
|
|
690
|
+
currency: "BRL",
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
expect(projection.runs[0]).toMatchObject({
|
|
694
|
+
service_tier: null,
|
|
695
|
+
input_cost_usd: 99,
|
|
696
|
+
standard_cost_usd: 99,
|
|
697
|
+
estimated_usd: 1.25,
|
|
698
|
+
estimated_brl: 6.25,
|
|
699
|
+
coverage: { events: 1, tokens: 1, usd: 1, brl: 1 },
|
|
700
|
+
});
|
|
701
|
+
expect(projection.overview).toMatchObject({ estimated_usd: 1.25, estimated_brl: 6.25 });
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
it("retains token-bearing Runs when a cost cannot be established", () => {
|
|
705
|
+
const operations = operationsWithPricedRun();
|
|
706
|
+
const source = operations.runs[0];
|
|
707
|
+
if (!source) throw new Error("priced Run fixture is missing");
|
|
708
|
+
operations.runs = [
|
|
709
|
+
{
|
|
710
|
+
...source,
|
|
711
|
+
id: "RUN-UNKNOWN-MODEL",
|
|
712
|
+
model: "unknown-model",
|
|
713
|
+
effective_model: "unknown-model",
|
|
714
|
+
service_tier: null,
|
|
715
|
+
usage: usage(metric({ tokens: 1_000, input: 900, cached: 800, output: 100, events: 1 })),
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
...source,
|
|
719
|
+
id: "RUN-UNKNOWN-TOKENS",
|
|
720
|
+
model: "gpt-5.4",
|
|
721
|
+
effective_model: "gpt-5.4",
|
|
722
|
+
service_tier: null,
|
|
723
|
+
usage: usage(metric({ tokens: 1_000, input: 900, output: 100, events: 1 })),
|
|
724
|
+
},
|
|
725
|
+
];
|
|
726
|
+
|
|
727
|
+
const projection = buildCostMonitorProjection(operations, {
|
|
728
|
+
catalog: gpt54Catalog(),
|
|
729
|
+
fxRate: fxRate(5.5),
|
|
730
|
+
currency: "BRL",
|
|
731
|
+
});
|
|
732
|
+
|
|
733
|
+
expect(projection.runs).toHaveLength(2);
|
|
734
|
+
expect(projection.runs).toEqual(
|
|
735
|
+
expect.arrayContaining([
|
|
736
|
+
expect.objectContaining({
|
|
737
|
+
run_id: "RUN-UNKNOWN-MODEL",
|
|
738
|
+
total_tokens: 1_000,
|
|
739
|
+
estimated_brl: null,
|
|
740
|
+
}),
|
|
741
|
+
expect.objectContaining({
|
|
742
|
+
run_id: "RUN-UNKNOWN-TOKENS",
|
|
743
|
+
total_tokens: 1_000,
|
|
744
|
+
estimated_brl: null,
|
|
745
|
+
}),
|
|
746
|
+
]),
|
|
747
|
+
);
|
|
748
|
+
});
|
|
749
|
+
|
|
750
|
+
it("preserves recorded cost when the current catalog cannot price a supported tier combination", () => {
|
|
751
|
+
const operations = operationsWithPricedRun();
|
|
752
|
+
const run = operations.runs[0];
|
|
753
|
+
if (!run) throw new Error("priced Run fixture is missing");
|
|
754
|
+
run.model = "gpt-5.4";
|
|
755
|
+
run.effective_model = "gpt-5.4";
|
|
756
|
+
run.service_tier = "priority";
|
|
757
|
+
run.usage = usage(
|
|
758
|
+
metric({
|
|
759
|
+
tokens: 400_000,
|
|
760
|
+
input: 300_000,
|
|
761
|
+
cached: 200_000,
|
|
762
|
+
output: 100_000,
|
|
763
|
+
reasoning: 20_000,
|
|
764
|
+
usd: 2,
|
|
765
|
+
brl: 10,
|
|
766
|
+
events: 1,
|
|
767
|
+
}),
|
|
768
|
+
);
|
|
769
|
+
|
|
770
|
+
const projection = buildCostMonitorProjection(operations, {
|
|
771
|
+
catalog: gpt54Catalog(),
|
|
772
|
+
fxRate: fxRate(5.5),
|
|
773
|
+
currency: "BRL",
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
expect(projection.runs[0]).toMatchObject({
|
|
777
|
+
service_tier: "priority",
|
|
778
|
+
input_rate_usd_per_million: 2.5,
|
|
779
|
+
cached_input_rate_usd_per_million: 0.25,
|
|
780
|
+
output_rate_usd_per_million: 15,
|
|
781
|
+
input_cost_usd: 0.5,
|
|
782
|
+
cached_input_cost_usd: 0.1,
|
|
783
|
+
output_cost_usd: 2.25,
|
|
784
|
+
reasoning_cost_usd: 0,
|
|
785
|
+
standard_cost_usd: 2.85,
|
|
786
|
+
speed_cost_multiplier: null,
|
|
787
|
+
speed_uplift_usd: null,
|
|
788
|
+
estimated_usd: 2,
|
|
789
|
+
estimated_brl: 10,
|
|
790
|
+
coverage: { events: 1, tokens: 1, usd: 1, brl: 1 },
|
|
791
|
+
});
|
|
792
|
+
});
|
|
793
|
+
});
|