@christang/keel 5.105.0 → 5.105.1
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/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/plugins/keel/scripts/pretooluse-guard.js +1 -1
- package/scripts/validate_plugin.py +49 -2
- package/src/core/config.js +8 -5
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christang/keel",
|
|
3
|
-
"version": "5.105.
|
|
3
|
+
"version": "5.105.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@christang/keel",
|
|
9
|
-
"version": "5.105.
|
|
9
|
+
"version": "5.105.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@fission-ai/openspec": "^1.4.1"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keel",
|
|
3
|
-
"version": "5.105.
|
|
3
|
+
"version": "5.105.1",
|
|
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.105.
|
|
3
|
+
"version": "5.105.1",
|
|
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",
|
|
@@ -190,7 +190,7 @@ function readPushGlobs(top) {
|
|
|
190
190
|
}
|
|
191
191
|
if (!inBlock) continue;
|
|
192
192
|
if (!/^\s/.test(line)) break;
|
|
193
|
-
const entry = line.match(/^\s+-\s*push:(\S+)\s*$/);
|
|
193
|
+
const entry = line.replace(/\s+#.*$/, "").match(/^\s+-\s*push:(\S+)\s*$/);
|
|
194
194
|
if (entry) globs.push(entry[1]);
|
|
195
195
|
}
|
|
196
196
|
return globs;
|
|
@@ -47,8 +47,8 @@ REQUIRED_SCRIPTS = [
|
|
|
47
47
|
"scripts/validate_plugin.py",
|
|
48
48
|
]
|
|
49
49
|
|
|
50
|
-
PACKAGE_VERSION = "5.105.
|
|
51
|
-
PROTOCOL_VERSION = "5.105.
|
|
50
|
+
PACKAGE_VERSION = "5.105.1"
|
|
51
|
+
PROTOCOL_VERSION = "5.105.1"
|
|
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
|
|
@@ -24084,6 +24084,52 @@ def write_authorize_config(repo: Path, body: str) -> None:
|
|
|
24084
24084
|
(repo / "keel" / "config.yaml").write_text(body, encoding="utf-8")
|
|
24085
24085
|
|
|
24086
24086
|
|
|
24087
|
+
def validate_authorize_block_reads_every_line_scenario() -> int:
|
|
24088
|
+
"""Issue #275: no line of `authorize:` is dropped silently.
|
|
24089
|
+
|
|
24090
|
+
An item with a space used to end the block, dropping it and every later
|
|
24091
|
+
entry while doctor said ok; a trailing comment dropped its item too.
|
|
24092
|
+
"""
|
|
24093
|
+
label = "authorize-block-reads-every-line:"
|
|
24094
|
+
with tempfile.TemporaryDirectory(prefix="keel-authorize-275-") as raw_tmp:
|
|
24095
|
+
root = Path(raw_tmp)
|
|
24096
|
+
spaced = root / "spaced"
|
|
24097
|
+
spaced.mkdir()
|
|
24098
|
+
write_authorize_config(spaced, "authorize:\n - commit\n - push:main branch\n - release\n")
|
|
24099
|
+
doctor = run_keel(spaced, "--doctor")
|
|
24100
|
+
if doctor.returncode == 0:
|
|
24101
|
+
report(f"{label} an item with a space was not refused: {doctor.stdout}")
|
|
24102
|
+
return 1
|
|
24103
|
+
if "push:main branch" not in doctor.stdout + doctor.stderr:
|
|
24104
|
+
report(f"{label} the refusal does not name `push:main branch`: {doctor.stdout}")
|
|
24105
|
+
return 1
|
|
24106
|
+
if "commit: authorized" in doctor.stdout:
|
|
24107
|
+
report(f"{label} the entries beside the refused one stayed authorized.")
|
|
24108
|
+
return 1
|
|
24109
|
+
|
|
24110
|
+
commented = root / "commented"
|
|
24111
|
+
subprocess.run(["git", "init", "-q", "-b", "main", str(commented)], check=True, capture_output=True)
|
|
24112
|
+
write_authorize_config(
|
|
24113
|
+
commented,
|
|
24114
|
+
"authorize:\n - commit # owner, 2026-10-11\n - push:claude/* # sessions push their own branches\n",
|
|
24115
|
+
)
|
|
24116
|
+
out = run_keel(commented, "--doctor").stdout
|
|
24117
|
+
if "commit: authorized" not in out:
|
|
24118
|
+
report(f"{label} a trailing comment dropped `commit`: {out}")
|
|
24119
|
+
return 1
|
|
24120
|
+
push_line = next((l for l in out.splitlines() if l.strip().startswith("push:")), "")
|
|
24121
|
+
if "claude/*" not in push_line or "#" in push_line:
|
|
24122
|
+
report(f"{label} the push line does not read the glob without its comment: {push_line!r}")
|
|
24123
|
+
return 1
|
|
24124
|
+
event = {"tool_name": "Bash", "tool_input": {"command": "git push origin HEAD:main"}, "cwd": str(commented)}
|
|
24125
|
+
decision = pretooluse_decision(run_pretooluse_guard_hook(commented, event))
|
|
24126
|
+
if not decision or decision.get("permissionDecision") != "deny":
|
|
24127
|
+
report(f"{label} the push guard did not read a commented glob: {decision!r}")
|
|
24128
|
+
return 1
|
|
24129
|
+
report("authorize-block-reads-every-line scenario passed.")
|
|
24130
|
+
return 0
|
|
24131
|
+
|
|
24132
|
+
|
|
24087
24133
|
def validate_authorize_push_close_cleanup_scenario() -> int:
|
|
24088
24134
|
"""Issue #257: `push:<glob>`, `issue-close:<owner>/<repo>`, `cleanup:scratch`.
|
|
24089
24135
|
|
|
@@ -38147,6 +38193,7 @@ SCENARIOS: tuple = (
|
|
|
38147
38193
|
validate_standing_authorization_declaration_scenario,
|
|
38148
38194
|
),
|
|
38149
38195
|
("authorize-push-close-cleanup", validate_authorize_push_close_cleanup_scenario),
|
|
38196
|
+
("authorize-block-reads-every-line", validate_authorize_block_reads_every_line_scenario),
|
|
38150
38197
|
(
|
|
38151
38198
|
"standing-authorization-sync-confusion",
|
|
38152
38199
|
validate_standing_authorization_sync_confusion_scenario,
|
package/src/core/config.js
CHANGED
|
@@ -144,11 +144,14 @@ function configList(repo, key) {
|
|
|
144
144
|
}
|
|
145
145
|
if (!inBlock) continue;
|
|
146
146
|
if (line.trim() === "") continue;
|
|
147
|
-
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
// Only a line at column zero closes the block: the next top-level key
|
|
148
|
+
// belongs to the rest of the file. Every indented line is an entry, read
|
|
149
|
+
// whole, so one Keel cannot use is refused by name rather than ending the
|
|
150
|
+
// block and dropping itself and everything after it unseen (#275).
|
|
151
|
+
if (!/^\s/.test(line)) break;
|
|
152
|
+
const text = line.replace(/\s+#.*$/, "").trim();
|
|
153
|
+
const entry = text.replace(/^-\s*/, "");
|
|
154
|
+
if (entry) entries.push(entry);
|
|
152
155
|
}
|
|
153
156
|
return entries;
|
|
154
157
|
}
|