@lazehq/cli 0.1.112 → 0.1.113
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.
- package/dist/laze.mjs +627 -306
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -832,11 +832,11 @@ var require_node_gyp_build = __commonJS({
|
|
|
832
832
|
var libc = process.env.LIBC || (isAlpine(platform) ? "musl" : "glibc");
|
|
833
833
|
var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : vars.arm_version) || "";
|
|
834
834
|
var uv = (process.versions.uv || "").split(".")[0];
|
|
835
|
-
module.exports =
|
|
836
|
-
function
|
|
837
|
-
return runtimeRequire(
|
|
835
|
+
module.exports = load2;
|
|
836
|
+
function load2(dir) {
|
|
837
|
+
return runtimeRequire(load2.resolve(dir));
|
|
838
838
|
}
|
|
839
|
-
|
|
839
|
+
load2.resolve = load2.path = function(dir) {
|
|
840
840
|
dir = path.resolve(dir || ".");
|
|
841
841
|
try {
|
|
842
842
|
var name3 = runtimeRequire(path.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
|
|
@@ -976,12 +976,12 @@ var require_node_gyp_build = __commonJS({
|
|
|
976
976
|
function isAlpine(platform2) {
|
|
977
977
|
return platform2 === "linux" && fs.existsSync("/etc/alpine-release");
|
|
978
978
|
}
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
979
|
+
load2.parseTags = parseTags;
|
|
980
|
+
load2.matchTags = matchTags;
|
|
981
|
+
load2.compareTags = compareTags;
|
|
982
|
+
load2.parseTuple = parseTuple;
|
|
983
|
+
load2.matchTuple = matchTuple;
|
|
984
|
+
load2.compareTuples = compareTuples;
|
|
985
985
|
}
|
|
986
986
|
});
|
|
987
987
|
|
|
@@ -7512,14 +7512,14 @@ var require_connect = __commonJS({
|
|
|
7512
7512
|
port,
|
|
7513
7513
|
host: hostname8
|
|
7514
7514
|
};
|
|
7515
|
-
const
|
|
7516
|
-
if (
|
|
7515
|
+
const family2 = net.isIP(hostname8);
|
|
7516
|
+
if (family2 !== 0 && servername && servername !== hostname8) {
|
|
7517
7517
|
connectOptions.host = servername;
|
|
7518
7518
|
connectOptions.lookup = (_hostname, lookupOptions, cb) => {
|
|
7519
7519
|
if (lookupOptions.all) {
|
|
7520
|
-
cb(null, [{ address: hostname8, family }]);
|
|
7520
|
+
cb(null, [{ address: hostname8, family: family2 }]);
|
|
7521
7521
|
} else {
|
|
7522
|
-
cb(null, hostname8,
|
|
7522
|
+
cb(null, hostname8, family2);
|
|
7523
7523
|
}
|
|
7524
7524
|
};
|
|
7525
7525
|
}
|
|
@@ -11254,7 +11254,7 @@ var require_client_h1 = __commonJS({
|
|
|
11254
11254
|
* @param {number} len
|
|
11255
11255
|
* @returns {number}
|
|
11256
11256
|
*/
|
|
11257
|
-
wasm_on_url: (p,
|
|
11257
|
+
wasm_on_url: (p, at4, len) => {
|
|
11258
11258
|
return 0;
|
|
11259
11259
|
},
|
|
11260
11260
|
/**
|
|
@@ -11263,9 +11263,9 @@ var require_client_h1 = __commonJS({
|
|
|
11263
11263
|
* @param {number} len
|
|
11264
11264
|
* @returns {number}
|
|
11265
11265
|
*/
|
|
11266
|
-
wasm_on_status: (p,
|
|
11266
|
+
wasm_on_status: (p, at4, len) => {
|
|
11267
11267
|
assert2(currentParser.ptr === p);
|
|
11268
|
-
const start2 =
|
|
11268
|
+
const start2 = at4 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
11269
11269
|
return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start2, len));
|
|
11270
11270
|
},
|
|
11271
11271
|
/**
|
|
@@ -11282,9 +11282,9 @@ var require_client_h1 = __commonJS({
|
|
|
11282
11282
|
* @param {number} len
|
|
11283
11283
|
* @returns {number}
|
|
11284
11284
|
*/
|
|
11285
|
-
wasm_on_header_field: (p,
|
|
11285
|
+
wasm_on_header_field: (p, at4, len) => {
|
|
11286
11286
|
assert2(currentParser.ptr === p);
|
|
11287
|
-
const start2 =
|
|
11287
|
+
const start2 = at4 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
11288
11288
|
return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start2, len));
|
|
11289
11289
|
},
|
|
11290
11290
|
/**
|
|
@@ -11293,9 +11293,9 @@ var require_client_h1 = __commonJS({
|
|
|
11293
11293
|
* @param {number} len
|
|
11294
11294
|
* @returns {number}
|
|
11295
11295
|
*/
|
|
11296
|
-
wasm_on_header_value: (p,
|
|
11296
|
+
wasm_on_header_value: (p, at4, len) => {
|
|
11297
11297
|
assert2(currentParser.ptr === p);
|
|
11298
|
-
const start2 =
|
|
11298
|
+
const start2 = at4 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
11299
11299
|
return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start2, len));
|
|
11300
11300
|
},
|
|
11301
11301
|
/**
|
|
@@ -11315,9 +11315,9 @@ var require_client_h1 = __commonJS({
|
|
|
11315
11315
|
* @param {number} len
|
|
11316
11316
|
* @returns {number}
|
|
11317
11317
|
*/
|
|
11318
|
-
wasm_on_body: (p,
|
|
11318
|
+
wasm_on_body: (p, at4, len) => {
|
|
11319
11319
|
assert2(currentParser.ptr === p);
|
|
11320
|
-
const start2 =
|
|
11320
|
+
const start2 = at4 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
11321
11321
|
return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start2, len));
|
|
11322
11322
|
},
|
|
11323
11323
|
/**
|
|
@@ -20885,7 +20885,7 @@ var require_dns = __commonJS({
|
|
|
20885
20885
|
#defaultPick(origin, hostnameRecords, affinity) {
|
|
20886
20886
|
let ip2 = null;
|
|
20887
20887
|
const { records, offset } = hostnameRecords;
|
|
20888
|
-
let
|
|
20888
|
+
let family2;
|
|
20889
20889
|
if (this.dualStack) {
|
|
20890
20890
|
if (affinity == null) {
|
|
20891
20891
|
if (offset == null || offset === maxInt) {
|
|
@@ -20897,28 +20897,28 @@ var require_dns = __commonJS({
|
|
|
20897
20897
|
}
|
|
20898
20898
|
}
|
|
20899
20899
|
if (records[affinity] != null && records[affinity].ips.length > 0) {
|
|
20900
|
-
|
|
20900
|
+
family2 = records[affinity];
|
|
20901
20901
|
} else {
|
|
20902
|
-
|
|
20902
|
+
family2 = records[affinity === 4 ? 6 : 4];
|
|
20903
20903
|
}
|
|
20904
20904
|
} else {
|
|
20905
|
-
|
|
20905
|
+
family2 = records[affinity];
|
|
20906
20906
|
}
|
|
20907
|
-
if (
|
|
20907
|
+
if (family2 == null || family2.ips.length === 0) {
|
|
20908
20908
|
return ip2;
|
|
20909
20909
|
}
|
|
20910
|
-
if (
|
|
20911
|
-
|
|
20910
|
+
if (family2.offset == null || family2.offset === maxInt) {
|
|
20911
|
+
family2.offset = 0;
|
|
20912
20912
|
} else {
|
|
20913
|
-
|
|
20913
|
+
family2.offset++;
|
|
20914
20914
|
}
|
|
20915
|
-
const position =
|
|
20916
|
-
ip2 =
|
|
20915
|
+
const position = family2.offset % family2.ips.length;
|
|
20916
|
+
ip2 = family2.ips[position] ?? null;
|
|
20917
20917
|
if (ip2 == null) {
|
|
20918
20918
|
return ip2;
|
|
20919
20919
|
}
|
|
20920
20920
|
if (Date.now() - ip2.timestamp > ip2.ttl) {
|
|
20921
|
-
|
|
20921
|
+
family2.ips.splice(position, 1);
|
|
20922
20922
|
return this.pick(origin, hostnameRecords, affinity);
|
|
20923
20923
|
}
|
|
20924
20924
|
return ip2;
|
|
@@ -20928,22 +20928,22 @@ var require_dns = __commonJS({
|
|
|
20928
20928
|
if (!records) {
|
|
20929
20929
|
return null;
|
|
20930
20930
|
}
|
|
20931
|
-
const
|
|
20932
|
-
if (!
|
|
20931
|
+
const family2 = records[ipFamily];
|
|
20932
|
+
if (!family2) {
|
|
20933
20933
|
return null;
|
|
20934
20934
|
}
|
|
20935
|
-
if (
|
|
20936
|
-
|
|
20935
|
+
if (family2.offset == null || family2.offset === maxInt) {
|
|
20936
|
+
family2.offset = 0;
|
|
20937
20937
|
} else {
|
|
20938
|
-
|
|
20938
|
+
family2.offset++;
|
|
20939
20939
|
}
|
|
20940
|
-
const position =
|
|
20941
|
-
const ip2 =
|
|
20940
|
+
const position = family2.offset % family2.ips.length;
|
|
20941
|
+
const ip2 = family2.ips[position] ?? null;
|
|
20942
20942
|
if (ip2 == null) {
|
|
20943
20943
|
return ip2;
|
|
20944
20944
|
}
|
|
20945
20945
|
if (Date.now() - ip2.timestamp > ip2.ttl) {
|
|
20946
|
-
|
|
20946
|
+
family2.ips.splice(position, 1);
|
|
20947
20947
|
}
|
|
20948
20948
|
return ip2;
|
|
20949
20949
|
}
|
|
@@ -31077,15 +31077,15 @@ ${value}`;
|
|
|
31077
31077
|
pos = 0;
|
|
31078
31078
|
}
|
|
31079
31079
|
}
|
|
31080
|
-
discardLeadingBytes(
|
|
31081
|
-
while (
|
|
31080
|
+
discardLeadingBytes(count10) {
|
|
31081
|
+
while (count10 > 0 && this.lineChunkIndex < this.chunks.length) {
|
|
31082
31082
|
const chunk = this.chunks[this.lineChunkIndex];
|
|
31083
31083
|
const remaining = chunk.length - this.linePos;
|
|
31084
|
-
if (
|
|
31085
|
-
this.linePos +=
|
|
31086
|
-
|
|
31084
|
+
if (count10 < remaining) {
|
|
31085
|
+
this.linePos += count10;
|
|
31086
|
+
count10 = 0;
|
|
31087
31087
|
} else {
|
|
31088
|
-
|
|
31088
|
+
count10 -= remaining;
|
|
31089
31089
|
this.lineChunkIndex++;
|
|
31090
31090
|
this.linePos = 0;
|
|
31091
31091
|
}
|
|
@@ -31723,15 +31723,15 @@ function pairsIn({
|
|
|
31723
31723
|
end,
|
|
31724
31724
|
out
|
|
31725
31725
|
}) {
|
|
31726
|
-
let
|
|
31727
|
-
while (
|
|
31728
|
-
const next = text3.indexOf("&",
|
|
31726
|
+
let at4 = start2;
|
|
31727
|
+
while (at4 < end) {
|
|
31728
|
+
const next = text3.indexOf("&", at4);
|
|
31729
31729
|
const stop3 = next === -1 || next > end ? end : next;
|
|
31730
|
-
const pair = text3.slice(
|
|
31730
|
+
const pair = text3.slice(at4, stop3);
|
|
31731
31731
|
const equals = pair.indexOf("=");
|
|
31732
|
-
if (equals === -1) out.push({ start:
|
|
31733
|
-
else out.push({ start:
|
|
31734
|
-
|
|
31732
|
+
if (equals === -1) out.push({ start: at4, end: stop3, name: "" });
|
|
31733
|
+
else out.push({ start: at4 + equals + 1, end: stop3, name: pair.slice(0, equals) });
|
|
31734
|
+
at4 = stop3 + 1;
|
|
31735
31735
|
}
|
|
31736
31736
|
}
|
|
31737
31737
|
function segmentsIn({
|
|
@@ -31789,8 +31789,8 @@ function isRecordIdValue(value) {
|
|
|
31789
31789
|
const prefix = RECORD_ID.exec(value)?.[1];
|
|
31790
31790
|
return prefix !== void 0 && !CREDENTIAL_ID_PREFIXES.has(prefix);
|
|
31791
31791
|
}
|
|
31792
|
-
function isPlainRecordId({ text: text3, at:
|
|
31793
|
-
return !isSecretParameterName(
|
|
31792
|
+
function isPlainRecordId({ text: text3, at: at4 }) {
|
|
31793
|
+
return !isSecretParameterName(at4.name) && isRecordIdValue(text3.slice(at4.start, at4.end));
|
|
31794
31794
|
}
|
|
31795
31795
|
function isSecretParameterValue(value) {
|
|
31796
31796
|
if (value.length < 8) return false;
|
|
@@ -31834,8 +31834,8 @@ function shannonEntropyBits(value) {
|
|
|
31834
31834
|
const counts = /* @__PURE__ */ new Map();
|
|
31835
31835
|
for (const char of sample) counts.set(char, (counts.get(char) ?? 0) + 1);
|
|
31836
31836
|
let entropy = 0;
|
|
31837
|
-
for (const
|
|
31838
|
-
const p =
|
|
31837
|
+
for (const count10 of counts.values()) {
|
|
31838
|
+
const p = count10 / sample.length;
|
|
31839
31839
|
entropy -= p * Math.log2(p);
|
|
31840
31840
|
}
|
|
31841
31841
|
return entropy;
|
|
@@ -32086,8 +32086,8 @@ var SECRET_RULE_IDS = [
|
|
|
32086
32086
|
URL_PARAMETER_RULE_ID
|
|
32087
32087
|
];
|
|
32088
32088
|
function keptLengthAtBoundary(match) {
|
|
32089
|
-
const
|
|
32090
|
-
return
|
|
32089
|
+
const at4 = match.search(/["'`]/);
|
|
32090
|
+
return at4 === -1 ? match.length : at4;
|
|
32091
32091
|
}
|
|
32092
32092
|
function valueSpan(rule, match) {
|
|
32093
32093
|
const fullStart = match.index ?? 0;
|
|
@@ -32396,41 +32396,41 @@ var FILE_EXTENSION = /^\.[A-Za-z][A-Za-z0-9]{0,7}$/;
|
|
|
32396
32396
|
function isPathShapeMatch({
|
|
32397
32397
|
text: text3,
|
|
32398
32398
|
match,
|
|
32399
|
-
at:
|
|
32399
|
+
at: at4
|
|
32400
32400
|
}) {
|
|
32401
|
-
if (match.end >
|
|
32401
|
+
if (match.end > at4.end) {
|
|
32402
32402
|
const rule = RULES.find((candidate) => candidate.id === match.ruleId);
|
|
32403
|
-
return !rule || rawMatches(rule, text3.slice(
|
|
32403
|
+
return !rule || rawMatches(rule, text3.slice(at4.start, at4.end)).length === 0;
|
|
32404
32404
|
}
|
|
32405
|
-
return FILE_EXTENSION.test(text3.slice(match.end,
|
|
32405
|
+
return FILE_EXTENSION.test(text3.slice(match.end, at4.end));
|
|
32406
32406
|
}
|
|
32407
32407
|
function placedInLink({
|
|
32408
32408
|
text: text3,
|
|
32409
32409
|
match,
|
|
32410
32410
|
urlValues
|
|
32411
32411
|
}) {
|
|
32412
|
-
const
|
|
32413
|
-
if (!
|
|
32412
|
+
const at4 = urlValueAt({ values: urlValues, offset: match.start });
|
|
32413
|
+
if (!at4) return [match];
|
|
32414
32414
|
const shape = SHAPE_RULE_IDS.has(match.ruleId);
|
|
32415
|
-
if (shape && isPlainRecordId({ text: text3, at:
|
|
32416
|
-
if (shape && !isSecretParameterName(
|
|
32417
|
-
const secretName = isSecretParameterName(
|
|
32418
|
-
const named = secretName && shape ? { parameter:
|
|
32415
|
+
if (shape && isPlainRecordId({ text: text3, at: at4 })) return [];
|
|
32416
|
+
if (shape && !isSecretParameterName(at4.name) && isPathShapeMatch({ text: text3, match, at: at4 })) return [];
|
|
32417
|
+
const secretName = isSecretParameterName(at4.name);
|
|
32418
|
+
const named = secretName && shape ? { parameter: at4.name } : {};
|
|
32419
32419
|
return [
|
|
32420
|
-
{ ...match, ...named, spanStart:
|
|
32420
|
+
{ ...match, ...named, spanStart: at4.start, start: at4.start, end: at4.end, spanEnd: at4.end }
|
|
32421
32421
|
];
|
|
32422
32422
|
}
|
|
32423
32423
|
function secretParameterValues({
|
|
32424
32424
|
text: text3,
|
|
32425
32425
|
urlValues
|
|
32426
32426
|
}) {
|
|
32427
|
-
return urlValues.filter((
|
|
32427
|
+
return urlValues.filter((at4) => isSecretParameterName(at4.name)).filter((at4) => isSecretParameterValue(text3.slice(at4.start, at4.end))).map((at4) => ({
|
|
32428
32428
|
ruleId: URL_PARAMETER_RULE_ID,
|
|
32429
|
-
spanStart:
|
|
32430
|
-
start:
|
|
32431
|
-
end:
|
|
32432
|
-
spanEnd:
|
|
32433
|
-
parameter:
|
|
32429
|
+
spanStart: at4.start,
|
|
32430
|
+
start: at4.start,
|
|
32431
|
+
end: at4.end,
|
|
32432
|
+
spanEnd: at4.end,
|
|
32433
|
+
parameter: at4.name
|
|
32434
32434
|
}));
|
|
32435
32435
|
}
|
|
32436
32436
|
function withExtension({ text: text3, match }) {
|
|
@@ -32653,17 +32653,17 @@ function createRedactor({ values }) {
|
|
|
32653
32653
|
let carry = "";
|
|
32654
32654
|
const scan = (text3, limit) => {
|
|
32655
32655
|
let out = "";
|
|
32656
|
-
let
|
|
32656
|
+
let at4 = 0;
|
|
32657
32657
|
pattern.lastIndex = 0;
|
|
32658
32658
|
for (const match of text3.matchAll(pattern)) {
|
|
32659
32659
|
if (match.index >= limit) break;
|
|
32660
|
-
if (match.index <
|
|
32661
|
-
out += text3.slice(
|
|
32662
|
-
|
|
32660
|
+
if (match.index < at4) continue;
|
|
32661
|
+
out += text3.slice(at4, match.index) + REDACTED;
|
|
32662
|
+
at4 = match.index + match[0].length;
|
|
32663
32663
|
}
|
|
32664
|
-
const emitUntil = Math.max(
|
|
32664
|
+
const emitUntil = Math.max(at4, limit);
|
|
32665
32665
|
carry = text3.slice(emitUntil);
|
|
32666
|
-
return out + text3.slice(
|
|
32666
|
+
return out + text3.slice(at4, emitUntil);
|
|
32667
32667
|
};
|
|
32668
32668
|
return {
|
|
32669
32669
|
push(chunk) {
|
|
@@ -36522,14 +36522,14 @@ var registry = /* @__PURE__ */ new Map();
|
|
|
36522
36522
|
function defineMessages({
|
|
36523
36523
|
namespace,
|
|
36524
36524
|
en: en2,
|
|
36525
|
-
load
|
|
36525
|
+
load: load2
|
|
36526
36526
|
}) {
|
|
36527
36527
|
const messages = {
|
|
36528
36528
|
namespace,
|
|
36529
36529
|
en: en2,
|
|
36530
36530
|
load: async (locale) => {
|
|
36531
36531
|
if (locale === DEFAULT_LOCALE) return {};
|
|
36532
|
-
const loaded = await
|
|
36532
|
+
const loaded = await load2(locale).catch(() => ({}));
|
|
36533
36533
|
return translationsOf(loaded);
|
|
36534
36534
|
}
|
|
36535
36535
|
};
|
|
@@ -36960,7 +36960,7 @@ function shadowedLinkLineOf({ shadow }) {
|
|
|
36960
36960
|
}
|
|
36961
36961
|
|
|
36962
36962
|
// src/rules/cli-version.rules.ts
|
|
36963
|
-
var STAMPED = "0.1.
|
|
36963
|
+
var STAMPED = "0.1.113";
|
|
36964
36964
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
36965
36965
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
36966
36966
|
}
|
|
@@ -38725,14 +38725,14 @@ function codePointLength(str) {
|
|
|
38725
38725
|
const units = str.length;
|
|
38726
38726
|
if (!highSurrogate.test(str))
|
|
38727
38727
|
return units;
|
|
38728
|
-
let
|
|
38728
|
+
let count10 = units;
|
|
38729
38729
|
for (let i = 0; i < units - 1; i++) {
|
|
38730
38730
|
if ((str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320) {
|
|
38731
|
-
|
|
38731
|
+
count10--;
|
|
38732
38732
|
i++;
|
|
38733
38733
|
}
|
|
38734
38734
|
}
|
|
38735
|
-
return
|
|
38735
|
+
return count10;
|
|
38736
38736
|
}
|
|
38737
38737
|
function getLengthableOrigin(input2) {
|
|
38738
38738
|
if (Array.isArray(input2))
|
|
@@ -43087,8 +43087,8 @@ function az_default() {
|
|
|
43087
43087
|
}
|
|
43088
43088
|
|
|
43089
43089
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/be.js
|
|
43090
|
-
function getBelarusianPlural(
|
|
43091
|
-
const absCount = Math.abs(
|
|
43090
|
+
function getBelarusianPlural(count10, one, few, many) {
|
|
43091
|
+
const absCount = Math.abs(count10);
|
|
43092
43092
|
const lastDigit = absCount % 10;
|
|
43093
43093
|
const lastTwoDigits = absCount % 100;
|
|
43094
43094
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -45735,8 +45735,8 @@ function hu_default() {
|
|
|
45735
45735
|
}
|
|
45736
45736
|
|
|
45737
45737
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hy.js
|
|
45738
|
-
function getArmenianPlural(
|
|
45739
|
-
return Math.abs(
|
|
45738
|
+
function getArmenianPlural(count10, one, many) {
|
|
45739
|
+
return Math.abs(count10) === 1 ? one : many;
|
|
45740
45740
|
}
|
|
45741
45741
|
function withDefiniteArticle(word3) {
|
|
45742
45742
|
if (!word3)
|
|
@@ -48474,8 +48474,8 @@ function ro_default() {
|
|
|
48474
48474
|
}
|
|
48475
48475
|
|
|
48476
48476
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ru.js
|
|
48477
|
-
function getRussianPlural(
|
|
48478
|
-
const absCount = Math.abs(
|
|
48477
|
+
function getRussianPlural(count10, one, few, many) {
|
|
48478
|
+
const absCount = Math.abs(count10);
|
|
48479
48479
|
const lastDigit = absCount % 10;
|
|
48480
48480
|
const lastTwoDigits = absCount % 100;
|
|
48481
48481
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -61812,15 +61812,15 @@ function clustersIn({
|
|
|
61812
61812
|
const out = [];
|
|
61813
61813
|
let current3 = null;
|
|
61814
61814
|
for (let index = segment.start; index <= segment.end; index += 1) {
|
|
61815
|
-
const
|
|
61816
|
-
if (
|
|
61815
|
+
const count10 = flagged[index] ?? 0;
|
|
61816
|
+
if (count10 === 0) continue;
|
|
61817
61817
|
if (current3 && index - current3.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
|
|
61818
61818
|
current3.end = index;
|
|
61819
|
-
current3.values +=
|
|
61819
|
+
current3.values += count10;
|
|
61820
61820
|
continue;
|
|
61821
61821
|
}
|
|
61822
61822
|
if (current3) out.push(current3);
|
|
61823
|
-
current3 = { start: index, end: index, values:
|
|
61823
|
+
current3 = { start: index, end: index, values: count10 };
|
|
61824
61824
|
}
|
|
61825
61825
|
if (current3) out.push(current3);
|
|
61826
61826
|
return out;
|
|
@@ -61847,10 +61847,10 @@ function redactedBlocksAt({
|
|
|
61847
61847
|
}) {
|
|
61848
61848
|
const lines2 = text3.split("\n");
|
|
61849
61849
|
const starts = [];
|
|
61850
|
-
let
|
|
61850
|
+
let at4 = 0;
|
|
61851
61851
|
for (const line of lines2) {
|
|
61852
|
-
starts.push(
|
|
61853
|
-
|
|
61852
|
+
starts.push(at4);
|
|
61853
|
+
at4 += line.length + 1;
|
|
61854
61854
|
}
|
|
61855
61855
|
const lineAt = (offset) => starts.findLastIndex((start2) => start2 <= offset);
|
|
61856
61856
|
const flagged = lines2.map(() => 0);
|
|
@@ -61860,7 +61860,7 @@ function redactedBlocksAt({
|
|
|
61860
61860
|
}
|
|
61861
61861
|
const blocks = redactedBlocks({ lines: lines2, flagged });
|
|
61862
61862
|
const inside = (line) => blocks.some((block2) => line >= block2.start && line <= block2.end);
|
|
61863
|
-
const values = flagged.reduce((sum,
|
|
61863
|
+
const values = flagged.reduce((sum, count10, line) => inside(line) ? sum + count10 : sum, 0);
|
|
61864
61864
|
return { values, insideAt: (offset) => inside(lineAt(offset)) };
|
|
61865
61865
|
}
|
|
61866
61866
|
|
|
@@ -62338,6 +62338,39 @@ var vaultJudgeMeasureSchemaDefinition = external_exports.object({
|
|
|
62338
62338
|
});
|
|
62339
62339
|
var vaultJudgeMeasureSchema = vaultJudgeMeasureSchemaDefinition;
|
|
62340
62340
|
|
|
62341
|
+
// ../../modules/vault/contract/src/vault-ops-asks.ts
|
|
62342
|
+
var count3 = external_exports.number().int().nonnegative();
|
|
62343
|
+
var idText2 = external_exports.string().max(128);
|
|
62344
|
+
var codeText = external_exports.string().regex(/^[a-z][a-z0-9_.]{0,39}$/);
|
|
62345
|
+
var vaultOpsAskSchemaDefinition = external_exports.object({
|
|
62346
|
+
requestId: idText2,
|
|
62347
|
+
agentId: idText2,
|
|
62348
|
+
agentKind: vaultAgentKindSchema,
|
|
62349
|
+
channelId: idText2,
|
|
62350
|
+
connectionId: idText2.nullable(),
|
|
62351
|
+
action: codeText,
|
|
62352
|
+
whyCode: codeText,
|
|
62353
|
+
/** `withdrawn`: the asking turn ended first; `expired`: nobody answered in time. */
|
|
62354
|
+
state: external_exports.enum([...vaultApprovalStateSchema.options, "withdrawn"]),
|
|
62355
|
+
createdAt: external_exports.iso.datetime(),
|
|
62356
|
+
expiresAt: external_exports.iso.datetime(),
|
|
62357
|
+
answeredAt: external_exports.iso.datetime().nullable(),
|
|
62358
|
+
answeredVia: vaultAnswerViaSchema.nullable(),
|
|
62359
|
+
/** Who settled it: a person, the timeout, the turn ending, or another card's lease. */
|
|
62360
|
+
decider: external_exports.enum(["human", "timeout", "turn_ended", "lease"]).nullable(),
|
|
62361
|
+
joinCount: count3,
|
|
62362
|
+
turnId: idText2.nullable(),
|
|
62363
|
+
batchId: idText2.nullable(),
|
|
62364
|
+
/** The join key's first 8 hex: equal prefixes are asks that would join one card. */
|
|
62365
|
+
joinKeyPrefix: external_exports.string().regex(/^[0-9a-f]{0,8}$/),
|
|
62366
|
+
noteDeliveredAt: external_exports.iso.datetime().nullable(),
|
|
62367
|
+
consumedAt: external_exports.iso.datetime().nullable(),
|
|
62368
|
+
/** `sealed`: the value goes only to the asking run, encrypted to its key. */
|
|
62369
|
+
delivery: external_exports.enum(["sealed", "plain"])
|
|
62370
|
+
});
|
|
62371
|
+
var vaultOpsAskSchema = vaultOpsAskSchemaDefinition;
|
|
62372
|
+
var vaultOpsAsksSchemaDefinition = external_exports.object({ rows: external_exports.array(vaultOpsAskSchema), total: count3 });
|
|
62373
|
+
|
|
62341
62374
|
// ../../modules/chat/contract/src/chat.close.ts
|
|
62342
62375
|
var conversationOpenDaysSchemaDefinition = external_exports.union([external_exports.literal(7), external_exports.literal(14), external_exports.literal(30), external_exports.literal(90)]).nullable();
|
|
62343
62376
|
var conversationOpenDaysSchema = conversationOpenDaysSchemaDefinition;
|
|
@@ -63826,6 +63859,11 @@ var agentChatMemberInputSchemaDefinition = external_exports.object({
|
|
|
63826
63859
|
ownerUserId: idSchema4,
|
|
63827
63860
|
userId: idSchema4
|
|
63828
63861
|
});
|
|
63862
|
+
var agentChatGuestInputSchemaDefinition = external_exports.object({
|
|
63863
|
+
...openAgentDirectInputSchemaDefinition.omit({ watcherUserIds: true, openerName: true }).shape,
|
|
63864
|
+
ownerUserId: idSchema4,
|
|
63865
|
+
guest: openAgentDirectInputSchemaDefinition.shape.agent
|
|
63866
|
+
});
|
|
63829
63867
|
var handAgentChatInputSchemaDefinition = external_exports.object({
|
|
63830
63868
|
workspaceId: workspaceIdSchema,
|
|
63831
63869
|
agent: openAgentDirectInputSchemaDefinition.shape.agent,
|
|
@@ -64351,7 +64389,11 @@ var followThreadInputSchemaDefinition = external_exports.object({
|
|
|
64351
64389
|
following: external_exports.boolean()
|
|
64352
64390
|
});
|
|
64353
64391
|
var followThreadInputSchema = followThreadInputSchemaDefinition;
|
|
64354
|
-
var threadFollowSchemaDefinition = external_exports.object({
|
|
64392
|
+
var threadFollowSchemaDefinition = external_exports.object({
|
|
64393
|
+
following: external_exports.boolean(),
|
|
64394
|
+
/** When the reader last read the thread; null when never, absent from older servers. */
|
|
64395
|
+
readAt: external_exports.iso.datetime().nullable().optional()
|
|
64396
|
+
});
|
|
64355
64397
|
var threadFollowSchema = threadFollowSchemaDefinition;
|
|
64356
64398
|
var followedThreadSchemaDefinition = external_exports.object({
|
|
64357
64399
|
root: messageSchemaDefinition,
|
|
@@ -65431,7 +65473,11 @@ var heldPhonePushShape = {
|
|
|
65431
65473
|
/** A message alert's sender, so a held alert still shows their picture. */
|
|
65432
65474
|
sender: apnsSenderSchema.optional(),
|
|
65433
65475
|
/** The sender's name sealed; sealed mode leaves `sender.name` empty. */
|
|
65434
|
-
senderNameSealed: sealedNameSchema.optional()
|
|
65476
|
+
senderNameSealed: sealedNameSchema.optional(),
|
|
65477
|
+
/** When the push was first held; a hold carried on while the person stays active keeps it. */
|
|
65478
|
+
firstHeldAt: external_exports.iso.datetime().optional(),
|
|
65479
|
+
/** How many times the hold was carried on because the person was still active. */
|
|
65480
|
+
round: external_exports.number().int().min(1).optional()
|
|
65435
65481
|
};
|
|
65436
65482
|
var phonePushHeldPayloadSchemaDefinition = external_exports.object({
|
|
65437
65483
|
workspaceId: external_exports.string().min(1),
|
|
@@ -65936,6 +65982,8 @@ var observeEditInputSchemaDefinition = external_exports.object({
|
|
|
65936
65982
|
layout: messageLayoutSchema.nullable().optional(),
|
|
65937
65983
|
rerendered: external_exports.boolean().default(false),
|
|
65938
65984
|
renderHash: external_exports.string().max(200).nullable().default(null),
|
|
65985
|
+
/** The source's order of this render within `version`: a later one with a new look lands. */
|
|
65986
|
+
renderOrder: external_exports.number().int().min(0).optional(),
|
|
65939
65987
|
/** The source says the message was never edited: an edited mark Laze gave it comes off. */
|
|
65940
65988
|
neverEdited: external_exports.boolean().default(false),
|
|
65941
65989
|
fileIds: external_exports.array(external_exports.string().min(1).max(64)).max(10).default([])
|
|
@@ -68395,7 +68443,9 @@ var mcpServerViewSchemaDefinition = external_exports.object({
|
|
|
68395
68443
|
external_exports.object({ ...mcpToolSchemaDefinition.shape, sensitivity: vaultSensitivitySchema.nullable() })
|
|
68396
68444
|
),
|
|
68397
68445
|
refreshedAt: external_exports.iso.datetime(),
|
|
68398
|
-
lastError: external_exports.string().nullable()
|
|
68446
|
+
lastError: external_exports.string().nullable(),
|
|
68447
|
+
/** The server site's own favicon through the logo route; none for a relayed server. */
|
|
68448
|
+
logoUrl: external_exports.string().nullable().optional()
|
|
68399
68449
|
});
|
|
68400
68450
|
var mcpServerViewSchema = mcpServerViewSchemaDefinition;
|
|
68401
68451
|
var addedMcpServerSchemaDefinition = external_exports.discriminatedUnion("outcome", [
|
|
@@ -69321,10 +69371,71 @@ var agentLimitsClearedPayloadSchemaDefinition = external_exports.object({
|
|
|
69321
69371
|
at: external_exports.iso.datetime()
|
|
69322
69372
|
});
|
|
69323
69373
|
|
|
69374
|
+
// ../../modules/agent/contract/src/sign-in-attempts.ts
|
|
69375
|
+
var signInAttemptStepSchema = external_exports.enum([
|
|
69376
|
+
"started",
|
|
69377
|
+
"code_submitted",
|
|
69378
|
+
"accepted",
|
|
69379
|
+
"saved",
|
|
69380
|
+
"refused",
|
|
69381
|
+
"ended_without_code"
|
|
69382
|
+
]);
|
|
69383
|
+
var signInAttemptReasonSchemaDefinition = external_exports.union([
|
|
69384
|
+
external_exports.enum([
|
|
69385
|
+
"code_refused",
|
|
69386
|
+
"code_expired",
|
|
69387
|
+
"invalid_request",
|
|
69388
|
+
"verifier_mismatch",
|
|
69389
|
+
"not_eligible",
|
|
69390
|
+
"rate_limited",
|
|
69391
|
+
"not_this_sign_in",
|
|
69392
|
+
"unreachable",
|
|
69393
|
+
"unavailable",
|
|
69394
|
+
"expired",
|
|
69395
|
+
"denied",
|
|
69396
|
+
"not_signed_in"
|
|
69397
|
+
]),
|
|
69398
|
+
external_exports.string().regex(/^unknown_\d{1,3}$/)
|
|
69399
|
+
]);
|
|
69400
|
+
var signInAttemptReasonSchema = signInAttemptReasonSchemaDefinition;
|
|
69401
|
+
var providerErrorSchema = external_exports.string().regex(/^(?:[a-z_]{1,40})$/);
|
|
69402
|
+
var signInAttemptSourceSchema = external_exports.enum(["computer", "server"]);
|
|
69403
|
+
var signInAttemptIdSchema = external_exports.string().regex(/^[A-Za-z0-9_-]{8,40}$/);
|
|
69404
|
+
var harnessSchema2 = external_exports.enum(["claude-code", "codex"]);
|
|
69405
|
+
var signInAttemptFactDefinition = external_exports.object({
|
|
69406
|
+
workspaceId: external_exports.string().min(1),
|
|
69407
|
+
userId: external_exports.string().min(1),
|
|
69408
|
+
harness: harnessSchema2,
|
|
69409
|
+
source: signInAttemptSourceSchema,
|
|
69410
|
+
attemptId: signInAttemptIdSchema,
|
|
69411
|
+
step: signInAttemptStepSchema,
|
|
69412
|
+
reason: signInAttemptReasonSchema.nullable(),
|
|
69413
|
+
providerError: providerErrorSchema.nullable()
|
|
69414
|
+
});
|
|
69415
|
+
var lastSignInTryDefinition = external_exports.discriminatedUnion("outcome", [
|
|
69416
|
+
external_exports.object({
|
|
69417
|
+
outcome: external_exports.literal("refused"),
|
|
69418
|
+
at: external_exports.iso.datetime(),
|
|
69419
|
+
reason: signInAttemptReasonSchema
|
|
69420
|
+
}),
|
|
69421
|
+
external_exports.object({ outcome: external_exports.literal("none") })
|
|
69422
|
+
]);
|
|
69423
|
+
var signInAttemptViewSchemaDefinition = external_exports.object({
|
|
69424
|
+
attemptId: signInAttemptIdSchema,
|
|
69425
|
+
userId: external_exports.string(),
|
|
69426
|
+
harness: harnessSchema2,
|
|
69427
|
+
source: signInAttemptSourceSchema,
|
|
69428
|
+
step: signInAttemptStepSchema,
|
|
69429
|
+
reason: signInAttemptReasonSchema.nullable(),
|
|
69430
|
+
providerError: providerErrorSchema.nullable(),
|
|
69431
|
+
at: external_exports.iso.datetime()
|
|
69432
|
+
});
|
|
69433
|
+
var signInAttemptViewSchema = signInAttemptViewSchemaDefinition;
|
|
69434
|
+
|
|
69324
69435
|
// ../../modules/agent/contract/src/agent-logins.ts
|
|
69325
69436
|
var workspaceIdSchema9 = external_exports.string().min(1);
|
|
69326
69437
|
var idSchema12 = external_exports.string().min(1).max(80);
|
|
69327
|
-
var
|
|
69438
|
+
var harnessSchema3 = external_exports.enum(["claude-code", "codex"]);
|
|
69328
69439
|
var loginNameSchema = external_exports.string().max(200);
|
|
69329
69440
|
var secretSchema = external_exports.string().max(2e4);
|
|
69330
69441
|
var harnessSignInValueSchemaDefinition = external_exports.object({
|
|
@@ -69340,7 +69451,7 @@ var loginValueShape = {
|
|
|
69340
69451
|
var harnessLoginEntrySchemaDefinition = external_exports.object({
|
|
69341
69452
|
/** The vault connection id. */
|
|
69342
69453
|
id: idSchema12,
|
|
69343
|
-
harness:
|
|
69454
|
+
harness: harnessSchema3,
|
|
69344
69455
|
name: external_exports.string(),
|
|
69345
69456
|
/** `invalid` once its provider refused the token; `out_of_usage` until `limitedUntil`. */
|
|
69346
69457
|
state: external_exports.enum(["ready", "out_of_usage", "invalid"]),
|
|
@@ -69364,7 +69475,7 @@ var harnessLoginListSchemaDefinition = external_exports.object({
|
|
|
69364
69475
|
var harnessLoginListSchema = harnessLoginListSchemaDefinition;
|
|
69365
69476
|
var addHarnessLoginInputSchemaDefinition = external_exports.object({
|
|
69366
69477
|
workspaceId: workspaceIdSchema9,
|
|
69367
|
-
harness:
|
|
69478
|
+
harness: harnessSchema3,
|
|
69368
69479
|
name: loginNameSchema,
|
|
69369
69480
|
...loginValueShape
|
|
69370
69481
|
});
|
|
@@ -69408,11 +69519,11 @@ var loginPoolSchemaDefinition = external_exports.object({
|
|
|
69408
69519
|
groups: external_exports.array(external_exports.object({ id: idSchema12, name: external_exports.string() })).optional(),
|
|
69409
69520
|
agents: external_exports.array(external_exports.object({ id: idSchema12, name: external_exports.string(), harness: external_exports.string() })),
|
|
69410
69521
|
/** What its agents on Default run per harness; a harness left out has none set. */
|
|
69411
|
-
defaultModels: external_exports.array(external_exports.object({ harness:
|
|
69522
|
+
defaultModels: external_exports.array(external_exports.object({ harness: harnessSchema3, model: external_exports.string(), name: external_exports.string() })).default([]),
|
|
69412
69523
|
/** The models the workspace's agents listed per harness, for the default model picker. */
|
|
69413
69524
|
modelOptions: external_exports.array(
|
|
69414
69525
|
external_exports.object({
|
|
69415
|
-
harness:
|
|
69526
|
+
harness: harnessSchema3,
|
|
69416
69527
|
models: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string() }))
|
|
69417
69528
|
})
|
|
69418
69529
|
).default([]),
|
|
@@ -69420,7 +69531,7 @@ var loginPoolSchemaDefinition = external_exports.object({
|
|
|
69420
69531
|
external_exports.object({
|
|
69421
69532
|
id: idSchema12,
|
|
69422
69533
|
name: external_exports.string(),
|
|
69423
|
-
harness:
|
|
69534
|
+
harness: harnessSchema3,
|
|
69424
69535
|
contributedByUserId: idSchema12,
|
|
69425
69536
|
contributedByName: external_exports.string(),
|
|
69426
69537
|
/** Whether an agent runs on it now. */
|
|
@@ -69456,7 +69567,7 @@ var loginPoolRefInputSchema = loginPoolRefInputSchemaDefinition;
|
|
|
69456
69567
|
var addPoolLoginInputSchemaDefinition = external_exports.object({
|
|
69457
69568
|
workspaceId: workspaceIdSchema9,
|
|
69458
69569
|
poolId: external_exports.string().min(1).max(200),
|
|
69459
|
-
harness:
|
|
69570
|
+
harness: harnessSchema3,
|
|
69460
69571
|
name: loginNameSchema,
|
|
69461
69572
|
...loginValueShape
|
|
69462
69573
|
});
|
|
@@ -69497,7 +69608,7 @@ var setLoginPoolModelInputSchemaDefinition = external_exports.object({
|
|
|
69497
69608
|
workspaceId: workspaceIdSchema9,
|
|
69498
69609
|
/** The pool's id or, from the CLI, its name. */
|
|
69499
69610
|
poolId: external_exports.string().min(1).max(200),
|
|
69500
|
-
harness:
|
|
69611
|
+
harness: harnessSchema3,
|
|
69501
69612
|
model: external_exports.string().trim().min(1).max(200).nullable()
|
|
69502
69613
|
});
|
|
69503
69614
|
var setLoginPoolModelInputSchema = setLoginPoolModelInputSchemaDefinition;
|
|
@@ -69594,11 +69705,11 @@ var checkLoginUsageAsCallerInputSchema = checkLoginUsageInputSchemaDefinition.om
|
|
|
69594
69705
|
});
|
|
69595
69706
|
var startHarnessSignInInputSchemaDefinition = external_exports.object({
|
|
69596
69707
|
workspaceId: workspaceIdSchema9,
|
|
69597
|
-
harness:
|
|
69708
|
+
harness: harnessSchema3
|
|
69598
69709
|
});
|
|
69599
69710
|
var startHarnessSignInInputSchema = startHarnessSignInInputSchemaDefinition;
|
|
69600
69711
|
var harnessSignInSchemaDefinition = external_exports.object({
|
|
69601
|
-
harness:
|
|
69712
|
+
harness: harnessSchema3,
|
|
69602
69713
|
flow: external_exports.string(),
|
|
69603
69714
|
url: external_exports.url(),
|
|
69604
69715
|
userCode: external_exports.string().nullable(),
|
|
@@ -69621,14 +69732,14 @@ var isoSchema = external_exports.iso.datetime();
|
|
|
69621
69732
|
var loginStatesSchemaDefinition = external_exports.object({
|
|
69622
69733
|
/** Logins signed in on a person's own Laze computer; Laze holds only the fact. */
|
|
69623
69734
|
computerLogins: external_exports.array(
|
|
69624
|
-
external_exports.object({ userId: external_exports.string(), harness:
|
|
69735
|
+
external_exports.object({ userId: external_exports.string(), harness: harnessSchema3, savedAt: isoSchema })
|
|
69625
69736
|
),
|
|
69626
69737
|
/** Logins in people's personal keychains in the vault. */
|
|
69627
69738
|
personalLogins: external_exports.array(
|
|
69628
69739
|
external_exports.object({
|
|
69629
69740
|
id: external_exports.string(),
|
|
69630
69741
|
ownerUserId: external_exports.string(),
|
|
69631
|
-
harness:
|
|
69742
|
+
harness: harnessSchema3,
|
|
69632
69743
|
state: loginStateSchema,
|
|
69633
69744
|
/** The vault's own state: `needs_reconnect`, or still waiting for an admin's approval. */
|
|
69634
69745
|
vaultStatus: external_exports.enum(["active", "needs_reconnect"]),
|
|
@@ -69647,7 +69758,7 @@ var loginStatesSchemaDefinition = external_exports.object({
|
|
|
69647
69758
|
logins: external_exports.array(
|
|
69648
69759
|
external_exports.object({
|
|
69649
69760
|
id: external_exports.string(),
|
|
69650
|
-
harness:
|
|
69761
|
+
harness: harnessSchema3,
|
|
69651
69762
|
state: loginStateSchema,
|
|
69652
69763
|
contributedByUserId: external_exports.string(),
|
|
69653
69764
|
limitedUntil: isoSchema.nullable(),
|
|
@@ -69665,7 +69776,9 @@ var loginStatesSchemaDefinition = external_exports.object({
|
|
|
69665
69776
|
loginPoolId: external_exports.string().nullable(),
|
|
69666
69777
|
activeLoginId: external_exports.string().nullable()
|
|
69667
69778
|
})
|
|
69668
|
-
)
|
|
69779
|
+
),
|
|
69780
|
+
/** Recent sign-in attempt steps, newest first; closed reason codes only. */
|
|
69781
|
+
signInAttempts: external_exports.array(signInAttemptViewSchema)
|
|
69669
69782
|
});
|
|
69670
69783
|
var loginStatesSchema = loginStatesSchemaDefinition;
|
|
69671
69784
|
|
|
@@ -72666,10 +72779,10 @@ function whereOf(message2) {
|
|
|
72666
72779
|
}
|
|
72667
72780
|
function catchUpLinesOf(message2) {
|
|
72668
72781
|
if (!message2.catchUp) return [];
|
|
72669
|
-
const { count:
|
|
72782
|
+
const { count: count10, older } = message2.catchUp;
|
|
72670
72783
|
const where = whereOf(message2);
|
|
72671
72784
|
const lines2 = [
|
|
72672
|
-
`${
|
|
72785
|
+
`${count10} ${count10 === 1 ? "message" : "messages"} in ${where} while you were away.`
|
|
72673
72786
|
];
|
|
72674
72787
|
if (older === 0) return lines2;
|
|
72675
72788
|
const channel = message2.channelKind === "public" || message2.channelKind === "private";
|
|
@@ -72692,9 +72805,9 @@ function hookContextOf({
|
|
|
72692
72805
|
messages,
|
|
72693
72806
|
self: self2
|
|
72694
72807
|
}) {
|
|
72695
|
-
const
|
|
72808
|
+
const count10 = messages.length === 1 ? "A message" : `${messages.length} messages`;
|
|
72696
72809
|
return [
|
|
72697
|
-
`${
|
|
72810
|
+
`${count10} reached you in Laze${selfClauseOf({ self: self2 })}:`,
|
|
72698
72811
|
"",
|
|
72699
72812
|
...messages.map((message2) => formatInboxMessage({ message: message2 })),
|
|
72700
72813
|
"",
|
|
@@ -72709,7 +72822,7 @@ function selfClauseOf({ self: self2 }) {
|
|
|
72709
72822
|
function record2(value) {
|
|
72710
72823
|
return typeof value === "object" && value !== null ? value : {};
|
|
72711
72824
|
}
|
|
72712
|
-
function
|
|
72825
|
+
function count4(value) {
|
|
72713
72826
|
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
72714
72827
|
}
|
|
72715
72828
|
function parse3(line) {
|
|
@@ -72730,17 +72843,17 @@ function compactionOf({
|
|
|
72730
72843
|
return {
|
|
72731
72844
|
key: typeof entry2.uuid === "string" ? entry2.uuid : String(index),
|
|
72732
72845
|
trigger: meta3.trigger === "manual" ? "manual" : "auto",
|
|
72733
|
-
tokensBefore:
|
|
72734
|
-
tokensAfter:
|
|
72846
|
+
tokensBefore: count4(meta3.preTokens),
|
|
72847
|
+
tokensAfter: count4(meta3.postTokens),
|
|
72735
72848
|
at: typeof entry2.timestamp === "string" ? entry2.timestamp : "1970-01-01T00:00:00.000Z"
|
|
72736
72849
|
};
|
|
72737
72850
|
}
|
|
72738
72851
|
function usageOf({ entry: entry2 }) {
|
|
72739
72852
|
const message2 = record2(entry2.message);
|
|
72740
72853
|
const usage = record2(message2.usage);
|
|
72741
|
-
const input2 =
|
|
72854
|
+
const input2 = count4(usage.input_tokens);
|
|
72742
72855
|
if (input2 === void 0) return void 0;
|
|
72743
|
-
const cached2 = (
|
|
72856
|
+
const cached2 = (count4(usage.cache_read_input_tokens) ?? 0) + (count4(usage.cache_creation_input_tokens) ?? 0);
|
|
72744
72857
|
return {
|
|
72745
72858
|
tokens: input2 + cached2,
|
|
72746
72859
|
...typeof message2.model === "string" ? { model: message2.model } : {}
|
|
@@ -73444,7 +73557,9 @@ var slackFileParamsSchemaDefinition = external_exports.object({
|
|
|
73444
73557
|
var slackFileQuerySchemaDefinition = external_exports.object({
|
|
73445
73558
|
via: external_exports.string().min(1).max(200).optional(),
|
|
73446
73559
|
/** "1" answers the file as a download of plain bytes, whatever its type. */
|
|
73447
|
-
download: external_exports.literal("1").optional()
|
|
73560
|
+
download: external_exports.literal("1").optional(),
|
|
73561
|
+
/** "poster" answers a video's still frame as Slack made it, in place of the video. */
|
|
73562
|
+
variant: external_exports.literal("poster").optional()
|
|
73448
73563
|
});
|
|
73449
73564
|
var SLACK_SEARCH_QUERY_MIN = 2;
|
|
73450
73565
|
var SLACK_SEARCH_QUERY_MAX = 200;
|
|
@@ -73595,6 +73710,38 @@ var slackConfig = Config.define((c) => ({
|
|
|
73595
73710
|
reconnectMaxSeconds: c.env("SLACK_RECONNECT_MAX_SECONDS", positiveInt4.default(30))
|
|
73596
73711
|
}));
|
|
73597
73712
|
|
|
73713
|
+
// ../../modules/slack/contract/src/slack-ops.ts
|
|
73714
|
+
var count5 = external_exports.number().int().nonnegative();
|
|
73715
|
+
var at = external_exports.iso.datetime();
|
|
73716
|
+
var slackMirrorHealthDefinition = external_exports.object({
|
|
73717
|
+
mirrors: external_exports.array(
|
|
73718
|
+
external_exports.object({
|
|
73719
|
+
teamId: external_exports.string(),
|
|
73720
|
+
slackChannelId: external_exports.string(),
|
|
73721
|
+
lazeChannelId: external_exports.string(),
|
|
73722
|
+
/** channel, private, mpim or im. */
|
|
73723
|
+
kind: external_exports.string(),
|
|
73724
|
+
/** Shared with another organisation, such as a Slack Connect channel. */
|
|
73725
|
+
external: external_exports.boolean(),
|
|
73726
|
+
botMember: external_exports.boolean(),
|
|
73727
|
+
linkedMembers: count5,
|
|
73728
|
+
cacheDays: count5,
|
|
73729
|
+
backfilledAt: at.nullable(),
|
|
73730
|
+
reconciledAt: at.nullable(),
|
|
73731
|
+
/** Message links Laze holds for the conversation, both ways. */
|
|
73732
|
+
links: count5,
|
|
73733
|
+
/** Thread roots Laze holds a reply of. */
|
|
73734
|
+
threads: count5,
|
|
73735
|
+
/** Roots whose Slack reply count, when last read, is above the replies Laze holds. */
|
|
73736
|
+
threadsShort: count5,
|
|
73737
|
+
repliesShort: count5,
|
|
73738
|
+
/** Threads Laze holds whose root is older than the cache window. */
|
|
73739
|
+
oldThreads: count5
|
|
73740
|
+
})
|
|
73741
|
+
)
|
|
73742
|
+
});
|
|
73743
|
+
var slackMirrorHealthSchema = slackMirrorHealthDefinition;
|
|
73744
|
+
|
|
73598
73745
|
// src/rules/not-in-channel.rules.ts
|
|
73599
73746
|
function notInChannelLineOf({
|
|
73600
73747
|
posted,
|
|
@@ -73731,7 +73878,7 @@ function slackHitLines({
|
|
|
73731
73878
|
...link2 ? [` ${link2}`] : []
|
|
73732
73879
|
];
|
|
73733
73880
|
}
|
|
73734
|
-
var
|
|
73881
|
+
var count6 = (n) => `${n} message${n === 1 ? "" : "s"}`;
|
|
73735
73882
|
function slackSectionLines({
|
|
73736
73883
|
slack: slack2,
|
|
73737
73884
|
laze,
|
|
@@ -73744,7 +73891,7 @@ function slackSectionLines({
|
|
|
73744
73891
|
});
|
|
73745
73892
|
if (slack2.teams.some((team) => team.state === "searched")) {
|
|
73746
73893
|
const found = slack2.hits.length;
|
|
73747
|
-
lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${
|
|
73894
|
+
lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${count6(found)}`);
|
|
73748
73895
|
}
|
|
73749
73896
|
for (const hit of slack2.hits) lines2.push(...slackHitLines({ hit, laze, url: url2, workspaceId }), "");
|
|
73750
73897
|
return lines2;
|
|
@@ -73755,7 +73902,7 @@ function formatSearch({
|
|
|
73755
73902
|
workspaceId
|
|
73756
73903
|
}) {
|
|
73757
73904
|
const { laze, slack: slack2, query } = output2;
|
|
73758
|
-
const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${
|
|
73905
|
+
const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${count6(laze.hits.length)} for "${query}"`];
|
|
73759
73906
|
for (const hit of laze.hits) {
|
|
73760
73907
|
lines2.push(...lazeHitLines({ hit, laze, url: url2, workspaceId }), "");
|
|
73761
73908
|
}
|
|
@@ -73787,8 +73934,8 @@ function lastCallAtOf({ text: text3, command }) {
|
|
|
73787
73934
|
} catch {
|
|
73788
73935
|
continue;
|
|
73789
73936
|
}
|
|
73790
|
-
const
|
|
73791
|
-
if (
|
|
73937
|
+
const at4 = callAtOf({ entry: entry2, command });
|
|
73938
|
+
if (at4 !== null) return at4;
|
|
73792
73939
|
}
|
|
73793
73940
|
return null;
|
|
73794
73941
|
}
|
|
@@ -73811,7 +73958,7 @@ function newestIsSubagent({
|
|
|
73811
73958
|
session,
|
|
73812
73959
|
subagents
|
|
73813
73960
|
}) {
|
|
73814
|
-
const newest = Math.max(...subagents.map((
|
|
73961
|
+
const newest = Math.max(...subagents.map((at4) => at4 ?? Number.NEGATIVE_INFINITY));
|
|
73815
73962
|
return Number.isFinite(newest) && newest >= (session ?? Number.NEGATIVE_INFINITY);
|
|
73816
73963
|
}
|
|
73817
73964
|
|
|
@@ -73969,11 +74116,11 @@ async function sessionNotesOf({
|
|
|
73969
74116
|
dropped.push(await dropStale({ context, pid, path, tell }));
|
|
73970
74117
|
continue;
|
|
73971
74118
|
}
|
|
73972
|
-
const
|
|
74119
|
+
const at4 = await stat2(path).then(
|
|
73973
74120
|
(info) => info.mtimeMs,
|
|
73974
74121
|
() => 0
|
|
73975
74122
|
);
|
|
73976
|
-
notes.push({ pid, note, standing, at:
|
|
74123
|
+
notes.push({ pid, note, standing, at: at4 });
|
|
73977
74124
|
}
|
|
73978
74125
|
return { notes: notes.toSorted((a, b) => b.at - a.at), dropped };
|
|
73979
74126
|
}
|
|
@@ -74570,8 +74717,8 @@ var AT_USAGE = `--at takes a date and time such as 2026-10-20T09:00, read in --t
|
|
|
74570
74717
|
such as Europe/Amsterdam) or this machine's zone; a time with its own offset is taken as written.`;
|
|
74571
74718
|
var OFFSET = /(Z|[+-]\d{2}(:?\d{2})?)$/i;
|
|
74572
74719
|
var DATE_AND_TIME = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;
|
|
74573
|
-
function sendAtOf({ at:
|
|
74574
|
-
const text3 =
|
|
74720
|
+
function sendAtOf({ at: at4, timeZone }) {
|
|
74721
|
+
const text3 = at4.trim();
|
|
74575
74722
|
if (!DATE_AND_TIME.test(text3)) return null;
|
|
74576
74723
|
try {
|
|
74577
74724
|
if (OFFSET.test(text3)) return Temporal3.Instant.from(text3.replace(" ", "T")).toString();
|
|
@@ -74635,9 +74782,9 @@ function scheduleAtOf({
|
|
|
74635
74782
|
usage
|
|
74636
74783
|
}) {
|
|
74637
74784
|
if (args.flags.at === void 0 && args.flags.tz === void 0) return null;
|
|
74638
|
-
const
|
|
74785
|
+
const at4 = flagText({ args, name: "at" });
|
|
74639
74786
|
const timeZone = flagText({ args, name: "tz" }) || currentTimeZone();
|
|
74640
|
-
const sendAt =
|
|
74787
|
+
const sendAt = at4 ? sendAtOf({ at: at4, timeZone }) : null;
|
|
74641
74788
|
if (!sendAt) throw new CliUsageError(`${usage}
|
|
74642
74789
|
${AT_USAGE}`);
|
|
74643
74790
|
return { sendAt, timeZone };
|
|
@@ -74646,19 +74793,19 @@ async function scheduleMessage({
|
|
|
74646
74793
|
context,
|
|
74647
74794
|
args,
|
|
74648
74795
|
client,
|
|
74649
|
-
at:
|
|
74796
|
+
at: at4,
|
|
74650
74797
|
target,
|
|
74651
74798
|
body
|
|
74652
74799
|
}) {
|
|
74653
74800
|
const scheduled2 = await client.post("/api/agents/me/scheduled", {
|
|
74654
74801
|
...target,
|
|
74655
74802
|
body,
|
|
74656
|
-
sendAt:
|
|
74803
|
+
sendAt: at4.sendAt,
|
|
74657
74804
|
..."replyTo" in target && args.flags["also-channel"] === true ? { alsoInChannel: true } : {}
|
|
74658
74805
|
});
|
|
74659
74806
|
if (args.flags.json) context.out(`${JSON.stringify(scheduled2, null, 2)}
|
|
74660
74807
|
`);
|
|
74661
|
-
else context.out(scheduledLine({ scheduled: scheduled2, timeZone:
|
|
74808
|
+
else context.out(scheduledLine({ scheduled: scheduled2, timeZone: at4.timeZone }));
|
|
74662
74809
|
return void 0;
|
|
74663
74810
|
}
|
|
74664
74811
|
var USAGE = "Usage: laze scheduled [--channel <channel>] [--json], laze scheduled send|cancel <id>, laze scheduled edit <id> [--text <text|->] [--at <time> [--tz <zone>]]";
|
|
@@ -74699,18 +74846,18 @@ async function editOne({
|
|
|
74699
74846
|
args,
|
|
74700
74847
|
id: id4
|
|
74701
74848
|
}) {
|
|
74702
|
-
const
|
|
74849
|
+
const at4 = scheduleAtOf({ args, usage: EDIT_USAGE });
|
|
74703
74850
|
const body = await newTextOf({ context, args });
|
|
74704
|
-
if (!
|
|
74851
|
+
if (!at4 && body === void 0) throw new CliUsageError(EDIT_USAGE);
|
|
74705
74852
|
const { client } = await signedIn({ context, args });
|
|
74706
74853
|
const edited = await client.post("/api/agents/me/scheduled/edit", {
|
|
74707
74854
|
scheduledId: id4,
|
|
74708
74855
|
...body === void 0 ? {} : { body },
|
|
74709
|
-
...
|
|
74856
|
+
...at4 ? { sendAt: at4.sendAt } : {}
|
|
74710
74857
|
});
|
|
74711
74858
|
if (args.flags.json) return context.out(`${JSON.stringify(edited, null, 2)}
|
|
74712
74859
|
`);
|
|
74713
|
-
const timeZone =
|
|
74860
|
+
const timeZone = at4?.timeZone ?? currentTimeZone();
|
|
74714
74861
|
context.out(scheduledLine({ scheduled: edited, timeZone }).replace(/^Scheduled /, "Updated "));
|
|
74715
74862
|
}
|
|
74716
74863
|
async function actOn({
|
|
@@ -74894,12 +75041,12 @@ async function filesOf({
|
|
|
74894
75041
|
context,
|
|
74895
75042
|
args,
|
|
74896
75043
|
client,
|
|
74897
|
-
at:
|
|
75044
|
+
at: at4,
|
|
74898
75045
|
channel
|
|
74899
75046
|
}) {
|
|
74900
75047
|
const sources = fileSourcesOf({ args, what: "A message" });
|
|
74901
75048
|
if (sources.length === 0) return {};
|
|
74902
|
-
if (
|
|
75049
|
+
if (at4) throw new CliUsageError("A scheduled message (--at) cannot carry --image or --file yet");
|
|
74903
75050
|
const attachmentIds = await attachmentIdsOf({ context, client, sources, channel });
|
|
74904
75051
|
return { attachmentIds };
|
|
74905
75052
|
}
|
|
@@ -74918,16 +75065,16 @@ async function post({
|
|
|
74918
75065
|
}) {
|
|
74919
75066
|
const channel = args.words[1];
|
|
74920
75067
|
if (!channel) throw new CliUsageError(POST_USAGE);
|
|
74921
|
-
const
|
|
75068
|
+
const at4 = scheduleAtOf({ args, usage: POST_USAGE });
|
|
74922
75069
|
const { client, profile } = await signedIn({ context, args });
|
|
74923
75070
|
const typed = await textOf({ context, args, from: 2 });
|
|
74924
75071
|
const leaves = leavesLazeOf({ client, channel });
|
|
74925
75072
|
const body = await textToSend({ context, args, profile, client, text: typed, leaves });
|
|
74926
75073
|
const thread2 = flagText({ args, name: "thread" });
|
|
74927
|
-
const files2 = await filesOf({ context, args, client, at:
|
|
74928
|
-
if (
|
|
75074
|
+
const files2 = await filesOf({ context, args, client, at: at4, channel: async () => channel });
|
|
75075
|
+
if (at4) {
|
|
74929
75076
|
const target = { channel, ...thread2 ? { threadRootId: thread2 } : {} };
|
|
74930
|
-
return scheduleMessage({ context, args, client, at:
|
|
75077
|
+
return scheduleMessage({ context, args, client, at: at4, target, body });
|
|
74931
75078
|
}
|
|
74932
75079
|
const posted = await client.post("/api/agents/me/messages", {
|
|
74933
75080
|
channel,
|
|
@@ -74953,7 +75100,7 @@ async function reply({
|
|
|
74953
75100
|
}) {
|
|
74954
75101
|
const messageId = args.words[1];
|
|
74955
75102
|
if (!messageId) throw new CliUsageError(REPLY_USAGE);
|
|
74956
|
-
const
|
|
75103
|
+
const at4 = scheduleAtOf({ args, usage: REPLY_USAGE });
|
|
74957
75104
|
const { client, profile, name: name3 } = await signedIn({ context, args });
|
|
74958
75105
|
const channel = flagText({ args, name: "channel" });
|
|
74959
75106
|
const typed = await textOf({ context, args, from: 2 });
|
|
@@ -74963,11 +75110,11 @@ async function reply({
|
|
|
74963
75110
|
context,
|
|
74964
75111
|
args,
|
|
74965
75112
|
client,
|
|
74966
|
-
at:
|
|
75113
|
+
at: at4,
|
|
74967
75114
|
channel: () => replyChannelOf({ client, messageId, channel })
|
|
74968
75115
|
});
|
|
74969
|
-
if (
|
|
74970
|
-
return scheduleMessage({ context, args, client, at:
|
|
75116
|
+
if (at4) {
|
|
75117
|
+
return scheduleMessage({ context, args, client, at: at4, target: { replyTo: messageId }, body });
|
|
74971
75118
|
}
|
|
74972
75119
|
const posted = await client.post("/api/agents/me/replies", {
|
|
74973
75120
|
messageId,
|
|
@@ -76477,8 +76624,8 @@ function boundAwayOf({ waiting, key }) {
|
|
|
76477
76624
|
}
|
|
76478
76625
|
async function logDelivery({ context, line }) {
|
|
76479
76626
|
const folder = join13(dirname11(context.environment.configPath), "connect");
|
|
76480
|
-
const
|
|
76481
|
-
const stamped = `${
|
|
76627
|
+
const at4 = Temporal3.Instant.fromEpochMilliseconds(context.nowMs());
|
|
76628
|
+
const stamped = `${at4.toString({ smallestUnit: "second" })} ${line}
|
|
76482
76629
|
`;
|
|
76483
76630
|
context.out(stamped);
|
|
76484
76631
|
await mkdir2(folder, { recursive: true, mode: 448 });
|
|
@@ -81600,9 +81747,9 @@ function formatAppMoney({
|
|
|
81600
81747
|
maximumFractionDigits: tiny ? 4 : 2
|
|
81601
81748
|
}).format(amount);
|
|
81602
81749
|
}
|
|
81603
|
-
var
|
|
81750
|
+
var count7 = new Intl.NumberFormat("en-US");
|
|
81604
81751
|
function plural2({ value, one, many }) {
|
|
81605
|
-
return `${
|
|
81752
|
+
return `${count7.format(value)} ${value === 1 ? one : many}`;
|
|
81606
81753
|
}
|
|
81607
81754
|
function appCostQuantityText(line) {
|
|
81608
81755
|
const { quantity } = line;
|
|
@@ -82873,19 +83020,19 @@ function buildFileOf({ path, bytes }) {
|
|
|
82873
83020
|
}
|
|
82874
83021
|
var WEEKDAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
|
|
82875
83022
|
function whenLabel({
|
|
82876
|
-
at:
|
|
83023
|
+
at: at4,
|
|
82877
83024
|
now,
|
|
82878
83025
|
timeZone
|
|
82879
83026
|
}) {
|
|
82880
83027
|
const zone = { timeZone: timeZone ?? currentTimeZone() };
|
|
82881
|
-
const days = differenceInCalendarDays(now.epochMilliseconds,
|
|
82882
|
-
const time3 = format(
|
|
83028
|
+
const days = differenceInCalendarDays(now.epochMilliseconds, at4, zone);
|
|
83029
|
+
const time3 = format(at4, "HH:mm", zone);
|
|
82883
83030
|
if (days === 0) return `Today ${time3}`;
|
|
82884
83031
|
if (days === 1) return `Yesterday ${time3}`;
|
|
82885
83032
|
if (days > 1 && days < 7) {
|
|
82886
|
-
return `${WEEKDAYS[toZonedDateTime(
|
|
83033
|
+
return `${WEEKDAYS[toZonedDateTime(at4, zone).dayOfWeek - 1] ?? ""} ${time3}`;
|
|
82887
83034
|
}
|
|
82888
|
-
return format(
|
|
83035
|
+
return format(at4, "d MMM HH:mm", zone);
|
|
82889
83036
|
}
|
|
82890
83037
|
function versionLine({
|
|
82891
83038
|
version: version2,
|
|
@@ -82900,8 +83047,8 @@ function versionLine({
|
|
|
82900
83047
|
}
|
|
82901
83048
|
function messageOf({ args }) {
|
|
82902
83049
|
const words = [...args.words];
|
|
82903
|
-
const
|
|
82904
|
-
const short =
|
|
83050
|
+
const at4 = words.indexOf("-m");
|
|
83051
|
+
const short = at4 >= 0 ? words.splice(at4, 2)[1] ?? "" : "";
|
|
82905
83052
|
const long = typeof args.flags.message === "string" ? args.flags.message : "";
|
|
82906
83053
|
return { message: (short || long).trim(), words };
|
|
82907
83054
|
}
|
|
@@ -82957,19 +83104,19 @@ async function h264LevelOf(path) {
|
|
|
82957
83104
|
try {
|
|
82958
83105
|
const { size } = await file4.stat();
|
|
82959
83106
|
const head = Buffer.alloc(16);
|
|
82960
|
-
for (let
|
|
82961
|
-
await file4.read(head, 0, 16,
|
|
83107
|
+
for (let at4 = 0; at4 + 8 <= size; ) {
|
|
83108
|
+
await file4.read(head, 0, 16, at4);
|
|
82962
83109
|
let length = head.readUInt32BE(0);
|
|
82963
83110
|
if (length === 1) length = Number(head.readBigUInt64BE(8));
|
|
82964
|
-
if (length === 0) length = size -
|
|
83111
|
+
if (length === 0) length = size - at4;
|
|
82965
83112
|
if (length < 8) return null;
|
|
82966
83113
|
if (head.toString("latin1", 4, 8) === "moov") {
|
|
82967
83114
|
const moov = Buffer.alloc(Math.min(length, 64 * 1024 * 1024));
|
|
82968
|
-
await file4.read(moov, 0, moov.byteLength,
|
|
83115
|
+
await file4.read(moov, 0, moov.byteLength, at4);
|
|
82969
83116
|
const box = moov.indexOf("avcC", 0, "latin1");
|
|
82970
83117
|
return box === -1 || box + 8 > moov.byteLength ? null : moov[box + 7] ?? null;
|
|
82971
83118
|
}
|
|
82972
|
-
|
|
83119
|
+
at4 += length;
|
|
82973
83120
|
}
|
|
82974
83121
|
return null;
|
|
82975
83122
|
} finally {
|
|
@@ -83579,8 +83726,8 @@ function channelOf({ context, args }) {
|
|
|
83579
83726
|
const channel = flagText({ args, name: "channel" }) || context.environment.inherited.LAZE_CHANNEL;
|
|
83580
83727
|
return channel ? { channel } : {};
|
|
83581
83728
|
}
|
|
83582
|
-
function word({ args, at:
|
|
83583
|
-
const value = args.words[
|
|
83729
|
+
function word({ args, at: at4 }) {
|
|
83730
|
+
const value = args.words[at4];
|
|
83584
83731
|
if (!value) throw new CliUsageError(BROWSER_TAB_USAGE);
|
|
83585
83732
|
return value;
|
|
83586
83733
|
}
|
|
@@ -84352,8 +84499,8 @@ function json2({
|
|
|
84352
84499
|
function withServeThemeScript(page) {
|
|
84353
84500
|
const head = /<head(\s[^>]*)?>/i.exec(page);
|
|
84354
84501
|
if (!head) return THEME_SCRIPT + page;
|
|
84355
|
-
const
|
|
84356
|
-
return page.slice(0,
|
|
84502
|
+
const at4 = head.index + head[0].length;
|
|
84503
|
+
return page.slice(0, at4) + THEME_SCRIPT + page.slice(at4);
|
|
84357
84504
|
}
|
|
84358
84505
|
async function staticFile({
|
|
84359
84506
|
folder,
|
|
@@ -84909,7 +85056,7 @@ var appWrite = async ({ context, args }) => {
|
|
|
84909
85056
|
});
|
|
84910
85057
|
};
|
|
84911
85058
|
function seedLine(seeded) {
|
|
84912
|
-
const created = Object.entries(seeded.created).map(([name3,
|
|
85059
|
+
const created = Object.entries(seeded.created).map(([name3, count10]) => `${count10} in ${name3}`);
|
|
84913
85060
|
const parts = [
|
|
84914
85061
|
created.length ? `Loaded starter records: ${created.join(", ")}.` : "",
|
|
84915
85062
|
seeded.skipped.length ? `Left ${seeded.skipped.join(", ")} as it was: it already holds records.` : ""
|
|
@@ -85234,8 +85381,8 @@ function cardLine({ choice }) {
|
|
|
85234
85381
|
var appCard = async ({ context, args }) => {
|
|
85235
85382
|
const client = await appClient({ context, args });
|
|
85236
85383
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
|
|
85237
|
-
const
|
|
85238
|
-
if (!Number.isInteger(
|
|
85384
|
+
const count10 = Number(flagText({ args, name: "rows", fallback: "5" }));
|
|
85385
|
+
if (!Number.isInteger(count10) || count10 < 1 || count10 > 10) {
|
|
85239
85386
|
throw new CliUsageError("--rows is a whole number from 1 to 10");
|
|
85240
85387
|
}
|
|
85241
85388
|
const text3 = (name3) => flagText({ args, name: name3 }) || null;
|
|
@@ -85248,7 +85395,7 @@ var appCard = async ({ context, args }) => {
|
|
|
85248
85395
|
collection: text3("collection"),
|
|
85249
85396
|
filter: flagText({ args, name: "where" }) || flagText({ args, name: "filter" }),
|
|
85250
85397
|
sort: flagText({ args, name: "sort" }),
|
|
85251
|
-
rows:
|
|
85398
|
+
rows: count10,
|
|
85252
85399
|
caption: text3("caption")
|
|
85253
85400
|
}
|
|
85254
85401
|
});
|
|
@@ -86883,9 +87030,9 @@ function presenceColumns(member) {
|
|
|
86883
87030
|
return [member.presence, `${status11.emoji} ${status11.text}`.trim() + until, ...dndColumn(member)];
|
|
86884
87031
|
}
|
|
86885
87032
|
function formatMembers({ detail }) {
|
|
86886
|
-
const
|
|
87033
|
+
const count10 = `${detail.members.length} ${detail.members.length === 1 ? "member" : "members"}`;
|
|
86887
87034
|
const ends = detail.endsAt ? `, ends ${utcTimeOf(detail.endsAt)}` : "";
|
|
86888
|
-
const head = `${channelLabelOf(detail)} (${detail.id}), ${
|
|
87035
|
+
const head = `${channelLabelOf(detail)} (${detail.id}), ${count10}${ends}`;
|
|
86889
87036
|
const rows = detail.members.map(
|
|
86890
87037
|
(member) => [ROLE[member.role], member.name, member.kind, member.id, ...presenceColumns(member)].join(" ")
|
|
86891
87038
|
);
|
|
@@ -86924,13 +87071,13 @@ function formatBrowsable({
|
|
|
86924
87071
|
}) {
|
|
86925
87072
|
if (channels3.length === 0) return "No channels to browse.\n";
|
|
86926
87073
|
const rows = channels3.map((channel) => {
|
|
86927
|
-
const
|
|
87074
|
+
const count10 = `${channel.memberCount} ${channel.memberCount === 1 ? "member" : "members"}`;
|
|
86928
87075
|
const marks = [
|
|
86929
87076
|
channel.joined ? "joined" : "not joined",
|
|
86930
87077
|
...channel.private ? ["private"] : [],
|
|
86931
87078
|
...channel.archived ? ["archived"] : []
|
|
86932
87079
|
].join(", ");
|
|
86933
|
-
return `#${channel.name} ${channel.id} ${
|
|
87080
|
+
return `#${channel.name} ${channel.id} ${count10} ${marks} ${channel.topic}`;
|
|
86934
87081
|
});
|
|
86935
87082
|
return `${rows.join("\n")}
|
|
86936
87083
|
`;
|
|
@@ -86979,10 +87126,10 @@ var DURATION = /^(\d+)\s*(m|min|mins|minutes?|h|hours?|d|days?)$/i;
|
|
|
86979
87126
|
function minutesOf({ text: text3 }) {
|
|
86980
87127
|
const match = DURATION.exec(text3.trim());
|
|
86981
87128
|
if (!match?.[1] || !match[2]) return null;
|
|
86982
|
-
const
|
|
87129
|
+
const count10 = Number(match[1]);
|
|
86983
87130
|
const unit = match[2].toLowerCase()[0];
|
|
86984
87131
|
const perUnit = { d: 1440, h: 60, m: 1 };
|
|
86985
|
-
const minutes =
|
|
87132
|
+
const minutes = count10 * (perUnit[unit ?? "m"] ?? 1);
|
|
86986
87133
|
return minutes > 0 ? minutes : null;
|
|
86987
87134
|
}
|
|
86988
87135
|
function muteTextOf({ mute }) {
|
|
@@ -88490,9 +88637,8 @@ var computerWaitlistChangedDefinition = external_exports.object({
|
|
|
88490
88637
|
var priceId = external_exports.string().min(1).optional();
|
|
88491
88638
|
var MAC_QA_WORKSPACE_ID = "workspace_0004i5nUrgRHO0Mz9PXEeGpqnPFDM";
|
|
88492
88639
|
var billingConfig = Config.define((c) => ({
|
|
88640
|
+
/** Every link billing hands out, referral links included (`BASE_HOST`, laze.so on prod). */
|
|
88493
88641
|
publicBaseUrl,
|
|
88494
|
-
/** The first alias (`laze.so` on prod) is the short origin referral links are shared on. */
|
|
88495
|
-
publicOriginAliases,
|
|
88496
88642
|
/** Stripe's API, or the payment simulator in tests and local stacks. */
|
|
88497
88643
|
stripeApiBase: c.env("STRIPE_API_BASE", external_exports.url().default("https://api.stripe.com")),
|
|
88498
88644
|
/** Team's graduated per-person price (`TEAM_PRICING`), one quantity per person. */
|
|
@@ -90301,7 +90447,9 @@ var loginTerminalDefinition = external_exports.discriminatedUnion("status", [
|
|
|
90301
90447
|
status: external_exports.literal("ready"),
|
|
90302
90448
|
/** The WebSocket path of the terminal, token included; add `cols` and `rows`. */
|
|
90303
90449
|
streamPath: external_exports.string(),
|
|
90304
|
-
expiresAt: external_exports.iso.datetime()
|
|
90450
|
+
expiresAt: external_exports.iso.datetime(),
|
|
90451
|
+
/** The caller's last sign-in try of this CLI, when it ended refused: when, and why. */
|
|
90452
|
+
lastTry: external_exports.object({ at: external_exports.iso.datetime(), reason: external_exports.string().regex(/^[a-z0-9_]{1,40}$/) }).optional()
|
|
90305
90453
|
})
|
|
90306
90454
|
]);
|
|
90307
90455
|
var loginTerminalSchema = loginTerminalDefinition;
|
|
@@ -90566,8 +90714,8 @@ var whatsappObservedPayloadDefinition = external_exports.object({
|
|
|
90566
90714
|
});
|
|
90567
90715
|
|
|
90568
90716
|
// ../../modules/compute/contract/src/whatsapp-ops.ts
|
|
90569
|
-
var
|
|
90570
|
-
var
|
|
90717
|
+
var count8 = external_exports.number().int().nonnegative();
|
|
90718
|
+
var at2 = external_exports.iso.datetime();
|
|
90571
90719
|
var whatsappMirrorHealthDefinition = external_exports.object({
|
|
90572
90720
|
mirrors: external_exports.array(
|
|
90573
90721
|
external_exports.object({
|
|
@@ -90577,23 +90725,23 @@ var whatsappMirrorHealthDefinition = external_exports.object({
|
|
|
90577
90725
|
provider: external_exports.string(),
|
|
90578
90726
|
mirrorOn: external_exports.boolean(),
|
|
90579
90727
|
/** When the mirror took its changes only as events (ADR-216); null while it still pulls. */
|
|
90580
|
-
eventsAt:
|
|
90728
|
+
eventsAt: at2.nullable(),
|
|
90581
90729
|
cursor: external_exports.number().int(),
|
|
90582
|
-
nextVisitAt:
|
|
90583
|
-
touchedAt:
|
|
90584
|
-
createdAt:
|
|
90585
|
-
skipped: external_exports.object({ count:
|
|
90730
|
+
nextVisitAt: at2.nullable(),
|
|
90731
|
+
touchedAt: at2.nullable(),
|
|
90732
|
+
createdAt: at2,
|
|
90733
|
+
skipped: external_exports.object({ count: count8, from: external_exports.number().int().nullable(), at: at2.nullable() }),
|
|
90586
90734
|
/** The last pull that met files; null when none did. */
|
|
90587
90735
|
files: external_exports.object({
|
|
90588
|
-
at,
|
|
90589
|
-
attached:
|
|
90590
|
-
unavailable:
|
|
90591
|
-
retrying:
|
|
90592
|
-
dropped:
|
|
90736
|
+
at: at2,
|
|
90737
|
+
attached: count8,
|
|
90738
|
+
unavailable: count8,
|
|
90739
|
+
retrying: count8,
|
|
90740
|
+
dropped: count8,
|
|
90593
90741
|
failureCode: external_exports.string().nullable()
|
|
90594
90742
|
}).nullable(),
|
|
90595
90743
|
/** Intake holds (ADR-216 §11) by kind and code, with when the oldest was made. */
|
|
90596
|
-
holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count:
|
|
90744
|
+
holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count: count8, oldestAt: at2 }))
|
|
90597
90745
|
})
|
|
90598
90746
|
)
|
|
90599
90747
|
});
|
|
@@ -90617,7 +90765,7 @@ var whatsappWakeTimelineDefinition = external_exports.object({
|
|
|
90617
90765
|
/** Newest first. */
|
|
90618
90766
|
wakes: external_exports.array(
|
|
90619
90767
|
external_exports.object({
|
|
90620
|
-
requestedAt:
|
|
90768
|
+
requestedAt: at2,
|
|
90621
90769
|
/** watch, send, message, visit, link or unpair. */
|
|
90622
90770
|
cause: external_exports.string(),
|
|
90623
90771
|
/** done, failed, or open when no step came for a while. */
|
|
@@ -90634,12 +90782,12 @@ var whatsappWakeTimelineDefinition = external_exports.object({
|
|
|
90634
90782
|
steps: external_exports.array(
|
|
90635
90783
|
external_exports.object({
|
|
90636
90784
|
step: external_exports.enum(WHATSAPP_WAKE_STEPS),
|
|
90637
|
-
at,
|
|
90638
|
-
sincePreviousMs:
|
|
90639
|
-
sinceRequestMs:
|
|
90785
|
+
at: at2,
|
|
90786
|
+
sincePreviousMs: count8,
|
|
90787
|
+
sinceRequestMs: count8
|
|
90640
90788
|
})
|
|
90641
90789
|
),
|
|
90642
|
-
totalMs:
|
|
90790
|
+
totalMs: count8.nullable()
|
|
90643
90791
|
})
|
|
90644
90792
|
)
|
|
90645
90793
|
})
|
|
@@ -91328,8 +91476,8 @@ var CONNECT_HELP = `laze connect: services for your agent's work.
|
|
|
91328
91476
|
laze connect suggest <service|domain|https url> --reason "<one plain sentence>"
|
|
91329
91477
|
[--label <name>] [--instructions "<markdown>"] [--auth oauth|key|none]
|
|
91330
91478
|
[--header <name>] [--prefix "<text>"] [--keychain workspace]
|
|
91331
|
-
post a card for
|
|
91332
|
-
back once it is connected. A service Laze has no card for works by its MCP URL or domain:
|
|
91479
|
+
post a card for your owner (a team agent: the person who asked), whose keychain you use:
|
|
91480
|
+
they sign in or paste the key there, and you hear back once it is connected. A service Laze has no card for works by its MCP URL or domain:
|
|
91333
91481
|
Laze finds how it signs in. --instructions says where the key is and what to turn on;
|
|
91334
91482
|
--keychain workspace asks an admin to connect it for the whole workspace instead
|
|
91335
91483
|
laze connect search <text> find a server's MCP URL in the registry and indexes
|
|
@@ -91507,11 +91655,11 @@ function bundleOf({ text: text3, field }) {
|
|
|
91507
91655
|
for (const line of text3.split(/\r?\n/)) {
|
|
91508
91656
|
const kept = line.trim();
|
|
91509
91657
|
if (!kept || kept.startsWith("#")) continue;
|
|
91510
|
-
const
|
|
91511
|
-
if (
|
|
91658
|
+
const at4 = line.indexOf("=");
|
|
91659
|
+
if (at4 <= 0) {
|
|
91512
91660
|
throw new CliUsageError("Give KEY=value lines, or one value with --field <FIELD>.");
|
|
91513
91661
|
}
|
|
91514
|
-
fields[line.slice(0,
|
|
91662
|
+
fields[line.slice(0, at4).trim()] = line.slice(at4 + 1);
|
|
91515
91663
|
}
|
|
91516
91664
|
return { kind: "api_key_set", fields };
|
|
91517
91665
|
}
|
|
@@ -93067,7 +93215,7 @@ function nextClock({
|
|
|
93067
93215
|
timeZone
|
|
93068
93216
|
}) {
|
|
93069
93217
|
const local2 = now.toZonedDateTimeISO(timeZone);
|
|
93070
|
-
const
|
|
93218
|
+
const at4 = local2.with({
|
|
93071
93219
|
hour: Number(clock[1]),
|
|
93072
93220
|
minute: Number(clock[2]),
|
|
93073
93221
|
second: 0,
|
|
@@ -93075,7 +93223,7 @@ function nextClock({
|
|
|
93075
93223
|
microsecond: 0,
|
|
93076
93224
|
nanosecond: 0
|
|
93077
93225
|
});
|
|
93078
|
-
const next = Temporal3.ZonedDateTime.compare(
|
|
93226
|
+
const next = Temporal3.ZonedDateTime.compare(at4, local2) > 0 ? at4 : at4.add({ days: 1 });
|
|
93079
93227
|
return next.toString({ timeZoneName: "never", smallestUnit: "second" });
|
|
93080
93228
|
}
|
|
93081
93229
|
function dndInputOf({
|
|
@@ -94007,8 +94155,8 @@ var EXTERNAL_USAGE = `Usage:
|
|
|
94007
94155
|
laze external report <workspace> --note "<why>" report a workspace to Laze staff, and block it (admins)`;
|
|
94008
94156
|
var printJson6 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
|
|
94009
94157
|
`);
|
|
94010
|
-
function wordAt5({ args, at:
|
|
94011
|
-
const word3 = args.words[
|
|
94158
|
+
function wordAt5({ args, at: at4, what }) {
|
|
94159
|
+
const word3 = args.words[at4]?.trim();
|
|
94012
94160
|
if (!word3) throw new CliUsageError(`Name ${what}.
|
|
94013
94161
|
${EXTERNAL_USAGE}`);
|
|
94014
94162
|
return word3;
|
|
@@ -94112,9 +94260,9 @@ async function invite2({ context, args }) {
|
|
|
94112
94260
|
});
|
|
94113
94261
|
if (args.flags.json) return printJson6(context, sent);
|
|
94114
94262
|
const sharing = sent.share ? `, sharing #${sent.share.name} once accepted` : "";
|
|
94115
|
-
const
|
|
94263
|
+
const at4 = sent.company ? ` at ${sent.company}` : "";
|
|
94116
94264
|
context.out(
|
|
94117
|
-
`Invited ${sent.email}${
|
|
94265
|
+
`Invited ${sent.email}${at4}${sharing}. Invitation ${sent.id} expires ${utcTimeOf(sent.expiresAt)}.
|
|
94118
94266
|
`
|
|
94119
94267
|
);
|
|
94120
94268
|
}
|
|
@@ -95251,8 +95399,8 @@ function draftFilesMissingText(names) {
|
|
|
95251
95399
|
}
|
|
95252
95400
|
|
|
95253
95401
|
// ../../modules/feed/contract/src/feed.decisions.ts
|
|
95254
|
-
function decisionsLineOf(
|
|
95255
|
-
return `${
|
|
95402
|
+
function decisionsLineOf(count10) {
|
|
95403
|
+
return `${count10} ${count10 === 1 ? "decision" : "decisions"} waiting on you`;
|
|
95256
95404
|
}
|
|
95257
95405
|
|
|
95258
95406
|
// src/rules/feed-input.rules.ts
|
|
@@ -95260,11 +95408,11 @@ function csvCellsOf(line) {
|
|
|
95260
95408
|
const cells = [];
|
|
95261
95409
|
let cell = "";
|
|
95262
95410
|
let quoted2 = false;
|
|
95263
|
-
for (let
|
|
95264
|
-
const char = line[
|
|
95265
|
-
if (quoted2 && char === '"' && line[
|
|
95411
|
+
for (let at4 = 0; at4 < line.length; at4 += 1) {
|
|
95412
|
+
const char = line[at4];
|
|
95413
|
+
if (quoted2 && char === '"' && line[at4 + 1] === '"') {
|
|
95266
95414
|
cell += '"';
|
|
95267
|
-
|
|
95415
|
+
at4 += 1;
|
|
95268
95416
|
} else if (char === '"') {
|
|
95269
95417
|
quoted2 = !quoted2;
|
|
95270
95418
|
} else if (char === "," && !quoted2) {
|
|
@@ -95329,11 +95477,11 @@ feed_draft_missing when a card points at a draft without its text; fix it, or pa
|
|
|
95329
95477
|
to post it as written.`;
|
|
95330
95478
|
var FEED_NO_BODY = "feed cards have no body: put the point in the title and one --summary line, text to send in --draft, sources in --link";
|
|
95331
95479
|
function pairOf({ value, flag: flag2 }) {
|
|
95332
|
-
const
|
|
95333
|
-
if (
|
|
95480
|
+
const at4 = value.indexOf("=");
|
|
95481
|
+
if (at4 <= 0 || at4 === value.length - 1) {
|
|
95334
95482
|
throw new Error(`--${flag2} takes <label>=<value>, got "${value}"`);
|
|
95335
95483
|
}
|
|
95336
|
-
return [value.slice(0,
|
|
95484
|
+
return [value.slice(0, at4), value.slice(at4 + 1)];
|
|
95337
95485
|
}
|
|
95338
95486
|
function sourceOf(value) {
|
|
95339
95487
|
return value.startsWith("@") && value.length > 1 ? { file: value.slice(1) } : { text: value };
|
|
@@ -95754,8 +95902,8 @@ function optionalWords(words) {
|
|
|
95754
95902
|
}
|
|
95755
95903
|
function shareLinesOf({ move: move3, answer: answer6 }) {
|
|
95756
95904
|
const names = answer6.people.map((person) => person.name).join(", ") || "no one new";
|
|
95757
|
-
const
|
|
95758
|
-
const items = `${
|
|
95905
|
+
const count10 = answer6.itemIds.length;
|
|
95906
|
+
const items = `${count10} item${count10 === 1 ? "" : "s"}`;
|
|
95759
95907
|
const head = move3 === "share" ? `Shared ${items} with ${names}` : `Took ${names} off ${items}`;
|
|
95760
95908
|
return [head, ...answer6.itemIds].map((line) => `${line}
|
|
95761
95909
|
`).join("");
|
|
@@ -95915,10 +96063,10 @@ async function ranksOf({
|
|
|
95915
96063
|
const [itemId, priority] = args.words.slice(2);
|
|
95916
96064
|
const named = itemId && priority ? [`${itemId}=${priority}`] : [];
|
|
95917
96065
|
return [...named, ...args.lists.set ?? []].map((pair) => {
|
|
95918
|
-
const
|
|
95919
|
-
if (
|
|
96066
|
+
const at4 = pair.indexOf("=");
|
|
96067
|
+
if (at4 < 1) throw new CliUsageError(USAGE11);
|
|
95920
96068
|
try {
|
|
95921
|
-
return { itemId: pair.slice(0,
|
|
96069
|
+
return { itemId: pair.slice(0, at4), priority: rankOf(pair.slice(at4 + 1)) };
|
|
95922
96070
|
} catch (error63) {
|
|
95923
96071
|
throw new CliUsageError(error63 instanceof Error ? error63.message : String(error63));
|
|
95924
96072
|
}
|
|
@@ -96266,8 +96414,8 @@ function peopleOf({ args }) {
|
|
|
96266
96414
|
if (people2.length > 0) return people2;
|
|
96267
96415
|
return one ? [one] : [];
|
|
96268
96416
|
}
|
|
96269
|
-
function wordAt6({ args, at:
|
|
96270
|
-
const word3 = args.words[
|
|
96417
|
+
function wordAt6({ args, at: at4 }) {
|
|
96418
|
+
const word3 = args.words[at4];
|
|
96271
96419
|
if (!word3) throw new CliUsageError(USAGE12);
|
|
96272
96420
|
return word3;
|
|
96273
96421
|
}
|
|
@@ -96386,13 +96534,13 @@ function formatHistory(output2) {
|
|
|
96386
96534
|
const lines2 = linesOf3(output2);
|
|
96387
96535
|
if (lines2.length === 0) return `${where}${from}: no messages.
|
|
96388
96536
|
`;
|
|
96389
|
-
const
|
|
96537
|
+
const count10 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
|
|
96390
96538
|
const blocks = lines2.map(blockOf2).join("\n\n");
|
|
96391
96539
|
const cursor = olderCursorOf(output2);
|
|
96392
96540
|
const older = cursor ? `
|
|
96393
96541
|
|
|
96394
96542
|
Older: laze history ${output2.channel} --before ${cursor}` : "";
|
|
96395
|
-
return `${where}${from}: ${
|
|
96543
|
+
return `${where}${from}: ${count10}, oldest first
|
|
96396
96544
|
|
|
96397
96545
|
${blocks}${older}
|
|
96398
96546
|
`;
|
|
@@ -96478,7 +96626,7 @@ function money2({ amount, currency: currency2 }) {
|
|
|
96478
96626
|
return `${currency2.toUpperCase()} ${Number(amount.toFixed(2))}`;
|
|
96479
96627
|
}
|
|
96480
96628
|
function inviteQuoteText(quote4) {
|
|
96481
|
-
const
|
|
96629
|
+
const at4 = (amount) => money2({ amount, currency: quote4.currency });
|
|
96482
96630
|
const people2 = `${quote4.peopleAfter} ${quote4.peopleAfter === 1 ? "person" : "people"}`;
|
|
96483
96631
|
const seats = quote4.freeSeatsLeft ? ` ${quote4.freeSeatsLeft} free ${quote4.freeSeatsLeft === 1 ? "seat" : "seats"} left.` : "";
|
|
96484
96632
|
if (quote4.plan === "free" && !quote4.upgradeNeeded) {
|
|
@@ -96488,11 +96636,11 @@ function inviteQuoteText(quote4) {
|
|
|
96488
96636
|
return `Your plan holds ${quote4.seatCap} people, at no charge.
|
|
96489
96637
|
`;
|
|
96490
96638
|
}
|
|
96491
|
-
const price = `${
|
|
96639
|
+
const price = `${at4(quote4.monthlyAfter)} a month for ${people2} (${at4(quote4.perPersonAfter)} per person).${seats}`;
|
|
96492
96640
|
if (quote4.upgradeNeeded)
|
|
96493
96641
|
return `Team: ${price} This starts Team, paid through Stripe Checkout.
|
|
96494
96642
|
`;
|
|
96495
|
-
const change2 = quote4.monthlyAfter === quote4.monthlyNow ? "No change to your price." : `Was ${
|
|
96643
|
+
const change2 = quote4.monthlyAfter === quote4.monthlyNow ? "No change to your price." : `Was ${at4(quote4.monthlyNow)}; the change is prorated as each person joins.`;
|
|
96496
96644
|
return `New price: ${price} ${change2}
|
|
96497
96645
|
`;
|
|
96498
96646
|
}
|
|
@@ -97044,7 +97192,7 @@ var KEYS_USAGE = `Usage:
|
|
|
97044
97192
|
laze keys revoke <id> --any revoke any key of the workspace (admins)`;
|
|
97045
97193
|
var printJson8 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
|
|
97046
97194
|
`);
|
|
97047
|
-
var lastUsed = (
|
|
97195
|
+
var lastUsed = (at4) => at4 ? `last used ${at4}` : "never used";
|
|
97048
97196
|
async function mine3({ context, args }) {
|
|
97049
97197
|
const { client } = await signedIn({ context, args });
|
|
97050
97198
|
const keys2 = await client.get("/api/api-keys/mine");
|
|
@@ -97324,8 +97472,8 @@ var MACHINE_ACCESS_USAGE = [
|
|
|
97324
97472
|
" laze machine grant|revoke <machine> --member <userId> | --agent <agentId> share it or stop (owner)",
|
|
97325
97473
|
" laze machine budget <machine> <usd> [--period day|week|month] its spend cap (owner)"
|
|
97326
97474
|
].join("\n");
|
|
97327
|
-
function wordAt7({ args, at:
|
|
97328
|
-
const value = args.words[
|
|
97475
|
+
function wordAt7({ args, at: at4 }) {
|
|
97476
|
+
const value = args.words[at4];
|
|
97329
97477
|
if (!value) throw new CliUsageError(`Usage:
|
|
97330
97478
|
${MACHINE_ACCESS_USAGE}`);
|
|
97331
97479
|
return value;
|
|
@@ -97603,10 +97751,10 @@ ${USAGE13}`);
|
|
|
97603
97751
|
if ("exitCode" in released) return released;
|
|
97604
97752
|
Object.assign(env, released.env);
|
|
97605
97753
|
}
|
|
97606
|
-
const
|
|
97607
|
-
if (
|
|
97754
|
+
const count10 = Object.keys(env).length;
|
|
97755
|
+
if (count10 > EXEC_ENV_MAX) {
|
|
97608
97756
|
context.err(
|
|
97609
|
-
`laze: these connections hold ${
|
|
97757
|
+
`laze: these connections hold ${count10} variables; at most ${EXEC_ENV_MAX} go with a command. Send fewer connections, or run the command with \`laze vault run\` where you run.
|
|
97610
97758
|
`
|
|
97611
97759
|
);
|
|
97612
97760
|
return { exitCode: 1 };
|
|
@@ -97761,7 +97909,7 @@ function secretRefusal({
|
|
|
97761
97909
|
rules = MCP_SECRET_COMMANDS
|
|
97762
97910
|
}) {
|
|
97763
97911
|
const { words, flags: flags2 } = parseArgs({ argv });
|
|
97764
|
-
const command = [3, 2, 1].map((
|
|
97912
|
+
const command = [3, 2, 1].map((count10) => words.slice(0, count10).join(" ")).find((name3) => Object.hasOwn(rules, name3));
|
|
97765
97913
|
const rule = command === void 0 ? void 0 : rules[command];
|
|
97766
97914
|
if (!command || !rule) return void 0;
|
|
97767
97915
|
const vaultFlag = rule.vaultFlag ?? "from-vault";
|
|
@@ -98512,11 +98660,11 @@ async function monitorAdd({ context, args }) {
|
|
|
98512
98660
|
});
|
|
98513
98661
|
if (args.flags.json) return context.out(`${JSON.stringify(added, null, 2)}
|
|
98514
98662
|
`);
|
|
98515
|
-
const
|
|
98663
|
+
const count10 = added.watching.length;
|
|
98516
98664
|
context.out(
|
|
98517
98665
|
`${added.monitor.id} ${added.monitor.name}
|
|
98518
98666
|
${added.watching.join(" ")}
|
|
98519
|
-
Watching ${
|
|
98667
|
+
Watching ${count10} ${count10 === 1 ? "channel" : "channels"}
|
|
98520
98668
|
`
|
|
98521
98669
|
);
|
|
98522
98670
|
}
|
|
@@ -100252,6 +100400,124 @@ var viewDefinition = external_exports.object({
|
|
|
100252
100400
|
});
|
|
100253
100401
|
var hostLoadViewSchema = viewDefinition;
|
|
100254
100402
|
|
|
100403
|
+
// ../../modules/rum/contract/src/browser-trace-reads.ts
|
|
100404
|
+
var browserSessionIdSchema = external_exports.string().regex(/^[0-9a-f]{32}$/, "a session id: 32 hex characters");
|
|
100405
|
+
var at3 = external_exports.iso.datetime();
|
|
100406
|
+
var browserErrorDefinition = external_exports.object({
|
|
100407
|
+
at: at3,
|
|
100408
|
+
traceId: external_exports.string(),
|
|
100409
|
+
spanId: external_exports.string(),
|
|
100410
|
+
sessionId: external_exports.string().nullable(),
|
|
100411
|
+
/** console, window or unhandledrejection. */
|
|
100412
|
+
source: external_exports.string().nullable(),
|
|
100413
|
+
/** Scrubbed by the page and again here, capped at 300 characters; untrusted text. */
|
|
100414
|
+
message: external_exports.string(),
|
|
100415
|
+
/** `file:line` per frame, at most 10. */
|
|
100416
|
+
frames: external_exports.array(external_exports.string()),
|
|
100417
|
+
uiRoute: external_exports.string().nullable(),
|
|
100418
|
+
/** The page build's `service.version`. */
|
|
100419
|
+
release: external_exports.string().nullable(),
|
|
100420
|
+
service: external_exports.string().nullable()
|
|
100421
|
+
});
|
|
100422
|
+
var browserErrorSchema = browserErrorDefinition;
|
|
100423
|
+
var sessionSpanDefinition = external_exports.object({
|
|
100424
|
+
at: at3,
|
|
100425
|
+
durationMs: external_exports.number().nonnegative(),
|
|
100426
|
+
traceId: external_exports.string(),
|
|
100427
|
+
spanId: external_exports.string(),
|
|
100428
|
+
name: external_exports.string().nullable(),
|
|
100429
|
+
kind: external_exports.string().nullable(),
|
|
100430
|
+
status: external_exports.string().nullable(),
|
|
100431
|
+
uiRoute: external_exports.string().nullable(),
|
|
100432
|
+
httpRoute: external_exports.string().nullable(),
|
|
100433
|
+
method: external_exports.string().nullable(),
|
|
100434
|
+
statusCode: external_exports.number().int().nullable(),
|
|
100435
|
+
/** The request's path: no host, query string or fragment, share links as `/share/:id`. */
|
|
100436
|
+
path: external_exports.string().nullable()
|
|
100437
|
+
});
|
|
100438
|
+
var sessionSpanSchema = sessionSpanDefinition;
|
|
100439
|
+
|
|
100440
|
+
// ../../modules/rum/contract/src/rum.api.ts
|
|
100441
|
+
var RumApi = moduleApi()("rum");
|
|
100442
|
+
|
|
100443
|
+
// ../../packages/secrets/src/secret.ts
|
|
100444
|
+
var SecretHandle = class {
|
|
100445
|
+
constructor(id4, optional2, schema) {
|
|
100446
|
+
this.id = id4;
|
|
100447
|
+
this.optional = optional2;
|
|
100448
|
+
this.schema = schema;
|
|
100449
|
+
}
|
|
100450
|
+
id;
|
|
100451
|
+
optional;
|
|
100452
|
+
schema;
|
|
100453
|
+
};
|
|
100454
|
+
var SecretFamilyHandle = class extends SecretHandle {
|
|
100455
|
+
family = true;
|
|
100456
|
+
constructor(prefix) {
|
|
100457
|
+
super(prefix, true, void 0);
|
|
100458
|
+
}
|
|
100459
|
+
};
|
|
100460
|
+
function load(id4, options) {
|
|
100461
|
+
return new SecretHandle(id4, options?.optional === true, options?.schema);
|
|
100462
|
+
}
|
|
100463
|
+
function family(prefix) {
|
|
100464
|
+
return new SecretFamilyHandle(prefix);
|
|
100465
|
+
}
|
|
100466
|
+
var Secret = { load, family };
|
|
100467
|
+
|
|
100468
|
+
// ../../packages/secrets/src/shared-secrets.ts
|
|
100469
|
+
var sessionSecret = Secret.load("NEXTAUTH_SECRET", { optional: true });
|
|
100470
|
+
var credentialsSecret = Secret.load("CREDENTIALS_SECRET", { optional: true });
|
|
100471
|
+
var credentialsSecretPrevious = Secret.load("CREDENTIALS_SECRET_PREVIOUS", {
|
|
100472
|
+
optional: true
|
|
100473
|
+
});
|
|
100474
|
+
var gatewayInternalSecret = Secret.load("LW_GATEWAY_INTERNAL_SECRET", { optional: true });
|
|
100475
|
+
var virtualKeyPepper = Secret.load("LW_VIRTUAL_KEY_PEPPER", { optional: true });
|
|
100476
|
+
var telemetryExporterHeaders = Secret.load("OTEL_EXPORTER_OTLP_HEADERS", {
|
|
100477
|
+
optional: true
|
|
100478
|
+
});
|
|
100479
|
+
var openAiApiKey = Secret.load("OPENAI_API_KEY", { optional: true });
|
|
100480
|
+
var internalSlackSignupsWebhook = Secret.load("SLACK_CHANNEL_SIGNUPS", { optional: true });
|
|
100481
|
+
var signInProviderSecrets = {
|
|
100482
|
+
googleClientSecret: Secret.load("GOOGLE_CLIENT_SECRET", { optional: true }),
|
|
100483
|
+
githubClientSecret: Secret.load("GITHUB_CLIENT_SECRET", { optional: true }),
|
|
100484
|
+
gitlabClientSecret: Secret.load("GITLAB_CLIENT_SECRET", { optional: true }),
|
|
100485
|
+
azureAdClientSecret: Secret.load("AZURE_AD_CLIENT_SECRET", { optional: true }),
|
|
100486
|
+
auth0ClientSecret: Secret.load("AUTH0_CLIENT_SECRET", { optional: true }),
|
|
100487
|
+
oktaClientSecret: Secret.load("OKTA_CLIENT_SECRET", { optional: true }),
|
|
100488
|
+
cognitoClientSecret: Secret.load("COGNITO_CLIENT_SECRET", { optional: true }),
|
|
100489
|
+
oneLoginClientSecret: Secret.load("ONELOGIN_CLIENT_SECRET", { optional: true }),
|
|
100490
|
+
oidcClientSecret: Secret.load("OIDC_CLIENT_SECRET", { optional: true })
|
|
100491
|
+
};
|
|
100492
|
+
|
|
100493
|
+
// ../../modules/rum/contract/src/rum.config.ts
|
|
100494
|
+
var blankIsUnset2 = (value) => value === "" ? void 0 : value;
|
|
100495
|
+
var ON_SPELLING = /^(1|true|on|yes)$/i;
|
|
100496
|
+
var OFF_SPELLING = /^(0|false|off|no)$/i;
|
|
100497
|
+
var rumConfig = Config.define((c) => ({
|
|
100498
|
+
browserTracing: c.env(
|
|
100499
|
+
"LAZE_BROWSER_TRACING",
|
|
100500
|
+
external_exports.string().optional().transform((value) => {
|
|
100501
|
+
if (value === void 0 || value.trim() === "") return void 0;
|
|
100502
|
+
if (ON_SPELLING.test(value.trim())) return true;
|
|
100503
|
+
return OFF_SPELLING.test(value.trim()) ? false : void 0;
|
|
100504
|
+
})
|
|
100505
|
+
),
|
|
100506
|
+
sampleRatio: c.env(
|
|
100507
|
+
"LAZE_BROWSER_TRACING_SAMPLE_RATIO",
|
|
100508
|
+
external_exports.preprocess(blankIsUnset2, external_exports.coerce.number().min(0).max(1).default(1).catch(1))
|
|
100509
|
+
),
|
|
100510
|
+
telemetryEndpoint: telemetryExporterEndpoint,
|
|
100511
|
+
/** Tempo's HTTP API, which the ops reads of browser errors and sessions search. */
|
|
100512
|
+
tempoUrl: c.env("LAZE_TEMPO_URL", external_exports.url().default("http://127.0.0.1:6651"))
|
|
100513
|
+
}));
|
|
100514
|
+
var rumBrowserConfigDefinition = external_exports.strictObject({
|
|
100515
|
+
/** Whether the page starts tracing and exports to `/api/rum/v1/traces`. */
|
|
100516
|
+
browserTracing: external_exports.boolean(),
|
|
100517
|
+
/** Share of visits recorded; the collector samples the rest of the way. */
|
|
100518
|
+
sampleRatio: external_exports.number().min(0).max(1)
|
|
100519
|
+
});
|
|
100520
|
+
|
|
100255
100521
|
// ../../modules/ops/contract/src/ops-functions.ts
|
|
100256
100522
|
var OPS_FUNCTION = {
|
|
100257
100523
|
/** Functions one lease may name. */
|
|
@@ -100310,12 +100576,12 @@ var funnelInputDefinition = external_exports.object({
|
|
|
100310
100576
|
to: external_exports.iso.datetime(),
|
|
100311
100577
|
bucketMinutes: external_exports.union([external_exports.literal(10), external_exports.literal(60), external_exports.literal(1440)]).default(60)
|
|
100312
100578
|
}).strict();
|
|
100313
|
-
var
|
|
100579
|
+
var count9 = external_exports.number().int().nonnegative();
|
|
100314
100580
|
var funnelCountsDefinition = external_exports.object({
|
|
100315
|
-
signUps:
|
|
100316
|
-
workspaces:
|
|
100317
|
-
activatedTeams:
|
|
100318
|
-
payingTeams:
|
|
100581
|
+
signUps: count9,
|
|
100582
|
+
workspaces: count9,
|
|
100583
|
+
activatedTeams: count9,
|
|
100584
|
+
payingTeams: count9
|
|
100319
100585
|
});
|
|
100320
100586
|
var funnelOutputDefinition = external_exports.object({
|
|
100321
100587
|
bucketMinutes: external_exports.number().int(),
|
|
@@ -100341,23 +100607,23 @@ var cohortOutputDefinition = external_exports.object({
|
|
|
100341
100607
|
promotionId: external_exports.string().nullable(),
|
|
100342
100608
|
plan: external_exports.string(),
|
|
100343
100609
|
paying: external_exports.boolean(),
|
|
100344
|
-
members:
|
|
100610
|
+
members: count9,
|
|
100345
100611
|
agents: external_exports.object({
|
|
100346
|
-
laze:
|
|
100347
|
-
connected:
|
|
100612
|
+
laze: count9,
|
|
100613
|
+
connected: count9,
|
|
100348
100614
|
firstLazeAgentAt: external_exports.iso.datetime().nullable()
|
|
100349
100615
|
}),
|
|
100350
|
-
turns:
|
|
100351
|
-
appsCreated:
|
|
100352
|
-
connectionsLinked:
|
|
100616
|
+
turns: count9,
|
|
100617
|
+
appsCreated: count9,
|
|
100618
|
+
connectionsLinked: count9,
|
|
100353
100619
|
creatorLastMessageAt: external_exports.iso.datetime().nullable(),
|
|
100354
100620
|
/** Live messages per UTC day; days with none are left out. */
|
|
100355
100621
|
days: external_exports.array(
|
|
100356
100622
|
external_exports.object({
|
|
100357
100623
|
day: external_exports.string(),
|
|
100358
|
-
byPeople:
|
|
100359
|
-
byAgents:
|
|
100360
|
-
people:
|
|
100624
|
+
byPeople: count9,
|
|
100625
|
+
byAgents: count9,
|
|
100626
|
+
people: count9
|
|
100361
100627
|
})
|
|
100362
100628
|
),
|
|
100363
100629
|
/** The once-only sends nurturing kept (first_agent_made, first_agent_nudge, ...). */
|
|
@@ -100381,25 +100647,25 @@ var capacityOutputDefinition = external_exports.object({
|
|
|
100381
100647
|
/** The last day of host load, oldest first. */
|
|
100382
100648
|
history: external_exports.array(hostLoadPointSchema)
|
|
100383
100649
|
});
|
|
100384
|
-
var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count:
|
|
100650
|
+
var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count: count9 }));
|
|
100385
100651
|
var snapshotOutputDefinition = external_exports.object({
|
|
100386
100652
|
workspaceId: external_exports.string(),
|
|
100387
100653
|
createdAt: external_exports.iso.datetime(),
|
|
100388
100654
|
plan: external_exports.string(),
|
|
100389
100655
|
status: external_exports.string(),
|
|
100390
|
-
seats: external_exports.object({ people:
|
|
100656
|
+
seats: external_exports.object({ people: count9, limit: external_exports.number().int().nullable() }),
|
|
100391
100657
|
membersByRole: tally,
|
|
100392
100658
|
invitesByStatus: tally,
|
|
100393
100659
|
agentsByKind: tally,
|
|
100394
100660
|
agentsByHosting: tally,
|
|
100395
|
-
agentsConnected:
|
|
100661
|
+
agentsConnected: count9,
|
|
100396
100662
|
flagsOn: external_exports.array(external_exports.string()),
|
|
100397
|
-
complimentaryComputers:
|
|
100663
|
+
complimentaryComputers: count9
|
|
100398
100664
|
});
|
|
100399
100665
|
var eventsInputDefinition = external_exports.object({ from: external_exports.iso.datetime(), to: external_exports.iso.datetime() }).strict();
|
|
100400
100666
|
var eventCountsDefinition = external_exports.object({
|
|
100401
|
-
total:
|
|
100402
|
-
byType: external_exports.array(external_exports.object({ eventType: external_exports.string(), count:
|
|
100667
|
+
total: count9,
|
|
100668
|
+
byType: external_exports.array(external_exports.object({ eventType: external_exports.string(), count: count9 }))
|
|
100403
100669
|
});
|
|
100404
100670
|
var tenantEventsInputDefinition = external_exports.object({
|
|
100405
100671
|
from: external_exports.iso.datetime(),
|
|
@@ -100428,9 +100694,9 @@ var databaseHealthDefinition = external_exports.object({
|
|
|
100428
100694
|
deadlocks: external_exports.number().nonnegative(),
|
|
100429
100695
|
tempBytes: external_exports.number().nonnegative(),
|
|
100430
100696
|
connections: external_exports.object({
|
|
100431
|
-
total:
|
|
100432
|
-
byState: external_exports.array(external_exports.object({ state: external_exports.string(), count:
|
|
100433
|
-
waitingOnLocks:
|
|
100697
|
+
total: count9,
|
|
100698
|
+
byState: external_exports.array(external_exports.object({ state: external_exports.string(), count: count9 })),
|
|
100699
|
+
waitingOnLocks: count9,
|
|
100434
100700
|
longestActiveSeconds: external_exports.number().nonnegative(),
|
|
100435
100701
|
longestIdleInTransactionSeconds: external_exports.number().nonnegative()
|
|
100436
100702
|
}),
|
|
@@ -100461,7 +100727,7 @@ var tenantAgentsDefinition = external_exports.object({
|
|
|
100461
100727
|
createdAt: external_exports.iso.datetime(),
|
|
100462
100728
|
modelLevel: external_exports.string().nullable(),
|
|
100463
100729
|
model: external_exports.string().nullable(),
|
|
100464
|
-
channels:
|
|
100730
|
+
channels: count9,
|
|
100465
100731
|
limitedUntil: external_exports.iso.datetime().nullable(),
|
|
100466
100732
|
limitedBy: external_exports.string().nullable(),
|
|
100467
100733
|
pausedAt: external_exports.iso.datetime().nullable(),
|
|
@@ -100510,8 +100776,8 @@ var tenantBillingDefinition = external_exports.object({
|
|
|
100510
100776
|
currency: external_exports.string(),
|
|
100511
100777
|
cancelAtPeriodEnd: external_exports.boolean(),
|
|
100512
100778
|
period: external_exports.object({ start: external_exports.iso.datetime(), end: external_exports.iso.datetime() }).nullable(),
|
|
100513
|
-
seats: external_exports.object({ people:
|
|
100514
|
-
complimentarySeats:
|
|
100779
|
+
seats: external_exports.object({ people: count9, limit: count9.nullable(), monthlyPrice: external_exports.number() }),
|
|
100780
|
+
complimentarySeats: count9.nullable(),
|
|
100515
100781
|
credits: external_exports.object({
|
|
100516
100782
|
included: external_exports.number(),
|
|
100517
100783
|
includedLeft: external_exports.number(),
|
|
@@ -100550,14 +100816,14 @@ var tenantVaultDefinition = external_exports.object({
|
|
|
100550
100816
|
external_exports.object({
|
|
100551
100817
|
subject: external_exports.string(),
|
|
100552
100818
|
most: external_exports.string(),
|
|
100553
|
-
maxLeaseSeconds:
|
|
100819
|
+
maxLeaseSeconds: count9.nullable(),
|
|
100554
100820
|
blocked: external_exports.boolean(),
|
|
100555
100821
|
approveNew: external_exports.boolean(),
|
|
100556
100822
|
updatedAt: external_exports.iso.datetime()
|
|
100557
100823
|
})
|
|
100558
100824
|
),
|
|
100559
100825
|
/** Connections waiting for an admin, counted by kind; never a name, label or field. */
|
|
100560
|
-
waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count:
|
|
100826
|
+
waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count: count9 }))
|
|
100561
100827
|
});
|
|
100562
100828
|
var WHATSAPP_INTAKE_KEY_KINDS = ["msg", "edit", "del", "react", "read"];
|
|
100563
100829
|
var tenantWhatsappInputDefinition = external_exports.object({
|
|
@@ -100570,8 +100836,8 @@ var tenantWhatsappOutputDefinition = external_exports.object({
|
|
|
100570
100836
|
intake: external_exports.object({
|
|
100571
100837
|
since: external_exports.iso.datetime(),
|
|
100572
100838
|
until: external_exports.iso.datetime(),
|
|
100573
|
-
total:
|
|
100574
|
-
byKind: external_exports.array(external_exports.object({ kind: external_exports.enum([...WHATSAPP_INTAKE_KEY_KINDS, "other"]), count:
|
|
100839
|
+
total: count9,
|
|
100840
|
+
byKind: external_exports.array(external_exports.object({ kind: external_exports.enum([...WHATSAPP_INTAKE_KEY_KINDS, "other"]), count: count9 }))
|
|
100575
100841
|
})
|
|
100576
100842
|
});
|
|
100577
100843
|
var wakeTimelineInputDefinition = external_exports.object({
|
|
@@ -100599,6 +100865,32 @@ var judgeMeasureOutputDefinition = external_exports.object({
|
|
|
100599
100865
|
thresholds: vaultJudgeMeasureSchema.shape.thresholds,
|
|
100600
100866
|
keys: pageOf(vaultJudgeMeasureSchema.shape.keys.element)
|
|
100601
100867
|
});
|
|
100868
|
+
var vaultAsksInputDefinition = external_exports.object({
|
|
100869
|
+
from: external_exports.iso.datetime(),
|
|
100870
|
+
to: external_exports.iso.datetime(),
|
|
100871
|
+
agentId: external_exports.string().trim().min(1).max(128).optional(),
|
|
100872
|
+
limit: external_exports.number().int().min(1).max(500).default(100),
|
|
100873
|
+
cursor: cursorDefinition.optional()
|
|
100874
|
+
}).strict();
|
|
100875
|
+
var vaultAsksOutputDefinition = external_exports.object({ asks: pageOf(vaultOpsAskSchema) });
|
|
100876
|
+
var browserErrorsInputDefinition = external_exports.object({
|
|
100877
|
+
from: external_exports.iso.datetime(),
|
|
100878
|
+
to: external_exports.iso.datetime(),
|
|
100879
|
+
/** Keeps errors whose message holds this, ignoring case. */
|
|
100880
|
+
message: external_exports.string().trim().min(1).max(200).optional(),
|
|
100881
|
+
sessionId: browserSessionIdSchema.optional(),
|
|
100882
|
+
limit: external_exports.number().int().min(1).max(500).default(100),
|
|
100883
|
+
cursor: cursorDefinition.optional()
|
|
100884
|
+
}).strict();
|
|
100885
|
+
var browserErrorsOutputDefinition = external_exports.object({ errors: pageOf(browserErrorSchema) });
|
|
100886
|
+
var sessionSpansInputDefinition = external_exports.object({
|
|
100887
|
+
from: external_exports.iso.datetime(),
|
|
100888
|
+
to: external_exports.iso.datetime(),
|
|
100889
|
+
sessionId: browserSessionIdSchema,
|
|
100890
|
+
limit: external_exports.number().int().min(1).max(500).default(200),
|
|
100891
|
+
cursor: cursorDefinition.optional()
|
|
100892
|
+
}).strict();
|
|
100893
|
+
var sessionSpansOutputDefinition = external_exports.object({ spans: pageOf(sessionSpanSchema) });
|
|
100602
100894
|
var entry = (value) => value;
|
|
100603
100895
|
var OPS_FUNCTIONS = {
|
|
100604
100896
|
"workspaces.find": entry({
|
|
@@ -100707,6 +100999,20 @@ var OPS_FUNCTIONS = {
|
|
|
100707
100999
|
input: tenantWhatsappInputDefinition,
|
|
100708
101000
|
output: tenantWhatsappOutputDefinition
|
|
100709
101001
|
}),
|
|
101002
|
+
"tenant.slack": entry({
|
|
101003
|
+
title: "One workspace's Slack mirrors: bot, cache window and thread gaps as counts",
|
|
101004
|
+
scope: "tenant",
|
|
101005
|
+
view: "table",
|
|
101006
|
+
input: noInputDefinition,
|
|
101007
|
+
output: slackMirrorHealthSchema
|
|
101008
|
+
}),
|
|
101009
|
+
"tenant.vault_asks": entry({
|
|
101010
|
+
title: "One workspace's vault approval cards over a range: state, decider, joins and times",
|
|
101011
|
+
scope: "tenant",
|
|
101012
|
+
view: "table",
|
|
101013
|
+
input: vaultAsksInputDefinition,
|
|
101014
|
+
output: vaultAsksOutputDefinition
|
|
101015
|
+
}),
|
|
100710
101016
|
"computers.wake_timeline": entry({
|
|
100711
101017
|
title: "One workspace's last WhatsApp wakes per computer, with each step's time",
|
|
100712
101018
|
scope: "tenant",
|
|
@@ -100728,6 +101034,21 @@ var OPS_FUNCTIONS = {
|
|
|
100728
101034
|
input: judgeMeasureInputDefinition,
|
|
100729
101035
|
output: judgeMeasureOutputDefinition
|
|
100730
101036
|
}),
|
|
101037
|
+
"traces.browser_errors": entry({
|
|
101038
|
+
title: "Browser errors over a range: message, frames, route, release and session",
|
|
101039
|
+
scope: "platform",
|
|
101040
|
+
view: "table",
|
|
101041
|
+
input: browserErrorsInputDefinition,
|
|
101042
|
+
output: browserErrorsOutputDefinition,
|
|
101043
|
+
scrubbedText: ["message"]
|
|
101044
|
+
}),
|
|
101045
|
+
"traces.session_spans": entry({
|
|
101046
|
+
title: "One browser session's spans over a range: names, routes, status codes and times",
|
|
101047
|
+
scope: "platform",
|
|
101048
|
+
view: "table",
|
|
101049
|
+
input: sessionSpansInputDefinition,
|
|
101050
|
+
output: sessionSpansOutputDefinition
|
|
101051
|
+
}),
|
|
100731
101052
|
"tenant.snapshot": entry({
|
|
100732
101053
|
title: "One workspace's plan, members, agents and flags, as counts",
|
|
100733
101054
|
scope: "tenant",
|
|
@@ -100794,11 +101115,11 @@ function typedArg(text3) {
|
|
|
100794
101115
|
}
|
|
100795
101116
|
function argsOf({ args }) {
|
|
100796
101117
|
const pairs = (args.lists.arg ?? []).map((pair) => {
|
|
100797
|
-
const
|
|
100798
|
-
if (
|
|
101118
|
+
const at4 = pair.indexOf("=");
|
|
101119
|
+
if (at4 < 1) throw new CliUsageError(`--arg takes name=value.
|
|
100799
101120
|
${OPERATOR_KEY_USAGE}`);
|
|
100800
|
-
const text3 = pair.slice(
|
|
100801
|
-
return [pair.slice(0,
|
|
101121
|
+
const text3 = pair.slice(at4 + 1);
|
|
101122
|
+
return [pair.slice(0, at4), typedArg(text3)];
|
|
100802
101123
|
});
|
|
100803
101124
|
return Object.fromEntries(pairs);
|
|
100804
101125
|
}
|
|
@@ -101195,14 +101516,14 @@ var CHECK_WAIT_TRIES = 30;
|
|
|
101195
101516
|
function timingOf(args) {
|
|
101196
101517
|
const cron = flagText({ args, name: "cron" });
|
|
101197
101518
|
const rrule = flagText({ args, name: "rrule" });
|
|
101198
|
-
const
|
|
101199
|
-
const given = [cron, rrule,
|
|
101519
|
+
const at4 = flagText({ args, name: "at" });
|
|
101520
|
+
const given = [cron, rrule, at4].filter(Boolean);
|
|
101200
101521
|
if (given.length !== 1)
|
|
101201
101522
|
throw new CliUsageError(`Give exactly one of --cron, --rrule or --at.
|
|
101202
101523
|
${USAGE17}`);
|
|
101203
101524
|
if (cron) return { kind: "cron", cron };
|
|
101204
101525
|
if (rrule) return { kind: "rrule", rrule };
|
|
101205
|
-
return { kind: "once", at:
|
|
101526
|
+
return { kind: "once", at: at4 };
|
|
101206
101527
|
}
|
|
101207
101528
|
function printSchedule({ context, schedule: schedule2 }) {
|
|
101208
101529
|
const next = schedule2.nextFireAt ? `next ${schedule2.nextFireAt}` : "no next fire";
|
|
@@ -102311,10 +102632,10 @@ function bareLineOf({ line, where }) {
|
|
|
102311
102632
|
throw new CliUsageError(`${where}: not a name: ${line}`);
|
|
102312
102633
|
}
|
|
102313
102634
|
function lineOf4({ line, where }) {
|
|
102314
|
-
const
|
|
102315
|
-
if (
|
|
102316
|
-
const variable = line.slice(0,
|
|
102317
|
-
const value = line.slice(
|
|
102635
|
+
const at4 = line.indexOf("=");
|
|
102636
|
+
if (at4 === -1) return bareLineOf({ line, where });
|
|
102637
|
+
const variable = line.slice(0, at4).trim();
|
|
102638
|
+
const value = line.slice(at4 + 1).trim();
|
|
102318
102639
|
if (!VARIABLE.test(variable)) {
|
|
102319
102640
|
throw new CliUsageError(`${where}: not a variable name: ${variable}`);
|
|
102320
102641
|
}
|
|
@@ -102598,12 +102919,12 @@ The reason comes from --reason, else KV_REASON or LAZE_VAULT_REASON: set it on e
|
|
|
102598
102919
|
helm or terraform command, which reach this through credential_process.`;
|
|
102599
102920
|
function withWaitSeconds(args) {
|
|
102600
102921
|
if (args.flags.wait !== true) return args;
|
|
102601
|
-
const
|
|
102602
|
-
if (
|
|
102922
|
+
const at4 = args.words.findLastIndex((word3, index) => index >= 2 && /^\d+$/.test(word3));
|
|
102923
|
+
if (at4 === -1) return args;
|
|
102603
102924
|
return {
|
|
102604
102925
|
...args,
|
|
102605
|
-
words: args.words.filter((_, index) => index !==
|
|
102606
|
-
flags: { ...args.flags, wait: args.words[
|
|
102926
|
+
words: args.words.filter((_, index) => index !== at4),
|
|
102927
|
+
flags: { ...args.flags, wait: args.words[at4] ?? "" }
|
|
102607
102928
|
};
|
|
102608
102929
|
}
|
|
102609
102930
|
function reasonOf({ context, args }) {
|
|
@@ -102793,9 +103114,9 @@ function execProviderIds({ request: request2 }) {
|
|
|
102793
103114
|
return Array.isArray(ids) ? ids.filter((id4) => typeof id4 === "string") : [];
|
|
102794
103115
|
}
|
|
102795
103116
|
function splitExecId({ id: id4 }) {
|
|
102796
|
-
const
|
|
102797
|
-
if (
|
|
102798
|
-
return { connection: id4.slice(0,
|
|
103117
|
+
const at4 = id4.indexOf("#");
|
|
103118
|
+
if (at4 === -1) return { connection: id4 };
|
|
103119
|
+
return { connection: id4.slice(0, at4), field: id4.slice(at4 + 1) };
|
|
102799
103120
|
}
|
|
102800
103121
|
function valueOf({
|
|
102801
103122
|
fields,
|
|
@@ -102939,7 +103260,7 @@ async function vaultSave({ context, args }) {
|
|
|
102939
103260
|
// src/services/vault-scrub-commands.service.ts
|
|
102940
103261
|
function lineOf5(channel) {
|
|
102941
103262
|
const where = channel.name ? `#${channel.name}` : channel.channelId;
|
|
102942
|
-
const found = Object.entries(channel.found).map(([vendor,
|
|
103263
|
+
const found = Object.entries(channel.found).map(([vendor, count10]) => `${vendor} ${count10}`).join(", ");
|
|
102943
103264
|
const kinds = [`held ${channel.held}`, ...found ? [`found: ${found}`] : []].join("; ");
|
|
102944
103265
|
return `${where} scanned ${channel.scanned} changed ${channel.messages} ${kinds}
|
|
102945
103266
|
`;
|
|
@@ -103628,8 +103949,8 @@ var USAGE20 = [
|
|
|
103628
103949
|
"With no machine it is the WhatsApp linked on your (or your agent's owner's) Laze computer.",
|
|
103629
103950
|
"A chat is its id, a phone number or a contact or group name."
|
|
103630
103951
|
].join("\n");
|
|
103631
|
-
function word2({ args, at:
|
|
103632
|
-
const value = args.words[
|
|
103952
|
+
function word2({ args, at: at4 }) {
|
|
103953
|
+
const value = args.words[at4];
|
|
103633
103954
|
if (!value) throw new CliUsageError(USAGE20);
|
|
103634
103955
|
return value;
|
|
103635
103956
|
}
|
|
@@ -103929,8 +104250,8 @@ async function roles({ context, args }) {
|
|
|
103929
104250
|
const catalogue = await client.get("/api/roles");
|
|
103930
104251
|
if (args.flags.json) return printJson11(context, catalogue);
|
|
103931
104252
|
for (const role2 of catalogue) {
|
|
103932
|
-
const
|
|
103933
|
-
context.out(`${role2.label} ${
|
|
104253
|
+
const count10 = `${role2.permissions.length} permissions`;
|
|
104254
|
+
context.out(`${role2.label} ${count10} ${role2.description}
|
|
103934
104255
|
`);
|
|
103935
104256
|
context.out(` ${role2.permissions.join(", ")}
|
|
103936
104257
|
`);
|
|
@@ -104188,7 +104509,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
104188
104509
|
laze vault grant|share|lend|grants|ungrant|leases|end-lease|limits|set-limit sharing, leases, limits
|
|
104189
104510
|
laze vault audit|activity|most-asked|approvals|judge|devices what happened (audit: admins)
|
|
104190
104511
|
laze vault every laze vault command, with its flags
|
|
104191
|
-
laze connect suggest <service|domain|url> --reason "<why>" a connect card for
|
|
104512
|
+
laze connect suggest <service|domain|url> --reason "<why>" a connect card for your owner (agents)
|
|
104192
104513
|
When a person asks for something in a service that is not connected, run
|
|
104193
104514
|
laze connect suggest yourself (a name, the vendor's domain or its MCP URL); never ask for
|
|
104194
104515
|
passwords or keys in chat, never ask a person to run a command: the card signs in or takes the key
|