@growth-labs/cms 0.1.3 → 0.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/README.md +207 -0
- package/dist/engine/index.d.ts +2 -0
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +4 -0
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/publication.d.ts +210 -0
- package/dist/engine/publication.d.ts.map +1 -0
- package/dist/engine/publication.js +1436 -0
- package/dist/engine/publication.js.map +1 -0
- package/dist/engine/reader-state.d.ts +127 -0
- package/dist/engine/reader-state.d.ts.map +1 -0
- package/dist/engine/reader-state.js +493 -0
- package/dist/engine/reader-state.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/migrations.d.ts.map +1 -1
- package/dist/schema/migrations.js +65 -0
- package/dist/schema/migrations.js.map +1 -1
- package/dist/schema/tables.d.ts +1 -1
- package/dist/schema/tables.d.ts.map +1 -1
- package/dist/schema/tables.js +6 -2
- package/dist/schema/tables.js.map +1 -1
- package/dist/schema/types.d.ts +47 -0
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js.map +1 -1
- package/migrations/0018_content_publication_attempts.sql +23 -0
- package/migrations/0019_reader_state.sql +34 -0
- package/package.json +1 -1
- package/src/engine/index.ts +77 -0
- package/src/engine/publication.ts +2152 -0
- package/src/engine/reader-state.ts +918 -0
- package/src/index.ts +7 -2
- package/src/schema/index.ts +5 -0
- package/src/schema/migrations.ts +65 -0
- package/src/schema/tables.ts +6 -2
- package/src/schema/types.ts +60 -0
package/README.md
CHANGED
|
@@ -168,6 +168,213 @@ manual publish with a 409 and leaves the content status unchanged; throwing from
|
|
|
168
168
|
the hook fails closed with a 503. This keeps media-specific readiness checks in
|
|
169
169
|
the host site while preventing a configured site from bypassing them.
|
|
170
170
|
|
|
171
|
+
## Bounded publication kernel
|
|
172
|
+
|
|
173
|
+
`publishOne` is the build-independent publication path for a single content item.
|
|
174
|
+
It creates a new immutable `content_revisions` row, asks each injected surface to
|
|
175
|
+
prepare revision-addressed non-public artifacts, moves
|
|
176
|
+
`content_items.published_revision_id` with a compare-and-swap, then commits live
|
|
177
|
+
surfaces. A new publish writes its immutable revision and durable
|
|
178
|
+
`content_publication_attempts` outbox row in one D1 batch, so a crash cannot
|
|
179
|
+
leave an orphan revision with no recovery provenance. The pointer move and the attempt's
|
|
180
|
+
transition to `committing` execute in one D1 batch, so a process crash cannot
|
|
181
|
+
leave a moved pointer with no discoverable recovery provenance. A losing pointer
|
|
182
|
+
CAS aborts prepared surfaces and never commits live sitemap/feed/search/archive
|
|
183
|
+
artifacts for the losing revision. A skipped or failed prepare fails closed and
|
|
184
|
+
leaves the canonical pointer unchanged. Every state write carries an optimistic
|
|
185
|
+
version guard, so a stale Worker cannot regress a committed or otherwise
|
|
186
|
+
terminal attempt. When D1 omits affected-row metadata, the reread row must
|
|
187
|
+
exactly match the intended state, version, surface sets, receipts, and diagnostic
|
|
188
|
+
or the write is treated as a conflict.
|
|
189
|
+
The body validator runs against the exact in-memory snapshot inserted into the
|
|
190
|
+
immutable revision. A concurrent draft edit therefore cannot replace the
|
|
191
|
+
validated body between validation and revision creation.
|
|
192
|
+
|
|
193
|
+
The `surfaces` property is required. Sites that intentionally have no live
|
|
194
|
+
surfaces must pass `surfaces: []` and `allowNoSurfaces: true`; omitted surfaces
|
|
195
|
+
are treated as a wiring error. Surface names are canonical identifiers and
|
|
196
|
+
surrounding whitespace is rejected before any revision or outbox row is written.
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
import {
|
|
200
|
+
listPendingPublicationAttempts,
|
|
201
|
+
publishOne,
|
|
202
|
+
retryPublicationSurfaces,
|
|
203
|
+
rollbackPublication,
|
|
204
|
+
} from '@growth-labs/cms'
|
|
205
|
+
|
|
206
|
+
const receipt = await publishOne(env.SITE_DB, {
|
|
207
|
+
contentId,
|
|
208
|
+
createdBy: user.email,
|
|
209
|
+
surfaces: [
|
|
210
|
+
sitemapReconciler,
|
|
211
|
+
feedReconciler,
|
|
212
|
+
searchReconciler,
|
|
213
|
+
],
|
|
214
|
+
packageVersion: '0.3.0',
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
await rollbackPublication(env.SITE_DB, {
|
|
218
|
+
contentId,
|
|
219
|
+
targetRevisionId: priorRevisionId,
|
|
220
|
+
surfaces: [sitemapReconciler, feedReconciler, searchReconciler],
|
|
221
|
+
packageVersion: '0.2.0',
|
|
222
|
+
})
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Reconciler implementations are site-owned and injected. This package does not
|
|
226
|
+
ship a central fleet runtime and does not perform live customer writes by itself.
|
|
227
|
+
Every supplied surface must implement both `prepare` and `commit`; an inert
|
|
228
|
+
object that merely carries a required surface name fails before a revision or
|
|
229
|
+
attempt is created. Every hook receives an `AbortSignal` and is bounded to 10
|
|
230
|
+
seconds by default. Callers may set `surfaceHookTimeoutMs` to a positive integer
|
|
231
|
+
up to 30 seconds on publish, rollback, or retry. A timeout aborts the signal,
|
|
232
|
+
persists only the fixed `surface_hook_timed_out` diagnostic, and follows the
|
|
233
|
+
same durable failed-prepare, pending-commit, or incomplete-abort recovery path
|
|
234
|
+
as the corresponding hook failure. Surface hooks are idempotent and must stop
|
|
235
|
+
work promptly when their signal aborts:
|
|
236
|
+
|
|
237
|
+
- `prepare(input)` may write only revision-addressed staged data that readers do
|
|
238
|
+
not discover directly.
|
|
239
|
+
- `commit(input)` runs after the canonical pointer moved and may expose live
|
|
240
|
+
sitemap/feed/search/archive artifacts for that canonical revision. It must be
|
|
241
|
+
safe to repeat when a process crashes after the external commit but before its
|
|
242
|
+
receipt is persisted.
|
|
243
|
+
- `abort(input)` cleans up staged artifacts after a failed prepare or losing CAS.
|
|
244
|
+
Abort failures are stored in the attempt and included in the thrown error.
|
|
245
|
+
|
|
246
|
+
Hook receipts are runtime-normalized before persistence. Unknown statuses,
|
|
247
|
+
mismatched surface names, and malformed receipt fields become failed receipts
|
|
248
|
+
rather than corrupting the recovery record. Hook-supplied messages and thrown
|
|
249
|
+
exception text are never persisted in `receipts_json` or `last_error`; durable
|
|
250
|
+
diagnostics are fixed allowlisted values capped at 64 characters. Recovery also
|
|
251
|
+
redacts any unrecognized stored diagnostic before returning an attempt, keeping
|
|
252
|
+
signed URLs, credentials, request data, and customer content out of enumerable
|
|
253
|
+
recovery state.
|
|
254
|
+
Only the latest receipt for each surface and phase is retained, so repeated
|
|
255
|
+
commit or abort retries cannot grow an attempt row without bound.
|
|
256
|
+
|
|
257
|
+
Prepared surface names, surface receipts, and the remaining commit set are
|
|
258
|
+
persisted after every transition. Recovery skips already-prepared surfaces and
|
|
259
|
+
still aborts all durably prepared surfaces if a later prepare fails. The
|
|
260
|
+
surface returning a failed, skipped, thrown, or malformed prepare result is
|
|
261
|
+
also treated as possibly staged and receives idempotent cleanup before the
|
|
262
|
+
attempt can become `aborted`.
|
|
263
|
+
`listPendingPublicationAttempts()` returns at most 100 recoverable attempts by
|
|
264
|
+
default (configurable from 1 to 500) and accepts an `{ updatedAt, id }` keyset
|
|
265
|
+
cursor for the next page. It enumerates live-surface attempts only for the
|
|
266
|
+
current canonical revision; a direct retry of a stale live-surface attempt marks
|
|
267
|
+
it `superseded`. A stale `preparing` or `prepared` attempt first aborts only its
|
|
268
|
+
durably prepared surfaces and never stages additional work after another
|
|
269
|
+
revision wins. Enumeration isolates malformed or oversized durable JSON as a redacted
|
|
270
|
+
`recoveryError: 'invalid_durable_state'` record so one corrupt attempt cannot
|
|
271
|
+
wedge recovery of healthy rows; retrying that row still fails strict decoding.
|
|
272
|
+
`retryPublicationSurfaces()` accepts only the durable
|
|
273
|
+
`attemptId` plus the currently pending reconcilers; operation, content, target
|
|
274
|
+
revision, previous revision, and package version are loaded from D1 rather than
|
|
275
|
+
trusted from a retry caller. Mid-abort and `abort_failed` attempts remain
|
|
276
|
+
enumerable with their incomplete prepared-surface set, so the same retry entry
|
|
277
|
+
point can finish idempotent cleanup and transition them to `aborted`.
|
|
278
|
+
|
|
279
|
+
Rollback targets must have durable attempt provenance proving that the revision
|
|
280
|
+
previously became canonical. Revisions left behind by a failed prepare or a
|
|
281
|
+
losing pointer CAS cannot be exposed through rollback.
|
|
282
|
+
|
|
283
|
+
```typescript
|
|
284
|
+
let cursor
|
|
285
|
+
do {
|
|
286
|
+
const pending = await listPendingPublicationAttempts(env.SITE_DB, { cursor })
|
|
287
|
+
for (const attempt of pending) {
|
|
288
|
+
await retryPublicationSurfaces(env.SITE_DB, {
|
|
289
|
+
attemptId: attempt.id,
|
|
290
|
+
surfaces: attempt.pendingSurfaceNames.map(resolveSiteSurface),
|
|
291
|
+
})
|
|
292
|
+
}
|
|
293
|
+
const last = pending.at(-1)
|
|
294
|
+
cursor = last ? { updatedAt: last.updatedAt, id: last.id } : undefined
|
|
295
|
+
if (pending.length < 100) break
|
|
296
|
+
} while (cursor)
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
`importContentArchive` imports archive fixtures or site-owned export bundles for
|
|
300
|
+
article, newsletter, and page bodies as drafts. Imported items are not published
|
|
301
|
+
and do not move the canonical publication pointer. Imports are bounded and
|
|
302
|
+
resumable: pass `batchSize` and the returned `nextCursor` to continue. Existing
|
|
303
|
+
slugs are skipped as `already_imported`, making a retried batch idempotent.
|
|
304
|
+
`maxArchiveItems`, `maxBatchItems`, and `maxBodyBytes` provide explicit DoS
|
|
305
|
+
limits.
|
|
306
|
+
An archive cursor greater than the bundle's item count is rejected as
|
|
307
|
+
`archive_cursor_out_of_range`; a cursor exactly at the item count is a valid
|
|
308
|
+
completed checkpoint.
|
|
309
|
+
|
|
310
|
+
The storage decision evidence for packages#229 lives in
|
|
311
|
+
`benchmarks/PUBLICATION_STORAGE_PROTOCOL.md`; raw benchmark distributions are
|
|
312
|
+
retained under `benchmarks/results/` after the required runs. The benchmark uses
|
|
313
|
+
representative body/taxonomy distributions and records local Miniflare evidence
|
|
314
|
+
as local CPU/memory only; live D1/R2 latency remains a separate controlled
|
|
315
|
+
Worker measurement.
|
|
316
|
+
|
|
317
|
+
## Reader state and privacy
|
|
318
|
+
|
|
319
|
+
Apply migration `0019_reader_state` before adopting the reader-state API. The
|
|
320
|
+
consumer supplies a scope only after verifying both the realm user and site
|
|
321
|
+
token. `identityUserId` is the raw issuer UUID/ULID; prefixed subjects, email or
|
|
322
|
+
local IDs, and 64-hex analytics IDs are rejected. Content is always addressed by
|
|
323
|
+
its stable CMS ID plus content type, never by slug.
|
|
324
|
+
|
|
325
|
+
```typescript
|
|
326
|
+
import {
|
|
327
|
+
clearReaderHistory,
|
|
328
|
+
exportReaderStatePage,
|
|
329
|
+
recordReaderOpen,
|
|
330
|
+
recordReaderProgress,
|
|
331
|
+
setManualReadState,
|
|
332
|
+
setSavedState,
|
|
333
|
+
} from '@growth-labs/cms'
|
|
334
|
+
|
|
335
|
+
const scope = { identityUserId: verifiedRawUserId, siteId: verifiedSiteId }
|
|
336
|
+
const content = { contentType: 'article', contentId: stableContentId }
|
|
337
|
+
|
|
338
|
+
await recordReaderOpen(env.SITE_DB, scope, content, {
|
|
339
|
+
behavioralConsent: consent.readerHistory ? 'granted' : 'denied',
|
|
340
|
+
})
|
|
341
|
+
await recordReaderProgress(env.SITE_DB, scope, content, {
|
|
342
|
+
behavioralConsent: consent.readerHistory ? 'granted' : 'denied',
|
|
343
|
+
progressBasisPoints: 9_000,
|
|
344
|
+
})
|
|
345
|
+
await setManualReadState(env.SITE_DB, scope, content, {
|
|
346
|
+
state: 'unread',
|
|
347
|
+
occurredAt: eventTime,
|
|
348
|
+
mutationId: idempotencyKey,
|
|
349
|
+
})
|
|
350
|
+
await setSavedState(env.SITE_DB, scope, content, {
|
|
351
|
+
saved: true,
|
|
352
|
+
occurredAt: eventTime,
|
|
353
|
+
mutationId: idempotencyKey,
|
|
354
|
+
})
|
|
355
|
+
|
|
356
|
+
const page = await exportReaderStatePage(env.SITE_DB, scope, { limit: 100 })
|
|
357
|
+
await clearReaderHistory(env.SITE_DB, scope)
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Progress is monotonic and reaches automatic completion at 90 percent. A manual
|
|
361
|
+
read/unread value overrides automatic completion until explicitly cleared.
|
|
362
|
+
Explicit mutations use event time plus `mutationId` for deterministic ordering
|
|
363
|
+
and may supply `expectedVersion` for compare-and-swap. Batch/list/export reads
|
|
364
|
+
are limited to 100 rows and remain inside one verified user/site scope. List
|
|
365
|
+
cursors order by last update; export cursors are a distinct opaque type ordered
|
|
366
|
+
by immutable row creation time so concurrent activity cannot move an existing
|
|
367
|
+
row across an export page boundary. Consent
|
|
368
|
+
withdrawal clears behavioral history while retaining explicit manual, saved,
|
|
369
|
+
and stated-preference choices; `deleteReaderState` erases the entire current
|
|
370
|
+
user/site scope. Network-wide erasure is intentionally orchestrated by invoking
|
|
371
|
+
that site-scoped operation under each separately verified site authority.
|
|
372
|
+
|
|
373
|
+
Rollback is additive and data-preserving: pin `@growth-labs/cms@0.2.0` and stop
|
|
374
|
+
calling the reader-state surface, but leave `cms_reader_state` and migration
|
|
375
|
+
`0019` in place. Re-adopting `0.3.0` resumes from the preserved rows; rollback
|
|
376
|
+
must never drop or reinterpret them through analytics identity.
|
|
377
|
+
|
|
171
378
|
## Coming in later waves
|
|
172
379
|
|
|
173
380
|
- Broader admin UI polish and per-site extension points beyond the shipped
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -11,8 +11,10 @@ export { type AcceptInviteInput, acceptInvite, type CreateInviteInput, type Crea
|
|
|
11
11
|
export { listMembers, loadMembership, type MemberListEntry, type MembershipRecord, removeMember, setRole, type UpsertMastheadUserInput, upsertMastheadUser, } from './members.js';
|
|
12
12
|
export { canChangeMemberRole, canRemoveMember, type MemberActionDecision, type MembershipSummary, ownerCount, } from './membership-rules.js';
|
|
13
13
|
export { buildOgCardSpec, type OgCardSpec, type OgCardSpecOpts, type OgImageRenderer, } from './og-render.js';
|
|
14
|
+
export { ContentArchiveImportLimitError, type ContentArchiveInput, type ContentArchiveItem, DEFAULT_PENDING_PUBLICATION_ATTEMPT_LIMIT, DEFAULT_PUBLICATION_SURFACE_HOOK_TIMEOUT_MS, type ImportContentArchiveOptions, type ImportContentArchiveResult, type ImportedArchiveItem, importContentArchive, type ListPendingPublicationAttemptsOptions, listPendingPublicationAttempts, MAX_PENDING_PUBLICATION_ATTEMPT_LIMIT, MAX_PUBLICATION_SURFACE_HOOK_TIMEOUT_MS, type PublicationAttempt, type PublicationAttemptState, PublicationNotFoundError, type PublicationOperation, PublicationPointerMoveError, type PublicationReconciler, PublicationReconciliationError, type PublicationReconciliationInput, type PublicationSurfaceCommitStatus, type PublicationSurfacePhase, type PublicationSurfaceReceipt, PublicationSurfaceRequirementError, type PublicationSurfaceStatus, type PublishOneInput, type PublishOneReceipt, publishOne, type RetryPublicationSurfacesInput, type RetryPublicationSurfacesReceipt, type RollbackPublicationInput, type RollbackPublicationReceipt, retryPublicationSurfaces, rollbackPublication, type SkippedArchiveItem, } from './publication.js';
|
|
14
15
|
export { evaluateArticleBody, type PublishGuardOptions, type PublishGuardOutcome, publishGuardResponseOrNull, } from './publish-guard.js';
|
|
15
16
|
export { type ArticleInput, assertContentBodyValidForPublish, type BaseContentInput, type ContentItemRecord, type CreateContentInput, claimScheduledForPublish, countWords, createContent, createRevision, duplicateContentItem, ensureUniqueSlug, estimateReadTime, evaluateContentBodyForPublish, getContentItem, getContentRelations, getContentSnapshot, type NewsletterInput, type PodcastInput, PublishContentValidationError, publishContent, scheduleContent, setContentRelations, setContentTags, type UpdateContentInput, unpublishContent, updateContentItem, type VideoInput, } from './publisher.js';
|
|
17
|
+
export { type ClearManualReadStateOptions, type ContentStateKey, clearManualReadState, clearReaderHistory, DEFAULT_READER_STATE_BATCH_SIZE, deleteReaderState, exportReaderStatePage, getReaderState, getReaderStateBatch, listReaderState, MAX_READER_STATE_BATCH_SIZE, READER_AUTOMATIC_COMPLETION_BPS, type ReaderBehavioralConsent, type ReaderPreferences, type ReaderPreferenceValue, ReaderStateConflictError, ReaderStateDurableStateError, type ReaderStateExportPage, ReaderStateInputError, type ReaderStateListOptions, type ReaderStateMutationResult, type ReaderStatePage, type ReaderStateRecord, type ReaderStateScope, type RecordReaderOpenOptions, type RecordReaderProgressOptions, recordReaderOpen, recordReaderProgress, recordReaderUnlock, type SetManualReadStateOptions, type SetReaderPreferencesOptions, type SetSavedStateOptions, setManualReadState, setReaderPreferences, setSavedState, } from './reader-state.js';
|
|
16
18
|
export { type ContentRevisionPayload, createRevisionWithDelta, getRevision, listRevisions, type RevisionSummary, restoreRevision, } from './revisions.js';
|
|
17
19
|
export { decodeHeadingEntities, type SanitizeOptions, sanitize, sanitizeBody, stripOverEscapes, } from './sanitize.js';
|
|
18
20
|
export { type SeedMembershipInput, seedMembership } from './seed-membership.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEnE,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,eAAe,EACf,KAAK,0BAA0B,EAC/B,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,eAAe,EACf,KAAK,oBAAoB,EACzB,eAAe,GACf,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,GACjB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,SAAS,EACT,KAAK,kBAAkB,EACvB,eAAe,GACf,MAAM,eAAe,CAAA;AAE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,sBAAsB,EACtB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,UAAU,GACV,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACN,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACpB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACN,KAAK,yBAAyB,EAC9B,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,GAClB,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEnE,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,eAAe,EACf,KAAK,0BAA0B,EAC/B,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,eAAe,EACf,KAAK,oBAAoB,EACzB,eAAe,GACf,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,YAAY,EACZ,aAAa,EACb,iBAAiB,GACjB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,SAAS,EACT,KAAK,kBAAkB,EACvB,eAAe,GACf,MAAM,eAAe,CAAA;AAEtB,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,eAAe,GACf,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,mB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KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,UAAU,GACV,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACN,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACpB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACN,KAAK,yBAAyB,EAC9B,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,GAClB,MAAM,eAAe,CAAA"}
|
package/dist/engine/index.js
CHANGED
|
@@ -26,10 +26,14 @@ export { listMembers, loadMembership, removeMember, setRole, upsertMastheadUser,
|
|
|
26
26
|
export { canChangeMemberRole, canRemoveMember, ownerCount, } from './membership-rules.js';
|
|
27
27
|
// OG-image renderer interface + pure card-spec builder (P4 Task 5).
|
|
28
28
|
export { buildOgCardSpec, } from './og-render.js';
|
|
29
|
+
// Bounded one-item publication kernel.
|
|
30
|
+
export { ContentArchiveImportLimitError, DEFAULT_PENDING_PUBLICATION_ATTEMPT_LIMIT, DEFAULT_PUBLICATION_SURFACE_HOOK_TIMEOUT_MS, importContentArchive, listPendingPublicationAttempts, MAX_PENDING_PUBLICATION_ATTEMPT_LIMIT, MAX_PUBLICATION_SURFACE_HOOK_TIMEOUT_MS, PublicationNotFoundError, PublicationPointerMoveError, PublicationReconciliationError, PublicationSurfaceRequirementError, publishOne, retryPublicationSurfaces, rollbackPublication, } from './publication.js';
|
|
29
31
|
// Pre-publish body validation guard.
|
|
30
32
|
export { evaluateArticleBody, publishGuardResponseOrNull, } from './publish-guard.js';
|
|
31
33
|
// The publishing engine — content data-access core.
|
|
32
34
|
export { assertContentBodyValidForPublish, claimScheduledForPublish, countWords, createContent, createRevision, duplicateContentItem, ensureUniqueSlug, estimateReadTime, evaluateContentBodyForPublish, getContentItem, getContentRelations, getContentSnapshot, PublishContentValidationError, publishContent, scheduleContent, setContentRelations, setContentTags, unpublishContent, updateContentItem, } from './publisher.js';
|
|
35
|
+
// Verified-user/site reader product state. Analytics remains observation-only.
|
|
36
|
+
export { clearManualReadState, clearReaderHistory, DEFAULT_READER_STATE_BATCH_SIZE, deleteReaderState, exportReaderStatePage, getReaderState, getReaderStateBatch, listReaderState, MAX_READER_STATE_BATCH_SIZE, READER_AUTOMATIC_COMPLETION_BPS, ReaderStateConflictError, ReaderStateDurableStateError, ReaderStateInputError, recordReaderOpen, recordReaderProgress, recordReaderUnlock, setManualReadState, setReaderPreferences, setSavedState, } from './reader-state.js';
|
|
33
37
|
// Revision engine — snapshot + word-delta history + restore.
|
|
34
38
|
export { createRevisionWithDelta, getRevision, listRevisions, restoreRevision, } from './revisions.js';
|
|
35
39
|
// Content-integrity sanitize passes (reuse the validator repair fns).
|
package/dist/engine/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,uCAAuC;AAEvC,4EAA4E;AAC5E,OAAO,EAAsB,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACnE,+DAA+D;AAC/D,OAAO,EAGN,kBAAkB,EAClB,eAAe,EAEf,qBAAqB,EAErB,eAAe,EAEf,eAAe,GACf,MAAM,iBAAiB,CAAA;AACxB,gDAAgD;AAChD,OAAO,EAGN,YAAY,EACZ,aAAa,EACb,iBAAiB,GACjB,MAAM,mBAAmB,CAAA;AAC1B,0DAA0D;AAC1D,OAAO,EAIN,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,SAAS,EAET,eAAe,GACf,MAAM,eAAe,CAAA;AACtB,qEAAqE;AACrE,OAAO,EAGN,gBAAgB,EAChB,eAAe,GACf,MAAM,mBAAmB,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,CAAA;AACtB,yEAAyE;AACzE,OAAO,EAA4B,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC/E,gEAAgE;AAChE,OAAO,EAIN,UAAU,GACV,MAAM,UAAU,CAAA;AACjB,gBAAgB;AAChB,OAAO,EACN,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,OAAO,EACP,kBAAkB,GAClB,MAAM,WAAW,CAAA;AAClB,oCAAoC;AACpC,OAAO,EACN,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,0FAA0F;AAC1F,OAAO,EACN,aAAa,EACb,YAAY,EACZ,cAAc,EACd,iBAAiB,GACjB,MAAM,kBAAkB,CAAA;AACzB,mEAAmE;AACnE,OAAO,EACN,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,GAEV,MAAM,WAAW,CAAA;AAClB,wFAAwF;AACxF,OAAO,EAAuB,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxE,4EAA4E;AAC5E,OAAO,EAEN,WAAW,EACX,sBAAsB,EAOtB,mBAAmB,EACnB,UAAU,GACV,MAAM,sBAAsB,CAAA;AAC7B,mFAAmF;AACnF,OAAO,EACN,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACpB,MAAM,qBAAqB,CAAA;AAC5B,oFAAoF;AACpF,OAAO,EAEN,oBAAoB,EAEpB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,cAAc,GAId,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,uCAAuC;AAEvC,4EAA4E;AAC5E,OAAO,EAAsB,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACnE,+DAA+D;AAC/D,OAAO,EAGN,kBAAkB,EAClB,eAAe,EAEf,qBAAqB,EAErB,eAAe,EAEf,eAA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AAqB,CAAA;AAC5B,0FAA0F;AAC1F,OAAO,EACN,aAAa,EACb,YAAY,EACZ,cAAc,EACd,iBAAiB,GACjB,MAAM,kBAAkB,CAAA;AACzB,mEAAmE;AACnE,OAAO,EACN,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,GAEV,MAAM,WAAW,CAAA;AAClB,wFAAwF;AACxF,OAAO,EAAuB,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxE,4EAA4E;AAC5E,OAAO,EAEN,WAAW,EACX,sBAAsB,EAOtB,mBAAmB,EACnB,UAAU,GACV,MAAM,sBAAsB,CAAA;AAC7B,mFAAmF;AACnF,OAAO,EACN,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACpB,MAAM,qBAAqB,CAAA;AAC5B,oFAAoF;AACpF,OAAO,EAEN,oBAAoB,EAEpB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,cAAc,GAId,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import type { ContentPublicationAttemptState, ContentType } from '../schema/types.js';
|
|
2
|
+
import type { D1Database } from './d1.js';
|
|
3
|
+
export type PublicationOperation = 'publish' | 'rollback';
|
|
4
|
+
export type PublicationSurfacePhase = 'prepare' | 'commit' | 'abort';
|
|
5
|
+
export type PublicationSurfaceStatus = 'ok' | 'skipped' | 'failed';
|
|
6
|
+
export type PublicationSurfaceCommitStatus = 'none' | 'committed' | 'pending_retry';
|
|
7
|
+
export interface PublicationSurfaceReceipt {
|
|
8
|
+
name: string;
|
|
9
|
+
status: PublicationSurfaceStatus;
|
|
10
|
+
phase?: PublicationSurfacePhase;
|
|
11
|
+
message?: string;
|
|
12
|
+
durationMs?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PublicationReconciliationInput {
|
|
15
|
+
operation: PublicationOperation;
|
|
16
|
+
contentId: string;
|
|
17
|
+
revisionId: string;
|
|
18
|
+
previousRevisionId: string | null;
|
|
19
|
+
snapshot: Record<string, unknown>;
|
|
20
|
+
now: number;
|
|
21
|
+
packageVersion?: string | null;
|
|
22
|
+
phase?: PublicationSurfacePhase;
|
|
23
|
+
/** Aborted when the bounded surface-hook deadline expires. */
|
|
24
|
+
signal?: AbortSignal;
|
|
25
|
+
}
|
|
26
|
+
export interface PublicationReconciler {
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Prepare revision-addressed, non-public artifacts. This phase runs before the
|
|
30
|
+
* canonical pointer CAS, must be idempotent, and must not expose the target
|
|
31
|
+
* revision to readers.
|
|
32
|
+
*/
|
|
33
|
+
prepare?(input: PublicationReconciliationInput): Promise<PublicationSurfaceReceipt | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Commit live surfaces after the canonical pointer moved. Implementations must
|
|
36
|
+
* be idempotent because a Worker can crash after the external commit but before
|
|
37
|
+
* its durable receipt is recorded.
|
|
38
|
+
*/
|
|
39
|
+
commit?(input: PublicationReconciliationInput): Promise<PublicationSurfaceReceipt | undefined>;
|
|
40
|
+
/** Abort prepared or committed artifacts after a failed prepare/CAS path. */
|
|
41
|
+
abort?(input: PublicationReconciliationInput): Promise<PublicationSurfaceReceipt | undefined>;
|
|
42
|
+
/** @deprecated Unsupported by the durable publication contract; use commit. */
|
|
43
|
+
reconcile?(input: PublicationReconciliationInput): Promise<PublicationSurfaceReceipt | undefined>;
|
|
44
|
+
}
|
|
45
|
+
export interface PublishOneInput {
|
|
46
|
+
contentId: string;
|
|
47
|
+
now?: number;
|
|
48
|
+
createdBy?: string | null;
|
|
49
|
+
surfaces?: PublicationReconciler[];
|
|
50
|
+
allowNoSurfaces?: boolean;
|
|
51
|
+
requiredSurfaceNames?: string[];
|
|
52
|
+
packageVersion?: string | null;
|
|
53
|
+
surfaceHookTimeoutMs?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface PublishOneReceipt {
|
|
56
|
+
status: 'published';
|
|
57
|
+
attemptId: string;
|
|
58
|
+
contentId: string;
|
|
59
|
+
revisionId: string;
|
|
60
|
+
previousRevisionId: string | null;
|
|
61
|
+
publishedAt: number;
|
|
62
|
+
surfaceStatus: PublicationSurfaceCommitStatus;
|
|
63
|
+
surfaces: PublicationSurfaceReceipt[];
|
|
64
|
+
packageVersion: string | null;
|
|
65
|
+
}
|
|
66
|
+
export interface RollbackPublicationInput {
|
|
67
|
+
contentId: string;
|
|
68
|
+
targetRevisionId: string;
|
|
69
|
+
now?: number;
|
|
70
|
+
surfaces?: PublicationReconciler[];
|
|
71
|
+
allowNoSurfaces?: boolean;
|
|
72
|
+
requiredSurfaceNames?: string[];
|
|
73
|
+
packageVersion?: string | null;
|
|
74
|
+
surfaceHookTimeoutMs?: number;
|
|
75
|
+
}
|
|
76
|
+
export interface RollbackPublicationReceipt {
|
|
77
|
+
status: 'rolled_back';
|
|
78
|
+
attemptId: string;
|
|
79
|
+
contentId: string;
|
|
80
|
+
revisionId: string;
|
|
81
|
+
previousRevisionId: string | null;
|
|
82
|
+
rolledBackAt: number;
|
|
83
|
+
surfaceStatus: PublicationSurfaceCommitStatus;
|
|
84
|
+
surfaces: PublicationSurfaceReceipt[];
|
|
85
|
+
packageVersion: string | null;
|
|
86
|
+
}
|
|
87
|
+
export interface RetryPublicationSurfacesInput {
|
|
88
|
+
attemptId: string;
|
|
89
|
+
now?: number;
|
|
90
|
+
surfaces?: PublicationReconciler[];
|
|
91
|
+
surfaceHookTimeoutMs?: number;
|
|
92
|
+
}
|
|
93
|
+
export interface RetryPublicationSurfacesReceipt {
|
|
94
|
+
status: 'reconciled' | 'pending_retry' | 'aborted' | 'abort_failed';
|
|
95
|
+
attemptId: string;
|
|
96
|
+
contentId: string;
|
|
97
|
+
revisionId: string;
|
|
98
|
+
previousRevisionId: string | null;
|
|
99
|
+
surfaceStatus: PublicationSurfaceCommitStatus;
|
|
100
|
+
surfaces: PublicationSurfaceReceipt[];
|
|
101
|
+
packageVersion: string | null;
|
|
102
|
+
}
|
|
103
|
+
export type PublicationAttemptState = ContentPublicationAttemptState;
|
|
104
|
+
export interface PublicationAttempt {
|
|
105
|
+
id: string;
|
|
106
|
+
operation: PublicationOperation;
|
|
107
|
+
contentId: string;
|
|
108
|
+
revisionId: string;
|
|
109
|
+
previousRevisionId: string | null;
|
|
110
|
+
state: PublicationAttemptState;
|
|
111
|
+
surfaceNames: string[];
|
|
112
|
+
pendingSurfaceNames: string[];
|
|
113
|
+
preparedSurfaceNames: string[];
|
|
114
|
+
receipts: PublicationSurfaceReceipt[];
|
|
115
|
+
version: number;
|
|
116
|
+
packageVersion: string | null;
|
|
117
|
+
lastError: string | null;
|
|
118
|
+
recoveryError?: 'invalid_durable_state';
|
|
119
|
+
createdAt: number;
|
|
120
|
+
updatedAt: number;
|
|
121
|
+
}
|
|
122
|
+
export interface ListPendingPublicationAttemptsOptions {
|
|
123
|
+
limit?: number;
|
|
124
|
+
cursor?: {
|
|
125
|
+
updatedAt: number;
|
|
126
|
+
id: string;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export declare class PublicationReconciliationError extends Error {
|
|
130
|
+
readonly receipts: PublicationSurfaceReceipt[];
|
|
131
|
+
readonly attemptId: string | null;
|
|
132
|
+
constructor(message: string, receipts: PublicationSurfaceReceipt[], attemptId?: string | null);
|
|
133
|
+
}
|
|
134
|
+
export declare class PublicationSurfaceRequirementError extends Error {
|
|
135
|
+
constructor(message: string);
|
|
136
|
+
}
|
|
137
|
+
export declare class PublicationPointerMoveError extends Error {
|
|
138
|
+
readonly receipts: PublicationSurfaceReceipt[];
|
|
139
|
+
readonly attemptId: string | null;
|
|
140
|
+
constructor(message: string, receipts?: PublicationSurfaceReceipt[], attemptId?: string | null);
|
|
141
|
+
}
|
|
142
|
+
export declare class PublicationNotFoundError extends Error {
|
|
143
|
+
constructor(message: string);
|
|
144
|
+
}
|
|
145
|
+
export interface ContentArchiveInput {
|
|
146
|
+
schema?: string;
|
|
147
|
+
source?: string;
|
|
148
|
+
items?: ContentArchiveItem[];
|
|
149
|
+
}
|
|
150
|
+
export interface ContentArchiveItem {
|
|
151
|
+
type?: ContentType;
|
|
152
|
+
slug?: string;
|
|
153
|
+
title?: string;
|
|
154
|
+
excerpt?: string | null;
|
|
155
|
+
primaryCategory?: string | null;
|
|
156
|
+
primaryTopic?: string | null;
|
|
157
|
+
tags?: string[];
|
|
158
|
+
bodyMarkdown?: string;
|
|
159
|
+
}
|
|
160
|
+
export interface ImportContentArchiveOptions {
|
|
161
|
+
defaultPrimaryCategory?: string | null;
|
|
162
|
+
defaultPrimaryTopic?: string | null;
|
|
163
|
+
cursor?: number | string | null;
|
|
164
|
+
batchSize?: number;
|
|
165
|
+
maxBatchItems?: number;
|
|
166
|
+
maxArchiveItems?: number;
|
|
167
|
+
maxBodyBytes?: number;
|
|
168
|
+
}
|
|
169
|
+
export interface ImportedArchiveItem {
|
|
170
|
+
id: string;
|
|
171
|
+
slug: string;
|
|
172
|
+
type: 'article' | 'newsletter' | 'page';
|
|
173
|
+
}
|
|
174
|
+
export interface SkippedArchiveItem {
|
|
175
|
+
index: number;
|
|
176
|
+
reason: string;
|
|
177
|
+
title: string | null;
|
|
178
|
+
slug?: string | null;
|
|
179
|
+
existingId?: string | null;
|
|
180
|
+
}
|
|
181
|
+
export interface ImportContentArchiveResult {
|
|
182
|
+
created: ImportedArchiveItem[];
|
|
183
|
+
skipped: SkippedArchiveItem[];
|
|
184
|
+
processed: number;
|
|
185
|
+
cursor: number;
|
|
186
|
+
nextCursor: number | null;
|
|
187
|
+
done: boolean;
|
|
188
|
+
checkpoint: {
|
|
189
|
+
cursor: number;
|
|
190
|
+
nextCursor: number | null;
|
|
191
|
+
batchSize: number;
|
|
192
|
+
totalItems: number;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
export declare class ContentArchiveImportLimitError extends Error {
|
|
196
|
+
readonly code: string;
|
|
197
|
+
readonly limit: number;
|
|
198
|
+
readonly actual: number;
|
|
199
|
+
constructor(code: string, message: string, limit: number, actual: number);
|
|
200
|
+
}
|
|
201
|
+
export declare const DEFAULT_PUBLICATION_SURFACE_HOOK_TIMEOUT_MS = 10000;
|
|
202
|
+
export declare const MAX_PUBLICATION_SURFACE_HOOK_TIMEOUT_MS = 30000;
|
|
203
|
+
export declare const DEFAULT_PENDING_PUBLICATION_ATTEMPT_LIMIT = 100;
|
|
204
|
+
export declare const MAX_PENDING_PUBLICATION_ATTEMPT_LIMIT = 500;
|
|
205
|
+
export declare function listPendingPublicationAttempts(db: D1Database, options?: ListPendingPublicationAttemptsOptions): Promise<PublicationAttempt[]>;
|
|
206
|
+
export declare function publishOne(db: D1Database, input: PublishOneInput): Promise<PublishOneReceipt>;
|
|
207
|
+
export declare function rollbackPublication(db: D1Database, input: RollbackPublicationInput): Promise<RollbackPublicationReceipt>;
|
|
208
|
+
export declare function retryPublicationSurfaces(db: D1Database, input: RetryPublicationSurfacesInput): Promise<RetryPublicationSurfacesReceipt>;
|
|
209
|
+
export declare function importContentArchive(db: D1Database, archive: ContentArchiveInput, options?: ImportContentArchiveOptions): Promise<ImportContentArchiveResult>;
|
|
210
|
+
//# sourceMappingURL=publication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publication.d.ts","sourceRoot":"","sources":["../../src/engine/publication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,8BAA8B,EAC9B,WAAW,EACX,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,SAAS,CAAA;AAanD,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,UAAU,CAAA;AACzD,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AACpE,MAAM,MAAM,wBAAwB,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,CAAA;AAClE,MAAM,MAAM,8BAA8B,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,CAAA;AAEnF,MAAM,WAAW,yBAAyB;IACzC,IAAI,EAAE,MAAM,CAAA;IAC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