@agimon-ai/doompi-workflow 0.0.1-alpha.12 → 0.0.1-alpha.121
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/LICENSE +8 -0
- package/LICENSE.web +29 -0
- package/README.md +156 -26
- package/dist/apiContracts.cjs +361 -0
- package/dist/apiContracts.cjs.map +1 -0
- package/dist/apiContracts.d.mts +53 -0
- package/dist/apiContracts.d.mts.map +1 -0
- package/dist/apiContracts.mjs +356 -0
- package/dist/apiContracts.mjs.map +1 -0
- package/dist/extensions/pi.cjs +4775 -1
- package/dist/extensions/pi.cjs.map +1 -1
- package/dist/extensions/pi.d.mts +39 -2
- package/dist/extensions/pi.d.mts.map +1 -0
- package/dist/extensions/pi.mjs +4770 -1
- package/dist/extensions/pi.mjs.map +1 -1
- package/dist/extensions/server.cjs +3391 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +3383 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/extensions/web.mjs +3784 -0
- package/dist/extensions/web.mjs.map +1 -0
- package/dist/index.cjs +4 -1
- package/dist/index.d.mts +59 -3
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -1
- package/dist/workflowLaunchCommand-BLrxmzdd.mjs +125 -0
- package/dist/workflowLaunchCommand-BLrxmzdd.mjs.map +1 -0
- package/dist/workflowLaunchCommand-DJyDB96d.cjs +148 -0
- package/dist/workflowLaunchCommand-DJyDB96d.cjs.map +1 -0
- package/dist/workflowTerminal-Cuc79Gog.mjs +842 -0
- package/dist/workflowTerminal-Cuc79Gog.mjs.map +1 -0
- package/dist/workflowTerminal-DeJ9BBta.cjs +1158 -0
- package/dist/workflowTerminal-DeJ9BBta.cjs.map +1 -0
- package/llms.txt +16 -0
- package/package.json +92 -26
- package/skills/workflow-recovery/SKILL.md +17 -15
- package/src/prompts/doompi-author-workflow/SKILL.md +56 -0
- package/src/prompts/doompi-use-workflow/SKILL.md +21 -0
- package/src/types/webWorkflowTerminal.ts +114 -0
- package/src/types/webWorkflows.ts +175 -0
- package/dist/adapters/pi/dispatcher.cjs +0 -2
- package/dist/adapters/pi/dispatcher.cjs.map +0 -1
- package/dist/adapters/pi/dispatcher.d.cts +0 -6
- package/dist/adapters/pi/dispatcher.d.cts.map +0 -1
- package/dist/adapters/pi/dispatcher.d.mts +0 -6
- package/dist/adapters/pi/dispatcher.d.mts.map +0 -1
- package/dist/adapters/pi/dispatcher.mjs +0 -2
- package/dist/adapters/pi/dispatcher.mjs.map +0 -1
- package/dist/adapters/pi/extension.cjs +0 -2
- package/dist/adapters/pi/extension.cjs.map +0 -1
- package/dist/adapters/pi/extension.d.cts +0 -6
- package/dist/adapters/pi/extension.d.cts.map +0 -1
- package/dist/adapters/pi/extension.d.mts +0 -6
- package/dist/adapters/pi/extension.d.mts.map +0 -1
- package/dist/adapters/pi/extension.mjs +0 -2
- package/dist/adapters/pi/extension.mjs.map +0 -1
- package/dist/adapters/pi/leader.cjs +0 -2
- package/dist/adapters/pi/leader.cjs.map +0 -1
- package/dist/adapters/pi/leader.mjs +0 -2
- package/dist/adapters/pi/leader.mjs.map +0 -1
- package/dist/adapters/pi/workflow/piExtension.cjs +0 -11
- package/dist/adapters/pi/workflow/piExtension.cjs.map +0 -1
- package/dist/adapters/pi/workflow/piExtension.mjs +0 -11
- package/dist/adapters/pi/workflow/piExtension.mjs.map +0 -1
- package/dist/adapters/pi/workflow/piToolBridge.cjs +0 -11
- package/dist/adapters/pi/workflow/piToolBridge.cjs.map +0 -1
- package/dist/adapters/pi/workflow/piToolBridge.mjs +0 -11
- package/dist/adapters/pi/workflow/piToolBridge.mjs.map +0 -1
- package/dist/adapters/pi/workflow/piTools.cjs +0 -4
- package/dist/adapters/pi/workflow/piTools.cjs.map +0 -1
- package/dist/adapters/pi/workflow/piTools.mjs +0 -4
- package/dist/adapters/pi/workflow/piTools.mjs.map +0 -1
- package/dist/adapters/pi/workflow/workflowLauncher.cjs +0 -2
- package/dist/adapters/pi/workflow/workflowLauncher.cjs.map +0 -1
- package/dist/adapters/pi/workflow/workflowLauncher.mjs +0 -2
- package/dist/adapters/pi/workflow/workflowLauncher.mjs.map +0 -1
- package/dist/extensions/dispatcher.cjs +0 -2
- package/dist/extensions/dispatcher.cjs.map +0 -1
- package/dist/extensions/dispatcher.d.cts +0 -2
- package/dist/extensions/dispatcher.d.mts +0 -2
- package/dist/extensions/dispatcher.mjs +0 -2
- package/dist/extensions/dispatcher.mjs.map +0 -1
- package/dist/extensions/pi.d.cts +0 -2
- package/dist/index.d.cts +0 -3
- package/dist/schemas/workflowPi.cjs +0 -2
- package/dist/schemas/workflowPi.cjs.map +0 -1
- package/dist/schemas/workflowPi.mjs +0 -2
- package/dist/schemas/workflowPi.mjs.map +0 -1
- package/dist/services/workflow/backgroundWork.cjs +0 -2
- package/dist/services/workflow/backgroundWork.cjs.map +0 -1
- package/dist/services/workflow/backgroundWork.mjs +0 -2
- package/dist/services/workflow/backgroundWork.mjs.map +0 -1
- package/dist/tui/workflow/doomOverlay.cjs +0 -2
- package/dist/tui/workflow/doomOverlay.cjs.map +0 -1
- package/dist/tui/workflow/doomOverlay.mjs +0 -2
- package/dist/tui/workflow/doomOverlay.mjs.map +0 -1
- package/dist/tui/workflow/overlayText.cjs +0 -2
- package/dist/tui/workflow/overlayText.cjs.map +0 -1
- package/dist/tui/workflow/overlayText.mjs +0 -2
- package/dist/tui/workflow/overlayText.mjs.map +0 -1
- package/dist/tui/workflow/rendering.cjs +0 -2
- package/dist/tui/workflow/rendering.cjs.map +0 -1
- package/dist/tui/workflow/rendering.mjs +0 -2
- package/dist/tui/workflow/rendering.mjs.map +0 -1
- package/dist/tui/workflow/workflowFooterStatus.cjs +0 -2
- package/dist/tui/workflow/workflowFooterStatus.cjs.map +0 -1
- package/dist/tui/workflow/workflowFooterStatus.mjs +0 -2
- package/dist/tui/workflow/workflowFooterStatus.mjs.map +0 -1
- package/dist/tui/workflow/workflowInspector.cjs +0 -2
- package/dist/tui/workflow/workflowInspector.cjs.map +0 -1
- package/dist/tui/workflow/workflowInspector.mjs +0 -2
- package/dist/tui/workflow/workflowInspector.mjs.map +0 -1
- package/dist/tui/workflow/workflowOverlay.cjs +0 -2
- package/dist/tui/workflow/workflowOverlay.cjs.map +0 -1
- package/dist/tui/workflow/workflowOverlay.mjs +0 -2
- package/dist/tui/workflow/workflowOverlay.mjs.map +0 -1
- package/dist/tui/workflow/workflowPicker.cjs +0 -2
- package/dist/tui/workflow/workflowPicker.cjs.map +0 -1
- package/dist/tui/workflow/workflowPicker.mjs +0 -2
- package/dist/tui/workflow/workflowPicker.mjs.map +0 -1
- package/dist/tui/workflow/workflowPrompt.cjs +0 -2
- package/dist/tui/workflow/workflowPrompt.cjs.map +0 -1
- package/dist/tui/workflow/workflowPrompt.mjs +0 -2
- package/dist/tui/workflow/workflowPrompt.mjs.map +0 -1
- package/dist/tui/workflow/workflowRunPanel.cjs +0 -2
- package/dist/tui/workflow/workflowRunPanel.cjs.map +0 -1
- package/dist/tui/workflow/workflowRunPanel.mjs +0 -2
- package/dist/tui/workflow/workflowRunPanel.mjs.map +0 -1
- package/dist/tui/workflow/workflowStatusRow.cjs +0 -2
- package/dist/tui/workflow/workflowStatusRow.cjs.map +0 -1
- package/dist/tui/workflow/workflowStatusRow.mjs +0 -2
- package/dist/tui/workflow/workflowStatusRow.mjs.map +0 -1
- package/dist/tui/workflow/workflowStepMessage.cjs +0 -2
- package/dist/tui/workflow/workflowStepMessage.cjs.map +0 -1
- package/dist/tui/workflow/workflowStepMessage.mjs +0 -2
- package/dist/tui/workflow/workflowStepMessage.mjs.map +0 -1
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.mjs +0 -2
- package/dist/types/index.mjs.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
Portions of this software are licensed as follows:
|
|
2
|
+
|
|
3
|
+
* The browser half of this package, meaning every ".web" routed file under
|
|
4
|
+
"src/extensions" and the "_components" and "_lib" modules colocated with
|
|
5
|
+
one, is licensed under the DoomPi Web License defined in "LICENSE.web":
|
|
6
|
+
free to use, not to redistribute.
|
|
7
|
+
* All other content is licensed under the MIT license below.
|
|
8
|
+
|
|
1
9
|
MIT License
|
|
2
10
|
|
|
3
11
|
Copyright (c) 2026 Vuong Ngo
|
package/LICENSE.web
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
The DoomPi Web License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agimon Pty Ltd
|
|
4
|
+
|
|
5
|
+
With regard to the DoomPi Web Software:
|
|
6
|
+
|
|
7
|
+
This software and associated documentation files (the "Software") may be
|
|
8
|
+
used, free of charge, by any person or entity, for any purpose, including
|
|
9
|
+
production and commercial use. You may copy the Software as reasonably
|
|
10
|
+
necessary to install, run, develop against, test, and back it up. You are
|
|
11
|
+
free to modify the Software for your own use and to publish patches to the
|
|
12
|
+
Software. You agree that the licensor retains all right, title, and interest
|
|
13
|
+
in and to the Software, and that your modifications and patches may only be
|
|
14
|
+
used, copied, modified, displayed, distributed, or otherwise exploited
|
|
15
|
+
together with the Software. You are not granted any other rights beyond what
|
|
16
|
+
is expressly stated herein. Subject to the foregoing, it is forbidden to
|
|
17
|
+
publish, distribute, sublicense, and/or sell the Software or any copy of it,
|
|
18
|
+
or to offer the Software to third parties as a hosted or managed service.
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in
|
|
21
|
+
all copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
28
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
29
|
+
IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,47 +1,177 @@
|
|
|
1
1
|
# @agimon-ai/doompi-workflow
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Discover, launch, monitor, control, and recover asynchronous DoomPi workflows.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
`needs:`, `steps:`, timeouts, and declared artifacts. Every step names the session it wants,
|
|
7
|
-
so one run can hand each job exactly the context that job needs.
|
|
5
|
+
Part of the [DoomPi distribution](https://www.npmjs.com/package/@agimon-ai/doompi).
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
The integration embeds `@agimon-ai/workflow-mcp`. Workflow files describe job dependencies and
|
|
8
|
+
host-executed steps, while DoomPi provides session-scoped tools and TUI surfaces.
|
|
9
|
+
|
|
10
|
+
> **Alpha:** workflow and recovery contracts may change between releases.
|
|
11
|
+
|
|
12
|
+
## Requirements
|
|
13
|
+
|
|
14
|
+
- Node.js 22.19.0 or newer
|
|
15
|
+
- Pi 1.0.0 and Pi TUI 0.85.0
|
|
12
16
|
|
|
13
17
|
## Install
|
|
14
18
|
|
|
19
|
+
The seeded `modes.yaml` selects Workflow in `default.packages`. Keep it there or select it through
|
|
20
|
+
a layer; its tools remain inactive until Workflow mode is enabled. For standalone Pi:
|
|
21
|
+
|
|
15
22
|
```bash
|
|
16
|
-
|
|
23
|
+
pi install npm:@agimon-ai/doompi-workflow
|
|
17
24
|
```
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
Enable tools with `SPC w e`, or set `WORKFLOW_MCP_MODE=on` for a non-interactive harness that cannot
|
|
27
|
+
toggle the minor mode.
|
|
28
|
+
|
|
29
|
+
## Define a workflow
|
|
30
|
+
|
|
31
|
+
Create a `*.workflow.yml` file:
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
name: verify
|
|
35
|
+
|
|
36
|
+
jobs:
|
|
37
|
+
test:
|
|
38
|
+
steps:
|
|
39
|
+
- name: Run tests
|
|
40
|
+
run: pnpm test
|
|
41
|
+
|
|
42
|
+
summarize:
|
|
43
|
+
needs: test
|
|
44
|
+
steps:
|
|
45
|
+
- name: Record result
|
|
46
|
+
run: node scripts/write-verification-summary.mjs
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`run` commands execute on the host with the workflow process's environment and privileges. There is
|
|
50
|
+
no VM, container, or sandbox. Review workflow files as executable code. Runner-specific
|
|
51
|
+
`interactiveRun` mappings are available for commands that require a TTY.
|
|
52
|
+
|
|
53
|
+
A step can also declare `runConfig` (major mode, minor modes, profile, domains, model, thinking)
|
|
54
|
+
and `customRun` (a prompt). Launched from the DoomPi server, a `customRun` step runs as a child
|
|
55
|
+
session of the launching session with those settings, until the agent has recorded what the step
|
|
56
|
+
needs, and `run` and `interactiveRun` steps each get their own RMUX pane. Each run keeps its engine
|
|
57
|
+
log in `engine.log` in its run directory. See `docs/automation.md` for the full contract and the
|
|
58
|
+
CLI fallback.
|
|
59
|
+
|
|
60
|
+
## Launch and monitor
|
|
61
|
+
|
|
62
|
+
Core tools are:
|
|
63
|
+
|
|
64
|
+
- `list_workflows`: discover workflows.
|
|
65
|
+
- `launch_workflow`: register and start an asynchronous run.
|
|
66
|
+
- `workflow_run`: inspect or control a run through supported actions.
|
|
67
|
+
- `workflow_tools` (server/web sessions): read failed-run recovery evidence or resume the existing run.
|
|
20
68
|
|
|
21
|
-
|
|
22
|
-
|
|
69
|
+
Launch returns after the run is registered, not after all jobs complete. Use status for progress
|
|
70
|
+
and wait for a terminal notification. The TUI also supports follow controls.
|
|
23
71
|
|
|
24
|
-
|
|
72
|
+
In the TUI, `SPC w l` lists the repository's workflows and launches the one under the cursor with
|
|
73
|
+
`r`, `SPC w r` inspects this session's runs, `SPC w c` opens recovery, and `SPC w e`
|
|
74
|
+
toggles model-visible tools. The root session can launch; child sessions can inspect the catalog but
|
|
75
|
+
do not receive an unrestricted workflow factory.
|
|
25
76
|
|
|
26
|
-
##
|
|
77
|
+
## Storage, concurrency, and lifecycle
|
|
27
78
|
|
|
28
|
-
|
|
29
|
-
|
|
79
|
+
Registry data defaults to `$HOME/.workflow-mcp`; set `WORKFLOW_MCP_HOME` to relocate it. Persisted
|
|
80
|
+
records contain workflow and run identity, job and step state, ownership, output locations, and
|
|
81
|
+
recovery evidence. The default concurrency ceiling is five runs.
|
|
30
82
|
|
|
31
|
-
|
|
83
|
+
Runs embedded directly in the Pi process end with that process. Runs launched through a terminal
|
|
84
|
+
host such as tmux or cmux can have a different lifetime and remain manageable from the CLI. When
|
|
85
|
+
Team is loaded, Workflow contributes active session runs through Team's `doom/background-work`
|
|
86
|
+
service. That contribution reconnects after Team is replaced and is removed when Workflow unloads.
|
|
87
|
+
Reconciliation distinguishes stale registry records from live processes; do not assume every run
|
|
88
|
+
outlives its parent session.
|
|
89
|
+
|
|
90
|
+
Each workflow or repair step can launch commands and model-backed agents, consuming provider quota
|
|
91
|
+
and repeating external side effects.
|
|
92
|
+
|
|
93
|
+
## Recovery
|
|
94
|
+
|
|
95
|
+
Recovery is available only for records in a terminal failure state. A recovery claim atomically
|
|
96
|
+
adopts the eligible failure, validates the evidence, and transfers ownership to the replay session.
|
|
97
|
+
Live controls remain scoped to the owning session. Recovery does not launch a second copy beside a
|
|
98
|
+
still-running job and does not guarantee that parent-session work survives shutdown.
|
|
99
|
+
|
|
100
|
+
The package publishes `workflow-recovery`, `doompi-author-workflow` for writing workflow
|
|
101
|
+
definitions, and `doompi-use-workflow` for launching, monitoring, and recovering runs while Workflow
|
|
102
|
+
mode is active. Deactivating Workflow mode hides them; cached files may remain.
|
|
103
|
+
|
|
104
|
+
## Workflow sessions
|
|
105
|
+
|
|
106
|
+
In a server (web cockpit) session, a launch does not run in the session that asked for it. The
|
|
107
|
+
session creates a child **workflow session** (provenance `workflow-session`), nested under it in the
|
|
108
|
+
rail, and hands it the launch. The workflow session owns the run (`PI_SESSION_ID`), runs its step
|
|
109
|
+
sessions, and has Workflow mode on, so its agent can troubleshoot and recover the run. The run's
|
|
110
|
+
environment also carries `DOOMPI_WORKFLOW_LAUNCHER_SESSION_ID`, naming the launching session, which
|
|
111
|
+
lists the run in its Activity group, is told when it ends, and may read its status.
|
|
112
|
+
|
|
113
|
+
- The workflow session's rail row shows the run (`workflow · build › test · 4m`, or a failure or
|
|
114
|
+
pause marked like a pending question) through the host's per-session activity line.
|
|
115
|
+
- A failure or finish is posted into the workflow session's conversation as a notice, without
|
|
116
|
+
starting an agent turn. The owner agent also gets a live brief of its runs on every turn.
|
|
117
|
+
- After a success, a workflow session nobody interacted with asks its launcher to release it, and it
|
|
118
|
+
becomes `stopped · open to wake`. A session whose run failed or paused, or whose agent you
|
|
119
|
+
prompted, stays live until you remove it. Removing or restarting a live workflow session stops its
|
|
120
|
+
run.
|
|
121
|
+
- Recovery is refused from any session other than the owner while the owner is live.
|
|
122
|
+
|
|
123
|
+
Launches from inside a workflow session, and launches in hosts without a session service (the TUI
|
|
124
|
+
and CLI), run in place as before.
|
|
125
|
+
|
|
126
|
+
Each Pi extension instance uses the runner's shared Doom lifecycle. Reload or shutdown stops retained
|
|
127
|
+
callbacks, interrupts bounded inline work, removes UI and service registrations, and releases
|
|
128
|
+
package resources. Detached children load the same extension entry in their own process.
|
|
129
|
+
|
|
130
|
+
## Pi extension
|
|
131
|
+
|
|
132
|
+
The Pi extension is published at `@agimon-ai/doompi-workflow/extensions/pi` and declared in
|
|
133
|
+
`package.json.pi.extensions`. Installing the package loads it automatically; there is no secondary
|
|
134
|
+
registration or dispatcher export.
|
|
135
|
+
|
|
136
|
+
## Development
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
pnpm build
|
|
140
|
+
pnpm typecheck
|
|
141
|
+
pnpm test
|
|
142
|
+
pnpm lint
|
|
143
|
+
```
|
|
32
144
|
|
|
33
|
-
|
|
34
|
-
root session, so a subagent can look but not spawn.
|
|
145
|
+
Maintained by [Agimon](https://agimon.ai/about).
|
|
35
146
|
|
|
36
|
-
##
|
|
147
|
+
## Web cockpit plugin
|
|
37
148
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
149
|
+
The `.web` routed files under `src/extensions/workspaces/sessions/(frontend)` are this package's
|
|
150
|
+
DoomPi web cockpit plugin: the `workflow` dock face beside Activity and Context (the owned run's
|
|
151
|
+
jobs, active steps and artifacts, each opening its own tab), the workflow catalog and launch
|
|
152
|
+
dialog in the overlay slot, the Activity group's run rows (a handed-off run opens its workflow
|
|
153
|
+
session), their stores, and the `workflow_runs` session channel, compiled into the cockpit bundle
|
|
154
|
+
by `doompi-web`'s build. Each surface keeps its components in a colocated `_components` folder and
|
|
155
|
+
its stores and helpers in `_lib`.
|
|
156
|
+
The hub-side data source ships behind the `./web-hub` subpath and reads the workflow registry
|
|
157
|
+
(run.json plus progress.ndjson) exactly as the engine writes it. Both halves are declared by the
|
|
158
|
+
`doompiWeb` block in package.json.
|
|
44
159
|
|
|
45
160
|
## License
|
|
46
161
|
|
|
47
|
-
MIT
|
|
162
|
+
MIT, except this package's browser half (the `.web` routed files under `src/extensions` and the
|
|
163
|
+
`_components` and `_lib` modules colocated with one), which is source available under the DoomPi
|
|
164
|
+
Web License (see `LICENSE.web`): free to use, including commercially, but not to redistribute.
|
|
165
|
+
|
|
166
|
+
Workflow's host entries live in `src/extensions/pi.ts`, `server.ts`, and `web.ts`.
|
|
167
|
+
`src/exports` exposes reusable package APIs. Controllers declare server APIs and
|
|
168
|
+
contributions, tools declare native tools, and each service has its own folder.
|
|
169
|
+
Terminal presentation and its session coordinator live in `src/tui`.
|
|
170
|
+
|
|
171
|
+
The Pi helper owns registrations and service fibers. The Workflow runtime returns
|
|
172
|
+
commands, events, mode ownership, and tool dependencies. Session startup begins
|
|
173
|
+
readiness discovery; dependent calls await that session's readiness. On shutdown,
|
|
174
|
+
`onStop` interrupts inline runs and clears session resources, while `onDispose`
|
|
175
|
+
also handles startup failure. Both use the same idempotent cleanup. A generation
|
|
176
|
+
fence prevents retired callbacks from sending messages or updating the UI; only
|
|
177
|
+
explicit resource teardown may use a retired UI context.
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
let _agimon_ai_doompi_core_apiContracts = require("@agimon-ai/doompi-core/apiContracts");
|
|
6
|
+
let typebox = require("typebox");
|
|
7
|
+
//#region src/schemas/apiContracts.ts
|
|
8
|
+
const S = typebox.Type.String();
|
|
9
|
+
const N = typebox.Type.Number();
|
|
10
|
+
const B = typebox.Type.Boolean();
|
|
11
|
+
const O = typebox.Type.Optional;
|
|
12
|
+
const values = (items) => typebox.Type.Union(items.map((item) => typebox.Type.Literal(item)));
|
|
13
|
+
const Step = {
|
|
14
|
+
name: S,
|
|
15
|
+
status: values([
|
|
16
|
+
"running",
|
|
17
|
+
"completed",
|
|
18
|
+
"skipped",
|
|
19
|
+
"failed",
|
|
20
|
+
"pause_requested",
|
|
21
|
+
"paused",
|
|
22
|
+
"resumed"
|
|
23
|
+
]),
|
|
24
|
+
reason: O(S),
|
|
25
|
+
group: O(S),
|
|
26
|
+
startedAt: O(S),
|
|
27
|
+
endedAt: O(S)
|
|
28
|
+
};
|
|
29
|
+
const Run = typebox.Type.Object({
|
|
30
|
+
runKey: S,
|
|
31
|
+
workspace: S,
|
|
32
|
+
displayName: S,
|
|
33
|
+
workflowName: O(S),
|
|
34
|
+
workflowPath: S,
|
|
35
|
+
stage: values([
|
|
36
|
+
"running",
|
|
37
|
+
"completed",
|
|
38
|
+
"error"
|
|
39
|
+
]),
|
|
40
|
+
outcome: O(values([
|
|
41
|
+
"success",
|
|
42
|
+
"skipped",
|
|
43
|
+
"failed",
|
|
44
|
+
"interrupted"
|
|
45
|
+
])),
|
|
46
|
+
executionState: O(values([
|
|
47
|
+
"running",
|
|
48
|
+
"pause_requested",
|
|
49
|
+
"paused",
|
|
50
|
+
"resume_requested"
|
|
51
|
+
])),
|
|
52
|
+
prompt: O(S),
|
|
53
|
+
startedAt: S,
|
|
54
|
+
finishedAt: O(S),
|
|
55
|
+
errorMessage: O(S),
|
|
56
|
+
failedJob: O(S),
|
|
57
|
+
stale: O(B),
|
|
58
|
+
staleReason: O(S),
|
|
59
|
+
worktreeBranch: O(S),
|
|
60
|
+
position: O(typebox.Type.Object({
|
|
61
|
+
job: S,
|
|
62
|
+
step: O(S),
|
|
63
|
+
index: O(N),
|
|
64
|
+
total: O(N)
|
|
65
|
+
})),
|
|
66
|
+
jobs: typebox.Type.Array(typebox.Type.Object({
|
|
67
|
+
...Step,
|
|
68
|
+
phase: values([
|
|
69
|
+
"pre",
|
|
70
|
+
"job",
|
|
71
|
+
"post"
|
|
72
|
+
]),
|
|
73
|
+
index: O(N),
|
|
74
|
+
total: O(N),
|
|
75
|
+
steps: typebox.Type.Array(typebox.Type.Object(Step))
|
|
76
|
+
}))
|
|
77
|
+
});
|
|
78
|
+
const WorkflowRunsSchema = typebox.Type.Object({ runs: typebox.Type.Array(Run) });
|
|
79
|
+
const Artifact = {
|
|
80
|
+
path: S,
|
|
81
|
+
kind: values(["file", "directory"]),
|
|
82
|
+
description: S,
|
|
83
|
+
producedBy: typebox.Type.Array(S)
|
|
84
|
+
};
|
|
85
|
+
const WorkflowCatalogSchema = typebox.Type.Object({
|
|
86
|
+
cwd: S,
|
|
87
|
+
warning: O(S),
|
|
88
|
+
workflows: typebox.Type.Array(typebox.Type.Object({
|
|
89
|
+
path: S,
|
|
90
|
+
relativePath: S,
|
|
91
|
+
name: S,
|
|
92
|
+
description: S,
|
|
93
|
+
tags: typebox.Type.Array(S),
|
|
94
|
+
triggers: typebox.Type.Array(S),
|
|
95
|
+
inputs: typebox.Type.Array(typebox.Type.Object({
|
|
96
|
+
name: S,
|
|
97
|
+
description: O(S),
|
|
98
|
+
required: O(B),
|
|
99
|
+
default: O(S),
|
|
100
|
+
type: O(S),
|
|
101
|
+
options: O(typebox.Type.Array(S))
|
|
102
|
+
})),
|
|
103
|
+
jobs: typebox.Type.Array(typebox.Type.Object({
|
|
104
|
+
name: S,
|
|
105
|
+
steps: typebox.Type.Array(S)
|
|
106
|
+
})),
|
|
107
|
+
artifacts: typebox.Type.Array(typebox.Type.Object(Artifact)),
|
|
108
|
+
runners: O(typebox.Type.Array(S)),
|
|
109
|
+
commands: O(typebox.Type.Array(S)),
|
|
110
|
+
choices: O(typebox.Type.Array(S)),
|
|
111
|
+
error: O(S)
|
|
112
|
+
}))
|
|
113
|
+
});
|
|
114
|
+
const Screen = typebox.Type.Object({
|
|
115
|
+
lines: typebox.Type.Array(S),
|
|
116
|
+
capabilities: typebox.Type.Object({
|
|
117
|
+
readable: B,
|
|
118
|
+
writable: B,
|
|
119
|
+
resizable: B,
|
|
120
|
+
reason: O(S)
|
|
121
|
+
}),
|
|
122
|
+
ended: O(B)
|
|
123
|
+
});
|
|
124
|
+
const Control = typebox.Type.Object({
|
|
125
|
+
held: B,
|
|
126
|
+
token: O(S),
|
|
127
|
+
reason: O(S)
|
|
128
|
+
});
|
|
129
|
+
const root = "/runs/{workspace}/{runKey}";
|
|
130
|
+
const apiContracts = (0, _agimon_ai_doompi_core_apiContracts.defineApiContract)({
|
|
131
|
+
version: 1,
|
|
132
|
+
dynamic: [],
|
|
133
|
+
http: [
|
|
134
|
+
"global",
|
|
135
|
+
"workspace",
|
|
136
|
+
"session"
|
|
137
|
+
].flatMap((scope) => [
|
|
138
|
+
{
|
|
139
|
+
id: "workflow.screen",
|
|
140
|
+
scope,
|
|
141
|
+
basePath: "workflow",
|
|
142
|
+
path: `${root}/screen/stream`,
|
|
143
|
+
method: "GET",
|
|
144
|
+
authentication: "owner",
|
|
145
|
+
description: "Follow the workflow terminal.",
|
|
146
|
+
responses: {
|
|
147
|
+
"200": {
|
|
148
|
+
description: "SSE stream with JSON screen events.",
|
|
149
|
+
contentType: "text/event-stream",
|
|
150
|
+
schema: S,
|
|
151
|
+
events: { screen: Screen }
|
|
152
|
+
},
|
|
153
|
+
"404": {
|
|
154
|
+
description: "Run unavailable.",
|
|
155
|
+
schema: typebox.Type.Object({ error: S })
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "workflow.control",
|
|
161
|
+
scope,
|
|
162
|
+
basePath: "workflow",
|
|
163
|
+
path: `${root}/control`,
|
|
164
|
+
method: "POST",
|
|
165
|
+
authentication: "owner",
|
|
166
|
+
description: "Take or release the keyboard.",
|
|
167
|
+
body: {
|
|
168
|
+
required: true,
|
|
169
|
+
contentType: "application/json",
|
|
170
|
+
schema: typebox.Type.Object({
|
|
171
|
+
release: O(B),
|
|
172
|
+
token: O(S)
|
|
173
|
+
})
|
|
174
|
+
},
|
|
175
|
+
responses: {
|
|
176
|
+
...(0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(Control),
|
|
177
|
+
"409": {
|
|
178
|
+
description: "Keyboard unavailable.",
|
|
179
|
+
schema: Control
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: "workflow.keys",
|
|
185
|
+
scope,
|
|
186
|
+
basePath: "workflow",
|
|
187
|
+
path: `${root}/keys`,
|
|
188
|
+
method: "POST",
|
|
189
|
+
authentication: "owner",
|
|
190
|
+
description: "Write terminal data with the control token.",
|
|
191
|
+
body: {
|
|
192
|
+
required: true,
|
|
193
|
+
contentType: "application/json",
|
|
194
|
+
schema: typebox.Type.Object({
|
|
195
|
+
token: S,
|
|
196
|
+
data: S
|
|
197
|
+
})
|
|
198
|
+
},
|
|
199
|
+
responses: {
|
|
200
|
+
"204": { description: "Data written." },
|
|
201
|
+
"400": {
|
|
202
|
+
description: "Invalid request.",
|
|
203
|
+
schema: typebox.Type.Object({ error: S })
|
|
204
|
+
},
|
|
205
|
+
"409": {
|
|
206
|
+
description: "Write refused.",
|
|
207
|
+
schema: typebox.Type.Object({ error: S })
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
id: "workflow.resize",
|
|
213
|
+
scope,
|
|
214
|
+
basePath: "workflow",
|
|
215
|
+
path: `${root}/resize`,
|
|
216
|
+
method: "POST",
|
|
217
|
+
authentication: "owner",
|
|
218
|
+
description: "Resize the terminal.",
|
|
219
|
+
body: {
|
|
220
|
+
required: true,
|
|
221
|
+
contentType: "application/json",
|
|
222
|
+
schema: typebox.Type.Object({
|
|
223
|
+
token: S,
|
|
224
|
+
columns: N,
|
|
225
|
+
rows: N
|
|
226
|
+
})
|
|
227
|
+
},
|
|
228
|
+
responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Object({ resized: B }))
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: "workflow.delete",
|
|
232
|
+
scope,
|
|
233
|
+
basePath: "workflow",
|
|
234
|
+
path: root,
|
|
235
|
+
method: "DELETE",
|
|
236
|
+
authentication: "owner",
|
|
237
|
+
description: "Delete a settled run and its directory.",
|
|
238
|
+
responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Object({ deleted: typebox.Type.Literal(true) }))
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
id: "workflow.openRunDirectory",
|
|
242
|
+
scope,
|
|
243
|
+
basePath: "workflow",
|
|
244
|
+
path: `${root}/open-directory`,
|
|
245
|
+
method: "POST",
|
|
246
|
+
authentication: "owner",
|
|
247
|
+
description: "Open the registered run folder in Finder. Local callers only.",
|
|
248
|
+
responses: {
|
|
249
|
+
...(0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Object({ opened: typebox.Type.Literal(true) })),
|
|
250
|
+
"403": {
|
|
251
|
+
description: "Local caller required.",
|
|
252
|
+
schema: typebox.Type.Object({ error: S })
|
|
253
|
+
},
|
|
254
|
+
"409": {
|
|
255
|
+
description: "Folder opening unavailable.",
|
|
256
|
+
schema: typebox.Type.Object({ error: S })
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
id: "workflow.artifacts",
|
|
262
|
+
scope,
|
|
263
|
+
basePath: "workflow",
|
|
264
|
+
path: `${root}/artifacts`,
|
|
265
|
+
method: "GET",
|
|
266
|
+
authentication: "owner",
|
|
267
|
+
description: "List declared and discovered artifacts, or immediate children of a directory.",
|
|
268
|
+
parameters: [{
|
|
269
|
+
name: "directory",
|
|
270
|
+
in: "query",
|
|
271
|
+
required: false,
|
|
272
|
+
schema: S
|
|
273
|
+
}],
|
|
274
|
+
responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Object({
|
|
275
|
+
runDir: S,
|
|
276
|
+
description: S,
|
|
277
|
+
artifacts: typebox.Type.Array(typebox.Type.Object({
|
|
278
|
+
...Artifact,
|
|
279
|
+
declared: B,
|
|
280
|
+
state: values([
|
|
281
|
+
"written",
|
|
282
|
+
"empty",
|
|
283
|
+
"pending",
|
|
284
|
+
"unreadable"
|
|
285
|
+
]),
|
|
286
|
+
size: O(N),
|
|
287
|
+
modifiedAt: O(S)
|
|
288
|
+
}))
|
|
289
|
+
}))
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: "workflow.artifact",
|
|
293
|
+
scope,
|
|
294
|
+
basePath: "workflow",
|
|
295
|
+
path: `${root}/artifacts/{name}`,
|
|
296
|
+
method: "GET",
|
|
297
|
+
authentication: "owner",
|
|
298
|
+
description: "Read artifact metadata and text. name may contain nested path segments. raw=1 streams binary with its media type and supports byte ranges.",
|
|
299
|
+
parameters: [
|
|
300
|
+
{
|
|
301
|
+
name: "raw",
|
|
302
|
+
in: "query",
|
|
303
|
+
required: false,
|
|
304
|
+
schema: values(["0", "1"])
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: "download",
|
|
308
|
+
in: "query",
|
|
309
|
+
required: false,
|
|
310
|
+
schema: values(["0", "1"])
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: "range",
|
|
314
|
+
in: "header",
|
|
315
|
+
required: false,
|
|
316
|
+
schema: S
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
responses: {
|
|
320
|
+
...(0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Union([typebox.Type.Object({
|
|
321
|
+
path: S,
|
|
322
|
+
size: N,
|
|
323
|
+
modifiedAt: S,
|
|
324
|
+
mimeType: O(S),
|
|
325
|
+
text: O(S),
|
|
326
|
+
truncated: B
|
|
327
|
+
}), S])),
|
|
328
|
+
"206": {
|
|
329
|
+
description: "Partial raw bytes.",
|
|
330
|
+
contentType: "application/octet-stream",
|
|
331
|
+
schema: S
|
|
332
|
+
},
|
|
333
|
+
"416": { description: "Unsatisfiable byte range." }
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
]),
|
|
337
|
+
sockets: ["global", "workspace"].flatMap((scope) => [{
|
|
338
|
+
id: "workflow.runs",
|
|
339
|
+
scope,
|
|
340
|
+
service: "doompi.hub.v1",
|
|
341
|
+
member: "workflow_runs",
|
|
342
|
+
kind: "channel",
|
|
343
|
+
direction: "server-to-client",
|
|
344
|
+
description: "Workflow runs channel payload.",
|
|
345
|
+
input: WorkflowRunsSchema
|
|
346
|
+
}, {
|
|
347
|
+
id: "workflow.catalog",
|
|
348
|
+
scope,
|
|
349
|
+
service: "doompi.hub.v1",
|
|
350
|
+
member: "workflow_catalog",
|
|
351
|
+
kind: "channel",
|
|
352
|
+
direction: "server-to-client",
|
|
353
|
+
description: "Workflow catalog channel payload.",
|
|
354
|
+
input: WorkflowCatalogSchema
|
|
355
|
+
}])
|
|
356
|
+
});
|
|
357
|
+
//#endregion
|
|
358
|
+
exports.apiContracts = apiContracts;
|
|
359
|
+
exports.default = apiContracts;
|
|
360
|
+
|
|
361
|
+
//# sourceMappingURL=apiContracts.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract","jsonApiResponses"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses, type DoomHttpContract } from '@agimon-ai/doompi-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: 'doompi.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: 'doompi.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,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,QAAQ;AACvB,MAAM,IAAIA,QAAAA,KAAK;AACf,MAAM,UAA4B,UAAeA,QAAAA,KAAK,MAAM,MAAM,KAAK,SAASA,QAAAA,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,MAAM,MAAMA,QAAAA,KAAK,OAAO;CACtB,QAAQ;CACR,WAAW;CACX,aAAa;CACb,cAAc,EAAE,CAAC;CACjB,cAAc;CACd,OAAO,OAAO;EAAC;EAAW;EAAa;CAAO,CAAC;CAC/C,SAAS,EAAE,OAAO;EAAC;EAAW;EAAW;EAAU;CAAa,CAAC,CAAC;CAClE,gBAAgB,EAAE,OAAO;EAAC;EAAW;EAAmB;EAAU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