@ai-dev-methodologies/rlp-desk 0.14.5 → 0.14.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-dev-methodologies/rlp-desk",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.6",
|
|
4
4
|
"description": "Fresh-context iterative loops for Claude Code — autonomous task completion with independent verification",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "node scripts/postinstall.js",
|
package/src/commands/rlp-desk.md
CHANGED
|
@@ -89,6 +89,14 @@ Ask about these items one by one (or in small groups):
|
|
|
89
89
|
- **gpt-5.5:medium** — default recommendation (full context window, progressive upgrade handles harder US)
|
|
90
90
|
- **spark:high** — only when US is small enough for spark's 100k context (single-file, AC count <= 4, simple logic). Do NOT use as primary recommendation — spark context window is too small for most tasks
|
|
91
91
|
|
|
92
|
+
**Context window behavior (claude models — v0.14.6+)**:
|
|
93
|
+
- All claude models default to **200K**. `sonnet` and `opus` aliases both run at the standard window.
|
|
94
|
+
- To request 1M, append the explicit `[1m]` suffix on the full model id:
|
|
95
|
+
- `claude-opus-4-7[1m]` — 1M attempted via `ANTHROPIC_BETA=context-1m-2025-08-07`. Works on most Claude Max accounts.
|
|
96
|
+
- `claude-sonnet-4-6[1m]` — 1M attempted, **but** requires the Anthropic "Extra usage" toggle at https://claude.ai/settings/usage. Without that toggle the worker fails at the first API call with `Extra usage is required for 1M context`.
|
|
97
|
+
- rlp-desk does NOT pre-check entitlement — the explicit `[1m]` is honored as-is. If the API rejects it, you will see the error immediately and can re-run with the standard alias or the opus 1M form.
|
|
98
|
+
- **Default recommendation when 1M is genuinely needed:** prefer `claude-opus-4-7[1m]` over `claude-sonnet-4-6[1m]` because opus 1M does not require a separate entitlement toggle.
|
|
99
|
+
|
|
92
100
|
Present complexity score with evidence to the user, e.g.: "I rate this MEDIUM because: US count=4 (MEDIUM), file scope=2 (MEDIUM), logic=conditionals (MEDIUM), deps=none (LOW), impact=modify (MEDIUM). Highest=MEDIUM."
|
|
93
101
|
|
|
94
102
|
**If codex IS installed** — say: "Codex is installed. I recommend cross-engine Worker for cost savings (Pro token pool separation) and cross-engine blind-spot coverage (claude Verifier catches issues codex Worker misses)."
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shellQuote } from '../util/shell-quote.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { ONE_MILLION_BETA, wantsOneMillionContext } from '../constants.mjs';
|
|
3
3
|
|
|
4
4
|
const CLAUDE_BIN = 'claude';
|
|
5
5
|
const CODEX_BIN = 'codex';
|
|
@@ -32,12 +32,14 @@ function assertTuiMode(mode, builderName) {
|
|
|
32
32
|
export function buildClaudeCmd(mode, model, options = {}) {
|
|
33
33
|
assertTuiMode(mode, 'buildClaudeCmd');
|
|
34
34
|
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
35
|
+
// v0.14.6: 1M context is opt-in only via the explicit '[1m]' suffix.
|
|
36
|
+
// opus / sonnet / claude-opus-4-7 (no suffix) all run at the standard
|
|
37
|
+
// 200K context. Adding '[1m]' on either opus or sonnet model id injects
|
|
38
|
+
// the ANTHROPIC_BETA header and attempts the 1M window — sonnet[1m] still
|
|
39
|
+
// requires Anthropic "Extra usage" entitlement at the API layer.
|
|
38
40
|
const parts = ['DISABLE_OMC=1'];
|
|
39
|
-
if (
|
|
40
|
-
parts.push(`ANTHROPIC_BETA=${shellQuote(
|
|
41
|
+
if (wantsOneMillionContext(model)) {
|
|
42
|
+
parts.push(`ANTHROPIC_BETA=${shellQuote(ONE_MILLION_BETA)}`);
|
|
41
43
|
}
|
|
42
44
|
parts.push(
|
|
43
45
|
CLAUDE_BIN,
|
package/src/node/constants.mjs
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
// Shared runtime constants. Single-source for cross-module values.
|
|
2
2
|
|
|
3
|
-
// Anthropic Claude API beta header
|
|
4
|
-
//
|
|
5
|
-
//
|
|
3
|
+
// Anthropic Claude API beta header for the 1M-token context window. Injected
|
|
4
|
+
// only when the user explicitly opts in via the '[1m]' suffix on the model
|
|
5
|
+
// id — see wantsOneMillionContext() below.
|
|
6
6
|
//
|
|
7
7
|
// Docs: https://docs.anthropic.com/en/docs/build-with-claude/context-windows
|
|
8
8
|
// (search "1M context") — header rotates with each beta phase.
|
|
9
|
-
export const
|
|
9
|
+
export const ONE_MILLION_BETA = 'context-1m-2025-08-07';
|
|
10
10
|
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
|
|
11
|
+
// v0.14.6: 1M context is opt-in only via the explicit '[1m]' suffix on the
|
|
12
|
+
// model id. Previously rlp-desk auto-injected ANTHROPIC_BETA for any opus
|
|
13
|
+
// model; in practice that produced surprising results (opus alias still
|
|
14
|
+
// reported a 200K window in real CLI calls, and sonnet[1m] requires a
|
|
15
|
+
// separate "Extra usage" entitlement). New rule: user is the source of
|
|
16
|
+
// truth. Type the suffix to opt in; otherwise both opus and sonnet run at
|
|
17
|
+
// the standard 200K context.
|
|
18
|
+
export function wantsOneMillionContext(model) {
|
|
16
19
|
if (!model) return false;
|
|
17
|
-
|
|
18
|
-
return m === 'opus' || m.startsWith('claude-opus-');
|
|
20
|
+
return String(model).toLowerCase().endsWith('[1m]');
|
|
19
21
|
}
|
|
@@ -7,7 +7,7 @@ import { promisify } from 'node:util';
|
|
|
7
7
|
|
|
8
8
|
import { buildClaudeCmd, buildCodexCmd, parseModelFlag } from '../cli/command-builder.mjs';
|
|
9
9
|
import { shellQuote } from '../util/shell-quote.mjs';
|
|
10
|
-
import {
|
|
10
|
+
import { ONE_MILLION_BETA, wantsOneMillionContext } from '../constants.mjs';
|
|
11
11
|
import { initCampaign } from '../init/campaign-initializer.mjs';
|
|
12
12
|
import { LEGACY_DESK_REL, resolveDeskRoot } from '../util/desk-root.mjs';
|
|
13
13
|
import { writeSentinelExclusive } from '../shared/fs.mjs';
|
|
@@ -933,9 +933,11 @@ async function runFinalSequentialVerify({
|
|
|
933
933
|
const HOME_DESK_DIR = path.join(os.homedir(), '.claude', 'ralph-desk');
|
|
934
934
|
|
|
935
935
|
function buildAutonomousClaudeCmd({ promptFile, model, rootDir, homeDeskDir = HOME_DESK_DIR }) {
|
|
936
|
-
//
|
|
937
|
-
|
|
938
|
-
|
|
936
|
+
// v0.14.6: ANTHROPIC_BETA prefix injected only when the model id ends
|
|
937
|
+
// with explicit '[1m]' suffix. opus / sonnet / claude-opus-4-7 (no
|
|
938
|
+
// suffix) all run at the standard 200K context.
|
|
939
|
+
const betaPrefix = wantsOneMillionContext(model)
|
|
940
|
+
? `ANTHROPIC_BETA=${shellQuote(ONE_MILLION_BETA)} `
|
|
939
941
|
: '';
|
|
940
942
|
// §4.11.a: --add-dir whitelist (home rlp-desk + campaign cwd) for true autonomy.
|
|
941
943
|
const addDirParts = [];
|
|
@@ -46,17 +46,19 @@ build_claude_cmd() {
|
|
|
46
46
|
# Defends against bracketed model ids like 'claude-opus-4-7[1m]' (zsh char-class glob),
|
|
47
47
|
# spaces, embedded quotes, etc. Plain "$model" would let zsh expand brackets as glob.
|
|
48
48
|
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
|
|
49
|
+
# v0.14.6: ANTHROPIC_BETA injected only when the model id ends with the
|
|
50
|
+
# explicit '[1m]' suffix. opus / sonnet / claude-opus-4-7 (no suffix) all
|
|
51
|
+
# run at the standard 200K context. Mirror of src/node/constants.mjs
|
|
52
|
+
# ONE_MILLION_BETA + wantsOneMillionContext(). Update both on rotation.
|
|
53
|
+
local _onem_beta=""
|
|
52
54
|
case "$model" in
|
|
53
|
-
|
|
55
|
+
*\[1m\]) _onem_beta="ANTHROPIC_BETA='context-1m-2025-08-07' " ;;
|
|
54
56
|
esac
|
|
55
57
|
# v5.7 §4.11.a: --add-dir whitelist for autonomous mode. ROOT (campaign cwd)
|
|
56
58
|
# plus home rlp-desk tree authorized for read/write without TUI prompts.
|
|
57
59
|
local _home_desk="$HOME/.claude/ralph-desk"
|
|
58
60
|
local _add_dirs="--add-dir ${(qq)_home_desk} --add-dir ${(qq)ROOT}"
|
|
59
|
-
local base="DISABLE_OMC=1 ${
|
|
61
|
+
local base="DISABLE_OMC=1 ${_onem_beta}$CLAUDE_BIN --model ${(qq)model} --mcp-config '{\"mcpServers\":{}}' --strict-mcp-config --dangerously-skip-permissions ${_add_dirs}"
|
|
60
62
|
if [[ -n "$effort" ]]; then
|
|
61
63
|
base="$base --effort $effort"
|
|
62
64
|
fi
|