@petercjl/infinite-canvas-cli 0.1.2 → 0.1.3
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/capabilities.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schema": "infinite-canvas-capabilities",
|
|
3
3
|
"schema_version": "1.0.0",
|
|
4
4
|
"package": "@petercjl/infinite-canvas-cli",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.3",
|
|
6
6
|
"installationLifecycle": {
|
|
7
7
|
"required_components": [
|
|
8
8
|
"cli",
|
|
@@ -57,6 +57,12 @@
|
|
|
57
57
|
"concurrency": "separate conversations in the same tab; queued UI submissions and canvas writes; parallel remote runs",
|
|
58
58
|
"submission": "click native Send",
|
|
59
59
|
"directGenerationAPI": false,
|
|
60
|
+
"mediaHelperScope": [
|
|
61
|
+
"canvas.get",
|
|
62
|
+
"canvas.add",
|
|
63
|
+
"image.upload"
|
|
64
|
+
],
|
|
65
|
+
"requestedVideoParameters": "Convey task requirements in the prepared native Agent prompt; explicit final prompts stay unchanged; verify actual artifact metadata.",
|
|
60
66
|
"recovery": "saved sessionId/runId; read-only run and history APIs",
|
|
61
67
|
"model": "inherit webpage settings"
|
|
62
68
|
},
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ Execute an explicitly selected canvas video request with the installed `infinite
|
|
|
9
9
|
|
|
10
10
|
## Input and output
|
|
11
11
|
|
|
12
|
-
Require
|
|
12
|
+
Require an existing board file ID or an explicit request to create a named board, the exact prompt and 1–20 ordered PNG, JPEG or WebP references (local paths or HTTPS URLs). Ask only for missing required inputs. Preserve the prompt and image order; 图1 means the first attached image. Use the webpage model and native Agent workflow. When composing the execution prompt from a task, include the requested duration, aspect ratio, resolution and reference order in natural language. Preserve a final prompt explicitly supplied verbatim; resolve conflicts with webpage settings before submission. The absence of separate CLI flags is not evidence that the webpage Agent cannot receive these requirements. An authorized generation request allows one paid native Agent submission. A planning or dry-run request allows validation only.
|
|
13
13
|
|
|
14
14
|
Return the local MP4 from `artifacts[].path`, task ID, board ID and Frame ID. Success means `status=succeeded`, a nonempty downloaded video, original reference node IDs plus one video node in the saved Frame, and verified readback. A generated video with unfinished grouping is a partial result, reported with its task ID and recovery action.
|
|
15
15
|
|
|
@@ -19,6 +19,14 @@ Resolve `infinite-canvas` from PATH. Run `version --json`, `capabilities --json`
|
|
|
19
19
|
|
|
20
20
|
External dependencies are Node.js 22+, `playwright-core` and `image-size` (package managed), installed Google Chrome on macOS or Windows, and `sealseek-media` with image upload, canvas get/add capabilities. This Skill invokes the helper through the CLI contract; it does not compose another generation Skill. Browser authentication stays in the user's dedicated Chrome profile. Never copy cookies or tokens into a prompt, output or package.
|
|
21
21
|
|
|
22
|
+
## Generation route and helper boundary
|
|
23
|
+
|
|
24
|
+
Video generation in this Skill always uses `infinite-canvas video generate`: one native Agent conversation and the webpage Send button. `sealseek-media` supplies canvas and media-management operations only. Never call its video/image generation commands or load its generation Skill as an alternative workflow. A missing flag, authentication error or UI issue does not authorize changing the generation route.
|
|
25
|
+
|
|
26
|
+
Use the supplied board ID. If the user explicitly requests a new board, create it through the helper's documented `canvas create --title TITLE --submit --json`, retain the returned canvas ID and return to this Skill's native video flow. The helper may require its own CLI login for canvas reads/writes and image upload; browser login and CLI authentication are separate. On `AUTH_REJECTED`, complete the helper's normal `auth login` flow and verify it before resuming the same canvas operation. Login does not authorize generation.
|
|
27
|
+
|
|
28
|
+
Inspect `capabilities` and dry-run output to distinguish explicit command options, inherited webpage settings and requirements conveyed in the prompt. Report a specific unverified or unsupported requirement accurately. Verify the actual returned video's dimensions and duration when inspection is available; a prompt or local dry run alone is not proof of delivery parameters.
|
|
29
|
+
|
|
22
30
|
## Installation and update
|
|
23
31
|
|
|
24
32
|
Treat plugin installation/update as one operation covering the CLI and this companion Skill. Resolve the current Agent’s own Skill directory from its configuration/catalog, read `skill source --json`, then run `install --agent AGENT_NAME --path SKILL_DIRECTORY --json`. For a package upgrade use `update install --yes --agent AGENT_NAME --path SKILL_DIRECTORY --json`; even an unchanged version must reconcile the Skill. If npm was installed/upgraded directly or scripts were disabled, run the same `install` completion step afterward. Completion requires the actual CLI version plus `complete=true`, `skill.installed=true` and `skill.current=true`. Load the synchronized Skill; refresh the host session if discovery requires it. Missing targets or synchronization failure are an incomplete installation. Only the current/requested Agent is synchronized.
|
|
@@ -38,3 +38,12 @@ The CLI never prints browser credentials. Changing source, a live webpage deploy
|
|
|
38
38
|
Only Google Chrome is an external browser prerequisite. macOS discovery checks system and current-user Applications; Windows checks per-user and Program Files locations, then App Paths registry entries. `INFINITE_CANVAS_CHROME_BIN` selects an actual executable for a custom installation. No extra launcher is required. `INFINITE_CANVAS_BROWSER_BIN` remains an explicit legacy override and is verified against the same port/profile contract.
|
|
39
39
|
|
|
40
40
|
`browser status` is read-only. `chrome.installed` and `available` describe installation; `running` and `ready` describe the dedicated instance. A stopped but installed Chrome passes the browser dependency check in `doctor`. `browser open` and normal video execution launch/reuse it, verify process ownership, loopback CDP 9223 and the current-user profile. On Windows this profile is under the current home directory; on macOS it is under the current home directory with the same `.dianshang-chrome-profile` name. Windows uses built-in PowerShell process/TCP queries; macOS uses bounded nonblocking system process queries. Startup is queued so concurrent jobs share the browser. `doctor --live --canvas ID` requires the running, authenticated, editable board as well.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Native video route and Windows text I/O
|
|
44
|
+
|
|
45
|
+
`infinite-canvas video generate` sends the exact prepared prompt to the webpage Agent. Duration, aspect ratio and resolution requested in a task belong in the prepared natural-language prompt unless an explicitly selected final prompt must remain verbatim. The CLI does not advertise separate flags for these settings; preserve the native route and distinguish webpage settings from prompt-level requirements. Verify actual output metadata before reporting exact dimensions or duration.
|
|
46
|
+
|
|
47
|
+
`sealseek-media` is a canvas/media helper, including board creation, reads, uploads and adding existing media. It is not this Skill's generation route. Its CLI credentials can require a separate login even while the dedicated Chrome is logged in. Resolve that dependency and return to the native flow; do not submit a second generation through the helper.
|
|
48
|
+
|
|
49
|
+
On Windows, use the host's declared shell and text-encoding contract. Keep JSON intact and parse it before selecting fields; a truncated text excerpt is not the complete result. Console replacement characters are inconclusive: inspect UTF-8 bytes or hashes before changing prompts or source files. If native CLI output or redirection is decoded incorrectly, report the host encoding issue. Preserve the existing task ID and submission receipt; recovery inspects that same task and never repeats a paid Send to obtain readable output.
|
package/src/contracts.mjs
CHANGED
|
@@ -19,7 +19,7 @@ export const manifest={schema:'infinite-canvas-capabilities',schema_version:'1.0
|
|
|
19
19
|
input:{required:['canvas_id','prompt','references'],references:'ordered PNG/JPEG/WebP local files or HTTPS URLs'},
|
|
20
20
|
output:{terminal:'local MP4 + saved Frame containing original reference nodes and one video node',fields:['task_id','status','canvas_id','session_id','run_id','frame_id','reference_element_ids','video_element_id','artifacts']},
|
|
21
21
|
operations:['browser.status','browser.open','board.inspect','video.generate.native-agent','task.inspect','task.wait','task.resume','task.sync','frame.group-existing'],
|
|
22
|
-
generationTransport:{kind:'native-browser-ui',newConversationPerLogicalVideo:true,singleTabPerCanvas:true,concurrency:'separate conversations in the same tab; queued UI submissions and canvas writes; parallel remote runs',submission:'click native Send',directGenerationAPI:false,recovery:'saved sessionId/runId; read-only run and history APIs',model:'inherit webpage settings'},
|
|
22
|
+
generationTransport:{kind:'native-browser-ui',newConversationPerLogicalVideo:true,singleTabPerCanvas:true,concurrency:'separate conversations in the same tab; queued UI submissions and canvas writes; parallel remote runs',submission:'click native Send',directGenerationAPI:false,mediaHelperScope:['canvas.get','canvas.add','image.upload'],requestedVideoParameters:'Convey task requirements in the prepared native Agent prompt; explicit final prompts stay unchanged; verify actual artifact metadata.',recovery:'saved sessionId/runId; read-only run and history APIs',model:'inherit webpage settings'},
|
|
23
23
|
dependencies:{node:'>=22',browser:'Installed Google Chrome; built-in macOS/Windows discovery and startup on loopback 9223 with current-user dedicated profile',canvasAPI:'sealseek-media >=0.6.7, public CLI commands',libraries:['playwright-core','image-size'],optional:['ffprobe']},
|
|
24
24
|
platforms:{'codex:macos':'tested: six native Agent video tasks across two boards; one tab per board; downloads, deduplication and Frame readback verified','generic:macos':'spec-compatible, runtime untested','sealseek:macos':'spec-compatible, runtime untested','generic:windows':'built-in Chrome discovery/startup implemented; actual host video end-to-end verification pending'},
|
|
25
25
|
commandContracts,
|
package/src/media-cli.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import {execute,newJSON,readJSON,exists,canonical,need,Fault} from './core.mjs';
|
|
|
4
4
|
export class MediaCLI {
|
|
5
5
|
constructor(){this.bin=process.env.INFINITE_CANVAS_MEDIA_BIN||'sealseek-media';}
|
|
6
6
|
async call(args){
|
|
7
|
+
need(['canvas get','canvas add','image upload'].includes(args.slice(0,2).join(' ')), 'MEDIA_HELPER_SCOPE', 'The media helper only reads/writes canvas media. Video generation uses the native Infinite Canvas Agent.');
|
|
7
8
|
try{const {stdout}=await execute(this.bin,[...args,'--json'],{timeout:90000,maxBuffer:32*1024*1024,env:{...process.env,SEALSEEK_MEDIA_AUTO_UPDATE:'0'}});const r=JSON.parse(stdout);need(r.ok!==false,r.error?.code||'MEDIA_API_FAILED',r.error?.message||'Canvas operation failed.');return r;}
|
|
8
9
|
catch(e){if(e instanceof Fault)throw e;let r;try{r=JSON.parse(e.stdout);}catch{}throw new Fault(r?.error?.code||'MEDIA_CLI_FAILED',r?.error?.message||'sealseek-media could not complete this operation.',{command:args.slice(0,2),cause:e.code});}
|
|
9
10
|
}
|