@opengeni/agent-proto 0.5.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 +118 -7
- package/dist/index.js +751 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/gen/opengeni_agent.ts +1065 -108
|
@@ -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[];
|
|
@@ -956,6 +1014,45 @@ export interface UpdateMayProceedResponse {
|
|
|
956
1014
|
/** When false, the number of live sessions blocking the update. */
|
|
957
1015
|
activeSessions: number;
|
|
958
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
|
+
}
|
|
959
1056
|
/**
|
|
960
1057
|
* The terminal outcome of an op — carried in the Exit frame body AND echoed in
|
|
961
1058
|
* OpStatus once complete. Digests/totals are keyed by channel name
|
|
@@ -1155,7 +1252,8 @@ export interface OpProgress {
|
|
|
1155
1252
|
}
|
|
1156
1253
|
/**
|
|
1157
1254
|
* A server→runner cumulative ack + credit replenishment, published fire-and-forget
|
|
1158
|
-
* on the
|
|
1255
|
+
* on the exact process ack subject
|
|
1256
|
+
* (`agent.<ws>.<id>.connection.<instance>.ack`). Best-effort, healed by repetition.
|
|
1159
1257
|
*/
|
|
1160
1258
|
export interface OpAck {
|
|
1161
1259
|
opId: string;
|
|
@@ -1184,6 +1282,12 @@ export interface OpAck {
|
|
|
1184
1282
|
export interface ControlRequest {
|
|
1185
1283
|
requestId: string;
|
|
1186
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;
|
|
1187
1291
|
op: {
|
|
1188
1292
|
$case: "ping";
|
|
1189
1293
|
ping: PingRequest;
|
|
@@ -1193,9 +1297,6 @@ export interface ControlRequest {
|
|
|
1193
1297
|
} | {
|
|
1194
1298
|
$case: "resume";
|
|
1195
1299
|
resume: ResumeRequest;
|
|
1196
|
-
} | {
|
|
1197
|
-
$case: "exec";
|
|
1198
|
-
exec: ExecRequest;
|
|
1199
1300
|
} | {
|
|
1200
1301
|
$case: "fsRead";
|
|
1201
1302
|
fsRead: FsReadRequest;
|
|
@@ -1276,6 +1377,9 @@ export interface ControlRequest {
|
|
|
1276
1377
|
} | {
|
|
1277
1378
|
$case: "computerFramesOpen";
|
|
1278
1379
|
computerFramesOpen: ComputerFramesOpenRequest;
|
|
1380
|
+
} | {
|
|
1381
|
+
$case: "agentUpdateApply";
|
|
1382
|
+
agentUpdateApply: AgentUpdateApplyRequest;
|
|
1279
1383
|
} | undefined;
|
|
1280
1384
|
}
|
|
1281
1385
|
/** Wraps an op-specific response, or an error. `request_id` echoes the request. */
|
|
@@ -1292,9 +1396,6 @@ export interface ControlResponse {
|
|
|
1292
1396
|
} | {
|
|
1293
1397
|
$case: "resume";
|
|
1294
1398
|
resume: ResumeResponse;
|
|
1295
|
-
} | {
|
|
1296
|
-
$case: "exec";
|
|
1297
|
-
exec: ExecResponse;
|
|
1298
1399
|
} | {
|
|
1299
1400
|
$case: "fsRead";
|
|
1300
1401
|
fsRead: FsReadResponse;
|
|
@@ -1369,6 +1470,9 @@ export interface ControlResponse {
|
|
|
1369
1470
|
} | {
|
|
1370
1471
|
$case: "computerFramesOpen";
|
|
1371
1472
|
computerFramesOpen: ComputerFramesOpenResponse;
|
|
1473
|
+
} | {
|
|
1474
|
+
$case: "agentUpdateApply";
|
|
1475
|
+
agentUpdateApply: AgentUpdateApplyResponse;
|
|
1372
1476
|
} | undefined;
|
|
1373
1477
|
}
|
|
1374
1478
|
/**
|
|
@@ -1394,6 +1498,9 @@ export interface AgentEvent {
|
|
|
1394
1498
|
} | {
|
|
1395
1499
|
$case: "goingOffline";
|
|
1396
1500
|
goingOffline: GoingOffline;
|
|
1501
|
+
} | {
|
|
1502
|
+
$case: "agentUpdateProgress";
|
|
1503
|
+
agentUpdateProgress: AgentUpdateProgress;
|
|
1397
1504
|
} | undefined;
|
|
1398
1505
|
}
|
|
1399
1506
|
/** The control plane's ack of an AgentEvent (e.g. a HeartbeatAck). */
|
|
@@ -1515,6 +1622,7 @@ export declare const DeviceAuthStartResponse: MessageFns<DeviceAuthStartResponse
|
|
|
1515
1622
|
export declare const DeviceAuthPollRequest: MessageFns<DeviceAuthPollRequest>;
|
|
1516
1623
|
export declare const DeviceAuthPollResponse: MessageFns<DeviceAuthPollResponse>;
|
|
1517
1624
|
export declare const EnrollmentCredentials: MessageFns<EnrollmentCredentials>;
|
|
1625
|
+
export declare const OperationResourcePolicy: MessageFns<OperationResourcePolicy>;
|
|
1518
1626
|
export declare const ExecRequest: MessageFns<ExecRequest>;
|
|
1519
1627
|
export declare const ExecRequest_EnvEntry: MessageFns<ExecRequest_EnvEntry>;
|
|
1520
1628
|
export declare const ExecResponse: MessageFns<ExecResponse>;
|
|
@@ -1576,6 +1684,9 @@ export declare const UpdateManifest: MessageFns<UpdateManifest>;
|
|
|
1576
1684
|
export declare const UpdateArtifact: MessageFns<UpdateArtifact>;
|
|
1577
1685
|
export declare const UpdateMayProceedRequest: MessageFns<UpdateMayProceedRequest>;
|
|
1578
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>;
|
|
1579
1690
|
export declare const OpExit: MessageFns<OpExit>;
|
|
1580
1691
|
export declare const OpExit_DigestsEntry: MessageFns<OpExit_DigestsEntry>;
|
|
1581
1692
|
export declare const OpExit_TotalsEntry: MessageFns<OpExit_TotalsEntry>;
|