@zaip-ai/cli 2.6.0 → 3.0.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/README.md +36 -13
- package/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.d.ts.map +1 -1
- package/dist/services/adapters.js +5 -2
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/agent-adapters.js +12 -9
- package/dist/services/agent-adapters.js.map +1 -1
- package/dist/services/codex-conversation-lifecycle-hook.d.ts.map +1 -1
- package/dist/services/codex-conversation-lifecycle-hook.js +32 -21
- package/dist/services/codex-conversation-lifecycle-hook.js.map +1 -1
- package/dist/services/install-agents-template.js +9 -1
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/runtime-template.test.js +25 -2
- package/dist/services/runtime-template.test.js.map +1 -1
- package/dist/services/transactional-files.d.ts.map +1 -1
- package/dist/services/transactional-files.js +59 -14
- package/dist/services/transactional-files.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/README-ENG.md +71 -10
- package/templates/.agents/README.md +72 -10
- package/templates/.agents/config/agents/catalog.yaml +3 -0
- package/templates/.agents/config/agents/discovery.json +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +13 -10
- package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +1 -1
- package/templates/.agents/config/project.yaml +10 -1
- package/templates/.agents/dashboard/.zaip-managed.json +246 -134
- package/templates/.agents/dashboard/README.md +16 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-CGxeQak4.js → CostCalculationGuidePage-CEDZjl4V.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-tzS7YxYB.js → DashboardHelpDialog-TnrL1ZyZ.js} +915 -550
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-DEbCi1gP.js → PricingSettingsDialog-DjQpBqGU.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-B9GWkEyN.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-BAvLPAee.js +3 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-t1Om0Abw.js → TraceabilityWorkspace-BQZXUnQu.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-06__WZco.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/dashboard-localization-Basaw1NR.js +824 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-DiGC-dsJ.js → icons-vendor-DEmo6Tn2.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-BQe3zTvL.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-kPO6yNed.js → react-vendor-CadYsm83.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/traceability-BzKK8kK3.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +5 -5
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/AppDashboardContent.tsx +10 -5
- package/templates/.agents/dashboard/apps/frontend/src/AutonomySettings.tsx +82 -0
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.dom.test.ts +38 -7
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +164 -171
- package/templates/.agents/dashboard/apps/frontend/src/__tests__/app-composition-support.ts +6 -1
- package/templates/.agents/dashboard/apps/frontend/src/cost-monitor-population.test.tsx +149 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-settings.ts +2 -1
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +19 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +22 -1
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-cost-facts.test.ts +54 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-cost-facts.ts +20 -2
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.test.ts +37 -43
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.ts +9 -251
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-project-overview.ts +34 -7
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-view-actions.test.ts +51 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-view-actions.ts +3 -1
- package/templates/.agents/dashboard/apps/frontend/src/operations-period-render.test.ts +35 -0
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.test.ts +19 -4
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.ts +5 -3
- package/templates/.agents/dashboard/apps/frontend/src/project-installation-status.test.ts +112 -23
- package/templates/.agents/dashboard/apps/frontend/src/project-installation-status.ts +49 -12
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-copy.ts +181 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +11 -1
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-page.css +34 -51
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-state.css +55 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +12 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/traceability-task-pagination.ts +1 -2
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.test.ts +6 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.ts +2 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-trace-documents.ts +3 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-app-trace-task-pagination.ts +4 -15
- package/templates/.agents/dashboard/apps/frontend/src/use-dashboard-app-model.tsx +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/complete-cost-average.test.ts +73 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/contracts.ts +9 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/period-averages.ts +60 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorContent.tsx +8 -22
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +2 -3
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostPeriodAverageCards.tsx +32 -8
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-summary.ts +3 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +1 -42
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-group-page.ts +2 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.ts +3 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.ts +8 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/index.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview-keeps-structure-classes-mutually-exclusive.test.ts +4 -3
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.helpers.tsx +66 -3
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +71 -1
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +36 -30
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +5 -14
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageOverview.tsx +3 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OverviewCostKpi.tsx +46 -0
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.test.ts +28 -1
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.tsx +11 -4
- package/templates/.agents/dashboard/modules/operations/src/react/index.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-coverage-toast.test.ts +2 -2
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +28 -8
- package/templates/.agents/dashboard/modules/operations/src/react/operations-page-contract.ts +19 -2
- package/templates/.agents/dashboard/modules/operations/src/react/overview-cost-card.test.tsx +89 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.test.ts +3 -3
- package/templates/.agents/dashboard/modules/operations/src/work-board-model.ts +2 -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 +238 -226
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +205 -195
- package/templates/.agents/dashboard/packages/local-runtime/package.json +2 -2
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs +15 -25
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +238 -226
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/project-installation-summary.test.ts +142 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/project-installation-summary.ts +190 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +65 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +67 -66
- package/templates/.agents/dashboard/packages/local-runtime/src/server-browser-lease.test.ts +91 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-browser-lease.ts +24 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/server-hono-security.test.ts +17 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-operations-routes.ts +21 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.test.ts +94 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.ts +62 -12
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.test.ts +26 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +4 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-task-trace.test.ts +97 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-task-trace.ts +10 -13
- package/templates/.agents/dashboard/packages/local-runtime/src/server-trace-routes.ts +2 -10
- package/templates/.agents/dashboard/packages/local-runtime/src/server-traceability-index.test.ts +84 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +15 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-dimension-facts.test.ts +12 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-file-index.test.ts +69 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-cache.ts +3 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-force-canonical.test.ts +3 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-refresh.test.ts +2 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-projections.ts +9 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-runs.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-period-averages.ts +46 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-provider-alias-parity.test.ts +50 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-filtered-dimension.ts +13 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-summary.ts +25 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-temporal-dimension.ts +2 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-counts-every-root-execution-day-returns.test.ts +34 -10
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-filesystem.ts +17 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-keeps-orphan-telemetry-out-kanban-without.test.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuild.ts +9 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-schema.ts +4 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.test.ts +54 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +7 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +4 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-risk-population.test.ts +98 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-base-views.ts +7 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-dashboard-views.ts +2 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-seed.test.ts +2 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/verify-project-settings.mjs +57 -0
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/scripts/qualify-observability.mjs +130 -0
- package/templates/.agents/dashboard/scripts/verify-autonomy-settings.mjs +175 -0
- package/templates/.agents/dashboard/scripts/verify-observability.mjs +254 -0
- package/templates/.agents/dashboard/scripts/verify-project-setup.mjs +64 -0
- package/templates/.agents/dashboard/tests/e2e/lease-global-setup.ts +37 -0
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/playwright.config.ts +5 -3
- package/templates/.agents/dashboard/tests/e2e/specs/cost-monitor-period-transition.spec.ts +22 -1
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard-performance-matrix.spec.ts +17 -8
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +47 -6
- package/templates/.agents/dashboard/tests/e2e/specs/lease-lifetime.spec.ts +14 -0
- package/templates/.agents/dashboard/tests/observability-fixture.mjs +200 -0
- package/templates/.agents/design/.zaip-managed.json +84 -40
- package/templates/.agents/design/apps/catalog/dist/assets/index-BJV597iq.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-BOjCcUaU.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-B_WhrCZe.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-CqtYXZfV.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-D_lfqoyx.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-i_PO2k9R.js +9 -0
- package/templates/.agents/design/apps/catalog/dist/index.html +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/CatalogShell-Cstn1UwA.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{Color-6AOWCN3U-B-kAgAjB.js → Color-6AOWCN3U-Cm-yJJz_.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-D1WopB2L.js +137 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-DQ9PJ3N3.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{DocsRenderer-JROSPFPF-BVN7xHtv.js → DocsRenderer-JROSPFPF-Belk4jRr.js} +4 -4
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{WithTooltip-7X4HQR7L-CDHtKYkz.js → WithTooltip-7X4HQR7L-DoPvjkS1.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-DRQKCCAG-D6AsDkMK.js → chunk-DRQKCCAG-B1itKXEN.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-W22LQPXL-B4m5uloN.js → chunk-W22LQPXL-C-Eb5SPY.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{components-CN8YyTUg.js → components-DnyKLwhj.js} +5 -5
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-D0OSgxWz.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{iframe-9yZfIsdT.js → iframe-DcXBsFPz.js} +3 -3
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{react-18-BoCSnq6H.js → react-18-CRM89QRf.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-C3tkVMIp.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{syntaxhighlighter-YFXUGROL-Bnn_nMwJ.js → syntaxhighlighter-YFXUGROL-B03jQGTF.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{theming-DS_ue2sb.js → theming-4ZyufAga.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/iframe.html +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/index.json +1 -1
- package/templates/.agents/design/apps/catalog/package.json +2 -2
- package/templates/.agents/design/apps/catalog/src/components/AutonomySpecimen.tsx +15 -0
- package/templates/.agents/design/apps/catalog/src/components/CostPopulationSpecimen.test.tsx +19 -0
- package/templates/.agents/design/apps/catalog/src/components/CostPopulationSpecimen.tsx +45 -0
- package/templates/.agents/design/apps/catalog/src/components/EstimatedCostSpecimen.tsx +48 -0
- package/templates/.agents/design/apps/catalog/src/components/ProjectStatusSpecimen.tsx +169 -0
- package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +55 -0
- package/templates/.agents/design/apps/catalog/src/stories/Components.stories.tsx +60 -0
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- 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 +1 -1
- package/templates/.agents/requirements/software-architecture.md +1 -1
- package/templates/.agents/requirements/strategic-improvements.md +1 -1
- package/templates/.agents/requirements/work-lifecycle.md +5 -5
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/rules/astra-diagnostic.md +3 -1
- package/templates/.agents/rules/autonomy-decision.md +10 -2
- package/templates/.agents/rules/core.md +12 -1
- package/templates/.agents/rules/run-lifecycle-closure.md +8 -6
- package/templates/.agents/rules/workflow.md +2 -2
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +383 -350
- package/templates/.agents/runtime/checksums.sha256 +6 -6
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/pnpm-lock.sha256 +1 -1
- package/templates/.agents/runtime/provenance.json +5 -5
- package/templates/.agents/runtime/sbom.cdx.json +3 -3
- package/templates/.agents/skills/zaip-skill-dev-environment/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +28 -5
- package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +17 -3
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +8 -9
- package/templates/.agents/skills/zaip-skill-github-deploy/references/deployment-workflow.md +10 -6
- package/templates/.agents/skills/zaip-skill-move-prd/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-prd/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +21 -23
- package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md +37 -13
- package/templates/.agents/skills/zaip-skill-setup/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-tool-setup/SKILL.md +2 -0
- package/templates/.agents/zaip-aios/INDEX.md +9 -1
- package/templates/.agents/zaip-aios/README.md +23 -2
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/01-primeiros-passos.md +5 -1
- package/templates/.agents/zaip-aios/guides/03-tasks.md +15 -2
- package/templates/.agents/zaip-aios/guides/04-specs.md +13 -0
- package/templates/.agents/zaip-aios/guides/05-prds.md +13 -0
- package/templates/.agents/zaip-aios/guides/06-execucao.md +19 -4
- package/templates/.agents/zaip-aios/guides/07-revisao-e-validacao.md +14 -0
- package/templates/.agents/zaip-aios/guides/08-contexto-e-tokens.md +4 -3
- package/templates/.agents/zaip-aios/guides/09-agentes-e-squads.md +17 -9
- package/templates/.agents/zaip-aios/guides/10-seguranca.md +9 -0
- package/templates/.agents/zaip-aios/guides/11-observabilidade-e-custos.md +69 -0
- package/templates/.agents/zaip-aios/guides/12-instalacao-e-upgrade.md +9 -4
- package/templates/.agents/zaip-aios/guides/13-boas-praticas.md +7 -1
- package/templates/.agents/zaip-aios/guides/14-troubleshooting.md +18 -0
- package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +54 -3
- package/templates/.agents/zaip-aios/guides/18-catalogo-de-agentes.md +10 -2
- package/templates/.agents/zaip-aios/guides/19-assurance-e-autonomia.md +186 -5
- package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +21 -15
- package/templates/.agents/zaip-aios/guides/21-telemetria-monitor-custos.md +18 -2
- package/templates/.agents/zaip-aios/guides/22-fluxos-e-roteamento.md +14 -2
- package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +190 -489
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +61 -13
- package/templates/.agents/zaip-aios/guides/27-telemetria-git-native.md +18 -0
- package/templates/.agents/zaip-aios/guides/28-lifecycle-completo.md +18 -1
- package/templates/template-manifest.json +425 -269
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-1L7Qw-Gq.js +0 -3
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-EInWr641.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-B6aZfo5f.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/dashboard-localization-CLJ0lT9v.js +0 -231
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DgTmNHN5.js +0 -2
- package/templates/.agents/dashboard/apps/frontend/dist/assets/traceability-DQpKX9c1.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/CatalogShell-BWY-80s4.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-Be2mDUQj.js +0 -27
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-DRx9blDs.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-EwuTh8Zk.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-DyL61NPT.js +0 -1
|
@@ -3,7 +3,10 @@ import type { ProjectOverview } from "./dashboard-project-overview.js";
|
|
|
3
3
|
export type { ProjectOverview } from "./dashboard-project-overview.js";
|
|
4
4
|
|
|
5
5
|
import { type ApiErrorPayload, dashboardApiPaths } from "@zaip-ai/dashboard-contracts";
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
CostMonitorProjection,
|
|
8
|
+
CostPeriodAverages,
|
|
9
|
+
} from "@zaip-ai/dashboard-cost-monitor/contracts";
|
|
7
10
|
import type {
|
|
8
11
|
ChangeProjection,
|
|
9
12
|
DashboardTaskProjection,
|
|
@@ -66,6 +69,7 @@ export interface SqliteViewPage {
|
|
|
66
69
|
total_count: number;
|
|
67
70
|
has_more: boolean;
|
|
68
71
|
totals?: Record<string, unknown>;
|
|
72
|
+
period_averages?: Record<"BRL" | "USD", CostPeriodAverages>;
|
|
69
73
|
rows: Array<Record<string, unknown>>;
|
|
70
74
|
}
|
|
71
75
|
export type OperationsScope = "quick" | "overview" | "detail";
|
|
@@ -320,6 +324,23 @@ export class DashboardApiClient {
|
|
|
320
324
|
);
|
|
321
325
|
}
|
|
322
326
|
|
|
327
|
+
traceabilityTasks(
|
|
328
|
+
offset = 0,
|
|
329
|
+
limit = 10,
|
|
330
|
+
): Promise<{
|
|
331
|
+
tasks: OperationsProjection["tasks"];
|
|
332
|
+
total: number;
|
|
333
|
+
offset: number;
|
|
334
|
+
limit: number;
|
|
335
|
+
}> {
|
|
336
|
+
const params = new URLSearchParams({
|
|
337
|
+
scope: "traceability",
|
|
338
|
+
offset: String(offset),
|
|
339
|
+
limit: String(limit),
|
|
340
|
+
});
|
|
341
|
+
return this.get(`${dashboardApiPaths.operations}?${params}`);
|
|
342
|
+
}
|
|
343
|
+
|
|
323
344
|
operationsClassification(
|
|
324
345
|
period: { from: string | null; to: string | null } | undefined,
|
|
325
346
|
kind: "task" | "spec" | "prd",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { CostMonitorProjection } from "@zaip-ai/dashboard-cost-monitor/contracts";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { factualCostFacts } from "./dashboard-cost-facts.js";
|
|
4
|
+
|
|
5
|
+
function fixture(known: number, runs: number, total: number | null = 0): CostMonitorProjection {
|
|
6
|
+
return {
|
|
7
|
+
currency: "BRL",
|
|
8
|
+
overview: {
|
|
9
|
+
run_count: runs,
|
|
10
|
+
estimated_usd: total,
|
|
11
|
+
estimated_brl: total,
|
|
12
|
+
coverage: { events: runs, tokens: known, usd: known, brl: known },
|
|
13
|
+
},
|
|
14
|
+
groups: { daily: [], monthly: [], annual: [] },
|
|
15
|
+
} as unknown as CostMonitorProjection;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
describe("factual cost facts", () => {
|
|
19
|
+
it("preserves a partly measured known subtotal with its coverage", () => {
|
|
20
|
+
expect(factualCostFacts(fixture(3, 5, 12.5), null, "BRL").fact).toEqual({
|
|
21
|
+
state: "partial",
|
|
22
|
+
knownSum: 12.5,
|
|
23
|
+
coverage: { known: 3, total: 5 },
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
it("preserves fully measured zero as a complete observed total", () => {
|
|
27
|
+
expect(factualCostFacts(fixture(3, 3), null, "BRL").fact).toEqual({
|
|
28
|
+
state: "complete",
|
|
29
|
+
knownSum: 0,
|
|
30
|
+
coverage: { known: 3, total: 3 },
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
it("does not hide a measured zero when other Runs remain unpriced", () => {
|
|
34
|
+
expect(factualCostFacts(fixture(1, 3, 0), null, "BRL").fact).toEqual({
|
|
35
|
+
state: "partial",
|
|
36
|
+
knownSum: 0,
|
|
37
|
+
coverage: { known: 1, total: 3 },
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
it("keeps an unknown aggregate unavailable even when coverage exists", () => {
|
|
41
|
+
expect(factualCostFacts(fixture(3, 3, null), null, "BRL").fact).toEqual({
|
|
42
|
+
state: "unavailable",
|
|
43
|
+
knownSum: null,
|
|
44
|
+
coverage: { known: 3, total: 3 },
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
it("does not relabel a stale different-currency snapshot", () => {
|
|
48
|
+
expect(factualCostFacts(fixture(3, 3), null, "USD").fact).toEqual({
|
|
49
|
+
state: "unavailable",
|
|
50
|
+
knownSum: null,
|
|
51
|
+
coverage: null,
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { CostMonitorProjection } from "@zaip-ai/dashboard-cost-monitor/contracts";
|
|
2
|
+
import type { FactualCostFact } from "@zaip-ai/dashboard-operations/react";
|
|
3
|
+
|
|
4
|
+
export type { FactualCostFact } from "@zaip-ai/dashboard-operations/react";
|
|
2
5
|
|
|
3
6
|
export function currentCostByRun(
|
|
4
7
|
costs: CostMonitorProjection | null,
|
|
@@ -18,9 +21,24 @@ export function factualCostFacts(
|
|
|
18
21
|
currency: "BRL" | "USD",
|
|
19
22
|
) {
|
|
20
23
|
const snapshot = displayedCosts ?? costs;
|
|
21
|
-
if (snapshot?.currency !== currency)
|
|
24
|
+
if (snapshot?.currency !== currency) {
|
|
25
|
+
return {
|
|
26
|
+
fact: { state: "unavailable", knownSum: null, coverage: null } as const,
|
|
27
|
+
periods: undefined,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const known = snapshot.overview.coverage[currency === "USD" ? "usd" : "brl"];
|
|
31
|
+
const knownSum =
|
|
32
|
+
currency === "USD" ? snapshot.overview.estimated_usd : snapshot.overview.estimated_brl;
|
|
33
|
+
const coverage = { known, total: snapshot.overview.run_count };
|
|
34
|
+
const fact: FactualCostFact =
|
|
35
|
+
knownSum === null
|
|
36
|
+
? { state: "unavailable", knownSum: null, coverage }
|
|
37
|
+
: known < snapshot.overview.run_count
|
|
38
|
+
? { state: "partial", knownSum, coverage }
|
|
39
|
+
: { state: "complete", knownSum, coverage };
|
|
22
40
|
return {
|
|
23
|
-
|
|
41
|
+
fact,
|
|
24
42
|
periods: {
|
|
25
43
|
day: snapshot.groups.daily,
|
|
26
44
|
month: snapshot.groups.monthly,
|
|
@@ -1,53 +1,47 @@
|
|
|
1
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
1
3
|
import { describe, expect, it } from "vitest";
|
|
2
4
|
import { buildHelpDocuments, pricingCopy } from "./dashboard-localization.js";
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const root = resolve(import.meta.dirname, "../../../../..");
|
|
7
|
+
const guidesRoot = resolve(root, ".agents/zaip-aios/guides");
|
|
8
|
+
const sources = Object.fromEntries(
|
|
9
|
+
readdirSync(guidesRoot)
|
|
10
|
+
.filter((file) => file.endsWith(".md"))
|
|
11
|
+
.map((file) => [file, readFileSync(resolve(guidesRoot, file), "utf8")]),
|
|
12
|
+
);
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
]);
|
|
17
|
-
expect(documents[0]?.content).toContain("Git-native operating system");
|
|
18
|
-
expect(documents[1]?.content).toContain("Read `.agents/config/project.yaml`");
|
|
19
|
-
expect(documents[2]?.content).toContain("Trust model");
|
|
20
|
-
expect(documents.map((document) => document.content).join("\n")).not.toContain(
|
|
21
|
-
"Conteúdo em português",
|
|
22
|
-
);
|
|
14
|
+
describe("dashboard localization", () => {
|
|
15
|
+
it("uses the complete canonical English README instead of a fixed summary", () => {
|
|
16
|
+
const documents = buildHelpDocuments("en-US", "# README PT", sources);
|
|
17
|
+
expect(documents[0]?.content).toBe(readFileSync(resolve(root, "README-ENG.md"), "utf8"));
|
|
18
|
+
expect(documents[0]?.content).toContain("### v3 autonomy presets");
|
|
23
19
|
});
|
|
24
20
|
|
|
25
|
-
it(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"15-tools-e-codex.md",
|
|
42
|
-
];
|
|
43
|
-
const sources = Object.fromEntries(
|
|
44
|
-
guideFiles.map((file) => [`../../../../zaip-aios/guides/${file}`, `# PT ${file}`]),
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const documents = buildHelpDocuments("en-US", "# README PT", sources);
|
|
21
|
+
it.each([
|
|
22
|
+
"pt-BR",
|
|
23
|
+
"en-US",
|
|
24
|
+
] as const)("preserves every actual guide and its current contract in %s", (locale) => {
|
|
25
|
+
const documents = buildHelpDocuments(locale, "# README PT", sources);
|
|
26
|
+
expect(Object.keys(sources)).toHaveLength(28);
|
|
27
|
+
expect(documents).toHaveLength(29);
|
|
28
|
+
for (const [file, source] of Object.entries(sources)) {
|
|
29
|
+
const document = documents.find((entry) => entry.id === file);
|
|
30
|
+
expect(document?.content.endsWith(source)).toBe(true);
|
|
31
|
+
if (locale === "en-US") {
|
|
32
|
+
expect(document?.content).toContain("Language: Portuguese (pt-BR)");
|
|
33
|
+
expect(document?.content).toContain("an English translation is not available");
|
|
34
|
+
} else expect(document?.content).toBe(source);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
48
37
|
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
it("propagates a changed guide instead of masking it with a fixed translation", () => {
|
|
39
|
+
const id = "../../../../zaip-aios/guides/01-primeiros-passos.md";
|
|
40
|
+
const changed = "# Primeiros passos\n\nContrato alterado: preservar o diário da Task.";
|
|
41
|
+
const documents = buildHelpDocuments("en-US", "# README", { [id]: changed });
|
|
42
|
+
expect(documents[1]).toMatchObject({ id, title: "Primeiros passos" });
|
|
43
|
+
expect(documents[1]?.content.endsWith(changed)).toBe(true);
|
|
44
|
+
expect(documents[1]?.content).not.toContain(".agents/rules/zaip/core.md");
|
|
51
45
|
});
|
|
52
46
|
|
|
53
47
|
it("preserves the source documentation in Portuguese", () => {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import englishReadme from "../../../../../README-ENG.md?raw";
|
|
2
|
+
|
|
1
3
|
export type DashboardLocale = "pt-BR" | "en-US";
|
|
2
4
|
|
|
3
5
|
export interface HelpDocument {
|
|
@@ -6,256 +8,6 @@ export interface HelpDocument {
|
|
|
6
8
|
content: string;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
|
-
const englishReadme = `# ZAIP-AIOS
|
|
10
|
-
|
|
11
|
-
ZAIP-AIOS is a Git-native operating system for autonomous software engineering with Codex. It turns a request into structured, traceable work by defining requirements, preparing a plan, coordinating execution, running tests and reviews, and only considering a result complete when verifiable evidence exists.
|
|
12
|
-
|
|
13
|
-
## From conversation to executable work
|
|
14
|
-
|
|
15
|
-
Work can start with a **Task**, a **PRD** (Product Requirements Document), or a **SPEC**. A PRD describes the problem, expected outcome, product context, and acceptance criteria. A SPEC turns that intent into a technical scope, solution, acceptance criteria, Changes, and a DAG of executable Tasks.
|
|
16
|
-
|
|
17
|
-
ZAIP-AIOS does not require a VPS, a competing runtime, or mandatory API model routing. Codex remains the execution host while ZAIP-AIOS adds method, operational memory, governance, traceability, and observability to the repository.
|
|
18
|
-
|
|
19
|
-
## Six-stage method
|
|
20
|
-
|
|
21
|
-
1. **Definition** — capture PRDs, Requirements, and acceptance criteria.
|
|
22
|
-
2. **Planning** — prepare SPECs, Changes, dependencies, and rollback.
|
|
23
|
-
3. **Ready to execute** — confirm that scoped work is actionable.
|
|
24
|
-
4. **Execution** — implement Tasks and record Runs.
|
|
25
|
-
5. **Verification** — run tests, review the diff, and collect evidence.
|
|
26
|
-
6. **Completion** — close the lifecycle only after acceptance is satisfied.
|
|
27
|
-
|
|
28
|
-
Small, independent frontend changes may use a task-first lite flow and begin directly in execution without definition or planning evidence.
|
|
29
|
-
|
|
30
|
-
## Operational dashboard
|
|
31
|
-
|
|
32
|
-
The dashboard provides three complementary views:
|
|
33
|
-
|
|
34
|
-
- **Operations** follows PRDs, SPECs, Tasks, Changes, Executions, Runs, and conversations.
|
|
35
|
-
- **Cost Monitor** aggregates time, tokens, models, providers, and estimated cost.
|
|
36
|
-
- **Traceability** connects each delivered result to its requirements, changes, runs, tests, and evidence.
|
|
37
|
-
|
|
38
|
-
## Engineering principles
|
|
39
|
-
|
|
40
|
-
- Start from an observable outcome and explicit acceptance criteria.
|
|
41
|
-
- Keep domain logic independent from infrastructure and vendors.
|
|
42
|
-
- Prefer small, reversible, traceable changes.
|
|
43
|
-
- Load only the context required for the active work.
|
|
44
|
-
- Preserve unrelated changes in a dirty worktree.
|
|
45
|
-
- Treat tests, evidence, observability, and rollback as part of delivery.
|
|
46
|
-
- Never infer external authorization from technical capability.
|
|
47
|
-
|
|
48
|
-
## Installation and development
|
|
49
|
-
|
|
50
|
-
Use the repository setup command documented for the current release, then run the doctor and integrity checks. The framework source lives in this repository; generated public and consumer artifacts are validated for release parity.
|
|
51
|
-
|
|
52
|
-
The main local quality gates cover type checking, focused tests, architecture boundaries, generated text, framework integrity, and release parity. Use focused checks while implementing and the applicable final gates before completion.
|
|
53
|
-
|
|
54
|
-
## Repository structure
|
|
55
|
-
|
|
56
|
-
- \`.agents/config/\` — project-owned configuration.
|
|
57
|
-
- \`.agents/rules/\` — operational and architectural rules.
|
|
58
|
-
- \`.agents/requirements/\` — durable Requirements and acceptance criteria.
|
|
59
|
-
- \`.agents/skills/\` — reusable workflows.
|
|
60
|
-
- \`.agents/records/\` — lifecycle records addressed by explicit ID.
|
|
61
|
-
- \`.agents/records/lifecycle/\` — canonical lifecycle manifests, chunks, indexes, and summaries.
|
|
62
|
-
- \`.agents/dashboard/\` — dashboard applications and modules.
|
|
63
|
-
- \`.agents/runtime/\` — runtime and CLI distributable.
|
|
64
|
-
|
|
65
|
-
Read runtime projections for discovery. Open lifecycle records only when you already have their ID.`;
|
|
66
|
-
|
|
67
|
-
const englishGuides: Record<string, string> = {
|
|
68
|
-
"01-primeiros-passos.md": `# Getting started
|
|
69
|
-
|
|
70
|
-
1. Read \`.agents/config/project.yaml\` and \`.agents/rules/zaip/core.md\`.
|
|
71
|
-
2. Consult \`.agents/records/lifecycle/\` to discover the current state.
|
|
72
|
-
3. Classify the work as a Task, SPEC, or PRD.
|
|
73
|
-
4. Load only the applicable Rules, Requirements, and skills.
|
|
74
|
-
5. Define verifiable acceptance before editing.
|
|
75
|
-
6. Execute, test, and record evidence in the active lifecycle.
|
|
76
|
-
|
|
77
|
-
Do not scan \`.agents/records/\`; open a record only when you have its ID.`,
|
|
78
|
-
"02-requirements.md": `# Requirements
|
|
79
|
-
|
|
80
|
-
Use a Requirement for a durable, testable obligation.
|
|
81
|
-
|
|
82
|
-
1. Describe the outcome and boundary, not the preferred implementation.
|
|
83
|
-
2. Create observable acceptance criteria.
|
|
84
|
-
3. Record risks, dependencies, and negative cases.
|
|
85
|
-
4. Connect every criterion to a test or evidence.
|
|
86
|
-
5. Version changes without erasing the previous intent.
|
|
87
|
-
6. Promote only after consistency and traceability are validated.
|
|
88
|
-
|
|
89
|
-
A good criterion answers unambiguously: did it pass or fail?`,
|
|
90
|
-
"03-tasks.md": `# Tasks
|
|
91
|
-
|
|
92
|
-
Use a Task for a small, independent delivery with a clear result.
|
|
93
|
-
|
|
94
|
-
1. State the objective, scope, and out-of-scope items.
|
|
95
|
-
2. Link applicable Requirements.
|
|
96
|
-
3. List likely files or components without freezing the solution.
|
|
97
|
-
4. Define checks proportional to risk.
|
|
98
|
-
5. Execute in the associated Run and attach evidence.
|
|
99
|
-
6. Close only when acceptance is satisfied or a blocker is proven.`,
|
|
100
|
-
"04-specs.md": `# SPECs
|
|
101
|
-
|
|
102
|
-
Use a SPEC when delivery requires multiple Tasks or dependency ordering.
|
|
103
|
-
|
|
104
|
-
1. Turn the desired result into verifiable capabilities.
|
|
105
|
-
2. Resolve the project stack from \`stack.id\` and \`stack.overrides\`.
|
|
106
|
-
3. Record the stack profile, overrides, concise description, exact versions, and workspace-verifiable sources.
|
|
107
|
-
4. Split delivery into small Tasks with their own acceptance.
|
|
108
|
-
5. Model dependencies as a DAG and avoid artificial sequences.
|
|
109
|
-
6. Identify critical paths, risks, and rollback.
|
|
110
|
-
7. Map every Requirement to Tasks and evidence.
|
|
111
|
-
8. Validate the SPEC before execution and block missing or inconsistent stack data.
|
|
112
|
-
|
|
113
|
-
A SPEC plans delivery; it does not authorize external changes by itself.`,
|
|
114
|
-
"05-prds.md": `# PRDs
|
|
115
|
-
|
|
116
|
-
Use a PRD for a product initiative with multiple capabilities or SPECs.
|
|
117
|
-
|
|
118
|
-
1. Record the problem, audience, outcome, and metrics.
|
|
119
|
-
2. Define scope, constraints, and non-goals.
|
|
120
|
-
3. Keep the PRD independent of language, framework, database, infrastructure, and vendor.
|
|
121
|
-
4. Specify functional and non-functional requirements.
|
|
122
|
-
5. Convert capabilities into independent SPECs where the technical stack is resolved.
|
|
123
|
-
6. Cover risks, rollout, observability, and rollback.
|
|
124
|
-
7. Build the DAG and confirm that every acceptance criterion has planned evidence.`,
|
|
125
|
-
"06-execucao.md": `# Execution
|
|
126
|
-
|
|
127
|
-
1. Confirm the lifecycle ID and governing acceptance criteria.
|
|
128
|
-
2. Inspect the diff and preserve unrelated changes.
|
|
129
|
-
3. Implement the smallest coherent increment.
|
|
130
|
-
4. Run focused checks after each increment.
|
|
131
|
-
5. Record consequential decisions, evidence, and deviations.
|
|
132
|
-
6. Run final gates and document rollback.
|
|
133
|
-
|
|
134
|
-
Do not mark work complete because effort was spent; complete it because the outcome is verifiable.`,
|
|
135
|
-
"07-revisao-e-validacao.md": `# Review and validation
|
|
136
|
-
|
|
137
|
-
1. Review Requirements and acceptance criteria.
|
|
138
|
-
2. Examine the diff, architecture boundaries, and error paths.
|
|
139
|
-
3. Run focused tests, then all applicable gates.
|
|
140
|
-
4. Verify security, compatibility, documentation, and rollback.
|
|
141
|
-
5. Rank findings by impact and cite concrete evidence.
|
|
142
|
-
6. Record the result without changing the implementation during a read-only review.`,
|
|
143
|
-
"08-contexto-e-tokens.md": `# Context and tokens
|
|
144
|
-
|
|
145
|
-
1. Start with \`project.yaml\`, \`core.md\`, and runtime projections.
|
|
146
|
-
2. Load only the triggered Rule, Requirement, or skill.
|
|
147
|
-
3. Prefer indexes, summaries, and targeted search over full files.
|
|
148
|
-
4. Open records only by a known lifecycle ID.
|
|
149
|
-
5. Summarize stable facts and preserve literal text only when normative.
|
|
150
|
-
6. Remove superseded results and non-actionable detail from context.
|
|
151
|
-
|
|
152
|
-
For tools, read \`catalog.yaml\`, choose an ID, and open only its manifest.`,
|
|
153
|
-
"09-agentes-e-squads.md": `# Agents and squads
|
|
154
|
-
|
|
155
|
-
1. Delegate only concrete, independent subtasks.
|
|
156
|
-
2. Give each agent an objective, boundaries, inputs, and output format.
|
|
157
|
-
3. Avoid two agents editing the same files.
|
|
158
|
-
4. Centralize architecture decisions and integration in the responsible agent.
|
|
159
|
-
5. Require evidence, not only completion claims.
|
|
160
|
-
6. Use parallelism only when it shortens the critical path without increasing conflict.`,
|
|
161
|
-
"10-seguranca.md": `# Security with danger-full-access
|
|
162
|
-
|
|
163
|
-
The security profile treats unrestricted filesystem access as a technical capability, never as blanket authorization. User intent, repository scope, lifecycle write scopes, and explicit approval remain the governing boundaries.
|
|
164
|
-
|
|
165
|
-
## Trust model
|
|
166
|
-
|
|
167
|
-
The user controls global opt-in and trusted projects. Repository instructions may narrow authority but cannot silently expand it. Missing or ambiguous authorization fails closed for destructive, external, credential-related, or irreversible operations.
|
|
168
|
-
|
|
169
|
-
## Security layers
|
|
170
|
-
|
|
171
|
-
1. **Global opt-in and trusted project** — unrestricted execution is enabled only by explicit user configuration in a trusted workspace.
|
|
172
|
-
2. **No-prompt is not authorization** — suppressing approval prompts does not grant new scope.
|
|
173
|
-
3. **Fail-closed hooks** — pre-tool controls reject operations that cannot be classified safely.
|
|
174
|
-
4. **Filesystem boundary** — writes remain inside authorized workspace roots and lifecycle scopes.
|
|
175
|
-
5. **Secrets protection** — credentials, tokens, environment files, and private keys are not exposed or committed.
|
|
176
|
-
6. **Inline execution controls** — evasive shell composition and hidden payload execution are blocked.
|
|
177
|
-
7. **Allowlisted egress** — external access is limited to required, trusted destinations.
|
|
178
|
-
8. **Destructive operations** — recursive deletion, destructive Git commands, and irreversible mutations require explicit authority.
|
|
179
|
-
9. **Codex forbidden rules** — known dangerous command patterns are denied before execution.
|
|
180
|
-
10. **Bounded GitHub deployment** — setup never implies push, and deployment is limited to the requested repository and branch.
|
|
181
|
-
11. **Apps, MCPs, and external tools** — integrations follow least privilege, read-only defaults, and explicit activation.
|
|
182
|
-
12. **Lifecycle and traceability** — Tasks, Changes, Executions, Runs, write scopes, tests, and evidence make mutations auditable.
|
|
183
|
-
13. **Autonomous runtime opt-in** — autonomous execution requires explicit project configuration and isolated worktrees.
|
|
184
|
-
14. **Integrity and regression tests** — managed files, adapters, configuration, and security rules are validated continuously.
|
|
185
|
-
|
|
186
|
-
## Residual limits
|
|
187
|
-
|
|
188
|
-
No policy can eliminate risk from compromised dependencies, trusted binaries, operating-system vulnerabilities, or a user intentionally authorizing a dangerous operation. Least privilege, backups, reviewable diffs, isolated credentials, and reversible rollout remain necessary.
|
|
189
|
-
|
|
190
|
-
## Safe operation
|
|
191
|
-
|
|
192
|
-
- Inspect the target and resolved path before recursive file operations.
|
|
193
|
-
- Keep credentials outside tracked files.
|
|
194
|
-
- Prefer focused, reversible commands.
|
|
195
|
-
- Review diffs before commit or deployment.
|
|
196
|
-
- Run doctor, integrity, and security checks after configuration changes.
|
|
197
|
-
- Stop when required authority or a safe rollback path is missing.
|
|
198
|
-
|
|
199
|
-
## Rollout and rollback
|
|
200
|
-
|
|
201
|
-
Roll out security changes in stages, validate on representative repositories, and preserve the previous known-good configuration. Rollback means restoring the prior managed policy, rebuilding adapters, rerunning integrity checks, and confirming that the workspace remains within its intended trust boundary.`,
|
|
202
|
-
"11-observabilidade-e-custos.md": `# Observability and costs
|
|
203
|
-
|
|
204
|
-
1. Select the Run by ID.
|
|
205
|
-
2. Check duration, tokens, cost, retries, and rework.
|
|
206
|
-
3. Compare planned acceptance with produced evidence.
|
|
207
|
-
4. Identify slow gates, excessive context, and repeated calls.
|
|
208
|
-
5. Aggregate trends without exposing sensitive prompts or secrets.
|
|
209
|
-
6. Turn recurring findings into a Rule, Requirement, or skill improvement.`,
|
|
210
|
-
"12-instalacao-e-upgrade.md": `# Installation and upgrade
|
|
211
|
-
|
|
212
|
-
1. Check the current version and whether local changes are clean or intentionally preserved.
|
|
213
|
-
2. Run doctor and integrity checks before changing anything.
|
|
214
|
-
3. Run a dry-run of installation, migration, or upgrade.
|
|
215
|
-
4. Review managed, public, and preserved files.
|
|
216
|
-
5. Apply the change, validate adapters, and run gates.
|
|
217
|
-
6. Test rollback and confirm the final version.
|
|
218
|
-
|
|
219
|
-
\`framework.lock.yaml\` is relevant to this flow; do not load it during ordinary work.`,
|
|
220
|
-
"13-boas-praticas.md": `# Best practices
|
|
221
|
-
|
|
222
|
-
- Start from the outcome and acceptance criteria, not the tool.
|
|
223
|
-
- Keep the domain independent from infrastructure.
|
|
224
|
-
- Make changes small, reversible, and traceable.
|
|
225
|
-
- Validate early with deterministic, focused tests.
|
|
226
|
-
- Prefer explicit configuration over hidden conventions.
|
|
227
|
-
- Load context on demand and preserve the token budget.
|
|
228
|
-
- Treat documentation, observability, and rollback as part of delivery.`,
|
|
229
|
-
"14-troubleshooting.md": `# Troubleshooting
|
|
230
|
-
|
|
231
|
-
1. Reproduce the problem with the smallest possible command.
|
|
232
|
-
2. Read the complete message and identify the first causal error.
|
|
233
|
-
3. Run doctor, focused validators, and \`git diff --check\`.
|
|
234
|
-
4. Check versions, paths, encoding, variables, and managed files.
|
|
235
|
-
5. Compare against runtime projections without scanning records.
|
|
236
|
-
6. Fix the cause, repeat the reproduction, and then run the full applicable gates.
|
|
237
|
-
|
|
238
|
-
For installation or integrity problems, consult \`framework.lock.yaml\`.`,
|
|
239
|
-
"15-tools-e-codex.md": `# Tools and Codex setup
|
|
240
|
-
|
|
241
|
-
1. Ask the agent to list or activate a tool; it uses the tool-setup skill.
|
|
242
|
-
2. The skill reads only the applicable catalog and manifest.
|
|
243
|
-
3. A trusted MCP is registered disabled and validated before activation.
|
|
244
|
-
4. An API without a trusted MCP uses the API-to-MCP workflow to generate a secure adapter.
|
|
245
|
-
5. Secrets are never pasted into chat; names belong in \`.agents/.env.example\` and values in ignored local storage.
|
|
246
|
-
6. Configuration changes must be reversible and preserve existing preferences.
|
|
247
|
-
|
|
248
|
-
Enable public, read-only, unauthenticated integrations by default, such as official documentation. Browser automation must be an explicit development-profile choice because it starts processes and expands the operational surface.
|
|
249
|
-
|
|
250
|
-
## Local MCP generated from an API
|
|
251
|
-
|
|
252
|
-
Model an \`adapter.yaml\` from official documentation, scaffold the local MCP, run its doctor, test read-only calls, generate a Codex preview, and apply only after review. The generated server uses STDIO, does not open a port, and blocks writes without explicit approval.
|
|
253
|
-
|
|
254
|
-
## OpenAI documentation
|
|
255
|
-
|
|
256
|
-
The default profile enables official OpenAI developer documentation without credentials and in read-only mode. Questions about OpenAI APIs, models, SDKs, Codex, or MCP should use the OpenAI docs skill and cite the consulted page.`,
|
|
257
|
-
};
|
|
258
|
-
|
|
259
11
|
export function buildHelpDocuments(
|
|
260
12
|
locale: DashboardLocale,
|
|
261
13
|
readme: string,
|
|
@@ -264,7 +16,13 @@ export function buildHelpDocuments(
|
|
|
264
16
|
const guides = Object.entries(guideSources)
|
|
265
17
|
.map(([path, source]) => {
|
|
266
18
|
const fileName = path.split("/").at(-1) ?? path;
|
|
267
|
-
|
|
19
|
+
// Guides currently have one canonical Portuguese source. Never substitute
|
|
20
|
+
// independently maintained summaries that can conceal changed contracts.
|
|
21
|
+
const content =
|
|
22
|
+
locale === "en-US"
|
|
23
|
+
? "> Language: Portuguese (pt-BR). Current canonical guide; an English translation is not available.\n\n" +
|
|
24
|
+
source
|
|
25
|
+
: source;
|
|
268
26
|
return { id: path, title: documentTitle(content, fileName), content };
|
|
269
27
|
})
|
|
270
28
|
.sort((a, b) => a.title.localeCompare(b.title, locale));
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export interface ProjectOverview {
|
|
2
2
|
framework_version: string | null;
|
|
3
|
-
installation
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
3
|
+
installation?: ProjectInstallationSummary;
|
|
4
|
+
installation_profile?: "full" | "dev-lite" | "lite" | "custom";
|
|
5
|
+
health?: { state: "healthy" | "degraded" | "unknown"; scope: "settings_runtime" };
|
|
6
|
+
dependencies?: ProjectInstallationDimension & { installed: number | null };
|
|
7
|
+
documentation?: ProjectInstallationDimension & { available: number | null };
|
|
9
8
|
metrics: Array<{
|
|
10
9
|
id: "agents" | "squads" | "skills" | "rules" | "hooks";
|
|
11
10
|
label: string;
|
|
@@ -29,6 +28,34 @@ export interface ProjectOverview {
|
|
|
29
28
|
| "sales_playbook";
|
|
30
29
|
label: string;
|
|
31
30
|
artifact: string;
|
|
32
|
-
available: boolean;
|
|
31
|
+
available: boolean | null;
|
|
33
32
|
}>;
|
|
34
33
|
}
|
|
34
|
+
|
|
35
|
+
export type ProjectInstallationState =
|
|
36
|
+
| "complete"
|
|
37
|
+
| "incomplete"
|
|
38
|
+
| "unknown"
|
|
39
|
+
| "unavailable"
|
|
40
|
+
| "not_applicable";
|
|
41
|
+
|
|
42
|
+
export interface ProjectInstallationDimension {
|
|
43
|
+
applicable: number | null;
|
|
44
|
+
missing: number | null;
|
|
45
|
+
unknown: number | null;
|
|
46
|
+
not_applicable: number | null;
|
|
47
|
+
percent: number | null;
|
|
48
|
+
state?: ProjectInstallationState;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** New fields are optional while older dashboard runtimes are still supported. */
|
|
52
|
+
export interface ProjectInstallationSummary {
|
|
53
|
+
/** @deprecated Legacy aggregate; it must never be interpreted as dependency health. */
|
|
54
|
+
completed?: number;
|
|
55
|
+
/** @deprecated Legacy aggregate; it must never be interpreted as dependency health. */
|
|
56
|
+
total?: number;
|
|
57
|
+
/** @deprecated Legacy aggregate; it must never be interpreted as dependency health. */
|
|
58
|
+
percent?: number;
|
|
59
|
+
/** @deprecated Legacy aggregate; it must never be interpreted as dependency health. */
|
|
60
|
+
state?: "complete" | "incomplete";
|
|
61
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { afterEach, expect, it, vi } from "vitest";
|
|
2
|
+
import { createDashboardViewSelector } from "./dashboard-view-actions.js";
|
|
3
|
+
|
|
4
|
+
afterEach(() => vi.unstubAllGlobals());
|
|
5
|
+
|
|
6
|
+
function fixture(controller: AbortController | null) {
|
|
7
|
+
vi.stubGlobal("window", { scrollTo: vi.fn() });
|
|
8
|
+
const input: Parameters<typeof createDashboardViewSelector>[0] = {
|
|
9
|
+
setDashboardView: vi.fn(),
|
|
10
|
+
costsLoadedRef: { current: false },
|
|
11
|
+
currency: "BRL",
|
|
12
|
+
costs: null,
|
|
13
|
+
loadCostSummary: vi.fn(async () => undefined),
|
|
14
|
+
costSummaryAbortRef: { current: controller },
|
|
15
|
+
traceTasks: [],
|
|
16
|
+
boardRequestVersionRef: { current: 0 },
|
|
17
|
+
loadMoreTraceTasks: vi.fn(async () => []),
|
|
18
|
+
setTraceTasks: vi.fn(),
|
|
19
|
+
setSelectedTraceTaskId: vi.fn(),
|
|
20
|
+
openTrace: vi.fn(async () => undefined),
|
|
21
|
+
setTrace: vi.fn(),
|
|
22
|
+
setTraceLoadingTaskId: vi.fn(),
|
|
23
|
+
};
|
|
24
|
+
return input;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
it("joins the active summary when navigation and the automatic load coincide", async () => {
|
|
28
|
+
const controller = new AbortController();
|
|
29
|
+
const input = fixture(controller);
|
|
30
|
+
await createDashboardViewSelector(input)("cost-monitor");
|
|
31
|
+
expect(input.loadCostSummary).not.toHaveBeenCalled();
|
|
32
|
+
expect(controller.signal.aborted).toBe(false);
|
|
33
|
+
expect(input.setDashboardView).toHaveBeenCalledWith("cost-monitor");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("permits a retry after failure cleanup and an explicitly aborted prior request", async () => {
|
|
37
|
+
const input = fixture(null);
|
|
38
|
+
await createDashboardViewSelector(input)("cost-monitor");
|
|
39
|
+
expect(input.loadCostSummary).toHaveBeenCalledTimes(1);
|
|
40
|
+
const controller = new AbortController();
|
|
41
|
+
controller.abort();
|
|
42
|
+
input.costSummaryAbortRef.current = controller;
|
|
43
|
+
await createDashboardViewSelector(input)("cost-monitor");
|
|
44
|
+
expect(input.loadCostSummary).toHaveBeenCalledTimes(2);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("still aborts the request when leaving Cost Monitor", async () => {
|
|
48
|
+
const controller = new AbortController();
|
|
49
|
+
await createDashboardViewSelector(fixture(controller))("operations");
|
|
50
|
+
expect(controller.signal.aborted).toBe(true);
|
|
51
|
+
});
|
|
@@ -35,7 +35,9 @@ export function createDashboardViewSelector<T extends TraceTask>(input: Dashboar
|
|
|
35
35
|
costsLoaded: input.costsLoadedRef.current,
|
|
36
36
|
currency: input.currency,
|
|
37
37
|
snapshotCurrency: input.costs?.currency,
|
|
38
|
-
})
|
|
38
|
+
}) &&
|
|
39
|
+
(input.costSummaryAbortRef.current === null ||
|
|
40
|
+
input.costSummaryAbortRef.current.signal.aborted)
|
|
39
41
|
)
|
|
40
42
|
void input.loadCostSummary();
|
|
41
43
|
} else {
|
|
@@ -43,6 +43,41 @@ function renderPeriod(preset: "today" | "yesterday", loading = false) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
describe("App-owned Operations period render", () => {
|
|
46
|
+
it("renders factual All Time dates while a bounded selection ignores arriving coverage", () => {
|
|
47
|
+
const render = (preset: "all" | "this-month", firstDay: string) =>
|
|
48
|
+
renderToStaticMarkup(
|
|
49
|
+
createElement(OperationsPage, {
|
|
50
|
+
capabilityNavigation: createElement("span"),
|
|
51
|
+
data,
|
|
52
|
+
datePreset: preset,
|
|
53
|
+
dateRange: { start: "2026-09-01", end: "2026-09-10" },
|
|
54
|
+
loading: false,
|
|
55
|
+
currency: "BRL",
|
|
56
|
+
locale: "pt-BR",
|
|
57
|
+
onDateChange: vi.fn(),
|
|
58
|
+
onLocaleChange: vi.fn(),
|
|
59
|
+
onOpenDocument: vi.fn(),
|
|
60
|
+
onOpenTask: vi.fn(async () => false),
|
|
61
|
+
onPriorityChange: vi.fn(async () => undefined),
|
|
62
|
+
onRefresh: vi.fn(),
|
|
63
|
+
factualCostPeriods: {
|
|
64
|
+
day: [firstDay, "2026-09-10"].map((key) => ({
|
|
65
|
+
key,
|
|
66
|
+
estimated_usd: null,
|
|
67
|
+
estimated_brl: 0,
|
|
68
|
+
duration_ms: null,
|
|
69
|
+
})),
|
|
70
|
+
},
|
|
71
|
+
}),
|
|
72
|
+
);
|
|
73
|
+
expect(render("all", "2026-06-02")).toContain('value="2026-06-02"');
|
|
74
|
+
expect(render("all", "2026-07-04")).toContain('value="2026-07-04"');
|
|
75
|
+
const bounded = render("this-month", "2026-06-02");
|
|
76
|
+
expect(bounded).toContain('value="2026-09-01"');
|
|
77
|
+
expect(bounded).not.toContain('value="2026-06-02"');
|
|
78
|
+
expect(bounded).toContain('option value="this-month" selected=""');
|
|
79
|
+
});
|
|
80
|
+
|
|
46
81
|
it("renders Today then Yesterday while loading omits duplicated period controls", () => {
|
|
47
82
|
const today = renderPeriod("today");
|
|
48
83
|
const yesterdayLoading = renderPeriod("yesterday", true);
|