promise-try.mjs
sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd
feat(calendar): enforce agent context tiers in retrieval AP…
Human
minor
⚠ breaking
1 day ago
| 1 | /** |
| 2 | * PDF.js (via unpdf) uses Promise.try (ES2024). Node 20 does not implement it; bridge/CI use Node 20. |
| 3 | * The standard signature is `Promise.try(fn, ...args)` and invokes `fn` with `args` (e.g. worker |
| 4 | * `Promise.try(handler, e.data)`). A no-arg `fn => resolve(fn())` polyfill breaks PDF import in CI. |
| 5 | * @see https://github.com/tc39/proposal-promise-try |
| 6 | */ |
| 7 | if (typeof Promise.try !== 'function') { |
| 8 | Promise.try = (fn, ...args) => { |
| 9 | try { |
| 10 | return Promise.resolve(fn.call(undefined, ...args)); |
| 11 | } catch (e) { |
| 12 | return Promise.reject(e); |
| 13 | } |
| 14 | }; |
| 15 | } |
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
1 day ago