@supersuit/artifacts 0.54.0 → 0.55.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/CHANGELOG.md +14 -0
- package/README.md +6 -0
- package/lib/routes/artifacts.d.ts +7 -0
- package/lib/routes/artifacts.js +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
`@supersuit/artifacts`. One entry per version, newest first. Each entry says what changed, how a
|
|
4
4
|
host can tell whether it is affected (DETECTOR), what a host does about it (REMEDY), and the tests.
|
|
5
5
|
|
|
6
|
+
## 0.55.0 (2026-10-26)
|
|
7
|
+
|
|
8
|
+
**`GET /api/artifacts/<id>` now returns the page as written, not only its narration.** It answered
|
|
9
|
+
`{ id, text }`, and `text` is the narration, which drops every list item, so an agent reading a
|
|
10
|
+
prep sheet through the key got its headings ("Questions for him", "About him, first:") with the
|
|
11
|
+
questions missing.
|
|
12
|
+
|
|
13
|
+
- The response adds `title`, `subtitle` (when set), `summary`, `to` (when set), `markdown`,
|
|
14
|
+
`version` and `updatedAt`. `text` is unchanged, so existing callers keep working.
|
|
15
|
+
- Never the password, the access list or reader data.
|
|
16
|
+
- DETECTOR: `GET /api/artifacts/<id>` with the publish key answers no `markdown` field.
|
|
17
|
+
- REMEDY: update the host.
|
|
18
|
+
- Tests: `src/routes/artifacts.test.tsx` "GET returns the narration text and the markdown".
|
|
19
|
+
|
|
6
20
|
## 0.54.0 (2026-10-25)
|
|
7
21
|
|
|
8
22
|
**A page no longer records under a reader left on the browser by another page.** posthog-js keeps
|
package/README.md
CHANGED
|
@@ -248,6 +248,12 @@ createArtifactRoutes({ ..., ownerEmail: 'owner@example.com', admins: ['editor@ex
|
|
|
248
248
|
- `GET /api/artifacts/<id>/versions` lists the history; `POST` it `{ "version": 2, "note": "..." }`
|
|
249
249
|
(or `"note": null`) to write a note onto a version after the fact.
|
|
250
250
|
|
|
251
|
+
**Reading a page as its owner.** `GET /api/artifacts/<id>` with the publish key answers
|
|
252
|
+
`{ id, title, subtitle?, summary, to?, markdown, version, updatedAt, text }`. `markdown` is the
|
|
253
|
+
body as written, lists included, and is what an agent should read; `text` is the narration, which
|
|
254
|
+
drops list items. Neither ever carries the page's password or anything about its readers. A page
|
|
255
|
+
behind a sign-in door, a password or per-reader links is readable this way by whoever holds the key.
|
|
256
|
+
|
|
251
257
|
## Front matter
|
|
252
258
|
|
|
253
259
|
```markdown
|
|
@@ -251,8 +251,15 @@ export declare function createArtifactRoutes(config: ArtifactRoutesConfig): {
|
|
|
251
251
|
GET: (request: NextRequest, { params }: Params) => Promise<NextResponse<{
|
|
252
252
|
error: string;
|
|
253
253
|
}> | NextResponse<{
|
|
254
|
+
markdown: string;
|
|
255
|
+
version: number;
|
|
256
|
+
updatedAt: string;
|
|
257
|
+
to?: string | undefined;
|
|
258
|
+
summary: string;
|
|
259
|
+
subtitle?: string | undefined;
|
|
254
260
|
id: string;
|
|
255
261
|
text: string;
|
|
262
|
+
title: string;
|
|
256
263
|
}>>;
|
|
257
264
|
DELETE: (request: NextRequest, { params }: Params) => Promise<NextResponse<{
|
|
258
265
|
error: string;
|
package/lib/routes/artifacts.js
CHANGED
|
@@ -891,7 +891,15 @@ export function createArtifactRoutes(config) {
|
|
|
891
891
|
const a = await kept.get(id);
|
|
892
892
|
if (!a)
|
|
893
893
|
return NextResponse.json({ error: `no artifact with id ${id}` }, { status: 404 });
|
|
894
|
-
|
|
894
|
+
// `text` is the narration (lists and headings without their items read badly aloud, so it
|
|
895
|
+
// drops them); `markdown` is the page as written, which is what an agent reading the page
|
|
896
|
+
// needs. Never the password or any reader data.
|
|
897
|
+
return NextResponse.json({
|
|
898
|
+
id,
|
|
899
|
+
text: narrationText({ title: a.title, subtitle: a.subtitle, summary: a.summary, markdown: a.markdown }),
|
|
900
|
+
title: a.title, ...(a.subtitle ? { subtitle: a.subtitle } : {}), summary: a.summary, ...(a.to ? { to: a.to } : {}),
|
|
901
|
+
markdown: a.markdown, version: a.version ?? 1, updatedAt: a.updatedAt,
|
|
902
|
+
});
|
|
895
903
|
}
|
|
896
904
|
/** PUT /api/artifacts/<id>/assets/<name>: raw bytes in, public URL out. 16 MiB cap. */
|
|
897
905
|
async function PUT_ASSET(request, { params }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersuit/artifacts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"description": "Publish markdown as branded, read-aloud pages from a Next.js app: the artifacts store, the route factory, the read-along reader, brand packs, password and confidential pages, and share cards.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|