hub-launch 1.3.0 → 1.4.0
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 +16 -0
- package/README.md +20 -0
- package/dist/commands/execute.d.ts.map +1 -1
- package/dist/commands/execute.js +109 -0
- package/dist/commands/execute.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +20 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/upload.d.ts.map +1 -1
- package/dist/commands/upload.js +16 -75
- package/dist/commands/upload.js.map +1 -1
- package/dist/services/git/FilePublishService.d.ts +68 -0
- package/dist/services/git/FilePublishService.d.ts.map +1 -0
- package/dist/services/git/FilePublishService.js +141 -0
- package/dist/services/git/FilePublishService.js.map +1 -0
- package/dist/templates/scripts/hula-execute-manage.sh +159 -0
- package/dist/templates/skill-creation-instructions.md +142 -0
- package/dist/templates/skills/hula-execute/SKILL.md +191 -61
- package/package.json +1 -1
|
@@ -1,37 +1,194 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hula-execute
|
|
3
|
-
description:
|
|
3
|
+
description: Run, schedule, create, or manage execute-actions on the hula-project server. Use to run a built-in action (e.g. harden) or custom action file, author a new action from a plain description, or list/show/run-now/cancel/update runs and schedules.
|
|
4
4
|
disable-model-invocation: true
|
|
5
|
-
argument-hint: <action> [on <entry-point>] [outcome pr|plan|feedback] [schedule <when>]
|
|
6
|
-
allowed-tools: Bash Read
|
|
5
|
+
argument-hint: <action | description | list | show <id> | run now <id> | cancel <id> | update ...> [on <entry-point>] [outcome pr|plan|feedback] [schedule <when>]
|
|
6
|
+
allowed-tools: Bash Read Write Edit
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
You are an expert HubLaunch workflow assistant.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
You are an expert HubLaunch workflow assistant. You turn the user's free-form
|
|
10
|
+
request into the right `hula execute` operation — running or scheduling an
|
|
11
|
+
action, authoring a new action file from a description, or managing existing
|
|
12
|
+
runs and schedules — running everything through wrapper scripts and confirming
|
|
13
|
+
any cron expression before sending it.
|
|
13
14
|
|
|
14
|
-
## Step
|
|
15
|
+
## Step 0: Intent routing
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Classify `$ARGUMENTS` (and recent chat context) into exactly one mode:
|
|
17
18
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
19
|
+
- **`run-existing`** — the input names an existing action:
|
|
20
|
+
- contains a `/`, ends in `.md`, or is an `https://` URL → `--action-path`.
|
|
21
|
+
- is a bare word naming a built-in (e.g. `harden`) → `--built-in`.
|
|
22
|
+
- **management verb** — the input begins with or clearly expresses one of:
|
|
23
|
+
- `list` / "list runs" / "list schedules" → **`list`**
|
|
24
|
+
- `show <id>` → **`show`**
|
|
25
|
+
- `run now <id>` / "run <id> now" → **`run-now`**
|
|
26
|
+
- `cancel <id>` / `delete <id>` / `pause <id>` → **`cancel/delete`**
|
|
27
|
+
(there is no pause/resume — "pause" means cancel).
|
|
28
|
+
- `update …` → **`update-skill-file`** or **`update-cron`** (see below).
|
|
29
|
+
- **`create-from-description`** — anything else: a plain-language description of
|
|
30
|
+
what the action should do.
|
|
31
|
+
|
|
32
|
+
**Ambiguity rule (mandatory):** If the input could be either an existing action
|
|
33
|
+
or a description (e.g. a single word like `harden` that might be a built-in name
|
|
34
|
+
OR a thing to do), **ask the user which they intend** before proceeding. Never
|
|
35
|
+
guess between "run an existing action" and "create a new one". Likewise, if an
|
|
36
|
+
`update` request does not clearly indicate the skill file vs the cron, ask which.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Mode: run-existing (unchanged behavior)
|
|
41
|
+
|
|
42
|
+
### Step 1: Extract arguments
|
|
43
|
+
|
|
44
|
+
- **Action selector (exactly one):** `--built-in <name>` or `--action-path <path>`.
|
|
22
45
|
- **Entry point (optional):** `--entry-point <path>` — the file, directory, or
|
|
23
|
-
URL the action targets (e.g. `src/`). Phrases like "on src/", "against the
|
|
24
|
-
|
|
46
|
+
URL the action targets (e.g. `src/`). Phrases like "on src/", "against the src
|
|
47
|
+
directory", or "target lib/" indicate the entry point.
|
|
25
48
|
- **Outcome type (optional, default `pr`):** `--outcome-type <pr|plan|feedback>`.
|
|
26
49
|
Map "open a PR" / "pull request" → `pr`; "make a plan" / "planning" → `plan`;
|
|
27
50
|
"just feedback" / "review" / "report" → `feedback`. If the user names
|
|
28
51
|
something else, ask which of `pr|plan|feedback` they mean.
|
|
29
|
-
- **Schedule (optional):** a human phrase or a raw cron string (see
|
|
52
|
+
- **Schedule (optional):** a human phrase or a raw cron string (see Cron table).
|
|
53
|
+
|
|
54
|
+
### Step 2: Resolve the schedule (see Cron table below) and confirm it.
|
|
55
|
+
|
|
56
|
+
### Step 3: Stop conditions
|
|
57
|
+
|
|
58
|
+
- If neither a built-in name nor an action path can be determined, stop with:
|
|
59
|
+
```
|
|
60
|
+
❌ Action required. Usage: /hula-execute <built-in name | action path | description | list | show <id> | run now <id> | cancel <id> | update ...>
|
|
61
|
+
```
|
|
62
|
+
- If BOTH a built-in name and an action path are detected, stop and ask which
|
|
63
|
+
one they intend (the CLI rejects both).
|
|
64
|
+
|
|
65
|
+
### Step 4: Run the wrapper script
|
|
66
|
+
|
|
67
|
+
Run exactly one Bash command. Use `--built-in` OR `--action-path`, never both:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
bash .github/scripts/hula-execute-run.sh --built-in <name> [--entry-point <path>] [--outcome-type <type>] [--schedule "<cron>"]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
or, for a custom action file:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
bash .github/scripts/hula-execute-run.sh --action-path <path> [--entry-point <path>] [--outcome-type <type>] [--schedule "<cron>"]
|
|
77
|
+
```
|
|
30
78
|
|
|
31
|
-
|
|
79
|
+
Pass only the flags you resolved. Quote the cron expression. Then report the
|
|
80
|
+
result (see **Reporting run/schedule results**).
|
|
32
81
|
|
|
33
|
-
|
|
34
|
-
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Mode: create-from-description
|
|
85
|
+
|
|
86
|
+
The user described what they want done but did not supply an existing action.
|
|
87
|
+
|
|
88
|
+
**Read `.hublaunch/skill-creation-instructions.md` and follow it exactly.** In
|
|
89
|
+
summary it has you: ask clarifying questions first (then STOP), confirm the
|
|
90
|
+
action name, resolve+confirm any cron, write a free-form instruction markdown
|
|
91
|
+
file to `.hublaunch/skills/<YYYY-MM-DD-HH:MM-slug>.md`, **publish it to
|
|
92
|
+
origin/main BEFORE running** via
|
|
93
|
+
`bash .github/scripts/hula-execute-manage.sh --publish-skill <path>` (abort if
|
|
94
|
+
that returns `status:"error"`), then run/schedule it with
|
|
95
|
+
`bash .github/scripts/hula-execute-run.sh --action-path <path> …`, and report the
|
|
96
|
+
created file path plus the run/schedule result.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Mode: list
|
|
101
|
+
|
|
102
|
+
Run via the management wrapper:
|
|
103
|
+
|
|
104
|
+
- `list` (no qualifier) → show **both** recent runs and active schedules:
|
|
105
|
+
```bash
|
|
106
|
+
bash .github/scripts/hula-execute-manage.sh --list
|
|
107
|
+
bash .github/scripts/hula-execute-manage.sh --list-schedules
|
|
108
|
+
```
|
|
109
|
+
- "list runs" → only `--list`. "list schedules" → only `--list-schedules`.
|
|
110
|
+
|
|
111
|
+
Display the `cliOutput` from each result.
|
|
112
|
+
|
|
113
|
+
## Mode: show
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
bash .github/scripts/hula-execute-manage.sh --show <runId>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Display the `cliOutput`.
|
|
120
|
+
|
|
121
|
+
## Mode: run-now
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
bash .github/scripts/hula-execute-manage.sh --run-now <scheduleId>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Report the new run id (`runId`) from the JSON, falling back to `cliOutput`.
|
|
128
|
+
|
|
129
|
+
## Mode: cancel/delete (with guarded file removal)
|
|
130
|
+
|
|
131
|
+
1. Cancel the schedule:
|
|
132
|
+
```bash
|
|
133
|
+
bash .github/scripts/hula-execute-manage.sh --cancel-schedule <scheduleId>
|
|
134
|
+
```
|
|
135
|
+
2. If the cancelled schedule referenced an `actionPath` under
|
|
136
|
+
`.hublaunch/skills/`, **ask the user whether to also delete that file.**
|
|
137
|
+
3. If they opt in, FIRST verify no other active schedule still uses it:
|
|
138
|
+
```bash
|
|
139
|
+
bash .github/scripts/hula-execute-manage.sh --list-schedules
|
|
140
|
+
```
|
|
141
|
+
- If another active schedule references the same `actionPath`, **refuse** and
|
|
142
|
+
report which schedule id(s) still use it. Leave the file on the branch.
|
|
143
|
+
- Otherwise delete it:
|
|
144
|
+
```bash
|
|
145
|
+
bash .github/scripts/hula-execute-manage.sh --delete-skill <actionPath>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Mode: update-skill-file
|
|
149
|
+
|
|
150
|
+
The user wants to change *what the action does* (its instructions), not the
|
|
151
|
+
schedule.
|
|
152
|
+
|
|
153
|
+
1. Locate the action file: from the schedule's `actionPath`
|
|
154
|
+
(via `--list-schedules`), or a path the user names. It must be under
|
|
155
|
+
`.hublaunch/skills/`.
|
|
156
|
+
2. Apply the requested change to the working-tree copy with `Edit` (or rewrite
|
|
157
|
+
it with `Write` for a large change), keeping the free-form template format.
|
|
158
|
+
3. Re-publish it:
|
|
159
|
+
```bash
|
|
160
|
+
bash .github/scripts/hula-execute-manage.sh --publish-skill <actionPath>
|
|
161
|
+
```
|
|
162
|
+
4. No schedule change is needed. Inform the user that the **next scheduled run
|
|
163
|
+
will use the updated content** (the server re-reads the file on every fire).
|
|
164
|
+
|
|
165
|
+
## Mode: update-cron
|
|
166
|
+
|
|
167
|
+
The user wants to change *when* a schedule fires. The server has no
|
|
168
|
+
update-schedule endpoint, so cancel + recreate on the same action:
|
|
169
|
+
|
|
170
|
+
1. Read the existing schedule's `actionPath` (or `builtIn`), `entryPoint`, and
|
|
171
|
+
`outcomeType` via:
|
|
172
|
+
```bash
|
|
173
|
+
bash .github/scripts/hula-execute-manage.sh --list-schedules
|
|
174
|
+
```
|
|
175
|
+
2. Resolve the new cron and **confirm the readback** (see Cron table).
|
|
176
|
+
3. Cancel the old schedule, then recreate with the new cron on the **same**
|
|
177
|
+
action:
|
|
178
|
+
```bash
|
|
179
|
+
bash .github/scripts/hula-execute-manage.sh --cancel-schedule <old-id>
|
|
180
|
+
bash .github/scripts/hula-execute-run.sh --action-path <same-path> [--entry-point <path>] [--outcome-type <type>] --schedule "<new-cron>"
|
|
181
|
+
```
|
|
182
|
+
(Use `--built-in <name>` instead of `--action-path` if the schedule used a
|
|
183
|
+
built-in.)
|
|
184
|
+
4. Report the new schedule id.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Cron table (used by run/schedule and update-cron)
|
|
189
|
+
|
|
190
|
+
Translate a recurring phrase to a 5-field cron expression (case-insensitive,
|
|
191
|
+
tolerant of minor wording):
|
|
35
192
|
|
|
36
193
|
| Phrase | Cron |
|
|
37
194
|
| --- | --- |
|
|
@@ -50,77 +207,50 @@ Rules:
|
|
|
50
207
|
- If the user specifies an explicit time (e.g. "every day at 9pm"), adjust the
|
|
51
208
|
hour/minute fields accordingly (`0 21 * * *`).
|
|
52
209
|
- If the user supplies a raw 5-field cron string, accept it as-is.
|
|
53
|
-
- **Always** print the resolved cron
|
|
54
|
-
|
|
210
|
+
- **Always** print the resolved cron with a plain-English readback and confirm
|
|
211
|
+
before sending, e.g.:
|
|
55
212
|
```
|
|
56
213
|
Schedule → 0 3 * * * (every day at 3:00 AM)
|
|
57
214
|
```
|
|
58
|
-
There is no client-side cron validation —
|
|
59
|
-
so the readback + confirmation is mandatory.
|
|
215
|
+
There is no client-side cron validation — confirmation is mandatory.
|
|
60
216
|
- If a phrase cannot be confidently mapped, ask the user to rephrase or supply a
|
|
61
217
|
raw cron expression. Do NOT send an unverified guess.
|
|
62
218
|
- If no schedule is mentioned, the action runs once (omit `--schedule`).
|
|
63
219
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- If neither a built-in name nor an action path can be determined, stop with:
|
|
67
|
-
```
|
|
68
|
-
❌ Action required. Usage: /hula-execute <built-in name | action path> [on <entry-point>] [outcome pr|plan|feedback] [schedule <when>]
|
|
69
|
-
```
|
|
70
|
-
- If BOTH a built-in name and an action path are detected, stop and ask the user
|
|
71
|
-
which one they intend (the CLI rejects both).
|
|
72
|
-
|
|
73
|
-
## Step 4: Run the wrapper script
|
|
74
|
-
|
|
75
|
-
With the arguments resolved (and the schedule confirmed, if any), run exactly
|
|
76
|
-
one Bash command. Use `--built-in` OR `--action-path`, never both:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
bash .github/scripts/hula-execute-run.sh --built-in <name> [--entry-point <path>] [--outcome-type <type>] [--schedule "<cron>"]
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
or, for a custom action file:
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
bash .github/scripts/hula-execute-run.sh --action-path <path> [--entry-point <path>] [--outcome-type <type>] [--schedule "<cron>"]
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Pass only the flags you resolved. Quote the cron expression.
|
|
220
|
+
---
|
|
89
221
|
|
|
90
|
-
##
|
|
222
|
+
## Reporting run/schedule results
|
|
91
223
|
|
|
92
|
-
|
|
224
|
+
Every wrapper prints a single JSON object to stdout. On any `status:"error"`,
|
|
225
|
+
display `❌ <message>` and stop.
|
|
93
226
|
|
|
94
|
-
-
|
|
95
|
-
- If `status` is `"success"` and `kind` is `"run"`, display:
|
|
227
|
+
- run (`kind:"run"`):
|
|
96
228
|
```
|
|
97
229
|
✅ Execute action queued
|
|
98
230
|
|
|
99
231
|
🔖 **Run ID**: <runId>
|
|
100
232
|
🔗 **PR**: <prUrl> (omit this line if prUrl is empty)
|
|
101
233
|
|
|
102
|
-
Check status with: hula
|
|
234
|
+
Check status with: /hula-execute show <runId>
|
|
103
235
|
```
|
|
104
|
-
-
|
|
236
|
+
- schedule (`kind:"schedule"`):
|
|
105
237
|
```
|
|
106
238
|
✅ Schedule created
|
|
107
239
|
|
|
108
240
|
🔖 **Schedule ID**: <scheduleId>
|
|
109
241
|
⏰ **Cron**: <cronExpr>
|
|
110
242
|
|
|
111
|
-
Manage with: hula
|
|
243
|
+
Manage with: /hula-execute list · /hula-execute run now <scheduleId> · /hula-execute cancel <scheduleId>
|
|
112
244
|
```
|
|
113
245
|
|
|
114
246
|
If an identifier is empty, fall back to showing the `cliOutput` field.
|
|
115
247
|
|
|
116
248
|
## Important Notes
|
|
117
249
|
|
|
118
|
-
- Do NOT call the `Read` tool to check whether an action file exists. The server
|
|
119
|
-
validates the action; the wrapper handles errors clearly.
|
|
120
250
|
- Do NOT pre-check credentials. The CLI resolves the Anthropic OAuth token,
|
|
121
251
|
Daytona key, and GitHub token from flags/config/env and reports a clear error
|
|
122
|
-
if any are missing; the
|
|
252
|
+
if any are missing; the wrappers surface it.
|
|
123
253
|
- Do NOT echo secrets.
|
|
124
|
-
-
|
|
125
|
-
|
|
126
|
-
|
|
254
|
+
- Generated action files live under `.hublaunch/skills/` and are committed to
|
|
255
|
+
`origin/main` via a temporary worktree — never on the user's current branch.
|
|
256
|
+
- Never run `hula execute` before a `--publish-skill` succeeds.
|