@swirls/shuttle 0.0.0-stage → 0.1.1

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 (298) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/LICENSE +190 -0
  3. package/NOTICE +5 -0
  4. package/README.md +42 -2
  5. package/dist/api/auth.d.ts +18 -0
  6. package/dist/api/auth.js +15 -0
  7. package/dist/api/common.d.ts +8 -0
  8. package/dist/api/common.js +4 -0
  9. package/dist/api/connections.d.ts +292 -0
  10. package/dist/api/connections.js +114 -0
  11. package/dist/api/github.d.ts +20 -0
  12. package/dist/api/github.js +13 -0
  13. package/dist/api/harness.d.ts +97 -0
  14. package/dist/api/harness.js +47 -0
  15. package/dist/api/index.d.ts +2059 -0
  16. package/dist/api/index.js +37 -0
  17. package/dist/api/runners.d.ts +93 -0
  18. package/dist/api/runners.js +45 -0
  19. package/dist/api/sandbox.d.ts +550 -0
  20. package/dist/api/sandbox.js +210 -0
  21. package/dist/api/sessions.d.ts +318 -0
  22. package/dist/api/sessions.js +154 -0
  23. package/dist/api/tenant.d.ts +54 -0
  24. package/dist/api/tenant.js +19 -0
  25. package/dist/api/timings.d.ts +36 -0
  26. package/dist/api/timings.js +48 -0
  27. package/dist/api/workspace.d.ts +738 -0
  28. package/dist/api/workspace.js +246 -0
  29. package/dist/core/pulls.d.ts +1001 -0
  30. package/dist/core/pulls.js +170 -0
  31. package/dist/core/workspace.d.ts +985 -0
  32. package/dist/core/workspace.js +174 -0
  33. package/dist/react/components/command-palette.d.ts +22 -0
  34. package/dist/react/components/command-palette.js +66 -0
  35. package/dist/react/components/follow-list.d.ts +20 -0
  36. package/dist/react/components/follow-list.js +98 -0
  37. package/dist/react/components/json-tree.d.ts +11 -0
  38. package/dist/react/components/json-tree.js +120 -0
  39. package/dist/react/components/markdown.d.ts +5 -0
  40. package/dist/react/components/markdown.js +29 -0
  41. package/dist/react/components/shuttle-mark.d.ts +7 -0
  42. package/dist/react/components/shuttle-mark.js +9 -0
  43. package/dist/react/components/status-dot.d.ts +9 -0
  44. package/dist/react/components/status-dot.js +27 -0
  45. package/dist/react/components/status.d.ts +6 -0
  46. package/dist/react/components/status.js +66 -0
  47. package/dist/react/components/ui/badge.d.ts +7 -0
  48. package/dist/react/components/ui/badge.js +19 -0
  49. package/dist/react/components/ui/button.d.ts +10 -0
  50. package/dist/react/components/ui/button.js +40 -0
  51. package/dist/react/components/ui/dialog.d.ts +19 -0
  52. package/dist/react/components/ui/dialog.js +34 -0
  53. package/dist/react/components/ui/dropdown-menu.d.ts +14 -0
  54. package/dist/react/components/ui/dropdown-menu.js +33 -0
  55. package/dist/react/components/ui/input.d.ts +3 -0
  56. package/dist/react/components/ui/input.js +6 -0
  57. package/dist/react/components/ui/panel.d.ts +18 -0
  58. package/dist/react/components/ui/panel.js +22 -0
  59. package/dist/react/components/ui/popover.d.ts +7 -0
  60. package/dist/react/components/ui/popover.js +16 -0
  61. package/dist/react/components/ui/resizable.d.ts +7 -0
  62. package/dist/react/components/ui/resizable.js +14 -0
  63. package/dist/react/components/ui/scroll-area.d.ts +14 -0
  64. package/dist/react/components/ui/scroll-area.js +12 -0
  65. package/dist/react/components/ui/select.d.ts +10 -0
  66. package/dist/react/components/ui/select.js +20 -0
  67. package/dist/react/components/ui/sheet.d.ts +8 -0
  68. package/dist/react/components/ui/sheet.js +20 -0
  69. package/dist/react/components/ui/tabs.d.ts +7 -0
  70. package/dist/react/components/ui/tabs.js +16 -0
  71. package/dist/react/components/ui/textarea.d.ts +3 -0
  72. package/dist/react/components/ui/textarea.js +6 -0
  73. package/dist/react/components/ui/tooltip.d.ts +8 -0
  74. package/dist/react/components/ui/tooltip.js +17 -0
  75. package/dist/react/features/artifacts/artifact-links.d.ts +9 -0
  76. package/dist/react/features/artifacts/artifact-links.js +38 -0
  77. package/dist/react/features/artifacts/artifact-pane.d.ts +19 -0
  78. package/dist/react/features/artifacts/artifact-pane.js +75 -0
  79. package/dist/react/features/artifacts/artifact-types.d.ts +59 -0
  80. package/dist/react/features/artifacts/artifact-types.js +69 -0
  81. package/dist/react/features/artifacts/browser-viewer.d.ts +5 -0
  82. package/dist/react/features/artifacts/browser-viewer.js +60 -0
  83. package/dist/react/features/artifacts/diff-style.d.ts +10 -0
  84. package/dist/react/features/artifacts/diff-style.js +21 -0
  85. package/dist/react/features/artifacts/file-pane.d.ts +13 -0
  86. package/dist/react/features/artifacts/file-pane.js +305 -0
  87. package/dist/react/features/artifacts/file-quick-open.d.ts +15 -0
  88. package/dist/react/features/artifacts/file-quick-open.js +74 -0
  89. package/dist/react/features/artifacts/file-search.d.ts +12 -0
  90. package/dist/react/features/artifacts/file-search.js +90 -0
  91. package/dist/react/features/artifacts/media-viewer.d.ts +8 -0
  92. package/dist/react/features/artifacts/media-viewer.js +41 -0
  93. package/dist/react/features/artifacts/review-diff.d.ts +19 -0
  94. package/dist/react/features/artifacts/review-diff.js +59 -0
  95. package/dist/react/features/artifacts/review-viewer.d.ts +4 -0
  96. package/dist/react/features/artifacts/review-viewer.js +337 -0
  97. package/dist/react/features/artifacts/sandbox.d.ts +43 -0
  98. package/dist/react/features/artifacts/sandbox.js +109 -0
  99. package/dist/react/features/artifacts/tab-strip.d.ts +11 -0
  100. package/dist/react/features/artifacts/tab-strip.js +55 -0
  101. package/dist/react/features/artifacts/terminal-theme.d.ts +34 -0
  102. package/dist/react/features/artifacts/terminal-theme.js +62 -0
  103. package/dist/react/features/artifacts/terminal-viewer.d.ts +5 -0
  104. package/dist/react/features/artifacts/terminal-viewer.js +209 -0
  105. package/dist/react/features/artifacts/unified-diff.d.ts +16 -0
  106. package/dist/react/features/artifacts/unified-diff.js +55 -0
  107. package/dist/react/features/artifacts/workspace-viewer.d.ts +16 -0
  108. package/dist/react/features/artifacts/workspace-viewer.js +275 -0
  109. package/dist/react/features/connections/agent-sign-in.d.ts +71 -0
  110. package/dist/react/features/connections/agent-sign-in.js +251 -0
  111. package/dist/react/features/connections/connections-panel.d.ts +8 -0
  112. package/dist/react/features/connections/connections-panel.js +42 -0
  113. package/dist/react/features/connections/login.d.ts +24 -0
  114. package/dist/react/features/connections/login.js +35 -0
  115. package/dist/react/features/connections/places.d.ts +20 -0
  116. package/dist/react/features/connections/places.js +27 -0
  117. package/dist/react/features/connections/queries.d.ts +28 -0
  118. package/dist/react/features/connections/queries.js +8 -0
  119. package/dist/react/features/events/event-cache.d.ts +4 -0
  120. package/dist/react/features/events/event-cache.js +29 -0
  121. package/dist/react/features/events/event-catalog.d.ts +17 -0
  122. package/dist/react/features/events/event-catalog.js +261 -0
  123. package/dist/react/features/events/event-inspector.d.ts +7 -0
  124. package/dist/react/features/events/event-inspector.js +29 -0
  125. package/dist/react/features/events/event-row.d.ts +21 -0
  126. package/dist/react/features/events/event-row.js +34 -0
  127. package/dist/react/features/events/event-stream.d.ts +18 -0
  128. package/dist/react/features/events/event-stream.js +58 -0
  129. package/dist/react/features/events/global-events.d.ts +122 -0
  130. package/dist/react/features/events/global-events.js +329 -0
  131. package/dist/react/features/events/shuttle-events.d.ts +7 -0
  132. package/dist/react/features/events/shuttle-events.js +1 -0
  133. package/dist/react/features/playbook/playbook-page.d.ts +2 -0
  134. package/dist/react/features/playbook/playbook-page.js +36 -0
  135. package/dist/react/features/playbook/playbook-query.d.ts +111 -0
  136. package/dist/react/features/playbook/playbook-query.js +17 -0
  137. package/dist/react/features/pulls/linked-session.d.ts +12 -0
  138. package/dist/react/features/pulls/linked-session.js +22 -0
  139. package/dist/react/features/pulls/pull-detail-sheet.d.ts +10 -0
  140. package/dist/react/features/pulls/pull-detail-sheet.js +41 -0
  141. package/dist/react/features/pulls/pull-fixtures.d.ts +8 -0
  142. package/dist/react/features/pulls/pull-fixtures.js +258 -0
  143. package/dist/react/features/pulls/pull-glyphs.d.ts +24 -0
  144. package/dist/react/features/pulls/pull-glyphs.js +89 -0
  145. package/dist/react/features/pulls/pull-inbox-list.d.ts +13 -0
  146. package/dist/react/features/pulls/pull-inbox-list.js +230 -0
  147. package/dist/react/features/pulls/pull-inbox-pref.d.ts +2 -0
  148. package/dist/react/features/pulls/pull-inbox-pref.js +19 -0
  149. package/dist/react/features/pulls/pull-inbox.d.ts +30 -0
  150. package/dist/react/features/pulls/pull-inbox.js +110 -0
  151. package/dist/react/features/pulls/pull-threads.d.ts +39 -0
  152. package/dist/react/features/pulls/pull-threads.js +145 -0
  153. package/dist/react/features/pulls/pulls.d.ts +120 -0
  154. package/dist/react/features/pulls/pulls.js +414 -0
  155. package/dist/react/features/pulls/session-pull-groups.d.ts +14 -0
  156. package/dist/react/features/pulls/session-pull-groups.js +29 -0
  157. package/dist/react/features/pulls/stack-ladder.d.ts +9 -0
  158. package/dist/react/features/pulls/stack-ladder.js +32 -0
  159. package/dist/react/features/sessions/agent-tree.d.ts +16 -0
  160. package/dist/react/features/sessions/agent-tree.js +100 -0
  161. package/dist/react/features/sessions/agents.d.ts +34 -0
  162. package/dist/react/features/sessions/agents.js +146 -0
  163. package/dist/react/features/sessions/attention.d.ts +32 -0
  164. package/dist/react/features/sessions/attention.js +42 -0
  165. package/dist/react/features/sessions/composer-attachments.d.ts +33 -0
  166. package/dist/react/features/sessions/composer-attachments.js +126 -0
  167. package/dist/react/features/sessions/composer.d.ts +15 -0
  168. package/dist/react/features/sessions/composer.js +327 -0
  169. package/dist/react/features/sessions/context-usage-meter.d.ts +5 -0
  170. package/dist/react/features/sessions/context-usage-meter.js +122 -0
  171. package/dist/react/features/sessions/context-usage.d.ts +54 -0
  172. package/dist/react/features/sessions/context-usage.js +206 -0
  173. package/dist/react/features/sessions/conversation.d.ts +21 -0
  174. package/dist/react/features/sessions/conversation.js +549 -0
  175. package/dist/react/features/sessions/harness-switcher.d.ts +26 -0
  176. package/dist/react/features/sessions/harness-switcher.js +118 -0
  177. package/dist/react/features/sessions/intake-heuristic.d.ts +5 -0
  178. package/dist/react/features/sessions/intake-heuristic.js +28 -0
  179. package/dist/react/features/sessions/interjection-routes.d.ts +13 -0
  180. package/dist/react/features/sessions/interjection-routes.js +72 -0
  181. package/dist/react/features/sessions/llm-models.d.ts +128 -0
  182. package/dist/react/features/sessions/llm-models.js +174 -0
  183. package/dist/react/features/sessions/media-strip.d.ts +25 -0
  184. package/dist/react/features/sessions/media-strip.js +56 -0
  185. package/dist/react/features/sessions/media.d.ts +43 -0
  186. package/dist/react/features/sessions/media.js +115 -0
  187. package/dist/react/features/sessions/model-search.d.ts +6 -0
  188. package/dist/react/features/sessions/model-search.js +16 -0
  189. package/dist/react/features/sessions/model-switcher.d.ts +16 -0
  190. package/dist/react/features/sessions/model-switcher.js +262 -0
  191. package/dist/react/features/sessions/open-pull-request.d.ts +20 -0
  192. package/dist/react/features/sessions/open-pull-request.js +92 -0
  193. package/dist/react/features/sessions/pull-publish-card.d.ts +14 -0
  194. package/dist/react/features/sessions/pull-publish-card.js +88 -0
  195. package/dist/react/features/sessions/recent-sessions.d.ts +11 -0
  196. package/dist/react/features/sessions/recent-sessions.js +29 -0
  197. package/dist/react/features/sessions/seen-sessions.d.ts +16 -0
  198. package/dist/react/features/sessions/seen-sessions.js +108 -0
  199. package/dist/react/features/sessions/session-activity.d.ts +95 -0
  200. package/dist/react/features/sessions/session-activity.js +785 -0
  201. package/dist/react/features/sessions/session-context.d.ts +8 -0
  202. package/dist/react/features/sessions/session-context.js +98 -0
  203. package/dist/react/features/sessions/session-feed.d.ts +243 -0
  204. package/dist/react/features/sessions/session-feed.js +883 -0
  205. package/dist/react/features/sessions/session-header.d.ts +24 -0
  206. package/dist/react/features/sessions/session-header.js +97 -0
  207. package/dist/react/features/sessions/session-layout.d.ts +7 -0
  208. package/dist/react/features/sessions/session-layout.js +87 -0
  209. package/dist/react/features/sessions/session-panes.d.ts +49 -0
  210. package/dist/react/features/sessions/session-panes.js +142 -0
  211. package/dist/react/features/sessions/session-parts.d.ts +35 -0
  212. package/dist/react/features/sessions/session-parts.js +74 -0
  213. package/dist/react/features/sessions/session-place.d.ts +9 -0
  214. package/dist/react/features/sessions/session-place.js +109 -0
  215. package/dist/react/features/sessions/session-pr-pills.d.ts +7 -0
  216. package/dist/react/features/sessions/session-pr-pills.js +28 -0
  217. package/dist/react/features/sessions/session-queries.d.ts +172 -0
  218. package/dist/react/features/sessions/session-queries.js +90 -0
  219. package/dist/react/features/sessions/session-repos.d.ts +8 -0
  220. package/dist/react/features/sessions/session-repos.js +15 -0
  221. package/dist/react/features/sessions/session-share.d.ts +8 -0
  222. package/dist/react/features/sessions/session-share.js +112 -0
  223. package/dist/react/features/sessions/session-tabs.d.ts +38 -0
  224. package/dist/react/features/sessions/session-tabs.js +191 -0
  225. package/dist/react/features/sessions/session.d.ts +103 -0
  226. package/dist/react/features/sessions/session.js +216 -0
  227. package/dist/react/features/sessions/signals.d.ts +13 -0
  228. package/dist/react/features/sessions/signals.js +34 -0
  229. package/dist/react/features/sessions/tab-set.d.ts +20 -0
  230. package/dist/react/features/sessions/tab-set.js +58 -0
  231. package/dist/react/features/sessions/team.d.ts +16 -0
  232. package/dist/react/features/sessions/team.js +35 -0
  233. package/dist/react/features/sessions/timeline.d.ts +53 -0
  234. package/dist/react/features/sessions/timeline.js +153 -0
  235. package/dist/react/features/sessions/use-session-tabs.d.ts +18 -0
  236. package/dist/react/features/sessions/use-session-tabs.js +119 -0
  237. package/dist/react/features/sessions/vendor-models.d.ts +23 -0
  238. package/dist/react/features/sessions/vendor-models.js +61 -0
  239. package/dist/react/features/workspace/activity-dot.d.ts +15 -0
  240. package/dist/react/features/workspace/activity-dot.js +36 -0
  241. package/dist/react/features/workspace/app-sidebar.d.ts +16 -0
  242. package/dist/react/features/workspace/app-sidebar.js +227 -0
  243. package/dist/react/features/workspace/fixture-toggle.d.ts +2 -0
  244. package/dist/react/features/workspace/fixture-toggle.js +72 -0
  245. package/dist/react/features/workspace/folder-group.d.ts +18 -0
  246. package/dist/react/features/workspace/folder-group.js +83 -0
  247. package/dist/react/features/workspace/inline-name-input.d.ts +10 -0
  248. package/dist/react/features/workspace/inline-name-input.js +33 -0
  249. package/dist/react/features/workspace/link-repo-dialog.d.ts +9 -0
  250. package/dist/react/features/workspace/link-repo-dialog.js +76 -0
  251. package/dist/react/features/workspace/repo-chip.d.ts +13 -0
  252. package/dist/react/features/workspace/repo-chip.js +15 -0
  253. package/dist/react/features/workspace/session-row.d.ts +20 -0
  254. package/dist/react/features/workspace/session-row.js +23 -0
  255. package/dist/react/features/workspace/use-debounced.d.ts +2 -0
  256. package/dist/react/features/workspace/use-debounced.js +10 -0
  257. package/dist/react/features/workspace/workspace-context.d.ts +45 -0
  258. package/dist/react/features/workspace/workspace-context.js +245 -0
  259. package/dist/react/features/workspace/workspace-fixtures.d.ts +16 -0
  260. package/dist/react/features/workspace/workspace-fixtures.js +175 -0
  261. package/dist/react/features/workspace/workspace-tree.d.ts +30 -0
  262. package/dist/react/features/workspace/workspace-tree.js +69 -0
  263. package/dist/react/features/workspace/workspace.d.ts +107 -0
  264. package/dist/react/features/workspace/workspace.js +458 -0
  265. package/dist/react/index.d.ts +33 -0
  266. package/dist/react/index.js +35 -0
  267. package/dist/react/lib/cn.d.ts +6 -0
  268. package/dist/react/lib/cn.js +20 -0
  269. package/dist/react/lib/initials.d.ts +6 -0
  270. package/dist/react/lib/initials.js +32 -0
  271. package/dist/react/lib/json.d.ts +33 -0
  272. package/dist/react/lib/json.js +101 -0
  273. package/dist/react/lib/time.d.ts +8 -0
  274. package/dist/react/lib/time.js +57 -0
  275. package/dist/react/lib/use-media-query.d.ts +1 -0
  276. package/dist/react/lib/use-media-query.js +9 -0
  277. package/dist/react/lib/use-now.d.ts +2 -0
  278. package/dist/react/lib/use-now.js +10 -0
  279. package/dist/react/lib/use-width-bucket.d.ts +6 -0
  280. package/dist/react/lib/use-width-bucket.js +28 -0
  281. package/dist/react/parts/index.d.ts +43 -0
  282. package/dist/react/parts/index.js +43 -0
  283. package/dist/react/shuttle/device.d.ts +42 -0
  284. package/dist/react/shuttle/device.js +10 -0
  285. package/dist/react/shuttle/host.d.ts +1126 -0
  286. package/dist/react/shuttle/host.js +93 -0
  287. package/dist/react/shuttle/identity.d.ts +31 -0
  288. package/dist/react/shuttle/identity.js +20 -0
  289. package/dist/react/shuttle/index.d.ts +14 -0
  290. package/dist/react/shuttle/index.js +13 -0
  291. package/dist/react/shuttle/provider.d.ts +41 -0
  292. package/dist/react/shuttle/provider.js +59 -0
  293. package/dist/react/shuttle/router.d.ts +43 -0
  294. package/dist/react/shuttle/router.js +1 -0
  295. package/dist/react/theme.css +456 -0
  296. package/dist/react/ui.d.ts +19 -0
  297. package/dist/react/ui.js +19 -0
  298. package/package.json +100 -4
@@ -0,0 +1,1126 @@
1
+ import type { ContractRouterClient } from '@orpc/contract';
2
+ import { clientContract } from '@swirls/shuttle/api';
3
+ import { type RunStoreOptions } from '@swirls/looms/react';
4
+ import type { ShuttleDevice } from './device.js';
5
+ /** What a single call may add to its request. */
6
+ export interface CallContext {
7
+ /**
8
+ * This machine's id, sent when a call is about the sandbox on this machine as well as the
9
+ * cloud. Only a host with a device has one.
10
+ */
11
+ readonly deviceId?: string | null;
12
+ }
13
+ /**
14
+ * The backend's API, typed from the contract in `@swirls/shuttle/api`. Call it directly for one-off
15
+ * requests: `await client.sessions.rename({ id, title })`.
16
+ *
17
+ * Everything on the contract is plain JSON (no dates, files or bigints), so what arrives is
18
+ * exactly what the schemas say and the types need no JSON conversion applied.
19
+ */
20
+ export type ShuttleClient = ContractRouterClient<typeof clientContract, CallContext>;
21
+ declare function queryUtils(client: ShuttleClient): {
22
+ auth: {
23
+ providers: import("@orpc/tanstack-query").ProcedureUtils<CallContext, unknown, {
24
+ emailAndPassword: boolean;
25
+ github: boolean;
26
+ signUpCode: boolean;
27
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
28
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
29
+ sessions: {
30
+ list: import("@orpc/tanstack-query").ProcedureUtils<CallContext, unknown, {
31
+ sessions: Record<string, unknown>[];
32
+ note?: string | undefined;
33
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
34
+ tree: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
35
+ id: string;
36
+ }, {
37
+ sessionId: string;
38
+ runs: Record<string, unknown>[];
39
+ note?: string | undefined;
40
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
41
+ id: string;
42
+ }>;
43
+ access: {
44
+ get: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
45
+ id: string;
46
+ }, {
47
+ ownerId: string | null;
48
+ memberIds: readonly string[];
49
+ visibility: "private" | "public";
50
+ canShare: boolean;
51
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
52
+ id: string;
53
+ }>;
54
+ update: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
55
+ id: string;
56
+ memberIds?: string[] | undefined;
57
+ visibility?: "private" | "public" | undefined;
58
+ }, {
59
+ ownerId: string | null;
60
+ memberIds: readonly string[];
61
+ visibility: "private" | "public";
62
+ canShare: boolean;
63
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
64
+ id: string;
65
+ memberIds?: string[] | undefined;
66
+ visibility?: "private" | "public" | undefined;
67
+ }>;
68
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
69
+ say: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
70
+ id: string;
71
+ messageId: string;
72
+ text?: string | undefined;
73
+ forceKind?: "constraint" | "correction" | "idea" | "question" | "stop" | "task" | undefined;
74
+ targetThreadId?: string | undefined;
75
+ attachments?: string[] | undefined;
76
+ }, {
77
+ messageId: string;
78
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
79
+ id: string;
80
+ messageId: string;
81
+ text?: string | undefined;
82
+ forceKind?: "constraint" | "correction" | "idea" | "question" | "stop" | "task" | undefined;
83
+ targetThreadId?: string | undefined;
84
+ attachments?: string[] | undefined;
85
+ }>;
86
+ pullRequest: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
87
+ id: string;
88
+ title?: string | undefined;
89
+ body?: string | undefined;
90
+ draft?: boolean | undefined;
91
+ repo?: string | undefined;
92
+ }, {
93
+ approvalId: string;
94
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
95
+ id: string;
96
+ title?: string | undefined;
97
+ body?: string | undefined;
98
+ draft?: boolean | undefined;
99
+ repo?: string | undefined;
100
+ }>;
101
+ rename: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
102
+ id: string;
103
+ title: string;
104
+ }, {
105
+ runId: string;
106
+ title: string;
107
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
108
+ id: string;
109
+ title: string;
110
+ }>;
111
+ archive: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
112
+ id: string;
113
+ }, {
114
+ runId: string;
115
+ archived: true;
116
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
117
+ id: string;
118
+ }>;
119
+ stop: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
120
+ id: string;
121
+ threadId: string;
122
+ }, {
123
+ ok: true;
124
+ threadId: string;
125
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
126
+ id: string;
127
+ threadId: string;
128
+ }>;
129
+ stopThread: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
130
+ id: string;
131
+ threadId: string;
132
+ }, {
133
+ ok: true;
134
+ threadId: string;
135
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
136
+ id: string;
137
+ threadId: string;
138
+ }>;
139
+ llmModel: {
140
+ get: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
141
+ id: string;
142
+ }, {
143
+ model: string;
144
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
145
+ id: string;
146
+ }>;
147
+ set: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
148
+ id: string;
149
+ model: string;
150
+ }, {
151
+ model: string;
152
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
153
+ id: string;
154
+ model: string;
155
+ }>;
156
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
157
+ harness: {
158
+ get: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
159
+ id: string;
160
+ }, {
161
+ harness: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}`;
162
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
163
+ id: string;
164
+ }>;
165
+ set: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
166
+ id: string;
167
+ harness: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}`;
168
+ }, {
169
+ harness: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}`;
170
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
171
+ id: string;
172
+ harness: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}`;
173
+ }>;
174
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
175
+ team: {
176
+ get: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
177
+ id: string;
178
+ }, {
179
+ team: {
180
+ workers: boolean;
181
+ codex: boolean;
182
+ claudeCode: boolean;
183
+ cursor: boolean;
184
+ preset: "claude-builds-codex-reviews" | "claude-plans-codex-implements" | "codex-builds-claude-reviews" | "none";
185
+ };
186
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
187
+ id: string;
188
+ }>;
189
+ set: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
190
+ id: string;
191
+ team: {
192
+ workers: boolean;
193
+ codex: boolean;
194
+ claudeCode: boolean;
195
+ cursor: boolean;
196
+ preset: "claude-builds-codex-reviews" | "claude-plans-codex-implements" | "codex-builds-claude-reviews" | "none";
197
+ };
198
+ }, {
199
+ team: {
200
+ workers: boolean;
201
+ codex: boolean;
202
+ claudeCode: boolean;
203
+ cursor: boolean;
204
+ preset: "claude-builds-codex-reviews" | "claude-plans-codex-implements" | "codex-builds-claude-reviews" | "none";
205
+ };
206
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
207
+ id: string;
208
+ team: {
209
+ workers: boolean;
210
+ codex: boolean;
211
+ claudeCode: boolean;
212
+ cursor: boolean;
213
+ preset: "claude-builds-codex-reviews" | "claude-plans-codex-implements" | "codex-builds-claude-reviews" | "none";
214
+ };
215
+ }>;
216
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
217
+ vendorModels: {
218
+ get: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
219
+ id: string;
220
+ }, {
221
+ choices: Partial<Record<string, {
222
+ model?: string | undefined;
223
+ effort?: string | undefined;
224
+ }>>;
225
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
226
+ id: string;
227
+ }>;
228
+ set: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
229
+ id: string;
230
+ model?: string | undefined;
231
+ effort?: string | undefined;
232
+ harness: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}`;
233
+ }, {
234
+ choices: Partial<Record<string, {
235
+ model?: string | undefined;
236
+ effort?: string | undefined;
237
+ }>>;
238
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
239
+ id: string;
240
+ model?: string | undefined;
241
+ effort?: string | undefined;
242
+ harness: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}`;
243
+ }>;
244
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
245
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
246
+ playbook: {
247
+ get: import("@orpc/tanstack-query").ProcedureUtils<CallContext, unknown, {
248
+ runId: string;
249
+ playbook: {
250
+ version: number;
251
+ lessons: {
252
+ id: string;
253
+ text: string;
254
+ scope: string;
255
+ evidence: {
256
+ runId: string;
257
+ seq: number;
258
+ }[];
259
+ sourceRunId: string;
260
+ }[];
261
+ proposed?: Record<string, {
262
+ text: string;
263
+ scope: string;
264
+ evidence: {
265
+ runId: string;
266
+ seq: number;
267
+ }[];
268
+ sourceRunId: string;
269
+ }> | undefined;
270
+ };
271
+ note?: string | undefined;
272
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
273
+ ensure: import("@orpc/tanstack-query").ProcedureUtils<CallContext, unknown, {
274
+ runId: string;
275
+ created: boolean;
276
+ status?: string | undefined;
277
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
278
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
279
+ connections: {
280
+ list: import("@orpc/tanstack-query").ProcedureUtils<CallContext, unknown, {
281
+ machine: boolean;
282
+ defaultHarness: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}`;
283
+ defaultTeam: {
284
+ workers: boolean;
285
+ codex: boolean;
286
+ claudeCode: boolean;
287
+ cursor: boolean;
288
+ preset: "claude-builds-codex-reviews" | "claude-plans-codex-implements" | "codex-builds-claude-reviews" | "none";
289
+ };
290
+ mode: "container" | "memory";
291
+ canStore: boolean;
292
+ connections: readonly {
293
+ harness: "claude-code" | "codex" | "cursor";
294
+ label: string;
295
+ connected: boolean;
296
+ cloud: boolean;
297
+ local: boolean | null;
298
+ updatedAt: number | null;
299
+ }[];
300
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
301
+ setDefault: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
302
+ harness?: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}` | undefined;
303
+ team?: {
304
+ workers: boolean;
305
+ codex: boolean;
306
+ claudeCode: boolean;
307
+ cursor: boolean;
308
+ preset: "claude-builds-codex-reviews" | "claude-plans-codex-implements" | "codex-builds-claude-reviews" | "none";
309
+ } | undefined;
310
+ }, {
311
+ defaultHarness: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}`;
312
+ defaultTeam: {
313
+ workers: boolean;
314
+ codex: boolean;
315
+ claudeCode: boolean;
316
+ cursor: boolean;
317
+ preset: "claude-builds-codex-reviews" | "claude-plans-codex-implements" | "codex-builds-claude-reviews" | "none";
318
+ };
319
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
320
+ harness?: "claude-code" | "codex" | "cursor" | "shuttle" | `acp:${string}` | undefined;
321
+ team?: {
322
+ workers: boolean;
323
+ codex: boolean;
324
+ claudeCode: boolean;
325
+ cursor: boolean;
326
+ preset: "claude-builds-codex-reviews" | "claude-plans-codex-implements" | "codex-builds-claude-reviews" | "none";
327
+ } | undefined;
328
+ }>;
329
+ disconnect: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
330
+ harness: string;
331
+ }, {
332
+ removed: boolean;
333
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
334
+ harness: string;
335
+ }>;
336
+ models: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
337
+ harness: string;
338
+ }, {
339
+ harness: "claude-code" | "codex" | "cursor" | `acp:${string}`;
340
+ models: readonly {
341
+ id: string;
342
+ label: string;
343
+ description: string;
344
+ efforts: readonly string[];
345
+ defaultEffort?: string | undefined;
346
+ isDefault?: boolean | undefined;
347
+ }[];
348
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
349
+ harness: string;
350
+ }>;
351
+ login: {
352
+ start: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
353
+ harness: string;
354
+ }, {
355
+ loginId: string;
356
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
357
+ harness: string;
358
+ }>;
359
+ follow: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
360
+ harness: string;
361
+ loginId: string;
362
+ offset?: unknown;
363
+ }, {
364
+ events: ({
365
+ seq: number;
366
+ at: number;
367
+ type: "login_prompt";
368
+ url: string;
369
+ code: string;
370
+ needsCode?: boolean | undefined;
371
+ } | {
372
+ seq: number;
373
+ at: number;
374
+ type: "login_done";
375
+ success: boolean;
376
+ error?: string | undefined;
377
+ })[];
378
+ offset: number;
379
+ done: boolean;
380
+ connected: boolean;
381
+ error?: string | undefined;
382
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
383
+ harness: string;
384
+ loginId: string;
385
+ offset?: unknown;
386
+ }>;
387
+ sendCode: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
388
+ harness: string;
389
+ loginId: string;
390
+ code: string;
391
+ }, {
392
+ ok: true;
393
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
394
+ harness: string;
395
+ loginId: string;
396
+ code: string;
397
+ }>;
398
+ cancel: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
399
+ harness: string;
400
+ loginId: string;
401
+ }, {
402
+ ok: true;
403
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
404
+ harness: string;
405
+ loginId: string;
406
+ }>;
407
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
408
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
409
+ workspace: {
410
+ get: import("@orpc/tanstack-query").ProcedureUtils<CallContext, unknown, {
411
+ runId: string;
412
+ tail: number;
413
+ tree: {
414
+ folderOrder: readonly string[];
415
+ folders: Readonly<Record<string, {
416
+ folderId: string;
417
+ name: string;
418
+ createdAt: number;
419
+ archived: boolean;
420
+ repos: readonly {
421
+ installationId: number;
422
+ owner: string;
423
+ name: string;
424
+ fullName: string;
425
+ defaultBranch: string;
426
+ private: boolean;
427
+ }[];
428
+ autoReview?: "all" | "off" | "others" | undefined;
429
+ }>>;
430
+ sessions: Readonly<Record<string, {
431
+ runId: string;
432
+ folderId: string;
433
+ title: string;
434
+ goal: string;
435
+ status: string;
436
+ activity: string;
437
+ activitySeq?: number | undefined;
438
+ activityAt?: number | undefined;
439
+ lastCompletedAt?: number | undefined;
440
+ createdAt: number;
441
+ updatedAt: number;
442
+ archived: boolean;
443
+ ownerId?: string | null | undefined;
444
+ memberIds?: readonly string[] | undefined;
445
+ }>>;
446
+ installations: Readonly<Record<string, {
447
+ installationId: number;
448
+ account: {
449
+ login: string;
450
+ type: string;
451
+ avatarUrl: string;
452
+ };
453
+ }>>;
454
+ } | null;
455
+ tabs: Readonly<Record<string, {
456
+ order: readonly string[];
457
+ tabs: Readonly<Record<string, {
458
+ tabId: string;
459
+ kind: "browser" | "changes" | "events" | "file" | "files" | "media" | "review" | "terminal" | `${string}:${string}`;
460
+ title: string;
461
+ target: string;
462
+ openedAt: number;
463
+ }>>;
464
+ }>> | null;
465
+ personal: {
466
+ runId: string;
467
+ tail: number;
468
+ tree: {
469
+ folderOrder: readonly string[];
470
+ folders: Readonly<Record<string, {
471
+ folderId: string;
472
+ name: string;
473
+ createdAt: number;
474
+ archived: boolean;
475
+ repos: readonly {
476
+ installationId: number;
477
+ owner: string;
478
+ name: string;
479
+ fullName: string;
480
+ defaultBranch: string;
481
+ private: boolean;
482
+ }[];
483
+ autoReview?: "all" | "off" | "others" | undefined;
484
+ }>>;
485
+ sessions: Readonly<Record<string, {
486
+ runId: string;
487
+ folderId: string;
488
+ title: string;
489
+ goal: string;
490
+ status: string;
491
+ activity: string;
492
+ activitySeq?: number | undefined;
493
+ activityAt?: number | undefined;
494
+ lastCompletedAt?: number | undefined;
495
+ createdAt: number;
496
+ updatedAt: number;
497
+ archived: boolean;
498
+ ownerId?: string | null | undefined;
499
+ memberIds?: readonly string[] | undefined;
500
+ }>>;
501
+ installations: Readonly<Record<string, {
502
+ installationId: number;
503
+ account: {
504
+ login: string;
505
+ type: string;
506
+ avatarUrl: string;
507
+ };
508
+ }>>;
509
+ } | null;
510
+ tabs: Readonly<Record<string, {
511
+ order: readonly string[];
512
+ tabs: Readonly<Record<string, {
513
+ tabId: string;
514
+ kind: "browser" | "changes" | "events" | "file" | "files" | "media" | "review" | "terminal" | `${string}:${string}`;
515
+ title: string;
516
+ target: string;
517
+ openedAt: number;
518
+ }>>;
519
+ }>> | null;
520
+ };
521
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
522
+ createSession: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
523
+ folderId: string;
524
+ goal: string;
525
+ deviceId?: string | null | undefined;
526
+ }, {
527
+ runId: string;
528
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
529
+ folderId: string;
530
+ goal: string;
531
+ deviceId?: string | null | undefined;
532
+ }>;
533
+ repos: {
534
+ link: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
535
+ folderId: string;
536
+ installationId: string | number;
537
+ owner: string;
538
+ name: string;
539
+ }, {
540
+ folderId: string;
541
+ repo: {
542
+ installationId: number;
543
+ owner: string;
544
+ name: string;
545
+ fullName: string;
546
+ defaultBranch: string;
547
+ private: boolean;
548
+ };
549
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
550
+ folderId: string;
551
+ installationId: string | number;
552
+ owner: string;
553
+ name: string;
554
+ }>;
555
+ unlink: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
556
+ folderId: string;
557
+ fullName: string;
558
+ }, {
559
+ folderId: string;
560
+ fullName: string;
561
+ unlinked: true;
562
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
563
+ folderId: string;
564
+ fullName: string;
565
+ }>;
566
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
567
+ pulls: {
568
+ sync: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
569
+ folderId: string;
570
+ }, {
571
+ folderId: string;
572
+ upserted: number;
573
+ repos: readonly {
574
+ fullName: string;
575
+ status: "failed" | "forbidden" | "ok";
576
+ open: number;
577
+ synced: number;
578
+ checksHidden: boolean;
579
+ message: string | null;
580
+ }[];
581
+ installations: readonly {
582
+ installationId: number;
583
+ account: string;
584
+ missingPermissions: readonly string[];
585
+ settingsUrl: string;
586
+ }[];
587
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
588
+ folderId: string;
589
+ }>;
590
+ syncThreads: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
591
+ folderId: string;
592
+ fullName: string;
593
+ number: string | number;
594
+ }, {
595
+ threads: number;
596
+ changed: boolean;
597
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
598
+ folderId: string;
599
+ fullName: string;
600
+ number: string | number;
601
+ }>;
602
+ comment: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
603
+ folderId: string;
604
+ fullName: string;
605
+ number: string | number;
606
+ body?: string | undefined;
607
+ rootId?: number | undefined;
608
+ path?: string | undefined;
609
+ line?: number | undefined;
610
+ side?: "LEFT" | "RIGHT" | undefined;
611
+ startLine?: number | undefined;
612
+ startSide?: "LEFT" | "RIGHT" | undefined;
613
+ }, {
614
+ ok: true;
615
+ commentId: number;
616
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
617
+ folderId: string;
618
+ fullName: string;
619
+ number: string | number;
620
+ body?: string | undefined;
621
+ rootId?: number | undefined;
622
+ path?: string | undefined;
623
+ line?: number | undefined;
624
+ side?: "LEFT" | "RIGHT" | undefined;
625
+ startLine?: number | undefined;
626
+ startSide?: "LEFT" | "RIGHT" | undefined;
627
+ }>;
628
+ resolveThread: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
629
+ folderId: string;
630
+ fullName: string;
631
+ number: string | number;
632
+ rootId: string | number;
633
+ resolved?: boolean | undefined;
634
+ }, {
635
+ ok: true;
636
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
637
+ folderId: string;
638
+ fullName: string;
639
+ number: string | number;
640
+ rootId: string | number;
641
+ resolved?: boolean | undefined;
642
+ }>;
643
+ review: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
644
+ folderId: string;
645
+ fullName: string;
646
+ number: string | number;
647
+ headSha: string;
648
+ baseSha?: string | undefined;
649
+ title?: string | undefined;
650
+ }, {
651
+ runId: string;
652
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
653
+ folderId: string;
654
+ fullName: string;
655
+ number: string | number;
656
+ headSha: string;
657
+ baseSha?: string | undefined;
658
+ title?: string | undefined;
659
+ }>;
660
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
661
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
662
+ sandbox: {
663
+ files: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
664
+ id: string;
665
+ }, {
666
+ source: "asleep" | "sandbox" | "saved";
667
+ savedAt?: number | null | undefined;
668
+ root: string;
669
+ files: {
670
+ path: string;
671
+ kind: "dir" | "file";
672
+ }[];
673
+ mode: "container" | "memory";
674
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
675
+ id: string;
676
+ }>;
677
+ file: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
678
+ id: string;
679
+ path: string;
680
+ version?: "base" | undefined;
681
+ }, {
682
+ source: "asleep" | "sandbox" | "saved";
683
+ savedAt?: number | null | undefined;
684
+ path: string;
685
+ content: string | null;
686
+ binary?: boolean | undefined;
687
+ truncated?: boolean | undefined;
688
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
689
+ id: string;
690
+ path: string;
691
+ version?: "base" | undefined;
692
+ }>;
693
+ diff: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
694
+ id: string;
695
+ path?: string | undefined;
696
+ }, {
697
+ source: "asleep" | "sandbox" | "saved";
698
+ savedAt?: number | null | undefined;
699
+ path: string | null;
700
+ diff: string;
701
+ } | {
702
+ source: "asleep" | "sandbox" | "saved";
703
+ savedAt?: number | null | undefined;
704
+ diffs: {
705
+ cwd: string;
706
+ name: string;
707
+ diff: string;
708
+ }[];
709
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
710
+ id: string;
711
+ path?: string | undefined;
712
+ }>;
713
+ workspace: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
714
+ id: string;
715
+ }, {
716
+ source: "asleep" | "sandbox" | "saved";
717
+ savedAt?: number | null | undefined;
718
+ working?: boolean | undefined;
719
+ holderId: string | null;
720
+ repos: readonly {
721
+ name: string;
722
+ fullName: string | null;
723
+ defaultBranch: string;
724
+ files: readonly string[];
725
+ changes: readonly {
726
+ path: string;
727
+ status: "A" | "D" | "M";
728
+ }[];
729
+ }[];
730
+ strays: readonly {
731
+ path: string;
732
+ files: number;
733
+ }[];
734
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
735
+ id: string;
736
+ }>;
737
+ write: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
738
+ id: string;
739
+ path: string;
740
+ content: string;
741
+ expected?: string | undefined;
742
+ }, {
743
+ ok: true;
744
+ path: string;
745
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
746
+ id: string;
747
+ path: string;
748
+ content: string;
749
+ expected?: string | undefined;
750
+ }>;
751
+ adopt: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
752
+ id: string;
753
+ path: string;
754
+ }, {
755
+ ok: true;
756
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
757
+ id: string;
758
+ path: string;
759
+ }>;
760
+ diagnostics: {
761
+ saved: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
762
+ id: string;
763
+ path: string;
764
+ }, {
765
+ status: "ok";
766
+ server: string;
767
+ diagnostics: readonly {
768
+ line: number;
769
+ column: number;
770
+ endLine: number;
771
+ endColumn: number;
772
+ severity: "error" | "hint" | "info" | "warning";
773
+ message: string;
774
+ code?: string | undefined;
775
+ source?: string | undefined;
776
+ }[];
777
+ } | {
778
+ status: "pending";
779
+ server?: string | undefined;
780
+ } | {
781
+ status: "error" | "unavailable" | "unsupported";
782
+ reason?: string | undefined;
783
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
784
+ id: string;
785
+ path: string;
786
+ }>;
787
+ draft: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
788
+ params: {
789
+ id: string;
790
+ };
791
+ query: {
792
+ path: string;
793
+ };
794
+ body: {
795
+ content: string;
796
+ };
797
+ }, {
798
+ status: "ok";
799
+ server: string;
800
+ diagnostics: readonly {
801
+ line: number;
802
+ column: number;
803
+ endLine: number;
804
+ endColumn: number;
805
+ severity: "error" | "hint" | "info" | "warning";
806
+ message: string;
807
+ code?: string | undefined;
808
+ source?: string | undefined;
809
+ }[];
810
+ } | {
811
+ status: "pending";
812
+ server?: string | undefined;
813
+ } | {
814
+ status: "error" | "unavailable" | "unsupported";
815
+ reason?: string | undefined;
816
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
817
+ params: {
818
+ id: string;
819
+ };
820
+ query: {
821
+ path: string;
822
+ };
823
+ body: {
824
+ content: string;
825
+ };
826
+ }>;
827
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
828
+ place: {
829
+ get: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
830
+ id: string;
831
+ }, {
832
+ pending: "cloud" | "local" | null;
833
+ leftBehind: {
834
+ deviceId: string | null;
835
+ at: number;
836
+ } | null;
837
+ personal: boolean;
838
+ holderId: string | null;
839
+ here: boolean;
840
+ sandbox: {
841
+ online?: boolean | undefined;
842
+ device?: {
843
+ id: string;
844
+ name: string;
845
+ platform: string;
846
+ } | undefined;
847
+ backend?: {
848
+ id: string;
849
+ label: string;
850
+ isolation: string;
851
+ } | undefined;
852
+ provider: string;
853
+ location: "cloud" | "local";
854
+ deviceId?: string | null | undefined;
855
+ };
856
+ local: {
857
+ deviceId: string;
858
+ mine: boolean;
859
+ } | null;
860
+ cloud: {
861
+ provider: string;
862
+ movable: boolean;
863
+ };
864
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
865
+ id: string;
866
+ }>;
867
+ move: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
868
+ id: string;
869
+ to: "local";
870
+ deviceId: string;
871
+ } | {
872
+ id: string;
873
+ to: "cloud";
874
+ }, {
875
+ pending: "cloud" | "local" | null;
876
+ leftBehind: {
877
+ deviceId: string | null;
878
+ at: number;
879
+ } | null;
880
+ personal: boolean;
881
+ holderId: string | null;
882
+ here: boolean;
883
+ sandbox: {
884
+ online?: boolean | undefined;
885
+ device?: {
886
+ id: string;
887
+ name: string;
888
+ platform: string;
889
+ } | undefined;
890
+ backend?: {
891
+ id: string;
892
+ label: string;
893
+ isolation: string;
894
+ } | undefined;
895
+ provider: string;
896
+ location: "cloud" | "local";
897
+ deviceId?: string | null | undefined;
898
+ };
899
+ local: {
900
+ deviceId: string;
901
+ mine: boolean;
902
+ } | null;
903
+ cloud: {
904
+ provider: string;
905
+ movable: boolean;
906
+ };
907
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
908
+ id: string;
909
+ to: "local";
910
+ deviceId: string;
911
+ } | {
912
+ id: string;
913
+ to: "cloud";
914
+ }>;
915
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
916
+ preview: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
917
+ id: string;
918
+ }, {
919
+ label: string;
920
+ host?: string | undefined;
921
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
922
+ id: string;
923
+ }>;
924
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
925
+ github: {
926
+ repos: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
927
+ q?: string | undefined;
928
+ }, {
929
+ repos: {
930
+ installationId: number;
931
+ owner: string;
932
+ name: string;
933
+ fullName: string;
934
+ defaultBranch: string;
935
+ private: boolean;
936
+ }[];
937
+ note?: string | undefined;
938
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
939
+ q?: string | undefined;
940
+ }>;
941
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
942
+ runners: {
943
+ list: import("@orpc/tanstack-query").ProcedureUtils<CallContext, unknown, {
944
+ devices: {
945
+ online: boolean;
946
+ device?: {
947
+ id: string;
948
+ name: string;
949
+ platform: string;
950
+ } | undefined;
951
+ backend?: {
952
+ id: string;
953
+ label: string;
954
+ isolation: string;
955
+ } | undefined;
956
+ deviceId: string;
957
+ name: string;
958
+ platform: string;
959
+ createdAt: number;
960
+ }[];
961
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
962
+ register: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
963
+ deviceId: string;
964
+ name?: string | undefined;
965
+ platform?: string | undefined;
966
+ }, {
967
+ token: string;
968
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
969
+ deviceId: string;
970
+ name?: string | undefined;
971
+ platform?: string | undefined;
972
+ }>;
973
+ get: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
974
+ deviceId: string;
975
+ }, {
976
+ online: boolean;
977
+ device?: {
978
+ id: string;
979
+ name: string;
980
+ platform: string;
981
+ } | undefined;
982
+ backend?: {
983
+ id: string;
984
+ label: string;
985
+ isolation: string;
986
+ } | undefined;
987
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
988
+ deviceId: string;
989
+ }>;
990
+ remove: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
991
+ deviceId: string;
992
+ }, {
993
+ removed: boolean;
994
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<{
995
+ deviceId: string;
996
+ }>;
997
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
998
+ timings: {
999
+ report: import("@orpc/tanstack-query").ProcedureUtils<CallContext, {
1000
+ timings?: {
1001
+ type: string;
1002
+ durationMs?: number | undefined;
1003
+ eventCount?: number | undefined;
1004
+ cachedEvents?: number | undefined;
1005
+ runId?: string | undefined;
1006
+ status?: string | undefined;
1007
+ route?: string | undefined;
1008
+ message?: string | undefined;
1009
+ optimistic?: boolean | undefined;
1010
+ }[] | undefined;
1011
+ }, unknown, Error> & import("@orpc/tanstack-query").GeneralUtils<{
1012
+ timings?: {
1013
+ type: string;
1014
+ durationMs?: number | undefined;
1015
+ eventCount?: number | undefined;
1016
+ cachedEvents?: number | undefined;
1017
+ runId?: string | undefined;
1018
+ status?: string | undefined;
1019
+ route?: string | undefined;
1020
+ message?: string | undefined;
1021
+ optimistic?: boolean | undefined;
1022
+ }[] | undefined;
1023
+ }>;
1024
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
1025
+ tenant: {
1026
+ me: import("@orpc/tanstack-query").ProcedureUtils<CallContext, unknown, {
1027
+ user: {
1028
+ id: string;
1029
+ name: string;
1030
+ email: string;
1031
+ };
1032
+ org: {
1033
+ id: string;
1034
+ role: "admin" | "member" | "owner";
1035
+ };
1036
+ runs: {
1037
+ workspace: string;
1038
+ personal: string;
1039
+ pulls: string;
1040
+ playbook: string;
1041
+ };
1042
+ }, Error> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
1043
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
1044
+ } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
1045
+ /**
1046
+ * The same API as TanStack Query options:
1047
+ * `api.sessions.team.get.queryOptions({ input: { id } })`, `api.sessions.rename.mutationOptions()`.
1048
+ */
1049
+ export type ShuttleApi = ReturnType<typeof queryUtils>;
1050
+ /** `fetch`, as far as Shuttle uses it. */
1051
+ export type ShuttleFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
1052
+ export interface ShuttleHostOptions {
1053
+ /**
1054
+ * Where the Shuttle backend is, such as `https://build.example.com`. Left out, it is the
1055
+ * page's own origin.
1056
+ */
1057
+ readonly baseUrl?: string;
1058
+ /** Makes every HTTP request, so a host can add its own credentials. Defaults to `fetch`. */
1059
+ readonly fetch?: ShuttleFetch;
1060
+ /** The machine this is running on, when it has one. */
1061
+ readonly device?: ShuttleDevice | null;
1062
+ /**
1063
+ * The port sandbox previews are served on, when it is not the backend's own: a development
1064
+ * server that passes the API on to the backend does not pass on a preview's subdomain.
1065
+ */
1066
+ readonly previewPort?: string | number;
1067
+ /**
1068
+ * Offers made-up workspaces in place of the real one, for looking at how the parts cope with
1069
+ * the empty, the huge and the worst case. For development.
1070
+ */
1071
+ readonly fixtures?: boolean;
1072
+ /** Added to how a run's event store is opened: an observer, a different cache. */
1073
+ readonly runStore?: (userId: string) => Partial<RunStoreOptions>;
1074
+ }
1075
+ /**
1076
+ * Everything Shuttle's components need from where they are running that is not React: how to
1077
+ * reach the backend, and the machine they are on. One is made per backend, outside React, so
1078
+ * that code which runs before a page renders (a route loader) uses the same client, the same
1079
+ * query keys and the same run stores as the components that render after it.
1080
+ */
1081
+ export interface ShuttleHost {
1082
+ readonly client: ShuttleClient;
1083
+ readonly api: ShuttleApi;
1084
+ readonly device: ShuttleDevice | null;
1085
+ readonly fetch: ShuttleFetch;
1086
+ /** The port sandbox previews are served on, or null when it is the backend's own. */
1087
+ readonly previewPort: string | null;
1088
+ /** Whether made-up workspaces are offered in place of the real one. */
1089
+ readonly fixtures: boolean;
1090
+ /** The backend's origin, such as `https://app.example.com`. */
1091
+ origin(): string;
1092
+ /** The address of `path` (which starts with `/`) on the backend. */
1093
+ url(path: string): string;
1094
+ /** The same, for a WebSocket. */
1095
+ socketUrl(path: string): string;
1096
+ /**
1097
+ * What a call sends so the backend answers for this machine's sandbox as well as the cloud.
1098
+ * With no device, the call is about the cloud alone.
1099
+ */
1100
+ deviceContext(): CallContext;
1101
+ /**
1102
+ * Sends a named signal to a run. What the signal does is read back from the run's event
1103
+ * stream, not from the response.
1104
+ */
1105
+ signalRun(runId: string, name: string, input: object): Promise<void>;
1106
+ /**
1107
+ * How a run's event store is opened for the person signed in. The provider and anything that
1108
+ * preloads are given the same object, so a store opened ahead of a page is the one it uses.
1109
+ */
1110
+ runStoreOptions(userId: string): RunStoreOptions;
1111
+ /**
1112
+ * Resolves once the run's log has been read as far as it went when asked, so a page drawn
1113
+ * from it arrives whole. After a few seconds it goes ahead regardless. Never rejects.
1114
+ */
1115
+ whenRunSynced(runId: string, userId: string): Promise<void>;
1116
+ }
1117
+ /** A run refused a signal. `status` is the HTTP status it answered with. */
1118
+ export declare class SignalError extends Error {
1119
+ readonly status: number;
1120
+ constructor(message: string, status: number);
1121
+ }
1122
+ /** The HTTP status a failed call came back with, when it reached the backend at all. */
1123
+ export declare function statusOf(cause: unknown): number | undefined;
1124
+ export declare function isSignedOut(cause: unknown): boolean;
1125
+ export declare function createShuttleHost(options?: ShuttleHostOptions): ShuttleHost;
1126
+ export {};