@ankhorage/contracts 15.0.0 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ankhorage/contracts
2
2
 
3
+ ## 16.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 5f7c17d: Require runtime desired state to carry the already resolved outputs available to portable workload output references.
8
+
3
9
  ## 15.0.0
4
10
 
5
11
  ### Major Changes
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # @ankhorage/contracts
5
5
 
6
- ![license: MIT](././paradox/badges/license.svg) ![npm: v14.0.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
6
+ ![license: MIT](././paradox/badges/license.svg) ![npm: v15.0.0](././paradox/badges/npm.svg) ![runtime: bun](././paradox/badges/runtime.svg) ![typescript: strict](././paradox/badges/typescript.svg) ![eslint: checked](././paradox/badges/eslint.svg) ![prettier: checked](././paradox/badges/prettier.svg) ![build: checked](././paradox/badges/build.svg) ![tests: checked](././paradox/badges/tests.svg) ![docs: paradox](././paradox/badges/docs.svg)
7
7
 
8
8
  Serializable app, action, theme, auth, and secret-store contracts for Ankhorage.
9
9
 
@@ -58,6 +58,8 @@ export interface InfraRuntimeDesiredState<P extends InfraRuntimeProviderId = Inf
58
58
  readonly selection: InfraRuntimeSelection<P>;
59
59
  readonly targets: readonly InfraComputeTarget[];
60
60
  readonly workloads: readonly InfraWorkloadSpec[];
61
+ /** Previously resolved outputs available to portable workload value references. */
62
+ readonly availableOutputs: readonly InfraOutput[];
61
63
  }
62
64
  export interface InfraRuntimeAdapter<P extends InfraRuntimeProviderId = InfraRuntimeProviderId> {
63
65
  readonly descriptor: InfraAdapterDescriptor<P>;
@@ -1 +1 @@
1
- {"version":3,"file":"infraAdapters.d.ts","sourceRoot":"","sources":["../../src/types/infraAdapters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,0GAA0G;AAC1G,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI;KAC7E,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG;QAC5C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,aAAa,CAAC,EAAE,CAAC;KACtF;CACF,CAAC,CAAC,CAAC,CAAC;AAEL,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC;CAC1C,GAAG,CACA;IAAE,QAAQ,CAAC,IAAI,EA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OAAO,EAAE,wBAAwB,CAAC,CAAC,CAAC,GACnC,OAAO,CAAC,WAAW,CAAC,SAAS,sBAAsB,EAAE,CAAC,CAAC,CAAC;CAC5D;AAED,iGAAiG;AACjG,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,sBAAsB,CAAC,UAAU,GAAG,QAAQ,GAAG,IAAI,GAAG,gBAAgB,CAAC,CAAC;IAC7F,iFAAiF;IACjF,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1E,SAAS,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,eAAe,EAAE,CAAC,CAAC,CAAC;IAC5F,qBAAqB,CACnB,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,WAAW,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAC,CAAC;IACtD,cAAc,CACZ,OAAO,EAAE,qBAAqB,EAC9B,cAAc,EAAE,SAAS,WAAW,EAAE,GACrC,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC9C,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAAC,CAAC;IAClG,YAAY,CACV,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC9C,YAAY,CAAC,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC;CAC3F"}
@@ -1 +1 @@
1
- {"version":3,"file":"infraAdapters.js","sourceRoot":"","sources":["../../src/types/infraAdapters.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppEnvironmentId } from '../environments';\nimport type { INFRA_ADAPTER_CATALOG } from '../infra/constants';\nimport type {\n InfraDestroyRequest,\n InfraGeneratedArtifact,\n InfraLedger,\n InfraOutput,\n InfraOwnedResource,\n InfraPlanAction,\n InfraResourceStatus,\n InfraResult,\n} from './infraLifecycle';\nimport type {\n InfraAdapterId,\n InfraComputeProviderId,\n InfraComputeSelection,\n InfraEnvironmentSpec,\n InfraRuntimeProviderId,\n InfraRuntimeSelection,\n} from './infraManifest';\nimport type { InfraControlPlaneCredentialRef, InfraSecretReference } from './infraSecrets';\nimport type { InfraWorkloadSpec } from './infraWorkload';\n\n/** Package exports must match this exact catalog entry; optional operations are advertised explicitly. */\nexport type InfraAdapterDescriptor<P extends InfraAdapterId = InfraAdapterId> = {\n [K in P]: (typeof INFRA_ADAPTER_CATALOG)[K] & {\n readonly operations?: readonly ('suspend' | 'resume' | 'generate' | 'diagnostics')[];\n };\n}[P];\n\nexport type InfraComputeTarget = {\n readonly id: string;\n readonly os: 'linux' | 'darwin' | 'windows';\n readonly architecture: 'amd64' | 'arm64';\n} & (\n | { readonly kind: 'local-host' }\n | {\n readonly kind: 'ssh-host';\n readonly host: string;\n readonly port: number;\n readonly user: string;\n readonly credential: InfraControlPlaneCredentialRef;\n /** Expected host key supplied by the compute owner; runtimes must verify host authenticity. */\n readonly hostKeyFingerprint: string;\n }\n);\n\n/** Trusted execution-only ports. Implementations must not serialize resolved credential values. */\nexport interface InfraExecutionContext {\n readonly projectId: string;\n readonly environment: AppEnvironmentId;\n readonly desired: InfraEnvironmentSpec;\n readonly previous?: InfraLedger;\n readonly signal?: AbortSignal;\n readonly credentials: {\n resolveAsync(\n reference: InfraControlPlaneCredentialRef,\n ): Promise<InfraResult<Readonly<Record<string, string>>>>;\n };\n readonly secrets: {\n resolveAsync(reference: InfraSecretReference): Promise<InfraResult<string>>;\n };\n}\n\nexport interface InfraReconcileResult {\n readonly resources: readonly InfraOwnedResource[];\n readonly outputs: readonly InfraOutput[];\n}\n\nexport interface InfraComputeAdapter<P extends InfraComputeProviderId = InfraComputeProviderId> {\n readonly descriptor: InfraAdapterDescriptor<P>;\n /** Read-only prerequisites, config and control-plane credential validation. */\n validateAsync(\n context: InfraExecutionContext,\n selection: InfraComputeSelection<P>,\n ): Promise<InfraResult<null>>;\n planAsync(\n context: InfraExecutionContext,\n selection: InfraComputeSelection<P>,\n ): Promise<InfraResult<readonly InfraPlanAction[]>>;\n ensureAsync(\n context: InfraExecutionContext,\n selection: InfraComputeSelection<P>,\n ): Promise<\n InfraResult<InfraReconcileResult & { readonly targets: readonly InfraComputeTarget[] }>\n >;\n statusAsync(context: InfraExecutionContext): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n destroyAsync(\n context: InfraExecutionContext,\n request: InfraDestroyRequest,\n ): Promise<InfraResult<InfraReconcileResult>>;\n}\n\nexport interface InfraRuntimeDesiredState<\n P extends InfraRuntimeProviderId = InfraRuntimeProviderId,\n> {\n readonly selection: InfraRuntimeSelection<P>;\n readonly targets: readonly InfraComputeTarget[];\n readonly workloads: readonly InfraWorkloadSpec[];\n}\n\nexport interface InfraRuntimeAdapter<P extends InfraRuntimeProviderId = InfraRuntimeProviderId> {\n readonly descriptor: InfraAdapterDescriptor<P>;\n /** Read-only prerequisites and desired-state validation; no cluster creation. */\n validateAsync(\n context: InfraExecutionContext,\n desired: InfraRuntimeDesiredState<P>,\n ): Promise<InfraResult<null>>;\n planAsync(\n context: InfraExecutionContext,\n desired: InfraRuntimeDesiredState<P>,\n ): Promise<InfraResult<readonly InfraPlanAction[]>>;\n ensureAsync(\n context: InfraExecutionContext,\n desired: InfraRuntimeDesiredState<P>,\n ): Promise<InfraResult<InfraReconcileResult>>;\n statusAsync(context: InfraExecutionContext): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n suspendAsync(context: InfraExecutionContext): Promise<InfraResult<InfraReconcileResult>>;\n destroyAsync(\n context: InfraExecutionContext,\n request: InfraDestroyRequest,\n ): Promise<InfraResult<InfraReconcileResult>>;\n generateAsync?(\n context: InfraExecutionContext,\n desired: InfraRuntimeDesiredState<P>,\n ): Promise<InfraResult<readonly InfraGeneratedArtifact[]>>;\n}\n\n/** A service can own several capabilities but contributes one deduplicated platform instance. */\nexport interface InfraServiceAdapter {\n readonly descriptor: InfraAdapterDescriptor<'supabase' | 'cerbos' | 'r2' | 'supabase-vault'>;\n /** Read-only service config, bootstrap credentials and dependency validation. */\n validateAsync(context: InfraExecutionContext): Promise<InfraResult<null>>;\n planAsync(context: InfraExecutionContext): Promise<InfraResult<readonly InfraPlanAction[]>>;\n desiredWorkloadsAsync(\n context: InfraExecutionContext,\n ): Promise<InfraResult<readonly InfraWorkloadSpec[]>>;\n reconcileAsync(\n context: InfraExecutionContext,\n runtimeOutputs: readonly InfraOutput[],\n ): Promise<InfraResult<InfraReconcileResult>>;\n statusAsync(context: InfraExecutionContext): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n destroyAsync(\n context: InfraExecutionContext,\n request: InfraDestroyRequest,\n ): Promise<InfraResult<InfraReconcileResult>>;\n suspendAsync?(context: InfraExecutionContext): Promise<InfraResult<InfraReconcileResult>>;\n}\n"]}
1
+ {"version":3,"file":"infraAdapters.js","sourceRoot":"","sources":["../../src/types/infraAdapters.ts"],"names":[],"mappings":"","sourcesContent":["import type { AppEnvironmentId } from '../environments';\nimport type { INFRA_ADAPTER_CATALOG } from '../infra/constants';\nimport type {\n InfraDestroyRequest,\n InfraGeneratedArtifact,\n InfraLedger,\n InfraOutput,\n InfraOwnedResource,\n InfraPlanAction,\n InfraResourceStatus,\n InfraResult,\n} from './infraLifecycle';\nimport type {\n InfraAdapterId,\n InfraComputeProviderId,\n InfraComputeSelection,\n InfraEnvironmentSpec,\n InfraRuntimeProviderId,\n InfraRuntimeSelection,\n} from './infraManifest';\nimport type { InfraControlPlaneCredentialRef, InfraSecretReference } from './infraSecrets';\nimport type { InfraWorkloadSpec } from './infraWorkload';\n\n/** Package exports must match this exact catalog entry; optional operations are advertised explicitly. */\nexport type InfraAdapterDescriptor<P extends InfraAdapterId = InfraAdapterId> = {\n [K in P]: (typeof INFRA_ADAPTER_CATALOG)[K] & {\n readonly operations?: readonly ('suspend' | 'resume' | 'generate' | 'diagnostics')[];\n };\n}[P];\n\nexport type InfraComputeTarget = {\n readonly id: string;\n readonly os: 'linux' | 'darwin' | 'windows';\n readonly architecture: 'amd64' | 'arm64';\n} & (\n | { readonly kind: 'local-host' }\n | {\n readonly kind: 'ssh-host';\n readonly host: string;\n readonly port: number;\n readonly user: string;\n readonly credential: InfraControlPlaneCredentialRef;\n /** Expected host key supplied by the compute owner; runtimes must verify host authenticity. */\n readonly hostKeyFingerprint: string;\n }\n);\n\n/** Trusted execution-only ports. Implementations must not serialize resolved credential values. */\nexport interface InfraExecutionContext {\n readonly projectId: string;\n readonly environment: AppEnvironmentId;\n readonly desired: InfraEnvironmentSpec;\n readonly previous?: InfraLedger;\n readonly signal?: AbortSignal;\n readonly credentials: {\n resolveAsync(\n reference: InfraControlPlaneCredentialRef,\n ): Promise<InfraResult<Readonly<Record<string, string>>>>;\n };\n readonly secrets: {\n resolveAsync(reference: InfraSecretReference): Promise<InfraResult<string>>;\n };\n}\n\nexport interface InfraReconcileResult {\n readonly resources: readonly InfraOwnedResource[];\n readonly outputs: readonly InfraOutput[];\n}\n\nexport interface InfraComputeAdapter<P extends InfraComputeProviderId = InfraComputeProviderId> {\n readonly descriptor: InfraAdapterDescriptor<P>;\n /** Read-only prerequisites, config and control-plane credential validation. */\n validateAsync(\n context: InfraExecutionContext,\n selection: InfraComputeSelection<P>,\n ): Promise<InfraResult<null>>;\n planAsync(\n context: InfraExecutionContext,\n selection: InfraComputeSelection<P>,\n ): Promise<InfraResult<readonly InfraPlanAction[]>>;\n ensureAsync(\n context: InfraExecutionContext,\n selection: InfraComputeSelection<P>,\n ): Promise<\n InfraResult<InfraReconcileResult & { readonly targets: readonly InfraComputeTarget[] }>\n >;\n statusAsync(context: InfraExecutionContext): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n destroyAsync(\n context: InfraExecutionContext,\n request: InfraDestroyRequest,\n ): Promise<InfraResult<InfraReconcileResult>>;\n}\n\nexport interface InfraRuntimeDesiredState<\n P extends InfraRuntimeProviderId = InfraRuntimeProviderId,\n> {\n readonly selection: InfraRuntimeSelection<P>;\n readonly targets: readonly InfraComputeTarget[];\n readonly workloads: readonly InfraWorkloadSpec[];\n /** Previously resolved outputs available to portable workload value references. */\n readonly availableOutputs: readonly InfraOutput[];\n}\n\nexport interface InfraRuntimeAdapter<P extends InfraRuntimeProviderId = InfraRuntimeProviderId> {\n readonly descriptor: InfraAdapterDescriptor<P>;\n /** Read-only prerequisites and desired-state validation; no cluster creation. */\n validateAsync(\n context: InfraExecutionContext,\n desired: InfraRuntimeDesiredState<P>,\n ): Promise<InfraResult<null>>;\n planAsync(\n context: InfraExecutionContext,\n desired: InfraRuntimeDesiredState<P>,\n ): Promise<InfraResult<readonly InfraPlanAction[]>>;\n ensureAsync(\n context: InfraExecutionContext,\n desired: InfraRuntimeDesiredState<P>,\n ): Promise<InfraResult<InfraReconcileResult>>;\n statusAsync(context: InfraExecutionContext): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n suspendAsync(context: InfraExecutionContext): Promise<InfraResult<InfraReconcileResult>>;\n destroyAsync(\n context: InfraExecutionContext,\n request: InfraDestroyRequest,\n ): Promise<InfraResult<InfraReconcileResult>>;\n generateAsync?(\n context: InfraExecutionContext,\n desired: InfraRuntimeDesiredState<P>,\n ): Promise<InfraResult<readonly InfraGeneratedArtifact[]>>;\n}\n\n/** A service can own several capabilities but contributes one deduplicated platform instance. */\nexport interface InfraServiceAdapter {\n readonly descriptor: InfraAdapterDescriptor<'supabase' | 'cerbos' | 'r2' | 'supabase-vault'>;\n /** Read-only service config, bootstrap credentials and dependency validation. */\n validateAsync(context: InfraExecutionContext): Promise<InfraResult<null>>;\n planAsync(context: InfraExecutionContext): Promise<InfraResult<readonly InfraPlanAction[]>>;\n desiredWorkloadsAsync(\n context: InfraExecutionContext,\n ): Promise<InfraResult<readonly InfraWorkloadSpec[]>>;\n reconcileAsync(\n context: InfraExecutionContext,\n runtimeOutputs: readonly InfraOutput[],\n ): Promise<InfraResult<InfraReconcileResult>>;\n statusAsync(context: InfraExecutionContext): Promise<InfraResult<readonly InfraResourceStatus[]>>;\n destroyAsync(\n context: InfraExecutionContext,\n request: InfraDestroyRequest,\n ): Promise<InfraResult<InfraReconcileResult>>;\n suspendAsync?(context: InfraExecutionContext): Promise<InfraResult<InfraReconcileResult>>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/contracts",
3
- "version": "15.0.0",
3
+ "version": "16.0.0",
4
4
  "main": "./dist/index.js",
5
5
  "ankh": {
6
6
  "category": "contracts",
@@ -11,6 +11,7 @@ import type {
11
11
  InfraManifest,
12
12
  InfraObjectStorageSpec,
13
13
  InfraOutput,
14
+ InfraRuntimeDesiredState,
14
15
  InfraRuntimeProviderId,
15
16
  } from './infra';
16
17
  import type { AppStateSpec } from './state';
@@ -76,3 +77,17 @@ it('rejects open or fictional service providers in typed selections', () => {
76
77
  ] = [false, false, false, false];
77
78
  expect(providers).toEqual([false, false, false, false]);
78
79
  });
80
+
81
+ it('requires resolved outputs at the runtime desired-state boundary', () => {
82
+ interface RuntimeInput {
83
+ readonly selection: { readonly provider: 'minikube' };
84
+ readonly targets: readonly [];
85
+ readonly workloads: readonly [];
86
+ }
87
+ const outputBoundary: readonly [
88
+ Assignable<RuntimeInput, InfraRuntimeDesiredState<'minikube'>>,
89
+ Assignable<RuntimeInput & { readonly availableOutputs: readonly [] }, InfraRuntimeDesiredState>,
90
+ ] = [false, true];
91
+
92
+ expect(outputBoundary).toEqual([false, true]);
93
+ });
@@ -97,6 +97,8 @@ export interface InfraRuntimeDesiredState<
97
97
  readonly selection: InfraRuntimeSelection<P>;
98
98
  readonly targets: readonly InfraComputeTarget[];
99
99
  readonly workloads: readonly InfraWorkloadSpec[];
100
+ /** Previously resolved outputs available to portable workload value references. */
101
+ readonly availableOutputs: readonly InfraOutput[];
100
102
  }
101
103
 
102
104
  export interface InfraRuntimeAdapter<P extends InfraRuntimeProviderId = InfraRuntimeProviderId> {