claude-dev-env 2.22.0 → 2.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/team-advisor/SKILL.md +2 -0
- package/_shared/advisor/advisor-protocol.md +1 -0
- package/_shared/advisor/reference/sol-rung.md +2 -2
- package/_shared/advisor/reference/third-party-bind.md +12 -0
- package/_shared/advisor/scripts/codex_sol_advisor.py +16 -4
- package/_shared/advisor/scripts/config/advisor_scripts_constants/sol_advisor_constants.py +4 -0
- package/_shared/advisor/scripts/tests/test_codex_sol_advisor.py +4 -5
- package/package.json +1 -1
|
@@ -30,6 +30,8 @@ One warm advisor at the strongest tier this session can reach. This session is t
|
|
|
30
30
|
5. Skip the multi-consumer "who you are" opener — sole consumer.
|
|
31
31
|
6. When the bind or reply path fails, fail closed and report to the user. On a third-party host, only the bound Claude advisor issues ENDORSE / CORRECTION / PLAN / STOP.
|
|
32
32
|
|
|
33
|
+
**GOTCHA (Cursor / ThirdParty + Sol):** when the walk reaches Sol or the user asks for Sol, first tool call is `python ~/.claude/_shared/advisor/scripts/codex_sol_advisor.py --bind --enable-sol --cwd <repo-root>` with the charter on stdin — not Agent/Task, not a probe-path search. Details: [`third-party-bind.md`](../../_shared/advisor/reference/third-party-bind.md) GOTCHA and [`sol-rung.md`](../../_shared/advisor/reference/sol-rung.md).
|
|
34
|
+
|
|
33
35
|
Full walk, charter, consult packet, Sol routing, and drift re-bind live in the protocol read map and its authoritative `reference/` leaves.
|
|
34
36
|
|
|
35
37
|
## Consult
|
|
@@ -76,6 +76,7 @@ Assemble and paste each executor's Advisor block per the **Advisor block** secti
|
|
|
76
76
|
On a third-party (non-Claude, non-Codex) harness, the shared CLI Claude-chain is the one path to a Claude advisor: bind Fable through it, per [`reference/third-party-bind.md`](reference/third-party-bind.md).
|
|
77
77
|
The bound Claude session is the advisor; this third-party session stays the executor.
|
|
78
78
|
Walk `candidate_tiers = ["Fable"]`. When Fable is out of usage, the sol rung binds after Fable (`candidate_tiers = ["Fable", "Sol"]`).
|
|
79
|
+
**Cursor Sol first shot:** when the walk reaches Sol (or the user asks for Sol), bind through `codex_sol_advisor.py --bind --enable-sol` on the first tool call (see the GOTCHA in [`reference/third-party-bind.md`](reference/third-party-bind.md)) — not the Agent tool, and not a probe-path hunt.
|
|
79
80
|
**Fail closed:** when every candidate fails, set `selected_tier = null` and a `fallback_reason`, report that the advisor is unreachable, and **stop** — ENDORSE / CORRECTION / PLAN / STOP come only from a bound advisor.
|
|
80
81
|
Executors report to the orchestrating session; that session consults the bound advisor and relays the four-signal reply.
|
|
81
82
|
|
|
@@ -24,9 +24,9 @@ Flag on: run the Codex preflight first —
|
|
|
24
24
|
python ~/.claude/_shared/pr-loop/scripts/codex_usage_probe.py
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Repo home: `packages/claude-dev-env/_shared/pr-loop/scripts/`.
|
|
27
|
+
**GOTCHA — probe path:** that installed path is the only one. `codex_sol_advisor.resolve_usage_probe_path` builds `~/.claude/_shared/pr-loop/scripts/codex_usage_probe.py` and stops. Do not hunt `skills/codex-review/`, Codex worktrees under `C:\dev\.codex\worktrees\`, or other copies. Repo home: `packages/claude-dev-env/_shared/pr-loop/scripts/`.
|
|
28
28
|
|
|
29
|
-
The shared entry point is `~/.claude/_shared/advisor/scripts/codex_sol_advisor.py`; it calls the installed probe and owns Sol bind or resume parsing. Bind with `python ~/.claude/_shared/advisor/scripts/codex_sol_advisor.py --bind --cwd <repo-root>` and pipe the charter on stdin. Resume with `--resume <session_id>` and pipe the delta consult on stdin.
|
|
29
|
+
The shared entry point is `~/.claude/_shared/advisor/scripts/codex_sol_advisor.py`; it calls the installed probe and owns Sol bind or resume parsing. Bind with `python ~/.claude/_shared/advisor/scripts/codex_sol_advisor.py --bind --enable-sol --cwd <repo-root>` and pipe the charter on stdin. Resume with `--resume <session_id>` and pipe the delta consult on stdin.
|
|
30
30
|
|
|
31
31
|
The gate passes only when the probe exits 0, `percent_left` is finite numeric data, and `percent_left` is strictly greater than `WEEKLY_USAGE_GATE_THRESHOLD_PERCENT` from the existing probe. The exact-threshold case fails closed when Fable did not bind.
|
|
32
32
|
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Detail behind the **Host profiles → Third-party host** section of [`advisor-protocol.md`](../advisor-protocol.md).
|
|
4
4
|
Open this when binding or re-binding the advisor from a third-party (non-Claude, non-Codex) harness.
|
|
5
5
|
|
|
6
|
+
## GOTCHA — Cursor Sol first shot
|
|
7
|
+
|
|
8
|
+
Cursor is a third-party host. When the walk reaches Sol (`ADVISOR_SOL=1` / `--enable-sol` after Fable is out of usage, or the user asks for Sol), bind Sol on the **first** tool call through the headless Codex helper. Do not use the Agent or Task tool, do not spawn Grok as a substitute, and do not search the filesystem for `codex_usage_probe.py`.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
python "$HOME/.claude/_shared/advisor/scripts/codex_sol_advisor.py" --bind --enable-sol --cwd <repo-root>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Pipe the standing-reviewer charter on stdin. Persist `session_id` from the JSON reply. Later consults: `--resume <session_id>` with the delta on stdin. Capture helper / `codex` stdout as UTF-8 on Windows (`encoding="utf-8"`, `errors="replace"`). Probe path and preflight: [`sol-rung.md`](sol-rung.md).
|
|
15
|
+
|
|
16
|
+
When the Sol flag is off, follow the Claude-chain steps below.
|
|
17
|
+
|
|
6
18
|
## Bind steps
|
|
7
19
|
|
|
8
20
|
1. Name the session identity first (protocol **Host profiles**). This path is for a ThirdParty profile.
|
|
@@ -34,6 +34,10 @@ from advisor_scripts_constants.sol_advisor_constants import ( # noqa: E402
|
|
|
34
34
|
CODEX_REASONING_CONFIG_TEMPLATE,
|
|
35
35
|
CODEX_RESUME_SUBCOMMAND,
|
|
36
36
|
CODEX_SANDBOX_FLAG,
|
|
37
|
+
USAGE_PROBE_FILENAME,
|
|
38
|
+
USAGE_PROBE_PACKAGE_DIRECTORY_NAME,
|
|
39
|
+
USAGE_PROBE_SCRIPTS_DIRECTORY_NAME,
|
|
40
|
+
USAGE_PROBE_SHARED_DIRECTORY_NAME,
|
|
37
41
|
SOL_BIND_FAILURE_REASON,
|
|
38
42
|
SOL_CODEX_TIMEOUT_REASON,
|
|
39
43
|
SOL_CODEX_TIMEOUT_SECONDS,
|
|
@@ -201,6 +205,14 @@ def resolve_advisor_effort(
|
|
|
201
205
|
def resolve_usage_probe_path(home_directory: Path) -> Path:
|
|
202
206
|
"""Return the installed Codex weekly usage probe path.
|
|
203
207
|
|
|
208
|
+
::
|
|
209
|
+
|
|
210
|
+
resolve_usage_probe_path(Path.home())
|
|
211
|
+
-> ~/.claude/_shared/pr-loop/scripts/codex_usage_probe.py
|
|
212
|
+
|
|
213
|
+
This is the only probe path the Sol helper uses. Do not search worktrees
|
|
214
|
+
or archived ``skills/codex-review`` trees for a second copy.
|
|
215
|
+
|
|
204
216
|
Args:
|
|
205
217
|
home_directory: Home directory used to construct the path.
|
|
206
218
|
|
|
@@ -210,10 +222,10 @@ def resolve_usage_probe_path(home_directory: Path) -> Path:
|
|
|
210
222
|
return (
|
|
211
223
|
home_directory
|
|
212
224
|
/ CLAUDE_CONFIG_DIRECTORY_NAME
|
|
213
|
-
/
|
|
214
|
-
/
|
|
215
|
-
/
|
|
216
|
-
/
|
|
225
|
+
/ USAGE_PROBE_SHARED_DIRECTORY_NAME
|
|
226
|
+
/ USAGE_PROBE_PACKAGE_DIRECTORY_NAME
|
|
227
|
+
/ USAGE_PROBE_SCRIPTS_DIRECTORY_NAME
|
|
228
|
+
/ USAGE_PROBE_FILENAME
|
|
217
229
|
)
|
|
218
230
|
|
|
219
231
|
|
|
@@ -14,6 +14,10 @@ CODEX_EXEC_SUBCOMMAND: str = "exec"
|
|
|
14
14
|
CODEX_RESUME_SUBCOMMAND: str = "resume"
|
|
15
15
|
CODEX_SANDBOX_FLAG: str = "--sandbox"
|
|
16
16
|
CLAUDE_CONFIG_DIRECTORY_NAME: str = ".claude"
|
|
17
|
+
USAGE_PROBE_SHARED_DIRECTORY_NAME: str = "_shared"
|
|
18
|
+
USAGE_PROBE_PACKAGE_DIRECTORY_NAME: str = "pr-loop"
|
|
19
|
+
USAGE_PROBE_SCRIPTS_DIRECTORY_NAME: str = "scripts"
|
|
20
|
+
USAGE_PROBE_FILENAME: str = "codex_usage_probe.py"
|
|
17
21
|
SOL_SESSION_ID_METAVAR: str = "SESSION_ID"
|
|
18
22
|
SOL_CODEX_TIMEOUT_SECONDS: float = 120.0
|
|
19
23
|
SOL_USAGE_PROBE_TIMEOUT_SECONDS: float = 30.0
|
|
@@ -31,9 +31,8 @@ def _load_sol_module() -> ModuleType:
|
|
|
31
31
|
sol_advisor = _load_sol_module()
|
|
32
32
|
SCRIPTS_ROOT = Path(__file__).parent.parent
|
|
33
33
|
USAGE_PROBE_PATH = (
|
|
34
|
-
SCRIPTS_ROOT.parents[
|
|
35
|
-
/ "
|
|
36
|
-
/ "codex-review"
|
|
34
|
+
SCRIPTS_ROOT.parents[1]
|
|
35
|
+
/ "pr-loop"
|
|
37
36
|
/ "scripts"
|
|
38
37
|
/ "codex_usage_probe.py"
|
|
39
38
|
)
|
|
@@ -134,8 +133,8 @@ def test_resolve_usage_probe_path_uses_supplied_home_directory(tmp_path: Path) -
|
|
|
134
133
|
assert probe_path == (
|
|
135
134
|
tmp_path
|
|
136
135
|
/ ".claude"
|
|
137
|
-
/ "
|
|
138
|
-
/ "
|
|
136
|
+
/ "_shared"
|
|
137
|
+
/ "pr-loop"
|
|
139
138
|
/ "scripts"
|
|
140
139
|
/ "codex_usage_probe.py"
|
|
141
140
|
)
|