@automate.ax/api-contract 0.136.0 → 0.138.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/dist/runtime.d.ts CHANGED
@@ -107,6 +107,7 @@ declare const COORDINATION_OFFER_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
107
107
  }, z.core.$strip>>;
108
108
  count: z.ZodNumber;
109
109
  key: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
110
+ occurrenceTtl: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
110
111
  outcomeSeq: z.ZodNumber;
111
112
  policy: z.ZodLiteral<"collect">;
112
113
  position: z.ZodOptional<z.ZodNumber>;
@@ -141,6 +142,7 @@ declare const COORDINATION_OFFER_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
141
142
  roots: z.ZodArray<z.ZodNumber>;
142
143
  }, z.core.$strip>>;
143
144
  key: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>;
145
+ occurrenceTtl: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
144
146
  ordered: z.ZodBoolean;
145
147
  outcomeSeq: z.ZodNumber;
146
148
  policy: z.ZodLiteral<"correlate">;
@@ -1403,6 +1405,7 @@ export declare const runtimeContract: {
1403
1405
  }, z.core.$strip>>;
1404
1406
  count: z.ZodNumber;
1405
1407
  key: z.ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
1408
+ occurrenceTtl: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1406
1409
  outcomeSeq: z.ZodNumber;
1407
1410
  policy: z.ZodLiteral<"collect">;
1408
1411
  position: z.ZodOptional<z.ZodNumber>;
@@ -1437,6 +1440,7 @@ export declare const runtimeContract: {
1437
1440
  roots: z.ZodArray<z.ZodNumber>;
1438
1441
  }, z.core.$strip>>;
1439
1442
  key: z.ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
1443
+ occurrenceTtl: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1440
1444
  ordered: z.ZodBoolean;
1441
1445
  outcomeSeq: z.ZodNumber;
1442
1446
  policy: z.ZodLiteral<"correlate">;
package/dist/runtime.js CHANGED
@@ -231,12 +231,14 @@ const MERGE_INPUT_ORIGINS_SCHEMA = z
231
231
  .min(2);
232
232
  const createCorrelationOfferSchema = (keySchema) => SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
233
233
  key: keySchema,
234
+ occurrenceTtl: COORDINATION_DURATION_SCHEMA.optional(),
234
235
  ordered: z.boolean(),
235
236
  outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
236
237
  policy: z.literal("correlate"),
237
238
  streamIndex: z.number().int().nonnegative(),
238
239
  streamOrigins: CORRELATION_STREAM_ORIGINS_SCHEMA,
239
- ttl: z.union([z.string().min(1), z.number().nonnegative()]).optional(),
240
+ /** @deprecated Retained for deployed bundles that sourced TTL from keyBy. */
241
+ ttl: COORDINATION_DURATION_SCHEMA.optional(),
240
242
  }).superRefine((entry, context) => {
241
243
  if (entry.streamIndex >= entry.streamOrigins.length) {
242
244
  context.addIssue({
@@ -266,11 +268,13 @@ const createSerializationOfferSchema = (keySchema) => SIGNAL_INVOCATION_DEPENDEN
266
268
  const createCollectionOfferSchema = (keySchema) => SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
267
269
  count: z.number().int().positive(),
268
270
  key: keySchema,
271
+ occurrenceTtl: COORDINATION_DURATION_SCHEMA.optional(),
269
272
  outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
270
273
  policy: z.literal("collect"),
271
274
  position: z.number().int().nonnegative().optional(),
272
275
  primaryPosition: COORDINATION_PRIMARY_POSITION_SCHEMA,
273
- ttl: z.union([z.string().min(1), z.number().nonnegative()]).optional(),
276
+ /** @deprecated Retained for deployed bundles that sourced TTL from keyBy. */
277
+ ttl: COORDINATION_DURATION_SCHEMA.optional(),
274
278
  });
275
279
  const FANOUT_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
276
280
  count: z.number().int().nonnegative(),
@@ -287,6 +291,7 @@ const createFunnelOfferSchema = (keySchema) => SIGNAL_INVOCATION_DEPENDENCIES_SC
287
291
  primaryPosition: COORDINATION_PRIMARY_POSITION_SCHEMA,
288
292
  selection: z.enum(["all", "first", "last"]),
289
293
  triggerAt: z.enum(["start", "end", "both"]),
294
+ /** @deprecated Retained for deployed bundles that sourced TTL from keyBy. */
290
295
  ttl: COORDINATION_DURATION_SCHEMA.optional(),
291
296
  until: z.date().optional(),
292
297
  }).superRefine((offer, context) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/api-contract",
3
- "version": "0.136.0",
3
+ "version": "0.138.0",
4
4
  "description": "Public oRPC contract for the Automate.ax API.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@ai-sdk/gateway": "4.0.46",
34
- "@automate.ax/codec": "0.136.0",
35
- "@automate.ax/integration-contracts": "0.136.0",
34
+ "@automate.ax/codec": "0.138.0",
35
+ "@automate.ax/integration-contracts": "0.138.0",
36
36
  "@orpc/contract": "1.15.0",
37
37
  "fast-json-stable-stringify": "^2.1.0",
38
38
  "zod": "^4.3.6"
@@ -0,0 +1,18 @@
1
+ import { oc } from "@orpc/contract"
2
+ import * as z from "zod"
3
+
4
+ export const anthropicEventsContract = {
5
+ anthropicEvent: oc
6
+ .route({
7
+ description:
8
+ "Receives signed lifecycle callbacks from Anthropic Claude Managed Agents.",
9
+ method: "POST",
10
+ operationId: "receiveAnthropicEvent",
11
+ path: "/events/anthropic",
12
+ successStatus: 200,
13
+ summary: "Receive an Anthropic Managed Agents event",
14
+ tags: ["Events"],
15
+ })
16
+ .input(z.unknown())
17
+ .output(z.void()),
18
+ }
@@ -1,5 +1,6 @@
1
1
  import { airtableEventsContract } from "./airtable"
2
2
  import { apifyEventsContract } from "./apify"
3
+ import { anthropicEventsContract } from "./anthropic"
3
4
  import { axiomEventsContract } from "./axiom"
4
5
  import { asanaEventsContract } from "./asana"
5
6
  import { brevoEventsContract } from "./brevo"
@@ -27,6 +28,7 @@ import { webflowEventsContract } from "./webflow"
27
28
  import { whatsappEventsContract } from "./whatsapp"
28
29
 
29
30
  export const eventsContract = {
31
+ ...anthropicEventsContract,
30
32
  ...airtableEventsContract,
31
33
  ...apifyEventsContract,
32
34
  ...axiomEventsContract,
@@ -1,7 +1,7 @@
1
1
  import { oc } from "@orpc/contract"
2
2
  import { z } from "zod"
3
3
 
4
- export const EXECUTION_DATASET_VERSION = 10
4
+ export const EXECUTION_DATASET_VERSION = 11
5
5
 
6
6
  export const executionDatasetResourceSchema = z.enum([
7
7
  "projects",
@@ -15,8 +15,10 @@ export const executionDatasetResourceSchema = z.enum([
15
15
  "action-attempts",
16
16
  "signal-invocations",
17
17
  "signal-coordinators",
18
+ "signal-partitions",
18
19
  "signal-offers",
19
20
  "signal-decisions",
21
+ "signal-decision-offers",
20
22
  "logs",
21
23
  "outputs",
22
24
  ])
package/src/runtime.ts CHANGED
@@ -287,12 +287,15 @@ const createCorrelationOfferSchema = <TKeySchema extends z.ZodType>(
287
287
  ) =>
288
288
  SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
289
289
  key: keySchema,
290
+ occurrenceTtl: COORDINATION_DURATION_SCHEMA.optional(),
290
291
  ordered: z.boolean(),
291
292
  outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
292
293
  policy: z.literal("correlate"),
293
294
  streamIndex: z.number().int().nonnegative(),
294
295
  streamOrigins: CORRELATION_STREAM_ORIGINS_SCHEMA,
295
- ttl: z.union([z.string().min(1), z.number().nonnegative()]).optional(),
296
+
297
+ /** @deprecated Retained for deployed bundles that sourced TTL from keyBy. */
298
+ ttl: COORDINATION_DURATION_SCHEMA.optional(),
296
299
  }).superRefine((entry, context) => {
297
300
  if (entry.streamIndex >= entry.streamOrigins.length) {
298
301
  context.addIssue({
@@ -331,11 +334,14 @@ const createCollectionOfferSchema = <TKeySchema extends z.ZodType>(
331
334
  SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
332
335
  count: z.number().int().positive(),
333
336
  key: keySchema,
337
+ occurrenceTtl: COORDINATION_DURATION_SCHEMA.optional(),
334
338
  outcomeSeq: OUTCOME_SEQUENCE_SCHEMA,
335
339
  policy: z.literal("collect"),
336
340
  position: z.number().int().nonnegative().optional(),
337
341
  primaryPosition: COORDINATION_PRIMARY_POSITION_SCHEMA,
338
- ttl: z.union([z.string().min(1), z.number().nonnegative()]).optional(),
342
+
343
+ /** @deprecated Retained for deployed bundles that sourced TTL from keyBy. */
344
+ ttl: COORDINATION_DURATION_SCHEMA.optional(),
339
345
  })
340
346
 
341
347
  const FANOUT_OFFER_SCHEMA = SIGNAL_INVOCATION_DEPENDENCIES_SCHEMA.extend({
@@ -357,6 +363,8 @@ const createFunnelOfferSchema = <TKeySchema extends z.ZodType>(
357
363
  primaryPosition: COORDINATION_PRIMARY_POSITION_SCHEMA,
358
364
  selection: z.enum(["all", "first", "last"]),
359
365
  triggerAt: z.enum(["start", "end", "both"]),
366
+
367
+ /** @deprecated Retained for deployed bundles that sourced TTL from keyBy. */
360
368
  ttl: COORDINATION_DURATION_SCHEMA.optional(),
361
369
  until: z.date().optional(),
362
370
  }).superRefine((offer, context) => {