lib.customer-support-spec
Provider-neutral SupportOS customer-support contract definitions: case, authority, operation, event, schema and feature specs extracted unchanged from ContractSpec compatibility.
@lssm-tech/lib.customer-support-specbun add @lssm-tech/lib.customer-support-specManifest declarations describe the current workspace; they do not verify registry publication or runtime execution.
Package guide
Canonical provider-neutral SupportOS customer-support contract definitions: case models and lifecycle rules, authority ports and errors, operation and event specs, input/output schemas, digests, DocBlocks and the CustomerSupportV1Feature.
The definitions were extracted unchanged from the ContractSpec compatibility distribution. Contract keys, versions, wire shapes and persisted meaning are unchanged. The legacy @lssm-tech/lib.contracts-spec/customer-support subpaths and the @lssm-tech/lib.customer-support-runtime contracts/*, authority-scope and CSAT leaves are forwards to these single implementations, so every export keeps one object identity.
Usage
import { supportOperations } from '@lssm-tech/lib.customer-support-spec/operations';
import { supportEvents } from '@lssm-tech/lib.customer-support-spec/events';
import type { SupportAuthorityPort } from '@lssm-tech/lib.customer-support-spec/ports';Every former @lssm-tech/lib.contracts-spec/customer-support/<leaf> subpath is available as @lssm-tech/lib.customer-support-spec/<leaf>; the root re-exports the same barrel.
Conversation actions and support resolution
./support-conversation-actions defines provider-neutral reply, note, assign, snooze, reopen and close actions with durable custody, approval and read-back reader ports. Outcomes are accepted (proven by a provider part), uncertain, not-executed, rejected or superseded; ./support-conversation-action-digest binds approvals to the exact provider-visible payload. Approval verdicts may name the signing principal, and SupportApprovalIdentityPort resolves that signer from approval evidence (it rejects when the evidence cannot be read). SupportResponderPrincipalPort maps a provider responder (an Intercom admin_id) to the principal ref signers carry, and isIndependentHumanApprover is the shared rule: a human signer equal to none of the excluded refs. Action ports refuse approval-authorized effects whose signer is not an independent human or whose responder is unmapped. In support-resolution-v1 a customer-visible action needs a human approver who matches the recorded approver and is neither the proposer nor the responder (compared as the responder's mapped principal when the host binds the mapping). ./support-resolution* defines the support-resolution-v1 workflow state, store/engineering ports and the support.resolution.* operations; replies never resolve an issue by themselves.
Boundaries
- Dependencies:
@lssm-tech/lib.contracts-spec-core,@lssm-tech/lib.schemaand@lssm-tech/lib.crypto-utilsonly. - No I/O, persistence, provider execution, ambient configuration or live authorization. Authority execution lives in the customer-support runtime, integrations and module.
- The platform-authority composition helpers (
composeSupportPlatformAuthority,SupportPlatformAuthorityPortand the binding registry) live in@lssm-tech/lib.customer-support-runtime/platform-authorityand itsplatform-authority-bindings/platform-authority-binding-registryentries. The legacycontracts-spec/customer-supportsurface forwards to that owner. ./authos-claim-projection(projectSupportAuthOsGrant) deterministically projects already signature-verified AuthOS claims into aSupportAuthOsGrantand fails closed on wrong audience, non-opaque identifiers or unknown principal/assurance pairs. JWKS/OIDC verification, issuer trust and live session checks stay in the host verifier (supportos-api)../live-chat-binding-activityis the internal binding-activity wire contract shared by CommunicationOS realtime (client) andsupportos-api(server): the route path and grant capability constants, the exact request builder (bound fields +supportCustomerLiveChatBindingActivityDigest), the strict request parser, the response builder (expiry = earlier of binding expiry andcheckedAt+ 60s) and the client freshness rule (exact keys,checkedAtwithin 60s and at most 5s ahead, expiry within 60s). Transport, grant issuance and body-size bounds stay in the hosts.- Split helper modules (
*-models,*-validation,operation-schemas-*) are private; their public symbols are re-exported by the owning leaf.
DocBlocks stay beside their contracts. The seeded document manifest generated from the compatibility package does not yet scan this package.
Relationships
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
3 declarations
@lssm-tech/lib.contracts-spec-coreworkspace:^
Read the package manual ↗@lssm-tech/lib.crypto-utilsworkspace:^
Read the package manual ↗@lssm-tech/lib.schemaworkspace:^
Read the package manual ↗
Declared capabilities
Canonical SupportOS case, authority port, operation, event, schema, DocBlock and feature definitions; the legacy @lssm-tech/lib.contracts-spec/customer-support subpaths and runtime contracts/* leaves forward to these same identities.
Scripts
buildcontractspec-bun-build buildbuild:bundlecontractspec-bun-build transpilebuild:typescontractspec-bun-build typesprebuildcontractspec-bun-build prebuildcleanrimraf dist .turbolint:checknode ../../../../scripts/biome.cjs check .typechecktsgo --noEmit -p tsconfig.check.jsontestbun test ./src