@automate.ax/api-contract 0.96.0 → 0.97.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/execution-data.d.ts +7 -5
- package/dist/execution-data.js +8 -2
- package/dist/index.d.ts +7 -25
- package/dist/index.js +1 -1
- package/dist/runtime.d.ts +0 -20
- package/dist/runtime.js +1 -32
- package/package.json +3 -3
- package/src/execution-data.ts +10 -2
- package/src/index.ts +0 -2
- package/src/runtime.ts +2 -38
package/dist/execution-data.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const EXECUTION_DATASET_VERSION = 8;
|
|
3
|
+
/** @deprecated Retained until execution dataset version 8 clients are retired. */
|
|
4
|
+
export declare const LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE: "trace-spans";
|
|
3
5
|
export declare const executionDatasetResourceSchema: z.ZodEnum<{
|
|
4
6
|
automations: "automations";
|
|
5
7
|
projects: "projects";
|
|
6
8
|
events: "events";
|
|
7
9
|
actions: "actions";
|
|
8
10
|
outputs: "outputs";
|
|
11
|
+
"trace-spans": "trace-spans";
|
|
9
12
|
"automation-invocations": "automation-invocations";
|
|
10
13
|
contexts: "contexts";
|
|
11
14
|
"context-parents": "context-parents";
|
|
@@ -16,7 +19,6 @@ export declare const executionDatasetResourceSchema: z.ZodEnum<{
|
|
|
16
19
|
"signal-offers": "signal-offers";
|
|
17
20
|
"signal-decisions": "signal-decisions";
|
|
18
21
|
logs: "logs";
|
|
19
|
-
"trace-spans": "trace-spans";
|
|
20
22
|
}>;
|
|
21
23
|
export declare const executionDatasetScopeSchema: z.ZodObject<{
|
|
22
24
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
@@ -34,6 +36,7 @@ export declare const executionDatasetManifestSchema: z.ZodObject<{
|
|
|
34
36
|
events: "events";
|
|
35
37
|
actions: "actions";
|
|
36
38
|
outputs: "outputs";
|
|
39
|
+
"trace-spans": "trace-spans";
|
|
37
40
|
"automation-invocations": "automation-invocations";
|
|
38
41
|
contexts: "contexts";
|
|
39
42
|
"context-parents": "context-parents";
|
|
@@ -44,11 +47,10 @@ export declare const executionDatasetManifestSchema: z.ZodObject<{
|
|
|
44
47
|
"signal-offers": "signal-offers";
|
|
45
48
|
"signal-decisions": "signal-decisions";
|
|
46
49
|
logs: "logs";
|
|
47
|
-
"trace-spans": "trace-spans";
|
|
48
50
|
}>;
|
|
49
51
|
url: z.ZodURL;
|
|
50
52
|
}, z.core.$strip>>;
|
|
51
|
-
schemaVersion: z.ZodLiteral<8>;
|
|
53
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<8>, z.ZodLiteral<9>]>;
|
|
52
54
|
scope: z.ZodObject<{
|
|
53
55
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
54
56
|
projectId: z.ZodNullable<z.ZodString>;
|
|
@@ -73,6 +75,7 @@ export declare const executionDataContract: {
|
|
|
73
75
|
events: "events";
|
|
74
76
|
actions: "actions";
|
|
75
77
|
outputs: "outputs";
|
|
78
|
+
"trace-spans": "trace-spans";
|
|
76
79
|
"automation-invocations": "automation-invocations";
|
|
77
80
|
contexts: "contexts";
|
|
78
81
|
"context-parents": "context-parents";
|
|
@@ -83,11 +86,10 @@ export declare const executionDataContract: {
|
|
|
83
86
|
"signal-offers": "signal-offers";
|
|
84
87
|
"signal-decisions": "signal-decisions";
|
|
85
88
|
logs: "logs";
|
|
86
|
-
"trace-spans": "trace-spans";
|
|
87
89
|
}>;
|
|
88
90
|
url: z.ZodURL;
|
|
89
91
|
}, z.core.$strip>>;
|
|
90
|
-
schemaVersion: z.ZodLiteral<8>;
|
|
92
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<8>, z.ZodLiteral<9>]>;
|
|
91
93
|
scope: z.ZodObject<{
|
|
92
94
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
93
95
|
projectId: z.ZodNullable<z.ZodString>;
|
package/dist/execution-data.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export const EXECUTION_DATASET_VERSION = 8;
|
|
4
|
+
const NEXT_EXECUTION_DATASET_VERSION = 9;
|
|
5
|
+
/** @deprecated Retained until execution dataset version 8 clients are retired. */
|
|
6
|
+
export const LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE = "trace-spans";
|
|
4
7
|
export const executionDatasetResourceSchema = z.enum([
|
|
5
8
|
"projects",
|
|
6
9
|
"automations",
|
|
@@ -17,7 +20,7 @@ export const executionDatasetResourceSchema = z.enum([
|
|
|
17
20
|
"signal-decisions",
|
|
18
21
|
"logs",
|
|
19
22
|
"outputs",
|
|
20
|
-
|
|
23
|
+
LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE,
|
|
21
24
|
]);
|
|
22
25
|
export const executionDatasetScopeSchema = z.object({
|
|
23
26
|
organizationId: z.string().nullable(),
|
|
@@ -36,7 +39,10 @@ export const executionDatasetManifestSchema = z.object({
|
|
|
36
39
|
url: z.url(),
|
|
37
40
|
})
|
|
38
41
|
.array(),
|
|
39
|
-
schemaVersion: z.
|
|
42
|
+
schemaVersion: z.union([
|
|
43
|
+
z.literal(EXECUTION_DATASET_VERSION),
|
|
44
|
+
z.literal(NEXT_EXECUTION_DATASET_VERSION),
|
|
45
|
+
]),
|
|
40
46
|
scope: executionDatasetScopeSchema,
|
|
41
47
|
});
|
|
42
48
|
export const executionDataContract = {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { AUTOMATION_SDK_VERSION, deploymentOutputSchema, deploymentStatusSchema,
|
|
|
4
4
|
export { AUTOMATION_RUNTIME_PROTOCOL_VERSION } from "./runtime-protocol.js";
|
|
5
5
|
export { AUTOMATION_ERROR_CAUSE_DEPTH, automationErrorSchema, type AutomationErrorValue, } from "./errors.js";
|
|
6
6
|
export { integrationAccountOutputSchema, integrationAccountRevocationImpactOutputSchema, integrationAccountRevocationOutputSchema, integrationServiceOutputSchema, } from "./account.js";
|
|
7
|
-
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS,
|
|
7
|
+
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS, DEFAULT_GATEWAY_IMAGE_MODEL_ID, DEFAULT_GATEWAY_MODEL_ID, DEFAULT_ACTION_MAX_ATTEMPTS, MAX_ACTION_ATTEMPTS, actionReplaySafetySchema, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, imageGenerationInputSchema, imageGenerationCompletionSchema, imageGenerationResultSchema, platformImageGenerationInputSchema, platformImageGenerationStartSchema, hashSignalCoordinatorConfiguration, runtimeContract, type GenerationInput, type GenerationResult, type ImageGenerationInput, type ImageGenerationCompletion, type ImageGenerationResult, type PlatformImageGenerationInput, type RuntimeGenerationInput, type RuntimeCoordinationOffer, type ActionReplaySafety, type RuntimeActionAttemptCompletion, type RuntimeActionAttemptStart, } from "./runtime.js";
|
|
8
8
|
export type { GatewayImageModelId, GatewayModelId } from "@ai-sdk/gateway";
|
|
9
9
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
10
10
|
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
@@ -676,6 +676,7 @@ export declare const publicContract: {
|
|
|
676
676
|
events: "events";
|
|
677
677
|
actions: "actions";
|
|
678
678
|
outputs: "outputs";
|
|
679
|
+
"trace-spans": "trace-spans";
|
|
679
680
|
"automation-invocations": "automation-invocations";
|
|
680
681
|
contexts: "contexts";
|
|
681
682
|
"context-parents": "context-parents";
|
|
@@ -686,11 +687,10 @@ export declare const publicContract: {
|
|
|
686
687
|
"signal-offers": "signal-offers";
|
|
687
688
|
"signal-decisions": "signal-decisions";
|
|
688
689
|
logs: "logs";
|
|
689
|
-
"trace-spans": "trace-spans";
|
|
690
690
|
}>;
|
|
691
691
|
url: import("zod").ZodURL;
|
|
692
692
|
}, import("zod/v4/core").$strip>>;
|
|
693
|
-
schemaVersion: import("zod").ZodLiteral<8>;
|
|
693
|
+
schemaVersion: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<8>, import("zod").ZodLiteral<9>]>;
|
|
694
694
|
scope: import("zod").ZodObject<{
|
|
695
695
|
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
696
696
|
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -2032,6 +2032,7 @@ export declare const firstPartyContract: {
|
|
|
2032
2032
|
events: "events";
|
|
2033
2033
|
actions: "actions";
|
|
2034
2034
|
outputs: "outputs";
|
|
2035
|
+
"trace-spans": "trace-spans";
|
|
2035
2036
|
"automation-invocations": "automation-invocations";
|
|
2036
2037
|
contexts: "contexts";
|
|
2037
2038
|
"context-parents": "context-parents";
|
|
@@ -2042,11 +2043,10 @@ export declare const firstPartyContract: {
|
|
|
2042
2043
|
"signal-offers": "signal-offers";
|
|
2043
2044
|
"signal-decisions": "signal-decisions";
|
|
2044
2045
|
logs: "logs";
|
|
2045
|
-
"trace-spans": "trace-spans";
|
|
2046
2046
|
}>;
|
|
2047
2047
|
url: import("zod").ZodURL;
|
|
2048
2048
|
}, import("zod/v4/core").$strip>>;
|
|
2049
|
-
schemaVersion: import("zod").ZodLiteral<8>;
|
|
2049
|
+
schemaVersion: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<8>, import("zod").ZodLiteral<9>]>;
|
|
2050
2050
|
scope: import("zod").ZodObject<{
|
|
2051
2051
|
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
2052
2052
|
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
@@ -4208,15 +4208,6 @@ export declare const contract: {
|
|
|
4208
4208
|
output: import("zod").ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
4209
4209
|
status: import("zod").ZodLiteral<"succeeded">;
|
|
4210
4210
|
}, import("zod/v4/core").$strip>], "status">, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
4211
|
-
completeTraceSpan: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
4212
|
-
completedAt: import("zod").ZodDate;
|
|
4213
|
-
spanIndex: import("zod").ZodNumber;
|
|
4214
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
4215
|
-
status: import("zod").ZodLiteral<"succeeded">;
|
|
4216
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
4217
|
-
failure: import("zod").ZodType<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue, import("zod/v4/core").$ZodTypeInternals<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue>>;
|
|
4218
|
-
status: import("zod").ZodLiteral<"failed">;
|
|
4219
|
-
}, import("zod/v4/core").$strip>]>>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
4220
4211
|
generate: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
4221
4212
|
frequencyPenalty: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4222
4213
|
instructions: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -4970,17 +4961,8 @@ export declare const contract: {
|
|
|
4970
4961
|
logIndex: import("zod").ZodNumber;
|
|
4971
4962
|
message: import("zod").ZodString;
|
|
4972
4963
|
sensitivity: import("zod").ZodOptional<import("zod").ZodCustom<import("@automate.ax/codec").SensitivityMask, import("@automate.ax/codec").SensitivityMask>>;
|
|
4973
|
-
spanIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4974
4964
|
timestamp: import("zod").ZodDate;
|
|
4975
4965
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
4976
|
-
startTraceSpan: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
4977
|
-
attributes: import("zod").ZodOptional<import("zod").ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>>;
|
|
4978
|
-
name: import("zod").ZodString;
|
|
4979
|
-
sensitivity: import("zod").ZodOptional<import("zod").ZodCustom<import("@automate.ax/codec").SensitivityMask, import("@automate.ax/codec").SensitivityMask>>;
|
|
4980
|
-
parentSpanIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4981
|
-
spanIndex: import("zod").ZodNumber;
|
|
4982
|
-
startedAt: import("zod").ZodDate;
|
|
4983
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
4984
4966
|
sendEmail: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
4985
4967
|
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
4986
4968
|
replyTo: import("zod").ZodOptional<import("zod").ZodEmail>;
|
|
@@ -6011,6 +5993,7 @@ export declare const contract: {
|
|
|
6011
5993
|
events: "events";
|
|
6012
5994
|
actions: "actions";
|
|
6013
5995
|
outputs: "outputs";
|
|
5996
|
+
"trace-spans": "trace-spans";
|
|
6014
5997
|
"automation-invocations": "automation-invocations";
|
|
6015
5998
|
contexts: "contexts";
|
|
6016
5999
|
"context-parents": "context-parents";
|
|
@@ -6021,11 +6004,10 @@ export declare const contract: {
|
|
|
6021
6004
|
"signal-offers": "signal-offers";
|
|
6022
6005
|
"signal-decisions": "signal-decisions";
|
|
6023
6006
|
logs: "logs";
|
|
6024
|
-
"trace-spans": "trace-spans";
|
|
6025
6007
|
}>;
|
|
6026
6008
|
url: import("zod").ZodURL;
|
|
6027
6009
|
}, import("zod/v4/core").$strip>>;
|
|
6028
|
-
schemaVersion: import("zod").ZodLiteral<8>;
|
|
6010
|
+
schemaVersion: import("zod").ZodUnion<readonly [import("zod").ZodLiteral<8>, import("zod").ZodLiteral<9>]>;
|
|
6029
6011
|
scope: import("zod").ZodObject<{
|
|
6030
6012
|
organizationId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
6031
6013
|
projectId: import("zod").ZodNullable<import("zod").ZodString>;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export { AUTOMATION_SDK_VERSION, deploymentOutputSchema, deploymentStatusSchema,
|
|
|
15
15
|
export { AUTOMATION_RUNTIME_PROTOCOL_VERSION } from "./runtime-protocol.js";
|
|
16
16
|
export { AUTOMATION_ERROR_CAUSE_DEPTH, automationErrorSchema, } from "./errors.js";
|
|
17
17
|
export { integrationAccountOutputSchema, integrationAccountRevocationImpactOutputSchema, integrationAccountRevocationOutputSchema, integrationServiceOutputSchema, } from "./account.js";
|
|
18
|
-
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS,
|
|
18
|
+
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS, DEFAULT_GATEWAY_IMAGE_MODEL_ID, DEFAULT_GATEWAY_MODEL_ID, DEFAULT_ACTION_MAX_ATTEMPTS, MAX_ACTION_ATTEMPTS, actionReplaySafetySchema, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, imageGenerationInputSchema, imageGenerationCompletionSchema, imageGenerationResultSchema, platformImageGenerationInputSchema, platformImageGenerationStartSchema, hashSignalCoordinatorConfiguration, runtimeContract, } from "./runtime.js";
|
|
19
19
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
20
20
|
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
21
21
|
export { projectOutputSchema } from "./project.js";
|
package/dist/runtime.d.ts
CHANGED
|
@@ -12,11 +12,9 @@ export declare const AUTOMATION_DELAY_ENTRYPOINT_PREFIX: "__$delay:";
|
|
|
12
12
|
export declare const AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX: "__$generate-image:";
|
|
13
13
|
export declare const CALLBACK_PROTECTION_QUERY_PARAMETER = "_axCallback";
|
|
14
14
|
export declare const AUTOMATION_LOG_MAX_ENTRIES = 1000;
|
|
15
|
-
export declare const AUTOMATION_TRACE_MAX_SPANS = 250;
|
|
16
15
|
export declare const AUTOMATION_OBSERVABILITY_MAX_FIELDS = 64;
|
|
17
16
|
export declare const AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES: number;
|
|
18
17
|
export declare const AUTOMATION_LOG_MAX_MESSAGE_LENGTH = 16384;
|
|
19
|
-
export declare const AUTOMATION_TRACE_MAX_NAME_LENGTH = 256;
|
|
20
18
|
export declare const runtimeObservabilityFieldsSchema: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodCustom<import("@automate.ax/codec").Encodable, import("@automate.ax/codec").Encodable>>>;
|
|
21
19
|
/** Runtime-validated structural policy for author-visible value projection. */
|
|
22
20
|
export declare const sensitivityMaskSchema: z.ZodCustom<SensitivityMask, SensitivityMask>;
|
|
@@ -1712,15 +1710,6 @@ export declare const runtimeContract: {
|
|
|
1712
1710
|
output: z.ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
1713
1711
|
status: z.ZodLiteral<"succeeded">;
|
|
1714
1712
|
}, z.core.$strip>], "status">, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1715
|
-
completeTraceSpan: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
|
|
1716
|
-
completedAt: z.ZodDate;
|
|
1717
|
-
spanIndex: z.ZodNumber;
|
|
1718
|
-
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
1719
|
-
status: z.ZodLiteral<"succeeded">;
|
|
1720
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1721
|
-
failure: z.ZodType<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue, z.core.$ZodTypeInternals<import("./errors").AutomationErrorValue, import("./errors").AutomationErrorValue>>;
|
|
1722
|
-
status: z.ZodLiteral<"failed">;
|
|
1723
|
-
}, z.core.$strip>]>>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1724
1713
|
generate: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodUnion<readonly [z.ZodObject<{
|
|
1725
1714
|
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
|
1726
1715
|
instructions: z.ZodOptional<z.ZodString>;
|
|
@@ -2474,17 +2463,8 @@ export declare const runtimeContract: {
|
|
|
2474
2463
|
logIndex: z.ZodNumber;
|
|
2475
2464
|
message: z.ZodString;
|
|
2476
2465
|
sensitivity: z.ZodOptional<z.ZodCustom<SensitivityMask, SensitivityMask>>;
|
|
2477
|
-
spanIndex: z.ZodOptional<z.ZodNumber>;
|
|
2478
2466
|
timestamp: z.ZodDate;
|
|
2479
2467
|
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
2480
|
-
startTraceSpan: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2481
|
-
attributes: z.ZodOptional<z.ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>>;
|
|
2482
|
-
name: z.ZodString;
|
|
2483
|
-
sensitivity: z.ZodOptional<z.ZodCustom<SensitivityMask, SensitivityMask>>;
|
|
2484
|
-
parentSpanIndex: z.ZodOptional<z.ZodNumber>;
|
|
2485
|
-
spanIndex: z.ZodNumber;
|
|
2486
|
-
startedAt: z.ZodDate;
|
|
2487
|
-
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
2488
2468
|
sendEmail: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodIntersection<z.ZodObject<{
|
|
2489
2469
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2490
2470
|
replyTo: z.ZodOptional<z.ZodEmail>;
|
package/dist/runtime.js
CHANGED
|
@@ -14,11 +14,9 @@ export const AUTOMATION_DELAY_ENTRYPOINT_PREFIX = `${AUTOMATION_INVOCATION_RESER
|
|
|
14
14
|
export const AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX = `${AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX}generate-image:`;
|
|
15
15
|
export const CALLBACK_PROTECTION_QUERY_PARAMETER = "_axCallback";
|
|
16
16
|
export const AUTOMATION_LOG_MAX_ENTRIES = 1_000;
|
|
17
|
-
export const AUTOMATION_TRACE_MAX_SPANS = 250;
|
|
18
17
|
export const AUTOMATION_OBSERVABILITY_MAX_FIELDS = 64;
|
|
19
18
|
export const AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES = 64 * 1_024;
|
|
20
19
|
export const AUTOMATION_LOG_MAX_MESSAGE_LENGTH = 16_384;
|
|
21
|
-
export const AUTOMATION_TRACE_MAX_NAME_LENGTH = 256;
|
|
22
20
|
const OUTCOME_SEQUENCE_SCHEMA = z.number().int().positive();
|
|
23
21
|
const HOOK_SCOPE_PATH_SCHEMA = z.number().int().nonnegative().array();
|
|
24
22
|
export const runtimeObservabilityFieldsSchema = z
|
|
@@ -29,11 +27,6 @@ const LOG_INDEX_SCHEMA = z
|
|
|
29
27
|
.int()
|
|
30
28
|
.min(0)
|
|
31
29
|
.max(AUTOMATION_LOG_MAX_ENTRIES - 1);
|
|
32
|
-
const TRACE_SPAN_INDEX_SCHEMA = z
|
|
33
|
-
.number()
|
|
34
|
-
.int()
|
|
35
|
-
.min(0)
|
|
36
|
-
.max(AUTOMATION_TRACE_MAX_SPANS - 1);
|
|
37
30
|
/** Runtime-validated structural policy for author-visible value projection. */
|
|
38
31
|
export const sensitivityMaskSchema = z.custom(isSensitivityMask, { message: "Invalid structural sensitivity mask" });
|
|
39
32
|
const AUTOMATION_INVOCATION_RUN_AT_SCHEMA = z.union([
|
|
@@ -891,20 +884,6 @@ export const runtimeContract = {
|
|
|
891
884
|
completeActionAttempt: oc
|
|
892
885
|
.input(ACTION_ATTEMPT_COMPLETION_TRANSPORT_SCHEMA)
|
|
893
886
|
.output(z.void()),
|
|
894
|
-
completeTraceSpan: oc
|
|
895
|
-
.input(z
|
|
896
|
-
.object({
|
|
897
|
-
completedAt: z.date(),
|
|
898
|
-
spanIndex: TRACE_SPAN_INDEX_SCHEMA,
|
|
899
|
-
})
|
|
900
|
-
.and(z.union([
|
|
901
|
-
z.object({ status: z.literal("succeeded") }),
|
|
902
|
-
z.object({
|
|
903
|
-
failure: automationErrorSchema,
|
|
904
|
-
status: z.literal("failed"),
|
|
905
|
-
}),
|
|
906
|
-
])))
|
|
907
|
-
.output(z.void()),
|
|
908
887
|
generate: oc
|
|
909
888
|
.input(RUNTIME_GENERATION_INPUT_SCHEMA)
|
|
910
889
|
.output(RUNTIME_GENERATION_RESULT_SCHEMA),
|
|
@@ -919,6 +898,7 @@ export const runtimeContract = {
|
|
|
919
898
|
.output(automationInvocationOutputSchema),
|
|
920
899
|
load: oc.output(z.object({
|
|
921
900
|
context: RUNTIME_RUN_CONTEXT_SCHEMA,
|
|
901
|
+
/** @deprecated Retained for deployed runtime protocol 2 bundles. */
|
|
922
902
|
finalAttempt: z.boolean(),
|
|
923
903
|
targetAction: TARGET_ACTION_TRANSPORT_SCHEMA.optional(),
|
|
924
904
|
})),
|
|
@@ -958,20 +938,9 @@ export const runtimeContract = {
|
|
|
958
938
|
logIndex: LOG_INDEX_SCHEMA,
|
|
959
939
|
message: z.string().min(1).max(AUTOMATION_LOG_MAX_MESSAGE_LENGTH),
|
|
960
940
|
sensitivity: sensitivityMaskSchema.optional(),
|
|
961
|
-
spanIndex: TRACE_SPAN_INDEX_SCHEMA.optional(),
|
|
962
941
|
timestamp: z.date(),
|
|
963
942
|
}))
|
|
964
943
|
.output(z.void()),
|
|
965
|
-
startTraceSpan: oc
|
|
966
|
-
.input(z.object({
|
|
967
|
-
attributes: codecEnvelopeSchema.optional(),
|
|
968
|
-
name: z.string().min(1).max(AUTOMATION_TRACE_MAX_NAME_LENGTH),
|
|
969
|
-
sensitivity: sensitivityMaskSchema.optional(),
|
|
970
|
-
parentSpanIndex: TRACE_SPAN_INDEX_SCHEMA.optional(),
|
|
971
|
-
spanIndex: TRACE_SPAN_INDEX_SCHEMA,
|
|
972
|
-
startedAt: z.date(),
|
|
973
|
-
}))
|
|
974
|
-
.output(z.void()),
|
|
975
944
|
sendEmail: oc
|
|
976
945
|
.input(z
|
|
977
946
|
.object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.97.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.
|
|
35
|
-
"@automate.ax/integration-contracts": "0.
|
|
34
|
+
"@automate.ax/codec": "0.97.0",
|
|
35
|
+
"@automate.ax/integration-contracts": "0.97.0",
|
|
36
36
|
"@orpc/contract": "1.15.0",
|
|
37
37
|
"fast-json-stable-stringify": "^2.1.0",
|
|
38
38
|
"zod": "^4.3.6"
|
package/src/execution-data.ts
CHANGED
|
@@ -2,6 +2,11 @@ import { oc } from "@orpc/contract"
|
|
|
2
2
|
import { z } from "zod"
|
|
3
3
|
|
|
4
4
|
export const EXECUTION_DATASET_VERSION = 8
|
|
5
|
+
const NEXT_EXECUTION_DATASET_VERSION = 9
|
|
6
|
+
|
|
7
|
+
/** @deprecated Retained until execution dataset version 8 clients are retired. */
|
|
8
|
+
export const LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE =
|
|
9
|
+
"trace-spans" as const
|
|
5
10
|
|
|
6
11
|
export const executionDatasetResourceSchema = z.enum([
|
|
7
12
|
"projects",
|
|
@@ -19,7 +24,7 @@ export const executionDatasetResourceSchema = z.enum([
|
|
|
19
24
|
"signal-decisions",
|
|
20
25
|
"logs",
|
|
21
26
|
"outputs",
|
|
22
|
-
|
|
27
|
+
LEGACY_TRACE_SPANS_EXECUTION_DATASET_RESOURCE,
|
|
23
28
|
])
|
|
24
29
|
|
|
25
30
|
export const executionDatasetScopeSchema = z.object({
|
|
@@ -44,7 +49,10 @@ export const executionDatasetManifestSchema = z.object({
|
|
|
44
49
|
url: z.url(),
|
|
45
50
|
})
|
|
46
51
|
.array(),
|
|
47
|
-
schemaVersion: z.
|
|
52
|
+
schemaVersion: z.union([
|
|
53
|
+
z.literal(EXECUTION_DATASET_VERSION),
|
|
54
|
+
z.literal(NEXT_EXECUTION_DATASET_VERSION),
|
|
55
|
+
]),
|
|
48
56
|
scope: executionDatasetScopeSchema,
|
|
49
57
|
})
|
|
50
58
|
|
package/src/index.ts
CHANGED
|
@@ -50,8 +50,6 @@ export {
|
|
|
50
50
|
AUTOMATION_LOG_MAX_MESSAGE_LENGTH,
|
|
51
51
|
AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES,
|
|
52
52
|
AUTOMATION_OBSERVABILITY_MAX_FIELDS,
|
|
53
|
-
AUTOMATION_TRACE_MAX_NAME_LENGTH,
|
|
54
|
-
AUTOMATION_TRACE_MAX_SPANS,
|
|
55
53
|
DEFAULT_GATEWAY_IMAGE_MODEL_ID,
|
|
56
54
|
DEFAULT_GATEWAY_MODEL_ID,
|
|
57
55
|
DEFAULT_ACTION_MAX_ATTEMPTS,
|
package/src/runtime.ts
CHANGED
|
@@ -27,12 +27,10 @@ export const AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX =
|
|
|
27
27
|
`${AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX}generate-image:` as const
|
|
28
28
|
export const CALLBACK_PROTECTION_QUERY_PARAMETER = "_axCallback"
|
|
29
29
|
export const AUTOMATION_LOG_MAX_ENTRIES = 1_000
|
|
30
|
-
export const AUTOMATION_TRACE_MAX_SPANS = 250
|
|
31
30
|
export const AUTOMATION_OBSERVABILITY_MAX_FIELDS = 64
|
|
32
31
|
export const AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES = 64 * 1_024
|
|
33
32
|
|
|
34
33
|
export const AUTOMATION_LOG_MAX_MESSAGE_LENGTH = 16_384
|
|
35
|
-
export const AUTOMATION_TRACE_MAX_NAME_LENGTH = 256
|
|
36
34
|
|
|
37
35
|
const OUTCOME_SEQUENCE_SCHEMA = z.number().int().positive()
|
|
38
36
|
const HOOK_SCOPE_PATH_SCHEMA = z.number().int().nonnegative().array()
|
|
@@ -48,11 +46,6 @@ const LOG_INDEX_SCHEMA = z
|
|
|
48
46
|
.int()
|
|
49
47
|
.min(0)
|
|
50
48
|
.max(AUTOMATION_LOG_MAX_ENTRIES - 1)
|
|
51
|
-
const TRACE_SPAN_INDEX_SCHEMA = z
|
|
52
|
-
.number()
|
|
53
|
-
.int()
|
|
54
|
-
.min(0)
|
|
55
|
-
.max(AUTOMATION_TRACE_MAX_SPANS - 1)
|
|
56
49
|
|
|
57
50
|
/** Runtime-validated structural policy for author-visible value projection. */
|
|
58
51
|
export const sensitivityMaskSchema = z.custom<SensitivityMask>(
|
|
@@ -1081,24 +1074,6 @@ export const runtimeContract = {
|
|
|
1081
1074
|
completeActionAttempt: oc
|
|
1082
1075
|
.input(ACTION_ATTEMPT_COMPLETION_TRANSPORT_SCHEMA)
|
|
1083
1076
|
.output(z.void()),
|
|
1084
|
-
completeTraceSpan: oc
|
|
1085
|
-
.input(
|
|
1086
|
-
z
|
|
1087
|
-
.object({
|
|
1088
|
-
completedAt: z.date(),
|
|
1089
|
-
spanIndex: TRACE_SPAN_INDEX_SCHEMA,
|
|
1090
|
-
})
|
|
1091
|
-
.and(
|
|
1092
|
-
z.union([
|
|
1093
|
-
z.object({ status: z.literal("succeeded") }),
|
|
1094
|
-
z.object({
|
|
1095
|
-
failure: automationErrorSchema,
|
|
1096
|
-
status: z.literal("failed"),
|
|
1097
|
-
}),
|
|
1098
|
-
]),
|
|
1099
|
-
),
|
|
1100
|
-
)
|
|
1101
|
-
.output(z.void()),
|
|
1102
1077
|
generate: oc
|
|
1103
1078
|
.input(RUNTIME_GENERATION_INPUT_SCHEMA)
|
|
1104
1079
|
.output(RUNTIME_GENERATION_RESULT_SCHEMA),
|
|
@@ -1114,6 +1089,8 @@ export const runtimeContract = {
|
|
|
1114
1089
|
load: oc.output(
|
|
1115
1090
|
z.object({
|
|
1116
1091
|
context: RUNTIME_RUN_CONTEXT_SCHEMA,
|
|
1092
|
+
|
|
1093
|
+
/** @deprecated Retained for deployed runtime protocol 2 bundles. */
|
|
1117
1094
|
finalAttempt: z.boolean(),
|
|
1118
1095
|
targetAction: TARGET_ACTION_TRANSPORT_SCHEMA.optional(),
|
|
1119
1096
|
}),
|
|
@@ -1163,23 +1140,10 @@ export const runtimeContract = {
|
|
|
1163
1140
|
logIndex: LOG_INDEX_SCHEMA,
|
|
1164
1141
|
message: z.string().min(1).max(AUTOMATION_LOG_MAX_MESSAGE_LENGTH),
|
|
1165
1142
|
sensitivity: sensitivityMaskSchema.optional(),
|
|
1166
|
-
spanIndex: TRACE_SPAN_INDEX_SCHEMA.optional(),
|
|
1167
1143
|
timestamp: z.date(),
|
|
1168
1144
|
}),
|
|
1169
1145
|
)
|
|
1170
1146
|
.output(z.void()),
|
|
1171
|
-
startTraceSpan: oc
|
|
1172
|
-
.input(
|
|
1173
|
-
z.object({
|
|
1174
|
-
attributes: codecEnvelopeSchema.optional(),
|
|
1175
|
-
name: z.string().min(1).max(AUTOMATION_TRACE_MAX_NAME_LENGTH),
|
|
1176
|
-
sensitivity: sensitivityMaskSchema.optional(),
|
|
1177
|
-
parentSpanIndex: TRACE_SPAN_INDEX_SCHEMA.optional(),
|
|
1178
|
-
spanIndex: TRACE_SPAN_INDEX_SCHEMA,
|
|
1179
|
-
startedAt: z.date(),
|
|
1180
|
-
}),
|
|
1181
|
-
)
|
|
1182
|
-
.output(z.void()),
|
|
1183
1147
|
sendEmail: oc
|
|
1184
1148
|
.input(
|
|
1185
1149
|
z
|