# @lssm-tech/lib.billing-runtime

Pure backend-neutral BillingOS runtime helpers for deterministic quote-to-cash lifecycle projections.

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `2.0.4`
- Package path: `packages/domains/billing/runtime`
- Manifest path: `packages/domains/billing/runtime/package.json`
- Manifest Git blob: `5f5dd1a8955571214baec1a90ced1a31dff563ab`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/lib.billing-runtime](https://lssm.co/docs/packages/lib.billing-runtime/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.billing-runtime.txt)

## Package metadata

```json
{
  "layer": "domains",
  "physicalArea": "billing",
  "primaryArea": "billing-and-finance",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "runtime",
    "catalogKind": "library",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "experimental"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: not declared; publication is not verified.

Primary area: [Billing, finance and economic evidence](https://lssm.co/docs/areas/billing-and-finance/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/domains/billing/runtime/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/README.md",
  "blobSha": "6e0515974ec85bf399f8739591abc3715df2534e",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# `@lssm-tech/lib.billing-runtime`

Pure, backend-neutral BillingOS runtime helpers over `@lssm-tech/lib.billing-spec`.

France readiness metadata is not PA accreditation, production PA submission, legal advice, or tax advice.

## Runtime helpers

`@lssm-tech/lib.billing-runtime` provides pure helper engines over `@lssm-tech/lib.billing-spec`:

- quote/order/invoice/payment/reconciliation lifecycle projections;
- deterministic pricing totals with an injected synchronous tax-calculation port;
- local workflow event creation/appending;
- payment-state reconciliation hints;
- draft accounting export shaping;
- deterministic quote-to-cash cockpit projections with lifecycle, approval-packet, surface, and finance-review handoff metadata; and
- agent planning guards that produce approval packets instead of executing high-impact billing actions.

The package performs no network calls, filesystem access, provider SDK calls, credential handling, persistence writes, PA submission, or autonomous production billing execution.

## BillingOS truth and FinanceOS handoff

The additive `./truth` surface projects normalized billing facts into the
append-only economic-evidence lifecycle, provides a tenant-isolated in-memory
reference store with revision and idempotency guards, records superseding
corrections without deleting history, and validates balanced, company-scoped
posting handoffs. A posting handoff remains a proposal until an explicit
ContractSpec Connect authorization reference is supplied.

## Persistence ports (additive)

Backend-neutral port interfaces that a host implements against its store; the package defines the contracts, never the adapters:

- `InvoiceRepositoryPort` — persist and read issued invoices.
- `EventLogAppendPort` — append-only billing workflow event log.
- `InvoiceChainAppendPort` — append entries to the per-period invoice hash-chain.
- `CreditNoteRepositoryPort` — persist and read credit notes (avoir).

## Observability (additive)

- `BillingObservabilityPort` — structured, correlation-id-propagating observability hook for issuance and submission.
- Field-level redaction of SIREN/SIRET/VAT identifiers, secrets, and amounts so no sensitive payload is logged; redaction is applied before any sink receives the record.

## Service agreements (`./service-agreement`, additive)

Pure engines and host ports for `@lssm-tech/lib.billing-spec/service-agreement`:

- `recordServiceUsage` / `correctServiceUsage` over `ServiceUsageLedgerPort`:
  atomic usage + outbox + work-completion transaction; identical replay returns
  the stored receipt, a changed payload conflicts, corrections supersede the
  current head without deleting history.
- `recordMeteredServiceUsage` over `ServicePriceTablePort` and
  `MeteredServiceUsageStorePort`: meters one platform service call exactly
  once per tenant and usage ref, rated by `selectServicePriceVersion` /
  `rateServiceUsage` against the version effective at the occurrence. It never
  guesses a price: the call is `unpriced` until the owner sets one. An
  optional `MeteredServiceBillingPort` appends the call to the service usage
  ledger through `recordServiceUsage` when the tenant's agreement sells the
  meter; a replay returns the stored receipt and a changed payload conflicts.
  `occurredAt` is metadata: the first recorded occurrence wins, and a retry
  after a crash that left the call in the ledger only adopts that ledger event.
  The bound ledger must scope event ids (`usage:<usageRef>`) by tenant.
  `toMeterServiceUsageOutput` projects a result onto the
  `billing.service.usage.meter` output; the host emits its
  `billing.service.usage.metered` audit record.
  `InMemoryServicePriceTable` and `InMemoryMeteredServiceUsageStore` are the
  reference adapters.
- `computeServiceInvoiceDraft`: deterministic, digest-bound drafts per cadence
  period with frozen price editions; late usage and post-issue corrections
  become adjustment or credit lines for the earlier period instead of
  rewriting issued invoices; BYOK never yields passthrough.
- `reserveServiceCapacity` / `settleServiceReservation` / `resumeServiceBudget`
  over a compare-and-set `ServiceBudgetStorePort`: allowance, approved overage
  ceiling, bounded grace and pause, plus a separate internal provider budget.
- `buildOnPremUsageBatch` / `importOnPremUsageBatch`: signed digest-only batches
  with replay, gap, fork, instance-change, key-rotation and clock checks.
- `submitServiceInvoiceOnce` / `issueServiceInvoice` / `applyServicePaymentEvent`:
  approved, exactly-once submission (unique per tenant and merchant), approved
  issue, and idempotent, order-safe payment evidence.
- `openServiceCollection` / `issueStoredServiceInvoice` /
  `receiveServicePaymentEvent` over `ServiceCollectionStorePort`: collection
  state per invoice under a row lock; a verified webhook is stored once per
  merchant and provider event id (redelivery is a duplicate, a changed payload
  conflicts), and events that arrive before issuance are held and applied at
  issuance.
- `requireServiceApproval`: consequential actions verify an
  `OperationApprovalReceipt` through the host's `OperationApprovalPort`
  (subject, operation key/version, input digest, consumed nonce). A
  caller-supplied decision string is never authority; with no port bound the
  action fails closed.

In-memory reference adapters mirror the required host semantics for tests; they
are not durable storage. Hosts bind the ports to their database.


## Declared capabilities

### Lib Billing Runtime

Capability ID: `package.lssm.tech.lib.billing.runtime`

Pure backend-neutral BillingOS runtime helpers for deterministic quote-to-cash lifecycle projections.

Use cases:

- Adopt pure backend-neutral billingos runtime helpers for deterministic quote-to-cash lifecycle projections

Constraints:

```json
{
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "avoidWhen": [
    "The @lssm-tech/lib.billing-runtime package constraints do not match the target runtime or platform."
  ],
  "requires": [
    "TypeScript"
  ]
}
```

Other capability declarations:

```json
{
  "status": "active",
  "aliases": [
    "lib",
    "billing",
    "runtime"
  ],
  "pythonEquivalents": [],
  "alternatives": [],
  "relationships": [],
  "resolutionPriority": 50
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/lib.billing-runtime",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/fixtures",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/fixtures-rich",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/observability",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/observability/correlation",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/observability/instrumentation-port",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/observability/redaction",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/ports",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/ports/credit-note-repository-port",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/ports/event-log-append-port",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/ports/invoice-chain-append-port",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.billing-runtime/ports/invoice-repository-port",
    "symbols": []
  }
]
```

## Catalogue metadata

```json
{
  "family": "runtime",
  "kind": "library",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "experimental",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./fixtures",
    "./fixtures-rich",
    "./observability",
    "./observability/correlation",
    "./observability/instrumentation-port",
    "./observability/redaction",
    "./ports",
    "./ports/credit-note-repository-port",
    "./ports/event-log-append-port",
    "./ports/invoice-chain-append-port",
    "./ports/invoice-repository-port",
    "./ports/search-customers-memory",
    "./ports/search-sellable-items-memory",
    "./runtime",
    "./service-agreement",
    "./tax/aggregate-tax-breakdown",
    "./truth",
    "./truth/economic-ledger",
    "./truth/finance-handoff",
    "./truth/store"
  ],
  "examples": [],
  "replacements": []
}
```

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/fixtures",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/fixtures-rich",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/observability",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/observability/correlation",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/observability/instrumentation-port",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/observability/redaction",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/ports",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/ports/credit-note-repository-port",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/ports/event-log-append-port",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/ports/invoice-chain-append-port",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.billing.runtime",
    "from": "@lssm-tech/lib.billing-runtime/ports/invoice-repository-port",
    "symbols": []
  }
]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

- `@lssm-tech/lib.billing-runtime` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/index.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/fixtures` — subpath `./fixtures`
  - `unconditional`: `./src/fixtures.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/fixtures.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/fixtures-rich` — subpath `./fixtures-rich`
  - `unconditional`: `./src/fixtures-rich.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/fixtures-rich.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/observability` — subpath `./observability`
  - `unconditional`: `./src/observability/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/observability/index.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/observability/correlation` — subpath `./observability/correlation`
  - `unconditional`: `./src/observability/correlation.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/observability/correlation.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/observability/instrumentation-port` — subpath `./observability/instrumentation-port`
  - `unconditional`: `./src/observability/instrumentation-port.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/observability/instrumentation-port.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/observability/redaction` — subpath `./observability/redaction`
  - `unconditional`: `./src/observability/redaction.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/observability/redaction.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/ports` — subpath `./ports`
  - `unconditional`: `./src/ports/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/ports/index.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/ports/credit-note-repository-port` — subpath `./ports/credit-note-repository-port`
  - `unconditional`: `./src/ports/credit-note-repository-port.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/ports/credit-note-repository-port.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/ports/event-log-append-port` — subpath `./ports/event-log-append-port`
  - `unconditional`: `./src/ports/event-log-append-port.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/ports/event-log-append-port.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/ports/invoice-chain-append-port` — subpath `./ports/invoice-chain-append-port`
  - `unconditional`: `./src/ports/invoice-chain-append-port.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/ports/invoice-chain-append-port.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/ports/invoice-repository-port` — subpath `./ports/invoice-repository-port`
  - `unconditional`: `./src/ports/invoice-repository-port.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/ports/invoice-repository-port.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/ports/search-customers-memory` — subpath `./ports/search-customers-memory`
  - `unconditional`: `./src/ports/search-customers-memory.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/ports/search-customers-memory.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/ports/search-sellable-items-memory` — subpath `./ports/search-sellable-items-memory`
  - `unconditional`: `./src/ports/search-sellable-items-memory.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/ports/search-sellable-items-memory.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/runtime` — subpath `./runtime`
  - `unconditional`: `./src/runtime.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/runtime.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/service-agreement` — subpath `./service-agreement`
  - `unconditional`: `./src/service-agreement/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/service-agreement/index.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/tax/aggregate-tax-breakdown` — subpath `./tax/aggregate-tax-breakdown`
  - `unconditional`: `./src/tax/aggregate-tax-breakdown.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/tax/aggregate-tax-breakdown.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/truth` — subpath `./truth`
  - `unconditional`: `./src/truth/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/truth/index.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/truth/economic-ledger` — subpath `./truth/economic-ledger`
  - `unconditional`: `./src/truth/economic-ledger.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/truth/economic-ledger.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/truth/finance-handoff` — subpath `./truth/finance-handoff`
  - `unconditional`: `./src/truth/finance-handoff.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/truth/finance-handoff.ts); verified source file.

- `@lssm-tech/lib.billing-runtime/truth/store` — subpath `./truth/store`
  - `unconditional`: `./src/truth/store.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/billing/runtime/src/truth/store.ts); verified source file.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": "./dist/index.d.ts",
  "files": [
    "dist",
    "README.md"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    },
    "./fixtures": {
      "types": "./dist/fixtures.d.ts",
      "browser": "./dist/browser/fixtures.js",
      "bun": "./dist/fixtures.js",
      "node": "./dist/node/fixtures.js",
      "default": "./dist/fixtures.js"
    },
    "./fixtures-rich": {
      "types": "./dist/fixtures-rich.d.ts",
      "browser": "./dist/browser/fixtures-rich.js",
      "bun": "./dist/fixtures-rich.js",
      "node": "./dist/node/fixtures-rich.js",
      "default": "./dist/fixtures-rich.js"
    },
    "./observability": {
      "types": "./dist/observability/index.d.ts",
      "browser": "./dist/browser/observability/index.js",
      "bun": "./dist/observability/index.js",
      "node": "./dist/node/observability/index.js",
      "default": "./dist/observability/index.js"
    },
    "./observability/correlation": {
      "types": "./dist/observability/correlation.d.ts",
      "browser": "./dist/browser/observability/correlation.js",
      "bun": "./dist/observability/correlation.js",
      "node": "./dist/node/observability/correlation.js",
      "default": "./dist/observability/correlation.js"
    },
    "./observability/instrumentation-port": {
      "types": "./dist/observability/instrumentation-port.d.ts",
      "browser": "./dist/browser/observability/instrumentation-port.js",
      "bun": "./dist/observability/instrumentation-port.js",
      "node": "./dist/node/observability/instrumentation-port.js",
      "default": "./dist/observability/instrumentation-port.js"
    },
    "./observability/redaction": {
      "types": "./dist/observability/redaction.d.ts",
      "browser": "./dist/browser/observability/redaction.js",
      "bun": "./dist/observability/redaction.js",
      "node": "./dist/node/observability/redaction.js",
      "default": "./dist/observability/redaction.js"
    },
    "./ports": {
      "types": "./dist/ports/index.d.ts",
      "browser": "./dist/browser/ports/index.js",
      "bun": "./dist/ports/index.js",
      "node": "./dist/node/ports/index.js",
      "default": "./dist/ports/index.js"
    },
    "./ports/credit-note-repository-port": {
      "types": "./dist/ports/credit-note-repository-port.d.ts",
      "browser": "./dist/browser/ports/credit-note-repository-port.js",
      "bun": "./dist/ports/credit-note-repository-port.js",
      "node": "./dist/node/ports/credit-note-repository-port.js",
      "default": "./dist/ports/credit-note-repository-port.js"
    },
    "./ports/event-log-append-port": {
      "types": "./dist/ports/event-log-append-port.d.ts",
      "browser": "./dist/browser/ports/event-log-append-port.js",
      "bun": "./dist/ports/event-log-append-port.js",
      "node": "./dist/node/ports/event-log-append-port.js",
      "default": "./dist/ports/event-log-append-port.js"
    },
    "./ports/invoice-chain-append-port": {
      "types": "./dist/ports/invoice-chain-append-port.d.ts",
      "browser": "./dist/browser/ports/invoice-chain-append-port.js",
      "bun": "./dist/ports/invoice-chain-append-port.js",
      "node": "./dist/node/ports/invoice-chain-append-port.js",
      "default": "./dist/ports/invoice-chain-append-port.js"
    },
    "./ports/invoice-repository-port": {
      "types": "./dist/ports/invoice-repository-port.d.ts",
      "browser": "./dist/browser/ports/invoice-repository-port.js",
      "bun": "./dist/ports/invoice-repository-port.js",
      "node": "./dist/node/ports/invoice-repository-port.js",
      "default": "./dist/ports/invoice-repository-port.js"
    },
    "./ports/search-customers-memory": {
      "types": "./dist/ports/search-customers-memory.d.ts",
      "browser": "./dist/browser/ports/search-customers-memory.js",
      "bun": "./dist/ports/search-customers-memory.js",
      "node": "./dist/node/ports/search-customers-memory.js",
      "default": "./dist/ports/search-customers-memory.js"
    },
    "./ports/search-sellable-items-memory": {
      "types": "./dist/ports/search-sellable-items-memory.d.ts",
      "browser": "./dist/browser/ports/search-sellable-items-memory.js",
      "bun": "./dist/ports/search-sellable-items-memory.js",
      "node": "./dist/node/ports/search-sellable-items-memory.js",
      "default": "./dist/ports/search-sellable-items-memory.js"
    },
    "./service-agreement": {
      "types": "./dist/service-agreement/index.d.ts",
      "browser": "./dist/browser/service-agreement/index.js",
      "bun": "./dist/service-agreement/index.js",
      "node": "./dist/node/service-agreement/index.js",
      "default": "./dist/service-agreement/index.js"
    },
    "./runtime": {
      "types": "./dist/runtime.d.ts",
      "browser": "./dist/browser/runtime.js",
      "bun": "./dist/runtime.js",
      "node": "./dist/node/runtime.js",
      "default": "./dist/runtime.js"
    },
    "./tax/aggregate-tax-breakdown": {
      "types": "./dist/tax/aggregate-tax-breakdown.d.ts",
      "browser": "./dist/browser/tax/aggregate-tax-breakdown.js",
      "bun": "./dist/tax/aggregate-tax-breakdown.js",
      "node": "./dist/node/tax/aggregate-tax-breakdown.js",
      "default": "./dist/tax/aggregate-tax-breakdown.js"
    },
    "./truth": {
      "types": "./dist/truth/index.d.ts",
      "browser": "./dist/browser/truth/index.js",
      "bun": "./dist/truth/index.js",
      "node": "./dist/node/truth/index.js",
      "default": "./dist/truth/index.js"
    },
    "./truth/economic-ledger": {
      "types": "./dist/truth/economic-ledger.d.ts",
      "browser": "./dist/browser/truth/economic-ledger.js",
      "bun": "./dist/truth/economic-ledger.js",
      "node": "./dist/node/truth/economic-ledger.js",
      "default": "./dist/truth/economic-ledger.js"
    },
    "./truth/finance-handoff": {
      "types": "./dist/truth/finance-handoff.d.ts",
      "browser": "./dist/browser/truth/finance-handoff.js",
      "bun": "./dist/truth/finance-handoff.js",
      "node": "./dist/node/truth/finance-handoff.js",
      "default": "./dist/truth/finance-handoff.js"
    },
    "./truth/store": {
      "types": "./dist/truth/store.d.ts",
      "browser": "./dist/browser/truth/store.js",
      "bun": "./dist/truth/store.js",
      "node": "./dist/node/truth/store.js",
      "default": "./dist/truth/store.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/lib.billing-spec](https://lssm.co/docs/packages/lib.billing-spec/): `workspace:^`
- [@lssm-tech/lib.contracts-spec-core](https://lssm.co/docs/packages/lib.contracts-spec-core/): `workspace:^`
- [@lssm-tech/lib.economic-evidence](https://lssm.co/docs/packages/lib.economic-evidence/): `workspace:^`

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.bun](https://lssm.co/docs/packages/tool.bun/): `workspace:*`
- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `typescript`: `catalog:`

### Peer dependency metadata

```json
{}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
  "publish:pkg:canary": "bun publish:pkg --tag canary",
  "build": "contractspec-bun-build build",
  "build:bundle": "contractspec-bun-build transpile",
  "build:types": "contractspec-bun-build types",
  "dev": "contractspec-bun-build dev",
  "clean": "rimraf dist .turbo",
  "lint": "bun lint:fix",
  "lint:fix": "node ../../../../scripts/biome.cjs check --write .",
  "lint:check": "node ../../../../scripts/biome.cjs check .",
  "test": "bun test",
  "prebuild": "contractspec-bun-build prebuild",
  "typecheck": "tsgo --noEmit"
}
```

## Declared documentation links

- [Lib Billing Runtime documentation](https://www.npmjs.com/package/%40lssm-tech%2Flib.billing-runtime) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Flib.billing-runtime",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/lib.billing-runtime.txt",
  "route": "/llms/lib.billing-runtime",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.billing-runtime.txt",
  "blobSha": "6e0515974ec85bf399f8739591abc3715df2534e",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
