@ethlete/agent-rules 0.1.0-next.44 → 0.1.0-next.46

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/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @ethlete/agent-rules
2
2
 
3
+ ## 0.1.0-next.46
4
+
5
+ ### Patch Changes
6
+
7
+ - The `builder-idle-check` hook no longer counts a subagent as done when it stopped to wait on its own background work.
8
+ - A failed `et design sketch check` now ends with a line telling the agent to fix the cause in its variant files and draw every variant, and the design-exploration guide says a stub variant is not done.
9
+ - `sketch ready` refuses interactions in round 1 of a new part and demands them in the round after the pick (`INTERACTION-ROUND`).
10
+
11
+ ## 0.1.0-next.45
12
+
13
+ ### Minor Changes
14
+
15
+ - New opt-in `builder-idle-check` Stop hook: a builder session that ends a turn with nothing running while `plans/QUEUE.md` has open Builder rows is sent back to work, with those rows named.
16
+ - Restore the `away-mode` hook and the `awayMode` config key, including the report on return.
17
+
18
+ ### Patch Changes
19
+
20
+ - `agent-sessions run` and `restart` no longer refuse a command that sets CLAUDE_CONFIG_DIR when the caller is a human shell (no CLAUDECODE, no CLAUDE_CONFIG_DIR), so `claude2` starts from a plain terminal.
21
+ - `et design sketch check` warns when a state draws a title next to an `<img data-et-carries-title>`, a picture with the title baked in.
22
+ - `sync` registers the `design-live-check` hook in every repo with `.ethlete/design/config.json`, without the repo listing it in `hooks`. Before, no repo turned it on, so a design agent never got its live findings.
23
+ - `et design product new --colors` registers an error and a warning colour theme, so a danger button no longer falls back to the accent.
24
+ - `design sketch check` now also catches an element a variant draws in an existing part's root class or tag under another prefix (`<span class="tsh-badge">Serie</span>` for `et-badge`) as an inline rebuild, and checks only parts the drawing layer may embed.
25
+ - The sketch check fails a variant that draws an existing part inline (`<span>${FIXTURE.badge}</span>` beside the SDK badge) unless it embeds the part or the target states the difference.
26
+ - A parent sketch merge now also writes each approved sub-sketch's `shared/` and asset changes, and refuses when two of its sketches change the same file.
27
+ - A parent sketch merges together with its sub-sketches once every one is approved; until then each merge path refuses it.
28
+ - Picking another variant of a parent sketch now discards the sub-sketches it no longer marks, after a confirmation in `sketch pick` (`--discard-sub-sketches`) and in Studio.
29
+ - Marked sub-parts may differ between composition variants, a name match with an existing part needs `--not-rebuild-of` and a stated difference, a mark change reopens a ready sketch, and Studio shows the marks at the variant header.
30
+ - `et design studio open` keeps its request when Studio is not running and exits 3 (queued); Studio adds the checkout at its next start and drops requests older than 7 days or whose checkout lost its design config.
31
+ - `sketch check` warns when a state uses an `et-color--<name>` class that no foundation of the product defines, and names the defined ones, instead of letting it fall back to the accent silently.
32
+
3
33
  ## 0.1.0-next.44
4
34
 
5
35
  ### Minor Changes
package/README.md CHANGED
@@ -312,7 +312,7 @@ per hook in the config:
312
312
 
313
313
  ```json
314
314
  {
315
- "hooks": ["context-warning", "subagent-model-policy", "background-design-commands", "git-safety"]
315
+ "hooks": ["context-warning", "subagent-model-policy", "background-design-commands", "git-safety", "away-mode"]
316
316
  }
317
317
  ```
318
318
 
@@ -374,6 +374,24 @@ Available hooks:
374
374
  user knows whether the task is judgment-heavy. A fork and an agent type whose own
375
375
  definition sets a model both pass untouched, because `model` would change nothing there.
376
376
 
377
+ - **`builder-idle-check`** (Claude Code only) - a `Stop` hook for the builder session (the
378
+ one that ran the `builder-agent` skill or `/handoff resume builder-...`). When a turn ends
379
+ with no subagent and no background command running - a CI watcher (`gh run watch`, a
380
+ `gh run view` poll loop) or a dev server does not count - while `plans/QUEUE.md` has open
381
+ rows owned by `Builder` without a wait reason, it blocks the stop and names those rows. A
382
+ row waits when its `Stand` cell contains "wartet auf" or "Offen nur:". It fires once per
383
+ idle stop chain (`stop_hook_active` passes).
384
+
385
+ - **`away-mode`** (Claude Code only) - switches an interactive session into "user is away" mode
386
+ on its own. Opt in with `"awayMode": { "skills": ["my-skill"], "thresholdMinutes": 15 }` in the
387
+ config (the local config overrides it); a session is tracked once a prompt starts with
388
+ `/my-skill`. When a prompt that is not typed by a human (mailbox, cross-session, task
389
+ notification, restart) arrives after the threshold without typed input, the hook tells the
390
+ agent the user is away; the next typed prompt tells it the user is back. A typed `afk` marks
391
+ the session away at once. With `"reportCommand": "<cli> report"` inside `awayMode`, the back
392
+ message also carries that command's table since the last typed input (dropped when it fails or
393
+ takes over 10 s). State is kept in `.git/ethlete/away/`.
394
+
377
395
  Hooks can be turned off per machine - see the local config below.
378
396
 
379
397
  ## Mods (Claude Code)
@@ -0,0 +1,287 @@
1
+ #!/usr/bin/env python3
2
+ """UserPromptSubmit hook: switch an interactive session into "user is away" mode on its own.
3
+
4
+ A session opts in through `awayMode` in ethlete-agents.config.json (the local config file
5
+ overrides it): {"awayMode": {"skills": ["doc-agent"], "thresholdMinutes": 15}}. Without `skills`
6
+ the hook does nothing. A session becomes active when a prompt starts with `/<skill>` or with
7
+ `/handoff resume <skill>-`.
8
+
9
+ Prompts the agent sessions send themselves (mailbox messages, cross-session messages, task
10
+ notifications, system reminders, the restart prompt) are not human input. The last human-typed
11
+ prompt is stored per session; when a non-human prompt arrives after the threshold, the hook injects
12
+ the away message once and a one-line reminder afterwards. The next human-typed prompt injects the
13
+ back message; with `awayMode.reportCommand` (e.g. `node dist/libs/agent-rules/src/index.js report`)
14
+ it also carries that command's table for the time away (`--since <last typed input>`), left out when the
15
+ command fails or takes over 10 s. A human prompt that is exactly `afk` marks the session away at once.
16
+
17
+ State lives in `<git common dir>/ethlete/away/<session_id>.json`, so it is never committed.
18
+
19
+ Can be disabled per machine via a gitignored ethlete-agents.config.local.json at the repo root:
20
+ {"disableHooks": true} or {"disableHooks": ["away-mode"]}.
21
+
22
+ Fail-safe: any error exits 0 with no output - the hook must never block work because it could
23
+ not read its own input.
24
+ """
25
+
26
+ import json
27
+ import os
28
+ import re
29
+ import shlex
30
+ import subprocess
31
+ import sys
32
+ from datetime import datetime, timezone
33
+
34
+ HOOK_NAME = "away-mode"
35
+ CONFIG_FILE = "ethlete-agents.config.json"
36
+ LOCAL_CONFIG_FILE = "ethlete-agents.config.local.json"
37
+ DEFAULT_THRESHOLD_MINUTES = 15
38
+ AGENT_SESSIONS_SUFFIX = "[typed by agent-sessions]"
39
+
40
+ BACK_MESSAGE = (
41
+ "The user is back (typed input after {minutes} min away). Leave away mode: put every question you "
42
+ "collected while they were away once, in full, in your round format."
43
+ )
44
+ AWAY_MESSAGE = (
45
+ "The user is away (no typed input for {minutes} min). Work by your skill's away rules: collect "
46
+ "questions, one short line per event, no round. Typed input switches back on its own."
47
+ )
48
+ BACK_REPORT_MESSAGE = (
49
+ " Paste this report for the time away unchanged, then the collected questions:\n\n{report}"
50
+ )
51
+ REPORT_TIMEOUT_SECONDS = 10
52
+ STILL_AWAY_MESSAGE = "The user is still away (no typed input for {minutes} min)."
53
+
54
+
55
+ def agent_name(argv):
56
+ """The --agent value, defaulting to claude — older registrations pass no flag."""
57
+ for index, arg in enumerate(argv):
58
+ if arg == "--agent" and index + 1 < len(argv):
59
+ return argv[index + 1]
60
+ if arg.startswith("--agent="):
61
+ return arg.split("=", 1)[1]
62
+ return "claude"
63
+
64
+
65
+ def repo_root(data):
66
+ """Repo root: the env var the agent sets, else the script's own location, else the cwd."""
67
+ for variable in ("CLAUDE_PROJECT_DIR", "CODEX_PROJECT_DIR"):
68
+ value = os.environ.get(variable)
69
+ if value:
70
+ return value
71
+ here = os.path.abspath(__file__)
72
+ derived = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(here))))
73
+ if os.path.isfile(os.path.join(derived, LOCAL_CONFIG_FILE)):
74
+ return derived
75
+ cwd = data.get("cwd")
76
+ return cwd if isinstance(cwd, str) and cwd else derived
77
+
78
+
79
+ def load_config(root, file_name):
80
+ """Parsed JSON object at the repo root, or {} if missing/unreadable."""
81
+ if not root:
82
+ return {}
83
+ try:
84
+ with open(os.path.join(root, file_name), encoding="utf-8") as f:
85
+ config = json.load(f)
86
+ except (OSError, ValueError, AttributeError):
87
+ return {}
88
+ return config if isinstance(config, dict) else {}
89
+
90
+
91
+ def load_local_config(root):
92
+ return load_config(root, LOCAL_CONFIG_FILE)
93
+
94
+
95
+ def disabled_locally(config):
96
+ """True when the local config disables this hook (or all hooks) on this machine."""
97
+ disabled = config.get("disableHooks")
98
+ return disabled is True or (isinstance(disabled, list) and HOOK_NAME in disabled)
99
+
100
+
101
+ def away_settings(root, local_config):
102
+ """(skills, threshold in minutes); the local config's `awayMode` replaces the shared one."""
103
+ setting = local_config.get("awayMode")
104
+ if not isinstance(setting, dict):
105
+ setting = load_config(root, CONFIG_FILE).get("awayMode")
106
+ if not isinstance(setting, dict):
107
+ return [], DEFAULT_THRESHOLD_MINUTES
108
+ skills = setting.get("skills")
109
+ skills = [s for s in skills if isinstance(s, str) and s] if isinstance(skills, list) else []
110
+ threshold = setting.get("thresholdMinutes")
111
+ if isinstance(threshold, bool) or not isinstance(threshold, (int, float)) or threshold <= 0:
112
+ threshold = DEFAULT_THRESHOLD_MINUTES
113
+ return skills, threshold
114
+
115
+
116
+ def report_command(root, local_config):
117
+ """The configured report command; the local config's `awayMode` replaces the shared one."""
118
+ setting = local_config.get("awayMode")
119
+ if not isinstance(setting, dict):
120
+ setting = load_config(root, CONFIG_FILE).get("awayMode")
121
+ command = setting.get("reportCommand") if isinstance(setting, dict) else None
122
+ return command.strip() if isinstance(command, str) and command.strip() else None
123
+
124
+
125
+ def away_report(root, command, since):
126
+ """The report table since `since`, or None when the command is missing, fails or is too slow."""
127
+ if not command or not since:
128
+ return None
129
+ try:
130
+ result = subprocess.run(
131
+ shlex.split(command) + ["--since", since],
132
+ cwd=root,
133
+ capture_output=True,
134
+ text=True,
135
+ timeout=REPORT_TIMEOUT_SECONDS,
136
+ )
137
+ except Exception:
138
+ return None
139
+ output = result.stdout.strip()
140
+ return output if result.returncode == 0 and output else None
141
+
142
+
143
+ def is_human_typed(prompt):
144
+ stripped = prompt.strip()
145
+ return not (
146
+ stripped.startswith("Mailbox message from ")
147
+ or "<cross-session-message" in stripped
148
+ or stripped.endswith(AGENT_SESSIONS_SUFFIX)
149
+ or stripped.startswith("<task-notification")
150
+ or stripped.startswith("<system-reminder")
151
+ )
152
+
153
+
154
+ def invokes_skill(prompt, skills):
155
+ text = prompt.strip()
156
+ if text.endswith(AGENT_SESSIONS_SUFFIX):
157
+ text = text[: -len(AGENT_SESSIONS_SUFFIX)].strip()
158
+ for skill in skills:
159
+ name = re.escape(skill)
160
+ if re.match(rf"/{name}(?![\w-])", text) or re.match(rf"/handoff\s+resume\s+{name}-", text):
161
+ return True
162
+ return False
163
+
164
+
165
+ def state_path(root, session_id):
166
+ result = subprocess.run(
167
+ ["git", "-C", root, "rev-parse", "--path-format=absolute", "--git-common-dir"],
168
+ capture_output=True,
169
+ text=True,
170
+ timeout=3,
171
+ )
172
+ common_dir = result.stdout.strip() if result.returncode == 0 else ""
173
+ if not common_dir:
174
+ return None
175
+ safe_id = re.sub(r"[^\w.-]", "_", str(session_id))
176
+ return os.path.join(common_dir, "ethlete", "away", f"{safe_id}.json")
177
+
178
+
179
+ def read_state(path):
180
+ try:
181
+ with open(path, encoding="utf-8") as f:
182
+ state = json.load(f)
183
+ except (OSError, ValueError):
184
+ return None
185
+ return state if isinstance(state, dict) else None
186
+
187
+
188
+ def write_state(path, state):
189
+ os.makedirs(os.path.dirname(path), exist_ok=True)
190
+ with open(path, "w", encoding="utf-8") as f:
191
+ json.dump(state, f)
192
+
193
+
194
+ def minutes_since(iso, now):
195
+ try:
196
+ then = datetime.fromisoformat(iso)
197
+ except (TypeError, ValueError):
198
+ return None
199
+ if then.tzinfo is None:
200
+ then = then.replace(tzinfo=timezone.utc)
201
+ return max(0, int((now - then).total_seconds() // 60))
202
+
203
+
204
+ def emit(message):
205
+ print(
206
+ json.dumps(
207
+ {"hookSpecificOutput": {"hookEventName": "UserPromptSubmit", "additionalContext": message}}
208
+ )
209
+ )
210
+
211
+
212
+ def main():
213
+ if agent_name(sys.argv[1:]) != "claude":
214
+ return
215
+
216
+ data = json.load(sys.stdin)
217
+ prompt = data.get("prompt")
218
+ session_id = data.get("session_id")
219
+
220
+ if not isinstance(prompt, str) or not session_id:
221
+ return
222
+
223
+ root = repo_root(data)
224
+ local_config = load_local_config(root)
225
+
226
+ if disabled_locally(local_config):
227
+ return
228
+
229
+ skills, threshold = away_settings(root, local_config)
230
+
231
+ if not skills:
232
+ return
233
+
234
+ path = state_path(root, session_id)
235
+
236
+ if not path:
237
+ return
238
+
239
+ now = datetime.now(timezone.utc)
240
+ now_iso = now.isoformat(timespec="seconds")
241
+ state = read_state(path)
242
+ human = is_human_typed(prompt)
243
+
244
+ if not state or not state.get("active"):
245
+ if not invokes_skill(prompt, skills):
246
+ return
247
+ state = {"active": True, "lastHumanInput": now_iso if human else None, "away": False}
248
+ write_state(path, state)
249
+ return
250
+
251
+ if human:
252
+ was_away = state.get("away") is True
253
+ since = state.get("lastHumanInput")
254
+ minutes = minutes_since(since, now)
255
+ state["lastHumanInput"] = now_iso
256
+ state["away"] = prompt.strip().lower() == "afk"
257
+ write_state(path, state)
258
+ if was_away and not state["away"]:
259
+ message = BACK_MESSAGE.format(minutes=minutes if minutes is not None else threshold)
260
+ report = away_report(root, report_command(root, local_config), since)
261
+ if report:
262
+ message += BACK_REPORT_MESSAGE.format(report=report)
263
+ emit(message)
264
+ return
265
+
266
+ minutes = minutes_since(state.get("lastHumanInput"), now)
267
+
268
+ if minutes is not None and minutes < threshold:
269
+ return
270
+
271
+ shown = minutes if minutes is not None else int(threshold)
272
+
273
+ if state.get("away") is True:
274
+ emit(STILL_AWAY_MESSAGE.format(minutes=shown))
275
+ return
276
+
277
+ state["away"] = True
278
+ write_state(path, state)
279
+ emit(AWAY_MESSAGE.format(minutes=shown))
280
+
281
+
282
+ if __name__ == "__main__":
283
+ try:
284
+ main()
285
+ except Exception:
286
+ pass
287
+ sys.exit(0)
@@ -0,0 +1,256 @@
1
+ #!/usr/bin/env python3
2
+ """Stop hook: keep a builder session working while the queue has rows for it.
3
+
4
+ A builder session (one that ran the `builder-agent` skill, or `/handoff resume
5
+ builder-...`) must not end a turn idle. When a turn ends with no subagent and no
6
+ background command running - a CI watcher or a dev server does not count - and `plans/QUEUE.md`
7
+ has open rows owned by `Builder` without a wait reason, the stop is blocked and
8
+ the reason names those rows, so the turn goes on.
9
+
10
+ Running work comes from the transcript: every background Bash, Monitor and
11
+ async Agent start, minus every task-notification and every TaskStop for it. A
12
+ notification that says the agent "is waiting on its own background work" does not end it: the
13
+ agent has not handed back yet and notifies again when it does.
14
+
15
+ A row waits when its `Stand` cell contains "wartet auf" or "Offen nur:"
16
+ (case-insensitive). Rows owned by anyone else are skipped.
17
+
18
+ Fires at most once per idle stop chain: a stop that a Stop hook already
19
+ continued (`stop_hook_active`) passes.
20
+
21
+ Can be disabled per machine via a gitignored ethlete-agents.config.local.json at
22
+ the repo root: {"disableHooks": true} or {"disableHooks": ["builder-idle-check"]}.
23
+
24
+ Fail-safe: any error exits 0 with no output.
25
+ """
26
+
27
+ import json
28
+ import os
29
+ import re
30
+ import sys
31
+ from datetime import datetime
32
+
33
+ HOOK_NAME = "builder-idle-check"
34
+ LOCAL_CONFIG_FILE = "ethlete-agents.config.local.json"
35
+ QUEUE_FILE = os.path.join("plans", "QUEUE.md")
36
+ QUEUE_OWNER = "Builder"
37
+ WAIT_MARKERS = ("wartet auf", "offen nur:")
38
+
39
+ BUILDER_LAUNCH = re.compile(
40
+ r"Base directory for this skill: \S*/skills/builder-agent\b"
41
+ r"|<command-name>/builder-agent</command-name>"
42
+ r"|<command-args>\s*resume\s+builder\b"
43
+ )
44
+ OTHER_ROLE_LAUNCH = re.compile(
45
+ r"Base directory for this skill: \S*/skills/doc-agent\b"
46
+ r"|<command-name>/doc-agent</command-name>"
47
+ r"|<command-args>\s*resume\s+doc\b"
48
+ )
49
+ WATCHER_COMMAND = re.compile(
50
+ r"\bgh\s+run\s+watch\b"
51
+ r"|\bgh\s+pr\s+checks\b[^\n]*--watch\b"
52
+ r"|\bglab\s+ci\s+(?:status|view)\b[^\n]*--live\b"
53
+ )
54
+ SERVER_COMMAND = re.compile(
55
+ r"\b(?:npm|yarn)\s+(?:run\s+)?(?:storybook|serve|start|dev)\b"
56
+ r"|\bnx\s+(?:serve\b|run\s+\S+:(?:serve|storybook)\b)"
57
+ r"|\bstorybook\s+dev\b"
58
+ )
59
+ CI_POLL = re.compile(r"\b(?:gh\s+run\s+(?:view|list)|glab\s+ci\s+(?:status|list|get))\b")
60
+ LOOP = re.compile(r"\b(?:while|until|for)\b")
61
+ NOTIFICATION = re.compile(r"<task-notification>(.*?)</task-notification>", re.S)
62
+ WAITING_SUMMARY = re.compile(r"<summary>[^<]*is waiting on its own background work")
63
+ NOTIFICATION_IDS = re.compile(r"<(?:task-id|tool-use-id)>([^<]+)</(?:task-id|tool-use-id)>")
64
+ LINE_HINTS = ("tool_use", "task-notification", "builder", "doc-agent", "resume")
65
+
66
+
67
+ def repo_root(data):
68
+ value = os.environ.get("CLAUDE_PROJECT_DIR")
69
+ if value:
70
+ return value
71
+ cwd = data.get("cwd")
72
+ return cwd if isinstance(cwd, str) and cwd else os.getcwd()
73
+
74
+
75
+ def disabled_locally(root):
76
+ try:
77
+ with open(os.path.join(root, LOCAL_CONFIG_FILE), encoding="utf-8") as f:
78
+ config = json.load(f)
79
+ except (OSError, ValueError):
80
+ return False
81
+ disabled = config.get("disableHooks") if isinstance(config, dict) else None
82
+ return disabled is True or (isinstance(disabled, list) and HOOK_NAME in disabled)
83
+
84
+
85
+ def is_watcher(command):
86
+ if WATCHER_COMMAND.search(command) or SERVER_COMMAND.search(command):
87
+ return True
88
+ return bool(CI_POLL.search(command) and LOOP.search(command) and "sleep" in command)
89
+
90
+
91
+ def parse_time(value):
92
+ try:
93
+ return datetime.fromisoformat(value.replace("Z", "+00:00")).timestamp()
94
+ except (AttributeError, ValueError):
95
+ return None
96
+
97
+
98
+ def texts_of(content):
99
+ if isinstance(content, str):
100
+ return [content]
101
+ if isinstance(content, list):
102
+ return [item.get("text", "") for item in content if isinstance(item, dict) and item.get("type") == "text"]
103
+ return []
104
+
105
+
106
+ def read_transcript(path):
107
+ state = {"builder": False, "tool_uses": {}, "tasks": {}, "done": set(), "now": None}
108
+ with open(path, encoding="utf-8") as f:
109
+ for raw in f:
110
+ if not any(hint in raw for hint in LINE_HINTS):
111
+ continue
112
+ for chunk in NOTIFICATION.findall(raw.replace("\\n", "\n")):
113
+ if not WAITING_SUMMARY.search(chunk):
114
+ state["done"].update(NOTIFICATION_IDS.findall(chunk))
115
+ try:
116
+ line = json.loads(raw)
117
+ except ValueError:
118
+ continue
119
+ if not isinstance(line, dict) or line.get("isSidechain") or line.get("type") not in ("user", "assistant"):
120
+ continue
121
+ state["now"] = parse_time(line.get("timestamp")) or state["now"]
122
+ message = line.get("message") or {}
123
+ content = message.get("content")
124
+ if line["type"] == "user":
125
+ read_user_line(state, line, content)
126
+ else:
127
+ read_assistant_line(state, content)
128
+ return state
129
+
130
+
131
+ def read_user_line(state, line, content):
132
+ for text in texts_of(content):
133
+ if BUILDER_LAUNCH.search(text):
134
+ state["builder"] = True
135
+ elif OTHER_ROLE_LAUNCH.search(text):
136
+ state["builder"] = False
137
+ if not isinstance(content, list):
138
+ return
139
+ result = line.get("toolUseResult")
140
+ if not isinstance(result, dict):
141
+ return
142
+ for item in content:
143
+ if not isinstance(item, dict) or item.get("type") != "tool_result":
144
+ continue
145
+ use = state["tool_uses"].get(item.get("tool_use_id"))
146
+ if not use:
147
+ continue
148
+ name, tool_input = use
149
+ task_id = result.get("backgroundTaskId") or result.get("taskId")
150
+ if task_id and name in ("Bash", "Monitor"):
151
+ started = parse_time(line.get("timestamp"))
152
+ timeout = result.get("timeoutMs")
153
+ state["tasks"][task_id] = {
154
+ "kind": "command",
155
+ "tool_use_id": item.get("tool_use_id"),
156
+ "label": tool_input.get("description") or tool_input.get("command", "")[:80],
157
+ "watcher": is_watcher(tool_input.get("command", "")),
158
+ "ends": started + timeout / 1000 if started and isinstance(timeout, (int, float)) else None,
159
+ }
160
+ elif result.get("agentId") and (result.get("isAsync") or result.get("status") == "async_launched"):
161
+ state["tasks"][result["agentId"]] = {
162
+ "kind": "agent",
163
+ "tool_use_id": item.get("tool_use_id"),
164
+ "label": tool_input.get("description", ""),
165
+ "watcher": False,
166
+ "ends": None,
167
+ }
168
+
169
+
170
+ def read_assistant_line(state, content):
171
+ if not isinstance(content, list):
172
+ return
173
+ for item in content:
174
+ if not isinstance(item, dict) or item.get("type") != "tool_use":
175
+ continue
176
+ tool_input = item.get("input") if isinstance(item.get("input"), dict) else {}
177
+ state["tool_uses"][item.get("id")] = (item.get("name"), tool_input)
178
+ if item.get("name") == "Skill" and tool_input.get("skill") == "builder-agent":
179
+ state["builder"] = True
180
+ elif item.get("name") == "Skill" and tool_input.get("skill") == "doc-agent":
181
+ state["builder"] = False
182
+ elif item.get("name") == "TaskStop":
183
+ state["done"].update(str(tool_input.get(key)) for key in ("task_id", "shell_id") if tool_input.get(key))
184
+
185
+
186
+ def running_tasks(state):
187
+ now = state["now"]
188
+ return [
189
+ task
190
+ for task_id, task in state["tasks"].items()
191
+ if task_id not in state["done"]
192
+ and task["tool_use_id"] not in state["done"]
193
+ and not (task["ends"] and now and now >= task["ends"])
194
+ ]
195
+
196
+
197
+ def waits(stand):
198
+ lowered = stand.lower()
199
+ return any(marker in lowered for marker in WAIT_MARKERS)
200
+
201
+
202
+ def open_builder_rows(queue_text):
203
+ rows = []
204
+ stand_index = None
205
+ for raw in queue_text.splitlines():
206
+ if not raw.startswith("|"):
207
+ continue
208
+ cells = [cell.strip() for cell in raw.strip().strip("|").split("|")]
209
+ if cells and cells[0] == "ID":
210
+ stand_index = cells.index("Stand") if "Stand" in cells else None
211
+ continue
212
+ if stand_index is None or len(cells) <= stand_index or not re.fullmatch(r"[A-Z]+\d+", cells[0]):
213
+ continue
214
+ if cells[-1] == QUEUE_OWNER and not waits(cells[stand_index]):
215
+ rows.append(f"{cells[0]} ({cells[1]})")
216
+ return rows
217
+
218
+
219
+ def reason_for(rows, watchers):
220
+ watching = f" (still watching: {', '.join(watchers)})" if watchers else ""
221
+ return (
222
+ f"[{HOOK_NAME} hook] This turn ends with no subagent and no background command running apart from CI watchers and dev servers{watching}, "
223
+ f"while plans/QUEUE.md has open Builder rows without a wait reason: {', '.join(rows)}. "
224
+ "Do not wait idle: take the first of them now, or start a subagent on it. "
225
+ 'A row waits when its Stand cell contains "wartet auf" or "Offen nur:"; if a row really waits, '
226
+ "write the reason into its Stand cell. This hook fires once per idle stop."
227
+ )
228
+
229
+
230
+ def main():
231
+ try:
232
+ data = json.load(sys.stdin)
233
+ if not isinstance(data, dict) or data.get("stop_hook_active"):
234
+ return
235
+ root = repo_root(data)
236
+ transcript_path = data.get("transcript_path")
237
+ if disabled_locally(root) or not isinstance(transcript_path, str):
238
+ return
239
+ state = read_transcript(transcript_path)
240
+ if not state["builder"]:
241
+ return
242
+ running = running_tasks(state)
243
+ if any(not task["watcher"] for task in running):
244
+ return
245
+ with open(os.path.join(root, QUEUE_FILE), encoding="utf-8") as f:
246
+ rows = open_builder_rows(f.read())
247
+ if not rows:
248
+ return
249
+ watchers = [task["label"] for task in running]
250
+ print(json.dumps({"decision": "block", "reason": reason_for(rows, watchers)}))
251
+ except Exception:
252
+ return
253
+
254
+
255
+ if __name__ == "__main__":
256
+ main()
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "e2e-progress",
3
- "version": "0.1.0-next.44",
3
+ "version": "0.1.0-next.46",
4
4
  "description": "Live Playwright e2e progress from a run log, as a status line entry and a pane",
5
5
  "types": "./types/index.d.ts"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "status-line",
3
- "version": "0.1.0-next.44",
3
+ "version": "0.1.0-next.46",
4
4
  "description": "Always-visible band with the running task, its duration, the open queue, open questions and a CI blocked mark",
5
5
  "types": "./types/index.d.ts"
6
6
  }
@@ -218,7 +218,9 @@ const ENV_WORD = /^[A-Za-z_][A-Za-z0-9_]*=/;
218
218
  const CONFIG_WORD = 'CLAUDE_CONFIG_DIR=';
219
219
  const callerConfigDir = () => resolve(process.env.CLAUDE_CONFIG_DIR || join(homedir(), '.claude'));
220
220
  const configDirOf = (words) => words.find((word) => word.startsWith(CONFIG_WORD))?.slice(CONFIG_WORD.length);
221
+ const callerIsAgent = () => Boolean(process.env.CLAUDECODE || process.env.CLAUDE_CONFIG_DIR);
221
222
  const configMismatch = (words) => {
223
+ if (!callerIsAgent()) return false;
222
224
  const given = configDirOf(words);
223
225
  return given !== undefined && resolve(given) !== callerConfigDir();
224
226
  };
@@ -69,7 +69,7 @@ user reads and decides in Ethlete Studio. The tool is `et design`, from `@ethlet
69
69
  In the SDK checkout, `yarn design` builds the CLI before each call; in a check-and-shot loop,
70
70
  build once and call `node dist/libs/cli/src/index.js design`.
71
71
  Ask the user, then run `et design studio open` to show your checkout in Studio. If it is not
72
- running, the user opens it; run again. In a client run (`CLEAN_SLATE_SANDBOX` is set) the
72
+ running, the request is kept for 7 days and Studio adds the checkout at its next start (exit 3, queued). In a client run (`CLEAN_SLATE_SANDBOX` is set) the
73
73
  command refuses: a run must not write the user's Studio roots, so the user opens the run's checkout.
74
74
 
75
75
  ```
@@ -29,6 +29,10 @@ product, part, state, size and a selector path:
29
29
  - `UNKNOWN-THEME` - a `et-color--<name>` class names a colour theme no stylesheet of the frame defines, so it draws in the fallback colour.
30
30
  - `RENDER` - the frame refused to draw, or the part did not load.
31
31
 
32
+ A failed `sketch check` is yours to fix first: a `TYPE-ERROR` or a missing export usually comes from your variant files, so
33
+ correct them and run it again. Draw every variant of the sketch; a variant left as the stub `sketch new` wrote fails
34
+ `STATE-SENTENCE` and `sketch ready` refuses it. Report a tool fault only when the refusal is not caused by your files.
35
+
32
36
  A `WARNING` line does not fail the check:
33
37
 
34
38
  - `UNDEFINED-CLASS` - a class carries a prefix the product's part CSS uses (`st-`, not the SDK's
@@ -39,6 +39,11 @@ from `@design-system` and spread the result into `definePart`; never write those
39
39
  Draw the interactions once, on the first row. A row that only changes content, such as a badge, a longer title or a
40
40
  missing logo, is drawn only at rest: name it in `restOnly: ['series']`. `sketch ready` refuses a content row whose
41
41
  interactions look the same as the first row's as `INTERACTION-REPEAT`.
42
+ The first sketch of a new part draws every variant only at rest, one state per content. Once the user picks a base
43
+ variant, open a second round from it (`sketch variant <layer>/<name> <key> --from <picked> --round <title> --note <why>`)
44
+ and draw hover, active, focus-visible and disabled there, for that variant only. `sketch ready` refuses interactions in
45
+ round 1 of a new part, and a missing one in a later round, as `INTERACTION-ROUND`; drop an interaction the part cannot
46
+ have with `sketch round <layer>/<name> <round> --drops <interaction>`.
42
47
  `sketch check` prints `grid <rows> x <columns> ok`, or the states the grid leaves out; a state in two cells
43
48
  fails it as `GRID`, in `design check` too.
44
49
  Interaction states (a state name whose last word is hover, focus, pressed, active or selected, such as `row-hover`) live only on a control
@@ -105,7 +110,9 @@ stylesheet. Give a raised or floating area `data-et-auto-surface` and an interac
105
110
  `data-et-surface-interactive`, never a picked `et-surface--<name>` class: the frame resolves them by elevation like
106
111
  `etAutoSurface` and `etSurfaceInteractive`. Give a warning, error or success accent
107
112
  `data-et-semantic-color="<type>"`, never a picked `et-color--<name>` class: the frame resolves it by type like
108
- `injectSemanticColorTheme`. Read the theming skill of the SDK before the first colour in a drawing. `et design check` reports
113
+ `injectSemanticColorTheme`. A generated colors foundation registers one theme per type, named after it
114
+ (`et-color--error`, `et-color--warning`); an SDK drawing input that takes a theme name, like the button's `color`,
115
+ takes that name, since no other name resolves. `sketch check` warns when a state uses an `et-color--<name>` no foundation of the product defines, naming the defined ones. Read the theming skill of the SDK before the first colour in a drawing. `et design check` reports
109
116
  a denied class from the product's `deniedClasses` list in `config.json`.
110
117
 
111
118
  A part is one folder, `<product>/<layer>/<part>/`, with its drawing and states. Read the parts of
@@ -86,6 +86,29 @@ draws that variant, or the user's pick once there is one, with no hint in Studio
86
86
  cannot merge before the sub-part does; the merge of the sub-part rebases the composition sketch onto
87
87
  the merged part.
88
88
 
89
+ A new part one variant builds for its own arrangement (a hero's poster strip) is a marked sub-part:
90
+ `sketch sub-part <target> <layer>/<name>[,…] --variant <key> --by <model id>` (`--remove` drops it).
91
+ Marked sub-parts may differ between variants; the check fails every new part a composition variant
92
+ builds without a mark, and every mark on an existing part. A new part whose name matches an existing
93
+ component or element (`hero-badges` and `badge`) must embed it, or state the difference:
94
+ `sketch sub-part … <part> "<what it is that the other is not>" --not-rebuild-of sdk:badge`. The same holds
95
+ for markup a variant draws inline: a value named like an existing part as an element's text
96
+ (`<span>${FIXTURE.badge}</span>`), or an element with content in an existing part's root class or tag under
97
+ another prefix (`<span class="tsh-badge">Serie</span>` for `et-badge`), must become that part, or the target states the difference with itself as
98
+ `<part>`. Never rename a part or value to dodge the match. Studio shows the marks at the variant header; a mark change on a ready
99
+ sketch moves it back to in progress.
100
+
101
+ A pick of a variant with marked sub-parts merges nothing: it opens one sub-sketch per sub-part, seeded from
102
+ that variant. Draw each and mark it ready with `sketch ready` first: `sketch approve` refuses a sub-sketch
103
+ in progress. Once the user approves it, record that with
104
+ `sketch approve <sub-part> --variant <key> --decided-by <their words> --by <model id>`; a sub-sketch never
105
+ merges on its own. The parent merge waits until every sub-sketch is approved and names the open ones;
106
+ then one merge writes the parent and every approved sub-part with its `shared/` and asset changes, and closes
107
+ the sub-sketches. Two of them changing the same `shared/` or asset file refuse the merge, naming the file.
108
+ A pick of another variant while the parent is unmerged discards the sub-sketches the new variant does not
109
+ mark, approved ones too, keeps those it marks again and opens its new ones; `sketch pick` names them and
110
+ needs `--discard-sub-sketches` to confirm.
111
+
89
112
  A variant mirrors the product layout and holds only the parts it changes. Draw two to four
90
113
  variants, each with what it costs, and run `sketch check` before `ready`. A variant with problems
91
114
  cannot be picked. A part in a variant keeps every state the part has in the product: `sketch check`
@@ -181,7 +204,7 @@ pick; it refuses while the decision is a discard (the user picks a variant first
181
204
  goes on the running round: what it showed and why its variants lost. Older variants stay pickable.
182
205
  The command prints the notes of the previous round. Fix a round's title or note later with `sketch round <layer>/<name> <round> --title … --note … --by <model id>`; `sketch list` shows each sketch's rounds.
183
206
  Letters continue across rounds (r1: a, b; r2: c, d). `sketch variant <layer>/<name> c,d --from a` adds
184
- several variants at once; with `--round` they all start the new round. A new round answers the comments on the
207
+ several variants at once; with `--round` they all start the new round. On a new part, the round after the pick of a base variant draws its interactions (see `INTERACTION-ROUND`). A new round answers the comments on the
185
208
  `--from` variant and marks them "addressed in round" with the new round's key. A variant without `--round` fails while the sketch has open comments and lists them: a variant that answers a comment starts a new round. Draw the combined
186
209
  variant and mark the sketch `ready` again. `sketch new --round <title> --note <text>` names
187
210
  round 1 and sets its note; `--round` without `--note` fails. `sketch ready` refuses while the running round has no note; set it with `sketch round`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethlete/agent-rules",
3
- "version": "0.1.0-next.44",
3
+ "version": "0.1.0-next.46",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/ethlete-io/ethdk",
@@ -25,7 +25,10 @@ export type SyncConfig = {
25
25
  * `AGENTS.md` marker block, and a second copy would load twice.
26
26
  */
27
27
  claudeMdImportsAgentsMd: boolean;
28
- /** Opt-in agent hooks (they run commands on the developer's machine, so never default). */
28
+ /**
29
+ * Opt-in agent hooks (they run commands on the developer's machine, so never default), plus
30
+ * `DESIGN_SYSTEM_HOOKS` in a repo with a design system.
31
+ */
29
32
  hooks: string[];
30
33
  /** Opt-in git hooks, appended to the repo's own husky hooks. Same reason they never default. */
31
34
  gitHooks: string[];
@@ -36,6 +39,12 @@ export type SyncConfig = {
36
39
  jira: JiraSettings;
37
40
  configWarnings?: string[];
38
41
  };
42
+ /** Opt-in settings of the `away-mode` hook: the skills whose sessions it tracks, the idle threshold, and the command printing the report table on return. */
43
+ export type AwayModeConfig = {
44
+ skills?: string[];
45
+ thresholdMinutes?: number;
46
+ reportCommand?: string;
47
+ };
39
48
  /** Opt-in settings of `ethlete-agents report`: repo-relative paths of the markdown files holding row tables and the queue. */
40
49
  export type ReportConfig = {
41
50
  planFiles?: string[];
@@ -64,6 +73,7 @@ export declare const readReportConfig: (root: string) => ReportConfig;
64
73
  export type LocalConfig = {
65
74
  disableHooks?: boolean | string[];
66
75
  disableAutoHandoffSave?: boolean;
76
+ awayMode?: AwayModeConfig;
67
77
  };
68
78
  export type LocalConfigState = {
69
79
  exists: false;
package/src/lib/config.js CHANGED
@@ -33,6 +33,7 @@ const RAW_CONFIG_KEYS = [
33
33
  'mods',
34
34
  'gitFlow',
35
35
  'jira',
36
+ 'awayMode',
36
37
  'report',
37
38
  ];
38
39
  const parseJson = (text) => {
@@ -46,7 +47,7 @@ const parseJson = (text) => {
46
47
  const assertConfigShapes = (value) => {
47
48
  var _a;
48
49
  const arrays = ['exclude', 'hooks', 'gitHooks', 'mods'];
49
- const objects = ['vars', 'gitFlow', 'jira', 'report'];
50
+ const objects = ['vars', 'gitFlow', 'jira', 'awayMode', 'report'];
50
51
  for (const key of arrays) {
51
52
  const entry = value[key];
52
53
  if (entry !== undefined && (!Array.isArray(entry) || entry.some((item) => typeof item !== 'string'))) {
@@ -101,7 +102,7 @@ const unknownConfigKeyWarnings = (raw) => {
101
102
  ]
102
103
  : [];
103
104
  };
104
- exports.LOCAL_CONFIG_KEYS = ['disableHooks', 'disableAutoHandoffSave'];
105
+ exports.LOCAL_CONFIG_KEYS = ['disableHooks', 'disableAutoHandoffSave', 'awayMode'];
105
106
  /**
106
107
  * Repo topology moved to `@ethlete/cli`'s `ethlete.config.local.json`, because `et` needs it too.
107
108
  * Still recognised here so a checkout that has not moved them yet gets told where they went
@@ -165,6 +166,12 @@ const gitFlowVars = (gitFlow) => ({
165
166
  gitFlowEnforcement: gitFlow.enforcement,
166
167
  gitFlowSubPrefix: gitFlow.subPrefix,
167
168
  });
169
+ const DESIGN_SYSTEM_HOOKS = ['design-live-check'];
170
+ const resolveHooks = (root, configured) => {
171
+ if (!(0, fs_1.existsSync)((0, path_1.join)(root, '.ethlete/design/config.json')))
172
+ return configured;
173
+ return [...configured, ...DESIGN_SYSTEM_HOOKS.filter((hook) => !configured.includes(hook))];
174
+ };
168
175
  const loadConfig = (options) => {
169
176
  var _a, _b, _c, _d, _e, _f, _g, _h;
170
177
  const { root, targetOverride } = options;
@@ -180,7 +187,7 @@ const loadConfig = (options) => {
180
187
  vars: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, package_runner_1.followPackageManager)(root, (0, load_content_1.loadDefaultVars)())), (0, package_runner_1.detectCommandVars)(root)), { packageRunner: (0, package_runner_1.detectPackageRunner)(root) }), gitFlowVars(gitFlow)), (0, commitlint_1.commitMessageVars)((0, commitlint_1.findCommitlintConfig)(root))), ((_b = raw.vars) !== null && _b !== void 0 ? _b : {})),
181
188
  exclude: (_c = raw.exclude) !== null && _c !== void 0 ? _c : [],
182
189
  claudeMdImportsAgentsMd: (_d = raw.claudeMdImportsAgentsMd) !== null && _d !== void 0 ? _d : false,
183
- hooks: (_e = raw.hooks) !== null && _e !== void 0 ? _e : [],
190
+ hooks: resolveHooks(root, (_e = raw.hooks) !== null && _e !== void 0 ? _e : []),
184
191
  gitHooks: (_f = raw.gitHooks) !== null && _f !== void 0 ? _f : [],
185
192
  mods: (_g = raw.mods) !== null && _g !== void 0 ? _g : [],
186
193
  gitFlow,
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../libs/agent-rules/src/lib/config.ts"],"names":[],"mappings":";;;AAAA,2BAA8C;AAC9C,+BAAqC;AACrC,6CAAuE;AAEvE,yCAAmF;AACnF,iDAAiD;AACjD,qDAAgG;AAEnF,QAAA,aAAa,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAIlE,QAAA,gBAAgB,GAAG,4BAA4B,CAAC;AAEhD,QAAA,sBAAsB,GAAG,kCAAkC,CAAC;AAuDzE,uGAAuG;AAChG,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,EAAE;IAC/C,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,OAAO,CAAC,IAAA,eAAU,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C,UAAU,EAAE,MAAM,CAAC;QACtE,IAAI,0FACC,IAAA,qCAAoB,EAAC,IAAI,EAAE,IAAA,8BAAe,GAAE,CAAC,GAC7C,IAAA,kCAAiB,EAAC,IAAI,CAAC,KAC1B,aAAa,EAAE,IAAA,oCAAmB,EAAC,IAAI,CAAC,KACrC,WAAW,CAAC,OAAO,CAAC,GACpB,IAAA,8BAAiB,EAAC,IAAA,iCAAoB,EAAC,IAAI,CAAC,CAAC,GAC7C,CAAC,MAAA,GAAG,CAAC,IAAI,mCAAI,EAAE,CAAC,CACpB;QACD,OAAO,EAAE,MAAA,GAAG,CAAC,OAAO,mCAAI,EAAE;QAC1B,uBAAuB,EAAE,MAAA,GAAG,CAAC,uBAAuB,mCAAI,KAAK;QAC7D,KAAK,EAAE,YAAY,CAAC,IAAI,EAAE,MAAA,GAAG,CAAC,KAAK,mCAAI,EAAE,CAAC;QAC1C,QAAQ,EAAE,MAAA,GAAG,CAAC,QAAQ,mCAAI,EAAE;QAC5B,IAAI,EAAE,MAAA,GAAG,CAAC,IAAI,mCAAI,EAAE;QACpB,OAAO;QACP,IAAI,EAAE,MAAA,GAAG,CAAC,IAAI,mCAAI,EAAE;QACpB,cAAc,EAAE,wBAAwB,CAAC,GAAG,CAAC;KAC9C,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,UAAU,cA8BrB"}
@@ -30,6 +30,12 @@ exports.KNOWN_HOOKS = {
30
30
  timeout: 10,
31
31
  agents: ['claude'],
32
32
  },
33
+ 'away-mode': {
34
+ events: [{ event: 'UserPromptSubmit' }],
35
+ file: 'away-mode.py',
36
+ timeout: 10,
37
+ agents: ['claude'],
38
+ },
33
39
  'background-design-commands': {
34
40
  events: [{ event: 'PreToolUse', matcher: 'Bash' }],
35
41
  file: 'background-design-commands.py',
@@ -42,6 +48,12 @@ exports.KNOWN_HOOKS = {
42
48
  timeout: 60,
43
49
  agents: ['claude'],
44
50
  },
51
+ 'builder-idle-check': {
52
+ events: [{ event: 'Stop' }],
53
+ file: 'builder-idle-check.py',
54
+ timeout: 10,
55
+ agents: ['claude'],
56
+ },
45
57
  'git-safety': {
46
58
  events: [{ event: 'PreToolUse', matcher: 'Bash' }],
47
59
  file: 'git-safety.py',
@@ -1 +1 @@
1
- {"version":3,"file":"hooks-shared.js","sourceRoot":"","sources":["../../../../../../libs/agent-rules/src/lib/targets/hooks-shared.ts"],"names":[],"mappings":";;;AAAA,2BAAkC;AAClC,+BAA4B;AAC5B,kDAAqD;AACrD,sCAAwC;AAmBxC;;;GAGG;AACU,QAAA,WAAW,GAAmC;IACzD,iBAAiB,EAAE;QACjB,MAAM,EAAE;YACN,EAAE,KAAK,EAAE,kBAAkB,EAAE;YAC7B,4EAA4E;YAC5E,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE;YAC7C,mFAAmF;YACnF,iEAAiE;YACjE,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE;YAC9C,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE;YACrC,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE;SAC9C;QACD,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,EAAE;KACZ;IACD,uBAAuB,EAAE;QACvB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;QACxD,IAAI,EAAE,0BAA0B;QAChC,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,CAAC,QAAQ,CAAC;KACnB;IACD,4BAA4B,EAAE;QAC5B,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAClD,IAAI,EAAE,+BAA+B;QACrC,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,CAAC,QAAQ,CAAC;KACnB;IACD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