dimagent-linux-x64
Advanced tools
| This Font Software is licensed under the SIL Open Font License, | ||
| Version 1.1. | ||
| This license is copied below, and is also available with a FAQ at: | ||
| http://scripts.sil.org/OFL | ||
| ----------------------------------------------------------- | ||
| SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 | ||
| ----------------------------------------------------------- | ||
| PREAMBLE | ||
| The goals of the Open Font License (OFL) are to stimulate worldwide | ||
| development of collaborative font projects, to support the font | ||
| creation efforts of academic and linguistic communities, and to | ||
| provide a free and open framework in which fonts may be shared and | ||
| improved in partnership with others. | ||
| The OFL allows the licensed fonts to be used, studied, modified and | ||
| redistributed freely as long as they are not sold by themselves. The | ||
| fonts, including any derivative works, can be bundled, embedded, | ||
| redistributed and/or sold with any software provided that any reserved | ||
| names are not used by derivative works. The fonts and derivatives, | ||
| however, cannot be released under any other type of license. The | ||
| requirement for fonts to remain under this license does not apply to | ||
| any document created using the fonts or their derivatives. | ||
| DEFINITIONS | ||
| "Font Software" refers to the set of files released by the Copyright | ||
| Holder(s) under this license and clearly marked as such. This may | ||
| include source files, build scripts and documentation. | ||
| "Reserved Font Name" refers to any names specified as such after the | ||
| copyright statement(s). | ||
| "Original Version" refers to the collection of Font Software | ||
| components as distributed by the Copyright Holder(s). | ||
| "Modified Version" refers to any derivative made by adding to, | ||
| deleting, or substituting -- in part or in whole -- any of the | ||
| components of the Original Version, by changing formats or by porting | ||
| the Font Software to a new environment. | ||
| "Author" refers to any designer, engineer, programmer, technical | ||
| writer or other person who contributed to the Font Software. | ||
| PERMISSION & CONDITIONS | ||
| Permission is hereby granted, free of charge, to any person obtaining | ||
| a copy of the Font Software, to use, study, copy, merge, embed, | ||
| modify, redistribute, and sell modified and unmodified copies of the | ||
| Font Software, subject to the following conditions: | ||
| 1) Neither the Font Software nor any of its individual components, in | ||
| Original or Modified Versions, may be sold by itself. | ||
| 2) Original or Modified Versions of the Font Software may be bundled, | ||
| redistributed and/or sold with any software, provided that each copy | ||
| contains the above copyright notice and this license. These can be | ||
| included either as stand-alone text files, human-readable headers or | ||
| in the appropriate machine-readable metadata fields within text or | ||
| binary files as long as those fields can be easily viewed by the user. | ||
| 3) No Modified Version of the Font Software may use the Reserved Font | ||
| Name(s) unless explicit written permission is granted by the | ||
| corresponding Copyright Holder. This restriction only applies to the | ||
| primary font name as presented to the users. | ||
| 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font | ||
| Software shall not be used to promote, endorse or advertise any | ||
| Modified Version, except to acknowledge the contribution(s) of the | ||
| Copyright Holder(s) and the Author(s) or with their explicit written | ||
| permission. | ||
| 5) The Font Software, modified or unmodified, in part or in whole, | ||
| must be distributed entirely under this license, and must not be | ||
| distributed under any other license. The requirement for fonts to | ||
| remain under this license does not apply to any document created using | ||
| the Font Software. | ||
| TERMINATION | ||
| This license becomes null and void if any of the above conditions are | ||
| not met. | ||
| DISCLAIMER | ||
| THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | ||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT | ||
| OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | ||
| COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL | ||
| DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM | ||
| OTHER DEALINGS IN THE FONT SOFTWARE. |
| This Font Software is licensed under the SIL Open Font License, | ||
| Version 1.1. | ||
| This license is copied below, and is also available with a FAQ at: | ||
| http://scripts.sil.org/OFL | ||
| ----------------------------------------------------------- | ||
| SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 | ||
| ----------------------------------------------------------- | ||
| PREAMBLE | ||
| The goals of the Open Font License (OFL) are to stimulate worldwide | ||
| development of collaborative font projects, to support the font | ||
| creation efforts of academic and linguistic communities, and to | ||
| provide a free and open framework in which fonts may be shared and | ||
| improved in partnership with others. | ||
| The OFL allows the licensed fonts to be used, studied, modified and | ||
| redistributed freely as long as they are not sold by themselves. The | ||
| fonts, including any derivative works, can be bundled, embedded, | ||
| redistributed and/or sold with any software provided that any reserved | ||
| names are not used by derivative works. The fonts and derivatives, | ||
| however, cannot be released under any other type of license. The | ||
| requirement for fonts to remain under this license does not apply to | ||
| any document created using the fonts or their derivatives. | ||
| DEFINITIONS | ||
| "Font Software" refers to the set of files released by the Copyright | ||
| Holder(s) under this license and clearly marked as such. This may | ||
| include source files, build scripts and documentation. | ||
| "Reserved Font Name" refers to any names specified as such after the | ||
| copyright statement(s). | ||
| "Original Version" refers to the collection of Font Software | ||
| components as distributed by the Copyright Holder(s). | ||
| "Modified Version" refers to any derivative made by adding to, | ||
| deleting, or substituting -- in part or in whole -- any of the | ||
| components of the Original Version, by changing formats or by porting | ||
| the Font Software to a new environment. | ||
| "Author" refers to any designer, engineer, programmer, technical | ||
| writer or other person who contributed to the Font Software. | ||
| PERMISSION & CONDITIONS | ||
| Permission is hereby granted, free of charge, to any person obtaining | ||
| a copy of the Font Software, to use, study, copy, merge, embed, | ||
| modify, redistribute, and sell modified and unmodified copies of the | ||
| Font Software, subject to the following conditions: | ||
| 1) Neither the Font Software nor any of its individual components, in | ||
| Original or Modified Versions, may be sold by itself. | ||
| 2) Original or Modified Versions of the Font Software may be bundled, | ||
| redistributed and/or sold with any software, provided that each copy | ||
| contains the above copyright notice and this license. These can be | ||
| included either as stand-alone text files, human-readable headers or | ||
| in the appropriate machine-readable metadata fields within text or | ||
| binary files as long as those fields can be easily viewed by the user. | ||
| 3) No Modified Version of the Font Software may use the Reserved Font | ||
| Name(s) unless explicit written permission is granted by the | ||
| corresponding Copyright Holder. This restriction only applies to the | ||
| primary font name as presented to the users. | ||
| 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font | ||
| Software shall not be used to promote, endorse or advertise any | ||
| Modified Version, except to acknowledge the contribution(s) of the | ||
| Copyright Holder(s) and the Author(s) or with their explicit written | ||
| permission. | ||
| 5) The Font Software, modified or unmodified, in part or in whole, | ||
| must be distributed entirely under this license, and must not be | ||
| distributed under any other license. The requirement for fonts to | ||
| remain under this license does not apply to any document created using | ||
| the Font Software. | ||
| TERMINATION | ||
| This license becomes null and void if any of the above conditions are | ||
| not met. | ||
| DISCLAIMER | ||
| THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | ||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT | ||
| OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | ||
| COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL | ||
| DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM | ||
| OTHER DEALINGS IN THE FONT SOFTWARE. |
| --- | ||
| name: skin-creator | ||
| description: Create, modify, apply, inspect, or switch Desktop skins through the Desktop session-scoped dim skin command. | ||
| --- | ||
| # Skin Creator | ||
| Use when the user asks to create, modify, apply, inspect, list, or switch a DimCode Desktop skin or theme. | ||
| ## Availability | ||
| Desktop sessions only. Every skin operation uses `dim skin ... --json`. If the result reports `DESKTOP_HOST_UNAVAILABLE`, explain that this capability requires DimCode Desktop and stop. Do not write `{DIMCODE_HOME}/skins`, edit Desktop config, or call renderer APIs. | ||
| Skin operations may run from a subagent or a workflow `api.agent()` child session: the host automatically elevates them to the main (top-level parent) session, which is where skin state and user-uploaded images live. If you are a subagent generating a background image, you can run `dim image generate` yourself and then either run `dim skin create` (it will apply in the main session) or return the generated image path to the main session for it to finish. `PERMISSION_DENIED` on a skin call means the main session could not be resolved — hand the intermediate result back to the main session and re-run there. | ||
| ## Format Boundary | ||
| Skins support PNG, JPEG, WebP, and GIF only, at most 10 MiB. Video files (MP4/WebM) are not supported: never pass a video file to `dim skin`. Tell the user about this limitation. | ||
| If the user insists on a video background, guide them to provide a GIF, or convert the video to a supported format yourself when the environment allows (e.g. a system `ffmpeg`) before calling `dim skin create` — the result must still pass the 10 MiB and format validation. | ||
| ## Required Image Source | ||
| Creating a skin requires exactly one source: | ||
| 1. **User-uploaded image** — call `dim skin images --json` and read its `imageId` from CLI JSON `content`. | ||
| 2. **Agent-generated image** — load `dim-modality`, run `dim modality list --json`, then: | ||
| ```bash | ||
| dim image generate --prompt "<prompt derived from the request>" --out-dir ./artifacts --json | ||
| ``` | ||
| Require `ok: true`, a non-empty `outputs` array, and an existing image file. Pass the exact absolute `outputs[].path` to `--generated-image-path`. | ||
| Never pass both `imageId` and `generatedImagePath`. Never create a blank, placeholder, solid-color, or image-free skin. | ||
| ## Actions | ||
| | Intent | Command | | ||
| |---|---| | ||
| | List user images | `dim skin images --json` | | ||
| | List available skins | `dim skin list --json` | | ||
| | Get installed skin details | `dim skin get --target-skin-id <id> --json` | | ||
| | Create new skin | `dim skin create --name "<name>" (--image-id <id> \| --generated-image-path <path>) [options] --composer-opacity 0 --activate --json` | | ||
| | Update installed skin | `dim skin update --target-skin-id <id> [patch options] --json` | | ||
| | Activate installed skin | `dim skin activate --target-skin-id <id> --json` | | ||
| | Restore Default | `dim skin activate-default --json` | | ||
| A normal request to make a theme means create. Update only when the user explicitly asks to modify an existing skin. `targetSkinId` must come from trusted CLI JSON `content`, never from a display name. | ||
| ## Default And Installed | ||
| - `dim skin list --json` includes `kind=default`; Default has no `skinId` and uses `dim skin activate-default --json` directly. | ||
| - `kind=installed` entries contain the real `skinId` used by get, update, and activate. | ||
| - Never use an unrelated update to imitate activation. | ||
| ## Result Confirmation | ||
| Only report success when `ok: true` and CLI JSON `content` confirms the operation: | ||
| - create: target `skinId` and `active=true` before saying created and applied; | ||
| - update: target `skinId`; only call it active when `active=true` is present; | ||
| - activate: `kind=installed`, exact `skinId`, and `active=true`; | ||
| - activate-default: `kind=default; active=true`. | ||
| For `ok: false`, report `error.code` and `error.message`. Do not silently recover. Handles and state needed in later turns must be read from CLI JSON `content`; `result` is only the machine-readable mirror. | ||
| ## Visual Guidance | ||
| Explicit user preferences override these suggestions: | ||
| | Image characteristic | Suggested flag | | ||
| |---|---| | ||
| | Subject on right | `--background-position "right center"` | | ||
| | Subject on left | `--background-position "left center"` | | ||
| | Centered or no clear subject | `--background-position center` | | ||
| | Mostly dark | `--foreground light` | | ||
| | Mostly bright | `--foreground dark` | | ||
| | Mixed brightness with opaque surfaces | `--foreground auto` | | ||
| | Full uncropped image requested | `--background-size contain` | | ||
| | Otherwise | `--background-size cover` | | ||
| Use `--background-attachment scroll` by default. Use `fixed` only for an explicit parallax request. |
@@ -106,4 +106,4 @@ { | ||
| "path": "facade/node_modules/sharp/node_modules/.bin/semver", | ||
| "size": 1758, | ||
| "sha256": "250881e92c57cee5db814c515227ddcbea9c57b759da0730107c29fa3c6614df" | ||
| "size": 1849, | ||
| "sha256": "01ecbede4f8c37bb57f3dd663477690e284c24b67182cd63c21ee7dd596e6bbb" | ||
| }, | ||
@@ -110,0 +110,0 @@ { |
@@ -19,5 +19,5 @@ { | ||
| { | ||
| "bytes": 2414, | ||
| "bytes": 2596, | ||
| "path": "license-inventory.json", | ||
| "sha256": "d1bb470cacefc6ad9b17408e2a4e766c7b1a9ff8cdecc869281b1dca84fe8204" | ||
| "sha256": "3b88becbb26a6bf83d1680c677cea60e7da5242cff914ccbbfaa2ce264d491b8" | ||
| }, | ||
@@ -35,2 +35,7 @@ { | ||
| { | ||
| "bytes": 4301, | ||
| "path": "licenses/noto-sans-sc-OFL-1.1.txt", | ||
| "sha256": "6a73f9541c2de74158c0e7cf6b0a58ef774f5a780bf191f2d7ec9cc53efe2bf2" | ||
| }, | ||
| { | ||
| "bytes": 1094, | ||
@@ -103,3 +108,3 @@ "path": "licenses/onnxruntime-MIT.txt", | ||
| "path": "native/light_ocr_node.node", | ||
| "sha256": "e0b857084df54d4e62eec86cb664589582304b1fedb3a727b355c663c3df7d84" | ||
| "sha256": "99ac7dce382695d0ab7a5440119656a0c220c2471fc0cc1a271377b9181eb987" | ||
| }, | ||
@@ -109,3 +114,3 @@ { | ||
| "path": "native/runtime-descriptor.json", | ||
| "sha256": "078609257074d67e9472a2347a49284582b42fa919ad264cbc676878f146b466" | ||
| "sha256": "f71584747e30f75ecb72776ead56fa5e5c4d442cfb70751919f8fda0b4b31599" | ||
| }, | ||
@@ -115,8 +120,18 @@ { | ||
| "path": "package.json", | ||
| "sha256": "356988d03952fe598771e8da970ab6e99171f450d4b2377426f5504e45c4ded8" | ||
| "sha256": "e634e6c83538ffbbecca9e64f1cd8f21c7cbb9cec22dd7165ed0eaec8312a9cf" | ||
| }, | ||
| { | ||
| "bytes": 382, | ||
| "bytes": 8331336, | ||
| "path": "pdfium/fonts/NotoSansSC-Regular.otf", | ||
| "sha256": "faa6c9df652116dde789d351359f3d7e5d2285a2b2a1f04a2d7244df706d5ea9" | ||
| }, | ||
| { | ||
| "bytes": 4301, | ||
| "path": "pdfium/fonts/OFL.txt", | ||
| "sha256": "6a73f9541c2de74158c0e7cf6b0a58ef774f5a780bf191f2d7ec9cc53efe2bf2" | ||
| }, | ||
| { | ||
| "bytes": 987, | ||
| "path": "pdfium/index.cjs", | ||
| "sha256": "d6d6ea1c607b0c56600ad33853d4910b7ed45934b4f6a8e1c40b4d4d735d8340" | ||
| "sha256": "02c7c82adf6fc50f0f4bef2de20b5c2081e00e078536b92d6286c696a3a00f97" | ||
| }, | ||
@@ -129,10 +144,10 @@ { | ||
| { | ||
| "bytes": 370384, | ||
| "bytes": 370960, | ||
| "path": "pdfium/pdfium.node", | ||
| "sha256": "280fdbd00ace98195e592dfb3341c972a37ecae4ffda9f46b39be7a749ccb094" | ||
| "sha256": "1565adfbcdc1ff85101024fa842d4548d65da7058715ad7675f58ce19e73a025" | ||
| }, | ||
| { | ||
| "bytes": 6909, | ||
| "bytes": 7540, | ||
| "path": "sbom.spdx.json", | ||
| "sha256": "82d080502a88e71d6792c404eb91e9c22f9ac6f14a9d8b75c0750d3b4bc9bafd" | ||
| "sha256": "a246fcd6302e4889641b803610d32c73add1f31bd9ccc868b53940c90b4b57c2" | ||
| } | ||
@@ -142,3 +157,3 @@ ], | ||
| "schemaVersion": "1.0", | ||
| "version": "0.5.5" | ||
| "version": "0.5.7" | ||
| } |
@@ -67,2 +67,7 @@ { | ||
| "sha256": "01c3f30c69061d39f0f0a4c575b75f48ec33c77e27d9f4c0f4d05ffe4db9cb99" | ||
| }, | ||
| { | ||
| "component": "noto-sans-sc", | ||
| "file": "licenses/noto-sans-sc-OFL-1.1.txt", | ||
| "sha256": "6a73f9541c2de74158c0e7cf6b0a58ef774f5a780bf191f2d7ec9cc53efe2bf2" | ||
| } | ||
@@ -69,0 +74,0 @@ ], |
@@ -5,3 +5,3 @@ { | ||
| "path": "native/light_ocr_node.node", | ||
| "sha256": "e0b857084df54d4e62eec86cb664589582304b1fedb3a727b355c663c3df7d84" | ||
| "sha256": "99ac7dce382695d0ab7a5440119656a0c220c2471fc0cc1a271377b9181eb987" | ||
| }, | ||
@@ -8,0 +8,0 @@ "autoPolicy": { |
@@ -45,3 +45,3 @@ { | ||
| }, | ||
| "version": "0.5.5" | ||
| "version": "0.5.7" | ||
| } |
| { | ||
| "SPDXID": "SPDXRef-DOCUMENT", | ||
| "creationInfo": { | ||
| "created": "2026-07-27T05:14:38Z", | ||
| "created": "2026-08-05T08:15:36Z", | ||
| "creators": [ | ||
@@ -13,3 +13,3 @@ "Tool: light-ocr-generate-release-metadata/1.0" | ||
| ], | ||
| "documentNamespace": "https://light-ocr.invalid/spdx/784db955ce63fc31e25bf2a064d074e5c15f638e5015184cfd6c4972d621e391", | ||
| "documentNamespace": "https://light-ocr.invalid/spdx/3ba5d0ff6d5ab67c511ede229d779491459170285e4e5f7cfa74e3b9d501a2b1", | ||
| "name": "light-ocr-core-linux-x64", | ||
@@ -152,2 +152,12 @@ "packages": [ | ||
| "versionInfo": "0.6.1" | ||
| }, | ||
| { | ||
| "SPDXID": "SPDXRef-Package-noto-sans-sc", | ||
| "copyrightText": "Copyright 2014-2021 Adobe", | ||
| "downloadLocation": "https://raw.githubusercontent.com/notofonts/noto-cjk/f8d157532fbfaeda587e826d4cd5b21a49186f7c/Sans/SubsetOTF/SC/NotoSansSC-Regular.otf", | ||
| "filesAnalyzed": false, | ||
| "licenseConcluded": "OFL-1.1", | ||
| "licenseDeclared": "OFL-1.1", | ||
| "name": "Noto Sans SC", | ||
| "versionInfo": "noto-cjk-sc-subset-20260730.1" | ||
| } | ||
@@ -200,2 +210,7 @@ ], | ||
| "spdxElementId": "SPDXRef-Package-light-ocr-core" | ||
| }, | ||
| { | ||
| "relatedSpdxElement": "SPDXRef-Package-noto-sans-sc", | ||
| "relationshipType": "DEPENDS_ON", | ||
| "spdxElementId": "SPDXRef-Package-pdfium-native" | ||
| } | ||
@@ -202,0 +217,0 @@ ], |
@@ -31,8 +31,8 @@ { | ||
| "optionalDependencies": { | ||
| "@arcships/light-ocr-darwin-arm64": "0.5.5", | ||
| "@arcships/light-ocr-darwin-x64": "0.5.5", | ||
| "@arcships/light-ocr-linux-arm64-gnu": "0.5.5", | ||
| "@arcships/light-ocr-linux-x64-gnu": "0.5.5", | ||
| "@arcships/light-ocr-win32-arm64": "0.5.5", | ||
| "@arcships/light-ocr-win32-x64": "0.5.5" | ||
| "@arcships/light-ocr-darwin-arm64": "0.5.7", | ||
| "@arcships/light-ocr-darwin-x64": "0.5.7", | ||
| "@arcships/light-ocr-linux-arm64-gnu": "0.5.7", | ||
| "@arcships/light-ocr-linux-x64-gnu": "0.5.7", | ||
| "@arcships/light-ocr-win32-arm64": "0.5.7", | ||
| "@arcships/light-ocr-win32-x64": "0.5.7" | ||
| }, | ||
@@ -49,3 +49,3 @@ "publishConfig": { | ||
| "types": "./src/index.d.ts", | ||
| "version": "0.1.5" | ||
| "version": "0.1.7" | ||
| } |
| 'use strict'; | ||
| const { spawnSync } = require('node:child_process'); | ||
| const crypto = require('node:crypto'); | ||
@@ -7,2 +8,93 @@ const fs = require('node:fs'); | ||
| // macOS-only integrity relaxation for downstream re-signing. | ||
| // | ||
| // macOS packaging pipelines re-sign the native payload with a Developer ID | ||
| // (or ad-hoc) identity, and osx-sign rewrites the LC_CODE_SIGNATURE blob of | ||
| // every Mach-O under Contents --force. That changes both file size and | ||
| // sha256, so the strict descriptor comparison alone rejects otherwise intact | ||
| // binaries. On macOS only, a Mach-O whose signature verifies AND whose | ||
| // signing identity matches the host process is accepted as an equivalent | ||
| // integrity proof: same TeamIdentifier as process.execPath, or both sides | ||
| // ad-hoc signed. Ad-hoc signatures are reproducible by anyone, so this | ||
| // relaxation stays macOS-only and documented; win32/linux payloads are never | ||
| // re-signed and keep the strict bytes+sha256 gate. | ||
| const MACHO_MAGIC = new Set([ | ||
| 0xfeedface, // 32-bit big-endian | ||
| 0xcefaedfe, // 32-bit little-endian | ||
| 0xfeedfacf, // 64-bit big-endian | ||
| 0xcffaedfe, // 64-bit little-endian | ||
| 0xcafebabe, // universal (fat) big-endian | ||
| 0xbebafeca, // universal (fat) little-endian | ||
| ]); | ||
| function isMachO(filename) { | ||
| const fd = fs.openSync(filename, 'r'); | ||
| try { | ||
| const magic = Buffer.allocUnsafe(4); | ||
| if (fs.readSync(fd, magic, 0, 4, 0) !== 4) return false; | ||
| return MACHO_MAGIC.has(magic.readUInt32BE(0)); | ||
| } finally { | ||
| fs.closeSync(fd); | ||
| } | ||
| } | ||
| function codesignOutput(filename) { | ||
| const result = spawnSync('codesign', ['-dv', '--verbose=4', filename], { | ||
| encoding: 'utf8', | ||
| stdio: ['ignore', 'pipe', 'pipe'], | ||
| }); | ||
| if (result.error || result.status !== 0) return null; | ||
| return `${result.stdout}\n${result.stderr}`; | ||
| } | ||
| // Returns { teamIdentifier, adhoc } for a readable signature, or null when | ||
| // the file carries no readable signature (unsigned, corrupt, not Mach-O). | ||
| function codesignIdentity(filename) { | ||
| const output = codesignOutput(filename); | ||
| if (!output) return null; | ||
| if (/^Signature=adhoc\s*$/m.test(output)) { | ||
| return { teamIdentifier: null, adhoc: true }; | ||
| } | ||
| const teamLine = output.match(/^TeamIdentifier=(.*)$/m); | ||
| const teamIdentifier = teamLine ? teamLine[1].trim() : ''; | ||
| if (teamIdentifier && teamIdentifier !== 'not set') { | ||
| return { teamIdentifier, adhoc: false }; | ||
| } | ||
| return null; | ||
| } | ||
| function codesignVerifies(filename) { | ||
| const result = spawnSync('codesign', ['--verify', '--strict', filename], { | ||
| encoding: 'utf8', | ||
| stdio: ['ignore', 'pipe', 'pipe'], | ||
| }); | ||
| return !result.error && result.status === 0; | ||
| } | ||
| let hostCodesignIdentityCache; | ||
| function hostCodesignIdentity() { | ||
| if (hostCodesignIdentityCache === undefined) { | ||
| hostCodesignIdentityCache = codesignIdentity(process.execPath); | ||
| } | ||
| return hostCodesignIdentityCache; | ||
| } | ||
| // Accept a re-signature only when it was made with the same identity as the | ||
| // host process: identical TeamIdentifier, or both sides ad-hoc signed. | ||
| function signerMatchesHost(artifactIdentity, host = hostCodesignIdentity()) { | ||
| if (!artifactIdentity || !host) return false; | ||
| if (artifactIdentity.adhoc && host.adhoc) return true; | ||
| return !artifactIdentity.adhoc && !host.adhoc && | ||
| artifactIdentity.teamIdentifier === host.teamIdentifier; | ||
| } | ||
| function acceptsSignedMacOSMutation(filename) { | ||
| if (process.platform !== 'darwin') return false; | ||
| if (!isMachO(filename)) return false; | ||
| if (!codesignVerifies(filename)) return false; | ||
| return signerMatchesHost(codesignIdentity(filename)); | ||
| } | ||
| function adapterError(code, message, detail, cause) { | ||
@@ -112,8 +204,19 @@ const error = new Error(message, cause === undefined ? undefined : { cause }); | ||
| } | ||
| if (!Number.isSafeInteger(artifact.bytes) || artifact.bytes < 1 || stats.size !== artifact.bytes) { | ||
| if (!Number.isSafeInteger(artifact.bytes) || artifact.bytes < 1) { | ||
| throw adapterError('package_load_failed', 'Descriptor artifact byte count mismatch', artifact.path); | ||
| } | ||
| if (!/^[a-f0-9]{64}$/.test(artifact.sha256 || '') || sha256(filename) !== artifact.sha256) { | ||
| if (!/^[a-f0-9]{64}$/.test(artifact.sha256 || '')) { | ||
| throw adapterError('package_load_failed', 'Descriptor artifact hash mismatch', artifact.path); | ||
| } | ||
| if (stats.size !== artifact.bytes) { | ||
| if (!acceptsSignedMacOSMutation(filename)) { | ||
| throw adapterError('package_load_failed', 'Descriptor artifact byte count mismatch', artifact.path); | ||
| } | ||
| return filename; | ||
| } | ||
| if (sha256(filename) !== artifact.sha256) { | ||
| if (!acceptsSignedMacOSMutation(filename)) { | ||
| throw adapterError('package_load_failed', 'Descriptor artifact hash mismatch', artifact.path); | ||
| } | ||
| } | ||
| return filename; | ||
@@ -501,2 +604,9 @@ } | ||
| module.exports = { loadNative, validateRuntimeDescriptor }; | ||
| const macOSSignature = Object.freeze({ | ||
| isMachO, | ||
| codesignIdentity, | ||
| codesignVerifies, | ||
| signerMatchesHost, | ||
| }); | ||
| module.exports = { loadNative, validateRuntimeDescriptor, macOSSignature }; |
| 'use strict'; | ||
| module.exports = Object.freeze({ coreVersion: '0.5.5' }); | ||
| module.exports = Object.freeze({ coreVersion: '0.5.7' }); |
@@ -9,3 +9,3 @@ { | ||
| "libc": "glibc", | ||
| "lightOcrVersion": "0.5.5", | ||
| "lightOcrVersion": "0.5.7", | ||
| "bundleId": "ppocrv6-small-native-20260719.1", | ||
@@ -23,4 +23,4 @@ "engine": "engine/src/index.cjs", | ||
| "path": "engine/node_modules/@arcships/light-ocr-linux-x64-gnu/artifact-hashes.json", | ||
| "size": 4336, | ||
| "sha256": "97b79f6e9b01901417db8fce0c284ceeca68dd2b51b67f422a944e55cb13790d" | ||
| "size": 4832, | ||
| "sha256": "d513a776def3fc1d641d1b1d9ee6519378e1c60edae74db09f7001e8d509966b" | ||
| }, | ||
@@ -34,4 +34,4 @@ { | ||
| "path": "engine/node_modules/@arcships/light-ocr-linux-x64-gnu/license-inventory.json", | ||
| "size": 2414, | ||
| "sha256": "d1bb470cacefc6ad9b17408e2a4e766c7b1a9ff8cdecc869281b1dca84fe8204" | ||
| "size": 2596, | ||
| "sha256": "3b88becbb26a6bf83d1680c677cea60e7da5242cff914ccbbfaa2ce264d491b8" | ||
| }, | ||
@@ -49,2 +49,7 @@ { | ||
| { | ||
| "path": "engine/node_modules/@arcships/light-ocr-linux-x64-gnu/licenses/noto-sans-sc-OFL-1.1.txt", | ||
| "size": 4301, | ||
| "sha256": "6a73f9541c2de74158c0e7cf6b0a58ef774f5a780bf191f2d7ec9cc53efe2bf2" | ||
| }, | ||
| { | ||
| "path": "engine/node_modules/@arcships/light-ocr-linux-x64-gnu/licenses/onnxruntime-MIT.txt", | ||
@@ -117,3 +122,3 @@ "size": 1094, | ||
| "size": 11143512, | ||
| "sha256": "e0b857084df54d4e62eec86cb664589582304b1fedb3a727b355c663c3df7d84" | ||
| "sha256": "99ac7dce382695d0ab7a5440119656a0c220c2471fc0cc1a271377b9181eb987" | ||
| }, | ||
@@ -123,3 +128,3 @@ { | ||
| "size": 1988, | ||
| "sha256": "078609257074d67e9472a2347a49284582b42fa919ad264cbc676878f146b466" | ||
| "sha256": "f71584747e30f75ecb72776ead56fa5e5c4d442cfb70751919f8fda0b4b31599" | ||
| }, | ||
@@ -134,3 +139,3 @@ { | ||
| "size": 944, | ||
| "sha256": "356988d03952fe598771e8da970ab6e99171f450d4b2377426f5504e45c4ded8" | ||
| "sha256": "e634e6c83538ffbbecca9e64f1cd8f21c7cbb9cec22dd7165ed0eaec8312a9cf" | ||
| }, | ||
@@ -144,4 +149,4 @@ { | ||
| "path": "engine/node_modules/@arcships/light-ocr-linux-x64-gnu/sbom.spdx.json", | ||
| "size": 6909, | ||
| "sha256": "82d080502a88e71d6792c404eb91e9c22f9ac6f14a9d8b75c0750d3b4bc9bafd" | ||
| "size": 7540, | ||
| "sha256": "a246fcd6302e4889641b803610d32c73add1f31bd9ccc868b53940c90b4b57c2" | ||
| }, | ||
@@ -156,3 +161,3 @@ { | ||
| "size": 1278, | ||
| "sha256": "fc4977c6a8b3136c6b362351f9df8588753fc4d9f666b1efa383ed0e8caed4f8" | ||
| "sha256": "3bc04a3e85e4cbec05229bbd1e765c1807e84a788d1a8b3386c83bb7acc9f2c6" | ||
| }, | ||
@@ -196,4 +201,4 @@ { | ||
| "path": "engine/src/load-native.cjs", | ||
| "size": 20019, | ||
| "sha256": "2ceecc0b6e10361196fb41e2a08697116c132af31d32d293a1d0b1232a6eb809" | ||
| "size": 23940, | ||
| "sha256": "dfbd1bd7b6bbae63516fe030d55732940a3278407a85fec1869662c1b6bda32c" | ||
| }, | ||
@@ -203,3 +208,3 @@ { | ||
| "size": 73, | ||
| "sha256": "53ab1a77623a565640f2945f3edf9f3131f1cf64727fc09d85493bd0a9e503c2" | ||
| "sha256": "31fdd8a41ca98900767a25c38d38f3fe07777a28e3b489601bc1e78e9ced8c27" | ||
| }, | ||
@@ -328,4 +333,4 @@ { | ||
| "path": "native-metadata/artifact-hashes.json", | ||
| "size": 4336, | ||
| "sha256": "97b79f6e9b01901417db8fce0c284ceeca68dd2b51b67f422a944e55cb13790d" | ||
| "size": 4832, | ||
| "sha256": "d513a776def3fc1d641d1b1d9ee6519378e1c60edae74db09f7001e8d509966b" | ||
| }, | ||
@@ -339,4 +344,4 @@ { | ||
| "path": "native-metadata/license-inventory.json", | ||
| "size": 2414, | ||
| "sha256": "d1bb470cacefc6ad9b17408e2a4e766c7b1a9ff8cdecc869281b1dca84fe8204" | ||
| "size": 2596, | ||
| "sha256": "3b88becbb26a6bf83d1680c677cea60e7da5242cff914ccbbfaa2ce264d491b8" | ||
| }, | ||
@@ -354,2 +359,7 @@ { | ||
| { | ||
| "path": "native-metadata/licenses/noto-sans-sc-OFL-1.1.txt", | ||
| "size": 4301, | ||
| "sha256": "6a73f9541c2de74158c0e7cf6b0a58ef774f5a780bf191f2d7ec9cc53efe2bf2" | ||
| }, | ||
| { | ||
| "path": "native-metadata/licenses/onnxruntime-MIT.txt", | ||
@@ -417,3 +427,3 @@ "size": 1094, | ||
| "size": 944, | ||
| "sha256": "356988d03952fe598771e8da970ab6e99171f450d4b2377426f5504e45c4ded8" | ||
| "sha256": "e634e6c83538ffbbecca9e64f1cd8f21c7cbb9cec22dd7165ed0eaec8312a9cf" | ||
| }, | ||
@@ -427,6 +437,6 @@ { | ||
| "path": "native-metadata/sbom.spdx.json", | ||
| "size": 6909, | ||
| "sha256": "82d080502a88e71d6792c404eb91e9c22f9ac6f14a9d8b75c0750d3b4bc9bafd" | ||
| "size": 7540, | ||
| "sha256": "a246fcd6302e4889641b803610d32c73add1f31bd9ccc868b53940c90b4b57c2" | ||
| } | ||
| ] | ||
| } |
@@ -19,5 +19,5 @@ { | ||
| { | ||
| "bytes": 2414, | ||
| "bytes": 2596, | ||
| "path": "license-inventory.json", | ||
| "sha256": "d1bb470cacefc6ad9b17408e2a4e766c7b1a9ff8cdecc869281b1dca84fe8204" | ||
| "sha256": "3b88becbb26a6bf83d1680c677cea60e7da5242cff914ccbbfaa2ce264d491b8" | ||
| }, | ||
@@ -35,2 +35,7 @@ { | ||
| { | ||
| "bytes": 4301, | ||
| "path": "licenses/noto-sans-sc-OFL-1.1.txt", | ||
| "sha256": "6a73f9541c2de74158c0e7cf6b0a58ef774f5a780bf191f2d7ec9cc53efe2bf2" | ||
| }, | ||
| { | ||
| "bytes": 1094, | ||
@@ -103,3 +108,3 @@ "path": "licenses/onnxruntime-MIT.txt", | ||
| "path": "native/light_ocr_node.node", | ||
| "sha256": "e0b857084df54d4e62eec86cb664589582304b1fedb3a727b355c663c3df7d84" | ||
| "sha256": "99ac7dce382695d0ab7a5440119656a0c220c2471fc0cc1a271377b9181eb987" | ||
| }, | ||
@@ -109,3 +114,3 @@ { | ||
| "path": "native/runtime-descriptor.json", | ||
| "sha256": "078609257074d67e9472a2347a49284582b42fa919ad264cbc676878f146b466" | ||
| "sha256": "f71584747e30f75ecb72776ead56fa5e5c4d442cfb70751919f8fda0b4b31599" | ||
| }, | ||
@@ -115,8 +120,18 @@ { | ||
| "path": "package.json", | ||
| "sha256": "356988d03952fe598771e8da970ab6e99171f450d4b2377426f5504e45c4ded8" | ||
| "sha256": "e634e6c83538ffbbecca9e64f1cd8f21c7cbb9cec22dd7165ed0eaec8312a9cf" | ||
| }, | ||
| { | ||
| "bytes": 382, | ||
| "bytes": 8331336, | ||
| "path": "pdfium/fonts/NotoSansSC-Regular.otf", | ||
| "sha256": "faa6c9df652116dde789d351359f3d7e5d2285a2b2a1f04a2d7244df706d5ea9" | ||
| }, | ||
| { | ||
| "bytes": 4301, | ||
| "path": "pdfium/fonts/OFL.txt", | ||
| "sha256": "6a73f9541c2de74158c0e7cf6b0a58ef774f5a780bf191f2d7ec9cc53efe2bf2" | ||
| }, | ||
| { | ||
| "bytes": 987, | ||
| "path": "pdfium/index.cjs", | ||
| "sha256": "d6d6ea1c607b0c56600ad33853d4910b7ed45934b4f6a8e1c40b4d4d735d8340" | ||
| "sha256": "02c7c82adf6fc50f0f4bef2de20b5c2081e00e078536b92d6286c696a3a00f97" | ||
| }, | ||
@@ -129,10 +144,10 @@ { | ||
| { | ||
| "bytes": 370384, | ||
| "bytes": 370960, | ||
| "path": "pdfium/pdfium.node", | ||
| "sha256": "280fdbd00ace98195e592dfb3341c972a37ecae4ffda9f46b39be7a749ccb094" | ||
| "sha256": "1565adfbcdc1ff85101024fa842d4548d65da7058715ad7675f58ce19e73a025" | ||
| }, | ||
| { | ||
| "bytes": 6909, | ||
| "bytes": 7540, | ||
| "path": "sbom.spdx.json", | ||
| "sha256": "82d080502a88e71d6792c404eb91e9c22f9ac6f14a9d8b75c0750d3b4bc9bafd" | ||
| "sha256": "a246fcd6302e4889641b803610d32c73add1f31bd9ccc868b53940c90b4b57c2" | ||
| } | ||
@@ -142,3 +157,3 @@ ], | ||
| "schemaVersion": "1.0", | ||
| "version": "0.5.5" | ||
| "version": "0.5.7" | ||
| } |
@@ -67,2 +67,7 @@ { | ||
| "sha256": "01c3f30c69061d39f0f0a4c575b75f48ec33c77e27d9f4c0f4d05ffe4db9cb99" | ||
| }, | ||
| { | ||
| "component": "noto-sans-sc", | ||
| "file": "licenses/noto-sans-sc-OFL-1.1.txt", | ||
| "sha256": "6a73f9541c2de74158c0e7cf6b0a58ef774f5a780bf191f2d7ec9cc53efe2bf2" | ||
| } | ||
@@ -69,0 +74,0 @@ ], |
@@ -45,3 +45,3 @@ { | ||
| }, | ||
| "version": "0.5.5" | ||
| "version": "0.5.7" | ||
| } |
| { | ||
| "SPDXID": "SPDXRef-DOCUMENT", | ||
| "creationInfo": { | ||
| "created": "2026-07-27T05:14:38Z", | ||
| "created": "2026-08-05T08:15:36Z", | ||
| "creators": [ | ||
@@ -13,3 +13,3 @@ "Tool: light-ocr-generate-release-metadata/1.0" | ||
| ], | ||
| "documentNamespace": "https://light-ocr.invalid/spdx/784db955ce63fc31e25bf2a064d074e5c15f638e5015184cfd6c4972d621e391", | ||
| "documentNamespace": "https://light-ocr.invalid/spdx/3ba5d0ff6d5ab67c511ede229d779491459170285e4e5f7cfa74e3b9d501a2b1", | ||
| "name": "light-ocr-core-linux-x64", | ||
@@ -152,2 +152,12 @@ "packages": [ | ||
| "versionInfo": "0.6.1" | ||
| }, | ||
| { | ||
| "SPDXID": "SPDXRef-Package-noto-sans-sc", | ||
| "copyrightText": "Copyright 2014-2021 Adobe", | ||
| "downloadLocation": "https://raw.githubusercontent.com/notofonts/noto-cjk/f8d157532fbfaeda587e826d4cd5b21a49186f7c/Sans/SubsetOTF/SC/NotoSansSC-Regular.otf", | ||
| "filesAnalyzed": false, | ||
| "licenseConcluded": "OFL-1.1", | ||
| "licenseDeclared": "OFL-1.1", | ||
| "name": "Noto Sans SC", | ||
| "versionInfo": "noto-cjk-sc-subset-20260730.1" | ||
| } | ||
@@ -200,2 +210,7 @@ ], | ||
| "spdxElementId": "SPDXRef-Package-light-ocr-core" | ||
| }, | ||
| { | ||
| "relatedSpdxElement": "SPDXRef-Package-noto-sans-sc", | ||
| "relationshipType": "DEPENDS_ON", | ||
| "spdxElementId": "SPDXRef-Package-pdfium-native" | ||
| } | ||
@@ -202,0 +217,0 @@ ], |
+1
-1
| { | ||
| "name": "dimagent-linux-x64", | ||
| "version": "0.3.2", | ||
| "version": "0.3.5", | ||
| "description": "dimagent binary for Linux x64", | ||
@@ -5,0 +5,0 @@ "os": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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.
Found 3 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
337145234
0.02%519
0.58%52456
0.34%91
2.25%30
3.45%