claude-mem 13.2.0 → 13.3.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.
- package/.codex-plugin/plugin.json +2 -2
- package/dist/npx-cli/index.js +307 -278
- package/openclaw/openclaw.plugin.json +1 -1
- package/package.json +1 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/plugin/scripts/context-generator.cjs +4 -4
- package/plugin/scripts/mcp-server.cjs +13 -13
- package/plugin/scripts/server-beta-service.cjs +147 -122
- package/plugin/scripts/worker-service.cjs +362 -337
- package/plugin/skills/design-is/SKILL.md +312 -0
- package/plugin/skills/make-plan/SKILL.md +4 -0
- package/plugin/skills/oh-my-issues/SKILL.md +226 -0
- package/plugin/skills/weekly-digests/SKILL.md +262 -0
- package/plugin/skills/wowerpoint/SKILL.md +62 -0
- package/plugin/ui/viewer-bundle.js +14 -13
- package/.mcp.json +0 -12
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: weekly-digests
|
|
3
|
+
description: Generate a serial week-by-week narrative digest of a project's full claude-mem timeline. Splits the timeline into per-ISO-week files, then runs one consecutive subagent per week — each receiving the prior week's carry-forward block — to produce one chapter per ISO week of data. Use when asked for "weekly digests", "week-by-week story", "serial timeline", or "narrative chapters" of a project's history.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Weekly Digests
|
|
7
|
+
|
|
8
|
+
Produce a serial, multi-chapter narrative digest of a project's complete claude-mem history. Differs from `timeline-report` (one long report) — this generates one digest *per ISO week*, with each subagent reading the prior week's carry-forward block so the story stays coherent.
|
|
9
|
+
|
|
10
|
+
**The chapter count equals the number of ISO weeks the timeline covers.** A project with 2 weeks of data produces 2 chapters; one with 30 weeks produces 30. There is no fixed length — count the weeks first, then drive the pipeline off that count.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Trigger when the user asks for:
|
|
15
|
+
|
|
16
|
+
- "Weekly digests"
|
|
17
|
+
- "Week-by-week story"
|
|
18
|
+
- "Serial timeline"
|
|
19
|
+
- "Story chapters of [project]"
|
|
20
|
+
- "Run a digest for each week"
|
|
21
|
+
- "Continue the story week by week"
|
|
22
|
+
|
|
23
|
+
If the user wants a single sweeping report, use `timeline-report` instead. This skill is for serial chapter format.
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
- claude-mem worker running
|
|
28
|
+
- Project has at least one ISO week of observations (the pipeline degenerates gracefully — even N=1 works)
|
|
29
|
+
- A clean output directory the user is comfortable writing into
|
|
30
|
+
|
|
31
|
+
**Resolve the worker port** (do this once, reuse `$WORKER_PORT`):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
WORKER_PORT="${CLAUDE_MEM_WORKER_PORT:-$(node -e "const fs=require('fs'),p=require('path'),os=require('os');const uid=(typeof process.getuid==='function'?process.getuid():77);const fallback=String(37700+(uid%100));try{const s=JSON.parse(fs.readFileSync(p.join(os.homedir(),'.claude-mem','settings.json'),'utf-8'));process.stdout.write(String(s.CLAUDE_MEM_WORKER_PORT||fallback));}catch{process.stdout.write(fallback);}" 2>/dev/null)}"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Workflow
|
|
38
|
+
|
|
39
|
+
### Step 1: Determine the Project Name
|
|
40
|
+
|
|
41
|
+
Same worktree-detection pattern as `timeline-report`. In a worktree, the data source is the **parent project**:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git_dir=$(git rev-parse --git-dir 2>/dev/null)
|
|
45
|
+
git_common_dir=$(git rev-parse --git-common-dir 2>/dev/null)
|
|
46
|
+
if [ "$git_dir" != "$git_common_dir" ]; then
|
|
47
|
+
parent_project=$(basename "$(dirname "$git_common_dir")")
|
|
48
|
+
else
|
|
49
|
+
parent_project=$(basename "$PWD")
|
|
50
|
+
fi
|
|
51
|
+
echo "$parent_project"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Step 2: Fetch the Full Timeline and Save It
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
mkdir -p .scratch
|
|
58
|
+
curl -s "http://localhost:${WORKER_PORT}/api/context/inject?project=PROJECT_NAME&full=true" \
|
|
59
|
+
> .scratch/cm-timeline.md
|
|
60
|
+
wc -l .scratch/cm-timeline.md
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Sanity-check: confirm the file is non-empty and has the expected structure (preamble, then date headers like `### Mon DD, YYYY`, then numeric observation lines `<id> <time> <emoji> <title>` and session boundary lines `S<n> <prompt> (Mon DD at HH:MMpm)`).
|
|
64
|
+
|
|
65
|
+
### Step 3: Split the Timeline Into Per-ISO-Week Files
|
|
66
|
+
|
|
67
|
+
Write a Python script to `.scratch/split-timeline.py` that:
|
|
68
|
+
|
|
69
|
+
1. Parses date headers (`### Mon DD, YYYY`).
|
|
70
|
+
2. Groups days into ISO weeks via `date.isocalendar()` (Monday-start).
|
|
71
|
+
3. Emits one file per week to `docs/timeline-weeks/<YYYY>-W<NN>-<MonDD>-to-<MonDD>.md`, preserving each day's section verbatim.
|
|
72
|
+
4. Runs a dual-pass sanity check: total observations distributed must equal the count in the source file.
|
|
73
|
+
|
|
74
|
+
Output structure (filenames illustrative):
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
docs/timeline-weeks/
|
|
78
|
+
README.md # weekly index table
|
|
79
|
+
YYYY-W<NN>-MonDD-to-MonDD.md # one per ISO week the timeline covers
|
|
80
|
+
...
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Each weekly file should preserve the original daily sections verbatim. Do not paraphrase at this stage — the digest agents need raw fidelity.
|
|
84
|
+
|
|
85
|
+
**Count the resulting files** before launching the pipeline. That count is `TOTAL` and drives every subsequent step. Empty weeks (zero observations between active weeks) should be skipped — the pipeline only operates on weeks that have content.
|
|
86
|
+
|
|
87
|
+
### Step 4: Build the Weekly Index README
|
|
88
|
+
|
|
89
|
+
Write `docs/timeline-weeks/README.md` with a markdown table: Week | Dates | Observations | Sessions | File. This becomes the operator's roadmap and helps the agents understand pacing (peak weeks vs trough weeks).
|
|
90
|
+
|
|
91
|
+
### Step 5: Run the Consecutive Subagent Pipeline
|
|
92
|
+
|
|
93
|
+
**Critical: subagents run sequentially, NOT in parallel.** Each agent receives the prior agent's carry-forward block. This is the entire point of the skill — without it you have N disjoint summaries; with it you have an N-chapter serial narrative.
|
|
94
|
+
|
|
95
|
+
Create the output directory:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
mkdir -p docs/timeline-weeks/digests
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
For each week, in chronological order, dispatch a Task subagent (general-purpose) with this prompt template. **Wait for each agent to complete before launching the next.** Capture the carry-forward block from the result and inject it as `STORY_SO_FAR` into the next prompt.
|
|
102
|
+
|
|
103
|
+
#### Subagent Prompt Template
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
You are writing chapter {N} of {TOTAL} in a serial week-by-week digest of the {PROJECT} project's development history. Chapters 1 through {N-1} are written. {SPECIAL_NOTE: e.g. "This is the LARGEST week", "This is the TROUGH", "This is the FINAL chapter", "This is the ONLY chapter — both first AND final week"}.
|
|
107
|
+
|
|
108
|
+
**Source file (read in full):**
|
|
109
|
+
{ABSOLUTE_PATH_TO_WEEK_FILE}
|
|
110
|
+
|
|
111
|
+
**Output digest file (write):**
|
|
112
|
+
{ABSOLUTE_PATH_TO_DIGEST_FILE}
|
|
113
|
+
|
|
114
|
+
**Format key for the source file:**
|
|
115
|
+
- Numeric lines like `1 7:59p 🔵 Save hook file is empty` are observations (ID, time, type-emoji, title)
|
|
116
|
+
- `S##` lines are session boundaries (the user prompt that started the session)
|
|
117
|
+
- Emoji legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖️decision 🚨security_alert 🔐security_note
|
|
118
|
+
|
|
119
|
+
**Story so far (carry-forward from Week {N-1}):**
|
|
120
|
+
|
|
121
|
+
{STORY_SO_FAR_BLOCK_OR_EMPTY_FOR_WEEK_1}
|
|
122
|
+
|
|
123
|
+
**Your digest must include:**
|
|
124
|
+
1. **Title line** — `# Week {N} ({WEEK_LABEL}): {DATE_RANGE} — [your chosen subtitle]`
|
|
125
|
+
2. **One-line tagline** — what this week is about, in plain English
|
|
126
|
+
3. **Narrative section** ({BUDGET}) — tell the story. Resolve threads from prior weeks where the data shows resolution. Introduce new arcs. Use specific observation details.
|
|
127
|
+
4. **Threads continued / opened / resolved** sections
|
|
128
|
+
5. **Cliffhanger / What's next**
|
|
129
|
+
6. **Carry-forward block** at the very bottom, fenced as ```carry-forward ... ``` — structured handoff for the next week's agent.
|
|
130
|
+
|
|
131
|
+
**CARRY-FORWARD DISCIPLINE:**
|
|
132
|
+
- Cap at ~350 words.
|
|
133
|
+
- AGGRESSIVELY PRUNE: drop arcs that didn't surface this week unless they're actively unresolved cliffhangers.
|
|
134
|
+
- Drop cast members absent 2+ weeks unless load-bearing for the long arc.
|
|
135
|
+
- Quality over completeness. The next agent inherits what you mention; mention judiciously.
|
|
136
|
+
|
|
137
|
+
Required carry-forward sub-sections:
|
|
138
|
+
- **Active arcs** — ongoing themes/projects the next agent should watch for
|
|
139
|
+
- **Cast** — notable named systems/people/tools (continuing + new)
|
|
140
|
+
- **Unresolved** — open questions or unfinished work
|
|
141
|
+
- **Tone notes** — how the story is being told (voice, perspective, register evolution)
|
|
142
|
+
|
|
143
|
+
**Tone rules:**
|
|
144
|
+
- Third-person narrator, sharp, observational. Not twee.
|
|
145
|
+
- AI is "Claude"; human is "{USER_FIRST_NAME}".
|
|
146
|
+
- Treat codebase components as characters — whatever the project's recurring named systems are (e.g. a worker, a queue, a process manager, a recurring bug, a flaky migration). Don't import names from another project; use what shows up in this project's observations.
|
|
147
|
+
- Don't manufacture drama. Name what's there.
|
|
148
|
+
- Track the user's prompt-register evolution week by week (frustration markers, escalation language, shifts in tone).
|
|
149
|
+
- Note meta-recursion if the project is reflexive about its own behavior (e.g. a tool that documents its own work, an AI agent debugging itself, a system that catches its own regressions).
|
|
150
|
+
- Watch for new villains or co-stars and name them.
|
|
151
|
+
- For trough/silent weeks: silence IS the story. Don't pad. Name what didn't happen.
|
|
152
|
+
- For surge weeks (>2,000 obs): pick 4-7 spine arcs and tell them well. Don't catalog.
|
|
153
|
+
|
|
154
|
+
**Important:** Do NOT speculate beyond what's in the source file.
|
|
155
|
+
|
|
156
|
+
After writing the file, return:
|
|
157
|
+
1. Path of the file you wrote
|
|
158
|
+
2. The carry-forward block verbatim
|
|
159
|
+
3. One-sentence summary of the week
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
#### Narrative Budget by Observation Count
|
|
163
|
+
|
|
164
|
+
Scale narrative length proportionally to the week's volume:
|
|
165
|
+
|
|
166
|
+
| Obs count | Narrative section budget |
|
|
167
|
+
| --- | --- |
|
|
168
|
+
| < 100 | 200–400 words |
|
|
169
|
+
| 100–500 | 300–600 words |
|
|
170
|
+
| 500–1,500 | 500–900 words |
|
|
171
|
+
| 1,500–3,000 | 700–1,100 words |
|
|
172
|
+
| 3,000+ | 800–1,300 words |
|
|
173
|
+
|
|
174
|
+
Pad these into the `{BUDGET}` slot of the prompt for each week.
|
|
175
|
+
|
|
176
|
+
#### The First Week
|
|
177
|
+
|
|
178
|
+
For Week 1, pass an empty `STORY_SO_FAR_BLOCK` and an instruction noting it's the origin chapter — the agent should establish initial cast, tone, and arcs for everyone after.
|
|
179
|
+
|
|
180
|
+
#### The Final Week
|
|
181
|
+
|
|
182
|
+
The final week gets a different ending: **no carry-forward block**. Instead, instruct the agent to write a `## Where We Are` section (~250 words) naming what's still open at the moment of writing. Tell the agent the project is ongoing — the digest stops; the story doesn't. Don't give the story a false ending.
|
|
183
|
+
|
|
184
|
+
#### When N = 1 (single-week project)
|
|
185
|
+
|
|
186
|
+
Apply BOTH treatments to the same chapter: empty `STORY_SO_FAR_BLOCK` AND `## Where We Are` instead of a carry-forward block. The agent is writing both the origin and the close in one pass. Don't reference prior or future chapters that don't exist.
|
|
187
|
+
|
|
188
|
+
### Step 6: Rename Files for Sortable Order
|
|
189
|
+
|
|
190
|
+
The agents write digests with names like `YYYY-W<NN>-digest.md`. These already sort chronologically by ISO week (until a project crosses a year boundary inside one project name), but **add a zero-padded numeric prefix** so the order is unambiguous to humans browsing or scripting against the directory:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
cd docs/timeline-weeks/digests
|
|
194
|
+
total=$(ls *.md | wc -l | tr -d ' ')
|
|
195
|
+
width=${#total} # 1 for N<10, 2 for N<100, 3 for N<1000
|
|
196
|
+
[ "$width" -lt 2 ] && width=2 # always pad to at least 2 for readability
|
|
197
|
+
i=0
|
|
198
|
+
for f in *.md; do
|
|
199
|
+
printf -v prefix "%0${width}d" $i
|
|
200
|
+
mv "$f" "${prefix}-$f"
|
|
201
|
+
i=$((i+1))
|
|
202
|
+
done
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Result for N=30: `00-...md` through `29-...md`. For N=4: `00-...md` through `03-...md`. For N=120: `000-...md` through `119-...md`. **Always zero-pad** — `1-...md` and `10-...md` sort wrong without it.
|
|
206
|
+
|
|
207
|
+
Do NOT also prepend the order number to the digest title line inside each file. The filename prefix is for sorting; the title stays clean: `# Week N (W##): Date — Subtitle`.
|
|
208
|
+
|
|
209
|
+
### Step 7: Report Completion
|
|
210
|
+
|
|
211
|
+
Tell the user:
|
|
212
|
+
- Total weeks digested (N)
|
|
213
|
+
- Output directory path
|
|
214
|
+
- Date range covered
|
|
215
|
+
- Any silent/trough weeks worth flagging
|
|
216
|
+
- A one-sentence capstone summarizing the arc — written by the final-chapter agent, or composed by the operator from the final agent's `## Where We Are` section.
|
|
217
|
+
|
|
218
|
+
## Pipeline Discipline
|
|
219
|
+
|
|
220
|
+
These rules emerged from running the pipeline end-to-end. Encode them every time:
|
|
221
|
+
|
|
222
|
+
1. **Sequential, not parallel.** The whole point is the carry-forward chain. Parallelism breaks it.
|
|
223
|
+
2. **Carry-forward is bounded.** It will bloat without active pruning. Tell every agent: cap ~350 words, drop dormant arcs, drop absent cast.
|
|
224
|
+
3. **Track register evolution explicitly.** The user's prompt-style across weeks is a story arc. Frustration markers shift over time (whatever they happen to be in this project's data). Name the shifts.
|
|
225
|
+
4. **Treat components as characters.** Whatever recurring named systems show up in the observations are this project's villains and co-stars. Stable cast across weeks builds narrative coherence.
|
|
226
|
+
5. **Honor silence.** Trough weeks (10–100 obs) are real chapters. Name what didn't happen. Don't pad.
|
|
227
|
+
6. **Don't manufacture drama.** Just observe the data. If the project is reflexive, the recursion is the drama; you don't need to add more.
|
|
228
|
+
7. **Final week: no false ending.** The digest stops; the project doesn't. Write `## Where We Are`, not "the end."
|
|
229
|
+
|
|
230
|
+
## Error Handling
|
|
231
|
+
|
|
232
|
+
- **Empty timeline**: project name wrong, or worker not running. `curl -s "http://localhost:${WORKER_PORT}/api/search?query=*&limit=1"` to verify.
|
|
233
|
+
- **Worker not running**: start it via your usual method or check `ps aux | grep worker-service`.
|
|
234
|
+
- **Subagent returns malformed carry-forward**: extract the carry-forward block by regex (` ```carry-forward ... ``` `) and pass forward verbatim. If missing, ask the agent to retry with the explicit instruction "your reply MUST include the carry-forward block fenced as ```carry-forward ... ``` at the very end."
|
|
235
|
+
- **One agent fails mid-pipeline**: retry that week with the same carry-forward. Don't skip — the chain breaks.
|
|
236
|
+
- **Carry-forward growing past ~500 words**: tighten the discipline instruction in subsequent prompts. Force pruning explicitly.
|
|
237
|
+
|
|
238
|
+
## Examples
|
|
239
|
+
|
|
240
|
+
### Long-running project (~30 weeks)
|
|
241
|
+
|
|
242
|
+
User: "Make weekly digests for [project] from beginning to end"
|
|
243
|
+
|
|
244
|
+
1. Resolve worker port, detect project name.
|
|
245
|
+
2. Fetch full timeline → `.scratch/cm-timeline.md`.
|
|
246
|
+
3. Run `.scratch/split-timeline.py` → N weekly files in `docs/timeline-weeks/` (e.g. 30).
|
|
247
|
+
4. Generate `docs/timeline-weeks/README.md` index.
|
|
248
|
+
5. Launch N subagents consecutively, one per week. Each gets the prior week's carry-forward. The first chapter starts with empty carry-forward; the final chapter writes `## Where We Are` instead of a carry-forward block.
|
|
249
|
+
6. Rename digests with zero-padded order prefix (`00-...md` through `29-...md`).
|
|
250
|
+
7. Report total chapters, date range, any troughs/peaks, and the one-line capstone the final agent produced.
|
|
251
|
+
|
|
252
|
+
### Short-lived project (~3 weeks)
|
|
253
|
+
|
|
254
|
+
Same flow, just smaller. N=3, so:
|
|
255
|
+
- Chapter 1: empty carry-forward, establish cast/tone/arcs.
|
|
256
|
+
- Chapter 2: receives chapter 1's carry-forward, builds on it.
|
|
257
|
+
- Chapter 3: receives chapter 2's carry-forward, BUT gets the final-chapter treatment (`## Where We Are` instead of carry-forward block).
|
|
258
|
+
- Filenames: `00-...md`, `01-...md`, `02-...md`.
|
|
259
|
+
|
|
260
|
+
### Single-week project (N=1)
|
|
261
|
+
|
|
262
|
+
Apply both first-and-final-chapter treatment to the only chapter: empty carry-forward, `## Where We Are` close, no inter-chapter references. Filename: `00-...md`.
|
|
@@ -76,6 +76,46 @@ Adjacent to the source, parallel filename:
|
|
|
76
76
|
|
|
77
77
|
If the source isn't somewhere that makes sense as an output location, default to `reports/<stem>-slides.pdf`.
|
|
78
78
|
|
|
79
|
+
## Share link (WOWerpoint Server)
|
|
80
|
+
|
|
81
|
+
After the PDF lands on disk, the subagent also POSTs it to the WOWerpoint Server, which converts the 16:9 deck into a 9:16 mobile twin and returns a share URL. The share URL is the primary deliverable to the user; the PDF on disk is the backup.
|
|
82
|
+
|
|
83
|
+
Required env (exported in the user's shell — the subagent inherits the parent's environment, so plain `export` is enough; no dotenv loader runs):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
WOWERPOINT_API_BASE=https://wowerpoint-api.<subdomain>.workers.dev
|
|
87
|
+
WOWERPOINT_VIEWER_BASE=https://wowerpoint-viewer.<subdomain>.workers.dev
|
|
88
|
+
WOWERPOINT_UPLOAD_TOKEN=<token>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If any var is missing, skip the share-link step and just hand the PDF over.
|
|
92
|
+
|
|
93
|
+
Upload pattern (run AFTER the subagent confirms the PDF exists on disk). Capture the full response so empty `id` and `error` payloads are handled — `jq -r '.id'` returns the literal string `null` on a missing key, so always pipe through `.id // empty`:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
if [ -n "$WOWERPOINT_API_BASE" ] && [ -n "$WOWERPOINT_UPLOAD_TOKEN" ] && [ -n "$WOWERPOINT_VIEWER_BASE" ]; then
|
|
97
|
+
UPLOAD_JSON=$(curl -sS --connect-timeout 10 --max-time 30 -X POST "$WOWERPOINT_API_BASE/api/decks" \
|
|
98
|
+
-H "Authorization: Bearer $WOWERPOINT_UPLOAD_TOKEN" \
|
|
99
|
+
-F "file=@<OUTPUT_PATH>" \
|
|
100
|
+
-F "title=<TITLE>")
|
|
101
|
+
DECK_ID=$(printf '%s' "$UPLOAD_JSON" | jq -r '.id // empty')
|
|
102
|
+
API_ERROR=$(printf '%s' "$UPLOAD_JSON" | jq -r '.error // empty')
|
|
103
|
+
if [ -n "$API_ERROR" ] || [ -z "$DECK_ID" ]; then
|
|
104
|
+
echo "WOWerpoint upload warning: ${API_ERROR:-missing id}"
|
|
105
|
+
else
|
|
106
|
+
echo "Share URL: $WOWERPOINT_VIEWER_BASE/d/$DECK_ID"
|
|
107
|
+
fi
|
|
108
|
+
fi
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The returned `id` is a kebab-case slug derived from the title with a random creature suffix (e.g. `tokenrouter-quest-hawk`, or `velvet-comet-tiger` if the title is empty or non-ASCII). The share URL is:
|
|
112
|
+
|
|
113
|
+
```text
|
|
114
|
+
$WOWERPOINT_VIEWER_BASE/d/<id>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
It works immediately (shows a "still converting…" page that auto-reloads when ready). Conversion takes ~1–2 min per slide. Print the share URL in your final response.
|
|
118
|
+
|
|
79
119
|
## The prompt
|
|
80
120
|
|
|
81
121
|
One sentence. Default:
|
|
@@ -100,6 +140,7 @@ Inputs:
|
|
|
100
140
|
- Source ID: `<SOURCE_ID>`
|
|
101
141
|
- Generation prompt: `<PROMPT>`
|
|
102
142
|
- Output path: `<OUTPUT_PATH>`
|
|
143
|
+
- Deck title: `<TITLE>` (the notebook title, used by the share-link step)
|
|
103
144
|
|
|
104
145
|
Steps:
|
|
105
146
|
|
|
@@ -116,10 +157,31 @@ Steps:
|
|
|
116
157
|
|
|
117
158
|
5. Verify: `ls -la <OUTPUT_PATH>` confirms the file exists.
|
|
118
159
|
|
|
160
|
+
6. Upload to WOWerpoint Server for a mobile share link. Skip silently if any of `WOWERPOINT_API_BASE`, `WOWERPOINT_UPLOAD_TOKEN`, or `WOWERPOINT_VIEWER_BASE` is unset. Otherwise:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
if [ -n "$WOWERPOINT_API_BASE" ] && [ -n "$WOWERPOINT_UPLOAD_TOKEN" ] && [ -n "$WOWERPOINT_VIEWER_BASE" ]; then
|
|
164
|
+
UPLOAD_JSON=$(curl -sS --connect-timeout 10 --max-time 30 -X POST "$WOWERPOINT_API_BASE/api/decks" \
|
|
165
|
+
-H "Authorization: Bearer $WOWERPOINT_UPLOAD_TOKEN" \
|
|
166
|
+
-F "file=@<OUTPUT_PATH>" \
|
|
167
|
+
-F "title=<TITLE>")
|
|
168
|
+
DECK_ID=$(printf '%s' "$UPLOAD_JSON" | jq -r '.id // empty')
|
|
169
|
+
API_ERROR=$(printf '%s' "$UPLOAD_JSON" | jq -r '.error // empty')
|
|
170
|
+
if [ -n "$API_ERROR" ] || [ -z "$DECK_ID" ]; then
|
|
171
|
+
echo "WOWerpoint upload warning: ${API_ERROR:-missing id}"
|
|
172
|
+
else
|
|
173
|
+
echo "Share URL: $WOWERPOINT_VIEWER_BASE/d/$DECK_ID"
|
|
174
|
+
fi
|
|
175
|
+
fi
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
On warning, the PDF on disk is still a valid deliverable — do not retry the upload.
|
|
179
|
+
|
|
119
180
|
Report briefly (under 200 words):
|
|
120
181
|
- Final artifact ID
|
|
121
182
|
- Time per phase (source wait, generation, render wait, download)
|
|
122
183
|
- Output file path + size
|
|
184
|
+
- Share URL (if produced)
|
|
123
185
|
- Any retries or warnings
|
|
124
186
|
- Exact error message if any step failed
|
|
125
187
|
|