@supersuit/artifacts 0.56.0 → 0.57.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 +5 -0
- package/lib/routes/artifacts.d.ts +7 -0
- package/lib/routes/artifacts.js +8 -0
- 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.57.0 (2026-10-26)
|
|
7
|
+
|
|
8
|
+
**`GET /api/artifacts/<id>` says what a link to the page lets its reader do.** A sender approves a
|
|
9
|
+
message before any reader's link is minted, so the only way to tell the operator, on the send card,
|
|
10
|
+
whether the person can forward the page, must sign in to comment, or has a link that expires, is the
|
|
11
|
+
page's own settings. The response adds `share: { links, forward, comments, expires }`.
|
|
12
|
+
|
|
13
|
+
- `links`: `per-reader` or `open`. `forward`: the page's `forward:` line, `off` when unset.
|
|
14
|
+
`comments`: the page's `comments:`, `off` when unset. `expires`: a per-reader page's expiry, or null.
|
|
15
|
+
- Never anything about a reader.
|
|
16
|
+
- DETECTOR: `GET /api/artifacts/<id>` with the publish key answers no `share` field.
|
|
17
|
+
- REMEDY: update the host.
|
|
18
|
+
- Tests: forward.test.tsx "GET /api/artifacts/<id> says what a link to the page lets its reader do".
|
|
19
|
+
|
|
6
20
|
## 0.56.0 (2026-10-26)
|
|
7
21
|
|
|
8
22
|
**A reader can pass a per-reader page on, and the link they make says who made it and from which
|
package/README.md
CHANGED
|
@@ -254,6 +254,11 @@ body as written, lists included, and is what an agent should read; `text` is the
|
|
|
254
254
|
drops list items. Neither ever carries the page's password or anything about its readers. A page
|
|
255
255
|
behind a sign-in door, a password or per-reader links is readable this way by whoever holds the key.
|
|
256
256
|
|
|
257
|
+
The answer also carries `share: { links, forward, comments, expires }` (0.57.0): `links` is
|
|
258
|
+
`per-reader` or `open`, `forward` the page's `forward:` (`off` when unset), `comments` its
|
|
259
|
+
`comments:` (`off` when unset), and `expires` the per-reader page's expiry or null. It is what a
|
|
260
|
+
sender reads to say, before a reader's link exists, what that link will let its reader do.
|
|
261
|
+
|
|
257
262
|
## Front matter
|
|
258
263
|
|
|
259
264
|
```markdown
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Metadata } from 'next';
|
|
2
2
|
import { NextRequest, NextResponse } from 'next/server';
|
|
3
3
|
import { type ArtifactRecord, type ArtifactStore, type VersionEntry } from '../artifacts/store.js';
|
|
4
|
+
import { type CommentsMode } from '../artifacts/comments.js';
|
|
4
5
|
import type { StateStore } from '../artifacts/state-store.js';
|
|
5
6
|
import { type ArtifactAssets } from '../artifacts/assets.js';
|
|
6
7
|
import type { BrandPack } from '../brand/pack.js';
|
|
@@ -259,6 +260,12 @@ export declare function createArtifactRoutes(config: ArtifactRoutesConfig): {
|
|
|
259
260
|
markdown: string;
|
|
260
261
|
version: number;
|
|
261
262
|
updatedAt: string;
|
|
263
|
+
share: {
|
|
264
|
+
links: string;
|
|
265
|
+
forward: "signed-in" | "off" | "open";
|
|
266
|
+
comments: CommentsMode;
|
|
267
|
+
expires: string | null;
|
|
268
|
+
};
|
|
262
269
|
to?: string | undefined;
|
|
263
270
|
summary: string;
|
|
264
271
|
subtitle?: string | undefined;
|
package/lib/routes/artifacts.js
CHANGED
|
@@ -906,6 +906,14 @@ export function createArtifactRoutes(config) {
|
|
|
906
906
|
text: narrationText({ title: a.title, subtitle: a.subtitle, summary: a.summary, markdown: a.markdown }),
|
|
907
907
|
title: a.title, ...(a.subtitle ? { subtitle: a.subtitle } : {}), summary: a.summary, ...(a.to ? { to: a.to } : {}),
|
|
908
908
|
markdown: a.markdown, version: a.version ?? 1, updatedAt: a.updatedAt,
|
|
909
|
+
// What a link to this page lets its reader do (0.57.0), so a sender can say so before the
|
|
910
|
+
// reader's link exists: the send card is approved before anything is minted.
|
|
911
|
+
share: {
|
|
912
|
+
links: a.links === 'per-reader' ? 'per-reader' : 'open',
|
|
913
|
+
forward: a.forward ?? 'off',
|
|
914
|
+
comments: a.comments ?? 'off',
|
|
915
|
+
expires: a.links === 'per-reader' && config.recipients ? (await config.recipients.get(id))?.expireAt ?? null : null,
|
|
916
|
+
},
|
|
909
917
|
});
|
|
910
918
|
}
|
|
911
919
|
/** PUT /api/artifacts/<id>/assets/<name>: raw bytes in, public URL out. 16 MiB cap. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supersuit/artifacts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.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",
|