takomi 2.1.39 → 2.1.41
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/.agents/plugins/marketplace.json +22 -22
- package/README.md +217 -422
- package/assets/.agent/skills/remotion/rules/assets/charts-bar-chart.tsx +173 -173
- package/assets/.agent/skills/remotion/rules/assets/text-animations-typewriter.tsx +100 -100
- package/assets/.agent/skills/remotion/rules/text-animations.md +20 -20
- package/assets/.agent/skills/remotion/rules/videos.md +171 -171
- package/assets/.agent/skills/remotion-real-ui-video/SKILL.md +264 -0
- package/assets/.agent/skills/remotion-real-ui-video/references/anti-patterns.md +114 -0
- package/assets/.agent/skills/remotion-real-ui-video/references/completion-checklist.md +75 -0
- package/assets/.agent/skills/remotion-real-ui-video/references/real-ui-bridge-example.md +93 -0
- package/assets/.agent/skills/takomi-flow/SKILL.md +244 -235
- package/docs/features/TakomiFlow_Portable_Plugin.md +82 -78
- package/docs/takomi-flow-onboarding.md +86 -76
- package/docs/takomi-flow-public-distribution.md +94 -94
- package/package.json +1 -1
- package/plugins/takomi-flow/.mcp.json +11 -11
- package/plugins/takomi-flow/assets/capabilities.json +203 -171
- package/plugins/takomi-flow/assets/collection.schema.json +29 -29
- package/plugins/takomi-flow/assets/examples.json +94 -94
- package/plugins/takomi-flow/assets/request.schema.json +91 -67
- package/plugins/takomi-flow/assets/result.schema.json +46 -45
- package/plugins/takomi-flow/assets/templates/image-request.json +17 -13
- package/plugins/takomi-flow/assets/templates/video-request.json +19 -15
- package/plugins/takomi-flow/package.json +38 -38
- package/plugins/takomi-flow/pnpm-lock.yaml +813 -813
- package/plugins/takomi-flow/references/flow-provider-contract.md +349 -326
- package/plugins/takomi-flow/scripts/lib/agent-plan.mjs +140 -130
- package/plugins/takomi-flow/scripts/lib/api.mjs +113 -113
- package/plugins/takomi-flow/scripts/lib/args.mjs +66 -57
- package/plugins/takomi-flow/scripts/lib/audit.mjs +65 -65
- package/plugins/takomi-flow/scripts/lib/browser.mjs +78 -39
- package/plugins/takomi-flow/scripts/lib/capabilities.mjs +11 -11
- package/plugins/takomi-flow/scripts/lib/collect.mjs +53 -53
- package/plugins/takomi-flow/scripts/lib/commands.mjs +192 -175
- package/plugins/takomi-flow/scripts/lib/doctor.mjs +77 -77
- package/plugins/takomi-flow/scripts/lib/examples.mjs +17 -17
- package/plugins/takomi-flow/scripts/lib/flow-media.mjs +39 -0
- package/plugins/takomi-flow/scripts/lib/flow-outcome.mjs +115 -90
- package/plugins/takomi-flow/scripts/lib/flow-project-session.mjs +153 -0
- package/plugins/takomi-flow/scripts/lib/flow-ui.mjs +204 -165
- package/plugins/takomi-flow/scripts/lib/generation.mjs +190 -90
- package/plugins/takomi-flow/scripts/lib/inspect.mjs +81 -81
- package/plugins/takomi-flow/scripts/lib/mcp-prompts.mjs +39 -39
- package/plugins/takomi-flow/scripts/lib/mcp-resources.mjs +16 -16
- package/plugins/takomi-flow/scripts/lib/mcp-tools.mjs +165 -150
- package/plugins/takomi-flow/scripts/lib/media.mjs +78 -78
- package/plugins/takomi-flow/scripts/lib/observe.mjs +54 -54
- package/plugins/takomi-flow/scripts/lib/paths.mjs +37 -37
- package/plugins/takomi-flow/scripts/lib/playwright-loader.mjs +23 -23
- package/plugins/takomi-flow/scripts/lib/prompts.mjs +72 -72
- package/plugins/takomi-flow/scripts/lib/report.mjs +141 -141
- package/plugins/takomi-flow/scripts/lib/request-validator.mjs +73 -58
- package/plugins/takomi-flow/scripts/lib/request.mjs +66 -55
- package/plugins/takomi-flow/scripts/lib/resource-files.mjs +69 -69
- package/plugins/takomi-flow/scripts/lib/result.mjs +31 -31
- package/plugins/takomi-flow/scripts/lib/review.mjs +44 -44
- package/plugins/takomi-flow/scripts/lib/selftest.mjs +153 -153
- package/plugins/takomi-flow/scripts/lib/settings-plan.mjs +44 -39
- package/plugins/takomi-flow/scripts/lib/templates.mjs +37 -37
- package/plugins/takomi-flow/scripts/lib/trusted-chrome.mjs +67 -67
- package/plugins/takomi-flow/scripts/lib/workflow.mjs +56 -56
- package/plugins/takomi-flow/scripts/mcp-server.mjs +18 -18
- package/plugins/takomi-flow/scripts/mcp-smoke.mjs +144 -142
- package/plugins/takomi-flow/scripts/takomi-flow.mjs +17 -17
- package/plugins/takomi-flow/skills/takomi-flow/SKILL.md +244 -235
- package/plugins/takomi-flow/skills/takomi-flow/agents/openai.yaml +7 -7
- package/scripts/install-takomi-flow.ps1 +85 -85
- package/src/skills-catalog.js +10 -9
|
@@ -1,235 +1,244 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: takomi-flow
|
|
3
|
-
description: "Use when Codex needs to operate Google Flow as a reusable agent tool through safe browser automation: bootstrap/login a persistent Flow profile, smoke-check access without spending credits, prepare image or video generation request files, run guarded Flow generations, download assets, inspect results, or integrate Flow assets into a video pipeline. Trigger for TakomiFlow, Flow browser provider, use Google Flow credits, Flow automation, generate with Flow, or agent-first Flow workflows."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# TakomiFlow
|
|
7
|
-
|
|
8
|
-
TakomiFlow is an agent-first workflow for using Google Flow through visible browser automation. Treat it as a local tool layer for Codex agents, not as an unofficial API.
|
|
9
|
-
|
|
10
|
-
## Runtime Choice
|
|
11
|
-
|
|
12
|
-
Use this skill as the single TakomiFlow entrypoint.
|
|
13
|
-
|
|
14
|
-
1. If the active harness is Codex and the user approves plugin installation or repair, install or reuse the global Codex plugin and then prefer its MCP tools.
|
|
15
|
-
2. If the plugin already exists, verify it with `doctor` and use MCP tools when the session exposes them.
|
|
16
|
-
3. If MCP is unavailable, use the TakomiFlow CLI directly.
|
|
17
|
-
4. If the harness is not Codex or does not support plugins, keep using this skill as the workflow guide and call the CLI when shell access exists.
|
|
18
|
-
5. If there is no shell access, provide the exact commands as a handoff checklist and stop.
|
|
19
|
-
|
|
20
|
-
Never install, update, or write to global plugin locations without telling the user what path will be changed and getting approval.
|
|
21
|
-
|
|
22
|
-
## Install Or Repair The Plugin
|
|
23
|
-
|
|
24
|
-
Only follow this path when the user asks to install/repair TakomiFlow or agrees after you detect that the Codex plugin is missing.
|
|
25
|
-
|
|
26
|
-
1. Check for an existing user plugin:
|
|
27
|
-
|
|
28
|
-
```powershell
|
|
29
|
-
Test-Path "$HOME\plugins\takomi-flow"
|
|
30
|
-
Test-Path "$HOME\.agents\plugins\marketplace.json"
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
2. If the plugin exists, inspect it:
|
|
34
|
-
|
|
35
|
-
```powershell
|
|
36
|
-
node "$HOME\plugins\takomi-flow\scripts\takomi-flow.mjs" doctor
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
If this works, do not reinstall unless the user asked to update or repair.
|
|
40
|
-
|
|
41
|
-
3. If missing, locate or get the VibeCode Protocol Suite:
|
|
42
|
-
|
|
43
|
-
```powershell
|
|
44
|
-
git clone https://github.com/JStaRFilms/VibeCode-Protocol-Suite "$HOME\Source\VibeCode-Protocol-Suite"
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
4. Install the plugin globally for the current user:
|
|
48
|
-
|
|
49
|
-
```powershell
|
|
50
|
-
cd "$HOME\Source\VibeCode-Protocol-Suite"
|
|
51
|
-
.\scripts\install-takomi-flow.ps1 -InstallDependencies
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This copies/registers the plugin at:
|
|
55
|
-
|
|
56
|
-
```text
|
|
57
|
-
~/plugins/takomi-flow
|
|
58
|
-
~/.agents/plugins/marketplace.json
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
5. Verify:
|
|
62
|
-
|
|
63
|
-
```powershell
|
|
64
|
-
node "$HOME\plugins\takomi-flow\scripts\takomi-flow.mjs" doctor
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
If Git is unavailable, ask the user to download the VibeCode Protocol Suite ZIP and run the installer from the extracted repo. MCP is optional; the CLI works without MCP.
|
|
68
|
-
|
|
69
|
-
## Agent Tool Surface
|
|
70
|
-
|
|
71
|
-
Prefer MCP tools when they are available in the active Codex session. Use the CLI commands as the stable fallback.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- `
|
|
76
|
-
- `
|
|
77
|
-
- `
|
|
78
|
-
- `
|
|
79
|
-
- `
|
|
80
|
-
- `
|
|
81
|
-
- `
|
|
82
|
-
- `
|
|
83
|
-
- `
|
|
84
|
-
- `
|
|
85
|
-
- `
|
|
86
|
-
- `
|
|
87
|
-
- `
|
|
88
|
-
- `
|
|
89
|
-
- `
|
|
90
|
-
- `
|
|
91
|
-
- `
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
- `takomi-flow://
|
|
97
|
-
- `takomi-flow://
|
|
98
|
-
- `takomi-flow://
|
|
99
|
-
- `takomi-flow://schemas/
|
|
100
|
-
- `takomi-flow://schemas/
|
|
101
|
-
- `takomi-flow://
|
|
102
|
-
- `takomi-flow://templates/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- `
|
|
108
|
-
- `
|
|
109
|
-
- `
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
- Never submit a paid generation unless the user explicitly requested it and `allowSpend` or `TAKOMI_FLOW_ALLOW_SPEND=true` is set.
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
node scripts/takomi-flow.mjs
|
|
134
|
-
node scripts/takomi-flow.mjs
|
|
135
|
-
node scripts/takomi-flow.mjs
|
|
136
|
-
node scripts/takomi-flow.mjs
|
|
137
|
-
node scripts/takomi-flow.mjs
|
|
138
|
-
node scripts/takomi-flow.mjs
|
|
139
|
-
node scripts/takomi-flow.mjs
|
|
140
|
-
node scripts/takomi-flow.mjs
|
|
141
|
-
node scripts/takomi-flow.mjs
|
|
142
|
-
node scripts/takomi-flow.mjs
|
|
143
|
-
node scripts/takomi-flow.mjs
|
|
144
|
-
node scripts/takomi-flow.mjs
|
|
145
|
-
node scripts/takomi-flow.mjs
|
|
146
|
-
node scripts/takomi-flow.mjs
|
|
147
|
-
node scripts/takomi-flow.mjs
|
|
148
|
-
node scripts/takomi-flow.mjs
|
|
149
|
-
node scripts/takomi-flow.mjs
|
|
150
|
-
node scripts/takomi-flow.mjs
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
|
|
190
|
-
- Run `
|
|
191
|
-
-
|
|
192
|
-
|
|
193
|
-
- Run `
|
|
194
|
-
-
|
|
195
|
-
|
|
196
|
-
- Run `
|
|
197
|
-
- Confirm no
|
|
198
|
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
|
|
202
|
-
-
|
|
203
|
-
- Use
|
|
204
|
-
|
|
205
|
-
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
-
-
|
|
214
|
-
-
|
|
215
|
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
|
|
220
|
-
-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
-
|
|
232
|
-
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
1
|
+
---
|
|
2
|
+
name: takomi-flow
|
|
3
|
+
description: "Use when Codex needs to operate Google Flow as a reusable agent tool through safe browser automation: bootstrap/login a persistent Flow profile, smoke-check access without spending credits, prepare image or video generation request files, run guarded Flow generations, download assets, inspect results, or integrate Flow assets into a video pipeline. Trigger for TakomiFlow, Flow browser provider, use Google Flow credits, Flow automation, generate with Flow, or agent-first Flow workflows."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TakomiFlow
|
|
7
|
+
|
|
8
|
+
TakomiFlow is an agent-first workflow for using Google Flow through visible browser automation. Treat it as a local tool layer for Codex agents, not as an unofficial API.
|
|
9
|
+
|
|
10
|
+
## Runtime Choice
|
|
11
|
+
|
|
12
|
+
Use this skill as the single TakomiFlow entrypoint.
|
|
13
|
+
|
|
14
|
+
1. If the active harness is Codex and the user approves plugin installation or repair, install or reuse the global Codex plugin and then prefer its MCP tools.
|
|
15
|
+
2. If the plugin already exists, verify it with `doctor` and use MCP tools when the session exposes them.
|
|
16
|
+
3. If MCP is unavailable, use the TakomiFlow CLI directly.
|
|
17
|
+
4. If the harness is not Codex or does not support plugins, keep using this skill as the workflow guide and call the CLI when shell access exists.
|
|
18
|
+
5. If there is no shell access, provide the exact commands as a handoff checklist and stop.
|
|
19
|
+
|
|
20
|
+
Never install, update, or write to global plugin locations without telling the user what path will be changed and getting approval.
|
|
21
|
+
|
|
22
|
+
## Install Or Repair The Plugin
|
|
23
|
+
|
|
24
|
+
Only follow this path when the user asks to install/repair TakomiFlow or agrees after you detect that the Codex plugin is missing.
|
|
25
|
+
|
|
26
|
+
1. Check for an existing user plugin:
|
|
27
|
+
|
|
28
|
+
```powershell
|
|
29
|
+
Test-Path "$HOME\plugins\takomi-flow"
|
|
30
|
+
Test-Path "$HOME\.agents\plugins\marketplace.json"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. If the plugin exists, inspect it:
|
|
34
|
+
|
|
35
|
+
```powershell
|
|
36
|
+
node "$HOME\plugins\takomi-flow\scripts\takomi-flow.mjs" doctor
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If this works, do not reinstall unless the user asked to update or repair.
|
|
40
|
+
|
|
41
|
+
3. If missing, locate or get the VibeCode Protocol Suite:
|
|
42
|
+
|
|
43
|
+
```powershell
|
|
44
|
+
git clone https://github.com/JStaRFilms/VibeCode-Protocol-Suite "$HOME\Source\VibeCode-Protocol-Suite"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
4. Install the plugin globally for the current user:
|
|
48
|
+
|
|
49
|
+
```powershell
|
|
50
|
+
cd "$HOME\Source\VibeCode-Protocol-Suite"
|
|
51
|
+
.\scripts\install-takomi-flow.ps1 -InstallDependencies
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This copies/registers the plugin at:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
~/plugins/takomi-flow
|
|
58
|
+
~/.agents/plugins/marketplace.json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
5. Verify:
|
|
62
|
+
|
|
63
|
+
```powershell
|
|
64
|
+
node "$HOME\plugins\takomi-flow\scripts\takomi-flow.mjs" doctor
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If Git is unavailable, ask the user to download the VibeCode Protocol Suite ZIP and run the installer from the extracted repo. MCP is optional; the CLI works without MCP.
|
|
68
|
+
|
|
69
|
+
## Agent Tool Surface
|
|
70
|
+
|
|
71
|
+
Prefer MCP tools when they are available in the active Codex session. Use the CLI commands as the stable fallback.
|
|
72
|
+
MCP tools:
|
|
73
|
+
|
|
74
|
+
- `takomi_flow_capabilities`
|
|
75
|
+
- `takomi_flow_doctor`
|
|
76
|
+
- `takomi_flow_audit`
|
|
77
|
+
- `takomi_flow_examples`
|
|
78
|
+
- `takomi_flow_template`
|
|
79
|
+
- `takomi_flow_prepare`
|
|
80
|
+
- `takomi_flow_workflow`
|
|
81
|
+
- `takomi_flow_validate`
|
|
82
|
+
- `takomi_flow_observe`
|
|
83
|
+
- `takomi_flow_generate`
|
|
84
|
+
- `takomi_flow_selftest`
|
|
85
|
+
- `takomi_flow_inspect`
|
|
86
|
+
- `takomi_flow_latest`
|
|
87
|
+
- `takomi_flow_runs`
|
|
88
|
+
- `takomi_flow_assets`
|
|
89
|
+
- `takomi_flow_review`
|
|
90
|
+
- `takomi_flow_collect`
|
|
91
|
+
- `takomi_flow_report`
|
|
92
|
+
|
|
93
|
+
MCP resources:
|
|
94
|
+
|
|
95
|
+
- `takomi-flow://contract`
|
|
96
|
+
- `takomi-flow://capabilities`
|
|
97
|
+
- `takomi-flow://examples`
|
|
98
|
+
- `takomi-flow://schemas/request`
|
|
99
|
+
- `takomi-flow://schemas/result`
|
|
100
|
+
- `takomi-flow://schemas/collection`
|
|
101
|
+
- `takomi-flow://templates/video`
|
|
102
|
+
- `takomi-flow://templates/image`
|
|
103
|
+
|
|
104
|
+
MCP prompts:
|
|
105
|
+
|
|
106
|
+
- `takomi_flow_video_workflow`
|
|
107
|
+
- `takomi_flow_image_workflow`
|
|
108
|
+
- `takomi_flow_review_workflow`
|
|
109
|
+
- `takomi_flow_collect_workflow`
|
|
110
|
+
|
|
111
|
+
Browser-opening MCP tools require `allowBrowser=true`. Generation still requires request `allowSpend=true` or `TAKOMI_FLOW_ALLOW_SPEND=true` before it can submit.
|
|
112
|
+
|
|
113
|
+
## Core Rules
|
|
114
|
+
|
|
115
|
+
- Use public Flow UI automation only.
|
|
116
|
+
- Do not bypass captchas, login challenges, quotas, safety checks, rate limits, or hidden endpoints.
|
|
117
|
+
- Prefer headed mode first so the user can handle Google login, consent, quota, and safety prompts.
|
|
118
|
+
- Browser commands should start from trusted Chrome/CDP by default; use Playwright-launched browsers only as an explicit fallback.
|
|
119
|
+
- Never submit a paid generation unless the user explicitly requested it and `allowSpend` or `TAKOMI_FLOW_ALLOW_SPEND=true` is set.
|
|
120
|
+
- Reuse the current Flow project or pass `projectUrl`; create new projects only when the user asks or `allowNewProject` is set.
|
|
121
|
+
- Treat Flow as one active generation at a time: wait for the current approved generation to finish and download it before submitting another paid generation.
|
|
122
|
+
- A gray preview placeholder with scheduled, queue, or ready-shortly copy means the generation is in progress, not failed.
|
|
123
|
+
- If stale scheduled or failure text remains after media is ready, probe/open the generated media and use the top toolbar Download control instead of waiting for the full timeout.
|
|
124
|
+
- Download generated media by opening the media and clicking the top toolbar `Download` icon/button.
|
|
125
|
+
- Keep credentials out of prompts, logs, metadata, and project files.
|
|
126
|
+
- Store run artifacts in a predictable folder and report the exact result paths.
|
|
127
|
+
|
|
128
|
+
## Commands
|
|
129
|
+
|
|
130
|
+
From the plugin root:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
node scripts/takomi-flow.mjs bootstrap
|
|
134
|
+
node scripts/takomi-flow.mjs bootstrap --browser-channel chrome
|
|
135
|
+
node scripts/takomi-flow.mjs trusted-chrome
|
|
136
|
+
node scripts/takomi-flow.mjs doctor
|
|
137
|
+
node scripts/takomi-flow.mjs audit
|
|
138
|
+
node scripts/takomi-flow.mjs selftest
|
|
139
|
+
node scripts/takomi-flow.mjs capabilities
|
|
140
|
+
node scripts/takomi-flow.mjs examples
|
|
141
|
+
node scripts/takomi-flow.mjs observe
|
|
142
|
+
node scripts/takomi-flow.mjs smoke
|
|
143
|
+
node scripts/takomi-flow.mjs template --kind video
|
|
144
|
+
node scripts/takomi-flow.mjs prepare --kind video --prompt "cinematic AI lab scene" --variations 2
|
|
145
|
+
node scripts/takomi-flow.mjs workflow --kind video --prompt "cinematic AI lab scene" --variations 2
|
|
146
|
+
node scripts/takomi-flow.mjs workflow --kind video --prompt "cinematic AI lab scene" --project-url "<Flow project URL>" --reuse-current-project
|
|
147
|
+
node scripts/takomi-flow.mjs validate --request output/takomi-flow/requests/<file>.json
|
|
148
|
+
node scripts/takomi-flow.mjs generate --request output/takomi-flow/requests/<file>.json
|
|
149
|
+
node scripts/takomi-flow.mjs inspect --run output/takomi-flow/<runId>/run.json
|
|
150
|
+
node scripts/takomi-flow.mjs latest --output-dir output/takomi-flow
|
|
151
|
+
node scripts/takomi-flow.mjs runs --output-dir output/takomi-flow --limit 10
|
|
152
|
+
node scripts/takomi-flow.mjs assets --run output/takomi-flow/<runId>/run.json --frames 4
|
|
153
|
+
node scripts/takomi-flow.mjs review --run output/takomi-flow/<runId>/run.json --frames 4
|
|
154
|
+
node scripts/takomi-flow.mjs collect --run output/takomi-flow/<runId>/run.json --target-dir output/pipeline-assets --frames 4 --include-frames
|
|
155
|
+
node scripts/takomi-flow.mjs report --run output/takomi-flow/<runId>/run.json
|
|
156
|
+
node scripts/takomi-flow.mjs report --output-dir output/takomi-flow --limit 10
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Important defaults:
|
|
160
|
+
|
|
161
|
+
- Profile dir: `%USERPROFILE%\.takomi-flow\browser-profile`
|
|
162
|
+
- Output dir: `%USERPROFILE%\.takomi-flow\runs`
|
|
163
|
+
- Browser channel: real Chrome by default on Windows/macOS when available
|
|
164
|
+
- Headed mode: enabled by default
|
|
165
|
+
- Spend guard: disabled by default
|
|
166
|
+
|
|
167
|
+
## Workflow
|
|
168
|
+
|
|
169
|
+
1. First-run/runtime detection:
|
|
170
|
+
- Run `doctor` first when the installation state is unknown.
|
|
171
|
+
- Check whether `http://127.0.0.1:9222/json/version` is already reachable.
|
|
172
|
+
- If the CDP endpoint is reachable, reuse it with `--cdp-url http://127.0.0.1:9222`.
|
|
173
|
+
- If the CDP endpoint is not reachable, launch `trusted-chrome`.
|
|
174
|
+
- If MCP tools are unavailable, use CLI commands from this plugin root.
|
|
175
|
+
- If the harness has no MCP support, TakomiFlow still works through shell commands.
|
|
176
|
+
2. Bootstrap login:
|
|
177
|
+
- Prefer `trusted-chrome` for Google login because Google may reject Playwright-launched browsers.
|
|
178
|
+
- Log into Google Flow manually in the opened trusted Chrome window.
|
|
179
|
+
- Keep that Chrome window open and use `--cdp-url http://127.0.0.1:9222` for observe/generate.
|
|
180
|
+
- A signed-in dashboard should show project cards and a `New project` button during `observe`.
|
|
181
|
+
- The project editor prompt textbox currently contains `What do you want to create?`.
|
|
182
|
+
- Leave Chrome on the desired project editor or pass `--project-url`; TakomiFlow does not click `New project` unless `--allow-new-project` is set.
|
|
183
|
+
- Rename a project by editing the top-left header title/date-time input.
|
|
184
|
+
- If the chat breaks, keep the same project and let `freshChatOnFailure` try one fresh chat before manual recovery.
|
|
185
|
+
- Prefer video durations `4`, `6`, `8`, or `10` seconds to avoid a Flow follow-up question.
|
|
186
|
+
- Use `bootstrap` only when Google accepts the launched browser.
|
|
187
|
+
- Ask the user to log into Google Flow manually in the opened browser.
|
|
188
|
+
- Do not automate credential entry.
|
|
189
|
+
3. Doctor check:
|
|
190
|
+
- Run `doctor` before browser work when reliability matters.
|
|
191
|
+
- Report missing Playwright, FFmpeg, profile, or output path issues.
|
|
192
|
+
4. Readiness audit:
|
|
193
|
+
- Run `audit` when an agent needs safe next actions and gated actions in one payload.
|
|
194
|
+
- Treat missing profile as a login/bootstrap gate, not a script failure.
|
|
195
|
+
5. Self-test:
|
|
196
|
+
- Run `selftest` after install, after edits, or before trusting TakomiFlow in a new project.
|
|
197
|
+
- Confirm no-spend request preparation, validation, spend guard behavior, and media extraction work.
|
|
198
|
+
6. Capability discovery:
|
|
199
|
+
- Run `capabilities` when an agent needs supported kinds, modes, request fields, variations, aspect ratios, outputs, and safety rules.
|
|
200
|
+
- Run `examples` or read `takomi-flow://examples` when an agent needs known-good request patterns.
|
|
201
|
+
7. Observe Flow UI:
|
|
202
|
+
- Run `observe` after bootstrap to capture current Flow controls, text inputs, buttons, screenshots, and manual-action state without submitting generation.
|
|
203
|
+
- Use observation output before changing selectors.
|
|
204
|
+
8. Smoke check:
|
|
205
|
+
- Run `smoke` to open Flow and save status metadata/screenshots.
|
|
206
|
+
- Confirm no generation was submitted.
|
|
207
|
+
9. Prepare request:
|
|
208
|
+
- Use `template --kind video` or `template --kind image` when an agent needs a known-good request skeleton.
|
|
209
|
+
- Use `takomi-flow://schemas/request` when an agent needs a machine-readable request shape.
|
|
210
|
+
- Use `takomi-flow://schemas/result` and `takomi-flow://schemas/collection` to consume run metadata and collected outputs.
|
|
211
|
+
- Use `prepare` to create a JSON request for image or video generation.
|
|
212
|
+
- Use `workflow` when an agent should prepare, validate, and optionally submit from one call.
|
|
213
|
+
- Include prompt, variations, aspect ratio, duration, model/mode hints, and output folder.
|
|
214
|
+
- Read `settingsPlan` to see which requested Flow options are automatic versus selector-dependent.
|
|
215
|
+
10. Validate request:
|
|
216
|
+
- Run `validate --request <file>` before `generate`.
|
|
217
|
+
- Fix failed source assets, invalid kinds, or malformed request JSON before opening Flow.
|
|
218
|
+
- Treat spend-guard warnings as expected unless the user explicitly approved spending credits.
|
|
219
|
+
11. Generate:
|
|
220
|
+
- Run `generate` only when spend is explicitly allowed.
|
|
221
|
+
- Expect Flow to ask for credit approval; approve only when `allowSpend=true` or the user explicitly approved spending.
|
|
222
|
+
- Stop for manual intervention if the UI asks for login, captcha, quota, safety, or consent.
|
|
223
|
+
- Preserve `settingsPlan` in the run metadata so downstream agents can see requested options.
|
|
224
|
+
12. Inspect:
|
|
225
|
+
- Read `run.json`, `status.json`, screenshots, and downloaded assets.
|
|
226
|
+
- Record and report `projectUrl` for every created Flow project so future runs can reuse or inspect it.
|
|
227
|
+
- Prefer `runs`, `inspect`, or `latest` for agent-readable summaries.
|
|
228
|
+
- Use `assets --frames 4` to catalog downloaded images/videos and extract review frames.
|
|
229
|
+
- Use `review --frames 4` to combine inspect, asset cataloging, frame extraction, and Markdown report creation.
|
|
230
|
+
- Use `collect` to copy reviewed outputs into a downstream project folder with a manifest.
|
|
231
|
+
- Use `report` to write a Markdown handoff for a single run or recent history.
|
|
232
|
+
- Report successes, errors, and manual next steps.
|
|
233
|
+
|
|
234
|
+
## Request Shape
|
|
235
|
+
|
|
236
|
+
Read `references/flow-provider-contract.md` before modifying scripts or integrating TakomiFlow into another project.
|
|
237
|
+
|
|
238
|
+
## Integration Guidance
|
|
239
|
+
|
|
240
|
+
- For a project pipeline, call TakomiFlow as an external provider and pass prompt/settings by JSON file.
|
|
241
|
+
- Keep Flow-specific selectors isolated in `scripts/lib/flow-ui.mjs`.
|
|
242
|
+
- Keep generation follow-up polling, credit approval, and completion/failure detection in `scripts/lib/flow-outcome.mjs`.
|
|
243
|
+
- Keep request/result parsing stable so other agents can use it without reading script internals.
|
|
244
|
+
- If a file approaches 200 lines, split it before adding more responsibilities.
|