@rse/ase 0.0.36 → 0.0.37
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/dst/ase-hello.js +9 -4
- package/dst/ase-hook.js +44 -0
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.github/plugin/plugin.json +1 -1
- package/plugin/hooks/hooks-copilot.json +23 -6
- package/plugin/hooks/hooks.json +20 -3
- package/plugin/package.json +1 -1
- package/plugin/skills/ase-code-craft/SKILL.md +3 -2
- package/plugin/skills/ase-code-refactor/SKILL.md +5 -3
- package/plugin/skills/ase-code-resolve/SKILL.md +3 -2
- package/plugin/skills/ase-task-list/SKILL.md +39 -14
package/dst/ase-hello.js
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
** Copyright (c) 2025-2026 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
4
4
|
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import { Chalk } from "chalk";
|
|
7
|
+
/* forced-color chalk instance: stdout may be a pipe, so chalk
|
|
8
|
+
auto-detection would yield level 0; force level 1 to keep
|
|
9
|
+
emitting ANSI sequences as in "ase statusline" */
|
|
10
|
+
const c = new Chalk({ level: 1 });
|
|
7
11
|
/* command-line handling */
|
|
8
12
|
export default class HelloCommand {
|
|
9
13
|
log;
|
|
@@ -14,9 +18,10 @@ export default class HelloCommand {
|
|
|
14
18
|
register(program) {
|
|
15
19
|
program
|
|
16
20
|
.command("hello")
|
|
17
|
-
.description("
|
|
18
|
-
.
|
|
19
|
-
|
|
21
|
+
.description("print a colored greeting message")
|
|
22
|
+
.option("-s, --subject <name>", "subject to greet", "Universe")
|
|
23
|
+
.action((opts) => {
|
|
24
|
+
process.stdout.write(`${c.red(`${opts.subject} World!`)}\n`);
|
|
20
25
|
});
|
|
21
26
|
}
|
|
22
27
|
}
|
package/dst/ase-hook.js
CHANGED
|
@@ -106,6 +106,8 @@ export default class HookCommand {
|
|
|
106
106
|
cfg.set("agent.task", taskId);
|
|
107
107
|
cfg.write();
|
|
108
108
|
});
|
|
109
|
+
/* initialize agent activity status */
|
|
110
|
+
this.writeAgentStatus("ready");
|
|
109
111
|
/* determine project id */
|
|
110
112
|
const cwd = input.cwd ?? process.cwd();
|
|
111
113
|
let projectDir = cwd;
|
|
@@ -170,6 +172,32 @@ export default class HookCommand {
|
|
|
170
172
|
process.stdout.write(JSON.stringify(payload));
|
|
171
173
|
return 0;
|
|
172
174
|
}
|
|
175
|
+
/* publish the agent activity marker to tmux as a per-pane user
|
|
176
|
+
option, so tmux can render the live state via
|
|
177
|
+
#{@ase_agent_status} (refreshed on tmux's own interval,
|
|
178
|
+
independent of Claude Code's statusline repaint cadence).
|
|
179
|
+
Notice: the Claude Code statusline is not usable for this case
|
|
180
|
+
here at all, as it is not repainted during agent processing! */
|
|
181
|
+
writeAgentStatus(status) {
|
|
182
|
+
const icon = status === "busy" ? "▶" : "⏸";
|
|
183
|
+
if (process.env.TMUX !== undefined
|
|
184
|
+
&& process.env.TMUX !== ""
|
|
185
|
+
&& process.env.TMUX_PANE !== undefined
|
|
186
|
+
&& process.env.TMUX_PANE !== "") {
|
|
187
|
+
execaSync("tmux", ["set-option", "-p", "-t", process.env.TMUX_PANE,
|
|
188
|
+
"@ase_agent_status", icon], { stdio: "ignore", reject: false });
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/* handler for "ase hook user-prompt-submit" (both tools) */
|
|
192
|
+
doUserPromptSubmit(_tool) {
|
|
193
|
+
this.writeAgentStatus("busy");
|
|
194
|
+
return 0;
|
|
195
|
+
}
|
|
196
|
+
/* handler for "ase hook stop" (both tools) */
|
|
197
|
+
doStop(_tool) {
|
|
198
|
+
this.writeAgentStatus("ready");
|
|
199
|
+
return 0;
|
|
200
|
+
}
|
|
173
201
|
/* handler for "ase hook session-end" (both tools) */
|
|
174
202
|
doSessionEnd(_tool) {
|
|
175
203
|
/* read session information (Claude Code uses snake_case fields,
|
|
@@ -287,5 +315,21 @@ export default class HookCommand {
|
|
|
287
315
|
.action((opts) => {
|
|
288
316
|
process.exit(this.doPreToolUse(this.parseTool(opts.tool)));
|
|
289
317
|
});
|
|
318
|
+
/* register CLI sub-command "ase hook user-prompt-submit" */
|
|
319
|
+
hookCmd
|
|
320
|
+
.command("user-prompt-submit")
|
|
321
|
+
.description("handle UserPromptSubmit hook event (mark agent as busy)")
|
|
322
|
+
.option("-t, --tool <tool>", "target tool (\"claude\" or \"copilot\")", toolDflt)
|
|
323
|
+
.action((opts) => {
|
|
324
|
+
process.exit(this.doUserPromptSubmit(this.parseTool(opts.tool)));
|
|
325
|
+
});
|
|
326
|
+
/* register CLI sub-command "ase hook stop" */
|
|
327
|
+
hookCmd
|
|
328
|
+
.command("stop")
|
|
329
|
+
.description("handle Stop hook event (mark agent as ready)")
|
|
330
|
+
.option("-t, --tool <tool>", "target tool (\"claude\" or \"copilot\")", toolDflt)
|
|
331
|
+
.action((opts) => {
|
|
332
|
+
process.exit(this.doStop(this.parseTool(opts.tool)));
|
|
333
|
+
});
|
|
290
334
|
}
|
|
291
335
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"homepage": "http://github.com/rse/ase",
|
|
7
7
|
"repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
|
|
8
8
|
"bugs": { "url": "http://github.com/rse/ase/issues" },
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.37",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -3,20 +3,37 @@
|
|
|
3
3
|
"hooks": {
|
|
4
4
|
"sessionStart": [
|
|
5
5
|
{
|
|
6
|
-
"type":
|
|
7
|
-
"bash":
|
|
6
|
+
"type": "command",
|
|
7
|
+
"bash": "ase hook session-start --tool copilot",
|
|
8
|
+
"powershell": "ase hook session-start --tool copilot"
|
|
8
9
|
}
|
|
9
10
|
],
|
|
10
11
|
"sessionEnd": [
|
|
11
12
|
{
|
|
12
|
-
"type":
|
|
13
|
-
"bash":
|
|
13
|
+
"type": "command",
|
|
14
|
+
"bash": "ase hook session-end --tool copilot",
|
|
15
|
+
"powershell": "ase hook session-end --tool copilot"
|
|
14
16
|
}
|
|
15
17
|
],
|
|
16
18
|
"preToolUse": [
|
|
17
19
|
{
|
|
18
|
-
"type":
|
|
19
|
-
"bash":
|
|
20
|
+
"type": "command",
|
|
21
|
+
"bash": "ase hook pre-tool-use --tool copilot",
|
|
22
|
+
"powershell": "ase hook pre-tool-use --tool copilot"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"userPromptSubmitted": [
|
|
26
|
+
{
|
|
27
|
+
"type": "command",
|
|
28
|
+
"bash": "ase hook user-prompt-submit --tool copilot",
|
|
29
|
+
"powershell": "ase hook user-prompt-submit --tool copilot"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"agentStop": [
|
|
33
|
+
{
|
|
34
|
+
"type": "command",
|
|
35
|
+
"bash": "ase hook stop --tool copilot",
|
|
36
|
+
"powershell": "ase hook stop --tool copilot"
|
|
20
37
|
}
|
|
21
38
|
]
|
|
22
39
|
}
|
package/plugin/hooks/hooks.json
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
"hooks": {
|
|
3
3
|
"SessionStart": [
|
|
4
4
|
{
|
|
5
|
-
"matcher": "startup|resume|clear|compact",
|
|
6
5
|
"hooks": [
|
|
7
6
|
{
|
|
8
7
|
"type": "command",
|
|
@@ -14,7 +13,6 @@
|
|
|
14
13
|
],
|
|
15
14
|
"SessionEnd": [
|
|
16
15
|
{
|
|
17
|
-
"matcher": "",
|
|
18
16
|
"hooks": [
|
|
19
17
|
{
|
|
20
18
|
"type": "command",
|
|
@@ -26,7 +24,6 @@
|
|
|
26
24
|
],
|
|
27
25
|
"PreToolUse": [
|
|
28
26
|
{
|
|
29
|
-
"matcher": "",
|
|
30
27
|
"hooks": [
|
|
31
28
|
{
|
|
32
29
|
"type": "command",
|
|
@@ -35,6 +32,26 @@
|
|
|
35
32
|
}
|
|
36
33
|
]
|
|
37
34
|
}
|
|
35
|
+
],
|
|
36
|
+
"UserPromptSubmit": [
|
|
37
|
+
{
|
|
38
|
+
"hooks": [
|
|
39
|
+
{
|
|
40
|
+
"type": "command",
|
|
41
|
+
"command": "ase hook user-prompt-submit"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"Stop": [
|
|
47
|
+
{
|
|
48
|
+
"hooks": [
|
|
49
|
+
{
|
|
50
|
+
"type": "command",
|
|
51
|
+
"command": "ase hook stop"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
38
55
|
]
|
|
39
56
|
}
|
|
40
57
|
}
|
package/plugin/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"homepage": "http://github.com/rse/ase",
|
|
7
7
|
"repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
|
|
8
8
|
"bugs": { "url": "http://github.com/rse/ase/issues" },
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.37",
|
|
10
10
|
"license": "GPL-3.0-only",
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Dr. Ralf S. Engelschall",
|
|
@@ -168,8 +168,9 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
168
168
|
4. **Choose Feature Crafting Approach**:
|
|
169
169
|
|
|
170
170
|
1. If <getopt-option-auto/> is equal `false`:
|
|
171
|
-
Let the *user interactively choose* the preferred feature
|
|
172
|
-
with the help of the <user-dialog-tool/> tool.
|
|
171
|
+
Let the *user interactively choose* the preferred feature
|
|
172
|
+
approach A<n/> with the help of the <user-dialog-tool/> tool.
|
|
173
|
+
Use the header `Select Approach` and *single-selection* only
|
|
173
174
|
and provide small *code change previews*. Mark your recommended
|
|
174
175
|
feature approach with ` ⚝ **RECOMMENDATION** ⚝` here again.
|
|
175
176
|
|
|
@@ -172,11 +172,13 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
172
172
|
4. **Choose Refactoring Approach**:
|
|
173
173
|
|
|
174
174
|
1. If <getopt-option-auto/> is equal `false`:
|
|
175
|
-
Let the *user interactively choose* the preferred refactoring
|
|
176
|
-
with the help of the <user-dialog-tool/> tool.
|
|
175
|
+
Let the *user interactively choose* the preferred refactoring
|
|
176
|
+
approach A<n/> with the help of the <user-dialog-tool/> tool.
|
|
177
|
+
Use the header `Select Approach` and *single-selection* only
|
|
177
178
|
and provide small *code change previews*. Mark your recommended
|
|
178
179
|
refactoring approach with ` ⚝ **RECOMMENDATION** ⚝` here again.
|
|
179
|
-
Except for the interactive selection, do not output anything in
|
|
180
|
+
Except for the interactive selection, do not output anything in
|
|
181
|
+
this step.
|
|
180
182
|
|
|
181
183
|
2. If <getopt-option-auto/> is equal `true`:
|
|
182
184
|
Set <n/> to the number of the refactoring approach A<n/> you recommend.
|
|
@@ -224,8 +224,9 @@ permitted way to persist artifacts is via `task_save(...)`.
|
|
|
224
224
|
4. **Choose Problem Resolution Approach**:
|
|
225
225
|
|
|
226
226
|
1. If <getopt-option-auto/> is equal `false`:
|
|
227
|
-
Let the *user interactively choose* the preferred resolution
|
|
228
|
-
with the help of the <user-dialog-tool/> tool.
|
|
227
|
+
Let the *user interactively choose* the preferred resolution
|
|
228
|
+
approach A<n/> with the help of the <user-dialog-tool/> tool.
|
|
229
|
+
Use the header `Select Approach` and *single-selection* only
|
|
229
230
|
and provide small *code change previews*. Mark your recommended
|
|
230
231
|
resolution approach with ` ⚝ **RECOMMENDATION** ⚝` here again.
|
|
231
232
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ase-task-list
|
|
3
|
-
argument-hint: ""
|
|
3
|
+
argument-hint: "[-v|--verbose]"
|
|
4
4
|
description: >
|
|
5
5
|
List all available task ids.
|
|
6
6
|
Use when user wants to see all tasks.
|
|
@@ -11,6 +11,7 @@ effort: low
|
|
|
11
11
|
|
|
12
12
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-persona.md
|
|
13
13
|
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
|
|
14
|
+
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
|
|
14
15
|
|
|
15
16
|
Task List
|
|
16
17
|
=========
|
|
@@ -19,10 +20,17 @@ Task List
|
|
|
19
20
|
List Task Plans
|
|
20
21
|
</skill>
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
<expand name="getopt"
|
|
24
|
+
arg1="ase-task-list"
|
|
25
|
+
arg2="--verbose|-v">
|
|
26
|
+
$ARGUMENTS
|
|
27
|
+
</expand>
|
|
28
|
+
|
|
29
|
+
1. Call the `task_list(verbose: <getopt-option-verbose/>)` tool from
|
|
30
|
+
the `ase` MCP service. The result is a structured object with a
|
|
31
|
+
`tasks` array where each entry has an `id` field, and -- if
|
|
32
|
+
<getopt-option-verbose/> is `true` -- additionally an `mtime` field
|
|
33
|
+
(formatted as `YYYY-MM-DD HH:MM`).
|
|
26
34
|
|
|
27
35
|
2. If the `tasks` array is empty, output the following <template/>:
|
|
28
36
|
|
|
@@ -30,16 +38,33 @@ List Task Plans
|
|
|
30
38
|
⧉ **ASE**: ◉ tasks: *(none)*
|
|
31
39
|
</template>
|
|
32
40
|
|
|
33
|
-
Else,
|
|
34
|
-
each <id/> and <mtime/> correspond to an entry in the task list:
|
|
41
|
+
Else, dispatch on <getopt-option-verbose/>:
|
|
35
42
|
|
|
36
|
-
<
|
|
37
|
-
|
|
43
|
+
- If <getopt-option-verbose/> is `true`, output the list of tasks
|
|
44
|
+
with the following <template/>, where each <id/> and <mtime/>
|
|
45
|
+
correspond to an entry in the task list:
|
|
38
46
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| **<id/>** | `<mtime/>` |
|
|
42
|
-
| [...] | [...] |
|
|
47
|
+
<template>
|
|
48
|
+
⧉ **ASE**: ◉ tasks:
|
|
43
49
|
|
|
44
|
-
|
|
50
|
+
| *Task Id* | *Last Modified* |
|
|
51
|
+
|-----------|--------------------|
|
|
52
|
+
| **<id/>** | `<mtime/>` |
|
|
53
|
+
| [...] | [...] |
|
|
54
|
+
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
- If <getopt-option-verbose/> is `false`, output the list of tasks
|
|
58
|
+
with the following <template/>, where each <id/> corresponds to
|
|
59
|
+
an entry in the task list:
|
|
60
|
+
|
|
61
|
+
<template>
|
|
62
|
+
⧉ **ASE**: ◉ tasks:
|
|
63
|
+
|
|
64
|
+
| *Task Id* |
|
|
65
|
+
|-----------|
|
|
66
|
+
| **<id/>** |
|
|
67
|
+
| [...] |
|
|
68
|
+
|
|
69
|
+
</template>
|
|
45
70
|
|