@opengeni/agent-proto 0.4.0 → 0.5.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.
@@ -588,6 +588,15 @@ export interface PtyOpenRequest {
588
588
  rows: number;
589
589
  /** The TERM value to advertise (e.g. "xterm-256color"). */
590
590
  term: string;
591
+ /**
592
+ * Stable caller-owned identity for an idempotent terminal. Repeating pty_open
593
+ * with the same non-empty scope_id returns the existing live PTY/channel rather
594
+ * than spawning another shell. Empty preserves the explicit "open a new PTY"
595
+ * behavior. The control plane uses the durable OpenGeni session id here so
596
+ * capability/token refreshes reattach the same terminal while separate sessions
597
+ * on one machine remain isolated.
598
+ */
599
+ scopeId: string;
591
600
  }
592
601
  export interface PtyOpenRequest_EnvEntry {
593
602
  key: string;
package/dist/index.js CHANGED
@@ -4250,7 +4250,7 @@ var GitFileStatus = {
4250
4250
  }
4251
4251
  };
4252
4252
  function createBasePtyOpenRequest() {
4253
- return { command: [], cwd: "", env: {}, cols: 0, rows: 0, term: "" };
4253
+ return { command: [], cwd: "", env: {}, cols: 0, rows: 0, term: "", scopeId: "" };
4254
4254
  }
4255
4255
  var PtyOpenRequest = {
4256
4256
  encode(message, writer = new BinaryWriter()) {
@@ -4272,6 +4272,9 @@ var PtyOpenRequest = {
4272
4272
  if (message.term !== "") {
4273
4273
  writer.uint32(50).string(message.term);
4274
4274
  }
4275
+ if (message.scopeId !== "") {
4276
+ writer.uint32(58).string(message.scopeId);
4277
+ }
4275
4278
  return writer;
4276
4279
  },
4277
4280
  decode(input, length) {
@@ -4326,6 +4329,13 @@ var PtyOpenRequest = {
4326
4329
  message.term = reader.string();
4327
4330
  continue;
4328
4331
  }
4332
+ case 7: {
4333
+ if (tag !== 58) {
4334
+ break;
4335
+ }
4336
+ message.scopeId = reader.string();
4337
+ continue;
4338
+ }
4329
4339
  }
4330
4340
  if ((tag & 7) === 4 || tag === 0) {
4331
4341
  break;
@@ -4347,7 +4357,8 @@ var PtyOpenRequest = {
4347
4357
  ) : {},
4348
4358
  cols: isSet(object.cols) ? globalThis.Number(object.cols) : 0,
4349
4359
  rows: isSet(object.rows) ? globalThis.Number(object.rows) : 0,
4350
- term: isSet(object.term) ? globalThis.String(object.term) : ""
4360
+ term: isSet(object.term) ? globalThis.String(object.term) : "",
4361
+ scopeId: isSet(object.scopeId) ? globalThis.String(object.scopeId) : isSet(object.scope_id) ? globalThis.String(object.scope_id) : ""
4351
4362
  };
4352
4363
  },
4353
4364
  toJSON(message) {
@@ -4376,6 +4387,9 @@ var PtyOpenRequest = {
4376
4387
  if (message.term !== "") {
4377
4388
  obj.term = message.term;
4378
4389
  }
4390
+ if (message.scopeId !== "") {
4391
+ obj.scopeId = message.scopeId;
4392
+ }
4379
4393
  return obj;
4380
4394
  },
4381
4395
  create(base) {
@@ -4397,6 +4411,7 @@ var PtyOpenRequest = {
4397
4411
  message.cols = object.cols ?? 0;
4398
4412
  message.rows = object.rows ?? 0;
4399
4413
  message.term = object.term ?? "";
4414
+ message.scopeId = object.scopeId ?? "";
4400
4415
  return message;
4401
4416
  }
4402
4417
  };