@ccmsg/protocol 1.9.0 → 1.10.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.
- package/package.json +1 -1
- package/src/common/hello.ts +15 -0
- package/src/fixtures/common.ts +1 -0
package/package.json
CHANGED
package/src/common/hello.ts
CHANGED
|
@@ -129,6 +129,21 @@ export const HelloResult = Type.Object({
|
|
|
129
129
|
/** The daemon build, for display. */
|
|
130
130
|
version: Type.String(),
|
|
131
131
|
started_at: Timestamp,
|
|
132
|
+
/** Where a person opens the terminal a session runs in: the base URL of the
|
|
133
|
+
* gateway that fronts this instance's terminals. A session's terminal names
|
|
134
|
+
* itself in `terminal_id` on the `agents` topic, and the gateway's URL for it
|
|
135
|
+
* is `<terminal_gateway>/sessions/<terminal_id>` — so the base URL carries no
|
|
136
|
+
* trailing slash, the path below it being the gateway's spelling and not this
|
|
137
|
+
* contract's.
|
|
138
|
+
*
|
|
139
|
+
* Stated by the instance because only it knows which gateway stands in front
|
|
140
|
+
* of the machine its sessions run on; a client has no way to derive one from
|
|
141
|
+
* the endpoint it reached. Absent where the instance cannot reach its
|
|
142
|
+
* sessions' terminals at all, which is the same condition that leaves the
|
|
143
|
+
* `terminal` capability out of the set above. */
|
|
144
|
+
terminal_gateway: Type.Optional(
|
|
145
|
+
Type.String({ pattern: "^https?://[^/?#\\s]+(/[^?#\\s]*[^/?#\\s])?$" }),
|
|
146
|
+
),
|
|
132
147
|
/** When this connection's authorization runs out, after which the instance
|
|
133
148
|
* closes it. Present on a connection an access token opened; absent where
|
|
134
149
|
* reaching the instance is itself the permission (the Unix socket) or where
|
package/src/fixtures/common.ts
CHANGED
|
@@ -79,6 +79,7 @@ export const HELLO_RESPONSE: Static<typeof HelloResponse> = {
|
|
|
79
79
|
{ id: other_instance, endpoint: other_endpoint, host: "nuc", reachable: false },
|
|
80
80
|
],
|
|
81
81
|
capabilities: ["fork", "launcher", "terminal"],
|
|
82
|
+
terminal_gateway: "https://mba.example.ts.net/hyoui",
|
|
82
83
|
version: "0.1.0",
|
|
83
84
|
started_at: FIXTURE_NOW - 3_600_000,
|
|
84
85
|
};
|