@christang/keel 5.132.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 CHANGED
@@ -242,9 +242,10 @@ session reads that restore as another session's request and stops to ask you. It
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 five 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, dismiss
247
- the PRs bound to it (#326), create the one-shot wake task, rename the session, clear it. It does not
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
248
249
  decide that a shift happens; that stays with the task-boundary rule and the coordinator. It takes no
249
250
  scope.
250
251
 
@@ -1,4 +1,4 @@
1
- <!-- keel:start version=5.132.0 -->
1
+ <!-- keel:start version=5.133.0 -->
2
2
  ## Keel Bootstrap
3
3
 
4
4
  - Start every session with `keel context`; OpenSpec artifacts and Git are the only durable authority — never native memory, goals, or transcripts.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@christang/keel",
3
- "version": "5.132.0",
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.132.0",
9
+ "version": "5.133.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@fission-ai/openspec": "^1.4.1"
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@christang/keel",
3
3
  "displayName": "Keel",
4
4
  "description": "Keel OpenSpec execution discipline CLI for Claude Code, Codex, and OpenCode.",
5
- "version": "5.132.0",
5
+ "version": "5.133.0",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keel",
3
- "version": "5.132.0",
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.132.0",
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.132.0"
51
- PROTOCOL_VERSION = "5.132.0"
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 five steps.
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
- # The PR-dismiss step makes five (#326).
6820
- if "take these five steps now" not in granted.stdout:
6821
- report(f"{label} a desktop ready --wake with self-shift declared does not cover five steps: {granted.stdout.strip()}")
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
- # Dismiss the bound PRs after Remote Control is off and before the
6947
- # task, or the app's auto-archive takes the idle cleared session (#326).
6948
- for needle in ("unbind_pr", "get_status", "unarchive_session", "mcp__ccd_pr__unbind_pr",
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
- unbind = armed.stdout.find("unbind_pr")
6954
- if not off < unbind < armed.stdout.find("create_scheduled_task"):
6955
- report(f"{label} the desktop clear hint does not dismiss bound PRs between Remote Control off and create_scheduled_task: {armed.stdout.strip()}")
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
- "unbind_pr", "unarchive_session"):
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
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 takes an idle session whose bound PRs are all
754
- // merged, and releases its worktree; a cleared session waiting for its
755
- // wake is exactly that (#326 D1 of shift-desktop-unbind-merged-prs).
756
- "2. Dismiss every PR bound to this session: call `get_status`, and while it reports a bound PR, dismiss it with `unbind_pr` and call `get_status` again. "
757
- + "Otherwise the app's auto-archive archives the cleared, idle session before the wake and releases its worktree (#326). "
758
- + "The new shift can bind an open one again with `bind_pr`.",
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
- + "and, if the send is refused because the session is archived, calls `unarchive_session` on it, sends again, and says which path it took. "
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
- `4. 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.`,
765
- '5. Call clear_session("self").',
766
- "Keel creates no task. Running unattended needs `mcp__ccd_session_mgmt__set_remote_control`, `mcp__ccd_pr__unbind_pr` "
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 five steps now, without asking."
772
- : "Declaring `self-shift` under authorize: in keel/config.yaml lets a session take these five steps without asking.",
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.`;