@nocha/cli 4.6.1 → 4.34.1
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 +45 -94
- package/README.md +6 -1
- package/dist/NOCHA.schema.json +4044 -371
- package/dist/THIRD_PARTY_NOTICES.txt +2 -30
- package/dist/build-info.json +4 -4
- package/dist/dev-offline-compiler.js +9912 -23597
- package/dist/dev-offline-runner.js +3010 -1068
- package/dist/development-live-host.js +20944 -608
- package/dist/nocha.js +51625 -59571
- package/dist/reference-integrity.json +590 -709
- package/dist/references/README.md +2 -3
- package/dist/references/api/README.md +89 -149
- package/dist/references/api/SKILL.md +1 -1
- package/dist/references/api/experience-contract.md +36 -21
- package/dist/references/api/signatures/exports.md +997 -0
- package/dist/references/api/signatures/nocha.access.md +22 -0
- package/dist/references/api/signatures/nocha.ai.md +70 -0
- package/dist/references/api/signatures/nocha.assets.md +64 -0
- package/dist/references/api/signatures/nocha.assistant.md +46 -0
- package/dist/references/api/signatures/nocha.automations.md +94 -0
- package/dist/references/api/signatures/nocha.backend.md +22 -0
- package/dist/references/api/signatures/nocha.capabilities.md +16 -0
- package/dist/references/api/signatures/nocha.connectors.md +28 -0
- package/dist/references/api/signatures/nocha.context.md +16 -0
- package/dist/references/api/signatures/nocha.database.md +58 -0
- package/dist/references/api/signatures/nocha.device.md +118 -0
- package/dist/references/api/signatures/nocha.drive.md +16 -0
- package/dist/references/api/signatures/nocha.email.md +10 -0
- package/dist/references/api/signatures/nocha.excerpts.md +22 -0
- package/dist/references/api/signatures/nocha.experiences.md +34 -0
- package/dist/references/api/signatures/nocha.gamepad.md +28 -0
- package/dist/references/api/signatures/nocha.haptics.md +34 -0
- package/dist/references/api/signatures/nocha.hardware.md +88 -0
- package/dist/references/api/signatures/nocha.host.md +46 -0
- package/dist/references/api/signatures/nocha.inbox.md +22 -0
- package/dist/references/api/signatures/nocha.language.md +22 -0
- package/dist/references/api/signatures/nocha.library.md +112 -0
- package/dist/references/api/signatures/nocha.link.md +10 -0
- package/dist/references/api/signatures/nocha.machine.md +274 -0
- package/dist/references/api/signatures/nocha.memory.md +28 -0
- package/dist/references/api/signatures/nocha.module.md +10 -0
- package/dist/references/api/signatures/nocha.multiplayer.md +40 -0
- package/dist/references/api/signatures/nocha.navigation.md +46 -0
- package/dist/references/api/signatures/nocha.network.md +16 -0
- package/dist/references/api/signatures/nocha.notifications.md +28 -0
- package/dist/references/api/signatures/nocha.onEvent.md +10 -0
- package/dist/references/api/signatures/nocha.places.md +22 -0
- package/dist/references/api/signatures/nocha.player.md +10 -0
- package/dist/references/api/signatures/nocha.profiles.md +16 -0
- package/dist/references/api/signatures/nocha.ready.md +22 -0
- package/dist/references/api/signatures/nocha.screens.md +17 -0
- package/dist/references/api/signatures/nocha.search.md +10 -0
- package/dist/references/api/signatures/nocha.spaces.md +40 -0
- package/dist/references/api/signatures/nocha.state.md +22 -0
- package/dist/references/api/signatures/nocha.transfer.md +28 -0
- package/dist/references/api/signatures/nocha.use.md +10 -0
- package/dist/references/api/signatures/nocha.video.md +244 -0
- package/dist/references/api/signatures/nocha.viewport.md +34 -0
- package/dist/references/api/signatures/nocha.voice.md +28 -0
- package/dist/references/api/signatures/nocha.workspace.md +16 -0
- package/dist/references/api/signatures/registry.md +309 -0
- package/dist/references/api/signatures/server-exports.md +92 -0
- package/dist/references/api/signatures/watchirl.md +280 -0
- package/dist/references/api/signatures.md +58 -1291
- package/dist/references/base/NOCHA.json +42 -1
- package/dist/references/base/README.md +8 -7
- package/dist/references/base/SKILL.md +5 -5
- package/dist/references/base/index.html +2 -0
- package/dist/references/base/package-lock.json +427 -651
- package/dist/references/base/package.json +1 -1
- package/dist/references/base/server/tooling/sdk-plugin.ts +15 -5
- package/dist/references/base/server/tooling/sdk-sources.ts +3 -3
- package/dist/references/base/src/features/experience/application/start.ts +2 -2
- package/dist/references/base/src/features/experience/ui/components.ts +174 -12
- package/dist/references/base/src/features/experience/ui/home.ts +8 -7
- package/dist/references/base/src/features/experience/ui/mount.ts +30 -7
- package/dist/references/base/src/features/experience/ui/routes.ts +14 -3
- package/dist/references/base/src/locales/en.ts +7 -0
- package/dist/references/base/src/locales/fr.ts +8 -0
- package/dist/references/base/src/locales/index.ts +12 -0
- package/dist/references/base/src/main.ts +9 -2
- package/dist/references/base/src/platform/failure.ts +3 -97
- package/dist/references/base/src/platform/i18n.ts +83 -0
- package/dist/references/base/src/platform/nocha.ts +47 -4
- package/dist/references/base/src/platform/paging.ts +111 -0
- package/dist/references/base/src/platform/router.ts +235 -21
- package/dist/references/base/src/style.css +378 -51
- package/dist/references/base/src/types/nocha/index.d.ts +19393 -69
- package/dist/references/duel/NOCHA.json +6 -2
- package/dist/references/duel/README.md +2 -1
- package/dist/references/duel/index.html +1 -1
- package/dist/references/duel/package-lock.json +439 -621
- package/dist/references/duel/package.json +2 -2
- package/dist/references/duel/server/tooling/sdk-plugin.ts +15 -5
- package/dist/references/duel/server/tooling/sdk-sources.ts +3 -3
- package/dist/references/duel/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/README.md +31 -0
- package/dist/references/duel/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/index.d.ts +81 -0
- package/dist/references/duel/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/index.js +407 -0
- package/dist/references/duel/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/style.css +81 -0
- package/dist/references/duel/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/nocha-vendor.json +17 -0
- package/dist/references/duel/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/package.json +21 -0
- package/dist/references/duel/src/features/duel/api.ts +12 -11
- package/dist/references/duel/src/features/duel/model.ts +2 -1
- package/dist/references/duel/src/features/duel/renderer.ts +2 -1
- package/dist/references/duel/src/features/duel/ui.ts +17 -13
- package/dist/references/duel/src/locales/en.ts +43 -0
- package/dist/references/duel/src/locales/fr.ts +44 -0
- package/dist/references/duel/src/locales/index.ts +12 -0
- package/dist/references/duel/src/main.ts +9 -3
- package/dist/references/duel/src/platform/i18n.ts +83 -0
- package/dist/references/duel/src/types/nocha/index.d.ts +19393 -69
- package/dist/references/exploration/NOCHA.json +5 -1
- package/dist/references/exploration/README.md +2 -1
- package/dist/references/exploration/index.html +1 -1
- package/dist/references/exploration/package-lock.json +426 -650
- package/dist/references/exploration/package.json +2 -2
- package/dist/references/exploration/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/README.md +31 -0
- package/dist/references/exploration/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/index.d.ts +81 -0
- package/dist/references/exploration/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/index.js +407 -0
- package/dist/references/exploration/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/style.css +81 -0
- package/dist/references/exploration/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/nocha-vendor.json +17 -0
- package/dist/references/exploration/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/package.json +21 -0
- package/dist/references/exploration/src/features/exploration/model.ts +3 -1
- package/dist/references/exploration/src/features/exploration/renderer.ts +2 -1
- package/dist/references/exploration/src/features/exploration/ui.ts +8 -4
- package/dist/references/exploration/src/locales/en.ts +21 -0
- package/dist/references/exploration/src/locales/fr.ts +22 -0
- package/dist/references/exploration/src/locales/index.ts +12 -0
- package/dist/references/exploration/src/main.ts +9 -3
- package/dist/references/exploration/src/platform/i18n.ts +93 -0
- package/dist/references/guides/art-direction/SKILL.md +32 -42
- package/dist/references/packages/cli/README.md +6 -1
- package/dist/references/packages/experience-audio/README.md +68 -0
- package/dist/references/packages/experience-audio/SKILL.md +31 -0
- package/dist/references/packages/experience-input/README.md +4 -2
- package/dist/references/packages/experience-input/SKILL.md +1 -1
- package/dist/references/packages/experience-ui/README.md +79 -0
- package/dist/references/packages/experience-ui/SKILL.md +31 -0
- package/dist/references/packages/universe-foundation/README.md +63 -22
- package/dist/references/packages/universe-foundation/SKILL.md +4 -4
- package/dist/references/packages/world-ui/README.md +35 -1
- package/dist/references/platform/diagnostics.ts +66 -0
- package/dist/references/platform/failure.ts +6 -0
- package/dist/references/platform/lifecycle.ts +78 -0
- package/dist/references/platform/nocha.ts +103 -0
- package/dist/references/platform/paging.ts +112 -0
- package/dist/references/platform/router.ts +265 -0
- package/dist/references/platform/stored.ts +42 -0
- package/dist/references/racing/NOCHA.json +5 -1
- package/dist/references/racing/README.md +2 -1
- package/dist/references/racing/index.html +1 -1
- package/dist/references/racing/package-lock.json +426 -650
- package/dist/references/racing/package.json +2 -2
- package/dist/references/racing/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/README.md +31 -0
- package/dist/references/racing/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/index.d.ts +81 -0
- package/dist/references/racing/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/index.js +407 -0
- package/dist/references/racing/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/style.css +81 -0
- package/dist/references/racing/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/nocha-vendor.json +17 -0
- package/dist/references/racing/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/package.json +21 -0
- package/dist/references/racing/src/features/racing/model.ts +4 -1
- package/dist/references/racing/src/features/racing/renderer.ts +2 -1
- package/dist/references/racing/src/features/racing/ui.ts +8 -4
- package/dist/references/racing/src/locales/en.ts +21 -0
- package/dist/references/racing/src/locales/fr.ts +22 -0
- package/dist/references/racing/src/locales/index.ts +12 -0
- package/dist/references/racing/src/main.ts +9 -3
- package/dist/references/racing/src/platform/i18n.ts +93 -0
- package/dist/references/recipes/README.md +9 -3
- package/dist/references/recipes/ai-agent/NOCHA.json +94 -0
- package/dist/references/recipes/ai-agent/README.md +30 -0
- package/dist/references/recipes/ai-agent/SKILL.md +25 -0
- package/dist/references/recipes/ai-agent/recipe.ts +221 -0
- package/dist/references/recipes/ai-realtime-chat/NOCHA.json +3 -2
- package/dist/references/recipes/assistant-actions/README.md +34 -19
- package/dist/references/recipes/assistant-actions/SKILL.md +7 -9
- package/dist/references/recipes/assistant-actions/recipe.ts +61 -30
- package/dist/references/recipes/assistant-voice/NOCHA.json +1 -1
- package/dist/references/recipes/backend-transaction/NOCHA.json +6 -3
- package/dist/references/recipes/backend-transaction/README.md +22 -3
- package/dist/references/recipes/backend-transaction/SKILL.md +9 -4
- package/dist/references/recipes/backend-transaction/src/platform/failure.ts +3 -97
- package/dist/references/recipes/backend-transaction/src/platform/nocha.ts +47 -4
- package/dist/references/recipes/backend-transaction/src/platform/paging.ts +111 -0
- package/dist/references/recipes/backend-transaction/src/platform/router.ts +235 -21
- package/dist/references/recipes/database/NOCHA.json +71 -0
- package/dist/references/recipes/database/README.md +36 -0
- package/dist/references/recipes/database/SKILL.md +26 -0
- package/dist/references/recipes/database/recipe.ts +112 -0
- package/dist/references/recipes/device/NOCHA.json +2 -1
- package/dist/references/recipes/device/README.md +1 -1
- package/dist/references/recipes/device/SKILL.md +1 -1
- package/dist/references/recipes/device/recipe.ts +17 -1
- package/dist/references/recipes/drive/NOCHA.json +24 -0
- package/dist/references/recipes/drive/README.md +15 -0
- package/dist/references/recipes/drive/SKILL.md +24 -0
- package/dist/references/recipes/drive/recipe.ts +34 -0
- package/dist/references/recipes/email/NOCHA.json +1 -1
- package/dist/references/recipes/experience-calls/NOCHA.json +56 -0
- package/dist/references/recipes/experience-calls/README.md +16 -0
- package/dist/references/recipes/experience-calls/SKILL.md +24 -0
- package/dist/references/recipes/experience-calls/recipe.ts +44 -0
- package/dist/references/recipes/hardware/NOCHA.json +43 -0
- package/dist/references/recipes/hardware/README.md +15 -0
- package/dist/references/recipes/hardware/SKILL.md +24 -0
- package/dist/references/recipes/hardware/recipe.ts +33 -0
- package/dist/references/recipes/home-interface/NOCHA.json +54 -0
- package/dist/references/recipes/home-interface/SKILL.md +110 -0
- package/dist/references/recipes/home-interface/demo-data.ts +206 -0
- package/dist/references/recipes/home-interface/recipe.ts +588 -0
- package/dist/references/recipes/home-interface/scene/NOTICE +18 -0
- package/dist/references/recipes/home-interface/scene/boucle.ts +226 -0
- package/dist/references/recipes/home-interface/scene/fond.ts +220 -0
- package/dist/references/recipes/home-interface/scene/glsl.ts +95 -0
- package/dist/references/recipes/home-interface/scene/lieu.ts +93 -0
- package/dist/references/recipes/home-interface/scene/mouvement.ts +128 -0
- package/dist/references/recipes/home-interface/scene/profondeur.ts +60 -0
- package/dist/references/recipes/home-interface/scene/scene.css +51 -0
- package/dist/references/recipes/home-interface/scene/scene.ts +46 -0
- package/dist/references/recipes/home-interface/scene/teinte.ts +93 -0
- package/dist/references/recipes/i18n/README.md +26 -0
- package/dist/references/recipes/i18n/SKILL.md +22 -0
- package/dist/references/recipes/i18n/recipe.ts +86 -0
- package/dist/references/recipes/image-transformation/NOCHA.json +5 -3
- package/dist/references/recipes/image-transformation/README.md +1 -1
- package/dist/references/recipes/image-video-loop/NOCHA.json +7 -4
- package/dist/references/recipes/image-video-loop/src/features/video/api.ts +2 -2
- package/dist/references/recipes/image-video-loop/src/features/video/workflow.ts +6 -2
- package/dist/references/recipes/inbox/NOCHA.json +1 -1
- package/dist/references/recipes/multiplayer-canvas/NOCHA.json +3 -2
- package/dist/references/recipes/music/NOCHA.json +5 -4
- package/dist/references/recipes/music/README.md +1 -1
- package/dist/references/recipes/navigation/README.md +28 -0
- package/dist/references/recipes/navigation/SKILL.md +22 -0
- package/dist/references/recipes/network/NOCHA.json +1 -1
- package/dist/references/recipes/network/README.md +1 -1
- package/dist/references/recipes/network/recipe.ts +4 -3
- package/dist/references/recipes/notifications/NOCHA.json +13 -2
- package/dist/references/recipes/notifications/README.md +12 -4
- package/dist/references/recipes/notifications/SKILL.md +5 -4
- package/dist/references/recipes/notifications/recipe.ts +35 -1
- package/dist/references/recipes/package.json +2 -2
- package/dist/references/recipes/search/NOCHA.json +90 -0
- package/dist/references/recipes/search/README.md +43 -0
- package/dist/references/recipes/search/SKILL.md +24 -0
- package/dist/references/recipes/search/recipe.ts +160 -0
- package/dist/references/recipes/spaces/NOCHA.json +88 -0
- package/dist/references/recipes/spaces/README.md +10 -0
- package/dist/references/recipes/spaces/SKILL.md +23 -0
- package/dist/references/recipes/spaces/recipe.ts +61 -0
- package/dist/references/recipes/state-memory/NOCHA.json +11 -19
- package/dist/references/recipes/state-memory/README.md +6 -4
- package/dist/references/recipes/state-memory/SKILL.md +4 -3
- package/dist/references/recipes/state-memory/recipe.ts +65 -30
- package/dist/references/recipes/text-research/NOCHA.json +1 -1
- package/dist/references/recipes/three-room/README.md +2 -2
- package/dist/references/recipes/three-room/src/features/room/index.ts +3 -2
- package/dist/references/recipes/three-stage/README.md +2 -2
- package/dist/references/recipes/three-stage/src/features/stage/model.ts +17 -15
- package/dist/references/recipes/three-stage/src/features/stage/scene.ts +3 -2
- package/dist/references/recipes/three-stage/src/locales/en.ts +24 -0
- package/dist/references/recipes/three-stage/src/locales/fr.ts +25 -0
- package/dist/references/recipes/three-stage/src/locales/index.ts +13 -0
- package/dist/references/recipes/three-stage/src/platform/i18n.ts +84 -0
- package/dist/references/recipes/types/nocha/ai-operations.d.ts +81 -0
- package/dist/references/recipes/types/nocha/ai-voice-catalogue.d.ts +19 -0
- package/dist/references/recipes/types/nocha/ai.d.ts +2 -1
- package/dist/references/recipes/types/nocha/assets-media.d.ts +13 -0
- package/dist/references/recipes/types/nocha/assets-operations.d.ts +109 -0
- package/dist/references/recipes/types/nocha/assistant-open.d.ts +21 -0
- package/dist/references/recipes/types/nocha/assistant-paid.d.ts +18 -0
- package/dist/references/recipes/types/nocha/assistant.d.ts +44 -0
- package/dist/references/recipes/types/nocha/attachments.d.ts +1 -1
- package/dist/references/recipes/types/nocha/audio-media.d.ts +19 -0
- package/dist/references/recipes/types/nocha/backend-database.d.ts +15 -5
- package/dist/references/recipes/types/nocha/backend-media.d.ts +43 -0
- package/dist/references/recipes/types/nocha/backend-runtime.d.ts +36 -0
- package/dist/references/recipes/types/nocha/backend-search.d.ts +33 -0
- package/dist/references/recipes/types/nocha/backend-server-query.d.ts +26 -0
- package/dist/references/recipes/types/nocha/backend-server.d.ts +48 -2
- package/dist/references/recipes/types/nocha/backend-transactions.d.ts +32 -1
- package/dist/references/recipes/types/nocha/capabilities.d.ts +2 -2
- package/dist/references/recipes/types/nocha/capability-deadlines.d.ts +66 -1
- package/dist/references/recipes/types/nocha/capability-needs.d.ts +14 -0
- package/dist/references/recipes/types/nocha/capability-operations.d.ts +43 -9
- package/dist/references/recipes/types/nocha/capability-registry.d.ts +18 -0
- package/dist/references/recipes/types/nocha/character-package-types.d.ts +108 -0
- package/dist/references/recipes/types/nocha/clipping-types.d.ts +2 -0
- package/dist/references/recipes/types/nocha/content-refusal.d.ts +11 -0
- package/dist/references/recipes/types/nocha/context.d.ts +4 -0
- package/dist/references/recipes/types/nocha/database-watch.d.ts +13 -0
- package/dist/references/recipes/types/nocha/device-operations.d.ts +6 -0
- package/dist/references/recipes/types/nocha/device-types.d.ts +31 -1
- package/dist/references/recipes/types/nocha/drive-operations.d.ts +56 -0
- package/dist/references/recipes/types/nocha/drive-types.d.ts +77 -0
- package/dist/references/recipes/types/nocha/drive.d.ts +54 -0
- package/dist/references/recipes/types/nocha/error-codes.d.ts +240 -34
- package/dist/references/recipes/types/nocha/excerpts-operations.d.ts +79 -0
- package/dist/references/recipes/types/nocha/excerpts-types.d.ts +43 -0
- package/dist/references/recipes/types/nocha/excerpts.d.ts +17 -0
- package/dist/references/recipes/types/nocha/execution.d.ts +5 -4
- package/dist/references/recipes/types/nocha/experience-context-types.d.ts +17 -0
- package/dist/references/recipes/types/nocha/experience-context.d.ts +5 -1
- package/dist/references/recipes/types/nocha/experiences-operations.d.ts +218 -0
- package/dist/references/recipes/types/nocha/experiences-types.d.ts +93 -0
- package/dist/references/recipes/types/nocha/experiences.d.ts +47 -0
- package/dist/references/recipes/types/nocha/external-protocol.d.ts +76 -0
- package/dist/references/recipes/types/nocha/failure.d.ts +58 -0
- package/dist/references/recipes/types/nocha/fault.d.ts +6 -0
- package/dist/references/recipes/types/nocha/gamepad-target.d.ts +5 -0
- package/dist/references/recipes/types/nocha/gamepad-types.d.ts +63 -0
- package/dist/references/recipes/types/nocha/gamepad.d.ts +21 -0
- package/dist/references/recipes/types/nocha/generation-input.d.ts +7 -3
- package/dist/references/recipes/types/nocha/guards.d.ts +8 -0
- package/dist/references/recipes/types/nocha/haptics-types.d.ts +31 -0
- package/dist/references/recipes/types/nocha/haptics.d.ts +8 -0
- package/dist/references/recipes/types/nocha/hardware-operations.d.ts +353 -0
- package/dist/references/recipes/types/nocha/hardware.d.ts +32 -0
- package/dist/references/recipes/types/nocha/host-channels.d.ts +11 -0
- package/dist/references/recipes/types/nocha/host-feed.d.ts +27 -0
- package/dist/references/recipes/types/nocha/host-operations.d.ts +89 -0
- package/dist/references/recipes/types/nocha/host-types.d.ts +106 -0
- package/dist/references/recipes/types/nocha/host-upload.d.ts +35 -0
- package/dist/references/recipes/types/nocha/hosting.d.ts +17 -0
- package/dist/references/recipes/types/nocha/index.d.ts +153 -7
- package/dist/references/recipes/types/nocha/language-match.d.ts +8 -0
- package/dist/references/recipes/types/nocha/language.d.ts +18 -0
- package/dist/references/recipes/types/nocha/library-operations.d.ts +430 -0
- package/dist/references/recipes/types/nocha/library-types.d.ts +325 -0
- package/dist/references/recipes/types/nocha/library.d.ts +58 -0
- package/dist/references/recipes/types/nocha/link-operations.d.ts +32 -0
- package/dist/references/recipes/types/nocha/link-types.d.ts +17 -0
- package/dist/references/recipes/types/nocha/link.d.ts +21 -0
- package/dist/references/recipes/types/nocha/live-media-failure.d.ts +40 -0
- package/dist/references/recipes/types/nocha/live-media-status.d.ts +7 -0
- package/dist/references/recipes/types/nocha/live-media.d.ts +9 -1
- package/dist/references/recipes/types/nocha/machine-operations.d.ts +1135 -0
- package/dist/references/recipes/types/nocha/machine-streams.d.ts +4 -0
- package/dist/references/recipes/types/nocha/machine.d.ts +77 -0
- package/dist/references/recipes/types/nocha/media-read.d.ts +37 -0
- package/dist/references/recipes/types/nocha/module-types.d.ts +53 -0
- package/dist/references/recipes/types/nocha/module.d.ts +7 -0
- package/dist/references/recipes/types/nocha/navigation-capture.d.ts +32 -0
- package/dist/references/recipes/types/nocha/navigation.d.ts +11 -0
- package/dist/references/recipes/types/nocha/notifications-operations.d.ts +78 -1
- package/dist/references/recipes/types/nocha/notifications.d.ts +11 -1
- package/dist/references/recipes/types/nocha/operation-metadata.d.ts +3 -2
- package/dist/references/recipes/types/nocha/operation-waiting.d.ts +55 -1
- package/dist/references/recipes/types/nocha/operation-wire-types.d.ts +221 -18
- package/dist/references/recipes/types/nocha/places-operations.d.ts +79 -0
- package/dist/references/recipes/types/nocha/places-types.d.ts +40 -0
- package/dist/references/recipes/types/nocha/places.d.ts +13 -0
- package/dist/references/recipes/types/nocha/player.d.ts +9 -0
- package/dist/references/recipes/types/nocha/profiles-operations.d.ts +55 -0
- package/dist/references/recipes/types/nocha/profiles-types.d.ts +33 -0
- package/dist/references/recipes/types/nocha/profiles.d.ts +18 -0
- package/dist/references/recipes/types/nocha/protocol.d.ts +142 -12
- package/dist/references/recipes/types/nocha/screens-operations.d.ts +21 -0
- package/dist/references/recipes/types/nocha/screens-types.d.ts +60 -0
- package/dist/references/recipes/types/nocha/screens.d.ts +17 -0
- package/dist/references/recipes/types/nocha/search-operations.d.ts +435 -0
- package/dist/references/recipes/types/nocha/search-results.d.ts +12 -0
- package/dist/references/recipes/types/nocha/search-types.d.ts +249 -0
- package/dist/references/recipes/types/nocha/search.d.ts +41 -0
- package/dist/references/recipes/types/nocha/shared-usage.d.ts +5 -0
- package/dist/references/recipes/types/nocha/shortcut-keys.d.ts +49 -0
- package/dist/references/recipes/types/nocha/spaces-types.d.ts +37 -0
- package/dist/references/recipes/types/nocha/spaces.d.ts +34 -0
- package/dist/references/recipes/types/nocha/speech-rules.d.ts +66 -0
- package/dist/references/recipes/types/nocha/speech-voices.d.ts +88 -0
- package/dist/references/recipes/types/nocha/storage-operation-types.d.ts +11 -3
- package/dist/references/recipes/types/nocha/storage-operations.d.ts +71 -1
- package/dist/references/recipes/types/nocha/storage.d.ts +25 -3
- package/dist/references/recipes/types/nocha/transfer-payload.d.ts +15 -0
- package/dist/references/recipes/types/nocha/transfer-preview.d.ts +4 -0
- package/dist/references/recipes/types/nocha/transfer-runtime.d.ts +23 -0
- package/dist/references/recipes/types/nocha/transfer-source.d.ts +30 -0
- package/dist/references/recipes/types/nocha/transfer-types.d.ts +221 -0
- package/dist/references/recipes/types/nocha/transfer-zones.d.ts +26 -0
- package/dist/references/recipes/types/nocha/transfer.d.ts +148 -0
- package/dist/references/recipes/types/nocha/transport.d.ts +7 -6
- package/dist/references/recipes/types/nocha/types/ai-wire.d.ts +382 -16
- package/dist/references/recipes/types/nocha/types/ai.d.ts +14 -4
- package/dist/references/recipes/types/nocha/types/assets-wire.d.ts +55 -1
- package/dist/references/recipes/types/nocha/types/assets.d.ts +46 -9
- package/dist/references/recipes/types/nocha/types/hardware.d.ts +327 -0
- package/dist/references/recipes/types/nocha/types/machine-workspace.d.ts +684 -0
- package/dist/references/recipes/types/nocha/types/machine.d.ts +279 -0
- package/dist/references/recipes/types/nocha/types/storage.d.ts +72 -2
- package/dist/references/recipes/types/nocha/types/video-projects-wire.d.ts +203 -0
- package/dist/references/recipes/types/nocha/types/video-sdk-wire.d.ts +192 -13
- package/dist/references/recipes/types/nocha/types/video-wire.d.ts +127 -7
- package/dist/references/recipes/types/nocha/types/video.d.ts +79 -3
- package/dist/references/recipes/types/nocha/types/voice-wire.d.ts +42 -6
- package/dist/references/recipes/types/nocha/ui-host.d.ts +44 -0
- package/dist/references/recipes/types/nocha/ui-text.d.ts +20 -0
- package/dist/references/recipes/types/nocha/ui-theme.d.ts +12 -0
- package/dist/references/recipes/types/nocha/validate.d.ts +51 -0
- package/dist/references/recipes/types/nocha/video-analysis.d.ts +12 -0
- package/dist/references/recipes/types/nocha/video-media.d.ts +1 -3
- package/dist/references/recipes/types/nocha/video-operations.d.ts +282 -1
- package/dist/references/recipes/types/nocha/video-playback.d.ts +14 -0
- package/dist/references/recipes/types/nocha/video-presentation.d.ts +55 -0
- package/dist/references/recipes/types/nocha/video-projects.d.ts +5 -0
- package/dist/references/recipes/types/nocha/video-settings-bridge.d.ts +22 -0
- package/dist/references/recipes/types/nocha/video-settings-controls.d.ts +42 -0
- package/dist/references/recipes/types/nocha/video-settings-css.d.ts +5 -0
- package/dist/references/recipes/types/nocha/video-settings-media.d.ts +16 -0
- package/dist/references/recipes/types/nocha/video-settings-state.d.ts +60 -0
- package/dist/references/recipes/types/nocha/video-settings-types.d.ts +296 -0
- package/dist/references/recipes/types/nocha/video-settings.d.ts +28 -0
- package/dist/references/recipes/types/nocha/video-workflow-picker.d.ts +25 -0
- package/dist/references/recipes/types/nocha/video-workflow-rules.d.ts +112 -0
- package/dist/references/recipes/types/nocha/viewport-types.d.ts +15 -0
- package/dist/references/recipes/types/nocha/viewport.d.ts +11 -1
- package/dist/references/recipes/types/nocha/voice-audition.d.ts +38 -0
- package/dist/references/recipes/types/nocha/voice-browser-categories.d.ts +38 -0
- package/dist/references/recipes/types/nocha/voice-browser-core.d.ts +32 -0
- package/dist/references/recipes/types/nocha/voice-browser.d.ts +12 -0
- package/dist/references/recipes/types/nocha/voice-favorites-account.d.ts +29 -0
- package/dist/references/recipes/types/nocha/voice-field.d.ts +11 -0
- package/dist/references/recipes/types/nocha/voice-imagine-toggle.d.ts +30 -0
- package/dist/references/recipes/types/nocha/voice-listing.d.ts +66 -0
- package/dist/references/recipes/types/nocha/voice-memory.d.ts +32 -0
- package/dist/references/recipes/types/nocha/voice-picker-bar.d.ts +31 -0
- package/dist/references/recipes/types/nocha/voice-picker-css.d.ts +4 -0
- package/dist/references/recipes/types/nocha/voice-picker-data.d.ts +92 -0
- package/dist/references/recipes/types/nocha/voice-picker-facets.d.ts +50 -0
- package/dist/references/recipes/types/nocha/voice-picker-list.d.ts +39 -0
- package/dist/references/recipes/types/nocha/voice-picker-models.d.ts +44 -0
- package/dist/references/recipes/types/nocha/voice-picker-row.d.ts +56 -0
- package/dist/references/recipes/types/nocha/voice-picker-state.d.ts +54 -0
- package/dist/references/recipes/types/nocha/voice-picker-types.d.ts +246 -0
- package/dist/references/recipes/types/nocha/voice-picker.d.ts +18 -0
- package/dist/references/recipes/types/nocha/voice-random.d.ts +52 -0
- package/dist/references/recipes/types/nocha/voice-recovery.d.ts +10 -0
- package/dist/references/recipes/types/nocha/voice-system-picker.d.ts +12 -0
- package/dist/references/recipes/types/nocha/voice.d.ts +5 -2
- package/dist/references/recipes/types/nocha/workspace.d.ts +3 -0
- package/dist/references/shooter/NOCHA.json +5 -1
- package/dist/references/shooter/README.md +2 -1
- package/dist/references/shooter/index.html +1 -1
- package/dist/references/shooter/package-lock.json +426 -650
- package/dist/references/shooter/package.json +2 -2
- package/dist/references/shooter/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/README.md +31 -0
- package/dist/references/shooter/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/index.d.ts +81 -0
- package/dist/references/shooter/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/index.js +407 -0
- package/dist/references/shooter/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/lib/style.css +81 -0
- package/dist/references/shooter/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/nocha-vendor.json +17 -0
- package/dist/references/shooter/server/vendor/experience-input/0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c/package.json +21 -0
- package/dist/references/shooter/src/features/shooter/model.ts +3 -1
- package/dist/references/shooter/src/features/shooter/renderer.ts +2 -1
- package/dist/references/shooter/src/features/shooter/ui.ts +8 -4
- package/dist/references/shooter/src/locales/en.ts +24 -0
- package/dist/references/shooter/src/locales/fr.ts +25 -0
- package/dist/references/shooter/src/locales/index.ts +12 -0
- package/dist/references/shooter/src/main.ts +9 -3
- package/dist/references/shooter/src/platform/i18n.ts +93 -0
- package/dist/references/stage/NOCHA.json +5 -1
- package/dist/references/stage/README.md +4 -4
- package/dist/references/stage/SKILL.md +1 -1
- package/dist/references/stage/index.html +2 -0
- package/dist/references/stage/package-lock.json +521 -740
- package/dist/references/stage/package.json +2 -2
- package/dist/references/stage/server/tooling/sdk-plugin.ts +15 -5
- package/dist/references/stage/server/tooling/sdk-sources.ts +3 -3
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/README.md +71 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/lib/pointer.d.ts +82 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/lib/pointer.js +273 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/lib/types.d.ts +337 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/lib/universe.css +14 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/lib/universe.d.ts +57 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/lib/universe.js +205 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/lib/viewport.d.ts +17 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/lib/widget-types.js +1 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/nocha-vendor.json +108 -0
- package/dist/references/stage/server/vendor/world-ui/0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/package.json +34 -0
- package/dist/references/stage/src/features/stage/model.ts +17 -15
- package/dist/references/stage/src/features/stage/scene.ts +3 -2
- package/dist/references/stage/src/locales/en.ts +23 -0
- package/dist/references/stage/src/locales/fr.ts +24 -0
- package/dist/references/stage/src/locales/index.ts +12 -0
- package/dist/references/stage/src/main.ts +9 -3
- package/dist/references/stage/src/platform/i18n.ts +83 -0
- package/dist/references/stage/src/types/nocha/index.d.ts +19393 -69
- package/dist/references/stage/vite.config.ts +1 -1
- package/dist/references/workshop/NOCHA.json +23 -10
- package/dist/references/workshop/README.md +4 -2
- package/dist/references/workshop/index.html +1 -0
- package/dist/references/workshop/package-lock.json +515 -739
- package/dist/references/workshop/package.json +1 -1
- package/dist/references/workshop/server/app/domain/schemas.ts +2 -1
- package/dist/references/workshop/server/app/domain/workshop.ts +6 -3
- package/dist/references/workshop/server/tooling/sdk-plugin.ts +15 -5
- package/dist/references/workshop/server/tooling/sdk-sources.ts +3 -3
- package/dist/references/workshop/src/features/proposals/api.ts +17 -16
- package/dist/references/workshop/src/features/proposals/controller.ts +18 -18
- package/dist/references/workshop/src/features/proposals/index.ts +4 -3
- package/dist/references/workshop/src/features/proposals/view.ts +16 -13
- package/dist/references/workshop/src/locales/en.ts +75 -0
- package/dist/references/workshop/src/locales/fr.ts +76 -0
- package/dist/references/workshop/src/locales/index.ts +12 -0
- package/dist/references/workshop/src/main.ts +6 -2
- package/dist/references/workshop/src/platform/failure.ts +3 -97
- package/dist/references/workshop/src/platform/i18n.ts +83 -0
- package/dist/references/workshop/src/platform/nocha.ts +4 -3
- package/dist/references/workshop/src/styles.css +1 -1
- package/dist/references/workshop/src/types/nocha/backend-server.d.ts +14601 -11
- package/dist/references/workshop/src/types/nocha/index.d.ts +4755 -69
- package/dist/sdk-versions.json +2 -2
- package/dist/sdks/@nocha/sdk/dist/ai-operations.d.ts +81 -0
- package/dist/sdks/@nocha/sdk/dist/assets-operations.d.ts +109 -0
- package/dist/sdks/@nocha/sdk/dist/assistant-open.d.ts +20 -0
- package/dist/sdks/@nocha/sdk/dist/assistant-paid.d.ts +17 -0
- package/dist/sdks/@nocha/sdk/dist/assistant.d.ts +44 -0
- package/dist/sdks/@nocha/sdk/dist/audio-media.d.ts +18 -0
- package/dist/sdks/@nocha/sdk/dist/backend-database.d.ts +15 -5
- package/dist/sdks/@nocha/sdk/dist/backend-media.d.ts +42 -0
- package/dist/sdks/@nocha/sdk/dist/backend-runtime.d.ts +36 -0
- package/dist/sdks/@nocha/sdk/dist/backend-search.d.ts +32 -0
- package/dist/sdks/@nocha/sdk/dist/backend-server-host-core.d.ts +26 -3
- package/dist/sdks/@nocha/sdk/dist/backend-server-host.d.ts +1 -1
- package/dist/sdks/@nocha/sdk/dist/backend-server-host.js +261 -26
- package/dist/sdks/@nocha/sdk/dist/backend-server-query.d.ts +25 -0
- package/dist/sdks/@nocha/sdk/dist/backend-server.d.ts +48 -2
- package/dist/sdks/@nocha/sdk/dist/backend-server.js +36 -2
- package/dist/sdks/@nocha/sdk/dist/backend-transactions.d.ts +32 -1
- package/dist/sdks/@nocha/sdk/dist/bridge.js +3 -3
- package/dist/sdks/@nocha/sdk/dist/capabilities.d.ts +2 -2
- package/dist/sdks/@nocha/sdk/dist/capabilities.js +12 -2
- package/dist/sdks/@nocha/sdk/dist/capability-deadlines.d.ts +66 -1
- package/dist/sdks/@nocha/sdk/dist/capability-needs.d.ts +14 -0
- package/dist/sdks/@nocha/sdk/dist/capability-operations.d.ts +43 -9
- package/dist/sdks/@nocha/sdk/dist/capability-registry.d.ts +17 -0
- package/dist/sdks/@nocha/sdk/dist/character-package-types.d.ts +107 -0
- package/dist/sdks/@nocha/sdk/dist/chunk-AJF3E3TH.js +26 -0
- package/dist/sdks/@nocha/sdk/dist/chunk-DGHVP7N5.js +3835 -0
- package/dist/sdks/@nocha/sdk/dist/chunk-EIYOBJTN.js +330 -0
- package/dist/sdks/@nocha/sdk/dist/chunk-Z4YFZ7FO.js +108 -0
- package/dist/sdks/@nocha/sdk/dist/clipping-types.d.ts +2 -0
- package/dist/sdks/@nocha/sdk/dist/content-refusal.d.ts +10 -0
- package/dist/sdks/@nocha/sdk/dist/context.d.ts +4 -0
- package/dist/sdks/@nocha/sdk/dist/database-watch.d.ts +12 -0
- package/dist/sdks/@nocha/sdk/dist/device-operations.d.ts +6 -0
- package/dist/sdks/@nocha/sdk/dist/device-types.d.ts +31 -1
- package/dist/sdks/@nocha/sdk/dist/drive-operations.d.ts +55 -0
- package/dist/sdks/@nocha/sdk/dist/drive-types.d.ts +76 -0
- package/dist/sdks/@nocha/sdk/dist/drive.d.ts +53 -0
- package/dist/sdks/@nocha/sdk/dist/error-codes.d.ts +240 -34
- package/dist/sdks/@nocha/sdk/dist/excerpts-operations.d.ts +78 -0
- package/dist/sdks/@nocha/sdk/dist/excerpts-types.d.ts +42 -0
- package/dist/sdks/@nocha/sdk/dist/excerpts.d.ts +16 -0
- package/dist/sdks/@nocha/sdk/dist/execution.d.ts +5 -4
- package/dist/sdks/@nocha/sdk/dist/experience-context-host.d.ts +9 -6
- package/dist/sdks/@nocha/sdk/dist/experience-context-types.d.ts +17 -0
- package/dist/sdks/@nocha/sdk/dist/experience-context.d.ts +5 -1
- package/dist/sdks/@nocha/sdk/dist/experiences-operations.d.ts +217 -0
- package/dist/sdks/@nocha/sdk/dist/experiences-types.d.ts +92 -0
- package/dist/sdks/@nocha/sdk/dist/experiences.d.ts +46 -0
- package/dist/sdks/@nocha/sdk/dist/external-protocol.d.ts +75 -0
- package/dist/sdks/@nocha/sdk/dist/failure.d.ts +57 -0
- package/dist/sdks/@nocha/sdk/dist/gamepad-types.d.ts +62 -0
- package/dist/sdks/@nocha/sdk/dist/gamepad.d.ts +20 -0
- package/dist/sdks/@nocha/sdk/dist/guards.d.ts +20 -0
- package/dist/sdks/@nocha/sdk/dist/haptics-types.d.ts +30 -0
- package/dist/sdks/@nocha/sdk/dist/hardware-operations.d.ts +352 -0
- package/dist/sdks/@nocha/sdk/dist/hardware.d.ts +31 -0
- package/dist/sdks/@nocha/sdk/dist/host-channels.d.ts +10 -0
- package/dist/sdks/@nocha/sdk/dist/host-feed.d.ts +26 -0
- package/dist/sdks/@nocha/sdk/dist/host-operations.d.ts +88 -0
- package/dist/sdks/@nocha/sdk/dist/host-types.d.ts +105 -0
- package/dist/sdks/@nocha/sdk/dist/host.d.ts +3 -1
- package/dist/sdks/@nocha/sdk/dist/host.js +691 -12
- package/dist/sdks/@nocha/sdk/dist/hosting.d.ts +16 -0
- package/dist/sdks/@nocha/sdk/dist/index.d.ts +153 -7
- package/dist/sdks/@nocha/sdk/dist/index.js +12769 -1343
- package/dist/sdks/@nocha/sdk/dist/language-match.d.ts +7 -0
- package/dist/sdks/@nocha/sdk/dist/language.d.ts +17 -0
- package/dist/sdks/@nocha/sdk/dist/library-operations.d.ts +429 -0
- package/dist/sdks/@nocha/sdk/dist/library-types.d.ts +324 -0
- package/dist/sdks/@nocha/sdk/dist/library.d.ts +57 -0
- package/dist/sdks/@nocha/sdk/dist/link-operations.d.ts +31 -0
- package/dist/sdks/@nocha/sdk/dist/link-types.d.ts +16 -0
- package/dist/sdks/@nocha/sdk/dist/link.d.ts +20 -0
- package/dist/sdks/@nocha/sdk/dist/live-media-failure.d.ts +39 -0
- package/dist/sdks/@nocha/sdk/dist/machine-operations.d.ts +1134 -0
- package/dist/sdks/@nocha/sdk/dist/machine-stream-host.d.ts +16 -0
- package/dist/sdks/@nocha/sdk/dist/machine-stream-types.d.ts +168 -0
- package/dist/sdks/@nocha/sdk/dist/machine.d.ts +76 -0
- package/dist/sdks/@nocha/sdk/dist/module-types.d.ts +52 -0
- package/dist/sdks/@nocha/sdk/dist/navigation-capture.d.ts +31 -0
- package/dist/sdks/@nocha/sdk/dist/navigation-host.d.ts +6 -0
- package/dist/sdks/@nocha/sdk/dist/navigation.d.ts +11 -0
- package/dist/sdks/@nocha/sdk/dist/notifications-operations.d.ts +78 -1
- package/dist/sdks/@nocha/sdk/dist/notifications.d.ts +11 -1
- package/dist/sdks/@nocha/sdk/dist/operation-metadata.d.ts +3 -2
- package/dist/sdks/@nocha/sdk/dist/operation-wire-types.d.ts +221 -18
- package/dist/sdks/@nocha/sdk/dist/places-operations.d.ts +78 -0
- package/dist/sdks/@nocha/sdk/dist/places-types.d.ts +39 -0
- package/dist/sdks/@nocha/sdk/dist/places.d.ts +12 -0
- package/dist/sdks/@nocha/sdk/dist/player.d.ts +8 -0
- package/dist/sdks/@nocha/sdk/dist/profiles-operations.d.ts +54 -0
- package/dist/sdks/@nocha/sdk/dist/profiles-types.d.ts +32 -0
- package/dist/sdks/@nocha/sdk/dist/profiles.d.ts +17 -0
- package/dist/sdks/@nocha/sdk/dist/protocol.d.ts +142 -12
- package/dist/sdks/@nocha/sdk/dist/protocol.js +407 -11
- package/dist/sdks/@nocha/sdk/dist/screens-operations.d.ts +20 -0
- package/dist/sdks/@nocha/sdk/dist/screens-types.d.ts +59 -0
- package/dist/sdks/@nocha/sdk/dist/screens.d.ts +16 -0
- package/dist/sdks/@nocha/sdk/dist/search-operations.d.ts +434 -0
- package/dist/sdks/@nocha/sdk/dist/search-types.d.ts +248 -0
- package/dist/sdks/@nocha/sdk/dist/search.d.ts +40 -0
- package/dist/sdks/@nocha/sdk/dist/self-hosted.d.ts +66 -0
- package/dist/sdks/@nocha/sdk/dist/self-hosted.js +4117 -0
- package/dist/sdks/@nocha/sdk/dist/server-chunk-EFI5ST2P.js +134 -0
- package/dist/sdks/@nocha/sdk/dist/shared-usage.d.ts +4 -0
- package/dist/sdks/@nocha/sdk/dist/shortcut-keys.d.ts +48 -0
- package/dist/sdks/@nocha/sdk/dist/spaces-types.d.ts +36 -0
- package/dist/sdks/@nocha/sdk/dist/spaces.d.ts +33 -0
- package/dist/sdks/@nocha/sdk/dist/speech-rules.d.ts +65 -0
- package/dist/sdks/@nocha/sdk/dist/speech-voices.d.ts +87 -0
- package/dist/sdks/@nocha/sdk/dist/storage-operation-types.d.ts +11 -3
- package/dist/sdks/@nocha/sdk/dist/storage-operations.d.ts +71 -1
- package/dist/sdks/@nocha/sdk/dist/storage.d.ts +25 -3
- package/dist/sdks/@nocha/sdk/dist/transfer-types.d.ts +220 -0
- package/dist/sdks/@nocha/sdk/dist/transfer.d.ts +147 -0
- package/dist/sdks/@nocha/sdk/dist/transport.d.ts +7 -6
- package/dist/sdks/@nocha/sdk/dist/types/ai-wire.d.ts +382 -16
- package/dist/sdks/@nocha/sdk/dist/types/ai.d.ts +14 -4
- package/dist/sdks/@nocha/sdk/dist/types/assets-wire.d.ts +55 -1
- package/dist/sdks/@nocha/sdk/dist/types/assets.d.ts +46 -9
- package/dist/sdks/@nocha/sdk/dist/types/hardware.d.ts +326 -0
- package/dist/sdks/@nocha/sdk/dist/types/machine-workspace.d.ts +683 -0
- package/dist/sdks/@nocha/sdk/dist/types/machine.d.ts +278 -0
- package/dist/sdks/@nocha/sdk/dist/types/storage.d.ts +72 -2
- package/dist/sdks/@nocha/sdk/dist/types/video-projects-wire.d.ts +202 -0
- package/dist/sdks/@nocha/sdk/dist/types/video-sdk-wire.d.ts +192 -13
- package/dist/sdks/@nocha/sdk/dist/types/video-wire.d.ts +127 -7
- package/dist/sdks/@nocha/sdk/dist/types/video.d.ts +79 -3
- package/dist/sdks/@nocha/sdk/dist/types/voice-wire.d.ts +42 -6
- package/dist/sdks/@nocha/sdk/dist/ui-text.d.ts +19 -0
- package/dist/sdks/@nocha/sdk/dist/usage-facade.d.ts +2 -1
- package/dist/sdks/@nocha/sdk/dist/validate.d.ts +50 -0
- package/dist/sdks/@nocha/sdk/dist/video-analysis.d.ts +11 -0
- package/dist/sdks/@nocha/sdk/dist/video-operations.d.ts +282 -1
- package/dist/sdks/@nocha/sdk/dist/video-presentation.d.ts +54 -0
- package/dist/sdks/@nocha/sdk/dist/video-settings-bridge.d.ts +21 -0
- package/dist/sdks/@nocha/sdk/dist/video-settings-state.d.ts +59 -0
- package/dist/sdks/@nocha/sdk/dist/video-settings-types.d.ts +295 -0
- package/dist/sdks/@nocha/sdk/dist/video-settings.d.ts +27 -0
- package/dist/sdks/@nocha/sdk/dist/video-workflow-picker.d.ts +24 -0
- package/dist/sdks/@nocha/sdk/dist/video-workflow-rules.d.ts +111 -0
- package/dist/sdks/@nocha/sdk/dist/viewport-types.d.ts +15 -0
- package/dist/sdks/@nocha/sdk/dist/viewport.d.ts +11 -1
- package/dist/sdks/@nocha/sdk/dist/vite.js +24 -2
- package/dist/sdks/@nocha/sdk/dist/voice-audition.d.ts +37 -0
- package/dist/sdks/@nocha/sdk/dist/voice-browser.d.ts +11 -0
- package/dist/sdks/@nocha/sdk/dist/voice-favorites-account.d.ts +28 -0
- package/dist/sdks/@nocha/sdk/dist/voice-field.d.ts +10 -0
- package/dist/sdks/@nocha/sdk/dist/voice-imagine-toggle.d.ts +29 -0
- package/dist/sdks/@nocha/sdk/dist/voice-picker-types.d.ts +245 -0
- package/dist/sdks/@nocha/sdk/dist/voice-picker.d.ts +17 -0
- package/dist/sdks/@nocha/sdk/dist/voice-random.d.ts +51 -0
- package/dist/sdks/@nocha/sdk/dist/voice-recovery.d.ts +9 -0
- package/dist/sdks/@nocha/sdk/dist/voice.d.ts +5 -2
- package/dist/sdks/@nocha/sdk/dist/workspace.d.ts +3 -0
- package/dist/sdks/@nocha/sdk/package.json +5 -1
- package/dist/sdks/@watchirl/experience-sdk/dist/index.d.ts +2 -2
- package/dist/sdks/@watchirl/experience-sdk/dist/index.js +1518 -4698
- package/dist/sdks/@watchirl/experience-sdk/dist/legacy-video.d.ts +2 -2
- package/dist/sdks/@watchirl/experience-sdk/dist/types.d.ts +1 -1
- package/dist/sdks/@watchirl/experience-sdk/package.json +1 -1
- package/dist/watchirl-sdk.js +1512 -4690
- package/package.json +1 -1
- package/dist/references/base/src/types/nocha/access.d.ts +0 -24
- package/dist/references/base/src/types/nocha/ai-operations.d.ts +0 -253
- package/dist/references/base/src/types/nocha/ai.d.ts +0 -5
- package/dist/references/base/src/types/nocha/assets-operations.d.ts +0 -103
- package/dist/references/base/src/types/nocha/assets.d.ts +0 -5
- package/dist/references/base/src/types/nocha/assistant-contract.d.ts +0 -30
- package/dist/references/base/src/types/nocha/assistant-controls.d.ts +0 -12
- package/dist/references/base/src/types/nocha/assistant.d.ts +0 -58
- package/dist/references/base/src/types/nocha/attachments.d.ts +0 -6
- package/dist/references/base/src/types/nocha/automations-operations.d.ts +0 -378
- package/dist/references/base/src/types/nocha/automations-types.d.ts +0 -157
- package/dist/references/base/src/types/nocha/automations.d.ts +0 -28
- package/dist/references/base/src/types/nocha/backend-database.d.ts +0 -18
- package/dist/references/base/src/types/nocha/backend-operations.d.ts +0 -72
- package/dist/references/base/src/types/nocha/backend-requests.d.ts +0 -58
- package/dist/references/base/src/types/nocha/backend-runtime.d.ts +0 -107
- package/dist/references/base/src/types/nocha/backend-server-error.d.ts +0 -8
- package/dist/references/base/src/types/nocha/backend-server-json.d.ts +0 -20
- package/dist/references/base/src/types/nocha/backend-server.d.ts +0 -49
- package/dist/references/base/src/types/nocha/backend-transactions.d.ts +0 -54
- package/dist/references/base/src/types/nocha/backend.d.ts +0 -5
- package/dist/references/base/src/types/nocha/bridge.d.ts +0 -7
- package/dist/references/base/src/types/nocha/capabilities.d.ts +0 -5
- package/dist/references/base/src/types/nocha/capability-deadlines.d.ts +0 -64
- package/dist/references/base/src/types/nocha/capability-needs.d.ts +0 -155
- package/dist/references/base/src/types/nocha/capability-operations.d.ts +0 -74
- package/dist/references/base/src/types/nocha/clipping-types.d.ts +0 -135
- package/dist/references/base/src/types/nocha/clipping.d.ts +0 -4
- package/dist/references/base/src/types/nocha/connectors-operations.d.ts +0 -104
- package/dist/references/base/src/types/nocha/connectors-types.d.ts +0 -11
- package/dist/references/base/src/types/nocha/connectors.d.ts +0 -15
- package/dist/references/base/src/types/nocha/context.d.ts +0 -19
- package/dist/references/base/src/types/nocha/device-operations.d.ts +0 -453
- package/dist/references/base/src/types/nocha/device-types.d.ts +0 -54
- package/dist/references/base/src/types/nocha/device.d.ts +0 -5
- package/dist/references/base/src/types/nocha/email-operations.d.ts +0 -31
- package/dist/references/base/src/types/nocha/email.d.ts +0 -10
- package/dist/references/base/src/types/nocha/error-codes.d.ts +0 -300
- package/dist/references/base/src/types/nocha/errors.d.ts +0 -37
- package/dist/references/base/src/types/nocha/execution.d.ts +0 -16
- package/dist/references/base/src/types/nocha/experience-context-types.d.ts +0 -13
- package/dist/references/base/src/types/nocha/experience-context.d.ts +0 -9
- package/dist/references/base/src/types/nocha/generation-input.d.ts +0 -16
- package/dist/references/base/src/types/nocha/guards.d.ts +0 -13
- package/dist/references/base/src/types/nocha/inbox-operations.d.ts +0 -59
- package/dist/references/base/src/types/nocha/inbox.d.ts +0 -24
- package/dist/references/base/src/types/nocha/listeners.d.ts +0 -5
- package/dist/references/base/src/types/nocha/live-media.d.ts +0 -7
- package/dist/references/base/src/types/nocha/multiplayer-facade.d.ts +0 -45
- package/dist/references/base/src/types/nocha/multiplayer-operations.d.ts +0 -81
- package/dist/references/base/src/types/nocha/multiplayer-subscriptions.d.ts +0 -11
- package/dist/references/base/src/types/nocha/multiplayer.d.ts +0 -17
- package/dist/references/base/src/types/nocha/navigation.d.ts +0 -17
- package/dist/references/base/src/types/nocha/network-operations.d.ts +0 -53
- package/dist/references/base/src/types/nocha/network.d.ts +0 -14
- package/dist/references/base/src/types/nocha/notifications-operations.d.ts +0 -30
- package/dist/references/base/src/types/nocha/notifications.d.ts +0 -10
- package/dist/references/base/src/types/nocha/operation-metadata.d.ts +0 -68
- package/dist/references/base/src/types/nocha/operation-waiting.d.ts +0 -62
- package/dist/references/base/src/types/nocha/operation-wire-types.d.ts +0 -320
- package/dist/references/base/src/types/nocha/outirl-operations.d.ts +0 -353
- package/dist/references/base/src/types/nocha/outirl.d.ts +0 -32
- package/dist/references/base/src/types/nocha/presence-operations.d.ts +0 -25
- package/dist/references/base/src/types/nocha/protocol.d.ts +0 -379
- package/dist/references/base/src/types/nocha/retry.d.ts +0 -6
- package/dist/references/base/src/types/nocha/state.d.ts +0 -14
- package/dist/references/base/src/types/nocha/storage-operation-types.d.ts +0 -50
- package/dist/references/base/src/types/nocha/storage-operations.d.ts +0 -230
- package/dist/references/base/src/types/nocha/storage.d.ts +0 -33
- package/dist/references/base/src/types/nocha/transport.d.ts +0 -37
- package/dist/references/base/src/types/nocha/types/ai-wire.d.ts +0 -338
- package/dist/references/base/src/types/nocha/types/ai.d.ts +0 -21
- package/dist/references/base/src/types/nocha/types/assets-wire.d.ts +0 -28
- package/dist/references/base/src/types/nocha/types/assets.d.ts +0 -41
- package/dist/references/base/src/types/nocha/types/json.d.ts +0 -9
- package/dist/references/base/src/types/nocha/types/network.d.ts +0 -17
- package/dist/references/base/src/types/nocha/types/outirl.d.ts +0 -327
- package/dist/references/base/src/types/nocha/types/storage.d.ts +0 -75
- package/dist/references/base/src/types/nocha/types/video-sdk-wire.d.ts +0 -461
- package/dist/references/base/src/types/nocha/types/video-wire.d.ts +0 -441
- package/dist/references/base/src/types/nocha/types/video.d.ts +0 -165
- package/dist/references/base/src/types/nocha/types/voice-wire.d.ts +0 -18
- package/dist/references/base/src/types/nocha/video-input.d.ts +0 -16
- package/dist/references/base/src/types/nocha/video-media.d.ts +0 -9
- package/dist/references/base/src/types/nocha/video-operations.d.ts +0 -647
- package/dist/references/base/src/types/nocha/video-playback.d.ts +0 -7
- package/dist/references/base/src/types/nocha/video-properties.d.ts +0 -7
- package/dist/references/base/src/types/nocha/video-resource.d.ts +0 -6
- package/dist/references/base/src/types/nocha/video.d.ts +0 -5
- package/dist/references/base/src/types/nocha/viewport-types.d.ts +0 -15
- package/dist/references/base/src/types/nocha/viewport.d.ts +0 -8
- package/dist/references/base/src/types/nocha/voice.d.ts +0 -14
- package/dist/references/base/src/types/nocha/workspace.d.ts +0 -8
- package/dist/references/duel/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/README.md +0 -29
- package/dist/references/duel/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/index.d.ts +0 -58
- package/dist/references/duel/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/index.js +0 -332
- package/dist/references/duel/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/style.css +0 -80
- package/dist/references/duel/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/nocha-vendor.json +0 -17
- package/dist/references/duel/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/package.json +0 -21
- package/dist/references/duel/src/types/nocha/access.d.ts +0 -24
- package/dist/references/duel/src/types/nocha/ai-operations.d.ts +0 -253
- package/dist/references/duel/src/types/nocha/ai.d.ts +0 -5
- package/dist/references/duel/src/types/nocha/assets-operations.d.ts +0 -103
- package/dist/references/duel/src/types/nocha/assets.d.ts +0 -5
- package/dist/references/duel/src/types/nocha/assistant-contract.d.ts +0 -30
- package/dist/references/duel/src/types/nocha/assistant-controls.d.ts +0 -12
- package/dist/references/duel/src/types/nocha/assistant.d.ts +0 -58
- package/dist/references/duel/src/types/nocha/attachments.d.ts +0 -6
- package/dist/references/duel/src/types/nocha/automations-operations.d.ts +0 -378
- package/dist/references/duel/src/types/nocha/automations-types.d.ts +0 -157
- package/dist/references/duel/src/types/nocha/automations.d.ts +0 -28
- package/dist/references/duel/src/types/nocha/backend-database.d.ts +0 -18
- package/dist/references/duel/src/types/nocha/backend-operations.d.ts +0 -72
- package/dist/references/duel/src/types/nocha/backend-requests.d.ts +0 -58
- package/dist/references/duel/src/types/nocha/backend-runtime.d.ts +0 -107
- package/dist/references/duel/src/types/nocha/backend-server-error.d.ts +0 -8
- package/dist/references/duel/src/types/nocha/backend-server-json.d.ts +0 -20
- package/dist/references/duel/src/types/nocha/backend-server.d.ts +0 -49
- package/dist/references/duel/src/types/nocha/backend-transactions.d.ts +0 -54
- package/dist/references/duel/src/types/nocha/backend.d.ts +0 -5
- package/dist/references/duel/src/types/nocha/bridge.d.ts +0 -7
- package/dist/references/duel/src/types/nocha/capabilities.d.ts +0 -5
- package/dist/references/duel/src/types/nocha/capability-deadlines.d.ts +0 -64
- package/dist/references/duel/src/types/nocha/capability-needs.d.ts +0 -155
- package/dist/references/duel/src/types/nocha/capability-operations.d.ts +0 -74
- package/dist/references/duel/src/types/nocha/clipping-types.d.ts +0 -135
- package/dist/references/duel/src/types/nocha/clipping.d.ts +0 -4
- package/dist/references/duel/src/types/nocha/connectors-operations.d.ts +0 -104
- package/dist/references/duel/src/types/nocha/connectors-types.d.ts +0 -11
- package/dist/references/duel/src/types/nocha/connectors.d.ts +0 -15
- package/dist/references/duel/src/types/nocha/context.d.ts +0 -19
- package/dist/references/duel/src/types/nocha/device-operations.d.ts +0 -453
- package/dist/references/duel/src/types/nocha/device-types.d.ts +0 -54
- package/dist/references/duel/src/types/nocha/device.d.ts +0 -5
- package/dist/references/duel/src/types/nocha/email-operations.d.ts +0 -31
- package/dist/references/duel/src/types/nocha/email.d.ts +0 -10
- package/dist/references/duel/src/types/nocha/error-codes.d.ts +0 -300
- package/dist/references/duel/src/types/nocha/errors.d.ts +0 -37
- package/dist/references/duel/src/types/nocha/execution.d.ts +0 -16
- package/dist/references/duel/src/types/nocha/experience-context-types.d.ts +0 -13
- package/dist/references/duel/src/types/nocha/experience-context.d.ts +0 -9
- package/dist/references/duel/src/types/nocha/generation-input.d.ts +0 -16
- package/dist/references/duel/src/types/nocha/guards.d.ts +0 -13
- package/dist/references/duel/src/types/nocha/inbox-operations.d.ts +0 -59
- package/dist/references/duel/src/types/nocha/inbox.d.ts +0 -24
- package/dist/references/duel/src/types/nocha/listeners.d.ts +0 -5
- package/dist/references/duel/src/types/nocha/live-media.d.ts +0 -7
- package/dist/references/duel/src/types/nocha/multiplayer-facade.d.ts +0 -45
- package/dist/references/duel/src/types/nocha/multiplayer-operations.d.ts +0 -81
- package/dist/references/duel/src/types/nocha/multiplayer-subscriptions.d.ts +0 -11
- package/dist/references/duel/src/types/nocha/multiplayer.d.ts +0 -17
- package/dist/references/duel/src/types/nocha/navigation.d.ts +0 -17
- package/dist/references/duel/src/types/nocha/network-operations.d.ts +0 -53
- package/dist/references/duel/src/types/nocha/network.d.ts +0 -14
- package/dist/references/duel/src/types/nocha/notifications-operations.d.ts +0 -30
- package/dist/references/duel/src/types/nocha/notifications.d.ts +0 -10
- package/dist/references/duel/src/types/nocha/operation-metadata.d.ts +0 -68
- package/dist/references/duel/src/types/nocha/operation-waiting.d.ts +0 -62
- package/dist/references/duel/src/types/nocha/operation-wire-types.d.ts +0 -320
- package/dist/references/duel/src/types/nocha/outirl-operations.d.ts +0 -353
- package/dist/references/duel/src/types/nocha/outirl.d.ts +0 -32
- package/dist/references/duel/src/types/nocha/presence-operations.d.ts +0 -25
- package/dist/references/duel/src/types/nocha/protocol.d.ts +0 -379
- package/dist/references/duel/src/types/nocha/retry.d.ts +0 -6
- package/dist/references/duel/src/types/nocha/state.d.ts +0 -14
- package/dist/references/duel/src/types/nocha/storage-operation-types.d.ts +0 -50
- package/dist/references/duel/src/types/nocha/storage-operations.d.ts +0 -230
- package/dist/references/duel/src/types/nocha/storage.d.ts +0 -33
- package/dist/references/duel/src/types/nocha/transport.d.ts +0 -37
- package/dist/references/duel/src/types/nocha/types/ai-wire.d.ts +0 -338
- package/dist/references/duel/src/types/nocha/types/ai.d.ts +0 -21
- package/dist/references/duel/src/types/nocha/types/assets-wire.d.ts +0 -28
- package/dist/references/duel/src/types/nocha/types/assets.d.ts +0 -41
- package/dist/references/duel/src/types/nocha/types/json.d.ts +0 -9
- package/dist/references/duel/src/types/nocha/types/network.d.ts +0 -17
- package/dist/references/duel/src/types/nocha/types/outirl.d.ts +0 -327
- package/dist/references/duel/src/types/nocha/types/storage.d.ts +0 -75
- package/dist/references/duel/src/types/nocha/types/video-sdk-wire.d.ts +0 -461
- package/dist/references/duel/src/types/nocha/types/video-wire.d.ts +0 -441
- package/dist/references/duel/src/types/nocha/types/video.d.ts +0 -165
- package/dist/references/duel/src/types/nocha/types/voice-wire.d.ts +0 -18
- package/dist/references/duel/src/types/nocha/video-input.d.ts +0 -16
- package/dist/references/duel/src/types/nocha/video-media.d.ts +0 -9
- package/dist/references/duel/src/types/nocha/video-operations.d.ts +0 -647
- package/dist/references/duel/src/types/nocha/video-playback.d.ts +0 -7
- package/dist/references/duel/src/types/nocha/video-properties.d.ts +0 -7
- package/dist/references/duel/src/types/nocha/video-resource.d.ts +0 -6
- package/dist/references/duel/src/types/nocha/video.d.ts +0 -5
- package/dist/references/duel/src/types/nocha/viewport-types.d.ts +0 -15
- package/dist/references/duel/src/types/nocha/viewport.d.ts +0 -8
- package/dist/references/duel/src/types/nocha/voice.d.ts +0 -14
- package/dist/references/duel/src/types/nocha/workspace.d.ts +0 -8
- package/dist/references/exploration/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/README.md +0 -29
- package/dist/references/exploration/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/index.d.ts +0 -58
- package/dist/references/exploration/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/index.js +0 -332
- package/dist/references/exploration/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/style.css +0 -80
- package/dist/references/exploration/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/nocha-vendor.json +0 -17
- package/dist/references/exploration/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/package.json +0 -21
- package/dist/references/racing/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/README.md +0 -29
- package/dist/references/racing/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/index.d.ts +0 -58
- package/dist/references/racing/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/index.js +0 -332
- package/dist/references/racing/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/style.css +0 -80
- package/dist/references/racing/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/nocha-vendor.json +0 -17
- package/dist/references/racing/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/package.json +0 -21
- package/dist/references/recipes/outirl/NOCHA.json +0 -43
- package/dist/references/recipes/outirl/README.md +0 -15
- package/dist/references/recipes/outirl/SKILL.md +0 -24
- package/dist/references/recipes/outirl/recipe.ts +0 -33
- package/dist/references/recipes/three-room/src/features/universe-foundation/index.d.ts +0 -30
- package/dist/references/recipes/three-room/src/features/universe-foundation/index.js +0 -226
- package/dist/references/recipes/three-room/src/features/universe-foundation/style.css +0 -14
- package/dist/references/recipes/three-stage/src/features/universe-foundation/index.d.ts +0 -30
- package/dist/references/recipes/three-stage/src/features/universe-foundation/index.js +0 -226
- package/dist/references/recipes/three-stage/src/features/universe-foundation/style.css +0 -14
- package/dist/references/recipes/types/nocha/outirl-operations.d.ts +0 -353
- package/dist/references/recipes/types/nocha/outirl.d.ts +0 -32
- package/dist/references/recipes/types/nocha/types/outirl.d.ts +0 -327
- package/dist/references/shooter/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/README.md +0 -29
- package/dist/references/shooter/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/index.d.ts +0 -58
- package/dist/references/shooter/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/index.js +0 -332
- package/dist/references/shooter/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/lib/style.css +0 -80
- package/dist/references/shooter/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/nocha-vendor.json +0 -17
- package/dist/references/shooter/server/vendor/experience-input/0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087/package.json +0 -21
- package/dist/references/stage/server/vendor/world-ui/0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b/README.md +0 -37
- package/dist/references/stage/server/vendor/world-ui/0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b/lib/pointer.d.ts +0 -82
- package/dist/references/stage/server/vendor/world-ui/0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b/lib/pointer.js +0 -273
- package/dist/references/stage/server/vendor/world-ui/0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b/lib/types.d.ts +0 -352
- package/dist/references/stage/server/vendor/world-ui/0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b/nocha-vendor.json +0 -103
- package/dist/references/stage/server/vendor/world-ui/0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b/package.json +0 -24
- package/dist/references/stage/src/features/universe-foundation/index.d.ts +0 -30
- package/dist/references/stage/src/features/universe-foundation/index.js +0 -226
- package/dist/references/stage/src/features/universe-foundation/style.css +0 -14
- package/dist/references/stage/src/types/nocha/access.d.ts +0 -24
- package/dist/references/stage/src/types/nocha/ai-operations.d.ts +0 -253
- package/dist/references/stage/src/types/nocha/ai.d.ts +0 -5
- package/dist/references/stage/src/types/nocha/assets-operations.d.ts +0 -103
- package/dist/references/stage/src/types/nocha/assets.d.ts +0 -5
- package/dist/references/stage/src/types/nocha/assistant-contract.d.ts +0 -30
- package/dist/references/stage/src/types/nocha/assistant-controls.d.ts +0 -12
- package/dist/references/stage/src/types/nocha/assistant.d.ts +0 -58
- package/dist/references/stage/src/types/nocha/attachments.d.ts +0 -6
- package/dist/references/stage/src/types/nocha/automations-operations.d.ts +0 -378
- package/dist/references/stage/src/types/nocha/automations-types.d.ts +0 -157
- package/dist/references/stage/src/types/nocha/automations.d.ts +0 -28
- package/dist/references/stage/src/types/nocha/backend-database.d.ts +0 -18
- package/dist/references/stage/src/types/nocha/backend-operations.d.ts +0 -72
- package/dist/references/stage/src/types/nocha/backend-requests.d.ts +0 -58
- package/dist/references/stage/src/types/nocha/backend-runtime.d.ts +0 -107
- package/dist/references/stage/src/types/nocha/backend-server-error.d.ts +0 -8
- package/dist/references/stage/src/types/nocha/backend-server-json.d.ts +0 -20
- package/dist/references/stage/src/types/nocha/backend-server.d.ts +0 -49
- package/dist/references/stage/src/types/nocha/backend-transactions.d.ts +0 -54
- package/dist/references/stage/src/types/nocha/backend.d.ts +0 -5
- package/dist/references/stage/src/types/nocha/bridge.d.ts +0 -7
- package/dist/references/stage/src/types/nocha/capabilities.d.ts +0 -5
- package/dist/references/stage/src/types/nocha/capability-deadlines.d.ts +0 -64
- package/dist/references/stage/src/types/nocha/capability-needs.d.ts +0 -155
- package/dist/references/stage/src/types/nocha/capability-operations.d.ts +0 -74
- package/dist/references/stage/src/types/nocha/clipping-types.d.ts +0 -135
- package/dist/references/stage/src/types/nocha/clipping.d.ts +0 -4
- package/dist/references/stage/src/types/nocha/connectors-operations.d.ts +0 -104
- package/dist/references/stage/src/types/nocha/connectors-types.d.ts +0 -11
- package/dist/references/stage/src/types/nocha/connectors.d.ts +0 -15
- package/dist/references/stage/src/types/nocha/context.d.ts +0 -19
- package/dist/references/stage/src/types/nocha/device-operations.d.ts +0 -453
- package/dist/references/stage/src/types/nocha/device-types.d.ts +0 -54
- package/dist/references/stage/src/types/nocha/device.d.ts +0 -5
- package/dist/references/stage/src/types/nocha/email-operations.d.ts +0 -31
- package/dist/references/stage/src/types/nocha/email.d.ts +0 -10
- package/dist/references/stage/src/types/nocha/error-codes.d.ts +0 -300
- package/dist/references/stage/src/types/nocha/errors.d.ts +0 -37
- package/dist/references/stage/src/types/nocha/execution.d.ts +0 -16
- package/dist/references/stage/src/types/nocha/experience-context-types.d.ts +0 -13
- package/dist/references/stage/src/types/nocha/experience-context.d.ts +0 -9
- package/dist/references/stage/src/types/nocha/generation-input.d.ts +0 -16
- package/dist/references/stage/src/types/nocha/guards.d.ts +0 -13
- package/dist/references/stage/src/types/nocha/inbox-operations.d.ts +0 -59
- package/dist/references/stage/src/types/nocha/inbox.d.ts +0 -24
- package/dist/references/stage/src/types/nocha/listeners.d.ts +0 -5
- package/dist/references/stage/src/types/nocha/live-media.d.ts +0 -7
- package/dist/references/stage/src/types/nocha/multiplayer-facade.d.ts +0 -45
- package/dist/references/stage/src/types/nocha/multiplayer-operations.d.ts +0 -81
- package/dist/references/stage/src/types/nocha/multiplayer-subscriptions.d.ts +0 -11
- package/dist/references/stage/src/types/nocha/multiplayer.d.ts +0 -17
- package/dist/references/stage/src/types/nocha/navigation.d.ts +0 -17
- package/dist/references/stage/src/types/nocha/network-operations.d.ts +0 -53
- package/dist/references/stage/src/types/nocha/network.d.ts +0 -14
- package/dist/references/stage/src/types/nocha/notifications-operations.d.ts +0 -30
- package/dist/references/stage/src/types/nocha/notifications.d.ts +0 -10
- package/dist/references/stage/src/types/nocha/operation-metadata.d.ts +0 -68
- package/dist/references/stage/src/types/nocha/operation-waiting.d.ts +0 -62
- package/dist/references/stage/src/types/nocha/operation-wire-types.d.ts +0 -320
- package/dist/references/stage/src/types/nocha/outirl-operations.d.ts +0 -353
- package/dist/references/stage/src/types/nocha/outirl.d.ts +0 -32
- package/dist/references/stage/src/types/nocha/presence-operations.d.ts +0 -25
- package/dist/references/stage/src/types/nocha/protocol.d.ts +0 -379
- package/dist/references/stage/src/types/nocha/retry.d.ts +0 -6
- package/dist/references/stage/src/types/nocha/state.d.ts +0 -14
- package/dist/references/stage/src/types/nocha/storage-operation-types.d.ts +0 -50
- package/dist/references/stage/src/types/nocha/storage-operations.d.ts +0 -230
- package/dist/references/stage/src/types/nocha/storage.d.ts +0 -33
- package/dist/references/stage/src/types/nocha/transport.d.ts +0 -37
- package/dist/references/stage/src/types/nocha/types/ai-wire.d.ts +0 -338
- package/dist/references/stage/src/types/nocha/types/ai.d.ts +0 -21
- package/dist/references/stage/src/types/nocha/types/assets-wire.d.ts +0 -28
- package/dist/references/stage/src/types/nocha/types/assets.d.ts +0 -41
- package/dist/references/stage/src/types/nocha/types/json.d.ts +0 -9
- package/dist/references/stage/src/types/nocha/types/network.d.ts +0 -17
- package/dist/references/stage/src/types/nocha/types/outirl.d.ts +0 -327
- package/dist/references/stage/src/types/nocha/types/storage.d.ts +0 -75
- package/dist/references/stage/src/types/nocha/types/video-sdk-wire.d.ts +0 -461
- package/dist/references/stage/src/types/nocha/types/video-wire.d.ts +0 -441
- package/dist/references/stage/src/types/nocha/types/video.d.ts +0 -165
- package/dist/references/stage/src/types/nocha/types/voice-wire.d.ts +0 -18
- package/dist/references/stage/src/types/nocha/video-input.d.ts +0 -16
- package/dist/references/stage/src/types/nocha/video-media.d.ts +0 -9
- package/dist/references/stage/src/types/nocha/video-operations.d.ts +0 -647
- package/dist/references/stage/src/types/nocha/video-playback.d.ts +0 -7
- package/dist/references/stage/src/types/nocha/video-properties.d.ts +0 -7
- package/dist/references/stage/src/types/nocha/video-resource.d.ts +0 -6
- package/dist/references/stage/src/types/nocha/video.d.ts +0 -5
- package/dist/references/stage/src/types/nocha/viewport-types.d.ts +0 -15
- package/dist/references/stage/src/types/nocha/viewport.d.ts +0 -8
- package/dist/references/stage/src/types/nocha/voice.d.ts +0 -14
- package/dist/references/stage/src/types/nocha/workspace.d.ts +0 -8
- package/dist/references/workshop/AGENTS.md +0 -40
- package/dist/references/workshop/src/types/nocha/access.d.ts +0 -24
- package/dist/references/workshop/src/types/nocha/ai-operations.d.ts +0 -253
- package/dist/references/workshop/src/types/nocha/ai.d.ts +0 -5
- package/dist/references/workshop/src/types/nocha/assets-operations.d.ts +0 -103
- package/dist/references/workshop/src/types/nocha/assets.d.ts +0 -5
- package/dist/references/workshop/src/types/nocha/assistant-contract.d.ts +0 -30
- package/dist/references/workshop/src/types/nocha/assistant-controls.d.ts +0 -12
- package/dist/references/workshop/src/types/nocha/assistant.d.ts +0 -58
- package/dist/references/workshop/src/types/nocha/attachments.d.ts +0 -6
- package/dist/references/workshop/src/types/nocha/automations-operations.d.ts +0 -378
- package/dist/references/workshop/src/types/nocha/automations-types.d.ts +0 -157
- package/dist/references/workshop/src/types/nocha/automations.d.ts +0 -28
- package/dist/references/workshop/src/types/nocha/backend-database.d.ts +0 -18
- package/dist/references/workshop/src/types/nocha/backend-operations.d.ts +0 -72
- package/dist/references/workshop/src/types/nocha/backend-requests.d.ts +0 -58
- package/dist/references/workshop/src/types/nocha/backend-runtime.d.ts +0 -107
- package/dist/references/workshop/src/types/nocha/backend-server-error.d.ts +0 -8
- package/dist/references/workshop/src/types/nocha/backend-server-json.d.ts +0 -20
- package/dist/references/workshop/src/types/nocha/backend-transactions.d.ts +0 -54
- package/dist/references/workshop/src/types/nocha/backend.d.ts +0 -5
- package/dist/references/workshop/src/types/nocha/bridge.d.ts +0 -7
- package/dist/references/workshop/src/types/nocha/capabilities.d.ts +0 -5
- package/dist/references/workshop/src/types/nocha/capability-deadlines.d.ts +0 -64
- package/dist/references/workshop/src/types/nocha/capability-needs.d.ts +0 -155
- package/dist/references/workshop/src/types/nocha/capability-operations.d.ts +0 -74
- package/dist/references/workshop/src/types/nocha/clipping-types.d.ts +0 -135
- package/dist/references/workshop/src/types/nocha/clipping.d.ts +0 -4
- package/dist/references/workshop/src/types/nocha/connectors-operations.d.ts +0 -104
- package/dist/references/workshop/src/types/nocha/connectors-types.d.ts +0 -11
- package/dist/references/workshop/src/types/nocha/connectors.d.ts +0 -15
- package/dist/references/workshop/src/types/nocha/context.d.ts +0 -19
- package/dist/references/workshop/src/types/nocha/device-operations.d.ts +0 -453
- package/dist/references/workshop/src/types/nocha/device-types.d.ts +0 -54
- package/dist/references/workshop/src/types/nocha/device.d.ts +0 -5
- package/dist/references/workshop/src/types/nocha/email-operations.d.ts +0 -31
- package/dist/references/workshop/src/types/nocha/email.d.ts +0 -10
- package/dist/references/workshop/src/types/nocha/error-codes.d.ts +0 -300
- package/dist/references/workshop/src/types/nocha/errors.d.ts +0 -37
- package/dist/references/workshop/src/types/nocha/execution.d.ts +0 -16
- package/dist/references/workshop/src/types/nocha/experience-context-types.d.ts +0 -13
- package/dist/references/workshop/src/types/nocha/experience-context.d.ts +0 -9
- package/dist/references/workshop/src/types/nocha/generation-input.d.ts +0 -16
- package/dist/references/workshop/src/types/nocha/guards.d.ts +0 -13
- package/dist/references/workshop/src/types/nocha/inbox-operations.d.ts +0 -59
- package/dist/references/workshop/src/types/nocha/inbox.d.ts +0 -24
- package/dist/references/workshop/src/types/nocha/listeners.d.ts +0 -5
- package/dist/references/workshop/src/types/nocha/live-media.d.ts +0 -7
- package/dist/references/workshop/src/types/nocha/multiplayer-facade.d.ts +0 -45
- package/dist/references/workshop/src/types/nocha/multiplayer-operations.d.ts +0 -81
- package/dist/references/workshop/src/types/nocha/multiplayer-subscriptions.d.ts +0 -11
- package/dist/references/workshop/src/types/nocha/multiplayer.d.ts +0 -17
- package/dist/references/workshop/src/types/nocha/navigation.d.ts +0 -17
- package/dist/references/workshop/src/types/nocha/network-operations.d.ts +0 -53
- package/dist/references/workshop/src/types/nocha/network.d.ts +0 -14
- package/dist/references/workshop/src/types/nocha/notifications-operations.d.ts +0 -30
- package/dist/references/workshop/src/types/nocha/notifications.d.ts +0 -10
- package/dist/references/workshop/src/types/nocha/operation-metadata.d.ts +0 -68
- package/dist/references/workshop/src/types/nocha/operation-waiting.d.ts +0 -62
- package/dist/references/workshop/src/types/nocha/operation-wire-types.d.ts +0 -320
- package/dist/references/workshop/src/types/nocha/outirl-operations.d.ts +0 -353
- package/dist/references/workshop/src/types/nocha/outirl.d.ts +0 -32
- package/dist/references/workshop/src/types/nocha/presence-operations.d.ts +0 -25
- package/dist/references/workshop/src/types/nocha/protocol.d.ts +0 -379
- package/dist/references/workshop/src/types/nocha/retry.d.ts +0 -6
- package/dist/references/workshop/src/types/nocha/state.d.ts +0 -14
- package/dist/references/workshop/src/types/nocha/storage-operation-types.d.ts +0 -50
- package/dist/references/workshop/src/types/nocha/storage-operations.d.ts +0 -230
- package/dist/references/workshop/src/types/nocha/storage.d.ts +0 -33
- package/dist/references/workshop/src/types/nocha/transport.d.ts +0 -37
- package/dist/references/workshop/src/types/nocha/types/ai-wire.d.ts +0 -338
- package/dist/references/workshop/src/types/nocha/types/ai.d.ts +0 -21
- package/dist/references/workshop/src/types/nocha/types/assets-wire.d.ts +0 -28
- package/dist/references/workshop/src/types/nocha/types/assets.d.ts +0 -41
- package/dist/references/workshop/src/types/nocha/types/json.d.ts +0 -9
- package/dist/references/workshop/src/types/nocha/types/network.d.ts +0 -17
- package/dist/references/workshop/src/types/nocha/types/outirl.d.ts +0 -327
- package/dist/references/workshop/src/types/nocha/types/storage.d.ts +0 -75
- package/dist/references/workshop/src/types/nocha/types/video-sdk-wire.d.ts +0 -461
- package/dist/references/workshop/src/types/nocha/types/video-wire.d.ts +0 -441
- package/dist/references/workshop/src/types/nocha/types/video.d.ts +0 -165
- package/dist/references/workshop/src/types/nocha/types/voice-wire.d.ts +0 -18
- package/dist/references/workshop/src/types/nocha/video-input.d.ts +0 -16
- package/dist/references/workshop/src/types/nocha/video-media.d.ts +0 -9
- package/dist/references/workshop/src/types/nocha/video-operations.d.ts +0 -647
- package/dist/references/workshop/src/types/nocha/video-playback.d.ts +0 -7
- package/dist/references/workshop/src/types/nocha/video-properties.d.ts +0 -7
- package/dist/references/workshop/src/types/nocha/video-resource.d.ts +0 -6
- package/dist/references/workshop/src/types/nocha/video.d.ts +0 -5
- package/dist/references/workshop/src/types/nocha/viewport-types.d.ts +0 -15
- package/dist/references/workshop/src/types/nocha/viewport.d.ts +0 -8
- package/dist/references/workshop/src/types/nocha/voice.d.ts +0 -14
- package/dist/references/workshop/src/types/nocha/workspace.d.ts +0 -8
- package/dist/sdks/@nocha/sdk/dist/chunk-3ULBSRGX.js +0 -26
- package/dist/sdks/@nocha/sdk/dist/chunk-4AHRR2WX.js +0 -120
- package/dist/sdks/@nocha/sdk/dist/chunk-A3QFRV4K.js +0 -231
- package/dist/sdks/@nocha/sdk/dist/chunk-MNRQELK7.js +0 -1975
- package/dist/sdks/@nocha/sdk/dist/outirl-operations.d.ts +0 -352
- package/dist/sdks/@nocha/sdk/dist/outirl.d.ts +0 -31
- package/dist/sdks/@nocha/sdk/dist/server-chunk-ZTA43KOG.js +0 -121
- package/dist/sdks/@nocha/sdk/dist/types/outirl.d.ts +0 -326
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/access.d.ts +0 -23
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/ai-operations.d.ts +0 -252
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/assets-operations.d.ts +0 -102
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/assistant-contract.d.ts +0 -29
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/assistant-controls.d.ts +0 -11
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/assistant.d.ts +0 -57
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/automations-operations.d.ts +0 -377
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/automations-types.d.ts +0 -156
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/automations.d.ts +0 -27
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-database.d.ts +0 -17
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-operations.d.ts +0 -71
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-requests.d.ts +0 -57
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-runtime.d.ts +0 -106
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/backend-transactions.d.ts +0 -53
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/bridge.d.ts +0 -6
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/capability-deadlines.d.ts +0 -63
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/capability-needs.d.ts +0 -154
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/capability-operations.d.ts +0 -73
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/clipping-types.d.ts +0 -134
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/connectors-operations.d.ts +0 -103
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/connectors-types.d.ts +0 -10
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/connectors.d.ts +0 -14
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/context.d.ts +0 -18
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/device-operations.d.ts +0 -452
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/device-types.d.ts +0 -53
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/email-operations.d.ts +0 -30
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/email.d.ts +0 -9
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/error-codes.d.ts +0 -299
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/errors.d.ts +0 -36
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/execution.d.ts +0 -15
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/experience-context-types.d.ts +0 -12
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/experience-context.d.ts +0 -8
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/inbox-operations.d.ts +0 -58
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/inbox.d.ts +0 -23
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/index.d.ts +0 -101
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/multiplayer-facade.d.ts +0 -44
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/multiplayer-operations.d.ts +0 -80
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/multiplayer.d.ts +0 -16
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/navigation.d.ts +0 -16
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/network-operations.d.ts +0 -52
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/network.d.ts +0 -13
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/notifications-operations.d.ts +0 -29
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/notifications.d.ts +0 -9
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/operation-metadata.d.ts +0 -67
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/operation-wire-types.d.ts +0 -319
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/outirl-operations.d.ts +0 -352
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/outirl.d.ts +0 -31
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/presence-operations.d.ts +0 -24
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/protocol.d.ts +0 -378
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/state.d.ts +0 -13
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/storage-operation-types.d.ts +0 -49
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/storage-operations.d.ts +0 -229
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/storage.d.ts +0 -32
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/transport.d.ts +0 -36
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/ai-wire.d.ts +0 -337
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/ai.d.ts +0 -20
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/assets-wire.d.ts +0 -27
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/assets.d.ts +0 -40
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/json.d.ts +0 -8
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/network.d.ts +0 -16
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/outirl.d.ts +0 -326
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/storage.d.ts +0 -74
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/video-sdk-wire.d.ts +0 -460
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/video-wire.d.ts +0 -440
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/video.d.ts +0 -164
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/types/voice-wire.d.ts +0 -17
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/video-operations.d.ts +0 -646
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/video-properties.d.ts +0 -6
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/viewport-types.d.ts +0 -14
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/viewport.d.ts +0 -7
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/voice.d.ts +0 -13
- package/dist/sdks/@watchirl/experience-sdk/dist/nocha/workspace.d.ts +0 -7
- /package/dist/references/duel/server/vendor/experience-input/{0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087 → 0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c}/LICENSE +0 -0
- /package/dist/references/exploration/server/vendor/experience-input/{0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087 → 0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c}/LICENSE +0 -0
- /package/dist/references/racing/server/vendor/experience-input/{0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087 → 0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c}/LICENSE +0 -0
- /package/dist/references/shooter/server/vendor/experience-input/{0.2.2-2afef667ed23d6cdeb8dda34c3d2f183e54c4f4447ec960b624d7b5921c0c087 → 0.2.4-e760060497535b002d4934c04ec40e13bdcbe03f2d303932fa42a7b301d40b7c}/LICENSE +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/LICENSE +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/canvas2d.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/canvas2d.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/context.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/context.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/dialog.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/dialog.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/edit-bar.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/edit-bar.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/environment.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/environment.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/fields.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/fields.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/focus.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/focus.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/index.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/index.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/keys.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/keys.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/layout.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/layout.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/mirror.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/mirror.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/motion.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/motion.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/navigation.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/navigation.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/options-diff.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/options-diff.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel-geometry.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel-geometry.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel-layout.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel-layout.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel-place.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel-place.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel-scroll.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel-scroll.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/panel.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/picker.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/picker.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/picture.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/picture.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/scroll-guard.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/scroll-guard.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/stacking.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/stacking.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/style.css +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/surface.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/surface.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/theme.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/theme.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/types.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b/lib/widget-types.js → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f/lib/viewport.js} +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widget-types.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widget.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widget.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/button-face.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/button-face.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/button.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/button.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/card-face.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/card-face.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/choice.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/choice.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/field-paint.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/field-paint.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/file-button.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/file-button.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/image.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/image.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/label.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/label.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/link.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/link.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/progress.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/progress.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/slider.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/slider.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/text-field.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/text-field.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/toggle.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/toggle.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/video.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/widgets/video.js +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/world-ui.d.ts +0 -0
- /package/dist/references/stage/server/vendor/world-ui/{0.5.2-4a57a5904f77c0abfd1833815b3981b6385821c2a14039dc4acb3bf65599908b → 0.6.1-691896a7efb9060c8a26f17a92e146757e3f12b47dc8e36bf9bf0ae43184f58f}/lib/world-ui.js +0 -0
|
@@ -0,0 +1,4117 @@
|
|
|
1
|
+
// src/operation-waiting.ts
|
|
2
|
+
var operationWaiting = {
|
|
3
|
+
default: 15e3,
|
|
4
|
+
access: { request: 3e5 },
|
|
5
|
+
// `attach` may wait for the host's sign-in proposal or its team choice.
|
|
6
|
+
spaces: { default: 15e3, attach: 3e5 },
|
|
7
|
+
// `open` waits for the person in the host's screen (a panel may stay open a while).
|
|
8
|
+
screens: { default: 15e3, open: 18e5 },
|
|
9
|
+
// One multiplayer call may refresh credentials, connect (20 s) then run a command (10 s).
|
|
10
|
+
multiplayer: { default: 35e3 },
|
|
11
|
+
// HTTPS transport 10 s plus two revision checks and the idempotency receipt.
|
|
12
|
+
network: { default: 2e4 },
|
|
13
|
+
// Attachment uploads stream up to 64 MiB through the host. assets.media is not an operation: its host acknowledges at
|
|
14
|
+
// once, asks assets.read for a read grant, then reads at most 64 MiB (256 MiB for a generated MP4) and stops any read
|
|
15
|
+
// after 15 minutes.
|
|
16
|
+
assets: { default: 6e4, uploadAttachment: 10 * 6e4, media: 10 * 6e4, "media.firstReply": 15e3 },
|
|
17
|
+
// video.media is not an operation: its host acknowledges at once, calls video.get, then streams at most
|
|
18
|
+
// 256 MiB and stops any read after 15 minutes.
|
|
19
|
+
video: { default: 3e4, "clipping.uploadSource": 31 * 6e4, media: 10 * 6e4, "media.firstReply": 15e3, "projects.addReference": 6 * 6e4 },
|
|
20
|
+
// Mac calls: 25 s, transcription 150 s.
|
|
21
|
+
hardware: { default: 35e3, "audio.transcribe": 165e3 },
|
|
22
|
+
// decide: 8 s provider deadline plus up to 5 s settlement; voice.start waits for host consent.
|
|
23
|
+
ai: { default: 3e4, decide: 2e4, "voice.start": 12e4, "voice.state": 15e3 },
|
|
24
|
+
// Device operations may wait for a consent sheet or a system picker.
|
|
25
|
+
device: {
|
|
26
|
+
default: 18e4,
|
|
27
|
+
availability: 15e3,
|
|
28
|
+
"haptics.trigger": 15e3,
|
|
29
|
+
"haptics.pattern": 15e3,
|
|
30
|
+
"haptics.stop": 15e3,
|
|
31
|
+
"camera.stream": 3e5,
|
|
32
|
+
"microphone.stream": 3e5,
|
|
33
|
+
"motion.unsubscribe": 15e3,
|
|
34
|
+
"notifications.list": 15e3,
|
|
35
|
+
"notifications.cancel": 15e3,
|
|
36
|
+
"alarms.list": 15e3,
|
|
37
|
+
"alarms.cancel": 15e3
|
|
38
|
+
},
|
|
39
|
+
// Consent resolution and the queued request, without waiting for any device delivery.
|
|
40
|
+
notifications: { default: 2e4 },
|
|
41
|
+
// The person chooses in the host's Drive dialog (up to 3 minutes), then the host moves up to 64 MiB.
|
|
42
|
+
drive: { default: 18e4, save: 13 * 6e4, pick: 13 * 6e4, "pick.firstReply": 15e3 },
|
|
43
|
+
// The person reads the address in the host's affordance and confirms, or closes it (up to 2 minutes).
|
|
44
|
+
link: { default: 12e4, open: 12e4 },
|
|
45
|
+
// One read of the person's library by the web host (a few API pages at most); icons and avatars fetch up to 24 images;
|
|
46
|
+
// `open` may wait for the person's consent to another creator's interface; `prefetch` is a hint answered at once.
|
|
47
|
+
library: { default: 2e4, icons: 3e4, avatars: 3e4, open: 12e4, prefetch: 5e3 },
|
|
48
|
+
// Public profiles of the workspace: one directory read; `get` also reads up to 50 photos.
|
|
49
|
+
profiles: { default: 15e3, get: 3e4 },
|
|
50
|
+
// The person chooses in the provider's sheet (up to 15 minutes); `available` reads the designation, `handle` one relay.
|
|
51
|
+
// `available` reads the called experience; `call` may wait for the person's consent and a sheet's gesture (up to 15
|
|
52
|
+
// minutes); `handle` is one relay of the called document's answer; `open` hands a window to the host; `pick` waits while
|
|
53
|
+
// the person chooses in the picker window; `host` one answer of the host composing a swipe experience's feed.
|
|
54
|
+
experiences: { default: 2e4, call: 15 * 6e4, handle: 12e4, open: 15e3, pick: 30 * 6e4, host: 15e3 },
|
|
55
|
+
// One bounded page of the workspace inbox, or an acknowledgement.
|
|
56
|
+
inbox: { default: 15e3 },
|
|
57
|
+
// Recipient resolution, metering and the queued message, without waiting for delivery.
|
|
58
|
+
email: { default: 2e4 },
|
|
59
|
+
// One call relayed to the Mac; connect waits for the host's consent dialog, attach and watch for the host's stream.
|
|
60
|
+
// Établi: the Mac's picker (60 s), commit hooks and fetch (55 s), a checkout (30 s), the start of a conversation that
|
|
61
|
+
// may ask the person (60 s), a long poll (15 s), a search and a project's structure (10 s), each plus the relay.
|
|
62
|
+
machine: {
|
|
63
|
+
default: 2e4,
|
|
64
|
+
connect: 18e4,
|
|
65
|
+
"terminal.attach": 3e4,
|
|
66
|
+
"terminal.watch": 3e4,
|
|
67
|
+
"workspace.requestRoot": 75e3,
|
|
68
|
+
"files.search": 2e4,
|
|
69
|
+
"files.tree": 2e4,
|
|
70
|
+
"git.commit": 7e4,
|
|
71
|
+
"git.fetch": 7e4,
|
|
72
|
+
"git.checkout": 45e3,
|
|
73
|
+
"agents.start": 75e3,
|
|
74
|
+
"agents.events": 25e3
|
|
75
|
+
},
|
|
76
|
+
navigation: { connect: 15e3, command: 15e3 }
|
|
77
|
+
// An import answers once Watchirl accepted it (consent, project, operation), never after its download: follow it with
|
|
78
|
+
// `get` (one status read and signed addresses); `list` reads up to 20 imports.
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// src/operation-metadata.ts
|
|
82
|
+
var operationDefaults = {
|
|
83
|
+
needs: [],
|
|
84
|
+
transport: "invoke",
|
|
85
|
+
access: "contribute",
|
|
86
|
+
observer: "denied",
|
|
87
|
+
publicRead: "denied",
|
|
88
|
+
publicControl: null,
|
|
89
|
+
mediaUsage: false,
|
|
90
|
+
spend: "none",
|
|
91
|
+
idempotency: "host-defined",
|
|
92
|
+
waiting: "operation",
|
|
93
|
+
deadlineMs: null,
|
|
94
|
+
sdkMarginMs: null,
|
|
95
|
+
rateBucket: "public-playback",
|
|
96
|
+
compatibility: "current"
|
|
97
|
+
};
|
|
98
|
+
var operationRead = { access: "read", idempotency: "read" };
|
|
99
|
+
var observerRead = { ...operationRead, observer: "declared-public-read" };
|
|
100
|
+
var publicRead = { ...observerRead, publicRead: "eligible" };
|
|
101
|
+
|
|
102
|
+
// src/capability-needs.ts
|
|
103
|
+
var generate = { role: "generate", mediaUsage: false, storedMediaResult: false };
|
|
104
|
+
var capabilityNeeds = {
|
|
105
|
+
"text.short": { ...generate, providerCapability: "text.generate", waitMs: 2e4 },
|
|
106
|
+
"text.chat": { ...generate, providerCapability: "text.generate", waitMs: 2e4 },
|
|
107
|
+
"text.long": { ...generate, providerCapability: "text.generate", waitMs: 9e4 },
|
|
108
|
+
"text.structured": { ...generate, providerCapability: "text.generate_structured", waitMs: 6e4 },
|
|
109
|
+
"web.research": { ...generate, providerCapability: "web.research", waitMs: 9e4 },
|
|
110
|
+
"audio.synthesize": { ...generate, providerCapability: "audio.synthesize", waitMs: 2e4, mediaUsage: true },
|
|
111
|
+
"audio.transcribe": { ...generate, providerCapability: "audio.transcribe", waitMs: 12e4 },
|
|
112
|
+
"audio.generate": { ...generate, providerCapability: "audio.generate", waitMs: 6e5, mediaUsage: true, storedMediaResult: true },
|
|
113
|
+
"image.generate": { ...generate, providerCapability: "image.generate", waitMs: 6e5, mediaUsage: true, storedMediaResult: true },
|
|
114
|
+
"image.edit": { ...generate, providerCapability: "image.edit", waitMs: 6e5, mediaUsage: true, storedMediaResult: true },
|
|
115
|
+
"video.generate": { ...generate, providerCapability: "video.generate", waitMs: 18e4, mediaUsage: true, storedMediaResult: true },
|
|
116
|
+
"image.remove_background": { ...generate, providerCapability: "image.remove_background", waitMs: 6e5, mediaUsage: true, storedMediaResult: true },
|
|
117
|
+
"image.upscale": { ...generate, providerCapability: "image.upscale", waitMs: 6e5, mediaUsage: true, storedMediaResult: true },
|
|
118
|
+
"audio.sound_effect": { ...generate, providerCapability: "audio.sound_effect", waitMs: 3e5, mediaUsage: true, storedMediaResult: true },
|
|
119
|
+
"video.extend": { ...generate, providerCapability: "video.extend", waitMs: 6e5, mediaUsage: true, storedMediaResult: true },
|
|
120
|
+
"video.upscale": { ...generate, providerCapability: "video.upscale", waitMs: 6e5, mediaUsage: true, storedMediaResult: true },
|
|
121
|
+
"audio.voice_change": { ...generate, providerCapability: "audio.voice_change", waitMs: 3e5, mediaUsage: true, storedMediaResult: true },
|
|
122
|
+
"text.decision": { role: "decide", providerCapability: "text.decide", waitMs: 8e3, mediaUsage: false, storedMediaResult: false },
|
|
123
|
+
"voice.call": { role: "voice", providerCapability: "voice.call", waitMs: 2e4, mediaUsage: false, storedMediaResult: false }
|
|
124
|
+
};
|
|
125
|
+
var allCapabilityNeeds = Object.keys(capabilityNeeds);
|
|
126
|
+
var aiGenerateNeeds = allCapabilityNeeds.filter((need) => capabilityNeeds[need].role === "generate");
|
|
127
|
+
var aiDecideNeeds = allCapabilityNeeds.filter((need) => capabilityNeeds[need].role === "decide");
|
|
128
|
+
var voiceCallNeeds = allCapabilityNeeds.filter((need) => capabilityNeeds[need].role === "voice");
|
|
129
|
+
var mediaResultNeeds = allCapabilityNeeds.filter((need) => capabilityNeeds[need].storedMediaResult);
|
|
130
|
+
var mediaUsageNeeds = allCapabilityNeeds.filter((need) => capabilityNeeds[need].mediaUsage);
|
|
131
|
+
var generationDeadlines = Object.fromEntries(aiGenerateNeeds.map((need) => [need, capabilityNeeds[need].waitMs]));
|
|
132
|
+
var capabilityNeedWaits = Object.fromEntries(allCapabilityNeeds.map((need) => [need, capabilityNeeds[need].waitMs]));
|
|
133
|
+
var needProviderCapabilities = Object.fromEntries(allCapabilityNeeds.map((need) => [need, capabilityNeeds[need].providerCapability]));
|
|
134
|
+
var generationWaiting = {
|
|
135
|
+
fallbackMs: 2e4,
|
|
136
|
+
visionTextMs: 3e5,
|
|
137
|
+
sdkMarginMs: 6e4,
|
|
138
|
+
negotiatedAdmissionMs: 25e3,
|
|
139
|
+
pollIntervalMs: 2e3,
|
|
140
|
+
pollMaxMs: 8e3
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
// src/ai-operations.ts
|
|
144
|
+
var aiOperationDefinitions = {
|
|
145
|
+
"generate": {
|
|
146
|
+
...operationDefaults,
|
|
147
|
+
capability: "ai",
|
|
148
|
+
operation: "generate",
|
|
149
|
+
input: "ai.generate",
|
|
150
|
+
output: "ai.generate",
|
|
151
|
+
sdkTimeoutMs: null,
|
|
152
|
+
needs: aiGenerateNeeds,
|
|
153
|
+
spend: "may-spend",
|
|
154
|
+
waiting: "generation-need",
|
|
155
|
+
sdkMarginMs: generationWaiting.sdkMarginMs,
|
|
156
|
+
idempotency: "durable-receipt",
|
|
157
|
+
facades: [{ path: "ai.generate", kind: "composite" }]
|
|
158
|
+
},
|
|
159
|
+
"estimate": {
|
|
160
|
+
...operationDefaults,
|
|
161
|
+
capability: "ai",
|
|
162
|
+
operation: "estimate",
|
|
163
|
+
input: "ai.estimate",
|
|
164
|
+
output: "ai.estimate",
|
|
165
|
+
sdkTimeoutMs: operationWaiting.ai.default,
|
|
166
|
+
...operationRead,
|
|
167
|
+
needs: aiGenerateNeeds,
|
|
168
|
+
facades: [{ path: "ai.estimate", kind: "direct" }]
|
|
169
|
+
},
|
|
170
|
+
"options": {
|
|
171
|
+
...operationDefaults,
|
|
172
|
+
capability: "ai",
|
|
173
|
+
operation: "options",
|
|
174
|
+
input: "ai.options",
|
|
175
|
+
output: "ai.options",
|
|
176
|
+
sdkTimeoutMs: operationWaiting.ai.default,
|
|
177
|
+
...operationRead,
|
|
178
|
+
needs: aiGenerateNeeds,
|
|
179
|
+
facades: [{ path: "ai.options", kind: "direct" }]
|
|
180
|
+
},
|
|
181
|
+
// `ai.voiceCatalogue` is a composite of these two reads, not an operation: it declares both.
|
|
182
|
+
"models": {
|
|
183
|
+
...operationDefaults,
|
|
184
|
+
capability: "ai",
|
|
185
|
+
operation: "models",
|
|
186
|
+
input: "ai.models",
|
|
187
|
+
output: "ai.models",
|
|
188
|
+
sdkTimeoutMs: operationWaiting.ai.default,
|
|
189
|
+
...operationRead,
|
|
190
|
+
needs: aiGenerateNeeds,
|
|
191
|
+
facades: [{ path: "ai.models", kind: "direct" }, { path: "ai.voiceCatalogue", kind: "composite" }]
|
|
192
|
+
},
|
|
193
|
+
"voices": {
|
|
194
|
+
...operationDefaults,
|
|
195
|
+
capability: "ai",
|
|
196
|
+
operation: "voices",
|
|
197
|
+
input: "ai.voices",
|
|
198
|
+
output: "ai.voices",
|
|
199
|
+
sdkTimeoutMs: operationWaiting.ai.default,
|
|
200
|
+
...operationRead,
|
|
201
|
+
needs: aiGenerateNeeds,
|
|
202
|
+
facades: [{ path: "ai.voices", kind: "direct" }, { path: "ai.voiceCatalogue", kind: "composite" }]
|
|
203
|
+
},
|
|
204
|
+
// The provider's own sample of a listed voice: a read that synthesizes nothing, so it never spends.
|
|
205
|
+
"voicePreview": {
|
|
206
|
+
...operationDefaults,
|
|
207
|
+
capability: "ai",
|
|
208
|
+
operation: "voicePreview",
|
|
209
|
+
input: "ai.voicePreview",
|
|
210
|
+
output: "ai.voicePreview",
|
|
211
|
+
sdkTimeoutMs: operationWaiting.ai.default,
|
|
212
|
+
...operationRead,
|
|
213
|
+
needs: aiGenerateNeeds,
|
|
214
|
+
spend: "none",
|
|
215
|
+
facades: [{ path: "ai.voicePreview", kind: "direct" }]
|
|
216
|
+
},
|
|
217
|
+
// The participant's favourite voices, kept by Nocha for every experience: free reads and writes.
|
|
218
|
+
"voiceFavorites": {
|
|
219
|
+
...operationDefaults,
|
|
220
|
+
capability: "ai",
|
|
221
|
+
operation: "voiceFavorites",
|
|
222
|
+
input: "ai.voiceFavorites",
|
|
223
|
+
output: "ai.voiceFavorites",
|
|
224
|
+
sdkTimeoutMs: operationWaiting.ai.default,
|
|
225
|
+
...operationRead,
|
|
226
|
+
needs: aiGenerateNeeds,
|
|
227
|
+
spend: "none",
|
|
228
|
+
facades: [{ path: "ai.voiceFavorites", kind: "direct" }]
|
|
229
|
+
},
|
|
230
|
+
"voiceFavoritesUpdate": {
|
|
231
|
+
...operationDefaults,
|
|
232
|
+
capability: "ai",
|
|
233
|
+
operation: "voiceFavoritesUpdate",
|
|
234
|
+
input: "ai.voiceFavoritesUpdate",
|
|
235
|
+
output: "ai.voiceFavoritesUpdate",
|
|
236
|
+
sdkTimeoutMs: operationWaiting.ai.default,
|
|
237
|
+
needs: aiGenerateNeeds,
|
|
238
|
+
spend: "none",
|
|
239
|
+
facades: [{ path: "ai.voiceFavoritesUpdate", kind: "direct" }]
|
|
240
|
+
},
|
|
241
|
+
"get": {
|
|
242
|
+
...operationDefaults,
|
|
243
|
+
capability: "ai",
|
|
244
|
+
operation: "get",
|
|
245
|
+
input: "ai.get",
|
|
246
|
+
output: "ai.get",
|
|
247
|
+
sdkTimeoutMs: operationWaiting.ai.default,
|
|
248
|
+
...operationRead,
|
|
249
|
+
needs: aiGenerateNeeds,
|
|
250
|
+
facades: [{ path: "ai.get", kind: "direct" }]
|
|
251
|
+
},
|
|
252
|
+
"decide": {
|
|
253
|
+
...operationDefaults,
|
|
254
|
+
capability: "ai",
|
|
255
|
+
operation: "decide",
|
|
256
|
+
input: "ai.decide",
|
|
257
|
+
output: "ai.decide",
|
|
258
|
+
sdkTimeoutMs: operationWaiting.ai["decide"],
|
|
259
|
+
needs: aiDecideNeeds,
|
|
260
|
+
spend: "may-spend",
|
|
261
|
+
facades: [{ path: "ai.decide", kind: "direct" }]
|
|
262
|
+
},
|
|
263
|
+
"voice.start": {
|
|
264
|
+
...operationDefaults,
|
|
265
|
+
capability: "ai",
|
|
266
|
+
operation: "voice.start",
|
|
267
|
+
input: "ai.voice.start",
|
|
268
|
+
output: "ai.voice.start",
|
|
269
|
+
sdkTimeoutMs: operationWaiting.ai["voice.start"],
|
|
270
|
+
needs: voiceCallNeeds,
|
|
271
|
+
spend: "may-spend",
|
|
272
|
+
transport: "voice-host",
|
|
273
|
+
facades: [{ path: "voice.start", kind: "direct" }]
|
|
274
|
+
},
|
|
275
|
+
"voice.stop": {
|
|
276
|
+
...operationDefaults,
|
|
277
|
+
capability: "ai",
|
|
278
|
+
operation: "voice.stop",
|
|
279
|
+
input: "ai.voice.stop",
|
|
280
|
+
output: "ai.voice.stop",
|
|
281
|
+
sdkTimeoutMs: operationWaiting.ai.default,
|
|
282
|
+
needs: voiceCallNeeds,
|
|
283
|
+
transport: "voice-host",
|
|
284
|
+
facades: [{ path: "voice.stop", kind: "direct" }]
|
|
285
|
+
},
|
|
286
|
+
"voice.state": {
|
|
287
|
+
...operationDefaults,
|
|
288
|
+
capability: "ai",
|
|
289
|
+
operation: "voice.state",
|
|
290
|
+
input: "ai.voice.state",
|
|
291
|
+
output: "ai.voice.state",
|
|
292
|
+
sdkTimeoutMs: operationWaiting.ai["voice.state"],
|
|
293
|
+
...operationRead,
|
|
294
|
+
needs: voiceCallNeeds,
|
|
295
|
+
transport: "voice-host",
|
|
296
|
+
facades: [{ path: "voice.state", kind: "direct" }]
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
// src/error-codes.ts
|
|
301
|
+
var D = "denied";
|
|
302
|
+
var B = "billing";
|
|
303
|
+
var T = "transient";
|
|
304
|
+
var A = "aborted";
|
|
305
|
+
var I = "invalid";
|
|
306
|
+
var U = "unknown";
|
|
307
|
+
var nochaErrorClasses = {
|
|
308
|
+
// SDK
|
|
309
|
+
bridge_unavailable: D,
|
|
310
|
+
usage_required: I,
|
|
311
|
+
invalid_request: I,
|
|
312
|
+
invalid_result: U,
|
|
313
|
+
invocation_timed_out: T,
|
|
314
|
+
aborted: A,
|
|
315
|
+
invocation_failed: U,
|
|
316
|
+
unknown_error: U,
|
|
317
|
+
navigation_unavailable: D,
|
|
318
|
+
navigation_timed_out: T,
|
|
319
|
+
user_action_required: D,
|
|
320
|
+
upload_failed: U,
|
|
321
|
+
upload_interrupted: T,
|
|
322
|
+
source_too_large: I,
|
|
323
|
+
transfer_unavailable: D,
|
|
324
|
+
not_external: D,
|
|
325
|
+
// Host uploads (`assets.upload`, attachments, `drive.save`): an expired or spent upload authorization, two uploads
|
|
326
|
+
// already running for the account, an upload address the host does not send to; `payload_too_large` (HTTP 413): a
|
|
327
|
+
// request or file beyond its route's bound, like the other `*_too_large`.
|
|
328
|
+
upload_unavailable: T,
|
|
329
|
+
upload_busy: T,
|
|
330
|
+
invalid_upload: U,
|
|
331
|
+
payload_too_large: I,
|
|
332
|
+
// Web and native hosts
|
|
333
|
+
client_update_required: D,
|
|
334
|
+
capability_denied: D,
|
|
335
|
+
request_cancelled: A,
|
|
336
|
+
experience_inactive: T,
|
|
337
|
+
public_control_consent_required: D,
|
|
338
|
+
request_failed: U,
|
|
339
|
+
invalid_response: U,
|
|
340
|
+
multiplayer_unavailable: T,
|
|
341
|
+
rate_limited: T,
|
|
342
|
+
multiplayer_receipt_missing: T,
|
|
343
|
+
multiplayer_receipt_unsupported: D,
|
|
344
|
+
multiplayer_receipt_backlog: I,
|
|
345
|
+
multiplayer_receipt_invalid: U,
|
|
346
|
+
voice_host_unavailable: D,
|
|
347
|
+
native_host_required: D,
|
|
348
|
+
device_inactive: A,
|
|
349
|
+
device_permission_denied: D,
|
|
350
|
+
device_unavailable: D,
|
|
351
|
+
device_busy: T,
|
|
352
|
+
device_timeout: T,
|
|
353
|
+
device_limit: I,
|
|
354
|
+
device_limit_exceeded: I,
|
|
355
|
+
device_media_size: I,
|
|
356
|
+
device_operation_unknown: I,
|
|
357
|
+
device_invalid_request: I,
|
|
358
|
+
// Nocha API behind the reader
|
|
359
|
+
unauthorized: D,
|
|
360
|
+
identity_required: D,
|
|
361
|
+
service_unavailable: T,
|
|
362
|
+
internal_error: T,
|
|
363
|
+
not_found: I,
|
|
364
|
+
not_ready: D,
|
|
365
|
+
playback_unavailable: D,
|
|
366
|
+
experience_unpublished: T,
|
|
367
|
+
playback_changed: D,
|
|
368
|
+
playback_temporarily_unavailable: T,
|
|
369
|
+
runtime_unavailable: T,
|
|
370
|
+
authentication_required: D,
|
|
371
|
+
public_read_denied: D,
|
|
372
|
+
review_unavailable: D,
|
|
373
|
+
workspace_access_denied: D,
|
|
374
|
+
workspace_revoked: D,
|
|
375
|
+
workspace_context_required: D,
|
|
376
|
+
workspace_selection_invalid: I,
|
|
377
|
+
// Spaces of an experience that declares them (`nocha.spaces`): `space_denied` this person may not enter it,
|
|
378
|
+
// `space_not_declared` no data usage declares this kind, `team_required` no team chosen, `space_mismatch` an
|
|
379
|
+
// operation sent to a space its usage does not declare, `space_not_attached` its space is not attached yet (ask
|
|
380
|
+
// `nocha.spaces.<kind>()` first), `embedded_spaces` a creator setting the manifest now decides, `team_not_member` an
|
|
381
|
+
// `asTeam` the person may not act for (not a current member of that team, or a reference `actAsTeam` never returned).
|
|
382
|
+
space_denied: D,
|
|
383
|
+
space_not_declared: I,
|
|
384
|
+
team_required: I,
|
|
385
|
+
space_mismatch: D,
|
|
386
|
+
space_not_attached: I,
|
|
387
|
+
embedded_spaces: I,
|
|
388
|
+
team_not_member: D,
|
|
389
|
+
data_contract_incompatible: D,
|
|
390
|
+
public_control_denied: D,
|
|
391
|
+
review_external_integration_unavailable: D,
|
|
392
|
+
revision_schema_unsupported: D,
|
|
393
|
+
usage_unknown: I,
|
|
394
|
+
usage_operation_denied: I,
|
|
395
|
+
usage_resource_denied: I,
|
|
396
|
+
usage_scope_denied: I,
|
|
397
|
+
usage_cap_exceeded: B,
|
|
398
|
+
usage_public_read_denied: D,
|
|
399
|
+
usage_public_control_denied: D,
|
|
400
|
+
// Speech shared across the experience (`share: 'experience'`): the media usage does not declare `share`, a shared
|
|
401
|
+
// line names no explicit `model` and `voice`, the listener it waited on did not finish (call again with the same
|
|
402
|
+
// request and key, possibly leading it with one's own consent), or the line left the cache since it was served.
|
|
403
|
+
usage_share_denied: I,
|
|
404
|
+
shared_speech_selection_required: I,
|
|
405
|
+
shared_speech_retry: T,
|
|
406
|
+
shared_speech_expired: I,
|
|
407
|
+
// Storage
|
|
408
|
+
// `*_full`: the workspace budget is reached (free keys or records); `*_too_large`: one value exceeds its own limit.
|
|
409
|
+
state_conflict: I,
|
|
410
|
+
conflict: I,
|
|
411
|
+
memory_conflict: I,
|
|
412
|
+
database_conflict: I,
|
|
413
|
+
idempotency_conflict: I,
|
|
414
|
+
memory_full: I,
|
|
415
|
+
database_full: I,
|
|
416
|
+
memory_value_too_large: I,
|
|
417
|
+
database_record_too_large: I,
|
|
418
|
+
database_insert_limit: I,
|
|
419
|
+
database_unavailable: T,
|
|
420
|
+
// Experience search indexes (`search`): `*_full` an index or mark budget, `search_adults_only` a `people` index
|
|
421
|
+
// for a signed-in account not declared 18+, `search_asset_denied` an asset the writer did not upload in this experience.
|
|
422
|
+
search_index_unknown: I,
|
|
423
|
+
search_record_too_large: I,
|
|
424
|
+
search_index_full: I,
|
|
425
|
+
search_owner_limit: I,
|
|
426
|
+
search_conflict: I,
|
|
427
|
+
search_filter_invalid: I,
|
|
428
|
+
search_cursor_expired: I,
|
|
429
|
+
search_profile_required: I,
|
|
430
|
+
search_location_required: I,
|
|
431
|
+
search_location_rate_limited: T,
|
|
432
|
+
search_marks_full: I,
|
|
433
|
+
search_adults_only: D,
|
|
434
|
+
search_unavailable: T,
|
|
435
|
+
search_asset_denied: I,
|
|
436
|
+
// Backend pilot: an unknown outcome/deadline requires receipt reconciliation, never blind retry.
|
|
437
|
+
backend_unavailable: T,
|
|
438
|
+
backend_capacity_exceeded: T,
|
|
439
|
+
backend_budget_exhausted: D,
|
|
440
|
+
backend_route_unknown: I,
|
|
441
|
+
backend_route_owner_only: D,
|
|
442
|
+
backend_usage_denied: D,
|
|
443
|
+
backend_resource_protected: D,
|
|
444
|
+
backend_paid_capability_denied: D,
|
|
445
|
+
backend_input_invalid: I,
|
|
446
|
+
backend_output_invalid: U,
|
|
447
|
+
backend_deadline_exceeded: U,
|
|
448
|
+
backend_outcome_unknown: U,
|
|
449
|
+
backend_revision_required: D,
|
|
450
|
+
// The person's own Mac (`machine`): the `denied` codes wait for an action (pairing, consent, the Mac's settings or
|
|
451
|
+
// confirmation, an update, the operator right), never for a retry; `machine_offline` and `machine_unavailable` pass by
|
|
452
|
+
// themselves; `machine_host_unsupported` names a host or SDK without the machine streams. End-to-end terminals:
|
|
453
|
+
// `machine_device_untrusted` (the Mac has not authorized this device, revoked it, or its handshake failed: the host
|
|
454
|
+
// offers pairing) and `machine_protocol_outdated` (the Mac or the host must be updated; never a plain terminal).
|
|
455
|
+
machine_not_paired: D,
|
|
456
|
+
machine_consent_required: D,
|
|
457
|
+
machine_consent_denied: D,
|
|
458
|
+
machine_operator_required: D,
|
|
459
|
+
machine_offline: T,
|
|
460
|
+
machine_agent_incompatible: D,
|
|
461
|
+
machine_terminal_disabled: D,
|
|
462
|
+
machine_paused: D,
|
|
463
|
+
machine_confirmation_required: D,
|
|
464
|
+
machine_locked: D,
|
|
465
|
+
machine_tmux_missing: D,
|
|
466
|
+
machine_session_not_found: I,
|
|
467
|
+
machine_session_ended: I,
|
|
468
|
+
machine_limit: I,
|
|
469
|
+
machine_host_unsupported: D,
|
|
470
|
+
machine_invalid_request: I,
|
|
471
|
+
machine_unavailable: T,
|
|
472
|
+
machine_device_untrusted: D,
|
|
473
|
+
machine_protocol_outdated: D,
|
|
474
|
+
// « Établi », the Mac's projects (`workspace.*`, `files.*`, `git.*`, `agents.*`), worded in `machineWorkspaceErrorMessages`.
|
|
475
|
+
machine_workspace_disabled: D,
|
|
476
|
+
machine_root_not_found: I,
|
|
477
|
+
machine_path_denied: D,
|
|
478
|
+
machine_path_not_found: I,
|
|
479
|
+
machine_path_exists: I,
|
|
480
|
+
machine_too_large: I,
|
|
481
|
+
machine_git_unavailable: D,
|
|
482
|
+
machine_git_not_repository: I,
|
|
483
|
+
machine_git_failed: I,
|
|
484
|
+
machine_agent_unavailable: D,
|
|
485
|
+
machine_conversation_not_found: I,
|
|
486
|
+
machine_interaction_not_found: I,
|
|
487
|
+
// Personal connected accounts
|
|
488
|
+
connector_not_granted: D,
|
|
489
|
+
connector_scope_missing: D,
|
|
490
|
+
connector_reauthorization_required: D,
|
|
491
|
+
connector_unavailable: T,
|
|
492
|
+
connectors_unavailable: T,
|
|
493
|
+
connector_failed: I,
|
|
494
|
+
connector_uncertain: U,
|
|
495
|
+
connector_confirmation_required: D,
|
|
496
|
+
quota_exceeded: T,
|
|
497
|
+
// Managed network
|
|
498
|
+
network_unavailable: T,
|
|
499
|
+
network_declaration_required: I,
|
|
500
|
+
network_revision_required: D,
|
|
501
|
+
network_method_denied: I,
|
|
502
|
+
network_path_invalid: I,
|
|
503
|
+
network_body_invalid: I,
|
|
504
|
+
network_asset_integrity: U,
|
|
505
|
+
network_outcome_unknown: U,
|
|
506
|
+
network_access_denied: D,
|
|
507
|
+
network_rate_limited: T,
|
|
508
|
+
network_destination_invalid: I,
|
|
509
|
+
network_destination_private: I,
|
|
510
|
+
network_redirect_denied: I,
|
|
511
|
+
network_response_too_large: I,
|
|
512
|
+
network_timeout: U,
|
|
513
|
+
network_transport_failed: U,
|
|
514
|
+
// Owner-keyed recipients: no key the owner confirmed for this declaration (or a working revision outside the owner's
|
|
515
|
+
// session), no secret key on this host, the owner's hourly quota or this account's share of it, a keyed response
|
|
516
|
+
// that is not plain text; `network_asset_busy`: too many remote files downloading at once.
|
|
517
|
+
network_secret_missing: D,
|
|
518
|
+
network_secrets_unavailable: D,
|
|
519
|
+
network_secret_quota: T,
|
|
520
|
+
network_secret_unsafe_response: U,
|
|
521
|
+
network_asset_busy: T,
|
|
522
|
+
// Notifications sent to a player
|
|
523
|
+
notifications_unavailable: D,
|
|
524
|
+
notifications_disabled: D,
|
|
525
|
+
notifications_rate_limited: T,
|
|
526
|
+
notifications_not_declared: I,
|
|
527
|
+
// Triggers, automations and the experience inbox
|
|
528
|
+
inbox_unavailable: D,
|
|
529
|
+
inbox_full: I,
|
|
530
|
+
inbox_event_not_found: I,
|
|
531
|
+
trigger_not_found: I,
|
|
532
|
+
trigger_disabled: D,
|
|
533
|
+
trigger_limit_reached: I,
|
|
534
|
+
trigger_managed_by_mail: I,
|
|
535
|
+
trigger_slug_taken: I,
|
|
536
|
+
workspace_unavailable: I,
|
|
537
|
+
automation_schedule_invalid: I,
|
|
538
|
+
automation_rate_limited: T,
|
|
539
|
+
// The person's Drive, through the host dialog: `sign_in_required` asks a visitor to sign in first;
|
|
540
|
+
// `drive_unavailable` names a host without the Drive (nocha dev, a standalone page); `drive_read_only` a save to a
|
|
541
|
+
// read-only library, refused like `drive_forbidden`; `drive_mount_unavailable` a library that does not answer.
|
|
542
|
+
drive_unavailable: D,
|
|
543
|
+
sign_in_required: D,
|
|
544
|
+
drive_forbidden: D,
|
|
545
|
+
drive_read_only: D,
|
|
546
|
+
drive_not_found: I,
|
|
547
|
+
drive_name_conflict: I,
|
|
548
|
+
drive_invalid_name: I,
|
|
549
|
+
drive_unsupported_type: I,
|
|
550
|
+
drive_upload_expired: T,
|
|
551
|
+
drive_file_too_large: I,
|
|
552
|
+
drive_mount_unavailable: T,
|
|
553
|
+
// Experience mail
|
|
554
|
+
mail_unavailable: D,
|
|
555
|
+
mail_disabled: D,
|
|
556
|
+
mail_recipient_not_allowed: I,
|
|
557
|
+
mail_reply_expired: I,
|
|
558
|
+
mail_too_large: I,
|
|
559
|
+
mail_rate_limited: T,
|
|
560
|
+
mail_sender_not_allowed: D,
|
|
561
|
+
mail_send_failed: U,
|
|
562
|
+
mail_workspace_not_allowed: I,
|
|
563
|
+
// Experience places: the capability is absent on this host (or this is not the published play); a refused point.
|
|
564
|
+
places_unavailable: T,
|
|
565
|
+
invalid_places: I,
|
|
566
|
+
place_removed: I,
|
|
567
|
+
place_limit: I,
|
|
568
|
+
place_keyword_unknown: I,
|
|
569
|
+
// Public profiles (`profiles`): the capability is absent on this host.
|
|
570
|
+
profiles_unavailable: T,
|
|
571
|
+
// Swipe excerpts: absent on this host (or not the published play); a player who is not the owner or an editor; a refused excerpt.
|
|
572
|
+
excerpts_unavailable: D,
|
|
573
|
+
excerpts_forbidden: D,
|
|
574
|
+
invalid_excerpts: I,
|
|
575
|
+
excerpt_removed: I,
|
|
576
|
+
excerpt_limit: I,
|
|
577
|
+
excerpt_keyword_unknown: I,
|
|
578
|
+
// The person's library (`library`, served by the web host): `library_inactive` a frame the host did not mount as the
|
|
579
|
+
// account's interface (an ordinary player, the app, offline, `nocha dev`: show a demo); `library_unavailable` a read
|
|
580
|
+
// of the host that failed; `invalid_input` an input the host refuses; `activation_required` an `open` without a gesture.
|
|
581
|
+
library_inactive: D,
|
|
582
|
+
library_unavailable: T,
|
|
583
|
+
invalid_input: I,
|
|
584
|
+
activation_required: D,
|
|
585
|
+
// Calls between experiences (`experiences`, relayed by the web host): `experience_call_unavailable` a host without the
|
|
586
|
+
// relay or an experience that exposes nothing here (`available()` then answers false); `experience_call_denied` an
|
|
587
|
+
// undeclared call or one the called experience does not admit; `experience_call_consent_refused` the person refused
|
|
588
|
+
// (nothing is kept); `experience_call_quota` too many calls for now; `experience_call_failed` the called experience
|
|
589
|
+
// failed, timed out or answered outside its schema; `experience_call_invalid` an input outside the declared schema.
|
|
590
|
+
experience_call_unavailable: D,
|
|
591
|
+
experience_call_denied: D,
|
|
592
|
+
experience_call_consent_refused: D,
|
|
593
|
+
experience_call_quota: T,
|
|
594
|
+
experience_call_failed: T,
|
|
595
|
+
experience_call_invalid: I,
|
|
596
|
+
// A swipe experience (`nocha.host`, served by the host): `host_inactive` a frame the host did not mount as the swipe
|
|
597
|
+
// experience (an ordinary player, `nocha dev`, an older host: show a demo); `hosting_restricted` a revision declaring
|
|
598
|
+
// `hosts` that its owner may not publish yet (reserved to Nocha's main account until the operator opens it).
|
|
599
|
+
host_inactive: D,
|
|
600
|
+
hosting_restricted: D,
|
|
601
|
+
// Workflow module calls (`nocha.module`, only inside a host's workflow run, never `nocha dev` nor `/playback/invoke`):
|
|
602
|
+
// a host that delivers none, a call this host does not hold, a spend beyond what is left of the call's confirmed budget
|
|
603
|
+
module_unavailable: D,
|
|
604
|
+
module_call_unknown: I,
|
|
605
|
+
module_budget_exhausted: B,
|
|
606
|
+
// Automation allowance and overage billing
|
|
607
|
+
automation_allowance_exhausted: B,
|
|
608
|
+
automation_billing_blocked: B,
|
|
609
|
+
// Declarative workflows (`automations`): activation, effectful tests and publication need the host's confirmation
|
|
610
|
+
automations_unavailable: T,
|
|
611
|
+
workflow_host_confirmation_required: D,
|
|
612
|
+
workflow_published_revision_required: D,
|
|
613
|
+
workflow_account_required: D,
|
|
614
|
+
workflow_limit_reached: B,
|
|
615
|
+
workflow_version_conflict: I,
|
|
616
|
+
workflow_consent_expired: I,
|
|
617
|
+
workflow_invalid: I,
|
|
618
|
+
// Developer API keys
|
|
619
|
+
api_key_not_allowed: D,
|
|
620
|
+
api_key_scope_denied: D,
|
|
621
|
+
api_key_experience_denied: D,
|
|
622
|
+
api_key_expired: D,
|
|
623
|
+
api_key_revoked: D,
|
|
624
|
+
api_key_watchirl_unavailable: D,
|
|
625
|
+
api_key_limit_reached: I,
|
|
626
|
+
// Self-hosted experience server API: a browser caller, a token to ask the page again for (`revision_changed`: minted
|
|
627
|
+
// for an older revision), a capability or usage the served revision does not allow, `frame.external` not granted
|
|
628
|
+
browser_request_refused: D,
|
|
629
|
+
player_token_invalid: D,
|
|
630
|
+
revision_changed: D,
|
|
631
|
+
capability_not_allowed: D,
|
|
632
|
+
usage_not_declared: I,
|
|
633
|
+
external_hosting_pending: D,
|
|
634
|
+
rate_limit_unavailable: T,
|
|
635
|
+
// AI and spending
|
|
636
|
+
experience_authorization_required: B,
|
|
637
|
+
experience_cap_exhausted: B,
|
|
638
|
+
credit_exhausted: B,
|
|
639
|
+
review_budget_exhausted: B,
|
|
640
|
+
review_spending_not_authorized: B,
|
|
641
|
+
generation_quote_expired: B,
|
|
642
|
+
generation_quote_conflict: B,
|
|
643
|
+
spend_settlement_conflict: B,
|
|
644
|
+
spend_reconciliation_required: B,
|
|
645
|
+
spend_authorization_pending: B,
|
|
646
|
+
participant_daily_cap_reached: B,
|
|
647
|
+
paid_consent_required: B,
|
|
648
|
+
spend_journal_failed: U,
|
|
649
|
+
spend_busy: T,
|
|
650
|
+
intelligence_unavailable: T,
|
|
651
|
+
generation_paused: T,
|
|
652
|
+
pricing_unavailable: T,
|
|
653
|
+
generation_estimate_unavailable: T,
|
|
654
|
+
generation_options_unavailable: T,
|
|
655
|
+
data_consent_unavailable: T,
|
|
656
|
+
generation_failed: U,
|
|
657
|
+
generation_budget_exceeded: I,
|
|
658
|
+
operation_retired: I,
|
|
659
|
+
generation_effort_conflict: I,
|
|
660
|
+
generation_effort_unavailable: I,
|
|
661
|
+
generation_policy_required: I,
|
|
662
|
+
// Speech model and voice selection: refused before any operation or charge; `voice_preview_unavailable`: this voice
|
|
663
|
+
// has no free sample here (auditioning it costs a synthesis); `voice_favorites_limit`: the participant's favourite
|
|
664
|
+
// voices are full (`ai.voiceFavoritesUpdate`)
|
|
665
|
+
model_unavailable: I,
|
|
666
|
+
voice_unavailable: I,
|
|
667
|
+
voice_preview_unavailable: I,
|
|
668
|
+
generation_model_conflict: I,
|
|
669
|
+
voice_favorites_limit: I,
|
|
670
|
+
// Voice calls, refused by the host: an unknown or ended call, a previous call's settlement still open, another call
|
|
671
|
+
// starting, an invalid start, consent or microphone refused, a call superseded by a newer start or a closing
|
|
672
|
+
// document, an invalid answer from the call service, a session that must be started again.
|
|
673
|
+
voice_call_not_found: I,
|
|
674
|
+
voice_call_reconciliation_required: B,
|
|
675
|
+
voice_call_busy: T,
|
|
676
|
+
voice_call_input_invalid: I,
|
|
677
|
+
voice_call_consent_required: D,
|
|
678
|
+
voice_call_microphone_denied: D,
|
|
679
|
+
voice_call_obsolete: A,
|
|
680
|
+
voice_call_result_invalid: U,
|
|
681
|
+
voice_call_restart_required: I,
|
|
682
|
+
generation_usage_unknown: I,
|
|
683
|
+
generation_not_found: I,
|
|
684
|
+
generation_request_conflict: I,
|
|
685
|
+
spend_request_conflict: I,
|
|
686
|
+
media_idempotency_conflict: I,
|
|
687
|
+
realtime_in_progress: I,
|
|
688
|
+
experience_revision_changed: D,
|
|
689
|
+
// Media
|
|
690
|
+
media_unavailable: T,
|
|
691
|
+
media_usage_required: I,
|
|
692
|
+
media_usage_denied: D,
|
|
693
|
+
media_access_denied: D,
|
|
694
|
+
media_retention_denied: D,
|
|
695
|
+
media_reference_denied: D,
|
|
696
|
+
media_not_found: I,
|
|
697
|
+
media_recovery_required: D,
|
|
698
|
+
media_too_large: I,
|
|
699
|
+
media_reference_too_large: I,
|
|
700
|
+
media_unsupported: I,
|
|
701
|
+
media_reference_unsupported: I,
|
|
702
|
+
media_invalid_resource: U,
|
|
703
|
+
media_resource_conflict: I,
|
|
704
|
+
erasure_changed: I,
|
|
705
|
+
media_unsupported_host: D,
|
|
706
|
+
playback_unsupported_host: D,
|
|
707
|
+
// A media a record or a film still cites, which removing it would break; the experience's media storage is full.
|
|
708
|
+
media_cited: I,
|
|
709
|
+
media_storage_full: I,
|
|
710
|
+
// Live camera and microphone (`device.media`): outside the experience's own address, a visitor to sign in, a refused
|
|
711
|
+
// permission, a device in use (or a hidden page), no device at all. `describeLiveMediaFailure` words each one.
|
|
712
|
+
media_requires_experience_host: D,
|
|
713
|
+
media_sign_in_required: D,
|
|
714
|
+
media_permission_denied: D,
|
|
715
|
+
media_device_busy: T,
|
|
716
|
+
media_device_missing: D,
|
|
717
|
+
video_recovery_unavailable: T,
|
|
718
|
+
video_request_refused: D,
|
|
719
|
+
video_recovery_required: D,
|
|
720
|
+
// Video
|
|
721
|
+
video_unavailable: T,
|
|
722
|
+
video_connection_required: D,
|
|
723
|
+
video_media_unauthorized: D,
|
|
724
|
+
video_media_unavailable: T,
|
|
725
|
+
video_invalid_response: U,
|
|
726
|
+
video_generation_not_found: I,
|
|
727
|
+
video_not_ready: T,
|
|
728
|
+
video_request_failed: T,
|
|
729
|
+
video_data_unavailable: T,
|
|
730
|
+
video_connection_unavailable: T,
|
|
731
|
+
clipping_unavailable: T,
|
|
732
|
+
clipping_not_found: I,
|
|
733
|
+
invalid_media_usage: I,
|
|
734
|
+
provider_unavailable: T,
|
|
735
|
+
studio_references_unavailable: T,
|
|
736
|
+
media_reference_copy_unavailable: T,
|
|
737
|
+
creator_attribution_unavailable: T,
|
|
738
|
+
transfers_unavailable: T,
|
|
739
|
+
video_consent_required: B,
|
|
740
|
+
video_project_payer_unsupported: D,
|
|
741
|
+
workflow_unknown: I,
|
|
742
|
+
workflow_unsupported: I,
|
|
743
|
+
// The participant's own Tripirl projects (`video.projects.*`): refused to this experience, gone, changed since the
|
|
744
|
+
// revision shown, still running a film, or a setting that cannot change; an action the project's state refuses now
|
|
745
|
+
// (`actions.*.reason`: work running, nothing to resume, already finished, nothing to cancel).
|
|
746
|
+
video_projects_not_allowed: D,
|
|
747
|
+
project_not_found: I,
|
|
748
|
+
revision_conflict: I,
|
|
749
|
+
generation_not_terminal: I,
|
|
750
|
+
setting_not_editable: I,
|
|
751
|
+
video_project_running: I,
|
|
752
|
+
video_project_nothing_to_resume: I,
|
|
753
|
+
video_project_already_finished: I,
|
|
754
|
+
video_project_not_running: I,
|
|
755
|
+
// `video.projects.addReference`: an asset that is not the participant's own, a file Tripirl cannot read as a video.
|
|
756
|
+
video_reference_asset_not_found: I,
|
|
757
|
+
video_reference_refused: I,
|
|
758
|
+
// Mac hardware
|
|
759
|
+
hardware_unavailable: T,
|
|
760
|
+
hardware_invalid_response: U,
|
|
761
|
+
hardware_owner_required: D,
|
|
762
|
+
hardware_connection_required: D,
|
|
763
|
+
hardware_hue_connection_required: D,
|
|
764
|
+
hardware_leds_connection_required: D,
|
|
765
|
+
hardware_audio_connection_required: D,
|
|
766
|
+
hardware_connection_changed: D,
|
|
767
|
+
hardware_access_revoked: D,
|
|
768
|
+
hardware_access_denied: D,
|
|
769
|
+
hardware_device_denied: D,
|
|
770
|
+
hardware_host_unavailable: D,
|
|
771
|
+
hardware_agent_incompatible: D,
|
|
772
|
+
hardware_hue_setup_required: D,
|
|
773
|
+
hardware_audio_setup_required: D,
|
|
774
|
+
hardware_audio_transcription_denied: D,
|
|
775
|
+
hardware_audio_quota_exceeded: B,
|
|
776
|
+
hardware_invalid_request: I,
|
|
777
|
+
hardware_audio_capture_not_found: I,
|
|
778
|
+
hardware_audio_device_not_found: I,
|
|
779
|
+
hardware_audio_busy: I,
|
|
780
|
+
hardware_rate_limited: T,
|
|
781
|
+
hardware_host_offline: T,
|
|
782
|
+
hardware_leds_unreachable: T,
|
|
783
|
+
hardware_hue_network: T,
|
|
784
|
+
hardware_hue_unavailable: T,
|
|
785
|
+
hardware_device_service_unavailable: T,
|
|
786
|
+
hardware_audio_unreachable: T,
|
|
787
|
+
hardware_audio_unavailable: T,
|
|
788
|
+
hardware_audio_transcription_unavailable: T,
|
|
789
|
+
hardware_audio_source_missing: D,
|
|
790
|
+
hardware_audio_format_unsupported: D,
|
|
791
|
+
hardware_desktop_connection_required: D,
|
|
792
|
+
DESKTOP_DISABLED: D,
|
|
793
|
+
DESKTOP_UNSUPPORTED_PLATFORM: D,
|
|
794
|
+
DESKTOP_AUTOMATION_DENIED: D,
|
|
795
|
+
DESKTOP_TERMINAL_UNAVAILABLE: T,
|
|
796
|
+
DESKTOP_AGENT_UNKNOWN: I,
|
|
797
|
+
DESKTOP_DICTATION_UNAVAILABLE: T,
|
|
798
|
+
DESKTOP_COMMAND_FAILED: U,
|
|
799
|
+
// Local development (nocha dev)
|
|
800
|
+
development_unavailable: T,
|
|
801
|
+
development_expired: T,
|
|
802
|
+
request_timeout: T,
|
|
803
|
+
topic_limit: I
|
|
804
|
+
};
|
|
805
|
+
function isNochaErrorCode(value) {
|
|
806
|
+
return typeof value === "string" && Object.hasOwn(nochaErrorClasses, value);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
// src/errors.ts
|
|
810
|
+
var genericCodes = /* @__PURE__ */ new Set(["invocation_failed", "request_failed", "unknown_error"]);
|
|
811
|
+
var hostRetryable = /* @__PURE__ */ new WeakMap();
|
|
812
|
+
var NochaError = class extends Error {
|
|
813
|
+
code;
|
|
814
|
+
wireCode;
|
|
815
|
+
trace_id;
|
|
816
|
+
correlation_id;
|
|
817
|
+
operation_id;
|
|
818
|
+
idempotency_key;
|
|
819
|
+
details;
|
|
820
|
+
constructor(code, message, metadata = {}) {
|
|
821
|
+
super(message);
|
|
822
|
+
this.name = "NochaError";
|
|
823
|
+
const known = isNochaErrorCode(code);
|
|
824
|
+
this.code = known ? code : "unknown_error";
|
|
825
|
+
const wireCode = metadata.wireCode ?? (known ? void 0 : String(code));
|
|
826
|
+
if (wireCode !== void 0 && wireCode !== this.code) this.wireCode = wireCode;
|
|
827
|
+
if (metadata.trace_id !== void 0) this.trace_id = metadata.trace_id;
|
|
828
|
+
if (metadata.correlation_id !== void 0) this.correlation_id = metadata.correlation_id;
|
|
829
|
+
if (metadata.operation_id !== void 0) this.operation_id = metadata.operation_id;
|
|
830
|
+
if (metadata.idempotency_key !== void 0) this.idempotency_key = metadata.idempotency_key;
|
|
831
|
+
if (metadata.details !== void 0) this.details = Object.freeze({ ...metadata.details });
|
|
832
|
+
hostRetryable.set(this, metadata.retryable === true);
|
|
833
|
+
}
|
|
834
|
+
/** True when retrying later, with the same idempotency key, can succeed. */
|
|
835
|
+
get retryable() {
|
|
836
|
+
return classifyError(this) === "transient";
|
|
837
|
+
}
|
|
838
|
+
};
|
|
839
|
+
function isNochaError(value) {
|
|
840
|
+
return value instanceof NochaError || value instanceof Error && value.name === "NochaError" && typeof value.code === "string";
|
|
841
|
+
}
|
|
842
|
+
function classifyError(error) {
|
|
843
|
+
if (!isNochaError(error)) {
|
|
844
|
+
return error !== null && typeof error === "object" && error.name === "AbortError" ? "aborted" : "unknown";
|
|
845
|
+
}
|
|
846
|
+
const code = isNochaErrorCode(error.code) ? error.code : "unknown_error";
|
|
847
|
+
if (genericCodes.has(code)) return hostRetryable.get(error) === true ? "transient" : "unknown";
|
|
848
|
+
return nochaErrorClasses[code];
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
// src/speech-rules.ts
|
|
852
|
+
var SPEECH_MODEL_ID_MAX_LENGTH = 100;
|
|
853
|
+
var SPEECH_VOICE_ID_MAX_LENGTH = 160;
|
|
854
|
+
var SPEECH_MODEL_ID_PATTERN = new RegExp(`^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,${SPEECH_MODEL_ID_MAX_LENGTH - 1}}$`);
|
|
855
|
+
var SPEECH_VOICE_ID_PATTERN = new RegExp(`^[A-Za-z0-9_:.-]{1,${SPEECH_VOICE_ID_MAX_LENGTH}}$`);
|
|
856
|
+
var speechVoiceAliases = [
|
|
857
|
+
"alloy",
|
|
858
|
+
"ash",
|
|
859
|
+
"ballad",
|
|
860
|
+
"coral",
|
|
861
|
+
"echo",
|
|
862
|
+
"fable",
|
|
863
|
+
"nova",
|
|
864
|
+
"onyx",
|
|
865
|
+
"sage",
|
|
866
|
+
"shimmer",
|
|
867
|
+
"verse",
|
|
868
|
+
"marin",
|
|
869
|
+
"cedar"
|
|
870
|
+
];
|
|
871
|
+
var isSpeechModelId = (value) => typeof value === "string" && SPEECH_MODEL_ID_PATTERN.test(value);
|
|
872
|
+
var isSpeechVoiceId = (value) => typeof value === "string" && SPEECH_VOICE_ID_PATTERN.test(value);
|
|
873
|
+
var isSpeechVoiceAlias = (value) => typeof value === "string" && speechVoiceAliases.includes(value);
|
|
874
|
+
var speechSettingRanges = {
|
|
875
|
+
stability: { min: 0, max: 1 },
|
|
876
|
+
similarityBoost: { min: 0, max: 1 },
|
|
877
|
+
style: { min: 0, max: 1 },
|
|
878
|
+
speed: { min: 0.7, max: 1.2 }
|
|
879
|
+
};
|
|
880
|
+
var aiModelNeeds = ["audio.synthesize", "audio.sound_effect", "audio.generate", "audio.transcribe"];
|
|
881
|
+
var voiceFacets = [
|
|
882
|
+
"language",
|
|
883
|
+
"locale",
|
|
884
|
+
"collection",
|
|
885
|
+
"query",
|
|
886
|
+
"gender",
|
|
887
|
+
"age",
|
|
888
|
+
"accent",
|
|
889
|
+
"category",
|
|
890
|
+
"use_cases",
|
|
891
|
+
"descriptives",
|
|
892
|
+
"featured",
|
|
893
|
+
"sort",
|
|
894
|
+
"max_price_multiplier",
|
|
895
|
+
"verified_for"
|
|
896
|
+
];
|
|
897
|
+
var voiceSorts = ["created_date", "usage_character_count_1y", "trending", "cloned_by_count"];
|
|
898
|
+
var voiceCollections = ["standard", "library", "all"];
|
|
899
|
+
var voiceCatalogueCollections = ["standard", "library", "both", "all"];
|
|
900
|
+
var VOICE_FACET_PATTERN = /^[A-Za-z0-9][A-Za-z0-9 _-]{0,49}$/;
|
|
901
|
+
var VOICE_FACET_LIST_MAX = 5;
|
|
902
|
+
|
|
903
|
+
// src/speech-voices.ts
|
|
904
|
+
var isLegacySpeechHost = (error) => isNochaError(error) && error.code === "client_update_required";
|
|
905
|
+
var stability = { key: "stability", kind: "number", ...speechSettingRanges.stability };
|
|
906
|
+
var steppedStability = { ...stability, values: [0, 0.5, 1] };
|
|
907
|
+
var similarityBoost = { key: "similarityBoost", kind: "number", ...speechSettingRanges.similarityBoost };
|
|
908
|
+
var style = { key: "style", kind: "number", ...speechSettingRanges.style };
|
|
909
|
+
var speed = { key: "speed", kind: "number", ...speechSettingRanges.speed };
|
|
910
|
+
var tagRoots = (words) => new Set(words.split(" "));
|
|
911
|
+
var emotionTagRoots = tagRoots("afraid amuse angry annoy anxious appall bitter calm cold confident confuse cry curious delight determine disappoint disgust embarrass enthusiastic excite fearful frustrate happy hesitant hopeful impatient irritate joyful melancholy mischievous nervous playful relieve resign sad sarcastic startle surprise tease tense thoughtful uncertain worry bored dramatic proud smug");
|
|
912
|
+
var nonVerbalTagRoots = tagRoots("breath chuckle clear cry exhale gasp giggle gulp inhale laugh pause sigh snort sob swallow throat wheeze yawn");
|
|
913
|
+
var voiceQualityTagRoots = tagRoots("accent announcer build clear deadpan deep dry emotion energy gentle gradual gravelly high-pitched hurry light loud low lower mumble mutter narrator pace quick quiet robotic shout sing slow soft stammer stern tender tremble urgent voice warm whisper");
|
|
914
|
+
var vocalTagRoots = /* @__PURE__ */ new Set([...emotionTagRoots, ...nonVerbalTagRoots, ...voiceQualityTagRoots]);
|
|
915
|
+
var soundEffectTagRoots = tagRoots("alarm animal applause bark bell bird blast boing car cat clap crash crowd door dog engine explosion footstep glass gun gunshot horn knock lightning music phone rain ring room siren storm thunder traffic wave wind rumble whoosh");
|
|
916
|
+
var nonEnglishTagWords = tagRoots("chuchote colere crie doucement heureux lentement murmure pleure rapidement rit soupire triste enojado feliz grita lentamente llora rapido rie susurra tristeza");
|
|
917
|
+
function verifiedModels(listed) {
|
|
918
|
+
const models2 = Array.isArray(listed) ? listed.filter(isSpeechModelId) : [];
|
|
919
|
+
return [...new Set(models2)].sort().slice(0, 24);
|
|
920
|
+
}
|
|
921
|
+
var line = (value, max) => (
|
|
922
|
+
// eslint-disable-next-line no-control-regex -- a listed name drops C0 controls and DEL on purpose.
|
|
923
|
+
[...value.replace(/[\u0000-\u001f\u007f]+/gu, " ").replace(/\s+/gu, " ").trim()].slice(0, max).join("").trim()
|
|
924
|
+
);
|
|
925
|
+
var spokenSeparator = /\s[-–—|]\s|,|\(/u;
|
|
926
|
+
function spokenVoiceName(name) {
|
|
927
|
+
const cleaned = typeof name === "string" ? line(name, 160) : "";
|
|
928
|
+
const head = cleaned.split(spokenSeparator)[0]?.trim() ?? "";
|
|
929
|
+
return [...head || cleaned].slice(0, 40).join("").trim();
|
|
930
|
+
}
|
|
931
|
+
var unaccented = (value) => value.normalize("NFD").replace(/[\u0300-\u036f]/gu, "");
|
|
932
|
+
var traitWord = (value) => unaccented(line(typeof value === "string" ? value : "", 48)).toLowerCase().replace(/[_\-/]/gu, " ").replace(/\s+/gu, " ").trim();
|
|
933
|
+
var genders = {
|
|
934
|
+
female: "female",
|
|
935
|
+
femme: "female",
|
|
936
|
+
feminin: "female",
|
|
937
|
+
feminine: "female",
|
|
938
|
+
woman: "female",
|
|
939
|
+
girl: "female",
|
|
940
|
+
f: "female",
|
|
941
|
+
male: "male",
|
|
942
|
+
homme: "male",
|
|
943
|
+
masculin: "male",
|
|
944
|
+
masculine: "male",
|
|
945
|
+
man: "male",
|
|
946
|
+
boy: "male",
|
|
947
|
+
m: "male",
|
|
948
|
+
neutral: "neutral",
|
|
949
|
+
neutre: "neutral",
|
|
950
|
+
"non binary": "neutral",
|
|
951
|
+
nonbinary: "neutral",
|
|
952
|
+
"non binaire": "neutral",
|
|
953
|
+
androgynous: "neutral",
|
|
954
|
+
androgyne: "neutral",
|
|
955
|
+
unisex: "neutral",
|
|
956
|
+
other: "neutral"
|
|
957
|
+
};
|
|
958
|
+
var ages = {
|
|
959
|
+
young: "young",
|
|
960
|
+
jeune: "young",
|
|
961
|
+
child: "young",
|
|
962
|
+
enfant: "young",
|
|
963
|
+
kid: "young",
|
|
964
|
+
teen: "young",
|
|
965
|
+
teenager: "young",
|
|
966
|
+
adolescent: "young",
|
|
967
|
+
youth: "young",
|
|
968
|
+
"young adult": "young",
|
|
969
|
+
"jeune adulte": "young",
|
|
970
|
+
middle: "middle",
|
|
971
|
+
"middle age": "middle",
|
|
972
|
+
"middle aged": "middle",
|
|
973
|
+
"age moyen": "middle",
|
|
974
|
+
adult: "middle",
|
|
975
|
+
adulte: "middle",
|
|
976
|
+
mature: "middle",
|
|
977
|
+
"age mur": "middle",
|
|
978
|
+
old: "old",
|
|
979
|
+
older: "old",
|
|
980
|
+
age: "old",
|
|
981
|
+
agee: "old",
|
|
982
|
+
senior: "old",
|
|
983
|
+
elder: "old",
|
|
984
|
+
elderly: "old",
|
|
985
|
+
vieux: "old",
|
|
986
|
+
vieille: "old"
|
|
987
|
+
};
|
|
988
|
+
var listedWord = (value) => line(typeof value === "string" ? value : "", 40).toLowerCase();
|
|
989
|
+
function speechVoiceTraits(voice) {
|
|
990
|
+
const gender = genders[traitWord(voice.gender)];
|
|
991
|
+
const age = ages[traitWord(voice.age)];
|
|
992
|
+
const accent = listedWord(voice.accent);
|
|
993
|
+
const listedGender = gender ? "" : listedWord(voice.gender);
|
|
994
|
+
const listedAge = age ? "" : listedWord(voice.age);
|
|
995
|
+
const listed = { ...listedGender ? { gender: listedGender } : {}, ...listedAge ? { age: listedAge } : {} };
|
|
996
|
+
return {
|
|
997
|
+
...gender ? { gender } : {},
|
|
998
|
+
...age ? { age } : {},
|
|
999
|
+
...accent ? { accent } : {},
|
|
1000
|
+
...Object.keys(listed).length ? { listed } : {}
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
var languageTag = /^([a-z]{2,3})(?:[-_][a-z0-9]+)*$/u;
|
|
1004
|
+
function speechVoiceLanguages(listed) {
|
|
1005
|
+
const items = Array.isArray(listed) ? listed : [];
|
|
1006
|
+
const codes = [];
|
|
1007
|
+
for (const item of items) {
|
|
1008
|
+
const code = typeof item === "string" ? languageTag.exec(item.trim().toLowerCase())?.[1] : void 0;
|
|
1009
|
+
if (code && !codes.includes(code)) codes.push(code);
|
|
1010
|
+
if (codes.length >= 12) break;
|
|
1011
|
+
}
|
|
1012
|
+
return codes;
|
|
1013
|
+
}
|
|
1014
|
+
function speechVoiceDialects(listed) {
|
|
1015
|
+
const items = Array.isArray(listed) ? listed : [];
|
|
1016
|
+
const dialects = [];
|
|
1017
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1018
|
+
for (const item of items) {
|
|
1019
|
+
if (dialects.length >= 24) break;
|
|
1020
|
+
if (item === null || typeof item !== "object") continue;
|
|
1021
|
+
const value = item;
|
|
1022
|
+
const language = typeof value.language === "string" ? languageTag.exec(value.language.trim().toLowerCase())?.[1] : void 0;
|
|
1023
|
+
if (!language) continue;
|
|
1024
|
+
const accent = listedWord(value.accent);
|
|
1025
|
+
const key = `${language}\0${accent}`;
|
|
1026
|
+
if (seen.has(key)) continue;
|
|
1027
|
+
seen.add(key);
|
|
1028
|
+
const locale = typeof value.locale === "string" ? line(value.locale, 20) : "";
|
|
1029
|
+
const models2 = verifiedModels(value.models);
|
|
1030
|
+
dialects.push({
|
|
1031
|
+
language,
|
|
1032
|
+
...locale ? { locale } : {},
|
|
1033
|
+
...accent ? { accent } : {},
|
|
1034
|
+
...models2.length ? { models: models2 } : {},
|
|
1035
|
+
...typeof value.preview === "boolean" ? { preview: value.preview } : {}
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
return dialects;
|
|
1039
|
+
}
|
|
1040
|
+
var listedText = (value, max) => typeof value === "string" ? line(value, max) : "";
|
|
1041
|
+
function speechVoiceEntry(voice, model) {
|
|
1042
|
+
if (!isSpeechVoiceId(voice.id)) return null;
|
|
1043
|
+
const name = line(typeof voice.name === "string" ? voice.name : "", 80) || voice.id;
|
|
1044
|
+
const description = line(typeof voice.description === "string" ? voice.description : "", 300);
|
|
1045
|
+
const multiplier = voice.price_multiplier;
|
|
1046
|
+
const models2 = verifiedModels(voice.models);
|
|
1047
|
+
const dialects = speechVoiceDialects(voice.dialects);
|
|
1048
|
+
const useCase = listedText(voice.use_case, 50), descriptive = listedText(voice.descriptive, 50);
|
|
1049
|
+
const category = listedText(voice.category, 50), locale = listedText(voice.locale, 20);
|
|
1050
|
+
const popularity = voice.popularity;
|
|
1051
|
+
const count = (value) => typeof value === "number" && Number.isInteger(value) && value >= 0;
|
|
1052
|
+
return {
|
|
1053
|
+
ref: { id: voice.id, model },
|
|
1054
|
+
name,
|
|
1055
|
+
spokenName: spokenVoiceName(name),
|
|
1056
|
+
collection: voice.collection === "library" ? "library" : "standard",
|
|
1057
|
+
...isSpeechVoiceAlias(voice.alias) ? { alias: voice.alias } : {},
|
|
1058
|
+
languages: speechVoiceLanguages(voice.languages),
|
|
1059
|
+
traits: speechVoiceTraits(voice),
|
|
1060
|
+
...description ? { description } : {},
|
|
1061
|
+
...models2.length ? { models: models2 } : {},
|
|
1062
|
+
preview: voice.preview === true,
|
|
1063
|
+
premium: typeof multiplier === "number" && Number.isFinite(multiplier) && multiplier > 1 ? multiplier : null,
|
|
1064
|
+
...useCase ? { useCase } : {},
|
|
1065
|
+
...descriptive ? { descriptive } : {},
|
|
1066
|
+
...category ? { category } : {},
|
|
1067
|
+
...typeof voice.featured === "boolean" ? { featured: voice.featured } : {},
|
|
1068
|
+
...count(popularity) ? { popularity } : {},
|
|
1069
|
+
...count(voice.usage_characters_7d) ? { usage7d: voice.usage_characters_7d } : {},
|
|
1070
|
+
...count(voice.usage_characters_1y) ? { usage1y: voice.usage_characters_1y } : {},
|
|
1071
|
+
...locale ? { locale } : {},
|
|
1072
|
+
...dialects.length ? { dialects } : {}
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
function voiceFavoriteEntry(favorite) {
|
|
1076
|
+
const collection = favorite.collection ?? (favorite.voice.startsWith("library:") ? "library" : "standard");
|
|
1077
|
+
return speechVoiceEntry({
|
|
1078
|
+
id: favorite.voice,
|
|
1079
|
+
name: favorite.name,
|
|
1080
|
+
languages: favorite.languages ?? [],
|
|
1081
|
+
collection,
|
|
1082
|
+
gender: favorite.gender,
|
|
1083
|
+
age: favorite.age,
|
|
1084
|
+
accent: favorite.accent,
|
|
1085
|
+
locale: favorite.locale,
|
|
1086
|
+
...isSpeechVoiceAlias(favorite.voice) ? { alias: favorite.voice } : {},
|
|
1087
|
+
...favorite.preview !== void 0 ? { preview: favorite.preview } : {},
|
|
1088
|
+
...favorite.price_multiplier !== void 0 ? { price_multiplier: favorite.price_multiplier } : {}
|
|
1089
|
+
}, typeof favorite.model === "string" && isSpeechModelId(favorite.model) ? favorite.model : "");
|
|
1090
|
+
}
|
|
1091
|
+
function aliasVoiceEntries(model) {
|
|
1092
|
+
return speechVoiceAliases.map((alias) => ({
|
|
1093
|
+
ref: { id: alias, model },
|
|
1094
|
+
name: alias.charAt(0).toUpperCase() + alias.slice(1),
|
|
1095
|
+
spokenName: alias.charAt(0).toUpperCase() + alias.slice(1),
|
|
1096
|
+
collection: "standard",
|
|
1097
|
+
alias,
|
|
1098
|
+
languages: [],
|
|
1099
|
+
traits: {},
|
|
1100
|
+
// A historical name has no listed voice behind it, so no published sample: auditioning it costs a synthesis.
|
|
1101
|
+
preview: false,
|
|
1102
|
+
premium: null
|
|
1103
|
+
}));
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
// src/voice-listing.ts
|
|
1107
|
+
var baseLanguage = (language) => (language ?? "").trim().toLowerCase().split(/[-_]/u)[0];
|
|
1108
|
+
function rankVoiceEntries(entries, language, defaultVoice, sort) {
|
|
1109
|
+
if (sort) return entries;
|
|
1110
|
+
const isDefault = (entry) => typeof defaultVoice === "string" ? entry.ref.id === defaultVoice : entry.ref.id === defaultVoice.id && entry.ref.model === defaultVoice.model;
|
|
1111
|
+
const score = (entry) => (language && entry.languages.includes(language) ? 4 : 0) + (isDefault(entry) ? 2 : 0) + (entry.collection === "standard" ? 1 : 0);
|
|
1112
|
+
return entries.map((entry, index) => ({ entry, index, score: score(entry) })).sort((a, b) => b.score - a.score || a.index - b.index).map((item) => item.entry);
|
|
1113
|
+
}
|
|
1114
|
+
function chooseSpeechModel(models2, defaultModel, wanted) {
|
|
1115
|
+
if (wanted && (!models2.length || models2.some((model) => model.model === wanted))) return wanted;
|
|
1116
|
+
if (!models2.length || models2.some((model) => model.model === defaultModel)) return defaultModel;
|
|
1117
|
+
return models2[0].model;
|
|
1118
|
+
}
|
|
1119
|
+
var facetFields = [
|
|
1120
|
+
["language", "language"],
|
|
1121
|
+
["locale", "locale"],
|
|
1122
|
+
["query", "query"],
|
|
1123
|
+
["gender", "gender"],
|
|
1124
|
+
["age", "age"],
|
|
1125
|
+
["accent", "accent"],
|
|
1126
|
+
["category", "category"],
|
|
1127
|
+
["useCases", "use_cases"],
|
|
1128
|
+
["descriptives", "descriptives"],
|
|
1129
|
+
["featured", "featured"],
|
|
1130
|
+
["maxPriceMultiplier", "max_price_multiplier"],
|
|
1131
|
+
["verifiedFor", "verified_for"]
|
|
1132
|
+
];
|
|
1133
|
+
function voiceFacetsInUse(input2) {
|
|
1134
|
+
const used = input2.collection === "library" ? ["collection"] : [];
|
|
1135
|
+
for (const [field, facet2] of facetFields) {
|
|
1136
|
+
const value = input2[field];
|
|
1137
|
+
if (Array.isArray(value) ? value.length : typeof value === "string" ? value.trim() : value !== void 0) used.push(facet2);
|
|
1138
|
+
}
|
|
1139
|
+
return used;
|
|
1140
|
+
}
|
|
1141
|
+
function modelAnswersFacets(model, used) {
|
|
1142
|
+
const declared = model?.capabilities?.voice_facets;
|
|
1143
|
+
if (!Array.isArray(declared)) return true;
|
|
1144
|
+
const multilingual = model?.capabilities?.multilingual === true;
|
|
1145
|
+
return used.every((facet2) => declared.includes(facet2) || multilingual && (facet2 === "language" || facet2 === "locale"));
|
|
1146
|
+
}
|
|
1147
|
+
function voicesInputFor(model, input2) {
|
|
1148
|
+
const capabilities = model?.capabilities;
|
|
1149
|
+
if (!capabilities) return input2;
|
|
1150
|
+
const { collection, language, locale, ...rest } = input2;
|
|
1151
|
+
const multilingual = capabilities.multilingual === true;
|
|
1152
|
+
return {
|
|
1153
|
+
...rest,
|
|
1154
|
+
...collection !== void 0 && capabilities.voice_catalogue !== "fixed" ? { collection } : {},
|
|
1155
|
+
...language !== void 0 && !multilingual ? { language } : {},
|
|
1156
|
+
...locale !== void 0 && !multilingual ? { locale } : {}
|
|
1157
|
+
};
|
|
1158
|
+
}
|
|
1159
|
+
var modelAnswersInput = (model, input2) => !(input2.collection === "library" && model?.capabilities?.voice_catalogue === "fixed") && modelAnswersFacets(model, voiceFacetsInUse(voicesInputFor(model, input2)));
|
|
1160
|
+
var isModelUnavailable = (model) => model?.availability === "unavailable";
|
|
1161
|
+
function aliasListingEntries(model, collection, query) {
|
|
1162
|
+
const wanted = (query ?? "").toLowerCase();
|
|
1163
|
+
const all = collection === "library" ? [] : aliasVoiceEntries(model);
|
|
1164
|
+
return wanted ? all.filter((entry) => entry.name.toLowerCase().includes(wanted)) : all;
|
|
1165
|
+
}
|
|
1166
|
+
var verifiedPageLimit = 8;
|
|
1167
|
+
async function readVoicePages(voices2, input2, walk) {
|
|
1168
|
+
const seen = new Set(walk.known);
|
|
1169
|
+
const entries = [];
|
|
1170
|
+
let model = walk.model;
|
|
1171
|
+
let defaultVoice = "";
|
|
1172
|
+
let cursor = walk.cursor;
|
|
1173
|
+
for (let pages = 1; ; pages += 1) {
|
|
1174
|
+
let page;
|
|
1175
|
+
try {
|
|
1176
|
+
page = await voices2({ ...input2, ...cursor ? { cursor } : {}, limit: walk.limit(entries.length) }, walk.options);
|
|
1177
|
+
} catch (error) {
|
|
1178
|
+
if (walk.legacyFallback && pages === 1 && isLegacySpeechHost(error)) return null;
|
|
1179
|
+
throw error;
|
|
1180
|
+
}
|
|
1181
|
+
model = page.model || model;
|
|
1182
|
+
defaultVoice ||= page.default_voice;
|
|
1183
|
+
const before = entries.length;
|
|
1184
|
+
for (const voice of page.voices) {
|
|
1185
|
+
const entry = speechVoiceEntry(voice, model);
|
|
1186
|
+
if (!entry || seen.has(entry.ref.id)) continue;
|
|
1187
|
+
seen.add(entry.ref.id);
|
|
1188
|
+
entries.push(entry);
|
|
1189
|
+
}
|
|
1190
|
+
cursor = page.next_cursor ?? void 0;
|
|
1191
|
+
if (!cursor || entries.length === before && !input2.verifiedFor) return { entries, model, defaultVoice, cursor: null };
|
|
1192
|
+
if (entries.length >= walk.until || input2.verifiedFor && pages >= verifiedPageLimit) {
|
|
1193
|
+
return { entries, model, defaultVoice, cursor };
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
// src/ai-voice-catalogue.ts
|
|
1199
|
+
var pageLimit = 50;
|
|
1200
|
+
var defaultVoiceCount = 60;
|
|
1201
|
+
var voiceCeiling = 300;
|
|
1202
|
+
var queryLimit = 200;
|
|
1203
|
+
var cursorLimit = 256;
|
|
1204
|
+
var bothCursor = /^(standard|library):(.*)$/su;
|
|
1205
|
+
var modelsLimit = 16;
|
|
1206
|
+
var familyLimit = 50;
|
|
1207
|
+
var memoMs = 5 * 6e4;
|
|
1208
|
+
var maxTimerMs = 2147483647;
|
|
1209
|
+
var filterKeys = [
|
|
1210
|
+
"locale",
|
|
1211
|
+
"gender",
|
|
1212
|
+
"age",
|
|
1213
|
+
"accent",
|
|
1214
|
+
"category",
|
|
1215
|
+
"useCases",
|
|
1216
|
+
"descriptives",
|
|
1217
|
+
"featured",
|
|
1218
|
+
"sort",
|
|
1219
|
+
"maxPriceMultiplier"
|
|
1220
|
+
];
|
|
1221
|
+
var invalid = (message) => new NochaError("invalid_request", message);
|
|
1222
|
+
function catalogueRequest(input2) {
|
|
1223
|
+
const value = input2 !== null && typeof input2 === "object" ? input2 : {};
|
|
1224
|
+
if (value.model !== void 0 && !isSpeechModelId(value.model)) throw invalid("model is not a valid identifier");
|
|
1225
|
+
const models2 = value.models;
|
|
1226
|
+
if (models2 !== void 0 && models2 !== "all" && !(Array.isArray(models2) && models2.length > 0 && models2.length <= modelsLimit && models2.every(isSpeechModelId))) {
|
|
1227
|
+
throw invalid(`models must be 'all' or 1 to ${modelsLimit} model identifiers`);
|
|
1228
|
+
}
|
|
1229
|
+
if (value.family !== void 0 && (typeof value.family !== "string" || !value.family.trim() || value.family.length > familyLimit)) {
|
|
1230
|
+
throw invalid(`family must be a non-empty string of at most ${familyLimit} characters`);
|
|
1231
|
+
}
|
|
1232
|
+
const several = models2 !== void 0 || value.family !== void 0;
|
|
1233
|
+
if (several && value.model !== void 0) throw invalid("model reads one model: models and family read several, without it");
|
|
1234
|
+
if (several && value.cursor !== void 0) throw invalid("cursor resumes a single-model catalogue: models and family return no nextCursor");
|
|
1235
|
+
if (value.language !== void 0 && typeof value.language !== "string") throw invalid("language must be a string");
|
|
1236
|
+
if (value.collection !== void 0 && !voiceCatalogueCollections.includes(value.collection)) {
|
|
1237
|
+
throw invalid("collection must be standard, library, both or all");
|
|
1238
|
+
}
|
|
1239
|
+
if (value.query !== void 0 && typeof value.query !== "string") throw invalid("query must be a string");
|
|
1240
|
+
if (value.verifiedFor !== void 0 && !isSpeechModelId(value.verifiedFor)) throw invalid("verifiedFor is not a valid identifier");
|
|
1241
|
+
if (value.maxVoices !== void 0 && typeof value.maxVoices !== "number") throw invalid("maxVoices must be a number");
|
|
1242
|
+
if (value.cursor !== void 0 && (typeof value.cursor !== "string" || !value.cursor || value.cursor.length > cursorLimit)) {
|
|
1243
|
+
throw invalid("cursor must be a nextCursor this catalogue returned");
|
|
1244
|
+
}
|
|
1245
|
+
if (value.rankLanguage !== void 0 && typeof value.rankLanguage !== "string") throw invalid("rankLanguage must be a string");
|
|
1246
|
+
const filters = {};
|
|
1247
|
+
for (const key of filterKeys) {
|
|
1248
|
+
const filter = value[key];
|
|
1249
|
+
if (filter !== void 0) filters[key] = Array.isArray(filter) ? [...filter] : filter;
|
|
1250
|
+
}
|
|
1251
|
+
const query = [...(value.query ?? "").replace(/[\u0000-\u001f\u007f]+/gu, " ").replace(/\s+/gu, " ").trim()].slice(0, queryLimit).join("").trim();
|
|
1252
|
+
const wanted = value.maxVoices;
|
|
1253
|
+
const collection = value.collection === "all" ? "both" : value.collection;
|
|
1254
|
+
if (value.cursor && collection === "both" && !bothCursor.test(value.cursor)) throw invalid("cursor does not belong to a both catalogue");
|
|
1255
|
+
return {
|
|
1256
|
+
...value.model !== void 0 ? { model: value.model } : {},
|
|
1257
|
+
...value.models === "all" ? { models: "all" } : value.models ? { models: [...new Set(value.models)] } : {},
|
|
1258
|
+
...value.family !== void 0 ? { family: value.family.trim().toLowerCase() } : {},
|
|
1259
|
+
...value.language ? { language: value.language } : {},
|
|
1260
|
+
...collection !== void 0 ? { collection } : {},
|
|
1261
|
+
...query ? { query } : {},
|
|
1262
|
+
...value.verifiedFor !== void 0 ? { verifiedFor: value.verifiedFor } : {},
|
|
1263
|
+
maxVoices: typeof wanted === "number" && Number.isFinite(wanted) ? Math.min(voiceCeiling, Math.max(1, Math.floor(wanted))) : defaultVoiceCount,
|
|
1264
|
+
...value.cursor ? { cursor: value.cursor } : {},
|
|
1265
|
+
...value.rankLanguage !== void 0 ? { rankLanguage: value.rankLanguage } : {},
|
|
1266
|
+
filters
|
|
1267
|
+
};
|
|
1268
|
+
}
|
|
1269
|
+
var cacheKey = (request2) => JSON.stringify([
|
|
1270
|
+
request2.model ?? "",
|
|
1271
|
+
request2.language ?? "",
|
|
1272
|
+
request2.collection ?? "",
|
|
1273
|
+
request2.query ?? "",
|
|
1274
|
+
request2.verifiedFor ?? "",
|
|
1275
|
+
request2.maxVoices,
|
|
1276
|
+
request2.cursor ?? "",
|
|
1277
|
+
request2.rankLanguage ?? null,
|
|
1278
|
+
filterKeys.map((key) => request2.filters[key] ?? null),
|
|
1279
|
+
request2.models ?? null,
|
|
1280
|
+
request2.family ?? ""
|
|
1281
|
+
]);
|
|
1282
|
+
function catalogueCursor(collection, phase, cursor) {
|
|
1283
|
+
return collection === "both" ? `${phase}:${cursor}` : cursor;
|
|
1284
|
+
}
|
|
1285
|
+
function resumeAt(request2) {
|
|
1286
|
+
const given = request2.cursor;
|
|
1287
|
+
if (request2.collection !== "both") return { phase: request2.collection === "library" ? "library" : "standard", ...given ? { cursor: given } : {} };
|
|
1288
|
+
if (!given) return { phase: "standard" };
|
|
1289
|
+
const match = bothCursor.exec(given);
|
|
1290
|
+
return { phase: match?.[1] === "library" ? "library" : "standard", ...match?.[2] ? { cursor: match[2] } : {} };
|
|
1291
|
+
}
|
|
1292
|
+
function aliasCatalogue(model, listed, request2) {
|
|
1293
|
+
const kept = request2.cursor ? [] : aliasListingEntries(model, request2.collection, request2.query);
|
|
1294
|
+
const entries = kept.slice(0, request2.maxVoices);
|
|
1295
|
+
return {
|
|
1296
|
+
model,
|
|
1297
|
+
// No `default_voice` to read on such a host: the first historical name stands in, accepted by every model.
|
|
1298
|
+
defaultVoice: { id: entries[0]?.ref.id ?? speechVoiceAliases[0], model },
|
|
1299
|
+
models: listed?.models ?? [],
|
|
1300
|
+
entries,
|
|
1301
|
+
complete: entries.length === kept.length,
|
|
1302
|
+
source: "aliases",
|
|
1303
|
+
fallbackReason: "client_update_required"
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1306
|
+
var pagesInput = (request2, collection, model, spec) => voicesInputFor(spec, {
|
|
1307
|
+
...model ? { model } : {},
|
|
1308
|
+
...request2.language ? { language: request2.language } : {},
|
|
1309
|
+
...collection ? { collection } : {},
|
|
1310
|
+
...request2.query ? { query: request2.query } : {},
|
|
1311
|
+
...request2.verifiedFor ? { verifiedFor: request2.verifiedFor } : {},
|
|
1312
|
+
...request2.filters
|
|
1313
|
+
});
|
|
1314
|
+
async function readModelVoices(readers, request2, model, budget2, spec, options) {
|
|
1315
|
+
const start = resumeAt(request2);
|
|
1316
|
+
const walk = (chosen2, cursor, gathered, known) => ({
|
|
1317
|
+
model: chosen2,
|
|
1318
|
+
...cursor ? { cursor } : {},
|
|
1319
|
+
...known ? { known } : {},
|
|
1320
|
+
until: budget2 - gathered,
|
|
1321
|
+
options,
|
|
1322
|
+
limit: (count) => Math.min(pageLimit, Math.max(1, budget2 - gathered - count))
|
|
1323
|
+
});
|
|
1324
|
+
const voices2 = (page, pageOptions) => readers.voices(page, pageOptions);
|
|
1325
|
+
const firstCollection = request2.collection === "both" ? start.phase : request2.collection;
|
|
1326
|
+
const first = await readVoicePages(voices2, pagesInput(request2, firstCollection, model, spec), { ...walk(model, start.cursor, 0), legacyFallback: true });
|
|
1327
|
+
if (!first) return null;
|
|
1328
|
+
const chosen = first.model || model;
|
|
1329
|
+
const entries = [...first.entries];
|
|
1330
|
+
let defaultVoice = first.defaultVoice;
|
|
1331
|
+
let nextCursor = first.cursor === null ? null : catalogueCursor(request2.collection, start.phase, first.cursor);
|
|
1332
|
+
const fixed = spec?.capabilities?.voice_catalogue === "fixed";
|
|
1333
|
+
if (request2.collection === "both" && start.phase === "standard" && first.cursor === null && !fixed) {
|
|
1334
|
+
if (entries.length < budget2) {
|
|
1335
|
+
const known = entries.map((entry) => entry.ref.id);
|
|
1336
|
+
const library2 = await readVoicePages(voices2, pagesInput(request2, "library", chosen, spec), walk(chosen, void 0, entries.length, known));
|
|
1337
|
+
entries.push(...library2.entries);
|
|
1338
|
+
defaultVoice ||= library2.defaultVoice;
|
|
1339
|
+
nextCursor = library2.cursor === null ? null : catalogueCursor(request2.collection, "library", library2.cursor);
|
|
1340
|
+
} else nextCursor = "library:";
|
|
1341
|
+
}
|
|
1342
|
+
return { model: chosen, defaultVoice, entries, nextCursor };
|
|
1343
|
+
}
|
|
1344
|
+
var rankLanguageOf = (request2) => baseLanguage(request2.rankLanguage ?? request2.language);
|
|
1345
|
+
function chosenModels(listed, request2) {
|
|
1346
|
+
const all = listed?.models ?? [];
|
|
1347
|
+
const fallback = chooseSpeechModel(all, listed?.default_model ?? "", void 0);
|
|
1348
|
+
const named = request2.models === void 0 || request2.models === "all" ? null : request2.models;
|
|
1349
|
+
const offered = !all.length ? named ?? [fallback] : named ? named.filter((id) => all.some((model) => model.model === id)) : all.map((model) => model.model);
|
|
1350
|
+
const ids = [...new Set(offered.length ? offered : [fallback])].sort((a, b) => Number(b === fallback) - Number(a === fallback));
|
|
1351
|
+
const input2 = pagesInput(request2, request2.collection === "library" ? "library" : void 0, "");
|
|
1352
|
+
const modelOf = (id) => all.find((model) => model.model === id);
|
|
1353
|
+
return ids.filter((id) => (!request2.family || modelOf(id)?.capabilities?.family?.toLowerCase() === request2.family) && !isModelUnavailable(modelOf(id)) && modelAnswersInput(modelOf(id), input2));
|
|
1354
|
+
}
|
|
1355
|
+
async function readSeveral(readers, request2, listed, options) {
|
|
1356
|
+
const ids = chosenModels(listed, request2);
|
|
1357
|
+
const share = Math.ceil(request2.maxVoices / Math.max(1, ids.length));
|
|
1358
|
+
const specOf = (id) => listed?.models.find((model2) => model2.model === id);
|
|
1359
|
+
const settled = await Promise.allSettled(ids.map((id) => readModelVoices(readers, request2, id, share, specOf(id), options)));
|
|
1360
|
+
const failedModels = ids.filter((_id, index) => settled[index].status === "rejected");
|
|
1361
|
+
const firstFailure = settled.find((read2) => read2.status === "rejected");
|
|
1362
|
+
if (firstFailure && failedModels.length === ids.length) throw firstFailure.reason;
|
|
1363
|
+
const reads2 = settled.flatMap((read2) => read2.status === "fulfilled" ? [read2.value] : []);
|
|
1364
|
+
const fallback = ids[0] ?? chooseSpeechModel(listed?.models ?? [], listed?.default_model ?? "", void 0);
|
|
1365
|
+
const done = reads2.filter((read2) => read2 !== null);
|
|
1366
|
+
if (done.length < reads2.length) return { ...aliasCatalogue(fallback, listed, request2), ...failedModels.length ? { failedModels } : {} };
|
|
1367
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1368
|
+
const merged = [];
|
|
1369
|
+
for (const entry of done.flatMap((read2) => read2.entries)) {
|
|
1370
|
+
const key = `${specOf(entry.ref.model)?.capabilities?.voice_group ?? entry.ref.model}\0${entry.ref.id}`;
|
|
1371
|
+
if (seen.has(key)) continue;
|
|
1372
|
+
seen.add(key);
|
|
1373
|
+
merged.push(entry);
|
|
1374
|
+
}
|
|
1375
|
+
const model = done[0]?.model ?? fallback;
|
|
1376
|
+
const defaultVoice = { id: done[0]?.defaultVoice || speechVoiceAliases[0], model };
|
|
1377
|
+
const ranked = rankVoiceEntries(merged, rankLanguageOf(request2), defaultVoice, request2.filters.sort);
|
|
1378
|
+
const entries = ranked.slice(0, request2.maxVoices);
|
|
1379
|
+
return {
|
|
1380
|
+
model,
|
|
1381
|
+
defaultVoice,
|
|
1382
|
+
models: listed?.models ?? [],
|
|
1383
|
+
entries,
|
|
1384
|
+
complete: !failedModels.length && entries.length === ranked.length && done.every((read2) => read2.nextCursor === null),
|
|
1385
|
+
source: "listed",
|
|
1386
|
+
...failedModels.length ? { failedModels } : {}
|
|
1387
|
+
};
|
|
1388
|
+
}
|
|
1389
|
+
async function readCatalogue(readers, request2, options) {
|
|
1390
|
+
let listed = null;
|
|
1391
|
+
try {
|
|
1392
|
+
listed = await readers.models({ need: "audio.synthesize" }, options);
|
|
1393
|
+
} catch (error) {
|
|
1394
|
+
if (!isLegacySpeechHost(error)) throw error;
|
|
1395
|
+
}
|
|
1396
|
+
if (request2.models !== void 0 || request2.family !== void 0) return readSeveral(readers, request2, listed, options);
|
|
1397
|
+
const model = chooseSpeechModel(listed?.models ?? [], listed?.default_model ?? "", request2.model);
|
|
1398
|
+
const spec = listed?.models.find((item) => item.model === model);
|
|
1399
|
+
const read2 = await readModelVoices(readers, request2, model, request2.maxVoices, spec, options);
|
|
1400
|
+
if (!read2) return aliasCatalogue(model, listed, request2);
|
|
1401
|
+
return {
|
|
1402
|
+
model: read2.model,
|
|
1403
|
+
defaultVoice: { id: read2.defaultVoice, model: read2.model },
|
|
1404
|
+
models: listed?.models ?? [],
|
|
1405
|
+
entries: rankVoiceEntries(read2.entries, rankLanguageOf(request2), read2.defaultVoice, request2.filters.sort),
|
|
1406
|
+
complete: read2.nextCursor === null,
|
|
1407
|
+
...read2.nextCursor !== null ? { nextCursor: read2.nextCursor } : {},
|
|
1408
|
+
source: "listed"
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
function waitOptions(options) {
|
|
1412
|
+
const { signal, timeoutMs } = options ?? {};
|
|
1413
|
+
if (timeoutMs !== void 0 && (typeof timeoutMs !== "number" || !Number.isFinite(timeoutMs) || timeoutMs <= 0 || timeoutMs > maxTimerMs)) {
|
|
1414
|
+
throw invalid("timeoutMs must be a positive finite timer duration");
|
|
1415
|
+
}
|
|
1416
|
+
if (signal !== void 0 && !(signal instanceof AbortSignal)) throw invalid("signal must be an AbortSignal");
|
|
1417
|
+
return { ...signal ? { signal } : {}, ...timeoutMs !== void 0 ? { timeoutMs } : {} };
|
|
1418
|
+
}
|
|
1419
|
+
function raceAbort(shared, { signal, timeoutMs }, leave) {
|
|
1420
|
+
if (signal?.aborted) {
|
|
1421
|
+
leave(true);
|
|
1422
|
+
return Promise.reject(new NochaError("aborted", "Local voice catalogue wait was aborted"));
|
|
1423
|
+
}
|
|
1424
|
+
return new Promise((resolve, reject2) => {
|
|
1425
|
+
let done = false;
|
|
1426
|
+
let timer;
|
|
1427
|
+
const finish = (gaveUp, settle) => {
|
|
1428
|
+
if (done) return;
|
|
1429
|
+
done = true;
|
|
1430
|
+
signal?.removeEventListener("abort", onAbort);
|
|
1431
|
+
clearTimeout(timer);
|
|
1432
|
+
leave(gaveUp);
|
|
1433
|
+
settle();
|
|
1434
|
+
};
|
|
1435
|
+
const onAbort = () => finish(true, () => reject2(new NochaError("aborted", "Local voice catalogue wait was aborted")));
|
|
1436
|
+
if (timeoutMs !== void 0) {
|
|
1437
|
+
timer = setTimeout(() => finish(true, () => reject2(new NochaError("invocation_timed_out", "Local voice catalogue wait timed out"))), timeoutMs);
|
|
1438
|
+
}
|
|
1439
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
1440
|
+
shared.then((value) => finish(false, () => resolve(value)), (error) => finish(false, () => reject2(error)));
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1443
|
+
function createVoiceCatalogue(readers) {
|
|
1444
|
+
const memos = /* @__PURE__ */ new Map();
|
|
1445
|
+
const forget = (key, memo) => {
|
|
1446
|
+
if (memos.get(key) === memo) memos.delete(key);
|
|
1447
|
+
};
|
|
1448
|
+
return async (input2, options) => {
|
|
1449
|
+
const request2 = catalogueRequest(input2);
|
|
1450
|
+
const wait = waitOptions(options);
|
|
1451
|
+
const key = cacheKey(request2);
|
|
1452
|
+
let memo = memos.get(key);
|
|
1453
|
+
if (memo?.settledAt != null && (input2?.refresh === true || Date.now() - memo.settledAt >= memoMs)) {
|
|
1454
|
+
forget(key, memo);
|
|
1455
|
+
memo = void 0;
|
|
1456
|
+
}
|
|
1457
|
+
if (!memo) {
|
|
1458
|
+
const stop = new AbortController();
|
|
1459
|
+
const created = { reading: readCatalogue(readers, request2, { signal: stop.signal }), settledAt: null, waiters: 0, stop };
|
|
1460
|
+
created.reading.then(() => {
|
|
1461
|
+
created.settledAt = Date.now();
|
|
1462
|
+
}, () => forget(key, created));
|
|
1463
|
+
memos.set(key, created);
|
|
1464
|
+
memo = created;
|
|
1465
|
+
}
|
|
1466
|
+
const joined = memo;
|
|
1467
|
+
joined.waiters += 1;
|
|
1468
|
+
return raceAbort(joined.reading, wait, (gaveUp) => {
|
|
1469
|
+
joined.waiters -= 1;
|
|
1470
|
+
if (gaveUp && !joined.waiters && joined.settledAt === null) {
|
|
1471
|
+
forget(key, joined);
|
|
1472
|
+
joined.stop.abort();
|
|
1473
|
+
}
|
|
1474
|
+
});
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
// src/storage-operations.ts
|
|
1479
|
+
var common = { spend: "none", deadlineMs: null, sdkMarginMs: null, sdkTimeoutMs: operationWaiting.default, rateBucket: "public-playback" };
|
|
1480
|
+
var read = { ...common, access: "read", observer: "declared-public-read", publicRead: "eligible", idempotency: "read" };
|
|
1481
|
+
var write = { ...common, access: "contribute", observer: "denied", publicRead: "denied" };
|
|
1482
|
+
var storageOperations = {
|
|
1483
|
+
state: {
|
|
1484
|
+
get: {
|
|
1485
|
+
...read,
|
|
1486
|
+
capability: "state",
|
|
1487
|
+
operation: "get",
|
|
1488
|
+
input: "StateGetInput",
|
|
1489
|
+
output: "StateSnapshot",
|
|
1490
|
+
resource: null,
|
|
1491
|
+
facades: [{ path: "state.get", kind: "direct" }, { path: "state.watch", kind: "composite", live: "state" }]
|
|
1492
|
+
},
|
|
1493
|
+
set: {
|
|
1494
|
+
...write,
|
|
1495
|
+
capability: "state",
|
|
1496
|
+
operation: "set",
|
|
1497
|
+
input: "StateSetInput",
|
|
1498
|
+
output: "StateSnapshot",
|
|
1499
|
+
resource: null,
|
|
1500
|
+
idempotency: "durable-receipt",
|
|
1501
|
+
facades: [{ path: "state.set", kind: "direct" }]
|
|
1502
|
+
}
|
|
1503
|
+
},
|
|
1504
|
+
memory: {
|
|
1505
|
+
get: {
|
|
1506
|
+
...read,
|
|
1507
|
+
capability: "memory",
|
|
1508
|
+
operation: "get",
|
|
1509
|
+
input: "MemoryGetInput",
|
|
1510
|
+
output: "MemoryValue",
|
|
1511
|
+
resource: "key",
|
|
1512
|
+
facades: [{ path: "memory.get", kind: "direct" }]
|
|
1513
|
+
},
|
|
1514
|
+
set: {
|
|
1515
|
+
...write,
|
|
1516
|
+
capability: "memory",
|
|
1517
|
+
operation: "set",
|
|
1518
|
+
input: "MemorySetInput",
|
|
1519
|
+
output: "MemoryValue",
|
|
1520
|
+
resource: "key",
|
|
1521
|
+
idempotency: "compare-and-set",
|
|
1522
|
+
facades: [{ path: "memory.set", kind: "direct" }]
|
|
1523
|
+
},
|
|
1524
|
+
remove: {
|
|
1525
|
+
...write,
|
|
1526
|
+
capability: "memory",
|
|
1527
|
+
operation: "remove",
|
|
1528
|
+
input: "MemoryRemoveInput",
|
|
1529
|
+
output: "MemoryRemoveOutput",
|
|
1530
|
+
resource: "key",
|
|
1531
|
+
idempotency: "compare-and-set",
|
|
1532
|
+
facades: [{ path: "memory.remove", kind: "direct" }]
|
|
1533
|
+
},
|
|
1534
|
+
// The keys of the usage, never one key: `prefix` narrows them and the server keeps them within the declaration.
|
|
1535
|
+
list: {
|
|
1536
|
+
...read,
|
|
1537
|
+
capability: "memory",
|
|
1538
|
+
operation: "list",
|
|
1539
|
+
input: "MemoryListInput",
|
|
1540
|
+
output: "MemoryListOutput",
|
|
1541
|
+
resource: "key",
|
|
1542
|
+
facades: [{ path: "memory.list", kind: "direct" }]
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1545
|
+
database: {
|
|
1546
|
+
insert: {
|
|
1547
|
+
...write,
|
|
1548
|
+
capability: "database",
|
|
1549
|
+
operation: "insert",
|
|
1550
|
+
input: "DatabaseInsertInput",
|
|
1551
|
+
output: "DatabaseInsertOutput",
|
|
1552
|
+
resource: "collection",
|
|
1553
|
+
idempotency: "durable-receipt",
|
|
1554
|
+
facades: [{ path: "database.insert", kind: "direct" }]
|
|
1555
|
+
},
|
|
1556
|
+
get: {
|
|
1557
|
+
...read,
|
|
1558
|
+
capability: "database",
|
|
1559
|
+
operation: "get",
|
|
1560
|
+
input: "DatabaseGetInput",
|
|
1561
|
+
output: "DatabaseGetOutput",
|
|
1562
|
+
resource: "collection",
|
|
1563
|
+
facades: [{ path: "database.get", kind: "direct" }]
|
|
1564
|
+
},
|
|
1565
|
+
// database.watch: the first page of query, which the host also subscribes to the collection's shared writes.
|
|
1566
|
+
query: {
|
|
1567
|
+
...read,
|
|
1568
|
+
capability: "database",
|
|
1569
|
+
operation: "query",
|
|
1570
|
+
input: "DatabaseQueryInput",
|
|
1571
|
+
output: "DatabaseQueryOutput",
|
|
1572
|
+
resource: "collection",
|
|
1573
|
+
facades: [{ path: "database.query", kind: "direct" }, { path: "database.watch", kind: "composite", live: "database" }]
|
|
1574
|
+
},
|
|
1575
|
+
update: {
|
|
1576
|
+
...write,
|
|
1577
|
+
capability: "database",
|
|
1578
|
+
operation: "update",
|
|
1579
|
+
input: "DatabaseUpdateInput",
|
|
1580
|
+
output: "DatabaseUpdateOutput",
|
|
1581
|
+
resource: "collection",
|
|
1582
|
+
idempotency: "compare-and-set",
|
|
1583
|
+
facades: [{ path: "database.update", kind: "direct" }]
|
|
1584
|
+
},
|
|
1585
|
+
remove: {
|
|
1586
|
+
...write,
|
|
1587
|
+
capability: "database",
|
|
1588
|
+
operation: "remove",
|
|
1589
|
+
input: "DatabaseRemoveInput",
|
|
1590
|
+
output: "DatabaseRemoveOutput",
|
|
1591
|
+
resource: "collection",
|
|
1592
|
+
idempotency: "compare-and-set",
|
|
1593
|
+
facades: [{ path: "database.remove", kind: "direct" }]
|
|
1594
|
+
},
|
|
1595
|
+
// Server-only final commit. There is no frontend facade or single top-level resource.
|
|
1596
|
+
transact: {
|
|
1597
|
+
...write,
|
|
1598
|
+
capability: "database",
|
|
1599
|
+
operation: "transact",
|
|
1600
|
+
input: "BackendTransactionInput",
|
|
1601
|
+
output: "BackendTransactionCommitResult",
|
|
1602
|
+
resource: null,
|
|
1603
|
+
idempotency: "durable-receipt",
|
|
1604
|
+
facades: []
|
|
1605
|
+
},
|
|
1606
|
+
// After transact, which keeps the public tuple's order. Only the record's author changes it, and only the
|
|
1607
|
+
// participant's own page makes a record shared.
|
|
1608
|
+
visibility: {
|
|
1609
|
+
...write,
|
|
1610
|
+
capability: "database",
|
|
1611
|
+
operation: "visibility",
|
|
1612
|
+
input: "DatabaseVisibilityInput",
|
|
1613
|
+
output: "DatabaseVisibilityOutput",
|
|
1614
|
+
resource: "collection",
|
|
1615
|
+
idempotency: "host-defined",
|
|
1616
|
+
facades: [
|
|
1617
|
+
{ path: "database.setVisibility", kind: "direct" },
|
|
1618
|
+
{ path: "database.share", kind: "composite" },
|
|
1619
|
+
{ path: "database.unshare", kind: "composite" }
|
|
1620
|
+
]
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
};
|
|
1624
|
+
var storageCapabilities = Object.keys(storageOperations);
|
|
1625
|
+
var storageOperationList = Object.values(storageOperations).flatMap((group) => Object.values(group));
|
|
1626
|
+
var storageReadOperations = storageOperationList.filter((item) => item.access === "read");
|
|
1627
|
+
var databaseOperations = [
|
|
1628
|
+
storageOperations.database.insert.operation,
|
|
1629
|
+
storageOperations.database.get.operation,
|
|
1630
|
+
storageOperations.database.query.operation,
|
|
1631
|
+
storageOperations.database.update.operation,
|
|
1632
|
+
storageOperations.database.remove.operation,
|
|
1633
|
+
storageOperations.database.transact.operation,
|
|
1634
|
+
storageOperations.database.visibility.operation
|
|
1635
|
+
];
|
|
1636
|
+
var stateOperations = Object.values(storageOperations.state).map((item) => item.operation);
|
|
1637
|
+
var memoryOperations = Object.values(storageOperations.memory).map((item) => item.operation);
|
|
1638
|
+
|
|
1639
|
+
// src/guards.ts
|
|
1640
|
+
var isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1641
|
+
var isString = (value) => typeof value === "string";
|
|
1642
|
+
var isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
|
|
1643
|
+
var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
|
|
1644
|
+
var isCount = (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
1645
|
+
var isNullable = (value, check) => value === null || check(value);
|
|
1646
|
+
var isUuid = (value) => typeof value === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
1647
|
+
var CODE_PATTERN = /^[a-z][a-z0-9_]{0,63}$/;
|
|
1648
|
+
var isArrayOf = (value, check) => Array.isArray(value) && value.every(check);
|
|
1649
|
+
var maxJsonDepth = 64;
|
|
1650
|
+
function isIdempotencyKey(value) {
|
|
1651
|
+
return typeof value === "string" && value.length >= 8 && value.length <= 200 && ![...value].some((character) => character.charCodeAt(0) < 32 || character.charCodeAt(0) === 127);
|
|
1652
|
+
}
|
|
1653
|
+
function isPlainObject(value) {
|
|
1654
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
1655
|
+
const prototype = Object.getPrototypeOf(value);
|
|
1656
|
+
return prototype === Object.prototype || prototype === null;
|
|
1657
|
+
}
|
|
1658
|
+
function jsonProblem(value, depth, ancestors, files = false) {
|
|
1659
|
+
if (value === void 0 || value === null || typeof value === "string" || typeof value === "boolean") return void 0;
|
|
1660
|
+
if (typeof value === "number") return Number.isFinite(value) ? void 0 : "numbers must be finite";
|
|
1661
|
+
if (typeof value !== "object") return `${typeof value} values are not JSON`;
|
|
1662
|
+
if (files && typeof File !== "undefined" && value instanceof File) return void 0;
|
|
1663
|
+
if (depth > maxJsonDepth) return "values are nested too deeply";
|
|
1664
|
+
if (ancestors.has(value)) return "values contain a cycle";
|
|
1665
|
+
const items = Array.isArray(value) ? value : isPlainObject(value) ? Object.values(value) : void 0;
|
|
1666
|
+
if (!items) return "only plain objects and arrays are JSON";
|
|
1667
|
+
ancestors.add(value);
|
|
1668
|
+
try {
|
|
1669
|
+
for (const item of items) {
|
|
1670
|
+
const problem = jsonProblem(item, depth + 1, ancestors, files);
|
|
1671
|
+
if (problem) return problem;
|
|
1672
|
+
}
|
|
1673
|
+
return void 0;
|
|
1674
|
+
} finally {
|
|
1675
|
+
ancestors.delete(value);
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
// src/shared-usage.ts
|
|
1680
|
+
var USAGE_ID_PATTERN = /^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$/;
|
|
1681
|
+
var isUsageId = (value) => typeof value === "string" && USAGE_ID_PATTERN.test(value);
|
|
1682
|
+
|
|
1683
|
+
// src/external-protocol.ts
|
|
1684
|
+
var NOCHA_EXTERNAL_DEFAULT_HOSTS = ["https://*.novelchallenge.com"];
|
|
1685
|
+
var CODE = /^[a-z0-9]{6,10}$/;
|
|
1686
|
+
var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
|
|
1687
|
+
var ORIGIN_HOST = new RegExp(`^${LABEL}(?:\\.${LABEL})*$`);
|
|
1688
|
+
var PATTERN_HOST = new RegExp(`^(?:${LABEL}\\.)+[a-z]{2,63}$`);
|
|
1689
|
+
function parseHostPattern(pattern) {
|
|
1690
|
+
const match = /^https:\/\/(\*\.)?([^/:]+)(?::(\d{1,5}))?$/.exec(pattern.toLowerCase());
|
|
1691
|
+
if (!match || !PATTERN_HOST.test(match[2])) return null;
|
|
1692
|
+
const port = match[3] === void 0 ? 443 : Number(match[3]);
|
|
1693
|
+
if (port < 1 || port > 65535) return null;
|
|
1694
|
+
return { wildcard: match[1] !== void 0, host: match[2], port: port === 443 ? "" : String(port) };
|
|
1695
|
+
}
|
|
1696
|
+
function normalizeExternalHostPattern(pattern) {
|
|
1697
|
+
const rule = typeof pattern === "string" ? parseHostPattern(pattern) : null;
|
|
1698
|
+
return rule ? `https://${rule.wildcard ? "*." : ""}${rule.host}${rule.port ? `:${rule.port}` : ""}` : null;
|
|
1699
|
+
}
|
|
1700
|
+
function externalFrameOrigins(codes, patterns) {
|
|
1701
|
+
const valid = codes.filter((code) => typeof code === "string" && CODE.test(code));
|
|
1702
|
+
return [...new Set(patterns.flatMap((pattern) => {
|
|
1703
|
+
const normalized = normalizeExternalHostPattern(pattern);
|
|
1704
|
+
return normalized?.startsWith("https://*.") ? valid.map((code) => normalized.replace("*", code)) : [];
|
|
1705
|
+
}))];
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
// src/automations-operations.ts
|
|
1709
|
+
var base = { ...operationDefaults, capability: "automations", sdkTimeoutMs: 12e4, rateBucket: "experience-automations" };
|
|
1710
|
+
var automationsOperationDefinitions = {
|
|
1711
|
+
catalog: { ...base, ...operationRead, operation: "catalog", input: "automations.catalog", output: "automations.catalog", facades: [{ path: "automations.catalog", kind: "direct" }] },
|
|
1712
|
+
list: { ...base, ...operationRead, operation: "list", input: "automations.list", output: "automations.list", facades: [{ path: "automations.list", kind: "direct" }] },
|
|
1713
|
+
get: { ...base, ...operationRead, operation: "get", input: "automations.get", output: "automations.get", facades: [{ path: "automations.get", kind: "direct" }] },
|
|
1714
|
+
create: { ...base, operation: "create", input: "automations.create", output: "automations.create", facades: [{ path: "automations.create", kind: "direct" }] },
|
|
1715
|
+
save: { ...base, operation: "save", input: "automations.save", output: "automations.save", idempotency: "compare-and-set", facades: [{ path: "automations.save", kind: "direct" }] },
|
|
1716
|
+
validate: { ...base, ...operationRead, operation: "validate", input: "automations.validate", output: "automations.validate", facades: [{ path: "automations.validate", kind: "direct" }] },
|
|
1717
|
+
remove: { ...base, operation: "remove", input: "automations.remove", output: "automations.remove", facades: [{ path: "automations.remove", kind: "direct" }] },
|
|
1718
|
+
activate: { ...base, operation: "activate", input: "automations.activate", output: "automations.activate", facades: [{ path: "automations.activate", kind: "direct" }] },
|
|
1719
|
+
pause: { ...base, operation: "pause", input: "automations.pause", output: "automations.pause", facades: [{ path: "automations.pause", kind: "direct" }] },
|
|
1720
|
+
test: { ...base, operation: "test", input: "automations.test", output: "automations.test", spend: "may-spend", facades: [{ path: "automations.test", kind: "direct" }] },
|
|
1721
|
+
runs: { ...base, ...operationRead, operation: "runs", input: "automations.runs", output: "automations.runs", facades: [{ path: "automations.runs", kind: "direct" }] },
|
|
1722
|
+
run: { ...base, ...operationRead, operation: "run", input: "automations.run", output: "automations.run", facades: [{ path: "automations.run", kind: "direct" }] },
|
|
1723
|
+
"templates.list": { ...base, ...operationRead, operation: "templates.list", input: "automations.templates.list", output: "automations.templates.list", facades: [{ path: "automations.templates.list", kind: "direct" }] },
|
|
1724
|
+
"templates.publish": { ...base, operation: "templates.publish", input: "automations.templates.publish", output: "automations.templates.publish", facades: [{ path: "automations.templates.publish", kind: "direct" }] },
|
|
1725
|
+
"templates.use": { ...base, operation: "templates.use", input: "automations.templates.use", output: "automations.templates.use", facades: [{ path: "automations.templates.use", kind: "direct" }] }
|
|
1726
|
+
};
|
|
1727
|
+
|
|
1728
|
+
// src/assets-operations.ts
|
|
1729
|
+
var assetsOperationDefinitions = {
|
|
1730
|
+
"read": {
|
|
1731
|
+
...operationDefaults,
|
|
1732
|
+
capability: "assets",
|
|
1733
|
+
operation: "read",
|
|
1734
|
+
input: "assets.read",
|
|
1735
|
+
output: "assets.read",
|
|
1736
|
+
sdkTimeoutMs: operationWaiting.assets.default,
|
|
1737
|
+
...publicRead,
|
|
1738
|
+
facades: [{ path: "assets.read", kind: "direct" }, { path: "assets.media", kind: "composite" }]
|
|
1739
|
+
},
|
|
1740
|
+
"upload": {
|
|
1741
|
+
...operationDefaults,
|
|
1742
|
+
capability: "assets",
|
|
1743
|
+
operation: "upload",
|
|
1744
|
+
input: "assets.upload",
|
|
1745
|
+
output: "assets.upload",
|
|
1746
|
+
sdkTimeoutMs: operationWaiting.assets.default,
|
|
1747
|
+
mediaUsage: true,
|
|
1748
|
+
facades: [{ path: "assets.upload", kind: "direct" }]
|
|
1749
|
+
},
|
|
1750
|
+
"uploadAttachment": {
|
|
1751
|
+
...operationDefaults,
|
|
1752
|
+
capability: "assets",
|
|
1753
|
+
operation: "uploadAttachment",
|
|
1754
|
+
input: "assets.uploadAttachment",
|
|
1755
|
+
output: "assets.uploadAttachment",
|
|
1756
|
+
sdkTimeoutMs: operationWaiting.assets["uploadAttachment"],
|
|
1757
|
+
mediaUsage: true,
|
|
1758
|
+
transport: "binary-upload",
|
|
1759
|
+
idempotency: "durable-receipt",
|
|
1760
|
+
facades: [{ path: "assets.uploadAttachment", kind: "direct" }]
|
|
1761
|
+
},
|
|
1762
|
+
"attachmentUrl": {
|
|
1763
|
+
...operationDefaults,
|
|
1764
|
+
capability: "assets",
|
|
1765
|
+
operation: "attachmentUrl",
|
|
1766
|
+
input: "assets.attachmentUrl",
|
|
1767
|
+
output: "assets.attachmentUrl",
|
|
1768
|
+
sdkTimeoutMs: operationWaiting.assets.default,
|
|
1769
|
+
mediaUsage: true,
|
|
1770
|
+
...operationRead,
|
|
1771
|
+
facades: [{ path: "assets.attachmentUrl", kind: "direct" }]
|
|
1772
|
+
},
|
|
1773
|
+
// The caller's own media under the usage, with an account and contribute access: only its author lists, shares, hides or
|
|
1774
|
+
// removes one; sharing needs the participant's own page.
|
|
1775
|
+
"share": {
|
|
1776
|
+
...operationDefaults,
|
|
1777
|
+
capability: "assets",
|
|
1778
|
+
operation: "share",
|
|
1779
|
+
input: "assets.share",
|
|
1780
|
+
output: "assets.share",
|
|
1781
|
+
sdkTimeoutMs: operationWaiting.assets.default,
|
|
1782
|
+
facades: [{ path: "assets.share", kind: "direct" }, { path: "assets.setVisibility", kind: "composite" }]
|
|
1783
|
+
},
|
|
1784
|
+
"unshare": {
|
|
1785
|
+
...operationDefaults,
|
|
1786
|
+
capability: "assets",
|
|
1787
|
+
operation: "unshare",
|
|
1788
|
+
input: "assets.unshare",
|
|
1789
|
+
output: "assets.unshare",
|
|
1790
|
+
sdkTimeoutMs: operationWaiting.assets.default,
|
|
1791
|
+
facades: [{ path: "assets.unshare", kind: "direct" }, { path: "assets.setVisibility", kind: "composite" }]
|
|
1792
|
+
},
|
|
1793
|
+
"list": {
|
|
1794
|
+
...operationDefaults,
|
|
1795
|
+
capability: "assets",
|
|
1796
|
+
operation: "list",
|
|
1797
|
+
input: "assets.list",
|
|
1798
|
+
output: "assets.list",
|
|
1799
|
+
sdkTimeoutMs: operationWaiting.assets.default,
|
|
1800
|
+
facades: [{ path: "assets.list", kind: "direct" }]
|
|
1801
|
+
},
|
|
1802
|
+
"remove": {
|
|
1803
|
+
...operationDefaults,
|
|
1804
|
+
capability: "assets",
|
|
1805
|
+
operation: "remove",
|
|
1806
|
+
input: "assets.remove",
|
|
1807
|
+
output: "assets.remove",
|
|
1808
|
+
sdkTimeoutMs: operationWaiting.assets.default,
|
|
1809
|
+
facades: [{ path: "assets.remove", kind: "direct" }]
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1812
|
+
|
|
1813
|
+
// src/video-operations.ts
|
|
1814
|
+
var videoOperationDefinitions = {
|
|
1815
|
+
"connection": {
|
|
1816
|
+
...operationDefaults,
|
|
1817
|
+
capability: "video",
|
|
1818
|
+
operation: "connection",
|
|
1819
|
+
input: "video.connection",
|
|
1820
|
+
output: "video.connection",
|
|
1821
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1822
|
+
facades: [{ path: "video.connection", kind: "direct" }]
|
|
1823
|
+
},
|
|
1824
|
+
"workflows": {
|
|
1825
|
+
...operationDefaults,
|
|
1826
|
+
capability: "video",
|
|
1827
|
+
operation: "workflows",
|
|
1828
|
+
input: "video.workflows",
|
|
1829
|
+
output: "video.workflows",
|
|
1830
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1831
|
+
...operationRead,
|
|
1832
|
+
facades: [{ path: "video.workflows", kind: "direct" }]
|
|
1833
|
+
},
|
|
1834
|
+
"workflow": {
|
|
1835
|
+
...operationDefaults,
|
|
1836
|
+
capability: "video",
|
|
1837
|
+
operation: "workflow",
|
|
1838
|
+
input: "video.workflow",
|
|
1839
|
+
output: "video.workflow",
|
|
1840
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1841
|
+
...operationRead,
|
|
1842
|
+
facades: [{ path: "video.workflow", kind: "direct" }]
|
|
1843
|
+
},
|
|
1844
|
+
"estimate": {
|
|
1845
|
+
...operationDefaults,
|
|
1846
|
+
capability: "video",
|
|
1847
|
+
operation: "estimate",
|
|
1848
|
+
input: "video.estimate",
|
|
1849
|
+
output: "video.estimate",
|
|
1850
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1851
|
+
...operationRead,
|
|
1852
|
+
facades: [{ path: "video.estimate", kind: "direct" }]
|
|
1853
|
+
},
|
|
1854
|
+
"create": {
|
|
1855
|
+
...operationDefaults,
|
|
1856
|
+
capability: "video",
|
|
1857
|
+
operation: "create",
|
|
1858
|
+
input: "video.create",
|
|
1859
|
+
output: "video.create",
|
|
1860
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1861
|
+
mediaUsage: true,
|
|
1862
|
+
spend: "may-spend",
|
|
1863
|
+
idempotency: "durable-receipt",
|
|
1864
|
+
facades: [{ path: "video.create", kind: "direct" }]
|
|
1865
|
+
},
|
|
1866
|
+
"list": {
|
|
1867
|
+
...operationDefaults,
|
|
1868
|
+
capability: "video",
|
|
1869
|
+
operation: "list",
|
|
1870
|
+
input: "video.list",
|
|
1871
|
+
output: "video.list",
|
|
1872
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1873
|
+
...observerRead,
|
|
1874
|
+
facades: [{ path: "video.list", kind: "direct" }]
|
|
1875
|
+
},
|
|
1876
|
+
"get": {
|
|
1877
|
+
...operationDefaults,
|
|
1878
|
+
capability: "video",
|
|
1879
|
+
operation: "get",
|
|
1880
|
+
input: "video.get",
|
|
1881
|
+
output: "video.get",
|
|
1882
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1883
|
+
...observerRead,
|
|
1884
|
+
facades: [{ path: "video.get", kind: "direct" }, { path: "video.wait", kind: "composite" }, { path: "video.media", kind: "composite" }, { path: "video.playback", kind: "composite" }]
|
|
1885
|
+
},
|
|
1886
|
+
"retry": {
|
|
1887
|
+
...operationDefaults,
|
|
1888
|
+
capability: "video",
|
|
1889
|
+
operation: "retry",
|
|
1890
|
+
input: "video.retry",
|
|
1891
|
+
output: "video.retry",
|
|
1892
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1893
|
+
spend: "may-spend",
|
|
1894
|
+
idempotency: "durable-receipt",
|
|
1895
|
+
facades: [{ path: "video.retry", kind: "direct" }]
|
|
1896
|
+
},
|
|
1897
|
+
"cancel": {
|
|
1898
|
+
...operationDefaults,
|
|
1899
|
+
capability: "video",
|
|
1900
|
+
operation: "cancel",
|
|
1901
|
+
input: "video.cancel",
|
|
1902
|
+
output: "video.cancel",
|
|
1903
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1904
|
+
facades: [{ path: "video.cancel", kind: "direct" }]
|
|
1905
|
+
},
|
|
1906
|
+
"remove": {
|
|
1907
|
+
...operationDefaults,
|
|
1908
|
+
capability: "video",
|
|
1909
|
+
operation: "remove",
|
|
1910
|
+
input: "video.remove",
|
|
1911
|
+
output: "video.remove",
|
|
1912
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1913
|
+
facades: [{ path: "video.remove", kind: "direct" }]
|
|
1914
|
+
},
|
|
1915
|
+
// By its author only; sharing needs the participant's own page.
|
|
1916
|
+
"share": {
|
|
1917
|
+
...operationDefaults,
|
|
1918
|
+
capability: "video",
|
|
1919
|
+
operation: "share",
|
|
1920
|
+
input: "video.share",
|
|
1921
|
+
output: "video.share",
|
|
1922
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1923
|
+
facades: [{ path: "video.share", kind: "direct" }, { path: "video.setVisibility", kind: "composite" }]
|
|
1924
|
+
},
|
|
1925
|
+
"unshare": {
|
|
1926
|
+
...operationDefaults,
|
|
1927
|
+
capability: "video",
|
|
1928
|
+
operation: "unshare",
|
|
1929
|
+
input: "video.unshare",
|
|
1930
|
+
output: "video.unshare",
|
|
1931
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1932
|
+
facades: [{ path: "video.unshare", kind: "direct" }, { path: "video.setVisibility", kind: "composite" }]
|
|
1933
|
+
},
|
|
1934
|
+
"clipping.create": {
|
|
1935
|
+
...operationDefaults,
|
|
1936
|
+
capability: "video",
|
|
1937
|
+
operation: "clipping.create",
|
|
1938
|
+
input: "video.clipping.create",
|
|
1939
|
+
output: "video.clipping.create",
|
|
1940
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1941
|
+
mediaUsage: true,
|
|
1942
|
+
facades: [{ path: "video.clipping.create", kind: "direct" }]
|
|
1943
|
+
},
|
|
1944
|
+
"clipping.list": {
|
|
1945
|
+
...operationDefaults,
|
|
1946
|
+
capability: "video",
|
|
1947
|
+
operation: "clipping.list",
|
|
1948
|
+
input: "video.clipping.list",
|
|
1949
|
+
output: "video.clipping.list",
|
|
1950
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1951
|
+
...observerRead,
|
|
1952
|
+
facades: [{ path: "video.clipping.list", kind: "direct" }]
|
|
1953
|
+
},
|
|
1954
|
+
"clipping.get": {
|
|
1955
|
+
...operationDefaults,
|
|
1956
|
+
capability: "video",
|
|
1957
|
+
operation: "clipping.get",
|
|
1958
|
+
input: "video.clipping.get",
|
|
1959
|
+
output: "video.clipping.get",
|
|
1960
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1961
|
+
...observerRead,
|
|
1962
|
+
facades: [{ path: "video.clipping.get", kind: "direct" }]
|
|
1963
|
+
},
|
|
1964
|
+
"clipping.remove": {
|
|
1965
|
+
...operationDefaults,
|
|
1966
|
+
capability: "video",
|
|
1967
|
+
operation: "clipping.remove",
|
|
1968
|
+
input: "video.clipping.remove",
|
|
1969
|
+
output: "video.clipping.remove",
|
|
1970
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1971
|
+
facades: [{ path: "video.clipping.remove", kind: "direct" }]
|
|
1972
|
+
},
|
|
1973
|
+
"clipping.uploadSource": {
|
|
1974
|
+
...operationDefaults,
|
|
1975
|
+
capability: "video",
|
|
1976
|
+
operation: "clipping.uploadSource",
|
|
1977
|
+
input: "video.clipping.uploadSource",
|
|
1978
|
+
output: "video.clipping.uploadSource",
|
|
1979
|
+
sdkTimeoutMs: operationWaiting.video["clipping.uploadSource"],
|
|
1980
|
+
transport: "binary-upload",
|
|
1981
|
+
facades: [{ path: "video.clipping.uploadSource", kind: "direct" }]
|
|
1982
|
+
},
|
|
1983
|
+
"clipping.estimate": {
|
|
1984
|
+
...operationDefaults,
|
|
1985
|
+
capability: "video",
|
|
1986
|
+
operation: "clipping.estimate",
|
|
1987
|
+
input: "video.clipping.estimate",
|
|
1988
|
+
output: "video.clipping.estimate",
|
|
1989
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
1990
|
+
...operationRead,
|
|
1991
|
+
facades: [{ path: "video.clipping.estimate", kind: "direct" }]
|
|
1992
|
+
},
|
|
1993
|
+
"clipping.propose": {
|
|
1994
|
+
...operationDefaults,
|
|
1995
|
+
capability: "video",
|
|
1996
|
+
operation: "clipping.propose",
|
|
1997
|
+
input: "video.clipping.propose",
|
|
1998
|
+
output: "video.clipping.propose",
|
|
1999
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2000
|
+
spend: "may-spend",
|
|
2001
|
+
idempotency: "durable-receipt",
|
|
2002
|
+
facades: [{ path: "video.clipping.propose", kind: "direct" }]
|
|
2003
|
+
},
|
|
2004
|
+
"clipping.updatePlan": {
|
|
2005
|
+
...operationDefaults,
|
|
2006
|
+
capability: "video",
|
|
2007
|
+
operation: "clipping.updatePlan",
|
|
2008
|
+
input: "video.clipping.updatePlan",
|
|
2009
|
+
output: "video.clipping.updatePlan",
|
|
2010
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2011
|
+
facades: [{ path: "video.clipping.updatePlan", kind: "direct" }]
|
|
2012
|
+
},
|
|
2013
|
+
"clipping.createExport": {
|
|
2014
|
+
...operationDefaults,
|
|
2015
|
+
capability: "video",
|
|
2016
|
+
operation: "clipping.createExport",
|
|
2017
|
+
input: "video.clipping.createExport",
|
|
2018
|
+
output: "video.clipping.createExport",
|
|
2019
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2020
|
+
spend: "may-spend",
|
|
2021
|
+
idempotency: "durable-receipt",
|
|
2022
|
+
facades: [{ path: "video.clipping.createExport", kind: "direct" }]
|
|
2023
|
+
},
|
|
2024
|
+
"clipping.getJob": {
|
|
2025
|
+
...operationDefaults,
|
|
2026
|
+
capability: "video",
|
|
2027
|
+
operation: "clipping.getJob",
|
|
2028
|
+
input: "video.clipping.getJob",
|
|
2029
|
+
output: "video.clipping.getJob",
|
|
2030
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2031
|
+
...operationRead,
|
|
2032
|
+
facades: [{ path: "video.clipping.getJob", kind: "direct" }]
|
|
2033
|
+
},
|
|
2034
|
+
"clipping.cancelJob": {
|
|
2035
|
+
...operationDefaults,
|
|
2036
|
+
capability: "video",
|
|
2037
|
+
operation: "clipping.cancelJob",
|
|
2038
|
+
input: "video.clipping.cancelJob",
|
|
2039
|
+
output: "video.clipping.cancelJob",
|
|
2040
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2041
|
+
facades: [{ path: "video.clipping.cancelJob", kind: "direct" }]
|
|
2042
|
+
},
|
|
2043
|
+
"clipping.resumeJob": {
|
|
2044
|
+
...operationDefaults,
|
|
2045
|
+
capability: "video",
|
|
2046
|
+
operation: "clipping.resumeJob",
|
|
2047
|
+
input: "video.clipping.resumeJob",
|
|
2048
|
+
output: "video.clipping.resumeJob",
|
|
2049
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2050
|
+
spend: "may-spend",
|
|
2051
|
+
idempotency: "durable-receipt",
|
|
2052
|
+
facades: [{ path: "video.clipping.resumeJob", kind: "direct" }]
|
|
2053
|
+
},
|
|
2054
|
+
"clipping.prepareMutation": {
|
|
2055
|
+
...operationDefaults,
|
|
2056
|
+
capability: "video",
|
|
2057
|
+
operation: "clipping.prepareMutation",
|
|
2058
|
+
input: "video.clipping.prepareMutation",
|
|
2059
|
+
output: "video.clipping.prepareMutation",
|
|
2060
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2061
|
+
transport: "host-document",
|
|
2062
|
+
facades: [{ path: "video.clipping.prepareMutation", kind: "direct" }]
|
|
2063
|
+
},
|
|
2064
|
+
"clipping.readMutation": {
|
|
2065
|
+
...operationDefaults,
|
|
2066
|
+
capability: "video",
|
|
2067
|
+
operation: "clipping.readMutation",
|
|
2068
|
+
input: "video.clipping.readMutation",
|
|
2069
|
+
output: "video.clipping.readMutation",
|
|
2070
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2071
|
+
...operationRead,
|
|
2072
|
+
transport: "host-document",
|
|
2073
|
+
facades: [{ path: "video.clipping.readMutation", kind: "direct" }]
|
|
2074
|
+
},
|
|
2075
|
+
"clipping.completeMutation": {
|
|
2076
|
+
...operationDefaults,
|
|
2077
|
+
capability: "video",
|
|
2078
|
+
operation: "clipping.completeMutation",
|
|
2079
|
+
input: "video.clipping.completeMutation",
|
|
2080
|
+
output: "video.clipping.completeMutation",
|
|
2081
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2082
|
+
transport: "host-document",
|
|
2083
|
+
facades: [{ path: "video.clipping.completeMutation", kind: "direct" }]
|
|
2084
|
+
},
|
|
2085
|
+
// The participant's own Tripirl projects: signed-in only, never observed nor public; one per-account rate bucket.
|
|
2086
|
+
"projects.list": {
|
|
2087
|
+
...operationDefaults,
|
|
2088
|
+
capability: "video",
|
|
2089
|
+
operation: "projects.list",
|
|
2090
|
+
input: "video.projects.list",
|
|
2091
|
+
output: "video.projects.list",
|
|
2092
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2093
|
+
...operationRead,
|
|
2094
|
+
rateBucket: "experience-video-projects",
|
|
2095
|
+
facades: [{ path: "video.projects.list", kind: "direct" }]
|
|
2096
|
+
},
|
|
2097
|
+
"projects.get": {
|
|
2098
|
+
...operationDefaults,
|
|
2099
|
+
capability: "video",
|
|
2100
|
+
operation: "projects.get",
|
|
2101
|
+
input: "video.projects.get",
|
|
2102
|
+
output: "video.projects.get",
|
|
2103
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2104
|
+
...operationRead,
|
|
2105
|
+
rateBucket: "experience-video-projects",
|
|
2106
|
+
facades: [{ path: "video.projects.get", kind: "direct" }]
|
|
2107
|
+
},
|
|
2108
|
+
"projects.artifacts": {
|
|
2109
|
+
...operationDefaults,
|
|
2110
|
+
capability: "video",
|
|
2111
|
+
operation: "projects.artifacts",
|
|
2112
|
+
input: "video.projects.artifacts",
|
|
2113
|
+
output: "video.projects.artifacts",
|
|
2114
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2115
|
+
...operationRead,
|
|
2116
|
+
rateBucket: "experience-video-projects",
|
|
2117
|
+
facades: [{ path: "video.projects.artifacts", kind: "direct" }]
|
|
2118
|
+
},
|
|
2119
|
+
"projects.media": {
|
|
2120
|
+
...operationDefaults,
|
|
2121
|
+
capability: "video",
|
|
2122
|
+
operation: "projects.media",
|
|
2123
|
+
input: "video.projects.media",
|
|
2124
|
+
output: "video.projects.media",
|
|
2125
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2126
|
+
...operationRead,
|
|
2127
|
+
rateBucket: "experience-video-projects",
|
|
2128
|
+
facades: [{ path: "video.projects.media", kind: "composite" }]
|
|
2129
|
+
},
|
|
2130
|
+
"projects.cancel": {
|
|
2131
|
+
...operationDefaults,
|
|
2132
|
+
capability: "video",
|
|
2133
|
+
operation: "projects.cancel",
|
|
2134
|
+
input: "video.projects.cancel",
|
|
2135
|
+
output: "video.projects.cancel",
|
|
2136
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2137
|
+
rateBucket: "experience-video-projects",
|
|
2138
|
+
facades: [{ path: "video.projects.cancel", kind: "direct" }]
|
|
2139
|
+
},
|
|
2140
|
+
"projects.previewSettings": {
|
|
2141
|
+
...operationDefaults,
|
|
2142
|
+
capability: "video",
|
|
2143
|
+
operation: "projects.previewSettings",
|
|
2144
|
+
input: "video.projects.previewSettings",
|
|
2145
|
+
output: "video.projects.previewSettings",
|
|
2146
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2147
|
+
...operationRead,
|
|
2148
|
+
rateBucket: "experience-video-projects",
|
|
2149
|
+
facades: [{ path: "video.projects.previewSettings", kind: "direct" }]
|
|
2150
|
+
},
|
|
2151
|
+
"projects.updateSettings": {
|
|
2152
|
+
...operationDefaults,
|
|
2153
|
+
capability: "video",
|
|
2154
|
+
operation: "projects.updateSettings",
|
|
2155
|
+
input: "video.projects.updateSettings",
|
|
2156
|
+
output: "video.projects.updateSettings",
|
|
2157
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2158
|
+
rateBucket: "experience-video-projects",
|
|
2159
|
+
facades: [{ path: "video.projects.updateSettings", kind: "direct" }]
|
|
2160
|
+
},
|
|
2161
|
+
"projects.resume": {
|
|
2162
|
+
...operationDefaults,
|
|
2163
|
+
capability: "video",
|
|
2164
|
+
operation: "projects.resume",
|
|
2165
|
+
input: "video.projects.resume",
|
|
2166
|
+
output: "video.projects.resume",
|
|
2167
|
+
sdkTimeoutMs: operationWaiting.video.default,
|
|
2168
|
+
rateBucket: "experience-video-projects",
|
|
2169
|
+
facades: [{ path: "video.projects.resume", kind: "direct" }]
|
|
2170
|
+
},
|
|
2171
|
+
// Tripirl copies the video into the project before answering: up to a few minutes for a long one.
|
|
2172
|
+
"projects.addReference": {
|
|
2173
|
+
...operationDefaults,
|
|
2174
|
+
capability: "video",
|
|
2175
|
+
operation: "projects.addReference",
|
|
2176
|
+
input: "video.projects.addReference",
|
|
2177
|
+
output: "video.projects.addReference",
|
|
2178
|
+
sdkTimeoutMs: operationWaiting.video["projects.addReference"],
|
|
2179
|
+
rateBucket: "experience-video-projects",
|
|
2180
|
+
facades: [{ path: "video.projects.addReference", kind: "direct" }]
|
|
2181
|
+
}
|
|
2182
|
+
};
|
|
2183
|
+
var videoOperations = [
|
|
2184
|
+
videoOperationDefinitions["connection"].operation,
|
|
2185
|
+
videoOperationDefinitions["workflows"].operation,
|
|
2186
|
+
videoOperationDefinitions["workflow"].operation,
|
|
2187
|
+
videoOperationDefinitions["estimate"].operation,
|
|
2188
|
+
videoOperationDefinitions["create"].operation,
|
|
2189
|
+
videoOperationDefinitions["list"].operation,
|
|
2190
|
+
videoOperationDefinitions["get"].operation,
|
|
2191
|
+
videoOperationDefinitions["retry"].operation,
|
|
2192
|
+
videoOperationDefinitions["cancel"].operation,
|
|
2193
|
+
videoOperationDefinitions["remove"].operation,
|
|
2194
|
+
videoOperationDefinitions["share"].operation,
|
|
2195
|
+
videoOperationDefinitions["unshare"].operation,
|
|
2196
|
+
videoOperationDefinitions["clipping.create"].operation,
|
|
2197
|
+
videoOperationDefinitions["clipping.list"].operation,
|
|
2198
|
+
videoOperationDefinitions["clipping.get"].operation,
|
|
2199
|
+
videoOperationDefinitions["clipping.remove"].operation,
|
|
2200
|
+
videoOperationDefinitions["clipping.uploadSource"].operation,
|
|
2201
|
+
videoOperationDefinitions["clipping.estimate"].operation,
|
|
2202
|
+
videoOperationDefinitions["clipping.propose"].operation,
|
|
2203
|
+
videoOperationDefinitions["clipping.updatePlan"].operation,
|
|
2204
|
+
videoOperationDefinitions["clipping.createExport"].operation,
|
|
2205
|
+
videoOperationDefinitions["clipping.getJob"].operation,
|
|
2206
|
+
videoOperationDefinitions["clipping.cancelJob"].operation,
|
|
2207
|
+
videoOperationDefinitions["clipping.resumeJob"].operation,
|
|
2208
|
+
videoOperationDefinitions["clipping.prepareMutation"].operation,
|
|
2209
|
+
videoOperationDefinitions["clipping.readMutation"].operation,
|
|
2210
|
+
videoOperationDefinitions["clipping.completeMutation"].operation,
|
|
2211
|
+
videoOperationDefinitions["projects.list"].operation,
|
|
2212
|
+
videoOperationDefinitions["projects.get"].operation,
|
|
2213
|
+
videoOperationDefinitions["projects.artifacts"].operation,
|
|
2214
|
+
videoOperationDefinitions["projects.media"].operation,
|
|
2215
|
+
videoOperationDefinitions["projects.cancel"].operation,
|
|
2216
|
+
videoOperationDefinitions["projects.previewSettings"].operation,
|
|
2217
|
+
videoOperationDefinitions["projects.updateSettings"].operation,
|
|
2218
|
+
videoOperationDefinitions["projects.resume"].operation,
|
|
2219
|
+
videoOperationDefinitions["projects.addReference"].operation
|
|
2220
|
+
];
|
|
2221
|
+
|
|
2222
|
+
// src/hardware-operations.ts
|
|
2223
|
+
var hardwareOperationDefinitions = {
|
|
2224
|
+
"metrics.read": {
|
|
2225
|
+
...operationDefaults,
|
|
2226
|
+
capability: "hardware",
|
|
2227
|
+
operation: "metrics.read",
|
|
2228
|
+
input: "hardware.metrics.read",
|
|
2229
|
+
output: "hardware.metrics.read",
|
|
2230
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2231
|
+
...operationRead,
|
|
2232
|
+
facades: [{ path: "hardware.metrics", kind: "direct" }]
|
|
2233
|
+
},
|
|
2234
|
+
"hue.lights.read": {
|
|
2235
|
+
...operationDefaults,
|
|
2236
|
+
capability: "hardware",
|
|
2237
|
+
operation: "hue.lights.read",
|
|
2238
|
+
input: "hardware.hue.lights.read",
|
|
2239
|
+
output: "hardware.hue.lights.read",
|
|
2240
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2241
|
+
...operationRead,
|
|
2242
|
+
publicControl: "hue",
|
|
2243
|
+
rateBucket: "hardware-control",
|
|
2244
|
+
facades: [{ path: "hardware.hue.lights", kind: "direct" }]
|
|
2245
|
+
},
|
|
2246
|
+
"hue.lights.set": {
|
|
2247
|
+
...operationDefaults,
|
|
2248
|
+
capability: "hardware",
|
|
2249
|
+
operation: "hue.lights.set",
|
|
2250
|
+
input: "hardware.hue.lights.set",
|
|
2251
|
+
output: "hardware.hue.lights.set",
|
|
2252
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2253
|
+
publicControl: "hue",
|
|
2254
|
+
rateBucket: "hardware-control",
|
|
2255
|
+
facades: [{ path: "hardware.hue.set", kind: "direct" }]
|
|
2256
|
+
},
|
|
2257
|
+
"leds.read": {
|
|
2258
|
+
...operationDefaults,
|
|
2259
|
+
capability: "hardware",
|
|
2260
|
+
operation: "leds.read",
|
|
2261
|
+
input: "hardware.leds.read",
|
|
2262
|
+
output: "hardware.leds.read",
|
|
2263
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2264
|
+
...operationRead,
|
|
2265
|
+
publicControl: "leds",
|
|
2266
|
+
rateBucket: "hardware-control",
|
|
2267
|
+
facades: [{ path: "hardware.leds.read", kind: "direct" }]
|
|
2268
|
+
},
|
|
2269
|
+
"leds.set": {
|
|
2270
|
+
...operationDefaults,
|
|
2271
|
+
capability: "hardware",
|
|
2272
|
+
operation: "leds.set",
|
|
2273
|
+
input: "hardware.leds.set",
|
|
2274
|
+
output: "hardware.leds.set",
|
|
2275
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2276
|
+
publicControl: "leds",
|
|
2277
|
+
rateBucket: "hardware-control",
|
|
2278
|
+
facades: [{ path: "hardware.leds.set", kind: "direct" }]
|
|
2279
|
+
},
|
|
2280
|
+
"audio.devices": {
|
|
2281
|
+
...operationDefaults,
|
|
2282
|
+
capability: "hardware",
|
|
2283
|
+
operation: "audio.devices",
|
|
2284
|
+
input: "hardware.audio.devices",
|
|
2285
|
+
output: "hardware.audio.devices",
|
|
2286
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2287
|
+
...operationRead,
|
|
2288
|
+
rateBucket: "hardware-audio",
|
|
2289
|
+
facades: [{ path: "hardware.audio.devices", kind: "direct" }]
|
|
2290
|
+
},
|
|
2291
|
+
"audio.start": {
|
|
2292
|
+
...operationDefaults,
|
|
2293
|
+
capability: "hardware",
|
|
2294
|
+
operation: "audio.start",
|
|
2295
|
+
input: "hardware.audio.start",
|
|
2296
|
+
output: "hardware.audio.start",
|
|
2297
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2298
|
+
rateBucket: "hardware-audio",
|
|
2299
|
+
facades: [{ path: "hardware.audio.start", kind: "direct" }]
|
|
2300
|
+
},
|
|
2301
|
+
"audio.read": {
|
|
2302
|
+
...operationDefaults,
|
|
2303
|
+
capability: "hardware",
|
|
2304
|
+
operation: "audio.read",
|
|
2305
|
+
input: "hardware.audio.read",
|
|
2306
|
+
output: "hardware.audio.read",
|
|
2307
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2308
|
+
...operationRead,
|
|
2309
|
+
rateBucket: "hardware-audio",
|
|
2310
|
+
facades: [{ path: "hardware.audio.read", kind: "direct" }]
|
|
2311
|
+
},
|
|
2312
|
+
"audio.stop": {
|
|
2313
|
+
...operationDefaults,
|
|
2314
|
+
capability: "hardware",
|
|
2315
|
+
operation: "audio.stop",
|
|
2316
|
+
input: "hardware.audio.stop",
|
|
2317
|
+
output: "hardware.audio.stop",
|
|
2318
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2319
|
+
rateBucket: "hardware-audio",
|
|
2320
|
+
facades: [{ path: "hardware.audio.stop", kind: "direct" }]
|
|
2321
|
+
},
|
|
2322
|
+
"audio.transcribe": {
|
|
2323
|
+
...operationDefaults,
|
|
2324
|
+
capability: "hardware",
|
|
2325
|
+
operation: "audio.transcribe",
|
|
2326
|
+
input: "hardware.audio.transcribe",
|
|
2327
|
+
output: "hardware.audio.transcribe",
|
|
2328
|
+
sdkTimeoutMs: operationWaiting.hardware["audio.transcribe"],
|
|
2329
|
+
rateBucket: "hardware-audio",
|
|
2330
|
+
spend: "may-spend",
|
|
2331
|
+
facades: [{ path: "hardware.audio.transcribe", kind: "direct" }]
|
|
2332
|
+
},
|
|
2333
|
+
"network.read": {
|
|
2334
|
+
...operationDefaults,
|
|
2335
|
+
capability: "hardware",
|
|
2336
|
+
operation: "network.read",
|
|
2337
|
+
input: "hardware.network.read",
|
|
2338
|
+
output: "hardware.network.read",
|
|
2339
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2340
|
+
...publicRead,
|
|
2341
|
+
rateBucket: "hardware-network",
|
|
2342
|
+
facades: [{ path: "hardware.network", kind: "direct" }]
|
|
2343
|
+
},
|
|
2344
|
+
"desktop.read": {
|
|
2345
|
+
...operationDefaults,
|
|
2346
|
+
capability: "hardware",
|
|
2347
|
+
operation: "desktop.read",
|
|
2348
|
+
input: "hardware.desktop.read",
|
|
2349
|
+
output: "hardware.desktop.read",
|
|
2350
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2351
|
+
...operationRead,
|
|
2352
|
+
rateBucket: "hardware-desktop",
|
|
2353
|
+
facades: [{ path: "hardware.desktop.read", kind: "direct" }]
|
|
2354
|
+
},
|
|
2355
|
+
"desktop.dictation": {
|
|
2356
|
+
...operationDefaults,
|
|
2357
|
+
capability: "hardware",
|
|
2358
|
+
operation: "desktop.dictation",
|
|
2359
|
+
input: "hardware.desktop.dictation",
|
|
2360
|
+
output: "hardware.desktop.dictation",
|
|
2361
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2362
|
+
rateBucket: "hardware-desktop",
|
|
2363
|
+
facades: [{ path: "hardware.desktop.dictation", kind: "direct" }]
|
|
2364
|
+
},
|
|
2365
|
+
"desktop.terminal": {
|
|
2366
|
+
...operationDefaults,
|
|
2367
|
+
capability: "hardware",
|
|
2368
|
+
operation: "desktop.terminal",
|
|
2369
|
+
input: "hardware.desktop.terminal",
|
|
2370
|
+
output: "hardware.desktop.terminal",
|
|
2371
|
+
sdkTimeoutMs: operationWaiting.hardware.default,
|
|
2372
|
+
rateBucket: "hardware-desktop",
|
|
2373
|
+
facades: [{ path: "hardware.desktop.terminal", kind: "direct" }]
|
|
2374
|
+
}
|
|
2375
|
+
};
|
|
2376
|
+
|
|
2377
|
+
// src/network-operations.ts
|
|
2378
|
+
var networkOperationDefinitions = {
|
|
2379
|
+
"request": {
|
|
2380
|
+
...operationDefaults,
|
|
2381
|
+
capability: "network",
|
|
2382
|
+
operation: "request",
|
|
2383
|
+
input: "network.request",
|
|
2384
|
+
output: "network.request",
|
|
2385
|
+
sdkTimeoutMs: operationWaiting.network.default,
|
|
2386
|
+
idempotency: "durable-receipt",
|
|
2387
|
+
facades: [{ path: "network.request", kind: "direct" }]
|
|
2388
|
+
},
|
|
2389
|
+
"asset": {
|
|
2390
|
+
...operationDefaults,
|
|
2391
|
+
capability: "network",
|
|
2392
|
+
operation: "asset",
|
|
2393
|
+
input: "network.asset",
|
|
2394
|
+
output: "network.asset",
|
|
2395
|
+
sdkTimeoutMs: operationWaiting.network.default,
|
|
2396
|
+
...operationRead,
|
|
2397
|
+
facades: [{ path: "network.asset", kind: "direct" }]
|
|
2398
|
+
}
|
|
2399
|
+
};
|
|
2400
|
+
|
|
2401
|
+
// src/multiplayer-operations.ts
|
|
2402
|
+
var multiplayerOperationDefinitions = {
|
|
2403
|
+
"presence": {
|
|
2404
|
+
...operationDefaults,
|
|
2405
|
+
capability: "multiplayer",
|
|
2406
|
+
operation: "presence",
|
|
2407
|
+
input: "multiplayer.presence",
|
|
2408
|
+
output: "multiplayer.presence",
|
|
2409
|
+
sdkTimeoutMs: operationWaiting.multiplayer.default,
|
|
2410
|
+
transport: "live-host",
|
|
2411
|
+
...publicRead,
|
|
2412
|
+
facades: [{ path: "multiplayer.presence", kind: "direct" }, { path: "multiplayer.onPresence", kind: "composite" }]
|
|
2413
|
+
},
|
|
2414
|
+
"subscribe": {
|
|
2415
|
+
...operationDefaults,
|
|
2416
|
+
capability: "multiplayer",
|
|
2417
|
+
operation: "subscribe",
|
|
2418
|
+
input: "multiplayer.subscribe",
|
|
2419
|
+
output: "multiplayer.subscribe",
|
|
2420
|
+
sdkTimeoutMs: operationWaiting.multiplayer.default,
|
|
2421
|
+
transport: "live-host",
|
|
2422
|
+
...publicRead,
|
|
2423
|
+
facades: [{ path: "multiplayer.subscribe", kind: "composite" }]
|
|
2424
|
+
},
|
|
2425
|
+
"publish": {
|
|
2426
|
+
...operationDefaults,
|
|
2427
|
+
capability: "multiplayer",
|
|
2428
|
+
operation: "publish",
|
|
2429
|
+
input: "multiplayer.publish",
|
|
2430
|
+
output: "multiplayer.publish",
|
|
2431
|
+
sdkTimeoutMs: operationWaiting.multiplayer.default,
|
|
2432
|
+
transport: "live-host",
|
|
2433
|
+
facades: [{ path: "multiplayer.publish", kind: "direct" }]
|
|
2434
|
+
}
|
|
2435
|
+
};
|
|
2436
|
+
|
|
2437
|
+
// src/device-operations.ts
|
|
2438
|
+
var deviceOperationDefinitions = {
|
|
2439
|
+
"availability": {
|
|
2440
|
+
...operationDefaults,
|
|
2441
|
+
capability: "device",
|
|
2442
|
+
operation: "availability",
|
|
2443
|
+
input: "device.availability",
|
|
2444
|
+
output: "device.availability",
|
|
2445
|
+
sdkTimeoutMs: operationWaiting.device["availability"],
|
|
2446
|
+
transport: "native-host",
|
|
2447
|
+
...operationRead,
|
|
2448
|
+
facades: [
|
|
2449
|
+
{ path: "device.availability", kind: "direct" },
|
|
2450
|
+
{ path: "device.media.status", kind: "composite" },
|
|
2451
|
+
{ path: "device.media.offerHost", kind: "composite" }
|
|
2452
|
+
]
|
|
2453
|
+
},
|
|
2454
|
+
"camera.capture": {
|
|
2455
|
+
...operationDefaults,
|
|
2456
|
+
capability: "device",
|
|
2457
|
+
operation: "camera.capture",
|
|
2458
|
+
input: "device.camera.capture",
|
|
2459
|
+
output: "device.camera.capture",
|
|
2460
|
+
sdkTimeoutMs: operationWaiting.device.default,
|
|
2461
|
+
transport: "native-host",
|
|
2462
|
+
facades: [{ path: "device.camera.capture", kind: "direct" }]
|
|
2463
|
+
},
|
|
2464
|
+
"camera.stream": {
|
|
2465
|
+
...operationDefaults,
|
|
2466
|
+
capability: "device",
|
|
2467
|
+
operation: "camera.stream",
|
|
2468
|
+
input: "device.camera.stream",
|
|
2469
|
+
output: "device.camera.stream",
|
|
2470
|
+
sdkTimeoutMs: operationWaiting.device["camera.stream"],
|
|
2471
|
+
transport: "native-host",
|
|
2472
|
+
facades: [{ path: "device.media.getUserMedia", kind: "composite" }]
|
|
2473
|
+
},
|
|
2474
|
+
"photos.pick": {
|
|
2475
|
+
...operationDefaults,
|
|
2476
|
+
capability: "device",
|
|
2477
|
+
operation: "photos.pick",
|
|
2478
|
+
input: "device.photos.pick",
|
|
2479
|
+
output: "device.photos.pick",
|
|
2480
|
+
sdkTimeoutMs: operationWaiting.device.default,
|
|
2481
|
+
transport: "native-host",
|
|
2482
|
+
facades: [{ path: "device.photos.pick", kind: "direct" }]
|
|
2483
|
+
},
|
|
2484
|
+
"microphone.stream": {
|
|
2485
|
+
...operationDefaults,
|
|
2486
|
+
capability: "device",
|
|
2487
|
+
operation: "microphone.stream",
|
|
2488
|
+
input: "device.microphone.stream",
|
|
2489
|
+
output: "device.microphone.stream",
|
|
2490
|
+
sdkTimeoutMs: operationWaiting.device["microphone.stream"],
|
|
2491
|
+
transport: "native-host",
|
|
2492
|
+
facades: [{ path: "device.media.getUserMedia", kind: "composite" }]
|
|
2493
|
+
},
|
|
2494
|
+
"motion.subscribe": {
|
|
2495
|
+
...operationDefaults,
|
|
2496
|
+
capability: "device",
|
|
2497
|
+
operation: "motion.subscribe",
|
|
2498
|
+
input: "device.motion.subscribe",
|
|
2499
|
+
output: "device.motion.subscribe",
|
|
2500
|
+
sdkTimeoutMs: operationWaiting.device.default,
|
|
2501
|
+
transport: "native-host",
|
|
2502
|
+
facades: [{ path: "device.motion.subscribe", kind: "composite" }]
|
|
2503
|
+
},
|
|
2504
|
+
"motion.unsubscribe": {
|
|
2505
|
+
...operationDefaults,
|
|
2506
|
+
capability: "device",
|
|
2507
|
+
operation: "motion.unsubscribe",
|
|
2508
|
+
input: "device.motion.unsubscribe",
|
|
2509
|
+
output: "device.motion.unsubscribe",
|
|
2510
|
+
sdkTimeoutMs: operationWaiting.device["motion.unsubscribe"],
|
|
2511
|
+
transport: "native-host",
|
|
2512
|
+
facades: [{ path: "device.motion.subscribe", kind: "composite" }]
|
|
2513
|
+
},
|
|
2514
|
+
"haptics.trigger": {
|
|
2515
|
+
...operationDefaults,
|
|
2516
|
+
capability: "device",
|
|
2517
|
+
operation: "haptics.trigger",
|
|
2518
|
+
input: "device.haptics.trigger",
|
|
2519
|
+
output: "device.haptics.trigger",
|
|
2520
|
+
sdkTimeoutMs: operationWaiting.device["haptics.trigger"],
|
|
2521
|
+
transport: "native-host",
|
|
2522
|
+
facades: [{ path: "device.haptics.trigger", kind: "direct" }]
|
|
2523
|
+
},
|
|
2524
|
+
"haptics.pattern": {
|
|
2525
|
+
...operationDefaults,
|
|
2526
|
+
capability: "device",
|
|
2527
|
+
operation: "haptics.pattern",
|
|
2528
|
+
input: "device.haptics.pattern",
|
|
2529
|
+
output: "device.haptics.pattern",
|
|
2530
|
+
sdkTimeoutMs: operationWaiting.device["haptics.pattern"],
|
|
2531
|
+
transport: "native-host",
|
|
2532
|
+
facades: [{ path: "device.haptics.pattern", kind: "direct" }]
|
|
2533
|
+
},
|
|
2534
|
+
"haptics.stop": {
|
|
2535
|
+
...operationDefaults,
|
|
2536
|
+
capability: "device",
|
|
2537
|
+
operation: "haptics.stop",
|
|
2538
|
+
input: "device.haptics.stop",
|
|
2539
|
+
output: "device.haptics.stop",
|
|
2540
|
+
sdkTimeoutMs: operationWaiting.device["haptics.stop"],
|
|
2541
|
+
transport: "native-host",
|
|
2542
|
+
facades: [{ path: "device.haptics.stop", kind: "direct" }]
|
|
2543
|
+
},
|
|
2544
|
+
"location.current": {
|
|
2545
|
+
...operationDefaults,
|
|
2546
|
+
capability: "device",
|
|
2547
|
+
operation: "location.current",
|
|
2548
|
+
input: "device.location.current",
|
|
2549
|
+
output: "device.location.current",
|
|
2550
|
+
sdkTimeoutMs: operationWaiting.device.default,
|
|
2551
|
+
transport: "native-host",
|
|
2552
|
+
...operationRead,
|
|
2553
|
+
facades: [{ path: "device.location.current", kind: "direct" }]
|
|
2554
|
+
},
|
|
2555
|
+
"share.open": {
|
|
2556
|
+
...operationDefaults,
|
|
2557
|
+
capability: "device",
|
|
2558
|
+
operation: "share.open",
|
|
2559
|
+
input: "device.share.open",
|
|
2560
|
+
output: "device.share.open",
|
|
2561
|
+
sdkTimeoutMs: operationWaiting.device.default,
|
|
2562
|
+
transport: "native-host",
|
|
2563
|
+
facades: [{ path: "device.share.open", kind: "direct" }]
|
|
2564
|
+
},
|
|
2565
|
+
"notifications.schedule": {
|
|
2566
|
+
...operationDefaults,
|
|
2567
|
+
capability: "device",
|
|
2568
|
+
operation: "notifications.schedule",
|
|
2569
|
+
input: "device.notifications.schedule",
|
|
2570
|
+
output: "device.notifications.schedule",
|
|
2571
|
+
sdkTimeoutMs: operationWaiting.device.default,
|
|
2572
|
+
transport: "native-host",
|
|
2573
|
+
facades: [{ path: "device.notifications.schedule", kind: "direct" }]
|
|
2574
|
+
},
|
|
2575
|
+
"notifications.list": {
|
|
2576
|
+
...operationDefaults,
|
|
2577
|
+
capability: "device",
|
|
2578
|
+
operation: "notifications.list",
|
|
2579
|
+
input: "device.notifications.list",
|
|
2580
|
+
output: "device.notifications.list",
|
|
2581
|
+
sdkTimeoutMs: operationWaiting.device["notifications.list"],
|
|
2582
|
+
transport: "native-host",
|
|
2583
|
+
...operationRead,
|
|
2584
|
+
facades: [{ path: "device.notifications.list", kind: "direct" }]
|
|
2585
|
+
},
|
|
2586
|
+
"notifications.cancel": {
|
|
2587
|
+
...operationDefaults,
|
|
2588
|
+
capability: "device",
|
|
2589
|
+
operation: "notifications.cancel",
|
|
2590
|
+
input: "device.notifications.cancel",
|
|
2591
|
+
output: "device.notifications.cancel",
|
|
2592
|
+
sdkTimeoutMs: operationWaiting.device["notifications.cancel"],
|
|
2593
|
+
transport: "native-host",
|
|
2594
|
+
facades: [{ path: "device.notifications.cancel", kind: "direct" }]
|
|
2595
|
+
},
|
|
2596
|
+
"alarms.schedule": {
|
|
2597
|
+
...operationDefaults,
|
|
2598
|
+
capability: "device",
|
|
2599
|
+
operation: "alarms.schedule",
|
|
2600
|
+
input: "device.alarms.schedule",
|
|
2601
|
+
output: "device.alarms.schedule",
|
|
2602
|
+
sdkTimeoutMs: operationWaiting.device.default,
|
|
2603
|
+
transport: "native-host",
|
|
2604
|
+
facades: [{ path: "device.alarms.schedule", kind: "direct" }]
|
|
2605
|
+
},
|
|
2606
|
+
"alarms.list": {
|
|
2607
|
+
...operationDefaults,
|
|
2608
|
+
capability: "device",
|
|
2609
|
+
operation: "alarms.list",
|
|
2610
|
+
input: "device.alarms.list",
|
|
2611
|
+
output: "device.alarms.list",
|
|
2612
|
+
sdkTimeoutMs: operationWaiting.device["alarms.list"],
|
|
2613
|
+
transport: "native-host",
|
|
2614
|
+
...operationRead,
|
|
2615
|
+
facades: [{ path: "device.alarms.list", kind: "direct" }]
|
|
2616
|
+
},
|
|
2617
|
+
"alarms.cancel": {
|
|
2618
|
+
...operationDefaults,
|
|
2619
|
+
capability: "device",
|
|
2620
|
+
operation: "alarms.cancel",
|
|
2621
|
+
input: "device.alarms.cancel",
|
|
2622
|
+
output: "device.alarms.cancel",
|
|
2623
|
+
sdkTimeoutMs: operationWaiting.device["alarms.cancel"],
|
|
2624
|
+
transport: "native-host",
|
|
2625
|
+
facades: [{ path: "device.alarms.cancel", kind: "direct" }]
|
|
2626
|
+
}
|
|
2627
|
+
};
|
|
2628
|
+
|
|
2629
|
+
// src/presence-operations.ts
|
|
2630
|
+
var presenceOperationDefinitions = {
|
|
2631
|
+
"list": {
|
|
2632
|
+
...operationDefaults,
|
|
2633
|
+
capability: "presence",
|
|
2634
|
+
operation: "list",
|
|
2635
|
+
input: "presence.list",
|
|
2636
|
+
output: "presence.list",
|
|
2637
|
+
sdkTimeoutMs: operationWaiting.default,
|
|
2638
|
+
...publicRead,
|
|
2639
|
+
compatibility: "wire-alias",
|
|
2640
|
+
facades: []
|
|
2641
|
+
}
|
|
2642
|
+
};
|
|
2643
|
+
|
|
2644
|
+
// src/notifications-operations.ts
|
|
2645
|
+
var notificationsOperationDefinitions = {
|
|
2646
|
+
"send": {
|
|
2647
|
+
...operationDefaults,
|
|
2648
|
+
capability: "notifications",
|
|
2649
|
+
operation: "send",
|
|
2650
|
+
input: "notifications.send",
|
|
2651
|
+
output: "notifications.send",
|
|
2652
|
+
sdkTimeoutMs: operationWaiting.notifications.default,
|
|
2653
|
+
idempotency: "durable-receipt",
|
|
2654
|
+
rateBucket: "experience-notifications",
|
|
2655
|
+
facades: [{ path: "notifications.send", kind: "direct" }]
|
|
2656
|
+
},
|
|
2657
|
+
"schedule": {
|
|
2658
|
+
...operationDefaults,
|
|
2659
|
+
capability: "notifications",
|
|
2660
|
+
operation: "schedule",
|
|
2661
|
+
input: "notifications.schedule",
|
|
2662
|
+
output: "notifications.schedule",
|
|
2663
|
+
sdkTimeoutMs: operationWaiting.notifications.default,
|
|
2664
|
+
rateBucket: "experience-notifications",
|
|
2665
|
+
facades: [{ path: "notifications.schedule", kind: "direct" }]
|
|
2666
|
+
},
|
|
2667
|
+
"cancel": {
|
|
2668
|
+
...operationDefaults,
|
|
2669
|
+
capability: "notifications",
|
|
2670
|
+
operation: "cancel",
|
|
2671
|
+
input: "notifications.cancel",
|
|
2672
|
+
output: "notifications.cancel",
|
|
2673
|
+
sdkTimeoutMs: operationWaiting.notifications.default,
|
|
2674
|
+
rateBucket: "experience-notifications",
|
|
2675
|
+
facades: [{ path: "notifications.cancel", kind: "direct" }]
|
|
2676
|
+
},
|
|
2677
|
+
"list": {
|
|
2678
|
+
...operationDefaults,
|
|
2679
|
+
...operationRead,
|
|
2680
|
+
capability: "notifications",
|
|
2681
|
+
operation: "list",
|
|
2682
|
+
input: "notifications.list",
|
|
2683
|
+
output: "notifications.list",
|
|
2684
|
+
sdkTimeoutMs: operationWaiting.notifications.default,
|
|
2685
|
+
rateBucket: "experience-notifications",
|
|
2686
|
+
facades: [{ path: "notifications.scheduled", kind: "direct" }]
|
|
2687
|
+
}
|
|
2688
|
+
};
|
|
2689
|
+
|
|
2690
|
+
// src/inbox-operations.ts
|
|
2691
|
+
var inboxOperationDefinitions = {
|
|
2692
|
+
"list": {
|
|
2693
|
+
...operationDefaults,
|
|
2694
|
+
...operationRead,
|
|
2695
|
+
capability: "inbox",
|
|
2696
|
+
operation: "list",
|
|
2697
|
+
input: "inbox.list",
|
|
2698
|
+
output: "inbox.list",
|
|
2699
|
+
sdkTimeoutMs: operationWaiting.inbox.default,
|
|
2700
|
+
rateBucket: "experience-inbox",
|
|
2701
|
+
facades: [{ path: "inbox.list", kind: "direct" }, { path: "inbox.watch", kind: "composite" }]
|
|
2702
|
+
},
|
|
2703
|
+
"ack": {
|
|
2704
|
+
...operationDefaults,
|
|
2705
|
+
capability: "inbox",
|
|
2706
|
+
operation: "ack",
|
|
2707
|
+
input: "inbox.ack",
|
|
2708
|
+
output: "inbox.ack",
|
|
2709
|
+
sdkTimeoutMs: operationWaiting.inbox.default,
|
|
2710
|
+
rateBucket: "experience-inbox",
|
|
2711
|
+
facades: [{ path: "inbox.ack", kind: "direct" }]
|
|
2712
|
+
}
|
|
2713
|
+
};
|
|
2714
|
+
|
|
2715
|
+
// src/email-operations.ts
|
|
2716
|
+
var emailOperationDefinitions = {
|
|
2717
|
+
"send": {
|
|
2718
|
+
...operationDefaults,
|
|
2719
|
+
capability: "email",
|
|
2720
|
+
operation: "send",
|
|
2721
|
+
input: "email.send",
|
|
2722
|
+
output: "email.send",
|
|
2723
|
+
sdkTimeoutMs: operationWaiting.email.default,
|
|
2724
|
+
spend: "may-spend",
|
|
2725
|
+
idempotency: "durable-receipt",
|
|
2726
|
+
rateBucket: "experience-email",
|
|
2727
|
+
facades: [{ path: "email.send", kind: "direct" }]
|
|
2728
|
+
}
|
|
2729
|
+
};
|
|
2730
|
+
|
|
2731
|
+
// src/connectors-operations.ts
|
|
2732
|
+
var connectorsOperationDefinitions = {
|
|
2733
|
+
status: { ...operationDefaults, capability: "connectors", operation: "status", input: "connectors.status", output: "connectors.status", sdkTimeoutMs: 3e4, idempotency: "read", rateBucket: "experience-connectors", facades: [{ path: "connectors.status", kind: "direct" }] },
|
|
2734
|
+
request: { ...operationDefaults, capability: "connectors", operation: "request", input: "connectors.request", output: "connectors.request", sdkTimeoutMs: null, rateBucket: "experience-connectors", facades: [{ path: "connectors.request", kind: "direct" }] },
|
|
2735
|
+
invoke: { ...operationDefaults, capability: "connectors", operation: "invoke", input: "connectors.invoke", output: "connectors.invoke", sdkTimeoutMs: 45e3, idempotency: "durable-receipt", rateBucket: "experience-connectors", facades: [{ path: "connectors.invoke", kind: "direct" }] },
|
|
2736
|
+
revoke: { ...operationDefaults, capability: "connectors", operation: "revoke", input: "connectors.revoke", output: "connectors.revoke", sdkTimeoutMs: 3e4, rateBucket: "experience-connectors", facades: [{ path: "connectors.revoke", kind: "direct" }] }
|
|
2737
|
+
};
|
|
2738
|
+
|
|
2739
|
+
// src/backend-operations.ts
|
|
2740
|
+
var backendOperationDefinitions = {
|
|
2741
|
+
request: {
|
|
2742
|
+
...operationDefaults,
|
|
2743
|
+
capability: "backend",
|
|
2744
|
+
operation: "request",
|
|
2745
|
+
input: "backend.request",
|
|
2746
|
+
output: "backend.request",
|
|
2747
|
+
// Host waits at most 60 s for admission/execution; leave a margin for durable storage.
|
|
2748
|
+
idempotency: "durable-receipt",
|
|
2749
|
+
sdkTimeoutMs: 65e3,
|
|
2750
|
+
facades: []
|
|
2751
|
+
},
|
|
2752
|
+
get: {
|
|
2753
|
+
...operationDefaults,
|
|
2754
|
+
...operationRead,
|
|
2755
|
+
capability: "backend",
|
|
2756
|
+
operation: "get",
|
|
2757
|
+
input: "backend.get",
|
|
2758
|
+
output: "backend.get",
|
|
2759
|
+
sdkTimeoutMs: operationWaiting.default,
|
|
2760
|
+
facades: []
|
|
2761
|
+
},
|
|
2762
|
+
cancel: {
|
|
2763
|
+
...operationDefaults,
|
|
2764
|
+
...operationRead,
|
|
2765
|
+
capability: "backend",
|
|
2766
|
+
operation: "cancel",
|
|
2767
|
+
input: "backend.cancel",
|
|
2768
|
+
output: "backend.cancel",
|
|
2769
|
+
idempotency: "durable-receipt",
|
|
2770
|
+
sdkTimeoutMs: operationWaiting.default,
|
|
2771
|
+
facades: []
|
|
2772
|
+
}
|
|
2773
|
+
};
|
|
2774
|
+
|
|
2775
|
+
// src/drive-operations.ts
|
|
2776
|
+
var driveOperationDefinitions = {
|
|
2777
|
+
"save": {
|
|
2778
|
+
...operationDefaults,
|
|
2779
|
+
capability: "drive",
|
|
2780
|
+
operation: "save",
|
|
2781
|
+
input: "drive.save",
|
|
2782
|
+
output: "drive.save",
|
|
2783
|
+
sdkTimeoutMs: operationWaiting.drive.save,
|
|
2784
|
+
transport: "binary-upload",
|
|
2785
|
+
facades: [{ path: "drive.save", kind: "direct" }]
|
|
2786
|
+
},
|
|
2787
|
+
"pick": {
|
|
2788
|
+
...operationDefaults,
|
|
2789
|
+
capability: "drive",
|
|
2790
|
+
operation: "pick",
|
|
2791
|
+
input: "drive.pick",
|
|
2792
|
+
output: "drive.pick",
|
|
2793
|
+
sdkTimeoutMs: operationWaiting.drive.pick,
|
|
2794
|
+
transport: "host-document",
|
|
2795
|
+
...operationRead,
|
|
2796
|
+
facades: [{ path: "drive.pick", kind: "direct" }]
|
|
2797
|
+
}
|
|
2798
|
+
};
|
|
2799
|
+
|
|
2800
|
+
// src/link-operations.ts
|
|
2801
|
+
var linkOperationDefinitions = {
|
|
2802
|
+
"open": {
|
|
2803
|
+
...operationDefaults,
|
|
2804
|
+
...publicRead,
|
|
2805
|
+
capability: "link",
|
|
2806
|
+
operation: "open",
|
|
2807
|
+
input: "link.open",
|
|
2808
|
+
output: "link.open",
|
|
2809
|
+
sdkTimeoutMs: operationWaiting.link.open,
|
|
2810
|
+
transport: "host-document",
|
|
2811
|
+
facades: [{ path: "link.open", kind: "direct" }]
|
|
2812
|
+
}
|
|
2813
|
+
};
|
|
2814
|
+
|
|
2815
|
+
// src/library-operations.ts
|
|
2816
|
+
var library = { ...operationDefaults, ...operationRead, capability: "library", transport: "host-document", sdkTimeoutMs: operationWaiting.library.default };
|
|
2817
|
+
var libraryOperationDefinitions = {
|
|
2818
|
+
"experiences": { ...library, operation: "experiences", input: "library.experiences", output: "library.experiences", facades: [{ path: "library.experiences", kind: "direct" }] },
|
|
2819
|
+
"catalogue": { ...library, operation: "catalogue", input: "library.catalogue", output: "library.catalogue", facades: [{ path: "library.catalogue", kind: "direct" }] },
|
|
2820
|
+
"search": { ...library, operation: "search", input: "library.search", output: "library.search", facades: [{ path: "library.search", kind: "direct" }] },
|
|
2821
|
+
"bookmarks": { ...library, operation: "bookmarks", input: "library.bookmarks", output: "library.bookmarks", facades: [{ path: "library.bookmarks", kind: "direct" }] },
|
|
2822
|
+
"teams": { ...library, operation: "teams", input: "library.teams", output: "library.teams", facades: [{ path: "library.teams", kind: "direct" }] },
|
|
2823
|
+
"teamExperiences": { ...library, operation: "teamExperiences", input: "library.teamExperiences", output: "library.teamExperiences", facades: [{ path: "library.teamExperiences", kind: "direct" }] },
|
|
2824
|
+
"journal": { ...library, operation: "journal", input: "library.journal", output: "library.journal", facades: [{ path: "library.journal", kind: "direct" }] },
|
|
2825
|
+
"facets": { ...library, operation: "facets", input: "library.facets", output: "library.facets", facades: [{ path: "library.facets", kind: "direct" }] },
|
|
2826
|
+
"account": { ...library, operation: "account", input: "library.account", output: "library.account", facades: [{ path: "library.account", kind: "direct" }] },
|
|
2827
|
+
"icons": { ...library, operation: "icons", input: "library.icons", output: "library.icons", sdkTimeoutMs: operationWaiting.library.icons, facades: [{ path: "library.icons", kind: "direct" }] },
|
|
2828
|
+
"avatars": { ...library, operation: "avatars", input: "library.avatars", output: "library.avatars", sdkTimeoutMs: operationWaiting.library.avatars, facades: [{ path: "library.avatars", kind: "direct" }] },
|
|
2829
|
+
"open": { ...library, operation: "open", input: "library.open", output: "library.open", sdkTimeoutMs: operationWaiting.library.open, facades: [{ path: "library.open", kind: "direct" }] },
|
|
2830
|
+
"interfaces": { ...library, operation: "interfaces", input: "library.interfaces", output: "library.interfaces", facades: [{ path: "library.interfaces", kind: "direct" }] },
|
|
2831
|
+
"collections": { ...library, operation: "collections", input: "library.collections", output: "library.collections", facades: [{ path: "library.collections", kind: "direct" }] },
|
|
2832
|
+
"bookmark": { ...library, access: "contribute", idempotency: "host-defined", operation: "bookmark", input: "library.bookmark", output: "library.bookmark", facades: [{ path: "library.bookmark", kind: "direct" }] },
|
|
2833
|
+
"bookmarked": { ...library, operation: "bookmarked", input: "library.bookmarked", output: "library.bookmarked", facades: [{ path: "library.bookmarked", kind: "direct" }] },
|
|
2834
|
+
"prefetch": { ...library, operation: "prefetch", input: "library.prefetch", output: "library.prefetch", sdkTimeoutMs: operationWaiting.library.prefetch, facades: [{ path: "library.prefetch", kind: "direct" }] }
|
|
2835
|
+
};
|
|
2836
|
+
var libraryOperations = Object.keys(libraryOperationDefinitions);
|
|
2837
|
+
|
|
2838
|
+
// src/host-operations.ts
|
|
2839
|
+
var host = { ...operationDefaults, capability: "experiences", transport: "host-document", sdkTimeoutMs: operationWaiting.experiences.host };
|
|
2840
|
+
var hostOperationDefinitions = {
|
|
2841
|
+
"host.configure": { ...host, operation: "host.configure", input: "experiences.host.configure", output: "experiences.host.configure", facades: [{ path: "host.configure", kind: "direct" }] },
|
|
2842
|
+
"host.navigate": {
|
|
2843
|
+
...host,
|
|
2844
|
+
operation: "host.navigate",
|
|
2845
|
+
input: "experiences.host.navigate",
|
|
2846
|
+
output: "experiences.host.navigate",
|
|
2847
|
+
facades: [{ path: "host.next", kind: "composite" }, { path: "host.previous", kind: "composite" }, { path: "host.goTo", kind: "composite" }, { path: "host.reload", kind: "composite" }]
|
|
2848
|
+
},
|
|
2849
|
+
"host.items": { ...host, ...operationRead, operation: "host.items", input: "experiences.host.items", output: "experiences.host.items", facades: [{ path: "host.items", kind: "composite" }] }
|
|
2850
|
+
};
|
|
2851
|
+
var experiencesHostOperations = Object.keys(hostOperationDefinitions);
|
|
2852
|
+
|
|
2853
|
+
// src/experiences-operations.ts
|
|
2854
|
+
var experiences = { ...operationDefaults, capability: "experiences", transport: "host-document" };
|
|
2855
|
+
var experiencesOperationDefinitions = {
|
|
2856
|
+
"available": { ...experiences, ...operationRead, operation: "available", input: "experiences.available", output: "experiences.available", sdkTimeoutMs: operationWaiting.experiences.default, facades: [{ path: "experiences.available", kind: "composite" }] },
|
|
2857
|
+
"call": { ...experiences, operation: "call", input: "experiences.call", output: "experiences.call", sdkTimeoutMs: operationWaiting.experiences.call, facades: [{ path: "experiences.call", kind: "composite" }] },
|
|
2858
|
+
"open": { ...experiences, ...operationRead, operation: "open", input: "experiences.open", output: "experiences.open", sdkTimeoutMs: operationWaiting.experiences.open, facades: [{ path: "experiences.open", kind: "composite" }] },
|
|
2859
|
+
"handle": { ...experiences, operation: "handle", input: "experiences.handle", output: "experiences.handle", sdkTimeoutMs: operationWaiting.experiences.handle, facades: [{ path: "experiences.handle", kind: "composite" }] },
|
|
2860
|
+
"pick": { ...experiences, operation: "pick", input: "experiences.pick", output: "experiences.pick", sdkTimeoutMs: operationWaiting.experiences.pick, facades: [{ path: "experiences.pick", kind: "composite" }] },
|
|
2861
|
+
...hostOperationDefinitions
|
|
2862
|
+
};
|
|
2863
|
+
var experiencesOperations = Object.keys(experiencesOperationDefinitions);
|
|
2864
|
+
|
|
2865
|
+
// src/search-operations.ts
|
|
2866
|
+
var reads = { ...operationDefaults, sdkTimeoutMs: operationWaiting.default, rateBucket: "experience-search" };
|
|
2867
|
+
var writes = { ...operationDefaults, sdkTimeoutMs: operationWaiting.default, rateBucket: "experience-search-writes" };
|
|
2868
|
+
var facades = [{ path: "search.index", kind: "composite" }];
|
|
2869
|
+
var searchOperationDefinitions = {
|
|
2870
|
+
"save": { ...writes, capability: "search", operation: "save", input: "search.save", output: "search.save", idempotency: "compare-and-set", facades },
|
|
2871
|
+
"patch": { ...writes, capability: "search", operation: "patch", input: "search.patch", output: "search.patch", idempotency: "compare-and-set", facades },
|
|
2872
|
+
"remove": { ...writes, capability: "search", operation: "remove", input: "search.remove", output: "search.remove", facades },
|
|
2873
|
+
"visibility": { ...writes, capability: "search", operation: "visibility", input: "search.visibility", output: "search.visibility", facades },
|
|
2874
|
+
"locate": { ...writes, capability: "search", operation: "locate", input: "search.locate", output: "search.locate", facades },
|
|
2875
|
+
"mine": { ...reads, ...operationRead, capability: "search", operation: "mine", input: "search.mine", output: "search.mine", facades },
|
|
2876
|
+
"query": { ...reads, ...publicRead, capability: "search", operation: "query", input: "search.query", output: "search.query", facades },
|
|
2877
|
+
"get": { ...reads, ...publicRead, capability: "search", operation: "get", input: "search.get", output: "search.get", facades },
|
|
2878
|
+
"similar": { ...reads, ...publicRead, capability: "search", operation: "similar", input: "search.similar", output: "search.similar", facades },
|
|
2879
|
+
"forMe": { ...reads, ...operationRead, capability: "search", operation: "forMe", input: "search.forMe", output: "search.forMe", facades },
|
|
2880
|
+
"mark": { ...writes, capability: "search", operation: "mark", input: "search.mark", output: "search.mark", facades },
|
|
2881
|
+
"unmark": { ...writes, capability: "search", operation: "unmark", input: "search.unmark", output: "search.unmark", facades },
|
|
2882
|
+
"marks": { ...reads, ...operationRead, capability: "search", operation: "marks", input: "search.marks", output: "search.marks", facades },
|
|
2883
|
+
"block": { ...writes, capability: "search", operation: "block", input: "search.block", output: "search.block", facades },
|
|
2884
|
+
"unblock": { ...writes, capability: "search", operation: "unblock", input: "search.unblock", output: "search.unblock", facades },
|
|
2885
|
+
"upsert": { ...writes, capability: "search", operation: "upsert", input: "search.upsert", output: "search.upsert", idempotency: "compare-and-set", facades: [] },
|
|
2886
|
+
"delete": { ...writes, capability: "search", operation: "delete", input: "search.delete", output: "search.delete", facades: [] }
|
|
2887
|
+
};
|
|
2888
|
+
var searchOperations = Object.keys(searchOperationDefinitions);
|
|
2889
|
+
var searchBackendOnlyOperations = ["upsert", "delete"];
|
|
2890
|
+
var searchFrontendOperations = searchOperations.filter((operation) => !searchBackendOnlyOperations.includes(operation));
|
|
2891
|
+
|
|
2892
|
+
// src/machine-operations.ts
|
|
2893
|
+
var waits = operationWaiting.machine;
|
|
2894
|
+
var machine = { ...operationDefaults, sdkTimeoutMs: waits.default, rateBucket: "experience-machine" };
|
|
2895
|
+
var stream = { ...machine, transport: "machine-host" };
|
|
2896
|
+
var workspace = { ...machine, rateBucket: "experience-machine-workspace" };
|
|
2897
|
+
var machineOperationDefinitions = {
|
|
2898
|
+
"list": { ...machine, ...operationRead, capability: "machine", operation: "list", input: "machine.list", output: "machine.list", facades: [{ path: "machine.list", kind: "direct" }] },
|
|
2899
|
+
"connect": { ...machine, capability: "machine", operation: "connect", input: "machine.connect", output: "machine.connect", sdkTimeoutMs: waits.connect, facades: [{ path: "machine.connect", kind: "direct" }] },
|
|
2900
|
+
"revoke": { ...machine, capability: "machine", operation: "revoke", input: "machine.revoke", output: "machine.revoke", facades: [{ path: "machine.revoke", kind: "direct" }] },
|
|
2901
|
+
"terminal.sessions": { ...machine, ...operationRead, capability: "machine", operation: "terminal.sessions", input: "machine.terminal.sessions", output: "machine.terminal.sessions", facades: [{ path: "machine.terminal.sessions", kind: "direct" }] },
|
|
2902
|
+
"terminal.create": { ...machine, capability: "machine", operation: "terminal.create", input: "machine.terminal.create", output: "machine.terminal.create", facades: [{ path: "machine.terminal.create", kind: "direct" }] },
|
|
2903
|
+
"terminal.close": { ...machine, capability: "machine", operation: "terminal.close", input: "machine.terminal.close", output: "machine.terminal.close", facades: [{ path: "machine.terminal.close", kind: "direct" }] },
|
|
2904
|
+
"terminal.rename": { ...machine, capability: "machine", operation: "terminal.rename", input: "machine.terminal.rename", output: "machine.terminal.rename", facades: [{ path: "machine.terminal.rename", kind: "direct" }] },
|
|
2905
|
+
"terminal.attach": { ...stream, capability: "machine", operation: "terminal.attach", input: "machine.terminal.attach", output: "machine.terminal.attach", sdkTimeoutMs: waits["terminal.attach"], facades: [{ path: "machine.terminal.attach", kind: "composite" }] },
|
|
2906
|
+
"terminal.watch": { ...stream, capability: "machine", operation: "terminal.watch", input: "machine.terminal.watch", output: "machine.terminal.watch", sdkTimeoutMs: waits["terminal.watch"], facades: [{ path: "machine.terminal.watch", kind: "composite" }] },
|
|
2907
|
+
"workspace.roots": { ...workspace, ...operationRead, capability: "machine", operation: "workspace.roots", input: "machine.workspace.roots", output: "machine.workspace.roots", facades: [{ path: "machine.workspace.roots", kind: "direct" }] },
|
|
2908
|
+
"workspace.discover": { ...workspace, ...operationRead, capability: "machine", operation: "workspace.discover", input: "machine.workspace.discover", output: "machine.workspace.discover", facades: [{ path: "machine.workspace.discover", kind: "direct" }] },
|
|
2909
|
+
"workspace.requestRoot": { ...workspace, capability: "machine", operation: "workspace.requestRoot", input: "machine.workspace.requestRoot", output: "machine.workspace.requestRoot", sdkTimeoutMs: waits["workspace.requestRoot"], facades: [{ path: "machine.workspace.requestRoot", kind: "direct" }] },
|
|
2910
|
+
"files.list": { ...workspace, ...operationRead, capability: "machine", operation: "files.list", input: "machine.files.list", output: "machine.files.list", facades: [{ path: "machine.files.list", kind: "direct" }] },
|
|
2911
|
+
"files.stat": { ...workspace, ...operationRead, capability: "machine", operation: "files.stat", input: "machine.files.stat", output: "machine.files.stat", facades: [{ path: "machine.files.stat", kind: "direct" }] },
|
|
2912
|
+
"files.read": { ...workspace, ...operationRead, capability: "machine", operation: "files.read", input: "machine.files.read", output: "machine.files.read", facades: [{ path: "machine.files.read", kind: "direct" }] },
|
|
2913
|
+
"files.write": { ...workspace, capability: "machine", operation: "files.write", input: "machine.files.write", output: "machine.files.write", facades: [{ path: "machine.files.write", kind: "direct" }] },
|
|
2914
|
+
"files.mkdir": { ...workspace, capability: "machine", operation: "files.mkdir", input: "machine.files.mkdir", output: "machine.files.mkdir", facades: [{ path: "machine.files.mkdir", kind: "direct" }] },
|
|
2915
|
+
"files.move": { ...workspace, capability: "machine", operation: "files.move", input: "machine.files.move", output: "machine.files.move", facades: [{ path: "machine.files.move", kind: "direct" }] },
|
|
2916
|
+
"files.trash": { ...workspace, capability: "machine", operation: "files.trash", input: "machine.files.trash", output: "machine.files.trash", facades: [{ path: "machine.files.trash", kind: "direct" }] },
|
|
2917
|
+
"files.find": { ...workspace, ...operationRead, capability: "machine", operation: "files.find", input: "machine.files.find", output: "machine.files.find", facades: [{ path: "machine.files.find", kind: "direct" }] },
|
|
2918
|
+
"files.search": { ...workspace, ...operationRead, capability: "machine", operation: "files.search", input: "machine.files.search", output: "machine.files.search", sdkTimeoutMs: waits["files.search"], facades: [{ path: "machine.files.search", kind: "direct" }] },
|
|
2919
|
+
"files.tree": { ...workspace, ...operationRead, capability: "machine", operation: "files.tree", input: "machine.files.tree", output: "machine.files.tree", sdkTimeoutMs: waits["files.tree"], facades: [{ path: "machine.files.tree", kind: "direct" }] },
|
|
2920
|
+
"git.status": { ...workspace, ...operationRead, capability: "machine", operation: "git.status", input: "machine.git.status", output: "machine.git.status", facades: [{ path: "machine.git.status", kind: "direct" }] },
|
|
2921
|
+
"git.diff": { ...workspace, ...operationRead, capability: "machine", operation: "git.diff", input: "machine.git.diff", output: "machine.git.diff", facades: [{ path: "machine.git.diff", kind: "direct" }] },
|
|
2922
|
+
"git.log": { ...workspace, ...operationRead, capability: "machine", operation: "git.log", input: "machine.git.log", output: "machine.git.log", facades: [{ path: "machine.git.log", kind: "direct" }] },
|
|
2923
|
+
"git.show": { ...workspace, ...operationRead, capability: "machine", operation: "git.show", input: "machine.git.show", output: "machine.git.show", facades: [{ path: "machine.git.show", kind: "direct" }] },
|
|
2924
|
+
"git.branches": { ...workspace, ...operationRead, capability: "machine", operation: "git.branches", input: "machine.git.branches", output: "machine.git.branches", facades: [{ path: "machine.git.branches", kind: "direct" }] },
|
|
2925
|
+
"git.stage": { ...workspace, capability: "machine", operation: "git.stage", input: "machine.git.stage", output: "machine.git.stage", facades: [{ path: "machine.git.stage", kind: "direct" }] },
|
|
2926
|
+
"git.unstage": { ...workspace, capability: "machine", operation: "git.unstage", input: "machine.git.unstage", output: "machine.git.unstage", facades: [{ path: "machine.git.unstage", kind: "direct" }] },
|
|
2927
|
+
"git.discard": { ...workspace, capability: "machine", operation: "git.discard", input: "machine.git.discard", output: "machine.git.discard", facades: [{ path: "machine.git.discard", kind: "direct" }] },
|
|
2928
|
+
"git.commit": { ...workspace, capability: "machine", operation: "git.commit", input: "machine.git.commit", output: "machine.git.commit", sdkTimeoutMs: waits["git.commit"], facades: [{ path: "machine.git.commit", kind: "direct" }] },
|
|
2929
|
+
"git.checkout": { ...workspace, capability: "machine", operation: "git.checkout", input: "machine.git.checkout", output: "machine.git.checkout", sdkTimeoutMs: waits["git.checkout"], facades: [{ path: "machine.git.checkout", kind: "direct" }] },
|
|
2930
|
+
"git.fetch": { ...workspace, capability: "machine", operation: "git.fetch", input: "machine.git.fetch", output: "machine.git.fetch", sdkTimeoutMs: waits["git.fetch"], facades: [{ path: "machine.git.fetch", kind: "direct" }] },
|
|
2931
|
+
"agents.capabilities": { ...workspace, ...operationRead, capability: "machine", operation: "agents.capabilities", input: "machine.agents.capabilities", output: "machine.agents.capabilities", facades: [{ path: "machine.agents.capabilities", kind: "direct" }] },
|
|
2932
|
+
"agents.list": { ...workspace, ...operationRead, capability: "machine", operation: "agents.list", input: "machine.agents.list", output: "machine.agents.list", facades: [{ path: "machine.agents.list", kind: "direct" }] },
|
|
2933
|
+
"agents.read": { ...workspace, ...operationRead, capability: "machine", operation: "agents.read", input: "machine.agents.read", output: "machine.agents.read", facades: [{ path: "machine.agents.read", kind: "direct" }] },
|
|
2934
|
+
"agents.events": { ...workspace, ...operationRead, capability: "machine", operation: "agents.events", input: "machine.agents.events", output: "machine.agents.events", sdkTimeoutMs: waits["agents.events"], facades: [{ path: "machine.agents.events", kind: "direct" }] },
|
|
2935
|
+
"agents.item": { ...workspace, ...operationRead, capability: "machine", operation: "agents.item", input: "machine.agents.item", output: "machine.agents.item", facades: [{ path: "machine.agents.item", kind: "direct" }] },
|
|
2936
|
+
"agents.start": { ...workspace, capability: "machine", operation: "agents.start", input: "machine.agents.start", output: "machine.agents.start", sdkTimeoutMs: waits["agents.start"], facades: [{ path: "machine.agents.start", kind: "direct" }] },
|
|
2937
|
+
"agents.send": { ...workspace, capability: "machine", operation: "agents.send", input: "machine.agents.send", output: "machine.agents.send", facades: [{ path: "machine.agents.send", kind: "direct" }] },
|
|
2938
|
+
"agents.configure": { ...workspace, capability: "machine", operation: "agents.configure", input: "machine.agents.configure", output: "machine.agents.configure", facades: [{ path: "machine.agents.configure", kind: "direct" }] },
|
|
2939
|
+
"agents.interrupt": { ...workspace, capability: "machine", operation: "agents.interrupt", input: "machine.agents.interrupt", output: "machine.agents.interrupt", facades: [{ path: "machine.agents.interrupt", kind: "direct" }] },
|
|
2940
|
+
"agents.respond": { ...workspace, capability: "machine", operation: "agents.respond", input: "machine.agents.respond", output: "machine.agents.respond", facades: [{ path: "machine.agents.respond", kind: "direct" }] },
|
|
2941
|
+
"agents.rename": { ...workspace, capability: "machine", operation: "agents.rename", input: "machine.agents.rename", output: "machine.agents.rename", facades: [{ path: "machine.agents.rename", kind: "direct" }] },
|
|
2942
|
+
"agents.close": { ...workspace, capability: "machine", operation: "agents.close", input: "machine.agents.close", output: "machine.agents.close", facades: [{ path: "machine.agents.close", kind: "direct" }] }
|
|
2943
|
+
};
|
|
2944
|
+
var machineOperations = Object.keys(machineOperationDefinitions);
|
|
2945
|
+
|
|
2946
|
+
// src/places-operations.ts
|
|
2947
|
+
var placesOperationDefinitions = {
|
|
2948
|
+
list: {
|
|
2949
|
+
...operationDefaults,
|
|
2950
|
+
...operationRead,
|
|
2951
|
+
capability: "places",
|
|
2952
|
+
operation: "list",
|
|
2953
|
+
input: "places.list",
|
|
2954
|
+
output: "places.list",
|
|
2955
|
+
sdkTimeoutMs: operationWaiting.default,
|
|
2956
|
+
facades: [{ path: "places.list", kind: "direct" }]
|
|
2957
|
+
},
|
|
2958
|
+
publish: {
|
|
2959
|
+
...operationDefaults,
|
|
2960
|
+
capability: "places",
|
|
2961
|
+
operation: "publish",
|
|
2962
|
+
input: "places.publish",
|
|
2963
|
+
output: "places.publish",
|
|
2964
|
+
sdkTimeoutMs: operationWaiting.default,
|
|
2965
|
+
facades: [{ path: "places.publish", kind: "direct" }]
|
|
2966
|
+
},
|
|
2967
|
+
remove: {
|
|
2968
|
+
...operationDefaults,
|
|
2969
|
+
capability: "places",
|
|
2970
|
+
operation: "remove",
|
|
2971
|
+
input: "places.remove",
|
|
2972
|
+
output: "places.remove",
|
|
2973
|
+
sdkTimeoutMs: operationWaiting.default,
|
|
2974
|
+
facades: [{ path: "places.remove", kind: "direct" }]
|
|
2975
|
+
}
|
|
2976
|
+
};
|
|
2977
|
+
|
|
2978
|
+
// src/excerpts-operations.ts
|
|
2979
|
+
var excerptsOperationDefinitions = {
|
|
2980
|
+
list: {
|
|
2981
|
+
...operationDefaults,
|
|
2982
|
+
...operationRead,
|
|
2983
|
+
capability: "excerpts",
|
|
2984
|
+
operation: "list",
|
|
2985
|
+
input: "excerpts.list",
|
|
2986
|
+
output: "excerpts.list",
|
|
2987
|
+
sdkTimeoutMs: operationWaiting.default,
|
|
2988
|
+
facades: [{ path: "excerpts.list", kind: "direct" }]
|
|
2989
|
+
},
|
|
2990
|
+
publish: {
|
|
2991
|
+
...operationDefaults,
|
|
2992
|
+
capability: "excerpts",
|
|
2993
|
+
operation: "publish",
|
|
2994
|
+
input: "excerpts.publish",
|
|
2995
|
+
output: "excerpts.publish",
|
|
2996
|
+
sdkTimeoutMs: operationWaiting.default,
|
|
2997
|
+
facades: [{ path: "excerpts.publish", kind: "direct" }]
|
|
2998
|
+
},
|
|
2999
|
+
remove: {
|
|
3000
|
+
...operationDefaults,
|
|
3001
|
+
capability: "excerpts",
|
|
3002
|
+
operation: "remove",
|
|
3003
|
+
input: "excerpts.remove",
|
|
3004
|
+
output: "excerpts.remove",
|
|
3005
|
+
sdkTimeoutMs: operationWaiting.default,
|
|
3006
|
+
facades: [{ path: "excerpts.remove", kind: "direct" }]
|
|
3007
|
+
}
|
|
3008
|
+
};
|
|
3009
|
+
|
|
3010
|
+
// src/profiles-operations.ts
|
|
3011
|
+
var profiles = { ...operationDefaults, ...publicRead, capability: "profiles" };
|
|
3012
|
+
var profilesOperationDefinitions = {
|
|
3013
|
+
me: {
|
|
3014
|
+
...profiles,
|
|
3015
|
+
operation: "me",
|
|
3016
|
+
input: "profiles.me",
|
|
3017
|
+
output: "profiles.me",
|
|
3018
|
+
sdkTimeoutMs: operationWaiting.profiles.default,
|
|
3019
|
+
facades: [{ path: "profiles.me", kind: "direct" }]
|
|
3020
|
+
},
|
|
3021
|
+
get: {
|
|
3022
|
+
...profiles,
|
|
3023
|
+
operation: "get",
|
|
3024
|
+
input: "profiles.get",
|
|
3025
|
+
output: "profiles.get",
|
|
3026
|
+
sdkTimeoutMs: operationWaiting.profiles.get,
|
|
3027
|
+
facades: [{ path: "profiles.get", kind: "direct" }]
|
|
3028
|
+
}
|
|
3029
|
+
};
|
|
3030
|
+
var profilesOperations = Object.keys(profilesOperationDefinitions);
|
|
3031
|
+
|
|
3032
|
+
// src/capability-operations.ts
|
|
3033
|
+
var capabilityOperations = {
|
|
3034
|
+
automations: automationsOperationDefinitions,
|
|
3035
|
+
connectors: connectorsOperationDefinitions,
|
|
3036
|
+
backend: backendOperationDefinitions,
|
|
3037
|
+
ai: aiOperationDefinitions,
|
|
3038
|
+
assets: assetsOperationDefinitions,
|
|
3039
|
+
video: videoOperationDefinitions,
|
|
3040
|
+
hardware: hardwareOperationDefinitions,
|
|
3041
|
+
network: networkOperationDefinitions,
|
|
3042
|
+
multiplayer: multiplayerOperationDefinitions,
|
|
3043
|
+
device: deviceOperationDefinitions,
|
|
3044
|
+
presence: presenceOperationDefinitions,
|
|
3045
|
+
notifications: notificationsOperationDefinitions,
|
|
3046
|
+
inbox: inboxOperationDefinitions,
|
|
3047
|
+
email: emailOperationDefinitions,
|
|
3048
|
+
drive: driveOperationDefinitions,
|
|
3049
|
+
link: linkOperationDefinitions,
|
|
3050
|
+
library: libraryOperationDefinitions,
|
|
3051
|
+
experiences: experiencesOperationDefinitions,
|
|
3052
|
+
search: searchOperationDefinitions,
|
|
3053
|
+
machine: machineOperationDefinitions,
|
|
3054
|
+
places: placesOperationDefinitions,
|
|
3055
|
+
excerpts: excerptsOperationDefinitions,
|
|
3056
|
+
profiles: profilesOperationDefinitions
|
|
3057
|
+
};
|
|
3058
|
+
var capabilityOperationList = Object.values(capabilityOperations).flatMap((group) => Object.values(group));
|
|
3059
|
+
var storageEntries = storageOperationList.map((item) => ({ ...operationDefaults, ...item }));
|
|
3060
|
+
var operationList = [...storageEntries, ...capabilityOperationList];
|
|
3061
|
+
function findOperation(capability, operation) {
|
|
3062
|
+
return operationList.find((item) => item.capability === capability && item.operation === operation);
|
|
3063
|
+
}
|
|
3064
|
+
var mediaEntries = capabilityOperationList.filter((item) => item.mediaUsage);
|
|
3065
|
+
var operationId = (item) => `${item.capability}.${item.operation}`;
|
|
3066
|
+
var mediaUsageOperationIds = [...mediaUsageNeeds, ...mediaEntries.map(operationId)];
|
|
3067
|
+
var mediaInvocationOperationIds = operationList.filter((item) => item.capability === "assets" || item.capability === "video" || item.capability === "ai" && item.needs === aiOperationDefinitions.generate.needs).map((item) => `${item.capability}.${item.operation}`);
|
|
3068
|
+
var networkOperationIds = Object.values(networkOperationDefinitions).map((item) => `${item.capability}.${item.operation}`);
|
|
3069
|
+
var audioEntries = Object.values(hardwareOperationDefinitions).filter((item) => item.rateBucket === "hardware-audio");
|
|
3070
|
+
var networkEntries = Object.values(hardwareOperationDefinitions).filter((item) => item.rateBucket === "hardware-network");
|
|
3071
|
+
var desktopEntries = Object.values(hardwareOperationDefinitions).filter((item) => item.rateBucket === "hardware-desktop");
|
|
3072
|
+
var suffix = (prefix2, operation) => operation.slice(prefix2.length);
|
|
3073
|
+
var hardwareAudioOperationNames = audioEntries.map((item) => suffix("audio.", item.operation));
|
|
3074
|
+
var hardwareNetworkOperationNames = networkEntries.map((item) => suffix("network.", item.operation));
|
|
3075
|
+
var hardwareDesktopOperationNames = desktopEntries.map((item) => suffix("desktop.", item.operation));
|
|
3076
|
+
|
|
3077
|
+
// src/capability-deadlines.ts
|
|
3078
|
+
var capabilityDeadlines = {
|
|
3079
|
+
default: operationWaiting.default,
|
|
3080
|
+
access: operationWaiting.access,
|
|
3081
|
+
spaces: operationWaiting.spaces,
|
|
3082
|
+
screens: operationWaiting.screens,
|
|
3083
|
+
multiplayer: operationWaiting.multiplayer,
|
|
3084
|
+
network: operationWaiting.network,
|
|
3085
|
+
assets: { default: operationWaiting.assets.default, uploadAttachment: assetsOperationDefinitions.uploadAttachment.sdkTimeoutMs, media: operationWaiting.assets.media },
|
|
3086
|
+
video: { default: operationWaiting.video.default, "clipping.uploadSource": videoOperationDefinitions["clipping.uploadSource"].sdkTimeoutMs, media: operationWaiting.video.media },
|
|
3087
|
+
hardware: { default: operationWaiting.hardware.default, "audio.transcribe": hardwareOperationDefinitions["audio.transcribe"].sdkTimeoutMs },
|
|
3088
|
+
ai: { default: operationWaiting.ai.default, decide: aiOperationDefinitions.decide.sdkTimeoutMs, "voice.start": aiOperationDefinitions["voice.start"].sdkTimeoutMs, "voice.state": aiOperationDefinitions["voice.state"].sdkTimeoutMs },
|
|
3089
|
+
device: {
|
|
3090
|
+
default: operationWaiting.device.default,
|
|
3091
|
+
availability: deviceOperationDefinitions.availability.sdkTimeoutMs,
|
|
3092
|
+
"haptics.trigger": deviceOperationDefinitions["haptics.trigger"].sdkTimeoutMs,
|
|
3093
|
+
"haptics.pattern": deviceOperationDefinitions["haptics.pattern"].sdkTimeoutMs,
|
|
3094
|
+
"haptics.stop": deviceOperationDefinitions["haptics.stop"].sdkTimeoutMs,
|
|
3095
|
+
"motion.unsubscribe": deviceOperationDefinitions["motion.unsubscribe"].sdkTimeoutMs,
|
|
3096
|
+
"camera.stream": deviceOperationDefinitions["camera.stream"].sdkTimeoutMs,
|
|
3097
|
+
"microphone.stream": deviceOperationDefinitions["microphone.stream"].sdkTimeoutMs,
|
|
3098
|
+
"notifications.list": deviceOperationDefinitions["notifications.list"].sdkTimeoutMs,
|
|
3099
|
+
"notifications.cancel": deviceOperationDefinitions["notifications.cancel"].sdkTimeoutMs,
|
|
3100
|
+
"alarms.list": deviceOperationDefinitions["alarms.list"].sdkTimeoutMs,
|
|
3101
|
+
"alarms.cancel": deviceOperationDefinitions["alarms.cancel"].sdkTimeoutMs
|
|
3102
|
+
},
|
|
3103
|
+
notifications: {
|
|
3104
|
+
default: operationWaiting.notifications.default,
|
|
3105
|
+
send: notificationsOperationDefinitions.send.sdkTimeoutMs,
|
|
3106
|
+
schedule: notificationsOperationDefinitions.schedule.sdkTimeoutMs,
|
|
3107
|
+
cancel: notificationsOperationDefinitions.cancel.sdkTimeoutMs,
|
|
3108
|
+
list: notificationsOperationDefinitions.list.sdkTimeoutMs
|
|
3109
|
+
},
|
|
3110
|
+
inbox: { default: operationWaiting.inbox.default, list: inboxOperationDefinitions.list.sdkTimeoutMs, ack: inboxOperationDefinitions.ack.sdkTimeoutMs },
|
|
3111
|
+
email: { default: operationWaiting.email.default, send: emailOperationDefinitions.send.sdkTimeoutMs },
|
|
3112
|
+
drive: { default: operationWaiting.drive.default, save: driveOperationDefinitions.save.sdkTimeoutMs, pick: driveOperationDefinitions.pick.sdkTimeoutMs },
|
|
3113
|
+
machine: {
|
|
3114
|
+
default: operationWaiting.machine.default,
|
|
3115
|
+
connect: machineOperationDefinitions.connect.sdkTimeoutMs,
|
|
3116
|
+
"terminal.attach": machineOperationDefinitions["terminal.attach"].sdkTimeoutMs,
|
|
3117
|
+
"terminal.watch": machineOperationDefinitions["terminal.watch"].sdkTimeoutMs,
|
|
3118
|
+
"workspace.requestRoot": machineOperationDefinitions["workspace.requestRoot"].sdkTimeoutMs,
|
|
3119
|
+
"files.search": machineOperationDefinitions["files.search"].sdkTimeoutMs,
|
|
3120
|
+
"files.tree": machineOperationDefinitions["files.tree"].sdkTimeoutMs,
|
|
3121
|
+
"git.commit": machineOperationDefinitions["git.commit"].sdkTimeoutMs,
|
|
3122
|
+
"git.fetch": machineOperationDefinitions["git.fetch"].sdkTimeoutMs,
|
|
3123
|
+
"git.checkout": machineOperationDefinitions["git.checkout"].sdkTimeoutMs,
|
|
3124
|
+
"agents.start": machineOperationDefinitions["agents.start"].sdkTimeoutMs,
|
|
3125
|
+
"agents.events": machineOperationDefinitions["agents.events"].sdkTimeoutMs
|
|
3126
|
+
},
|
|
3127
|
+
navigation: operationWaiting.navigation,
|
|
3128
|
+
library: {
|
|
3129
|
+
default: operationWaiting.library.default,
|
|
3130
|
+
icons: libraryOperationDefinitions.icons.sdkTimeoutMs,
|
|
3131
|
+
avatars: libraryOperationDefinitions.avatars.sdkTimeoutMs,
|
|
3132
|
+
open: libraryOperationDefinitions.open.sdkTimeoutMs,
|
|
3133
|
+
prefetch: libraryOperationDefinitions.prefetch.sdkTimeoutMs
|
|
3134
|
+
},
|
|
3135
|
+
experiences: {
|
|
3136
|
+
default: operationWaiting.experiences.default,
|
|
3137
|
+
call: experiencesOperationDefinitions.call.sdkTimeoutMs,
|
|
3138
|
+
handle: experiencesOperationDefinitions.handle.sdkTimeoutMs,
|
|
3139
|
+
open: experiencesOperationDefinitions.open.sdkTimeoutMs,
|
|
3140
|
+
pick: experiencesOperationDefinitions.pick.sdkTimeoutMs,
|
|
3141
|
+
"host.configure": experiencesOperationDefinitions["host.configure"].sdkTimeoutMs,
|
|
3142
|
+
"host.navigate": experiencesOperationDefinitions["host.navigate"].sdkTimeoutMs,
|
|
3143
|
+
"host.items": experiencesOperationDefinitions["host.items"].sdkTimeoutMs
|
|
3144
|
+
},
|
|
3145
|
+
places: { default: operationWaiting.default, list: placesOperationDefinitions.list.sdkTimeoutMs, publish: placesOperationDefinitions.publish.sdkTimeoutMs, remove: placesOperationDefinitions.remove.sdkTimeoutMs },
|
|
3146
|
+
excerpts: { default: operationWaiting.default, list: excerptsOperationDefinitions.list.sdkTimeoutMs, publish: excerptsOperationDefinitions.publish.sdkTimeoutMs, remove: excerptsOperationDefinitions.remove.sdkTimeoutMs },
|
|
3147
|
+
profiles: { default: operationWaiting.profiles.default, me: profilesOperationDefinitions.me.sdkTimeoutMs, get: profilesOperationDefinitions.get.sdkTimeoutMs }
|
|
3148
|
+
};
|
|
3149
|
+
|
|
3150
|
+
// src/spaces-types.ts
|
|
3151
|
+
var TEAM_REF_PATTERN = /^t_[A-Za-z0-9_-]{43}$/;
|
|
3152
|
+
function isTeamRef(value) {
|
|
3153
|
+
return typeof value === "string" && TEAM_REF_PATTERN.test(value);
|
|
3154
|
+
}
|
|
3155
|
+
function isSpaceTeam(value) {
|
|
3156
|
+
return typeof value === "object" && value !== null && isTeamRef(value.ref) && typeof value.name === "string";
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
// src/protocol.ts
|
|
3160
|
+
var imageSizeByAspectRatio = {
|
|
3161
|
+
"1:1": "1024x1024",
|
|
3162
|
+
"3:2": "1536x1024",
|
|
3163
|
+
"2:3": "1024x1536",
|
|
3164
|
+
"16:9": "1536x864",
|
|
3165
|
+
"9:16": "864x1536",
|
|
3166
|
+
"4:3": "1536x1152",
|
|
3167
|
+
"3:4": "1152x1536"
|
|
3168
|
+
};
|
|
3169
|
+
|
|
3170
|
+
// src/capabilities.ts
|
|
3171
|
+
function deadlineMs(capability, operation, input2) {
|
|
3172
|
+
const record = input2 !== null && typeof input2 === "object" && !Array.isArray(input2) ? input2 : {};
|
|
3173
|
+
if (capability === "ai" && operation === "generate") {
|
|
3174
|
+
const need = typeof record.need === "string" ? record.need : "";
|
|
3175
|
+
const vision = Array.isArray(record.input_asset_ids) && record.input_asset_ids.length > 0;
|
|
3176
|
+
const base2 = Object.hasOwn(generationDeadlines, need) ? generationDeadlines[need] : generationWaiting.fallbackMs;
|
|
3177
|
+
return (vision && need.startsWith("text.") ? Math.max(base2, generationWaiting.visionTextMs) : base2) + generationWaiting.sdkMarginMs;
|
|
3178
|
+
}
|
|
3179
|
+
const registered = findOperation(capability, operation);
|
|
3180
|
+
if (registered?.sdkTimeoutMs != null) return registered.sdkTimeoutMs;
|
|
3181
|
+
const table = Object.hasOwn(capabilityDeadlines, capability) ? capabilityDeadlines[capability] : void 0;
|
|
3182
|
+
if (typeof table !== "object") return capabilityDeadlines.default;
|
|
3183
|
+
return (Object.hasOwn(table, operation) ? table[operation] : table.default) ?? capabilityDeadlines.default;
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
// src/fault.ts
|
|
3187
|
+
function invalid2(message) {
|
|
3188
|
+
return new NochaError("invalid_request", message);
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
// src/generation-input.ts
|
|
3192
|
+
var supportedNeeds = new Set(aiGenerateNeeds);
|
|
3193
|
+
var mediaNeeds = new Set(mediaResultNeeds);
|
|
3194
|
+
function isMicrocredits(value) {
|
|
3195
|
+
return typeof value === "string" && /^[1-9]\d*$/.test(value);
|
|
3196
|
+
}
|
|
3197
|
+
function isMediaNeed(need) {
|
|
3198
|
+
return mediaNeeds.has(need);
|
|
3199
|
+
}
|
|
3200
|
+
function text(value, field) {
|
|
3201
|
+
if (typeof value !== "string" || !value.trim()) throw invalid2(`${field} must be a non-empty string`);
|
|
3202
|
+
return value.trim();
|
|
3203
|
+
}
|
|
3204
|
+
function optionalString(value, field) {
|
|
3205
|
+
if (value !== void 0 && typeof value !== "string") throw invalid2(`${field} must be a string`);
|
|
3206
|
+
}
|
|
3207
|
+
var modelPattern = SPEECH_MODEL_ID_PATTERN;
|
|
3208
|
+
var voicePattern = SPEECH_VOICE_ID_PATTERN;
|
|
3209
|
+
var languagePattern = /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/;
|
|
3210
|
+
function matching(value, pattern, field) {
|
|
3211
|
+
if (typeof value !== "string" || !pattern.test(value)) throw invalid2(`${field} is not a valid identifier`);
|
|
3212
|
+
return value;
|
|
3213
|
+
}
|
|
3214
|
+
function optionalNumber(value, field) {
|
|
3215
|
+
if (value !== void 0 && (typeof value !== "number" || !Number.isFinite(value))) throw invalid2(`${field} must be a finite number`);
|
|
3216
|
+
}
|
|
3217
|
+
function assetIds(value, field, required) {
|
|
3218
|
+
if (value === void 0 && !required) return void 0;
|
|
3219
|
+
if (!Array.isArray(value) || !value.every(isUuid) || required && !value.length) throw invalid2(`${field} must list authorized asset ids`);
|
|
3220
|
+
return value;
|
|
3221
|
+
}
|
|
3222
|
+
function singleSource(value) {
|
|
3223
|
+
const ids = assetIds(value, "inputAssetIds", true);
|
|
3224
|
+
if (ids.length !== 1) throw invalid2("inputAssetIds must contain exactly one authorized source asset");
|
|
3225
|
+
return ids;
|
|
3226
|
+
}
|
|
3227
|
+
var voiceSettingFields = {
|
|
3228
|
+
stability: "stability",
|
|
3229
|
+
similarityBoost: "similarity_boost",
|
|
3230
|
+
style: "style",
|
|
3231
|
+
speed: "speed"
|
|
3232
|
+
};
|
|
3233
|
+
function voiceSettings(value) {
|
|
3234
|
+
if (value === void 0) return {};
|
|
3235
|
+
if (!isRecord(value)) throw invalid2("voiceSettings must be an object");
|
|
3236
|
+
const unknown = Object.entries(value).find(([key, setting]) => setting !== void 0 && key !== "useSpeakerBoost" && !Object.hasOwn(speechSettingRanges, key));
|
|
3237
|
+
if (unknown) throw invalid2(`voiceSettings.${unknown[0]} is not a voice setting`);
|
|
3238
|
+
const settings = {};
|
|
3239
|
+
for (const [key, field] of Object.entries(voiceSettingFields)) {
|
|
3240
|
+
const { min, max } = speechSettingRanges[key];
|
|
3241
|
+
const setting = value[key];
|
|
3242
|
+
if (setting === void 0) continue;
|
|
3243
|
+
if (typeof setting !== "number" || !Number.isFinite(setting) || setting < min || setting > max) throw invalid2(`voiceSettings.${key} must be a number from ${min} to ${max}`);
|
|
3244
|
+
settings[field] = setting;
|
|
3245
|
+
}
|
|
3246
|
+
if (value.useSpeakerBoost !== void 0) {
|
|
3247
|
+
if (typeof value.useSpeakerBoost !== "boolean") throw invalid2("voiceSettings.useSpeakerBoost must be a boolean");
|
|
3248
|
+
settings.use_speaker_boost = value.useSpeakerBoost;
|
|
3249
|
+
}
|
|
3250
|
+
return Object.keys(settings).length ? { voice_settings: settings } : {};
|
|
3251
|
+
}
|
|
3252
|
+
function responseFormat(schema, schemaName, fallback) {
|
|
3253
|
+
if (!isRecord(schema)) throw invalid2("schema must be a JSON schema object");
|
|
3254
|
+
optionalString(schemaName, "schemaName");
|
|
3255
|
+
return { type: "json_schema", name: schemaName ?? fallback, schema, strict: true };
|
|
3256
|
+
}
|
|
3257
|
+
function budget(input2) {
|
|
3258
|
+
if (input2.quoteId !== void 0 && !isUuid(input2.quoteId)) throw invalid2("quoteId must be a generation quote id");
|
|
3259
|
+
if (input2.maximumCostMicrocredits !== void 0 && !isMicrocredits(input2.maximumCostMicrocredits)) throw invalid2("maximumCostMicrocredits must be a positive integer string");
|
|
3260
|
+
return {
|
|
3261
|
+
...input2.quoteId ? { quote_id: input2.quoteId } : {},
|
|
3262
|
+
...input2.maximumCostMicrocredits !== void 0 ? { maximum_cost_microcredits: input2.maximumCostMicrocredits } : {}
|
|
3263
|
+
};
|
|
3264
|
+
}
|
|
3265
|
+
function policy(input2) {
|
|
3266
|
+
optionalString(input2.generationUsage, "generationUsage");
|
|
3267
|
+
return {
|
|
3268
|
+
...input2.effort !== void 0 ? { effort: input2.effort } : {},
|
|
3269
|
+
...input2.generationUsage ? { generation_usage: input2.generationUsage } : {},
|
|
3270
|
+
...budget(input2)
|
|
3271
|
+
};
|
|
3272
|
+
}
|
|
3273
|
+
function aiGenerateWire(input2) {
|
|
3274
|
+
if (!isRecord(input2) || typeof input2.need !== "string" || !supportedNeeds.has(input2.need)) throw invalid2("need must be a supported generation need");
|
|
3275
|
+
const value = input2;
|
|
3276
|
+
const need = value.need;
|
|
3277
|
+
switch (need) {
|
|
3278
|
+
case "text.short":
|
|
3279
|
+
case "text.chat":
|
|
3280
|
+
case "text.long":
|
|
3281
|
+
case "text.structured": {
|
|
3282
|
+
const ids = assetIds(value.inputAssetIds, "inputAssetIds", false);
|
|
3283
|
+
return {
|
|
3284
|
+
...policy(value),
|
|
3285
|
+
...value.desiredLength ? { desired_length: value.desiredLength } : {},
|
|
3286
|
+
prompt: text(value.prompt, "prompt"),
|
|
3287
|
+
need,
|
|
3288
|
+
...need === "text.structured" ? { response_format: responseFormat(value.schema, value.schemaName, "experience_analysis") } : {},
|
|
3289
|
+
...ids ? { input_asset_ids: ids } : {}
|
|
3290
|
+
};
|
|
3291
|
+
}
|
|
3292
|
+
case "web.research": {
|
|
3293
|
+
if (!Array.isArray(value.allowedDomains) || !value.allowedDomains.every((domain) => typeof domain === "string")) throw invalid2("allowedDomains must list hostnames");
|
|
3294
|
+
if (typeof value.maxToolCalls !== "number" || !Number.isInteger(value.maxToolCalls)) throw invalid2("maxToolCalls must be an integer");
|
|
3295
|
+
return {
|
|
3296
|
+
...policy(value),
|
|
3297
|
+
prompt: text(value.prompt, "prompt"),
|
|
3298
|
+
need,
|
|
3299
|
+
response_format: responseFormat(value.schema, value.schemaName, "web_research"),
|
|
3300
|
+
allowed_domains: value.allowedDomains.map((domain) => domain.trim().toLowerCase()),
|
|
3301
|
+
max_tool_calls: value.maxToolCalls
|
|
3302
|
+
};
|
|
3303
|
+
}
|
|
3304
|
+
case "audio.synthesize":
|
|
3305
|
+
if (value.share !== void 0 && value.share !== "experience") throw invalid2("share must be 'experience'");
|
|
3306
|
+
return {
|
|
3307
|
+
...policy(value),
|
|
3308
|
+
prompt: text(value.prompt, "prompt"),
|
|
3309
|
+
need,
|
|
3310
|
+
...value.language ? { language: matching(value.language, languagePattern, "language") } : {},
|
|
3311
|
+
...value.voice ? { voice_id: matching(value.voice, voicePattern, "voice") } : {},
|
|
3312
|
+
...value.model !== void 0 ? { model: matching(value.model, modelPattern, "model") } : {},
|
|
3313
|
+
...voiceSettings(value.voiceSettings),
|
|
3314
|
+
...value.share !== void 0 ? { share: value.share } : {}
|
|
3315
|
+
};
|
|
3316
|
+
case "audio.transcribe":
|
|
3317
|
+
if (value.audioDataUrl === void 0 && value.durationSeconds === void 0 && value.inputAssetIds === void 0) throw invalid2("audioDataUrl must be an audio data URL");
|
|
3318
|
+
if (value.audioDataUrl !== void 0 && (typeof value.audioDataUrl !== "string" || !value.audioDataUrl.startsWith("data:"))) throw invalid2("audioDataUrl must be an audio data URL");
|
|
3319
|
+
optionalNumber(value.durationSeconds, "durationSeconds");
|
|
3320
|
+
optionalString(value.language, "language");
|
|
3321
|
+
optionalString(value.prompt, "prompt");
|
|
3322
|
+
return {
|
|
3323
|
+
...policy(value),
|
|
3324
|
+
need,
|
|
3325
|
+
...value.audioDataUrl !== void 0 ? { audio_data_url: value.audioDataUrl } : {},
|
|
3326
|
+
...value.inputAssetIds !== void 0 ? { input_asset_ids: singleSource(value.inputAssetIds) } : {},
|
|
3327
|
+
...value.durationSeconds !== void 0 ? { duration_seconds: value.durationSeconds } : {},
|
|
3328
|
+
...value.language ? { language: value.language } : {},
|
|
3329
|
+
...value.prompt ? { prompt: value.prompt } : {},
|
|
3330
|
+
...value.model !== void 0 ? { model: matching(value.model, modelPattern, "model") } : {}
|
|
3331
|
+
};
|
|
3332
|
+
case "audio.generate":
|
|
3333
|
+
optionalNumber(value.durationSeconds, "durationSeconds");
|
|
3334
|
+
if (value.instrumental !== void 0 && typeof value.instrumental !== "boolean") throw invalid2("instrumental must be a boolean");
|
|
3335
|
+
if (value.instrumental && value.lyrics != null) throw invalid2("An instrumental track takes no lyrics");
|
|
3336
|
+
return {
|
|
3337
|
+
...policy(value),
|
|
3338
|
+
need,
|
|
3339
|
+
prompt: text(value.prompt, "prompt"),
|
|
3340
|
+
duration_seconds: value.durationSeconds ?? 60,
|
|
3341
|
+
output_format: value.outputFormat ?? "mp3",
|
|
3342
|
+
...value.instrumental !== void 0 ? { instrumental: value.instrumental } : {},
|
|
3343
|
+
...value.model !== void 0 ? { model: matching(value.model, modelPattern, "model") } : {},
|
|
3344
|
+
...value.inputAssetIds !== void 0 ? { input_asset_ids: singleSource(value.inputAssetIds) } : {},
|
|
3345
|
+
...value.lyrics != null ? { lyrics: value.lyrics } : {},
|
|
3346
|
+
...value.seed != null ? { seed: value.seed } : {},
|
|
3347
|
+
...value.bpm != null ? { bpm: value.bpm } : {},
|
|
3348
|
+
...value.vocalLanguage != null ? { vocal_language: value.vocalLanguage } : {},
|
|
3349
|
+
...value.keyScale != null ? { key_scale: value.keyScale } : {},
|
|
3350
|
+
...value.timeSignature != null ? { time_signature: value.timeSignature } : {}
|
|
3351
|
+
};
|
|
3352
|
+
case "image.generate":
|
|
3353
|
+
case "image.edit": {
|
|
3354
|
+
const ids = assetIds(value.inputAssetIds, "inputAssetIds", need === "image.edit");
|
|
3355
|
+
if (value.size !== void 0 && value.aspectRatio !== void 0 && imageSizeByAspectRatio[value.aspectRatio] !== value.size) throw invalid2("size conflicts with aspectRatio");
|
|
3356
|
+
if (value.background === "transparent" && value.outputFormat === "jpeg") throw invalid2("JPEG does not support a transparent background");
|
|
3357
|
+
return {
|
|
3358
|
+
...policy(value),
|
|
3359
|
+
prompt: text(value.prompt, "prompt"),
|
|
3360
|
+
need,
|
|
3361
|
+
...ids ? { input_asset_ids: ids } : {},
|
|
3362
|
+
...value.size ? { size: value.size } : {},
|
|
3363
|
+
...value.aspectRatio ? { aspect_ratio: value.aspectRatio } : {},
|
|
3364
|
+
...value.quality ? { quality: value.quality } : {},
|
|
3365
|
+
...value.outputFormat ? { output_format: value.outputFormat } : {},
|
|
3366
|
+
...value.background ? { background: value.background } : {}
|
|
3367
|
+
};
|
|
3368
|
+
}
|
|
3369
|
+
case "video.generate": {
|
|
3370
|
+
if (value.provider !== void 0) throw invalid2("video.generate does not accept provider");
|
|
3371
|
+
optionalNumber(value.durationSeconds, "durationSeconds");
|
|
3372
|
+
const durationSeconds = value.durationSeconds ?? 6;
|
|
3373
|
+
if (durationSeconds < 2 || durationSeconds > 30) throw invalid2("durationSeconds must be between 2 and 30 for video.generate");
|
|
3374
|
+
const frames = assetIds(value.inputAssetIds, "inputAssetIds", false);
|
|
3375
|
+
if (frames && (frames.length < 1 || frames.length > 2)) throw invalid2("inputAssetIds must list a first frame and at most a last frame");
|
|
3376
|
+
if (value.audio !== void 0 && typeof value.audio !== "boolean") throw invalid2("audio must be a boolean");
|
|
3377
|
+
return {
|
|
3378
|
+
...policy(value),
|
|
3379
|
+
prompt: text(value.prompt, "prompt"),
|
|
3380
|
+
need,
|
|
3381
|
+
duration_seconds: durationSeconds,
|
|
3382
|
+
...frames ? { input_asset_ids: frames } : {},
|
|
3383
|
+
...value.aspectRatio !== void 0 ? { aspect_ratio: value.aspectRatio } : {},
|
|
3384
|
+
...value.resolution !== void 0 ? { resolution: value.resolution } : {},
|
|
3385
|
+
...value.audio !== void 0 ? { audio: value.audio } : {},
|
|
3386
|
+
...value.model !== void 0 ? { model: matching(value.model, modelPattern, "model") } : {}
|
|
3387
|
+
};
|
|
3388
|
+
}
|
|
3389
|
+
case "image.remove_background":
|
|
3390
|
+
return { ...budget(value), input_asset_ids: singleSource(value.inputAssetIds), need, ...value.outputFormat ? { output_format: value.outputFormat } : {} };
|
|
3391
|
+
case "image.upscale":
|
|
3392
|
+
return {
|
|
3393
|
+
...budget(value),
|
|
3394
|
+
input_asset_ids: singleSource(value.inputAssetIds),
|
|
3395
|
+
need,
|
|
3396
|
+
...value.scale !== void 0 ? { scale: value.scale } : {},
|
|
3397
|
+
...value.outputFormat ? { output_format: value.outputFormat } : {}
|
|
3398
|
+
};
|
|
3399
|
+
case "audio.sound_effect":
|
|
3400
|
+
optionalNumber(value.durationSeconds, "durationSeconds");
|
|
3401
|
+
if (value.loop !== void 0 && typeof value.loop !== "boolean") throw invalid2("loop must be a boolean");
|
|
3402
|
+
return {
|
|
3403
|
+
...budget(value),
|
|
3404
|
+
need,
|
|
3405
|
+
prompt: text(value.prompt, "prompt"),
|
|
3406
|
+
duration_seconds: value.durationSeconds ?? 5,
|
|
3407
|
+
loop: value.loop ?? false,
|
|
3408
|
+
...value.model !== void 0 ? { model: matching(value.model, modelPattern, "model") } : {}
|
|
3409
|
+
};
|
|
3410
|
+
case "video.extend":
|
|
3411
|
+
optionalString(value.prompt, "prompt");
|
|
3412
|
+
optionalNumber(value.durationSeconds, "durationSeconds");
|
|
3413
|
+
return {
|
|
3414
|
+
...budget(value),
|
|
3415
|
+
input_asset_ids: singleSource(value.inputAssetIds),
|
|
3416
|
+
need,
|
|
3417
|
+
duration_seconds: value.durationSeconds ?? 5,
|
|
3418
|
+
...value.prompt !== void 0 ? { prompt: value.prompt } : {},
|
|
3419
|
+
...value.mode !== void 0 ? { mode: value.mode } : {}
|
|
3420
|
+
};
|
|
3421
|
+
case "video.upscale":
|
|
3422
|
+
return {
|
|
3423
|
+
...budget(value),
|
|
3424
|
+
input_asset_ids: singleSource(value.inputAssetIds),
|
|
3425
|
+
need,
|
|
3426
|
+
...value.resolution !== void 0 ? { resolution: value.resolution } : {},
|
|
3427
|
+
...value.fps !== void 0 ? { fps: value.fps } : {}
|
|
3428
|
+
};
|
|
3429
|
+
case "audio.voice_change":
|
|
3430
|
+
if (value.audioDataUrl === void 0 === (value.inputAssetIds === void 0)) throw invalid2("Provide one recording: audioDataUrl or inputAssetIds");
|
|
3431
|
+
if (value.audioDataUrl !== void 0 && (typeof value.audioDataUrl !== "string" || !value.audioDataUrl.startsWith("data:"))) throw invalid2("audioDataUrl must be an audio data URL");
|
|
3432
|
+
if (value.durationSeconds !== void 0) throw invalid2("durationSeconds is not accepted by audio.voice_change");
|
|
3433
|
+
if (value.voice === void 0) throw invalid2("voice is required by audio.voice_change");
|
|
3434
|
+
if (value.removeBackgroundNoise !== void 0 && typeof value.removeBackgroundNoise !== "boolean") throw invalid2("removeBackgroundNoise must be a boolean");
|
|
3435
|
+
return {
|
|
3436
|
+
...budget(value),
|
|
3437
|
+
need,
|
|
3438
|
+
...value.audioDataUrl !== void 0 ? { audio_data_url: value.audioDataUrl } : { input_asset_ids: singleSource(value.inputAssetIds) },
|
|
3439
|
+
voice_id: matching(value.voice, voicePattern, "voice"),
|
|
3440
|
+
...value.model !== void 0 ? { model: matching(value.model, modelPattern, "model") } : {},
|
|
3441
|
+
...voiceSettings(value.voiceSettings),
|
|
3442
|
+
...value.removeBackgroundNoise !== void 0 ? { remove_background_noise: value.removeBackgroundNoise } : {}
|
|
3443
|
+
};
|
|
3444
|
+
}
|
|
3445
|
+
}
|
|
3446
|
+
var decisionTypes = /* @__PURE__ */ new Set(["choice", "score", "noul"]);
|
|
3447
|
+
function aiDecideWire(input2) {
|
|
3448
|
+
if (!isRecord(input2) || !isRecord(input2.questions) || !Object.keys(input2.questions).length) throw invalid2("A decision needs at least one question");
|
|
3449
|
+
for (const [id, question] of Object.entries(input2.questions)) {
|
|
3450
|
+
if (!isRecord(question) || !decisionTypes.has(question.type) || typeof question.instructions !== "string" || !question.instructions.trim()) {
|
|
3451
|
+
throw invalid2(`Decision question ${id} needs a type and instructions`);
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
if (input2.maximumCostMicrocredits !== void 0 && !isMicrocredits(input2.maximumCostMicrocredits)) throw invalid2("maximumCostMicrocredits must be a positive integer string");
|
|
3455
|
+
return {
|
|
3456
|
+
state: input2.state,
|
|
3457
|
+
questions: input2.questions,
|
|
3458
|
+
...input2.maximumCostMicrocredits !== void 0 ? { maximum_cost_microcredits: input2.maximumCostMicrocredits } : {}
|
|
3459
|
+
};
|
|
3460
|
+
}
|
|
3461
|
+
function aiOptionsWire(input2) {
|
|
3462
|
+
if (!isRecord(input2) || typeof input2.need !== "string" || !supportedNeeds.has(input2.need)) throw invalid2("need must be a supported generation need");
|
|
3463
|
+
const ids = assetIds(input2.inputAssetIds, "inputAssetIds", false);
|
|
3464
|
+
optionalString(input2.generationUsage, "generationUsage");
|
|
3465
|
+
return { need: input2.need, ...ids ? { input_asset_ids: ids } : {}, ...input2.generationUsage ? { generation_usage: input2.generationUsage } : {} };
|
|
3466
|
+
}
|
|
3467
|
+
var modelNeeds = new Set(aiModelNeeds);
|
|
3468
|
+
function aiModelsWire(input2) {
|
|
3469
|
+
if (!isRecord(input2) || !modelNeeds.has(input2.need)) throw invalid2(`need must be one of ${aiModelNeeds.join(", ")}`);
|
|
3470
|
+
return { need: input2.need };
|
|
3471
|
+
}
|
|
3472
|
+
function facet(value, field) {
|
|
3473
|
+
return matching(value, VOICE_FACET_PATTERN, field);
|
|
3474
|
+
}
|
|
3475
|
+
function facetList(value, field) {
|
|
3476
|
+
if (!Array.isArray(value)) throw invalid2(`${field} must be an array of strings`);
|
|
3477
|
+
if (value.length > VOICE_FACET_LIST_MAX) throw invalid2(`${field} accepts at most ${VOICE_FACET_LIST_MAX} entries`);
|
|
3478
|
+
return value.map((entry, index) => facet(entry, `${field}[${index}]`));
|
|
3479
|
+
}
|
|
3480
|
+
function aiVoicesWire(input2) {
|
|
3481
|
+
const value = isRecord(input2) ? input2 : {};
|
|
3482
|
+
if (value.collection !== void 0 && !voiceCollections.includes(value.collection)) throw invalid2("collection must be standard, library or all");
|
|
3483
|
+
if (value.sort !== void 0 && !voiceSorts.includes(value.sort)) throw invalid2(`sort must be one of ${voiceSorts.join(", ")}`);
|
|
3484
|
+
if (value.featured !== void 0 && typeof value.featured !== "boolean") throw invalid2("featured must be a boolean");
|
|
3485
|
+
optionalString(value.query, "query");
|
|
3486
|
+
optionalString(value.cursor, "cursor");
|
|
3487
|
+
if (value.limit !== void 0 && (!Number.isInteger(value.limit) || value.limit < 1 || value.limit > 100)) throw invalid2("limit must be an integer from 1 to 100");
|
|
3488
|
+
if (value.maxPriceMultiplier !== void 0 && (typeof value.maxPriceMultiplier !== "number" || !Number.isFinite(value.maxPriceMultiplier) || value.maxPriceMultiplier <= 0)) {
|
|
3489
|
+
throw invalid2("maxPriceMultiplier must be a positive number");
|
|
3490
|
+
}
|
|
3491
|
+
return {
|
|
3492
|
+
need: "audio.synthesize",
|
|
3493
|
+
...value.model !== void 0 ? { model: matching(value.model, modelPattern, "model") } : {},
|
|
3494
|
+
...value.language !== void 0 ? { language: matching(value.language, languagePattern, "language") } : {},
|
|
3495
|
+
...value.locale !== void 0 ? { locale: facet(value.locale, "locale") } : {},
|
|
3496
|
+
...value.collection !== void 0 ? { collection: value.collection } : {},
|
|
3497
|
+
...value.query?.trim() ? { query: value.query.trim() } : {},
|
|
3498
|
+
...value.gender !== void 0 ? { gender: facet(value.gender, "gender") } : {},
|
|
3499
|
+
...value.age !== void 0 ? { age: facet(value.age, "age") } : {},
|
|
3500
|
+
...value.accent !== void 0 ? { accent: facet(value.accent, "accent") } : {},
|
|
3501
|
+
...value.category !== void 0 ? { category: facet(value.category, "category") } : {},
|
|
3502
|
+
...value.useCases !== void 0 ? { use_cases: facetList(value.useCases, "useCases") } : {},
|
|
3503
|
+
...value.descriptives !== void 0 ? { descriptives: facetList(value.descriptives, "descriptives") } : {},
|
|
3504
|
+
...value.featured !== void 0 ? { featured: value.featured } : {},
|
|
3505
|
+
...value.sort !== void 0 ? { sort: value.sort } : {},
|
|
3506
|
+
...value.maxPriceMultiplier !== void 0 ? { max_price_multiplier: value.maxPriceMultiplier } : {},
|
|
3507
|
+
...value.verifiedFor !== void 0 ? { verified_for: matching(value.verifiedFor, modelPattern, "verifiedFor") } : {},
|
|
3508
|
+
...value.cursor ? { cursor: value.cursor } : {},
|
|
3509
|
+
...value.limit !== void 0 ? { limit: value.limit } : {}
|
|
3510
|
+
};
|
|
3511
|
+
}
|
|
3512
|
+
function aiVoicePreviewWire(input2) {
|
|
3513
|
+
const value = isRecord(input2) ? input2 : {};
|
|
3514
|
+
return {
|
|
3515
|
+
need: "audio.synthesize",
|
|
3516
|
+
voice: matching(value.voice, voicePattern, "voice"),
|
|
3517
|
+
...value.model !== void 0 ? { model: matching(value.model, modelPattern, "model") } : {},
|
|
3518
|
+
...value.language !== void 0 ? { language: matching(value.language, languagePattern, "language") } : {}
|
|
3519
|
+
};
|
|
3520
|
+
}
|
|
3521
|
+
function aiVoiceFavoritesWire() {
|
|
3522
|
+
return { need: "audio.synthesize" };
|
|
3523
|
+
}
|
|
3524
|
+
var favoriteBatchMax = 100;
|
|
3525
|
+
var favoriteText = (value, max) => typeof value === "string" ? Array.from(value.replace(/\s+/gu, " ").trim()).slice(0, max).join("").trim() : "";
|
|
3526
|
+
function voiceFavoriteWire(item, field) {
|
|
3527
|
+
if (!isRecord(item)) throw invalid2(`${field} must be a voice entry or a voice ref`);
|
|
3528
|
+
const entry = "ref" in item && isRecord(item.ref) ? item : null;
|
|
3529
|
+
const ref = entry ? entry.ref : item;
|
|
3530
|
+
const voice = matching(ref.id, voicePattern, `${field}.id`);
|
|
3531
|
+
const model = typeof ref.model === "string" && ref.model ? matching(ref.model, modelPattern, `${field}.model`) : "";
|
|
3532
|
+
const name = favoriteText(entry ? entry.name : item.name, 80) || voice.slice(voice.lastIndexOf(":") + 1) || voice;
|
|
3533
|
+
if (!entry) return { voice, ...model ? { model } : {}, name, ...voice.startsWith("library:") ? { collection: "library" } : {} };
|
|
3534
|
+
const languages = Array.from(new Set((Array.isArray(entry.languages) ? entry.languages : []).map((code) => typeof code === "string" ? code.trim().toLowerCase().split(/[-_]/u)[0] : "").filter((code) => /^[a-z]{2,3}$/u.test(code)))).slice(0, 24);
|
|
3535
|
+
const traits = isRecord(entry.traits) ? entry.traits : {};
|
|
3536
|
+
const gender = favoriteText(traits.gender ?? traits.listed?.gender, 40), age = favoriteText(traits.age ?? traits.listed?.age, 40);
|
|
3537
|
+
const accent = favoriteText(traits.accent, 40), locale = favoriteText(entry.locale, 50);
|
|
3538
|
+
const premium = typeof entry.premium === "number" && Number.isFinite(entry.premium) && entry.premium > 0 ? Math.min(entry.premium, 3) : void 0;
|
|
3539
|
+
return {
|
|
3540
|
+
voice,
|
|
3541
|
+
...model ? { model } : {},
|
|
3542
|
+
name,
|
|
3543
|
+
...languages.length ? { languages } : {},
|
|
3544
|
+
...gender ? { gender } : {},
|
|
3545
|
+
...age ? { age } : {},
|
|
3546
|
+
...accent ? { accent } : {},
|
|
3547
|
+
...locale ? { locale } : {},
|
|
3548
|
+
...entry.collection === "standard" || entry.collection === "library" ? { collection: entry.collection } : {},
|
|
3549
|
+
...typeof entry.preview === "boolean" ? { preview: entry.preview } : {},
|
|
3550
|
+
...premium !== void 0 ? { price_multiplier: premium } : {}
|
|
3551
|
+
};
|
|
3552
|
+
}
|
|
3553
|
+
function aiVoiceFavoritesUpdateWire(input2) {
|
|
3554
|
+
const value = isRecord(input2) ? input2 : {};
|
|
3555
|
+
if (value.add !== void 0 && (!Array.isArray(value.add) || value.add.length > favoriteBatchMax)) throw invalid2(`add must be an array of at most ${favoriteBatchMax} voices`);
|
|
3556
|
+
if (value.remove !== void 0 && (!Array.isArray(value.remove) || value.remove.length > favoriteBatchMax)) throw invalid2(`remove must be an array of at most ${favoriteBatchMax} voice ids`);
|
|
3557
|
+
if (value.imagineFromFavorites !== void 0 && typeof value.imagineFromFavorites !== "boolean") throw invalid2("imagineFromFavorites must be a boolean");
|
|
3558
|
+
const add = value.add?.map((item, index) => voiceFavoriteWire(item, `add[${index}]`));
|
|
3559
|
+
const remove = value.remove?.map((id, index) => matching(id, voicePattern, `remove[${index}]`));
|
|
3560
|
+
return {
|
|
3561
|
+
need: "audio.synthesize",
|
|
3562
|
+
...add?.length ? { add } : {},
|
|
3563
|
+
...remove?.length ? { remove } : {},
|
|
3564
|
+
...value.imagineFromFavorites !== void 0 ? { imagine_from_favorites: value.imagineFromFavorites } : {}
|
|
3565
|
+
};
|
|
3566
|
+
}
|
|
3567
|
+
function aiGetWire(input2) {
|
|
3568
|
+
const value = isRecord(input2) ? input2 : {};
|
|
3569
|
+
const operationId2 = value.operationId, idempotencyKey = value.idempotencyKey;
|
|
3570
|
+
if (operationId2 === void 0 === (idempotencyKey === void 0)) throw invalid2("Provide one operationId or the original idempotencyKey");
|
|
3571
|
+
const key = operationId2 ?? idempotencyKey;
|
|
3572
|
+
if (typeof key !== "string" || !key) throw invalid2("operationId or idempotencyKey must be a non-empty string");
|
|
3573
|
+
return operationId2 !== void 0 ? { operation_id: key } : { idempotency_key: key };
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3576
|
+
// src/ai.ts
|
|
3577
|
+
var credits = (value) => typeof value === "string" && /^\d+$/.test(value);
|
|
3578
|
+
var isSource = (value) => isRecord(value) && isString(value.url) && (value.title === void 0 || isString(value.title));
|
|
3579
|
+
var reject = (message) => new NochaError("invalid_result", message);
|
|
3580
|
+
function generationResult(need, value) {
|
|
3581
|
+
if (!isRecord(value) || value.need !== need || !isNonEmptyString(value.operation_id) || !isRecord(value.billing) || value.billing.participant_captured_microcredits !== void 0 && !credits(value.billing.participant_captured_microcredits)) {
|
|
3582
|
+
throw reject("Nocha returned an invalid generation result");
|
|
3583
|
+
}
|
|
3584
|
+
const media = !Array.isArray(value.asset_ids) || !value.asset_ids.length || !isArrayOf(value.asset_ids, isString) || !isArrayOf(value.assets, (asset) => isRecord(asset) && isString(asset.id)) || value.asset_ids.some((id) => !value.assets.some((asset) => asset.id === id));
|
|
3585
|
+
const invalid3 = need === "text.structured" ? !isString(value.text) || value.structured === void 0 : need.startsWith("text.") ? !isString(value.text) : need === "web.research" ? value.structured === void 0 || !isArrayOf(value.sources, isSource) || !Number.isInteger(value.search_call_count) || Number(value.search_call_count) < 1 : need === "audio.synthesize" ? !isNonEmptyString(value.audio_base64) || !isString(value.mime_type) || !value.mime_type.startsWith("audio/") || value.shared !== void 0 && value.shared !== "hit" && value.shared !== "miss" : need === "audio.transcribe" ? !isString(value.text) || value.duration_seconds !== void 0 && !isFiniteNumber(value.duration_seconds) : isMediaNeed(need) ? media || value.duration_seconds !== void 0 && !isFiniteNumber(value.duration_seconds) : true;
|
|
3586
|
+
if (invalid3) throw reject(`Nocha returned an invalid ${need} result`);
|
|
3587
|
+
return value;
|
|
3588
|
+
}
|
|
3589
|
+
var assetShape = (asset) => isRecord(asset) && isString(asset.id);
|
|
3590
|
+
function pendingReceipt(value) {
|
|
3591
|
+
if (!isRecord(value) || value.status !== "pending" || !isNonEmptyString(value.operation_id) || !isString(value.need)) return void 0;
|
|
3592
|
+
if ("billing" in value || "text" in value || "audio_base64" in value || "asset_ids" in value || "structured" in value) return void 0;
|
|
3593
|
+
const poll = value.poll_after_ms;
|
|
3594
|
+
const interval = isFiniteNumber(poll) && poll >= generationWaiting.pollIntervalMs ? poll : generationWaiting.pollIntervalMs;
|
|
3595
|
+
return { operation_id: value.operation_id, need: value.need, poll_after_ms: Math.min(interval, generationWaiting.pollMaxMs) };
|
|
3596
|
+
}
|
|
3597
|
+
function withRecovery(error, operationId2, idempotencyKey) {
|
|
3598
|
+
return new NochaError(error.code, error.message, {
|
|
3599
|
+
...error.wireCode ? { wireCode: error.wireCode } : {},
|
|
3600
|
+
...error.trace_id ? { trace_id: error.trace_id } : {},
|
|
3601
|
+
...error.correlation_id ? { correlation_id: error.correlation_id } : {},
|
|
3602
|
+
retryable: error.retryable,
|
|
3603
|
+
...operationId2 ? { operation_id: operationId2 } : {},
|
|
3604
|
+
...idempotencyKey ? { idempotency_key: idempotencyKey } : {}
|
|
3605
|
+
});
|
|
3606
|
+
}
|
|
3607
|
+
function waitRemaining(ms, signal) {
|
|
3608
|
+
if (signal?.aborted) return Promise.reject(new NochaError("aborted", "Generation wait was aborted"));
|
|
3609
|
+
if (ms <= 0) return Promise.resolve();
|
|
3610
|
+
return new Promise((resolve, reject2) => {
|
|
3611
|
+
const timer = setTimeout(finish, ms);
|
|
3612
|
+
const onAbort = () => {
|
|
3613
|
+
clearTimeout(timer);
|
|
3614
|
+
signal?.removeEventListener("abort", onAbort);
|
|
3615
|
+
reject2(new NochaError("aborted", "Generation wait was aborted"));
|
|
3616
|
+
};
|
|
3617
|
+
function finish() {
|
|
3618
|
+
signal?.removeEventListener("abort", onAbort);
|
|
3619
|
+
resolve();
|
|
3620
|
+
}
|
|
3621
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
3622
|
+
});
|
|
3623
|
+
}
|
|
3624
|
+
function decoded(value, options) {
|
|
3625
|
+
return options?.decode && "structured" in value ? { ...value, structured: options.decode(value.structured) } : value;
|
|
3626
|
+
}
|
|
3627
|
+
async function generate2(context, input2, options) {
|
|
3628
|
+
const paid = aiGenerateWire(input2);
|
|
3629
|
+
const wire = { ...paid, response_mode: "pending" };
|
|
3630
|
+
const started = Date.now();
|
|
3631
|
+
const total = options?.timeoutMs ?? deadlineMs("ai", "generate", paid);
|
|
3632
|
+
const key = options?.idempotencyKey;
|
|
3633
|
+
const signal = options?.signal;
|
|
3634
|
+
const admission = Math.min(total, generationWaiting.negotiatedAdmissionMs + generationWaiting.sdkMarginMs);
|
|
3635
|
+
let value;
|
|
3636
|
+
try {
|
|
3637
|
+
value = await context.invoke(aiOperationDefinitions["generate"].capability, aiOperationDefinitions["generate"].operation, wire, {
|
|
3638
|
+
...options,
|
|
3639
|
+
timeoutMs: Math.max(1, admission)
|
|
3640
|
+
});
|
|
3641
|
+
} catch (error) {
|
|
3642
|
+
if (isNochaError(error) && (error.code === "aborted" || error.code === "invocation_timed_out")) throw withRecovery(error, void 0, key);
|
|
3643
|
+
throw error;
|
|
3644
|
+
}
|
|
3645
|
+
const pending = pendingReceipt(value);
|
|
3646
|
+
if (!pending) return decoded(generationResult(input2.need, value), options);
|
|
3647
|
+
let pause = pending.poll_after_ms;
|
|
3648
|
+
const operationId2 = pending.operation_id;
|
|
3649
|
+
while (Date.now() - started < total) {
|
|
3650
|
+
const remaining = total - (Date.now() - started);
|
|
3651
|
+
try {
|
|
3652
|
+
await waitRemaining(Math.min(pause, remaining), signal);
|
|
3653
|
+
} catch (error) {
|
|
3654
|
+
if (isNochaError(error)) throw withRecovery(error, operationId2, key);
|
|
3655
|
+
throw error;
|
|
3656
|
+
}
|
|
3657
|
+
if (Date.now() - started >= total) break;
|
|
3658
|
+
const budget2 = Math.max(1, Math.min(operationWaiting.ai.default, total - (Date.now() - started)));
|
|
3659
|
+
let status;
|
|
3660
|
+
try {
|
|
3661
|
+
status = await get(context, { operationId: operationId2 }, { signal, timeoutMs: budget2 });
|
|
3662
|
+
} catch (error) {
|
|
3663
|
+
if (classifyError(error) !== "transient") throw isNochaError(error) ? withRecovery(error, operationId2, key) : error;
|
|
3664
|
+
pause = Math.min(generationWaiting.pollMaxMs, Math.max(pause * 2, generationWaiting.pollIntervalMs));
|
|
3665
|
+
continue;
|
|
3666
|
+
}
|
|
3667
|
+
if (status.status === "succeeded") {
|
|
3668
|
+
const final = Object.fromEntries(Object.entries(status).filter(([key2]) => !["status", "poll_after_ms", "failure"].includes(key2)));
|
|
3669
|
+
return decoded(generationResult(input2.need, final), options);
|
|
3670
|
+
}
|
|
3671
|
+
if (status.status === "failed" || status.status === "cancelled") {
|
|
3672
|
+
const code = status.failure?.code === "shared_speech_retry" ? "shared_speech_retry" : "generation_failed";
|
|
3673
|
+
throw new NochaError(code, status.failure?.message ?? "Generation could not be completed", { operation_id: operationId2, idempotency_key: key });
|
|
3674
|
+
}
|
|
3675
|
+
pause = Math.min(generationWaiting.pollMaxMs, Math.max(pause * 2, generationWaiting.pollIntervalMs));
|
|
3676
|
+
}
|
|
3677
|
+
throw new NochaError("invocation_timed_out", "Generation is still running", { operation_id: operationId2, idempotency_key: key });
|
|
3678
|
+
}
|
|
3679
|
+
async function estimate(context, input2, options) {
|
|
3680
|
+
const wire = aiGenerateWire(input2);
|
|
3681
|
+
const value = await context.invoke(aiOperationDefinitions["estimate"].capability, aiOperationDefinitions["estimate"].operation, wire, options);
|
|
3682
|
+
if (!isRecord(value) || !isUuid(value.quote_id) || typeof value.expires_at !== "string" || !Number.isFinite(Date.parse(value.expires_at)) || !credits(value.estimated_cost_micro_usd) || !isRecord(value.estimated_usage) || !Object.values(value.estimated_usage).every(credits) || value.estimated_charge_microcredits !== void 0 && !credits(value.estimated_charge_microcredits) || value.creator_fee_microcredits !== void 0 && !credits(value.creator_fee_microcredits) || value.base_charge_microcredits !== void 0 && !credits(value.base_charge_microcredits) || value.shared !== void 0 && value.shared !== "ready" && value.shared !== "pending" || typeof value.rate_card_id !== "string") throw reject("Nocha returned an invalid generation quote");
|
|
3683
|
+
return value;
|
|
3684
|
+
}
|
|
3685
|
+
var decisionAnswerTypes = ["choice", "score", "noul"];
|
|
3686
|
+
async function decide(context, input2, options) {
|
|
3687
|
+
const wire = aiDecideWire(input2);
|
|
3688
|
+
const value = await context.invoke(aiOperationDefinitions["decide"].capability, aiOperationDefinitions["decide"].operation, wire, options);
|
|
3689
|
+
if (!isRecord(value) || typeof value.operation_id !== "string" || typeof value.model !== "string" || value.capability !== "text.decide" || value.need !== "text.decision" || !isRecord(value.answers) || !Object.values(value.answers).every((answer) => isRecord(answer) && decisionAnswerTypes.includes(String(answer.type))) || !isRecord(value.billing) || !["participants", "project"].includes(String(value.billing.payer_mode)) || !["initiator", "project"].includes(String(value.billing.capability_calls)) || !credits(value.billing.participant_captured_microcredits)) {
|
|
3690
|
+
throw reject("Nocha returned an invalid decision");
|
|
3691
|
+
}
|
|
3692
|
+
return options?.decode ? { ...value, answers: options.decode(value.answers) } : value;
|
|
3693
|
+
}
|
|
3694
|
+
async function get(context, input2, options) {
|
|
3695
|
+
const wire = aiGetWire(input2);
|
|
3696
|
+
const value = await context.invoke(aiOperationDefinitions["get"].capability, aiOperationDefinitions["get"].operation, wire, options);
|
|
3697
|
+
if (!isRecord(value) || typeof value.operation_id !== "string" || typeof value.need !== "string" || !["queued", "running", "succeeded", "failed", "cancelled"].includes(String(value.status)) || !isArrayOf(value.asset_ids, isString) || value.text !== void 0 && typeof value.text !== "string" || value.sources !== void 0 && !isArrayOf(value.sources, isSource) || value.search_call_count !== void 0 && (!Number.isSafeInteger(value.search_call_count) || Number(value.search_call_count) < 1) || value.audio_base64 !== void 0 && !isString(value.audio_base64) || value.mime_type !== void 0 && !isString(value.mime_type) || value.model !== void 0 && !isString(value.model) || value.seed !== void 0 && !Number.isInteger(value.seed) || value.shared !== void 0 && value.shared !== "hit" && value.shared !== "miss" || value.assets !== void 0 && !isArrayOf(value.assets, assetShape) || value.billing !== void 0 && !isRecord(value.billing) || value.poll_after_ms !== void 0 && (!isFiniteNumber(value.poll_after_ms) || value.poll_after_ms < 0) || value.failure !== void 0 && (!isRecord(value.failure) || typeof value.failure.code !== "string" || typeof value.failure.message !== "string" || typeof value.failure.retryable !== "boolean")) {
|
|
3698
|
+
throw reject("Nocha returned an invalid generation operation");
|
|
3699
|
+
}
|
|
3700
|
+
return value;
|
|
3701
|
+
}
|
|
3702
|
+
async function generationOptions(context, input2, options) {
|
|
3703
|
+
const wire = aiOptionsWire(input2);
|
|
3704
|
+
const value = await context.invoke(aiOperationDefinitions["options"].capability, aiOperationDefinitions["options"].operation, wire, options);
|
|
3705
|
+
if (!isRecord(value) || value.version !== 1 || typeof value.usage !== "string" || !["text", "image", "video", "voice", "music", "sound", "research", "import"].includes(String(value.family)) || !Array.isArray(value.efforts) || !value.efforts.every((effort) => ["low", "medium", "high"].includes(String(effort)))) {
|
|
3706
|
+
throw reject("Nocha returned invalid generation options");
|
|
3707
|
+
}
|
|
3708
|
+
return value;
|
|
3709
|
+
}
|
|
3710
|
+
var isOptionalString = (value) => value === void 0 || isString(value);
|
|
3711
|
+
var isStringList = (value) => isArrayOf(value, isString);
|
|
3712
|
+
var isOptionalBoolean = (value) => value === void 0 || typeof value === "boolean";
|
|
3713
|
+
var isOptionalNumber = (value) => value === void 0 || isFiniteNumber(value);
|
|
3714
|
+
var settingKeys = /* @__PURE__ */ new Set(["stability", "similarity_boost", "style", "speed", "use_speaker_boost"]);
|
|
3715
|
+
var facetNames = new Set(voiceFacets);
|
|
3716
|
+
var isVoiceSetting = (value) => isRecord(value) && settingKeys.has(value.key) && isOptionalNumber(value.min) && isOptionalNumber(value.max) && (value.values === void 0 || isArrayOf(value.values, isFiniteNumber));
|
|
3717
|
+
var oneOf = (value, values) => values.includes(value);
|
|
3718
|
+
function modelCapabilities(value) {
|
|
3719
|
+
return {
|
|
3720
|
+
...isNonEmptyString(value.family) ? { family: value.family } : {},
|
|
3721
|
+
...oneOf(value.latency, ["low", "standard", "slow"]) ? { latency: value.latency } : {},
|
|
3722
|
+
...oneOf(value.price_unit, ["character", "audio_second"]) ? { price_unit: value.price_unit } : {},
|
|
3723
|
+
...typeof value.speech_tags === "boolean" ? { speech_tags: value.speech_tags } : {},
|
|
3724
|
+
...Array.isArray(value.voice_settings) ? { voice_settings: value.voice_settings.filter(isVoiceSetting) } : {},
|
|
3725
|
+
...oneOf(value.voice_catalogue, ["library", "fixed"]) ? { voice_catalogue: value.voice_catalogue } : {},
|
|
3726
|
+
...Array.isArray(value.voice_facets) ? { voice_facets: value.voice_facets.filter((facet2) => facetNames.has(facet2)) } : {},
|
|
3727
|
+
...typeof value.voice_previews === "boolean" ? { voice_previews: value.voice_previews } : {},
|
|
3728
|
+
...typeof value.multilingual === "boolean" ? { multilingual: value.multilingual } : {},
|
|
3729
|
+
...isNonEmptyString(value.voice_group) ? { voice_group: value.voice_group } : {}
|
|
3730
|
+
};
|
|
3731
|
+
}
|
|
3732
|
+
function modelState(model) {
|
|
3733
|
+
const price = model.price;
|
|
3734
|
+
const tariff = isRecord(price) && price.unit === "character" && isFiniteNumber(price.micro_credits_per_1000) && price.micro_credits_per_1000 >= 0 && typeof price.ceiling === "boolean" ? { unit: "character", micro_credits_per_1000: price.micro_credits_per_1000, ceiling: price.ceiling } : void 0;
|
|
3735
|
+
return {
|
|
3736
|
+
...oneOf(model.availability, ["available", "degraded", "unavailable"]) ? { availability: model.availability } : {},
|
|
3737
|
+
...oneOf(model.access, ["relayed", "direct"]) ? { access: model.access } : {},
|
|
3738
|
+
...tariff ? { price: tariff } : {}
|
|
3739
|
+
};
|
|
3740
|
+
}
|
|
3741
|
+
async function models(context, input2, options) {
|
|
3742
|
+
const wire = aiModelsWire(input2);
|
|
3743
|
+
const value = await context.invoke(aiOperationDefinitions["models"].capability, aiOperationDefinitions["models"].operation, wire, options);
|
|
3744
|
+
if (!isRecord(value) || value.need !== wire.need || !isNonEmptyString(value.default_model) || !isArrayOf(value.models, (model) => isRecord(model) && isNonEmptyString(model.model) && isString(model.label) && typeof model.default === "boolean" && (model.languages === void 0 || isStringList(model.languages)))) {
|
|
3745
|
+
throw reject(`Nocha returned invalid ${wire.need} models`);
|
|
3746
|
+
}
|
|
3747
|
+
return {
|
|
3748
|
+
...value,
|
|
3749
|
+
need: wire.need,
|
|
3750
|
+
default_model: value.default_model,
|
|
3751
|
+
models: value.models.map(({ capabilities, availability: _availability, access: _access, price: _price, ...model }) => ({
|
|
3752
|
+
...model,
|
|
3753
|
+
...modelState({ availability: _availability, access: _access, price: _price }),
|
|
3754
|
+
...isRecord(capabilities) ? { capabilities: modelCapabilities(capabilities) } : {}
|
|
3755
|
+
}))
|
|
3756
|
+
};
|
|
3757
|
+
}
|
|
3758
|
+
var isOptionalCount = (value) => value === void 0 || isFiniteNumber(value) && Number.isInteger(value) && value >= 0;
|
|
3759
|
+
var isVoiceDialect = (value) => isRecord(value) && isNonEmptyString(value.language) && isOptionalString(value.locale) && isOptionalString(value.accent) && (value.models === void 0 || isStringList(value.models)) && isOptionalBoolean(value.preview);
|
|
3760
|
+
async function voices(context, input2, options) {
|
|
3761
|
+
const wire = aiVoicesWire(input2);
|
|
3762
|
+
const value = await context.invoke(aiOperationDefinitions["voices"].capability, aiOperationDefinitions["voices"].operation, wire, options);
|
|
3763
|
+
if (!isRecord(value) || !isNonEmptyString(value.model) || !isNonEmptyString(value.default_voice) || value.next_cursor !== null && !isNonEmptyString(value.next_cursor) || !isOptionalCount(value.total_count) || !isArrayOf(value.voices, (voice) => isRecord(voice) && isNonEmptyString(voice.id) && isString(voice.name) && isStringList(voice.languages) && (voice.models === void 0 || isStringList(voice.models)) && (voice.collection === "standard" || voice.collection === "library") && [voice.description, voice.gender, voice.age, voice.accent, voice.alias, voice.locale, voice.use_case, voice.descriptive, voice.category].every(isOptionalString) && [voice.featured, voice.free, voice.preview].every(isOptionalBoolean) && [voice.popularity, voice.usage_characters_7d, voice.usage_characters_1y].every(isOptionalCount) && (voice.price_multiplier === void 0 || isFiniteNumber(voice.price_multiplier) && voice.price_multiplier > 0) && (voice.dialects === void 0 || isArrayOf(voice.dialects, isVoiceDialect)))) {
|
|
3764
|
+
throw reject("Nocha returned invalid speech voices");
|
|
3765
|
+
}
|
|
3766
|
+
return value;
|
|
3767
|
+
}
|
|
3768
|
+
async function voicePreview(context, input2, options) {
|
|
3769
|
+
const wire = aiVoicePreviewWire(input2);
|
|
3770
|
+
const value = await context.invoke(aiOperationDefinitions["voicePreview"].capability, aiOperationDefinitions["voicePreview"].operation, wire, options);
|
|
3771
|
+
if (!isRecord(value) || !isNonEmptyString(value.mimeType) || !value.mimeType.startsWith("audio/") || !isNonEmptyString(value.dataUrl) || !value.dataUrl.startsWith("data:audio/")) {
|
|
3772
|
+
throw reject("Nocha returned an invalid voice preview");
|
|
3773
|
+
}
|
|
3774
|
+
return { dataUrl: value.dataUrl, mimeType: value.mimeType, ...isNonEmptyString(value.language) ? { language: value.language } : {} };
|
|
3775
|
+
}
|
|
3776
|
+
var isFavorite = (value) => isRecord(value) && isNonEmptyString(value.voice) && isString(value.name) && isString(value.added_at) && [value.model, value.gender, value.age, value.accent, value.locale].every(isOptionalString) && (value.languages === void 0 || isStringList(value.languages)) && (value.collection === void 0 || value.collection === "standard" || value.collection === "library") && isOptionalBoolean(value.preview) && (value.price_multiplier === void 0 || isFiniteNumber(value.price_multiplier) && value.price_multiplier > 0);
|
|
3777
|
+
function favoritesResult(value) {
|
|
3778
|
+
if (!isRecord(value) || !isArrayOf(value.favorites, isFavorite) || typeof value.imagine_from_favorites !== "boolean" || !isFiniteNumber(value.limit) || !Number.isInteger(value.limit) || value.limit < 0) {
|
|
3779
|
+
throw reject("Nocha returned invalid favourite voices");
|
|
3780
|
+
}
|
|
3781
|
+
return {
|
|
3782
|
+
favorites: value.favorites.map(voiceFavoriteEntry).filter((entry) => entry !== null),
|
|
3783
|
+
imagineFromFavorites: value.imagine_from_favorites,
|
|
3784
|
+
limit: value.limit
|
|
3785
|
+
};
|
|
3786
|
+
}
|
|
3787
|
+
async function voiceFavorites(context, options) {
|
|
3788
|
+
const definition = aiOperationDefinitions["voiceFavorites"];
|
|
3789
|
+
return favoritesResult(await context.invoke(definition.capability, definition.operation, aiVoiceFavoritesWire(), options));
|
|
3790
|
+
}
|
|
3791
|
+
async function voiceFavoritesUpdate(context, input2, options) {
|
|
3792
|
+
const definition = aiOperationDefinitions["voiceFavoritesUpdate"];
|
|
3793
|
+
const wire = aiVoiceFavoritesUpdateWire(input2);
|
|
3794
|
+
return favoritesResult(await context.invoke(definition.capability, definition.operation, wire, options));
|
|
3795
|
+
}
|
|
3796
|
+
function createAi(context) {
|
|
3797
|
+
return Object.freeze({
|
|
3798
|
+
generate: (input2, options) => generate2(context, input2, options),
|
|
3799
|
+
estimate: (input2, options) => estimate(context, input2, options),
|
|
3800
|
+
decide: (input2, options) => decide(context, input2, options),
|
|
3801
|
+
options: (input2, options) => generationOptions(context, input2, options),
|
|
3802
|
+
get: (input2, options) => get(context, input2, options),
|
|
3803
|
+
models: (input2, options) => models(context, input2, options),
|
|
3804
|
+
voices: (input2, options) => voices(context, input2, options),
|
|
3805
|
+
voicePreview: (input2, options) => voicePreview(context, input2, options),
|
|
3806
|
+
voiceFavorites: (options) => voiceFavorites(context, options),
|
|
3807
|
+
voiceFavoritesUpdate: (input2, options) => voiceFavoritesUpdate(context, input2, options),
|
|
3808
|
+
voiceCatalogue: createVoiceCatalogue({
|
|
3809
|
+
models: (input2, options) => models(context, input2, options),
|
|
3810
|
+
voices: (input2, options) => voices(context, input2, options)
|
|
3811
|
+
})
|
|
3812
|
+
});
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3815
|
+
// src/storage.ts
|
|
3816
|
+
function invalidResult(what) {
|
|
3817
|
+
throw new NochaError("invalid_result", `Nocha returned an invalid ${what}`);
|
|
3818
|
+
}
|
|
3819
|
+
async function validated(request2, check, what) {
|
|
3820
|
+
const value = await request2;
|
|
3821
|
+
if (!check(value)) invalidResult(what);
|
|
3822
|
+
return value;
|
|
3823
|
+
}
|
|
3824
|
+
var isAuthor = (value) => isNullable(value, isString);
|
|
3825
|
+
var isVisibility = (value) => value === "private" || value === "shared";
|
|
3826
|
+
var isTeam = (value) => value === void 0 || isSpaceTeam(value);
|
|
3827
|
+
function isDatabaseEntry(value) {
|
|
3828
|
+
return isRecord(value) && isUuid(value.id) && isCount(value.revision) && value.revision >= 1 && isRecord(value.record) && isAuthor(value.author) && (value.visibility === void 0 || isVisibility(value.visibility)) && (value.mine === void 0 || typeof value.mine === "boolean") && isTeam(value.team);
|
|
3829
|
+
}
|
|
3830
|
+
function input(value) {
|
|
3831
|
+
return isRecord(value) ? value : {};
|
|
3832
|
+
}
|
|
3833
|
+
var isMemoryKey = (value) => typeof value === "string" && /^[a-zA-Z0-9._:-]{1,100}$/.test(value);
|
|
3834
|
+
function isMemoryList(value) {
|
|
3835
|
+
return isRecord(value) && Array.isArray(value.items) && value.items.every((item) => isRecord(item) && isMemoryKey(item.key) && isCount(item.sequence) && item.sequence >= 1) && isNullable(value.nextCursor, isString);
|
|
3836
|
+
}
|
|
3837
|
+
function shareInput(value, visibility) {
|
|
3838
|
+
return { collection: input(value).collection, id: input(value).id, visibility };
|
|
3839
|
+
}
|
|
3840
|
+
function createMemory(context) {
|
|
3841
|
+
const isMemory = (key) => (value) => isRecord(value) && value.key === key && isCount(value.sequence) && Object.hasOwn(value, "value");
|
|
3842
|
+
return Object.freeze({
|
|
3843
|
+
get: (value, options) => validated(context.invoke(storageOperations.memory.get.capability, storageOperations.memory.get.operation, value, options), isMemory(input(value).key), "memory value"),
|
|
3844
|
+
set: (value, options) => validated(context.invoke(storageOperations.memory.set.capability, storageOperations.memory.set.operation, value, options), isMemory(input(value).key), "memory value"),
|
|
3845
|
+
remove: (value, options) => validated(
|
|
3846
|
+
context.invoke(storageOperations.memory.remove.capability, storageOperations.memory.remove.operation, value, options),
|
|
3847
|
+
(result) => isRecord(result) && result.key === input(value).key && result.removed === true && isCount(result.sequence),
|
|
3848
|
+
"memory removal receipt"
|
|
3849
|
+
),
|
|
3850
|
+
list: (value, options) => validated(context.invoke(storageOperations.memory.list.capability, storageOperations.memory.list.operation, value, options), isMemoryList, "memory key list")
|
|
3851
|
+
});
|
|
3852
|
+
}
|
|
3853
|
+
function isDatabasePage(result, query) {
|
|
3854
|
+
return isRecord(result) && Array.isArray(result.records) && result.records.every(isDatabaseEntry) && isNullable(result.nextCursor, isString) && (input(query).mine !== true || result.records.every((record) => isRecord(record) && record.mine === true));
|
|
3855
|
+
}
|
|
3856
|
+
function createDatabase(context) {
|
|
3857
|
+
return Object.freeze({
|
|
3858
|
+
insert: (value, options) => {
|
|
3859
|
+
if (!options?.idempotencyKey) return Promise.reject(new NochaError("invalid_request", "database.insert requires a persisted idempotencyKey"));
|
|
3860
|
+
return validated(
|
|
3861
|
+
context.invoke(storageOperations.database.insert.capability, storageOperations.database.insert.operation, value, options),
|
|
3862
|
+
(result) => isRecord(result) && isUuid(result.id) && isCount(result.revision) && result.revision >= 1 && isAuthor(result.author) && (result.visibility === void 0 || isVisibility(result.visibility)) && isTeam(result.team),
|
|
3863
|
+
"database insert receipt"
|
|
3864
|
+
);
|
|
3865
|
+
},
|
|
3866
|
+
get: (value, options) => validated(
|
|
3867
|
+
context.invoke(storageOperations.database.get.capability, storageOperations.database.get.operation, value, options),
|
|
3868
|
+
(result) => result === null || isDatabaseEntry(result) && result.id === input(value).id,
|
|
3869
|
+
"database record"
|
|
3870
|
+
),
|
|
3871
|
+
query: (value, options) => validated(
|
|
3872
|
+
context.invoke(storageOperations.database.query.capability, storageOperations.database.query.operation, value, options),
|
|
3873
|
+
(result) => isDatabasePage(result, value),
|
|
3874
|
+
"database page"
|
|
3875
|
+
),
|
|
3876
|
+
update: (value, options) => validated(
|
|
3877
|
+
context.invoke(storageOperations.database.update.capability, storageOperations.database.update.operation, value, options),
|
|
3878
|
+
(result) => isRecord(result) && result.id === input(value).id && isCount(result.revision) && result.revision >= 2 && isAuthor(result.author) && isTeam(result.team),
|
|
3879
|
+
"database update receipt"
|
|
3880
|
+
),
|
|
3881
|
+
remove: (value, options) => validated(
|
|
3882
|
+
context.invoke(storageOperations.database.remove.capability, storageOperations.database.remove.operation, value, options),
|
|
3883
|
+
(result) => isRecord(result) && result.removed === true,
|
|
3884
|
+
"database removal receipt"
|
|
3885
|
+
),
|
|
3886
|
+
setVisibility: (value, options) => validated(
|
|
3887
|
+
context.invoke(storageOperations.database.visibility.capability, storageOperations.database.visibility.operation, value, options),
|
|
3888
|
+
(result) => isRecord(result) && result.id === input(value).id && isVisibility(result.visibility),
|
|
3889
|
+
"database visibility"
|
|
3890
|
+
),
|
|
3891
|
+
share: (value, options) => validated(
|
|
3892
|
+
context.invoke(storageOperations.database.visibility.capability, storageOperations.database.visibility.operation, shareInput(value, "shared"), options),
|
|
3893
|
+
(result) => isRecord(result) && result.id === input(value).id && result.visibility === "shared",
|
|
3894
|
+
"database visibility"
|
|
3895
|
+
),
|
|
3896
|
+
unshare: (value, options) => validated(
|
|
3897
|
+
context.invoke(storageOperations.database.visibility.capability, storageOperations.database.visibility.operation, shareInput(value, "private"), options),
|
|
3898
|
+
(result) => isRecord(result) && result.id === input(value).id && result.visibility === "private",
|
|
3899
|
+
"database visibility"
|
|
3900
|
+
)
|
|
3901
|
+
});
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3904
|
+
// src/self-hosted.ts
|
|
3905
|
+
var prefix = "/api/experience-server/v1";
|
|
3906
|
+
var keyPattern = /^nk_[a-z2-7]{10}_[A-Za-z0-9_-]{43}$/;
|
|
3907
|
+
var tokenPattern = /^npt_[A-Za-z0-9._-]{40,4096}$/;
|
|
3908
|
+
var secrets = /nk_[a-z2-7]{10}_[A-Za-z0-9_-]{43}|npt_[A-Za-z0-9._-]{40,4096}/g;
|
|
3909
|
+
var maxTimerMs2 = 2147483647;
|
|
3910
|
+
var NochaServerError = class extends NochaError {
|
|
3911
|
+
status;
|
|
3912
|
+
constructor(code, message, status, metadata = {}) {
|
|
3913
|
+
super(code, message.replace(secrets, (secret) => `${secret.slice(0, secret.indexOf("_") + 1)}\u2026`), metadata);
|
|
3914
|
+
this.name = "NochaServerError";
|
|
3915
|
+
this.status = status;
|
|
3916
|
+
}
|
|
3917
|
+
toJSON() {
|
|
3918
|
+
return {
|
|
3919
|
+
name: this.name,
|
|
3920
|
+
code: this.code,
|
|
3921
|
+
message: this.message,
|
|
3922
|
+
status: this.status,
|
|
3923
|
+
retryable: this.retryable,
|
|
3924
|
+
...this.wireCode ? { wireCode: this.wireCode } : {},
|
|
3925
|
+
...this.trace_id ? { trace_id: this.trace_id } : {},
|
|
3926
|
+
...this.correlation_id ? { correlation_id: this.correlation_id } : {},
|
|
3927
|
+
...this.operation_id ? { operation_id: this.operation_id } : {},
|
|
3928
|
+
...this.idempotency_key ? { idempotency_key: this.idempotency_key } : {}
|
|
3929
|
+
};
|
|
3930
|
+
}
|
|
3931
|
+
};
|
|
3932
|
+
var refuse = (message) => new NochaServerError("invalid_request", message, 0);
|
|
3933
|
+
var quoted = (value) => JSON.stringify(String(value).slice(0, 100));
|
|
3934
|
+
function isOrigin(value) {
|
|
3935
|
+
if (typeof value !== "string" || value.length > 300) return false;
|
|
3936
|
+
try {
|
|
3937
|
+
const url = new URL(value);
|
|
3938
|
+
return url.protocol === "https:" && url.origin === value;
|
|
3939
|
+
} catch {
|
|
3940
|
+
return false;
|
|
3941
|
+
}
|
|
3942
|
+
}
|
|
3943
|
+
function baseUrl(value) {
|
|
3944
|
+
if (typeof value !== "string" || value.length > 2048) return null;
|
|
3945
|
+
try {
|
|
3946
|
+
const url = new URL(value);
|
|
3947
|
+
return url.protocol === "https:" && !url.username && !url.password && !url.search && !url.hash ? url.href.replace(/\/+$/, "") : null;
|
|
3948
|
+
} catch {
|
|
3949
|
+
return null;
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
async function request(api, method, path, body, timeoutMs, signal) {
|
|
3953
|
+
const deadline = AbortSignal.timeout(timeoutMs);
|
|
3954
|
+
const send = api.fetch;
|
|
3955
|
+
let response, text2;
|
|
3956
|
+
try {
|
|
3957
|
+
response = await send(`${api.base}${prefix}${path}`, {
|
|
3958
|
+
method,
|
|
3959
|
+
redirect: "manual",
|
|
3960
|
+
signal: signal ? AbortSignal.any([signal, deadline]) : deadline,
|
|
3961
|
+
// No Origin header: the API refuses any request carrying one, as a browser would.
|
|
3962
|
+
headers: { accept: "application/json", authorization: `Bearer ${api.key}`, ...body ? { "content-type": "application/json" } : {} },
|
|
3963
|
+
...body ? { body: JSON.stringify(body) } : {}
|
|
3964
|
+
});
|
|
3965
|
+
text2 = await response.text();
|
|
3966
|
+
} catch (error2) {
|
|
3967
|
+
if (signal?.aborted) throw new NochaServerError("aborted", "The call to Nocha was aborted", 0);
|
|
3968
|
+
if (deadline.aborted) throw new NochaServerError("invocation_timed_out", "Nocha did not answer in time; the operation may still complete", 0);
|
|
3969
|
+
throw new NochaServerError("service_unavailable", `Nocha is unreachable: ${error2 instanceof Error ? error2.message : String(error2)}`, 0);
|
|
3970
|
+
}
|
|
3971
|
+
let value;
|
|
3972
|
+
try {
|
|
3973
|
+
value = JSON.parse(text2);
|
|
3974
|
+
} catch {
|
|
3975
|
+
value = void 0;
|
|
3976
|
+
}
|
|
3977
|
+
const { status } = response;
|
|
3978
|
+
if (status >= 200 && status < 300 && value !== void 0) return value;
|
|
3979
|
+
if (status >= 200 && status < 400) throw new NochaServerError("invalid_response", status < 300 ? "Nocha returned an unreadable answer" : "Nocha answered with a redirect", status);
|
|
3980
|
+
const error = isRecord(value) && isRecord(value.error) ? value.error : {};
|
|
3981
|
+
const raw = typeof error.code === "string" && /^[A-Za-z][A-Za-z0-9_]{0,63}$/.test(error.code) ? error.code : status === 429 ? "rate_limited" : status >= 500 ? "service_unavailable" : "request_failed";
|
|
3982
|
+
const known = isNochaErrorCode(raw);
|
|
3983
|
+
throw new NochaServerError(known ? raw : "unknown_error", typeof error.message === "string" ? error.message.slice(0, 1e3) : `Nocha answered ${status}`, status, {
|
|
3984
|
+
retryable: status === 429 || status >= 500,
|
|
3985
|
+
...known ? {} : { wireCode: raw },
|
|
3986
|
+
...typeof error.trace_id === "string" ? { trace_id: error.trace_id } : {},
|
|
3987
|
+
...typeof error.correlation_id === "string" ? { correlation_id: error.correlation_id } : {}
|
|
3988
|
+
});
|
|
3989
|
+
}
|
|
3990
|
+
function externalPlayer(value) {
|
|
3991
|
+
const { participantId, workspaceId, environment, revisionId, experienceId, code, expiresAt } = isRecord(value) ? value : {};
|
|
3992
|
+
if (typeof participantId !== "string" || !participantId || participantId.length > 200 || !isUuid(workspaceId) || environment !== "play" && environment !== "development" || !isUuid(revisionId) || !isUuid(experienceId) || typeof code !== "string" || !/^[a-z0-9]{6,10}$/.test(code) || typeof expiresAt !== "string" || !Number.isFinite(Date.parse(expiresAt))) {
|
|
3993
|
+
throw new NochaServerError("invalid_response", "Nocha returned an invalid player", 200);
|
|
3994
|
+
}
|
|
3995
|
+
return Object.freeze({ participantId, workspaceId, environment, revisionId, experienceId, code, expiresAt });
|
|
3996
|
+
}
|
|
3997
|
+
function serverFacade(facade) {
|
|
3998
|
+
return Object.freeze(Object.fromEntries(Object.entries(facade).map(([name, method]) => [name, async (...args) => {
|
|
3999
|
+
try {
|
|
4000
|
+
return await method(...args);
|
|
4001
|
+
} catch (error) {
|
|
4002
|
+
if (error instanceof NochaServerError || !isNochaError(error)) throw error;
|
|
4003
|
+
throw new NochaServerError(error.code, error.message, 0, {
|
|
4004
|
+
retryable: error.retryable,
|
|
4005
|
+
...error.wireCode ? { wireCode: error.wireCode } : {},
|
|
4006
|
+
...error.trace_id ? { trace_id: error.trace_id } : {},
|
|
4007
|
+
...error.correlation_id ? { correlation_id: error.correlation_id } : {},
|
|
4008
|
+
...error.operation_id ? { operation_id: error.operation_id } : {},
|
|
4009
|
+
...error.idempotency_key ? { idempotency_key: error.idempotency_key } : {}
|
|
4010
|
+
});
|
|
4011
|
+
}
|
|
4012
|
+
}])));
|
|
4013
|
+
}
|
|
4014
|
+
function usage(api, token, usageId) {
|
|
4015
|
+
const invoke = async (capability, operation, input2 = {}, options = {}) => {
|
|
4016
|
+
if (typeof capability !== "string" || !CODE_PATTERN.test(capability)) throw refuse(`Unknown capability ${quoted(capability)}`);
|
|
4017
|
+
if (typeof operation !== "string" || !operation || operation.length > 120) throw refuse("The operation name must have 1 to 120 characters");
|
|
4018
|
+
if (!options || typeof options !== "object") throw refuse("Request options must be an object");
|
|
4019
|
+
if (!isPlainObject(input2)) throw refuse("The input must be a JSON object");
|
|
4020
|
+
const problem = jsonProblem(input2, 0, /* @__PURE__ */ new Set());
|
|
4021
|
+
if (problem) throw refuse(`The input is not JSON: ${problem}`);
|
|
4022
|
+
const { idempotencyKey = `${crypto.randomUUID().replaceAll("-", "")}:server`, timeoutMs = deadlineMs(capability, operation, input2), signal } = options;
|
|
4023
|
+
if (!isIdempotencyKey(idempotencyKey)) throw refuse("The idempotency key must have 8 to 200 characters without control characters");
|
|
4024
|
+
if (typeof timeoutMs !== "number" || !Number.isFinite(timeoutMs) || timeoutMs <= 0 || timeoutMs > maxTimerMs2) throw refuse("timeoutMs must be a positive finite timer duration");
|
|
4025
|
+
if (signal !== void 0 && !(signal instanceof AbortSignal)) throw refuse("signal must be an AbortSignal");
|
|
4026
|
+
if (signal?.aborted) throw new NochaServerError("aborted", "The call to Nocha was aborted", 0);
|
|
4027
|
+
const value = await request(api, "POST", "/invoke", { token, usageId, capability, operation, input: input2, idempotencyKey }, timeoutMs, signal);
|
|
4028
|
+
if (!isRecord(value) || !Object.hasOwn(value, "result")) throw new NochaServerError("invalid_response", "Nocha returned no result", 200);
|
|
4029
|
+
return value.result;
|
|
4030
|
+
};
|
|
4031
|
+
const context = Object.freeze({
|
|
4032
|
+
usageId,
|
|
4033
|
+
invoke,
|
|
4034
|
+
invokeWithPort: () => Promise.reject(refuse("Live media streams stay between the page and its host"))
|
|
4035
|
+
});
|
|
4036
|
+
return Object.freeze({ invoke, ai: serverFacade(createAi(context)), database: serverFacade(createDatabase(context)), memory: serverFacade(createMemory(context)) });
|
|
4037
|
+
}
|
|
4038
|
+
function createNochaServer(options) {
|
|
4039
|
+
if (typeof document !== "undefined") throw refuse("createNochaServer runs on a server: a key in a web page reaches every visitor");
|
|
4040
|
+
if (!isRecord(options) || !isRecord(options.keys)) throw refuse('createNochaServer needs keys: { "<Nocha API origin>": "<nk_ key>" }');
|
|
4041
|
+
const apis = /* @__PURE__ */ new Map();
|
|
4042
|
+
for (const [origin, key] of Object.entries(options.keys)) {
|
|
4043
|
+
if (!isOrigin(origin)) throw refuse(`${quoted(origin)} is not an https origin`);
|
|
4044
|
+
if (typeof key !== "string" || !keyPattern.test(key)) throw refuse(`The server key for ${origin} is missing or malformed`);
|
|
4045
|
+
apis.set(origin, { key, base: origin, fetch: (input2, init) => fetch(input2, init) });
|
|
4046
|
+
}
|
|
4047
|
+
if (!apis.size) throw refuse("createNochaServer needs one key per Nocha API origin");
|
|
4048
|
+
for (const [origin, transport] of Object.entries(options.transport ?? {})) {
|
|
4049
|
+
const api = apis.get(origin);
|
|
4050
|
+
if (!api || !isRecord(transport)) throw refuse(`transport names ${quoted(origin)}, which has no key`);
|
|
4051
|
+
if (transport.baseUrl !== void 0) {
|
|
4052
|
+
const base2 = baseUrl(transport.baseUrl);
|
|
4053
|
+
if (!base2) throw refuse(`The base URL for ${origin} must be https, without credentials, query or fragment`);
|
|
4054
|
+
api.base = base2;
|
|
4055
|
+
}
|
|
4056
|
+
if (transport.fetch !== void 0) {
|
|
4057
|
+
if (typeof transport.fetch !== "function") throw refuse(`The fetch for ${origin} must be a function`);
|
|
4058
|
+
api.fetch = transport.fetch;
|
|
4059
|
+
}
|
|
4060
|
+
}
|
|
4061
|
+
const apiOf = (origin) => {
|
|
4062
|
+
const api = typeof origin === "string" ? apis.get(origin) : void 0;
|
|
4063
|
+
if (!api) throw refuse(`No server key is configured for ${quoted(origin)}`);
|
|
4064
|
+
return api;
|
|
4065
|
+
};
|
|
4066
|
+
const playerOf = (player) => {
|
|
4067
|
+
if (!isRecord(player)) throw refuse("A player is the { token, api } of nocha.player.token()");
|
|
4068
|
+
const api = apiOf(player.api);
|
|
4069
|
+
if (typeof player.token !== "string" || !tokenPattern.test(player.token)) throw refuse("The player token is malformed");
|
|
4070
|
+
return { api, token: player.token };
|
|
4071
|
+
};
|
|
4072
|
+
return Object.freeze({
|
|
4073
|
+
async verify(player) {
|
|
4074
|
+
const { api, token } = playerOf(player);
|
|
4075
|
+
return externalPlayer(await request(api, "POST", "/players/verify", { token }, operationWaiting.default));
|
|
4076
|
+
},
|
|
4077
|
+
forPlayer(player) {
|
|
4078
|
+
const { api, token } = playerOf(player);
|
|
4079
|
+
const bound = /* @__PURE__ */ new Map();
|
|
4080
|
+
return Object.freeze({
|
|
4081
|
+
use(usageId) {
|
|
4082
|
+
if (!isUsageId(usageId)) throw refuse("use() requires a usage id declared in NOCHA.json");
|
|
4083
|
+
let value = bound.get(usageId);
|
|
4084
|
+
if (!value) bound.set(usageId, value = usage(api, token, usageId));
|
|
4085
|
+
return value;
|
|
4086
|
+
}
|
|
4087
|
+
});
|
|
4088
|
+
},
|
|
4089
|
+
async whoami(origin) {
|
|
4090
|
+
const value = await request(apiOf(origin), "GET", "/whoami", void 0, operationWaiting.default);
|
|
4091
|
+
const experience = isRecord(value) && isRecord(value.experience) ? value.experience : {};
|
|
4092
|
+
if (!isRecord(value) || !isUuid(experience.id) || typeof experience.code !== "string" || typeof experience.title !== "string" || !isOrigin(value.api)) {
|
|
4093
|
+
throw new NochaServerError("invalid_response", "Nocha returned an invalid experience", 200);
|
|
4094
|
+
}
|
|
4095
|
+
return Object.freeze({ experience: Object.freeze({ id: experience.id, code: experience.code, title: experience.title }), api: value.api });
|
|
4096
|
+
}
|
|
4097
|
+
});
|
|
4098
|
+
}
|
|
4099
|
+
function nochaFrameAncestors(codes, extra = [], frameHosts = NOCHA_EXTERNAL_DEFAULT_HOSTS) {
|
|
4100
|
+
if (!Array.isArray(codes) || !codes.length || codes.some((code) => typeof code !== "string" || !/^[a-z0-9]{6,10}$/.test(code))) {
|
|
4101
|
+
throw refuse('nochaFrameAncestors takes the experience codes of the page: ["abc123"]');
|
|
4102
|
+
}
|
|
4103
|
+
if (!Array.isArray(extra) || !Array.isArray(frameHosts)) throw refuse("nochaFrameAncestors takes lists of origins");
|
|
4104
|
+
const patterns = (list) => list.map((source) => {
|
|
4105
|
+
const pattern = normalizeExternalHostPattern(source);
|
|
4106
|
+
if (!pattern) throw refuse(`${quoted(source)} is not an https origin or https://*. pattern`);
|
|
4107
|
+
return pattern;
|
|
4108
|
+
});
|
|
4109
|
+
const frames = externalFrameOrigins(codes, patterns(frameHosts));
|
|
4110
|
+
if (!frames.length) throw refuse("frameHosts must hold https://*. patterns of Nocha frame domains");
|
|
4111
|
+
return ["frame-ancestors", .../* @__PURE__ */ new Set([...frames, "https://*.nocha.world", ...patterns(extra)])].join(" ");
|
|
4112
|
+
}
|
|
4113
|
+
export {
|
|
4114
|
+
NochaServerError,
|
|
4115
|
+
createNochaServer,
|
|
4116
|
+
nochaFrameAncestors
|
|
4117
|
+
};
|