libraryPackage manifestv5.1.4

lib.content-gen

AI-powered content generation for blog, email, and social

@lssm-tech/lib.content-gen
Source, release and verification context

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

Package source ↗ Manifest ↗
servernode
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.content-gendomains

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

8 declarations · first 6 shownSELECT TO INSPECT

@lssm-tech/lib.content-gen

Website: https://contractspec.io

AI-powered content generation for blog, email, and social.

What It Provides

  • Layer: lib.
  • Consumers: image-gen, voice, video-gen, bundles.
  • Related ContractSpec packages include @lssm-tech/lib.ai-providers, @lssm-tech/lib.contracts-integrations, @lssm-tech/lib.contracts-spec, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.
  • Related ContractSpec packages include @lssm-tech/lib.ai-providers, @lssm-tech/lib.contracts-integrations, @lssm-tech/lib.contracts-spec, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.

Installation

npm install @lssm-tech/lib.content-gen

or

bun add @lssm-tech/lib.content-gen

Usage

Import the root entrypoint from @lssm-tech/lib.content-gen, or choose a documented subpath when you only need one part of the package surface.

SocialPostGenerator drafts LinkedIn content without requiring a connected LinkedIn account. LLM JSON is parsed through parseSocialPosts; malformed posts, unsafe links, invalid channels, and invalid hashtags are discarded before a caller can approve or publish them through the separate LinkedIn provider runtime.

The optimization surfaces distinguish generative-engine optimization (./geo) from local-market adaptation (./geographic). ./social-optimization provides deterministic platform checks. All three return reports; they do not publish or make campaign decisions.

Architecture

  • src/generators is part of the package's public or composition surface.
  • src/i18n is part of the package's public or composition surface.
  • src/index.ts is the root public barrel and package entrypoint.
  • src/seo is part of the package's public or composition surface.
  • src/types.ts is shared public type definitions.

Public Entry Points

  • Export . resolves through ./src/index.ts.
  • Export ./generators resolves through ./src/generators/index.ts.
  • Export ./generators/blog resolves through ./src/generators/blog.ts.
  • Export ./generators/email resolves through ./src/generators/email.ts.
  • Export ./generators/landing-page resolves through ./src/generators/landing-page.ts.
  • Export ./generators/social resolves through ./src/generators/social.ts.
  • Export ./i18n resolves through ./src/i18n/index.ts.
  • Export ./i18n/catalogs resolves through ./src/i18n/catalogs/index.ts.
  • Export ./i18n/catalogs/en resolves through ./src/i18n/catalogs/en.ts.
  • Export ./i18n/catalogs/es resolves through ./src/i18n/catalogs/es.ts.
  • The package publishes 17 total export subpaths; keep docs aligned with package.json.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run test — bun test --pass-with-no-tests
  • bun run lint — bun lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rimraf dist .turbo
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.
  • Resolve lint, build, and test failures across voice, workspace, library, and composio.
  • Add first-class transport, auth, versioning, and BYOK support across all integrations.
  • Add AI provider ranking system with ranking-driven model selection.
  • Add full i18n support across all 10 packages (en/fr/es, 460 keys).

Notes

Use ./generators/marketing-copy for strictly parsed, review-required drafts across ads, blogs, landing pages, LinkedIn and X. It requires an explicit qualified LLM, brand revision, brief and clock; it has no silent fallback to fabricated output.

Use ./media/workflow for durable asynchronous generation with explicit authority, idempotent cost reservation, storage, provider and asset-import ports. It persists provider job IDs before importing assets and can resume after import failure. An uncertain submission without a job ID remains unresolved and is not resubmitted.

./generators/marketing-plan provides durable goal-to-plan generation. It reserves a request ID before inference, validates suggested inputs against registered operation schemas, derives approval requirements from those contracts, and never executes suggested work. Hosts authorize inference cost, sanitize knowledge, validate referenced resources and own proposal storage. Missing prerequisites become reviewable questions.

  • Generator interface is shared across media libs (image-gen, voice, video-gen); keep it stable.
  • i18n keys must stay in sync with consuming packages.

media/rights provides ContentRightsService for scoped asset/likeness/voice/music/paid amplification permissions. The service authorizes grant, use, revocation and withdrawal actions through host policy. Revocation atomically queues existing uses for withdrawal and blocks future registration. Host execution must recheck current rights immediately before provider use; registration alone is not a publishing mandate.

media/withdrawal provides ContentWithdrawalWorker. It authorizes removal, persists a claim before the first provider call, and uses read-only reconciliation thereafter. Missing or ambiguous receipts remain unknown. Confirmed/unavailable outcomes require evidence and update the registered use atomically. Provider adapters must independently verify publication ownership and current removal authority.

The native X withdrawal integration test exercises the complete rights-to-removal path through SQL claims, a lost DELETE response and read-only absence confirmation. No second DELETE is sent. Native HTTP responses remain simulated pending account qualification.

Call assertRegisteredUse immediately before provider use to re-read the current grant and withdrawal state. A previously registered use is rejected after revocation. The check supplements, rather than grants, publication/generation authority; it is not a lease over a later external request.

MediaGenerationWorkflow persists each completed output import immediately. Running jobs may expose a partial ordered artifactRefs prefix after later ingestion fails. Recovery reuses the idempotent ingestor and rejects changed artifact identities without issuing another paid generation.

Completed provider output cardinality is persisted before ingestion. Later polling cannot shrink or expand that set; partial imports cannot become falsely complete because an output disappears from a response.

Media workflow callbacks receive isolated request/generation snapshots. Returned persisted generation records are parsed before use, and mutations by authorization/provider/storage adapters cannot alter the approved request or in-flight job identity.

Use MediaGenerationWorkflow.get for authorized persisted status and partial artifact inspection without provider calls. Use refresh only when explicitly reconciling provider progress and ingesting completed outputs.

Declared capabilities.

Lib Content Gen

AI-powered content generation for blog, email, and social

Use it to

  • Adopt ai-powered content generation for blog, email, and social

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/lib.content-gen package constraints do not match the target runtime or platform.

@lssm-tech/lib.content-gen

@lssm-tech/lib.content-gen/content-gen.feature

@lssm-tech/lib.content-gen/generators

@lssm-tech/lib.content-gen/generators/blog

@lssm-tech/lib.content-gen/generators/email

@lssm-tech/lib.content-gen/generators/landing-page

@lssm-tech/lib.content-gen/generators/social

@lssm-tech/lib.content-gen/geo

@lssm-tech/lib.content-gen/geo/optimizer

@lssm-tech/lib.content-gen/geographic

@lssm-tech/lib.content-gen/geographic/optimizer

@lssm-tech/lib.content-gen/i18n

Imports and export paths.

32 entries

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

32 imports

Dependencies and related packages.

Runtime dependencies 8
zod
catalog:
Development dependencies 3
typescript
catalog:

Package scripts.

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

publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
publish:pkg:canarybun publish:pkg --tag canary
buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
devcontractspec-bun-build dev
cleanrimraf dist .turbo
lintbun lint:fix
lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
lint:checknode ../../../../scripts/biome.cjs check .
testbun test --pass-with-no-tests
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
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.