@zaip-ai/cli 1.4.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -14
- package/dist/services/adapter-hook-sources.d.ts +1 -0
- package/dist/services/adapter-hook-sources.d.ts.map +1 -1
- package/dist/services/adapter-hook-sources.js +1 -0
- package/dist/services/adapter-hook-sources.js.map +1 -1
- package/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.d.ts.map +1 -1
- package/dist/services/adapters.js +20 -16
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/agent-adapters.d.ts +97 -34
- package/dist/services/agent-adapters.d.ts.map +1 -1
- package/dist/services/agent-adapters.js +279 -54
- package/dist/services/agent-adapters.js.map +1 -1
- package/dist/services/agent-adapters.test.js +13 -7
- package/dist/services/agent-adapters.test.js.map +1 -1
- package/dist/services/codex-conversation-lifecycle-hook.d.ts +2 -0
- package/dist/services/codex-conversation-lifecycle-hook.d.ts.map +1 -0
- package/dist/services/codex-conversation-lifecycle-hook.js +29 -0
- package/dist/services/codex-conversation-lifecycle-hook.js.map +1 -0
- package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.js +173 -0
- package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
- package/dist/services/codex-subagent-hook-template.d.ts +1 -1
- package/dist/services/codex-subagent-hook-template.d.ts.map +1 -1
- package/dist/services/codex-subagent-hook-template.js +1 -1
- package/dist/services/doctor.js +2 -2
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +117 -5
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/logger.js +1 -1
- package/dist/services/logger.js.map +1 -1
- package/dist/services/logger.test.js +2 -2
- package/dist/services/runtime-template.test.js +9 -1
- package/dist/services/runtime-template.test.js.map +1 -1
- package/dist/services/stack-git.d.ts +3 -0
- package/dist/services/stack-git.d.ts.map +1 -1
- package/dist/services/stack-git.js +24 -3
- package/dist/services/stack-git.js.map +1 -1
- package/dist/services/template-manifest.d.ts.map +1 -1
- package/dist/services/template-manifest.js +3 -1
- package/dist/services/template-manifest.js.map +1 -1
- package/dist/services/transactional-files.d.ts +2 -1
- package/dist/services/transactional-files.d.ts.map +1 -1
- package/dist/services/transactional-files.js +8 -3
- package/dist/services/transactional-files.js.map +1 -1
- package/package.json +2 -2
- package/templates/.agents/README-ENG.md +735 -0
- package/templates/.agents/README.md +49 -43
- package/templates/.agents/architecture/hostinger-cloudflare-terraform.md +90 -0
- package/templates/.agents/config/agents/catalog.yaml +18 -18
- package/templates/.agents/config/autonomous-cloud-inputs.json +41 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +5 -7
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +4 -5
- package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +6 -8
- package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +3 -6
- package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +3 -6
- package/templates/.agents/config/pricing/models.json +53 -33
- package/templates/.agents/dashboard/.zaip-managed.json +64 -44
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-oZVlf-l5.js → DashboardHelpDialog-DaSllaJp.js} +118 -16
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-BYjVOHI_.js → TraceabilityWorkspace-BCvZFMEf.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-_MEktQNM.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +2 -2
- package/templates/.agents/dashboard/apps/frontend/index.html +1 -1
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +28 -9
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +27 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +13 -29
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-identity.test.ts +43 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-identity.ts +32 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-project-overview.ts +28 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
- package/templates/.agents/dashboard/modules/traceability/src/contracts.ts +1 -1
- package/templates/.agents/dashboard/packages/branding/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/src/index.ts +1 -1
- package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
- package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +206 -206
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +169 -169
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +206 -206
- package/templates/.agents/dashboard/packages/local-runtime/src/server-identity.test.ts +42 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.test.ts +41 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +1 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +2 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-task-trace.ts +6 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test-fixtures.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +1 -13
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +11 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-refresh.test.ts +55 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical.ts +9 -6
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.test.ts +22 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +10 -8
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +68 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +39 -10
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-seed.test.ts +47 -42
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/design/.zaip-managed.json +41 -41
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/requirements/autonomous-assurance.md +1 -1
- package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
- package/templates/.agents/requirements/comparative-audit.md +1 -1
- package/templates/.agents/requirements/context-engine.md +1 -1
- package/templates/.agents/requirements/cost-observability.md +1 -1
- package/templates/.agents/requirements/dashboard-launch.md +1 -1
- package/templates/.agents/requirements/data-export.md +1 -1
- package/templates/.agents/requirements/design-system.md +1 -1
- package/templates/.agents/requirements/execution-engine.md +1 -1
- package/templates/.agents/requirements/kanban-dashboard.md +1 -1
- package/templates/.agents/requirements/model-orchestration.md +15 -5
- package/templates/.agents/requirements/public-distribution.md +3 -3
- 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/astra-diagnostic.md +20 -0
- package/templates/.agents/rules/core.md +9 -14
- package/templates/.agents/rules/meta-mcp.md +1 -0
- package/templates/.agents/rules/run-lifecycle-closure.md +1 -1
- package/templates/.agents/rules/specialist-routing.md +3 -1
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +95 -61
- package/templates/.agents/runtime/checksums.sha256 +6 -6
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/pnpm-lock.sha256 +1 -1
- package/templates/.agents/runtime/provenance.json +5 -5
- package/templates/.agents/runtime/sbom.cdx.json +1 -1
- package/templates/.agents/skills/zaip-aios/SKILL.md +4 -2
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +17 -0
- package/templates/.agents/skills/zaip-skill-general-operations/SKILL.md +6 -7
- package/templates/.agents/skills/zaip-skill-general-operations/references/extended-workflow.md +7 -0
- package/templates/.agents/skills/zaip-skill-github-setup/SKILL.md +5 -0
- package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/SKILL.md +54 -0
- package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/assets/.env.example +9 -0
- package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/references/operational-procedure.md +137 -0
- package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +7 -19
- package/templates/.agents/skills/zaip-skill-growth-strategy-revops/references/extended-workflow.md +21 -0
- package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +7 -14
- package/templates/.agents/skills/zaip-skill-marketing/references/extended-workflow.md +16 -0
- package/templates/.agents/skills/zaip-skill-meta-ads-setup/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-meta-token-onboarding/SKILL.md +17 -0
- package/templates/.agents/skills/zaip-skill-meta-token-onboarding/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-meta-token-onboarding/references/onboarding-manual.md +96 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +8 -18
- package/templates/.agents/skills/zaip-skill-sales-methodology/references/extended-workflow.md +20 -0
- package/templates/.agents/skills/zaip-skill-setup/SKILL.md +4 -1
- package/templates/.agents/skills/zaip-skill-text-encoding/SKILL.md +1 -1
- package/templates/.agents/zaip-aios/INDEX.md +1 -1
- package/templates/.agents/zaip-aios/README.md +6 -0
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/08-contexto-e-tokens.md +19 -3
- package/templates/.agents/zaip-aios/guides/12-instalacao-e-upgrade.md +37 -7
- package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +14 -1
- package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +32 -3
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +21 -0
- package/templates/infra/terraform/terraform.tfvars.example +2 -1
- package/templates/template-manifest.json +234 -150
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-ZJFXmK7m.js +0 -2
- /package/templates/.agents/{data → records}/changes/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/executions/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/prds/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/runs/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/specs/.gitkeep +0 -0
- /package/templates/.agents/{data → records}/tasks/.gitkeep +0 -0
package/README.md
CHANGED
|
@@ -24,12 +24,6 @@ can be combined with any profile, such as `npx --yes @zaip-ai/cli@latest init --
|
|
|
24
24
|
`init --yes`, after the package name, is ZAIP's confirmation for `--force`. Review the dry-run
|
|
25
25
|
before using `--force --yes`; the installer creates a backup before replacing files.
|
|
26
26
|
|
|
27
|
-
Or use the npm initializer:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
npm create zaip-aios@latest
|
|
31
|
-
```
|
|
32
|
-
|
|
33
27
|
Global installation is also supported:
|
|
34
28
|
|
|
35
29
|
```bash
|
|
@@ -47,6 +41,28 @@ adopting a candidate, validate installation, permissions and browser/runtime beh
|
|
|
47
41
|
environment. The published CI evidence identifies its own runner; it is not an implicit
|
|
48
42
|
Windows/macOS/Linux matrix certification.
|
|
49
43
|
|
|
44
|
+
## Installed handbooks and model routing
|
|
45
|
+
|
|
46
|
+
The installer delivers Portuguese and English handbooks at `.agents/README.md` and
|
|
47
|
+
`.agents/README-ENG.md`, preserving the project's root READMEs even during a forced
|
|
48
|
+
managed upgrade. Start at `.agents/zaip-aios/INDEX.md`; the numbered guides are installed
|
|
49
|
+
under `.agents/zaip-aios/guides`. Guide 23 explains model routing; guides 12, 20 and 26
|
|
50
|
+
cover installation, upgrades and package qualification.
|
|
51
|
+
|
|
52
|
+
New projects default to manual model selection. Opt-in automatic routing applies
|
|
53
|
+
only to SPEC/PRD Executions; standalone Tasks and Conversations preserve host selection.
|
|
54
|
+
Luna/Terra execute routine work and Sol handles difficult work. Optional Astra supplies
|
|
55
|
+
diagnosis and a corrected route at `high`, then hands execution back to Luna/Terra/Sol.
|
|
56
|
+
Astra requires evidence of a failed reasoning attempt and structured difficulty, or
|
|
57
|
+
evidenced material critical impact with difficult diagnosis. It is limited to three
|
|
58
|
+
diagnostics per stable Task across retries and Executions; repeating the same evidence
|
|
59
|
+
or route is blocked. Astra cannot use `xhigh`, `max` or `ultra`, tools, or executor roles.
|
|
60
|
+
|
|
61
|
+
Department names, file count, installation profile and environment errors do not make
|
|
62
|
+
work Astra-eligible. Detailed diagnostic instructions load conditionally, keeping
|
|
63
|
+
routine guidance small. Savings must be measured per accepted Task with retries;
|
|
64
|
+
these controls do not establish a financial savings percentage.
|
|
65
|
+
|
|
50
66
|
## Commands and flags
|
|
51
67
|
|
|
52
68
|
```text
|
|
@@ -92,7 +108,6 @@ It is intended for Growth/Ops projects. Node/npm remain necessary to execute the
|
|
|
92
108
|
npx @zaip-ai/cli@latest init --profile lite
|
|
93
109
|
npx @zaip-ai/cli@latest init --profile dev-lite
|
|
94
110
|
npx @zaip-ai/cli@latest init --profile full
|
|
95
|
-
npm create zaip-aios@latest -- --profile lite
|
|
96
111
|
```
|
|
97
112
|
|
|
98
113
|
Each command saves `stack.overrides.installation_profile` in `.agents/config/project.yaml` for subsequent updates. Use an explicit larger profile to
|
|
@@ -156,8 +171,9 @@ partial process failure.
|
|
|
156
171
|
The npm artifact contains only the installer, doctor and adapter checks, the public template,
|
|
157
172
|
documentation, and license.
|
|
158
173
|
Template hashes are checked before installation. Unsafe paths and symlink traversal are rejected.
|
|
159
|
-
The template
|
|
160
|
-
and
|
|
174
|
+
The template includes the portable lifecycle runtime at `.agents/runtime/bin/zaip.mjs`
|
|
175
|
+
and its integrity metadata. It excludes maintainer history, telemetry, customer data,
|
|
176
|
+
credentials and local environment settings; sanitized configuration examples are included.
|
|
161
177
|
|
|
162
178
|
## Troubleshooting
|
|
163
179
|
|
|
@@ -170,11 +186,14 @@ and the internal ZAIP-AIOS runtime.
|
|
|
170
186
|
|
|
171
187
|
ZAIP-AIOS is the repository-resident agent workflow and configuration installed under `.agents`,
|
|
172
188
|
with minimal Codex and Claude discovery adapters. The ZAIP CLI installs and diagnoses that public
|
|
173
|
-
template
|
|
174
|
-
|
|
189
|
+
template, including its verified portable lifecycle runtime. Installation and local diagnostics
|
|
190
|
+
do not send repository data to a ZAIP service. Model providers and optional integrations have
|
|
191
|
+
their own data flows when invoked. The installed guidance references the distributed runtime;
|
|
192
|
+
the maintainer checkout and its history are not required.
|
|
175
193
|
|
|
176
194
|
## Contributing and license
|
|
177
195
|
|
|
178
|
-
Run `corepack pnpm verify` from `public-cli` before submitting a change.
|
|
179
|
-
`
|
|
180
|
-
|
|
196
|
+
Run `corepack pnpm verify` from `public-cli` before submitting a change. The package metadata
|
|
197
|
+
uses `SEE LICENSE IN LICENSE`; the bundled [LICENSE](LICENSE) carries the proprietary
|
|
198
|
+
ZAIP-AIOS Commercial License notice. Consult that file for the applicable terms, npm for
|
|
199
|
+
the published version, and the release evidence for the qualification status.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { CODEX_CONVERSATION_LIFECYCLE_HOOK } from "./codex-conversation-lifecycle-hook.js";
|
|
1
2
|
export { CODEX_PRE_TOOL_HOOK } from "./codex-pre-tool-hook-template.js";
|
|
2
3
|
export { CODEX_SUBAGENT_LIFECYCLE_HOOK } from "./codex-subagent-hook-template.js";
|
|
3
4
|
//# sourceMappingURL=adapter-hook-sources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-hook-sources.d.ts","sourceRoot":"","sources":["../../src/services/adapter-hook-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"adapter-hook-sources.d.ts","sourceRoot":"","sources":["../../src/services/adapter-hook-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { CODEX_CONVERSATION_LIFECYCLE_HOOK } from "./codex-conversation-lifecycle-hook.js";
|
|
1
2
|
export { CODEX_PRE_TOOL_HOOK } from "./codex-pre-tool-hook-template.js";
|
|
2
3
|
export { CODEX_SUBAGENT_LIFECYCLE_HOOK } from "./codex-subagent-hook-template.js";
|
|
3
4
|
//# sourceMappingURL=adapter-hook-sources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-hook-sources.js","sourceRoot":"","sources":["../../src/services/adapter-hook-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"adapter-hook-sources.js","sourceRoot":"","sources":["../../src/services/adapter-hook-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../src/services/adapters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../src/services/adapters.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AA+KD,wBAAgB,YAAY,CAC1B,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,SAAS,WAAW,EAAE,CA4CxB;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACzD,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B,CAAC,CAYD;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,KAAK,UAAQ,GACZ,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC,CAiB7D;AASD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAuBvE"}
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
|
-
import { CODEX_PRE_TOOL_HOOK, CODEX_SUBAGENT_LIFECYCLE_HOOK } from "./adapter-hook-sources.js";
|
|
4
|
+
import { CODEX_CONVERSATION_LIFECYCLE_HOOK, CODEX_PRE_TOOL_HOOK, CODEX_SUBAGENT_LIFECYCLE_HOOK, } from "./adapter-hook-sources.js";
|
|
5
5
|
import { codexAgentConfig, parsePublicAgentCatalog, publicAgentAdapterFiles, } from "./agent-adapters.js";
|
|
6
6
|
import { CODEX_GITHUB_DEPLOY_RULES, CODEX_SECURITY_RULES } from "./codex-rules.js";
|
|
7
7
|
import { applyTransactionalWrites, assertSafeDestination } from "./transactional-files.js";
|
|
8
|
-
export const ADAPTERS_VERSION = "
|
|
8
|
+
export const ADAPTERS_VERSION = "2.2.0";
|
|
9
9
|
const ROOT_GUIDANCE = `# ZAIP-AIOS
|
|
10
10
|
|
|
11
|
-
Read \`.agents/config/project.yaml\` first. Apply ZAIP only for literal boolean \`zaip.enabled: true
|
|
11
|
+
Read \`.agents/config/project.yaml\` first. Apply ZAIP only for literal boolean \`zaip.enabled: true\`, except framework maintenance or \`zaip enable\`. \`AGENTS.md\` is a bootstrap; canonical guidance lives in \`.agents/\`.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- A childless read-only \`interaction\` completes after its response without executor/finalizer. An interaction with descendants and every \`delivery\` require an eligible executor and the finalizer last; never auto-settle while a descendant is active.
|
|
19
|
-
- Ask at most five critical questions per turn and stop after three turns, then record delegable AI decisions. Resolve finalize/implement/develop by target and persisted status: draft finalize means ready, ready implement means execute, active implementation means continue, and develop/improve means planning or rework. A cancelled PRD is immutable and gets a linked successor tagged rework. Deploy/push/publication is Git-only.
|
|
20
|
-
|
|
21
|
-
## Evidence and coordination
|
|
22
|
-
|
|
23
|
-
- Read \`.agents/rules/core.md\`, then only matching \`.agents/requirements/\`, \`.agents/rules/\`, and \`.agents/skills/\`. Discover through canonical lifecycle manifests; read records only by explicit ID—never scan normal history.
|
|
24
|
-
- Capture Sub-Runs only from observed host metadata. Hooks are best-effort, so the orchestrator also runs idempotent \`zaip subagent capture\` after every observed spawn and terminal. Explicit capture uses the child session and turn, \`agent-id=agent_path\`, \`parent-agent-id\` equal to the root Run \`client_thread_id\`, and \`parent-run-id\` whenever roots in that thread can be concurrent; successive calls on the same \`agent_path\` have distinct child turn IDs. For a terminal event with only agent_path, terminal status, exact parent, and catalog identity, use \`zaip subagent capture-terminal\` only for \`zaip-agent-finalizer\` or a delivery-eligible executor with \`task-delivery\`; pass the exact active root as \`parent-run-id\`, require the path to end in its canonical \`codex_task_name\`, and keep unavailable child metadata explicit.
|
|
25
|
-
- Close in order: persist evidence and test results first; then terminal Task, Change, and Execution states; refresh manifests; then persist the root Run outcome.
|
|
13
|
+
- Read \`.agents/rules/core.md\`, Rules marked \`always\`, applicable Rules with prerequisites, and governing Requirements/Acceptance Criteria. Open applicable canonical \`.agents/skills/<skill-name>/SKILL.md\`; wrappers do not replace them. Reuse unchanged context; inspect manifests then explicit record IDs, never bulk history.
|
|
14
|
+
- Capture once, idempotently per observed client turn: questions/analysis use \`conversation\`; continuation reuses same-thread focus; independent persistent work uses semantic \`new-work\`. A childless read-only interaction responds directly without artificial Task or delegation.
|
|
15
|
+
- Before mutation or delegation, load workflow, closure and execution guidance from core. Materialize Task, Change, delivery Execution and root Run before independent product edits; draft/Git-only exceptions follow workflow. Preserve authorization, scoped writes, observed evidence and unavailable telemetry.
|
|
16
|
+
- Simple Marketing/Sales/Growth/Ops questions load only relevant domain context. Development loads engineering guidance; commercial delivery retains proportional validation. Respect host model selection.
|
|
17
|
+
- Use native \`spawn_agent\` only for Sub-Runs; the orchestrator records observed spawn and terminal events idempotently. Independent chats require an explicit user request.
|
|
26
18
|
|
|
27
19
|
Delegate only catalog identities from \`.agents/config/agents/catalog.yaml\`: root starts \`zaip-agent-orchestrator\`, which selects an eligible executor; the mandatory last child is \`zaip-agent-finalizer\`. Follow core model rules.
|
|
28
20
|
`;
|
|
@@ -125,6 +117,17 @@ command_windows = '''powershell -NoProfile -NonInteractive -Command "$git = Join
|
|
|
125
117
|
timeout = 10
|
|
126
118
|
statusMessage = "Applying ZAIP workspace safety policy"
|
|
127
119
|
|
|
120
|
+
[[hooks.Stop]]
|
|
121
|
+
matcher = "*"
|
|
122
|
+
|
|
123
|
+
[[hooks.Stop.hooks]]
|
|
124
|
+
type = "command"
|
|
125
|
+
async = true
|
|
126
|
+
command = '''node "$(git rev-parse --show-toplevel)/.codex/hooks/zaip-conversation-lifecycle.mjs"'''
|
|
127
|
+
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-conversation-lifecycle.mjs')"'''
|
|
128
|
+
timeout = 150
|
|
129
|
+
statusMessage = "Finalizing ZAIP conversation telemetry"
|
|
130
|
+
|
|
128
131
|
[apps._default]
|
|
129
132
|
destructive_enabled = true
|
|
130
133
|
open_world_enabled = true
|
|
@@ -177,6 +180,7 @@ export function adapterFiles(workspaceRoot, catalog) {
|
|
|
177
180
|
managed(".claude/skills/zaip-aios/agents/openai.yaml", DISCOVERY_SKILL_OPENAI_METADATA, "discovery-skill-openai-metadata"),
|
|
178
181
|
managed(".codex/config.toml", `${codexConfig}${catalog === undefined ? "" : `\n${codexAgentConfig(catalog)}`}`, "codex-config"),
|
|
179
182
|
managed(".codex/hooks/zaip-pre-tool-use.mjs", CODEX_PRE_TOOL_HOOK, "codex-safety-hook"),
|
|
183
|
+
managed(".codex/hooks/zaip-conversation-lifecycle.mjs", CODEX_CONVERSATION_LIFECYCLE_HOOK, "codex-conversation-lifecycle-hook"),
|
|
180
184
|
managed(".codex/hooks/zaip-subagent-lifecycle.mjs", CODEX_SUBAGENT_LIFECYCLE_HOOK, "codex-subagent-lifecycle-hook"),
|
|
181
185
|
managed(".codex/rules/zaip-github-deploy.rules", CODEX_GITHUB_DEPLOY_RULES, "codex-github-deploy-rules"),
|
|
182
186
|
managed(".codex/rules/zaip-security.rules", CODEX_SECURITY_RULES, "codex-security-rules"),
|
|
@@ -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;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IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACpD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,MAAM,KAAK,IAAI,EAAE,EAAE,CAAC;IACnD,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAA4B,CAAC;IAC3D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AACjG,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACvC,OAAO,mCAAmC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -1,57 +1,120 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
interface WorkspaceFileSystem {
|
|
2
|
+
exists(path: string): Promise<boolean>;
|
|
3
|
+
readText(path: string): Promise<string>;
|
|
4
|
+
writeTextAtomic(path: string, content: string): Promise<void>;
|
|
5
|
+
removeFile(path: string): Promise<void>;
|
|
6
|
+
listFiles(path: string, extension: string): Promise<string[]>;
|
|
7
|
+
}
|
|
8
|
+
export interface GuidanceAgent {
|
|
3
9
|
id: string;
|
|
10
|
+
version: number;
|
|
11
|
+
purpose: string;
|
|
12
|
+
use_when: readonly string[];
|
|
13
|
+
do_not_use: readonly string[];
|
|
4
14
|
codex_name: string;
|
|
5
15
|
codex_task_name: string;
|
|
16
|
+
persona: {
|
|
17
|
+
nome: string;
|
|
18
|
+
cargo: string;
|
|
19
|
+
};
|
|
20
|
+
nickname_candidates: readonly string[];
|
|
6
21
|
compatibility?: {
|
|
7
|
-
aliases:
|
|
22
|
+
aliases: readonly {
|
|
8
23
|
kind: "id" | "codex_name" | "codex_task_name";
|
|
9
24
|
value: string;
|
|
10
25
|
deprecated_at: string;
|
|
11
26
|
remove_after: string;
|
|
12
27
|
replacement: string;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
persona: {
|
|
16
|
-
nome: string;
|
|
17
|
-
cargo: string;
|
|
18
|
-
};
|
|
19
|
-
purpose: string;
|
|
20
|
-
use_when: string[];
|
|
21
|
-
do_not_use: string[];
|
|
28
|
+
}[];
|
|
29
|
+
} | undefined;
|
|
22
30
|
role: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
priority: number;
|
|
32
|
+
inherits: string | null;
|
|
33
|
+
capabilities: readonly string[];
|
|
34
|
+
execution_eligibility: readonly ("interaction" | "delivery")[];
|
|
35
|
+
tools: readonly string[];
|
|
36
|
+
skills: readonly string[];
|
|
37
|
+
write_scopes: readonly string[];
|
|
38
|
+
permissions: Readonly<Record<string, {
|
|
39
|
+
allow: readonly string[];
|
|
40
|
+
deny: readonly string[];
|
|
41
|
+
}>>;
|
|
27
42
|
model: {
|
|
28
|
-
|
|
29
|
-
|
|
43
|
+
required_capabilities: readonly string[];
|
|
44
|
+
preferred: readonly string[];
|
|
45
|
+
reasoning_effort?: "low" | "medium" | "high" | "xhigh" | "ultra" | undefined;
|
|
46
|
+
};
|
|
47
|
+
budget: {
|
|
48
|
+
soft_cycles: number;
|
|
30
49
|
};
|
|
31
|
-
write_scopes: string[];
|
|
32
50
|
contract: {
|
|
33
|
-
inputs: string[];
|
|
34
|
-
outputs: string[];
|
|
35
|
-
evidence: string[];
|
|
51
|
+
inputs: readonly string[];
|
|
52
|
+
outputs: readonly string[];
|
|
53
|
+
evidence: readonly string[];
|
|
36
54
|
};
|
|
37
55
|
review: {
|
|
38
56
|
can_approve: boolean;
|
|
39
|
-
cannot_review_roles: string[];
|
|
57
|
+
cannot_review_roles: readonly string[];
|
|
58
|
+
};
|
|
59
|
+
escalation: readonly string[];
|
|
60
|
+
}
|
|
61
|
+
export interface GuidanceSquad {
|
|
62
|
+
id: string;
|
|
63
|
+
version: number;
|
|
64
|
+
purpose: string;
|
|
65
|
+
members: readonly string[];
|
|
66
|
+
max_parallelism: number;
|
|
67
|
+
delegation: readonly {
|
|
68
|
+
from: string;
|
|
69
|
+
to: string;
|
|
70
|
+
capability: string;
|
|
71
|
+
}[];
|
|
72
|
+
review_policy: {
|
|
73
|
+
independent: true;
|
|
74
|
+
executor_roles: readonly string[];
|
|
75
|
+
reviewer_roles: readonly string[];
|
|
40
76
|
};
|
|
41
|
-
escalation: string[];
|
|
42
|
-
[key: string]: unknown;
|
|
77
|
+
escalation: readonly string[];
|
|
43
78
|
}
|
|
44
|
-
export interface
|
|
79
|
+
export interface GuidanceCatalog {
|
|
45
80
|
schema_version: 1;
|
|
46
|
-
agents:
|
|
47
|
-
squads:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
81
|
+
agents: readonly GuidanceAgent[];
|
|
82
|
+
squads: readonly GuidanceSquad[];
|
|
83
|
+
}
|
|
84
|
+
export interface AgentGuidanceFile {
|
|
85
|
+
client: "codex" | "claude";
|
|
86
|
+
subject: string;
|
|
87
|
+
projection: "canonical" | "compatibility-shim";
|
|
88
|
+
path: string;
|
|
89
|
+
content: string;
|
|
90
|
+
semantic_hash: string;
|
|
91
|
+
}
|
|
92
|
+
export interface GuidanceParityResult {
|
|
93
|
+
valid: boolean;
|
|
94
|
+
drifted: readonly string[];
|
|
95
|
+
semantic_hash: string;
|
|
96
|
+
}
|
|
97
|
+
export type GuidanceFileClassification = "missing" | "content-drift" | "stale-managed" | "unknown-unmanaged";
|
|
98
|
+
export interface GuidanceFileFinding {
|
|
99
|
+
classification: GuidanceFileClassification;
|
|
100
|
+
path: string;
|
|
101
|
+
}
|
|
102
|
+
export interface GuidanceCheckResult extends GuidanceParityResult {
|
|
103
|
+
findings: readonly GuidanceFileFinding[];
|
|
53
104
|
}
|
|
105
|
+
export declare const NATIVE_SUBAGENT_POLICY = "For Codex delegation, a ZAIP Sub-Run exists only when started with the native collaboration subagent mechanism (`spawn_agent`). `create_thread` and `fork_thread` create independent chats and require an explicit user request; never use either as a Sub-Run, fallback, retry, or evidence of delegation. If native delegation is unavailable, report the limitation rather than create an independent chat. A catalog name, task_name, title, or prompt never proves native ancestry. Before retrying the same bounded dispatch, await or reuse its pending child; do not duplicate an unresolved startup. Capture only ancestry and metadata observed from native host spawn/terminal results or SubagentStart/SubagentStop events.";
|
|
106
|
+
export type PublicAgentDefinition = GuidanceAgent;
|
|
107
|
+
export type PublicAgentCatalog = GuidanceCatalog;
|
|
54
108
|
export declare function parsePublicAgentCatalog(source: string): PublicAgentCatalog;
|
|
55
|
-
export declare function publicAgentAdapterFiles(catalog: PublicAgentCatalog): readonly
|
|
109
|
+
export declare function publicAgentAdapterFiles(catalog: PublicAgentCatalog): readonly {
|
|
110
|
+
path: string;
|
|
111
|
+
content: string;
|
|
112
|
+
}[];
|
|
56
113
|
export declare function codexAgentConfig(catalog: PublicAgentCatalog): string;
|
|
114
|
+
export declare function agentGuidanceFiles(catalog: GuidanceCatalog): readonly AgentGuidanceFile[];
|
|
115
|
+
export declare function compareAgentGuidance(files: readonly AgentGuidanceFile[]): GuidanceParityResult;
|
|
116
|
+
export declare function buildAgentGuidance(filesystem: WorkspaceFileSystem, catalog: GuidanceCatalog): Promise<GuidanceParityResult>;
|
|
117
|
+
export declare function checkAgentGuidance(filesystem: WorkspaceFileSystem, catalog: GuidanceCatalog): Promise<GuidanceCheckResult>;
|
|
118
|
+
export declare function validateGuidanceCatalog(catalog: GuidanceCatalog): void;
|
|
119
|
+
export {};
|
|
57
120
|
//# sourceMappingURL=agent-adapters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-adapters.d.ts","sourceRoot":"","sources":["../../src/services/agent-adapters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-adapters.d.ts","sourceRoot":"","sources":["../../src/services/agent-adapters.ts"],"names":[],"mappings":"AA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