@relkit/contracts 0.1.0 → 0.2.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.
@@ -0,0 +1,10 @@
1
+ export declare const RUNTIME_ACTIVATION_FILE: "runtime-activation.json";
2
+ export interface RuntimeActivationFingerprint {
3
+ readonly graphHash: string;
4
+ readonly manifestHash: string;
5
+ readonly runtimeIntegrationsPlanHash: string;
6
+ readonly localServicesPlanHash?: string;
7
+ readonly providerOverridesGeneration?: string;
8
+ }
9
+ export declare function isRuntimeActivationFingerprint(value: unknown): value is RuntimeActivationFingerprint;
10
+ //# sourceMappingURL=activation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activation.d.ts","sourceRoot":"","sources":["../src/activation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,EAAG,yBAAkC,CAAC;AAE1E,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,2BAA2B,EAAE,MAAM,CAAC;IAC7C,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,MAAM,CAAC;CAC/C;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,4BAA4B,CAUvC"}
@@ -0,0 +1,15 @@
1
+ export const RUNTIME_ACTIVATION_FILE = "runtime-activation.json";
2
+ export function isRuntimeActivationFingerprint(value) {
3
+ if (value === null || typeof value !== "object" || Array.isArray(value))
4
+ return false;
5
+ const record = value;
6
+ return (text(record.graphHash) &&
7
+ text(record.manifestHash) &&
8
+ text(record.runtimeIntegrationsPlanHash) &&
9
+ (record.localServicesPlanHash === undefined || text(record.localServicesPlanHash)) &&
10
+ (record.providerOverridesGeneration === undefined || text(record.providerOverridesGeneration)));
11
+ }
12
+ function text(value) {
13
+ return typeof value === "string" && value.trim() !== "";
14
+ }
15
+ //# sourceMappingURL=activation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activation.js","sourceRoot":"","sources":["../src/activation.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAkC,CAAC;AAU1E,MAAM,UAAU,8BAA8B,CAC5C,KAAc;IAEd,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACtF,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,OAAO,CACL,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;QACzB,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC;QACxC,CAAC,MAAM,CAAC,qBAAqB,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAClF,CAAC,MAAM,CAAC,2BAA2B,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,CAC/F,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,KAAc;IAC1B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;AAC1D,CAAC"}
package/dist/index.d.ts CHANGED
@@ -3,4 +3,6 @@ export * from "./descriptor.js";
3
3
  export * from "./json.js";
4
4
  export * from "./source-location.js";
5
5
  export * from "./version.js";
6
+ export * from "./runtime-integration.js";
7
+ export * from "./activation.js";
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -3,4 +3,6 @@ export * from "./descriptor.js";
3
3
  export * from "./json.js";
4
4
  export * from "./source-location.js";
5
5
  export * from "./version.js";
6
+ export * from "./runtime-integration.js";
7
+ export * from "./activation.js";
6
8
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,37 @@
1
+ export declare const RUNTIME_INTEGRATION_PLAN_VERSION: 1;
2
+ export declare const RUNTIME_INTEGRATION_PLAN_FILE: "runtime-integrations.plan.json";
3
+ export interface RuntimeIntegrationPlanReference {
4
+ readonly version: typeof RUNTIME_INTEGRATION_PLAN_VERSION;
5
+ readonly fileName: typeof RUNTIME_INTEGRATION_PLAN_FILE;
6
+ readonly graphHash: string;
7
+ }
8
+ export interface RuntimeIntegrationRegistrationMetadata {
9
+ readonly capability: string;
10
+ readonly adapterId: string;
11
+ readonly protocolVersion: number;
12
+ }
13
+ export interface RuntimeIntegrationModuleMetadata {
14
+ readonly kind: "runtime-integration";
15
+ readonly integrationId: string;
16
+ readonly registrations: readonly RuntimeIntegrationRegistrationMetadata[];
17
+ }
18
+ export interface RuntimeIntegrationPlanEntry {
19
+ readonly integrationId: string;
20
+ readonly capability: string;
21
+ readonly adapterId: string;
22
+ readonly protocolVersion: number;
23
+ readonly packageName: string;
24
+ readonly packageVersion: string;
25
+ readonly exportName: string;
26
+ }
27
+ export interface RuntimeIntegrationPlan {
28
+ readonly version: typeof RUNTIME_INTEGRATION_PLAN_VERSION;
29
+ readonly graphHash: string;
30
+ readonly integrations: readonly RuntimeIntegrationPlanEntry[];
31
+ }
32
+ export declare class RuntimeIntegrationPlanVersionError extends TypeError {
33
+ readonly code: "RELKIT_RUNTIME_INTEGRATION_PLAN_VERSION_UNSUPPORTED";
34
+ constructor(version: unknown);
35
+ }
36
+ export declare function assertRuntimeIntegrationPlanVersion(value: unknown): asserts value is RuntimeIntegrationPlan;
37
+ //# sourceMappingURL=runtime-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-integration.d.ts","sourceRoot":"","sources":["../src/runtime-integration.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,EAAG,CAAU,CAAC;AAC3D,eAAO,MAAM,6BAA6B,EAAG,gCAAyC,CAAC;AAEvF,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,OAAO,EAAE,OAAO,gCAAgC,CAAC;IAC1D,QAAQ,CAAC,QAAQ,EAAE,OAAO,6BAA6B,CAAC;IACxD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,SAAS,sCAAsC,EAAE,CAAC;CAC3E;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,OAAO,gCAAgC,CAAC;IAC1D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,SAAS,2BAA2B,EAAE,CAAC;CAC/D;AAED,qBAAa,kCAAmC,SAAQ,SAAS;IAC/D,QAAQ,CAAC,IAAI,EAAG,qDAAqD,CAAU;gBAEnE,OAAO,EAAE,OAAO;CAM7B;AAED,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,sBAAsB,CAGzC"}
@@ -0,0 +1,17 @@
1
+ export const RUNTIME_INTEGRATION_PLAN_VERSION = 1;
2
+ export const RUNTIME_INTEGRATION_PLAN_FILE = "runtime-integrations.plan.json";
3
+ export class RuntimeIntegrationPlanVersionError extends TypeError {
4
+ code = "RELKIT_RUNTIME_INTEGRATION_PLAN_VERSION_UNSUPPORTED";
5
+ constructor(version) {
6
+ super(`Runtime-integration plan version ${String(version)} is unsupported; expected ${RUNTIME_INTEGRATION_PLAN_VERSION}. Regenerate with \`relkit check\`.`);
7
+ this.name = "RuntimeIntegrationPlanVersionError";
8
+ }
9
+ }
10
+ export function assertRuntimeIntegrationPlanVersion(value) {
11
+ if (!isRecord(value) || value.version !== RUNTIME_INTEGRATION_PLAN_VERSION)
12
+ throw new RuntimeIntegrationPlanVersionError(isRecord(value) ? value.version : undefined);
13
+ }
14
+ function isRecord(value) {
15
+ return value !== null && typeof value === "object" && !Array.isArray(value);
16
+ }
17
+ //# sourceMappingURL=runtime-integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-integration.js","sourceRoot":"","sources":["../src/runtime-integration.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAU,CAAC;AAC3D,MAAM,CAAC,MAAM,6BAA6B,GAAG,gCAAyC,CAAC;AAoCvF,MAAM,OAAO,kCAAmC,SAAQ,SAAS;IACtD,IAAI,GAAG,qDAA8D,CAAC;IAE/E,YAAY,OAAgB;QAC1B,KAAK,CACH,oCAAoC,MAAM,CAAC,OAAO,CAAC,6BAA6B,gCAAgC,qCAAqC,CACtJ,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,oCAAoC,CAAC;IACnD,CAAC;CACF;AAED,MAAM,UAAU,mCAAmC,CACjD,KAAc;IAEd,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,KAAK,gCAAgC;QACxE,MAAM,IAAI,kCAAkC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC9F,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
package/dist/version.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /** Current version of the public contract payloads. */
2
- export declare const CONTRACT_VERSION: 4;
2
+ export declare const CONTRACT_VERSION: 5;
3
3
  /** Current version of generated RelKit artifacts. */
4
- export declare const GENERATOR_VERSION: 4;
4
+ export declare const GENERATOR_VERSION: 5;
5
5
  /** Current version of the canonical application graph. */
6
- export declare const GRAPH_VERSION: 7;
6
+ export declare const GRAPH_VERSION: 8;
7
7
  /** Current version of the executable runtime manifest. */
8
- export declare const MANIFEST_VERSION: 7;
8
+ export declare const MANIFEST_VERSION: 8;
9
9
  /** Current version of the internal inspector/API protocol. */
10
10
  export declare const API_VERSION: 1;
11
11
  /** Shared protocol version used by versioned internal contracts. */
package/dist/version.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /** Current version of the public contract payloads. */
2
- export const CONTRACT_VERSION = 4;
2
+ export const CONTRACT_VERSION = 5;
3
3
  /** Current version of generated RelKit artifacts. */
4
- export const GENERATOR_VERSION = 4;
4
+ export const GENERATOR_VERSION = 5;
5
5
  /** Current version of the canonical application graph. */
6
- export const GRAPH_VERSION = 7;
6
+ export const GRAPH_VERSION = 8;
7
7
  /** Current version of the executable runtime manifest. */
8
- export const MANIFEST_VERSION = 7;
8
+ export const MANIFEST_VERSION = 8;
9
9
  /** Current version of the internal inspector/API protocol. */
10
10
  export const API_VERSION = 1;
11
11
  /** Shared protocol version used by versioned internal contracts. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relkit/contracts",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Unsupported internal RELKIT contracts; use @relkit/app.",
5
5
  "license": "MIT",
6
6
  "repository": {