@siax-integrations/app-adapter (0.2.0)
Installation
@siax-integrations:registry=https://git.siax.io/api/packages/sax3l/npm/npm install @siax-integrations/app-adapter@0.2.0"@siax-integrations/app-adapter": "0.2.0"About this package
@siax-integrations/app-adapter
The generic runtime code for applications whose package definitions live in
sax3l/siax-app-catalog (HSP-005).
This is not the IntegrationAdapter contract (packages/core). That one
describes how SIAX talks to an upstream someone else already runs. This one
describes how SIAX stands up and operates an application on a customer's
behalf — install, configure, health, readiness, backup, restore, upgrade,
rollback, schema, teardown.
Full rationale, provenance and known gaps:
docs/APPLICATION_ADAPTER.md.
Using it
import {
defaultApplicationAdapterRegistry,
FetchHttpClient,
NodeHostFiles,
SystemClock,
} from "@siax-integrations/app-adapter";
const registry = defaultApplicationAdapterRegistry({
containers: myContainerRuntime, // see "Supplying a container runtime"
http: new FetchHttpClient(),
clock: new SystemClock(),
files: new NodeHostFiles(),
});
// `manifest.id` comes straight from the catalog package definition.
const resolution = registry.resolve(manifest.id);
if (resolution.status === "wired") {
const instance = await resolution.adapter.install({
namespace: `tenant-${tenantId}`,
credentials, // required; never defaulted
settings: { siteName, fromEmail }, // consumed by the profile's configure steps
});
}
resolve() has three outcomes, not two:
wired— a real adapter;unwired— a catalogued application this repo deliberately has no adapter for, with concrete blockers and citations (EspoCRM today);unknown— an id nothing in the estate knows about.
Adding an application
- Add the package definition in
sax3l/siax-app-catalog(apps/<id>/manifest.json). - Add one
ApplicationProfiledocument here and list it inBUNDLED_PROFILES.
No consumer code changes. That is HSP-005-T01, and
tests/catalog-onboarding.test.ts proves it by onboarding a brand-new
application through a consumer function the test never edits.
Supplying a container runtime
This package defines the ContainerRuntime port but ships no implementation —
sax3l/vibe's src/adapters/docker/docker-orchestrator.ts already is one, and
its method surface matches the port one-for-one by construction. See the
"Follow-up" section of docs/APPLICATION_ADAPTER.md.
Tests
npm test from the repository root, or npx vitest run packages/app-adapter/tests.
The suite drives the real adapter against a simulated runtime. That proves the
procedure — right commands, right container, right order, loud failure on a
failed step. It does not prove any application behaves, and readiness.ts
enforces that distinction: evidence tagged environment: "simulated" can never
exceed ready_for_staging.
Dependencies
Dependencies
| ID | Version |
|---|---|
| @siax-integrations/core | 0.2.0 |
Development Dependencies
| ID | Version |
|---|---|
| @types/node | ^26.1.0 |
| typescript | ^7.0.0 |
| vitest | ^5.0.0 |