@christang/keel 5.133.0 → 5.134.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 +5 -6
- package/assets/bootstrap/AGENTS.md +1 -1
- 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 +26 -16
- package/src/core/shift.js +19 -18
package/README.md
CHANGED
|
@@ -236,16 +236,15 @@ refused too. Declaring it turns the push check on by itself, and a bare `push` b
|
|
|
236
236
|
refused.
|
|
237
237
|
|
|
238
238
|
`shift-restore` (#319) covers the two things a session started by a shift change on the Claude
|
|
239
|
-
desktop app must do right after `keel shift resume`: turn its own Remote Control back on
|
|
240
|
-
itself back to its working title. A clear there keeps
|
|
239
|
+
desktop app must do right after `keel shift resume`: turn its own Remote Control back on if it came
|
|
240
|
+
back off, and rename itself back to its working title. A clear there keeps no title. Without the declaration, the woken
|
|
241
241
|
session reads that restore as another session's request and stops to ask you. It reaches only that
|
|
242
242
|
session, so it takes no scope, and it covers no other session, no clear or archive, and no repository
|
|
243
243
|
action.
|
|
244
244
|
|
|
245
|
-
`self-shift` (#319) is its outgoing counterpart: the
|
|
246
|
-
the desktop app once the note is stored —
|
|
247
|
-
|
|
248
|
-
clear it. It does not
|
|
245
|
+
`self-shift` (#319) is its outgoing counterpart: the three steps `keel shift ready --wake` prints on
|
|
246
|
+
the desktop app once the note is stored — create the one-shot wake task (which unarchives the
|
|
247
|
+
session first if needed, #326), rename the session, clear it. Remote Control stays on (#324). It does not
|
|
249
248
|
decide that a shift happens; that stays with the task-boundary rule and the coordinator. It takes no
|
|
250
249
|
scope.
|
|
251
250
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christang/keel",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.134.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.134.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.134.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.134.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.134.0"
|
|
51
|
+
PROTOCOL_VERSION = "5.134.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 three 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
|
+
# Three once the Remote Control step went (#324).
|
|
6820
|
+
if "take these three steps now" not in granted.stdout:
|
|
6821
|
+
report(f"{label} a desktop ready --wake with self-shift declared does not cover three steps: {granted.stdout.strip()}")
|
|
6822
6822
|
return 1
|
|
6823
6823
|
run_keel(verify, "shift", "resume", env=desktop)
|
|
6824
6824
|
|
|
@@ -6932,16 +6932,25 @@ def validate_shift_desktop_wake_scenario() -> int:
|
|
|
6932
6932
|
if "Desktop session: local_test-319" not in note.read_text(encoding="utf-8"):
|
|
6933
6933
|
report(f"{label} the note does not record the desktop session id.")
|
|
6934
6934
|
return 1
|
|
6935
|
-
# Remote Control
|
|
6936
|
-
#
|
|
6935
|
+
# Remote Control stays on: a clear is accepted with it on, and turning it
|
|
6936
|
+
# off waits for a person's approval (#324 comments 6164793777, 6165454422).
|
|
6937
|
+
for needle in ('set_remote_control("self", false)', "cannot be cleared"):
|
|
6938
|
+
if needle in armed.stdout:
|
|
6939
|
+
report(f"{label} the desktop clear hint still says {needle}: {armed.stdout.strip()}")
|
|
6940
|
+
return 1
|
|
6941
|
+
# The task, then rename and clear at once, so the wake cannot fire
|
|
6942
|
+
# before the clear (#319 comments 6143435530, 6144856601).
|
|
6937
6943
|
for needle in ("create_scheduled_task", "send_message", "local_test-319", "set_session_title",
|
|
6938
6944
|
"mcp__ccd_session_mgmt__set_remote_control", "shift-restore"):
|
|
6939
6945
|
if needle not in armed.stdout:
|
|
6940
6946
|
report(f"{label} the desktop clear hint does not name {needle}: {armed.stdout.strip()}")
|
|
6941
6947
|
return 1
|
|
6942
|
-
|
|
6943
|
-
if
|
|
6944
|
-
report(f"{label} the desktop clear hint does not
|
|
6948
|
+
task = armed.stdout.find("create_scheduled_task")
|
|
6949
|
+
if not task < armed.stdout.find("set_session_title", task) < armed.stdout.find("clear_session", task):
|
|
6950
|
+
report(f"{label} the desktop clear hint does not order create_scheduled_task, set_session_title, clear_session: {armed.stdout.strip()}")
|
|
6951
|
+
return 1
|
|
6952
|
+
if "new address" not in armed.stdout:
|
|
6953
|
+
report(f"{label} the desktop clear hint does not say Remote Control reconnects under a new address: {armed.stdout.strip()}")
|
|
6945
6954
|
return 1
|
|
6946
6955
|
# Dismissing bound PRs did not keep the app's auto-archive off the
|
|
6947
6956
|
# cleared session: the engine archives on every PR the session ever
|
|
@@ -6973,8 +6982,8 @@ def validate_shift_desktop_wake_scenario() -> int:
|
|
|
6973
6982
|
if "next is R011" not in resumed.stdout:
|
|
6974
6983
|
report(f"{label} resume on the desktop app did not print the note: {resumed.stdout.strip()} {resumed.stderr.strip()}")
|
|
6975
6984
|
return 1
|
|
6976
|
-
if "set_remote_control" not in resumed.stdout:
|
|
6977
|
-
report(f"{label} resume on the desktop app does not say to
|
|
6985
|
+
if "set_remote_control" not in resumed.stdout or "get_session" not in resumed.stdout:
|
|
6986
|
+
report(f"{label} resume on the desktop app does not say to check Remote Control and turn it back on if off: {resumed.stdout.strip()}")
|
|
6978
6987
|
return 1
|
|
6979
6988
|
if "set_session_title" not in resumed.stdout:
|
|
6980
6989
|
report(f"{label} resume on the desktop app does not say to rename the session back: {resumed.stdout.strip()}")
|
|
@@ -7002,9 +7011,10 @@ def validate_shift_desktop_wake_scenario() -> int:
|
|
|
7002
7011
|
|
|
7003
7012
|
for relative in ("docs/shift-change.md", "docs/shift-change.zh-CN.md"):
|
|
7004
7013
|
text = (ROOT / relative).read_text(encoding="utf-8")
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7014
|
+
for stale in ("unbind_pr", "cannot be cleared"):
|
|
7015
|
+
if stale in text:
|
|
7016
|
+
report(f"{label} {relative} still says {stale}.")
|
|
7017
|
+
return 1
|
|
7008
7018
|
for needle in ("send_message", "set_remote_control", "set_session_title", "shift-restore",
|
|
7009
7019
|
"get_session", "unarchive_session"):
|
|
7010
7020
|
if needle not in text:
|
package/src/core/shift.js
CHANGED
|
@@ -730,7 +730,6 @@ function describe(row) {
|
|
|
730
730
|
|
|
731
731
|
const CLEAR_HINT = [
|
|
732
732
|
"Session state a clear destroys — scheduled jobs, Remote Control — is not in Keel; if the note does not say how to re-create it, add that first.",
|
|
733
|
-
"A session serving Remote Control cannot be cleared: turn Remote Control off, clear, then turn it back on.",
|
|
734
733
|
"Now clear this session:",
|
|
735
734
|
"- Claude desktop app: call `clear_session(\"self\")` (the owner approves it), or type /clear;",
|
|
736
735
|
"- Claude Code CLI: /clear;",
|
|
@@ -743,32 +742,33 @@ function clearHint(result) {
|
|
|
743
742
|
let last;
|
|
744
743
|
if (!result.role) last = `Without a chat role nothing wakes the new session; ${result.startedBy} — tell it to run \`keel shift resume\`.`;
|
|
745
744
|
else if (result.waiter && result.desktop) {
|
|
746
|
-
// Nothing starts a cleared desktop session but a prompt (#319 D3).
|
|
747
|
-
//
|
|
748
|
-
//
|
|
749
|
-
//
|
|
745
|
+
// Nothing starts a cleared desktop session but a prompt (#319 D3). A wake
|
|
746
|
+
// that fires before the clear is queued, and the app then refuses the clear
|
|
747
|
+
// to keep it, so rename and clear follow the task at once. Remote Control
|
|
748
|
+
// stays on: the clear is accepted with it on, and turning it off waits for
|
|
749
|
+
// a person's approval (#324 D1, D2 of shift-desktop-keep-remote-control).
|
|
750
750
|
last = [
|
|
751
|
-
"On the Claude desktop app a clear starts no session until a prompt arrives, so the waiter alone wakes nothing (#319).
|
|
752
|
-
|
|
751
|
+
"On the Claude desktop app a clear starts no session until a prompt arrives, so the waiter alone wakes nothing (#319). "
|
|
752
|
+
+ "Leave Remote Control on: the clear is accepted with it on, and the app reconnects it after the clear under a new address, which a remote viewer has to open (#324). Do these in order:",
|
|
753
753
|
// The app's auto-archive can take the cleared, idle session before the
|
|
754
754
|
// wake, on every PR it ever had; dismissing bound PRs did not stop it, so
|
|
755
755
|
// the wake unarchives first (#326 D1, D2 of shift-desktop-unarchive-wake).
|
|
756
|
-
"
|
|
756
|
+
"1. Create a one-shot scheduled task with the host's `create_scheduled_task`, firing about three minutes later, "
|
|
757
757
|
+ `whose prompt first calls \`get_session\` on session \`${result.desktop}\` and, when it reports the session archived, calls \`unarchive_session\` on it; `
|
|
758
758
|
+ `then calls \`send_message\` to it with: "${result.role}: your new shift starts now. `
|
|
759
759
|
+ "Run `keel context` and `keel shift resume`, then restore Remote Control and this session's title as `keel shift resume` says.\" "
|
|
760
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
761
|
+ "The app's auto-archive can archive the cleared session before the wake (#326); unarchiving brings back its worktree. "
|
|
762
|
-
+ "A task
|
|
763
|
-
`
|
|
764
|
-
'
|
|
762
|
+
+ "A task that fires before the clear gets the clear refused, so take the next two steps at once.",
|
|
763
|
+
`2. 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
|
+
'3. Call clear_session("self").',
|
|
765
765
|
"Keel creates no task. Running unattended needs `mcp__ccd_session_mgmt__set_remote_control`, `mcp__ccd_session_mgmt__get_session` "
|
|
766
766
|
+ "and `mcp__ccd_session_mgmt__unarchive_session` in `permissions.allow`, "
|
|
767
767
|
+ "and `shift-restore` under `authorize:` in keel/config.yaml so the woken session does not stop to ask.",
|
|
768
768
|
// The outgoing side's confirmation is the repository's to waive (#319).
|
|
769
769
|
require("./config").readStandingAuthorization(result.worktree).scopes.has("self-shift")
|
|
770
|
-
? "Standing-authorized by `self-shift` in keel/config.yaml: take these
|
|
771
|
-
: "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 three steps now, without asking."
|
|
771
|
+
: "Declaring `self-shift` under authorize: in keel/config.yaml lets a session take these three steps without asking.",
|
|
772
772
|
].join("\n");
|
|
773
773
|
} else if (result.waiter) {
|
|
774
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.`;
|
|
@@ -850,15 +850,16 @@ function runShift(argv) {
|
|
|
850
850
|
// A new coordinator learns whom its previous shift left unstarted (#289 D2).
|
|
851
851
|
const waiting = (result.waiting || []).map((w) => w.role);
|
|
852
852
|
const still = waiting.length ? `\n\nStill waiting for \`keel shift start\`: ${waiting.join(", ")}.` : "";
|
|
853
|
-
// A clear on the desktop app keeps
|
|
853
|
+
// A clear on the desktop app keeps no title (#319), and a session it
|
|
854
|
+
// leaves may come back with Remote Control off (#324 D3).
|
|
854
855
|
const { readStandingAuthorization } = require("./config");
|
|
855
856
|
const restore = readStandingAuthorization(where.worktree).scopes.has("shift-restore");
|
|
856
857
|
const remote = desktopSession() && restore
|
|
857
|
-
? "\n\nStanding-authorized by `shift-restore` in keel/config.yaml:
|
|
858
|
-
+ "`set_remote_control(\"self\", true)
|
|
858
|
+
? "\n\nStanding-authorized by `shift-restore` in keel/config.yaml: if `get_session(\"self\")` reports Remote Control off, turn it back on with "
|
|
859
|
+
+ "`set_remote_control(\"self\", true)`; and rename this session back to its working title with `set_session_title`, now, without asking."
|
|
859
860
|
: desktopSession()
|
|
860
|
-
? "\n\nOn the Claude desktop app a clear keeps
|
|
861
|
-
+ "`set_remote_control(\"self\", true)
|
|
861
|
+
? "\n\nOn the Claude desktop app a clear keeps no title and may leave Remote Control off: if `get_session(\"self\")` reports it off, turn it back on with "
|
|
862
|
+
+ "`set_remote_control(\"self\", true)`, and rename the session back with `set_session_title`. "
|
|
862
863
|
+ "Declaring `shift-restore` under authorize: in keel/config.yaml lets a woken session do this without asking."
|
|
863
864
|
: "";
|
|
864
865
|
out(result, `${result.text.replace(/\s+$/, "")}\n\n(The note moved to ${result.note}.)${still}${remind ? `\n\n${patrolReminder(patrol)}` : ""}${remote}`);
|