@christang/keel 5.131.0 → 5.133.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/README.zh-CN.md +4 -1
- package/assets/bootstrap/AGENTS.md +1 -1
- package/bin/keel.js +24 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/plugins/keel/.claude-plugin/plugin.json +1 -1
- package/plugins/keel/.codex-plugin/plugin.json +1 -1
- package/scripts/validate_plugin.py +127 -17
- package/src/core/shift.js +13 -14
package/README.md
CHANGED
|
@@ -79,9 +79,13 @@ OpenSpec CLI):
|
|
|
79
79
|
```bash
|
|
80
80
|
npm install -g @christang/keel
|
|
81
81
|
keel --version
|
|
82
|
-
codex plugin add keel
|
|
82
|
+
codex plugin marketplace add TanglmChris/keel --ref main --sparse .agents/plugins --sparse plugins/keel
|
|
83
|
+
codex plugin add keel@keel-marketplace # Codex
|
|
83
84
|
```
|
|
84
85
|
|
|
86
|
+
The `--sparse` paths make Codex fetch only the plugin rather than the whole repository, which a
|
|
87
|
+
slow link may not clone within Codex's 30-second limit.
|
|
88
|
+
|
|
85
89
|
For Codex, review the current hook definitions with `/hooks` in the CLI; installation does not
|
|
86
90
|
grant hook trust. A running Codex session uses an updated plugin at its next hook call, and a
|
|
87
91
|
release that changes the hook definitions needs that review again.
|
|
@@ -238,9 +242,10 @@ session reads that restore as another session's request and stops to ask you. It
|
|
|
238
242
|
session, so it takes no scope, and it covers no other session, no clear or archive, and no repository
|
|
239
243
|
action.
|
|
240
244
|
|
|
241
|
-
`self-shift` (#319) is its outgoing counterpart: the
|
|
242
|
-
the desktop app once the note is stored — turn the session's own Remote Control off and wait,
|
|
243
|
-
the
|
|
245
|
+
`self-shift` (#319) is its outgoing counterpart: the four steps `keel shift ready --wake` prints on
|
|
246
|
+
the desktop app once the note is stored — turn the session's own Remote Control off and wait, create
|
|
247
|
+
the one-shot wake task (which unarchives the session first if needed, #326), rename the session,
|
|
248
|
+
clear it. It does not
|
|
244
249
|
decide that a shift happens; that stays with the task-boundary rule and the coordinator. It takes no
|
|
245
250
|
scope.
|
|
246
251
|
|
package/README.zh-CN.md
CHANGED
|
@@ -64,9 +64,12 @@ Anthropic 的插件目录里,Keel 以 `keel-openspec` 列出。每次发版都
|
|
|
64
64
|
```bash
|
|
65
65
|
npm install -g @christang/keel
|
|
66
66
|
keel --version
|
|
67
|
-
codex plugin add keel
|
|
67
|
+
codex plugin marketplace add TanglmChris/keel --ref main --sparse .agents/plugins --sparse plugins/keel
|
|
68
|
+
codex plugin add keel@keel-marketplace # Codex
|
|
68
69
|
```
|
|
69
70
|
|
|
71
|
+
`--sparse` 让 Codex 只拉插件本身,而不是整个仓库;网络慢时,整仓克隆可能超过 Codex 的 30 秒上限。
|
|
72
|
+
|
|
70
73
|
全局装的 `keel` 在 PATH 里排在插件那份前面,所以在 Claude Code 里 agent 会用它。要么让它和插件同版本,
|
|
71
74
|
要么卸掉(`npm rm -g @christang/keel`);两者版本不一致时,会话启动那一行会指出来。
|
|
72
75
|
|
package/bin/keel.js
CHANGED
|
@@ -1035,6 +1035,12 @@ function claudeKeel(executable) {
|
|
|
1035
1035
|
return { id: entry.id, market: entry.id.slice("keel@".length), version: entry.version || null };
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
|
+
// The Codex marketplace needs only its catalog and the plugin it names; a
|
|
1039
|
+
// sparse clone fetches those instead of the whole repository, which a slow
|
|
1040
|
+
// link cannot clone within Codex's 30 s limit (#329).
|
|
1041
|
+
const CODEX_SPARSE_PATHS = [".agents/plugins", "plugins/keel"];
|
|
1042
|
+
const CODEX_SPARSE_FLAGS = CODEX_SPARSE_PATHS.map((entry) => `--sparse ${entry}`).join(" ");
|
|
1043
|
+
|
|
1038
1044
|
function codexKeel(executable) {
|
|
1039
1045
|
const listed = hostJson(executable, ["plugin", "list", "--json"]);
|
|
1040
1046
|
const items = listed && Array.isArray(listed.installed) ? listed.installed : [];
|
|
@@ -1059,6 +1065,11 @@ function readOrNull(file) {
|
|
|
1059
1065
|
}
|
|
1060
1066
|
}
|
|
1061
1067
|
|
|
1068
|
+
function hostFails(executable, args) {
|
|
1069
|
+
const result = hostRun(executable, args);
|
|
1070
|
+
return Boolean(result.error) || result.status !== 0;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1062
1073
|
function runHostSteps(component, name, executable, steps) {
|
|
1063
1074
|
for (const args of steps) {
|
|
1064
1075
|
const result = hostRun(executable, args);
|
|
@@ -1124,11 +1135,22 @@ function updateCodexPlugin(options) {
|
|
|
1124
1135
|
"manual",
|
|
1125
1136
|
`its marketplace is a ${installed.sourceType} source (${installed.source}), which \`codex plugin `
|
|
1126
1137
|
+ "marketplace upgrade` cannot refresh; to make it upgradable, run `codex plugin marketplace "
|
|
1127
|
-
+ `remove ${market}\` and then codex plugin marketplace add TanglmChris/keel --ref main`
|
|
1138
|
+
+ `remove ${market}\` and then codex plugin marketplace add TanglmChris/keel --ref main ${CODEX_SPARSE_FLAGS}`
|
|
1128
1139
|
);
|
|
1129
1140
|
return true;
|
|
1130
1141
|
}
|
|
1131
|
-
|
|
1142
|
+
// The refresh clones over the network; one retry absorbs a dropped link (#329).
|
|
1143
|
+
if (hostFails(executable, steps[0]) && hostFails(executable, steps[0])) {
|
|
1144
|
+
const codexConfig = path.join(process.env.CODEX_HOME || path.join(os.homedir(), ".codex"), "config.toml");
|
|
1145
|
+
updateLine(
|
|
1146
|
+
component,
|
|
1147
|
+
"failed",
|
|
1148
|
+
`\`codex ${steps[0].join(" ")}\` failed twice; a slow link can exceed Codex's 30 s clone limit, and a sparse `
|
|
1149
|
+
+ `marketplace fetches only the plugin: add sparse_paths = ${JSON.stringify(CODEX_SPARSE_PATHS)} `
|
|
1150
|
+
+ `under [marketplaces.${market}] in ${codexConfig}`
|
|
1151
|
+
);
|
|
1152
|
+
return false;
|
|
1153
|
+
}
|
|
1132
1154
|
// Codex re-reads hook definitions at every call and trusts them by hash, so
|
|
1133
1155
|
// a changed definition stops running until the owner reviews it. Compared
|
|
1134
1156
|
// before `plugin add`, which deletes the old install's directory.
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christang/keel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.133.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@christang/keel",
|
|
9
|
-
"version": "5.
|
|
9
|
+
"version": "5.133.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@fission-ai/openspec": "^1.4.1"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.133.0",
|
|
4
4
|
"description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TanglmChris",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.133.0",
|
|
4
4
|
"description": "Keel OpenSpec execution discipline: stateless continuity, task capsules, deterministic gates, and expectation alignment for Codex and Claude Code.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TanglmChris",
|
|
@@ -47,8 +47,8 @@ REQUIRED_SCRIPTS = [
|
|
|
47
47
|
"scripts/validate_plugin.py",
|
|
48
48
|
]
|
|
49
49
|
|
|
50
|
-
PACKAGE_VERSION = "5.
|
|
51
|
-
PROTOCOL_VERSION = "5.
|
|
50
|
+
PACKAGE_VERSION = "5.133.0"
|
|
51
|
+
PROTOCOL_VERSION = "5.133.0"
|
|
52
52
|
LEGACY_MANAGED_START = "<!-- keel:start version=2.1 -->"
|
|
53
53
|
OPENSPEC_SCHEMA_NAME = "keel-spec-driven"
|
|
54
54
|
# Mirrors KEEL_PACKAGE_NAME in scripts/install_to_repo.py, one of the two
|
|
@@ -6789,7 +6789,7 @@ def validate_shift_change_scenario() -> int:
|
|
|
6789
6789
|
|
|
6790
6790
|
|
|
6791
6791
|
def validate_self_shift_authorization_scenario() -> int:
|
|
6792
|
-
"""Issue #319: `self-shift` lets a desktop session take its own
|
|
6792
|
+
"""Issue #319: `self-shift` lets a desktop session take its own four steps.
|
|
6793
6793
|
|
|
6794
6794
|
The name is read and listed by `--doctor`, a scoped form is refused, and a
|
|
6795
6795
|
desktop `keel shift ready --wake` says the steps are standing-authorized
|
|
@@ -6816,9 +6816,9 @@ def validate_self_shift_authorization_scenario() -> int:
|
|
|
6816
6816
|
if "Standing-authorized by `self-shift`" not in granted.stdout:
|
|
6817
6817
|
report(f"{label} a desktop ready --wake with self-shift declared does not say the steps are standing-authorized: {granted.stdout.strip()} {granted.stderr.strip()}")
|
|
6818
6818
|
return 1
|
|
6819
|
-
#
|
|
6820
|
-
if "take these
|
|
6821
|
-
report(f"{label} a desktop ready --wake with self-shift declared does not cover
|
|
6819
|
+
# Four again once the PR-dismiss step went (#326).
|
|
6820
|
+
if "take these four steps now" not in granted.stdout:
|
|
6821
|
+
report(f"{label} a desktop ready --wake with self-shift declared does not cover four steps: {granted.stdout.strip()}")
|
|
6822
6822
|
return 1
|
|
6823
6823
|
run_keel(verify, "shift", "resume", env=desktop)
|
|
6824
6824
|
|
|
@@ -6943,16 +6943,22 @@ def validate_shift_desktop_wake_scenario() -> int:
|
|
|
6943
6943
|
if off == -1 or off > armed.stdout.find("create_scheduled_task"):
|
|
6944
6944
|
report(f"{label} the desktop clear hint does not turn Remote Control off before create_scheduled_task: {armed.stdout.strip()}")
|
|
6945
6945
|
return 1
|
|
6946
|
-
#
|
|
6947
|
-
#
|
|
6948
|
-
|
|
6946
|
+
# Dismissing bound PRs did not keep the app's auto-archive off the
|
|
6947
|
+
# cleared session: the engine archives on every PR the session ever
|
|
6948
|
+
# had, and `get_status` cannot see that set (#326 comment 6163697376).
|
|
6949
|
+
for needle in ("unbind_pr", "get_status"):
|
|
6950
|
+
if needle in armed.stdout:
|
|
6951
|
+
report(f"{label} the desktop clear hint still names {needle}: {armed.stdout.strip()}")
|
|
6952
|
+
return 1
|
|
6953
|
+
# The wake unarchives first, then sends (#326 D2 of shift-desktop-unarchive-wake).
|
|
6954
|
+
for needle in ("get_session", "unarchive_session", "mcp__ccd_session_mgmt__get_session",
|
|
6949
6955
|
"mcp__ccd_session_mgmt__unarchive_session"):
|
|
6950
6956
|
if needle not in armed.stdout:
|
|
6951
6957
|
report(f"{label} the desktop clear hint does not name {needle}: {armed.stdout.strip()}")
|
|
6952
6958
|
return 1
|
|
6953
|
-
|
|
6954
|
-
if not
|
|
6955
|
-
report(f"{label} the
|
|
6959
|
+
look = armed.stdout.find("get_session")
|
|
6960
|
+
if not look < armed.stdout.find("unarchive_session") < armed.stdout.find("send_message", look):
|
|
6961
|
+
report(f"{label} the wake does not check get_session, then unarchive_session, then send_message: {armed.stdout.strip()}")
|
|
6956
6962
|
return 1
|
|
6957
6963
|
if "archived copy" in armed.stdout:
|
|
6958
6964
|
report(f"{label} the desktop clear hint still says the rename tells an archived copy apart: {armed.stdout.strip()}")
|
|
@@ -6982,7 +6988,7 @@ def validate_shift_desktop_wake_scenario() -> int:
|
|
|
6982
6988
|
report(f"{label} outside the desktop app the clear hint no longer says the wake is armed: {plain.stdout.strip()}")
|
|
6983
6989
|
return 1
|
|
6984
6990
|
for needle in ("send_message", "create_scheduled_task", "set_session_title", "shift-restore",
|
|
6985
|
-
"unbind_pr", "unarchive_session"):
|
|
6991
|
+
"unbind_pr", "get_session", "unarchive_session"):
|
|
6986
6992
|
if needle in plain.stdout:
|
|
6987
6993
|
report(f"{label} outside the desktop app the clear hint names {needle}: {plain.stdout.strip()}")
|
|
6988
6994
|
return 1
|
|
@@ -6996,8 +7002,11 @@ def validate_shift_desktop_wake_scenario() -> int:
|
|
|
6996
7002
|
|
|
6997
7003
|
for relative in ("docs/shift-change.md", "docs/shift-change.zh-CN.md"):
|
|
6998
7004
|
text = (ROOT / relative).read_text(encoding="utf-8")
|
|
7005
|
+
if "unbind_pr" in text:
|
|
7006
|
+
report(f"{label} {relative} still names unbind_pr for the desktop app.")
|
|
7007
|
+
return 1
|
|
6999
7008
|
for needle in ("send_message", "set_remote_control", "set_session_title", "shift-restore",
|
|
7000
|
-
"
|
|
7009
|
+
"get_session", "unarchive_session"):
|
|
7001
7010
|
if needle not in text:
|
|
7002
7011
|
report(f"{label} {relative} does not name {needle} for the desktop app.")
|
|
7003
7012
|
return 1
|
|
@@ -23140,7 +23149,16 @@ const state = fs.existsSync(stateFile) ? JSON.parse(fs.readFileSync(stateFile, "
|
|
|
23140
23149
|
const save = () => fs.writeFileSync(stateFile, JSON.stringify(state));
|
|
23141
23150
|
const version = state[host] || "5.0.0";
|
|
23142
23151
|
const failOn = process.env[`FAKE_FAIL_${host.toUpperCase()}`] || "";
|
|
23143
|
-
|
|
23152
|
+
// FAKE_FAIL_TIMES_<HOST> limits the failures to the first N matching calls.
|
|
23153
|
+
const failTimes = Number(process.env[`FAKE_FAIL_TIMES_${host.toUpperCase()}`] || "Infinity");
|
|
23154
|
+
if (failOn && args.join(" ").includes(failOn)) {
|
|
23155
|
+
const failed = (state.failed && state.failed[host]) || 0;
|
|
23156
|
+
if (failed < failTimes) {
|
|
23157
|
+
state.failed = { ...(state.failed || {}), [host]: failed + 1 };
|
|
23158
|
+
save();
|
|
23159
|
+
process.exit(1);
|
|
23160
|
+
}
|
|
23161
|
+
}
|
|
23144
23162
|
if (host === "npm") {
|
|
23145
23163
|
if (args[0] === "pack") {
|
|
23146
23164
|
const dest = args[args.indexOf("--pack-destination") + 1];
|
|
@@ -23269,8 +23287,8 @@ def validate_update_covers_installed_hosts_scenario() -> int:
|
|
|
23269
23287
|
if "manual" not in codex_line:
|
|
23270
23288
|
report(f"{label} a local Codex marketplace was not reported manual: {codex_line!r}")
|
|
23271
23289
|
return 1
|
|
23272
|
-
if "codex plugin marketplace add TanglmChris/keel --ref main" not in codex_line:
|
|
23273
|
-
report(f"{label} the manual Codex line does not name the Git marketplace command: {codex_line!r}")
|
|
23290
|
+
if "codex plugin marketplace add TanglmChris/keel --ref main --sparse .agents/plugins --sparse plugins/keel" not in codex_line:
|
|
23291
|
+
report(f"{label} the manual Codex line does not name the sparse Git marketplace command (--sparse): {codex_line!r}")
|
|
23274
23292
|
return 1
|
|
23275
23293
|
if any(c[0] == "codex" for c in calls):
|
|
23276
23294
|
report(f"{label} a local Codex marketplace still received commands: {calls!r}")
|
|
@@ -23322,6 +23340,97 @@ OVERLAY_BLOCK_RE = re.compile(
|
|
|
23322
23340
|
)
|
|
23323
23341
|
|
|
23324
23342
|
|
|
23343
|
+
def validate_update_codex_refresh_retry_scenario() -> int:
|
|
23344
|
+
"""Issue #329: a slow link can cut Codex's whole-repository marketplace clone.
|
|
23345
|
+
|
|
23346
|
+
`keel --update` retries the refresh once, and when it still fails, names the
|
|
23347
|
+
sparse marketplace paths that make it fetch only the plugin. Those paths
|
|
23348
|
+
hold the Codex catalog and the plugin it names, and the docs use them.
|
|
23349
|
+
"""
|
|
23350
|
+
label = "update-codex-refresh-retry:"
|
|
23351
|
+
upgrade = ["codex", "plugin", "marketplace", "upgrade", "keel-marketplace"]
|
|
23352
|
+
add = ["codex", "plugin", "add", "keel@keel-marketplace"]
|
|
23353
|
+
with tempfile.TemporaryDirectory(prefix="keel-update-retry-", ignore_cleanup_errors=True) as raw:
|
|
23354
|
+
tmp = Path(raw)
|
|
23355
|
+
fake = tmp / "fake.js"
|
|
23356
|
+
write_text(fake, UPDATE_FAKE)
|
|
23357
|
+
launchers = {}
|
|
23358
|
+
for host in ("npm", "claude", "codex"):
|
|
23359
|
+
launcher = tmp / f"fake-{host}"
|
|
23360
|
+
write_text(launcher, f'#!/bin/sh\nFAKE_HOST={host} exec node "{fake}" "$@"\n')
|
|
23361
|
+
launcher.chmod(0o755)
|
|
23362
|
+
launchers[host] = launcher
|
|
23363
|
+
|
|
23364
|
+
def update(times: str):
|
|
23365
|
+
log, state = tmp / "log.jsonl", tmp / "state.json"
|
|
23366
|
+
for stale in (log, state):
|
|
23367
|
+
if stale.exists():
|
|
23368
|
+
stale.unlink()
|
|
23369
|
+
log.write_text("")
|
|
23370
|
+
env = dict(os.environ)
|
|
23371
|
+
env.update({
|
|
23372
|
+
"KEEL_UPDATE_NPM": str(launchers["npm"]), "KEEL_UPDATE_CLAUDE": str(launchers["claude"]),
|
|
23373
|
+
"KEEL_UPDATE_CODEX": str(launchers["codex"]), "CODEX_HOME": str(tmp / "codex-home"),
|
|
23374
|
+
"FAKE_LOG": str(log), "FAKE_STATE": str(state), "FAKE_CODEX_SOURCE": str(tmp / "codex-source"),
|
|
23375
|
+
"FAKE_FAIL_CODEX": "marketplace upgrade", "FAKE_FAIL_TIMES_CODEX": times,
|
|
23376
|
+
})
|
|
23377
|
+
env.pop("KEEL_UPDATE_SOURCE", None)
|
|
23378
|
+
result = subprocess.run(["node", str(ROOT / "bin/keel.js"), "--update"], cwd=tmp, env=env,
|
|
23379
|
+
text=True, capture_output=True, check=False, timeout=60)
|
|
23380
|
+
calls = [json.loads(line) for line in log.read_text().splitlines() if line.strip()]
|
|
23381
|
+
line = [l for l in result.stdout.splitlines() if l.startswith("keel update: codex plugin:")]
|
|
23382
|
+
return result, calls, (line[0] if len(line) == 1 else "")
|
|
23383
|
+
|
|
23384
|
+
result, calls, line = update("1")
|
|
23385
|
+
runs = sum(1 for c in calls if c[:5] == upgrade)
|
|
23386
|
+
if runs != 2:
|
|
23387
|
+
report(f"{label} the Codex marketplace upgrade ran {runs} time(s) after one failure, not 2: {calls!r}")
|
|
23388
|
+
return 1
|
|
23389
|
+
if sum(1 for c in calls if c[:4] == add) != 1:
|
|
23390
|
+
report(f"{label} a refresh that succeeded on retry did not run plugin add once: {calls!r}")
|
|
23391
|
+
return 1
|
|
23392
|
+
if "5.0.0 -> 5.1.0" not in line:
|
|
23393
|
+
report(f"{label} a refresh that succeeded on retry did not report the new version: {line!r}")
|
|
23394
|
+
return 1
|
|
23395
|
+
if result.returncode != 0:
|
|
23396
|
+
report(f"{label} a refresh that succeeded on retry exited {result.returncode}: {result.stdout!r}")
|
|
23397
|
+
return 1
|
|
23398
|
+
|
|
23399
|
+
result, calls, line = update("9")
|
|
23400
|
+
runs = sum(1 for c in calls if c[:5] == upgrade)
|
|
23401
|
+
if runs != 2:
|
|
23402
|
+
report(f"{label} a lasting failure ran the upgrade {runs} time(s), not 2: {calls!r}")
|
|
23403
|
+
return 1
|
|
23404
|
+
if any(c[:4] == add for c in calls):
|
|
23405
|
+
report(f"{label} a lasting refresh failure still ran plugin add: {calls!r}")
|
|
23406
|
+
return 1
|
|
23407
|
+
if result.returncode == 0:
|
|
23408
|
+
report(f"{label} a lasting refresh failure left the exit status 0: {result.stdout!r}")
|
|
23409
|
+
return 1
|
|
23410
|
+
if "failed" not in line:
|
|
23411
|
+
report(f"{label} a lasting refresh failure was not reported failed: {line!r}")
|
|
23412
|
+
return 1
|
|
23413
|
+
for needle in ("sparse_paths", ".agents/plugins", "plugins/keel"):
|
|
23414
|
+
if needle not in line:
|
|
23415
|
+
report(f"{label} the failed Codex line does not name {needle}: {line!r}")
|
|
23416
|
+
return 1
|
|
23417
|
+
|
|
23418
|
+
catalog = json.loads((ROOT / ".agents/plugins/marketplace.json").read_text(encoding="utf-8"))
|
|
23419
|
+
paths = [entry["source"]["path"] for entry in catalog["plugins"] if entry["name"] == "keel"]
|
|
23420
|
+
if paths != ["./plugins/keel"]:
|
|
23421
|
+
report(f"{label} the Codex catalog's keel source is not under the sparse path plugins/keel: {paths!r}")
|
|
23422
|
+
return 1
|
|
23423
|
+
for relative in ("README.md", "README.zh-CN.md", "docs/updating.md"):
|
|
23424
|
+
if "--sparse .agents/plugins --sparse plugins/keel" not in (ROOT / relative).read_text(encoding="utf-8"):
|
|
23425
|
+
report(f"{label} {relative} does not add the Codex marketplace sparse.")
|
|
23426
|
+
return 1
|
|
23427
|
+
if "update-codex-refresh-retry" not in {name for name, _ in SCENARIOS}:
|
|
23428
|
+
report(f"{label} scenario is not registered.")
|
|
23429
|
+
return 1
|
|
23430
|
+
report("update-codex-refresh-retry scenario passed.")
|
|
23431
|
+
return 0
|
|
23432
|
+
|
|
23433
|
+
|
|
23325
23434
|
def validate_refresh_covers_every_target_scenario() -> int:
|
|
23326
23435
|
"""Issue #204: a protocol refresh brings every installed target forward.
|
|
23327
23436
|
|
|
@@ -40416,6 +40525,7 @@ SCENARIOS: tuple = (
|
|
|
40416
40525
|
("guard-keeps-loaded-logic-under-manifest", validate_guard_keeps_loaded_logic_under_manifest_scenario),
|
|
40417
40526
|
("adopted-update-is-silent-unless-reload", validate_adopted_update_is_silent_unless_reload_scenario),
|
|
40418
40527
|
("update-covers-installed-hosts", validate_update_covers_installed_hosts_scenario),
|
|
40528
|
+
("update-codex-refresh-retry", validate_update_codex_refresh_retry_scenario),
|
|
40419
40529
|
("refresh-covers-every-target", validate_refresh_covers_every_target_scenario),
|
|
40420
40530
|
("directory-branch-advances", validate_directory_branch_advances_scenario),
|
|
40421
40531
|
("release-notes-name-the-directory-branch", validate_release_notes_name_the_directory_branch_scenario),
|
package/src/core/shift.js
CHANGED
|
@@ -750,26 +750,25 @@ function clearHint(result) {
|
|
|
750
750
|
last = [
|
|
751
751
|
"On the Claude desktop app a clear starts no session until a prompt arrives, so the waiter alone wakes nothing (#319). Do these in order:",
|
|
752
752
|
'1. Turn Remote Control off with set_remote_control("self", false), and wait for that call to return; it can take long while someone follows this session remotely.',
|
|
753
|
-
// The app's auto-archive
|
|
754
|
-
//
|
|
755
|
-
// wake
|
|
756
|
-
"2.
|
|
757
|
-
+
|
|
758
|
-
+
|
|
759
|
-
"3. Only then create a one-shot scheduled task with the host's `create_scheduled_task`, firing about three minutes later, "
|
|
760
|
-
+ `whose prompt calls \`send_message\` to session \`${result.desktop}\` with: "${result.role}: your new shift starts now. `
|
|
753
|
+
// The app's auto-archive can take the cleared, idle session before the
|
|
754
|
+
// wake, on every PR it ever had; dismissing bound PRs did not stop it, so
|
|
755
|
+
// the wake unarchives first (#326 D1, D2 of shift-desktop-unarchive-wake).
|
|
756
|
+
"2. Only then create a one-shot scheduled task with the host's `create_scheduled_task`, firing about three minutes later, "
|
|
757
|
+
+ `whose prompt first calls \`get_session\` on session \`${result.desktop}\` and, when it reports the session archived, calls \`unarchive_session\` on it; `
|
|
758
|
+
+ `then calls \`send_message\` to it with: "${result.role}: your new shift starts now. `
|
|
761
759
|
+ "Run `keel context` and `keel shift resume`, then restore Remote Control and this session's title as `keel shift resume` says.\" "
|
|
762
|
-
+ "
|
|
760
|
+
+ "If that send is still refused because the session is archived, it unarchives it and sends once more, and it says which path it took. "
|
|
761
|
+
+ "The app's auto-archive can archive the cleared session before the wake (#326); unarchiving brings back its worktree. "
|
|
763
762
|
+ "A task created earlier can fire first, and the app then refuses the clear to keep its message.",
|
|
764
|
-
`
|
|
765
|
-
'
|
|
766
|
-
"Keel creates no task. Running unattended needs `mcp__ccd_session_mgmt__set_remote_control`, `
|
|
763
|
+
`3. Rename this session with \`set_session_title\` (for example "${result.role} · shifted ${store.isoLocal(new Date()).slice(0, 16)}"), so it reads as between shifts until the woken session renames it back.`,
|
|
764
|
+
'4. Call clear_session("self").',
|
|
765
|
+
"Keel creates no task. Running unattended needs `mcp__ccd_session_mgmt__set_remote_control`, `mcp__ccd_session_mgmt__get_session` "
|
|
767
766
|
+ "and `mcp__ccd_session_mgmt__unarchive_session` in `permissions.allow`, "
|
|
768
767
|
+ "and `shift-restore` under `authorize:` in keel/config.yaml so the woken session does not stop to ask.",
|
|
769
768
|
// The outgoing side's confirmation is the repository's to waive (#319).
|
|
770
769
|
require("./config").readStandingAuthorization(result.worktree).scopes.has("self-shift")
|
|
771
|
-
? "Standing-authorized by `self-shift` in keel/config.yaml: take these
|
|
772
|
-
: "Declaring `self-shift` under authorize: in keel/config.yaml lets a session take these
|
|
770
|
+
? "Standing-authorized by `self-shift` in keel/config.yaml: take these four steps now, without asking."
|
|
771
|
+
: "Declaring `self-shift` under authorize: in keel/config.yaml lets a session take these four steps without asking.",
|
|
773
772
|
].join("\n");
|
|
774
773
|
} else if (result.waiter) {
|
|
775
774
|
last = `The wake is armed: once ${result.role}'s next session starts (after a clear or a fresh start), it gets one message to run \`keel shift resume\`. The waiter gives up after two hours.`;
|