@zaip-ai/cli 1.3.8 → 1.4.1
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 +58 -3
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +17 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/services/adapters.js +4 -4
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/codex-config-template.d.ts +2 -2
- package/dist/services/codex-config-template.d.ts.map +1 -1
- package/dist/services/codex-config-template.js +3 -3
- package/dist/services/codex-config-template.js.map +1 -1
- 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 +9 -24
- package/dist/services/codex-rules.js.map +1 -1
- package/dist/services/delivery-git-preflight.d.ts +23 -0
- package/dist/services/delivery-git-preflight.d.ts.map +1 -0
- package/dist/services/delivery-git-preflight.js +69 -0
- package/dist/services/delivery-git-preflight.js.map +1 -0
- package/dist/services/doctor.d.ts.map +1 -1
- package/dist/services/doctor.js +13 -1
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +22 -28
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/install-profile.d.ts +8 -0
- package/dist/services/install-profile.d.ts.map +1 -0
- package/dist/services/install-profile.js +56 -0
- package/dist/services/install-profile.js.map +1 -0
- package/dist/services/logger.d.ts.map +1 -1
- package/dist/services/logger.js +6 -5
- package/dist/services/logger.js.map +1 -1
- package/dist/services/stack-git.d.ts +9 -0
- package/dist/services/stack-git.d.ts.map +1 -0
- package/dist/services/stack-git.js +188 -0
- package/dist/services/stack-git.js.map +1 -0
- package/dist/services/stack-plan.d.ts +3 -1
- package/dist/services/stack-plan.d.ts.map +1 -1
- package/dist/services/stack-plan.js +15 -1
- package/dist/services/stack-plan.js.map +1 -1
- package/dist/services/stack-terraform.d.ts +13 -0
- package/dist/services/stack-terraform.d.ts.map +1 -0
- package/dist/services/stack-terraform.js +274 -0
- package/dist/services/stack-terraform.js.map +1 -0
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +14 -1
- package/dist/services/template-manifest.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/.env.example +34 -0
- package/templates/{README.md → .agents/README.md} +124 -60
- package/templates/.agents/config/agents/catalog.yaml +23 -23
- package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +5 -4
- package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +10 -7
- package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +5 -4
- package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +5 -4
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +1 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +5 -4
- package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +1 -0
- package/templates/.agents/config/pricing/models.json +25 -1
- package/templates/.agents/config/project.yaml +2 -0
- package/templates/.agents/dashboard/.zaip-managed.json +200 -88
- package/templates/.agents/dashboard/DATA-DICTIONARY.md +1 -1
- package/templates/.agents/dashboard/README.md +58 -19
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-DwVZOmMV.js → CostCalculationGuidePage-snUCQYTC.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-VcLx9iOO.js → DashboardHelpDialog-oZVlf-l5.js} +72 -8
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-CyjMXkm8.js → PricingSettingsDialog-BPtVUGgs.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-3Awyaovx.js +3 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-DFZwIXSC.js → TraceabilityWorkspace-BYjVOHI_.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-DbaLbU2q.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-DXBOtWNI.js → icons-vendor-TPUT2IUt.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Cmlx8OYH.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-ZJFXmK7m.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-DaNXQPyk.js → react-vendor-Ct48XHGL.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-I4AKqVDX.js → traceability-BDe4_Ubl.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +6 -6
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +73 -67
- package/templates/.agents/dashboard/apps/frontend/src/AppLoadingBoundary.tsx +35 -7
- package/templates/.agents/dashboard/apps/frontend/src/AppWorkBoard.ts +55 -0
- package/templates/.agents/dashboard/apps/frontend/src/ProjectStackEditor.tsx +11 -0
- package/templates/.agents/dashboard/apps/frontend/src/app-loading-boundary.css +98 -0
- package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +5 -5
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-reconciliation.ts +33 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +75 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +7 -8
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +14 -2
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +35 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +78 -2
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.test.ts +28 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.ts +8 -5
- package/templates/.agents/dashboard/apps/frontend/src/use-app-effects.ts +180 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/contracts.ts +7 -4
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorContent.tsx +13 -7
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +14 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTableDisplay.ts +211 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +152 -157
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +155 -142
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/InvocationManifestQuery.test.ts +145 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +7 -5
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-compact-cost-page.ts +4 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-group-page.ts +4 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-run-page.ts +4 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.ts +4 -4
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +79 -1
- package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +105 -11
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +482 -332
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +430 -285
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs +14 -2
- package/templates/.agents/dashboard/packages/local-runtime/scripts/rebuild-sqlite-read-model.mjs +6 -26
- package/templates/.agents/dashboard/packages/local-runtime/scripts/validate-sqlite-read-model.mjs +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/scripts/verify-persistent-launch.mjs +268 -0
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +482 -332
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +90 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +112 -22
- package/templates/.agents/dashboard/packages/local-runtime/src/server-agent-assets.ts +39 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-browser-lease.ts +33 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-refresh.test.ts +148 -11
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-result.test.ts +68 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.test.ts +19 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.ts +39 -43
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-revision.test.ts +42 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-revision.ts +26 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +34 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-startup.ts +30 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.test.ts +89 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.ts +88 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +68 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +11 -5
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +129 -99
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-agent-productivity.test.ts +111 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-agent-productivity.ts +140 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.test.ts +127 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.ts +145 -5
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-aggregates.ts +156 -23
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-group-projection.ts +18 -9
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-invocation-projection.ts +52 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-persistence.ts +35 -13
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-force-canonical.test.ts +56 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-cache.test.ts +29 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-cache.ts +136 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-refresh.test.ts +251 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-projection.ts +22 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-cache.test-support.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical-parsing.ts +42 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical.ts +793 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider-duration.test.ts +270 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider-fixture.ts +3 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider.test.ts +18 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.test.ts +87 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +105 -16
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +131 -59
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +1000 -1115
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-cache.ts +13 -92
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-claims.test.mjs +79 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-page.mjs +27 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-lifecycle.mjs +6 -6
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-prerequisites.mjs +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-refresh.mjs +2 -10
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-server.mjs +142 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +231 -239
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +18 -29
- package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +6 -0
- package/templates/.agents/dashboard/zaip-dashboard-windows.exe +0 -0
- package/templates/.agents/requirements/autonomous-assurance.md +1 -1
- package/templates/.agents/requirements/cloud-hostinger-autonomy.md +47 -0
- package/templates/.agents/requirements/comparative-audit.md +1 -1
- package/templates/.agents/requirements/context-engine.md +1 -1
- package/templates/.agents/requirements/cost-observability.md +1 -1
- package/templates/.agents/requirements/dashboard-launch.md +2 -2
- package/templates/.agents/requirements/data-export.md +1 -1
- package/templates/.agents/requirements/design-system.md +1 -1
- package/templates/.agents/requirements/execution-engine.md +1 -1
- package/templates/.agents/requirements/kanban-dashboard.md +1 -1
- package/templates/.agents/requirements/model-orchestration.md +1 -1
- package/templates/.agents/requirements/public-distribution.md +1 -1
- package/templates/.agents/requirements/software-architecture.md +1 -1
- package/templates/.agents/requirements/strategic-improvements.md +1 -1
- package/templates/.agents/requirements/work-lifecycle.md +1 -1
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/rules/autonomy-decision.md +1 -1
- package/templates/.agents/rules/cloud-hostinger-autonomy.md +21 -0
- package/templates/.agents/rules/core.md +5 -4
- package/templates/.agents/rules/local-sqlite-storage.md +18 -0
- package/templates/.agents/rules/meta-mcp.md +21 -0
- package/templates/.agents/rules/workflow.md +1 -0
- package/templates/.agents/runtime/bin/zaip.mjs +305 -137
- package/templates/.agents/runtime/checksums.sha256 +2 -2
- package/templates/.agents/runtime/provenance.json +2 -2
- package/templates/.agents/skills/zaip-skill-api-to-mcp/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-brand-governance/SKILL.md +25 -9
- package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-framework.md +2 -2
- package/templates/.agents/skills/zaip-skill-brand-governance/references/brandbook-standards.md +2 -2
- package/templates/.agents/skills/zaip-skill-change/references/observable-evidence.md +15 -0
- package/templates/.agents/skills/zaip-skill-dashboard-sqlite/SKILL.md +13 -5
- package/templates/.agents/skills/zaip-skill-data-analyst/SKILL.md +10 -5
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +5 -4
- package/templates/.agents/skills/zaip-skill-frontend-launcher/SKILL.md +4 -3
- package/templates/.agents/skills/zaip-skill-frontend-launcher/references/launcher-contract.md +5 -3
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +5 -5
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs +78 -13
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.test.mjs +59 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/yaml-parser.mjs +157 -0
- package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +11 -6
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/SKILL.md +17 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/agents/openai.yaml +7 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/autonomous-cloud-inputs.example.json +41 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/autonomous-runner.md +84 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/operational-contract.md +19 -0
- package/templates/.agents/skills/zaip-skill-local-credentials/SKILL.md +43 -0
- package/templates/.agents/skills/zaip-skill-local-credentials/agents/openai.yaml +6 -0
- package/templates/.agents/skills/zaip-skill-local-credentials/references/dotenv-resolution.md +47 -0
- package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +8 -3
- package/templates/.agents/skills/zaip-skill-meta-ads/SKILL.md +16 -0
- package/templates/.agents/skills/zaip-skill-meta-ads/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-ads/references/setup.md +3 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/SKILL.md +24 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/references/diagnostics.md +13 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/references/official-sources.md +10 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-health/references/upstream.md +77 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-api-integration/references/upstream.md +126 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-health-check/references/upstream.md +67 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-app-review-prep/references/upstream.md +69 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-compliance-check/references/upstream.md +79 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-access-token/references/upstream.md +144 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-debug-webhooks/references/upstream.md +83 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/SKILL.md +10 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/references/setup.md +11 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-search-docs/references/upstream.md +55 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/SKILL.md +12 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/references/LICENSE +21 -0
- package/templates/.agents/skills/zaip-skill-meta-devtools-webhook-setup/references/upstream.md +56 -0
- package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +12 -7
- package/templates/.agents/skills/zaip-skill-sqlite-read-model/SKILL.md +11 -4
- package/templates/.agents/skills/zaip-skill-tool-setup/SKILL.md +6 -4
- package/templates/.agents/skills/zaip-skill-tool-setup/references/codex-config.md +4 -2
- package/templates/.agents/skills/zaip-skill-tool-setup/references/secrets.md +1 -0
- package/templates/.agents/tools/catalog.yaml +6 -0
- package/templates/.agents/tools/cloud-runner-dns.mjs +28 -0
- package/templates/.agents/tools/cloud-runner-terraform.mjs +212 -0
- package/templates/.agents/tools/cloud-runner.integration.test.mjs +239 -0
- package/templates/.agents/tools/cloud-runner.mjs +786 -0
- package/templates/.agents/tools/cloud-runner.test.mjs +534 -0
- package/templates/.agents/tools/cloud-terraform-plan-policy.mjs +262 -0
- package/templates/.agents/tools/mcp/development/meta-devtools/README.md +14 -0
- package/templates/.agents/tools/mcp/development/meta-devtools/manifest.yaml +28 -0
- package/templates/.agents/tools/mcp/infra/cloudflare/manifest.yaml +2 -3
- package/templates/.agents/tools/mcp/infra/hostinger/manifest.yaml +1 -3
- package/templates/.agents/tools/mcp/marketing/meta-ads/README.md +15 -13
- package/templates/.agents/tools/mcp/marketing/meta-ads/manifest.yaml +15 -10
- package/templates/.agents/tools/profiles/development.yaml +3 -0
- package/templates/infra/terraform/.terraform.lock.hcl +42 -0
- package/templates/infra/terraform/README.md +31 -0
- package/templates/infra/terraform/backend.tf.json +13 -0
- package/templates/infra/terraform/deployment-inputs.example.yaml +22 -0
- package/templates/infra/terraform/fixtures/approved-targets.json +32 -0
- package/templates/infra/terraform/fixtures/plan-approved.json +67 -0
- package/templates/infra/terraform/main.tf +77 -0
- package/templates/infra/terraform/outputs.tf +20 -0
- package/templates/infra/terraform/terraform.tfvars.example +26 -0
- package/templates/infra/terraform/variables.tf +91 -0
- package/templates/infra/terraform/versions.tf +18 -0
- package/templates/scripts/validate-cloud-hostinger-contract.mjs +89 -0
- package/templates/scripts/validate-cloud-terraform-plan.mjs +1 -0
- package/templates/template-manifest.json +599 -167
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-BwnJpl02.js +0 -3
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-C09KmlSw.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Dyo_wpL4.js +0 -2
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-hPPfVGQv.css +0 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-stale-seed.ts +0 -50
package/README.md
CHANGED
|
@@ -4,6 +4,26 @@
|
|
|
4
4
|
npx @zaip-ai/cli@latest init
|
|
5
5
|
```
|
|
6
6
|
|
|
7
|
+
Installation profiles:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @zaip-ai/cli@latest init
|
|
11
|
+
npx @zaip-ai/cli@latest init --profile dev-lite
|
|
12
|
+
npx @zaip-ai/cli@latest init --profile lite
|
|
13
|
+
npx --yes @zaip-ai/cli@latest init
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
There are exactly three profiles: `full` installs application development dependencies and Terraform
|
|
17
|
+
and is the default for a new project; `dev-lite` installs development dependencies without
|
|
18
|
+
Terraform; and `lite` is for Growth/Ops and skips application development dependencies and
|
|
19
|
+
Terraform. The chosen profile is saved and reused by later `init` calls; selecting a smaller profile
|
|
20
|
+
does not uninstall existing tools. Node/npm remains required even for `lite`.
|
|
21
|
+
|
|
22
|
+
`npx --yes` appears before the package name and suppresses npx's initial package-download prompt. It
|
|
23
|
+
can be combined with any profile, such as `npx --yes @zaip-ai/cli@latest init --profile lite`.
|
|
24
|
+
`init --yes`, after the package name, is ZAIP's confirmation for `--force`. Review the dry-run
|
|
25
|
+
before using `--force --yes`; the installer creates a backup before replacing files.
|
|
26
|
+
|
|
7
27
|
Or use the npm initializer:
|
|
8
28
|
|
|
9
29
|
```bash
|
|
@@ -30,7 +50,7 @@ Windows/macOS/Linux matrix certification.
|
|
|
30
50
|
## Commands and flags
|
|
31
51
|
|
|
32
52
|
```text
|
|
33
|
-
zaip init [directory] [--yes] [--force] [--dry-run] [--verbose] [--project-only]
|
|
53
|
+
zaip init [directory] [--profile full|dev-lite|lite] [--yes] [--force] [--dry-run] [--verbose] [--project-only]
|
|
34
54
|
zaip doctor [directory] [--json]
|
|
35
55
|
zaip adapters build [directory] [--force]
|
|
36
56
|
zaip adapters check [directory] [--json]
|
|
@@ -42,6 +62,9 @@ zaip --help
|
|
|
42
62
|
- `--force` backs up the current `.agents` directory, then reinstalls the official template.
|
|
43
63
|
- `--dry-run` prints the complete plan without writing files or backups.
|
|
44
64
|
- `--verbose` lists technical paths and detected conflicts.
|
|
65
|
+
- `--profile full|dev-lite|lite` selects the installation tools. A new project defaults to `full`;
|
|
66
|
+
later runs reuse the saved profile unless explicitly changed. Smaller profiles never uninstall
|
|
67
|
+
existing dependencies or tools.
|
|
45
68
|
- `--project-only` installs and updates only repository-owned files; it never reads or writes
|
|
46
69
|
`~/.codex`. Without it, initialization removes only deprecated Codex identity aliases declared
|
|
47
70
|
by the current catalog and idempotently installs the portable ZAIP `PreToolUse` safety hook. It
|
|
@@ -55,12 +78,42 @@ may be refreshed safely; user-owned adapters are never overwritten without expli
|
|
|
55
78
|
|
|
56
79
|
## Updating
|
|
57
80
|
|
|
58
|
-
`init` automatically installs missing TypeScript, Vite, Astro, Redis client, BullMQ, Hono,
|
|
81
|
+
With `full` or `dev-lite`, `init` automatically installs missing TypeScript, Vite, Astro, Redis client, BullMQ, Hono,
|
|
59
82
|
React and React DOM packages in the project. Defaults come from
|
|
60
83
|
`.agents/dashboard/stack-dependencies.json`; exact versions in
|
|
61
84
|
`project.yaml` → `stack.overrides.components` take precedence. No approval prompt is needed
|
|
62
85
|
for dependency installation. A new project receives a private `package.json` and an npm lockfile.
|
|
63
86
|
|
|
87
|
+
`full` additionally prepares the fixed Terraform 1.16.1 release; `dev-lite` does not install it. `lite` skips application
|
|
88
|
+
development dependencies and Terraform while retaining ZAIP's runtime, agents, skills and Dashboard.
|
|
89
|
+
It is intended for Growth/Ops projects. Node/npm remain necessary to execute the installer.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx @zaip-ai/cli@latest init --profile lite
|
|
93
|
+
npx @zaip-ai/cli@latest init --profile dev-lite
|
|
94
|
+
npx @zaip-ai/cli@latest init --profile full
|
|
95
|
+
npm create zaip-aios@latest -- --profile lite
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Each command saves `stack.overrides.installation_profile` in `.agents/config/project.yaml` for subsequent updates. Use an explicit larger profile to
|
|
99
|
+
add development or infrastructure tools later. An invalid profile is rejected before installation.
|
|
100
|
+
`--dry-run` previews the selected profile without persisting it or downloading tools.
|
|
101
|
+
|
|
102
|
+
Git is a system capability, not an npm dependency. On Windows, every profile resolves the latest
|
|
103
|
+
official Git for Windows release, verifies its SHA-256 when published, and provisions it privately
|
|
104
|
+
at `.local/git/cmd/git.exe` for ZAIP hooks. On macOS and Linux, `init` validates the system `git`
|
|
105
|
+
command and reports an actionable prerequisite error when it is unavailable. The installer never
|
|
106
|
+
changes the global Git installation or PATH.
|
|
107
|
+
|
|
108
|
+
Terraform is a standalone executable. The full profile reuses a compatible installation or prepares
|
|
109
|
+
the pinned official Terraform 1.16.1 release locally, verifying its SHA-256 checksum. Provider plugins
|
|
110
|
+
are downloaded separately by `terraform init` for the project's `.tf` configuration. Cloud credentials
|
|
111
|
+
remain a separate setup step; ZAIP installation never runs `terraform apply`.
|
|
112
|
+
|
|
113
|
+
When Terraform is installed locally, npm scripts can find it in `node_modules/.bin`. You can also
|
|
114
|
+
invoke it directly: `.\node_modules\.bin\terraform.exe version` in Windows PowerShell or
|
|
115
|
+
`./node_modules/.bin/terraform version` on macOS/Linux. The installer does not modify the global PATH.
|
|
116
|
+
|
|
64
117
|
An existing local package is preserved even when its version differs from ZAIP's configuration;
|
|
65
118
|
the summary reports both versions. When a package is declared but not installed, the project's
|
|
66
119
|
existing declaration wins. React DOM follows an existing React version when no DOM choice exists.
|
|
@@ -83,7 +136,9 @@ The Redis npm package is a client library: a Redis server or hosted endpoint rem
|
|
|
83
136
|
an application infrastructure choice. SQLite is provided by Node and initialized automatically.
|
|
84
137
|
|
|
85
138
|
`--dry-run` displays missing and preserved packages without downloading or changing anything.
|
|
86
|
-
`doctor` validates framework files and
|
|
139
|
+
`doctor` validates framework files, adapters and Terraform availability for projects with a saved
|
|
140
|
+
`full` profile; the installer separately verifies stack packages. Legacy projects without a saved
|
|
141
|
+
profile do not gain a Terraform requirement from a read-only `doctor` call.
|
|
87
142
|
|
|
88
143
|
Run the latest version again. New files are added while local changes remain untouched:
|
|
89
144
|
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface InitCommandOptions {
|
|
|
5
5
|
dryRun?: boolean;
|
|
6
6
|
verbose?: boolean;
|
|
7
7
|
projectOnly?: boolean;
|
|
8
|
+
profile?: "full" | "dev-lite" | "lite";
|
|
8
9
|
}
|
|
9
10
|
export declare function executeInit(directory: string | undefined, command: InitCommandOptions, version: string, runtime?: CliRuntime): Promise<InitResult>;
|
|
10
11
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAe,UAAU,EAAE,MAAM,aAAa,CAAC;AAEvE,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;CACxC;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,UAAU,CAAC,CAyDrB"}
|
package/dist/commands/init.js
CHANGED
|
@@ -2,11 +2,14 @@ import { resolve } from "node:path";
|
|
|
2
2
|
import { createInterface } from "node:readline/promises";
|
|
3
3
|
import { findProjectRoot } from "../services/find-project-root.js";
|
|
4
4
|
import { installAgentsTemplate } from "../services/install-agents-template.js";
|
|
5
|
+
import { persistInstallProfile, resolveInstallProfile } from "../services/install-profile.js";
|
|
5
6
|
import { printResult } from "../services/logger.js";
|
|
6
7
|
import { assertDashboardBootstrapPreflight, bootstrapDashboardSqlite, } from "../services/sqlite-bootstrap.js";
|
|
8
|
+
import { prepareStackGit } from "../services/stack-git.js";
|
|
7
9
|
import { installStack } from "../services/stack-install.js";
|
|
8
10
|
import { exposeStackNode, prepareStackNode, usingStackNode } from "../services/stack-node.js";
|
|
9
11
|
import { describeStack, planStack } from "../services/stack-plan.js";
|
|
12
|
+
import { prepareStackTerraform } from "../services/stack-terraform.js";
|
|
10
13
|
export async function executeInit(directory, command, version, runtime = {}) {
|
|
11
14
|
const stdin = runtime.stdin ?? process.stdin;
|
|
12
15
|
const stdout = runtime.stdout ?? process.stdout;
|
|
@@ -16,6 +19,7 @@ export async function executeInit(directory, command, version, runtime = {}) {
|
|
|
16
19
|
force: command.force ?? false,
|
|
17
20
|
dryRun: command.dryRun ?? false,
|
|
18
21
|
verbose: command.verbose ?? false,
|
|
22
|
+
...(command.profile === undefined ? {} : { profile: command.profile }),
|
|
19
23
|
cliVersion: version,
|
|
20
24
|
installGlobalCodexConfig: runtime.templateDirectory === undefined && !command.projectOnly,
|
|
21
25
|
...(directory === undefined ? {} : { directory }),
|
|
@@ -28,21 +32,28 @@ export async function executeInit(directory, command, version, runtime = {}) {
|
|
|
28
32
|
options.confirmForce = confirmation(stdin, stdout);
|
|
29
33
|
}
|
|
30
34
|
const target = await findProjectRoot(resolve(options.cwd, directory ?? "."));
|
|
31
|
-
const
|
|
35
|
+
const profile = await resolveInstallProfile(target.root, command.profile);
|
|
36
|
+
const stack = await planStack(target.root, runtime.templateDirectory, profile);
|
|
32
37
|
if (!options.dryRun)
|
|
33
38
|
await assertDashboardBootstrapPreflight();
|
|
34
39
|
const result = await installAgentsTemplate(options);
|
|
35
40
|
if (result.dryRun || result.applied)
|
|
36
41
|
stdout.write(describeStack(stack, result.dryRun));
|
|
37
42
|
if (result.applied && !result.dryRun) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
await prepareStackGit(result.root, (message) => stdout.write(message));
|
|
44
|
+
if (profile !== "lite") {
|
|
45
|
+
const node = await prepareStackNode(result.root, (message) => stdout.write(message));
|
|
46
|
+
const dependencies = await installStack(stack, usingStackNode(node, runtime.packageRunner));
|
|
47
|
+
await exposeStackNode(result.root, node);
|
|
48
|
+
for (const item of dependencies.packages.filter((item) => item.action === "installed")) {
|
|
49
|
+
stdout.write(`${item.name}: instalado ${item.installed}; configurado ZAIP ${item.configured}.\n`);
|
|
50
|
+
}
|
|
43
51
|
}
|
|
52
|
+
if (profile === "full")
|
|
53
|
+
await prepareStackTerraform(result.root, (message) => stdout.write(message));
|
|
44
54
|
const sqlite = await bootstrapDashboardSqlite({ workspaceRoot: result.root });
|
|
45
55
|
stdout.write(`Dashboard SQLite pronto: ${sqlite.path} (${sqlite.cache}).\n`);
|
|
56
|
+
await persistInstallProfile(result.root, profile);
|
|
46
57
|
}
|
|
47
58
|
printResult(stdout, result, version, command.verbose);
|
|
48
59
|
if (command.projectOnly) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EACL,iCAAiC,EACjC,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands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E,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CliRuntime, InitOptions, InitResult } from "./types.js";
|
|
2
|
+
export { assertDeliveryGitPreflight, DeliveryGitPreflightError, type DeliveryGitPreflightFinding, type DeliveryGitPreflightResult, } from "./services/delivery-git-preflight.js";
|
|
2
3
|
export { doctorProject } from "./services/doctor.js";
|
|
3
4
|
export { findProjectRoot } from "./services/find-project-root.js";
|
|
4
5
|
export { installAgentsTemplate } from "./services/install-agents-template.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGtE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,wBAAsB,cAAc,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,CAEnF;AAED,wBAAsB,UAAU,CAC9B,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED,wBAAsB,MAAM,CAC1B,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CA2BjB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGtE,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,GAChC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,wBAAsB,cAAc,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,CAEnF;AAED,wBAAsB,UAAU,CAC9B,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED,wBAAsB,MAAM,CAC1B,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CA2BjB"}
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { doctorProject } from "./services/doctor.js";
|
|
|
6
6
|
import { findProjectRoot } from "./services/find-project-root.js";
|
|
7
7
|
import { installAgentsTemplate } from "./services/install-agents-template.js";
|
|
8
8
|
import { CLI_VERSION } from "./version.js";
|
|
9
|
+
export { assertDeliveryGitPreflight, DeliveryGitPreflightError, } from "./services/delivery-git-preflight.js";
|
|
9
10
|
export { doctorProject } from "./services/doctor.js";
|
|
10
11
|
export { findProjectRoot } from "./services/find-project-root.js";
|
|
11
12
|
export { installAgentsTemplate } from "./services/install-agents-template.js";
|
|
@@ -59,6 +60,7 @@ function createProgram(runtime) {
|
|
|
59
60
|
.option("-f, --force", "cria backup e reinstala o template")
|
|
60
61
|
.option("--dry-run", "mostra o plano sem alterar arquivos")
|
|
61
62
|
.option("--verbose", "mostra detalhes técnicos")
|
|
63
|
+
.option("--profile <profile>", "perfil: full, dev-lite ou lite")
|
|
62
64
|
.option("--project-only", "instala somente no projeto sem modificar a configuração global do Codex")
|
|
63
65
|
.action(async (directory, options) => {
|
|
64
66
|
await executeInit(directory, options, CLI_VERSION, runtime);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAAO,GA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,CAAC;SACjD,MAAM,CAAC,QAAQ,EAAE,6BAA6B,CAAC;SAC/C,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,OAA2B,EAAE,EAAE;QAC/D,MAAM,IAAI,GAAG,CAAC,MAAM,eAAe,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAClF,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;QAChD,MAAM,CAAC,KAAK,CACV,OAAO,CAAC,IAAI;YACV,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI;YACxC,CAAC,CAAC,MAAM,CAAC,KAAK;gBACZ,CAAC,CAAC,+BAA+B;gBACjC,CAAC,CAAC,qCAAqC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CACzE,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,KAAK;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAmB,EAAE,SAAiB;IAChE,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -121,7 +121,7 @@ matcher = "^(Bash|shell_command|exec_command|apply_patch|Edit|Write)$"
|
|
|
121
121
|
[[hooks.PreToolUse.hooks]]
|
|
122
122
|
type = "command"
|
|
123
123
|
command = '''node "$(git rev-parse --show-toplevel)/.codex/hooks/zaip-pre-tool-use.mjs"'''
|
|
124
|
-
command_windows = '''powershell -NoProfile -NonInteractive -Command "$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-pre-tool-use.mjs')"'''
|
|
124
|
+
command_windows = '''powershell -NoProfile -NonInteractive -Command "$git = Join-Path ${CODEX_WORKSPACE_ROOT_PLACEHOLDER} '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-pre-tool-use.mjs')"'''
|
|
125
125
|
timeout = 10
|
|
126
126
|
statusMessage = "Applying ZAIP workspace safety policy"
|
|
127
127
|
|
|
@@ -144,7 +144,7 @@ matcher = "*"
|
|
|
144
144
|
[[hooks.SubagentStart.hooks]]
|
|
145
145
|
type = "command"
|
|
146
146
|
command = '''node "$(git rev-parse --show-toplevel)/.codex/hooks/zaip-subagent-lifecycle.mjs"'''
|
|
147
|
-
command_windows = '''powershell -NoProfile -NonInteractive -Command "$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')"'''
|
|
147
|
+
command_windows = '''powershell -NoProfile -NonInteractive -Command "$git = Join-Path ${CODEX_WORKSPACE_ROOT_PLACEHOLDER} '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')"'''
|
|
148
148
|
timeout = 3
|
|
149
149
|
statusMessage = "Attributing ZAIP subagent Run"
|
|
150
150
|
|
|
@@ -154,7 +154,7 @@ matcher = "*"
|
|
|
154
154
|
[[hooks.SubagentStop.hooks]]
|
|
155
155
|
type = "command"
|
|
156
156
|
command = '''node "$(git rev-parse --show-toplevel)/.codex/hooks/zaip-subagent-lifecycle.mjs"'''
|
|
157
|
-
command_windows = '''powershell -NoProfile -NonInteractive -Command "$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')"'''
|
|
157
|
+
command_windows = '''powershell -NoProfile -NonInteractive -Command "$git = Join-Path ${CODEX_WORKSPACE_ROOT_PLACEHOLDER} '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')"'''
|
|
158
158
|
timeout = 3
|
|
159
159
|
statusMessage = "Finalizing ZAIP subagent Run"
|
|
160
160
|
`;
|
|
@@ -167,7 +167,7 @@ const CLAUDE_SETTINGS = `{
|
|
|
167
167
|
}
|
|
168
168
|
`;
|
|
169
169
|
export function adapterFiles(workspaceRoot, catalog) {
|
|
170
|
-
const codexConfig = CODEX_CONFIG.
|
|
170
|
+
const codexConfig = CODEX_CONFIG.replaceAll(CODEX_WORKSPACE_ROOT_PLACEHOLDER, JSON.stringify(resolve(workspaceRoot)));
|
|
171
171
|
return [
|
|
172
172
|
managed("AGENTS.md", renderRootGuidance(catalog), "root-guidance"),
|
|
173
173
|
managed("CLAUDE.md", renderRootGuidance(catalog), "root-guidance"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.js","sourceRoot":"","sources":["../../src/services/adapters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EACL,gBAAgB,EAEhB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAE3F,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAOxC,MAAM,aAAa,GAAG;;;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const CODEX_PRE_TOOL_USE_HOOK = "[[hooks.PreToolUse]]\nmatcher = \"^(Bash|shell_command|exec_command|apply_patch|Edit|Write)$\"\n\n[[hooks.PreToolUse.hooks]]\ntype = \"command\"\ncommand = '''node \"$(git rev-parse --show-toplevel)/.codex/hooks/zaip-pre-tool-use.mjs\"'''\ncommand_windows = '''powershell -NoProfile -NonInteractive -Command \"$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-pre-tool-use.mjs')\"'''\ntimeout = 10\nstatusMessage = \"Applying ZAIP workspace safety policy\"";
|
|
3
|
-
export declare const CODEX_CONFIG = "project_doc_fallback_filenames = [\"AGENTS.md\"]\napproval_policy = \"never\"\ndefault_permissions = \"zaip-aios-full-access\"\nallow_login_shell = true\nweb_search = \"live\"\ndeveloper_instructions = \"\"\"\nThe default full-access profile permits unrestricted development. Follow the user's current request.\n\"\"\"\n\n[permissions.zaip-aios-security]\ndescription = \"Zaip AIOS workspace-only development with security. (low risk)\"\n\n[permissions.zaip-aios-security.filesystem]\n\":minimal\" = \"read\"\n\"~/.ssh\" = \"write\"\n\n[permissions.zaip-aios-security.filesystem.__ZAIP_WORKSPACE_ROOT_TOML__]\n\".\" = \"write\"\n\".git\" = \"write\"\n\".agents\" = \"write\"\n\".codex\" = \"write\"\n\n[permissions.zaip-aios-security.network]\nenabled = true\nmode = \"limited\"\n\n[permissions.zaip-aios-security.network.domains]\n\"github.com\" = \"allow\"\n\n[permissions.zaip-aios-full-access]\ndescription = \"Zaip AIOS unrestricted full access. (higher risk)\"\n\n[permissions.zaip-aios-full-access.filesystem]\n\":root\" = \"write\"\n\n[permissions.zaip-aios-full-access.network]\nenabled = true\nmode = \"full\"\n\n[permissions.zaip-aios-full-access.network.domains]\n\"*\" = \"allow\"\n\n[shell_environment_policy]\ninherit = \"all\"\nignore_default_excludes = true\nexclude = []\ninclude_only = []\nexperimental_use_profile = false\n\n[shell_environment_policy.set]\nBROWSER_USE_AVAILABLE_BACKENDS = \"chrome,iab\"\n\n[plugins.\"browser@openai-bundled\"]\nenabled = true\n\n[plugins.\"computer-use@openai-bundled\"]\nenabled = true\n\n[features]\nhooks = true\nunified_exec = false\njs_repl = true\n\n[[hooks.PreToolUse]]\nmatcher = \"^(Bash|shell_command|exec_command|apply_patch|Edit|Write)$\"\n\n[[hooks.PreToolUse.hooks]]\ntype = \"command\"\ncommand = '''node \"$(git rev-parse --show-toplevel)/.codex/hooks/zaip-pre-tool-use.mjs\"'''\ncommand_windows = '''powershell -NoProfile -NonInteractive -Command \"$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-pre-tool-use.mjs')\"'''\ntimeout = 10\nstatusMessage = \"Applying ZAIP workspace safety policy\"\n\n[apps._default]\ndestructive_enabled = true\nopen_world_enabled = true\ndefault_tools_approval_mode = \"approve\"\n\n[mcp_servers.openaiDeveloperDocs]\nurl = \"https://developers.openai.com/mcp\"\nenabled = true\nenabled_tools = [\"search_openai_docs\", \"fetch_openai_doc\", \"list_openai_docs\", \"get_openapi_spec\", \"list_api_endpoints\"]\ndefault_tools_approval_mode = \"approve\"\nstartup_timeout_sec = 20\ntool_timeout_sec = 60\n\n[[hooks.SubagentStart]]\nmatcher = \"*\"\n\n[[hooks.SubagentStart.hooks]]\ntype = \"command\"\ncommand = '''node \"$(git rev-parse --show-toplevel)/.codex/hooks/zaip-subagent-lifecycle.mjs\"'''\ncommand_windows = '''powershell -NoProfile -NonInteractive -Command \"$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')\"'''\ntimeout = 3\nstatusMessage = \"Attributing ZAIP subagent Run\"\n\n[[hooks.SubagentStop]]\nmatcher = \"*\"\n\n[[hooks.SubagentStop.hooks]]\ntype = \"command\"\ncommand = '''node \"$(git rev-parse --show-toplevel)/.codex/hooks/zaip-subagent-lifecycle.mjs\"'''\ncommand_windows = '''powershell -NoProfile -NonInteractive -Command \"$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')\"'''\ntimeout = 3\nstatusMessage = \"Finalizing ZAIP subagent Run\"\n";
|
|
2
|
+
export declare const CODEX_PRE_TOOL_USE_HOOK = "[[hooks.PreToolUse]]\nmatcher = \"^(Bash|shell_command|exec_command|apply_patch|Edit|Write)$\"\n\n[[hooks.PreToolUse.hooks]]\ntype = \"command\"\ncommand = '''node \"$(git rev-parse --show-toplevel)/.codex/hooks/zaip-pre-tool-use.mjs\"'''\ncommand_windows = '''powershell -NoProfile -NonInteractive -Command \"$git = Join-Path __ZAIP_WORKSPACE_ROOT_TOML__ '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-pre-tool-use.mjs')\"'''\ntimeout = 10\nstatusMessage = \"Applying ZAIP workspace safety policy\"";
|
|
3
|
+
export declare const CODEX_CONFIG = "project_doc_fallback_filenames = [\"AGENTS.md\"]\napproval_policy = \"never\"\ndefault_permissions = \"zaip-aios-full-access\"\nallow_login_shell = true\nweb_search = \"live\"\ndeveloper_instructions = \"\"\"\nThe default full-access profile permits unrestricted development. Follow the user's current request.\n\"\"\"\n\n[permissions.zaip-aios-security]\ndescription = \"Zaip AIOS workspace-only development with security. (low risk)\"\n\n[permissions.zaip-aios-security.filesystem]\n\":minimal\" = \"read\"\n\"~/.ssh\" = \"write\"\n\n[permissions.zaip-aios-security.filesystem.__ZAIP_WORKSPACE_ROOT_TOML__]\n\".\" = \"write\"\n\".git\" = \"write\"\n\".agents\" = \"write\"\n\".codex\" = \"write\"\n\n[permissions.zaip-aios-security.network]\nenabled = true\nmode = \"limited\"\n\n[permissions.zaip-aios-security.network.domains]\n\"github.com\" = \"allow\"\n\n[permissions.zaip-aios-full-access]\ndescription = \"Zaip AIOS unrestricted full access. (higher risk)\"\n\n[permissions.zaip-aios-full-access.filesystem]\n\":root\" = \"write\"\n\n[permissions.zaip-aios-full-access.network]\nenabled = true\nmode = \"full\"\n\n[permissions.zaip-aios-full-access.network.domains]\n\"*\" = \"allow\"\n\n[shell_environment_policy]\ninherit = \"all\"\nignore_default_excludes = true\nexclude = []\ninclude_only = []\nexperimental_use_profile = false\n\n[shell_environment_policy.set]\nBROWSER_USE_AVAILABLE_BACKENDS = \"chrome,iab\"\n\n[plugins.\"browser@openai-bundled\"]\nenabled = true\n\n[plugins.\"computer-use@openai-bundled\"]\nenabled = true\n\n[features]\nhooks = true\nunified_exec = false\njs_repl = true\n\n[[hooks.PreToolUse]]\nmatcher = \"^(Bash|shell_command|exec_command|apply_patch|Edit|Write)$\"\n\n[[hooks.PreToolUse.hooks]]\ntype = \"command\"\ncommand = '''node \"$(git rev-parse --show-toplevel)/.codex/hooks/zaip-pre-tool-use.mjs\"'''\ncommand_windows = '''powershell -NoProfile -NonInteractive -Command \"$git = Join-Path __ZAIP_WORKSPACE_ROOT_TOML__ '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-pre-tool-use.mjs')\"'''\ntimeout = 10\nstatusMessage = \"Applying ZAIP workspace safety policy\"\n\n[apps._default]\ndestructive_enabled = true\nopen_world_enabled = true\ndefault_tools_approval_mode = \"approve\"\n\n[mcp_servers.openaiDeveloperDocs]\nurl = \"https://developers.openai.com/mcp\"\nenabled = true\nenabled_tools = [\"search_openai_docs\", \"fetch_openai_doc\", \"list_openai_docs\", \"get_openapi_spec\", \"list_api_endpoints\"]\ndefault_tools_approval_mode = \"approve\"\nstartup_timeout_sec = 20\ntool_timeout_sec = 60\n\n[[hooks.SubagentStart]]\nmatcher = \"*\"\n\n[[hooks.SubagentStart.hooks]]\ntype = \"command\"\ncommand = '''node \"$(git rev-parse --show-toplevel)/.codex/hooks/zaip-subagent-lifecycle.mjs\"'''\ncommand_windows = '''powershell -NoProfile -NonInteractive -Command \"$git = Join-Path __ZAIP_WORKSPACE_ROOT_TOML__ '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')\"'''\ntimeout = 3\nstatusMessage = \"Attributing ZAIP subagent Run\"\n\n[[hooks.SubagentStop]]\nmatcher = \"*\"\n\n[[hooks.SubagentStop.hooks]]\ntype = \"command\"\ncommand = '''node \"$(git rev-parse --show-toplevel)/.codex/hooks/zaip-subagent-lifecycle.mjs\"'''\ncommand_windows = '''powershell -NoProfile -NonInteractive -Command \"$git = Join-Path __ZAIP_WORKSPACE_ROOT_TOML__ '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')\"'''\ntimeout = 3\nstatusMessage = \"Finalizing ZAIP subagent Run\"\n";
|
|
4
4
|
//# sourceMappingURL=codex-config-template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-config-template.d.ts","sourceRoot":"","sources":["../../src/services/codex-config-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,iCAAiC,CAAC;AAE/E,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"codex-config-template.d.ts","sourceRoot":"","sources":["../../src/services/codex-config-template.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,iCAAiC,CAAC;AAE/E,eAAO,MAAM,uBAAuB,+mBAQoB,CAAC;AAEzD,eAAO,MAAM,YAAY,4uHAiGxB,CAAC"}
|
|
@@ -5,7 +5,7 @@ matcher = "^(Bash|shell_command|exec_command|apply_patch|Edit|Write)$"
|
|
|
5
5
|
[[hooks.PreToolUse.hooks]]
|
|
6
6
|
type = "command"
|
|
7
7
|
command = '''node "$(git rev-parse --show-toplevel)/.codex/hooks/zaip-pre-tool-use.mjs"'''
|
|
8
|
-
command_windows = '''powershell -NoProfile -NonInteractive -Command "$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-pre-tool-use.mjs')"'''
|
|
8
|
+
command_windows = '''powershell -NoProfile -NonInteractive -Command "$git = Join-Path ${CODEX_WORKSPACE_ROOT_PLACEHOLDER} '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-pre-tool-use.mjs')"'''
|
|
9
9
|
timeout = 10
|
|
10
10
|
statusMessage = "Applying ZAIP workspace safety policy"`;
|
|
11
11
|
export const CODEX_CONFIG = `project_doc_fallback_filenames = ["AGENTS.md"]
|
|
@@ -92,7 +92,7 @@ matcher = "*"
|
|
|
92
92
|
[[hooks.SubagentStart.hooks]]
|
|
93
93
|
type = "command"
|
|
94
94
|
command = '''node "$(git rev-parse --show-toplevel)/.codex/hooks/zaip-subagent-lifecycle.mjs"'''
|
|
95
|
-
command_windows = '''powershell -NoProfile -NonInteractive -Command "$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')"'''
|
|
95
|
+
command_windows = '''powershell -NoProfile -NonInteractive -Command "$git = Join-Path ${CODEX_WORKSPACE_ROOT_PLACEHOLDER} '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')"'''
|
|
96
96
|
timeout = 3
|
|
97
97
|
statusMessage = "Attributing ZAIP subagent Run"
|
|
98
98
|
|
|
@@ -102,7 +102,7 @@ matcher = "*"
|
|
|
102
102
|
[[hooks.SubagentStop.hooks]]
|
|
103
103
|
type = "command"
|
|
104
104
|
command = '''node "$(git rev-parse --show-toplevel)/.codex/hooks/zaip-subagent-lifecycle.mjs"'''
|
|
105
|
-
command_windows = '''powershell -NoProfile -NonInteractive -Command "$root = git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')"'''
|
|
105
|
+
command_windows = '''powershell -NoProfile -NonInteractive -Command "$git = Join-Path ${CODEX_WORKSPACE_ROOT_PLACEHOLDER} '.local\\git\\cmd\\git.exe'; if (!(Test-Path -LiteralPath $git)) { $git = 'git' }; $root = & $git rev-parse --show-toplevel; node (Join-Path $root '.codex/hooks/zaip-subagent-lifecycle.mjs')"'''
|
|
106
106
|
timeout = 3
|
|
107
107
|
statusMessage = "Finalizing ZAIP subagent Run"
|
|
108
108
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex-config-template.js","sourceRoot":"","sources":["../../src/services/codex-config-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG,8BAA8B,CAAC;AAE/E,MAAM,CAAC,MAAM,uBAAuB,GAAG
|
|
1
|
+
{"version":3,"file":"codex-config-template.js","sourceRoot":"","sources":["../../src/services/codex-config-template.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG,8BAA8B,CAAC;AAE/E,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;wFAMiD,gCAAgC;;wDAEhE,CAAC;AAEzD,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;6CAgBiB,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+C3E,uBAAuB;;;;;;;;;;;;;;;;;;;;;wFAqB+D,gCAAgC;;;;;;;;;;wFAUhC,gCAAgC;;;CAGvH,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# Only an explicit deploy request activates the ZAIP deploy skill. Its bounded flow may reconcile\n# the
|
|
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 branch resolved fresh from project.yaml deploy.branch and form evidenced functional commits\n# with explicit pathspecs. The fallback is main only when that file or key is absent.\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\"],\n not_match = [\"node scripts/other.mjs\"],\n)\n\nprefix_rule(\n pattern = [\"git\", \"fetch\"],\n decision = \"allow\",\n justification = \"Fetch the configured GitHub remote once before checking the configured deploy branch.\",\n match = [\"git fetch origin\"],\n not_match = [\"git pull origin\"],\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\", \"-m\"],\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\", \"stash\", \"push\", \"--include-untracked\"],\n decision = \"allow\",\n justification = \"Preserve the selected deploy diff without dropping history.\",\n match = [\"git stash push --include-untracked -m deploy-preserve\"],\n not_match = [\"git stash drop\"],\n)\n\nprefix_rule(\n pattern = [\"git\", \"stash\", \"apply\"],\n decision = \"allow\",\n justification = \"Reapply the preserved selected deploy diff.\",\n match = [\"git stash apply\"],\n not_match = [\"git stash drop\"],\n)\n\nprefix_rule(\n pattern = [\"git\", \"push\"],\n decision = \"allow\",\n justification = \"Publish only deploy.branch with an explicit refspec after ZAIP preflight.\",\n match = [\"git push origin HEAD:refs/heads/main\"],\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/main\"],\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 = [\"git\", [\"-c\", \"--config\", \"--config-env\", \"--git-dir\", \"--work-tree\", \"--namespace\"]],\n decision = \"forbidden\",\n justification = \"Git configuration and repository-routing overrides can bypass the managed safety hook.\",\n match = [\"git -c core.hooksPath=/tmp/empty commit -m bypass\", \"git --config core.hooksPath=/tmp/empty commit -m bypass\"],\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,myHA4FrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,otEA4ChC,CAAC"}
|
|
@@ -1,21 +1,22 @@
|
|
|
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
|
|
3
|
+
# the branch resolved fresh from project.yaml deploy.branch and form evidenced functional commits
|
|
4
|
+
# with explicit pathspecs. The fallback is main only when that file or key is absent.
|
|
4
5
|
|
|
5
6
|
prefix_rule(
|
|
6
7
|
pattern = ["node", ".agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs"],
|
|
7
8
|
decision = "allow",
|
|
8
9
|
justification = "Run the sanitized, repository-owned folder-scoped SSH preflight.",
|
|
9
|
-
match = ["node .agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs --repository . --remote origin
|
|
10
|
+
match = ["node .agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs --repository . --remote origin"],
|
|
10
11
|
not_match = ["node scripts/other.mjs"],
|
|
11
12
|
)
|
|
12
13
|
|
|
13
14
|
prefix_rule(
|
|
14
15
|
pattern = ["git", "fetch"],
|
|
15
16
|
decision = "allow",
|
|
16
|
-
justification = "Fetch the
|
|
17
|
-
match = ["git fetch origin
|
|
18
|
-
not_match = ["git pull origin
|
|
17
|
+
justification = "Fetch the configured GitHub remote once before checking the configured deploy branch.",
|
|
18
|
+
match = ["git fetch origin"],
|
|
19
|
+
not_match = ["git pull origin"],
|
|
19
20
|
)
|
|
20
21
|
|
|
21
22
|
prefix_rule(
|
|
@@ -50,27 +51,11 @@ prefix_rule(
|
|
|
50
51
|
not_match = ["git stash drop"],
|
|
51
52
|
)
|
|
52
53
|
|
|
53
|
-
prefix_rule(
|
|
54
|
-
pattern = ["git", "rebase", "origin/demo"],
|
|
55
|
-
decision = "allow",
|
|
56
|
-
justification = "Reconcile only the selected deploy branch.",
|
|
57
|
-
match = ["git rebase origin/demo"],
|
|
58
|
-
not_match = ["git rebase --abort"],
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
prefix_rule(
|
|
62
|
-
pattern = ["git", "merge", "origin/demo"],
|
|
63
|
-
decision = "allow",
|
|
64
|
-
justification = "Reconcile only the selected deploy branch.",
|
|
65
|
-
match = ["git merge origin/demo"],
|
|
66
|
-
not_match = ["git merge --abort"],
|
|
67
|
-
)
|
|
68
|
-
|
|
69
54
|
prefix_rule(
|
|
70
55
|
pattern = ["git", "push"],
|
|
71
56
|
decision = "allow",
|
|
72
|
-
justification = "Publish only
|
|
73
|
-
match = ["git push origin
|
|
57
|
+
justification = "Publish only deploy.branch with an explicit refspec after ZAIP preflight.",
|
|
58
|
+
match = ["git push origin HEAD:refs/heads/main"],
|
|
74
59
|
not_match = ["git pull", "ssh -i key git@github.com"],
|
|
75
60
|
)
|
|
76
61
|
|
|
@@ -78,7 +63,7 @@ prefix_rule(
|
|
|
78
63
|
pattern = ["git", "ls-remote"],
|
|
79
64
|
decision = "allow",
|
|
80
65
|
justification = "Verify GitHub connectivity and the exact remote branch hash.",
|
|
81
|
-
match = ["git ls-remote origin refs/heads/
|
|
66
|
+
match = ["git ls-remote origin refs/heads/main"],
|
|
82
67
|
not_match = ["git remote set-url origin git@github.com:other/repo.git"],
|
|
83
68
|
)
|
|
84
69
|
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FxC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CnC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type DeliveryGitPreflightCode = "git-unavailable" | "git-repository-required" | "git-head-required" | "git-user-name-required" | "git-user-email-required";
|
|
2
|
+
export interface DeliveryGitPreflightFinding {
|
|
3
|
+
code: DeliveryGitPreflightCode;
|
|
4
|
+
message: string;
|
|
5
|
+
action: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DeliveryGitPreflightResult {
|
|
8
|
+
git: string;
|
|
9
|
+
head: string;
|
|
10
|
+
user_name: string;
|
|
11
|
+
user_email: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class DeliveryGitPreflightError extends Error {
|
|
14
|
+
readonly finding: DeliveryGitPreflightFinding;
|
|
15
|
+
constructor(finding: DeliveryGitPreflightFinding);
|
|
16
|
+
toJSON(): DeliveryGitPreflightFinding;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Delivery has a stricter boundary than installation: init may lay out ZAIP
|
|
20
|
+
* files outside Git, but persistent delivery needs a local history and author.
|
|
21
|
+
*/
|
|
22
|
+
export declare function assertDeliveryGitPreflight(root: string): Promise<DeliveryGitPreflightResult>;
|
|
23
|
+
//# sourceMappingURL=delivery-git-preflight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivery-git-preflight.d.ts","sourceRoot":"","sources":["../../src/services/delivery-git-preflight.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,wBAAwB,GAChC,iBAAiB,GACjB,yBAAyB,GACzB,mBAAmB,GACnB,wBAAwB,GACxB,yBAAyB,CAAC;AAE9B,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IACtC,QAAQ,CAAC,OAAO,EAAE,2BAA2B;IAAzD,YAAqB,OAAO,EAAE,2BAA2B,EAGxD;IAED,MAAM,IAAI,2BAA2B,CAEpC;CACF;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,0BAA0B,CAAC,CA2CrC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { stat } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { promisify } from "node:util";
|
|
5
|
+
const exec = promisify(execFile);
|
|
6
|
+
export class DeliveryGitPreflightError extends Error {
|
|
7
|
+
finding;
|
|
8
|
+
constructor(finding) {
|
|
9
|
+
super(finding.message);
|
|
10
|
+
this.finding = finding;
|
|
11
|
+
this.name = "DeliveryGitPreflightError";
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
return this.finding;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Delivery has a stricter boundary than installation: init may lay out ZAIP
|
|
19
|
+
* files outside Git, but persistent delivery needs a local history and author.
|
|
20
|
+
*/
|
|
21
|
+
export async function assertDeliveryGitPreflight(root) {
|
|
22
|
+
const git = await gitExecutable(root);
|
|
23
|
+
const version = await runGit(git, root, ["--version"]);
|
|
24
|
+
if (version === null)
|
|
25
|
+
fail("git-unavailable", "Git não está disponível para iniciar a delivery.", "Instale ou repare o Git e repita a execução.");
|
|
26
|
+
const inside = await runGit(git, root, ["rev-parse", "--is-inside-work-tree"]);
|
|
27
|
+
if (inside?.trim() !== "true")
|
|
28
|
+
fail("git-repository-required", "A delivery exige um diretório dentro de um repositório Git.", "Execute git init ou abra um repositório existente antes de iniciar a delivery.");
|
|
29
|
+
const head = await runGit(git, root, ["rev-parse", "HEAD"]);
|
|
30
|
+
if (head === null || !/^[a-f0-9]{40,64}$/i.test(head.trim()))
|
|
31
|
+
fail("git-head-required", "A delivery exige pelo menos um commit Git (HEAD).", "Crie o commit inicial antes de iniciar a delivery.");
|
|
32
|
+
const userName = await runGit(git, root, ["config", "--get", "user.name"]);
|
|
33
|
+
if (userName === null || userName.trim().length === 0)
|
|
34
|
+
fail("git-user-name-required", "A delivery exige Git user.name configurado.", 'Execute git config user.name "Seu Nome" e repita.');
|
|
35
|
+
const userEmail = await runGit(git, root, ["config", "--get", "user.email"]);
|
|
36
|
+
if (userEmail === null || userEmail.trim().length === 0)
|
|
37
|
+
fail("git-user-email-required", "A delivery exige Git user.email configurado.", 'Execute git config user.email "voce@exemplo.com" e repita.');
|
|
38
|
+
return {
|
|
39
|
+
git: version.trim(),
|
|
40
|
+
head: head.trim(),
|
|
41
|
+
user_name: userName.trim(),
|
|
42
|
+
user_email: userEmail.trim(),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function fail(code, message, action) {
|
|
46
|
+
throw new DeliveryGitPreflightError({ code, message, action });
|
|
47
|
+
}
|
|
48
|
+
async function gitExecutable(root) {
|
|
49
|
+
if (process.platform !== "win32")
|
|
50
|
+
return "git";
|
|
51
|
+
const local = join(root, ".local", "git", "cmd", "git.exe");
|
|
52
|
+
try {
|
|
53
|
+
if ((await stat(local)).isFile())
|
|
54
|
+
return local;
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// The system Git is the fallback when the managed portable copy is absent.
|
|
58
|
+
}
|
|
59
|
+
return "git";
|
|
60
|
+
}
|
|
61
|
+
async function runGit(git, cwd, args) {
|
|
62
|
+
try {
|
|
63
|
+
return (await exec(git, [...args], { cwd, encoding: "utf8", windowsHide: true, timeout: 10_000 })).stdout;
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=delivery-git-preflight.js.map
|