@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.
Files changed (521) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/LICENCE.fr.txt +280 -0
  3. package/LICENSE.txt +262 -0
  4. package/README.md +917 -2
  5. package/dist/agent/index.cjs +2600 -0
  6. package/dist/agent/index.cjs.map +1 -0
  7. package/dist/agent/index.d.cts +1237 -0
  8. package/dist/agent/index.d.ts +1237 -0
  9. package/dist/agent/index.js +2581 -0
  10. package/dist/agent/index.js.map +1 -0
  11. package/dist/chunk-3Oi_Zrtm.js +9 -0
  12. package/dist/chunk-3Oi_Zrtm.js.map +1 -0
  13. package/dist/chunk-B18OPIu_.js +6 -0
  14. package/dist/chunk-B18OPIu_.js.map +1 -0
  15. package/dist/chunk-B5Uz3Qct.cjs +15 -0
  16. package/dist/chunk-B5Uz3Qct.cjs.map +1 -0
  17. package/dist/chunk-BBEJwkd3.d.cts +839 -0
  18. package/dist/chunk-BIEc_SkR.cjs +29 -0
  19. package/dist/chunk-BIEc_SkR.cjs.map +1 -0
  20. package/dist/chunk-BKMFOe-N.js +171 -0
  21. package/dist/chunk-BKMFOe-N.js.map +1 -0
  22. package/dist/chunk-BP4uy7E1.d.ts +11583 -0
  23. package/dist/chunk-BSHTsFiB.js +1403 -0
  24. package/dist/chunk-BSHTsFiB.js.map +1 -0
  25. package/dist/chunk-BTUUABGI.js +17 -0
  26. package/dist/chunk-BTUUABGI.js.map +1 -0
  27. package/dist/chunk-BaPiaz5X.cjs +115 -0
  28. package/dist/chunk-BaPiaz5X.cjs.map +1 -0
  29. package/dist/chunk-BeCVpkYr.cjs +542 -0
  30. package/dist/chunk-BeCVpkYr.cjs.map +1 -0
  31. package/dist/chunk-BgngsvK8.cjs +6202 -0
  32. package/dist/chunk-BgngsvK8.cjs.map +1 -0
  33. package/dist/chunk-BhInd7CJ.d.cts +253 -0
  34. package/dist/chunk-Bn6ZbxkS.cjs +27 -0
  35. package/dist/chunk-By9ZnkVI.js +60 -0
  36. package/dist/chunk-By9ZnkVI.js.map +1 -0
  37. package/dist/chunk-BzqPhxsz.cjs +367 -0
  38. package/dist/chunk-BzqPhxsz.cjs.map +1 -0
  39. package/dist/chunk-C2mMX81q.d.ts +443 -0
  40. package/dist/chunk-C2rr9Q0V.cjs +1402 -0
  41. package/dist/chunk-C2rr9Q0V.cjs.map +1 -0
  42. package/dist/chunk-CDJCbwIQ.d.cts +78 -0
  43. package/dist/chunk-CLGvBOVH.d.cts +1654 -0
  44. package/dist/chunk-COdw1dc6.d.ts +525 -0
  45. package/dist/chunk-CQCJnT2i.d.ts +511 -0
  46. package/dist/chunk-CSyHY67q.cjs +353 -0
  47. package/dist/chunk-CSyHY67q.cjs.map +1 -0
  48. package/dist/chunk-CiK1Iqrv.js +950 -0
  49. package/dist/chunk-CiK1Iqrv.js.map +1 -0
  50. package/dist/chunk-CmJBgSwZ.cjs +24 -0
  51. package/dist/chunk-CmJBgSwZ.cjs.map +1 -0
  52. package/dist/chunk-CnrsRK2u.cjs +83 -0
  53. package/dist/chunk-CnrsRK2u.cjs.map +1 -0
  54. package/dist/chunk-Co782_9r.js +326 -0
  55. package/dist/chunk-Co782_9r.js.map +1 -0
  56. package/dist/chunk-Csr3KDpZ.cjs +32 -0
  57. package/dist/chunk-Csr3KDpZ.cjs.map +1 -0
  58. package/dist/chunk-CwkmccXv.js +89 -0
  59. package/dist/chunk-CwkmccXv.js.map +1 -0
  60. package/dist/chunk-D0Q4iL9B.cjs +255 -0
  61. package/dist/chunk-D0Q4iL9B.cjs.map +1 -0
  62. package/dist/chunk-DFwiSzUS.cjs +72 -0
  63. package/dist/chunk-DFwiSzUS.cjs.map +1 -0
  64. package/dist/chunk-DIFayl2P.d.cts +443 -0
  65. package/dist/chunk-DIGF58ux.d.cts +525 -0
  66. package/dist/chunk-DKuuuld5.js +101 -0
  67. package/dist/chunk-DKuuuld5.js.map +1 -0
  68. package/dist/chunk-DMePkFEo.js +5054 -0
  69. package/dist/chunk-DMePkFEo.js.map +1 -0
  70. package/dist/chunk-DO5SIBgu.js +305 -0
  71. package/dist/chunk-DO5SIBgu.js.map +1 -0
  72. package/dist/chunk-DOQ_7eE5.d.ts +6662 -0
  73. package/dist/chunk-DThaaNeb.d.cts +15 -0
  74. package/dist/chunk-DThaaNeb.d.ts +15 -0
  75. package/dist/chunk-DUQzjUJy.d.ts +78 -0
  76. package/dist/chunk-DX37IPhV.cjs +1903 -0
  77. package/dist/chunk-DX37IPhV.cjs.map +1 -0
  78. package/dist/chunk-Damps5Tk.cjs +155 -0
  79. package/dist/chunk-Damps5Tk.cjs.map +1 -0
  80. package/dist/chunk-DbK5PhpJ.d.ts +1654 -0
  81. package/dist/chunk-De0vAASv.d.ts +253 -0
  82. package/dist/chunk-DhSZ7YZt.d.cts +6662 -0
  83. package/dist/chunk-DjEvqvPA.cjs +43 -0
  84. package/dist/chunk-DjEvqvPA.cjs.map +1 -0
  85. package/dist/chunk-DkwDzwvu.d.cts +121 -0
  86. package/dist/chunk-DkwDzwvu.d.ts +121 -0
  87. package/dist/chunk-Dmszv9If.js +71 -0
  88. package/dist/chunk-Dmszv9If.js.map +1 -0
  89. package/dist/chunk-Dp_ftNWY.d.cts +511 -0
  90. package/dist/chunk-DsHQySz0.js +31 -0
  91. package/dist/chunk-DsHQySz0.js.map +1 -0
  92. package/dist/chunk-DwoUyHHh.js +281 -0
  93. package/dist/chunk-DwoUyHHh.js.map +1 -0
  94. package/dist/chunk-IaIDQflj.d.cts +2315 -0
  95. package/dist/chunk-IaIDQflj.d.ts +2315 -0
  96. package/dist/chunk-cVXLsZfL.d.ts +839 -0
  97. package/dist/chunk-mIaCX9EJ.d.cts +11583 -0
  98. package/dist/chunk-nJQxbOwQ.cjs +8962 -0
  99. package/dist/chunk-nJQxbOwQ.cjs.map +1 -0
  100. package/dist/chunk-o9jaxhCO.js +8852 -0
  101. package/dist/chunk-o9jaxhCO.js.map +1 -0
  102. package/dist/chunk-p-Tt_Lwz.js +14 -0
  103. package/dist/chunk-p-Tt_Lwz.js.map +1 -0
  104. package/dist/engines/index.cjs +2091 -0
  105. package/dist/engines/index.cjs.map +1 -0
  106. package/dist/engines/index.d.cts +2176 -0
  107. package/dist/engines/index.d.ts +2176 -0
  108. package/dist/engines/index.js +2075 -0
  109. package/dist/engines/index.js.map +1 -0
  110. package/dist/handlers/index.cjs +53 -0
  111. package/dist/handlers/index.cjs.map +1 -0
  112. package/dist/handlers/index.d.cts +403 -0
  113. package/dist/handlers/index.d.ts +403 -0
  114. package/dist/handlers/index.js +33 -0
  115. package/dist/handlers/index.js.map +1 -0
  116. package/dist/index.cjs +3511 -0
  117. package/dist/index.cjs.map +1 -0
  118. package/dist/index.d.cts +8 -0
  119. package/dist/index.d.ts +8 -0
  120. package/dist/index.js +3033 -0
  121. package/dist/index.js.map +1 -0
  122. package/dist/plugins/index.cjs +510 -0
  123. package/dist/plugins/index.cjs.map +1 -0
  124. package/dist/plugins/index.d.cts +296 -0
  125. package/dist/plugins/index.d.ts +296 -0
  126. package/dist/plugins/index.js +489 -0
  127. package/dist/plugins/index.js.map +1 -0
  128. package/dist/seams/index.cjs +89 -0
  129. package/dist/seams/index.cjs.map +1 -0
  130. package/dist/seams/index.d.cts +452 -0
  131. package/dist/seams/index.d.ts +452 -0
  132. package/dist/seams/index.js +49 -0
  133. package/dist/seams/index.js.map +1 -0
  134. package/dist/strings/fr/index.cjs +2135 -0
  135. package/dist/strings/fr/index.cjs.map +1 -0
  136. package/dist/strings/fr/index.d.cts +17 -0
  137. package/dist/strings/fr/index.d.ts +17 -0
  138. package/dist/strings/fr/index.js +2130 -0
  139. package/dist/strings/fr/index.js.map +1 -0
  140. package/dist/strings/index.cjs +2384 -0
  141. package/dist/strings/index.cjs.map +1 -0
  142. package/dist/strings/index.d.cts +3 -0
  143. package/dist/strings/index.d.ts +3 -0
  144. package/dist/strings/index.js +2353 -0
  145. package/dist/strings/index.js.map +1 -0
  146. package/dist/testing/index.cjs +230 -0
  147. package/dist/testing/index.cjs.map +1 -0
  148. package/dist/testing/index.d.cts +246 -0
  149. package/dist/testing/index.d.ts +246 -0
  150. package/dist/testing/index.js +219 -0
  151. package/dist/testing/index.js.map +1 -0
  152. package/dist/time/index.cjs +28 -0
  153. package/dist/time/index.cjs.map +1 -0
  154. package/dist/time/index.d.cts +41 -0
  155. package/dist/time/index.d.ts +41 -0
  156. package/dist/time/index.js +23 -0
  157. package/dist/time/index.js.map +1 -0
  158. package/package.json +224 -4
  159. package/src/agent/engines/agentThreads.ts +1601 -0
  160. package/src/agent/engines/directorChat.ts +500 -0
  161. package/src/agent/index.ts +67 -0
  162. package/src/agent/rules/agentEditLock.ts +115 -0
  163. package/src/agent/rules/agentErrorCopy.ts +44 -0
  164. package/src/agent/rules/copilotOrganization.ts +36 -0
  165. package/src/agent/rules/playbook.gen.ts +444 -0
  166. package/src/agent/rules/router.ts +518 -0
  167. package/src/agent/rules/stateDelta.ts +29 -0
  168. package/src/agent/rules/studioRouter.ts +123 -0
  169. package/src/agent/rules/surfaces.gen.ts +633 -0
  170. package/src/agent/rules/threadsUrl.ts +48 -0
  171. package/src/agent/rules/transcriptObserver.ts +90 -0
  172. package/src/agent/stores/agentThreads.ts +451 -0
  173. package/src/bus/contracts/noData.ts +18 -0
  174. package/src/bus/contracts/shared.ts +172 -0
  175. package/src/bus/contracts/studioTools.ts +224 -0
  176. package/src/bus/rules/bus.ts +857 -0
  177. package/src/bus/rules/confirmation.ts +22 -0
  178. package/src/bus/rules/defineRegistry.ts +24 -0
  179. package/src/bus/rules/errors.ts +401 -0
  180. package/src/bus/rules/handlerErrors.ts +103 -0
  181. package/src/bus/rules/handlerRegistry.ts +627 -0
  182. package/src/bus/rules/inputSchema.ts +232 -0
  183. package/src/bus/rules/invalidInput.ts +441 -0
  184. package/src/bus/rules/lateBoundTools.ts +100 -0
  185. package/src/bus/rules/studioRegistry.ts +324 -0
  186. package/src/bus/rules/studioToolBus.ts +73 -0
  187. package/src/bus/rules/types.ts +804 -0
  188. package/src/chrome/contracts/alert.ts +42 -0
  189. package/src/chrome/contracts/itinerary.ts +26 -0
  190. package/src/chrome/contracts/map.ts +23 -0
  191. package/src/chrome/contracts/overlay.ts +46 -0
  192. package/src/chrome/contracts/panel.ts +29 -0
  193. package/src/chrome/contracts/question.ts +52 -0
  194. package/src/chrome/contracts/selection.ts +26 -0
  195. package/src/chrome/contracts/sidenav.ts +23 -0
  196. package/src/chrome/contracts/snapshot.ts +319 -0
  197. package/src/chrome/contracts/state.ts +22 -0
  198. package/src/chrome/contracts/tabs.ts +56 -0
  199. package/src/chrome/handlers/alert.ts +91 -0
  200. package/src/chrome/handlers/introspection.ts +180 -0
  201. package/src/chrome/handlers/panels.ts +42 -0
  202. package/src/chrome/handlers/question.ts +24 -0
  203. package/src/chrome/handlers/sidenav.ts +116 -0
  204. package/src/chrome/handlers/snapshot.ts +451 -0
  205. package/src/chrome/handlers/stateDelta.ts +125 -0
  206. package/src/chrome/handlers/tabs.ts +143 -0
  207. package/src/chrome/handlers/timestamp.ts +19 -0
  208. package/src/chrome/rules/agentSelectors.ts +210 -0
  209. package/src/chrome/rules/mapAlert.ts +13 -0
  210. package/src/chrome/rules/question.ts +25 -0
  211. package/src/chrome/rules/tabs.ts +13 -0
  212. package/src/chrome/stores/activeDraftSession.ts +134 -0
  213. package/src/chrome/stores/chrome.ts +527 -0
  214. package/src/chrome/stores/uiStore.ts +575 -0
  215. package/src/collab/contracts/collab.ts +261 -0
  216. package/src/collab/handlers/collab.ts +468 -0
  217. package/src/collab/rules/toolNames.ts +33 -0
  218. package/src/collab/stores/collab.ts +899 -0
  219. package/src/collections/contracts/collection.ts +182 -0
  220. package/src/collections/handlers/collectionAttach.ts +141 -0
  221. package/src/collections/handlers/collections.ts +499 -0
  222. package/src/collections/handlers/heldCollection.ts +42 -0
  223. package/src/collections/handlers/restCollections.ts +386 -0
  224. package/src/collections/rules/collections.ts +138 -0
  225. package/src/collections/rules/entityCollections.ts +53 -0
  226. package/src/collections/stores/collections.ts +133 -0
  227. package/src/data/contracts/data.ts +233 -0
  228. package/src/data/contracts/itinerary.ts +71 -0
  229. package/src/data/handlers/activityResolve.ts +76 -0
  230. package/src/data/handlers/data.ts +200 -0
  231. package/src/data/handlers/graphql.ts +26 -0
  232. package/src/data/handlers/mutationSink.ts +1577 -0
  233. package/src/data/handlers/profile.ts +83 -0
  234. package/src/data/handlers/writeThrough.ts +417 -0
  235. package/src/data/rules/cache.ts +181 -0
  236. package/src/data/rules/dataTypes.ts +40 -0
  237. package/src/data/rules/keys.ts +106 -0
  238. package/src/data/rules/persistence.ts +1058 -0
  239. package/src/data/rules/requestBody.ts +43 -0
  240. package/src/data/rules/restErrors.ts +354 -0
  241. package/src/data/rules/sessionSurface.ts +156 -0
  242. package/src/data/rules/toolResultData.ts +73 -0
  243. package/src/data/rules/uuid.ts +24 -0
  244. package/src/edit/contracts/edit.ts +37 -0
  245. package/src/edit/contracts/itinerary.ts +57 -0
  246. package/src/edit/handlers/draftCommit.ts +257 -0
  247. package/src/edit/handlers/editDiscard.ts +34 -0
  248. package/src/edit/handlers/editLock.ts +949 -0
  249. package/src/edit/handlers/editor.ts +203 -0
  250. package/src/edit/handlers/formUnsaved.ts +24 -0
  251. package/src/edit/rules/draftMetadata.ts +117 -0
  252. package/src/edit/rules/editKeyboard.ts +222 -0
  253. package/src/edit/rules/editShortcuts.ts +102 -0
  254. package/src/edit/rules/editTooltip.ts +174 -0
  255. package/src/edit/rules/editorTaken.ts +49 -0
  256. package/src/edit/rules/history.ts +26 -0
  257. package/src/edit/rules/unsavedWork.ts +60 -0
  258. package/src/edit/stores/editorReservation.ts +70 -0
  259. package/src/edit/stores/formsUnsaved.ts +54 -0
  260. package/src/embed/contracts/embed.ts +48 -0
  261. package/src/embed/engines/embedFraming.ts +1329 -0
  262. package/src/embed/engines/embedReady.ts +353 -0
  263. package/src/embed/engines/framingPageSession.ts +169 -0
  264. package/src/embed/handlers/embed.ts +130 -0
  265. package/src/embed/rules/allowedDomains.ts +71 -0
  266. package/src/embed/rules/bridgeMessages.ts +224 -0
  267. package/src/embed/rules/defaults.ts +173 -0
  268. package/src/embed/rules/displaySeed.ts +115 -0
  269. package/src/embed/rules/embedAllowlist.ts +146 -0
  270. package/src/embed/rules/embedConstraints.ts +215 -0
  271. package/src/embed/rules/embedElements.ts +277 -0
  272. package/src/embed/rules/embedSectionFields.ts +126 -0
  273. package/src/embed/rules/embedSecurity.ts +116 -0
  274. package/src/embed/rules/fieldDependencies.ts +89 -0
  275. package/src/embed/rules/fieldOptions.ts +138 -0
  276. package/src/embed/rules/layerOptions.ts +161 -0
  277. package/src/embed/rules/readyProtocol.ts +66 -0
  278. package/src/embed/rules/safetyRules.ts +215 -0
  279. package/src/embed/rules/snippet.ts +531 -0
  280. package/src/embed/rules/tableCode.ts +270 -0
  281. package/src/embed/stores/embed.ts +60 -0
  282. package/src/embed/stores/embedContent.ts +77 -0
  283. package/src/engines/index.ts +81 -0
  284. package/src/handlers/index.ts +66 -0
  285. package/src/index.ts +1065 -0
  286. package/src/itinerary/contracts/itinerary.ts +705 -0
  287. package/src/itinerary/engines/itineraryPace.ts +612 -0
  288. package/src/itinerary/engines/profileMarker.ts +238 -0
  289. package/src/itinerary/handlers/importStaging.ts +352 -0
  290. package/src/itinerary/handlers/itinerary.ts +572 -0
  291. package/src/itinerary/handlers/itineraryDuplicate.ts +177 -0
  292. package/src/itinerary/handlers/itineraryExport.ts +117 -0
  293. package/src/itinerary/handlers/itineraryImport.ts +783 -0
  294. package/src/itinerary/handlers/itineraryPublish.ts +118 -0
  295. package/src/itinerary/handlers/itinerarySelection.ts +354 -0
  296. package/src/itinerary/handlers/itinerarySuggest.ts +1186 -0
  297. package/src/itinerary/handlers/itineraryUnpublish.ts +101 -0
  298. package/src/itinerary/handlers/publicationScope.ts +118 -0
  299. package/src/itinerary/handlers/restItineraries.ts +752 -0
  300. package/src/itinerary/handlers/restItineraryExport.ts +70 -0
  301. package/src/itinerary/handlers/restItineraryImport.ts +311 -0
  302. package/src/itinerary/handlers/restItineraryPace.ts +87 -0
  303. package/src/itinerary/handlers/restItineraryRecord.ts +36 -0
  304. package/src/itinerary/handlers/suggestParams.ts +379 -0
  305. package/src/itinerary/handlers/suggestStaging.ts +363 -0
  306. package/src/itinerary/handlers/surfaceOpen.ts +389 -0
  307. package/src/itinerary/rules/activity.ts +139 -0
  308. package/src/itinerary/rules/analysis.ts +42 -0
  309. package/src/itinerary/rules/ceiling.ts +49 -0
  310. package/src/itinerary/rules/createFlow.ts +107 -0
  311. package/src/itinerary/rules/densify.ts +440 -0
  312. package/src/itinerary/rules/draftSurface.ts +219 -0
  313. package/src/itinerary/rules/editorView.ts +83 -0
  314. package/src/itinerary/rules/export.ts +159 -0
  315. package/src/itinerary/rules/friendlyName.ts +77 -0
  316. package/src/itinerary/rules/import.ts +1050 -0
  317. package/src/itinerary/rules/importFiles.ts +140 -0
  318. package/src/itinerary/rules/importTotals.ts +77 -0
  319. package/src/itinerary/rules/liveSegment.ts +712 -0
  320. package/src/itinerary/rules/lngLat.ts +17 -0
  321. package/src/itinerary/rules/mapSync.ts +100 -0
  322. package/src/itinerary/rules/previewRender.ts +416 -0
  323. package/src/itinerary/rules/profileReadout.ts +216 -0
  324. package/src/itinerary/rules/routing.ts +707 -0
  325. package/src/itinerary/rules/suggest.ts +522 -0
  326. package/src/itinerary/rules/suggestionPreview.ts +119 -0
  327. package/src/itinerary/rules/view.ts +61 -0
  328. package/src/itinerary/stores/importSession.ts +319 -0
  329. package/src/itinerary/stores/itinerary.ts +331 -0
  330. package/src/itinerary/stores/itineraryDuplicate.ts +76 -0
  331. package/src/itinerary/stores/sessionIdentity.ts +43 -0
  332. package/src/itinerary/stores/suggestSession.ts +418 -0
  333. package/src/layers/contracts/itinerary.ts +46 -0
  334. package/src/layers/contracts/overlay.ts +132 -0
  335. package/src/layers/handlers/enrichment.ts +36 -0
  336. package/src/layers/handlers/overlay.ts +406 -0
  337. package/src/layers/handlers/restLayers.ts +94 -0
  338. package/src/layers/handlers/tiles.ts +25 -0
  339. package/src/layers/rules/layers.ts +212 -0
  340. package/src/layers/rules/overlayInstant.ts +12 -0
  341. package/src/layers/rules/reachabilityIcon.ts +18 -0
  342. package/src/layers/rules/readout.ts +102 -0
  343. package/src/layers/stores/layers.ts +262 -0
  344. package/src/map/contracts/contextmenu.ts +33 -0
  345. package/src/map/contracts/geolocate.ts +37 -0
  346. package/src/map/contracts/map.ts +146 -0
  347. package/src/map/contracts/streetview.ts +53 -0
  348. package/src/map/contracts/terrain.ts +152 -0
  349. package/src/map/handlers/contextMenu.ts +135 -0
  350. package/src/map/handlers/geolocate.ts +52 -0
  351. package/src/map/handlers/map.ts +391 -0
  352. package/src/map/handlers/streetview.ts +94 -0
  353. package/src/map/handlers/terrain.ts +663 -0
  354. package/src/map/rules/baseTerrain.ts +75 -0
  355. package/src/map/rules/clickTargets.ts +464 -0
  356. package/src/map/rules/constraints.ts +32 -0
  357. package/src/map/rules/contextMenuReadout.ts +67 -0
  358. package/src/map/rules/coordinates.ts +71 -0
  359. package/src/map/rules/itineraryFit.ts +8 -0
  360. package/src/map/rules/mapEvents.ts +64 -0
  361. package/src/map/rules/mapProjection.ts +476 -0
  362. package/src/map/rules/terrainReading.ts +62 -0
  363. package/src/plugins/contracts/ids.ts +66 -0
  364. package/src/plugins/contracts/plugin.ts +202 -0
  365. package/src/plugins/contracts/slots.ts +137 -0
  366. package/src/plugins/engines/studioPlugin.ts +1365 -0
  367. package/src/plugins/index.ts +111 -0
  368. package/src/plugins/rules/contributions.ts +152 -0
  369. package/src/plugins/rules/errors.ts +60 -0
  370. package/src/plugins/rules/ids.ts +42 -0
  371. package/src/plugins/rules/validation.ts +249 -0
  372. package/src/rules/listeners.ts +57 -0
  373. package/src/rules/origin.ts +13 -0
  374. package/src/rules/storeWrite.ts +37 -0
  375. package/src/rules/types.ts +136 -0
  376. package/src/seams/index.ts +79 -0
  377. package/src/seams/rules/clock.ts +28 -0
  378. package/src/seams/rules/formatters.ts +211 -0
  379. package/src/seams/rules/ids.ts +102 -0
  380. package/src/seams/rules/links.ts +66 -0
  381. package/src/seams/rules/navigation.ts +222 -0
  382. package/src/seams/rules/notify.ts +49 -0
  383. package/src/seams/rules/persistenceDrawer.ts +220 -0
  384. package/src/seams/rules/saveFile.ts +101 -0
  385. package/src/seams/rules/seams.ts +156 -0
  386. package/src/seams/rules/storage.ts +116 -0
  387. package/src/search/contracts/overlay.ts +74 -0
  388. package/src/search/contracts/search.ts +197 -0
  389. package/src/search/handlers/pois.ts +57 -0
  390. package/src/search/handlers/search.ts +280 -0
  391. package/src/search/rules/params.ts +925 -0
  392. package/src/search/rules/poiGroups.ts +138 -0
  393. package/src/search/rules/searchFetch.ts +139 -0
  394. package/src/search/rules/timeWindow.ts +30 -0
  395. package/src/search/stores/search.ts +51 -0
  396. package/src/segments/contracts/itinerary.ts +433 -0
  397. package/src/segments/contracts/segment.ts +35 -0
  398. package/src/segments/engines/segmentDraft.ts +926 -0
  399. package/src/segments/handlers/chainGuards.ts +67 -0
  400. package/src/segments/handlers/directions.ts +44 -0
  401. package/src/segments/handlers/itineraryEcho.ts +45 -0
  402. package/src/segments/handlers/roadAccessDialog.ts +34 -0
  403. package/src/segments/handlers/segment.ts +111 -0
  404. package/src/segments/handlers/segmentEdit.ts +1341 -0
  405. package/src/segments/handlers/segmentGroups.ts +347 -0
  406. package/src/segments/handlers/segmentStructure.ts +1144 -0
  407. package/src/segments/rules/chain.ts +196 -0
  408. package/src/segments/rules/chainModel.ts +217 -0
  409. package/src/segments/rules/colors.ts +11 -0
  410. package/src/segments/rules/commit.ts +76 -0
  411. package/src/segments/rules/draft.ts +90 -0
  412. package/src/segments/rules/draftDisposition.ts +43 -0
  413. package/src/segments/rules/draftSegmentEdit.ts +129 -0
  414. package/src/segments/rules/engine.ts +222 -0
  415. package/src/segments/rules/groupSave.ts +234 -0
  416. package/src/segments/rules/hazardPrompt.ts +60 -0
  417. package/src/segments/rules/itineraryEcho.ts +40 -0
  418. package/src/segments/rules/liveSegmentProjection.ts +55 -0
  419. package/src/segments/rules/merge.ts +51 -0
  420. package/src/segments/rules/metrics.ts +456 -0
  421. package/src/segments/rules/naming.ts +168 -0
  422. package/src/segments/rules/segmentArming.ts +144 -0
  423. package/src/segments/rules/splitPick.ts +84 -0
  424. package/src/segments/rules/viaSimplify.ts +230 -0
  425. package/src/segments/stores/directions.ts +77 -0
  426. package/src/segments/stores/roadAccessDialog.ts +58 -0
  427. package/src/segments/stores/segmentEdit.ts +922 -0
  428. package/src/segments/stores/segmentGroupEdit.ts +84 -0
  429. package/src/segments/stores/segmentSplit.ts +77 -0
  430. package/src/share/contracts/share.ts +39 -0
  431. package/src/share/contracts/shareLink.ts +63 -0
  432. package/src/share/engines/shareLink.ts +1053 -0
  433. package/src/share/handlers/share.ts +47 -0
  434. package/src/share/handlers/shareLink.ts +231 -0
  435. package/src/share/handlers/shareScope.ts +54 -0
  436. package/src/share/rules/link.ts +89 -0
  437. package/src/share/rules/shareLink.ts +218 -0
  438. package/src/share/rules/targets.ts +92 -0
  439. package/src/share/rules/viewConfig.ts +95 -0
  440. package/src/share/stores/share.ts +58 -0
  441. package/src/strings/fr/index.ts +18 -0
  442. package/src/strings/fr/rules/fr.ts +2368 -0
  443. package/src/strings/index.ts +98 -0
  444. package/src/strings/rules/confirmCopy.ts +156 -0
  445. package/src/strings/rules/draftToolNames.ts +94 -0
  446. package/src/strings/rules/en.ts +2519 -0
  447. package/src/strings/rules/failureAlert.ts +115 -0
  448. package/src/strings/rules/formError.ts +400 -0
  449. package/src/strings/rules/maneuvers.ts +107 -0
  450. package/src/strings/rules/outputOptions.ts +126 -0
  451. package/src/strings/rules/publicationState.ts +100 -0
  452. package/src/strings/rules/routeHazardCopy.ts +62 -0
  453. package/src/strings/rules/searchLabels.ts +50 -0
  454. package/src/strings/rules/segmentChainVerbs.ts +62 -0
  455. package/src/strings/rules/studioCopy.ts +130 -0
  456. package/src/strings/rules/unitOptions.ts +119 -0
  457. package/src/testing/checkedBus.ts +226 -0
  458. package/src/testing/index.ts +30 -0
  459. package/src/testing/plugins.ts +106 -0
  460. package/src/testing/studio.ts +267 -0
  461. package/src/testing/urlSeam.ts +153 -0
  462. package/src/time/index.ts +12 -0
  463. package/src/time/rules/sun.ts +78 -0
  464. package/src/video/contracts/cameraSchemas.ts +266 -0
  465. package/src/video/contracts/profileSchemas.ts +37 -0
  466. package/src/video/contracts/video.ts +601 -0
  467. package/src/video/handlers/video.ts +1638 -0
  468. package/src/video/handlers/videoDirector.ts +114 -0
  469. package/src/video/rules/previewRefresh.ts +76 -0
  470. package/src/video/rules/profileSource.ts +51 -0
  471. package/src/video/rules/routeSpans.ts +79 -0
  472. package/src/video/rules/shotDefaults.ts +28 -0
  473. package/src/video/rules/stepOrder.ts +17 -0
  474. package/src/video/rules/videoSnapshot.ts +136 -0
  475. package/src/video/stores/directorThreads.ts +167 -0
  476. package/src/video/stores/videoExport.ts +290 -0
  477. package/src/viewer/contracts/preferences.ts +40 -0
  478. package/src/viewer/handlers/preferences.ts +91 -0
  479. package/src/viewer/rules/capabilities.ts +42 -0
  480. package/src/viewer/rules/config.ts +266 -0
  481. package/src/viewer/rules/context.ts +375 -0
  482. package/src/viewer/rules/ownership.ts +134 -0
  483. package/src/viewer/rules/platformViewer.ts +199 -0
  484. package/src/viewer/rules/scope.ts +197 -0
  485. package/src/viewer/rules/url.ts +145 -0
  486. package/src/viewer/rules/viewer.ts +307 -0
  487. package/src/viewer/rules/viewerSeam.ts +49 -0
  488. package/src/viewer/rules/viewerUnits.ts +34 -0
  489. package/src/waypoints/contracts/itinerary.ts +417 -0
  490. package/src/waypoints/handlers/poiWaypointStyle.ts +32 -0
  491. package/src/waypoints/handlers/waypointDetailsDialog.ts +38 -0
  492. package/src/waypoints/handlers/waypointEdit.ts +1073 -0
  493. package/src/waypoints/rules/amenities.ts +30 -0
  494. package/src/waypoints/rules/defaults.ts +31 -0
  495. package/src/waypoints/rules/details.ts +213 -0
  496. package/src/waypoints/rules/detailsDraft.ts +312 -0
  497. package/src/waypoints/rules/detailsPreview.ts +76 -0
  498. package/src/waypoints/rules/detailsSave.ts +356 -0
  499. package/src/waypoints/rules/draftDirty.ts +45 -0
  500. package/src/waypoints/rules/icons.ts +32 -0
  501. package/src/waypoints/rules/liveWaypoint.ts +63 -0
  502. package/src/waypoints/rules/naming.ts +185 -0
  503. package/src/waypoints/rules/sections.ts +77 -0
  504. package/src/waypoints/rules/waypointDraft.ts +62 -0
  505. package/src/waypoints/stores/waypointDetails.ts +62 -0
  506. package/src/waypoints/stores/waypointEdit.ts +566 -0
  507. package/src/zones/contracts/collection.ts +37 -0
  508. package/src/zones/contracts/zone.ts +528 -0
  509. package/src/zones/engines/zoneForm.ts +1773 -0
  510. package/src/zones/handlers/restZones.ts +287 -0
  511. package/src/zones/handlers/zonePublish.ts +206 -0
  512. package/src/zones/handlers/zoneUnpublish.ts +56 -0
  513. package/src/zones/handlers/zones.ts +2254 -0
  514. package/src/zones/rules/geometry.ts +946 -0
  515. package/src/zones/rules/zoneDefaults.ts +34 -0
  516. package/src/zones/rules/zoneDraft.ts +54 -0
  517. package/src/zones/rules/zoneForm.ts +563 -0
  518. package/src/zones/rules/zoneMetadata.ts +29 -0
  519. package/src/zones/rules/zoneSource.ts +87 -0
  520. package/src/zones/rules/zoneSourceRefusal.ts +104 -0
  521. package/src/zones/stores/zoneEdit.ts +998 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["z","MountayaElementsError","z","studioPluginIdPattern","RESERVED_PLUGIN_NAMESPACES","studioContributionIdPattern","surfaceFault","MountayaElementsError"],"sources":["../../src/plugins/contracts/slots.ts","../../src/plugins/rules/contributions.ts","../../src/plugins/rules/errors.ts","../../src/plugins/rules/ids.ts","../../src/plugins/rules/validation.ts","../../src/plugins/engines/studioPlugin.ts"],"mappings":";;;;;;;;;;;AAsBA,MAAa,yBAAyBA,IAAE,KAAK;CAC3C;CACA;C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F,KAAM,MAAwE,QAAQ;CACxF;CAgBA,MAAc,UAAkB,WAAiD;EAC/E,MAAM,sBAAM,IAAI,IAAY;EAC5B,MAAM,wBAAQ,IAAI,IAAY;EAC9B,MAAM,OAAO,KAAK,SAAS,KAAA,IAAY,KAAA,IAAY,KAAK,WAAW,IAAI,KAAK,IAAI;EAChF,MAAM,SAAS,KAAK,MAAM,WAAW,KAAK,CAAC;EAC3C,MAAM,eAAe,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC,KAAK,MAAM,IAAI,CAAC,CAAC;EAEpE,KAAK,MAAM,CAAC,MAAM,SAAS,QAAQ,CAAC,GAClC,IAAI,KAAK,aAAa,YAAY,YAAY,MAAM,aAAa,IAAI,IAAI,CAAC,GACxE,IAAI,IAAI,IAAI;EAIhB,KAAK,MAAM,CAAC,MAAM,UAAU,KAAK,WAC/B,IAAI,aAAa,UAAU,UACzB,IAAI,IAAI,IAAI;OAEZ,MAAM,IAAI,IAAI;EAIlB,KAAK,MAAM,QAAQ,QACjB,IAAI,CAAC,IAAI,IAAI,KAAK,IAAI,GACpB,MAAM,IAAI,KAAK,IAAI;EAIvB,MAAM,YAAY,IAAI,IAAI,KAAK,QAAQ,KAAK,CAAC;EAC7C,IAAI,WACF,UAAU,OAAO,QAAQ;EAG3B,OAAO;GAAE;GAAW;EAAM;CAC5B;CAUA,SAAuB;EACrB,KAAK,YAAY;EAEjB,kBAAA,gBAAgB,KAAK,SAAS;CAChC;CAGA,KAAa,OAAmC;EAC9C,kBAAA,gBAAgB,KAAK,WAAW,KAAK;CACvC;AACF"}
@@ -0,0 +1,296 @@
1
+ import { C as StudioPluginWaypointMenuTarget, S as StudioPluginTarget, T as studioPluginSlotSchema, _ as StudioPluginMapControlsTarget, a as StudioPluginRunEvent, b as StudioPluginSlot, c as StudioPlugin, d as StudioPluginGate, f as StudioPluginSubject, g as StudioPluginMapContextMenuTarget, h as StudioPluginItineraryMenuTarget, i as StudioPluginRefusalReporter, l as StudioPluginContribution, m as StudioSlotEntry, n as StudioPluginEngineOptions, o as StudioPluginRunOutcome, p as StudioSlotContribution, r as StudioPluginObserver, s as StudioPluginToolSink, t as StudioPluginEngine, u as StudioPluginEntry, v as StudioPluginProfileTarget, w as StudioPluginZoneMenuTarget, x as StudioPluginSlotTargets, y as StudioPluginSegmentMenuTarget } from "../chunk-BBEJwkd3.cjs";
2
+ import { a as StudioToolContext } from "../chunk-mIaCX9EJ.cjs";
3
+ import * as z$1 from "zod";
4
+ import { MountayaElementsError } from "@mountaya/elements/errors";
5
+ /**
6
+ * The grammar a plugin id and a contribution id are held to.
7
+ *
8
+ * A plugin's tools land on the SAME bus the studio's own verbs are registered on, and its
9
+ * contributions land in the SAME menus. Both are namespaces a third party is writing into, so
10
+ * the only thing standing between "acme adds an export verb" and "acme shadows
11
+ * `studio.itinerary.export`" is a rule about names.
12
+ *
13
+ * It is a rule rather than a list, deliberately. A list of reserved tool names is right the day
14
+ * it is written and wrong the day the next tool ships, and nobody would notice: the new studio
15
+ * verb would collide with a plugin that had been installed for a year. Three rules do the whole
16
+ * job instead (a plugin id is vendor-namespaced, the first segment may not be ours, and a
17
+ * plugin's tools are prefixed with its own id), and none of them goes stale.
18
+ *
19
+ * **It is a collision discipline, not a sandbox.** A plugin runs in the host's own realm with the
20
+ * host's own tool context: it can dispatch every verb and write every store, whatever these
21
+ * patterns say about names. What they buy is that two vendors and the package itself can never
22
+ * mean the same name by accident. What decides whether a plugin may do any of it is the host's
23
+ * decision to install it.
24
+ *
25
+ * What stops a plugin REMOVING one of the studio's verbs is a different mechanism, one directory
26
+ * over, and it is worth knowing which does which: `ctx.bus` carries `ToolBus.dispatcher` (two
27
+ * methods and nothing else on the object), so a plugin's `run` cannot reach `unregister` in
28
+ * TypeScript or out of it. {@link RESERVED_PLUGIN_NAMESPACES} is read a second time behind that,
29
+ * as the bus's own `reserved`, which covers whoever holds a concrete bus. Names are what these
30
+ * patterns are for; reachability is what that pair is for.
31
+ */
32
+ /**
33
+ * studioPluginIdPattern is the shape of a plugin id: two or more dot-joined lowercase slugs.
34
+ *
35
+ * The first segment is the VENDOR (`acme.avalanche`, `alpine-club.huts`), which is what makes a
36
+ * collision between two organizations' plugins something neither has to think about. A single
37
+ * segment is refused precisely because it is the shape a collision arrives in: `avalanche` is a
38
+ * name two vendors both reach for, and `acme.avalanche` is not.
39
+ *
40
+ * Lowercase and hyphen-separated inside a segment, so an id reads the same in a URL, a log line
41
+ * and a settings file. A digit is allowed after the first character, which is what lets a vendor
42
+ * version a plugin in its own id (`acme.avalanche2`) without a second vocabulary for it.
43
+ */
44
+ export declare const studioPluginIdPattern: RegExp;
45
+ /**
46
+ * studioContributionIdPattern is the same grammar with one segment allowed.
47
+ *
48
+ * A contribution id is LOCAL to its plugin (the registry qualifies it with the plugin's id
49
+ * before anything else sees it), so `send-to-strava` is unambiguous where a bare plugin id would
50
+ * not be. Dots are still allowed, so a plugin contributing to several surfaces can group its own
51
+ * ids (`export.strava`, `export.garmin`) rather than flattening them.
52
+ */
53
+ export declare const studioContributionIdPattern: RegExp;
54
+ /**
55
+ * RESERVED_PLUGIN_NAMESPACES are the first segments a plugin may not claim.
56
+ *
57
+ * `mountaya` and `studio` are the two this package's own names are built from (every shipped
58
+ * tool is `studio.<surface>.<verb>`), so a plugin holding either as its vendor segment could
59
+ * produce a prefixed tool name indistinguishable from one of ours. Reserving them is what makes
60
+ * {@link studioPluginIdPattern} plus the tool prefix a complete answer rather than a
61
+ * convention that happens to hold.
62
+ *
63
+ * `as const` rather than `readonly string[]`, so the two names are in the TYPE as well as in the
64
+ * value. A port generating its own vocabulary from this list, or a host narrowing a vendor
65
+ * segment against it, reads them off the declaration instead of restating them.
66
+ */
67
+ export declare const RESERVED_PLUGIN_NAMESPACES: readonly ["mountaya", "studio"];
68
+ /**
69
+ * Whether a contribution shows, and in what order: the two render-time questions.
70
+ *
71
+ * Both are here rather than on the registry, and that split is the registry's whole snapshot
72
+ * contract: `at(slot)` is a STORE, stable between mutations, and a gate reads the tool context,
73
+ * which changes underneath it. A gated snapshot could not be stable by construction, so the
74
+ * registry hands back everything installed and the surface filters at render.
75
+ */
76
+ /**
77
+ * StudioGatedContribution is the shape gating needs, which both a declaration and a resolved
78
+ * registry entry satisfy.
79
+ *
80
+ * Exported because it appears in an exported signature. An unexported local surfaces in the
81
+ * emitted `.d.ts` as a type a consumer can read and cannot NAME, so a host writing their own
82
+ * helper over the same rule, or a port author writing the constraint down, has nothing to import.
83
+ */
84
+ interface StudioGatedContribution {
85
+ readonly gate?: StudioPluginGate | undefined;
86
+ }
87
+ /**
88
+ * StudioOrderedContribution is the shape sorting needs: a declared `order` and an install-order
89
+ * tiebreak.
90
+ *
91
+ * `sequence` is optional and absent means 0, which is what lets a host sort DECLARATIONS: a
92
+ * `StudioPluginContribution` has no sequence, because the number is assigned when the registry
93
+ * adopts one. Exported for the reason {@link StudioGatedContribution} is.
94
+ */
95
+ interface StudioOrderedContribution {
96
+ readonly order?: number | undefined;
97
+ readonly sequence?: number | undefined;
98
+ }
99
+ /**
100
+ * isStudioContributionAvailable answers whether a contribution's gate passes right now.
101
+ *
102
+ * STRUCTURAL in its first argument (it asks for a `gate` and nothing else), so it applies
103
+ * unchanged to a declaration a host is validating and to an entry the registry already holds. A
104
+ * signature naming either concrete type would need a second copy for the other.
105
+ *
106
+ * The three clauses are ANDed and each ABSENT one is no constraint, so a contribution with no
107
+ * gate is always available. A `when` that THROWS resolves to unavailable: a predicate that
108
+ * cannot answer has not said yes, and this runs inside somebody else's render, so letting the
109
+ * throw out would take the whole menu down over one plugin's bad guard. The fault still reaches
110
+ * the program's uncaught-error handling on a microtask, once per gate however often the gate is
111
+ * asked, so the author of an item that never shows has a signal. A `when` that answers anything
112
+ * but `true` is unavailable for the same reason, and is no fault.
113
+ */
114
+ export declare const isStudioContributionAvailable: (contribution: StudioGatedContribution, ctx: StudioToolContext) => boolean;
115
+ /**
116
+ * availableStudioContributions filters a list to the contributions whose gates pass.
117
+ *
118
+ * **It returns its INPUT by reference when nothing was dropped**, and that is the property the
119
+ * whole thing exists for rather than an optimisation. Its caller is a `useMemo` feeding a list
120
+ * that re-renders per segment row; a fresh array on every render would churn every consumer of
121
+ * it, and the common case by far is that every gate passes.
122
+ */
123
+ export declare const availableStudioContributions: <TContribution extends StudioGatedContribution>(contributions: readonly TContribution[], ctx: StudioToolContext) => readonly TContribution[];
124
+ /**
125
+ * sortStudioContributions returns a new list in render order: `order` ascending, ties on install
126
+ * order.
127
+ *
128
+ * The tiebreak is what makes the result TOTAL. `order` is an uncoordinated number a plugin
129
+ * author picks alone, so two plugins choosing `100` is the normal case rather than the edge one,
130
+ * and `sequence` resolves it the same way on every render and every reload.
131
+ */
132
+ export declare const sortStudioContributions: <TContribution extends StudioOrderedContribution>(contributions: readonly TContribution[]) => TContribution[];
133
+ /**
134
+ * studioPluginDefectCodeSchema is every way a plugin declaration can be refused, closed.
135
+ *
136
+ * CODES rather than sentences, for the reason every other vocabulary in this package is one:
137
+ * this package renders nothing and translates nothing, so a defect carrying an English string
138
+ * would put English in a host's French settings screen. A host that surfaces install failures
139
+ * maps these to their own copy; a host that only logs them reads the code.
140
+ *
141
+ * What each one means:
142
+ *
143
+ * - `contribution_empty`: neither `label` + `run` nor `view`, so there is nothing to draw. A
144
+ * `view` of `null` and a `label` of `""` count as absent: both draw nothing, which is the thing
145
+ * being refused rather than a spelling of it.
146
+ * - `contribution_id_duplicate`: two contributions in ONE plugin share an id.
147
+ * - `contribution_id_invalid`: the id is not {@link studioContributionIdPattern}.
148
+ * - `plugin_id_invalid`: the id is not {@link studioPluginIdPattern}; usually a missing
149
+ * vendor segment.
150
+ * - `plugin_id_reserved`: the vendor segment is one of {@link RESERVED_PLUGIN_NAMESPACES}.
151
+ * - `plugin_id_taken`: a plugin with this id is already installed.
152
+ * - `slot_unknown`: the slot names no region this studio has.
153
+ * - `tool_key_mismatch`: the record key is not the tool's own `name`, which would make the
154
+ * declaration read one way and register another.
155
+ * - `tool_name_empty`: the tool name is the plugin's prefix and nothing more, so the tool has no
156
+ * name of its own. The name carries the id, which is why this is a code of its own and no case
157
+ * of `tool_name_not_namespaced`.
158
+ * - `tool_name_not_namespaced`: the tool name is not prefixed with the plugin's id.
159
+ * - `tool_name_taken`: the bus already holds this name, the studio's own verbs included.
160
+ */
161
+ export declare const studioPluginDefectCodeSchema: z$1.ZodEnum<{
162
+ contribution_empty: "contribution_empty";
163
+ contribution_id_duplicate: "contribution_id_duplicate";
164
+ contribution_id_invalid: "contribution_id_invalid";
165
+ plugin_id_invalid: "plugin_id_invalid";
166
+ plugin_id_reserved: "plugin_id_reserved";
167
+ plugin_id_taken: "plugin_id_taken";
168
+ slot_unknown: "slot_unknown";
169
+ tool_key_mismatch: "tool_key_mismatch";
170
+ tool_name_empty: "tool_name_empty";
171
+ tool_name_not_namespaced: "tool_name_not_namespaced";
172
+ tool_name_taken: "tool_name_taken";
173
+ }>;
174
+ /** One way a plugin declaration is refused, derived from {@link studioPluginDefectCodeSchema}. */
175
+ type StudioPluginDefectCode = z$1.infer<typeof studioPluginDefectCodeSchema>;
176
+ /**
177
+ * StudioPluginDefect is one refusal: what was wrong, whose plugin it was, and which part of it.
178
+ *
179
+ * `subject` is the contribution id, tool name or slot the code is about, and it is absent for
180
+ * the three codes that are about the plugin id itself, where `pluginId` already names the
181
+ * subject and repeating it would read as two different things being wrong.
182
+ */
183
+ interface StudioPluginDefect {
184
+ readonly code: StudioPluginDefectCode;
185
+ readonly pluginId: string;
186
+ readonly subject?: string | undefined;
187
+ }
188
+ /**
189
+ * StudioPluginValidationScope is what the rest of the world already holds, passed IN.
190
+ *
191
+ * Passed and never read, which keeps the validation pure and portable: `plugin_id_taken` and
192
+ * `tool_name_taken` are about collisions, and a collision is a question about a live registry and
193
+ * a live bus, neither of which a rule may reach for. A port reimplements the validation against
194
+ * its own two sets and gets the same answers.
195
+ */
196
+ interface StudioPluginValidationScope {
197
+ /** The plugin ids already installed. */
198
+ readonly installed: ReadonlySet<string>;
199
+ /** Every tool name already on the bus, the studio's own verbs included. */
200
+ readonly tools: ReadonlySet<string>;
201
+ }
202
+ /**
203
+ * validateStudioPlugin returns every defect in a declaration, or an empty list.
204
+ *
205
+ * **Every defect, never the first.** An install is refused as a whole, so stopping early would
206
+ * teach an author one fix per attempt: three malformed contribution ids costing three
207
+ * reinstalls to discover. The list is the report.
208
+ *
209
+ * It reports rather than throws for the same reason: the caller decides what a refusal IS. The
210
+ * registry's `install` throws a {@link StudioPluginError} carrying this list, because an install
211
+ * a host asked for and did not get has to be loud; a host validating a plugin they are about to
212
+ * offer in a settings screen wants the list and no exception.
213
+ *
214
+ * It is total over what a wire can hold. A manifest read from storage has no type behind it, so
215
+ * every member is read as it stands: an id that is no string is `plugin_id_invalid` under an
216
+ * empty `pluginId`, a contribution whose label is no text or whose `run` is no function has
217
+ * nothing to draw, contributions that are no list are read as one malformed contribution, and a
218
+ * tool that holds no name is a `tool_key_mismatch` under its key, as tools that are no record
219
+ * are one under what stands there.
220
+ *
221
+ * @param plugin - The declaration to judge, typed or read off a wire.
222
+ * @param scope - The plugin ids and tool names already taken, for the collision codes.
223
+ * @returns Every defect found, in declaration order; empty for a declaration that installs.
224
+ */
225
+ export declare const validateStudioPlugin: <TView>(plugin: StudioPlugin<TView>, scope: StudioPluginValidationScope) => readonly StudioPluginDefect[];
226
+ /**
227
+ * StudioPluginError is what a refused install throws, carrying every defect that refused it.
228
+ *
229
+ * Every defect rather than the first, which is why the list is on the error rather than folded
230
+ * into the message: a plugin with three malformed contribution ids should report three, once,
231
+ * rather than teaching its author one fix per reinstall. The `message` is a readable join of the
232
+ * codes for a log line; `defects` is the part a host's own surface renders.
233
+ *
234
+ * It extends the ELEMENTS' error family rather than starting a studio family of its own, which
235
+ * is the rule `boundary.test.ts` holds this package to: a consumer narrows on ONE family across
236
+ * the whole stack, and a second hierarchy would mean two.
237
+ */
238
+ export declare class StudioPluginError extends MountayaElementsError {
239
+ readonly name: string;
240
+ readonly defects: readonly StudioPluginDefect[];
241
+ constructor(defects: readonly StudioPluginDefect[], options?: ErrorOptions);
242
+ }
243
+ /**
244
+ * isStudioPluginError recognises a refused install STRUCTURALLY, with no `instanceof`.
245
+ *
246
+ * The reason generalizes past this package and is written out in `data/rules/restErrors.ts`:
247
+ * `instanceof` asks whether a value came from one constructor IDENTITY, which is a stronger
248
+ * question than any caller here is asking. A second copy of this module in a consumer's graph, a
249
+ * structured clone across a worker boundary, a bundler that duplicated the chunk: each breaks
250
+ * the check while leaving the value perfectly intact, and none of them fails loudly.
251
+ *
252
+ * It checks the DEFECT LIST as well as the name, because the name alone is a predicate anything
253
+ * can satisfy, and everything downstream of this narrowing reads `.defects` as a non-optional
254
+ * array. A structured clone carries the list; `{ name: "StudioPluginError" }` does not, and is
255
+ * exactly the shape that would otherwise pass here and throw at the first `.map`.
256
+ */
257
+ export declare const isStudioPluginError: (error: unknown) => error is StudioPluginError;
258
+ /**
259
+ * How a plugin's names are kept out of everybody else's.
260
+ *
261
+ * Three rules, and they only work together: plugin ids are unique and vendor-namespaced, the
262
+ * reserved namespaces are refused, and every tool a plugin registers carries its plugin's id as
263
+ * a prefix. That composition is what protects the studio's `studio.*` verbs without a list of
264
+ * reserved tool names, a list that would be complete the day it is written and silently wrong
265
+ * the day the next studio tool ships.
266
+ */
267
+ /**
268
+ * studioPluginToolPrefix is what every tool a plugin registers must start with.
269
+ *
270
+ * `${pluginId}.`: a DOT, because a tool name is already a dotted path
271
+ * (`studio.itinerary.export`) and a plugin's verbs should read as one: `acme.avalanche.refresh`
272
+ * is a tool name a model can be shown beside the studio's own without explanation.
273
+ */
274
+ export declare const studioPluginToolPrefix: (pluginId: string) => string;
275
+ /**
276
+ * isStudioPluginToolName answers whether a tool name belongs to a given plugin.
277
+ *
278
+ * The prefix and not merely a `startsWith` on the bare id: `acme.avalanche` must not be read as
279
+ * owning `acme.avalanche-pro.refresh`, which is a different plugin from a vendor who picked an
280
+ * adjacent name.
281
+ *
282
+ * It reads the prefix and nothing after it, so `acme.avalanche.` belongs to `acme.avalanche`
283
+ * while naming no tool. `validateStudioPlugin` refuses that name under `tool_name_empty`.
284
+ */
285
+ export declare const isStudioPluginToolName: (pluginId: string, name: string) => boolean;
286
+ /**
287
+ * qualifyStudioContributionId makes a plugin-local contribution id globally unique.
288
+ *
289
+ * A COLON separates the two halves, and the choice is load-bearing rather than cosmetic: a dot
290
+ * already separates a tool's namespaces and a slot's regions, so `acme.avalanche.risk` would be
291
+ * ambiguous about where the plugin ends. `acme.avalanche:risk` cannot be misread, and it splits
292
+ * back apart with no grammar.
293
+ */
294
+ export declare const qualifyStudioContributionId: (pluginId: string, contributionId: string) => string;
295
+ export { type StudioGatedContribution, type StudioOrderedContribution, type StudioPlugin, type StudioPluginContribution, type StudioPluginDefect, type StudioPluginDefectCode, StudioPluginEngine, type StudioPluginEngineOptions, type StudioPluginEntry, type StudioPluginGate, type StudioPluginItineraryMenuTarget, type StudioPluginMapContextMenuTarget, type StudioPluginMapControlsTarget, type StudioPluginObserver, type StudioPluginProfileTarget, type StudioPluginRefusalReporter, type StudioPluginRunEvent, type StudioPluginRunOutcome, type StudioPluginSegmentMenuTarget, type StudioPluginSlot, type StudioPluginSlotTargets, type StudioPluginSubject, type StudioPluginTarget, type StudioPluginToolSink, type StudioPluginValidationScope, type StudioPluginWaypointMenuTarget, type StudioPluginZoneMenuTarget, type StudioSlotContribution, type StudioSlotEntry, studioPluginSlotSchema };
296
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1,296 @@
1
+ import { C as StudioPluginWaypointMenuTarget, S as StudioPluginTarget, T as studioPluginSlotSchema, _ as StudioPluginMapControlsTarget, a as StudioPluginRunEvent, b as StudioPluginSlot, c as StudioPlugin, d as StudioPluginGate, f as StudioPluginSubject, g as StudioPluginMapContextMenuTarget, h as StudioPluginItineraryMenuTarget, i as StudioPluginRefusalReporter, l as StudioPluginContribution, m as StudioSlotEntry, n as StudioPluginEngineOptions, o as StudioPluginRunOutcome, p as StudioSlotContribution, r as StudioPluginObserver, s as StudioPluginToolSink, t as StudioPluginEngine, u as StudioPluginEntry, v as StudioPluginProfileTarget, w as StudioPluginZoneMenuTarget, x as StudioPluginSlotTargets, y as StudioPluginSegmentMenuTarget } from "../chunk-cVXLsZfL.js";
2
+ import { a as StudioToolContext } from "../chunk-BP4uy7E1.js";
3
+ import * as z$1 from "zod";
4
+ import { MountayaElementsError } from "@mountaya/elements/errors";
5
+ /**
6
+ * The grammar a plugin id and a contribution id are held to.
7
+ *
8
+ * A plugin's tools land on the SAME bus the studio's own verbs are registered on, and its
9
+ * contributions land in the SAME menus. Both are namespaces a third party is writing into, so
10
+ * the only thing standing between "acme adds an export verb" and "acme shadows
11
+ * `studio.itinerary.export`" is a rule about names.
12
+ *
13
+ * It is a rule rather than a list, deliberately. A list of reserved tool names is right the day
14
+ * it is written and wrong the day the next tool ships, and nobody would notice: the new studio
15
+ * verb would collide with a plugin that had been installed for a year. Three rules do the whole
16
+ * job instead (a plugin id is vendor-namespaced, the first segment may not be ours, and a
17
+ * plugin's tools are prefixed with its own id), and none of them goes stale.
18
+ *
19
+ * **It is a collision discipline, not a sandbox.** A plugin runs in the host's own realm with the
20
+ * host's own tool context: it can dispatch every verb and write every store, whatever these
21
+ * patterns say about names. What they buy is that two vendors and the package itself can never
22
+ * mean the same name by accident. What decides whether a plugin may do any of it is the host's
23
+ * decision to install it.
24
+ *
25
+ * What stops a plugin REMOVING one of the studio's verbs is a different mechanism, one directory
26
+ * over, and it is worth knowing which does which: `ctx.bus` carries `ToolBus.dispatcher` (two
27
+ * methods and nothing else on the object), so a plugin's `run` cannot reach `unregister` in
28
+ * TypeScript or out of it. {@link RESERVED_PLUGIN_NAMESPACES} is read a second time behind that,
29
+ * as the bus's own `reserved`, which covers whoever holds a concrete bus. Names are what these
30
+ * patterns are for; reachability is what that pair is for.
31
+ */
32
+ /**
33
+ * studioPluginIdPattern is the shape of a plugin id: two or more dot-joined lowercase slugs.
34
+ *
35
+ * The first segment is the VENDOR (`acme.avalanche`, `alpine-club.huts`), which is what makes a
36
+ * collision between two organizations' plugins something neither has to think about. A single
37
+ * segment is refused precisely because it is the shape a collision arrives in: `avalanche` is a
38
+ * name two vendors both reach for, and `acme.avalanche` is not.
39
+ *
40
+ * Lowercase and hyphen-separated inside a segment, so an id reads the same in a URL, a log line
41
+ * and a settings file. A digit is allowed after the first character, which is what lets a vendor
42
+ * version a plugin in its own id (`acme.avalanche2`) without a second vocabulary for it.
43
+ */
44
+ export declare const studioPluginIdPattern: RegExp;
45
+ /**
46
+ * studioContributionIdPattern is the same grammar with one segment allowed.
47
+ *
48
+ * A contribution id is LOCAL to its plugin (the registry qualifies it with the plugin's id
49
+ * before anything else sees it), so `send-to-strava` is unambiguous where a bare plugin id would
50
+ * not be. Dots are still allowed, so a plugin contributing to several surfaces can group its own
51
+ * ids (`export.strava`, `export.garmin`) rather than flattening them.
52
+ */
53
+ export declare const studioContributionIdPattern: RegExp;
54
+ /**
55
+ * RESERVED_PLUGIN_NAMESPACES are the first segments a plugin may not claim.
56
+ *
57
+ * `mountaya` and `studio` are the two this package's own names are built from (every shipped
58
+ * tool is `studio.<surface>.<verb>`), so a plugin holding either as its vendor segment could
59
+ * produce a prefixed tool name indistinguishable from one of ours. Reserving them is what makes
60
+ * {@link studioPluginIdPattern} plus the tool prefix a complete answer rather than a
61
+ * convention that happens to hold.
62
+ *
63
+ * `as const` rather than `readonly string[]`, so the two names are in the TYPE as well as in the
64
+ * value. A port generating its own vocabulary from this list, or a host narrowing a vendor
65
+ * segment against it, reads them off the declaration instead of restating them.
66
+ */
67
+ export declare const RESERVED_PLUGIN_NAMESPACES: readonly ["mountaya", "studio"];
68
+ /**
69
+ * Whether a contribution shows, and in what order: the two render-time questions.
70
+ *
71
+ * Both are here rather than on the registry, and that split is the registry's whole snapshot
72
+ * contract: `at(slot)` is a STORE, stable between mutations, and a gate reads the tool context,
73
+ * which changes underneath it. A gated snapshot could not be stable by construction, so the
74
+ * registry hands back everything installed and the surface filters at render.
75
+ */
76
+ /**
77
+ * StudioGatedContribution is the shape gating needs, which both a declaration and a resolved
78
+ * registry entry satisfy.
79
+ *
80
+ * Exported because it appears in an exported signature. An unexported local surfaces in the
81
+ * emitted `.d.ts` as a type a consumer can read and cannot NAME, so a host writing their own
82
+ * helper over the same rule, or a port author writing the constraint down, has nothing to import.
83
+ */
84
+ interface StudioGatedContribution {
85
+ readonly gate?: StudioPluginGate | undefined;
86
+ }
87
+ /**
88
+ * StudioOrderedContribution is the shape sorting needs: a declared `order` and an install-order
89
+ * tiebreak.
90
+ *
91
+ * `sequence` is optional and absent means 0, which is what lets a host sort DECLARATIONS: a
92
+ * `StudioPluginContribution` has no sequence, because the number is assigned when the registry
93
+ * adopts one. Exported for the reason {@link StudioGatedContribution} is.
94
+ */
95
+ interface StudioOrderedContribution {
96
+ readonly order?: number | undefined;
97
+ readonly sequence?: number | undefined;
98
+ }
99
+ /**
100
+ * isStudioContributionAvailable answers whether a contribution's gate passes right now.
101
+ *
102
+ * STRUCTURAL in its first argument (it asks for a `gate` and nothing else), so it applies
103
+ * unchanged to a declaration a host is validating and to an entry the registry already holds. A
104
+ * signature naming either concrete type would need a second copy for the other.
105
+ *
106
+ * The three clauses are ANDed and each ABSENT one is no constraint, so a contribution with no
107
+ * gate is always available. A `when` that THROWS resolves to unavailable: a predicate that
108
+ * cannot answer has not said yes, and this runs inside somebody else's render, so letting the
109
+ * throw out would take the whole menu down over one plugin's bad guard. The fault still reaches
110
+ * the program's uncaught-error handling on a microtask, once per gate however often the gate is
111
+ * asked, so the author of an item that never shows has a signal. A `when` that answers anything
112
+ * but `true` is unavailable for the same reason, and is no fault.
113
+ */
114
+ export declare const isStudioContributionAvailable: (contribution: StudioGatedContribution, ctx: StudioToolContext) => boolean;
115
+ /**
116
+ * availableStudioContributions filters a list to the contributions whose gates pass.
117
+ *
118
+ * **It returns its INPUT by reference when nothing was dropped**, and that is the property the
119
+ * whole thing exists for rather than an optimisation. Its caller is a `useMemo` feeding a list
120
+ * that re-renders per segment row; a fresh array on every render would churn every consumer of
121
+ * it, and the common case by far is that every gate passes.
122
+ */
123
+ export declare const availableStudioContributions: <TContribution extends StudioGatedContribution>(contributions: readonly TContribution[], ctx: StudioToolContext) => readonly TContribution[];
124
+ /**
125
+ * sortStudioContributions returns a new list in render order: `order` ascending, ties on install
126
+ * order.
127
+ *
128
+ * The tiebreak is what makes the result TOTAL. `order` is an uncoordinated number a plugin
129
+ * author picks alone, so two plugins choosing `100` is the normal case rather than the edge one,
130
+ * and `sequence` resolves it the same way on every render and every reload.
131
+ */
132
+ export declare const sortStudioContributions: <TContribution extends StudioOrderedContribution>(contributions: readonly TContribution[]) => TContribution[];
133
+ /**
134
+ * studioPluginDefectCodeSchema is every way a plugin declaration can be refused, closed.
135
+ *
136
+ * CODES rather than sentences, for the reason every other vocabulary in this package is one:
137
+ * this package renders nothing and translates nothing, so a defect carrying an English string
138
+ * would put English in a host's French settings screen. A host that surfaces install failures
139
+ * maps these to their own copy; a host that only logs them reads the code.
140
+ *
141
+ * What each one means:
142
+ *
143
+ * - `contribution_empty`: neither `label` + `run` nor `view`, so there is nothing to draw. A
144
+ * `view` of `null` and a `label` of `""` count as absent: both draw nothing, which is the thing
145
+ * being refused rather than a spelling of it.
146
+ * - `contribution_id_duplicate`: two contributions in ONE plugin share an id.
147
+ * - `contribution_id_invalid`: the id is not {@link studioContributionIdPattern}.
148
+ * - `plugin_id_invalid`: the id is not {@link studioPluginIdPattern}; usually a missing
149
+ * vendor segment.
150
+ * - `plugin_id_reserved`: the vendor segment is one of {@link RESERVED_PLUGIN_NAMESPACES}.
151
+ * - `plugin_id_taken`: a plugin with this id is already installed.
152
+ * - `slot_unknown`: the slot names no region this studio has.
153
+ * - `tool_key_mismatch`: the record key is not the tool's own `name`, which would make the
154
+ * declaration read one way and register another.
155
+ * - `tool_name_empty`: the tool name is the plugin's prefix and nothing more, so the tool has no
156
+ * name of its own. The name carries the id, which is why this is a code of its own and no case
157
+ * of `tool_name_not_namespaced`.
158
+ * - `tool_name_not_namespaced`: the tool name is not prefixed with the plugin's id.
159
+ * - `tool_name_taken`: the bus already holds this name, the studio's own verbs included.
160
+ */
161
+ export declare const studioPluginDefectCodeSchema: z$1.ZodEnum<{
162
+ contribution_empty: "contribution_empty";
163
+ contribution_id_duplicate: "contribution_id_duplicate";
164
+ contribution_id_invalid: "contribution_id_invalid";
165
+ plugin_id_invalid: "plugin_id_invalid";
166
+ plugin_id_reserved: "plugin_id_reserved";
167
+ plugin_id_taken: "plugin_id_taken";
168
+ slot_unknown: "slot_unknown";
169
+ tool_key_mismatch: "tool_key_mismatch";
170
+ tool_name_empty: "tool_name_empty";
171
+ tool_name_not_namespaced: "tool_name_not_namespaced";
172
+ tool_name_taken: "tool_name_taken";
173
+ }>;
174
+ /** One way a plugin declaration is refused, derived from {@link studioPluginDefectCodeSchema}. */
175
+ type StudioPluginDefectCode = z$1.infer<typeof studioPluginDefectCodeSchema>;
176
+ /**
177
+ * StudioPluginDefect is one refusal: what was wrong, whose plugin it was, and which part of it.
178
+ *
179
+ * `subject` is the contribution id, tool name or slot the code is about, and it is absent for
180
+ * the three codes that are about the plugin id itself, where `pluginId` already names the
181
+ * subject and repeating it would read as two different things being wrong.
182
+ */
183
+ interface StudioPluginDefect {
184
+ readonly code: StudioPluginDefectCode;
185
+ readonly pluginId: string;
186
+ readonly subject?: string | undefined;
187
+ }
188
+ /**
189
+ * StudioPluginValidationScope is what the rest of the world already holds, passed IN.
190
+ *
191
+ * Passed and never read, which keeps the validation pure and portable: `plugin_id_taken` and
192
+ * `tool_name_taken` are about collisions, and a collision is a question about a live registry and
193
+ * a live bus, neither of which a rule may reach for. A port reimplements the validation against
194
+ * its own two sets and gets the same answers.
195
+ */
196
+ interface StudioPluginValidationScope {
197
+ /** The plugin ids already installed. */
198
+ readonly installed: ReadonlySet<string>;
199
+ /** Every tool name already on the bus, the studio's own verbs included. */
200
+ readonly tools: ReadonlySet<string>;
201
+ }
202
+ /**
203
+ * validateStudioPlugin returns every defect in a declaration, or an empty list.
204
+ *
205
+ * **Every defect, never the first.** An install is refused as a whole, so stopping early would
206
+ * teach an author one fix per attempt: three malformed contribution ids costing three
207
+ * reinstalls to discover. The list is the report.
208
+ *
209
+ * It reports rather than throws for the same reason: the caller decides what a refusal IS. The
210
+ * registry's `install` throws a {@link StudioPluginError} carrying this list, because an install
211
+ * a host asked for and did not get has to be loud; a host validating a plugin they are about to
212
+ * offer in a settings screen wants the list and no exception.
213
+ *
214
+ * It is total over what a wire can hold. A manifest read from storage has no type behind it, so
215
+ * every member is read as it stands: an id that is no string is `plugin_id_invalid` under an
216
+ * empty `pluginId`, a contribution whose label is no text or whose `run` is no function has
217
+ * nothing to draw, contributions that are no list are read as one malformed contribution, and a
218
+ * tool that holds no name is a `tool_key_mismatch` under its key, as tools that are no record
219
+ * are one under what stands there.
220
+ *
221
+ * @param plugin - The declaration to judge, typed or read off a wire.
222
+ * @param scope - The plugin ids and tool names already taken, for the collision codes.
223
+ * @returns Every defect found, in declaration order; empty for a declaration that installs.
224
+ */
225
+ export declare const validateStudioPlugin: <TView>(plugin: StudioPlugin<TView>, scope: StudioPluginValidationScope) => readonly StudioPluginDefect[];
226
+ /**
227
+ * StudioPluginError is what a refused install throws, carrying every defect that refused it.
228
+ *
229
+ * Every defect rather than the first, which is why the list is on the error rather than folded
230
+ * into the message: a plugin with three malformed contribution ids should report three, once,
231
+ * rather than teaching its author one fix per reinstall. The `message` is a readable join of the
232
+ * codes for a log line; `defects` is the part a host's own surface renders.
233
+ *
234
+ * It extends the ELEMENTS' error family rather than starting a studio family of its own, which
235
+ * is the rule `boundary.test.ts` holds this package to: a consumer narrows on ONE family across
236
+ * the whole stack, and a second hierarchy would mean two.
237
+ */
238
+ export declare class StudioPluginError extends MountayaElementsError {
239
+ readonly name: string;
240
+ readonly defects: readonly StudioPluginDefect[];
241
+ constructor(defects: readonly StudioPluginDefect[], options?: ErrorOptions);
242
+ }
243
+ /**
244
+ * isStudioPluginError recognises a refused install STRUCTURALLY, with no `instanceof`.
245
+ *
246
+ * The reason generalizes past this package and is written out in `data/rules/restErrors.ts`:
247
+ * `instanceof` asks whether a value came from one constructor IDENTITY, which is a stronger
248
+ * question than any caller here is asking. A second copy of this module in a consumer's graph, a
249
+ * structured clone across a worker boundary, a bundler that duplicated the chunk: each breaks
250
+ * the check while leaving the value perfectly intact, and none of them fails loudly.
251
+ *
252
+ * It checks the DEFECT LIST as well as the name, because the name alone is a predicate anything
253
+ * can satisfy, and everything downstream of this narrowing reads `.defects` as a non-optional
254
+ * array. A structured clone carries the list; `{ name: "StudioPluginError" }` does not, and is
255
+ * exactly the shape that would otherwise pass here and throw at the first `.map`.
256
+ */
257
+ export declare const isStudioPluginError: (error: unknown) => error is StudioPluginError;
258
+ /**
259
+ * How a plugin's names are kept out of everybody else's.
260
+ *
261
+ * Three rules, and they only work together: plugin ids are unique and vendor-namespaced, the
262
+ * reserved namespaces are refused, and every tool a plugin registers carries its plugin's id as
263
+ * a prefix. That composition is what protects the studio's `studio.*` verbs without a list of
264
+ * reserved tool names, a list that would be complete the day it is written and silently wrong
265
+ * the day the next studio tool ships.
266
+ */
267
+ /**
268
+ * studioPluginToolPrefix is what every tool a plugin registers must start with.
269
+ *
270
+ * `${pluginId}.`: a DOT, because a tool name is already a dotted path
271
+ * (`studio.itinerary.export`) and a plugin's verbs should read as one: `acme.avalanche.refresh`
272
+ * is a tool name a model can be shown beside the studio's own without explanation.
273
+ */
274
+ export declare const studioPluginToolPrefix: (pluginId: string) => string;
275
+ /**
276
+ * isStudioPluginToolName answers whether a tool name belongs to a given plugin.
277
+ *
278
+ * The prefix and not merely a `startsWith` on the bare id: `acme.avalanche` must not be read as
279
+ * owning `acme.avalanche-pro.refresh`, which is a different plugin from a vendor who picked an
280
+ * adjacent name.
281
+ *
282
+ * It reads the prefix and nothing after it, so `acme.avalanche.` belongs to `acme.avalanche`
283
+ * while naming no tool. `validateStudioPlugin` refuses that name under `tool_name_empty`.
284
+ */
285
+ export declare const isStudioPluginToolName: (pluginId: string, name: string) => boolean;
286
+ /**
287
+ * qualifyStudioContributionId makes a plugin-local contribution id globally unique.
288
+ *
289
+ * A COLON separates the two halves, and the choice is load-bearing rather than cosmetic: a dot
290
+ * already separates a tool's namespaces and a slot's regions, so `acme.avalanche.risk` would be
291
+ * ambiguous about where the plugin ends. `acme.avalanche:risk` cannot be misread, and it splits
292
+ * back apart with no grammar.
293
+ */
294
+ export declare const qualifyStudioContributionId: (pluginId: string, contributionId: string) => string;
295
+ export { type StudioGatedContribution, type StudioOrderedContribution, type StudioPlugin, type StudioPluginContribution, type StudioPluginDefect, type StudioPluginDefectCode, StudioPluginEngine, type StudioPluginEngineOptions, type StudioPluginEntry, type StudioPluginGate, type StudioPluginItineraryMenuTarget, type StudioPluginMapContextMenuTarget, type StudioPluginMapControlsTarget, type StudioPluginObserver, type StudioPluginProfileTarget, type StudioPluginRefusalReporter, type StudioPluginRunEvent, type StudioPluginRunOutcome, type StudioPluginSegmentMenuTarget, type StudioPluginSlot, type StudioPluginSlotTargets, type StudioPluginSubject, type StudioPluginTarget, type StudioPluginToolSink, type StudioPluginValidationScope, type StudioPluginWaypointMenuTarget, type StudioPluginZoneMenuTarget, type StudioSlotContribution, type StudioSlotEntry, studioPluginSlotSchema };
296
+ //# sourceMappingURL=index.d.ts.map