@laitszkin/apollo-toolkit 2.12.1 → 2.12.2
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 +7 -0
- package/lib/installer.js +27 -4
- package/novel-to-short-video/SKILL.md +3 -3
- package/open-github-issue/SKILL.md +14 -6
- package/openai-text-to-image-storyboard/README.md +2 -2
- package/openai-text-to-image-storyboard/SKILL.md +4 -4
- package/openai-text-to-image-storyboard/agents/openai.yaml +1 -1
- package/package.json +1 -1
- package/production-sim-debug/SKILL.md +5 -1
- package/scheduled-runtime-health-check/SKILL.md +5 -1
- package/scripts/install_skills.ps1 +25 -5
- package/scripts/install_skills.sh +22 -5
- package/text-to-short-video/README.md +4 -4
- package/text-to-short-video/SKILL.md +4 -4
- package/text-to-short-video/agents/openai.yaml +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to this repository are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [v2.12.2] - 2026-03-29
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Update the npm installer and local install scripts to expand `~/` path overrides consistently for managed toolkit homes and target skill directories.
|
|
11
|
+
- Refresh skill docs and agent prompts to replace user-specific absolute home paths with portable `~/`-based examples.
|
|
12
|
+
- Strengthen `production-sim-debug` and `scheduled-runtime-health-check` so bounded runs must verify the actual stop mechanism and treat overruns as contract/tooling bugs to diagnose.
|
|
13
|
+
|
|
7
14
|
## [v2.12.1] - 2026-03-28
|
|
8
15
|
|
|
9
16
|
### Changed
|
package/lib/installer.js
CHANGED
|
@@ -11,9 +11,25 @@ function resolveHomeDirectory(env = process.env) {
|
|
|
11
11
|
return env.HOME || env.USERPROFILE || os.homedir();
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
function expandUserPath(inputPath, env = process.env) {
|
|
15
|
+
if (!inputPath) {
|
|
16
|
+
return inputPath;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (inputPath === '~') {
|
|
20
|
+
return resolveHomeDirectory(env);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (inputPath.startsWith('~/') || inputPath.startsWith('~\\')) {
|
|
24
|
+
return path.join(resolveHomeDirectory(env), inputPath.slice(2));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return inputPath;
|
|
28
|
+
}
|
|
29
|
+
|
|
14
30
|
function resolveToolkitHome(env = process.env) {
|
|
15
31
|
if (env.APOLLO_TOOLKIT_HOME) {
|
|
16
|
-
return path.resolve(env.APOLLO_TOOLKIT_HOME);
|
|
32
|
+
return path.resolve(expandUserPath(env.APOLLO_TOOLKIT_HOME, env));
|
|
17
33
|
}
|
|
18
34
|
|
|
19
35
|
return path.join(resolveHomeDirectory(env), '.apollo-toolkit');
|
|
@@ -142,7 +158,9 @@ async function getTargetRoots(modes, env = process.env) {
|
|
|
142
158
|
targets.push({
|
|
143
159
|
mode,
|
|
144
160
|
label: 'Codex',
|
|
145
|
-
root: env.CODEX_SKILLS_DIR
|
|
161
|
+
root: env.CODEX_SKILLS_DIR
|
|
162
|
+
? path.resolve(expandUserPath(env.CODEX_SKILLS_DIR, env))
|
|
163
|
+
: path.join(homeDir, '.codex', 'skills'),
|
|
146
164
|
});
|
|
147
165
|
continue;
|
|
148
166
|
}
|
|
@@ -151,13 +169,17 @@ async function getTargetRoots(modes, env = process.env) {
|
|
|
151
169
|
targets.push({
|
|
152
170
|
mode,
|
|
153
171
|
label: 'Trae',
|
|
154
|
-
root: env.TRAE_SKILLS_DIR
|
|
172
|
+
root: env.TRAE_SKILLS_DIR
|
|
173
|
+
? path.resolve(expandUserPath(env.TRAE_SKILLS_DIR, env))
|
|
174
|
+
: path.join(homeDir, '.trae', 'skills'),
|
|
155
175
|
});
|
|
156
176
|
continue;
|
|
157
177
|
}
|
|
158
178
|
|
|
159
179
|
if (mode === 'openclaw') {
|
|
160
|
-
const openclawHome = env.OPENCLAW_HOME
|
|
180
|
+
const openclawHome = env.OPENCLAW_HOME
|
|
181
|
+
? path.resolve(expandUserPath(env.OPENCLAW_HOME, env))
|
|
182
|
+
: path.join(homeDir, '.openclaw');
|
|
161
183
|
const entries = await fsp.readdir(openclawHome, { withFileTypes: true }).catch(() => []);
|
|
162
184
|
const workspaceNames = entries
|
|
163
185
|
.filter((entry) => entry.isDirectory() && entry.name.startsWith('workspace'))
|
|
@@ -218,6 +240,7 @@ async function installLinks({ toolkitHome, modes, env = process.env, previousSki
|
|
|
218
240
|
}
|
|
219
241
|
|
|
220
242
|
module.exports = {
|
|
243
|
+
expandUserPath,
|
|
221
244
|
VALID_MODES,
|
|
222
245
|
getTargetRoots,
|
|
223
246
|
installLinks,
|
|
@@ -120,9 +120,9 @@ If producing multiple short videos in one request, enforce the same 50-60 second
|
|
|
120
120
|
- Generate images with:
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
|
-
python
|
|
123
|
+
python ~/.codex/skills/openai-text-to-image-storyboard/scripts/generate_storyboard_images.py \
|
|
124
124
|
--project-dir "<project_dir>" \
|
|
125
|
-
--env-file
|
|
125
|
+
--env-file ~/.codex/skills/openai-text-to-image-storyboard/.env \
|
|
126
126
|
--content-name "<content_name>" \
|
|
127
127
|
--prompts-file "<project_dir>/pictures/<content_name>/prompts.json"
|
|
128
128
|
```
|
|
@@ -133,7 +133,7 @@ python /Users/tszkinlai/.codex/skills/openai-text-to-image-storyboard/scripts/ge
|
|
|
133
133
|
- Generate audio + timeline + SRT:
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
|
-
python
|
|
136
|
+
python ~/.codex/skills/docs-to-voice/scripts/docs_to_voice.py \
|
|
137
137
|
--project-dir "<project_dir>" \
|
|
138
138
|
--project-name "<content_name>" \
|
|
139
139
|
--text "<loop_narration_script>"
|
|
@@ -38,6 +38,7 @@ It is designed to be reusable by other skills that already know the issue title
|
|
|
38
38
|
- Preserve upstream evidence content; only localize section headers and default fallback text.
|
|
39
39
|
- Make the issue type explicit: `problem`, `feature`, `performance`, `security`, `docs`, or `observability`.
|
|
40
40
|
- For `problem` issues, describe the expected behavior and current behavior with BDD-style `Given / When / Then`, then state the behavioral difference explicitly.
|
|
41
|
+
- Prefer `python3` plus an absolute helper path when invoking bundled scripts; do not assume `python`, relative paths, or the caller's cwd are wired correctly.
|
|
41
42
|
|
|
42
43
|
## Workflow
|
|
43
44
|
|
|
@@ -95,10 +96,16 @@ It is designed to be reusable by other skills that already know the issue title
|
|
|
95
96
|
|
|
96
97
|
Use the bundled script.
|
|
97
98
|
|
|
99
|
+
First resolve:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
SKILL_ROOT=~/.codex/skills/open-github-issue
|
|
103
|
+
```
|
|
104
|
+
|
|
98
105
|
Problem issue:
|
|
99
106
|
|
|
100
107
|
```bash
|
|
101
|
-
|
|
108
|
+
python3 "$SKILL_ROOT/scripts/open_github_issue.py" \
|
|
102
109
|
--issue-type problem \
|
|
103
110
|
--title "[Log] <short symptom>" \
|
|
104
111
|
--problem-description $'Expected Behavior (BDD)\nGiven ...\nWhen ...\nThen ...\n\nCurrent Behavior (BDD)\nGiven ...\nWhen ...\nThen ...\n\nBehavior Gap\n- Expected: ...\n- Actual: ...\n- Difference/Impact: ...\n\nEvidence\n- symptom: ...\n- impact: ...\n- key evidence: ...' \
|
|
@@ -110,7 +117,7 @@ python scripts/open_github_issue.py \
|
|
|
110
117
|
Feature proposal issue:
|
|
111
118
|
|
|
112
119
|
```bash
|
|
113
|
-
|
|
120
|
+
python3 "$SKILL_ROOT/scripts/open_github_issue.py" \
|
|
114
121
|
--issue-type feature \
|
|
115
122
|
--title "[Feature] <short proposal>" \
|
|
116
123
|
--proposal "<what should be added or changed>" \
|
|
@@ -122,7 +129,7 @@ python scripts/open_github_issue.py \
|
|
|
122
129
|
Performance issue:
|
|
123
130
|
|
|
124
131
|
```bash
|
|
125
|
-
|
|
132
|
+
python3 "$SKILL_ROOT/scripts/open_github_issue.py" \
|
|
126
133
|
--issue-type performance \
|
|
127
134
|
--title "[Performance] Slow dashboard query under large tenants" \
|
|
128
135
|
--problem-description "Dashboard loading time degrades sharply once tenant data exceeds current pagination assumptions." \
|
|
@@ -135,7 +142,7 @@ python scripts/open_github_issue.py \
|
|
|
135
142
|
Security issue:
|
|
136
143
|
|
|
137
144
|
```bash
|
|
138
|
-
|
|
145
|
+
python3 "$SKILL_ROOT/scripts/open_github_issue.py" \
|
|
139
146
|
--issue-type security \
|
|
140
147
|
--title "[Security] Missing authorization check on admin export" \
|
|
141
148
|
--problem-description "The admin export endpoint can be reached without verifying the caller's admin role." \
|
|
@@ -150,7 +157,7 @@ python scripts/open_github_issue.py \
|
|
|
150
157
|
Docs issue:
|
|
151
158
|
|
|
152
159
|
```bash
|
|
153
|
-
|
|
160
|
+
python3 "$SKILL_ROOT/scripts/open_github_issue.py" \
|
|
154
161
|
--issue-type docs \
|
|
155
162
|
--title "[Docs] Deployment guide omits required Redis configuration" \
|
|
156
163
|
--problem-description "The deployment guide does not mention the required Redis URL and worker startup order." \
|
|
@@ -162,7 +169,7 @@ python scripts/open_github_issue.py \
|
|
|
162
169
|
Observability issue:
|
|
163
170
|
|
|
164
171
|
```bash
|
|
165
|
-
|
|
172
|
+
python3 "$SKILL_ROOT/scripts/open_github_issue.py" \
|
|
166
173
|
--issue-type observability \
|
|
167
174
|
--title "[Observability] Missing request identifiers in payment retry logs" \
|
|
168
175
|
--problem-description "Retry logs do not include stable request or trace identifiers, so multi-line failures cannot be correlated quickly." \
|
|
@@ -199,3 +206,4 @@ When another skill depends on `open-github-issue`:
|
|
|
199
206
|
## Resources
|
|
200
207
|
|
|
201
208
|
- `scripts/open_github_issue.py`: Deterministic issue publishing helper with auth fallback and README language detection.
|
|
209
|
+
- If the helper path is unavailable or still fails for environment reasons, fall back to direct `gh issue create` or GitHub REST API publishing instead of retrying the same broken relative-path invocation.
|
|
@@ -50,14 +50,14 @@ OPENAI_IMAGE_MODEL=gpt-image-1
|
|
|
50
50
|
> Both `OPENAI_IMAGE_RATIO` and `OPENAI_IMAGE_ASPECT_RATIO` are supported; `OPENAI_IMAGE_RATIO` is preferred.
|
|
51
51
|
> If a ratio is provided, the script performs center-crop post-processing to match it.
|
|
52
52
|
> If provider ignores `aspect_ratio`, use `OPENAI_IMAGE_SIZE` (for example `1024x768`).
|
|
53
|
-
> By default, the script reads
|
|
53
|
+
> By default, the script reads `~/.codex/skills/openai-text-to-image-storyboard/.env`.
|
|
54
54
|
|
|
55
55
|
3. Run with JSON prompt file
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
58
|
python scripts/generate_storyboard_images.py \
|
|
59
59
|
--project-dir /path/to/project \
|
|
60
|
-
--env-file
|
|
60
|
+
--env-file ~/.codex/skills/openai-text-to-image-storyboard/.env \
|
|
61
61
|
--content-name "1_chapter_title" \
|
|
62
62
|
--prompts-file /path/to/prompts.json
|
|
63
63
|
```
|
|
@@ -44,7 +44,7 @@ Always save outputs in `pictures/<content_name>/` (example: `pictures/1_chapter_
|
|
|
44
44
|
|
|
45
45
|
Create `.env` in this skill folder (default path used by script):
|
|
46
46
|
|
|
47
|
-
-
|
|
47
|
+
- `~/.codex/skills/openai-text-to-image-storyboard/.env`
|
|
48
48
|
|
|
49
49
|
You can still override via `--env-file` when needed.
|
|
50
50
|
All CLI parameters take priority over environment variables.
|
|
@@ -59,16 +59,16 @@ All CLI parameters take priority over environment variables.
|
|
|
59
59
|
- `OPENAI_IMAGE_STYLE` (optional)
|
|
60
60
|
|
|
61
61
|
A template is provided at:
|
|
62
|
-
-
|
|
62
|
+
- `~/.codex/skills/openai-text-to-image-storyboard/.env.example`
|
|
63
63
|
|
|
64
64
|
## Command
|
|
65
65
|
|
|
66
66
|
Use JSON prompt file:
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
python
|
|
69
|
+
python ~/.codex/skills/openai-text-to-image-storyboard/scripts/generate_storyboard_images.py \
|
|
70
70
|
--project-dir /path/to/project \
|
|
71
|
-
--env-file
|
|
71
|
+
--env-file ~/.codex/skills/openai-text-to-image-storyboard/.env \
|
|
72
72
|
--content-name "1_chapter_title" \
|
|
73
73
|
--prompts-file /path/to/prompts.json
|
|
74
74
|
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "OpenAI Text to Image Storyboard"
|
|
3
3
|
short_description: "Generate image sets from agent-decided prompts"
|
|
4
|
-
default_prompt: "Use $openai-text-to-image-storyboard to decide scene prompts from text and generate images into pictures/{content_name}/ as soon as content is available. Always provide prompts through a JSON prompts file and run image generation directly when required inputs are present. Load API settings from
|
|
4
|
+
default_prompt: "Use $openai-text-to-image-storyboard to decide scene prompts from text and generate images into pictures/{content_name}/ as soon as content is available. Always provide prompts through a JSON prompts file and run image generation directly when required inputs are present. Load API settings from ~/.codex/skills/openai-text-to-image-storyboard/.env by default."
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ description: Investigate production or local simulation runs for runtime-toolcha
|
|
|
15
15
|
## Standards
|
|
16
16
|
|
|
17
17
|
- Evidence: Base conclusions on the actual preset, runtime command, logs, SQLite event store, local stub responses, and the code paths that generated them.
|
|
18
|
-
- Execution: Reproduce with the exact scenario first, separate product logic failures from simulation-toolchain failures, make the smallest realistic toolchain fix, and rerun the same bounded scenario to validate.
|
|
18
|
+
- Execution: Reproduce with the exact scenario first, verify the bounded-run contract against the actual script/env implementation before launch, separate product logic failures from simulation-toolchain failures, make the smallest realistic toolchain fix, and rerun the same bounded scenario to validate.
|
|
19
19
|
- Quality: Prefer harness or stub fixes that improve realism over one-off scenario hacks, avoid duplicating existing workflow skills, and record reusable presets when a scenario becomes part of the regular test suite.
|
|
20
20
|
- Output: Return the scenario contract, observed outcomes, root-cause chain, fixes applied, validation evidence, and any remaining realism gaps.
|
|
21
21
|
|
|
@@ -41,6 +41,8 @@ Use this skill to debug simulation workflows where the repository exposes a prod
|
|
|
41
41
|
|
|
42
42
|
- Use the same production/local simulation script the repository already treats as canonical.
|
|
43
43
|
- Prefer a bounded run window with a stable run name and output directory.
|
|
44
|
+
- Before launch, read the script or wrapper that enforces the run duration and confirm the real control surface, such as the exact env var name, CLI flag, shutdown helper, and artifact path conventions.
|
|
45
|
+
- Do not assume a generic `RUNTIME_SECS`-style variable is wired correctly; verify the actual variable names and stop path from code or scripts first.
|
|
44
46
|
- Save and inspect the exact artifacts produced by that run:
|
|
45
47
|
- main runtime log
|
|
46
48
|
- actor or stub logs
|
|
@@ -48,6 +50,7 @@ Use this skill to debug simulation workflows where the repository exposes a prod
|
|
|
48
50
|
- SQLite or other persistence outputs
|
|
49
51
|
- scenario manifest or preset-resolved settings
|
|
50
52
|
- Do not trust older run directories when the user asks about a new execution.
|
|
53
|
+
- If the run exceeds the agreed bounded window, stop it promptly, preserve the partial artifacts, and treat the overrun itself as a toolchain bug or contract mismatch to diagnose.
|
|
51
54
|
|
|
52
55
|
### 3) Audit the artifact chain before diagnosing product logic
|
|
53
56
|
|
|
@@ -143,6 +146,7 @@ Use this skill to debug simulation workflows where the repository exposes a prod
|
|
|
143
146
|
|
|
144
147
|
## Common failure patterns
|
|
145
148
|
|
|
149
|
+
- **Bounded-run contract drift**: the analyst assumes the wrong duration env var, CLI flag, or shutdown path, so the run exceeds the promised window and the captured evidence no longer matches the requested contract.
|
|
146
150
|
- **Wrong artifact source**: the analyst inspects an older SQLite file or the wrong event database and concludes that runtime behavior is missing.
|
|
147
151
|
- **Preset says one thing, harness does another**: scenario names sound right, but the actual matrix or oracle mode does not match the user’s intent.
|
|
148
152
|
- **Stub realism drift**: local quote, swap, or oracle stubs distort pricing, accounts, or program IDs enough to create false failures or false profits.
|
|
@@ -15,7 +15,7 @@ description: Use a background terminal to run a user-specified command immediate
|
|
|
15
15
|
## Standards
|
|
16
16
|
|
|
17
17
|
- Evidence: Anchor every conclusion to the requested command, execution window, startup/shutdown timestamps, captured logs, and concrete runtime signals.
|
|
18
|
-
- Execution: Collect the run contract, use a background terminal, optionally update the code only when the user asks, execute the requested command immediately or in the requested window, capture logs, stop cleanly when bounded, then delegate log review to `analyse-app-logs` only when findings are requested or needed.
|
|
18
|
+
- Execution: Collect the run contract, verify the real stop mechanism before launch, use a background terminal, optionally update the code only when the user asks, execute the requested command immediately or in the requested window, capture logs, stop cleanly when bounded, then delegate log review to `analyse-app-logs` only when findings are requested or needed.
|
|
19
19
|
- Quality: Keep scheduling, execution, and shutdown deterministic; separate confirmed findings from hypotheses; and mark each assessed module healthy/degraded/failed/unknown with reasons.
|
|
20
20
|
- Output: Return the run configuration, execution status, log locations, optional code-update result, optional module health by area, confirmed issues, potential issues, observability gaps, and scheduler status when applicable.
|
|
21
21
|
|
|
@@ -61,6 +61,7 @@ This skill is an orchestration layer. It owns the background terminal session, o
|
|
|
61
61
|
- Use a dedicated background terminal session for the whole workflow.
|
|
62
62
|
- Create a dedicated run folder and record timezone, cwd, requested command, terminal session identifier, and any requested start/end boundaries.
|
|
63
63
|
- Capture stdout and stderr from the beginning of the session so the full run stays auditable.
|
|
64
|
+
- Identify and record the exact bounded-stop mechanism before launch: signal path, wrapper script, env var names, CLI flags, PID capture, and any project-specific shutdown helper.
|
|
64
65
|
3. Optionally update to the latest safe code state
|
|
65
66
|
- Only do this step when the user explicitly asked to update the project before execution.
|
|
66
67
|
- Prefer the repository's normal safe update path, such as `git pull --ff-only`, or the project's documented sync command if one exists.
|
|
@@ -76,8 +77,10 @@ This skill is an orchestration layer. It owns the background terminal session, o
|
|
|
76
77
|
- If readiness never arrives, stop the run, preserve logs, and treat it as a failed startup window.
|
|
77
78
|
6. Observe and stop when bounded
|
|
78
79
|
- If a bounded window or explicit stop time was requested, keep the process running only for that agreed window and then stop it cleanly.
|
|
80
|
+
- Do not rely only on the child command to self-terminate on time; track the wall-clock deadline yourself and enforce the stop sequence when the deadline is reached.
|
|
79
81
|
- Track crashes, restarts, retry storms, timeout bursts, stuck jobs, resource pressure, and repeated warnings during the run.
|
|
80
82
|
- Use the project's normal shutdown path first; if graceful stop fails, escalate deterministically and record the exact stop sequence and timestamps.
|
|
83
|
+
- If the process overruns the agreed window, stop it immediately, mark the run as an overrun, and report whether the cause was a bad wrapper contract, a missing stop hook, or a failed shutdown.
|
|
81
84
|
7. Explain findings from logs when requested
|
|
82
85
|
- If the user asked for findings after completion, wait for the run to finish before analyzing the captured logs.
|
|
83
86
|
- Invoke `analyse-app-logs` on only the captured runtime window.
|
|
@@ -130,6 +133,7 @@ Use this structure in responses:
|
|
|
130
133
|
## Guardrails
|
|
131
134
|
|
|
132
135
|
- Do not let the project continue running past the agreed window unless the user explicitly asks.
|
|
136
|
+
- Do not assume the documented bound is real until the wrapper or script implementation confirms it.
|
|
133
137
|
- Do not perform a code-update step unless the user explicitly asked for it.
|
|
134
138
|
- Do not claim steady-state health from startup-only evidence.
|
|
135
139
|
- Keep the run folder and scheduler metadata so the investigation can be reproduced.
|
|
@@ -29,7 +29,27 @@ Optional environment overrides:
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
$ToolkitRepoUrl = if ($env:APOLLO_TOOLKIT_REPO_URL) { $env:APOLLO_TOOLKIT_REPO_URL } else { "https://github.com/LaiTszKin/apollo-toolkit.git" }
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
function Expand-UserPath {
|
|
34
|
+
param([string]$Path)
|
|
35
|
+
|
|
36
|
+
if ([string]::IsNullOrWhiteSpace($Path)) {
|
|
37
|
+
return $Path
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if ($Path -eq "~") {
|
|
41
|
+
return $HOME
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if ($Path.StartsWith("~/") -or $Path.StartsWith('~\')) {
|
|
45
|
+
$trimmed = $Path.Substring(2)
|
|
46
|
+
return Join-Path $HOME $trimmed
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return $Path
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
$ToolkitHome = if ($env:APOLLO_TOOLKIT_HOME) { Expand-UserPath $env:APOLLO_TOOLKIT_HOME } else { Join-Path $HOME ".apollo-toolkit" }
|
|
33
53
|
|
|
34
54
|
function Show-Banner {
|
|
35
55
|
@"
|
|
@@ -207,7 +227,7 @@ function Install-Codex {
|
|
|
207
227
|
param([string[]]$SkillPaths)
|
|
208
228
|
|
|
209
229
|
$target = if ($env:CODEX_SKILLS_DIR) {
|
|
210
|
-
$env:CODEX_SKILLS_DIR
|
|
230
|
+
Expand-UserPath $env:CODEX_SKILLS_DIR
|
|
211
231
|
}
|
|
212
232
|
else {
|
|
213
233
|
Join-Path $HOME ".codex/skills"
|
|
@@ -223,7 +243,7 @@ function Install-OpenClaw {
|
|
|
223
243
|
param([string[]]$SkillPaths)
|
|
224
244
|
|
|
225
245
|
$openclawHome = if ($env:OPENCLAW_HOME) {
|
|
226
|
-
$env:OPENCLAW_HOME
|
|
246
|
+
Expand-UserPath $env:OPENCLAW_HOME
|
|
227
247
|
}
|
|
228
248
|
else {
|
|
229
249
|
Join-Path $HOME ".openclaw"
|
|
@@ -251,7 +271,7 @@ function Install-Trae {
|
|
|
251
271
|
param([string[]]$SkillPaths)
|
|
252
272
|
|
|
253
273
|
$target = if ($env:TRAE_SKILLS_DIR) {
|
|
254
|
-
$env:TRAE_SKILLS_DIR
|
|
274
|
+
Expand-UserPath $env:TRAE_SKILLS_DIR
|
|
255
275
|
}
|
|
256
276
|
else {
|
|
257
277
|
Join-Path $HOME ".trae/skills"
|
|
@@ -267,7 +287,7 @@ function Install-Agents {
|
|
|
267
287
|
param([string[]]$SkillPaths)
|
|
268
288
|
|
|
269
289
|
$target = if ($env:AGENTS_SKILLS_DIR) {
|
|
270
|
-
$env:AGENTS_SKILLS_DIR
|
|
290
|
+
Expand-UserPath $env:AGENTS_SKILLS_DIR
|
|
271
291
|
}
|
|
272
292
|
else {
|
|
273
293
|
Join-Path $HOME ".agents/skills"
|
|
@@ -25,7 +25,24 @@ USAGE
|
|
|
25
25
|
|
|
26
26
|
SCRIPT_SOURCE="${BASH_SOURCE[0]-}"
|
|
27
27
|
TOOLKIT_REPO_URL="${APOLLO_TOOLKIT_REPO_URL:-https://github.com/LaiTszKin/apollo-toolkit.git}"
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
expand_user_path() {
|
|
30
|
+
local raw_path="${1-}"
|
|
31
|
+
|
|
32
|
+
case "$raw_path" in
|
|
33
|
+
"~")
|
|
34
|
+
printf '%s\n' "$HOME"
|
|
35
|
+
;;
|
|
36
|
+
"~/"*)
|
|
37
|
+
printf '%s\n' "$HOME/${raw_path#~/}"
|
|
38
|
+
;;
|
|
39
|
+
*)
|
|
40
|
+
printf '%s\n' "$raw_path"
|
|
41
|
+
;;
|
|
42
|
+
esac
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
TOOLKIT_HOME="$(expand_user_path "${APOLLO_TOOLKIT_HOME:-$HOME/.apollo-toolkit}")"
|
|
29
46
|
|
|
30
47
|
show_banner() {
|
|
31
48
|
cat <<'BANNER'
|
|
@@ -94,7 +111,7 @@ replace_with_copy() {
|
|
|
94
111
|
|
|
95
112
|
install_codex() {
|
|
96
113
|
local codex_skills_dir
|
|
97
|
-
codex_skills_dir="${CODEX_SKILLS_DIR:-$HOME/.codex/skills}"
|
|
114
|
+
codex_skills_dir="$(expand_user_path "${CODEX_SKILLS_DIR:-$HOME/.codex/skills}")"
|
|
98
115
|
|
|
99
116
|
echo "Installing to codex: $codex_skills_dir"
|
|
100
117
|
for src in "${SKILL_PATHS[@]}"; do
|
|
@@ -106,7 +123,7 @@ install_openclaw() {
|
|
|
106
123
|
local openclaw_home workspace skills_dir
|
|
107
124
|
local -a workspaces
|
|
108
125
|
|
|
109
|
-
openclaw_home="${OPENCLAW_HOME:-$HOME/.openclaw}"
|
|
126
|
+
openclaw_home="$(expand_user_path "${OPENCLAW_HOME:-$HOME/.openclaw}")"
|
|
110
127
|
|
|
111
128
|
workspaces=()
|
|
112
129
|
while IFS= read -r workspace; do
|
|
@@ -129,7 +146,7 @@ install_openclaw() {
|
|
|
129
146
|
|
|
130
147
|
install_trae() {
|
|
131
148
|
local trae_skills_dir
|
|
132
|
-
trae_skills_dir="${TRAE_SKILLS_DIR:-$HOME/.trae/skills}"
|
|
149
|
+
trae_skills_dir="$(expand_user_path "${TRAE_SKILLS_DIR:-$HOME/.trae/skills}")"
|
|
133
150
|
|
|
134
151
|
echo "Installing to trae: $trae_skills_dir"
|
|
135
152
|
for src in "${SKILL_PATHS[@]}"; do
|
|
@@ -139,7 +156,7 @@ install_trae() {
|
|
|
139
156
|
|
|
140
157
|
install_agents() {
|
|
141
158
|
local agents_skills_dir
|
|
142
|
-
agents_skills_dir="${AGENTS_SKILLS_DIR:-$HOME/.agents/skills}"
|
|
159
|
+
agents_skills_dir="$(expand_user_path "${AGENTS_SKILLS_DIR:-$HOME/.agents/skills}")"
|
|
143
160
|
|
|
144
161
|
echo "Installing to agents: $agents_skills_dir"
|
|
145
162
|
for src in "${SKILL_PATHS[@]}"; do
|
|
@@ -32,8 +32,8 @@ No mandatory dependencies.
|
|
|
32
32
|
1. Copy env template:
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
cp
|
|
36
|
-
|
|
35
|
+
cp ~/.codex/skills/text-to-short-video/.env.example \
|
|
36
|
+
~/.codex/skills/text-to-short-video/.env
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
2. Required values:
|
|
@@ -56,10 +56,10 @@ cp /Users/tszkinlai/.codex/skills/text-to-short-video/.env.example \
|
|
|
56
56
|
If API-generated video ratio/size does not match the target, run:
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
python
|
|
59
|
+
python ~/.codex/skills/text-to-short-video/scripts/enforce_video_aspect_ratio.py \
|
|
60
60
|
--input-video "<downloaded_video_path>" \
|
|
61
61
|
--output-video "<final_output_video_path>" \
|
|
62
|
-
--env-file
|
|
62
|
+
--env-file ~/.codex/skills/text-to-short-video/.env \
|
|
63
63
|
--force
|
|
64
64
|
```
|
|
65
65
|
|
|
@@ -82,11 +82,11 @@ Consistency rules:
|
|
|
82
82
|
|
|
83
83
|
Use this template:
|
|
84
84
|
|
|
85
|
-
-
|
|
85
|
+
- `~/.codex/skills/text-to-short-video/.env.example`
|
|
86
86
|
|
|
87
87
|
Copy to:
|
|
88
88
|
|
|
89
|
-
-
|
|
89
|
+
- `~/.codex/skills/text-to-short-video/.env`
|
|
90
90
|
|
|
91
91
|
Required keys:
|
|
92
92
|
|
|
@@ -173,10 +173,10 @@ If provider returns multiple outputs, keep the best one that matches requested s
|
|
|
173
173
|
When output ratio or resolution differs from target, run:
|
|
174
174
|
|
|
175
175
|
```bash
|
|
176
|
-
python
|
|
176
|
+
python ~/.codex/skills/text-to-short-video/scripts/enforce_video_aspect_ratio.py \
|
|
177
177
|
--input-video "<downloaded_video_path>" \
|
|
178
178
|
--output-video "<final_output_video_path>" \
|
|
179
|
-
--env-file
|
|
179
|
+
--env-file ~/.codex/skills/text-to-short-video/.env \
|
|
180
180
|
--force
|
|
181
181
|
```
|
|
182
182
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Text to Short Video"
|
|
3
3
|
short_description: "Turn text into 30-60s short videos via API"
|
|
4
|
-
default_prompt: "Use $text-to-short-video to convert my text into one 30-60 second short video using an API-only workflow. Before building the final prompt, load <project_dir>/pictures/<content_name>/roles.json as the role source and keep role consistency: do not modify existing role id/name/appearance/outfit, only update role descriptions for clip-specific actions. Then call an OpenAI-compatible /videos/generations endpoint with settings from
|
|
4
|
+
default_prompt: "Use $text-to-short-video to convert my text into one 30-60 second short video using an API-only workflow. Before building the final prompt, load <project_dir>/pictures/<content_name>/roles.json as the role source and keep role consistency: do not modify existing role id/name/appearance/outfit, only update role descriptions for clip-specific actions. Then call an OpenAI-compatible /videos/generations endpoint with settings from ~/.codex/skills/text-to-short-video/.env, poll until completion, download the MP4, and run post-process crop/resize only when output aspect ratio or size mismatches."
|