@openagt/dashboard 0.10.0 → 0.12.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 (193) hide show
  1. package/README.md +1 -6
  2. package/dist/built-in.d.ts +18 -2
  3. package/dist/built-in.d.ts.map +1 -1
  4. package/dist/built-in.js +29 -6
  5. package/dist/built-in.js.map +1 -1
  6. package/dist/cli.d.ts +4 -10
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +11 -67
  9. package/dist/cli.js.map +1 -1
  10. package/dist/client.d.ts +2 -1
  11. package/dist/client.d.ts.map +1 -1
  12. package/dist/client.js +3 -4
  13. package/dist/client.js.map +1 -1
  14. package/dist/clone-project.d.ts +69 -0
  15. package/dist/clone-project.d.ts.map +1 -0
  16. package/dist/clone-project.js +124 -0
  17. package/dist/clone-project.js.map +1 -0
  18. package/dist/daemon-runtime.d.ts +12 -12
  19. package/dist/daemon-runtime.d.ts.map +1 -1
  20. package/dist/daemon-runtime.js +96 -35
  21. package/dist/daemon-runtime.js.map +1 -1
  22. package/dist/daemon.d.ts +3 -14
  23. package/dist/daemon.d.ts.map +1 -1
  24. package/dist/daemon.js +15 -26
  25. package/dist/daemon.js.map +1 -1
  26. package/dist/dashboard/bridge-endpoints.d.ts +5 -5
  27. package/dist/dashboard/bridge-endpoints.js +5 -5
  28. package/dist/dashboard/http.d.ts +1 -1
  29. package/dist/dashboard/http.js +1 -1
  30. package/dist/dashboard/machine-call.d.ts +10 -0
  31. package/dist/dashboard/machine-call.d.ts.map +1 -0
  32. package/dist/dashboard/machine-call.js +86 -0
  33. package/dist/dashboard/machine-call.js.map +1 -0
  34. package/dist/dashboard/module-serve.d.ts +6 -0
  35. package/dist/dashboard/module-serve.d.ts.map +1 -1
  36. package/dist/dashboard/module-serve.js +24 -8
  37. package/dist/dashboard/module-serve.js.map +1 -1
  38. package/dist/dashboard/relay-endpoints.d.ts +26 -17
  39. package/dist/dashboard/relay-endpoints.d.ts.map +1 -1
  40. package/dist/dashboard/relay-endpoints.js +70 -27
  41. package/dist/dashboard/relay-endpoints.js.map +1 -1
  42. package/dist/dashboard/remote-run.d.ts +77 -32
  43. package/dist/dashboard/remote-run.d.ts.map +1 -1
  44. package/dist/dashboard/remote-run.js +120 -42
  45. package/dist/dashboard/remote-run.js.map +1 -1
  46. package/dist/dashboard/rpc-serve.d.ts +28 -25
  47. package/dist/dashboard/rpc-serve.d.ts.map +1 -1
  48. package/dist/dashboard/rpc-serve.js +26 -22
  49. package/dist/dashboard/rpc-serve.js.map +1 -1
  50. package/dist/dashboard/screen.d.ts +53 -0
  51. package/dist/dashboard/screen.d.ts.map +1 -0
  52. package/dist/dashboard/screen.js +175 -0
  53. package/dist/dashboard/screen.js.map +1 -0
  54. package/dist/dashboard/server.d.ts +18 -19
  55. package/dist/dashboard/server.d.ts.map +1 -1
  56. package/dist/dashboard/server.js +57 -84
  57. package/dist/dashboard/server.js.map +1 -1
  58. package/dist/dashboard/types.d.ts +11 -16
  59. package/dist/dashboard/types.d.ts.map +1 -1
  60. package/dist/dashboard/web-start-endpoints.d.ts +2 -2
  61. package/dist/dashboard/web-start-endpoints.js +1 -1
  62. package/dist/dashboard-bundle/assets/main-BHMlP40v.css +2 -0
  63. package/dist/dashboard-bundle/assets/main-D0qZC1r-.js +140 -0
  64. package/dist/dashboard-bundle/assets/{module-gKz-ZvkG.js → module-ZjyA5WUg.js} +4 -4
  65. package/dist/dashboard-bundle/host/module.js +1 -1
  66. package/dist/dashboard-bundle/index.html +3 -3
  67. package/dist/dashboard-rpc/context.d.ts +4 -4
  68. package/dist/dashboard-rpc/context.js +5 -5
  69. package/dist/dashboard-rpc/context.js.map +1 -1
  70. package/dist/dashboard-rpc/control.d.ts +1 -1
  71. package/dist/dashboard-rpc/control.js +7 -7
  72. package/dist/dashboard-rpc/control.js.map +1 -1
  73. package/dist/dashboard-rpc/events.d.ts +1 -1
  74. package/dist/dashboard-rpc/events.js +1 -1
  75. package/dist/dashboard-rpc/index.d.ts +3 -3
  76. package/dist/dashboard-rpc/index.d.ts.map +1 -1
  77. package/dist/dashboard-rpc/index.js +5 -5
  78. package/dist/dashboard-rpc/index.js.map +1 -1
  79. package/dist/dashboard-rpc/machines.d.ts +52 -0
  80. package/dist/dashboard-rpc/machines.d.ts.map +1 -0
  81. package/dist/dashboard-rpc/machines.js +82 -0
  82. package/dist/dashboard-rpc/machines.js.map +1 -0
  83. package/dist/dashboard-rpc/modules.d.ts +12 -4
  84. package/dist/dashboard-rpc/modules.d.ts.map +1 -1
  85. package/dist/dashboard-rpc/modules.js +24 -5
  86. package/dist/dashboard-rpc/modules.js.map +1 -1
  87. package/dist/dashboard-rpc/projects.d.ts +18 -0
  88. package/dist/dashboard-rpc/projects.d.ts.map +1 -1
  89. package/dist/dashboard-rpc/projects.js +27 -5
  90. package/dist/dashboard-rpc/projects.js.map +1 -1
  91. package/dist/dashboard-rpc/reads.d.ts +3 -4
  92. package/dist/dashboard-rpc/reads.d.ts.map +1 -1
  93. package/dist/dashboard-rpc/reads.js +5 -6
  94. package/dist/dashboard-rpc/reads.js.map +1 -1
  95. package/dist/dashboard-rpc/relay-agent.d.ts +3 -3
  96. package/dist/dashboard-rpc/relay-agent.js +3 -3
  97. package/dist/dashboard-rpc/relay-dispatch.d.ts +4 -4
  98. package/dist/dashboard-rpc/relay-dispatch.d.ts.map +1 -1
  99. package/dist/dashboard-rpc/relay-dispatch.js +7 -7
  100. package/dist/dashboard-rpc/relay-dispatch.js.map +1 -1
  101. package/dist/dashboard-rpc/test-context.js +1 -1
  102. package/dist/dashboard-rpc/test-context.js.map +1 -1
  103. package/dist/events.d.ts +4 -3
  104. package/dist/events.d.ts.map +1 -1
  105. package/dist/loopback-host.d.ts +3 -5
  106. package/dist/loopback-host.d.ts.map +1 -1
  107. package/dist/loopback-host.js +3 -5
  108. package/dist/loopback-host.js.map +1 -1
  109. package/dist/machine-link.d.ts +21 -0
  110. package/dist/machine-link.d.ts.map +1 -0
  111. package/dist/machine-link.js +20 -0
  112. package/dist/machine-link.js.map +1 -0
  113. package/dist/module-server.d.ts +1 -1
  114. package/dist/module-types/dashboard/components/QrCode.d.ts +8 -0
  115. package/dist/module-types/dashboard/lib/draft-handoff.d.ts +5 -9
  116. package/dist/module-types/dashboard/module/index.d.ts +56 -4
  117. package/dist/module-types/dashboard/rpc/modules.d.ts +1 -0
  118. package/dist/module-types/src/built-in.d.ts +18 -2
  119. package/dist/module-types/src/client.d.ts +2 -1
  120. package/dist/module-types/src/clone-project.d.ts +68 -0
  121. package/dist/module-types/src/dashboard/bridge-endpoints.d.ts +5 -5
  122. package/dist/module-types/src/dashboard/http.d.ts +1 -1
  123. package/dist/module-types/src/dashboard/machine-call.d.ts +9 -0
  124. package/dist/module-types/src/dashboard/module-serve.d.ts +6 -0
  125. package/dist/module-types/src/dashboard/remote-run.d.ts +77 -32
  126. package/dist/module-types/src/dashboard/rpc-serve.d.ts +28 -25
  127. package/dist/module-types/src/dashboard/types.d.ts +11 -16
  128. package/dist/module-types/src/dashboard-rpc/context.d.ts +4 -4
  129. package/dist/module-types/src/dashboard-rpc/control.d.ts +1 -1
  130. package/dist/module-types/src/dashboard-rpc/events.d.ts +1 -1
  131. package/dist/module-types/src/dashboard-rpc/index.d.ts +3 -3
  132. package/dist/module-types/src/dashboard-rpc/machines.d.ts +51 -0
  133. package/dist/module-types/src/dashboard-rpc/modules.d.ts +12 -4
  134. package/dist/module-types/src/dashboard-rpc/projects.d.ts +18 -0
  135. package/dist/module-types/src/dashboard-rpc/reads.d.ts +3 -4
  136. package/dist/module-types/src/dashboard-rpc/relay-agent.d.ts +3 -3
  137. package/dist/module-types/src/events.d.ts +4 -3
  138. package/dist/module-types/src/loopback-host.d.ts +3 -5
  139. package/dist/module-types/src/machine-link.d.ts +20 -0
  140. package/dist/module-types/src/pick-directory.d.ts +2 -0
  141. package/dist/module-types/src/project-modules.d.ts +12 -3
  142. package/dist/module-types/src/registry.d.ts +59 -16
  143. package/dist/module-types/src/repository-address.d.ts +22 -0
  144. package/dist/module-types/src/screens.d.ts +13 -0
  145. package/dist/module-types/src/store/agent-store.d.ts +2 -2
  146. package/dist/module-types/src/version.d.ts +1 -0
  147. package/dist/package-services.d.ts +27 -0
  148. package/dist/package-services.d.ts.map +1 -0
  149. package/dist/package-services.js +62 -0
  150. package/dist/package-services.js.map +1 -0
  151. package/dist/pick-directory.d.ts +2 -0
  152. package/dist/pick-directory.d.ts.map +1 -1
  153. package/dist/pick-directory.js +7 -1
  154. package/dist/pick-directory.js.map +1 -1
  155. package/dist/project-modules.d.ts +12 -3
  156. package/dist/project-modules.d.ts.map +1 -1
  157. package/dist/project-modules.js +20 -2
  158. package/dist/project-modules.js.map +1 -1
  159. package/dist/registry.d.ts +59 -16
  160. package/dist/registry.d.ts.map +1 -1
  161. package/dist/registry.js +91 -20
  162. package/dist/registry.js.map +1 -1
  163. package/dist/repository-address.d.ts +23 -0
  164. package/dist/repository-address.d.ts.map +1 -0
  165. package/dist/repository-address.js +38 -0
  166. package/dist/repository-address.js.map +1 -0
  167. package/dist/screens.d.ts +14 -0
  168. package/dist/screens.d.ts.map +1 -0
  169. package/dist/screens.js +40 -0
  170. package/dist/screens.js.map +1 -0
  171. package/dist/store/agent-store.d.ts +2 -2
  172. package/dist/store/agent-store.d.ts.map +1 -1
  173. package/dist/version.d.ts +2 -0
  174. package/dist/version.d.ts.map +1 -0
  175. package/dist/version.js +26 -0
  176. package/dist/version.js.map +1 -0
  177. package/package.json +15 -11
  178. package/dist/dashboard-bundle/assets/main-Q7JMdMJI.css +0 -2
  179. package/dist/dashboard-bundle/assets/main-fDZWGOub.js +0 -140
  180. package/dist/dashboard-rpc/devices.d.ts +0 -9
  181. package/dist/dashboard-rpc/devices.d.ts.map +0 -1
  182. package/dist/dashboard-rpc/devices.js +0 -12
  183. package/dist/dashboard-rpc/devices.js.map +0 -1
  184. package/dist/install.d.ts +0 -31
  185. package/dist/install.d.ts.map +0 -1
  186. package/dist/install.js +0 -54
  187. package/dist/install.js.map +0 -1
  188. package/dist/module-types/src/dashboard-rpc/devices.d.ts +0 -8
  189. package/dist/module-types/src/openagent-gitignore.d.ts +0 -11
  190. package/dist/openagent-gitignore.d.ts +0 -12
  191. package/dist/openagent-gitignore.d.ts.map +0 -1
  192. package/dist/openagent-gitignore.js +0 -19
  193. package/dist/openagent-gitignore.js.map +0 -1
@@ -3,50 +3,90 @@ import type { OpenAgentEvent } from '../events.js';
3
3
  import type { AgentMeta } from '../store/index.js';
4
4
  import type { StartAgentOptions, StartAgentResult } from './types.js';
5
5
  /**
6
- * The server-side half of "run on a connected device" (#1067). The local daemon holds the saved
7
- * device's token, so it - not the browser - drives the remote daemon: it POSTs the agent to the
6
+ * The server-side half of "run on a saved machine" (#1067). The local daemon holds this computer's
7
+ * key on the saved machine, so it - not the browser - drives the remote daemon: it POSTs the agent to the
8
8
  * remote's `/_relay/start` and then fetch-streams the remote's `/_relay/events` back into a local
9
9
  * {@link EventStream}, which the dashboard reads over its normal same-origin `onEvents` channel. So
10
- * the browser never talks cross-origin and the token never leaves the two daemons (issue #1067 (b)).
10
+ * the browser never talks cross-origin and the key never leaves the two daemons (issue #1067 (b)).
11
11
  *
12
- * Authentication is the shared-token cookie (#1051), sent daemon-to-daemon: `Cookie: oa_daemon=<token>` with no
13
- * `Origin` header. The remote's guard admits a matching cookie without the browser-only `?token=`
14
- * 302, and its `/_rpc` CSRF check (absent Origin passes) is not even on these raw routes.
12
+ * Every call but the ping names its project, by its repository's address
13
+ * (repository-address.ts): a project's folder, and so its id, is another one on each machine.
14
+ *
15
+ * The other OpenAgent listens on its own computer only. What answers at a machine's address is
16
+ * whatever that computer opened to the network, which lets this computer in once, with the code
17
+ * a machine's link carries ({@link enterRemote}), answers a key of this computer's own, and from
18
+ * then on passes each call that carries the key (`Authorization: Bearer`, no `Origin`) to its
19
+ * OpenAgent as that computer's own browser would have made it.
15
20
  */
16
- /** Where a relayed agent executes: the remote daemon's origin and its #1051 token. Memory-only. */
17
- export interface RemoteTarget {
21
+ /** How a machine is reached: where its OpenAgent answers, this computer's key there, and what the machine's own key is known by when its link said. */
22
+ export interface MachineAccess {
18
23
  url: string;
19
- token: string;
24
+ key: string;
25
+ pin?: string;
26
+ }
27
+ /** Where a relayed agent works: a machine, and the project there, by its repository's address. */
28
+ export interface RemoteTarget extends MachineAccess {
29
+ project: string;
20
30
  }
21
- /** The body a relay start forwards to the remote's `/_relay/start`. */
31
+ /** What a relay start forwards to the remote's `/_relay/start`, beside the project. */
22
32
  export interface RelayStartBody {
23
33
  prompt: string;
24
34
  options: StartAgentOptions;
25
35
  }
26
36
  /**
27
- * Health-check a saved device (#1072): a cookie'd `GET /_relay/ping`, true on any 2xx, false on a
28
- * non-2xx, an unreachable host, or the timeout. The token stays in memory for the check only, never
29
- * persisted, same as {@link startRemoteAgent}. This is how the browser's status dots learn reachable
30
- * from not: it has the tokens, the daemon does the cross-origin request.
37
+ * What a machine answers a relayed start with: a Start's own outcome, or `noProject` when it has
38
+ * no project cloned from the address the start named.
39
+ */
40
+ export type RelayStartResult = StartAgentResult | {
41
+ ok: false;
42
+ error: string;
43
+ noProject: true;
44
+ };
45
+ /**
46
+ * Health-check a saved machine (#1072): true when it answers this computer's key. This is how
47
+ * the browser's status dots learn reachable from not.
48
+ */
49
+ export declare function pingRemote(target: MachineAccess): Promise<boolean>;
50
+ /** The OpenAgent a saved machine runs, as its ping tells it; nothing for a machine that does not answer, or does not say. */
51
+ export declare function remoteVersion(target: MachineAccess): Promise<string | undefined>;
52
+ /** What asking to be let in came to: this computer's key there, or why not, in words. */
53
+ export type EnterResult = {
54
+ ok: true;
55
+ key: string;
56
+ } | {
57
+ ok: false;
58
+ error: string;
59
+ };
60
+ /**
61
+ * Ask a machine to let this computer in, with the code its link carries, under `name`. The code
62
+ * is good once: a link used before, or older than a few minutes, is refused.
63
+ */
64
+ export declare function enterRemote(door: string, code: string, name: string, pin?: string): Promise<EnterResult>;
65
+ /**
66
+ * Take this computer out of a machine: its key there stops working. Whether the machine did;
67
+ * one that cannot be reached keeps the key until this computer is removed there by hand.
31
68
  */
32
- export declare function pingRemote(target: RemoteTarget): Promise<boolean>;
69
+ export declare function leaveRemote(machine: MachineAccess & {
70
+ door: string;
71
+ }): Promise<boolean>;
33
72
  /**
34
- * Start an agent on the remote daemon and return its {@link StartAgentResult} (with the remote's own run
35
- * id). A non-2xx or a transport failure surfaces as an `ok: false` result the dashboard shows, the
36
- * same shape a local refusal has, so the caller does not special-case remote errors.
73
+ * Start an agent on the remote daemon, in its project cloned from `target.project`, and return
74
+ * what it answered (with the remote's own run id). A non-2xx or a transport failure surfaces as an
75
+ * `ok: false` result the dashboard shows, the same shape a local refusal has, so the caller does
76
+ * not special-case remote errors.
37
77
  */
38
- export declare function startRemoteAgent(target: RemoteTarget, body: RelayStartBody): Promise<StartAgentResult>;
78
+ export declare function startRemoteAgent(target: RemoteTarget, body: RelayStartBody): Promise<RelayStartResult>;
39
79
  /**
40
- * Relay one run-scoped RPC to the device that owns a remote agent (#1067 slice 2). The local daemon
41
- * holds the device token, so a read/diff/handoff/push/PR for a relayed agent runs ON the device: POST
42
- * {fn, args} to the remote's /_relay/rpc over the shared-token cookie (#1051) (no Origin), returning the device's
43
- * result. Throws on an unreachable device or a non-2xx so the caller falls back to its own empty/error
80
+ * Relay one run-scoped RPC to the machine that owns a remote agent (#1067 slice 2). The local daemon
81
+ * holds this computer's key there, so a read/diff/handoff/push/PR for a relayed agent runs ON the machine: POST
82
+ * {fn, args} to the remote's /_relay/rpc with the key (no Origin), returning the machine's
83
+ * result. Throws on an unreachable machine or a non-2xx so the caller falls back to its own empty/error
44
84
  * shape, the same way a failed local read does.
45
85
  */
46
86
  export declare function relayRpc(target: RemoteTarget, fn: string, args: unknown[]): Promise<unknown>;
47
87
  /**
48
88
  * Fetch-stream a remote agent's newline-delimited events into `onEvent` until the remote closes the
49
- * body, the agent ends, or `cancel()` is called. A 401 (the token was rotated) ends the stream
89
+ * body, the agent ends, or `cancel()` is called. A 401 (this computer was removed there) ends the stream
50
90
  * cleanly rather than as an error, so the dashboard sees a normal `done`, not a lost connection.
51
91
  * Returns a cancel function; calling it aborts the fetch and releases the reader.
52
92
  */
@@ -54,11 +94,12 @@ export declare function streamRemoteEvents(target: RemoteTarget, agentId: string
54
94
  /**
55
95
  * The local daemon's live relayed runs (#1067), keyed by the remote agent id. Registering an agent opens
56
96
  * an {@link EventStream} the dashboard reads through `onEvents`, fed by {@link streamRemoteEvents}
57
- * from the remote. This map is where a saved device's token lives daemon-side: in memory, for the
58
- * run's lifetime.
97
+ * from the remote. The target is the saved machine as it was at the Start. A machine is not
98
+ * removed while a run is at work on it ({@link working}); the runs that ended there before it
99
+ * was removed read as unreachable, and one added again answers for them with its new key ({@link rekey}).
59
100
  *
60
101
  * The `targets` map outlives the event pump (#1067 slice 2): a finished remote agent's post-run reads,
61
- * open-PR and merge still have to reach the device after its event stream has ended, so the device
102
+ * open-PR and merge still have to reach the machine after its event stream has ended, so the machine
62
103
  * target is kept until {@link dispose} clears it, not dropped when the stream closes.
63
104
  *
64
105
  * The `metas` map (#1077) holds a local {@link AgentMeta} stub per relayed agent so `onAgents` can show a
@@ -73,22 +114,26 @@ export declare class RelayedAgents {
73
114
  register(agentId: string, target: RemoteTarget, meta: AgentMeta, projectId: string): void;
74
115
  /** The live event stream for a relayed agent, or undefined when this daemon is not relaying it. */
75
116
  get(agentId: string | undefined): EventStream<OpenAgentEvent> | undefined;
76
- /** The device a relayed agent runs on, kept past the event stream so post-run push/PR still reach it. */
117
+ /** The machine a relayed agent runs on, kept past the event stream so post-run push/PR still reach it. */
77
118
  target(agentId: string | undefined): RemoteTarget | undefined;
119
+ /** Whether a run this daemon follows is still at work on the machine at `url`: its events still stream. */
120
+ working(url: string): boolean;
121
+ /** How the machine at `url` is reached since it was added again, for the runs kept from before: this computer's new key there, and the key the machine is known by. */
122
+ rekey(url: string, key: string, pin?: string): void;
78
123
  /** A project's relayed run stubs (#1077), newest-first, so `onAgents` can surface them in the list. */
79
124
  list(projectId: string): AgentMeta[];
80
125
  /** Fold each relayed event into the agent's list row via the store's own reducer (#1077), so the
81
- * local stub mirrors the device: the terminal status on `end`, the waiting flag while it is parked
126
+ * local stub mirrors the machine: the terminal status on `end`, the waiting flag while it is parked
82
127
  * (#785), the driver once its session starts. Events carry no write time, so this stamps its own. */
83
128
  private apply;
84
129
  /** Close a relayed agent's event stream (not its target). Idempotent. */
85
130
  private endStream;
86
- /** Stop every pump, close every stream, and forget every device target + list stub, on daemon shutdown. */
131
+ /** Stop every pump, close every stream, and forget every machine target + list stub, on daemon shutdown. */
87
132
  dispose(): void;
88
133
  }
89
134
  /**
90
- * Fold one relayed event into the memory-only row of a run on a device: what the device's own
91
- * card would say, kept here because that card is on the device. The events are the ones a run's
135
+ * Fold one relayed event into the memory-only row of a run on a machine: what the machine's own
136
+ * card would say, kept here because that card is on the machine. The events are the ones a run's
92
137
  * diary yields: the agent's session id, its cost, its end.
93
138
  */
94
139
  export declare function foldRelayedEvent(meta: AgentMeta, event: OpenAgentEvent, at: string): AgentMeta;
@@ -1 +1 @@
1
- {"version":3,"file":"remote-run.d.ts","sourceRoot":"","sources":["../../src/dashboard/remote-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGrE;;;;;;;;;;GAUG;AAEH,mGAAmG;AACnG,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd;AAED,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,iBAAiB,CAAA;CAC3B;AAOD;;;;;GAKG;AAC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Y,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAUxF;IAED,mGAAmG;IACnG,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC,cAAc,CAAC,GAAG,SAAS,CAExE;IAED,0GAA0G;IAC1G,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAE5D;IAED,2GAA2G;IAC3G,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAG5B;IAED,uKAAuK;IACvK,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAIlD;IAED,uGAAuG;IACvG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,CAKnC;IAED;;0GAEsG;IACtG,OAAO,CAAC,KAAK;IAMb,yEAAyE;IACzE,OAAO,CAAC,SAAS;IAUjB,4GAA4G;IAC5G,OAAO,IAAI,IAAI,CAQd;CACF;AAOD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,CAS9F"}
@@ -1,74 +1,137 @@
1
1
  import { EventStream } from '../event-stream.js';
2
2
  import { errorMessage } from '../error-message.js';
3
+ import { machineFetch } from './machine-call.js';
3
4
  const START_TIMEOUT_MS = 15_000;
4
- /** How long a status ping waits before calling a device offline (#1072): short, since it polls. */
5
+ /** How long a status ping waits before calling a machine offline (#1072): short, since it polls. */
5
6
  const PING_TIMEOUT_MS = 3_000;
7
+ /** One `GET /_relay/ping` with this computer's key: the answer when it is a 2xx, else nothing (the key no longer lets in, the host is unreachable, the time is up). */
8
+ async function ping(target) {
9
+ try {
10
+ const res = await machineFetch(`${trimSlashes(target.url)}/_relay/ping`, target.pin, {
11
+ headers: { authorization: `Bearer ${target.key}` },
12
+ signal: AbortSignal.timeout(PING_TIMEOUT_MS),
13
+ });
14
+ return res.ok ? res : undefined;
15
+ }
16
+ catch {
17
+ return undefined;
18
+ }
19
+ }
6
20
  /**
7
- * Health-check a saved device (#1072): a cookie'd `GET /_relay/ping`, true on any 2xx, false on a
8
- * non-2xx, an unreachable host, or the timeout. The token stays in memory for the check only, never
9
- * persisted, same as {@link startRemoteAgent}. This is how the browser's status dots learn reachable
10
- * from not: it has the tokens, the daemon does the cross-origin request.
21
+ * Health-check a saved machine (#1072): true when it answers this computer's key. This is how
22
+ * the browser's status dots learn reachable from not.
11
23
  */
12
24
  export async function pingRemote(target) {
25
+ return (await ping(target)) !== undefined;
26
+ }
27
+ /** The OpenAgent a saved machine runs, as its ping tells it; nothing for a machine that does not answer, or does not say. */
28
+ export async function remoteVersion(target) {
29
+ const said = await (await ping(target))?.json().catch(() => undefined);
30
+ const version = said && typeof said === 'object' ? said.version : undefined;
31
+ // What a machine says is shown on a page: only what reads as a version is one.
32
+ return typeof version === 'string' && /^[0-9A-Za-z.+-]{1,64}$/.test(version) ? version : undefined;
33
+ }
34
+ /** The two headers every relay request carries: JSON, and this computer's key there. No Origin on purpose. */
35
+ function relayHeaders(key) {
36
+ return { 'content-type': 'application/json', authorization: `Bearer ${key}` };
37
+ }
38
+ /** What a machine says when this computer's key no longer lets it in: it was removed there. */
39
+ const NOT_IN = 'this computer is no longer in on the machine: add the machine again, with a new link';
40
+ const ENTER_TIMEOUT_MS = 10_000;
41
+ /** How long a machine gets to take this computer out: it is not waited for by a person. */
42
+ const LEAVE_TIMEOUT_MS = 5_000;
43
+ /** What a machine answers to a code that was used before or is too old. */
44
+ const CODE_SPENT = 'this code no longer works';
45
+ /**
46
+ * Ask a machine to let this computer in, with the code its link carries, under `name`. The code
47
+ * is good once: a link used before, or older than a few minutes, is refused.
48
+ */
49
+ export async function enterRemote(door, code, name, pin) {
50
+ let res;
13
51
  try {
14
- const res = await fetch(`${trimSlashes(target.url)}/_relay/ping`, {
15
- headers: { cookie: `oa_daemon=${target.token}` },
16
- signal: AbortSignal.timeout(PING_TIMEOUT_MS),
52
+ res = await machineFetch(door, pin, {
53
+ method: 'POST',
54
+ headers: { 'content-type': 'application/json' },
55
+ body: JSON.stringify({ code, computer: name }),
56
+ signal: AbortSignal.timeout(ENTER_TIMEOUT_MS),
17
57
  });
58
+ }
59
+ catch (err) {
60
+ return { ok: false, error: `The machine did not answer: ${errorMessage(err)}` };
61
+ }
62
+ if (res.status === 403) {
63
+ // The machine says why in words: a link that was used is one reason among others (this
64
+ // computer is on another network than the machine, the machine's list is full).
65
+ const why = (await res.text().catch(() => '')).trim().slice(0, 200);
66
+ if (why === CODE_SPENT)
67
+ return { ok: false, error: 'This link no longer works. A link works once, and for a short time: make a new one on the other machine.' };
68
+ return { ok: false, error: why ? `The machine refused: ${why}.` : 'The machine refused.' };
69
+ }
70
+ if (!res.ok)
71
+ return { ok: false, error: `The machine refused (${res.status}).` };
72
+ const key = await res.json().then(body => body?.key, () => undefined);
73
+ return typeof key === 'string' && key ? { ok: true, key } : { ok: false, error: 'What answered at this link is not an OpenAgent that lets a machine in.' };
74
+ }
75
+ /**
76
+ * Take this computer out of a machine: its key there stops working. Whether the machine did;
77
+ * one that cannot be reached keeps the key until this computer is removed there by hand.
78
+ */
79
+ export async function leaveRemote(machine) {
80
+ try {
81
+ const res = await machineFetch(machine.door, machine.pin, { method: 'DELETE', headers: { authorization: `Bearer ${machine.key}` }, signal: AbortSignal.timeout(LEAVE_TIMEOUT_MS) });
18
82
  return res.ok;
19
83
  }
20
84
  catch {
21
85
  return false;
22
86
  }
23
87
  }
24
- /** The two headers every relay request carries: JSON, and the shared-token cookie (#1051). No Origin on purpose. */
25
- function relayHeaders(token) {
26
- return { 'content-type': 'application/json', cookie: `oa_daemon=${token}` };
27
- }
28
88
  /**
29
- * Start an agent on the remote daemon and return its {@link StartAgentResult} (with the remote's own run
30
- * id). A non-2xx or a transport failure surfaces as an `ok: false` result the dashboard shows, the
31
- * same shape a local refusal has, so the caller does not special-case remote errors.
89
+ * Start an agent on the remote daemon, in its project cloned from `target.project`, and return
90
+ * what it answered (with the remote's own run id). A non-2xx or a transport failure surfaces as an
91
+ * `ok: false` result the dashboard shows, the same shape a local refusal has, so the caller does
92
+ * not special-case remote errors.
32
93
  */
33
94
  export async function startRemoteAgent(target, body) {
34
95
  try {
35
- const res = await fetch(`${trimSlashes(target.url)}/_relay/start`, {
96
+ const res = await machineFetch(`${trimSlashes(target.url)}/_relay/start`, target.pin, {
36
97
  method: 'POST',
37
- headers: relayHeaders(target.token),
38
- body: JSON.stringify(body),
98
+ headers: relayHeaders(target.key),
99
+ body: JSON.stringify({ ...body, project: target.project }),
39
100
  signal: AbortSignal.timeout(START_TIMEOUT_MS),
40
101
  });
102
+ if (res.status === 401)
103
+ return { ok: false, error: NOT_IN };
41
104
  if (!res.ok)
42
- return { ok: false, error: `the device refused the run (${res.status})` };
105
+ return { ok: false, error: `the machine refused the run (${res.status})` };
43
106
  return (await res.json());
44
107
  }
45
108
  catch (err) {
46
- return { ok: false, error: `could not reach the device: ${errorMessage(err)}` };
109
+ return { ok: false, error: `could not reach the machine: ${errorMessage(err)}` };
47
110
  }
48
111
  }
49
- const RPC_TIMEOUT_MS = 60_000; // a relayed git push/PR runs over the network on the device
112
+ const RPC_TIMEOUT_MS = 60_000; // a relayed git push/PR runs over the network on the machine
50
113
  /**
51
- * Relay one run-scoped RPC to the device that owns a remote agent (#1067 slice 2). The local daemon
52
- * holds the device token, so a read/diff/handoff/push/PR for a relayed agent runs ON the device: POST
53
- * {fn, args} to the remote's /_relay/rpc over the shared-token cookie (#1051) (no Origin), returning the device's
54
- * result. Throws on an unreachable device or a non-2xx so the caller falls back to its own empty/error
114
+ * Relay one run-scoped RPC to the machine that owns a remote agent (#1067 slice 2). The local daemon
115
+ * holds this computer's key there, so a read/diff/handoff/push/PR for a relayed agent runs ON the machine: POST
116
+ * {fn, args} to the remote's /_relay/rpc with the key (no Origin), returning the machine's
117
+ * result. Throws on an unreachable machine or a non-2xx so the caller falls back to its own empty/error
55
118
  * shape, the same way a failed local read does.
56
119
  */
57
120
  export async function relayRpc(target, fn, args) {
58
- const res = await fetch(`${trimSlashes(target.url)}/_relay/rpc`, {
121
+ const res = await machineFetch(`${trimSlashes(target.url)}/_relay/rpc`, target.pin, {
59
122
  method: 'POST',
60
- headers: relayHeaders(target.token),
61
- body: JSON.stringify({ fn, args }),
123
+ headers: relayHeaders(target.key),
124
+ body: JSON.stringify({ fn, args, project: target.project }),
62
125
  signal: AbortSignal.timeout(RPC_TIMEOUT_MS),
63
126
  });
64
127
  if (!res.ok)
65
- throw new Error(`the device refused the request (${res.status})`);
128
+ throw new Error(`the machine refused the request (${res.status})`);
66
129
  const body = (await res.json());
67
130
  return body.result;
68
131
  }
69
132
  /**
70
133
  * Fetch-stream a remote agent's newline-delimited events into `onEvent` until the remote closes the
71
- * body, the agent ends, or `cancel()` is called. A 401 (the token was rotated) ends the stream
134
+ * body, the agent ends, or `cancel()` is called. A 401 (this computer was removed there) ends the stream
72
135
  * cleanly rather than as an error, so the dashboard sees a normal `done`, not a lost connection.
73
136
  * Returns a cancel function; calling it aborts the fetch and releases the reader.
74
137
  */
@@ -83,9 +146,9 @@ export function streamRemoteEvents(target, agentId, onEvent, onEnd) {
83
146
  };
84
147
  void (async () => {
85
148
  try {
86
- const url = `${trimSlashes(target.url)}/_relay/events?run=${encodeURIComponent(agentId)}`;
87
- const res = await fetch(url, { headers: relayHeaders(target.token), signal: controller.signal });
88
- // 401 = the device rotated its token. Nothing more will stream; end cleanly (a done, not a loss).
149
+ const url = `${trimSlashes(target.url)}/_relay/events?run=${encodeURIComponent(agentId)}&project=${encodeURIComponent(target.project)}`;
150
+ const res = await machineFetch(url, target.pin, { headers: relayHeaders(target.key), signal: controller.signal });
151
+ // 401 = this computer was removed on the machine. Nothing more will stream; end cleanly (a done, not a loss).
89
152
  if (!res.ok || !res.body)
90
153
  return end();
91
154
  const reader = res.body.getReader();
@@ -133,11 +196,12 @@ function emitLine(line, onEvent) {
133
196
  /**
134
197
  * The local daemon's live relayed runs (#1067), keyed by the remote agent id. Registering an agent opens
135
198
  * an {@link EventStream} the dashboard reads through `onEvents`, fed by {@link streamRemoteEvents}
136
- * from the remote. This map is where a saved device's token lives daemon-side: in memory, for the
137
- * run's lifetime.
199
+ * from the remote. The target is the saved machine as it was at the Start. A machine is not
200
+ * removed while a run is at work on it ({@link working}); the runs that ended there before it
201
+ * was removed read as unreachable, and one added again answers for them with its new key ({@link rekey}).
138
202
  *
139
203
  * The `targets` map outlives the event pump (#1067 slice 2): a finished remote agent's post-run reads,
140
- * open-PR and merge still have to reach the device after its event stream has ended, so the device
204
+ * open-PR and merge still have to reach the machine after its event stream has ended, so the machine
141
205
  * target is kept until {@link dispose} clears it, not dropped when the stream closes.
142
206
  *
143
207
  * The `metas` map (#1077) holds a local {@link AgentMeta} stub per relayed agent so `onAgents` can show a
@@ -158,7 +222,7 @@ export class RelayedAgents {
158
222
  const stream = new EventStream();
159
223
  const cancel = streamRemoteEvents(target, agentId, event => {
160
224
  stream.push(event);
161
- this.apply(agentId, event); // fold the event into the run's list row, mirroring the device
225
+ this.apply(agentId, event); // fold the event into the run's list row, mirroring the machine
162
226
  }, () => this.endStream(agentId));
163
227
  this.agents.set(agentId, { target, stream, cancel });
164
228
  }
@@ -166,10 +230,24 @@ export class RelayedAgents {
166
230
  get(agentId) {
167
231
  return agentId ? this.agents.get(agentId)?.stream : undefined;
168
232
  }
169
- /** The device a relayed agent runs on, kept past the event stream so post-run push/PR still reach it. */
233
+ /** The machine a relayed agent runs on, kept past the event stream so post-run push/PR still reach it. */
170
234
  target(agentId) {
171
235
  return agentId ? this.targets.get(agentId) : undefined;
172
236
  }
237
+ /** Whether a run this daemon follows is still at work on the machine at `url`: its events still stream. */
238
+ working(url) {
239
+ for (const agent of this.agents.values())
240
+ if (agent.target.url === url)
241
+ return true;
242
+ return false;
243
+ }
244
+ /** How the machine at `url` is reached since it was added again, for the runs kept from before: this computer's new key there, and the key the machine is known by. */
245
+ rekey(url, key, pin) {
246
+ for (const [agentId, target] of this.targets) {
247
+ if (target.url === url)
248
+ this.targets.set(agentId, { url, key, ...(pin ? { pin } : {}), project: target.project });
249
+ }
250
+ }
173
251
  /** A project's relayed run stubs (#1077), newest-first, so `onAgents` can surface them in the list. */
174
252
  list(projectId) {
175
253
  const rows = [];
@@ -180,7 +258,7 @@ export class RelayedAgents {
180
258
  return rows.sort((a, b) => (a.startedAt < b.startedAt ? 1 : a.startedAt > b.startedAt ? -1 : 0));
181
259
  }
182
260
  /** Fold each relayed event into the agent's list row via the store's own reducer (#1077), so the
183
- * local stub mirrors the device: the terminal status on `end`, the waiting flag while it is parked
261
+ * local stub mirrors the machine: the terminal status on `end`, the waiting flag while it is parked
184
262
  * (#785), the driver once its session starts. Events carry no write time, so this stamps its own. */
185
263
  apply(agentId, event) {
186
264
  const entry = this.metas.get(agentId);
@@ -200,7 +278,7 @@ export class RelayedAgents {
200
278
  if (entry && entry.meta.status === 'running')
201
279
  entry.meta.status = 'stopped';
202
280
  }
203
- /** Stop every pump, close every stream, and forget every device target + list stub, on daemon shutdown. */
281
+ /** Stop every pump, close every stream, and forget every machine target + list stub, on daemon shutdown. */
204
282
  dispose() {
205
283
  for (const [agentId, agent] of this.agents) {
206
284
  agent.cancel();
@@ -216,8 +294,8 @@ function trimSlashes(url) {
216
294
  return url.replace(/\/+$/, '');
217
295
  }
218
296
  /**
219
- * Fold one relayed event into the memory-only row of a run on a device: what the device's own
220
- * card would say, kept here because that card is on the device. The events are the ones a run's
297
+ * Fold one relayed event into the memory-only row of a run on a machine: what the machine's own
298
+ * card would say, kept here because that card is on the machine. The events are the ones a run's
221
299
  * diary yields: the agent's session id, its cost, its end.
222
300
  */
223
301
  export function foldRelayedEvent(meta, event, at) {
@@ -1 +1 @@
1
- {"version":3,"file":"remote-run.js","sourceRoot":"","sources":["../../src/dashboard/remote-run.ts"],"names":[],"mappings":"AAAA,OAAO,E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8
8
  import type { AddProjectResult, RemoveProjectResult, StartAgentOptions, StartAgentResult } from './types.js';
9
9
  import type { AgentMeta } from '../store/index.js';
10
+ import type { RemoteTarget } from './remote-run.js';
10
11
  /** Wired by the daemon so `sendStart` can reach the daemon's own `startAgent` closure. */
11
12
  export type StartAgentHandler = (prompt: string, options: StartAgentOptions, projectId?: string) => StartAgentResult | Promise<StartAgentResult>;
12
13
  /** Wired by the daemon so `sendAddProject` can install + register a repo (#433). */
@@ -14,19 +15,20 @@ export type AddProjectHandler = (path: string, share: boolean) => AddProjectResu
14
15
  /** Wired by the daemon so `sendRemoveProject` can take a project off the list, by its id, and with `files` remove what OpenAgent left in its folder. */
15
16
  export type RemoveProjectHandler = (projectId: string, files: boolean) => RemoveProjectResult | Promise<RemoveProjectResult>;
16
17
  /** Resolve an agent to its live event stream: the relay feeds `onEvents` from its own in-memory stream
17
- * rather than a file on disk (#426), and the daemon feeds an agent it is relaying from a device (#1067).
18
+ * rather than a file on disk (#426), and the daemon feeds an agent it is relaying from a machine (#1067).
18
19
  * Returns undefined when there is no in-memory stream, so `onEvents` falls back to tailing the log. */
19
20
  export type EventsSource = (projectId: string, agentId?: string) => AsyncIterable<OpenAgentEvent> | undefined;
20
- /** Look up the device a relayed agent (#1067) executes on, or undefined for an ordinary local agent. The
21
+ /** Look up the machine a relayed agent (#1067) executes on, or undefined for an ordinary local agent. The
21
22
  * daemon wires this from its live relayed-agent map; a run-scoped RPC uses it to forward a remote agent's
22
- * read/steer/handoff to that device instead of resolving a (nonexistent) local checkout. */
23
+ * read/steer/handoff to that machine instead of resolving a (nonexistent) local checkout. */
23
24
  export interface RemoteAgents {
24
- target(agentId: string | undefined): {
25
- url: string;
26
- token: string;
27
- } | undefined;
25
+ target(agentId: string | undefined): RemoteTarget | undefined;
28
26
  /** A project's relayed run stubs (#1077), so `onAgents` can show a remote agent in the list and re-open it after a reload. */
29
27
  list(projectId: string): AgentMeta[];
28
+ /** Whether a run relayed from here is still at work on the machine at `url`. */
29
+ working(url: string): boolean;
30
+ /** How the machine at `url` is reached since it was added again, for the runs kept from before. */
31
+ rekey(url: string, key: string, pin?: string): void;
30
32
  }
31
33
  /**
32
34
  * What every RPC acts through.
@@ -40,10 +42,10 @@ export interface DashboardContext {
40
42
  startAgent: StartAgentHandler;
41
43
  addProject: AddProjectHandler;
42
44
  removeProject: RemoveProjectHandler;
43
- /** The in-memory event stream for an agent relayed from a connected device (#1067), else undefined. */
45
+ /** The in-memory event stream for an agent relayed from a saved machine (#1067), else undefined. */
44
46
  eventsSource: EventsSource;
45
47
  /** The relayed-agent lookup (#1067 slice 2), so a run-scoped RPC can tell a local agent from one
46
- * running on a connected device and forward the call there. */
48
+ * running on a saved machine and forward the call there. */
47
49
  remote: RemoteAgents;
48
50
  /** The user-preferences store (#410), over the registry file. */
49
51
  preferences: PreferencesStore;
@@ -65,6 +67,15 @@ export interface DashboardContext {
65
67
  * the mount, its only caller.
66
68
  */
67
69
  export declare function isSameOriginRequest(req: IncomingMessage): boolean;
70
+ /**
71
+ * The third guard: a call says its body is JSON. {@link isSameOriginRequest} lets every loopback
72
+ * origin pass, whatever its port, so a page another program serves on this computer (an app an
73
+ * agent previews, a dev server) is let through it. A browser sends such a page's POST without
74
+ * asking only while its content type is one a plain form can have, and JSON is none of them:
75
+ * with JSON it asks first, this server never says yes, and the call is not sent. So a call that
76
+ * is not JSON is refused, and no page of another origin can make one, not even blind.
77
+ */
78
+ export declare function isJsonRequest(req: IncomingMessage): boolean;
68
79
  /**
69
80
  * DNS-rebinding guard, the other half of the CSRF check above. A page on `evil.com` whose DNS
70
81
  * re-answers as `127.0.0.1` is *same-origin* with this server as far as the browser is concerned,
@@ -72,16 +83,12 @@ export declare function isSameOriginRequest(req: IncomingMessage): boolean;
72
83
  * the mount, `sendStart` included, is reachable from a page the user merely visited.
73
84
  *
74
85
  * The `Host` header is what still gives the attacker away: it carries the name the browser was
75
- * asked for (`evil.com`), not the address it resolved to. So when we are bound to loopback, the
76
- * only `Host` a real user's browser can send is a loopback one (or the bound address itself) —
77
- * anything else is a rebound name and is rejected. An absent `Host` is rejected too when we are
78
- * enforcing: HTTP/1.1 requires it, and every browser sends it.
79
- *
80
- * A non-loopback bind (`--host`, #1051) is reached by a hostname we cannot predict, so there is
81
- * no allowlist to check against; that case gates behind the shared daemon token instead. Hosts
82
- * that never pass a bind host at all (the relay, which serves a public domain) are unaffected.
86
+ * asked for (`evil.com`), not the address it resolved to. The dashboard listens on this
87
+ * computer's own address only, so the only `Host` a real user's browser can send is a loopback
88
+ * one — anything else is a rebound name and is rejected. An absent `Host` is rejected too:
89
+ * HTTP/1.1 requires it, and every browser sends it.
83
90
  */
84
- export declare function isExpectedHost(req: IncomingMessage, boundHost: string | undefined): boolean;
91
+ export declare function isExpectedHost(req: IncomingMessage): boolean;
85
92
  /** Where the dashboard's RPCs live. One prefix, so the static handler can decline it by path. */
86
93
  export declare const RPC_PREFIX = "/_rpc";
87
94
  /**
@@ -90,17 +97,13 @@ export declare const RPC_PREFIX = "/_rpc";
90
97
  * `sendStart` reaches the daemon's own `startAgent` through the wired {@link DashboardContext}.
91
98
  *
92
99
  * Cross-origin POSTs are rejected (CSRF: a page on evil.com must not steer or start a session), as
93
- * are requests carrying someone else's `Host` when we are bound to loopback (DNS rebinding: the
94
- * same page must not reach us by pointing its own name at `127.0.0.1`). Pass `opts.host` — the
95
- * address the server is bound to — to enable that second check. Returns whether the request was
96
- * the RPC surface's.
100
+ * are requests carrying someone else's `Host` (DNS rebinding: the same page must not reach us by
101
+ * pointing its own name at `127.0.0.1`). Returns whether the request was the RPC surface's.
97
102
  *
98
103
  * This replaced Telefunc (F3), which required a build-time transform over every `.telefunc.ts`
99
104
  * file, a registration table pinning each RPC to the client-baked key of the *dashboard* source
100
105
  * path it was re-exported from, and a request-context indirection for wiring that never varied
101
106
  * per request. What it bought over this was type-safety across a package boundary that A7 removed.
102
107
  */
103
- export declare function makeRpcMount(context: DashboardContext, opts?: {
104
- host?: string;
105
- }): (req: IncomingMessage, res: ServerResponse) => Promise<boolean>;
108
+ export declare function makeRpcMount(context: DashboardContext): (req: IncomingMessage, res: ServerResponse) => Promise<boolean>;
106
109
  //# sourceMappingURL=rpc-serve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-serve.d.ts","sourceRoot":"","sources":["../../src/dashboard/rpc-serve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAKhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC5G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD,0FAA0F;AAC1F,MAAM,MAAM,iBAAiB,GAAG,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,SAAS,CAAC,EAAE,MAAM,KACf,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;AAEjD,oFAAoF;AACpF,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;AAE9G,wJAAwJ;AACxJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KA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