@automate.ax/api-contract 0.82.0 → 0.83.1
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/deployment.d.ts +17 -0
- package/dist/deployment.js +18 -2
- package/dist/events/convex.d.ts +10 -0
- package/dist/events/convex.js +22 -0
- package/dist/events/index.d.ts +7 -0
- package/dist/events/index.js +2 -0
- package/dist/execution-data.d.ts +6 -3
- package/dist/execution-data.js +2 -1
- package/dist/index.d.ts +56 -3
- package/dist/index.js +1 -0
- package/dist/runtime-protocol.d.ts +2 -0
- package/dist/runtime-protocol.js +2 -0
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +1 -0
- package/package.json +10 -3
- package/src/deployment.ts +19 -2
- package/src/events/convex.ts +26 -0
- package/src/events/index.ts +2 -0
- package/src/execution-data.ts +2 -1
- package/src/index.ts +1 -0
- package/src/runtime-protocol.ts +2 -0
- package/src/runtime.ts +2 -0
package/dist/deployment.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export declare const deploymentContract: {
|
|
|
84
84
|
}>;
|
|
85
85
|
projectId: z.ZodString;
|
|
86
86
|
rebindAccounts: z.ZodDefault<z.ZodBoolean>;
|
|
87
|
+
runtimeProtocolVersion: z.ZodOptional<z.ZodNumber>;
|
|
87
88
|
git: z.ZodOptional<z.ZodObject<{
|
|
88
89
|
commitSha: z.ZodString;
|
|
89
90
|
dirty: z.ZodBoolean;
|
|
@@ -109,6 +110,14 @@ export declare const deploymentContract: {
|
|
|
109
110
|
readonly message: "A deployment is already in progress.";
|
|
110
111
|
readonly status: 409;
|
|
111
112
|
};
|
|
113
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: {
|
|
114
|
+
readonly data: z.ZodObject<{
|
|
115
|
+
receivedVersion: z.ZodNullable<z.ZodNumber>;
|
|
116
|
+
supportedVersion: z.ZodLiteral<1>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
readonly message: "The automation bundle uses an unsupported runtime protocol.";
|
|
119
|
+
readonly status: 400;
|
|
120
|
+
};
|
|
112
121
|
}>, Record<never, never>>;
|
|
113
122
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
114
123
|
deploymentId: z.ZodString;
|
|
@@ -277,5 +286,13 @@ export declare const deploymentContract: {
|
|
|
277
286
|
readonly message: "A deployment is already in progress.";
|
|
278
287
|
readonly status: 409;
|
|
279
288
|
};
|
|
289
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: {
|
|
290
|
+
readonly data: z.ZodObject<{
|
|
291
|
+
receivedVersion: z.ZodNullable<z.ZodNumber>;
|
|
292
|
+
supportedVersion: z.ZodLiteral<1>;
|
|
293
|
+
}, z.core.$strip>;
|
|
294
|
+
readonly message: "The automation bundle uses an unsupported runtime protocol.";
|
|
295
|
+
readonly status: 400;
|
|
296
|
+
};
|
|
280
297
|
}>, Record<never, never>>;
|
|
281
298
|
};
|
package/dist/deployment.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
+
import { AUTOMATION_RUNTIME_PROTOCOL_VERSION } from "./runtime-protocol.js";
|
|
3
4
|
import { cursorPageOutputSchema, cursorPaginationInputSchema } from "./schemas.js";
|
|
4
5
|
/** SDK compatibility version used to select the immutable runtime image. */
|
|
5
6
|
export const AUTOMATION_SDK_VERSION = "2";
|
|
@@ -20,6 +21,14 @@ const DEPLOYMENT_IN_PROGRESS_ERROR = {
|
|
|
20
21
|
message: "A deployment is already in progress.",
|
|
21
22
|
status: 409,
|
|
22
23
|
};
|
|
24
|
+
const UNSUPPORTED_RUNTIME_PROTOCOL_ERROR = {
|
|
25
|
+
data: z.object({
|
|
26
|
+
receivedVersion: z.number().int().positive().nullable(),
|
|
27
|
+
supportedVersion: z.literal(AUTOMATION_RUNTIME_PROTOCOL_VERSION),
|
|
28
|
+
}),
|
|
29
|
+
message: "The automation bundle uses an unsupported runtime protocol.",
|
|
30
|
+
status: 400,
|
|
31
|
+
};
|
|
23
32
|
const GIT_SOURCE_SCHEMA = z.object({
|
|
24
33
|
commitSha: z.string().regex(/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/),
|
|
25
34
|
dirty: z.boolean(),
|
|
@@ -88,7 +97,10 @@ export const deploymentContract = {
|
|
|
88
97
|
.input(z.object({ deploymentId: z.string() }))
|
|
89
98
|
.output(z.void()),
|
|
90
99
|
create: oc
|
|
91
|
-
.errors({
|
|
100
|
+
.errors({
|
|
101
|
+
DEPLOYMENT_IN_PROGRESS: DEPLOYMENT_IN_PROGRESS_ERROR,
|
|
102
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: UNSUPPORTED_RUNTIME_PROTOCOL_ERROR,
|
|
103
|
+
})
|
|
92
104
|
.input(z.object({
|
|
93
105
|
artifact: z.instanceof(Blob),
|
|
94
106
|
cancelExisting: z.boolean().default(false),
|
|
@@ -113,6 +125,7 @@ export const deploymentContract = {
|
|
|
113
125
|
mode: z.enum(["reconcile", "upsert"]),
|
|
114
126
|
projectId: z.string(),
|
|
115
127
|
rebindAccounts: z.boolean().default(false),
|
|
128
|
+
runtimeProtocolVersion: z.number().int().positive().optional(),
|
|
116
129
|
git: GIT_SOURCE_SCHEMA.optional(),
|
|
117
130
|
}))
|
|
118
131
|
.output(z.object({ id: z.string() })),
|
|
@@ -156,7 +169,10 @@ export const deploymentContract = {
|
|
|
156
169
|
.prefault({}))
|
|
157
170
|
.output(cursorPageOutputSchema(deploymentOutputSchema)),
|
|
158
171
|
redeploy: oc
|
|
159
|
-
.errors({
|
|
172
|
+
.errors({
|
|
173
|
+
DEPLOYMENT_IN_PROGRESS: DEPLOYMENT_IN_PROGRESS_ERROR,
|
|
174
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: UNSUPPORTED_RUNTIME_PROTOCOL_ERROR,
|
|
175
|
+
})
|
|
160
176
|
.route({
|
|
161
177
|
method: "POST",
|
|
162
178
|
path: "/projects/{projectId}/deployments/redeploy",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const convexEventsContract: {
|
|
3
|
+
convexEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
4
|
+
emittedAt: z.ZodISODateTime;
|
|
5
|
+
endpointKey: z.ZodString;
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
payload: z.ZodJSONSchema;
|
|
9
|
+
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
export const convexEventsContract = {
|
|
4
|
+
convexEvent: oc
|
|
5
|
+
.route({
|
|
6
|
+
description: "Authenticates and ingests a semantic event emitted by a Convex action.",
|
|
7
|
+
method: "POST",
|
|
8
|
+
operationId: "receiveConvexEvent",
|
|
9
|
+
path: "/events/convex/{endpointKey}",
|
|
10
|
+
successStatus: 204,
|
|
11
|
+
summary: "Receive a signed Convex event",
|
|
12
|
+
tags: ["Events"],
|
|
13
|
+
})
|
|
14
|
+
.input(z.object({
|
|
15
|
+
emittedAt: z.iso.datetime({ offset: true }),
|
|
16
|
+
endpointKey: z.string(),
|
|
17
|
+
id: z.string(),
|
|
18
|
+
name: z.string(),
|
|
19
|
+
payload: z.json(),
|
|
20
|
+
}))
|
|
21
|
+
.output(z.void()),
|
|
22
|
+
};
|
package/dist/events/index.d.ts
CHANGED
|
@@ -97,6 +97,13 @@ export declare const eventsContract: {
|
|
|
97
97
|
subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-forms-push">;
|
|
98
98
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
99
99
|
googleCalendarPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodVoid, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
100
|
+
convexEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
101
|
+
emittedAt: import("zod").ZodISODateTime;
|
|
102
|
+
endpointKey: import("zod").ZodString;
|
|
103
|
+
id: import("zod").ZodString;
|
|
104
|
+
name: import("zod").ZodString;
|
|
105
|
+
payload: import("zod").ZodJSONSchema;
|
|
106
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
100
107
|
brevoEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
101
108
|
event: import("zod").ZodString;
|
|
102
109
|
id: import("zod").ZodNumber;
|
package/dist/events/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { airtableEventsContract } from "./airtable.js";
|
|
2
2
|
import { asanaEventsContract } from "./asana.js";
|
|
3
3
|
import { brevoEventsContract } from "./brevo.js";
|
|
4
|
+
import { convexEventsContract } from "./convex.js";
|
|
4
5
|
import { googleCalendarEventsContract } from "./google-calendar.js";
|
|
5
6
|
import { googleFormsEventsContract } from "./google-forms.js";
|
|
6
7
|
import { googleMeetEventsContract } from "./google-meet.js";
|
|
@@ -18,6 +19,7 @@ export const eventsContract = {
|
|
|
18
19
|
...airtableEventsContract,
|
|
19
20
|
...asanaEventsContract,
|
|
20
21
|
...brevoEventsContract,
|
|
22
|
+
...convexEventsContract,
|
|
21
23
|
...googleCalendarEventsContract,
|
|
22
24
|
...googleFormsEventsContract,
|
|
23
25
|
...googleMeetEventsContract,
|
package/dist/execution-data.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const EXECUTION_DATASET_VERSION =
|
|
2
|
+
export declare const EXECUTION_DATASET_VERSION = 6;
|
|
3
3
|
export declare const executionDatasetResourceSchema: z.ZodEnum<{
|
|
4
4
|
automations: "automations";
|
|
5
5
|
projects: "projects";
|
|
6
6
|
actions: "actions";
|
|
7
7
|
events: "events";
|
|
8
8
|
outputs: "outputs";
|
|
9
|
+
"automation-invocations": "automation-invocations";
|
|
9
10
|
contexts: "contexts";
|
|
10
11
|
"context-parents": "context-parents";
|
|
11
12
|
"event-links": "event-links";
|
|
@@ -31,6 +32,7 @@ export declare const executionDatasetManifestSchema: z.ZodObject<{
|
|
|
31
32
|
actions: "actions";
|
|
32
33
|
events: "events";
|
|
33
34
|
outputs: "outputs";
|
|
35
|
+
"automation-invocations": "automation-invocations";
|
|
34
36
|
contexts: "contexts";
|
|
35
37
|
"context-parents": "context-parents";
|
|
36
38
|
"event-links": "event-links";
|
|
@@ -43,7 +45,7 @@ export declare const executionDatasetManifestSchema: z.ZodObject<{
|
|
|
43
45
|
}>;
|
|
44
46
|
url: z.ZodURL;
|
|
45
47
|
}, z.core.$strip>>;
|
|
46
|
-
schemaVersion: z.ZodLiteral<
|
|
48
|
+
schemaVersion: z.ZodLiteral<6>;
|
|
47
49
|
scope: z.ZodObject<{
|
|
48
50
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
49
51
|
projectId: z.ZodNullable<z.ZodString>;
|
|
@@ -68,6 +70,7 @@ export declare const executionDataContract: {
|
|
|
68
70
|
actions: "actions";
|
|
69
71
|
events: "events";
|
|
70
72
|
outputs: "outputs";
|
|
73
|
+
"automation-invocations": "automation-invocations";
|
|
71
74
|
contexts: "contexts";
|
|
72
75
|
"context-parents": "context-parents";
|
|
73
76
|
"event-links": "event-links";
|
|
@@ -80,7 +83,7 @@ export declare const executionDataContract: {
|
|
|
80
83
|
}>;
|
|
81
84
|
url: z.ZodURL;
|
|
82
85
|
}, z.core.$strip>>;
|
|
83
|
-
schemaVersion: z.ZodLiteral<
|
|
86
|
+
schemaVersion: z.ZodLiteral<6>;
|
|
84
87
|
scope: z.ZodObject<{
|
|
85
88
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
86
89
|
projectId: z.ZodNullable<z.ZodString>;
|
package/dist/execution-data.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
export const EXECUTION_DATASET_VERSION =
|
|
3
|
+
export const EXECUTION_DATASET_VERSION = 6;
|
|
4
4
|
export const executionDatasetResourceSchema = z.enum([
|
|
5
5
|
"projects",
|
|
6
6
|
"automations",
|
|
7
|
+
"automation-invocations",
|
|
7
8
|
"contexts",
|
|
8
9
|
"context-parents",
|
|
9
10
|
"event-links",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { automationExecutionStatusSchema, automationOutputSchema, } from "./automation.js";
|
|
2
2
|
export { EXECUTION_DATASET_VERSION, executionDatasetManifestSchema, executionDatasetResourceSchema, executionDatasetScopeSchema, type ExecutionDatasetManifest, type ExecutionDatasetResource, type ExecutionDatasetScope, executionDataContract, } from "./execution-data.js";
|
|
3
3
|
export { AUTOMATION_SDK_VERSION, deploymentOutputSchema, deploymentStatusSchema, } from "./deployment.js";
|
|
4
|
+
export { AUTOMATION_RUNTIME_PROTOCOL_VERSION } from "./runtime-protocol.js";
|
|
4
5
|
export { AUTOMATION_ERROR_CAUSE_DEPTH, automationErrorSchema, type AutomationErrorValue, } from "./errors.js";
|
|
5
6
|
export { integrationAccountOutputSchema, integrationAccountRevocationImpactOutputSchema, integrationAccountRevocationOutputSchema, integrationServiceOutputSchema, } from "./account.js";
|
|
6
7
|
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS, AUTOMATION_TRACE_MAX_NAME_LENGTH, AUTOMATION_TRACE_MAX_SPANS, DEFAULT_GATEWAY_MODEL_ID, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, hashSignalCoordinatorConfiguration, runtimeContract, type GenerationInput, type GenerationResult, type RuntimeGenerationInput, type RuntimeCoordinationOffer, } from "./runtime.js";
|
|
@@ -650,6 +651,14 @@ export declare const publicContract: {
|
|
|
650
651
|
readonly message: "A deployment is already in progress.";
|
|
651
652
|
readonly status: 409;
|
|
652
653
|
};
|
|
654
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: {
|
|
655
|
+
readonly data: import("zod").ZodObject<{
|
|
656
|
+
receivedVersion: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
657
|
+
supportedVersion: import("zod").ZodLiteral<1>;
|
|
658
|
+
}, import("zod/v4/core").$strip>;
|
|
659
|
+
readonly message: "The automation bundle uses an unsupported runtime protocol.";
|
|
660
|
+
readonly status: 400;
|
|
661
|
+
};
|
|
653
662
|
}>, Record<never, never>>;
|
|
654
663
|
};
|
|
655
664
|
executionData: {
|
|
@@ -667,6 +676,7 @@ export declare const publicContract: {
|
|
|
667
676
|
actions: "actions";
|
|
668
677
|
events: "events";
|
|
669
678
|
outputs: "outputs";
|
|
679
|
+
"automation-invocations": "automation-invocations";
|
|
670
680
|
contexts: "contexts";
|
|
671
681
|
"context-parents": "context-parents";
|
|
672
682
|
"event-links": "event-links";
|
|
@@ -679,7 +689,7 @@ export declare const publicContract: {
|
|
|
679
689
|
}>;
|
|
680
690
|
url: import("zod").ZodURL;
|
|
681
691
|
}, import("zod/v4/core").$strip>>;
|
|
682
|
-
schemaVersion: import("zod").ZodLiteral<
|
|
692
|
+
schemaVersion: import("zod").ZodLiteral<6>;
|
|
683
693
|
scope: import("zod").ZodObject<{
|
|
684
694
|
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
685
695
|
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -1211,6 +1221,7 @@ export declare const firstPartyContract: {
|
|
|
1211
1221
|
}>;
|
|
1212
1222
|
projectId: import("zod").ZodString;
|
|
1213
1223
|
rebindAccounts: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
1224
|
+
runtimeProtocolVersion: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1214
1225
|
git: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1215
1226
|
commitSha: import("zod").ZodString;
|
|
1216
1227
|
dirty: import("zod").ZodBoolean;
|
|
@@ -1236,6 +1247,14 @@ export declare const firstPartyContract: {
|
|
|
1236
1247
|
readonly message: "A deployment is already in progress.";
|
|
1237
1248
|
readonly status: 409;
|
|
1238
1249
|
};
|
|
1250
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: {
|
|
1251
|
+
readonly data: import("zod").ZodObject<{
|
|
1252
|
+
receivedVersion: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1253
|
+
supportedVersion: import("zod").ZodLiteral<1>;
|
|
1254
|
+
}, import("zod/v4/core").$strip>;
|
|
1255
|
+
readonly message: "The automation bundle uses an unsupported runtime protocol.";
|
|
1256
|
+
readonly status: 400;
|
|
1257
|
+
};
|
|
1239
1258
|
}>, Record<never, never>>;
|
|
1240
1259
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1241
1260
|
deploymentId: import("zod").ZodString;
|
|
@@ -1404,6 +1423,14 @@ export declare const firstPartyContract: {
|
|
|
1404
1423
|
readonly message: "A deployment is already in progress.";
|
|
1405
1424
|
readonly status: 409;
|
|
1406
1425
|
};
|
|
1426
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: {
|
|
1427
|
+
readonly data: import("zod").ZodObject<{
|
|
1428
|
+
receivedVersion: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1429
|
+
supportedVersion: import("zod").ZodLiteral<1>;
|
|
1430
|
+
}, import("zod/v4/core").$strip>;
|
|
1431
|
+
readonly message: "The automation bundle uses an unsupported runtime protocol.";
|
|
1432
|
+
readonly status: 400;
|
|
1433
|
+
};
|
|
1407
1434
|
}>, Record<never, never>>;
|
|
1408
1435
|
};
|
|
1409
1436
|
org: {
|
|
@@ -2002,6 +2029,7 @@ export declare const firstPartyContract: {
|
|
|
2002
2029
|
actions: "actions";
|
|
2003
2030
|
events: "events";
|
|
2004
2031
|
outputs: "outputs";
|
|
2032
|
+
"automation-invocations": "automation-invocations";
|
|
2005
2033
|
contexts: "contexts";
|
|
2006
2034
|
"context-parents": "context-parents";
|
|
2007
2035
|
"event-links": "event-links";
|
|
@@ -2014,7 +2042,7 @@ export declare const firstPartyContract: {
|
|
|
2014
2042
|
}>;
|
|
2015
2043
|
url: import("zod").ZodURL;
|
|
2016
2044
|
}, import("zod/v4/core").$strip>>;
|
|
2017
|
-
schemaVersion: import("zod").ZodLiteral<
|
|
2045
|
+
schemaVersion: import("zod").ZodLiteral<6>;
|
|
2018
2046
|
scope: import("zod").ZodObject<{
|
|
2019
2047
|
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2020
2048
|
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -2195,6 +2223,13 @@ export declare const contract: {
|
|
|
2195
2223
|
subscription: import("zod").ZodLiteral<"projects/opkitty/subscriptions/automate-ax-google-forms-push">;
|
|
2196
2224
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
2197
2225
|
googleCalendarPush: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodVoid, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
2226
|
+
convexEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2227
|
+
emittedAt: import("zod").ZodISODateTime;
|
|
2228
|
+
endpointKey: import("zod").ZodString;
|
|
2229
|
+
id: import("zod").ZodString;
|
|
2230
|
+
name: import("zod").ZodString;
|
|
2231
|
+
payload: import("zod").ZodJSONSchema;
|
|
2232
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
2198
2233
|
brevoEvent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
2199
2234
|
event: import("zod").ZodString;
|
|
2200
2235
|
id: import("zod").ZodNumber;
|
|
@@ -3639,6 +3674,7 @@ export declare const contract: {
|
|
|
3639
3674
|
}>;
|
|
3640
3675
|
projectId: import("zod").ZodString;
|
|
3641
3676
|
rebindAccounts: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
3677
|
+
runtimeProtocolVersion: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
3642
3678
|
git: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3643
3679
|
commitSha: import("zod").ZodString;
|
|
3644
3680
|
dirty: import("zod").ZodBoolean;
|
|
@@ -3664,6 +3700,14 @@ export declare const contract: {
|
|
|
3664
3700
|
readonly message: "A deployment is already in progress.";
|
|
3665
3701
|
readonly status: 409;
|
|
3666
3702
|
};
|
|
3703
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: {
|
|
3704
|
+
readonly data: import("zod").ZodObject<{
|
|
3705
|
+
receivedVersion: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
3706
|
+
supportedVersion: import("zod").ZodLiteral<1>;
|
|
3707
|
+
}, import("zod/v4/core").$strip>;
|
|
3708
|
+
readonly message: "The automation bundle uses an unsupported runtime protocol.";
|
|
3709
|
+
readonly status: 400;
|
|
3710
|
+
};
|
|
3667
3711
|
}>, Record<never, never>>;
|
|
3668
3712
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
3669
3713
|
deploymentId: import("zod").ZodString;
|
|
@@ -3832,6 +3876,14 @@ export declare const contract: {
|
|
|
3832
3876
|
readonly message: "A deployment is already in progress.";
|
|
3833
3877
|
readonly status: 409;
|
|
3834
3878
|
};
|
|
3879
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: {
|
|
3880
|
+
readonly data: import("zod").ZodObject<{
|
|
3881
|
+
receivedVersion: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
3882
|
+
supportedVersion: import("zod").ZodLiteral<1>;
|
|
3883
|
+
}, import("zod/v4/core").$strip>;
|
|
3884
|
+
readonly message: "The automation bundle uses an unsupported runtime protocol.";
|
|
3885
|
+
readonly status: 400;
|
|
3886
|
+
};
|
|
3835
3887
|
}>, Record<never, never>>;
|
|
3836
3888
|
};
|
|
3837
3889
|
org: {
|
|
@@ -4430,6 +4482,7 @@ export declare const contract: {
|
|
|
4430
4482
|
actions: "actions";
|
|
4431
4483
|
events: "events";
|
|
4432
4484
|
outputs: "outputs";
|
|
4485
|
+
"automation-invocations": "automation-invocations";
|
|
4433
4486
|
contexts: "contexts";
|
|
4434
4487
|
"context-parents": "context-parents";
|
|
4435
4488
|
"event-links": "event-links";
|
|
@@ -4442,7 +4495,7 @@ export declare const contract: {
|
|
|
4442
4495
|
}>;
|
|
4443
4496
|
url: import("zod").ZodURL;
|
|
4444
4497
|
}, import("zod/v4/core").$strip>>;
|
|
4445
|
-
schemaVersion: import("zod").ZodLiteral<
|
|
4498
|
+
schemaVersion: import("zod").ZodLiteral<6>;
|
|
4446
4499
|
scope: import("zod").ZodObject<{
|
|
4447
4500
|
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
4448
4501
|
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { runtimeContract } from "./runtime.js";
|
|
|
12
12
|
export { automationExecutionStatusSchema, automationOutputSchema, } from "./automation.js";
|
|
13
13
|
export { EXECUTION_DATASET_VERSION, executionDatasetManifestSchema, executionDatasetResourceSchema, executionDatasetScopeSchema, executionDataContract, } from "./execution-data.js";
|
|
14
14
|
export { AUTOMATION_SDK_VERSION, deploymentOutputSchema, deploymentStatusSchema, } from "./deployment.js";
|
|
15
|
+
export { AUTOMATION_RUNTIME_PROTOCOL_VERSION } from "./runtime-protocol.js";
|
|
15
16
|
export { AUTOMATION_ERROR_CAUSE_DEPTH, automationErrorSchema, } from "./errors.js";
|
|
16
17
|
export { integrationAccountOutputSchema, integrationAccountRevocationImpactOutputSchema, integrationAccountRevocationOutputSchema, integrationServiceOutputSchema, } from "./account.js";
|
|
17
18
|
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS, AUTOMATION_TRACE_MAX_NAME_LENGTH, AUTOMATION_TRACE_MAX_SPANS, DEFAULT_GATEWAY_MODEL_ID, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, hashSignalCoordinatorConfiguration, runtimeContract, } from "./runtime.js";
|
package/dist/runtime.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type { GatewayModelId } from "@ai-sdk/gateway";
|
|
|
5
5
|
export declare const DEFAULT_GATEWAY_MODEL_ID = "openai/gpt-4.1-nano";
|
|
6
6
|
export declare const AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT = "default";
|
|
7
7
|
export declare const AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX = "__$";
|
|
8
|
+
export declare const AUTOMATION_DELAY_ENTRYPOINT_PREFIX: "__$delay:";
|
|
8
9
|
export declare const CALLBACK_PROTECTION_QUERY_PARAMETER = "_axCallback";
|
|
9
10
|
export declare const AUTOMATION_LOG_MAX_ENTRIES = 1000;
|
|
10
11
|
export declare const AUTOMATION_TRACE_MAX_SPANS = 250;
|
package/dist/runtime.js
CHANGED
|
@@ -7,6 +7,7 @@ import { automationErrorSchema } from "./errors.js";
|
|
|
7
7
|
export const DEFAULT_GATEWAY_MODEL_ID = "openai/gpt-4.1-nano";
|
|
8
8
|
export const AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT = "default";
|
|
9
9
|
export const AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX = "__$";
|
|
10
|
+
export const AUTOMATION_DELAY_ENTRYPOINT_PREFIX = `${AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX}delay:`;
|
|
10
11
|
export const CALLBACK_PROTECTION_QUERY_PARAMETER = "_axCallback";
|
|
11
12
|
export const AUTOMATION_LOG_MAX_ENTRIES = 1_000;
|
|
12
13
|
export const AUTOMATION_TRACE_MAX_SPANS = 250;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.1",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
".": "./src/index.ts",
|
|
22
22
|
"./errors": "./src/errors.ts",
|
|
23
23
|
"./permissions": "./src/permissions.ts",
|
|
24
|
+
"./runtime-protocol": "./src/runtime-protocol.ts",
|
|
24
25
|
"./runtime": "./src/runtime.ts"
|
|
25
26
|
},
|
|
26
27
|
"cjs": false,
|
|
@@ -30,13 +31,14 @@
|
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"@ai-sdk/gateway": "^4.0.46",
|
|
33
|
-
"@automate.ax/codec": "0.
|
|
34
|
+
"@automate.ax/codec": "0.83.1",
|
|
35
|
+
"@automate.ax/integration-contracts": "0.83.1",
|
|
34
36
|
"@orpc/contract": "1.15.0",
|
|
35
37
|
"fast-json-stable-stringify": "^2.1.0",
|
|
36
38
|
"zod": "^4.3.6"
|
|
37
39
|
},
|
|
38
40
|
"devDependencies": {
|
|
39
|
-
"@internal/config": "0.
|
|
41
|
+
"@internal/config": "0.1.0",
|
|
40
42
|
"@types/bun": "latest",
|
|
41
43
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
42
44
|
"@zachsents/oxlint-config": "^0.4.1",
|
|
@@ -81,6 +83,11 @@
|
|
|
81
83
|
"types": "./dist/permissions.d.ts",
|
|
82
84
|
"default": "./dist/permissions.js"
|
|
83
85
|
},
|
|
86
|
+
"./runtime-protocol": {
|
|
87
|
+
"bun": "./src/runtime-protocol.ts",
|
|
88
|
+
"types": "./dist/runtime-protocol.d.ts",
|
|
89
|
+
"default": "./dist/runtime-protocol.js"
|
|
90
|
+
},
|
|
84
91
|
"./runtime": {
|
|
85
92
|
"bun": "./src/runtime.ts",
|
|
86
93
|
"types": "./dist/runtime.d.ts",
|
package/src/deployment.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract"
|
|
2
2
|
import * as z from "zod"
|
|
3
|
+
import { AUTOMATION_RUNTIME_PROTOCOL_VERSION } from "./runtime-protocol"
|
|
3
4
|
import { cursorPageOutputSchema, cursorPaginationInputSchema } from "./schemas"
|
|
4
5
|
|
|
5
6
|
/** SDK compatibility version used to select the immutable runtime image. */
|
|
@@ -24,6 +25,15 @@ const DEPLOYMENT_IN_PROGRESS_ERROR = {
|
|
|
24
25
|
status: 409,
|
|
25
26
|
} as const
|
|
26
27
|
|
|
28
|
+
const UNSUPPORTED_RUNTIME_PROTOCOL_ERROR = {
|
|
29
|
+
data: z.object({
|
|
30
|
+
receivedVersion: z.number().int().positive().nullable(),
|
|
31
|
+
supportedVersion: z.literal(AUTOMATION_RUNTIME_PROTOCOL_VERSION),
|
|
32
|
+
}),
|
|
33
|
+
message: "The automation bundle uses an unsupported runtime protocol.",
|
|
34
|
+
status: 400,
|
|
35
|
+
} as const
|
|
36
|
+
|
|
27
37
|
const GIT_SOURCE_SCHEMA = z.object({
|
|
28
38
|
commitSha: z.string().regex(/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/),
|
|
29
39
|
dirty: z.boolean(),
|
|
@@ -96,7 +106,10 @@ export const deploymentContract = {
|
|
|
96
106
|
.input(z.object({ deploymentId: z.string() }))
|
|
97
107
|
.output(z.void()),
|
|
98
108
|
create: oc
|
|
99
|
-
.errors({
|
|
109
|
+
.errors({
|
|
110
|
+
DEPLOYMENT_IN_PROGRESS: DEPLOYMENT_IN_PROGRESS_ERROR,
|
|
111
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: UNSUPPORTED_RUNTIME_PROTOCOL_ERROR,
|
|
112
|
+
})
|
|
100
113
|
.input(
|
|
101
114
|
z.object({
|
|
102
115
|
artifact: z.instanceof(Blob),
|
|
@@ -123,6 +136,7 @@ export const deploymentContract = {
|
|
|
123
136
|
mode: z.enum(["reconcile", "upsert"]),
|
|
124
137
|
projectId: z.string(),
|
|
125
138
|
rebindAccounts: z.boolean().default(false),
|
|
139
|
+
runtimeProtocolVersion: z.number().int().positive().optional(),
|
|
126
140
|
git: GIT_SOURCE_SCHEMA.optional(),
|
|
127
141
|
}),
|
|
128
142
|
)
|
|
@@ -171,7 +185,10 @@ export const deploymentContract = {
|
|
|
171
185
|
)
|
|
172
186
|
.output(cursorPageOutputSchema(deploymentOutputSchema)),
|
|
173
187
|
redeploy: oc
|
|
174
|
-
.errors({
|
|
188
|
+
.errors({
|
|
189
|
+
DEPLOYMENT_IN_PROGRESS: DEPLOYMENT_IN_PROGRESS_ERROR,
|
|
190
|
+
UNSUPPORTED_RUNTIME_PROTOCOL: UNSUPPORTED_RUNTIME_PROTOCOL_ERROR,
|
|
191
|
+
})
|
|
175
192
|
.route({
|
|
176
193
|
method: "POST",
|
|
177
194
|
path: "/projects/{projectId}/deployments/redeploy",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract"
|
|
2
|
+
import * as z from "zod"
|
|
3
|
+
|
|
4
|
+
export const convexEventsContract = {
|
|
5
|
+
convexEvent: oc
|
|
6
|
+
.route({
|
|
7
|
+
description:
|
|
8
|
+
"Authenticates and ingests a semantic event emitted by a Convex action.",
|
|
9
|
+
method: "POST",
|
|
10
|
+
operationId: "receiveConvexEvent",
|
|
11
|
+
path: "/events/convex/{endpointKey}",
|
|
12
|
+
successStatus: 204,
|
|
13
|
+
summary: "Receive a signed Convex event",
|
|
14
|
+
tags: ["Events"],
|
|
15
|
+
})
|
|
16
|
+
.input(
|
|
17
|
+
z.object({
|
|
18
|
+
emittedAt: z.iso.datetime({ offset: true }),
|
|
19
|
+
endpointKey: z.string(),
|
|
20
|
+
id: z.string(),
|
|
21
|
+
name: z.string(),
|
|
22
|
+
payload: z.json(),
|
|
23
|
+
}),
|
|
24
|
+
)
|
|
25
|
+
.output(z.void()),
|
|
26
|
+
}
|
package/src/events/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { airtableEventsContract } from "./airtable"
|
|
2
2
|
import { asanaEventsContract } from "./asana"
|
|
3
3
|
import { brevoEventsContract } from "./brevo"
|
|
4
|
+
import { convexEventsContract } from "./convex"
|
|
4
5
|
import { googleCalendarEventsContract } from "./google-calendar"
|
|
5
6
|
import { googleFormsEventsContract } from "./google-forms"
|
|
6
7
|
import { googleMeetEventsContract } from "./google-meet"
|
|
@@ -19,6 +20,7 @@ export const eventsContract = {
|
|
|
19
20
|
...airtableEventsContract,
|
|
20
21
|
...asanaEventsContract,
|
|
21
22
|
...brevoEventsContract,
|
|
23
|
+
...convexEventsContract,
|
|
22
24
|
...googleCalendarEventsContract,
|
|
23
25
|
...googleFormsEventsContract,
|
|
24
26
|
...googleMeetEventsContract,
|
package/src/execution-data.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract"
|
|
2
2
|
import { z } from "zod"
|
|
3
3
|
|
|
4
|
-
export const EXECUTION_DATASET_VERSION =
|
|
4
|
+
export const EXECUTION_DATASET_VERSION = 6
|
|
5
5
|
|
|
6
6
|
export const executionDatasetResourceSchema = z.enum([
|
|
7
7
|
"projects",
|
|
8
8
|
"automations",
|
|
9
|
+
"automation-invocations",
|
|
9
10
|
"contexts",
|
|
10
11
|
"context-parents",
|
|
11
12
|
"event-links",
|
package/src/index.ts
CHANGED
package/src/runtime.ts
CHANGED
|
@@ -12,6 +12,8 @@ export const DEFAULT_GATEWAY_MODEL_ID =
|
|
|
12
12
|
"openai/gpt-4.1-nano" satisfies GatewayModelId
|
|
13
13
|
export const AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT = "default"
|
|
14
14
|
export const AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX = "__$"
|
|
15
|
+
export const AUTOMATION_DELAY_ENTRYPOINT_PREFIX =
|
|
16
|
+
`${AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX}delay:` as const
|
|
15
17
|
export const CALLBACK_PROTECTION_QUERY_PARAMETER = "_axCallback"
|
|
16
18
|
export const AUTOMATION_LOG_MAX_ENTRIES = 1_000
|
|
17
19
|
export const AUTOMATION_TRACE_MAX_SPANS = 250
|