@adea-ai/runtime-sdk 2.0.0 → 3.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.
@@ -57,17 +57,6 @@ export declare const PiDurableLeadObservedTargetSchema: z.ZodReadonly<z.ZodObjec
57
57
  generation: z.ZodOptional<typeof RuntimeObservedGenerationSchema>;
58
58
  }, z.core.$strict>>;
59
59
  export type PiDurableLeadObservedTarget = z.output<typeof PiDurableLeadObservedTargetSchema>;
60
- export declare const PI_DURABLE_OBSERVED_GENERATION_CONTRACT_VERSION: {
61
- readonly major: 3;
62
- readonly minor: 1;
63
- };
64
- export declare function supportsPiDurableObservedGeneration(consumerVersion: unknown): boolean;
65
- export declare const PI_DURABLE_REMOTE_SESSION_REFERENCE_CONTRACT_VERSION: {
66
- readonly major: 3;
67
- readonly minor: 2;
68
- };
69
- export declare function supportsPiDurableRemoteSessionReference(consumerVersion: unknown): boolean;
70
- export declare function supportsPiDurableRemoteOwnerObservation(consumerVersion: unknown): boolean;
71
60
  export declare const PiDurableLeadPrepareRequestSchema: z.ZodObject<{
72
61
  contractVersion: z.ZodObject<{
73
62
  major: z.ZodNumber;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { PiDurableQuestionAnswersSchema, PiDurableQuestionRequestIdSchema, } from './pi-durable-questions.js';
3
3
  import { PiDurableApprovalAnswerSchema, PiDurableApprovalAttestationSchema, PiDurableApprovalDecisionIdSchema, } from './pi-durable-approvals.js';
4
- import { ContractVersionSchema, IdentifierSchemas, ModelSelectionFundingViewSchema, ModelSelectionRefSchema, PublicContractManifest, ReadRequestEnvelopeSchema, StateChangingCommandEnvelopeSchema, SuccessResponseEnvelopeSchema, negotiateContractVersion, } from '@adea-ai/contracts';
4
+ import { IdentifierSchemas, ModelSelectionFundingViewSchema, ModelSelectionRefSchema, ReadRequestEnvelopeSchema, StateChangingCommandEnvelopeSchema, SuccessResponseEnvelopeSchema, } from '@adea-ai/contracts';
5
5
  import { RuntimeExecutionHandleSchema, RuntimeExecutionProgressSchema, RuntimeExecutionStatusSchema, RuntimeExecutionStateSchema, RuntimeObservedGenerationSchema, } from './adapter.js';
6
6
  const IntentId = z.uuid();
7
7
  const DispatchId = z.string().regex(/^dispatch_[a-f0-9]{32}$/);
@@ -30,35 +30,6 @@ export const PiDurableLeadObservedTargetSchema = z
30
30
  generation: RuntimeObservedGenerationSchema.optional(),
31
31
  })
32
32
  .readonly();
33
- function contractIncludes(negotiated, introduced) {
34
- return (negotiated.major > introduced.major ||
35
- (negotiated.major === introduced.major && negotiated.minor >= introduced.minor));
36
- }
37
- export const PI_DURABLE_OBSERVED_GENERATION_CONTRACT_VERSION = { major: 3, minor: 1 };
38
- export function supportsPiDurableObservedGeneration(consumerVersion) {
39
- const consumer = ContractVersionSchema.safeParse(consumerVersion);
40
- if (!consumer.success)
41
- return false;
42
- const negotiated = negotiateContractVersion(PublicContractManifest.supported, [consumer.data]);
43
- return (negotiated !== undefined &&
44
- contractIncludes(negotiated, PI_DURABLE_OBSERVED_GENERATION_CONTRACT_VERSION));
45
- }
46
- export const PI_DURABLE_REMOTE_SESSION_REFERENCE_CONTRACT_VERSION = { major: 3, minor: 2 };
47
- export function supportsPiDurableRemoteSessionReference(consumerVersion) {
48
- const consumer = ContractVersionSchema.safeParse(consumerVersion);
49
- if (!consumer.success)
50
- return false;
51
- const negotiated = negotiateContractVersion(PublicContractManifest.supported, [consumer.data]);
52
- return (negotiated !== undefined &&
53
- contractIncludes(negotiated, PI_DURABLE_REMOTE_SESSION_REFERENCE_CONTRACT_VERSION));
54
- }
55
- export function supportsPiDurableRemoteOwnerObservation(consumerVersion) {
56
- const consumer = ContractVersionSchema.safeParse(consumerVersion);
57
- if (!consumer.success)
58
- return false;
59
- const negotiated = negotiateContractVersion(PublicContractManifest.supported, [consumer.data]);
60
- return negotiated !== undefined && contractIncludes(negotiated, { major: 3, minor: 3 });
61
- }
62
33
  function fenceForeignGeneration(receipt, context) {
63
34
  const foreign = (generation) => generation !== undefined && generation.attemptId !== receipt.attemptId;
64
35
  if (foreign(receipt.observedTarget?.generation))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/runtime-sdk",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "SDK for building Control Plane runtimes: adapters, capabilities, conformance, discovery, eligibility, health, sessions, transport, and routing.",
5
5
  "keywords": [
6
6
  "adapter",
@@ -31,19 +31,18 @@
31
31
  }
32
32
  },
33
33
  "publishConfig": {
34
- "access": "public",
35
- "provenance": true
34
+ "access": "public"
36
35
  },
37
36
  "scripts": {
38
37
  "build": "tsc -p tsconfig.json",
39
- "typecheck": "bun check -p tsconfig.json && bun check -p tsconfig.scripts.json",
38
+ "typecheck": "bun check -p tsconfig.json && bun check -p tsconfig.test.json && bun check -p tsconfig.scripts.json",
40
39
  "compatibility:check": "bun scripts/compatibility.ts --check",
41
40
  "compatibility:generate": "bun scripts/compatibility.ts",
42
41
  "lint": "oxlint src",
43
42
  "test": "bun test src"
44
43
  },
45
44
  "dependencies": {
46
- "@adea-ai/contracts": "^4.0.0",
45
+ "@adea-ai/contracts": "^5.0.0",
47
46
  "zod": "4.6.6"
48
47
  },
49
48
  "engines": {