hub-launch 1.2.3 → 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.
@@ -0,0 +1,256 @@
1
+ ---
2
+ name: hula-execute
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
+ disable-model-invocation: true
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
+ ---
8
+
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.
14
+
15
+ ## Step 0: Intent routing
16
+
17
+ Classify `$ARGUMENTS` (and recent chat context) into exactly one mode:
18
+
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>`.
45
+ - **Entry point (optional):** `--entry-point <path>` — the file, directory, or
46
+ URL the action targets (e.g. `src/`). Phrases like "on src/", "against the src
47
+ directory", or "target lib/" indicate the entry point.
48
+ - **Outcome type (optional, default `pr`):** `--outcome-type <pr|plan|feedback>`.
49
+ Map "open a PR" / "pull request" → `pr`; "make a plan" / "planning" → `plan`;
50
+ "just feedback" / "review" / "report" → `feedback`. If the user names
51
+ something else, ask which of `pr|plan|feedback` they mean.
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
+ ```
78
+
79
+ Pass only the flags you resolved. Quote the cron expression. Then report the
80
+ result (see **Reporting run/schedule results**).
81
+
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):
192
+
193
+ | Phrase | Cron |
194
+ | --- | --- |
195
+ | "every hour" / "hourly" | `0 * * * *` |
196
+ | "every 15 minutes" | `*/15 * * * *` |
197
+ | "every 30 minutes" | `*/30 * * * *` |
198
+ | "every day" / "daily" / "every night" / "nightly" | `0 3 * * *` |
199
+ | "every morning" | `0 9 * * *` |
200
+ | "every weekday" / "weekdays" (at 8am) | `0 8 * * 1-5` |
201
+ | "every Monday" (at 9am) | `0 9 * * 1` |
202
+ | "weekly" (Sunday midnight) | `0 0 * * 0` |
203
+ | "monthly" (1st, midnight) | `0 0 1 * *` |
204
+
205
+ Rules:
206
+
207
+ - If the user specifies an explicit time (e.g. "every day at 9pm"), adjust the
208
+ hour/minute fields accordingly (`0 21 * * *`).
209
+ - If the user supplies a raw 5-field cron string, accept it as-is.
210
+ - **Always** print the resolved cron with a plain-English readback and confirm
211
+ before sending, e.g.:
212
+ ```
213
+ Schedule → 0 3 * * * (every day at 3:00 AM)
214
+ ```
215
+ There is no client-side cron validation — confirmation is mandatory.
216
+ - If a phrase cannot be confidently mapped, ask the user to rephrase or supply a
217
+ raw cron expression. Do NOT send an unverified guess.
218
+ - If no schedule is mentioned, the action runs once (omit `--schedule`).
219
+
220
+ ---
221
+
222
+ ## Reporting run/schedule results
223
+
224
+ Every wrapper prints a single JSON object to stdout. On any `status:"error"`,
225
+ display `❌ <message>` and stop.
226
+
227
+ - run (`kind:"run"`):
228
+ ```
229
+ ✅ Execute action queued
230
+
231
+ 🔖 **Run ID**: <runId>
232
+ 🔗 **PR**: <prUrl> (omit this line if prUrl is empty)
233
+
234
+ Check status with: /hula-execute show <runId>
235
+ ```
236
+ - schedule (`kind:"schedule"`):
237
+ ```
238
+ ✅ Schedule created
239
+
240
+ 🔖 **Schedule ID**: <scheduleId>
241
+ ⏰ **Cron**: <cronExpr>
242
+
243
+ Manage with: /hula-execute list · /hula-execute run now <scheduleId> · /hula-execute cancel <scheduleId>
244
+ ```
245
+
246
+ If an identifier is empty, fall back to showing the `cliOutput` field.
247
+
248
+ ## Important Notes
249
+
250
+ - Do NOT pre-check credentials. The CLI resolves the Anthropic OAuth token,
251
+ Daytona key, and GitHub token from flags/config/env and reports a clear error
252
+ if any are missing; the wrappers surface it.
253
+ - Do NOT echo secrets.
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hub-launch",
3
- "version": "1.2.3",
3
+ "version": "1.4.0",
4
4
  "description": "GitHub Issue and PR automation CLI tool with plugin/hook system for project-specific customizations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",