@open-agent-toolkit/cli 0.1.73 → 0.1.74
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/assets/config/dispatch-matrix-recommendation.json +13 -17
- package/assets/docs/cli-utilities/configuration.md +35 -60
- package/assets/docs/cli-utilities/workflow-gates.md +38 -2
- package/assets/docs/provider-sync/providers.md +15 -17
- package/assets/docs/workflows/projects/artifacts.md +1 -1
- package/assets/docs/workflows/projects/dispatch-ceiling.md +29 -33
- package/assets/docs/workflows/projects/implementation-execution.md +7 -4
- package/assets/docs/workflows/projects/lifecycle.md +4 -3
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +1 -1
- package/assets/skills/oat-dispatch-subagents/references/provider-cursor.md +27 -15
- package/assets/skills/oat-project-autonomous/SKILL.md +1 -1
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +17 -15
- package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +15 -9
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-implement/references/phase-execution.md +11 -5
- package/assets/skills/oat-project-import-plan/SKILL.md +30 -8
- package/assets/skills/oat-project-plan/SKILL.md +30 -8
- package/assets/skills/oat-project-plan-writing/SKILL.md +12 -9
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-quick-start/SKILL.md +30 -8
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
- package/assets/skills/oat-project-review-provide/SKILL.md +19 -11
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +27 -4
- package/dist/commands/doctor/index.d.ts +2 -1
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +37 -1
- package/dist/commands/gate/index.d.ts +1 -1
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +35 -3
- package/dist/commands/init/index.d.ts +1 -1
- package/dist/commands/init/index.d.ts.map +1 -1
- package/dist/commands/init/index.js +40 -8
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +17 -9
- package/dist/commands/shared/codex-strays.d.ts +9 -0
- package/dist/commands/shared/codex-strays.d.ts.map +1 -1
- package/dist/commands/shared/codex-strays.js +4 -0
- package/dist/commands/status/index.d.ts +7 -1
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +53 -17
- package/dist/commands/sync/apply.d.ts.map +1 -1
- package/dist/commands/sync/apply.js +50 -24
- package/dist/commands/sync/dry-run.d.ts.map +1 -1
- package/dist/commands/sync/dry-run.js +31 -18
- package/dist/commands/sync/index.d.ts.map +1 -1
- package/dist/commands/sync/index.js +34 -25
- package/dist/commands/sync/sync.types.d.ts +26 -11
- package/dist/commands/sync/sync.types.d.ts.map +1 -1
- package/dist/commands/sync/sync.utils.d.ts.map +1 -1
- package/dist/commands/sync/sync.utils.js +3 -2
- package/dist/engine/index.d.ts +1 -1
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +1 -1
- package/dist/engine/scanner.d.ts +3 -1
- package/dist/engine/scanner.d.ts.map +1 -1
- package/dist/engine/scanner.js +4 -2
- package/dist/providers/ceiling/registry.d.ts +2 -0
- package/dist/providers/ceiling/registry.d.ts.map +1 -1
- package/dist/providers/ceiling/registry.js +20 -4
- package/dist/providers/codex/codec/sync-extension.d.ts +11 -10
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +42 -14
- package/dist/providers/cursor/codec/catalog.d.ts +18 -0
- package/dist/providers/cursor/codec/catalog.d.ts.map +1 -0
- package/dist/providers/cursor/codec/catalog.js +39 -0
- package/dist/providers/cursor/codec/materialize.d.ts +24 -0
- package/dist/providers/cursor/codec/materialize.d.ts.map +1 -0
- package/dist/providers/cursor/codec/materialize.js +166 -0
- package/dist/providers/cursor/codec/shared.d.ts +14 -0
- package/dist/providers/cursor/codec/shared.d.ts.map +1 -0
- package/dist/providers/cursor/codec/shared.js +76 -0
- package/dist/providers/cursor/codec/sync-extension.d.ts +37 -0
- package/dist/providers/cursor/codec/sync-extension.d.ts.map +1 -0
- package/dist/providers/cursor/codec/sync-extension.js +393 -0
- package/dist/providers/cursor/index.d.ts +3 -0
- package/dist/providers/cursor/index.d.ts.map +1 -1
- package/dist/providers/cursor/index.js +3 -0
- package/dist/providers/identity/availability.d.ts +7 -0
- package/dist/providers/identity/availability.d.ts.map +1 -1
- package/dist/providers/identity/availability.js +23 -0
- package/dist/providers/shared/index.d.ts +2 -0
- package/dist/providers/shared/index.d.ts.map +1 -1
- package/dist/providers/shared/index.js +1 -0
- package/dist/providers/shared/materialization-extension.d.ts +44 -0
- package/dist/providers/shared/materialization-extension.d.ts.map +1 -0
- package/dist/providers/shared/materialization-extension.js +26 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-quick-start
|
|
3
|
-
version: 2.3.
|
|
3
|
+
version: 2.3.3
|
|
4
4
|
description: Use when a task is small enough for quick mode or rapid iteration is preferred. Scaffolds a lightweight OAT project from discovery directly to a runnable plan, with optional brainstorming and lightweight design.
|
|
5
5
|
argument-hint: '<project-name> ["project description"]'
|
|
6
6
|
oat_gateable: true
|
|
@@ -649,9 +649,12 @@ Apply the shared loop exactly:
|
|
|
649
649
|
- For that exception only, apply the shared concrete target contract. A Codex
|
|
650
650
|
materialized variant must first be launched as the exact native `agent_type`;
|
|
651
651
|
only a recorded actual pre-start role-selection rejection permits a fresh
|
|
652
|
-
child pinned to the resolved model and effort. Claude
|
|
653
|
-
|
|
654
|
-
|
|
652
|
+
child pinned to the resolved model and effort. Claude uses the exact
|
|
653
|
+
resolver-returned `providers.claude.dispatchArgs.model` value. Cursor
|
|
654
|
+
launches the exact resolver-returned
|
|
655
|
+
`providers.cursor.dispatchArgs.variant` native reviewer variant first;
|
|
656
|
+
Cursor model strings remain opaque inside the mapping and resolver. Only a
|
|
657
|
+
pre-start native role-selection rejection permits another route.
|
|
655
658
|
- After acceptance, poll, nudge, or continue only through the existing reviewer
|
|
656
659
|
handle. A terminal timeout blocks or escalates without another launch.
|
|
657
660
|
Replacement eligibility is limited to explicit pre-start rejection.
|
|
@@ -701,21 +704,40 @@ as the last check before plan and project completion:
|
|
|
701
704
|
|
|
702
705
|
If the resolved command invokes `oat gate review`, the configured review command must already include `--project "$PROJECT_PATH"` and must not include `--target <id>`. A valid reusable shape is `oat gate review --project "$PROJECT_PATH" ...`. If the declaration is missing, stop and migrate the stored gate command; do not inject or append arguments at execution time.
|
|
703
706
|
|
|
704
|
-
3.
|
|
707
|
+
3. Resolve the current planning parent's model identity from session context.
|
|
708
|
+
When that identity is non-empty and the resolved configured command invokes
|
|
709
|
+
`oat gate review`, export
|
|
710
|
+
`OAT_GATE_PRODUCER_IDENTITY=<model>:declared` for that command invocation.
|
|
711
|
+
For a non-review configured command or unavailable current identity, ensure
|
|
712
|
+
`OAT_GATE_PRODUCER_IDENTITY` is unset. Do not persist the value or alter the
|
|
713
|
+
configured command.
|
|
705
714
|
|
|
706
|
-
4.
|
|
715
|
+
4. Execute the resolved command exactly as configured and unchanged. Capture
|
|
716
|
+
stdout, stderr, the exit code, and the structured JSON result. A zero exit
|
|
717
|
+
code means the review passed its threshold, but it does not by itself
|
|
718
|
+
authorize artifact receipt or complete the handoff.
|
|
719
|
+
|
|
720
|
+
5. Review-artifact handoff:
|
|
707
721
|
- Parse the structured gate result. An exit code or artifact path alone never authorizes `oat-project-review-receive`.
|
|
708
722
|
- Invoke receive only when all three conditions hold: `status` is `ok` or `blocked`, the envelope explicitly sets `receiveEligible: true`, and a non-null `handoff` confirms the artifact was corroborated.
|
|
709
723
|
- `receiveEligible: false` is a hard stop even when `artifactPath` is present. Never receive `targeting_correlation_failed`; correct the project/run routing and run a new gate.
|
|
710
724
|
- Keep `artifact_validation_failed` outside receive until the artifact is corrected and the gate successfully revalidates it. Treat `review_failed`, unknown statuses, null handoffs, and contradictory eligibility fields as operational failures.
|
|
711
725
|
- `blocked` exits nonzero but is receive-eligible; `ok` exits zero and still requires durable receive disposition. Route by structured status and eligibility, not by exit code.
|
|
712
726
|
|
|
713
|
-
|
|
727
|
+
6. If the command exits nonzero, use `description` to orient the next steps and handle `onFailure`:
|
|
714
728
|
- `block`: read gate feedback, remediate, and re-run the gate up to `maxAttempts` attempts (default `2`). If attempts are exhausted, escalate to the human with accumulated feedback and append that feedback to `implementation.md`. Treat a launch failure, missing CLI, or no eligible runtime as escalation-biased and do not spend it as a remediation attempt.
|
|
715
729
|
- `prompt`: surface the gate failure and ask the human how to proceed.
|
|
716
730
|
- `warn`: record the gate failure and continue.
|
|
717
731
|
|
|
718
|
-
|
|
732
|
+
7. Runtime selection note: the review-only declaration carries producer
|
|
733
|
+
identity, not reviewer runtime identity. By default, `oat gate review` and
|
|
734
|
+
`oat gate cross-provider-exec` resolve the current host from built-in
|
|
735
|
+
`hostDetectionCommand`s and avoid the same runtime when no exact target is
|
|
736
|
+
supplied. Reusable lifecycle skill-gate commands must not include
|
|
737
|
+
`--target <id>` so independent review stays provider-neutral. Use explicit
|
|
738
|
+
targets only for manual/debug commands or deliberate local/user-specific
|
|
739
|
+
overrides; do not hardcode provider/model targets in bundled skill guidance
|
|
740
|
+
or shared lifecycle gate examples.
|
|
719
741
|
|
|
720
742
|
A gate that ends in `block` after attempts are exhausted, or at an unresolved
|
|
721
743
|
`prompt` boundary, means the completion steps below MUST NOT run; the phase
|
|
@@ -226,7 +226,7 @@ remains immutable baseline evidence for the original p01-t01 verification.
|
|
|
226
226
|
| `oat-project-plan/SKILL.md` | `5eb3949f32e1 -> NG`; `64a08153bb9e -> NG`; `655d61df0a8f -> NG`; `56b37486f09d -> PLAN-01`; `cf317c17c586 -> PLAN-02`; `781643b0f2c3 -> NG`; `01fd7cca8253 -> PLAN-04`; `7bc7fa3f2cbb -> NG`; `da28ce0a5f2e -> NG`; `e334f94c4d35 -> NG`; `1fa55762c038 -> NG`; `c0935b5484a2 -> NG`; `6008163054f8 -> PLAN-05`; `571271f4d71b -> PLAN-06`; `746b760289e4 -> PLAN-06`; `de195590ff83 -> NG`; `49640510829a -> PLAN-07`; `4bef7afa7a71 -> PLAN-08`; `e5886632533e -> PLAN-08`; `4cfe1df14372 -> NG`; `d116c97a500c -> PLAN-10`; `aa62facff547 -> PLAN-10`; `bee4c4aa34c6 -> NG`; `3f0b53056edd -> PLAN-11`; `1734b2c85c5d -> NG`; `b4af2220eb91 -> PLAN-11` |
|
|
227
227
|
| `oat-project-import-plan/SKILL.md` | `f7ca8635452f -> NG`; `c2e5fa410069 -> NG`; `655d61df0a8f -> NG`; `b137f73db20c -> IMPORT-01`; `45b699c1c0b5 -> IMPORT-01`; `ba6d120791c1 -> IMPORT-01`; `070ebc5259af -> IMPORT-03`; `c11552696e2e -> IMPORT-03`; `cfe661966baf -> IMPORT-04`; `baa91c0a0bf8 -> NG`; `e364e84b2702 -> NG`; `39031985a945 -> IMPORT-06`; `f106aa29a217 -> IMPORT-07`; `65038450aee3 -> IMPORT-07`; `bee4c4aa34c6 -> NG`; `3f0b53056edd -> IMPORT-09` |
|
|
228
228
|
| `oat-project-implement/SKILL.md` | `853d44621b72 -> NG`; `ffb3af0ba8ef -> NG`; `e0355c7a05e9 -> IMPLEMENT-11+IMPLEMENT-13+IMPLEMENT-16`; `6296f41ae11c -> NG`; `a167d03559fa -> NG`; `cf317c17c586 -> IMPLEMENT-01`; `8ce8a09feca4 -> NG` |
|
|
229
|
-
| `oat-project-implement/references/completion-and-closeout.md` | `105600fbd045 -> IMPLEMENT-11`; `3e6055aede6c -> IMPLEMENT-11`; `0705f7533039 -> IMPLEMENT-11`; `0c39746f3cb5 -> IMPLEMENT-11`; `
|
|
229
|
+
| `oat-project-implement/references/completion-and-closeout.md` | `105600fbd045 -> IMPLEMENT-11`; `3e6055aede6c -> IMPLEMENT-11`; `0705f7533039 -> IMPLEMENT-11`; `0c39746f3cb5 -> IMPLEMENT-11`; `6d33ea58da2c -> IMPLEMENT-11`; `378a75543a72 -> IMPLEMENT-11`; `c7b25627e674 -> IMPLEMENT-11`; `51ef9a453323 -> IMPLEMENT-11`; `c67145e3fb00 -> IMPLEMENT-11`; `64fbeac64811 -> IMPLEMENT-11`; `19b13c17bddb -> NG`; `f7dab9c1f96c -> IMPLEMENT-12`; `c69c17a069a8 -> IMPLEMENT-14`; `a97fa5634a68 -> IMPLEMENT-14`; `3af58881811c -> IMPLEMENT-14`; `4203e1f49d0f -> IMPLEMENT-14`; `c3bd2458a3d3 -> IMPLEMENT-13`; `95b5eafc070d -> IMPLEMENT-13`; `25ecbe9c998b -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `f6f24fd71da4 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `f18283bc1cf9 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `2c1ffc4a82dd -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `3454a07aa843 -> IMPLEMENT-16`; `0d86e2098cfb -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `d5fe597d266f -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `55a152e944c1 -> IMPLEMENT-16`; `effac7cbd573 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `9d2a34d8b148 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `d27462aaed26 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `9d52ecb17268 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `5b91aabe3757 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `fd0ad919f702 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `63bf28df1474 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `a4ed471dbc78 -> IMPLEMENT-16`; `6b7a64cec6e5 -> IMPLEMENT-16`; `0a4fdba0ebc0 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `a5033c2aada5 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `e77609eddba0 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `351156e8dde4 -> IMPLEMENT-13+IMPLEMENT-14+IMPLEMENT-15+IMPLEMENT-16`; `51d45bd2bbd1 -> IMPLEMENT-16`; `f7796ffcc804 -> IMPLEMENT-16`; `990d730cb494 -> IMPLEMENT-16`; `6ed28bb7d384 -> IMPLEMENT-16`; `8b7d4b5bcf1b -> IMPLEMENT-16`; `88aad500e6e9 -> IMPLEMENT-16`; `877e3e3f9eda -> IMPLEMENT-16`; `fc03c97f834e -> IMPLEMENT-16`; `12939a3da5e0 -> IMPLEMENT-16`; `bdb418335a88 -> IMPLEMENT-16`; `fba97e596ebd -> IMPLEMENT-16`; `3d0b5e2f14f0 -> IMPLEMENT-17`; `f56a9ce88461 -> IMPLEMENT-17`; `9ba67b50d0ba -> IMPLEMENT-17`; `39ff911760af -> IMPLEMENT-17`; `5b560b5bd6e3 -> IMPLEMENT-17`; `fa21df5e5e01 -> IMPLEMENT-17`; `0fed77bec55e -> IMPLEMENT-17`; `6d81cfb0483f -> IMPLEMENT-17`; `bee4c4aa34c6 -> NG`; `3f0b53056edd -> IMPLEMENT-18` |
|
|
230
230
|
| `oat-project-implement/references/dispatch-and-dry-run.md` | `21b85f5e4daa -> IMPLEMENT-08`; `74c92b32bb2a -> IMPLEMENT-08`; `8efd2d0517ab -> IMPLEMENT-09`; `461ed9b3e495 -> IMPLEMENT-09`; `b5ad64fd744d -> NG`; `14ce436cfffa -> NG`; `043ca36da3e2 -> NG`; `a23e45c1dc8d -> NG`; `498143bb41a7 -> NG`; `4fe3eb179023 -> NG`; `7f75485e5a33 -> NG`; `8ec3a96df029 -> NG`; `16c3f96e758d -> NG`; `5915c41fe058 -> NG`; `f51e43eeac56 -> NG`; `fd41c25623cb -> NG`; `58a932ed6453 -> NG`; `4718bd3ce12d -> NG`; `58c444a2126b -> NG`; `2df3adae4120 -> NG`; `e75df892b55c -> NG` |
|
|
231
231
|
| `oat-project-implement/references/docs/autonomy-contract.md` | `* -> NG` |
|
|
232
232
|
| `oat-project-implement/references/phase-execution.md` | `27737e814790 -> NG`; `6dda2b8e62e2 -> IMPLEMENT-10`; `b3197086bb1e -> IMPLEMENT-10` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-review-provide
|
|
3
|
-
version: 1.3.
|
|
3
|
+
version: 1.3.21
|
|
4
4
|
description: Use when the user explicitly asks to review an OAT project — e.g. "review project", "review the project", "run project review", or confirms a previously offered review. Do NOT auto-invoke on completed work alone. Resolves a project review scope and offers before running.
|
|
5
5
|
disable-model-invocation: false
|
|
6
6
|
user-invocable: true
|
|
@@ -575,9 +575,12 @@ Build the actual provider invocation before reporting the target as enforced:
|
|
|
575
575
|
only a verified-equivalent inline route or block the review.
|
|
576
576
|
- Claude requires a non-empty `providers.claude.dispatchArgs.model`; the actual
|
|
577
577
|
provider invocation must include that exact value as its `model` argument.
|
|
578
|
-
- Cursor requires a non-empty `providers.cursor.dispatchArgs.
|
|
579
|
-
provider invocation must
|
|
580
|
-
|
|
578
|
+
- Cursor requires a non-empty `providers.cursor.dispatchArgs.variant`; the
|
|
579
|
+
actual provider invocation must launch that exact resolver-returned native
|
|
580
|
+
reviewer variant as the native agent type first. Keep Cursor model strings
|
|
581
|
+
opaque inside the materialized mapping and resolver. Only a recorded
|
|
582
|
+
pre-start native role-selection rejection of that exact variant before any
|
|
583
|
+
reviewer starts permits another target-preserving route.
|
|
581
584
|
|
|
582
585
|
Managed incomplete resolver results, including a missing or incomplete
|
|
583
586
|
candidate ladder, fail closed before review. Route interactive repair through
|
|
@@ -609,11 +612,12 @@ be parsed, interpreted, or treated as a passing review.
|
|
|
609
612
|
|
|
610
613
|
Before acceptance, an explicit transport or role-selection rejection may retry
|
|
611
614
|
with the same exact role and complete invocation payload, including the Claude
|
|
612
|
-
or Cursor
|
|
613
|
-
through the existing reviewer handle. Terminal timeout,
|
|
614
|
-
`BLOCKED` blocks or escalates without another launch. If the
|
|
615
|
-
a required role or model argument before launch,
|
|
616
|
-
inline execution has verified equivalent
|
|
615
|
+
model argument or Cursor native variant. After acceptance, poll, nudge, or
|
|
616
|
+
continue only through the existing reviewer handle. Terminal timeout,
|
|
617
|
+
interruption, or `BLOCKED` blocks or escalates without another launch. If the
|
|
618
|
+
host cannot apply a required role, variant, or model argument before launch,
|
|
619
|
+
fail closed or block unless inline execution has verified equivalent
|
|
620
|
+
current-host controls.
|
|
617
621
|
Workflow correctness must not require provider restart or hot reload.
|
|
618
622
|
Never use a managed base role because a target is missing or unavailable; a
|
|
619
623
|
managed base role is forbidden except for
|
|
@@ -683,7 +687,11 @@ Before selecting a tier, announce the probe and its result so the user can see w
|
|
|
683
687
|
Detection logic:
|
|
684
688
|
|
|
685
689
|
- If the host is Claude Code, use Task-style subagent dispatch with `subagent_type: "oat-reviewer"` and resolve from `.claude/agents/oat-reviewer.md`.
|
|
686
|
-
- If the host is Cursor, invoke
|
|
690
|
+
- If the host is Cursor, invoke the exact resolver-selected native reviewer
|
|
691
|
+
variant when a concrete managed target exists. Use base `oat-reviewer` only
|
|
692
|
+
for an explicit inherit/default exception, resolved from
|
|
693
|
+
`.cursor/agents/oat-reviewer.md` (or the `.claude/agents/oat-reviewer.md`
|
|
694
|
+
compatibility path).
|
|
687
695
|
- If the host is Codex multi-agent, verify Codex requirements first:
|
|
688
696
|
- `[features] multi_agent = true` is enabled in active Codex config.
|
|
689
697
|
- For a concrete managed target, `agent_type` must be the exact custom role declared under `[agents.<name>]`; built-in roles and auto-selection are not equivalent fallbacks.
|
|
@@ -709,7 +717,7 @@ Then spawn the reviewer:
|
|
|
709
717
|
|
|
710
718
|
- Use provider-appropriate dispatch:
|
|
711
719
|
- Claude Code: Task tool with `subagent_type: "oat-reviewer"` (resolves from `.claude/agents/oat-reviewer.md`). For a concrete managed target, the payload must also contain `model: providers.claude.dispatchArgs.model` with the resolver-returned value.
|
|
712
|
-
- Cursor:
|
|
720
|
+
- Cursor: for a concrete managed target, invoke `providers.cursor.dispatchArgs.variant` as the exact resolver-selected native reviewer variant. Do not attach a Task-level model argument or normalize the mapped model. Base `oat-reviewer` is allowed only for explicit inherit/default behavior. A pre-start native role-selection rejection is the only replacement boundary.
|
|
713
721
|
- Codex style: for a concrete managed target, first spawn the exact resolver-returned native `agent_type`; only an explicit pre-start native role-selection rejection permits the explicitly pinned fresh-child route from Step 6.0. Generic auto-selection is permitted only for the documented base-role exceptions.
|
|
714
722
|
- Pass the Review Scope metadata block from Step 5 as the prompt
|
|
715
723
|
- Include the pre-computed artifact path for the subagent to write to
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-review-provide-remote
|
|
3
|
-
version: 1.0.
|
|
3
|
+
version: 1.0.4
|
|
4
4
|
description: Use when reviewing a GitHub PR opened on another machine for an active OAT project and posting findings back as a single PR review. Resolves the project from the PR diff, reads project artifacts for mode-aware review, and posts via gh api.
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
user-invocable: true
|
|
@@ -234,6 +234,16 @@ producer stamps, configured defaults, or reviewer self-report as runtime
|
|
|
234
234
|
confirmation. Leave report runtime identity not-reported unless independently
|
|
235
235
|
observed.
|
|
236
236
|
|
|
237
|
+
For a concrete managed Cursor target, require
|
|
238
|
+
`providers.cursor.dispatchArgs.variant` and launch the exact resolver-selected
|
|
239
|
+
native reviewer variant first. Keep mapped Cursor model strings opaque inside
|
|
240
|
+
the resolver and materialized definition; do not add a Task-level model
|
|
241
|
+
argument. Only a recorded pre-start native role-selection rejection of that
|
|
242
|
+
exact variant before any reviewer starts permits another target-preserving
|
|
243
|
+
route. After acceptance, continue only through the existing reviewer handle;
|
|
244
|
+
timeout, interruption, malformed output, or `BLOCKED` never authorizes a
|
|
245
|
+
replacement launch.
|
|
246
|
+
|
|
237
247
|
This resolver command is independent of lifecycle gates. Reusable `oat gate
|
|
238
248
|
review` commands must remain provider-neutral and must not contain or add a
|
|
239
249
|
provider/model `--target` argument.
|
|
@@ -249,7 +259,9 @@ provider/model `--target` argument.
|
|
|
249
259
|
Detection:
|
|
250
260
|
|
|
251
261
|
- Claude Code: Task-style subagent dispatch with `subagent_type: "oat-reviewer"` (resolves from `.claude/agents/oat-reviewer.md`).
|
|
252
|
-
- Cursor:
|
|
262
|
+
- Cursor: use the exact resolver-selected native reviewer variant for a
|
|
263
|
+
concrete managed target. Use base `oat-reviewer` only for an explicit
|
|
264
|
+
inherit/default exception.
|
|
253
265
|
- Codex multi-agent: verify `[features] multi_agent = true`; if the host requires explicit authorization before `spawn_agent`, announce `authorization required` and ask one concise confirmation before selecting a lower tier. If authorized -> Tier 1; if declined -> Tier 2/3 fallback.
|
|
254
266
|
- If the runtime can dispatch reviewer work -> Tier 1. If subagent dispatch is unavailable -> Tier 2. If the user requests inline / confirms a fresh session -> Tier 3.
|
|
255
267
|
|
|
@@ -260,7 +272,16 @@ Build the dispatch payload and spawn the reviewer in structured-output mode. Thi
|
|
|
260
272
|
- Set `oat_output_mode: structured` in the dispatch payload (the flag `.agents/agents/oat-reviewer.md` recognizes). In this mode the reviewer returns a `StructuredFindings` object in-memory and writes NO artifact under `reviews/`.
|
|
261
273
|
- Include the project context (`oat_project`, `oat_review_scope`, `oat_review_head_sha`), the Review Scope metadata block, a pointer to the posted-review-body schema (`design.md` → Data Models → Posted-review-body), and the resolved narrowing range (`<prior_sha>..<HEAD>` or none).
|
|
262
274
|
- If a worktree was resolved in Step 2, include its path so the reviewer reads from the checkout.
|
|
263
|
-
-
|
|
275
|
+
- For Cursor concrete managed dispatch, invoke
|
|
276
|
+
`providers.cursor.dispatchArgs.variant` as the exact native agent type. Do
|
|
277
|
+
not substitute base `oat-reviewer` or add a concrete model argument.
|
|
278
|
+
- The reviewer returns `StructuredFindings` (summary + findings array +
|
|
279
|
+
`verification_commands`). Tier 2/3 is eligible only when dispatch is
|
|
280
|
+
unavailable before launch or the exact native role is explicitly rejected
|
|
281
|
+
before any reviewer starts; record that pre-start outcome and do not retry
|
|
282
|
+
at Tier 1. Once a reviewer is accepted, malformed structured output is a
|
|
283
|
+
terminal validation failure: surface the error, block the review, and do not
|
|
284
|
+
launch another reviewer.
|
|
264
285
|
|
|
265
286
|
**Step 5c: Tier 2 — Fresh session (recommended fallback).** If subagent dispatch is unavailable and the user is not already in a fresh session, provide fresh-session instructions and exit. (If Codex reported `authorization required` and the user later authorizes, return to Tier 1.)
|
|
266
287
|
|
|
@@ -371,7 +392,9 @@ At completion, report:
|
|
|
371
392
|
- OAT project resolved from the diff (or `--project` override) and validated; project artifacts read read-only for mode-aware context.
|
|
372
393
|
- PR content acquired via ephemeral worktree (or diff-only fallback) without mutating the caller's working tree.
|
|
373
394
|
- Prior provide-remote reviews detected and filtered to this `(project, scope)`; re-review narrowing applied only after the stale-SHA guard passes.
|
|
374
|
-
- Review executed via Tier 1 (`oat-reviewer` structured-output, NO artifact) /
|
|
395
|
+
- Review executed via Tier 1 (`oat-reviewer` structured-output, NO artifact) /
|
|
396
|
+
Tier 2 (fresh session) / Tier 3 (inline), with fallthrough limited to
|
|
397
|
+
dispatch unavailability or explicit pre-start native role rejection.
|
|
375
398
|
- Findings produced with consistent 4-tier severities and file:line references.
|
|
376
399
|
- Inline comments mapped to in-diff positions; out-of-diff findings downgraded to the body, never dropped.
|
|
377
400
|
- Posted-review body carries the marker block first (with `oat_project` + `oat_review_scope`), correct severity counts, and the minor-fix nudge when minors are present.
|
|
@@ -2,7 +2,7 @@ import { type CommandContext, type GlobalOptions } from '../../app/command-conte
|
|
|
2
2
|
import { type PjmDoctorOptions } from '../pjm/doctor.js';
|
|
3
3
|
import { type OatConfig, type OatLocalConfig, type UserConfig } from '../../config/oat-config.js';
|
|
4
4
|
import { type Manifest } from '../../manifest/index.js';
|
|
5
|
-
import { type MatrixCellAvailabilityResponse, type ValidateMatrixCellOptions } from '../../providers/identity/availability.js';
|
|
5
|
+
import { type CursorMaterializedModelDiagnostic, type MatrixCellAvailabilityResponse, type ValidateMatrixCellOptions } from '../../providers/identity/availability.js';
|
|
6
6
|
import { createDispatchValidationPassContext, validateDispatchMatrixRefs } from '../../providers/identity/dispatch-validation.js';
|
|
7
7
|
import type { ConcreteScope } from '../../shared/types.js';
|
|
8
8
|
import { type DoctorCheck } from '../../ui/output.js';
|
|
@@ -24,6 +24,7 @@ interface DoctorDependencies {
|
|
|
24
24
|
readOatLocalConfig: (repoRoot: string) => Promise<OatLocalConfig>;
|
|
25
25
|
readUserConfig: (userConfigDir: string) => Promise<UserConfig>;
|
|
26
26
|
validateMatrixCell: (provider: string, value: string, options: ValidateMatrixCellOptions) => Promise<MatrixCellAvailabilityResponse>;
|
|
27
|
+
diagnoseCursorMaterializedModels: (ladderModelIds: readonly string[], options: ValidateMatrixCellOptions) => Promise<CursorMaterializedModelDiagnostic[]>;
|
|
27
28
|
createDispatchValidationPassContext: typeof createDispatchValidationPassContext;
|
|
28
29
|
validateDispatchMatrixRefs: typeof validateDispatchMatrixRefs;
|
|
29
30
|
processEnv: NodeJS.ProcessEnv;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE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EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,KAC3C,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACjC,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CACnE;AAED,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,UAAU,kBAAkB;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0BAA0B,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,oBAAoB,EAAE,CAAC;CACxC;AA60BD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC1C,OAAO,CAcT"}
|
|
@@ -18,8 +18,9 @@ import { codexAdapter } from '../../providers/codex/index.js';
|
|
|
18
18
|
import { isOatManagedCodexRoleFile } from '../../providers/codex/codec/shared.js';
|
|
19
19
|
import { copilotAdapter } from '../../providers/copilot/index.js';
|
|
20
20
|
import { cursorAdapter } from '../../providers/cursor/index.js';
|
|
21
|
+
import { CURSOR_MODEL_PIN_MAPPINGS } from '../../providers/cursor/codec/catalog.js';
|
|
21
22
|
import { geminiAdapter } from '../../providers/gemini/index.js';
|
|
22
|
-
import { validateMatrixCell, } from '../../providers/identity/availability.js';
|
|
23
|
+
import { diagnoseCursorMaterializedModels, validateMatrixCell, } from '../../providers/identity/availability.js';
|
|
23
24
|
import { createDispatchValidationPassContext, validateDispatchMatrixRefs, } from '../../providers/identity/dispatch-validation.js';
|
|
24
25
|
import { formatDoctorResults } from '../../ui/output.js';
|
|
25
26
|
import { Command } from 'commander';
|
|
@@ -137,6 +138,7 @@ function createDependencies() {
|
|
|
137
138
|
readOatLocalConfig,
|
|
138
139
|
readUserConfig,
|
|
139
140
|
validateMatrixCell,
|
|
141
|
+
diagnoseCursorMaterializedModels,
|
|
140
142
|
createDispatchValidationPassContext,
|
|
141
143
|
validateDispatchMatrixRefs,
|
|
142
144
|
processEnv: process.env,
|
|
@@ -147,6 +149,36 @@ function createDependencies() {
|
|
|
147
149
|
checkStaleInvocations,
|
|
148
150
|
};
|
|
149
151
|
}
|
|
152
|
+
async function createCursorMaterializedModelsCheck(scopeRoot, dependencies) {
|
|
153
|
+
const diagnostics = await dependencies.diagnoseCursorMaterializedModels(CURSOR_MODEL_PIN_MAPPINGS.map((mapping) => mapping.ladderModelId), { cwd: scopeRoot, env: dependencies.processEnv });
|
|
154
|
+
const missing = diagnostics.filter((diagnostic) => diagnostic.availability === 'missing');
|
|
155
|
+
const unvalidated = diagnostics.filter((diagnostic) => diagnostic.availability === 'unvalidated');
|
|
156
|
+
if (missing.length > 0) {
|
|
157
|
+
return {
|
|
158
|
+
name: 'project:cursor_materialized_models',
|
|
159
|
+
description: 'Cursor materialized target catalog availability',
|
|
160
|
+
status: 'warn',
|
|
161
|
+
message: `Broad Cursor CLI catalog no longer lists: ${missing.map((entry) => entry.ladderModelId).join(', ')}. ` +
|
|
162
|
+
'This availability check does not verify definition pins or runtime identity.',
|
|
163
|
+
fix: 'Refresh Cursor model mappings and rerun `oat sync --scope project`.',
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
if (unvalidated.length > 0) {
|
|
167
|
+
return {
|
|
168
|
+
name: 'project:cursor_materialized_models',
|
|
169
|
+
description: 'Cursor materialized target catalog availability',
|
|
170
|
+
status: 'warn',
|
|
171
|
+
message: 'Cursor broad CLI catalog could not be checked. Definition pins and runtime identity were not tested.',
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
name: 'project:cursor_materialized_models',
|
|
176
|
+
description: 'Cursor materialized target catalog availability',
|
|
177
|
+
status: 'pass',
|
|
178
|
+
message: `All ${diagnostics.length} mapped flat Cursor IDs remain listed in the broad CLI catalog. ` +
|
|
179
|
+
'This does not verify definition pins or runtime identity.',
|
|
180
|
+
};
|
|
181
|
+
}
|
|
150
182
|
function collectDispatchMatrixCellRefs(layers) {
|
|
151
183
|
return layers.flatMap(({ source, config }) => {
|
|
152
184
|
const providers = config.workflow?.dispatchCeiling?.providers ?? {};
|
|
@@ -505,6 +537,10 @@ async function runChecksForScope(scope, scopeRoot, userConfigDir, dependencies)
|
|
|
505
537
|
? undefined
|
|
506
538
|
: 'Install or enable a provider directory (e.g. .claude, .cursor, .codex).',
|
|
507
539
|
});
|
|
540
|
+
if (scope === 'project' &&
|
|
541
|
+
providers.some((provider) => provider.name === 'cursor' && provider.detected)) {
|
|
542
|
+
checks.push(await createCursorMaterializedModelsCheck(scopeRoot, dependencies));
|
|
543
|
+
}
|
|
508
544
|
checks.push(...(await runCodexChecksForScope(scope, scopeRoot, dirname(userConfigDir), dependencies)));
|
|
509
545
|
if (scope === 'project') {
|
|
510
546
|
checks.push(await dependencies.checkStaleInvocations(scopeRoot));
|
|
@@ -91,7 +91,7 @@ interface GateProducerIdentity {
|
|
|
91
91
|
contributingScopes?: string[];
|
|
92
92
|
contributingStampCount?: number;
|
|
93
93
|
diversityClaimable: boolean;
|
|
94
|
-
source: 'flag' | 'stamp' | 'aggregated-stamps' | 'unknown';
|
|
94
|
+
source: 'flag' | 'stamp' | 'aggregated-stamps' | 'environment' | 'unknown';
|
|
95
95
|
}
|
|
96
96
|
interface GateDiversityMetadata {
|
|
97
97
|
avoid: CrossProviderAvoid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAShE,OAAO,EAWL,KAAK,UAAU,EAIf,KAAK,SAA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AAK,EAAE,kBAAkB,EACzB,gBAAgB,CAAC,EAAE,oBAAoB,GACtC,kBAAkB,GAAG,IAAI,CAS3B;AA22DD,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAC/C,OAAO,CA4NT"}
|
|
@@ -813,6 +813,19 @@ function parseProducerIdentityOption(value) {
|
|
|
813
813
|
}
|
|
814
814
|
return identityFromRecords([{ value: producer, provenance: provenance }], 'flag');
|
|
815
815
|
}
|
|
816
|
+
function parseEnvironmentProducerIdentity(value) {
|
|
817
|
+
const trimmed = value?.trim();
|
|
818
|
+
if (!trimmed) {
|
|
819
|
+
return unknownProducerIdentity();
|
|
820
|
+
}
|
|
821
|
+
const separator = trimmed.lastIndexOf(':');
|
|
822
|
+
const producer = separator > 0 ? trimmed.slice(0, separator).trim() : '';
|
|
823
|
+
const provenance = separator > 0 ? trimmed.slice(separator + 1).trim() : '';
|
|
824
|
+
if (!producer || provenance !== 'declared') {
|
|
825
|
+
return unknownProducerIdentity();
|
|
826
|
+
}
|
|
827
|
+
return identityFromRecords([{ value: producer, provenance: 'declared' }], 'environment');
|
|
828
|
+
}
|
|
816
829
|
function identityFromStamp(stamp) {
|
|
817
830
|
return identityFromRecords([{ value: stamp.producer, provenance: stamp.provenance }], 'stamp');
|
|
818
831
|
}
|
|
@@ -822,11 +835,19 @@ function exactIdentityFromStamp(stamp) {
|
|
|
822
835
|
? identity
|
|
823
836
|
: unknownProducerIdentity();
|
|
824
837
|
}
|
|
838
|
+
function aggregateIdentityFromStamp(stamp) {
|
|
839
|
+
const producerIdentity = identityFromStamp(stamp);
|
|
840
|
+
if (producerIdentity.diversityClaimable &&
|
|
841
|
+
producerIdentity.family !== 'unknown') {
|
|
842
|
+
return producerIdentity;
|
|
843
|
+
}
|
|
844
|
+
return identityFromRecords([{ value: stamp.target, provenance: 'inferred' }], 'stamp');
|
|
845
|
+
}
|
|
825
846
|
function aggregateIdentityFromStamps(stamps) {
|
|
826
847
|
if (stamps.length === 0) {
|
|
827
848
|
return unknownProducerIdentity();
|
|
828
849
|
}
|
|
829
|
-
const identities = stamps.map(
|
|
850
|
+
const identities = stamps.map(aggregateIdentityFromStamp);
|
|
830
851
|
const avoidFamilies = [
|
|
831
852
|
...new Set(identities.flatMap((identity) => identity.diversityClaimable && identity.family !== 'unknown'
|
|
832
853
|
? [identity.family]
|
|
@@ -896,7 +917,17 @@ async function resolveReviewProducerIdentity(options) {
|
|
|
896
917
|
if (options.explicit?.trim()) {
|
|
897
918
|
return parseProducerIdentityOption(options.explicit);
|
|
898
919
|
}
|
|
899
|
-
|
|
920
|
+
const stamped = await readStampedProducerIdentity(options);
|
|
921
|
+
if (stamped.diversityClaimable) {
|
|
922
|
+
return stamped;
|
|
923
|
+
}
|
|
924
|
+
const environment = parseEnvironmentProducerIdentity(options.env.OAT_GATE_PRODUCER_IDENTITY);
|
|
925
|
+
return environment.diversityClaimable ? environment : stamped;
|
|
926
|
+
}
|
|
927
|
+
function reviewerChildProcessEnv(env) {
|
|
928
|
+
const childEnv = { ...env };
|
|
929
|
+
delete childEnv.OAT_GATE_PRODUCER_IDENTITY;
|
|
930
|
+
return childEnv;
|
|
900
931
|
}
|
|
901
932
|
function findPinnedModelArg(argv) {
|
|
902
933
|
for (let index = 0; index < argv.length; index += 1) {
|
|
@@ -1849,6 +1880,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1849
1880
|
const projectPath = reviewProject.path;
|
|
1850
1881
|
const targets = resolveExecTargets(effective);
|
|
1851
1882
|
const producerIdentity = await resolveReviewProducerIdentity({
|
|
1883
|
+
env: dependencies.processEnv,
|
|
1852
1884
|
explicit: options.producerIdentity,
|
|
1853
1885
|
repoRoot,
|
|
1854
1886
|
projectPath,
|
|
@@ -1939,7 +1971,7 @@ async function runReviewGate(prompt, options, context, dependencies) {
|
|
|
1939
1971
|
const childResult = await executeTarget(selected, [reviewPrompt], context, {
|
|
1940
1972
|
...dependencies,
|
|
1941
1973
|
processEnv: {
|
|
1942
|
-
...dependencies.processEnv,
|
|
1974
|
+
...reviewerChildProcessEnv(dependencies.processEnv),
|
|
1943
1975
|
OAT_GATE_HEADLESS: '1',
|
|
1944
1976
|
OAT_NON_INTERACTIVE: '1',
|
|
1945
1977
|
OAT_GATE_RUN_ID: runId,
|
|
@@ -28,7 +28,7 @@ interface InitDependencies {
|
|
|
28
28
|
loadManifest: (manifestPath: string) => Promise<Manifest>;
|
|
29
29
|
saveManifest: (manifestPath: string, manifest: Manifest) => Promise<void>;
|
|
30
30
|
scanCanonical: (scopeRoot: string, scope: ConcreteScope) => Promise<CanonicalEntry[]>;
|
|
31
|
-
collectStrays: (scopeRoot: string, scope: ConcreteScope, manifest: Manifest, canonicalEntries: CanonicalEntry[], activeAdapters?: ProviderAdapter[]) => Promise<InitStrayCandidate[]>;
|
|
31
|
+
collectStrays: (scopeRoot: string, scope: ConcreteScope, manifest: Manifest, canonicalEntries: CanonicalEntry[], activeAdapters?: ProviderAdapter[], userConfigDir?: string) => Promise<InitStrayCandidate[]>;
|
|
32
32
|
confirmAction: (message: string, ctx: PromptContext) => Promise<boolean>;
|
|
33
33
|
selectManyWithAbort: <T extends string>(message: string, choices: MultiSelectChoice<T>[], ctx: PromptContext) => Promise<T[] | null>;
|
|
34
34
|
selectProvidersWithAbort: <T extends string>(message: string, choices: MultiSelectChoice<T>[], ctx: PromptContext) => Promise<T[] | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/init/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EAEnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/init/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK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EAAE,cAAc,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/D,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AAi2BD,wBAAgB,iBAAiB,CAC/B,SAAS,GAAE,OAAO,CAAC,gBAAgB,CAAM,GACxC,OAAO,CAiBT"}
|
|
@@ -6,7 +6,7 @@ import { applyOatCoreGitignore, } from '../init/gitignore.js';
|
|
|
6
6
|
import { applyGitignore } from '../local/apply.js';
|
|
7
7
|
import { addLocalPaths } from '../local/manage.js';
|
|
8
8
|
import { adoptStrayToCanonical, isAdoptionConflictError, } from '../shared/adopt-stray.js';
|
|
9
|
-
import { detectCodexRoleStrays, regenerateCodexAfterAdoption, } from '../shared/codex-strays.js';
|
|
9
|
+
import { detectCodexRoleStrays, filterMaterializationManagedStrays, regenerateCodexAfterAdoption, } from '../shared/codex-strays.js';
|
|
10
10
|
import { PROVIDER_CONFIG_REMEDIATION } from '../shared/messages.js';
|
|
11
11
|
import { withScopeOption } from '../shared/scope-option.js';
|
|
12
12
|
import { confirmAction, inputWithDefault, selectManyWithAbort, selectWithAbort, } from '../shared/shared.prompts.js';
|
|
@@ -14,7 +14,7 @@ import { readGlobalOptions, resolveConcreteScopes, } from '../shared/shared.util
|
|
|
14
14
|
import { DEFAULT_SYNC_CONFIG, loadSyncConfig, saveSyncConfig, } from '../../config/index.js';
|
|
15
15
|
import { detectDefaultBranch, readUserConfig, readOatConfig, resolveLocalPaths, writeOatConfig, } from '../../config/oat-config.js';
|
|
16
16
|
import { detectStrays, filterKnownStrays, } from '../../drift/index.js';
|
|
17
|
-
import { configureLocalHooksPath, getHookInstallInfo, installHook, isHookInstalled, scanCanonical, uninstallHook, } from '../../engine/index.js';
|
|
17
|
+
import { configureLocalHooksPath, getHookInstallInfo, installHook, isHookInstalled, scanBundledManagedAgents, scanCanonical, uninstallHook, } from '../../engine/index.js';
|
|
18
18
|
import { dirExists, fileExists } from '../../fs/io.js';
|
|
19
19
|
import { resolveProjectRoot, resolveScopeRoot } from '../../fs/paths.js';
|
|
20
20
|
import { normalizeToPosixPath } from '../../fs/paths.js';
|
|
@@ -24,6 +24,7 @@ import { codexAdapter } from '../../providers/codex/index.js';
|
|
|
24
24
|
import { applyCodexProjectExtensionPlan, computeCodexProjectExtensionPlan, } from '../../providers/codex/codec/sync-extension.js';
|
|
25
25
|
import { copilotAdapter } from '../../providers/copilot/index.js';
|
|
26
26
|
import { cursorAdapter } from '../../providers/cursor/index.js';
|
|
27
|
+
import { applyCursorProjectExtensionPlan, computeCursorProjectExtensionPlan, } from '../../providers/cursor/codec/sync-extension.js';
|
|
27
28
|
import { geminiAdapter } from '../../providers/gemini/index.js';
|
|
28
29
|
import { getActiveAdapters, getConfigAwareAdapters, getSyncMappings, } from '../../providers/shared/index.js';
|
|
29
30
|
import { Command } from 'commander';
|
|
@@ -49,15 +50,43 @@ async function ensureCanonicalDirectories(scopeRoot, scope) {
|
|
|
49
50
|
await mkdir(join(scopeRoot, '.agents', 'rules'), { recursive: true });
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
async function collectStraysDefault(scopeRoot, scope, manifest, canonicalEntries, activeAdapters) {
|
|
53
|
+
async function collectStraysDefault(scopeRoot, scope, manifest, canonicalEntries, activeAdapters, userConfigDir = join(scopeRoot, '.oat')) {
|
|
53
54
|
const adaptersToScan = activeAdapters ??
|
|
54
55
|
(await getActiveAdapters(getDefaultAdapters(), scopeRoot));
|
|
55
56
|
const candidates = [];
|
|
57
|
+
const hasMaterializationAdapter = adaptersToScan.some((adapter) => adapter.name === 'codex' || adapter.name === 'cursor');
|
|
58
|
+
const materializationCanonicalEntries = scope === 'user' && hasMaterializationAdapter
|
|
59
|
+
? [...canonicalEntries, ...(await scanBundledManagedAgents())]
|
|
60
|
+
: canonicalEntries;
|
|
61
|
+
const codexExtensionPlan = adaptersToScan.some((adapter) => adapter.name === 'codex')
|
|
62
|
+
? await computeCodexProjectExtensionPlan(scopeRoot, materializationCanonicalEntries, undefined, { userConfigDir })
|
|
63
|
+
: undefined;
|
|
64
|
+
const cursorExtensionPlan = adaptersToScan.some((adapter) => adapter.name === 'cursor')
|
|
65
|
+
? await computeCursorProjectExtensionPlan(scopeRoot, materializationCanonicalEntries, undefined, { userConfigDir })
|
|
66
|
+
: undefined;
|
|
67
|
+
const materializationPlans = [
|
|
68
|
+
...(codexExtensionPlan
|
|
69
|
+
? [
|
|
70
|
+
{
|
|
71
|
+
provider: 'codex',
|
|
72
|
+
operations: codexExtensionPlan.operations.map((operation) => ({
|
|
73
|
+
...operation,
|
|
74
|
+
provider: 'codex',
|
|
75
|
+
entryName: operation.roleName,
|
|
76
|
+
})),
|
|
77
|
+
managedEntries: codexExtensionPlan.managedRoles,
|
|
78
|
+
aggregateHash: codexExtensionPlan.aggregateConfigHash,
|
|
79
|
+
metadata: codexExtensionPlan.metadata,
|
|
80
|
+
},
|
|
81
|
+
]
|
|
82
|
+
: []),
|
|
83
|
+
...(cursorExtensionPlan ? [cursorExtensionPlan] : []),
|
|
84
|
+
];
|
|
56
85
|
for (const adapter of adaptersToScan) {
|
|
57
86
|
const mappings = getSyncMappings(adapter, scope);
|
|
58
87
|
for (const mapping of mappings) {
|
|
59
88
|
const providerDir = join(scopeRoot, mapping.providerDir);
|
|
60
|
-
const strays = await detectStrays(adapter.name, providerDir, manifest, canonicalEntries, mapping);
|
|
89
|
+
const strays = filterMaterializationManagedStrays((await detectStrays(adapter.name, providerDir, manifest, canonicalEntries, mapping)).map((report) => ({ provider: adapter.name, report })), materializationPlans).map((candidate) => candidate.report);
|
|
61
90
|
for (const report of strays) {
|
|
62
91
|
if (report.state.status !== 'stray') {
|
|
63
92
|
continue;
|
|
@@ -70,9 +99,7 @@ async function collectStraysDefault(scopeRoot, scope, manifest, canonicalEntries
|
|
|
70
99
|
}
|
|
71
100
|
}
|
|
72
101
|
}
|
|
73
|
-
if (
|
|
74
|
-
adaptersToScan.some((adapter) => adapter.name === 'codex')) {
|
|
75
|
-
const codexExtensionPlan = await computeCodexProjectExtensionPlan(scopeRoot, canonicalEntries);
|
|
102
|
+
if (adaptersToScan.some((adapter) => adapter.name === 'codex')) {
|
|
76
103
|
const codexStrays = await detectCodexRoleStrays(scopeRoot, canonicalEntries, new Set(codexExtensionPlan.managedRoles));
|
|
77
104
|
for (const stray of codexStrays) {
|
|
78
105
|
candidates.push({
|
|
@@ -481,7 +508,7 @@ async function runInitCommand(context, dependencies, hookFlag, setupFlag) {
|
|
|
481
508
|
manifest = createEmptyManifest();
|
|
482
509
|
}
|
|
483
510
|
const canonicalEntries = await dependencies.scanCanonical(scopeRoot, scope);
|
|
484
|
-
const collectedStrays = await dependencies.collectStrays(scopeRoot, scope, manifest, canonicalEntries, activeAdaptersForStrays);
|
|
511
|
+
const collectedStrays = await dependencies.collectStrays(scopeRoot, scope, manifest, canonicalEntries, activeAdaptersForStrays, userConfigDir);
|
|
485
512
|
const { candidates: strays } = filterKnownStrays({
|
|
486
513
|
reports: collectedStrays.map((stray) => stray.report),
|
|
487
514
|
candidates: collectedStrays,
|
|
@@ -535,6 +562,11 @@ async function runInitCommand(context, dependencies, hookFlag, setupFlag) {
|
|
|
535
562
|
computeExtensionPlan: computeCodexProjectExtensionPlan,
|
|
536
563
|
applyExtensionPlan: applyCodexProjectExtensionPlan,
|
|
537
564
|
});
|
|
565
|
+
if (activeAdaptersForStrays?.some((adapter) => adapter.name === 'cursor')) {
|
|
566
|
+
const refreshedCanonical = await dependencies.scanCanonical(scopeRoot, scope);
|
|
567
|
+
const cursorPlan = await computeCursorProjectExtensionPlan(scopeRoot, refreshedCanonical, undefined, { userConfigDir });
|
|
568
|
+
await applyCursorProjectExtensionPlan(scopeRoot, cursorPlan);
|
|
569
|
+
}
|
|
538
570
|
}
|
|
539
571
|
if (straysAdopted > 0) {
|
|
540
572
|
context.logger.success(`Adopted ${straysAdopted} stray entr${straysAdopted === 1 ? 'y' : 'ies'} [${scope}].`);
|