{"_id":"@apollo-music/dsh-file-reader","_rev":"5-5131817a18f9b55b6aad83aa0b369095","name":"@apollo-music/dsh-file-reader","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"name":"@apollo-music/dsh-file-reader","version":"0.1.0","license":"UNLICENSED","_id":"@apollo-music/dsh-file-reader@0.1.0","maintainers":[{"name":"djagger","email":"634750802@qq.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"daae1bfccddafd4aed727a2f5b511f6dc98858e9","tarball":"https://registry.npmjs.org/@apollo-music/dsh-file-reader/-/dsh-file-reader-0.1.0.tgz","fileCount":66,"integrity":"sha512-KSFl9hG9rnDm0qrk+LaJ9G1z20PEzyqrZixJdA9tSsG0KWy7gQ5rU+qDG+ZhqCAzHPMbBzyVnSvh3Hy+PaGGbw==","signatures":[{"sig":"MEUCIBOIvfi1ILcmYggPz0wDYVkiOk+QP8/C+09mX+ZX+vQkAiEAgqsnqAxVehPXWZLypf7TSEqHsRBSmii2+ILR4EvSGyo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":274526},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.0.0 <25"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./document-analysis-skill.md":"./skills/document-analysis/SKILL.md"},"scripts":{"test":"vitest run --config vitest.config.ts","build":"npm run clean && tsc -p tsconfig.json","clean":"node scripts/clean.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test:package":"npm run build && node scripts/verify-package.mjs","test:sidecar":"PYTHONPATH=sidecar python3 -m unittest discover -s sidecar/tests -p 'test_*.py'"},"_npmUser":{"name":"djagger","email":"634750802@qq.com"},"_npmVersion":"11.13.0","description":"Session-scoped document reader bundle for DeepSeek Harness","directories":{},"_nodeVersion":"24.17.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-llm":"0.1.0-rc.7","@deepseek-ai/dsh-agent":"0.1.0-rc.7","@deepseek-ai/dsh-tools":"0.1.0-rc.7","@deepseek-ai/dsh-session":"0.1.0-rc.7","@deepseek-ai/dsh-subagent":"0.1.0-rc.7","@deepseek-ai/dsh-attachment":"0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-llm":"0.1.0-rc.7","@deepseek-ai/dsh-agent":"0.1.0-rc.7","@deepseek-ai/dsh-tools":"0.1.0-rc.7","@deepseek-ai/dsh-session":"0.1.0-rc.7","@deepseek-ai/dsh-subagent":"0.1.0-rc.7","@deepseek-ai/dsh-attachment":"0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"0.1.0-rc.7"},"_npmOperationalInternal":{"tmp":"tmp/dsh-file-reader_0.1.0_1787028501730_0.4434191799682883","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@apollo-music/dsh-file-reader","version":"0.2.0","license":"UNLICENSED","_id":"@apollo-music/dsh-file-reader@0.2.0","maintainers":[{"name":"djagger","email":"634750802@qq.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"9e2a1794753bd5b8cdcfef90d4f5dc3cc81fd4db","tarball":"https://registry.npmjs.org/@apollo-music/dsh-file-reader/-/dsh-file-reader-0.2.0.tgz","fileCount":73,"integrity":"sha512-NVUUjcHZXfzODGX5l+xQNQEcjSYLYIA+M9KL/Vi2gzHzy8F3Sv+1zP2ywBz+Zbweww4IdeEtFgBCNg7jPhkgiQ==","signatures":[{"sig":"MEUCIQCGGe9yiwf3qJGLnVYjOt/qJlI6O1Yj3MBzvYzvm12gOQIgCDo7gAbGLHqA+SW9Gr4tP0eRTp3SLrnb33WBq655New=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":323984},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.0.0 <25"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./document-analysis-skill.md":"./skills/document-analysis/SKILL.md"},"scripts":{"test":"vitest run --config vitest.config.ts","build":"npm run clean && tsc -p tsconfig.json","clean":"node scripts/clean.mjs","test:oci":"npm run build && node scripts/test-oci-isolation.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test:package":"npm run build && node scripts/verify-package.mjs","test:sidecar":"PYTHONPATH=sidecar python3 -m unittest discover -s sidecar/tests -p 'test_*.py'"},"_npmUser":{"name":"djagger","email":"634750802@qq.com"},"_npmVersion":"11.13.0","description":"Session-scoped document reader bundle for DeepSeek Harness","directories":{},"_nodeVersion":"24.17.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-llm":"0.1.0-rc.7","@deepseek-ai/dsh-agent":"0.1.0-rc.7","@deepseek-ai/dsh-tools":"0.1.0-rc.7","@deepseek-ai/dsh-session":"0.1.0-rc.7","@deepseek-ai/dsh-subagent":"0.1.0-rc.7","@deepseek-ai/dsh-attachment":"0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-llm":"0.1.0-rc.7","@deepseek-ai/dsh-agent":"0.1.0-rc.7","@deepseek-ai/dsh-tools":"0.1.0-rc.7","@deepseek-ai/dsh-session":"0.1.0-rc.7","@deepseek-ai/dsh-subagent":"0.1.0-rc.7","@deepseek-ai/dsh-attachment":"0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"0.1.0-rc.7"},"_npmOperationalInternal":{"tmp":"tmp/dsh-file-reader_0.2.0_1787046152284_0.5908323690305295","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@apollo-music/dsh-file-reader","version":"0.2.1","license":"UNLICENSED","_id":"@apollo-music/dsh-file-reader@0.2.1","maintainers":[{"name":"djagger","email":"634750802@qq.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"810037b078b1e1a942f472a545867dfd6a3e759e","tarball":"https://registry.npmjs.org/@apollo-music/dsh-file-reader/-/dsh-file-reader-0.2.1.tgz","fileCount":66,"integrity":"sha512-4s+IVwXe5B3IsImTVqcVhtHizUtcxcGNFvmoy4iHDEGKfbezkqDwWDbU2Qm49x7HP3HQ3LLfZ1oXeHtMvLxP0A==","signatures":[{"sig":"MEQCIEnCtOw98IzrM0VclMEbnutweQdy1BHQbhc+e/T3FI47AiAlyxQLV7GW5+GvfYMo4ClCx/lVcvjOvvXTuhjpfQxkqA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":273079},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.0.0 <25"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./document-analysis-skill.md":"./skills/document-analysis/SKILL.md"},"scripts":{"test":"vitest run --config vitest.config.ts","build":"npm run clean && tsc -p tsconfig.json","clean":"node scripts/clean.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test:parser":"PYTHONPATH=parser python3 -m unittest discover -s parser/tests -p 'test_*.py'","test:package":"npm run build && node scripts/verify-package.mjs"},"_npmUser":{"name":"djagger","email":"634750802@qq.com"},"_npmVersion":"11.6.2","description":"Session-scoped document reader bundle for DeepSeek Harness","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-llm":"0.1.0-rc.7","@deepseek-ai/dsh-agent":"0.1.0-rc.7","@deepseek-ai/dsh-tools":"0.1.0-rc.7","@deepseek-ai/dsh-session":"0.1.0-rc.7","@deepseek-ai/dsh-subagent":"0.1.0-rc.7","@deepseek-ai/dsh-attachment":"0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"0.1.0-rc.7"},"peerDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-llm":"0.1.0-rc.7","@deepseek-ai/dsh-agent":"0.1.0-rc.7","@deepseek-ai/dsh-tools":"0.1.0-rc.7","@deepseek-ai/dsh-session":"0.1.0-rc.7","@deepseek-ai/dsh-subagent":"0.1.0-rc.7","@deepseek-ai/dsh-attachment":"0.1.0-rc.7","@deepseek-ai/dsh-session-persistence":"0.1.0-rc.7"},"_npmOperationalInternal":{"tmp":"tmp/dsh-file-reader_0.2.1_1787134630451_0.10893611828508254","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@apollo-music/dsh-file-reader","version":"0.3.0","license":"UNLICENSED","_id":"@apollo-music/dsh-file-reader@0.3.0","maintainers":[{"name":"djagger","email":"634750802@qq.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"37e43b99548f2ded0bd02bd95fe1360ac9af903c","tarball":"https://registry.npmjs.org/@apollo-music/dsh-file-reader/-/dsh-file-reader-0.3.0.tgz","fileCount":66,"integrity":"sha512-O+QIDRHv74Ifhd5dLP+3W52eG5nK/OQ3YFzeH00SGiqw6C8GcIIWOGXNnDSt9VE6Q1tvFq/3jOFhSSTDrV72xA==","signatures":[{"sig":"MEUCIAatRxo2M7A9zIMGIAc4EEIBFRo3j8D/AneP6Qozu0qMAiEA7lUZqrCDW5WVn/3XvGv2uYIz5920z96bzMWHHpUlJdw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":280108},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.0.0 <25"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./document-analysis-skill.md":"./skills/document-analysis/SKILL.md"},"scripts":{"test":"vitest run --config vitest.config.ts","build":"npm run clean && tsc -p tsconfig.json","clean":"node scripts/clean.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test:parser":"PYTHONPATH=parser python3 -m unittest discover -s parser/tests -p 'test_*.py'","test:package":"npm run build && node scripts/verify-package.mjs"},"_npmUser":{"name":"djagger","email":"634750802@qq.com"},"_npmVersion":"11.6.2","description":"Session-scoped document reader bundle for DeepSeek Harness","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-llm":"0.1.0-rc.8","@deepseek-ai/dsh-agent":"0.1.0-rc.8","@deepseek-ai/dsh-tools":"0.1.0-rc.8","@deepseek-ai/dsh-session":"0.1.0-rc.8","@deepseek-ai/dsh-subagent":"0.1.0-rc.8","@deepseek-ai/dsh-attachment":"0.1.0-rc.8","@deepseek-ai/dsh-session-persistence":"0.1.0-rc.8"},"peerDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-llm":"0.1.0-rc.8","@deepseek-ai/dsh-agent":"0.1.0-rc.8","@deepseek-ai/dsh-tools":"0.1.0-rc.8","@deepseek-ai/dsh-session":"0.1.0-rc.8","@deepseek-ai/dsh-subagent":"0.1.0-rc.8","@deepseek-ai/dsh-attachment":"0.1.0-rc.8","@deepseek-ai/dsh-session-persistence":"0.1.0-rc.8"},"_npmOperationalInternal":{"tmp":"tmp/dsh-file-reader_0.3.0_1787208335786_0.0021124579192881576","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@apollo-music/dsh-file-reader","version":"0.3.1","description":"Session-scoped document reader bundle for DeepSeek Harness","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./document-analysis-skill.md":"./skills/document-analysis/SKILL.md"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"engines":{"node":">=24.0.0 <25"},"scripts":{"clean":"node scripts/clean.mjs","build":"npm run clean && tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test":"vitest run --config vitest.config.ts","test:parser":"PYTHONPATH=parser python3 -m unittest discover -s parser/tests -p 'test_*.py'","test:package":"npm run build && node scripts/verify-package.mjs"},"peerDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-attachment":"0.1.1-rc.2","@deepseek-ai/dsh-agent":"0.1.1-rc.2","@deepseek-ai/dsh-llm":"0.1.1-rc.2","@deepseek-ai/dsh-session":"0.1.1-rc.2","@deepseek-ai/dsh-session-persistence":"0.1.1-rc.2","@deepseek-ai/dsh-subagent":"0.1.1-rc.2","@deepseek-ai/dsh-tools":"0.1.1-rc.2"},"devDependencies":{"@deepseek-ai/cordis":"4.0.1","@deepseek-ai/dsh-attachment":"0.1.1-rc.2","@deepseek-ai/dsh-agent":"0.1.1-rc.2","@deepseek-ai/dsh-llm":"0.1.1-rc.2","@deepseek-ai/dsh-session":"0.1.1-rc.2","@deepseek-ai/dsh-session-persistence":"0.1.1-rc.2","@deepseek-ai/dsh-subagent":"0.1.1-rc.2","@deepseek-ai/dsh-tools":"0.1.1-rc.2"},"license":"UNLICENSED","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_id":"@apollo-music/dsh-file-reader@0.3.1","_integrity":"sha512-N21ApQJrMXSFg8XPzLZo9pxARw6H5u8BLMne15E50uBhY0ahb/DdDYCsq7eGrzbCjV8AjpbhdDQtFSBkks8oOA==","_resolved":"/private/tmp/apollo-file-reader-rc2-artifacts/apollo-music-dsh-file-reader-0.3.1.tgz","_from":"file:/private/tmp/apollo-file-reader-rc2-artifacts/apollo-music-dsh-file-reader-0.3.1.tgz","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-N21ApQJrMXSFg8XPzLZo9pxARw6H5u8BLMne15E50uBhY0ahb/DdDYCsq7eGrzbCjV8AjpbhdDQtFSBkks8oOA==","shasum":"516332a067cbb268d7779667d7a5b6fec0d410a0","tarball":"https://registry.npmjs.org/@apollo-music/dsh-file-reader/-/dsh-file-reader-0.3.1.tgz","fileCount":66,"unpackedSize":280172,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICjnpBcxOCozMsnGYGmITnsMjY6kqK2h82Kfjk5NXN/LAiEA+2vQKJs+BaruIsxHN9yyVRybAu15qu6d5NVS9lVdnFo="}]},"_npmUser":{"name":"djagger","email":"634750802@qq.com"},"directories":{},"maintainers":[{"name":"djagger","email":"634750802@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-file-reader_0.3.1_1787556389783_0.6625957434359129"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-18T04:48:21.607Z","modified":"2026-08-24T07:26:30.260Z","0.1.0":"2026-08-18T04:48:21.872Z","0.2.0":"2026-08-18T09:42:32.417Z","0.2.1":"2026-08-19T10:17:10.633Z","0.3.0":"2026-08-20T06:45:35.942Z","0.3.1":"2026-08-24T07:26:29.928Z"},"license":"UNLICENSED","description":"Session-scoped document reader bundle for DeepSeek Harness","maintainers":[{"name":"djagger","email":"634750802@qq.com"}],"readme":"# `@apollo-music/dsh-file-reader`\n\nDeepSeek Harness bundle for session-scoped, source-neutral document reading and analysis. It always exposes six reader tools: `file_reader_open`, `file_reader_outline`, `file_reader_read`, `file_reader_search`, `file_reader_render`, and `file_reader_close`. When both `ctx.fileAnalysisStore` and the DSH subagent/agent services are available, it also exposes `file_reader_analyze` and `file_reader_analysis_history`.\n\nThe model never receives host paths, parser paths, content hashes, or parser filenames. Handles are 256-bit random values bound to a DSH session and reader instance. Workspace files are realpath-checked and copied through a no-follow descriptor into a private `0700` session directory; staged files use `0600` permissions. Trusted plugins may instead supply a bounded private `ReadableStream` with provenance.\n\n## Runtime\n\nThe TypeScript bundle requires Node 24 and targets DeepSeek Harness `0.1.1-rc.2`; its DSH packages are declared as exact peer dependencies and must be upgraded together. Cordis remains pinned to `4.0.1`. Its bundled parser requires Python 3.11–3.13 and the exact versions in `parser/requirements.lock`.\n\nThe plugin launches its bundled parser directly with Python isolated mode, a minimal environment, bounded stdout/stderr, per-operation deadlines, cancellation, and process-group cleanup. The parser receives only the private staged document path and bounded operation input. No Docker socket, OCI image, registry, runner service, or external parser configuration is required.\n\nInstall the bundle into a DSH profile:\n\n```sh\ndsh plugin --profile <profile> add @apollo-music/dsh-file-reader@0.3.1\n```\n\nStatic configuration only needs to declare whether the active model route accepts image input:\n\n```yaml\n- name: @apollo-music/dsh-file-reader\n  config:\n    imageInputSupported: true\n```\n\n`imageInputSupported` must reflect the selected model route. On a text-only route, render fails with `document_capability_unavailable` and text reading remains available.\n\nLegacy `.doc`, `.xls`, and `.ppt` inputs are converted privately to DOCX, XLSX, and PPTX with LibreOffice, then use the same bounded read/search/render path as native OOXML files. The converted artifact is scoped to the document handle, validated before parsing, reused by later operations, and removed with the handle or session. If LibreOffice is absent, opening a legacy file returns `document_capability_unavailable`; native PDF, DOCX, XLSX/XLSM, and PPTX text operations remain available. Compatible Word/PowerPoint rendering also requires LibreOffice.\n\nLibreOffice must provide `soffice` or `libreoffice` on the DSH process `PATH`. Roll back by disabling or restoring the previous plugin version; Cordis disposal terminates active parser processes and removes staged and converted files.\n\n## Development\n\n```sh\nnpm run build --workspace @apollo-music/dsh-file-reader\nnpm test --workspace @apollo-music/dsh-file-reader\nnpm run test:parser --workspace @apollo-music/dsh-file-reader\nnpm run test:package --workspace @apollo-music/dsh-file-reader\n```\n\n## Analysis history provider\n\nThe package exports `FileAnalysisStoreService`, `HttpFileAnalysisStore`, and `SqliteFileAnalysisStore`. Production profiles resolve separate read/write/link credentials through `FileAnalysisCredentialProvider` and register the HTTP-backed service as `ctx.fileAnalysisStore`; DSH processes never receive a PostgreSQL connection. HTTP responses are bounded, redirects fail closed, credentials stay in headers, and provider/network errors are mapped to stable path-free errors.\n\n`SqliteFileAnalysisStore` is only for local development and protocol tests. It refuses production mode and is never an automatic fallback when the PostgreSQL-backed API is absent or unhealthy.\n\nRun creation defaults to `cachePolicy: \"prefer-cache\"`. The returned `disposition` distinguishes a new reservation, a coalesced concurrent request, an exact cache hit, and an expired lease that requires terminal reconciliation. `refresh` and `fresh` always reserve independent runs; an expired run must be completed or failed from the child terminal fact before a replacement is created.\n\n`file_reader_analyze` sends the caller's analysis input unchanged to a dedicated continuable DSH child. The child receives only a newly delegated document handle and the five non-open reader operations; the original caller handle is never shared. Trusted runtime context and bounded authorized history are injected separately from the user prompt. `DEFAULT` is the sole built-in analysis name and must be passed exactly; all other nonblank inputs are custom instructions.\n\n`prefer-cache` reuses an exact completed result, `refresh` creates a new persisted result while allowing compatible history and child continuation, and `fresh` creates a history-free, non-continuing run. The service records the run before starting the child, binds the child session as soon as it is accepted, and records a completed or failed terminal state. `file_reader_analysis_history` is scoped to an already authorized document handle; previous revisions and explicitly linked sources are opt-in.\n","readmeFilename":"README.md"}