@zaip-ai/cli 2.6.0 → 3.1.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 +75 -10
- package/templates/.agents/README.md +76 -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 +274 -138
- 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-DIWDmvAS.js} +930 -550
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-DEbCi1gP.js → PricingSettingsDialog-BBRBKaHa.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-C9dDhj34.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-CoAVMZN6.js +828 -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-BVzw_Wux.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 +279 -245
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +247 -215
- 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 +279 -245
- 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-calendar.ts +17 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cold-parse.test.ts +78 -0
- 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-cost-group-projection.test.ts +94 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-group-projection.ts +5 -5
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-duration-lookup.test.ts +59 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-entity-label-views.test.ts +72 -0
- 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 +4 -5
- 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-entity-group.test.ts +171 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-entity-group.ts +36 -16
- 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-canonical-parsing.ts +7 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical.ts +5 -15
- 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 +11 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-schema.ts +5 -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 +29 -16
- 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-github-deploy/references/release-identity.md +17 -12
- 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 +24 -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 +72 -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 +454 -274
- 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
|
@@ -13,7 +13,7 @@ export async function captureActiveCodexTelemetry(workspaceRoot: string): Promis
|
|
|
13
13
|
const cliPath = resolve(workspaceRoot, ".agents", "runtime", "bin", "zaip.mjs");
|
|
14
14
|
await execFileAsync(
|
|
15
15
|
process.execPath,
|
|
16
|
-
[cliPath, "run", "usage", "--active", "--disable-codex-raw", "--json"],
|
|
16
|
+
[cliPath, "run", "usage", "--active", "--limit", "1", "--disable-codex-raw", "--json"],
|
|
17
17
|
{
|
|
18
18
|
cwd: workspaceRoot,
|
|
19
19
|
encoding: "utf8",
|
package/templates/.agents/dashboard/packages/local-runtime/src/project-installation-summary.test.ts
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { WorkspaceFileSystem } from "@zaip-ai/core";
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import {
|
|
4
|
+
PROJECT_INSTALLATION_AREA_REQUIREMENTS,
|
|
5
|
+
PROJECT_INSTALLATION_STACK_REQUIREMENTS,
|
|
6
|
+
readDocumentAvailability,
|
|
7
|
+
summarizeProjectStatus,
|
|
8
|
+
} from "./project-installation-summary.js";
|
|
9
|
+
import type { ProjectOverview } from "./project-settings.js";
|
|
10
|
+
|
|
11
|
+
function stack(): ProjectOverview["stack_components"] {
|
|
12
|
+
return PROJECT_INSTALLATION_STACK_REQUIREMENTS.map((name) => ({
|
|
13
|
+
name,
|
|
14
|
+
version: "1.0.0",
|
|
15
|
+
configured_version: "1.0.0",
|
|
16
|
+
source: "local",
|
|
17
|
+
verification: "exact",
|
|
18
|
+
installation: "installed",
|
|
19
|
+
probe: "verified",
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
function docs(available: boolean | null): ProjectOverview["areas"] {
|
|
23
|
+
return PROJECT_INSTALLATION_AREA_REQUIREMENTS.map((id) => ({
|
|
24
|
+
id,
|
|
25
|
+
label: id,
|
|
26
|
+
artifact: id,
|
|
27
|
+
available,
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe("project status dimensions", () => {
|
|
32
|
+
it("reports 100% technical installation with 10 dependencies and zero of six documents", () => {
|
|
33
|
+
expect(summarizeProjectStatus("full", stack(), docs(false), "healthy")).toMatchObject({
|
|
34
|
+
health: { state: "healthy", scope: "settings_runtime" },
|
|
35
|
+
dependencies: { applicable: 10, installed: 10, percent: 100, state: "complete" },
|
|
36
|
+
documentation: { applicable: 6, available: 0, missing: 6, percent: 0, state: "incomplete" },
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("does not infer runtime health from dependencies or documents", () => {
|
|
41
|
+
expect(summarizeProjectStatus("full", stack(), docs(true)).health.state).toBe("unknown");
|
|
42
|
+
const components = stack();
|
|
43
|
+
components[0] = { ...components[0]!, version: null, probe: "missing", installation: "missing" };
|
|
44
|
+
const result = summarizeProjectStatus("full", components, docs(true), "healthy");
|
|
45
|
+
expect(result.health.state).toBe("healthy");
|
|
46
|
+
expect(result.dependencies).toMatchObject({ missing: 1, percent: 90, state: "incomplete" });
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("preserves unknown probes and absent or duplicate snapshot entries", () => {
|
|
50
|
+
const components = stack();
|
|
51
|
+
components[1] = {
|
|
52
|
+
...components[1]!,
|
|
53
|
+
version: null,
|
|
54
|
+
verification: "unavailable",
|
|
55
|
+
probe: "unknown",
|
|
56
|
+
};
|
|
57
|
+
expect(summarizeProjectStatus("full", components, docs(null)).dependencies).toMatchObject({
|
|
58
|
+
installed: 9,
|
|
59
|
+
missing: 0,
|
|
60
|
+
unknown: 1,
|
|
61
|
+
percent: null,
|
|
62
|
+
state: "unknown",
|
|
63
|
+
});
|
|
64
|
+
expect(summarizeProjectStatus("full", [], []).dependencies).toMatchObject({
|
|
65
|
+
installed: 0,
|
|
66
|
+
missing: 0,
|
|
67
|
+
unknown: 10,
|
|
68
|
+
percent: null,
|
|
69
|
+
state: "unknown",
|
|
70
|
+
});
|
|
71
|
+
expect(
|
|
72
|
+
summarizeProjectStatus("full", [...stack(), stack()[0]!], docs(true)).dependencies.unknown,
|
|
73
|
+
).toBe(1);
|
|
74
|
+
expect(summarizeProjectStatus("full", stack(), docs(null)).documentation).toMatchObject({
|
|
75
|
+
available: 0,
|
|
76
|
+
missing: 0,
|
|
77
|
+
unknown: 6,
|
|
78
|
+
percent: null,
|
|
79
|
+
state: "unknown",
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("excludes only dependencies declared in lite or dev-lite profiles", () => {
|
|
84
|
+
const components = stack();
|
|
85
|
+
components[1] = {
|
|
86
|
+
...components[1]!,
|
|
87
|
+
version: null,
|
|
88
|
+
verification: "unavailable",
|
|
89
|
+
probe: "unknown",
|
|
90
|
+
};
|
|
91
|
+
expect(summarizeProjectStatus("lite", components, docs(false)).dependencies).toMatchObject({
|
|
92
|
+
applicable: 2,
|
|
93
|
+
installed: 2,
|
|
94
|
+
unknown: 0,
|
|
95
|
+
not_applicable: 8,
|
|
96
|
+
percent: 100,
|
|
97
|
+
});
|
|
98
|
+
expect(summarizeProjectStatus("dev-lite", components, docs(false)).dependencies).toMatchObject({
|
|
99
|
+
applicable: 9,
|
|
100
|
+
installed: 8,
|
|
101
|
+
unknown: 1,
|
|
102
|
+
not_applicable: 1,
|
|
103
|
+
percent: null,
|
|
104
|
+
});
|
|
105
|
+
expect(summarizeProjectStatus("custom", components, docs(false))).toMatchObject({
|
|
106
|
+
dependencies: {
|
|
107
|
+
applicable: null,
|
|
108
|
+
installed: null,
|
|
109
|
+
not_applicable: null,
|
|
110
|
+
percent: null,
|
|
111
|
+
state: "unknown",
|
|
112
|
+
},
|
|
113
|
+
documentation: { applicable: null, available: null, percent: null, state: "unknown" },
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it("distinguishes absent documents from failed probes without converting unavailable into false", async () => {
|
|
118
|
+
const filesystem = (readText: () => Promise<string>) =>
|
|
119
|
+
({ readText }) as unknown as WorkspaceFileSystem;
|
|
120
|
+
expect(
|
|
121
|
+
await readDocumentAvailability(
|
|
122
|
+
filesystem(async () => " "),
|
|
123
|
+
"doc.md",
|
|
124
|
+
),
|
|
125
|
+
).toBe(false);
|
|
126
|
+
expect(
|
|
127
|
+
await readDocumentAvailability(
|
|
128
|
+
filesystem(async () => "content"),
|
|
129
|
+
"doc.md",
|
|
130
|
+
),
|
|
131
|
+
).toBe(true);
|
|
132
|
+
for (const code of ["ENOENT", "EACCES", "EIO"]) {
|
|
133
|
+
const result = await readDocumentAvailability(
|
|
134
|
+
filesystem(async () => {
|
|
135
|
+
throw Object.assign(new Error(code), { code });
|
|
136
|
+
}),
|
|
137
|
+
"doc.md",
|
|
138
|
+
);
|
|
139
|
+
expect(result).toBe(code === "ENOENT" ? false : null);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
package/templates/.agents/dashboard/packages/local-runtime/src/project-installation-summary.ts
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import type { ProjectConfig, WorkspaceFileSystem } from "@zaip-ai/core";
|
|
2
|
+
import type { ProjectOverview } from "./project-settings.js";
|
|
3
|
+
|
|
4
|
+
export const PROJECT_INSTALLATION_STACK_REQUIREMENTS = [
|
|
5
|
+
"Node.js",
|
|
6
|
+
"TypeScript",
|
|
7
|
+
"Vite",
|
|
8
|
+
"Astro",
|
|
9
|
+
"Redis",
|
|
10
|
+
"BullMQ",
|
|
11
|
+
"Hono",
|
|
12
|
+
"React",
|
|
13
|
+
"Git",
|
|
14
|
+
"Terraform",
|
|
15
|
+
] as const;
|
|
16
|
+
export const PROJECT_INSTALLATION_AREA_REQUIREMENTS = [
|
|
17
|
+
"software_architecture",
|
|
18
|
+
"design_system",
|
|
19
|
+
"brandbook",
|
|
20
|
+
"marketing_strategy",
|
|
21
|
+
"sales_playbook",
|
|
22
|
+
"growth_strategy",
|
|
23
|
+
] as const;
|
|
24
|
+
export const PROJECT_INSTALLATION_TOTAL =
|
|
25
|
+
PROJECT_INSTALLATION_STACK_REQUIREMENTS.length + PROJECT_INSTALLATION_AREA_REQUIREMENTS.length;
|
|
26
|
+
|
|
27
|
+
export type InstallationProfile = "full" | "dev-lite" | "lite" | "custom";
|
|
28
|
+
type StatusState = "complete" | "incomplete" | "unknown" | "not_applicable";
|
|
29
|
+
type Dimension = {
|
|
30
|
+
applicable: number | null;
|
|
31
|
+
missing: number | null;
|
|
32
|
+
unknown: number | null;
|
|
33
|
+
not_applicable: number | null;
|
|
34
|
+
percent: number | null;
|
|
35
|
+
state: StatusState;
|
|
36
|
+
};
|
|
37
|
+
export type ProjectStatusSummary = {
|
|
38
|
+
installation_profile: InstallationProfile;
|
|
39
|
+
health: { state: "healthy" | "degraded" | "unknown"; scope: "settings_runtime" };
|
|
40
|
+
dependencies: Dimension & { installed: number | null };
|
|
41
|
+
documentation: Dimension & { available: number | null };
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export function installationProfile(project: ProjectConfig): InstallationProfile {
|
|
45
|
+
const value = project.stack.overrides.installation_profile;
|
|
46
|
+
return value === "full" || value === "dev-lite" || value === "lite" ? value : "custom";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export async function readDocumentAvailability(
|
|
50
|
+
filesystem: WorkspaceFileSystem,
|
|
51
|
+
path: string,
|
|
52
|
+
): Promise<boolean | null> {
|
|
53
|
+
try {
|
|
54
|
+
return (await filesystem.readText(path)).trim().length > 0;
|
|
55
|
+
} catch (error) {
|
|
56
|
+
return (error as NodeJS.ErrnoException).code === "ENOENT" ? false : null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Health is an observed runtime result, never a synonym for dependency/document completeness. */
|
|
61
|
+
export function summarizeProjectStatus(
|
|
62
|
+
profile: InstallationProfile,
|
|
63
|
+
stack: ProjectOverview["stack_components"],
|
|
64
|
+
areas: ProjectOverview["areas"],
|
|
65
|
+
runtimeHealth: ProjectStatusSummary["health"]["state"] = "unknown",
|
|
66
|
+
): ProjectStatusSummary {
|
|
67
|
+
const health = { state: runtimeHealth, scope: "settings_runtime" as const };
|
|
68
|
+
if (profile === "custom") {
|
|
69
|
+
// Undeclared/custom applicability is unknown, not an exemption or zero-percent installation.
|
|
70
|
+
const unknown: Dimension = {
|
|
71
|
+
applicable: null,
|
|
72
|
+
missing: null,
|
|
73
|
+
unknown: null,
|
|
74
|
+
not_applicable: null,
|
|
75
|
+
percent: null,
|
|
76
|
+
state: "unknown",
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
installation_profile: profile,
|
|
80
|
+
health,
|
|
81
|
+
dependencies: { ...unknown, installed: null },
|
|
82
|
+
documentation: { ...unknown, available: null },
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
const required: readonly string[] =
|
|
86
|
+
profile === "full"
|
|
87
|
+
? PROJECT_INSTALLATION_STACK_REQUIREMENTS
|
|
88
|
+
: profile === "dev-lite"
|
|
89
|
+
? PROJECT_INSTALLATION_STACK_REQUIREMENTS.filter((name) => name !== "Terraform")
|
|
90
|
+
: ["Node.js", "Git"];
|
|
91
|
+
let installed = 0,
|
|
92
|
+
missing = 0,
|
|
93
|
+
unknown = 0;
|
|
94
|
+
for (const name of required) {
|
|
95
|
+
const matches = stack.filter((component) => component.name === name);
|
|
96
|
+
const component = matches.length === 1 ? matches[0] : undefined;
|
|
97
|
+
if (component && isInstalledLocalRequirement(component) && component.probe !== "unknown")
|
|
98
|
+
installed++;
|
|
99
|
+
else if (component?.probe === "missing") missing++;
|
|
100
|
+
else unknown++;
|
|
101
|
+
}
|
|
102
|
+
let available = 0,
|
|
103
|
+
missingDocs = 0,
|
|
104
|
+
unknownDocs = 0;
|
|
105
|
+
for (const id of PROJECT_INSTALLATION_AREA_REQUIREMENTS) {
|
|
106
|
+
const matches = areas.filter((area) => area.id === id);
|
|
107
|
+
const availability = matches.length === 1 ? matches[0]?.available : null;
|
|
108
|
+
if (availability === true) available++;
|
|
109
|
+
else if (availability === false) missingDocs++;
|
|
110
|
+
else unknownDocs++;
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
installation_profile: profile,
|
|
114
|
+
health,
|
|
115
|
+
dependencies: {
|
|
116
|
+
...dimension(
|
|
117
|
+
required.length,
|
|
118
|
+
installed,
|
|
119
|
+
missing,
|
|
120
|
+
unknown,
|
|
121
|
+
PROJECT_INSTALLATION_STACK_REQUIREMENTS.length - required.length,
|
|
122
|
+
),
|
|
123
|
+
installed,
|
|
124
|
+
},
|
|
125
|
+
documentation: {
|
|
126
|
+
...dimension(
|
|
127
|
+
PROJECT_INSTALLATION_AREA_REQUIREMENTS.length,
|
|
128
|
+
available,
|
|
129
|
+
missingDocs,
|
|
130
|
+
unknownDocs,
|
|
131
|
+
0,
|
|
132
|
+
),
|
|
133
|
+
available,
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function dimension(
|
|
139
|
+
applicable: number,
|
|
140
|
+
complete: number,
|
|
141
|
+
missing: number,
|
|
142
|
+
unknown: number,
|
|
143
|
+
excluded: number,
|
|
144
|
+
): Dimension {
|
|
145
|
+
return {
|
|
146
|
+
applicable,
|
|
147
|
+
missing,
|
|
148
|
+
unknown,
|
|
149
|
+
not_applicable: excluded,
|
|
150
|
+
percent: applicable > 0 && unknown === 0 ? (complete / applicable) * 100 : null,
|
|
151
|
+
state:
|
|
152
|
+
applicable === 0
|
|
153
|
+
? "not_applicable"
|
|
154
|
+
: unknown > 0
|
|
155
|
+
? "unknown"
|
|
156
|
+
: missing > 0
|
|
157
|
+
? "incomplete"
|
|
158
|
+
: "complete",
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** Transitional legacy field; new consumers use the independent dimensions above. */
|
|
163
|
+
export function summarizeProjectInstallation(
|
|
164
|
+
stack: ProjectOverview["stack_components"],
|
|
165
|
+
areas: ProjectOverview["areas"],
|
|
166
|
+
): ProjectOverview["installation"] {
|
|
167
|
+
const completed =
|
|
168
|
+
PROJECT_INSTALLATION_STACK_REQUIREMENTS.filter((name) =>
|
|
169
|
+
stack.some((component) => component.name === name && isInstalledLocalRequirement(component)),
|
|
170
|
+
).length +
|
|
171
|
+
PROJECT_INSTALLATION_AREA_REQUIREMENTS.filter((id) =>
|
|
172
|
+
areas.some((area) => area.id === id && area.available === true),
|
|
173
|
+
).length;
|
|
174
|
+
return {
|
|
175
|
+
completed,
|
|
176
|
+
total: PROJECT_INSTALLATION_TOTAL,
|
|
177
|
+
percent: (completed / PROJECT_INSTALLATION_TOTAL) * 100,
|
|
178
|
+
state: completed === PROJECT_INSTALLATION_TOTAL ? "complete" : "incomplete",
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function isInstalledLocalRequirement(
|
|
183
|
+
component: ProjectOverview["stack_components"][number],
|
|
184
|
+
): boolean {
|
|
185
|
+
return (
|
|
186
|
+
component.verification === "exact" &&
|
|
187
|
+
component.version !== null &&
|
|
188
|
+
(component.installation === "runtime" || component.installation === "installed")
|
|
189
|
+
);
|
|
190
|
+
}
|
|
@@ -126,6 +126,27 @@ async function fixtureProject() {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
describe("project settings persistence", () => {
|
|
129
|
+
it.each([
|
|
130
|
+
"essential",
|
|
131
|
+
"balanced",
|
|
132
|
+
"persistent",
|
|
133
|
+
] as const)("round-trips autonomy %s through project YAML", async (preset) => {
|
|
134
|
+
const { filesystem } = await fixtureProject();
|
|
135
|
+
const current = await readProjectSettings(filesystem);
|
|
136
|
+
const autonomy = { version: 1 as const, preset };
|
|
137
|
+
const saved = await persistProjectSettings(filesystem, { ...current, autonomy });
|
|
138
|
+
expect(saved.autonomy).toEqual(autonomy);
|
|
139
|
+
expect((await readProjectSettings(filesystem)).autonomy).toEqual(autonomy);
|
|
140
|
+
expect(saved.assurance).toEqual(current.assurance);
|
|
141
|
+
const before = await filesystem.readText(PROJECT_CONFIG_PATH);
|
|
142
|
+
await expect(
|
|
143
|
+
persistProjectSettings(filesystem, {
|
|
144
|
+
...saved,
|
|
145
|
+
autonomy: { version: 1, preset: "invented" },
|
|
146
|
+
}),
|
|
147
|
+
).rejects.toThrow();
|
|
148
|
+
expect(await filesystem.readText(PROJECT_CONFIG_PATH)).toBe(before);
|
|
149
|
+
});
|
|
129
150
|
it("uses the canonical lowercase architecture artifact path", () => {
|
|
130
151
|
expect(SOFTWARE_ARCHITECTURE_PATH).toBe(".agents/architecture/software-architecture.md");
|
|
131
152
|
});
|
|
@@ -405,6 +426,26 @@ describe("project settings persistence", () => {
|
|
|
405
426
|
expect(overview).toEqual({
|
|
406
427
|
framework_version: "1.2.3",
|
|
407
428
|
installation: expect.objectContaining({ total: 16, state: "incomplete" }),
|
|
429
|
+
installation_profile: "custom",
|
|
430
|
+
health: { state: "healthy", scope: "settings_runtime" },
|
|
431
|
+
dependencies: {
|
|
432
|
+
applicable: null,
|
|
433
|
+
installed: null,
|
|
434
|
+
missing: null,
|
|
435
|
+
unknown: null,
|
|
436
|
+
not_applicable: null,
|
|
437
|
+
percent: null,
|
|
438
|
+
state: "unknown",
|
|
439
|
+
},
|
|
440
|
+
documentation: {
|
|
441
|
+
applicable: null,
|
|
442
|
+
available: null,
|
|
443
|
+
missing: null,
|
|
444
|
+
unknown: null,
|
|
445
|
+
not_applicable: null,
|
|
446
|
+
percent: null,
|
|
447
|
+
state: "unknown",
|
|
448
|
+
},
|
|
408
449
|
metrics: [
|
|
409
450
|
expect.objectContaining({ id: "agents", value: 3 }),
|
|
410
451
|
expect.objectContaining({ id: "squads", value: 2 }),
|
|
@@ -485,6 +526,7 @@ describe("project settings persistence", () => {
|
|
|
485
526
|
source: "local",
|
|
486
527
|
verification: "exact" as const,
|
|
487
528
|
installation: "installed" as const,
|
|
529
|
+
probe: "verified" as const,
|
|
488
530
|
}),
|
|
489
531
|
);
|
|
490
532
|
const areas: ProjectOverview["areas"] = [
|
|
@@ -523,6 +565,29 @@ describe("project settings persistence", () => {
|
|
|
523
565
|
});
|
|
524
566
|
});
|
|
525
567
|
|
|
568
|
+
it("uses only stack.overrides.installation_profile, never stack.id, for applicability", async () => {
|
|
569
|
+
const { filesystem } = await fixtureProject();
|
|
570
|
+
expect((await readProjectOverview(filesystem)).installation_profile).toBe("custom");
|
|
571
|
+
|
|
572
|
+
const current = await readProjectSettings(filesystem);
|
|
573
|
+
await filesystem.writeTextAtomic(
|
|
574
|
+
PROJECT_CONFIG_PATH,
|
|
575
|
+
serializeYaml({
|
|
576
|
+
...current,
|
|
577
|
+
stack: {
|
|
578
|
+
...current.stack,
|
|
579
|
+
overrides: { ...current.stack.overrides, installation_profile: "lite" },
|
|
580
|
+
},
|
|
581
|
+
}),
|
|
582
|
+
);
|
|
583
|
+
|
|
584
|
+
expect(await readProjectOverview(filesystem)).toMatchObject({
|
|
585
|
+
installation_profile: "lite",
|
|
586
|
+
dependencies: { applicable: 2, not_applicable: 8 },
|
|
587
|
+
documentation: { applicable: 6 },
|
|
588
|
+
});
|
|
589
|
+
});
|
|
590
|
+
|
|
526
591
|
it("reports the project-local installed version separately from configured stack versions", async () => {
|
|
527
592
|
const { filesystem } = await fixtureProject();
|
|
528
593
|
const current = await readProjectSettings(filesystem);
|