@mountaya/studio 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +917 -2
- package/dist/agent/index.cjs +2600 -0
- package/dist/agent/index.cjs.map +1 -0
- package/dist/agent/index.d.cts +1237 -0
- package/dist/agent/index.d.ts +1237 -0
- package/dist/agent/index.js +2581 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/chunk-3Oi_Zrtm.js +9 -0
- package/dist/chunk-3Oi_Zrtm.js.map +1 -0
- package/dist/chunk-B18OPIu_.js +6 -0
- package/dist/chunk-B18OPIu_.js.map +1 -0
- package/dist/chunk-B5Uz3Qct.cjs +15 -0
- package/dist/chunk-B5Uz3Qct.cjs.map +1 -0
- package/dist/chunk-BBEJwkd3.d.cts +839 -0
- package/dist/chunk-BIEc_SkR.cjs +29 -0
- package/dist/chunk-BIEc_SkR.cjs.map +1 -0
- package/dist/chunk-BKMFOe-N.js +171 -0
- package/dist/chunk-BKMFOe-N.js.map +1 -0
- package/dist/chunk-BP4uy7E1.d.ts +11583 -0
- package/dist/chunk-BSHTsFiB.js +1403 -0
- package/dist/chunk-BSHTsFiB.js.map +1 -0
- package/dist/chunk-BTUUABGI.js +17 -0
- package/dist/chunk-BTUUABGI.js.map +1 -0
- package/dist/chunk-BaPiaz5X.cjs +115 -0
- package/dist/chunk-BaPiaz5X.cjs.map +1 -0
- package/dist/chunk-BeCVpkYr.cjs +542 -0
- package/dist/chunk-BeCVpkYr.cjs.map +1 -0
- package/dist/chunk-BgngsvK8.cjs +6202 -0
- package/dist/chunk-BgngsvK8.cjs.map +1 -0
- package/dist/chunk-BhInd7CJ.d.cts +253 -0
- package/dist/chunk-Bn6ZbxkS.cjs +27 -0
- package/dist/chunk-By9ZnkVI.js +60 -0
- package/dist/chunk-By9ZnkVI.js.map +1 -0
- package/dist/chunk-BzqPhxsz.cjs +367 -0
- package/dist/chunk-BzqPhxsz.cjs.map +1 -0
- package/dist/chunk-C2mMX81q.d.ts +443 -0
- package/dist/chunk-C2rr9Q0V.cjs +1402 -0
- package/dist/chunk-C2rr9Q0V.cjs.map +1 -0
- package/dist/chunk-CDJCbwIQ.d.cts +78 -0
- package/dist/chunk-CLGvBOVH.d.cts +1654 -0
- package/dist/chunk-COdw1dc6.d.ts +525 -0
- package/dist/chunk-CQCJnT2i.d.ts +511 -0
- package/dist/chunk-CSyHY67q.cjs +353 -0
- package/dist/chunk-CSyHY67q.cjs.map +1 -0
- package/dist/chunk-CiK1Iqrv.js +950 -0
- package/dist/chunk-CiK1Iqrv.js.map +1 -0
- package/dist/chunk-CmJBgSwZ.cjs +24 -0
- package/dist/chunk-CmJBgSwZ.cjs.map +1 -0
- package/dist/chunk-CnrsRK2u.cjs +83 -0
- package/dist/chunk-CnrsRK2u.cjs.map +1 -0
- package/dist/chunk-Co782_9r.js +326 -0
- package/dist/chunk-Co782_9r.js.map +1 -0
- package/dist/chunk-Csr3KDpZ.cjs +32 -0
- package/dist/chunk-Csr3KDpZ.cjs.map +1 -0
- package/dist/chunk-CwkmccXv.js +89 -0
- package/dist/chunk-CwkmccXv.js.map +1 -0
- package/dist/chunk-D0Q4iL9B.cjs +255 -0
- package/dist/chunk-D0Q4iL9B.cjs.map +1 -0
- package/dist/chunk-DFwiSzUS.cjs +72 -0
- package/dist/chunk-DFwiSzUS.cjs.map +1 -0
- package/dist/chunk-DIFayl2P.d.cts +443 -0
- package/dist/chunk-DIGF58ux.d.cts +525 -0
- package/dist/chunk-DKuuuld5.js +101 -0
- package/dist/chunk-DKuuuld5.js.map +1 -0
- package/dist/chunk-DMePkFEo.js +5054 -0
- package/dist/chunk-DMePkFEo.js.map +1 -0
- package/dist/chunk-DO5SIBgu.js +305 -0
- package/dist/chunk-DO5SIBgu.js.map +1 -0
- package/dist/chunk-DOQ_7eE5.d.ts +6662 -0
- package/dist/chunk-DThaaNeb.d.cts +15 -0
- package/dist/chunk-DThaaNeb.d.ts +15 -0
- package/dist/chunk-DUQzjUJy.d.ts +78 -0
- package/dist/chunk-DX37IPhV.cjs +1903 -0
- package/dist/chunk-DX37IPhV.cjs.map +1 -0
- package/dist/chunk-Damps5Tk.cjs +155 -0
- package/dist/chunk-Damps5Tk.cjs.map +1 -0
- package/dist/chunk-DbK5PhpJ.d.ts +1654 -0
- package/dist/chunk-De0vAASv.d.ts +253 -0
- package/dist/chunk-DhSZ7YZt.d.cts +6662 -0
- package/dist/chunk-DjEvqvPA.cjs +43 -0
- package/dist/chunk-DjEvqvPA.cjs.map +1 -0
- package/dist/chunk-DkwDzwvu.d.cts +121 -0
- package/dist/chunk-DkwDzwvu.d.ts +121 -0
- package/dist/chunk-Dmszv9If.js +71 -0
- package/dist/chunk-Dmszv9If.js.map +1 -0
- package/dist/chunk-Dp_ftNWY.d.cts +511 -0
- package/dist/chunk-DsHQySz0.js +31 -0
- package/dist/chunk-DsHQySz0.js.map +1 -0
- package/dist/chunk-DwoUyHHh.js +281 -0
- package/dist/chunk-DwoUyHHh.js.map +1 -0
- package/dist/chunk-IaIDQflj.d.cts +2315 -0
- package/dist/chunk-IaIDQflj.d.ts +2315 -0
- package/dist/chunk-cVXLsZfL.d.ts +839 -0
- package/dist/chunk-mIaCX9EJ.d.cts +11583 -0
- package/dist/chunk-nJQxbOwQ.cjs +8962 -0
- package/dist/chunk-nJQxbOwQ.cjs.map +1 -0
- package/dist/chunk-o9jaxhCO.js +8852 -0
- package/dist/chunk-o9jaxhCO.js.map +1 -0
- package/dist/chunk-p-Tt_Lwz.js +14 -0
- package/dist/chunk-p-Tt_Lwz.js.map +1 -0
- package/dist/engines/index.cjs +2091 -0
- package/dist/engines/index.cjs.map +1 -0
- package/dist/engines/index.d.cts +2176 -0
- package/dist/engines/index.d.ts +2176 -0
- package/dist/engines/index.js +2075 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/handlers/index.cjs +53 -0
- package/dist/handlers/index.cjs.map +1 -0
- package/dist/handlers/index.d.cts +403 -0
- package/dist/handlers/index.d.ts +403 -0
- package/dist/handlers/index.js +33 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/index.cjs +3511 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +3033 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/index.cjs +510 -0
- package/dist/plugins/index.cjs.map +1 -0
- package/dist/plugins/index.d.cts +296 -0
- package/dist/plugins/index.d.ts +296 -0
- package/dist/plugins/index.js +489 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/seams/index.cjs +89 -0
- package/dist/seams/index.cjs.map +1 -0
- package/dist/seams/index.d.cts +452 -0
- package/dist/seams/index.d.ts +452 -0
- package/dist/seams/index.js +49 -0
- package/dist/seams/index.js.map +1 -0
- package/dist/strings/fr/index.cjs +2135 -0
- package/dist/strings/fr/index.cjs.map +1 -0
- package/dist/strings/fr/index.d.cts +17 -0
- package/dist/strings/fr/index.d.ts +17 -0
- package/dist/strings/fr/index.js +2130 -0
- package/dist/strings/fr/index.js.map +1 -0
- package/dist/strings/index.cjs +2384 -0
- package/dist/strings/index.cjs.map +1 -0
- package/dist/strings/index.d.cts +3 -0
- package/dist/strings/index.d.ts +3 -0
- package/dist/strings/index.js +2353 -0
- package/dist/strings/index.js.map +1 -0
- package/dist/testing/index.cjs +230 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +246 -0
- package/dist/testing/index.d.ts +246 -0
- package/dist/testing/index.js +219 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/time/index.cjs +28 -0
- package/dist/time/index.cjs.map +1 -0
- package/dist/time/index.d.cts +41 -0
- package/dist/time/index.d.ts +41 -0
- package/dist/time/index.js +23 -0
- package/dist/time/index.js.map +1 -0
- package/package.json +224 -4
- package/src/agent/engines/agentThreads.ts +1601 -0
- package/src/agent/engines/directorChat.ts +500 -0
- package/src/agent/index.ts +67 -0
- package/src/agent/rules/agentEditLock.ts +115 -0
- package/src/agent/rules/agentErrorCopy.ts +44 -0
- package/src/agent/rules/copilotOrganization.ts +36 -0
- package/src/agent/rules/playbook.gen.ts +444 -0
- package/src/agent/rules/router.ts +518 -0
- package/src/agent/rules/stateDelta.ts +29 -0
- package/src/agent/rules/studioRouter.ts +123 -0
- package/src/agent/rules/surfaces.gen.ts +633 -0
- package/src/agent/rules/threadsUrl.ts +48 -0
- package/src/agent/rules/transcriptObserver.ts +90 -0
- package/src/agent/stores/agentThreads.ts +451 -0
- package/src/bus/contracts/noData.ts +18 -0
- package/src/bus/contracts/shared.ts +172 -0
- package/src/bus/contracts/studioTools.ts +224 -0
- package/src/bus/rules/bus.ts +857 -0
- package/src/bus/rules/confirmation.ts +22 -0
- package/src/bus/rules/defineRegistry.ts +24 -0
- package/src/bus/rules/errors.ts +401 -0
- package/src/bus/rules/handlerErrors.ts +103 -0
- package/src/bus/rules/handlerRegistry.ts +627 -0
- package/src/bus/rules/inputSchema.ts +232 -0
- package/src/bus/rules/invalidInput.ts +441 -0
- package/src/bus/rules/lateBoundTools.ts +100 -0
- package/src/bus/rules/studioRegistry.ts +324 -0
- package/src/bus/rules/studioToolBus.ts +73 -0
- package/src/bus/rules/types.ts +804 -0
- package/src/chrome/contracts/alert.ts +42 -0
- package/src/chrome/contracts/itinerary.ts +26 -0
- package/src/chrome/contracts/map.ts +23 -0
- package/src/chrome/contracts/overlay.ts +46 -0
- package/src/chrome/contracts/panel.ts +29 -0
- package/src/chrome/contracts/question.ts +52 -0
- package/src/chrome/contracts/selection.ts +26 -0
- package/src/chrome/contracts/sidenav.ts +23 -0
- package/src/chrome/contracts/snapshot.ts +319 -0
- package/src/chrome/contracts/state.ts +22 -0
- package/src/chrome/contracts/tabs.ts +56 -0
- package/src/chrome/handlers/alert.ts +91 -0
- package/src/chrome/handlers/introspection.ts +180 -0
- package/src/chrome/handlers/panels.ts +42 -0
- package/src/chrome/handlers/question.ts +24 -0
- package/src/chrome/handlers/sidenav.ts +116 -0
- package/src/chrome/handlers/snapshot.ts +451 -0
- package/src/chrome/handlers/stateDelta.ts +125 -0
- package/src/chrome/handlers/tabs.ts +143 -0
- package/src/chrome/handlers/timestamp.ts +19 -0
- package/src/chrome/rules/agentSelectors.ts +210 -0
- package/src/chrome/rules/mapAlert.ts +13 -0
- package/src/chrome/rules/question.ts +25 -0
- package/src/chrome/rules/tabs.ts +13 -0
- package/src/chrome/stores/activeDraftSession.ts +134 -0
- package/src/chrome/stores/chrome.ts +527 -0
- package/src/chrome/stores/uiStore.ts +575 -0
- package/src/collab/contracts/collab.ts +261 -0
- package/src/collab/handlers/collab.ts +468 -0
- package/src/collab/rules/toolNames.ts +33 -0
- package/src/collab/stores/collab.ts +899 -0
- package/src/collections/contracts/collection.ts +182 -0
- package/src/collections/handlers/collectionAttach.ts +141 -0
- package/src/collections/handlers/collections.ts +499 -0
- package/src/collections/handlers/heldCollection.ts +42 -0
- package/src/collections/handlers/restCollections.ts +386 -0
- package/src/collections/rules/collections.ts +138 -0
- package/src/collections/rules/entityCollections.ts +53 -0
- package/src/collections/stores/collections.ts +133 -0
- package/src/data/contracts/data.ts +233 -0
- package/src/data/contracts/itinerary.ts +71 -0
- package/src/data/handlers/activityResolve.ts +76 -0
- package/src/data/handlers/data.ts +200 -0
- package/src/data/handlers/graphql.ts +26 -0
- package/src/data/handlers/mutationSink.ts +1577 -0
- package/src/data/handlers/profile.ts +83 -0
- package/src/data/handlers/writeThrough.ts +417 -0
- package/src/data/rules/cache.ts +181 -0
- package/src/data/rules/dataTypes.ts +40 -0
- package/src/data/rules/keys.ts +106 -0
- package/src/data/rules/persistence.ts +1058 -0
- package/src/data/rules/requestBody.ts +43 -0
- package/src/data/rules/restErrors.ts +354 -0
- package/src/data/rules/sessionSurface.ts +156 -0
- package/src/data/rules/toolResultData.ts +73 -0
- package/src/data/rules/uuid.ts +24 -0
- package/src/edit/contracts/edit.ts +37 -0
- package/src/edit/contracts/itinerary.ts +57 -0
- package/src/edit/handlers/draftCommit.ts +257 -0
- package/src/edit/handlers/editDiscard.ts +34 -0
- package/src/edit/handlers/editLock.ts +949 -0
- package/src/edit/handlers/editor.ts +203 -0
- package/src/edit/handlers/formUnsaved.ts +24 -0
- package/src/edit/rules/draftMetadata.ts +117 -0
- package/src/edit/rules/editKeyboard.ts +222 -0
- package/src/edit/rules/editShortcuts.ts +102 -0
- package/src/edit/rules/editTooltip.ts +174 -0
- package/src/edit/rules/editorTaken.ts +49 -0
- package/src/edit/rules/history.ts +26 -0
- package/src/edit/rules/unsavedWork.ts +60 -0
- package/src/edit/stores/editorReservation.ts +70 -0
- package/src/edit/stores/formsUnsaved.ts +54 -0
- package/src/embed/contracts/embed.ts +48 -0
- package/src/embed/engines/embedFraming.ts +1329 -0
- package/src/embed/engines/embedReady.ts +353 -0
- package/src/embed/engines/framingPageSession.ts +169 -0
- package/src/embed/handlers/embed.ts +130 -0
- package/src/embed/rules/allowedDomains.ts +71 -0
- package/src/embed/rules/bridgeMessages.ts +224 -0
- package/src/embed/rules/defaults.ts +173 -0
- package/src/embed/rules/displaySeed.ts +115 -0
- package/src/embed/rules/embedAllowlist.ts +146 -0
- package/src/embed/rules/embedConstraints.ts +215 -0
- package/src/embed/rules/embedElements.ts +277 -0
- package/src/embed/rules/embedSectionFields.ts +126 -0
- package/src/embed/rules/embedSecurity.ts +116 -0
- package/src/embed/rules/fieldDependencies.ts +89 -0
- package/src/embed/rules/fieldOptions.ts +138 -0
- package/src/embed/rules/layerOptions.ts +161 -0
- package/src/embed/rules/readyProtocol.ts +66 -0
- package/src/embed/rules/safetyRules.ts +215 -0
- package/src/embed/rules/snippet.ts +531 -0
- package/src/embed/rules/tableCode.ts +270 -0
- package/src/embed/stores/embed.ts +60 -0
- package/src/embed/stores/embedContent.ts +77 -0
- package/src/engines/index.ts +81 -0
- package/src/handlers/index.ts +66 -0
- package/src/index.ts +1065 -0
- package/src/itinerary/contracts/itinerary.ts +705 -0
- package/src/itinerary/engines/itineraryPace.ts +612 -0
- package/src/itinerary/engines/profileMarker.ts +238 -0
- package/src/itinerary/handlers/importStaging.ts +352 -0
- package/src/itinerary/handlers/itinerary.ts +572 -0
- package/src/itinerary/handlers/itineraryDuplicate.ts +177 -0
- package/src/itinerary/handlers/itineraryExport.ts +117 -0
- package/src/itinerary/handlers/itineraryImport.ts +783 -0
- package/src/itinerary/handlers/itineraryPublish.ts +118 -0
- package/src/itinerary/handlers/itinerarySelection.ts +354 -0
- package/src/itinerary/handlers/itinerarySuggest.ts +1186 -0
- package/src/itinerary/handlers/itineraryUnpublish.ts +101 -0
- package/src/itinerary/handlers/publicationScope.ts +118 -0
- package/src/itinerary/handlers/restItineraries.ts +752 -0
- package/src/itinerary/handlers/restItineraryExport.ts +70 -0
- package/src/itinerary/handlers/restItineraryImport.ts +311 -0
- package/src/itinerary/handlers/restItineraryPace.ts +87 -0
- package/src/itinerary/handlers/restItineraryRecord.ts +36 -0
- package/src/itinerary/handlers/suggestParams.ts +379 -0
- package/src/itinerary/handlers/suggestStaging.ts +363 -0
- package/src/itinerary/handlers/surfaceOpen.ts +389 -0
- package/src/itinerary/rules/activity.ts +139 -0
- package/src/itinerary/rules/analysis.ts +42 -0
- package/src/itinerary/rules/ceiling.ts +49 -0
- package/src/itinerary/rules/createFlow.ts +107 -0
- package/src/itinerary/rules/densify.ts +440 -0
- package/src/itinerary/rules/draftSurface.ts +219 -0
- package/src/itinerary/rules/editorView.ts +83 -0
- package/src/itinerary/rules/export.ts +159 -0
- package/src/itinerary/rules/friendlyName.ts +77 -0
- package/src/itinerary/rules/import.ts +1050 -0
- package/src/itinerary/rules/importFiles.ts +140 -0
- package/src/itinerary/rules/importTotals.ts +77 -0
- package/src/itinerary/rules/liveSegment.ts +712 -0
- package/src/itinerary/rules/lngLat.ts +17 -0
- package/src/itinerary/rules/mapSync.ts +100 -0
- package/src/itinerary/rules/previewRender.ts +416 -0
- package/src/itinerary/rules/profileReadout.ts +216 -0
- package/src/itinerary/rules/routing.ts +707 -0
- package/src/itinerary/rules/suggest.ts +522 -0
- package/src/itinerary/rules/suggestionPreview.ts +119 -0
- package/src/itinerary/rules/view.ts +61 -0
- package/src/itinerary/stores/importSession.ts +319 -0
- package/src/itinerary/stores/itinerary.ts +331 -0
- package/src/itinerary/stores/itineraryDuplicate.ts +76 -0
- package/src/itinerary/stores/sessionIdentity.ts +43 -0
- package/src/itinerary/stores/suggestSession.ts +418 -0
- package/src/layers/contracts/itinerary.ts +46 -0
- package/src/layers/contracts/overlay.ts +132 -0
- package/src/layers/handlers/enrichment.ts +36 -0
- package/src/layers/handlers/overlay.ts +406 -0
- package/src/layers/handlers/restLayers.ts +94 -0
- package/src/layers/handlers/tiles.ts +25 -0
- package/src/layers/rules/layers.ts +212 -0
- package/src/layers/rules/overlayInstant.ts +12 -0
- package/src/layers/rules/reachabilityIcon.ts +18 -0
- package/src/layers/rules/readout.ts +102 -0
- package/src/layers/stores/layers.ts +262 -0
- package/src/map/contracts/contextmenu.ts +33 -0
- package/src/map/contracts/geolocate.ts +37 -0
- package/src/map/contracts/map.ts +146 -0
- package/src/map/contracts/streetview.ts +53 -0
- package/src/map/contracts/terrain.ts +152 -0
- package/src/map/handlers/contextMenu.ts +135 -0
- package/src/map/handlers/geolocate.ts +52 -0
- package/src/map/handlers/map.ts +391 -0
- package/src/map/handlers/streetview.ts +94 -0
- package/src/map/handlers/terrain.ts +663 -0
- package/src/map/rules/baseTerrain.ts +75 -0
- package/src/map/rules/clickTargets.ts +464 -0
- package/src/map/rules/constraints.ts +32 -0
- package/src/map/rules/contextMenuReadout.ts +67 -0
- package/src/map/rules/coordinates.ts +71 -0
- package/src/map/rules/itineraryFit.ts +8 -0
- package/src/map/rules/mapEvents.ts +64 -0
- package/src/map/rules/mapProjection.ts +476 -0
- package/src/map/rules/terrainReading.ts +62 -0
- package/src/plugins/contracts/ids.ts +66 -0
- package/src/plugins/contracts/plugin.ts +202 -0
- package/src/plugins/contracts/slots.ts +137 -0
- package/src/plugins/engines/studioPlugin.ts +1365 -0
- package/src/plugins/index.ts +111 -0
- package/src/plugins/rules/contributions.ts +152 -0
- package/src/plugins/rules/errors.ts +60 -0
- package/src/plugins/rules/ids.ts +42 -0
- package/src/plugins/rules/validation.ts +249 -0
- package/src/rules/listeners.ts +57 -0
- package/src/rules/origin.ts +13 -0
- package/src/rules/storeWrite.ts +37 -0
- package/src/rules/types.ts +136 -0
- package/src/seams/index.ts +79 -0
- package/src/seams/rules/clock.ts +28 -0
- package/src/seams/rules/formatters.ts +211 -0
- package/src/seams/rules/ids.ts +102 -0
- package/src/seams/rules/links.ts +66 -0
- package/src/seams/rules/navigation.ts +222 -0
- package/src/seams/rules/notify.ts +49 -0
- package/src/seams/rules/persistenceDrawer.ts +220 -0
- package/src/seams/rules/saveFile.ts +101 -0
- package/src/seams/rules/seams.ts +156 -0
- package/src/seams/rules/storage.ts +116 -0
- package/src/search/contracts/overlay.ts +74 -0
- package/src/search/contracts/search.ts +197 -0
- package/src/search/handlers/pois.ts +57 -0
- package/src/search/handlers/search.ts +280 -0
- package/src/search/rules/params.ts +925 -0
- package/src/search/rules/poiGroups.ts +138 -0
- package/src/search/rules/searchFetch.ts +139 -0
- package/src/search/rules/timeWindow.ts +30 -0
- package/src/search/stores/search.ts +51 -0
- package/src/segments/contracts/itinerary.ts +433 -0
- package/src/segments/contracts/segment.ts +35 -0
- package/src/segments/engines/segmentDraft.ts +926 -0
- package/src/segments/handlers/chainGuards.ts +67 -0
- package/src/segments/handlers/directions.ts +44 -0
- package/src/segments/handlers/itineraryEcho.ts +45 -0
- package/src/segments/handlers/roadAccessDialog.ts +34 -0
- package/src/segments/handlers/segment.ts +111 -0
- package/src/segments/handlers/segmentEdit.ts +1341 -0
- package/src/segments/handlers/segmentGroups.ts +347 -0
- package/src/segments/handlers/segmentStructure.ts +1144 -0
- package/src/segments/rules/chain.ts +196 -0
- package/src/segments/rules/chainModel.ts +217 -0
- package/src/segments/rules/colors.ts +11 -0
- package/src/segments/rules/commit.ts +76 -0
- package/src/segments/rules/draft.ts +90 -0
- package/src/segments/rules/draftDisposition.ts +43 -0
- package/src/segments/rules/draftSegmentEdit.ts +129 -0
- package/src/segments/rules/engine.ts +222 -0
- package/src/segments/rules/groupSave.ts +234 -0
- package/src/segments/rules/hazardPrompt.ts +60 -0
- package/src/segments/rules/itineraryEcho.ts +40 -0
- package/src/segments/rules/liveSegmentProjection.ts +55 -0
- package/src/segments/rules/merge.ts +51 -0
- package/src/segments/rules/metrics.ts +456 -0
- package/src/segments/rules/naming.ts +168 -0
- package/src/segments/rules/segmentArming.ts +144 -0
- package/src/segments/rules/splitPick.ts +84 -0
- package/src/segments/rules/viaSimplify.ts +230 -0
- package/src/segments/stores/directions.ts +77 -0
- package/src/segments/stores/roadAccessDialog.ts +58 -0
- package/src/segments/stores/segmentEdit.ts +922 -0
- package/src/segments/stores/segmentGroupEdit.ts +84 -0
- package/src/segments/stores/segmentSplit.ts +77 -0
- package/src/share/contracts/share.ts +39 -0
- package/src/share/contracts/shareLink.ts +63 -0
- package/src/share/engines/shareLink.ts +1053 -0
- package/src/share/handlers/share.ts +47 -0
- package/src/share/handlers/shareLink.ts +231 -0
- package/src/share/handlers/shareScope.ts +54 -0
- package/src/share/rules/link.ts +89 -0
- package/src/share/rules/shareLink.ts +218 -0
- package/src/share/rules/targets.ts +92 -0
- package/src/share/rules/viewConfig.ts +95 -0
- package/src/share/stores/share.ts +58 -0
- package/src/strings/fr/index.ts +18 -0
- package/src/strings/fr/rules/fr.ts +2368 -0
- package/src/strings/index.ts +98 -0
- package/src/strings/rules/confirmCopy.ts +156 -0
- package/src/strings/rules/draftToolNames.ts +94 -0
- package/src/strings/rules/en.ts +2519 -0
- package/src/strings/rules/failureAlert.ts +115 -0
- package/src/strings/rules/formError.ts +400 -0
- package/src/strings/rules/maneuvers.ts +107 -0
- package/src/strings/rules/outputOptions.ts +126 -0
- package/src/strings/rules/publicationState.ts +100 -0
- package/src/strings/rules/routeHazardCopy.ts +62 -0
- package/src/strings/rules/searchLabels.ts +50 -0
- package/src/strings/rules/segmentChainVerbs.ts +62 -0
- package/src/strings/rules/studioCopy.ts +130 -0
- package/src/strings/rules/unitOptions.ts +119 -0
- package/src/testing/checkedBus.ts +226 -0
- package/src/testing/index.ts +30 -0
- package/src/testing/plugins.ts +106 -0
- package/src/testing/studio.ts +267 -0
- package/src/testing/urlSeam.ts +153 -0
- package/src/time/index.ts +12 -0
- package/src/time/rules/sun.ts +78 -0
- package/src/video/contracts/cameraSchemas.ts +266 -0
- package/src/video/contracts/profileSchemas.ts +37 -0
- package/src/video/contracts/video.ts +601 -0
- package/src/video/handlers/video.ts +1638 -0
- package/src/video/handlers/videoDirector.ts +114 -0
- package/src/video/rules/previewRefresh.ts +76 -0
- package/src/video/rules/profileSource.ts +51 -0
- package/src/video/rules/routeSpans.ts +79 -0
- package/src/video/rules/shotDefaults.ts +28 -0
- package/src/video/rules/stepOrder.ts +17 -0
- package/src/video/rules/videoSnapshot.ts +136 -0
- package/src/video/stores/directorThreads.ts +167 -0
- package/src/video/stores/videoExport.ts +290 -0
- package/src/viewer/contracts/preferences.ts +40 -0
- package/src/viewer/handlers/preferences.ts +91 -0
- package/src/viewer/rules/capabilities.ts +42 -0
- package/src/viewer/rules/config.ts +266 -0
- package/src/viewer/rules/context.ts +375 -0
- package/src/viewer/rules/ownership.ts +134 -0
- package/src/viewer/rules/platformViewer.ts +199 -0
- package/src/viewer/rules/scope.ts +197 -0
- package/src/viewer/rules/url.ts +145 -0
- package/src/viewer/rules/viewer.ts +307 -0
- package/src/viewer/rules/viewerSeam.ts +49 -0
- package/src/viewer/rules/viewerUnits.ts +34 -0
- package/src/waypoints/contracts/itinerary.ts +417 -0
- package/src/waypoints/handlers/poiWaypointStyle.ts +32 -0
- package/src/waypoints/handlers/waypointDetailsDialog.ts +38 -0
- package/src/waypoints/handlers/waypointEdit.ts +1073 -0
- package/src/waypoints/rules/amenities.ts +30 -0
- package/src/waypoints/rules/defaults.ts +31 -0
- package/src/waypoints/rules/details.ts +213 -0
- package/src/waypoints/rules/detailsDraft.ts +312 -0
- package/src/waypoints/rules/detailsPreview.ts +76 -0
- package/src/waypoints/rules/detailsSave.ts +356 -0
- package/src/waypoints/rules/draftDirty.ts +45 -0
- package/src/waypoints/rules/icons.ts +32 -0
- package/src/waypoints/rules/liveWaypoint.ts +63 -0
- package/src/waypoints/rules/naming.ts +185 -0
- package/src/waypoints/rules/sections.ts +77 -0
- package/src/waypoints/rules/waypointDraft.ts +62 -0
- package/src/waypoints/stores/waypointDetails.ts +62 -0
- package/src/waypoints/stores/waypointEdit.ts +566 -0
- package/src/zones/contracts/collection.ts +37 -0
- package/src/zones/contracts/zone.ts +528 -0
- package/src/zones/engines/zoneForm.ts +1773 -0
- package/src/zones/handlers/restZones.ts +287 -0
- package/src/zones/handlers/zonePublish.ts +206 -0
- package/src/zones/handlers/zoneUnpublish.ts +56 -0
- package/src/zones/handlers/zones.ts +2254 -0
- package/src/zones/rules/geometry.ts +946 -0
- package/src/zones/rules/zoneDefaults.ts +34 -0
- package/src/zones/rules/zoneDraft.ts +54 -0
- package/src/zones/rules/zoneForm.ts +563 -0
- package/src/zones/rules/zoneMetadata.ts +29 -0
- package/src/zones/rules/zoneSource.ts +87 -0
- package/src/zones/rules/zoneSourceRefusal.ts +104 -0
- package/src/zones/stores/zoneEdit.ts +998 -0
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The video wizard: framing a fly-through, previewing it, and recording it.
|
|
3
|
+
*
|
|
4
|
+
* One namespace per module, assembled in `studioToolContracts` (`bus/contracts/studioTools.ts`).
|
|
5
|
+
* The split is not filing: a namespace is the unit a consumer adopts and the unit a reviewer
|
|
6
|
+
* reads, and a single table of every verb in the studio is neither.
|
|
7
|
+
*
|
|
8
|
+
* The flight is resolved against a route the caller SUPPLIES. `studio.video.open` names an
|
|
9
|
+
* itinerary and `studio.video.route.set` hands over the flattened geometry once its detail
|
|
10
|
+
* loads; nothing here reads the studio's active itinerary. That is what lets a list row export
|
|
11
|
+
* an itinerary other than the one on screen, and it is why a freshly opened wizard has a plan
|
|
12
|
+
* with no shots until the route arrives.
|
|
13
|
+
*
|
|
14
|
+
* Every verb is `authenticated`, and each handler also asks the viewer seam for an entitlement:
|
|
15
|
+
* `video-export` for the wizard, the framing presets, the overlay and the transport, and
|
|
16
|
+
* `video-organization-modes` for the director's explicit shot sequence (`mode.set` to `director`,
|
|
17
|
+
* `shot.*`, `orbit`) and the field-by-field encoder matrix behind `output.set`. A viewer without
|
|
18
|
+
* the entitlement is refused with `upgrade-required`. A video belongs to an organization, so no
|
|
19
|
+
* video is made of a personal itinerary: `open` refuses an itinerary the session knows to be
|
|
20
|
+
* personal with `forbidden`, and every verb that configures, runs or hands over the video refuses
|
|
21
|
+
* one again, since the itinerary's record can land after the open. Each states the refusal as its
|
|
22
|
+
* `precondition`. Closing, cancelling, pausing, stopping, stepping, reading the plan and feeding
|
|
23
|
+
* the route (`route.set`) stay open, so a wizard over such an itinerary can always be left.
|
|
24
|
+
*
|
|
25
|
+
* `preset.set` and `output.set` are not two spellings of one thing. A preset stamps one of the
|
|
26
|
+
* platform-true templates over the encoder output; `output.set` names the fields. The
|
|
27
|
+
* same distinction runs through the camera: a preset `mode.set` regenerates the whole plan from
|
|
28
|
+
* the route, while `director` seeds an empty one for the shot verbs to fill.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
import * as z from "zod";
|
|
32
|
+
|
|
33
|
+
import { toolNoDataSchema } from "../../bus/contracts/shared.js";
|
|
34
|
+
import {
|
|
35
|
+
languageSchema,
|
|
36
|
+
unitLengthSchema,
|
|
37
|
+
unitPaceSchema,
|
|
38
|
+
unitSlopeSchema,
|
|
39
|
+
} from "../../search/rules/params.js";
|
|
40
|
+
import { videoExportSchema } from "../stores/videoExport.js";
|
|
41
|
+
import {
|
|
42
|
+
cameraModeSchema,
|
|
43
|
+
cameraOutputBaseSchema,
|
|
44
|
+
cameraPlanBaseSchema,
|
|
45
|
+
cameraPlanSchema,
|
|
46
|
+
cameraShotBaseSchema,
|
|
47
|
+
cameraShotSchema,
|
|
48
|
+
profileDesignSchema,
|
|
49
|
+
profileSourceSchema,
|
|
50
|
+
routeGeometrySchema,
|
|
51
|
+
} from "./cameraSchemas.js";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The members of a camera shot the director's verbs take: a progress, a hold, a pitch and a
|
|
55
|
+
* zoom, each with the bounds {@link cameraShotBaseSchema} declares.
|
|
56
|
+
*
|
|
57
|
+
* Read from the shot's schema, the one declaration of each bound, so a verb that frames the
|
|
58
|
+
* camera refuses exactly what the plan it writes into refuses.
|
|
59
|
+
*/
|
|
60
|
+
const {
|
|
61
|
+
at: shotAtSchema,
|
|
62
|
+
holdMs: shotHoldMsSchema,
|
|
63
|
+
pitchDeg: shotPitchDegSchema,
|
|
64
|
+
zoom: shotZoomSchema,
|
|
65
|
+
} = cameraShotBaseSchema.shape;
|
|
66
|
+
|
|
67
|
+
/** ORBIT_TURNS_MAX is the most full rotations one orbit sweeps. */
|
|
68
|
+
const ORBIT_TURNS_MAX = 4;
|
|
69
|
+
|
|
70
|
+
/** ORBIT_DWELL_DEFAULT_MS is how long an orbit's sweep spans when the call names no dwell. */
|
|
71
|
+
const ORBIT_DWELL_DEFAULT_MS = 4_000;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* studioVideoOpenInput validates the itinerary the video export wizard opens for,
|
|
75
|
+
* plus an optional segment to narrow the flight to one segment (absent/null = the
|
|
76
|
+
* whole itinerary). An itinerary row passes only the id; a segment row passes the
|
|
77
|
+
* segment id so the same wizard records a single segment.
|
|
78
|
+
*/
|
|
79
|
+
export const studioVideoOpenInput = z.object({
|
|
80
|
+
itineraryId: z.string(),
|
|
81
|
+
segmentId: z.string().nullable().optional(),
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* StudioVideoOpenInput is the validated video-wizard open payload, derived from
|
|
86
|
+
* studioVideoOpenInput.
|
|
87
|
+
*/
|
|
88
|
+
export type StudioVideoOpenInput = z.infer<typeof studioVideoOpenInput>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* studioVideoRouteSetInput validates what the open wizard's Camera Plan resolves against.
|
|
92
|
+
*
|
|
93
|
+
* - `route`: the flattened route, null until the wizard's itinerary detail loads and the route
|
|
94
|
+
* is computed.
|
|
95
|
+
* - `profileSource` (optional): the plan-independent source the live profile overlay resolves
|
|
96
|
+
* per-frame samples from; null when the route is null, absent when the caller computes no
|
|
97
|
+
* overlay source.
|
|
98
|
+
* - `activityGlyphUrl` (optional): the resolved silhouette URL for the itinerary's activity
|
|
99
|
+
* that the moving focus dot masks; null when the itinerary carries no activity, absent when
|
|
100
|
+
* the caller resolves no glyph.
|
|
101
|
+
*
|
|
102
|
+
* The wizard fetches its exported itinerary by id, computes the three from its segments and
|
|
103
|
+
* activity, and dispatches them together, so the route, the overlay source and the marker glyph
|
|
104
|
+
* are decoupled from the studio's active itinerary. The two optional members let a route-only
|
|
105
|
+
* dispatch validate. Reusing routeGeometrySchema and profileSourceSchema keeps the accepted
|
|
106
|
+
* shapes in lockstep with what the resolvers consume; the glyph is a plain URL string, so no
|
|
107
|
+
* host asset or ActivitySlug crosses into the studio's state.
|
|
108
|
+
*/
|
|
109
|
+
export const studioVideoRouteSetInput = z.object({
|
|
110
|
+
activityGlyphUrl: z.string().nullable().optional(),
|
|
111
|
+
profileSource: profileSourceSchema.nullable().optional(),
|
|
112
|
+
route: routeGeometrySchema.nullable(),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* StudioVideoRouteSetInput is the validated route-set payload, derived from
|
|
117
|
+
* studioVideoRouteSetInput.
|
|
118
|
+
*/
|
|
119
|
+
export type StudioVideoRouteSetInput = z.infer<typeof studioVideoRouteSetInput>;
|
|
120
|
+
|
|
121
|
+
/** studioVideoCloseInput takes no fields: closing the wizard clears its slot. */
|
|
122
|
+
export const studioVideoCloseInput = z.object({});
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* studioVideoStepSetInput validates the wizard step to switch to: the format
|
|
126
|
+
* picker, the profile-overlay step, the camera/preview step, or the review/record
|
|
127
|
+
* step. The steps are the ones `videoExportSchema` declares for the wizard's own state, read
|
|
128
|
+
* from it, so the bus rejects at the boundary exactly the step the store would not hold.
|
|
129
|
+
*/
|
|
130
|
+
export const studioVideoStepSetInput = z.object({
|
|
131
|
+
step: videoExportSchema.shape.step,
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* StudioVideoStepSetInput is the validated wizard-step payload, derived from
|
|
136
|
+
* studioVideoStepSetInput.
|
|
137
|
+
*/
|
|
138
|
+
export type StudioVideoStepSetInput = z.infer<typeof studioVideoStepSetInput>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* studioVideoModeSetInput validates the camera mode to author the plan in: a
|
|
142
|
+
* preset (any mode but `director`) regenerates the plan deterministically, while
|
|
143
|
+
* `director` seeds a neutral empty plan an explicit shot sequence fills. Reusing
|
|
144
|
+
* cameraModeSchema keeps the accepted vocabulary in lockstep with the plan.
|
|
145
|
+
*/
|
|
146
|
+
export const studioVideoModeSetInput = z.object({
|
|
147
|
+
mode: cameraModeSchema,
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* StudioVideoModeSetInput is the validated mode-set payload, derived from
|
|
152
|
+
* studioVideoModeSetInput.
|
|
153
|
+
*/
|
|
154
|
+
export type StudioVideoModeSetInput = z.infer<typeof studioVideoModeSetInput>;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* studioVideoDurationSetInput validates the whole flight's target wall-clock
|
|
158
|
+
* length in milliseconds (20..120 s), so an out-of-range duration is rejected at the
|
|
159
|
+
* boundary: a value below the floor no UI path emits but an agent dispatch could.
|
|
160
|
+
*
|
|
161
|
+
* The window is `cameraPlanSchema`'s own `targetDurationMs`, read without the default the
|
|
162
|
+
* plan gives a missing one, since the verb that sets a duration takes one.
|
|
163
|
+
*/
|
|
164
|
+
export const studioVideoDurationSetInput = z.object({
|
|
165
|
+
targetDurationMs: cameraPlanSchema.shape.targetDurationMs.unwrap(),
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* StudioVideoDurationSetInput is the validated duration-set payload, derived from
|
|
170
|
+
* studioVideoDurationSetInput.
|
|
171
|
+
*/
|
|
172
|
+
export type StudioVideoDurationSetInput = z.infer<typeof studioVideoDurationSetInput>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* studioVideoOutputSetInput validates a partial encoder-output reconfiguration:
|
|
176
|
+
* any subset of the output fields (format, resolution, fps, aspect, bitrate). It
|
|
177
|
+
* is cameraOutputBaseSchema (the no-default field set) made partial so a caller
|
|
178
|
+
* updates one field (the aspect, say) without restating the rest, and an absent
|
|
179
|
+
* field stays absent rather than parsing to a default. The handler merges only the
|
|
180
|
+
* present fields over the plan's current output, so a single-field update never
|
|
181
|
+
* resets its siblings. At least one field is required so an empty update is
|
|
182
|
+
* rejected. The base must carry no field-level defaults: a `.default()` would
|
|
183
|
+
* survive `.partial()` and pre-fill every key, making this refinement inert and
|
|
184
|
+
* the merge a full-output reset.
|
|
185
|
+
*/
|
|
186
|
+
export const studioVideoOutputSetInput = cameraOutputBaseSchema
|
|
187
|
+
.partial()
|
|
188
|
+
.refine((value) => Object.keys(value).length > 0, {
|
|
189
|
+
message: "output.set requires at least one field",
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* StudioVideoOutputSetInput is the validated partial output payload, derived from
|
|
194
|
+
* studioVideoOutputSetInput.
|
|
195
|
+
*/
|
|
196
|
+
export type StudioVideoOutputSetInput = z.infer<typeof studioVideoOutputSetInput>;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* studioVideoPresetSetInput validates the ready-made framing preset to apply:
|
|
200
|
+
* `vertical`, `widescreen`, or `square`, the platform-true templates. The `custom`
|
|
201
|
+
* member of the preset enum is not a template, so it is excluded here: the custom path is
|
|
202
|
+
* `studio.video.output.set`, gated on the `video-organization-modes` entitlement, not a preset
|
|
203
|
+
* stamp. The handler spreads the chosen videoPresets template over the plan's output and stamps
|
|
204
|
+
* the preset name.
|
|
205
|
+
*/
|
|
206
|
+
export const studioVideoPresetSetInput = z.object({
|
|
207
|
+
preset: z.enum(["vertical", "widescreen", "square"]),
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* StudioVideoPresetSetInput is the validated preset-set payload, derived from
|
|
212
|
+
* studioVideoPresetSetInput.
|
|
213
|
+
*/
|
|
214
|
+
export type StudioVideoPresetSetInput = z.infer<typeof studioVideoPresetSetInput>;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* studioVideoProfileToggleInput validates the live profile overlay enable flag: whether the
|
|
218
|
+
* Tour-de-France-style data overlay is composited into the preview and the recording. Shared
|
|
219
|
+
* with the profile-toggle tool so the bus drives the same flip for a human click and an agent
|
|
220
|
+
* call.
|
|
221
|
+
*/
|
|
222
|
+
export const studioVideoProfileToggleInput = z.object({
|
|
223
|
+
enabled: z.boolean(),
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* StudioVideoProfileToggleInput is the validated profile-toggle payload, derived
|
|
228
|
+
* from studioVideoProfileToggleInput.
|
|
229
|
+
*/
|
|
230
|
+
export type StudioVideoProfileToggleInput = z.infer<typeof studioVideoProfileToggleInput>;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* studioVideoProfileDesignSetInput validates the live profile overlay design to
|
|
234
|
+
* switch to: `graph` (elevation curve), `strip` (compact band) or `minimal` (a single
|
|
235
|
+
* pill). Reusing profileDesignSchema keeps the accepted vocabulary in lockstep with the
|
|
236
|
+
* overlay renderer registry.
|
|
237
|
+
*/
|
|
238
|
+
export const studioVideoProfileDesignSetInput = z.object({
|
|
239
|
+
design: profileDesignSchema,
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* StudioVideoProfileDesignSetInput is the validated profile-design payload, derived
|
|
244
|
+
* from studioVideoProfileDesignSetInput.
|
|
245
|
+
*/
|
|
246
|
+
export type StudioVideoProfileDesignSetInput = z.infer<typeof studioVideoProfileDesignSetInput>;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* studioVideoProfileUnitsSetInput validates the video-scoped units the profile
|
|
250
|
+
* overlay formats with: the `length` unit (metric/imperial), the `pace` form
|
|
251
|
+
* (per-time/per-distance) and the `slope` unit (degrees/percentage). `pace` is here
|
|
252
|
+
* because the overlay states a travel rate in its readout, so the export inherits the
|
|
253
|
+
* same choice between a speed and its reciprocal that the studio offers. These are
|
|
254
|
+
* local to the export (they never touch the global preferences or the map), so the
|
|
255
|
+
* overlay reads them straight into the param-based formatters. Reusing the domain unit
|
|
256
|
+
* schemas keeps the values as the shared domain types, never free strings.
|
|
257
|
+
*/
|
|
258
|
+
export const studioVideoProfileUnitsSetInput = z.object({
|
|
259
|
+
length: unitLengthSchema,
|
|
260
|
+
pace: unitPaceSchema,
|
|
261
|
+
slope: unitSlopeSchema,
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* StudioVideoProfileUnitsSetInput is the validated profile-units payload, derived
|
|
266
|
+
* from studioVideoProfileUnitsSetInput.
|
|
267
|
+
*/
|
|
268
|
+
export type StudioVideoProfileUnitsSetInput = z.infer<typeof studioVideoProfileUnitsSetInput>;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* studioVideoProfileLanguageSetInput validates the video-scoped language the
|
|
272
|
+
* profile overlay localizes its labels in. Like the units, it is local to the
|
|
273
|
+
* export and reused as the domain Language type via languageSchema rather than a
|
|
274
|
+
* free string.
|
|
275
|
+
*/
|
|
276
|
+
export const studioVideoProfileLanguageSetInput = z.object({
|
|
277
|
+
language: languageSchema,
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* StudioVideoProfileLanguageSetInput is the validated profile-language payload,
|
|
282
|
+
* derived from studioVideoProfileLanguageSetInput.
|
|
283
|
+
*/
|
|
284
|
+
export type StudioVideoProfileLanguageSetInput = z.infer<typeof studioVideoProfileLanguageSetInput>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* studioVideoShotAddInput validates a new keyframe added to the plan: every
|
|
288
|
+
* cameraShot field except `id` (the tool mints a stable id). The schema's bounds
|
|
289
|
+
* and defaults apply, so a sparse `{ at, pitchDeg, zoom }` parses with `follow`
|
|
290
|
+
* bearing, no hold, and unit speed.
|
|
291
|
+
*/
|
|
292
|
+
export const studioVideoShotAddInput = cameraShotSchema.omit({ id: true });
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* StudioVideoShotAddInput is the validated shot-add payload, derived from
|
|
296
|
+
* studioVideoShotAddInput.
|
|
297
|
+
*/
|
|
298
|
+
export type StudioVideoShotAddInput = z.infer<typeof studioVideoShotAddInput>;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* studioVideoShotSetInput validates an edit to one existing keyframe: the `id` of
|
|
302
|
+
* the shot to change plus any subset of its editable fields. The fields are the
|
|
303
|
+
* cameraShotBaseSchema fields (the no-default set, sans id) made optional, so a
|
|
304
|
+
* caller nudges one property (the pitch, the hold) without restating the shot, and
|
|
305
|
+
* an absent field stays absent rather than parsing to a default. The handler
|
|
306
|
+
* merges only the present fields over the matching shot and re-sorts if `at`
|
|
307
|
+
* moved, so a single-field edit never resets its siblings. At least one editable
|
|
308
|
+
* field is required. The base must carry no field-level defaults: a `.default()`
|
|
309
|
+
* would survive `.partial()` and pre-fill the non-id keys, making this refinement
|
|
310
|
+
* inert and an id-only edit a silent reset of bearingMode, holdMs, and speedScale.
|
|
311
|
+
*/
|
|
312
|
+
export const studioVideoShotSetInput = cameraShotBaseSchema
|
|
313
|
+
.omit({ id: true })
|
|
314
|
+
.partial()
|
|
315
|
+
.extend({ id: z.string() })
|
|
316
|
+
.refine((value) => Object.keys(value).some((key) => key !== "id"), {
|
|
317
|
+
message: "shot.set requires at least one field to change",
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* StudioVideoShotSetInput is the validated shot-edit payload, derived from
|
|
322
|
+
* studioVideoShotSetInput.
|
|
323
|
+
*/
|
|
324
|
+
export type StudioVideoShotSetInput = z.infer<typeof studioVideoShotSetInput>;
|
|
325
|
+
|
|
326
|
+
/** studioVideoShotRemoveInput validates the id of the keyframe to remove. */
|
|
327
|
+
export const studioVideoShotRemoveInput = z.object({
|
|
328
|
+
id: z.string(),
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* StudioVideoShotRemoveInput is the validated shot-remove payload, derived from
|
|
333
|
+
* studioVideoShotRemoveInput.
|
|
334
|
+
*/
|
|
335
|
+
export type StudioVideoShotRemoveInput = z.infer<typeof studioVideoShotRemoveInput>;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* studioVideoShotAddHoldInput validates a hold beat added to the plan: a keyframe
|
|
339
|
+
* at progress `at` that dwells for `holdMs` while framing the itinerary with the given
|
|
340
|
+
* `pitchDeg`/`zoom`. It is the director's "pause here" verb, distinct from a
|
|
341
|
+
* travelling shot: the camera parks at the point for the dwell. The bounds match
|
|
342
|
+
* cameraShotSchema's so an out-of-range hold or framing is rejected.
|
|
343
|
+
*/
|
|
344
|
+
export const studioVideoShotAddHoldInput = z.object({
|
|
345
|
+
at: shotAtSchema,
|
|
346
|
+
holdMs: shotHoldMsSchema,
|
|
347
|
+
pitchDeg: shotPitchDegSchema,
|
|
348
|
+
zoom: shotZoomSchema,
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* StudioVideoShotAddHoldInput is the validated hold-beat payload, derived from
|
|
353
|
+
* studioVideoShotAddHoldInput.
|
|
354
|
+
*/
|
|
355
|
+
export type StudioVideoShotAddHoldInput = z.infer<typeof studioVideoShotAddHoldInput>;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* studioVideoOrbitInput validates an orbit around the point at progress `at`: the
|
|
359
|
+
* camera parks there and sweeps its heading through `turns` full rotations (1..4,
|
|
360
|
+
* default 1) over a short progress window, framing with the given `pitchDeg` and
|
|
361
|
+
* `zoom`, `clockwise` choosing the direction (default true), and `dwellMs` the
|
|
362
|
+
* total time the sweep spans (the orbit's hold budget). It is the director's
|
|
363
|
+
* "circle this spot" verb: the tool expands it into a run of explicit
|
|
364
|
+
* fixed-bearing keyframes the resolver sweeps between.
|
|
365
|
+
*/
|
|
366
|
+
export const studioVideoOrbitInput = z.object({
|
|
367
|
+
at: shotAtSchema,
|
|
368
|
+
clockwise: z.boolean().default(true),
|
|
369
|
+
dwellMs: shotHoldMsSchema.default(ORBIT_DWELL_DEFAULT_MS),
|
|
370
|
+
pitchDeg: shotPitchDegSchema,
|
|
371
|
+
turns: z.number().int().min(1).max(ORBIT_TURNS_MAX).default(1),
|
|
372
|
+
zoom: shotZoomSchema,
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* StudioVideoOrbitInput is the validated orbit payload, derived from
|
|
377
|
+
* studioVideoOrbitInput.
|
|
378
|
+
*/
|
|
379
|
+
export type StudioVideoOrbitInput = z.infer<typeof studioVideoOrbitInput>;
|
|
380
|
+
|
|
381
|
+
/** studioVideoPlanGetInput takes no fields: it reads the current plan. */
|
|
382
|
+
export const studioVideoPlanGetInput = z.object({});
|
|
383
|
+
|
|
384
|
+
/** studioVideoPreviewSeekInput validates the progress fraction (0..1) to seek the preview to. */
|
|
385
|
+
export const studioVideoPreviewSeekInput = z.object({
|
|
386
|
+
fraction: z.number().min(0).max(1),
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* StudioVideoPreviewSeekInput is the validated preview-seek payload, derived from
|
|
391
|
+
* studioVideoPreviewSeekInput.
|
|
392
|
+
*/
|
|
393
|
+
export type StudioVideoPreviewSeekInput = z.infer<typeof studioVideoPreviewSeekInput>;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* studioVideoControlInput is the empty input shared by the parameterless
|
|
397
|
+
* preview/record control tools (preview start/play/pause/stop, record, cancel,
|
|
398
|
+
* download): they act on the open wizard's plan and the run singleton, carrying
|
|
399
|
+
* no payload of their own.
|
|
400
|
+
*/
|
|
401
|
+
export const studioVideoControlInput = z.object({});
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* addedShotSchema is what the two verbs that mint a keyframe answer: the `id` the plan holds it
|
|
405
|
+
* under, which is the id `studio.video.shot.set` and `studio.video.shot.remove` take.
|
|
406
|
+
*/
|
|
407
|
+
const addedShotSchema = z.strictObject({ id: cameraShotBaseSchema.shape.id });
|
|
408
|
+
|
|
409
|
+
/** heldPlanSchema is what `studio.video.plan.get` answers: the plan the open wizard holds. */
|
|
410
|
+
const heldPlanSchema = z.strictObject({ plan: cameraPlanBaseSchema });
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* previewSeekSchema is what `studio.video.preview.seek` answers: whether the seek parked the
|
|
414
|
+
* preview on its frame.
|
|
415
|
+
*
|
|
416
|
+
* `parked` is false for a seek a newer command overtook while it warmed. That seek moved
|
|
417
|
+
* nothing, so a caller that pauses after a seek pauses only where it reads true.
|
|
418
|
+
*/
|
|
419
|
+
const previewSeekSchema = z.strictObject({ parked: z.boolean() });
|
|
420
|
+
|
|
421
|
+
/** Every `studio.video` verb a consumer can drive, keyed by the name the bus dispatches. */
|
|
422
|
+
export const videoToolContracts = {
|
|
423
|
+
"studio.video.cancel": {
|
|
424
|
+
capability: "authenticated",
|
|
425
|
+
description:
|
|
426
|
+
"Cancel the video recording in progress, or stop the live video preview flight in progress.",
|
|
427
|
+
input: studioVideoControlInput,
|
|
428
|
+
output: toolNoDataSchema,
|
|
429
|
+
},
|
|
430
|
+
"studio.video.close": {
|
|
431
|
+
capability: "authenticated",
|
|
432
|
+
description: "Close the export-as-video wizard, stopping any preview or recording in progress.",
|
|
433
|
+
input: studioVideoCloseInput,
|
|
434
|
+
output: toolNoDataSchema,
|
|
435
|
+
},
|
|
436
|
+
"studio.video.download": {
|
|
437
|
+
capability: "authenticated",
|
|
438
|
+
description:
|
|
439
|
+
"Download the recorded video file. Refused while the wizard's itinerary is personal.",
|
|
440
|
+
input: studioVideoControlInput,
|
|
441
|
+
output: toolNoDataSchema,
|
|
442
|
+
},
|
|
443
|
+
"studio.video.duration.set": {
|
|
444
|
+
capability: "authenticated",
|
|
445
|
+
description:
|
|
446
|
+
"Set the total length of the video flight in milliseconds. Refused while the wizard's itinerary is personal.",
|
|
447
|
+
input: studioVideoDurationSetInput,
|
|
448
|
+
output: toolNoDataSchema,
|
|
449
|
+
},
|
|
450
|
+
"studio.video.mode.set": {
|
|
451
|
+
capability: "authenticated",
|
|
452
|
+
description:
|
|
453
|
+
"Set the video camera mode: a Smart/Cinematic/Drone/Helicopter/Chase/Overview preset regenerates the plan; Director seeds an empty plan for an explicit shot sequence. Refused while the wizard's itinerary is personal.",
|
|
454
|
+
input: studioVideoModeSetInput,
|
|
455
|
+
output: toolNoDataSchema,
|
|
456
|
+
},
|
|
457
|
+
"studio.video.open": {
|
|
458
|
+
capability: "authenticated",
|
|
459
|
+
description:
|
|
460
|
+
"Open the export-as-video wizard for an itinerary (optionally limited to a single segment), seeded with the Smart camera preset. Refused for a personal itinerary: only an organization's itineraries can be made into a video.",
|
|
461
|
+
input: studioVideoOpenInput,
|
|
462
|
+
output: toolNoDataSchema,
|
|
463
|
+
},
|
|
464
|
+
"studio.video.orbit": {
|
|
465
|
+
capability: "authenticated",
|
|
466
|
+
description:
|
|
467
|
+
"Add an orbit to the video plan: hold at a point and sweep the heading around it. Refused while the wizard's itinerary is personal.",
|
|
468
|
+
input: studioVideoOrbitInput,
|
|
469
|
+
output: toolNoDataSchema,
|
|
470
|
+
},
|
|
471
|
+
"studio.video.output.set": {
|
|
472
|
+
capability: "authenticated",
|
|
473
|
+
description:
|
|
474
|
+
"Reconfigure the video encoder output (format, resolution, fps, aspect, or bitrate). Refused while the wizard's itinerary is personal.",
|
|
475
|
+
input: studioVideoOutputSetInput,
|
|
476
|
+
output: toolNoDataSchema,
|
|
477
|
+
},
|
|
478
|
+
"studio.video.plan.get": {
|
|
479
|
+
capability: "authenticated",
|
|
480
|
+
description: "Read the current camera plan of the open video export wizard.",
|
|
481
|
+
input: studioVideoPlanGetInput,
|
|
482
|
+
output: heldPlanSchema,
|
|
483
|
+
},
|
|
484
|
+
"studio.video.preset.set": {
|
|
485
|
+
capability: "authenticated",
|
|
486
|
+
description:
|
|
487
|
+
"Apply a ready-made video preset (Vertical 9:16, Widescreen 16:9, or Square 1:1) to the encoder output. Refused while the wizard's itinerary is personal.",
|
|
488
|
+
input: studioVideoPresetSetInput,
|
|
489
|
+
output: toolNoDataSchema,
|
|
490
|
+
},
|
|
491
|
+
"studio.video.preview.pause": {
|
|
492
|
+
capability: "authenticated",
|
|
493
|
+
description: "Pause the live video preview flight.",
|
|
494
|
+
input: studioVideoControlInput,
|
|
495
|
+
output: toolNoDataSchema,
|
|
496
|
+
},
|
|
497
|
+
"studio.video.preview.play": {
|
|
498
|
+
capability: "authenticated",
|
|
499
|
+
description:
|
|
500
|
+
"Resume the paused video preview flight, fly on from the frame a seek parked the camera on, or fly from the first frame when there is neither. Refused while the wizard's itinerary is personal.",
|
|
501
|
+
input: studioVideoControlInput,
|
|
502
|
+
output: toolNoDataSchema,
|
|
503
|
+
},
|
|
504
|
+
"studio.video.preview.seek": {
|
|
505
|
+
capability: "authenticated",
|
|
506
|
+
description:
|
|
507
|
+
"Seek the video preview to a progress fraction (0..1) along the flight: the camera is parked on that frame and the wizard's status reads `parked` at the fraction, with nothing flying. A flight in the air is stopped first. Answers `parked`: false when a newer preview, recording or seek took the camera before this one parked. Refused while the wizard's itinerary is personal.",
|
|
508
|
+
input: studioVideoPreviewSeekInput,
|
|
509
|
+
output: previewSeekSchema,
|
|
510
|
+
},
|
|
511
|
+
"studio.video.preview.start": {
|
|
512
|
+
capability: "authenticated",
|
|
513
|
+
description:
|
|
514
|
+
"Start a live preview flight of the current video plan on the wizard map. Refused while the wizard's itinerary is personal.",
|
|
515
|
+
input: studioVideoControlInput,
|
|
516
|
+
output: toolNoDataSchema,
|
|
517
|
+
},
|
|
518
|
+
"studio.video.preview.stop": {
|
|
519
|
+
capability: "authenticated",
|
|
520
|
+
description: "Stop the live video preview flight and reset it.",
|
|
521
|
+
input: studioVideoControlInput,
|
|
522
|
+
output: toolNoDataSchema,
|
|
523
|
+
},
|
|
524
|
+
"studio.video.profile.design.set": {
|
|
525
|
+
capability: "authenticated",
|
|
526
|
+
description:
|
|
527
|
+
"Set the live profile overlay design: the full elevation graph, a compact stats strip, or a minimal distance chip. Refused while the wizard's itinerary is personal.",
|
|
528
|
+
input: studioVideoProfileDesignSetInput,
|
|
529
|
+
output: toolNoDataSchema,
|
|
530
|
+
},
|
|
531
|
+
"studio.video.profile.language.set": {
|
|
532
|
+
capability: "authenticated",
|
|
533
|
+
description:
|
|
534
|
+
"Set the video-scoped language the profile overlay localizes its labels in. Refused while the wizard's itinerary is personal.",
|
|
535
|
+
input: studioVideoProfileLanguageSetInput,
|
|
536
|
+
output: toolNoDataSchema,
|
|
537
|
+
},
|
|
538
|
+
"studio.video.profile.toggle": {
|
|
539
|
+
capability: "authenticated",
|
|
540
|
+
description:
|
|
541
|
+
"Toggle the live profile-details overlay on the video preview and recording. Refused while the wizard's itinerary is personal.",
|
|
542
|
+
input: studioVideoProfileToggleInput,
|
|
543
|
+
output: toolNoDataSchema,
|
|
544
|
+
},
|
|
545
|
+
"studio.video.profile.units.set": {
|
|
546
|
+
capability: "authenticated",
|
|
547
|
+
description:
|
|
548
|
+
"Set the video-scoped units the profile overlay formats with: the length system, the travel-rate form (a speed or its reciprocal) and the slope unit. Refused while the wizard's itinerary is personal.",
|
|
549
|
+
input: studioVideoProfileUnitsSetInput,
|
|
550
|
+
output: toolNoDataSchema,
|
|
551
|
+
},
|
|
552
|
+
"studio.video.record": {
|
|
553
|
+
capability: "authenticated",
|
|
554
|
+
description:
|
|
555
|
+
"Record and encode the current video plan into a downloadable video file. Returns `canceled` when a cancel, a close or a newer recording ended the run before it produced a file, and `conflict` when the plan, the route or the overlay changed while it ran. Refused while the wizard's itinerary is personal.",
|
|
556
|
+
input: studioVideoControlInput,
|
|
557
|
+
output: toolNoDataSchema,
|
|
558
|
+
},
|
|
559
|
+
"studio.video.route.set": {
|
|
560
|
+
capability: "authenticated",
|
|
561
|
+
description:
|
|
562
|
+
"Set the route geometry the video camera plan is resolved against, regenerating a preset plan from it.",
|
|
563
|
+
input: studioVideoRouteSetInput,
|
|
564
|
+
output: toolNoDataSchema,
|
|
565
|
+
},
|
|
566
|
+
"studio.video.shot.add": {
|
|
567
|
+
capability: "authenticated",
|
|
568
|
+
description:
|
|
569
|
+
"Add a camera keyframe to the video plan at a progress fraction along the route. Refused while the wizard's itinerary is personal.",
|
|
570
|
+
input: studioVideoShotAddInput,
|
|
571
|
+
output: addedShotSchema,
|
|
572
|
+
},
|
|
573
|
+
"studio.video.shot.addHold": {
|
|
574
|
+
capability: "authenticated",
|
|
575
|
+
description:
|
|
576
|
+
"Add a hold beat to the video plan: pause the camera at a point for a dwell. Refused while the wizard's itinerary is personal.",
|
|
577
|
+
input: studioVideoShotAddHoldInput,
|
|
578
|
+
output: addedShotSchema,
|
|
579
|
+
},
|
|
580
|
+
"studio.video.shot.remove": {
|
|
581
|
+
capability: "authenticated",
|
|
582
|
+
description:
|
|
583
|
+
"Remove a camera keyframe from the video plan by id. Refused while the wizard's itinerary is personal.",
|
|
584
|
+
input: studioVideoShotRemoveInput,
|
|
585
|
+
output: toolNoDataSchema,
|
|
586
|
+
},
|
|
587
|
+
"studio.video.shot.set": {
|
|
588
|
+
capability: "authenticated",
|
|
589
|
+
description:
|
|
590
|
+
"Edit an existing camera keyframe in the video plan by id. Refused while the wizard's itinerary is personal.",
|
|
591
|
+
input: studioVideoShotSetInput,
|
|
592
|
+
output: toolNoDataSchema,
|
|
593
|
+
},
|
|
594
|
+
"studio.video.step.set": {
|
|
595
|
+
capability: "authenticated",
|
|
596
|
+
description:
|
|
597
|
+
"Switch the video export wizard to the Format, Camera, Overlay (profile), or Review step.",
|
|
598
|
+
input: studioVideoStepSetInput,
|
|
599
|
+
output: toolNoDataSchema,
|
|
600
|
+
},
|
|
601
|
+
} as const;
|