@lazehq/cli 0.1.140 → 0.1.141

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.
Files changed (2) hide show
  1. package/dist/laze.mjs +900 -455
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -844,8 +844,8 @@ var require_node_gyp_build = __commonJS({
844
844
  } catch (err) {
845
845
  }
846
846
  if (!prebuildsOnly) {
847
- var release2 = getFirst(path.join(dir, "build/Release"), matchBuild);
848
- if (release2) return release2;
847
+ var release3 = getFirst(path.join(dir, "build/Release"), matchBuild);
848
+ if (release3) return release3;
849
849
  var debug = getFirst(path.join(dir, "build/Debug"), matchBuild);
850
850
  if (debug) return debug;
851
851
  }
@@ -11254,7 +11254,7 @@ var require_client_h1 = __commonJS({
11254
11254
  * @param {number} len
11255
11255
  * @returns {number}
11256
11256
  */
11257
- wasm_on_url: (p, at8, len) => {
11257
+ wasm_on_url: (p, at9, len) => {
11258
11258
  return 0;
11259
11259
  },
11260
11260
  /**
@@ -11263,9 +11263,9 @@ var require_client_h1 = __commonJS({
11263
11263
  * @param {number} len
11264
11264
  * @returns {number}
11265
11265
  */
11266
- wasm_on_status: (p, at8, len) => {
11266
+ wasm_on_status: (p, at9, len) => {
11267
11267
  assert2(currentParser.ptr === p);
11268
- const start2 = at8 - currentBufferPtr + currentBufferRef.byteOffset;
11268
+ const start2 = at9 - currentBufferPtr + currentBufferRef.byteOffset;
11269
11269
  return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start2, len));
11270
11270
  },
11271
11271
  /**
@@ -11282,9 +11282,9 @@ var require_client_h1 = __commonJS({
11282
11282
  * @param {number} len
11283
11283
  * @returns {number}
11284
11284
  */
11285
- wasm_on_header_field: (p, at8, len) => {
11285
+ wasm_on_header_field: (p, at9, len) => {
11286
11286
  assert2(currentParser.ptr === p);
11287
- const start2 = at8 - currentBufferPtr + currentBufferRef.byteOffset;
11287
+ const start2 = at9 - currentBufferPtr + currentBufferRef.byteOffset;
11288
11288
  return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start2, len));
11289
11289
  },
11290
11290
  /**
@@ -11293,9 +11293,9 @@ var require_client_h1 = __commonJS({
11293
11293
  * @param {number} len
11294
11294
  * @returns {number}
11295
11295
  */
11296
- wasm_on_header_value: (p, at8, len) => {
11296
+ wasm_on_header_value: (p, at9, len) => {
11297
11297
  assert2(currentParser.ptr === p);
11298
- const start2 = at8 - currentBufferPtr + currentBufferRef.byteOffset;
11298
+ const start2 = at9 - currentBufferPtr + currentBufferRef.byteOffset;
11299
11299
  return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start2, len));
11300
11300
  },
11301
11301
  /**
@@ -11315,9 +11315,9 @@ var require_client_h1 = __commonJS({
11315
11315
  * @param {number} len
11316
11316
  * @returns {number}
11317
11317
  */
11318
- wasm_on_body: (p, at8, len) => {
11318
+ wasm_on_body: (p, at9, len) => {
11319
11319
  assert2(currentParser.ptr === p);
11320
- const start2 = at8 - currentBufferPtr + currentBufferRef.byteOffset;
11320
+ const start2 = at9 - currentBufferPtr + currentBufferRef.byteOffset;
11321
11321
  return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start2, len));
11322
11322
  },
11323
11323
  /**
@@ -31077,15 +31077,15 @@ ${value}`;
31077
31077
  pos = 0;
31078
31078
  }
31079
31079
  }
31080
- discardLeadingBytes(count17) {
31081
- while (count17 > 0 && this.lineChunkIndex < this.chunks.length) {
31080
+ discardLeadingBytes(count18) {
31081
+ while (count18 > 0 && this.lineChunkIndex < this.chunks.length) {
31082
31082
  const chunk = this.chunks[this.lineChunkIndex];
31083
31083
  const remaining = chunk.length - this.linePos;
31084
- if (count17 < remaining) {
31085
- this.linePos += count17;
31086
- count17 = 0;
31084
+ if (count18 < remaining) {
31085
+ this.linePos += count18;
31086
+ count18 = 0;
31087
31087
  } else {
31088
- count17 -= remaining;
31088
+ count18 -= remaining;
31089
31089
  this.lineChunkIndex++;
31090
31090
  this.linePos = 0;
31091
31091
  }
@@ -31723,15 +31723,15 @@ function pairsIn({
31723
31723
  end,
31724
31724
  out
31725
31725
  }) {
31726
- let at8 = start2;
31727
- while (at8 < end) {
31728
- const next = text3.indexOf("&", at8);
31726
+ let at9 = start2;
31727
+ while (at9 < end) {
31728
+ const next = text3.indexOf("&", at9);
31729
31729
  const stop3 = next === -1 || next > end ? end : next;
31730
- const pair = text3.slice(at8, stop3);
31730
+ const pair = text3.slice(at9, stop3);
31731
31731
  const equals = pair.indexOf("=");
31732
- if (equals === -1) out.push({ start: at8, end: stop3, name: "" });
31733
- else out.push({ start: at8 + equals + 1, end: stop3, name: pair.slice(0, equals) });
31734
- at8 = stop3 + 1;
31732
+ if (equals === -1) out.push({ start: at9, end: stop3, name: "" });
31733
+ else out.push({ start: at9 + equals + 1, end: stop3, name: pair.slice(0, equals) });
31734
+ at9 = stop3 + 1;
31735
31735
  }
31736
31736
  }
31737
31737
  function segmentsIn({
@@ -31789,8 +31789,8 @@ function isRecordIdValue(value) {
31789
31789
  const prefix2 = RECORD_ID.exec(value)?.[1];
31790
31790
  return prefix2 !== void 0 && !CREDENTIAL_ID_PREFIXES.has(prefix2);
31791
31791
  }
31792
- function isPlainRecordId({ text: text3, at: at8 }) {
31793
- return !isSecretParameterName(at8.name) && isRecordIdValue(text3.slice(at8.start, at8.end));
31792
+ function isPlainRecordId({ text: text3, at: at9 }) {
31793
+ return !isSecretParameterName(at9.name) && isRecordIdValue(text3.slice(at9.start, at9.end));
31794
31794
  }
31795
31795
  function isSecretParameterValue(value) {
31796
31796
  if (value.length < 8) return false;
@@ -31834,8 +31834,8 @@ function shannonEntropyBits(value) {
31834
31834
  const counts = /* @__PURE__ */ new Map();
31835
31835
  for (const char of sample) counts.set(char, (counts.get(char) ?? 0) + 1);
31836
31836
  let entropy = 0;
31837
- for (const count17 of counts.values()) {
31838
- const p = count17 / sample.length;
31837
+ for (const count18 of counts.values()) {
31838
+ const p = count18 / sample.length;
31839
31839
  entropy -= p * Math.log2(p);
31840
31840
  }
31841
31841
  return entropy;
@@ -32095,8 +32095,8 @@ var SECRET_RULE_IDS = [
32095
32095
  URL_PARAMETER_RULE_ID
32096
32096
  ];
32097
32097
  function keptLengthAtBoundary(match) {
32098
- const at8 = match.search(/["'`]/);
32099
- return at8 === -1 ? match.length : at8;
32098
+ const at9 = match.search(/["'`]/);
32099
+ return at9 === -1 ? match.length : at9;
32100
32100
  }
32101
32101
  function valueSpan(rule, match) {
32102
32102
  const fullStart = match.index ?? 0;
@@ -32406,41 +32406,41 @@ var FILE_EXTENSION = /^\.[A-Za-z][A-Za-z0-9]{0,7}$/;
32406
32406
  function isPathShapeMatch({
32407
32407
  text: text3,
32408
32408
  match,
32409
- at: at8
32409
+ at: at9
32410
32410
  }) {
32411
- if (match.end > at8.end) {
32411
+ if (match.end > at9.end) {
32412
32412
  const rule = RULES.find((candidate) => candidate.id === match.ruleId);
32413
- return !rule || rawMatches(rule, text3.slice(at8.start, at8.end)).length === 0;
32413
+ return !rule || rawMatches(rule, text3.slice(at9.start, at9.end)).length === 0;
32414
32414
  }
32415
- return FILE_EXTENSION.test(text3.slice(match.end, at8.end));
32415
+ return FILE_EXTENSION.test(text3.slice(match.end, at9.end));
32416
32416
  }
32417
32417
  function placedInLink({
32418
32418
  text: text3,
32419
32419
  match,
32420
32420
  urlValues
32421
32421
  }) {
32422
- const at8 = urlValueAt({ values: urlValues, offset: match.start });
32423
- if (!at8) return [match];
32422
+ const at9 = urlValueAt({ values: urlValues, offset: match.start });
32423
+ if (!at9) return [match];
32424
32424
  const shape = SHAPE_RULE_IDS.has(match.ruleId);
32425
- if (shape && isPlainRecordId({ text: text3, at: at8 })) return [];
32426
- if (shape && !isSecretParameterName(at8.name) && isPathShapeMatch({ text: text3, match, at: at8 })) return [];
32427
- const secretName = isSecretParameterName(at8.name);
32428
- const named = secretName && shape ? { parameter: at8.name } : {};
32425
+ if (shape && isPlainRecordId({ text: text3, at: at9 })) return [];
32426
+ if (shape && !isSecretParameterName(at9.name) && isPathShapeMatch({ text: text3, match, at: at9 })) return [];
32427
+ const secretName = isSecretParameterName(at9.name);
32428
+ const named = secretName && shape ? { parameter: at9.name } : {};
32429
32429
  return [
32430
- { ...match, ...named, spanStart: at8.start, start: at8.start, end: at8.end, spanEnd: at8.end }
32430
+ { ...match, ...named, spanStart: at9.start, start: at9.start, end: at9.end, spanEnd: at9.end }
32431
32431
  ];
32432
32432
  }
32433
32433
  function secretParameterValues({
32434
32434
  text: text3,
32435
32435
  urlValues
32436
32436
  }) {
32437
- return urlValues.filter((at8) => isSecretParameterName(at8.name)).filter((at8) => isSecretParameterValue(text3.slice(at8.start, at8.end))).map((at8) => ({
32437
+ return urlValues.filter((at9) => isSecretParameterName(at9.name)).filter((at9) => isSecretParameterValue(text3.slice(at9.start, at9.end))).map((at9) => ({
32438
32438
  ruleId: URL_PARAMETER_RULE_ID,
32439
- spanStart: at8.start,
32440
- start: at8.start,
32441
- end: at8.end,
32442
- spanEnd: at8.end,
32443
- parameter: at8.name
32439
+ spanStart: at9.start,
32440
+ start: at9.start,
32441
+ end: at9.end,
32442
+ spanEnd: at9.end,
32443
+ parameter: at9.name
32444
32444
  }));
32445
32445
  }
32446
32446
  function withExtension({ text: text3, match }) {
@@ -32663,17 +32663,17 @@ function createRedactor({ values }) {
32663
32663
  let carry = "";
32664
32664
  const scan = (text3, limit) => {
32665
32665
  let out = "";
32666
- let at8 = 0;
32666
+ let at9 = 0;
32667
32667
  pattern.lastIndex = 0;
32668
32668
  for (const match of text3.matchAll(pattern)) {
32669
32669
  if (match.index >= limit) break;
32670
- if (match.index < at8) continue;
32671
- out += text3.slice(at8, match.index) + REDACTED;
32672
- at8 = match.index + match[0].length;
32670
+ if (match.index < at9) continue;
32671
+ out += text3.slice(at9, match.index) + REDACTED;
32672
+ at9 = match.index + match[0].length;
32673
32673
  }
32674
- const emitUntil = Math.max(at8, limit);
32674
+ const emitUntil = Math.max(at9, limit);
32675
32675
  carry = text3.slice(emitUntil);
32676
- return out + text3.slice(at8, emitUntil);
32676
+ return out + text3.slice(at9, emitUntil);
32677
32677
  };
32678
32678
  return {
32679
32679
  push(chunk) {
@@ -36905,10 +36905,10 @@ function heldBackLineOf({
36905
36905
  var CLI_RELEASE_HEADER = "x-laze-cli-release";
36906
36906
  var STAMP = /^(\d+)\.(\d+)\.(\d+)(?:-g([0-9a-f]+))?$/;
36907
36907
  function releaseSkewOf({
36908
- mine: mine5,
36908
+ mine: mine6,
36909
36909
  server
36910
36910
  }) {
36911
- const have = STAMP.exec(mine5);
36911
+ const have = STAMP.exec(mine6);
36912
36912
  const ships = STAMP.exec(server);
36913
36913
  if (!have || !ships) return null;
36914
36914
  for (const part of [1, 2, 3]) {
@@ -36918,51 +36918,51 @@ function releaseSkewOf({
36918
36918
  return have[4] && ships[4] && have[4] !== ships[4] ? "other_build" : null;
36919
36919
  }
36920
36920
  function releaseWarningOf({
36921
- mine: mine5,
36921
+ mine: mine6,
36922
36922
  server,
36923
36923
  sandbox
36924
36924
  }) {
36925
- const skew = releaseSkewOf({ mine: mine5, server });
36925
+ const skew = releaseSkewOf({ mine: mine6, server });
36926
36926
  if (!skew || skew === "other_build") return null;
36927
36927
  if (sandbox) {
36928
- return `laze: this CLI is ${mine5}, but the server ships ${server}. Laze updates the computer's CLI each time the agent connects, so restart the agent if this stays.
36928
+ return `laze: this CLI is ${mine6}, but the server ships ${server}. Laze updates the computer's CLI each time the agent connects, so restart the agent if this stays.
36929
36929
  `;
36930
36930
  }
36931
36931
  if (skew === "newer") {
36932
- return `laze: this CLI is ${mine5}, newer than the server's ${server}; a command the server does not have yet fails.
36932
+ return `laze: this CLI is ${mine6}, newer than the server's ${server}; a command the server does not have yet fails.
36933
36933
  `;
36934
36934
  }
36935
- return `laze: this CLI is ${mine5}, older than the server's ${server}. Update it with npm i -g ${CLI_PACKAGE_LATEST} (or laze update).
36935
+ return `laze: this CLI is ${mine6}, older than the server's ${server}. Update it with npm i -g ${CLI_PACKAGE_LATEST} (or laze update).
36936
36936
  `;
36937
36937
  }
36938
36938
  function selfUpdateLineOf({
36939
- mine: mine5,
36939
+ mine: mine6,
36940
36940
  server,
36941
36941
  manager
36942
36942
  }) {
36943
- return `laze: this CLI is ${mine5}, older than the server's ${server}. Updating it in the background with ${manager}; the next command runs the new one (LAZE_AUTO_UPDATE=0 turns this off).
36943
+ return `laze: this CLI is ${mine6}, older than the server's ${server}. Updating it in the background with ${manager}; the next command runs the new one (LAZE_AUTO_UPDATE=0 turns this off).
36944
36944
  `;
36945
36945
  }
36946
36946
 
36947
36947
  // src/rules/cli-installs.rules.ts
36948
36948
  function newerInstallsOf({
36949
- mine: mine5,
36949
+ mine: mine6,
36950
36950
  installs
36951
36951
  }) {
36952
36952
  return installs.filter(
36953
- (install) => install.version !== null && releaseSkewOf({ mine: mine5, server: install.version }) === "older"
36953
+ (install) => install.version !== null && releaseSkewOf({ mine: mine6, server: install.version }) === "older"
36954
36954
  );
36955
36955
  }
36956
36956
  function newerInstallLineOf({
36957
- mine: mine5,
36957
+ mine: mine6,
36958
36958
  script,
36959
36959
  installs
36960
36960
  }) {
36961
- const newer = newerInstallsOf({ mine: mine5, installs });
36961
+ const newer = newerInstallsOf({ mine: mine6, installs });
36962
36962
  const [first] = newer;
36963
36963
  if (!first) return null;
36964
36964
  const others = newer.map((install) => `laze ${install.version} at ${install.path}`).join(", ");
36965
- return `laze: this is laze ${mine5} at ${script}, but a newer ${others} is installed. A shell runs the first laze on PATH: run ${first.path} by its path, or remove the older one.
36965
+ return `laze: this is laze ${mine6} at ${script}, but a newer ${others} is installed. A shell runs the first laze on PATH: run ${first.path} by its path, or remove the older one.
36966
36966
  `;
36967
36967
  }
36968
36968
  function shadowedLineOf({
@@ -36984,7 +36984,7 @@ function shadowedLinkLineOf({ shadow }) {
36984
36984
  }
36985
36985
 
36986
36986
  // src/rules/cli-version.rules.ts
36987
- var STAMPED = "0.1.140";
36987
+ var STAMPED = "0.1.141";
36988
36988
  function cliVersionOf({ stamped = STAMPED } = {}) {
36989
36989
  return stamped.startsWith("__") ? "dev" : stamped;
36990
36990
  }
@@ -37061,10 +37061,10 @@ async function otherInstallsOf({ context }) {
37061
37061
  }
37062
37062
  async function noteNewerInstall({
37063
37063
  context,
37064
- mine: mine5 = cliVersionOf()
37064
+ mine: mine6 = cliVersionOf()
37065
37065
  }) {
37066
37066
  const { script, others } = await otherInstallsOf({ context });
37067
- const line = newerInstallLineOf({ mine: mine5, script, installs: others });
37067
+ const line = newerInstallLineOf({ mine: mine6, script, installs: others });
37068
37068
  if (line) context.err(line);
37069
37069
  }
37070
37070
  async function rerunCommandOf({
@@ -38873,14 +38873,14 @@ function codePointLength(str) {
38873
38873
  const units = str.length;
38874
38874
  if (!highSurrogate.test(str))
38875
38875
  return units;
38876
- let count17 = units;
38876
+ let count18 = units;
38877
38877
  for (let i = 0; i < units - 1; i++) {
38878
38878
  if ((str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320) {
38879
- count17--;
38879
+ count18--;
38880
38880
  i++;
38881
38881
  }
38882
38882
  }
38883
- return count17;
38883
+ return count18;
38884
38884
  }
38885
38885
  function getLengthableOrigin(input2) {
38886
38886
  if (Array.isArray(input2))
@@ -43235,8 +43235,8 @@ function az_default() {
43235
43235
  }
43236
43236
 
43237
43237
  // ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/be.js
43238
- function getBelarusianPlural(count17, one, few, many) {
43239
- const absCount = Math.abs(count17);
43238
+ function getBelarusianPlural(count18, one, few, many) {
43239
+ const absCount = Math.abs(count18);
43240
43240
  const lastDigit = absCount % 10;
43241
43241
  const lastTwoDigits = absCount % 100;
43242
43242
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -45883,8 +45883,8 @@ function hu_default() {
45883
45883
  }
45884
45884
 
45885
45885
  // ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hy.js
45886
- function getArmenianPlural(count17, one, many) {
45887
- return Math.abs(count17) === 1 ? one : many;
45886
+ function getArmenianPlural(count18, one, many) {
45887
+ return Math.abs(count18) === 1 ? one : many;
45888
45888
  }
45889
45889
  function withDefiniteArticle(word3) {
45890
45890
  if (!word3)
@@ -48622,8 +48622,8 @@ function ro_default() {
48622
48622
  }
48623
48623
 
48624
48624
  // ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ru.js
48625
- function getRussianPlural(count17, one, few, many) {
48626
- const absCount = Math.abs(count17);
48625
+ function getRussianPlural(count18, one, few, many) {
48626
+ const absCount = Math.abs(count18);
48627
48627
  const lastDigit = absCount % 10;
48628
48628
  const lastTwoDigits = absCount % 100;
48629
48629
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -60756,6 +60756,7 @@ var VAULT_GMAIL_SEND_PATHS = [
60756
60756
  ];
60757
60757
  var VAULT_MAX_LEASE_SECONDS = 2 * 86400;
60758
60758
  var VAULT_LONGEST_LEASE_SECONDS = 7 * 86400;
60759
+ var VAULT_MONTH_LEASE_SECONDS = 30 * 86400;
60759
60760
  var VAULT_LEASE_CHOICES = [
60760
60761
  15 * 60,
60761
60762
  3600,
@@ -61136,6 +61137,8 @@ var vaultApprovalRequestSchemaDefinition = external_exports.object({
61136
61137
  connectionTitle: external_exports.string().nullable().default(null),
61137
61138
  /** The longest lease Allow for this agent offers; null offers only once and deny. */
61138
61139
  maxLeaseSeconds: external_exports.number().int().positive().nullable().default(null),
61140
+ /** The More menu's "Allow for 30 days for this agent"; null when the key may not give it. */
61141
+ monthLeaseSeconds: external_exports.number().int().positive().nullish(),
61139
61142
  /** Allow covers the rest of the agent's turn ("Allow once" on a task card), not one command. */
61140
61143
  coversTask: external_exports.boolean().optional(),
61141
61144
  /** Who asks when it is a session outside Laze, not an agent: "Claude Code session on pat-mac". */
@@ -61148,7 +61151,7 @@ var answerVaultApprovalInputSchemaDefinition = external_exports.object({
61148
61151
  workspaceId: external_exports.string().min(1),
61149
61152
  requestId: external_exports.string().min(1),
61150
61153
  answer: external_exports.enum(["approve_once", "approve_for_agent", "deny"]),
61151
- /** Allow for this agent only: up to the connection's admin maximum. */
61154
+ /** Allow for this agent only: up to the connection's admin maximum, or the card's 30 days. */
61152
61155
  durationSeconds: external_exports.number().int().positive().optional(),
61153
61156
  via: vaultAnswerViaSchema,
61154
61157
  /** A short reason, question or steer for the agent, sent with the answer. */
@@ -61527,6 +61530,8 @@ var vaultApprovalRequestedPayloadSchemaDefinition = external_exports.object({
61527
61530
  why: external_exports.string(),
61528
61531
  /** The longest lease the card may offer; null offers only once and deny. */
61529
61532
  maxLeaseSeconds: external_exports.number().int().positive().nullable(),
61533
+ /** "Allow for 30 days for this agent" from the card's More menu; null when not offered. */
61534
+ monthLeaseSeconds: external_exports.number().int().positive().nullish(),
61530
61535
  expiresAt: external_exports.iso.datetime(),
61531
61536
  /** The thread the agent was answering in; null when it answered in the channel. */
61532
61537
  threadRootId: external_exports.string().nullable().default(null),
@@ -62082,15 +62087,15 @@ function clustersIn({
62082
62087
  const out = [];
62083
62088
  let current3 = null;
62084
62089
  for (let index = segment.start; index <= segment.end; index += 1) {
62085
- const count17 = flagged[index] ?? 0;
62086
- if (count17 === 0) continue;
62090
+ const count18 = flagged[index] ?? 0;
62091
+ if (count18 === 0) continue;
62087
62092
  if (current3 && index - current3.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
62088
62093
  current3.end = index;
62089
- current3.values += count17;
62094
+ current3.values += count18;
62090
62095
  continue;
62091
62096
  }
62092
62097
  if (current3) out.push(current3);
62093
- current3 = { start: index, end: index, values: count17 };
62098
+ current3 = { start: index, end: index, values: count18 };
62094
62099
  }
62095
62100
  if (current3) out.push(current3);
62096
62101
  return out;
@@ -62117,10 +62122,10 @@ function redactedBlocksAt({
62117
62122
  }) {
62118
62123
  const lines2 = text3.split("\n");
62119
62124
  const starts = [];
62120
- let at8 = 0;
62125
+ let at9 = 0;
62121
62126
  for (const line of lines2) {
62122
- starts.push(at8);
62123
- at8 += line.length + 1;
62127
+ starts.push(at9);
62128
+ at9 += line.length + 1;
62124
62129
  }
62125
62130
  const lineAt = (offset) => starts.findLastIndex((start2) => start2 <= offset);
62126
62131
  const flagged = lines2.map(() => 0);
@@ -62130,7 +62135,7 @@ function redactedBlocksAt({
62130
62135
  }
62131
62136
  const blocks = redactedBlocks({ lines: lines2, flagged });
62132
62137
  const inside = (line) => blocks.some((block2) => line >= block2.start && line <= block2.end);
62133
- const values = flagged.reduce((sum, count17, line) => inside(line) ? sum + count17 : sum, 0);
62138
+ const values = flagged.reduce((sum, count18, line) => inside(line) ? sum + count18 : sum, 0);
62134
62139
  return { values, insideAt: (offset) => inside(lineAt(offset)) };
62135
62140
  }
62136
62141
 
@@ -62189,6 +62194,21 @@ var vaultAppUseAnswerSchemaDefinition = external_exports.discriminatedUnion("dec
62189
62194
  external_exports.object({ decision: external_exports.literal("deny"), code: external_exports.string(), message: external_exports.string() })
62190
62195
  ]);
62191
62196
 
62197
+ // ../../modules/vault/contract/src/vault-status-probe.ts
62198
+ var vaultStatusJudgeSchemaDefinition = external_exports.object({
62199
+ /** VAULT_JUDGE_ENABLED is on and a judge key is set. */
62200
+ isOn: external_exports.boolean(),
62201
+ /** The judge answered the made-up question. */
62202
+ isReady: external_exports.boolean(),
62203
+ /** What the judge's endpoint answered; null when it did not answer at all. */
62204
+ httpStatus: external_exports.number().int().nullable(),
62205
+ /** The host the judge calls: OpenAI's EU host or the LangWatch gateway. */
62206
+ endpointHost: external_exports.string(),
62207
+ checkedAt: external_exports.iso.datetime(),
62208
+ /** The answer came from the last check, made under VAULT_STATUS_PROBE_CACHE_MINUTES ago. */
62209
+ isCached: external_exports.boolean()
62210
+ });
62211
+
62192
62212
  // ../../modules/vault/contract/src/vault-watch.ts
62193
62213
  var count = external_exports.number().nonnegative().max(1e15);
62194
62214
  var countMap = external_exports.record(external_exports.string().max(128), count).nullish().transform((value) => value ?? {});
@@ -63558,6 +63578,10 @@ var attentionCardSchemaDefinition = external_exports.object({
63558
63578
  canAlwaysAllow: external_exports.boolean(),
63559
63579
  /** How long "Allow for this agent" lasts, shown on the button; null when not known. */
63560
63580
  alwaysLeaseSeconds: external_exports.number().int().positive().nullable().default(null),
63581
+ /** A vault card's More menu "Allow for 30 days for this agent"; null when not offered. */
63582
+ monthLeaseSeconds: external_exports.number().int().positive().nullish(),
63583
+ /** The vault key a card asks for, so its More menu opens that key's settings. */
63584
+ vaultConnectionId: external_exports.string().nullish(),
63561
63585
  /** A vault card whose "Allow once" covers the rest of the agent's turn. */
63562
63586
  allowCoversTask: external_exports.boolean().optional(),
63563
63587
  /** The vault's request id when the card is a vault approval; null for a harness question. */
@@ -64805,7 +64829,9 @@ var searchInputSchemaDefinition = external_exports.object({
64805
64829
  query: external_exports.string().trim().min(1).max(300),
64806
64830
  limit: external_exports.number().int().min(1).max(50).default(20),
64807
64831
  /** Newest first (the default), or the best matches among the newest 200 first. */
64808
- sort: external_exports.enum(["recent", "relevance"]).optional()
64832
+ sort: external_exports.enum(["recent", "relevance"]).optional(),
64833
+ /** Only this conversation; one the reader cannot read finds nothing. */
64834
+ channelId: idSchema4.optional()
64809
64835
  });
64810
64836
  var searchInputSchema = searchInputSchemaDefinition;
64811
64837
  var startUploadInputSchemaDefinition = external_exports.object({
@@ -65345,7 +65371,9 @@ var inProgressAskSchemaDefinition = external_exports.object({
65345
65371
  /** A working turn waits on an approval card the reader can answer. */
65346
65372
  waiting: external_exports.boolean().default(false),
65347
65373
  startedAt: external_exports.iso.datetime(),
65348
- endedAt: external_exports.iso.datetime().nullable()
65374
+ endedAt: external_exports.iso.datetime().nullable(),
65375
+ /** What the reader has not read in the place: the conversation's, or the thread's replies. */
65376
+ unread: external_exports.number().int().nonnegative().default(0)
65349
65377
  });
65350
65378
  var inProgressListSchemaDefinition = external_exports.object({ asks: external_exports.array(inProgressAskSchemaDefinition) });
65351
65379
  var inProgressListSchema = inProgressListSchemaDefinition;
@@ -66656,6 +66684,17 @@ var observeSenderInputSchemaDefinition = external_exports.object({
66656
66684
  name: external_exports.string().trim().min(1).max(200),
66657
66685
  avatarUrl: external_exports.string().max(2e3).nullable().default(null)
66658
66686
  });
66687
+ var linkMirrorSenderInputSchemaDefinition = external_exports.object({
66688
+ workspaceId: external_exports.string().min(1),
66689
+ identity: external_exports.string().min(1).max(64),
66690
+ personId: external_exports.string().min(1).max(64)
66691
+ });
66692
+ var unlinkMirrorSenderInputSchemaDefinition = external_exports.object({
66693
+ workspaceId: external_exports.string().min(1),
66694
+ identity: external_exports.string().min(1).max(64),
66695
+ personId: external_exports.string().min(1).max(64),
66696
+ originKeyPrefix: external_exports.string().min(3).max(100)
66697
+ });
66659
66698
 
66660
66699
  // ../../modules/chat/contract/src/chat.read-ops.ts
66661
66700
  var count6 = external_exports.number().int().nonnegative();
@@ -66750,6 +66789,33 @@ var linkDomainFactsDefinition = external_exports.object({
66750
66789
  });
66751
66790
  var linkDomainFactsSchema = linkDomainFactsDefinition;
66752
66791
 
66792
+ // ../../modules/chat/contract/src/chat.author-ops.ts
66793
+ var count8 = external_exports.number().int().nonnegative();
66794
+ var at2 = external_exports.iso.datetime();
66795
+ var conversationAuthorDefinition = external_exports.object({
66796
+ kind: external_exports.enum(["person", "agent", "external"]),
66797
+ /** A person's user id, an agent's id, or a mirrored sender's identity such as `slack:T1:U1`. */
66798
+ id: external_exports.string(),
66799
+ /** The mirror that brought the messages in, or null for messages written in Laze. */
66800
+ source: external_exports.string().nullable(),
66801
+ messageCount: count8,
66802
+ firstAt: at2,
66803
+ lastAt: at2
66804
+ });
66805
+ var authoredConversationDefinition = external_exports.object({
66806
+ channelId: external_exports.string(),
66807
+ kind: external_exports.string(),
66808
+ /** The mirror's source, or null for a Laze conversation. */
66809
+ source: external_exports.string().nullable(),
66810
+ agentId: external_exports.string().nullable(),
66811
+ lastMessageAt: at2.nullable(),
66812
+ authors: external_exports.array(conversationAuthorDefinition).max(50)
66813
+ });
66814
+ var chatAuthorFactsDefinition = external_exports.object({
66815
+ conversations: external_exports.array(authoredConversationDefinition).max(20)
66816
+ });
66817
+ var chatAuthorFactsSchema = chatAuthorFactsDefinition;
66818
+
66753
66819
  // ../../modules/workspace/contract/src/sign-up-source.ts
66754
66820
  var TAG = /^[\p{L}\p{N} ._\-+:/@|]{1,100}$/u;
66755
66821
  var PERSONA = /^[a-z0-9-]{1,40}$/;
@@ -67777,8 +67843,6 @@ var agentSandboxSpecSchemaDefinition = external_exports.object({
67777
67843
  mainChannelId: external_exports.string().regex(/^[a-zA-Z0-9_-]+$/).optional(),
67778
67844
  /** Where the harness runs: a Laze computer when absent, else the owner's own machine. */
67779
67845
  host: external_exports.object({ kind: external_exports.literal("machine"), machineId: external_exports.string().min(1) }).optional(),
67780
- /** A personal agent's owner: their dedicated IP's route applies to this agent. */
67781
- routeOwnerUserId: external_exports.string().min(1).optional(),
67782
67846
  /** Set by the runtime from the workspace's plan: egress applies the Free plan's rules. */
67783
67847
  freePlan: external_exports.boolean().optional(),
67784
67848
  /** A migrated agent's imported session, used when its main session first starts. */
@@ -67961,7 +68025,10 @@ var computerPlacementSchemaDefinition = external_exports.object({
67961
68025
  });
67962
68026
  var setEgressRouteInputDefinition = external_exports.object({
67963
68027
  workspaceId: external_exports.string().min(1),
68028
+ /** The computer key: a person's user id for their default computer, else the computer's id. */
67964
68029
  ownerUserId: external_exports.string().min(1),
68030
+ /** Whose keychain holds the key, when not `ownerUserId`. */
68031
+ holderUserId: external_exports.string().min(1).optional(),
67965
68032
  route: external_exports.object({
67966
68033
  /** The `human_only` connection in the owner's keychain holding host, port and credentials. */
67967
68034
  vaultConnectionId: external_exports.string().min(1),
@@ -69057,7 +69124,9 @@ var answerAttentionInputSchemaDefinition = external_exports.object({
69057
69124
  answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string().max(4e3)).max(20)).default({}),
69058
69125
  resolutionNote: resolutionNoteSchema2,
69059
69126
  /** Where the person answered a vault card from; a browser leaves it out. */
69060
- via: external_exports.enum(["channel", "ios"]).optional()
69127
+ via: external_exports.enum(["channel", "ios"]).optional(),
69128
+ /** "always" on a vault card for the card's 30 days instead of the key's own length. */
69129
+ durationSeconds: external_exports.number().int().positive().optional()
69061
69130
  });
69062
69131
  var answerAttentionInputSchema = answerAttentionInputSchemaDefinition;
69063
69132
  var askAgentApprovalInputSchemaDefinition = external_exports.object({
@@ -69344,7 +69413,9 @@ var startConversationInputSchemaDefinition = external_exports.object({
69344
69413
  body: firstMessageSchema,
69345
69414
  clientKey: clientKeySchema,
69346
69415
  /** A message the starter may read: the first message quotes it, as a forward does. */
69347
- contextMessageId: idSchema8.optional()
69416
+ contextMessageId: idSchema8.optional(),
69417
+ /** Picked before the first send: added as Add people adds them, before the message posts. */
69418
+ members: addMembersInputSchema.shape.members.optional()
69348
69419
  });
69349
69420
  var startConversationInputSchema = startConversationInputSchemaDefinition;
69350
69421
  var openConversationInputSchemaDefinition = external_exports.object({
@@ -69381,6 +69452,12 @@ var conversationSummarySchemaDefinition2 = external_exports.object({
69381
69452
  url: lazeUrlSchema.optional()
69382
69453
  });
69383
69454
  var conversationSummarySchema2 = conversationSummarySchemaDefinition2;
69455
+ var toggledConversationSchemaDefinition = external_exports.object({
69456
+ ...conversationSummarySchemaDefinition2.shape,
69457
+ workspaceId: workspaceIdSchema4,
69458
+ kind: external_exports.literal("chat")
69459
+ });
69460
+ var toggledConversationSchema = toggledConversationSchemaDefinition;
69384
69461
  var startConversationAsCallerInputSchemaDefinition = external_exports.object({
69385
69462
  agent: agentRefSchema3,
69386
69463
  text: firstMessageSchema,
@@ -70728,6 +70805,10 @@ var langwatchSurfaces = defineSurfaces(langwatchTrpc, {
70728
70805
  setMine: { rest: "langwatchMine", cli: "langwatch mine" }
70729
70806
  });
70730
70807
 
70808
+ // ../../modules/langwatch/contract/src/langwatch.ui.ts
70809
+ var langwatchUi = uiTokens("langwatch");
70810
+ var LangwatchInvestigateSlot = langwatchUi.component("investigate");
70811
+
70731
70812
  // ../../modules/agent/contract/src/agent-langwatch.ts
70732
70813
  var agentRefSchema4 = external_exports.string().trim().min(1).max(80);
70733
70814
  var workspaceIdSchema6 = external_exports.string().min(1);
@@ -72582,7 +72663,7 @@ var agentRunsOnTrpc = defineTrpcContract("agents").mutation("setRunsOn").withInp
72582
72663
  var agentWelcomeTrpc = defineTrpcContract("agents").mutation("pressWelcome").withInput(pressWelcomeInputSchema).withOutput(pressedWelcomeSchema).mutation("pressCollab").withInput(pressCollabInputSchema).withOutput(pressedCollabSchema).build();
72583
72664
  var agentPoolGroupTrpc = defineTrpcContract("agents").mutation("addPoolGroup").withInput(poolGroupInputSchema).withOutput(loginPoolsSchema).mutation("removePoolGroup").withInput(poolGroupInputSchema).withOutput(loginPoolsSchema).build();
72584
72665
  var agentOpenConversationTrpc = defineTrpcContract("agents").mutation("openConversation").withInput(openConversationInputSchema).withOutput(external_exports.object({ channelId: idSchema19 })).build();
72585
- var agentConversationCloseTrpc = defineTrpcContract("agents").mutation("closeConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("reopenConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("convertConversation").withInput(convertConversationInputSchema).withOutput(convertedConversationSchema).build();
72666
+ var agentConversationCloseTrpc = defineTrpcContract("agents").mutation("closeConversation").withInput(conversationInputSchema).withOutput(toggledConversationSchema).mutation("reopenConversation").withInput(conversationInputSchema).withOutput(toggledConversationSchema).mutation("convertConversation").withInput(convertConversationInputSchema).withOutput(convertedConversationSchema).build();
72586
72667
  var agentShareRequestTrpc = defineTrpcContract("agents").mutation("askShare").withInput(askAgentShareInputSchema).withOutput(agentAccessSchema).mutation("cancelShareAsk").withInput(cancelAgentShareAskInputSchema).withOutput(agentAccessSchema).build();
72587
72668
  var agentUsageActivityTrpc = defineTrpcContract("agents").query("usageActivity").withInput(agentUsageActivityInputSchema).withOutput(agentUsageActivitySchema).query("monthSpend").withInput(agentMonthSpendInputSchema).withOutput(agentMonthSpendSchema).query("spendCuts").withInput(agentSpendInputSchema).withOutput(agentSpendCutsSchema).build();
72588
72669
  var agentReconnectTrpc = defineTrpcContract("agents").query("reconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(agentReconnectSchema).build();
@@ -74700,10 +74781,10 @@ function whereOf(message2) {
74700
74781
  }
74701
74782
  function catchUpLinesOf(message2) {
74702
74783
  if (!message2.catchUp) return [];
74703
- const { count: count17, older } = message2.catchUp;
74784
+ const { count: count18, older } = message2.catchUp;
74704
74785
  const where = whereOf(message2);
74705
74786
  const lines2 = [
74706
- `${count17} ${count17 === 1 ? "message" : "messages"} in ${where} while you were away.`
74787
+ `${count18} ${count18 === 1 ? "message" : "messages"} in ${where} while you were away.`
74707
74788
  ];
74708
74789
  if (older === 0) return lines2;
74709
74790
  const channel = message2.channelKind === "public" || message2.channelKind === "private";
@@ -74731,9 +74812,9 @@ function hookContextOf({
74731
74812
  messages,
74732
74813
  self: self2
74733
74814
  }) {
74734
- const count17 = messages.length === 1 ? "A message" : `${messages.length} messages`;
74815
+ const count18 = messages.length === 1 ? "A message" : `${messages.length} messages`;
74735
74816
  return [
74736
- `${count17} reached you in Laze${selfClauseOf({ self: self2 })}:`,
74817
+ `${count18} reached you in Laze${selfClauseOf({ self: self2 })}:`,
74737
74818
  "",
74738
74819
  ...messages.map((message2) => formatInboxMessage({ message: message2 })),
74739
74820
  "",
@@ -74748,7 +74829,7 @@ function selfClauseOf({ self: self2 }) {
74748
74829
  function record2(value) {
74749
74830
  return typeof value === "object" && value !== null ? value : {};
74750
74831
  }
74751
- function count8(value) {
74832
+ function count9(value) {
74752
74833
  return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
74753
74834
  }
74754
74835
  function parse3(line) {
@@ -74784,17 +74865,17 @@ function compactionOf({
74784
74865
  return {
74785
74866
  key: typeof entry2.uuid === "string" ? entry2.uuid : String(index),
74786
74867
  trigger: meta3.trigger === "manual" ? "manual" : "auto",
74787
- tokensBefore: count8(meta3.preTokens),
74788
- tokensAfter: count8(meta3.postTokens),
74868
+ tokensBefore: count9(meta3.preTokens),
74869
+ tokensAfter: count9(meta3.postTokens),
74789
74870
  at: typeof entry2.timestamp === "string" ? entry2.timestamp : "1970-01-01T00:00:00.000Z"
74790
74871
  };
74791
74872
  }
74792
74873
  function usageOf({ entry: entry2 }) {
74793
74874
  const message2 = record2(entry2.message);
74794
74875
  const usage2 = record2(message2.usage);
74795
- const input2 = count8(usage2.input_tokens);
74876
+ const input2 = count9(usage2.input_tokens);
74796
74877
  if (input2 === void 0) return void 0;
74797
- const cached2 = (count8(usage2.cache_read_input_tokens) ?? 0) + (count8(usage2.cache_creation_input_tokens) ?? 0);
74878
+ const cached2 = (count9(usage2.cache_read_input_tokens) ?? 0) + (count9(usage2.cache_creation_input_tokens) ?? 0);
74798
74879
  return {
74799
74880
  tokens: input2 + cached2,
74800
74881
  ...typeof message2.model === "string" ? { model: message2.model } : {}
@@ -75330,6 +75411,24 @@ var slackBotCleanupOutcomePayloadSchemaDefinition = external_exports.object({
75330
75411
  slackChannelId: external_exports.string().min(1),
75331
75412
  outcome: external_exports.enum(["left", "kept", "failed"])
75332
75413
  });
75414
+ var slackPersonMatchedPayloadSchemaDefinition = external_exports.object({
75415
+ workspaceId: external_exports.string().min(1),
75416
+ teamId: external_exports.string().min(1),
75417
+ slackUserId: external_exports.string().min(1),
75418
+ userId: external_exports.string().min(1),
75419
+ by: external_exports.enum(["link", "email"])
75420
+ });
75421
+ var slackPersonUnmatchRequestedPayloadSchemaDefinition = external_exports.object({
75422
+ workspaceId: external_exports.string().min(1),
75423
+ teamId: external_exports.string().min(1),
75424
+ slackUserId: external_exports.string().min(1),
75425
+ operatorId: external_exports.string().min(1).max(200),
75426
+ runId: external_exports.string().min(1)
75427
+ });
75428
+ var slackPeopleMatchRequestedPayloadSchemaDefinition = external_exports.object({
75429
+ workspaceId: external_exports.string().min(1),
75430
+ runId: external_exports.string().min(1)
75431
+ });
75333
75432
  var slackLinkedPayloadSchemaDefinition = external_exports.object({
75334
75433
  workspaceId: external_exports.string().min(1),
75335
75434
  /** The Laze person who finished the flow. */
@@ -75699,8 +75798,8 @@ var slackConfig = Config.define((c) => ({
75699
75798
  }));
75700
75799
 
75701
75800
  // ../../modules/slack/contract/src/slack-ops.ts
75702
- var count9 = external_exports.number().int().nonnegative();
75703
- var at2 = external_exports.iso.datetime();
75801
+ var count10 = external_exports.number().int().nonnegative();
75802
+ var at3 = external_exports.iso.datetime();
75704
75803
  var slackMirrorHealthDefinition = external_exports.object({
75705
75804
  mirrors: external_exports.array(
75706
75805
  external_exports.object({
@@ -75712,19 +75811,19 @@ var slackMirrorHealthDefinition = external_exports.object({
75712
75811
  /** Shared with another organisation, such as a Slack Connect channel. */
75713
75812
  external: external_exports.boolean(),
75714
75813
  botMember: external_exports.boolean(),
75715
- linkedMembers: count9,
75716
- cacheDays: count9,
75717
- backfilledAt: at2.nullable(),
75718
- reconciledAt: at2.nullable(),
75814
+ linkedMembers: count10,
75815
+ cacheDays: count10,
75816
+ backfilledAt: at3.nullable(),
75817
+ reconciledAt: at3.nullable(),
75719
75818
  /** Message links Laze holds for the conversation, both ways. */
75720
- links: count9,
75819
+ links: count10,
75721
75820
  /** Thread roots Laze holds a reply of. */
75722
- threads: count9,
75821
+ threads: count10,
75723
75822
  /** Roots whose Slack reply count, when last read, is above the replies Laze holds. */
75724
- threadsShort: count9,
75725
- repliesShort: count9,
75823
+ threadsShort: count10,
75824
+ repliesShort: count10,
75726
75825
  /** Threads Laze holds whose root is older than the cache window. */
75727
- oldThreads: count9
75826
+ oldThreads: count10
75728
75827
  })
75729
75828
  )
75730
75829
  });
@@ -75735,10 +75834,10 @@ var DURATION = /^(\d+)\s*(m|min|mins|minutes?|h|hours?|d|days?)$/i;
75735
75834
  function minutesOf({ text: text3 }) {
75736
75835
  const match = DURATION.exec(text3.trim());
75737
75836
  if (!match?.[1] || !match[2]) return null;
75738
- const count17 = Number(match[1]);
75837
+ const count18 = Number(match[1]);
75739
75838
  const unit = match[2].toLowerCase()[0];
75740
75839
  const perUnit = { d: 1440, h: 60, m: 1 };
75741
- const minutes = count17 * (perUnit[unit ?? "m"] ?? 1);
75840
+ const minutes = count18 * (perUnit[unit ?? "m"] ?? 1);
75742
75841
  return minutes > 0 ? minutes : null;
75743
75842
  }
75744
75843
  function muteTextOf({ mute }) {
@@ -75951,7 +76050,7 @@ function slackHitLines({
75951
76050
  ...link3 ? [` ${link3}`] : []
75952
76051
  ];
75953
76052
  }
75954
- var count10 = (n) => `${n} message${n === 1 ? "" : "s"}`;
76053
+ var count11 = (n) => `${n} message${n === 1 ? "" : "s"}`;
75955
76054
  function slackSectionLines({
75956
76055
  slack: slack2,
75957
76056
  laze,
@@ -75964,7 +76063,7 @@ function slackSectionLines({
75964
76063
  });
75965
76064
  if (slack2.teams.some((team) => team.state === "searched")) {
75966
76065
  const found = slack2.hits.length;
75967
- lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${count10(found)}`);
76066
+ lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${count11(found)}`);
75968
76067
  }
75969
76068
  for (const hit of slack2.hits) lines2.push(...slackHitLines({ hit, laze, url: url2, workspaceId }), "");
75970
76069
  return lines2;
@@ -75975,7 +76074,7 @@ function formatSearch({
75975
76074
  workspaceId
75976
76075
  }) {
75977
76076
  const { laze, slack: slack2, query } = output2;
75978
- const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${count10(laze.hits.length)} for "${query}"`];
76077
+ const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${count11(laze.hits.length)} for "${query}"`];
75979
76078
  for (const hit of laze.hits) {
75980
76079
  lines2.push(...lazeHitLines({ hit, laze, url: url2, workspaceId }), "");
75981
76080
  }
@@ -76007,8 +76106,8 @@ function lastCallAtOf({ text: text3, command }) {
76007
76106
  } catch {
76008
76107
  continue;
76009
76108
  }
76010
- const at8 = callAtOf({ entry: entry2, command });
76011
- if (at8 !== null) return at8;
76109
+ const at9 = callAtOf({ entry: entry2, command });
76110
+ if (at9 !== null) return at9;
76012
76111
  }
76013
76112
  return null;
76014
76113
  }
@@ -76031,7 +76130,7 @@ function newestIsSubagent({
76031
76130
  session,
76032
76131
  subagents
76033
76132
  }) {
76034
- const newest = Math.max(...subagents.map((at8) => at8 ?? Number.NEGATIVE_INFINITY));
76133
+ const newest = Math.max(...subagents.map((at9) => at9 ?? Number.NEGATIVE_INFINITY));
76035
76134
  return Number.isFinite(newest) && newest >= (session ?? Number.NEGATIVE_INFINITY);
76036
76135
  }
76037
76136
 
@@ -76091,8 +76190,8 @@ import { appendFile, mkdir as mkdir2 } from "node:fs/promises";
76091
76190
  import { dirname as dirname5, join as join6 } from "node:path";
76092
76191
  async function logDelivery({ context, line }) {
76093
76192
  const folder = join6(dirname5(context.environment.configPath), "connect");
76094
- const at8 = Temporal3.Instant.fromEpochMilliseconds(context.nowMs());
76095
- const stamped = `${at8.toString({ smallestUnit: "second" })} ${line}
76193
+ const at9 = Temporal3.Instant.fromEpochMilliseconds(context.nowMs());
76194
+ const stamped = `${at9.toString({ smallestUnit: "second" })} ${line}
76096
76195
  `;
76097
76196
  context.out(stamped);
76098
76197
  await mkdir2(folder, { recursive: true, mode: 448 });
@@ -76162,11 +76261,11 @@ async function sessionNotesOf({
76162
76261
  dropped.push(await dropStale({ context, pid, path, tell }));
76163
76262
  continue;
76164
76263
  }
76165
- const at8 = await stat2(path).then(
76264
+ const at9 = await stat2(path).then(
76166
76265
  (info) => info.mtimeMs,
76167
76266
  () => 0
76168
76267
  );
76169
- notes.push({ pid, note, standing, at: at8 });
76268
+ notes.push({ pid, note, standing, at: at9 });
76170
76269
  }
76171
76270
  return { notes: notes.toSorted((a, b) => b.at - a.at), dropped };
76172
76271
  }
@@ -76436,9 +76535,9 @@ async function settleProfile({
76436
76535
  const here = bound && bound.host === hostname5() ? bound.key : void 0;
76437
76536
  return context.store.update((config2) => {
76438
76537
  const sessions = config2.sessions ?? {};
76439
- const mine5 = Object.keys(sessions).filter((key) => sessions[key] === profile);
76538
+ const mine6 = Object.keys(sessions).filter((key) => sessions[key] === profile);
76440
76539
  if (bound === null) {
76441
- return { result: `${profile}: bound to no session in Laze; ${mine5.length} kept` };
76540
+ return { result: `${profile}: bound to no session in Laze; ${mine6.length} kept` };
76442
76541
  }
76443
76542
  const taken = here && sessions[here] && sessions[here] !== profile;
76444
76543
  const kept = Object.fromEntries(
@@ -76446,7 +76545,7 @@ async function settleProfile({
76446
76545
  );
76447
76546
  const next = here && !taken ? { ...kept, [here]: profile } : kept;
76448
76547
  const where = here ?? `${bound.key} on ${bound.host}`;
76449
- const line = taken ? `${profile}: Laze binds it to ${here}, which this machine binds to ${sessions[here]}; left unbound here` : `${profile}: listens in ${where}; dropped ${mine5.filter((key) => key !== here).length} other sessions`;
76548
+ const line = taken ? `${profile}: Laze binds it to ${here}, which this machine binds to ${sessions[here]}; left unbound here` : `${profile}: listens in ${where}; dropped ${mine6.filter((key) => key !== here).length} other sessions`;
76450
76549
  return { result: line, config: { ...config2, sessions: next } };
76451
76550
  });
76452
76551
  }
@@ -76839,8 +76938,8 @@ var AT_USAGE = `--at takes a date and time such as 2026-10-20T09:00, read in --t
76839
76938
  such as Europe/Amsterdam) or this machine's zone; a time with its own offset is taken as written.`;
76840
76939
  var OFFSET = /(Z|[+-]\d{2}(:?\d{2})?)$/i;
76841
76940
  var DATE_AND_TIME = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;
76842
- function sendAtOf({ at: at8, timeZone }) {
76843
- const text3 = at8.trim();
76941
+ function sendAtOf({ at: at9, timeZone }) {
76942
+ const text3 = at9.trim();
76844
76943
  if (!DATE_AND_TIME.test(text3)) return null;
76845
76944
  try {
76846
76945
  if (OFFSET.test(text3)) return Temporal3.Instant.from(text3.replace(" ", "T")).toString();
@@ -76904,9 +77003,9 @@ function scheduleAtOf({
76904
77003
  usage: usage2
76905
77004
  }) {
76906
77005
  if (args.flags.at === void 0 && args.flags.tz === void 0) return null;
76907
- const at8 = flagText({ args, name: "at" });
77006
+ const at9 = flagText({ args, name: "at" });
76908
77007
  const timeZone = flagText({ args, name: "tz" }) || currentTimeZone();
76909
- const sendAt = at8 ? sendAtOf({ at: at8, timeZone }) : null;
77008
+ const sendAt = at9 ? sendAtOf({ at: at9, timeZone }) : null;
76910
77009
  if (!sendAt) throw new CliUsageError(`${usage2}
76911
77010
  ${AT_USAGE}`);
76912
77011
  return { sendAt, timeZone };
@@ -76915,19 +77014,19 @@ async function scheduleMessage({
76915
77014
  context,
76916
77015
  args,
76917
77016
  client,
76918
- at: at8,
77017
+ at: at9,
76919
77018
  target,
76920
77019
  body
76921
77020
  }) {
76922
77021
  const scheduled2 = await client.post("/api/agents/me/scheduled", {
76923
77022
  ...target,
76924
77023
  body,
76925
- sendAt: at8.sendAt,
77024
+ sendAt: at9.sendAt,
76926
77025
  ..."replyTo" in target && args.flags["also-channel"] === true ? { alsoInChannel: true } : {}
76927
77026
  });
76928
77027
  if (args.flags.json) context.out(`${JSON.stringify(scheduled2, null, 2)}
76929
77028
  `);
76930
- else context.out(scheduledLine({ scheduled: scheduled2, timeZone: at8.timeZone }));
77029
+ else context.out(scheduledLine({ scheduled: scheduled2, timeZone: at9.timeZone }));
76931
77030
  return void 0;
76932
77031
  }
76933
77032
  var USAGE = "Usage: laze scheduled [--channel <channel>] [--json], laze scheduled send|cancel <id>, laze scheduled edit <id> [--text <text|->] [--at <time> [--tz <zone>]]";
@@ -76968,18 +77067,18 @@ async function editOne({
76968
77067
  args,
76969
77068
  id: id8
76970
77069
  }) {
76971
- const at8 = scheduleAtOf({ args, usage: EDIT_USAGE });
77070
+ const at9 = scheduleAtOf({ args, usage: EDIT_USAGE });
76972
77071
  const body = await newTextOf({ context, args });
76973
- if (!at8 && body === void 0) throw new CliUsageError(EDIT_USAGE);
77072
+ if (!at9 && body === void 0) throw new CliUsageError(EDIT_USAGE);
76974
77073
  const { client } = await signedIn({ context, args });
76975
77074
  const edited = await client.post("/api/agents/me/scheduled/edit", {
76976
77075
  scheduledId: id8,
76977
77076
  ...body === void 0 ? {} : { body },
76978
- ...at8 ? { sendAt: at8.sendAt } : {}
77077
+ ...at9 ? { sendAt: at9.sendAt } : {}
76979
77078
  });
76980
77079
  if (args.flags.json) return context.out(`${JSON.stringify(edited, null, 2)}
76981
77080
  `);
76982
- const timeZone = at8?.timeZone ?? currentTimeZone();
77081
+ const timeZone = at9?.timeZone ?? currentTimeZone();
76983
77082
  context.out(scheduledLine({ scheduled: edited, timeZone }).replace(/^Scheduled /, "Updated "));
76984
77083
  }
76985
77084
  async function actOn({
@@ -77187,12 +77286,12 @@ async function filesOf({
77187
77286
  context,
77188
77287
  args,
77189
77288
  client,
77190
- at: at8,
77289
+ at: at9,
77191
77290
  channel
77192
77291
  }) {
77193
77292
  const sources = fileSourcesOf({ args, what: "A message" });
77194
77293
  if (sources.length === 0) return {};
77195
- if (at8) throw new CliUsageError("A scheduled message (--at) cannot carry --image or --file yet");
77294
+ if (at9) throw new CliUsageError("A scheduled message (--at) cannot carry --image or --file yet");
77196
77295
  const attachmentIds = await attachmentIdsOf({ context, client, sources, channel });
77197
77296
  return { attachmentIds };
77198
77297
  }
@@ -77211,17 +77310,17 @@ async function post({
77211
77310
  }) {
77212
77311
  const channel = args.words[1];
77213
77312
  if (!channel) throw new CliUsageError(POST_USAGE);
77214
- const at8 = scheduleAtOf({ args, usage: POST_USAGE });
77313
+ const at9 = scheduleAtOf({ args, usage: POST_USAGE });
77215
77314
  const { client, profile } = await signedIn({ context, args });
77216
77315
  const typed = await textOf({ context, args, from: 2 });
77217
77316
  const leaves = leavesLazeOf({ client, channel });
77218
77317
  const body = await textToSend({ context, args, profile, client, text: typed, leaves });
77219
77318
  const thread2 = flagText({ args, name: "thread" });
77220
77319
  const via = viaOf({ args, usage: POST_USAGE });
77221
- const files3 = await filesOf({ context, args, client, at: at8, channel: async () => channel });
77222
- if (at8) {
77320
+ const files3 = await filesOf({ context, args, client, at: at9, channel: async () => channel });
77321
+ if (at9) {
77223
77322
  const target = { channel, ...thread2 ? { threadRootId: thread2 } : {} };
77224
- return scheduleMessage({ context, args, client, at: at8, target, body });
77323
+ return scheduleMessage({ context, args, client, at: at9, target, body });
77225
77324
  }
77226
77325
  const posted = await keyedPost({
77227
77326
  client,
@@ -77253,7 +77352,7 @@ async function reply({
77253
77352
  }) {
77254
77353
  const messageId = args.words[1];
77255
77354
  if (!messageId) throw new CliUsageError(REPLY_USAGE);
77256
- const at8 = scheduleAtOf({ args, usage: REPLY_USAGE });
77355
+ const at9 = scheduleAtOf({ args, usage: REPLY_USAGE });
77257
77356
  const { client, profile, name: name3 } = await signedIn({ context, args });
77258
77357
  const channel = flagText({ args, name: "channel" });
77259
77358
  const via = viaOf({ args, usage: REPLY_USAGE });
@@ -77264,11 +77363,11 @@ async function reply({
77264
77363
  context,
77265
77364
  args,
77266
77365
  client,
77267
- at: at8,
77366
+ at: at9,
77268
77367
  channel: () => replyChannelOf({ client, messageId, channel })
77269
77368
  });
77270
- if (at8) {
77271
- return scheduleMessage({ context, args, client, at: at8, target: { replyTo: messageId }, body });
77369
+ if (at9) {
77370
+ return scheduleMessage({ context, args, client, at: at9, target: { replyTo: messageId }, body });
77272
77371
  }
77273
77372
  const posted = await keyedPost({
77274
77373
  client,
@@ -77442,8 +77541,8 @@ function windowOf2(value) {
77442
77541
  return Number.isInteger(tokens) && tokens > 0 ? tokens : void 0;
77443
77542
  }
77444
77543
  function modelFlagOf(args) {
77445
- const at8 = args?.indexOf("--model") ?? -1;
77446
- if (at8 >= 0) return args?.[at8 + 1];
77544
+ const at9 = args?.indexOf("--model") ?? -1;
77545
+ if (at9 >= 0) return args?.[at9 + 1];
77447
77546
  return args?.find((arg) => arg.startsWith("--model="))?.slice("--model=".length);
77448
77547
  }
77449
77548
  async function claudeRunOf({
@@ -78763,8 +78862,8 @@ async function waiterOf({
78763
78862
  }) {
78764
78863
  const lock = statePathOf({ context, kind: "waiters", profile });
78765
78864
  const waiter = await jsonOf(lock);
78766
- const mine5 = waiter?.sessionId === key.slice(key.indexOf(":") + 1);
78767
- return waiter && mine5 && context.processes.alive(waiter.pid) ? waiter.pid : void 0;
78865
+ const mine6 = waiter?.sessionId === key.slice(key.indexOf(":") + 1);
78866
+ return waiter && mine6 && context.processes.alive(waiter.pid) ? waiter.pid : void 0;
78768
78867
  }
78769
78868
  async function rearmRushGuards({ context }) {
78770
78869
  let started = 0;
@@ -79563,8 +79662,8 @@ async function takeLock({
79563
79662
  const self2 = context.processes.pid;
79564
79663
  if (holder && holder.pid !== self2 && context.processes.alive(holder.pid)) {
79565
79664
  const served = await holderClaudeOf({ context, holder });
79566
- const mine5 = preempt && served === claudePid && !holder.monitor;
79567
- if (served && context.processes.alive(served) && !mine5) return false;
79665
+ const mine6 = preempt && served === claudePid && !holder.monitor;
79666
+ if (served && context.processes.alive(served) && !mine6) return false;
79568
79667
  context.processes.stop(holder.pid);
79569
79668
  }
79570
79669
  const value = {
@@ -80451,6 +80550,8 @@ Your owner keeps API keys and passwords in the Laze vault. Use them only through
80451
80550
  - \`laze vault run <name> --reason "<one plain sentence>" -- <command>\` runs the command with the
80452
80551
  key's fields as environment variables. To put a value in an argument, let a shell expand it
80453
80552
  inside the run: \`-- sh -c 'curl -H "Authorization: Bearer $OPENAI_API_KEY" <url>'\`.
80553
+ When a command needs several keys, name them all in one run (\`laze vault run a b c --reason ...\`):
80554
+ your owner answers one card instead of one per key.
80454
80555
  - \`laze vault env --reason "<one plain sentence>" -- <command>\` runs it with every key a
80455
80556
  \`.env.vault\` file names (\`--env <x>\` reads \`.env.<x>.vault\`, \`--names\` shows what each line
80456
80557
  resolves to, never a value).
@@ -80939,10 +81040,10 @@ var SESSION_SCRUB_MAX_LINE = VAULT_SESSION_SCRUB_MAX_LINE;
80939
81040
  function completeLinesOf({ chunk, from }) {
80940
81041
  const lines2 = [];
80941
81042
  let start2 = 0;
80942
- for (let at8 = chunk.indexOf(10); at8 !== -1; at8 = chunk.indexOf(10, start2)) {
80943
- const text3 = chunk.subarray(start2, at8).toString("utf8");
80944
- lines2.push({ at: from + start2, text: text3, bytes: at8 - start2 });
80945
- start2 = at8 + 1;
81043
+ for (let at9 = chunk.indexOf(10); at9 !== -1; at9 = chunk.indexOf(10, start2)) {
81044
+ const text3 = chunk.subarray(start2, at9).toString("utf8");
81045
+ lines2.push({ at: from + start2, text: text3, bytes: at9 - start2 });
81046
+ start2 = at9 + 1;
80946
81047
  }
80947
81048
  return { lines: lines2, end: from + start2 };
80948
81049
  }
@@ -81018,9 +81119,9 @@ async function writeBack({ file: file4, rewrites }) {
81018
81119
  let cursor = first.line.at;
81019
81120
  let moved = 0;
81020
81121
  for (const { line, text: text3 } of grown) {
81021
- const at8 = line.at - first.line.at;
81022
- const original = tail.subarray(at8, at8 + line.bytes);
81023
- parts.push(tail.subarray(cursor - first.line.at, at8));
81122
+ const at9 = line.at - first.line.at;
81123
+ const original = tail.subarray(at9, at9 + line.bytes);
81124
+ parts.push(tail.subarray(cursor - first.line.at, at9));
81024
81125
  const keep2 = !original.equals(Buffer3.from(line.text));
81025
81126
  parts.push(keep2 ? original : Buffer3.from(text3));
81026
81127
  if (!keep2) moved += Buffer3.byteLength(text3) - line.bytes;
@@ -81038,10 +81139,10 @@ async function pastLongLine({
81038
81139
  size
81039
81140
  }) {
81040
81141
  const chunk = Buffer3.alloc(SESSION_SCRUB_READ_BYTES);
81041
- for (let at8 = from; at8 < size; at8 += chunk.length) {
81042
- const { bytesRead } = await file4.read(chunk, 0, chunk.length, at8);
81142
+ for (let at9 = from; at9 < size; at9 += chunk.length) {
81143
+ const { bytesRead } = await file4.read(chunk, 0, chunk.length, at9);
81043
81144
  const newline = chunk.subarray(0, bytesRead).indexOf(10);
81044
- if (newline !== -1) return at8 + newline + 1;
81145
+ if (newline !== -1) return at9 + newline + 1;
81045
81146
  }
81046
81147
  return from;
81047
81148
  }
@@ -83880,8 +83981,13 @@ var appMemberSourceSchemaDefinition = external_exports.object({
83880
83981
  ]),
83881
83982
  /** The channel, for `channel`: a pin there, a share with it, or the app's own channel. */
83882
83983
  channelId: external_exports.string().nullable(),
83883
- /** The channel's name, or `@name` of the group for `group`. */
83984
+ /**
83985
+ * The channel's name, or `@name` of the group for `group`. For a direct message, group or agent
83986
+ * conversation, the names of its members besides the reader. Null when the reader cannot see it.
83987
+ */
83884
83988
  channelName: external_exports.string().nullable(),
83989
+ /** The conversation's kind, for `channel`: a `#name` only for public and private channels. */
83990
+ channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]).nullable().optional(),
83885
83991
  /** Unused since agents stopped holding apps through their owner; always null. */
83886
83992
  ownerName: external_exports.string().nullable()
83887
83993
  });
@@ -84359,9 +84465,9 @@ function formatAppMoney({
84359
84465
  maximumFractionDigits: tiny ? 4 : 2
84360
84466
  }).format(amount);
84361
84467
  }
84362
- var count11 = new Intl.NumberFormat("en-US");
84468
+ var count12 = new Intl.NumberFormat("en-US");
84363
84469
  function plural2({ value, one, many }) {
84364
- return `${count11.format(value)} ${value === 1 ? one : many}`;
84470
+ return `${count12.format(value)} ${value === 1 ? one : many}`;
84365
84471
  }
84366
84472
  function appCostQuantityText(line) {
84367
84473
  const { quantity } = line;
@@ -85644,19 +85750,19 @@ function buildFileOf({ path, bytes }) {
85644
85750
  }
85645
85751
  var WEEKDAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
85646
85752
  function whenLabel({
85647
- at: at8,
85753
+ at: at9,
85648
85754
  now,
85649
85755
  timeZone
85650
85756
  }) {
85651
85757
  const zone = { timeZone: timeZone ?? currentTimeZone() };
85652
- const days = differenceInCalendarDays(now.epochMilliseconds, at8, zone);
85653
- const time3 = format(at8, "HH:mm", zone);
85758
+ const days = differenceInCalendarDays(now.epochMilliseconds, at9, zone);
85759
+ const time3 = format(at9, "HH:mm", zone);
85654
85760
  if (days === 0) return `Today ${time3}`;
85655
85761
  if (days === 1) return `Yesterday ${time3}`;
85656
85762
  if (days > 1 && days < 7) {
85657
- return `${WEEKDAYS[toZonedDateTime(at8, zone).dayOfWeek - 1] ?? ""} ${time3}`;
85763
+ return `${WEEKDAYS[toZonedDateTime(at9, zone).dayOfWeek - 1] ?? ""} ${time3}`;
85658
85764
  }
85659
- return format(at8, "d MMM HH:mm", zone);
85765
+ return format(at9, "d MMM HH:mm", zone);
85660
85766
  }
85661
85767
  function versionLine({
85662
85768
  version: version2,
@@ -85671,8 +85777,8 @@ function versionLine({
85671
85777
  }
85672
85778
  function messageOf({ args }) {
85673
85779
  const words = [...args.words];
85674
- const at8 = words.indexOf("-m");
85675
- const short = at8 >= 0 ? words.splice(at8, 2)[1] ?? "" : "";
85780
+ const at9 = words.indexOf("-m");
85781
+ const short = at9 >= 0 ? words.splice(at9, 2)[1] ?? "" : "";
85676
85782
  const long = typeof args.flags.message === "string" ? args.flags.message : "";
85677
85783
  return { message: (short || long).trim(), words };
85678
85784
  }
@@ -85728,19 +85834,19 @@ async function h264LevelOf(path) {
85728
85834
  try {
85729
85835
  const { size } = await file4.stat();
85730
85836
  const head = Buffer.alloc(16);
85731
- for (let at8 = 0; at8 + 8 <= size; ) {
85732
- await file4.read(head, 0, 16, at8);
85837
+ for (let at9 = 0; at9 + 8 <= size; ) {
85838
+ await file4.read(head, 0, 16, at9);
85733
85839
  let length = head.readUInt32BE(0);
85734
85840
  if (length === 1) length = Number(head.readBigUInt64BE(8));
85735
- if (length === 0) length = size - at8;
85841
+ if (length === 0) length = size - at9;
85736
85842
  if (length < 8) return null;
85737
85843
  if (head.toString("latin1", 4, 8) === "moov") {
85738
85844
  const moov = Buffer.alloc(Math.min(length, 64 * 1024 * 1024));
85739
- await file4.read(moov, 0, moov.byteLength, at8);
85845
+ await file4.read(moov, 0, moov.byteLength, at9);
85740
85846
  const box = moov.indexOf("avcC", 0, "latin1");
85741
85847
  return box === -1 || box + 8 > moov.byteLength ? null : moov[box + 7] ?? null;
85742
85848
  }
85743
- at8 += length;
85849
+ at9 += length;
85744
85850
  }
85745
85851
  return null;
85746
85852
  } finally {
@@ -86036,7 +86142,9 @@ async function handedOut({
86036
86142
  }
86037
86143
 
86038
86144
  // src/services/vault-commands.service.ts
86039
- var USAGE4 = `Usage: laze vault run <connection> --reason "<one plain sentence>" [--wait <s>] [--real-value] -- <command> [args...]
86145
+ var USAGE4 = `Usage: laze vault run <connection>... --reason "<one plain sentence>" [--wait <s>] [--real-value] -- <command> [args...]
86146
+ Name every key the command needs in one run: they ask on one card. Runs nested in each other
86147
+ (laze vault run a -- laze vault run b -- cmd) are read as one run of both keys.
86040
86148
  Runs the command with the connection's values in its environment, on a Laze agent's computer,
86041
86149
  on a machine it runs on, where a connected agent runs, or signed in as yourself, where it asks
86042
86150
  as the calling Claude Code, Codex, Kanban or terminal session.
@@ -86163,17 +86271,17 @@ async function releaseOf({ response }) {
86163
86271
  return JSON.parse(text3);
86164
86272
  }
86165
86273
  async function envOf({
86166
- release: release2,
86274
+ release: release3,
86167
86275
  run: run4
86168
86276
  }) {
86169
- if (!release2.sealed) return release2.env;
86277
+ if (!release3.sealed) return release3.env;
86170
86278
  const sealed = await openRunRelease({
86171
- release: release2.sealed,
86279
+ release: release3.sealed,
86172
86280
  runPrivateKey: run4.privateKey,
86173
86281
  runPublicKey: run4.publicKey,
86174
- requestId: release2.sealed.requestId
86282
+ requestId: release3.sealed.requestId
86175
86283
  });
86176
- return { ...release2.env, ...sealed };
86284
+ return { ...release3.env, ...sealed };
86177
86285
  }
86178
86286
  function deadlineOf({ args, nowMs: nowMs2 }) {
86179
86287
  const wait = flagText({ args, name: "wait" }) || (args.flags.wait === true ? args.words[3] : "");
@@ -86188,27 +86296,27 @@ async function untilAnswered({
86188
86296
  next,
86189
86297
  deadline
86190
86298
  }) {
86191
- let release2 = first;
86192
- while (release2.outcome === "ask") {
86299
+ let release3 = first;
86300
+ while (release3.outcome === "ask") {
86193
86301
  if (context.nowMs() + POLL_MS > deadline) {
86194
- context.err(`${release2.message}. Not approved yet; ask again later.
86302
+ context.err(`${release3.message}. Not approved yet; ask again later.
86195
86303
  `);
86196
86304
  return "capped";
86197
86305
  }
86198
- if (release2 === first) {
86199
- context.err(`${release2.message}. Waiting for an answer (cards expire after 24 hours)...
86306
+ if (release3 === first) {
86307
+ context.err(`${release3.message}. Waiting for an answer (cards expire after 24 hours)...
86200
86308
  `);
86201
86309
  }
86202
86310
  await context.sleep(POLL_MS);
86203
- release2 = await next(release2.requestId);
86311
+ release3 = await next(release3.requestId);
86204
86312
  }
86205
- return release2;
86313
+ return release3;
86206
86314
  }
86207
86315
  function leaseHolds({
86208
- release: release2,
86316
+ release: release3,
86209
86317
  nowMs: nowMs2
86210
86318
  }) {
86211
- const ends = release2.sealed?.leaseEndsAt;
86319
+ const ends = release3.sealed?.leaseEndsAt;
86212
86320
  return ends !== void 0 && Temporal3.Instant.from(ends).epochMilliseconds > nowMs2;
86213
86321
  }
86214
86322
  function standInFieldsOf({
@@ -86247,7 +86355,7 @@ async function vaultRelease({
86247
86355
  ...value && { value: true },
86248
86356
  ...realValue && { realValue: true }
86249
86357
  });
86250
- let release2;
86358
+ let release3;
86251
86359
  try {
86252
86360
  const first = await releaseOf({
86253
86361
  response: await reach({
@@ -86263,33 +86371,33 @@ async function vaultRelease({
86263
86371
  init: { method: "GET", headers }
86264
86372
  })
86265
86373
  });
86266
- release2 = await untilAnswered({ context, first, next, deadline });
86374
+ release3 = await untilAnswered({ context, first, next, deadline });
86267
86375
  } catch (error63) {
86268
86376
  if (!(error63 instanceof ServerGoneError)) throw error63;
86269
86377
  context.err(`${error63.message}. Run the command again to keep waiting.
86270
86378
  `);
86271
86379
  return { exitCode: 75 };
86272
86380
  }
86273
- return settled2({ context, release: release2, run: run4, keyPath });
86381
+ return settled2({ context, release: release3, run: run4, keyPath });
86274
86382
  }
86275
86383
  async function settled2({
86276
86384
  context,
86277
- release: release2,
86385
+ release: release3,
86278
86386
  run: run4,
86279
86387
  keyPath
86280
86388
  }) {
86281
- if (release2 === "capped") return { exitCode: 75 };
86282
- if (release2.outcome === "deny") {
86389
+ if (release3 === "capped") return { exitCode: 75 };
86390
+ if (release3.outcome === "deny") {
86283
86391
  await rm11(keyPath, { force: true });
86284
- context.err(`${release2.message}
86392
+ context.err(`${release3.message}
86285
86393
  `);
86286
- return { exitCode: release2.exitCode || 1 };
86394
+ return { exitCode: release3.exitCode || 1 };
86287
86395
  }
86288
- const values = await envOf({ release: release2, run: run4 });
86289
- if (!leaseHolds({ release: release2, nowMs: context.nowMs() })) await rm11(keyPath, { force: true });
86290
- if (release2.message) context.err(`${release2.message}
86396
+ const values = await envOf({ release: release3, run: run4 });
86397
+ if (!leaseHolds({ release: release3, nowMs: context.nowMs() })) await rm11(keyPath, { force: true });
86398
+ if (release3.message) context.err(`${release3.message}
86291
86399
  `);
86292
- return { env: values, ...release2.boundary && { boundary: release2.boundary } };
86400
+ return { env: values, ...release3.boundary && { boundary: release3.boundary } };
86293
86401
  }
86294
86402
  function refusedRelease(error63) {
86295
86403
  if (!(error63 instanceof LazeApiError)) throw error63;
@@ -86348,8 +86456,8 @@ async function keyRelease({
86348
86456
  giveUpAt: deadline,
86349
86457
  call: () => client.post(door.status, { requestId, ...door.extra })
86350
86458
  }).catch(refusedRelease);
86351
- const release2 = await untilAnswered({ context, first, next, deadline });
86352
- return settled2({ context, release: release2, run: run4, keyPath });
86459
+ const release3 = await untilAnswered({ context, first, next, deadline });
86460
+ return settled2({ context, release: release3, run: run4, keyPath });
86353
86461
  }
86354
86462
  async function vaultRun({
86355
86463
  context,
@@ -86460,8 +86568,8 @@ function channelOf({ context, args }) {
86460
86568
  const channel = flagText({ args, name: "channel" }) || context.environment.inherited.LAZE_CHANNEL;
86461
86569
  return channel ? { channel } : {};
86462
86570
  }
86463
- function word({ args, at: at8 }) {
86464
- const value = args.words[at8];
86571
+ function word({ args, at: at9 }) {
86572
+ const value = args.words[at9];
86465
86573
  if (!value) throw new CliUsageError(BROWSER_TAB_USAGE);
86466
86574
  return value;
86467
86575
  }
@@ -87260,8 +87368,8 @@ function json2({
87260
87368
  function withServeThemeScript(page) {
87261
87369
  const head = /<head(\s[^>]*)?>/i.exec(page);
87262
87370
  if (!head) return THEME_SCRIPT + page;
87263
- const at8 = head.index + head[0].length;
87264
- return page.slice(0, at8) + THEME_SCRIPT + page.slice(at8);
87371
+ const at9 = head.index + head[0].length;
87372
+ return page.slice(0, at9) + THEME_SCRIPT + page.slice(at9);
87265
87373
  }
87266
87374
  async function staticFile({
87267
87375
  folder,
@@ -87835,7 +87943,7 @@ var appWrite = async ({ context, args }) => {
87835
87943
  });
87836
87944
  };
87837
87945
  function seedLine(seeded) {
87838
- const created = Object.entries(seeded.created).map(([name3, count17]) => `${count17} in ${name3}`);
87946
+ const created = Object.entries(seeded.created).map(([name3, count18]) => `${count18} in ${name3}`);
87839
87947
  const parts = [
87840
87948
  created.length ? `Loaded starter records: ${created.join(", ")}.` : "",
87841
87949
  seeded.skipped.length ? `Left ${seeded.skipped.join(", ")} as it was: it already holds records.` : ""
@@ -88161,8 +88269,8 @@ function cardLine({ choice }) {
88161
88269
  var appCard = async ({ context, args }) => {
88162
88270
  const client = await appClient({ context, args });
88163
88271
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
88164
- const count17 = Number(flagText({ args, name: "rows", fallback: "5" }));
88165
- if (!Number.isInteger(count17) || count17 < 1 || count17 > 10) {
88272
+ const count18 = Number(flagText({ args, name: "rows", fallback: "5" }));
88273
+ if (!Number.isInteger(count18) || count18 < 1 || count18 > 10) {
88166
88274
  throw new CliUsageError("--rows is a whole number from 1 to 10");
88167
88275
  }
88168
88276
  const text3 = (name3) => flagText({ args, name: name3 }) || null;
@@ -88175,7 +88283,7 @@ var appCard = async ({ context, args }) => {
88175
88283
  collection: text3("collection"),
88176
88284
  filter: flagText({ args, name: "where" }) || flagText({ args, name: "filter" }),
88177
88285
  sort: flagText({ args, name: "sort" }),
88178
- rows: count17,
88286
+ rows: count18,
88179
88287
  caption: text3("caption")
88180
88288
  }
88181
88289
  });
@@ -89798,17 +89906,17 @@ async function screen({ context, args }) {
89798
89906
  async function status3({ context, args }) {
89799
89907
  const client = await computeClient({ context, args });
89800
89908
  const wanted = args.words[2];
89801
- const machines = (await client.get(PATHS2.machines)).filter(
89909
+ const machines2 = (await client.get(PATHS2.machines)).filter(
89802
89910
  (machine2) => (machine2.type !== "own" || machine2.sites.length > 0) && (!wanted || machine2.name === wanted)
89803
89911
  );
89804
- if (args.flags.json) return context.out(`${JSON.stringify(machines, null, 2)}
89912
+ if (args.flags.json) return context.out(`${JSON.stringify(machines2, null, 2)}
89805
89913
  `);
89806
- if (machines.length === 0)
89914
+ if (machines2.length === 0)
89807
89915
  return context.out(
89808
89916
  wanted ? `No machine named ${wanted}.
89809
89917
  ` : "No machines. `laze browser setup <site>` makes one.\n"
89810
89918
  );
89811
- for (const machine2 of machines) context.out(statusLine(machine2));
89919
+ for (const machine2 of machines2) context.out(statusLine(machine2));
89812
89920
  }
89813
89921
  async function change({
89814
89922
  context,
@@ -89873,9 +89981,9 @@ function presenceColumns(member) {
89873
89981
  return [member.presence, `${status11.emoji} ${status11.text}`.trim() + until, ...dndColumn(member)];
89874
89982
  }
89875
89983
  function formatMembers({ detail }) {
89876
- const count17 = `${detail.members.length} ${detail.members.length === 1 ? "member" : "members"}`;
89984
+ const count18 = `${detail.members.length} ${detail.members.length === 1 ? "member" : "members"}`;
89877
89985
  const ends = detail.endsAt ? `, ends ${utcTimeOf(detail.endsAt)}` : "";
89878
- const head = `${channelLabelOf(detail)} (${detail.id}), ${count17}${ends}`;
89986
+ const head = `${channelLabelOf(detail)} (${detail.id}), ${count18}${ends}`;
89879
89987
  const rows = detail.members.map(
89880
89988
  (member) => [ROLE[member.role], member.name, member.kind, member.id, ...presenceColumns(member)].join(" ")
89881
89989
  );
@@ -89915,13 +90023,13 @@ function formatBrowsable({
89915
90023
  }) {
89916
90024
  if (channels3.length === 0) return "No channels to browse.\n";
89917
90025
  const rows = channels3.map((channel) => {
89918
- const count17 = `${channel.memberCount} ${channel.memberCount === 1 ? "member" : "members"}`;
90026
+ const count18 = `${channel.memberCount} ${channel.memberCount === 1 ? "member" : "members"}`;
89919
90027
  const marks = [
89920
90028
  channel.joined ? "joined" : "not joined",
89921
90029
  ...channel.private ? ["private"] : [],
89922
90030
  ...channel.archived ? ["archived"] : []
89923
90031
  ].join(", ");
89924
- const text3 = `#${channel.name} ${channel.id} ${count17} ${marks} ${channel.topic}`;
90032
+ const text3 = `#${channel.name} ${channel.id} ${count18} ${marks} ${channel.topic}`;
89925
90033
  return withLink({ text: text3, url: channel.url, base });
89926
90034
  });
89927
90035
  return `${rows.join("\n")}
@@ -91110,8 +91218,8 @@ async function deliverOnce({
91110
91218
  profile
91111
91219
  }) {
91112
91220
  const lock = statePathOf({ context, kind: "waiters", profile });
91113
- const mine5 = (await holderOf({ path: lock }))?.pid === context.processes.pid;
91114
- if (!mine5 && !await takeLock({ context, path: lock, claudePid, preempt: true })) {
91221
+ const mine6 = (await holderOf({ path: lock }))?.pid === context.processes.pid;
91222
+ if (!mine6 && !await takeLock({ context, path: lock, claudePid, preempt: true })) {
91115
91223
  return "outranked";
91116
91224
  }
91117
91225
  const named = { ...args, flags: { ...args.flags, profile } };
@@ -92560,7 +92668,11 @@ var dedicatedIpListDefinition = external_exports.object({
92560
92668
  ownerName: external_exports.string(),
92561
92669
  state: external_exports.enum(["pending", "on"]),
92562
92670
  country: countryDefinition,
92563
- monthlyPrice: external_exports.number().nonnegative()
92671
+ monthlyPrice: external_exports.number().nonnegative(),
92672
+ /** Since many addresses: which one, and the machine it is on. */
92673
+ id: external_exports.string().optional(),
92674
+ machineName: external_exports.string().nullable().optional(),
92675
+ scope: dedicatedIpScopeSchema.optional()
92564
92676
  })
92565
92677
  )
92566
92678
  });
@@ -92600,6 +92712,100 @@ var restDedicatedIpOfferInputDefinition = dedicatedIpOfferInputDefinition.omit({
92600
92712
  workspaceId: true
92601
92713
  });
92602
92714
  var restTurnOffDedicatedIpInputSchema = external_exports.object({});
92715
+ var dedicatedIpMachineDefinition = external_exports.discriminatedUnion("kind", [
92716
+ external_exports.object({ kind: external_exports.literal("computer"), computerId: external_exports.string().min(1).max(64) }),
92717
+ external_exports.object({ kind: external_exports.literal("browser"), machineId: external_exports.string().min(1).max(64) })
92718
+ ]);
92719
+ var heldIpDefinition = external_exports.object({
92720
+ id: external_exports.string(),
92721
+ holderUserId: external_exports.string(),
92722
+ holderName: external_exports.string(),
92723
+ /** The viewer holds it, so may attach, edit and release it. */
92724
+ mine: external_exports.boolean(),
92725
+ state: external_exports.enum(["pending", "on"]),
92726
+ country: countryDefinition,
92727
+ address: external_exports.string().nullable(),
92728
+ scope: dedicatedIpScopeSchema,
92729
+ /** The sites a list-of-sites address carries; empty for anyone but the holder. */
92730
+ domains: external_exports.array(external_exports.string()),
92731
+ machine: external_exports.object({ ref: dedicatedIpMachineDefinition, name: external_exports.string() }).nullable(),
92732
+ troubleSince: external_exports.iso.datetime().nullable(),
92733
+ onSince: external_exports.iso.datetime().nullable(),
92734
+ monthlyPrice: external_exports.number().nonnegative()
92735
+ });
92736
+ var myDedicatedIpsDefinition = external_exports.object({
92737
+ available: external_exports.boolean(),
92738
+ currency: currencySchema,
92739
+ monthlyPrice: external_exports.number().nonnegative(),
92740
+ maxHeld: external_exports.number().int().positive(),
92741
+ defaultDomains: external_exports.array(external_exports.string()),
92742
+ ips: external_exports.array(heldIpDefinition),
92743
+ offNotice: external_exports.object({ reason: external_exports.enum(["credits", "left"]), at: external_exports.iso.datetime(), country: external_exports.string() }).nullable(),
92744
+ settingsUrl: external_exports.string()
92745
+ });
92746
+ var myDedicatedIpsSchema = myDedicatedIpsDefinition;
92747
+ var machineDedicatedIpsDefinition = external_exports.object({
92748
+ machines: external_exports.array(
92749
+ external_exports.object({
92750
+ machine: dedicatedIpMachineDefinition,
92751
+ ip: heldIpDefinition.nullable(),
92752
+ canChange: external_exports.boolean()
92753
+ })
92754
+ )
92755
+ });
92756
+ var machineDedicatedIpsSchema = machineDedicatedIpsDefinition;
92757
+ var heldIpAnswerDefinition = external_exports.object({ message: external_exports.string(), ip: heldIpDefinition.nullable() });
92758
+ var heldIpAnswerSchema = heldIpAnswerDefinition;
92759
+ var buyDedicatedIpInputDefinition = external_exports.object({
92760
+ workspaceId: external_exports.string().min(1),
92761
+ country: external_exports.string().trim().min(2).max(64),
92762
+ /** Attach it here as soon as it is on. */
92763
+ machine: dedicatedIpMachineDefinition.nullable().default(null)
92764
+ });
92765
+ var buyDedicatedIpInputSchema = buyDedicatedIpInputDefinition;
92766
+ var heldIpRefDefinition = external_exports.object({
92767
+ workspaceId: external_exports.string().min(1),
92768
+ ipId: external_exports.string().min(1).max(64)
92769
+ });
92770
+ var heldIpRefSchema = heldIpRefDefinition;
92771
+ var attachDedicatedIpInputDefinition = external_exports.object({
92772
+ ...heldIpRefDefinition.shape,
92773
+ machine: dedicatedIpMachineDefinition
92774
+ });
92775
+ var attachDedicatedIpInputSchema = attachDedicatedIpInputDefinition;
92776
+ var detachDedicatedIpInputDefinition = external_exports.object({
92777
+ workspaceId: external_exports.string().min(1),
92778
+ machine: dedicatedIpMachineDefinition
92779
+ });
92780
+ var detachDedicatedIpInputSchema = detachDedicatedIpInputDefinition;
92781
+ var setHeldIpSitesInputDefinition = external_exports.object({
92782
+ ...heldIpRefDefinition.shape,
92783
+ add: external_exports.array(external_exports.string().max(300)).max(DEDICATED_IP_MAX_DOMAINS).default([]),
92784
+ remove: external_exports.array(external_exports.string().max(300)).max(DEDICATED_IP_MAX_DOMAINS).default([]),
92785
+ reset: external_exports.boolean().default(false),
92786
+ scope: dedicatedIpScopeSchema.optional()
92787
+ });
92788
+ var setHeldIpSitesInputSchema = setHeldIpSitesInputDefinition;
92789
+ var restBuyDedicatedIpInputDefinition = buyDedicatedIpInputDefinition.omit({ workspaceId: true });
92790
+ var restHeldIpRefInputDefinition = heldIpRefDefinition.omit({ workspaceId: true });
92791
+ var restAttachDedicatedIpInputDefinition = attachDedicatedIpInputDefinition.omit({
92792
+ workspaceId: true
92793
+ });
92794
+ var restDetachDedicatedIpInputDefinition = detachDedicatedIpInputDefinition.omit({
92795
+ workspaceId: true
92796
+ });
92797
+ var restSetHeldIpSitesInputDefinition = setHeldIpSitesInputDefinition.omit({
92798
+ workspaceId: true
92799
+ });
92800
+ var HELD_IP_REST_PATHS = {
92801
+ mine: "/api/compute/ips",
92802
+ buy: "/api/compute/ips/buy",
92803
+ attach: "/api/compute/ips/attach",
92804
+ detach: "/api/compute/ips/detach",
92805
+ release: "/api/compute/ips/release",
92806
+ sites: "/api/compute/ips/sites",
92807
+ machines: "/api/compute/ips/machines"
92808
+ };
92603
92809
  var DEDICATED_IP_REST_PATHS = {
92604
92810
  mine: "/api/compute/ip",
92605
92811
  off: "/api/compute/ip/off",
@@ -93412,7 +93618,7 @@ var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
93412
93618
  var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema23, machineId: idSchema26 });
93413
93619
  var ComputeApi = moduleApi()("compute");
93414
93620
  var computeBrowserTabTrpc = defineTrpcContract("compute").query("browserTabs").withInput(browserTabListInputSchema).withOutput(browserTabListSchema).query("browserTab").withInput(browserTabInputSchema).withOutput(browserTabSchema).mutation("openBrowserTab").withInput(openBrowserTabInputSchema).withOutput(browserTabSchema).mutation("browserTabScreen").withInput(browserTabInputSchema).withOutput(browserTabScreenSchema).mutation("sizeBrowserTabScreen").withInput(browserTabScreenSizeInputSchema).withOutput(browserTabScreenSizeSchema).mutation("gotoBrowserTab").withInput(browserTabGotoInputSchema).withOutput(browserTabPageSchema).mutation("stepBrowserTab").withInput(browserTabStepInputSchema).withOutput(browserTabPageSchema).mutation("doneOnBrowserTab").withInput(browserTabInputSchema).withOutput(browserTabSchema).mutation("shareBrowserTab").withInput(browserTabShareInputSchema).withOutput(browserTabSchema).mutation("closeBrowserTab").withInput(browserTabInputSchema).withOutput(external_exports.object({ closed: external_exports.literal(true) })).build();
93415
- var computeCoreTrpc = defineTrpcContract("compute").query("status").withInput(computeWorkspaceInputSchema).withOutput(computeStatusSchema).query("computer").withInput(computeWorkspaceInputSchema).withOutput(computerStatusSchema).mutation("setComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerSizeAnswerSchema).mutation("requestComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerRequestSchema).mutation("cancelComputerRequest").withInput(computerRequestRefSchema).withOutput(computerRequestSchema).mutation("restartComputer").withInput(restartComputerInputSchema).withOutput(computerRestartAnswerSchema).query("computers").withInput(computeWorkspaceInputSchema).withOutput(computerListSchema).query("dedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpStatusSchema).mutation("setDedicatedIp").withInput(setDedicatedIpInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("turnOffDedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("setDedicatedIpDomains").withInput(setDedicatedIpDomainsInputSchema).withOutput(dedicatedIpAnswerSchema).query("dedicatedIps").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpListSchema).query("dedicatedIpCountries").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpCountriesSchema).query("dedicatedIpOffer").withInput(dedicatedIpOfferInputSchema).withOutput(dedicatedIpOfferSchema).query("list").withInput(computeWorkspaceInputSchema).withOutput(external_exports.array(machineSchema)).query("get").withInput(machineRefSchema).withOutput(machineSchema).mutation("setupBrowser").withInput(setupBrowserInputSchema).withOutput(machineSchema).mutation("sleep").withInput(machineRefSchema).withOutput(machineSchema).mutation("wake").withInput(machineRefSchema).withOutput(machineSchema).mutation("delete").withInput(machineRefSchema).withOutput(machineSchema).mutation("rename").withInput(renameMachineInputSchema).withOutput(machineSchema).mutation("grant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("revokeGrant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("setBudget").withInput(setMachineBudgetInputSchema).withOutput(machineSchema).mutation("openScreen").withInput(openScreenInputSchema).withOutput(screenSessionSchema).mutation("openLoginTerminal").withInput(openLoginTerminalInputSchema).withOutput(loginTerminalSchema).mutation("finishScreen").withInput(screenRefSchema).withOutput(machineSchema).mutation("connectOwn").withInput(connectOwnMachineInputSchema).withOutput(ownMachineConnectSchema).mutation("newConnectCommand").withInput(machineRefSchema).withOutput(ownMachineConnectSchema).mutation("connectSsh").withInput(connectSshMachineInputSchema).withOutput(ownMachineSshConnectSchema).mutation("trustHostKey").withInput(trustHostKeyInputSchema).withOutput(machineSchema).mutation("checkHealth").withInput(machineRefSchema).withOutput(machineSchema).mutation("hostAgent").withInput(hostAgentInputSchema).withOutput(machineSchema).mutation("unhostAgent").withInput(unhostAgentInputSchema).withOutput(external_exports.object({ agentId: external_exports.string() })).mutation("pairWhatsapp").withInput(whatsappPairInputSchema).withOutput(whatsappPairingSchema).query("whatsappMirror").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).mutation("setWhatsappMirror").withInput(setWhatsappMirrorInputSchema).withOutput(whatsappMirrorSettingsSchema).query("whatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("cancelWhatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("unpairWhatsapp").withInput(machineRefSchema).withOutput(machineSchema).build();
93621
+ var computeCoreTrpc = defineTrpcContract("compute").query("status").withInput(computeWorkspaceInputSchema).withOutput(computeStatusSchema).query("computer").withInput(computeWorkspaceInputSchema).withOutput(computerStatusSchema).mutation("setComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerSizeAnswerSchema).mutation("requestComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerRequestSchema).mutation("cancelComputerRequest").withInput(computerRequestRefSchema).withOutput(computerRequestSchema).mutation("restartComputer").withInput(restartComputerInputSchema).withOutput(computerRestartAnswerSchema).query("computers").withInput(computeWorkspaceInputSchema).withOutput(computerListSchema).query("dedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpStatusSchema).mutation("setDedicatedIp").withInput(setDedicatedIpInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("turnOffDedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("setDedicatedIpDomains").withInput(setDedicatedIpDomainsInputSchema).withOutput(dedicatedIpAnswerSchema).query("dedicatedIps").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpListSchema).query("dedicatedIpCountries").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpCountriesSchema).query("dedicatedIpOffer").withInput(dedicatedIpOfferInputSchema).withOutput(dedicatedIpOfferSchema).query("myDedicatedIps").withInput(computeWorkspaceInputSchema).withOutput(myDedicatedIpsSchema).mutation("buyDedicatedIp").withInput(buyDedicatedIpInputSchema).withOutput(heldIpAnswerSchema).mutation("attachDedicatedIp").withInput(attachDedicatedIpInputSchema).withOutput(heldIpAnswerSchema).mutation("detachDedicatedIp").withInput(detachDedicatedIpInputSchema).withOutput(heldIpAnswerSchema).mutation("releaseDedicatedIp").withInput(heldIpRefSchema).withOutput(heldIpAnswerSchema).mutation("setHeldIpSites").withInput(setHeldIpSitesInputSchema).withOutput(heldIpAnswerSchema).query("machineDedicatedIps").withInput(computeWorkspaceInputSchema).withOutput(machineDedicatedIpsSchema).query("list").withInput(computeWorkspaceInputSchema).withOutput(external_exports.array(machineSchema)).query("get").withInput(machineRefSchema).withOutput(machineSchema).mutation("setupBrowser").withInput(setupBrowserInputSchema).withOutput(machineSchema).mutation("sleep").withInput(machineRefSchema).withOutput(machineSchema).mutation("wake").withInput(machineRefSchema).withOutput(machineSchema).mutation("delete").withInput(machineRefSchema).withOutput(machineSchema).mutation("rename").withInput(renameMachineInputSchema).withOutput(machineSchema).mutation("grant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("revokeGrant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("setBudget").withInput(setMachineBudgetInputSchema).withOutput(machineSchema).mutation("openScreen").withInput(openScreenInputSchema).withOutput(screenSessionSchema).mutation("openLoginTerminal").withInput(openLoginTerminalInputSchema).withOutput(loginTerminalSchema).mutation("finishScreen").withInput(screenRefSchema).withOutput(machineSchema).mutation("connectOwn").withInput(connectOwnMachineInputSchema).withOutput(ownMachineConnectSchema).mutation("newConnectCommand").withInput(machineRefSchema).withOutput(ownMachineConnectSchema).mutation("connectSsh").withInput(connectSshMachineInputSchema).withOutput(ownMachineSshConnectSchema).mutation("trustHostKey").withInput(trustHostKeyInputSchema).withOutput(machineSchema).mutation("checkHealth").withInput(machineRefSchema).withOutput(machineSchema).mutation("hostAgent").withInput(hostAgentInputSchema).withOutput(machineSchema).mutation("unhostAgent").withInput(unhostAgentInputSchema).withOutput(external_exports.object({ agentId: external_exports.string() })).mutation("pairWhatsapp").withInput(whatsappPairInputSchema).withOutput(whatsappPairingSchema).query("whatsappMirror").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).mutation("setWhatsappMirror").withInput(setWhatsappMirrorInputSchema).withOutput(whatsappMirrorSettingsSchema).query("whatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("cancelWhatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("unpairWhatsapp").withInput(machineRefSchema).withOutput(machineSchema).build();
93416
93622
  var computeFleetTrpc = defineTrpcContract("compute").query("whatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("prepareWhatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("warmComputer").withInput(computeWorkspaceInputSchema).withOutput(warmComputerSchema).query("myComputers").withInput(computeWorkspaceInputSchema).withOutput(myComputersSchema).query("personComputer").withInput(personComputerInputSchema).withOutput(computerUseSchema2).mutation("createComputer").withInput(createComputerInputSchema).withOutput(computerStatusSchema).mutation("deleteComputer").withInput(deleteComputerInputSchema).withOutput(deleteComputerAnswerSchema).mutation("setComputerCreators").withInput(setComputerCreatorsInputSchema).withOutput(computerStatusSchema).mutation("setAgentComputer").withInput(setAgentComputerInputSchema).withOutput(agentComputerAnswerSchema).query("whatsappAgents").withInput(machineRefSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgent").withInput(setWhatsappAgentInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgentLease").withInput(setWhatsappAgentLeaseInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappEveryAgent").withInput(setWhatsappEveryAgentInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgentAccess").withInput(setWhatsappAgentAccessInputSchema).withOutput(whatsappAgentsSchema).mutation("checkWhatsappNow").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).query("whatsappChatPeople").withInput(whatsappChatPeopleInputSchema).withOutput(whatsappChatPeopleSchema).query("whatsappHistory").withInput(whatsappHistoryInputSchema).withOutput(whatsappHistoryPageSchema).mutation("watchWhatsappChat").withInput(whatsappWatchInputSchema).withOutput(whatsappWatchSchema).mutation("checkWhatsappReply").withInput(whatsappReplyCheckInputSchema).withOutput(whatsappReplyCheckSchema).build();
93417
93623
  var computeTrpc = joinTrpcContracts(
93418
93624
  "compute",
@@ -93637,7 +93843,7 @@ var whatsappOutKindSchema = external_exports.enum(WHATSAPP_OUT_KINDS);
93637
93843
  var WHATSAPP_EVIDENCE_KINDS = ["ack", "delivered", "read", "echo", "found"];
93638
93844
  var whatsappEvidenceKindSchema = external_exports.enum(WHATSAPP_EVIDENCE_KINDS);
93639
93845
  var id2 = external_exports.string().min(1).max(200);
93640
- var at3 = external_exports.iso.datetime();
93846
+ var at4 = external_exports.iso.datetime();
93641
93847
  var code = external_exports.string().min(1).max(64).regex(/^[a-z_]+$/);
93642
93848
  var sendRef = {
93643
93849
  workspaceId: id2,
@@ -93645,7 +93851,7 @@ var sendRef = {
93645
93851
  sendId: id2,
93646
93852
  /** `whatsapp-out:<machine>:<send id>`: the stream's id. */
93647
93853
  stream: id2,
93648
- at: at3
93854
+ at: at4
93649
93855
  };
93650
93856
  var whatsappSendRequestedDefinition = external_exports.object({
93651
93857
  ...sendRef,
@@ -93655,7 +93861,7 @@ var whatsappSendRequestedDefinition = external_exports.object({
93655
93861
  /** The WhatsApp id Laze chose for it; null while the computer still picks it. */
93656
93862
  waId: id2.nullable(),
93657
93863
  /** After this, with no evidence, the send reads "Check the chat". */
93658
- sendBy: at3,
93864
+ sendBy: at4,
93659
93865
  files: external_exports.number().int().min(0).max(100)
93660
93866
  });
93661
93867
  var whatsappSendTakenDefinition = external_exports.object({
@@ -93671,10 +93877,10 @@ var whatsappSendEvidencedDefinition = external_exports.object({
93671
93877
  });
93672
93878
  var whatsappSendRefusedDefinition = external_exports.object({ ...sendRef, code });
93673
93879
  var check2 = external_exports.number().int().positive().optional();
93674
- var whatsappSendUnresolvedDefinition = external_exports.object({ ...sendRef, sendBy: at3, check: check2 });
93880
+ var whatsappSendUnresolvedDefinition = external_exports.object({ ...sendRef, sendBy: at4, check: check2 });
93675
93881
  var whatsappSendRecheckRequestedDefinition = external_exports.object({
93676
93882
  ...sendRef,
93677
- sendBy: at3,
93883
+ sendBy: at4,
93678
93884
  asked: external_exports.number().int().nonnegative()
93679
93885
  });
93680
93886
  var WHATSAPP_SEND_STEPS = [
@@ -93703,8 +93909,8 @@ var whatsappSendUnresolvedIntentDefinition = external_exports.object({
93703
93909
  machineId: external_exports.string(),
93704
93910
  sendId: external_exports.string(),
93705
93911
  stream: external_exports.string(),
93706
- sendBy: at3,
93707
- at: at3,
93912
+ sendBy: at4,
93913
+ at: at4,
93708
93914
  check: check2
93709
93915
  });
93710
93916
 
@@ -93895,8 +94101,8 @@ var sendWakeIntentDefinition = external_exports.object({
93895
94101
  });
93896
94102
 
93897
94103
  // ../../modules/compute/contract/src/whatsapp-ops.ts
93898
- var count12 = external_exports.number().int().nonnegative();
93899
- var at4 = external_exports.iso.datetime();
94104
+ var count13 = external_exports.number().int().nonnegative();
94105
+ var at5 = external_exports.iso.datetime();
93900
94106
  var whatsappMirrorHealthDefinition = external_exports.object({
93901
94107
  mirrors: external_exports.array(
93902
94108
  external_exports.object({
@@ -93906,40 +94112,40 @@ var whatsappMirrorHealthDefinition = external_exports.object({
93906
94112
  provider: external_exports.string(),
93907
94113
  mirrorOn: external_exports.boolean(),
93908
94114
  /** When the mirror took its changes only as events (ADR-216); null while it still pulls. */
93909
- eventsAt: at4.nullable(),
94115
+ eventsAt: at5.nullable(),
93910
94116
  /** When the job last answered that it pulls its sends (ADR-220); null otherwise. */
93911
- outboxAt: at4.nullable(),
94117
+ outboxAt: at5.nullable(),
93912
94118
  cursor: external_exports.number().int(),
93913
- nextVisitAt: at4.nullable(),
93914
- touchedAt: at4.nullable(),
93915
- createdAt: at4,
93916
- skipped: external_exports.object({ count: count12, from: external_exports.number().int().nullable(), at: at4.nullable() }),
94119
+ nextVisitAt: at5.nullable(),
94120
+ touchedAt: at5.nullable(),
94121
+ createdAt: at5,
94122
+ skipped: external_exports.object({ count: count13, from: external_exports.number().int().nullable(), at: at5.nullable() }),
93917
94123
  /** The last pull that met files; null when none did. */
93918
94124
  files: external_exports.object({
93919
- at: at4,
93920
- attached: count12,
93921
- unavailable: count12,
93922
- retrying: count12,
93923
- dropped: count12,
94125
+ at: at5,
94126
+ attached: count13,
94127
+ unavailable: count13,
94128
+ retrying: count13,
94129
+ dropped: count13,
93924
94130
  failureCode: external_exports.string().nullable()
93925
94131
  }).nullable(),
93926
94132
  /** Intake holds (ADR-216 §11) by kind and code, with when the oldest was made. */
93927
- holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count: count12, oldestAt: at4 })),
94133
+ holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count: count13, oldestAt: at5 })),
93928
94134
  /**
93929
94135
  * The computer store's fill (ADR-223): chats done, how many mirrored items from the last 6
93930
94136
  * months Laze held, those the store held and those sent; the mirrored items Laze holds now
93931
94137
  * and how many a trim to 7 days after last read would delete. Null before a fill started.
93932
94138
  */
93933
94139
  storeFill: external_exports.object({
93934
- chats: count12,
93935
- lazeHeld: count12,
93936
- alreadyHeld: count12,
93937
- sent: count12,
94140
+ chats: count13,
94141
+ lazeHeld: count13,
94142
+ alreadyHeld: count13,
94143
+ sent: count13,
93938
94144
  problem: external_exports.string().nullable(),
93939
- filledAt: at4.nullable(),
93940
- updatedAt: at4,
93941
- mirrored: count12,
93942
- trimmable: count12
94145
+ filledAt: at5.nullable(),
94146
+ updatedAt: at5,
94147
+ mirrored: count13,
94148
+ trimmable: count13
93943
94149
  }).nullable().optional()
93944
94150
  })
93945
94151
  )
@@ -93969,7 +94175,7 @@ var whatsappSendsDefinition = external_exports.object({
93969
94175
  quoted: external_exports.boolean(),
93970
94176
  /** Sends to the same chat share a number, counted from 1 in this answer; never the chat. */
93971
94177
  chatIndex: external_exports.number().int().min(1),
93972
- files: count12,
94178
+ files: count13,
93973
94179
  /**
93974
94180
  * Why a failed send did not go: its stored code, or for older sends the code its outcome
93975
94181
  * line reads as; "other" when none fits, null for a send that did not fail.
@@ -93979,9 +94185,9 @@ var whatsappSendsDefinition = external_exports.object({
93979
94185
  serverErrorCode: external_exports.number().int().nullable(),
93980
94186
  /** For a blocked send, the computer's allow-list rule that refused it, when it named one. */
93981
94187
  blockedBy: external_exports.enum(WHATSAPP_SEND_BLOCK_REASONS).nullable(),
93982
- createdAt: at4,
93983
- claimedAt: at4.nullable(),
93984
- sentAt: at4.nullable()
94188
+ createdAt: at5,
94189
+ claimedAt: at5.nullable(),
94190
+ sentAt: at5.nullable()
93985
94191
  })
93986
94192
  )
93987
94193
  });
@@ -93995,22 +94201,22 @@ var whatsappSendStreamsDefinition = external_exports.object({
93995
94201
  kind: external_exports.enum(WHATSAPP_SEND_KINDS),
93996
94202
  rowState: external_exports.string(),
93997
94203
  failureCode: external_exports.string().nullable(),
93998
- createdAt: at4,
94204
+ createdAt: at5,
93999
94205
  /** The stream's events, its last event's kind and time; zero and null for none. */
94000
- events: count12,
94206
+ events: count13,
94001
94207
  lastEvent: external_exports.enum(["requested", "taken", "evidenced", "refused", "unresolved", "recheck_requested"]).nullable(),
94002
- lastEventAt: at4.nullable(),
94208
+ lastEventAt: at5.nullable(),
94003
94209
  /** The process's step and deadline; null when no process holds the send. */
94004
94210
  step: external_exports.enum(["none", "queued", "taken", "sent", "refused", "unresolved"]).nullable(),
94005
- sendBy: at4.nullable(),
94211
+ sendBy: at5.nullable(),
94006
94212
  /** Whether the row and the process tell the same story. */
94007
94213
  agrees: external_exports.boolean()
94008
94214
  })
94009
94215
  ),
94010
94216
  /** Counts over the answered sends. */
94011
- total: count12,
94012
- agree: count12,
94013
- disagree: count12
94217
+ total: count13,
94218
+ agree: count13,
94219
+ disagree: count13
94014
94220
  });
94015
94221
  var whatsappSendStreamsSchema = whatsappSendStreamsDefinition;
94016
94222
  var WHATSAPP_WAKE_STEPS = [
@@ -94032,7 +94238,7 @@ var whatsappWakeTimelineDefinition = external_exports.object({
94032
94238
  /** Newest first. */
94033
94239
  wakes: external_exports.array(
94034
94240
  external_exports.object({
94035
- requestedAt: at4,
94241
+ requestedAt: at5,
94036
94242
  /** watch, send, message, visit, link or unpair. */
94037
94243
  cause: external_exports.string(),
94038
94244
  /** done, failed, or open when no step came for a while. */
@@ -94049,12 +94255,12 @@ var whatsappWakeTimelineDefinition = external_exports.object({
94049
94255
  steps: external_exports.array(
94050
94256
  external_exports.object({
94051
94257
  step: external_exports.enum(WHATSAPP_WAKE_STEPS),
94052
- at: at4,
94053
- sincePreviousMs: count12,
94054
- sinceRequestMs: count12
94258
+ at: at5,
94259
+ sincePreviousMs: count13,
94260
+ sinceRequestMs: count13
94055
94261
  })
94056
94262
  ),
94057
- totalMs: count12.nullable()
94263
+ totalMs: count13.nullable()
94058
94264
  })
94059
94265
  )
94060
94266
  })
@@ -94082,9 +94288,9 @@ var STREAM_END_CAUSES = [
94082
94288
  "done",
94083
94289
  "other"
94084
94290
  ];
94085
- var at5 = external_exports.iso.datetime();
94291
+ var at6 = external_exports.iso.datetime();
94086
94292
  var relayEventDefinition = external_exports.object({
94087
- at: at5,
94293
+ at: at6,
94088
94294
  kind: external_exports.enum(RELAY_EVENT_KINDS),
94089
94295
  /** The stream's kind (cdp, screen, watch), or null for a link event. */
94090
94296
  stream: external_exports.string().max(16).nullable(),
@@ -94096,8 +94302,8 @@ var computerBrowserFactsDefinition = external_exports.object({
94096
94302
  machineId: external_exports.string().nullable(),
94097
94303
  /** Whether this api process holds the connector's link now. */
94098
94304
  linked: external_exports.boolean(),
94099
- lastSeenAt: at5.nullable(),
94100
- healthCheckedAt: at5.nullable(),
94305
+ lastSeenAt: at6.nullable(),
94306
+ healthCheckedAt: at6.nullable(),
94101
94307
  daemonVersion: external_exports.string().max(80).nullable(),
94102
94308
  diskTotalGb: external_exports.number().nonnegative().nullable(),
94103
94309
  diskFreeGb: external_exports.number().nonnegative().nullable(),
@@ -94114,7 +94320,7 @@ var computerBrowserFactsDefinition = external_exports.object({
94114
94320
  dedicatedIp: external_exports.enum(["none", "off", "pending", "on"]),
94115
94321
  scope: dedicatedIpScopeSchema.nullable(),
94116
94322
  countryCode: external_exports.string().max(8).nullable(),
94117
- onSince: at5.nullable(),
94323
+ onSince: at6.nullable(),
94118
94324
  browserLeaves: external_exports.enum(["dedicated_ip", "shared_address"])
94119
94325
  })
94120
94326
  });
@@ -94999,11 +95205,11 @@ function bundleOf({ text: text3, field }) {
94999
95205
  for (const line of text3.split(/\r?\n/)) {
95000
95206
  const kept = line.trim();
95001
95207
  if (!kept || kept.startsWith("#")) continue;
95002
- const at8 = line.indexOf("=");
95003
- if (at8 <= 0) {
95208
+ const at9 = line.indexOf("=");
95209
+ if (at9 <= 0) {
95004
95210
  throw new CliUsageError("Give KEY=value lines, or one value with --field <FIELD>.");
95005
95211
  }
95006
- fields[line.slice(0, at8).trim()] = line.slice(at8 + 1);
95212
+ fields[line.slice(0, at9).trim()] = line.slice(at9 + 1);
95007
95213
  }
95008
95214
  return { kind: "api_key_set", fields };
95009
95215
  }
@@ -96582,7 +96788,7 @@ function nextClock({
96582
96788
  timeZone
96583
96789
  }) {
96584
96790
  const local2 = now.toZonedDateTimeISO(timeZone);
96585
- const at8 = local2.with({
96791
+ const at9 = local2.with({
96586
96792
  hour: Number(clock[1]),
96587
96793
  minute: Number(clock[2]),
96588
96794
  second: 0,
@@ -96590,7 +96796,7 @@ function nextClock({
96590
96796
  microsecond: 0,
96591
96797
  nanosecond: 0
96592
96798
  });
96593
- const next = Temporal3.ZonedDateTime.compare(at8, local2) > 0 ? at8 : at8.add({ days: 1 });
96799
+ const next = Temporal3.ZonedDateTime.compare(at9, local2) > 0 ? at9 : at9.add({ days: 1 });
96594
96800
  return next.toString({ timeZoneName: "never", smallestUnit: "second" });
96595
96801
  }
96596
96802
  function dndInputOf({
@@ -97522,8 +97728,8 @@ var EXTERNAL_USAGE = `Usage:
97522
97728
  laze external report <workspace> --note "<why>" report a workspace to Laze staff, and block it (admins)`;
97523
97729
  var printJson6 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
97524
97730
  `);
97525
- function wordAt5({ args, at: at8, what }) {
97526
- const word3 = args.words[at8]?.trim();
97731
+ function wordAt5({ args, at: at9, what }) {
97732
+ const word3 = args.words[at9]?.trim();
97527
97733
  if (!word3) throw new CliUsageError(`Name ${what}.
97528
97734
  ${EXTERNAL_USAGE}`);
97529
97735
  return word3;
@@ -97532,8 +97738,8 @@ async function clientOf2({ context, args }) {
97532
97738
  const session = await signedIn({ context, args });
97533
97739
  const wanted = flagText({ args, name: "workspace" })?.trim();
97534
97740
  if (!wanted) return { client: session.client };
97535
- const mine5 = await session.client.post("/api/agents/me/workspace/mine", {});
97536
- const target = mine5.find((each) => each.id === wanted) ?? mine5.find((each) => each.name.toLowerCase() === wanted.toLowerCase());
97741
+ const mine6 = await session.client.post("/api/agents/me/workspace/mine", {});
97742
+ const target = mine6.find((each) => each.id === wanted) ?? mine6.find((each) => each.name.toLowerCase() === wanted.toLowerCase());
97537
97743
  if (!target) {
97538
97744
  throw new CliUsageError(`You are in no workspace named "${wanted}": laze workspace list.`);
97539
97745
  }
@@ -97627,9 +97833,9 @@ async function invite2({ context, args }) {
97627
97833
  });
97628
97834
  if (args.flags.json) return printJson6(context, sent);
97629
97835
  const sharing = sent.share ? `, sharing #${sent.share.name} once accepted` : "";
97630
- const at8 = sent.company ? ` at ${sent.company}` : "";
97836
+ const at9 = sent.company ? ` at ${sent.company}` : "";
97631
97837
  context.out(
97632
- `Invited ${sent.email}${at8}${sharing}. Invitation ${sent.id} expires ${utcTimeOf(sent.expiresAt)}.
97838
+ `Invited ${sent.email}${at9}${sharing}. Invitation ${sent.id} expires ${utcTimeOf(sent.expiresAt)}.
97633
97839
  `
97634
97840
  );
97635
97841
  }
@@ -98199,6 +98405,10 @@ var feedApprovalSchemaDefinition = external_exports.object({
98199
98405
  why: external_exports.string(),
98200
98406
  /** The longest lease Allow for this agent may give; null offers only once and deny. */
98201
98407
  maxLeaseSeconds: external_exports.number().int().positive().nullable(),
98408
+ /** The More menu's "Allow for 30 days for this agent"; null or absent when not offered. */
98409
+ monthLeaseSeconds: external_exports.number().int().positive().nullable().optional(),
98410
+ /** The vault key a card asks for, so its More menu opens that key's settings. */
98411
+ connectionId: external_exports.string().nullable().optional(),
98202
98412
  /** A vault card whose "Allow once" covers the rest of the agent's turn. */
98203
98413
  coversTask: external_exports.boolean().optional(),
98204
98414
  /** A vault card whose key wants a device: Allow goes through a passkey, Touch ID or Face ID. */
@@ -98801,12 +99011,12 @@ function draftFilesMissingText(names) {
98801
99011
  }
98802
99012
 
98803
99013
  // ../../modules/feed/contract/src/feed.decisions.ts
98804
- function decisionsLineOf(count17) {
98805
- return `${count17} ${count17 === 1 ? "decision" : "decisions"} waiting on you`;
99014
+ function decisionsLineOf(count18) {
99015
+ return `${count18} ${count18 === 1 ? "decision" : "decisions"} waiting on you`;
98806
99016
  }
98807
99017
 
98808
99018
  // ../../modules/feed/contract/src/feed.ops-counts.ts
98809
- var count13 = external_exports.number().int().nonnegative();
99019
+ var count14 = external_exports.number().int().nonnegative();
98810
99020
  var FEED_OPS_SYSTEM_AUTHOR = /^[a-z][a-z0-9_-]{0,39}$/;
98811
99021
  var FEED_OPS_NOTICE_FAMILY = /^notice:[a-z][a-z0-9_-]{0,39}$/;
98812
99022
  var feedOpsCountRowSchemaDefinition = external_exports.object({
@@ -98820,13 +99030,13 @@ var feedOpsCountRowSchemaDefinition = external_exports.object({
98820
99030
  /** The notice family of a notice card (`notice:other` when its reference has no plain one). */
98821
99031
  noticeFamily: external_exports.string().regex(FEED_OPS_NOTICE_FAMILY).nullable(),
98822
99032
  /** In the person's open list: what "N things need you" counts. */
98823
- open: count13,
99033
+ open: count14,
98824
99034
  /** Open and not read, as the summary's "N unread" counts. */
98825
- unread: count13,
99035
+ unread: count14,
98826
99036
  /** Open and urgent. */
98827
- urgent: count13,
99037
+ urgent: count14,
98828
99038
  /** Coming up: snoozed or shown later, as the Snoozed tab lists. */
98829
- snoozed: count13
99039
+ snoozed: count14
98830
99040
  });
98831
99041
  var feedOpsCountRowSchema = feedOpsCountRowSchemaDefinition;
98832
99042
 
@@ -98843,11 +99053,11 @@ function csvCellsOf(line) {
98843
99053
  const cells = [];
98844
99054
  let cell = "";
98845
99055
  let quoted2 = false;
98846
- for (let at8 = 0; at8 < line.length; at8 += 1) {
98847
- const char = line[at8];
98848
- if (quoted2 && char === '"' && line[at8 + 1] === '"') {
99056
+ for (let at9 = 0; at9 < line.length; at9 += 1) {
99057
+ const char = line[at9];
99058
+ if (quoted2 && char === '"' && line[at9 + 1] === '"') {
98849
99059
  cell += '"';
98850
- at8 += 1;
99060
+ at9 += 1;
98851
99061
  } else if (char === '"') {
98852
99062
  quoted2 = !quoted2;
98853
99063
  } else if (char === "," && !quoted2) {
@@ -98912,11 +99122,11 @@ feed_draft_missing when a card points at a draft without its text; fix it, or pa
98912
99122
  to post it as written.`;
98913
99123
  var FEED_NO_BODY = "feed cards have no body: put the point in the title and one --summary line, text to send in --draft, sources in --link";
98914
99124
  function pairOf({ value, flag: flag2 }) {
98915
- const at8 = value.indexOf("=");
98916
- if (at8 <= 0 || at8 === value.length - 1) {
99125
+ const at9 = value.indexOf("=");
99126
+ if (at9 <= 0 || at9 === value.length - 1) {
98917
99127
  throw new Error(`--${flag2} takes <label>=<value>, got "${value}"`);
98918
99128
  }
98919
- return [value.slice(0, at8), value.slice(at8 + 1)];
99129
+ return [value.slice(0, at9), value.slice(at9 + 1)];
98920
99130
  }
98921
99131
  function sourceOf(value) {
98922
99132
  return value.startsWith("@") && value.length > 1 ? { file: value.slice(1) } : { text: value };
@@ -99440,8 +99650,8 @@ function optionalWords(words) {
99440
99650
  }
99441
99651
  function shareLinesOf({ move: move3, answer: answer6 }) {
99442
99652
  const names = answer6.people.map((person) => person.name).join(", ") || "no one new";
99443
- const count17 = answer6.itemIds.length;
99444
- const items = `${count17} item${count17 === 1 ? "" : "s"}`;
99653
+ const count18 = answer6.itemIds.length;
99654
+ const items = `${count18} item${count18 === 1 ? "" : "s"}`;
99445
99655
  const head = move3 === "share" ? `Shared ${items} with ${names}` : `Took ${names} off ${items}`;
99446
99656
  return [head, ...answer6.itemIds].map((line) => `${line}
99447
99657
  `).join("");
@@ -99604,10 +99814,10 @@ async function ranksOf({
99604
99814
  const [itemId, priority] = args.words.slice(2);
99605
99815
  const named = itemId && priority ? [`${itemId}=${priority}`] : [];
99606
99816
  return [...named, ...args.lists.set ?? []].map((pair) => {
99607
- const at8 = pair.indexOf("=");
99608
- if (at8 < 1) throw new CliUsageError(USAGE11);
99817
+ const at9 = pair.indexOf("=");
99818
+ if (at9 < 1) throw new CliUsageError(USAGE11);
99609
99819
  try {
99610
- return { itemId: pair.slice(0, at8), priority: rankOf(pair.slice(at8 + 1)) };
99820
+ return { itemId: pair.slice(0, at9), priority: rankOf(pair.slice(at9 + 1)) };
99611
99821
  } catch (error63) {
99612
99822
  throw new CliUsageError(error63 instanceof Error ? error63.message : String(error63));
99613
99823
  }
@@ -99959,8 +100169,8 @@ function peopleOf({ args }) {
99959
100169
  if (people2.length > 0) return people2;
99960
100170
  return one ? [one] : [];
99961
100171
  }
99962
- function wordAt6({ args, at: at8 }) {
99963
- const word3 = args.words[at8];
100172
+ function wordAt6({ args, at: at9 }) {
100173
+ const word3 = args.words[at9];
99964
100174
  if (!word3) throw new CliUsageError(USAGE12);
99965
100175
  return word3;
99966
100176
  }
@@ -100090,13 +100300,13 @@ function formatHistory(output2) {
100090
100300
  const lines2 = linesOf3(output2);
100091
100301
  if (lines2.length === 0) return `${where}${from}: no messages.
100092
100302
  `;
100093
- const count17 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
100303
+ const count18 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
100094
100304
  const blocks = lines2.map(blockOf2).join("\n\n");
100095
100305
  const cursor = olderCursorOf(output2);
100096
100306
  const older = cursor ? `
100097
100307
 
100098
100308
  Older: laze history ${output2.channel} --before ${cursor}` : "";
100099
- return `${where}${from}: ${count17}, oldest first
100309
+ return `${where}${from}: ${count18}, oldest first
100100
100310
 
100101
100311
  ${blocks}${older}
100102
100312
  `;
@@ -100189,7 +100399,7 @@ function money2({ amount, currency: currency2 }) {
100189
100399
  return `${currency2.toUpperCase()} ${Number(amount.toFixed(2))}`;
100190
100400
  }
100191
100401
  function inviteQuoteText(quote4) {
100192
- const at8 = (amount) => money2({ amount, currency: quote4.currency });
100402
+ const at9 = (amount) => money2({ amount, currency: quote4.currency });
100193
100403
  const people2 = `${quote4.peopleAfter} ${quote4.peopleAfter === 1 ? "person" : "people"}`;
100194
100404
  const seats = quote4.freeSeatsLeft ? ` ${quote4.freeSeatsLeft} free ${quote4.freeSeatsLeft === 1 ? "seat" : "seats"} left.` : "";
100195
100405
  if (quote4.plan === "free" && !quote4.upgradeNeeded) {
@@ -100199,11 +100409,11 @@ function inviteQuoteText(quote4) {
100199
100409
  return `Your plan holds ${quote4.seatCap} people, at no charge.
100200
100410
  `;
100201
100411
  }
100202
- const price = `${at8(quote4.monthlyAfter)} a month for ${people2} (${at8(quote4.perPersonAfter)} per person).${seats}`;
100412
+ const price = `${at9(quote4.monthlyAfter)} a month for ${people2} (${at9(quote4.perPersonAfter)} per person).${seats}`;
100203
100413
  if (quote4.upgradeNeeded)
100204
100414
  return `Team: ${price} This starts Team, paid through Stripe Checkout.
100205
100415
  `;
100206
- const change2 = quote4.monthlyAfter === quote4.monthlyNow ? "No change to your price." : `Was ${at8(quote4.monthlyNow)}; the change is prorated as each person joins.`;
100416
+ const change2 = quote4.monthlyAfter === quote4.monthlyNow ? "No change to your price." : `Was ${at9(quote4.monthlyNow)}; the change is prorated as each person joins.`;
100207
100417
  return `New price: ${price} ${change2}
100208
100418
  `;
100209
100419
  }
@@ -100339,7 +100549,15 @@ var IP_USAGE = `Usage:
100339
100549
  laze ip domains add|remove <domain>... change them; laze ip domains reset brings the defaults back
100340
100550
  laze ip scope all|sites all web traffic, or only your domains
100341
100551
  laze ip offer [--site <domain>] the plain offer to pass on when a site blocks the shared address
100342
- laze ip list who has one, its country and price (Owners and Admins)`;
100552
+ laze ip list who has one, its country and price (Owners and Admins)
100553
+ laze ip mine every dedicated IP you hold and the machine it is on
100554
+ laze ip buy <country> [--machine <m>] buy one more, optionally straight onto a machine
100555
+ laze ip attach <ip id> <machine> put one of yours on a machine; its old one comes off
100556
+ laze ip detach <machine> put a machine back on the shared address
100557
+ laze ip release <ip id> give one back; its charge stops
100558
+ laze ip sites <ip id> all|sites [add|remove <domain>...] what one of yours carries
100559
+ laze ip machines the IP address of each machine you see
100560
+ A machine is "default" (your default computer), a computer id, or browser:<machine id>.`;
100343
100561
  var printJson7 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
100344
100562
  `);
100345
100563
  var OFF_REASONS = {
@@ -100464,6 +100682,98 @@ async function list9({ context, args }) {
100464
100682
  ${lines2.join("\n")}
100465
100683
  `);
100466
100684
  }
100685
+ function machineArgOf(word3) {
100686
+ if (!word3) return void 0;
100687
+ if (word3.startsWith("browser:")) {
100688
+ const machineId = word3.slice("browser:".length);
100689
+ return machineId ? { kind: "browser", machineId } : void 0;
100690
+ }
100691
+ return { kind: "computer", computerId: word3 };
100692
+ }
100693
+ function heldLine2(ip2) {
100694
+ const address = ip2.address ?? (ip2.state === "on" ? "dedicated" : "being bought");
100695
+ const mode = ip2.scope === "all" ? "all web traffic" : "only some sites";
100696
+ const machine2 = ip2.machine?.name ?? "not attached";
100697
+ return ` ${ip2.id} ${address} ${ip2.country.name} ${machine2} ${mode} ${ip2.monthlyPrice} a month`;
100698
+ }
100699
+ async function mine3({ context, args }) {
100700
+ const client = await computeClient({ context, args });
100701
+ const answer6 = await client.get(HELD_IP_REST_PATHS.mine);
100702
+ if (args.flags.json) return printJson7(context, answer6);
100703
+ if (!answer6.available) return context.out("Dedicated IPs are not available on this Laze.\n");
100704
+ if (answer6.ips.length === 0) return context.out("You hold no dedicated IP.\n");
100705
+ context.out(`Your dedicated IPs:
100706
+ ${answer6.ips.map(heldLine2).join("\n")}
100707
+ `);
100708
+ }
100709
+ async function printHeld({ context, args }, answer6) {
100710
+ if (args.flags.json) return printJson7(context, answer6);
100711
+ context.out(`${answer6.message}
100712
+ `);
100713
+ }
100714
+ async function buy(run4) {
100715
+ const country = run4.args.words.slice(2).join(" ").trim();
100716
+ if (!country) throw new CliUsageError(IP_USAGE);
100717
+ const flag2 = run4.args.flags.machine;
100718
+ const machine2 = machineArgOf(typeof flag2 === "string" ? flag2 : void 0) ?? null;
100719
+ const client = await computeClient(run4);
100720
+ await printHeld(
100721
+ run4,
100722
+ await client.post(HELD_IP_REST_PATHS.buy, { country, machine: machine2 })
100723
+ );
100724
+ }
100725
+ async function attach(run4) {
100726
+ const [, , ipId, word3] = run4.args.words;
100727
+ const machine2 = machineArgOf(word3);
100728
+ if (!ipId || !machine2) throw new CliUsageError(IP_USAGE);
100729
+ const client = await computeClient(run4);
100730
+ await printHeld(
100731
+ run4,
100732
+ await client.post(HELD_IP_REST_PATHS.attach, { ipId, machine: machine2 })
100733
+ );
100734
+ }
100735
+ async function detach(run4) {
100736
+ const machine2 = machineArgOf(run4.args.words[2]);
100737
+ if (!machine2) throw new CliUsageError(IP_USAGE);
100738
+ const client = await computeClient(run4);
100739
+ await printHeld(run4, await client.post(HELD_IP_REST_PATHS.detach, { machine: machine2 }));
100740
+ }
100741
+ async function release2(run4) {
100742
+ const ipId = run4.args.words[2];
100743
+ if (!ipId) throw new CliUsageError(IP_USAGE);
100744
+ const client = await computeClient(run4);
100745
+ await printHeld(run4, await client.post(HELD_IP_REST_PATHS.release, { ipId }));
100746
+ }
100747
+ async function sites(run4) {
100748
+ const [, , ipId, mode, action, ...names] = run4.args.words;
100749
+ const parsed = dedicatedIpScopeSchema.safeParse(mode);
100750
+ if (!ipId || !parsed.success) throw new CliUsageError(IP_USAGE);
100751
+ const edit = action ? domainsEditOf({ action, names }) : {};
100752
+ if (!edit) throw new CliUsageError(IP_USAGE);
100753
+ const client = await computeClient(run4);
100754
+ await printHeld(
100755
+ run4,
100756
+ await client.post(HELD_IP_REST_PATHS.sites, {
100757
+ ipId,
100758
+ scope: parsed.data,
100759
+ ...edit
100760
+ })
100761
+ );
100762
+ }
100763
+ async function machines({ context, args }) {
100764
+ const client = await computeClient({ context, args });
100765
+ const answer6 = await client.get(HELD_IP_REST_PATHS.machines);
100766
+ if (args.flags.json) return printJson7(context, answer6);
100767
+ const lines2 = answer6.machines.map(({ machine: machine2, ip: ip2 }) => {
100768
+ const name3 = machine2.kind === "browser" ? `browser:${machine2.machineId}` : machine2.computerId;
100769
+ if (!ip2) return ` ${name3} Shared`;
100770
+ const address = ip2.address ?? "Dedicated";
100771
+ return ` ${name3} ${address} ${ip2.country.name} ${ip2.holderName}'s`;
100772
+ });
100773
+ context.out(`IP addresses:
100774
+ ${lines2.join("\n")}
100775
+ `);
100776
+ }
100467
100777
  var IP_COMMANDS = {
100468
100778
  status: status5,
100469
100779
  on: turnOn,
@@ -100472,7 +100782,14 @@ var IP_COMMANDS = {
100472
100782
  domains: domains2,
100473
100783
  scope: scope2,
100474
100784
  offer,
100475
- list: list9
100785
+ list: list9,
100786
+ mine: mine3,
100787
+ buy,
100788
+ attach,
100789
+ detach,
100790
+ release: release2,
100791
+ sites,
100792
+ machines
100476
100793
  };
100477
100794
  async function ip({ context, args }) {
100478
100795
  const name3 = args.words[1] ?? "status";
@@ -100785,8 +101102,8 @@ var KEYS_USAGE = `Usage:
100785
101102
  laze keys revoke <id> --any revoke any key of the workspace (admins)`;
100786
101103
  var printJson8 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
100787
101104
  `);
100788
- var lastUsed = (at8) => at8 ? `last used ${at8}` : "never used";
100789
- async function mine3({ context, args }) {
101105
+ var lastUsed = (at9) => at9 ? `last used ${at9}` : "never used";
101106
+ async function mine4({ context, args }) {
100790
101107
  const { client } = await signedIn({ context, args });
100791
101108
  const keys2 = await client.get("/api/api-keys/mine");
100792
101109
  if (args.flags.json) return printJson8(context, keys2);
@@ -100867,7 +101184,7 @@ async function revoke2({ context, args }) {
100867
101184
  context.out(`Revoked ${apiKeyId}.
100868
101185
  `);
100869
101186
  }
100870
- var KEY_COMMANDS = { mine: mine3, list: list10, create: create3, revoke: revoke2 };
101187
+ var KEY_COMMANDS = { mine: mine4, list: list10, create: create3, revoke: revoke2 };
100871
101188
  async function keys({ context, args }) {
100872
101189
  const name3 = args.words[1] ?? "mine";
100873
101190
  const command = Object.hasOwn(KEY_COMMANDS, name3) ? KEY_COMMANDS[name3] : void 0;
@@ -101011,7 +101328,7 @@ async function pollOrCancel({
101011
101328
  throw error63;
101012
101329
  }
101013
101330
  }
101014
- async function mine4({ context, args }) {
101331
+ async function mine5({ context, args }) {
101015
101332
  const on = args.flags.on !== void 0;
101016
101333
  const off = args.flags.off !== void 0;
101017
101334
  if (on === off) throw new CliUsageError(`Pick --on or --off.
@@ -101134,7 +101451,7 @@ var LANGWATCH_COMMANDS = {
101134
101451
  level,
101135
101452
  test,
101136
101453
  remove: remove7,
101137
- mine: mine4,
101454
+ mine: mine5,
101138
101455
  agent,
101139
101456
  agents
101140
101457
  };
@@ -101158,8 +101475,8 @@ var MACHINE_ACCESS_USAGE = [
101158
101475
  " laze machine grant|revoke <machine> --member <userId> | --agent <agentId> share it or stop (owner)",
101159
101476
  " laze machine budget <machine> <usd> [--period day|week|month] its spend cap (owner)"
101160
101477
  ].join("\n");
101161
- function wordAt7({ args, at: at8 }) {
101162
- const value = args.words[at8];
101478
+ function wordAt7({ args, at: at9 }) {
101479
+ const value = args.words[at9];
101163
101480
  if (!value) throw new CliUsageError(`Usage:
101164
101481
  ${MACHINE_ACCESS_USAGE}`);
101165
101482
  return value;
@@ -101342,8 +101659,8 @@ async function trustHostKey({ context, args }) {
101342
101659
  const hostKey = args.words[3];
101343
101660
  const client = await computeClient({ context, args });
101344
101661
  if (!hostKey) {
101345
- const machines = await client.get(COMPUTE_REST_PATHS.machines);
101346
- const offered = machines.find((one) => one.name === name3)?.ssh?.offeredHostKey;
101662
+ const machines2 = await client.get(COMPUTE_REST_PATHS.machines);
101663
+ const offered = machines2.find((one) => one.name === name3)?.ssh?.offeredHostKey;
101347
101664
  if (!offered) return context.out(`${name3} offered no new host key.
101348
101665
  `);
101349
101666
  return context.out(
@@ -101363,12 +101680,12 @@ Check it on the machine (ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub, or th
101363
101680
  }
101364
101681
  async function list11({ context, args }) {
101365
101682
  const client = await computeClient({ context, args });
101366
- const machines = await client.get(COMPUTE_REST_PATHS.machines);
101367
- if (args.flags.json) return context.out(`${JSON.stringify(machines, null, 2)}
101683
+ const machines2 = await client.get(COMPUTE_REST_PATHS.machines);
101684
+ if (args.flags.json) return context.out(`${JSON.stringify(machines2, null, 2)}
101368
101685
  `);
101369
- if (machines.length === 0)
101686
+ if (machines2.length === 0)
101370
101687
  return context.out("No machines. A person connects one with `laze machine connect <name>`.\n");
101371
- for (const machine2 of machines) context.out(listLine({ machine: machine2, base: client.baseUrl }));
101688
+ for (const machine2 of machines2) context.out(listLine({ machine: machine2, base: client.baseUrl }));
101372
101689
  }
101373
101690
  async function health({ context, args }) {
101374
101691
  const client = await computeClient({ context, args });
@@ -101445,10 +101762,10 @@ ${USAGE13}`);
101445
101762
  if ("exitCode" in released) return released;
101446
101763
  Object.assign(env, released.env);
101447
101764
  }
101448
- const count17 = Object.keys(env).length;
101449
- if (count17 > EXEC_ENV_MAX) {
101765
+ const count18 = Object.keys(env).length;
101766
+ if (count18 > EXEC_ENV_MAX) {
101450
101767
  context.err(
101451
- `laze: these connections hold ${count17} variables; at most ${EXEC_ENV_MAX} go with a command. Send fewer connections, or run the command with \`laze vault run\` where you run.
101768
+ `laze: these connections hold ${count18} variables; at most ${EXEC_ENV_MAX} go with a command. Send fewer connections, or run the command with \`laze vault run\` where you run.
101452
101769
  `
101453
101770
  );
101454
101771
  return { exitCode: 1 };
@@ -101605,7 +101922,7 @@ function secretRefusal({
101605
101922
  rules = MCP_SECRET_COMMANDS
101606
101923
  }) {
101607
101924
  const { words, flags: flags2 } = parseArgs({ argv });
101608
- const command = [3, 2, 1].map((count17) => words.slice(0, count17).join(" ")).find((name3) => Object.hasOwn(rules, name3));
101925
+ const command = [3, 2, 1].map((count18) => words.slice(0, count18).join(" ")).find((name3) => Object.hasOwn(rules, name3));
101609
101926
  const rule = command === void 0 ? void 0 : rules[command];
101610
101927
  if (!command || !rule) return void 0;
101611
101928
  const vaultFlag = rule.vaultFlag ?? "from-vault";
@@ -102356,11 +102673,11 @@ async function monitorAdd({ context, args }) {
102356
102673
  });
102357
102674
  if (args.flags.json) return context.out(`${JSON.stringify(added, null, 2)}
102358
102675
  `);
102359
- const count17 = added.watching.length;
102676
+ const count18 = added.watching.length;
102360
102677
  context.out(
102361
102678
  `${added.monitor.id} ${added.monitor.name}
102362
102679
  ${added.watching.join(" ")}
102363
- Watching ${count17} ${count17 === 1 ? "channel" : "channels"}
102680
+ Watching ${count18} ${count18 === 1 ? "channel" : "channels"}
102364
102681
  `
102365
102682
  );
102366
102683
  }
@@ -102724,6 +103041,8 @@ var argsDefinition = external_exports.record(
102724
103041
  external_exports.string().max(64),
102725
103042
  external_exports.union([external_exports.string().max(200), external_exports.number(), external_exports.boolean(), external_exports.null()])
102726
103043
  );
103044
+ var OPERATOR_KEY_ASK_SOURCES = ["agent", "cli", "by_hand"];
103045
+ var operatorKeyAskSourceSchema = external_exports.enum(OPERATOR_KEY_ASK_SOURCES);
102727
103046
  var operatorKeyStatusSchema = external_exports.enum([
102728
103047
  "pending",
102729
103048
  "approved",
@@ -102761,6 +103080,12 @@ var keyDefinition = external_exports.object({
102761
103080
  askerName: external_exports.string().optional(),
102762
103081
  /** The workspace of the API key that asked, where the card lands. */
102763
103082
  askerWorkspaceId: external_exports.string(),
103083
+ /** Where the ask came from; null on a key stored before this was recorded, read as by hand. */
103084
+ askedVia: operatorKeyAskSourceSchema.nullable().default(null),
103085
+ /** The machine a CLI ask came from, as its `laze login` named it; null for any other. */
103086
+ askedFrom: external_exports.string().nullable().default(null),
103087
+ /** The person who made the asking key, by name; absent when it cannot be read. */
103088
+ askerPersonName: external_exports.string().optional(),
102764
103089
  requestedAt: external_exports.iso.datetime(),
102765
103090
  pendingUntil: external_exports.iso.datetime(),
102766
103091
  decidedBy: external_exports.string().nullable(),
@@ -102806,7 +103131,7 @@ var OPERATOR_KEY_COPY = {
102806
103131
  operator_key_too_many_waiting: `At most ${OPERATOR_KEY.maxWaiting} keys can wait at once`,
102807
103132
  operator_key_not_found: "There is no such operator key",
102808
103133
  operator_key_not_pending: "This key was already answered or has expired",
102809
- operator_key_self_approval: "You asked for this key yourself, so someone else approves it. Ask from an agent's profile instead.",
103134
+ operator_key_self_approval: "You asked for this with your own login, so another staff member has to approve it.",
102810
103135
  operator_key_not_live: "This key is not approved, or its time is over",
102811
103136
  operator_key_proof_refused: "The operator passkey did not confirm this approval",
102812
103137
  operator_key_refused: "This key does not work here"
@@ -102856,9 +103181,9 @@ var viewDefinition = external_exports.object({
102856
103181
 
102857
103182
  // ../../modules/rum/contract/src/browser-trace-reads.ts
102858
103183
  var browserSessionIdSchema = external_exports.string().regex(/^[0-9a-f]{32}$/, "a session id: 32 hex characters");
102859
- var at6 = external_exports.iso.datetime();
103184
+ var at7 = external_exports.iso.datetime();
102860
103185
  var browserErrorDefinition = external_exports.object({
102861
- at: at6,
103186
+ at: at7,
102862
103187
  traceId: external_exports.string(),
102863
103188
  spanId: external_exports.string(),
102864
103189
  sessionId: external_exports.string().nullable(),
@@ -102875,7 +103200,7 @@ var browserErrorDefinition = external_exports.object({
102875
103200
  });
102876
103201
  var browserErrorSchema = browserErrorDefinition;
102877
103202
  var sessionSpanDefinition = external_exports.object({
102878
- at: at6,
103203
+ at: at7,
102879
103204
  durationMs: external_exports.number().nonnegative(),
102880
103205
  traceId: external_exports.string(),
102881
103206
  spanId: external_exports.string(),
@@ -102892,7 +103217,7 @@ var sessionSpanDefinition = external_exports.object({
102892
103217
  var sessionSpanSchema = sessionSpanDefinition;
102893
103218
  var tracedServiceSchema = external_exports.string().regex(/^[a-z][a-z0-9.-]{0,63}$/, "a service name: lower case letters, digits, dots and dashes");
102894
103219
  var serviceTraceDefinition = external_exports.object({
102895
- at: at6,
103220
+ at: at7,
102896
103221
  durationMs: external_exports.number().nonnegative(),
102897
103222
  traceId: external_exports.string(),
102898
103223
  /** The trace's root span name and service, as Tempo summarises it; null when no root arrived. */
@@ -103616,17 +103941,17 @@ var wikiMentionedPayloadSchemaDefinition = external_exports.object({
103616
103941
  }).strict();
103617
103942
 
103618
103943
  // ../../modules/wiki/contract/src/wiki-support-pages.ts
103619
- var count14 = external_exports.number().int().nonnegative();
103620
- var wikiSupportPageCountDefinition = external_exports.object({ pages: count14, workspaces: count14 }).strict();
103944
+ var count15 = external_exports.number().int().nonnegative();
103945
+ var wikiSupportPageCountDefinition = external_exports.object({ pages: count15, workspaces: count15 }).strict();
103621
103946
  var wikiSupportPageCountSchema = wikiSupportPageCountDefinition;
103622
103947
 
103623
103948
  // ../../modules/wiki/contract/src/wiki-locked-pages.ts
103624
103949
  var WIKI_LOCKED_PAGES_LIMIT = 200;
103625
- var count15 = external_exports.number().int().nonnegative();
103950
+ var count16 = external_exports.number().int().nonnegative();
103626
103951
  var id6 = external_exports.string().min(1).max(200);
103627
103952
  var wikiLockedPagesDefinition = external_exports.object({
103628
- pages: count15,
103629
- workspaces: count15,
103953
+ pages: count16,
103954
+ workspaces: count16,
103630
103955
  locked: external_exports.array(external_exports.object({ workspaceId: id6, pageId: id6 }).strict()).max(WIKI_LOCKED_PAGES_LIMIT),
103631
103956
  truncated: external_exports.boolean()
103632
103957
  }).strict();
@@ -103690,12 +104015,12 @@ var funnelInputDefinition = external_exports.object({
103690
104015
  to: external_exports.iso.datetime(),
103691
104016
  bucketMinutes: external_exports.union([external_exports.literal(10), external_exports.literal(60), external_exports.literal(1440)]).default(60)
103692
104017
  }).strict();
103693
- var count16 = external_exports.number().int().nonnegative();
104018
+ var count17 = external_exports.number().int().nonnegative();
103694
104019
  var funnelCountsDefinition = external_exports.object({
103695
- signUps: count16,
103696
- workspaces: count16,
103697
- activatedTeams: count16,
103698
- payingTeams: count16
104020
+ signUps: count17,
104021
+ workspaces: count17,
104022
+ activatedTeams: count17,
104023
+ payingTeams: count17
103699
104024
  });
103700
104025
  var funnelOutputDefinition = external_exports.object({
103701
104026
  bucketMinutes: external_exports.number().int(),
@@ -103724,34 +104049,34 @@ var cohortOutputDefinition = external_exports.object({
103724
104049
  promotionId: external_exports.string().nullable(),
103725
104050
  plan: external_exports.string(),
103726
104051
  paying: external_exports.boolean(),
103727
- members: count16,
104052
+ members: count17,
103728
104053
  agents: external_exports.object({
103729
- laze: count16,
103730
- connected: count16,
104054
+ laze: count17,
104055
+ connected: count17,
103731
104056
  firstLazeAgentAt: external_exports.iso.datetime().nullable()
103732
104057
  }),
103733
- turns: count16,
103734
- appsCreated: count16,
103735
- connectionsLinked: count16,
104058
+ turns: count17,
104059
+ appsCreated: count17,
104060
+ connectionsLinked: count17,
103736
104061
  /** Slack channels mirrored, Slack and Discord link and intake events, WhatsApp mirrors on. */
103737
104062
  messaging: external_exports.object({
103738
- slackChannels: count16,
103739
- slackEvents: count16,
103740
- discordEvents: count16,
103741
- whatsappMirrors: count16
104063
+ slackChannels: count17,
104064
+ slackEvents: count17,
104065
+ discordEvents: count17,
104066
+ whatsappMirrors: count17
103742
104067
  }),
103743
104068
  creatorLastMessageAt: external_exports.iso.datetime().nullable(),
103744
104069
  /** The creator's last heartbeat from a Laze web or desktop window here; null when never. */
103745
104070
  creatorLastSeenAt: external_exports.iso.datetime().nullable(),
103746
104071
  /** Members whose last heartbeat here falls in the 7 days before `until`. */
103747
- peopleSeenLast7Days: count16,
104072
+ peopleSeenLast7Days: count17,
103748
104073
  /** Live messages per UTC day; days with none are left out. */
103749
104074
  days: external_exports.array(
103750
104075
  external_exports.object({
103751
104076
  day: external_exports.string(),
103752
- byPeople: count16,
103753
- byAgents: count16,
103754
- people: count16
104077
+ byPeople: count17,
104078
+ byAgents: count17,
104079
+ people: count17
103755
104080
  })
103756
104081
  ),
103757
104082
  /** The once-only sends nurturing kept (first_agent_made, first_agent_nudge, ...). */
@@ -103775,29 +104100,29 @@ var capacityOutputDefinition = external_exports.object({
103775
104100
  /** The last day of host load, oldest first. */
103776
104101
  history: external_exports.array(hostLoadPointSchema)
103777
104102
  });
103778
- var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count: count16 }));
104103
+ var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count: count17 }));
103779
104104
  var snapshotOutputDefinition = external_exports.object({
103780
104105
  workspaceId: external_exports.string(),
103781
104106
  createdAt: external_exports.iso.datetime(),
103782
104107
  plan: external_exports.string(),
103783
104108
  status: external_exports.string(),
103784
- seats: external_exports.object({ people: count16, limit: external_exports.number().int().nullable() }),
104109
+ seats: external_exports.object({ people: count17, limit: external_exports.number().int().nullable() }),
103785
104110
  membersByRole: tally,
103786
104111
  invitesByStatus: tally,
103787
104112
  agentsByKind: tally,
103788
104113
  agentsByHosting: tally,
103789
- agentsConnected: count16,
104114
+ agentsConnected: count17,
103790
104115
  flagsOn: external_exports.array(external_exports.string()),
103791
- complimentaryComputers: count16
104116
+ complimentaryComputers: count17
103792
104117
  });
103793
104118
  var eventsInputDefinition = external_exports.object({ from: external_exports.iso.datetime(), to: external_exports.iso.datetime() }).strict();
103794
104119
  var eventCountsDefinition = external_exports.object({
103795
- total: count16,
104120
+ total: count17,
103796
104121
  /** Per type: how many, and the stored bytes of their payloads and sealed copies. */
103797
104122
  byType: external_exports.array(
103798
104123
  external_exports.object({
103799
104124
  eventType: external_exports.string(),
103800
- count: count16,
104125
+ count: count17,
103801
104126
  payloadBytes: external_exports.number().nonnegative(),
103802
104127
  encryptedCopyBytes: external_exports.number().nonnegative()
103803
104128
  })
@@ -103851,9 +104176,9 @@ var databaseHealthDefinition = external_exports.object({
103851
104176
  deadlocks: external_exports.number().nonnegative(),
103852
104177
  tempBytes: external_exports.number().nonnegative(),
103853
104178
  connections: external_exports.object({
103854
- total: count16,
103855
- byState: external_exports.array(external_exports.object({ state: external_exports.string(), count: count16 })),
103856
- waitingOnLocks: count16,
104179
+ total: count17,
104180
+ byState: external_exports.array(external_exports.object({ state: external_exports.string(), count: count17 })),
104181
+ waitingOnLocks: count17,
103857
104182
  longestActiveSeconds: external_exports.number().nonnegative(),
103858
104183
  longestIdleInTransactionSeconds: external_exports.number().nonnegative()
103859
104184
  }),
@@ -103908,7 +104233,7 @@ var tenantAgentsDefinition = external_exports.object({
103908
104233
  createdAt: external_exports.iso.datetime(),
103909
104234
  modelLevel: external_exports.string().nullable(),
103910
104235
  model: external_exports.string().nullable(),
103911
- channels: count16,
104236
+ channels: count17,
103912
104237
  limitedUntil: external_exports.iso.datetime().nullable(),
103913
104238
  limitedBy: external_exports.string().nullable(),
103914
104239
  pausedAt: external_exports.iso.datetime().nullable(),
@@ -103962,8 +104287,8 @@ var tenantBillingDefinition = external_exports.object({
103962
104287
  currencyChosen: external_exports.boolean(),
103963
104288
  cancelAtPeriodEnd: external_exports.boolean(),
103964
104289
  period: external_exports.object({ start: external_exports.iso.datetime(), end: external_exports.iso.datetime() }).nullable(),
103965
- seats: external_exports.object({ people: count16, limit: count16.nullable(), monthlyPrice: external_exports.number() }),
103966
- complimentarySeats: count16.nullable(),
104290
+ seats: external_exports.object({ people: count17, limit: count17.nullable(), monthlyPrice: external_exports.number() }),
104291
+ complimentarySeats: count17.nullable(),
103967
104292
  credits: external_exports.object({
103968
104293
  included: external_exports.number(),
103969
104294
  includedLeft: external_exports.number(),
@@ -104002,14 +104327,14 @@ var tenantVaultDefinition = external_exports.object({
104002
104327
  external_exports.object({
104003
104328
  subject: external_exports.string(),
104004
104329
  most: external_exports.string(),
104005
- maxLeaseSeconds: count16.nullable(),
104330
+ maxLeaseSeconds: count17.nullable(),
104006
104331
  blocked: external_exports.boolean(),
104007
104332
  approveNew: external_exports.boolean(),
104008
104333
  updatedAt: external_exports.iso.datetime()
104009
104334
  })
104010
104335
  ),
104011
104336
  /** Connections waiting for an admin, counted by kind; never a name, label or field. */
104012
- waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count: count16 }))
104337
+ waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count: count17 }))
104013
104338
  });
104014
104339
  var WHATSAPP_INTAKE_KEY_KINDS = ["msg", "edit", "del", "react", "read"];
104015
104340
  var tenantWhatsappInputDefinition = external_exports.object({
@@ -104022,17 +104347,17 @@ var tenantWhatsappOutputDefinition = external_exports.object({
104022
104347
  intake: external_exports.object({
104023
104348
  since: external_exports.iso.datetime(),
104024
104349
  until: external_exports.iso.datetime(),
104025
- total: count16,
104350
+ total: count17,
104026
104351
  byKind: external_exports.array(
104027
104352
  external_exports.object({
104028
104353
  kind: external_exports.enum([...WHATSAPP_INTAKE_KEY_KINDS, "other"]),
104029
- count: count16,
104354
+ count: count17,
104030
104355
  /** Events dated over a second after Laze got them, and the most ahead: a fast clock. */
104031
- aheadOfLaze: external_exports.object({ count: count16, maxAheadMs: external_exports.number().int() }).optional()
104356
+ aheadOfLaze: external_exports.object({ count: count17, maxAheadMs: external_exports.number().int() }).optional()
104032
104357
  })
104033
104358
  ),
104034
104359
  /** The workspace's chat messages and changes dated over a second after Laze stored them. */
104035
- chatAheadOfLaze: external_exports.object({ count: count16, maxAheadMs: external_exports.number().int() }).optional()
104360
+ chatAheadOfLaze: external_exports.object({ count: count17, maxAheadMs: external_exports.number().int() }).optional()
104036
104361
  })
104037
104362
  });
104038
104363
  var computerBrowserInputDefinition = external_exports.object({
@@ -104074,6 +104399,10 @@ var computerBrowserOutputDefinition = external_exports.object({
104074
104399
  var chatReadsInputDefinition = external_exports.object({
104075
104400
  userId: external_exports.string().trim().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/)
104076
104401
  }).strict();
104402
+ var opsId = external_exports.string().trim().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
104403
+ var chatAuthorsInputDefinition = external_exports.object({ channelId: opsId.optional(), agentId: opsId.optional() }).strict().refine((input2) => input2.channelId === void 0 !== (input2.agentId === void 0), {
104404
+ message: "Give a channelId or an agentId, not both."
104405
+ });
104077
104406
  var linkDomainsInputDefinition = external_exports.object({
104078
104407
  limit: external_exports.number().int().min(1).max(300).default(200),
104079
104408
  cursor: external_exports.string().max(64).regex(/^[A-Za-z0-9_-]+$/).optional()
@@ -104392,6 +104721,13 @@ var OPS_FUNCTIONS = {
104392
104721
  input: chatReadsInputDefinition,
104393
104722
  output: chatReadFactsSchema
104394
104723
  }),
104724
+ "tenant.chat_authors": entry({
104725
+ title: "Who wrote in one conversation or an agent's conversations: author kinds, ids, counts",
104726
+ scope: "tenant",
104727
+ view: "table",
104728
+ input: chatAuthorsInputDefinition,
104729
+ output: chatAuthorFactsSchema
104730
+ }),
104395
104731
  "tenant.link_domains": entry({
104396
104732
  title: "One workspace's link preview sites: hosts, link and message counts, path shapes",
104397
104733
  scope: "tenant",
@@ -104548,21 +104884,31 @@ function typedArg(text3) {
104548
104884
  }
104549
104885
  function argsOf({ args }) {
104550
104886
  const pairs = (args.lists.arg ?? []).map((pair) => {
104551
- const at8 = pair.indexOf("=");
104552
- if (at8 < 1) throw new CliUsageError(`--arg takes name=value.
104887
+ const at9 = pair.indexOf("=");
104888
+ if (at9 < 1) throw new CliUsageError(`--arg takes name=value.
104553
104889
  ${OPERATOR_KEY_USAGE}`);
104554
- const text3 = pair.slice(at8 + 1);
104555
- return [pair.slice(0, at8), typedArg(text3)];
104890
+ const text3 = pair.slice(at9 + 1);
104891
+ return [pair.slice(0, at9), typedArg(text3)];
104556
104892
  });
104557
104893
  return Object.fromEntries(pairs);
104558
104894
  }
104559
104895
  var EXPIRED_LINE = `Expired: nobody answered within ${OPERATOR_KEY.pendingMinutes} minutes. Nothing ran. Ask again with laze ops request.`;
104896
+ function waitingLine(key) {
104897
+ const tail = `Nothing runs until it is approved. It expires at ${key.pendingUntil} if nobody answers.`;
104898
+ if (key.asker !== "person") {
104899
+ return `Waiting for an operator's passkey at /ops/keys. ${tail}`;
104900
+ }
104901
+ if (key.askedVia === "cli" || key.askedVia === "agent") {
104902
+ return `Waiting for your passkey approval at /ops/keys. ${tail}`;
104903
+ }
104904
+ return `Waiting for another staff member's passkey at /ops/keys: you asked with your own login, so you cannot approve it. ${tail}`;
104905
+ }
104560
104906
  function statusLine2({ key, nowMs: nowMs2 }) {
104561
104907
  switch (key.status) {
104562
104908
  case "approved":
104563
104909
  return key.action === "ops.functions" ? `Approved until ${key.endsAt}. Run: laze ops call ${key.id} <${key.functions.join("|")}>` : `Approved until ${key.endsAt}. Run: laze ops use ${key.id}`;
104564
104910
  case "pending":
104565
- return Temporal3.Instant.from(key.pendingUntil).epochMilliseconds <= nowMs2 ? EXPIRED_LINE : `Waiting for an operator's passkey at /ops/keys. Nothing runs until they approve. It expires at ${key.pendingUntil} if nobody answers.`;
104911
+ return Temporal3.Instant.from(key.pendingUntil).epochMilliseconds <= nowMs2 ? EXPIRED_LINE : waitingLine(key);
104566
104912
  case "expired":
104567
104913
  return EXPIRED_LINE;
104568
104914
  case "denied":
@@ -104811,21 +105157,21 @@ async function startedUpdate({
104811
105157
  }
104812
105158
  async function noteRelease({
104813
105159
  context,
104814
- mine: mine5,
105160
+ mine: mine6,
104815
105161
  server,
104816
105162
  sandbox,
104817
105163
  quiet
104818
105164
  }) {
104819
- const warning = releaseWarningOf({ mine: mine5, server, sandbox });
105165
+ const warning = releaseWarningOf({ mine: mine6, server, sandbox });
104820
105166
  if (!warning) return false;
104821
- const older = !sandbox && releaseSkewOf({ mine: mine5, server }) === "older";
105167
+ const older = !sandbox && releaseSkewOf({ mine: mine6, server }) === "older";
104822
105168
  const started = older ? await startedUpdate({ context, server }) : null;
104823
- if (!quiet) context.err(started ? selfUpdateLineOf({ mine: mine5, server, ...started }) : warning);
105169
+ if (!quiet) context.err(started ? selfUpdateLineOf({ mine: mine6, server, ...started }) : warning);
104824
105170
  return true;
104825
105171
  }
104826
105172
  function watchingRelease({
104827
105173
  context,
104828
- mine: mine5 = cliVersionOf(),
105174
+ mine: mine6 = cliVersionOf(),
104829
105175
  quiet = false
104830
105176
  }) {
104831
105177
  const sandbox = context.program.at(-1) === SANDBOX_CLI_PATH;
@@ -104835,7 +105181,7 @@ function watchingRelease({
104835
105181
  fetcher: async (input2, init) => {
104836
105182
  const response = await context.fetcher(input2, init);
104837
105183
  const server = response.headers.get(CLI_RELEASE_HEADER);
104838
- if (!warned && server) warned = await noteRelease({ context, mine: mine5, server, sandbox, quiet });
105184
+ if (!warned && server) warned = await noteRelease({ context, mine: mine6, server, sandbox, quiet });
104839
105185
  return response;
104840
105186
  }
104841
105187
  };
@@ -105056,14 +105402,14 @@ var CHECK_WAIT_TRIES = 30;
105056
105402
  function timingOf(args) {
105057
105403
  const cron = flagText({ args, name: "cron" });
105058
105404
  const rrule = flagText({ args, name: "rrule" });
105059
- const at8 = flagText({ args, name: "at" });
105060
- const given = [cron, rrule, at8].filter(Boolean);
105405
+ const at9 = flagText({ args, name: "at" });
105406
+ const given = [cron, rrule, at9].filter(Boolean);
105061
105407
  if (given.length !== 1)
105062
105408
  throw new CliUsageError(`Give exactly one of --cron, --rrule or --at.
105063
105409
  ${USAGE17}`);
105064
105410
  if (cron) return { kind: "cron", cron };
105065
105411
  if (rrule) return { kind: "rrule", rrule };
105066
- return { kind: "once", at: at8 };
105412
+ return { kind: "once", at: at9 };
105067
105413
  }
105068
105414
  function printSchedule({
105069
105415
  context,
@@ -106094,7 +106440,7 @@ async function releaseAgeSettingsOf({
106094
106440
  async function update2({
106095
106441
  context,
106096
106442
  args,
106097
- mine: mine5 = cliVersionOf()
106443
+ mine: mine6 = cliVersionOf()
106098
106444
  }) {
106099
106445
  const plan2 = updatePlanOf({ script: await realScriptOf({ program: context.program }) });
106100
106446
  if (plan2.kind === "sandbox") {
@@ -106110,17 +106456,17 @@ async function update2({
106110
106456
  }
106111
106457
  const line = plan2.command.join(" ");
106112
106458
  if (args.flags["dry-run"]) {
106113
- context.out(`laze ${mine5}, installed with ${plan2.manager}. Would run: ${line}
106459
+ context.out(`laze ${mine6}, installed with ${plan2.manager}. Would run: ${line}
106114
106460
  `);
106115
106461
  return 0;
106116
106462
  }
106117
106463
  const latest = await latestReleaseOf({ context });
106118
- if (latest && latest === mine5) {
106119
- context.out(`laze ${mine5} is the latest release.
106464
+ if (latest && latest === mine6) {
106465
+ context.out(`laze ${mine6} is the latest release.
106120
106466
  `);
106121
106467
  return 0;
106122
106468
  }
106123
- context.out(`Updating laze ${mine5} with ${plan2.manager}: ${line}
106469
+ context.out(`Updating laze ${mine6} with ${plan2.manager}: ${line}
106124
106470
  `);
106125
106471
  const code4 = await context.runCommand({ command: plan2.command, env: {} });
106126
106472
  if (code4 !== 0) {
@@ -106128,12 +106474,12 @@ async function update2({
106128
106474
  `);
106129
106475
  return code4;
106130
106476
  }
106131
- return checkInstalled({ context, plan: plan2, mine: mine5, latest });
106477
+ return checkInstalled({ context, plan: plan2, mine: mine6, latest });
106132
106478
  }
106133
106479
  async function checkInstalled({
106134
106480
  context,
106135
106481
  plan: plan2,
106136
- mine: mine5,
106482
+ mine: mine6,
106137
106483
  latest
106138
106484
  }) {
106139
106485
  const printed2 = await printedBy({ context, command: [...context.program, "--version"] });
@@ -106142,13 +106488,13 @@ async function checkInstalled({
106142
106488
  context.out("Installed. `laze --version` names the new version.\n");
106143
106489
  return 0;
106144
106490
  }
106145
- const held = latest ? releaseSkewOf({ mine: installed, server: latest }) === "older" : installed === mine5;
106491
+ const held = latest ? releaseSkewOf({ mine: installed, server: latest }) === "older" : installed === mine6;
106146
106492
  const { script, onPath } = await otherInstallsOf({ context });
106147
106493
  const shadowed = shadowedLineOf({ updated: installed, script, onPath });
106148
106494
  if (!held) {
106149
106495
  context.out(
106150
- installed === mine5 ? `laze ${mine5} is the latest release.
106151
- ` : `Updated laze ${mine5} to ${installed}.
106496
+ installed === mine6 ? `laze ${mine6} is the latest release.
106497
+ ` : `Updated laze ${mine6} to ${installed}.
106152
106498
  `
106153
106499
  );
106154
106500
  if (shadowed) context.err(shadowed);
@@ -106194,10 +106540,10 @@ function bareLineOf({ line, where }) {
106194
106540
  throw new CliUsageError(`${where}: not a name: ${line}`);
106195
106541
  }
106196
106542
  function lineOf5({ line, where }) {
106197
- const at8 = line.indexOf("=");
106198
- if (at8 === -1) return bareLineOf({ line, where });
106199
- const variable = line.slice(0, at8).trim();
106200
- const value = line.slice(at8 + 1).trim();
106543
+ const at9 = line.indexOf("=");
106544
+ if (at9 === -1) return bareLineOf({ line, where });
106545
+ const variable = line.slice(0, at9).trim();
106546
+ const value = line.slice(at9 + 1).trim();
106201
106547
  if (!VARIABLE.test(variable)) {
106202
106548
  throw new CliUsageError(`${where}: not a variable name: ${variable}`);
106203
106549
  }
@@ -106258,6 +106604,55 @@ function credentialProcessJson(fields) {
106258
106604
  });
106259
106605
  }
106260
106606
 
106607
+ // src/rules/vault-run-chain.rules.ts
106608
+ var CONNECTION2 = /^[a-z0-9][a-z0-9-]{0,62}$/;
106609
+ var FOLDABLE_FLAGS = /* @__PURE__ */ new Set(["--reason", "--wait"]);
106610
+ function innerRunOf({
106611
+ command,
106612
+ profile
106613
+ }) {
106614
+ let at9 = 0;
106615
+ if (command[at9] !== "laze") return null;
106616
+ at9 += 1;
106617
+ let innerProfile = "";
106618
+ if (command[at9] === "--profile") {
106619
+ innerProfile = command[at9 + 1] ?? "";
106620
+ at9 += 2;
106621
+ }
106622
+ if (innerProfile !== profile || command[at9] !== "vault" || command[at9 + 1] !== "run") {
106623
+ return null;
106624
+ }
106625
+ at9 += 2;
106626
+ const names = [];
106627
+ while (at9 < command.length && command[at9] !== "--") {
106628
+ const word3 = command[at9] ?? "";
106629
+ if (word3.startsWith("--")) {
106630
+ if (!FOLDABLE_FLAGS.has(word3)) return null;
106631
+ at9 += 2;
106632
+ continue;
106633
+ }
106634
+ if (!CONNECTION2.test(word3)) return null;
106635
+ names.push(word3);
106636
+ at9 += 1;
106637
+ }
106638
+ if (names.length === 0 || command[at9] !== "--" || at9 + 1 >= command.length) return null;
106639
+ return { names, command: command.slice(at9 + 1) };
106640
+ }
106641
+ function vaultRunChainOf({
106642
+ names,
106643
+ command,
106644
+ profile = ""
106645
+ }) {
106646
+ const all = [...names];
106647
+ let rest = command;
106648
+ for (let inner = innerRunOf({ command: rest, profile }); inner; ) {
106649
+ all.push(...inner.names);
106650
+ rest = inner.command;
106651
+ inner = innerRunOf({ command: rest, profile });
106652
+ }
106653
+ return { names: [...new Set(all)], command: rest };
106654
+ }
106655
+
106261
106656
  // src/services/vault-batch.service.ts
106262
106657
  import { rm as rm20 } from "node:fs/promises";
106263
106658
  async function batchOf({ response }) {
@@ -106410,7 +106805,7 @@ async function releaseBatch({
106410
106805
  const { waiting } = sorted;
106411
106806
  const later = await untilAllAnswered({ context, door, waiting, deadline });
106412
106807
  if (later === "capped") return { exitCode: 75 };
106413
- for (const [key, release2] of later) settled3.set(key, release2);
106808
+ for (const [key, release3] of later) settled3.set(key, release3);
106414
106809
  } catch (error63) {
106415
106810
  if (!(error63 instanceof ServerGoneError)) throw error63;
106416
106811
  context.err(`${error63.message}. Run the command again to keep waiting.
@@ -106433,10 +106828,10 @@ async function releaseBatch({
106433
106828
  keyPath: door.keyPath
106434
106829
  });
106435
106830
  if ("exitCode" in outcome) return outcome;
106436
- for (const [key, release2] of settled3) {
106437
- if (release2.outcome !== "allow" || !release2.boundary) continue;
106438
- const { connectionId } = release2.boundary;
106439
- const fields = standInFieldsOf({ env: release2.env, boundary: release2.boundary });
106831
+ for (const [key, release3] of settled3) {
106832
+ if (release3.outcome !== "allow" || !release3.boundary) continue;
106833
+ const { connectionId } = release3.boundary;
106834
+ const fields = standInFieldsOf({ env: release3.env, boundary: release3.boundary });
106440
106835
  await handedOut({ context, name: key, connectionId, fields });
106441
106836
  }
106442
106837
  return outcome;
@@ -106445,10 +106840,10 @@ function sortedReleasesOf({ entries }) {
106445
106840
  const settled3 = /* @__PURE__ */ new Map();
106446
106841
  const waiting = /* @__PURE__ */ new Map();
106447
106842
  for (const entry2 of entries) {
106448
- const release2 = entry2.release;
106449
- if (!release2) continue;
106450
- if (release2.outcome === "ask") waiting.set(keyOf(entry2), release2);
106451
- else settled3.set(keyOf(entry2), release2);
106843
+ const release3 = entry2.release;
106844
+ if (!release3) continue;
106845
+ if (release3.outcome === "ask") waiting.set(keyOf(entry2), release3);
106846
+ else settled3.set(keyOf(entry2), release3);
106452
106847
  }
106453
106848
  return { settled: settled3, waiting };
106454
106849
  }
@@ -106457,11 +106852,11 @@ function refusalOf({
106457
106852
  settled: settled3
106458
106853
  }) {
106459
106854
  const codes = [];
106460
- for (const release2 of settled3.values()) {
106461
- if (release2.outcome !== "deny") continue;
106462
- context.err(`${release2.message}
106855
+ for (const release3 of settled3.values()) {
106856
+ if (release3.outcome !== "deny") continue;
106857
+ context.err(`${release3.message}
106463
106858
  `);
106464
- codes.push(release2.exitCode || 1);
106859
+ codes.push(release3.exitCode || 1);
106465
106860
  }
106466
106861
  if (codes.length === 0) return 0;
106467
106862
  return codes.includes(77) ? 77 : codes[0] ?? 1;
@@ -106480,11 +106875,11 @@ async function valuesOf({
106480
106875
  }
106481
106876
  const opened = /* @__PURE__ */ new Map();
106482
106877
  let keep2 = false;
106483
- for (const [key, release2] of settled3) {
106484
- if (release2.outcome !== "allow") continue;
106485
- opened.set(key, await envOf({ release: release2, run: run4 }));
106486
- if (leaseHolds({ release: release2, nowMs: context.nowMs() })) keep2 = true;
106487
- if (release2.message) context.err(`${release2.message}
106878
+ for (const [key, release3] of settled3) {
106879
+ if (release3.outcome !== "allow") continue;
106880
+ opened.set(key, await envOf({ release: release3, run: run4 }));
106881
+ if (leaseHolds({ release: release3, nowMs: context.nowMs() })) keep2 = true;
106882
+ if (release3.message) context.err(`${release3.message}
106488
106883
  `);
106489
106884
  }
106490
106885
  if (!keep2) await rm20(keyPath, { force: true });
@@ -106517,12 +106912,12 @@ The reason comes from --reason, else KV_REASON or LAZE_VAULT_REASON: set it on e
106517
106912
  helm or terraform command, which reach this through credential_process.`;
106518
106913
  function withWaitSeconds(args) {
106519
106914
  if (args.flags.wait !== true) return args;
106520
- const at8 = args.words.findLastIndex((word3, index) => index >= 2 && /^\d+$/.test(word3));
106521
- if (at8 === -1) return args;
106915
+ const at9 = args.words.findLastIndex((word3, index) => index >= 2 && /^\d+$/.test(word3));
106916
+ if (at9 === -1) return args;
106522
106917
  return {
106523
106918
  ...args,
106524
- words: args.words.filter((_, index) => index !== at8),
106525
- flags: { ...args.flags, wait: args.words[at8] ?? "" }
106919
+ words: args.words.filter((_, index) => index !== at9),
106920
+ flags: { ...args.flags, wait: args.words[at9] ?? "" }
106526
106921
  };
106527
106922
  }
106528
106923
  function reasonOf({ context, args }) {
@@ -106698,6 +107093,56 @@ ${AWS_USAGE}`
106698
107093
  `);
106699
107094
  return 0;
106700
107095
  }
107096
+ async function vaultRunMany({
107097
+ context,
107098
+ args,
107099
+ names,
107100
+ command
107101
+ }) {
107102
+ const reason2 = flagText({ args, name: "reason" });
107103
+ if (!reason2)
107104
+ throw new CliUsageError(`Say why with --reason "<one plain sentence>"
107105
+ ${ENV_USAGE}`);
107106
+ const badReason = refusedReason({ context, reason: reason2 });
107107
+ if (badReason !== null) return badReason;
107108
+ const lines2 = names.map((ref2) => ({ kind: "connection", ref: ref2 }));
107109
+ const outcome = await releasedKeys({
107110
+ context,
107111
+ args: withWaitSeconds(args),
107112
+ refs: refsOf(lines2),
107113
+ reason: reason2,
107114
+ command
107115
+ });
107116
+ if ("exitCode" in outcome) return outcome.exitCode;
107117
+ const { released, byConnection } = outcome;
107118
+ const prepared = preparedCommand({ command, released: byConnection });
107119
+ if ("refusal" in prepared) {
107120
+ context.err(`${prepared.refusal}
107121
+ `);
107122
+ return 1;
107123
+ }
107124
+ const env = environmentOf({ lines: lines2, released });
107125
+ const redact = [...released.values()].flatMap(({ fields }) => secretValuesOf({ fields }));
107126
+ return context.runCommand({ command: prepared.command, env, redact });
107127
+ }
107128
+ async function vaultRunChained({
107129
+ context,
107130
+ args: given
107131
+ }) {
107132
+ const args = withWaitSeconds(given);
107133
+ const chain = vaultRunChainOf({
107134
+ names: args.words.slice(2),
107135
+ command: args.rest,
107136
+ profile: flagText({ args, name: "profile" })
107137
+ });
107138
+ if (chain.names.length <= 1 || args.rest.length === 0) return vaultRun({ context, args: given });
107139
+ if (args.flags["real-value"] === true) {
107140
+ throw new CliUsageError(
107141
+ "laze vault run --real-value takes one key: run each key that needs its real value on its own"
107142
+ );
107143
+ }
107144
+ return vaultRunMany({ context, args, names: chain.names, command: chain.command });
107145
+ }
106701
107146
 
106702
107147
  // src/services/vault-exec-provider-commands.service.ts
106703
107148
  var EXEC_PROVIDER_USAGE = `Usage: laze vault exec-provider
@@ -106712,9 +107157,9 @@ function execProviderIds({ request: request2 }) {
106712
107157
  return Array.isArray(ids) ? ids.filter((id8) => typeof id8 === "string") : [];
106713
107158
  }
106714
107159
  function splitExecId({ id: id8 }) {
106715
- const at8 = id8.indexOf("#");
106716
- if (at8 === -1) return { connection: id8 };
106717
- return { connection: id8.slice(0, at8), field: id8.slice(at8 + 1) };
107160
+ const at9 = id8.indexOf("#");
107161
+ if (at9 === -1) return { connection: id8 };
107162
+ return { connection: id8.slice(0, at9), field: id8.slice(at9 + 1) };
106718
107163
  }
106719
107164
  function valueOf({
106720
107165
  fields,
@@ -106905,7 +107350,7 @@ async function vaultSave({ context, args }) {
106905
107350
  // src/services/vault-scrub-commands.service.ts
106906
107351
  function lineOf6(channel) {
106907
107352
  const where = channel.name ? `#${channel.name}` : channel.channelId;
106908
- const found = Object.entries(channel.found).map(([vendor, count17]) => `${vendor} ${count17}`).join(", ");
107353
+ const found = Object.entries(channel.found).map(([vendor, count18]) => `${vendor} ${count18}`).join(", ");
106909
107354
  const kinds = [`held ${channel.held}`, ...found ? [`found: ${found}`] : []].join("; ");
106910
107355
  return `${where} scanned ${channel.scanned} changed ${channel.messages} ${kinds}
106911
107356
  `;
@@ -107247,7 +107692,7 @@ var WHATSAPP_BUSINESS_SEND_UNRESOLVED_EVENT_TYPE = `${prefix}.unresolved`;
107247
107692
  var WHATSAPP_BUSINESS_EVIDENCE = ["sent", "delivered", "read"];
107248
107693
  var whatsappBusinessEvidenceSchema = external_exports.enum(WHATSAPP_BUSINESS_EVIDENCE);
107249
107694
  var id7 = external_exports.string().min(1).max(200);
107250
- var at7 = external_exports.iso.datetime();
107695
+ var at8 = external_exports.iso.datetime();
107251
107696
  var code3 = external_exports.string().min(1).max(64).regex(/^[a-z_]+$/);
107252
107697
  var sendRef2 = {
107253
107698
  workspaceId: id7,
@@ -107255,16 +107700,16 @@ var sendRef2 = {
107255
107700
  sendId: id7,
107256
107701
  /** `wab-send:<send id>`: the stream's id. */
107257
107702
  stream: id7,
107258
- at: at7
107703
+ at: at8
107259
107704
  };
107260
107705
  var requestedDefinition = external_exports.object({
107261
107706
  ...sendRef2,
107262
107707
  kind: external_exports.enum(["text", "template"]),
107263
107708
  /** After this, with no answer from Meta, the send reads unconfirmed. */
107264
- sendBy: at7
107709
+ sendBy: at8
107265
107710
  });
107266
107711
  var heldDefinition = external_exports.object({ ...sendRef2, attentionId: id7 });
107267
- var releasedDefinition = external_exports.object({ ...sendRef2, sendBy: at7 });
107712
+ var releasedDefinition = external_exports.object({ ...sendRef2, sendBy: at8 });
107268
107713
  var acceptedDefinition = external_exports.object({ ...sendRef2, wamid: id7 });
107269
107714
  var evidencedDefinition = external_exports.object({
107270
107715
  ...sendRef2,
@@ -107272,7 +107717,7 @@ var evidencedDefinition = external_exports.object({
107272
107717
  evidence: whatsappBusinessEvidenceSchema
107273
107718
  });
107274
107719
  var refusedDefinition = external_exports.object({ ...sendRef2, code: code3 });
107275
- var unresolvedDefinition = external_exports.object({ ...sendRef2, sendBy: at7 });
107720
+ var unresolvedDefinition = external_exports.object({ ...sendRef2, sendBy: at8 });
107276
107721
  var WHATSAPP_BUSINESS_SEND_STEPS = [
107277
107722
  "none",
107278
107723
  "queued",
@@ -107297,8 +107742,8 @@ var unresolvedIntentDefinition = external_exports.object({
107297
107742
  connectionId: external_exports.string(),
107298
107743
  sendId: external_exports.string(),
107299
107744
  stream: external_exports.string(),
107300
- sendBy: at7,
107301
- at: at7
107745
+ sendBy: at8,
107746
+ at: at8
107302
107747
  });
107303
107748
 
107304
107749
  // src/services/whatsapp-business-commands.service.ts
@@ -107671,8 +108116,8 @@ var USAGE20 = [
107671
108116
  "With no machine it is the WhatsApp linked on your (or your agent's owner's) Laze computer.",
107672
108117
  "A chat is its id, a phone number or a contact or group name."
107673
108118
  ].join("\n");
107674
- function word2({ args, at: at8 }) {
107675
- const value = args.words[at8];
108119
+ function word2({ args, at: at9 }) {
108120
+ const value = args.words[at9];
107676
108121
  if (!value) throw new CliUsageError(USAGE20);
107677
108122
  return value;
107678
108123
  }
@@ -107964,7 +108409,7 @@ function wikiFileMarkdown(file4) {
107964
108409
  const label3 = file4.name.replace(/[[\]]/g, "");
107965
108410
  return `${file4.contentType.startsWith("image/") ? "!" : ""}[${label3}](${file4.url})`;
107966
108411
  }
107967
- var attach = async ({ context, args, usage: usage2 }) => {
108412
+ var attach2 = async ({ context, args, usage: usage2 }) => {
107968
108413
  const path = args.words[2];
107969
108414
  const local2 = args.words[3];
107970
108415
  if (!path || !local2) throw new CliUsageError(usage2);
@@ -108028,7 +108473,7 @@ var link = async ({ context, args, usage: usage2 }) => {
108028
108473
  `);
108029
108474
  };
108030
108475
  var WIKI_FILE_COMMANDS = {
108031
- attach,
108476
+ attach: attach2,
108032
108477
  files: files2,
108033
108478
  file: link
108034
108479
  };
@@ -108295,8 +108740,8 @@ async function roles({ context, args }) {
108295
108740
  const catalogue = await client.get("/api/roles");
108296
108741
  if (args.flags.json) return printJson11(context, catalogue);
108297
108742
  for (const role2 of catalogue) {
108298
- const count17 = `${role2.permissions.length} permissions`;
108299
- context.out(`${role2.label} ${count17} ${role2.description}
108743
+ const count18 = `${role2.permissions.length} permissions`;
108744
+ context.out(`${role2.label} ${count18} ${role2.description}
108300
108745
  `);
108301
108746
  context.out(` ${role2.permissions.join(", ")}
108302
108747
  `);
@@ -108552,7 +108997,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
108552
108997
  laze agent faces every agent's sloth seed or picture
108553
108998
  laze adopt codex [--thread <id>] answer Laze messages in a Codex thread
108554
108999
  laze adopt codex --status | --stop the background adopt that laze agent link started
108555
- laze vault run <name> --reason "<why>" -- <cmd> run a command with a vault connection
109000
+ laze vault run <name>... --reason "<why>" -- <cmd> run a command with vault keys, all on one card
108556
109001
  laze vault env [<file>] --reason "<why>" -- <cmd> run a command with every key .env.vault names (agents)
108557
109002
  laze vault env --names | --shell what .env.vault resolves to; export lines for a shell hook
108558
109003
  laze vault aws <connection> [--reason "<why>"] AWS credential_process JSON from a short-lived STS session
@@ -108749,7 +109194,7 @@ var COMMANDS5 = {
108749
109194
  wiki,
108750
109195
  skill,
108751
109196
  app,
108752
- "vault run": vaultRun,
109197
+ "vault run": vaultRunChained,
108753
109198
  "vault env": vaultEnv2,
108754
109199
  "vault aws": vaultAws,
108755
109200
  "vault exec-provider": vaultExecProvider,