dkitchen 0.2.0__tar.gz → 0.2.1__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.2.0/src/dkitchen.egg-info → dkitchen-0.2.1}/PKG-INFO +1 -1
- {dkitchen-0.2.0 → dkitchen-0.2.1}/pyproject.toml +1 -1
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen/watch.py +7 -5
- {dkitchen-0.2.0 → dkitchen-0.2.1/src/dkitchen.egg-info}/PKG-INFO +1 -1
- {dkitchen-0.2.0 → dkitchen-0.2.1}/tests/test_kitchen.py +11 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/LICENSE +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/README.md +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/setup.cfg +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen/__init__.py +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen/config.py +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen/ding.py +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen/orchestrate.py +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen/refs.py +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen.egg-info/SOURCES.txt +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen.egg-info/dependency_links.txt +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen.egg-info/entry_points.txt +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen.egg-info/requires.txt +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/src/dkitchen.egg-info/top_level.txt +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/tests/test_codex_session.py +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/tests/test_records.py +0 -0
- {dkitchen-0.2.0 → dkitchen-0.2.1}/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.2.
|
|
7
|
+
version = "0.2.1"
|
|
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"
|
|
@@ -61,14 +61,16 @@ def issue_number(url: str) -> int:
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
def role(body: str, config: Config) -> str:
|
|
64
|
-
"""The
|
|
64
|
+
"""The station named at the start of the first line; otherwise the executor by a line starting with its
|
|
65
|
+
session signature; else the user. A session signature quoted inside a line signs nothing."""
|
|
65
66
|
stations = config.stations
|
|
66
|
-
if "Codex session:" in body:
|
|
67
|
-
return stations.executor
|
|
68
67
|
first = next((line for line in body.splitlines() if line.strip()), "")
|
|
69
68
|
first = re.sub(r"^[\s#*>]+", "", first)
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
signed = next((name for name in (stations.designer, stations.verifier, stations.orchestrator)
|
|
70
|
+
if first.startswith(name)), None)
|
|
71
|
+
if signed:
|
|
72
|
+
return signed
|
|
73
|
+
return stations.executor if re.search(r"(?m)^[ \t]*Codex session:", body) else stations.user
|
|
72
74
|
|
|
73
75
|
|
|
74
76
|
def fields(body: str, config: Config) -> dict[str, str]:
|
|
@@ -279,3 +279,14 @@ def test_log_issue_must_be_positive(capsys):
|
|
|
279
279
|
with pytest.raises(SystemExit) as exc:
|
|
280
280
|
ding.main(["log", "--item", "a", "--issue", "0"])
|
|
281
281
|
assert exc.value.code == 2
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
@pytest.mark.parametrize("text", [None, CHINESE])
|
|
285
|
+
def test_a_quoted_session_signature_signs_nothing(tmp_path, text):
|
|
286
|
+
loaded = settings(tmp_path, text)
|
|
287
|
+
stations = loaded.stations
|
|
288
|
+
verifier = (f"## {stations.verifier}{stations.separator}#272 run request check\n\n"
|
|
289
|
+
"| request body | ok: it starts with the status block and contains `Codex session:` |\n")
|
|
290
|
+
assert watch.role(verifier, loaded) == stations.verifier
|
|
291
|
+
assert watch.role("I checked it; the body has `Codex session:` in it.", loaded) == stations.user
|
|
292
|
+
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
|