@christang/keel 5.95.2 → 5.95.3
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/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@christang/keel",
|
|
3
|
-
"version": "5.95.
|
|
3
|
+
"version": "5.95.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@christang/keel",
|
|
9
|
-
"version": "5.95.
|
|
9
|
+
"version": "5.95.3",
|
|
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.95.
|
|
3
|
+
"version": "5.95.3",
|
|
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.95.
|
|
3
|
+
"version": "5.95.3",
|
|
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",
|
|
@@ -47,8 +47,8 @@ REQUIRED_SCRIPTS = [
|
|
|
47
47
|
"scripts/validate_plugin.py",
|
|
48
48
|
]
|
|
49
49
|
|
|
50
|
-
PACKAGE_VERSION = "5.95.
|
|
51
|
-
PROTOCOL_VERSION = "5.95.
|
|
50
|
+
PACKAGE_VERSION = "5.95.3"
|
|
51
|
+
PROTOCOL_VERSION = "5.95.3"
|
|
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
|
|
@@ -4211,6 +4211,72 @@ def validate_chat_bridge_start_race_scenario() -> int:
|
|
|
4211
4211
|
return 0
|
|
4212
4212
|
|
|
4213
4213
|
|
|
4214
|
+
def validate_chat_owner_mention_scenario() -> int:
|
|
4215
|
+
"""Owner's rule of 2026-10-05: a Slack message the owner needs mentions them.
|
|
4216
|
+
|
|
4217
|
+
The session-start notice of a Slack-enabled project that names an owner
|
|
4218
|
+
tells the session to write `@owner` on what the owner needs to see or
|
|
4219
|
+
decide, and says nothing of it when no owner is named; a record with
|
|
4220
|
+
`@owner` is posted as a real mention; both setup guides state the rule.
|
|
4221
|
+
"""
|
|
4222
|
+
label = "chat-owner-mention:"
|
|
4223
|
+
if chat_bridge_node_missing("chat-owner-mention"):
|
|
4224
|
+
return 3
|
|
4225
|
+
FakeSlack = fake_slack_class()
|
|
4226
|
+
with tempfile.TemporaryDirectory(prefix="keel-chat-owner-") as raw, FakeSlack() as slack:
|
|
4227
|
+
base = Path(raw)
|
|
4228
|
+
rtl, _verify, env = chat_scratch_group(base)
|
|
4229
|
+
chat_slack_config(rtl, {"soc": "CSOC"})
|
|
4230
|
+
benv = chat_bridge_environment(env, base / "home", slack)
|
|
4231
|
+
|
|
4232
|
+
def notice() -> str:
|
|
4233
|
+
session = subprocess.run(
|
|
4234
|
+
["node", str(ROOT / PLUGIN_ROOT / "scripts/mail-hook.js"), "session-start"],
|
|
4235
|
+
cwd=rtl, env={**benv, "KEEL_CLI": f'node "{ROOT / "bin" / "keel.js"}"'},
|
|
4236
|
+
text=True, capture_output=True, check=False,
|
|
4237
|
+
input=json.dumps({"hook_event_name": "SessionStart", "cwd": str(rtl)}),
|
|
4238
|
+
)
|
|
4239
|
+
return chat_json(session).get("hookSpecificOutput", {}).get("additionalContext", "")
|
|
4240
|
+
|
|
4241
|
+
told = notice()
|
|
4242
|
+
if "@owner" not in told:
|
|
4243
|
+
report(f"{label} the session-start notice does not tell the session to write @owner: {told!r}")
|
|
4244
|
+
return 1
|
|
4245
|
+
if "decide" not in told:
|
|
4246
|
+
report(f"{label} the notice does not say which messages need @owner: {told!r}")
|
|
4247
|
+
return 1
|
|
4248
|
+
|
|
4249
|
+
run_keel(rtl, "chat", "bridge", "add", env=benv)
|
|
4250
|
+
record_id = chat_json(run_keel(rtl, "chat", "post", "soc", "@owner 需要你决定 CSR 复位值", "--json", env=benv)).get("id", "")
|
|
4251
|
+
once = run_keel(rtl, "chat", "bridge", "run", "--once", env=benv)
|
|
4252
|
+
posted = [c for c in slack.calls_to("chat.postMessage") if slack_payload(c).get("id") == record_id]
|
|
4253
|
+
if not posted:
|
|
4254
|
+
report(f"{label} the @owner record was not posted: {once.stderr.strip()}")
|
|
4255
|
+
return 1
|
|
4256
|
+
if not posted[0]["params"].get("text", "").startswith("<@UOWNER>"):
|
|
4257
|
+
report(f"{label} the @owner record was not posted as a mention: {posted[0]['params'].get('text')!r}")
|
|
4258
|
+
return 1
|
|
4259
|
+
|
|
4260
|
+
config = json.loads((rtl / "keel" / "chat.json").read_text(encoding="utf-8"))
|
|
4261
|
+
del config["slack"]["owner"]
|
|
4262
|
+
write_text(rtl / "keel" / "chat.json", json.dumps(config, indent=2) + "\n")
|
|
4263
|
+
untold = notice()
|
|
4264
|
+
if "@owner" in untold:
|
|
4265
|
+
report(f"{label} the notice asks for @owner although no owner is named: {untold!r}")
|
|
4266
|
+
return 1
|
|
4267
|
+
|
|
4268
|
+
for guide, needle in (("docs/chat-slack-setup.md", "needs to see or decide"), ("docs/chat-slack-setup.zh-CN.md", "需要你知道或决定")):
|
|
4269
|
+
if needle not in (ROOT / guide).read_text(encoding="utf-8"):
|
|
4270
|
+
report(f"{label} {guide} does not state the owner-mention rule ({needle!r}).")
|
|
4271
|
+
return 1
|
|
4272
|
+
|
|
4273
|
+
if "chat-owner-mention" not in {name for name, _ in SCENARIOS}:
|
|
4274
|
+
report(f"{label} scenario is not registered.")
|
|
4275
|
+
return 1
|
|
4276
|
+
report("chat-owner-mention scenario passed.")
|
|
4277
|
+
return 0
|
|
4278
|
+
|
|
4279
|
+
|
|
4214
4280
|
def validate_chat_archive_scenario() -> int:
|
|
4215
4281
|
"""Issue #187: chat history is archived to an orphan branch, never exposed.
|
|
4216
4282
|
|
|
@@ -36369,6 +36435,10 @@ SCENARIOS: tuple = (
|
|
|
36369
36435
|
"chat-bridge-start-race",
|
|
36370
36436
|
validate_chat_bridge_start_race_scenario,
|
|
36371
36437
|
),
|
|
36438
|
+
(
|
|
36439
|
+
"chat-owner-mention",
|
|
36440
|
+
validate_chat_owner_mention_scenario,
|
|
36441
|
+
),
|
|
36372
36442
|
(
|
|
36373
36443
|
"chat-role-apps",
|
|
36374
36444
|
validate_chat_role_apps_scenario,
|
package/src/core/chat/notice.js
CHANGED
|
@@ -132,14 +132,24 @@ function bridgeLine(where) {
|
|
|
132
132
|
}
|
|
133
133
|
if (!settings.enabled) return null;
|
|
134
134
|
const status = require("./bridge").fullStatus();
|
|
135
|
+
let line;
|
|
135
136
|
if (!status.running) {
|
|
136
|
-
|
|
137
|
+
line = "keel chat bridge: not running on this machine, so Slack messages are not reaching this session "
|
|
137
138
|
+ "(local chat still works). `keel chat bridge start`, or `keel chat bridge install` once, brings it up.";
|
|
139
|
+
} else if (status.paused) {
|
|
140
|
+
line = `keel chat bridge: paused until ${status.paused_until}; messages wait until then.`;
|
|
141
|
+
} else {
|
|
142
|
+
line = `keel chat bridge: running${status.connected ? " and connected" : ", reconnecting"}, serving ${status.projects.length} project${status.projects.length === 1 ? "" : "s"}.`;
|
|
138
143
|
}
|
|
139
|
-
|
|
140
|
-
return `keel chat bridge: running${status.connected ? " and connected" : ", reconnecting"}, serving ${status.projects.length} project${status.projects.length === 1 ? "" : "s"}.`;
|
|
144
|
+
return settings.owner ? `${line}\n${OWNER_RULE}` : line;
|
|
141
145
|
}
|
|
142
146
|
|
|
147
|
+
// The owner's rule of 2026-10-05 (chat-owner-mention D1-D3): Slack notifies
|
|
148
|
+
// the owner only for a mention, and the bridge mentions them only for
|
|
149
|
+
// `@owner`, so whether a message reaches their phone is the session's choice.
|
|
150
|
+
const OWNER_RULE = "Slack notifies the owner only for messages that write `@owner`: write it in any message the owner "
|
|
151
|
+
+ "needs to see or decide on, and leave it out of routine discussion.";
|
|
152
|
+
|
|
143
153
|
const HOST_EVENTS = {
|
|
144
154
|
"session-start": "SessionStart",
|
|
145
155
|
"user-prompt-submit": "UserPromptSubmit",
|