hub-launch 1.3.0 → 1.4.1
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 +22 -0
- package/README.md +39 -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 +32 -2
- 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/index.js +34 -3
- package/dist/index.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/dist/types/config.schema.d.ts +3 -0
- package/dist/types/config.schema.d.ts.map +1 -1
- package/dist/types/config.schema.js +4 -0
- package/dist/types/config.schema.js.map +1 -1
- package/dist/utils/version.d.ts +22 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +35 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Execute Skill Creation Instructions
|
|
2
|
+
|
|
3
|
+
These instructions drive the **create-from-description** mode of the
|
|
4
|
+
`/hula-execute` skill: turning a plain-language description into a published
|
|
5
|
+
action file that `hula execute` can run or schedule.
|
|
6
|
+
|
|
7
|
+
The action file is plain instruction markdown that the hula-project server reads
|
|
8
|
+
from `origin/<uploadBranch>` (default `main`) at run time. It is **not** an Agent
|
|
9
|
+
Skill and is never registered as a slash command — it lives under
|
|
10
|
+
`.hublaunch/skills/`.
|
|
11
|
+
|
|
12
|
+
Follow these steps in order. Do **not** skip the question step, and do **not**
|
|
13
|
+
run `hula execute` before the file is successfully published.
|
|
14
|
+
|
|
15
|
+
## Step 1: Ask clarifying questions first (then STOP)
|
|
16
|
+
|
|
17
|
+
Mirror the `/hula-plan` question-first behavior. Before writing anything, ask the
|
|
18
|
+
user the questions you cannot confidently answer from their description:
|
|
19
|
+
|
|
20
|
+
1. **What should the action do?** The concrete task to perform on each run
|
|
21
|
+
(e.g. "remove unreachable code", "upgrade dependencies and fix breakages").
|
|
22
|
+
2. **Target entry point** (optional): the file, directory, or URL the action
|
|
23
|
+
focuses on (e.g. `src/`). Maps to `--entry-point`.
|
|
24
|
+
3. **Outcome type**: `pr` (open a pull request), `plan` (produce a plan), or
|
|
25
|
+
`feedback` (review/report only). Maps to `--outcome-type`. Default `pr`.
|
|
26
|
+
4. **One-off or scheduled?** If recurring, get the schedule phrase (e.g. "every
|
|
27
|
+
night", "every Monday 9am").
|
|
28
|
+
5. **Any constraints / scope limits** the run must respect (optional).
|
|
29
|
+
|
|
30
|
+
**STOP and wait for the answers.** Do not proceed to authoring until the user
|
|
31
|
+
responds. If anything is still ambiguous after the answers, ask a focused
|
|
32
|
+
follow-up round.
|
|
33
|
+
|
|
34
|
+
## Step 2: Confirm the action name
|
|
35
|
+
|
|
36
|
+
Derive a default slug from the description: lowercase, hyphen-separated, no
|
|
37
|
+
spaces or punctuation (e.g. "remove unreachable code in src" →
|
|
38
|
+
`remove-unreachable-code`). Propose it to the user and let them override. Confirm
|
|
39
|
+
the final name before writing the file.
|
|
40
|
+
|
|
41
|
+
## Step 3: Resolve the schedule (if recurring)
|
|
42
|
+
|
|
43
|
+
If the action is scheduled, translate the phrase to a 5-field cron expression
|
|
44
|
+
using the preset table in `SKILL.md`, then **echo the cron with a plain-English
|
|
45
|
+
readback and confirm it** before publishing/running. There is no server-side
|
|
46
|
+
cron validation, so the readback + confirmation is mandatory.
|
|
47
|
+
|
|
48
|
+
## Step 4: Compute the filename and path
|
|
49
|
+
|
|
50
|
+
- Filename: `YYYY-MM-DD-HH:MM-<name-slug>.md`
|
|
51
|
+
- Use today's date and the current time on a 24-hour clock.
|
|
52
|
+
- `<name-slug>` is the confirmed, lowercase-hyphenated action name.
|
|
53
|
+
- Repo-relative path: `.hublaunch/skills/<filename>`
|
|
54
|
+
- Create the `.hublaunch/skills/` directory if it does not exist.
|
|
55
|
+
|
|
56
|
+
## Step 5: Write the action file (free-form instruction markdown, NO frontmatter)
|
|
57
|
+
|
|
58
|
+
Use the `Write` tool to create the file at the computed path. The content MUST be
|
|
59
|
+
free-form instruction markdown with **no YAML frontmatter** (frontmatter would
|
|
60
|
+
make it look like an Agent Skill). Follow this template:
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
# <Action Title>
|
|
64
|
+
|
|
65
|
+
## Goal
|
|
66
|
+
<1–3 sentences describing what this action should accomplish.>
|
|
67
|
+
|
|
68
|
+
## Steps
|
|
69
|
+
1. <step>
|
|
70
|
+
2. <step>
|
|
71
|
+
3. <step>
|
|
72
|
+
|
|
73
|
+
## Constraints
|
|
74
|
+
- <optional: what must not change / scope limits>
|
|
75
|
+
|
|
76
|
+
## Outcome
|
|
77
|
+
<What the run should produce, consistent with the chosen --outcome-type:
|
|
78
|
+
pr | plan | feedback.>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Fill the template from the user's answers. Omit the `## Constraints` section if
|
|
82
|
+
the user gave no constraints.
|
|
83
|
+
|
|
84
|
+
## Step 6: Publish to origin/main BEFORE running (mandatory ordering)
|
|
85
|
+
|
|
86
|
+
The server clones the repository and reads the action file from the default
|
|
87
|
+
branch at run time (and re-reads it on every scheduled fire). The file MUST be on
|
|
88
|
+
the branch before the run, so publish it first:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
bash .github/scripts/hula-execute-manage.sh --publish-skill .hublaunch/skills/<filename>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Parse the single JSON object it prints:
|
|
95
|
+
|
|
96
|
+
- If `status` is `"error"`: display `❌ <message>` and **STOP**. Do **not** run
|
|
97
|
+
`hula execute` — the file is not on the branch, so the run would fail.
|
|
98
|
+
- If `status` is `"success"`: continue to Step 7.
|
|
99
|
+
|
|
100
|
+
## Step 7: Run or schedule the action
|
|
101
|
+
|
|
102
|
+
Only after a successful publish, invoke the run wrapper with `--action-path`
|
|
103
|
+
pointing at the committed file:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
bash .github/scripts/hula-execute-run.sh --action-path .hublaunch/skills/<filename> [--entry-point <path>] [--outcome-type <type>] [--schedule "<cron>"]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Pass only the flags you resolved. Quote the cron expression.
|
|
110
|
+
|
|
111
|
+
## Step 8: Report the result
|
|
112
|
+
|
|
113
|
+
Parse the run wrapper's JSON (same contract as the normal run flow) and report:
|
|
114
|
+
|
|
115
|
+
- The **created file path** (`.hublaunch/skills/<filename>`) and that it was
|
|
116
|
+
published to `origin/<uploadBranch>`.
|
|
117
|
+
- The **run or schedule result**:
|
|
118
|
+
- One-off run → the Run ID and PR link (if any), plus
|
|
119
|
+
`hula execute --show <runId>` to check status.
|
|
120
|
+
- Schedule → the Schedule ID and cron expression, plus a note that you can
|
|
121
|
+
manage it with `/hula-execute list`, `/hula-execute run now <id>`,
|
|
122
|
+
`/hula-execute cancel <id>`, or `/hula-execute update <id> …`.
|
|
123
|
+
|
|
124
|
+
Example success report:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
✅ Action created and published
|
|
128
|
+
|
|
129
|
+
📄 **File**: .hublaunch/skills/2026-06-19-16:35-remove-unreachable-code.md (on origin/main)
|
|
130
|
+
🔖 **Schedule ID**: sch_abc123
|
|
131
|
+
⏰ **Cron**: 0 3 * * * (every day at 3:00 AM)
|
|
132
|
+
|
|
133
|
+
Manage it with: /hula-execute list · /hula-execute run now sch_abc123 · /hula-execute cancel sch_abc123
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Notes
|
|
137
|
+
|
|
138
|
+
- Never echo secrets. Credentials resolve inside the CLI.
|
|
139
|
+
- The action file is committed to `origin/<uploadBranch>` via a temporary
|
|
140
|
+
worktree — the user's current branch and working tree are never touched.
|
|
141
|
+
- If the publish succeeds but the run fails, the file remains on the branch; the
|
|
142
|
+
user can re-run it later with `/hula-execute .hublaunch/skills/<filename>`.
|
|
@@ -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.
|
|
@@ -124,6 +124,7 @@ export type PreviewAuthConfig = z.infer<typeof PreviewAuthSchema>;
|
|
|
124
124
|
export declare const ConfigSchema: z.ZodObject<{
|
|
125
125
|
editorCommand: z.ZodDefault<z.ZodEnum<["cursor", "vsCode", "other"]>>;
|
|
126
126
|
planPath: z.ZodDefault<z.ZodString>;
|
|
127
|
+
version: z.ZodOptional<z.ZodString>;
|
|
127
128
|
trackingFile: z.ZodDefault<z.ZodString>;
|
|
128
129
|
createIssuesPreference: z.ZodDefault<z.ZodEnum<["alwaysLatest", "chooseRecentPlan"]>>;
|
|
129
130
|
planChoices: z.ZodDefault<z.ZodNumber>;
|
|
@@ -311,6 +312,7 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
311
312
|
browserHeadless: "never" | "auto" | "always";
|
|
312
313
|
worktreeBasePath: string;
|
|
313
314
|
projectOwner?: string | undefined;
|
|
315
|
+
version?: string | undefined;
|
|
314
316
|
teamMembers?: string[] | undefined;
|
|
315
317
|
projectNumber?: number | undefined;
|
|
316
318
|
projectId?: string | undefined;
|
|
@@ -370,6 +372,7 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
370
372
|
}, {
|
|
371
373
|
planPath?: string | undefined;
|
|
372
374
|
projectOwner?: string | undefined;
|
|
375
|
+
version?: string | undefined;
|
|
373
376
|
editorCommand?: "cursor" | "vsCode" | "other" | undefined;
|
|
374
377
|
trackingFile?: string | undefined;
|
|
375
378
|
createIssuesPreference?: "alwaysLatest" | "chooseRecentPlan" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.schema.d.ts","sourceRoot":"","sources":["../../src/types/config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,QAAA,MAAM,uBAAuB;;;;;;;;;EAK3B,CAAC;AAEH,QAAA,MAAM,iBAAiB;;;;;;;;;EAGrB,CAAC;AAEH,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlB,CAAC;AAEH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;EAOf,CAAC;AAGH,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYrB,CAAC;AAGH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC9E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAGlE,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"config.schema.d.ts","sourceRoot":"","sources":["../../src/types/config.schema.ts"],"names":[],"mappings":"AAAA,OA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AC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAGlD,eAAO,MAAM,cAAc,EAAE,MAe5B,CAAC"}
|
|
@@ -41,6 +41,10 @@ const PreviewAuthSchema = z.object({
|
|
|
41
41
|
export const ConfigSchema = z.object({
|
|
42
42
|
editorCommand: z.enum(['cursor', 'vsCode', 'other']).default('other'),
|
|
43
43
|
planPath: z.string().default('.hublaunch/plans'),
|
|
44
|
+
// CLI version that last generated this config (written by `hula init`).
|
|
45
|
+
// Used to detect when the installed CLI has changed and a re-init is due.
|
|
46
|
+
// Optional so configs created before this feature still validate.
|
|
47
|
+
version: z.string().optional(),
|
|
44
48
|
trackingFile: z.string().default('.hublaunch/trackedPlans.json'),
|
|
45
49
|
createIssuesPreference: z
|
|
46
50
|
.enum(['alwaysLatest', 'chooseRecentPlan'])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.schema.js","sourceRoot":"","sources":["../../src/types/config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,2BAA2B;AAC3B,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,CAAC;SACR,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;SAChD,OAAO,CAAC,QAAQ,CAAC;IACpB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACtE,UAAU,EAAE,CAA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,EAAE,kBAAkB;IAC5B,YAAY,EAAE,8BAA8B;IAC5C,sBAAsB,EAAE,kBAAkB;IAC1C,WAAW,EAAE,CAAC;IACd,mBAAmB,EAAE,KAAK;IAC1B,YAAY,EAAE,MAAM;IACpB,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,6BAA6B;IAClD,eAAe,EAAE,aAAa;IAC9B,eAAe,EAAE,MAAM;IACvB,gBAAgB,EAAE,iBAAiB;IACnC,WAAW,EAAE,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the installed hub-launch CLI version from package.json.
|
|
3
|
+
*
|
|
4
|
+
* From `dist/utils/version.js` (built) and `src/utils/version.ts` (tsx dev),
|
|
5
|
+
* `../../package.json` resolves to the package root in both layouts. Any
|
|
6
|
+
* failure (unreadable/missing package.json, no version field) returns `null`
|
|
7
|
+
* so callers can degrade safely without throwing.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getCliVersion(): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* A re-init reminder is warranted when the project is initialized
|
|
12
|
+
* (a config file exists) but the version that generated it differs from
|
|
13
|
+
* the running CLI version. A missing recorded version counts as stale
|
|
14
|
+
* (pre-feature projects). Returns false when the CLI version is unknown
|
|
15
|
+
* (no reliable comparison) or when the project is uninitialized.
|
|
16
|
+
*/
|
|
17
|
+
export declare function isReinitNeeded(params: {
|
|
18
|
+
configFileExists: boolean;
|
|
19
|
+
configVersion: string | undefined;
|
|
20
|
+
cliVersion: string | null;
|
|
21
|
+
}): boolean;
|
|
22
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAQ7C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACrC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,GAAG,OAAO,CAKV"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createRequire } from 'module';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the installed hub-launch CLI version from package.json.
|
|
4
|
+
*
|
|
5
|
+
* From `dist/utils/version.js` (built) and `src/utils/version.ts` (tsx dev),
|
|
6
|
+
* `../../package.json` resolves to the package root in both layouts. Any
|
|
7
|
+
* failure (unreadable/missing package.json, no version field) returns `null`
|
|
8
|
+
* so callers can degrade safely without throwing.
|
|
9
|
+
*/
|
|
10
|
+
export function getCliVersion() {
|
|
11
|
+
try {
|
|
12
|
+
const require = createRequire(import.meta.url);
|
|
13
|
+
const { version } = require('../../package.json');
|
|
14
|
+
return typeof version === 'string' && version.length > 0 ? version : null;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A re-init reminder is warranted when the project is initialized
|
|
22
|
+
* (a config file exists) but the version that generated it differs from
|
|
23
|
+
* the running CLI version. A missing recorded version counts as stale
|
|
24
|
+
* (pre-feature projects). Returns false when the CLI version is unknown
|
|
25
|
+
* (no reliable comparison) or when the project is uninitialized.
|
|
26
|
+
*/
|
|
27
|
+
export function isReinitNeeded(params) {
|
|
28
|
+
const { configFileExists, configVersion, cliVersion } = params;
|
|
29
|
+
if (!configFileExists)
|
|
30
|
+
return false;
|
|
31
|
+
if (!cliVersion)
|
|
32
|
+
return false;
|
|
33
|
+
return configVersion !== cliVersion;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa;IAC3B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAyB,CAAC;QAC1E,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,MAI9B;IACC,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAC/D,IAAI,CAAC,gBAAgB;QAAE,OAAO,KAAK,CAAC;IACpC,IAAI,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAC9B,OAAO,aAAa,KAAK,UAAU,CAAC;AACtC,CAAC"}
|