@insmind/cli 2.1.7 → 3.0.0
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 +6 -2
- package/contracts/operations/tool.call/canvas-input.schema.json +0 -3
- package/contracts/presentations/agent.send.schema.json +280 -0
- package/contracts/presentations/model.get.schema.json +217 -0
- package/contracts/presentations/model.list.schema.json +129 -0
- package/contracts/presentations/task.get.schema.json +135 -0
- package/contracts/presentations/tool.call.schema.json +185 -0
- package/dist/bin/insmind-cli.js +6 -1
- package/dist/src/bootstrap/create-cli.js +7 -4
- package/dist/src/bootstrap/create-runtime.js +7 -32
- package/dist/src/cli/action-binding.js +2 -2
- package/dist/src/cli/agent-commands.js +5 -4
- package/dist/src/cli/auth-commands.js +1 -1
- package/dist/src/cli/dam-commands.js +18 -10
- package/dist/src/cli/errors.js +1 -35
- package/dist/src/cli/host-input.js +0 -11
- package/dist/src/cli/model-commands.js +6 -5
- package/dist/src/cli/skill-output.js +13 -0
- package/dist/src/cli/tool-commands.js +9 -5
- package/dist/src/features/skill/catalog.js +152 -0
- package/dist/src/features/skill/manual.js +71 -0
- package/dist/src/features/tool/archived-ocr-result.js +74 -0
- package/dist/src/features/tool/canvas-copy.js +2 -3
- package/dist/src/features/tool/canvas-models.js +8 -5
- package/dist/src/features/tool/canvas-recovery.js +3 -2
- package/dist/src/features/tool/canvas-results.js +1 -55
- package/dist/src/features/tool/canvas-tool-adapter.js +7 -10
- package/dist/src/features/tool/mns-catalog-adapter.js +4 -4
- package/dist/src/features/tool/resource-authorizer.js +1 -1
- package/dist/src/features/tool/scene-catalog-adapter.js +20 -22
- package/dist/src/features/tool/tool-definitions.js +0 -1
- package/dist/src/product/config.js +0 -7
- package/dist/src/telemetry/command-routes.json +1 -1
- package/package.json +4 -4
- package/skills/insmind-cli/SKILL.md +9 -28
- package/contracts/operations/editor.apply/input.schema.json +0 -177
- package/contracts/operations/editor.apply/output.schema.json +0 -15
- package/contracts/operations/editor.connect/input.schema.json +0 -13
- package/contracts/operations/editor.connect/output.schema.json +0 -17
- package/contracts/operations/editor.disconnect/input.schema.json +0 -7
- package/contracts/operations/editor.disconnect/output.schema.json +0 -14
- package/contracts/operations/editor.save/input.schema.json +0 -7
- package/contracts/operations/editor.save/output.schema.json +0 -23
- package/contracts/operations/editor.screenshot/input.schema.json +0 -7
- package/contracts/operations/editor.screenshot/output.schema.json +0 -16
- package/contracts/operations/editor.snapshot/input.schema.json +0 -7
- package/contracts/operations/editor.snapshot/output.schema.json +0 -148
- package/contracts/operations/tool.call/models/image-ocr.schema.json +0 -20
- package/contracts/operations/tool.call/ocr-payload.schema.json +0 -64
- package/dist/src/cli/editor-commands.js +0 -136
- package/skills/insmind-cli/references/agent.md +0 -39
- package/skills/insmind-cli/references/auth.md +0 -8
- package/skills/insmind-cli/references/creation.md +0 -56
- package/skills/insmind-cli/references/dam.md +0 -52
- package/skills/insmind-cli/references/editor.md +0 -62
- package/skills/insmind-cli/references/errors.md +0 -42
- package/skills/insmind-cli/references/generation-constraints.md +0 -40
- package/skills/insmind-cli/references/matting.md +0 -27
- package/skills/insmind-cli/references/media-tools.md +0 -46
- package/skills/insmind-cli/references/tool.md +0 -24
- package/skills/insmind-cli/references/update.md +0 -18
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# AI+ Editor
|
|
2
|
-
|
|
3
|
-
## Discover capabilities and scope
|
|
4
|
-
|
|
5
|
-
This branch operates editable elements in a work identified by its ID or editor URL. For text, layers or vectors in an attachment, read [media tool selection](media-tools.md); an absent Editor Action does not prove CLI processing is unavailable.
|
|
6
|
-
|
|
7
|
-
On first entering this task branch, read help from the installed CLI. Before constructing Actions, query the input Schema:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
insmind-cli editor --help
|
|
11
|
-
insmind-cli editor apply --help
|
|
12
|
-
insmind-cli editor apply --schema
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Use the current Schema for supported elements, Actions, fields and choices, and the relevant command's help for scope, coordinate/color semantics, waits and errors. Schema discovery requires neither login nor an Editor connection. Do not infer capabilities from old examples or invent fields and commands.
|
|
16
|
-
|
|
17
|
-
Keep operations serial with one operator. If the Page contains unsupported content, stop and ask for a blank or dedicated Page; preserve the existing work.
|
|
18
|
-
|
|
19
|
-
## Workflow
|
|
20
|
-
|
|
21
|
-
Completion follows the user’s request: preview-only work ends with its screenshot and an explicit unsaved status; persistence requires successful save and the public URL. Verification does not override a no-save instruction.
|
|
22
|
-
|
|
23
|
-
1. Read `insmind-cli editor connect --help`. To continue an existing work, use its ID or link. Ask the user for it if the target is missing. Omit the target when the user wants a new Board. Browser login, loading, edit/save permissions and content checks must pass; stop editing on connection failure.
|
|
24
|
-
2. Read `insmind-cli editor snapshot`. Base changes on complete elements from the latest Snapshot and change only intended fields. Submit full Updates, never patches.
|
|
25
|
-
3. Build an object with `host_application` and an ordered `actions` array from the Schema and Snapshot. Run `insmind-cli editor apply --input actions.json`, or use `--input -` for stdin. Use short semantic IDs; Connector direction and targets must preserve business relationships.
|
|
26
|
-
4. Read a fresh Snapshot after every Apply. For layout, text or Connector changes, run `insmind-cli editor screenshot --json` and view the actual PNG at its absolute `path`. A file's existence or an accepted Action does not prove correct rendering.
|
|
27
|
-
5. When persistence is intended and authorized, run `insmind-cli editor save --json` and wait for the original command. Do not interrupt during silent periods or issue concurrent Editor operations. Only success proves persistence; deliver the returned `workId` and public `url`, preserving environment parameters. Skip saving for preview-only requests. Discover wait limits with `editor save --help`.
|
|
28
|
-
6. After saving when no more work is needed, or whenever the user says the connection is no longer needed, run `insmind-cli editor disconnect` and check its disconnected receipt. Disconnecting neither replaces nor authorizes saving.
|
|
29
|
-
|
|
30
|
-
Connecting replaces the old Session and opens the work. A failed precheck clears the attempted Session but leaves the browser page open. The user handles browser login or access issues, then reconnects. CLI credentials do not replace browser AI+ login; the user enters account credentials in the browser.
|
|
31
|
-
|
|
32
|
-
If reloading or switching works disconnects the Session, reconnect to the intended work and read a fresh Snapshot before editing.
|
|
33
|
-
|
|
34
|
-
## Verify the work
|
|
35
|
-
|
|
36
|
-
Use the latest post-Apply Snapshot for fields and relationships, and the actual screenshot for paths, text and layout. Check all of the following:
|
|
37
|
-
|
|
38
|
-
- Each Connector's `fromId` and `toId` point to the intended Shapes in the correct semantic direction.
|
|
39
|
-
- Every visible path starts and ends at the corresponding Shape boundaries without crossing endpoint fill or text. Check adjacent collinear connectors individually.
|
|
40
|
-
- Connectors avoid unrelated Shapes, unexplained detours, reversals and wrong links.
|
|
41
|
-
- Text remains readable without clipping, overflow or unintended wrapping.
|
|
42
|
-
- Shapes, text and Connectors have the intended spacing and do not overlap unexpectedly.
|
|
43
|
-
- The reading direction and composition make relationships easy to follow.
|
|
44
|
-
|
|
45
|
-
When a fix is actionable, read the latest Snapshot first and submit full element Updates, never patches. If correct Connector IDs still produce a path crossing an endpoint, resubmit that Connector's full Update to trigger native path recalculation; preserve correct business relationships. Read a new Snapshot and screenshot after visual changes. Deliver the authorized preview or save after the requested corrections.
|
|
46
|
-
|
|
47
|
-
## Failures
|
|
48
|
-
|
|
49
|
-
- `LOGIN_REQUIRED`: stop editing and let the user sign in on the opened AI+ page, then reconnect. CLI login cannot replace it.
|
|
50
|
-
- `EDITOR_NOT_READY`: check loading and reconnect; do not write until connection succeeds.
|
|
51
|
-
- `WORK_NOT_EDITABLE`: stop; the current user lacks editing or saving permission.
|
|
52
|
-
- `EDITOR_SESSION_NOT_FOUND` or `EDITOR_NOT_CONNECTED`: reconnect to the intended work and read a Snapshot rather than polling the old Session.
|
|
53
|
-
- `UNSUPPORTED_PAGE_CONTENT`: stop and request a blank or dedicated Page.
|
|
54
|
-
- `INVALID_ACTIONS`: correct Actions using the current Schema, help and a fresh Snapshot; do not retry unchanged.
|
|
55
|
-
- `APPLY_FAILED`: the batch rolled back; read the Snapshot and confirm the prior state before proceeding.
|
|
56
|
-
- `EDITOR_ROLLBACK_FAILED`: stop apply and save; inspect only through Snapshot/screenshots and report the uncertainty.
|
|
57
|
-
- `SAVE_FAILED`: retain the Session, address the stated cause and retry save if appropriate; do not claim it is saved before success.
|
|
58
|
-
- `EDITOR_BUSY`: wait for the current command and keep operations serial.
|
|
59
|
-
- `EDITOR_RPC_TIMEOUT`: execution status is unknown and the Bridge closes. Reads may reconnect to the same work and retry. For apply or save, reconnect to the same work and inspect its real state first; stop if inspection is impossible.
|
|
60
|
-
- `PROTOCOL_VERSION_MISMATCH`: stop and follow the installation channel in the [update guidance](update.md), or use an Editor with the matching protocol. Do not bypass host management.
|
|
61
|
-
|
|
62
|
-
A timed-out, cancelled or disconnected write may already have been submitted. Observe the real state before recovery to avoid duplicate creation, Apply or Save.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# Output and errors
|
|
2
|
-
|
|
3
|
-
- `stdout` contains results only. Parse structured command JSON directly.
|
|
4
|
-
- `stderr` contains warnings, authorization notices and errors. Keep them separate from results.
|
|
5
|
-
- Exit `0`: command success. Async submission means acceptance; a successful task query still requires reading state.
|
|
6
|
-
- Exit `1`: runtime, service or state failure. Recover from facts in `error.code/message/details` and `error.details.next_steps`. Query the original task after query failures and inspect state before repeating an unconfirmed write.
|
|
7
|
-
- Exit `2`: command/input error. Use `details.reason/field/issues` with help/Schema to correct the stated issue. A mask-format error calls for fixing the mask; a file-access error calls for checking its path. Do not conflate them.
|
|
8
|
-
- Exit `130`: user interruption. Stop immediately; do not retry automatically.
|
|
9
|
-
- `INSUFFICIENT_CREDITS` only means available credits were insufficient for this operation. It does not distinguish account balance, member limits or other charging restrictions. Do not automatically recommend a purchase or treat a balance check or price quote as a guarantee that charging will succeed.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Continuing tasks and missing output
|
|
13
|
-
|
|
14
|
-
If an Agent or Tool request may already have been submitted, empty output, long execution or a host's completed-script message does not justify another creation. The original command prints a Task ID to stderr; a known ID is also retained in the final error recovery details. Continue waiting if its execution session remains available; otherwise query the original task:
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
insmind-cli task list
|
|
18
|
-
insmind-cli task get <id>
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Use a known ID directly. Otherwise locate the task by time, operation and input summary. Ask the user when multiple candidates cannot be distinguished; do not automatically pick the newest.
|
|
22
|
-
|
|
23
|
-
- `completed`: Tool returns content; Agent returns message.parts, which may contain text or questions. Deliver the actual reply/assets or ask the user, then follow [Agent creation](agent.md).
|
|
24
|
-
- `running` means the original execution is still active. For delivery now, keep checking the same ID every few seconds. For later pickup, hand off the state and ID now and check when the user returns.
|
|
25
|
-
- `unknown`: completion is unconfirmed. Recheck the same ID; explain if it remains unknown. `partialResult` is a message snapshot, not a complete deliverable.
|
|
26
|
-
- On `failed`, explain the cause in `note` and the original error. Correct an input and call again when it was explicitly never dispatched. After a service refusal, tell the user there is no deliverable. Switching models or changing settings starts a new creation and requires a revised request or authorization for another attempt.
|
|
27
|
-
|
|
28
|
-
A query error, including a task-not-found response, does not mean the original creation failed. Keep the original task ID; do not generate again.
|
|
29
|
-
|
|
30
|
-
Exit `0` from `task get` means the query succeeded; `state` determines whether the creation completed. Stop tracking on delivery, definite failure or an explainable unknown blocker. Preserve the ID when the user requests later retrieval; stop after user interruption without resubmitting.
|
|
31
|
-
|
|
32
|
-
## Cost sources
|
|
33
|
-
|
|
34
|
-
| Source | Meaning |
|
|
35
|
-
| --- | --- |
|
|
36
|
-
| Model catalog / Tool `usage.cost.minimum/maximum` | Catalog estimate/range, even when equal; missing cost does not mean free |
|
|
37
|
-
| Agent `usage.cost.amount` | Service-confirmed actual cost of this invocation; sum distinct taskIds only |
|
|
38
|
-
| `credits usage list/get` | Matching ledger consumption/restoration; read help for pagination/types rather than guessing a task’s cost from a page total or balance change |
|
|
39
|
-
|
|
40
|
-
Repeated reads of one ID return the same usage, not extra charges. Do not volunteer an unverified deduction when the user did not ask. Deliver Tool results directly; if quoting, call it an estimate. State that actual cost is unverified when a ledger record cannot be matched.
|
|
41
|
-
|
|
42
|
-
Do not infer internal causes from unknown errors or disclose local credentials, request signatures or sensitive URLs from diagnostics. Resource links explicitly returned for delivery are task results: preserve their complete values instead of applying diagnostic redaction and breaking the download link. If safe recovery steps are absent, preserve the public error code from stderr and explain the failure.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Generation constraints and media roles
|
|
2
|
-
|
|
3
|
-
Use one Generation Constraints Part for a model and dynamic parameters. `model` is the machine identifier; read generation controls and values from `model get`, check the accepted Agent controls in `agent send --help`, and preserve the user's choices. The complete Tool `inputSchema` in model detail is not the field list for Agent `arguments`. Do not put Tool execution inputs such as selections, canvases or text replacements in generation constraints. Describe those requirements with text and asset Parts when the Agent plans the task; use the corresponding Tool Schema for direct field-by-field calls.
|
|
4
|
-
|
|
5
|
-
Generation constraints example:
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{
|
|
9
|
-
"host_application": "<invoking application>",
|
|
10
|
-
"message": {
|
|
11
|
-
"parts": [
|
|
12
|
-
{ "text": "<user request>" },
|
|
13
|
-
{
|
|
14
|
-
"data": {
|
|
15
|
-
"model": "<model>",
|
|
16
|
-
"arguments": {
|
|
17
|
-
"<parameter>": "<value from model detail and user request>"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
`arguments` can be supplied without `model`, allowing the service Agent to select one. With a model, the CLI forwards explicit controls and maps known editing aliases to their service fields. Put prompt text in a Text Part and media in separate URL Parts, not in `arguments`. Preserve input Part order. Use `metadata.role` for `reference`, `first_frame` or `last_frame`; do not inject frame-role text. For example:
|
|
27
|
-
|
|
28
|
-
```json
|
|
29
|
-
{
|
|
30
|
-
"host_application": "<invoking application>",
|
|
31
|
-
"message": {
|
|
32
|
-
"parts": [
|
|
33
|
-
{ "text": "Generate a transition video" },
|
|
34
|
-
{ "url": "file:///absolute/first.png", "metadata": { "role": "first_frame" } },
|
|
35
|
-
{ "url": "file:///absolute/last.png", "metadata": { "role": "last_frame" } },
|
|
36
|
-
{ "data": { "model": "<model>", "arguments": { "mode": "<value>" } } }
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
```
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Matting and transparent output
|
|
2
|
-
|
|
3
|
-
Distinguish preserving visible source pixels from reconstructing a complete subject. A white background, a baked checkerboard and a file with real transparency are different deliverables.
|
|
4
|
-
|
|
5
|
-
## Choose the workflow
|
|
6
|
-
|
|
7
|
-
| Goal | Workflow | Boundary |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| Remove a background while preserving an intact product, face, text or texture | Standard matting: separate the visible foreground from the original | Does not reconstruct hidden parts; inspect fine edges, hair, translucent materials and occlusion |
|
|
10
|
-
| Extract an obstructed object and complete its hidden parts, or redraw a selected subject from a complex scene | When reconstruction is authorized, discover smart matting with redraw and transparent postprocessing included; one call returns the final PNG | Reconstructed details are generated guesses and may change geometry or texture; do not describe them as exact recovery |
|
|
11
|
-
|
|
12
|
-
A complex background alone does not require redrawing. For strict fidelity or a no-redraw constraint, prefer standard matting; explain limitations or request a more complete source if necessary. An explicit request to complete hidden parts authorizes reconstruction within that scope.
|
|
13
|
-
|
|
14
|
-
## Discover and execute
|
|
15
|
-
|
|
16
|
-
1. Follow [Creation](creation.md) to discover current Tools and Models, relevant help, public Schema and the selected Model detail. Determine whether the capability returns real transparency or only an intermediate redraw. A model title is not an output contract. Availability, parameters and prices depend on the current product and account.
|
|
17
|
-
2. Standard matting and smart matting that already includes redraw/segmentation can both be atomic [Tool](tool.md) calls. Use [Agent](agent.md) when the user's task requires business planning, orchestration or multiple outputs. When supplying a mask, follow [mask review](media-tools.md#review-masks-before-submission) to inspect the source, mask and overlay. Never treat internal algorithms, editor entries or historical test-suite names as CLI models.
|
|
18
|
-
3. Use the current source supplied by the user. For reconstruction, identify the subject, missing parts and structure/proportions to retain. If the discovered smart matting model already promises a transparent PNG, inspect that final file and do not pay for a second standard matting call. Only when the selected capability returns an intermediate redraw should you pass that actual redraw into a separate matting step. Do not matte the old occluded input or reuse another image's dimensions.
|
|
19
|
-
4. If no transparent-matting capability is discoverable, report the gap. A transparency prompt, white background or checkerboard is not a substitute. Do not use internal endpoints to bypass product entitlements. An available redraw may be delivered as an intermediate result with the unfinished transparency step stated clearly.
|
|
20
|
-
|
|
21
|
-
A reconstruction prompt can specify: “Use the selected subject in this reference, complete these hidden parts, preserve these visible features and proportions, and render the complete subject against an easily separable solid background. Do not draw a checkerboard or add text or other objects.” Populate constraints from the request; the prompt itself does not create an alpha channel.
|
|
22
|
-
|
|
23
|
-
## Verify and deliver
|
|
24
|
-
|
|
25
|
-
- When the user requests a review or a revision, refer to the delivered file and the area they identified. Explain which details were generated during reconstruction.
|
|
26
|
-
- Deliver the file or an authorized download link. A redraw or mask alone does not complete transparent matting; preserve intermediate results and state what remains.
|
|
27
|
-
- Internal smart-matting stages belong to one Tool call and are not separately added as charges. Tool returns catalog estimates; use the [cost sources](errors.md#cost-sources) for actual charges. After acceptance, an interruption, timeout or postprocessing failure calls for querying the original task through [Errors](errors.md), not blindly repeating successful paid generation.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Image and video processing
|
|
2
|
-
|
|
3
|
-
First choose Agent or Tool through [creation](creation.md). These guidelines select a Tool for a single operation; business orchestration still uses Agent. Honor explicitly requested routes and models.
|
|
4
|
-
|
|
5
|
-
Attached images and media links are processing targets, including text inside images, layer decomposition and vectorization. Discover `tool list` before concluding that these operations are unavailable. Editor operates connected work elements; it does not require converting attachments to a Board first.
|
|
6
|
-
|
|
7
|
-
## Select by purpose
|
|
8
|
-
|
|
9
|
-
| Goal | Discovery direction |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Create a new image, recreate from references, change overall style or blend images | `image.generate`; a reference image or the word “edit” alone does not require `image.edit` |
|
|
12
|
-
| Create a new video from text, images, first/last frames or references | `video.generate`; supported input combinations depend on the model Schema |
|
|
13
|
-
| Edit a particular target or selected region in an existing image | `image.edit` |
|
|
14
|
-
| Remove a background/object, enhance clarity, expand a canvas, replace/read text, decompose layers or vectorize | Discover the purpose-specific Tool rather than routing every image task to `image.edit` |
|
|
15
|
-
| Modify an existing video's content, or enhance its clarity | Discover `video.edit` or `video.enhance` respectively; generating video from an image still uses `video.generate` |
|
|
16
|
-
|
|
17
|
-
Read `tool list`, the relevant `model list --tool <tool>`, then `model get <model> --tool <tool>`. Use the complete `inputSchema`, purpose and current quote. Availability, fields and options come from this task's discovery; one model's fields do not apply to every Tool.
|
|
18
|
-
|
|
19
|
-
## Select a model and prepare inputs
|
|
20
|
-
|
|
21
|
-
Use the public model identifier and description rather than matching backend display names. Standard/smart are stable public categories, but the difference is specific to each Tool: standard matting separates visible source pixels, while smart matting redraws before segmentation; ordinary upscaling differs from generative restoration. Standard editing, erasure and expansion can also generate content, so “standard” does not universally mean lossless. Check fidelity requirements against the model's actual scope. Redrawing may alter product geometry, text, faces or textures; hidden details are generated guesses. For transparency read [matting](matting.md).
|
|
22
|
-
|
|
23
|
-
Identify the current source, target changes and content to preserve. Include only necessary references and assign each a subject, style, color or layout role. Organize the prompt as target → change → preserved content → reference roles → output requirements, using the user's request and confirmed media. For style-only references, name the borrowed qualities; prefer relevant references to reduce conflicting instructions about ignoring a prominent subject. Put structured model controls in their actual fields.
|
|
24
|
-
|
|
25
|
-
For expansion, distinguish an exact output pixel size from a requested aspect ratio. Use the selected model’s canvas and placement descriptions to set the source position, layout and resolution. Keep source, selection and references in their Schema-defined fields; a reference image is not a mask.
|
|
26
|
-
|
|
27
|
-
Requirements such as preserving text/details or avoiding redrawing guide model selection and input construction. Do not turn them into an unrequested pixel-for-pixel identity threshold. Read the relevant model details, invoke the requested processing, deliver readable service results and describe observed differences. The possibility of detail changes alone does not establish that every Tool is unsuitable.
|
|
28
|
-
|
|
29
|
-
A model prerequisite is not a Tool-wide restriction. Before submission, if missing local dependencies or unavailable inputs block one model, inspect other models of the same Tool. Choose another only when the user has not fixed the model and it meets the explicit requirements. Do not silently relax fidelity constraints or replace a requested model; explain the specific gap if no suitable route exists. Prepare intermediate files in the current writable work directory; an unwritable temporary path does not mean the CLI lacks the capability.
|
|
30
|
-
|
|
31
|
-
## Review masks before submission
|
|
32
|
-
|
|
33
|
-
1. Read the selected model’s mask requirements and whether it is required. For binary PNGs, use only pure black/white RGB and alpha 255 if present, matching the auto-oriented source dimensions. Gray antialiasing, transparency and a user’s colored selection preview are not a mask. Prepare a separate mask from the selection and use the unmarked source image. File validity does not prove correct selection.
|
|
34
|
-
2. View the auto-oriented source and mask, then overlay the selection on the source for review. Verify that white covers the intended subject/part without omissions and black covers protected content. Check contours, holes, edges and alignment for shifts, stretching or background selection. The overlay is only a review preview; submit the original mask required by the Schema.
|
|
35
|
-
3. White must be nonempty. Use an all-white mask only for an explicitly requested whole-image operation. Follow the target's contour rather than inventing an arbitrary rectangle, unless the user selected a rectangular region. Correct misplaced selections before submitting; ask for a selection or target clarification when reliable localization is unavailable.
|
|
36
|
-
4. A smart model may use an optional mask only as a visual boundary cue. Consult its description; this does not guarantee unchanged pixels outside the selection. Prepare a mask only when actually supplying one; an optional mask is not mandatory when text can identify the target. Follow the delivery boundaries below for result review.
|
|
37
|
-
|
|
38
|
-
## Execute and deliver
|
|
39
|
-
|
|
40
|
-
Submit once following [Tool](tool.md) and wait for that task. Read current metered prices and formulas; quotes are not deductions. Query the original task after interruption rather than repeating processing, uploads or settlement.
|
|
41
|
-
|
|
42
|
-
Deliver a readable service result first. When the user requests an effect review, examine relevant text, placement, layers or sound and describe deviations. Audio presence does not establish soundtrack preservation; a layer limit does not guarantee separate objects. Effects do not change the fact of CLI delivery. Further creation follows user authorization, rather than automatically changing models, increasing layers or regenerating.
|
|
43
|
-
|
|
44
|
-
Distinguish layer goals: layout decomposition targets editable text, images and layout; smart decomposition separates objects into individual layers. A layer limit does not guarantee the actual layer count, and object decomposition is not per-character OCR. Select from the current catalog and deliver the native JSON and resources, not PSD. If editor import is requested, discover the supported operations via [Editor](editor.md) and verify editable text, layers and substituted fonts.
|
|
45
|
-
|
|
46
|
-
For video editing with multiple references, use the media labels exposed by the model Schema to state each reference's purpose and the source content to preserve. The CLI adds original filename-to-label bindings; uploaded filenames change, so a download URL's filename alone cannot identify the source's role.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Tool creation
|
|
2
|
-
|
|
3
|
-
For delivery now, use the default synchronous command and keep waiting on the original host process handle. For later pickup, submit with `--async`, hand off the taskId and state on acceptance, and end the turn. For pickup or lost synchronous output, follow [task recovery](errors.md) using the original ID.
|
|
4
|
-
|
|
5
|
-
Discover live metadata in this order:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
insmind-cli tool list
|
|
9
|
-
insmind-cli model list --tool <tool>
|
|
10
|
-
insmind-cli model get <model> --tool <tool>
|
|
11
|
-
insmind-cli tool call <tool> --input request.json
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Read `insmind-cli tool call <tool> --schema` for the input shape and `model get` for the selected model's price and estimated duration. `required` describes required inputs and `default` identifies service defaults. A default is a suggested value. Supply every field in the selected schema’s required list, including one with a default. Use `options[].value` for a listed option. Put dimensions and resolution in `width`, `height` and `resolution` where available, and preserve explicit user values. Read `usageDescription` for cross-field rules such as video mode and frame roles.
|
|
15
|
-
|
|
16
|
-
Set `"model": "<model>"` at the top level of the request (runtime `arguments.model`) alongside `host_application` and the fields for that model. Keep ordered references in their declared field. For example, a model declaring `image_urls` takes `["file:///inputs/product.png", "https://example.com/style.png"]`. Preserve order and repeats.
|
|
17
|
-
|
|
18
|
-
Generate attachment URIs using the Skill root instructions and write those exact values into the request object, rather than typing file URIs with raw Unicode, spaces or `#`. Write complete JSON to a file or stdin; the JSON file path and the media URIs are different inputs.
|
|
19
|
-
|
|
20
|
-
Success returns `content` and `usage`. Content can include text, resource links and embedded JSON. Tool `usage.cost.minimum/maximum` is a catalog estimate even when both values are equal. Missing cost means no estimate, not free. For actual charges, use the [cost sources](errors.md#cost-sources).
|
|
21
|
-
|
|
22
|
-
Deliver the existing service result first and describe observed deviations. Further creation follows the user’s request, rather than another paid call to meet a private quality score. Label locally written SVGs, interpolated upscaling or other local edits as such; they are not evidence of calling the corresponding Tool.
|
|
23
|
-
|
|
24
|
-
Keep each resource link, returned name, local path and display name together. Preserve the association through downloads, renames and reordering; do not pair results by request order. Deliver each part as returned. If only a cover was returned, share it and say that no identifiable video was received. Do not guess an unknown attachment type or submit another creation.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Update
|
|
2
|
-
|
|
3
|
-
Relay an update alongside the foreground business result. In a stdout-only host, discover `check` through `insmind-cli update --help`. On first foreground use or after an hour, set `CLI_HOST_APPLICATION` to the actual host, run `insmind-cli update check --json --for-display`, and relay the returned `notice` if present. Ordinary `update check --json` queries do not spend a display slot. For an older CLI, compare its actual version to `npm view @insmind/cli dist-tags.latest` only for a confirmed user installation. Continue the task if the check is unavailable.
|
|
4
|
-
|
|
5
|
-
When the user requests an upgrade or approves resolving a compatibility issue, discover the current installation channel's update behavior before updating:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
insmind-cli update --help
|
|
9
|
-
insmind-cli update
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Discover arguments, installation sources, lifecycle flags and Skill synchronization from `update --help` and command output; do not copy an old version's installation commands.
|
|
13
|
-
|
|
14
|
-
A version notice does not mean an upgrade or Skill synchronization has happened. Discover capabilities from the installed version; do not upgrade merely to query capabilities.
|
|
15
|
-
|
|
16
|
-
For a host-managed installation, follow the channel-specific instructions returned by the command. Do not bypass host-managed updates, overwrite its Skill or repair it through another host's global installation. CLI and Skill version numbers need not match; the channel's minimum version and verification establish compatibility.
|
|
17
|
-
|
|
18
|
-
If the CLI updated but Skill verification failed, keep the new CLI version, follow stderr recovery steps and rerun the update command. Do not report partial failure as complete success.
|