@ztffn/presentation-generator-plugin 1.6.2 → 1.6.3
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "presentation-generator",
|
|
3
3
|
"description": "Generate complete graph-based presentations from natural language briefs and project documents. Pipeline: content extraction, narrative design, deterministic graph generation, and visual styling.",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.3",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Huma"
|
|
7
7
|
},
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -198,21 +198,13 @@ cp _temp/presentation-content-brief.json "presentations/{SLUG}/content-brief.jso
|
|
|
198
198
|
cp _temp/presentation-outline.md "presentations/{SLUG}/outline.md"
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
Then upload the presentation automatically. Read the upload skill
|
|
201
|
+
Then upload the presentation automatically. Read the upload skill and follow it exactly — it covers key setup, the curl command, and error handling:
|
|
202
202
|
|
|
203
203
|
```
|
|
204
204
|
Read: {PLUGIN_ROOT}/skills/upload-presentation/SKILL.md
|
|
205
205
|
```
|
|
206
206
|
|
|
207
|
-
The presentation JSON is at `presentations/{SLUG}/{SLUG}.json`. The `name` field must be at the JSON root — use the TOPIC from Phase 1
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
jq --arg name "{TOPIC}" '. + {"name": $name}' "presentations/{SLUG}/{SLUG}.json" | \
|
|
211
|
-
curl -s -X POST "https://humagreenfield.netlify.app/api/presentations/upload" \
|
|
212
|
-
-H "Content-Type: application/json" \
|
|
213
|
-
-H "X-API-Key: TheSunIsFree" \
|
|
214
|
-
-d @-
|
|
215
|
-
```
|
|
207
|
+
The presentation JSON is at `presentations/{SLUG}/{SLUG}.json`. The `name` field must be at the JSON root — use the TOPIC from Phase 1 when constructing the upload payload.
|
|
216
208
|
|
|
217
209
|
On success, report the returned URLs to the user:
|
|
218
210
|
|
|
@@ -14,25 +14,34 @@ Returns a live URL — no browser interaction needed.
|
|
|
14
14
|
|
|
15
15
|
## Prerequisites
|
|
16
16
|
|
|
17
|
-
- API key: `TheSunIsFree`
|
|
18
17
|
- The JSON to upload must match the `GraphPayload` shape: `{ name, nodes[], edges[] }`.
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
## API Key Setup
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
Resolve the API key before uploading:
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
1. Check for a saved key:
|
|
24
|
+
```bash
|
|
25
|
+
cat ~/.config/huma-showcase/api-key 2>/dev/null
|
|
26
|
+
```
|
|
27
|
+
2. If the file exists and prints a non-empty string, use that value as `{API_KEY}`.
|
|
28
|
+
3. If missing or empty, ask the user:
|
|
29
|
+
> "Enter your Huma Showcase API key:"
|
|
30
|
+
|
|
31
|
+
Then save it for future use:
|
|
32
|
+
```bash
|
|
33
|
+
mkdir -p ~/.config/huma-showcase && echo "{KEY}" > ~/.config/huma-showcase/api-key && chmod 600 ~/.config/huma-showcase/api-key
|
|
34
|
+
```
|
|
35
|
+
4. Use the resolved key in all curl commands below as `{API_KEY}`.
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
Pass the key via the `X-API-Key` header.
|
|
38
|
+
|
|
39
|
+
## Upload Command
|
|
32
40
|
|
|
33
41
|
```bash
|
|
34
|
-
curl -s -X POST "https://humagreenfield.netlify.app/api/presentations/upload
|
|
42
|
+
curl -s -X POST "https://humagreenfield.netlify.app/api/presentations/upload" \
|
|
35
43
|
-H "Content-Type: application/json" \
|
|
44
|
+
-H "X-API-Key: {API_KEY}" \
|
|
36
45
|
-d @_temp/presentation-draft.json
|
|
37
46
|
```
|
|
38
47
|
|
|
@@ -55,7 +64,7 @@ The API requires `name` at the JSON root. Supply it explicitly using the TOPIC f
|
|
|
55
64
|
jq --arg name "{TOPIC}" '. + {"name": $name}' "presentations/{SLUG}/{SLUG}.json" | \
|
|
56
65
|
curl -s -X POST "https://humagreenfield.netlify.app/api/presentations/upload" \
|
|
57
66
|
-H "Content-Type: application/json" \
|
|
58
|
-
-H "X-API-Key:
|
|
67
|
+
-H "X-API-Key: {API_KEY}" \
|
|
59
68
|
-d @-
|
|
60
69
|
```
|
|
61
70
|
|
|
@@ -120,7 +129,7 @@ Error responses use standard HTTP status codes with `{ "error": "..." }` body:
|
|
|
120
129
|
| `400` | `"Body must be a JSON object"` | Wrap payload in `{}` |
|
|
121
130
|
| `400` | `"name is required (string)"` | Add `"name"` field to the JSON root |
|
|
122
131
|
| `400` | `"nodes is required (array)"` | Add `"nodes": [...]` to the JSON root |
|
|
123
|
-
| `401` | `"Unauthorized"` |
|
|
132
|
+
| `401` | `"Unauthorized"` | Key mismatch — check saved key at `~/.config/huma-showcase/api-key` |
|
|
124
133
|
| `500` | `"Server misconfiguration: PRESENTATIONS_API_KEY is not set"` | Env var missing on server |
|
|
125
134
|
| `500` | Storage error message | Blob write failed — retry or check Netlify status |
|
|
126
135
|
|
|
@@ -138,7 +147,7 @@ In Phase 7 of the `presentation-generator` pipeline, the output JSON is at `pres
|
|
|
138
147
|
jq --arg name "{TOPIC}" '. + {"name": $name}' "presentations/{SLUG}/{SLUG}.json" | \
|
|
139
148
|
curl -s -X POST "https://humagreenfield.netlify.app/api/presentations/upload" \
|
|
140
149
|
-H "Content-Type: application/json" \
|
|
141
|
-
-H "X-API-Key:
|
|
150
|
+
-H "X-API-Key: {API_KEY}" \
|
|
142
151
|
-d @-
|
|
143
152
|
```
|
|
144
153
|
|
|
@@ -150,6 +159,6 @@ fall back to `_temp/react-flow/presentations/` on the local filesystem.
|
|
|
150
159
|
```bash
|
|
151
160
|
curl -s -X POST "http://localhost:3000/api/presentations/upload" \
|
|
152
161
|
-H "Content-Type: application/json" \
|
|
153
|
-
-H "X-API-Key:
|
|
162
|
+
-H "X-API-Key: {API_KEY}" \
|
|
154
163
|
-d @_temp/presentation-draft.json
|
|
155
164
|
```
|