@yaks/platform 0.0.0-stage → 0.2.36

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 (1213) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +261 -2
  3. package/_client-blobs.js +7 -0
  4. package/_client-error.js +70 -0
  5. package/_client-modal.js +3 -0
  6. package/_client-replica.js +5 -0
  7. package/_client-review.js +1 -0
  8. package/_client-schema.js +1 -0
  9. package/_client-vault.js +31 -0
  10. package/_edit-query.js +1 -0
  11. package/_uploads.js +4 -0
  12. package/account-browser.js +67 -0
  13. package/account-browser.js.map +1 -0
  14. package/account-browser.ts +87 -0
  15. package/account-rows.js +130 -0
  16. package/account-rows.js.map +1 -0
  17. package/account-rows.ts +237 -0
  18. package/admin-visits-view.js +65 -0
  19. package/admin-visits-view.js.map +1 -0
  20. package/admin-visits-view.ts +120 -0
  21. package/admin-visits.js +143 -0
  22. package/admin-visits.js.map +1 -0
  23. package/admin-visits.ts +211 -0
  24. package/admit-graph.js +8 -0
  25. package/admit-graph.js.map +1 -0
  26. package/admit-graph.ts +10 -0
  27. package/agent-guide.js +368 -0
  28. package/agent-guide.js.map +1 -0
  29. package/agent-guide.ts +450 -0
  30. package/agents-browser.js +143 -0
  31. package/agents-browser.js.map +1 -0
  32. package/agents-browser.ts +141 -0
  33. package/agents-view.js +129 -0
  34. package/agents-view.js.map +1 -0
  35. package/agents-view.ts +236 -0
  36. package/agents.js +148 -0
  37. package/agents.js.map +1 -0
  38. package/agents.ts +150 -0
  39. package/app-actions.js +56 -0
  40. package/app-actions.js.map +1 -0
  41. package/app-actions.ts +61 -0
  42. package/app-authority.js +280 -0
  43. package/app-authority.js.map +1 -0
  44. package/app-authority.ts +356 -0
  45. package/app-canvas-browser.js +308 -0
  46. package/app-canvas-browser.js.map +1 -0
  47. package/app-canvas-browser.ts +377 -0
  48. package/app-canvas-view.js +244 -0
  49. package/app-canvas-view.js.map +1 -0
  50. package/app-canvas-view.ts +399 -0
  51. package/app-canvas.js +87 -0
  52. package/app-canvas.js.map +1 -0
  53. package/app-canvas.ts +170 -0
  54. package/app-client.js +521 -0
  55. package/app-client.js.map +1 -0
  56. package/app-client.ts +562 -0
  57. package/app-command.js +108 -0
  58. package/app-command.js.map +1 -0
  59. package/app-command.ts +155 -0
  60. package/app-commands.js +334 -0
  61. package/app-commands.js.map +1 -0
  62. package/app-commands.ts +379 -0
  63. package/app-decision.js +69 -0
  64. package/app-decision.js.map +1 -0
  65. package/app-decision.ts +61 -0
  66. package/app-effects.js +43 -0
  67. package/app-effects.js.map +1 -0
  68. package/app-effects.ts +53 -0
  69. package/app-file.js +252 -0
  70. package/app-file.js.map +1 -0
  71. package/app-file.ts +362 -0
  72. package/app-friends.js +60 -0
  73. package/app-friends.js.map +1 -0
  74. package/app-friends.ts +81 -0
  75. package/app-graph.js +9 -0
  76. package/app-graph.js.map +1 -0
  77. package/app-graph.ts +9 -0
  78. package/app-icon.js +59 -0
  79. package/app-icon.js.map +1 -0
  80. package/app-icon.ts +121 -0
  81. package/app-made.js +164 -0
  82. package/app-made.js.map +1 -0
  83. package/app-made.ts +306 -0
  84. package/app-outbound.js +72 -0
  85. package/app-outbound.js.map +1 -0
  86. package/app-outbound.ts +109 -0
  87. package/app-outbox.js +42 -0
  88. package/app-outbox.js.map +1 -0
  89. package/app-outbox.ts +46 -0
  90. package/app-patch.js +75 -0
  91. package/app-patch.js.map +1 -0
  92. package/app-patch.ts +106 -0
  93. package/app-read.js +101 -0
  94. package/app-read.js.map +1 -0
  95. package/app-read.ts +126 -0
  96. package/app-role-tools.js +232 -0
  97. package/app-role-tools.js.map +1 -0
  98. package/app-role-tools.ts +258 -0
  99. package/app-roles.js +91 -0
  100. package/app-roles.js.map +1 -0
  101. package/app-roles.ts +76 -0
  102. package/app-session-access.js +109 -0
  103. package/app-session-access.js.map +1 -0
  104. package/app-session-access.ts +145 -0
  105. package/app-starter.js +109 -0
  106. package/app-starter.js.map +1 -0
  107. package/app-starter.ts +123 -0
  108. package/app-storage.js +38 -0
  109. package/app-storage.js.map +1 -0
  110. package/app-storage.ts +54 -0
  111. package/app-style-guide.js +138 -0
  112. package/app-style-guide.js.map +1 -0
  113. package/app-style-guide.ts +195 -0
  114. package/app-subs.js +89 -0
  115. package/app-subs.js.map +1 -0
  116. package/app-subs.ts +110 -0
  117. package/app-tests.js +54 -0
  118. package/app-tests.js.map +1 -0
  119. package/app-tests.ts +56 -0
  120. package/app-tile.js +209 -0
  121. package/app-tile.js.map +1 -0
  122. package/app-tile.ts +227 -0
  123. package/app-transfer.js +188 -0
  124. package/app-transfer.js.map +1 -0
  125. package/app-transfer.ts +281 -0
  126. package/app-vocab.js +52 -0
  127. package/app-vocab.js.map +1 -0
  128. package/app-vocab.ts +43 -0
  129. package/app-words.js +55 -0
  130. package/app-words.js.map +1 -0
  131. package/app-words.ts +73 -0
  132. package/app-worker.js +28 -0
  133. package/app-worker.js.map +1 -0
  134. package/app-worker.ts +38 -0
  135. package/app-writes.js +132 -0
  136. package/app-writes.js.map +1 -0
  137. package/app-writes.ts +128 -0
  138. package/asset-bytes.js +57 -0
  139. package/asset-bytes.js.map +1 -0
  140. package/asset-bytes.ts +90 -0
  141. package/asset-response.js +28 -0
  142. package/asset-response.js.map +1 -0
  143. package/asset-response.ts +46 -0
  144. package/asset-url.js +556 -0
  145. package/asset-url.js.map +1 -0
  146. package/asset-url.ts +774 -0
  147. package/attribution-vocab.js +14 -0
  148. package/attribution-vocab.js.map +1 -0
  149. package/attribution-vocab.ts +11 -0
  150. package/authorship-graph.js +8 -0
  151. package/authorship-graph.js.map +1 -0
  152. package/authorship-graph.ts +10 -0
  153. package/badge.js +98 -0
  154. package/blob-images.js +206 -0
  155. package/blob-images.js.map +1 -0
  156. package/blob-images.ts +323 -0
  157. package/blob-posters.js +125 -0
  158. package/blob-posters.js.map +1 -0
  159. package/blob-posters.ts +207 -0
  160. package/blob-routes.js +14 -0
  161. package/blob-routes.js.map +1 -0
  162. package/blob-routes.ts +25 -0
  163. package/bots.js +77 -0
  164. package/bots.js.map +1 -0
  165. package/bots.ts +93 -0
  166. package/browser-mockup.js +81 -0
  167. package/browser-mockup.js.map +1 -0
  168. package/browser-mockup.ts +105 -0
  169. package/browser-record.js +55 -0
  170. package/browser-record.js.map +1 -0
  171. package/browser-record.ts +66 -0
  172. package/browser-scroll.js +90 -0
  173. package/browser-scroll.js.map +1 -0
  174. package/browser-scroll.ts +108 -0
  175. package/browser-stream.js +79 -0
  176. package/browser-stream.js.map +1 -0
  177. package/browser-stream.ts +84 -0
  178. package/browser-trace.js +252 -0
  179. package/browser-trace.js.map +1 -0
  180. package/browser-trace.ts +330 -0
  181. package/browser-viewer.js +236 -0
  182. package/browser-viewer.js.map +1 -0
  183. package/browser-viewer.ts +233 -0
  184. package/browser-visit.js +1522 -0
  185. package/browser-visit.js.map +1 -0
  186. package/browser-visit.ts +2179 -0
  187. package/browser-wire.js +242 -0
  188. package/browser-wire.js.map +1 -0
  189. package/browser-wire.ts +262 -0
  190. package/budget.js +17 -0
  191. package/budget.js.map +1 -0
  192. package/budget.ts +42 -0
  193. package/cli.js +52 -0
  194. package/cli.js.map +1 -0
  195. package/cli.ts +55 -0
  196. package/client-modules.js +24 -0
  197. package/client-modules.js.map +1 -0
  198. package/client-modules.ts +24 -0
  199. package/client-routes.js +83 -0
  200. package/client-routes.js.map +1 -0
  201. package/client-routes.ts +104 -0
  202. package/client-words.js +62 -0
  203. package/client-words.js.map +1 -0
  204. package/client-words.ts +77 -0
  205. package/client.js +709 -0
  206. package/comp.js +2 -0
  207. package/comp.js.map +1 -0
  208. package/comp.ts +15 -0
  209. package/config.js +497 -0
  210. package/config.js.map +1 -0
  211. package/config.ts +287 -0
  212. package/connect-parts.js +107 -0
  213. package/connect-parts.js.map +1 -0
  214. package/connect-parts.ts +165 -0
  215. package/connected-activity-browser.js +301 -0
  216. package/connected-activity-browser.js.map +1 -0
  217. package/connected-activity-browser.ts +341 -0
  218. package/connected-activity-view.js +55 -0
  219. package/connected-activity-view.js.map +1 -0
  220. package/connected-activity-view.ts +81 -0
  221. package/connected-activity-wire.js +165 -0
  222. package/connected-activity-wire.js.map +1 -0
  223. package/connected-activity-wire.ts +171 -0
  224. package/connected-activity.css +156 -0
  225. package/connected-activity.js +185 -0
  226. package/connected-activity.js.map +1 -0
  227. package/connected-activity.ts +278 -0
  228. package/connection-icon-browser.js +50 -0
  229. package/connection-icon-browser.js.map +1 -0
  230. package/connection-icon-browser.ts +52 -0
  231. package/connections-browser.js +393 -0
  232. package/connections-browser.js.map +1 -0
  233. package/connections-browser.ts +465 -0
  234. package/connections-page.js +178 -0
  235. package/connections-page.js.map +1 -0
  236. package/connections-page.ts +461 -0
  237. package/connections-view.js +1215 -0
  238. package/connections-view.js.map +1 -0
  239. package/connections-view.ts +2239 -0
  240. package/connector-upload.js +94 -0
  241. package/connector-upload.js.map +1 -0
  242. package/connector-upload.ts +146 -0
  243. package/consent.js +2 -0
  244. package/consent.js.map +1 -0
  245. package/consent.ts +3 -0
  246. package/cookie.js +53 -0
  247. package/cookie.js.map +1 -0
  248. package/cookie.ts +75 -0
  249. package/copy.js +104 -0
  250. package/corner.js +226 -0
  251. package/credential-draft-move.js +154 -0
  252. package/credential-draft-move.js.map +1 -0
  253. package/credential-draft-move.ts +197 -0
  254. package/credential-draft-place.js +2 -0
  255. package/credential-draft-place.js.map +1 -0
  256. package/credential-draft-place.ts +4 -0
  257. package/credential-drafts.js +66 -0
  258. package/credential-drafts.js.map +1 -0
  259. package/credential-drafts.ts +93 -0
  260. package/dashboard-browser.js +149 -0
  261. package/dashboard-browser.js.map +1 -0
  262. package/dashboard-browser.ts +184 -0
  263. package/dashboard-view.js +293 -0
  264. package/dashboard-view.js.map +1 -0
  265. package/dashboard-view.ts +423 -0
  266. package/dashboard.js +268 -0
  267. package/dashboard.js.map +1 -0
  268. package/dashboard.ts +436 -0
  269. package/deno.json +1 -0
  270. package/describe-graph.js +8 -0
  271. package/describe-graph.js.map +1 -0
  272. package/describe-graph.ts +7 -0
  273. package/directory-derived.js +142 -0
  274. package/directory-derived.js.map +1 -0
  275. package/directory-derived.ts +198 -0
  276. package/directory-index-move.js +77 -0
  277. package/directory-index-move.js.map +1 -0
  278. package/directory-index-move.ts +59 -0
  279. package/directory-index.js +382 -0
  280. package/directory-index.js.map +1 -0
  281. package/directory-index.ts +550 -0
  282. package/directory-pages.js +41 -0
  283. package/directory-pages.js.map +1 -0
  284. package/directory-pages.ts +71 -0
  285. package/directory-route.js +129 -0
  286. package/directory-route.js.map +1 -0
  287. package/directory-route.ts +189 -0
  288. package/directory-vocab.js +58 -0
  289. package/directory-vocab.js.map +1 -0
  290. package/directory-vocab.ts +46 -0
  291. package/document-graph.js +86 -0
  292. package/document-graph.js.map +1 -0
  293. package/document-graph.ts +93 -0
  294. package/document-ocr.js +146 -0
  295. package/document-ocr.js.map +1 -0
  296. package/document-ocr.ts +204 -0
  297. package/documents.js +50 -0
  298. package/documents.js.map +1 -0
  299. package/documents.ts +64 -0
  300. package/domain-pages.js +221 -0
  301. package/domain-pages.js.map +1 -0
  302. package/domain-pages.ts +586 -0
  303. package/domain-settings.js +88 -0
  304. package/domain-settings.js.map +1 -0
  305. package/domain-settings.ts +132 -0
  306. package/domain-transfer.js +138 -0
  307. package/domain-transfer.js.map +1 -0
  308. package/domain-transfer.ts +190 -0
  309. package/donation-loans.js +176 -0
  310. package/donation-loans.js.map +1 -0
  311. package/donation-loans.ts +271 -0
  312. package/draft-choice.js +136 -0
  313. package/draft-choice.js.map +1 -0
  314. package/draft-choice.ts +310 -0
  315. package/drawing.js +27 -0
  316. package/drawing.js.map +1 -0
  317. package/drawing.ts +40 -0
  318. package/early-report.js +18 -0
  319. package/early-report.js.map +1 -0
  320. package/early-report.ts +31 -0
  321. package/edit-client-path.js +2 -0
  322. package/edit-client-path.js.map +1 -0
  323. package/edit-client-path.ts +1 -0
  324. package/edit-mode.js +920 -0
  325. package/edit-mode.js.map +1 -0
  326. package/edit-mode.ts +1003 -0
  327. package/edit-sync.js +61 -0
  328. package/edit-sync.js.map +1 -0
  329. package/edit-sync.ts +83 -0
  330. package/edit.js +265 -0
  331. package/embed-graph.js +11 -0
  332. package/embed-graph.js.map +1 -0
  333. package/embed-graph.ts +8 -0
  334. package/embedded-payment.js +211 -0
  335. package/embedded-payment.js.map +1 -0
  336. package/embedded-payment.ts +290 -0
  337. package/entry-actions-browser.js +43 -0
  338. package/entry-actions-browser.js.map +1 -0
  339. package/entry-actions-browser.ts +64 -0
  340. package/entry-actions.js +56 -0
  341. package/entry-actions.js.map +1 -0
  342. package/entry-actions.ts +59 -0
  343. package/escape.js +14 -0
  344. package/escape.js.map +1 -0
  345. package/escape.ts +24 -0
  346. package/face-input.js +6 -0
  347. package/face-input.js.map +1 -0
  348. package/face-input.ts +14 -0
  349. package/facebook.js +370 -0
  350. package/facebook.js.map +1 -0
  351. package/facebook.ts +474 -0
  352. package/facets.js +142 -0
  353. package/facets.js.map +1 -0
  354. package/facets.ts +89 -0
  355. package/fee.js +45 -0
  356. package/fee.js.map +1 -0
  357. package/fee.ts +51 -0
  358. package/fence.js +164 -0
  359. package/fence.js.map +1 -0
  360. package/fence.ts +223 -0
  361. package/file-metadata.js +135 -0
  362. package/file-metadata.js.map +1 -0
  363. package/file-metadata.ts +177 -0
  364. package/file-operation.js +51 -0
  365. package/file-operation.js.map +1 -0
  366. package/file-operation.ts +32 -0
  367. package/file-redirects.js +72 -0
  368. package/file-redirects.js.map +1 -0
  369. package/file-redirects.ts +74 -0
  370. package/file-root.js +8 -0
  371. package/file-root.js.map +1 -0
  372. package/file-root.ts +24 -0
  373. package/files-routes.js +203 -0
  374. package/files-routes.js.map +1 -0
  375. package/files-routes.ts +282 -0
  376. package/files.js +369 -0
  377. package/files.js.map +1 -0
  378. package/files.ts +522 -0
  379. package/fingerprint.js +217 -0
  380. package/fingerprint.js.map +1 -0
  381. package/fingerprint.ts +314 -0
  382. package/firsts.js +335 -0
  383. package/firsts.js.map +1 -0
  384. package/firsts.ts +368 -0
  385. package/friends-at.js +78 -0
  386. package/friends-at.js.map +1 -0
  387. package/friends-at.ts +115 -0
  388. package/friends-browser.js +66 -0
  389. package/friends-browser.js.map +1 -0
  390. package/friends-browser.ts +77 -0
  391. package/friends-dock-browser.js +375 -0
  392. package/friends-dock-browser.js.map +1 -0
  393. package/friends-dock-browser.ts +408 -0
  394. package/friends-dock-view.js +363 -0
  395. package/friends-dock-view.js.map +1 -0
  396. package/friends-dock-view.ts +592 -0
  397. package/friends-view.js +33 -0
  398. package/friends-view.js.map +1 -0
  399. package/friends-view.ts +69 -0
  400. package/friends.js +153 -0
  401. package/friends.js.map +1 -0
  402. package/friends.ts +200 -0
  403. package/fundraising-orders.js +197 -0
  404. package/fundraising-orders.js.map +1 -0
  405. package/fundraising-orders.ts +283 -0
  406. package/fundraising.js +165 -0
  407. package/fundraising.js.map +1 -0
  408. package/fundraising.ts +215 -0
  409. package/funnel.js +141 -0
  410. package/funnel.js.map +1 -0
  411. package/funnel.ts +284 -0
  412. package/gift-savings.js +19 -0
  413. package/gift-savings.js.map +1 -0
  414. package/gift-savings.ts +29 -0
  415. package/git-history.js +331 -0
  416. package/git-history.js.map +1 -0
  417. package/git-history.ts +481 -0
  418. package/giving-browser.js +35 -0
  419. package/giving-browser.js.map +1 -0
  420. package/giving-browser.ts +40 -0
  421. package/giving-pages.js +284 -0
  422. package/giving-pages.js.map +1 -0
  423. package/giving-pages.ts +418 -0
  424. package/giving-view.js +244 -0
  425. package/giving-view.js.map +1 -0
  426. package/giving-view.ts +509 -0
  427. package/giving.js +198 -0
  428. package/giving.js.map +1 -0
  429. package/giving.ts +280 -0
  430. package/gmail-mailbox.js +52 -0
  431. package/gmail-mailbox.js.map +1 -0
  432. package/gmail-mailbox.ts +74 -0
  433. package/graves.js +136 -0
  434. package/graves.js.map +1 -0
  435. package/graves.ts +180 -0
  436. package/hashed.js +499 -0
  437. package/hashed.js.map +1 -0
  438. package/hashed.ts +676 -0
  439. package/home/assets.js +15 -0
  440. package/home/assets.js.map +1 -0
  441. package/home/assets.ts +16 -0
  442. package/home/brands/stripe.svg +12 -0
  443. package/home/brands/zoom.svg +34 -0
  444. package/home/demos.js +413 -0
  445. package/home/demos.js.map +1 -0
  446. package/home/demos.ts +431 -0
  447. package/home/games.js +112 -0
  448. package/home/games.js.map +1 -0
  449. package/home/games.ts +137 -0
  450. package/home/icons.js +41 -0
  451. package/home/icons.js.map +1 -0
  452. package/home/icons.ts +42 -0
  453. package/home/mascot/calculating.webp +0 -0
  454. package/home/mascot/flag.webp +0 -0
  455. package/home/mascot/letter.webp +0 -0
  456. package/home/mascot/plane.webp +0 -0
  457. package/home/mascot/plug.webp +0 -0
  458. package/home/mascot/thinking.webp +0 -0
  459. package/home/mascot/typing.webp +0 -0
  460. package/home/mascot/wave.webp +0 -0
  461. package/home/mod.tsx +517 -0
  462. package/home/parts.js +149 -0
  463. package/home/parts.js.map +1 -0
  464. package/home/parts.ts +45 -0
  465. package/home/phone.tsx +152 -0
  466. package/home/scenes.tsx +212 -0
  467. package/home/sky.js +930 -0
  468. package/home/sky.tsx +479 -0
  469. package/home/story.js +392 -0
  470. package/home/style.css +1304 -0
  471. package/home/words.js +2 -0
  472. package/home/words.js.map +1 -0
  473. package/home/words.ts +8 -0
  474. package/home/yak.js +146 -0
  475. package/home/yak_test.tsx +111 -0
  476. package/home-router.js +30 -0
  477. package/home-router.js.map +1 -0
  478. package/home-router.ts +41 -0
  479. package/host.js +58 -0
  480. package/host.js.map +1 -0
  481. package/host.ts +97 -0
  482. package/hosted-page.js +126 -0
  483. package/hosted-page.js.map +1 -0
  484. package/hosted-page.ts +295 -0
  485. package/install-browser.js +89 -0
  486. package/install-browser.js.map +1 -0
  487. package/install-browser.ts +99 -0
  488. package/install-icons.js +271 -0
  489. package/install-icons.js.map +1 -0
  490. package/install-icons.ts +366 -0
  491. package/installs.js +197 -0
  492. package/installs.js.map +1 -0
  493. package/installs.ts +270 -0
  494. package/instrument.js +50 -0
  495. package/instrument.js.map +1 -0
  496. package/instrument.ts +55 -0
  497. package/integration-icons.js +138 -0
  498. package/integration-icons.js.map +1 -0
  499. package/integration-icons.ts +198 -0
  500. package/interaction-browser.js +95 -0
  501. package/interaction-browser.js.map +1 -0
  502. package/interaction-browser.ts +107 -0
  503. package/interaction-report.js +399 -0
  504. package/interaction-report.js.map +1 -0
  505. package/interaction-report.ts +450 -0
  506. package/interaction.js +273 -0
  507. package/interaction.js.map +1 -0
  508. package/interaction.ts +290 -0
  509. package/invite-browser.js +98 -0
  510. package/invite-browser.js.map +1 -0
  511. package/invite-browser.ts +123 -0
  512. package/invite-view.js +100 -0
  513. package/invite-view.js.map +1 -0
  514. package/invite-view.ts +137 -0
  515. package/kept.js +520 -0
  516. package/kept.js.map +1 -0
  517. package/kept.ts +821 -0
  518. package/kills-graph.js +18 -0
  519. package/kills-graph.js.map +1 -0
  520. package/kills-graph.ts +16 -0
  521. package/ladder.js +418 -0
  522. package/ladder.js.map +1 -0
  523. package/ladder.ts +510 -0
  524. package/lenses-graph.js +24 -0
  525. package/lenses-graph.js.map +1 -0
  526. package/lenses-graph.ts +27 -0
  527. package/lenses.js +197 -0
  528. package/lenses.js.map +1 -0
  529. package/lenses.ts +204 -0
  530. package/lent.js +32 -0
  531. package/lent.js.map +1 -0
  532. package/lent.ts +95 -0
  533. package/letters.js +134 -0
  534. package/letters.js.map +1 -0
  535. package/letters.ts +251 -0
  536. package/lexicon-graph.js +11 -0
  537. package/lexicon-graph.js.map +1 -0
  538. package/lexicon-graph.ts +7 -0
  539. package/link-preview.js +111 -0
  540. package/link-preview.js.map +1 -0
  541. package/link-preview.ts +136 -0
  542. package/listing.js +262 -0
  543. package/listing.js.map +1 -0
  544. package/listing.ts +330 -0
  545. package/local-time.js +32 -0
  546. package/local-time.js.map +1 -0
  547. package/local-time.ts +41 -0
  548. package/located.js +380 -0
  549. package/located.js.map +1 -0
  550. package/located.ts +471 -0
  551. package/log-graph.js +7 -0
  552. package/log-graph.js.map +1 -0
  553. package/log-graph.ts +9 -0
  554. package/lower-graph.js +7 -0
  555. package/lower-graph.js.map +1 -0
  556. package/lower-graph.ts +9 -0
  557. package/mail-request.js +32 -0
  558. package/mail-request.js.map +1 -0
  559. package/mail-request.ts +29 -0
  560. package/mail-senders.js +40 -0
  561. package/mail-senders.js.map +1 -0
  562. package/mail-senders.ts +47 -0
  563. package/managed-browser-pilot.js +151 -0
  564. package/managed-browser-pilot.js.map +1 -0
  565. package/managed-browser-pilot.ts +230 -0
  566. package/managed-browser-sites.js +43 -0
  567. package/managed-browser-sites.js.map +1 -0
  568. package/managed-browser-sites.ts +41 -0
  569. package/managed-browser-wire.js +142 -0
  570. package/managed-browser-wire.js.map +1 -0
  571. package/managed-browser-wire.ts +140 -0
  572. package/managed-browser.js +529 -0
  573. package/managed-browser.js.map +1 -0
  574. package/managed-browser.ts +740 -0
  575. package/manifest.js +425 -0
  576. package/manifest.js.map +1 -0
  577. package/manifest.ts +468 -0
  578. package/metadata-effect.js +61 -0
  579. package/metadata-effect.js.map +1 -0
  580. package/metadata-effect.ts +59 -0
  581. package/meter-graph.js +205 -0
  582. package/meter-graph.js.map +1 -0
  583. package/meter-graph.ts +238 -0
  584. package/meter-vocab.js +8 -0
  585. package/meter-vocab.js.map +1 -0
  586. package/meter-vocab.ts +4 -0
  587. package/meter.js +402 -0
  588. package/meter.js.map +1 -0
  589. package/meter.ts +697 -0
  590. package/mod.js +14 -0
  591. package/mod.js.map +1 -0
  592. package/mod.ts +16 -0
  593. package/models-vocab.js +25 -0
  594. package/models-vocab.js.map +1 -0
  595. package/models-vocab.ts +15 -0
  596. package/monogram.js +32 -0
  597. package/monogram.js.map +1 -0
  598. package/monogram.ts +46 -0
  599. package/mover.js +6 -0
  600. package/mover.js.map +1 -0
  601. package/mover.ts +45 -0
  602. package/named.js +136 -0
  603. package/named.js.map +1 -0
  604. package/named.ts +169 -0
  605. package/names.js +196 -0
  606. package/names.js.map +1 -0
  607. package/names.ts +252 -0
  608. package/notices-vocab.js +20 -0
  609. package/notices-vocab.js.map +1 -0
  610. package/notices-vocab.ts +28 -0
  611. package/numbers.js +85 -0
  612. package/numbers.js.map +1 -0
  613. package/numbers.ts +97 -0
  614. package/object-hosts.js +137 -0
  615. package/object-hosts.js.map +1 -0
  616. package/object-hosts.ts +153 -0
  617. package/open-script.js +235 -0
  618. package/open-script.js.map +1 -0
  619. package/open-script.ts +253 -0
  620. package/opening.js +31 -0
  621. package/opening.js.map +1 -0
  622. package/opening.ts +28 -0
  623. package/operator-activity-view.js +82 -0
  624. package/operator-activity-view.js.map +1 -0
  625. package/operator-activity-view.ts +85 -0
  626. package/operator-activity.js +220 -0
  627. package/operator-activity.js.map +1 -0
  628. package/operator-activity.ts +293 -0
  629. package/operator-brief.js +36 -0
  630. package/operator-brief.js.map +1 -0
  631. package/operator-brief.ts +76 -0
  632. package/operator-copy-browser.js +67 -0
  633. package/operator-copy-browser.js.map +1 -0
  634. package/operator-copy-browser.ts +71 -0
  635. package/operator-corner.js +266 -0
  636. package/operator-corner.js.map +1 -0
  637. package/operator-corner.ts +300 -0
  638. package/operator-decisions.js +19 -0
  639. package/operator-decisions.js.map +1 -0
  640. package/operator-decisions.ts +18 -0
  641. package/operator-docs.js +152 -0
  642. package/operator-docs.js.map +1 -0
  643. package/operator-docs.ts +196 -0
  644. package/operator-door.js +10 -0
  645. package/operator-door.js.map +1 -0
  646. package/operator-door.ts +14 -0
  647. package/operator-drafts-browser.js +28 -0
  648. package/operator-drafts-browser.js.map +1 -0
  649. package/operator-drafts-browser.ts +32 -0
  650. package/operator-drafts.js +60 -0
  651. package/operator-drafts.js.map +1 -0
  652. package/operator-drafts.ts +80 -0
  653. package/operator-early-draft.js +110 -0
  654. package/operator-early-draft.js.map +1 -0
  655. package/operator-early-draft.ts +125 -0
  656. package/operator-go-browser.js +130 -0
  657. package/operator-go-browser.js.map +1 -0
  658. package/operator-go-browser.ts +182 -0
  659. package/operator-go-step.js +86 -0
  660. package/operator-go-step.js.map +1 -0
  661. package/operator-go-step.ts +92 -0
  662. package/operator-go-tool.js +49 -0
  663. package/operator-go-tool.js.map +1 -0
  664. package/operator-go-tool.ts +31 -0
  665. package/operator-go.js +68 -0
  666. package/operator-go.js.map +1 -0
  667. package/operator-go.ts +100 -0
  668. package/operator-graph.js +46 -0
  669. package/operator-graph.js.map +1 -0
  670. package/operator-graph.ts +60 -0
  671. package/operator-handoff.js +91 -0
  672. package/operator-handoff.js.map +1 -0
  673. package/operator-handoff.ts +104 -0
  674. package/operator-machine.js +136 -0
  675. package/operator-machine.js.map +1 -0
  676. package/operator-machine.ts +168 -0
  677. package/operator-matches-browser.js +155 -0
  678. package/operator-matches-browser.js.map +1 -0
  679. package/operator-matches-browser.ts +178 -0
  680. package/operator-matches-view.js +147 -0
  681. package/operator-matches-view.js.map +1 -0
  682. package/operator-matches-view.ts +224 -0
  683. package/operator-matches.js +65 -0
  684. package/operator-matches.js.map +1 -0
  685. package/operator-matches.ts +120 -0
  686. package/operator-memory.js +119 -0
  687. package/operator-memory.js.map +1 -0
  688. package/operator-memory.ts +122 -0
  689. package/operator-mic.ts +40 -0
  690. package/operator-model.js +144 -0
  691. package/operator-model.js.map +1 -0
  692. package/operator-model.ts +154 -0
  693. package/operator-notes.js +32 -0
  694. package/operator-notes.js.map +1 -0
  695. package/operator-notes.ts +40 -0
  696. package/operator-opening-browser.js +184 -0
  697. package/operator-opening-browser.js.map +1 -0
  698. package/operator-opening-browser.ts +195 -0
  699. package/operator-owner.js +391 -0
  700. package/operator-owner.js.map +1 -0
  701. package/operator-owner.ts +392 -0
  702. package/operator-page-context.js +121 -0
  703. package/operator-page-context.js.map +1 -0
  704. package/operator-page-context.ts +143 -0
  705. package/operator-page-image.js +38 -0
  706. package/operator-page-image.js.map +1 -0
  707. package/operator-page-image.ts +42 -0
  708. package/operator-panel-browser.js +601 -0
  709. package/operator-panel-browser.js.map +1 -0
  710. package/operator-panel-browser.ts +669 -0
  711. package/operator-panel-view.js +69 -0
  712. package/operator-panel-view.js.map +1 -0
  713. package/operator-panel-view.ts +100 -0
  714. package/operator-panel.js +131 -0
  715. package/operator-panel.js.map +1 -0
  716. package/operator-panel.ts +155 -0
  717. package/operator-push.tsx +112 -0
  718. package/operator-record.js +55 -0
  719. package/operator-record.js.map +1 -0
  720. package/operator-record.ts +92 -0
  721. package/operator-replies.js +240 -0
  722. package/operator-replies.js.map +1 -0
  723. package/operator-replies.ts +281 -0
  724. package/operator-reply-view.js +117 -0
  725. package/operator-reply-view.js.map +1 -0
  726. package/operator-reply-view.ts +185 -0
  727. package/operator-safety.js +30 -0
  728. package/operator-safety.js.map +1 -0
  729. package/operator-safety.ts +53 -0
  730. package/operator-settings-browser.js +257 -0
  731. package/operator-settings-browser.js.map +1 -0
  732. package/operator-settings-browser.ts +290 -0
  733. package/operator-settings-view.js +291 -0
  734. package/operator-settings-view.js.map +1 -0
  735. package/operator-settings-view.ts +588 -0
  736. package/operator-settings.js +79 -0
  737. package/operator-settings.js.map +1 -0
  738. package/operator-settings.ts +137 -0
  739. package/operator-source.js +43 -0
  740. package/operator-source.js.map +1 -0
  741. package/operator-source.ts +69 -0
  742. package/operator-talk-browser.js +94 -0
  743. package/operator-talk-browser.js.map +1 -0
  744. package/operator-talk-browser.ts +120 -0
  745. package/operator-talk.js +83 -0
  746. package/operator-talk.js.map +1 -0
  747. package/operator-talk.ts +127 -0
  748. package/operator-task-text.js +45 -0
  749. package/operator-task-text.js.map +1 -0
  750. package/operator-task-text.ts +49 -0
  751. package/operator-timing-browser.js +51 -0
  752. package/operator-timing-browser.js.map +1 -0
  753. package/operator-timing-browser.ts +68 -0
  754. package/operator-timing-view.js +48 -0
  755. package/operator-timing-view.js.map +1 -0
  756. package/operator-timing-view.ts +90 -0
  757. package/operator-timing.js +132 -0
  758. package/operator-timing.js.map +1 -0
  759. package/operator-timing.ts +170 -0
  760. package/operator-vocab.js +8 -0
  761. package/operator-vocab.js.map +1 -0
  762. package/operator-vocab.ts +7 -0
  763. package/operator-voice-audio.ts +84 -0
  764. package/operator-voice-browser.ts +237 -0
  765. package/operator-voice-feedback.js +108 -0
  766. package/operator-voice-feedback.js.map +1 -0
  767. package/operator-voice-feedback.ts +133 -0
  768. package/operator-voice-view.js +33 -0
  769. package/operator-voice-view.js.map +1 -0
  770. package/operator-voice-view.ts +43 -0
  771. package/operator-voice.css +38 -0
  772. package/operator-voice.js +35 -0
  773. package/operator-voice.js.map +1 -0
  774. package/operator-voice.ts +33 -0
  775. package/operator-wait.js +70 -0
  776. package/operator-wait.js.map +1 -0
  777. package/operator-wait.ts +79 -0
  778. package/operator-watches.js +126 -0
  779. package/operator-watches.js.map +1 -0
  780. package/operator-watches.ts +141 -0
  781. package/operator-words.js +94 -0
  782. package/operator-words.js.map +1 -0
  783. package/operator-words.ts +114 -0
  784. package/outreach-trial.js +103 -0
  785. package/outreach-trial.js.map +1 -0
  786. package/outreach-trial.ts +122 -0
  787. package/outreach-vocab.js +10 -0
  788. package/outreach-vocab.js.map +1 -0
  789. package/outreach-vocab.ts +7 -0
  790. package/outreach.js +162 -0
  791. package/outreach.js.map +1 -0
  792. package/outreach.ts +239 -0
  793. package/package.json +1131 -4
  794. package/packs.js +103 -0
  795. package/packs.js.map +1 -0
  796. package/packs.ts +119 -0
  797. package/page-copy.js +267 -0
  798. package/page-copy.js.map +1 -0
  799. package/page-copy.ts +362 -0
  800. package/page-graph.js +114 -0
  801. package/page-graph.js.map +1 -0
  802. package/page-graph.ts +151 -0
  803. package/page-links.js +78 -0
  804. package/page-links.js.map +1 -0
  805. package/page-links.ts +124 -0
  806. package/page-parts.js +236 -0
  807. package/page-parts.js.map +1 -0
  808. package/page-parts.ts +388 -0
  809. package/page-query.js +95 -0
  810. package/page-query.js.map +1 -0
  811. package/page-query.ts +120 -0
  812. package/page-script.js +183 -0
  813. package/page-script.js.map +1 -0
  814. package/page-script.ts +192 -0
  815. package/page-wire.js +93 -0
  816. package/page-wire.js.map +1 -0
  817. package/page-wire.ts +100 -0
  818. package/pages-vocab.js +9 -0
  819. package/pages-vocab.js.map +1 -0
  820. package/pages-vocab.ts +5 -0
  821. package/partials.js +21 -0
  822. package/partials.js.map +1 -0
  823. package/partials.ts +37 -0
  824. package/payment-browser.js +250 -0
  825. package/payment-browser.js.map +1 -0
  826. package/payment-browser.ts +298 -0
  827. package/payment-rows.js +117 -0
  828. package/payment-rows.js.map +1 -0
  829. package/payment-rows.ts +219 -0
  830. package/payment-view.js +397 -0
  831. package/payment-view.js.map +1 -0
  832. package/payment-view.ts +852 -0
  833. package/people-browser.js +186 -0
  834. package/people-browser.js.map +1 -0
  835. package/people-browser.ts +210 -0
  836. package/people-rows.js +192 -0
  837. package/people-rows.js.map +1 -0
  838. package/people-rows.ts +289 -0
  839. package/people-view.js +463 -0
  840. package/people-view.js.map +1 -0
  841. package/people-view.ts +804 -0
  842. package/person-lines.js +196 -0
  843. package/person-lines.js.map +1 -0
  844. package/person-lines.ts +256 -0
  845. package/place.js +30 -0
  846. package/place.js.map +1 -0
  847. package/place.ts +31 -0
  848. package/plan-details.js +39 -0
  849. package/plan-details.js.map +1 -0
  850. package/plan-details.ts +57 -0
  851. package/plan-trial-graph.js +63 -0
  852. package/plan-trial-graph.js.map +1 -0
  853. package/plan-trial-graph.ts +57 -0
  854. package/plans.js +223 -0
  855. package/plans.js.map +1 -0
  856. package/plans.ts +313 -0
  857. package/platform-credentials.js +136 -0
  858. package/platform-credentials.js.map +1 -0
  859. package/platform-credentials.ts +189 -0
  860. package/poster-backfill.js +72 -0
  861. package/poster-backfill.js.map +1 -0
  862. package/poster-backfill.ts +96 -0
  863. package/presence.js +57 -0
  864. package/presence.js.map +1 -0
  865. package/presence.ts +77 -0
  866. package/preview-audit.js +65 -0
  867. package/preview-audit.js.map +1 -0
  868. package/preview-audit.ts +126 -0
  869. package/preview-fit.js +62 -0
  870. package/preview-fit.js.map +1 -0
  871. package/preview-fit.ts +72 -0
  872. package/preview-html.js +96 -0
  873. package/preview-html.js.map +1 -0
  874. package/preview-html.ts +139 -0
  875. package/preview.js +317 -0
  876. package/preview.js.map +1 -0
  877. package/preview.ts +498 -0
  878. package/price.js +53 -0
  879. package/price.js.map +1 -0
  880. package/price.ts +85 -0
  881. package/profile-browser.js +117 -0
  882. package/profile-browser.js.map +1 -0
  883. package/profile-browser.ts +141 -0
  884. package/profile-view.js +96 -0
  885. package/profile-view.js.map +1 -0
  886. package/profile-view.ts +197 -0
  887. package/provider-credits.js +159 -0
  888. package/provider-credits.js.map +1 -0
  889. package/provider-credits.ts +174 -0
  890. package/public-site-choice.js +18 -0
  891. package/public-site-choice.js.map +1 -0
  892. package/public-site-choice.ts +21 -0
  893. package/public-site.js +151 -0
  894. package/public-site.js.map +1 -0
  895. package/public-site.ts +268 -0
  896. package/publishing-graph.js +136 -0
  897. package/publishing-graph.js.map +1 -0
  898. package/publishing-graph.ts +122 -0
  899. package/qr.js +32 -0
  900. package/qr.js.map +1 -0
  901. package/qr.ts +32 -0
  902. package/query-page.js +159 -0
  903. package/query-page.js.map +1 -0
  904. package/query-page.ts +249 -0
  905. package/query-refusal.js +174 -0
  906. package/query-refusal.js.map +1 -0
  907. package/query-refusal.ts +319 -0
  908. package/refusal-loop.js +71 -0
  909. package/refusal-loop.js.map +1 -0
  910. package/refusal-loop.ts +98 -0
  911. package/refusals-vocab.js +9 -0
  912. package/refusals-vocab.js.map +1 -0
  913. package/refusals-vocab.ts +5 -0
  914. package/refused-writes.js +119 -0
  915. package/refused-writes.js.map +1 -0
  916. package/refused-writes.ts +152 -0
  917. package/refused.js +67 -0
  918. package/refused.js.map +1 -0
  919. package/refused.ts +76 -0
  920. package/regional-route-storage.js +127 -0
  921. package/regional-route-storage.js.map +1 -0
  922. package/regional-route-storage.ts +94 -0
  923. package/regional-route.js +105 -0
  924. package/regional-route.js.map +1 -0
  925. package/regional-route.ts +158 -0
  926. package/regional-serving-copy.js +153 -0
  927. package/regional-serving-copy.js.map +1 -0
  928. package/regional-serving-copy.ts +200 -0
  929. package/release-asset.js +71 -0
  930. package/release-asset.js.map +1 -0
  931. package/release-asset.ts +121 -0
  932. package/release-browser.js +383 -0
  933. package/release-code.js +5 -0
  934. package/release-entry.js +3 -0
  935. package/release-file.js +169 -0
  936. package/release-file.js.map +1 -0
  937. package/release-file.ts +241 -0
  938. package/release-index.js +140 -0
  939. package/release-index.js.map +1 -0
  940. package/release-index.ts +161 -0
  941. package/release-page.js +227 -0
  942. package/release-reads.js +27 -0
  943. package/release-reads.js.map +1 -0
  944. package/release-reads.ts +56 -0
  945. package/release-sheets.js +76 -0
  946. package/release-state.js +181 -0
  947. package/release-update.js +22 -0
  948. package/release-update.js.map +1 -0
  949. package/release-update.ts +29 -0
  950. package/release.js +50 -0
  951. package/release.js.map +1 -0
  952. package/release.ts +72 -0
  953. package/released.js +263 -0
  954. package/released.js.map +1 -0
  955. package/released.ts +310 -0
  956. package/remake-graph.js +17 -0
  957. package/remake-graph.js.map +1 -0
  958. package/remake-graph.ts +15 -0
  959. package/rouse-graph.js +11 -0
  960. package/rouse-graph.js.map +1 -0
  961. package/rouse-graph.ts +8 -0
  962. package/route-memory.js +101 -0
  963. package/route-memory.js.map +1 -0
  964. package/route-memory.ts +132 -0
  965. package/routes.js +1143 -0
  966. package/routes.js.map +1 -0
  967. package/routes.ts +1502 -0
  968. package/sale-recovery.js +175 -0
  969. package/sale-recovery.js.map +1 -0
  970. package/sale-recovery.ts +156 -0
  971. package/sales.js +113 -0
  972. package/sales.js.map +1 -0
  973. package/sales.ts +150 -0
  974. package/schema.js +28 -0
  975. package/schema.js.map +1 -0
  976. package/schema.ts +13 -0
  977. package/serving-copy.js +161 -0
  978. package/serving-copy.js.map +1 -0
  979. package/serving-copy.ts +201 -0
  980. package/settings-drafts-browser.js +81 -0
  981. package/settings-drafts-browser.js.map +1 -0
  982. package/settings-drafts-browser.ts +95 -0
  983. package/settings-drafts.js +119 -0
  984. package/settings-drafts.js.map +1 -0
  985. package/settings-drafts.ts +136 -0
  986. package/shared-browser.js +61 -0
  987. package/shared-browser.js.map +1 -0
  988. package/shared-browser.ts +77 -0
  989. package/shared-view.js +29 -0
  990. package/shared-view.js.map +1 -0
  991. package/shared-view.ts +47 -0
  992. package/side-browser.js +164 -0
  993. package/side-browser.js.map +1 -0
  994. package/side-browser.ts +201 -0
  995. package/side-parts.js +258 -0
  996. package/side-parts.js.map +1 -0
  997. package/side-parts.ts +447 -0
  998. package/side-rows.js +64 -0
  999. package/side-rows.js.map +1 -0
  1000. package/side-rows.ts +104 -0
  1001. package/signed-in.js +37 -0
  1002. package/signed-in.js.map +1 -0
  1003. package/signed-in.ts +45 -0
  1004. package/site-assets.js +8 -0
  1005. package/site-assets.js.map +1 -0
  1006. package/site-assets.ts +25 -0
  1007. package/site-header.js +65 -0
  1008. package/site-header.js.map +1 -0
  1009. package/site-header.ts +71 -0
  1010. package/site-nav.js +75 -0
  1011. package/site-nav.js.map +1 -0
  1012. package/site-nav.ts +82 -0
  1013. package/site-validation.js +37 -0
  1014. package/site-validation.js.map +1 -0
  1015. package/site-validation.ts +47 -0
  1016. package/space-apps-browser.js +107 -0
  1017. package/space-apps-browser.js.map +1 -0
  1018. package/space-apps-browser.ts +128 -0
  1019. package/space-apps-view.js +222 -0
  1020. package/space-apps-view.js.map +1 -0
  1021. package/space-apps-view.ts +396 -0
  1022. package/space-apps.js +88 -0
  1023. package/space-apps.js.map +1 -0
  1024. package/space-apps.ts +143 -0
  1025. package/space-logo.js +82 -0
  1026. package/space-logo.js.map +1 -0
  1027. package/space-logo.ts +112 -0
  1028. package/space-pages-browser.js +474 -0
  1029. package/space-pages-browser.js.map +1 -0
  1030. package/space-pages-browser.ts +463 -0
  1031. package/space-pages-view.js +212 -0
  1032. package/space-pages-view.js.map +1 -0
  1033. package/space-pages-view.ts +460 -0
  1034. package/space-pages.js +193 -0
  1035. package/space-pages.js.map +1 -0
  1036. package/space-pages.ts +282 -0
  1037. package/space-switch.js +36 -0
  1038. package/space-switch.js.map +1 -0
  1039. package/space-switch.ts +64 -0
  1040. package/splash.js +510 -0
  1041. package/splash.js.map +1 -0
  1042. package/splash.ts +525 -0
  1043. package/standing.js +409 -0
  1044. package/standing.js.map +1 -0
  1045. package/standing.ts +746 -0
  1046. package/still.js +63 -0
  1047. package/still.js.map +1 -0
  1048. package/still.ts +95 -0
  1049. package/store-listing.js +107 -0
  1050. package/store-listing.js.map +1 -0
  1051. package/store-listing.ts +133 -0
  1052. package/store-wake.js +65 -0
  1053. package/store-wake.js.map +1 -0
  1054. package/store-wake.ts +101 -0
  1055. package/stream-posters.js +177 -0
  1056. package/stream-posters.js.map +1 -0
  1057. package/stream-posters.ts +297 -0
  1058. package/support-contract-service.js +219 -0
  1059. package/support-contract-service.js.map +1 -0
  1060. package/support-contract-service.ts +307 -0
  1061. package/support-contract-view.js +155 -0
  1062. package/support-contract-view.js.map +1 -0
  1063. package/support-contract-view.ts +265 -0
  1064. package/support-contract.js +114 -0
  1065. package/support-contract.js.map +1 -0
  1066. package/support-contract.ts +157 -0
  1067. package/sweep-vocab.js +10 -0
  1068. package/sweep-vocab.js.map +1 -0
  1069. package/sweep-vocab.ts +9 -0
  1070. package/talk-views-browser.js +208 -0
  1071. package/talk-views-browser.js.map +1 -0
  1072. package/talk-views-browser.ts +232 -0
  1073. package/talk-views.js +36 -0
  1074. package/talk-views.js.map +1 -0
  1075. package/talk-views.ts +64 -0
  1076. package/task-rows.js +86 -0
  1077. package/task-rows.js.map +1 -0
  1078. package/task-rows.ts +96 -0
  1079. package/tasks-view.js +111 -0
  1080. package/tasks-view.js.map +1 -0
  1081. package/tasks-view.ts +176 -0
  1082. package/toast.ts +17 -0
  1083. package/trash-graph.js +41 -0
  1084. package/trash-graph.js.map +1 -0
  1085. package/trash-graph.ts +27 -0
  1086. package/trash-vocab.js +8 -0
  1087. package/trash-vocab.js.map +1 -0
  1088. package/trash-vocab.ts +4 -0
  1089. package/trial.js +325 -0
  1090. package/trial.js.map +1 -0
  1091. package/trial.ts +451 -0
  1092. package/update-rows.js +77 -0
  1093. package/update-rows.js.map +1 -0
  1094. package/update-rows.ts +171 -0
  1095. package/update-waiting.js +131 -0
  1096. package/update-waiting.js.map +1 -0
  1097. package/update-waiting.ts +133 -0
  1098. package/updates-browser.js +28 -0
  1099. package/updates-browser.js.map +1 -0
  1100. package/updates-browser.ts +33 -0
  1101. package/updates-day-browser.js +77 -0
  1102. package/updates-day-browser.js.map +1 -0
  1103. package/updates-day-browser.ts +84 -0
  1104. package/updates-day.js +60 -0
  1105. package/updates-day.js.map +1 -0
  1106. package/updates-day.ts +94 -0
  1107. package/updates-list-browser.js +175 -0
  1108. package/updates-list-browser.js.map +1 -0
  1109. package/updates-list-browser.ts +198 -0
  1110. package/updates-view.js +546 -0
  1111. package/updates-view.js.map +1 -0
  1112. package/updates-view.ts +814 -0
  1113. package/upload-client-path.js +5 -0
  1114. package/upload-client-path.js.map +1 -0
  1115. package/upload-client-path.ts +4 -0
  1116. package/uploads.js +290 -0
  1117. package/uploads.js.map +1 -0
  1118. package/uploads.ts +334 -0
  1119. package/upstream.js +40 -0
  1120. package/upstream.js.map +1 -0
  1121. package/upstream.ts +57 -0
  1122. package/version-view.js +57 -0
  1123. package/version-view.js.map +1 -0
  1124. package/version-view.ts +99 -0
  1125. package/versions.js +231 -0
  1126. package/versions.js.map +1 -0
  1127. package/versions.ts +367 -0
  1128. package/visit-counts.js +123 -0
  1129. package/visit-counts.js.map +1 -0
  1130. package/visit-counts.ts +162 -0
  1131. package/visitor-location.js +33 -0
  1132. package/visitor-location.js.map +1 -0
  1133. package/visitor-location.ts +38 -0
  1134. package/visitor.js +152 -0
  1135. package/visitor.js.map +1 -0
  1136. package/visitor.ts +228 -0
  1137. package/visits-browser.js +71 -0
  1138. package/visits-browser.js.map +1 -0
  1139. package/visits-browser.ts +87 -0
  1140. package/visits-view.js +88 -0
  1141. package/visits-view.js.map +1 -0
  1142. package/visits-view.ts +184 -0
  1143. package/visits.js +428 -0
  1144. package/visits.js.map +1 -0
  1145. package/visits.ts +561 -0
  1146. package/vocab/account.vocab.json +349 -0
  1147. package/vocab/agents.vocab.json +64 -0
  1148. package/vocab/app-canvas.vocab.json +137 -0
  1149. package/vocab/app-friends.vocab.json +71 -0
  1150. package/vocab/app-permissions.vocab.json +46 -0
  1151. package/vocab/apps.vocab.json +553 -0
  1152. package/vocab/attribution.vocab.json +32 -0
  1153. package/vocab/builder-install.vocab.json +10 -0
  1154. package/vocab/connections.vocab.json +128 -0
  1155. package/vocab/dashboard.vocab.json +148 -0
  1156. package/vocab/directory.vocab.json +2445 -0
  1157. package/vocab/exception.vocab.json +18 -0
  1158. package/vocab/fundraising.vocab.json +284 -0
  1159. package/vocab/gmail-mailbox.vocab.json +73 -0
  1160. package/vocab/kernel.vocab.json +420 -0
  1161. package/vocab/mcp-retirement.vocab.json +66 -0
  1162. package/vocab/meter.vocab.json +230 -0
  1163. package/vocab/models-install.vocab.json +10 -0
  1164. package/vocab/notices.vocab.json +88 -0
  1165. package/vocab/operator-drafts.vocab.json +19 -0
  1166. package/vocab/operator-matches.vocab.json +85 -0
  1167. package/vocab/operator-settings.vocab.json +127 -0
  1168. package/vocab/operator-talk.vocab.json +92 -0
  1169. package/vocab/operator.vocab.json +1314 -0
  1170. package/vocab/outreach.vocab.json +141 -0
  1171. package/vocab/pages.vocab.json +38 -0
  1172. package/vocab/payment.vocab.json +271 -0
  1173. package/vocab/people.vocab.json +337 -0
  1174. package/vocab/presence.vocab.json +19 -0
  1175. package/vocab/preview.vocab.json +66 -0
  1176. package/vocab/referenced.vocab.json +17 -0
  1177. package/vocab/referral.vocab.json +272 -0
  1178. package/vocab/refusals.vocab.json +16 -0
  1179. package/vocab/registration.vocab.json +17 -0
  1180. package/vocab/serving.vocab.json +103 -0
  1181. package/vocab/side.vocab.json +97 -0
  1182. package/vocab/space-apps.vocab.json +137 -0
  1183. package/vocab/space-pages.vocab.json +416 -0
  1184. package/vocab/sweep-install.vocab.json +10 -0
  1185. package/vocab/sweep.vocab.json +125 -0
  1186. package/vocab/trash.vocab.json +19 -0
  1187. package/vocab/update.vocab.json +53 -0
  1188. package/vocab/upload.vocab.json +69 -0
  1189. package/vocab/use.vocab.json +93 -0
  1190. package/vocab/visits.vocab.json +143 -0
  1191. package/vocab/waiting.vocab.json +29 -0
  1192. package/vocab.js +16 -0
  1193. package/vocab.js.map +1 -0
  1194. package/vocab.json +1703 -0
  1195. package/vocab.ts +17 -0
  1196. package/weigh-graph.js +12 -0
  1197. package/weigh-graph.js.map +1 -0
  1198. package/weigh-graph.ts +9 -0
  1199. package/wire-news.js +30 -0
  1200. package/wire-news.js.map +1 -0
  1201. package/wire-news.ts +30 -0
  1202. package/work-standing.js +64 -0
  1203. package/work-standing.js.map +1 -0
  1204. package/work-standing.ts +44 -0
  1205. package/woven.js +435 -0
  1206. package/woven.js.map +1 -0
  1207. package/woven.ts +649 -0
  1208. package/wrap-graph.js +17 -0
  1209. package/wrap-graph.js.map +1 -0
  1210. package/wrap-graph.ts +15 -0
  1211. package/write-owner.js +11 -0
  1212. package/write-owner.js.map +1 -0
  1213. package/write-owner.ts +24 -0
package/routes.js ADDED
@@ -0,0 +1,1143 @@
1
+ /**
2
+ * `@yaks/platform/routes` — where a request is going, read from its hostname
3
+ * and path and nothing else (D-32318 §Routing). The apex `yaks.app` is the
4
+ * platform's own face; `<space>.yaks.app/<app>/…` is an app in a space. On
5
+ * loopback, an explicit LOCAL_DEV=1 lets `x-yak-host` stand in for a hostname
6
+ * a local test cannot send (fetch refuses a Host header). Deployed hosts
7
+ * always ignore the header. Pure: only the configured host, no store.
8
+ *
9
+ * ```ts
10
+ * import { route } from '@yaks/platform/routes'
11
+ * import { assertEquals } from '@std/assert'
12
+ * assertEquals(route('ada.yaks.app', '/menu/soup'), {
13
+ * space: 'ada',
14
+ * app: 'menu',
15
+ * path: '/soup',
16
+ * })
17
+ * ```
18
+ *
19
+ * @module
20
+ */ import { knocks } from "@yaks/git/address";
21
+ import { upgrading } from "./app-outbound.js";
22
+ import { apex, spaceHost, url } from "./host.js";
23
+ import { letter, monogram } from "./monogram.js";
24
+ import { PLATFORM, RESERVED, ROOT, SLUG } from "./names.js";
25
+ import { releaseId } from "./versions.js";
26
+ // A person's spaces and account live at the apex rather than on any space's
27
+ // hostname, so no app sharing a space's origin can reach them (T-39354). A
28
+ // space's own address, `/<space>`, is its Dashboard (T-3702): its apps, what
29
+ // its agents did and its Updates. Its Operator is at `/<space>/operator`
30
+ // (D-473): a new chat, each conversation at `/<space>/operator/<id>`, its
31
+ // Updates at `/<space>/updates` and its Matches at `/<space>/matches`; the
32
+ // person's Updates from every space are `/updates`. Manage is the settings: a space's at `/manage/<space>/<page>`,
33
+ // and the person's own, wherever they are, at `/manage/account/<page>`
34
+ // (T-136122), which no space can be named (./names.ts `RESERVED` holds
35
+ // `account`).
36
+ export let MANAGE = '/manage';
37
+ /** Where a provider-started connection is attached to a space after sign-in. */ export let CONNECTION_INSTALL = '/connections/install';
38
+ /** The person's Updates from every space's Operator. */ export let UPDATES = '/updates';
39
+ /** A texted link's page approving one act the Operator was asked for by a
40
+ * number alone (yaks.app's operator-approvals.ts). */ export let APPROVE = '/approve';
41
+ export let ACCOUNT = 'account';
42
+ let TALK = [
43
+ 'updates',
44
+ 'matches',
45
+ 'dashboard',
46
+ 'tasks'
47
+ ];
48
+ let talks = (view)=>TALK.includes(view);
49
+ let SPACE_VIEWS = [
50
+ 'apps',
51
+ 'new',
52
+ 'operator',
53
+ 'dashboard',
54
+ 'updates',
55
+ 'tasks',
56
+ 'matches',
57
+ 'people',
58
+ 'connections',
59
+ 'visits',
60
+ 'selling',
61
+ 'billing',
62
+ 'domains',
63
+ 'settings',
64
+ 'trash'
65
+ ];
66
+ let ACCOUNT_VIEWS = [
67
+ 'profile',
68
+ 'friends',
69
+ 'invite',
70
+ 'agents',
71
+ 'shared',
72
+ 'space'
73
+ ];
74
+ export let accountView = (view)=>ACCOUNT_VIEWS.includes(view);
75
+ // The pages before the space moved into the path, `/manage/<page>` with
76
+ // `?space=` or none for the person's own, and what each is now: letters
77
+ // already sent carry them.
78
+ let LEGACY = {
79
+ ...Object.fromEntries(SPACE_VIEWS.map((v)=>[
80
+ v,
81
+ v
82
+ ])),
83
+ connect: 'agents'
84
+ };
85
+ /** Whether a space named `slug` stands at the apex's root, `/<slug>`: every
86
+ * space but one holding a name the apex keeps for itself (./names.ts
87
+ * `RESERVED`, `ROOT`), whose Operator stays at `/manage/<slug>`.
88
+ *
89
+ * ```ts
90
+ * import { rooted } from '@yaks/platform/routes'
91
+ * import { assertEquals } from '@std/assert'
92
+ * assertEquals([rooted('ada'), rooted('admin'), rooted('gallery')], [true, false, false])
93
+ * ```
94
+ */ export let rooted = (slug)=>SLUG.test(slug) && !RESERVED.has(slug) && !ROOT.has(slug);
95
+ // Where a space's pages stand: its own address, else its old one under
96
+ // Manage.
97
+ let home = (space)=>rooted(space) ? `/${space}` : `${MANAGE}/${encodeURIComponent(space)}`;
98
+ /** A space's Dashboard: its own address, else under Manage, where the
99
+ * space's bare address is still its Operator.
100
+ *
101
+ * ```ts
102
+ * import { dashboardPath } from '@yaks/platform/routes'
103
+ * import { assertEquals } from '@std/assert'
104
+ * assertEquals(dashboardPath('ada'), '/ada')
105
+ * assertEquals(dashboardPath('yak'), '/manage/yak/dashboard')
106
+ * ```
107
+ */ export let dashboardPath = (space)=>rooted(space) ? home(space) : `${home(space)}/dashboard`;
108
+ /** A page of a space's Operator: its Dashboard, Updates or Matches. Without
109
+ * a space, Updates from every space the person talks to.
110
+ *
111
+ * ```ts
112
+ * import { talkPath } from '@yaks/platform/routes'
113
+ * import { assertEquals } from '@std/assert'
114
+ * assertEquals(talkPath('updates', 'ada'), '/ada/updates')
115
+ * assertEquals(talkPath('updates'), '/updates')
116
+ * assertEquals(talkPath('matches', 'yak'), '/manage/yak/matches')
117
+ * assertEquals(talkPath('dashboard', 'ada'), '/ada')
118
+ * ```
119
+ */ export let talkPath = (view, space)=>!space ? UPDATES : view == 'dashboard' ? dashboardPath(space) : `${home(space)}/${view}`;
120
+ /** The detail page an entity link can open over its current page. */ export let taskEntityPath = (space, eid)=>`${talkPath('tasks', space)}?${new URLSearchParams({
121
+ item: eid
122
+ })}`;
123
+ /** A settings page's path. A space's page without a space names the one the
124
+ * person opens first, whichever that is when they follow it. */ export let managePath = (view, space)=>accountView(view) ? `${MANAGE}/${ACCOUNT}/${view}` : space ? `${MANAGE}/${encodeURIComponent(space)}/${view}` : `${MANAGE}/${view}`;
125
+ /** The fund settings section of a space's Selling page. */ export let donationPath = (space, app)=>managePath('selling', space) + (app ? `?donations=${encodeURIComponent(app)}` : '') + '#donation-funds';
126
+ /** Open a chat account's OAuth confirmation from Profile. */ export let accountLink = (home, integration, space)=>{
127
+ let link = new URL(managePath('profile'), home);
128
+ link.searchParams.set('link', integration);
129
+ if (space) link.searchParams.set('back', space);
130
+ return link;
131
+ };
132
+ /** Where a form lands back: the page under /manage or of a space's Operator
133
+ * it names, at the apex, else `fallback`; a form never sends the person off
134
+ * yaks.app. */ export let backTo = (env, back, fallback)=>{
135
+ let apex = new URL(url(env));
136
+ let to = new URL(back || fallback, apex);
137
+ return to.origin == apex.origin && (to.pathname == MANAGE || to.pathname == CONNECTION_INSTALL || to.pathname.startsWith(`${MANAGE}/`) || !!spaced(to.pathname)) ? to.href : new URL(fallback, apex).href;
138
+ };
139
+ // What a conversation opens by: a task's or a request's eid, or `new`.
140
+ let OPEN = /^(new|[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12})$/;
141
+ /** An Operator conversation's own page, the chat app (operator-page.ts
142
+ * `chatPage`): one opened by its task or request, or a new one, which is the
143
+ * Operator's own address. Its other conversations are under it, so `open`
144
+ * empty is the prefix they share.
145
+ *
146
+ * ```ts
147
+ * import { chatPath } from '@yaks/platform/routes'
148
+ * import { assertEquals } from '@std/assert'
149
+ * let id = '0b5e6a52-3c1d-4f2e-9a8b-7c6d5e4f3a2b'
150
+ * assertEquals(chatPath('ada'), '/ada/operator')
151
+ * assertEquals(chatPath('ada', id), `/ada/operator/${id}`)
152
+ * assertEquals(chatPath('ada', ''), '/ada/operator/')
153
+ * assertEquals(chatPath('yak'), '/manage/yak')
154
+ * assertEquals(chatPath('yak', id), `/manage/yak/operator/${id}`)
155
+ * ```
156
+ */ export let chatPath = (space, open = 'new')=>rooted(space) ? `/${space}/operator${open == 'new' ? '' : `/${open}`}` : open == 'new' ? home(space) : `${managePath('operator', space)}/${open}`;
157
+ // A version's own page, under its space's: `versions/<app>/<version>`.
158
+ let VERSIONS = 'versions';
159
+ let shipped = (space, [app, n])=>SLUG.test(app) && /^[1-9][0-9]*$/.test(n) ? {
160
+ space,
161
+ view: 'versions',
162
+ version: {
163
+ app,
164
+ version: +n
165
+ }
166
+ } : null;
167
+ /** A version of an app's own page (operator-page.ts `versionPage`): what it
168
+ * changed, as its release says, and the way to it as it shipped.
169
+ *
170
+ * ```ts
171
+ * import { versionPath } from '@yaks/platform/routes'
172
+ * import { assertEquals } from '@std/assert'
173
+ * assertEquals(versionPath('ada', 'roster', 4), '/ada/versions/roster/4')
174
+ * assertEquals(versionPath('yak', 'roster', 4), '/manage/yak/versions/roster/4')
175
+ * ```
176
+ */ export let versionPath = (space, app, version)=>`${home(space)}/${VERSIONS}/${app}/${version}`;
177
+ /** Where a space's logo is drawn from, or none where it has none: its bytes'
178
+ * own address, so the address changes with the picture and nothing is ever
179
+ * shown stale.
180
+ *
181
+ * ```ts
182
+ * import { logoPath } from '@yaks/platform/routes'
183
+ * import { assertEquals } from '@std/assert'
184
+ * let sha = 'a'.repeat(64)
185
+ * assertEquals(logoPath({ slug: 'ada', logo: { sha } }), `/manage/ada/logo/${sha}?size=avatar`)
186
+ * assertEquals(logoPath({ slug: 'ada', logo: null }), undefined)
187
+ * ```
188
+ */ export let logoPath = (space, size = 'avatar')=>space.logo ? `${MANAGE}/${encodeURIComponent(space.slug)}/logo/${space.logo.sha}?size=${size}` : undefined;
189
+ /** Where Settings' Logo form sends a picture: Settings with `?logo`, so the
190
+ * page's Save, which also posts a multipart form there, is not read as one.
191
+ *
192
+ * ```ts
193
+ * import { logoUpload } from '@yaks/platform/routes'
194
+ * import { assertEquals } from '@std/assert'
195
+ * assertEquals(logoUpload('ada'), '/manage/ada/settings?logo')
196
+ * ```
197
+ */ export let logoUpload = (space)=>`${managePath('settings', space)}?logo`;
198
+ /** What draws an app's home-screen icon: its release, the space's logo and
199
+ * the artwork drawn for an app that has no icon of its own.
200
+ *
201
+ * ```ts
202
+ * import { iconVersion } from '@yaks/platform/routes'
203
+ * import { assertEquals } from '@std/assert'
204
+ * let id = '0b6b4f8c-fdcc-4a38-bcbd-15bad97cee69'
205
+ * assertEquals(
206
+ * iconVersion({ source: `ada/.releases/7/${id}` }, { logo: null }),
207
+ * `${id}.`,
208
+ * )
209
+ * ```
210
+ */ export let iconVersion = (app, space, art)=>`${art ?? releaseId(app.source) ?? app.source ?? ''}.${space.logo?.sha.slice(0, 12) ?? ''}${app.generatedIcon ? `.${app.generatedIcon.slice(0, 12)}` : ''}`;
211
+ /** The platform's empty response that starts an app ahead of navigation. */ export let APP_WARM = '/_web/warm';
212
+ /** The warm door under the app mount `at`. */ export let appWarmAt = (at)=>at.replace(/\/$/, '') + APP_WARM;
213
+ /** An app's icon below its address `at` (ending in a slash), named by what
214
+ * draws it (`iconVersion`), so a browser keeps it until a release or the
215
+ * logo changes it (workers/yak apps.ts `caching`).
216
+ *
217
+ * ```ts
218
+ * import { iconAt } from '@yaks/platform/routes'
219
+ * import { assertEquals } from '@std/assert'
220
+ * assertEquals(
221
+ * iconAt('https://ada.yaks.app/box/', { source: 'abc' }, { logo: null }),
222
+ * 'https://ada.yaks.app/box/icon.png?v=abc.',
223
+ * )
224
+ * ```
225
+ */ export let iconAt = (at, app, space, art)=>`${at}icon.png?v=${encodeURIComponent(iconVersion(app, space, art))}`;
226
+ /** The release and the platform artwork it can show. */ export let markVersion = ({ eid, slug, title, source, generatedIcon })=>{
227
+ let release = releaseId(source);
228
+ return release || source === null ? `3.${release ?? ''}.${eid}.${generatedIcon ?? letter(title || slug)}` : null;
229
+ };
230
+ /** The icon in an app list. */ export let appMark = (at, app)=>{
231
+ let version = markVersion(app);
232
+ return `${at}/icon.png?display${version ? `&v=${encodeURIComponent(version)}` : ''}`;
233
+ };
234
+ /** An app list's image and the mark it can paint before the image arrives. */ export let appMarkImage = (at, app)=>({
235
+ backdrop: {
236
+ 'data-app-mark': '',
237
+ style: {
238
+ '--app-mark': `url("data:image/svg+xml,${encodeURIComponent(monogram(app.title || app.slug, app.eid))}")`
239
+ }
240
+ },
241
+ image: {
242
+ src: appMark(at, app),
243
+ alt: '',
244
+ loading: 'lazy',
245
+ class: 'AppMark_Image',
246
+ 'data-app-mark-image': ''
247
+ }
248
+ });
249
+ /** Where the gallery serves pictures whose visibility follows an app. */ export let PICTURES = '/gallery/image/';
250
+ /** Where the connections page serves the logos it does not keep as SVG
251
+ * (workers/yak catalog.ts `logoDoor`), by the integration's name. */ export let LOGOS = '/connections/logo/';
252
+ export let STORED_LOGOS = `${LOGOS}file/`;
253
+ export let ICON_LIMIT = 1024 * 1024;
254
+ /** Where an integration's logo is drawn from, read from its row: its own
255
+ * SVG as a `data:` address, else the logo door for a row that names its
256
+ * logo's address (`image`), made absolute on the apex, or none where it has
257
+ * neither (@yaks/ui `Logo` then draws a neutral mark).
258
+ *
259
+ * ```ts
260
+ * import { integrationLogo } from '@yaks/platform/routes'
261
+ * import { assertEquals } from '@std/assert'
262
+ * let env = { APEX: 'yaks.test' }
263
+ * assertEquals(
264
+ * integrationLogo({ name: 'gmail', image: 'https://x.test/g.svg' }, env),
265
+ * 'https://yaks.test/connections/logo/gmail',
266
+ * )
267
+ * assertEquals(integrationLogo({ name: 'x', logo: '<svg/>' }), 'data:image/svg+xml,%3Csvg%2F%3E')
268
+ * assertEquals(integrationLogo({ name: 'mine' }), undefined)
269
+ * ```
270
+ */ export let integrationLogo = (i, env = {})=>i.logo ? `data:image/svg+xml,${encodeURIComponent(i.logo)}` : i.image ? url(env, SHA.test(i.image) ? STORED_LOGOS + i.image : `${LOGOS}${encodeURIComponent(i.name)}`) : undefined;
271
+ let SHA = /^[0-9a-f]{64}$/;
272
+ /** The name a web manifest answers at, under an app's mount or a space's
273
+ * Operator. */ export const MANIFEST = 'manifest.webmanifest';
274
+ /** The Operator's public icon. */ export let OPERATOR_ICON = '/connector-512.png';
275
+ /** What a space's Operator page installs from (operator-page.ts
276
+ * `installing`). */ export let manifestPath = (space)=>`${MANAGE}/${encodeURIComponent(space)}/${MANIFEST}`;
277
+ // Where each published app's own page lives (workers/yak app-page.ts): one
278
+ // address per platform-wide name, listed or not.
279
+ export let PAGE = '/apps/';
280
+ /** A published app's own page on the platform. */ /// pageAt('recipes') -> 'https://yaks.app/apps/recipes'
281
+ export let pageAt = (name, env = {})=>url(env, `${PAGE}${encodeURIComponent(name)}`);
282
+ // Where the page of a space that shares anything in public lives
283
+ // (workers/yak publisher-page.ts): one address per space slug.
284
+ export let PUBLISHER = '/spaces/';
285
+ /** The page of a space that shares anything in public. */ /// publisherAt('ada') -> 'https://yaks.app/spaces/ada'
286
+ export let publisherAt = (slug, env = {})=>url(env, `${PUBLISHER}${encodeURIComponent(slug)}`);
287
+ let STORE_DOORS = [
288
+ 'apply',
289
+ 'query',
290
+ 'ws'
291
+ ];
292
+ // A page of a space's Operator under Manage, where it was before D-473: sent
293
+ // on to the space's own address, unless the space holds a name the apex keeps
294
+ // (`rooted`), whose Operator is still served there.
295
+ let talked = (space, view, open = 'new')=>!rooted(space) ? {
296
+ space,
297
+ view,
298
+ ...view == 'operator' ? {
299
+ open
300
+ } : {}
301
+ } : {
302
+ moved: view == 'operator' ? chatPath(space, open) : talkPath(view, space)
303
+ };
304
+ /** What a path under `/manage` asks for (`Managed`), or null where it is not
305
+ * one. */ export let managed = (path)=>{
306
+ if (!(path == MANAGE || path.startsWith(`${MANAGE}/`))) return null;
307
+ let [one, two, ...rest] = path.slice(MANAGE.length).split('/').filter(Boolean);
308
+ // An Operator conversation, on a page of its own (`chatPath`), or a door
309
+ // of its store.
310
+ if (two == 'operator' && rest.length == 1 && SLUG.test(one)) {
311
+ if (STORE_DOORS.includes(rest[0])) {
312
+ return {
313
+ space: one,
314
+ view: 'operator',
315
+ door: rest[0]
316
+ };
317
+ }
318
+ return OPEN.test(rest[0]) ? talked(one, 'operator', rest[0]) : null;
319
+ }
320
+ if (two == VERSIONS && rest.length == 2 && SLUG.test(one)) {
321
+ let at = shipped(one, rest);
322
+ return at && rooted(one) ? {
323
+ moved: versionPath(one, at.version.app, at.version.version)
324
+ } : at;
325
+ }
326
+ if (two == MANIFEST && !rest.length && SLUG.test(one)) {
327
+ return {
328
+ space: one,
329
+ view: 'operator',
330
+ manifest: true
331
+ };
332
+ }
333
+ if (two == 'logo' && rest.length == 1 && SLUG.test(one)) {
334
+ return SHA.test(rest[0]) ? {
335
+ space: one,
336
+ view: 'settings',
337
+ logo: rest[0]
338
+ } : null;
339
+ }
340
+ if (rest.length) return null;
341
+ if (!one) return {
342
+ first: true
343
+ };
344
+ if (one == ACCOUNT) {
345
+ return !two ? {
346
+ account: 'profile'
347
+ } : ACCOUNT_VIEWS.includes(two) ? {
348
+ account: two
349
+ } : null;
350
+ }
351
+ if (one == 'updates' && !two) return {
352
+ moved: UPDATES
353
+ };
354
+ if (!two) {
355
+ return Object.hasOwn(LEGACY, one) ? {
356
+ legacy: LEGACY[one]
357
+ } : SLUG.test(one) ? talked(one, 'operator') : null;
358
+ }
359
+ if (!SLUG.test(one) || !SPACE_VIEWS.includes(two)) return null;
360
+ return talks(two) ? talked(one, two) : {
361
+ space: one,
362
+ view: two
363
+ };
364
+ };
365
+ /** What an address at the apex's root asks for: the person's Updates from
366
+ * every space (`/updates`), or a page of a space at the space's own address
367
+ * (`rooted`): its Dashboard, its Operator's chat or another page of its
368
+ * Operator; or null where it is none. A conversation's address from before
369
+ * the chat moved under `/operator` is sent on to where it is now.
370
+ *
371
+ * ```ts
372
+ * import { spaced } from '@yaks/platform/routes'
373
+ * import { assertEquals } from '@std/assert'
374
+ * let id = '0b5e6a52-3c1d-4f2e-9a8b-7c6d5e4f3a2b'
375
+ * assertEquals(spaced('/ada'), { space: 'ada', view: 'dashboard' })
376
+ * assertEquals(spaced('/ada/operator'), { space: 'ada', view: 'operator', open: 'new' })
377
+ * assertEquals(spaced(`/ada/operator/${id}`), { space: 'ada', view: 'operator', open: id })
378
+ * assertEquals(spaced(`/ada/${id}`), { moved: `/ada/operator/${id}` })
379
+ * assertEquals(spaced('/ada/updates'), { space: 'ada', view: 'updates' })
380
+ * assertEquals(spaced('/ada/versions/roster/4'), {
381
+ * space: 'ada',
382
+ * view: 'versions',
383
+ * version: { app: 'roster', version: 4 },
384
+ * })
385
+ * assertEquals(spaced('/ada/dashboard'), { moved: '/ada' })
386
+ * assertEquals(spaced('/pricing'), null)
387
+ * ```
388
+ */ export let spaced = (path)=>{
389
+ if (path == UPDATES) return {
390
+ updates: true
391
+ };
392
+ let [, one, two, ...rest] = path.split('/');
393
+ if (!rooted(one)) return null;
394
+ if (two == 'operator' && rest.length < 2) {
395
+ let open = rest[0] ?? 'new';
396
+ return OPEN.test(open) ? {
397
+ space: one,
398
+ view: 'operator',
399
+ open
400
+ } : null;
401
+ }
402
+ if (two == VERSIONS && rest.length == 2) return shipped(one, rest);
403
+ if (rest.length) return null;
404
+ if (two == null) return {
405
+ space: one,
406
+ view: 'dashboard'
407
+ };
408
+ if (two == 'dashboard') return {
409
+ moved: dashboardPath(one)
410
+ };
411
+ if (talks(two)) return {
412
+ space: one,
413
+ view: two
414
+ };
415
+ return OPEN.test(two) ? {
416
+ moved: chatPath(one, two)
417
+ } : null;
418
+ };
419
+ /** Whether `path` is a page a signed-in person opens in the frame: a space's
420
+ * page, every space's Updates, a settings page, or an address moved to one;
421
+ * never a store's door, a logo or a manifest.
422
+ *
423
+ * ```ts
424
+ * import { framed } from '@yaks/platform/routes'
425
+ * import { assertEquals } from '@std/assert'
426
+ * assertEquals(framed('/ada/updates'), true)
427
+ * assertEquals(framed('/manage/account/friends'), true)
428
+ * assertEquals(framed('/manage/ada/logo/' + 'a'.repeat(64)), false)
429
+ * assertEquals(framed('/pricing'), false)
430
+ * ```
431
+ */ export let framed = (path)=>{
432
+ let at = managed(path) ?? spaced(path);
433
+ return !!at && !('door' in at && at.door || 'logo' in at && at.logo || 'manifest' in at && at.manifest);
434
+ };
435
+ /** Where an address that names no space (`/manage`, or one from before the
436
+ * space was in the path) is now, for `space`: a page names its own, and none
437
+ * is the space's chat. */ export let landing = (at, space)=>'first' in at ? chatPath(space) : talks(at.legacy) ? talkPath(at.legacy, space) : managePath(at.legacy, space);
438
+ /** The path an address from before the dashboard named its space in the path
439
+ * (`/_yaks/<page>`, `/manage/<page>`) stands for in `space`, or null. */ export let movedFor = (path, space)=>{
440
+ let at = managed(path);
441
+ if (at && 'moved' in at && at.moved == UPDATES) {
442
+ return talkPath('updates', space);
443
+ }
444
+ return at && ('first' in at || 'legacy' in at) ? landing(at, space) : null;
445
+ };
446
+ /** The same page of a space's at another name, where a rename moved it. */ export let renamed = (at, slug)=>at.open ? chatPath(slug, at.open) : at.view == 'versions' ? at.version ? versionPath(slug, at.version.app, at.version.version) : dashboardPath(slug) : talks(at.view) ? talkPath(at.view, slug) : managePath(at.view, slug);
447
+ /** One space's settings page, as an address to put in a letter or an
448
+ * answer. */ export let manageAt = (space, view, env = {})=>url(env, managePath(view, space));
449
+ /** A connections page's address, still naming the testing integrations it
450
+ * was opened for (connections.ts `enabled`), so its forms and a sign-in begun
451
+ * there come back to the page as it was. */ export let enabling = (to, enable = [])=>{
452
+ if (!enable.length) return to;
453
+ let [path, hash] = to.split('#');
454
+ return `${path}${path.includes('?') ? '&' : '?'}enable=${enable.map(encodeURIComponent).join(',')}${hash == null ? '' : `#${hash}`}`;
455
+ };
456
+ // The path the platform keeps on every space's hostname, outside the
457
+ // app-slug namespace: a service's webhooks arrive under it (connections.ts
458
+ // `HOOKS`), and the dashboard's addresses from when it lived there move to
459
+ // the apex.
460
+ export let OURS = '/_yaks';
461
+ /** The generated style guide's own sheet and specimens (app-style-guide.ts),
462
+ * the same address on every app origin. No app page is given them. */ export let APP_GUIDE_CSS = '/_app-guide.css';
463
+ export let APP_SPECIMENS_JS = '/_app-specimens.js';
464
+ export let APP_GUIDE_ASSETS = [
465
+ APP_GUIDE_CSS,
466
+ APP_SPECIMENS_JS
467
+ ];
468
+ /** A read of a style guide asset at its shared address. */ export let appGuideRead = (method, path)=>(method == 'GET' || method == 'HEAD') && APP_GUIDE_ASSETS.includes(path);
469
+ /** The platform admin's directory, on the platform's own host (admin.ts). */ export let ADMIN = '/admin';
470
+ export let ADMIN_CONNECTIONS = `${ADMIN}/connections`;
471
+ export let adminConnectionsPath = (space, person)=>`${ADMIN_CONNECTIONS}?${new URLSearchParams({
472
+ space,
473
+ person
474
+ })}`;
475
+ export let adminPath = (path)=>path == ADMIN || path.startsWith(ADMIN + '/');
476
+ export let BROWSE = '/api/browse';
477
+ export let ADMIN_BROWSE = `${BROWSE}/admin`;
478
+ export let adminPage = (href, env = {})=>{
479
+ if (typeof href != 'string') return false;
480
+ let url = URL.parse(href);
481
+ return !!url && url.origin == `https://${apex(env)}` && !url.username && !url.password && adminPath(url.pathname);
482
+ };
483
+ /** Where signing out is posted (identity.ts). */ export let LOGOUT = '/logout';
484
+ // What the plans cost, as a page (site/pricing.tsx, D-32751). It lives here
485
+ // — beside the platform's own name, in the module with no dependencies —
486
+ // because both halves of the paid tier need it and they must not import each
487
+ // other: billing.ts writes the plan, usage.ts says where a space stands
488
+ // against its ceilings, and unseen.ts already joins them.
489
+ //
490
+ // It is the one address the agent surface may give (C-33033 on D-32751):
491
+ // OpenAI's app-directory policy forbids a plugin selling a subscription and
492
+ // allows explaining that a feature needs a plan and linking to a page that
493
+ // describes the plans. So a tool answer may name this and never a checkout
494
+ // link — checkout is the signed-in web page's, and email's.
495
+ export let PRICING = url({}, '/pricing');
496
+ /** Signed-in plan settings; login preserves this destination. Never checkout. */ export let planSettings = (slug, env = {})=>manageAt(slug, 'billing', env);
497
+ // One MCP resource, requiring sign-in by default. The explicit required URL
498
+ // remains for existing connectors; mixed auth is opt-in at `?auth=mixed`.
499
+ export let MCP = url({}, '/mcp');
500
+ export let MCP_ASK = `${MCP}?auth=required`;
501
+ // Where signing in happens — one email address and a six-digit code, and the
502
+ // same line for somebody who has never been here (signin.ts). It is here
503
+ // beside the other two for the same reason: everything that says it must say
504
+ // the same string, and the tools that name it in a refusal (tools.ts, anon.ts)
505
+ // cannot import identity.ts, which re-exports it, without dragging the
506
+ // runtime's own modules into a Deno test.
507
+ export let SIGN_IN = url({}, '/login');
508
+ /** Where someone who has not signed in is sent: the login page, already
509
+ * carrying the page to hand them back to (T-32593). Whether that address is
510
+ * one to follow is the login door's to decide. */ export let signInAt = (page, env)=>{
511
+ let to = new URL(`https://${apex(env)}/login`);
512
+ to.searchParams.set('return', page);
513
+ return to.href;
514
+ };
515
+ /** Send a signed-out visitor to sign-in with the requested platform page. */ export let signInReturn = (req, env)=>{
516
+ let { pathname, search } = new URL(req.url);
517
+ return new Response(null, {
518
+ status: 303,
519
+ headers: {
520
+ location: signInAt(url(env, pathname + search), env)
521
+ }
522
+ });
523
+ };
524
+ /** Where a paid plan's Get Started sends a stranger (site/home.tsx,
525
+ * site/pricing.tsx): signing in, then the Billing page of the space they open
526
+ * first, whose plan card is the button that buys the plan. Not the connector
527
+ * page, where the card waits closed below the setup. */ export let GET_PLAN = `/login?return=${encodeURIComponent(managePath('billing'))}`;
528
+ /** The page that installs a published app by its name (install.ts). Here
529
+ * beside the sign-in address, since a visitor's bar (./visits.ts) sends a
530
+ * stranger through the one to the other. */ export let INSTALL = '/install';
531
+ /** The page installing `name`, or, `back`, where it sends a stranger who
532
+ * pressed its button back to once signed in: the same page, marked so the
533
+ * funnel counts one who came back apart (install.ts). */ export let installAt = (name, back = false)=>`${INSTALL}?name=${encodeURIComponent(name)}${back ? '&from=sign-in' : ''}`;
534
+ /** Whether an install page's address is one a stranger came back to from
535
+ * signing in (`installAt`). */ export let isBack = (url)=>url.searchParams.get('from') == 'sign-in';
536
+ export let says = (env = {})=>`sign in at ${url(env, '/login')} to reach your apps from here`;
537
+ // And the sentence every refusal says about it: what a person's agent reads
538
+ // when it asked for something nobody signed in may have. It lives here beside
539
+ // the address rather than at one of the doors, because three of them say it —
540
+ // the 401 and its challenge (identity.ts), and the tools a stranger is shown
541
+ // but may not call (anon.ts `barred`).
542
+ export let SAYS = says();
543
+ // And what an agent's connector form asks for when it will not go and find it
544
+ // (T-34414): the authorization server's own addresses and the one scope.
545
+ // identity.ts configures the provider with these, so they are the same strings
546
+ // the two `/.well-known` documents serve, and the connect page types them out
547
+ // for a person whose form has empty boxes. Paths, not absolute URLs, because
548
+ // the provider matches an endpoint by hostname and path and the probe kernel
549
+ // is not at this hostname; the page absolutes them against PLATFORM.
550
+ export let OAUTH = {
551
+ authorize: '/oauth/authorize',
552
+ token: '/oauth/token',
553
+ register: '/oauth/register',
554
+ scope: 'graph'
555
+ };
556
+ // The Cloudflare for SaaS fallback origin (T-33036): the name a customer's
557
+ // own hostname is CNAME'd to, and the one place that name is written — the
558
+ // attach flow and the guide both read it here.
559
+ //
560
+ // Two labels deep on purpose. `route()` below reads everything before
561
+ // `.yaks.app` as a space slug, and `SLUG` admits no dot, so `x.y.yaks.app` is
562
+ // already outside the space namespace and no person can ever claim the space
563
+ // that would shadow our own origin. A one-label name (`origin.yaks.app`)
564
+ // would have needed a reserved-word list to hold that line, and a list is a
565
+ // thing to forget; the namespace's own shape does not forget.
566
+ //
567
+ // This is also the reason a domain mid-provisioning reaches the Worker at
568
+ // all instead of timing out (T-33036): the CNAME above and the `*/*` route
569
+ // mean traffic for any custom hostname on this zone arrives here, active or
570
+ // not — a visitor of a domain whose DNS, validation or certificate step has
571
+ // not finished yet used to get a raw 522 with nothing between them and it.
572
+ // index.ts `settling` is the branded page that answers there now.
573
+ export let ORIGIN = `origin.saas.${PLATFORM}`;
574
+ // Where the app serving this request is mounted for the browser that asked:
575
+ // the prefix its pages resolve relative URLs against, and the address its own
576
+ // `/<app>/` would forward to. `/<app>/` normally, and `/` when a custom
577
+ // domain carried the request here — there the app is the domain's root
578
+ // (index.ts `aimed`), even though the address the platform routes on names
579
+ // the app's prefix. The router sets this header on a request it rewrote
580
+ // itself and strips it off anything a client sent, so it is never a way to
581
+ // move an app's address from outside.
582
+ export let MOUNT = 'x-yak-mount';
583
+ /** The header an app's own worker carries its sealed visitor in, coming back
584
+ * through its service binding (dispatch.ts). */ export let GRANT = 'x-yak-grant';
585
+ /** Whether a request carries one, valid or not: it is the kernel's to open. */ export let bearing = (req)=>req.headers.has(GRANT);
586
+ // The addresses on a space's hostname its apps never answer: a repository's
587
+ // (@yaks/git/door, mounted by workers/yak git_door.ts) and a service's
588
+ // webhooks (connections.ts). They come before the apps and before the edge's
589
+ // kept pages.
590
+ export let spaceDoor = (path)=>knocks(path) || path.startsWith(`${OURS}/hooks/`);
591
+ /** The browser-facing URL retained when the router aims a custom domain. */ export let ADDRESS = 'x-yak-address';
592
+ /** Where an app's own `api/` is for the browser that asked, where it is not
593
+ * under the app's mount (`MOUNT`): the home app's at the apex (workers/yak
594
+ * site.ts `HOME`), whose pages are mounted at `/`, where `/api/` is the
595
+ * apex's own doors. The pencil reads its doors there (page-script.ts). Set
596
+ * by the router alone, as `MOUNT` is. */ export let API_AT = 'x-yak-api-at';
597
+ // Where a hostname somebody else owns is served from: the address on our own
598
+ // zone that the request is carried to, and the mount the app sits at there
599
+ // (T-34596). The directory says which place the domain names — a space, or one
600
+ // app of it — and this is the whole of what that difference means.
601
+ //
602
+ // A domain on a space is that space's own hostname with the path untouched, so
603
+ // it routes through `route()` and every rung of apps.ts exactly as
604
+ // `<space>.yaks.app` does: the front page at `/`, each app at `/<app>/`, the
605
+ // space's own doors where they always were. There is no second path rule for
606
+ // it, because it is the rule.
607
+ //
608
+ // A domain on an app is that app's prefix under the same hostname, mounted at
609
+ // `/`: `herbusiness.com/menu` is `<space>.yaks.app/<app>/menu`, and the mount
610
+ // says the app's pages resolve from the domain's root rather than from the
611
+ // prefix the platform routed by. Both may point at one space at once — the
612
+ // app's own domain opens it at `/`, the space's opens it at `/<app>/`.
613
+ export let aimedAt = (space, app, pathname, env = {})=>({
614
+ host: spaceHost(env, space),
615
+ pathname: app ? `/${app}${pathname}` : pathname,
616
+ mount: app ? '/' : null
617
+ });
618
+ /** Whether a domain serves its place: provisioned, and shown to be its
619
+ * owner's where Cloudflare asked for that. Anything else is answered the
620
+ * page that says how far it has come (kernel.ts `settling`). */ export let ready = (at)=>at?.host.stage == 'active' && (!!at.host.verified || at.host.verification == null);
621
+ /** A request to a hostname that is a place of ours, a custom domain or the
622
+ * apex's own pages (workers/yak site.ts `HOME`), carried to the address that
623
+ * place already has on our own zone (`aimedAt`), naming the address the
624
+ * browser asked (`ADDRESS`) and, for an app, the mount it answers at
625
+ * (`MOUNT`).
626
+ *
627
+ * ```ts
628
+ * import { ADDRESS, aim, MOUNT } from '@yaks/platform/routes'
629
+ * import { assertEquals } from '@std/assert'
630
+ * let at = { space: { slug: 'ada' }, app: { slug: 'menu' } }
631
+ * let req = aim(new Request('http://her.com/soup?x=1'), 'her.com', at)
632
+ * assertEquals(req.url, 'https://ada.yaks.app/menu/soup?x=1')
633
+ * assertEquals(req.headers.get(ADDRESS), 'https://her.com/soup?x=1')
634
+ * assertEquals(req.headers.get(MOUNT), '/')
635
+ * ```
636
+ */ export let aim = (req, host, at, env = {})=>{
637
+ let url = new URL(req.url);
638
+ let address = new URL(req.url);
639
+ address.host = host;
640
+ address.port = '';
641
+ address.protocol = 'https:';
642
+ let to = aimedAt(at.space.slug, at.app?.slug ?? null, url.pathname, env);
643
+ url.protocol = 'https:';
644
+ url.host = to.host;
645
+ url.pathname = to.pathname;
646
+ let headers = new Headers(req.headers);
647
+ headers.set(ADDRESS, address.href);
648
+ if (to.mount) headers.set(MOUNT, to.mount);
649
+ return new Request(url, new Request(req, {
650
+ headers
651
+ }));
652
+ };
653
+ // The path a customer's own hostname answers the handoff at (handoff.ts).
654
+ // Namespaced so an app's own routes do not collide with it.
655
+ export let HANDOFF = '/__yak/signin';
656
+ /** Whether this is a custom domain's sign-in handoff, the one identity door
657
+ * a customer's own hostname answers (identity.ts `handoff`). */ export let handedOff = (host, pathname, env = {})=>foreign(host, env) && pathname == HANDOFF;
658
+ /** Whether a hostname is this machine's: a local dev run's, never deployed. */ export let loopback = (host)=>host == 'localhost' || host == '127.0.0.1' || host == '[::1]' || host.endsWith('.localhost');
659
+ export let hostOf = (req, env = {})=>{
660
+ let host = new URL(req.url).hostname.toLowerCase();
661
+ return env.LOCAL_DEV == '1' && loopback(host) ? (req.headers.get('x-yak-host') ?? host).toLowerCase() : host;
662
+ };
663
+ // A hostname that is neither ours nor a dev host — someone else's domain,
664
+ // which the directory may know as a customer's (T-33037). Everything the
665
+ // platform already answers on is not foreign, so every route that exists
666
+ // today is decided before this is ever asked: the apex, a space, a dev host,
667
+ // and `x.y.yaks.app`, which was the apex before custom domains and still is.
668
+ export let foreign = (host, env = {})=>!loopback(host) && host != apex(env) && !host.endsWith(`.${apex(env)}`);
669
+ // An address on the platform's own zone: https, and the apex or a hostname
670
+ // under it. It is what a sign-in may hand someone back to (T-32593) — a
671
+ // stranger's address is nowhere we send anyone, so it answers null and the
672
+ // caller goes home instead. Pure, like the rest of this file.
673
+ //
674
+ // A custom domain is deliberately not on the zone (T-33037). We serve it, but
675
+ // the return address arrives from whoever asked, this check is the only thing
676
+ // between that and an open redirect, and it is pure and synchronous — reading
677
+ // the directory here to see whether a stranger's hostname is a customer's
678
+ // would make the one guard in the path an async lookup that can fail open.
679
+ // Nothing is lost by refusing: the platform session cookie is `yaks.app`'s, so
680
+ // a person handed back to `herbusiness.com` would arrive signed out anyway.
681
+ // index.ts serves a custom domain at its app's own address on this zone, so
682
+ // sign-in hands them back there, signed in. A domain that wants to keep
683
+ // someone on their own hostname needs its own verified return, not a wider
684
+ // `onZone`.
685
+ export let onZone = (href, env = {})=>{
686
+ // A bare path is on the zone by construction, and it is what the platform's
687
+ // own returns are made of (`/login?return=/connect`), so refusing one threw
688
+ // away every address we minted ourselves. `//host` — and `/\host`, which a
689
+ // browser reads the same way — is a stranger's URL wearing a path's
690
+ // clothes, and is refused with the rest.
691
+ if (href.startsWith('/')) return /^\/[/\\]/.test(href) ? null : href;
692
+ let url;
693
+ try {
694
+ url = new URL(href);
695
+ } catch {
696
+ return null;
697
+ }
698
+ let host = url.hostname.toLowerCase();
699
+ return url.protocol == 'https:' && (host == apex(env) || host.endsWith(`.${apex(env)}`)) ? url.href : null;
700
+ };
701
+ export let route = (host, pathname, env = {})=>{
702
+ let space = host.endsWith(`.${apex(env)}`) ? host.slice(0, -apex(env).length - 1) : null;
703
+ if (space == null || !SLUG.test(space)) {
704
+ return {
705
+ space: null,
706
+ app: null,
707
+ path: pathname
708
+ };
709
+ }
710
+ let [, first, ...rest] = pathname.split('/');
711
+ if (!first || !SLUG.test(first)) return {
712
+ space,
713
+ app: null,
714
+ path: pathname
715
+ };
716
+ return {
717
+ space,
718
+ app: first,
719
+ path: pathname.length > first.length + 1 ? `/${rest.join('/')}` : ''
720
+ };
721
+ };
722
+ // What the PLATFORM owns rather than an app, read from the hostname and the
723
+ // path. The whole rule in one idea: `/.well-known/` is where a site grants
724
+ // authority over its own name, and the name under `<space>.yaks.app` is ours
725
+ // — a space rents a label of our hostname, it does not own it.
726
+ //
727
+ // The test is NOT whether a file is host-scoped. `robots.txt` is host-scoped
728
+ // and stays the app's, deliberately: a robots file grants nobody anything,
729
+ // it is a preference about the site, and the site's face is the home app.
730
+ // The test is whether the file hands somebody a capability over a name we
731
+ // own. `assetlinks.json` grants a native Android app the right to intercept
732
+ // URLs for the whole hostname; `apple-app-site-association` does the same on
733
+ // iOS; an HTTP-01 challenge yields a publicly trusted certificate for a
734
+ // hostname on our zone. A space's app must not be able to grant those on our
735
+ // name, and that holds for the HOME app too, which otherwise answers every
736
+ // address no other app claims (T-33040) — which is how all of this landed in
737
+ // an app in the first place, and why top-level routing has to say out loud
738
+ // that it wins.
739
+ //
740
+ // The whole prefix rather than the three files, because a list of names that
741
+ // grant authority is a thing to forget — the next one ships without us —
742
+ // and on our own hostname there is nothing under it we lose by keeping.
743
+ //
744
+ // The same files are the app's on a customer's own domain (`foreign`), by
745
+ // this idea rather than despite it: there the name is theirs, so the
746
+ // authority is theirs to grant. Proving domain control to a third party is
747
+ // exactly what `pki-validation` is for at Sectigo and DigiCert, Stripe asks
748
+ // for `apple-developer-merchantid-domain-association` before Apple Pay
749
+ // works, App Links, Universal Links, `security.txt`, WebFinger, Matrix
750
+ // delegation and fediverse verification all live here, and obtaining a
751
+ // certificate for your own domain is your own business. Nothing is reserved
752
+ // there, and there is no list of exceptions to keep: a path is the
753
+ // platform's when the platform has something to serve at it, and everything
754
+ // else falls through to the app. The apps-directory token is the shape of
755
+ // that — the apex has content at `/.well-known/openai-apps-challenge` and
756
+ // answers it (index.ts), while `/.well-known/anything-else` is nobody's and
757
+ // 404s. When Stripe or Apple Pay needs to answer somewhere, it will answer
758
+ // because it has content, not because a string was added to a table.
759
+ //
760
+ // Our own renewal of a customer's custom-hostname certificate is not at risk
761
+ // from that. This zone has a `*/*` Worker route (wrangler.toml, T-33036), and
762
+ // Cloudflare warns it can intercept a CA's request
763
+ // (developers.cloudflare.com/ssl/edge-certificates/changing-dcv-method/troubleshooting/).
764
+ // Measured 2026-09-03: with that route live and the Worker answering these
765
+ // paths itself, a probe hostname was attached as a custom hostname and
766
+ // ssl.com issued its certificate within a minute, while a request to
767
+ // `/.well-known/acme-challenge/x` on that hostname reached the Worker and got
768
+ // its soft 404. Cloudflare's edge answers the CA before the route ever runs.
769
+ // That measurement is also why the platform can answer its own 404 on our
770
+ // hostnames instead of passing a request through to a fallback origin that is
771
+ // deliberately originless (`AAAA 100::`).
772
+ export let platform = (host, pathname, env = {})=>!foreign(host, env) && pathname.startsWith('/.well-known/');
773
+ // What a page at another address may not ask for here, read from the method
774
+ // and the path (`sameOrigin` below is the check itself).
775
+ //
776
+ // Every write, wherever it is aimed. Sibling spaces are same-site, so any
777
+ // form a page in anybody's space aims at a door that acts on the session
778
+ // cookie arrives with the cookie. A list of the doors that write was the
779
+ // guard once, and every door added after it was open: the OAuth consent, the
780
+ // space delete, the standing link and the address picker were all forged from
781
+ // a free space (T-37874), as the billing webhook had been by being renamed
782
+ // out of the list (T-35357). The method is the one thing a new door cannot
783
+ // forget to say. Guarding costs a server-to-server caller nothing — Stripe
784
+ // posts with no `Origin`, and an absent one is allowed.
785
+ //
786
+ // Except the two doors the OAuth provider answers with CORS on purpose:
787
+ // token and registration read no cookie at all, a code, its PKCE verifier
788
+ // and a client's own metadata being the whole of what they take, and a
789
+ // browser-based client posts to them from its own origin.
790
+ //
791
+ // And the doors the graph answers at, whatever the method: an app's
792
+ // `/<app>/api/…`, a front page's own `/api/…` (apps.ts `fetch` serves the home
793
+ // app everything no other app claims), and the connector at `/mcp`, where a
794
+ // socket or a stream is a read that carries the session's write grant.
795
+ // Pages, files and images are deliberately not here — an app's bytes are the
796
+ // web's, and a cross-origin GET of one carries no `Origin` anyway. The shape
797
+ // over-reaches a little: a static asset at `/x/api/y` on the apex matches too,
798
+ // which costs nothing, since nothing a browser fetches cross-origin without
799
+ // CORS can read the answer either way.
800
+ //
801
+ // And every WebSocket handshake, wherever it is aimed: a handshake is a GET
802
+ // that carries the cookie and is outside the same-origin policy, and the page
803
+ // that opens a socket reads and writes it. The upgrade header, like the
804
+ // method, is one no new socket can forget to send, so no list of socket paths
805
+ // has to keep up.
806
+ export let guarded = (req)=>{
807
+ let { method } = req, path = new URL(req.url).pathname;
808
+ return method != 'GET' && method != 'HEAD' && method != 'OPTIONS' && path != OAUTH.token && path != OAUTH.register || path == '/mcp' || /^(?:\/[^/]+)?\/api\//.test(path) || upgrading(req);
809
+ };
810
+ // The browser's own word for the page that asked, against the hostname it
811
+ // asked at. Every space is a subdomain of one registrable domain, so sibling
812
+ // spaces are same-site: `SameSite=Lax` does not keep the session cookie off a
813
+ // request one space's page aims at another's, and a websocket handshake is
814
+ // outside the same-origin policy altogether. This is the line that separates
815
+ // them, and it is the whole of it everywhere except the one door below, where
816
+ // the answer carries CORS headers precisely because no cookie was read.
817
+ //
818
+ // Absent is allowed on purpose. A browser sends `Origin` on every
819
+ // cross-origin fetch and on every handshake, so refusing only a mismatch
820
+ // closes the browser attack completely; curl, a server-to-server client and
821
+ // the kernel's own internal requests send none and have no page to be tricked
822
+ // through. Requiring the header would break them for no security at all.
823
+ //
824
+ // Hostname only: scheme and port differ between a dev host and the platform,
825
+ // and neither is what a space is isolated by.
826
+ //
827
+ // The apex is no sibling: it is the platform's own pages, with no app's code
828
+ // in them, and the dashboard there aims at a space's doors (pages.ts `desk`:
829
+ // the drop zone). A page that could forge a request
830
+ // from the apex could already consent to an agent or close a space there, so
831
+ // admitting it here gives nothing away.
832
+ //
833
+ // `Origin: null` is a stranger (a sandboxed frame's opaque origin), unless the
834
+ // browser's own `Sec-Fetch-Site`, which no page can set, says the request
835
+ // came from this very origin: a form posted from one of our pages served with
836
+ // `Referrer-Policy: no-referrer` (the approval and sign-in pages) is sent with
837
+ // `Origin: null`. A sandboxed frame's requests are `cross-site` there.
838
+ export let sameOrigin = (host, origin, env = {}, site = null)=>{
839
+ if (!origin) return true;
840
+ if (origin == 'null') return site == 'same-origin';
841
+ try {
842
+ let from = new URL(origin).hostname.toLowerCase();
843
+ return from == host.toLowerCase() || from == apex(env);
844
+ } catch {
845
+ return false;
846
+ }
847
+ };
848
+ // The one door above that a stranger's page may reach anyway (T-33408), and
849
+ // the shape of the whole permission: the app's read door, asked with GET, and
850
+ // answered as nobody — the router drops the request's credentials before it is
851
+ // served and sends `Access-Control-Allow-Origin: *` with no
852
+ // `Access-Control-Allow-Credentials` beside it, which is the browser's own
853
+ // guarantee that no cookie was used and none can be read (`cors`).
854
+ //
855
+ // It is safe because what `sameOrigin` closes is ambient credentials, not
856
+ // secrecy: a public app's rows already answer to anyone with curl, and the
857
+ // attack was the session cookie riding along on a request one space's page
858
+ // aimed at another's. Take the cookie away and the request is curl with a
859
+ // referrer. What the caller may then read is the app's own `access`, unchanged
860
+ // and decided downstream: `public` and `open` answer a stranger, `private`
861
+ // refuses one.
862
+ //
863
+ // Writes are not here and must not be. An `open` app lets a stranger write —
864
+ // with the link, from its own page — and a cross-origin write is the forgery
865
+ // origin_test.ts fires. Nor is `/ws`, which is a read but carries the
866
+ // write grant on the same socket, nor `/graph`, `/who` or `/blob`: this is the
867
+ // door the answer is data at, and nothing else has asked to be shared.
868
+ //
869
+ // No preflight door is needed and none is built: a GET with no author-set
870
+ // headers is a CORS simple request, so the browser sends it and reads the
871
+ // answer with no `OPTIONS` in between. A client that adds a header would need
872
+ // one, and can ask for it when it exists.
873
+ export let shared = (method, pathname)=>(method == 'GET' || method == 'HEAD') && /^(?:\/[^/]+)?\/api\/query$/.test(pathname);
874
+ /** A read the query Worker can take on a space's hostname. The directory
875
+ * still decides which app owns the address and what its caller may read. */ export let queryRequest = (req, env = {})=>{
876
+ if (![
877
+ 'GET',
878
+ 'HEAD',
879
+ 'OPTIONS'
880
+ ].includes(req.method)) return false;
881
+ if (req.headers.has('upgrade')) return false;
882
+ let path = collapsedPath(new URL(req.url).pathname);
883
+ let host = hostOf(req, env);
884
+ let at = route(host, path, env);
885
+ if (!at.space || platform(host, path, env) || previews(path) || spaceDoor(path)) return false;
886
+ return queryPath(path) || queryPath(at.path);
887
+ };
888
+ /** A store query at the app-relative address, with or without a page token. */ export let queryPath = (path)=>/^(?:\/~[^/]+)?\/api\/query$/.test(path);
889
+ /** A private binding response asking the front to send the original request
890
+ * to the kernel, where the address belongs to a different door. */ export let QUERY_PASS = 'x-yak-query-pass';
891
+ // The pages of ours at other addresses that ask the sign-in door for a code
892
+ // (D-138669): yak.sh's "Get set up on yaks.app" section posts the address
893
+ // typed there, and gets the letter any sign-in gets (signin.ts `codeLetter`).
894
+ export let ASKERS = [
895
+ 'yak.sh'
896
+ ];
897
+ // Whether a request's `Origin` is one of {@link ASKERS}.
898
+ let asker = (origin)=>{
899
+ try {
900
+ return ASKERS.includes(new URL(origin ?? '').hostname.toLowerCase());
901
+ } catch {
902
+ return false;
903
+ }
904
+ };
905
+ // The second door a page elsewhere may reach, opened the way the first is,
906
+ // with the credentials taken off (`admitted`): asking for a
907
+ // code reads no cookie, and answers a page exactly what it answers curl. Only
908
+ // for {@link ASKERS}, so no other page can spread its asks over its visitors'
909
+ // addresses.
910
+ export let askable = (method, pathname, origin)=>method == 'POST' && pathname == '/login' && asker(origin);
911
+ // A sandboxed app's page asking its own doors (./installs.ts, D-37901): the
912
+ // path carries its page token as `/<app>/~<token>/…`, or `/~<token>/…` for a
913
+ // front page or an app on its own domain. Such a page has an opaque origin,
914
+ // so it sends `Origin: null`, which `sameOrigin` refuses — and it should,
915
+ // everywhere a cookie could ride along. Here none may: the router takes the
916
+ // cookie off before the request is served and marks the answer readable by
917
+ // any origin (`admitted`), because the credential is the token in the URL,
918
+ // which no browser attaches on its own. What the token opens is the one app
919
+ // it was sealed for; every other request on such a path is anonymous. A
920
+ // draft's preview link is read the same way: its ticket is its path's
921
+ // (`previews`).
922
+ export let paged = (pathname)=>/^(?:\/[^/]+)?\/~[^/]+(?:\/|$)/.test(pathname) || previews(pathname);
923
+ /** The segment under an app its drafts' preview links are mounted at
924
+ * (@yaks/platform/preview `mountOf`). */ export let PREVIEW = '_preview';
925
+ let PREVIEWS = new RegExp(`^/[^/]+/(?:${PREVIEW}|~[a-z0-9]{12})(?:/|$)`);
926
+ /** Whether `pathname` is under an app's preview links, which the platform
927
+ * answers and no app routes: a sealed ticket's under {@link PREVIEW}, or a
928
+ * stored link's `/<app>/~<code>/`, twelve letters and digits
929
+ * (@yaks/platform/preview `CODE`), which a page token, sealed `<body>.<mac>`,
930
+ * never is. */ /// previews('/cookbook/_preview/t/about') -> true
931
+ /// previews('/cookbook/_preview') -> true
932
+ /// previews('/cookbook/~k3f9x2ab7q1z/about') -> true
933
+ /// previews('/cookbook/~k3f9x2ab7q1z') -> true
934
+ /// previews('/cookbook/~abc.def/') -> false
935
+ /// previews('/cookbook/_previews/') -> false
936
+ /// previews('/_preview/t/') -> false
937
+ export let previews = (pathname)=>PREVIEWS.test(pathname);
938
+ /** The preview page and its assets have their own response deadline. */ export let previewRead = (req)=>{
939
+ if (![
940
+ 'GET',
941
+ 'HEAD'
942
+ ].includes(req.method) || req.headers.has('upgrade')) {
943
+ return false;
944
+ }
945
+ let path = new URL(req.url).pathname;
946
+ let [, , marker, first, afterTicket] = path.split('/', 5);
947
+ return previews(path) && (marker == PREVIEW ? afterTicket : first) != 'api';
948
+ };
949
+ export let previewWait = {
950
+ kernel: 10_000,
951
+ front: 12_000
952
+ };
953
+ let RETRY = 2;
954
+ /** A request a browser shows as a page, in a tab or a frame. */ let shown = (req)=>{
955
+ let dest = req.headers.get('sec-fetch-dest');
956
+ return dest ? dest == 'document' || dest == 'iframe' : !!req.headers.get('accept')?.includes('text/html');
957
+ };
958
+ /** A preview that cannot answer yet says so and when to ask again. A page
959
+ * asks again on its own, so a person who opened the link while it was being
960
+ * built, or while a store restarted, sees it arrive without reloading. */ export let previewWaiting = (req, preparing = false)=>{
961
+ let said = preparing ? 'This preview is still preparing.' : 'This preview is temporarily unavailable.';
962
+ let page = shown(req);
963
+ let body = page ? `<!doctype html><meta charset="utf-8"><meta http-equiv="refresh" content="${RETRY}"><title>Preview</title><p>${said} This page tries again in a moment.</p>` : `${said} Try again shortly.`;
964
+ return new Response(req.method == 'HEAD' ? null : body, {
965
+ status: preparing ? 202 : 503,
966
+ headers: {
967
+ 'cache-control': 'private, no-store',
968
+ 'content-type': page ? 'text/html; charset=utf-8' : 'text/plain; charset=utf-8',
969
+ 'referrer-policy': 'no-referrer',
970
+ 'retry-after': String(RETRY)
971
+ }
972
+ });
973
+ };
974
+ /** The connector and app or platform API doors answer failures as JSON. */ export let jsonDoor = (path)=>path == '/mcp' || /^(?:\/[^/]+)?\/api\//.test(path);
975
+ /** A request waiting for a response reached its deadline. */ export let timedOut = (req)=>{
976
+ let message = 'This request took too long. Try again shortly.';
977
+ let init = {
978
+ status: 504,
979
+ headers: {
980
+ 'cache-control': 'no-store'
981
+ }
982
+ };
983
+ return jsonDoor(new URL(req.url).pathname) ? Response.json({
984
+ error: {
985
+ code: 'timeout',
986
+ message
987
+ }
988
+ }, init) : new Response(message, init);
989
+ };
990
+ // One page, one address: a doubled slash (`/printbound//refund`, from a typed
991
+ // link or a crawler's join) names the page its single slash names. Collapsed
992
+ // before anything routes on it, no part below and no app's code ever reads a
993
+ // path that starts `//`, which `new URL` takes for a host and throws on
994
+ // (T-153266, T-153429).
995
+ let collapsedPath = (path)=>path.replace(/\/{2,}/g, '/');
996
+ export let collapsed = (req)=>{
997
+ let url = new URL(req.url);
998
+ let path = collapsedPath(url.pathname);
999
+ if (path == url.pathname) return req;
1000
+ url.pathname = path;
1001
+ return new Request(url, req);
1002
+ };
1003
+ // Headers taken off a request before it is served.
1004
+ let without = (req, names)=>{
1005
+ if (!names.some((n)=>req.headers.has(n))) return req;
1006
+ let headers = new Headers(req.headers);
1007
+ for (let n of names)headers.delete(n);
1008
+ return new Request(req, {
1009
+ headers
1010
+ });
1011
+ };
1012
+ /** A request with the headers only the router writes ({@link MOUNT},
1013
+ * {@link ADDRESS}, {@link API_AT}) taken off: whatever a client sent under
1014
+ * those names is gone before anything reads it. */ export let unmounted = (req)=>without(req, [
1015
+ MOUNT,
1016
+ ADDRESS,
1017
+ API_AT
1018
+ ]);
1019
+ // A page on somebody else's address, writing or at one of our graph doors
1020
+ // (`sameOrigin`, `guarded`). It is refused in the shape every other api
1021
+ // refusal has — a code the page's code reads, a sentence its person reads —
1022
+ // and it is a deliberate no, so nothing is filed about it.
1023
+ let stranger = ()=>Response.json({
1024
+ error: {
1025
+ code: 'foreign_origin',
1026
+ message: 'that page is at another address and cannot use this door'
1027
+ }
1028
+ }, {
1029
+ status: 403
1030
+ });
1031
+ // The question a browser asks before a sandboxed page's JSON write or its
1032
+ // upload: yes, from anywhere, with the headers it named. No credentials are
1033
+ // allowed and none are read, so there is nothing an origin could add.
1034
+ let preflight = (req)=>new Response(null, {
1035
+ status: 204,
1036
+ headers: {
1037
+ 'access-control-allow-origin': '*',
1038
+ 'access-control-allow-methods': 'GET, HEAD, POST, PUT, DELETE',
1039
+ 'access-control-allow-headers': req.headers.get('access-control-request-headers') ?? '',
1040
+ 'access-control-max-age': '86400'
1041
+ }
1042
+ });
1043
+ /**
1044
+ * Space isolation, and the one place it holds (`sameOrigin`). It is asked
1045
+ * before a custom domain's request is carried to its place on our zone
1046
+ * (`aim`), because what must match is what the browser addressed: a page at
1047
+ * `herbusiness.com` asking its own `/api/…` is same-origin even though the
1048
+ * router is about to carry the request to `<space>.yaks.app/<app>/api/…`.
1049
+ *
1050
+ * One door is open to every page anyway: the app's read door, asked with
1051
+ * GET, served with the credentials stripped off and marked readable by any
1052
+ * origin (`shared`). So is asking for a sign-in code, to the pages of ours
1053
+ * that ask for one (`askable`). And a sandboxed app's page, on the path that
1054
+ * carries its token: its origin is opaque, so it is a stranger to every
1055
+ * page, and its request is served with no cookie at all (`paged`).
1056
+ *
1057
+ * The credentials go together because neither half is safe alone: an answer
1058
+ * marked readable by any origin must be an answer no session was used to
1059
+ * compute. The cookie is the whole of the ambient credential an app's door
1060
+ * reads, and `authorization` goes with it, so that the day a door reads one
1061
+ * it cannot arrive through here.
1062
+ *
1063
+ * ```ts
1064
+ * import { admitted } from '@yaks/platform/routes'
1065
+ * import { assertEquals } from '@std/assert'
1066
+ * let post = new Request('https://ada.yaks.app/menu/api/apply', {
1067
+ * method: 'POST',
1068
+ * headers: { origin: 'https://bob.yaks.app' },
1069
+ * })
1070
+ * let got = admitted(post, 'ada.yaks.app')
1071
+ * assertEquals('answer' in got && got.answer.status, 403)
1072
+ * ```
1073
+ */ export let admitted = (req, host, env = {})=>{
1074
+ let asked = new URL(req.url).pathname;
1075
+ let origin = req.headers.get('origin');
1076
+ if (paged(asked)) {
1077
+ return req.method == 'OPTIONS' ? {
1078
+ answer: preflight(req)
1079
+ } : {
1080
+ req: without(req, [
1081
+ 'cookie'
1082
+ ]),
1083
+ anyone: true
1084
+ };
1085
+ }
1086
+ if (!guarded(req) || sameOrigin(host, origin, env, req.headers.get('sec-fetch-site'))) {
1087
+ return {
1088
+ req,
1089
+ anyone: false
1090
+ };
1091
+ }
1092
+ if (!shared(req.method, asked) && !askable(req.method, asked, origin)) {
1093
+ return {
1094
+ answer: stranger()
1095
+ };
1096
+ }
1097
+ return {
1098
+ req: without(req, [
1099
+ 'cookie',
1100
+ 'authorization'
1101
+ ]),
1102
+ anyone: true
1103
+ };
1104
+ };
1105
+ /**
1106
+ * The mark on an answer {@link admitted} served to any page. The wildcard,
1107
+ * never the asking origin, and no `Access-Control-Allow-Credentials`: a
1108
+ * browser refuses to send a credentialed request to `*`, so the pair is a
1109
+ * promise the browser itself enforces, and echoing the origin back would let
1110
+ * a future mistake add credentials to it.
1111
+ *
1112
+ * `Vary: Origin` because the same URL answers differently to the page that
1113
+ * owns it. No shared cache may sit in front of such an answer: a Workers
1114
+ * cache key holds the path and not the hostname, so
1115
+ * `alice.yaks.app/recipes/api/query?x` and bob's would be one entry.
1116
+ */ export let cors = (res)=>{
1117
+ if (res.status == 101) return res;
1118
+ let headers = new Headers(res.headers);
1119
+ headers.set('access-control-allow-origin', '*');
1120
+ headers.append('vary', 'origin');
1121
+ return new Response(res.body, {
1122
+ status: res.status,
1123
+ statusText: res.statusText,
1124
+ headers
1125
+ });
1126
+ };
1127
+ /// firstOf({first: '["/recipes/*"]'}) -> ['/recipes/*']
1128
+ /// firstOf(undefined) -> []
1129
+ /// firstOf({first: 'not json'}) -> []
1130
+ /**
1131
+ * The property as the App row reads it (directory.ts `appOf`): the JSON array
1132
+ * in `home.first`, or nothing at all. Lenient where the Worker's `globs` is strict — a
1133
+ * read must answer whatever the row holds, since the graph tier writes this
1134
+ * property too, and a listing must not fall over on one somebody typed by hand.
1135
+ */ export let firstOf = (home)=>{
1136
+ try {
1137
+ let held = JSON.parse(home?.first || '[]');
1138
+ return Array.isArray(held) ? held.filter((g)=>typeof g == 'string') : [];
1139
+ } catch {
1140
+ return [];
1141
+ }
1142
+ };
1143
+ //# sourceMappingURL=routes.js.map