@open-agent-toolkit/cli 0.1.69 → 0.1.72
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/docs/cli-utilities/configuration.md +27 -0
- package/assets/docs/cli-utilities/index.md +1 -1
- package/assets/docs/cli-utilities/workflow-gates.md +126 -3
- package/assets/docs/reference/cli-reference.md +5 -1
- package/assets/docs/workflows/projects/dispatch-ceiling.md +14 -5
- package/assets/docs/workflows/projects/orchestration-model.md +21 -0
- package/assets/docs/workflows/projects/review-flavors.md +9 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +21 -1
- package/assets/skills/oat-dispatch-subagents/references/provider-claude.md +21 -0
- package/assets/skills/oat-dispatch-subagents/references/provider-codex.md +16 -0
- package/assets/skills/oat-dispatch-subagents/references/provider-cursor.md +21 -0
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +3 -0
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +3 -0
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +3 -0
- package/assets/skills/oat-project-plan-writing/SKILL.md +23 -33
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +3 -0
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +3 -0
- package/assets/skills/oat-project-review-provide/SKILL.md +62 -1
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +65 -1
- package/dist/commands/gate/__fixtures__/fake-runtime.d.mts +3 -0
- package/dist/commands/gate/__fixtures__/fake-runtime.d.mts.map +1 -0
- package/dist/commands/gate/__fixtures__/fake-runtime.mjs +167 -0
- package/dist/commands/gate/activity-probes.d.ts +35 -0
- package/dist/commands/gate/activity-probes.d.ts.map +1 -0
- package/dist/commands/gate/activity-probes.js +135 -0
- package/dist/commands/gate/branch-local-cli.d.ts +31 -0
- package/dist/commands/gate/branch-local-cli.d.ts.map +1 -0
- package/dist/commands/gate/branch-local-cli.js +116 -0
- package/dist/commands/gate/index.d.ts +29 -0
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +438 -32
- package/dist/commands/gate/route.d.ts +22 -0
- package/dist/commands/gate/route.d.ts.map +1 -0
- package/dist/commands/gate/route.js +109 -0
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +100 -16
- package/dist/config/oat-config.d.ts +9 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +23 -0
- package/dist/config/resolve.js +7 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-plan-writing
|
|
3
|
-
version: 1.2.
|
|
3
|
+
version: 1.2.15
|
|
4
4
|
description: Use when authoring or mutating plan.md in any OAT workflow. Defines canonical format invariants — stable task IDs, required sections, review table rules, and resume guardrails.
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
user-invocable: false
|
|
@@ -74,34 +74,23 @@ before each artifact review dispatch.
|
|
|
74
74
|
|
|
75
75
|
### Complete Dispatch Ladder Adoption Contract
|
|
76
76
|
|
|
77
|
-
Before any plan becomes implementation-ready,
|
|
78
|
-
configuration
|
|
77
|
+
Before any plan becomes implementation-ready, use the reviewer resolver
|
|
78
|
+
envelope from the preflight command above as the effective configuration and
|
|
79
|
+
resolution boundary. Do not inspect or merge raw config surfaces.
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
Route from the resolver fields, not from hand-inspected config keys:
|
|
82
|
+
|
|
83
|
+
- Prompt for ladder adoption when `unresolvedReason` is `ladder` or `both`, or
|
|
84
|
+
when `ladderCompleteness.complete` is `false`.
|
|
85
|
+
- Show `ladderCompleteness.missingCells` so the operator sees exactly which
|
|
86
|
+
provider/tier cells adoption would fill.
|
|
87
|
+
- When `unresolvedReason` is `policy`, keep ladder adoption separate: set the
|
|
88
|
+
project policy at plan time or select Inherit Host Defaults.
|
|
89
|
+
- A resolved envelope has no `unresolvedReason`. When
|
|
90
|
+
`ladderCompleteness.complete` is `true`, skip adoption.
|
|
83
91
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
config surfaces. Validate the resolved
|
|
87
|
-
`workflow.dispatchCeiling.providers` provider/tier cells and compare their
|
|
88
|
-
ordered candidate ladders with the bundled
|
|
89
|
-
`packages/cli/config/dispatch-matrix-recommendation.json` source (or the
|
|
90
|
-
installed bundle's `config/dispatch-matrix-recommendation.json` asset). A
|
|
91
|
-
complete custom ladder is allowed, but every supported provider must have valid
|
|
92
|
-
ordered `candidates` cells through the named project ceiling. A legacy scalar,
|
|
93
|
-
single fallback route, missing tier, empty candidates array, or malformed
|
|
94
|
-
ordering is not a complete ladder.
|
|
95
|
-
|
|
96
|
-
Keep effective ladder completeness separate from project-ceiling resolution.
|
|
97
|
-
When `dispatch-ceiling resolve` returns `matrix: null`, that can mean only that
|
|
98
|
-
the project policy or named ceiling is unresolved; it is not evidence that the
|
|
99
|
-
effective candidate ladders are absent. When every effective provider/tier cell
|
|
100
|
-
is complete, skip adoption and proceed directly to the separate project-ceiling
|
|
101
|
-
choice.
|
|
102
|
-
|
|
103
|
-
Only when effective provider/tier cells are missing or incomplete, show the
|
|
104
|
-
complete bundled recommendation before asking to write anything:
|
|
92
|
+
When adoption is required, show the complete bundled recommendation before
|
|
93
|
+
asking to write anything:
|
|
105
94
|
|
|
106
95
|
| Provider | Economy | Balanced | High | Frontier |
|
|
107
96
|
| --------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -------------------------------------- |
|
|
@@ -125,12 +114,13 @@ project's named ceiling is a separate project-state constraint. A
|
|
|
125
114
|
project-specific active policy or ceiling must not be written to user
|
|
126
115
|
`~/.oat/config.json`.
|
|
127
116
|
|
|
128
|
-
Adoption preserves explicit cells. After adoption,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
incomplete or missing, identify those cells and block;
|
|
132
|
-
or mark the plan implementation-ready. In
|
|
133
|
-
missing effective cells block readiness
|
|
117
|
+
Adoption preserves explicit cells. After adoption, re-run the reviewer
|
|
118
|
+
preflight resolver and re-check `ladderCompleteness.complete` and
|
|
119
|
+
`ladderCompleteness.missingCells`. If preserved legacy or partial cells still
|
|
120
|
+
leave effective cells incomplete or missing, identify those cells and block;
|
|
121
|
+
do not overwrite, infer, or mark the plan implementation-ready. In
|
|
122
|
+
non-interactive mode, incomplete or missing effective cells block readiness
|
|
123
|
+
without choosing an ownership scope.
|
|
134
124
|
|
|
135
125
|
### Reviewer Ceiling Contract
|
|
136
126
|
|
|
@@ -239,6 +239,9 @@ remains immutable baseline evidence for the original p01-t01 verification.
|
|
|
239
239
|
| `oat-project-complete/SKILL.md` | `6ed459f9e462 -> NG`; `a167d03559fa -> NG`; `79c2eeed668c -> COMPLETE-01`; `2c1514b9d9af -> COMPLETE-01`; `31c750b4fea7 -> COMPLETE-01`; `cfba413b1293 -> COMPLETE-01`; `ffcdc9d576c0 -> COMPLETE-01`; `7fcfce0423ac -> COMPLETE-01`; `9497d9f94eed -> COMPLETE-01`; `7b59c728d3fb -> COMPLETE-01`; `48e10a9636fe -> COMPLETE-01`; `c0dad37fc166 -> COMPLETE-01`; `aa9a36243ec1 -> COMPLETE-01`; `7bcbf58b54e9 -> NG`; `4c7f88a7f942 -> COMPLETE-02`; `6a1a95acc8cc -> COMPLETE-02`; `3b559956b3eb -> COMPLETE-03`; `14d161cdf99b -> COMPLETE-03`; `12f7c30a54c8 -> NG`; `fffe5eea5ebd -> NG` |
|
|
240
240
|
| `oat-project-review-provide/SKILL.md` | `1f4b981cac8b -> NG`; `adaeca152bb2 -> NG`; `2f7c201c3c06 -> NG`; `88f79700afdc -> NG`; `655d61df0a8f -> NG`; `efafde9ef5a0 -> NG`; `d2a3861d6323 -> REVIEWPROVIDE-02`; `65f5b9cf49cd -> REVIEWPROVIDE-04`; `962cb38d246a -> REVIEWPROVIDE-04`; `1a568483ba0b -> REVIEWPROVIDE-04`; `610e27edfe85 -> REVIEWPROVIDE-04`; `fab62c510bd0 -> REVIEWPROVIDE-05`; `a9f30853c867 -> REVIEWPROVIDE-05`; `0929c916fc20 -> REVIEWPROVIDE-05`; `f9a37c63afab -> REVIEWPROVIDE-05`; `687bb9368f92 -> REVIEWPROVIDE-05`; `bb0096e95c47 -> REVIEWPROVIDE-06`; `55f6357a987d -> REVIEWPROVIDE-06`; `1bee61f8531c -> REVIEWPROVIDE-07`; `3d35091607a1 -> REVIEWPROVIDE-08`; `fb40c4341c4c -> NG`; `b22d16885150 -> NG`; `d2b25906242e -> REVIEWPROVIDE-08`; `fd8ebf72b3c4 -> NG`; `fcb9de611ff3 -> NG`; `d2a838dfb18d -> NG`; `c3d50ea7cf69 -> NG`; `09b1b8dd445c -> NG`; `7acc8f3718d2 -> REVIEWPROVIDE-09`; `b2fa883fc4a2 -> NG`; `fe4421531b4c -> NG` |
|
|
241
241
|
| `oat-project-review-receive/SKILL.md` | `9b8a3743d626 -> NG`; `df49c8c6f192 -> NG`; `4ee8730382d3 -> NG`; `655d61df0a8f -> NG`; `765f897d67ac -> NG`; `53b58d16dd32 -> NG`; `fb8755a3bdf4 -> NG`; `c8ab5dd90075 -> NG`; `1f7dd98dff2f -> NG`; `56f78c6740e6 -> NG`; `76f5fb5a88cd -> NG`; `085abfa3599f -> REVIEWRECEIVE-01`; `3ad3aadb8c60 -> NG`; `a7d114059bb6 -> NG`; `ac88cfaa83d9 -> NG`; `3f758313fedb -> REVIEWRECEIVE-08`; `f31f07284718 -> REVIEWRECEIVE-02`; `aba178a21441 -> REVIEWRECEIVE-04`; `a37e601cd731 -> REVIEWRECEIVE-05`; `20e05e1a4381 -> REVIEWRECEIVE-06`; `90001dadf75f -> REVIEWRECEIVE-07`; `f8fd58180ecf -> NG`; `c3abcdc02d9f -> NG`; `f2ebdd6abb9b -> NG` |
|
|
242
|
+
| `oat-project-review-provide/SKILL.md` | `2e794bf4fc4a -> REVIEWPROVIDE-08`; `5441ab977b46 -> REVIEWPROVIDE-08` |
|
|
243
|
+
| `oat-dispatch-subagents/SKILL.md` | `49987359dc09 -> NG` |
|
|
244
|
+
| `oat-dispatch-subagents/references/provider-claude.md` | `06f64bd01ba6 -> NG` |
|
|
242
245
|
| `oat-dispatch-subagents/SKILL.md` | `cb4f86157fd6 -> DISPATCH-01`; `f165b1626192 -> DISPATCH-01`; `7ed5e2b1eb71 -> PDISPATCH-01`; `11c72bcdebad -> DISPATCH-02`; `0834ee701e12 -> DISPATCH-02`; `7fda54e1d519 -> PDISPATCH-01` |
|
|
243
246
|
| `oat-dispatch-subagents/references/provider-claude.md` | `fbe3a21e9533 -> NG` |
|
|
244
247
|
| `oat-dispatch-subagents/references/provider-codex.md` | `95b0f82018c7 -> NG` |
|
|
@@ -239,6 +239,9 @@ remains immutable baseline evidence for the original p01-t01 verification.
|
|
|
239
239
|
| `oat-project-complete/SKILL.md` | `6ed459f9e462 -> NG`; `a167d03559fa -> NG`; `79c2eeed668c -> COMPLETE-01`; `2c1514b9d9af -> COMPLETE-01`; `31c750b4fea7 -> COMPLETE-01`; `cfba413b1293 -> COMPLETE-01`; `ffcdc9d576c0 -> COMPLETE-01`; `7fcfce0423ac -> COMPLETE-01`; `9497d9f94eed -> COMPLETE-01`; `7b59c728d3fb -> COMPLETE-01`; `48e10a9636fe -> COMPLETE-01`; `c0dad37fc166 -> COMPLETE-01`; `aa9a36243ec1 -> COMPLETE-01`; `7bcbf58b54e9 -> NG`; `4c7f88a7f942 -> COMPLETE-02`; `6a1a95acc8cc -> COMPLETE-02`; `3b559956b3eb -> COMPLETE-03`; `14d161cdf99b -> COMPLETE-03`; `12f7c30a54c8 -> NG`; `fffe5eea5ebd -> NG` |
|
|
240
240
|
| `oat-project-review-provide/SKILL.md` | `1f4b981cac8b -> NG`; `adaeca152bb2 -> NG`; `2f7c201c3c06 -> NG`; `88f79700afdc -> NG`; `655d61df0a8f -> NG`; `efafde9ef5a0 -> NG`; `d2a3861d6323 -> REVIEWPROVIDE-02`; `65f5b9cf49cd -> REVIEWPROVIDE-04`; `962cb38d246a -> REVIEWPROVIDE-04`; `1a568483ba0b -> REVIEWPROVIDE-04`; `610e27edfe85 -> REVIEWPROVIDE-04`; `fab62c510bd0 -> REVIEWPROVIDE-05`; `a9f30853c867 -> REVIEWPROVIDE-05`; `0929c916fc20 -> REVIEWPROVIDE-05`; `f9a37c63afab -> REVIEWPROVIDE-05`; `687bb9368f92 -> REVIEWPROVIDE-05`; `bb0096e95c47 -> REVIEWPROVIDE-06`; `55f6357a987d -> REVIEWPROVIDE-06`; `1bee61f8531c -> REVIEWPROVIDE-07`; `3d35091607a1 -> REVIEWPROVIDE-08`; `fb40c4341c4c -> NG`; `b22d16885150 -> NG`; `d2b25906242e -> REVIEWPROVIDE-08`; `fd8ebf72b3c4 -> NG`; `fcb9de611ff3 -> NG`; `d2a838dfb18d -> NG`; `c3d50ea7cf69 -> NG`; `09b1b8dd445c -> NG`; `7acc8f3718d2 -> REVIEWPROVIDE-09`; `b2fa883fc4a2 -> NG`; `fe4421531b4c -> NG` |
|
|
241
241
|
| `oat-project-review-receive/SKILL.md` | `9b8a3743d626 -> NG`; `df49c8c6f192 -> NG`; `4ee8730382d3 -> NG`; `655d61df0a8f -> NG`; `765f897d67ac -> NG`; `53b58d16dd32 -> NG`; `fb8755a3bdf4 -> NG`; `c8ab5dd90075 -> NG`; `1f7dd98dff2f -> NG`; `56f78c6740e6 -> NG`; `76f5fb5a88cd -> NG`; `085abfa3599f -> REVIEWRECEIVE-01`; `3ad3aadb8c60 -> NG`; `a7d114059bb6 -> NG`; `ac88cfaa83d9 -> NG`; `3f758313fedb -> REVIEWRECEIVE-08`; `f31f07284718 -> REVIEWRECEIVE-02`; `aba178a21441 -> REVIEWRECEIVE-04`; `a37e601cd731 -> REVIEWRECEIVE-05`; `20e05e1a4381 -> REVIEWRECEIVE-06`; `90001dadf75f -> REVIEWRECEIVE-07`; `f8fd58180ecf -> NG`; `c3abcdc02d9f -> NG`; `f2ebdd6abb9b -> NG` |
|
|
242
|
+
| `oat-project-review-provide/SKILL.md` | `2e794bf4fc4a -> REVIEWPROVIDE-08`; `5441ab977b46 -> REVIEWPROVIDE-08` |
|
|
243
|
+
| `oat-dispatch-subagents/SKILL.md` | `49987359dc09 -> NG` |
|
|
244
|
+
| `oat-dispatch-subagents/references/provider-claude.md` | `06f64bd01ba6 -> NG` |
|
|
242
245
|
| `oat-dispatch-subagents/SKILL.md` | `cb4f86157fd6 -> DISPATCH-01`; `f165b1626192 -> DISPATCH-01`; `7ed5e2b1eb71 -> PDISPATCH-01`; `11c72bcdebad -> DISPATCH-02`; `0834ee701e12 -> DISPATCH-02`; `7fda54e1d519 -> PDISPATCH-01` |
|
|
243
246
|
| `oat-dispatch-subagents/references/provider-claude.md` | `fbe3a21e9533 -> NG` |
|
|
244
247
|
| `oat-dispatch-subagents/references/provider-codex.md` | `95b0f82018c7 -> NG` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-review-provide
|
|
3
|
-
version: 1.3.
|
|
3
|
+
version: 1.3.20
|
|
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
|
|
@@ -584,6 +584,17 @@ candidate ladder, fail closed before review. Route interactive repair through
|
|
|
584
584
|
the planning workflow's `Complete Dispatch Ladder Adoption Contract`; do not
|
|
585
585
|
invent a reviewer target.
|
|
586
586
|
|
|
587
|
+
**Pre-plan policy inheritance:** When the resolver returns
|
|
588
|
+
`unresolvedReason: 'policy'`, and only then, an `artifact` review whose scope is
|
|
589
|
+
`discovery`, `design`, or `spec` does not block or prompt. Review by deliberate
|
|
590
|
+
inheritance in the current context and record
|
|
591
|
+
`selection_reason: inherit (pre-plan; no project policy)`. An explicitly set
|
|
592
|
+
project policy is always honored, including for pre-plan artifacts. Code
|
|
593
|
+
reviews and `artifact plan` reviews still hard-require a resolved policy.
|
|
594
|
+
Missing or incomplete ladder results (`unresolvedReason: 'ladder' | 'both'`)
|
|
595
|
+
still fail closed. Gate exec-target selection is unaffected by this
|
|
596
|
+
inheritance rule because gates resolve their target independently.
|
|
597
|
+
|
|
587
598
|
After constructing the complete provider payload, record the launcher-owned
|
|
588
599
|
`target`, `model_axis`, and `effort_axis` with
|
|
589
600
|
`launcher-selected/config-declared` provenance. These fields are immutable:
|
|
@@ -609,6 +620,56 @@ managed base role is forbidden except for
|
|
|
609
620
|
explicit inherit/default behavior or the documented managed-uncapped reviewer
|
|
610
621
|
fallback.
|
|
611
622
|
|
|
623
|
+
**Step 6.1: Headless gate route (overrides normal tier selection)**
|
|
624
|
+
|
|
625
|
+
When either prompt frontmatter has `oat_gate_headless: true` or the environment
|
|
626
|
+
has `OAT_GATE_HEADLESS=1`, copy the expected runtime and model from
|
|
627
|
+
`oat_gate_runtime` and `oat_invocation_model`, determine whether this host has
|
|
628
|
+
an awaited-child capability, and use the gate-provided branch-local CLI path.
|
|
629
|
+
Fail closed with `OAT_GATE_REFUSAL` if `OAT_GATE_CLI_PATH` is absent or not
|
|
630
|
+
executable. Run the route command and validate its JSON before using it:
|
|
631
|
+
|
|
632
|
+
```bash
|
|
633
|
+
ROUTE_JSON="$("$OAT_GATE_CLI_PATH" gate route --json \
|
|
634
|
+
--expect-runtime "$OAT_GATE_RUNTIME" \
|
|
635
|
+
--expect-model "$OAT_INVOCATION_MODEL" \
|
|
636
|
+
--can-await true)"
|
|
637
|
+
|
|
638
|
+
OAT_GATE_ROUTE_JSON="$ROUTE_JSON" node -e '
|
|
639
|
+
const value = JSON.parse(process.env.OAT_GATE_ROUTE_JSON);
|
|
640
|
+
if (!["inline", "delegate-sync", "refuse"].includes(value.route) ||
|
|
641
|
+
typeof value.reason !== "string") process.exit(1);
|
|
642
|
+
if (value.cliRoot !== process.env.OAT_GATE_CLI_ROOT) process.exit(1);
|
|
643
|
+
process.stdout.write(JSON.stringify(value));
|
|
644
|
+
'
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
Pass `--can-await false` when this host cannot synchronously await delegated
|
|
648
|
+
review completion. An absent command, command failure, help/non-JSON output,
|
|
649
|
+
invalid envelope, or `cliRoot` different from `OAT_GATE_CLI_ROOT` is a
|
|
650
|
+
structured refusal; never retry with bare `oat` or another installed CLI. Do
|
|
651
|
+
not make a separate runtime/model identity judgment in skill prose; follow the
|
|
652
|
+
validated helper route:
|
|
653
|
+
|
|
654
|
+
In the terminal headless response, report
|
|
655
|
+
`Gate route: <route> (runtime=<expected-runtime>, cliRoot=<validated-cliRoot>)`
|
|
656
|
+
so the parent can retain branch-local route evidence.
|
|
657
|
+
|
|
658
|
+
- `inline`: execute the complete `oat-reviewer` role contract in the current
|
|
659
|
+
context, write the artifact, and finish bookkeeping before returning.
|
|
660
|
+
- `delegate-sync`: dispatch through an awaited handle, then verify the expected
|
|
661
|
+
artifact exists and carries the matching `oat_gate_run_id` before returning.
|
|
662
|
+
A terminal `BLOCKED`, interruption, timeout, or missing/mismatched artifact
|
|
663
|
+
remains terminal and must not trigger a second launch.
|
|
664
|
+
- `refuse`: print `OAT_GATE_REFUSAL: <reason from route output>` on its own
|
|
665
|
+
line. Exit nonzero where the host permits; the gate classifies this line
|
|
666
|
+
independently of exit code.
|
|
667
|
+
|
|
668
|
+
Headless gate mode overrides the Tier 1 background-dispatch preference:
|
|
669
|
+
NEVER use fire-and-forget background dispatch in this mode. The review and its
|
|
670
|
+
artifact/bookkeeping completion must be inline or synchronously awaited before
|
|
671
|
+
the gate child exits.
|
|
672
|
+
|
|
612
673
|
**Step 6a: Probe Subagent Availability**
|
|
613
674
|
|
|
614
675
|
Before selecting a tier, announce the probe and its result so the user can see what's happening:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AAezC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AAezC,OAAO,EAML,KAAK,SAAS,EACd,KAAK,cAAc,EAGnB,KAAK,UAAU,EAehB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,mCAAmC,EACnC,0BAA0B,EAC3B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuFpC,UAAU,yBAAyB;IACjC,mBAAmB,EAAE,CACnB,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAC/C,cAAc,CAAC;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,cAAc,KACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/D,eAAe,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,sBAAsB,EAAE,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,iBAAiB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzE,kBAAkB,EAAE,CAClB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC7C,mCAAmC,EAAE,OAAO,mCAAmC,CAAC;IAChF,0BAA0B,EAAE,OAAO,0BAA0B,CAAC;IAC9D,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAg+DD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CAsKT"}
|
|
@@ -7,7 +7,7 @@ import { readGlobalOptions } from '../shared/shared.utils.js';
|
|
|
7
7
|
import { compileDispatchCeilingPreset } from '../../config/dispatch-ceiling-preset.js';
|
|
8
8
|
import { normalizeDispatchMatrix, validateDispatchRouteTarget, walkDispatchMatrix, } from '../../config/dispatch-matrix.js';
|
|
9
9
|
import { dispatchPolicyModeDescription, dispatchPolicyPolicyDescription, managedDispatchPolicyValueList, } from '../../config/dispatch-policy-options.js';
|
|
10
|
-
import { VALID_DISPATCH_POLICY_MODES, VALID_MANAGED_DISPATCH_POLICIES, normalizeWorkflowPostImplementSequence, readOatConfig, readOatLocalConfig, readUserConfig, writeOatConfig, writeOatLocalConfig, writeUserConfig, } from '../../config/oat-config.js';
|
|
10
|
+
import { VALID_DISPATCH_POLICY_MODES, VALID_MANAGED_DISPATCH_POLICIES, MAX_GATE_TIMEOUT_MS, MIN_GATE_TIMEOUT_MS, isValidGateTimeoutMs, normalizeWorkflowPostImplementSequence, readOatConfig, readOatLocalConfig, readUserConfig, writeOatConfig, writeOatLocalConfig, writeUserConfig, } from '../../config/oat-config.js';
|
|
11
11
|
import { resolveEffectiveConfig, } from '../../config/resolve.js';
|
|
12
12
|
import { resolveAssetsRoot } from '../../fs/assets.js';
|
|
13
13
|
import { resolveProjectRoot } from '../../fs/paths.js';
|
|
@@ -63,6 +63,8 @@ const KEY_ORDER = [
|
|
|
63
63
|
'workflow.dispatchCeiling.preset',
|
|
64
64
|
'workflow.dispatchCeiling.providers.codex',
|
|
65
65
|
'workflow.dispatchCeiling.providers.claude',
|
|
66
|
+
'workflow.gateTimeouts.code',
|
|
67
|
+
'workflow.gateTimeouts.artifact',
|
|
66
68
|
'worktrees.root',
|
|
67
69
|
];
|
|
68
70
|
const CONFIG_CATALOG = [
|
|
@@ -583,6 +585,8 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
583
585
|
};
|
|
584
586
|
function isConfigKey(value) {
|
|
585
587
|
return (KEY_ORDER.includes(value) ||
|
|
588
|
+
value === 'workflow.dispatchCeiling' ||
|
|
589
|
+
value === 'workflow.dispatchCeiling.providers' ||
|
|
586
590
|
isDispatchCeilingProviderKey(value));
|
|
587
591
|
}
|
|
588
592
|
function isDispatchCeilingProviderKey(value) {
|
|
@@ -758,6 +762,14 @@ function parseWorkflowValue(key, rawValue) {
|
|
|
758
762
|
return sequence;
|
|
759
763
|
}
|
|
760
764
|
}
|
|
765
|
+
if (key === 'workflow.gateTimeouts.code' ||
|
|
766
|
+
key === 'workflow.gateTimeouts.artifact') {
|
|
767
|
+
const value = Number(rawValue);
|
|
768
|
+
if (!isValidGateTimeoutMs(value)) {
|
|
769
|
+
throw new Error(`Invalid value for ${key}: expected an integer between ${MIN_GATE_TIMEOUT_MS} and ${MAX_GATE_TIMEOUT_MS}`);
|
|
770
|
+
}
|
|
771
|
+
return value;
|
|
772
|
+
}
|
|
761
773
|
const allowed = WORKFLOW_ENUM_VALUES[key];
|
|
762
774
|
if (allowed) {
|
|
763
775
|
const normalized = rawValue.trim();
|
|
@@ -875,6 +887,16 @@ function applyWorkflowValue(workflow, key, value) {
|
|
|
875
887
|
postImplementSequence: value,
|
|
876
888
|
};
|
|
877
889
|
}
|
|
890
|
+
if (subKey.startsWith('gateTimeouts.')) {
|
|
891
|
+
const timeoutKey = subKey.slice('gateTimeouts.'.length);
|
|
892
|
+
return {
|
|
893
|
+
...workflow,
|
|
894
|
+
gateTimeouts: {
|
|
895
|
+
...workflow.gateTimeouts,
|
|
896
|
+
[timeoutKey]: value,
|
|
897
|
+
},
|
|
898
|
+
};
|
|
899
|
+
}
|
|
878
900
|
if (subKey === 'dispatchPolicy.mode') {
|
|
879
901
|
const mode = value;
|
|
880
902
|
if (mode === 'inherit') {
|
|
@@ -991,6 +1013,10 @@ async function getConfigValue(repoRoot, userConfigDir, key, dependencies, preser
|
|
|
991
1013
|
const resolved = await dependencies.resolveEffectiveConfig(repoRoot, userConfigDir, dependencies.processEnv);
|
|
992
1014
|
const entry = resolved.resolved[key];
|
|
993
1015
|
if (!entry) {
|
|
1016
|
+
const aggregate = buildResolvedConfigAggregate(resolved, key);
|
|
1017
|
+
if (aggregate) {
|
|
1018
|
+
return { key, ...aggregate };
|
|
1019
|
+
}
|
|
994
1020
|
return { key, value: null, source: 'default' };
|
|
995
1021
|
}
|
|
996
1022
|
return {
|
|
@@ -1001,6 +1027,44 @@ async function getConfigValue(repoRoot, userConfigDir, key, dependencies, preser
|
|
|
1001
1027
|
source: entry.source,
|
|
1002
1028
|
};
|
|
1003
1029
|
}
|
|
1030
|
+
function buildResolvedConfigAggregate(resolved, key) {
|
|
1031
|
+
const prefix = `${key}.`;
|
|
1032
|
+
const entries = Object.entries(resolved.resolved).filter(([entryKey]) => entryKey.startsWith(prefix));
|
|
1033
|
+
if (entries.length === 0) {
|
|
1034
|
+
return null;
|
|
1035
|
+
}
|
|
1036
|
+
const value = {};
|
|
1037
|
+
let source = 'default';
|
|
1038
|
+
const sourceRank = {
|
|
1039
|
+
default: 0,
|
|
1040
|
+
user: 1,
|
|
1041
|
+
shared: 2,
|
|
1042
|
+
local: 3,
|
|
1043
|
+
env: 4,
|
|
1044
|
+
};
|
|
1045
|
+
for (const [entryKey, entry] of entries) {
|
|
1046
|
+
if (sourceRank[entry.source] > sourceRank[source]) {
|
|
1047
|
+
source = entry.source;
|
|
1048
|
+
}
|
|
1049
|
+
const parts = entryKey.slice(prefix.length).split('.');
|
|
1050
|
+
let cursor = value;
|
|
1051
|
+
for (const [index, part] of parts.entries()) {
|
|
1052
|
+
if (index === parts.length - 1) {
|
|
1053
|
+
cursor[part] = entry.value;
|
|
1054
|
+
}
|
|
1055
|
+
else {
|
|
1056
|
+
const nested = cursor[part];
|
|
1057
|
+
if (typeof nested !== 'object' ||
|
|
1058
|
+
nested === null ||
|
|
1059
|
+
Array.isArray(nested)) {
|
|
1060
|
+
cursor[part] = {};
|
|
1061
|
+
}
|
|
1062
|
+
cursor = cursor[part];
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
return { value, source };
|
|
1067
|
+
}
|
|
1004
1068
|
async function listConfigKeys(repoRoot, userConfigDir, dependencies) {
|
|
1005
1069
|
const resolved = await dependencies.resolveEffectiveConfig(repoRoot, userConfigDir, dependencies.processEnv);
|
|
1006
1070
|
const staticKeys = new Set(KEY_ORDER);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-runtime.d.mts","sourceRoot":"","sources":["../../../../src/commands/gate/__fixtures__/fake-runtime.mjs"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { writeSync } from 'node:fs';
|
|
4
|
+
import { appendFile, mkdir, writeFile } from 'node:fs/promises';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
const prompt = process.argv.at(-1) ?? '';
|
|
7
|
+
const delayMs = Number(process.env.FAKE_GATE_DELAY_MS ?? '0');
|
|
8
|
+
const exitCode = Number(process.env.FAKE_GATE_EXIT_CODE ?? '0');
|
|
9
|
+
const artifactMode = process.env.FAKE_GATE_ARTIFACT ?? 'none';
|
|
10
|
+
const transcriptIntervalMs = Number(process.env.FAKE_GATE_TRANSCRIPT_INTERVAL_MS ?? '0');
|
|
11
|
+
function promptValue(key) {
|
|
12
|
+
return prompt.match(new RegExp(`^${key}: (.+)$`, 'm'))?.[1] ?? 'unknown';
|
|
13
|
+
}
|
|
14
|
+
function projectPath() {
|
|
15
|
+
return (prompt.match(/^Resolved OAT project path: (.+)\. Run the review/m)?.[1] ??
|
|
16
|
+
'.oat/projects/shared/demo');
|
|
17
|
+
}
|
|
18
|
+
async function writeTranscript() {
|
|
19
|
+
const encodedCwd = process.cwd().split(/[/.]/u).filter(Boolean).join('-');
|
|
20
|
+
const transcriptRoot = process.env.FAKE_GATE_TRANSCRIPT_DIR ??
|
|
21
|
+
join(process.env.HOME ?? '', '.cursor', 'projects', encodedCwd, 'agent-transcripts');
|
|
22
|
+
const transcript = join(transcriptRoot, 'fake-session', 'fake-session.jsonl');
|
|
23
|
+
await mkdir(join(transcript, '..'), { recursive: true });
|
|
24
|
+
await appendFile(transcript, `${Date.now()}\n`);
|
|
25
|
+
}
|
|
26
|
+
async function writeArtifact() {
|
|
27
|
+
const runId = artifactMode === 'wrong-run'
|
|
28
|
+
? 'wrong-run-id'
|
|
29
|
+
: promptValue('oat_gate_run_id');
|
|
30
|
+
const project = projectPath();
|
|
31
|
+
const reviewsDir = join(process.cwd(), project, 'reviews');
|
|
32
|
+
await mkdir(reviewsDir, { recursive: true });
|
|
33
|
+
await writeFile(join(reviewsDir, `fake-review-${Date.now()}.md`), [
|
|
34
|
+
'---',
|
|
35
|
+
'oat_generated: true',
|
|
36
|
+
`oat_generated_at: ${new Date().toISOString()}`,
|
|
37
|
+
`oat_review_type: ${prompt.match(/^Review type: (.+)\.$/m)?.[1] ?? 'code'}`,
|
|
38
|
+
`oat_review_scope: ${prompt.match(/^Review scope: (.+)\.$/m)?.[1] ?? 'final'}`,
|
|
39
|
+
'oat_review_invocation: gate',
|
|
40
|
+
`oat_project: ${project}`,
|
|
41
|
+
`oat_gate_run_id: ${runId}`,
|
|
42
|
+
`oat_gate_target: ${promptValue('oat_gate_target')}`,
|
|
43
|
+
`oat_gate_runtime: ${promptValue('oat_gate_runtime')}`,
|
|
44
|
+
`oat_invocation_model: ${promptValue('oat_invocation_model')}`,
|
|
45
|
+
`oat_invocation_reasoning_effort: ${promptValue('oat_invocation_reasoning_effort')}`,
|
|
46
|
+
`oat_invocation_source: ${promptValue('oat_invocation_source')}`,
|
|
47
|
+
'oat_review_critical_count: 0',
|
|
48
|
+
'oat_review_important_count: 0',
|
|
49
|
+
'oat_review_medium_count: 0',
|
|
50
|
+
'oat_review_minor_count: 0',
|
|
51
|
+
'---',
|
|
52
|
+
'',
|
|
53
|
+
'# Fake runtime review',
|
|
54
|
+
'',
|
|
55
|
+
'## Findings',
|
|
56
|
+
'',
|
|
57
|
+
'### Critical',
|
|
58
|
+
'',
|
|
59
|
+
'None',
|
|
60
|
+
'',
|
|
61
|
+
'### Important',
|
|
62
|
+
'',
|
|
63
|
+
'None',
|
|
64
|
+
'',
|
|
65
|
+
'### Medium',
|
|
66
|
+
'',
|
|
67
|
+
'None',
|
|
68
|
+
'',
|
|
69
|
+
'### Minor',
|
|
70
|
+
'',
|
|
71
|
+
'None',
|
|
72
|
+
'',
|
|
73
|
+
].join('\n'));
|
|
74
|
+
}
|
|
75
|
+
if (process.env.FAKE_GATE_REQUIRE_HEADLESS === '1') {
|
|
76
|
+
if (process.env.OAT_GATE_HEADLESS !== '1' ||
|
|
77
|
+
process.env.OAT_NON_INTERACTIVE !== '1' ||
|
|
78
|
+
!process.env.OAT_GATE_RUN_ID) {
|
|
79
|
+
process.stdout.write('OAT_GATE_REFUSAL: fake runtime did not receive headless context\n');
|
|
80
|
+
process.exit(9);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (process.env.FAKE_GATE_WRITE_ROUTE_RECEIPT_RUNTIME &&
|
|
84
|
+
!process.env.FAKE_GATE_REQUIRE_ROUTE_RUNTIME) {
|
|
85
|
+
await writeFile(process.env.OAT_GATE_ROUTE_RECEIPT_PATH, JSON.stringify({
|
|
86
|
+
route: 'inline',
|
|
87
|
+
reason: 'deterministic fake route receipt',
|
|
88
|
+
cliRoot: process.env.OAT_GATE_CLI_ROOT,
|
|
89
|
+
runtime: process.env.FAKE_GATE_WRITE_ROUTE_RECEIPT_RUNTIME,
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
if (process.env.FAKE_GATE_REQUIRE_ROUTE_RUNTIME) {
|
|
93
|
+
const cliPath = process.env.OAT_GATE_CLI_PATH;
|
|
94
|
+
const cliRoot = process.env.OAT_GATE_CLI_ROOT;
|
|
95
|
+
const configuredRuntime = process.env.FAKE_GATE_REQUIRE_ROUTE_RUNTIME;
|
|
96
|
+
const runtime = process.env.OAT_GATE_RUNTIME;
|
|
97
|
+
const model = process.env.OAT_INVOCATION_MODEL;
|
|
98
|
+
const promptRuntime = promptValue('oat_gate_runtime');
|
|
99
|
+
const promptModel = promptValue('oat_invocation_model');
|
|
100
|
+
if (!runtime ||
|
|
101
|
+
!model ||
|
|
102
|
+
runtime !== configuredRuntime ||
|
|
103
|
+
runtime !== promptRuntime ||
|
|
104
|
+
model !== promptModel) {
|
|
105
|
+
writeSync(1, `FAKE_GATE_ROUTE_INPUT_ERROR:${String(runtime)}:${String(model)}:${configuredRuntime}:${promptRuntime}:${promptModel}\n`);
|
|
106
|
+
process.stdout.write('OAT_GATE_REFUSAL: canonical gate route inputs were absent or inconsistent\n');
|
|
107
|
+
process.exit(10);
|
|
108
|
+
}
|
|
109
|
+
const marker = runtime === 'claude'
|
|
110
|
+
? { CLAUDECODE: '1' }
|
|
111
|
+
: runtime === 'cursor'
|
|
112
|
+
? { CURSOR_AGENT: '1' }
|
|
113
|
+
: { CODEX_SESSION_ID: 'fake-session' };
|
|
114
|
+
const result = cliPath
|
|
115
|
+
? spawnSync(cliPath, [
|
|
116
|
+
'gate',
|
|
117
|
+
'route',
|
|
118
|
+
'--json',
|
|
119
|
+
'--expect-runtime',
|
|
120
|
+
runtime,
|
|
121
|
+
'--expect-model',
|
|
122
|
+
model,
|
|
123
|
+
'--can-await',
|
|
124
|
+
'false',
|
|
125
|
+
], {
|
|
126
|
+
encoding: 'utf8',
|
|
127
|
+
env: { ...process.env, ...marker },
|
|
128
|
+
})
|
|
129
|
+
: undefined;
|
|
130
|
+
let route;
|
|
131
|
+
try {
|
|
132
|
+
route = result?.status === 0 ? JSON.parse(result.stdout) : undefined;
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
route = undefined;
|
|
136
|
+
}
|
|
137
|
+
if (route?.route !== 'inline' ||
|
|
138
|
+
route?.cliRoot !== cliRoot ||
|
|
139
|
+
typeof route?.reason !== 'string') {
|
|
140
|
+
writeSync(1, `FAKE_GATE_ROUTE_ERROR:${result?.status ?? 'absent'}:${JSON.stringify(result?.stdout ?? '')}:${JSON.stringify(result?.stderr ?? '')}:${String(route?.cliRoot)}:${String(cliRoot)}\n`);
|
|
141
|
+
process.stdout.write('OAT_GATE_REFUSAL: branch-local gate route was unavailable or invalid\n');
|
|
142
|
+
process.exit(10);
|
|
143
|
+
}
|
|
144
|
+
if (process.env.FAKE_GATE_REPORT_ROUTE === '1') {
|
|
145
|
+
process.stdout.write(`FAKE_GATE_ROUTE:${route.route}:${runtime}:${model}:${route.cliRoot}\n`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (process.env.FAKE_GATE_STDOUT) {
|
|
149
|
+
process.stdout.write(`${process.env.FAKE_GATE_STDOUT}\n`);
|
|
150
|
+
}
|
|
151
|
+
if (process.env.FAKE_GATE_REFUSAL) {
|
|
152
|
+
process.stdout.write(`OAT_GATE_REFUSAL: ${process.env.FAKE_GATE_REFUSAL}\n`);
|
|
153
|
+
}
|
|
154
|
+
let transcriptTimer;
|
|
155
|
+
if (transcriptIntervalMs > 0) {
|
|
156
|
+
await writeTranscript();
|
|
157
|
+
transcriptTimer = setInterval(() => {
|
|
158
|
+
void writeTranscript();
|
|
159
|
+
}, transcriptIntervalMs);
|
|
160
|
+
}
|
|
161
|
+
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
162
|
+
if (transcriptTimer)
|
|
163
|
+
clearInterval(transcriptTimer);
|
|
164
|
+
if (artifactMode === 'correlated' || artifactMode === 'wrong-run') {
|
|
165
|
+
await writeArtifact();
|
|
166
|
+
}
|
|
167
|
+
process.exit(exitCode);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface GateActivityEvidence {
|
|
2
|
+
source: 'transcript-dir';
|
|
3
|
+
runtime: string;
|
|
4
|
+
scope: 'project-dir' | 'ambient-runtime';
|
|
5
|
+
observedPath: string;
|
|
6
|
+
lastChangeAt: number | null;
|
|
7
|
+
totalSizeBytes: number | null;
|
|
8
|
+
changedSinceBaseline: boolean;
|
|
9
|
+
observedAt: number;
|
|
10
|
+
}
|
|
11
|
+
export interface GateActivityProbeStatus {
|
|
12
|
+
status: 'available' | 'path-absent' | 'error';
|
|
13
|
+
runtime: string;
|
|
14
|
+
scope: 'project-dir' | 'ambient-runtime';
|
|
15
|
+
attemptedPath: string;
|
|
16
|
+
observedAt: number;
|
|
17
|
+
evidence?: GateActivityEvidence;
|
|
18
|
+
}
|
|
19
|
+
export interface GateActivityProbe {
|
|
20
|
+
runtime: 'claude' | 'codex' | 'cursor';
|
|
21
|
+
probe(observedAt?: number): Promise<GateActivityEvidence | null>;
|
|
22
|
+
observe(observedAt?: number): Promise<GateActivityProbeStatus>;
|
|
23
|
+
}
|
|
24
|
+
export interface GateActivityProbeContext {
|
|
25
|
+
runtime: string;
|
|
26
|
+
cwd: string;
|
|
27
|
+
home: string;
|
|
28
|
+
spawnedAt: number;
|
|
29
|
+
realCwd?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function encodeClaudeProjectPath(cwd: string): string;
|
|
32
|
+
export declare function encodeCursorProjectPath(cwd: string): string;
|
|
33
|
+
export declare function resolveGateActivityPaths(context: GateActivityProbeContext, observedAt?: number): string[];
|
|
34
|
+
export declare function createGateActivityProbe(context: GateActivityProbeContext): Promise<GateActivityProbe | null>;
|
|
35
|
+
//# sourceMappingURL=activity-probes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-probes.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/activity-probes.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,aAAa,GAAG,iBAAiB,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,WAAW,GAAG,aAAa,GAAG,OAAO,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,aAAa,GAAG,iBAAiB,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAOD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACvC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IACjE,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAChE;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3D;AAWD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,wBAAwB,EACjC,UAAU,SAAoB,GAC7B,MAAM,EAAE,CA6BV;AA+DD,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAyDnC"}
|