@warpgogol/forge 0.14.0 → 0.16.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.
Files changed (48) hide show
  1. package/AGENTS.md +5 -3
  2. package/README.md +58 -5
  3. package/dist/os/adr/frontmatter-io.d.ts +1 -0
  4. package/dist/os/adr/frontmatter-io.d.ts.map +1 -1
  5. package/dist/os/adr/frontmatter-io.js +3 -0
  6. package/dist/os/adr/frontmatter-io.js.map +1 -1
  7. package/dist/os/adr/handlers/validate.d.ts.map +1 -1
  8. package/dist/os/adr/handlers/validate.js +2 -2
  9. package/dist/os/adr/handlers/validate.js.map +1 -1
  10. package/dist/os/core/core.module.d.ts.map +1 -1
  11. package/dist/os/core/core.module.js +9 -0
  12. package/dist/os/core/core.module.js.map +1 -1
  13. package/dist/src/onboarding/create.d.ts.map +1 -1
  14. package/dist/src/onboarding/create.js +5 -2
  15. package/dist/src/onboarding/create.js.map +1 -1
  16. package/dist/src/onboarding/doctor.d.ts.map +1 -1
  17. package/dist/src/onboarding/doctor.js +38 -0
  18. package/dist/src/onboarding/doctor.js.map +1 -1
  19. package/dist/src/onboarding/invariant-engine.d.ts.map +1 -1
  20. package/dist/src/onboarding/invariant-engine.js +14 -7
  21. package/dist/src/onboarding/invariant-engine.js.map +1 -1
  22. package/dist/src/onboarding/scaffold-project.d.ts.map +1 -1
  23. package/dist/src/onboarding/scaffold-project.js +25 -5
  24. package/dist/src/onboarding/scaffold-project.js.map +1 -1
  25. package/dist/src/profiles/profile-schema.d.ts +73 -8
  26. package/dist/src/profiles/profile-schema.d.ts.map +1 -1
  27. package/dist/src/profiles/profile-schema.js +35 -10
  28. package/dist/src/profiles/profile-schema.js.map +1 -1
  29. package/dist/src/profiles/stack-profile.d.ts +26 -2
  30. package/dist/src/profiles/stack-profile.d.ts.map +1 -1
  31. package/dist/src/profiles/stack-profile.js +4 -0
  32. package/dist/src/profiles/stack-profile.js.map +1 -1
  33. package/package.json +1 -1
  34. package/profiles/editframe-templates/composition-agents.md +70 -0
  35. package/profiles/editframe-templates/composition.tsx +33 -0
  36. package/profiles/{editframe-html-templates/composition-agents.md → editframe-templates/html-composition-agents.md} +15 -16
  37. package/profiles/{editframe-html.yaml → editframe.yaml} +170 -56
  38. package/skills/fo/ef-brand-video-generator/SKILL.md +101 -0
  39. package/skills/fo/ef-composition/SKILL.md +147 -0
  40. package/skills/fo/ef-composition-review/SKILL.md +10 -10
  41. package/skills/fo/ef-dev-server/SKILL.md +107 -0
  42. package/skills/fo/ef-editor-gui/SKILL.md +131 -0
  43. package/skills/fo/ef-motion-design/SKILL.md +118 -0
  44. package/skills/fo/ef-onboard/SKILL.md +16 -29
  45. package/skills/fo/ef-render-verify/SKILL.md +2 -2
  46. package/skills/fo/ef-webhooks/SKILL.md +95 -0
  47. package/skills/fo/fo-session-retro/SKILL.md +2 -2
  48. package/profiles/editframe-html-templates/composition.html +0 -32
@@ -19,7 +19,7 @@ triggers:
19
19
 
20
20
  Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
21
21
 
22
- Guide the operator through creating a new Editframe video project within a Forge-managed workspace. The skill covers prerequisites check, discovery, scaffold, Editframe domain skills installation, domain knowledge reading, and build + preview.
22
+ Guide the operator through creating a new Editframe video project within a Forge-managed workspace. The skill covers prerequisites check, discovery, scaffold, domain knowledge reading, and build + preview.
23
23
 
24
24
  ## Process
25
25
 
@@ -45,46 +45,33 @@ Ask the operator:
45
45
  - Website URLs to use as content source — if provided, download and cache all relevant assets locally before building
46
46
  - No existing assets — start from scratch
47
47
 
48
- 3. **Stack preference**:
49
- - Vanilla HTML/CSS/JS (simpler, no build step beyond Vite)
50
- - React + TypeScript (component-based, type-safe)
51
- - No preference — recommend HTML for single videos, React for templates and editors
52
-
53
- 4. **Node.js/React libraries**: Ask if the operator has any libraries in mind (e.g. AnimeJS for animations, Tailwind for styling).
48
+ 3. **Node.js/React libraries**: Ask if the operator has any libraries in mind (e.g. AnimeJS for animations, Tailwind for styling).
54
49
 
55
50
  Prioritize getting all answers before starting to build. This minimizes wait time for the operator.
56
51
 
57
52
  ### 3. Scaffold
58
53
 
59
- Run `forge create --profile editframe-html` to scaffold the project with Forge governance (invariants, AGENTS.md templates, forge skills).
60
-
61
- The `editframe-html` profile currently targets HTML compositions only — it does not support a `--template react` flag. If the operator chose React, scaffold with `forge create --profile editframe-html`, then instruct the agent to install `@editframe/react` manually (`pnpm add @editframe/react`) after scaffold.
54
+ Run `forge create --profile editframe` to scaffold the project with Forge governance (invariants, AGENTS.md templates, forge skills). The `editframe` profile scaffolds a React + TypeScript + Vite project with `@editframe/react` pre-configured.
62
55
 
63
56
  If `forge create` fails (missing profile, network error, permission issue), report the error to the operator and stop. Do not proceed to subsequent steps without a scaffolded project.
64
57
 
65
- ### 4. Install Editframe domain skills
66
-
67
- Editframe publishes domain skills via `npm create @editframe`. To make them available alongside forge skills:
68
-
69
- 1. Run `npm create @editframe@latest` in the project directory. This installs Editframe's domain skills to `.agents/skills/editframe-*/`.
70
- 2. Report which skills were installed.
71
- 3. If the command fails (network issues, npm errors, unsupported flags), fall back to referencing the online documentation: direct the agent to read `https://editframe.com/llms.txt` and `https://editframe.com/skills/composition.md` before building. Do not use unverified CLI flags — if `npm create @editframe` prompts interactively, answer the prompts based on the operator's discovery answers from Step 2.
72
-
73
- ### 5. Read domain knowledge
58
+ ### 4. Read domain knowledge
74
59
 
75
- Before building, the agent MUST read the `editframe-composition` skill (either from `.agents/skills/editframe-composition/SKILL.md` if installed, or from `https://editframe.com/skills/composition.md`). This provides domain knowledge about:
60
+ Before building, the agent MUST read the vendored Editframe domain skills. These are bundled with `@warpgogol/forge` and available in `.agents/skills/`:
76
61
 
77
- - Time model (`ef-timegroup`, modes, duration, offset)
78
- - Media elements (`ef-video`, `ef-audio`, `ef-image`, `ef-text`, `ef-captions`)
79
- - CSS animations and transitions
80
- - Rendering pipeline
62
+ - **ef-composition** — time model, media elements, rendering pipeline
63
+ - **ef-dev-server** Vite plugin setup, local asset serving
64
+ - **ef-editor-gui** editor toolkit for visual composition editing
65
+ - **ef-webhooks** — webhook notifications for render completion
66
+ - **ef-brand-video-generator** — brand video generation templates
67
+ - **ef-motion-design** — motion design patterns, transitions, kinetic typography
81
68
 
82
- The agent should also read `editframe-dev-server` if the project uses the dev server.
69
+ The agent should also read **ef-composition-review** and **ef-render-verify** for quality assurance workflows.
83
70
 
84
- ### 6. Build and preview
71
+ ### 5. Build and preview
85
72
 
86
- 1. Build the initial composition based on the operator's answers from Step 2. Use the discovery answers (project type, assets, stack preference, libraries) to determine composition structure, asset placement, and optional dependencies.
87
- 2. Run `forge dev` to start the preview server (delegates to `editframe preview` per the `editframe-html` profile's `devServer.command`).
73
+ 1. Build the initial composition based on the operator's answers from Step 2. Use the discovery answers (project type, assets, libraries) to determine composition structure, asset placement, and optional dependencies.
74
+ 2. Run `forge dev` to start the preview server (delegates to `editframe preview` per the `editframe` profile's `devServer.command`).
88
75
  3. Report the localhost URL to the operator.
89
- 4. Run `forge doctor` to check all profile invariants on the initial composition. For the `editframe-html` profile, this covers VIDEO-01 through VIDEO-09.
76
+ 4. Run `forge doctor` to check all profile invariants on the initial composition. For the `editframe` profile, this covers VIDEO-01 through VIDEO-09.
90
77
  5. Report any invariant violations and suggest fixes.
@@ -18,7 +18,7 @@ A read-only verification of an Editframe render pipeline. The skill runs validat
18
18
 
19
19
  ## Scope
20
20
 
21
- This skill verifies render output for `.html` composition files using the `editframe-html` stack profile. It uses `forge validate`, `forge build`, and `forge determinism check` — all profile-driven commands.
21
+ This skill verifies render output for `.tsx` composition files using the `editframe` stack profile. It uses `forge validate`, `forge build`, and `forge determinism check` — all profile-driven commands.
22
22
 
23
23
  ## Process
24
24
 
@@ -40,7 +40,7 @@ Check the render output:
40
40
 
41
41
  - Verify the output MP4 file exists at the expected path (`dist/{composition}.mp4`).
42
42
  - Check that the file size is non-zero.
43
- - Check that the duration matches the root `ef-timegroup`'s `duration` attribute (if ffprobe or equivalent is available).
43
+ - Check that the duration matches the root `Timegroup`'s `duration` prop (if ffprobe or equivalent is available).
44
44
 
45
45
  ### 5. Report
46
46
 
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: ef-webhooks
3
+ description: "Configure Editframe webhooks for render completion and file processing notifications. Use when the operator asks to set up webhooks for Editframe events."
4
+ invocation: user
5
+ category: fo
6
+ concerns: read-only
7
+ dependsOn: []
8
+ languagePolicy: ref(PREFERENCES.md)
9
+ triggers:
10
+ - "set up editframe webhooks"
11
+ - "render completion notification"
12
+ - "file processing webhook"
13
+ - "webhook signature verification"
14
+ source: https://editframe.com/skills/webhooks.md
15
+ ---
16
+
17
+ <!-- skill-lint-disable SKILL-17 -->
18
+
19
+ Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
20
+
21
+ # Webhooks
22
+
23
+ Use webhooks to receive real-time HTTP POST notifications when a render completes or a file finishes processing. Use them instead of polling `getRenderProgress`/`getFileProcessingProgress`.
24
+
25
+ No SDK function registers a webhook. Configure one on an API key, through the dashboard (Settings → API Keys, or `editframe.com/resource/api_keys`). Set a **Webhook URL** (must use HTTPS). Select which **Webhook Events** (topics) to receive. When you create or update the key, the dashboard generates a **Webhook Secret**, used to sign deliveries. Copy this secret and store it alongside the API key.
26
+
27
+ ## Handling a webhook
28
+
29
+ ```typescript
30
+ import express from "express";
31
+ import crypto from "node:crypto";
32
+
33
+ const app = express();
34
+
35
+ app.post("/webhooks/editframe", express.raw({ type: "*/*" }), (req, res) => {
36
+ const signature = req.headers["x-webhook-signature"] as string;
37
+ const rawBody = req.body as Buffer;
38
+
39
+ const expected = crypto
40
+ .createHmac("sha256", process.env.EDITFRAME_WEBHOOK_SECRET!)
41
+ .update(rawBody)
42
+ .digest("hex");
43
+
44
+ if (!crypto.timingSafeEqual(Buffer.from(signature, "hex"), Buffer.from(expected, "hex"))) {
45
+ return res.status(401).send("Invalid signature");
46
+ }
47
+
48
+ res.status(200).send("OK");
49
+ const payload = JSON.parse(rawBody.toString("utf-8"));
50
+ processWebhookEvent(payload).catch(console.error);
51
+ });
52
+ ```
53
+
54
+ Every request carries an `X-Webhook-Signature` header: `HMAC-SHA256(webhook_secret, raw_json_body)`, hex-encoded. Verify with `crypto.timingSafeEqual`, not `===`.
55
+
56
+ Use `express.raw()`, not `express.json()`. Signature verification needs the exact raw bytes. Re-serializing parsed JSON can reorder keys or change whitespace, which changes the hash and breaks verification.
57
+
58
+ ## Payload
59
+
60
+ ```typescript
61
+ { topic: string, data: {...} }
62
+ ```
63
+
64
+ ### Render topics
65
+
66
+ `render.created`, `render.pending`, `render.rendering`, `render.completed`, `render.failed`
67
+
68
+ `data` includes `id`, `status`, `created_at`, `completed_at`, `failed_at`, `width`, `height`, `fps`, `byte_size`, `duration_ms`, `md5`, `metadata`, `expires_at` (`null` = permanent), `download_url` (populated once complete), `error` (populated on failure).
69
+
70
+ ### File topics
71
+
72
+ `file.created`, `file.uploading`, `file.processing`, `file.ready`, `file.failed`, `file.updated`
73
+
74
+ `data` includes `id`, `type` (`video`/`image`/`caption`), `status`, `filename`, `byte_size`, `md5`, `mime_type`, `width`, `height`, `expires_at`. Editframe sends `file.updated` for a file status change that doesn't match one of the other file topics.
75
+
76
+ ### Legacy topics
77
+
78
+ `image_file.created`, `isobmff_file.created`, `isobmff_track.created`, `unprocessed_file.created`. Do not build new integrations against these.
79
+
80
+ ## Delivery
81
+
82
+ - Each event arrives as one HTTP POST with a JSON body.
83
+ - Editframe retries on a fixed 10-second interval, up to 3 attempts total, with a 30-second timeout per attempt.
84
+ - Editframe may deliver an event more than once. Key side effects off `data.id` to stay idempotent.
85
+ - Always hash the **raw** request body for signature verification.
86
+
87
+ ## Testing
88
+
89
+ ```bash
90
+ npx editframe webhook -t render.completed
91
+ ```
92
+
93
+ This sends a real test event to the URL configured on your API key. There is no `--webhookURL` flag — the target URL always comes from the key's dashboard configuration. The dashboard's API key detail page has an equivalent "Test Webhook" button.
94
+
95
+ For local development, tunnel your dev server (e.g. `ngrok http 3000`) and point the API key's Webhook URL at the tunnel URL.
@@ -9,7 +9,7 @@ languagePolicy: ref(PREFERENCES.md)
9
9
  bindings:
10
10
  requires: []
11
11
  optional: [paths.invariantsFile]
12
- triggers: ["session retrospective", "capture insights from this session", "triage session discoveries", "Завершаем эту сессию", "Завершаем сессию", "Заканчиваем сессию", "Завершить сессию", "End session", "Wrap up", "Session end", "/session-end"]
12
+ triggers: ["session retrospective", "capture insights from this session", "triage session discoveries", "Завершаем сессию", "/session-end"]
13
13
  ---
14
14
 
15
15
  # Session Retro
@@ -261,7 +261,7 @@ When gathering session insights, not every observation deserves to be saved. App
261
261
 
262
262
  **Do NOT save** — the observation is:
263
263
 
264
- - A one-off fact with no future impact (e.g. "RFC-0676 was skipped due to a duplicate"). These are historical events, not knowledge. They do not help future agents work better.
264
+ - A one-off fact with no future impact (e.g. "an RFC was skipped due to a duplicate"). These are historical events, not knowledge. They do not help future agents work better.
265
265
  - A tool quirk already documented elsewhere (check `AGENTS.md` and existing memories first).
266
266
  - A transient state that will be irrelevant by the next session (e.g. "file X was dirty at session end").
267
267
  - A bug that was found and fixed in the same session with no broader lesson.
@@ -1,32 +0,0 @@
1
- <!--
2
- Editframe HTML composition template
3
- Copy this file to start a new composition. Editframe custom elements:
4
- - ef-timegroup: groups elements into a timed sequence
5
- - ef-video: video source with fit mode (contain, cover, fill)
6
- - ef-audio: audio source
7
- - ef-text: text overlay with positioning
8
- - ef-captions: accessibility captions for speech audio
9
- Run `editframe preview` to preview, `editframe render` to produce output.
10
- -->
11
- <ef-timegroup duration="10s">
12
- <ef-video
13
- src="assets/background.mp4"
14
- fit="contain"
15
- duration="10s"
16
- ></ef-video>
17
- <ef-text
18
- text="Your text here"
19
- x="50%"
20
- y="50%"
21
- font-size="48px"
22
- color="white"
23
- text-align="center"
24
- duration="5s"
25
- ></ef-text>
26
- <ef-audio
27
- src="assets/narration.mp3"
28
- ></ef-audio>
29
- <ef-captions
30
- src="assets/captions.vtt"
31
- ></ef-captions>
32
- </ef-timegroup>