@zaip-ai/cli 3.2.0 → 3.4.0
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/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.d.ts.map +1 -1
- package/dist/services/adapters.js +5 -3
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/agent-catalog-upgrade.d.ts +3 -0
- package/dist/services/agent-catalog-upgrade.d.ts.map +1 -0
- package/dist/services/agent-catalog-upgrade.js +35 -0
- package/dist/services/agent-catalog-upgrade.js.map +1 -0
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +22 -22
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/install-template-policy.d.ts +3 -0
- package/dist/services/install-template-policy.d.ts.map +1 -0
- package/dist/services/install-template-policy.js +21 -0
- package/dist/services/install-template-policy.js.map +1 -0
- package/dist/services/logger.js +24 -8
- package/dist/services/logger.js.map +1 -1
- package/dist/services/logger.test.js +33 -6
- package/dist/services/logger.test.js.map +1 -1
- package/dist/services/sqlite-bootstrap.d.ts +1 -0
- package/dist/services/sqlite-bootstrap.d.ts.map +1 -1
- package/dist/services/sqlite-bootstrap.js +10 -1
- package/dist/services/sqlite-bootstrap.js.map +1 -1
- package/package.json +2 -2
- package/templates/.agents/README-ENG.md +2 -1
- package/templates/.agents/README.md +2 -1
- package/templates/.agents/config/agents/catalog.yaml +1 -0
- package/templates/.agents/config/agents/discovery.json +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +2 -2
- package/templates/.agents/dashboard/.zaip-managed.json +278 -126
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-CEDZjl4V.js → CostCalculationGuidePage-C5NgEcVh.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-BzaUTZDx.js → DashboardHelpDialog-CCMVnkkI.js} +4 -3
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-21cCJik-.js → PricingSettingsDialog-CGYcJ5EB.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-BAvLPAee.js → ProjectSettingsPage-DVCPPV75.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-wqW52uCx.js → TraceabilityWorkspace-CqK3Psfy.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{cost-monitor-PoJA2PI1.css → cost-monitor-BsMfGfQi.css} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-j3aUYH5G.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{dashboard-localization-BkAm8-h4.js → dashboard-localization-jvdDfNKs.js} +2 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-DEmo6Tn2.js → icons-vendor-x8xxL9yW.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Cl5EWx8R.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Cwylbh_N.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-CadYsm83.js → react-vendor-CNOXIJHN.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-BzKK8kK3.js → traceability-CcpbpT1s.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +7 -7
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +12 -1
- package/templates/.agents/dashboard/apps/frontend/src/WorkspaceStatus.test.tsx +33 -0
- package/templates/.agents/dashboard/apps/frontend/src/WorkspaceStatus.tsx +58 -0
- package/templates/.agents/dashboard/apps/frontend/src/app-work-board-options.ts +41 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-runtime-status.ts +25 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.ts +5 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-app-work-board.test.ts +140 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-work-board.ts +28 -41
- package/templates/.agents/dashboard/apps/frontend/src/use-runtime-status.ts +38 -0
- package/templates/.agents/dashboard/apps/frontend/src/workspace-status.css +33 -0
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.test.ts +25 -3
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.tsx +17 -19
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostFilters.tsx +13 -167
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostGroupsTable.tsx +2 -9
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +8 -8
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +29 -52
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableLoading.test.ts +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables-keeps-legacy-codex-identity-fields-blank.test.ts +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +4 -27
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/MacroCostTable.test.ts +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/MacroCostTable.tsx +4 -3
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/agent-model-presentation.test.ts +26 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-embedded.css +7 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-loaders.ts +173 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-page-props.ts +47 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-page-selectors.ts +1 -7
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-page-range.ts +3 -9
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test.ts +44 -83
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.ts +11 -111
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.test.ts +47 -181
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.ts +63 -91
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/cost-monitor-unavailable.test.ts +55 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/cost-summary-duration.test.ts +189 -0
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsEntityFilters.tsx +82 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.helpers.tsx +4 -1
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +5 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +22 -31
- package/templates/.agents/dashboard/modules/operations/src/react/PagedWorkList.test.tsx +13 -1
- package/templates/.agents/dashboard/modules/operations/src/react/PagedWorkList.tsx +16 -3
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +11 -27
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +44 -193
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportColumns.ts +186 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/excel-agent-participations.test.ts +28 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/export-layout.test.ts +2 -1
- package/templates/.agents/dashboard/modules/operations/src/react/export/xlsx-runtime-e2e.test.ts +55 -31
- package/templates/.agents/dashboard/modules/operations/src/react/operations-export-duration.ts +13 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-filter-panel.css +4 -0
- package/templates/.agents/dashboard/modules/operations/src/react/use-operation-filter-feedback.ts +18 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.test.ts +11 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.ts +10 -2
- package/templates/.agents/dashboard/modules/operations/src/work-board-model.ts +1 -1
- package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/package.json +1 -1
- package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
- package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +406 -332
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +352 -280
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/scripts/rebuild-sqlite-read-model.mjs +2 -1
- package/templates/.agents/dashboard/packages/local-runtime/scripts/validate-sqlite-read-model.mjs +4 -2
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +406 -332
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.test.ts +95 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.ts +102 -12
- package/templates/.agents/dashboard/packages/local-runtime/src/server-board.test.ts +75 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server-costs-routes.ts +10 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-lifecycle-diagnostics.ts +50 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-macro-population.test.ts +165 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-operations-page-filters.ts +65 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-operations-pages.test.ts +111 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-operations-pages.ts +53 -63
- package/templates/.agents/dashboard/packages/local-runtime/src/server-operations-runs-route.ts +19 -5
- package/templates/.agents/dashboard/packages/local-runtime/src/server-period-macro-metric.test.ts +19 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-period-macro-metric.ts +11 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server-read-projections.ts +19 -12
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.test.ts +46 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.test.ts +10 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +4 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +43 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +46 -11
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-filter-matrix.test.ts +188 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-summary-details.test.ts +85 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-summary-details.ts +147 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-cache.test.ts +94 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-cache.ts +96 -55
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-force-canonical.test.ts +58 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-macro-classification.test.ts +172 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-projections.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-projection.ts +4 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-work-list.test.ts +7 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-work-list.ts +2 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-period-averages.ts +10 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-agent-dimension.ts +18 -82
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-cached-cost-page.ts +169 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-developer.ts +205 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-entity-group.ts +13 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-filtered-dimension.ts +22 -23
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-financial.ts +42 -209
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-model-dimension.ts +18 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-provider-dimension.ts +9 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-summary.ts +76 -83
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-view-page.ts +25 -161
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical.ts +18 -45
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-counts-every-root-execution-day-returns.test.ts +15 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-filesystem.ts +16 -16
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-keeps-orphan-telemetry-out-kanban-without.test.ts +2 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider.test.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuild.ts +47 -22
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-schema.ts +16 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +13 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-rebuild-result.ts +15 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-base-views.ts +4 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-dashboard-views.ts +19 -42
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-macro-classification.ts +48 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-summary-cursor.ts +15 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-token-active-allocation.ts +46 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-work-stages.ts +60 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-history.mjs +5 -1
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-claims.test.mjs +7 -1
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-page.mjs +17 -2
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-ownership.mjs +65 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-ownership.test.mjs +72 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-processes.mjs +32 -9
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +39 -45
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +5 -2
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/scripts/qualify-macro-overview.mjs +50 -0
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard-performance-matrix.spec.ts +1 -18
- package/templates/.agents/dashboard/tests/e2e/specs/export-row-identity.spec.ts +20 -0
- package/templates/.agents/dashboard/tests/e2e/specs/export-row-identity.ts +20 -0
- package/templates/.agents/design/.zaip-managed.json +82 -74
- package/templates/.agents/design/apps/catalog/dist/assets/index-0W0Gj_Gs.css +1 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-32GZO95T.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/{index-D_lfqoyx.js → index-BP8IxOxt.js} +3 -3
- package/templates/.agents/design/apps/catalog/dist/assets/{index-BOjCcUaU.js → index-QJsgr9Ht.js} +3 -3
- package/templates/.agents/design/apps/catalog/dist/index.html +2 -2
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/CatalogShell-CvaciY0C.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{Color-6AOWCN3U-Cm-yJJz_.js → Color-6AOWCN3U-DwBV1A1Y.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-3dqK5g3e.js +142 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-2OCgtT0I.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{DocsRenderer-JROSPFPF-Belk4jRr.js → DocsRenderer-JROSPFPF-CODg0rSl.js} +4 -4
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Primitives-BmeKjJW4.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{WithTooltip-7X4HQR7L-DoPvjkS1.js → WithTooltip-7X4HQR7L-C5MI-3uZ.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/WorkspaceStatus.stories-Tb_iQqVK.js +17 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/WorkspaceStatusSpecimen-CD54pw0-.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-DRQKCCAG-B1itKXEN.js → chunk-DRQKCCAG-KSn75jcy.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-W22LQPXL-C-Eb5SPY.js → chunk-W22LQPXL-C4LS1Thf.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{components-DnyKLwhj.js → components-DV1BRgMY.js} +5 -5
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-BU_68im1.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-0W0Gj_Gs.css +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{iframe-DcXBsFPz.js → iframe-CBbPFx5G.js} +4 -4
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{react-18-CRM89QRf.js → react-18-C9IPGXtb.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-CEv2qkJT.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{syntaxhighlighter-YFXUGROL-B03jQGTF.js → syntaxhighlighter-YFXUGROL-ZgDQjyWI.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{theming-4ZyufAga.js → theming-Cx9-gH6l.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/dist/storybook/sb-addons/a11y-2/manager-bundle.js +3 -3
- package/templates/.agents/design/apps/catalog/dist/storybook/sb-addons/docs-1/manager-bundle.js +4 -4
- package/templates/.agents/design/apps/catalog/dist/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +60 -60
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/apps/catalog/src/components/DashboardFiltersSpecimen.tsx +61 -0
- package/templates/.agents/design/apps/catalog/src/components/Primitives.tsx +24 -0
- package/templates/.agents/design/apps/catalog/src/components/WorkspaceStatusSpecimen.tsx +26 -0
- package/templates/.agents/design/apps/catalog/src/design-contract.test.ts +27 -13
- package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +38 -0
- package/templates/.agents/design/apps/catalog/src/pages/DesignSystemPage.tsx +15 -1
- package/templates/.agents/design/apps/catalog/src/stories/Components.stories.tsx +18 -0
- package/templates/.agents/design/apps/catalog/src/stories/DashboardFilters.stories.tsx +7 -0
- package/templates/.agents/design/apps/catalog/src/stories/WorkspaceStatus.stories.tsx +9 -0
- package/templates/.agents/design/apps/catalog/src/styles/components.css +83 -2
- package/templates/.agents/design/apps/catalog/src/styles.css +2 -0
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/design/tokens.json +32 -0
- package/templates/.agents/requirements/autonomous-assurance.md +1 -1
- package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
- package/templates/.agents/requirements/comparative-audit.md +1 -1
- package/templates/.agents/requirements/context-engine.md +1 -1
- package/templates/.agents/requirements/cost-observability.md +1 -1
- package/templates/.agents/requirements/dashboard-launch.md +1 -1
- package/templates/.agents/requirements/data-export.md +1 -1
- package/templates/.agents/requirements/design-system.md +1 -1
- package/templates/.agents/requirements/execution-engine.md +1 -1
- package/templates/.agents/requirements/kanban-dashboard.md +1 -1
- package/templates/.agents/requirements/model-orchestration.md +1 -1
- package/templates/.agents/requirements/public-distribution.md +18 -4
- package/templates/.agents/requirements/software-architecture.md +1 -1
- package/templates/.agents/requirements/strategic-improvements.md +1 -1
- package/templates/.agents/requirements/work-lifecycle.md +1 -1
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/rules/autonomy-decision.md +1 -0
- package/templates/.agents/rules/workflow.md +1 -1
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +28 -26
- package/templates/.agents/runtime/checksums.sha256 +5 -5
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/provenance.json +4 -4
- package/templates/.agents/runtime/sbom.cdx.json +1 -1
- package/templates/.agents/skills/zaip-aios/SKILL.md +0 -1
- package/templates/.agents/skills/zaip-skill-author-skills/scripts/audit-skill-catalog.mjs +1 -0
- package/templates/.agents/skills/zaip-skill-config/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +13 -0
- package/templates/.agents/skills/zaip-skill-execution/references/autonomous-continuation.md +17 -0
- package/templates/.agents/skills/zaip-skill-execution/references/correction-cycle.md +2 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +4 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/references/deployment-workflow.md +4 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/references/release-identity.md +2 -2
- package/templates/.agents/skills/zaip-skill-github-setup/SKILL.md +2 -2
- package/templates/.agents/skills/zaip-skill-move-prd/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-move-spec/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-prd/SKILL.md +3 -3
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +15 -8
- package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md +13 -12
- package/templates/.agents/skills/zaip-skill-setup/SKILL.md +50 -13
- package/templates/.agents/skills/zaip-skill-setup/agents/openai.yaml +2 -2
- package/templates/.agents/skills/zaip-skill-spec/SKILL.md +2 -2
- package/templates/.agents/skills/zaip-skill-update-version-doc/SKILL.md +39 -0
- package/templates/.agents/skills/zaip-skill-update-version-doc/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-update-version-doc/scripts/update-version-doc.mjs +21 -0
- package/templates/.agents/skills/zaip-skill-update-version-doc/scripts/update-version-doc.test.mjs +32 -0
- package/templates/.agents/zaip-aios/README.md +2 -1
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +7 -3
- package/templates/template-manifest.json +436 -256
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-06__WZco.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Cmlx8OYH.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DqZKJS8y.js +0 -2
- package/templates/.agents/design/apps/catalog/dist/assets/index-BEmIE7WE.css +0 -1
- package/templates/.agents/design/apps/catalog/dist/assets/index-BJV597iq.js +0 -72
- package/templates/.agents/design/apps/catalog/dist/assets/index-B_WhrCZe.js +0 -72
- package/templates/.agents/design/apps/catalog/dist/assets/index-CqqYWY2f.js +0 -9
- package/templates/.agents/design/apps/catalog/dist/assets/index-CqtYXZfV.js +0 -72
- package/templates/.agents/design/apps/catalog/dist/assets/index-D9pj7Jlf.js +0 -9
- package/templates/.agents/design/apps/catalog/dist/assets/index-i_PO2k9R.js +0 -9
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/CatalogShell-Cstn1UwA.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-D1WopB2L.js +0 -137
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-DQ9PJ3N3.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-D0OSgxWz.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-BEmIE7WE.css +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-C3tkVMIp.js +0 -1
package/templates/.agents/dashboard/modules/cost-monitor/src/server/cost-summary-duration.test.ts
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import type { OperationsProjection } from "@zaip-ai/dashboard-operations/contracts";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import {
|
|
4
|
+
buildCostSummaryProjection,
|
|
5
|
+
type CostSummarySource,
|
|
6
|
+
} from "./build-cost-summary-projection.js";
|
|
7
|
+
|
|
8
|
+
describe("Factual duration and cost", () => {
|
|
9
|
+
it("keeps tokenized compact Runs without factual timing unavailable", () => {
|
|
10
|
+
const summary: CostSummarySource = {
|
|
11
|
+
periods: {
|
|
12
|
+
daily: {
|
|
13
|
+
"2026-08-07": {
|
|
14
|
+
prds: 0,
|
|
15
|
+
specs: 0,
|
|
16
|
+
tasks: 0,
|
|
17
|
+
validations: 0,
|
|
18
|
+
evidences: 0,
|
|
19
|
+
runs: 1,
|
|
20
|
+
usage: {
|
|
21
|
+
total_tokens: { known_sum: 4_000_000, unknown: 0, complete: true, coverage_ratio: 1 },
|
|
22
|
+
cost: {
|
|
23
|
+
known_sum: 1,
|
|
24
|
+
unknown: 0,
|
|
25
|
+
complete: true,
|
|
26
|
+
coverage_ratio: 1,
|
|
27
|
+
currency: "BRL",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
run_metrics: [
|
|
34
|
+
{
|
|
35
|
+
id: "TOKEN-ONLY",
|
|
36
|
+
started_at: "2026-08-07T12:00:00.000Z",
|
|
37
|
+
finished_at: null,
|
|
38
|
+
task_id: null,
|
|
39
|
+
phase: "execution",
|
|
40
|
+
parent_run_id: null,
|
|
41
|
+
status: null,
|
|
42
|
+
duration_ms: null,
|
|
43
|
+
total_tokens: 4_000_000,
|
|
44
|
+
cost: 1,
|
|
45
|
+
currency: "BRL",
|
|
46
|
+
events: 1,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
const operations = {
|
|
51
|
+
filters: { from: "2026-08-07", to: "2026-08-07" },
|
|
52
|
+
summary: { task_count: 0 },
|
|
53
|
+
prds: [],
|
|
54
|
+
specs: [],
|
|
55
|
+
} as unknown as OperationsProjection;
|
|
56
|
+
const projection = buildCostSummaryProjection(summary, operations, "BRL", null);
|
|
57
|
+
expect(projection.groups.daily[0]?.duration).toMatchObject({
|
|
58
|
+
known_sum: 0,
|
|
59
|
+
unknown: 1,
|
|
60
|
+
complete: false,
|
|
61
|
+
});
|
|
62
|
+
expect(projection.groups.daily[0]?.duration_ms).toBeNull();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("keeps a tokenized legacy period without factual duration unavailable", () => {
|
|
66
|
+
const summary: CostSummarySource = {
|
|
67
|
+
periods: {
|
|
68
|
+
daily: {
|
|
69
|
+
"2026-08-07": {
|
|
70
|
+
prds: 0,
|
|
71
|
+
specs: 0,
|
|
72
|
+
tasks: 0,
|
|
73
|
+
validations: 0,
|
|
74
|
+
evidences: 0,
|
|
75
|
+
runs: 1,
|
|
76
|
+
usage: {
|
|
77
|
+
total_tokens: { known_sum: 4_000_000, unknown: 0, complete: true, coverage_ratio: 1 },
|
|
78
|
+
cost: {
|
|
79
|
+
known_sum: 1,
|
|
80
|
+
unknown: 0,
|
|
81
|
+
complete: true,
|
|
82
|
+
coverage_ratio: 1,
|
|
83
|
+
currency: "BRL",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
const operations = {
|
|
91
|
+
filters: { from: "2026-08-07", to: "2026-08-07" },
|
|
92
|
+
summary: { task_count: 0 },
|
|
93
|
+
prds: [],
|
|
94
|
+
specs: [],
|
|
95
|
+
} as unknown as OperationsProjection;
|
|
96
|
+
const projection = buildCostSummaryProjection(summary, operations, "BRL", null);
|
|
97
|
+
expect(projection.groups.daily[0]).toMatchObject({
|
|
98
|
+
total_tokens: 4_000_000,
|
|
99
|
+
duration_ms: null,
|
|
100
|
+
duration: { known_sum: 0, unknown: 1, complete: false },
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it("uses the canonical root duration and excludes child and conversation duration", () => {
|
|
105
|
+
const summary: CostSummarySource = {
|
|
106
|
+
periods: {
|
|
107
|
+
daily: {
|
|
108
|
+
"2026-07-24": {
|
|
109
|
+
prds: 0,
|
|
110
|
+
specs: 0,
|
|
111
|
+
tasks: 0,
|
|
112
|
+
validations: 0,
|
|
113
|
+
evidences: 0,
|
|
114
|
+
runs: 3,
|
|
115
|
+
usage: {
|
|
116
|
+
total_tokens: { known_sum: 3, unknown: 0, complete: true, coverage_ratio: 1 },
|
|
117
|
+
cost: {
|
|
118
|
+
known_sum: 3,
|
|
119
|
+
unknown: 0,
|
|
120
|
+
complete: true,
|
|
121
|
+
coverage_ratio: 1,
|
|
122
|
+
currency: "BRL",
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
duration: { known_sum: 60_109_200, unknown: 0, complete: true, coverage_ratio: 1 },
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
run_metrics: [
|
|
130
|
+
{
|
|
131
|
+
id: "ROOT",
|
|
132
|
+
started_at: "2026-07-24T20:00:00.000Z",
|
|
133
|
+
finished_at: null,
|
|
134
|
+
task_id: null,
|
|
135
|
+
phase: "execution",
|
|
136
|
+
parent_run_id: null,
|
|
137
|
+
status: null,
|
|
138
|
+
duration_ms: 23_241_600,
|
|
139
|
+
total_tokens: 1,
|
|
140
|
+
cost: 1,
|
|
141
|
+
currency: "BRL",
|
|
142
|
+
events: 1,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "CHILD",
|
|
146
|
+
started_at: "2026-07-24T20:01:00.000Z",
|
|
147
|
+
finished_at: null,
|
|
148
|
+
task_id: null,
|
|
149
|
+
phase: "execution",
|
|
150
|
+
parent_run_id: "ROOT",
|
|
151
|
+
status: null,
|
|
152
|
+
duration_ms: 36_867_600,
|
|
153
|
+
total_tokens: 1,
|
|
154
|
+
cost: 1,
|
|
155
|
+
currency: "BRL",
|
|
156
|
+
events: 1,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: "CONVERSATION",
|
|
160
|
+
started_at: "2026-07-24T20:02:00.000Z",
|
|
161
|
+
finished_at: null,
|
|
162
|
+
task_id: null,
|
|
163
|
+
phase: "conversation",
|
|
164
|
+
parent_run_id: null,
|
|
165
|
+
status: null,
|
|
166
|
+
duration_ms: 1_000,
|
|
167
|
+
total_tokens: 1,
|
|
168
|
+
cost: 1,
|
|
169
|
+
currency: "BRL",
|
|
170
|
+
events: 1,
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
canonical_daily_duration_ms: { "2026-07-24": 23_241_600 },
|
|
174
|
+
};
|
|
175
|
+
const operations = {
|
|
176
|
+
filters: { from: null, to: null },
|
|
177
|
+
summary: { task_count: 0 },
|
|
178
|
+
prds: [],
|
|
179
|
+
specs: [],
|
|
180
|
+
} as unknown as OperationsProjection;
|
|
181
|
+
const row = buildCostSummaryProjection(summary, operations, "BRL", null).groups.daily.find(
|
|
182
|
+
(value) => value.key === "2026-07-24",
|
|
183
|
+
)!;
|
|
184
|
+
|
|
185
|
+
expect(row.duration.known_sum).toBe(23_241_600);
|
|
186
|
+
expect(row.duration.coverage_ratio).toBe(1);
|
|
187
|
+
expect(row.run_count).toBe(3);
|
|
188
|
+
});
|
|
189
|
+
});
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { OperationsLocale } from "./status-labels.js";
|
|
2
|
+
import { riskLabel } from "./status-labels.js";
|
|
3
|
+
import { taskOriginLabel, taskOriginOptions, type TaskOrigin } from "./task-origin.js";
|
|
4
|
+
import { workStageLabel, workStages } from "./work-board-model.js";
|
|
5
|
+
|
|
6
|
+
/** Work filters belong to the visible shared header, not the retired hero. */
|
|
7
|
+
export function OperationsEntityFilters({
|
|
8
|
+
locale,
|
|
9
|
+
query,
|
|
10
|
+
status,
|
|
11
|
+
risk,
|
|
12
|
+
origin,
|
|
13
|
+
onQuery,
|
|
14
|
+
onStatus,
|
|
15
|
+
onRisk,
|
|
16
|
+
onOrigin,
|
|
17
|
+
}: {
|
|
18
|
+
locale: OperationsLocale;
|
|
19
|
+
query: string;
|
|
20
|
+
status: string;
|
|
21
|
+
risk: string;
|
|
22
|
+
origin: TaskOrigin | "";
|
|
23
|
+
onQuery: (value: string) => void;
|
|
24
|
+
onStatus: (value: string) => void;
|
|
25
|
+
onRisk: (value: string) => void;
|
|
26
|
+
onOrigin: (value: TaskOrigin | "") => void;
|
|
27
|
+
}) {
|
|
28
|
+
const all = locale === "pt-BR" ? "Todos" : "All";
|
|
29
|
+
return (
|
|
30
|
+
<div className="operations-entity-filters">
|
|
31
|
+
<label>
|
|
32
|
+
<span>{locale === "pt-BR" ? "Busca" : "Search"}</span>
|
|
33
|
+
<input
|
|
34
|
+
aria-label={locale === "pt-BR" ? "Busca" : "Search"}
|
|
35
|
+
value={query}
|
|
36
|
+
onChange={(e) => onQuery(e.target.value)}
|
|
37
|
+
/>
|
|
38
|
+
</label>
|
|
39
|
+
<label>
|
|
40
|
+
<span>Status</span>
|
|
41
|
+
<select aria-label="Status" value={status} onChange={(e) => onStatus(e.target.value)}>
|
|
42
|
+
<option value="">{all}</option>
|
|
43
|
+
{workStages.map((stage) => (
|
|
44
|
+
<option key={stage} value={stage}>
|
|
45
|
+
{workStageLabel(stage, locale)}
|
|
46
|
+
</option>
|
|
47
|
+
))}
|
|
48
|
+
</select>
|
|
49
|
+
</label>
|
|
50
|
+
<label>
|
|
51
|
+
<span>{locale === "pt-BR" ? "Risco" : "Risk"}</span>
|
|
52
|
+
<select
|
|
53
|
+
aria-label={locale === "pt-BR" ? "Risco" : "Risk"}
|
|
54
|
+
value={risk}
|
|
55
|
+
onChange={(e) => onRisk(e.target.value)}
|
|
56
|
+
>
|
|
57
|
+
<option value="">{all}</option>
|
|
58
|
+
{["lite", "standard", "critical"].map((value) => (
|
|
59
|
+
<option key={value} value={value}>
|
|
60
|
+
{riskLabel(value, locale)}
|
|
61
|
+
</option>
|
|
62
|
+
))}
|
|
63
|
+
</select>
|
|
64
|
+
</label>
|
|
65
|
+
<label>
|
|
66
|
+
<span>{locale === "pt-BR" ? "Origem" : "Origin"}</span>
|
|
67
|
+
<select
|
|
68
|
+
aria-label={locale === "pt-BR" ? "Origem" : "Origin"}
|
|
69
|
+
value={origin}
|
|
70
|
+
onChange={(e) => onOrigin(e.target.value as TaskOrigin | "")}
|
|
71
|
+
>
|
|
72
|
+
<option value="">{all}</option>
|
|
73
|
+
{taskOriginOptions.map((value) => (
|
|
74
|
+
<option key={value} value={value}>
|
|
75
|
+
{taskOriginLabel(value)}
|
|
76
|
+
</option>
|
|
77
|
+
))}
|
|
78
|
+
</select>
|
|
79
|
+
</label>
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}
|
package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.helpers.tsx
CHANGED
|
@@ -601,12 +601,15 @@ export function formatExecutionAverageHint(
|
|
|
601
601
|
locale: OperationsLocale,
|
|
602
602
|
): string {
|
|
603
603
|
if (totalTasks <= 0) return "0";
|
|
604
|
-
if (totalDurationMs <= 0
|
|
604
|
+
if (totalDurationMs <= 0) {
|
|
605
605
|
return locale === "pt-BR"
|
|
606
606
|
? "Médias de execução indisponíveis"
|
|
607
607
|
: "Execution averages unavailable";
|
|
608
608
|
}
|
|
609
609
|
const averagePerTask = formatRoundedDuration(totalDurationMs / totalTasks, locale);
|
|
610
|
+
// Macro aggregates can provide duration and population without individual
|
|
611
|
+
// execution days. Keep the known per-item average available in that case.
|
|
612
|
+
if (totalDays <= 0) return `${averagePerTask} / item`;
|
|
610
613
|
const averagePerDay = formatDurationInHours(totalDurationMs / totalDays);
|
|
611
614
|
const totalDaysLabel =
|
|
612
615
|
locale === "pt-BR" ? `${totalDays} dias` : `${totalDays} ${totalDays === 1 ? "day" : "days"}`;
|
|
@@ -357,6 +357,11 @@ describe("execution average summary", () => {
|
|
|
357
357
|
"20 min / tarefa (6 h / dia) (6 dias)",
|
|
358
358
|
);
|
|
359
359
|
});
|
|
360
|
+
it("keeps the known macro average when execution days are unavailable", () => {
|
|
361
|
+
expect(formatExecutionAverageHint(3_600_000, 3, 0, "pt-BR")).toBe("20 min / item");
|
|
362
|
+
expect(formatExecutionAverageHint(3_600_000, 3, 0, "en-US")).toBe("20 min / item");
|
|
363
|
+
expect(formatExecutionAverageHint(0, 3, 0, "pt-BR")).toBe("Médias de execução indisponíveis");
|
|
364
|
+
});
|
|
360
365
|
it("localizes English and shows zero for an empty population", () => {
|
|
361
366
|
expect(formatExecutionAverageHint(3_600_000, 3, 1, "en-US")).toBe(
|
|
362
367
|
"20 min / task (1 h / day) (1 day)",
|
|
@@ -2,6 +2,7 @@ import { DashboardHeader } from "@zaip-ai/dashboard-ui";
|
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { ExcelExportAction } from "./export/ExcelExportAction.js";
|
|
4
4
|
import { OperationDateFilters } from "./OperationDateFilters.js";
|
|
5
|
+
import { OperationsEntityFilters } from "./OperationsEntityFilters.js";
|
|
5
6
|
import {
|
|
6
7
|
ChevronDownIcon,
|
|
7
8
|
FilterIcon,
|
|
@@ -17,6 +18,7 @@ import {
|
|
|
17
18
|
resolveOperationsPeriodControl,
|
|
18
19
|
workListTypeOnViewChange,
|
|
19
20
|
} from "./operations-page-contract.js";
|
|
21
|
+
import { useOperationFilterFeedback } from "./use-operation-filter-feedback.js";
|
|
20
22
|
|
|
21
23
|
export {
|
|
22
24
|
type DashboardGlobalFilters,
|
|
@@ -33,17 +35,16 @@ import {
|
|
|
33
35
|
type OperationDatePreset,
|
|
34
36
|
type OperationDateRange,
|
|
35
37
|
} from "./operation-date-range.js";
|
|
38
|
+
import { factualDurationRowsForExport } from "./operations-export-duration.js";
|
|
36
39
|
import type { OperationsView } from "./operations-page-filters.js";
|
|
37
40
|
import { macrosWithPeriodActivity } from "./operations-period-scope.js";
|
|
38
41
|
import { matchesQuery } from "./operations-query.js";
|
|
39
42
|
import { viewLabels } from "./operations-view-labels.js";
|
|
40
|
-
import { applyFactualPeriodCosts
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
type PeriodSummaryRow,
|
|
46
|
-
} from "./period-summary.js";
|
|
43
|
+
import { applyFactualPeriodCosts } from "./PeriodSummaryTable.js";
|
|
44
|
+
|
|
45
|
+
export { factualDurationRowsForExport } from "./operations-export-duration.js";
|
|
46
|
+
|
|
47
|
+
import { aggregateManifestPeriodSummary, aggregatePeriodSummary } from "./period-summary.js";
|
|
47
48
|
import { periodSummaryPopulation } from "./period-summary-population.js";
|
|
48
49
|
import { scopeRunsToEntities } from "./run-scope.js";
|
|
49
50
|
import { riskLabel } from "./status-labels.js";
|
|
@@ -66,17 +67,6 @@ import "./operations-date-filters.css";
|
|
|
66
67
|
import "./operations-filter-panel.css";
|
|
67
68
|
import "./operations-responsive.css";
|
|
68
69
|
|
|
69
|
-
/** Applies Cost Monitor duration facts only to the Operations period exports that share them. */
|
|
70
|
-
export function factualDurationRowsForExport(
|
|
71
|
-
granularity: PeriodGranularity,
|
|
72
|
-
rows: readonly PeriodSummaryRow[],
|
|
73
|
-
factualRows?: readonly { key: string; duration_ms: number | null }[],
|
|
74
|
-
): PeriodSummaryRow[] {
|
|
75
|
-
return granularity === "month" || granularity === "year"
|
|
76
|
-
? applyFactualPeriodDurations(rows, factualRows)
|
|
77
|
-
: [...rows];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
70
|
export function OperationsPage({
|
|
81
71
|
alternateContent,
|
|
82
72
|
boardTotals,
|
|
@@ -130,8 +120,7 @@ export function OperationsPage({
|
|
|
130
120
|
const [statusFilter, setStatusFilter] = useState("");
|
|
131
121
|
const [riskFilter, setRiskFilter] = useState("");
|
|
132
122
|
const [originFilter, setOriginFilter] = useState<TaskOrigin | "">("");
|
|
133
|
-
const
|
|
134
|
-
const filterLoadingTimer = useRef<number | null>(null);
|
|
123
|
+
const { filterLoading, showFilterLoading } = useOperationFilterFeedback();
|
|
135
124
|
const searchInputRef = useRef<HTMLInputElement>(null);
|
|
136
125
|
const defaultDateRange = useMemo(() => {
|
|
137
126
|
const operationsRange = initialOperationsDateRange(
|
|
@@ -165,17 +154,6 @@ export function OperationsPage({
|
|
|
165
154
|
);
|
|
166
155
|
// Coverage is derived display data, not a user selection. Never feed it
|
|
167
156
|
// back through onDateChange: a delayed effect can overwrite a newer period.
|
|
168
|
-
const showFilterLoading = useCallback(() => {
|
|
169
|
-
setFilterLoading(true);
|
|
170
|
-
if (filterLoadingTimer.current !== null) window.clearTimeout(filterLoadingTimer.current);
|
|
171
|
-
filterLoadingTimer.current = window.setTimeout(() => setFilterLoading(false), 220);
|
|
172
|
-
}, []);
|
|
173
|
-
useEffect(
|
|
174
|
-
() => () => {
|
|
175
|
-
if (filterLoadingTimer.current !== null) window.clearTimeout(filterLoadingTimer.current);
|
|
176
|
-
},
|
|
177
|
-
[],
|
|
178
|
-
);
|
|
179
157
|
const renderedAlternateContent =
|
|
180
158
|
typeof alternateContent === "function"
|
|
181
159
|
? alternateContent({ query, datePreset, ...(datePreset === "all" ? {} : { dateRange }) })
|
|
@@ -467,6 +445,19 @@ export function OperationsPage({
|
|
|
467
445
|
</span>
|
|
468
446
|
) : null}
|
|
469
447
|
</div>
|
|
448
|
+
{!renderedAlternateContent ? (
|
|
449
|
+
<OperationsEntityFilters
|
|
450
|
+
locale={locale}
|
|
451
|
+
query={query}
|
|
452
|
+
status={statusFilter}
|
|
453
|
+
risk={riskFilter}
|
|
454
|
+
origin={originFilter}
|
|
455
|
+
onQuery={setQuery}
|
|
456
|
+
onStatus={setStatusFilter}
|
|
457
|
+
onRisk={setRiskFilter}
|
|
458
|
+
onOrigin={setOriginFilter}
|
|
459
|
+
/>
|
|
460
|
+
) : null}
|
|
470
461
|
<OperationDateFilters
|
|
471
462
|
ariaLabelSuffix={locale === "pt-BR" ? " nos filtros" : " in filters"}
|
|
472
463
|
dateRange={dateRange}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { createElement } from "react";
|
|
2
2
|
import { renderToStaticMarkup } from "react-dom/server";
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
|
-
import { PagedWorkList } from "./PagedWorkList.js";
|
|
4
|
+
import { PagedWorkList, pagedWorkStatusLabel } from "./PagedWorkList.js";
|
|
5
5
|
|
|
6
6
|
describe("PagedWorkList", () => {
|
|
7
|
+
it("displays the reconciled macro stage while preserving draft Task semantics", () => {
|
|
8
|
+
expect(pagedWorkStatusLabel({ status: "active", stage: "verifying" }, "pt-BR")).toBe(
|
|
9
|
+
"Verificação",
|
|
10
|
+
);
|
|
11
|
+
expect(pagedWorkStatusLabel({ status: "draft", stage: "planning" }, "pt-BR")).toBe(
|
|
12
|
+
"Planejamento (SPEC + Change)",
|
|
13
|
+
);
|
|
14
|
+
expect(pagedWorkStatusLabel({ status: "draft", stage: null }, "pt-BR")).toBe("Rascunho");
|
|
15
|
+
expect(pagedWorkStatusLabel({ status: "delivered", stage: "completed" }, "en-US")).toBe(
|
|
16
|
+
"Completed",
|
|
17
|
+
);
|
|
18
|
+
});
|
|
7
19
|
it("renders the factual developer column without object coercion", () => {
|
|
8
20
|
const markup = renderToStaticMarkup(
|
|
9
21
|
createElement(PagedWorkList, {
|
|
@@ -3,7 +3,12 @@ import { formatDeveloperIdentities } from "./developer-identities.js";
|
|
|
3
3
|
import { formatRoundedDuration } from "./format-rounded-duration.js";
|
|
4
4
|
import type { OperationsLocale } from "./status-labels.js";
|
|
5
5
|
import { WorkTypeFilters } from "./UnifiedWorkBoard.js";
|
|
6
|
-
import
|
|
6
|
+
import {
|
|
7
|
+
workStageLabel,
|
|
8
|
+
workStages,
|
|
9
|
+
type WorkStage,
|
|
10
|
+
type WorkTypeFilter,
|
|
11
|
+
} from "./work-board-model.js";
|
|
7
12
|
|
|
8
13
|
export type PagedWorkListRow = Record<string, unknown>;
|
|
9
14
|
export type PagedWorkListPage = {
|
|
@@ -25,6 +30,14 @@ function number(value: unknown): number | null {
|
|
|
25
30
|
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
26
31
|
}
|
|
27
32
|
|
|
33
|
+
export function pagedWorkStatusLabel(row: PagedWorkListRow, locale: OperationsLocale): string {
|
|
34
|
+
const stage = row.stage ?? row.status;
|
|
35
|
+
if (stage === "draft") return locale === "pt-BR" ? "Rascunho" : "Draft";
|
|
36
|
+
return workStages.includes(stage as WorkStage)
|
|
37
|
+
? workStageLabel(stage as WorkStage, locale)
|
|
38
|
+
: text(stage);
|
|
39
|
+
}
|
|
40
|
+
|
|
28
41
|
function workKindLabel(value: unknown, locale: OperationsLocale) {
|
|
29
42
|
const kind = text(value, "");
|
|
30
43
|
const labels =
|
|
@@ -77,8 +90,8 @@ export function PagedWorkList({
|
|
|
77
90
|
{
|
|
78
91
|
key: "status",
|
|
79
92
|
label: "Status",
|
|
80
|
-
render: (row) =>
|
|
81
|
-
sortValue: (row) =>
|
|
93
|
+
render: (row) => pagedWorkStatusLabel(row, locale),
|
|
94
|
+
sortValue: (row) => pagedWorkStatusLabel(row, locale),
|
|
82
95
|
},
|
|
83
96
|
{
|
|
84
97
|
key: "type",
|
package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts
CHANGED
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
EXPORT_SUCCESS_TOAST_MS,
|
|
10
10
|
exportAgentInvocationRows,
|
|
11
11
|
exportCompactLifecycleRows,
|
|
12
|
-
exportCostAgentRows,
|
|
13
12
|
exportCostGroupRows,
|
|
14
13
|
exportDeveloperRows,
|
|
15
14
|
exportExecutionRows,
|
|
@@ -466,6 +465,17 @@ it("exports compact Task, SPEC, PRD, and Conversation rows with entity columns",
|
|
|
466
465
|
]);
|
|
467
466
|
});
|
|
468
467
|
|
|
468
|
+
it("preserves unavailable compact timing and cost while exporting known tokens and real zero", () => {
|
|
469
|
+
const missing = { known_sum: 0, unknown: 1, complete: false, coverage_ratio: 0 };
|
|
470
|
+
const zero = { known_sum: 0, unknown: 0, complete: true, coverage_ratio: 1 };
|
|
471
|
+
const rows = exportCompactLifecycleRows([
|
|
472
|
+
{ metrics: { duration: missing, cost: missing, total_tokens: { ...zero, known_sum: 15 } } },
|
|
473
|
+
{ metrics: { duration: zero, cost: zero, total_tokens: zero } },
|
|
474
|
+
]);
|
|
475
|
+
expect(rows[0]).toMatchObject({ duration_hours: null, cost_brl: null, tokens: 15 });
|
|
476
|
+
expect(rows[1]).toMatchObject({ duration_hours: 0, cost_brl: 0, tokens: 0 });
|
|
477
|
+
});
|
|
478
|
+
|
|
469
479
|
it("keeps cost-executions headers and exported row keys in the compact lifecycle schema", () => {
|
|
470
480
|
const source = {
|
|
471
481
|
id: "RUN-42",
|
|
@@ -579,29 +589,3 @@ it("exports model analysis in table order with explicit numeric zeroes", () => {
|
|
|
579
589
|
it("clears pending success when a new export starts", () => {
|
|
580
590
|
expect("running").not.toBe("completed");
|
|
581
591
|
});
|
|
582
|
-
|
|
583
|
-
it("exports Agent tasks as participations and fills every missing numeric cell with zero", () => {
|
|
584
|
-
expect(COST_AGENT_EXPORT_COLUMNS).toEqual([
|
|
585
|
-
"Persona",
|
|
586
|
-
"Cargo",
|
|
587
|
-
"Zaip Agentes",
|
|
588
|
-
"PRDs",
|
|
589
|
-
"SPECs",
|
|
590
|
-
"Tarefas",
|
|
591
|
-
"Runs",
|
|
592
|
-
"Testes",
|
|
593
|
-
"Evidências",
|
|
594
|
-
"Tempo",
|
|
595
|
-
"Tokens",
|
|
596
|
-
"Custos",
|
|
597
|
-
]);
|
|
598
|
-
const rows = exportCostAgentRows([
|
|
599
|
-
{ key: "dave", task_count: 2 },
|
|
600
|
-
{ key: "leo", task_count: 2 },
|
|
601
|
-
{},
|
|
602
|
-
]);
|
|
603
|
-
expect(rows[0]?.Tarefas).toBe(2);
|
|
604
|
-
expect(rows[1]?.Tarefas).toBe(2);
|
|
605
|
-
for (const key of COST_AGENT_EXPORT_COLUMNS.slice(3)) expect(rows[2]?.[key]).toBe(0);
|
|
606
|
-
expect(rows[0]).not.toHaveProperty("tasks_created");
|
|
607
|
-
});
|