@lazehq/cli 0.1.61 → 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 +824 -204
  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);
@@ -6721,14 +6950,14 @@ var require_connect = __commonJS({
6721
6950
  const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions);
6722
6951
  timeout = timeout == null ? 1e4 : timeout;
6723
6952
  allowH2 = allowH2 != null ? allowH2 : true;
6724
- return function connect7({ hostname: hostname6, host: host2, protocol, port, servername, localAddress, httpSocket }, callback) {
6953
+ return function connect7({ hostname: hostname7, host: host2, protocol, port, servername, localAddress, httpSocket }, callback) {
6725
6954
  let socket;
6726
6955
  if (protocol === "https:") {
6727
6956
  if (!tls) {
6728
6957
  tls = __require("node:tls");
6729
6958
  }
6730
6959
  servername = servername || options.servername || util.getServerName(host2) || null;
6731
- const sessionKey = servername || hostname6;
6960
+ const sessionKey = servername || hostname7;
6732
6961
  assert2(sessionKey);
6733
6962
  const session = customSession || sessionCache.get(sessionKey) || null;
6734
6963
  port = port || 443;
@@ -6743,7 +6972,7 @@ var require_connect = __commonJS({
6743
6972
  socket: httpSocket,
6744
6973
  // upgrade socket connection
6745
6974
  port,
6746
- host: hostname6
6975
+ host: hostname7
6747
6976
  });
6748
6977
  socket.on("session", function(session2) {
6749
6978
  sessionCache.set(sessionKey, session2);
@@ -6757,16 +6986,16 @@ var require_connect = __commonJS({
6757
6986
  ...options,
6758
6987
  localAddress,
6759
6988
  port,
6760
- host: hostname6
6989
+ host: hostname7
6761
6990
  };
6762
- const family = net.isIP(hostname6);
6763
- if (family !== 0 && servername && servername !== hostname6) {
6991
+ const family = net.isIP(hostname7);
6992
+ if (family !== 0 && servername && servername !== hostname7) {
6764
6993
  connectOptions.host = servername;
6765
6994
  connectOptions.lookup = (_hostname, lookupOptions, cb) => {
6766
6995
  if (lookupOptions.all) {
6767
- cb(null, [{ address: hostname6, family }]);
6996
+ cb(null, [{ address: hostname7, family }]);
6768
6997
  } else {
6769
- cb(null, hostname6, family);
6998
+ cb(null, hostname7, family);
6770
6999
  }
6771
7000
  };
6772
7001
  }
@@ -6779,7 +7008,7 @@ var require_connect = __commonJS({
6779
7008
  const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay;
6780
7009
  socket.setKeepAlive(true, keepAliveInitialDelay);
6781
7010
  }
6782
- const clearConnectTimeout = util.setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname6, port });
7011
+ const clearConnectTimeout = util.setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname7, port });
6783
7012
  socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() {
6784
7013
  queueMicrotask(clearConnectTimeout);
6785
7014
  if (callback) {
@@ -6792,7 +7021,7 @@ var require_connect = __commonJS({
6792
7021
  if (callback) {
6793
7022
  const cb = callback;
6794
7023
  callback = null;
6795
- cb(maybeNormalizeConnectError(err, this, { timeout, hostname: hostname6, port }));
7024
+ cb(maybeNormalizeConnectError(err, this, { timeout, hostname: hostname7, port }));
6796
7025
  }
6797
7026
  });
6798
7027
  return socket;
@@ -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++) {
@@ -13344,20 +13573,20 @@ var require_client = __commonJS({
13344
13573
  function connect7(client) {
13345
13574
  assert2(!client[kConnecting]);
13346
13575
  assert2(!client[kHTTPContext]);
13347
- let { host: host2, hostname: hostname6, protocol, port } = client[kUrl];
13348
- if (hostname6[0] === "[") {
13349
- const idx = hostname6.indexOf("]");
13576
+ let { host: host2, hostname: hostname7, protocol, port } = client[kUrl];
13577
+ if (hostname7[0] === "[") {
13578
+ const idx = hostname7.indexOf("]");
13350
13579
  assert2(idx !== -1);
13351
- const ip2 = hostname6.substring(1, idx);
13580
+ const ip2 = hostname7.substring(1, idx);
13352
13581
  assert2(net.isIPv6(ip2));
13353
- hostname6 = ip2;
13582
+ hostname7 = ip2;
13354
13583
  }
13355
13584
  client[kConnecting] = true;
13356
13585
  if (channels3.beforeConnect.hasSubscribers) {
13357
13586
  channels3.beforeConnect.publish({
13358
13587
  connectParams: {
13359
13588
  host: host2,
13360
- hostname: hostname6,
13589
+ hostname: hostname7,
13361
13590
  protocol,
13362
13591
  port,
13363
13592
  version: client[kHTTPContext]?.version,
@@ -13370,14 +13599,14 @@ var require_client = __commonJS({
13370
13599
  try {
13371
13600
  client[kConnector]({
13372
13601
  host: host2,
13373
- hostname: hostname6,
13602
+ hostname: hostname7,
13374
13603
  protocol,
13375
13604
  port,
13376
13605
  servername: client[kServerName],
13377
13606
  localAddress: client[kLocalAddress]
13378
13607
  }, (err, socket) => {
13379
13608
  if (err) {
13380
- handleConnectError(client, err, { host: host2, hostname: hostname6, protocol, port });
13609
+ handleConnectError(client, err, { host: host2, hostname: hostname7, protocol, port });
13381
13610
  client[kResume]();
13382
13611
  return;
13383
13612
  }
@@ -13391,7 +13620,7 @@ var require_client = __commonJS({
13391
13620
  client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket);
13392
13621
  } catch (err2) {
13393
13622
  socket.destroy().on("error", noop2);
13394
- handleConnectError(client, err2, { host: host2, hostname: hostname6, protocol, port });
13623
+ handleConnectError(client, err2, { host: host2, hostname: hostname7, protocol, port });
13395
13624
  client[kResume]();
13396
13625
  return;
13397
13626
  }
@@ -13404,7 +13633,7 @@ var require_client = __commonJS({
13404
13633
  channels3.connected.publish({
13405
13634
  connectParams: {
13406
13635
  host: host2,
13407
- hostname: hostname6,
13636
+ hostname: hostname7,
13408
13637
  protocol,
13409
13638
  port,
13410
13639
  version: client[kHTTPContext]?.version,
@@ -13419,11 +13648,11 @@ var require_client = __commonJS({
13419
13648
  client[kResume]();
13420
13649
  });
13421
13650
  } catch (err) {
13422
- handleConnectError(client, err, { host: host2, hostname: hostname6, protocol, port });
13651
+ handleConnectError(client, err, { host: host2, hostname: hostname7, protocol, port });
13423
13652
  client[kResume]();
13424
13653
  }
13425
13654
  }
13426
- function handleConnectError(client, err, { host: host2, hostname: hostname6, protocol, port }) {
13655
+ function handleConnectError(client, err, { host: host2, hostname: hostname7, protocol, port }) {
13427
13656
  if (client.destroyed) {
13428
13657
  return;
13429
13658
  }
@@ -13432,7 +13661,7 @@ var require_client = __commonJS({
13432
13661
  channels3.connectError.publish({
13433
13662
  connectParams: {
13434
13663
  host: host2,
13435
- hostname: hostname6,
13664
+ hostname: hostname7,
13436
13665
  protocol,
13437
13666
  port,
13438
13667
  version: client[kHTTPContext]?.version,
@@ -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);
@@ -15487,10 +15716,10 @@ var require_env_http_proxy_agent = __commonJS({
15487
15716
  ]);
15488
15717
  }
15489
15718
  #getProxyAgentForUrl(url2) {
15490
- let { protocol, host: hostname6, port } = url2;
15491
- hostname6 = hostname6.replace(/:\d*$/, "").replace(/^\[(.+)\]$/, "$1").toLowerCase();
15719
+ let { protocol, host: hostname7, port } = url2;
15720
+ hostname7 = hostname7.replace(/:\d*$/, "").replace(/^\[(.+)\]$/, "$1").toLowerCase();
15492
15721
  port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0;
15493
- if (!this.#shouldProxy(hostname6, port)) {
15722
+ if (!this.#shouldProxy(hostname7, port)) {
15494
15723
  return this[kNoProxyAgent];
15495
15724
  }
15496
15725
  if (protocol === "https:") {
@@ -15498,7 +15727,7 @@ var require_env_http_proxy_agent = __commonJS({
15498
15727
  }
15499
15728
  return this[kHttpProxyAgent];
15500
15729
  }
15501
- #shouldProxy(hostname6, port) {
15730
+ #shouldProxy(hostname7, port) {
15502
15731
  if (this.#noProxyChanged) {
15503
15732
  this.#parseNoProxy();
15504
15733
  }
@@ -15513,10 +15742,10 @@ var require_env_http_proxy_agent = __commonJS({
15513
15742
  if (entry.port && entry.port !== port) {
15514
15743
  continue;
15515
15744
  }
15516
- if (hostname6 === entry.hostname) {
15745
+ if (hostname7 === entry.hostname) {
15517
15746
  return false;
15518
15747
  }
15519
- if (hostname6.slice(-(entry.hostname.length + 1)) === `.${entry.hostname}`) {
15748
+ if (hostname7.slice(-(entry.hostname.length + 1)) === `.${entry.hostname}`) {
15520
15749
  return false;
15521
15750
  }
15522
15751
  }
@@ -15531,21 +15760,21 @@ var require_env_http_proxy_agent = __commonJS({
15531
15760
  if (!entry) {
15532
15761
  continue;
15533
15762
  }
15534
- let hostname6, port;
15763
+ let hostname7, port;
15535
15764
  const ipv6WithPort = entry.match(/^\[(.+)\]:(\d+)$/);
15536
15765
  if (ipv6WithPort) {
15537
- hostname6 = ipv6WithPort[1];
15766
+ hostname7 = ipv6WithPort[1];
15538
15767
  port = Number.parseInt(ipv6WithPort[2], 10);
15539
15768
  } else {
15540
15769
  const unbracketed = entry.replace(/^\[(.+)\]$/, "$1");
15541
15770
  const colonCount = (unbracketed.match(/:/g) || []).length;
15542
15771
  const parsed = colonCount === 1 && unbracketed.match(/^(.+):(\d+)$/);
15543
- hostname6 = parsed ? parsed[1] : unbracketed;
15772
+ hostname7 = parsed ? parsed[1] : unbracketed;
15544
15773
  port = parsed ? Number.parseInt(parsed[2], 10) : 0;
15545
15774
  }
15546
15775
  noProxyEntries.push({
15547
15776
  // strip leading dot or asterisk with dot
15548
- hostname: hostname6.replace(/^\*?\./, "").toLowerCase(),
15777
+ hostname: hostname7.replace(/^\*?\./, "").toLowerCase(),
15549
15778
  port
15550
15779
  });
15551
15780
  }
@@ -20012,14 +20241,14 @@ var require_dns = __commonJS({
20012
20241
  get size() {
20013
20242
  return this.#records.size;
20014
20243
  }
20015
- get(hostname6) {
20016
- return this.#records.get(hostname6) ?? null;
20244
+ get(hostname7) {
20245
+ return this.#records.get(hostname7) ?? null;
20017
20246
  }
20018
- set(hostname6, records) {
20019
- this.#records.set(hostname6, records);
20247
+ set(hostname7, records) {
20248
+ this.#records.set(hostname7, records);
20020
20249
  }
20021
- delete(hostname6) {
20022
- this.#records.delete(hostname6);
20250
+ delete(hostname7) {
20251
+ this.#records.delete(hostname7);
20023
20252
  }
20024
20253
  // Delegate to storage decide can we do more lookups or not
20025
20254
  full() {
@@ -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.61";
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,
@@ -38717,9 +39205,9 @@ var asciiTabOrNewline = /[\t\n\r]/g;
38717
39205
  function stripTabAndNewline(value) {
38718
39206
  return value.replace(asciiTabOrNewline, "");
38719
39207
  }
38720
- function urlHostnameOk(url2, hostname6) {
38721
- hostname6.lastIndex = 0;
38722
- return hostname6.test(url2.hostname);
39208
+ function urlHostnameOk(url2, hostname7) {
39209
+ hostname7.lastIndex = 0;
39210
+ return hostname7.test(url2.hostname);
38723
39211
  }
38724
39212
  function urlProtocolOk(url2, protocol) {
38725
39213
  protocol.lastIndex = 0;
@@ -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. */
@@ -61676,7 +62206,9 @@ var openVaultTurnInputSchemaDefinition = external_exports.object({
61676
62206
  kind: vaultAgentKindSchema,
61677
62207
  ownerUserId: external_exports.string().min(1),
61678
62208
  /** The login pool the agent draws its harness login from; only that pool's logins reach. */
61679
- loginPoolId: external_exports.string().min(1).nullable().default(null)
62209
+ loginPoolId: external_exports.string().min(1).nullable().default(null),
62210
+ /** A session outside Laze, which has no agent record: how its cards name it. */
62211
+ label: external_exports.string().max(300).nullish()
61680
62212
  }),
61681
62213
  requesterUserId: external_exports.string().min(1),
61682
62214
  requesterGroupIds: external_exports.array(external_exports.string().min(1)).default([]),
@@ -61822,7 +62354,9 @@ var vaultApprovalRequestSchemaDefinition = external_exports.object({
61822
62354
  /** The longest lease Allow for this agent offers; null offers only once and deny. */
61823
62355
  maxLeaseSeconds: external_exports.number().int().positive().nullable().default(null),
61824
62356
  /** Allow covers the rest of the agent's turn ("Allow for this task"), not one command. */
61825
- coversTask: external_exports.boolean().optional()
62357
+ coversTask: external_exports.boolean().optional(),
62358
+ /** Who asks when it is a session outside Laze, not an agent: "Claude Code session on pat-mac". */
62359
+ agentLabel: external_exports.string().nullable().optional()
61826
62360
  });
61827
62361
  var vaultApprovalRequestSchema = vaultApprovalRequestSchemaDefinition;
61828
62362
  var answerVaultApprovalInputSchemaDefinition = external_exports.object({
@@ -62028,6 +62562,10 @@ var copyConnectionValueInputSchemaDefinition = external_exports.object({
62028
62562
  });
62029
62563
  var VaultApi = moduleApi()("vault");
62030
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
+ });
62031
62569
  var connectionInput = external_exports.object({
62032
62570
  workspaceId: external_exports.string().min(1),
62033
62571
  connectionId: external_exports.string().min(1)
@@ -62040,7 +62578,7 @@ var vaultTrpc = defineTrpcContract("vault").mutation("createConnection").withInp
62040
62578
  reason: external_exports.string().trim().min(1).max(200),
62041
62579
  reauthToken: external_exports.string().min(1).max(200).optional()
62042
62580
  })
62043
- ).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(
62044
62582
  external_exports.object({
62045
62583
  ...connectionInput.shape,
62046
62584
  reason: external_exports.string().trim().min(1).max(200),
@@ -62051,12 +62589,12 @@ var vaultTrpc = defineTrpcContract("vault").mutation("createConnection").withInp
62051
62589
  // ../../modules/vault/contract/src/vault.config.ts
62052
62590
  var positiveInt = external_exports.coerce.number().int().positive();
62053
62591
  var vaultConfig = Config.define((c) => ({
62054
- approvalTimeoutMinutes: c.env("VAULT_APPROVAL_TIMEOUT_MINUTES", positiveInt.default(720)),
62592
+ approvalTimeoutMinutes: c.env("VAULT_APPROVAL_TIMEOUT_MINUTES", positiveInt.default(1440)),
62055
62593
  /** How long an approve-once answer waits for the same ask to come back for it. */
62056
62594
  approveOnceWindowMinutes: c.env("VAULT_APPROVE_ONCE_WINDOW_MINUTES", positiveInt.default(10)),
62057
62595
  /** The lease cap when an admin set none on the connection. */
62058
62596
  defaultMaxLeaseHours: c.env("VAULT_DEFAULT_MAX_LEASE_HOURS", positiveInt.default(48)),
62059
- turnTtlMinutes: c.env("VAULT_TURN_TTL_MINUTES", positiveInt.default(720)),
62597
+ turnTtlMinutes: c.env("VAULT_TURN_TTL_MINUTES", positiveInt.default(1440)),
62060
62598
  /** The judge runs only when this is on and its key is set; off, Checked asks a person. */
62061
62599
  judgeEnabled: c.env("VAULT_JUDGE_ENABLED", environmentBooleanSchema.default(false)),
62062
62600
  judgeTimeoutMs: c.env("VAULT_JUDGE_TIMEOUT_MS", positiveInt.default(2e4)),
@@ -62165,7 +62703,9 @@ var vaultApprovalRequestedPayloadSchemaDefinition = external_exports.object({
62165
62703
  /** Allow covers the rest of the agent's turn ("Allow for this task"), not one command. */
62166
62704
  coversTask: external_exports.boolean().optional(),
62167
62705
  /** What a task card's Allow covers when it is wider than one turn: "this session of ...". */
62168
- taskScope: external_exports.string().nullable().optional()
62706
+ taskScope: external_exports.string().nullable().optional(),
62707
+ /** Who asks when it is a session outside Laze, not an agent: "Claude Code session on pat-mac". */
62708
+ agentLabel: external_exports.string().nullable().optional()
62169
62709
  });
62170
62710
  var vaultApprovalResolvedPayloadSchemaDefinition = external_exports.object({
62171
62711
  workspaceId: external_exports.string().min(1),
@@ -62623,19 +63163,19 @@ function clustersIn({
62623
63163
  flagged
62624
63164
  }) {
62625
63165
  const out = [];
62626
- let current2 = null;
63166
+ let current3 = null;
62627
63167
  for (let index = segment.start; index <= segment.end; index += 1) {
62628
63168
  const count5 = flagged[index] ?? 0;
62629
63169
  if (count5 === 0) continue;
62630
- if (current2 && index - current2.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
62631
- current2.end = index;
62632
- current2.values += count5;
63170
+ if (current3 && index - current3.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
63171
+ current3.end = index;
63172
+ current3.values += count5;
62633
63173
  continue;
62634
63174
  }
62635
- if (current2) out.push(current2);
62636
- current2 = { start: index, end: index, values: count5 };
63175
+ if (current3) out.push(current3);
63176
+ current3 = { start: index, end: index, values: count5 };
62637
63177
  }
62638
- if (current2) out.push(current2);
63178
+ if (current3) out.push(current3);
62639
63179
  return out;
62640
63180
  }
62641
63181
  function redactedBlocks({
@@ -62905,6 +63445,32 @@ var vaultAwsSessionSchemaDefinition = external_exports.object({
62905
63445
  expiration: external_exports.iso.datetime({ offset: true })
62906
63446
  });
62907
63447
 
63448
+ // ../../modules/vault/contract/src/vault-session.ts
63449
+ var vaultSessionSchemaDefinition = external_exports.object({
63450
+ /** `claude-code`, `codex`, `kanban`, `terminal` or `script`. */
63451
+ harness: external_exports.enum(["claude-code", "codex", "kanban", "terminal", "script"]),
63452
+ /** The harness's session id, the card id, or the terminal; one lease per id. */
63453
+ id: external_exports.string().trim().min(1).max(200),
63454
+ /** What the person calls it: `--as`, LAZE_SESSION_NAME, or the Kanban card. */
63455
+ name: external_exports.string().trim().max(120).default(""),
63456
+ host: external_exports.string().trim().max(200).default(""),
63457
+ /** The folder the session works in, `~/proj` under the home folder. */
63458
+ folder: external_exports.string().trim().max(500).default("")
63459
+ });
63460
+ var vaultSessionSchema = vaultSessionSchemaDefinition;
63461
+ var vaultSessionReleaseInputSchemaDefinition = external_exports.object({
63462
+ ...vaultEgressReleaseInputSchema.omit({ agentId: true }).shape,
63463
+ session: vaultSessionSchema
63464
+ });
63465
+ var vaultSessionStatusInputSchemaDefinition = external_exports.object({
63466
+ requestId: external_exports.string().min(1).max(64),
63467
+ session: vaultSessionSchema
63468
+ });
63469
+ var vaultSessionBatchInputSchemaDefinition = external_exports.object({
63470
+ ...vaultBatchReleaseInputSchema.omit({ agentId: true }).shape,
63471
+ session: vaultSessionSchema
63472
+ });
63473
+
62908
63474
  // ../../modules/vault/contract/src/vault-placeholders.ts
62909
63475
  var PLACEHOLDER = /\{\{\s*vault:[^}]*\}\}/;
62910
63476
  function unusableFieldProblems({
@@ -68048,8 +68614,8 @@ function withHooks({
68048
68614
  event,
68049
68615
  added
68050
68616
  }) {
68051
- const current2 = Array.isArray(hooks[event]) ? hooks[event] : [];
68052
- const others = current2.filter(
68617
+ const current3 = Array.isArray(hooks[event]) ? hooks[event] : [];
68618
+ const others = current3.filter(
68053
68619
  (entry) => !entry.hooks?.some((hook) => hook.command?.includes(LAZE_HOOK_MARKER))
68054
68620
  );
68055
68621
  hooks[event] = [...others, ...added.map((hook) => ({ hooks: [hook] }))];
@@ -69041,7 +69607,7 @@ function bodyAsText({
69041
69607
  mentions
69042
69608
  }) {
69043
69609
  const actorName = (kind2, id2) => mentions.actors.find((actor) => actor.kind === kind2 && actor.id === id2)?.name ?? kind2;
69044
- const written = withSlackPeopleAsNames(body);
69610
+ const written = withSlackMarkupAsText(body);
69045
69611
  let text2 = "";
69046
69612
  let from = 0;
69047
69613
  for (const token2 of written.matchAll(TOKEN)) {
@@ -69734,11 +70300,14 @@ async function preToolHook({ context, args }) {
69734
70300
  const asked = await pluginHookArgs({ context, args, session, claudePid: 0 });
69735
70301
  if (!asked) return;
69736
70302
  const { name: name3, profile } = await signedIn({ context, args: asked });
69737
- const client = LazeClient.create({
69738
- baseUrl: profile.url,
69739
- token: profile.token,
69740
- fetcher: (input3, init) => context.fetcher(input3, { ...init, signal: AbortSignal.timeout(PRE_TOOL_TIMEOUT_MS) }),
69741
- 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
69742
70311
  });
69743
70312
  const state = await readState({ context, agent: name3 });
69744
70313
  const answer5 = await beat({ client, state, working: true });
@@ -71453,12 +72022,12 @@ function setAgent(run4, profile, agent3) {
71453
72022
  }
71454
72023
  async function syncLoops(run4) {
71455
72024
  const config2 = await run4.context.store.read();
71456
- for (const [profile, current2] of run4.served) {
72025
+ for (const [profile, current3] of run4.served) {
71457
72026
  const entry = config2.profiles[profile];
71458
- const same2 = entry?.token === current2.token && entry.delivery?.threadId === current2.threadId;
72027
+ const same2 = entry?.token === current3.token && entry.delivery?.threadId === current3.threadId;
71459
72028
  if (same2 && !entry.migrated) continue;
71460
- current2.stop.abort();
71461
- await current2.done;
72029
+ current3.stop.abort();
72030
+ await current3.done;
71462
72031
  run4.served.delete(profile);
71463
72032
  setAgent(run4, profile, void 0);
71464
72033
  }
@@ -71528,8 +72097,8 @@ async function runConnectLoop({ context }) {
71528
72097
  }
71529
72098
  } finally {
71530
72099
  await relays.stopAll();
71531
- for (const current2 of run4.served.values()) current2.stop.abort();
71532
- 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));
71533
72102
  if (await holdsLock(run4)) await rm2(run4.path, { force: true });
71534
72103
  }
71535
72104
  return 0;
@@ -72974,13 +73543,13 @@ async function installHooks({
72974
73543
  }) {
72975
73544
  const folder = join16(directory, ".claude");
72976
73545
  const path = join16(folder, "settings.local.json");
72977
- const current2 = await readFile14(path, "utf8").then(
73546
+ const current3 = await readFile14(path, "utf8").then(
72978
73547
  (text2) => JSON.parse(text2),
72979
73548
  () => ({})
72980
73549
  );
72981
73550
  const command = (hook) => hookCommand({ program: context.program, profile, hook });
72982
73551
  const settings3 = withLazeHooks({
72983
- settings: current2,
73552
+ settings: current3,
72984
73553
  stopCommand: command("stop"),
72985
73554
  waitCommand: command("wait"),
72986
73555
  preToolCommand: command("pre-tool")
@@ -73206,7 +73775,9 @@ async function handOver({ context, args }) {
73206
73775
  await reportTranscript({ client, input: input2 }).catch(
73207
73776
  (error62) => reportFailed({ context, error: error62 })
73208
73777
  );
73209
- if (input2.stop_hook_active) return;
73778
+ if (input2.stop_hook_active) {
73779
+ return turnEnded({ context, client: forSession({ client, session }), agent: agent3 });
73780
+ }
73210
73781
  if (await monitorServes({ context, profile: agent3, claudePid })) {
73211
73782
  return turnEnded({ context, client, agent: agent3 });
73212
73783
  }
@@ -74055,36 +74626,36 @@ var bytesOf2 = (text2) => Buffer.byteLength(text2, "utf8");
74055
74626
  function piecesOf({ line, maxBytes }) {
74056
74627
  if (bytesOf2(line) <= maxBytes) return [line];
74057
74628
  const pieces = [];
74058
- let current2 = "";
74629
+ let current3 = "";
74059
74630
  let size = 0;
74060
74631
  for (const char of line) {
74061
74632
  const width = bytesOf2(char);
74062
74633
  if (size + width > maxBytes) {
74063
- pieces.push(current2);
74064
- current2 = "";
74634
+ pieces.push(current3);
74635
+ current3 = "";
74065
74636
  size = 0;
74066
74637
  }
74067
- current2 += char;
74638
+ current3 += char;
74068
74639
  size += width;
74069
74640
  }
74070
- if (current2) pieces.push(current2);
74641
+ if (current3) pieces.push(current3);
74071
74642
  return pieces;
74072
74643
  }
74073
74644
  function packed({ lines: lines2, maxBytes }) {
74074
74645
  const parts = [];
74075
- let current2 = "";
74646
+ let current3 = "";
74076
74647
  let size = 0;
74077
74648
  for (const piece of lines2.flatMap((line) => piecesOf({ line, maxBytes }))) {
74078
74649
  const width = bytesOf2(piece);
74079
- if (size + width > maxBytes && current2) {
74080
- parts.push(current2);
74081
- current2 = "";
74650
+ if (size + width > maxBytes && current3) {
74651
+ parts.push(current3);
74652
+ current3 = "";
74082
74653
  size = 0;
74083
74654
  }
74084
- current2 += piece;
74655
+ current3 += piece;
74085
74656
  size += width;
74086
74657
  }
74087
- if (current2) parts.push(current2);
74658
+ if (current3) parts.push(current3);
74088
74659
  return parts;
74089
74660
  }
74090
74661
  function transcriptPartsOf({
@@ -77167,9 +77738,9 @@ async function listFiles(folder) {
77167
77738
  const found = [];
77168
77739
  const pending2 = [folder];
77169
77740
  while (pending2.length > 0 && found.length <= MAX_FILES) {
77170
- const current2 = pending2.pop() ?? folder;
77171
- for (const entry of await readdir6(current2, { withFileTypes: true })) {
77172
- 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);
77173
77744
  const rel = relative3(folder, path).split(sep3).join("/");
77174
77745
  if (isSkippedPath({ path: rel })) continue;
77175
77746
  if (entry.isDirectory()) pending2.push(path);
@@ -78701,12 +79272,41 @@ function loginValuesOf({
78701
79272
  // src/services/vault-commands.service.ts
78702
79273
  import { createHash as createHash4 } from "node:crypto";
78703
79274
  import { mkdir as mkdir17, readFile as readFile19, rm as rm9, writeFile as writeFile17 } from "node:fs/promises";
78704
- import { tmpdir as tmpdir2 } from "node:os";
79275
+ import { hostname as hostname6, tmpdir as tmpdir2 } from "node:os";
78705
79276
  import { dirname as dirname17, join as join21 } from "node:path";
79277
+
79278
+ // src/rules/vault-session.rules.ts
79279
+ function vaultSessionOf({
79280
+ harnessSession,
79281
+ inherited,
79282
+ cwd,
79283
+ host: host2,
79284
+ named,
79285
+ shellPid,
79286
+ terminal
79287
+ }) {
79288
+ const card2 = inherited.KANBAN_CARD_ID?.trim() ?? "";
79289
+ const name3 = (named || inherited.LAZE_SESSION_NAME || (card2 ? `card ${card2}` : "")).trim();
79290
+ const folder = displayFolderOf({
79291
+ folder: inherited.CLAUDE_PROJECT_DIR || cwd,
79292
+ home: inherited.HOME
79293
+ });
79294
+ const base = { name: name3.slice(0, 120), host: host2.slice(0, 200), folder: folder.slice(0, 500) };
79295
+ if (harnessSession && harnessSession.harness !== "other") {
79296
+ return { ...base, harness: harnessSession.harness, id: harnessSession.sessionId.slice(0, 200) };
79297
+ }
79298
+ if (card2) return { ...base, harness: "kanban", id: card2.slice(0, 200) };
79299
+ if (terminal && shellPid) return { ...base, harness: "terminal", id: `shell ${shellPid}` };
79300
+ return { ...base, harness: "script", id: folder.slice(0, 200) || "script" };
79301
+ }
79302
+
79303
+ // src/services/vault-commands.service.ts
78706
79304
  var USAGE6 = `Usage: laze vault run <connection> --reason "<one plain sentence>" [--wait <s>] -- <command> [args...]
78707
79305
  Runs the command with the connection's values in its environment, on a Laze agent's computer,
78708
- on a machine it runs on, or where a connected agent runs, with its own key.
78709
- --channel <id> the conversation whose turn it runs in, when the agent answers in several`;
79306
+ on a machine it runs on, where a connected agent runs, or signed in as yourself, where it asks
79307
+ as the calling Claude Code, Codex, Kanban or terminal session.
79308
+ --channel <id> the conversation whose turn it runs in, when the agent answers in several
79309
+ --as <name> the session's name on the card when signed in as yourself (or LAZE_SESSION_NAME)`;
78710
79310
  var POLL_MS = 3e3;
78711
79311
  var RESTART_WAIT_MS = 12e4;
78712
79312
  var RESTART_BACKOFF_MS = [1e3, 2e3, 4e3, 8e3, 1e4];
@@ -78861,7 +79461,7 @@ async function untilAnswered({
78861
79461
  return "capped";
78862
79462
  }
78863
79463
  if (release2 === first) {
78864
- context.err(`${release2.message}. Waiting for an answer (cards expire after 12 hours)...
79464
+ context.err(`${release2.message}. Waiting for an answer (cards expire after 24 hours)...
78865
79465
  `);
78866
79466
  }
78867
79467
  await context.sleep(POLL_MS);
@@ -78947,6 +79547,22 @@ function refusedRelease(error62) {
78947
79547
  message: `laze vault: the release was refused: ${error62.message} (${error62.code})`
78948
79548
  };
78949
79549
  }
79550
+ var WHERE = "works only on a Laze agent's computer, on a machine it runs on, or signed in with `laze login` (as yourself or as a connected agent)";
79551
+ async function vaultSessionFor({
79552
+ context,
79553
+ args,
79554
+ harnessSession
79555
+ }) {
79556
+ return vaultSessionOf({
79557
+ harnessSession,
79558
+ inherited: context.environment.inherited,
79559
+ cwd: context.cwd,
79560
+ host: hostname6(),
79561
+ named: flagText({ args, name: "as" }),
79562
+ shellPid: await context.processes.parentOf(context.processes.pid),
79563
+ terminal: context.stdoutIsTerminal === true
79564
+ });
79565
+ }
78950
79566
  async function keyRelease({
78951
79567
  context,
78952
79568
  args,
@@ -78955,27 +79571,27 @@ async function keyRelease({
78955
79571
  command,
78956
79572
  deadline
78957
79573
  }) {
78958
- const where = new CliUsageError(
78959
- "laze vault run works only on a Laze agent's computer, on a machine it runs on, or signed in as a connected agent"
78960
- );
78961
79574
  const signed2 = await signedIn({ context, args }).catch(() => null);
78962
- if (signed2?.profile.kind !== "agent") throw where;
79575
+ if (signed2?.profile.kind !== "agent" && signed2?.profile.kind !== "person") {
79576
+ throw new CliUsageError(`laze vault run ${WHERE}`);
79577
+ }
78963
79578
  const { name: name3 } = signed2;
78964
- const client = forSession({
78965
- client: signed2.client,
78966
- session: await currentSessionOf({ context, args })
78967
- });
78968
- const channelId = flagText({ args, name: "channel" }) || null;
79579
+ const harnessSession = await currentSessionOf({ context, args });
79580
+ const client = forSession({ client: signed2.client, session: harnessSession });
78969
79581
  const keyPath = runKeyPathOf({ turnFile: void 0, connection, profile: name3 });
78970
79582
  const run4 = await runKeyAt({ path: keyPath });
78971
- const first = await client.post("/api/agents/me/vault/release", {
78972
- connection,
78973
- reason,
78974
- command,
78975
- recipient: run4.publicKey,
78976
- channelId
78977
- }).catch(refusedRelease);
78978
- const next = (requestId) => client.post("/api/agents/me/vault/release-status", { requestId, channelId }).catch(refusedRelease);
79583
+ const body = { connection, reason, command, recipient: run4.publicKey };
79584
+ const door = signed2.profile.kind === "person" ? {
79585
+ ask: "/api/vault/session/release",
79586
+ status: "/api/vault/session/release-status",
79587
+ extra: { session: await vaultSessionFor({ context, args, harnessSession }) }
79588
+ } : {
79589
+ ask: "/api/agents/me/vault/release",
79590
+ status: "/api/agents/me/vault/release-status",
79591
+ extra: { channelId: flagText({ args, name: "channel" }) || null }
79592
+ };
79593
+ const first = await client.post(door.ask, { ...body, ...door.extra }).catch(refusedRelease);
79594
+ const next = (requestId) => client.post(door.status, { requestId, ...door.extra }).catch(refusedRelease);
78979
79595
  const release2 = await untilAnswered({ context, first, next, deadline });
78980
79596
  return settled({ context, release: release2, run: run4, keyPath });
78981
79597
  }
@@ -82893,10 +83509,10 @@ function servicesLine(status10) {
82893
83509
  return [` Computer services (browser, desktop, system) memory ${gb(servicesGb)}`];
82894
83510
  }
82895
83511
  function printStatus({ context }, status10) {
82896
- const current2 = status10.sizes.find((size) => size.current);
83512
+ const current3 = status10.sizes.find((size) => size.current);
82897
83513
  const included = status10.sizes.find((size) => size.included);
82898
83514
  const lines2 = [
82899
- `${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)`,
82900
83516
  stateLine(status10),
82901
83517
  `CPU: ${Number(status10.cpu.busy.toFixed(1))} of ${status10.cpu.vcpu} vCPU busy`,
82902
83518
  `Memory: ${gb(status10.memory.usedGb)} of ${gb(status10.memory.totalGb)}`,
@@ -85139,7 +85755,7 @@ function print7({ context, args, answer: answer5, text: text2 }) {
85139
85755
  context.out(args.flags.json ? `${JSON.stringify(answer5, null, 2)}
85140
85756
  ` : text2(answer5));
85141
85757
  }
85142
- async function current({ context, args }) {
85758
+ async function current2({ context, args }) {
85143
85759
  const { client } = await signedIn({ context, args });
85144
85760
  const answer5 = await client.get("/api/workspaces/current");
85145
85761
  print7({
@@ -85352,7 +85968,7 @@ var WORKSPACE_COMMANDS = {
85352
85968
  };
85353
85969
  async function workspace({ context, args }) {
85354
85970
  const sub = args.words[1];
85355
- if (!sub) return current({ context, args });
85971
+ if (!sub) return current2({ context, args });
85356
85972
  const command = Object.hasOwn(WORKSPACE_COMMANDS, sub) ? WORKSPACE_COMMANDS[sub] : void 0;
85357
85973
  if (!command)
85358
85974
  throw new CliUsageError(
@@ -88740,12 +89356,12 @@ function fileRef({ context, args }) {
88740
89356
  function printDocument({
88741
89357
  context,
88742
89358
  args,
88743
- document
89359
+ document: document2
88744
89360
  }) {
88745
- 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)}
88746
89362
  `);
88747
89363
  context.out(
88748
- document.content.endsWith("\n") || !document.content ? document.content : `${document.content}
89364
+ document2.content.endsWith("\n") || !document2.content ? document2.content : `${document2.content}
88749
89365
  `
88750
89366
  );
88751
89367
  }
@@ -88853,10 +89469,10 @@ var limitsLine = (limits) => WINDOWS.map(
88853
89469
  function limitsFrom({
88854
89470
  args,
88855
89471
  prefix,
88856
- current: current2
89472
+ current: current3
88857
89473
  }) {
88858
89474
  let changed = false;
88859
- const next = { ...current2 };
89475
+ const next = { ...current3 };
88860
89476
  for (const window2 of WINDOWS) {
88861
89477
  const text2 = flagText({ args, name: `${prefix}${window2}` });
88862
89478
  if (!text2) continue;
@@ -88881,18 +89497,18 @@ function printPolicy(context, policy) {
88881
89497
  }
88882
89498
  async function showPolicy({ context, args }) {
88883
89499
  const { client } = await signedIn({ context, args });
88884
- const current2 = await client.get("/api/models/policy");
88885
- 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)}
88886
89502
  `);
88887
- printPolicy(context, current2);
89503
+ printPolicy(context, current3);
88888
89504
  }
88889
89505
  async function setPolicy({ context, args }) {
88890
89506
  const state = args.words[2];
88891
89507
  if (state !== void 0 && state !== "on" && state !== "off") throw new CliUsageError(USAGE12);
88892
89508
  const { client } = await signedIn({ context, args });
88893
- const current2 = await client.get("/api/models/policy");
88894
- const defaultBudget = limitsFrom({ args, prefix: "default-", current: current2.defaultBudget });
88895
- 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 });
88896
89512
  if (!state && !defaultBudget && !cap) throw new CliUsageError(USAGE12);
88897
89513
  const updated = await client.post("/api/models/policy", {
88898
89514
  ...state ? { lazeModels: state === "on" } : {},
@@ -90812,7 +91428,6 @@ function credentialProcessJson(fields) {
90812
91428
 
90813
91429
  // src/services/vault-batch.service.ts
90814
91430
  import { rm as rm14 } from "node:fs/promises";
90815
- var WHERE = "laze vault env works only on a Laze agent's computer, on a machine it runs on, or signed in as a connected agent";
90816
91431
  async function batchOf({ response }) {
90817
91432
  const text2 = await response.text();
90818
91433
  if (!response.ok) {
@@ -90857,21 +91472,26 @@ async function doorOf({
90857
91472
  };
90858
91473
  }
90859
91474
  const signed2 = await signedIn({ context, args }).catch(() => null);
90860
- if (signed2?.profile.kind !== "agent") throw new CliUsageError(WHERE);
91475
+ if (signed2?.profile.kind !== "agent" && signed2?.profile.kind !== "person") {
91476
+ throw new CliUsageError(`laze vault env ${WHERE}`);
91477
+ }
90861
91478
  const { name: name3 } = signed2;
90862
- const client = forSession({
90863
- client: signed2.client,
90864
- session: await currentSessionOf({ context, args })
90865
- });
90866
- const channelId = flagText({ args, name: "channel" }) || null;
91479
+ const harnessSession = await currentSessionOf({ context, args });
91480
+ const client = forSession({ client: signed2.client, session: harnessSession });
91481
+ const door = signed2.profile.kind === "person" ? {
91482
+ ask: "/api/vault/session/release-batch",
91483
+ status: "/api/vault/session/release-status",
91484
+ extra: { session: await vaultSessionFor({ context, args, harnessSession }) }
91485
+ } : {
91486
+ ask: "/api/agents/me/vault/release-batch",
91487
+ status: "/api/agents/me/vault/release-status",
91488
+ extra: { channelId: flagText({ args, name: "channel" }) || null }
91489
+ };
90867
91490
  return {
90868
91491
  keyPath: runKeyPathOf({ turnFile: void 0, connection: keyName, profile: name3 }),
90869
91492
  ask: async (body) => {
90870
91493
  try {
90871
- return await client.post("/api/agents/me/vault/release-batch", {
90872
- ...body,
90873
- channelId
90874
- });
91494
+ return await client.post(door.ask, { ...body, ...door.extra });
90875
91495
  } catch (error62) {
90876
91496
  if (!(error62 instanceof LazeApiError)) throw error62;
90877
91497
  throw new CliUsageError(
@@ -90879,7 +91499,7 @@ async function doorOf({
90879
91499
  );
90880
91500
  }
90881
91501
  },
90882
- status: (requestId) => client.post("/api/agents/me/vault/release-status", { requestId, channelId }).catch(refusedRelease)
91502
+ status: (requestId) => client.post(door.status, { requestId, ...door.extra }).catch(refusedRelease)
90883
91503
  };
90884
91504
  }
90885
91505
  async function resolveBatch({
@@ -90902,7 +91522,7 @@ async function untilAllAnswered({
90902
91522
  if (waiting.size === 0) return answered;
90903
91523
  const [first] = waiting.values();
90904
91524
  context.err(
90905
- `laze vault: ${[...waiting.keys()].join(", ")} wait for an answer (${first?.message ?? "a card"}); cards expire after 12 hours...
91525
+ `laze vault: ${[...waiting.keys()].join(", ")} wait for an answer (${first?.message ?? "a card"}); cards expire after 24 hours...
90906
91526
  `
90907
91527
  );
90908
91528
  while (waiting.size > 0) {
@@ -91796,14 +92416,14 @@ function printSend({
91796
92416
  return ["failed", "denied", "expired"].includes(send5.state) ? 1 : 0;
91797
92417
  }
91798
92418
  async function settle2({ client, send: send5 }) {
91799
- let current2 = send5;
91800
- for (let calls = 0; calls < STATUS_CALLS && !whatsappBusinessSendSettled(current2); calls += 1) {
91801
- current2 = await client.post(WHATSAPP_BUSINESS_REST_PATHS.sendStatus, {
91802
- 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,
91803
92423
  waitSeconds: STATUS_WAIT_SECONDS
91804
92424
  });
91805
92425
  }
91806
- return current2;
92426
+ return current3;
91807
92427
  }
91808
92428
  async function secretsOf3({ context, args }) {
91809
92429
  if (SECRET_FLAGS4.some((flag2) => args.flags[flag2] !== void 0)) {
@@ -92156,14 +92776,14 @@ async function read3({ context, args }) {
92156
92776
  `);
92157
92777
  }
92158
92778
  async function settle3({ client, send: send5 }) {
92159
- let current2 = send5;
92160
- for (let calls = 0; calls < STATUS_CALLS2 && !SETTLED.has(current2.state); calls += 1) {
92161
- current2 = await client.post(PATHS3.sendStatus, {
92162
- 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,
92163
92783
  waitSeconds: STATUS_WAIT_SECONDS2
92164
92784
  });
92165
92785
  }
92166
- return current2;
92786
+ return current3;
92167
92787
  }
92168
92788
  function report3({ context, args, send: send5 }) {
92169
92789
  if (args.flags.json) context.out(`${JSON.stringify(send5, null, 2)}
@@ -92558,7 +93178,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
92558
93178
  laze agent faces every agent's sloth seed or picture
92559
93179
  laze adopt codex [--thread <id>] answer Laze messages in a Codex thread
92560
93180
  laze adopt codex --status | --stop the background adopt that laze agent link started
92561
- laze vault run <name> --reason "<why>" -- <cmd> run a command with a vault connection (agents)
93181
+ laze vault run <name> --reason "<why>" -- <cmd> run a command with a vault connection
92562
93182
  laze vault env [<file>] --reason "<why>" -- <cmd> run a command with every key .env.vault names (agents)
92563
93183
  laze vault env --names | --shell what .env.vault resolves to; export lines for a shell hook
92564
93184
  laze vault aws <connection> [--reason "<why>"] AWS credential_process JSON from a short-lived STS session