@christang/keel 5.231.1 → 5.231.2
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/.claude-plugin/plugin.json +1 -1
- 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/validation/chat.py +61 -0
- package/scripts/validation/common.py +2 -2
- package/scripts/validation/registry.py +1 -0
- package/src/core/chat/store.js +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.231.
|
|
3
|
+
"version": "5.231.2",
|
|
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",
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christang/keel",
|
|
3
|
-
"version": "5.231.
|
|
3
|
+
"version": "5.231.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@christang/keel",
|
|
9
|
-
"version": "5.231.
|
|
9
|
+
"version": "5.231.2",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@fission-ai/openspec": "1.14.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.231.
|
|
3
|
+
"version": "5.231.2",
|
|
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.231.
|
|
3
|
+
"version": "5.231.2",
|
|
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",
|
|
@@ -1394,6 +1394,67 @@ def validate_chat_no_wake_dm_scenario() -> int:
|
|
|
1394
1394
|
return 0
|
|
1395
1395
|
|
|
1396
1396
|
|
|
1397
|
+
def validate_chat_direct_participants_json_scenario() -> int:
|
|
1398
|
+
"""Expose direct participants without needing a role rename (#552)."""
|
|
1399
|
+
with tempfile.TemporaryDirectory(prefix="keel-direct-json-") as raw:
|
|
1400
|
+
sender, receiver, env = chat_scratch_group(Path(raw))
|
|
1401
|
+
store = mailbox_common_dir(sender) / "keel-chat"
|
|
1402
|
+
direct_group = "dm-rtl--verify"
|
|
1403
|
+
|
|
1404
|
+
def chat(worktree: Path, *args: str):
|
|
1405
|
+
result = run_keel(worktree, "chat", *args, env=env)
|
|
1406
|
+
assert result.returncode == 0, result.stderr
|
|
1407
|
+
return result
|
|
1408
|
+
|
|
1409
|
+
def snapshot():
|
|
1410
|
+
return {
|
|
1411
|
+
file.relative_to(store): file.read_bytes()
|
|
1412
|
+
for directory in (store / "groups", store / "cursors")
|
|
1413
|
+
for file in directory.rglob("*") if file.is_file()
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
def send(*args: str) -> str:
|
|
1417
|
+
return chat_json(chat(sender, *args, "--json"))["id"]
|
|
1418
|
+
|
|
1419
|
+
send("post", "soc", "initial cursor")
|
|
1420
|
+
chat(receiver, "read", "soc")
|
|
1421
|
+
silent = send("dm", "verify", "--no-wake", "silent direct record")
|
|
1422
|
+
plain = send("post", "soc", "ordinary group record")
|
|
1423
|
+
assert would_wake(receiver, env) == 1, "silent DM or plain group record woke receiver"
|
|
1424
|
+
ordinary = send("dm", "verify", "ordinary direct record")
|
|
1425
|
+
assert would_wake(receiver, env) == 0, "ordinary DM did not wake receiver"
|
|
1426
|
+
assert not (store / "renames.json").exists(), "initial reads must have no rename map"
|
|
1427
|
+
|
|
1428
|
+
def assert_reads(role: str):
|
|
1429
|
+
before = snapshot()
|
|
1430
|
+
assert before, "expected stored history and a read cursor"
|
|
1431
|
+
unread = {r["id"]: r for r in chat_json(chat(receiver, "unread", "--json"))["unread"]}
|
|
1432
|
+
direct = {r["id"]: r for r in chat_json(chat(receiver, direct_group, "--peek", "--json"))["records"]}
|
|
1433
|
+
group = {r["id"]: r for r in chat_json(chat(receiver, "soc", "--peek", "--json"))["records"]}
|
|
1434
|
+
for record_id in (ordinary, silent, plain):
|
|
1435
|
+
shown = chat_json(chat(receiver, "show", record_id, "--json"))
|
|
1436
|
+
assert shown["readers"] == [], "peek/show must not mark a record as read"
|
|
1437
|
+
peeked = group[record_id] if record_id == plain else direct[record_id]
|
|
1438
|
+
for surface, record in (("unread", unread[record_id]), ("peek", peeked), ("show", shown["record"])):
|
|
1439
|
+
assert record["id"] == record_id
|
|
1440
|
+
assert not record.get("mentions"), f"{surface} must not rely on mentions"
|
|
1441
|
+
if record_id == plain:
|
|
1442
|
+
assert "direct" not in record, f"{surface} gave a plain group record direct participants"
|
|
1443
|
+
else:
|
|
1444
|
+
assert record.get("direct") == ["rtl", role], f"{surface} lost canonical DM participants: {record.get('direct')!r}"
|
|
1445
|
+
assert bool(record.get("no_wake")) == (record_id == silent), f"{surface} changed no-wake"
|
|
1446
|
+
assert snapshot() == before, "JSON projections rewrote history or cursors"
|
|
1447
|
+
|
|
1448
|
+
assert_reads("verify")
|
|
1449
|
+
original_records = {file: data for file, data in snapshot().items() if file.parts[0] == "groups" and "log" in file.parts}
|
|
1450
|
+
chat(receiver, "role", "--rename", "verify", "check")
|
|
1451
|
+
assert_reads("check")
|
|
1452
|
+
assert all((store / file).read_bytes() == data for file, data in original_records.items()), "rename rewrote original records"
|
|
1453
|
+
|
|
1454
|
+
report("chat-direct-participants-json scenario passed.")
|
|
1455
|
+
return 0
|
|
1456
|
+
|
|
1457
|
+
|
|
1397
1458
|
def validate_chat_wakes_without_no_wake_scenario() -> int:
|
|
1398
1459
|
"""Issue #502: without the option a mention still wakes, as before."""
|
|
1399
1460
|
label = "chat-wakes-without-no-wake:"
|
|
@@ -35,10 +35,10 @@ os.environ["KEEL_UPDATE_CLAUDE"] = str(Path(tempfile.gettempdir()) / "keel-suite
|
|
|
35
35
|
os.environ["KEEL_UPDATE_CODEX"] = str(Path(tempfile.gettempdir()) / "keel-suite-has-no-codex")
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
PACKAGE_VERSION = "5.231.
|
|
38
|
+
PACKAGE_VERSION = "5.231.2"
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
PROTOCOL_VERSION = "5.231.
|
|
41
|
+
PROTOCOL_VERSION = "5.231.2"
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
LEGACY_MANAGED_START = "<!-- keel:start version=2.1 -->"
|
|
@@ -532,6 +532,7 @@ SCENARIOS: tuple = (
|
|
|
532
532
|
("chat-summary", chat.validate_chat_summary_scenario),
|
|
533
533
|
("chat-no-wake-post", chat.validate_chat_no_wake_post_scenario),
|
|
534
534
|
("chat-no-wake-dm", chat.validate_chat_no_wake_dm_scenario),
|
|
535
|
+
("chat-direct-participants-json", chat.validate_chat_direct_participants_json_scenario),
|
|
535
536
|
("chat-wakes-without-no-wake", chat.validate_chat_wakes_without_no_wake_scenario),
|
|
536
537
|
("worktree-overview", shift.validate_worktree_overview_scenario),
|
|
537
538
|
("sync-status-lists-local-only", sync.validate_sync_status_lists_local_only_scenario),
|
package/src/core/chat/store.js
CHANGED
|
@@ -228,15 +228,16 @@ function canonicalRole(root, name, renames = readRenames(root)) {
|
|
|
228
228
|
// Every role field a record carries, read through the renames (D2); a direct
|
|
229
229
|
// group's members come from its name, so they are given as `direct`.
|
|
230
230
|
function mapRecord(record, renames) {
|
|
231
|
-
if (!record
|
|
231
|
+
if (!record) return record;
|
|
232
232
|
const map = (name) => (validName(name) ? canonicalRole(null, name, renames) : name);
|
|
233
|
+
if (record.group && isDirect(record.group)) record.direct = [...new Set(directMembers(record.group).map(map))];
|
|
234
|
+
if (!Object.keys(renames).length) return record;
|
|
233
235
|
record.from = map(record.from);
|
|
234
236
|
if (record.assignee) record.assignee = map(record.assignee);
|
|
235
237
|
if (Array.isArray(record.mentions)) record.mentions = [...new Set(record.mentions.map(map))];
|
|
236
238
|
// A join or leave keeps the name it was written for; `member` is the role
|
|
237
239
|
// it now means, applied once membership is computed (groupState).
|
|
238
240
|
if ((record.kind === "join" || record.kind === "leave") && record.target) record.member = map(record.target);
|
|
239
|
-
if (record.group && isDirect(record.group)) record.direct = [...new Set(directMembers(record.group).map(map))];
|
|
240
241
|
return record;
|
|
241
242
|
}
|
|
242
243
|
|