@gjermundgaraba/clankerbox-sdk 0.2.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/LICENSE +21 -0
- package/README.md +96 -0
- package/dist/gen/clankerbox/v1/host_pb.d.ts +436 -0
- package/dist/gen/clankerbox/v1/host_pb.js +99 -0
- package/dist/gen/clankerbox/v1/machine_pb.d.ts +494 -0
- package/dist/gen/clankerbox/v1/machine_pb.js +113 -0
- package/dist/gen/clankerbox/v1/resources_pb.d.ts +591 -0
- package/dist/gen/clankerbox/v1/resources_pb.js +283 -0
- package/dist/gen/clankerbox/v1/session_pb.d.ts +760 -0
- package/dist/gen/clankerbox/v1/session_pb.js +191 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gjermund Garaba
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# @gjermundgaraba/clankerbox-sdk
|
|
2
|
+
|
|
3
|
+
Generated Protobuf messages, TypeScript types and Connect RPC service descriptors
|
|
4
|
+
for Clankerbox. This ESM package includes compiled JavaScript and declarations;
|
|
5
|
+
consumers do not need protoc, a Go toolchain, or a Clankerbox source checkout.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install @gjermundgaraba/clankerbox-sdk @connectrpc/connect @connectrpc/connect-node
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { MachineService, SessionService } from "@gjermundgaraba/clankerbox-sdk";
|
|
13
|
+
import { createClient } from "@connectrpc/connect";
|
|
14
|
+
import { createConnectTransport } from "@connectrpc/connect-node";
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The package supplies descriptors, not a transport or lifecycle coordinator.
|
|
18
|
+
Node consumers supply Connect 2.x and use
|
|
19
|
+
`createConnectTransport({httpVersion: "2", ...})`; browser fetch cannot carry
|
|
20
|
+
the bidirectional attachment stream. `@bufbuild/protobuf` is included as a
|
|
21
|
+
runtime dependency. All descriptors are exported at the root and through
|
|
22
|
+
`/resources`, `/machine`, `/session` and `/host` subpaths.
|
|
23
|
+
|
|
24
|
+
SDK **0.2.0** is qualified against Clankerbox **0.6.0**, including its
|
|
25
|
+
artifact-only checkpoint contract. SDK and controller versions are independent;
|
|
26
|
+
pin a qualified pair rather than assuming their version numbers match.
|
|
27
|
+
|
|
28
|
+
## RPC contract
|
|
29
|
+
|
|
30
|
+
The wire package is `clankerbox.v1`. The Protobuf sources under
|
|
31
|
+
`clankerbox/v1/` generate Go messages in `gen/clankerbox/v1`, Go Connect
|
|
32
|
+
handlers and clients in `gen/clankerbox/v1/clankerboxv1connect`, and TypeScript
|
|
33
|
+
in `src/gen/clankerbox/v1`. Generated code is checked in.
|
|
34
|
+
|
|
35
|
+
The services:
|
|
36
|
+
|
|
37
|
+
- `MachineService`: discovery, resource reads, lifecycle mutations, operation
|
|
38
|
+
inspection and label replacement. Lifecycle mutations carry idempotency keys
|
|
39
|
+
and return durable Operations; clients poll `GetOperation` and never resubmit
|
|
40
|
+
a mutation because a wait timed out. `SetLabels` is the exception: it takes
|
|
41
|
+
no key and returns the updated `Machine` synchronously.
|
|
42
|
+
- `SessionService`: terminal sessions, mounted on controller, host and guest
|
|
43
|
+
with endpoint-specific authorization.
|
|
44
|
+
- `HostService`: private operation submission and status plus host and machine
|
|
45
|
+
inspection. Each action is a `oneof` payload.
|
|
46
|
+
|
|
47
|
+
Public `Profile`, `Host`, `Machine` and `Checkpoint` messages omit image paths,
|
|
48
|
+
private endpoints, engine store paths and credentials. `internal/rpcmodel`
|
|
49
|
+
converts between these messages and the services' persisted records.
|
|
50
|
+
|
|
51
|
+
Errors combine a Connect status code with a typed `ErrorDetail` reason.
|
|
52
|
+
`retryable` describes the operation, not terminal input: a lost input
|
|
53
|
+
acknowledgement must never be replayed. The streaming semantics of
|
|
54
|
+
`AttachSession` are specified in
|
|
55
|
+
[terminal sessions](https://github.com/gjermundgaraba/clankerbox/blob/main/docs/terminal-sessions.md).
|
|
56
|
+
|
|
57
|
+
## Generation and packaging
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
cd protocol
|
|
61
|
+
pnpm install --frozen-lockfile
|
|
62
|
+
pnpm generate
|
|
63
|
+
pnpm build
|
|
64
|
+
pnpm check
|
|
65
|
+
pnpm test
|
|
66
|
+
pnpm test:package
|
|
67
|
+
pnpm pack
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`generate` requires protoc 36.1 and installs pinned protoc-gen-go,
|
|
71
|
+
protoc-gen-connect-go and protoc-gen-es into `.tools/`. Go dependency versions
|
|
72
|
+
are in the root `go.mod`; JavaScript versions are in `package.json` and the
|
|
73
|
+
lockfile. Regeneration must leave the checked-in output unchanged.
|
|
74
|
+
|
|
75
|
+
`pnpm pack` clean-builds JavaScript and declarations and copies the repository's
|
|
76
|
+
MIT license into the package. `pnpm test:package` packs and installs the artifact
|
|
77
|
+
in a temporary consumer with lifecycle scripts disabled, then checks runtime
|
|
78
|
+
imports, TypeScript declarations, package contents and license inclusion.
|
|
79
|
+
|
|
80
|
+
Publishing uses dedicated `sdk-v<VERSION>` tags, not controller release tags.
|
|
81
|
+
See [SDK publishing](https://github.com/gjermundgaraba/clankerbox/blob/main/docs/sdk-publishing.md)
|
|
82
|
+
for first-publish setup and the tokenless GitHub Actions release workflow.
|
|
83
|
+
|
|
84
|
+
## Tests
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
go test -race ./internal/rpcmodel ./gen/...
|
|
88
|
+
cd protocol && pnpm test
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The Go tests cover conversion round trips, private-field redaction, every
|
|
92
|
+
operation action and state, and typed errors over a real connection. The SDK
|
|
93
|
+
tests cover bigint and JSON precision, oneofs and service shapes.
|
|
94
|
+
`test/real-vm.mjs` and `test/public-session.mjs` drive a running machine and are
|
|
95
|
+
not part of the default test glob; see
|
|
96
|
+
[tests](https://github.com/gjermundgaraba/clankerbox/blob/main/tests/README.md).
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { Checkpoint, GuestStatus, MachineState, OperationStatus, Profile } from "./resources_pb.js";
|
|
4
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
5
|
+
/**
|
|
6
|
+
* Describes the file clankerbox/v1/host.proto.
|
|
7
|
+
*/
|
|
8
|
+
export declare const file_clankerbox_v1_host: GenFile;
|
|
9
|
+
/**
|
|
10
|
+
* @generated from message clankerbox.v1.DescribeHostRequest
|
|
11
|
+
*/
|
|
12
|
+
export type DescribeHostRequest = Message<"clankerbox.v1.DescribeHostRequest"> & {};
|
|
13
|
+
/**
|
|
14
|
+
* Describes the message clankerbox.v1.DescribeHostRequest.
|
|
15
|
+
* Use `create(DescribeHostRequestSchema)` to create a new message.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DescribeHostRequestSchema: GenMessage<DescribeHostRequest>;
|
|
18
|
+
/**
|
|
19
|
+
* @generated from message clankerbox.v1.HostDescription
|
|
20
|
+
*/
|
|
21
|
+
export type HostDescription = Message<"clankerbox.v1.HostDescription"> & {
|
|
22
|
+
/**
|
|
23
|
+
* @generated from field: string host_id = 1;
|
|
24
|
+
*/
|
|
25
|
+
hostId: string;
|
|
26
|
+
/**
|
|
27
|
+
* @generated from field: string os = 2;
|
|
28
|
+
*/
|
|
29
|
+
os: string;
|
|
30
|
+
/**
|
|
31
|
+
* @generated from field: string arch = 3;
|
|
32
|
+
*/
|
|
33
|
+
arch: string;
|
|
34
|
+
/**
|
|
35
|
+
* @generated from field: repeated clankerbox.v1.Profile profiles = 5;
|
|
36
|
+
*/
|
|
37
|
+
profiles: Profile[];
|
|
38
|
+
/**
|
|
39
|
+
* @generated from field: string schema = 6;
|
|
40
|
+
*/
|
|
41
|
+
schema: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Describes the message clankerbox.v1.HostDescription.
|
|
45
|
+
* Use `create(HostDescriptionSchema)` to create a new message.
|
|
46
|
+
*/
|
|
47
|
+
export declare const HostDescriptionSchema: GenMessage<HostDescription>;
|
|
48
|
+
/**
|
|
49
|
+
* @generated from message clankerbox.v1.OperationIdentity
|
|
50
|
+
*/
|
|
51
|
+
export type OperationIdentity = Message<"clankerbox.v1.OperationIdentity"> & {
|
|
52
|
+
/**
|
|
53
|
+
* @generated from field: string operation_id = 1;
|
|
54
|
+
*/
|
|
55
|
+
operationId: string;
|
|
56
|
+
/**
|
|
57
|
+
* @generated from field: string machine_id = 2;
|
|
58
|
+
*/
|
|
59
|
+
machineId: string;
|
|
60
|
+
/**
|
|
61
|
+
* @generated from field: int64 generation = 3;
|
|
62
|
+
*/
|
|
63
|
+
generation: bigint;
|
|
64
|
+
/**
|
|
65
|
+
* @generated from field: string name = 4;
|
|
66
|
+
*/
|
|
67
|
+
name: string;
|
|
68
|
+
/**
|
|
69
|
+
* @generated from field: clankerbox.v1.Profile profile = 5;
|
|
70
|
+
*/
|
|
71
|
+
profile?: Profile | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* @generated from field: string host_id = 6;
|
|
74
|
+
*/
|
|
75
|
+
hostId: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Describes the message clankerbox.v1.OperationIdentity.
|
|
79
|
+
* Use `create(OperationIdentitySchema)` to create a new message.
|
|
80
|
+
*/
|
|
81
|
+
export declare const OperationIdentitySchema: GenMessage<OperationIdentity>;
|
|
82
|
+
/**
|
|
83
|
+
* @generated from message clankerbox.v1.CreateHostMachine
|
|
84
|
+
*/
|
|
85
|
+
export type CreateHostMachine = Message<"clankerbox.v1.CreateHostMachine"> & {};
|
|
86
|
+
/**
|
|
87
|
+
* Describes the message clankerbox.v1.CreateHostMachine.
|
|
88
|
+
* Use `create(CreateHostMachineSchema)` to create a new message.
|
|
89
|
+
*/
|
|
90
|
+
export declare const CreateHostMachineSchema: GenMessage<CreateHostMachine>;
|
|
91
|
+
/**
|
|
92
|
+
* @generated from message clankerbox.v1.StartHostMachine
|
|
93
|
+
*/
|
|
94
|
+
export type StartHostMachine = Message<"clankerbox.v1.StartHostMachine"> & {};
|
|
95
|
+
/**
|
|
96
|
+
* Describes the message clankerbox.v1.StartHostMachine.
|
|
97
|
+
* Use `create(StartHostMachineSchema)` to create a new message.
|
|
98
|
+
*/
|
|
99
|
+
export declare const StartHostMachineSchema: GenMessage<StartHostMachine>;
|
|
100
|
+
/**
|
|
101
|
+
* @generated from message clankerbox.v1.StopHostMachine
|
|
102
|
+
*/
|
|
103
|
+
export type StopHostMachine = Message<"clankerbox.v1.StopHostMachine"> & {};
|
|
104
|
+
/**
|
|
105
|
+
* Describes the message clankerbox.v1.StopHostMachine.
|
|
106
|
+
* Use `create(StopHostMachineSchema)` to create a new message.
|
|
107
|
+
*/
|
|
108
|
+
export declare const StopHostMachineSchema: GenMessage<StopHostMachine>;
|
|
109
|
+
/**
|
|
110
|
+
* @generated from message clankerbox.v1.DeleteHostMachine
|
|
111
|
+
*/
|
|
112
|
+
export type DeleteHostMachine = Message<"clankerbox.v1.DeleteHostMachine"> & {};
|
|
113
|
+
/**
|
|
114
|
+
* Describes the message clankerbox.v1.DeleteHostMachine.
|
|
115
|
+
* Use `create(DeleteHostMachineSchema)` to create a new message.
|
|
116
|
+
*/
|
|
117
|
+
export declare const DeleteHostMachineSchema: GenMessage<DeleteHostMachine>;
|
|
118
|
+
/**
|
|
119
|
+
* @generated from message clankerbox.v1.ForkHostMachine
|
|
120
|
+
*/
|
|
121
|
+
export type ForkHostMachine = Message<"clankerbox.v1.ForkHostMachine"> & {
|
|
122
|
+
/**
|
|
123
|
+
* @generated from field: string source_machine_id = 1;
|
|
124
|
+
*/
|
|
125
|
+
sourceMachineId: string;
|
|
126
|
+
/**
|
|
127
|
+
* @generated from field: int64 source_generation = 2;
|
|
128
|
+
*/
|
|
129
|
+
sourceGeneration: bigint;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Describes the message clankerbox.v1.ForkHostMachine.
|
|
133
|
+
* Use `create(ForkHostMachineSchema)` to create a new message.
|
|
134
|
+
*/
|
|
135
|
+
export declare const ForkHostMachineSchema: GenMessage<ForkHostMachine>;
|
|
136
|
+
/**
|
|
137
|
+
* @generated from message clankerbox.v1.CaptureHostCheckpoint
|
|
138
|
+
*/
|
|
139
|
+
export type CaptureHostCheckpoint = Message<"clankerbox.v1.CaptureHostCheckpoint"> & {
|
|
140
|
+
/**
|
|
141
|
+
* @generated from field: string source_machine_id = 1;
|
|
142
|
+
*/
|
|
143
|
+
sourceMachineId: string;
|
|
144
|
+
/**
|
|
145
|
+
* @generated from field: int64 source_generation = 2;
|
|
146
|
+
*/
|
|
147
|
+
sourceGeneration: bigint;
|
|
148
|
+
/**
|
|
149
|
+
* @generated from field: clankerbox.v1.Checkpoint checkpoint = 3;
|
|
150
|
+
*/
|
|
151
|
+
checkpoint?: Checkpoint | undefined;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Describes the message clankerbox.v1.CaptureHostCheckpoint.
|
|
155
|
+
* Use `create(CaptureHostCheckpointSchema)` to create a new message.
|
|
156
|
+
*/
|
|
157
|
+
export declare const CaptureHostCheckpointSchema: GenMessage<CaptureHostCheckpoint>;
|
|
158
|
+
/**
|
|
159
|
+
* @generated from message clankerbox.v1.RestoreHostCheckpoint
|
|
160
|
+
*/
|
|
161
|
+
export type RestoreHostCheckpoint = Message<"clankerbox.v1.RestoreHostCheckpoint"> & {
|
|
162
|
+
/**
|
|
163
|
+
* @generated from field: string source_machine_id = 1;
|
|
164
|
+
*/
|
|
165
|
+
sourceMachineId: string;
|
|
166
|
+
/**
|
|
167
|
+
* @generated from field: int64 source_generation = 2;
|
|
168
|
+
*/
|
|
169
|
+
sourceGeneration: bigint;
|
|
170
|
+
/**
|
|
171
|
+
* @generated from field: clankerbox.v1.Checkpoint checkpoint = 3;
|
|
172
|
+
*/
|
|
173
|
+
checkpoint?: Checkpoint | undefined;
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Describes the message clankerbox.v1.RestoreHostCheckpoint.
|
|
177
|
+
* Use `create(RestoreHostCheckpointSchema)` to create a new message.
|
|
178
|
+
*/
|
|
179
|
+
export declare const RestoreHostCheckpointSchema: GenMessage<RestoreHostCheckpoint>;
|
|
180
|
+
/**
|
|
181
|
+
* @generated from message clankerbox.v1.DeleteHostCheckpoint
|
|
182
|
+
*/
|
|
183
|
+
export type DeleteHostCheckpoint = Message<"clankerbox.v1.DeleteHostCheckpoint"> & {
|
|
184
|
+
/**
|
|
185
|
+
* @generated from field: clankerbox.v1.Checkpoint checkpoint = 1;
|
|
186
|
+
*/
|
|
187
|
+
checkpoint?: Checkpoint | undefined;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Describes the message clankerbox.v1.DeleteHostCheckpoint.
|
|
191
|
+
* Use `create(DeleteHostCheckpointSchema)` to create a new message.
|
|
192
|
+
*/
|
|
193
|
+
export declare const DeleteHostCheckpointSchema: GenMessage<DeleteHostCheckpoint>;
|
|
194
|
+
/**
|
|
195
|
+
* @generated from message clankerbox.v1.SubmitOperationRequest
|
|
196
|
+
*/
|
|
197
|
+
export type SubmitOperationRequest = Message<"clankerbox.v1.SubmitOperationRequest"> & {
|
|
198
|
+
/**
|
|
199
|
+
* @generated from field: clankerbox.v1.OperationIdentity identity = 1;
|
|
200
|
+
*/
|
|
201
|
+
identity?: OperationIdentity | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* @generated from oneof clankerbox.v1.SubmitOperationRequest.action
|
|
204
|
+
*/
|
|
205
|
+
action: {
|
|
206
|
+
/**
|
|
207
|
+
* @generated from field: clankerbox.v1.CreateHostMachine create = 2;
|
|
208
|
+
*/
|
|
209
|
+
value: CreateHostMachine;
|
|
210
|
+
case: "create";
|
|
211
|
+
} | {
|
|
212
|
+
/**
|
|
213
|
+
* @generated from field: clankerbox.v1.StartHostMachine start = 3;
|
|
214
|
+
*/
|
|
215
|
+
value: StartHostMachine;
|
|
216
|
+
case: "start";
|
|
217
|
+
} | {
|
|
218
|
+
/**
|
|
219
|
+
* @generated from field: clankerbox.v1.StopHostMachine stop = 4;
|
|
220
|
+
*/
|
|
221
|
+
value: StopHostMachine;
|
|
222
|
+
case: "stop";
|
|
223
|
+
} | {
|
|
224
|
+
/**
|
|
225
|
+
* @generated from field: clankerbox.v1.DeleteHostMachine delete = 5;
|
|
226
|
+
*/
|
|
227
|
+
value: DeleteHostMachine;
|
|
228
|
+
case: "delete";
|
|
229
|
+
} | {
|
|
230
|
+
/**
|
|
231
|
+
* @generated from field: clankerbox.v1.ForkHostMachine fork = 6;
|
|
232
|
+
*/
|
|
233
|
+
value: ForkHostMachine;
|
|
234
|
+
case: "fork";
|
|
235
|
+
} | {
|
|
236
|
+
/**
|
|
237
|
+
* @generated from field: clankerbox.v1.CaptureHostCheckpoint capture_checkpoint = 7;
|
|
238
|
+
*/
|
|
239
|
+
value: CaptureHostCheckpoint;
|
|
240
|
+
case: "captureCheckpoint";
|
|
241
|
+
} | {
|
|
242
|
+
/**
|
|
243
|
+
* @generated from field: clankerbox.v1.RestoreHostCheckpoint restore_checkpoint = 8;
|
|
244
|
+
*/
|
|
245
|
+
value: RestoreHostCheckpoint;
|
|
246
|
+
case: "restoreCheckpoint";
|
|
247
|
+
} | {
|
|
248
|
+
/**
|
|
249
|
+
* @generated from field: clankerbox.v1.DeleteHostCheckpoint delete_checkpoint = 9;
|
|
250
|
+
*/
|
|
251
|
+
value: DeleteHostCheckpoint;
|
|
252
|
+
case: "deleteCheckpoint";
|
|
253
|
+
} | {
|
|
254
|
+
case: undefined;
|
|
255
|
+
value?: undefined;
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Describes the message clankerbox.v1.SubmitOperationRequest.
|
|
260
|
+
* Use `create(SubmitOperationRequestSchema)` to create a new message.
|
|
261
|
+
*/
|
|
262
|
+
export declare const SubmitOperationRequestSchema: GenMessage<SubmitOperationRequest>;
|
|
263
|
+
/**
|
|
264
|
+
* @generated from message clankerbox.v1.SubmitOperationResponse
|
|
265
|
+
*/
|
|
266
|
+
export type SubmitOperationResponse = Message<"clankerbox.v1.SubmitOperationResponse"> & {
|
|
267
|
+
/**
|
|
268
|
+
* Identity and input fingerprint are committed before this response.
|
|
269
|
+
*
|
|
270
|
+
* @generated from field: string operation_id = 1;
|
|
271
|
+
*/
|
|
272
|
+
operationId: string;
|
|
273
|
+
/**
|
|
274
|
+
* @generated from field: bool accepted = 2;
|
|
275
|
+
*/
|
|
276
|
+
accepted: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* @generated from field: clankerbox.v1.HostOperation operation = 3;
|
|
279
|
+
*/
|
|
280
|
+
operation?: HostOperation | undefined;
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* Describes the message clankerbox.v1.SubmitOperationResponse.
|
|
284
|
+
* Use `create(SubmitOperationResponseSchema)` to create a new message.
|
|
285
|
+
*/
|
|
286
|
+
export declare const SubmitOperationResponseSchema: GenMessage<SubmitOperationResponse>;
|
|
287
|
+
/**
|
|
288
|
+
* @generated from message clankerbox.v1.GetHostOperationRequest
|
|
289
|
+
*/
|
|
290
|
+
export type GetHostOperationRequest = Message<"clankerbox.v1.GetHostOperationRequest"> & {
|
|
291
|
+
/**
|
|
292
|
+
* @generated from field: string operation_id = 1;
|
|
293
|
+
*/
|
|
294
|
+
operationId: string;
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Describes the message clankerbox.v1.GetHostOperationRequest.
|
|
298
|
+
* Use `create(GetHostOperationRequestSchema)` to create a new message.
|
|
299
|
+
*/
|
|
300
|
+
export declare const GetHostOperationRequestSchema: GenMessage<GetHostOperationRequest>;
|
|
301
|
+
/**
|
|
302
|
+
* @generated from message clankerbox.v1.HostOperation
|
|
303
|
+
*/
|
|
304
|
+
export type HostOperation = Message<"clankerbox.v1.HostOperation"> & {
|
|
305
|
+
/**
|
|
306
|
+
* @generated from field: string operation_id = 1;
|
|
307
|
+
*/
|
|
308
|
+
operationId: string;
|
|
309
|
+
/**
|
|
310
|
+
* @generated from field: clankerbox.v1.OperationStatus status = 2;
|
|
311
|
+
*/
|
|
312
|
+
status: OperationStatus;
|
|
313
|
+
/**
|
|
314
|
+
* @generated from field: string error = 3;
|
|
315
|
+
*/
|
|
316
|
+
error: string;
|
|
317
|
+
/**
|
|
318
|
+
* @generated from field: clankerbox.v1.Observation observation = 4;
|
|
319
|
+
*/
|
|
320
|
+
observation?: Observation | undefined;
|
|
321
|
+
/**
|
|
322
|
+
* @generated from field: clankerbox.v1.Checkpoint checkpoint = 5;
|
|
323
|
+
*/
|
|
324
|
+
checkpoint?: Checkpoint | undefined;
|
|
325
|
+
/**
|
|
326
|
+
* Optional host journal metadata, separate from public operation completion.
|
|
327
|
+
*
|
|
328
|
+
* @generated from field: string phase = 6;
|
|
329
|
+
*/
|
|
330
|
+
phase: string;
|
|
331
|
+
/**
|
|
332
|
+
* @generated from field: string input_fingerprint = 7;
|
|
333
|
+
*/
|
|
334
|
+
inputFingerprint: string;
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Describes the message clankerbox.v1.HostOperation.
|
|
338
|
+
* Use `create(HostOperationSchema)` to create a new message.
|
|
339
|
+
*/
|
|
340
|
+
export declare const HostOperationSchema: GenMessage<HostOperation>;
|
|
341
|
+
/**
|
|
342
|
+
* @generated from message clankerbox.v1.InspectMachineRequest
|
|
343
|
+
*/
|
|
344
|
+
export type InspectMachineRequest = Message<"clankerbox.v1.InspectMachineRequest"> & {
|
|
345
|
+
/**
|
|
346
|
+
* @generated from field: string machine_id = 1;
|
|
347
|
+
*/
|
|
348
|
+
machineId: string;
|
|
349
|
+
/**
|
|
350
|
+
* @generated from field: int64 expected_generation = 2;
|
|
351
|
+
*/
|
|
352
|
+
expectedGeneration: bigint;
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* Describes the message clankerbox.v1.InspectMachineRequest.
|
|
356
|
+
* Use `create(InspectMachineRequestSchema)` to create a new message.
|
|
357
|
+
*/
|
|
358
|
+
export declare const InspectMachineRequestSchema: GenMessage<InspectMachineRequest>;
|
|
359
|
+
/**
|
|
360
|
+
* @generated from message clankerbox.v1.Observation
|
|
361
|
+
*/
|
|
362
|
+
export type Observation = Message<"clankerbox.v1.Observation"> & {
|
|
363
|
+
/**
|
|
364
|
+
* @generated from field: string machine_id = 1;
|
|
365
|
+
*/
|
|
366
|
+
machineId: string;
|
|
367
|
+
/**
|
|
368
|
+
* @generated from field: int64 generation = 2;
|
|
369
|
+
*/
|
|
370
|
+
generation: bigint;
|
|
371
|
+
/**
|
|
372
|
+
* @generated from field: clankerbox.v1.MachineState state = 3;
|
|
373
|
+
*/
|
|
374
|
+
state: MachineState;
|
|
375
|
+
/**
|
|
376
|
+
* @generated from field: bool prepared = 4;
|
|
377
|
+
*/
|
|
378
|
+
prepared: boolean;
|
|
379
|
+
/**
|
|
380
|
+
* @generated from field: bool deleted = 5;
|
|
381
|
+
*/
|
|
382
|
+
deleted: boolean;
|
|
383
|
+
/**
|
|
384
|
+
* @generated from field: google.protobuf.Timestamp observed_at = 6;
|
|
385
|
+
*/
|
|
386
|
+
observedAt?: Timestamp | undefined;
|
|
387
|
+
/**
|
|
388
|
+
* @generated from field: clankerbox.v1.GuestStatus guest = 7;
|
|
389
|
+
*/
|
|
390
|
+
guest?: GuestStatus | undefined;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* Describes the message clankerbox.v1.Observation.
|
|
394
|
+
* Use `create(ObservationSchema)` to create a new message.
|
|
395
|
+
*/
|
|
396
|
+
export declare const ObservationSchema: GenMessage<Observation>;
|
|
397
|
+
/**
|
|
398
|
+
* @generated from service clankerbox.v1.HostService
|
|
399
|
+
*/
|
|
400
|
+
export declare const HostService: GenService<{
|
|
401
|
+
/**
|
|
402
|
+
* @generated from rpc clankerbox.v1.HostService.DescribeHost
|
|
403
|
+
*/
|
|
404
|
+
describeHost: {
|
|
405
|
+
methodKind: "unary";
|
|
406
|
+
input: typeof DescribeHostRequestSchema;
|
|
407
|
+
output: typeof HostDescriptionSchema;
|
|
408
|
+
};
|
|
409
|
+
/**
|
|
410
|
+
* Acknowledges durable acceptance, not successful completion. Accepted work
|
|
411
|
+
* belongs to the host lifetime. An identical retry cannot repeat unsafe effects.
|
|
412
|
+
*
|
|
413
|
+
* @generated from rpc clankerbox.v1.HostService.SubmitOperation
|
|
414
|
+
*/
|
|
415
|
+
submitOperation: {
|
|
416
|
+
methodKind: "unary";
|
|
417
|
+
input: typeof SubmitOperationRequestSchema;
|
|
418
|
+
output: typeof SubmitOperationResponseSchema;
|
|
419
|
+
};
|
|
420
|
+
/**
|
|
421
|
+
* @generated from rpc clankerbox.v1.HostService.GetHostOperation
|
|
422
|
+
*/
|
|
423
|
+
getHostOperation: {
|
|
424
|
+
methodKind: "unary";
|
|
425
|
+
input: typeof GetHostOperationRequestSchema;
|
|
426
|
+
output: typeof HostOperationSchema;
|
|
427
|
+
};
|
|
428
|
+
/**
|
|
429
|
+
* @generated from rpc clankerbox.v1.HostService.InspectMachine
|
|
430
|
+
*/
|
|
431
|
+
inspectMachine: {
|
|
432
|
+
methodKind: "unary";
|
|
433
|
+
input: typeof InspectMachineRequestSchema;
|
|
434
|
+
output: typeof ObservationSchema;
|
|
435
|
+
};
|
|
436
|
+
}>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.15.0 with parameter "target=ts,import_extension=js"
|
|
2
|
+
// @generated from file clankerbox/v1/host.proto (package clankerbox.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
+
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
6
|
+
import { file_clankerbox_v1_resources } from "./resources_pb.js";
|
|
7
|
+
/**
|
|
8
|
+
* Describes the file clankerbox/v1/host.proto.
|
|
9
|
+
*/
|
|
10
|
+
export const file_clankerbox_v1_host = /*@__PURE__*/ fileDesc("ChhjbGFua2VyYm94L3YxL2hvc3QucHJvdG8SDWNsYW5rZXJib3gudjEiFQoTRGVzY3JpYmVIb3N0UmVxdWVzdCKFAQoPSG9zdERlc2NyaXB0aW9uEg8KB2hvc3RfaWQYASABKAkSCgoCb3MYAiABKAkSDAoEYXJjaBgDIAEoCRIoCghwcm9maWxlcxgFIAMoCzIWLmNsYW5rZXJib3gud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SJIChVJbnNwZWN0TWFjaGluZVJlcXVlc3QSEgoKbWFjaGluZV9pZBgBIAEoCRIbChNleHBlY3RlZF9nZW5lcmF0aW9uGAIgASgDIuABCgtPYnNlcnZhdGlvbhISCgptYWNoaW5lX2lkGAEgASgJEhIKCmdlbmVyYXRpb24YAiABKAMSKgoFc3RhdGUYAyABKA4yGy5jbGFua2VyYm94LnYxLk1hY2hpbmVTdGF0ZRIQCghwcmVwYXJlZBgEIAEoCBIPCgdkZWxldGVkGAUgASgIEi8KC29ic2VydmVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIpCgVndWVzdBgHIAEoCzIaLmNsYW5rZXJib3gudjEuR3Vlc3RTdGF0dXMy8QIKC0hvc3RTZXJ2aWNlElIKDERlc2NyaWJlSG9zdBIiLmNsYW5rZXJib3gudjEuRGVzY3JpYmVIb3N0UmVxdWVzdBoeLmNsYW5rZXJib3gudjEuSG9zdERlc2NyaXB0aW9uEmAKD1N1Ym1pdE9wZXJhdGlvbhIlLmNsYW5rZXJib3gudjEuU3VibWl0T3BlcmF0aW9uUmVxdWVzdBomLmNsYW5rZXJib3gudjEuU3VibWl0T3BlcmF0aW9uUmVzcG9uc2USWAoQR2V0SG9zdE9wZXJhdGlvbhImLmNsYW5rZXJib3gudjEuR2V0SG9zdE9wZXJhdGlvblJlcXVlc3QaHC5jbGFua2VyYm94LnYxLkhvc3RPcGVyYXRpb24SUgoOSW5zcGVjdE1hY2hpbmUSJC5jbGFua2VyYm94LnYxLkluc3BlY3RNYWNoaW5lUmVxdWVzdBoaLmNsYW5rZXJib3gudjEuT2JzZXJ2YXRpb25CK1opY2xhbmtlcmJveC9nZW4vY2xhbmtlcmJveC92MTtjbGFua2VyYm94djFiBnByb3RvMw", [file_google_protobuf_timestamp, file_clankerbox_v1_resources]);
|
|
11
|
+
/**
|
|
12
|
+
* Describes the message clankerbox.v1.DescribeHostRequest.
|
|
13
|
+
* Use `create(DescribeHostRequestSchema)` to create a new message.
|
|
14
|
+
*/
|
|
15
|
+
export const DescribeHostRequestSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 0);
|
|
16
|
+
/**
|
|
17
|
+
* Describes the message clankerbox.v1.HostDescription.
|
|
18
|
+
* Use `create(HostDescriptionSchema)` to create a new message.
|
|
19
|
+
*/
|
|
20
|
+
export const HostDescriptionSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 1);
|
|
21
|
+
/**
|
|
22
|
+
* Describes the message clankerbox.v1.OperationIdentity.
|
|
23
|
+
* Use `create(OperationIdentitySchema)` to create a new message.
|
|
24
|
+
*/
|
|
25
|
+
export const OperationIdentitySchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 2);
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message clankerbox.v1.CreateHostMachine.
|
|
28
|
+
* Use `create(CreateHostMachineSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
export const CreateHostMachineSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 3);
|
|
31
|
+
/**
|
|
32
|
+
* Describes the message clankerbox.v1.StartHostMachine.
|
|
33
|
+
* Use `create(StartHostMachineSchema)` to create a new message.
|
|
34
|
+
*/
|
|
35
|
+
export const StartHostMachineSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 4);
|
|
36
|
+
/**
|
|
37
|
+
* Describes the message clankerbox.v1.StopHostMachine.
|
|
38
|
+
* Use `create(StopHostMachineSchema)` to create a new message.
|
|
39
|
+
*/
|
|
40
|
+
export const StopHostMachineSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 5);
|
|
41
|
+
/**
|
|
42
|
+
* Describes the message clankerbox.v1.DeleteHostMachine.
|
|
43
|
+
* Use `create(DeleteHostMachineSchema)` to create a new message.
|
|
44
|
+
*/
|
|
45
|
+
export const DeleteHostMachineSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 6);
|
|
46
|
+
/**
|
|
47
|
+
* Describes the message clankerbox.v1.ForkHostMachine.
|
|
48
|
+
* Use `create(ForkHostMachineSchema)` to create a new message.
|
|
49
|
+
*/
|
|
50
|
+
export const ForkHostMachineSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 7);
|
|
51
|
+
/**
|
|
52
|
+
* Describes the message clankerbox.v1.CaptureHostCheckpoint.
|
|
53
|
+
* Use `create(CaptureHostCheckpointSchema)` to create a new message.
|
|
54
|
+
*/
|
|
55
|
+
export const CaptureHostCheckpointSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 8);
|
|
56
|
+
/**
|
|
57
|
+
* Describes the message clankerbox.v1.RestoreHostCheckpoint.
|
|
58
|
+
* Use `create(RestoreHostCheckpointSchema)` to create a new message.
|
|
59
|
+
*/
|
|
60
|
+
export const RestoreHostCheckpointSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 9);
|
|
61
|
+
/**
|
|
62
|
+
* Describes the message clankerbox.v1.DeleteHostCheckpoint.
|
|
63
|
+
* Use `create(DeleteHostCheckpointSchema)` to create a new message.
|
|
64
|
+
*/
|
|
65
|
+
export const DeleteHostCheckpointSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 10);
|
|
66
|
+
/**
|
|
67
|
+
* Describes the message clankerbox.v1.SubmitOperationRequest.
|
|
68
|
+
* Use `create(SubmitOperationRequestSchema)` to create a new message.
|
|
69
|
+
*/
|
|
70
|
+
export const SubmitOperationRequestSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 11);
|
|
71
|
+
/**
|
|
72
|
+
* Describes the message clankerbox.v1.SubmitOperationResponse.
|
|
73
|
+
* Use `create(SubmitOperationResponseSchema)` to create a new message.
|
|
74
|
+
*/
|
|
75
|
+
export const SubmitOperationResponseSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 12);
|
|
76
|
+
/**
|
|
77
|
+
* Describes the message clankerbox.v1.GetHostOperationRequest.
|
|
78
|
+
* Use `create(GetHostOperationRequestSchema)` to create a new message.
|
|
79
|
+
*/
|
|
80
|
+
export const GetHostOperationRequestSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 13);
|
|
81
|
+
/**
|
|
82
|
+
* Describes the message clankerbox.v1.HostOperation.
|
|
83
|
+
* Use `create(HostOperationSchema)` to create a new message.
|
|
84
|
+
*/
|
|
85
|
+
export const HostOperationSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 14);
|
|
86
|
+
/**
|
|
87
|
+
* Describes the message clankerbox.v1.InspectMachineRequest.
|
|
88
|
+
* Use `create(InspectMachineRequestSchema)` to create a new message.
|
|
89
|
+
*/
|
|
90
|
+
export const InspectMachineRequestSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 15);
|
|
91
|
+
/**
|
|
92
|
+
* Describes the message clankerbox.v1.Observation.
|
|
93
|
+
* Use `create(ObservationSchema)` to create a new message.
|
|
94
|
+
*/
|
|
95
|
+
export const ObservationSchema = /*@__PURE__*/ messageDesc(file_clankerbox_v1_host, 16);
|
|
96
|
+
/**
|
|
97
|
+
* @generated from service clankerbox.v1.HostService
|
|
98
|
+
*/
|
|
99
|
+
export const HostService = /*@__PURE__*/ serviceDesc(file_clankerbox_v1_host, 0);
|