dimcode-linux-arm64
Advanced tools
@@ -21,2 +21,8 @@ # CLI Recipes | ||
| The JSON result includes `outputPath`. Resolve it to an absolute path and respond with: | ||
| ``` | ||
|  | ||
| ``` | ||
| Edit an image: | ||
@@ -50,2 +56,8 @@ | ||
| Respond with: | ||
| ``` | ||
| [video.mp4](/absolute/path/to/artifacts/video.mp4) | ||
| ``` | ||
| Image-to-video: | ||
@@ -78,2 +90,8 @@ | ||
| Respond with: | ||
| ``` | ||
| [speech.mp3](/absolute/path/to/artifacts/speech.mp3) | ||
| ``` | ||
| Specify a voice: | ||
@@ -100,2 +118,8 @@ | ||
| Respond with: | ||
| ``` | ||
| [music.mp3](/absolute/path/to/artifacts/music.mp3) | ||
| ``` | ||
| Generate a sound effect: | ||
@@ -120,2 +144,28 @@ | ||
| Respond with: | ||
| ``` | ||
| [robot.glb](/absolute/path/to/artifacts/robot.glb) | ||
| ``` | ||
| ## OCR (Exact Text From Images And PDFs) | ||
| `ocr.recognize` runs the selected host-owned OCR provider. It needs no provider connection or API key. Use it when the deliverable is the verbatim printed text, not a description, and do not silently switch OCR providers when execution fails. | ||
| Image OCR: | ||
| ```bash | ||
| dim ocr recognize ./invoice.png --json | ||
| ``` | ||
| PDF OCR (each page is rendered and recognized): | ||
| ```bash | ||
| dim ocr recognize ./contract.pdf --json | ||
| ``` | ||
| The JSON returns a short text preview plus a `resultPath` to the full structured result (per-page text, coordinates, confidence). For long PDFs, read additional pages from `resultPath` with `read`. | ||
| If `dim modality list --json` shows `ocr.recognize` with `available=false` (`local_runtime_unavailable`), the bundled OCR engine is missing or corrupt for this platform. Tell the user to reinstall; do not retry against a remote provider. | ||
| ## Temporary Provider Or Model Override | ||
@@ -122,0 +172,0 @@ |
| --- | ||
| name: dim-modality | ||
| description: Use DimCode multimodal CLI when the user asks the agent to generate or edit images, generate video, synthesize speech, transcribe audio, generate music or sound effects, create 3D assets or motion data, or inspect available multimodal defaults through `dim modality`. This skill teaches when to use the CLI, the main execution path, failure handling, and model-specific notes. | ||
| description: Use DimCode multimodal CLI when the user asks the agent to generate or edit images, generate video, synthesize speech, transcribe audio, generate music or sound effects, create 3D assets or motion data, extract exact text from images or PDFs with OCR, or inspect available multimodal defaults through `dim modality`. This skill teaches when to use the CLI, the main execution path, failure handling, and model-specific notes. | ||
| --- | ||
@@ -47,2 +47,24 @@ | ||
| ### Image understanding vs. exact text extraction | ||
| Two different tools read images and PDFs. Pick by what the user actually wants: | ||
| | User goal | Tool | Why | | ||
| |---|---|---| | ||
| | Describe, summarize, or explain an image or screenshot | `read` | Semantic understanding, charts, diagrams, layout — the vision model interprets meaning | | ||
| | Answer questions about what an image shows | `read` | Visual reasoning, not character accuracy | | ||
| | Extract the **exact characters** from an image or PDF | `dim ocr recognize` | Precise text, page numbers, coordinates, confidence — OCR is authoritative for verbatim text | | ||
| | Read a scanned document, receipt, invoice, or contract | `dim ocr recognize` | Faithful transcription of the printed words | | ||
| | Copy numbers, codes, IDs, or tables out of an image | `dim ocr recognize` | Character-level accuracy matters | | ||
| The rule: image understanding and visual reasoning go through `read`; verbatim text extraction from images and PDFs goes through `dim ocr recognize`. They do not substitute for each other. When unsure which the user wants, OCR is the safe default only when exact text is the deliverable; otherwise `read`. | ||
| ```bash | ||
| # Extract exact text from an image or PDF | ||
| dim ocr recognize ./invoice.png --json | ||
| dim ocr recognize ./contract.pdf --json | ||
| ``` | ||
| OCR returns page text, coordinates, and confidence, and writes the full structured result to a file reported in the JSON output. After OCR, you can still pass page images to `read` if the user wants semantic analysis of a specific page. | ||
| 3. Write outputs under the current workspace, usually `./artifacts/` unless the user asked for another path. | ||
@@ -52,4 +74,13 @@ | ||
| 5. After success, reference the absolute output path. Images can be shown with Markdown image syntax. Audio and video should be reported as absolute paths until Desktop preview support is richer. | ||
| 5. After success, respond with the output in a format the user's client can render. Read the `outputPath` field from the JSON result and convert it to an absolute path (resolve relative paths against `cwd`). Then: | ||
| | Output type | Response format | Example | | ||
| |---|---|---| | ||
| | Image | Markdown image with absolute path | `` | | ||
| | Audio | Markdown link with absolute path | `[speech.mp3](/home/user/project/artifacts/speech.mp3)` | | ||
| | Video | Markdown link with absolute path | `[video.mp4](/home/user/project/artifacts/video.mp4)` | | ||
| | Other (3D, motion, transcript) | Markdown link with absolute path | `[robot.glb](/home/user/project/artifacts/robot.glb)` | | ||
| The absolute path is required — relative paths like `./artifacts/image.png` will not render in Desktop. | ||
| ## Operating Rules | ||
@@ -60,2 +91,3 @@ | ||
| - If a default is missing, tell the user to configure that capability in Settings / Agent Defaults. | ||
| - `ocr.recognize` is a host-owned local capability. Use the provider/model selected by `dim modality get ocr.recognize`; do not silently switch providers after an execution failure. If `dim modality list --json` reports the selected target as unavailable, report that local runtime error to the user. | ||
| - Put provider-specific parameters in a JSON object file and pass it with `--options <path>`. | ||
@@ -81,2 +113,3 @@ - Video generation can be slow. Use a generous `--timeout`, and never claim completion unless an output file exists. | ||
| | Unsupported capability | Use a model that supports the capability, or ask the user to configure one | | ||
| | OCR runtime unavailable (`local_runtime_unavailable`) | Tell the user the bundled OCR engine is missing or corrupt; recommend reinstalling DimCode. Do not attempt a remote or Python fallback | | ||
| | Output file missing | Do not report success; explain the CLI JSON error and stderr | | ||
@@ -90,4 +123,4 @@ | Video timeout | Report timeout details and operation id when available | | ||
| - Say which capability was used. | ||
| - Give the output file path. | ||
| - Include the output as a Markdown image (for images) or Markdown link (for audio/video/other), using the absolute path from the JSON result. See the format table in §Main Path. | ||
| - If it failed, state the failure point and the next user action. | ||
| - Keep the response short unless the user asks for detailed debugging. |
+3
-2
| { | ||
| "name": "dimcode-linux-arm64", | ||
| "version": "0.2.27", | ||
| "version": "0.2.28", | ||
| "description": "dimcode binary for Linux ARM64", | ||
@@ -12,4 +12,5 @@ "os": [ | ||
| "files": [ | ||
| "bin" | ||
| "bin", | ||
| "runtime" | ||
| ] | ||
| } |
Sorry, the diff of this file is not supported yet
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
167192033
0