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 declarationSELECT 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 imports

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
Your view

Make room for your context.

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

Your context

The different parts of you

Choose a starting point

A useful mix of context, visuals and gentle guidance.

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

Reading comfort

Choose your language

Interface language changes text only. Markets, prices and workflows keep their own settings.

Translation coverage

Original source

Navigation151
Graph616
Categories378
Portfolio833
Examples2,035
Source preview1,542

More translations will be added as content is reviewed.

This preference is saved on this browser.

Search the website

Useful starting points

No results. Try a shorter phrase, an operation name or another search area.

A LITTLE ROOM TO EXPLORE

Find something to explore.

Open a closer look on this page, try a different perspective, or follow the detail into its own page.

How previews and controls work
01

Look before you leave

Hover a link or focus it with Tab to see a preview. Clicking the original link or pressing Enter always opens its destination.

02

Stay with the context

Move into the preview to explore its sections. Use Alt + ↓ from a focused link to enter it with the keyboard. Escape closes it.

03

Open the possibilities

Disclosure rows, perspective choices and highlighted controls reveal more. Your view changes reading comfort and the context you explore.

A separate button for a closer look

Show small preview buttons beside links where there is room. Tap the eye to inspect, or tap the link to go straight there. This choice stays in this tab.

No browsing history is collected. Reduced motion follows your device and Your view.