@agimon-ai/po-workflow 0.0.0-alpha.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.
@@ -0,0 +1,356 @@
1
+ import { defineApiContract, jsonApiResponses } from "@agimon-ai/po-core/apiContracts";
2
+ import { Type } from "typebox";
3
+ //#region src/schemas/apiContracts.ts
4
+ const S = Type.String();
5
+ const N = Type.Number();
6
+ const B = Type.Boolean();
7
+ const O = Type.Optional;
8
+ const values = (items) => Type.Union(items.map((item) => Type.Literal(item)));
9
+ const Step = {
10
+ name: S,
11
+ status: values([
12
+ "running",
13
+ "completed",
14
+ "skipped",
15
+ "failed",
16
+ "pause_requested",
17
+ "paused",
18
+ "resumed"
19
+ ]),
20
+ reason: O(S),
21
+ group: O(S),
22
+ startedAt: O(S),
23
+ endedAt: O(S)
24
+ };
25
+ const Run = Type.Object({
26
+ runKey: S,
27
+ workspace: S,
28
+ displayName: S,
29
+ workflowName: O(S),
30
+ workflowPath: S,
31
+ stage: values([
32
+ "running",
33
+ "completed",
34
+ "error"
35
+ ]),
36
+ outcome: O(values([
37
+ "success",
38
+ "skipped",
39
+ "failed",
40
+ "interrupted"
41
+ ])),
42
+ executionState: O(values([
43
+ "running",
44
+ "pause_requested",
45
+ "paused",
46
+ "resume_requested"
47
+ ])),
48
+ prompt: O(S),
49
+ startedAt: S,
50
+ finishedAt: O(S),
51
+ errorMessage: O(S),
52
+ failedJob: O(S),
53
+ stale: O(B),
54
+ staleReason: O(S),
55
+ worktreeBranch: O(S),
56
+ position: O(Type.Object({
57
+ job: S,
58
+ step: O(S),
59
+ index: O(N),
60
+ total: O(N)
61
+ })),
62
+ jobs: Type.Array(Type.Object({
63
+ ...Step,
64
+ phase: values([
65
+ "pre",
66
+ "job",
67
+ "post"
68
+ ]),
69
+ index: O(N),
70
+ total: O(N),
71
+ steps: Type.Array(Type.Object(Step))
72
+ }))
73
+ });
74
+ const WorkflowRunsSchema = Type.Object({ runs: Type.Array(Run) });
75
+ const Artifact = {
76
+ path: S,
77
+ kind: values(["file", "directory"]),
78
+ description: S,
79
+ producedBy: Type.Array(S)
80
+ };
81
+ const WorkflowCatalogSchema = Type.Object({
82
+ cwd: S,
83
+ warning: O(S),
84
+ workflows: Type.Array(Type.Object({
85
+ path: S,
86
+ relativePath: S,
87
+ name: S,
88
+ description: S,
89
+ tags: Type.Array(S),
90
+ triggers: Type.Array(S),
91
+ inputs: Type.Array(Type.Object({
92
+ name: S,
93
+ description: O(S),
94
+ required: O(B),
95
+ default: O(S),
96
+ type: O(S),
97
+ options: O(Type.Array(S))
98
+ })),
99
+ jobs: Type.Array(Type.Object({
100
+ name: S,
101
+ steps: Type.Array(S)
102
+ })),
103
+ artifacts: Type.Array(Type.Object(Artifact)),
104
+ runners: O(Type.Array(S)),
105
+ commands: O(Type.Array(S)),
106
+ choices: O(Type.Array(S)),
107
+ error: O(S)
108
+ }))
109
+ });
110
+ const Screen = Type.Object({
111
+ lines: Type.Array(S),
112
+ capabilities: Type.Object({
113
+ readable: B,
114
+ writable: B,
115
+ resizable: B,
116
+ reason: O(S)
117
+ }),
118
+ ended: O(B)
119
+ });
120
+ const Control = Type.Object({
121
+ held: B,
122
+ token: O(S),
123
+ reason: O(S)
124
+ });
125
+ const root = "/runs/{workspace}/{runKey}";
126
+ const apiContracts = defineApiContract({
127
+ version: 1,
128
+ dynamic: [],
129
+ http: [
130
+ "global",
131
+ "workspace",
132
+ "session"
133
+ ].flatMap((scope) => [
134
+ {
135
+ id: "workflow.screen",
136
+ scope,
137
+ basePath: "workflow",
138
+ path: `${root}/screen/stream`,
139
+ method: "GET",
140
+ authentication: "owner",
141
+ description: "Follow the workflow terminal.",
142
+ responses: {
143
+ "200": {
144
+ description: "SSE stream with JSON screen events.",
145
+ contentType: "text/event-stream",
146
+ schema: S,
147
+ events: { screen: Screen }
148
+ },
149
+ "404": {
150
+ description: "Run unavailable.",
151
+ schema: Type.Object({ error: S })
152
+ }
153
+ }
154
+ },
155
+ {
156
+ id: "workflow.control",
157
+ scope,
158
+ basePath: "workflow",
159
+ path: `${root}/control`,
160
+ method: "POST",
161
+ authentication: "owner",
162
+ description: "Take or release the keyboard.",
163
+ body: {
164
+ required: true,
165
+ contentType: "application/json",
166
+ schema: Type.Object({
167
+ release: O(B),
168
+ token: O(S)
169
+ })
170
+ },
171
+ responses: {
172
+ ...jsonApiResponses(Control),
173
+ "409": {
174
+ description: "Keyboard unavailable.",
175
+ schema: Control
176
+ }
177
+ }
178
+ },
179
+ {
180
+ id: "workflow.keys",
181
+ scope,
182
+ basePath: "workflow",
183
+ path: `${root}/keys`,
184
+ method: "POST",
185
+ authentication: "owner",
186
+ description: "Write terminal data with the control token.",
187
+ body: {
188
+ required: true,
189
+ contentType: "application/json",
190
+ schema: Type.Object({
191
+ token: S,
192
+ data: S
193
+ })
194
+ },
195
+ responses: {
196
+ "204": { description: "Data written." },
197
+ "400": {
198
+ description: "Invalid request.",
199
+ schema: Type.Object({ error: S })
200
+ },
201
+ "409": {
202
+ description: "Write refused.",
203
+ schema: Type.Object({ error: S })
204
+ }
205
+ }
206
+ },
207
+ {
208
+ id: "workflow.resize",
209
+ scope,
210
+ basePath: "workflow",
211
+ path: `${root}/resize`,
212
+ method: "POST",
213
+ authentication: "owner",
214
+ description: "Resize the terminal.",
215
+ body: {
216
+ required: true,
217
+ contentType: "application/json",
218
+ schema: Type.Object({
219
+ token: S,
220
+ columns: N,
221
+ rows: N
222
+ })
223
+ },
224
+ responses: jsonApiResponses(Type.Object({ resized: B }))
225
+ },
226
+ {
227
+ id: "workflow.delete",
228
+ scope,
229
+ basePath: "workflow",
230
+ path: root,
231
+ method: "DELETE",
232
+ authentication: "owner",
233
+ description: "Delete a settled run and its directory.",
234
+ responses: jsonApiResponses(Type.Object({ deleted: Type.Literal(true) }))
235
+ },
236
+ {
237
+ id: "workflow.openRunDirectory",
238
+ scope,
239
+ basePath: "workflow",
240
+ path: `${root}/open-directory`,
241
+ method: "POST",
242
+ authentication: "owner",
243
+ description: "Open the registered run folder in Finder. Local callers only.",
244
+ responses: {
245
+ ...jsonApiResponses(Type.Object({ opened: Type.Literal(true) })),
246
+ "403": {
247
+ description: "Local caller required.",
248
+ schema: Type.Object({ error: S })
249
+ },
250
+ "409": {
251
+ description: "Folder opening unavailable.",
252
+ schema: Type.Object({ error: S })
253
+ }
254
+ }
255
+ },
256
+ {
257
+ id: "workflow.artifacts",
258
+ scope,
259
+ basePath: "workflow",
260
+ path: `${root}/artifacts`,
261
+ method: "GET",
262
+ authentication: "owner",
263
+ description: "List declared and discovered artifacts, or immediate children of a directory.",
264
+ parameters: [{
265
+ name: "directory",
266
+ in: "query",
267
+ required: false,
268
+ schema: S
269
+ }],
270
+ responses: jsonApiResponses(Type.Object({
271
+ runDir: S,
272
+ description: S,
273
+ artifacts: Type.Array(Type.Object({
274
+ ...Artifact,
275
+ declared: B,
276
+ state: values([
277
+ "written",
278
+ "empty",
279
+ "pending",
280
+ "unreadable"
281
+ ]),
282
+ size: O(N),
283
+ modifiedAt: O(S)
284
+ }))
285
+ }))
286
+ },
287
+ {
288
+ id: "workflow.artifact",
289
+ scope,
290
+ basePath: "workflow",
291
+ path: `${root}/artifacts/{name}`,
292
+ method: "GET",
293
+ authentication: "owner",
294
+ description: "Read artifact metadata and text. name may contain nested path segments. raw=1 streams binary with its media type and supports byte ranges.",
295
+ parameters: [
296
+ {
297
+ name: "raw",
298
+ in: "query",
299
+ required: false,
300
+ schema: values(["0", "1"])
301
+ },
302
+ {
303
+ name: "download",
304
+ in: "query",
305
+ required: false,
306
+ schema: values(["0", "1"])
307
+ },
308
+ {
309
+ name: "range",
310
+ in: "header",
311
+ required: false,
312
+ schema: S
313
+ }
314
+ ],
315
+ responses: {
316
+ ...jsonApiResponses(Type.Union([Type.Object({
317
+ path: S,
318
+ size: N,
319
+ modifiedAt: S,
320
+ mimeType: O(S),
321
+ text: O(S),
322
+ truncated: B
323
+ }), S])),
324
+ "206": {
325
+ description: "Partial raw bytes.",
326
+ contentType: "application/octet-stream",
327
+ schema: S
328
+ },
329
+ "416": { description: "Unsatisfiable byte range." }
330
+ }
331
+ }
332
+ ]),
333
+ sockets: ["global", "workspace"].flatMap((scope) => [{
334
+ id: "workflow.runs",
335
+ scope,
336
+ service: "po.hub.v1",
337
+ member: "workflow_runs",
338
+ kind: "channel",
339
+ direction: "server-to-client",
340
+ description: "Workflow runs channel payload.",
341
+ input: WorkflowRunsSchema
342
+ }, {
343
+ id: "workflow.catalog",
344
+ scope,
345
+ service: "po.hub.v1",
346
+ member: "workflow_catalog",
347
+ kind: "channel",
348
+ direction: "server-to-client",
349
+ description: "Workflow catalog channel payload.",
350
+ input: WorkflowCatalogSchema
351
+ }])
352
+ });
353
+ //#endregion
354
+ export { apiContracts, apiContracts as default };
355
+
356
+ //# sourceMappingURL=apiContracts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiContracts.mjs","names":[],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses, type DoomHttpContract } from '@agimon-ai/po-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst N = Type.Number();\nconst B = Type.Boolean();\nconst O = Type.Optional;\nconst values = <T extends string>(items: T[]) => Type.Union(items.map((item) => Type.Literal(item)));\nconst Progress = values(['running', 'completed', 'skipped', 'failed', 'pause_requested', 'paused', 'resumed']);\nconst Step = { name: S, status: Progress, reason: O(S), group: O(S), startedAt: O(S), endedAt: O(S) };\nconst Run = Type.Object({\n runKey: S,\n workspace: S,\n displayName: S,\n workflowName: O(S),\n workflowPath: S,\n stage: values(['running', 'completed', 'error']),\n outcome: O(values(['success', 'skipped', 'failed', 'interrupted'])),\n executionState: O(values(['running', 'pause_requested', 'paused', 'resume_requested'])),\n prompt: O(S),\n startedAt: S,\n finishedAt: O(S),\n errorMessage: O(S),\n failedJob: O(S),\n stale: O(B),\n staleReason: O(S),\n worktreeBranch: O(S),\n position: O(Type.Object({ job: S, step: O(S), index: O(N), total: O(N) })),\n jobs: Type.Array(\n Type.Object({\n ...Step,\n phase: values(['pre', 'job', 'post']),\n index: O(N),\n total: O(N),\n steps: Type.Array(Type.Object(Step)),\n }),\n ),\n});\nexport const WorkflowRunsSchema = Type.Object({ runs: Type.Array(Run) });\nconst Artifact = { path: S, kind: values(['file', 'directory']), description: S, producedBy: Type.Array(S) };\nexport const WorkflowCatalogSchema = Type.Object({\n cwd: S,\n warning: O(S),\n workflows: Type.Array(\n Type.Object({\n path: S,\n relativePath: S,\n name: S,\n description: S,\n tags: Type.Array(S),\n triggers: Type.Array(S),\n inputs: Type.Array(\n Type.Object({\n name: S,\n description: O(S),\n required: O(B),\n default: O(S),\n type: O(S),\n options: O(Type.Array(S)),\n }),\n ),\n jobs: Type.Array(Type.Object({ name: S, steps: Type.Array(S) })),\n artifacts: Type.Array(Type.Object(Artifact)),\n runners: O(Type.Array(S)),\n commands: O(Type.Array(S)),\n choices: O(Type.Array(S)),\n error: O(S),\n }),\n ),\n});\nconst Screen = Type.Object({\n lines: Type.Array(S),\n capabilities: Type.Object({ readable: B, writable: B, resizable: B, reason: O(S) }),\n ended: O(B),\n});\nconst Control = Type.Object({ held: B, token: O(S), reason: O(S) });\nconst root = '/runs/{workspace}/{runKey}';\nexport const apiContracts = defineApiContract({\n version: 1,\n dynamic: [],\n http: (['global', 'workspace', 'session'] as const).flatMap((scope): DoomHttpContract[] => [\n {\n id: 'workflow.screen',\n scope,\n basePath: 'workflow',\n path: `${root}/screen/stream`,\n method: 'GET',\n authentication: 'owner',\n description: 'Follow the workflow terminal.',\n responses: {\n '200': {\n description: 'SSE stream with JSON screen events.',\n contentType: 'text/event-stream',\n schema: S,\n events: { screen: Screen },\n },\n '404': { description: 'Run unavailable.', schema: Type.Object({ error: S }) },\n },\n },\n {\n id: 'workflow.control',\n scope,\n basePath: 'workflow',\n path: `${root}/control`,\n method: 'POST',\n authentication: 'owner',\n description: 'Take or release the keyboard.',\n body: { required: true, contentType: 'application/json', schema: Type.Object({ release: O(B), token: O(S) }) },\n responses: { ...jsonApiResponses(Control), '409': { description: 'Keyboard unavailable.', schema: Control } },\n },\n {\n id: 'workflow.keys',\n scope,\n basePath: 'workflow',\n path: `${root}/keys`,\n method: 'POST',\n authentication: 'owner',\n description: 'Write terminal data with the control token.',\n body: { required: true, contentType: 'application/json', schema: Type.Object({ token: S, data: S }) },\n responses: {\n '204': { description: 'Data written.' },\n '400': { description: 'Invalid request.', schema: Type.Object({ error: S }) },\n '409': { description: 'Write refused.', schema: Type.Object({ error: S }) },\n },\n },\n {\n id: 'workflow.resize',\n scope,\n basePath: 'workflow',\n path: `${root}/resize`,\n method: 'POST',\n authentication: 'owner',\n description: 'Resize the terminal.',\n body: { required: true, contentType: 'application/json', schema: Type.Object({ token: S, columns: N, rows: N }) },\n responses: jsonApiResponses(Type.Object({ resized: B })),\n },\n {\n id: 'workflow.delete',\n scope,\n basePath: 'workflow',\n path: root,\n method: 'DELETE',\n authentication: 'owner',\n description: 'Delete a settled run and its directory.',\n responses: jsonApiResponses(Type.Object({ deleted: Type.Literal(true) })),\n },\n {\n id: 'workflow.openRunDirectory',\n scope,\n basePath: 'workflow',\n path: `${root}/open-directory`,\n method: 'POST',\n authentication: 'owner',\n description: 'Open the registered run folder in Finder. Local callers only.',\n responses: {\n ...jsonApiResponses(Type.Object({ opened: Type.Literal(true) })),\n '403': { description: 'Local caller required.', schema: Type.Object({ error: S }) },\n '409': { description: 'Folder opening unavailable.', schema: Type.Object({ error: S }) },\n },\n },\n {\n id: 'workflow.artifacts',\n scope,\n basePath: 'workflow',\n path: `${root}/artifacts`,\n method: 'GET',\n authentication: 'owner',\n description: 'List declared and discovered artifacts, or immediate children of a directory.',\n parameters: [{ name: 'directory', in: 'query', required: false, schema: S }],\n responses: jsonApiResponses(\n Type.Object({\n runDir: S,\n description: S,\n artifacts: Type.Array(\n Type.Object({\n ...Artifact,\n declared: B,\n state: values(['written', 'empty', 'pending', 'unreadable']),\n size: O(N),\n modifiedAt: O(S),\n }),\n ),\n }),\n ),\n },\n {\n id: 'workflow.artifact',\n scope,\n basePath: 'workflow',\n path: `${root}/artifacts/{name}`,\n method: 'GET',\n authentication: 'owner',\n description:\n 'Read artifact metadata and text. name may contain nested path segments. raw=1 streams binary with its media type and supports byte ranges.',\n parameters: [\n { name: 'raw', in: 'query', required: false, schema: values(['0', '1']) },\n { name: 'download', in: 'query', required: false, schema: values(['0', '1']) },\n { name: 'range', in: 'header', required: false, schema: S },\n ],\n responses: {\n ...jsonApiResponses(\n Type.Union([Type.Object({ path: S, size: N, modifiedAt: S, mimeType: O(S), text: O(S), truncated: B }), S]),\n ),\n '206': { description: 'Partial raw bytes.', contentType: 'application/octet-stream', schema: S },\n '416': { description: 'Unsatisfiable byte range.' },\n },\n },\n ]),\n sockets: (['global', 'workspace'] as const).flatMap((scope) => [\n {\n id: 'workflow.runs',\n scope,\n service: 'po.hub.v1',\n member: 'workflow_runs',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Workflow runs channel payload.',\n input: WorkflowRunsSchema,\n },\n {\n id: 'workflow.catalog',\n scope,\n service: 'po.hub.v1',\n member: 'workflow_catalog',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Workflow catalog channel payload.',\n input: WorkflowCatalogSchema,\n },\n ]),\n});\nexport default apiContracts;\n"],"mappings":";;;AAGA,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK,OAAO;AACtB,MAAM,IAAI,KAAK,QAAQ;AACvB,MAAM,IAAI,KAAK;AACf,MAAM,UAA4B,UAAe,KAAK,MAAM,MAAM,KAAK,SAAS,KAAK,QAAQ,IAAI,CAAC,CAAC;AAEnG,MAAM,OAAO;CAAE,MAAM;CAAG,QADP,OAAO;EAAC;EAAW;EAAa;EAAW;EAAU;EAAmB;EAAU;CAAS,CACrE;CAAG,QAAQ,EAAE,CAAC;CAAG,OAAO,EAAE,CAAC;CAAG,WAAW,EAAE,CAAC;CAAG,SAAS,EAAE,CAAC;AAAE;AACpG,M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