@opengeni/agent-proto 0.4.0 → 0.5.1-canary.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/dist/gen/opengeni_agent.d.ts +127 -7
- package/dist/index.js +768 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/gen/opengeni_agent.ts +1082 -96
|
@@ -120,6 +120,18 @@ export declare enum GoingOfflineReason {
|
|
|
120
120
|
}
|
|
121
121
|
export declare function goingOfflineReasonFromJSON(object: any): GoingOfflineReason;
|
|
122
122
|
export declare function goingOfflineReasonToJSON(object: GoingOfflineReason): string;
|
|
123
|
+
export declare enum AgentUpdateStage {
|
|
124
|
+
AGENT_UPDATE_STAGE_UNSPECIFIED = 0,
|
|
125
|
+
AGENT_UPDATE_STAGE_ACCEPTED = 1,
|
|
126
|
+
AGENT_UPDATE_STAGE_WAITING_FOR_IDLE = 2,
|
|
127
|
+
AGENT_UPDATE_STAGE_DOWNLOADING = 3,
|
|
128
|
+
AGENT_UPDATE_STAGE_VERIFYING = 4,
|
|
129
|
+
AGENT_UPDATE_STAGE_APPLYING = 5,
|
|
130
|
+
AGENT_UPDATE_STAGE_RESTARTING = 6,
|
|
131
|
+
AGENT_UPDATE_STAGE_FAILED = 7
|
|
132
|
+
}
|
|
133
|
+
export declare function agentUpdateStageFromJSON(object: any): AgentUpdateStage;
|
|
134
|
+
export declare function agentUpdateStageToJSON(object: AgentUpdateStage): string;
|
|
123
135
|
/** The logical byte stream an op-frame Data chunk belongs to. */
|
|
124
136
|
export declare enum OpChannel {
|
|
125
137
|
OP_CHANNEL_UNSPECIFIED = 0,
|
|
@@ -254,6 +266,20 @@ export interface Hello {
|
|
|
254
266
|
* first connect.
|
|
255
267
|
*/
|
|
256
268
|
resumeToken: string;
|
|
269
|
+
/**
|
|
270
|
+
* Lowercase sha256 of the exact running executable. The control plane uses
|
|
271
|
+
* this with agent_version to verify that a self-update's successor process is
|
|
272
|
+
* the build the signed manifest selected, not merely a process that reconnected.
|
|
273
|
+
*/
|
|
274
|
+
binarySha256: string;
|
|
275
|
+
/**
|
|
276
|
+
* Durable proof written only after an explicitly requested update passed the
|
|
277
|
+
* signed-manifest, artifact signature+digest, atomic apply, and startup health
|
|
278
|
+
* gates. Repeating it on successor Hellos heals lost progress events.
|
|
279
|
+
*/
|
|
280
|
+
completedUpdateOperationId: string;
|
|
281
|
+
completedUpdateTargetVersion: string;
|
|
282
|
+
completedUpdateBinarySha256: string;
|
|
257
283
|
}
|
|
258
284
|
/**
|
|
259
285
|
* What the agent is able and consented to do. Each bool is a hard capability
|
|
@@ -298,6 +324,18 @@ export interface Capabilities {
|
|
|
298
324
|
* one machine may host multiple Chrome profiles.
|
|
299
325
|
*/
|
|
300
326
|
browserBridge: boolean;
|
|
327
|
+
/**
|
|
328
|
+
* The runner enforces the optional per-connection operation memory policy on
|
|
329
|
+
* every contained exec/git child. A control plane must fail closed rather than
|
|
330
|
+
* send a configured policy to a runner that does not advertise this bit.
|
|
331
|
+
*/
|
|
332
|
+
operationResourcePolicy: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* The runner additionally understands and enforces cpu_max_millicores. This is
|
|
335
|
+
* separate from the memory-policy bit so a newer control plane never sends a
|
|
336
|
+
* CPU quota that an older memory-only runner would ignore as an unknown field.
|
|
337
|
+
*/
|
|
338
|
+
operationCpuQuota: boolean;
|
|
301
339
|
}
|
|
302
340
|
/**
|
|
303
341
|
* Capabilities of one live browser-profile bridge endpoint. This describes the
|
|
@@ -435,6 +473,26 @@ export interface EnrollmentCredentials {
|
|
|
435
473
|
*/
|
|
436
474
|
relayToken: string;
|
|
437
475
|
}
|
|
476
|
+
/**
|
|
477
|
+
* Optional policy selected for one Connected Machine enrollment. Absence means
|
|
478
|
+
* the control plane requests no limit; there is deliberately no runner-created
|
|
479
|
+
* default quota. cpu_max_millicores is an exact, period-independent public ratio.
|
|
480
|
+
* The Linux runner selects a cgroup-v2 period within the kernel's 1ms..1s ABI so
|
|
481
|
+
* every positive uint32 millicore value is represented without rounding or
|
|
482
|
+
* silent loosening. Local runner policy and ancestor OS/cgroup policy may tighten
|
|
483
|
+
* these values but never loosen them.
|
|
484
|
+
*/
|
|
485
|
+
export interface OperationResourcePolicy {
|
|
486
|
+
memoryMaxBytes?: string | undefined;
|
|
487
|
+
memoryHighBytes?: string | undefined;
|
|
488
|
+
/**
|
|
489
|
+
* Exact thousandths of one CPU (1000 = one CPU). Absence is unlimited.
|
|
490
|
+
* The runner preserves the kernel cpu.max period when it can represent this
|
|
491
|
+
* ratio exactly, otherwise minimally lengthens it to satisfy cgroup v2's 1 ms
|
|
492
|
+
* minimum quota/period and 1 s maximum period without rounding the ratio.
|
|
493
|
+
*/
|
|
494
|
+
cpuMaxMillicores?: number | undefined;
|
|
495
|
+
}
|
|
438
496
|
export interface ExecRequest {
|
|
439
497
|
/** argv[0] is the program; the agent does NOT shell-interpret unless `shell`. */
|
|
440
498
|
command: string[];
|
|
@@ -588,6 +646,15 @@ export interface PtyOpenRequest {
|
|
|
588
646
|
rows: number;
|
|
589
647
|
/** The TERM value to advertise (e.g. "xterm-256color"). */
|
|
590
648
|
term: string;
|
|
649
|
+
/**
|
|
650
|
+
* Stable caller-owned identity for an idempotent terminal. Repeating pty_open
|
|
651
|
+
* with the same non-empty scope_id returns the existing live PTY/channel rather
|
|
652
|
+
* than spawning another shell. Empty preserves the explicit "open a new PTY"
|
|
653
|
+
* behavior. The control plane uses the durable OpenGeni session id here so
|
|
654
|
+
* capability/token refreshes reattach the same terminal while separate sessions
|
|
655
|
+
* on one machine remain isolated.
|
|
656
|
+
*/
|
|
657
|
+
scopeId: string;
|
|
591
658
|
}
|
|
592
659
|
export interface PtyOpenRequest_EnvEntry {
|
|
593
660
|
key: string;
|
|
@@ -947,6 +1014,45 @@ export interface UpdateMayProceedResponse {
|
|
|
947
1014
|
/** When false, the number of live sessions blocking the update. */
|
|
948
1015
|
activeSessions: number;
|
|
949
1016
|
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Control-plane initiated, process-global self-update. This wraps the same
|
|
1019
|
+
* signed/minisign/sha256/atomic-rollback updater used by the local CLI; it is not
|
|
1020
|
+
* a second installer. The request is idempotent by operation_id and fenced by
|
|
1021
|
+
* the exact process subject plus its expected running version+digest.
|
|
1022
|
+
*/
|
|
1023
|
+
export interface AgentUpdateApplyRequest {
|
|
1024
|
+
operationId: string;
|
|
1025
|
+
targetVersion: string;
|
|
1026
|
+
channel: string;
|
|
1027
|
+
expectedCurrentVersion: string;
|
|
1028
|
+
expectedCurrentSha256: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* The deployment origin serving the signed channel manifest. The pinned
|
|
1031
|
+
* minisign key remains the trust root; this only chooses the fetch origin.
|
|
1032
|
+
*/
|
|
1033
|
+
releaseBaseUrl: string;
|
|
1034
|
+
}
|
|
1035
|
+
export interface AgentUpdateApplyResponse {
|
|
1036
|
+
accepted: boolean;
|
|
1037
|
+
operationId: string;
|
|
1038
|
+
currentVersion: string;
|
|
1039
|
+
currentSha256: string;
|
|
1040
|
+
targetVersion: string;
|
|
1041
|
+
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Durable, secret-free progress from the authoritative runner. A successful
|
|
1044
|
+
* RESTARTING event is still provisional: only the successor Hello completes the
|
|
1045
|
+
* update in the control plane.
|
|
1046
|
+
*/
|
|
1047
|
+
export interface AgentUpdateProgress {
|
|
1048
|
+
operationId: string;
|
|
1049
|
+
targetVersion: string;
|
|
1050
|
+
stage: AgentUpdateStage;
|
|
1051
|
+
expectedBinarySha256: string;
|
|
1052
|
+
errorCode: string;
|
|
1053
|
+
retryable: boolean;
|
|
1054
|
+
rolledBack: boolean;
|
|
1055
|
+
}
|
|
950
1056
|
/**
|
|
951
1057
|
* The terminal outcome of an op — carried in the Exit frame body AND echoed in
|
|
952
1058
|
* OpStatus once complete. Digests/totals are keyed by channel name
|
|
@@ -1146,7 +1252,8 @@ export interface OpProgress {
|
|
|
1146
1252
|
}
|
|
1147
1253
|
/**
|
|
1148
1254
|
* A server→runner cumulative ack + credit replenishment, published fire-and-forget
|
|
1149
|
-
* on the
|
|
1255
|
+
* on the exact process ack subject
|
|
1256
|
+
* (`agent.<ws>.<id>.connection.<instance>.ack`). Best-effort, healed by repetition.
|
|
1150
1257
|
*/
|
|
1151
1258
|
export interface OpAck {
|
|
1152
1259
|
opId: string;
|
|
@@ -1175,6 +1282,12 @@ export interface OpAck {
|
|
|
1175
1282
|
export interface ControlRequest {
|
|
1176
1283
|
requestId: string;
|
|
1177
1284
|
epoch: number;
|
|
1285
|
+
/**
|
|
1286
|
+
* Per-connection policy snapshot attached to the operation request. It lives
|
|
1287
|
+
* on the envelope so request/reply Git and replayable OpStart share one
|
|
1288
|
+
* contract. Absent means unrestricted by the control plane.
|
|
1289
|
+
*/
|
|
1290
|
+
resourcePolicy: OperationResourcePolicy | undefined;
|
|
1178
1291
|
op: {
|
|
1179
1292
|
$case: "ping";
|
|
1180
1293
|
ping: PingRequest;
|
|
@@ -1184,9 +1297,6 @@ export interface ControlRequest {
|
|
|
1184
1297
|
} | {
|
|
1185
1298
|
$case: "resume";
|
|
1186
1299
|
resume: ResumeRequest;
|
|
1187
|
-
} | {
|
|
1188
|
-
$case: "exec";
|
|
1189
|
-
exec: ExecRequest;
|
|
1190
1300
|
} | {
|
|
1191
1301
|
$case: "fsRead";
|
|
1192
1302
|
fsRead: FsReadRequest;
|
|
@@ -1267,6 +1377,9 @@ export interface ControlRequest {
|
|
|
1267
1377
|
} | {
|
|
1268
1378
|
$case: "computerFramesOpen";
|
|
1269
1379
|
computerFramesOpen: ComputerFramesOpenRequest;
|
|
1380
|
+
} | {
|
|
1381
|
+
$case: "agentUpdateApply";
|
|
1382
|
+
agentUpdateApply: AgentUpdateApplyRequest;
|
|
1270
1383
|
} | undefined;
|
|
1271
1384
|
}
|
|
1272
1385
|
/** Wraps an op-specific response, or an error. `request_id` echoes the request. */
|
|
@@ -1283,9 +1396,6 @@ export interface ControlResponse {
|
|
|
1283
1396
|
} | {
|
|
1284
1397
|
$case: "resume";
|
|
1285
1398
|
resume: ResumeResponse;
|
|
1286
|
-
} | {
|
|
1287
|
-
$case: "exec";
|
|
1288
|
-
exec: ExecResponse;
|
|
1289
1399
|
} | {
|
|
1290
1400
|
$case: "fsRead";
|
|
1291
1401
|
fsRead: FsReadResponse;
|
|
@@ -1360,6 +1470,9 @@ export interface ControlResponse {
|
|
|
1360
1470
|
} | {
|
|
1361
1471
|
$case: "computerFramesOpen";
|
|
1362
1472
|
computerFramesOpen: ComputerFramesOpenResponse;
|
|
1473
|
+
} | {
|
|
1474
|
+
$case: "agentUpdateApply";
|
|
1475
|
+
agentUpdateApply: AgentUpdateApplyResponse;
|
|
1363
1476
|
} | undefined;
|
|
1364
1477
|
}
|
|
1365
1478
|
/**
|
|
@@ -1385,6 +1498,9 @@ export interface AgentEvent {
|
|
|
1385
1498
|
} | {
|
|
1386
1499
|
$case: "goingOffline";
|
|
1387
1500
|
goingOffline: GoingOffline;
|
|
1501
|
+
} | {
|
|
1502
|
+
$case: "agentUpdateProgress";
|
|
1503
|
+
agentUpdateProgress: AgentUpdateProgress;
|
|
1388
1504
|
} | undefined;
|
|
1389
1505
|
}
|
|
1390
1506
|
/** The control plane's ack of an AgentEvent (e.g. a HeartbeatAck). */
|
|
@@ -1506,6 +1622,7 @@ export declare const DeviceAuthStartResponse: MessageFns<DeviceAuthStartResponse
|
|
|
1506
1622
|
export declare const DeviceAuthPollRequest: MessageFns<DeviceAuthPollRequest>;
|
|
1507
1623
|
export declare const DeviceAuthPollResponse: MessageFns<DeviceAuthPollResponse>;
|
|
1508
1624
|
export declare const EnrollmentCredentials: MessageFns<EnrollmentCredentials>;
|
|
1625
|
+
export declare const OperationResourcePolicy: MessageFns<OperationResourcePolicy>;
|
|
1509
1626
|
export declare const ExecRequest: MessageFns<ExecRequest>;
|
|
1510
1627
|
export declare const ExecRequest_EnvEntry: MessageFns<ExecRequest_EnvEntry>;
|
|
1511
1628
|
export declare const ExecResponse: MessageFns<ExecResponse>;
|
|
@@ -1567,6 +1684,9 @@ export declare const UpdateManifest: MessageFns<UpdateManifest>;
|
|
|
1567
1684
|
export declare const UpdateArtifact: MessageFns<UpdateArtifact>;
|
|
1568
1685
|
export declare const UpdateMayProceedRequest: MessageFns<UpdateMayProceedRequest>;
|
|
1569
1686
|
export declare const UpdateMayProceedResponse: MessageFns<UpdateMayProceedResponse>;
|
|
1687
|
+
export declare const AgentUpdateApplyRequest: MessageFns<AgentUpdateApplyRequest>;
|
|
1688
|
+
export declare const AgentUpdateApplyResponse: MessageFns<AgentUpdateApplyResponse>;
|
|
1689
|
+
export declare const AgentUpdateProgress: MessageFns<AgentUpdateProgress>;
|
|
1570
1690
|
export declare const OpExit: MessageFns<OpExit>;
|
|
1571
1691
|
export declare const OpExit_DigestsEntry: MessageFns<OpExit_DigestsEntry>;
|
|
1572
1692
|
export declare const OpExit_TotalsEntry: MessageFns<OpExit_TotalsEntry>;
|