@allyhub/sdk 0.8.0 → 0.9.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/CHANGELOG.md +11 -0
- package/NOTICE +46 -49
- package/dist/dom.d.ts +1 -209
- package/dist/dom.js +1 -1
- package/dist/image.d.ts +2 -0
- package/dist/image.js +2 -0
- package/dist/index.d.ts +1 -21
- package/dist/index.js +1 -1
- package/dist/media.d.ts +1 -5
- package/dist/media.js +1 -1
- package/dist/node_modules/@allyhub/audio/dist/levels.d.ts +4 -5
- package/dist/node_modules/@allyhub/audio/dist/levels.js +1 -1
- package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.d.ts +1 -6
- package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.js +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-file.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.d.ts +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/LICENSE +241 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/fact.d.ts +37 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/fact.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/index.d.ts +4 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +43 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/problem.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/rules.d.ts +30 -0
- package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +2 -0
- package/dist/node_modules/@allyhub/diagnostics/package.json +14 -0
- package/dist/node_modules/@allyhub/formats/dist/contributed.d.ts +126 -0
- package/dist/node_modules/@allyhub/formats/dist/contributed.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +7 -12
- package/dist/node_modules/@allyhub/formats/dist/data/reference.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/script.d.ts +9 -4
- package/dist/node_modules/@allyhub/formats/dist/data/script.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +20 -82
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +96 -8
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/website.d.ts +2 -1
- package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
- package/dist/node_modules/@allyhub/formats/dist/data/work.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/extension.d.ts +91 -0
- package/dist/node_modules/@allyhub/formats/dist/extension.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/files.d.ts +51 -0
- package/dist/node_modules/@allyhub/formats/dist/files.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/index.d.ts +5 -1
- package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +226 -90
- package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +7 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +46 -42
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/LICENSE +241 -0
- package/dist/node_modules/@allyhub/image-draw/dist/context.d.ts +5 -0
- package/dist/node_modules/@allyhub/image-draw/dist/context.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/contrast.d.ts +13 -0
- package/dist/node_modules/@allyhub/image-draw/dist/contrast.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/env.d.ts +112 -0
- package/dist/node_modules/@allyhub/image-draw/dist/env.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/errors.d.ts +20 -0
- package/dist/node_modules/@allyhub/image-draw/dist/errors.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/fonts.d.ts +110 -0
- package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/guards.d.ts +32 -0
- package/dist/node_modules/@allyhub/image-draw/dist/guards.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/hash.d.ts +3 -0
- package/dist/node_modules/@allyhub/image-draw/dist/hash.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/inspect.d.ts +113 -0
- package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +3 -0
- package/dist/node_modules/@allyhub/image-draw/dist/layer-style.d.ts +151 -0
- package/dist/node_modules/@allyhub/image-draw/dist/layer-style.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/paint.d.ts +29 -0
- package/dist/node_modules/@allyhub/image-draw/dist/paint.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/pictures.d.ts +39 -0
- package/dist/node_modules/@allyhub/image-draw/dist/pictures.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/plan.d.ts +52 -0
- package/dist/node_modules/@allyhub/image-draw/dist/plan.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/reads.d.ts +145 -0
- package/dist/node_modules/@allyhub/image-draw/dist/reads.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/shape-path.d.ts +26 -0
- package/dist/node_modules/@allyhub/image-draw/dist/shape-path.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/stage.d.ts +56 -0
- package/dist/node_modules/@allyhub/image-draw/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/styles.d.ts +35 -0
- package/dist/node_modules/@allyhub/image-draw/dist/styles.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/dist/tone.d.ts +53 -0
- package/dist/node_modules/@allyhub/image-draw/dist/tone.js +2 -0
- package/dist/node_modules/@allyhub/image-draw/package.json +14 -0
- package/dist/node_modules/@allyhub/image-measure/LICENSE +241 -0
- package/dist/node_modules/@allyhub/image-measure/dist/contrast.d.ts +43 -0
- package/dist/node_modules/@allyhub/image-measure/dist/contrast.js +2 -0
- package/dist/node_modules/@allyhub/image-measure/dist/layout.d.ts +186 -0
- package/dist/node_modules/@allyhub/image-measure/dist/layout.js +5 -0
- package/dist/node_modules/@allyhub/image-measure/package.json +14 -0
- package/dist/node_modules/@allyhub/image-sdk/LICENSE +241 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.d.ts +13 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.js +2 -0
- package/dist/{define.d.ts → node_modules/@allyhub/image-sdk/dist/define.d.ts} +21 -4
- package/dist/node_modules/@allyhub/image-sdk/dist/define.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/dom.d.ts +210 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/dom.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/fill.d.ts +21 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/fill.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/group.d.ts +17 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/group.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +166 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/media.d.ts +6 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/media.js +2 -0
- package/dist/{messages.d.ts → node_modules/@allyhub/image-sdk/dist/messages.d.ts} +1 -1
- package/dist/node_modules/@allyhub/image-sdk/dist/picture.d.ts +59 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/picture.js +2 -0
- package/dist/{props.d.ts → node_modules/@allyhub/image-sdk/dist/props.d.ts} +4 -4
- package/dist/node_modules/@allyhub/image-sdk/dist/shape.d.ts +34 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/shape.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/stack.d.ts +16 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/stack.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.d.ts +38 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.js +2 -0
- package/dist/{written.js → node_modules/@allyhub/image-sdk/dist/written.js} +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +19 -0
- package/dist/node_modules/@allyhub/measure/LICENSE +241 -0
- package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +195 -0
- package/dist/node_modules/@allyhub/measure/dist/compare.js +2 -0
- package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +8 -0
- package/dist/node_modules/@allyhub/measure/dist/grain.js +2 -0
- package/dist/node_modules/@allyhub/measure/dist/image.d.ts +16 -0
- package/dist/node_modules/@allyhub/measure/dist/image.js +2 -0
- package/dist/node_modules/@allyhub/measure/dist/index.d.ts +4 -0
- package/dist/node_modules/@allyhub/measure/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/measure/package.json +13 -0
- package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.d.ts +4 -1
- package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.d.ts +15 -1
- package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/LICENSE +241 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.d.ts +1 -9
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/context.d.ts +39 -0
- package/dist/node_modules/@allyhub/piece/dist/context.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.d.ts +2 -2
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/export.d.ts +27 -10
- package/dist/node_modules/@allyhub/piece/dist/export.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/formats.d.ts +12 -68
- package/dist/node_modules/@allyhub/piece/dist/formats.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +104 -0
- package/dist/node_modules/@allyhub/piece/dist/index.d.ts +26 -0
- package/dist/node_modules/@allyhub/piece/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layer-style.d.ts +1558 -0
- package/dist/node_modules/@allyhub/piece/dist/layer-style.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +389 -0
- package/dist/node_modules/@allyhub/piece/dist/layer.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +421 -0
- package/dist/node_modules/@allyhub/piece/dist/layout.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.d.ts +1 -1
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.d.ts +39 -9
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.js +1 -1
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.d.ts +6 -0
- package/dist/node_modules/@allyhub/piece/dist/names.d.ts +26 -0
- package/dist/node_modules/@allyhub/piece/dist/names.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +21 -0
- package/dist/node_modules/@allyhub/piece/dist/page/console.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +3 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +4 -0
- package/dist/node_modules/@allyhub/piece/dist/page/locate.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/picture.d.ts +62 -0
- package/dist/node_modules/@allyhub/piece/dist/picture.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/piece.d.ts +15 -0
- package/dist/node_modules/@allyhub/piece/dist/piece.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/script.d.ts +9 -4
- package/dist/node_modules/@allyhub/piece/dist/script.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +131 -0
- package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +285 -0
- package/dist/node_modules/@allyhub/piece/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/version.d.ts +15 -0
- package/dist/node_modules/@allyhub/piece/dist/version.js +2 -0
- package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.d.ts +1 -20
- package/dist/node_modules/@allyhub/piece/package.json +18 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +139 -0
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +3 -10
- package/dist/node_modules/@allyhub/protocol/dist/app.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +12 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +232 -132
- package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/files.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +22 -9
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +8 -0
- package/dist/node_modules/@allyhub/protocol/dist/image.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +5 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
- package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +98 -0
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +273 -0
- package/dist/node_modules/@allyhub/protocol/dist/mail.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +26 -0
- package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +59 -0
- package/dist/node_modules/@allyhub/protocol/dist/peer.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +21 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +125 -0
- package/dist/node_modules/@allyhub/protocol/dist/presence.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +35 -0
- package/dist/node_modules/@allyhub/protocol/dist/shape.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +2 -8
- package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +70 -40
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +224 -177
- package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +14 -0
- package/dist/node_modules/@allyhub/runtimes/dist/declared.js +2 -0
- package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +15 -0
- package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.js +2 -0
- package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +2 -0
- package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/packages.js +3 -3
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +1 -0
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/manifest.json +0 -82
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/dist/define.d.ts +2 -0
- package/dist/node_modules/@allyhub/scenery/dist/define.js +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/code.d.ts +4 -4
- package/dist/node_modules/@allyhub/sheet/dist/api/code.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +15 -11
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/server.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/file.d.ts +5 -0
- package/dist/node_modules/@allyhub/sheet/dist/file.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/generated.d.ts +5 -19
- package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/import.d.ts +3 -1
- package/dist/node_modules/@allyhub/sheet/dist/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +3 -4
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +76 -1
- package/dist/node_modules/@allyhub/sheet/dist/patch.d.ts +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/patch.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/sdk.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/sdk.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +6 -6
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +5 -1
- package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +23 -7
- package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +44 -4
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +18 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/code.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/connect.d.ts +62 -0
- package/dist/node_modules/@allyhub/slides-core/dist/connect.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +208 -0
- package/dist/node_modules/@allyhub/slides-core/dist/fact.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +4 -4
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/measure.d.ts +4 -2
- package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/merge.d.ts +5 -5
- package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +19 -2
- package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/path.d.ts +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +17 -10
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +18 -0
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/stage.d.ts +28 -11
- package/dist/node_modules/@allyhub/slides-core/dist/units.d.ts +3 -6
- package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +5 -1
- package/dist/node_modules/@allyhub/video-core/dist/audio-types.d.ts +1 -2
- package/dist/node_modules/@allyhub/video-core/dist/captions.d.ts +1 -10
- package/dist/node_modules/@allyhub/video-core/dist/captions.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/check.d.ts +62 -0
- package/dist/node_modules/@allyhub/video-core/dist/check.js +2 -0
- package/dist/node_modules/@allyhub/video-core/dist/cut-report.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/cut-report.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/edits.d.ts +3 -3
- package/dist/node_modules/@allyhub/video-core/dist/edits.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/fact.d.ts +21 -762
- package/dist/node_modules/@allyhub/video-core/dist/fact.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/footage-motion.d.ts +3 -2
- package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/index.d.ts +3 -17
- package/dist/node_modules/@allyhub/video-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/measure.d.ts +72 -423
- package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -4
- package/dist/node_modules/@allyhub/video-core/dist/mix-plan.d.ts +44 -0
- package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +2 -0
- package/dist/node_modules/@allyhub/video-core/dist/motion.d.ts +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +22 -430
- package/dist/node_modules/@allyhub/video-core/dist/piece.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/placement.d.ts +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +6 -12
- package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/script-edit.d.ts +11 -6
- package/dist/node_modules/@allyhub/video-core/dist/script-edit.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/seams.d.ts +2 -3
- package/dist/node_modules/@allyhub/video-core/dist/sound-under.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/sound-under.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/speech.d.ts +2 -4
- package/dist/node_modules/@allyhub/video-core/dist/speech.js +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/stage.d.ts +52 -0
- package/dist/node_modules/@allyhub/video-core/dist/stage.js +2 -0
- package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +18 -136
- package/dist/node_modules/@allyhub/video-core/dist/timeline.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/timing.d.ts +3 -3
- package/dist/node_modules/@allyhub/video-core/dist/timing.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/transcript.d.ts +2 -2
- package/dist/node_modules/@allyhub/video-core/dist/transcript.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/LICENSE +241 -0
- package/dist/node_modules/@allyhub/video-sdk/NOTICE +118 -0
- package/dist/{free.d.ts → node_modules/@allyhub/video-sdk/dist/free.d.ts} +14 -10
- package/dist/node_modules/@allyhub/video-sdk/dist/free.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/index.d.ts +28 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/index.js +2 -0
- package/dist/{input.d.ts → node_modules/@allyhub/video-sdk/dist/input.d.ts} +76 -22
- package/dist/node_modules/@allyhub/video-sdk/dist/input.js +2 -0
- package/dist/{module.d.ts → node_modules/@allyhub/video-sdk/dist/module.d.ts} +6 -4
- package/dist/node_modules/@allyhub/video-sdk/dist/module.js +2 -0
- package/dist/{parts.d.ts → node_modules/@allyhub/video-sdk/dist/parts.d.ts} +15 -6
- package/dist/node_modules/@allyhub/video-sdk/dist/parts.js +2 -0
- package/dist/{piece.d.ts → node_modules/@allyhub/video-sdk/dist/piece.d.ts} +26 -16
- package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/route.d.ts +46 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/route.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/scenery.d.ts +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/scenery.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/package.json +19 -0
- package/dist/scenery.d.ts +1 -1
- package/dist/scenery.js +1 -1
- package/dist/sheets.d.ts +1 -1
- package/dist/sheets.js +1 -1
- package/dist/slides.d.ts +1 -9
- package/dist/slides.js +1 -1
- package/docs/README.md +8 -6
- package/docs/batches.md +5 -5
- package/docs/contract.md +2 -2
- package/docs/defaults.md +278 -20
- package/docs/docs.md +77 -63
- package/docs/footage.md +7 -7
- package/docs/image.md +165 -0
- package/docs/layers.md +22 -13
- package/docs/modeling.md +4 -4
- package/docs/pictures.md +65 -0
- package/docs/project.md +51 -31
- package/docs/scenery.md +11 -11
- package/docs/sheets.md +26 -25
- package/docs/slides.md +73 -65
- package/docs/sound.md +3 -3
- package/docs/speech.md +8 -8
- package/docs/video.md +16 -13
- package/docs/websites.md +4 -4
- package/package.json +7 -2
- package/dist/define.js +0 -2
- package/dist/free.js +0 -2
- package/dist/input.js +0 -2
- package/dist/module.js +0 -2
- package/dist/node_modules/@allyhub/formats/dist/data/comments.d.ts +0 -94
- package/dist/node_modules/@allyhub/formats/dist/data/comments.js +0 -2
- package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package-lock.json +0 -227
- package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package.json +0 -8
- package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -105
- package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package.json +0 -8
- package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package-lock.json +0 -128
- package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package.json +0 -9
- package/dist/node_modules/@allyhub/video-core/dist/export.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/formats.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/gen.d.ts +0 -37
- package/dist/node_modules/@allyhub/video-core/dist/problem.d.ts +0 -278
- package/dist/node_modules/@allyhub/video-core/dist/problem.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/script.js +0 -2
- package/dist/node_modules/@allyhub/video-core/dist/source.d.ts +0 -7
- package/dist/parts.js +0 -2
- package/dist/piece.js +0 -2
- /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.js +0 -0
- /package/dist/{fit.d.ts → node_modules/@allyhub/image-sdk/dist/fit.d.ts} +0 -0
- /package/dist/{fit.js → node_modules/@allyhub/image-sdk/dist/fit.js} +0 -0
- /package/dist/{messages.js → node_modules/@allyhub/image-sdk/dist/messages.js} +0 -0
- /package/dist/{props.js → node_modules/@allyhub/image-sdk/dist/props.js} +0 -0
- /package/dist/{text.d.ts → node_modules/@allyhub/image-sdk/dist/text.d.ts} +0 -0
- /package/dist/{text.js → node_modules/@allyhub/image-sdk/dist/text.js} +0 -0
- /package/dist/{written.d.ts → node_modules/@allyhub/image-sdk/dist/written.d.ts} +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/gen.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/source.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.js +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.d.ts +0 -0
- /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.js +0 -0
- /package/dist/{anim.d.ts → node_modules/@allyhub/video-sdk/dist/anim.d.ts} +0 -0
- /package/dist/{anim.js → node_modules/@allyhub/video-sdk/dist/anim.js} +0 -0
- /package/dist/{noise.d.ts → node_modules/@allyhub/video-sdk/dist/noise.d.ts} +0 -0
- /package/dist/{noise.js → node_modules/@allyhub/video-sdk/dist/noise.js} +0 -0
- /package/dist/{paths.d.ts → node_modules/@allyhub/video-sdk/dist/paths.d.ts} +0 -0
- /package/dist/{paths.js → node_modules/@allyhub/video-sdk/dist/paths.js} +0 -0
- /package/dist/{phone.d.ts → node_modules/@allyhub/video-sdk/dist/phone.d.ts} +0 -0
- /package/dist/{phone.js → node_modules/@allyhub/video-sdk/dist/phone.js} +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** The project's agent, as people see it. */
|
|
3
|
+
export declare const AGENT_NAME = "AllyHub";
|
|
4
|
+
/** The agent's id as a collaborator: a project has one. */
|
|
5
|
+
export declare const AGENT_COLLABORATOR = "agent";
|
|
6
|
+
/**
|
|
7
|
+
* Where a project's dev server takes the agent's state from a process on
|
|
8
|
+
* the computer (the CLI, as it runs a command that looks at an item): a
|
|
9
|
+
* POST of a `CollaboratorState`, its token as a bearer's (`.allyhub/dev.json`).
|
|
10
|
+
*/
|
|
11
|
+
export declare const PRESENCE_PATH = "/presence";
|
|
12
|
+
/** How long a participant's state lasts unrenewed, ms (awareness's outdatedTimeout). */
|
|
13
|
+
export declare const PRESENCE_GONE_MS = 30000;
|
|
14
|
+
/** What a participant is doing; none: there, idle. */
|
|
15
|
+
export declare const COLLABORATOR_DOING: readonly ["looking", "editing"];
|
|
16
|
+
/** Lines of a project file, counted from 1, `to` the last; none: the file as a whole. */
|
|
17
|
+
export declare const CollaboratorSourceSchema: z.ZodObject<{
|
|
18
|
+
path: z.ZodString;
|
|
19
|
+
from: z.ZodOptional<z.ZodInt>;
|
|
20
|
+
to: z.ZodOptional<z.ZodInt>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type CollaboratorSource = z.infer<typeof CollaboratorSourceSchema>;
|
|
23
|
+
/** What a participant says of itself. */
|
|
24
|
+
export declare const CollaboratorStateSchema: z.ZodObject<{
|
|
25
|
+
doing: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
looking: "looking";
|
|
27
|
+
editing: "editing";
|
|
28
|
+
}>>;
|
|
29
|
+
item: z.ZodOptional<z.ZodString>;
|
|
30
|
+
place: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
31
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
path: z.ZodString;
|
|
33
|
+
from: z.ZodOptional<z.ZodInt>;
|
|
34
|
+
to: z.ZodOptional<z.ZodInt>;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
name: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export type CollaboratorState = z.infer<typeof CollaboratorStateSchema>;
|
|
39
|
+
/** A participant, as the room tells it. */
|
|
40
|
+
export declare const CollaboratorSchema: z.ZodObject<{
|
|
41
|
+
doing: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
looking: "looking";
|
|
43
|
+
editing: "editing";
|
|
44
|
+
}>>;
|
|
45
|
+
item: z.ZodOptional<z.ZodString>;
|
|
46
|
+
place: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
47
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
path: z.ZodString;
|
|
49
|
+
from: z.ZodOptional<z.ZodInt>;
|
|
50
|
+
to: z.ZodOptional<z.ZodInt>;
|
|
51
|
+
}, z.core.$strict>>;
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
kind: z.ZodEnum<{
|
|
54
|
+
person: "person";
|
|
55
|
+
agent: "agent";
|
|
56
|
+
}>;
|
|
57
|
+
name: z.ZodString;
|
|
58
|
+
at: z.ZodNumber;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
export type Collaborator = z.infer<typeof CollaboratorSchema>;
|
|
61
|
+
/**
|
|
62
|
+
* The project's agent in the item on show as its editor shows it (none
|
|
63
|
+
* while it is not there), and whether the editor follows it: for a host
|
|
64
|
+
* that draws the agent's name itself (HostContext's `commands`).
|
|
65
|
+
*/
|
|
66
|
+
export declare const AgentHereSchema: z.ZodObject<{
|
|
67
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
doing: z.ZodEnum<{
|
|
70
|
+
looking: "looking";
|
|
71
|
+
editing: "editing";
|
|
72
|
+
}>;
|
|
73
|
+
}, z.core.$strict>>;
|
|
74
|
+
following: z.ZodBoolean;
|
|
75
|
+
}, z.core.$strict>;
|
|
76
|
+
export type AgentHere = z.infer<typeof AgentHereSchema>;
|
|
77
|
+
export declare const PRESENCE_METHODS: {
|
|
78
|
+
readonly "presence/get": import("./jsonrpc.js").MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
79
|
+
collaborators: z.ZodArray<z.ZodObject<{
|
|
80
|
+
doing: z.ZodOptional<z.ZodEnum<{
|
|
81
|
+
looking: "looking";
|
|
82
|
+
editing: "editing";
|
|
83
|
+
}>>;
|
|
84
|
+
item: z.ZodOptional<z.ZodString>;
|
|
85
|
+
place: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
86
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
87
|
+
path: z.ZodString;
|
|
88
|
+
from: z.ZodOptional<z.ZodInt>;
|
|
89
|
+
to: z.ZodOptional<z.ZodInt>;
|
|
90
|
+
}, z.core.$strict>>;
|
|
91
|
+
id: z.ZodString;
|
|
92
|
+
kind: z.ZodEnum<{
|
|
93
|
+
person: "person";
|
|
94
|
+
agent: "agent";
|
|
95
|
+
}>;
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
at: z.ZodNumber;
|
|
98
|
+
}, z.core.$strict>>;
|
|
99
|
+
}, z.core.$strict>>;
|
|
100
|
+
};
|
|
101
|
+
export declare const PRESENCE_NOTIFICATIONS: {
|
|
102
|
+
readonly "presence/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
103
|
+
collaborators: z.ZodArray<z.ZodObject<{
|
|
104
|
+
doing: z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
looking: "looking";
|
|
106
|
+
editing: "editing";
|
|
107
|
+
}>>;
|
|
108
|
+
item: z.ZodOptional<z.ZodString>;
|
|
109
|
+
place: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
110
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
111
|
+
path: z.ZodString;
|
|
112
|
+
from: z.ZodOptional<z.ZodInt>;
|
|
113
|
+
to: z.ZodOptional<z.ZodInt>;
|
|
114
|
+
}, z.core.$strict>>;
|
|
115
|
+
id: z.ZodString;
|
|
116
|
+
kind: z.ZodEnum<{
|
|
117
|
+
person: "person";
|
|
118
|
+
agent: "agent";
|
|
119
|
+
}>;
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
at: z.ZodNumber;
|
|
122
|
+
}, z.core.$strict>>;
|
|
123
|
+
}, z.core.$strict>>;
|
|
124
|
+
};
|
|
125
|
+
//# sourceMappingURL=presence.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as t}from"zod";import{PathSchema as o}from"./files.js";import{method as e,notification as n}from"./jsonrpc.js";import{PlaceSchema as r}from"./place.js";export const AGENT_NAME="AllyHub",AGENT_COLLABORATOR="agent",PRESENCE_PATH="/presence",PRESENCE_GONE_MS=3e4,COLLABORATOR_DOING=["looking","editing"],CollaboratorSourceSchema=t.strictObject({path:o,from:t.int().positive().optional(),to:t.int().positive().optional()}),CollaboratorStateSchema=t.strictObject({doing:t.enum(COLLABORATOR_DOING).optional(),item:o.optional(),place:r.optional(),source:CollaboratorSourceSchema.optional(),name:t.string().min(1).optional()}),CollaboratorSchema=CollaboratorStateSchema.extend({id:t.string().min(1),kind:t.enum(["person","agent"]),name:t.string().min(1),at:t.number()}),AgentHereSchema=t.strictObject({agent:t.strictObject({name:t.string().min(1),doing:t.enum(COLLABORATOR_DOING)}).optional(),following:t.boolean()}),PRESENCE_METHODS={"presence/get":e(t.strictObject({}),t.strictObject({collaborators:t.array(CollaboratorSchema)}),"Who is in the project's items now, and where.")},PRESENCE_NOTIFICATIONS={"presence/changed":n(t.strictObject({collaborators:t.array(CollaboratorSchema)}),"Who is in the project's items now, and where: told whenever a participant comes, moves or goes.")};
|
|
@@ -154,8 +154,8 @@ export declare const RegistryIndexEntrySchema: z.ZodObject<{
|
|
|
154
154
|
}, z.core.$strip>>;
|
|
155
155
|
title: z.ZodString;
|
|
156
156
|
description: z.ZodString;
|
|
157
|
-
categories: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
158
157
|
preview: z.ZodOptional<z.ZodString>;
|
|
158
|
+
categories: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
159
159
|
}, z.core.$strip>;
|
|
160
160
|
export type RegistryIndexEntry = z.infer<typeof RegistryIndexEntrySchema>;
|
|
161
161
|
export declare const RegistryIndexSchema: z.ZodObject<{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{ACCOUNT_CALLS as E}from"./account.js";import{ACCOUNT_PATH as
|
|
2
|
+
import{ACCOUNT_CALLS as E}from"./account.js";import{ACCOUNT_PATH as O,BROWSER_LINK_PATH as _,METADATA_PATH as i}from"./auth.js";import{CATALOG_PATH as r,FILES_PATH as e,LLM_MESSAGES_PATH as H,LLM_MODELS_PATH as I}from"./cloud.js";import{SHARES_PATH as T}from"./shares.js";import{PROJECTS_PATH as p,SNAPSHOTS_PATH as a,SNAPSHOT_BLOBS_PATH as L}from"./snapshots.js";import{SITES_PATH as t}from"./sites.js";import{MAIL_ALIASES_PATH as G,MAIL_MESSAGES_PATH as o,MAIL_PATH as n,MAIL_SEND_PATH as s,MAIL_SETTINGS_PATH as U}from"./mail.js";import{ORGANIZATIONS_PATH as $,STUDIO_OPEN_PATH as D,STUDIO_PATH as d,STUDIO_TICKET_PATH as l,STUDIO_WAKE_PATH as f,STUDIO_WAKES_PATH as C,STUDIO_PAUSE_PATH as M,STUDIO_POLICY_PATH as P,STUDIO_RESTART_PATH as N,STUDIO_PREPARE_PATH as c}from"./teams.js";export const CLIENT_ROUTES=[{method:"GET",path:i},{method:"GET",path:O},{method:"POST",path:_},{method:"GET",path:I},{method:"POST",path:H},{method:"GET",path:r},{method:"POST",path:"/api/tools/:name/calls"},{method:"GET",path:"/api/calls/:id"},{method:"POST",path:e},{method:"POST",path:`${e}/:id/done`},{method:"GET",path:`${e}/:id/content`},{method:"GET",path:$},{method:"GET",path:d},{method:"DELETE",path:d},{method:"PATCH",path:d},{method:"POST",path:N},{method:"GET",path:P},{method:"PUT",path:P},{method:"POST",path:D},{method:"POST",path:l},{method:"PUT",path:f},{method:"POST",path:C},{method:"POST",path:M},{method:"POST",path:c},{method:"POST",path:L},{method:"POST",path:a},{method:"POST",path:`${a}/:id/view`},{method:"GET",path:p},{method:"DELETE",path:`${p}/:id`},{method:"PUT",path:`${p}/:id/executor`},{method:"POST",path:T},{method:"GET",path:T},{method:"PATCH",path:`${T}/:id`},{method:"DELETE",path:`${T}/:id`},{method:"GET",path:"/api/s/:token"},{method:"POST",path:"/api/s/:token/report"},...Object.values(E).map(h=>({method:h.http,path:h.route})),{method:"GET",path:t},{method:"POST",path:t},{method:"GET",path:`${t}/:id`},{method:"DELETE",path:`${t}/:id`},{method:"POST",path:`${t}/:id/deployments`},{method:"POST",path:`${t}/:id/blobs`},{method:"PUT",path:`${t}/:id/live`},{method:"DELETE",path:`${t}/:id/live`},{method:"PUT",path:`${t}/:id/settings`},{method:"GET",path:n},{method:"POST",path:G},{method:"GET",path:o},{method:"GET",path:`${o}/:id`},{method:"GET",path:`${o}/:id/raw`},{method:"POST",path:`${o}/:id/reply`},{method:"POST",path:s},{method:"PUT",path:U}],probePath=h=>h.path.replace(/:[A-Za-z]+/gu,"probe");export function routeMissing(h,S,A){if(S!==404)return!1;const m=A.error;return m?.code==="not_found"&&m.message===`There is no ${h.method} ${probePath(h)}.`}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type MethodSpec } from "./jsonrpc.js";
|
|
3
|
+
import type { CallerOf, CancellableHandlersOf, Peer } from "./peer.js";
|
|
4
|
+
export interface Shape<C extends Record<string, MethodSpec>, E extends Record<string, MethodSpec>> {
|
|
5
|
+
/** The feature, which every method's name begins with: `commands/$register`. */
|
|
6
|
+
readonly name: string;
|
|
7
|
+
/** What the core's side answers. */
|
|
8
|
+
readonly core: C;
|
|
9
|
+
/** What the extension's side answers. */
|
|
10
|
+
readonly extension: E;
|
|
11
|
+
}
|
|
12
|
+
export declare function defineShape<C extends Record<string, MethodSpec>, E extends Record<string, MethodSpec>>(name: string, core: C, extension: E): Shape<C, E>;
|
|
13
|
+
/** What crosses in place of an object: the number its side keeps it under. */
|
|
14
|
+
export declare const HandleSchema: z.ZodInt;
|
|
15
|
+
/** The objects one side keeps by handle. */
|
|
16
|
+
export declare class Handles<T> {
|
|
17
|
+
private next;
|
|
18
|
+
private readonly objects;
|
|
19
|
+
add(object: T): number;
|
|
20
|
+
/** The object a handle names; a handle let go of answers not found. */
|
|
21
|
+
get(handle: number): T;
|
|
22
|
+
delete(handle: number): void;
|
|
23
|
+
get size(): number;
|
|
24
|
+
}
|
|
25
|
+
/** The core's side of a shape: answers its methods, and calls the extension's. */
|
|
26
|
+
export declare function coreSide<C extends Record<string, MethodSpec>, E extends Record<string, MethodSpec>>(peer: Peer, shape: Shape<C, E>, handlers: CancellableHandlersOf<C>): {
|
|
27
|
+
extension: CallerOf<E>;
|
|
28
|
+
stop(): void;
|
|
29
|
+
};
|
|
30
|
+
/** The extension's side of a shape: answers its methods, and calls the core's. */
|
|
31
|
+
export declare function extensionSide<C extends Record<string, MethodSpec>, E extends Record<string, MethodSpec>>(peer: Peer, shape: Shape<C, E>, handlers: CancellableHandlersOf<E>): {
|
|
32
|
+
core: CallerOf<C>;
|
|
33
|
+
stop(): void;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=shape.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as r}from"zod";import{RPC_ERROR as s,RpcError as i}from"./jsonrpc.js";export function defineShape(o,e,t){for(const n of[...Object.keys(e),...Object.keys(t)])if(!n.startsWith(`${o}/$`))throw new Error(`${n} is not one of ${o}'s methods (${o}/$…).`);return{name:o,core:e,extension:t}}export const HandleSchema=r.int().nonnegative();export class Handles{next=0;objects=new Map;add(e){const t=this.next++;return this.objects.set(t,e),t}get(e){const t=this.objects.get(e);if(t===void 0)throw new i(s.notFound,`There is nothing under the handle ${String(e)}.`);return t}delete(e){this.objects.delete(e)}get size(){return this.objects.size}}export function coreSide(o,e,t){return{extension:o.caller(e.extension),stop:o.serve(e.core,t)}}export function extensionSide(o,e,t){return{core:o.caller(e.core),stop:o.serve(e.extension,t)}}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const SHARE_AUDIENCES: readonly ["anyone", "organization"];
|
|
3
3
|
export type ShareAudience = (typeof SHARE_AUDIENCES)[number];
|
|
4
|
-
/** What can be shared alone: what a person reads, watches or pages through. */
|
|
5
|
-
export declare const SHARED_KINDS: readonly ["video", "slides", "doc", "sheet"];
|
|
6
4
|
export declare const SHARE_STATES: readonly ["shared", "revoked", "taken-down"];
|
|
7
5
|
/** A share, as its organization's members see it. */
|
|
8
6
|
export declare const ShareSchema: z.ZodObject<{
|
|
@@ -68,13 +66,9 @@ export declare const sharedPath: (token: string) => string;
|
|
|
68
66
|
export declare const SharedSchema: z.ZodObject<{
|
|
69
67
|
project: z.ZodString;
|
|
70
68
|
item: z.ZodObject<{
|
|
69
|
+
id: z.ZodString;
|
|
71
70
|
dir: z.ZodString;
|
|
72
|
-
kind: z.
|
|
73
|
-
video: "video";
|
|
74
|
-
slides: "slides";
|
|
75
|
-
doc: "doc";
|
|
76
|
-
sheet: "sheet";
|
|
77
|
-
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
71
|
+
kind: z.ZodString;
|
|
78
72
|
name: z.ZodString;
|
|
79
73
|
}, z.core.$strip>;
|
|
80
74
|
view: z.ZodObject<{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as e}from"zod";import{openEnum as o}from"./open.js";import{SnapshotViewSchema as n}from"./snapshots.js";export const SHARE_AUDIENCES=["anyone","organization"],
|
|
2
|
+
import{z as e}from"zod";import{openEnum as o}from"./open.js";import{SnapshotViewSchema as n}from"./snapshots.js";export const SHARE_AUDIENCES=["anyone","organization"],SHARE_STATES=["shared","revoked","taken-down"],ShareSchema=e.object({id:e.string().min(1),projectId:e.string().min(1),item:e.string(),audience:o(SHARE_AUDIENCES),state:o(SHARE_STATES),url:e.url(),createdAt:e.iso.datetime(),reason:e.string().optional()}),SHARES_PATH="/api/shares",ShareCreateSchema=e.strictObject({projectId:e.string().min(1),item:e.string(),audience:e.enum(SHARE_AUDIENCES)}),SharesResponseSchema=e.object({shares:e.array(ShareSchema)}),sharePath=t=>`${SHARES_PATH}/${encodeURIComponent(t)}`,shareLink=(t,r)=>`${t.replace(/\/+$/u,"")}/s/${encodeURIComponent(r)}`,sharedPath=t=>`/api/s/${encodeURIComponent(t)}`,SharedSchema=e.object({project:e.string(),item:e.object({id:e.string(),dir:e.string(),kind:e.string().min(1),name:e.string()}),view:n,madeAt:e.iso.datetime()}),TakenDownSchema=e.object({error:e.object({code:e.literal("gone"),data:e.object({reason:e.string()})})}),shareReportPath=t=>`${sharedPath(t)}/report`,SHARE_REPORT_REASONS=["phishing","malware","sexual","violence","hate","copyright","privacy","other"],ShareReportSchema=e.strictObject({reason:e.enum(SHARE_REPORT_REASONS),details:e.string().max(2e3),email:e.email().optional()});
|
|
@@ -31,6 +31,29 @@ export type Transcript = z.infer<typeof TranscriptSchema>;
|
|
|
31
31
|
*/
|
|
32
32
|
export declare const SNAPSHOT_KINDS: readonly ["project", "home"];
|
|
33
33
|
export type SnapshotKind = (typeof SNAPSHOT_KINDS)[number];
|
|
34
|
+
/**
|
|
35
|
+
* A folder of the tree an extension serves (its `stageRoutes`): one
|
|
36
|
+
* lower-case word and "/", none of the core's (SNAPSHOT_TREE's) nor a
|
|
37
|
+
* read view's own (SNAPSHOT_VIEW's), so it cannot stand for them or widen
|
|
38
|
+
* a policy that names it.
|
|
39
|
+
*/
|
|
40
|
+
export declare const StageFolderSchema: z.ZodString;
|
|
41
|
+
/** What a stage page loads from a folder of the tree (a CSP fetch directive's word): a list that grows. */
|
|
42
|
+
export declare const StageLoadSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
43
|
+
connect: "connect";
|
|
44
|
+
media: "media";
|
|
45
|
+
script: "script";
|
|
46
|
+
style: "style";
|
|
47
|
+
font: "font";
|
|
48
|
+
img: "img";
|
|
49
|
+
}>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
|
|
50
|
+
/**
|
|
51
|
+
* The folders of the tree the extensions serve, each with what the stage's
|
|
52
|
+
* pages load from it, as a reader takes them: a folder or a word it cannot
|
|
53
|
+
* read allows nothing (`stageCsp`), and the rest stand.
|
|
54
|
+
*/
|
|
55
|
+
export declare const StageRoutesSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
56
|
+
export type StageRoutes = z.infer<typeof StageRoutesSchema>;
|
|
34
57
|
/**
|
|
35
58
|
* What showing one item read only reaches (a share's view of it): the
|
|
36
59
|
* tree's paths its editor and its stage load, the project's files its
|
|
@@ -104,6 +127,7 @@ export declare const SnapshotManifestSchema: z.ZodObject<{
|
|
|
104
127
|
}, z.core.$strip>>;
|
|
105
128
|
}, z.core.$strip>>;
|
|
106
129
|
}, z.core.$strip>>;
|
|
130
|
+
routes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
107
131
|
}, z.core.$strip>;
|
|
108
132
|
export type SnapshotManifest = z.infer<typeof SnapshotManifestSchema>;
|
|
109
133
|
/**
|
|
@@ -120,9 +144,11 @@ export declare function scopedManifest(m: SnapshotManifest, item: string): Snaps
|
|
|
120
144
|
*/
|
|
121
145
|
export declare const SNAPSHOT_SKIPPED: readonly ["node_modules", ".allyhub/cache", ".allyhub/out"];
|
|
122
146
|
/**
|
|
123
|
-
* The tree a read view serves, by
|
|
124
|
-
* it is relative, so it is the same tree a live dev server serves
|
|
125
|
-
* its stage's base.
|
|
147
|
+
* The tree a read view serves, by the core's top folders. Every address
|
|
148
|
+
* inside it is relative, so it is the same tree a live dev server serves
|
|
149
|
+
* under its stage's base. Beside them are the folders the extensions serve
|
|
150
|
+
* (their `stageRoutes`: a video's sound, a scenery's viewer bundle and
|
|
151
|
+
* bakes), each an extension's own, recorded as it says.
|
|
126
152
|
*/
|
|
127
153
|
export declare const SNAPSHOT_TREE: {
|
|
128
154
|
/** The editors' page (editor-web's build). */
|
|
@@ -135,14 +161,11 @@ export declare const SNAPSHOT_TREE: {
|
|
|
135
161
|
readonly media: "media/";
|
|
136
162
|
/** Derived media: a person's matte, by the media's project path. */
|
|
137
163
|
readonly matte: "matte/";
|
|
138
|
-
/** The sceneries' bundles, bakes and decoders. */
|
|
139
|
-
readonly scenery: "scenery/";
|
|
140
|
-
readonly bakes: "bakes/";
|
|
141
164
|
/** An item's component pictures (a deck's, a doc's), by what they show (`stillPath`), and a snapshot's lists of them (`stillsIndexPath`). */
|
|
142
165
|
readonly stills: "stills/";
|
|
143
166
|
/** The answers the editors ask for, recorded (snapshotAnswerPath). */
|
|
144
167
|
readonly answers: "answers/";
|
|
145
|
-
/** Each item's gallery preview, by its
|
|
168
|
+
/** Each item's gallery preview, by its id (snapshotPreviewPath). */
|
|
146
169
|
readonly previews: "previews/";
|
|
147
170
|
};
|
|
148
171
|
/**
|
|
@@ -185,8 +208,31 @@ export declare const StillsIndexSchema: z.ZodObject<{
|
|
|
185
208
|
export type StillsIndex = z.infer<typeof StillsIndexSchema>;
|
|
186
209
|
/** A component as `components/stills` takes it (its name, props, size and moment), as one string: its keys sorted. */
|
|
187
210
|
export declare const stillsIndexKey: (component: unknown) => string;
|
|
211
|
+
/**
|
|
212
|
+
* What a kind's extension says a snapshot keeps of an item, besides the
|
|
213
|
+
* tools it asked (each answer recorded as it came): read as a tolerant
|
|
214
|
+
* reader reads, since an extension may be newer than the core.
|
|
215
|
+
*/
|
|
216
|
+
export declare const KindSnapshotSchema: z.ZodObject<{
|
|
217
|
+
stills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
218
|
+
version: z.ZodString;
|
|
219
|
+
components: z.ZodArray<z.ZodObject<{
|
|
220
|
+
name: z.ZodString;
|
|
221
|
+
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
222
|
+
width: z.ZodNumber;
|
|
223
|
+
height: z.ZodNumber;
|
|
224
|
+
t: z.ZodNumber;
|
|
225
|
+
}, z.core.$strip>>;
|
|
226
|
+
}, z.core.$strip>>>;
|
|
227
|
+
shows: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
media: z.ZodArray<z.ZodString>;
|
|
229
|
+
data: z.ZodArray<z.ZodString>;
|
|
230
|
+
}, z.core.$strip>>;
|
|
231
|
+
routes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
export type KindSnapshot = z.infer<typeof KindSnapshotSchema>;
|
|
188
234
|
/** An item's gallery preview in the tree: its `Preview` (a picture, words or rows), as JSON. */
|
|
189
|
-
export declare const snapshotPreviewPath: (
|
|
235
|
+
export declare const snapshotPreviewPath: (item: string) => string;
|
|
190
236
|
/**
|
|
191
237
|
* The tree's fixed pages: each reads what to show from its own address.
|
|
192
238
|
* - the stage: `?piece=<id>&combo=<key>` and where it starts (`t`,
|
|
@@ -194,7 +240,8 @@ export declare const snapshotPreviewPath: (itemDir: string) => string;
|
|
|
194
240
|
* it loads the piece's source (`pieceSourcePath`); without `piece` it is
|
|
195
241
|
* the bare stage a host drives (`window.allyhub`);
|
|
196
242
|
* - a scenery's viewer: `?file=<the scenery's or model's file>` and
|
|
197
|
-
* `camera=<JSON>`; it loads its source
|
|
243
|
+
* `camera=<JSON>`; it loads its source from the 3d extension's folder
|
|
244
|
+
* (`scenery/sources/<file>.json`);
|
|
198
245
|
* - the probe, which says by postMessage that a sandboxed frame loads.
|
|
199
246
|
*/
|
|
200
247
|
export declare const TREE_PAGES: {
|
|
@@ -204,52 +251,35 @@ export declare const TREE_PAGES: {
|
|
|
204
251
|
};
|
|
205
252
|
/** Where a piece's `BuildSource` is in the tree: its addresses are relative to the tree's root. */
|
|
206
253
|
export declare const pieceSourcePath: (piece: string) => string;
|
|
207
|
-
/**
|
|
208
|
-
* What a scenery's viewer loads: its bundle, three.js's decoders and
|
|
209
|
-
* manifold's wasm, each a path from the tree's root, and the bakes on
|
|
210
|
-
* disk by name (`<digest>.<renderer>`, served at `bakes/<name>.bin`).
|
|
211
|
-
*/
|
|
212
|
-
export interface ScenerySource {
|
|
213
|
-
module: string;
|
|
214
|
-
decoders: string;
|
|
215
|
-
manifoldWasm: string;
|
|
216
|
-
bakes: string[];
|
|
217
|
-
}
|
|
218
|
-
/** Where a scenery's (or a 3D model's) `ScenerySource` is in the tree. */
|
|
219
|
-
export declare const scenerySourcePath: (file: string) => string;
|
|
220
254
|
/**
|
|
221
255
|
* A path of the tree as an address relative to its root: each segment
|
|
222
256
|
* percent-encoded, so a server that decodes the address once finds the
|
|
223
257
|
* path (an answer's or a source's name holds encoded characters itself).
|
|
224
258
|
*/
|
|
225
259
|
export declare const treeHref: (path: string) => string;
|
|
226
|
-
/**
|
|
227
|
-
* Where a live server makes a sound as the export decodes it (a take
|
|
228
|
-
* denoised or sped, a stem filtered), on demand. Not recorded: a
|
|
229
|
-
* snapshot's stage plays the recording instead.
|
|
230
|
-
*/
|
|
231
|
-
export declare const SOUND_FOLDER = "sound/";
|
|
232
260
|
/**
|
|
233
261
|
* The stage's and the viewer's CSP, wherever the tree is served (`tree`:
|
|
234
262
|
* its root's absolute address, ending in "/"): the runtime, the builds and
|
|
235
|
-
* the media,
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* '
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
263
|
+
* the media, the folders the extensions serve for what each says the pages
|
|
264
|
+
* load from it (`routes`), nothing else; framed only by `ancestors`
|
|
265
|
+
* (origins). A piece's code may need three things more (a 3D scenery's
|
|
266
|
+
* do): three.js's decoders run in workers made from blob: addresses, with
|
|
267
|
+
* WebAssembly; a glTF's embedded pictures, which its loader fetches from
|
|
268
|
+
* blob: addresses; and 'unsafe-eval', because the Basis transcoder's
|
|
269
|
+
* bindings make functions from strings as it starts. The stage runs the
|
|
270
|
+
* project's own code already, so evaluating strings gives it nothing it
|
|
271
|
+
* lacks; what the policy keeps is where the page can reach, which none of
|
|
272
|
+
* these widens beyond the tree. A load word this client does not know
|
|
273
|
+
* allows nothing.
|
|
244
274
|
*/
|
|
245
|
-
export declare function stageCsp(tree: string, ancestors: readonly string[]): string;
|
|
275
|
+
export declare function stageCsp(tree: string, ancestors: readonly string[], routes?: Readonly<Record<string, readonly string[]>>): string;
|
|
246
276
|
/**
|
|
247
277
|
* The editors' page of a read view showing one item, read only, as the
|
|
248
|
-
* window frames it: `<origin>/editor/?item=<
|
|
278
|
+
* window frames it: `<origin>/editor/?item=<id>&embed=studio&snapshot=1`
|
|
249
279
|
* and the window's theme. For a share's viewer (`viewer`, `&viewer=1`):
|
|
250
280
|
* the item alone, nothing offered that changes it or needs the machine
|
|
251
281
|
* (HostContext's `viewer`). Opened at a place (`place`): where the person
|
|
252
|
-
* was in the item (`
|
|
282
|
+
* was in the item, as its editor said it (`place=`, its JSON).
|
|
253
283
|
*/
|
|
254
284
|
export declare function snapshotEditorUrl(origin: string, item: string, o?: {
|
|
255
285
|
theme?: "light" | "dark";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as e}from"zod";import{BlobSchema as
|
|
2
|
+
import{STAGE_LOADS as b}from"@allyhub/formats";import{z as e}from"zod";import{BlobSchema as g,Sha256Schema as u,TreeFileSchema as S,TreePathSchema as m}from"./blobs.js";import{placeParams as $}from"./editor.js";import{known as E,openEnum as x,readable as w}from"./open.js";export const SNAPSHOT_FORMAT=1,ConversationEntrySchema=e.object({sessionId:e.string().min(1),agent:e.string().min(1),title:e.string().optional(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime(),transcript:u}),TranscriptSchema=e.object({sessionId:e.string().min(1),messages:e.array(e.object({method:e.string().min(1),params:e.unknown()}))}),SNAPSHOT_KINDS=["project","home"],StageFolderSchema=e.string().regex(/^[a-z][a-z0-9-]*\/$/u,"one lower-case word and /").refine(t=>!Object.values(SNAPSHOT_TREE).includes(t)&&!Object.values(SNAPSHOT_VIEW).includes(t),"a folder of the core's"),StageLoadSchema=x(b),StageRoutesSchema=e.record(e.string(),e.array(e.string()));const O=e.string().refine(t=>t.endsWith("/")&&m.safeParse(t.slice(0,-1)).success,"a folder of the tree, ending in /");export const ItemReachSchema=e.object({tree:e.array(m),files:e.array(m),own:e.record(m,S)}),SnapshotReachSchema=e.object({shared:e.array(O),items:e.record(e.string(),ItemReachSchema)}),SnapshotManifestSchema=e.object({format:e.literal(SNAPSHOT_FORMAT),kind:e.enum(SNAPSHOT_KINDS),project:e.object({name:e.string().min(1).max(255)}),host:e.object({version:e.string().min(1)}),madeAt:e.iso.datetime(),files:e.record(m,g),tree:e.record(m,S),conversations:e.array(ConversationEntrySchema),reach:SnapshotReachSchema.optional(),routes:StageRoutesSchema.optional()});export function scopedManifest(t,o){const r=t.reach,s=r!==void 0&&Object.hasOwn(r.items,o)?r.items[o]:void 0;if(r===void 0||s===void 0)return;const i={};for(const[n,a]of Object.entries(t.tree))r.shared.some(p=>n.startsWith(p))&&(i[n]=a);for(const n of s.tree){const a=Object.hasOwn(t.tree,n)?t.tree[n]:void 0;a!==void 0&&(i[n]=a)}Object.assign(i,s.own);const c={};for(const n of s.files){const a=Object.hasOwn(t.files,n)?t.files[n]:void 0;a!==void 0&&(c[n]=a)}return{format:t.format,kind:t.kind,project:t.project,host:t.host,madeAt:t.madeAt,files:c,tree:i,conversations:[],...t.routes===void 0?{}:{routes:t.routes}}}export const SNAPSHOT_SKIPPED=["node_modules",".allyhub/cache",".allyhub/out"],SNAPSHOT_TREE={editor:"editor/",runtime:"runtime/",build:"build/",media:"media/",matte:"matte/",stills:"stills/",answers:"answers/",previews:"previews/"};function d(t){return Array.isArray(t)?t.map(d):t!==null&&typeof t=="object"?Object.fromEntries(Object.keys(t).sort().map(o=>[o,d(t[o])])):t}export const snapshotAnswerPath=(t,o)=>`${SNAPSHOT_TREE.answers}${t}/${encodeURIComponent(JSON.stringify(d(o??{})))}.json`,RecordedAnswerSchema=e.object({result:e.unknown().optional(),error:e.object({code:e.number(),message:e.string(),data:e.unknown().optional()}).optional()}),recordedReadPath=(t,o)=>snapshotAnswerPath(t,Object.fromEntries(Object.entries(o??{}).filter(([r,s])=>r!=="folder"&&s!==void 0))),stillPath=t=>`${SNAPSHOT_TREE.stills}${t}.webp`,stillsIndexPath=(t,o)=>`${SNAPSHOT_TREE.stills}index/${encodeURIComponent(t)}/${encodeURIComponent(o)}.json`,StillsIndexSchema=e.object({stills:e.record(e.string(),e.string().regex(/^[0-9a-f]{64}$/u))}),stillsIndexKey=t=>JSON.stringify(d(t));const P=e.object({name:e.string(),props:e.record(e.string(),e.unknown()),width:e.number().positive(),height:e.number().positive(),t:e.number().nonnegative()});export const KindSnapshotSchema=e.object({stills:e.array(e.object({version:e.string(),components:e.array(P)})).optional(),shows:e.object({media:e.array(e.string()),data:e.array(e.string())}).optional(),routes:e.record(e.string(),e.array(e.string().min(1))).optional()}),snapshotPreviewPath=t=>`${SNAPSHOT_TREE.previews}${encodeURIComponent(t)}.json`,TREE_PAGES={stage:`${SNAPSHOT_TREE.runtime}stage.html`,viewer:`${SNAPSHOT_TREE.runtime}viewer.html`,probe:`${SNAPSHOT_TREE.runtime}probe.html`},pieceSourcePath=t=>`${SNAPSHOT_TREE.build}sources/${encodeURIComponent(t)}.json`,treeHref=t=>t.split("/").map(encodeURIComponent).join("/");export function stageCsp(t,o,r={}){const s=l=>`${t}${l}`,i=s(SNAPSHOT_TREE.runtime),c=s(SNAPSHOT_TREE.build),n=s(SNAPSHOT_TREE.media),a=s(SNAPSHOT_TREE.matte),p=l=>Object.entries(r).filter(([h,j])=>StageFolderSchema.safeParse(h).success&&j.some(f=>E(b,f)&&f===l)).map(([h])=>` ${s(h)}`).join("");return["default-src 'none'",`script-src 'unsafe-eval' 'wasm-unsafe-eval' ${i} ${c}${p("script")}`,"worker-src blob:",`style-src 'unsafe-inline' ${i} ${c}${p("style")}`,`font-src ${i} ${c} ${n}${p("font")} data:`,`img-src ${n} ${c}${p("img")} data: blob:`,`media-src ${n} ${a}${p("media")} blob:`,`connect-src ${n} ${a} ${c} ${i}${p("connect")} blob: data:`,`frame-ancestors ${o.length>0?o.join(" "):"'none'"}`].join("; ")}export function snapshotEditorUrl(t,o,r={}){const s=Object.entries({item:o,embed:"studio",snapshot:"1",...r.viewer===!0?{viewer:"1"}:{},...r.theme===void 0?{}:{theme:r.theme},...$(r.place)}).map(([i,c])=>`${i}=${encodeURIComponent(c)}`);return`${t.replace(/\/$/u,"")}/${SNAPSHOT_TREE.editor}?${s.join("&")}`}export const EXECUTOR_KINDS=["cloud","computer"],COMPUTER_HEADER="x-allyhub-computer",ComputerIdSchema=e.string().regex(/^[A-Za-z0-9_-]{16,64}$/u),WORKED_ELSEWHERE="worked_elsewhere",ExecutorSchema=e.object({kind:x(EXECUTOR_KINDS),here:e.boolean()}),SNAPSHOT_BLOBS_PATH="/api/snapshots/blobs",SNAPSHOTS_PATH="/api/snapshots",SnapshotCreateSchema=e.strictObject({project:e.strictObject({id:e.string().min(1).optional(),kind:e.enum(SNAPSHOT_KINDS),name:e.string().min(1).max(255)}),manifest:u}),SnapshotCreatedSchema=e.object({id:e.string().min(1),projectId:e.string().min(1)}),SnapshotMissingSchema=e.object({missing:e.array(u)}),PROJECTS_PATH="/api/projects",SnapshotInfoSchema=e.object({id:e.string().min(1),madeAt:e.iso.datetime(),hostVersion:e.string()}),ProjectInfoSchema=e.object({id:e.string().min(1),kind:e.enum(SNAPSHOT_KINDS),name:e.string(),latest:SnapshotInfoSchema.nullable(),executor:ExecutorSchema}),ProjectsResponseSchema=e.object({projects:w(ProjectInfoSchema)}),projectPath=t=>`${PROJECTS_PATH}/${encodeURIComponent(t)}`,projectExecutorPath=t=>`${projectPath(t)}/executor`,ExecutorMoveSchema=e.strictObject({kind:e.enum(EXECUTOR_KINDS)}),snapshotViewPath=t=>`${SNAPSHOTS_PATH}/${encodeURIComponent(t)}/view`,SnapshotViewSchema=e.object({origin:e.url(),expiresAt:e.iso.datetime()}),SNAPSHOT_VIEW={manifest:"manifest.json",files:"files/",conversations:"conversations/"},NEEDS_MACHINE=-32010,isNeedsMachine=t=>typeof t=="object"&&t!==null&&t.code===NEEDS_MACHINE,ELSEWHERE=-32011,CHANGED_HERE=-32012,MoveChangesSchema=e.object({changed:e.array(e.string())});
|