@zaip-ai/cli 3.7.0 → 4.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 +5 -5
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +6 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.d.ts.map +1 -1
- package/dist/services/adapters.js +22 -4
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/adapters.test.js +24 -0
- package/dist/services/adapters.test.js.map +1 -1
- package/dist/services/agent-adapters.js +1 -1
- package/dist/services/agent-adapters.js.map +1 -1
- package/dist/services/backup-gitignore.d.ts +9 -0
- package/dist/services/backup-gitignore.d.ts.map +1 -0
- package/dist/services/backup-gitignore.js +66 -0
- package/dist/services/backup-gitignore.js.map +1 -0
- package/dist/services/backup-gitignore.test.d.ts +2 -0
- package/dist/services/backup-gitignore.test.d.ts.map +1 -0
- package/dist/services/backup-gitignore.test.js +27 -0
- package/dist/services/backup-gitignore.test.js.map +1 -0
- package/dist/services/codex-conversation-lifecycle-hook.d.ts.map +1 -1
- package/dist/services/codex-conversation-lifecycle-hook.js +15 -7
- package/dist/services/codex-conversation-lifecycle-hook.js.map +1 -1
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +43 -127
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/install-template-policy.d.ts.map +1 -1
- package/dist/services/install-template-policy.js +2 -0
- package/dist/services/install-template-policy.js.map +1 -1
- package/dist/services/legacy-records-migration.d.ts +15 -0
- package/dist/services/legacy-records-migration.d.ts.map +1 -0
- package/dist/services/legacy-records-migration.js +109 -0
- package/dist/services/legacy-records-migration.js.map +1 -0
- package/dist/services/local-state-migration.d.ts +8 -1
- package/dist/services/local-state-migration.d.ts.map +1 -1
- package/dist/services/local-state-migration.js +67 -32
- package/dist/services/local-state-migration.js.map +1 -1
- package/dist/services/logger.d.ts.map +1 -1
- package/dist/services/logger.js +2 -0
- package/dist/services/logger.js.map +1 -1
- package/dist/services/project-model-migration.d.ts +3 -0
- package/dist/services/project-model-migration.d.ts.map +1 -0
- package/dist/services/project-model-migration.js +163 -0
- package/dist/services/project-model-migration.js.map +1 -0
- package/dist/services/project-model-migration.test.d.ts +2 -0
- package/dist/services/project-model-migration.test.d.ts.map +1 -0
- package/dist/services/project-model-migration.test.js +62 -0
- package/dist/services/project-model-migration.test.js.map +1 -0
- package/dist/services/sqlite-bootstrap.d.ts.map +1 -1
- package/dist/services/sqlite-bootstrap.js +9 -1
- package/dist/services/sqlite-bootstrap.js.map +1 -1
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +2 -0
- package/dist/services/template-manifest.js.map +1 -1
- package/dist/services/transactional-files.d.ts +1 -0
- package/dist/services/transactional-files.d.ts.map +1 -1
- package/dist/services/transactional-files.js +3 -0
- package/dist/services/transactional-files.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/README-ENG.md +90 -34
- package/templates/.agents/README.md +59 -32
- package/templates/.agents/config/agents/catalog.yaml +23 -23
- package/templates/.agents/config/agents/discovery.json +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +3 -3
- package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +2 -2
- package/templates/.agents/config/clients.yaml +1 -1
- package/templates/.agents/config/pricing/models.json +57 -1
- package/templates/.agents/config/project.yaml +21 -7
- package/templates/.agents/dashboard/.zaip-managed.json +195 -115
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-C5NgEcVh.js → CostCalculationGuidePage-f4ZGJRg3.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-BDQR0U4a.js → DashboardHelpDialog-DlN5EMmD.js} +249 -136
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-CGYcJ5EB.js → PricingSettingsDialog-v9zGRTlk.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-BRdoeTWk.js +3 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-Ckxk_izu.js → TraceabilityWorkspace-B_5u4Xnp.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{cost-monitor-BsMfGfQi.css → cost-monitor-C2AFYBu_.css} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-D7PrDZy9.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{dashboard-localization-jvdDfNKs.js → dashboard-localization-CF7B1Hjn.js} +90 -34
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-x8xxL9yW.js → icons-vendor-Cv3WBFIF.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-C4rLXrz_.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-CNOXIJHN.js → react-vendor-mHgsmxb6.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-CcpbpT1s.js → traceability-B0CPyEVq.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +6 -6
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/AppDashboardContent.tsx +11 -1
- package/templates/.agents/dashboard/apps/frontend/src/AppLoadingBoundary.tsx +3 -2
- package/templates/.agents/dashboard/apps/frontend/src/AppLoadingPanels.tsx +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/AppOverlays.tsx +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +9 -13
- package/templates/.agents/dashboard/apps/frontend/src/cost-monitor-population.test.tsx +4 -2
- package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +9 -5
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-settings.ts +3 -2
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +2 -2
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-identity.test.ts +3 -3
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-identity.ts +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.test.ts +2 -1
- package/templates/.agents/dashboard/apps/frontend/src/operations-period-render.test.ts +40 -3
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +12 -1
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +19 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.test.ts +3 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-dashboard-app-model.tsx +14 -23
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.test.ts +3 -3
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.tsx +2 -3
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostDeveloperAttributionTable.tsx +2 -6
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostGroupsTable.period-values.test.tsx +66 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostGroupsTable.tsx +29 -34
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorContent.tsx +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.embedded.test.ts +11 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +1 -13
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostPeriodAverageCards.test.tsx +23 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostPeriodAverageCards.tsx +2 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableDisplay.ts +6 -11
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables-keeps-legacy-codex-identity-fields-blank.test.ts +6 -6
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +10 -12
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-group-page-totals.ts +23 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-group-period-values.tsx +34 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-embedded.css +0 -7
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-table-formatters.ts +4 -9
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-table-presentation.ts +2 -3
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/DeveloperAttributionPanel.tsx +2 -12
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.helpers.tsx +2 -2
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +1 -6
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +34 -36
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewCharts.tsx +12 -3
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewTopPanel.tsx +12 -14
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +4 -4
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageOverview.tsx +23 -4
- package/templates/.agents/dashboard/modules/operations/src/react/OverviewCostKpi.tsx +30 -2
- package/templates/.agents/dashboard/modules/operations/src/react/TaskDetailsDialog.tsx +2 -13
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.priority.test.ts +8 -1
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.tsx +8 -16
- package/templates/.agents/dashboard/modules/operations/src/react/WorkColumnState.tsx +34 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.test.ts +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.ts +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-average-unmeasured.test.ts +10 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-content-visibility.ts +3 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-coverage-toast.test.ts +4 -3
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +12 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-page-contract.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-skeleton.css +80 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations.css +2 -11
- package/templates/.agents/dashboard/modules/operations/src/react/overview-cost-card.test.tsx +36 -0
- package/templates/.agents/dashboard/modules/operations/src/react/overview-metric-format.test.ts +11 -0
- package/templates/.agents/dashboard/modules/operations/src/react/overview-metric-format.ts +28 -3
- package/templates/.agents/dashboard/modules/operations/src/react/overview-metric-stats.ts +44 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-card-label.ts +5 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-column-state.ts +11 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-item-filter.ts +13 -0
- 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 +173 -173
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +120 -120
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +173 -173
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.test.ts +31 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.ts +74 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/agent-catalog-settings.test.ts +15 -15
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +2 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server-identity.test.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.test.ts +25 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +51 -16
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server-ui-security.ts +37 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +11 -33
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuild.ts +12 -13
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.test.ts +71 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +141 -25
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-worktree-sources.test.ts +60 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-rebuild-fingerprint-options.ts +13 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-page.mjs +26 -2
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-page.test.mjs +5 -0
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.test.mjs +5 -0
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.tsx +4 -4
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/playwright.config.ts +4 -0
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard-performance-matrix.spec.ts +15 -23
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +1 -1
- package/templates/.agents/dashboard/tests/e2e/specs/performance-matrix-types.ts +15 -0
- package/templates/.agents/dashboard/tests/e2e/specs/performance-observability.ts +30 -0
- package/templates/.agents/dashboard/tests/e2e/specs/performance-work-row-identity.ts +6 -0
- package/templates/.agents/design/.zaip-managed.json +13 -9
- package/templates/.agents/design/apps/catalog/dist/assets/index-DkpQYoyC.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/index.html +1 -1
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/apps/catalog/src/components/CostPopulationSpecimen.test.tsx +8 -4
- package/templates/.agents/design/apps/catalog/src/components/CostPopulationSpecimen.tsx +10 -3
- package/templates/.agents/design/apps/catalog/src/components/DashboardFiltersSpecimen.tsx +0 -15
- package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +3 -3
- package/templates/.agents/design/apps/catalog/src/stories/DashboardFilters.stories.tsx +0 -1
- 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 +6 -6
- 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 +1 -1
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/rules/autonomy-decision.md +2 -2
- package/templates/.agents/rules/workflow.md +1 -1
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +73 -64
- package/templates/.agents/runtime/checksums.sha256 +5 -5
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/provenance.json +4 -4
- package/templates/.agents/runtime/sbom.cdx.json +1 -1
- package/templates/.agents/skills/zaip-skill-adapters/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-executar-fila-pronta/SKILL.md +7 -7
- package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-fence.mjs +32 -7
- package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-fence.test.mjs +134 -1
- package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-lease.mjs +57 -0
- package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/scheduled-ready-queue-contract.test.mjs +9 -6
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +2 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +5 -5
- package/templates/.agents/skills/zaip-skill-github-deploy/agents/openai.yaml +2 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/references/deployment-workflow.md +5 -3
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +40 -5
- package/templates/.agents/skills/zaip-skill-instalar-agendamento/SKILL.md +2 -2
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +6 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md +54 -6
- package/templates/.agents/zaip-aios/README.md +4 -4
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/01-primeiros-passos.md +4 -3
- package/templates/.agents/zaip-aios/guides/03-tasks.md +5 -4
- package/templates/.agents/zaip-aios/guides/04-specs.md +4 -1
- package/templates/.agents/zaip-aios/guides/05-prds.md +7 -3
- package/templates/.agents/zaip-aios/guides/06-execucao.md +9 -4
- package/templates/.agents/zaip-aios/guides/09-agentes-e-squads.md +9 -5
- package/templates/.agents/zaip-aios/guides/11-observabilidade-e-custos.md +10 -2
- package/templates/.agents/zaip-aios/guides/12-instalacao-e-upgrade.md +10 -5
- package/templates/.agents/zaip-aios/guides/13-boas-praticas.md +12 -1
- package/templates/.agents/zaip-aios/guides/14-troubleshooting.md +3 -1
- package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +12 -7
- package/templates/.agents/zaip-aios/guides/17-como-o-custo-e-calculado.md +1 -1
- package/templates/.agents/zaip-aios/guides/18-catalogo-de-agentes.md +5 -1
- package/templates/.agents/zaip-aios/guides/19-assurance-e-autonomia.md +19 -15
- package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +13 -9
- package/templates/.agents/zaip-aios/guides/21-telemetria-monitor-custos.md +4 -3
- package/templates/.agents/zaip-aios/guides/22-fluxos-e-roteamento.md +9 -7
- package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +40 -25
- package/templates/.agents/zaip-aios/guides/24-calculo-de-custos-openai.md +8 -8
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +14 -5
- package/templates/.agents/zaip-aios/guides/27-telemetria-git-native.md +6 -0
- package/templates/.agents/zaip-aios/guides/28-lifecycle-completo.md +129 -11
- package/templates/template-manifest.json +310 -218
- package/templates/tsconfig.base.json +22 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-OulA4CoX.js +0 -3
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-j3aUYH5G.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-CqfSgtk9.js +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
b146bd0c7c60b1ab43c4f71e0b1d2262c6df6da6f7053a0425f834ccb77a6b48 LICENSE
|
|
2
2
|
bc02cba77e8d51e5c580f43668863dc868eda66f1ff663bfaa49fcf3ca16320e THIRD_PARTY_NOTICES.md
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
e1d49c569ae09b2ede16e2d83820a3809b35eb6c44c13ba9b5330598d6b8f43c VERSION
|
|
4
|
+
239d00f5ff145dfddbdaee66fa94a286e3e80228bfec8f67919ea6f9099b16a0 bin/zaip.mjs
|
|
5
|
+
57c1b270eed2ecf577dd3e0d13a951380aa96a5a4b5a7adf396f31a1df777e96 manifest.json
|
|
6
6
|
7f89219d7c567c82a51679ad136d84364bded7ac659492537e125d33b1d58a7a migrations/001-layout-v1.json
|
|
7
7
|
5f8c48b286d0b44d8fbb57a9a5d009a8a500439aa3148d750b8f193f72995c9f migrations/002-layout-v2.json
|
|
8
8
|
33c98d5dc506bba4b8b3ca612706d9eb05ef13d9e03c33a4f9e65ca7804be9d1 pnpm-lock.sha256
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
54fc0f67af77dba2941ab13c90eb77afcd61f3ec62b28c2c6a07961c79e540ff provenance.json
|
|
10
|
+
9bf5a95c277816679d424ff2fb9a99f2e41b4a32c442c95159c314e3c4efe04f sbom.cdx.json
|
|
11
11
|
b3ffedf9e146be802a15b4009f33e031dec3071ca1525e12c67606fd964a3067 schemas/contracts.schema.json
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"statement_type": "self_reported_build_integrity",
|
|
4
4
|
"authenticity": "unverified",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "4.0.0",
|
|
6
6
|
"source_origin": "zaip-aios:local-build",
|
|
7
7
|
"lockfile_sha256": "03d08e5bbb198d74014ea4a806fcdeb350db23ec2bf0c2886a2265066555d418",
|
|
8
|
-
"sbom_sha256": "
|
|
9
|
-
"runtime_sha256": "
|
|
10
|
-
"statement_sha256": "
|
|
8
|
+
"sbom_sha256": "9bf5a95c277816679d424ff2fb9a99f2e41b4a32c442c95159c314e3c4efe04f",
|
|
9
|
+
"runtime_sha256": "3f08dd1f60c42934f982cf368df0610f852a96b19123c8771e85e92cccd24e6e",
|
|
10
|
+
"statement_sha256": "9c05251add6c72fd1fe61d5353ba239bc693e95a80a03d0389a38b1e6e6f413b"
|
|
11
11
|
}
|
|
@@ -7,7 +7,7 @@ description: Generate and verify Codex and Claude guidance adapters from canonic
|
|
|
7
7
|
|
|
8
8
|
Um `.codex/config.toml` existente sem cabeçalho `zaip-managed` é um overlay local: `adapters build` deve preservá-lo e `adapters check` não deve reportá-lo como drift. Arquivos ausentes ou gerenciados continuam sujeitos à projeção canônica; nenhum outro adapter recebe essa exceção.
|
|
9
9
|
|
|
10
|
-
1. Trate `.agents/config`, `rules/` e skills como fontes; `AGENTS.md
|
|
10
|
+
1. Trate `.agents/config`, `rules/` e skills como fontes; `AGENTS.md` e wrappers são projeções geradas mínimas. A propriedade de cada Rule é definida pela presença no `framework.lock.yaml`.
|
|
11
11
|
2. Oriente o agente a começar por `project.yaml` e Rules críticas, depois carregar trabalho, Requirements e skills relevantes sob demanda.
|
|
12
12
|
3. Não instrua a carregar todo o histórico, Runs JSONL ou raízes V1 por padrão.
|
|
13
13
|
4. Gere com cabeçalho managed, versão, checksum e allowlist determinísticos; execute `adapters build` e depois `adapters check`.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: zaip-skill-executar-fila-pronta
|
|
3
|
-
description: Execute
|
|
3
|
+
description: Execute one eligible top-level ready item per scheduled Codex invocation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Executar fila pronta
|
|
7
7
|
|
|
8
|
-
Use esta skill para uma rodada idempotente que
|
|
8
|
+
Use esta skill para uma rodada idempotente que reivindica e executa **um único item superior** da fila. A seleção é estrita: PRD `ready`, depois SPEC `ready` independente, depois Task-first standalone elegível em `Pronto para Executar`. Uma rodada jamais inicia um segundo item, mesmo quando o primeiro termina rapidamente, falha ou é pulado por disputa.
|
|
9
9
|
|
|
10
10
|
1. A primeira ação da conversa agendada chama `codex_app set_thread_title` sem `threadId`, usando a hora local `America/Sao_Paulo` no formato exato `[YYYY-MM-DD-T-HH-mm] Tarefa Agendada`. Registre a falha de renomeação observada e continue para a fila; ela não bloqueia a rodada.
|
|
11
11
|
2. Valide o checkout local, `zaip.enabled: true`, registros canônicos e runtime. Leia `.agents/dashboard/work-priority.json` quando existir; ausência ou conteúdo inválido equivale a nenhuma prioridade manual, nunca a uma ordem inventada.
|
|
12
|
-
3. Antes de selecionar,
|
|
13
|
-
4.
|
|
14
|
-
5.
|
|
15
|
-
6. Execute
|
|
16
|
-
7. Registre o resultado
|
|
12
|
+
3. Antes de selecionar, chame `node .agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-lease.mjs acquire` na raiz do projeto. Ele cria atomicamente `.local/automation/ready-queue.lock.json` (diretório local não versionado) com `owner_token` aleatório, `fencing_token`, `acquired_at` e `expires_at`. Guarde o `owner_token` e `fencing_token` retornados; não os invente. O `fencing_token` é um inteiro monotônico: toda aquisição que substitui um lock expirado recebe valor maior que o último valor observado. Se existir lock válido de outra rodada, retorne sem efeito; nunca force a sobreposição. Renove o mesmo lock com `ready-queue-lease.mjs renew OWNER FENCE` antes de reivindicar o item selecionado e nos checkpoints de uma execução longa. Antes de cada efeito (incluindo iniciar uma Execution), chame `ready-queue-lease.mjs assert OWNER FENCE` e exija sucesso; se falhar, encerre a rodada sem executar mais efeitos. Libere com `ready-queue-lease.mjs release OWNER FENCE` somente ao terminar e apenas se o `owner_token` ainda corresponder; locks expirados podem ser substituídos atomicamente.
|
|
13
|
+
4. Consulte `zaip task ready-next --json` para a seleção canônica e determinística: PRD `ready`; depois SPEC `ready` independente; depois Task-first standalone `prepared`/`planned`, com dependências concluídas e exatamente um PreparedPlan resolvível: `prepared_plan` inline válido **ou** `plan_ref` válido, nunca ambos. A Task ainda não pode ter Execution vinculada e nunca pode ter sido iniciada ou tentada. O comando exclui Task sem `status: planned`, com `started_at`, `attempt_count` diferente de zero, Execution existente, estado de plano ambíguo, ou cujo próprio ID apareça em `task next` ou no conjunto materializado concorrente. Exclui também descendentes de PRD/SPEC e itens `active`, `blocked`, `failed`, `cancelled` ou terminais. Falha de leitura/validação não é fila vazia: bloqueie a rodada.
|
|
14
|
+
5. O seletor usa `.agents/dashboard/work-priority.json`: itens enumerados no Kanban vêm primeiro e mantêm a ordem de cima para baixo; os sem enumeração entram depois por `created_at` e ID. Um arquivo inválido equivale a nenhuma prioridade manual. Considere PRDs antes de SPECs, e SPECs antes de Tasks. Releia `zaip task ready-next --json` sob o lease e reivindique **somente o primeiro item superior elegível** com `ready-queue-lease.mjs claim OWNER FENCE ITEM_ID`. Uma segunda reivindicação de outro ID com o mesmo lease é rejeitada pelo código; não transforme os demais candidatos em execução nesta rodada. Depois do claim, repita `zaip task ready-next --json`: se o item mudou ou ficou inelegível, registre a disputa e não escolha outro.
|
|
15
|
+
6. Execute somente o item reivindicado, pelo comando explícito no menor grão (`prd execute`, `spec execute` ou `task execute`). Para uma Task-first elegível, use `task execute` para materializar sua Execution; não crie a Execution por outro atalho. Se o item deixar de ser elegível antes do início, registre a disputa e termine a rodada sem selecionar o próximo. Preserve os gates de write scope, dependências, evidências, testes e finalizador; uma seleção não é autorização para ignorar qualquer gate.
|
|
16
|
+
7. Registre o resultado do único item, a ausência de candidatos ou a disputa observada, e solte o lease. Sem candidato, retorne `no_eligible_work`; com precondição ausente, conflito de lease ou estado ambíguo, falhe fechado e não altere registros.
|
|
17
17
|
|
|
18
18
|
Esta skill não cria um agendamento. Ela só pode ser chamada pela automação nativa do Codex Desktop ou por um usuário com autoridade explícita para executar o trabalho selecionado.
|
package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-fence.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
2
2
|
import { dirname, resolve } from "node:path";
|
|
3
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
3
4
|
|
|
4
5
|
export async function acquireReadyQueueFence(lockPath, input) {
|
|
5
6
|
return withMutex(lockPath, async () => {
|
|
@@ -19,11 +20,25 @@ export async function acquireReadyQueueFence(lockPath, input) {
|
|
|
19
20
|
export async function renewReadyQueueFence(lockPath, lease, now, expiresAt) {
|
|
20
21
|
return withMutex(lockPath, async () => {
|
|
21
22
|
if (!(await assertReadyQueueFence(lockPath, lease, now))) return null;
|
|
22
|
-
const renewed = { ...
|
|
23
|
+
const renewed = { ...(await readLease(lockPath)), expires_at: expiresAt };
|
|
23
24
|
await writeLease(lockPath, renewed);
|
|
24
25
|
return renewed;
|
|
25
26
|
});
|
|
26
27
|
}
|
|
28
|
+
/** A scheduled invocation may claim exactly one canonical top-level item. */
|
|
29
|
+
export async function claimReadyQueueItem(lockPath, lease, itemId, now) {
|
|
30
|
+
if (!/^(PRD|SPEC|TASK)-[A-Z0-9-]+$/.test(itemId))
|
|
31
|
+
throw new Error("Ready queue claim requires one canonical item ID");
|
|
32
|
+
return withMutex(lockPath, async () => {
|
|
33
|
+
if (!(await assertReadyQueueFence(lockPath, lease, now))) return null;
|
|
34
|
+
const current = await readLease(lockPath);
|
|
35
|
+
if (current.claimed_item_id !== undefined && current.claimed_item_id !== itemId) return null;
|
|
36
|
+
if (current.claimed_item_id === itemId) return current;
|
|
37
|
+
const claimed = { ...current, claimed_item_id: itemId, claimed_at: now };
|
|
38
|
+
await writeLease(lockPath, claimed);
|
|
39
|
+
return claimed;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
27
42
|
export async function assertReadyQueueFence(lockPath, lease, now) {
|
|
28
43
|
const current = await readLease(lockPath);
|
|
29
44
|
return (
|
|
@@ -37,19 +52,29 @@ export async function assertReadyQueueFence(lockPath, lease, now) {
|
|
|
37
52
|
export async function releaseReadyQueueFence(lockPath, lease, now) {
|
|
38
53
|
return withMutex(lockPath, async () => {
|
|
39
54
|
if (!(await assertReadyQueueFence(lockPath, lease, now))) return false;
|
|
40
|
-
await writeLease(lockPath, {
|
|
55
|
+
await writeLease(lockPath, {
|
|
56
|
+
...(await readLease(lockPath)),
|
|
57
|
+
expires_at: now,
|
|
58
|
+
released_at: now,
|
|
59
|
+
});
|
|
41
60
|
return true;
|
|
42
61
|
});
|
|
43
62
|
}
|
|
44
63
|
async function withMutex(lockPath, operation) {
|
|
45
64
|
const mutex = `${lockPath}.mutex`;
|
|
46
65
|
await mkdir(dirname(lockPath), { recursive: true });
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
66
|
+
let acquired = false;
|
|
67
|
+
for (let attempt = 0; attempt < 25; attempt += 1) {
|
|
68
|
+
try {
|
|
69
|
+
await mkdir(mutex);
|
|
70
|
+
acquired = true;
|
|
71
|
+
break;
|
|
72
|
+
} catch (error) {
|
|
73
|
+
if (error?.code !== "EEXIST") throw error;
|
|
74
|
+
if (attempt < 24) await delay(40);
|
|
75
|
+
}
|
|
52
76
|
}
|
|
77
|
+
if (!acquired) throw new Error(`Ready queue mutex remains held: ${mutex}`);
|
|
53
78
|
try {
|
|
54
79
|
return await operation();
|
|
55
80
|
} finally {
|
package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-fence.test.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import {
|
|
2
|
+
import { execFileSync } from "node:child_process";
|
|
3
|
+
import { mkdir, mkdtemp, rm, stat, writeFile } from "node:fs/promises";
|
|
3
4
|
import { tmpdir } from "node:os";
|
|
4
5
|
import { join } from "node:path";
|
|
5
6
|
import test from "node:test";
|
|
6
7
|
import {
|
|
7
8
|
acquireReadyQueueFence,
|
|
8
9
|
assertReadyQueueFence,
|
|
10
|
+
claimReadyQueueItem,
|
|
9
11
|
releaseReadyQueueFence,
|
|
10
12
|
renewReadyQueueFence,
|
|
11
13
|
} from "./ready-queue-fence.mjs";
|
|
@@ -58,3 +60,134 @@ test("fence is exclusive, monotonic, and rejects a stale owner", async () => {
|
|
|
58
60
|
await rm(directory, { recursive: true, force: true });
|
|
59
61
|
}
|
|
60
62
|
});
|
|
63
|
+
|
|
64
|
+
test("Windows-compatible lease command allows only one claimed item", async () => {
|
|
65
|
+
const directory = await mkdtemp(join(tmpdir(), "zaip-ready-cli-"));
|
|
66
|
+
const script = join(import.meta.dirname, "ready-queue-lease.mjs");
|
|
67
|
+
const call = (...args) =>
|
|
68
|
+
JSON.parse(
|
|
69
|
+
execFileSync(process.execPath, [script, ...args], { cwd: directory, encoding: "utf8" }),
|
|
70
|
+
);
|
|
71
|
+
try {
|
|
72
|
+
await mkdir(join(directory, ".agents", "config"), { recursive: true });
|
|
73
|
+
await writeFile(
|
|
74
|
+
join(directory, ".agents", "config", "project.yaml"),
|
|
75
|
+
"zaip:\n enabled: true\n",
|
|
76
|
+
);
|
|
77
|
+
const lease = call("acquire").result;
|
|
78
|
+
assert.equal(
|
|
79
|
+
call("claim", lease.owner_token, String(lease.fencing_token), "TASK-2026-09-24-READY-AAAA")
|
|
80
|
+
.result.claimed_item_id,
|
|
81
|
+
"TASK-2026-09-24-READY-AAAA",
|
|
82
|
+
);
|
|
83
|
+
assert.equal(
|
|
84
|
+
call("renew", lease.owner_token, String(lease.fencing_token)).result.claimed_item_id,
|
|
85
|
+
"TASK-2026-09-24-READY-AAAA",
|
|
86
|
+
);
|
|
87
|
+
assert.throws(
|
|
88
|
+
() =>
|
|
89
|
+
call("claim", lease.owner_token, String(lease.fencing_token), "TASK-2026-09-24-READY-BBBB"),
|
|
90
|
+
/Command failed/,
|
|
91
|
+
);
|
|
92
|
+
assert.equal(call("release", lease.owner_token, String(lease.fencing_token)).ok, true);
|
|
93
|
+
} finally {
|
|
94
|
+
await rm(directory, { recursive: true, force: true });
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test("one lease cannot claim a second ready item, including after renewal", async () => {
|
|
99
|
+
const directory = await mkdtemp(join(tmpdir(), "zaip-ready-single-"));
|
|
100
|
+
const lock = join(directory, "ready-queue.lock.json");
|
|
101
|
+
try {
|
|
102
|
+
const lease = await acquireReadyQueueFence(lock, {
|
|
103
|
+
owner_token: "owner-a",
|
|
104
|
+
now: "2026-09-24T12:00:00.000Z",
|
|
105
|
+
expires_at: "2026-09-24T12:01:00.000Z",
|
|
106
|
+
});
|
|
107
|
+
const claimed = await claimReadyQueueItem(
|
|
108
|
+
lock,
|
|
109
|
+
lease,
|
|
110
|
+
"PRD-2026-09-24-READY-AAAA",
|
|
111
|
+
"2026-09-24T12:00:01.000Z",
|
|
112
|
+
);
|
|
113
|
+
assert.equal(claimed.claimed_item_id, "PRD-2026-09-24-READY-AAAA");
|
|
114
|
+
const renewed = await renewReadyQueueFence(
|
|
115
|
+
lock,
|
|
116
|
+
lease,
|
|
117
|
+
"2026-09-24T12:00:02.000Z",
|
|
118
|
+
"2026-09-24T12:02:00.000Z",
|
|
119
|
+
);
|
|
120
|
+
assert.equal(renewed.claimed_item_id, "PRD-2026-09-24-READY-AAAA");
|
|
121
|
+
assert.equal(
|
|
122
|
+
await claimReadyQueueItem(
|
|
123
|
+
lock,
|
|
124
|
+
renewed,
|
|
125
|
+
"SPEC-2026-09-24-READY-BBBB",
|
|
126
|
+
"2026-09-24T12:00:03.000Z",
|
|
127
|
+
),
|
|
128
|
+
null,
|
|
129
|
+
);
|
|
130
|
+
assert.equal(
|
|
131
|
+
(
|
|
132
|
+
await claimReadyQueueItem(
|
|
133
|
+
lock,
|
|
134
|
+
lease,
|
|
135
|
+
"PRD-2026-09-24-READY-AAAA",
|
|
136
|
+
"2026-09-24T12:00:04.000Z",
|
|
137
|
+
)
|
|
138
|
+
).claimed_item_id,
|
|
139
|
+
"PRD-2026-09-24-READY-AAAA",
|
|
140
|
+
);
|
|
141
|
+
assert.equal(await releaseReadyQueueFence(lock, lease, "2026-09-24T12:00:05.000Z"), true);
|
|
142
|
+
assert.equal(
|
|
143
|
+
await claimReadyQueueItem(
|
|
144
|
+
lock,
|
|
145
|
+
lease,
|
|
146
|
+
"PRD-2026-09-24-READY-AAAA",
|
|
147
|
+
"2026-09-24T12:00:06.000Z",
|
|
148
|
+
),
|
|
149
|
+
null,
|
|
150
|
+
);
|
|
151
|
+
} finally {
|
|
152
|
+
await rm(directory, { recursive: true, force: true });
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
test("transient mutex contention waits instead of pretending the queue is locked", async () => {
|
|
157
|
+
const directory = await mkdtemp(join(tmpdir(), "zaip-ready-contention-"));
|
|
158
|
+
const lock = join(directory, "ready-queue.lock.json");
|
|
159
|
+
const mutex = `${lock}.mutex`;
|
|
160
|
+
try {
|
|
161
|
+
await mkdir(mutex);
|
|
162
|
+
const pending = acquireReadyQueueFence(lock, {
|
|
163
|
+
owner_token: "owner-a",
|
|
164
|
+
now: "2026-09-24T12:00:00.000Z",
|
|
165
|
+
expires_at: "2026-09-24T12:01:00.000Z",
|
|
166
|
+
});
|
|
167
|
+
await new Promise((resolve) => setTimeout(resolve, 80));
|
|
168
|
+
await rm(mutex, { recursive: true });
|
|
169
|
+
assert.equal((await pending)?.owner_token, "owner-a");
|
|
170
|
+
} finally {
|
|
171
|
+
await rm(directory, { recursive: true, force: true });
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
test("orphaned mutex fails visibly without deleting another owner's lock", async () => {
|
|
176
|
+
const directory = await mkdtemp(join(tmpdir(), "zaip-ready-orphan-"));
|
|
177
|
+
const lock = join(directory, "ready-queue.lock.json");
|
|
178
|
+
const mutex = `${lock}.mutex`;
|
|
179
|
+
try {
|
|
180
|
+
await mkdir(mutex);
|
|
181
|
+
await assert.rejects(
|
|
182
|
+
acquireReadyQueueFence(lock, {
|
|
183
|
+
owner_token: "owner-a",
|
|
184
|
+
now: "2026-09-24T12:00:00.000Z",
|
|
185
|
+
expires_at: "2026-09-24T12:01:00.000Z",
|
|
186
|
+
}),
|
|
187
|
+
/mutex remains held/,
|
|
188
|
+
);
|
|
189
|
+
assert.equal((await stat(mutex)).isDirectory(), true);
|
|
190
|
+
} finally {
|
|
191
|
+
await rm(directory, { recursive: true, force: true });
|
|
192
|
+
}
|
|
193
|
+
});
|
package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-lease.mjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import {
|
|
5
|
+
acquireReadyQueueFence,
|
|
6
|
+
assertReadyQueueFence,
|
|
7
|
+
claimReadyQueueItem,
|
|
8
|
+
releaseReadyQueueFence,
|
|
9
|
+
renewReadyQueueFence,
|
|
10
|
+
} from "./ready-queue-fence.mjs";
|
|
11
|
+
|
|
12
|
+
const root = process.cwd();
|
|
13
|
+
const lockPath = resolve(root, ".local/automation/ready-queue.lock.json");
|
|
14
|
+
const [action, ...args] = process.argv.slice(2);
|
|
15
|
+
const now = new Date().toISOString();
|
|
16
|
+
const expiry = new Date(Date.now() + 4 * 60 * 60 * 1000).toISOString();
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
const config = await readFile(resolve(root, ".agents/config/project.yaml"), "utf8");
|
|
20
|
+
if (!/^zaip:\s*\r?\n\s+enabled: true\s*$/m.test(config)) {
|
|
21
|
+
throw new Error("ZAIP must be enabled in this checkout");
|
|
22
|
+
}
|
|
23
|
+
let result;
|
|
24
|
+
if (action === "acquire" && args.length === 0) {
|
|
25
|
+
result = await acquireReadyQueueFence(lockPath, {
|
|
26
|
+
owner_token: randomUUID(),
|
|
27
|
+
now,
|
|
28
|
+
expires_at: expiry,
|
|
29
|
+
});
|
|
30
|
+
} else if (["claim", "renew", "assert", "release"].includes(action)) {
|
|
31
|
+
const [owner, rawFence, itemId] = args;
|
|
32
|
+
if (!owner || !/^[1-9]\d*$/.test(rawFence ?? "")) {
|
|
33
|
+
throw new Error("owner_token and positive fencing_token are required");
|
|
34
|
+
}
|
|
35
|
+
const lease = { owner_token: owner, fencing_token: Number(rawFence) };
|
|
36
|
+
if (action === "claim" && args.length === 3) {
|
|
37
|
+
result = await claimReadyQueueItem(lockPath, lease, itemId, now);
|
|
38
|
+
} else if (action === "renew" && args.length === 2) {
|
|
39
|
+
result = await renewReadyQueueFence(lockPath, lease, now, expiry);
|
|
40
|
+
} else if (action === "assert" && args.length === 2) {
|
|
41
|
+
result = await assertReadyQueueFence(lockPath, lease, now);
|
|
42
|
+
} else if (action === "release" && args.length === 2) {
|
|
43
|
+
result = await releaseReadyQueueFence(lockPath, lease, now);
|
|
44
|
+
} else {
|
|
45
|
+
throw new Error("Invalid ready-queue lease arguments");
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
throw new Error(
|
|
49
|
+
"Usage: ready-queue-lease.mjs acquire|claim OWNER FENCE ITEM|renew OWNER FENCE|assert OWNER FENCE|release OWNER FENCE",
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
process.stdout.write(`${JSON.stringify({ ok: result !== null && result !== false, result })}\n`);
|
|
53
|
+
if (result === null || result === false) process.exitCode = 2;
|
|
54
|
+
} catch (error) {
|
|
55
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
56
|
+
process.exitCode = 1;
|
|
57
|
+
}
|
|
@@ -7,7 +7,7 @@ const root = resolve(import.meta.dirname, "../..");
|
|
|
7
7
|
const read = (path) => readFile(resolve(root, path), "utf8");
|
|
8
8
|
const repositoryReadme = resolve(root, "../../README.md");
|
|
9
9
|
|
|
10
|
-
test("hourly ready queue contracts the native Codex scheduler and
|
|
10
|
+
test("hourly ready queue contracts the native Codex scheduler and one ordered item", async () => {
|
|
11
11
|
const [installer, executor] = await Promise.all([
|
|
12
12
|
read("zaip-skill-instalar-agendamento/SKILL.md"),
|
|
13
13
|
read("zaip-skill-executar-fila-pronta/SKILL.md"),
|
|
@@ -35,7 +35,7 @@ test("hourly ready queue contracts the native Codex scheduler and full ordered s
|
|
|
35
35
|
assert.match(installer, /standalone/);
|
|
36
36
|
assert.match(installer, /sem duplicar/);
|
|
37
37
|
assert.match(installer, /Nunca use o Agendador do Windows/);
|
|
38
|
-
assert.match(installer, /
|
|
38
|
+
assert.match(installer, /execute at most one top-level eligible item/);
|
|
39
39
|
assert.match(installer, /a cada hora, no minuto 0/);
|
|
40
40
|
assert.match(installer, /nova conversa/);
|
|
41
41
|
assert.match(installer, /\.agents\/dashboard\/work-priority\.json/);
|
|
@@ -44,9 +44,12 @@ test("hourly ready queue contracts the native Codex scheduler and full ordered s
|
|
|
44
44
|
assert.match(installer, /set_thread_title without threadId/);
|
|
45
45
|
assert.match(installer, /\[YYYY-MM-DD-T-HH-mm\] Tarefa Agendada/);
|
|
46
46
|
|
|
47
|
-
assert.match(executor, /
|
|
48
|
-
assert.match(executor, /
|
|
49
|
-
assert.match(executor, /
|
|
47
|
+
assert.match(executor, /um único item superior/);
|
|
48
|
+
assert.match(executor, /zaip task ready-next --json/);
|
|
49
|
+
assert.match(executor, /somente o primeiro item superior elegível/);
|
|
50
|
+
assert.match(executor, /sem selecionar o próximo/);
|
|
51
|
+
assert.doesNotMatch(executor, /processe todos os PRDs/);
|
|
52
|
+
assert.match(executor, /descendentes de PRD\/SPEC/);
|
|
50
53
|
assert.match(executor, /`active`, `blocked`, `failed`, `cancelled` ou terminais/);
|
|
51
54
|
assert.match(executor, /\.agents\/dashboard\/work-priority\.json/);
|
|
52
55
|
assert.match(executor, /\.local\/automation\/ready-queue\.lock\.json/);
|
|
@@ -64,7 +67,7 @@ test("hourly ready queue contracts the native Codex scheduler and full ordered s
|
|
|
64
67
|
assert.match(executor, /`prepared_plan` inline válido \*\*ou\*\* `plan_ref` válido, nunca ambos/);
|
|
65
68
|
assert.match(executor, /não pode ter Execution vinculada/);
|
|
66
69
|
assert.match(executor, /nunca pode ter sido iniciada ou tentada/);
|
|
67
|
-
assert.match(executor, /
|
|
70
|
+
assert.match(executor, /Falha de leitura\/validação não é fila vazia/);
|
|
68
71
|
assert.match(
|
|
69
72
|
executor,
|
|
70
73
|
/cujo próprio ID apareça em `task next` ou no conjunto materializado concorrente/,
|
|
@@ -71,7 +71,7 @@ Antes de encerrar com trabalho pendente ou responder a uma falha, aplique [conti
|
|
|
71
71
|
|
|
72
72
|
## Runtime gerenciado e compatibilidade
|
|
73
73
|
|
|
74
|
-
1. Leia `execution.runtime`.
|
|
74
|
+
1. Leia `execution.runtime`. O padrão novo `codex_native` mantém o despacho no host Codex e exige subagentes nativos também para Task avulsa; `managed` é compatibilidade explícita de provider para PRD/SPEC, mantendo avulsas diretas nesse contrato legado. Ausente/manual preserva execução tradicional; `autonomous` também permite Task gerenciada explícita. Legados já tentados exigem `task migrate-autonomy` revisado; nenhum consumo é zerado.
|
|
75
75
|
2. Com `autonomy.version: 1`, aplique `RULE-AUTONOMY-DECISION` e seu ledger estável por Task. A seleção manual fica no principal avulso; subagentes seguem política automática com aviso. Sem esse bloco, preserve `automatic_sources` legado (`spec`,`prd`). Não alegue enforcement de orçamento/modelo em ferramenta nativa que não passou pelo dispatch gerenciado.
|
|
76
76
|
3. Em autonomia, exija raiz Git limpa, worktree registrada por Task, commit final canônico sem alterações pendentes, diff dentro dos write scopes e merge abortável em conflito. A integração cria outro commit canônico por Task no histórico first-parent e referencia o SHA do candidato em `ZAIP-Product-Commit`.
|
|
77
77
|
4. Use o menor paralelismo entre projeto, plano, provider e squad. Em `autonomy-v1`, orçamento por Task vem exclusivamente do preset congelado: Essencial 4/1, Equilibrado 10/3, Persistente ilimitado (execuções/replans); tempo não encerra Task. Risco/domain definem assurance, não esse orçamento. Só no contrato legado use as quotas anteriores por risco.
|
|
@@ -7,8 +7,8 @@ Carregue antes de executar uma entrega ou delegar. Este contrato detalha o kerne
|
|
|
7
7
|
- Para delegação Codex, Sub-Run ZAIP é somente subagente nativo de colaboração (`spawn_agent`). `create_thread` e `fork_thread` criam chats independentes e exigem pedido explícito do usuário; nunca são Sub-Run, fallback, retry ou prova de delegação. Se delegação nativa estiver indisponível, relate a limitação em vez de criar chat independente. Nome de catálogo, `task_name`, título ou prompt não prova ancestralidade nativa. Antes de repetir a mesma delegação limitada, aguarde ou reutilize seu filho pendente e capture somente ancestralidade/metadados observados em resultados nativos de spawn/terminal do host ou eventos SubagentStart/SubagentStop.
|
|
8
8
|
- Cada `client_turn_id` observável tem uma Execution idempotente/claim atômico; sem ele use identidade local sem prometer idempotência. `interaction` read-only sem descendentes é conversa sem Task artificial e termina após a resposta entregue, sem executor ou finalizador; interaction com trabalho delegado e `delivery` exigem executor/finalizador. `delivery` é trabalho materializado e reuso exige kind/origem compatíveis. A raiz é `zaip-agent-orchestrator`; quando a barreira é exigida escolha executor por capacidade, permita reviewer/auditor/integrator e termine com `zaip-agent-finalizer` em `finalization`, após descendentes, bloqueando novas chamadas.
|
|
9
9
|
- Hooks são best-effort: após cada spawn/terminal, o host autorizado a serviço do orquestrador executa `zaip subagent capture` idempotente com metadados reais. Na captura rica, preserve session/turn observados, `agent-id` com a identidade nativa retornada e `parent-agent-id`/`parent-run-id` do pai imediato exato; cada invocação preserva seu turn. Quando um evento terminal observado expõe somente agent_path, status, identidade catalogada e pai exato, `capture-terminal` aceita apenas `zaip-agent-finalizer` ou executor elegível para delivery com capacidade `task-delivery`; exige também `parent-run-id` igual ao `run_id` da raiz ativa exata, pois um client thread pode conter raízes concorrentes. O último segmento do agent_path deve ser seu `codex_task_name` canônico. O propósito deriva da identidade validada e session/turn/model/provider/usage permanecem indisponíveis; o fallback nunca substitui captura rica nem inventa modelo, effort, tokens ou custo.
|
|
10
|
-
- Em `autonomy-v1`, carregue `RULE-AUTONOMY-DECISION`. Task avulsa
|
|
11
|
-
- Escaladas seguem o perfil congelado: Essencial nunca Astra automático; Equilibrado Sol/high,
|
|
10
|
+
- Em `autonomy-v1`, carregue `RULE-AUTONOMY-DECISION`. Conversation sem entrega responde diretamente; Task avulsa no padrão `codex_native` usa executor e Gui nativos. O principal preserva a seleção manual do host; cada filho segue a seleção ZAIP por papel/risco/fase, registrada conforme o modelo/esforço efetivamente observados. Capacidade ausente bloqueia a tentativa, nunca é substituída por prompt. Sem `autonomy`, preserve o contrato legado de `automatic_sources` (`spec`,`prd`).
|
|
11
|
+
- Escaladas seguem o perfil congelado: Essencial nunca Astra automático; Equilibrado Sol/high, Sol/high, Astra/high, com execução Astra/high elegível no terceiro bloco; Persistente sem quota total. `RULE-ASTRA-DIAGNOSTIC` descreve também compatibilidade legada. Não use título/volume como prova nem alegue mudança de modelo apenas pelo prompt.
|
|
12
12
|
- Todo PreparedPlan PRD/SPEC traz `model_signals` por Task; o framework persiste `model_profile`, `task-risk-v1` e motivos, usando `runtime_defaults`, `runtime`, política/defaults sem `standard` silencioso. Não infira fase/complexidade/transversalidade/ambiguidade/rework/custo/capacidade por contagem de arquivos; use sinais, fase/agente e capacidades. Cabeçalho e `model.selection.recorded` repetem a seleção enviada.
|
|
13
13
|
- Plano visível: `DEFINE:`, `PLAN:`, `EXECUTE:` ou `VERIFY:`, 3–4 passos (máximo 5); omita fase sem ação e combine trivialidades.
|
|
14
14
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: zaip-skill-github-deploy
|
|
3
|
-
description: Use only when the user explicitly asks
|
|
3
|
+
description: Use only when the user explicitly asks to deploy, push or publish to GitHub; in the zaip-aios builder, a full deploy includes a GitHub Release and npm publication through GitHub Actions.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Deploy and repair GitHub publication
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
An explicit current-turn request to `deploy`, `push`, `publicar`, `publicação` or GitHub publication selects this skill; discussing or editing deployment does not authorize publication. In the `zaip-ai/zaip-aios` builder, “faça deploy” means the guarded push, GitHub Release and observation of the GitHub Actions npm publication. Consumer repositories follow their own GitHub-only policy. Neither route authorizes a hosting-provider deployment.
|
|
9
9
|
|
|
10
10
|
Read [the deployment workflow](references/deployment-workflow.md) for the detailed operational contract before publication. The steps below retain its authority, identity and completion boundaries.
|
|
11
11
|
|
|
12
12
|
## Authorization and scope
|
|
13
13
|
|
|
14
|
-
- The exact command “faça deploy” authorizes commits covering all versionable pending changes in the selected worktree, followed by push and Release, after secret, size and ignore checks. The selected worktree is the complete publication scope; other worktrees remain outside it.
|
|
14
|
+
- The exact command “faça deploy” authorizes commits covering all versionable pending changes in the selected worktree, followed by push and Release, after secret, size and ignore checks. In the verified framework source, publishing that Release triggers the npm workflow; follow it to terminal status and verify the registry. The selected worktree is the complete publication scope; other worktrees remain outside it. An explicit push-only request stops after the verified push and does not create a Release or publish npm.
|
|
15
15
|
- Resolve dirty state, untracked files, generated projections, branch divergence and repairable local/remote failures automatically within that scope. Limit repairs to the evidenced cause, with up to five repair cycles; stop when the same root cause remains after two repairs.
|
|
16
16
|
- Treat the selected worktree's local branch, recovery branch or detached state as the source candidate only. The configured deploy branch is the remote target; a mismatch between source and target is not a blocker and never requires checking out the target locally.
|
|
17
17
|
- Stop only for an unresolved index conflict after bounded repair, secrets, files at or above GitHub's 100 MB limit, unavailable authentication/authority, external outage, destructive requirement, or ambiguous scope expansion.
|
|
@@ -43,7 +43,7 @@ Every product commit requires causal Task/Change/Execution records and matching
|
|
|
43
43
|
|
|
44
44
|
1. Compose `$zaip-skill-release-qualification` and follow [local preparation](../zaip-skill-release-qualification/references/local-preparation.md). Synchronize and commit before preparing the clean exact SHA. Failed or stale evidence is not qualification.
|
|
45
45
|
2. Resolve the previous Release, next canonical version and package identity using [release identity](references/release-identity.md). For the framework, `vN.N` maps to package `N.N.0`; only GitHub Actions publishes `@zaip-ai/cli` to npm.
|
|
46
|
-
3. For `zaip-ai/zaip-aios
|
|
46
|
+
3. For the verified `zaip-ai/zaip-aios` source, use `scripts/local-release-deploy.mjs`. It prepares/verifies, pushes the exact SHA to configured `main`, uploads verified assets to a draft, then publishes the Release. The `publish-cli.yml` workflow is triggered by `release: published` and alone performs npm publication. Enable the thin publisher only after explicit rollout authority, public trust enrollment and signed local qualification. It validates published assets and runs one read-only installation smoke before npm; no private-draft pilot or local npm write token is needed. Inspect the configured signing key, trust store, policy and protected workflow settings before reporting a missing credential; do not confuse the release-signing private key with the Git SSH key or npm token in a local `.env`, and never rotate trust or bypass a gate without separate authorization. The user authorized routine per-version updates of **only** `ZAIP_LOCAL_RELEASE_POLICY_B64` for this builder on 2026-09-23. Prepare a reviewed version-matched policy, qualify the exact SHA, enroll those exact public policy bytes and verify readback before publishing the Release; do not ask again merely because the previous version is still enrolled. This standing authorization never covers trust-key rotation, other protected variables, or weaker gates. GitHub Release publication and npm completion remain separate.
|
|
47
47
|
4. Consumers use `scripts/consumer-release-preparation.mjs guarded-push` with their own policy and explicit branch, SHA and trusted receipt. They have no framework npm/TGZ requirement. See the preparation guide for bootstrap and guarded commands.
|
|
48
48
|
5. Immediately before delivery, reread the configured target; if changed, restart preparation. Helpers bind the exact candidate to `HEAD:refs/heads/<configured branch>` (or its equivalent immutable-SHA refspec) independently of the local source branch; do not bypass them with a manual push.
|
|
49
49
|
6. After qualification, a missing Release is normal. Unless explicitly push-only, automatically create the draft for that SHA or resume a verified draft for the same SHA. Verify an already-published exact Release as a no-op; an API/authentication error never proves absence. Refuse conflicting tags/assets without overwrite.
|
|
@@ -66,7 +66,7 @@ publication separately; neither preparation nor this policy grants publication a
|
|
|
66
66
|
- After push, compare the local SHA with the configured remote ref. If the push result is uncertain, read remote state first; only one documented transient transport retry is allowed per cycle.
|
|
67
67
|
- Observe required GitHub checks for that exact SHA, waiting up to 20 minutes with concise progress at least once per minute. Read the exact failed step before repairing. Never repeat an unchanged failing command or disable a gate for green status.
|
|
68
68
|
- Reconcile recoverable prerequisites and continue through the same bounded repair policy; do not stop merely because a Release or generated file was absent.
|
|
69
|
-
-
|
|
69
|
+
- Full framework deploy success requires matching local/remote hashes, successful required checks, verified Release identity/body, a clean intended worktree, terminal success of the exact `publish-cli.yml` run, and registry confirmation of `@zaip-ai/cli@N.N.0` with the intended dist-tag and artifact integrity. The local `.env` does not automatically provide GitHub Actions credentials; use only the workflow's configured secret/environment. If npm fails or cannot be observed, report the GitHub Release as published but the deploy as partial or blocked, with the exact failed/pending gate. Consumer deploys have no framework npm gate. Formal lifecycle closure remains separate.
|
|
70
70
|
- Retain terminal evidence and close every owned Task/Change/Execution correctly through the finalizer. Never finish with an owned Task executing/verifying; use completed, blocked, cancelled or failed according to observed outcome.
|
|
71
71
|
|
|
72
72
|
Database request-branch PRs retain their separate policy. This Git-only skill never applies SQL, provisions paid resources or publishes database production. Read-only identities cannot substitute for deploy credentials.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "ZAIP GitHub Deploy"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "Use $zaip-skill-github-deploy para
|
|
3
|
+
short_description: "Deploy GitHub; npm via Actions no builder ZAIP"
|
|
4
|
+
default_prompt: "Use $zaip-skill-github-deploy para o pedido explicito 'faca deploy': no builder zaip-aios, publique a Release pelo fluxo protegido e confirme o workflow npm e o registro; em consumidores, siga a politica GitHub-only, respeitando pedidos push-only."
|
|
5
5
|
policy:
|
|
6
6
|
allow_implicit_invocation: true
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
The exact command “faça deploy” authorizes publication of everything versionable in the selected worktree, including tracked and untracked files, after the safety gates below. It does not authorize provider deployment.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
An explicit current-turn request to `deploy`, `push`, `publicar`, `publicação` or GitHub publication selects this skill. For the verified `zaip-ai/zaip-aios` source, a default “faça deploy” includes the guarded Git push, GitHub Release and terminal observation of the npm workflow it triggers. Consumer repositories remain GitHub-only. Discussing or editing deployment does not authorize publication, and neither route authorizes provider deployment.
|
|
7
7
|
|
|
8
8
|
## Authorization
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ Treat deploy as Git-only publication. An explicit current-turn request to `deplo
|
|
|
11
11
|
- The request authorizes the initial publication, automatic reconciliation needed to publish the selected branch, commits covering all versionable pending changes in the selected worktree, and up to five repair cycles needed to make required local and remote GitHub checks pass. Do not stop merely because the worktree is dirty, history is behind/diverged, generated files are pending, or a local gate has a repairable failure.
|
|
12
12
|
- Limit repairs to the intended repository state and the evidenced failure. Do not add unrelated features or broaden product scope.
|
|
13
13
|
- Never force push, rewrite history, replace remotes, change credentials or Git/SSH configuration, bypass checks, or deploy to another service.
|
|
14
|
-
- Do not create lifecycle artifacts
|
|
14
|
+
- Do not create lifecycle artifacts merely to publish already-existing commits. The deploy authorization permits staging every inventoried versionable path in the selected worktree after secret, size, and ignore checks; it never authorizes changes outside that worktree.
|
|
15
15
|
- Every product commit needs its evidenced Task and canonical Task title, including Task-first. If ownership is missing, materialize the authorized work before editing/committing; never borrow the latest global Task. Only records/local-only snapshots are exempt. Omit nonexistent PRD/SPEC lineage. Explicit deploy authorizes reviewed path staging, never force, destructive reset, history rewrite, or credential changes.
|
|
16
16
|
|
|
17
17
|
## Mandatory authorization record
|
|
@@ -99,6 +99,8 @@ Every authorized deploy must first compose `$zaip-skill-release-qualification` a
|
|
|
99
99
|
|
|
100
100
|
For `zaip-ai/zaip-aios` framework releases, use `scripts/local-release-deploy.mjs`: it prepares and verifies the candidate, pushes the exact SHA to `main`, uploads the verified assets to a draft release, and publishes that release. npm publication remains exclusively in GitHub Actions. Run the folder-scoped SSH preflight with the explicitly configured frontend scope before this entrypoint.
|
|
101
101
|
|
|
102
|
+
Before classifying a missing signer as a blocker, inspect the configured external signing-key path, trust store, policy and protected GitHub release variables without exposing secret contents. The private Ed25519 release key is distinct from the Git SSH key and a local `.env` npm token; the latter does not automatically reach Actions. If a required key or protected setting truly is absent, stop with its exact name and recovery action. Do not generate a replacement, rotate public trust or publish locally without separate authority. The user's 2026-09-23 standing authorization permits routine version-specific updates of **only** `ZAIP_LOCAL_RELEASE_POLICY_B64` in the verified `zaip-ai/zaip-aios` repository. When the enrolled policy names an older release, prepare a reviewed policy for the exact new version and fixed qualification profile; preserve repository, branch, channel, publication mode, non-force/non-replacement controls and trusted key. After successful signed local qualification and before Release publication, set that one variable to the exact UTF-8 policy bytes encoded in base64 and read it back byte-for-byte. A missing key, changed trust, weaker policy, failed readback or insufficient GitHub permission remains a blocker, not a reason to ask again for the already-authorized routine version update.
|
|
103
|
+
|
|
102
104
|
After exact-candidate qualification, a missing GitHub Release is normal. Unless the request is explicitly push-only, use the configured entrypoint to create a draft for that SHA or resume a verified draft for the same SHA; do not recreate an existing Release. A published Release for the exact SHA is verified as a no-op, or its failed checks are repaired within the bounded cycle. An authentication or API error does not prove that a Release is absent.
|
|
103
105
|
|
|
104
106
|
For a consumer repository, bootstrap its own Ed25519 trust store and define `configured_branch`, GitHub version `vN.N`, and `required_commands` in its project policy. `prepare` runs only those policy commands and signs a receipt after the Git identity is unchanged before and after them. `verify` checks the configured branch, exact SHA/tree, policy digest and trusted key. `guarded-push` runs prepare and verify before its explicit push command; a failed required command, dirty checkout, changed SHA/policy, or unavailable key prevents that command from running. This consumer flow is GitHub-only: it has no npm channel, package manifest version, or TGZ contract.
|
|
@@ -134,4 +136,4 @@ Unless the request is push-only, resolve the release identity before mutation us
|
|
|
134
136
|
|
|
135
137
|
## Success condition
|
|
136
138
|
|
|
137
|
-
|
|
139
|
+
For a full framework deploy, finish only when the local and remote hashes match, the intended worktree is clean, the exact Release identity/assets/body are verified, the associated `publish-cli.yml` run reaches success, and the npm registry confirms the intended `@zaip-ai/cli@N.N.0` version, dist-tag and artifact integrity. The workflow uses its configured GitHub credential/environment; a local `.env` does not publish the package. A published Release with failed or unobserved npm is partial, never a completed deploy. For a consumer or an explicit push-only request, apply only its authorized GitHub scope. Otherwise report the exact terminal blocker and repair cycles consumed.
|