@christang/keel 5.132.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 -5
- 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 +40 -21
- package/src/core/shift.js +27 -27
package/README.md
CHANGED
|
@@ -236,15 +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
|
-
|
|
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
|
|
248
248
|
decide that a shift happens; that stays with the task-boundary rule and the coordinator. It takes no
|
|
249
249
|
scope.
|
|
250
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,27 +6932,42 @@ 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
|
-
#
|
|
6947
|
-
#
|
|
6948
|
-
|
|
6955
|
+
# Dismissing bound PRs did not keep the app's auto-archive off the
|
|
6956
|
+
# cleared session: the engine archives on every PR the session ever
|
|
6957
|
+
# had, and `get_status` cannot see that set (#326 comment 6163697376).
|
|
6958
|
+
for needle in ("unbind_pr", "get_status"):
|
|
6959
|
+
if needle in armed.stdout:
|
|
6960
|
+
report(f"{label} the desktop clear hint still names {needle}: {armed.stdout.strip()}")
|
|
6961
|
+
return 1
|
|
6962
|
+
# The wake unarchives first, then sends (#326 D2 of shift-desktop-unarchive-wake).
|
|
6963
|
+
for needle in ("get_session", "unarchive_session", "mcp__ccd_session_mgmt__get_session",
|
|
6949
6964
|
"mcp__ccd_session_mgmt__unarchive_session"):
|
|
6950
6965
|
if needle not in armed.stdout:
|
|
6951
6966
|
report(f"{label} the desktop clear hint does not name {needle}: {armed.stdout.strip()}")
|
|
6952
6967
|
return 1
|
|
6953
|
-
|
|
6954
|
-
if not
|
|
6955
|
-
report(f"{label} the
|
|
6968
|
+
look = armed.stdout.find("get_session")
|
|
6969
|
+
if not look < armed.stdout.find("unarchive_session") < armed.stdout.find("send_message", look):
|
|
6970
|
+
report(f"{label} the wake does not check get_session, then unarchive_session, then send_message: {armed.stdout.strip()}")
|
|
6956
6971
|
return 1
|
|
6957
6972
|
if "archived copy" in armed.stdout:
|
|
6958
6973
|
report(f"{label} the desktop clear hint still says the rename tells an archived copy apart: {armed.stdout.strip()}")
|
|
@@ -6967,8 +6982,8 @@ def validate_shift_desktop_wake_scenario() -> int:
|
|
|
6967
6982
|
if "next is R011" not in resumed.stdout:
|
|
6968
6983
|
report(f"{label} resume on the desktop app did not print the note: {resumed.stdout.strip()} {resumed.stderr.strip()}")
|
|
6969
6984
|
return 1
|
|
6970
|
-
if "set_remote_control" not in resumed.stdout:
|
|
6971
|
-
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()}")
|
|
6972
6987
|
return 1
|
|
6973
6988
|
if "set_session_title" not in resumed.stdout:
|
|
6974
6989
|
report(f"{label} resume on the desktop app does not say to rename the session back: {resumed.stdout.strip()}")
|
|
@@ -6982,7 +6997,7 @@ def validate_shift_desktop_wake_scenario() -> int:
|
|
|
6982
6997
|
report(f"{label} outside the desktop app the clear hint no longer says the wake is armed: {plain.stdout.strip()}")
|
|
6983
6998
|
return 1
|
|
6984
6999
|
for needle in ("send_message", "create_scheduled_task", "set_session_title", "shift-restore",
|
|
6985
|
-
"unbind_pr", "unarchive_session"):
|
|
7000
|
+
"unbind_pr", "get_session", "unarchive_session"):
|
|
6986
7001
|
if needle in plain.stdout:
|
|
6987
7002
|
report(f"{label} outside the desktop app the clear hint names {needle}: {plain.stdout.strip()}")
|
|
6988
7003
|
return 1
|
|
@@ -6996,8 +7011,12 @@ def validate_shift_desktop_wake_scenario() -> int:
|
|
|
6996
7011
|
|
|
6997
7012
|
for relative in ("docs/shift-change.md", "docs/shift-change.zh-CN.md"):
|
|
6998
7013
|
text = (ROOT / relative).read_text(encoding="utf-8")
|
|
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
|
|
6999
7018
|
for needle in ("send_message", "set_remote_control", "set_session_title", "shift-restore",
|
|
7000
|
-
"
|
|
7019
|
+
"get_session", "unarchive_session"):
|
|
7001
7020
|
if needle not in text:
|
|
7002
7021
|
report(f"{label} {relative} does not name {needle} for the desktop app.")
|
|
7003
7022
|
return 1
|
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,33 +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
|
-
|
|
753
|
-
// The app's auto-archive
|
|
754
|
-
//
|
|
755
|
-
// wake
|
|
756
|
-
"
|
|
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. `
|
|
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
|
+
// 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
|
+
"1. 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
|
-
+ "
|
|
763
|
-
+ "
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
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. "
|
|
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
|
+
"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 three steps now, without asking."
|
|
771
|
+
: "Declaring `self-shift` under authorize: in keel/config.yaml lets a session take these three 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.`;
|
|
@@ -851,15 +850,16 @@ function runShift(argv) {
|
|
|
851
850
|
// A new coordinator learns whom its previous shift left unstarted (#289 D2).
|
|
852
851
|
const waiting = (result.waiting || []).map((w) => w.role);
|
|
853
852
|
const still = waiting.length ? `\n\nStill waiting for \`keel shift start\`: ${waiting.join(", ")}.` : "";
|
|
854
|
-
// 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).
|
|
855
855
|
const { readStandingAuthorization } = require("./config");
|
|
856
856
|
const restore = readStandingAuthorization(where.worktree).scopes.has("shift-restore");
|
|
857
857
|
const remote = desktopSession() && restore
|
|
858
|
-
? "\n\nStanding-authorized by `shift-restore` in keel/config.yaml:
|
|
859
|
-
+ "`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."
|
|
860
860
|
: desktopSession()
|
|
861
|
-
? "\n\nOn the Claude desktop app a clear keeps
|
|
862
|
-
+ "`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`. "
|
|
863
863
|
+ "Declaring `shift-restore` under authorize: in keel/config.yaml lets a woken session do this without asking."
|
|
864
864
|
: "";
|
|
865
865
|
out(result, `${result.text.replace(/\s+$/, "")}\n\n(The note moved to ${result.note}.)${still}${remind ? `\n\n${patrolReminder(patrol)}` : ""}${remote}`);
|