@lazehq/cli 0.1.62 → 0.1.64

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 +724 -132
  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.64";
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",
@@ -59399,7 +59888,9 @@ var extendChannelInputSchema = extendChannelInputSchemaDefinition;
59399
59888
  var openDirectInputSchemaDefinition = external_exports.object({
59400
59889
  workspaceId: workspaceIdSchema,
59401
59890
  /** The other people; the opener is added. */
59402
- userIds: external_exports.array(idSchema4).min(1).max(GROUP_DM_MAX_MEMBERS)
59891
+ userIds: external_exports.array(idSchema4).max(GROUP_DM_MAX_MEMBERS),
59892
+ /** The workspace's agents that join it from the start, beside the people. */
59893
+ agentIds: external_exports.array(idSchema4).max(GROUP_DM_MAX_MEMBERS).optional()
59403
59894
  });
59404
59895
  var openDirectInputSchema = openDirectInputSchemaDefinition;
59405
59896
  var chatTitleSchema = external_exports.string().max(200);
@@ -60296,13 +60787,25 @@ var digestItemSchemaDefinition = external_exports.object({
60296
60787
  count: external_exports.number().int().positive().optional()
60297
60788
  });
60298
60789
  var DIGEST_LISTED = 10;
60790
+ var localeSchema = external_exports.string().trim().min(1).max(35).optional();
60299
60791
  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() }),
60792
+ external_exports.object({ template: external_exports.literal("magicLink"), to: external_exports.email(), url: external_exports.url(), locale: localeSchema }),
60793
+ external_exports.object({
60794
+ template: external_exports.literal("verifyEmail"),
60795
+ to: external_exports.email(),
60796
+ url: external_exports.url(),
60797
+ locale: localeSchema
60798
+ }),
60799
+ external_exports.object({
60800
+ template: external_exports.literal("resetPassword"),
60801
+ to: external_exports.email(),
60802
+ url: external_exports.url(),
60803
+ locale: localeSchema
60804
+ }),
60303
60805
  external_exports.object({
60304
60806
  template: external_exports.literal("workspaceInvite"),
60305
60807
  to: external_exports.email(),
60808
+ locale: localeSchema,
60306
60809
  url: external_exports.url(),
60307
60810
  workspaceName: external_exports.string().min(1),
60308
60811
  inviterName: external_exports.string().min(1)
@@ -60311,6 +60814,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60311
60814
  external_exports.object({
60312
60815
  template: external_exports.literal("workspaceAccess"),
60313
60816
  to: external_exports.email(),
60817
+ locale: localeSchema,
60314
60818
  url: external_exports.url(),
60315
60819
  subject: external_exports.string().min(1),
60316
60820
  heading: external_exports.string().min(1),
@@ -60321,6 +60825,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60321
60825
  external_exports.object({
60322
60826
  template: external_exports.literal("appAvailable"),
60323
60827
  to: external_exports.email(),
60828
+ locale: localeSchema,
60324
60829
  url: external_exports.url(),
60325
60830
  platformName: external_exports.string().min(1).max(40)
60326
60831
  }),
@@ -60328,6 +60833,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60328
60833
  external_exports.object({
60329
60834
  template: external_exports.literal("appUserCode"),
60330
60835
  to: external_exports.email(),
60836
+ locale: localeSchema,
60331
60837
  /** The app's address, where the code is typed. */
60332
60838
  url: external_exports.url(),
60333
60839
  appName: external_exports.string().min(1).max(120),
@@ -60337,6 +60843,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60337
60843
  external_exports.object({
60338
60844
  template: external_exports.literal("awayDigest"),
60339
60845
  to: external_exports.email(),
60846
+ locale: localeSchema,
60340
60847
  /** Where "Open Laze" goes. */
60341
60848
  url: external_exports.url(),
60342
60849
  unsubscribeUrl: external_exports.url(),
@@ -60348,6 +60855,7 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
60348
60855
  external_exports.object({
60349
60856
  template: external_exports.literal("dailyDigest"),
60350
60857
  to: external_exports.email(),
60858
+ locale: localeSchema,
60351
60859
  /** The workspace, where "Open Laze" goes. */
60352
60860
  url: external_exports.url(),
60353
60861
  /** Settings, Notifications, where the digest is set. */
@@ -60534,6 +61042,7 @@ var desktopPublicationSchemaDefinition = external_exports.object({
60534
61042
  var desktopPublicationSchema = desktopPublicationSchemaDefinition;
60535
61043
  var quietReasonSchema = external_exports.enum(["paused", "hours"]);
60536
61044
  var personTimeZoneSchemaDefinition = external_exports.object({ userId: userIdSchema, timeZone: external_exports.string() });
61045
+ var personLanguageSchemaDefinition = external_exports.object({ userId: userIdSchema, language: external_exports.string() });
60537
61046
  var quietPersonSchemaDefinition = external_exports.object({
60538
61047
  userId: userIdSchema,
60539
61048
  reason: quietReasonSchema,
@@ -60547,7 +61056,9 @@ var workspaceInputSchema2 = external_exports.object({ workspaceId: workspaceIdSc
60547
61056
  var heartbeatInputSchemaDefinition = external_exports.object({
60548
61057
  workspaceId: workspaceIdSchema2,
60549
61058
  /** 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()
61059
+ timeZone: external_exports.string().min(1).max(64).optional(),
61060
+ /** The language the person's screens read in (BCP 47); their mails and pushes follow it. */
61061
+ language: external_exports.string().trim().min(1).max(35).optional()
60551
61062
  });
60552
61063
  var heartbeatInputSchema = heartbeatInputSchemaDefinition;
60553
61064
  var dailyDigestInputSchemaDefinition = external_exports.object({
@@ -60825,7 +61336,9 @@ var postedForwardSchemaDefinition = external_exports.object({
60825
61336
  author: messageAuthorSchema,
60826
61337
  /** The author's name at the source, for an author with no Laze account. */
60827
61338
  authorName: external_exports.string().optional(),
60828
- body: external_exports.string()
61339
+ body: external_exports.string(),
61340
+ /** The files the quote carries; a reader of the forward may open them through it. */
61341
+ attachmentIds: external_exports.array(external_exports.string()).optional()
60829
61342
  });
60830
61343
  var messagePostedPayloadSchemaDefinition = external_exports.object({
60831
61344
  workspaceId: external_exports.string().min(1),
@@ -61058,6 +61571,11 @@ var SLACK_PERSON_TOKEN = /<@slack:([A-Z0-9]{1,32})\|([^<>|\n]{1,80})>/g;
61058
61571
  function withSlackPeopleAsNames(text2) {
61059
61572
  return text2.replace(SLACK_PERSON_TOKEN, (_token, _id, name3) => `@${name3}`);
61060
61573
  }
61574
+ var SLACK_DATE_TOKEN = /<!date\^[^<>|\n]*\|([^<>\n]*)>/g;
61575
+ var ANGLE_LINK = /<((?:https?|mailto):[^<>|\s]+)(?:\|([^<>\n]+))?>/g;
61576
+ function withSlackMarkupAsText(text2) {
61577
+ return withSlackPeopleAsNames(text2).replace(SLACK_DATE_TOKEN, "$1").replace(ANGLE_LINK, (_link, address, label3) => label3 ?? address);
61578
+ }
61061
61579
 
61062
61580
  // ../../modules/vault/contract/src/resolution-note.ts
61063
61581
  var RESOLUTION_NOTE_INPUT_MAX_CHARS = 4e3;
@@ -61361,7 +61879,9 @@ var vaultReauthChallengeSchemaDefinition = external_exports.object({
61361
61879
  devices: external_exports.boolean(),
61362
61880
  /** Signs in with Google; Google alone cannot prove presence here yet. */
61363
61881
  google: external_exports.boolean()
61364
- })
61882
+ }),
61883
+ /** Her active devices in every workspace, any of which signs the challenge. */
61884
+ devices: external_exports.array(vaultDeviceSchema).optional()
61365
61885
  });
61366
61886
  var vaultReauthChallengeSchema = vaultReauthChallengeSchemaDefinition;
61367
61887
  var confirmVaultReauthInputSchemaDefinition = external_exports.object({
@@ -61621,6 +62141,20 @@ var approvedVaultMachineKeySchemaDefinition = external_exports.object({
61621
62141
  recheckDueAt: external_exports.string().nullable()
61622
62142
  });
61623
62143
  var approvedVaultMachineKeySchema = approvedVaultMachineKeySchemaDefinition;
62144
+ var vaultReferenceHolderInputSchemaDefinition = external_exports.object({
62145
+ workspaceId: external_exports.string().min(1),
62146
+ name: external_exports.string().min(1).max(200)
62147
+ });
62148
+ var vaultReferenceHolderInputSchema = vaultReferenceHolderInputSchemaDefinition;
62149
+ var vaultReferenceHolderSchemaDefinition = external_exports.object({
62150
+ holder: external_exports.discriminatedUnion("kind", [
62151
+ external_exports.object({ kind: external_exports.literal("person"), userId: external_exports.string().min(1) }),
62152
+ external_exports.object({ kind: external_exports.literal("workspace") }),
62153
+ external_exports.object({ kind: external_exports.literal("agent"), agentId: external_exports.string().min(1) }),
62154
+ external_exports.object({ kind: external_exports.literal("unknown") })
62155
+ ])
62156
+ });
62157
+ var vaultReferenceHolderSchema = vaultReferenceHolderSchemaDefinition;
61624
62158
  var vaultReadLockSchemaDefinition = external_exports.object({
61625
62159
  locked: external_exports.boolean(),
61626
62160
  /** The CLI key whose burst locked them, as it named itself; null when not locked. */
@@ -62032,6 +62566,10 @@ var copyConnectionValueInputSchemaDefinition = external_exports.object({
62032
62566
  });
62033
62567
  var VaultApi = moduleApi()("vault");
62034
62568
  var workspaceInput = external_exports.object({ workspaceId: external_exports.string().min(1) });
62569
+ var listVaultDevicesInput = external_exports.object({
62570
+ ...workspaceInput.shape,
62571
+ everywhere: external_exports.boolean().optional()
62572
+ });
62035
62573
  var connectionInput = external_exports.object({
62036
62574
  workspaceId: external_exports.string().min(1),
62037
62575
  connectionId: external_exports.string().min(1)
@@ -62044,7 +62582,7 @@ var vaultTrpc = defineTrpcContract("vault").mutation("createConnection").withInp
62044
62582
  reason: external_exports.string().trim().min(1).max(200),
62045
62583
  reauthToken: external_exports.string().min(1).max(200).optional()
62046
62584
  })
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(
62585
+ ).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
62586
  external_exports.object({
62049
62587
  ...connectionInput.shape,
62050
62588
  reason: external_exports.string().trim().min(1).max(200),
@@ -62629,19 +63167,19 @@ function clustersIn({
62629
63167
  flagged
62630
63168
  }) {
62631
63169
  const out = [];
62632
- let current2 = null;
63170
+ let current3 = null;
62633
63171
  for (let index = segment.start; index <= segment.end; index += 1) {
62634
63172
  const count5 = flagged[index] ?? 0;
62635
63173
  if (count5 === 0) continue;
62636
- if (current2 && index - current2.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
62637
- current2.end = index;
62638
- current2.values += count5;
63174
+ if (current3 && index - current3.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
63175
+ current3.end = index;
63176
+ current3.values += count5;
62639
63177
  continue;
62640
63178
  }
62641
- if (current2) out.push(current2);
62642
- current2 = { start: index, end: index, values: count5 };
63179
+ if (current3) out.push(current3);
63180
+ current3 = { start: index, end: index, values: count5 };
62643
63181
  }
62644
- if (current2) out.push(current2);
63182
+ if (current3) out.push(current3);
62645
63183
  return out;
62646
63184
  }
62647
63185
  function redactedBlocks({
@@ -68080,8 +68618,8 @@ function withHooks({
68080
68618
  event,
68081
68619
  added
68082
68620
  }) {
68083
- const current2 = Array.isArray(hooks[event]) ? hooks[event] : [];
68084
- const others = current2.filter(
68621
+ const current3 = Array.isArray(hooks[event]) ? hooks[event] : [];
68622
+ const others = current3.filter(
68085
68623
  (entry) => !entry.hooks?.some((hook) => hook.command?.includes(LAZE_HOOK_MARKER))
68086
68624
  );
68087
68625
  hooks[event] = [...others, ...added.map((hook) => ({ hooks: [hook] }))];
@@ -68890,6 +69428,9 @@ var slackFileParamsSchemaDefinition = external_exports.object({
68890
69428
  channelId: external_exports.string().min(1).max(200),
68891
69429
  fileId: external_exports.string().regex(/^F[A-Z0-9]{2,30}$/)
68892
69430
  });
69431
+ var slackFileQuerySchemaDefinition = external_exports.object({
69432
+ via: external_exports.string().min(1).max(200).optional()
69433
+ });
68893
69434
  var SLACK_SEARCH_QUERY_MIN = 2;
68894
69435
  var SLACK_SEARCH_QUERY_MAX = 200;
68895
69436
  var slackSearchInputSchemaDefinition = external_exports.object({
@@ -69073,7 +69614,7 @@ function bodyAsText({
69073
69614
  mentions
69074
69615
  }) {
69075
69616
  const actorName = (kind2, id2) => mentions.actors.find((actor) => actor.kind === kind2 && actor.id === id2)?.name ?? kind2;
69076
- const written = withSlackPeopleAsNames(body);
69617
+ const written = withSlackMarkupAsText(body);
69077
69618
  let text2 = "";
69078
69619
  let from = 0;
69079
69620
  for (const token2 of written.matchAll(TOKEN)) {
@@ -69766,11 +70307,14 @@ async function preToolHook({ context, args }) {
69766
70307
  const asked = await pluginHookArgs({ context, args, session, claudePid: 0 });
69767
70308
  if (!asked) return;
69768
70309
  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 })
70310
+ const client = forSession({
70311
+ client: LazeClient.create({
70312
+ baseUrl: profile.url,
70313
+ token: profile.token,
70314
+ fetcher: (input3, init) => context.fetcher(input3, { ...init, signal: AbortSignal.timeout(PRE_TOOL_TIMEOUT_MS) }),
70315
+ onMigrated: markMigratedOn({ context, profile: name3 })
70316
+ }),
70317
+ session
69774
70318
  });
69775
70319
  const state = await readState({ context, agent: name3 });
69776
70320
  const answer5 = await beat({ client, state, working: true });
@@ -71485,12 +72029,12 @@ function setAgent(run4, profile, agent3) {
71485
72029
  }
71486
72030
  async function syncLoops(run4) {
71487
72031
  const config2 = await run4.context.store.read();
71488
- for (const [profile, current2] of run4.served) {
72032
+ for (const [profile, current3] of run4.served) {
71489
72033
  const entry = config2.profiles[profile];
71490
- const same2 = entry?.token === current2.token && entry.delivery?.threadId === current2.threadId;
72034
+ const same2 = entry?.token === current3.token && entry.delivery?.threadId === current3.threadId;
71491
72035
  if (same2 && !entry.migrated) continue;
71492
- current2.stop.abort();
71493
- await current2.done;
72036
+ current3.stop.abort();
72037
+ await current3.done;
71494
72038
  run4.served.delete(profile);
71495
72039
  setAgent(run4, profile, void 0);
71496
72040
  }
@@ -71560,8 +72104,8 @@ async function runConnectLoop({ context }) {
71560
72104
  }
71561
72105
  } finally {
71562
72106
  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));
72107
+ for (const current3 of run4.served.values()) current3.stop.abort();
72108
+ await Promise.all([...run4.served.values()].map((current3) => current3.done));
71565
72109
  if (await holdsLock(run4)) await rm2(run4.path, { force: true });
71566
72110
  }
71567
72111
  return 0;
@@ -73006,13 +73550,13 @@ async function installHooks({
73006
73550
  }) {
73007
73551
  const folder = join16(directory, ".claude");
73008
73552
  const path = join16(folder, "settings.local.json");
73009
- const current2 = await readFile14(path, "utf8").then(
73553
+ const current3 = await readFile14(path, "utf8").then(
73010
73554
  (text2) => JSON.parse(text2),
73011
73555
  () => ({})
73012
73556
  );
73013
73557
  const command = (hook) => hookCommand({ program: context.program, profile, hook });
73014
73558
  const settings3 = withLazeHooks({
73015
- settings: current2,
73559
+ settings: current3,
73016
73560
  stopCommand: command("stop"),
73017
73561
  waitCommand: command("wait"),
73018
73562
  preToolCommand: command("pre-tool")
@@ -73128,7 +73672,11 @@ async function settleLinked({
73128
73672
  pid,
73129
73673
  linked
73130
73674
  }) {
73131
- const name3 = linkedProfileNameOf({ args, linked });
73675
+ const name3 = linkedProfileNameOf({
73676
+ args,
73677
+ linked,
73678
+ profiles: (await context.store.read()).profiles
73679
+ });
73132
73680
  const claude = harness === "claude-code";
73133
73681
  const directory = await sessionFolderOf({ context, args, claude, pid });
73134
73682
  await context.store.saveProfile({
@@ -73176,9 +73724,22 @@ async function settleLinked({
73176
73724
  ""
73177
73725
  ].join("\n")
73178
73726
  );
73727
+ return name3;
73179
73728
  }
73180
- function linkedProfileNameOf({ args, linked }) {
73181
- return flagText({ args, name: "profile" }) || `agent-${slugOf(linked.agent.name)}`;
73729
+ function linkedProfileNameOf({
73730
+ args,
73731
+ linked,
73732
+ profiles: profiles2
73733
+ }) {
73734
+ const wanted = flagText({ args, name: "profile" }) || `agent-${slugOf(linked.agent.name)}`;
73735
+ const free = (name3) => {
73736
+ const held = profiles2[name3];
73737
+ return !held || held.kind === "agent" && held.agentId === linked.agent.id;
73738
+ };
73739
+ if (free(wanted)) return wanted;
73740
+ for (let number4 = 2; ; number4 += 1) {
73741
+ if (free(`${wanted}-${number4}`)) return `${wanted}-${number4}`;
73742
+ }
73182
73743
  }
73183
73744
  function requestProfileNameOf({ profile }) {
73184
73745
  return `${profile}-request`;
@@ -73195,7 +73756,10 @@ async function nextStepsFor({
73195
73756
  if (harness === "codex") return linkCodexSession({ context, args, profile, laze, directory });
73196
73757
  if (!hooked) return waiterStepsOf({ profile, laze });
73197
73758
  const session = await currentSessionOf({ context, args });
73198
- if (session) await context.store.bindSession({ session: sessionKeyOf({ session }), profile });
73759
+ if (session) {
73760
+ await context.store.bindSession({ session: sessionKeyOf({ session }), profile });
73761
+ await bindInLaze({ context, args, session, profile });
73762
+ }
73199
73763
  const plugin2 = args.flags["no-plugin"] ? void 0 : await installLazePlugin({ context });
73200
73764
  if (plugin2?.registered) await markReloadTipTold({ context, session });
73201
73765
  const mcp2 = args.flags.mcp ? await registerMcp({ context, directory, profile }) : void 0;
@@ -73203,6 +73767,23 @@ async function nextStepsFor({
73203
73767
  const lines2 = pluginLinesOf({ context, registered: plugin2?.registered });
73204
73768
  return claudeStepsOf({ profile, laze, directory, mcp: mcp2, mcpAdd: mcpAdd2, plugin: lines2 });
73205
73769
  }
73770
+ async function bindInLaze({
73771
+ context,
73772
+ args,
73773
+ session,
73774
+ profile
73775
+ }) {
73776
+ try {
73777
+ const { client } = await signedIn({
73778
+ context,
73779
+ args: { ...args, flags: { ...args.flags, profile } }
73780
+ });
73781
+ await forSession({ client, session }).post("/api/agents/me/bind", {});
73782
+ } catch (error62) {
73783
+ context.err(`laze: could not bind the agent to this session yet: ${String(error62)}
73784
+ `);
73785
+ }
73786
+ }
73206
73787
  async function reportTranscript({
73207
73788
  client,
73208
73789
  input: input2
@@ -73238,7 +73819,9 @@ async function handOver({ context, args }) {
73238
73819
  await reportTranscript({ client, input: input2 }).catch(
73239
73820
  (error62) => reportFailed({ context, error: error62 })
73240
73821
  );
73241
- if (input2.stop_hook_active) return;
73822
+ if (input2.stop_hook_active) {
73823
+ return turnEnded({ context, client: forSession({ client, session }), agent: agent3 });
73824
+ }
73242
73825
  if (await monitorServes({ context, profile: agent3, claudePid })) {
73243
73826
  return turnEnded({ context, client, agent: agent3 });
73244
73827
  }
@@ -74087,36 +74670,36 @@ var bytesOf2 = (text2) => Buffer.byteLength(text2, "utf8");
74087
74670
  function piecesOf({ line, maxBytes }) {
74088
74671
  if (bytesOf2(line) <= maxBytes) return [line];
74089
74672
  const pieces = [];
74090
- let current2 = "";
74673
+ let current3 = "";
74091
74674
  let size = 0;
74092
74675
  for (const char of line) {
74093
74676
  const width = bytesOf2(char);
74094
74677
  if (size + width > maxBytes) {
74095
- pieces.push(current2);
74096
- current2 = "";
74678
+ pieces.push(current3);
74679
+ current3 = "";
74097
74680
  size = 0;
74098
74681
  }
74099
- current2 += char;
74682
+ current3 += char;
74100
74683
  size += width;
74101
74684
  }
74102
- if (current2) pieces.push(current2);
74685
+ if (current3) pieces.push(current3);
74103
74686
  return pieces;
74104
74687
  }
74105
74688
  function packed({ lines: lines2, maxBytes }) {
74106
74689
  const parts = [];
74107
- let current2 = "";
74690
+ let current3 = "";
74108
74691
  let size = 0;
74109
74692
  for (const piece of lines2.flatMap((line) => piecesOf({ line, maxBytes }))) {
74110
74693
  const width = bytesOf2(piece);
74111
- if (size + width > maxBytes && current2) {
74112
- parts.push(current2);
74113
- current2 = "";
74694
+ if (size + width > maxBytes && current3) {
74695
+ parts.push(current3);
74696
+ current3 = "";
74114
74697
  size = 0;
74115
74698
  }
74116
- current2 += piece;
74699
+ current3 += piece;
74117
74700
  size += width;
74118
74701
  }
74119
- if (current2) parts.push(current2);
74702
+ if (current3) parts.push(current3);
74120
74703
  return parts;
74121
74704
  }
74122
74705
  function transcriptPartsOf({
@@ -74507,9 +75090,15 @@ async function requestAgent({ context, args }) {
74507
75090
  return;
74508
75091
  }
74509
75092
  const { status: _status, workspaceName: _workspace, ...linked } = answer5;
74510
- await settleLinked({ context, args, url: request2.url, harness, pid: void 0, linked });
75093
+ const profile = await settleLinked({
75094
+ context,
75095
+ args,
75096
+ url: request2.url,
75097
+ harness,
75098
+ pid: void 0,
75099
+ linked
75100
+ });
74511
75101
  if (!session) return;
74512
- const profile = linkedProfileNameOf({ args, linked });
74513
75102
  const own2 = LazeClient.create({
74514
75103
  baseUrl: request2.url,
74515
75104
  token: linked.apiKey,
@@ -77199,9 +77788,9 @@ async function listFiles(folder) {
77199
77788
  const found = [];
77200
77789
  const pending2 = [folder];
77201
77790
  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);
77791
+ const current3 = pending2.pop() ?? folder;
77792
+ for (const entry of await readdir6(current3, { withFileTypes: true })) {
77793
+ const path = join20(current3, entry.name);
77205
77794
  const rel = relative3(folder, path).split(sep3).join("/");
77206
77795
  if (isSkippedPath({ path: rel })) continue;
77207
77796
  if (entry.isDirectory()) pending2.push(path);
@@ -82970,10 +83559,10 @@ function servicesLine(status10) {
82970
83559
  return [` Computer services (browser, desktop, system) memory ${gb(servicesGb)}`];
82971
83560
  }
82972
83561
  function printStatus({ context }, status10) {
82973
- const current2 = status10.sizes.find((size) => size.current);
83562
+ const current3 = status10.sizes.find((size) => size.current);
82974
83563
  const included = status10.sizes.find((size) => size.included);
82975
83564
  const lines2 = [
82976
- `${status10.name}: ${current2?.label ?? status10.size} (${current2?.vcpu} vCPU, ${current2?.memoryGb} GB memory, ${current2?.diskGb} GB disk)`,
83565
+ `${status10.name}: ${current3?.label ?? status10.size} (${current3?.vcpu} vCPU, ${current3?.memoryGb} GB memory, ${current3?.diskGb} GB disk)`,
82977
83566
  stateLine(status10),
82978
83567
  `CPU: ${Number(status10.cpu.busy.toFixed(1))} of ${status10.cpu.vcpu} vCPU busy`,
82979
83568
  `Memory: ${gb(status10.memory.usedGb)} of ${gb(status10.memory.totalGb)}`,
@@ -85216,7 +85805,7 @@ function print7({ context, args, answer: answer5, text: text2 }) {
85216
85805
  context.out(args.flags.json ? `${JSON.stringify(answer5, null, 2)}
85217
85806
  ` : text2(answer5));
85218
85807
  }
85219
- async function current({ context, args }) {
85808
+ async function current2({ context, args }) {
85220
85809
  const { client } = await signedIn({ context, args });
85221
85810
  const answer5 = await client.get("/api/workspaces/current");
85222
85811
  print7({
@@ -85429,7 +86018,7 @@ var WORKSPACE_COMMANDS = {
85429
86018
  };
85430
86019
  async function workspace({ context, args }) {
85431
86020
  const sub = args.words[1];
85432
- if (!sub) return current({ context, args });
86021
+ if (!sub) return current2({ context, args });
85433
86022
  const command = Object.hasOwn(WORKSPACE_COMMANDS, sub) ? WORKSPACE_COMMANDS[sub] : void 0;
85434
86023
  if (!command)
85435
86024
  throw new CliUsageError(
@@ -86346,7 +86935,9 @@ var decideFeedRequestInputSchemaDefinition = external_exports.object({
86346
86935
  ...itemRef.shape,
86347
86936
  decision: external_exports.enum(["approved", "denied"]),
86348
86937
  /** With a Deny: why, for the agent that asked. It goes on the card as the person's reply. */
86349
- resolutionNote: external_exports.string().max(4e3).optional()
86938
+ resolutionNote: external_exports.string().max(4e3).optional(),
86939
+ /** With an Approve of an agent asking to join: the name it joins as. */
86940
+ name: external_exports.string().trim().max(80).optional()
86350
86941
  });
86351
86942
  var decideFeedRequestInputSchema = decideFeedRequestInputSchemaDefinition;
86352
86943
  var feedPublishDurationSchema = external_exports.enum(["once", "day", "always"]);
@@ -87863,7 +88454,8 @@ async function joinAsAgent({ context, args }) {
87863
88454
  const where = outcome.workspaceName || pending2.workspaceName || linked.agent.workspaceId;
87864
88455
  context.out(`Joined ${where} as ${linked.agent.name}.
87865
88456
  `);
87866
- return settleLinked({ context, args, url: url2, harness, pid, linked });
88457
+ await settleLinked({ context, args, url: url2, harness, pid, linked });
88458
+ return;
87867
88459
  }
87868
88460
  context.out(
87869
88461
  `Not approved yet. Run \`laze join\` again to keep waiting; the code works until ${pending2.expiresAt}.
@@ -88817,12 +89409,12 @@ function fileRef({ context, args }) {
88817
89409
  function printDocument({
88818
89410
  context,
88819
89411
  args,
88820
- document
89412
+ document: document2
88821
89413
  }) {
88822
- if (args.flags.json) return context.out(`${JSON.stringify(document, null, 2)}
89414
+ if (args.flags.json) return context.out(`${JSON.stringify(document2, null, 2)}
88823
89415
  `);
88824
89416
  context.out(
88825
- document.content.endsWith("\n") || !document.content ? document.content : `${document.content}
89417
+ document2.content.endsWith("\n") || !document2.content ? document2.content : `${document2.content}
88826
89418
  `
88827
89419
  );
88828
89420
  }
@@ -88930,10 +89522,10 @@ var limitsLine = (limits) => WINDOWS.map(
88930
89522
  function limitsFrom({
88931
89523
  args,
88932
89524
  prefix,
88933
- current: current2
89525
+ current: current3
88934
89526
  }) {
88935
89527
  let changed = false;
88936
- const next = { ...current2 };
89528
+ const next = { ...current3 };
88937
89529
  for (const window2 of WINDOWS) {
88938
89530
  const text2 = flagText({ args, name: `${prefix}${window2}` });
88939
89531
  if (!text2) continue;
@@ -88958,18 +89550,18 @@ function printPolicy(context, policy) {
88958
89550
  }
88959
89551
  async function showPolicy({ context, args }) {
88960
89552
  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)}
89553
+ const current3 = await client.get("/api/models/policy");
89554
+ if (args.flags.json) return context.out(`${JSON.stringify(current3, null, 2)}
88963
89555
  `);
88964
- printPolicy(context, current2);
89556
+ printPolicy(context, current3);
88965
89557
  }
88966
89558
  async function setPolicy({ context, args }) {
88967
89559
  const state = args.words[2];
88968
89560
  if (state !== void 0 && state !== "on" && state !== "off") throw new CliUsageError(USAGE12);
88969
89561
  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 });
89562
+ const current3 = await client.get("/api/models/policy");
89563
+ const defaultBudget = limitsFrom({ args, prefix: "default-", current: current3.defaultBudget });
89564
+ const cap = limitsFrom({ args, prefix: "cap-", current: current3.cap });
88973
89565
  if (!state && !defaultBudget && !cap) throw new CliUsageError(USAGE12);
88974
89566
  const updated = await client.post("/api/models/policy", {
88975
89567
  ...state ? { lazeModels: state === "on" } : {},
@@ -91877,14 +92469,14 @@ function printSend({
91877
92469
  return ["failed", "denied", "expired"].includes(send5.state) ? 1 : 0;
91878
92470
  }
91879
92471
  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,
92472
+ let current3 = send5;
92473
+ for (let calls = 0; calls < STATUS_CALLS && !whatsappBusinessSendSettled(current3); calls += 1) {
92474
+ current3 = await client.post(WHATSAPP_BUSINESS_REST_PATHS.sendStatus, {
92475
+ sendId: current3.id,
91884
92476
  waitSeconds: STATUS_WAIT_SECONDS
91885
92477
  });
91886
92478
  }
91887
- return current2;
92479
+ return current3;
91888
92480
  }
91889
92481
  async function secretsOf3({ context, args }) {
91890
92482
  if (SECRET_FLAGS4.some((flag2) => args.flags[flag2] !== void 0)) {
@@ -92237,14 +92829,14 @@ async function read3({ context, args }) {
92237
92829
  `);
92238
92830
  }
92239
92831
  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,
92832
+ let current3 = send5;
92833
+ for (let calls = 0; calls < STATUS_CALLS2 && !SETTLED.has(current3.state); calls += 1) {
92834
+ current3 = await client.post(PATHS3.sendStatus, {
92835
+ sendId: current3.id,
92244
92836
  waitSeconds: STATUS_WAIT_SECONDS2
92245
92837
  });
92246
92838
  }
92247
- return current2;
92839
+ return current3;
92248
92840
  }
92249
92841
  function report3({ context, args, send: send5 }) {
92250
92842
  if (args.flags.json) context.out(`${JSON.stringify(send5, null, 2)}