dkitchen 0.5.2__tar.gz → 0.5.3__tar.gz
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.
- {dkitchen-0.5.2/src/dkitchen.egg-info → dkitchen-0.5.3}/PKG-INFO +1 -1
- {dkitchen-0.5.2 → dkitchen-0.5.3}/pyproject.toml +1 -1
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen/watch.py +3 -2
- {dkitchen-0.5.2 → dkitchen-0.5.3/src/dkitchen.egg-info}/PKG-INFO +1 -1
- {dkitchen-0.5.2 → dkitchen-0.5.3}/tests/test_kitchen.py +18 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/LICENSE +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/README.md +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/setup.cfg +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen/__init__.py +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen/config.py +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen/ding.py +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen/orchestrate.py +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen/refs.py +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen.egg-info/SOURCES.txt +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen.egg-info/dependency_links.txt +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen.egg-info/entry_points.txt +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen.egg-info/requires.txt +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/src/dkitchen.egg-info/top_level.txt +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/tests/test_codex_session.py +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/tests/test_records.py +0 -0
- {dkitchen-0.5.2 → dkitchen-0.5.3}/tests/test_reference_scripts.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dkitchen"
|
|
7
|
-
version = "0.5.
|
|
7
|
+
version = "0.5.3"
|
|
8
8
|
description = "A multi-agent workflow for research repos, with the ding CLI for messaging and waking agent sessions"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -63,7 +63,8 @@ def issue_number(url: str) -> int:
|
|
|
63
63
|
|
|
64
64
|
def role(body: str, config: Config) -> str:
|
|
65
65
|
"""The station named at the start of the first line; otherwise the executor by a line starting with its
|
|
66
|
-
session signature
|
|
66
|
+
session signature (`Codex session:`, or `Claude session:` for an executor run in Claude Code); else the user.
|
|
67
|
+
A session signature quoted inside a line signs nothing."""
|
|
67
68
|
stations = config.stations
|
|
68
69
|
first = next((line for line in body.splitlines() if line.strip()), "")
|
|
69
70
|
first = re.sub(r"^[\s#*>]+", "", first)
|
|
@@ -71,7 +72,7 @@ def role(body: str, config: Config) -> str:
|
|
|
71
72
|
if first.startswith(name)), None)
|
|
72
73
|
if signed:
|
|
73
74
|
return signed
|
|
74
|
-
return stations.executor if re.search(r"(?m)^[ \t]*Codex session:", body) else stations.user
|
|
75
|
+
return stations.executor if re.search(r"(?m)^[ \t]*(?:Codex|Claude) session:", body) else stations.user
|
|
75
76
|
|
|
76
77
|
|
|
77
78
|
def fields(body: str, config: Config) -> dict[str, str]:
|
|
@@ -246,6 +246,22 @@ def test_merge_finds_the_one_ticket_with_executor_comments(tmp_path, monkeypatch
|
|
|
246
246
|
f"repos/o/r/issues/{number}/comments?per_page=100" for number in tickets]
|
|
247
247
|
|
|
248
248
|
|
|
249
|
+
CLAUDE = "Claude session: ToM agent person experience record implementation"
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
@pytest.mark.parametrize("bodies, code", [
|
|
253
|
+
((f"状态:进行中\n在等:总编排审合PR7\n关键数字:1\n下一步:合入后冒烟\n{CLAUDE}",), 0),
|
|
254
|
+
((WAITING, f"状态:进行中\n在等:无\n关键数字:1\n下一步:还在改PR7\n{CLAUDE}"), 1),
|
|
255
|
+
((f"状态:完成\n在等:无\n关键数字:1\n下一步:交给执行者\n{CLAUDE}", WAITING), 0),
|
|
256
|
+
])
|
|
257
|
+
def test_merge_reads_claude_and_codex_executors_by_the_latest_comment(tmp_path, monkeypatch, capsys, bodies, code):
|
|
258
|
+
loaded = settings(tmp_path, CHINESE)
|
|
259
|
+
responses = [view(), thread_comments("总设计:答复", *bodies)] + ([(0, ""), view("MERGED")] if code == 0 else [])
|
|
260
|
+
monkeypatch.setattr(orchestrate, "call", fake_call(responses, []))
|
|
261
|
+
assert orchestrate.merge(SimpleNamespace(pr=7, sha="abc", ticket=1020, no_ticket=False), loaded) == code
|
|
262
|
+
assert f"#1020 latest executor status (https://c/{len(bodies)}):" in capsys.readouterr().out
|
|
263
|
+
|
|
264
|
+
|
|
249
265
|
def test_merge_refuses_a_ticket_without_executor_comments(tmp_path, monkeypatch, capsys):
|
|
250
266
|
loaded = settings(tmp_path, CHINESE)
|
|
251
267
|
monkeypatch.setattr(orchestrate, "call", fake_call([view(), thread_comments("总设计:答复")], []))
|
|
@@ -468,4 +484,6 @@ def test_a_quoted_session_signature_signs_nothing(tmp_path, text):
|
|
|
468
484
|
"| request body | ok: it starts with the status block and contains `Codex session:` |\n")
|
|
469
485
|
assert watch.role(verifier, loaded) == stations.verifier
|
|
470
486
|
assert watch.role("I checked it; the body has `Codex session:` in it.", loaded) == stations.user
|
|
487
|
+
assert watch.role("Quoting `Claude session:` signs nothing.", loaded) == stations.user
|
|
488
|
+
assert watch.role("Status: done\nWaiting on: none\n\nClaude session: impl", loaded) == stations.executor
|
|
471
489
|
assert watch.role(executor("Status: done\nWaiting on: none\nKey numbers: 1\nNext: merge"), loaded) == stations.executor
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|