@zaip-ai/cli 1.0.4 → 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 +76 -601
- 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,708 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { queryInvocationManifestPeriod } from "@zaip-ai/costs";
|
|
3
|
+
import { describe, expect, it } from "vitest";
|
|
4
|
+
import {
|
|
5
|
+
activeCostPeriodData,
|
|
6
|
+
costPeriodDateRange,
|
|
7
|
+
defaultCostPeriod,
|
|
8
|
+
loadCostMonitorPeriod,
|
|
9
|
+
shouldFetchCostPeriod,
|
|
10
|
+
} from "./CostFilters.js";
|
|
11
|
+
import { displayModelName, isModelAuditRow, sumModelDurationMs } from "./CostModelsAuditTable.js";
|
|
12
|
+
import {
|
|
13
|
+
agentRunModelPresentation,
|
|
14
|
+
CostGroupsTable,
|
|
15
|
+
CostRunsTable,
|
|
16
|
+
contextUpliftUsd,
|
|
17
|
+
costGroupsScrollLabel,
|
|
18
|
+
costPeriodTotalAriaLabel,
|
|
19
|
+
costRunsDurationTotal,
|
|
20
|
+
costRunsScrollLabel,
|
|
21
|
+
formatAuditableCompactNumber,
|
|
22
|
+
formatAuditableCurrency,
|
|
23
|
+
formatAuditableDuration,
|
|
24
|
+
formatAuditableNumber,
|
|
25
|
+
formatBrlRate,
|
|
26
|
+
formatCostPeriodLabel,
|
|
27
|
+
formatDateTime,
|
|
28
|
+
formatDurationCoverage,
|
|
29
|
+
formatMultiplierPair,
|
|
30
|
+
formatRate,
|
|
31
|
+
formatReasoningEffort,
|
|
32
|
+
formatServiceTier,
|
|
33
|
+
formatUsd,
|
|
34
|
+
hasCollectedUsage,
|
|
35
|
+
isCompactRunColumnVisible,
|
|
36
|
+
isDisplayableModel,
|
|
37
|
+
ratio,
|
|
38
|
+
runOriginBadge,
|
|
39
|
+
sortCostValue,
|
|
40
|
+
} from "./CostTables.js";
|
|
41
|
+
|
|
42
|
+
describe("Agent Run model presentation", () => {
|
|
43
|
+
it("shows only the effective model and its provider", () => {
|
|
44
|
+
expect(
|
|
45
|
+
agentRunModelPresentation({
|
|
46
|
+
requested_model: "gpt-5.6-terra",
|
|
47
|
+
model: "gpt-5.6-sol",
|
|
48
|
+
provider: "openai",
|
|
49
|
+
}),
|
|
50
|
+
).toEqual({ primary: "gpt-5.6-sol", detail: "openai" });
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("does not mention an unavailable planned configuration", () => {
|
|
54
|
+
expect(
|
|
55
|
+
agentRunModelPresentation({
|
|
56
|
+
requested_model: "unknown",
|
|
57
|
+
model: "gpt-5.6-sol",
|
|
58
|
+
provider: "openai",
|
|
59
|
+
}),
|
|
60
|
+
).toEqual({
|
|
61
|
+
primary: "gpt-5.6-sol",
|
|
62
|
+
detail: "openai",
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
describe("period formatting", () => {
|
|
68
|
+
it("renders daily dates and keeps monthly periods numerically sortable", () => {
|
|
69
|
+
expect(formatCostPeriodLabel("2026-07-16", "daily", "pt-BR")).toBe("16/07/2026");
|
|
70
|
+
expect(formatCostPeriodLabel("2026-07", "monthly", "pt-BR")).toBe("2026-07");
|
|
71
|
+
expect(formatCostPeriodLabel("2025-12", "monthly", "en-US")).toBe("2025-12");
|
|
72
|
+
expect(formatCostPeriodLabel("2026", "annual", "pt-BR")).toBe("2026");
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
describe("period total accessibility", () => {
|
|
77
|
+
it("names the complete period total with the displayed time, tokens, and BRL values", () => {
|
|
78
|
+
expect(
|
|
79
|
+
costPeriodTotalAriaLabel({
|
|
80
|
+
locale: "pt-BR",
|
|
81
|
+
duration: "2h 15min",
|
|
82
|
+
tokens: "1,2 mi",
|
|
83
|
+
cost: "R$ 3,40",
|
|
84
|
+
currency: "BRL",
|
|
85
|
+
}),
|
|
86
|
+
).toBe("Total geral — Tempo: 2h 15min; Tokens: 1,2 mi; BRL: R$ 3,40");
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
describe("Run origin badges", () => {
|
|
91
|
+
it("uses one hierarchical origin per Run", () => {
|
|
92
|
+
expect(runOriginBadge({ prd_id: "PRD-1", spec_id: "SPEC-1", task_id: "TASK-1" })).toEqual({
|
|
93
|
+
label: "PRD",
|
|
94
|
+
tone: "prd",
|
|
95
|
+
});
|
|
96
|
+
expect(runOriginBadge({ prd_id: null, spec_id: "SPEC-1", task_id: "TASK-1" })).toEqual({
|
|
97
|
+
label: "SPEC",
|
|
98
|
+
tone: "spec",
|
|
99
|
+
});
|
|
100
|
+
expect(runOriginBadge({ prd_id: null, spec_id: null, task_id: "TASK-1" })).toEqual({
|
|
101
|
+
label: "Tarefa avulsa",
|
|
102
|
+
tone: "task",
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
describe("date time formatting", () => {
|
|
108
|
+
it("uses a placeholder for groups that do not yet have a Run", () => {
|
|
109
|
+
expect(formatDateTime("", "pt-BR")).toBe("—");
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
describe("formatAuditableNumber", () => {
|
|
114
|
+
it("keeps unavailable numeric metrics distinct from observed zero", () => {
|
|
115
|
+
expect(formatAuditableNumber(null, "pt-BR")).toBe("Indisponível");
|
|
116
|
+
expect(formatAuditableNumber(null, "en-US")).toBe("Unavailable");
|
|
117
|
+
expect(formatAuditableNumber(0, "pt-BR")).toBe("0");
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("keeps observed positive values", () => {
|
|
121
|
+
expect(formatAuditableNumber(1234, "pt-BR")).toBe("1.234");
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
describe("compact Sub-Run columns", () => {
|
|
126
|
+
it("keeps a column hidden until at least one Sub-Run has observed data", () => {
|
|
127
|
+
const rows = [{ duration_ms: null }, { duration_ms: null }] as never;
|
|
128
|
+
expect(isCompactRunColumnVisible(rows, (row) => row.duration_ms)).toBe(false);
|
|
129
|
+
expect(
|
|
130
|
+
isCompactRunColumnVisible(
|
|
131
|
+
[{ duration_ms: null }, { duration_ms: 2 }] as never,
|
|
132
|
+
(row) => row.duration_ms,
|
|
133
|
+
),
|
|
134
|
+
).toBe(true);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
describe("monetary formatting", () => {
|
|
139
|
+
it("uses exactly two decimal places for rates and USD totals", () => {
|
|
140
|
+
expect(formatRate(5.450000053204, "pt-BR")).toBe("5,45");
|
|
141
|
+
expect(formatBrlRate(5.450000053204, "pt-BR")).toBe("R$ 5,45");
|
|
142
|
+
expect(formatUsd(19.583447, "pt-BR").replace(/\s/g, " ")).toBe("US$ 19,58");
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it("calculates exchange as a direct BRL/USD ratio", () => {
|
|
146
|
+
expect(ratio(106.73, 19.583444)).toBeCloseTo(5.45, 2);
|
|
147
|
+
expect(ratio(100, 0)).toBeNull();
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it("keeps unavailable duration distinct from an observed zero", () => {
|
|
151
|
+
expect(formatRate(null, "pt-BR")).toBe("Indisponível");
|
|
152
|
+
expect(formatUsd(null, "en-US")).toBe("Unavailable");
|
|
153
|
+
expect(formatAuditableCurrency(null, "BRL", "pt-BR")).toBe("Indisponível");
|
|
154
|
+
expect(formatAuditableDuration(null, "pt-BR")).toBe("Indisponível");
|
|
155
|
+
expect(formatAuditableCompactNumber(null, "pt-BR")).toBe("Indisponível");
|
|
156
|
+
expect(formatMultiplierPair(null, null, "pt-BR")).toBe("Indisponível");
|
|
157
|
+
expect(formatMultiplierPair(2, null, "pt-BR")).toBe("Indisponível");
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
describe("duration coverage", () => {
|
|
162
|
+
it("renders known partial duration without claiming it is complete", () => {
|
|
163
|
+
expect(
|
|
164
|
+
formatDurationCoverage(
|
|
165
|
+
{ known_sum: 60_000, unknown: 1, complete: false, coverage_ratio: 0.5 },
|
|
166
|
+
"pt-BR",
|
|
167
|
+
),
|
|
168
|
+
).toBe("1 min");
|
|
169
|
+
expect(
|
|
170
|
+
formatDurationCoverage(
|
|
171
|
+
{ known_sum: 0, unknown: 2, complete: false, coverage_ratio: 0 },
|
|
172
|
+
"pt-BR",
|
|
173
|
+
),
|
|
174
|
+
).toBe("Indisponível");
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
describe("runtime availability", () => {
|
|
179
|
+
it("uses requested effort only as a clearly labelled visual fallback", () => {
|
|
180
|
+
expect(formatReasoningEffort("high", "medium", "pt-BR")).toBe("Alto");
|
|
181
|
+
expect(formatReasoningEffort(null, "high", "pt-BR")).toBe("Alto (solicitado; efetivo -)");
|
|
182
|
+
expect(formatReasoningEffort(null, null, "en-US")).toBe("-");
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
it("uses the default speed label when the service tier is unavailable", () => {
|
|
186
|
+
expect(formatServiceTier(null, "pt-BR")).toBe("Padrão");
|
|
187
|
+
expect(formatServiceTier("unknown", "pt-BR")).toBe("Padrão");
|
|
188
|
+
expect(formatServiceTier(null, "en-US")).toBe("Standard");
|
|
189
|
+
expect(formatServiceTier("priority", "pt-BR")).toBe("Rápido");
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
describe("grouped cost availability", () => {
|
|
194
|
+
it("uses deduplicated root and child invocation effort in the Run drilldown footer", () => {
|
|
195
|
+
const root = {
|
|
196
|
+
run_id: "RUN-ROOT",
|
|
197
|
+
phase: "execution",
|
|
198
|
+
parent_run_id: null,
|
|
199
|
+
duration_ms: 2_000,
|
|
200
|
+
} as never;
|
|
201
|
+
const child = {
|
|
202
|
+
run_id: "RUN-CHILD",
|
|
203
|
+
phase: "execution",
|
|
204
|
+
parent_run_id: "RUN-ROOT",
|
|
205
|
+
duration_ms: 9_000,
|
|
206
|
+
} as never;
|
|
207
|
+
expect(costRunsDurationTotal([root, child, child])).toBe(11_000);
|
|
208
|
+
});
|
|
209
|
+
const unavailableGroup = {
|
|
210
|
+
key: "unknown",
|
|
211
|
+
label: "Sem telemetria",
|
|
212
|
+
latest_started_at: "2026-07-24T20:00:00.000Z",
|
|
213
|
+
run_count: 2,
|
|
214
|
+
task_count: 1,
|
|
215
|
+
prd_count: 0,
|
|
216
|
+
spec_count: 0,
|
|
217
|
+
evidence_count: 0,
|
|
218
|
+
test_count: 0,
|
|
219
|
+
event_count: 2,
|
|
220
|
+
total_tokens: null,
|
|
221
|
+
estimated_usd: null,
|
|
222
|
+
estimated_brl: null,
|
|
223
|
+
duration_ms: null,
|
|
224
|
+
duration: { known_sum: 0, unknown: 2, complete: false, coverage_ratio: 0 },
|
|
225
|
+
coverage: { events: 2, tokens: 0, usd: 0, brl: 0 },
|
|
226
|
+
} as const;
|
|
227
|
+
|
|
228
|
+
it("renders unavailable duration explicitly and keeps the accessible scroll region", () => {
|
|
229
|
+
const table = CostGroupsTable({
|
|
230
|
+
rows: [unavailableGroup],
|
|
231
|
+
currency: "BRL",
|
|
232
|
+
locale: "pt-BR",
|
|
233
|
+
});
|
|
234
|
+
const columns = table.props.columns as Array<{
|
|
235
|
+
key: string;
|
|
236
|
+
render: (row: typeof unavailableGroup) => unknown;
|
|
237
|
+
sortValue?: (row: typeof unavailableGroup) => unknown;
|
|
238
|
+
footer?: unknown;
|
|
239
|
+
}>;
|
|
240
|
+
const column = (key: string) => columns.find((candidate) => candidate.key === key);
|
|
241
|
+
|
|
242
|
+
expect(table.props.scrollLabel).toBe(costGroupsScrollLabel("pt-BR"));
|
|
243
|
+
expect(column("duration")?.render(unavailableGroup)).toBe("Indisponível");
|
|
244
|
+
expect(column("tokens")?.render(unavailableGroup)).toBe("Indisponível");
|
|
245
|
+
expect(column("cost")?.render(unavailableGroup)).toBe("Indisponível");
|
|
246
|
+
expect(column("duration")?.sortValue?.(unavailableGroup)).toBeNull();
|
|
247
|
+
expect(column("tokens")?.sortValue?.(unavailableGroup)).toBeNull();
|
|
248
|
+
expect(column("cost")?.sortValue?.(unavailableGroup)).toBeNull();
|
|
249
|
+
const totalSummary =
|
|
250
|
+
"Total geral — Tempo: Indispon\u00edvel; Tokens: Indispon\u00edvel; BRL: Indispon\u00edvel";
|
|
251
|
+
expect(
|
|
252
|
+
(column("latestStartedAt")!.footer as { props: { "aria-label": string } }).props[
|
|
253
|
+
"aria-label"
|
|
254
|
+
],
|
|
255
|
+
).toBe("Total geral");
|
|
256
|
+
expect(
|
|
257
|
+
(column("duration")!.footer as { props: { "aria-label": string } }).props["aria-label"],
|
|
258
|
+
).toBe(totalSummary);
|
|
259
|
+
expect(
|
|
260
|
+
(column("tokens")!.footer as { props: { "aria-label": string } }).props["aria-label"],
|
|
261
|
+
).toBe(totalSummary);
|
|
262
|
+
expect(
|
|
263
|
+
(column("cost")!.footer as { props: { "aria-label": string } }).props["aria-label"],
|
|
264
|
+
).toBe(totalSummary);
|
|
265
|
+
expect(column("coverage")).toBeUndefined();
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
it("keeps a complete observed zero visible without a partial coverage label", () => {
|
|
269
|
+
const observedZeroGroup = {
|
|
270
|
+
...unavailableGroup,
|
|
271
|
+
duration_ms: 0,
|
|
272
|
+
duration: { known_sum: 0, unknown: 0, complete: true, coverage_ratio: 1 },
|
|
273
|
+
};
|
|
274
|
+
const table = CostGroupsTable({ rows: [observedZeroGroup], currency: "BRL", locale: "pt-BR" });
|
|
275
|
+
const duration = (
|
|
276
|
+
table.props.columns as Array<{
|
|
277
|
+
key: string;
|
|
278
|
+
render: (row: typeof observedZeroGroup) => unknown;
|
|
279
|
+
footer?: { props: { children: unknown } };
|
|
280
|
+
}>
|
|
281
|
+
).find((column) => column.key === "duration");
|
|
282
|
+
|
|
283
|
+
expect(duration?.render(observedZeroGroup)).toBe(formatAuditableDuration(0, "pt-BR"));
|
|
284
|
+
expect(duration?.footer?.props.children).toBe(formatAuditableDuration(0, "pt-BR"));
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it("does not expose coverage as a detailed Run column", () => {
|
|
288
|
+
const table = CostRunsTable({
|
|
289
|
+
rows: [unavailableGroup] as never,
|
|
290
|
+
onOpenRun: () => undefined,
|
|
291
|
+
currency: "BRL",
|
|
292
|
+
locale: "pt-BR",
|
|
293
|
+
});
|
|
294
|
+
const columns = table.props.columns as Array<{ key: string }>;
|
|
295
|
+
expect(columns.some((column) => column.key === "coverage")).toBe(false);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
it("sorts unavailable Run numeric metrics as unavailable", () => {
|
|
299
|
+
const unavailableRun = { ...unavailableGroup, input_tokens: null, output_tokens: null };
|
|
300
|
+
const table = CostRunsTable({
|
|
301
|
+
rows: [unavailableRun] as never,
|
|
302
|
+
onOpenRun: () => undefined,
|
|
303
|
+
currency: "BRL",
|
|
304
|
+
locale: "pt-BR",
|
|
305
|
+
});
|
|
306
|
+
const columns = table.props.columns as Array<{
|
|
307
|
+
key: string;
|
|
308
|
+
sortValue?: (row: typeof unavailableGroup) => unknown;
|
|
309
|
+
}>;
|
|
310
|
+
const column = (key: string) => columns.find((candidate) => candidate.key === key);
|
|
311
|
+
|
|
312
|
+
expect(column("duration")?.sortValue?.(unavailableRun)).toBeNull();
|
|
313
|
+
expect(column("totalTokens")?.sortValue?.(unavailableRun)).toBeNull();
|
|
314
|
+
expect(column("cost")?.sortValue?.(unavailableRun)).toBeNull();
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
it("provides a clear scroll label for the detailed Runs table", () => {
|
|
318
|
+
expect(costRunsScrollLabel("pt-BR")).toBe(
|
|
319
|
+
"Tabela de custos por invocação com rolagem horizontal",
|
|
320
|
+
);
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
describe("period-driven Cost Monitor loading", () => {
|
|
325
|
+
it("drops a stale in-memory Cost period response when refresh replaces its base snapshot", () => {
|
|
326
|
+
const stale = { runs: [{ run_id: "RUN-OBSERVED", duration_ms: 31 * 3_600_000 }] } as never;
|
|
327
|
+
const refreshed = { runs: [{ run_id: "RUN-PROJECTED", duration_ms: 413_659_026 }] } as never;
|
|
328
|
+
|
|
329
|
+
expect(activeCostPeriodData(refreshed, stale, stale)).toBe(refreshed);
|
|
330
|
+
expect(activeCostPeriodData(refreshed, refreshed, refreshed)).toBe(refreshed);
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
it("does not issue a second Cost request after an embedded default atomic snapshot", () => {
|
|
334
|
+
const filters = {
|
|
335
|
+
query: "",
|
|
336
|
+
provider: "",
|
|
337
|
+
phase: "",
|
|
338
|
+
origin: "",
|
|
339
|
+
workType: "",
|
|
340
|
+
agent: "",
|
|
341
|
+
model: "",
|
|
342
|
+
status: "",
|
|
343
|
+
priority: "",
|
|
344
|
+
risk: "",
|
|
345
|
+
};
|
|
346
|
+
expect(shouldFetchCostPeriod({ filters, period: "all", snapshotBacked: true })).toBe(false);
|
|
347
|
+
expect(shouldFetchCostPeriod({ filters, period: "7", snapshotBacked: true })).toBe(true);
|
|
348
|
+
expect(
|
|
349
|
+
shouldFetchCostPeriod({
|
|
350
|
+
filters: { ...filters, phase: "execution" },
|
|
351
|
+
period: "all",
|
|
352
|
+
snapshotBacked: true,
|
|
353
|
+
}),
|
|
354
|
+
).toBe(true);
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
it("uses no date bounds for the default complete-history period", async () => {
|
|
358
|
+
expect(defaultCostPeriod).toBe("all");
|
|
359
|
+
expect(costPeriodDateRange("all", new Date("2026-08-01T03:30:00.000Z"))).toBeUndefined();
|
|
360
|
+
expect(costPeriodDateRange("month", new Date("2026-08-01T03:30:00.000Z"))).toEqual({
|
|
361
|
+
from: "2026-08-01",
|
|
362
|
+
to: "2026-08-01",
|
|
363
|
+
});
|
|
364
|
+
// Resetting standalone Cost Monitor to All Time removes the prior month
|
|
365
|
+
// bounds instead of carrying them into the next request.
|
|
366
|
+
expect(costPeriodDateRange("all", new Date("2026-08-01T03:30:00.000Z"))).toBeUndefined();
|
|
367
|
+
const calls: string[] = [];
|
|
368
|
+
await loadCostMonitorPeriod({
|
|
369
|
+
currency: "BRL",
|
|
370
|
+
fetcher: async (url) => {
|
|
371
|
+
calls.push(String(url));
|
|
372
|
+
return new Response(JSON.stringify({ runs: [] }), { status: 200 });
|
|
373
|
+
},
|
|
374
|
+
});
|
|
375
|
+
expect(calls).toEqual(["/api/v2/cost-monitor?currency=BRL"]);
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
it("derives an inclusive current-month range without inspecting materialized Runs", () => {
|
|
379
|
+
expect(costPeriodDateRange("month", new Date("2026-07-26T15:00:00.000Z"))).toEqual({
|
|
380
|
+
from: "2026-07-01",
|
|
381
|
+
to: "2026-07-26",
|
|
382
|
+
});
|
|
383
|
+
expect(costPeriodDateRange("7", new Date("2026-07-26T15:00:00.000Z"))).toEqual({
|
|
384
|
+
from: "2026-07-20",
|
|
385
|
+
to: "2026-07-26",
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
it("requests the selected range from the local runtime and forwards cancellation", async () => {
|
|
390
|
+
const calls: Array<{ url: string; signal: AbortSignal | null | undefined }> = [];
|
|
391
|
+
const controller = new AbortController();
|
|
392
|
+
const projection = { runs: [] };
|
|
393
|
+
const loaded = await loadCostMonitorPeriod({
|
|
394
|
+
currency: "BRL",
|
|
395
|
+
from: "2026-07-01",
|
|
396
|
+
to: "2026-07-26",
|
|
397
|
+
filters: {
|
|
398
|
+
query: "TASK-1",
|
|
399
|
+
provider: "openai",
|
|
400
|
+
phase: "execution",
|
|
401
|
+
origin: "spec",
|
|
402
|
+
workType: "rework",
|
|
403
|
+
agent: "zaip-agent-builder",
|
|
404
|
+
model: "gpt-5.6-terra",
|
|
405
|
+
status: "completed",
|
|
406
|
+
priority: "high",
|
|
407
|
+
risk: "standard",
|
|
408
|
+
},
|
|
409
|
+
signal: controller.signal,
|
|
410
|
+
fetcher: async (url, init) => {
|
|
411
|
+
calls.push({ url: String(url), signal: init?.signal });
|
|
412
|
+
return new Response(JSON.stringify(projection), {
|
|
413
|
+
headers: { "content-type": "application/json" },
|
|
414
|
+
status: 200,
|
|
415
|
+
});
|
|
416
|
+
},
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
expect(loaded).toEqual(projection);
|
|
420
|
+
expect(calls).toEqual([
|
|
421
|
+
{
|
|
422
|
+
url:
|
|
423
|
+
"/api/v2/cost-monitor?currency=BRL&from=2026-07-01&to=2026-07-26" +
|
|
424
|
+
"&provider=openai&phase=execution&agent=zaip-agent-builder" +
|
|
425
|
+
"&model=gpt-5.6-terra&status=completed",
|
|
426
|
+
signal: controller.signal,
|
|
427
|
+
},
|
|
428
|
+
]);
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
describe("manifest-first invocation query", () => {
|
|
433
|
+
it("opens only intersecting monthly manifests and candidate chunks", async () => {
|
|
434
|
+
const inRange = signedSummary({
|
|
435
|
+
agent_invocation_id: "RUN-JULY-OPENAI",
|
|
436
|
+
occurred_at: "2026-07-10T12:00:00.000Z",
|
|
437
|
+
provider: "openai",
|
|
438
|
+
});
|
|
439
|
+
const outOfRange = signedSummary({
|
|
440
|
+
agent_invocation_id: "RUN-JULY-ANTHROPIC",
|
|
441
|
+
occurred_at: "2026-07-20T12:00:00.000Z",
|
|
442
|
+
provider: "anthropic",
|
|
443
|
+
});
|
|
444
|
+
const firstChunk = `${JSON.stringify(inRange)}\n`;
|
|
445
|
+
const secondChunk = `${JSON.stringify(outOfRange)}\n`;
|
|
446
|
+
const manifest = signedManifest({
|
|
447
|
+
period: { year: 2026, month: 7 },
|
|
448
|
+
from: "2026-07-10T12:00:00.000Z",
|
|
449
|
+
to: "2026-07-20T12:00:00.000Z",
|
|
450
|
+
chunks: [
|
|
451
|
+
{
|
|
452
|
+
path: ".agents/records/telemetry/2026/07/chunk-openai.jsonl",
|
|
453
|
+
content_sha256: digest(firstChunk),
|
|
454
|
+
summary_count: 1,
|
|
455
|
+
from: inRange.occurred_at,
|
|
456
|
+
to: inRange.occurred_at,
|
|
457
|
+
summary_hashes: [inRange.summary_hash],
|
|
458
|
+
dimensions: dimensions({ providers: ["openai"] }),
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
path: ".agents/records/telemetry/2026/07/chunk-anthropic.jsonl",
|
|
462
|
+
content_sha256: digest(secondChunk),
|
|
463
|
+
summary_count: 1,
|
|
464
|
+
from: outOfRange.occurred_at,
|
|
465
|
+
to: outOfRange.occurred_at,
|
|
466
|
+
summary_hashes: [outOfRange.summary_hash],
|
|
467
|
+
dimensions: dimensions({ providers: ["anthropic"] }),
|
|
468
|
+
},
|
|
469
|
+
],
|
|
470
|
+
});
|
|
471
|
+
const reads: string[] = [];
|
|
472
|
+
const openaiChunkPath = manifest.chunks[0]?.path;
|
|
473
|
+
const anthropicChunkPath = manifest.chunks[1]?.path;
|
|
474
|
+
if (openaiChunkPath === undefined || anthropicChunkPath === undefined) {
|
|
475
|
+
throw new Error("Expected two manifest chunks");
|
|
476
|
+
}
|
|
477
|
+
const files = new Map<string, string>([
|
|
478
|
+
[".agents/records/telemetry/2026/07/manifest.json", JSON.stringify(manifest)],
|
|
479
|
+
[openaiChunkPath, firstChunk],
|
|
480
|
+
[anthropicChunkPath, secondChunk],
|
|
481
|
+
]);
|
|
482
|
+
const result = await queryInvocationManifestPeriod(
|
|
483
|
+
{
|
|
484
|
+
exists: async (path) => files.has(path),
|
|
485
|
+
readText: async (path) => {
|
|
486
|
+
reads.push(path);
|
|
487
|
+
const value = files.get(path);
|
|
488
|
+
if (value === undefined) throw new Error(`Missing fixture: ${path}`);
|
|
489
|
+
return value;
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
from: "2026-07-09",
|
|
494
|
+
to: "2026-07-11",
|
|
495
|
+
filters: { providers: ["openai"] },
|
|
496
|
+
},
|
|
497
|
+
);
|
|
498
|
+
|
|
499
|
+
expect(result.summaries.map((summary) => summary.agent_invocation_id)).toEqual([
|
|
500
|
+
"RUN-JULY-OPENAI",
|
|
501
|
+
]);
|
|
502
|
+
expect(result.manifest_count).toBe(1);
|
|
503
|
+
expect(result.chunk_count).toBe(1);
|
|
504
|
+
expect(result.source_latest_at).toBe("2026-07-20T12:00:00.000Z");
|
|
505
|
+
expect(result.lag_ms).toBe(10);
|
|
506
|
+
expect(reads).toEqual([
|
|
507
|
+
".agents/records/telemetry/2026/07/manifest.json",
|
|
508
|
+
".agents/records/telemetry/2026/07/chunk-openai.jsonl",
|
|
509
|
+
]);
|
|
510
|
+
});
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
function digest(value: string): string {
|
|
514
|
+
return createHash("sha256").update(value).digest("hex");
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
function dimensions(overrides: Partial<Record<string, readonly string[]>> = {}) {
|
|
518
|
+
return {
|
|
519
|
+
providers: [],
|
|
520
|
+
models: [],
|
|
521
|
+
zaip_agents: [],
|
|
522
|
+
phases: [],
|
|
523
|
+
purposes: [],
|
|
524
|
+
statuses: [],
|
|
525
|
+
executions: [],
|
|
526
|
+
tasks: [],
|
|
527
|
+
specs: [],
|
|
528
|
+
prds: [],
|
|
529
|
+
changes: [],
|
|
530
|
+
...overrides,
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
function signedSummary(input: {
|
|
535
|
+
agent_invocation_id: string;
|
|
536
|
+
occurred_at: string;
|
|
537
|
+
provider: string;
|
|
538
|
+
}) {
|
|
539
|
+
const unsigned = {
|
|
540
|
+
schema_version: 1,
|
|
541
|
+
agent_invocation_id: input.agent_invocation_id,
|
|
542
|
+
occurred_at: input.occurred_at,
|
|
543
|
+
coverage: "complete",
|
|
544
|
+
usage_segments: [{ provider: input.provider, model: "gpt-5.6-terra" }],
|
|
545
|
+
};
|
|
546
|
+
return { ...unsigned, summary_hash: digest(JSON.stringify(unsigned)) };
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
function signedManifest(input: {
|
|
550
|
+
period: { year: number; month: number };
|
|
551
|
+
from: string;
|
|
552
|
+
to: string;
|
|
553
|
+
chunks: Array<{
|
|
554
|
+
path: string;
|
|
555
|
+
content_sha256: string;
|
|
556
|
+
summary_count: number;
|
|
557
|
+
from: string;
|
|
558
|
+
to: string;
|
|
559
|
+
summary_hashes: string[];
|
|
560
|
+
dimensions: ReturnType<typeof dimensions>;
|
|
561
|
+
}>;
|
|
562
|
+
}) {
|
|
563
|
+
const unsigned = {
|
|
564
|
+
schema_version: 1,
|
|
565
|
+
period: input.period,
|
|
566
|
+
summary_count: input.chunks.reduce((sum, chunk) => sum + chunk.summary_count, 0),
|
|
567
|
+
chunk_count: input.chunks.length,
|
|
568
|
+
from: input.from,
|
|
569
|
+
to: input.to,
|
|
570
|
+
source_latest_at: input.to,
|
|
571
|
+
lag_ms: 10,
|
|
572
|
+
coverage: { complete: 2, partial: 0, unavailable: 0 },
|
|
573
|
+
chunks: input.chunks,
|
|
574
|
+
dimensions: dimensions(),
|
|
575
|
+
aggregates: { daily: {}, monthly: {}, annual: {} },
|
|
576
|
+
integrity: {
|
|
577
|
+
status: "verified",
|
|
578
|
+
algorithm: "sha256",
|
|
579
|
+
chunk_count: input.chunks.length,
|
|
580
|
+
summary_count: input.chunks.reduce((sum, chunk) => sum + chunk.summary_count, 0),
|
|
581
|
+
},
|
|
582
|
+
};
|
|
583
|
+
return { ...unsigned, manifest_hash: digest(JSON.stringify(unsigned)) };
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
describe("cost sorting", () => {
|
|
587
|
+
it("orders the raw BRL values rather than their localized currency labels", () => {
|
|
588
|
+
const rows = [143.72, 127.78, 21457.76, 1370.63];
|
|
589
|
+
|
|
590
|
+
expect(
|
|
591
|
+
rows.sort(
|
|
592
|
+
(left, right) =>
|
|
593
|
+
(sortCostValue("BRL", right, null) ?? 0) - (sortCostValue("BRL", left, null) ?? 0),
|
|
594
|
+
),
|
|
595
|
+
).toEqual([21457.76, 1370.63, 143.72, 127.78]);
|
|
596
|
+
});
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
describe("context uplift", () => {
|
|
600
|
+
const base = {
|
|
601
|
+
context_input_multiplier: 1,
|
|
602
|
+
context_output_multiplier: 1,
|
|
603
|
+
input_cost_usd: 10,
|
|
604
|
+
cached_input_cost_usd: 2,
|
|
605
|
+
output_cost_usd: 8,
|
|
606
|
+
reasoning_cost_usd: 2,
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
it("returns zero for a 1x / 1x call", () => {
|
|
610
|
+
expect(contextUpliftUsd(base as never)).toBe(0);
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
it("extracts the already included context portion from effective costs", () => {
|
|
614
|
+
expect(
|
|
615
|
+
contextUpliftUsd({
|
|
616
|
+
...base,
|
|
617
|
+
context_input_multiplier: 2,
|
|
618
|
+
context_output_multiplier: 1.5,
|
|
619
|
+
} as never),
|
|
620
|
+
).toBeCloseTo(9.333333, 5);
|
|
621
|
+
});
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
describe("model aggregation visibility", () => {
|
|
625
|
+
it("hides the manual placeholder regardless of casing or whitespace", () => {
|
|
626
|
+
expect(isDisplayableModel("manual")).toBe(false);
|
|
627
|
+
expect(isDisplayableModel(" Manual ")).toBe(false);
|
|
628
|
+
expect(isDisplayableModel("unknown")).toBe(false);
|
|
629
|
+
expect(isDisplayableModel(" ")).toBe(false);
|
|
630
|
+
expect(isDisplayableModel("gpt-5")).toBe(false);
|
|
631
|
+
expect(isDisplayableModel(" GPT-5 ")).toBe(false);
|
|
632
|
+
expect(isDisplayableModel("gpt-5.4")).toBe(true);
|
|
633
|
+
expect(isDisplayableModel("gpt-5.6-sol")).toBe(true);
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
it("hides calls that have no collected usage", () => {
|
|
637
|
+
const empty = {
|
|
638
|
+
input_tokens: null,
|
|
639
|
+
cached_input_tokens: null,
|
|
640
|
+
output_tokens: null,
|
|
641
|
+
reasoning_tokens: null,
|
|
642
|
+
total_tokens: null,
|
|
643
|
+
estimated_usd: null,
|
|
644
|
+
estimated_brl: null,
|
|
645
|
+
};
|
|
646
|
+
expect(hasCollectedUsage(empty as never)).toBe(false);
|
|
647
|
+
expect(hasCollectedUsage({ ...empty, input_tokens: 1 } as never)).toBe(true);
|
|
648
|
+
expect(hasCollectedUsage({ ...empty, estimated_brl: 0.01 } as never)).toBe(true);
|
|
649
|
+
});
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
describe("model processing duration", () => {
|
|
653
|
+
it("sums root orchestration Runs without overlapping intake and Sub-Runs", () => {
|
|
654
|
+
expect(
|
|
655
|
+
sumModelDurationMs([
|
|
656
|
+
{ duration_ms: 60_000, run_kind: "run", run_purpose: "orchestration" },
|
|
657
|
+
{ duration_ms: 90_000, run_kind: "subrun", run_purpose: "execution" },
|
|
658
|
+
{ duration_ms: 120_000, run_kind: "run", run_purpose: "intake" },
|
|
659
|
+
{ duration_ms: 30_000, run_kind: "run", run_purpose: "orchestration" },
|
|
660
|
+
]),
|
|
661
|
+
).toBe(300_000);
|
|
662
|
+
expect(
|
|
663
|
+
sumModelDurationMs([
|
|
664
|
+
{ duration_ms: 90_000, run_kind: "subrun", run_purpose: "execution" },
|
|
665
|
+
{ duration_ms: 120_000, run_kind: "run", run_purpose: "intake" },
|
|
666
|
+
]),
|
|
667
|
+
).toBe(210_000);
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
it("groups Runs without an identifiable model as Undefined", () => {
|
|
671
|
+
expect(displayModelName("gpt-5.6-sol", "pt-BR")).toBe("gpt-5.6-sol");
|
|
672
|
+
expect(displayModelName("unknown", "pt-BR")).toBe("Indefinido");
|
|
673
|
+
expect(displayModelName(" ", "en-US")).toBe("Undefined");
|
|
674
|
+
expect(displayModelName("manual", "pt-BR")).toBeNull();
|
|
675
|
+
expect(displayModelName("gpt-5", "pt-BR")).toBeNull();
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
it("keeps duration-only root orchestration Runs in the model table", () => {
|
|
679
|
+
expect(
|
|
680
|
+
isModelAuditRow({
|
|
681
|
+
duration_ms: 90_000,
|
|
682
|
+
run_kind: "run",
|
|
683
|
+
run_purpose: "orchestration",
|
|
684
|
+
input_tokens: null,
|
|
685
|
+
cached_input_tokens: null,
|
|
686
|
+
output_tokens: null,
|
|
687
|
+
reasoning_tokens: null,
|
|
688
|
+
total_tokens: null,
|
|
689
|
+
estimated_usd: null,
|
|
690
|
+
estimated_brl: null,
|
|
691
|
+
} as never),
|
|
692
|
+
).toBe(true);
|
|
693
|
+
expect(
|
|
694
|
+
isModelAuditRow({
|
|
695
|
+
duration_ms: 90_000,
|
|
696
|
+
run_kind: "subrun",
|
|
697
|
+
run_purpose: "execution",
|
|
698
|
+
input_tokens: null,
|
|
699
|
+
cached_input_tokens: null,
|
|
700
|
+
output_tokens: null,
|
|
701
|
+
reasoning_tokens: null,
|
|
702
|
+
total_tokens: null,
|
|
703
|
+
estimated_usd: null,
|
|
704
|
+
estimated_brl: null,
|
|
705
|
+
} as never),
|
|
706
|
+
).toBe(true);
|
|
707
|
+
});
|
|
708
|
+
});
|