libraryPackage manifestv5.0.4

lib.workflow-composer

Tenant-aware workflow composition helpers for ContractSpec.

@lssm-tech/lib.workflow-composer
Source, release and verification context

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

Package source ↗ Manifest ↗
serverbrowsernodebunbrowser
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.workflow-composerplatform

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

8 déclarations · les 6 premières affichéesSELECT TO INSPECT

@lssm-tech/lib.workflow-composer

Website: https://contractspec.io

Workflow context, SLA monitoring and SDK error conversion are available through ./workflow/context, ./workflow/sla-monitor and ./workflow/workflow-sdk. ./operation-contracts/registry.workflow exposes the original frozen workflow operation partial. Historical ContractSpec imports forward to these exact implementations. Context accessors, timing defaults, event ordering and SDK error constructor injection are preserved. Private context partitions keep the original state identity and complete method bodies.

Workflow validation execution is available through ./workflow/validation, ./workflow/validation-workflow-devkit, and ./shared-entities/task-validators. These canonical leaves retain the complete original checks, error class, defaults, and nominal registry options. Operation options use the full RuntimeCore host registry; Form, Event, Capability, and Workflow registries retain their canonical class identities. Legacy validation imports forward to these exact implementations. This Source move remains conditional on the accepted RuntimeCore, Forms, and SurfaceRuntime supplier union and its remaining package return paths. All composition source imports now use canonical Core and OrchestrationSpec leaves or the local validator. The Composer dependency on Legacy is removed; the real AI provider selector and complete nominal registry dependencies remain.

Tenant-aware workflow composition helpers for ContractSpec.

What It Provides

  • Couche: lib.
  • Consumers: bundles.
  • Related ContractSpec packages include @lssm-tech/lib.ai-providers, @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-spec, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.

Installation

npm install @lssm-tech/lib.workflow-composer

or

bun add @lssm-tech/lib.workflow-composer

Usage

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

Workflow composition is deterministic by default:

  • Extensions are applied in stable priority order.
  • Duplicate injected step ids and invalid anchor combinations are rejected.
  • Hidden-step overlays are validated so they cannot orphan the remaining graph.
  • Extension metadata and annotations are merged into the composed workflow output.

Architecture

  • src/composer.test.ts is part of the package's public or composition surface.
  • src/composer.ts is part of the package's public or composition surface.
  • src/index.ts is the root public barrel and package entrypoint.
  • src/injector.ts is part of the package's public or composition surface.
  • src/merger.ts is part of the package's public or composition surface.
  • src/templates.ts 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.

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.
  • Add AI provider ranking system with ranking-driven model selection.
  • Upgrade dependencies.

Notes

  • Workflow composition must stay tenant-isolated — no cross-tenant data leakage.
  • Depends on contracts-spec — keep aligned with contract definitions.

The additive ./workflow-registry entry owns the existing complete WorkflowRegistry class over Kernel SpecContractRegistry and canonical Orchestration WorkflowSpec. Historical ContractSpec exports forward to the same constructor; registration, lookup and defaults retain their original semantics. Other composition/provider dependencies remain declared by this package.

Canonical workflow execution is available from ./workflow/runner, ./workflow/state, ./workflow/dag-utils, ./workflow/expression, and ./workflow/adapters (including its three adapter leaves). These leaves own the complete original runner and its two error classes, state contracts and persistence implementations. Historical imports forward to the same classes. The runner retains full host DTOs and supplied callback authority, timer and ID defaults, retries, timeout behavior and event order. createFileStateStore (./workflow/adapters/file-adapter) keeps every state in one JSON file: writers hold a <file>.lock lockfile (one breaker at a time removes a stale lock), each write is a flushed temp file atomically renamed over the target, writes and lock-free reads retry Windows sharing violations until a deadline, and every read validates the document and fails closed with a FileStateStoreError (corrupt_state, invalid_state, io_contention, lock_timeout, ...). Other file-system errors, such as a missing directory or a lock file the directory refuses to create, propagate unchanged; outside Windows, EPERM and EACCES are never retried. A writer whose lock token write fails removes that lock before rethrowing. It needs the fs/promises builtin and looks it up on first use through process.getBuiltinModule (Node 20.16+, 22.3+ or Bun). It imports no builtin, statically or dynamically, so the neutral and browser outputs carry no node: specifier and web bundlers (webpack 5 included) build them; on a host without getBuiltinModule (a browser, an older Node) the first call fails with unsupported_host. No provider runtime or persistence dependency is added. Source qualification still requires the accepted host supplier union, unchanged original tests and Root adoption/affected-consumer checks. The original runner is now divided into private execution modules while retaining one public nominal class and all eight public async method bodies. Every runner and test module stays within 250 lines; generic helpers and fixtures stay within 100 lines. All 25 original test calls remain intact, registered in their original order through the existing test entrypoint. The synchronous DAG setup shares the original state and status-map identities. No await site, callback, timer default or policy choice is added or removed. Private modules are included in neutral build entries and the existing dist package closure; no additional public export or dependency is introduced. Promise settlement, compiler and affected-consumer qualification remain with Root’s bounded verification lane.

Canonical workflow operation contracts are available through the explicit ./operation-contracts family. Existing contracts-spec subpaths preserve the same contract objects and nominal registry types. These exports do not execute workflows, fetch benchmarks or run paid evaluations.

Declared capabilities.

Lib Workflow Composer

Tenant-aware workflow composition helpers for ContractSpec.

Use it to

  • Adopt tenant-aware workflow composition helpers for contractspec

Requires

  • TypeScript

Choose another boundary when

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

@lssm-tech/lib.workflow-composer

@lssm-tech/lib.workflow-composer/workflow-registryWorkflowRegistry

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowActivate.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowCreate.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowDeactivate.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowRunCancel.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowRunDispatch.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowRunPause.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowRunResume.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowRunRetry.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowStepAdvance.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowStepSkip.command

@lssm-tech/lib.workflow-composer/operation-contracts/commands/workflowUpdate.command

@lssm-tech/lib.workflow-composer/operation-contracts/constants

@lssm-tech/lib.workflow-composer/operation-contracts

@lssm-tech/lib.workflow-composer/operation-contracts/queries/workflowGet.query

@lssm-tech/lib.workflow-composer/operation-contracts/queries/workflowList.query

@lssm-tech/lib.workflow-composer/operation-contracts/queries/workflowRunnerHealth.query

Portable supplied-authority workflow execution

Complete WorkflowRunner, state, DAG, expression and supplied persistence adapters with unchanged callback authority and defaults.

Use it to

  • Execute versioned workflows through supplied state, operation, guard and event callbacks

Requires

  • Supply operation execution and state persistence callbacks.

Choose another boundary when

  • A provider-specific workflow scheduler or persistence engine is required.

@lssm-tech/lib.workflow-composer/workflow/runnerWorkflowRunner, WorkflowRunnerConfig, WorkflowPreFlightError, WorkflowExecutionError

@lssm-tech/lib.workflow-composer/workflow/stateWorkflowState, StateStore

Imports and export paths.

33 entries

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

33 imports

Dependencies and related packages.

Runtime dependencies 8
compare-versions
catalog:data
Development dependencies 4
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
Votre vue

Make room for your context.

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

Votre contexte

The different parts of you

Choose a starting point

Un mélange utile de contexte, de visuels et de guidage discret.

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

Confort de lecture

Choisir votre langue

La langue de l’interface change uniquement le texte. Les marchés, les prix et les parcours conservent leurs propres paramètres.

Couverture des traductions

Une partie du contenu est affichée en anglais.

Navigation151
Graphe616
Catégories378
Portfolio833
Exemples2 035
Aperçu de la source1 542

D’autres traductions seront ajoutées à mesure que le contenu sera relu.

Cette préférence est enregistrée dans ce navigateur.

Rechercher sur le site

Des points de départ utiles

Aucun résultat. Essayez une expression plus courte, un nom d’opération ou un autre périmètre de recherche.

UN PEU DE PLACE POUR EXPLORER

Trouvez quelque chose à explorer.

Ouvrez un aperçu détaillé sur cette page, essayez une autre perspective ou suivez le détail vers sa propre page.

Fonctionnement des aperçus et des commandes
01

Regarder avant de partir

Survolez un lien ou sélectionnez-le avec Tab pour voir un aperçu. Cliquer sur le lien d’origine ou appuyer sur Entrée ouvre toujours sa destination.

02

Rester dans le contexte

Entrez dans l’aperçu pour explorer ses sections. Depuis un lien sélectionné, utilisez Alt + ↓ pour y entrer au clavier. Échap le ferme.

03

Ouvrir les possibilités

Les lignes dépliables, les choix de perspective et les commandes mises en évidence révèlent davantage. Votre vue adapte le confort de lecture et le contexte exploré.

Un bouton séparé pour voir de plus près

Affichez de petits boutons d’aperçu à côté des liens quand l’espace le permet. Touchez l’œil pour examiner ou le lien pour y aller directement. Ce choix reste dans cet onglet.

Aucun historique de navigation n’est collecté. La réduction des animations suit votre appareil et Votre vue.