@warpgogol/forge 0.13.0 → 0.15.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 (57) hide show
  1. package/AGENTS.md +4 -3
  2. package/README.md +58 -5
  3. package/dist/bin/cli.js +0 -0
  4. package/dist/os/core/core.module.d.ts.map +1 -1
  5. package/dist/os/core/core.module.js +10 -0
  6. package/dist/os/core/core.module.js.map +1 -1
  7. package/dist/os/rfc/handlers/shared.d.ts.map +1 -1
  8. package/dist/os/rfc/handlers/shared.js +12 -6
  9. package/dist/os/rfc/handlers/shared.js.map +1 -1
  10. package/dist/os/rfc/index.d.ts +1 -1
  11. package/dist/os/rfc/index.d.ts.map +1 -1
  12. package/dist/os/rfc/index.js +1 -1
  13. package/dist/os/rfc/index.js.map +1 -1
  14. package/dist/os/rfc/types.d.ts +2 -1
  15. package/dist/os/rfc/types.d.ts.map +1 -1
  16. package/dist/os/rfc/types.js +2 -1
  17. package/dist/os/rfc/types.js.map +1 -1
  18. package/dist/os/spec/spec-materialize.d.ts.map +1 -1
  19. package/dist/os/spec/spec-materialize.js +4 -10
  20. package/dist/os/spec/spec-materialize.js.map +1 -1
  21. package/dist/src/onboarding/create.d.ts.map +1 -1
  22. package/dist/src/onboarding/create.js +5 -2
  23. package/dist/src/onboarding/create.js.map +1 -1
  24. package/dist/src/onboarding/doctor.d.ts.map +1 -1
  25. package/dist/src/onboarding/doctor.js +38 -0
  26. package/dist/src/onboarding/doctor.js.map +1 -1
  27. package/dist/src/onboarding/invariant-engine.d.ts.map +1 -1
  28. package/dist/src/onboarding/invariant-engine.js +52 -1
  29. package/dist/src/onboarding/invariant-engine.js.map +1 -1
  30. package/dist/src/onboarding/scaffold-project.d.ts.map +1 -1
  31. package/dist/src/onboarding/scaffold-project.js +25 -5
  32. package/dist/src/onboarding/scaffold-project.js.map +1 -1
  33. package/dist/src/profiles/profile-schema.d.ts +77 -1
  34. package/dist/src/profiles/profile-schema.d.ts.map +1 -1
  35. package/dist/src/profiles/profile-schema.js +39 -2
  36. package/dist/src/profiles/profile-schema.js.map +1 -1
  37. package/dist/src/profiles/stack-profile.d.ts +27 -0
  38. package/dist/src/profiles/stack-profile.d.ts.map +1 -1
  39. package/dist/src/profiles/stack-profile.js +4 -0
  40. package/dist/src/profiles/stack-profile.js.map +1 -1
  41. package/package.json +162 -60
  42. package/profiles/editframe-templates/composition-agents.md +70 -0
  43. package/profiles/editframe-templates/composition.tsx +33 -0
  44. package/profiles/editframe-templates/html-composition-agents.md +62 -0
  45. package/profiles/{editframe-html.yaml → editframe.yaml} +203 -38
  46. package/skills/fo/ef-brand-video-generator/SKILL.md +101 -0
  47. package/skills/fo/ef-composition/SKILL.md +147 -0
  48. package/skills/fo/ef-composition-review/SKILL.md +66 -0
  49. package/skills/fo/ef-dev-server/SKILL.md +107 -0
  50. package/skills/fo/ef-editor-gui/SKILL.md +131 -0
  51. package/skills/fo/ef-motion-design/SKILL.md +118 -0
  52. package/skills/fo/ef-onboard/SKILL.md +77 -0
  53. package/skills/fo/ef-render-verify/SKILL.md +56 -0
  54. package/skills/fo/ef-webhooks/SKILL.md +95 -0
  55. package/skills/fo/fo-session-retro/SKILL.md +2 -2
  56. package/profiles/editframe-html-templates/composition-agents.md +0 -34
  57. package/profiles/editframe-html-templates/composition.html +0 -32
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: ef-render-verify
3
+ description: Verify an Editframe render — validate, build, check determinism, inspect output
4
+ invocation: user
5
+ category: fo
6
+ concerns: read-only
7
+ dependsOn: []
8
+ languagePolicy: ref(PREFERENCES.md)
9
+ ---
10
+
11
+ <!-- skill-lint-disable SKILL-17 -->
12
+
13
+ # ef-render-verify
14
+
15
+ 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.
16
+
17
+ A read-only verification of an Editframe render pipeline. The skill runs validation, build, determinism check, and output inspection, then reports pass/fail for each step. It does **not** modify any file.
18
+
19
+ ## Scope
20
+
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
+
23
+ ## Process
24
+
25
+ ### 1. Pre-render validation
26
+
27
+ Run `forge validate` to check the composition with the profile's validate command (typically `editframe check`). Review the output for any validation errors. If validation fails, report the errors and stop — do not proceed to render.
28
+
29
+ ### 2. Render
30
+
31
+ Run `forge build` to produce the MP4 output. Review the output for any build errors. If the build fails, report the errors and stop.
32
+
33
+ ### 3. Determinism check
34
+
35
+ Run `forge determinism check` to verify the render is reproducible — two builds produce identical output. Review the output hash comparison. If the hashes differ, report the mismatch and stop.
36
+
37
+ ### 4. Output inspection
38
+
39
+ Check the render output:
40
+
41
+ - Verify the output MP4 file exists at the expected path (`dist/{composition}.mp4`).
42
+ - Check that the file size is non-zero.
43
+ - Check that the duration matches the root `Timegroup`'s `duration` prop (if ffprobe or equivalent is available).
44
+
45
+ ### 5. Report
46
+
47
+ Summarize the verification results — pass/fail for each step:
48
+
49
+ | Step | Status | Details |
50
+ | ----------------- | ----------- | -------------------------------------- |
51
+ | Validation | pass / fail | <error details or "all checks passed"> |
52
+ | Build | pass / fail | <error details or "build completed"> |
53
+ | Determinism | pass / fail | <hash comparison result> |
54
+ | Output inspection | pass / fail | <file exists, size, duration check> |
55
+
56
+ If all steps pass, the render is verified. If any step fails, provide specific recommendations for fixing the issue.
@@ -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,34 +0,0 @@
1
- # Composition Workspace
2
-
3
- This workspace contains an Editframe video composition.
4
-
5
- ## Domain terminology
6
-
7
- - **Composition** — the artifact this workspace produces (an HTML file using Editframe custom elements).
8
- - **Scene** — a structural module within a composition (an `ef-timegroup` block).
9
- - **Director** — the operator who creates and renders the composition.
10
-
11
- ## Quality invariants
12
-
13
- - **VIDEO-01**: Composition filenames must use kebab-case (lowercase letters, digits, hyphens only). This ensures consistent naming across the project. Severity: error.
14
- - **VIDEO-02**: Scene durations must use `contain` fit mode by default to avoid unexpected cropping of video content. Use `cover` or `fill` only when intentionally overriding the default. Severity: warning.
15
- - **VIDEO-03**: All speech audio elements (`ef-audio` with speech content) must have corresponding `ef-captions` elements for accessibility. Severity: error.
16
-
17
- ## Workflow
18
-
19
- 1. Create a `.html` file with Editframe custom elements (`ef-timegroup`, `ef-video`, `ef-audio`, `ef-text`, `ef-captions`).
20
- 2. Run `editframe preview` to preview the composition in the browser.
21
- 3. Run `editframe check` to validate the composition structure.
22
- 4. Run `editframe render -o dist/<name>.mp4` to produce the final video output.
23
-
24
- ## Reference template
25
-
26
- A sample composition template is available at `editframe-html-templates/composition.html` in the forge profiles directory. Copy it to start a new composition:
27
-
28
- ```sh
29
- cp node_modules/@warpgogol/forge/profiles/editframe-html-templates/composition.html compositions/my-new-video/composition.html
30
- ```
31
-
32
- ## File naming
33
-
34
- Composition files use kebab-case: `my-video.html`, `product-demo.html`, `intro-clip.html`.
@@ -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>