@phnx-labs/artifacts-cli 0.12.0 → 0.13.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.0 — 2026-10-19
4
+
5
+ - **The console's Artifacts page can show who and what made a page.** `/__mine` returns each of
6
+ your pages' description, the agent, session and repository that published it, and your photo
7
+ (`avatar`, https only). `/__shared` returns a shared page's description and its publisher's
8
+ photo, never the repository, session or agent. Everything was already stamped at publish; nothing
9
+ new is stored (PHNX-4435).
10
+
3
11
  ## 0.12.0 — 2026-10-17
4
12
 
5
13
  - **The phone QR moved into the Share sheet.** A shared page's Share sheet shows a QR of the
@@ -1 +1 @@
1
- export declare const SHARE_PEOPLE_WORKER_SOURCE = "\nvar PEOPLE_MAX = 50;\nvar PEOPLE_BODY_MAX_BYTES = 16 * 1024;\n// Per identity, in the usage ledger's fixed 1h windows: newly added addresses\n// per page owner (each may be emailed), and exact-address lookups per caller.\nvar PEOPLE_ADDED_PER_HOUR = 20;\nvar PEOPLE_LOOKUPS_PER_HOUR = 60;\nvar PEOPLE_TITLE_MAX = 200;\n// /__mine and /__shared answer one bounded page at a time; follow next_cursor.\nvar PEOPLE_PAGE_SIZE = 25;\nvar PEOPLE_MINE_MAX_HANDLES = 20;\nvar PEOPLE_MINE_PER_HOUR = 240;\nvar PEOPLE_EMAIL = /^[^\\s@\\/,;<>\"]+@[^\\s@\\/,;<>\"]+\\.[^\\s@\\/,;<>\"]+$/;\n\nfunction peopleKey(path) {\n return '__people/' + path;\n}\n\nfunction inboxKey(email, path) {\n return '__inbox/' + email + '/' + path;\n}\n\nfunction peopleJson(body, status) {\n return new Response(JSON.stringify(body), {\n status: status,\n headers: { 'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-store', 'X-Robots-Tag': 'noindex' },\n });\n}\n\nfunction accessCheckUnavailable() {\n return new Response(JSON.stringify({ error: 'access_check_unavailable' }), {\n status: 503,\n headers: { 'content-type': 'application/json; charset=utf-8', 'cache-control': 'private, no-store', 'X-Robots-Tag': 'noindex', 'retry-after': '5' },\n });\n}\n\n// One address, lowercased, or '' when it is not one.\nfunction normalizePersonEmail(raw) {\n if (typeof raw !== 'string') return '';\n const email = raw.trim().toLowerCase();\n return email.length <= 254 && PEOPLE_EMAIL.test(email) ? email : '';\n}\n\nfunction isExpiredObject(obj) {\n const expiresAt = obj && obj.customMetadata && obj.customMetadata['expires-at'];\n return !!expiresAt && Date.now() > Date.parse(expiresAt);\n}\n\nfunction pageTitle(meta, path) {\n return String((meta && (meta.label || meta['og-title'])) || path.split('/').pop()).slice(0, PEOPLE_TITLE_MAX);\n}\n\nfunction pageKind(contentType) {\n const ct = String(contentType || '').toLowerCase();\n if (ct.indexOf('text/html') !== -1) return 'page';\n return viewableAssetKind(ct) || 'file';\n}\n\n// The page's list and its version: the sidecar's R2 etag, '' when there is\n// none. Throws when it cannot be read or parsed, so every caller fails closed\n// rather than treating an unreadable list as an empty one.\nasync function readPeopleRecord(env, path) {\n const object = await env.BUCKET.get(peopleKey(path));\n if (!object) return { people: [], version: '' };\n const parsed = JSON.parse(await object.text());\n if (!parsed || !Array.isArray(parsed.people) || parsed.people.some(function (email) { return typeof email !== 'string'; })) {\n throw new Error('malformed people list for ' + path);\n }\n return { people: parsed.people, version: object.etag || '' };\n}\n\nasync function readPeople(env, path) {\n return (await readPeopleRecord(env, path)).people;\n}\n\n// Replace the list only if it is still at version. Returns the new version\n// ('' once emptied), or null when another write got there first. Callers hold\n// the page's path lock, which also covers the delete R2 cannot make conditional.\nasync function writePeople(env, path, people, version) {\n if (!people.length) {\n await env.BUCKET.delete(peopleKey(path));\n return '';\n }\n const written = await env.BUCKET.put(peopleKey(path), JSON.stringify({ people: people, updated_at: new Date().toISOString() }), {\n httpMetadata: { contentType: 'application/json' },\n onlyIf: version ? { etagMatches: version } : { etagDoesNotMatch: '*' },\n });\n return written === null ? null : (written.etag || '');\n}\n\n// The version a PUT was based on, from If-Match: \"<version>\" (or bare), with\n// \"\" meaning \"there is no list yet\". null when the header is absent.\nfunction ifMatchVersion(request) {\n const raw = request.headers.get('if-match');\n if (raw === null) return null;\n return raw.trim().replace(/^W\\//, '').replace(/^\"(.*)\"$/, '$1');\n}\n\nfunction peopleChanged(record) {\n return peopleJson({ error: 'people_changed', people: record.people, version: record.version }, 412);\n}\n\n// A page that goes away takes its list and inbox entries with it. A list that\n// cannot be parsed still goes; its inbox entries are dropped by the next\n// /__shared that finds no list behind them.\nasync function clearPeople(env, path) {\n let people = [];\n try {\n people = await readPeople(env, path);\n } catch (error) {\n people = [];\n }\n for (const email of people) await env.BUCKET.delete(inboxKey(email, path));\n await env.BUCKET.delete(peopleKey(path));\n}\n\n// Called under the path's mutation lock before a publish writes: current is\n// what sits at the path now. Only a live page keeps its people.\nasync function clearStalePeople(env, path, current) {\n if (current && !isExpiredObject(current)) return;\n await clearPeople(env, path);\n}\n\n// Names and avatars for exact addresses, from Rush's users. An address with no\n// account is absent from byEmail. error is set when Rush could not answer, so\n// a missing name is never mistaken for \"no Rush account\".\nasync function lookupPeopleNames(env, emails) {\n if (!emails.length) return { byEmail: {} };\n const collab = collabConfig(env);\n if (!collab) return { byEmail: {}, error: true };\n const result = await collabRegistryCall(collab, 'POST', '/people', '', { emails: emails });\n if (result.error || !result.body || !Array.isArray(result.body.people)) return { byEmail: {}, error: true };\n const byEmail = {};\n for (const person of result.body.people) {\n if (!person || typeof person.email !== 'string') continue;\n byEmail[person.email.toLowerCase()] = {\n name: typeof person.name === 'string' && person.name ? person.name : null,\n avatar_url: typeof person.avatar_url === 'string' && person.avatar_url ? person.avatar_url : null,\n };\n }\n return { byEmail: byEmail };\n}\n\nfunction describePerson(email, names, callerEmail) {\n const found = names.byEmail[email];\n return {\n email: email,\n name: found ? found.name : null,\n avatar_url: found ? found.avatar_url : null,\n external: emailDomain(email) !== emailDomain(callerEmail),\n };\n}\n\n// The caller for these routes: a Phoenix bearer and nothing else. Published\n// pages run on this origin, so the browser's __share cookie (or a ticket it\n// redeems) would let any page's script list a visitor's pages and add itself\n// to them. The CLI and the console proxy both send the bearer.\nasync function peopleCaller(request, env) {\n const identity = phoenixIdentity(await hooks.verifyPhoenixToken(request, env));\n if (!identity) return { error: peopleJson({ error: 'unauthorized' }, 401) };\n return { identity: identity };\n}\n\nasync function handlePeopleRoute(request, env, url, path) {\n const isRead = request.method === 'GET' || request.method === 'HEAD';\n if (path === '__lookup' || path === '__mine' || path === '__shared') {\n if (!isRead) return peopleJson({ error: 'method not allowed' }, 405);\n const caller = await peopleCaller(request, env);\n if (caller.error) return caller.error;\n if (path === '__lookup') return lookupPerson(env, url, caller.identity);\n if (path === '__mine') return listMine(env, url, caller.identity);\n return listShared(env, url, caller.identity);\n }\n if (!isRead && request.method !== 'PUT') return peopleJson({ error: 'method not allowed' }, 405);\n const key = path.slice('__people/'.length);\n const segments = key.split('/');\n const notFound = peopleJson({ error: 'not found' }, 404);\n if (segments.length !== 2 || !segments[0] || !segments[1] || segments[0].startsWith('__') || key.endsWith('.png')) return notFound;\n const caller = await peopleCaller(request, env);\n if (caller.error) return caller.error;\n const identity = caller.identity;\n // The same authority PATCH visibility uses: the namespace's handle claim.\n const auth = { kind: 'phoenix', owner: identity.userId, email: identity.email || '', name: identity.name || '' };\n if (await assertNamespaceOwner(env, auth, segments)) return notFound;\n const page = await env.BUCKET.head(key);\n if (!page || isExpiredObject(page) || isMediaDerived(page)) return notFound;\n if (request.method === 'PUT') return replacePeople(request, env, url, key, auth);\n\n let record;\n try {\n record = await readPeopleRecord(env, key);\n } catch (error) {\n return accessCheckUnavailable();\n }\n const meta = page.customMetadata || {};\n const names = await lookupPeopleNames(env, record.people);\n const body = {\n visibility: meta.visibility || 'public',\n org_domain: meta.org_domain || null,\n people: record.people.map(function (email) { return describePerson(email, names, auth.email); }),\n version: record.version,\n };\n if (names.error) body.names_error = 'names_unavailable';\n return peopleJson(body, 200);\n}\n\nasync function replacePeople(request, env, url, key, auth) {\n const read = await readBodyBounded(request, PEOPLE_BODY_MAX_BYTES);\n if (read.oversize) return peopleJson({ error: 'too_many_people' }, 400);\n let input;\n try {\n input = JSON.parse(new TextDecoder().decode(read.bytes) || '{}');\n } catch {\n return peopleJson({ error: 'invalid_request' }, 400);\n }\n if (!input || typeof input !== 'object' || !Array.isArray(input.people)) return peopleJson({ error: 'invalid_request' }, 400);\n if (input.notify !== undefined && typeof input.notify !== 'boolean') return peopleJson({ error: 'invalid_request' }, 400);\n const notify = input.notify !== false;\n const next = [];\n for (const raw of input.people) {\n const email = normalizePersonEmail(raw);\n if (!email) return peopleJson({ error: 'invalid_email', email: typeof raw === 'string' ? raw.slice(0, 254) : null }, 400);\n if (next.indexOf(email) === -1) next.push(email);\n }\n if (next.length > PEOPLE_MAX) return peopleJson({ error: 'too_many_people', max: PEOPLE_MAX }, 400);\n const ownerEmail = String(auth.email || '').toLowerCase();\n if (ownerEmail && next.indexOf(ownerEmail) !== -1) return peopleJson({ error: 'owner_in_list' }, 400);\n // The whole list is replaced, so a write must name the version it was based\n // on: a client holding an old read cannot silently drop someone.\n const basedOn = ifMatchVersion(request);\n if (basedOn === null) return peopleJson({ error: 'people_version_required' }, 428);\n\n // The page's lock: a delete or a fresh publish at this address cannot land\n // between reading the page and writing its list.\n const holder = 'people:' + crypto.randomUUID();\n if (!(await acquirePathMutationLock(env.BUCKET, key, holder, 'mutation'))) {\n return peopleJson({ error: 'conflict', detail: 'another write is active for this page' }, 409);\n }\n let added;\n let removed;\n let title;\n let version;\n try {\n const page = await env.BUCKET.head(key);\n if (!page || isExpiredObject(page) || isMediaDerived(page)) return peopleJson({ error: 'not found' }, 404);\n const meta = page.customMetadata || {};\n if ((meta.visibility || 'public') === 'private' && next.length) return peopleJson({ error: 'people_need_sign_in' }, 400);\n let current;\n try {\n current = await readPeopleRecord(env, key);\n } catch (error) {\n return accessCheckUnavailable();\n }\n if (current.version !== basedOn) return peopleChanged(current);\n const previous = current.people;\n added = next.filter(function (email) { return previous.indexOf(email) === -1; });\n removed = previous.filter(function (email) { return next.indexOf(email) === -1; });\n title = pageTitle(meta, key);\n if (added.length) {\n const limited = await chargeHourly(env, auth.owner, 'people', PEOPLE_ADDED_PER_HOUR, added.length);\n if (limited) return limited;\n }\n if (!(await pathMutationLockOwned(env.BUCKET, key, holder))) {\n return peopleJson({ error: 'conflict', detail: 'the page lock changed; retry' }, 409);\n }\n // The list first: a removal is in force before any index catches up.\n version = await writePeople(env, key, next, current.version);\n if (version === null) {\n try {\n return peopleChanged(await readPeopleRecord(env, key));\n } catch (error) {\n return accessCheckUnavailable();\n }\n }\n for (const email of removed) await env.BUCKET.delete(inboxKey(email, key));\n // Every listed address gets an inbox entry, not only the added ones, so an\n // entry a failed save never wrote is repaired by the next one. An existing\n // entry keeps its added_at.\n const addedAt = new Date().toISOString();\n for (const email of next) {\n if (added.indexOf(email) === -1 && (await env.BUCKET.head(inboxKey(email, key)))) continue;\n await env.BUCKET.put(inboxKey(email, key), '', {\n customMetadata: { owner_email: ownerEmail, owner_name: collabDisplayName({ name: auth.name, email: ownerEmail, userId: auth.owner }), title: title, added_at: addedAt },\n });\n }\n // A generated cover was rendered for the old audience; drop it the way a\n // visibility change does.\n if (added.length || removed.length) {\n const cover = await env.BUCKET.head(key + '.png');\n if (cover && cover.customMetadata && cover.customMetadata['og-generated'] === 'true') await env.BUCKET.delete(key + '.png');\n }\n } finally {\n await releasePathMutationLock(env.BUCKET, key, holder);\n }\n\n const body = { people: next, version: version, added: added, removed: removed, notified: [] };\n if (notify && added.length) {\n const outcome = await sendInvites(env, url, key, title, auth, added);\n body.notified = outcome.sent;\n if (outcome.unsent.length) {\n body.notify_error = 'email_unavailable';\n body.notify_failed = outcome.unsent;\n }\n }\n return peopleJson(body, 200);\n}\n\n// Email the newly added addresses a link. The owner's name and address are the\n// verified identity's, never anything the request carried. Rush answers\n// {sent, failed (permanent), retryable}; anything not in sent is unsent. A\n// transport failure or 5xx is retried once with the same Idempotency-Key, so\n// Rush never sends a second copy of an invitation it already sent.\nasync function sendInvites(env, url, key, title, auth, recipients) {\n const collab = collabConfig(env);\n if (!collab) return { sent: [], unsent: recipients };\n const ownerEmail = String(auth.email || '').toLowerCase();\n const payload = {\n url: url.origin + '/' + key,\n title: title,\n owner_name: collabDisplayName({ name: auth.name, email: ownerEmail, userId: auth.owner }),\n owner_email: ownerEmail,\n recipients: recipients,\n };\n const idempotencyKey = 'invite:' + crypto.randomUUID();\n let result = await collabRegistryCall(collab, 'POST', '/invites', collabShareId(url, key), payload, idempotencyKey);\n if (result.error && (!result.status || result.status >= 500)) {\n result = await collabRegistryCall(collab, 'POST', '/invites', collabShareId(url, key), payload, idempotencyKey);\n }\n const answered = !result.error && result.body && Array.isArray(result.body.sent) ? result.body.sent : [];\n const sent = recipients.filter(function (email) { return answered.indexOf(email) !== -1; });\n return { sent: sent, unsent: recipients.filter(function (email) { return sent.indexOf(email) === -1; }) };\n}\n\nasync function lookupPerson(env, url, identity) {\n const email = normalizePersonEmail(url.searchParams.get('email') || '');\n if (!email) return peopleJson({ error: 'invalid_email' }, 400);\n const limited = await chargeHourly(env, identity.userId, 'lookup', PEOPLE_LOOKUPS_PER_HOUR, 1);\n if (limited) return limited;\n const names = await lookupPeopleNames(env, [email]);\n const body = describePerson(email, names, identity.email);\n if (names.error) body.names_error = 'names_unavailable';\n return peopleJson(body, 200);\n}\n\n// Opaque paging position: the handle being listed and the last key returned.\nfunction encodePeopleCursor(position) {\n return toB64Url(JSON.stringify(position));\n}\n\nfunction decodePeopleCursor(raw) {\n if (!raw) return { h: '', a: '' };\n try {\n const parsed = JSON.parse(fromB64Url(raw));\n if (parsed && typeof parsed.h === 'string' && typeof parsed.a === 'string') return parsed;\n } catch {\n // not one of ours\n }\n return null;\n}\n\n// The handles whose claim the caller holds: the per-user index claimHandle\n// keeps, plus the caller's derived handle for a claim written before the index.\nasync function ownedHandles(env, identity) {\n const prefix = handleIndexPrefix(identity.userId);\n const list = await env.BUCKET.list({ prefix: prefix, limit: PEOPLE_MINE_MAX_HANDLES });\n const handles = (list.objects || []).map(function (o) { return o.key.slice(prefix.length); });\n const derived = handleFromEmail(identity.email);\n if (derived && handles.indexOf(derived) === -1 && (await holdsHandleClaim(env.BUCKET, derived, identity.userId))) handles.push(derived);\n return handles.sort();\n}\n\n// One page of the live pages under the caller's handles, in key order.\nasync function listMine(env, url, identity) {\n const position = decodePeopleCursor(url.searchParams.get('cursor'));\n if (!position) return peopleJson({ error: 'invalid_cursor' }, 400);\n const limited = await chargeHourly(env, identity.userId, 'mine', PEOPLE_MINE_PER_HOUR, 1);\n if (limited) return limited;\n const handles = await ownedHandles(env, identity);\n let index = position.h ? handles.indexOf(position.h) : 0;\n if (index === -1) return peopleJson({ pages: [], next_cursor: null }, 200);\n const handle = handles[index];\n if (!handle) return peopleJson({ pages: [], next_cursor: null }, 200);\n // The delimiter leaves out retained revisions (<handle>/<slug>/rev-*).\n const listing = await env.BUCKET.list({\n prefix: handle + '/', delimiter: '/', limit: PEOPLE_PAGE_SIZE, include: ['httpMetadata', 'customMetadata'],\n ...(position.a ? { startAfter: position.a } : {}),\n });\n const objects = listing.objects || [];\n const last = objects.length ? objects[objects.length - 1].key : '';\n const sidecars = {};\n if (objects.length) {\n const listed = await env.BUCKET.list({ prefix: peopleKey(handle + '/'), limit: 1000, ...(position.a ? { startAfter: peopleKey(position.a) } : {}) });\n for (const sidecar of listed.objects || []) {\n const path = sidecar.key.slice('__people/'.length);\n if (path <= last) sidecars[path] = true;\n }\n }\n const pages = [];\n for (const o of objects) {\n if (o.key.endsWith('.png') || isMediaDerived(o) || isExpiredObject(o)) continue;\n const meta = o.customMetadata || {};\n let people = [];\n if (sidecars[o.key]) {\n try {\n people = await readPeople(env, o.key);\n } catch (error) {\n return accessCheckUnavailable();\n }\n }\n pages.push({\n url: url.origin + '/' + o.key,\n path: o.key,\n title: pageTitle(meta, o.key),\n visibility: meta.visibility || 'public',\n org_domain: meta.org_domain || null,\n kind: pageKind(o.httpMetadata && o.httpMetadata.contentType),\n size: typeof o.size === 'number' ? o.size : 0,\n uploaded: new Date(publishedAtOf(o)).toISOString(),\n people: people,\n });\n }\n let next = null;\n if (listing.truncated && last) next = { h: handle, a: last };\n else if (index + 1 < handles.length) next = { h: handles[index + 1], a: '' };\n return peopleJson({ pages: pages, next_cursor: next ? encodePeopleCursor(next) : null }, 200);\n}\n\n// One page of the caller's inbox, keeping only pages they can open because of\n// the list right now: a live me or org page whose list still names them. The\n// inbox is an index, never an authority, so a stale entry is skipped here and\n// left for the owner's next save or the page's delete to clear.\nasync function listShared(env, url, identity) {\n const position = decodePeopleCursor(url.searchParams.get('cursor'));\n if (!position) return peopleJson({ error: 'invalid_cursor' }, 400);\n const email = normalizePersonEmail(identity.email || '');\n if (!email) return peopleJson({ pages: [], next_cursor: null }, 200);\n const prefix = inboxKey(email, '');\n const listing = await env.BUCKET.list({ prefix: prefix, limit: PEOPLE_PAGE_SIZE, include: ['customMetadata'], ...(position.a ? { startAfter: prefix + position.a } : {}) });\n const entries = listing.objects || [];\n const pages = [];\n for (const entry of entries) {\n const path = entry.key.slice(prefix.length);\n const page = await env.BUCKET.head(path);\n const pageMeta = (page && page.customMetadata) || {};\n if (!page || isExpiredObject(page) || !isIdentityGated(pageMeta.visibility || 'public')) continue;\n let people;\n try {\n people = await readPeople(env, path);\n } catch (error) {\n return accessCheckUnavailable();\n }\n if (people.indexOf(email) === -1) continue;\n const meta = entry.customMetadata || {};\n pages.push({\n url: url.origin + '/' + path,\n path: path,\n title: pageTitle(pageMeta, path),\n kind: pageKind(page.httpMetadata && page.httpMetadata.contentType),\n owner_email: meta.owner_email || null,\n owner_name: meta.owner_name || null,\n added_at: meta.added_at || null,\n });\n }\n const last = entries.length ? entries[entries.length - 1].key.slice(prefix.length) : '';\n return peopleJson({ pages: pages, next_cursor: listing.truncated && last ? encodePeopleCursor({ h: '', a: last }) : null }, 200);\n}\n";
1
+ export declare const SHARE_PEOPLE_WORKER_SOURCE = "\nvar PEOPLE_MAX = 50;\nvar PEOPLE_BODY_MAX_BYTES = 16 * 1024;\n// Per identity, in the usage ledger's fixed 1h windows: newly added addresses\n// per page owner (each may be emailed), and exact-address lookups per caller.\nvar PEOPLE_ADDED_PER_HOUR = 20;\nvar PEOPLE_LOOKUPS_PER_HOUR = 60;\nvar PEOPLE_TITLE_MAX = 200;\nvar PEOPLE_DESCRIPTION_MAX = 300;\n// /__mine and /__shared answer one bounded page at a time; follow next_cursor.\nvar PEOPLE_PAGE_SIZE = 25;\nvar PEOPLE_MINE_MAX_HANDLES = 20;\nvar PEOPLE_MINE_PER_HOUR = 240;\nvar PEOPLE_EMAIL = /^[^\\s@\\/,;<>\"]+@[^\\s@\\/,;<>\"]+\\.[^\\s@\\/,;<>\"]+$/;\n\nfunction peopleKey(path) {\n return '__people/' + path;\n}\n\nfunction inboxKey(email, path) {\n return '__inbox/' + email + '/' + path;\n}\n\nfunction peopleJson(body, status) {\n return new Response(JSON.stringify(body), {\n status: status,\n headers: { 'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-store', 'X-Robots-Tag': 'noindex' },\n });\n}\n\nfunction accessCheckUnavailable() {\n return new Response(JSON.stringify({ error: 'access_check_unavailable' }), {\n status: 503,\n headers: { 'content-type': 'application/json; charset=utf-8', 'cache-control': 'private, no-store', 'X-Robots-Tag': 'noindex', 'retry-after': '5' },\n });\n}\n\n// One address, lowercased, or '' when it is not one.\nfunction normalizePersonEmail(raw) {\n if (typeof raw !== 'string') return '';\n const email = raw.trim().toLowerCase();\n return email.length <= 254 && PEOPLE_EMAIL.test(email) ? email : '';\n}\n\nfunction isExpiredObject(obj) {\n const expiresAt = obj && obj.customMetadata && obj.customMetadata['expires-at'];\n return !!expiresAt && Date.now() > Date.parse(expiresAt);\n}\n\nfunction pageTitle(meta, path) {\n return String((meta && (meta.label || meta['og-title'])) || path.split('/').pop()).slice(0, PEOPLE_TITLE_MAX);\n}\n\n// What a page's card shows, as stamped at publish: what it is about and the publisher's photo\n// for anyone it lists; the agent, session and repository only for its owner, since the page\n// itself never shows them to the people it is shared with.\nfunction pageProvenance(meta, owner) {\n const text = function (key, max) { return typeof meta[key] === 'string' && meta[key] ? meta[key].slice(0, max) : null; };\n const seen = { description: text('og-description', PEOPLE_DESCRIPTION_MAX), avatar: httpsUrl(meta.avatar) };\n return owner ? { ...seen, agent: text('agent', 200), session: text('session', 200), repo: text('repo', 200) } : seen;\n}\n\nfunction httpsUrl(value) {\n try {\n return value && String(value).length <= 1000 && new URL(value).protocol === 'https:' ? String(value) : null;\n } catch (error) {\n return null;\n }\n}\n\nfunction pageKind(contentType) {\n const ct = String(contentType || '').toLowerCase();\n if (ct.indexOf('text/html') !== -1) return 'page';\n return viewableAssetKind(ct) || 'file';\n}\n\n// The page's list and its version: the sidecar's R2 etag, '' when there is\n// none. Throws when it cannot be read or parsed, so every caller fails closed\n// rather than treating an unreadable list as an empty one.\nasync function readPeopleRecord(env, path) {\n const object = await env.BUCKET.get(peopleKey(path));\n if (!object) return { people: [], version: '' };\n const parsed = JSON.parse(await object.text());\n if (!parsed || !Array.isArray(parsed.people) || parsed.people.some(function (email) { return typeof email !== 'string'; })) {\n throw new Error('malformed people list for ' + path);\n }\n return { people: parsed.people, version: object.etag || '' };\n}\n\nasync function readPeople(env, path) {\n return (await readPeopleRecord(env, path)).people;\n}\n\n// Replace the list only if it is still at version. Returns the new version\n// ('' once emptied), or null when another write got there first. Callers hold\n// the page's path lock, which also covers the delete R2 cannot make conditional.\nasync function writePeople(env, path, people, version) {\n if (!people.length) {\n await env.BUCKET.delete(peopleKey(path));\n return '';\n }\n const written = await env.BUCKET.put(peopleKey(path), JSON.stringify({ people: people, updated_at: new Date().toISOString() }), {\n httpMetadata: { contentType: 'application/json' },\n onlyIf: version ? { etagMatches: version } : { etagDoesNotMatch: '*' },\n });\n return written === null ? null : (written.etag || '');\n}\n\n// The version a PUT was based on, from If-Match: \"<version>\" (or bare), with\n// \"\" meaning \"there is no list yet\". null when the header is absent.\nfunction ifMatchVersion(request) {\n const raw = request.headers.get('if-match');\n if (raw === null) return null;\n return raw.trim().replace(/^W\\//, '').replace(/^\"(.*)\"$/, '$1');\n}\n\nfunction peopleChanged(record) {\n return peopleJson({ error: 'people_changed', people: record.people, version: record.version }, 412);\n}\n\n// A page that goes away takes its list and inbox entries with it. A list that\n// cannot be parsed still goes; its inbox entries are dropped by the next\n// /__shared that finds no list behind them.\nasync function clearPeople(env, path) {\n let people = [];\n try {\n people = await readPeople(env, path);\n } catch (error) {\n people = [];\n }\n for (const email of people) await env.BUCKET.delete(inboxKey(email, path));\n await env.BUCKET.delete(peopleKey(path));\n}\n\n// Called under the path's mutation lock before a publish writes: current is\n// what sits at the path now. Only a live page keeps its people.\nasync function clearStalePeople(env, path, current) {\n if (current && !isExpiredObject(current)) return;\n await clearPeople(env, path);\n}\n\n// Names and avatars for exact addresses, from Rush's users. An address with no\n// account is absent from byEmail. error is set when Rush could not answer, so\n// a missing name is never mistaken for \"no Rush account\".\nasync function lookupPeopleNames(env, emails) {\n if (!emails.length) return { byEmail: {} };\n const collab = collabConfig(env);\n if (!collab) return { byEmail: {}, error: true };\n const result = await collabRegistryCall(collab, 'POST', '/people', '', { emails: emails });\n if (result.error || !result.body || !Array.isArray(result.body.people)) return { byEmail: {}, error: true };\n const byEmail = {};\n for (const person of result.body.people) {\n if (!person || typeof person.email !== 'string') continue;\n byEmail[person.email.toLowerCase()] = {\n name: typeof person.name === 'string' && person.name ? person.name : null,\n avatar_url: typeof person.avatar_url === 'string' && person.avatar_url ? person.avatar_url : null,\n };\n }\n return { byEmail: byEmail };\n}\n\nfunction describePerson(email, names, callerEmail) {\n const found = names.byEmail[email];\n return {\n email: email,\n name: found ? found.name : null,\n avatar_url: found ? found.avatar_url : null,\n external: emailDomain(email) !== emailDomain(callerEmail),\n };\n}\n\n// The caller for these routes: a Phoenix bearer and nothing else. Published\n// pages run on this origin, so the browser's __share cookie (or a ticket it\n// redeems) would let any page's script list a visitor's pages and add itself\n// to them. The CLI and the console proxy both send the bearer.\nasync function peopleCaller(request, env) {\n const identity = phoenixIdentity(await hooks.verifyPhoenixToken(request, env));\n if (!identity) return { error: peopleJson({ error: 'unauthorized' }, 401) };\n return { identity: identity };\n}\n\nasync function handlePeopleRoute(request, env, url, path) {\n const isRead = request.method === 'GET' || request.method === 'HEAD';\n if (path === '__lookup' || path === '__mine' || path === '__shared') {\n if (!isRead) return peopleJson({ error: 'method not allowed' }, 405);\n const caller = await peopleCaller(request, env);\n if (caller.error) return caller.error;\n if (path === '__lookup') return lookupPerson(env, url, caller.identity);\n if (path === '__mine') return listMine(env, url, caller.identity);\n return listShared(env, url, caller.identity);\n }\n if (!isRead && request.method !== 'PUT') return peopleJson({ error: 'method not allowed' }, 405);\n const key = path.slice('__people/'.length);\n const segments = key.split('/');\n const notFound = peopleJson({ error: 'not found' }, 404);\n if (segments.length !== 2 || !segments[0] || !segments[1] || segments[0].startsWith('__') || key.endsWith('.png')) return notFound;\n const caller = await peopleCaller(request, env);\n if (caller.error) return caller.error;\n const identity = caller.identity;\n // The same authority PATCH visibility uses: the namespace's handle claim.\n const auth = { kind: 'phoenix', owner: identity.userId, email: identity.email || '', name: identity.name || '' };\n if (await assertNamespaceOwner(env, auth, segments)) return notFound;\n const page = await env.BUCKET.head(key);\n if (!page || isExpiredObject(page) || isMediaDerived(page)) return notFound;\n if (request.method === 'PUT') return replacePeople(request, env, url, key, auth);\n\n let record;\n try {\n record = await readPeopleRecord(env, key);\n } catch (error) {\n return accessCheckUnavailable();\n }\n const meta = page.customMetadata || {};\n const names = await lookupPeopleNames(env, record.people);\n const body = {\n visibility: meta.visibility || 'public',\n org_domain: meta.org_domain || null,\n people: record.people.map(function (email) { return describePerson(email, names, auth.email); }),\n version: record.version,\n };\n if (names.error) body.names_error = 'names_unavailable';\n return peopleJson(body, 200);\n}\n\nasync function replacePeople(request, env, url, key, auth) {\n const read = await readBodyBounded(request, PEOPLE_BODY_MAX_BYTES);\n if (read.oversize) return peopleJson({ error: 'too_many_people' }, 400);\n let input;\n try {\n input = JSON.parse(new TextDecoder().decode(read.bytes) || '{}');\n } catch {\n return peopleJson({ error: 'invalid_request' }, 400);\n }\n if (!input || typeof input !== 'object' || !Array.isArray(input.people)) return peopleJson({ error: 'invalid_request' }, 400);\n if (input.notify !== undefined && typeof input.notify !== 'boolean') return peopleJson({ error: 'invalid_request' }, 400);\n const notify = input.notify !== false;\n const next = [];\n for (const raw of input.people) {\n const email = normalizePersonEmail(raw);\n if (!email) return peopleJson({ error: 'invalid_email', email: typeof raw === 'string' ? raw.slice(0, 254) : null }, 400);\n if (next.indexOf(email) === -1) next.push(email);\n }\n if (next.length > PEOPLE_MAX) return peopleJson({ error: 'too_many_people', max: PEOPLE_MAX }, 400);\n const ownerEmail = String(auth.email || '').toLowerCase();\n if (ownerEmail && next.indexOf(ownerEmail) !== -1) return peopleJson({ error: 'owner_in_list' }, 400);\n // The whole list is replaced, so a write must name the version it was based\n // on: a client holding an old read cannot silently drop someone.\n const basedOn = ifMatchVersion(request);\n if (basedOn === null) return peopleJson({ error: 'people_version_required' }, 428);\n\n // The page's lock: a delete or a fresh publish at this address cannot land\n // between reading the page and writing its list.\n const holder = 'people:' + crypto.randomUUID();\n if (!(await acquirePathMutationLock(env.BUCKET, key, holder, 'mutation'))) {\n return peopleJson({ error: 'conflict', detail: 'another write is active for this page' }, 409);\n }\n let added;\n let removed;\n let title;\n let version;\n try {\n const page = await env.BUCKET.head(key);\n if (!page || isExpiredObject(page) || isMediaDerived(page)) return peopleJson({ error: 'not found' }, 404);\n const meta = page.customMetadata || {};\n if ((meta.visibility || 'public') === 'private' && next.length) return peopleJson({ error: 'people_need_sign_in' }, 400);\n let current;\n try {\n current = await readPeopleRecord(env, key);\n } catch (error) {\n return accessCheckUnavailable();\n }\n if (current.version !== basedOn) return peopleChanged(current);\n const previous = current.people;\n added = next.filter(function (email) { return previous.indexOf(email) === -1; });\n removed = previous.filter(function (email) { return next.indexOf(email) === -1; });\n title = pageTitle(meta, key);\n if (added.length) {\n const limited = await chargeHourly(env, auth.owner, 'people', PEOPLE_ADDED_PER_HOUR, added.length);\n if (limited) return limited;\n }\n if (!(await pathMutationLockOwned(env.BUCKET, key, holder))) {\n return peopleJson({ error: 'conflict', detail: 'the page lock changed; retry' }, 409);\n }\n // The list first: a removal is in force before any index catches up.\n version = await writePeople(env, key, next, current.version);\n if (version === null) {\n try {\n return peopleChanged(await readPeopleRecord(env, key));\n } catch (error) {\n return accessCheckUnavailable();\n }\n }\n for (const email of removed) await env.BUCKET.delete(inboxKey(email, key));\n // Every listed address gets an inbox entry, not only the added ones, so an\n // entry a failed save never wrote is repaired by the next one. An existing\n // entry keeps its added_at.\n const addedAt = new Date().toISOString();\n for (const email of next) {\n if (added.indexOf(email) === -1 && (await env.BUCKET.head(inboxKey(email, key)))) continue;\n await env.BUCKET.put(inboxKey(email, key), '', {\n customMetadata: { owner_email: ownerEmail, owner_name: collabDisplayName({ name: auth.name, email: ownerEmail, userId: auth.owner }), title: title, added_at: addedAt },\n });\n }\n // A generated cover was rendered for the old audience; drop it the way a\n // visibility change does.\n if (added.length || removed.length) {\n const cover = await env.BUCKET.head(key + '.png');\n if (cover && cover.customMetadata && cover.customMetadata['og-generated'] === 'true') await env.BUCKET.delete(key + '.png');\n }\n } finally {\n await releasePathMutationLock(env.BUCKET, key, holder);\n }\n\n const body = { people: next, version: version, added: added, removed: removed, notified: [] };\n if (notify && added.length) {\n const outcome = await sendInvites(env, url, key, title, auth, added);\n body.notified = outcome.sent;\n if (outcome.unsent.length) {\n body.notify_error = 'email_unavailable';\n body.notify_failed = outcome.unsent;\n }\n }\n return peopleJson(body, 200);\n}\n\n// Email the newly added addresses a link. The owner's name and address are the\n// verified identity's, never anything the request carried. Rush answers\n// {sent, failed (permanent), retryable}; anything not in sent is unsent. A\n// transport failure or 5xx is retried once with the same Idempotency-Key, so\n// Rush never sends a second copy of an invitation it already sent.\nasync function sendInvites(env, url, key, title, auth, recipients) {\n const collab = collabConfig(env);\n if (!collab) return { sent: [], unsent: recipients };\n const ownerEmail = String(auth.email || '').toLowerCase();\n const payload = {\n url: url.origin + '/' + key,\n title: title,\n owner_name: collabDisplayName({ name: auth.name, email: ownerEmail, userId: auth.owner }),\n owner_email: ownerEmail,\n recipients: recipients,\n };\n const idempotencyKey = 'invite:' + crypto.randomUUID();\n let result = await collabRegistryCall(collab, 'POST', '/invites', collabShareId(url, key), payload, idempotencyKey);\n if (result.error && (!result.status || result.status >= 500)) {\n result = await collabRegistryCall(collab, 'POST', '/invites', collabShareId(url, key), payload, idempotencyKey);\n }\n const answered = !result.error && result.body && Array.isArray(result.body.sent) ? result.body.sent : [];\n const sent = recipients.filter(function (email) { return answered.indexOf(email) !== -1; });\n return { sent: sent, unsent: recipients.filter(function (email) { return sent.indexOf(email) === -1; }) };\n}\n\nasync function lookupPerson(env, url, identity) {\n const email = normalizePersonEmail(url.searchParams.get('email') || '');\n if (!email) return peopleJson({ error: 'invalid_email' }, 400);\n const limited = await chargeHourly(env, identity.userId, 'lookup', PEOPLE_LOOKUPS_PER_HOUR, 1);\n if (limited) return limited;\n const names = await lookupPeopleNames(env, [email]);\n const body = describePerson(email, names, identity.email);\n if (names.error) body.names_error = 'names_unavailable';\n return peopleJson(body, 200);\n}\n\n// Opaque paging position: the handle being listed and the last key returned.\nfunction encodePeopleCursor(position) {\n return toB64Url(JSON.stringify(position));\n}\n\nfunction decodePeopleCursor(raw) {\n if (!raw) return { h: '', a: '' };\n try {\n const parsed = JSON.parse(fromB64Url(raw));\n if (parsed && typeof parsed.h === 'string' && typeof parsed.a === 'string') return parsed;\n } catch {\n // not one of ours\n }\n return null;\n}\n\n// The handles whose claim the caller holds: the per-user index claimHandle\n// keeps, plus the caller's derived handle for a claim written before the index.\nasync function ownedHandles(env, identity) {\n const prefix = handleIndexPrefix(identity.userId);\n const list = await env.BUCKET.list({ prefix: prefix, limit: PEOPLE_MINE_MAX_HANDLES });\n const handles = (list.objects || []).map(function (o) { return o.key.slice(prefix.length); });\n const derived = handleFromEmail(identity.email);\n if (derived && handles.indexOf(derived) === -1 && (await holdsHandleClaim(env.BUCKET, derived, identity.userId))) handles.push(derived);\n return handles.sort();\n}\n\n// One page of the live pages under the caller's handles, in key order.\nasync function listMine(env, url, identity) {\n const position = decodePeopleCursor(url.searchParams.get('cursor'));\n if (!position) return peopleJson({ error: 'invalid_cursor' }, 400);\n const limited = await chargeHourly(env, identity.userId, 'mine', PEOPLE_MINE_PER_HOUR, 1);\n if (limited) return limited;\n const handles = await ownedHandles(env, identity);\n let index = position.h ? handles.indexOf(position.h) : 0;\n if (index === -1) return peopleJson({ pages: [], next_cursor: null }, 200);\n const handle = handles[index];\n if (!handle) return peopleJson({ pages: [], next_cursor: null }, 200);\n // The delimiter leaves out retained revisions (<handle>/<slug>/rev-*).\n const listing = await env.BUCKET.list({\n prefix: handle + '/', delimiter: '/', limit: PEOPLE_PAGE_SIZE, include: ['httpMetadata', 'customMetadata'],\n ...(position.a ? { startAfter: position.a } : {}),\n });\n const objects = listing.objects || [];\n const last = objects.length ? objects[objects.length - 1].key : '';\n const sidecars = {};\n if (objects.length) {\n const listed = await env.BUCKET.list({ prefix: peopleKey(handle + '/'), limit: 1000, ...(position.a ? { startAfter: peopleKey(position.a) } : {}) });\n for (const sidecar of listed.objects || []) {\n const path = sidecar.key.slice('__people/'.length);\n if (path <= last) sidecars[path] = true;\n }\n }\n const pages = [];\n for (const o of objects) {\n if (o.key.endsWith('.png') || isMediaDerived(o) || isExpiredObject(o)) continue;\n const meta = o.customMetadata || {};\n let people = [];\n if (sidecars[o.key]) {\n try {\n people = await readPeople(env, o.key);\n } catch (error) {\n return accessCheckUnavailable();\n }\n }\n pages.push({\n url: url.origin + '/' + o.key,\n path: o.key,\n title: pageTitle(meta, o.key),\n visibility: meta.visibility || 'public',\n org_domain: meta.org_domain || null,\n kind: pageKind(o.httpMetadata && o.httpMetadata.contentType),\n size: typeof o.size === 'number' ? o.size : 0,\n uploaded: new Date(publishedAtOf(o)).toISOString(),\n people: people,\n ...pageProvenance(meta, true),\n });\n }\n let next = null;\n if (listing.truncated && last) next = { h: handle, a: last };\n else if (index + 1 < handles.length) next = { h: handles[index + 1], a: '' };\n return peopleJson({ pages: pages, next_cursor: next ? encodePeopleCursor(next) : null }, 200);\n}\n\n// One page of the caller's inbox, keeping only pages they can open because of\n// the list right now: a live me or org page whose list still names them. The\n// inbox is an index, never an authority, so a stale entry is skipped here and\n// left for the owner's next save or the page's delete to clear.\nasync function listShared(env, url, identity) {\n const position = decodePeopleCursor(url.searchParams.get('cursor'));\n if (!position) return peopleJson({ error: 'invalid_cursor' }, 400);\n const email = normalizePersonEmail(identity.email || '');\n if (!email) return peopleJson({ pages: [], next_cursor: null }, 200);\n const prefix = inboxKey(email, '');\n const listing = await env.BUCKET.list({ prefix: prefix, limit: PEOPLE_PAGE_SIZE, include: ['customMetadata'], ...(position.a ? { startAfter: prefix + position.a } : {}) });\n const entries = listing.objects || [];\n const pages = [];\n for (const entry of entries) {\n const path = entry.key.slice(prefix.length);\n const page = await env.BUCKET.head(path);\n const pageMeta = (page && page.customMetadata) || {};\n if (!page || isExpiredObject(page) || !isIdentityGated(pageMeta.visibility || 'public')) continue;\n let people;\n try {\n people = await readPeople(env, path);\n } catch (error) {\n return accessCheckUnavailable();\n }\n if (people.indexOf(email) === -1) continue;\n const meta = entry.customMetadata || {};\n pages.push({\n url: url.origin + '/' + path,\n path: path,\n title: pageTitle(pageMeta, path),\n kind: pageKind(page.httpMetadata && page.httpMetadata.contentType),\n owner_email: meta.owner_email || null,\n owner_name: meta.owner_name || null,\n added_at: meta.added_at || null,\n ...pageProvenance(pageMeta, false),\n });\n }\n const last = entries.length ? entries[entries.length - 1].key.slice(prefix.length) : '';\n return peopleJson({ pages: pages, next_cursor: listing.truncated && last ? encodePeopleCursor({ h: '', a: last }) : null }, 200);\n}\n";
@@ -29,6 +29,7 @@ var PEOPLE_BODY_MAX_BYTES = 16 * 1024;
29
29
  var PEOPLE_ADDED_PER_HOUR = 20;
30
30
  var PEOPLE_LOOKUPS_PER_HOUR = 60;
31
31
  var PEOPLE_TITLE_MAX = 200;
32
+ var PEOPLE_DESCRIPTION_MAX = 300;
32
33
  // /__mine and /__shared answer one bounded page at a time; follow next_cursor.
33
34
  var PEOPLE_PAGE_SIZE = 25;
34
35
  var PEOPLE_MINE_MAX_HANDLES = 20;
@@ -73,6 +74,23 @@ function pageTitle(meta, path) {
73
74
  return String((meta && (meta.label || meta['og-title'])) || path.split('/').pop()).slice(0, PEOPLE_TITLE_MAX);
74
75
  }
75
76
 
77
+ // What a page's card shows, as stamped at publish: what it is about and the publisher's photo
78
+ // for anyone it lists; the agent, session and repository only for its owner, since the page
79
+ // itself never shows them to the people it is shared with.
80
+ function pageProvenance(meta, owner) {
81
+ const text = function (key, max) { return typeof meta[key] === 'string' && meta[key] ? meta[key].slice(0, max) : null; };
82
+ const seen = { description: text('og-description', PEOPLE_DESCRIPTION_MAX), avatar: httpsUrl(meta.avatar) };
83
+ return owner ? { ...seen, agent: text('agent', 200), session: text('session', 200), repo: text('repo', 200) } : seen;
84
+ }
85
+
86
+ function httpsUrl(value) {
87
+ try {
88
+ return value && String(value).length <= 1000 && new URL(value).protocol === 'https:' ? String(value) : null;
89
+ } catch (error) {
90
+ return null;
91
+ }
92
+ }
93
+
76
94
  function pageKind(contentType) {
77
95
  const ct = String(contentType || '').toLowerCase();
78
96
  if (ct.indexOf('text/html') !== -1) return 'page';
@@ -440,6 +458,7 @@ async function listMine(env, url, identity) {
440
458
  size: typeof o.size === 'number' ? o.size : 0,
441
459
  uploaded: new Date(publishedAtOf(o)).toISOString(),
442
460
  people: people,
461
+ ...pageProvenance(meta, true),
443
462
  });
444
463
  }
445
464
  let next = null;
@@ -482,6 +501,7 @@ async function listShared(env, url, identity) {
482
501
  owner_email: meta.owner_email || null,
483
502
  owner_name: meta.owner_name || null,
484
503
  added_at: meta.added_at || null,
504
+ ...pageProvenance(pageMeta, false),
485
505
  });
486
506
  }
487
507
  const last = entries.length ? entries[entries.length - 1].key.slice(prefix.length) : '';
@@ -1 +1 @@
1
- {"version":3,"file":"worker-people-template.js","sourceRoot":"","sources":["../../../src/lib/share/worker-people-template.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+DAA+D;AAC/D,EAAE;AACF,mFAAmF;AACnF,6EAA6E;AAC7E,+EAA+E;AAC/E,wEAAwE;AACxE,uEAAuE;AACvE,8EAA8E;AAC9E,+EAA+E;AAC/E,sEAAsE;AACtE,EAAE;AACF,0CAA0C;AAC1C,gFAAgF;AAChF,2EAA2E;AAC3E,8EAA8E;AAC9E,4EAA4E;AAC5E,4DAA4D;AAC5D,8EAA8E;AAC9E,wEAAwE;AACxE,EAAE;AACF,2EAA2E;AAC3E,gEAAgE;AAChE,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkdzC,CAAC"}
1
+ {"version":3,"file":"worker-people-template.js","sourceRoot":"","sources":["../../../src/lib/share/worker-people-template.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+DAA+D;AAC/D,EAAE;AACF,mFAAmF;AACnF,6EAA6E;AAC7E,+EAA+E;AAC/E,wEAAwE;AACxE,uEAAuE;AACvE,8EAA8E;AAC9E,+EAA+E;AAC/E,sEAAsE;AACtE,EAAE;AACF,0CAA0C;AAC1C,gFAAgF;AAChF,2EAA2E;AAC3E,8EAA8E;AAC9E,4EAA4E;AAC5E,4DAA4D;AAC5D,8EAA8E;AAC9E,wEAAwE;AACxE,EAAE;AACF,2EAA2E;AAC3E,gEAAgE;AAChE,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsezC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phnx-labs/artifacts-cli",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Your coding agent writes Markdown; artifacts turns it into one polished HTML page you can read, mark up and share as a link.",
5
5
  "homepage": "https://artifacts-cli.sh",
6
6
  "repository": {