@lazehq/cli 0.1.109 → 0.1.110

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 +186 -96
  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(count7) {
31081
- while (count7 > 0 && this.lineChunkIndex < this.chunks.length) {
31080
+ discardLeadingBytes(count8) {
31081
+ while (count8 > 0 && this.lineChunkIndex < this.chunks.length) {
31082
31082
  const chunk = this.chunks[this.lineChunkIndex];
31083
31083
  const remaining = chunk.length - this.linePos;
31084
- if (count7 < remaining) {
31085
- this.linePos += count7;
31086
- count7 = 0;
31084
+ if (count8 < remaining) {
31085
+ this.linePos += count8;
31086
+ count8 = 0;
31087
31087
  } else {
31088
- count7 -= remaining;
31088
+ count8 -= 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 count7 of counts.values()) {
31838
- const p = count7 / sample.length;
31837
+ for (const count8 of counts.values()) {
31838
+ const p = count8 / 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.109";
36963
+ var STAMPED = "0.1.110";
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 count7 = units;
38728
+ let count8 = 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
- count7--;
38731
+ count8--;
38732
38732
  i++;
38733
38733
  }
38734
38734
  }
38735
- return count7;
38735
+ return count8;
38736
38736
  }
38737
38737
  function getLengthableOrigin(input2) {
38738
38738
  if (Array.isArray(input2))
@@ -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(count7, one, few, many) {
43091
- const absCount = Math.abs(count7);
43090
+ function getBelarusianPlural(count8, one, few, many) {
43091
+ const absCount = Math.abs(count8);
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(count7, one, many) {
45739
- return Math.abs(count7) === 1 ? one : many;
45738
+ function getArmenianPlural(count8, one, many) {
45739
+ return Math.abs(count8) === 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(count7, one, few, many) {
48478
- const absCount = Math.abs(count7);
48477
+ function getRussianPlural(count8, one, few, many) {
48478
+ const absCount = Math.abs(count8);
48479
48479
  const lastDigit = absCount % 10;
48480
48480
  const lastTwoDigits = absCount % 100;
48481
48481
  if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
@@ -60701,7 +60701,9 @@ var openVaultTurnInputSchemaDefinition = external_exports.object({
60701
60701
  /** A session outside Laze, which has no agent record: how its cards name it. */
60702
60702
  label: external_exports.string().max(300).nullish(),
60703
60703
  /** The support agent's turns: the agent_turn door refuses them, signed with the turn. */
60704
- profile: external_exports.literal("support").optional()
60704
+ profile: external_exports.literal("support").optional(),
60705
+ /** What the agent is for (its name and instructions, trimmed), for the judge only. */
60706
+ role: external_exports.string().max(1e3).optional()
60705
60707
  }),
60706
60708
  requesterUserId: external_exports.string().min(1),
60707
60709
  requesterGroupIds: external_exports.array(external_exports.string().min(1)).default([]),
@@ -61184,6 +61186,11 @@ var vaultConfig = Config.define((c) => ({
61184
61186
  /** Where the judge posts /v1/decisions: OpenAI's EU host, or the LangWatch AI gateway. */
61185
61187
  judgeBaseUrl: c.env("VAULT_JUDGE_BASE_URL", external_exports.url().default("https://eu.api.openai.com")),
61186
61188
  judgeModel: c.env("VAULT_JUDGE_MODEL", external_exports.string().min(1).default("gpt-6-luna")),
61189
+ /** Shadow judge calls on Always-ask uses per hour and api process; unset 60, 0 for none. */
61190
+ judgeShadowPerHour: c.env(
61191
+ "VAULT_JUDGE_SHADOW_PER_HOUR",
61192
+ external_exports.coerce.number().int().min(0).max(1e4).optional()
61193
+ ),
61187
61194
  /** How long one judge answer is reused for the same question. */
61188
61195
  judgeCacheMinutes: c.env("VAULT_JUDGE_CACHE_MINUTES", positiveInt.default(10)),
61189
61196
  /** The judge's price per input token in nano-USD, metered on the workspace's usage. */
@@ -61800,15 +61807,15 @@ function clustersIn({
61800
61807
  const out = [];
61801
61808
  let current3 = null;
61802
61809
  for (let index = segment.start; index <= segment.end; index += 1) {
61803
- const count7 = flagged[index] ?? 0;
61804
- if (count7 === 0) continue;
61810
+ const count8 = flagged[index] ?? 0;
61811
+ if (count8 === 0) continue;
61805
61812
  if (current3 && index - current3.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
61806
61813
  current3.end = index;
61807
- current3.values += count7;
61814
+ current3.values += count8;
61808
61815
  continue;
61809
61816
  }
61810
61817
  if (current3) out.push(current3);
61811
- current3 = { start: index, end: index, values: count7 };
61818
+ current3 = { start: index, end: index, values: count8 };
61812
61819
  }
61813
61820
  if (current3) out.push(current3);
61814
61821
  return out;
@@ -61848,7 +61855,7 @@ function redactedBlocksAt({
61848
61855
  }
61849
61856
  const blocks = redactedBlocks({ lines: lines2, flagged });
61850
61857
  const inside = (line) => blocks.some((block2) => line >= block2.start && line <= block2.end);
61851
- const values = flagged.reduce((sum, count7, line) => inside(line) ? sum + count7 : sum, 0);
61858
+ const values = flagged.reduce((sum, count8, line) => inside(line) ? sum + count8 : sum, 0);
61852
61859
  return { values, insideAt: (offset) => inside(lineAt(offset)) };
61853
61860
  }
61854
61861
 
@@ -62294,6 +62301,38 @@ function fillCommandReferences({
62294
62301
  };
62295
62302
  }
62296
62303
 
62304
+ // ../../modules/vault/contract/src/vault-judge-measure.ts
62305
+ var count2 = external_exports.number().int().nonnegative();
62306
+ var rate = external_exports.number().min(0).max(1).nullable();
62307
+ var idText = external_exports.string().max(128);
62308
+ var answerCountsSchema = external_exports.object({ approved: count2, denied: count2, unanswered: count2 });
62309
+ var atThresholdSchema = external_exports.object({
62310
+ thresholdPercent: count2,
62311
+ /** The judge would allow and the person denied; the rate is over denied cards. */
62312
+ falseAllows: count2,
62313
+ falseAllowRate: rate,
62314
+ /** The judge would ask or refuse and the person approved; the rate is over approved cards. */
62315
+ needlessAsks: count2,
62316
+ needlessAskRate: rate
62317
+ });
62318
+ var keyMeasureSchema = external_exports.object({
62319
+ workspaceId: idText,
62320
+ connectionId: idText,
62321
+ thresholdPercent: count2,
62322
+ judged: count2,
62323
+ approved: count2,
62324
+ denied: count2,
62325
+ falseAllows: count2,
62326
+ needlessAsks: count2
62327
+ });
62328
+ var vaultJudgeMeasureSchemaDefinition = external_exports.object({
62329
+ modes: external_exports.object({ live: answerCountsSchema, shadow: answerCountsSchema }),
62330
+ thresholds: external_exports.array(atThresholdSchema),
62331
+ /** Every key with a judged card in the range, most judged first. */
62332
+ keys: external_exports.array(keyMeasureSchema)
62333
+ });
62334
+ var vaultJudgeMeasureSchema = vaultJudgeMeasureSchemaDefinition;
62335
+
62297
62336
  // ../../modules/chat/contract/src/chat.close.ts
62298
62337
  var conversationOpenDaysSchemaDefinition = external_exports.union([external_exports.literal(7), external_exports.literal(14), external_exports.literal(30), external_exports.literal(90)]).nullable();
62299
62338
  var conversationOpenDaysSchema = conversationOpenDaysSchemaDefinition;
@@ -72545,10 +72584,10 @@ function whereOf(message2) {
72545
72584
  }
72546
72585
  function catchUpLinesOf(message2) {
72547
72586
  if (!message2.catchUp) return [];
72548
- const { count: count7, older } = message2.catchUp;
72587
+ const { count: count8, older } = message2.catchUp;
72549
72588
  const where = whereOf(message2);
72550
72589
  const lines2 = [
72551
- `${count7} ${count7 === 1 ? "message" : "messages"} in ${where} while you were away.`
72590
+ `${count8} ${count8 === 1 ? "message" : "messages"} in ${where} while you were away.`
72552
72591
  ];
72553
72592
  if (older === 0) return lines2;
72554
72593
  const channel = message2.channelKind === "public" || message2.channelKind === "private";
@@ -72571,9 +72610,9 @@ function hookContextOf({
72571
72610
  messages,
72572
72611
  self: self2
72573
72612
  }) {
72574
- const count7 = messages.length === 1 ? "A message" : `${messages.length} messages`;
72613
+ const count8 = messages.length === 1 ? "A message" : `${messages.length} messages`;
72575
72614
  return [
72576
- `${count7} reached you in Laze${selfClauseOf({ self: self2 })}:`,
72615
+ `${count8} reached you in Laze${selfClauseOf({ self: self2 })}:`,
72577
72616
  "",
72578
72617
  ...messages.map((message2) => formatInboxMessage({ message: message2 })),
72579
72618
  "",
@@ -72588,7 +72627,7 @@ function selfClauseOf({ self: self2 }) {
72588
72627
  function record2(value) {
72589
72628
  return typeof value === "object" && value !== null ? value : {};
72590
72629
  }
72591
- function count2(value) {
72630
+ function count3(value) {
72592
72631
  return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
72593
72632
  }
72594
72633
  function parse3(line) {
@@ -72609,17 +72648,17 @@ function compactionOf({
72609
72648
  return {
72610
72649
  key: typeof entry2.uuid === "string" ? entry2.uuid : String(index),
72611
72650
  trigger: meta3.trigger === "manual" ? "manual" : "auto",
72612
- tokensBefore: count2(meta3.preTokens),
72613
- tokensAfter: count2(meta3.postTokens),
72651
+ tokensBefore: count3(meta3.preTokens),
72652
+ tokensAfter: count3(meta3.postTokens),
72614
72653
  at: typeof entry2.timestamp === "string" ? entry2.timestamp : "1970-01-01T00:00:00.000Z"
72615
72654
  };
72616
72655
  }
72617
72656
  function usageOf({ entry: entry2 }) {
72618
72657
  const message2 = record2(entry2.message);
72619
72658
  const usage = record2(message2.usage);
72620
- const input2 = count2(usage.input_tokens);
72659
+ const input2 = count3(usage.input_tokens);
72621
72660
  if (input2 === void 0) return void 0;
72622
- const cached2 = (count2(usage.cache_read_input_tokens) ?? 0) + (count2(usage.cache_creation_input_tokens) ?? 0);
72661
+ const cached2 = (count3(usage.cache_read_input_tokens) ?? 0) + (count3(usage.cache_creation_input_tokens) ?? 0);
72623
72662
  return {
72624
72663
  tokens: input2 + cached2,
72625
72664
  ...typeof message2.model === "string" ? { model: message2.model } : {}
@@ -73610,7 +73649,7 @@ function slackHitLines({
73610
73649
  ...link2 ? [` ${link2}`] : []
73611
73650
  ];
73612
73651
  }
73613
- var count3 = (n) => `${n} message${n === 1 ? "" : "s"}`;
73652
+ var count4 = (n) => `${n} message${n === 1 ? "" : "s"}`;
73614
73653
  function slackSectionLines({
73615
73654
  slack: slack2,
73616
73655
  laze,
@@ -73623,7 +73662,7 @@ function slackSectionLines({
73623
73662
  });
73624
73663
  if (slack2.teams.some((team) => team.state === "searched")) {
73625
73664
  const found = slack2.hits.length;
73626
- lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${count3(found)}`);
73665
+ lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${count4(found)}`);
73627
73666
  }
73628
73667
  for (const hit of slack2.hits) lines2.push(...slackHitLines({ hit, laze, url: url2, workspaceId }), "");
73629
73668
  return lines2;
@@ -73634,7 +73673,7 @@ function formatSearch({
73634
73673
  workspaceId
73635
73674
  }) {
73636
73675
  const { laze, slack: slack2, query } = output2;
73637
- const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${count3(laze.hits.length)} for "${query}"`];
73676
+ const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${count4(laze.hits.length)} for "${query}"`];
73638
73677
  for (const hit of laze.hits) {
73639
73678
  lines2.push(...lazeHitLines({ hit, laze, url: url2, workspaceId }), "");
73640
73679
  }
@@ -81477,9 +81516,9 @@ function formatAppMoney({
81477
81516
  maximumFractionDigits: tiny ? 4 : 2
81478
81517
  }).format(amount);
81479
81518
  }
81480
- var count4 = new Intl.NumberFormat("en-US");
81519
+ var count5 = new Intl.NumberFormat("en-US");
81481
81520
  function plural2({ value, one, many }) {
81482
- return `${count4.format(value)} ${value === 1 ? one : many}`;
81521
+ return `${count5.format(value)} ${value === 1 ? one : many}`;
81483
81522
  }
81484
81523
  function appCostQuantityText(line) {
81485
81524
  const { quantity } = line;
@@ -82325,8 +82364,8 @@ var appCliCommands = [
82325
82364
  {
82326
82365
  command: "laze app asset add",
82327
82366
  operation: "startAssetUpload",
82328
- arguments: ["<file>", "--type <content type>"],
82329
- summary: "Upload a video, audio, image, PDF, font or captions file (up to 2 GB) as an asset of the app, outside the 10 MB version limit, and print its address /_laze/assets/<sha256>.<ext> to use in the app's files, for example <video src> with full quality and seeking. Name every asset in a file of the app: one no version names is deleted after 7 days"
82367
+ arguments: ["<file>", "--type <content type>", "--any-level"],
82368
+ summary: "Upload a video, audio, image, PDF, font or captions file (up to 2 GB) as an asset of the app, outside the 10 MB version limit, and print its address /_laze/assets/<sha256>.<ext> to use in the app's files, for example <video src> with full quality and seeking. Name every asset in a file of the app: one no version names is deleted after 7 days. An H.264 video above level 5.2 is refused, because iPhones and Macs do not play it"
82330
82369
  },
82331
82370
  {
82332
82371
  command: "laze app asset list",
@@ -82828,6 +82867,31 @@ function typeOf({ file: file4, args }) {
82828
82867
  }
82829
82868
  return type;
82830
82869
  }
82870
+ var MAX_H264_LEVEL = 52;
82871
+ async function h264LevelOf(path) {
82872
+ const file4 = await open5(path, "r");
82873
+ try {
82874
+ const { size } = await file4.stat();
82875
+ const head = Buffer.alloc(16);
82876
+ for (let at2 = 0; at2 + 8 <= size; ) {
82877
+ await file4.read(head, 0, 16, at2);
82878
+ let length = head.readUInt32BE(0);
82879
+ if (length === 1) length = Number(head.readBigUInt64BE(8));
82880
+ if (length === 0) length = size - at2;
82881
+ if (length < 8) return null;
82882
+ if (head.toString("latin1", 4, 8) === "moov") {
82883
+ const moov = Buffer.alloc(Math.min(length, 64 * 1024 * 1024));
82884
+ await file4.read(moov, 0, moov.byteLength, at2);
82885
+ const box = moov.indexOf("avcC", 0, "latin1");
82886
+ return box === -1 || box + 8 > moov.byteLength ? null : moov[box + 7] ?? null;
82887
+ }
82888
+ at2 += length;
82889
+ }
82890
+ return null;
82891
+ } finally {
82892
+ await file4.close();
82893
+ }
82894
+ }
82831
82895
  async function sha256Of2(path) {
82832
82896
  const hash2 = createHash5("sha256");
82833
82897
  for await (const chunk of createReadStream2(path)) hash2.update(chunk);
@@ -82898,6 +82962,14 @@ async function add({ context, args, open: openApp }) {
82898
82962
  );
82899
82963
  }
82900
82964
  const contentType = typeOf({ file: file4, args });
82965
+ if (contentType === "video/mp4" || contentType === "video/quicktime") {
82966
+ const level2 = await h264LevelOf(path);
82967
+ if (level2 !== null && level2 > MAX_H264_LEVEL && !args.flags["any-level"]) {
82968
+ throw new CliUsageError(
82969
+ `${basename7(file4)} is H.264 level ${(level2 / 10).toFixed(1)}, which iPhones and Macs do not play (they stop at 5.2). Re-encode it with fewer reference frames, for example: ffmpeg -i ${basename7(file4)} -c:v libx264 -profile:v high -level:v 5.1 -refs 4 -crf 20 -c:a copy -movflags +faststart out.mp4. Pass --any-level to upload it anyway`
82970
+ );
82971
+ }
82972
+ }
82901
82973
  const { client, appId, name: name3 } = await openApp();
82902
82974
  const sha256 = await sha256Of2(path);
82903
82975
  const started = await client.post("/api/apps/assets/start", {
@@ -84753,7 +84825,7 @@ var appWrite = async ({ context, args }) => {
84753
84825
  });
84754
84826
  };
84755
84827
  function seedLine(seeded) {
84756
- const created = Object.entries(seeded.created).map(([name3, count7]) => `${count7} in ${name3}`);
84828
+ const created = Object.entries(seeded.created).map(([name3, count8]) => `${count8} in ${name3}`);
84757
84829
  const parts = [
84758
84830
  created.length ? `Loaded starter records: ${created.join(", ")}.` : "",
84759
84831
  seeded.skipped.length ? `Left ${seeded.skipped.join(", ")} as it was: it already holds records.` : ""
@@ -85078,8 +85150,8 @@ function cardLine({ choice }) {
85078
85150
  var appCard = async ({ context, args }) => {
85079
85151
  const client = await appClient({ context, args });
85080
85152
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
85081
- const count7 = Number(flagText({ args, name: "rows", fallback: "5" }));
85082
- if (!Number.isInteger(count7) || count7 < 1 || count7 > 10) {
85153
+ const count8 = Number(flagText({ args, name: "rows", fallback: "5" }));
85154
+ if (!Number.isInteger(count8) || count8 < 1 || count8 > 10) {
85083
85155
  throw new CliUsageError("--rows is a whole number from 1 to 10");
85084
85156
  }
85085
85157
  const text3 = (name3) => flagText({ args, name: name3 }) || null;
@@ -85092,7 +85164,7 @@ var appCard = async ({ context, args }) => {
85092
85164
  collection: text3("collection"),
85093
85165
  filter: flagText({ args, name: "where" }) || flagText({ args, name: "filter" }),
85094
85166
  sort: flagText({ args, name: "sort" }),
85095
- rows: count7,
85167
+ rows: count8,
85096
85168
  caption: text3("caption")
85097
85169
  }
85098
85170
  });
@@ -86718,9 +86790,9 @@ function presenceColumns(member) {
86718
86790
  return [member.presence, `${status11.emoji} ${status11.text}`.trim() + until, ...dndColumn(member)];
86719
86791
  }
86720
86792
  function formatMembers({ detail }) {
86721
- const count7 = `${detail.members.length} ${detail.members.length === 1 ? "member" : "members"}`;
86793
+ const count8 = `${detail.members.length} ${detail.members.length === 1 ? "member" : "members"}`;
86722
86794
  const ends = detail.endsAt ? `, ends ${utcTimeOf(detail.endsAt)}` : "";
86723
- const head = `${channelLabelOf(detail)} (${detail.id}), ${count7}${ends}`;
86795
+ const head = `${channelLabelOf(detail)} (${detail.id}), ${count8}${ends}`;
86724
86796
  const rows = detail.members.map(
86725
86797
  (member) => [ROLE[member.role], member.name, member.kind, member.id, ...presenceColumns(member)].join(" ")
86726
86798
  );
@@ -86759,13 +86831,13 @@ function formatBrowsable({
86759
86831
  }) {
86760
86832
  if (channels3.length === 0) return "No channels to browse.\n";
86761
86833
  const rows = channels3.map((channel) => {
86762
- const count7 = `${channel.memberCount} ${channel.memberCount === 1 ? "member" : "members"}`;
86834
+ const count8 = `${channel.memberCount} ${channel.memberCount === 1 ? "member" : "members"}`;
86763
86835
  const marks = [
86764
86836
  channel.joined ? "joined" : "not joined",
86765
86837
  ...channel.private ? ["private"] : [],
86766
86838
  ...channel.archived ? ["archived"] : []
86767
86839
  ].join(", ");
86768
- return `#${channel.name} ${channel.id} ${count7} ${marks} ${channel.topic}`;
86840
+ return `#${channel.name} ${channel.id} ${count8} ${marks} ${channel.topic}`;
86769
86841
  });
86770
86842
  return `${rows.join("\n")}
86771
86843
  `;
@@ -86814,10 +86886,10 @@ var DURATION = /^(\d+)\s*(m|min|mins|minutes?|h|hours?|d|days?)$/i;
86814
86886
  function minutesOf({ text: text3 }) {
86815
86887
  const match = DURATION.exec(text3.trim());
86816
86888
  if (!match?.[1] || !match[2]) return null;
86817
- const count7 = Number(match[1]);
86889
+ const count8 = Number(match[1]);
86818
86890
  const unit = match[2].toLowerCase()[0];
86819
86891
  const perUnit = { d: 1440, h: 60, m: 1 };
86820
- const minutes = count7 * (perUnit[unit ?? "m"] ?? 1);
86892
+ const minutes = count8 * (perUnit[unit ?? "m"] ?? 1);
86821
86893
  return minutes > 0 ? minutes : null;
86822
86894
  }
86823
86895
  function muteTextOf({ mute }) {
@@ -90325,7 +90397,7 @@ var whatsappObservedPayloadDefinition = external_exports.object({
90325
90397
  });
90326
90398
 
90327
90399
  // ../../modules/compute/contract/src/whatsapp-ops.ts
90328
- var count5 = external_exports.number().int().nonnegative();
90400
+ var count6 = external_exports.number().int().nonnegative();
90329
90401
  var at = external_exports.iso.datetime();
90330
90402
  var whatsappMirrorHealthDefinition = external_exports.object({
90331
90403
  mirrors: external_exports.array(
@@ -90341,18 +90413,18 @@ var whatsappMirrorHealthDefinition = external_exports.object({
90341
90413
  nextVisitAt: at.nullable(),
90342
90414
  touchedAt: at.nullable(),
90343
90415
  createdAt: at,
90344
- skipped: external_exports.object({ count: count5, from: external_exports.number().int().nullable(), at: at.nullable() }),
90416
+ skipped: external_exports.object({ count: count6, from: external_exports.number().int().nullable(), at: at.nullable() }),
90345
90417
  /** The last pull that met files; null when none did. */
90346
90418
  files: external_exports.object({
90347
90419
  at,
90348
- attached: count5,
90349
- unavailable: count5,
90350
- retrying: count5,
90351
- dropped: count5,
90420
+ attached: count6,
90421
+ unavailable: count6,
90422
+ retrying: count6,
90423
+ dropped: count6,
90352
90424
  failureCode: external_exports.string().nullable()
90353
90425
  }).nullable(),
90354
90426
  /** Intake holds (ADR-216 §11) by kind and code, with when the oldest was made. */
90355
- holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count: count5, oldestAt: at }))
90427
+ holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count: count6, oldestAt: at }))
90356
90428
  })
90357
90429
  )
90358
90430
  });
@@ -90394,11 +90466,11 @@ var whatsappWakeTimelineDefinition = external_exports.object({
90394
90466
  external_exports.object({
90395
90467
  step: external_exports.enum(WHATSAPP_WAKE_STEPS),
90396
90468
  at,
90397
- sincePreviousMs: count5,
90398
- sinceRequestMs: count5
90469
+ sincePreviousMs: count6,
90470
+ sinceRequestMs: count6
90399
90471
  })
90400
90472
  ),
90401
- totalMs: count5.nullable()
90473
+ totalMs: count6.nullable()
90402
90474
  })
90403
90475
  )
90404
90476
  })
@@ -94989,8 +95061,8 @@ function draftFilesMissingText(names) {
94989
95061
  }
94990
95062
 
94991
95063
  // ../../modules/feed/contract/src/feed.decisions.ts
94992
- function decisionsLineOf(count7) {
94993
- return `${count7} ${count7 === 1 ? "decision" : "decisions"} waiting on you`;
95064
+ function decisionsLineOf(count8) {
95065
+ return `${count8} ${count8 === 1 ? "decision" : "decisions"} waiting on you`;
94994
95066
  }
94995
95067
 
94996
95068
  // src/rules/feed-input.rules.ts
@@ -95492,8 +95564,8 @@ function optionalWords(words) {
95492
95564
  }
95493
95565
  function shareLinesOf({ move: move3, answer: answer6 }) {
95494
95566
  const names = answer6.people.map((person) => person.name).join(", ") || "no one new";
95495
- const count7 = answer6.itemIds.length;
95496
- const items = `${count7} item${count7 === 1 ? "" : "s"}`;
95567
+ const count8 = answer6.itemIds.length;
95568
+ const items = `${count8} item${count8 === 1 ? "" : "s"}`;
95497
95569
  const head = move3 === "share" ? `Shared ${items} with ${names}` : `Took ${names} off ${items}`;
95498
95570
  return [head, ...answer6.itemIds].map((line) => `${line}
95499
95571
  `).join("");
@@ -96124,13 +96196,13 @@ function formatHistory(output2) {
96124
96196
  const lines2 = linesOf3(output2);
96125
96197
  if (lines2.length === 0) return `${where}${from}: no messages.
96126
96198
  `;
96127
- const count7 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
96199
+ const count8 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
96128
96200
  const blocks = lines2.map(blockOf2).join("\n\n");
96129
96201
  const cursor = olderCursorOf(output2);
96130
96202
  const older = cursor ? `
96131
96203
 
96132
96204
  Older: laze history ${output2.channel} --before ${cursor}` : "";
96133
- return `${where}${from}: ${count7}, oldest first
96205
+ return `${where}${from}: ${count8}, oldest first
96134
96206
 
96135
96207
  ${blocks}${older}
96136
96208
  `;
@@ -97341,10 +97413,10 @@ ${USAGE13}`);
97341
97413
  if ("exitCode" in released) return released;
97342
97414
  Object.assign(env, released.env);
97343
97415
  }
97344
- const count7 = Object.keys(env).length;
97345
- if (count7 > EXEC_ENV_MAX) {
97416
+ const count8 = Object.keys(env).length;
97417
+ if (count8 > EXEC_ENV_MAX) {
97346
97418
  context.err(
97347
- `laze: these connections hold ${count7} variables; at most ${EXEC_ENV_MAX} go with a command. Send fewer connections, or run the command with \`laze vault run\` where you run.
97419
+ `laze: these connections hold ${count8} variables; at most ${EXEC_ENV_MAX} go with a command. Send fewer connections, or run the command with \`laze vault run\` where you run.
97348
97420
  `
97349
97421
  );
97350
97422
  return { exitCode: 1 };
@@ -97499,7 +97571,7 @@ function secretRefusal({
97499
97571
  rules = MCP_SECRET_COMMANDS
97500
97572
  }) {
97501
97573
  const { words, flags: flags2 } = parseArgs({ argv });
97502
- const command = [3, 2, 1].map((count7) => words.slice(0, count7).join(" ")).find((name3) => Object.hasOwn(rules, name3));
97574
+ const command = [3, 2, 1].map((count8) => words.slice(0, count8).join(" ")).find((name3) => Object.hasOwn(rules, name3));
97503
97575
  const rule = command === void 0 ? void 0 : rules[command];
97504
97576
  if (!command || !rule) return void 0;
97505
97577
  const vaultFlag = rule.vaultFlag ?? "from-vault";
@@ -98218,11 +98290,11 @@ async function monitorAdd({ context, args }) {
98218
98290
  });
98219
98291
  if (args.flags.json) return context.out(`${JSON.stringify(added, null, 2)}
98220
98292
  `);
98221
- const count7 = added.watching.length;
98293
+ const count8 = added.watching.length;
98222
98294
  context.out(
98223
98295
  `${added.monitor.id} ${added.monitor.name}
98224
98296
  ${added.watching.join(" ")}
98225
- Watching ${count7} ${count7 === 1 ? "channel" : "channels"}
98297
+ Watching ${count8} ${count8 === 1 ? "channel" : "channels"}
98226
98298
  `
98227
98299
  );
98228
98300
  }
@@ -100008,12 +100080,12 @@ var funnelInputDefinition = external_exports.object({
100008
100080
  to: external_exports.iso.datetime(),
100009
100081
  bucketMinutes: external_exports.union([external_exports.literal(10), external_exports.literal(60), external_exports.literal(1440)]).default(60)
100010
100082
  }).strict();
100011
- var count6 = external_exports.number().int().nonnegative();
100083
+ var count7 = external_exports.number().int().nonnegative();
100012
100084
  var funnelCountsDefinition = external_exports.object({
100013
- signUps: count6,
100014
- workspaces: count6,
100015
- activatedTeams: count6,
100016
- payingTeams: count6
100085
+ signUps: count7,
100086
+ workspaces: count7,
100087
+ activatedTeams: count7,
100088
+ payingTeams: count7
100017
100089
  });
100018
100090
  var funnelOutputDefinition = external_exports.object({
100019
100091
  bucketMinutes: external_exports.number().int(),
@@ -100027,25 +100099,25 @@ var capacityOutputDefinition = external_exports.object({
100027
100099
  /** The last day of host load, oldest first. */
100028
100100
  history: external_exports.array(hostLoadPointSchema)
100029
100101
  });
100030
- var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count: count6 }));
100102
+ var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count: count7 }));
100031
100103
  var snapshotOutputDefinition = external_exports.object({
100032
100104
  workspaceId: external_exports.string(),
100033
100105
  createdAt: external_exports.iso.datetime(),
100034
100106
  plan: external_exports.string(),
100035
100107
  status: external_exports.string(),
100036
- seats: external_exports.object({ people: count6, limit: external_exports.number().int().nullable() }),
100108
+ seats: external_exports.object({ people: count7, limit: external_exports.number().int().nullable() }),
100037
100109
  membersByRole: tally,
100038
100110
  invitesByStatus: tally,
100039
100111
  agentsByKind: tally,
100040
100112
  agentsByHosting: tally,
100041
- agentsConnected: count6,
100113
+ agentsConnected: count7,
100042
100114
  flagsOn: external_exports.array(external_exports.string()),
100043
- complimentaryComputers: count6
100115
+ complimentaryComputers: count7
100044
100116
  });
100045
100117
  var eventsInputDefinition = external_exports.object({ from: external_exports.iso.datetime(), to: external_exports.iso.datetime() }).strict();
100046
100118
  var eventCountsDefinition = external_exports.object({
100047
- total: count6,
100048
- byType: external_exports.array(external_exports.object({ eventType: external_exports.string(), count: count6 }))
100119
+ total: count7,
100120
+ byType: external_exports.array(external_exports.object({ eventType: external_exports.string(), count: count7 }))
100049
100121
  });
100050
100122
  var tenantEventsInputDefinition = external_exports.object({
100051
100123
  from: external_exports.iso.datetime(),
@@ -100074,9 +100146,9 @@ var databaseHealthDefinition = external_exports.object({
100074
100146
  deadlocks: external_exports.number().nonnegative(),
100075
100147
  tempBytes: external_exports.number().nonnegative(),
100076
100148
  connections: external_exports.object({
100077
- total: count6,
100078
- byState: external_exports.array(external_exports.object({ state: external_exports.string(), count: count6 })),
100079
- waitingOnLocks: count6,
100149
+ total: count7,
100150
+ byState: external_exports.array(external_exports.object({ state: external_exports.string(), count: count7 })),
100151
+ waitingOnLocks: count7,
100080
100152
  longestActiveSeconds: external_exports.number().nonnegative(),
100081
100153
  longestIdleInTransactionSeconds: external_exports.number().nonnegative()
100082
100154
  }),
@@ -100107,7 +100179,7 @@ var tenantAgentsDefinition = external_exports.object({
100107
100179
  createdAt: external_exports.iso.datetime(),
100108
100180
  modelLevel: external_exports.string().nullable(),
100109
100181
  model: external_exports.string().nullable(),
100110
- channels: count6,
100182
+ channels: count7,
100111
100183
  limitedUntil: external_exports.iso.datetime().nullable(),
100112
100184
  limitedBy: external_exports.string().nullable(),
100113
100185
  pausedAt: external_exports.iso.datetime().nullable(),
@@ -100122,8 +100194,8 @@ var tenantBillingDefinition = external_exports.object({
100122
100194
  currency: external_exports.string(),
100123
100195
  cancelAtPeriodEnd: external_exports.boolean(),
100124
100196
  period: external_exports.object({ start: external_exports.iso.datetime(), end: external_exports.iso.datetime() }).nullable(),
100125
- seats: external_exports.object({ people: count6, limit: count6.nullable(), monthlyPrice: external_exports.number() }),
100126
- complimentarySeats: count6.nullable(),
100197
+ seats: external_exports.object({ people: count7, limit: count7.nullable(), monthlyPrice: external_exports.number() }),
100198
+ complimentarySeats: count7.nullable(),
100127
100199
  credits: external_exports.object({
100128
100200
  included: external_exports.number(),
100129
100201
  includedLeft: external_exports.number(),
@@ -100162,14 +100234,14 @@ var tenantVaultDefinition = external_exports.object({
100162
100234
  external_exports.object({
100163
100235
  subject: external_exports.string(),
100164
100236
  most: external_exports.string(),
100165
- maxLeaseSeconds: count6.nullable(),
100237
+ maxLeaseSeconds: count7.nullable(),
100166
100238
  blocked: external_exports.boolean(),
100167
100239
  approveNew: external_exports.boolean(),
100168
100240
  updatedAt: external_exports.iso.datetime()
100169
100241
  })
100170
100242
  ),
100171
100243
  /** Connections waiting for an admin, counted by kind; never a name, label or field. */
100172
- waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count: count6 }))
100244
+ waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count: count7 }))
100173
100245
  });
100174
100246
  var WHATSAPP_INTAKE_KEY_KINDS = ["msg", "edit", "del", "react", "read"];
100175
100247
  var tenantWhatsappInputDefinition = external_exports.object({
@@ -100182,8 +100254,8 @@ var tenantWhatsappOutputDefinition = external_exports.object({
100182
100254
  intake: external_exports.object({
100183
100255
  since: external_exports.iso.datetime(),
100184
100256
  until: external_exports.iso.datetime(),
100185
- total: count6,
100186
- byKind: external_exports.array(external_exports.object({ kind: external_exports.enum([...WHATSAPP_INTAKE_KEY_KINDS, "other"]), count: count6 }))
100257
+ total: count7,
100258
+ byKind: external_exports.array(external_exports.object({ kind: external_exports.enum([...WHATSAPP_INTAKE_KEY_KINDS, "other"]), count: count7 }))
100187
100259
  })
100188
100260
  });
100189
100261
  var wakeTimelineInputDefinition = external_exports.object({
@@ -100200,6 +100272,17 @@ var keyFetchesOutputDefinition = external_exports.object({
100200
100272
  starts: vaultKeyFetchesSchema.shape.starts,
100201
100273
  hours: pageOf(vaultKeyFetchesSchema.shape.hours.element)
100202
100274
  });
100275
+ var judgeMeasureInputDefinition = external_exports.object({
100276
+ from: external_exports.iso.datetime(),
100277
+ to: external_exports.iso.datetime(),
100278
+ limit: external_exports.number().int().min(1).max(500).default(100),
100279
+ cursor: cursorDefinition.optional()
100280
+ }).strict();
100281
+ var judgeMeasureOutputDefinition = external_exports.object({
100282
+ modes: vaultJudgeMeasureSchema.shape.modes,
100283
+ thresholds: vaultJudgeMeasureSchema.shape.thresholds,
100284
+ keys: pageOf(vaultJudgeMeasureSchema.shape.keys.element)
100285
+ });
100203
100286
  var entry = (value) => value;
100204
100287
  var OPS_FUNCTIONS = {
100205
100288
  "workspaces.find": entry({
@@ -100293,6 +100376,13 @@ var OPS_FUNCTIONS = {
100293
100376
  input: keyFetchesInputDefinition,
100294
100377
  output: keyFetchesOutputDefinition
100295
100378
  }),
100379
+ "vault.judge_measure": entry({
100380
+ title: "The vault judge's verdicts against people's answers, with false allows and blocks",
100381
+ scope: "platform",
100382
+ view: "table",
100383
+ input: judgeMeasureInputDefinition,
100384
+ output: judgeMeasureOutputDefinition
100385
+ }),
100296
100386
  "tenant.snapshot": entry({
100297
100387
  title: "One workspace's plan, members, agents and flags, as counts",
100298
100388
  scope: "tenant",
@@ -102504,7 +102594,7 @@ async function vaultSave({ context, args }) {
102504
102594
  // src/services/vault-scrub-commands.service.ts
102505
102595
  function lineOf5(channel) {
102506
102596
  const where = channel.name ? `#${channel.name}` : channel.channelId;
102507
- const found = Object.entries(channel.found).map(([vendor, count7]) => `${vendor} ${count7}`).join(", ");
102597
+ const found = Object.entries(channel.found).map(([vendor, count8]) => `${vendor} ${count8}`).join(", ");
102508
102598
  const kinds = [`held ${channel.held}`, ...found ? [`found: ${found}`] : []].join("; ");
102509
102599
  return `${where} scanned ${channel.scanned} changed ${channel.messages} ${kinds}
102510
102600
  `;
@@ -103494,8 +103584,8 @@ async function roles({ context, args }) {
103494
103584
  const catalogue = await client.get("/api/roles");
103495
103585
  if (args.flags.json) return printJson11(context, catalogue);
103496
103586
  for (const role2 of catalogue) {
103497
- const count7 = `${role2.permissions.length} permissions`;
103498
- context.out(`${role2.label} ${count7} ${role2.description}
103587
+ const count8 = `${role2.permissions.length} permissions`;
103588
+ context.out(`${role2.label} ${count8} ${role2.description}
103499
103589
  `);
103500
103590
  context.out(` ${role2.permissions.join(", ")}
103501
103591
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.109",
3
+ "version": "0.1.110",
4
4
  "description": "The Laze command line: sign in, read and post in chat, and connect your own Claude Code or Codex session as an agent.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",