@playcraft/common 0.1.91 → 0.1.93-test

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 (285) hide show
  1. package/dist/agent-tools/replica-validation.d.ts +24 -24
  2. package/dist/audio-library-stream.d.ts +2 -2
  3. package/dist/cloud-workspace/runtime/agent-background-processes.d.ts +2 -2
  4. package/dist/cloud-workspace/runtime/agent-command.d.ts +1 -1
  5. package/dist/cloud-workspace/runtime/agent-competitor-report.d.ts +10 -10
  6. package/dist/cloud-workspace/runtime/agent-connection.d.ts +1 -1
  7. package/dist/cloud-workspace/runtime/agent-issue-artifacts.d.ts +4 -4
  8. package/dist/cloud-workspace/runtime/agent-lifecycle.d.ts +3 -3
  9. package/dist/cloud-workspace/runtime/agent-mutation.d.ts +3 -3
  10. package/dist/cloud-workspace/runtime/agent-opencode-gateway.d.ts.map +1 -1
  11. package/dist/cloud-workspace/runtime/agent-opencode-gateway.js +0 -1
  12. package/dist/cloud-workspace/runtime/agent-opencode-gateway.js.map +1 -1
  13. package/dist/cloud-workspace/runtime/agent-opencode.d.ts +3 -3
  14. package/dist/cloud-workspace/runtime/agent-read.d.ts +2 -2
  15. package/dist/cloud-workspace/runtime/agent-source-project.d.ts +3 -3
  16. package/dist/cloud-workspace/runtime/agent-variant-git.d.ts +2 -2
  17. package/dist/cloud-workspace/runtime/artifacts.d.ts +5 -10
  18. package/dist/cloud-workspace/runtime/artifacts.d.ts.map +1 -1
  19. package/dist/cloud-workspace/runtime/artifacts.js +2 -6
  20. package/dist/cloud-workspace/runtime/artifacts.js.map +1 -1
  21. package/dist/cloud-workspace/runtime/asset-generation.d.ts +4 -4
  22. package/dist/cloud-workspace/runtime/asset-library-import.d.ts.map +1 -1
  23. package/dist/cloud-workspace/runtime/asset-library-import.js +15 -41
  24. package/dist/cloud-workspace/runtime/asset-library-import.js.map +1 -1
  25. package/dist/cloud-workspace/runtime/asset-library-save.d.ts +2 -2
  26. package/dist/cloud-workspace/runtime/asset-transfers.d.ts.map +1 -1
  27. package/dist/cloud-workspace/runtime/asset-transfers.js +43 -100
  28. package/dist/cloud-workspace/runtime/asset-transfers.js.map +1 -1
  29. package/dist/cloud-workspace/runtime/attachment-base64.d.ts +0 -2
  30. package/dist/cloud-workspace/runtime/attachment-base64.d.ts.map +1 -1
  31. package/dist/cloud-workspace/runtime/attachment-base64.js +0 -4
  32. package/dist/cloud-workspace/runtime/attachment-base64.js.map +1 -1
  33. package/dist/cloud-workspace/runtime/audio-asset-protocol.d.ts +2 -2
  34. package/dist/cloud-workspace/runtime/audio-library.d.ts +8 -8
  35. package/dist/cloud-workspace/runtime/batch-generation.d.ts +0 -1
  36. package/dist/cloud-workspace/runtime/batch-generation.d.ts.map +1 -1
  37. package/dist/cloud-workspace/runtime/batch-runs.d.ts +27 -149
  38. package/dist/cloud-workspace/runtime/batch-runs.d.ts.map +1 -1
  39. package/dist/cloud-workspace/runtime/batch-runs.js +1 -13
  40. package/dist/cloud-workspace/runtime/batch-runs.js.map +1 -1
  41. package/dist/cloud-workspace/runtime/chat-realtime.d.ts +2 -2
  42. package/dist/cloud-workspace/runtime/connectivity.d.ts +7 -7
  43. package/dist/cloud-workspace/runtime/delivery-format.d.ts +0 -2
  44. package/dist/cloud-workspace/runtime/delivery-format.d.ts.map +1 -1
  45. package/dist/cloud-workspace/runtime/delivery-format.js +0 -11
  46. package/dist/cloud-workspace/runtime/delivery-format.js.map +1 -1
  47. package/dist/cloud-workspace/runtime/delivery.d.ts +69 -69
  48. package/dist/cloud-workspace/runtime/directory-attachments.d.ts.map +1 -1
  49. package/dist/cloud-workspace/runtime/directory-attachments.js +50 -15
  50. package/dist/cloud-workspace/runtime/directory-attachments.js.map +1 -1
  51. package/dist/cloud-workspace/runtime/events.d.ts +4 -4
  52. package/dist/cloud-workspace/runtime/execution-admission.d.ts +5 -34
  53. package/dist/cloud-workspace/runtime/execution-admission.d.ts.map +1 -1
  54. package/dist/cloud-workspace/runtime/execution-admission.js +4 -17
  55. package/dist/cloud-workspace/runtime/execution-admission.js.map +1 -1
  56. package/dist/cloud-workspace/runtime/execution-context.d.ts +4 -4
  57. package/dist/cloud-workspace/runtime/execution-grant.d.ts.map +1 -1
  58. package/dist/cloud-workspace/runtime/execution-grant.js +2 -3
  59. package/dist/cloud-workspace/runtime/execution-grant.js.map +1 -1
  60. package/dist/cloud-workspace/runtime/files.d.ts +1 -11
  61. package/dist/cloud-workspace/runtime/files.d.ts.map +1 -1
  62. package/dist/cloud-workspace/runtime/files.js +4 -7
  63. package/dist/cloud-workspace/runtime/files.js.map +1 -1
  64. package/dist/cloud-workspace/runtime/generations.d.ts +1 -1
  65. package/dist/cloud-workspace/runtime/generations.d.ts.map +1 -1
  66. package/dist/cloud-workspace/runtime/generations.js +0 -2
  67. package/dist/cloud-workspace/runtime/generations.js.map +1 -1
  68. package/dist/cloud-workspace/runtime/handshake.d.ts +0 -2
  69. package/dist/cloud-workspace/runtime/handshake.d.ts.map +1 -1
  70. package/dist/cloud-workspace/runtime/handshake.js +0 -3
  71. package/dist/cloud-workspace/runtime/handshake.js.map +1 -1
  72. package/dist/cloud-workspace/runtime/index.d.ts +2 -20
  73. package/dist/cloud-workspace/runtime/index.d.ts.map +1 -1
  74. package/dist/cloud-workspace/runtime/index.js +2 -20
  75. package/dist/cloud-workspace/runtime/index.js.map +1 -1
  76. package/dist/cloud-workspace/runtime/level-editor-agent.d.ts +0 -68
  77. package/dist/cloud-workspace/runtime/level-editor-agent.d.ts.map +1 -1
  78. package/dist/cloud-workspace/runtime/level-editor-agent.js +0 -6
  79. package/dist/cloud-workspace/runtime/level-editor-agent.js.map +1 -1
  80. package/dist/cloud-workspace/runtime/level-editor-authoring.d.ts +1 -1
  81. package/dist/cloud-workspace/runtime/level-editor-schema.d.ts +0 -20
  82. package/dist/cloud-workspace/runtime/level-editor-schema.d.ts.map +1 -1
  83. package/dist/cloud-workspace/runtime/level-editor-schema.js +0 -3
  84. package/dist/cloud-workspace/runtime/level-editor-schema.js.map +1 -1
  85. package/dist/cloud-workspace/runtime/model-capture-upload-grant.d.ts.map +1 -1
  86. package/dist/cloud-workspace/runtime/model-capture-upload-grant.js +1 -6
  87. package/dist/cloud-workspace/runtime/model-capture-upload-grant.js.map +1 -1
  88. package/dist/cloud-workspace/runtime/model-production.d.ts +31 -31
  89. package/dist/cloud-workspace/runtime/native-history.d.ts.map +1 -1
  90. package/dist/cloud-workspace/runtime/native-history.js +2 -2
  91. package/dist/cloud-workspace/runtime/native-history.js.map +1 -1
  92. package/dist/cloud-workspace/runtime/operations.d.ts +12 -100
  93. package/dist/cloud-workspace/runtime/operations.d.ts.map +1 -1
  94. package/dist/cloud-workspace/runtime/operations.js +2 -7
  95. package/dist/cloud-workspace/runtime/operations.js.map +1 -1
  96. package/dist/cloud-workspace/runtime/parameter-agent.d.ts +2 -2
  97. package/dist/cloud-workspace/runtime/parameter-locales.d.ts +2 -2
  98. package/dist/cloud-workspace/runtime/parameters.d.ts +14 -34
  99. package/dist/cloud-workspace/runtime/parameters.d.ts.map +1 -1
  100. package/dist/cloud-workspace/runtime/parameters.js +28 -87
  101. package/dist/cloud-workspace/runtime/parameters.js.map +1 -1
  102. package/dist/cloud-workspace/runtime/preview-runtime.d.ts +2 -2
  103. package/dist/cloud-workspace/runtime/previews.d.ts +7 -8
  104. package/dist/cloud-workspace/runtime/previews.d.ts.map +1 -1
  105. package/dist/cloud-workspace/runtime/remix-references.d.ts +44 -100
  106. package/dist/cloud-workspace/runtime/remix-references.d.ts.map +1 -1
  107. package/dist/cloud-workspace/runtime/remix-references.js +21 -71
  108. package/dist/cloud-workspace/runtime/remix-references.js.map +1 -1
  109. package/dist/cloud-workspace/runtime/resource-grant.d.ts +1 -1
  110. package/dist/cloud-workspace/runtime/resource-grant.d.ts.map +1 -1
  111. package/dist/cloud-workspace/runtime/resource-grant.js +2 -2
  112. package/dist/cloud-workspace/runtime/resource-grant.js.map +1 -1
  113. package/dist/cloud-workspace/runtime/scheduled-task-proposals.d.ts +9 -9
  114. package/dist/cloud-workspace/runtime/scheduled-tasks.d.ts +5 -6
  115. package/dist/cloud-workspace/runtime/scheduled-tasks.d.ts.map +1 -1
  116. package/dist/cloud-workspace/runtime/scheduled-tasks.js +1 -2
  117. package/dist/cloud-workspace/runtime/scheduled-tasks.js.map +1 -1
  118. package/dist/cloud-workspace/runtime/session-restore.d.ts +0 -31
  119. package/dist/cloud-workspace/runtime/session-restore.d.ts.map +1 -1
  120. package/dist/cloud-workspace/runtime/session-restore.js +4 -10
  121. package/dist/cloud-workspace/runtime/session-restore.js.map +1 -1
  122. package/dist/cloud-workspace/runtime/skill-activation.d.ts +0 -4
  123. package/dist/cloud-workspace/runtime/skill-activation.d.ts.map +1 -1
  124. package/dist/cloud-workspace/runtime/skill-activation.js +22 -69
  125. package/dist/cloud-workspace/runtime/skill-activation.js.map +1 -1
  126. package/dist/cloud-workspace/runtime/terminal-session.d.ts +1 -1
  127. package/dist/cloud-workspace/runtime/variant-workspace.d.ts +8 -8
  128. package/dist/cloud-workspace/runtime/video-attachment-errors.d.ts +22 -0
  129. package/dist/cloud-workspace/runtime/video-attachment-errors.d.ts.map +1 -0
  130. package/dist/cloud-workspace/runtime/video-attachment-errors.js +21 -0
  131. package/dist/cloud-workspace/runtime/video-attachment-errors.js.map +1 -0
  132. package/dist/cloud-workspace/runtime/workspace-binding.d.ts +4 -4
  133. package/dist/cloud-workspace/runtime/workspace-directories.d.ts +2 -2
  134. package/dist/cloud-workspace/runtime/workspace-facts.d.ts +2 -3
  135. package/dist/cloud-workspace/runtime/workspace-facts.d.ts.map +1 -1
  136. package/dist/cloud-workspace/runtime/workspace-notifications.d.ts +1 -1
  137. package/dist/cloud-workspace/runtime/workspace-notifications.d.ts.map +1 -1
  138. package/dist/cloud-workspace/runtime/workspace-notifications.js +52 -147
  139. package/dist/cloud-workspace/runtime/workspace-notifications.js.map +1 -1
  140. package/dist/cloud-workspace/runtime/workspace-ui.d.ts +13 -269
  141. package/dist/cloud-workspace/runtime/workspace-ui.d.ts.map +1 -1
  142. package/dist/cloud-workspace/runtime/workspace-ui.js +32 -196
  143. package/dist/cloud-workspace/runtime/workspace-ui.js.map +1 -1
  144. package/dist/inspiration/index.d.ts +12 -12
  145. package/dist/model-proxy/captures.d.ts +2 -2
  146. package/dist/model-proxy/index.d.ts +0 -1
  147. package/dist/model-proxy/index.d.ts.map +1 -1
  148. package/dist/model-proxy/index.js +0 -1
  149. package/dist/model-proxy/index.js.map +1 -1
  150. package/dist/project-skills/index.d.ts +0 -1
  151. package/dist/project-skills/index.d.ts.map +1 -1
  152. package/dist/project-skills/index.js +0 -1
  153. package/dist/project-skills/index.js.map +1 -1
  154. package/dist/project-skills/inventory.d.ts.map +1 -1
  155. package/dist/project-skills/inventory.js +13 -42
  156. package/dist/project-skills/inventory.js.map +1 -1
  157. package/dist/project-skills/local-snapshot.d.ts.map +1 -1
  158. package/dist/project-skills/local-snapshot.js +11 -36
  159. package/dist/project-skills/local-snapshot.js.map +1 -1
  160. package/dist/project-skills/protocol.d.ts +4 -1
  161. package/dist/project-skills/protocol.d.ts.map +1 -1
  162. package/dist/project-skills/protocol.js +52 -90
  163. package/dist/project-skills/protocol.js.map +1 -1
  164. package/dist/project-skills/remote-discovery.d.ts +2 -2
  165. package/dist/storage/cos.d.ts +0 -6
  166. package/dist/storage/cos.d.ts.map +1 -1
  167. package/dist/storage/cos.js +10 -38
  168. package/dist/storage/cos.js.map +1 -1
  169. package/dist/storage/upload-build-artifacts.d.ts +0 -12
  170. package/dist/storage/upload-build-artifacts.d.ts.map +1 -1
  171. package/dist/storage/upload-build-artifacts.js +15 -17
  172. package/dist/storage/upload-build-artifacts.js.map +1 -1
  173. package/package.json +1 -21
  174. package/dist/agent-memory.d.ts +0 -88
  175. package/dist/agent-memory.d.ts.map +0 -1
  176. package/dist/agent-memory.js +0 -66
  177. package/dist/agent-memory.js.map +0 -1
  178. package/dist/agent-personalization.d.ts +0 -111
  179. package/dist/agent-personalization.d.ts.map +0 -1
  180. package/dist/agent-personalization.js +0 -32
  181. package/dist/agent-personalization.js.map +0 -1
  182. package/dist/audio-package-node.d.ts +0 -20
  183. package/dist/audio-package-node.d.ts.map +0 -1
  184. package/dist/audio-package-node.js +0 -77
  185. package/dist/audio-package-node.js.map +0 -1
  186. package/dist/audio-program-package.d.ts +0 -81
  187. package/dist/audio-program-package.d.ts.map +0 -1
  188. package/dist/audio-program-package.js +0 -268
  189. package/dist/audio-program-package.js.map +0 -1
  190. package/dist/cloud-workspace/runtime/agent-build-delivery.d.ts +0 -445
  191. package/dist/cloud-workspace/runtime/agent-build-delivery.d.ts.map +0 -1
  192. package/dist/cloud-workspace/runtime/agent-build-delivery.js +0 -215
  193. package/dist/cloud-workspace/runtime/agent-build-delivery.js.map +0 -1
  194. package/dist/cloud-workspace/runtime/artifact-generation-source.d.ts +0 -32
  195. package/dist/cloud-workspace/runtime/artifact-generation-source.d.ts.map +0 -1
  196. package/dist/cloud-workspace/runtime/artifact-generation-source.js +0 -46
  197. package/dist/cloud-workspace/runtime/artifact-generation-source.js.map +0 -1
  198. package/dist/cloud-workspace/runtime/audio-adoption-receipt.d.ts +0 -359
  199. package/dist/cloud-workspace/runtime/audio-adoption-receipt.d.ts.map +0 -1
  200. package/dist/cloud-workspace/runtime/audio-adoption-receipt.js +0 -39
  201. package/dist/cloud-workspace/runtime/audio-adoption-receipt.js.map +0 -1
  202. package/dist/cloud-workspace/runtime/audio-artifact-package.d.ts +0 -8
  203. package/dist/cloud-workspace/runtime/audio-artifact-package.d.ts.map +0 -1
  204. package/dist/cloud-workspace/runtime/audio-artifact-package.js +0 -102
  205. package/dist/cloud-workspace/runtime/audio-artifact-package.js.map +0 -1
  206. package/dist/cloud-workspace/runtime/delivery-preparation.d.ts +0 -74
  207. package/dist/cloud-workspace/runtime/delivery-preparation.d.ts.map +0 -1
  208. package/dist/cloud-workspace/runtime/delivery-preparation.js +0 -45
  209. package/dist/cloud-workspace/runtime/delivery-preparation.js.map +0 -1
  210. package/dist/cloud-workspace/runtime/draft-claim.d.ts +0 -8
  211. package/dist/cloud-workspace/runtime/draft-claim.d.ts.map +0 -1
  212. package/dist/cloud-workspace/runtime/draft-claim.js +0 -13
  213. package/dist/cloud-workspace/runtime/draft-claim.js.map +0 -1
  214. package/dist/cloud-workspace/runtime/draft-occupancy.d.ts +0 -231
  215. package/dist/cloud-workspace/runtime/draft-occupancy.d.ts.map +0 -1
  216. package/dist/cloud-workspace/runtime/draft-occupancy.js +0 -130
  217. package/dist/cloud-workspace/runtime/draft-occupancy.js.map +0 -1
  218. package/dist/cloud-workspace/runtime/frame-animation-consumer.d.ts +0 -260
  219. package/dist/cloud-workspace/runtime/frame-animation-consumer.d.ts.map +0 -1
  220. package/dist/cloud-workspace/runtime/frame-animation-consumer.js +0 -255
  221. package/dist/cloud-workspace/runtime/frame-animation-consumer.js.map +0 -1
  222. package/dist/cloud-workspace/runtime/generation-selection-audio.d.ts +0 -57
  223. package/dist/cloud-workspace/runtime/generation-selection-audio.d.ts.map +0 -1
  224. package/dist/cloud-workspace/runtime/generation-selection-audio.js +0 -68
  225. package/dist/cloud-workspace/runtime/generation-selection-audio.js.map +0 -1
  226. package/dist/cloud-workspace/runtime/generation-selection.d.ts +0 -997
  227. package/dist/cloud-workspace/runtime/generation-selection.d.ts.map +0 -1
  228. package/dist/cloud-workspace/runtime/generation-selection.js +0 -212
  229. package/dist/cloud-workspace/runtime/generation-selection.js.map +0 -1
  230. package/dist/cloud-workspace/runtime/production-inputs.d.ts +0 -283
  231. package/dist/cloud-workspace/runtime/production-inputs.d.ts.map +0 -1
  232. package/dist/cloud-workspace/runtime/production-inputs.js +0 -174
  233. package/dist/cloud-workspace/runtime/production-inputs.js.map +0 -1
  234. package/dist/cloud-workspace/runtime/project-preparation.d.ts +0 -307
  235. package/dist/cloud-workspace/runtime/project-preparation.d.ts.map +0 -1
  236. package/dist/cloud-workspace/runtime/project-preparation.js +0 -110
  237. package/dist/cloud-workspace/runtime/project-preparation.js.map +0 -1
  238. package/dist/cloud-workspace/runtime/prompt-enhancement.d.ts +0 -1286
  239. package/dist/cloud-workspace/runtime/prompt-enhancement.d.ts.map +0 -1
  240. package/dist/cloud-workspace/runtime/prompt-enhancement.js +0 -321
  241. package/dist/cloud-workspace/runtime/prompt-enhancement.js.map +0 -1
  242. package/dist/cloud-workspace/runtime/runtime-sha256.d.ts +0 -3
  243. package/dist/cloud-workspace/runtime/runtime-sha256.d.ts.map +0 -1
  244. package/dist/cloud-workspace/runtime/runtime-sha256.js +0 -11
  245. package/dist/cloud-workspace/runtime/runtime-sha256.js.map +0 -1
  246. package/dist/cloud-workspace/runtime/session-personalization.d.ts +0 -35
  247. package/dist/cloud-workspace/runtime/session-personalization.d.ts.map +0 -1
  248. package/dist/cloud-workspace/runtime/session-personalization.js +0 -9
  249. package/dist/cloud-workspace/runtime/session-personalization.js.map +0 -1
  250. package/dist/cloud-workspace/runtime/workspace-confirmation.d.ts +0 -1956
  251. package/dist/cloud-workspace/runtime/workspace-confirmation.d.ts.map +0 -1
  252. package/dist/cloud-workspace/runtime/workspace-confirmation.js +0 -591
  253. package/dist/cloud-workspace/runtime/workspace-confirmation.js.map +0 -1
  254. package/dist/cloud-workspace/runtime/workspace-model-source.d.ts +0 -291
  255. package/dist/cloud-workspace/runtime/workspace-model-source.d.ts.map +0 -1
  256. package/dist/cloud-workspace/runtime/workspace-model-source.js +0 -128
  257. package/dist/cloud-workspace/runtime/workspace-model-source.js.map +0 -1
  258. package/dist/cloud-workspace/runtime/workspace-parameter-confirmation.d.ts +0 -101
  259. package/dist/cloud-workspace/runtime/workspace-parameter-confirmation.d.ts.map +0 -1
  260. package/dist/cloud-workspace/runtime/workspace-parameter-confirmation.js +0 -160
  261. package/dist/cloud-workspace/runtime/workspace-parameter-confirmation.js.map +0 -1
  262. package/dist/cloud-workspace/runtime/workspace-public-source.d.ts +0 -67
  263. package/dist/cloud-workspace/runtime/workspace-public-source.d.ts.map +0 -1
  264. package/dist/cloud-workspace/runtime/workspace-public-source.js +0 -97
  265. package/dist/cloud-workspace/runtime/workspace-public-source.js.map +0 -1
  266. package/dist/cloud-workspace/runtime/workspace-refs.d.ts +0 -73
  267. package/dist/cloud-workspace/runtime/workspace-refs.d.ts.map +0 -1
  268. package/dist/cloud-workspace/runtime/workspace-refs.js +0 -106
  269. package/dist/cloud-workspace/runtime/workspace-refs.js.map +0 -1
  270. package/dist/model-proxy/provider-stats.d.ts +0 -38
  271. package/dist/model-proxy/provider-stats.d.ts.map +0 -1
  272. package/dist/model-proxy/provider-stats.js +0 -2
  273. package/dist/model-proxy/provider-stats.js.map +0 -1
  274. package/dist/preview/preview-devices.d.ts +0 -20
  275. package/dist/preview/preview-devices.d.ts.map +0 -1
  276. package/dist/preview/preview-devices.js +0 -46
  277. package/dist/preview/preview-devices.js.map +0 -1
  278. package/dist/project-skills/source-digest-node.d.ts +0 -5
  279. package/dist/project-skills/source-digest-node.d.ts.map +0 -1
  280. package/dist/project-skills/source-digest-node.js +0 -26
  281. package/dist/project-skills/source-digest-node.js.map +0 -1
  282. package/dist/team-memory.d.ts +0 -33
  283. package/dist/team-memory.d.ts.map +0 -1
  284. package/dist/team-memory.js +0 -39
  285. package/dist/team-memory.js.map +0 -1
@@ -1,12 +1,11 @@
1
1
  import { z } from 'zod';
2
- import type { PublicEvent } from './events.js';
3
2
  export declare const workspaceUiRangeSchema: z.ZodObject<{
4
3
  startLine: z.ZodNumber;
5
4
  endLine: z.ZodNumber;
6
5
  }, z.core.$strict>;
7
6
  /** Observed browser state, separate from references explicitly selected by the user. */
8
7
  export declare const workspaceUiSnapshotSchema: z.ZodObject<{
9
- version: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
8
+ version: z.ZodLiteral<1>;
10
9
  viewId: z.ZodString;
11
10
  workspaceId: z.ZodString;
12
11
  directoryName: z.ZodString;
@@ -32,13 +31,13 @@ export declare const workspaceUiSnapshotSchema: z.ZodObject<{
32
31
  activeDelivery: z.ZodOptional<z.ZodObject<{
33
32
  buildId: z.ZodOptional<z.ZodString>;
34
33
  channel: z.ZodEnum<{
35
- playcraft: "playcraft";
34
+ google: "google";
36
35
  facebook: "facebook";
36
+ tiktok: "tiktok";
37
+ playcraft: "playcraft";
37
38
  snapchat: "snapchat";
38
39
  ironsource: "ironsource";
39
40
  applovin: "applovin";
40
- google: "google";
41
- tiktok: "tiktok";
42
41
  unity: "unity";
43
42
  liftoff: "liftoff";
44
43
  moloco: "moloco";
@@ -72,10 +71,10 @@ export declare const workspaceUiSnapshotSchema: z.ZodObject<{
72
71
  file: "file";
73
72
  document: "document";
74
73
  audio: "audio";
75
- playable: "playable";
76
74
  model: "model";
77
75
  image: "image";
78
76
  video: "video";
77
+ playable: "playable";
79
78
  }>>;
80
79
  versionCreatedAt: z.ZodOptional<z.ZodString>;
81
80
  isCurrentVersion: z.ZodOptional<z.ZodBoolean>;
@@ -104,10 +103,6 @@ export declare const workspaceUiCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObj
104
103
  directoryName: z.ZodString;
105
104
  sessionId: z.ZodString;
106
105
  expiresAt: z.ZodString;
107
- intent: z.ZodOptional<z.ZodEnum<{
108
- suggest: "suggest";
109
- intervene: "intervene";
110
- }>>;
111
106
  }, z.core.$strip>, z.ZodObject<{
112
107
  kind: z.ZodLiteral<"open_preview">;
113
108
  artifactId: z.ZodOptional<z.ZodString>;
@@ -119,20 +114,16 @@ export declare const workspaceUiCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObj
119
114
  directoryName: z.ZodString;
120
115
  sessionId: z.ZodString;
121
116
  expiresAt: z.ZodString;
122
- intent: z.ZodOptional<z.ZodEnum<{
123
- suggest: "suggest";
124
- intervene: "intervene";
125
- }>>;
126
117
  }, z.core.$strip>, z.ZodObject<{
127
118
  kind: z.ZodLiteral<"open_delivery">;
128
119
  channel: z.ZodOptional<z.ZodEnum<{
129
- playcraft: "playcraft";
120
+ google: "google";
130
121
  facebook: "facebook";
122
+ tiktok: "tiktok";
123
+ playcraft: "playcraft";
131
124
  snapchat: "snapchat";
132
125
  ironsource: "ironsource";
133
126
  applovin: "applovin";
134
- google: "google";
135
- tiktok: "tiktok";
136
127
  unity: "unity";
137
128
  liftoff: "liftoff";
138
129
  moloco: "moloco";
@@ -149,10 +140,6 @@ export declare const workspaceUiCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObj
149
140
  directoryName: z.ZodString;
150
141
  sessionId: z.ZodString;
151
142
  expiresAt: z.ZodString;
152
- intent: z.ZodOptional<z.ZodEnum<{
153
- suggest: "suggest";
154
- intervene: "intervene";
155
- }>>;
156
143
  }, z.core.$strip>, z.ZodObject<{
157
144
  kind: z.ZodLiteral<"open_task">;
158
145
  taskId: z.ZodOptional<z.ZodString>;
@@ -162,26 +149,19 @@ export declare const workspaceUiCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObj
162
149
  directoryName: z.ZodString;
163
150
  sessionId: z.ZodString;
164
151
  expiresAt: z.ZodString;
165
- intent: z.ZodOptional<z.ZodEnum<{
166
- suggest: "suggest";
167
- intervene: "intervene";
168
- }>>;
169
152
  }, z.core.$strip>], "kind">;
170
153
  export type WorkspaceUiCommand = z.infer<typeof workspaceUiCommandSchema>;
171
154
  export declare const workspaceUiResultSchema: z.ZodObject<{
172
155
  commandId: z.ZodString;
173
156
  viewId: z.ZodString;
174
- protocolVersion: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
175
157
  status: z.ZodEnum<{
176
158
  failed: "failed";
177
159
  rejected: "rejected";
178
160
  opened: "opened";
179
- deferred: "deferred";
180
- suppressed: "suppressed";
181
161
  }>;
182
162
  reason: z.ZodOptional<z.ZodString>;
183
163
  snapshot: z.ZodOptional<z.ZodObject<{
184
- version: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
164
+ version: z.ZodLiteral<1>;
185
165
  viewId: z.ZodString;
186
166
  workspaceId: z.ZodString;
187
167
  directoryName: z.ZodString;
@@ -207,13 +187,13 @@ export declare const workspaceUiResultSchema: z.ZodObject<{
207
187
  activeDelivery: z.ZodOptional<z.ZodObject<{
208
188
  buildId: z.ZodOptional<z.ZodString>;
209
189
  channel: z.ZodEnum<{
210
- playcraft: "playcraft";
190
+ google: "google";
211
191
  facebook: "facebook";
192
+ tiktok: "tiktok";
193
+ playcraft: "playcraft";
212
194
  snapchat: "snapchat";
213
195
  ironsource: "ironsource";
214
196
  applovin: "applovin";
215
- google: "google";
216
- tiktok: "tiktok";
217
197
  unity: "unity";
218
198
  liftoff: "liftoff";
219
199
  moloco: "moloco";
@@ -247,10 +227,10 @@ export declare const workspaceUiResultSchema: z.ZodObject<{
247
227
  file: "file";
248
228
  document: "document";
249
229
  audio: "audio";
250
- playable: "playable";
251
230
  model: "model";
252
231
  image: "image";
253
232
  video: "video";
233
+ playable: "playable";
254
234
  }>>;
255
235
  versionCreatedAt: z.ZodOptional<z.ZodString>;
256
236
  isCurrentVersion: z.ZodOptional<z.ZodBoolean>;
@@ -265,244 +245,8 @@ export declare const workspaceUiResultSchema: z.ZodObject<{
265
245
  }, z.core.$strict>>;
266
246
  }, z.core.$strict>>;
267
247
  }, z.core.$strict>>;
268
- anchor: z.ZodOptional<z.ZodObject<{
269
- commandId: z.ZodString;
270
- turnId: z.ZodOptional<z.ZodString>;
271
- }, z.core.$strict>>;
272
248
  }, z.core.$strict>;
273
249
  export type WorkspaceUiResult = z.infer<typeof workspaceUiResultSchema>;
274
250
  export declare const WORKSPACE_UI_COMMAND_EVENT = "ui.command.requested";
275
251
  export declare const WORKSPACE_UI_RESULT_EVENT = "ui.command.resolved";
276
- export declare const WORKSPACE_UI_SNAPSHOT_REQUEST_EVENT = "ui.snapshot.requested";
277
- export declare const WORKSPACE_UI_SNAPSHOT_CLOSED_EVENT = "ui.snapshot.closed";
278
- export declare const WORKSPACE_UI_SNAPSHOT_VERSION: 1;
279
- /** The continuation's stable request ID identifies one frozen, server-timed observation exchange. */
280
- export declare const workspaceUiSnapshotRequestSchema: z.ZodObject<{
281
- expiresAt: z.ZodString;
282
- version: z.ZodLiteral<1>;
283
- requestId: z.ZodString;
284
- viewId: z.ZodString;
285
- workspaceId: z.ZodString;
286
- directoryName: z.ZodString;
287
- sessionId: z.ZodString;
288
- runtimeId: z.ZodString;
289
- generation: z.ZodNumber;
290
- runtimeEpoch: z.ZodNumber;
291
- }, z.core.$strict>;
292
- export type WorkspaceUiSnapshotRequest = z.infer<typeof workspaceUiSnapshotRequestSchema>;
293
- export type WorkspaceUiSnapshotRequestInput = Omit<WorkspaceUiSnapshotRequest, 'expiresAt'>;
294
- /** A browser observes its current view; this is not a navigation or an opened receipt. */
295
- export declare const workspaceUiSnapshotReplySchema: z.ZodObject<{
296
- version: z.ZodLiteral<1>;
297
- requestId: z.ZodString;
298
- requestSequence: z.ZodNumber;
299
- viewId: z.ZodString;
300
- runtimeId: z.ZodString;
301
- generation: z.ZodNumber;
302
- runtimeEpoch: z.ZodNumber;
303
- snapshot: z.ZodObject<{
304
- viewId: z.ZodString;
305
- workspaceId: z.ZodString;
306
- directoryName: z.ZodString;
307
- sessionId: z.ZodString;
308
- revision: z.ZodNumber;
309
- observedAt: z.ZodString;
310
- panelOpen: z.ZodBoolean;
311
- activeTab: z.ZodNullable<z.ZodString>;
312
- openTabs: z.ZodArray<z.ZodString>;
313
- activeFile: z.ZodOptional<z.ZodObject<{
314
- path: z.ZodString;
315
- range: z.ZodOptional<z.ZodObject<{
316
- startLine: z.ZodNumber;
317
- endLine: z.ZodNumber;
318
- }, z.core.$strict>>;
319
- dirty: z.ZodBoolean;
320
- loadState: z.ZodEnum<{
321
- error: "error";
322
- ready: "ready";
323
- loading: "loading";
324
- }>;
325
- }, z.core.$strict>>;
326
- activeDelivery: z.ZodOptional<z.ZodObject<{
327
- buildId: z.ZodOptional<z.ZodString>;
328
- channel: z.ZodEnum<{
329
- playcraft: "playcraft";
330
- facebook: "facebook";
331
- snapchat: "snapchat";
332
- ironsource: "ironsource";
333
- applovin: "applovin";
334
- google: "google";
335
- tiktok: "tiktok";
336
- unity: "unity";
337
- liftoff: "liftoff";
338
- moloco: "moloco";
339
- bigo: "bigo";
340
- inmobi: "inmobi";
341
- adikteev: "adikteev";
342
- remerge: "remerge";
343
- mintegral: "mintegral";
344
- }>;
345
- status: z.ZodOptional<z.ZodEnum<{
346
- failed: "failed";
347
- running: "running";
348
- queued: "queued";
349
- interrupted: "interrupted";
350
- canceled: "canceled";
351
- succeeded: "succeeded";
352
- }>>;
353
- }, z.core.$strict>>;
354
- activeTask: z.ZodOptional<z.ZodObject<{
355
- taskId: z.ZodOptional<z.ZodString>;
356
- kind: z.ZodString;
357
- status: z.ZodString;
358
- }, z.core.$strict>>;
359
- activePreview: z.ZodOptional<z.ZodObject<{
360
- artifactId: z.ZodOptional<z.ZodString>;
361
- versionId: z.ZodOptional<z.ZodString>;
362
- previewId: z.ZodOptional<z.ZodString>;
363
- name: z.ZodOptional<z.ZodString>;
364
- path: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
365
- kind: z.ZodOptional<z.ZodEnum<{
366
- file: "file";
367
- document: "document";
368
- audio: "audio";
369
- playable: "playable";
370
- model: "model";
371
- image: "image";
372
- video: "video";
373
- }>>;
374
- versionCreatedAt: z.ZodOptional<z.ZodString>;
375
- isCurrentVersion: z.ZodOptional<z.ZodBoolean>;
376
- loadState: z.ZodEnum<{
377
- error: "error";
378
- ready: "ready";
379
- loading: "loading";
380
- }>;
381
- viewport: z.ZodOptional<z.ZodObject<{
382
- width: z.ZodNumber;
383
- height: z.ZodNumber;
384
- }, z.core.$strict>>;
385
- }, z.core.$strict>>;
386
- version: z.ZodLiteral<2>;
387
- }, z.core.$strict>;
388
- }, z.core.$strict>;
389
- export type WorkspaceUiSnapshotReply = z.infer<typeof workspaceUiSnapshotReplySchema>;
390
- /** A shared deadline closes to none once; a late reply can never change a dispatched payload. */
391
- export declare const workspaceUiSnapshotClosedSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
392
- requestSequence: z.ZodNumber;
393
- status: z.ZodLiteral<"observed">;
394
- snapshot: z.ZodObject<{
395
- viewId: z.ZodString;
396
- workspaceId: z.ZodString;
397
- directoryName: z.ZodString;
398
- sessionId: z.ZodString;
399
- revision: z.ZodNumber;
400
- observedAt: z.ZodString;
401
- panelOpen: z.ZodBoolean;
402
- activeTab: z.ZodNullable<z.ZodString>;
403
- openTabs: z.ZodArray<z.ZodString>;
404
- activeFile: z.ZodOptional<z.ZodObject<{
405
- path: z.ZodString;
406
- range: z.ZodOptional<z.ZodObject<{
407
- startLine: z.ZodNumber;
408
- endLine: z.ZodNumber;
409
- }, z.core.$strict>>;
410
- dirty: z.ZodBoolean;
411
- loadState: z.ZodEnum<{
412
- error: "error";
413
- ready: "ready";
414
- loading: "loading";
415
- }>;
416
- }, z.core.$strict>>;
417
- activeDelivery: z.ZodOptional<z.ZodObject<{
418
- buildId: z.ZodOptional<z.ZodString>;
419
- channel: z.ZodEnum<{
420
- playcraft: "playcraft";
421
- facebook: "facebook";
422
- snapchat: "snapchat";
423
- ironsource: "ironsource";
424
- applovin: "applovin";
425
- google: "google";
426
- tiktok: "tiktok";
427
- unity: "unity";
428
- liftoff: "liftoff";
429
- moloco: "moloco";
430
- bigo: "bigo";
431
- inmobi: "inmobi";
432
- adikteev: "adikteev";
433
- remerge: "remerge";
434
- mintegral: "mintegral";
435
- }>;
436
- status: z.ZodOptional<z.ZodEnum<{
437
- failed: "failed";
438
- running: "running";
439
- queued: "queued";
440
- interrupted: "interrupted";
441
- canceled: "canceled";
442
- succeeded: "succeeded";
443
- }>>;
444
- }, z.core.$strict>>;
445
- activeTask: z.ZodOptional<z.ZodObject<{
446
- taskId: z.ZodOptional<z.ZodString>;
447
- kind: z.ZodString;
448
- status: z.ZodString;
449
- }, z.core.$strict>>;
450
- activePreview: z.ZodOptional<z.ZodObject<{
451
- artifactId: z.ZodOptional<z.ZodString>;
452
- versionId: z.ZodOptional<z.ZodString>;
453
- previewId: z.ZodOptional<z.ZodString>;
454
- name: z.ZodOptional<z.ZodString>;
455
- path: z.ZodOptional<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
456
- kind: z.ZodOptional<z.ZodEnum<{
457
- file: "file";
458
- document: "document";
459
- audio: "audio";
460
- playable: "playable";
461
- model: "model";
462
- image: "image";
463
- video: "video";
464
- }>>;
465
- versionCreatedAt: z.ZodOptional<z.ZodString>;
466
- isCurrentVersion: z.ZodOptional<z.ZodBoolean>;
467
- loadState: z.ZodEnum<{
468
- error: "error";
469
- ready: "ready";
470
- loading: "loading";
471
- }>;
472
- viewport: z.ZodOptional<z.ZodObject<{
473
- width: z.ZodNumber;
474
- height: z.ZodNumber;
475
- }, z.core.$strict>>;
476
- }, z.core.$strict>>;
477
- version: z.ZodLiteral<2>;
478
- }, z.core.$strict>;
479
- version: z.ZodLiteral<1>;
480
- requestId: z.ZodString;
481
- viewId: z.ZodString;
482
- workspaceId: z.ZodString;
483
- directoryName: z.ZodString;
484
- sessionId: z.ZodString;
485
- runtimeId: z.ZodString;
486
- generation: z.ZodNumber;
487
- runtimeEpoch: z.ZodNumber;
488
- }, z.core.$strict>, z.ZodObject<{
489
- requestSequence: z.ZodNumber;
490
- status: z.ZodLiteral<"unavailable">;
491
- version: z.ZodLiteral<1>;
492
- requestId: z.ZodString;
493
- viewId: z.ZodString;
494
- workspaceId: z.ZodString;
495
- directoryName: z.ZodString;
496
- sessionId: z.ZodString;
497
- runtimeId: z.ZodString;
498
- generation: z.ZodNumber;
499
- runtimeEpoch: z.ZodNumber;
500
- }, z.core.$strict>], "status">;
501
- export type WorkspaceUiSnapshotClosed = z.infer<typeof workspaceUiSnapshotClosedSchema>;
502
- export type WorkspaceUiSnapshotExchange = {
503
- request: PublicEvent;
504
- closed?: PublicEvent;
505
- };
506
- /** Native output cannot mint a platform observation challenge, including through notifications. */
507
- export declare function isWorkspaceUiSnapshotRequestEvent(event: PublicEvent): boolean;
508
252
  //# sourceMappingURL=workspace-ui.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-ui.d.ts","sourceRoot":"","sources":["../../../src/cloud-workspace/runtime/workspace-ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM/C,eAAO,MAAM,sBAAsB;;;kBAMuC,CAAC;AAE3E,wFAAwF;AACxF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8E3B,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAc5E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAqBnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmDhC,CAAC;AACL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AACjE,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D,eAAO,MAAM,mCAAmC,0BAA0B,CAAC;AAC3E,eAAO,MAAM,kCAAkC,uBAAuB,CAAC;AACvE,eAAO,MAAM,6BAA6B,EAAG,CAAU,CAAC;AAcxD,qGAAqG;AACrG,eAAO,MAAM,gCAAgC;;;;;;;;;;;kBAKlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAAC,0BAA0B,EAAE,WAAW,CAAC,CAAC;AAE5F,0FAA0F;AAC1F,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAYqC,CAAC;AACjF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,iGAAiG;AACjG,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAwBxC,CAAC;AACL,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,2BAA2B,GAAG;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAEzF,mGAAmG;AACnG,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAY7E"}
1
+ {"version":3,"file":"workspace-ui.d.ts","sourceRoot":"","sources":["../../../src/cloud-workspace/runtime/workspace-ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,sBAAsB;;;kBAG8C,CAAC;AAElF,wFAAwF;AACxF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA+C3B,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAY5E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAQnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAWlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AACjE,eAAO,MAAM,yBAAyB,wBAAwB,CAAC"}
@@ -3,22 +3,16 @@ import { workspaceRelativePathSchema } from './files.js';
3
3
  import { workspaceDirectoryNameSchema } from './workspace-directories.js';
4
4
  import { isWorkspaceArtifactOutputPath, WORKSPACE_ARTIFACT_KINDS } from './artifacts.js';
5
5
  import { DELIVERY_CHANNELS } from './delivery.js';
6
- import { runtimeSha256Text } from './runtime-sha256.js';
7
6
  const identity = z.string().min(1).max(256);
8
7
  const tab = z.string().min(1).max(2048);
9
8
  const loadState = z.enum(['loading', 'ready', 'error']);
10
- export const workspaceUiRangeSchema = z
11
- .object({
9
+ export const workspaceUiRangeSchema = z.object({
12
10
  startLine: z.number().int().positive().max(1_000_000),
13
11
  endLine: z.number().int().positive().max(1_000_000),
14
- })
15
- .strict()
16
- .refine((value) => value.endLine >= value.startLine, 'invalid_ui_range');
12
+ }).strict().refine(value => value.endLine >= value.startLine, 'invalid_ui_range');
17
13
  /** Observed browser state, separate from references explicitly selected by the user. */
18
- export const workspaceUiSnapshotSchema = z
19
- .object({
20
- // v1 legacy; v2 adds the panel-follow protocol. Front end only emits a version the runtime supports.
21
- version: z.union([z.literal(1), z.literal(2)]),
14
+ export const workspaceUiSnapshotSchema = z.object({
15
+ version: z.literal(1),
22
16
  viewId: identity,
23
17
  workspaceId: identity,
24
18
  directoryName: workspaceDirectoryNameSchema,
@@ -28,72 +22,43 @@ export const workspaceUiSnapshotSchema = z
28
22
  panelOpen: z.boolean(),
29
23
  activeTab: tab.nullable(),
30
24
  openTabs: z.array(tab).max(32),
31
- activeFile: z
32
- .object({
25
+ activeFile: z.object({
33
26
  path: workspaceRelativePathSchema,
34
27
  range: workspaceUiRangeSchema.optional(),
35
28
  dirty: z.boolean(),
36
29
  loadState,
37
- })
38
- .strict()
39
- .optional(),
40
- activeDelivery: z
41
- .object({
30
+ }).strict().optional(),
31
+ activeDelivery: z.object({
42
32
  buildId: identity.optional(),
43
33
  channel: z.enum(DELIVERY_CHANNELS),
44
- status: z
45
- .enum(['queued', 'running', 'succeeded', 'failed', 'canceled', 'interrupted'])
46
- .optional(),
47
- })
48
- .strict()
49
- .optional(),
50
- activeTask: z
51
- .object({
34
+ status: z.enum(['queued', 'running', 'succeeded', 'failed', 'canceled', 'interrupted']).optional(),
35
+ }).strict().optional(),
36
+ activeTask: z.object({
52
37
  taskId: identity.optional(),
53
38
  kind: z.string().min(1).max(64),
54
39
  status: z.string().min(1).max(32),
55
- })
56
- .strict()
57
- .optional(),
58
- activePreview: z
59
- .object({
40
+ }).strict().optional(),
41
+ activePreview: z.object({
60
42
  artifactId: identity.optional(),
61
43
  versionId: identity.optional(),
62
44
  previewId: identity.optional(),
63
45
  name: z.string().min(1).max(512).optional(),
64
- path: workspaceRelativePathSchema
65
- .refine(isWorkspaceArtifactOutputPath, 'invalid_preview_output_path')
66
- .optional(),
46
+ path: workspaceRelativePathSchema.refine(isWorkspaceArtifactOutputPath, 'invalid_preview_output_path').optional(),
67
47
  kind: z.enum(WORKSPACE_ARTIFACT_KINDS).optional(),
68
48
  versionCreatedAt: z.string().datetime().optional(),
69
49
  isCurrentVersion: z.boolean().optional(),
70
50
  loadState,
71
- viewport: z
72
- .object({
51
+ viewport: z.object({
73
52
  width: z.number().int().positive().max(16384),
74
53
  height: z.number().int().positive().max(16384),
75
- })
76
- .strict()
77
- .optional(),
78
- })
79
- .strict()
80
- .superRefine((value, context) => {
81
- const hasVersionDetails = [
82
- value.name,
83
- value.path,
84
- value.kind,
85
- value.versionCreatedAt,
86
- value.isCurrentVersion,
87
- ].some((field) => field !== undefined);
54
+ }).strict().optional(),
55
+ }).strict().superRefine((value, context) => {
56
+ const hasVersionDetails = [value.name, value.path, value.kind, value.versionCreatedAt, value.isCurrentVersion]
57
+ .some(field => field !== undefined);
88
58
  if (hasVersionDetails && (!value.artifactId || !value.versionId))
89
- context.addIssue({
90
- code: z.ZodIssueCode.custom,
91
- message: 'preview_details_require_version',
92
- });
93
- })
94
- .optional(),
95
- })
96
- .strict();
59
+ context.addIssue({ code: z.ZodIssueCode.custom, message: 'preview_details_require_version' });
60
+ }).optional(),
61
+ }).strict();
97
62
  const commandScope = {
98
63
  commandId: identity,
99
64
  viewId: identity,
@@ -101,158 +66,29 @@ const commandScope = {
101
66
  directoryName: workspaceDirectoryNameSchema,
102
67
  sessionId: identity,
103
68
  expiresAt: z.string().datetime(),
104
- // v2 follow intent; absent = legacy forced navigation. `navigate` is front-end-local, not in the enum.
105
- intent: z.enum(['suggest', 'intervene']).optional(),
106
69
  };
107
70
  // Native event envelopes may add tracing fields; only these validated fields are executable.
108
71
  export const workspaceUiCommandSchema = z.discriminatedUnion('kind', [
109
- z.object({
110
- ...commandScope,
111
- kind: z.literal('open_file'),
112
- path: workspaceRelativePathSchema,
113
- range: workspaceUiRangeSchema.optional(),
114
- }),
115
- z.object({
116
- ...commandScope,
117
- kind: z.literal('open_preview'),
118
- artifactId: identity.optional(),
119
- versionId: identity.optional(),
120
- previewId: identity.optional(),
121
- }),
122
- z.object({
123
- ...commandScope,
124
- kind: z.literal('open_delivery'),
125
- channel: z.enum(DELIVERY_CHANNELS).optional(),
126
- buildId: identity.optional(),
127
- }),
72
+ z.object({ ...commandScope, kind: z.literal('open_file'), path: workspaceRelativePathSchema,
73
+ range: workspaceUiRangeSchema.optional() }),
74
+ z.object({ ...commandScope, kind: z.literal('open_preview'), artifactId: identity.optional(),
75
+ versionId: identity.optional(), previewId: identity.optional() }),
76
+ z.object({ ...commandScope, kind: z.literal('open_delivery'), channel: z.enum(DELIVERY_CHANNELS).optional(),
77
+ buildId: identity.optional() }),
128
78
  z.object({ ...commandScope, kind: z.literal('open_task'), taskId: identity.optional() }),
129
79
  ]);
130
- export const workspaceUiResultSchema = z
131
- .object({
80
+ export const workspaceUiResultSchema = z.object({
132
81
  commandId: identity,
133
82
  viewId: identity,
134
- // Absent / 1 = v1; 2 = v2. deferred/suppressed and anchor are only legal on a v2 result.
135
- protocolVersion: z.union([z.literal(1), z.literal(2)]).optional(),
136
- status: z.enum(['opened', 'rejected', 'failed', 'deferred', 'suppressed']),
83
+ status: z.enum(['opened', 'rejected', 'failed']),
137
84
  reason: z.string().min(1).max(256).optional(),
138
85
  snapshot: workspaceUiSnapshotSchema.optional(),
139
- // deferred/suppressed leave an anchor pointing back at the command (and, best-effort, its turn).
140
- anchor: z.object({ commandId: identity, turnId: identity.optional() }).strict().optional(),
141
- })
142
- .strict()
143
- .superRefine((value, context) => {
144
- const isDeferredLike = value.status === 'deferred' || value.status === 'suppressed';
86
+ }).strict().superRefine((value, context) => {
145
87
  if (value.status === 'opened' && !value.snapshot)
146
- context.addIssue({
147
- code: z.ZodIssueCode.custom,
148
- path: ['snapshot'],
149
- message: 'opened_requires_snapshot',
150
- });
88
+ context.addIssue({ code: z.ZodIssueCode.custom, path: ['snapshot'], message: 'opened_requires_snapshot' });
151
89
  if (value.snapshot && value.snapshot.viewId !== value.viewId)
152
- context.addIssue({
153
- code: z.ZodIssueCode.custom,
154
- path: ['snapshot', 'viewId'],
155
- message: 'ui_view_mismatch',
156
- });
157
- if (isDeferredLike && value.protocolVersion !== 2)
158
- context.addIssue({
159
- code: z.ZodIssueCode.custom,
160
- path: ['status'],
161
- message: 'deferred_requires_v2',
162
- });
163
- if (isDeferredLike && value.snapshot)
164
- context.addIssue({
165
- code: z.ZodIssueCode.custom,
166
- path: ['snapshot'],
167
- message: 'deferred_forbids_snapshot',
168
- });
169
- if (isDeferredLike && !value.anchor)
170
- context.addIssue({
171
- code: z.ZodIssueCode.custom,
172
- path: ['anchor'],
173
- message: 'deferred_requires_anchor',
174
- });
175
- if (isDeferredLike && value.anchor && value.anchor.commandId !== value.commandId)
176
- context.addIssue({
177
- code: z.ZodIssueCode.custom,
178
- path: ['anchor', 'commandId'],
179
- message: 'anchor_command_mismatch',
180
- });
90
+ context.addIssue({ code: z.ZodIssueCode.custom, path: ['snapshot', 'viewId'], message: 'ui_view_mismatch' });
181
91
  });
182
92
  export const WORKSPACE_UI_COMMAND_EVENT = 'ui.command.requested';
183
93
  export const WORKSPACE_UI_RESULT_EVENT = 'ui.command.resolved';
184
- export const WORKSPACE_UI_SNAPSHOT_REQUEST_EVENT = 'ui.snapshot.requested';
185
- export const WORKSPACE_UI_SNAPSHOT_CLOSED_EVENT = 'ui.snapshot.closed';
186
- export const WORKSPACE_UI_SNAPSHOT_VERSION = 1;
187
- const snapshotExchangeScope = {
188
- version: z.literal(WORKSPACE_UI_SNAPSHOT_VERSION),
189
- requestId: z.string().uuid(),
190
- viewId: identity,
191
- workspaceId: identity,
192
- directoryName: workspaceDirectoryNameSchema,
193
- sessionId: identity,
194
- runtimeId: identity,
195
- generation: z.number().int().nonnegative(),
196
- runtimeEpoch: z.number().int().nonnegative(),
197
- };
198
- /** The continuation's stable request ID identifies one frozen, server-timed observation exchange. */
199
- export const workspaceUiSnapshotRequestSchema = z
200
- .object({
201
- ...snapshotExchangeScope,
202
- expiresAt: z.string().datetime(),
203
- })
204
- .strict();
205
- /** A browser observes its current view; this is not a navigation or an opened receipt. */
206
- export const workspaceUiSnapshotReplySchema = z
207
- .object({
208
- version: z.literal(WORKSPACE_UI_SNAPSHOT_VERSION),
209
- requestId: z.string().uuid(),
210
- requestSequence: z.number().int().positive(),
211
- viewId: identity,
212
- runtimeId: identity,
213
- generation: z.number().int().nonnegative(),
214
- runtimeEpoch: z.number().int().nonnegative(),
215
- snapshot: workspaceUiSnapshotSchema.extend({ version: z.literal(2) }),
216
- })
217
- .strict()
218
- .refine((value) => value.snapshot.viewId === value.viewId, 'ui_view_mismatch');
219
- /** A shared deadline closes to none once; a late reply can never change a dispatched payload. */
220
- export const workspaceUiSnapshotClosedSchema = z
221
- .discriminatedUnion('status', [
222
- z
223
- .object({
224
- ...snapshotExchangeScope,
225
- requestSequence: z.number().int().positive(),
226
- status: z.literal('observed'),
227
- snapshot: workspaceUiSnapshotSchema.extend({ version: z.literal(2) }),
228
- })
229
- .strict(),
230
- z
231
- .object({
232
- ...snapshotExchangeScope,
233
- requestSequence: z.number().int().positive(),
234
- status: z.literal('unavailable'),
235
- })
236
- .strict(),
237
- ])
238
- .superRefine((value, context) => {
239
- if (value.status !== 'observed')
240
- return;
241
- for (const key of ['viewId', 'workspaceId', 'directoryName', 'sessionId']) {
242
- if (value.snapshot[key] !== value[key])
243
- context.addIssue({ code: 'custom', path: ['snapshot', key], message: 'ui_scope_mismatch' });
244
- }
245
- });
246
- /** Native output cannot mint a platform observation challenge, including through notifications. */
247
- export function isWorkspaceUiSnapshotRequestEvent(event) {
248
- const parsed = workspaceUiSnapshotRequestSchema.safeParse(event.payload);
249
- return (parsed.success &&
250
- event.type === WORKSPACE_UI_SNAPSHOT_REQUEST_EVENT &&
251
- event.streamKind === 'workspace' &&
252
- event.streamId === parsed.data.workspaceId &&
253
- event.source?.runtimeId === `platform:${runtimeSha256Text(`workspace:${event.streamId}`)}` &&
254
- event.source.generation === 0 &&
255
- event.source.runtimeEpoch === 0 &&
256
- event.source.sourceSequence === event.sequence);
257
- }
258
94
  //# sourceMappingURL=workspace-ui.js.map