@lazehq/cli 0.1.118 → 0.1.120

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 +415 -199
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -31077,15 +31077,15 @@ ${value}`;
31077
31077
  pos = 0;
31078
31078
  }
31079
31079
  }
31080
- discardLeadingBytes(count12) {
31081
- while (count12 > 0 && this.lineChunkIndex < this.chunks.length) {
31080
+ discardLeadingBytes(count13) {
31081
+ while (count13 > 0 && this.lineChunkIndex < this.chunks.length) {
31082
31082
  const chunk = this.chunks[this.lineChunkIndex];
31083
31083
  const remaining = chunk.length - this.linePos;
31084
- if (count12 < remaining) {
31085
- this.linePos += count12;
31086
- count12 = 0;
31084
+ if (count13 < remaining) {
31085
+ this.linePos += count13;
31086
+ count13 = 0;
31087
31087
  } else {
31088
- count12 -= remaining;
31088
+ count13 -= remaining;
31089
31089
  this.lineChunkIndex++;
31090
31090
  this.linePos = 0;
31091
31091
  }
@@ -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 count12 of counts.values()) {
31838
- const p = count12 / sample.length;
31837
+ for (const count13 of counts.values()) {
31838
+ const p = count13 / sample.length;
31839
31839
  entropy -= p * Math.log2(p);
31840
31840
  }
31841
31841
  return entropy;
@@ -36960,7 +36960,7 @@ function shadowedLinkLineOf({ shadow }) {
36960
36960
  }
36961
36961
 
36962
36962
  // src/rules/cli-version.rules.ts
36963
- var STAMPED = "0.1.118";
36963
+ var STAMPED = "0.1.120";
36964
36964
  function cliVersionOf({ stamped = STAMPED } = {}) {
36965
36965
  return stamped.startsWith("__") ? "dev" : stamped;
36966
36966
  }
@@ -38725,14 +38725,14 @@ function codePointLength(str) {
38725
38725
  const units = str.length;
38726
38726
  if (!highSurrogate.test(str))
38727
38727
  return units;
38728
- let count12 = units;
38728
+ let count13 = units;
38729
38729
  for (let i = 0; i < units - 1; i++) {
38730
38730
  if ((str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320) {
38731
- count12--;
38731
+ count13--;
38732
38732
  i++;
38733
38733
  }
38734
38734
  }
38735
- return count12;
38735
+ return count13;
38736
38736
  }
38737
38737
  function getLengthableOrigin(input2) {
38738
38738
  if (Array.isArray(input2))
@@ -42545,7 +42545,7 @@ function isRecursive(inst, stack, resolve28) {
42545
42545
  return PROVEN;
42546
42546
  stack.add(inst);
42547
42547
  let result2 = NONE;
42548
- const check3 = (child) => {
42548
+ const check4 = (child) => {
42549
42549
  if (result2 !== PROVEN && child?._zod) {
42550
42550
  const answer6 = isRecursive(child, stack, resolve28);
42551
42551
  if (answer6 > result2)
@@ -42574,32 +42574,32 @@ function isRecursive(inst, stack, resolve28) {
42574
42574
  case "object": {
42575
42575
  const raw = rawShape(def);
42576
42576
  merge2(raw ? shape(raw, true) : ASSUMED);
42577
- check3(def.catchall);
42577
+ check4(def.catchall);
42578
42578
  break;
42579
42579
  }
42580
42580
  case "array":
42581
- check3(def.element);
42581
+ check4(def.element);
42582
42582
  break;
42583
42583
  case "tuple":
42584
42584
  for (const el of def.items)
42585
- check3(el);
42586
- check3(def.rest);
42585
+ check4(el);
42586
+ check4(def.rest);
42587
42587
  break;
42588
42588
  case "record":
42589
42589
  case "map":
42590
- check3(def.keyType);
42591
- check3(def.valueType);
42590
+ check4(def.keyType);
42591
+ check4(def.valueType);
42592
42592
  break;
42593
42593
  case "set":
42594
- check3(def.valueType);
42594
+ check4(def.valueType);
42595
42595
  break;
42596
42596
  case "union":
42597
42597
  for (const el of def.options)
42598
- check3(el);
42598
+ check4(el);
42599
42599
  break;
42600
42600
  case "intersection":
42601
- check3(def.left);
42602
- check3(def.right);
42601
+ check4(def.left);
42602
+ check4(def.right);
42603
42603
  break;
42604
42604
  case "optional":
42605
42605
  case "nullable":
@@ -42610,15 +42610,15 @@ function isRecursive(inst, stack, resolve28) {
42610
42610
  case "nonoptional":
42611
42611
  case "promise":
42612
42612
  case "success":
42613
- check3(def.innerType);
42613
+ check4(def.innerType);
42614
42614
  break;
42615
42615
  case "pipe":
42616
- check3(def.in);
42617
- check3(def.out);
42616
+ check4(def.in);
42617
+ check4(def.out);
42618
42618
  break;
42619
42619
  case "function":
42620
- check3(def.input);
42621
- check3(def.output);
42620
+ check4(def.input);
42621
+ check4(def.output);
42622
42622
  break;
42623
42623
  // `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly
42624
42624
  case "lazy": {
@@ -42659,10 +42659,10 @@ function isRecursive(inst, stack, resolve28) {
42659
42659
  if (!value || typeof value !== "object")
42660
42660
  continue;
42661
42661
  if (value._zod)
42662
- check3(value);
42662
+ check4(value);
42663
42663
  else if (Array.isArray(value))
42664
42664
  for (const el of value)
42665
- check3(el);
42665
+ check4(el);
42666
42666
  }
42667
42667
  }
42668
42668
  }
@@ -43087,8 +43087,8 @@ function az_default() {
43087
43087
  }
43088
43088
 
43089
43089
  // ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/be.js
43090
- function getBelarusianPlural(count12, one, few, many) {
43091
- const absCount = Math.abs(count12);
43090
+ function getBelarusianPlural(count13, one, few, many) {
43091
+ const absCount = Math.abs(count13);
43092
43092
  const lastDigit = absCount % 10;
43093
43093
  const lastTwoDigits = absCount % 100;
43094
43094
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -45735,8 +45735,8 @@ function hu_default() {
45735
45735
  }
45736
45736
 
45737
45737
  // ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hy.js
45738
- function getArmenianPlural(count12, one, many) {
45739
- return Math.abs(count12) === 1 ? one : many;
45738
+ function getArmenianPlural(count13, one, many) {
45739
+ return Math.abs(count13) === 1 ? one : many;
45740
45740
  }
45741
45741
  function withDefiniteArticle(word3) {
45742
45742
  if (!word3)
@@ -48474,8 +48474,8 @@ function ro_default() {
48474
48474
  }
48475
48475
 
48476
48476
  // ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ru.js
48477
- function getRussianPlural(count12, one, few, many) {
48478
- const absCount = Math.abs(count12);
48477
+ function getRussianPlural(count13, one, few, many) {
48478
+ const absCount = Math.abs(count13);
48479
48479
  const lastDigit = absCount % 10;
48480
48480
  const lastTwoDigits = absCount % 100;
48481
48481
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -50608,8 +50608,8 @@ function generateChecks(doc, ctx, schema, accessor) {
50608
50608
  if (!schemaChecks || schemaChecks.length === 0)
50609
50609
  return accessor;
50610
50610
  let currentAccessor = accessor;
50611
- for (const check3 of schemaChecks) {
50612
- const def = check3._zod.def;
50611
+ for (const check4 of schemaChecks) {
50612
+ const def = check4._zod.def;
50613
50613
  if (def.when && !WHEN_DEFAULTED_CHECKS.has(def.check)) {
50614
50614
  throw new ZodCompileUnsupportedError(`check with a custom "when" condition`);
50615
50615
  }
@@ -50657,7 +50657,7 @@ function generateChecks(doc, ctx, schema, accessor) {
50657
50657
  currentAccessor = generateStringFormatCheck(doc, ctx, def, currentAccessor);
50658
50658
  break;
50659
50659
  case "custom":
50660
- currentAccessor = generateCustomRefineCheck(doc, ctx, check3, currentAccessor);
50660
+ currentAccessor = generateCustomRefineCheck(doc, ctx, check4, currentAccessor);
50661
50661
  break;
50662
50662
  case "bigint_format":
50663
50663
  generateBigIntFormatCheck(doc, def, currentAccessor);
@@ -50673,7 +50673,7 @@ function generateChecks(doc, ctx, schema, accessor) {
50673
50673
  break;
50674
50674
  case "overwrite": {
50675
50675
  const newAccessor = newVar(ctx);
50676
- generateOverwriteCheck(doc, ctx, check3, currentAccessor, newAccessor);
50676
+ generateOverwriteCheck(doc, ctx, check4, currentAccessor, newAccessor);
50677
50677
  currentAccessor = newAccessor;
50678
50678
  break;
50679
50679
  }
@@ -50796,8 +50796,8 @@ function generatePropertyCheck(doc, ctx, def, accessor) {
50796
50796
  const propAccessor = `${accessor}[${JSON.stringify(def.property)}]`;
50797
50797
  generateCheck(doc, ctx, def.schema, propAccessor);
50798
50798
  }
50799
- function generateOverwriteCheck(doc, ctx, check3, currentAccessor, newAccessor) {
50800
- const tx = check3._zod.def.tx;
50799
+ function generateOverwriteCheck(doc, ctx, check4, currentAccessor, newAccessor) {
50800
+ const tx = check4._zod.def.tx;
50801
50801
  if (!tx) {
50802
50802
  throw new ZodCompileUnsupportedError("overwrite check without a transform function");
50803
50803
  }
@@ -50813,8 +50813,8 @@ function throwAsync() {
50813
50813
  function pushIssue(issue2) {
50814
50814
  this.issues.push(issue2);
50815
50815
  }
50816
- function generateCustomRefineCheck(doc, ctx, check3, accessor) {
50817
- const def = check3._zod.def;
50816
+ function generateCustomRefineCheck(doc, ctx, check4, accessor) {
50817
+ const def = check4._zod.def;
50818
50818
  if (def.fn) {
50819
50819
  if (isAsyncFunction(def.fn)) {
50820
50820
  throw new ZodCompileAsyncError("z.compile: async .refine() predicates are not supported");
@@ -50827,11 +50827,11 @@ function generateCustomRefineCheck(doc, ctx, check3, accessor) {
50827
50827
  doc.write(`if (!${resVar}) return INVALID;`);
50828
50828
  return accessor;
50829
50829
  }
50830
- if (check3._zod.check) {
50831
- if (isAsyncFunction(check3._zod.check)) {
50830
+ if (check4._zod.check) {
50831
+ if (isAsyncFunction(check4._zod.check)) {
50832
50832
  throw new ZodCompileAsyncError("z.compile: async .superRefine() / check functions are not supported");
50833
50833
  }
50834
- const checkFn = check3._zod.check;
50834
+ const checkFn = check4._zod.check;
50835
50835
  const helperFn = (value) => {
50836
50836
  const fakePayload = { value, issues: [], addIssue: pushIssue };
50837
50837
  const result2 = checkFn(fakePayload);
@@ -54746,8 +54746,8 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
54746
54746
  reg.add(this, meta3);
54747
54747
  return this;
54748
54748
  },
54749
- refine(check3, params) {
54750
- return this.check(refine(check3, params));
54749
+ refine(check4, params) {
54750
+ return this.check(refine(check4, params));
54751
54751
  },
54752
54752
  superRefine(refinement, params) {
54753
54753
  return this.check(superRefine(refinement, params));
@@ -61817,15 +61817,15 @@ function clustersIn({
61817
61817
  const out = [];
61818
61818
  let current3 = null;
61819
61819
  for (let index = segment.start; index <= segment.end; index += 1) {
61820
- const count12 = flagged[index] ?? 0;
61821
- if (count12 === 0) continue;
61820
+ const count13 = flagged[index] ?? 0;
61821
+ if (count13 === 0) continue;
61822
61822
  if (current3 && index - current3.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
61823
61823
  current3.end = index;
61824
- current3.values += count12;
61824
+ current3.values += count13;
61825
61825
  continue;
61826
61826
  }
61827
61827
  if (current3) out.push(current3);
61828
- current3 = { start: index, end: index, values: count12 };
61828
+ current3 = { start: index, end: index, values: count13 };
61829
61829
  }
61830
61830
  if (current3) out.push(current3);
61831
61831
  return out;
@@ -61865,7 +61865,7 @@ function redactedBlocksAt({
61865
61865
  }
61866
61866
  const blocks = redactedBlocks({ lines: lines2, flagged });
61867
61867
  const inside = (line) => blocks.some((block2) => line >= block2.start && line <= block2.end);
61868
- const values = flagged.reduce((sum, count12, line) => inside(line) ? sum + count12 : sum, 0);
61868
+ const values = flagged.reduce((sum, count13, line) => inside(line) ? sum + count13 : sum, 0);
61869
61869
  return { values, insideAt: (offset) => inside(lineAt(offset)) };
61870
61870
  }
61871
61871
 
@@ -61978,6 +61978,50 @@ var vaultKeyFetchesSchemaDefinition = external_exports.object({
61978
61978
  )
61979
61979
  });
61980
61980
  var vaultKeyFetchesSchema = vaultKeyFetchesSchemaDefinition;
61981
+ var VAULT_CONTENT_BREAKER_MAX_DAYS = 14;
61982
+ var breakerCeilings = external_exports.object({
61983
+ workspacePerMinute: count,
61984
+ workspacePerHour: count,
61985
+ totalPerMinute: count,
61986
+ totalPerHour: count
61987
+ });
61988
+ var peak = count.nullable();
61989
+ var vaultContentBreakerSchemaDefinition = external_exports.object({
61990
+ /** Whether the breaker may lock: asked for, armed, and the clean days it still needs. */
61991
+ arming: external_exports.object({
61992
+ requested: external_exports.boolean(),
61993
+ armed: external_exports.boolean(),
61994
+ cleanDays: count,
61995
+ needCleanDays: count,
61996
+ recordSince: external_exports.union([day, external_exports.literal("")]),
61997
+ lastWouldLock: external_exports.union([external_exports.string().regex(RFC3339, "an RFC 3339 time"), external_exports.literal("")]),
61998
+ /** Why it is not armed: dry run set, or too few clean days; empty when armed. */
61999
+ blockedBy: external_exports.string().default("")
62000
+ }),
62001
+ ceilings: breakerCeilings,
62002
+ /** The mirror upkeep budget (`sweep` opens); it alerts and never locks. */
62003
+ upkeepCeilings: breakerCeilings,
62004
+ /** Newest day first, then most counted; a scope is a workspace id or `total`. */
62005
+ rows: external_exports.array(
62006
+ external_exports.object({
62007
+ day,
62008
+ basis: external_exports.enum(["peaks", "daily"]),
62009
+ workspaceId: workspaceIdText,
62010
+ counted: count,
62011
+ upkeep: count,
62012
+ event: count,
62013
+ peakMinute: peak,
62014
+ peakHour: peak,
62015
+ upkeepPeakMinute: peak,
62016
+ wouldLock: count,
62017
+ verdict: external_exports.enum(["clear", "would_lock", "unknown"]),
62018
+ /** A code path label such as `trpc chat.history person`, never an id or content. */
62019
+ topCaller: external_exports.string().max(200).nullable(),
62020
+ topCallerItems: peak
62021
+ })
62022
+ )
62023
+ });
62024
+ var vaultContentBreakerSchema = vaultContentBreakerSchemaDefinition;
61981
62025
  var vaultWatchThresholdsSchemaDefinition = external_exports.object({
61982
62026
  per10m: count,
61983
62027
  perHour: count,
@@ -62376,6 +62420,56 @@ var vaultOpsAskSchemaDefinition = external_exports.object({
62376
62420
  var vaultOpsAskSchema = vaultOpsAskSchemaDefinition;
62377
62421
  var vaultOpsAsksSchemaDefinition = external_exports.object({ rows: external_exports.array(vaultOpsAskSchema), total: count3 });
62378
62422
 
62423
+ // ../../modules/vault/contract/src/vault-ops-connections.ts
62424
+ var count4 = external_exports.number().int().nonnegative();
62425
+ var idText3 = external_exports.string().max(128);
62426
+ var codeText2 = external_exports.string().regex(/^[a-z][a-z0-9_.]{0,39}$/);
62427
+ var vaultOpsConnectionSchemaDefinition = external_exports.object({
62428
+ connectionId: idText3,
62429
+ kind: vaultConnectionKindSchema,
62430
+ /** An OAuth or MCP connection's provider (`gmail`); null for none, `other` for free text. */
62431
+ provider: codeText2.nullable(),
62432
+ holderKind: external_exports.enum(["personal", "workspace", "agent", "pool"]),
62433
+ /** The person, agent or pool that owns the keychain; null for the workspace's. */
62434
+ holderId: idText3.nullable(),
62435
+ sensitivity: vaultSensitivitySchema,
62436
+ everyUseAsks: external_exports.boolean(),
62437
+ deviceApproval: external_exports.boolean(),
62438
+ waitingApproval: external_exports.boolean(),
62439
+ serverOpens: external_exports.boolean(),
62440
+ sealing: external_exports.enum(["envelope_v1", "sealed_v2"]),
62441
+ /** The devices a `sealed_v2` bundle is sealed to; 0 on `envelope_v1`. */
62442
+ recipients: count4,
62443
+ status: codeText2,
62444
+ /** When the stored access token runs out; null for none. */
62445
+ grantExpiresAt: external_exports.iso.datetime().nullable(),
62446
+ createdAt: external_exports.iso.datetime(),
62447
+ updatedAt: external_exports.iso.datetime()
62448
+ });
62449
+ var vaultOpsConnectionSchema = vaultOpsConnectionSchemaDefinition;
62450
+ var vaultOpsConnectionEventSchemaDefinition = external_exports.object({
62451
+ seq: count4,
62452
+ connectionId: idText3,
62453
+ action: codeText2,
62454
+ outcome: codeText2,
62455
+ actorKind: external_exports.enum(["user", "agent", "system"]),
62456
+ decider: codeText2.nullable(),
62457
+ agentId: idText3.nullable(),
62458
+ requestId: idText3.nullable(),
62459
+ /** The entry's stored code (`vault_oauth_refresh_failed`); null when it holds none. */
62460
+ code: codeText2.nullable(),
62461
+ /** The provider's error code on a refused refresh (`invalid_grant`); null when not kept. */
62462
+ providerCode: codeText2.nullable(),
62463
+ /** More of the entry is in its sealed text, which this read never opens. */
62464
+ moreInSeal: external_exports.boolean(),
62465
+ at: external_exports.iso.datetime()
62466
+ });
62467
+ var vaultOpsConnectionEventSchema = vaultOpsConnectionEventSchemaDefinition;
62468
+ var vaultOpsConnectionsSchemaDefinition = external_exports.object({
62469
+ connections: external_exports.array(vaultOpsConnectionSchema),
62470
+ events: external_exports.array(vaultOpsConnectionEventSchema)
62471
+ });
62472
+
62379
62473
  // ../../modules/chat/contract/src/chat.close.ts
62380
62474
  var conversationOpenDaysSchemaDefinition = external_exports.union([external_exports.literal(7), external_exports.literal(14), external_exports.literal(30), external_exports.literal(90)]).nullable();
62381
62475
  var conversationOpenDaysSchema = conversationOpenDaysSchemaDefinition;
@@ -63024,8 +63118,12 @@ var mirrorDeliveryStateSchema = external_exports.enum([
63024
63118
  "waking",
63025
63119
  "failed",
63026
63120
  "edit_kept",
63027
- "reaction_kept"
63121
+ "reaction_kept",
63122
+ "checking",
63123
+ "found",
63124
+ "sent_now"
63028
63125
  ]);
63126
+ var mirrorDeliveryCheckedSchema = external_exports.enum(["found", "sent_now"]);
63029
63127
  var MIRROR_DELIVERY_REASONS = [
63030
63128
  "offline",
63031
63129
  "not_linked",
@@ -63526,6 +63624,10 @@ var messageSchemaDefinition = external_exports.object({
63526
63624
  mirrorDeliveryWaking: external_exports.boolean().optional(),
63527
63625
  /** Beside a failed delivery: why it was not sent; an unknown reason reads as none. */
63528
63626
  mirrorDeliveryReason: mirrorDeliveryReasonSchema.optional().catch(void 0),
63627
+ /** Set beside a waiting delivery while the computer looks in the chat for an unsure send. */
63628
+ mirrorDeliveryChecking: external_exports.boolean().optional(),
63629
+ /** On a sent message after that check: it was already in the chat, or it went now. */
63630
+ mirrorDeliveryChecked: mirrorDeliveryCheckedSchema.optional().catch(void 0),
63529
63631
  /** A thread reply also sent to its conversation: it shows in the thread and the channel. */
63530
63632
  alsoInChannel: external_exports.boolean().optional(),
63531
63633
  /** A Laze DM message also posted to its paired Slack DM, the id of that conversation. */
@@ -66077,10 +66179,10 @@ var observeSenderInputSchemaDefinition = external_exports.object({
66077
66179
  });
66078
66180
 
66079
66181
  // ../../modules/chat/contract/src/chat.read-ops.ts
66080
- var count4 = external_exports.number().int().nonnegative();
66182
+ var count5 = external_exports.number().int().nonnegative();
66081
66183
  var at = external_exports.iso.datetime();
66082
66184
  var unreadMessageDefinition = external_exports.object({
66083
- seq: count4,
66185
+ seq: count5,
66084
66186
  createdAt: at,
66085
66187
  /** self is the reader; the others are the author's kind. */
66086
66188
  author: external_exports.enum(["self", "person", "agent", "external"]),
@@ -66099,12 +66201,12 @@ var readConversationDefinition = external_exports.object({
66099
66201
  direct: external_exports.boolean(),
66100
66202
  /** The other side of a Laze DM paired with a Slack DM, or null. */
66101
66203
  pairedWith: external_exports.string().nullable(),
66102
- lastSeq: count4,
66103
- lastReadSeq: count4,
66104
- unreadHeldToSeq: count4.nullable(),
66105
- hiddenAtSeq: count4.nullable(),
66106
- unread: count4,
66107
- mentions: count4,
66204
+ lastSeq: count5,
66205
+ lastReadSeq: count5,
66206
+ unreadHeldToSeq: count5.nullable(),
66207
+ hiddenAtSeq: count5.nullable(),
66208
+ unread: count5,
66209
+ mentions: count5,
66108
66210
  lastMessageAt: at.nullable(),
66109
66211
  /** When the newest message at or before the marker was written. */
66110
66212
  markerAt: at.nullable(),
@@ -66114,41 +66216,41 @@ var readConversationDefinition = external_exports.object({
66114
66216
  var chatReadFactsDefinition = external_exports.object({
66115
66217
  conversations: external_exports.array(readConversationDefinition).max(40),
66116
66218
  /** Conversations that qualified before the cap. */
66117
- total: count4
66219
+ total: count5
66118
66220
  });
66119
66221
  var chatReadFactsSchema = chatReadFactsDefinition;
66120
66222
 
66121
66223
  // ../../modules/chat/contract/src/chat.link-domain-ops.ts
66122
- var count5 = external_exports.number().int().nonnegative();
66224
+ var count6 = external_exports.number().int().nonnegative();
66123
66225
  var linkDomainDefinition = external_exports.object({
66124
66226
  /** The link's host, lowercased, without `www.`. */
66125
66227
  domain: external_exports.string(),
66126
66228
  /** Previews on messages, one per message and preview. */
66127
- links: count5,
66229
+ links: count6,
66128
66230
  /** Messages with at least one preview of this host. */
66129
- messageCount: count5,
66231
+ messageCount: count6,
66130
66232
  /** Previews of this host a message author took off. */
66131
- removed: count5,
66233
+ removed: count6,
66132
66234
  /** Distinct previews (addresses) of this host. */
66133
- pages: count5,
66235
+ pages: count6,
66134
66236
  /** Pages whose preview carries a picture, and a page name. */
66135
- pictured: count5,
66136
- named: count5,
66237
+ pictured: count6,
66238
+ named: count6,
66137
66239
  /** Pages whose fetch failed or was blocked. */
66138
- failed: count5,
66240
+ failed: count6,
66139
66241
  /** The commonest path shapes, at most 5, each with its page count. */
66140
- shapes: external_exports.array(external_exports.object({ shape: external_exports.string(), pages: count5 })).max(5)
66242
+ shapes: external_exports.array(external_exports.object({ shape: external_exports.string(), pages: count6 })).max(5)
66141
66243
  });
66142
66244
  var linkDomainFactsDefinition = external_exports.object({
66143
66245
  domains: external_exports.array(linkDomainDefinition),
66144
66246
  /** Messages with previews read on this page, and how many previews they carry. */
66145
- scannedMessageCount: count5,
66146
- scannedLinks: count5,
66247
+ scannedMessageCount: count6,
66248
+ scannedLinks: count6,
66147
66249
  /** Messages carrying exactly 1, 2, and 3 or more previews on this page. */
66148
- messageCountByLinks: external_exports.array(count5).length(3),
66250
+ messageCountByLinks: external_exports.array(count6).length(3),
66149
66251
  /** Over the whole workspace: live messages with a link, and those with a preview. */
66150
- linkedMessageCount: count5,
66151
- previewedMessageCount: count5,
66252
+ linkedMessageCount: count6,
66253
+ previewedMessageCount: count6,
66152
66254
  /** The last message id read; pass it back as `cursor` to read on, null at the end. */
66153
66255
  nextCursor: external_exports.string().nullable()
66154
66256
  });
@@ -66694,6 +66796,20 @@ var ACTIVATION_WINDOW_MS = ACTIVATION_DAYS * 24 * 60 * 60 * 1e3;
66694
66796
  // ../../modules/workspace/contract/src/workspace-links.ts
66695
66797
  var lazeUrlSchema = external_exports.string().min(1).describe("The resource's web address in Laze");
66696
66798
 
66799
+ // ../../modules/workspace/contract/src/workspace-audience.ts
66800
+ var audienceKindSchema = external_exports.enum(["qa", "staff", "external"]);
66801
+ var audienceMemberSchemaDefinition = external_exports.object({
66802
+ userId: external_exports.string().min(1),
66803
+ role: workspaceRoleSchema,
66804
+ kind: audienceKindSchema
66805
+ });
66806
+ var workspaceAudienceSchemaDefinition = external_exports.object({
66807
+ workspaceId: external_exports.string().min(1),
66808
+ /** Its creator's kind while they are a member, else its first Owner's. */
66809
+ kind: audienceKindSchema,
66810
+ members: external_exports.array(audienceMemberSchemaDefinition)
66811
+ });
66812
+
66697
66813
  // ../../modules/agent/contract/src/agent-access.ts
66698
66814
  var idSchema6 = external_exports.string().min(1).max(80);
66699
66815
  var agentGranteeSchemaDefinition = external_exports.discriminatedUnion("kind", [
@@ -70052,6 +70168,39 @@ var liveStepsSchemaDefinition = external_exports.object({
70052
70168
  });
70053
70169
  var liveStepsSchema = liveStepsSchemaDefinition;
70054
70170
 
70171
+ // ../../modules/agent/contract/src/agent-login-choice.ts
70172
+ var agentLoginChoicesInputSchemaDefinition = external_exports.object({
70173
+ workspaceId: external_exports.string().min(1),
70174
+ agentId: external_exports.string().min(1)
70175
+ });
70176
+ var agentLoginChoicesInputSchema = agentLoginChoicesInputSchemaDefinition;
70177
+ var agentLoginChoiceSchemaDefinition = external_exports.object({
70178
+ id: external_exports.string().min(1),
70179
+ name: external_exports.string(),
70180
+ /** `room`: it can run now; `limited`: out of usage until `until`; `signed_out`: refused. */
70181
+ status: external_exports.enum(["room", "limited", "signed_out"]),
70182
+ until: external_exports.iso.datetime().nullable(),
70183
+ usedPercent: external_exports.number().nullable(),
70184
+ /** The login the agent runs on now. */
70185
+ current: external_exports.boolean(),
70186
+ /** Signed in on the owner's Laze computer rather than kept in the keychain. */
70187
+ onComputer: external_exports.boolean()
70188
+ });
70189
+ var agentLoginChoicesSchemaDefinition = external_exports.object({
70190
+ harness: external_exports.enum(["claude-code", "codex"]).nullable(),
70191
+ poolName: external_exports.string().nullable(),
70192
+ logins: external_exports.array(agentLoginChoiceSchemaDefinition)
70193
+ });
70194
+ var agentLoginChoicesSchema = agentLoginChoicesSchemaDefinition;
70195
+ var switchAgentLoginInputSchemaDefinition = external_exports.object({
70196
+ workspaceId: external_exports.string().min(1),
70197
+ agentId: external_exports.string().min(1),
70198
+ loginId: external_exports.string().min(1).max(200)
70199
+ });
70200
+ var switchAgentLoginInputSchema = switchAgentLoginInputSchemaDefinition;
70201
+ var switchedAgentLoginSchemaDefinition = external_exports.object({ loginName: external_exports.string() });
70202
+ var switchedAgentLoginSchema = switchedAgentLoginSchemaDefinition;
70203
+
70055
70204
  // ../../modules/agent/contract/src/agent-login-trouble.ts
70056
70205
  var loginCardActionInputSchemaDefinition = external_exports.object({
70057
70206
  workspaceId: external_exports.string().min(1),
@@ -71539,7 +71688,7 @@ var agentsCopy = {
71539
71688
  };
71540
71689
  var agentCoreTrpc = defineTrpcContract("agents").query("list", { mirrored: agentsCopy }).withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentListEntrySchema)).mutation("create").withInput(createAgentInputSchema).withOutput(agentSchema).mutation("update").withInput(updateAgentInputSchema).withOutput(agentSchema).mutation("remove").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("transfer").withInput(transferAgentInputSchema).withOutput(agentSchema).mutation("resetSession").withInput(resetAgentSessionInputSchema).withOutput(agentSchema).query("faces").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentFaceSchema)).query("presence").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentPresenceSchema)).mutation("uploadAvatar").withInput(uploadAgentAvatarInputSchema).withOutput(uploadedAgentAvatarSchema).query("access").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(agentAccessSchema).query("loginActivity").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(loginActivitySchema).mutation("raiseBudget").withInput(raiseBudgetInputSchema).withOutput(raisedBudgetSchema).query("permissionPrompts").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.array(agentPermissionPromptSchema)).mutation("share").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).mutation("unshare").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).query("harnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(harnessLoginsSchema).mutation("saveHarnessLogin").withInput(saveHarnessLoginInputSchema).withOutput(harnessLoginsSchema).mutation("removeHarnessLogin").withInput(removeHarnessLoginInputSchema).withOutput(harnessLoginsSchema).query("listHarnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(harnessLoginListSchema).mutation("addHarnessLogin").withInput(addHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("renameHarnessLogin").withInput(renameHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("deleteHarnessLogin").withInput(deleteHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("checkLoginUsage").withInput(checkLoginUsageInputSchema).withOutput(loginUsageCheckSchema).query("loginPools").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(loginPoolsSchema).mutation("createLoginPool").withInput(createLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("renameLoginPool").withInput(renameLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("deleteLoginPool").withInput(loginPoolRefInputSchema).withOutput(loginPoolsSchema).mutation("addPoolLogin").withInput(addPoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("removePoolLogin").withInput(removePoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("setPoolMember").withInput(setPoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("removePoolMember").withInput(removePoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("setAgentPool").withInput(setAgentPoolInputSchema).withOutput(agentSchema).mutation("openDirect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.object({ channelId: idSchema19 })).mutation("startConversation").withInput(startConversationInputSchema).withOutput(startedConversationSchema).query("conversations").withInput(listConversationsInputSchema).withOutput(external_exports.array(conversationSummarySchema2)).mutation("joinConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("renameConversation").withInput(renameConversationInputSchema).withOutput(conversationSummarySchema2).mutation("leaveConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("deleteConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("mintLink").withInput(mintLinkInputSchema).withOutput(mintedLinkSchema).query("linkRedemption").withInput(linkRedemptionInputSchema).withOutput(linkRedemptionSchema).query("oauthRequest").withInput(oauthRequestInputSchema).withOutput(oauthRequestViewSchema).mutation("oauthApprove").withInput(approveOAuthInputSchema).withOutput(oauthRedirectSchema).mutation("oauthDeny").withInput(oauthRequestInputSchema).withOutput(oauthRedirectSchema).mutation("disconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("setGithub").withInput(setAgentGithubInputSchema).withOutput(agentSchema).query("githubWatches").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.array(agentGithubWatchSchema)).mutation("watchGithub").withInput(watchGithubInputSchema).withOutput(agentGithubWatchSchema).mutation("unwatchGithub").withInput(unwatchGithubInputSchema).withOutput(external_exports.object({ removed: external_exports.literal(true) })).build();
71541
71690
  var agentTurnTrpc = defineTrpcContract("agents").mutation("answerAttention").withInput(answerAttentionInputSchema).withOutput(external_exports.object({ answered: external_exports.literal(true) })).query("attentionDetail").withInput(attentionDetailInputSchema).withOutput(attentionDetailSchema).mutation("stopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ stopped: external_exports.literal(true) })).query("mayStopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ allowed: external_exports.boolean() })).mutation("retryTurn").withInput(retryAgentTurnInputSchema).withOutput(external_exports.object({ retried: external_exports.literal(true) })).query("retryState").withInput(retryAgentTurnInputSchema).withOutput(agentRetryStateSchema).query("liveSteps").withInput(liveStepsInputSchema).withOutput(liveStepsSchema).query("workingNow").withInput(agentWorkingInputSchema).withOutput(agentWorkingSchema).mutation("compactSession").withInput(compactAgentSessionInputSchema).withOutput(external_exports.object({ requested: external_exports.literal(true) })).mutation("catchUp").withInput(startCatchUpInputSchema).withOutput(catchUpRunSchema).mutation("catchUpAsk").withInput(askCatchUpInputSchema).withOutput(catchUpRunSchema).query("catchUpRun").withInput(catchUpRunInputSchema).withOutput(catchUpRunSchema).mutation("catchUpStop").withInput(catchUpRunInputSchema).withOutput(catchUpRunSchema).mutation("restartComputer").withInput(restartAgentComputerInputSchema).withOutput(external_exports.object({ restarted: external_exports.boolean() })).build();
71542
- var agentChannelSettingsTrpc = defineTrpcContract("agents").query("monitors").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.array(agentMonitorSchema)).query("channelLevel").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19, channelId: idSchema19 })).withOutput(channelLevelSchema).mutation("setChannelLevel").withInput(setChannelLevelInputSchema).withOutput(channelLevelSchema).mutation("unmuteChannel").withInput(unmuteAgentChannelInputSchema).withOutput(channelLevelSchema).mutation("cancelHeld").withInput(cancelHeldInputSchema).withOutput(cancelHeldResultSchema).mutation("useLazeModelsUntilReset").withInput(useLazeModelsUntilResetInputSchema).withOutput(lazeModelsUntilResetSchema).build();
71691
+ var agentChannelSettingsTrpc = defineTrpcContract("agents").query("monitors").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.array(agentMonitorSchema)).query("channelLevel").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19, channelId: idSchema19 })).withOutput(channelLevelSchema).mutation("setChannelLevel").withInput(setChannelLevelInputSchema).withOutput(channelLevelSchema).mutation("unmuteChannel").withInput(unmuteAgentChannelInputSchema).withOutput(channelLevelSchema).mutation("cancelHeld").withInput(cancelHeldInputSchema).withOutput(cancelHeldResultSchema).mutation("useLazeModelsUntilReset").withInput(useLazeModelsUntilResetInputSchema).withOutput(lazeModelsUntilResetSchema).query("agentLoginChoices").withInput(agentLoginChoicesInputSchema).withOutput(agentLoginChoicesSchema).mutation("switchAgentLogin").withInput(switchAgentLoginInputSchema).withOutput(switchedAgentLoginSchema).build();
71543
71692
  var agentJoinTrpc = defineTrpcContract("agents").query("joinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("approveJoinRequest").withInput(approveJoinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("denyJoinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).build();
71544
71693
  var agentLoginTroubleTrpc = defineTrpcContract("agents").mutation("replaceHarnessLogin").withInput(replaceHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("startHarnessSignIn").withInput(startHarnessSignInInputSchema).withOutput(harnessSignInSchema).mutation("pollHarnessSignIn").withInput(pollHarnessSignInInputSchema).withOutput(harnessSignInPollSchema).mutation("waitForLogins").withInput(loginCardActionInputSchema).withOutput(external_exports.object({ waiting: external_exports.boolean() })).mutation("useAnotherLogin").withInput(loginCardActionInputSchema).withOutput(external_exports.object({ loginName: external_exports.string() })).build();
71545
71694
  var agentWorkspaceDefaultTrpc = defineTrpcContract("agents").query("workspaceDefault").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(workspaceDefaultAgentSchema).mutation("setWorkspaceDefault").withInput(setWorkspaceDefaultAgentInputSchema).withOutput(workspaceDefaultAgentSchema).build();
@@ -73610,10 +73759,10 @@ function whereOf(message2) {
73610
73759
  }
73611
73760
  function catchUpLinesOf(message2) {
73612
73761
  if (!message2.catchUp) return [];
73613
- const { count: count12, older } = message2.catchUp;
73762
+ const { count: count13, older } = message2.catchUp;
73614
73763
  const where = whereOf(message2);
73615
73764
  const lines2 = [
73616
- `${count12} ${count12 === 1 ? "message" : "messages"} in ${where} while you were away.`
73765
+ `${count13} ${count13 === 1 ? "message" : "messages"} in ${where} while you were away.`
73617
73766
  ];
73618
73767
  if (older === 0) return lines2;
73619
73768
  const channel = message2.channelKind === "public" || message2.channelKind === "private";
@@ -73641,9 +73790,9 @@ function hookContextOf({
73641
73790
  messages,
73642
73791
  self: self2
73643
73792
  }) {
73644
- const count12 = messages.length === 1 ? "A message" : `${messages.length} messages`;
73793
+ const count13 = messages.length === 1 ? "A message" : `${messages.length} messages`;
73645
73794
  return [
73646
- `${count12} reached you in Laze${selfClauseOf({ self: self2 })}:`,
73795
+ `${count13} reached you in Laze${selfClauseOf({ self: self2 })}:`,
73647
73796
  "",
73648
73797
  ...messages.map((message2) => formatInboxMessage({ message: message2 })),
73649
73798
  "",
@@ -73658,7 +73807,7 @@ function selfClauseOf({ self: self2 }) {
73658
73807
  function record2(value) {
73659
73808
  return typeof value === "object" && value !== null ? value : {};
73660
73809
  }
73661
- function count6(value) {
73810
+ function count7(value) {
73662
73811
  return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
73663
73812
  }
73664
73813
  function parse3(line) {
@@ -73679,17 +73828,17 @@ function compactionOf({
73679
73828
  return {
73680
73829
  key: typeof entry2.uuid === "string" ? entry2.uuid : String(index),
73681
73830
  trigger: meta3.trigger === "manual" ? "manual" : "auto",
73682
- tokensBefore: count6(meta3.preTokens),
73683
- tokensAfter: count6(meta3.postTokens),
73831
+ tokensBefore: count7(meta3.preTokens),
73832
+ tokensAfter: count7(meta3.postTokens),
73684
73833
  at: typeof entry2.timestamp === "string" ? entry2.timestamp : "1970-01-01T00:00:00.000Z"
73685
73834
  };
73686
73835
  }
73687
73836
  function usageOf({ entry: entry2 }) {
73688
73837
  const message2 = record2(entry2.message);
73689
73838
  const usage = record2(message2.usage);
73690
- const input2 = count6(usage.input_tokens);
73839
+ const input2 = count7(usage.input_tokens);
73691
73840
  if (input2 === void 0) return void 0;
73692
- const cached2 = (count6(usage.cache_read_input_tokens) ?? 0) + (count6(usage.cache_creation_input_tokens) ?? 0);
73841
+ const cached2 = (count7(usage.cache_read_input_tokens) ?? 0) + (count7(usage.cache_creation_input_tokens) ?? 0);
73693
73842
  return {
73694
73843
  tokens: input2 + cached2,
73695
73844
  ...typeof message2.model === "string" ? { model: message2.model } : {}
@@ -74577,7 +74726,7 @@ var slackConfig = Config.define((c) => ({
74577
74726
  }));
74578
74727
 
74579
74728
  // ../../modules/slack/contract/src/slack-ops.ts
74580
- var count7 = external_exports.number().int().nonnegative();
74729
+ var count8 = external_exports.number().int().nonnegative();
74581
74730
  var at2 = external_exports.iso.datetime();
74582
74731
  var slackMirrorHealthDefinition = external_exports.object({
74583
74732
  mirrors: external_exports.array(
@@ -74590,19 +74739,19 @@ var slackMirrorHealthDefinition = external_exports.object({
74590
74739
  /** Shared with another organisation, such as a Slack Connect channel. */
74591
74740
  external: external_exports.boolean(),
74592
74741
  botMember: external_exports.boolean(),
74593
- linkedMembers: count7,
74594
- cacheDays: count7,
74742
+ linkedMembers: count8,
74743
+ cacheDays: count8,
74595
74744
  backfilledAt: at2.nullable(),
74596
74745
  reconciledAt: at2.nullable(),
74597
74746
  /** Message links Laze holds for the conversation, both ways. */
74598
- links: count7,
74747
+ links: count8,
74599
74748
  /** Thread roots Laze holds a reply of. */
74600
- threads: count7,
74749
+ threads: count8,
74601
74750
  /** Roots whose Slack reply count, when last read, is above the replies Laze holds. */
74602
- threadsShort: count7,
74603
- repliesShort: count7,
74751
+ threadsShort: count8,
74752
+ repliesShort: count8,
74604
74753
  /** Threads Laze holds whose root is older than the cache window. */
74605
- oldThreads: count7
74754
+ oldThreads: count8
74606
74755
  })
74607
74756
  )
74608
74757
  });
@@ -74613,10 +74762,10 @@ var DURATION = /^(\d+)\s*(m|min|mins|minutes?|h|hours?|d|days?)$/i;
74613
74762
  function minutesOf({ text: text3 }) {
74614
74763
  const match = DURATION.exec(text3.trim());
74615
74764
  if (!match?.[1] || !match[2]) return null;
74616
- const count12 = Number(match[1]);
74765
+ const count13 = Number(match[1]);
74617
74766
  const unit = match[2].toLowerCase()[0];
74618
74767
  const perUnit = { d: 1440, h: 60, m: 1 };
74619
- const minutes = count12 * (perUnit[unit ?? "m"] ?? 1);
74768
+ const minutes = count13 * (perUnit[unit ?? "m"] ?? 1);
74620
74769
  return minutes > 0 ? minutes : null;
74621
74770
  }
74622
74771
  function muteTextOf({ mute }) {
@@ -74777,7 +74926,7 @@ function slackHitLines({
74777
74926
  ...link2 ? [` ${link2}`] : []
74778
74927
  ];
74779
74928
  }
74780
- var count8 = (n) => `${n} message${n === 1 ? "" : "s"}`;
74929
+ var count9 = (n) => `${n} message${n === 1 ? "" : "s"}`;
74781
74930
  function slackSectionLines({
74782
74931
  slack: slack2,
74783
74932
  laze,
@@ -74790,7 +74939,7 @@ function slackSectionLines({
74790
74939
  });
74791
74940
  if (slack2.teams.some((team) => team.state === "searched")) {
74792
74941
  const found = slack2.hits.length;
74793
- lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${count8(found)}`);
74942
+ lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${count9(found)}`);
74794
74943
  }
74795
74944
  for (const hit of slack2.hits) lines2.push(...slackHitLines({ hit, laze, url: url2, workspaceId }), "");
74796
74945
  return lines2;
@@ -74801,7 +74950,7 @@ function formatSearch({
74801
74950
  workspaceId
74802
74951
  }) {
74803
74952
  const { laze, slack: slack2, query } = output2;
74804
- const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${count8(laze.hits.length)} for "${query}"`];
74953
+ const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${count9(laze.hits.length)} for "${query}"`];
74805
74954
  for (const hit of laze.hits) {
74806
74955
  lines2.push(...lazeHitLines({ hit, laze, url: url2, workspaceId }), "");
74807
74956
  }
@@ -80064,12 +80213,12 @@ function formatOnePool({ pool, nowMs: nowMs2 }) {
80064
80213
  return `${formatPool({ pool, nowMs: nowMs2 })}
80065
80214
  `;
80066
80215
  }
80067
- function formatUsageCheck({ check: check3 }) {
80068
- const checked = `Checked ${check3.checked} ${check3.checked === 1 ? "login" : "logins"}`;
80069
- if (check3.skipped === 0) return `${checked}.
80216
+ function formatUsageCheck({ check: check4 }) {
80217
+ const checked = `Checked ${check4.checked} ${check4.checked === 1 ? "login" : "logins"}`;
80218
+ if (check4.skipped === 0) return `${checked}.
80070
80219
  `;
80071
80220
  const minutes = Math.round(LOGIN_USAGE_CHECK_SECONDS / 60);
80072
- return `${checked}, ${check3.skipped} skipped (checked in the last ${minutes} minutes).
80221
+ return `${checked}, ${check4.skipped} skipped (checked in the last ${minutes} minutes).
80073
80222
  `;
80074
80223
  }
80075
80224
  function formatPools({ pools, nowMs: nowMs2 }) {
@@ -80541,7 +80690,7 @@ var LOGIN_ACTIONS = {
80541
80690
  words: 0,
80542
80691
  run: async (step) => {
80543
80692
  const wanted = flagText({ args: step.args, name: "pool" }).trim();
80544
- const check3 = await step.client.post(
80693
+ const check4 = await step.client.post(
80545
80694
  PATHS.checkLogins,
80546
80695
  wanted ? { poolId: wanted } : {}
80547
80696
  );
@@ -80550,17 +80699,17 @@ var LOGIN_ACTIONS = {
80550
80699
  const pools = await step.client.get(PATHS.pools);
80551
80700
  const pool = poolNamed({ pools: pools.pools, wanted });
80552
80701
  if (step.args.flags.json) {
80553
- return step.context.out(`${JSON.stringify({ ...check3, pool }, null, 2)}
80702
+ return step.context.out(`${JSON.stringify({ ...check4, pool }, null, 2)}
80554
80703
  `);
80555
80704
  }
80556
- return step.context.out(`${formatUsageCheck({ check: check3 })}${formatOnePool({ pool, nowMs: nowMs2 })}`);
80705
+ return step.context.out(`${formatUsageCheck({ check: check4 })}${formatOnePool({ pool, nowMs: nowMs2 })}`);
80557
80706
  }
80558
80707
  const list13 = await step.client.get(PATHS.logins);
80559
80708
  if (step.args.flags.json) {
80560
- return step.context.out(`${JSON.stringify({ ...check3, ...list13 }, null, 2)}
80709
+ return step.context.out(`${JSON.stringify({ ...check4, ...list13 }, null, 2)}
80561
80710
  `);
80562
80711
  }
80563
- step.context.out(`${formatUsageCheck({ check: check3 })}${formatLogins({ list: list13, nowMs: nowMs2 })}`);
80712
+ step.context.out(`${formatUsageCheck({ check: check4 })}${formatLogins({ list: list13, nowMs: nowMs2 })}`);
80564
80713
  }
80565
80714
  },
80566
80715
  history: {
@@ -82679,9 +82828,9 @@ function formatAppMoney({
82679
82828
  maximumFractionDigits: tiny ? 4 : 2
82680
82829
  }).format(amount);
82681
82830
  }
82682
- var count9 = new Intl.NumberFormat("en-US");
82831
+ var count10 = new Intl.NumberFormat("en-US");
82683
82832
  function plural2({ value, one, many }) {
82684
- return `${count9.format(value)} ${value === 1 ? one : many}`;
82833
+ return `${count10.format(value)} ${value === 1 ? one : many}`;
82685
82834
  }
82686
82835
  function appCostQuantityText(line) {
82687
82836
  const { quantity } = line;
@@ -86024,7 +86173,7 @@ var appWrite = async ({ context, args }) => {
86024
86173
  });
86025
86174
  };
86026
86175
  function seedLine(seeded) {
86027
- const created = Object.entries(seeded.created).map(([name3, count12]) => `${count12} in ${name3}`);
86176
+ const created = Object.entries(seeded.created).map(([name3, count13]) => `${count13} in ${name3}`);
86028
86177
  const parts = [
86029
86178
  created.length ? `Loaded starter records: ${created.join(", ")}.` : "",
86030
86179
  seeded.skipped.length ? `Left ${seeded.skipped.join(", ")} as it was: it already holds records.` : ""
@@ -86349,8 +86498,8 @@ function cardLine({ choice }) {
86349
86498
  var appCard = async ({ context, args }) => {
86350
86499
  const client = await appClient({ context, args });
86351
86500
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
86352
- const count12 = Number(flagText({ args, name: "rows", fallback: "5" }));
86353
- if (!Number.isInteger(count12) || count12 < 1 || count12 > 10) {
86501
+ const count13 = Number(flagText({ args, name: "rows", fallback: "5" }));
86502
+ if (!Number.isInteger(count13) || count13 < 1 || count13 > 10) {
86354
86503
  throw new CliUsageError("--rows is a whole number from 1 to 10");
86355
86504
  }
86356
86505
  const text3 = (name3) => flagText({ args, name: name3 }) || null;
@@ -86363,7 +86512,7 @@ var appCard = async ({ context, args }) => {
86363
86512
  collection: text3("collection"),
86364
86513
  filter: flagText({ args, name: "where" }) || flagText({ args, name: "filter" }),
86365
86514
  sort: flagText({ args, name: "sort" }),
86366
- rows: count12,
86515
+ rows: count13,
86367
86516
  caption: text3("caption")
86368
86517
  }
86369
86518
  });
@@ -88019,9 +88168,9 @@ function presenceColumns(member) {
88019
88168
  return [member.presence, `${status11.emoji} ${status11.text}`.trim() + until, ...dndColumn(member)];
88020
88169
  }
88021
88170
  function formatMembers({ detail }) {
88022
- const count12 = `${detail.members.length} ${detail.members.length === 1 ? "member" : "members"}`;
88171
+ const count13 = `${detail.members.length} ${detail.members.length === 1 ? "member" : "members"}`;
88023
88172
  const ends = detail.endsAt ? `, ends ${utcTimeOf(detail.endsAt)}` : "";
88024
- const head = `${channelLabelOf(detail)} (${detail.id}), ${count12}${ends}`;
88173
+ const head = `${channelLabelOf(detail)} (${detail.id}), ${count13}${ends}`;
88025
88174
  const rows = detail.members.map(
88026
88175
  (member) => [ROLE[member.role], member.name, member.kind, member.id, ...presenceColumns(member)].join(" ")
88027
88176
  );
@@ -88061,13 +88210,13 @@ function formatBrowsable({
88061
88210
  }) {
88062
88211
  if (channels3.length === 0) return "No channels to browse.\n";
88063
88212
  const rows = channels3.map((channel) => {
88064
- const count12 = `${channel.memberCount} ${channel.memberCount === 1 ? "member" : "members"}`;
88213
+ const count13 = `${channel.memberCount} ${channel.memberCount === 1 ? "member" : "members"}`;
88065
88214
  const marks = [
88066
88215
  channel.joined ? "joined" : "not joined",
88067
88216
  ...channel.private ? ["private"] : [],
88068
88217
  ...channel.archived ? ["archived"] : []
88069
88218
  ].join(", ");
88070
- const text3 = `#${channel.name} ${channel.id} ${count12} ${marks} ${channel.topic}`;
88219
+ const text3 = `#${channel.name} ${channel.id} ${count13} ${marks} ${channel.topic}`;
88071
88220
  return withLink({ text: text3, url: channel.url, base });
88072
88221
  });
88073
88222
  return `${rows.join("\n")}
@@ -91705,7 +91854,7 @@ var whatsappObservedPayloadDefinition = external_exports.object({
91705
91854
  // ../../modules/compute/contract/src/whatsapp-out.ts
91706
91855
  var WHATSAPP_OUT_KINDS = ["reply", "edit", "revoke", "react", "agent"];
91707
91856
  var whatsappOutKindSchema = external_exports.enum(WHATSAPP_OUT_KINDS);
91708
- var WHATSAPP_EVIDENCE_KINDS = ["ack", "delivered", "read", "echo"];
91857
+ var WHATSAPP_EVIDENCE_KINDS = ["ack", "delivered", "read", "echo", "found"];
91709
91858
  var whatsappEvidenceKindSchema = external_exports.enum(WHATSAPP_EVIDENCE_KINDS);
91710
91859
  var id2 = external_exports.string().min(1).max(200);
91711
91860
  var at3 = external_exports.iso.datetime();
@@ -91741,7 +91890,13 @@ var whatsappSendEvidencedDefinition = external_exports.object({
91741
91890
  evidence: whatsappEvidenceKindSchema
91742
91891
  });
91743
91892
  var whatsappSendRefusedDefinition = external_exports.object({ ...sendRef, code });
91744
- var whatsappSendUnresolvedDefinition = external_exports.object({ ...sendRef, sendBy: at3 });
91893
+ var check2 = external_exports.number().int().positive().optional();
91894
+ var whatsappSendUnresolvedDefinition = external_exports.object({ ...sendRef, sendBy: at3, check: check2 });
91895
+ var whatsappSendRecheckRequestedDefinition = external_exports.object({
91896
+ ...sendRef,
91897
+ sendBy: at3,
91898
+ asked: external_exports.number().int().nonnegative()
91899
+ });
91745
91900
  var WHATSAPP_SEND_STEPS = [
91746
91901
  "none",
91747
91902
  "queued",
@@ -91759,7 +91914,9 @@ var whatsappSendProcessStateDefinition = external_exports.object({
91759
91914
  step: whatsappSendStepSchema,
91760
91915
  /** Epoch ms of the deadline; null before requested. */
91761
91916
  sendBy: external_exports.number().int().nullable(),
91762
- attempts: external_exports.number().int().nonnegative()
91917
+ attempts: external_exports.number().int().nonnegative(),
91918
+ /** How many checks the owner asked for; absent before the first. */
91919
+ checks: external_exports.number().int().nonnegative().optional()
91763
91920
  });
91764
91921
  var whatsappSendUnresolvedIntentDefinition = external_exports.object({
91765
91922
  workspaceId: external_exports.string(),
@@ -91767,7 +91924,8 @@ var whatsappSendUnresolvedIntentDefinition = external_exports.object({
91767
91924
  sendId: external_exports.string(),
91768
91925
  stream: external_exports.string(),
91769
91926
  sendBy: at3,
91770
- at: at3
91927
+ at: at3,
91928
+ check: check2
91771
91929
  });
91772
91930
 
91773
91931
  // ../../modules/compute/contract/src/whatsapp-outbox.ts
@@ -91951,11 +92109,13 @@ var sendWakeIntentDefinition = external_exports.object({
91951
92109
  machineId: id4,
91952
92110
  sendId: id4,
91953
92111
  /** The send's deadline, epoch ms: the computer is wanted awake until it settles or then. */
91954
- until: ms
92112
+ until: ms,
92113
+ /** The owner's check of an unsure send it is for, counted from 1; none for its first go. */
92114
+ check: external_exports.number().int().positive().optional()
91955
92115
  });
91956
92116
 
91957
92117
  // ../../modules/compute/contract/src/whatsapp-ops.ts
91958
- var count10 = external_exports.number().int().nonnegative();
92118
+ var count11 = external_exports.number().int().nonnegative();
91959
92119
  var at4 = external_exports.iso.datetime();
91960
92120
  var whatsappMirrorHealthDefinition = external_exports.object({
91961
92121
  mirrors: external_exports.array(
@@ -91973,18 +92133,18 @@ var whatsappMirrorHealthDefinition = external_exports.object({
91973
92133
  nextVisitAt: at4.nullable(),
91974
92134
  touchedAt: at4.nullable(),
91975
92135
  createdAt: at4,
91976
- skipped: external_exports.object({ count: count10, from: external_exports.number().int().nullable(), at: at4.nullable() }),
92136
+ skipped: external_exports.object({ count: count11, from: external_exports.number().int().nullable(), at: at4.nullable() }),
91977
92137
  /** The last pull that met files; null when none did. */
91978
92138
  files: external_exports.object({
91979
92139
  at: at4,
91980
- attached: count10,
91981
- unavailable: count10,
91982
- retrying: count10,
91983
- dropped: count10,
92140
+ attached: count11,
92141
+ unavailable: count11,
92142
+ retrying: count11,
92143
+ dropped: count11,
91984
92144
  failureCode: external_exports.string().nullable()
91985
92145
  }).nullable(),
91986
92146
  /** Intake holds (ADR-216 §11) by kind and code, with when the oldest was made. */
91987
- holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count: count10, oldestAt: at4 }))
92147
+ holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count: count11, oldestAt: at4 }))
91988
92148
  })
91989
92149
  )
91990
92150
  });
@@ -92013,7 +92173,7 @@ var whatsappSendsDefinition = external_exports.object({
92013
92173
  quoted: external_exports.boolean(),
92014
92174
  /** Sends to the same chat share a number, counted from 1 in this answer; never the chat. */
92015
92175
  chatIndex: external_exports.number().int().min(1),
92016
- files: count10,
92176
+ files: count11,
92017
92177
  /**
92018
92178
  * Why a failed send did not go: its stored code, or for older sends the code its outcome
92019
92179
  * line reads as; "other" when none fits, null for a send that did not fail.
@@ -92041,8 +92201,8 @@ var whatsappSendStreamsDefinition = external_exports.object({
92041
92201
  failureCode: external_exports.string().nullable(),
92042
92202
  createdAt: at4,
92043
92203
  /** The stream's events, its last event's kind and time; zero and null for none. */
92044
- events: count10,
92045
- lastEvent: external_exports.enum(["requested", "taken", "evidenced", "refused", "unresolved"]).nullable(),
92204
+ events: count11,
92205
+ lastEvent: external_exports.enum(["requested", "taken", "evidenced", "refused", "unresolved", "recheck_requested"]).nullable(),
92046
92206
  lastEventAt: at4.nullable(),
92047
92207
  /** The process's step and deadline; null when no process holds the send. */
92048
92208
  step: external_exports.enum(["none", "queued", "taken", "sent", "refused", "unresolved"]).nullable(),
@@ -92052,9 +92212,9 @@ var whatsappSendStreamsDefinition = external_exports.object({
92052
92212
  })
92053
92213
  ),
92054
92214
  /** Counts over the answered sends. */
92055
- total: count10,
92056
- agree: count10,
92057
- disagree: count10
92215
+ total: count11,
92216
+ agree: count11,
92217
+ disagree: count11
92058
92218
  });
92059
92219
  var whatsappSendStreamsSchema = whatsappSendStreamsDefinition;
92060
92220
  var WHATSAPP_WAKE_STEPS = [
@@ -92094,11 +92254,11 @@ var whatsappWakeTimelineDefinition = external_exports.object({
92094
92254
  external_exports.object({
92095
92255
  step: external_exports.enum(WHATSAPP_WAKE_STEPS),
92096
92256
  at: at4,
92097
- sincePreviousMs: count10,
92098
- sinceRequestMs: count10
92257
+ sincePreviousMs: count11,
92258
+ sinceRequestMs: count11
92099
92259
  })
92100
92260
  ),
92101
- totalMs: count10.nullable()
92261
+ totalMs: count11.nullable()
92102
92262
  })
92103
92263
  )
92104
92264
  })
@@ -96197,7 +96357,9 @@ var feedApprovalSchemaDefinition = external_exports.object({
96197
96357
  /** An agent card's exact command, shown as code; null elsewhere. */
96198
96358
  call: external_exports.string().nullable().default(null),
96199
96359
  /** How the card ended, as the owning module words it: "Allowed by Ana". */
96200
- outcome: external_exports.string().nullable().default(null)
96360
+ outcome: external_exports.string().nullable().default(null),
96361
+ /** A joining agent's machine and note, so each reader's app words the card in their language. */
96362
+ origin: external_exports.object({ machine: external_exports.string(), note: external_exports.string() }).nullable().optional()
96201
96363
  });
96202
96364
  var feedApprovalSchema = feedApprovalSchemaDefinition;
96203
96365
  var feedViewerStateSchemaDefinition = external_exports.object({
@@ -96683,6 +96845,8 @@ var feedItemPostedPayloadSchemaDefinition = external_exports.object({
96683
96845
  authorId: external_exports.string(),
96684
96846
  recipientUserIds: external_exports.array(external_exports.string()),
96685
96847
  showAt: external_exports.iso.datetime().nullable(),
96848
+ /** A pending approval's timeout: the card settles as expired then, if no one answered. */
96849
+ approvalExpiresAt: external_exports.iso.datetime().nullable().optional(),
96686
96850
  at: external_exports.iso.datetime()
96687
96851
  });
96688
96852
  var feedItemChangedPayloadSchemaDefinition = external_exports.object({
@@ -96746,7 +96910,9 @@ var feedItemWokePayloadSchemaDefinition = external_exports.object({
96746
96910
  var feedWakeStateSchemaDefinition = external_exports.object({
96747
96911
  workspaceId: external_exports.string(),
96748
96912
  showAt: external_exports.number().nullable(),
96749
- snoozes: external_exports.record(external_exports.string(), external_exports.number())
96913
+ snoozes: external_exports.record(external_exports.string(), external_exports.number()),
96914
+ /** When a pending approval card times out; null once it is answered or ended. */
96915
+ approvalEndsAt: external_exports.number().nullable().default(null)
96750
96916
  });
96751
96917
  var feedWakeIntentSchemaDefinition = external_exports.object({
96752
96918
  workspaceId: external_exports.string().min(1),
@@ -96774,8 +96940,8 @@ function draftFilesMissingText(names) {
96774
96940
  }
96775
96941
 
96776
96942
  // ../../modules/feed/contract/src/feed.decisions.ts
96777
- function decisionsLineOf(count12) {
96778
- return `${count12} ${count12 === 1 ? "decision" : "decisions"} waiting on you`;
96943
+ function decisionsLineOf(count13) {
96944
+ return `${count13} ${count13 === 1 ? "decision" : "decisions"} waiting on you`;
96779
96945
  }
96780
96946
 
96781
96947
  // src/rules/feed-input.rules.ts
@@ -97185,8 +97351,9 @@ async function feedPost({ context, args }) {
97185
97351
  sayLinked({ context, item: posted });
97186
97352
  const base = profile.url;
97187
97353
  if (args.flags.json) return printItem({ context, args, item: posted, base });
97188
- context.out(`${withLink({ text: posted.item.id, url: posted.item.url, base })}
97354
+ context.out(`${posted.item.id}
97189
97355
  `);
97356
+ context.err(linkLineOf({ url: posted.item.url, base }));
97190
97357
  }
97191
97358
  async function feedUpdate({ context, args }) {
97192
97359
  const itemId = args.words[2];
@@ -97312,8 +97479,8 @@ function optionalWords(words) {
97312
97479
  }
97313
97480
  function shareLinesOf({ move: move3, answer: answer6 }) {
97314
97481
  const names = answer6.people.map((person) => person.name).join(", ") || "no one new";
97315
- const count12 = answer6.itemIds.length;
97316
- const items = `${count12} item${count12 === 1 ? "" : "s"}`;
97482
+ const count13 = answer6.itemIds.length;
97483
+ const items = `${count13} item${count13 === 1 ? "" : "s"}`;
97317
97484
  const head = move3 === "share" ? `Shared ${items} with ${names}` : `Took ${names} off ${items}`;
97318
97485
  return [head, ...answer6.itemIds].map((line) => `${line}
97319
97486
  `).join("");
@@ -97951,13 +98118,13 @@ function formatHistory(output2) {
97951
98118
  const lines2 = linesOf3(output2);
97952
98119
  if (lines2.length === 0) return `${where}${from}: no messages.
97953
98120
  `;
97954
- const count12 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
98121
+ const count13 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
97955
98122
  const blocks = lines2.map(blockOf2).join("\n\n");
97956
98123
  const cursor = olderCursorOf(output2);
97957
98124
  const older = cursor ? `
97958
98125
 
97959
98126
  Older: laze history ${output2.channel} --before ${cursor}` : "";
97960
- return `${where}${from}: ${count12}, oldest first
98127
+ return `${where}${from}: ${count13}, oldest first
97961
98128
 
97962
98129
  ${blocks}${older}
97963
98130
  `;
@@ -99199,10 +99366,10 @@ ${USAGE13}`);
99199
99366
  if ("exitCode" in released) return released;
99200
99367
  Object.assign(env, released.env);
99201
99368
  }
99202
- const count12 = Object.keys(env).length;
99203
- if (count12 > EXEC_ENV_MAX) {
99369
+ const count13 = Object.keys(env).length;
99370
+ if (count13 > EXEC_ENV_MAX) {
99204
99371
  context.err(
99205
- `laze: these connections hold ${count12} variables; at most ${EXEC_ENV_MAX} go with a command. Send fewer connections, or run the command with \`laze vault run\` where you run.
99372
+ `laze: these connections hold ${count13} variables; at most ${EXEC_ENV_MAX} go with a command. Send fewer connections, or run the command with \`laze vault run\` where you run.
99206
99373
  `
99207
99374
  );
99208
99375
  return { exitCode: 1 };
@@ -99357,7 +99524,7 @@ function secretRefusal({
99357
99524
  rules = MCP_SECRET_COMMANDS
99358
99525
  }) {
99359
99526
  const { words, flags: flags2 } = parseArgs({ argv });
99360
- const command = [3, 2, 1].map((count12) => words.slice(0, count12).join(" ")).find((name3) => Object.hasOwn(rules, name3));
99527
+ const command = [3, 2, 1].map((count13) => words.slice(0, count13).join(" ")).find((name3) => Object.hasOwn(rules, name3));
99361
99528
  const rule = command === void 0 ? void 0 : rules[command];
99362
99529
  if (!command || !rule) return void 0;
99363
99530
  const vaultFlag = rule.vaultFlag ?? "from-vault";
@@ -100108,11 +100275,11 @@ async function monitorAdd({ context, args }) {
100108
100275
  });
100109
100276
  if (args.flags.json) return context.out(`${JSON.stringify(added, null, 2)}
100110
100277
  `);
100111
- const count12 = added.watching.length;
100278
+ const count13 = added.watching.length;
100112
100279
  context.out(
100113
100280
  `${added.monitor.id} ${added.monitor.name}
100114
100281
  ${added.watching.join(" ")}
100115
- Watching ${count12} ${count12 === 1 ? "channel" : "channels"}
100282
+ Watching ${count13} ${count13 === 1 ? "channel" : "channels"}
100116
100283
  `
100117
100284
  );
100118
100285
  }
@@ -101489,12 +101656,12 @@ var funnelInputDefinition = external_exports.object({
101489
101656
  to: external_exports.iso.datetime(),
101490
101657
  bucketMinutes: external_exports.union([external_exports.literal(10), external_exports.literal(60), external_exports.literal(1440)]).default(60)
101491
101658
  }).strict();
101492
- var count11 = external_exports.number().int().nonnegative();
101659
+ var count12 = external_exports.number().int().nonnegative();
101493
101660
  var funnelCountsDefinition = external_exports.object({
101494
- signUps: count11,
101495
- workspaces: count11,
101496
- activatedTeams: count11,
101497
- payingTeams: count11
101661
+ signUps: count12,
101662
+ workspaces: count12,
101663
+ activatedTeams: count12,
101664
+ payingTeams: count12
101498
101665
  });
101499
101666
  var funnelOutputDefinition = external_exports.object({
101500
101667
  bucketMinutes: external_exports.number().int(),
@@ -101520,23 +101687,34 @@ var cohortOutputDefinition = external_exports.object({
101520
101687
  promotionId: external_exports.string().nullable(),
101521
101688
  plan: external_exports.string(),
101522
101689
  paying: external_exports.boolean(),
101523
- members: count11,
101690
+ members: count12,
101524
101691
  agents: external_exports.object({
101525
- laze: count11,
101526
- connected: count11,
101692
+ laze: count12,
101693
+ connected: count12,
101527
101694
  firstLazeAgentAt: external_exports.iso.datetime().nullable()
101528
101695
  }),
101529
- turns: count11,
101530
- appsCreated: count11,
101531
- connectionsLinked: count11,
101696
+ turns: count12,
101697
+ appsCreated: count12,
101698
+ connectionsLinked: count12,
101699
+ /** Slack channels mirrored, Slack and Discord link and intake events, WhatsApp mirrors on. */
101700
+ messaging: external_exports.object({
101701
+ slackChannels: count12,
101702
+ slackEvents: count12,
101703
+ discordEvents: count12,
101704
+ whatsappMirrors: count12
101705
+ }),
101532
101706
  creatorLastMessageAt: external_exports.iso.datetime().nullable(),
101707
+ /** The creator's last heartbeat from a Laze web or desktop window here; null when never. */
101708
+ creatorLastSeenAt: external_exports.iso.datetime().nullable(),
101709
+ /** Members whose last heartbeat here falls in the 7 days before `until`. */
101710
+ peopleSeenLast7Days: count12,
101533
101711
  /** Live messages per UTC day; days with none are left out. */
101534
101712
  days: external_exports.array(
101535
101713
  external_exports.object({
101536
101714
  day: external_exports.string(),
101537
- byPeople: count11,
101538
- byAgents: count11,
101539
- people: count11
101715
+ byPeople: count12,
101716
+ byAgents: count12,
101717
+ people: count12
101540
101718
  })
101541
101719
  ),
101542
101720
  /** The once-only sends nurturing kept (first_agent_made, first_agent_nudge, ...). */
@@ -101560,25 +101738,25 @@ var capacityOutputDefinition = external_exports.object({
101560
101738
  /** The last day of host load, oldest first. */
101561
101739
  history: external_exports.array(hostLoadPointSchema)
101562
101740
  });
101563
- var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count: count11 }));
101741
+ var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count: count12 }));
101564
101742
  var snapshotOutputDefinition = external_exports.object({
101565
101743
  workspaceId: external_exports.string(),
101566
101744
  createdAt: external_exports.iso.datetime(),
101567
101745
  plan: external_exports.string(),
101568
101746
  status: external_exports.string(),
101569
- seats: external_exports.object({ people: count11, limit: external_exports.number().int().nullable() }),
101747
+ seats: external_exports.object({ people: count12, limit: external_exports.number().int().nullable() }),
101570
101748
  membersByRole: tally,
101571
101749
  invitesByStatus: tally,
101572
101750
  agentsByKind: tally,
101573
101751
  agentsByHosting: tally,
101574
- agentsConnected: count11,
101752
+ agentsConnected: count12,
101575
101753
  flagsOn: external_exports.array(external_exports.string()),
101576
- complimentaryComputers: count11
101754
+ complimentaryComputers: count12
101577
101755
  });
101578
101756
  var eventsInputDefinition = external_exports.object({ from: external_exports.iso.datetime(), to: external_exports.iso.datetime() }).strict();
101579
101757
  var eventCountsDefinition = external_exports.object({
101580
- total: count11,
101581
- byType: external_exports.array(external_exports.object({ eventType: external_exports.string(), count: count11 }))
101758
+ total: count12,
101759
+ byType: external_exports.array(external_exports.object({ eventType: external_exports.string(), count: count12 }))
101582
101760
  });
101583
101761
  var tenantEventsInputDefinition = external_exports.object({
101584
101762
  from: external_exports.iso.datetime(),
@@ -101628,9 +101806,9 @@ var databaseHealthDefinition = external_exports.object({
101628
101806
  deadlocks: external_exports.number().nonnegative(),
101629
101807
  tempBytes: external_exports.number().nonnegative(),
101630
101808
  connections: external_exports.object({
101631
- total: count11,
101632
- byState: external_exports.array(external_exports.object({ state: external_exports.string(), count: count11 })),
101633
- waitingOnLocks: count11,
101809
+ total: count12,
101810
+ byState: external_exports.array(external_exports.object({ state: external_exports.string(), count: count12 })),
101811
+ waitingOnLocks: count12,
101634
101812
  longestActiveSeconds: external_exports.number().nonnegative(),
101635
101813
  longestIdleInTransactionSeconds: external_exports.number().nonnegative()
101636
101814
  }),
@@ -101661,7 +101839,7 @@ var tenantAgentsDefinition = external_exports.object({
101661
101839
  createdAt: external_exports.iso.datetime(),
101662
101840
  modelLevel: external_exports.string().nullable(),
101663
101841
  model: external_exports.string().nullable(),
101664
- channels: count11,
101842
+ channels: count12,
101665
101843
  limitedUntil: external_exports.iso.datetime().nullable(),
101666
101844
  limitedBy: external_exports.string().nullable(),
101667
101845
  pausedAt: external_exports.iso.datetime().nullable(),
@@ -101683,7 +101861,9 @@ var tenantPeopleDefinition = external_exports.object({
101683
101861
  name: external_exports.string(),
101684
101862
  email: external_exports.string(),
101685
101863
  role: external_exports.string(),
101686
- joinedAt: external_exports.iso.datetime()
101864
+ joinedAt: external_exports.iso.datetime(),
101865
+ /** The member's last heartbeat from a Laze web or desktop window here; null when never. */
101866
+ lastSeenAt: external_exports.iso.datetime().nullable()
101687
101867
  })
101688
101868
  ),
101689
101869
  /** Invitations not accepted yet, and who sent each. */
@@ -101713,8 +101893,8 @@ var tenantBillingDefinition = external_exports.object({
101713
101893
  currencyChosen: external_exports.boolean(),
101714
101894
  cancelAtPeriodEnd: external_exports.boolean(),
101715
101895
  period: external_exports.object({ start: external_exports.iso.datetime(), end: external_exports.iso.datetime() }).nullable(),
101716
- seats: external_exports.object({ people: count11, limit: count11.nullable(), monthlyPrice: external_exports.number() }),
101717
- complimentarySeats: count11.nullable(),
101896
+ seats: external_exports.object({ people: count12, limit: count12.nullable(), monthlyPrice: external_exports.number() }),
101897
+ complimentarySeats: count12.nullable(),
101718
101898
  credits: external_exports.object({
101719
101899
  included: external_exports.number(),
101720
101900
  includedLeft: external_exports.number(),
@@ -101753,14 +101933,14 @@ var tenantVaultDefinition = external_exports.object({
101753
101933
  external_exports.object({
101754
101934
  subject: external_exports.string(),
101755
101935
  most: external_exports.string(),
101756
- maxLeaseSeconds: count11.nullable(),
101936
+ maxLeaseSeconds: count12.nullable(),
101757
101937
  blocked: external_exports.boolean(),
101758
101938
  approveNew: external_exports.boolean(),
101759
101939
  updatedAt: external_exports.iso.datetime()
101760
101940
  })
101761
101941
  ),
101762
101942
  /** Connections waiting for an admin, counted by kind; never a name, label or field. */
101763
- waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count: count11 }))
101943
+ waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count: count12 }))
101764
101944
  });
101765
101945
  var WHATSAPP_INTAKE_KEY_KINDS = ["msg", "edit", "del", "react", "read"];
101766
101946
  var tenantWhatsappInputDefinition = external_exports.object({
@@ -101773,17 +101953,17 @@ var tenantWhatsappOutputDefinition = external_exports.object({
101773
101953
  intake: external_exports.object({
101774
101954
  since: external_exports.iso.datetime(),
101775
101955
  until: external_exports.iso.datetime(),
101776
- total: count11,
101956
+ total: count12,
101777
101957
  byKind: external_exports.array(
101778
101958
  external_exports.object({
101779
101959
  kind: external_exports.enum([...WHATSAPP_INTAKE_KEY_KINDS, "other"]),
101780
- count: count11,
101960
+ count: count12,
101781
101961
  /** Events dated over a second after Laze got them, and the most ahead: a fast clock. */
101782
- aheadOfLaze: external_exports.object({ count: count11, maxAheadMs: external_exports.number().int() }).optional()
101962
+ aheadOfLaze: external_exports.object({ count: count12, maxAheadMs: external_exports.number().int() }).optional()
101783
101963
  })
101784
101964
  ),
101785
101965
  /** The workspace's chat messages and changes dated over a second after Laze stored them. */
101786
- chatAheadOfLaze: external_exports.object({ count: count11, maxAheadMs: external_exports.number().int() }).optional()
101966
+ chatAheadOfLaze: external_exports.object({ count: count12, maxAheadMs: external_exports.number().int() }).optional()
101787
101967
  })
101788
101968
  });
101789
101969
  var computerBrowserInputDefinition = external_exports.object({
@@ -101847,6 +102027,17 @@ var keyFetchesOutputDefinition = external_exports.object({
101847
102027
  starts: vaultKeyFetchesSchema.shape.starts,
101848
102028
  hours: pageOf(vaultKeyFetchesSchema.shape.hours.element)
101849
102029
  });
102030
+ var contentBreakerInputDefinition = external_exports.object({
102031
+ days: external_exports.number().int().min(1).max(VAULT_CONTENT_BREAKER_MAX_DAYS).default(14),
102032
+ limit: external_exports.number().int().min(1).max(500).default(200),
102033
+ cursor: cursorDefinition.optional()
102034
+ }).strict();
102035
+ var contentBreakerOutputDefinition = external_exports.object({
102036
+ arming: vaultContentBreakerSchema.shape.arming,
102037
+ ceilings: vaultContentBreakerSchema.shape.ceilings,
102038
+ upkeepCeilings: vaultContentBreakerSchema.shape.upkeepCeilings,
102039
+ rows: pageOf(vaultContentBreakerSchema.shape.rows.element)
102040
+ });
101850
102041
  var judgeMeasureInputDefinition = external_exports.object({
101851
102042
  from: external_exports.iso.datetime(),
101852
102043
  to: external_exports.iso.datetime(),
@@ -101866,6 +102057,17 @@ var vaultAsksInputDefinition = external_exports.object({
101866
102057
  cursor: cursorDefinition.optional()
101867
102058
  }).strict();
101868
102059
  var vaultAsksOutputDefinition = external_exports.object({ asks: pageOf(vaultOpsAskSchema) });
102060
+ var vaultConnectionsInputDefinition = external_exports.object({
102061
+ from: external_exports.iso.datetime(),
102062
+ to: external_exports.iso.datetime(),
102063
+ connectionId: external_exports.string().trim().min(1).max(128).optional(),
102064
+ limit: external_exports.number().int().min(1).max(500).default(100),
102065
+ cursor: cursorDefinition.optional()
102066
+ }).strict();
102067
+ var vaultConnectionsOutputDefinition = external_exports.object({
102068
+ connections: external_exports.array(vaultOpsConnectionSchema),
102069
+ events: pageOf(vaultOpsConnectionEventSchema)
102070
+ });
101869
102071
  var browserErrorsInputDefinition = external_exports.object({
101870
102072
  from: external_exports.iso.datetime(),
101871
102073
  to: external_exports.iso.datetime(),
@@ -101971,7 +102173,7 @@ var OPS_FUNCTIONS = {
101971
102173
  output: loginStatesSchema
101972
102174
  }),
101973
102175
  "tenant.people": entry({
101974
- title: "One workspace's people: members' names, emails and join times, and pending invites",
102176
+ title: "One workspace's people: members' names, emails, join and last seen times, and pending invites",
101975
102177
  scope: "tenant",
101976
102178
  view: "table",
101977
102179
  input: noInputDefinition,
@@ -102020,6 +102222,13 @@ var OPS_FUNCTIONS = {
102020
102222
  input: vaultAsksInputDefinition,
102021
102223
  output: vaultAsksOutputDefinition
102022
102224
  }),
102225
+ "tenant.vault_connections": entry({
102226
+ title: "One workspace's vault connections: status, sealing, provider and their audit codes",
102227
+ scope: "tenant",
102228
+ view: "table",
102229
+ input: vaultConnectionsInputDefinition,
102230
+ output: vaultConnectionsOutputDefinition
102231
+ }),
102023
102232
  "tenant.whatsapp_sends": entry({
102024
102233
  title: "One workspace's last WhatsApp sends: state, failure code and times, no content",
102025
102234
  scope: "tenant",
@@ -102069,6 +102278,13 @@ var OPS_FUNCTIONS = {
102069
102278
  input: keyFetchesInputDefinition,
102070
102279
  output: keyFetchesOutputDefinition
102071
102280
  }),
102281
+ "vault.content_breaker": entry({
102282
+ title: "The content breaker's 14-day replay: per day and workspace the opens it counts, mirror upkeep, minute and hour peaks, and whether it would have locked, plus the arming record",
102283
+ scope: "platform",
102284
+ view: "table",
102285
+ input: contentBreakerInputDefinition,
102286
+ output: contentBreakerOutputDefinition
102287
+ }),
102072
102288
  "vault.judge_measure": entry({
102073
102289
  title: "The vault judge's verdicts against people's answers, with false allows and blocks",
102074
102290
  scope: "platform",
@@ -102579,8 +102795,8 @@ function printSchedule({
102579
102795
  const next = schedule2.nextFireAt ? `next ${schedule2.nextFireAt}` : "no next fire";
102580
102796
  const stats = schedule2.checkStats;
102581
102797
  const counts = stats ? ` (7 days: ${stats.checked} checks, ${stats.woke} woke, ${stats.failed} failed)` : "";
102582
- const check3 = schedule2.checkScript ? ` check ${schedule2.checkScript}${counts}` : "";
102583
- const text3 = `${schedule2.id} ${schedule2.status} ${schedule2.name} ${schedule2.source} (${schedule2.timezone}) ${next}${check3}`;
102798
+ const check4 = schedule2.checkScript ? ` check ${schedule2.checkScript}${counts}` : "";
102799
+ const text3 = `${schedule2.id} ${schedule2.status} ${schedule2.name} ${schedule2.source} (${schedule2.timezone}) ${next}${check4}`;
102584
102800
  context.out(`${withLink({ text: text3, url: schedule2.url, base })}
102585
102801
  `);
102586
102802
  }
@@ -102621,8 +102837,8 @@ function changesOf2(args) {
102621
102837
  }
102622
102838
  const channel = flagText({ args, name: "channel" });
102623
102839
  if (channel) changes2.channelId = channel === "none" ? null : channel;
102624
- const check3 = flagText({ args, name: "check" });
102625
- if (check3) changes2.checkScript = check3 === "none" ? null : check3;
102840
+ const check4 = flagText({ args, name: "check" });
102841
+ if (check4) changes2.checkScript = check4 === "none" ? null : check4;
102626
102842
  return changes2;
102627
102843
  }
102628
102844
  async function scheduleUpdate({ context, args }) {
@@ -104326,7 +104542,7 @@ async function vaultSave({ context, args }) {
104326
104542
  // src/services/vault-scrub-commands.service.ts
104327
104543
  function lineOf6(channel) {
104328
104544
  const where = channel.name ? `#${channel.name}` : channel.channelId;
104329
- const found = Object.entries(channel.found).map(([vendor, count12]) => `${vendor} ${count12}`).join(", ");
104545
+ const found = Object.entries(channel.found).map(([vendor, count13]) => `${vendor} ${count13}`).join(", ");
104330
104546
  const kinds = [`held ${channel.held}`, ...found ? [`found: ${found}`] : []].join("; ");
104331
104547
  return `${where} scanned ${channel.scanned} changed ${channel.messages} ${kinds}
104332
104548
  `;
@@ -104986,7 +105202,7 @@ var connect7 = async ({ context, args, client }) => {
104986
105202
  });
104987
105203
  if (!json6({ context, args, data: webhook })) printWebhook({ context, webhook });
104988
105204
  };
104989
- var check2 = async ({ context, args, client }) => {
105205
+ var check3 = async ({ context, args, client }) => {
104990
105206
  const answer6 = await client.post(WHATSAPP_BUSINESS_REST_PATHS.check, {});
104991
105207
  if (!json6({ context, args, data: answer6 })) printStatus2({ context, status: answer6 });
104992
105208
  return answer6.state === "connected" ? 0 : 1;
@@ -105029,7 +105245,7 @@ var RUNS7 = {
105029
105245
  templates,
105030
105246
  prices,
105031
105247
  connect: connect7,
105032
- check: check2,
105248
+ check: check3,
105033
105249
  "verify-token": verifyToken,
105034
105250
  settings: settings2,
105035
105251
  disconnect: disconnect5
@@ -105403,8 +105619,8 @@ async function roles({ context, args }) {
105403
105619
  const catalogue = await client.get("/api/roles");
105404
105620
  if (args.flags.json) return printJson11(context, catalogue);
105405
105621
  for (const role2 of catalogue) {
105406
- const count12 = `${role2.permissions.length} permissions`;
105407
- context.out(`${role2.label} ${count12} ${role2.description}
105622
+ const count13 = `${role2.permissions.length} permissions`;
105623
+ context.out(`${role2.label} ${count13} ${role2.description}
105408
105624
  `);
105409
105625
  context.out(` ${role2.permissions.join(", ")}
105410
105626
  `);