Skip to content

Commit fadcd12

Browse files
committed
[automated] Apply ESLint and Oxfmt fixes
1 parent 8b5a335 commit fadcd12

6 files changed

Lines changed: 42 additions & 33 deletions

File tree

docs/agent/client-side-agent.md

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Provider-agnostic via Vercel `ai-sdk`. LLMs are already fluent in bash/CLI, so w
3333
## 1. Frontend surface map
3434

3535
### Graph / Node management
36+
3637
- `src/lib/litegraph/src/LGraph.ts`, `LGraphNode.ts`, `LGraphCanvas.ts`, `LLink.ts`
3738
- Subgraphs: `src/lib/litegraph/src/subgraph/*`
3839
- Widgets: `src/lib/litegraph/src/widgets/*`
@@ -47,12 +48,14 @@ Provider-agnostic via Vercel `ai-sdk`. LLMs are already fluent in bash/CLI, so w
4748
- `src/composables/graph/useSelectionOperations.ts`
4849

4950
### Command system
51+
5052
- `src/stores/commandStore.ts``ComfyCommand`, `registerCommand`, `execute(id)`
5153
- `src/composables/useCoreCommands.ts` — core command set (file/canvas/exec/view)
5254
- Extensions add more commands via `extensionService.ts:70` (`loadExtensionCommands`)
5355
- All commands are already idempotent-ish and UI-addressable → perfect CLI targets
5456

5557
### Backend API layer
58+
5659
- `src/scripts/api.ts``ComfyApi extends EventTarget`
5760
- HTTP:
5861
- `POST /prompt``queuePrompt()` (L854)
@@ -65,11 +68,13 @@ Provider-agnostic via Vercel `ai-sdk`. LLMs are already fluent in bash/CLI, so w
6568
- WebSocket events: `execution_start`, `executing`, `executed`, `execution_error`, `execution_success`, `progress`, `status`, `b_preview`, `logs`
6669

6770
### Workflow serialization
71+
6872
- `src/utils/executionUtil.ts:27``graphToPrompt(graph)``{ workflow, output }`
6973
- Schemas in `src/platform/workflow/validation/schemas/workflowSchema.ts`
7074
- Store: `src/platform/workflow/management/stores/workflowStore.ts`
7175

7276
### Extension system
77+
7378
- `src/types/comfy.ts``ComfyExtension` interface
7479
- `src/services/extensionService.ts` — lifecycle wiring
7580

@@ -78,7 +83,9 @@ Provider-agnostic via Vercel `ai-sdk`. LLMs are already fluent in bash/CLI, so w
7883
## 2. Asset / file APIs → fs-like commands
7984

8085
### Userdata (workflows, configs — owned by this user)
86+
8187
File: `src/scripts/api.ts`
88+
8289
- `getUserData(file)` — GET `/userdata/{file}` (L1173)
8390
- `storeUserData(file, data, opts)` — POST `/userdata/{file}` (L1184)
8491
- `deleteUserData(file)` — DELETE `/userdata/{file}` (L1220)
@@ -88,7 +95,9 @@ File: `src/scripts/api.ts`
8895
Store: `src/stores/userFileStore.ts` — already builds `fileTree` from userdata.
8996

9097
### Cloud assets (new API)
98+
9199
Service: `src/platform/assets/services/assetService.ts`
100+
92101
- `GET /assets` — list with tag filters
93102
- `POST /assets` — upload
94103
- `PUT /assets/{id}`, `DELETE /assets/{id}`
@@ -97,21 +106,25 @@ Service: `src/platform/assets/services/assetService.ts`
97106
- `GET /assets/remote-metadata`
98107

99108
### Legacy OSS endpoints
109+
100110
- `/upload/image`, `/upload/mask`
101111
- `/view` (image retrieval)
102112
- `/internal/files/input`
103113
- `/api/experiment/models`, `/api/experiment/models/{folder}`
104114
- `/api/view_metadata/{folder}?filename=X`
105115

106116
### Models
117+
107118
Store: `src/stores/modelStore.ts``ModelFolder`, `ComfyModelDef`, `loadModelFolders()`, `getLoadedModelFolder()`.
108119

109120
### Outputs / history
121+
110122
- `api.getHistory(max_items)` (L1024)
111123
- `api.getJobDetail(jobId)` (L1045)
112124
- `src/stores/assetsStore.ts:54``mapHistoryToAssets()`
113125

114126
### Existing tree abstraction
127+
115128
- `src/types/treeExplorerTypes.ts``TreeExplorerNode<T>` with rename/delete/addFolder/drop
116129
- `src/utils/treeUtil.ts:3``buildTree()` flat→tree
117130
- `UserFileStore.fileTree` already presents userdata as a tree
@@ -142,6 +155,7 @@ Mount the heterogeneous APIs under a single POSIX-ish tree:
142155
```
143156

144157
`cwd` lives in shell state. Each mount has a small adapter implementing:
158+
145159
```ts
146160
interface FsAdapter {
147161
list(path): Promise<Entry[]>
@@ -155,37 +169,37 @@ interface FsAdapter {
155169

156170
### fs command → API mapping
157171

158-
| Shell | Impl |
159-
|---|---|
160-
| `ls [path]` | `listUserDataFullInfo`, `assetService.list`, `modelStore.getLoadedModelFolder` depending on mount |
161-
| `cd <path>`, `pwd` | shell state only |
162-
| `cat <file>` | `getUserData` / fetch `/view` / `assets/{id}` blob |
163-
| `mv <src> <dst>` | `moveUserData` or assets PUT metadata |
164-
| `rm <path>` | `deleteUserData` or `DELETE /assets/{id}` or `deleteItem` on queue |
165-
| `cp <src> <dst>` | read → write (cross-mount allowed) |
166-
| `find <path> -name X` | recursive `listUserDataFullInfo` + glob |
167-
| `mkdir` | implicit via `storeUserData` with path |
168-
| `stat <path>` | mount-specific metadata |
169-
| `upload <local> <vfs-path>` | `/upload/image` or `POST /assets` |
170-
| `download <vfs-path>` | blob → trigger browser download |
172+
| Shell | Impl |
173+
| --------------------------- | ------------------------------------------------------------------------------------------------- |
174+
| `ls [path]` | `listUserDataFullInfo`, `assetService.list`, `modelStore.getLoadedModelFolder` depending on mount |
175+
| `cd <path>`, `pwd` | shell state only |
176+
| `cat <file>` | `getUserData` / fetch `/view` / `assets/{id}` blob |
177+
| `mv <src> <dst>` | `moveUserData` or assets PUT metadata |
178+
| `rm <path>` | `deleteUserData` or `DELETE /assets/{id}` or `deleteItem` on queue |
179+
| `cp <src> <dst>` | read → write (cross-mount allowed) |
180+
| `find <path> -name X` | recursive `listUserDataFullInfo` + glob |
181+
| `mkdir` | implicit via `storeUserData` with path |
182+
| `stat <path>` | mount-specific metadata |
183+
| `upload <local> <vfs-path>` | `/upload/image` or `POST /assets` |
184+
| `download <vfs-path>` | blob → trigger browser download |
171185

172186
### Graph/queue commands (not fs)
173187

174-
| Shell | Impl |
175-
|---|---|
176-
| `add-node <type> --pos x,y` | `useGraphNodeManager.addNode` |
177-
| `connect A:0 B:1` | `useGraphNodeManager.connect` |
178-
| `set-widget <id> <name> <val>` | `widgetValueStore.setWidgetValue` |
179-
| `rm-node <id>` | `graph.remove` |
180-
| `nodes [--grep X]` | enumerate `graph._nodes` |
181-
| `node-defs [pattern]` | `nodeDefStore` search |
182-
| `queue` | `api.queuePrompt(graphToPrompt(graph))` |
183-
| `queue-status` | `api.getQueue` |
184-
| `history [--last N]` | `api.getHistory` |
185-
| `interrupt` | `api.interrupt` |
186-
| `cmd <id> [args]` | `commandStore.execute` — exposes the entire `Comfy.*` command set |
187-
| `export [--format api\|workflow] > /tmp/wf.json` | `graphToPrompt` → vfs write |
188-
| `open <vfs-path>` | read workflow JSON → `workflowStore.openWorkflow` |
188+
| Shell | Impl |
189+
| ------------------------------------------------ | ----------------------------------------------------------------- |
190+
| `add-node <type> --pos x,y` | `useGraphNodeManager.addNode` |
191+
| `connect A:0 B:1` | `useGraphNodeManager.connect` |
192+
| `set-widget <id> <name> <val>` | `widgetValueStore.setWidgetValue` |
193+
| `rm-node <id>` | `graph.remove` |
194+
| `nodes [--grep X]` | enumerate `graph._nodes` |
195+
| `node-defs [pattern]` | `nodeDefStore` search |
196+
| `queue` | `api.queuePrompt(graphToPrompt(graph))` |
197+
| `queue-status` | `api.getQueue` |
198+
| `history [--last N]` | `api.getHistory` |
199+
| `interrupt` | `api.interrupt` |
200+
| `cmd <id> [args]` | `commandStore.execute` — exposes the entire `Comfy.*` command set |
201+
| `export [--format api\|workflow] > /tmp/wf.json` | `graphToPrompt` → vfs write |
202+
| `open <vfs-path>` | read workflow JSON → `workflowStore.openWorkflow` |
189203

190204
---
191205

src/components/boundingbox/WidgetBoundingBox.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable vue/one-component-per-file */
21
import { render, screen } from '@testing-library/vue'
32
import userEvent from '@testing-library/user-event'
43
import { describe, expect, it } from 'vitest'

src/components/graph/widgets/MultiSelectWidget.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable vue/one-component-per-file */
21
import { render, screen } from '@testing-library/vue'
32
import PrimeVue from 'primevue/config'
43
import { describe, expect, it } from 'vitest'

src/components/graph/widgets/TextPreviewWidget.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable vue/one-component-per-file */
21
import { render, screen } from '@testing-library/vue'
32
import PrimeVue from 'primevue/config'
43
import { beforeEach, describe, expect, it, vi } from 'vitest'

src/components/imagecrop/WidgetImageCrop.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable vue/one-component-per-file */
21
/* eslint-disable vue/no-reserved-component-names */
32
import { render, screen } from '@testing-library/vue'
43
import userEvent from '@testing-library/user-event'

src/components/range/WidgetRange.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable vue/one-component-per-file */
21
import { render, screen } from '@testing-library/vue'
32
import userEvent from '@testing-library/user-event'
43
import { beforeEach, describe, expect, it, vi } from 'vitest'

0 commit comments

Comments
 (0)