@lazehq/cli 0.1.62 → 0.1.63

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 +661 -122
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -12,6 +12,19 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
12
12
  if (typeof require !== "undefined") return require.apply(this, arguments);
13
13
  throw Error('Dynamic require of "' + x + '" is not supported');
14
14
  });
15
+ var __glob = (map2) => (path) => {
16
+ var fn = map2[path];
17
+ if (fn) return fn();
18
+ throw new Error("Module not found in bundle: " + path);
19
+ };
20
+ var __esm = (fn, res, err) => function __init() {
21
+ if (err) throw err[0];
22
+ try {
23
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
24
+ } catch (e) {
25
+ throw err = [e], e;
26
+ }
27
+ };
15
28
  var __commonJS = (cb, mod) => function __require2() {
16
29
  try {
17
30
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
@@ -40,6 +53,222 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
40
53
  mod
41
54
  ));
42
55
 
56
+ // ../../packages/time/src/locales/de.json
57
+ var de_exports = {};
58
+ __export(de_exports, {
59
+ default: () => de_default
60
+ });
61
+ var de_default;
62
+ var init_de = __esm({
63
+ "../../packages/time/src/locales/de.json"() {
64
+ de_default = {
65
+ xSeconds: "{count, plural, one {# Sekunde} other {# Sekunden}}",
66
+ lessThanXMinutes: "{count, plural, one {weniger als eine Minute} other {weniger als # Minuten}}",
67
+ xMinutes: "{count, plural, one {# Minute} other {# Minuten}}",
68
+ aboutXHours: "{count, plural, one {etwa # Stunde} other {etwa # Stunden}}",
69
+ xHours: "{count, plural, one {# Stunde} other {# Stunden}}",
70
+ xDays: "{count, plural, one {# Tag} other {# Tage}}",
71
+ aboutXMonths: "{count, plural, one {etwa # Monat} other {etwa # Monate}}",
72
+ xMonths: "{count, plural, one {# Monat} other {# Monate}}",
73
+ aboutXYears: "{count, plural, one {etwa # Jahr} other {etwa # Jahre}}",
74
+ xYears: "{count, plural, one {# Jahr} other {# Jahre}}",
75
+ overXYears: "{count, plural, one {mehr als # Jahr} other {mehr als # Jahre}}",
76
+ almostXYears: "{count, plural, one {fast # Jahr} other {fast # Jahre}}",
77
+ future: "in {distance}",
78
+ past: "vor {distance}",
79
+ "compact.now": "jetzt",
80
+ "compact.minutes": "vor {count} Min.",
81
+ "compact.hours": "vor {count} Std.",
82
+ "compact.days": "vor {count} Tg.",
83
+ "compact.weeks": "vor {count} Wo.",
84
+ "compact.months": "vor {count} Mon.",
85
+ "day.today": "heute um {time}",
86
+ "day.tomorrow": "morgen um {time}",
87
+ "day.other": "{date} um {time}"
88
+ };
89
+ }
90
+ });
91
+
92
+ // ../../packages/time/src/locales/es.json
93
+ var es_exports = {};
94
+ __export(es_exports, {
95
+ default: () => es_default
96
+ });
97
+ var es_default;
98
+ var init_es = __esm({
99
+ "../../packages/time/src/locales/es.json"() {
100
+ es_default = {
101
+ xSeconds: "{count, plural, one {# segundo} other {# segundos}}",
102
+ lessThanXMinutes: "{count, plural, one {menos de un minuto} other {menos de # minutos}}",
103
+ xMinutes: "{count, plural, one {# minuto} other {# minutos}}",
104
+ aboutXHours: "{count, plural, one {aprox. # hora} other {aprox. # horas}}",
105
+ xHours: "{count, plural, one {# hora} other {# horas}}",
106
+ xDays: "{count, plural, one {# d\xEDa} other {# d\xEDas}}",
107
+ aboutXMonths: "{count, plural, one {aprox. # mes} other {aprox. # meses}}",
108
+ xMonths: "{count, plural, one {# mes} other {# meses}}",
109
+ aboutXYears: "{count, plural, one {aprox. # a\xF1o} other {aprox. # a\xF1os}}",
110
+ xYears: "{count, plural, one {# a\xF1o} other {# a\xF1os}}",
111
+ overXYears: "{count, plural, one {m\xE1s de # a\xF1o} other {m\xE1s de # a\xF1os}}",
112
+ almostXYears: "{count, plural, one {casi # a\xF1o} other {casi # a\xF1os}}",
113
+ future: "en {distance}",
114
+ past: "hace {distance}",
115
+ "compact.now": "ahora",
116
+ "compact.minutes": "hace {count} min",
117
+ "compact.hours": "hace {count} h",
118
+ "compact.days": "hace {count} d",
119
+ "compact.weeks": "hace {count} sem",
120
+ "compact.months": "hace {count} m",
121
+ "day.today": "hoy a las {time}",
122
+ "day.tomorrow": "ma\xF1ana a las {time}",
123
+ "day.other": "{date} a las {time}"
124
+ };
125
+ }
126
+ });
127
+
128
+ // ../../packages/time/src/locales/fr.json
129
+ var fr_exports = {};
130
+ __export(fr_exports, {
131
+ default: () => fr_default
132
+ });
133
+ var fr_default;
134
+ var init_fr = __esm({
135
+ "../../packages/time/src/locales/fr.json"() {
136
+ fr_default = {
137
+ xSeconds: "{count, plural, one {# seconde} other {# secondes}}",
138
+ lessThanXMinutes: "{count, plural, one {moins d\u2019une minute} other {moins de # minutes}}",
139
+ xMinutes: "{count, plural, one {# minute} other {# minutes}}",
140
+ aboutXHours: "{count, plural, one {environ # heure} other {environ # heures}}",
141
+ xHours: "{count, plural, one {# heure} other {# heures}}",
142
+ xDays: "{count, plural, one {# jour} other {# jours}}",
143
+ aboutXMonths: "{count, plural, one {environ # mois} other {environ # mois}}",
144
+ xMonths: "{count, plural, one {# mois} other {# mois}}",
145
+ aboutXYears: "{count, plural, one {environ # an} other {environ # ans}}",
146
+ xYears: "{count, plural, one {# an} other {# ans}}",
147
+ overXYears: "{count, plural, one {plus de # an} other {plus de # ans}}",
148
+ almostXYears: "{count, plural, one {presque # an} other {presque # ans}}",
149
+ future: "dans {distance}",
150
+ past: "il y a {distance}",
151
+ "compact.now": "maintenant",
152
+ "compact.minutes": "il y a {count} min",
153
+ "compact.hours": "il y a {count} h",
154
+ "compact.days": "il y a {count} j",
155
+ "compact.weeks": "il y a {count} sem.",
156
+ "compact.months": "il y a {count} mois",
157
+ "day.today": "aujourd\u2019hui \xE0 {time}",
158
+ "day.tomorrow": "demain \xE0 {time}",
159
+ "day.other": "{date} \xE0 {time}"
160
+ };
161
+ }
162
+ });
163
+
164
+ // ../../packages/time/src/locales/it.json
165
+ var it_exports = {};
166
+ __export(it_exports, {
167
+ default: () => it_default
168
+ });
169
+ var it_default;
170
+ var init_it = __esm({
171
+ "../../packages/time/src/locales/it.json"() {
172
+ it_default = {
173
+ xSeconds: "{count, plural, one {# secondo} other {# secondi}}",
174
+ lessThanXMinutes: "{count, plural, one {meno di un minuto} other {meno di # minuti}}",
175
+ xMinutes: "{count, plural, one {# minuto} other {# minuti}}",
176
+ aboutXHours: "{count, plural, one {circa # ora} other {circa # ore}}",
177
+ xHours: "{count, plural, one {# ora} other {# ore}}",
178
+ xDays: "{count, plural, one {# giorno} other {# giorni}}",
179
+ aboutXMonths: "{count, plural, one {circa # mese} other {circa # mesi}}",
180
+ xMonths: "{count, plural, one {# mese} other {# mesi}}",
181
+ aboutXYears: "{count, plural, one {circa # anno} other {circa # anni}}",
182
+ xYears: "{count, plural, one {# anno} other {# anni}}",
183
+ overXYears: "{count, plural, one {pi\xF9 di # anno} other {pi\xF9 di # anni}}",
184
+ almostXYears: "{count, plural, one {quasi # anno} other {quasi # anni}}",
185
+ future: "tra {distance}",
186
+ past: "{distance} fa",
187
+ "compact.now": "ora",
188
+ "compact.minutes": "{count}m fa",
189
+ "compact.hours": "{count}h fa",
190
+ "compact.days": "{count}g fa",
191
+ "compact.weeks": "{count} sett fa",
192
+ "compact.months": "{count} mesi fa",
193
+ "day.today": "oggi alle {time}",
194
+ "day.tomorrow": "domani alle {time}",
195
+ "day.other": "{date} alle {time}"
196
+ };
197
+ }
198
+ });
199
+
200
+ // ../../packages/time/src/locales/nl.json
201
+ var nl_exports = {};
202
+ __export(nl_exports, {
203
+ default: () => nl_default
204
+ });
205
+ var nl_default;
206
+ var init_nl = __esm({
207
+ "../../packages/time/src/locales/nl.json"() {
208
+ nl_default = {
209
+ xSeconds: "{count, plural, one {# seconde} other {# seconden}}",
210
+ lessThanXMinutes: "{count, plural, one {minder dan een minuut} other {minder dan # minuten}}",
211
+ xMinutes: "{count, plural, one {# minuut} other {# minuten}}",
212
+ aboutXHours: "{count, plural, one {ongeveer # uur} other {ongeveer # uur}}",
213
+ xHours: "{count, plural, one {# uur} other {# uur}}",
214
+ xDays: "{count, plural, one {# dag} other {# dagen}}",
215
+ aboutXMonths: "{count, plural, one {ongeveer # maand} other {ongeveer # maanden}}",
216
+ xMonths: "{count, plural, one {# maand} other {# maanden}}",
217
+ aboutXYears: "{count, plural, one {ongeveer # jaar} other {ongeveer # jaar}}",
218
+ xYears: "{count, plural, one {# jaar} other {# jaar}}",
219
+ overXYears: "{count, plural, one {meer dan # jaar} other {meer dan # jaar}}",
220
+ almostXYears: "{count, plural, one {bijna # jaar} other {bijna # jaar}}",
221
+ future: "over {distance}",
222
+ past: "{distance} geleden",
223
+ "compact.now": "nu",
224
+ "compact.minutes": "{count}m geleden",
225
+ "compact.hours": "{count}u geleden",
226
+ "compact.days": "{count}d geleden",
227
+ "compact.weeks": "{count}w geleden",
228
+ "compact.months": "{count}mnd geleden",
229
+ "day.today": "vandaag om {time}",
230
+ "day.tomorrow": "morgen om {time}",
231
+ "day.other": "{date} om {time}"
232
+ };
233
+ }
234
+ });
235
+
236
+ // ../../packages/time/src/locales/pt-BR.json
237
+ var pt_BR_exports = {};
238
+ __export(pt_BR_exports, {
239
+ default: () => pt_BR_default
240
+ });
241
+ var pt_BR_default;
242
+ var init_pt_BR = __esm({
243
+ "../../packages/time/src/locales/pt-BR.json"() {
244
+ pt_BR_default = {
245
+ xSeconds: "{count, plural, one {# segundo} other {# segundos}}",
246
+ lessThanXMinutes: "{count, plural, one {menos de um minuto} other {menos de # minutos}}",
247
+ xMinutes: "{count, plural, one {# minuto} other {# minutos}}",
248
+ aboutXHours: "{count, plural, one {cerca de # hora} other {cerca de # horas}}",
249
+ xHours: "{count, plural, one {# hora} other {# horas}}",
250
+ xDays: "{count, plural, one {# dia} other {# dias}}",
251
+ aboutXMonths: "{count, plural, one {cerca de # m\xEAs} other {cerca de # meses}}",
252
+ xMonths: "{count, plural, one {# m\xEAs} other {# meses}}",
253
+ aboutXYears: "{count, plural, one {cerca de # ano} other {cerca de # anos}}",
254
+ xYears: "{count, plural, one {# ano} other {# anos}}",
255
+ overXYears: "{count, plural, one {mais de # ano} other {mais de # anos}}",
256
+ almostXYears: "{count, plural, one {quase # ano} other {quase # anos}}",
257
+ future: "em {distance}",
258
+ past: "h\xE1 {distance}",
259
+ "compact.now": "agora",
260
+ "compact.minutes": "h\xE1 {count} min",
261
+ "compact.hours": "h\xE1 {count} h",
262
+ "compact.days": "h\xE1 {count} d",
263
+ "compact.weeks": "h\xE1 {count} sem",
264
+ "compact.months": "{count, plural, one {h\xE1 # m\xEAs} other {h\xE1 # meses}}",
265
+ "day.today": "hoje \xE0s {time}",
266
+ "day.tomorrow": "amanh\xE3 \xE0s {time}",
267
+ "day.other": "{date} \xE0s {time}"
268
+ };
269
+ }
270
+ });
271
+
43
272
  // ../../node_modules/.pnpm/ws@8.21.3_bufferutil@4.1.0/node_modules/ws/lib/constants.js
44
273
  var require_constants = __commonJS({
45
274
  "../../node_modules/.pnpm/ws@8.21.3_bufferutil@4.1.0/node_modules/ws/lib/constants.js"(exports, module) {
@@ -2493,7 +2722,7 @@ var require_websocket = __commonJS({
2493
2722
  var tls = __require("tls");
2494
2723
  var { randomBytes: randomBytes4, createHash: createHash6 } = __require("crypto");
2495
2724
  var { Duplex, Readable } = __require("stream");
2496
- var { URL: URL2 } = __require("url");
2725
+ var { URL: URL3 } = __require("url");
2497
2726
  var PerMessageDeflate2 = require_permessage_deflate();
2498
2727
  var Receiver2 = require_receiver();
2499
2728
  var Sender2 = require_sender();
@@ -2994,11 +3223,11 @@ var require_websocket = __commonJS({
2994
3223
  );
2995
3224
  }
2996
3225
  let parsedUrl;
2997
- if (address instanceof URL2) {
3226
+ if (address instanceof URL3) {
2998
3227
  parsedUrl = address;
2999
3228
  } else {
3000
3229
  try {
3001
- parsedUrl = new URL2(address);
3230
+ parsedUrl = new URL3(address);
3002
3231
  } catch {
3003
3232
  throw new SyntaxError(`Invalid URL: ${address}`);
3004
3233
  }
@@ -3135,7 +3364,7 @@ var require_websocket = __commonJS({
3135
3364
  req.abort();
3136
3365
  let addr;
3137
3366
  try {
3138
- addr = new URL2(location, address);
3367
+ addr = new URL3(location, address);
3139
3368
  } catch (e) {
3140
3369
  const err = new SyntaxError(`Invalid URL: ${location}`);
3141
3370
  emitErrorAndClose(websocket, err);
@@ -12320,17 +12549,17 @@ var require_client_h2 = __commonJS({
12320
12549
  for (let n = 0; n < reqHeaders.length; n += 2) {
12321
12550
  const key = reqHeaders[n + 0];
12322
12551
  const val = reqHeaders[n + 1];
12323
- const current2 = headers[key];
12552
+ const current3 = headers[key];
12324
12553
  if (key === "cookie") {
12325
- if (current2 != null) {
12326
- headers[key] = Array.isArray(current2) ? (current2.push(val), current2) : [current2, val];
12554
+ if (current3 != null) {
12555
+ headers[key] = Array.isArray(current3) ? (current3.push(val), current3) : [current3, val];
12327
12556
  } else {
12328
12557
  headers[key] = val;
12329
12558
  }
12330
12559
  continue;
12331
12560
  }
12332
12561
  if (typeof val === "string") {
12333
- headers[key] = current2 ? `${current2}, ${val}` : val;
12562
+ headers[key] = current3 ? `${current3}, ${val}` : val;
12334
12563
  continue;
12335
12564
  }
12336
12565
  for (let i = 0; i < val.length; i++) {
@@ -14930,7 +15159,7 @@ var require_socks5_client = __commonJS({
14930
15159
  var require_socks5_proxy_agent = __commonJS({
14931
15160
  "../../node_modules/.pnpm/undici@8.10.0/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js"(exports, module) {
14932
15161
  "use strict";
14933
- var { URL: URL2 } = __require("node:url");
15162
+ var { URL: URL3 } = __require("node:url");
14934
15163
  var tls;
14935
15164
  var DispatcherBase = require_dispatcher_base();
14936
15165
  var { InvalidArgumentError } = require_errors();
@@ -14961,7 +15190,7 @@ var require_socks5_proxy_agent = __commonJS({
14961
15190
  if (!proxyUrl) {
14962
15191
  throw new InvalidArgumentError("Proxy URL is mandatory");
14963
15192
  }
14964
- const url2 = typeof proxyUrl === "string" ? new URL2(proxyUrl) : proxyUrl;
15193
+ const url2 = typeof proxyUrl === "string" ? new URL3(proxyUrl) : proxyUrl;
14965
15194
  if (url2.protocol !== "socks5:" && url2.protocol !== "socks:") {
14966
15195
  throw new InvalidArgumentError("Proxy URL must use socks5:// or socks:// protocol");
14967
15196
  }
@@ -15064,7 +15293,7 @@ var require_socks5_proxy_agent = __commonJS({
15064
15293
  connections: opts.connections,
15065
15294
  connect: async (connectOpts, callback) => {
15066
15295
  try {
15067
- const url2 = new URL2(origin);
15296
+ const url2 = new URL3(origin);
15068
15297
  const targetHost = url2.hostname;
15069
15298
  const targetPort = parseInt(url2.port) || (url2.protocol === "https:" ? 443 : 80);
15070
15299
  debug("establishing SOCKS5 connection to", targetHost, targetPort);
@@ -20494,14 +20723,14 @@ var require_cache = __commonJS({
20494
20723
  }
20495
20724
  function appendHeader(headers, key, val) {
20496
20725
  const headerName = key.toLowerCase();
20497
- const current2 = headers[headerName];
20726
+ const current3 = headers[headerName];
20498
20727
  const values = Array.isArray(val) ? val : [val];
20499
- if (current2 === void 0) {
20728
+ if (current3 === void 0) {
20500
20729
  headers[headerName] = Array.isArray(val) ? val.slice() : val;
20501
- } else if (Array.isArray(current2)) {
20502
- current2.push(...values);
20730
+ } else if (Array.isArray(current3)) {
20731
+ current3.push(...values);
20503
20732
  } else {
20504
- headers[headerName] = [current2, ...values];
20733
+ headers[headerName] = [current3, ...values];
20505
20734
  }
20506
20735
  }
20507
20736
  function normalizeHeaders(opts) {
@@ -30910,6 +31139,123 @@ function isLazeIdText(text2) {
30910
31139
  );
30911
31140
  }
30912
31141
 
31142
+ // ../../packages/secret-guard/src/detector/url-values.ts
31143
+ var URL2 = /\b[a-z][a-z0-9+.-]{0,30}:\/\/[^\s<>"'`()[\]{}]+/gi;
31144
+ var TRAILING_PUNCTUATION = /[.,;:!?]+$/;
31145
+ var SECRET_WORDS = /* @__PURE__ */ new Set([
31146
+ "token",
31147
+ "secret",
31148
+ "password",
31149
+ "passwd",
31150
+ "pwd",
31151
+ "signature",
31152
+ "credential",
31153
+ "credentials",
31154
+ "apikey",
31155
+ "jwt",
31156
+ "authorization"
31157
+ ]);
31158
+ var SECRET_NAMES = /* @__PURE__ */ new Set(["code", "session", "sid", "auth", "pass", "sig", "key", "otp"]);
31159
+ var KEY_QUALIFIERS = /* @__PURE__ */ new Set(["api", "access", "private", "secret", "signing", "auth", "client"]);
31160
+ function wordsOf(name3) {
31161
+ return name3.replace(/([a-z0-9])([A-Z])/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter((word3) => word3.length > 0);
31162
+ }
31163
+ function isSecretParameterName(name3) {
31164
+ const words = wordsOf(name3);
31165
+ if (words.length === 0) return false;
31166
+ if (words.some((word3) => SECRET_WORDS.has(word3))) return true;
31167
+ if (words.length === 1) return SECRET_NAMES.has(words[0] ?? "");
31168
+ const last = words.at(-1);
31169
+ const before = words.at(-2) ?? "";
31170
+ return last === "key" && KEY_QUALIFIERS.has(before);
31171
+ }
31172
+ function pairsIn({
31173
+ text: text2,
31174
+ start: start2,
31175
+ end,
31176
+ out
31177
+ }) {
31178
+ let at = start2;
31179
+ while (at < end) {
31180
+ const next = text2.indexOf("&", at);
31181
+ const stop3 = next === -1 || next > end ? end : next;
31182
+ const pair2 = text2.slice(at, stop3);
31183
+ const equals = pair2.indexOf("=");
31184
+ if (equals === -1) out.push({ start: at, end: stop3, name: "" });
31185
+ else out.push({ start: at + equals + 1, end: stop3, name: pair2.slice(0, equals) });
31186
+ at = stop3 + 1;
31187
+ }
31188
+ }
31189
+ function segmentsIn({
31190
+ text: text2,
31191
+ start: start2,
31192
+ end,
31193
+ out
31194
+ }) {
31195
+ let segment = start2;
31196
+ while (segment < end) {
31197
+ const next = text2.indexOf("/", segment);
31198
+ const stop3 = next === -1 || next > end ? end : next;
31199
+ if (stop3 > segment) out.push({ start: segment, end: stop3, name: "" });
31200
+ segment = stop3 + 1;
31201
+ }
31202
+ }
31203
+ function valuesOfUrl({ text: text2, start: start2, end }) {
31204
+ const out = [];
31205
+ const hash2 = text2.indexOf("#", start2);
31206
+ const fragmentAt = hash2 === -1 || hash2 >= end ? end : hash2;
31207
+ const question = text2.indexOf("?", start2);
31208
+ const queryAt = question === -1 || question >= fragmentAt ? fragmentAt : question;
31209
+ const authorityAt = text2.indexOf("://", start2) + 3;
31210
+ const slash = text2.indexOf("/", authorityAt);
31211
+ const pathAt = slash === -1 || slash >= queryAt ? queryAt : slash + 1;
31212
+ segmentsIn({ text: text2, start: pathAt, end: queryAt, out });
31213
+ if (queryAt < fragmentAt) pairsIn({ text: text2, start: queryAt + 1, end: fragmentAt, out });
31214
+ if (fragmentAt < end) {
31215
+ const fragment = text2.slice(fragmentAt + 1, end);
31216
+ if (fragment.includes("=")) pairsIn({ text: text2, start: fragmentAt + 1, end, out });
31217
+ else out.push({ start: fragmentAt + 1, end, name: "" });
31218
+ }
31219
+ return out.filter((value) => value.end > value.start);
31220
+ }
31221
+ function urlValuesIn(text2) {
31222
+ if (!text2.includes("://")) return [];
31223
+ const out = [];
31224
+ for (const match of text2.matchAll(URL2)) {
31225
+ const trimmed = match[0].replace(TRAILING_PUNCTUATION, "");
31226
+ out.push(...valuesOfUrl({ text: text2, start: match.index, end: match.index + trimmed.length }));
31227
+ }
31228
+ return out;
31229
+ }
31230
+ function urlValueAt({
31231
+ values,
31232
+ offset
31233
+ }) {
31234
+ return values.find((value) => value.start <= offset && offset < value.end);
31235
+ }
31236
+ var CREDENTIAL_ID_PREFIXES = new Set(
31237
+ "key api apikey tok token secret sec pat auth sess session pass pwd cred sk pk rk".split(" ")
31238
+ );
31239
+ var RECORD_ID = /^([a-z][a-z0-9]{2,30})_[0-9A-Za-z]{16,64}$/;
31240
+ function isRecordIdValue(value) {
31241
+ const prefix = RECORD_ID.exec(value)?.[1];
31242
+ return prefix !== void 0 && !CREDENTIAL_ID_PREFIXES.has(prefix);
31243
+ }
31244
+ function isPlainRecordId({ text: text2, at }) {
31245
+ return !isSecretParameterName(at.name) && isRecordIdValue(text2.slice(at.start, at.end));
31246
+ }
31247
+ function isSecretParameterValue(value) {
31248
+ if (value.length < 8) return false;
31249
+ if (/^(?:true|false|null|undefined|none)$/i.test(value)) return false;
31250
+ if (/^[a-z]+(?:[-_.][a-z]+)*$/.test(value) && value.length < 20) return false;
31251
+ if (/^[a-z]+(?:[-_.][a-z]+){2,}$/.test(value)) return false;
31252
+ return true;
31253
+ }
31254
+ function parameterSecretName(name3) {
31255
+ const upper = wordsOf(name3).join("_").toUpperCase().replace(/^X_AMZ_SECURITY_TOKEN$/, "AWS_SESSION_TOKEN").replace(/^X_AMZ_/, "AWS_").replace(/^X_GOOG_/, "GOOGLE_");
31256
+ return /^[A-Z_][A-Z0-9_]*$/.test(upper) ? upper : "SECRET";
31257
+ }
31258
+
30913
31259
  // ../../packages/secret-guard/src/detector/secret-detector.ts
30914
31260
  var REDACTION_MARKER = "[SECRET]";
30915
31261
  var MAX_SCAN_LENGTH = 25e4;
@@ -31186,7 +31532,11 @@ var RULES = [
31186
31532
  accept: (match) => /[\s:="'`]/.test(groupOf(match, 2)) && isNamedKeyValue(groupOf(match, 3))
31187
31533
  }
31188
31534
  ];
31189
- var SECRET_RULE_IDS = RULES.map((rule) => rule.id);
31535
+ var URL_PARAMETER_RULE_ID = "url_parameter_secret";
31536
+ var SECRET_RULE_IDS = [
31537
+ ...RULES.map((rule) => rule.id),
31538
+ URL_PARAMETER_RULE_ID
31539
+ ];
31190
31540
  function keptLengthAtBoundary(match) {
31191
31541
  const at = match.search(/["'`]/);
31192
31542
  return at === -1 ? match.length : at;
@@ -31466,17 +31816,58 @@ function matchSlice({
31466
31816
  const matches = rawMatches(rule, text2);
31467
31817
  found.push(...matches.filter((match) => !isLazeIdText(withExtension({ text: text2, match }))));
31468
31818
  }
31469
- return withoutOverlaps(found).map((match) => {
31819
+ const urlValues = urlValuesIn(text2);
31820
+ const placed = urlValues.length === 0 ? found : inLinkValues({ text: text2, found, urlValues, ruleIds });
31821
+ return withoutOverlaps(placed).map((match) => {
31470
31822
  const value = text2.slice(match.start, match.end);
31471
31823
  return {
31472
31824
  value,
31473
31825
  start: match.start,
31474
31826
  end: match.end,
31475
31827
  kind: match.ruleId,
31476
- suggestedName: suggestedName({ kind: match.ruleId, value, text: text2, start: match.start })
31828
+ suggestedName: match.parameter === void 0 ? suggestedName({ kind: match.ruleId, value, text: text2, start: match.start }) : parameterSecretName(match.parameter)
31477
31829
  };
31478
31830
  });
31479
31831
  }
31832
+ var SHAPE_RULE_IDS = /* @__PURE__ */ new Set(["shaped_api_key", "named_key", "sensitive_assignment"]);
31833
+ function inLinkValues({
31834
+ text: text2,
31835
+ found,
31836
+ urlValues,
31837
+ ruleIds
31838
+ }) {
31839
+ const out = found.flatMap((match) => placedInLink({ text: text2, match, urlValues }));
31840
+ if (ruleIds && !ruleIds.has(URL_PARAMETER_RULE_ID)) return out;
31841
+ return [...out, ...secretParameterValues({ text: text2, urlValues })];
31842
+ }
31843
+ function placedInLink({
31844
+ text: text2,
31845
+ match,
31846
+ urlValues
31847
+ }) {
31848
+ const at = urlValueAt({ values: urlValues, offset: match.start });
31849
+ if (!at) return [match];
31850
+ const shape = SHAPE_RULE_IDS.has(match.ruleId);
31851
+ if (shape && isPlainRecordId({ text: text2, at })) return [];
31852
+ const secretName = isSecretParameterName(at.name);
31853
+ const named = secretName && shape ? { parameter: at.name } : {};
31854
+ return [
31855
+ { ...match, ...named, spanStart: at.start, start: at.start, end: at.end, spanEnd: at.end }
31856
+ ];
31857
+ }
31858
+ function secretParameterValues({
31859
+ text: text2,
31860
+ urlValues
31861
+ }) {
31862
+ return urlValues.filter((at) => isSecretParameterName(at.name)).filter((at) => isSecretParameterValue(text2.slice(at.start, at.end))).map((at) => ({
31863
+ ruleId: URL_PARAMETER_RULE_ID,
31864
+ spanStart: at.start,
31865
+ start: at.start,
31866
+ end: at.end,
31867
+ spanEnd: at.end,
31868
+ parameter: at.name
31869
+ }));
31870
+ }
31480
31871
  function withExtension({ text: text2, match }) {
31481
31872
  const extension2 = /^\.[A-Za-z0-9]{1,8}(?![A-Za-z0-9])/.exec(text2.slice(match.end))?.[0] ?? "";
31482
31873
  return text2.slice(match.start, match.end) + extension2;
@@ -31499,13 +31890,14 @@ function redactDetectedSecrets({ text: text2 }) {
31499
31890
 
31500
31891
  // ../../packages/secret-guard/src/detector/one-time-links.ts
31501
31892
  var URL_PATTERN = /https?:\/\/[^\s<>"'`)\]]+/g;
31502
- var ONE_TIME_WORDS = /(?:^|[^a-z])(?:magic|verify|verification|confirm|login|log-in|signin|sign-in|sign_in|auth|2fa|mfa|otp|token|code|reset|invite|passwordless|one-time|onetime|callback)(?:$|[^a-z])/i;
31893
+ var ONE_TIME_WORDS = /(?:^|[^a-z])(?:magic|verify|verification|confirm|login|log-in|signin|sign-in|sign_in|2fa|mfa|otp|reset|invite|passwordless|one-time|onetime|callback)(?:$|[^a-z])/i;
31503
31894
  var KEPT_IN_LINKS = /* @__PURE__ */ new Set([
31504
31895
  ...VENDOR_FORMAT_RULE_IDS,
31505
31896
  "aws_access_key_id",
31506
31897
  "url_credentials",
31507
31898
  "pem_private_key"
31508
31899
  ]);
31900
+ var NEVER_ONE_TIME = /(?:PASSWORD|PASSWD|PWD|SECRET)$/;
31509
31901
  function isOneTime(url2) {
31510
31902
  try {
31511
31903
  const parsed = new URL(url2);
@@ -31528,7 +31920,7 @@ function withoutOneTimeLinkTokens({
31528
31920
  const links = oneTimeLinksIn({ text: text2 });
31529
31921
  if (links.length === 0) return [...secrets];
31530
31922
  return secrets.filter(
31531
- (secret) => KEPT_IN_LINKS.has(secret.kind) || !links.some((link2) => secret.start >= link2.start && secret.end <= link2.end)
31923
+ (secret) => KEPT_IN_LINKS.has(secret.kind) || NEVER_ONE_TIME.test(secret.suggestedName) || !links.some((link2) => secret.start >= link2.start && secret.end <= link2.end)
31532
31924
  );
31533
31925
  }
31534
31926
 
@@ -31569,17 +31961,17 @@ function applySavedProposals({
31569
31961
  saved: saved3
31570
31962
  }) {
31571
31963
  return saved3.reduce(
31572
- (current2, proposal) => replaceWithVaultReference({ text: current2, value: proposal.value, name: proposal.name }),
31964
+ (current3, proposal) => replaceWithVaultReference({ text: current3, value: proposal.value, name: proposal.name }),
31573
31965
  text2
31574
31966
  );
31575
31967
  }
31576
31968
 
31577
31969
  // ../../packages/secret-guard/src/fields/identifier-fields.ts
31578
31970
  var IDENTIFIER_WORDS = /(?:^|[^A-Z])(?:USER|USERNAME|USER_NAME|EMAIL|E_MAIL|MAIL|LOGIN|ACCOUNT)(?:$|[^A-Z])/;
31579
- var SECRET_WORDS = /PASS|SECRET|TOKEN|KEY|PIN|OTP|CREDENTIAL|PRIVATE/;
31971
+ var SECRET_WORDS2 = /PASS|SECRET|TOKEN|KEY|PIN|OTP|CREDENTIAL|PRIVATE/;
31580
31972
  function isIdentifierField({ name: name3 }) {
31581
31973
  const upper = name3.toUpperCase();
31582
- return IDENTIFIER_WORDS.test(upper) && !SECRET_WORDS.test(upper);
31974
+ return IDENTIFIER_WORDS.test(upper) && !SECRET_WORDS2.test(upper);
31583
31975
  }
31584
31976
  function secretValuesOf({
31585
31977
  fields
@@ -35533,6 +35925,88 @@ function nowInstant() {
35533
35925
  // ../../node_modules/.pnpm/croner@10.0.1/node_modules/croner/dist/croner.js
35534
35926
  var W = 30 * 1e3;
35535
35927
 
35928
+ // ../../packages/i18n/src/locales.ts
35929
+ var DEFAULT_LOCALE = "en";
35930
+
35931
+ // ../../packages/i18n/src/messages.ts
35932
+ var registry = /* @__PURE__ */ new Map();
35933
+ function defineMessages({
35934
+ namespace,
35935
+ en: en2,
35936
+ load
35937
+ }) {
35938
+ const messages = {
35939
+ namespace,
35940
+ en: en2,
35941
+ load: async (locale) => {
35942
+ if (locale === DEFAULT_LOCALE) return {};
35943
+ const loaded = await load(locale).catch(() => ({}));
35944
+ return translationsOf(loaded);
35945
+ }
35946
+ };
35947
+ registry.set(namespace, { namespace, load: messages.load });
35948
+ return messages;
35949
+ }
35950
+ function translationsOf(loaded) {
35951
+ const value = loaded && typeof loaded === "object" && "default" in loaded ? loaded.default : loaded;
35952
+ if (!value || typeof value !== "object") return {};
35953
+ const out = {};
35954
+ for (const [key, text2] of Object.entries(value)) {
35955
+ if (typeof text2 === "string") out[key] = text2;
35956
+ }
35957
+ return out;
35958
+ }
35959
+
35960
+ // ../../packages/i18n/src/runtime.ts
35961
+ var current = DEFAULT_LOCALE;
35962
+ function currentLocale() {
35963
+ return current;
35964
+ }
35965
+
35966
+ // ../../packages/time/src/locales/en.ts
35967
+ var en = {
35968
+ xSeconds: "{count, plural, one {# second} other {# seconds}}",
35969
+ lessThanXMinutes: "{count, plural, one {less than a minute} other {less than # minutes}}",
35970
+ xMinutes: "{count, plural, one {# minute} other {# minutes}}",
35971
+ aboutXHours: "{count, plural, one {about # hour} other {about # hours}}",
35972
+ xHours: "{count, plural, one {# hour} other {# hours}}",
35973
+ xDays: "{count, plural, one {# day} other {# days}}",
35974
+ aboutXMonths: "{count, plural, one {about # month} other {about # months}}",
35975
+ xMonths: "{count, plural, one {# month} other {# months}}",
35976
+ aboutXYears: "{count, plural, one {about # year} other {about # years}}",
35977
+ xYears: "{count, plural, one {# year} other {# years}}",
35978
+ overXYears: "{count, plural, one {over # year} other {over # years}}",
35979
+ almostXYears: "{count, plural, one {almost # year} other {almost # years}}",
35980
+ future: "in {distance}",
35981
+ past: "{distance} ago",
35982
+ "compact.now": "now",
35983
+ "compact.minutes": "{count}m ago",
35984
+ "compact.hours": "{count}h ago",
35985
+ "compact.days": "{count}d ago",
35986
+ "compact.weeks": "{count}w ago",
35987
+ "compact.months": "{count}mo ago",
35988
+ "day.today": "today at {time}",
35989
+ "day.tomorrow": "tomorrow at {time}",
35990
+ "day.other": "{date} at {time}"
35991
+ };
35992
+
35993
+ // import("./locales/**/*.json") in ../../packages/time/src/messages.ts
35994
+ var globImport_locales_json = __glob({
35995
+ "./locales/de.json": () => Promise.resolve().then(() => (init_de(), de_exports)),
35996
+ "./locales/es.json": () => Promise.resolve().then(() => (init_es(), es_exports)),
35997
+ "./locales/fr.json": () => Promise.resolve().then(() => (init_fr(), fr_exports)),
35998
+ "./locales/it.json": () => Promise.resolve().then(() => (init_it(), it_exports)),
35999
+ "./locales/nl.json": () => Promise.resolve().then(() => (init_nl(), nl_exports)),
36000
+ "./locales/pt-BR.json": () => Promise.resolve().then(() => (init_pt_BR(), pt_BR_exports))
36001
+ });
36002
+
36003
+ // ../../packages/time/src/messages.ts
36004
+ var timeMessages = defineMessages({
36005
+ namespace: "time",
36006
+ en,
36007
+ load: (locale) => globImport_locales_json(`./locales/${locale}.json`)
36008
+ });
36009
+
35536
36010
  // ../../packages/time/src/format.ts
35537
36011
  var MONTHS_SHORT = [
35538
36012
  "Jan",
@@ -35564,12 +36038,26 @@ var MONTHS_LONG = [
35564
36038
  "December"
35565
36039
  ];
35566
36040
  var pad = (value, width) => String(value).padStart(width, "0");
36041
+ function nameOf({
36042
+ fields,
36043
+ options,
36044
+ fallback
36045
+ }) {
36046
+ const locale = currentLocale();
36047
+ if (locale === "en") return fallback;
36048
+ const noon = Date.UTC(fields.year, fields.month - 1, fields.day, 12);
36049
+ return new Intl.DateTimeFormat(locale, { ...options, timeZone: "UTC" }).format(noon);
36050
+ }
35567
36051
  var TOKENS = {
35568
36052
  yyyy: (f) => pad(f.year, 4),
35569
- EEE: (f) => WEEKDAYS_SHORT[f.weekday - 1] ?? "",
36053
+ EEE: (f) => nameOf({
36054
+ fields: f,
36055
+ options: { weekday: "short" },
36056
+ fallback: WEEKDAYS_SHORT[f.weekday - 1] ?? ""
36057
+ }),
35570
36058
  yy: (f) => pad(f.year % 100, 2),
35571
- MMMM: (f) => MONTHS_LONG[f.month - 1] ?? "",
35572
- MMM: (f) => MONTHS_SHORT[f.month - 1] ?? "",
36059
+ MMMM: (f) => nameOf({ fields: f, options: { month: "long" }, fallback: MONTHS_LONG[f.month - 1] ?? "" }),
36060
+ MMM: (f) => nameOf({ fields: f, options: { month: "short" }, fallback: MONTHS_SHORT[f.month - 1] ?? "" }),
35573
36061
  MM: (f) => pad(f.month, 2),
35574
36062
  M: (f) => String(f.month),
35575
36063
  dd: (f) => pad(f.day, 2),
@@ -35774,8 +36262,8 @@ var ConfigStore = class _ConfigStore {
35774
36262
  Object.entries(config2.sessions ?? {}).filter(([, bound]) => bound !== name3)
35775
36263
  );
35776
36264
  const usable = Object.keys(profiles2).find((key) => profiles2[key]?.kind !== "request");
35777
- const current2 = config2.current === name3 ? usable : config2.current;
35778
- await this.write({ current: current2, profiles: profiles2, bindings, sessions });
36265
+ const current3 = config2.current === name3 ? usable : config2.current;
36266
+ await this.write({ current: current3, profiles: profiles2, bindings, sessions });
35779
36267
  return true;
35780
36268
  }
35781
36269
  };
@@ -35883,7 +36371,7 @@ function flagText({
35883
36371
  }
35884
36372
 
35885
36373
  // src/rules/cli-version.rules.ts
35886
- var STAMPED = "0.1.62";
36374
+ var STAMPED = "0.1.63";
35887
36375
  function cliVersionOf({ stamped = STAMPED } = {}) {
35888
36376
  return stamped.startsWith("__") ? "dev" : stamped;
35889
36377
  }
@@ -36118,7 +36606,7 @@ __export(external_exports, {
36118
36606
  refine: () => refine,
36119
36607
  regex: () => _regex,
36120
36608
  regexes: () => regexes_exports,
36121
- registry: () => registry,
36609
+ registry: () => registry2,
36122
36610
  safeDecode: () => safeDecode2,
36123
36611
  safeDecodeAsync: () => safeDecodeAsync2,
36124
36612
  safeEncode: () => safeEncode2,
@@ -36461,7 +36949,7 @@ __export(core_exports2, {
36461
36949
  process: () => processSchema,
36462
36950
  processSchema: () => processSchema,
36463
36951
  regexes: () => regexes_exports,
36464
- registry: () => registry,
36952
+ registry: () => registry2,
36465
36953
  safeDecode: () => safeDecode,
36466
36954
  safeDecodeAsync: () => safeDecodeAsync,
36467
36955
  safeEncode: () => safeEncode,
@@ -41200,14 +41688,14 @@ __export(locales_exports, {
41200
41688
  ckb: () => ckb_default,
41201
41689
  cs: () => cs_default,
41202
41690
  da: () => da_default,
41203
- de: () => de_default,
41691
+ de: () => de_default2,
41204
41692
  el: () => el_default,
41205
41693
  en: () => en_default,
41206
41694
  eo: () => eo_default,
41207
- es: () => es_default,
41695
+ es: () => es_default2,
41208
41696
  fa: () => fa_default,
41209
41697
  fi: () => fi_default,
41210
- fr: () => fr_default,
41698
+ fr: () => fr_default2,
41211
41699
  frCA: () => fr_CA_default,
41212
41700
  gu: () => gu_default,
41213
41701
  he: () => he_default,
@@ -41217,7 +41705,7 @@ __export(locales_exports, {
41217
41705
  hy: () => hy_default,
41218
41706
  id: () => id_default,
41219
41707
  is: () => is_default,
41220
- it: () => it_default,
41708
+ it: () => it_default2,
41221
41709
  ja: () => ja_default,
41222
41710
  ka: () => ka_default,
41223
41711
  kh: () => kh_default,
@@ -41228,14 +41716,14 @@ __export(locales_exports, {
41228
41716
  mk: () => mk_default,
41229
41717
  ms: () => ms_default,
41230
41718
  ne: () => ne_default,
41231
- nl: () => nl_default,
41719
+ nl: () => nl_default2,
41232
41720
  nn: () => nn_default,
41233
41721
  no: () => no_default,
41234
41722
  ota: () => ota_default,
41235
41723
  pl: () => pl_default,
41236
41724
  ps: () => ps_default,
41237
41725
  pt: () => pt_default,
41238
- ptBR: () => pt_BR_default,
41726
+ ptBR: () => pt_BR_default2,
41239
41727
  ro: () => ro_default,
41240
41728
  ru: () => ru_default,
41241
41729
  sk: () => sk_default,
@@ -42481,7 +42969,7 @@ var error10 = () => {
42481
42969
  }
42482
42970
  };
42483
42971
  };
42484
- function de_default() {
42972
+ function de_default2() {
42485
42973
  return {
42486
42974
  localeError: error10()
42487
42975
  };
@@ -42971,7 +43459,7 @@ var error14 = () => {
42971
43459
  }
42972
43460
  };
42973
43461
  };
42974
- function es_default() {
43462
+ function es_default2() {
42975
43463
  return {
42976
43464
  localeError: error14()
42977
43465
  };
@@ -43339,7 +43827,7 @@ var error17 = () => {
43339
43827
  }
43340
43828
  };
43341
43829
  };
43342
- function fr_default() {
43830
+ function fr_default2() {
43343
43831
  return {
43344
43832
  localeError: error17()
43345
43833
  };
@@ -44621,7 +45109,7 @@ var error27 = () => {
44621
45109
  }
44622
45110
  };
44623
45111
  };
44624
- function it_default() {
45112
+ function it_default2() {
44625
45113
  return {
44626
45114
  localeError: error27()
44627
45115
  };
@@ -45870,7 +46358,7 @@ var error37 = () => {
45870
46358
  }
45871
46359
  };
45872
46360
  };
45873
- function nl_default() {
46361
+ function nl_default2() {
45874
46362
  return {
45875
46363
  localeError: error37()
45876
46364
  };
@@ -46737,7 +47225,7 @@ var error44 = () => {
46737
47225
  }
46738
47226
  };
46739
47227
  };
46740
- function pt_BR_default() {
47228
+ function pt_BR_default2() {
46741
47229
  return {
46742
47230
  localeError: error44()
46743
47231
  };
@@ -48799,10 +49287,10 @@ var $ZodRegistry = class {
48799
49287
  return this._map.has(schema);
48800
49288
  }
48801
49289
  };
48802
- function registry() {
49290
+ function registry2() {
48803
49291
  return new $ZodRegistry();
48804
49292
  }
48805
- (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
49293
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry2());
48806
49294
  var globalRegistry = globalThis.__zod_globalRegistry;
48807
49295
 
48808
49296
  // ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/compile.js
@@ -52711,21 +53199,21 @@ var allProcessors = {
52711
53199
  };
52712
53200
  function toJSONSchema(input2, params) {
52713
53201
  if ("_idmap" in input2) {
52714
- const registry3 = input2;
53202
+ const registry4 = input2;
52715
53203
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
52716
53204
  const defs = {};
52717
- for (const entry of registry3._idmap.entries()) {
53205
+ for (const entry of registry4._idmap.entries()) {
52718
53206
  const [_, schema] = entry;
52719
53207
  processSchema(schema, ctx2);
52720
53208
  }
52721
53209
  const schemas = {};
52722
53210
  const external2 = {
52723
- registry: registry3,
53211
+ registry: registry4,
52724
53212
  uri: params?.uri,
52725
53213
  defs
52726
53214
  };
52727
53215
  ctx2.external = external2;
52728
- for (const entry of registry3._idmap.entries()) {
53216
+ for (const entry of registry4._idmap.entries()) {
52729
53217
  const [key, schema] = entry;
52730
53218
  extractDefs(ctx2, schema);
52731
53219
  assignProp(schemas, key, finalize(ctx2, schema));
@@ -56711,7 +57199,7 @@ var TRANSIENT_REFUSAL_CODES = [
56711
57199
  var TRANSIENT_CODES = new Set(TRANSIENT_REFUSAL_CODES);
56712
57200
 
56713
57201
  // ../../packages/handled-error/src/remediation.ts
56714
- var registry2 = {
57202
+ var registry3 = {
56715
57203
  // ---- request boundary ----
56716
57204
  validation_error: {
56717
57205
  tips: [
@@ -57643,9 +58131,9 @@ var registry2 = {
57643
58131
  ]
57644
58132
  }
57645
58133
  };
57646
- var REMEDIATION_CODES = Object.keys(registry2);
58134
+ var REMEDIATION_CODES = Object.keys(registry3);
57647
58135
  var REMEDIATION_DOC_PATHS = Object.values(
57648
- registry2
58136
+ registry3
57649
58137
  ).map((entry) => entry.docsPath).filter((p) => p !== void 0);
57650
58138
 
57651
58139
  // ../../packages/handled-error/src/serialized-handled-error.ts
@@ -57753,6 +58241,7 @@ var FEATURE_NAMES = [
57753
58241
  "openclaw",
57754
58242
  "ops",
57755
58243
  "role",
58244
+ "rum",
57756
58245
  "schedule",
57757
58246
  "skill",
57758
58247
  "slack",
@@ -60296,13 +60785,25 @@ var digestItemSchemaDefinition = external_exports.object({
60296
60785
  count: external_exports.number().int().positive().optional()
60297
60786
  });
60298
60787
  var DIGEST_LISTED = 10;
60788
+ var localeSchema = external_exports.string().trim().min(1).max(35).optional();
60299
60789
  var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template", [
60300
- external_exports.object({ template: external_exports.literal("magicLink"), to: external_exports.email(), url: external_exports.url() }),
60301
- external_exports.object({ template: external_exports.literal("verifyEmail"), to: external_exports.email(), url: external_exports.url() }),
60302
- external_exports.object({ template: external_exports.literal("resetPassword"), to: external_exports.email(), url: external_exports.url() }),
60790
+ external_exports.object({ template: external_exports.literal("magicLink"), to: external_exports.email(), url: external_exports.url(), locale: localeSchema }),
60791
+ external_exports.object({
60792
+ template: external_exports.literal("verifyEmail"),
60793
+ to: external_exports.email(),
60794
+ url: external_exports.url(),
60795
+ locale: localeSchema
60796
+ }),
60797
+ external_exports.object({
60798
+ template: external_exports.literal("resetPassword"),
60799
+ to: external_exports.email(),
60800
+ url: external_exports.url(),
60801
+ locale: localeSchema
60802
+ }),
60303
60803
  external_exports.object({
60304
60804
  template: external_exports.literal("workspaceInvite"),
60305
60805
  to: external_exports.email(),
60806
+ locale: localeSchema,
60306
60807
  url: external_exports.url(),
60307
60808
  workspaceName: external_exports.string().min(1),
60308
60809
  inviterName: external_exports.string().min(1)
@@ -60311,6 +60812,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60311
60812
  external_exports.object({
60312
60813
  template: external_exports.literal("workspaceAccess"),
60313
60814
  to: external_exports.email(),
60815
+ locale: localeSchema,
60314
60816
  url: external_exports.url(),
60315
60817
  subject: external_exports.string().min(1),
60316
60818
  heading: external_exports.string().min(1),
@@ -60321,6 +60823,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60321
60823
  external_exports.object({
60322
60824
  template: external_exports.literal("appAvailable"),
60323
60825
  to: external_exports.email(),
60826
+ locale: localeSchema,
60324
60827
  url: external_exports.url(),
60325
60828
  platformName: external_exports.string().min(1).max(40)
60326
60829
  }),
@@ -60328,6 +60831,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60328
60831
  external_exports.object({
60329
60832
  template: external_exports.literal("appUserCode"),
60330
60833
  to: external_exports.email(),
60834
+ locale: localeSchema,
60331
60835
  /** The app's address, where the code is typed. */
60332
60836
  url: external_exports.url(),
60333
60837
  appName: external_exports.string().min(1).max(120),
@@ -60337,6 +60841,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60337
60841
  external_exports.object({
60338
60842
  template: external_exports.literal("awayDigest"),
60339
60843
  to: external_exports.email(),
60844
+ locale: localeSchema,
60340
60845
  /** Where "Open Laze" goes. */
60341
60846
  url: external_exports.url(),
60342
60847
  unsubscribeUrl: external_exports.url(),
@@ -60348,6 +60853,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60348
60853
  external_exports.object({
60349
60854
  template: external_exports.literal("dailyDigest"),
60350
60855
  to: external_exports.email(),
60856
+ locale: localeSchema,
60351
60857
  /** The workspace, where "Open Laze" goes. */
60352
60858
  url: external_exports.url(),
60353
60859
  /** Settings, Notifications, where the digest is set. */
@@ -60534,6 +61040,7 @@ var desktopPublicationSchemaDefinition = external_exports.object({
60534
61040
  var desktopPublicationSchema = desktopPublicationSchemaDefinition;
60535
61041
  var quietReasonSchema = external_exports.enum(["paused", "hours"]);
60536
61042
  var personTimeZoneSchemaDefinition = external_exports.object({ userId: userIdSchema, timeZone: external_exports.string() });
61043
+ var personLanguageSchemaDefinition = external_exports.object({ userId: userIdSchema, language: external_exports.string() });
60537
61044
  var quietPersonSchemaDefinition = external_exports.object({
60538
61045
  userId: userIdSchema,
60539
61046
  reason: quietReasonSchema,
@@ -60547,7 +61054,9 @@ var workspaceInputSchema2 = external_exports.object({ workspaceId: workspaceIdSc
60547
61054
  var heartbeatInputSchemaDefinition = external_exports.object({
60548
61055
  workspaceId: workspaceIdSchema2,
60549
61056
  /** The browser's IANA time zone; the person's zone follows it until they pick one. */
60550
- timeZone: external_exports.string().min(1).max(64).optional()
61057
+ timeZone: external_exports.string().min(1).max(64).optional(),
61058
+ /** The language the person's screens read in (BCP 47); their mails and pushes follow it. */
61059
+ language: external_exports.string().trim().min(1).max(35).optional()
60551
61060
  });
60552
61061
  var heartbeatInputSchema = heartbeatInputSchemaDefinition;
60553
61062
  var dailyDigestInputSchemaDefinition = external_exports.object({
@@ -61058,6 +61567,11 @@ var SLACK_PERSON_TOKEN = /<@slack:([A-Z0-9]{1,32})\|([^<>|\n]{1,80})>/g;
61058
61567
  function withSlackPeopleAsNames(text2) {
61059
61568
  return text2.replace(SLACK_PERSON_TOKEN, (_token, _id, name3) => `@${name3}`);
61060
61569
  }
61570
+ var SLACK_DATE_TOKEN = /<!date\^[^<>|\n]*\|([^<>\n]*)>/g;
61571
+ var ANGLE_LINK = /<((?:https?|mailto):[^<>|\s]+)(?:\|([^<>\n]+))?>/g;
61572
+ function withSlackMarkupAsText(text2) {
61573
+ return withSlackPeopleAsNames(text2).replace(SLACK_DATE_TOKEN, "$1").replace(ANGLE_LINK, (_link, address, label3) => label3 ?? address);
61574
+ }
61061
61575
 
61062
61576
  // ../../modules/vault/contract/src/resolution-note.ts
61063
61577
  var RESOLUTION_NOTE_INPUT_MAX_CHARS = 4e3;
@@ -61361,7 +61875,9 @@ var vaultReauthChallengeSchemaDefinition = external_exports.object({
61361
61875
  devices: external_exports.boolean(),
61362
61876
  /** Signs in with Google; Google alone cannot prove presence here yet. */
61363
61877
  google: external_exports.boolean()
61364
- })
61878
+ }),
61879
+ /** Her active devices in every workspace, any of which signs the challenge. */
61880
+ devices: external_exports.array(vaultDeviceSchema).optional()
61365
61881
  });
61366
61882
  var vaultReauthChallengeSchema = vaultReauthChallengeSchemaDefinition;
61367
61883
  var confirmVaultReauthInputSchemaDefinition = external_exports.object({
@@ -61621,6 +62137,20 @@ var approvedVaultMachineKeySchemaDefinition = external_exports.object({
61621
62137
  recheckDueAt: external_exports.string().nullable()
61622
62138
  });
61623
62139
  var approvedVaultMachineKeySchema = approvedVaultMachineKeySchemaDefinition;
62140
+ var vaultReferenceHolderInputSchemaDefinition = external_exports.object({
62141
+ workspaceId: external_exports.string().min(1),
62142
+ name: external_exports.string().min(1).max(200)
62143
+ });
62144
+ var vaultReferenceHolderInputSchema = vaultReferenceHolderInputSchemaDefinition;
62145
+ var vaultReferenceHolderSchemaDefinition = external_exports.object({
62146
+ holder: external_exports.discriminatedUnion("kind", [
62147
+ external_exports.object({ kind: external_exports.literal("person"), userId: external_exports.string().min(1) }),
62148
+ external_exports.object({ kind: external_exports.literal("workspace") }),
62149
+ external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().min(1) }),
62150
+ external_exports.object({ kind: external_exports.literal("unknown") })
62151
+ ])
62152
+ });
62153
+ var vaultReferenceHolderSchema = vaultReferenceHolderSchemaDefinition;
61624
62154
  var vaultReadLockSchemaDefinition = external_exports.object({
61625
62155
  locked: external_exports.boolean(),
61626
62156
  /** The CLI key whose burst locked them, as it named itself; null when not locked. */
@@ -62032,6 +62562,10 @@ var copyConnectionValueInputSchemaDefinition = external_exports.object({
62032
62562
  });
62033
62563
  var VaultApi = moduleApi()("vault");
62034
62564
  var workspaceInput = external_exports.object({ workspaceId: external_exports.string().min(1) });
62565
+ var listVaultDevicesInput = external_exports.object({
62566
+ ...workspaceInput.shape,
62567
+ everywhere: external_exports.boolean().optional()
62568
+ });
62035
62569
  var connectionInput = external_exports.object({
62036
62570
  workspaceId: external_exports.string().min(1),
62037
62571
  connectionId: external_exports.string().min(1)
@@ -62044,7 +62578,7 @@ var vaultTrpc = defineTrpcContract("vault").mutation("createConnection").withInp
62044
62578
  reason: external_exports.string().trim().min(1).max(200),
62045
62579
  reauthToken: external_exports.string().min(1).max(200).optional()
62046
62580
  })
62047
- ).withOutput(external_exports.object({ fields: external_exports.record(external_exports.string(), external_exports.string()) })).mutation("beginReauth").withInput(workspaceInput).withOutput(vaultReauthChallengeSchema).mutation("confirmReauth").withInput(confirmVaultReauthInputSchema).withOutput(vaultReauthProofSchema).mutation("grantConnection").withInput(grantVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("lendToChannel").withInput(lendVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("revokeGrant").withInput(revokeVaultGrantInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("listGrants").withInput(connectionInput).withOutput(external_exports.array(vaultGrantSchema)).mutation("shareConnection").withInput(shareVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("approveShare").withInput(approveVaultShareInputSchema).withOutput(vaultGrantSchema).mutation("approveMachineKey").withInput(approveVaultMachineKeyInputSchema).withOutput(approvedVaultMachineKeySchema).query("readLock").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(vaultReadLockSchema).mutation("unlockReads").withInput(unlockVaultReadsInputSchema).withOutput(vaultReadLockSchema).mutation("sealConnection").withInput(sealVaultConnectionInputSchema).withOutput(vaultConnectionSchema).query("listApprovals").withInput(external_exports.object({ ...workspaceInput.shape, state: vaultApprovalListStateSchema.optional() })).withOutput(external_exports.array(vaultApprovalRequestSchema)).mutation("answerApproval").withInput(answerVaultApprovalInputSchema).withOutput(vaultApprovalRequestSchema).query("listAudit").withInput(vaultAuditReadInputSchema).withOutput(vaultAuditPageSchema).query("listActivity").withInput(vaultAuditReadInputSchema).withOutput(external_exports.array(vaultAuditEntrySchema)).query("listLeases").withInput(workspaceInput).withOutput(external_exports.array(vaultLeaseSchema)).mutation("endLease").withInput(endVaultLeaseInputSchema).withOutput(external_exports.object({ ended: external_exports.literal(true) })).query("mostAsked").withInput(vaultMostAskedInputSchema).withOutput(vaultMostAskedSchema).query("judgeStatus").withInput(workspaceInput).withOutput(vaultJudgeStatusSchema).query("listLevelLimits").withInput(workspaceInput).withOutput(external_exports.array(vaultLevelLimitSchema)).mutation("setLevelLimit").withInput(setVaultLevelLimitInputSchema).withOutput(external_exports.array(vaultLevelLimitSchema)).query("listDevices").withInput(workspaceInput).withOutput(external_exports.array(vaultDeviceSchema)).mutation("beginDeviceEnrolment").withInput(workspaceInput).withOutput(vaultDeviceEnrolmentSchema).mutation("finishDeviceEnrolment").withInput(finishVaultDeviceEnrolmentInputSchema).withOutput(vaultDeviceSchema).mutation("beginDeviceApproval").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ challenge: external_exports.string(), sealed: external_exports.array(vaultSealedMaterialSchema) })).mutation("approveDevice").withInput(approveVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("removeDevice").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("createSealedConnection").withInput(createSealedConnectionInputSchema).withOutput(vaultConnectionSchema).mutation("resealConnection").withInput(resealConnectionInputSchema).withOutput(vaultConnectionSchema).mutation("openSealedConnection").withInput(
62581
+ ).withOutput(external_exports.object({ fields: external_exports.record(external_exports.string(), external_exports.string()) })).mutation("beginReauth").withInput(workspaceInput).withOutput(vaultReauthChallengeSchema).mutation("confirmReauth").withInput(confirmVaultReauthInputSchema).withOutput(vaultReauthProofSchema).mutation("grantConnection").withInput(grantVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("lendToChannel").withInput(lendVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("revokeGrant").withInput(revokeVaultGrantInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("listGrants").withInput(connectionInput).withOutput(external_exports.array(vaultGrantSchema)).mutation("shareConnection").withInput(shareVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("approveShare").withInput(approveVaultShareInputSchema).withOutput(vaultGrantSchema).mutation("approveMachineKey").withInput(approveVaultMachineKeyInputSchema).withOutput(approvedVaultMachineKeySchema).query("readLock").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(vaultReadLockSchema).query("referenceHolder").withInput(vaultReferenceHolderInputSchema).withOutput(vaultReferenceHolderSchema).mutation("unlockReads").withInput(unlockVaultReadsInputSchema).withOutput(vaultReadLockSchema).mutation("sealConnection").withInput(sealVaultConnectionInputSchema).withOutput(vaultConnectionSchema).query("listApprovals").withInput(external_exports.object({ ...workspaceInput.shape, state: vaultApprovalListStateSchema.optional() })).withOutput(external_exports.array(vaultApprovalRequestSchema)).mutation("answerApproval").withInput(answerVaultApprovalInputSchema).withOutput(vaultApprovalRequestSchema).query("listAudit").withInput(vaultAuditReadInputSchema).withOutput(vaultAuditPageSchema).query("listActivity").withInput(vaultAuditReadInputSchema).withOutput(external_exports.array(vaultAuditEntrySchema)).query("listLeases").withInput(workspaceInput).withOutput(external_exports.array(vaultLeaseSchema)).mutation("endLease").withInput(endVaultLeaseInputSchema).withOutput(external_exports.object({ ended: external_exports.literal(true) })).query("mostAsked").withInput(vaultMostAskedInputSchema).withOutput(vaultMostAskedSchema).query("judgeStatus").withInput(workspaceInput).withOutput(vaultJudgeStatusSchema).query("listLevelLimits").withInput(workspaceInput).withOutput(external_exports.array(vaultLevelLimitSchema)).mutation("setLevelLimit").withInput(setVaultLevelLimitInputSchema).withOutput(external_exports.array(vaultLevelLimitSchema)).query("listDevices").withInput(listVaultDevicesInput).withOutput(external_exports.array(vaultDeviceSchema)).mutation("beginDeviceEnrolment").withInput(workspaceInput).withOutput(vaultDeviceEnrolmentSchema).mutation("finishDeviceEnrolment").withInput(finishVaultDeviceEnrolmentInputSchema).withOutput(vaultDeviceSchema).mutation("beginDeviceApproval").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ challenge: external_exports.string(), sealed: external_exports.array(vaultSealedMaterialSchema) })).mutation("approveDevice").withInput(approveVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("removeDevice").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("createSealedConnection").withInput(createSealedConnectionInputSchema).withOutput(vaultConnectionSchema).mutation("resealConnection").withInput(resealConnectionInputSchema).withOutput(vaultConnectionSchema).mutation("openSealedConnection").withInput(
62048
62582
  external_exports.object({
62049
62583
  ...connectionInput.shape,
62050
62584
  reason: external_exports.string().trim().min(1).max(200),
@@ -62629,19 +63163,19 @@ function clustersIn({
62629
63163
  flagged
62630
63164
  }) {
62631
63165
  const out = [];
62632
- let current2 = null;
63166
+ let current3 = null;
62633
63167
  for (let index = segment.start; index <= segment.end; index += 1) {
62634
63168
  const count5 = flagged[index] ?? 0;
62635
63169
  if (count5 === 0) continue;
62636
- if (current2 && index - current2.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
62637
- current2.end = index;
62638
- current2.values += count5;
63170
+ if (current3 && index - current3.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
63171
+ current3.end = index;
63172
+ current3.values += count5;
62639
63173
  continue;
62640
63174
  }
62641
- if (current2) out.push(current2);
62642
- current2 = { start: index, end: index, values: count5 };
63175
+ if (current3) out.push(current3);
63176
+ current3 = { start: index, end: index, values: count5 };
62643
63177
  }
62644
- if (current2) out.push(current2);
63178
+ if (current3) out.push(current3);
62645
63179
  return out;
62646
63180
  }
62647
63181
  function redactedBlocks({
@@ -68080,8 +68614,8 @@ function withHooks({
68080
68614
  event,
68081
68615
  added
68082
68616
  }) {
68083
- const current2 = Array.isArray(hooks[event]) ? hooks[event] : [];
68084
- const others = current2.filter(
68617
+ const current3 = Array.isArray(hooks[event]) ? hooks[event] : [];
68618
+ const others = current3.filter(
68085
68619
  (entry) => !entry.hooks?.some((hook) => hook.command?.includes(LAZE_HOOK_MARKER))
68086
68620
  );
68087
68621
  hooks[event] = [...others, ...added.map((hook) => ({ hooks: [hook] }))];
@@ -69073,7 +69607,7 @@ function bodyAsText({
69073
69607
  mentions
69074
69608
  }) {
69075
69609
  const actorName = (kind2, id2) => mentions.actors.find((actor) => actor.kind === kind2 && actor.id === id2)?.name ?? kind2;
69076
- const written = withSlackPeopleAsNames(body);
69610
+ const written = withSlackMarkupAsText(body);
69077
69611
  let text2 = "";
69078
69612
  let from = 0;
69079
69613
  for (const token2 of written.matchAll(TOKEN)) {
@@ -69766,11 +70300,14 @@ async function preToolHook({ context, args }) {
69766
70300
  const asked = await pluginHookArgs({ context, args, session, claudePid: 0 });
69767
70301
  if (!asked) return;
69768
70302
  const { name: name3, profile } = await signedIn({ context, args: asked });
69769
- const client = LazeClient.create({
69770
- baseUrl: profile.url,
69771
- token: profile.token,
69772
- fetcher: (input3, init) => context.fetcher(input3, { ...init, signal: AbortSignal.timeout(PRE_TOOL_TIMEOUT_MS) }),
69773
- onMigrated: markMigratedOn({ context, profile: name3 })
70303
+ const client = forSession({
70304
+ client: LazeClient.create({
70305
+ baseUrl: profile.url,
70306
+ token: profile.token,
70307
+ fetcher: (input3, init) => context.fetcher(input3, { ...init, signal: AbortSignal.timeout(PRE_TOOL_TIMEOUT_MS) }),
70308
+ onMigrated: markMigratedOn({ context, profile: name3 })
70309
+ }),
70310
+ session
69774
70311
  });
69775
70312
  const state = await readState({ context, agent: name3 });
69776
70313
  const answer5 = await beat({ client, state, working: true });
@@ -71485,12 +72022,12 @@ function setAgent(run4, profile, agent3) {
71485
72022
  }
71486
72023
  async function syncLoops(run4) {
71487
72024
  const config2 = await run4.context.store.read();
71488
- for (const [profile, current2] of run4.served) {
72025
+ for (const [profile, current3] of run4.served) {
71489
72026
  const entry = config2.profiles[profile];
71490
- const same2 = entry?.token === current2.token && entry.delivery?.threadId === current2.threadId;
72027
+ const same2 = entry?.token === current3.token && entry.delivery?.threadId === current3.threadId;
71491
72028
  if (same2 && !entry.migrated) continue;
71492
- current2.stop.abort();
71493
- await current2.done;
72029
+ current3.stop.abort();
72030
+ await current3.done;
71494
72031
  run4.served.delete(profile);
71495
72032
  setAgent(run4, profile, void 0);
71496
72033
  }
@@ -71560,8 +72097,8 @@ async function runConnectLoop({ context }) {
71560
72097
  }
71561
72098
  } finally {
71562
72099
  await relays.stopAll();
71563
- for (const current2 of run4.served.values()) current2.stop.abort();
71564
- await Promise.all([...run4.served.values()].map((current2) => current2.done));
72100
+ for (const current3 of run4.served.values()) current3.stop.abort();
72101
+ await Promise.all([...run4.served.values()].map((current3) => current3.done));
71565
72102
  if (await holdsLock(run4)) await rm2(run4.path, { force: true });
71566
72103
  }
71567
72104
  return 0;
@@ -73006,13 +73543,13 @@ async function installHooks({
73006
73543
  }) {
73007
73544
  const folder = join16(directory, ".claude");
73008
73545
  const path = join16(folder, "settings.local.json");
73009
- const current2 = await readFile14(path, "utf8").then(
73546
+ const current3 = await readFile14(path, "utf8").then(
73010
73547
  (text2) => JSON.parse(text2),
73011
73548
  () => ({})
73012
73549
  );
73013
73550
  const command = (hook) => hookCommand({ program: context.program, profile, hook });
73014
73551
  const settings3 = withLazeHooks({
73015
- settings: current2,
73552
+ settings: current3,
73016
73553
  stopCommand: command("stop"),
73017
73554
  waitCommand: command("wait"),
73018
73555
  preToolCommand: command("pre-tool")
@@ -73238,7 +73775,9 @@ async function handOver({ context, args }) {
73238
73775
  await reportTranscript({ client, input: input2 }).catch(
73239
73776
  (error62) => reportFailed({ context, error: error62 })
73240
73777
  );
73241
- if (input2.stop_hook_active) return;
73778
+ if (input2.stop_hook_active) {
73779
+ return turnEnded({ context, client: forSession({ client, session }), agent: agent3 });
73780
+ }
73242
73781
  if (await monitorServes({ context, profile: agent3, claudePid })) {
73243
73782
  return turnEnded({ context, client, agent: agent3 });
73244
73783
  }
@@ -74087,36 +74626,36 @@ var bytesOf2 = (text2) => Buffer.byteLength(text2, "utf8");
74087
74626
  function piecesOf({ line, maxBytes }) {
74088
74627
  if (bytesOf2(line) <= maxBytes) return [line];
74089
74628
  const pieces = [];
74090
- let current2 = "";
74629
+ let current3 = "";
74091
74630
  let size = 0;
74092
74631
  for (const char of line) {
74093
74632
  const width = bytesOf2(char);
74094
74633
  if (size + width > maxBytes) {
74095
- pieces.push(current2);
74096
- current2 = "";
74634
+ pieces.push(current3);
74635
+ current3 = "";
74097
74636
  size = 0;
74098
74637
  }
74099
- current2 += char;
74638
+ current3 += char;
74100
74639
  size += width;
74101
74640
  }
74102
- if (current2) pieces.push(current2);
74641
+ if (current3) pieces.push(current3);
74103
74642
  return pieces;
74104
74643
  }
74105
74644
  function packed({ lines: lines2, maxBytes }) {
74106
74645
  const parts = [];
74107
- let current2 = "";
74646
+ let current3 = "";
74108
74647
  let size = 0;
74109
74648
  for (const piece of lines2.flatMap((line) => piecesOf({ line, maxBytes }))) {
74110
74649
  const width = bytesOf2(piece);
74111
- if (size + width > maxBytes && current2) {
74112
- parts.push(current2);
74113
- current2 = "";
74650
+ if (size + width > maxBytes && current3) {
74651
+ parts.push(current3);
74652
+ current3 = "";
74114
74653
  size = 0;
74115
74654
  }
74116
- current2 += piece;
74655
+ current3 += piece;
74117
74656
  size += width;
74118
74657
  }
74119
- if (current2) parts.push(current2);
74658
+ if (current3) parts.push(current3);
74120
74659
  return parts;
74121
74660
  }
74122
74661
  function transcriptPartsOf({
@@ -77199,9 +77738,9 @@ async function listFiles(folder) {
77199
77738
  const found = [];
77200
77739
  const pending2 = [folder];
77201
77740
  while (pending2.length > 0 && found.length <= MAX_FILES) {
77202
- const current2 = pending2.pop() ?? folder;
77203
- for (const entry of await readdir6(current2, { withFileTypes: true })) {
77204
- const path = join20(current2, entry.name);
77741
+ const current3 = pending2.pop() ?? folder;
77742
+ for (const entry of await readdir6(current3, { withFileTypes: true })) {
77743
+ const path = join20(current3, entry.name);
77205
77744
  const rel = relative3(folder, path).split(sep3).join("/");
77206
77745
  if (isSkippedPath({ path: rel })) continue;
77207
77746
  if (entry.isDirectory()) pending2.push(path);
@@ -82970,10 +83509,10 @@ function servicesLine(status10) {
82970
83509
  return [` Computer services (browser, desktop, system) memory ${gb(servicesGb)}`];
82971
83510
  }
82972
83511
  function printStatus({ context }, status10) {
82973
- const current2 = status10.sizes.find((size) => size.current);
83512
+ const current3 = status10.sizes.find((size) => size.current);
82974
83513
  const included = status10.sizes.find((size) => size.included);
82975
83514
  const lines2 = [
82976
- `${status10.name}: ${current2?.label ?? status10.size} (${current2?.vcpu} vCPU, ${current2?.memoryGb} GB memory, ${current2?.diskGb} GB disk)`,
83515
+ `${status10.name}: ${current3?.label ?? status10.size} (${current3?.vcpu} vCPU, ${current3?.memoryGb} GB memory, ${current3?.diskGb} GB disk)`,
82977
83516
  stateLine(status10),
82978
83517
  `CPU: ${Number(status10.cpu.busy.toFixed(1))} of ${status10.cpu.vcpu} vCPU busy`,
82979
83518
  `Memory: ${gb(status10.memory.usedGb)} of ${gb(status10.memory.totalGb)}`,
@@ -85216,7 +85755,7 @@ function print7({ context, args, answer: answer5, text: text2 }) {
85216
85755
  context.out(args.flags.json ? `${JSON.stringify(answer5, null, 2)}
85217
85756
  ` : text2(answer5));
85218
85757
  }
85219
- async function current({ context, args }) {
85758
+ async function current2({ context, args }) {
85220
85759
  const { client } = await signedIn({ context, args });
85221
85760
  const answer5 = await client.get("/api/workspaces/current");
85222
85761
  print7({
@@ -85429,7 +85968,7 @@ var WORKSPACE_COMMANDS = {
85429
85968
  };
85430
85969
  async function workspace({ context, args }) {
85431
85970
  const sub = args.words[1];
85432
- if (!sub) return current({ context, args });
85971
+ if (!sub) return current2({ context, args });
85433
85972
  const command = Object.hasOwn(WORKSPACE_COMMANDS, sub) ? WORKSPACE_COMMANDS[sub] : void 0;
85434
85973
  if (!command)
85435
85974
  throw new CliUsageError(
@@ -88817,12 +89356,12 @@ function fileRef({ context, args }) {
88817
89356
  function printDocument({
88818
89357
  context,
88819
89358
  args,
88820
- document
89359
+ document: document2
88821
89360
  }) {
88822
- if (args.flags.json) return context.out(`${JSON.stringify(document, null, 2)}
89361
+ if (args.flags.json) return context.out(`${JSON.stringify(document2, null, 2)}
88823
89362
  `);
88824
89363
  context.out(
88825
- document.content.endsWith("\n") || !document.content ? document.content : `${document.content}
89364
+ document2.content.endsWith("\n") || !document2.content ? document2.content : `${document2.content}
88826
89365
  `
88827
89366
  );
88828
89367
  }
@@ -88930,10 +89469,10 @@ var limitsLine = (limits) => WINDOWS.map(
88930
89469
  function limitsFrom({
88931
89470
  args,
88932
89471
  prefix,
88933
- current: current2
89472
+ current: current3
88934
89473
  }) {
88935
89474
  let changed = false;
88936
- const next = { ...current2 };
89475
+ const next = { ...current3 };
88937
89476
  for (const window2 of WINDOWS) {
88938
89477
  const text2 = flagText({ args, name: `${prefix}${window2}` });
88939
89478
  if (!text2) continue;
@@ -88958,18 +89497,18 @@ function printPolicy(context, policy) {
88958
89497
  }
88959
89498
  async function showPolicy({ context, args }) {
88960
89499
  const { client } = await signedIn({ context, args });
88961
- const current2 = await client.get("/api/models/policy");
88962
- if (args.flags.json) return context.out(`${JSON.stringify(current2, null, 2)}
89500
+ const current3 = await client.get("/api/models/policy");
89501
+ if (args.flags.json) return context.out(`${JSON.stringify(current3, null, 2)}
88963
89502
  `);
88964
- printPolicy(context, current2);
89503
+ printPolicy(context, current3);
88965
89504
  }
88966
89505
  async function setPolicy({ context, args }) {
88967
89506
  const state = args.words[2];
88968
89507
  if (state !== void 0 && state !== "on" && state !== "off") throw new CliUsageError(USAGE12);
88969
89508
  const { client } = await signedIn({ context, args });
88970
- const current2 = await client.get("/api/models/policy");
88971
- const defaultBudget = limitsFrom({ args, prefix: "default-", current: current2.defaultBudget });
88972
- const cap = limitsFrom({ args, prefix: "cap-", current: current2.cap });
89509
+ const current3 = await client.get("/api/models/policy");
89510
+ const defaultBudget = limitsFrom({ args, prefix: "default-", current: current3.defaultBudget });
89511
+ const cap = limitsFrom({ args, prefix: "cap-", current: current3.cap });
88973
89512
  if (!state && !defaultBudget && !cap) throw new CliUsageError(USAGE12);
88974
89513
  const updated = await client.post("/api/models/policy", {
88975
89514
  ...state ? { lazeModels: state === "on" } : {},
@@ -91877,14 +92416,14 @@ function printSend({
91877
92416
  return ["failed", "denied", "expired"].includes(send5.state) ? 1 : 0;
91878
92417
  }
91879
92418
  async function settle2({ client, send: send5 }) {
91880
- let current2 = send5;
91881
- for (let calls = 0; calls < STATUS_CALLS && !whatsappBusinessSendSettled(current2); calls += 1) {
91882
- current2 = await client.post(WHATSAPP_BUSINESS_REST_PATHS.sendStatus, {
91883
- sendId: current2.id,
92419
+ let current3 = send5;
92420
+ for (let calls = 0; calls < STATUS_CALLS && !whatsappBusinessSendSettled(current3); calls += 1) {
92421
+ current3 = await client.post(WHATSAPP_BUSINESS_REST_PATHS.sendStatus, {
92422
+ sendId: current3.id,
91884
92423
  waitSeconds: STATUS_WAIT_SECONDS
91885
92424
  });
91886
92425
  }
91887
- return current2;
92426
+ return current3;
91888
92427
  }
91889
92428
  async function secretsOf3({ context, args }) {
91890
92429
  if (SECRET_FLAGS4.some((flag2) => args.flags[flag2] !== void 0)) {
@@ -92237,14 +92776,14 @@ async function read3({ context, args }) {
92237
92776
  `);
92238
92777
  }
92239
92778
  async function settle3({ client, send: send5 }) {
92240
- let current2 = send5;
92241
- for (let calls = 0; calls < STATUS_CALLS2 && !SETTLED.has(current2.state); calls += 1) {
92242
- current2 = await client.post(PATHS3.sendStatus, {
92243
- sendId: current2.id,
92779
+ let current3 = send5;
92780
+ for (let calls = 0; calls < STATUS_CALLS2 && !SETTLED.has(current3.state); calls += 1) {
92781
+ current3 = await client.post(PATHS3.sendStatus, {
92782
+ sendId: current3.id,
92244
92783
  waitSeconds: STATUS_WAIT_SECONDS2
92245
92784
  });
92246
92785
  }
92247
- return current2;
92786
+ return current3;
92248
92787
  }
92249
92788
  function report3({ context, args, send: send5 }) {
92250
92789
  if (args.flags.json) context.out(`${JSON.stringify(send5, null, 2)}