libraryPackage manifestv0.2.4

lib.creator-operations-runtime

Reusable transactional creator operations.

@lssm-tech/lib.creator-operations-runtime
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 0.2.4. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
serverbunnode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGElib.creator-operations-runtimedomains

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

1 declaraciónSELECT TO INSPECT

Creator operations runtime

Reusable creator campaign lifecycle, immutable accepted agreements, submission review, cumulative tiered CPM accrual and wallet-backed settlement orchestration.

Contracts are owned by lib.contracts-spec/creator-operations. Inject a transactional store, a trusted authority and a clock. Every authority request contains the requested parameters and evidence references; the host must verify scope, permissions, observation evidence and financial authority against canonical records. There is no default grant.

Money uses integer decimal strings with an explicit currency and scale. Tiered CPM uses per-band integer division, matching the existing Hirly calculation. Cumulative accrual subtracts previously credited units so repeated observations cannot pay flat fees twice. Accepted terms and earned balances are immutable; corrections never claw back earnings implicitly. Campaign exposure is an additional funding ceiling.

Payout reservations, debits and history commit atomically. Unknown outcomes retain their reservation; reconciliation does not resubmit. The provider port is shared by Stripe, PayPal and manual settlement; each host adapter must verify the exact rail, destination, unit conversion and settlement evidence before claiming payment.

This is additive capability extraction. Existing Hirly deployments have not migrated and its 213-operation parity inventory is not certified by these package tests.

training contains the pure creator-training state transition extracted from Hirly's current API behavior: locale, module views, quiz outcomes, micro-events and acknowledgement state. Passed modules remain completed after a later failed quiz; updates use optimistic versions and immutable snapshots. Hosts still validate course/module membership and quiz evidence, persist request receipts and own migration. Spanish locale support is additive.

training-service adds authorized initialization and durable updates. Configure the initial locale explicitly (Hirly uses fr) and a transactional CreatorTrainingStore. Request receipts bind the full parsed event, creator, course, scope and expected version. Exact retry returns the recorded state; altered request IDs fail. Host authority validates course/module membership and quiz evidence before any read or write.

Result-only legacy training receipts are rejected by default because they cannot prove exact input. Set legacyReplay: 'preserve_native' only in a reviewed native compatibility adapter to replay the stored result for the same course without mutation. Imported legacy IDs remain reserved and cannot become new exact-input update receipts.

training-course validates module, quiz, progress-event and locale membership against a versioned course definition. Call it from the training authorization hook before verifying quiz results. It does not authenticate creators or prove that a quiz was passed.

createCreatorTrainingAuthority composes authorized course loading, membership checks and server-owned quiz-result verification. The returned function can be passed directly to CreatorTrainingService.authorize. It rejects mismatched course scope and claimed quiz outcomes; the loader still owns creator enrollment/identity authorization.

training-progress projects recorded module completion against an authorized course revision. Duplicate completions count once; removed module IDs are reported separately and cannot inflate completion. Quiz outcomes do not implicitly rewrite native historical completion. The summary awards no XP or qualification.

CreatorTrainingProgressService authorizes the creator/course binding before reading stored progress. Missing training state remains absent; dashboard reads do not initialize progress or emit training receipts. The configured store may still use transactional locks.

training-quiz scores submitted answers against a private server-owned versioned key, preserving rounded percentage thresholds. Missing answers are incorrect; unknown question/option identifiers and malformed keys fail validation. Persist attempt evidence server-side and feed its result to the training authority; never trust a browser score.

CreatorTrainingQuizService authorizes exact quiz revisions, scores privately and records attempt receipts through an injected atomic store. The receipt contains submitted answers and scoring results, never the answer key. Attempt replay rejects changed inputs and does not itself update training progress. Durable attempt storage is still required.

The source-bound quiz compatibility script compares every achievable score across Hirly's localized quiz packs and records source hashes. Use scripts/check-creator-quiz-compatibility.ts --source-root <creator-platform> to refresh that evidence when native content changes. No answer keys are written to the report.

CreatorQuizCompletionService scores/persists an attempt before deriving a training quiz event from its server result. Its deterministic completion request identity prevents duplicate progress writes. A version conflict leaves scoring durable and can be retried against the correct training version; these are two recoverable stages, not one atomic transaction. Both underlying services retain their authorization hooks.

Completion passes its scored attempt into the training authorization hook. The service checks scope/creator/course/module/quiz/result binding before invoking that hook; host authorization can compare the supplied receipt with durable attempt storage. Supplied evidence is not intrinsically trusted and direct event updates retain their existing authority requirements.

createStoredCreatorQuizVerifier plugs into createCreatorTrainingAuthority.verifyQuiz. It requires completion attempt evidence, verifies creator/course/module/result binding, and compares the full receipt with private durable storage. Enrollment authorization must run first, and only trusted scorers may write attempt storage.

Declared capabilities.

Canonical creator business runtime

Reusable transactional creator operations.

Use it to

  • Canonical creator business runtime

Requires

  • TypeScript
  • Host-owned authority

Choose another boundary when

  • Full Hirly application parity or live payment qualification is required without host integration.

@lssm-tech/lib.creator-operations-runtimeCreatorCampaignService, CreatorAccrualService, CreatorPayoutService

Imports and export paths.

18 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

18 importaciones

Dependencies and related packages.

Runtime dependencies 1
Development dependencies 4
@types/bun
catalog:types
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
lint:checknode ../../../../scripts/biome.cjs check .
testbun test
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
Tu vista

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Tu contexto

The different parts of you

Choose a starting point

Una mezcla útil de contexto, imágenes y orientación discreta.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Comodidad de lectura

Elige tu idioma

El idioma de la interfaz solo cambia el texto. Los mercados, precios y flujos de trabajo conservan sus propios ajustes.

Cobertura de traducción

Parte del contenido se muestra en inglés.

Navegación151
Grafo616
Categorías188
Portafolio332
Ejemplos2035
Vista previa de la fuente41

Se añadirán más traducciones a medida que se revise el contenido.

Esta preferencia se guarda en este navegador.

Buscar en el sitio web

Puntos de partida útiles

Sin resultados. Prueba una frase más corta, un nombre de operación u otro ámbito de búsqueda.

UN POCO DE ESPACIO PARA EXPLORAR

Encuentra algo que explorar.

Abre una vista detallada en esta página, prueba otra perspectiva o sigue el detalle a su propia página.

Cómo funcionan las vistas previas y los controles
01

Mirar antes de salir

Pasa el cursor por un enlace o enfócalo con Tab para ver una vista previa. Hacer clic en el enlace original o pulsar Intro siempre abre su destino.

02

Mantener el contexto

Entra en la vista previa para explorar sus secciones. Usa Alt + ↓ desde un enlace enfocado para entrar con el teclado. Escape la cierra.

03

Abrir las posibilidades

Las filas desplegables, las perspectivas y los controles destacados revelan más. Tu vista cambia la comodidad de lectura y el contexto que exploras.

Un botón separado para mirar más de cerca

Muestra pequeños botones de vista previa junto a los enlaces donde haya espacio. Toca el ojo para inspeccionar o el enlace para ir directamente. Esta elección permanece en esta pestaña.

No se recoge historial de navegación. El movimiento reducido sigue tu dispositivo y Tu vista.