@xrkseek/harness-cli 0.0.11 → 0.1.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/dist/plugin/install-client.d.ts.map +1 -1
- package/dist/plugin/install-client.js +80 -2
- package/dist/plugin/install-client.js.map +1 -1
- package/node_modules/@img/colour/LICENSE.md +82 -0
- package/node_modules/@img/colour/README.md +15 -0
- package/node_modules/@img/colour/color.cjs +1596 -0
- package/node_modules/@img/colour/index.cjs +1 -0
- package/node_modules/@img/colour/index.d.ts +929 -0
- package/node_modules/@img/colour/package.json +58 -0
- package/node_modules/@img/sharp-win32-x64/LICENSE +191 -0
- package/node_modules/@img/sharp-win32-x64/README.md +59 -0
- package/node_modules/@img/sharp-win32-x64/index.cjs +1 -0
- package/node_modules/@img/sharp-win32-x64/lib/libvips-42.dll +0 -0
- package/node_modules/@img/sharp-win32-x64/lib/libvips-cpp-8.18.3.dll +0 -0
- package/node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64-0.35.3.node +0 -0
- package/node_modules/@img/sharp-win32-x64/package.json +40 -0
- package/node_modules/@img/sharp-win32-x64/versions.json +30 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +111 -0
- package/node_modules/@types/node/assert.d.ts +1115 -0
- package/node_modules/@types/node/async_hooks.d.ts +623 -0
- package/node_modules/@types/node/buffer.buffer.d.ts +472 -0
- package/node_modules/@types/node/buffer.d.ts +1934 -0
- package/node_modules/@types/node/child_process.d.ts +1476 -0
- package/node_modules/@types/node/cluster.d.ts +578 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/console.d.ts +453 -0
- package/node_modules/@types/node/constants.d.ts +21 -0
- package/node_modules/@types/node/crypto.d.ts +5417 -0
- package/node_modules/@types/node/dgram.d.ts +600 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- package/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/node_modules/@types/node/dns.d.ts +923 -0
- package/node_modules/@types/node/domain.d.ts +166 -0
- package/node_modules/@types/node/events.d.ts +976 -0
- package/node_modules/@types/node/fs/promises.d.ts +1341 -0
- package/node_modules/@types/node/fs.d.ts +4714 -0
- package/node_modules/@types/node/globals.d.ts +170 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +41 -0
- package/node_modules/@types/node/http.d.ts +2154 -0
- package/node_modules/@types/node/http2.d.ts +2835 -0
- package/node_modules/@types/node/https.d.ts +585 -0
- package/node_modules/@types/node/index.d.ts +101 -0
- package/node_modules/@types/node/inspector.d.ts +277 -0
- package/node_modules/@types/node/inspector.generated.d.ts +4239 -0
- package/node_modules/@types/node/module.d.ts +843 -0
- package/node_modules/@types/node/net.d.ts +1073 -0
- package/node_modules/@types/node/os.d.ts +507 -0
- package/node_modules/@types/node/package.json +155 -0
- package/node_modules/@types/node/path.d.ts +200 -0
- package/node_modules/@types/node/perf_hooks.d.ts +1042 -0
- package/node_modules/@types/node/process.d.ts +2102 -0
- package/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/node/querystring.d.ts +152 -0
- package/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/node_modules/@types/node/readline.d.ts +600 -0
- package/node_modules/@types/node/repl.d.ts +438 -0
- package/node_modules/@types/node/sea.d.ts +162 -0
- package/node_modules/@types/node/sqlite.d.ts +1040 -0
- package/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/node_modules/@types/node/stream/web.d.ts +573 -0
- package/node_modules/@types/node/stream.d.ts +1706 -0
- package/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/test.d.ts +2349 -0
- package/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/node_modules/@types/node/timers.d.ts +285 -0
- package/node_modules/@types/node/tls.d.ts +1279 -0
- package/node_modules/@types/node/trace_events.d.ts +197 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +103 -0
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
- package/node_modules/@types/node/tty.d.ts +208 -0
- package/node_modules/@types/node/url.d.ts +1079 -0
- package/node_modules/@types/node/util.d.ts +2336 -0
- package/node_modules/@types/node/v8.d.ts +982 -0
- package/node_modules/@types/node/vm.d.ts +1195 -0
- package/node_modules/@types/node/wasi.d.ts +202 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +62 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +894 -0
- package/node_modules/@types/node/zlib.d.ts +745 -0
- package/node_modules/@xrkseek/attachment/dist/error.d.ts +3 -2
- package/node_modules/@xrkseek/attachment/dist/error.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/error.js +17 -2
- package/node_modules/@xrkseek/attachment/dist/error.js.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/index.d.ts +2 -2
- package/node_modules/@xrkseek/attachment/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/index.js +1 -1
- package/node_modules/@xrkseek/attachment/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/memory.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/memory.js +6 -0
- package/node_modules/@xrkseek/attachment/dist/memory.js.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/store.d.ts +6 -1
- package/node_modules/@xrkseek/attachment/dist/store.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/types.d.ts +19 -0
- package/node_modules/@xrkseek/attachment/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/attachment/dist/types.js.map +1 -1
- package/node_modules/@xrkseek/attachment-local/README.md +3 -0
- package/node_modules/@xrkseek/attachment-local/dist/compression-limiter.d.ts +18 -0
- package/node_modules/@xrkseek/attachment-local/dist/compression-limiter.d.ts.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/compression-limiter.js +43 -0
- package/node_modules/@xrkseek/attachment-local/dist/compression-limiter.js.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/encoding.d.ts +23 -0
- package/node_modules/@xrkseek/attachment-local/dist/encoding.d.ts.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/encoding.js +33 -0
- package/node_modules/@xrkseek/attachment-local/dist/encoding.js.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/image.d.ts +54 -0
- package/node_modules/@xrkseek/attachment-local/dist/image.d.ts.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/image.js +97 -0
- package/node_modules/@xrkseek/attachment-local/dist/image.js.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/index.d.ts +32 -0
- package/node_modules/@xrkseek/attachment-local/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/index.js +188 -0
- package/node_modules/@xrkseek/attachment-local/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/normalization.d.ts +44 -0
- package/node_modules/@xrkseek/attachment-local/dist/normalization.d.ts.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/normalization.js +148 -0
- package/node_modules/@xrkseek/attachment-local/dist/normalization.js.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/request-image.d.ts +34 -0
- package/node_modules/@xrkseek/attachment-local/dist/request-image.d.ts.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/request-image.js +208 -0
- package/node_modules/@xrkseek/attachment-local/dist/request-image.js.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/store.d.ts +58 -0
- package/node_modules/@xrkseek/attachment-local/dist/store.d.ts.map +1 -0
- package/node_modules/@xrkseek/attachment-local/dist/store.js +290 -0
- package/node_modules/@xrkseek/attachment-local/dist/store.js.map +1 -0
- package/node_modules/@xrkseek/attachment-local/package.json +25 -0
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts +3 -0
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.js +10 -0
- package/node_modules/@xrkseek/exec-fs/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/read-image.d.ts +35 -0
- package/node_modules/@xrkseek/exec-fs/dist/read-image.d.ts.map +1 -0
- package/node_modules/@xrkseek/exec-fs/dist/read-image.js +120 -0
- package/node_modules/@xrkseek/exec-fs/dist/read-image.js.map +1 -0
- package/node_modules/@xrkseek/exec-fs/package.json +3 -1
- package/node_modules/@xrkseek/llm/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/llm/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/README.md +3 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/file-id.d.ts +10 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/file-id.d.ts.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/file-id.js +8 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/file-id.js.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/file-store.d.ts +40 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/file-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/file-store.js +164 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/file-store.js.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/files-api.d.ts +56 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/files-api.d.ts.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/files-api.js +180 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/files-api.js.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/index.d.ts +15 -6
- package/node_modules/@xrkseek/llm-deepseek/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/index.js +63 -13
- package/node_modules/@xrkseek/llm-deepseek/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/request-policy.d.ts +8 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/request-policy.d.ts.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/request-policy.js +12 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/request-policy.js.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/upload-index.d.ts +28 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/upload-index.d.ts.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/upload-index.js +142 -0
- package/node_modules/@xrkseek/llm-deepseek/dist/upload-index.js.map +1 -0
- package/node_modules/@xrkseek/llm-deepseek/package.json +3 -1
- package/node_modules/@xrkseek/llm-openai-compatible/dist/index.d.ts +27 -0
- package/node_modules/@xrkseek/llm-openai-compatible/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-openai-compatible/dist/index.js +20 -5
- package/node_modules/@xrkseek/llm-openai-compatible/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/registry.d.ts +1 -0
- package/node_modules/@xrkseek/llm-registry/dist/registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/registry.js +15 -1
- package/node_modules/@xrkseek/llm-registry/dist/registry.js.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +5 -0
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.js +10 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-harness/package.json +1 -0
- package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.js +3 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/protocol/dist/content.d.ts +5 -0
- package/node_modules/@xrkseek/protocol/dist/content.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/content.js +8 -1
- package/node_modules/@xrkseek/protocol/dist/content.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/context.d.ts +6 -3
- package/node_modules/@xrkseek/server-face/dist/context.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/cordis-bridge.d.ts +9 -0
- package/node_modules/@xrkseek/server-face/dist/cordis-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cordis-bridge.js +28 -0
- package/node_modules/@xrkseek/server-face/dist/cordis-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-balance.d.ts +16 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-balance.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-balance.js +141 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-balance.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-coding-plan-service.d.ts +13 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-coding-plan-service.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-coding-plan-service.js +158 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-coding-plan-service.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-coding-plans.d.ts +284 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-coding-plans.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-coding-plans.js +696 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-coding-plans.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-custom-balance.d.ts +15 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-custom-balance.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-custom-balance.js +196 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-custom-balance.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-go-quota.d.ts +19 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-go-quota.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-go-quota.js +143 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-go-quota.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-pricing.d.ts +16 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-pricing.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-pricing.js +84 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-pricing.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-record.d.ts +19 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-record.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-record.js +221 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-record.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-store.d.ts +133 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-store.js +561 -0
- package/node_modules/@xrkseek/server-face/dist/cost-meter-store.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/dispatch.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/dispatch.js +15 -0
- package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/cordis-stub.d.ts +0 -5
- package/node_modules/@xrkseek/server-face/dist/handlers/cordis-stub.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/cordis-stub.js +277 -24
- package/node_modules/@xrkseek/server-face/dist/handlers/cordis-stub.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/cost-meter.d.ts +30 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/cost-meter.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/cost-meter.js +48 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/cost-meter.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/references.d.ts +6 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/references.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/references.js +42 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/references.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/staged-client-code.d.ts +6 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/staged-client-code.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/staged-client-code.js +24 -0
- package/node_modules/@xrkseek/server-face/dist/handlers/staged-client-code.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/index.d.ts +1 -0
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js +1 -0
- package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/llm-resolve.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/llm-resolve.js +5 -3
- package/node_modules/@xrkseek/server-face/dist/llm-resolve.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/plugin-inventory.d.ts +2 -2
- package/node_modules/@xrkseek/server-face/dist/plugin-inventory.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/plugin-inventory.js +7 -3
- package/node_modules/@xrkseek/server-face/dist/plugin-inventory.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.js +2 -0
- package/node_modules/@xrkseek/server-face/dist/projections/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/install-defaults.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/install-defaults.js +12 -0
- package/node_modules/@xrkseek/server-face/dist/projections/install-defaults.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/registry.d.ts +45 -0
- package/node_modules/@xrkseek/server-face/dist/projections/registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/registry.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/auto-review.d.ts +40 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/auto-review.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/auto-review.js +103 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/auto-review.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-headers.d.ts +9 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-headers.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-headers.js +24 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-headers.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts +37 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js +109 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-timeline.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.d.ts +35 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.js +151 -0
- package/node_modules/@xrkseek/server-face/dist/projections/units/cost-usage.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/reference-discovery.d.ts +13 -0
- package/node_modules/@xrkseek/server-face/dist/reference-discovery.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/reference-discovery.js +81 -0
- package/node_modules/@xrkseek/server-face/dist/reference-discovery.js.map +1 -0
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts +5 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.js +25 -0
- package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts +15 -0
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-credentials.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/slash.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/slash.js +19 -0
- package/node_modules/@xrkseek/server-face/dist/slash.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/paths.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/wire/paths.js +3 -0
- package/node_modules/@xrkseek/server-face/dist/wire/paths.js.map +1 -1
- package/node_modules/@xrkseek/server-face/package.json +3 -0
- package/node_modules/@xrkseek/server-host/dist/auto-review-bridge.d.ts +4 -0
- package/node_modules/@xrkseek/server-host/dist/auto-review-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/auto-review-bridge.js +10 -0
- package/node_modules/@xrkseek/server-host/dist/auto-review-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/cost-meter-bridge.d.ts +11 -0
- package/node_modules/@xrkseek/server-host/dist/cost-meter-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/cost-meter-bridge.js +29 -0
- package/node_modules/@xrkseek/server-host/dist/cost-meter-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/harness-connector-bridge.d.ts +15 -0
- package/node_modules/@xrkseek/server-host/dist/harness-connector-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/harness-connector-bridge.js +34 -0
- package/node_modules/@xrkseek/server-host/dist/harness-connector-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/index.d.ts +6 -1
- package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.js +126 -19
- package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.d.ts +17 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.js +201 -0
- package/node_modules/@xrkseek/server-host/dist/sidebar-pty.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/usage-stats-bridge.d.ts +10 -0
- package/node_modules/@xrkseek/server-host/dist/usage-stats-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/usage-stats-bridge.js +31 -0
- package/node_modules/@xrkseek/server-host/dist/usage-stats-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/wallet-bridge.d.ts +7 -0
- package/node_modules/@xrkseek/server-host/dist/wallet-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-host/dist/wallet-bridge.js +40 -0
- package/node_modules/@xrkseek/server-host/dist/wallet-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-host/package.json +8 -1
- package/node_modules/@xrkseek/server-http/dist/boot-inject.d.ts +12 -0
- package/node_modules/@xrkseek/server-http/dist/boot-inject.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/boot-inject.js +54 -0
- package/node_modules/@xrkseek/server-http/dist/boot-inject.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-compose.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-compose.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-compose.js +141 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-compose.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.d.ts +3 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js +445 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-providers.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-registry.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-registry.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-registry.js +15 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-registry.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts +57 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.js +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapter-types.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapters/builtin.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapters/builtin.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapters/builtin.js +275 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/adapters/builtin.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.js +41 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/audit-community-client.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.d.ts +17 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.js +184 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/auto-review-http.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/barrel.d.ts +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/barrel.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/barrel.js +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/barrel.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/bundle-chunk-stub.d.ts +21 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/bundle-chunk-stub.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/bundle-chunk-stub.js +122 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/bundle-chunk-stub.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.js +58 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/chat-import.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.js +59 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/community-root-http.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-fiber-runner.d.ts +25 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-fiber-runner.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-fiber-runner.js +154 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-fiber-runner.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-fiber-worker.d.ts +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-fiber-worker.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-fiber-worker.js +77 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-fiber-worker.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.d.ts +16 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.js +121 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-registry.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-settings-fallback.d.ts +12 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-settings-fallback.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-settings-fallback.js +48 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/cordis-settings-fallback.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/create-host-plugin.d.ts +18 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/create-host-plugin.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/create-host-plugin.js +62 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/create-host-plugin.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dream-skin.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dream-skin.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dream-skin.js +42 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dream-skin.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.js +88 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-client-scan.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-community-infer.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-community-infer.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-community-infer.js +67 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-community-infer.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.d.ts +18 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js +198 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-matrix.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-upgrades.d.ts +27 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-upgrades.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-upgrades.js +71 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-compat-upgrades.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-envelope.d.ts +8 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-envelope.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-envelope.js +12 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-envelope.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-package-names.d.ts +2 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-package-names.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-package-names.js +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-package-names.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-path-capabilities.d.ts +22 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-path-capabilities.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-path-capabilities.js +219 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-path-capabilities.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-plugin-presets.d.ts +4 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-plugin-presets.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-plugin-presets.js +53 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/dsh-plugin-presets.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.js +61 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-dsh-http.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js +150 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/generic-plugin-http.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui.js +239 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/genui.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/harness-connector-store.d.ts +22 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/harness-connector-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/harness-connector-store.js +83 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/harness-connector-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/harness-connector.d.ts +18 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/harness-connector.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/harness-connector.js +191 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/harness-connector.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-envelope.d.ts +21 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-envelope.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-envelope.js +105 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-envelope.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.js +57 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/honest-http-catchall.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-apply-bridge.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-apply-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-apply-bridge.js +74 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-apply-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-apply-registry.d.ts +14 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-apply-registry.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-apply-registry.js +17 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-apply-registry.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-feature-bridge.d.ts +76 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-feature-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-feature-bridge.js +551 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-feature-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-manifest.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-manifest.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-manifest.js +136 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/host-manifest.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-channels.d.ts +21 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-channels.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-channels.js +281 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-channels.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-messaging-bridge.d.ts +16 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-messaging-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-messaging-bridge.js +163 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-messaging-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-office.d.ts +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-office.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-office.js +125 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-office.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-provision-bridge.d.ts +17 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-provision-bridge.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-provision-bridge.js +188 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-provision-bridge.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-rpc-adapter.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-rpc-adapter.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-rpc-adapter.js +55 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/im-rpc-adapter.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts +37 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js +36 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/index.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/json-store.d.ts +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/json-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/json-store.js +28 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/json-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market-adapter.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market-adapter.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market-adapter.js +108 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market-adapter.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.js +218 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/market.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memento.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memento.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memento.js +81 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/memento.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/meta.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/meta.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/meta.js +15 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/meta.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-adapter.d.ts +8 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-adapter.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-adapter.js +83 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-adapter.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-shapes.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-shapes.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-shapes.js +144 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-shapes.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.d.ts +17 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.js +52 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.js +221 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mnemon.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts +22 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js +155 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/mobile-access.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.d.ts +14 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.js +213 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modlens.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modsearch.d.ts +14 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modsearch.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modsearch.js +200 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/modsearch.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.js +200 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/noema.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/persisted-settings-store.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/persisted-settings-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/persisted-settings-store.js +47 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/persisted-settings-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/plugin-host-manifest.d.ts +15 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/plugin-host-manifest.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/plugin-host-manifest.js +132 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/plugin-host-manifest.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/plugin-surface-adapter.d.ts +13 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/plugin-surface-adapter.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/plugin-surface-adapter.js +336 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/plugin-surface-adapter.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket.js +86 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/pocket.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/releases.d.ts +8 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/releases.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/releases.js +34 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/releases.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.d.ts +4 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.js +170 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-defaults.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.d.ts +33 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.js +108 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/settings-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/shared-registry.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/shared-registry.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/shared-registry.js +38 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/shared-registry.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-adapter.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-adapter.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-adapter.js +358 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-adapter.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-git.d.ts +25 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-git.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-git.js +78 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-git.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-prefs-store.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-prefs-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-prefs-store.js +56 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/sidebar-prefs-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.js +106 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/skin-market.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/surface-registry.d.ts +18 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/surface-registry.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/surface-registry.js +240 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/surface-registry.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/surfaces.d.ts +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/surfaces.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/surfaces.js +78 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/surfaces.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tokenledger.d.ts +42 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tokenledger.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tokenledger.js +117 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tokenledger.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-node-runtime.d.ts +11 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-node-runtime.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-node-runtime.js +111 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow-node-runtime.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.d.ts +16 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.js +455 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/tongflow.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-store.d.ts +26 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-store.js +22 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-workspace.d.ts +12 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-workspace.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-workspace.js +123 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind-workspace.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind.d.ts +16 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind.js +99 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/turn-rewind.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/contracts/wallet-port.d.ts +106 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/contracts/wallet-port.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/contracts/wallet-port.js +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/contracts/wallet-port.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/doc-store.d.ts +14 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/doc-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/doc-store.js +21 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/doc-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-kit.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-kit.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-kit.js +22 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/http-kit.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.d.ts +22 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.js +13 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/index.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/wallet-service.d.ts +21 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/wallet-service.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/wallet-service.js +190 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/underlying/wallet-service.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/undo.d.ts +10 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/undo.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/undo.js +438 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/undo.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/usage-stats.d.ts +8 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/usage-stats.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/usage-stats.js +69 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/usage-stats.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-adapter.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-adapter.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-adapter.js +62 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-adapter.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-defaults.d.ts +5 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-defaults.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-defaults.js +17 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-defaults.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-router-adapter.d.ts +7 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-router-adapter.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-router-adapter.js +67 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision-router-adapter.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision.d.ts +12 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision.js +198 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/vision.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallet.d.ts +15 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallet.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallet.js +111 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallet.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.js +161 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wallpaper.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/settings-provider.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/settings-provider.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/settings-provider.js +31 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/settings-provider.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.js +103 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/wire/stub-handlers.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-host-apply.d.ts +49 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-host-apply.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-host-apply.js +190 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-host-apply.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-json-store.d.ts +9 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-json-store.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-json-store.js +44 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat/xrk-json-store.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat.d.ts +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat.js +6 -0
- package/node_modules/@xrkseek/server-http/dist/dsh-compat.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/host-wire.d.ts +14 -0
- package/node_modules/@xrkseek/server-http/dist/host-wire.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/host-wire.js +15 -0
- package/node_modules/@xrkseek/server-http/dist/host-wire.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/http-json.d.ts +12 -0
- package/node_modules/@xrkseek/server-http/dist/http-json.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/http-json.js +40 -0
- package/node_modules/@xrkseek/server-http/dist/http-json.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/index.d.ts +12 -1
- package/node_modules/@xrkseek/server-http/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/index.js +12 -1
- package/node_modules/@xrkseek/server-http/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-http/dist/public-routes.d.ts +19 -0
- package/node_modules/@xrkseek/server-http/dist/public-routes.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/public-routes.js +34 -0
- package/node_modules/@xrkseek/server-http/dist/public-routes.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.d.ts +13 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.js +58 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-mutate.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-routes.d.ts +16 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-routes.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-routes.js +49 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-routes.js.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-services.d.ts +35 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-services.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-services.js +103 -0
- package/node_modules/@xrkseek/server-http/dist/xrk/plugin-services.js.map +1 -0
- package/node_modules/@xrkseek/server-http/package.json +2 -1
- package/node_modules/@xrkseek/server-loader/dist/host.d.ts +6 -0
- package/node_modules/@xrkseek/server-loader/dist/host.d.ts.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/host.js +11 -0
- package/node_modules/@xrkseek/server-loader/dist/host.js.map +1 -0
- package/node_modules/@xrkseek/server-loader/dist/index.d.ts +2 -1
- package/node_modules/@xrkseek/server-loader/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/index.js +1 -0
- package/node_modules/@xrkseek/server-loader/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/kinds.d.ts +5 -0
- package/node_modules/@xrkseek/server-loader/dist/kinds.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/kinds.js +5 -0
- package/node_modules/@xrkseek/server-loader/dist/kinds.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/load.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/load.js +5 -0
- package/node_modules/@xrkseek/server-loader/dist/load.js.map +1 -1
- package/node_modules/@xrkseek/server-loader/dist/types.d.ts +40 -0
- package/node_modules/@xrkseek/server-loader/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/xrk-file-reference/README.i18n.yaml +6 -0
- package/node_modules/@xrkseek/xrk-file-reference/README.md +22 -0
- package/node_modules/@xrkseek/xrk-file-reference/README.zh.md +22 -0
- package/node_modules/@xrkseek/xrk-file-reference/package.json +68 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/README.i18n.yaml +6 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/README.md +45 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/README.zh.md +45 -0
- package/node_modules/@xrkseek/xrk-file-reference-local/package.json +56 -0
- package/node_modules/@xrkseek/xrk-session-reference/README.i18n.yaml +6 -0
- package/node_modules/@xrkseek/xrk-session-reference/README.md +50 -0
- package/node_modules/@xrkseek/xrk-session-reference/README.zh.md +50 -0
- package/node_modules/@xrkseek/xrk-session-reference/package.json +79 -0
- package/node_modules/detect-libc/LICENSE +201 -0
- package/node_modules/detect-libc/README.md +163 -0
- package/node_modules/detect-libc/index.d.ts +14 -0
- package/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/node_modules/detect-libc/lib/elf.js +39 -0
- package/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/node_modules/detect-libc/lib/process.js +24 -0
- package/node_modules/detect-libc/package.json +44 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +577 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/sharp/LICENSE +191 -0
- package/node_modules/sharp/README.md +112 -0
- package/node_modules/sharp/dist/channel.cjs +177 -0
- package/node_modules/sharp/dist/channel.mjs +177 -0
- package/node_modules/sharp/dist/colour.cjs +199 -0
- package/node_modules/sharp/dist/colour.mjs +199 -0
- package/node_modules/sharp/dist/composite.cjs +213 -0
- package/node_modules/sharp/dist/composite.mjs +213 -0
- package/node_modules/sharp/dist/constructor.cjs +511 -0
- package/node_modules/sharp/dist/constructor.mjs +511 -0
- package/node_modules/sharp/dist/index.cjs +25 -0
- package/node_modules/sharp/dist/index.d.cts +1999 -0
- package/node_modules/sharp/dist/index.d.mts +2046 -0
- package/node_modules/sharp/dist/index.mjs +25 -0
- package/node_modules/sharp/dist/input.cjs +814 -0
- package/node_modules/sharp/dist/input.mjs +814 -0
- package/node_modules/sharp/dist/is.cjs +143 -0
- package/node_modules/sharp/dist/is.mjs +143 -0
- package/node_modules/sharp/dist/libvips.cjs +212 -0
- package/node_modules/sharp/dist/libvips.mjs +212 -0
- package/node_modules/sharp/dist/operation.cjs +998 -0
- package/node_modules/sharp/dist/operation.mjs +998 -0
- package/node_modules/sharp/dist/output.cjs +1788 -0
- package/node_modules/sharp/dist/output.mjs +1788 -0
- package/node_modules/sharp/dist/resize.cjs +617 -0
- package/node_modules/sharp/dist/resize.mjs +617 -0
- package/node_modules/sharp/dist/sharp.cjs +174 -0
- package/node_modules/sharp/dist/sharp.mjs +174 -0
- package/node_modules/sharp/dist/utility.cjs +301 -0
- package/node_modules/sharp/dist/utility.mjs +301 -0
- package/node_modules/sharp/install/build.js +38 -0
- package/node_modules/sharp/lib/index.d.ts +1999 -0
- package/node_modules/sharp/package.json +227 -0
- package/node_modules/sharp/src/binding.gyp +303 -0
- package/node_modules/sharp/src/common.cc +1183 -0
- package/node_modules/sharp/src/common.h +421 -0
- package/node_modules/sharp/src/metadata.cc +404 -0
- package/node_modules/sharp/src/metadata.h +95 -0
- package/node_modules/sharp/src/operations.cc +516 -0
- package/node_modules/sharp/src/operations.h +137 -0
- package/node_modules/sharp/src/pipeline.cc +1948 -0
- package/node_modules/sharp/src/pipeline.h +422 -0
- package/node_modules/sharp/src/sharp.cc +43 -0
- package/node_modules/sharp/src/stats.cc +186 -0
- package/node_modules/sharp/src/stats.h +62 -0
- package/node_modules/sharp/src/utilities.cc +289 -0
- package/node_modules/sharp/src/utilities.h +22 -0
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +32 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +30 -0
- package/node_modules/undici-types/cache-interceptor.d.ts +173 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +108 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +30 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/node_modules/undici-types/dispatcher.d.ts +276 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici-types/errors.d.ts +161 -0
- package/node_modules/undici-types/eventsource.d.ts +66 -0
- package/node_modules/undici-types/fetch.d.ts +211 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +15 -0
- package/node_modules/undici-types/header.d.ts +160 -0
- package/node_modules/undici-types/index.d.ts +88 -0
- package/node_modules/undici-types/interceptors.d.ts +73 -0
- package/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +27 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +29 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +41 -0
- package/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/node_modules/undici-types/readable.d.ts +68 -0
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +341 -0
- package/node_modules/undici-types/websocket.d.ts +186 -0
- package/package.json +23 -1
- package/product-web/assets/{index-CSGf6Qzd.css → index-C0u-TtQQ.css} +1 -1
- package/product-web/assets/index-CHKZdZNt.js +112 -0
- package/product-web/assets/index-CHKZdZNt.js.map +1 -0
- package/product-web/assets/langs/{php-DY2VakOf.js → php-9bx0az3O.js} +2 -2
- package/product-web/assets/langs/{php-DY2VakOf.js.map → php-9bx0az3O.js.map} +1 -1
- package/product-web/assets/langs/{ruby-hwtoiFmS.js → ruby-HDLHRjSL.js} +2 -2
- package/product-web/assets/langs/{ruby-hwtoiFmS.js.map → ruby-HDLHRjSL.js.map} +1 -1
- package/product-web/assets/{vendor-CldRVjca.js → vendor-CeMKrCZm.js} +36 -35
- package/product-web/assets/vendor-CeMKrCZm.js.map +1 -0
- package/product-web/boot.json +20 -1
- package/product-web/index.html +3 -3
- package/product-web/plugins/@xrkseek/client-modules/client.js +83 -12
- package/product-web/plugins/@xrkseek/client-runtime/client.js +1 -37
- package/product-web/plugins/@xrkseek/client-ui-agent-preset/client.js +39 -39
- package/product-web/plugins/@xrkseek/client-ui-attachment/client.js +782 -0
- package/product-web/plugins/@xrkseek/client-ui-commands/client.js +7 -7
- package/product-web/plugins/@xrkseek/client-ui-conversation/client.js +965 -561
- package/product-web/plugins/@xrkseek/client-ui-deliverables/client.js +4 -4
- package/product-web/plugins/@xrkseek/client-ui-directory-picker-browse/client.js +24 -24
- package/product-web/plugins/@xrkseek/client-ui-goal/client.js +8 -8
- package/product-web/plugins/@xrkseek/client-ui-input-trigger/client.js +83 -27
- package/product-web/plugins/@xrkseek/client-ui-jobs/client.js +9 -9
- package/product-web/plugins/@xrkseek/client-ui-layout/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-message-feedback/client.js +4 -4
- package/product-web/plugins/@xrkseek/client-ui-model-selection/client.js +15 -15
- package/product-web/plugins/@xrkseek/client-ui-permission-presets/client.js +2 -2
- package/product-web/plugins/@xrkseek/client-ui-plan/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-reference/client.js +148 -0
- package/product-web/plugins/@xrkseek/client-ui-settings-general/client.js +13 -13
- package/product-web/plugins/@xrkseek/client-ui-settings-models/client.js +56 -56
- package/product-web/plugins/@xrkseek/client-ui-settings-plugin-inventory/client.js +12 -12
- package/product-web/plugins/@xrkseek/client-ui-settings-plugins/client.js +43 -43
- package/product-web/plugins/@xrkseek/client-ui-sidebar/client.js +14 -14
- package/product-web/plugins/@xrkseek/client-ui-skill/client.js +11 -11
- package/product-web/plugins/@xrkseek/client-ui-subagent/client.js +289 -157
- package/product-web/plugins/@xrkseek/client-ui-theme/client.js +4 -4
- package/product-web/plugins/@xrkseek/client-ui-tool/client.js +33 -33
- package/product-web/plugins/@xrkseek/client-ui-trajectory/client.js +144 -165
- package/product-web/plugins/@xrkseek/client-ui-user-questions/client.js +26 -26
- package/product-web/plugins/@xrkseek/client-ui-workflow-run/client.js +15 -15
- package/product-web/plugins/@xrkseek/client-ui-workspace/client.js +54 -54
- package/product-web/plugins/@xrkseek/xrk-api-remotes/client.js +20 -1
- package/product-web/assets/index-CcF0Sxxg.js +0 -297
- package/product-web/assets/index-CcF0Sxxg.js.map +0 -1
- package/product-web/assets/vendor-CldRVjca.js.map +0 -1
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/** Deterministic cached image versions for model requests. */
|
|
2
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
3
|
+
import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import sharp, {} from 'sharp';
|
|
6
|
+
import { AttachmentError } from '@xrkseek/attachment';
|
|
7
|
+
import { hasLowColourCount } from './normalization.js';
|
|
8
|
+
import { encodeFirstWithinLimit, isExhaustedEncoding } from './encoding.js';
|
|
9
|
+
import { detectImage, encodedAlphaIsCompatible, probeImage } from './image.js';
|
|
10
|
+
/** Transform version included in every cache and upload-index identity. */
|
|
11
|
+
export const REQUEST_IMAGE_TRANSFORM_VERSION = 'request-image-v4';
|
|
12
|
+
/** DeepSeek request versions normally fit at these two preferred qualities. */
|
|
13
|
+
export const REQUEST_IMAGE_QUALITIES = [85, 80];
|
|
14
|
+
function digest(value) {
|
|
15
|
+
return createHash('sha256').update(value).digest('hex');
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Compute aspect-preserving integer dimensions within a hard total-pixel budget.
|
|
19
|
+
* @param width - positive source width.
|
|
20
|
+
* @param height - positive source height.
|
|
21
|
+
* @param maxPixels - positive width-times-height cap.
|
|
22
|
+
* @returns inward-rounded dimensions; small images are not enlarged.
|
|
23
|
+
*/
|
|
24
|
+
export function requestImageDimensions(width, height, maxPixels) {
|
|
25
|
+
const scale = Math.min(1, Math.sqrt(maxPixels / (width * height)));
|
|
26
|
+
if (scale === 1)
|
|
27
|
+
return { width, height };
|
|
28
|
+
if (width >= height) {
|
|
29
|
+
let projectedWidth = Math.max(1, Math.floor(width * scale));
|
|
30
|
+
let projectedHeight = Math.max(1, Math.round(projectedWidth * height / width));
|
|
31
|
+
while (projectedWidth * projectedHeight > maxPixels && projectedWidth > 1) {
|
|
32
|
+
projectedWidth -= 1;
|
|
33
|
+
projectedHeight = Math.max(1, Math.round(projectedWidth * height / width));
|
|
34
|
+
}
|
|
35
|
+
return { width: projectedWidth, height: projectedHeight };
|
|
36
|
+
}
|
|
37
|
+
let projectedHeight = Math.max(1, Math.floor(height * scale));
|
|
38
|
+
let projectedWidth = Math.max(1, Math.round(projectedHeight * width / height));
|
|
39
|
+
while (projectedWidth * projectedHeight > maxPixels && projectedHeight > 1) {
|
|
40
|
+
projectedHeight -= 1;
|
|
41
|
+
projectedWidth = Math.max(1, Math.round(projectedHeight * width / height));
|
|
42
|
+
}
|
|
43
|
+
return { width: projectedWidth, height: projectedHeight };
|
|
44
|
+
}
|
|
45
|
+
function checkedInteger(value, name) {
|
|
46
|
+
if (!Number.isSafeInteger(value) || value <= 0) {
|
|
47
|
+
throw new AttachmentError(`${name} must be a positive integer.`, 'INVALID_ATTACHMENT_REF');
|
|
48
|
+
}
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
function validatePolicy(policy) {
|
|
52
|
+
checkedInteger(policy.maxPixels, 'Image request maxPixels');
|
|
53
|
+
checkedInteger(policy.maxBytes, 'Image request maxBytes');
|
|
54
|
+
}
|
|
55
|
+
function descriptor(attachment, policy) {
|
|
56
|
+
return JSON.stringify({
|
|
57
|
+
transformVersion: REQUEST_IMAGE_TRANSFORM_VERSION,
|
|
58
|
+
attachmentId: attachment.attachmentId,
|
|
59
|
+
routePixelBudget: policy.maxPixels,
|
|
60
|
+
encodedByteBudget: policy.maxBytes,
|
|
61
|
+
encoding: {
|
|
62
|
+
png: { compressionLevel: 9, palette: 'opaque-only' },
|
|
63
|
+
webpQualities: REQUEST_IMAGE_QUALITIES,
|
|
64
|
+
jpegQualities: REQUEST_IMAGE_QUALITIES,
|
|
65
|
+
order: ['low-colour:png-webp', 'alpha:webp', 'opaque:jpeg'],
|
|
66
|
+
colourspace: 'srgb',
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Complete deterministic identity for one attachment and route-owned request policy.
|
|
72
|
+
* @param attachment - provider-independent durable normalized attachment reference.
|
|
73
|
+
* @param policy - route-owned pixel and byte policy.
|
|
74
|
+
* @returns branded digest over every request transform input.
|
|
75
|
+
*/
|
|
76
|
+
export function requestImageVariantId(attachment, policy) {
|
|
77
|
+
return `sha256:${digest(descriptor(attachment, policy))}`;
|
|
78
|
+
}
|
|
79
|
+
function pipeline(attachment, width, height) {
|
|
80
|
+
return sourcePipeline(attachment)
|
|
81
|
+
.resize({ width, height, fit: 'inside', withoutEnlargement: true });
|
|
82
|
+
}
|
|
83
|
+
function sourcePipeline(attachment) {
|
|
84
|
+
return sharp(attachment.data, { failOn: 'error', limitInputPixels: false }).toColourspace('srgb');
|
|
85
|
+
}
|
|
86
|
+
async function encoded(image, mediaType, quality, palette = true) {
|
|
87
|
+
const output = mediaType === 'image/png'
|
|
88
|
+
? image.png({ compressionLevel: 9, palette })
|
|
89
|
+
: mediaType === 'image/webp'
|
|
90
|
+
? image.webp({ quality })
|
|
91
|
+
: image.jpeg({ quality });
|
|
92
|
+
const { data, info } = await output.toBuffer({ resolveWithObject: true });
|
|
93
|
+
return { data: new Uint8Array(data), mediaType, width: info.width, height: info.height };
|
|
94
|
+
}
|
|
95
|
+
function encodingAttempts(attachment, width, height, hasAlpha, lowColour) {
|
|
96
|
+
const prepared = pipeline(attachment, width, height);
|
|
97
|
+
const webp = REQUEST_IMAGE_QUALITIES.map(quality => (() => encoded(prepared.clone(), 'image/webp', quality)));
|
|
98
|
+
if (lowColour)
|
|
99
|
+
return [() => encoded(prepared.clone(), 'image/png', undefined, !hasAlpha), ...webp];
|
|
100
|
+
if (hasAlpha)
|
|
101
|
+
return webp;
|
|
102
|
+
return REQUEST_IMAGE_QUALITIES.map(quality => (() => encoded(prepared.clone(), 'image/jpeg', quality)));
|
|
103
|
+
}
|
|
104
|
+
async function createRequestImage(attachment, policy, hasAlpha) {
|
|
105
|
+
let dimensions = requestImageDimensions(attachment.ref.width, attachment.ref.height, policy.maxPixels);
|
|
106
|
+
if (dimensions.width === attachment.ref.width
|
|
107
|
+
&& dimensions.height === attachment.ref.height
|
|
108
|
+
&& attachment.data.byteLength <= policy.maxBytes) {
|
|
109
|
+
return {
|
|
110
|
+
data: attachment.data,
|
|
111
|
+
mediaType: attachment.ref.mediaType,
|
|
112
|
+
width: attachment.ref.width,
|
|
113
|
+
height: attachment.ref.height,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const lowColour = await hasLowColourCount(sourcePipeline(attachment));
|
|
117
|
+
for (;;) {
|
|
118
|
+
const encodedVersion = await encodeFirstWithinLimit(encodingAttempts(attachment, dimensions.width, dimensions.height, hasAlpha, lowColour), policy.maxBytes);
|
|
119
|
+
if (!isExhaustedEncoding(encodedVersion))
|
|
120
|
+
return encodedVersion;
|
|
121
|
+
if (dimensions.width === 1 && dimensions.height === 1)
|
|
122
|
+
break;
|
|
123
|
+
const scale = Math.min(0.9, Math.sqrt(policy.maxBytes / encodedVersion.smallest.data.byteLength) * 0.95);
|
|
124
|
+
dimensions = {
|
|
125
|
+
width: Math.max(1, Math.floor(dimensions.width * scale)),
|
|
126
|
+
height: Math.max(1, Math.floor(dimensions.height * scale)),
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
throw new AttachmentError('Image cannot be encoded within the model-request byte budget.', 'IMAGE_TOO_LARGE');
|
|
130
|
+
}
|
|
131
|
+
function cachePath(root, hash) {
|
|
132
|
+
return join(root, 'request-images', hash.slice(0, 2), hash);
|
|
133
|
+
}
|
|
134
|
+
async function readCached(path, attachment, policy, expectedAlpha, signal) {
|
|
135
|
+
try {
|
|
136
|
+
const data = new Uint8Array(await readFile(path, { signal }));
|
|
137
|
+
const detected = await probeImage(data);
|
|
138
|
+
const maximum = requestImageDimensions(attachment.ref.width, attachment.ref.height, policy.maxPixels);
|
|
139
|
+
if (data.byteLength > policy.maxBytes || detected.depth !== 'uchar' || detected.space !== 'srgb'
|
|
140
|
+
|| detected.width > maximum.width || detected.height > maximum.height
|
|
141
|
+
|| !encodedAlphaIsCompatible(expectedAlpha, detected))
|
|
142
|
+
return undefined;
|
|
143
|
+
return { data, mediaType: detected.mediaType, width: detected.width, height: detected.height, hasAlpha: detected.hasAlpha };
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
if (error?.code === 'ENOENT')
|
|
147
|
+
return undefined;
|
|
148
|
+
signal?.throwIfAborted();
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
async function verifyRequestImage(image, expectedAlpha) {
|
|
153
|
+
const detected = await detectImage(image.data);
|
|
154
|
+
if (detected.depth !== 'uchar' || detected.space !== 'srgb'
|
|
155
|
+
|| detected.width !== image.width || detected.height !== image.height
|
|
156
|
+
|| detected.mediaType !== image.mediaType || !encodedAlphaIsCompatible(expectedAlpha, detected)) {
|
|
157
|
+
throw new AttachmentError('Encoded model-request image does not match its verified 8-bit sRGB metadata.', 'ATTACHMENT_WRITE_FAILED');
|
|
158
|
+
}
|
|
159
|
+
return { ...image, hasAlpha: detected.hasAlpha };
|
|
160
|
+
}
|
|
161
|
+
async function writeCached(path, data) {
|
|
162
|
+
await mkdir(dirname(path), { recursive: true, mode: 0o700 });
|
|
163
|
+
const temporary = `${path}.${randomUUID()}.tmp`;
|
|
164
|
+
try {
|
|
165
|
+
await writeFile(temporary, data, { mode: 0o600, flag: 'wx' });
|
|
166
|
+
await rename(temporary, path);
|
|
167
|
+
}
|
|
168
|
+
finally {
|
|
169
|
+
await rm(temporary, { force: true });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Generate or reuse one request image below the local attachment root.
|
|
174
|
+
* @param root - absolute versioned attachment storage root.
|
|
175
|
+
* @param attachment - verified normalized attachment bytes and reference.
|
|
176
|
+
* @param policy - exact route request-image policy.
|
|
177
|
+
* @param signal - optional cancellation for cache I/O and image transformation.
|
|
178
|
+
* @returns verified request bytes and deterministic variant identity.
|
|
179
|
+
*/
|
|
180
|
+
export async function readRequestImageFile(root, attachment, policy, signal) {
|
|
181
|
+
signal?.throwIfAborted();
|
|
182
|
+
validatePolicy(policy);
|
|
183
|
+
const source = await probeImage(attachment.data);
|
|
184
|
+
const variantId = requestImageVariantId(attachment.ref, policy);
|
|
185
|
+
const hash = String(variantId).slice('sha256:'.length);
|
|
186
|
+
const path = cachePath(root, hash);
|
|
187
|
+
const cached = await readCached(path, attachment, policy, source.hasAlpha, signal);
|
|
188
|
+
const created = cached ?? await createRequestImage(attachment, policy, source.hasAlpha);
|
|
189
|
+
const version = cached ?? (created.data === attachment.data
|
|
190
|
+
? { ...created, hasAlpha: source.hasAlpha }
|
|
191
|
+
: await verifyRequestImage(created, source.hasAlpha));
|
|
192
|
+
signal?.throwIfAborted();
|
|
193
|
+
if (cached === undefined && version.data !== attachment.data)
|
|
194
|
+
await writeCached(path, version.data);
|
|
195
|
+
return {
|
|
196
|
+
variantId,
|
|
197
|
+
attachment: attachment.ref,
|
|
198
|
+
data: version.data,
|
|
199
|
+
mediaType: version.mediaType,
|
|
200
|
+
bytes: version.data.byteLength,
|
|
201
|
+
width: version.width,
|
|
202
|
+
height: version.height,
|
|
203
|
+
depth: 'uchar',
|
|
204
|
+
space: 'srgb',
|
|
205
|
+
hasAlpha: version.hasAlpha,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL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;IACtD,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAClC,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;IAClF,MAAM,OAAO,GAAG,MAAM,IAAI,MAAM,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAA;IACvF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI;QACzD,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;QAC3C,CAAC,CAAC,MAAM,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;IACvD,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,IAAI,MAAM,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI;QAAE,MAAM,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;IACnG,OAAO;QACL,SAAS;QACT,UAAU,EAAE,UAAU,CAAC,GAAG;QAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU;QAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC3B,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** Content-addressed, owner-private local attachment storage. */
|
|
2
|
+
import type { ImageAttachmentLimits, ImageAttachmentRef, SaveImageAttachment, StoredImageAttachment } from '@xrkseek/attachment';
|
|
3
|
+
import type { NormalizationPolicy } from './normalization.js';
|
|
4
|
+
/**
|
|
5
|
+
* Run the full admission policy for one image without touching storage,
|
|
6
|
+
* including normalization: a batch whose members all validate cannot later
|
|
7
|
+
* be refused by the normalized image byte cap during publication.
|
|
8
|
+
* @param input - encoded bytes and declared metadata.
|
|
9
|
+
* @param limits - resolved source admission policy.
|
|
10
|
+
* @param policy - resolved normalization policy.
|
|
11
|
+
* @returns completion after the raster has been decoded and its normalized version proven to fit.
|
|
12
|
+
*/
|
|
13
|
+
export declare function validateImageFile(input: SaveImageAttachment, limits: ImageAttachmentLimits, policy: NormalizationPolicy): Promise<void>;
|
|
14
|
+
/** Fully prepared normalized object, verified before any batch member is persisted. */
|
|
15
|
+
export interface PreparedImageFile {
|
|
16
|
+
/** Deterministic normalized bytes whose digest is {@link ref.attachmentId}. */
|
|
17
|
+
data: Uint8Array;
|
|
18
|
+
/** Durable reference describing {@link data}. */
|
|
19
|
+
ref: ImageAttachmentRef;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Decode, normalize, and verify one submitted image without touching storage.
|
|
23
|
+
* @param input - submitted encoded bytes and declared media type.
|
|
24
|
+
* @param limits - source admission policy.
|
|
25
|
+
* @param policy - independent normalization policy.
|
|
26
|
+
* @returns immutable reference facts beside bytes ready for atomic publication.
|
|
27
|
+
*/
|
|
28
|
+
export declare function prepareImageFile(input: SaveImageAttachment, limits: ImageAttachmentLimits, policy: NormalizationPolicy): Promise<PreparedImageFile>;
|
|
29
|
+
/**
|
|
30
|
+
* Publish one already verified normalized image below a versioned attachment root.
|
|
31
|
+
* @param root - absolute `DSH_HOME/attachments/v1` root.
|
|
32
|
+
* @param prepared - deterministic normalized bytes and reference.
|
|
33
|
+
* @returns durable content-addressed normalized image reference.
|
|
34
|
+
*/
|
|
35
|
+
export declare function commitPreparedImageFile(root: string, prepared: PreparedImageFile): Promise<ImageAttachmentRef>;
|
|
36
|
+
/**
|
|
37
|
+
* Decode and normalize one image once, then publish the prepared object.
|
|
38
|
+
* @param root - absolute `DSH_HOME/attachments/v1` root.
|
|
39
|
+
* @param input - submitted encoded bytes and declared media type.
|
|
40
|
+
* @param limits - resolved source admission policy.
|
|
41
|
+
* @param policy - resolved normalization policy.
|
|
42
|
+
* @returns durable content-addressed normalized image reference.
|
|
43
|
+
*/
|
|
44
|
+
export declare function saveImageFile(root: string, input: SaveImageAttachment, limits: ImageAttachmentLimits, policy: NormalizationPolicy): Promise<ImageAttachmentRef>;
|
|
45
|
+
/**
|
|
46
|
+
* Read and verify one content-addressed image.
|
|
47
|
+
* @param root - absolute `DSH_HOME/attachments/v1` root.
|
|
48
|
+
* @param ref - reference recorded in the session log.
|
|
49
|
+
* @param signal - optional cancellation for filesystem and verification work.
|
|
50
|
+
* @returns verified bytes and reference.
|
|
51
|
+
* @throws the signal reason when aborted, or an AttachmentError when verification fails.
|
|
52
|
+
*/
|
|
53
|
+
export declare function readImageFile(root: string, ref: ImageAttachmentRef, signal?: AbortSignal): Promise<StoredImageAttachment>;
|
|
54
|
+
/**
|
|
55
|
+
* Read by opaque attachment id when session metadata is not available.
|
|
56
|
+
*/
|
|
57
|
+
export declare function readImageByAttachmentId(root: string, attachmentId: string, signal?: AbortSignal): Promise<StoredImageAttachment>;
|
|
58
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,iEAAiE;AAOjE,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AA+C7D;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,uFAAuF;AACvF,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,IAAI,EAAE,UAAU,CAAA;IAChB,iDAAiD;IACjD,GAAG,EAAE,kBAAkB,CAAA;CACxB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAqB5B;AA6DD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,iBAAiB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,CAuD7B;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,mBAAmB,EAC1B,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,CAE7B;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,kBAAkB,EACvB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAuBhC;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAwChC"}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/** Content-addressed, owner-private local attachment storage. */
|
|
2
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
3
|
+
import { constants } from 'node:fs';
|
|
4
|
+
import { chmod, link, mkdir, open, readFile, unlink } from 'node:fs/promises';
|
|
5
|
+
import { dirname, join, parse, resolve } from 'node:path';
|
|
6
|
+
import { AttachmentError } from '@xrkseek/attachment';
|
|
7
|
+
import { normalizeImage } from './normalization.js';
|
|
8
|
+
import { detectImage, probeImage } from './image.js';
|
|
9
|
+
const ID_PATTERN = /^sha256:([a-f0-9]{64})$/;
|
|
10
|
+
const durableHomes = new Set();
|
|
11
|
+
function digest(data) {
|
|
12
|
+
return createHash('sha256').update(data).digest('hex');
|
|
13
|
+
}
|
|
14
|
+
function displayName(value) {
|
|
15
|
+
if (value === undefined)
|
|
16
|
+
return undefined;
|
|
17
|
+
// Strip both separator styles by hand: a POSIX host treats `\` as an
|
|
18
|
+
// ordinary character, so path.basename would keep a Windows client's full
|
|
19
|
+
// local path and leak it into the reference and the session log.
|
|
20
|
+
const leaf = value.slice(Math.max(value.lastIndexOf('/'), value.lastIndexOf('\\')) + 1);
|
|
21
|
+
const clean = leaf.replace(/[\u0000-\u001f\u007f]/g, '').trim().slice(0, 255);
|
|
22
|
+
return clean === '' ? undefined : clean;
|
|
23
|
+
}
|
|
24
|
+
function objectPath(root, sha256) {
|
|
25
|
+
return join(root, 'objects', sha256.slice(0, 2), sha256);
|
|
26
|
+
}
|
|
27
|
+
function ensureReference(ref) {
|
|
28
|
+
const match = ID_PATTERN.exec(String(ref.attachmentId));
|
|
29
|
+
if (match?.[1] === undefined)
|
|
30
|
+
throw new AttachmentError('Attachment reference is invalid.', 'INVALID_ATTACHMENT_REF');
|
|
31
|
+
return match[1];
|
|
32
|
+
}
|
|
33
|
+
async function inspectMetadata(data, declaredMediaType, limits) {
|
|
34
|
+
if (data.byteLength === 0)
|
|
35
|
+
throw new AttachmentError('Image is empty.', 'INVALID_IMAGE');
|
|
36
|
+
const detected = await detectImage(data, {
|
|
37
|
+
maxPixels: limits.maxImagePixels,
|
|
38
|
+
...(limits.maxImageDimension !== undefined
|
|
39
|
+
? { maxDimension: limits.maxImageDimension }
|
|
40
|
+
: {}),
|
|
41
|
+
});
|
|
42
|
+
if (detected.mediaType !== declaredMediaType)
|
|
43
|
+
throw new AttachmentError('Declared image type does not match its bytes.', 'IMAGE_TYPE_MISMATCH');
|
|
44
|
+
return detected;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Run the full admission policy for one image without touching storage,
|
|
48
|
+
* including normalization: a batch whose members all validate cannot later
|
|
49
|
+
* be refused by the normalized image byte cap during publication.
|
|
50
|
+
* @param input - encoded bytes and declared metadata.
|
|
51
|
+
* @param limits - resolved source admission policy.
|
|
52
|
+
* @param policy - resolved normalization policy.
|
|
53
|
+
* @returns completion after the raster has been decoded and its normalized version proven to fit.
|
|
54
|
+
*/
|
|
55
|
+
export async function validateImageFile(input, limits, policy) {
|
|
56
|
+
await prepareImageFile(input, limits, policy);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Decode, normalize, and verify one submitted image without touching storage.
|
|
60
|
+
* @param input - submitted encoded bytes and declared media type.
|
|
61
|
+
* @param limits - source admission policy.
|
|
62
|
+
* @param policy - independent normalization policy.
|
|
63
|
+
* @returns immutable reference facts beside bytes ready for atomic publication.
|
|
64
|
+
*/
|
|
65
|
+
export async function prepareImageFile(input, limits, policy) {
|
|
66
|
+
if (input.data.byteLength > limits.maxImageBytes) {
|
|
67
|
+
throw new AttachmentError('Image exceeds the configured byte limit.', 'IMAGE_TOO_LARGE');
|
|
68
|
+
}
|
|
69
|
+
const detected = await inspectMetadata(input.data, input.mediaType, limits);
|
|
70
|
+
const normalized = await normalizeImage(input.data, detected, policy);
|
|
71
|
+
const sha256 = digest(normalized.data);
|
|
72
|
+
const name = displayName(input.name);
|
|
73
|
+
const downscaled = detected.width !== normalized.width || detected.height !== normalized.height;
|
|
74
|
+
return {
|
|
75
|
+
data: normalized.data,
|
|
76
|
+
ref: {
|
|
77
|
+
attachmentId: `sha256:${sha256}`,
|
|
78
|
+
mediaType: normalized.mediaType,
|
|
79
|
+
width: normalized.width,
|
|
80
|
+
height: normalized.height,
|
|
81
|
+
bytes: normalized.data.byteLength,
|
|
82
|
+
...(name !== undefined ? { name } : {}),
|
|
83
|
+
...downscaled ? { originalDimensions: { width: detected.width, height: detected.height } } : {},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Make a directory's entries durable (fsync on a read-only directory handle).
|
|
89
|
+
* A synced file alone does not survive a crash when its directory entry never
|
|
90
|
+
* reached storage, so the publication directory is synced before a durable
|
|
91
|
+
* reference is reported.
|
|
92
|
+
*/
|
|
93
|
+
async function syncDirectory(path) {
|
|
94
|
+
/* v8 ignore next -- Windows cannot open directory handles; NTFS metadata journaling owns entry durability there. */
|
|
95
|
+
if (process.platform === 'win32')
|
|
96
|
+
return;
|
|
97
|
+
/* v8 ignore start -- Windows cannot exercise directory fsync; POSIX behavior tests enforce this peer. */
|
|
98
|
+
const handle = await open(path, constants.O_RDONLY);
|
|
99
|
+
try {
|
|
100
|
+
await handle.sync();
|
|
101
|
+
}
|
|
102
|
+
finally {
|
|
103
|
+
await handle.close();
|
|
104
|
+
}
|
|
105
|
+
/* v8 ignore stop */
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Create one private directory tree and persist every ancestor entry up to a
|
|
109
|
+
* caller-vouched durable boundary. The walk deliberately ignores what mkdir
|
|
110
|
+
* reports as newly created: a concurrent first save can create a level this
|
|
111
|
+
* process then merely observes, so "already existed" is not "already durable"
|
|
112
|
+
* �?the entry may still be unsynced in the creator, and a crash would drop a
|
|
113
|
+
* directory the session checkpoint already references. Re-syncing a durable
|
|
114
|
+
* entry is harmless; skipping an unsynced one is not.
|
|
115
|
+
* @param path - absolute directory to create.
|
|
116
|
+
* @param boundary - absolute ancestor the caller vouches is already durable.
|
|
117
|
+
*/
|
|
118
|
+
async function ensureDurableDirectory(path, boundary) {
|
|
119
|
+
const target = resolve(path);
|
|
120
|
+
const stop = resolve(boundary);
|
|
121
|
+
await mkdir(target, { recursive: true, mode: 0o700 });
|
|
122
|
+
await chmod(target, 0o700);
|
|
123
|
+
let level = target;
|
|
124
|
+
while (level !== stop) {
|
|
125
|
+
const parent = dirname(level);
|
|
126
|
+
await syncDirectory(parent);
|
|
127
|
+
/* v8 ignore next -- filesystem-root guard: callers pass a boundary that is an ancestor of path, so the walk reaches it first. */
|
|
128
|
+
if (parent === level)
|
|
129
|
+
return;
|
|
130
|
+
level = parent;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Establish this process's proof that one DSH_HOME entry and every ancestor
|
|
135
|
+
* below the filesystem root are durable. Mere existence is insufficient: a
|
|
136
|
+
* concurrent process may have created the directory but not synced its parent.
|
|
137
|
+
*/
|
|
138
|
+
async function ensureDurableHome(path) {
|
|
139
|
+
const home = resolve(path);
|
|
140
|
+
if (!durableHomes.has(home)) {
|
|
141
|
+
await ensureDurableDirectory(home, parse(home).root);
|
|
142
|
+
durableHomes.add(home);
|
|
143
|
+
}
|
|
144
|
+
return home;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Publish one already verified normalized image below a versioned attachment root.
|
|
148
|
+
* @param root - absolute `DSH_HOME/attachments/v1` root.
|
|
149
|
+
* @param prepared - deterministic normalized bytes and reference.
|
|
150
|
+
* @returns durable content-addressed normalized image reference.
|
|
151
|
+
*/
|
|
152
|
+
export async function commitPreparedImageFile(root, prepared) {
|
|
153
|
+
const normalized = prepared.data;
|
|
154
|
+
const sha256 = ensureReference(prepared.ref);
|
|
155
|
+
if (digest(normalized) !== sha256 || normalized.byteLength !== prepared.ref.bytes) {
|
|
156
|
+
throw new AttachmentError('Prepared attachment bytes do not match their reference.', 'ATTACHMENT_CORRUPT');
|
|
157
|
+
}
|
|
158
|
+
const bucket = join(root, 'objects', sha256.slice(0, 2));
|
|
159
|
+
const staging = join(root, 'tmp');
|
|
160
|
+
// Establish DSH_HOME itself against the filesystem root once per process.
|
|
161
|
+
// Every process performs that proof independently, so observing a directory
|
|
162
|
+
// another process created can never be mistaken for durable publication.
|
|
163
|
+
const boundary = await ensureDurableHome(dirname(dirname(resolve(root))));
|
|
164
|
+
await ensureDurableDirectory(bucket, boundary);
|
|
165
|
+
await ensureDurableDirectory(staging, boundary);
|
|
166
|
+
const temporary = join(staging, randomUUID());
|
|
167
|
+
const target = objectPath(root, sha256);
|
|
168
|
+
let handle;
|
|
169
|
+
try {
|
|
170
|
+
handle = await open(temporary, constants.O_CREAT | constants.O_EXCL | constants.O_WRONLY, 0o600);
|
|
171
|
+
await handle.writeFile(normalized);
|
|
172
|
+
await handle.sync();
|
|
173
|
+
await handle.close();
|
|
174
|
+
handle = undefined;
|
|
175
|
+
try {
|
|
176
|
+
await link(temporary, target);
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
/* v8 ignore next -- Private same-filesystem directories make EEXIST the only recoverable link race. */
|
|
180
|
+
if (!(error instanceof Error && 'code' in error && error.code === 'EEXIST'))
|
|
181
|
+
throw error;
|
|
182
|
+
const existing = new Uint8Array(await readFile(target));
|
|
183
|
+
if (digest(existing) !== sha256)
|
|
184
|
+
throw new AttachmentError('Stored attachment failed integrity verification.', 'ATTACHMENT_CORRUPT');
|
|
185
|
+
}
|
|
186
|
+
// Persist the target entry and close a concurrent bucket-creation window
|
|
187
|
+
// before the reference can reach a session checkpoint. The dedup path
|
|
188
|
+
// repeats both syncs because it may observe another writer's link before
|
|
189
|
+
// that writer reaches its own durability boundary.
|
|
190
|
+
await syncDirectory(bucket);
|
|
191
|
+
await syncDirectory(join(root, 'objects'));
|
|
192
|
+
await unlink(temporary);
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
/* v8 ignore next -- A descriptor can remain open only when the underlying write/sync/close operation fails. */
|
|
196
|
+
if (handle !== undefined)
|
|
197
|
+
await handle.close().catch(
|
|
198
|
+
/* v8 ignore next -- Close failure is superseded by the storage operation that entered cleanup. */
|
|
199
|
+
() => { });
|
|
200
|
+
await unlink(temporary).catch(
|
|
201
|
+
/* v8 ignore next -- The callback requires a second independent staging-unlink failure. */
|
|
202
|
+
(cleanupError) => {
|
|
203
|
+
/* v8 ignore next -- Cleanup is best-effort only for a staging file already removed by a failed operation. */
|
|
204
|
+
if (!(cleanupError instanceof Error && 'code' in cleanupError && cleanupError.code === 'ENOENT'))
|
|
205
|
+
throw cleanupError;
|
|
206
|
+
});
|
|
207
|
+
if (error instanceof AttachmentError)
|
|
208
|
+
throw error;
|
|
209
|
+
throw new AttachmentError('Unable to persist image attachment.', 'ATTACHMENT_WRITE_FAILED', { cause: error });
|
|
210
|
+
}
|
|
211
|
+
return prepared.ref;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Decode and normalize one image once, then publish the prepared object.
|
|
215
|
+
* @param root - absolute `DSH_HOME/attachments/v1` root.
|
|
216
|
+
* @param input - submitted encoded bytes and declared media type.
|
|
217
|
+
* @param limits - resolved source admission policy.
|
|
218
|
+
* @param policy - resolved normalization policy.
|
|
219
|
+
* @returns durable content-addressed normalized image reference.
|
|
220
|
+
*/
|
|
221
|
+
export async function saveImageFile(root, input, limits, policy) {
|
|
222
|
+
return commitPreparedImageFile(root, await prepareImageFile(input, limits, policy));
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Read and verify one content-addressed image.
|
|
226
|
+
* @param root - absolute `DSH_HOME/attachments/v1` root.
|
|
227
|
+
* @param ref - reference recorded in the session log.
|
|
228
|
+
* @param signal - optional cancellation for filesystem and verification work.
|
|
229
|
+
* @returns verified bytes and reference.
|
|
230
|
+
* @throws the signal reason when aborted, or an AttachmentError when verification fails.
|
|
231
|
+
*/
|
|
232
|
+
export async function readImageFile(root, ref, signal) {
|
|
233
|
+
signal?.throwIfAborted();
|
|
234
|
+
const sha256 = ensureReference(ref);
|
|
235
|
+
let data;
|
|
236
|
+
try {
|
|
237
|
+
data = new Uint8Array(await readFile(objectPath(root, sha256), { signal }));
|
|
238
|
+
}
|
|
239
|
+
catch (error) {
|
|
240
|
+
signal?.throwIfAborted();
|
|
241
|
+
if (error instanceof Error && 'code' in error && error.code === 'ENOENT')
|
|
242
|
+
throw new AttachmentError('Attachment object is missing.', 'ATTACHMENT_NOT_FOUND');
|
|
243
|
+
throw new AttachmentError('Unable to read image attachment.', 'ATTACHMENT_READ_FAILED', { cause: error });
|
|
244
|
+
}
|
|
245
|
+
signal?.throwIfAborted();
|
|
246
|
+
if (digest(data) !== sha256)
|
|
247
|
+
throw new AttachmentError('Stored attachment failed integrity verification.', 'ATTACHMENT_CORRUPT');
|
|
248
|
+
// The digest proves these are the exact bytes admission fully decoded, so
|
|
249
|
+
// the read path only re-derives the header fields (no raster decode, no
|
|
250
|
+
// per-request pixel amplification on history replay).
|
|
251
|
+
const metadata = await probeImage(data);
|
|
252
|
+
signal?.throwIfAborted();
|
|
253
|
+
if (metadata.mediaType !== ref.mediaType || data.byteLength !== ref.bytes
|
|
254
|
+
|| metadata.width !== ref.width || metadata.height !== ref.height) {
|
|
255
|
+
throw new AttachmentError('Stored attachment metadata does not match its reference.', 'ATTACHMENT_CORRUPT');
|
|
256
|
+
}
|
|
257
|
+
return { ref, data };
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Read by opaque attachment id when session metadata is not available.
|
|
261
|
+
*/
|
|
262
|
+
export async function readImageByAttachmentId(root, attachmentId, signal) {
|
|
263
|
+
const match = ID_PATTERN.exec(attachmentId);
|
|
264
|
+
if (match?.[1] === undefined) {
|
|
265
|
+
throw new AttachmentError("Attachment reference is invalid.", "INVALID_ATTACHMENT_REF");
|
|
266
|
+
}
|
|
267
|
+
let data;
|
|
268
|
+
try {
|
|
269
|
+
data = new Uint8Array(await readFile(objectPath(root, match[1]), { signal }));
|
|
270
|
+
}
|
|
271
|
+
catch (error) {
|
|
272
|
+
signal?.throwIfAborted();
|
|
273
|
+
if (error instanceof Error &&
|
|
274
|
+
"code" in error &&
|
|
275
|
+
error.code === "ENOENT") {
|
|
276
|
+
throw new AttachmentError("Attachment object is missing.", "ATTACHMENT_NOT_FOUND");
|
|
277
|
+
}
|
|
278
|
+
throw new AttachmentError("Unable to read image attachment.", "ATTACHMENT_READ_FAILED", { cause: error });
|
|
279
|
+
}
|
|
280
|
+
const metadata = await probeImage(data);
|
|
281
|
+
const ref = {
|
|
282
|
+
attachmentId,
|
|
283
|
+
mediaType: metadata.mediaType,
|
|
284
|
+
bytes: data.byteLength,
|
|
285
|
+
width: metadata.width,
|
|
286
|
+
height: metadata.height,
|
|
287
|
+
};
|
|
288
|
+
return readImageFile(root, ref, signal);
|
|
289
|
+
}
|
|
290
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,iEAAiE;AAEjE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAOrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAGpD,MAAM,UAAU,GAAG,yBAAyB,CAAA;AAC5C,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAA;AAEtC,SAAS,MAAM,CAAC,IAAgB;IAC9B,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACxD,CAAC;AAED,SAAS,WAAW,CAAC,KAAyB;IAC5C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACzC,qEAAqE;IACrE,0EAA0E;IAC1E,i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ek/attachment-local",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": ["dist", "README.md"],
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@xrkseek/attachment": "workspace:*",
|
|
15
|
+
"@xrkseek/protocol": "workspace:*",
|
|
16
|
+
"sharp": "^0.35.3"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/xrkseek/XRK-harness.git",
|
|
22
|
+
"directory": "packages/attachment-local"
|
|
23
|
+
},
|
|
24
|
+
"private": true
|
|
25
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ToolDefinition } from "@xrkseek/core-tools";
|
|
2
2
|
import { type FsGlobOptions, type FsGrepHit, type FsGrepOptions } from "./search.js";
|
|
3
3
|
export { PathEscapeError, resolveWithinRoot } from "./paths.js";
|
|
4
|
+
export { createReadImageTool, formatImageReadOutput, imageMediaTypeForPath, type CreateReadImageToolOptions, type ImageReadValue, type ReadImageFs, } from "./read-image.js";
|
|
4
5
|
export { globToRegExp, matchGlob, type FsGlobOptions, type FsGrepHit, type FsGrepOptions, } from "./search.js";
|
|
5
6
|
export { langFromPath, presentEditCall, presentEditResult, presentGlobCall, presentGlobResult, presentGrepCall, presentGrepResult, presentReadCall, presentReadResult, presentWriteCall, presentWriteResult, } from "./present.js";
|
|
6
7
|
export declare class EditWithoutOldError extends Error {
|
|
@@ -24,6 +25,8 @@ export interface FsService {
|
|
|
24
25
|
readonly root: string;
|
|
25
26
|
resolvePath(userPath: string): string;
|
|
26
27
|
read(userPath: string, maxBytes?: number): Promise<FsReadResult>;
|
|
28
|
+
/** Read raw bytes (binary files, images). */
|
|
29
|
+
readBytes(userPath: string, maxBytes?: number): Promise<Uint8Array>;
|
|
27
30
|
write(userPath: string, content: string): Promise<void>;
|
|
28
31
|
/** Replace only when on-disk content matches `oldContent`. */
|
|
29
32
|
edit(userPath: string, oldContent: string, newContent: string): Promise<void>;
|