@allyhub/sdk 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/node_modules/@allyhub/audio/dist/plan.d.ts +3 -0
  3. package/dist/node_modules/@allyhub/audio/dist/render.js +1 -1
  4. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  5. package/dist/node_modules/@allyhub/chart/dist/chart-file.d.ts +2 -0
  6. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +1 -1
  7. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +3 -2
  8. package/dist/node_modules/@allyhub/chart/dist/chart.d.ts +5 -12
  9. package/dist/node_modules/@allyhub/chart/dist/chart.js +2 -1
  10. package/dist/node_modules/@allyhub/chart/dist/color.d.ts +37 -0
  11. package/dist/node_modules/@allyhub/chart/dist/color.js +2 -0
  12. package/dist/node_modules/@allyhub/chart/dist/index.d.ts +1 -0
  13. package/dist/node_modules/@allyhub/chart/dist/index.js +1 -1
  14. package/dist/node_modules/@allyhub/chart/dist/svg.js +1 -1
  15. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  16. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  17. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +130 -0
  18. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
  19. package/dist/node_modules/@allyhub/formats/dist/data/gen.d.ts +3 -1
  20. package/dist/node_modules/@allyhub/formats/dist/data/gen.js +1 -1
  21. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +512 -166
  22. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  23. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +2523 -136
  24. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  25. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +931 -87
  26. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  27. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  28. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  29. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  30. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  31. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  32. package/dist/node_modules/@allyhub/ooxml/dist/color.d.ts +11 -0
  33. package/dist/node_modules/@allyhub/ooxml/dist/color.js +1 -1
  34. package/dist/node_modules/@allyhub/ooxml/dist/ext.d.ts +43 -0
  35. package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
  36. package/dist/node_modules/@allyhub/ooxml/dist/index.d.ts +2 -1
  37. package/dist/node_modules/@allyhub/ooxml/dist/index.js +1 -1
  38. package/dist/node_modules/@allyhub/ooxml/dist/transform.d.ts +13 -0
  39. package/dist/node_modules/@allyhub/ooxml/dist/transform.js +2 -0
  40. package/dist/node_modules/@allyhub/ooxml/package.json +5 -1
  41. package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +4 -4
  42. package/dist/node_modules/@allyhub/piece/dist/media.d.ts +2 -2
  43. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  44. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +49 -5
  45. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  46. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +56 -0
  47. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  48. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +72 -9
  49. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  50. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +35 -20
  51. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  52. package/dist/node_modules/@allyhub/protocol/dist/errors.d.ts +7 -0
  53. package/dist/node_modules/@allyhub/protocol/dist/errors.js +2 -0
  54. package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +328 -0
  55. package/dist/node_modules/@allyhub/protocol/dist/events.js +2 -0
  56. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +28 -2
  57. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  58. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +2 -0
  59. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  60. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
  61. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +2 -2
  62. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  63. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +69 -6
  64. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  65. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +9 -9
  66. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  67. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  68. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  69. package/dist/node_modules/@allyhub/sheet/dist/annotations.d.ts +14 -0
  70. package/dist/node_modules/@allyhub/sheet/dist/annotations.js +2 -0
  71. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  72. package/dist/node_modules/@allyhub/sheet/dist/api/index.d.ts +1 -1
  73. package/dist/node_modules/@allyhub/sheet/dist/api/index.js +1 -1
  74. package/dist/node_modules/@allyhub/sheet/dist/api/rules.d.ts +24 -0
  75. package/dist/node_modules/@allyhub/sheet/dist/api/rules.js +1 -1
  76. package/dist/node_modules/@allyhub/sheet/dist/api/styles.d.ts +12 -0
  77. package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +1 -1
  78. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +3 -1
  79. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  80. package/dist/node_modules/@allyhub/sheet/dist/arrange.d.ts +28 -1
  81. package/dist/node_modules/@allyhub/sheet/dist/arrange.js +1 -1
  82. package/dist/node_modules/@allyhub/sheet/dist/data-tools.d.ts +42 -0
  83. package/dist/node_modules/@allyhub/sheet/dist/data-tools.js +2 -0
  84. package/dist/node_modules/@allyhub/sheet/dist/edit.d.ts +43 -2
  85. package/dist/node_modules/@allyhub/sheet/dist/edit.js +1 -1
  86. package/dist/node_modules/@allyhub/sheet/dist/fill.d.ts +10 -0
  87. package/dist/node_modules/@allyhub/sheet/dist/fill.js +1 -1
  88. package/dist/node_modules/@allyhub/sheet/dist/filter.js +1 -1
  89. package/dist/node_modules/@allyhub/sheet/dist/formula/rewrite.d.ts +14 -0
  90. package/dist/node_modules/@allyhub/sheet/dist/formula/rewrite.js +1 -1
  91. package/dist/node_modules/@allyhub/sheet/dist/html.js +10 -10
  92. package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +6 -1
  93. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  94. package/dist/node_modules/@allyhub/sheet/dist/outline.d.ts +30 -0
  95. package/dist/node_modules/@allyhub/sheet/dist/outline.js +2 -0
  96. package/dist/node_modules/@allyhub/sheet/dist/rich.d.ts +29 -0
  97. package/dist/node_modules/@allyhub/sheet/dist/rich.js +2 -0
  98. package/dist/node_modules/@allyhub/sheet/dist/rules.js +1 -1
  99. package/dist/node_modules/@allyhub/sheet/dist/table-style.d.ts +6 -0
  100. package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
  101. package/dist/node_modules/@allyhub/sheet/dist/table-styles.js +1 -1
  102. package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +5 -1
  103. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  104. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  105. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  106. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.d.ts +17 -1
  107. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  108. package/dist/node_modules/@allyhub/sheet/dist/xlsx/runs.d.ts +56 -0
  109. package/dist/node_modules/@allyhub/sheet/dist/xlsx/runs.js +2 -0
  110. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.d.ts +6 -0
  111. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  112. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  113. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  114. package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +117 -21
  115. package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
  116. package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +181 -30
  117. package/dist/node_modules/@allyhub/slides-core/dist/api.js +3 -3
  118. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  119. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +28 -2
  120. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  121. package/dist/node_modules/@allyhub/slides-core/dist/check.js +1 -1
  122. package/dist/node_modules/@allyhub/slides-core/dist/enums.d.ts +222 -4
  123. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  124. package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +6 -0
  125. package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
  126. package/dist/node_modules/@allyhub/slides-core/dist/generated/table-styles.d.ts +3 -0
  127. package/dist/node_modules/@allyhub/slides-core/dist/generated/table-styles.js +2 -0
  128. package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +3 -0
  129. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  130. package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
  131. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +98 -10
  132. package/dist/node_modules/@allyhub/slides-core/dist/numbering.d.ts +6 -0
  133. package/dist/node_modules/@allyhub/slides-core/dist/numbering.js +2 -0
  134. package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +53 -0
  135. package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
  136. package/dist/node_modules/@allyhub/slides-core/dist/patterns.d.ts +8 -0
  137. package/dist/node_modules/@allyhub/slides-core/dist/patterns.js +2 -0
  138. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +36 -6
  139. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  140. package/dist/node_modules/@allyhub/slides-core/dist/script.d.ts +11 -0
  141. package/dist/node_modules/@allyhub/slides-core/dist/script.js +2 -2
  142. package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +1 -1
  143. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
  144. package/dist/node_modules/@allyhub/slides-core/dist/table-style.d.ts +48 -0
  145. package/dist/node_modules/@allyhub/slides-core/dist/table-style.js +2 -0
  146. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  147. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +1 -1
  148. package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +4 -0
  149. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  150. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  151. package/docs/defaults.md +78 -4
  152. package/docs/image.md +1 -1
  153. package/docs/pictures.md +1 -1
  154. package/docs/project.md +1 -1
  155. package/docs/sheets.md +19 -9
  156. package/docs/slides.md +30 -16
  157. package/docs/speech.md +1 -1
  158. package/package.json +1 -1
@@ -0,0 +1,328 @@
1
+ import { z } from "zod";
2
+ /** Where a client sends its events. */
3
+ export declare const EVENTS_PATH = "/api/events";
4
+ /** The most events in one request. */
5
+ export declare const EVENTS_AT_MOST = 100;
6
+ /**
7
+ * A word: a name a program gives (a kind's id, an agent's, a command's, an
8
+ * error's code), lower case, with no spaces. Not a sentence, a path or a
9
+ * title: those do not fit it.
10
+ */
11
+ export declare const EventWordSchema: z.ZodString;
12
+ /** An id a program made: a project's, a session's. Random, never a name. */
13
+ export declare const EventIdSchema: z.ZodString;
14
+ /** A W3C trace id: 32 lower-case hex digits. */
15
+ export declare const EventTraceIdSchema: z.ZodString;
16
+ /** A route's pattern (`/api/tools/:name/calls`), never a path with its ids. */
17
+ export declare const EventRouteSchema: z.ZodString;
18
+ /** Each event's properties, by its name. */
19
+ export declare const EVENT_PROPS: {
20
+ /** A program started: Studio, the CLI on its first command of a day. */
21
+ readonly program_opened: z.ZodObject<{
22
+ os: z.ZodString;
23
+ arch: z.ZodString;
24
+ where: z.ZodEnum<{
25
+ cloud: "cloud";
26
+ computer: "computer";
27
+ }>;
28
+ }, z.core.$strict>;
29
+ /** A project opened in Studio. */
30
+ readonly project_opened: z.ZodObject<{
31
+ fresh: z.ZodBoolean;
32
+ items: z.ZodRecord<z.ZodString, z.ZodNumber>;
33
+ }, z.core.$strict>;
34
+ /** An item was put on show in Studio: the kind of work a person looks at. */
35
+ readonly item_opened: z.ZodObject<{
36
+ kind: z.ZodString;
37
+ }, z.core.$strict>;
38
+ /** A session with an agent started. */
39
+ readonly session_started: z.ZodObject<{
40
+ agent: z.ZodString;
41
+ }, z.core.$strict>;
42
+ /** A turn ended: a prompt, and all the agent did to answer it. */
43
+ readonly turn_finished: z.ZodObject<{
44
+ agent: z.ZodString;
45
+ durationMs: z.ZodNumber;
46
+ ended: z.ZodString;
47
+ changed: z.ZodRecord<z.ZodString, z.ZodNumber>;
48
+ }, z.core.$strict>;
49
+ /** Work Studio did ended (@allyhub/jobs): an export, a publish, an install, a download. */
50
+ readonly job_finished: z.ZodObject<{
51
+ what: z.ZodString;
52
+ about: z.ZodString;
53
+ kind: z.ZodOptional<z.ZodString>;
54
+ durationMs: z.ZodNumber;
55
+ outcome: z.ZodEnum<{
56
+ failed: "failed";
57
+ done: "done";
58
+ cancelled: "cancelled";
59
+ }>;
60
+ }, z.core.$strict>;
61
+ /** A command of the CLI ran. Its name, never its arguments. */
62
+ readonly command_ran: z.ZodObject<{
63
+ command: z.ZodString;
64
+ durationMs: z.ZodNumber;
65
+ exit: z.ZodNumber;
66
+ }, z.core.$strict>;
67
+ /** A refusal was shown to the person. */
68
+ readonly refusal_shown: z.ZodObject<{
69
+ code: z.ZodString;
70
+ where: z.ZodString;
71
+ }, z.core.$strict>;
72
+ /** A person's first organization was made: they signed up. */
73
+ readonly account_created: z.ZodObject<{}, z.core.$strict>;
74
+ /** The service refused a call for credits, a plan, a limit or a tool turned off, or a file for the organization's cap. */
75
+ readonly refusal_met: z.ZodObject<{
76
+ code: z.ZodString;
77
+ route: z.ZodString;
78
+ }, z.core.$strict>;
79
+ /** A person went to pay. */
80
+ readonly checkout_started: z.ZodObject<{
81
+ what: z.ZodEnum<{
82
+ plan: "plan";
83
+ card: "card";
84
+ top_up: "top_up";
85
+ }>;
86
+ plan: z.ZodOptional<z.ZodString>;
87
+ interval: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strict>;
89
+ /** A payment arrived. */
90
+ readonly checkout_completed: z.ZodObject<{
91
+ what: z.ZodEnum<{
92
+ plan: "plan";
93
+ top_up: "top_up";
94
+ }>;
95
+ plan: z.ZodOptional<z.ZodString>;
96
+ }, z.core.$strict>;
97
+ /** A share was made. */
98
+ readonly share_made: z.ZodObject<{
99
+ kind: z.ZodString;
100
+ audience: z.ZodString;
101
+ }, z.core.$strict>;
102
+ };
103
+ export type EventName = keyof typeof EVENT_PROPS;
104
+ /**
105
+ * Each event in a line, for the list people read (public/github's
106
+ * TELEMETRY.md is written from this file): an event added here is a type
107
+ * error until it says what it is.
108
+ */
109
+ export declare const EVENT_ABOUT: Record<EventName, string>;
110
+ /** The events a client may send; the rest are the server's own to record. */
111
+ export declare const CLIENT_EVENTS: readonly ["program_opened", "project_opened", "item_opened", "session_started", "turn_finished", "job_finished", "command_ran", "refusal_shown"];
112
+ export type ClientEventName = (typeof CLIENT_EVENTS)[number];
113
+ /** An event's properties. */
114
+ export type EventProps<N extends EventName> = z.infer<(typeof EVENT_PROPS)[N]>;
115
+ /** An event as a client sends it. */
116
+ export declare const ClientEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
117
+ name: z.ZodLiteral<"program_opened">;
118
+ props: z.ZodObject<{
119
+ os: z.ZodString;
120
+ arch: z.ZodString;
121
+ where: z.ZodEnum<{
122
+ cloud: "cloud";
123
+ computer: "computer";
124
+ }>;
125
+ }, z.core.$strict>;
126
+ id: z.ZodUUID;
127
+ at: z.ZodISODateTime;
128
+ projectId: z.ZodOptional<z.ZodString>;
129
+ sessionId: z.ZodOptional<z.ZodString>;
130
+ traceId: z.ZodOptional<z.ZodString>;
131
+ }, z.core.$strict>, z.ZodObject<{
132
+ name: z.ZodLiteral<"project_opened">;
133
+ props: z.ZodObject<{
134
+ fresh: z.ZodBoolean;
135
+ items: z.ZodRecord<z.ZodString, z.ZodNumber>;
136
+ }, z.core.$strict>;
137
+ id: z.ZodUUID;
138
+ at: z.ZodISODateTime;
139
+ projectId: z.ZodOptional<z.ZodString>;
140
+ sessionId: z.ZodOptional<z.ZodString>;
141
+ traceId: z.ZodOptional<z.ZodString>;
142
+ }, z.core.$strict>, z.ZodObject<{
143
+ name: z.ZodLiteral<"item_opened">;
144
+ props: z.ZodObject<{
145
+ kind: z.ZodString;
146
+ }, z.core.$strict>;
147
+ id: z.ZodUUID;
148
+ at: z.ZodISODateTime;
149
+ projectId: z.ZodOptional<z.ZodString>;
150
+ sessionId: z.ZodOptional<z.ZodString>;
151
+ traceId: z.ZodOptional<z.ZodString>;
152
+ }, z.core.$strict>, z.ZodObject<{
153
+ name: z.ZodLiteral<"session_started">;
154
+ props: z.ZodObject<{
155
+ agent: z.ZodString;
156
+ }, z.core.$strict>;
157
+ id: z.ZodUUID;
158
+ at: z.ZodISODateTime;
159
+ projectId: z.ZodOptional<z.ZodString>;
160
+ sessionId: z.ZodOptional<z.ZodString>;
161
+ traceId: z.ZodOptional<z.ZodString>;
162
+ }, z.core.$strict>, z.ZodObject<{
163
+ name: z.ZodLiteral<"turn_finished">;
164
+ props: z.ZodObject<{
165
+ agent: z.ZodString;
166
+ durationMs: z.ZodNumber;
167
+ ended: z.ZodString;
168
+ changed: z.ZodRecord<z.ZodString, z.ZodNumber>;
169
+ }, z.core.$strict>;
170
+ id: z.ZodUUID;
171
+ at: z.ZodISODateTime;
172
+ projectId: z.ZodOptional<z.ZodString>;
173
+ sessionId: z.ZodOptional<z.ZodString>;
174
+ traceId: z.ZodOptional<z.ZodString>;
175
+ }, z.core.$strict>, z.ZodObject<{
176
+ name: z.ZodLiteral<"job_finished">;
177
+ props: z.ZodObject<{
178
+ what: z.ZodString;
179
+ about: z.ZodString;
180
+ kind: z.ZodOptional<z.ZodString>;
181
+ durationMs: z.ZodNumber;
182
+ outcome: z.ZodEnum<{
183
+ failed: "failed";
184
+ done: "done";
185
+ cancelled: "cancelled";
186
+ }>;
187
+ }, z.core.$strict>;
188
+ id: z.ZodUUID;
189
+ at: z.ZodISODateTime;
190
+ projectId: z.ZodOptional<z.ZodString>;
191
+ sessionId: z.ZodOptional<z.ZodString>;
192
+ traceId: z.ZodOptional<z.ZodString>;
193
+ }, z.core.$strict>, z.ZodObject<{
194
+ name: z.ZodLiteral<"command_ran">;
195
+ props: z.ZodObject<{
196
+ command: z.ZodString;
197
+ durationMs: z.ZodNumber;
198
+ exit: z.ZodNumber;
199
+ }, z.core.$strict>;
200
+ id: z.ZodUUID;
201
+ at: z.ZodISODateTime;
202
+ projectId: z.ZodOptional<z.ZodString>;
203
+ sessionId: z.ZodOptional<z.ZodString>;
204
+ traceId: z.ZodOptional<z.ZodString>;
205
+ }, z.core.$strict>, z.ZodObject<{
206
+ name: z.ZodLiteral<"refusal_shown">;
207
+ props: z.ZodObject<{
208
+ code: z.ZodString;
209
+ where: z.ZodString;
210
+ }, z.core.$strict>;
211
+ id: z.ZodUUID;
212
+ at: z.ZodISODateTime;
213
+ projectId: z.ZodOptional<z.ZodString>;
214
+ sessionId: z.ZodOptional<z.ZodString>;
215
+ traceId: z.ZodOptional<z.ZodString>;
216
+ }, z.core.$strict>], "name">;
217
+ export type ClientEvent = z.infer<typeof ClientEventSchema>;
218
+ /** A client's batch: strict, as everything the services receive. One event that is not in this file refuses the whole batch. */
219
+ export declare const EventsRequestSchema: z.ZodObject<{
220
+ events: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
221
+ name: z.ZodLiteral<"program_opened">;
222
+ props: z.ZodObject<{
223
+ os: z.ZodString;
224
+ arch: z.ZodString;
225
+ where: z.ZodEnum<{
226
+ cloud: "cloud";
227
+ computer: "computer";
228
+ }>;
229
+ }, z.core.$strict>;
230
+ id: z.ZodUUID;
231
+ at: z.ZodISODateTime;
232
+ projectId: z.ZodOptional<z.ZodString>;
233
+ sessionId: z.ZodOptional<z.ZodString>;
234
+ traceId: z.ZodOptional<z.ZodString>;
235
+ }, z.core.$strict>, z.ZodObject<{
236
+ name: z.ZodLiteral<"project_opened">;
237
+ props: z.ZodObject<{
238
+ fresh: z.ZodBoolean;
239
+ items: z.ZodRecord<z.ZodString, z.ZodNumber>;
240
+ }, z.core.$strict>;
241
+ id: z.ZodUUID;
242
+ at: z.ZodISODateTime;
243
+ projectId: z.ZodOptional<z.ZodString>;
244
+ sessionId: z.ZodOptional<z.ZodString>;
245
+ traceId: z.ZodOptional<z.ZodString>;
246
+ }, z.core.$strict>, z.ZodObject<{
247
+ name: z.ZodLiteral<"item_opened">;
248
+ props: z.ZodObject<{
249
+ kind: z.ZodString;
250
+ }, z.core.$strict>;
251
+ id: z.ZodUUID;
252
+ at: z.ZodISODateTime;
253
+ projectId: z.ZodOptional<z.ZodString>;
254
+ sessionId: z.ZodOptional<z.ZodString>;
255
+ traceId: z.ZodOptional<z.ZodString>;
256
+ }, z.core.$strict>, z.ZodObject<{
257
+ name: z.ZodLiteral<"session_started">;
258
+ props: z.ZodObject<{
259
+ agent: z.ZodString;
260
+ }, z.core.$strict>;
261
+ id: z.ZodUUID;
262
+ at: z.ZodISODateTime;
263
+ projectId: z.ZodOptional<z.ZodString>;
264
+ sessionId: z.ZodOptional<z.ZodString>;
265
+ traceId: z.ZodOptional<z.ZodString>;
266
+ }, z.core.$strict>, z.ZodObject<{
267
+ name: z.ZodLiteral<"turn_finished">;
268
+ props: z.ZodObject<{
269
+ agent: z.ZodString;
270
+ durationMs: z.ZodNumber;
271
+ ended: z.ZodString;
272
+ changed: z.ZodRecord<z.ZodString, z.ZodNumber>;
273
+ }, z.core.$strict>;
274
+ id: z.ZodUUID;
275
+ at: z.ZodISODateTime;
276
+ projectId: z.ZodOptional<z.ZodString>;
277
+ sessionId: z.ZodOptional<z.ZodString>;
278
+ traceId: z.ZodOptional<z.ZodString>;
279
+ }, z.core.$strict>, z.ZodObject<{
280
+ name: z.ZodLiteral<"job_finished">;
281
+ props: z.ZodObject<{
282
+ what: z.ZodString;
283
+ about: z.ZodString;
284
+ kind: z.ZodOptional<z.ZodString>;
285
+ durationMs: z.ZodNumber;
286
+ outcome: z.ZodEnum<{
287
+ failed: "failed";
288
+ done: "done";
289
+ cancelled: "cancelled";
290
+ }>;
291
+ }, z.core.$strict>;
292
+ id: z.ZodUUID;
293
+ at: z.ZodISODateTime;
294
+ projectId: z.ZodOptional<z.ZodString>;
295
+ sessionId: z.ZodOptional<z.ZodString>;
296
+ traceId: z.ZodOptional<z.ZodString>;
297
+ }, z.core.$strict>, z.ZodObject<{
298
+ name: z.ZodLiteral<"command_ran">;
299
+ props: z.ZodObject<{
300
+ command: z.ZodString;
301
+ durationMs: z.ZodNumber;
302
+ exit: z.ZodNumber;
303
+ }, z.core.$strict>;
304
+ id: z.ZodUUID;
305
+ at: z.ZodISODateTime;
306
+ projectId: z.ZodOptional<z.ZodString>;
307
+ sessionId: z.ZodOptional<z.ZodString>;
308
+ traceId: z.ZodOptional<z.ZodString>;
309
+ }, z.core.$strict>, z.ZodObject<{
310
+ name: z.ZodLiteral<"refusal_shown">;
311
+ props: z.ZodObject<{
312
+ code: z.ZodString;
313
+ where: z.ZodString;
314
+ }, z.core.$strict>;
315
+ id: z.ZodUUID;
316
+ at: z.ZodISODateTime;
317
+ projectId: z.ZodOptional<z.ZodString>;
318
+ sessionId: z.ZodOptional<z.ZodString>;
319
+ traceId: z.ZodOptional<z.ZodString>;
320
+ }, z.core.$strict>], "name">>;
321
+ }, z.core.$strict>;
322
+ export type EventsRequest = z.infer<typeof EventsRequestSchema>;
323
+ /** What the server answers: how many it kept (one sent before is kept once). */
324
+ export declare const EventsAnswerSchema: z.ZodObject<{
325
+ kept: z.ZodNumber;
326
+ }, z.core.$strip>;
327
+ export type EventsAnswer = z.infer<typeof EventsAnswerSchema>;
328
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{z as e}from"zod";export const EVENTS_PATH="/api/events",EVENTS_AT_MOST=100,EventWordSchema=e.string().regex(/^[a-z0-9][a-z0-9_.:-]{0,63}$/u),EventIdSchema=e.string().regex(/^[A-Za-z0-9_-]{1,128}$/u),EventTraceIdSchema=e.string().regex(/^[0-9a-f]{32}$/u),EventRouteSchema=e.string().regex(/^(?:\/[A-Za-z0-9_.:*-]{1,64}){1,12}$|^unmatched$/u);const a=e.record(EventWordSchema,e.number().int().min(0).max(1e6)).refine(n=>Object.keys(n).length<=32,"At most 32 words."),o=e.number().int().min(0).max(10080*60*1e3);export const EVENT_PROPS={program_opened:e.strictObject({os:EventWordSchema,arch:EventWordSchema,where:e.enum(["computer","cloud"])}),project_opened:e.strictObject({fresh:e.boolean(),items:a}),item_opened:e.strictObject({kind:EventWordSchema}),session_started:e.strictObject({agent:EventWordSchema}),turn_finished:e.strictObject({agent:EventWordSchema,durationMs:o,ended:EventWordSchema,changed:a}),job_finished:e.strictObject({what:EventWordSchema,about:EventWordSchema,kind:EventWordSchema.optional(),durationMs:o,outcome:e.enum(["done","failed","cancelled"])}),command_ran:e.strictObject({command:EventWordSchema,durationMs:o,exit:e.number().int().min(0).max(255)}),refusal_shown:e.strictObject({code:EventWordSchema,where:EventWordSchema}),account_created:e.strictObject({}),refusal_met:e.strictObject({code:EventWordSchema,route:EventRouteSchema}),checkout_started:e.strictObject({what:e.enum(["plan","top_up","card"]),plan:EventWordSchema.optional(),interval:EventWordSchema.optional()}),checkout_completed:e.strictObject({what:e.enum(["plan","top_up"]),plan:EventWordSchema.optional()}),share_made:e.strictObject({kind:EventWordSchema,audience:EventWordSchema})},EVENT_ABOUT={program_opened:"Studio started.",project_opened:"A project was opened in Studio.",item_opened:"A piece was put on show in Studio: its kind (a video, a deck, a doc), never which one.",session_started:"A conversation with an agent began.",turn_finished:"An agent finished answering a message: how long it took, how it ended, and how many files it changed of each kind of work.",job_finished:"Work Studio did ended: an export, a publish, an install, a download.",command_ran:"A command of the allyhub CLI ran: its name, how long it took and its exit code.",refusal_shown:"Studio showed that a call needs credits or a plan.",account_created:"A person signed up.",refusal_met:"AllyHub's service refused a call for credits, a plan, a limit or a tool turned off.",checkout_started:"A person went to pay.",checkout_completed:"A payment arrived.",share_made:"A share link was made."},CLIENT_EVENTS=["program_opened","project_opened","item_opened","session_started","turn_finished","job_finished","command_ran","refusal_shown"];const r={id:e.uuid(),at:e.iso.datetime(),projectId:EventIdSchema.optional(),sessionId:EventIdSchema.optional(),traceId:EventTraceIdSchema.optional()},t=n=>e.strictObject({...r,name:e.literal(n),props:EVENT_PROPS[n]});export const ClientEventSchema=e.discriminatedUnion("name",[t("program_opened"),t("project_opened"),t("item_opened"),t("session_started"),t("turn_finished"),t("job_finished"),t("command_ran"),t("refusal_shown")]),EventsRequestSchema=e.strictObject({events:e.array(ClientEventSchema).min(1).max(EVENTS_AT_MOST)}),EventsAnswerSchema=e.object({kept:e.number().int().min(0)});
@@ -153,9 +153,35 @@ export declare const WINDOW_NOTIFICATIONS: {
153
153
  command: z.ZodString;
154
154
  open: z.ZodOptional<z.ZodBoolean>;
155
155
  }, z.core.$strict>>;
156
+ readonly "editor/upstream": import("./jsonrpc.js").NotificationSpec<z.ZodDiscriminatedUnion<[z.ZodObject<{
157
+ from: z.ZodLiteral<"snapshot">;
158
+ root: z.ZodURL;
159
+ }, z.core.$strict>, z.ZodObject<{
160
+ from: z.ZodLiteral<"window">;
161
+ connection: z.ZodString;
162
+ }, z.core.$strict>], "from">>;
163
+ readonly "editor/context": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
164
+ mode: z.ZodEnum<{
165
+ read: "read";
166
+ edit: "edit";
167
+ }>;
168
+ theme: z.ZodEnum<{
169
+ light: "light";
170
+ dark: "dark";
171
+ }>;
172
+ }, z.core.$strict>>;
173
+ readonly "editor/message": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
174
+ connection: z.ZodString;
175
+ message: z.ZodUnknown;
176
+ }, z.core.$strict>>;
156
177
  };
157
178
  /** What the page tells the window. */
158
179
  export declare const FRAME_NOTIFICATIONS: {
180
+ readonly "editor/ready": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
181
+ readonly "editor/send": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
182
+ connection: z.ZodString;
183
+ message: z.ZodUnknown;
184
+ }, z.core.$strict>>;
159
185
  readonly "note/ready": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
160
186
  readonly "note/gone": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{}, z.core.$strict>>;
161
187
  readonly "window/key": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
@@ -187,10 +213,10 @@ export declare const FRAME_NOTIFICATIONS: {
187
213
  readonly "export/state": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
188
214
  at: z.ZodEnum<{
189
215
  failed: "failed";
190
- running: "running";
191
- idle: "idle";
192
216
  queued: "queued";
217
+ running: "running";
193
218
  done: "done";
219
+ idle: "idle";
194
220
  }>;
195
221
  percent: z.ZodOptional<z.ZodNumber>;
196
222
  open: z.ZodOptional<z.ZodBoolean>;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as e}from"zod";import{EDITOR_STATES as r,ExportStateSchema as n,PlaceSchema as a}from"./editor.js";import{AgentHereSchema as h}from"./presence.js";import{PathSchema as c}from"./files.js";import{method as o,notification as t}from"./jsonrpc.js";import{HeldSchema as d,NoteFoundSchema as p,NotePickSchema as s,NotePictureSchema as m,NotePointSchema as w,NoteRectSchema as i,NoteShapeSchema as l}from"./notes.js";export const FRAME_METHODS={"note/hold":o(e.strictObject({selection:e.boolean().optional()}),d.extend({selected:e.array(s).optional()}),"Holds what moves by itself while the person marks a picture of it; says what is on show, and with `selection` what is selected in it."),"note/locate":o(e.strictObject({shape:l}),p,"What a mark is on: the editor's answer and every inset's under it, innermost first. Empty is an answer: the mark's place still goes."),"note/pick":o(e.strictObject({at:w}),e.strictObject({pick:s.optional()}),"The one thing in front at a point, with its edge: the innermost inset's under it that answers, else the editor's. None is an answer."),"note/pictures":o(e.strictObject({}),e.strictObject({pictures:e.array(m),uncovered:e.array(e.strictObject({name:e.string(),rect:i}))}),"The page as it shows now, drawn without the window's marks, then its insets' pictures, each at its rect, outermost first."),"note/release":o(e.strictObject({}),e.strictObject({}),"The person is done marking. Nothing starts by itself.")},WINDOW_NOTIFICATIONS={"editor/command":t(e.strictObject({command:e.string().min(1),open:e.boolean().optional()}),"A shortcut the window took, its header's Export or its agent's name, or a command of the editor's extension, for the editor to do as its own.")},FRAME_NOTIFICATIONS={"note/ready":t(e.strictObject({}),"The page's editor has given its surface: the page answers notes."),"note/gone":t(e.strictObject({}),"The page no longer answers notes: its editor went, or the page goes."),"window/key":t(e.strictObject({key:e.string(),code:e.string(),meta:e.boolean(),ctrl:e.boolean(),shift:e.boolean(),alt:e.boolean()}),"A key with ⌘ or Ctrl pressed in the page that its editor did not take: the window's shortcut (⌘⇧M, ⌘K), heard where the keys are in the page. A desktop shell's menu hears them itself, so a page framed there tells none."),"agent/ask":t(e.strictObject({text:e.string().min(1)}),"Words the editor puts before the person's agent, for them to go on and send."),"note/begin":t(e.strictObject({from:i.optional(),selection:e.boolean().optional()}),"The person asked for Mark up from the editor: the window shows its tools, or with `selection` begins with what is selected marked; `from` is what they pressed, in the page's viewport."),"share/begin":t(e.strictObject({}),"The person asked to share the item on show."),"edit/request":t(e.strictObject({}),"The person pressed an Edit of the page's own on a read-only page, or the page needs the machine for what they asked: the window wakes it. Never for a key pressed in the item."),"editor/place":t(e.strictObject({item:c,place:a}),"Where the person is in an item, as its editor says it, so the window opens it there again; the window keeps it unread."),"export/state":t(n,"How the item's exports go, for its Export button in the window's header."),"editor/state":t(e.strictObject({state:e.enum(r),message:e.string().optional()}),"Whether what the person typed is saved, for the window's header."),"agent/here":t(h,"The project's agent in the item on show and whether its editor follows it, for the window's header; its button asks back with `editor/command`'s `follow` or `unfollow`.")};
2
+ import{z as e}from"zod";import{EDITOR_STATES as a,EditorModeSchema as n,ExportStateSchema as h,PlaceSchema as c,ThemeSchema as d}from"./editor.js";import{AgentHereSchema as m}from"./presence.js";import{PathSchema as p}from"./files.js";import{method as o,notification as t}from"./jsonrpc.js";import{HeldSchema as w,NoteFoundSchema as l,NotePickSchema as s,NotePictureSchema as g,NotePointSchema as f,NoteRectSchema as r,NoteShapeSchema as b}from"./notes.js";const i=e.strictObject({connection:e.string().min(1),message:e.unknown()});export const FRAME_METHODS={"note/hold":o(e.strictObject({selection:e.boolean().optional()}),w.extend({selected:e.array(s).optional()}),"Holds what moves by itself while the person marks a picture of it; says what is on show, and with `selection` what is selected in it."),"note/locate":o(e.strictObject({shape:b}),l,"What a mark is on: the editor's answer and every inset's under it, innermost first. Empty is an answer: the mark's place still goes."),"note/pick":o(e.strictObject({at:f}),e.strictObject({pick:s.optional()}),"The one thing in front at a point, with its edge: the innermost inset's under it that answers, else the editor's. None is an answer."),"note/pictures":o(e.strictObject({}),e.strictObject({pictures:e.array(g),uncovered:e.array(e.strictObject({name:e.string(),rect:r}))}),"The page as it shows now, drawn without the window's marks, then its insets' pictures, each at its rect, outermost first."),"note/release":o(e.strictObject({}),e.strictObject({}),"The person is done marking. Nothing starts by itself.")},WINDOW_NOTIFICATIONS={"editor/command":t(e.strictObject({command:e.string().min(1),open:e.boolean().optional()}),"A shortcut the window took, its header's Export or its agent's name, or a command of the editor's extension, for the editor to do as its own."),"editor/upstream":t(e.discriminatedUnion("from",[e.strictObject({from:e.literal("snapshot"),root:e.url()}),e.strictObject({from:e.literal("window"),connection:e.string().min(1)})]),"Where the page reads and writes from now: a read view, or the project's server through the window. Each is a new upstream: the page makes its watches again there and its editor takes what differs as a change on disk."),"editor/context":t(e.strictObject({mode:n,theme:d}),"The editor's mode and the theme the window draws in, as they are now: the page's editor hears them as its host's context and changes where it stands."),"editor/message":t(i,"A message of the project's server for the page.")},FRAME_NOTIFICATIONS={"editor/ready":t(e.strictObject({}),"The page is loaded: the window tells it its upstream and its context."),"editor/send":t(i,"A message of the page for the project's server."),"note/ready":t(e.strictObject({}),"The page's editor has given its surface: the page answers notes."),"note/gone":t(e.strictObject({}),"The page no longer answers notes: its editor went, or the page goes."),"window/key":t(e.strictObject({key:e.string(),code:e.string(),meta:e.boolean(),ctrl:e.boolean(),shift:e.boolean(),alt:e.boolean()}),"A key with ⌘ or Ctrl pressed in the page that its editor did not take: the window's shortcut (⌘⇧M, ⌘K), heard where the keys are in the page. A desktop shell's menu hears them itself, so a page framed there tells none."),"agent/ask":t(e.strictObject({text:e.string().min(1)}),"Words the editor puts before the person's agent, for them to go on and send."),"note/begin":t(e.strictObject({from:r.optional(),selection:e.boolean().optional()}),"The person asked for Mark up from the editor: the window shows its tools, or with `selection` begins with what is selected marked; `from` is what they pressed, in the page's viewport."),"share/begin":t(e.strictObject({}),"The person asked to share the item on show."),"edit/request":t(e.strictObject({}),"The person pressed an Edit of the page's own on a read-only page, or the page needs the machine for what they asked: the window wakes it. Never for a key pressed in the item."),"editor/place":t(e.strictObject({item:p,place:c}),"Where the person is in an item, as its editor says it, so the window opens it there again; the window keeps it unread."),"export/state":t(h,"How the item's exports go, for its Export button in the window's header."),"editor/state":t(e.strictObject({state:e.enum(a),message:e.string().optional()}),"Whether what the person typed is saved, for the window's header."),"agent/here":t(m,"The project's agent in the item on show and whether its editor follows it, for the window's header; its button asks back with `editor/command`'s `follow` or `unfollow`.")};
@@ -8,6 +8,8 @@ export * from "./frame.js";
8
8
  export * from "./tools.js";
9
9
  export * from "./cli.js";
10
10
  export * from "./auth.js";
11
+ export * from "./events.js";
12
+ export * from "./errors.js";
11
13
  export * from "./registry.js";
12
14
  export * from "./runtimes.js";
13
15
  export * from "./cloud.js";
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./presence.js";export*from"./kinds.js";export*from"./notes.js";export*from"./frame.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";export*from"./blobs.js";export*from"./sites.js";export*from"./mail.js";export*from"./snapshots.js";export*from"./sources.js";export*from"./shares.js";export*from"./account.js";export*from"./open.js";export*from"./jobs.js";export*from"./peer.js";export*from"./shape.js";
2
+ export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./presence.js";export*from"./kinds.js";export*from"./notes.js";export*from"./frame.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./events.js";export*from"./errors.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";export*from"./blobs.js";export*from"./sites.js";export*from"./mail.js";export*from"./snapshots.js";export*from"./sources.js";export*from"./shares.js";export*from"./account.js";export*from"./open.js";export*from"./jobs.js";export*from"./peer.js";export*from"./shape.js";
@@ -15,8 +15,8 @@ export type JobFailureReason = (typeof JOB_FAILURES)[number];
15
15
  export declare const JobAboutSchema: z.ZodObject<{
16
16
  kind: z.ZodEnum<{
17
17
  studio: "studio";
18
- project: "project";
19
18
  agent: "agent";
19
+ project: "project";
20
20
  piece: "piece";
21
21
  plugin: "plugin";
22
22
  skill: "skill";
@@ -30,8 +30,8 @@ export declare const JobSchema: z.ZodObject<{
30
30
  about: z.ZodObject<{
31
31
  kind: z.ZodEnum<{
32
32
  studio: "studio";
33
- project: "project";
34
33
  agent: "agent";
34
+ project: "project";
35
35
  piece: "piece";
36
36
  plugin: "plugin";
37
37
  skill: "skill";
@@ -40,20 +40,20 @@ export declare const JobSchema: z.ZodObject<{
40
40
  id: z.ZodString;
41
41
  }, z.core.$strict>;
42
42
  what: z.ZodEnum<{
43
- update: "update";
44
- install: "install";
45
- start: "start";
46
43
  download: "download";
47
44
  wake: "wake";
48
45
  export: "export";
46
+ update: "update";
47
+ install: "install";
48
+ start: "start";
49
49
  publish: "publish";
50
50
  }>;
51
51
  name: z.ZodOptional<z.ZodString>;
52
52
  state: z.ZodEnum<{
53
53
  failed: "failed";
54
+ queued: "queued";
54
55
  running: "running";
55
56
  paused: "paused";
56
- queued: "queued";
57
57
  done: "done";
58
58
  cancelled: "cancelled";
59
59
  }>;
@@ -67,8 +67,8 @@ export declare const MailboxSchema: z.ZodObject<{
67
67
  displayName: z.ZodString;
68
68
  retentionDays: z.ZodNumber;
69
69
  sendPolicy: z.ZodUnion<readonly [z.ZodEnum<{
70
- off: "off";
71
70
  team: "team";
71
+ off: "off";
72
72
  anyone: "anyone";
73
73
  }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
74
74
  sendsLeft: z.ZodNumber;
@@ -264,8 +264,8 @@ export type MailReply = z.infer<typeof MailReplySchema>;
264
264
  export declare const MailSettingsSchema: z.ZodObject<{
265
265
  displayName: z.ZodOptional<z.ZodString>;
266
266
  sendPolicy: z.ZodOptional<z.ZodEnum<{
267
- off: "off";
268
267
  team: "team";
268
+ off: "off";
269
269
  anyone: "anyone";
270
270
  }>>;
271
271
  retentionDays: z.ZodOptional<z.ZodNumber>;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{ACCOUNT_CALLS as E}from"./account.js";import{ACCOUNT_PATH as O,BROWSER_LINK_PATH as _,METADATA_PATH as i}from"./auth.js";import{CATALOG_PATH as r,FILES_PATH as e,LLM_MESSAGES_PATH as H,LLM_MODELS_PATH as I}from"./cloud.js";import{SHARES_PATH as T}from"./shares.js";import{PROJECTS_PATH as p,SNAPSHOTS_PATH as a,SNAPSHOT_BLOBS_PATH as L}from"./snapshots.js";import{SITES_PATH as t}from"./sites.js";import{MAIL_ALIASES_PATH as G,MAIL_MESSAGES_PATH as o,MAIL_PATH as n,MAIL_SEND_PATH as s,MAIL_SETTINGS_PATH as U}from"./mail.js";import{ORGANIZATIONS_PATH as $,STUDIO_OPEN_PATH as D,STUDIO_PATH as d,STUDIO_TICKET_PATH as l,STUDIO_WAKE_PATH as f,STUDIO_WAKES_PATH as C,STUDIO_PAUSE_PATH as M,STUDIO_POLICY_PATH as P,STUDIO_RESTART_PATH as N,STUDIO_PREPARE_PATH as c}from"./teams.js";export const CLIENT_ROUTES=[{method:"GET",path:i},{method:"GET",path:O},{method:"POST",path:_},{method:"GET",path:I},{method:"POST",path:H},{method:"GET",path:r},{method:"POST",path:"/api/tools/:name/calls"},{method:"GET",path:"/api/calls/:id"},{method:"POST",path:e},{method:"POST",path:`${e}/:id/done`},{method:"GET",path:`${e}/:id/content`},{method:"GET",path:$},{method:"GET",path:d},{method:"DELETE",path:d},{method:"PATCH",path:d},{method:"POST",path:N},{method:"GET",path:P},{method:"PUT",path:P},{method:"POST",path:D},{method:"POST",path:l},{method:"PUT",path:f},{method:"POST",path:C},{method:"POST",path:M},{method:"POST",path:c},{method:"POST",path:L},{method:"POST",path:a},{method:"POST",path:`${a}/:id/view`},{method:"GET",path:p},{method:"DELETE",path:`${p}/:id`},{method:"PUT",path:`${p}/:id/executor`},{method:"POST",path:T},{method:"GET",path:T},{method:"PATCH",path:`${T}/:id`},{method:"DELETE",path:`${T}/:id`},{method:"GET",path:"/api/s/:token"},{method:"POST",path:"/api/s/:token/report"},...Object.values(E).map(h=>({method:h.http,path:h.route})),{method:"GET",path:t},{method:"POST",path:t},{method:"GET",path:`${t}/:id`},{method:"DELETE",path:`${t}/:id`},{method:"POST",path:`${t}/:id/deployments`},{method:"POST",path:`${t}/:id/blobs`},{method:"PUT",path:`${t}/:id/live`},{method:"DELETE",path:`${t}/:id/live`},{method:"PUT",path:`${t}/:id/settings`},{method:"GET",path:n},{method:"POST",path:G},{method:"GET",path:o},{method:"GET",path:`${o}/:id`},{method:"GET",path:`${o}/:id/raw`},{method:"POST",path:`${o}/:id/reply`},{method:"POST",path:s},{method:"PUT",path:U}],probePath=h=>h.path.replace(/:[A-Za-z]+/gu,"probe");export function routeMissing(h,S,A){if(S!==404)return!1;const m=A.error;return m?.code==="not_found"&&m.message===`There is no ${h.method} ${probePath(h)}.`}
2
+ import{ACCOUNT_CALLS as E}from"./account.js";import{ACCOUNT_PATH as _,BROWSER_LINK_PATH as O,METADATA_PATH as r,SIGN_IN_LINK_PATH as i}from"./auth.js";import{CATALOG_PATH as H,FILES_PATH as e,LLM_MESSAGES_PATH as I,LLM_MODELS_PATH as L}from"./cloud.js";import{ERRORS_PATH as G}from"./errors.js";import{EVENTS_PATH as n}from"./events.js";import{SHARES_PATH as T}from"./shares.js";import{PROJECTS_PATH as p,SNAPSHOTS_PATH as a,SNAPSHOT_BLOBS_PATH as s}from"./snapshots.js";import{SITES_PATH as t}from"./sites.js";import{MAIL_ALIASES_PATH as U,MAIL_MESSAGES_PATH as o,MAIL_PATH as $,MAIL_SEND_PATH as D,MAIL_SETTINGS_PATH as N}from"./mail.js";import{ORGANIZATIONS_PATH as f,STUDIO_OPEN_PATH as l,STUDIO_PATH as m,STUDIO_TICKET_PATH as R,STUDIO_WAKE_PATH as C,STUDIO_WAKES_PATH as M,STUDIO_PAUSE_PATH as c,STUDIO_POLICY_PATH as P,STUDIO_RESTART_PATH as u,STUDIO_PREPARE_PATH as b}from"./teams.js";export const CLIENT_ROUTES=[{method:"GET",path:r},{method:"GET",path:_},{method:"POST",path:O},{method:"POST",path:i},{method:"GET",path:L},{method:"POST",path:I},{method:"GET",path:H},{method:"POST",path:"/api/tools/:name/calls"},{method:"GET",path:"/api/calls/:id"},{method:"POST",path:n},{method:"POST",path:G},{method:"POST",path:e},{method:"POST",path:`${e}/:id/done`},{method:"GET",path:`${e}/:id/content`},{method:"GET",path:f},{method:"GET",path:m},{method:"DELETE",path:m},{method:"PATCH",path:m},{method:"POST",path:u},{method:"GET",path:P},{method:"PUT",path:P},{method:"POST",path:l},{method:"POST",path:R},{method:"PUT",path:C},{method:"POST",path:M},{method:"POST",path:c},{method:"POST",path:b},{method:"POST",path:s},{method:"POST",path:a},{method:"POST",path:`${a}/:id/view`},{method:"GET",path:p},{method:"DELETE",path:`${p}/:id`},{method:"PUT",path:`${p}/:id/executor`},{method:"POST",path:T},{method:"GET",path:T},{method:"PATCH",path:`${T}/:id`},{method:"DELETE",path:`${T}/:id`},{method:"GET",path:"/api/s/:token"},{method:"POST",path:"/api/s/:token/report"},...Object.values(E).map(h=>({method:h.http,path:h.route})),{method:"GET",path:t},{method:"POST",path:t},{method:"GET",path:`${t}/:id`},{method:"DELETE",path:`${t}/:id`},{method:"POST",path:`${t}/:id/deployments`},{method:"POST",path:`${t}/:id/blobs`},{method:"PUT",path:`${t}/:id/live`},{method:"DELETE",path:`${t}/:id/live`},{method:"PUT",path:`${t}/:id/settings`},{method:"GET",path:$},{method:"POST",path:U},{method:"GET",path:o},{method:"GET",path:`${o}/:id`},{method:"GET",path:`${o}/:id/raw`},{method:"POST",path:`${o}/:id/reply`},{method:"POST",path:D},{method:"PUT",path:N}],probePath=h=>h.path.replace(/:[A-Za-z]+/gu,"probe");export function routeMissing(h,S,A){if(S!==404)return!1;const d=A.error;return d?.code==="not_found"&&d.message===`There is no ${h.method} ${probePath(h)}.`}
@@ -40,12 +40,12 @@ export type SnapshotKind = (typeof SNAPSHOT_KINDS)[number];
40
40
  export declare const StageFolderSchema: z.ZodString;
41
41
  /** What a stage page loads from a folder of the tree (a CSP fetch directive's word): a list that grows. */
42
42
  export declare const StageLoadSchema: z.ZodUnion<readonly [z.ZodEnum<{
43
- connect: "connect";
44
43
  media: "media";
45
44
  script: "script";
46
45
  style: "style";
47
46
  font: "font";
48
47
  img: "img";
48
+ connect: "connect";
49
49
  }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
50
50
  /**
51
51
  * The folders of the tree the extensions serve, each with what the stage's
@@ -278,16 +278,16 @@ export declare const treeHref: (path: string) => string;
278
278
  */
279
279
  export declare function stageCsp(tree: string, ancestors: readonly string[], routes?: Readonly<Record<string, readonly string[]>>): string;
280
280
  /**
281
- * The editors' page of a read view showing one item, read only, as the
281
+ * The editors' page of a read view showing one item in read mode, as the
282
282
  * window frames it: `<origin>/editor/?item=<id>&embed=studio&snapshot=1`
283
- * and the window's theme. For a share's viewer (`viewer`, `&viewer=1`):
284
- * the item alone, nothing offered that changes it or needs the machine
285
- * (HostContext's `viewer`). Opened at a place (`place`): where the person
283
+ * and the window's theme. Framed by a share's page (`share`,
284
+ * `embed=share`): the same read mode, with no window to tell it more or
285
+ * to go to another item. Opened at a place (`place`): where the person
286
286
  * was in the item, as its editor said it (`place=`, its JSON).
287
287
  */
288
288
  export declare function snapshotEditorUrl(origin: string, item: string, o?: {
289
289
  theme?: "light" | "dark";
290
- viewer?: boolean;
290
+ share?: boolean;
291
291
  place?: Place | undefined;
292
292
  }): string;
293
293
  export declare const EXECUTOR_KINDS: readonly ["cloud", "computer"];
@@ -387,6 +387,69 @@ export declare const ProjectsResponseSchema: z.ZodObject<{
387
387
  }, z.core.$strip>;
388
388
  /** `DELETE`: a project forgotten with its snapshots. */
389
389
  export declare const projectPath: (id: string) => string;
390
+ /**
391
+ * `GET` (a person signed in): what the organization keeps in the cloud of
392
+ * what it may.
393
+ */
394
+ export declare const STORAGE_PATH = "/api/storage";
395
+ export declare const StorageSchema: z.ZodObject<{
396
+ keptBytes: z.ZodNumber;
397
+ capBytes: z.ZodNullable<z.ZodNumber>;
398
+ }, z.core.$strip>;
399
+ export type Storage = z.infer<typeof StorageSchema>;
400
+ /** How many entries a page of the person's storage holds. */
401
+ export declare const STORAGE_PAGE_SIZE = 10;
402
+ /** A page (`?page=`, from 1) of the person's storage: its entries and how many there are in all. */
403
+ export declare const StoragePageSchema: z.ZodObject<{
404
+ page: z.ZodInt;
405
+ }, z.core.$strict>;
406
+ /** `GET ?page=`: the person's projects and their cloud Studio's home, the largest first. */
407
+ export declare const STORAGE_PROJECTS_PATH = "/api/storage/projects";
408
+ export declare const StoredProjectSchema: z.ZodObject<{
409
+ id: z.ZodString;
410
+ kind: z.ZodEnum<{
411
+ home: "home";
412
+ project: "project";
413
+ }>;
414
+ name: z.ZodString;
415
+ bytes: z.ZodNumber;
416
+ versions: z.ZodNumber;
417
+ madeAt: z.ZodNullable<z.ZodISODateTime>;
418
+ }, z.core.$strip>;
419
+ export type StoredProject = z.infer<typeof StoredProjectSchema>;
420
+ export declare const StoredProjectsSchema: z.ZodObject<{
421
+ items: z.ZodPipe<z.ZodArray<z.ZodUnknown>, z.ZodTransform<{
422
+ id: string;
423
+ kind: "home" | "project";
424
+ name: string;
425
+ bytes: number;
426
+ versions: number;
427
+ madeAt: string | null;
428
+ }[], unknown[]>>;
429
+ total: z.ZodNumber;
430
+ }, z.core.$strip>;
431
+ export type StoredProjects = z.infer<typeof StoredProjectsSchema>;
432
+ /** `GET ?page=`: the person's tools' inputs and outputs kept in the cloud, the largest first. */
433
+ export declare const STORAGE_FILES_PATH = "/api/storage/files";
434
+ export declare const StoredFileSchema: z.ZodObject<{
435
+ id: z.ZodString;
436
+ name: z.ZodString;
437
+ contentType: z.ZodString;
438
+ size: z.ZodNumber;
439
+ keptUntil: z.ZodISODateTime;
440
+ }, z.core.$strip>;
441
+ export type StoredFile = z.infer<typeof StoredFileSchema>;
442
+ export declare const StoredFilesSchema: z.ZodObject<{
443
+ items: z.ZodPipe<z.ZodArray<z.ZodUnknown>, z.ZodTransform<{
444
+ id: string;
445
+ name: string;
446
+ contentType: string;
447
+ size: number;
448
+ keptUntil: string;
449
+ }[], unknown[]>>;
450
+ total: z.ZodNumber;
451
+ }, z.core.$strip>;
452
+ export type StoredFiles = z.infer<typeof StoredFilesSchema>;
390
453
  /**
391
454
  * `PUT { kind }`: the project moved to another executor, answered as its
392
455
  * `ProjectInfo`: to the person's cloud Studio from anywhere they are