dimcode-darwin-x64 0.1.0-alpha.20 → 0.1.0-alpha.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dimcode-darwin-x64",
3
- "version": "0.1.0-alpha.20",
3
+ "version": "0.1.0-alpha.22",
4
4
  "description": "Dim native CLI and App Server",
5
5
  "license": "SEE LICENSE IN NOTICE",
6
6
  "repository": {
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "light-ocr",
3
+ "description": "Local PP-OCR for Modality through light-ocr",
4
+ "version": "0.1.0",
5
+ "code": {
6
+ "entry": "index.ts",
7
+ "provides": { "ocrHelper": { "describe": "async" } }
8
+ },
9
+ "dependencies": "npm"
10
+ }
@@ -0,0 +1,300 @@
1
+ 'use strict'
2
+
3
+ const fs = require('node:fs')
4
+ const path = require('node:path')
5
+
6
+ const MAX_INPUT_BYTES = 100 * 1024 * 1024
7
+ const MAX_ARTIFACT_BYTES = 1024 * 1024 * 1024
8
+ const MAX_PAGES = 500
9
+ const MAX_PAGE_PIXELS = 25_000_000
10
+ const MAX_TOTAL_PIXELS = 12_500_000_000
11
+ const MAX_FILE_BYTES = 104_857_600
12
+ const DPI = 150
13
+ const MAX_MESSAGE = 4096
14
+
15
+ /** The limits the image engine carries: the pinned model bundle's own
16
+ * resource limits (`@arcships/light-ocr-model-ppocrv6-small` 0.3.4,
17
+ * `bundle/normalized-config.json`) with Modality's page bound as `maxPixels`.
18
+ * An engine may only reduce its bundle's limits, and `reducedLimits` must
19
+ * carry every legacy field, so the untouched limits stay the bundle's. */
20
+ const IMAGE_LIMITS = {
21
+ maxWidth: 10_000,
22
+ maxHeight: 10_000,
23
+ maxPixels: MAX_PAGE_PIXELS,
24
+ maxDetectionSide: 4_000,
25
+ maxDetectionCandidates: 3_000,
26
+ maxRecognitionBatchSize: 8,
27
+ maxRecognitionWidth: 3_200,
28
+ maxTemporaryBytes: 512 * 1024 * 1024,
29
+ }
30
+
31
+ /** The platform package of each light-ocr platform identity, as the facade's
32
+ * own document API names them. */
33
+ const PLATFORM_PACKAGES = {
34
+ 'macos-arm64': '@arcships/light-ocr-darwin-arm64',
35
+ 'macos-x64': '@arcships/light-ocr-darwin-x64',
36
+ 'windows-arm64': '@arcships/light-ocr-win32-arm64',
37
+ 'windows-x64': '@arcships/light-ocr-win32-x64',
38
+ 'linux-x64': '@arcships/light-ocr-linux-x64-gnu',
39
+ 'linux-arm64': '@arcships/light-ocr-linux-arm64-gnu',
40
+ 'linux-x64-musl': '@arcships/light-ocr-linux-x64-musl',
41
+ 'linux-arm64-musl': '@arcships/light-ocr-linux-arm64-musl',
42
+ }
43
+
44
+ /** Each light-ocr error code as the helper contract's code. */
45
+ const ERROR_CODES = {
46
+ invalid_argument: 'invalid_input',
47
+ invalid_image: 'invalid_input',
48
+ unsupported_pixel_format: 'invalid_input',
49
+ unsupported_capability: 'invalid_input',
50
+ resource_limit_exceeded: 'resource_limit_exceeded',
51
+ queue_full: 'resource_limit_exceeded',
52
+ invalid_model_bundle: 'local_runtime_unavailable',
53
+ unsupported_model: 'local_runtime_unavailable',
54
+ model_integrity_failed: 'local_runtime_unavailable',
55
+ runtime_initialization_failed: 'local_runtime_unavailable',
56
+ invalid_engine: 'local_runtime_unavailable',
57
+ bundle_io_failed: 'local_runtime_unavailable',
58
+ unsupported_platform: 'local_runtime_unavailable',
59
+ package_load_failed: 'local_runtime_unavailable',
60
+ environment_closing: 'local_runtime_unavailable',
61
+ internal_error: 'local_runtime_unavailable',
62
+ inference_failed: 'local_runtime_failed',
63
+ postprocess_failed: 'local_runtime_failed',
64
+ }
65
+
66
+ class Refusal extends Error {
67
+ constructor(code, message) {
68
+ super(message)
69
+ this.code = code
70
+ }
71
+ }
72
+
73
+ function refuse(code, message) {
74
+ throw new Refusal(code, message)
75
+ }
76
+
77
+ function message(error) {
78
+ const text = error instanceof Error ? error.message : String(error)
79
+ return text.length > MAX_MESSAGE ? text.slice(0, MAX_MESSAGE) : text
80
+ }
81
+
82
+ let facade
83
+ function lightOcr() {
84
+ if (facade === undefined) {
85
+ try {
86
+ facade = require('@arcships/light-ocr')
87
+ } catch (error) {
88
+ refuse('local_runtime_unavailable', `The light-ocr package cannot be loaded: ${message(error)}`)
89
+ }
90
+ }
91
+ return facade
92
+ }
93
+
94
+ /** The helper code one engine failure maps to: an `OcrError` by its code, a
95
+ * PDF renderer failure by PDFium's message prefix, anything else as a failed
96
+ * local runtime. */
97
+ function classify(error) {
98
+ if (facade !== undefined && error instanceof facade.OcrError) {
99
+ return ERROR_CODES[error.code] ?? 'local_runtime_failed'
100
+ }
101
+ const text = message(error)
102
+ if (/^(PASSWORD|SECURITY):/.test(text)) return 'encrypted_pdf'
103
+ if (/^(FILE|FORMAT|PAGE|UNKNOWN):/.test(text)) return 'invalid_input'
104
+ return 'local_runtime_failed'
105
+ }
106
+
107
+ function parse(argv) {
108
+ const flags = { '--input': 'input', '--artifacts': 'artifacts', '--output-mode': 'outputMode' }
109
+ const options = { input: undefined, artifacts: undefined, outputMode: 'text' }
110
+ for (let index = 0; index < argv.length; index += 2) {
111
+ const argument = argv[index]
112
+ if (flags[argument] === undefined) refuse('invalid_input', `unknown argument ${argument}`)
113
+ const value = argv[index + 1]
114
+ if (value === undefined) refuse('invalid_input', `${argument} requires a value`)
115
+ options[flags[argument]] = value
116
+ }
117
+ if (options.input === undefined) refuse('invalid_input', '--input is required')
118
+ if (options.artifacts === undefined) refuse('invalid_input', '--artifacts is required')
119
+ if (options.outputMode !== 'text' && options.outputMode !== 'layout') {
120
+ refuse('invalid_input', '--output-mode must be text or layout')
121
+ }
122
+ return options
123
+ }
124
+
125
+ function artifactsDirectory(directory) {
126
+ const metadata = fs.statSync(directory, { throwIfNoEntry: false })
127
+ if (metadata === undefined || !metadata.isDirectory()) {
128
+ refuse('invalid_input', 'The artifact directory is missing')
129
+ }
130
+ return directory
131
+ }
132
+
133
+ function readInput(file) {
134
+ const metadata = fs.statSync(file, { throwIfNoEntry: false })
135
+ if (metadata === undefined) refuse('invalid_input', 'The input file is missing')
136
+ if (!metadata.isFile()) refuse('invalid_input', 'The input is not a regular file')
137
+ if (metadata.size === 0) refuse('invalid_input', 'The input file is empty')
138
+ if (metadata.size > MAX_INPUT_BYTES) {
139
+ refuse('resource_limit_exceeded', `The input exceeds ${MAX_INPUT_BYTES} bytes`)
140
+ }
141
+ return fs.readFileSync(file)
142
+ }
143
+
144
+ function sniff(bytes) {
145
+ if (bytes.length >= 4 && bytes[0] === 0x25 && bytes[1] === 0x50 && bytes[2] === 0x44 && bytes[3] === 0x46) {
146
+ return 'pdf'
147
+ }
148
+ if (bytes.length >= 4 && bytes[0] === 0x89 && bytes[1] === 0x50 && bytes[2] === 0x4e && bytes[3] === 0x47) {
149
+ return 'image'
150
+ }
151
+ if (bytes.length >= 3 && bytes[0] === 0xff && bytes[1] === 0xd8 && bytes[2] === 0xff) {
152
+ return 'image'
153
+ }
154
+ return undefined
155
+ }
156
+
157
+ class Artifacts {
158
+ constructor(directory) {
159
+ this.directory = directory
160
+ this.bytes = 0
161
+ }
162
+
163
+ write(name, data) {
164
+ const next = this.bytes + data.length
165
+ if (next > MAX_ARTIFACT_BYTES) {
166
+ refuse('resource_limit_exceeded', `The OCR artifacts exceed ${MAX_ARTIFACT_BYTES} bytes`)
167
+ }
168
+ fs.writeFileSync(path.join(this.directory, name), data)
169
+ this.bytes = next
170
+ return name
171
+ }
172
+ }
173
+
174
+ function pageImage(number) {
175
+ return `page-${String(number).padStart(4, '0')}.png`
176
+ }
177
+
178
+ function page(number, width, height, lines) {
179
+ return {
180
+ page: number,
181
+ text: lines.map(line => line.text).join('\n'),
182
+ width,
183
+ height,
184
+ regions: lines.map(line => ({
185
+ text: line.text,
186
+ confidence: Math.min(1, Math.max(0, line.confidence)),
187
+ polygon: line.box.map(point => [point.x, point.y]),
188
+ })),
189
+ }
190
+ }
191
+
192
+ async function images(api, bytes) {
193
+ const engine = await api.createEngine({ execution: { provider: 'cpu' }, reducedLimits: IMAGE_LIMITS })
194
+ try {
195
+ const result = await engine.recognizeEncoded(bytes, { applyExif: true })
196
+ return [page(1, result.imageWidth, result.imageHeight, result.lines)]
197
+ } finally {
198
+ await engine.close()
199
+ }
200
+ }
201
+
202
+ function platformPdfium() {
203
+ let runtime
204
+ try {
205
+ runtime = require('@arcships/light-ocr-runtime')
206
+ } catch (error) {
207
+ refuse('local_runtime_unavailable', `The light-ocr runtime package cannot be loaded: ${message(error)}`)
208
+ }
209
+ let id
210
+ try {
211
+ id = runtime.platformIdentity().id
212
+ } catch (error) {
213
+ refuse('local_runtime_unavailable', message(error))
214
+ }
215
+ const name = PLATFORM_PACKAGES[id]
216
+ if (name === undefined) refuse('local_runtime_unavailable', `No light-ocr platform package for ${id}`)
217
+ try {
218
+ return require(`${name}/pdfium`)
219
+ } catch (error) {
220
+ refuse('local_runtime_unavailable', `The PDF renderer cannot be loaded: ${message(error)}`)
221
+ }
222
+ }
223
+
224
+ /** The second render of a page the engine has already loaded, rendered and
225
+ * recognized: whatever fails here and whatever its message, the local runtime
226
+ * failed, not the input. */
227
+ async function render(document, index) {
228
+ try {
229
+ const rendered = await document.getPage(index)
230
+ try {
231
+ return await rendered.render({ scale: DPI / 72 })
232
+ } finally {
233
+ await rendered.close()
234
+ }
235
+ } catch (error) {
236
+ refuse('local_runtime_failed', message(error))
237
+ }
238
+ }
239
+
240
+ async function pdf(api, bytes, mode, artifacts) {
241
+ if (!api.hasPdfSupport()) {
242
+ refuse('local_runtime_unavailable', 'PDF support is unavailable in the installed light-ocr packages')
243
+ }
244
+ const renderer = mode === 'layout' ? platformPdfium() : undefined
245
+ const document = renderer === undefined ? undefined : await renderer.loadDocument(bytes)
246
+ try {
247
+ const engine = await api.createDocumentEngine({ engineOptions: { execution: { provider: 'cpu' } } })
248
+ try {
249
+ const pages = []
250
+ for await (const recognized of engine.recognizeDocument(bytes, {
251
+ dpi: DPI,
252
+ maxPages: MAX_PAGES,
253
+ maxPagePixels: MAX_PAGE_PIXELS,
254
+ maxTotalPixels: MAX_TOTAL_PIXELS,
255
+ maxFileBytes: MAX_FILE_BYTES,
256
+ })) {
257
+ const number = recognized.index + 1
258
+ const entry = page(number, recognized.width, recognized.height, recognized.lines)
259
+ if (document !== undefined) {
260
+ entry.imagePath = artifacts.write(pageImage(number), await render(document, recognized.index))
261
+ }
262
+ pages.push(entry)
263
+ }
264
+ return pages
265
+ } finally {
266
+ await engine.close()
267
+ }
268
+ } finally {
269
+ if (document !== undefined) await document.destroy()
270
+ }
271
+ }
272
+
273
+ async function main() {
274
+ try {
275
+ const options = parse(process.argv.slice(2))
276
+ const artifacts = new Artifacts(artifactsDirectory(options.artifacts))
277
+ const bytes = readInput(options.input)
278
+ const kind = sniff(bytes)
279
+ if (kind === undefined) refuse('invalid_input', 'The input is not a PNG, JPEG or PDF')
280
+ const api = lightOcr()
281
+ const pages = kind === 'pdf'
282
+ ? await pdf(api, bytes, options.outputMode, artifacts)
283
+ : await images(api, bytes)
284
+ const text = pages.map(entry => entry.text).join('\n')
285
+ artifacts.write('result.json', Buffer.from(JSON.stringify({ text, pageCount: pages.length, pages })))
286
+ artifacts.write('text.txt', Buffer.from(text))
287
+ process.stdout.write(`${JSON.stringify({ ok: true, pageCount: pages.length })}\n`)
288
+ return 0
289
+ } catch (error) {
290
+ const code = error instanceof Refusal ? error.code : classify(error)
291
+ process.stdout.write(`${JSON.stringify({ ok: false, error: { code, message: message(error) } })}\n`)
292
+ return 2
293
+ }
294
+ }
295
+
296
+ if (require.main === module) {
297
+ main().then(code => {
298
+ process.exitCode = code
299
+ })
300
+ }
@@ -0,0 +1,36 @@
1
+ import { definePlugin } from '@arcships/rutis'
2
+ import { realpathSync } from 'node:fs'
3
+ import path from 'node:path'
4
+
5
+ const provides = { ocrHelper: { describe: 'async' } } as const
6
+
7
+ /** The installation root the running Node binary belongs to: the directory
8
+ * above `bin/node` on POSIX, and the binary's own directory on Windows. */
9
+ function nodeRoot(executable: string): string {
10
+ const directory = path.dirname(executable)
11
+ return process.platform === 'win32' || path.basename(directory) !== 'bin'
12
+ ? directory
13
+ : path.dirname(directory)
14
+ }
15
+
16
+ export default definePlugin({
17
+ name: 'LightOcr',
18
+ provides,
19
+ apply(ctx) {
20
+ const pluginDirectory = realpathSync(import.meta.dirname)
21
+ const executable = process.execPath
22
+ const read = [nodeRoot(realpathSync(executable)), pluginDirectory]
23
+ const args = [path.join(pluginDirectory, 'helper.cjs')]
24
+ ctx.provide('ocrHelper', {
25
+ async describe() {
26
+ return {
27
+ contract: 1,
28
+ target: { providerId: 'local', modelId: 'pp-ocr' },
29
+ executable,
30
+ args,
31
+ read,
32
+ }
33
+ },
34
+ })
35
+ },
36
+ })
@@ -0,0 +1,218 @@
1
+ {
2
+ "name": "dim-light-ocr",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {
6
+ "": {
7
+ "name": "dim-light-ocr",
8
+ "dependencies": {
9
+ "@arcships/light-ocr": "0.5.9",
10
+ "@arcships/light-ocr-runtime": "0.1.9",
11
+ "@arcships/rutis": "0.19.3"
12
+ }
13
+ },
14
+ "node_modules/@arcships/light-ocr": {
15
+ "version": "0.5.9",
16
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr/-/light-ocr-0.5.9.tgz",
17
+ "integrity": "sha512-M7/eKlbd+Z7nKMX7Ic7/s2mAn2zuNH1/7uJJxTzOWoqd3p7lqKmeUduAmv6vzGrt5meev/v63/DhutVXkodn9Q==",
18
+ "license": "Apache-2.0",
19
+ "dependencies": {
20
+ "@arcships/light-ocr-model-ppocrv6-small": "0.3.4",
21
+ "@arcships/light-ocr-runtime": "0.1.9"
22
+ },
23
+ "bin": {
24
+ "light-ocr": "src/cli.cjs"
25
+ },
26
+ "engines": {
27
+ "node": ">=22.0.0"
28
+ }
29
+ },
30
+ "node_modules/@arcships/light-ocr-darwin-arm64": {
31
+ "version": "0.5.9",
32
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-darwin-arm64/-/light-ocr-darwin-arm64-0.5.9.tgz",
33
+ "integrity": "sha512-vnxsHTLyJGHt+zOeLdhaTW/uCyw11khzAgembl3SYFjaPfRlbpfICNT+xv9V3adoZNZ2rj27SnhIAPPovfYkVg==",
34
+ "cpu": [
35
+ "arm64"
36
+ ],
37
+ "license": "Apache-2.0",
38
+ "optional": true,
39
+ "os": [
40
+ "darwin"
41
+ ],
42
+ "engines": {
43
+ "node": ">=22.0.0"
44
+ }
45
+ },
46
+ "node_modules/@arcships/light-ocr-darwin-x64": {
47
+ "version": "0.5.9",
48
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-darwin-x64/-/light-ocr-darwin-x64-0.5.9.tgz",
49
+ "integrity": "sha512-4QukYgwzcyW/bi2iP8rGfE4tkBCxtKVvORDf+GdUzpgLqz41fLUSljbRS2zSoBVe4hinse2j0rijcKfq+6gKtw==",
50
+ "cpu": [
51
+ "x64"
52
+ ],
53
+ "license": "Apache-2.0",
54
+ "optional": true,
55
+ "os": [
56
+ "darwin"
57
+ ],
58
+ "engines": {
59
+ "node": ">=22.0.0"
60
+ }
61
+ },
62
+ "node_modules/@arcships/light-ocr-linux-arm64-gnu": {
63
+ "version": "0.5.9",
64
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-linux-arm64-gnu/-/light-ocr-linux-arm64-gnu-0.5.9.tgz",
65
+ "integrity": "sha512-1eGYAl5KZOLA0N2Xok/OG1kT9QKi7a/9hBNkNo3Rr7ZUUrsJteOIHAVYzzLojv+NtWqw3PRWK3xvCCb1K3gRpw==",
66
+ "cpu": [
67
+ "arm64"
68
+ ],
69
+ "libc": [
70
+ "glibc"
71
+ ],
72
+ "license": "Apache-2.0",
73
+ "optional": true,
74
+ "os": [
75
+ "linux"
76
+ ],
77
+ "engines": {
78
+ "node": ">=22.0.0"
79
+ }
80
+ },
81
+ "node_modules/@arcships/light-ocr-linux-arm64-musl": {
82
+ "version": "0.5.9",
83
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-linux-arm64-musl/-/light-ocr-linux-arm64-musl-0.5.9.tgz",
84
+ "integrity": "sha512-TXQlftomYeVnoLr9HdoDJv7L69a33kvMD6W/fjY3YAyyCJnszmY6QLKUkChu/kvhVvOoe5+0SRPEzRhtge7qBQ==",
85
+ "cpu": [
86
+ "arm64"
87
+ ],
88
+ "libc": [
89
+ "musl"
90
+ ],
91
+ "license": "Apache-2.0",
92
+ "optional": true,
93
+ "os": [
94
+ "linux"
95
+ ],
96
+ "engines": {
97
+ "node": ">=22.0.0"
98
+ }
99
+ },
100
+ "node_modules/@arcships/light-ocr-linux-x64-gnu": {
101
+ "version": "0.5.9",
102
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-linux-x64-gnu/-/light-ocr-linux-x64-gnu-0.5.9.tgz",
103
+ "integrity": "sha512-pXilG5VV4DZab0i1OJG6mDaVTYUstWcSln34dygLAuO8o6NU5iq832bXrqOHOJ0MX+08+/HyKqHbzO34LB99dg==",
104
+ "cpu": [
105
+ "x64"
106
+ ],
107
+ "libc": [
108
+ "glibc"
109
+ ],
110
+ "license": "Apache-2.0",
111
+ "optional": true,
112
+ "os": [
113
+ "linux"
114
+ ],
115
+ "engines": {
116
+ "node": ">=22.0.0"
117
+ }
118
+ },
119
+ "node_modules/@arcships/light-ocr-linux-x64-musl": {
120
+ "version": "0.5.9",
121
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-linux-x64-musl/-/light-ocr-linux-x64-musl-0.5.9.tgz",
122
+ "integrity": "sha512-/Eoju3nBlmkyiSVvPvL+e7YmbUIIQBCOttp0Pqxmn821/RqIkUEDO9gKk5KPv73rztTh2QvfMSqeNVJEHxFWGQ==",
123
+ "cpu": [
124
+ "x64"
125
+ ],
126
+ "libc": [
127
+ "musl"
128
+ ],
129
+ "license": "Apache-2.0",
130
+ "optional": true,
131
+ "os": [
132
+ "linux"
133
+ ],
134
+ "engines": {
135
+ "node": ">=22.0.0"
136
+ }
137
+ },
138
+ "node_modules/@arcships/light-ocr-model-ppocrv6-small": {
139
+ "version": "0.3.4",
140
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-model-ppocrv6-small/-/light-ocr-model-ppocrv6-small-0.3.4.tgz",
141
+ "integrity": "sha512-F2Rjx3xoiKw1eUc/DW5k5/t1AlvWfReUDTdpRdQKNCDz5Y8YYif+15CHdPz7Wdt/Nza7drDOM3NTGUIuA20ERw==",
142
+ "license": "Apache-2.0"
143
+ },
144
+ "node_modules/@arcships/light-ocr-runtime": {
145
+ "version": "0.1.9",
146
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-runtime/-/light-ocr-runtime-0.1.9.tgz",
147
+ "integrity": "sha512-1aFSuxox89INqkJsmI+iZtshm+FouXEHNoUx65+sgrXl3awB/Q83gZ+S+R4hT6a8yw8GpZtGahJ7qX2ON3icZA==",
148
+ "license": "Apache-2.0",
149
+ "engines": {
150
+ "node": ">=22.0.0"
151
+ },
152
+ "optionalDependencies": {
153
+ "@arcships/light-ocr-darwin-arm64": "0.5.9",
154
+ "@arcships/light-ocr-darwin-x64": "0.5.9",
155
+ "@arcships/light-ocr-linux-arm64-gnu": "0.5.9",
156
+ "@arcships/light-ocr-linux-arm64-musl": "0.5.9",
157
+ "@arcships/light-ocr-linux-x64-gnu": "0.5.9",
158
+ "@arcships/light-ocr-linux-x64-musl": "0.5.9",
159
+ "@arcships/light-ocr-win32-arm64": "0.5.9",
160
+ "@arcships/light-ocr-win32-x64": "0.5.9"
161
+ },
162
+ "peerDependencies": {
163
+ "@arcships/light-ocr-amdnpu-linux-x64-gnu": "0.5.9",
164
+ "@arcships/light-ocr-openvino-linux-x64-gnu": "0.5.9"
165
+ },
166
+ "peerDependenciesMeta": {
167
+ "@arcships/light-ocr-amdnpu-linux-x64-gnu": {
168
+ "optional": true
169
+ },
170
+ "@arcships/light-ocr-openvino-linux-x64-gnu": {
171
+ "optional": true
172
+ }
173
+ }
174
+ },
175
+ "node_modules/@arcships/light-ocr-win32-arm64": {
176
+ "version": "0.5.9",
177
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-win32-arm64/-/light-ocr-win32-arm64-0.5.9.tgz",
178
+ "integrity": "sha512-ZBGR5+1RWtwfdhDZ5HoSM4LRzDOUlIVxFdaKFvwSM4ItK9xWLeAECegUGvnk4MkTdQjx4nuYUjzLTtQbDZveGg==",
179
+ "cpu": [
180
+ "arm64"
181
+ ],
182
+ "license": "Apache-2.0",
183
+ "optional": true,
184
+ "os": [
185
+ "win32"
186
+ ],
187
+ "engines": {
188
+ "node": ">=22.0.0"
189
+ }
190
+ },
191
+ "node_modules/@arcships/light-ocr-win32-x64": {
192
+ "version": "0.5.9",
193
+ "resolved": "https://registry.npmjs.org/@arcships/light-ocr-win32-x64/-/light-ocr-win32-x64-0.5.9.tgz",
194
+ "integrity": "sha512-JYVcrET3PPM5s3vMAIqmDjc5d4MfXFvoRsBpL+hzvqR6ZTMXAkCfxagDSsnpzFRmwwAxrmx56jsQaYrS7kVOnA==",
195
+ "cpu": [
196
+ "x64"
197
+ ],
198
+ "license": "Apache-2.0",
199
+ "optional": true,
200
+ "os": [
201
+ "win32"
202
+ ],
203
+ "engines": {
204
+ "node": ">=22.0.0"
205
+ }
206
+ },
207
+ "node_modules/@arcships/rutis": {
208
+ "version": "0.19.3",
209
+ "resolved": "https://registry.npmjs.org/@arcships/rutis/-/rutis-0.19.3.tgz",
210
+ "integrity": "sha512-mpeVQ2tIZFyiKibgmRtyEhFu0NW3xam/OMUWSkddXIj8a/QqyW3AiE37GKlb4ihpHtuRx1dIz9HyCYHgvnecJw==",
211
+ "license": "MIT",
212
+ "engines": {
213
+ "bun": ">=1.4",
214
+ "node": ">=22"
215
+ }
216
+ }
217
+ }
218
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "dim-light-ocr",
3
+ "private": true,
4
+ "type": "module",
5
+ "dependencies": {
6
+ "@arcships/light-ocr": "0.5.9",
7
+ "@arcships/light-ocr-runtime": "0.1.9",
8
+ "@arcships/rutis": "0.19.3"
9
+ }
10
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.1.0-alpha.20",
4
- "sourceCommit": "d3910d14999119c37d61d5d52139dfa29b81eab3",
3
+ "version": "0.1.0-alpha.22",
4
+ "sourceCommit": "dce51686ee04e242bc8638c3cdd598686c8750a4",
5
5
  "platform": "darwin-x64",
6
6
  "toolchain": {
7
7
  "rust": "1.98.1"
@@ -10,12 +10,17 @@
10
10
  "files": {
11
11
  "LICENSE": "39100788d88143503514bc617369f1d1c7c0265c3f8742171e6af9701b0511b0",
12
12
  "NOTICE": "303c748c7c9ad22fc09cb4e5fcfa3347b0de8b59d379ae53a436c97c4f911786",
13
- "default-plugins.json": "4703d6744ff1b2ae094970ff9658786eb3bbca653ec3328f8aa2cf34ec389f46",
14
- "bin/dimcode": "d42f9a4e03c6093372ebed14937523ae6f8544a18fbd6418db74a3891cdda2cd",
15
- "licenses/RUST-THIRD-PARTY-NOTICES.txt": "58643c0cc3818bc1ba15c62fe3e6b16e8a908e71b91035edb2ee0a17590178d2",
13
+ "default-plugins.json": "4d90c0d68a81c2fe2a28918af76868db241c151288b62ec23b8e31ede2ed422e",
14
+ "bin/dimcode": "f382903f43a1e30d11f8c9edf9a0fc231051147553eb665e7880412bfd93e39f",
15
+ "licenses/RUST-THIRD-PARTY-NOTICES.txt": "ac22d515989656990cf0c6810a91e46a7286818faf36d1884dbeed7d33406e91",
16
16
  "licenses/aimux/LICENSE": "39100788d88143503514bc617369f1d1c7c0265c3f8742171e6af9701b0511b0",
17
17
  "licenses/grok-build/LICENSE": "116f7778b9802e569b7fa3a532b17bd80eb13c67837def01eed093d4ea472f28",
18
18
  "licenses/grok-build/NOTICE": "8db60f5ffc55a9845974915b1c5bfc7804a9b531ee0ffc6af786b3c0031c71e0",
19
+ "plugins/light-ocr/dim-plugin.json": "34e6f9b774e5ce1e0249a703a8bf5939aaabc9f3ec1c86a99e326bfa554ac25f",
20
+ "plugins/light-ocr/helper.cjs": "538f89d8976f5ae6435d75fb3a53565b1413f53dcb4f8b776b5501f022386216",
21
+ "plugins/light-ocr/index.ts": "6c138acac7fe2a3ca9e714ba9b9b50576711ec23ff4b278c351371507f4edfe7",
22
+ "plugins/light-ocr/package-lock.json": "7f0f49d031025c3be67ad88108af0530902f7dd0d63e163f725947c351fe1e23",
23
+ "plugins/light-ocr/package.json": "707bbae3a8a59cb62778ed9c2bd900e6effc0544fb19939bd776c8c50aa4b94b",
19
24
  "plugins/plugin-authoring/dim-plugin.json": "d43d6bd83f3b8ac05192f3ec8cadfe39500ccd541af336108ad1504c14f6ded8",
20
25
  "licenses/grok-build/xai-ratatui-inline/NOTICE": "0b2ba5c4dcc49e4e17be08fe2980968fc7bce31e41ad5af09bb80097f61483dd",
21
26
  "licenses/grok-build/xai-ratatui-textarea/NOTICE": "5d310dde613653911ea026b5cb66367600f5a704d299fa0afedbf1d3efd5d493",