Skip to content
ContractSpec
Start here

Package manual · integrations

·Intelligence, research and applications

integration.job-application-managed-runtime

Managed PostgreSQL and AuthOS composition for candidate-private job applications.

integrationsintegrationv2.0.4experimentalservernode
@lssm-tech/integration.job-application-managed-runtime
bun add @lssm-tech/integration.job-application-managed-runtime
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Managed PostgreSQL, AuthOS, fresh-authority, operation composition, and replayable outbox streaming for the candidate-private job-application bounded context.

The integration composes the provider-free @lssm-tech/lib.job-application-runtime/headless surface directly, preserving the library-to-integration dependency direction without a module dependency.

The default control posture is fail closed: the global mutation switch is enabled and external effects and exports are disabled until a deployment supplies qualified adapters and explicit controls.

packetBindingEnabled (env JOB_APPLICATION_PACKET_BINDING_ENABLED, default disabled) passes the resource service as the exact packet source; disabled keeps the legacy submit digest. Without injected adapters, submits are recorded as a disabled non-effect refusal.

profileInterview (TAFIO-FC-01s) is the brand host's interview configuration: consentRevision (required, non-empty), the model port (prompt, tone, locale), an optional emit stream sink. createManagedJobApplicationProfileInterviewDepsV1 composes the store, facts view, single writer and value correction per request, bound to the request scope, only when both profileInterview and profileEvidenceKey are present; otherwise every job-application.profile.interview.* operation returns JOB_APPLICATION_OPERATION_UNSUPPORTED. The API and MCP hosts pass it only when the brand host supplies a consent revision and a model; there are no defaults here (D-117).

Current execution capability (candidate)

createManagedJobApplicationCurrentEffectV1 reuses native candidate stores, packet bindings, durable queue claims and immutable reservations. Before each prepare/claim/tool callback it checks exact current mandate, approval, answers, packet, destination, provider, lease/fence and fresh AuthOS candidate_execute. Native locks remain held until the actual callback settles. A deadline signal covers the current lease, mandate and authority expiry; adapters must propagate it and bound uninterruptible operations. An aborted or lost effect remains ambiguous; this guard never retries or creates another reservation.

The queue helper landed as job-application-store migration 0039_hold_current_work_effect.sql (allocated 0039, D-239; formerly src/current-effect-queue.sql here); this package does not apply it. It grants a narrow security-definer helper over the existing queue instead of granting workers direct table reads. Factory readiness refuses when the SQL helper is absent. The host execution port has no default: it must hold the canonical workorder, budget and consent binding through the callback, on the SAME native candidate transaction supplied as the required fifth argument. Authority's execution_binding candidate owns that implementation; Shared must integrate and qualify it.

Review followup: nested calls use request-local ALS frames with exact packet pins, fresh native/host checks, inherited cancellation/deadline and no lock reacquisition. Descendants settle inside the host callback; failed children prevent parent success. The authority-owned candidate_profile_execution_guard() SQL proposal takes EXCLUSIVE on the existing candidate erasure key FIRST, before application/input/queue locks, excluding native concurrent fact/invalidation writes without an upgrade. Readiness requires both narrow SQL helpers. No proposed migration is applied here.

Relationships

THIS PACKAGEintegration.job-application-managed-runtime24 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

10 declarations

Declared capabilities

Integration Job Application Managed Runtime

Managed PostgreSQL and AuthOS composition for candidate-private job applications.

Scripts

  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • cleanrimraf dist .turbo
  • lint:checknode ../../../scripts/biome.cjs check .
  • testbun test
  • typechecktsgo --noEmit