@mastra/factory 0.13.0-alpha.9 → 0.13.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/README.md +232 -10
- package/dist/auth.d.ts +2 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +29 -4
- package/dist/auth.js.map +1 -1
- package/dist/boards/define-board.d.ts +36 -2
- package/dist/boards/define-board.d.ts.map +1 -1
- package/dist/boards/define-board.js +58 -1
- package/dist/boards/define-board.js.map +1 -1
- package/dist/boards/index.d.ts +4 -2
- package/dist/boards/index.d.ts.map +1 -1
- package/dist/boards/index.js +2 -1
- package/dist/boards/index.js.map +1 -1
- package/dist/boards/relocate.d.ts +17 -0
- package/dist/boards/relocate.d.ts.map +1 -0
- package/dist/boards/relocate.js +53 -0
- package/dist/boards/relocate.js.map +1 -0
- package/dist/boards/review.d.ts +1 -1
- package/dist/boards/review.d.ts.map +1 -1
- package/dist/boards/review.js +17 -4
- package/dist/boards/review.js.map +1 -1
- package/dist/boards/semantics.d.ts +28 -0
- package/dist/boards/semantics.d.ts.map +1 -0
- package/dist/boards/semantics.js +41 -0
- package/dist/boards/semantics.js.map +1 -0
- package/dist/boards/work-tool-rules.d.ts +8 -0
- package/dist/boards/work-tool-rules.d.ts.map +1 -0
- package/dist/boards/work-tool-rules.js +20 -0
- package/dist/boards/work-tool-rules.js.map +1 -0
- package/dist/boards/work.d.ts +1 -1
- package/dist/boards/work.d.ts.map +1 -1
- package/dist/boards/work.js +13 -0
- package/dist/boards/work.js.map +1 -1
- package/dist/capabilities/intake.d.ts +2 -0
- package/dist/capabilities/intake.d.ts.map +1 -1
- package/dist/factory.d.ts +5 -6
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +41 -12
- package/dist/factory.js.map +1 -1
- package/dist/integrations/base.d.ts +7 -4
- package/dist/integrations/base.d.ts.map +1 -1
- package/dist/integrations/github/default-rules.d.ts +2 -2
- package/dist/integrations/github/default-rules.d.ts.map +1 -1
- package/dist/integrations/github/default-rules.js +2 -2
- package/dist/integrations/github/default-rules.js.map +1 -1
- package/dist/integrations/github/issue-reconciler.d.ts.map +1 -1
- package/dist/integrations/github/issue-reconciler.js +4 -3
- package/dist/integrations/github/issue-reconciler.js.map +1 -1
- package/dist/integrations/github/rules.d.ts +6 -2
- package/dist/integrations/github/rules.d.ts.map +1 -1
- package/dist/integrations/github/rules.js +96 -15
- package/dist/integrations/github/rules.js.map +1 -1
- package/dist/integrations/github/sandbox.d.ts +6 -3
- package/dist/integrations/github/sandbox.d.ts.map +1 -1
- package/dist/integrations/github/sandbox.js +21 -2
- package/dist/integrations/github/sandbox.js.map +1 -1
- package/dist/integrations/issue-reconciler.d.ts +2 -0
- package/dist/integrations/issue-reconciler.d.ts.map +1 -1
- package/dist/integrations/issue-reconciler.js +1 -3
- package/dist/integrations/issue-reconciler.js.map +1 -1
- package/dist/integrations/linear/agent-tools.d.ts.map +1 -1
- package/dist/integrations/linear/agent-tools.js.map +1 -1
- package/dist/integrations/linear/default-rules.d.ts +2 -2
- package/dist/integrations/linear/default-rules.d.ts.map +1 -1
- package/dist/integrations/linear/default-rules.js +2 -2
- package/dist/integrations/linear/default-rules.js.map +1 -1
- package/dist/integrations/linear/integration.js +1 -0
- package/dist/integrations/linear/integration.js.map +1 -1
- package/dist/integrations/linear/issue-reconciler.d.ts.map +1 -1
- package/dist/integrations/linear/issue-reconciler.js +9 -4
- package/dist/integrations/linear/issue-reconciler.js.map +1 -1
- package/dist/integrations/linear/reconciliation-config.d.ts.map +1 -1
- package/dist/integrations/linear/reconciliation-config.js.map +1 -1
- package/dist/integrations/linear/routes.d.ts.map +1 -1
- package/dist/integrations/linear/routes.js +19 -26
- package/dist/integrations/linear/routes.js.map +1 -1
- package/dist/integrations/linear/rules.d.ts +7 -2
- package/dist/integrations/linear/rules.d.ts.map +1 -1
- package/dist/integrations/linear/rules.js +20 -8
- package/dist/integrations/linear/rules.js.map +1 -1
- package/dist/integrations/platform/api-client.d.ts.map +1 -1
- package/dist/integrations/platform/api-client.js +25 -4
- package/dist/integrations/platform/api-client.js.map +1 -1
- package/dist/integrations/platform/github/integration.d.ts +1 -0
- package/dist/integrations/platform/github/integration.d.ts.map +1 -1
- package/dist/integrations/platform/github/integration.js +5 -0
- package/dist/integrations/platform/github/integration.js.map +1 -1
- package/dist/integrations/platform/linear/integration.d.ts.map +1 -1
- package/dist/integrations/platform/linear/integration.js +5 -2
- package/dist/integrations/platform/linear/integration.js.map +1 -1
- package/dist/integrations/slack/emoji-shortcodes.generated.d.ts +8 -0
- package/dist/integrations/slack/emoji-shortcodes.generated.d.ts.map +1 -0
- package/dist/integrations/slack/emoji-shortcodes.generated.js +1985 -0
- package/dist/integrations/slack/emoji-shortcodes.generated.js.map +1 -0
- package/dist/integrations/slack/emoji.d.ts +3 -0
- package/dist/integrations/slack/emoji.d.ts.map +1 -0
- package/dist/integrations/slack/emoji.js +12 -0
- package/dist/integrations/slack/emoji.js.map +1 -0
- package/dist/integrations/slack/integration.js +1 -1
- package/dist/integrations/slack/integration.js.map +1 -1
- package/dist/integrations/slack/slack.d.ts.map +1 -1
- package/dist/integrations/slack/slack.js +16 -2
- package/dist/integrations/slack/slack.js.map +1 -1
- package/dist/routes/attention-activity.d.ts +2 -3
- package/dist/routes/attention-activity.d.ts.map +1 -1
- package/dist/routes/attention-activity.js +12 -3
- package/dist/routes/attention-activity.js.map +1 -1
- package/dist/routes/attention-parked.d.ts +22 -0
- package/dist/routes/attention-parked.d.ts.map +1 -0
- package/dist/routes/attention-parked.js +136 -0
- package/dist/routes/attention-parked.js.map +1 -0
- package/dist/routes/attention-providers.js +8 -8
- package/dist/routes/attention-providers.js.map +1 -1
- package/dist/routes/attention.d.ts +2 -0
- package/dist/routes/attention.d.ts.map +1 -1
- package/dist/routes/attention.js +47 -118
- package/dist/routes/attention.js.map +1 -1
- package/dist/routes/contracts.d.ts +627 -0
- package/dist/routes/contracts.d.ts.map +1 -0
- package/dist/routes/contracts.js +468 -0
- package/dist/routes/contracts.js.map +1 -0
- package/dist/routes/intake.d.ts +18 -0
- package/dist/routes/intake.d.ts.map +1 -1
- package/dist/routes/intake.js +265 -15
- package/dist/routes/intake.js.map +1 -1
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/projects.js +26 -76
- package/dist/routes/projects.js.map +1 -1
- package/dist/routes/supervisor.d.ts +2 -0
- package/dist/routes/supervisor.d.ts.map +1 -1
- package/dist/routes/supervisor.js +7 -6
- package/dist/routes/supervisor.js.map +1 -1
- package/dist/routes/surface.d.ts +7 -4
- package/dist/routes/surface.d.ts.map +1 -1
- package/dist/routes/surface.js +17 -11
- package/dist/routes/surface.js.map +1 -1
- package/dist/routes/telemetry.d.ts +13 -0
- package/dist/routes/telemetry.d.ts.map +1 -0
- package/dist/routes/telemetry.js +60 -0
- package/dist/routes/telemetry.js.map +1 -0
- package/dist/routes/work-items.d.ts +3 -3
- package/dist/routes/work-items.d.ts.map +1 -1
- package/dist/routes/work-items.js +134 -250
- package/dist/routes/work-items.js.map +1 -1
- package/dist/rules/dispatch-errors.d.ts +2 -2
- package/dist/rules/dispatch-errors.d.ts.map +1 -1
- package/dist/rules/dispatch-errors.js +10 -6
- package/dist/rules/dispatch-errors.js.map +1 -1
- package/dist/rules/dispatcher.d.ts +9 -2
- package/dist/rules/dispatcher.d.ts.map +1 -1
- package/dist/rules/dispatcher.js +76 -23
- package/dist/rules/dispatcher.js.map +1 -1
- package/dist/rules/index.d.ts +4 -5
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/index.js +3 -4
- package/dist/rules/processor.d.ts +3 -3
- package/dist/rules/processor.d.ts.map +1 -1
- package/dist/rules/processor.js +24 -31
- package/dist/rules/processor.js.map +1 -1
- package/dist/rules/resolve.d.ts +1 -3
- package/dist/rules/resolve.d.ts.map +1 -1
- package/dist/rules/resolve.js +1 -4
- package/dist/rules/resolve.js.map +1 -1
- package/dist/rules/start-coordinator.d.ts.map +1 -1
- package/dist/rules/start-coordinator.js +3 -1
- package/dist/rules/start-coordinator.js.map +1 -1
- package/dist/rules/tools.d.ts.map +1 -1
- package/dist/rules/tools.js +20 -10
- package/dist/rules/tools.js.map +1 -1
- package/dist/rules/transition-service.d.ts +7 -7
- package/dist/rules/transition-service.d.ts.map +1 -1
- package/dist/rules/transition-service.js +21 -25
- package/dist/rules/transition-service.js.map +1 -1
- package/dist/rules/types.d.ts +16 -11
- package/dist/rules/types.d.ts.map +1 -1
- package/dist/rules/types.js.map +1 -1
- package/dist/rules/validation.d.ts +12 -2
- package/dist/rules/validation.d.ts.map +1 -1
- package/dist/rules/validation.js +29 -20
- package/dist/rules/validation.js.map +1 -1
- package/dist/session/live-sessions.d.ts +33 -3
- package/dist/session/live-sessions.d.ts.map +1 -1
- package/dist/session/live-sessions.js +67 -5
- package/dist/session/live-sessions.js.map +1 -1
- package/dist/storage/domains/intake/base.d.ts +54 -1
- package/dist/storage/domains/intake/base.d.ts.map +1 -1
- package/dist/storage/domains/intake/base.js +136 -4
- package/dist/storage/domains/intake/base.js.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts +22 -7
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +41 -26
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/dist/supervisor/health-worker.d.ts +2 -0
- package/dist/supervisor/health-worker.d.ts.map +1 -1
- package/dist/supervisor/health-worker.js +3 -1
- package/dist/supervisor/health-worker.js.map +1 -1
- package/dist/supervisor/health.d.ts +12 -14
- package/dist/supervisor/health.d.ts.map +1 -1
- package/dist/supervisor/health.js +24 -52
- package/dist/supervisor/health.js.map +1 -1
- package/dist/supervisor/instructions.d.ts +1 -1
- package/dist/supervisor/instructions.d.ts.map +1 -1
- package/dist/supervisor/instructions.js +10 -8
- package/dist/supervisor/instructions.js.map +1 -1
- package/dist/supervisor/read-tools.d.ts +2 -0
- package/dist/supervisor/read-tools.d.ts.map +1 -1
- package/dist/supervisor/read-tools.js +2 -2
- package/dist/supervisor/read-tools.js.map +1 -1
- package/dist/supervisor/write-tools.d.ts.map +1 -1
- package/dist/supervisor/write-tools.js +6 -4
- package/dist/supervisor/write-tools.js.map +1 -1
- package/dist/telemetry-types.d.ts +7 -0
- package/dist/telemetry-types.d.ts.map +1 -0
- package/dist/telemetry-types.js +24 -0
- package/dist/telemetry-types.js.map +1 -0
- package/dist/telemetry.d.ts +9 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +47 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/work-item-branch.d.ts +2 -0
- package/dist/work-item-branch.d.ts.map +1 -1
- package/dist/work-item-branch.js +6 -1
- package/dist/work-item-branch.js.map +1 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +3 -1
- package/dist/workspace.js.map +1 -1
- package/factory-skills/configure-factory-rules/SKILL.md +30 -10
- package/package.json +12 -10
- package/dist/rules/defaults.d.ts +0 -9
- package/dist/rules/defaults.d.ts.map +0 -1
- package/dist/rules/defaults.js +0 -50
- package/dist/rules/defaults.js.map +0 -1
|
@@ -0,0 +1,627 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type FactoryRouteContract = {
|
|
3
|
+
method: 'GET' | 'POST' | 'PATCH' | 'DELETE';
|
|
4
|
+
path: string;
|
|
5
|
+
description: string;
|
|
6
|
+
pathSchema?: z.ZodType;
|
|
7
|
+
querySchema?: z.ZodType;
|
|
8
|
+
bodySchema?: z.ZodType;
|
|
9
|
+
responseSchema: z.ZodType;
|
|
10
|
+
};
|
|
11
|
+
export declare const UUID_PATTERN = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
|
|
12
|
+
export declare const createProjectBodySchema: z.ZodObject<{
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
description: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export declare const updateProjectBodySchema: z.ZodObject<{
|
|
17
|
+
name: z.ZodOptional<z.ZodString>;
|
|
18
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>;
|
|
19
|
+
defaultModelId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>;
|
|
20
|
+
slackWorkItemsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
autoRunEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
autoApprovePlans: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export declare const createWorkItemBodySchema: z.ZodObject<{
|
|
25
|
+
title: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
26
|
+
board: z.ZodOptional<z.ZodString>;
|
|
27
|
+
externalSource: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
28
|
+
integrationId: z.ZodString;
|
|
29
|
+
type: z.ZodString;
|
|
30
|
+
externalId: z.ZodString;
|
|
31
|
+
url: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
parentWorkItemId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
stages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
+
sessions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
36
|
+
sessionId: z.ZodString;
|
|
37
|
+
branch: z.ZodString;
|
|
38
|
+
threadId: z.ZodString;
|
|
39
|
+
}, z.core.$strip>>>;
|
|
40
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>, z.ZodTransform<{
|
|
41
|
+
[x: string]: unknown;
|
|
42
|
+
} | null, Record<string, unknown> | null>>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export declare const updateWorkItemBodySchema: z.ZodObject<{
|
|
45
|
+
title: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
46
|
+
board: z.ZodOptional<z.ZodString>;
|
|
47
|
+
parentWorkItemId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
+
stages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
|
+
sessions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
50
|
+
sessionId: z.ZodString;
|
|
51
|
+
branch: z.ZodString;
|
|
52
|
+
threadId: z.ZodString;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>, z.ZodTransform<{
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
} | null, Record<string, unknown> | null>>>;
|
|
57
|
+
plansPreapproved: z.ZodOptional<z.ZodLiteral<true>>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export declare const transitionBodySchema: z.ZodPipe<z.ZodObject<{
|
|
60
|
+
board: z.ZodString;
|
|
61
|
+
stage: z.ZodString;
|
|
62
|
+
expectedRevision: z.ZodNumber;
|
|
63
|
+
requestId: z.ZodString;
|
|
64
|
+
cause: z.ZodString;
|
|
65
|
+
reenter: z.ZodOptional<z.ZodUnknown>;
|
|
66
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
67
|
+
reenter?: boolean | undefined;
|
|
68
|
+
board: string;
|
|
69
|
+
stage: string;
|
|
70
|
+
expectedRevision: number;
|
|
71
|
+
ingress: {
|
|
72
|
+
type: "human";
|
|
73
|
+
identity: string;
|
|
74
|
+
};
|
|
75
|
+
cause: string;
|
|
76
|
+
}, {
|
|
77
|
+
board: string;
|
|
78
|
+
stage: string;
|
|
79
|
+
expectedRevision: number;
|
|
80
|
+
requestId: string;
|
|
81
|
+
cause: string;
|
|
82
|
+
reenter?: unknown;
|
|
83
|
+
}>>;
|
|
84
|
+
export declare const startWorkItemBodySchema: z.ZodObject<{
|
|
85
|
+
sessionId: z.ZodString;
|
|
86
|
+
threadTitle: z.ZodString;
|
|
87
|
+
kickoffKey: z.ZodString;
|
|
88
|
+
workItem: z.ZodObject<{
|
|
89
|
+
id: z.ZodString;
|
|
90
|
+
role: z.ZodString;
|
|
91
|
+
input: z.ZodObject<{
|
|
92
|
+
title: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
93
|
+
board: z.ZodOptional<z.ZodString>;
|
|
94
|
+
externalSource: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
95
|
+
integrationId: z.ZodString;
|
|
96
|
+
type: z.ZodString;
|
|
97
|
+
externalId: z.ZodString;
|
|
98
|
+
url: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>>>;
|
|
100
|
+
parentWorkItemId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
+
stages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
102
|
+
sessions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
103
|
+
sessionId: z.ZodString;
|
|
104
|
+
branch: z.ZodString;
|
|
105
|
+
threadId: z.ZodString;
|
|
106
|
+
}, z.core.$strip>>>;
|
|
107
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>, z.ZodTransform<{
|
|
108
|
+
[x: string]: unknown;
|
|
109
|
+
} | null, Record<string, unknown> | null>>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
export declare const metricsQuerySchema: z.ZodObject<{
|
|
114
|
+
from: z.ZodOptional<z.ZodString>;
|
|
115
|
+
to: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
export declare const decisionQuerySchema: z.ZodObject<{
|
|
118
|
+
statuses: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<("pending" | "proposed" | "dismissed" | "superseded" | "leased" | "retry" | "succeeded" | "failed")[] | undefined, string | undefined>>;
|
|
119
|
+
before: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<{
|
|
120
|
+
createdAt: Date;
|
|
121
|
+
id: string;
|
|
122
|
+
} | undefined, string | undefined>>;
|
|
123
|
+
limit: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number, string | undefined>>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
type AttentionStreamPosition = {
|
|
126
|
+
occurredAt: Date;
|
|
127
|
+
id: string;
|
|
128
|
+
};
|
|
129
|
+
export declare const attentionQuerySchema: z.ZodObject<{
|
|
130
|
+
view: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
131
|
+
open: "open";
|
|
132
|
+
unread: "unread";
|
|
133
|
+
archived: "archived";
|
|
134
|
+
}>>>;
|
|
135
|
+
kind: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
136
|
+
activity: "activity";
|
|
137
|
+
"automation-failed": "automation-failed";
|
|
138
|
+
"automation-proposed": "automation-proposed";
|
|
139
|
+
mention: "mention";
|
|
140
|
+
"supervisor-finding": "supervisor-finding";
|
|
141
|
+
"agent-waiting": "agent-waiting";
|
|
142
|
+
}>>>;
|
|
143
|
+
before: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<Map<"activity" | "automation-failed" | "automation-proposed" | "mention" | "supervisor-finding" | "agent-waiting", AttentionStreamPosition | undefined> | undefined, string | undefined>>;
|
|
144
|
+
limit: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number, string | undefined>>;
|
|
145
|
+
search: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export declare const FACTORY_ROUTE_CONTRACTS: {
|
|
148
|
+
readonly projectList: {
|
|
149
|
+
readonly method: "GET";
|
|
150
|
+
readonly path: "/web/factory/projects";
|
|
151
|
+
readonly description: "List Factory projects for the current organization";
|
|
152
|
+
readonly responseSchema: z.ZodObject<{
|
|
153
|
+
projects: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
};
|
|
156
|
+
readonly projectCreate: {
|
|
157
|
+
readonly method: "POST";
|
|
158
|
+
readonly path: "/web/factory/projects";
|
|
159
|
+
readonly description: "Create a Factory project";
|
|
160
|
+
readonly bodySchema: z.ZodObject<{
|
|
161
|
+
name: z.ZodString;
|
|
162
|
+
description: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
readonly responseSchema: z.ZodObject<{
|
|
165
|
+
project: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
};
|
|
168
|
+
readonly projectGet: {
|
|
169
|
+
readonly method: "GET";
|
|
170
|
+
readonly path: "/web/factory/projects/:id";
|
|
171
|
+
readonly description: "Get a Factory project";
|
|
172
|
+
readonly pathSchema: z.ZodObject<{
|
|
173
|
+
id: z.ZodString;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
readonly responseSchema: z.ZodObject<{
|
|
176
|
+
project: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
};
|
|
179
|
+
readonly projectUpdate: {
|
|
180
|
+
readonly method: "PATCH";
|
|
181
|
+
readonly path: "/web/factory/projects/:id";
|
|
182
|
+
readonly description: "Update a Factory project";
|
|
183
|
+
readonly pathSchema: z.ZodObject<{
|
|
184
|
+
id: z.ZodString;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
readonly bodySchema: z.ZodObject<{
|
|
187
|
+
name: z.ZodOptional<z.ZodString>;
|
|
188
|
+
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>;
|
|
189
|
+
defaultModelId: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>;
|
|
190
|
+
slackWorkItemsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
+
autoRunEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
+
autoApprovePlans: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
readonly responseSchema: z.ZodObject<{
|
|
195
|
+
project: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
};
|
|
198
|
+
readonly projectDelete: {
|
|
199
|
+
readonly method: "DELETE";
|
|
200
|
+
readonly path: "/web/factory/projects/:id";
|
|
201
|
+
readonly description: "Delete a Factory project";
|
|
202
|
+
readonly pathSchema: z.ZodObject<{
|
|
203
|
+
id: z.ZodString;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
readonly responseSchema: z.ZodNull;
|
|
206
|
+
};
|
|
207
|
+
readonly metricsGet: {
|
|
208
|
+
readonly method: "GET";
|
|
209
|
+
readonly path: "/web/factory/projects/:id/metrics";
|
|
210
|
+
readonly description: "Get Factory project metrics";
|
|
211
|
+
readonly pathSchema: z.ZodObject<{
|
|
212
|
+
id: z.ZodString;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
readonly querySchema: z.ZodObject<{
|
|
215
|
+
from: z.ZodOptional<z.ZodString>;
|
|
216
|
+
to: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, z.core.$strip>;
|
|
218
|
+
readonly responseSchema: z.ZodObject<{
|
|
219
|
+
metrics: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
};
|
|
222
|
+
readonly healthThresholdsGet: {
|
|
223
|
+
readonly method: "GET";
|
|
224
|
+
readonly path: "/web/factory/projects/:id/health/thresholds";
|
|
225
|
+
readonly description: "Get queue-health thresholds";
|
|
226
|
+
readonly pathSchema: z.ZodObject<{
|
|
227
|
+
id: z.ZodString;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
readonly responseSchema: z.ZodObject<{
|
|
230
|
+
thresholds: z.ZodArray<z.ZodNumber>;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
};
|
|
233
|
+
readonly boardCatalog: {
|
|
234
|
+
readonly method: "GET";
|
|
235
|
+
readonly path: "/web/factory/projects/:id/boards";
|
|
236
|
+
readonly description: "List installed Factory boards";
|
|
237
|
+
readonly pathSchema: z.ZodObject<{
|
|
238
|
+
id: z.ZodString;
|
|
239
|
+
}, z.core.$strip>;
|
|
240
|
+
readonly responseSchema: z.ZodObject<{
|
|
241
|
+
boards: z.ZodArray<z.ZodObject<{
|
|
242
|
+
id: z.ZodString;
|
|
243
|
+
title: z.ZodString;
|
|
244
|
+
initialPhase: z.ZodString;
|
|
245
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
246
|
+
id: z.ZodString;
|
|
247
|
+
title: z.ZodString;
|
|
248
|
+
kind: z.ZodEnum<{
|
|
249
|
+
resting: "resting";
|
|
250
|
+
working: "working";
|
|
251
|
+
terminal: "terminal";
|
|
252
|
+
}>;
|
|
253
|
+
role: z.ZodOptional<z.ZodString>;
|
|
254
|
+
transitions: z.ZodArray<z.ZodObject<{
|
|
255
|
+
outcome: z.ZodNullable<z.ZodString>;
|
|
256
|
+
to: z.ZodString;
|
|
257
|
+
}, z.core.$strip>>;
|
|
258
|
+
}, z.core.$strip>>;
|
|
259
|
+
}, z.core.$strip>>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
};
|
|
262
|
+
readonly workItemList: {
|
|
263
|
+
readonly method: "GET";
|
|
264
|
+
readonly path: "/web/factory/projects/:id/work-items";
|
|
265
|
+
readonly description: "List Factory work items and running sessions";
|
|
266
|
+
readonly pathSchema: z.ZodObject<{
|
|
267
|
+
id: z.ZodString;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
readonly responseSchema: z.ZodObject<{
|
|
270
|
+
workItems: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
271
|
+
runningSessionIds: z.ZodArray<z.ZodString>;
|
|
272
|
+
parkedSessionIds: z.ZodArray<z.ZodString>;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
};
|
|
275
|
+
readonly workItemCreate: {
|
|
276
|
+
readonly method: "POST";
|
|
277
|
+
readonly path: "/web/factory/projects/:id/work-items";
|
|
278
|
+
readonly description: "Create a work item in Intake";
|
|
279
|
+
readonly pathSchema: z.ZodObject<{
|
|
280
|
+
id: z.ZodString;
|
|
281
|
+
}, z.core.$strip>;
|
|
282
|
+
readonly bodySchema: z.ZodObject<{
|
|
283
|
+
title: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
284
|
+
board: z.ZodOptional<z.ZodString>;
|
|
285
|
+
externalSource: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
286
|
+
integrationId: z.ZodString;
|
|
287
|
+
type: z.ZodString;
|
|
288
|
+
externalId: z.ZodString;
|
|
289
|
+
url: z.ZodOptional<z.ZodString>;
|
|
290
|
+
}, z.core.$strip>>>;
|
|
291
|
+
parentWorkItemId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
292
|
+
stages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
293
|
+
sessions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
294
|
+
sessionId: z.ZodString;
|
|
295
|
+
branch: z.ZodString;
|
|
296
|
+
threadId: z.ZodString;
|
|
297
|
+
}, z.core.$strip>>>;
|
|
298
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>, z.ZodTransform<{
|
|
299
|
+
[x: string]: unknown;
|
|
300
|
+
} | null, Record<string, unknown> | null>>>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
readonly responseSchema: z.ZodObject<{
|
|
303
|
+
workItem: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
};
|
|
306
|
+
readonly workItemUpdate: {
|
|
307
|
+
readonly method: "PATCH";
|
|
308
|
+
readonly path: "/web/factory/work-items/:id";
|
|
309
|
+
readonly description: "Update non-stage work-item fields";
|
|
310
|
+
readonly pathSchema: z.ZodObject<{
|
|
311
|
+
id: z.ZodString;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
readonly bodySchema: z.ZodObject<{
|
|
314
|
+
title: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
315
|
+
board: z.ZodOptional<z.ZodString>;
|
|
316
|
+
parentWorkItemId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
317
|
+
stages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
318
|
+
sessions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
319
|
+
sessionId: z.ZodString;
|
|
320
|
+
branch: z.ZodString;
|
|
321
|
+
threadId: z.ZodString;
|
|
322
|
+
}, z.core.$strip>>>;
|
|
323
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>, z.ZodTransform<{
|
|
324
|
+
[x: string]: unknown;
|
|
325
|
+
} | null, Record<string, unknown> | null>>>;
|
|
326
|
+
plansPreapproved: z.ZodOptional<z.ZodLiteral<true>>;
|
|
327
|
+
}, z.core.$strip>;
|
|
328
|
+
readonly responseSchema: z.ZodObject<{
|
|
329
|
+
workItem: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
};
|
|
332
|
+
readonly workItemDelete: {
|
|
333
|
+
readonly method: "DELETE";
|
|
334
|
+
readonly path: "/web/factory/work-items/:id";
|
|
335
|
+
readonly description: "Delete a Factory work item";
|
|
336
|
+
readonly pathSchema: z.ZodObject<{
|
|
337
|
+
id: z.ZodString;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
readonly responseSchema: z.ZodObject<{
|
|
340
|
+
ok: z.ZodLiteral<true>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
};
|
|
343
|
+
readonly workItemTransition: {
|
|
344
|
+
readonly method: "POST";
|
|
345
|
+
readonly path: "/web/factory/projects/:id/work-items/:workItemId/transition";
|
|
346
|
+
readonly description: "Transition a work item with its expected revision";
|
|
347
|
+
readonly pathSchema: z.ZodObject<{
|
|
348
|
+
id: z.ZodString;
|
|
349
|
+
workItemId: z.ZodString;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
readonly bodySchema: z.ZodPipe<z.ZodObject<{
|
|
352
|
+
board: z.ZodString;
|
|
353
|
+
stage: z.ZodString;
|
|
354
|
+
expectedRevision: z.ZodNumber;
|
|
355
|
+
requestId: z.ZodString;
|
|
356
|
+
cause: z.ZodString;
|
|
357
|
+
reenter: z.ZodOptional<z.ZodUnknown>;
|
|
358
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
359
|
+
reenter?: boolean | undefined;
|
|
360
|
+
board: string;
|
|
361
|
+
stage: string;
|
|
362
|
+
expectedRevision: number;
|
|
363
|
+
ingress: {
|
|
364
|
+
type: "human";
|
|
365
|
+
identity: string;
|
|
366
|
+
};
|
|
367
|
+
cause: string;
|
|
368
|
+
}, {
|
|
369
|
+
board: string;
|
|
370
|
+
stage: string;
|
|
371
|
+
expectedRevision: number;
|
|
372
|
+
requestId: string;
|
|
373
|
+
cause: string;
|
|
374
|
+
reenter?: unknown;
|
|
375
|
+
}>>;
|
|
376
|
+
readonly responseSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
377
|
+
};
|
|
378
|
+
readonly workItemStart: {
|
|
379
|
+
readonly method: "POST";
|
|
380
|
+
readonly path: "/web/factory/projects/:id/runs/start";
|
|
381
|
+
readonly description: "Explicitly start a Factory work-item run";
|
|
382
|
+
readonly pathSchema: z.ZodObject<{
|
|
383
|
+
id: z.ZodString;
|
|
384
|
+
}, z.core.$strip>;
|
|
385
|
+
readonly bodySchema: z.ZodObject<{
|
|
386
|
+
sessionId: z.ZodString;
|
|
387
|
+
threadTitle: z.ZodString;
|
|
388
|
+
kickoffKey: z.ZodString;
|
|
389
|
+
workItem: z.ZodObject<{
|
|
390
|
+
id: z.ZodString;
|
|
391
|
+
role: z.ZodString;
|
|
392
|
+
input: z.ZodObject<{
|
|
393
|
+
title: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
394
|
+
board: z.ZodOptional<z.ZodString>;
|
|
395
|
+
externalSource: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
396
|
+
integrationId: z.ZodString;
|
|
397
|
+
type: z.ZodString;
|
|
398
|
+
externalId: z.ZodString;
|
|
399
|
+
url: z.ZodOptional<z.ZodString>;
|
|
400
|
+
}, z.core.$strip>>>;
|
|
401
|
+
parentWorkItemId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
402
|
+
stages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
403
|
+
sessions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
404
|
+
sessionId: z.ZodString;
|
|
405
|
+
branch: z.ZodString;
|
|
406
|
+
threadId: z.ZodString;
|
|
407
|
+
}, z.core.$strip>>>;
|
|
408
|
+
metadata: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>, z.ZodTransform<{
|
|
409
|
+
[x: string]: unknown;
|
|
410
|
+
} | null, Record<string, unknown> | null>>>;
|
|
411
|
+
}, z.core.$strip>;
|
|
412
|
+
}, z.core.$strip>;
|
|
413
|
+
}, z.core.$strip>;
|
|
414
|
+
readonly responseSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
415
|
+
};
|
|
416
|
+
readonly decisionList: {
|
|
417
|
+
readonly method: "GET";
|
|
418
|
+
readonly path: "/web/factory/projects/:id/decisions";
|
|
419
|
+
readonly description: "List Factory decisions";
|
|
420
|
+
readonly pathSchema: z.ZodObject<{
|
|
421
|
+
id: z.ZodString;
|
|
422
|
+
}, z.core.$strip>;
|
|
423
|
+
readonly querySchema: z.ZodObject<{
|
|
424
|
+
statuses: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<("pending" | "proposed" | "dismissed" | "superseded" | "leased" | "retry" | "succeeded" | "failed")[] | undefined, string | undefined>>;
|
|
425
|
+
before: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<{
|
|
426
|
+
createdAt: Date;
|
|
427
|
+
id: string;
|
|
428
|
+
} | undefined, string | undefined>>;
|
|
429
|
+
limit: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number, string | undefined>>;
|
|
430
|
+
}, z.core.$strip>;
|
|
431
|
+
readonly responseSchema: z.ZodObject<{
|
|
432
|
+
decisions: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
433
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
434
|
+
}, z.core.$strip>;
|
|
435
|
+
};
|
|
436
|
+
readonly decisionApprove: {
|
|
437
|
+
readonly method: "POST";
|
|
438
|
+
readonly path: "/web/factory/projects/:id/decisions/:decisionId/approve";
|
|
439
|
+
readonly description: "Approve a proposed Factory decision";
|
|
440
|
+
readonly pathSchema: z.ZodObject<{
|
|
441
|
+
id: z.ZodString;
|
|
442
|
+
decisionId: z.ZodString;
|
|
443
|
+
}, z.core.$strip>;
|
|
444
|
+
readonly responseSchema: z.ZodObject<{
|
|
445
|
+
decision: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
446
|
+
}, z.core.$strip>;
|
|
447
|
+
};
|
|
448
|
+
readonly decisionDismiss: {
|
|
449
|
+
readonly method: "POST";
|
|
450
|
+
readonly path: "/web/factory/projects/:id/decisions/:decisionId/dismiss";
|
|
451
|
+
readonly description: "Dismiss a proposed Factory decision";
|
|
452
|
+
readonly pathSchema: z.ZodObject<{
|
|
453
|
+
id: z.ZodString;
|
|
454
|
+
decisionId: z.ZodString;
|
|
455
|
+
}, z.core.$strip>;
|
|
456
|
+
readonly responseSchema: z.ZodObject<{
|
|
457
|
+
decision: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
};
|
|
460
|
+
readonly decisionRetry: {
|
|
461
|
+
readonly method: "POST";
|
|
462
|
+
readonly path: "/web/factory/projects/:id/decisions/:decisionId/retry";
|
|
463
|
+
readonly description: "Retry a failed retryable Factory decision";
|
|
464
|
+
readonly pathSchema: z.ZodObject<{
|
|
465
|
+
id: z.ZodString;
|
|
466
|
+
decisionId: z.ZodString;
|
|
467
|
+
}, z.core.$strip>;
|
|
468
|
+
readonly responseSchema: z.ZodObject<{
|
|
469
|
+
decision: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
470
|
+
}, z.core.$strip>;
|
|
471
|
+
};
|
|
472
|
+
readonly attentionList: {
|
|
473
|
+
readonly method: "GET";
|
|
474
|
+
readonly path: "/web/factory/projects/:id/attention";
|
|
475
|
+
readonly description: "List the Factory attention inbox";
|
|
476
|
+
readonly pathSchema: z.ZodObject<{
|
|
477
|
+
id: z.ZodString;
|
|
478
|
+
}, z.core.$strip>;
|
|
479
|
+
readonly querySchema: z.ZodObject<{
|
|
480
|
+
view: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
481
|
+
open: "open";
|
|
482
|
+
unread: "unread";
|
|
483
|
+
archived: "archived";
|
|
484
|
+
}>>>;
|
|
485
|
+
kind: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
486
|
+
activity: "activity";
|
|
487
|
+
"automation-failed": "automation-failed";
|
|
488
|
+
"automation-proposed": "automation-proposed";
|
|
489
|
+
mention: "mention";
|
|
490
|
+
"supervisor-finding": "supervisor-finding";
|
|
491
|
+
"agent-waiting": "agent-waiting";
|
|
492
|
+
}>>>;
|
|
493
|
+
before: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<Map<"activity" | "automation-failed" | "automation-proposed" | "mention" | "supervisor-finding" | "agent-waiting", AttentionStreamPosition | undefined> | undefined, string | undefined>>;
|
|
494
|
+
limit: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number, string | undefined>>;
|
|
495
|
+
search: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
496
|
+
}, z.core.$strip>;
|
|
497
|
+
readonly responseSchema: z.ZodObject<{
|
|
498
|
+
items: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
499
|
+
kinds: z.ZodRecord<z.ZodEnum<{
|
|
500
|
+
activity: "activity";
|
|
501
|
+
"automation-failed": "automation-failed";
|
|
502
|
+
"automation-proposed": "automation-proposed";
|
|
503
|
+
mention: "mention";
|
|
504
|
+
"supervisor-finding": "supervisor-finding";
|
|
505
|
+
"agent-waiting": "agent-waiting";
|
|
506
|
+
}>, z.ZodObject<{
|
|
507
|
+
open: z.ZodNumber;
|
|
508
|
+
unread: z.ZodNumber;
|
|
509
|
+
latest: z.ZodNullable<z.ZodObject<{
|
|
510
|
+
key: z.ZodString;
|
|
511
|
+
at: z.ZodString;
|
|
512
|
+
unread: z.ZodBoolean;
|
|
513
|
+
}, z.core.$strip>>;
|
|
514
|
+
}, z.core.$strip>>;
|
|
515
|
+
hasMore: z.ZodBoolean;
|
|
516
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
517
|
+
}, z.core.$strip>;
|
|
518
|
+
};
|
|
519
|
+
readonly attentionReadAll: {
|
|
520
|
+
readonly method: "POST";
|
|
521
|
+
readonly path: "/web/factory/projects/:id/attention/read-all";
|
|
522
|
+
readonly description: "Mark all Factory attention as read";
|
|
523
|
+
readonly pathSchema: z.ZodObject<{
|
|
524
|
+
id: z.ZodString;
|
|
525
|
+
}, z.core.$strip>;
|
|
526
|
+
readonly querySchema: z.ZodObject<{
|
|
527
|
+
before: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<Map<"activity" | "automation-failed" | "automation-proposed" | "mention" | "supervisor-finding" | "agent-waiting", AttentionStreamPosition | undefined> | undefined, string | undefined>>;
|
|
528
|
+
}, z.core.$strip>;
|
|
529
|
+
readonly responseSchema: z.ZodObject<{
|
|
530
|
+
ok: z.ZodLiteral<true>;
|
|
531
|
+
hasMore: z.ZodBoolean;
|
|
532
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
533
|
+
}, z.core.$strip>;
|
|
534
|
+
};
|
|
535
|
+
readonly attentionRead: {
|
|
536
|
+
readonly method: "POST";
|
|
537
|
+
readonly path: "/web/factory/projects/:id/attention/:kind/:sourceId/:occurrence/read";
|
|
538
|
+
readonly description: "Mark a Factory attention receipt as read";
|
|
539
|
+
readonly pathSchema: z.ZodObject<{
|
|
540
|
+
id: z.ZodString;
|
|
541
|
+
kind: z.ZodEnum<{
|
|
542
|
+
activity: "activity";
|
|
543
|
+
"automation-failed": "automation-failed";
|
|
544
|
+
"automation-proposed": "automation-proposed";
|
|
545
|
+
mention: "mention";
|
|
546
|
+
"supervisor-finding": "supervisor-finding";
|
|
547
|
+
"agent-waiting": "agent-waiting";
|
|
548
|
+
}>;
|
|
549
|
+
sourceId: z.ZodString;
|
|
550
|
+
occurrence: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
551
|
+
}, z.core.$strip>;
|
|
552
|
+
readonly responseSchema: z.ZodObject<{
|
|
553
|
+
receipt: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
554
|
+
}, z.core.$strip>;
|
|
555
|
+
};
|
|
556
|
+
readonly attentionArchive: {
|
|
557
|
+
readonly method: "POST";
|
|
558
|
+
readonly path: "/web/factory/projects/:id/attention/:kind/:sourceId/:occurrence/archive";
|
|
559
|
+
readonly description: "Archive a Factory attention receipt";
|
|
560
|
+
readonly pathSchema: z.ZodObject<{
|
|
561
|
+
id: z.ZodString;
|
|
562
|
+
kind: z.ZodEnum<{
|
|
563
|
+
activity: "activity";
|
|
564
|
+
"automation-failed": "automation-failed";
|
|
565
|
+
"automation-proposed": "automation-proposed";
|
|
566
|
+
mention: "mention";
|
|
567
|
+
"supervisor-finding": "supervisor-finding";
|
|
568
|
+
"agent-waiting": "agent-waiting";
|
|
569
|
+
}>;
|
|
570
|
+
sourceId: z.ZodString;
|
|
571
|
+
occurrence: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
572
|
+
}, z.core.$strip>;
|
|
573
|
+
readonly responseSchema: z.ZodObject<{
|
|
574
|
+
receipt: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
575
|
+
}, z.core.$strip>;
|
|
576
|
+
};
|
|
577
|
+
readonly attentionRestore: {
|
|
578
|
+
readonly method: "POST";
|
|
579
|
+
readonly path: "/web/factory/projects/:id/attention/:kind/:sourceId/:occurrence/restore";
|
|
580
|
+
readonly description: "Restore an archived Factory attention receipt";
|
|
581
|
+
readonly pathSchema: z.ZodObject<{
|
|
582
|
+
id: z.ZodString;
|
|
583
|
+
kind: z.ZodEnum<{
|
|
584
|
+
activity: "activity";
|
|
585
|
+
"automation-failed": "automation-failed";
|
|
586
|
+
"automation-proposed": "automation-proposed";
|
|
587
|
+
mention: "mention";
|
|
588
|
+
"supervisor-finding": "supervisor-finding";
|
|
589
|
+
"agent-waiting": "agent-waiting";
|
|
590
|
+
}>;
|
|
591
|
+
sourceId: z.ZodString;
|
|
592
|
+
occurrence: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
readonly responseSchema: z.ZodObject<{
|
|
595
|
+
receipt: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
596
|
+
}, z.core.$strip>;
|
|
597
|
+
};
|
|
598
|
+
readonly supervisorSession: {
|
|
599
|
+
readonly method: "POST";
|
|
600
|
+
readonly path: "/web/factory/projects/:id/supervisor/session";
|
|
601
|
+
readonly description: "Get the deterministic Factory supervisor session address";
|
|
602
|
+
readonly pathSchema: z.ZodObject<{
|
|
603
|
+
id: z.ZodString;
|
|
604
|
+
}, z.core.$strip>;
|
|
605
|
+
readonly responseSchema: z.ZodObject<{
|
|
606
|
+
sessionId: z.ZodString;
|
|
607
|
+
threadId: z.ZodString;
|
|
608
|
+
factoryProjectId: z.ZodString;
|
|
609
|
+
}, z.core.$strip>;
|
|
610
|
+
};
|
|
611
|
+
readonly supervisorHealth: {
|
|
612
|
+
readonly method: "GET";
|
|
613
|
+
readonly path: "/web/factory/projects/:id/supervisor/health";
|
|
614
|
+
readonly description: "Run the deterministic Factory supervisor health check";
|
|
615
|
+
readonly pathSchema: z.ZodObject<{
|
|
616
|
+
id: z.ZodString;
|
|
617
|
+
}, z.core.$strip>;
|
|
618
|
+
readonly responseSchema: z.ZodObject<{
|
|
619
|
+
checkedAt: z.ZodString;
|
|
620
|
+
findings: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
621
|
+
counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
622
|
+
}, z.core.$strip>;
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
export type FactoryRouteContractKey = keyof typeof FACTORY_ROUTE_CONTRACTS;
|
|
626
|
+
export {};
|
|
627
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/routes/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;IACvB,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,YAAY,kFAAkF,CAAC;AA8B5G,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;iBASoE,CAAC;AAgDzG,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;iBAQnC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;iBAUqE,CAAC;AAE3G,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;GAgB5B,CAAC;AAEN,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASlC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AA8CH,eAAO,MAAM,mBAAmB;;;;;;;iBAa9B,CAAC;AAWH,KAAK,uBAAuB,GAAG;IAAE,UAAU,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AA6ChE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;iBAS/B,CAAC;AAyBH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6NqB,CAAC;AAE1D,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,uBAAuB,CAAC"}
|