@ethlete/agent-rules 0.1.0-next.34 → 0.1.0-next.35
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,12 @@
|
|
|
1
1
|
# @ethlete/agent-rules
|
|
2
2
|
|
|
3
|
+
## 0.1.0-next.35
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The context warning and the shell functions from `shell-install` also find the agent-sessions script under `.claude/skills`, so a session in such a repo starts in tmux and restarts itself after a handoff instead of asking the user to clear.
|
|
8
|
+
- List the collapse guide in the sdk-docs skill.
|
|
9
|
+
|
|
3
10
|
## 0.1.0-next.34
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -52,11 +52,10 @@ ways that matter here, all captured in AGENT_PROFILES:
|
|
|
52
52
|
|
|
53
53
|
At the critical tier, if the session's permission_mode is "auto", the
|
|
54
54
|
instruction escalates from "recommend" to "just do it": auto mode already
|
|
55
|
-
means the user wants the agent acting without stopping to ask,
|
|
56
|
-
resuming can't be triggered programmatically (no hook or tool can submit
|
|
57
|
-
input to a running session), so the best available automation is to save the
|
|
55
|
+
means the user wants the agent acting without stopping to ask, so it saves the
|
|
58
56
|
handoff file itself immediately rather than waiting for a natural stopping
|
|
59
|
-
point.
|
|
57
|
+
point. In an agent-sessions tmux pane the agent also clears and resumes itself
|
|
58
|
+
with the `restart` command; elsewhere that last step stays with the user. Codex's permission_mode value set is undocumented, so its profile lists
|
|
60
59
|
no auto modes and the escalation stays off there.
|
|
61
60
|
|
|
62
61
|
Neither the critical tier nor the Stop event forces a handoff. A session is
|
|
@@ -193,9 +192,7 @@ AGENT_PROFILES = {
|
|
|
193
192
|
"edit first, nothing new. Apply its own test: with every change committed, no "
|
|
194
193
|
"step left and nothing running, write no file, say that instead, and recommend "
|
|
195
194
|
"/clear. If a file is warranted, tell the user exactly which one was written and "
|
|
196
|
-
"that they should run /clear, then '/{handoff} resume <slug>', to continue
|
|
197
|
-
"clearing and resuming can't be done programmatically, so this is the one step "
|
|
198
|
-
"still on them."
|
|
195
|
+
"that they should run /clear, then '/{handoff} resume <slug>', to continue."
|
|
199
196
|
),
|
|
200
197
|
"save_at_stop": (
|
|
201
198
|
"save a handoff with the handoff skill, then tell the user which file was "
|
|
@@ -258,14 +255,15 @@ def handoff_skill(root):
|
|
|
258
255
|
|
|
259
256
|
|
|
260
257
|
SELF_RESTART = (
|
|
261
|
-
"you run in an agent-sessions tmux session, so
|
|
262
|
-
"apply the {handoff} skill's save test and save the handoff if it calls for a file, then
|
|
263
|
-
|
|
264
|
-
|
|
258
|
+
"you run in an agent-sessions tmux session, so you clear and resume yourself and never ask the user to clear: "
|
|
259
|
+
"apply the {handoff} skill's save test and save the handoff if it calls for a file, then, when every condition "
|
|
260
|
+
"of its 'Clear and resume on your own' section holds, run "
|
|
261
|
+
'`node {script} restart {name} "/{handoff} resume <slug>"` yourself and end the turn - with no file, '
|
|
262
|
+
"restart with a prompt that names the next step. Only when a condition cannot be met, tell the user"
|
|
265
263
|
)
|
|
266
264
|
SELF_RESTART_ACT_NOW = (
|
|
267
|
-
"Save the handoff, then run `node {script} restart {name} \"/{handoff} resume
|
|
268
|
-
"Never ask the user to clear."
|
|
265
|
+
"Save the handoff, then run `node {script} restart {name} \"/{handoff} resume <slug>\"` yourself and end the "
|
|
266
|
+
"turn, as the {handoff} skill's 'Clear and resume on your own' section says. Never ask the user to clear."
|
|
269
267
|
)
|
|
270
268
|
USER_DIRECTED_KEYS = ("recommend", "suggest", "save_now", "save_at_stop")
|
|
271
269
|
|
|
@@ -279,7 +277,8 @@ def self_restart_target(root):
|
|
|
279
277
|
(
|
|
280
278
|
path
|
|
281
279
|
for path in (
|
|
282
|
-
os.path.join(
|
|
280
|
+
os.path.join(skills_dir, name, "agent-sessions.mjs")
|
|
281
|
+
for skills_dir in (".agents/skills", ".claude/skills")
|
|
283
282
|
for name in ("ethlete-agent-sessions", "agent-sessions")
|
|
284
283
|
)
|
|
285
284
|
if os.path.isfile(os.path.join(root, path))
|
|
@@ -583,12 +583,24 @@ if (command === 'send' && sender) {
|
|
|
583
583
|
}
|
|
584
584
|
} else if (command === 'shell-init' || command === 'shell-install') {
|
|
585
585
|
const agents = [sender, ...words].filter(Boolean);
|
|
586
|
+
const locate = `_ethlete_agent_sessions_script() {
|
|
587
|
+
local root dir
|
|
588
|
+
root=$(git rev-parse --show-toplevel 2>/dev/null) || return 1
|
|
589
|
+
for dir in .agents/skills .claude/skills; do
|
|
590
|
+
if [ -f "$root/$dir/ethlete-agent-sessions/agent-sessions.mjs" ]; then
|
|
591
|
+
printf '%s\\n' "$root/$dir/ethlete-agent-sessions/agent-sessions.mjs"
|
|
592
|
+
return 0
|
|
593
|
+
fi
|
|
594
|
+
done
|
|
595
|
+
return 1
|
|
596
|
+
}
|
|
597
|
+
`;
|
|
586
598
|
const functions = (agents.length ? agents : ['claude', 'codex'])
|
|
587
599
|
.map(
|
|
588
600
|
(agent) => `${agent}() {
|
|
589
|
-
local
|
|
590
|
-
|
|
591
|
-
if [ -n "$script" ] &&
|
|
601
|
+
local script
|
|
602
|
+
script=$(_ethlete_agent_sessions_script)
|
|
603
|
+
if [ -n "$script" ] && command -v tmux >/dev/null; then
|
|
592
604
|
node "$script" run ${agent} ${agent} "$@"
|
|
593
605
|
else
|
|
594
606
|
command ${agent} "$@"
|
|
@@ -596,7 +608,7 @@ if (command === 'send' && sender) {
|
|
|
596
608
|
}
|
|
597
609
|
`,
|
|
598
610
|
)
|
|
599
|
-
.
|
|
611
|
+
.reduce((text, fn) => text + fn, locate);
|
|
600
612
|
if (command === 'shell-init') {
|
|
601
613
|
process.stdout.write(functions);
|
|
602
614
|
} else {
|
|
@@ -43,7 +43,7 @@ Component domains under `/components/`:
|
|
|
43
43
|
|
|
44
44
|
`accordion` `avatar` `badge` `banner` `bracket` `bracket-prediction` `bracket-rounds-list`
|
|
45
45
|
`breadcrumb` `button` `calendar` `card` `carousel` `cascader` `chart` `chip`
|
|
46
|
-
`choice-inputs` `command-palette` `copy-button` `date-time-inputs` `description-list`
|
|
46
|
+
`choice-inputs` `collapse` `command-palette` `copy-button` `date-time-inputs` `description-list`
|
|
47
47
|
`divider` `dropzone` `empty-state` `error-codes` `filter-overlay` `floating-action`
|
|
48
48
|
`focus-ring` `forms` `grid` `icon` `kbd` `line-chart` `loader` `localization` `masonry`
|
|
49
49
|
`match` `menu` `mixed-state` `notification` `overlay-openers` `overlays` `paged-query-trigger`
|