@jesdi/skills 0.0.89 → 0.0.90

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": "@jesdi/skills",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "description": "jesdi's agent skills (content package consumed by @jesdi/skills-cli)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -124,7 +124,8 @@ class CommentIdentities:
124
124
  return path.read_text() if path.exists() else None
125
125
 
126
126
  def remember(self, cid, body):
127
- kind = "lease" if LEASE.match(body) else "handoff" if HANDOFF.match(body) else None
127
+ kind = ("lease" if LEASE.match(body) else "handoff" if HANDOFF.match(body)
128
+ else "seen" if body.startswith(SEEN) else None)
128
129
  if kind:
129
130
  self.root.mkdir(parents=True, exist_ok=True, mode=0o700)
130
131
  try:
@@ -556,13 +557,14 @@ def owner_comments(repo, number):
556
557
  author = login_of(c)
557
558
  editor = (c.get("editor") or {}).get("login")
558
559
  kind = kinds[c["databaseId"]]
559
- if author == owner and kind == "lease":
560
- continue # creation receipt, independent of the lease's current body
560
+ if author == owner and kind in ("lease", "seen"):
561
+ continue # creation receipt of the babysitter's own state, independent of its current body
561
562
  if author == owner and not c["body"].startswith(MENTION):
562
- # An unknown edited lease may be a handoff with its heading removed.
563
- # Without a receipt it is safe to ignore only if no earlier instruction
564
- # could be replayed. This also supports leases from another host.
565
- if c.get("lastEditedAt") and (kind == "handoff" or not LEASE.match(c["body"])
563
+ # An unknown edited lease or seen comment may be a handoff with its heading
564
+ # removed. Without a receipt it is safe to ignore only if no earlier instruction
565
+ # could be replayed. This also supports state comments from another host.
566
+ own_state = LEASE.match(c["body"]) or c["body"].startswith(SEEN)
567
+ if c.get("lastEditedAt") and (kind == "handoff" or not own_state
566
568
  or editor != owner or instructions):
567
569
  handoff = handoff or "handoff comment edited, boundary unverifiable"
568
570
  continue # the babysitter's own lease comments and the owner's plain chatter
@@ -24,3 +24,32 @@ def test_removing_handoff_heading_does_not_reactivate_approval(tmp_path, editor)
24
24
  out = read(w)
25
25
  assert out["handoff"] == "handoff comment edited, boundary unverifiable"
26
26
  assert out["instructions"] == []
27
+
28
+
29
+ SEEN_BODY = '<!-- babysit-pr seen -->\n{"a1b2c3d#ci": "2026-01-01T00:00:00Z"}'
30
+
31
+
32
+ def test_the_babysitters_edited_seen_comment_does_not_block_an_approval(tmp_path):
33
+ """`checks` edits its own seen comment on every run; that edit is no forged handoff."""
34
+ w = World(tmp_path, comments=[
35
+ comment(1001, "jesdi", SEEN_BODY, at=T - 20 * MIN, editor="jesdi"),
36
+ comment(1002, "jesdi", "@babysitter merge a1b2c3d", at=T - 10 * MIN)])
37
+ state = w.github()
38
+ state["commits"] = [{"sha": "a1b2c3d", "date": iso(T - 30 * MIN)}]
39
+ w.state.write_text(json.dumps(state))
40
+ out = read(w)
41
+ assert out["handoff"] is None
42
+ assert [i["text"] for i in out["instructions"]] == ["@babysitter merge a1b2c3d"]
43
+
44
+
45
+ def test_a_handoff_edited_to_look_like_a_seen_comment_is_still_flagged(tmp_path):
46
+ w = World(tmp_path, comments=[
47
+ comment(1001, "jesdi", "@babysitter merge a1b2c3d", at=T - 20 * MIN),
48
+ comment(1002, "jesdi", HANDOFF_BODY, at=T - 10 * MIN)])
49
+ state = w.github()
50
+ state["commits"] = [{"sha": "a1b2c3d", "date": iso(T - 30 * MIN)}]
51
+ w.state.write_text(json.dumps(state))
52
+ assert read(w) == {"handoff": None, "instructions": []} # records the handoff's receipt
53
+ state["comments"][1] = comment(1002, "jesdi", SEEN_BODY, at=T - 10 * MIN, editor="jesdi")
54
+ w.state.write_text(json.dumps(state))
55
+ assert read(w)["handoff"] == "handoff comment edited, boundary unverifiable"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-11-06T12:46:06.691Z",
3
+ "generatedAt": "2026-11-06T13:15:37.191Z",
4
4
  "skills": [
5
5
  {
6
6
  "name": "agents-wayfinder",
@@ -10,8 +10,8 @@
10
10
  },
11
11
  {
12
12
  "name": "babysit-pr",
13
- "version": "0.1.4",
14
- "hash": "sha256-3c1b0a1434a5aaf88139d74899fa9751d639d5135b9ba35ef9f4501e00d5342a",
13
+ "version": "0.1.5",
14
+ "hash": "sha256-71a14f734fcc2c21c7e068a4a0bf42afc23d7898d0d21ff962205832619b0ab2",
15
15
  "description": "Babysit an open pull request until it is merged or handed to a human. Started by the PostToolUse hook after `gh pr create`, or by hand with `/babysit-pr <pr-url>`."
16
16
  },
17
17
  {