hub-import-zip-shim.mjs
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd
feat(calendar): enforce agent context tiers in retrieval AP…
Human
minor
⚠ breaking
1 day ago
| 1 | /** |
| 2 | * Loads with Hub UI after global JSZip (UMD). Exposes one namespace for `hub.js`. |
| 3 | */ |
| 4 | import { |
| 5 | buildImportZipBlobWithJsZip, |
| 6 | DEFAULT_HUB_IMPORT_ZIP_LIMITS, |
| 7 | getHubImportFileMode, |
| 8 | HUB_IMPORT_SEQUENTIAL_MULTI_SOURCE_TYPES, |
| 9 | HUB_IMPORT_ZIP_BULK_SOURCE_TYPES, |
| 10 | assertSingleFileWithinLimit, |
| 11 | } from './hub-client-import-zip.mjs'; |
| 12 | |
| 13 | function getJSZipCtor() { |
| 14 | const C = globalThis.JSZip; |
| 15 | if (typeof C !== 'function') { |
| 16 | throw new Error('JSZip is not loaded. Expected script before hub-import-zip-shim.mjs.'); |
| 17 | } |
| 18 | return C; |
| 19 | } |
| 20 | |
| 21 | const knowtationHubImportZip = { |
| 22 | get limits() { |
| 23 | return DEFAULT_HUB_IMPORT_ZIP_LIMITS; |
| 24 | }, |
| 25 | HUB_IMPORT_SEQUENTIAL_MULTI_SOURCE_TYPES, |
| 26 | HUB_IMPORT_ZIP_BULK_SOURCE_TYPES, |
| 27 | getHubImportFileMode, |
| 28 | buildImportZipBlob: (fileList, opts) => |
| 29 | buildImportZipBlobWithJsZip(getJSZipCtor(), fileList, DEFAULT_HUB_IMPORT_ZIP_LIMITS, opts), |
| 30 | assertSingleFileWithinLimit: (f) => assertSingleFileWithinLimit(f, DEFAULT_HUB_IMPORT_ZIP_LIMITS), |
| 31 | }; |
| 32 | |
| 33 | Object.defineProperty(globalThis, 'knowtationHubImportZip', { |
| 34 | value: knowtationHubImportZip, |
| 35 | enumerable: true, |
| 36 | configurable: true, |
| 37 | }); |
| 38 | |
| 39 | export { knowtationHubImportZip }; |
File History
2 commits
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd
feat(calendar): enforce agent context tiers in retrieval AP…
Human
minor
⚠
1 day ago
sha256:9103f98c89257ed2b01c237cea895dabb3e85ea337dccb1161c175e4422355b6
docs: accept Calendar Events v0 spec with Phase 0 security …
Human
2 days ago