@zaip-ai/cli 1.0.4 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/services/adapter-hook-sources.d.ts +3 -0
- package/dist/services/adapter-hook-sources.d.ts.map +1 -0
- package/dist/services/adapter-hook-sources.js +3 -0
- package/dist/services/adapter-hook-sources.js.map +1 -0
- package/dist/services/adapters.d.ts.map +1 -1
- package/dist/services/adapters.js +76 -601
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/adapters.test.js +41 -0
- package/dist/services/adapters.test.js.map +1 -1
- package/dist/services/agent-adapters.d.ts +7 -0
- package/dist/services/agent-adapters.d.ts.map +1 -1
- package/dist/services/agent-adapters.js +81 -13
- package/dist/services/agent-adapters.js.map +1 -1
- package/dist/services/agent-adapters.test.js +56 -7
- package/dist/services/agent-adapters.test.js.map +1 -1
- package/dist/services/claude-settings-template.d.ts +2 -0
- package/dist/services/claude-settings-template.d.ts.map +1 -0
- package/dist/services/claude-settings-template.js +8 -0
- package/dist/services/claude-settings-template.js.map +1 -0
- package/dist/services/codex-config-template.d.ts +3 -0
- package/dist/services/codex-config-template.d.ts.map +1 -0
- package/dist/services/codex-config-template.js +98 -0
- package/dist/services/codex-config-template.js.map +1 -0
- package/dist/services/codex-pre-tool-hook-template.d.ts +2 -0
- package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -0
- package/dist/services/codex-pre-tool-hook-template.js +472 -0
- package/dist/services/codex-pre-tool-hook-template.js.map +1 -0
- package/dist/services/codex-rules.d.ts +1 -1
- package/dist/services/codex-rules.d.ts.map +1 -1
- package/dist/services/codex-rules.js +22 -13
- package/dist/services/codex-rules.js.map +1 -1
- package/dist/services/codex-subagent-hook-template.d.ts +2 -0
- package/dist/services/codex-subagent-hook-template.d.ts.map +1 -0
- package/dist/services/codex-subagent-hook-template.js +250 -0
- package/dist/services/codex-subagent-hook-template.js.map +1 -0
- package/dist/services/doctor.d.ts.map +1 -1
- package/dist/services/doctor.js +8 -35
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/global-codex-config.d.ts +12 -6
- package/dist/services/global-codex-config.d.ts.map +1 -1
- package/dist/services/global-codex-config.js +72 -53
- package/dist/services/global-codex-config.js.map +1 -1
- package/dist/services/global-codex-config.test.js +35 -84
- package/dist/services/global-codex-config.test.js.map +1 -1
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +55 -19
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/local-state-migration.d.ts +19 -0
- package/dist/services/local-state-migration.d.ts.map +1 -0
- package/dist/services/local-state-migration.js +122 -0
- package/dist/services/local-state-migration.js.map +1 -0
- package/dist/services/logger.d.ts.map +1 -1
- package/dist/services/logger.js +4 -6
- package/dist/services/logger.js.map +1 -1
- package/dist/services/logger.test.js +36 -3
- package/dist/services/logger.test.js.map +1 -1
- package/dist/services/runtime-template.test.js +22 -18
- package/dist/services/runtime-template.test.js.map +1 -1
- package/dist/services/template-manifest.d.ts +1 -0
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +31 -11
- package/dist/services/template-manifest.js.map +1 -1
- package/dist/services/transactional-files.d.ts.map +1 -1
- package/dist/services/transactional-files.js +84 -27
- package/dist/services/transactional-files.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/templates/.agents/config/agents/catalog.yaml +1081 -145
- package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +37 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +35 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +31 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +30 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +32 -0
- package/templates/.agents/config/clients.yaml +152 -0
- package/templates/{.zaip-aios → .agents/config}/pricing/models.json +4 -13
- package/templates/.agents/config/project.yaml +24 -1
- package/templates/.agents/dashboard/.zaip-managed.json +1140 -12
- package/templates/.agents/dashboard/README.md +23 -4
- package/templates/.agents/dashboard/apps/frontend/dist/assets/AgentCatalogSettingsPage-CLYIi7Vo.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/AgentCatalogSettingsPage-DTDNVQGX.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-Cv-JcoxP.js +1320 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/DashboardHelpDialog-Je5nK-Et.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/PricingSettingsDialog-CzEggcRb.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-05YKn6Z4.js +3 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-YO3yqtgV.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/dashboard-localization-C98LGC-Q.js +231 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-8AzCnl3a.js +77 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DdBYQ_8D.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +2 -2
- package/templates/{.zaip-aios/dashboard/apps/frontend/dist → .agents/dashboard/apps/frontend}/index.html +1 -2
- package/templates/.agents/dashboard/apps/frontend/package.json +22 -0
- package/templates/.agents/dashboard/apps/frontend/src/AgentCatalogSettingsPage.tsx +617 -0
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +766 -0
- package/templates/.agents/dashboard/apps/frontend/src/AppLoadingPanels.tsx +134 -0
- package/templates/.agents/dashboard/apps/frontend/src/DashboardCapabilityNav.tsx +117 -0
- package/templates/.agents/dashboard/apps/frontend/src/DashboardHelpDialog.tsx +242 -0
- package/templates/.agents/dashboard/apps/frontend/src/PricingSettingsDialog.tsx +295 -0
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +719 -0
- package/templates/.agents/dashboard/apps/frontend/src/TraceabilityWorkspace.tsx +72 -0
- package/templates/.agents/dashboard/apps/frontend/src/agent-catalog-settings-page.css +660 -0
- package/templates/.agents/dashboard/apps/frontend/src/agent-catalog-settings.test.ts +249 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +31 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +374 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-capability-nav.css +81 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-help-dialog.css +202 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.test.ts +72 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.ts +361 -0
- package/templates/.agents/dashboard/apps/frontend/src/loading-feedback.css +42 -0
- package/templates/{.zaip-aios/design/apps/catalog → .agents/dashboard/apps/frontend}/src/main.tsx +5 -1
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.test.ts +18 -0
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.ts +22 -0
- package/templates/.agents/dashboard/apps/frontend/src/pricing-settings-dialog.css +309 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +129 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-page.css +335 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +57 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +79 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.ts +17 -0
- package/templates/.agents/dashboard/apps/frontend/src/styles.css +761 -0
- package/templates/.agents/dashboard/apps/frontend/src/traceability-workspace.css +70 -0
- package/templates/{.zaip-aios/design/apps/catalog → .agents/dashboard/apps/frontend}/tsconfig.json +1 -7
- package/templates/.agents/dashboard/apps/frontend/vite.config.ts +22 -0
- package/templates/{.zaip-aios/design/apps/catalog → .agents/dashboard/apps/frontend}/vitest.config.ts +3 -1
- package/templates/.agents/dashboard/dashboard.config.json +4 -0
- package/templates/.agents/dashboard/modules/cost-monitor/composition-root.ts +6 -0
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +24 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/agent-groups.test.ts +43 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/agent-groups.ts +40 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/contracts.ts +221 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/provider.test.ts +19 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/provider.ts +5 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.test.ts +75 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.tsx +260 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostFilters.tsx +351 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostModelsAuditTable.test.ts +51 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostModelsAuditTable.tsx +327 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorIcons.tsx +50 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +251 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +775 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostPeriodAverageCards.tsx +89 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostSummary.tsx +64 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableIcons.tsx +9 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +708 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +797 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/MacroCostTable.test.ts +79 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/MacroCostTable.tsx +218 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-duration.ts +17 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-copy.ts +84 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-embedded.css +11 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-layout.test.ts +28 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-responsive.css +123 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-summary.ts +130 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor.css +683 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-run-origin.css +28 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-table-metrics.ts +77 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/index.ts +2 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.test.ts +111 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +140 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/run-display.ts +10 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/aggregate.test.ts +213 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/aggregate.ts +86 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-pricing.test.ts +132 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection-filtering.test.ts +193 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection-pricing.test.ts +167 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test-fixtures.ts +213 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test.ts +793 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.ts +622 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/index.ts +2 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/run-telemetry.test.ts +36 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/run-telemetry.ts +22 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/task-cost-groups.test.ts +137 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/task-cost-groups.ts +64 -0
- package/templates/.agents/dashboard/modules/cost-monitor/tsconfig.json +10 -0
- package/templates/.agents/dashboard/modules/operations/composition-root.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/package.json +30 -0
- package/templates/.agents/dashboard/modules/operations/src/contracts.ts +409 -0
- package/templates/.agents/dashboard/modules/operations/src/duration-population.test.ts +16 -0
- package/templates/.agents/dashboard/modules/operations/src/duration-population.ts +35 -0
- package/templates/.agents/dashboard/modules/operations/src/react/EntityDetailsDialog.tsx +309 -0
- package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.test.ts +33 -0
- package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.tsx +491 -0
- package/templates/.agents/dashboard/modules/operations/src/react/MacroBoard.test.ts +28 -0
- package/templates/.agents/dashboard/modules/operations/src/react/MacroBoard.tsx +313 -0
- package/templates/.agents/dashboard/modules/operations/src/react/MacroGrid.tsx +61 -0
- package/templates/.agents/dashboard/modules/operations/src/react/MacroPlanningDialog.tsx +427 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationDateFilters.test.ts +32 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationDateFilters.tsx +124 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsIcons.tsx +58 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.helpers.tsx +412 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +498 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +621 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +800 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageDetails.tsx +113 -0
- package/templates/.agents/dashboard/modules/operations/src/react/PeriodSummaryTable.tsx +248 -0
- package/templates/.agents/dashboard/modules/operations/src/react/PrdDocumentDialog.tsx +235 -0
- package/templates/.agents/dashboard/modules/operations/src/react/TaskBoard.test.ts +141 -0
- package/templates/.agents/dashboard/modules/operations/src/react/TaskBoard.tsx +352 -0
- package/templates/.agents/dashboard/modules/operations/src/react/TaskDetailsDialog.tsx +134 -0
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.tsx +502 -0
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.test.ts +48 -0
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.tsx +298 -0
- package/templates/.agents/dashboard/modules/operations/src/react/card-elapsed-time.css +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/card-elapsed-time.test.ts +47 -0
- package/templates/.agents/dashboard/modules/operations/src/react/card-elapsed-time.ts +66 -0
- package/templates/.agents/dashboard/modules/operations/src/react/card-type-colors.css +35 -0
- package/templates/.agents/dashboard/modules/operations/src/react/conversation-rows.test.ts +50 -0
- package/templates/.agents/dashboard/modules/operations/src/react/conversation-rows.ts +75 -0
- package/templates/.agents/dashboard/modules/operations/src/react/entity-details-dialog.css +76 -0
- package/templates/.agents/dashboard/modules/operations/src/react/execution-metrics.test.ts +170 -0
- package/templates/.agents/dashboard/modules/operations/src/react/execution-metrics.ts +88 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +32 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +93 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExportProgressToast.tsx +26 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/export-layout.test.ts +67 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/export-session.test.ts +208 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/export-session.ts +194 -0
- package/templates/.agents/dashboard/modules/operations/src/react/export/export.css +31 -0
- package/templates/.agents/dashboard/modules/operations/src/react/format-card-created-at.test.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/format-card-created-at.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/format-rounded-duration.test.ts +27 -0
- package/templates/.agents/dashboard/modules/operations/src/react/format-rounded-duration.ts +14 -0
- package/templates/.agents/dashboard/modules/operations/src/react/fullscreen-dialog.test.tsx +113 -0
- package/templates/.agents/dashboard/modules/operations/src/react/index.ts +10 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-dialog-data.test.ts +70 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-dialog-data.ts +24 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-dialog-usage.tsx +83 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-planning-dialog-responsive.css +74 -0
- package/templates/.agents/dashboard/modules/operations/src/react/macro-planning-dialog.css +752 -0
- package/templates/.agents/dashboard/modules/operations/src/react/metric-accessibility.test.ts +17 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-date-range.test.ts +55 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-date-range.ts +135 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.test.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operation-duration.ts +27 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-date-filters.css +154 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-filter-panel.css +187 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-layout.test.ts +15 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +69 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview.css +588 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-page-filters.ts +51 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-responsive.css +94 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-table-badges.css +57 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations-view-order.test.ts +19 -0
- package/templates/.agents/dashboard/modules/operations/src/react/operations.css +753 -0
- package/templates/.agents/dashboard/modules/operations/src/react/period-summary.css +12 -0
- package/templates/.agents/dashboard/modules/operations/src/react/period-summary.test.ts +472 -0
- package/templates/.agents/dashboard/modules/operations/src/react/period-summary.ts +237 -0
- package/templates/.agents/dashboard/modules/operations/src/react/popup-localization.test.ts +48 -0
- package/templates/.agents/dashboard/modules/operations/src/react/run-scope.test.ts +29 -0
- package/templates/.agents/dashboard/modules/operations/src/react/run-scope.ts +25 -0
- package/templates/.agents/dashboard/modules/operations/src/react/sort-by-created-at.test.ts +35 -0
- package/templates/.agents/dashboard/modules/operations/src/react/sort-by-created-at.ts +11 -0
- package/templates/.agents/dashboard/modules/operations/src/react/status-labels.ts +36 -0
- package/templates/.agents/dashboard/modules/operations/src/react/table-order.test.ts +34 -0
- package/templates/.agents/dashboard/modules/operations/src/react/table-order.ts +15 -0
- package/templates/.agents/dashboard/modules/operations/src/react/task-origin-badge.css +23 -0
- package/templates/.agents/dashboard/modules/operations/src/react/task-origin.test.ts +46 -0
- package/templates/.agents/dashboard/modules/operations/src/react/task-origin.ts +27 -0
- package/templates/.agents/dashboard/modules/operations/src/react/unified-work-board.css +187 -0
- package/templates/.agents/dashboard/modules/operations/src/react/use-current-time.ts +12 -0
- package/templates/.agents/dashboard/modules/operations/src/react/use-infinite-column.ts +29 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.test.ts +247 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.ts +179 -0
- package/templates/.agents/dashboard/modules/operations/src/server/build-operations-projection-helpers.ts +43 -0
- package/templates/.agents/dashboard/modules/operations/src/server/build-operations-projection.test.ts +364 -0
- package/templates/.agents/dashboard/modules/operations/src/server/build-operations-projection.ts +787 -0
- package/templates/.agents/dashboard/modules/operations/src/server/canonical-compat.ts +176 -0
- package/templates/.agents/dashboard/modules/operations/src/server/canonical-run-projection.ts +140 -0
- package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.test.ts +137 -0
- package/templates/.agents/dashboard/modules/operations/src/server/execution-relationship-counts.ts +121 -0
- package/templates/.agents/dashboard/modules/operations/src/server/filter.test.ts +33 -0
- package/templates/.agents/dashboard/modules/operations/src/server/filter.ts +17 -0
- package/templates/.agents/dashboard/modules/operations/src/server/index.ts +2 -0
- package/templates/.agents/dashboard/modules/operations/src/server/internal.ts +8 -0
- package/templates/.agents/dashboard/modules/operations/src/server/macro.ts +68 -0
- package/templates/.agents/dashboard/modules/operations/src/server/metric-coverage.ts +60 -0
- package/templates/.agents/dashboard/modules/operations/src/server/planned-task-previews.test.ts +22 -0
- package/templates/.agents/dashboard/modules/operations/src/server/planned-task-previews.ts +55 -0
- package/templates/.agents/dashboard/modules/operations/src/server/read-task-detail.ts +86 -0
- package/templates/.agents/dashboard/modules/operations/src/server/run-order.test.ts +23 -0
- package/templates/.agents/dashboard/modules/operations/src/server/run-order.ts +11 -0
- package/templates/.agents/dashboard/modules/operations/src/server/runs.test.ts +27 -0
- package/templates/.agents/dashboard/modules/operations/src/server/runs.ts +77 -0
- package/templates/.agents/dashboard/modules/operations/src/server/task-test-counts.test.ts +32 -0
- package/templates/.agents/dashboard/modules/operations/src/server/task-test-counts.ts +49 -0
- package/templates/.agents/dashboard/modules/operations/src/server/usage.test.ts +25 -0
- package/templates/.agents/dashboard/modules/operations/src/server/usage.ts +139 -0
- package/templates/.agents/dashboard/modules/operations/src/work-readiness.ts +26 -0
- package/templates/.agents/dashboard/modules/operations/tsconfig.json +10 -0
- package/templates/.agents/dashboard/modules/traceability/composition-root.ts +7 -0
- package/templates/.agents/dashboard/modules/traceability/golden/golden-view.test.ts +27 -0
- package/templates/.agents/dashboard/modules/traceability/golden/golden-view.ts +57 -0
- package/templates/.agents/dashboard/modules/traceability/golden/index.ts +1 -0
- package/templates/.agents/dashboard/modules/traceability/package.json +26 -0
- package/templates/.agents/dashboard/modules/traceability/src/contracts.ts +76 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TaskTracePanel.test.ts +80 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TaskTracePanel.tsx +681 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TraceDocumentDialog.tsx +34 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TraceStageDetail.tsx +129 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/TraceStageDialog.tsx +49 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/index.ts +1 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-embedded.css +9 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-navigation.css +122 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-stage-detail.css +175 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-stage-dialog.css +127 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability-usage.css +120 -0
- package/templates/.agents/dashboard/modules/traceability/src/react/traceability.css +727 -0
- package/templates/.agents/dashboard/modules/traceability/src/server/build-task-trace.test.ts +311 -0
- package/templates/.agents/dashboard/modules/traceability/src/server/build-task-trace.ts +421 -0
- package/templates/.agents/dashboard/modules/traceability/src/server/index.ts +1 -0
- package/templates/.agents/dashboard/modules/traceability/tsconfig.json +10 -0
- package/templates/.agents/dashboard/packages/branding/package.json +14 -0
- package/templates/.agents/dashboard/packages/branding/src/index.ts +10 -0
- package/templates/.agents/dashboard/packages/branding/tsconfig.json +7 -0
- package/templates/.agents/dashboard/packages/contracts/package.json +17 -0
- package/templates/.agents/dashboard/packages/contracts/src/export.ts +29 -0
- package/templates/.agents/dashboard/packages/contracts/src/index.ts +155 -0
- package/templates/.agents/dashboard/packages/contracts/src/period-counts.test.ts +48 -0
- package/templates/.agents/dashboard/packages/contracts/tsconfig.json +7 -0
- package/templates/.agents/dashboard/packages/data-export/package.json +19 -0
- package/templates/.agents/dashboard/packages/data-export/src/index.test.ts +268 -0
- package/templates/.agents/dashboard/packages/data-export/src/index.ts +84 -0
- package/templates/.agents/dashboard/packages/data-export/src/ooxml-stream.test.ts +19 -0
- package/templates/.agents/dashboard/packages/data-export/src/ooxml-stream.ts +260 -0
- package/templates/.agents/dashboard/packages/local-runtime/package.json +31 -0
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +68 -46
- package/templates/.agents/dashboard/packages/local-runtime/src/agent-catalog-settings.test.ts +224 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/agent-catalog-settings.ts +320 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/export/index.ts +7 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/manifest-runs.ts +204 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +92 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +32 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/runtime.mjs +222 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-settings.test.ts +217 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +526 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-summary-helpers.ts +73 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test-fixtures.ts +147 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +580 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +799 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/start-dashboard.mjs +81 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +85 -33
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +378 -0
- package/templates/.agents/dashboard/packages/local-runtime/tsconfig.json +8 -0
- package/templates/.agents/dashboard/packages/ui/package.json +18 -0
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.test.mjs +20 -0
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.tsx +273 -0
- package/templates/.agents/dashboard/packages/ui/src/DataTable.test.tsx +61 -0
- package/templates/.agents/dashboard/packages/ui/src/DataTable.tsx +292 -0
- package/templates/.agents/dashboard/packages/ui/src/PeriodAverageCards.test.tsx +27 -0
- package/templates/.agents/dashboard/packages/ui/src/PeriodAverageCards.tsx +27 -0
- package/templates/.agents/dashboard/packages/ui/src/format.test.ts +54 -0
- package/templates/.agents/dashboard/packages/ui/src/format.ts +81 -0
- package/templates/.agents/dashboard/packages/ui/src/index.ts +6 -0
- package/templates/.agents/dashboard/packages/ui/src/period-average-cards.css +64 -0
- package/templates/.agents/dashboard/packages/ui/src/ui.css +451 -0
- package/templates/.agents/dashboard/packages/ui/tsconfig.json +10 -0
- package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +214 -0
- package/templates/.agents/dashboard/packages/windows-launcher/ZaipDashboardLauncher.csproj +11 -0
- package/templates/.agents/dashboard/packages/windows-launcher/build-dashboard-launcher.ps1 +142 -0
- package/templates/.agents/dashboard/packages/windows-launcher/zaip-dashboard.cmd +4 -0
- package/templates/.agents/dashboard/tests/e2e/package.json +18 -0
- package/templates/.agents/dashboard/tests/e2e/playwright.config.ts +33 -0
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +531 -0
- package/templates/.agents/dashboard/tests/e2e/tsconfig.json +9 -0
- package/templates/.agents/dashboard/zaip-dashboard.exe +0 -0
- package/templates/{.zaip-aios → .agents}/design/.zaip-managed.json +62 -50
- package/templates/.agents/design/DESIGN.md +7 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-BEmIE7WE.css +1 -0
- package/templates/{.zaip-aios/design/apps/catalog/dist/assets/index-Bvwc3Bgw.js → .agents/design/apps/catalog/dist/assets/index-CqqYWY2f.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/assets/{index-Bvwc3Bgw.js → index-D9pj7Jlf.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/index.html +2 -2
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/CatalogShell-BWY-80s4.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{Color-6AOWCN3U-D8qyAXo4.js → Color-6AOWCN3U-B-kAgAjB.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-Be2mDUQj.js +27 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-DRx9blDs.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{DocsRenderer-JROSPFPF-LmiVo77Q.js → DocsRenderer-JROSPFPF-BVN7xHtv.js} +4 -4
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{WithTooltip-7X4HQR7L-CTMWAwDe.js → WithTooltip-7X4HQR7L-CDHtKYkz.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-DRQKCCAG-DUhJxxRU.js → chunk-DRQKCCAG-D6AsDkMK.js} +1 -1
- package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-9RCn9-l7.js → .agents/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-B4m5uloN.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{components-BX1OfYUi.js → components-CN8YyTUg.js} +5 -5
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-EwuTh8Zk.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{iframe-LMhZM1ce.js → iframe-9yZfIsdT.js} +3 -3
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-BEmIE7WE.css +1 -0
- package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/react-18-jAz3avmR.js → .agents/design/apps/catalog/dist/storybook/assets/react-18-BoCSnq6H.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-DyL61NPT.js +1 -0
- package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-DV8X2acD.js → .agents/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-Bnn_nMwJ.js} +1 -1
- package/templates/{.zaip-aios/design/apps/catalog/dist/storybook/assets/theming-CHbHkcNi.js → .agents/design/apps/catalog/dist/storybook/assets/theming-DS_ue2sb.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/iframe.html +2 -2
- package/templates/.agents/design/apps/catalog/dist/storybook/index.json +1 -1
- package/templates/.agents/design/apps/catalog/src/components/Primitives.tsx +168 -2
- package/templates/.agents/design/apps/catalog/src/components/dialog-focus.test.ts +42 -0
- package/templates/.agents/design/apps/catalog/src/components/dialog-focus.ts +38 -0
- package/templates/.agents/design/apps/catalog/src/design-contract.test.ts +37 -8
- package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +89 -28
- package/templates/.agents/design/apps/catalog/src/stories/Components.stories.tsx +54 -0
- package/templates/.agents/design/apps/catalog/src/styles/components.css +204 -3
- package/templates/.agents/design/apps/catalog/src/styles/design-system.css +2 -0
- package/templates/.agents/design/apps/catalog/src/styles.css +5 -0
- package/templates/.agents/design/tokens.json +9 -1
- package/templates/.agents/requirements/autonomous-assurance.md +9 -10
- package/templates/.agents/requirements/comparative-audit.md +22 -0
- package/templates/.agents/requirements/context-engine.md +5 -5
- package/templates/.agents/requirements/cost-observability.md +3 -2
- package/templates/.agents/requirements/data-export.md +57 -0
- package/templates/.agents/requirements/design-system.md +2 -2
- package/templates/.agents/requirements/execution-engine.md +8 -6
- package/templates/.agents/requirements/kanban-dashboard.md +3 -3
- package/templates/.agents/requirements/model-orchestration.md +11 -11
- package/templates/.agents/requirements/public-distribution.md +4 -4
- package/templates/.agents/requirements/software-architecture.md +4 -4
- package/templates/.agents/requirements/strategic-improvements.md +24 -0
- package/templates/.agents/requirements/work-lifecycle.md +20 -10
- package/templates/.agents/requirements/zaip-strategic-95.md +20 -0
- package/templates/.agents/rules/{zaip/architecture.md → architecture.md} +1 -1
- package/templates/{.zaip-aios/templates/rules/zaip → .agents/rules}/context.md +3 -3
- package/templates/.agents/rules/core.md +21 -0
- package/templates/.agents/rules/{zaip/evolution.md → evolution.md} +1 -1
- package/templates/.agents/rules/frontend-lite.md +18 -0
- package/templates/{.zaip-aios/templates/rules/zaip → .agents/rules}/model-orchestration.md +1 -1
- package/templates/.agents/rules/run-lifecycle-closure.md +24 -0
- package/templates/{.zaip-aios/templates/rules/zaip → .agents/rules}/security.md +1 -1
- package/templates/.agents/rules/text-writing-utf8.md +12 -0
- package/templates/.agents/rules/workflow.md +25 -0
- package/templates/{.zaip-aios → .agents/runtime}/bin/zaip.mjs +399 -195
- package/templates/.agents/runtime/checksums.sha256 +9 -0
- package/templates/.agents/runtime/manifest.json +16 -0
- package/templates/{.zaip-aios → .agents/runtime}/sbom.cdx.json +532 -10
- package/templates/.agents/skills/criar-pasta-obsidian/SKILL.md +20 -0
- package/templates/.agents/skills/criar-pasta-obsidian/agents/openai.yaml +4 -0
- package/templates/.agents/skills/criar-pasta-obsidian/scripts/generate-obsidian-vault.mjs +414 -0
- package/templates/.agents/skills/criar-pasta-obsidian/scripts/generate-obsidian-vault.test.mjs +144 -0
- package/templates/.agents/skills/zaip-aios/SKILL.md +2 -2
- package/templates/.agents/skills/zaip-aios/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-adapters/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-backend/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-backend/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-cloud-engineering/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-cloud-engineering/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-config/SKILL.md +3 -3
- package/templates/.agents/skills/zaip-skill-data-analyst/SKILL.md +23 -0
- package/templates/.agents/skills/zaip-skill-data-analyst/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-design-system/SKILL.md +50 -0
- package/templates/.agents/skills/zaip-skill-design-system/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-design-system/references/scope.md +21 -0
- package/templates/.agents/skills/zaip-skill-enforce-architecture/SKILL.md +2 -2
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +11 -8
- package/templates/.agents/skills/zaip-skill-execution/references/prepared-plan.md +2 -0
- package/templates/.agents/skills/zaip-skill-frontend/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-frontend/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +41 -15
- package/templates/.agents/skills/zaip-skill-github-deploy/agents/openai.yaml +2 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +80 -0
- package/templates/.agents/skills/zaip-skill-github-setup/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-marketing/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-move-prd/SKILL.md +10 -6
- package/templates/.agents/skills/zaip-skill-move-spec/SKILL.md +9 -6
- package/templates/.agents/skills/zaip-skill-observability/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-prd/SKILL.md +27 -11
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/SKILL.md +3 -4
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +59 -13
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +131 -28
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +81 -2
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.mjs +167 -0
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.test.mjs +267 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/SKILL.md +55 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/references/refactor-map-contract.md +33 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/references/visual-modes.md +17 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/scripts/inventory-source.mjs +181 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/scripts/refactor-scripts.test.mjs +293 -0
- package/templates/.agents/skills/zaip-skill-refactor-existing-code/scripts/validate-refactor-map.mjs +294 -0
- package/templates/.agents/skills/zaip-skill-requirements/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-review/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-rules/SKILL.md +4 -4
- package/templates/.agents/skills/zaip-skill-setup/SKILL.md +2 -2
- package/templates/.agents/skills/zaip-skill-spec/SKILL.md +10 -10
- package/templates/.agents/skills/zaip-skill-task/SKILL.md +3 -3
- package/templates/.agents/skills/zaip-skill-tool-setup/references/secrets.md +1 -1
- package/templates/.agents/skills/zaip-skill-tool-setup/scripts/tool-state.mjs +1 -1
- package/templates/.agents/skills/zaip-skill-website-readiness/SKILL.md +53 -0
- package/templates/.agents/skills/zaip-skill-website-readiness/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-website-readiness/references/capability-checklist.md +32 -0
- package/templates/.agents/tools/catalog.yaml +0 -6
- package/templates/.agents/zaip-aios/README.md +1 -1
- package/templates/.agents/zaip-aios/guides/01-primeiros-passos.md +4 -2
- package/templates/.agents/zaip-aios/guides/03-tasks.md +6 -0
- package/templates/.agents/zaip-aios/guides/04-specs.md +7 -3
- package/templates/.agents/zaip-aios/guides/05-prds.md +26 -1
- package/templates/.agents/zaip-aios/guides/06-execucao.md +10 -0
- package/templates/.agents/zaip-aios/guides/08-contexto-e-tokens.md +1 -1
- package/templates/.agents/zaip-aios/guides/11-observabilidade-e-custos.md +2 -0
- package/templates/.agents/zaip-aios/guides/13-boas-praticas.md +3 -0
- package/templates/.agents/zaip-aios/guides/14-troubleshooting.md +3 -1
- package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +7 -1
- package/templates/.local/gitignore.template +2 -0
- package/templates/template-manifest.json +1650 -1859
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-_yxs47Hd.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-ehU9Etwm.js +0 -1207
- package/templates/.agents/design/apps/catalog/dist/assets/index-B4pfFtvJ.css +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-DkBtOSHX.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-BttERyCr.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Primitives-HZpQ6PjX.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/chunk-W22LQPXL-9RCn9-l7.js +0 -18
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-Bu6KfEwW.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-B4pfFtvJ.css +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-18-jAz3avmR.js +0 -9
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-DvDPBd6Q.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/syntaxhighlighter-YFXUGROL-DV8X2acD.js +0 -6
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/theming-CHbHkcNi.js +0 -39
- package/templates/.agents/rules/project/.gitkeep +0 -0
- package/templates/.agents/rules/zaip/context.md +0 -22
- package/templates/.agents/rules/zaip/core.md +0 -24
- package/templates/.agents/rules/zaip/model-orchestration.md +0 -48
- package/templates/.agents/rules/zaip/security.md +0 -20
- package/templates/.agents/rules/zaip/workflow.md +0 -35
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/inspect-local-sqlite.py +0 -52
- package/templates/.agents/tools/mcp/development/sqlite/README.md +0 -20
- package/templates/.agents/tools/mcp/development/sqlite/manifest.yaml +0 -25
- package/templates/.zaip-aios/checksums.sha256 +0 -370
- package/templates/.zaip-aios/dashboard/.zaip-managed.json +0 -46
- package/templates/.zaip-aios/dashboard/README.md +0 -91
- package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/index-_yxs47Hd.css +0 -1
- package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/index-ehU9Etwm.js +0 -1207
- package/templates/.zaip-aios/dashboard/apps/frontend/dist/assets/logo_novo_azul-BBx5pA2B.png +0 -0
- package/templates/.zaip-aios/dashboard/packages/local-runtime/server.mjs +0 -199
- package/templates/.zaip-aios/dashboard/packages/local-runtime/start-dashboard.mjs +0 -726
- package/templates/.zaip-aios/dashboard/zaip-dashboard.exe +0 -0
- package/templates/.zaip-aios/design/DESIGN.md +0 -180
- package/templates/.zaip-aios/design/README.md +0 -47
- package/templates/.zaip-aios/design/apps/catalog/.storybook/main.ts +0 -15
- package/templates/.zaip-aios/design/apps/catalog/.storybook/preview.ts +0 -21
- package/templates/.zaip-aios/design/apps/catalog/dist/assets/index-B4pfFtvJ.css +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/index.html +0 -14
- package/templates/.zaip-aios/design/apps/catalog/dist/logo_novo_azul.png +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Color-6AOWCN3U-D8qyAXo4.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Components.stories-DkBtOSHX.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-BttERyCr.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/DocsRenderer-JROSPFPF-LmiVo77Q.js +0 -46
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/Primitives-HZpQ6PjX.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/WithTooltip-7X4HQR7L-CTMWAwDe.js +0 -9
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/axe-Bk3eEgJf.js +0 -20
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-242VQQM5-DB2JSNUA.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-DRQKCCAG-DUhJxxRU.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/chunk-QQBDHPVZ-nYh9QWsm.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/components-BX1OfYUi.js +0 -243
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-Bu6KfEwW.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/iframe-B4pfFtvJ.css +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/iframe-LMhZM1ce.js +0 -1154
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/jsx-runtime-f3rHp9ZU.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/matchers-JIUQ3HVY-9iRExWZO.js +0 -28
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/preload-helper-BdFrVu1K.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/assets/react-DvDPBd6Q.js +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/favicon-wrapper.svg +0 -46
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/favicon.svg +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/iframe.html +0 -710
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/index.html +0 -152
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/index.json +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/logo_novo_azul.png +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-bold-italic.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-bold.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-italic.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/nunito-sans-regular.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/a11y-2/manager-bundle.js +0 -57
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/docs-1/manager-bundle.js +0 -18
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -632
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/favicon-wrapper.svg +0 -46
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/favicon.svg +0 -1
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/globals-runtime.js +0 -78957
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/globals.js +0 -24
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/manager-stores.js +0 -23
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/sb-manager/runtime.js +0 -28253
- package/templates/.zaip-aios/design/apps/catalog/dist/storybook/vite-inject-mocker-entry.js +0 -2
- package/templates/.zaip-aios/design/apps/catalog/index.html +0 -13
- package/templates/.zaip-aios/design/apps/catalog/package.json +0 -32
- package/templates/.zaip-aios/design/apps/catalog/public/logo_novo_azul.png +0 -0
- package/templates/.zaip-aios/design/apps/catalog/src/App.tsx +0 -29
- package/templates/.zaip-aios/design/apps/catalog/src/components/CatalogShell.tsx +0 -78
- package/templates/.zaip-aios/design/apps/catalog/src/components/Primitives.tsx +0 -137
- package/templates/.zaip-aios/design/apps/catalog/src/design-contract.test.ts +0 -33
- package/templates/.zaip-aios/design/apps/catalog/src/pages/ComponentsPage.tsx +0 -83
- package/templates/.zaip-aios/design/apps/catalog/src/pages/DesignSystemPage.tsx +0 -185
- package/templates/.zaip-aios/design/apps/catalog/src/stories/Components.stories.tsx +0 -12
- package/templates/.zaip-aios/design/apps/catalog/src/stories/DesignSystem.stories.tsx +0 -12
- package/templates/.zaip-aios/design/apps/catalog/src/styles/catalog.css +0 -315
- package/templates/.zaip-aios/design/apps/catalog/src/styles/components.css +0 -228
- package/templates/.zaip-aios/design/apps/catalog/src/styles/design-system.css +0 -137
- package/templates/.zaip-aios/design/apps/catalog/src/styles.css +0 -85
- package/templates/.zaip-aios/design/apps/catalog/vite.config.ts +0 -10
- package/templates/.zaip-aios/design/packages/local-runtime/package.json +0 -9
- package/templates/.zaip-aios/design/packages/local-runtime/runtime.mjs +0 -238
- package/templates/.zaip-aios/design/packages/local-runtime/runtime.test.mjs +0 -66
- package/templates/.zaip-aios/design/packages/local-runtime/start-design.mjs +0 -46
- package/templates/.zaip-aios/design/packages/windows-launcher/Program.cs +0 -110
- package/templates/.zaip-aios/design/packages/windows-launcher/build-design-launcher.ps1 +0 -107
- package/templates/.zaip-aios/design/tokens.json +0 -52
- package/templates/.zaip-aios/design/zaip-design.exe +0 -0
- package/templates/.zaip-aios/manifest.json +0 -377
- package/templates/.zaip-aios/profiles/clients.json +0 -506
- package/templates/.zaip-aios/profiles/fixtures/architecture/negative/modules/orders/application/queries/list.query.ts +0 -5
- package/templates/.zaip-aios/profiles/fixtures/architecture/negative/modules/orders/domain/order.ts +0 -3
- package/templates/.zaip-aios/profiles/fixtures/architecture/positive/modules/orders/application/queries/list.query.ts +0 -5
- package/templates/.zaip-aios/profiles/typescript-hono-kysely.json +0 -41
- package/templates/.zaip-aios/templates/config/agents/catalog.yaml +0 -246
- package/templates/.zaip-aios/templates/requirements/.gitkeep +0 -0
- package/templates/.zaip-aios/templates/requirements/autonomous-assurance.md +0 -63
- package/templates/.zaip-aios/templates/requirements/context-engine.md +0 -44
- package/templates/.zaip-aios/templates/requirements/cost-observability.md +0 -39
- package/templates/.zaip-aios/templates/requirements/design-system.md +0 -48
- package/templates/.zaip-aios/templates/requirements/execution-engine.md +0 -60
- package/templates/.zaip-aios/templates/requirements/kanban-dashboard.md +0 -30
- package/templates/.zaip-aios/templates/requirements/model-orchestration.md +0 -58
- package/templates/.zaip-aios/templates/requirements/public-distribution.md +0 -40
- package/templates/.zaip-aios/templates/requirements/software-architecture.md +0 -57
- package/templates/.zaip-aios/templates/requirements/work-lifecycle.md +0 -82
- package/templates/.zaip-aios/templates/rules/project/.gitkeep +0 -0
- package/templates/.zaip-aios/templates/rules/zaip/architecture.md +0 -28
- package/templates/.zaip-aios/templates/rules/zaip/core.md +0 -24
- package/templates/.zaip-aios/templates/rules/zaip/evolution.md +0 -22
- package/templates/.zaip-aios/templates/rules/zaip/workflow.md +0 -35
- package/templates/.zaip-aios/templates/skills/.gitkeep +0 -0
- package/templates/.zaip-aios/templates/skills/zaip-aios/SKILL.md +0 -9
- package/templates/.zaip-aios/templates/skills/zaip-skill-adapt-stack/SKILL.md +0 -11
- package/templates/.zaip-aios/templates/skills/zaip-skill-adapt-stack/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-adapters/SKILL.md +0 -15
- package/templates/.zaip-aios/templates/skills/zaip-skill-adapters/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/SKILL.md +0 -19
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/assets/adapter.example.yaml +0 -26
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/references/security-contract.md +0 -10
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/references/server-layout.md +0 -19
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/scripts/inspect-openapi.mjs +0 -60
- package/templates/.zaip-aios/templates/skills/zaip-skill-api-to-mcp/scripts/scaffold-local-mcp.mjs +0 -47
- package/templates/.zaip-aios/templates/skills/zaip-skill-author-skills/SKILL.md +0 -21
- package/templates/.zaip-aios/templates/skills/zaip-skill-author-skills/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-change/SKILL.md +0 -20
- package/templates/.zaip-aios/templates/skills/zaip-skill-change/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-config/SKILL.md +0 -22
- package/templates/.zaip-aios/templates/skills/zaip-skill-config/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-context/SKILL.md +0 -16
- package/templates/.zaip-aios/templates/skills/zaip-skill-context/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-cqrs/SKILL.md +0 -11
- package/templates/.zaip-aios/templates/skills/zaip-skill-cqrs/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-decisions/SKILL.md +0 -14
- package/templates/.zaip-aios/templates/skills/zaip-skill-decisions/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-enforce-architecture/SKILL.md +0 -14
- package/templates/.zaip-aios/templates/skills/zaip-skill-enforce-architecture/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-eval/SKILL.md +0 -14
- package/templates/.zaip-aios/templates/skills/zaip-skill-eval/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-execution/SKILL.md +0 -36
- package/templates/.zaip-aios/templates/skills/zaip-skill-execution/agents/openai.yaml +0 -6
- package/templates/.zaip-aios/templates/skills/zaip-skill-execution/references/prepared-plan.md +0 -31
- package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/SKILL.md +0 -29
- package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-frontend-launcher/references/launcher-contract.md +0 -36
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/SKILL.md +0 -75
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/agents/openai.yaml +0 -6
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-deploy/scripts/preflight.mjs +0 -256
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-setup/SKILL.md +0 -80
- package/templates/.zaip-aios/templates/skills/zaip-skill-github-setup/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-move-prd/SKILL.md +0 -37
- package/templates/.zaip-aios/templates/skills/zaip-skill-move-prd/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-move-spec/SKILL.md +0 -38
- package/templates/.zaip-aios/templates/skills/zaip-skill-move-spec/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-navigate-work/SKILL.md +0 -16
- package/templates/.zaip-aios/templates/skills/zaip-skill-navigate-work/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-observability/SKILL.md +0 -24
- package/templates/.zaip-aios/templates/skills/zaip-skill-observability/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/SKILL.md +0 -17
- package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-openai-docs/references/routing.md +0 -11
- package/templates/.zaip-aios/templates/skills/zaip-skill-prd/SKILL.md +0 -44
- package/templates/.zaip-aios/templates/skills/zaip-skill-prd/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-preview/SKILL.md +0 -16
- package/templates/.zaip-aios/templates/skills/zaip-skill-preview/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/SKILL.md +0 -39
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/inspect-local-sqlite.py +0 -52
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/normalize-run-agents.mjs +0 -63
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +0 -698
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +0 -361
- package/templates/.zaip-aios/templates/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +0 -187
- package/templates/.zaip-aios/templates/skills/zaip-skill-requirements/SKILL.md +0 -16
- package/templates/.zaip-aios/templates/skills/zaip-skill-requirements/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-review/SKILL.md +0 -18
- package/templates/.zaip-aios/templates/skills/zaip-skill-review/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-rules/SKILL.md +0 -19
- package/templates/.zaip-aios/templates/skills/zaip-skill-rules/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-security/SKILL.md +0 -30
- package/templates/.zaip-aios/templates/skills/zaip-skill-security/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-setup/SKILL.md +0 -25
- package/templates/.zaip-aios/templates/skills/zaip-skill-setup/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-spec/SKILL.md +0 -45
- package/templates/.zaip-aios/templates/skills/zaip-skill-spec/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-task/SKILL.md +0 -41
- package/templates/.zaip-aios/templates/skills/zaip-skill-task/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-text-encoding/SKILL.md +0 -27
- package/templates/.zaip-aios/templates/skills/zaip-skill-text-encoding/agents/openai.yaml +0 -6
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/SKILL.md +0 -22
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/agents/openai.yaml +0 -4
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/references/codex-config.md +0 -24
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/references/secrets.md +0 -8
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/configure-local-mcp.mjs +0 -52
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/inspect-tool.mjs +0 -35
- package/templates/.zaip-aios/templates/skills/zaip-skill-tool-setup/scripts/tool-state.mjs +0 -26
- package/templates/.zaip-aios/templates/tools/README.md +0 -9
- package/templates/.zaip-aios/templates/tools/api/asaas/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/asaas/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/github/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/github/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/google-ads/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/google-ads/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/google-analytics/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/google-analytics/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/google-search-console/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/api/google-search-console/manifest.yaml +0 -19
- package/templates/.zaip-aios/templates/tools/api/google-tag-manager/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/google-tag-manager/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/hubspot/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/hubspot/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/instagram-graph/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/instagram-graph/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/kommo-crm/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/kommo-crm/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/linkedin-ads/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/linkedin-ads/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/meta-ads/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/meta-ads/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/openai/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/openai/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/shopify/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/shopify/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/slack/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/slack/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/stripe/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/stripe/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/api/tiktok-ads/README.md +0 -23
- package/templates/.zaip-aios/templates/tools/api/tiktok-ads/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/api/youtube-analytics/README.md +0 -22
- package/templates/.zaip-aios/templates/tools/api/youtube-analytics/manifest.yaml +0 -20
- package/templates/.zaip-aios/templates/tools/catalog.yaml +0 -358
- package/templates/.zaip-aios/templates/tools/mcp/development/browser/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/browser/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/development/filesystem/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/filesystem/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/development/git/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/git/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/development/github/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/github/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/gitlab/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/gitlab/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/jira/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/development/jira/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/development/linear/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/linear/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/notion/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/notion/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/openai-docs/README.md +0 -15
- package/templates/.zaip-aios/templates/tools/mcp/development/openai-docs/manifest.yaml +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/development/postgresql/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/postgresql/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/slack/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/slack/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/development/sqlite/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/development/sqlite/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/infra/aws/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/infra/aws/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/infra/azure/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/azure/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/infra/cloudflare/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/infra/cloudflare/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/infra/docker/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/docker/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/infra/gcp/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/infra/gcp/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/infra/hostinger/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/hostinger/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/infra/kubernetes/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/kubernetes/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/infra/terraform/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/infra/terraform/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-ads/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-ads/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-analytics/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-analytics/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-search-console/README.md +0 -19
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-search-console/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-tag-manager/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/google-tag-manager/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/hubspot/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/marketing/hubspot/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/marketing/instagram-insights/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/instagram-insights/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/linkedin-ads/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/linkedin-ads/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/mailchimp/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/mailchimp/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/meta-ads/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/meta-ads/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/semrush/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/marketing/semrush/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/marketing/tiktok-ads/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/tiktok-ads/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/marketing/youtube-analytics/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/marketing/youtube-analytics/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/cloudwatch/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/cloudwatch/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/datadog/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/datadog/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/elasticsearch/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/elasticsearch/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/grafana/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/grafana/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/kibana/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/kibana/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/loki/README.md +0 -19
- package/templates/.zaip-aios/templates/tools/mcp/observability/loki/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/observability/new-relic/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/new-relic/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/mcp/observability/opentelemetry/README.md +0 -20
- package/templates/.zaip-aios/templates/tools/mcp/observability/opentelemetry/manifest.yaml +0 -25
- package/templates/.zaip-aios/templates/tools/mcp/observability/prometheus/README.md +0 -19
- package/templates/.zaip-aios/templates/tools/mcp/observability/prometheus/manifest.yaml +0 -24
- package/templates/.zaip-aios/templates/tools/mcp/observability/sentry/README.md +0 -21
- package/templates/.zaip-aios/templates/tools/mcp/observability/sentry/manifest.yaml +0 -26
- package/templates/.zaip-aios/templates/tools/policies/approval-rules.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/policies/financial-limits.yaml +0 -6
- package/templates/.zaip-aios/templates/tools/policies/permissions.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/policies/secret-handling.md +0 -7
- package/templates/.zaip-aios/templates/tools/profiles/business.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/profiles/default.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/profiles/development.yaml +0 -13
- package/templates/.zaip-aios/templates/tools/profiles/infrastructure.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/profiles/marketing.yaml +0 -9
- package/templates/.zaip-aios/templates/tools/profiles/observability.yaml +0 -8
- package/templates/.zaip-aios/templates/tools/runtime/README.md +0 -3
- package/templates/.zaip-aios/templates/tools/runtime/api-mcp-runtime.mjs +0 -217
- package/templates/.zaip-aios/templates/tools/runtime/api-mcp-runtime.test.mjs +0 -56
- package/templates/.zaip-aios/templates/tools/runtime/fixtures/definition.json +0 -17
- package/templates/.zaip-aios/templates/tools/runtime/runner.mjs +0 -16
- package/templates/.zaip-aios/templates/tools/runtime/stdio.test.mjs +0 -32
- package/templates/.zaip-aios/templates/tools/state.example.yaml +0 -8
- package/templates/.zaip-aios/templates/zaip-aios/INDEX.md +0 -26
- package/templates/.zaip-aios/templates/zaip-aios/README.md +0 -13
- package/templates/.zaip-aios/templates/zaip-aios/VERSION +0 -1
- package/templates/.zaip-aios/templates/zaip-aios/guides/01-primeiros-passos.md +0 -10
- package/templates/.zaip-aios/templates/zaip-aios/guides/02-requirements.md +0 -12
- package/templates/.zaip-aios/templates/zaip-aios/guides/03-tasks.md +0 -12
- package/templates/.zaip-aios/templates/zaip-aios/guides/04-specs.md +0 -16
- package/templates/.zaip-aios/templates/zaip-aios/guides/05-prds.md +0 -13
- package/templates/.zaip-aios/templates/zaip-aios/guides/06-execucao.md +0 -13
- package/templates/.zaip-aios/templates/zaip-aios/guides/07-revisao-e-validacao.md +0 -8
- package/templates/.zaip-aios/templates/zaip-aios/guides/08-contexto-e-tokens.md +0 -10
- package/templates/.zaip-aios/templates/zaip-aios/guides/09-agentes-e-squads.md +0 -8
- package/templates/.zaip-aios/templates/zaip-aios/guides/10-seguranca.md +0 -206
- package/templates/.zaip-aios/templates/zaip-aios/guides/11-observabilidade-e-custos.md +0 -10
- package/templates/.zaip-aios/templates/zaip-aios/guides/12-instalacao-e-upgrade.md +0 -10
- package/templates/.zaip-aios/templates/zaip-aios/guides/13-boas-praticas.md +0 -12
- package/templates/.zaip-aios/templates/zaip-aios/guides/14-troubleshooting.md +0 -12
- package/templates/.zaip-aios/templates/zaip-aios/guides/15-tools-e-codex.md +0 -25
- package/templates/.zaip-aios/templates/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +0 -47
- /package/templates/{.zaip-aios → .agents/config}/pricing/fx/2026/07/12/usd-brl.json +0 -0
- /package/templates/{.zaip-aios/dashboard/apps/frontend/dist → .agents/dashboard/apps/frontend/public}/icon_zaip.png +0 -0
- /package/templates/{.zaip-aios/dashboard/apps/frontend/dist → .agents/dashboard/apps/frontend/public}/logo_novo_azul.png +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/LICENSE +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/THIRD_PARTY_NOTICES.md +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/VERSION +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/migrations/001-layout-v1.json +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/migrations/002-layout-v2.json +0 -0
- /package/templates/{.zaip-aios → .agents/runtime}/schemas/contracts.schema.json +0 -0
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
export const CODEX_PRE_TOOL_HOOK = String.raw `import { lstat, readFile, readdir, realpath } from "node:fs/promises";
|
|
2
|
+
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const repositoryRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
6
|
+
const deletionCommandPattern = /\b(?:Remove-Item|rm|rmdir|rd|del|erase)\b/i;
|
|
7
|
+
const allowedExplicitNetworkHosts = new Set([
|
|
8
|
+
"127.0.0.1",
|
|
9
|
+
"api.github.com",
|
|
10
|
+
"github.com",
|
|
11
|
+
"localhost",
|
|
12
|
+
"objects.githubusercontent.com",
|
|
13
|
+
"::1",
|
|
14
|
+
]);
|
|
15
|
+
const networkClientPattern = /\b(?:curl|wget|Invoke-WebRequest|Invoke-RestMethod|iwr|irm)\b/i;
|
|
16
|
+
const homeReferencePattern = /(?:\$HOME\b|\$env:(?:USERPROFILE|HOMEDRIVE|HOMEPATH)\b|%(?:USERPROFILE|HOMEDRIVE|HOMEPATH)%|(?:^|[\s"'=])~[\\/])/i;
|
|
17
|
+
const credentialReferencePattern = /(?:^|[\\/\s"'=])(?:\.ssh|\.aws|\.azure|\.kube|\.docker|\.gnupg|\.git-credentials|\.npmrc|\.pypirc|id_(?:rsa|ed25519)|[^\\/\s"']+\.(?:pem|key|p12|pfx))(?:[\\/\s"'=]|$)|(?:^|[\\/\s"'=])\.env(?:[\\/\s"']|$)/i;
|
|
18
|
+
const sensitiveEnvironmentPattern = /(?:\$env:|%|\$)[A-Z0-9_]*(?:TOKEN|SECRET|PASSWORD|API_KEY|PRIVATE_KEY|CREDENTIAL)[A-Z0-9_]*%?/i;
|
|
19
|
+
const destructivePatterns = [
|
|
20
|
+
{
|
|
21
|
+
pattern: /\b(?:Clear-Content|shred)\b/i,
|
|
22
|
+
reason: "Unbounded content destruction is blocked.",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
pattern: /\bgit\s+(?:clean\b|reset\s+--hard\b|checkout\s+--\b|restore\b|branch\s+-d\b|tag\s+-d\b)/i,
|
|
26
|
+
reason: "Destructive Git state changes are blocked.",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
pattern: /\bgit\s+push\b[\s\S]*(?:--force(?:-with-lease|-if-includes)?\b|-f\b|--mirror\b|--delete\b|--all\b|(?:^|\s):\S+)/i,
|
|
30
|
+
reason: "Force, mirror, bulk, and deletion pushes are blocked.",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
pattern: /\bgit\s+commit\b[\s\S]*(?:--amend\b|--no-verify\b|-n\b)/i,
|
|
34
|
+
reason: "Commit history rewrites and hook bypasses are blocked.",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
pattern: /\bgit\s+fetch\b[\s\S]*(?:--all\b|--prune\b|--prune-tags\b)/i,
|
|
38
|
+
reason: "Bulk or pruning fetches are outside the bounded deploy flow.",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
pattern: /\bgit\s+add\b[\s\S]*(?:--force\b|-f\b|(?:^|[\\/\s])(?:\.env(?:\.|\s|$)|[^\s]*\.(?:pem|key|p12|pfx)\b|id_(?:rsa|ed25519)\b))/i,
|
|
42
|
+
reason: "Force-adding or explicitly staging credential-like files is blocked.",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
pattern: /\bgit\s+add\b[\s\S]*(?:\s-A\b|--all\b|(?:^|\s)\.(?:\s|$)|\s-u\b)/i,
|
|
46
|
+
reason: "Broad Git staging is blocked; authorized deploy commits require explicit pathspecs.",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
pattern: /\bgit\s+(?:remote\s+(?:add|set-url|remove|rename)|config\b[\s\S]*(?:sshCommand|credential|url\.))/i,
|
|
50
|
+
reason: "Remote, SSH, and credential configuration changes are blocked.",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
pattern: /\bgh\b[\s\S]*\s--repo(?:=|\s)/i,
|
|
54
|
+
reason: "GitHub CLI commands must target the current repository.",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
pattern: /\b(?:drop\s+(?:database|schema|table)|truncate\s+table|supabase\s+db\s+reset)\b/i,
|
|
58
|
+
reason: "Destructive database operations are blocked.",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
pattern: /\b(?:rmSync|rmdirSync|unlinkSync|rmtree|remove|unlink|Directory\.Delete|File\.Delete)\s*\(/i,
|
|
62
|
+
reason: "Inline deletion APIs are blocked.",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
pattern: /(?:curl|wget|Invoke-WebRequest|Invoke-RestMethod|\biwr\b|\birm\b)[\s\S]*\|[\s&]*(?:bash|sh|zsh|pwsh|powershell|cmd|node|python|iex|Invoke-Expression)\b/i,
|
|
66
|
+
reason: "Downloaded content cannot be piped into an interpreter.",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
pattern: /(?:-(?:EncodedCommand|enc)\b|FromBase64String\s*\(|certutil\s+-(?:decode|urlcache)\b|mshta\s+https?:|rundll32\s+javascript:)/i,
|
|
70
|
+
reason: "Encoded or evasive command execution is blocked.",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
pattern: /\b(?:Set-MpPreference|Add-MpPreference|Remove-MpPreference|Set-NetFirewallProfile|New-NetFirewallRule|Remove-NetFirewallRule|Disable-NetFirewallRule|Enable-PSRemoting|Set-WSManQuickConfig)\b|\bnetsh\s+advfirewall[\s\S]*(?:\boff\b|\badd\b|\bdelete\b|\bset\b)/i,
|
|
74
|
+
reason: "Firewall, antivirus, and remote-management changes are blocked.",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
pattern: /\b(?:reg(?:\.exe)?\s+(?:add|delete)|schtasks(?:\.exe)?\s+\/(?:create|delete|change)|sc(?:\.exe)?\s+(?:create|delete|stop|config)|New-Service|Set-Service|Stop-Service)\b/i,
|
|
78
|
+
reason: "OS persistence and service changes are blocked.",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
pattern: /\b(?:diskpart|format(?:\.com)?|bcdedit|fsutil|takeown|icacls|Set-Acl|chmod|chown)\b|\bcipher\s+\/w\b/i,
|
|
82
|
+
reason: "Disk, boot, ownership, and access-control changes are blocked.",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
pattern: /\b(?:runas|sudo|gsudo)\b|Start-Process[\s\S]*-Verb\s+RunAs|\bSet-ExecutionPolicy\b/i,
|
|
86
|
+
reason: "Privilege escalation and persistent execution-policy changes are blocked.",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
pattern: /\b(?:winget|choco|scoop)\s+(?:install|uninstall|upgrade)\b|\b(?:npm|pnpm|yarn)\s+(?:install|add|remove|uninstall)[\s\S]*(?:--global|-g)\b/i,
|
|
90
|
+
reason: "System-wide package changes are blocked.",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
pattern: /(?:--host|--hostname|--listen(?:-address)?)\s+(?:0\.0\.0\.0|\*|::)\b/i,
|
|
94
|
+
reason: "Non-loopback listeners are blocked.",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
pattern: /\bgh\s+(?:pr\s+(?:create|merge|close|reopen)|issue\s+(?:create|close|reopen|delete)|release\s+(?:create|delete|upload)|repo\s+(?:create|delete|archive)|api\b[\s\S]*(?:--method|-X)\s*(?:POST|PUT|PATCH|DELETE))\b/i,
|
|
98
|
+
reason: "Unreviewed GitHub mutations are blocked; use the bounded deploy workflow.",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
pattern: /\b(?:npm|pnpm|yarn)\s+(?:publish|login|logout|token|owner|deprecate)\b/i,
|
|
102
|
+
reason: "Package-registry publication and credential changes are blocked.",
|
|
103
|
+
},
|
|
104
|
+
];
|
|
105
|
+
|
|
106
|
+
function deny(reason) {
|
|
107
|
+
process.stdout.write(
|
|
108
|
+
JSON.stringify({
|
|
109
|
+
hookSpecificOutput: {
|
|
110
|
+
hookEventName: "PreToolUse",
|
|
111
|
+
permissionDecision: "deny",
|
|
112
|
+
permissionDecisionReason: "ZAIP safety policy: " + reason,
|
|
113
|
+
},
|
|
114
|
+
}) + "\n",
|
|
115
|
+
);
|
|
116
|
+
process.exit(0);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function isWithinRepository(path) {
|
|
120
|
+
const candidate = relative(repositoryRoot, resolve(path));
|
|
121
|
+
return candidate === "" || (!candidate.startsWith("..") && !isAbsolute(candidate));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function repositoryPath(path) {
|
|
125
|
+
return relative(repositoryRoot, resolve(path)).replaceAll("\\", "/");
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function isGitPath(path) {
|
|
129
|
+
const scoped = repositoryPath(path);
|
|
130
|
+
return scoped === ".git" || scoped.startsWith(".git/");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function unquote(value) {
|
|
134
|
+
return value.trim().replace(/^["']|["']$/g, "");
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function explicitPathCandidates(command) {
|
|
138
|
+
const withoutUrls = command.replace(/https?:\/\/[^\s"'\x60]+/gi, "");
|
|
139
|
+
const candidates = new Set();
|
|
140
|
+
for (const match of withoutUrls.matchAll(/["']([A-Za-z]:[\\/][^"']+)["']/g)) {
|
|
141
|
+
candidates.add(match[1]);
|
|
142
|
+
}
|
|
143
|
+
for (const match of withoutUrls.matchAll(/(?:^|[\s=(:,])([A-Za-z]:[\\/][^\s"'\x60;|&),]+)/g)) {
|
|
144
|
+
candidates.add(match[1]);
|
|
145
|
+
}
|
|
146
|
+
for (const match of withoutUrls.matchAll(/["']([^"']*\.\.[\\/][^"']*)["']/g)) {
|
|
147
|
+
candidates.add(match[1]);
|
|
148
|
+
}
|
|
149
|
+
for (const match of withoutUrls.matchAll(/(?:^|[\s=(:,])(\.\.[\\/][^\s"'\x60;|&),]+)/g)) {
|
|
150
|
+
candidates.add(match[1]);
|
|
151
|
+
}
|
|
152
|
+
return [...candidates].map(unquote).filter(Boolean);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function validateExplicitFilesystemReferences(command, cwd) {
|
|
156
|
+
if (homeReferencePattern.test(command)) {
|
|
157
|
+
deny("Direct user-profile path references are blocked; use repository-scoped paths.");
|
|
158
|
+
}
|
|
159
|
+
if (credentialReferencePattern.test(command) || sensitiveEnvironmentPattern.test(command)) {
|
|
160
|
+
deny("Direct credential and secret access is blocked.");
|
|
161
|
+
}
|
|
162
|
+
if (/\b(?:Get-ChildItem|gci|dir)\s+Env:|\b(?:printenv|set)\s*$/i.test(command) || /GetEnvironmentVariables\s*\(/i.test(command)) {
|
|
163
|
+
deny("Bulk environment enumeration is blocked.");
|
|
164
|
+
}
|
|
165
|
+
if (/\\\\[^\\\s"']+[\\/]/.test(command)) {
|
|
166
|
+
deny("UNC and network filesystem paths are blocked.");
|
|
167
|
+
}
|
|
168
|
+
if (/(?:^|[\s"'=])\/(?:etc|home|Users|root|var|opt|private|mnt|proc|sys|dev|tmp)(?:[\/\s"']|$)/i.test(command)) {
|
|
169
|
+
deny("Explicit operating-system paths outside the repository are blocked.");
|
|
170
|
+
}
|
|
171
|
+
for (const candidate of explicitPathCandidates(command)) {
|
|
172
|
+
const absolute = resolve(cwd, candidate);
|
|
173
|
+
if (!isWithinRepository(absolute)) {
|
|
174
|
+
deny("Explicit filesystem path escapes the repository boundary.");
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function validateInlineExecution(command) {
|
|
180
|
+
const inlinePatterns = [
|
|
181
|
+
/\b(?:node|deno)\s+(?:-e|--eval)\b/i,
|
|
182
|
+
/\b(?:python(?:3)?|ruby|perl|php)\s+(?:-c|-e)\b/i,
|
|
183
|
+
/\bdeno\s+eval\b/i,
|
|
184
|
+
/\b(?:powershell|pwsh)(?:\.exe)?\b[\s\S]*\s-(?:Command|EncodedCommand|enc)\b/i,
|
|
185
|
+
/\bcmd(?:\.exe)?\s+\/c\b/i,
|
|
186
|
+
/\|\s*(?:node|deno|python(?:3)?|ruby|perl|php|powershell|pwsh|cmd)\b/i,
|
|
187
|
+
/\b(?:Invoke-Expression|iex)\b/i,
|
|
188
|
+
];
|
|
189
|
+
if (inlinePatterns.some((pattern) => pattern.test(command))) {
|
|
190
|
+
deny("Inline or piped interpreter execution is blocked; use a reviewed repository script.");
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function validateGitPublication(command) {
|
|
195
|
+
const tokens = tokenizeLiteralCommand(command);
|
|
196
|
+
if (tokens === null || tokens[0]?.toLowerCase() !== "git" || tokens[1]?.toLowerCase() !== "push") return;
|
|
197
|
+
const branch =
|
|
198
|
+
tokens.length === 4 && tokens[2] === "origin"
|
|
199
|
+
? tokens[3]
|
|
200
|
+
: tokens.length === 5 && tokens[2] === "-u" && tokens[3] === "origin"
|
|
201
|
+
? tokens[4]
|
|
202
|
+
: null;
|
|
203
|
+
if (branch === null || !/^[A-Za-z0-9][A-Za-z0-9._/-]*$/.test(branch)) {
|
|
204
|
+
deny("Git publication must use an explicit valid branch on origin.");
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function validateExplicitNetwork(command) {
|
|
209
|
+
if (/(?:^|[;&|]\s*)\b(?:ssh|scp|sftp|rsync|ftp|telnet|nc|ncat)\b/i.test(command)) {
|
|
210
|
+
deny("Direct remote-shell and file-transfer clients are blocked.");
|
|
211
|
+
}
|
|
212
|
+
if (!networkClientPattern.test(command)) return;
|
|
213
|
+
if (/(?:--request|-X|--method|-Method)\s*(?:POST|PUT|PATCH|DELETE)\b|(?:--data|--data-binary|--upload-file|-T)\b/i.test(command)) {
|
|
214
|
+
deny("Explicit HTTP mutations and uploads are blocked.");
|
|
215
|
+
}
|
|
216
|
+
const urls = [...command.matchAll(/https?:\/\/([^\s\/"'\x60]+)/gi)];
|
|
217
|
+
if (urls.length === 0) {
|
|
218
|
+
deny("Network clients require an explicit allowlisted URL.");
|
|
219
|
+
}
|
|
220
|
+
for (const match of urls) {
|
|
221
|
+
let host;
|
|
222
|
+
try {
|
|
223
|
+
host = new URL("https://" + match[1]).hostname.toLowerCase();
|
|
224
|
+
} catch {
|
|
225
|
+
deny("Malformed network target was rejected.");
|
|
226
|
+
}
|
|
227
|
+
if (!allowedExplicitNetworkHosts.has(host)) {
|
|
228
|
+
deny("Explicit network target is outside the ZAIP allowlist.");
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function tokenizeLiteralCommand(command) {
|
|
234
|
+
if (
|
|
235
|
+
command.includes("\r") ||
|
|
236
|
+
command.includes("\n") ||
|
|
237
|
+
command.includes(";") ||
|
|
238
|
+
command.includes("|") ||
|
|
239
|
+
command.includes("&") ||
|
|
240
|
+
command.includes(String.fromCharCode(96))
|
|
241
|
+
) return null;
|
|
242
|
+
|
|
243
|
+
const tokens = [];
|
|
244
|
+
let token = "";
|
|
245
|
+
let quote = null;
|
|
246
|
+
let started = false;
|
|
247
|
+
for (const character of command) {
|
|
248
|
+
if (quote !== null) {
|
|
249
|
+
if (character === quote) quote = null;
|
|
250
|
+
else token += character;
|
|
251
|
+
} else if (character === "'" || character === '"') {
|
|
252
|
+
quote = character;
|
|
253
|
+
started = true;
|
|
254
|
+
} else if (/\s/.test(character)) {
|
|
255
|
+
if (started) {
|
|
256
|
+
tokens.push(token);
|
|
257
|
+
token = "";
|
|
258
|
+
started = false;
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
token += character;
|
|
262
|
+
started = true;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (quote !== null) return null;
|
|
266
|
+
if (started) tokens.push(token);
|
|
267
|
+
return tokens;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function deletionTargets(command) {
|
|
271
|
+
const tokens = tokenizeLiteralCommand(command);
|
|
272
|
+
if (tokens === null || tokens.length < 2) return null;
|
|
273
|
+
const executable = tokens[0].toLowerCase();
|
|
274
|
+
|
|
275
|
+
if (executable === "remove-item") {
|
|
276
|
+
let target = null;
|
|
277
|
+
for (let index = 1; index < tokens.length; index += 1) {
|
|
278
|
+
const option = tokens[index].toLowerCase();
|
|
279
|
+
if (option === "-literalpath") {
|
|
280
|
+
if (target !== null || index + 1 >= tokens.length) return null;
|
|
281
|
+
target = tokens[index + 1];
|
|
282
|
+
index += 1;
|
|
283
|
+
} else if (option === "-erroraction") {
|
|
284
|
+
const action = tokens[index + 1]?.toLowerCase();
|
|
285
|
+
if (action !== "stop" && action !== "silentlycontinue") return null;
|
|
286
|
+
index += 1;
|
|
287
|
+
} else if (option !== "-force" && option !== "-recurse") {
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
return target === null ? null : [target];
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (!new Set(["rm", "rmdir", "rd", "del", "erase"]).has(executable)) return null;
|
|
295
|
+
const targets = [];
|
|
296
|
+
for (const token of tokens.slice(1)) {
|
|
297
|
+
if (token === "--") continue;
|
|
298
|
+
if (executable === "rm" && /^-[rRf]+$/.test(token)) continue;
|
|
299
|
+
if ((executable === "rd" || executable === "del" || executable === "erase") && /^\/[fqs]$/i.test(token)) continue;
|
|
300
|
+
if (token.startsWith("-") && !isAbsolute(token)) return null;
|
|
301
|
+
targets.push(token);
|
|
302
|
+
}
|
|
303
|
+
return targets.length === 0 ? null : targets;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
async function validateDeletionPath(path, cwd) {
|
|
307
|
+
const unsafeCharacters = ["*", "?", "[", "]", "{", "}", "$", "%"];
|
|
308
|
+
if (
|
|
309
|
+
path.length === 0 ||
|
|
310
|
+
path.startsWith("~") ||
|
|
311
|
+
unsafeCharacters.some((character) => path.includes(character))
|
|
312
|
+
) {
|
|
313
|
+
deny("Deletion requires an explicit literal path without variables or wildcards.");
|
|
314
|
+
}
|
|
315
|
+
const absolute = resolve(cwd, path);
|
|
316
|
+
if (!isWithinRepository(absolute)) deny("Deletion target escapes the repository boundary.");
|
|
317
|
+
if (repositoryPath(absolute) === "") deny("Deleting the repository root is blocked.");
|
|
318
|
+
if (isGitPath(absolute)) deny("Deletion of protected Git control files is blocked.");
|
|
319
|
+
|
|
320
|
+
try {
|
|
321
|
+
const information = await lstat(absolute);
|
|
322
|
+
if (information.isSymbolicLink() && !isWithinRepository(await realpath(absolute))) {
|
|
323
|
+
deny("Deletion through a link that resolves outside the repository is blocked.");
|
|
324
|
+
}
|
|
325
|
+
} catch (error) {
|
|
326
|
+
if (error?.code !== "ENOENT") deny("Deletion target could not be safely resolved.");
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
async function validateShellDeletion(command, cwd) {
|
|
331
|
+
if (!deletionCommandPattern.test(command)) return;
|
|
332
|
+
const targets = deletionTargets(command);
|
|
333
|
+
if (targets === null) {
|
|
334
|
+
deny("Deletion commands must use a single literal operation with explicit repository-scoped paths.");
|
|
335
|
+
}
|
|
336
|
+
for (const target of targets) await validateDeletionPath(target, cwd);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function validatePatch(command) {
|
|
340
|
+
const headers = [...command.matchAll(/^\*\*\* (Add|Update|Delete) File:\s*(.+)$|^\*\*\* Move to:\s*(.+)$/gm)];
|
|
341
|
+
const lifecycleRecordTouched = headers.some((match) => {
|
|
342
|
+
const candidate = (match[2] ?? match[3]).trim().replace(/^["']|["']$/g, "");
|
|
343
|
+
return /^\.agents[\\/]records[\\/](?:prds|specs|tasks)[\\/]/i.test(candidate);
|
|
344
|
+
});
|
|
345
|
+
if (lifecycleRecordTouched && /^\+\s*status\s*:/m.test(command)) {
|
|
346
|
+
deny("PRD, SPEC, and Task status transitions must use canonical ZAIP lifecycle commands.");
|
|
347
|
+
}
|
|
348
|
+
for (const match of headers) {
|
|
349
|
+
const candidate = (match[2] ?? match[3]).trim().replace(/^["']|["']$/g, "");
|
|
350
|
+
const absolute = resolve(repositoryRoot, candidate);
|
|
351
|
+
if (!isWithinRepository(absolute)) deny("Patch path escapes the repository boundary.");
|
|
352
|
+
if (repositoryPath(absolute) === "") deny("Patching the repository root is blocked.");
|
|
353
|
+
if (isGitPath(absolute)) {
|
|
354
|
+
deny("Direct edits to protected Git control files are blocked.");
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const lifecycleExemptPathPattern = /(?:^|\/)(?:\.git|node_modules|dist|build|coverage|tmp|temp|\.cache)(?:\/|$)|^\.agents\/records\/|^\.zaip-aios\/local\//i;
|
|
360
|
+
const shellMutationPattern = /\b(?:Set-Content|Add-Content|Out-File|New-Item|Copy-Item|Move-Item|Remove-Item|git\s+apply|npm\s+version|pnpm\s+version)\b/i;
|
|
361
|
+
|
|
362
|
+
function patchPaths(command) {
|
|
363
|
+
return [...command.matchAll(/^\*\*\* (?:Add|Update|Delete) File:\s*(.+)$|^\*\*\* Move to:\s*(.+)$/gm)].map(
|
|
364
|
+
(match) => repositoryPath(resolve(repositoryRoot, (match[1] ?? match[2]).trim().replace(/^["']|["']$/g, ""))),
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
function requiresOrchestratorRun(event, command) {
|
|
369
|
+
if (event.tool_name === "apply_patch") {
|
|
370
|
+
const paths = patchPaths(command);
|
|
371
|
+
return paths.length === 0 || paths.some((path) => !lifecycleExemptPathPattern.test(path));
|
|
372
|
+
}
|
|
373
|
+
if (event.tool_name === "Edit" || event.tool_name === "Write") {
|
|
374
|
+
return !lifecycleExemptPathPattern.test(command.replaceAll("\\", "/"));
|
|
375
|
+
}
|
|
376
|
+
return shellMutationPattern.test(command);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
async function runRecordPaths(root) {
|
|
380
|
+
const paths = [];
|
|
381
|
+
async function visit(directory) {
|
|
382
|
+
let entries;
|
|
383
|
+
try {
|
|
384
|
+
entries = await readdir(directory, { withFileTypes: true });
|
|
385
|
+
} catch {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
for (const entry of entries) {
|
|
389
|
+
const path = resolve(directory, entry.name);
|
|
390
|
+
if (entry.isDirectory()) await visit(path);
|
|
391
|
+
else if (entry.isFile() && entry.name.endsWith(".jsonl")) paths.push(path);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
await visit(root);
|
|
395
|
+
return paths;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
async function hasCurrentTaskOrchestratorRun() {
|
|
399
|
+
const threadId = process.env.CODEX_THREAD_ID;
|
|
400
|
+
const turnId = process.env.CODEX_TURN_ID;
|
|
401
|
+
if (!threadId || !turnId) return false;
|
|
402
|
+
const root = resolve(repositoryRoot, ".agents", "records", "runs");
|
|
403
|
+
for (const path of await runRecordPaths(root)) {
|
|
404
|
+
let records;
|
|
405
|
+
try {
|
|
406
|
+
records = (await readFile(path, "utf8"))
|
|
407
|
+
.split(/\r?\n/)
|
|
408
|
+
.filter(Boolean)
|
|
409
|
+
.map((line) => JSON.parse(line));
|
|
410
|
+
} catch {
|
|
411
|
+
continue;
|
|
412
|
+
}
|
|
413
|
+
const started = records.find((record) => record.type === "run.started");
|
|
414
|
+
if (
|
|
415
|
+
started?.client_thread_id !== threadId ||
|
|
416
|
+
started?.client_turn_id !== turnId ||
|
|
417
|
+
started?.phase !== "execution" ||
|
|
418
|
+
typeof started?.task_id !== "string"
|
|
419
|
+
) {
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
const role =
|
|
423
|
+
started.run_role === "owner"
|
|
424
|
+
? "orchestrator"
|
|
425
|
+
: started.run_role === "contributor"
|
|
426
|
+
? "subagent"
|
|
427
|
+
: (started.run_role ?? (started.parent_run_id ? "subagent" : "orchestrator"));
|
|
428
|
+
if (
|
|
429
|
+
role === "orchestrator" &&
|
|
430
|
+
started.parent_run_id === null &&
|
|
431
|
+
started.entrypoint === "task" &&
|
|
432
|
+
!records.some((record) => record.type === "run.finished")
|
|
433
|
+
)
|
|
434
|
+
return true;
|
|
435
|
+
}
|
|
436
|
+
return false;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
let raw = "";
|
|
440
|
+
for await (const chunk of process.stdin) raw += chunk;
|
|
441
|
+
|
|
442
|
+
let event;
|
|
443
|
+
try {
|
|
444
|
+
event = JSON.parse(raw);
|
|
445
|
+
} catch {
|
|
446
|
+
deny("Malformed hook input was rejected.");
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
if (typeof event.cwd !== "string" || !isWithinRepository(event.cwd)) {
|
|
450
|
+
deny("Tool execution outside the ZAIP-AIOS repository is blocked.");
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
const command = event?.tool_input?.command;
|
|
454
|
+
if (typeof command !== "string") deny("A matched tool call without a command was rejected.");
|
|
455
|
+
|
|
456
|
+
if (requiresOrchestratorRun(event, command) && !(await hasCurrentTaskOrchestratorRun())) {
|
|
457
|
+
deny("Persistent mutation requires an active execution Run owning a Task for this Codex turn.");
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
if (event.tool_name === "apply_patch") validatePatch(command);
|
|
461
|
+
else {
|
|
462
|
+
validateExplicitFilesystemReferences(command, event.cwd);
|
|
463
|
+
validateInlineExecution(command);
|
|
464
|
+
validateGitPublication(command);
|
|
465
|
+
validateExplicitNetwork(command);
|
|
466
|
+
await validateShellDeletion(command, event.cwd);
|
|
467
|
+
for (const entry of destructivePatterns) {
|
|
468
|
+
if (entry.pattern.test(command)) deny(entry.reason);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
`;
|
|
472
|
+
//# sourceMappingURL=codex-pre-tool-hook-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-pre-tool-hook-template.js","sourceRoot":"","sources":["../../src/services/codex-pre-tool-hook-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsd5C,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const CODEX_GITHUB_DEPLOY_RULES = "# GitHub-only publication commands that may cross the workspace sandbox without prompting.\n#
|
|
1
|
+
export declare const CODEX_GITHUB_DEPLOY_RULES = "# GitHub-only publication commands that may cross the workspace sandbox without prompting.\n# Only an explicit deploy request activates the ZAIP deploy skill. Its bounded flow may reconcile\n# the selected branch and form evidenced functional commits with explicit pathspecs.\n\nprefix_rule(\n pattern = [\"node\", \".agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs\"],\n decision = \"allow\",\n justification = \"Run the sanitized, repository-owned folder-scoped SSH preflight.\",\n match = [\"node .agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs --repository . --remote origin --branch demo\"],\n not_match = [\"node scripts/other.mjs\"],\n)\n\nprefix_rule(\n pattern = [\"git\", \"fetch\"],\n decision = \"allow\",\n justification = \"Fetch the selected GitHub remote once to prove the branch is not behind or diverged.\",\n match = [\"git fetch origin demo\"],\n not_match = [\"git pull origin demo\"],\n)\n\nprefix_rule(\n pattern = [\"git\", \"add\"],\n decision = \"allow\",\n justification = \"Stage only an evidenced functional group with explicit pathspecs during an authorized deploy.\",\n match = [\"git add -- README.md\", \"git add -- packages/core/src/example.ts\"],\n not_match = [\"git add -A\", \"git add --all\", \"git add .\", \"git add -u\"],\n)\n\nprefix_rule(\n pattern = [\"git\", \"commit\"],\n decision = \"allow\",\n justification = \"Create an evidenced functional commit without rewriting history during an authorized deploy.\",\n match = [\"git commit -m \"[CODEX] Atualizar contrato de deploy\"\"],\n not_match = [\"git commit --amend -m repair\", \"git commit --no-verify -m repair\"],\n)\n\nprefix_rule(\n pattern = [\"git\", [\"branch\", \"stash\", \"rebase\", \"merge\"]],\n decision = \"allow\",\n justification = \"Preserve and reconcile only the selected deploy branch without force, destructive reset, or squash.\",\n match = [\"git branch deploy-preserve-20260802\", \"git stash push --include-untracked -m deploy-preserve\", \"git stash apply\", \"git rebase origin/demo\", \"git merge origin/demo\"],\n not_match = [\"git branch -D deploy-preserve\", \"git stash drop\", \"git rebase --abort\", \"git merge --abort\"],\n)\n\nprefix_rule(\n pattern = [\"git\", \"push\"],\n decision = \"allow\",\n justification = \"Publish only the policy-authorized demo branch after ZAIP preflight.\",\n match = [\"git push origin demo\", \"git push -u origin demo\"],\n not_match = [\"git pull\", \"ssh -i key git@github.com\"],\n)\n\nprefix_rule(\n pattern = [\"git\", \"ls-remote\"],\n decision = \"allow\",\n justification = \"Verify GitHub connectivity and the exact remote branch hash.\",\n match = [\"git ls-remote origin refs/heads/demo\"],\n not_match = [\"git remote set-url origin git@github.com:other/repo.git\"],\n)\n\nprefix_rule(\n pattern = [\"gh\", \"auth\", \"status\"],\n decision = \"allow\",\n justification = \"Inspect GitHub CLI authentication without changing credentials.\",\n match = [\"gh auth status\"],\n not_match = [\"gh auth login\"],\n)\n\nprefix_rule(\n pattern = [\"gh\", \"run\", [\"list\", \"view\", \"watch\"]],\n decision = \"allow\",\n justification = \"Observe GitHub Actions checks for the just-pushed commit.\",\n match = [\"gh run list\", \"gh run view 123\", \"gh run watch 123\"],\n not_match = [\"gh run cancel 123\", \"gh run delete 123\"],\n)\n\nprefix_rule(\n pattern = [\"gh\", \"pr\", [\"view\", \"checks\"]],\n decision = \"allow\",\n justification = \"Read pull-request metadata and required checks for the current repository.\",\n match = [\"gh pr view\", \"gh pr checks\"],\n not_match = [\"gh pr create\", \"gh pr merge\"],\n)\n";
|
|
2
2
|
export declare const CODEX_SECURITY_RULES = "# Fail-closed defense in depth for commands that must never prompt or execute.\n# Native permission profiles, repository instructions, and these forbidden rules form the active boundary.\n\nprefix_rule(\n pattern = [\"git\", [\"clean\", \"reset\", \"restore\"]],\n decision = \"forbidden\",\n justification = \"Use non-destructive Git inspection and an explicit file-level patch instead.\",\n match = [\"git reset --hard\", \"git clean -fd\", \"git restore README.md\"],\n)\n\nprefix_rule(\n pattern = [[\"reg\", \"reg.exe\", \"schtasks\", \"schtasks.exe\", \"sc\", \"sc.exe\", \"diskpart\", \"format\", \"bcdedit\", \"fsutil\", \"takeown\", \"icacls\"]],\n decision = \"forbidden\",\n justification = \"Operating-system persistence, disk, service, ownership, and ACL changes are outside repository scope.\",\n match = [\"reg add HKCU\\Software\\Example\", \"schtasks /create /tn example\", \"diskpart\"],\n)\n\nprefix_rule(\n pattern = [[\"runas\", \"sudo\", \"gsudo\"]],\n decision = \"forbidden\",\n justification = \"Privilege escalation is never allowed from ZAIP repository work.\",\n match = [\"runas /user:Administrator cmd\", \"sudo rm -rf /\"],\n)\n\nprefix_rule(\n pattern = [[\"winget\", \"choco\", \"scoop\"]],\n decision = \"forbidden\",\n justification = \"System package management is outside repository scope; use project-local dependencies.\",\n match = [\"winget install Git.Git\", \"choco upgrade nodejs\", \"scoop install jq\"],\n)\n\nprefix_rule(\n pattern = [[\"ssh\", \"scp\", \"sftp\", \"rsync\", \"ftp\", \"telnet\", \"nc\", \"ncat\"]],\n decision = \"forbidden\",\n justification = \"Use the repository-owned GitHub deploy preflight and Git commands instead of direct remote clients.\",\n match = [\"ssh host\", \"scp file host:/tmp\", \"nc -l 4444\"],\n)\n";
|
|
3
3
|
//# sourceMappingURL=codex-rules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-rules.d.ts","sourceRoot":"","sources":["../../src/services/codex-rules.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"codex-rules.d.ts","sourceRoot":"","sources":["../../src/services/codex-rules.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,ktHAmFrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,yzDAqChC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const CODEX_GITHUB_DEPLOY_RULES = `# GitHub-only publication commands that may cross the workspace sandbox without prompting.
|
|
2
|
-
#
|
|
2
|
+
# Only an explicit deploy request activates the ZAIP deploy skill. Its bounded flow may reconcile
|
|
3
|
+
# the selected branch and form evidenced functional commits with explicit pathspecs.
|
|
3
4
|
|
|
4
5
|
prefix_rule(
|
|
5
6
|
pattern = ["node", ".agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs"],
|
|
@@ -10,27 +11,35 @@ prefix_rule(
|
|
|
10
11
|
)
|
|
11
12
|
|
|
12
13
|
prefix_rule(
|
|
13
|
-
pattern = ["git", "
|
|
14
|
+
pattern = ["git", "fetch"],
|
|
14
15
|
decision = "allow",
|
|
15
|
-
justification = "
|
|
16
|
-
match = ["git
|
|
17
|
-
not_match = ["git
|
|
16
|
+
justification = "Fetch the selected GitHub remote once to prove the branch is not behind or diverged.",
|
|
17
|
+
match = ["git fetch origin demo"],
|
|
18
|
+
not_match = ["git pull origin demo"],
|
|
18
19
|
)
|
|
19
20
|
|
|
20
21
|
prefix_rule(
|
|
21
|
-
pattern = ["git", "
|
|
22
|
+
pattern = ["git", "add"],
|
|
22
23
|
decision = "allow",
|
|
23
|
-
justification = "
|
|
24
|
-
match = ["git
|
|
25
|
-
not_match = ["git
|
|
24
|
+
justification = "Stage only an evidenced functional group with explicit pathspecs during an authorized deploy.",
|
|
25
|
+
match = ["git add -- README.md", "git add -- packages/core/src/example.ts"],
|
|
26
|
+
not_match = ["git add -A", "git add --all", "git add .", "git add -u"],
|
|
26
27
|
)
|
|
27
28
|
|
|
28
29
|
prefix_rule(
|
|
29
|
-
pattern = ["git", "
|
|
30
|
+
pattern = ["git", "commit"],
|
|
30
31
|
decision = "allow",
|
|
31
|
-
justification = "
|
|
32
|
-
match = ["git
|
|
33
|
-
not_match = ["git
|
|
32
|
+
justification = "Create an evidenced functional commit without rewriting history during an authorized deploy.",
|
|
33
|
+
match = ["git commit -m "[CODEX] Atualizar contrato de deploy""],
|
|
34
|
+
not_match = ["git commit --amend -m repair", "git commit --no-verify -m repair"],
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
prefix_rule(
|
|
38
|
+
pattern = ["git", ["branch", "stash", "rebase", "merge"]],
|
|
39
|
+
decision = "allow",
|
|
40
|
+
justification = "Preserve and reconcile only the selected deploy branch without force, destructive reset, or squash.",
|
|
41
|
+
match = ["git branch deploy-preserve-20260802", "git stash push --include-untracked -m deploy-preserve", "git stash apply", "git rebase origin/demo", "git merge origin/demo"],
|
|
42
|
+
not_match = ["git branch -D deploy-preserve", "git stash drop", "git rebase --abort", "git merge --abort"],
|
|
34
43
|
)
|
|
35
44
|
|
|
36
45
|
prefix_rule(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-rules.js","sourceRoot":"","sources":["../../src/services/codex-rules.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG
|
|
1
|
+
{"version":3,"file":"codex-rules.js","sourceRoot":"","sources":["../../src/services/codex-rules.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFxC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCnC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const CODEX_SUBAGENT_LIFECYCLE_HOOK = "import { existsSync } from \"node:fs\";\nimport { promises as fs } from \"node:fs\";\nimport { spawn } from \"node:child_process\";\nimport { dirname, relative, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nconst hookPath = fileURLToPath(import.meta.url);\nconst repositoryRoot = resolve(dirname(hookPath), \"..\", \"..\");\nconst diagnosticPath = resolve(\n repositoryRoot,\n \".agents\",\n \"local\",\n \"hooks\",\n \"subagent-lifecycle.ndjson\",\n);\n\nif (process.argv[2] === \"--capture-runner\") {\n await runCaptureRunner(process.argv[3], process.argv.slice(4));\n process.exit(0);\n}\n\nlet raw = \"\";\nfor await (const chunk of process.stdin) raw += chunk;\n\ntry {\n const event = JSON.parse(raw);\n const cwd = text(event.cwd);\n const scoped = cwd === null ? \"..\" : relative(repositoryRoot, resolve(cwd));\n if (cwd === null || scoped.startsWith(\"..\")) process.exit(0);\n const eventName = text(event.hook_event_name);\n const lifecycleEvent =\n eventName === \"SubagentStart\" ? \"start\" : eventName === \"SubagentStop\" ? \"stop\" : null;\n const session = text(event.session_id);\n const turn = text(event.turn_id);\n const agentId = text(event.agent_id);\n const agentType = text(event.agent_type);\n const model = text(event.model);\n const reasoningEffort = reasoningEffortValue(\n event.model_reasoning_effort ?? event.reasoning_effort,\n );\n const parentAgentId = text(event.parent_agent_id ?? event.parent_id);\n const status = terminalStatus(event.status);\n const required = [lifecycleEvent, session, turn, agentId, agentType];\n if (lifecycleEvent === null) {\n await diagnostic(\"ignored_unrecognized_event\", { eventName });\n process.exit(0);\n }\n const terminalFallback =\n lifecycleEvent === \"stop\" &&\n status !== null &&\n agentId !== null &&\n agentType === \"zaip-agent-finalizer\" &&\n parentAgentId !== null &&\n (session === null || turn === null);\n if (\n (!terminalFallback && required.some((value) => value === null)) ||\n (lifecycleEvent === \"start\" && model === null)\n ) {\n await diagnostic(\"ignored_incomplete_event\", {\n eventName,\n session,\n turn,\n agentId,\n agentType,\n missing_model: lifecycleEvent === \"start\" && model === null,\n });\n process.exit(0);\n }\n const candidates = [\n resolve(repositoryRoot, \"packages\", \"cli\", \"dist\", \"index.js\"),\n resolve(repositoryRoot, \".agents\", \"runtime\", \"bin\", \"zaip.mjs\"),\n ];\n const cli = candidates.find(existsSync);\n if (cli === undefined) {\n await diagnostic(\"cli_not_found\", { eventName, candidates });\n process.exit(0);\n }\n const captureArguments = terminalFallback\n ? [\n \"subagent\",\n \"capture-terminal\",\n \"--parent-agent-id\",\n parentAgentId,\n \"--agent-id\",\n agentId,\n \"--agent-type\",\n agentType,\n \"--status\",\n status,\n \"--json\",\n ]\n : [\n \"subagent\",\n \"capture\",\n \"--event\",\n lifecycleEvent,\n \"--session\",\n session,\n \"--turn\",\n turn,\n \"--agent-id\",\n agentId,\n \"--agent-type\",\n agentType,\n ...(model === null ? [] : [\"--model\", model]),\n ...(reasoningEffort === null ? [] : [\"--reasoning-effort\", reasoningEffort]),\n ...(parentAgentId === null ? [] : [\"--parent-agent-id\", parentAgentId]),\n ...(lifecycleEvent !== \"stop\" || status === null ? [] : [\"--status\", status]),\n \"--json\",\n ];\n const runner = spawn(\n process.execPath,\n [hookPath, \"--capture-runner\", cli, ...captureArguments],\n {\n cwd: repositoryRoot,\n detached: true,\n windowsHide: true,\n stdio: \"ignore\",\n },\n );\n runner.once(\"error\", (error) =>\n diagnostic(\"runner_spawn_failed\", { eventName, error: error.message }),\n );\n runner.unref();\n if (lifecycleEvent === \"start\") {\n process.stdout.write(JSON.stringify({\n hookSpecificOutput: {\n hookEventName: \"SubagentStart\",\n additionalContext:\n \"ZAIP delegation policy: work only as a cataloged zaip-agent-NOME identity. Delegation is recursive; do not use default, worker, explorer, or ad-hoc agent types.\",\n },\n }));\n }\n} catch (error) {\n await diagnostic(\"hook_exception\", {\n error: error instanceof Error ? error.message : String(error),\n });\n}\n\nasync function runCaptureRunner(cli, captureArguments) {\n try {\n if (typeof cli !== \"string\" || cli.length === 0) {\n await persistDiagnostic(\"runner_invalid_cli\", {});\n return;\n }\n const child = spawn(process.execPath, [cli, ...captureArguments], {\n cwd: repositoryRoot,\n windowsHide: true,\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });\n let stdout = \"\";\n let stderr = \"\";\n child.stdout?.on(\"data\", (chunk) => {\n stdout = boundedText(stdout, chunk);\n });\n child.stderr?.on(\"data\", (chunk) => {\n stderr = boundedText(stderr, chunk);\n });\n const outcome = await new Promise((resolveOutcome) => {\n let settled = false;\n const finish = (value) => {\n if (settled) return;\n settled = true;\n clearTimeout(timeout);\n resolveOutcome(value);\n };\n const timeout = setTimeout(() => {\n child.kill();\n finish({ kind: \"timeout\" });\n }, 120_000);\n child.once(\"error\", (error) => finish({ kind: \"error\", error: error.message }));\n child.once(\"close\", (code, signal) => finish({ kind: \"close\", code, signal }));\n });\n if (outcome.kind === \"timeout\") {\n await persistDiagnostic(\"capture_timeout\", { captureArguments: safeIdentity(captureArguments) });\n } else if (outcome.kind === \"error\") {\n await persistDiagnostic(\"capture_spawn_failed\", { error: outcome.error });\n } else if (outcome.code !== 0) {\n await persistDiagnostic(\"capture_exit_nonzero\", {\n code: outcome.code,\n signal: outcome.signal,\n stderr,\n stdout,\n captureArguments: safeIdentity(captureArguments),\n });\n }\n } catch (error) {\n await persistDiagnostic(\"runner_exception\", {\n error: error instanceof Error ? error.message : String(error),\n });\n }\n}\n\nfunction safeIdentity(arguments_) {\n const value = (flag) => {\n const index = arguments_.indexOf(flag);\n return index < 0 ? null : text(arguments_[index + 1]);\n };\n return {\n event: value(\"--event\"),\n session: value(\"--session\"),\n turn: value(\"--turn\"),\n agent_id: value(\"--agent-id\"),\n agent_type: value(\"--agent-type\"),\n };\n}\n\nfunction boundedText(current, chunk) {\n return (current + String(chunk)).slice(-8_192);\n}\n\nasync function persistDiagnostic(code, detail) {\n const line = `${JSON.stringify({\n source: \"zaip-subagent-lifecycle-runner\",\n code,\n occurred_at: new Date().toISOString(),\n detail,\n })}\\n`;\n await fs.mkdir(dirname(diagnosticPath), { recursive: true });\n const size = await fs.stat(diagnosticPath).then((entry) => entry.size).catch(() => 0);\n if (size + Buffer.byteLength(line) > 262_144) {\n await fs.writeFile(diagnosticPath, \"\", \"utf8\");\n }\n await fs.appendFile(diagnosticPath, line, \"utf8\");\n}\n\nasync function diagnostic(code, detail) {\n await persistDiagnostic(code, detail);\n process.stderr.write(\n `${JSON.stringify({ source: \"zaip-subagent-lifecycle\", code, detail })}\\n`,\n );\n}\n\nfunction text(value) {\n if (typeof value !== \"string\") return null;\n const normalized = value.trim();\n return normalized.length > 0 && normalized.length <= 200 ? normalized : null;\n}\n\nfunction reasoningEffortValue(value) {\n const normalized = text(value);\n return [\"low\", \"medium\", \"high\", \"xhigh\"].includes(normalized) ? normalized : null;\n}\n\nfunction terminalStatus(value) {\n const normalized = text(value);\n return [\"completed\", \"failed\", \"cancelled\"].includes(normalized) ? normalized : null;\n}\n";
|
|
2
|
+
//# sourceMappingURL=codex-subagent-hook-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-subagent-hook-template.d.ts","sourceRoot":"","sources":["../../src/services/codex-subagent-hook-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,m/PAwPzC,CAAC"}
|