@agimon-ai/doompi-workflow 0.0.1-alpha.45 → 0.0.1-alpha.48

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 CHANGED
@@ -117,7 +117,7 @@ Maintained by [Agimon](https://agimon.ai/about).
117
117
 
118
118
  ## Web cockpit plugin
119
119
 
120
- The `web/` directory is this package's DoomPi web cockpit plugin: the workflows tab, its store,
120
+ The `src/web` directory is this package's DoomPi web cockpit plugin: the workflows tab, its store,
121
121
  and its `workflow_runs` session channel, compiled into the cockpit bundle by `doompi-web`'s build.
122
122
  The hub-side data source ships behind the `./web-hub` subpath and reads the workflow registry
123
123
  (run.json plus progress.ndjson) exactly as the engine writes it. Both halves are declared by the
@@ -125,5 +125,5 @@ The hub-side data source ships behind the `./web-hub` subpath and reads the work
125
125
 
126
126
  ## License
127
127
 
128
- MIT, except the `web/` directory, which is source available under the DoomPi Web License (see
129
- `web/LICENSE`): free to use, including commercially, but not to redistribute.
128
+ MIT, except the `src/web` directory, which is source available under the DoomPi Web License (see
129
+ `src/web/LICENSE`): free to use, including commercially, but not to redistribute.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-workflow",
3
- "version": "0.0.1-alpha.45",
3
+ "version": "0.0.1-alpha.48",
4
4
  "description": "GitHub Actions-style workflow graphs, artifacts, recovery, and asynchronous runs for DoomPi.",
5
5
  "keywords": [
6
6
  "ai",
@@ -31,7 +31,8 @@
31
31
  "README.md",
32
32
  "src/prompts",
33
33
  "skills/workflow-recovery/SKILL.md",
34
- "web",
34
+ "src/web",
35
+ "src/exports/webClient.ts",
35
36
  "src/types/webWorkflows.ts",
36
37
  "src/types/webWorkflowTerminal.ts"
37
38
  ],
@@ -67,12 +68,12 @@
67
68
  "@modelcontextprotocol/sdk": "1.30.0",
68
69
  "hono": "4.13.5",
69
70
  "zod": "4.4.3",
70
- "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.44",
71
- "@agimon-ai/doompi-ui": "0.0.1-alpha.45",
72
- "@agimon-ai/doompi-web-security": "0.0.1-alpha.6",
73
- "@agimon-ai/doompi-web-contracts": "0.0.1-alpha.8",
74
- "@agimon-ai/doompi-web-components": "0.0.1-alpha.5",
75
- "@agimon-ai/doompi-telemetry": "0.0.1-alpha.44"
71
+ "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.47",
72
+ "@agimon-ai/doompi-ui": "0.0.1-alpha.48",
73
+ "@agimon-ai/doompi-telemetry": "0.0.1-alpha.47",
74
+ "@agimon-ai/doompi-web-components": "0.0.1-alpha.8",
75
+ "@agimon-ai/doompi-web-security": "0.0.1-alpha.9",
76
+ "@agimon-ai/doompi-web-contracts": "0.0.1-alpha.11"
76
77
  },
77
78
  "devDependencies": {
78
79
  "@earendil-works/pi-coding-agent": "0.84.4",
@@ -117,7 +118,7 @@
117
118
  "workflow_runs",
118
119
  "workflow_catalog"
119
120
  ],
120
- "client": "./web/index.ts",
121
+ "client": "./src/exports/webClient.ts",
121
122
  "hub": {
122
123
  "entry": "./src/exports/webHub.ts",
123
124
  "dist": "./dist/webHub.mjs"
@@ -131,7 +132,7 @@
131
132
  "scripts": {
132
133
  "build": "tsdown",
133
134
  "test": "vitest --run",
134
- "typecheck": "tsc --noEmit && tsc --noEmit -p web/tsconfig.json",
135
+ "typecheck": "tsc --noEmit && tsc --noEmit -p src/web/tsconfig.json",
135
136
  "lint": "oxlint . && oxfmt . --check",
136
137
  "fixcode": "oxlint . --fix && oxfmt ."
137
138
  }
@@ -0,0 +1 @@
1
+ export { webPlugin } from '../web/index.ts';
@@ -1,12 +1,12 @@
1
1
  import { Badge, Button, EmptyState, Markdown } from '@agimon-ai/doompi-web-components';
2
2
  import type { TransientTab, WebPluginSlotProps } from '@agimon-ai/doompi-web-contracts';
3
3
  import { useEffect, useState } from 'react';
4
- import type { WorkflowRunView } from '../src/types/webWorkflows.ts';
4
+ import type { WorkflowRunView } from '../types/webWorkflows.ts';
5
5
  import type {
6
6
  WorkflowArtifactContentResponse,
7
7
  WorkflowArtifactsResponse,
8
8
  WorkflowArtifactView,
9
- } from '../src/types/webWorkflowTerminal.ts';
9
+ } from '../types/webWorkflowTerminal.ts';
10
10
  import { artifactContentUrl, fetchArtifact, fetchArtifacts } from './terminalApi.ts';
11
11
 
12
12
  const TAB_ID_PREFIX = 'workflows-artifact-';
@@ -191,14 +191,28 @@ function ArtifactPreview({
191
191
  );
192
192
  }
193
193
  if (mimeType === 'application/pdf') {
194
- return <object data-testid="artifact-pdf" data={rawUrl} type="application/pdf" className="min-h-[600px] w-full" />;
194
+ return (
195
+ <object
196
+ data-testid="artifact-pdf"
197
+ data={rawUrl}
198
+ type="application/pdf"
199
+ aria-label="PDF artifact"
200
+ className="min-h-[600px] w-full"
201
+ />
202
+ );
195
203
  }
196
204
  if (mimeType.startsWith('audio/')) {
197
- return <audio data-testid="artifact-audio" src={rawUrl} controls preload="metadata" className="w-full" />;
205
+ return (
206
+ <audio data-testid="artifact-audio" src={rawUrl} controls preload="metadata" className="w-full">
207
+ <track kind="captions" />
208
+ </audio>
209
+ );
198
210
  }
199
211
  if (mimeType.startsWith('video/')) {
200
212
  return (
201
- <video data-testid="artifact-video" src={rawUrl} controls preload="metadata" className="max-h-full max-w-full" />
213
+ <video data-testid="artifact-video" src={rawUrl} controls preload="metadata" className="max-h-full max-w-full">
214
+ <track kind="captions" />
215
+ </video>
202
216
  );
203
217
  }
204
218
  if (content.text !== undefined) {
@@ -17,7 +17,7 @@ import {
17
17
  } from '@agimon-ai/doompi-web-components';
18
18
  import type { SessionFrameSender } from '@agimon-ai/doompi-web-contracts';
19
19
  import { type KeyboardEvent as ReactKeyboardEvent, useState } from 'react';
20
- import type { WorkflowCatalogEntryView, WorkflowCatalogInputView } from '../src/types/webWorkflows.ts';
20
+ import type { WorkflowCatalogEntryView, WorkflowCatalogInputView } from '../types/webWorkflows.ts';
21
21
  import {
22
22
  initialInputs,
23
23
  initialRunner,
@@ -2,8 +2,8 @@ import { Badge, Button, StatusBadge, StreamCursor } from '@agimon-ai/doompi-web-
2
2
  import type { TransientTab, WebPluginSlotProps } from '@agimon-ai/doompi-web-contracts';
3
3
  import { useStore } from '@tanstack/react-store';
4
4
  import { type KeyboardEvent as ReactKeyboardEvent, useCallback, useEffect, useRef, useState } from 'react';
5
- import type { WorkflowRunView } from '../src/types/webWorkflows.ts';
6
- import type { WorkflowTerminalCapabilitiesView } from '../src/types/webWorkflowTerminal.ts';
5
+ import type { WorkflowRunView } from '../types/webWorkflows.ts';
6
+ import type { WorkflowTerminalCapabilitiesView } from '../types/webWorkflowTerminal.ts';
7
7
  import { ansiSpans } from './ansiSpans.ts';
8
8
  import { followScreen, releaseControl, sendKeys, takeControl } from './terminalApi.ts';
9
9
  import { workflows } from './workflowsStore.ts';
@@ -91,6 +91,8 @@ export function StepTerminalPanel({ sessionId, target }: WebPluginSlotProps & {
91
91
  const screenRef = useRef<HTMLDivElement>(null);
92
92
 
93
93
  useEffect(() => {
94
+ // A new run's screen has not ended yet; the subscription below is the external system.
95
+ // oxlint-disable-next-line react/set-state-in-effect
94
96
  setEnded(false);
95
97
  return followScreen(target.workspace, target.runKey, (event) => {
96
98
  setLines(event.lines);
@@ -1,7 +1,7 @@
1
1
  import { Badge, Button, CloseIcon, Input, Kbd } from '@agimon-ai/doompi-web-components';
2
2
  import { useStore } from '@tanstack/react-store';
3
3
  import type { KeyboardEvent as ReactKeyboardEvent } from 'react';
4
- import type { WorkflowCatalogEntryView } from '../src/types/webWorkflows.ts';
4
+ import type { WorkflowCatalogEntryView } from '../types/webWorkflows.ts';
5
5
  import { catalog, filterCatalog, selectWorkflow, setCatalogFilter, toggleInspect } from './catalogStore.ts';
6
6
 
7
7
  const INPUT_TAG = 'INPUT';
@@ -32,8 +32,8 @@ import type {
32
32
  WorkflowProgressState,
33
33
  WorkflowRunView,
34
34
  WorkflowStepView,
35
- } from '../src/types/webWorkflows.ts';
36
- import type { WorkflowTerminalCapabilitiesView } from '../src/types/webWorkflowTerminal.ts';
35
+ } from '../types/webWorkflows.ts';
36
+ import type { WorkflowTerminalCapabilitiesView } from '../types/webWorkflowTerminal.ts';
37
37
  import { ArtifactsPane, artifactTab } from './ArtifactsPane.tsx';
38
38
  import { ansiSpans } from './ansiSpans.ts';
39
39
  import { catalog, closeCatalog, closeLaunch, openCatalog, openLaunch } from './catalogStore.ts';
@@ -367,6 +367,9 @@ function InlineStepOutput({
367
367
  const screenRef = useRef<HTMLDivElement>(null);
368
368
 
369
369
  useEffect(() => {
370
+ // Clearing the mirror of the previous run before subscribing to the new one; the
371
+ // screen subscription below is the external system.
372
+ // oxlint-disable-next-line react/set-state-in-effect
370
373
  setLines([]);
371
374
  setCapabilities(undefined);
372
375
  setEnded(false);
@@ -3,7 +3,7 @@ import {
3
3
  WORKFLOW_CATALOG_TYPE,
4
4
  type WorkflowCatalogEntryView,
5
5
  type WorkflowCatalogPayload,
6
- } from '../src/types/webWorkflows.ts';
6
+ } from '../types/webWorkflows.ts';
7
7
 
8
8
  /** One session's catalog: what the hub last reported plus what the drawer is doing with it. */
9
9
  export interface CatalogSession {
@@ -1,4 +1,4 @@
1
- import type { WorkflowCatalogEntryView } from '../src/types/webWorkflows.ts';
1
+ import type { WorkflowCatalogEntryView } from '../types/webWorkflows.ts';
2
2
 
3
3
  /**
4
4
  * The `/workflow-launch` line the dialog sends.
@@ -7,7 +7,7 @@ import {
7
7
  type WorkflowControlResponse,
8
8
  type WorkflowDeleteResponse,
9
9
  type WorkflowScreenEvent,
10
- } from '../src/types/webWorkflowTerminal.ts';
10
+ } from '../types/webWorkflowTerminal.ts';
11
11
 
12
12
  /**
13
13
  * The page's half of this package's hub API: one run's terminal and the files
@@ -18,5 +18,5 @@
18
18
  "allowImportingTsExtensions": true,
19
19
  "forceConsistentCasingInFileNames": true
20
20
  },
21
- "include": [".", "../src/types", "../tests/web"]
21
+ "include": [".", "../types", "../exports/webClient.ts", "../../tests/web"]
22
22
  }
@@ -1,4 +1,4 @@
1
- import type { WorkflowRunView } from '../src/types/webWorkflows.ts';
1
+ import type { WorkflowRunView } from '../types/webWorkflows.ts';
2
2
  import { formatRunDuration } from './runDuration.ts';
3
3
 
4
4
  export type WorkflowActivityTone = 'running' | 'paused' | 'failed' | 'done' | 'skipped';
@@ -1,6 +1,6 @@
1
1
  import type { SessionFrameSender } from '@agimon-ai/doompi-web-contracts';
2
2
  import { defineSessionStore } from '@agimon-ai/doompi-web-contracts';
3
- import { WORKFLOW_RUNS_TYPE, type WorkflowRunView } from '../src/types/webWorkflows.ts';
3
+ import { WORKFLOW_RUNS_TYPE, type WorkflowRunView } from '../types/webWorkflows.ts';
4
4
  import { workflowRunIdentity } from './workflowActivity.ts';
5
5
 
6
6
  /** One session's record: the hub's last report plus the run this page is looking at. */
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes