@lazehq/cli 0.1.140 → 0.1.142
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 +1137 -544
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -844,8 +844,8 @@ var require_node_gyp_build = __commonJS({
|
|
|
844
844
|
} catch (err) {
|
|
845
845
|
}
|
|
846
846
|
if (!prebuildsOnly) {
|
|
847
|
-
var
|
|
848
|
-
if (
|
|
847
|
+
var release3 = getFirst(path.join(dir, "build/Release"), matchBuild);
|
|
848
|
+
if (release3) return release3;
|
|
849
849
|
var debug = getFirst(path.join(dir, "build/Debug"), matchBuild);
|
|
850
850
|
if (debug) return debug;
|
|
851
851
|
}
|
|
@@ -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, at9, 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, at9, len) => {
|
|
11267
11267
|
assert2(currentParser.ptr === p);
|
|
11268
|
-
const start2 =
|
|
11268
|
+
const start2 = at9 - 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, at9, len) => {
|
|
11286
11286
|
assert2(currentParser.ptr === p);
|
|
11287
|
-
const start2 =
|
|
11287
|
+
const start2 = at9 - 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, at9, len) => {
|
|
11297
11297
|
assert2(currentParser.ptr === p);
|
|
11298
|
-
const start2 =
|
|
11298
|
+
const start2 = at9 - 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, at9, len) => {
|
|
11319
11319
|
assert2(currentParser.ptr === p);
|
|
11320
|
-
const start2 =
|
|
11320
|
+
const start2 = at9 - currentBufferPtr + currentBufferRef.byteOffset;
|
|
11321
11321
|
return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start2, len));
|
|
11322
11322
|
},
|
|
11323
11323
|
/**
|
|
@@ -21645,12 +21645,12 @@ var require_date = __commonJS({
|
|
|
21645
21645
|
return parseRfc850Date(date5);
|
|
21646
21646
|
}
|
|
21647
21647
|
}
|
|
21648
|
-
function makeDate(year, monthIdx,
|
|
21649
|
-
const result2 = new Date(Date.UTC(year, monthIdx,
|
|
21648
|
+
function makeDate(year, monthIdx, day3, hour, minute, second, weekday) {
|
|
21649
|
+
const result2 = new Date(Date.UTC(year, monthIdx, day3, hour, minute, second));
|
|
21650
21650
|
if (year >= 0 && year <= 99) {
|
|
21651
21651
|
result2.setUTCFullYear(year);
|
|
21652
21652
|
}
|
|
21653
|
-
return result2.getUTCFullYear() === year && result2.getUTCMonth() === monthIdx && result2.getUTCDate() ===
|
|
21653
|
+
return result2.getUTCFullYear() === year && result2.getUTCMonth() === monthIdx && result2.getUTCDate() === day3 && result2.getUTCHours() === hour && result2.getUTCMinutes() === minute && result2.getUTCSeconds() === second && result2.getUTCDay() === weekday ? result2 : void 0;
|
|
21654
21654
|
}
|
|
21655
21655
|
function parseImfDate(date5) {
|
|
21656
21656
|
if (date5.length !== 29 || date5[4] !== " " || date5[7] !== " " || date5[11] !== " " || date5[16] !== " " || date5[19] !== ":" || date5[22] !== ":" || date5[25] !== " " || date5[26] !== "G" || date5[27] !== "M" || date5[28] !== "T") {
|
|
@@ -21674,13 +21674,13 @@ var require_date = __commonJS({
|
|
|
21674
21674
|
} else {
|
|
21675
21675
|
return void 0;
|
|
21676
21676
|
}
|
|
21677
|
-
let
|
|
21677
|
+
let day3 = 0;
|
|
21678
21678
|
if (date5[5] === "0") {
|
|
21679
21679
|
const code4 = date5.charCodeAt(6);
|
|
21680
21680
|
if (code4 < 49 || code4 > 57) {
|
|
21681
21681
|
return void 0;
|
|
21682
21682
|
}
|
|
21683
|
-
|
|
21683
|
+
day3 = code4 - 48;
|
|
21684
21684
|
} else {
|
|
21685
21685
|
const code1 = date5.charCodeAt(5);
|
|
21686
21686
|
if (code1 < 49 || code1 > 51) {
|
|
@@ -21690,7 +21690,7 @@ var require_date = __commonJS({
|
|
|
21690
21690
|
if (code22 < 48 || code22 > 57) {
|
|
21691
21691
|
return void 0;
|
|
21692
21692
|
}
|
|
21693
|
-
|
|
21693
|
+
day3 = (code1 - 48) * 10 + (code22 - 48);
|
|
21694
21694
|
}
|
|
21695
21695
|
let monthIdx = -1;
|
|
21696
21696
|
if (date5[8] === "J" && date5[9] === "a" && date5[10] === "n") {
|
|
@@ -21812,7 +21812,7 @@ var require_date = __commonJS({
|
|
|
21812
21812
|
}
|
|
21813
21813
|
second = (code1 - 48) * 10 + (code22 - 48);
|
|
21814
21814
|
}
|
|
21815
|
-
return makeDate(year, monthIdx,
|
|
21815
|
+
return makeDate(year, monthIdx, day3, hour, minute, second, weekday);
|
|
21816
21816
|
}
|
|
21817
21817
|
function parseAscTimeDate(date5) {
|
|
21818
21818
|
if (date5.length !== 24 || date5[7] !== " " || date5[10] !== " " || date5[19] !== " ") {
|
|
@@ -21882,13 +21882,13 @@ var require_date = __commonJS({
|
|
|
21882
21882
|
} else {
|
|
21883
21883
|
return void 0;
|
|
21884
21884
|
}
|
|
21885
|
-
let
|
|
21885
|
+
let day3 = 0;
|
|
21886
21886
|
if (date5[8] === " ") {
|
|
21887
21887
|
const code4 = date5.charCodeAt(9);
|
|
21888
21888
|
if (code4 < 49 || code4 > 57) {
|
|
21889
21889
|
return void 0;
|
|
21890
21890
|
}
|
|
21891
|
-
|
|
21891
|
+
day3 = code4 - 48;
|
|
21892
21892
|
} else {
|
|
21893
21893
|
const code1 = date5.charCodeAt(8);
|
|
21894
21894
|
if (code1 < 49 || code1 > 51) {
|
|
@@ -21898,7 +21898,7 @@ var require_date = __commonJS({
|
|
|
21898
21898
|
if (code22 < 48 || code22 > 57) {
|
|
21899
21899
|
return void 0;
|
|
21900
21900
|
}
|
|
21901
|
-
|
|
21901
|
+
day3 = (code1 - 48) * 10 + (code22 - 48);
|
|
21902
21902
|
}
|
|
21903
21903
|
let hour = 0;
|
|
21904
21904
|
if (date5[11] === "0") {
|
|
@@ -21974,7 +21974,7 @@ var require_date = __commonJS({
|
|
|
21974
21974
|
return void 0;
|
|
21975
21975
|
}
|
|
21976
21976
|
const year = (yearDigit1 - 48) * 1e3 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48);
|
|
21977
|
-
return makeDate(year, monthIdx,
|
|
21977
|
+
return makeDate(year, monthIdx, day3, hour, minute, second, weekday);
|
|
21978
21978
|
}
|
|
21979
21979
|
function parseRfc850Date(date5) {
|
|
21980
21980
|
let commaIndex = -1;
|
|
@@ -22010,13 +22010,13 @@ var require_date = __commonJS({
|
|
|
22010
22010
|
if (date5[commaIndex] !== "," || date5.length - commaIndex - 1 !== 23 || date5[commaIndex + 1] !== " " || date5[commaIndex + 4] !== "-" || date5[commaIndex + 8] !== "-" || date5[commaIndex + 11] !== " " || date5[commaIndex + 14] !== ":" || date5[commaIndex + 17] !== ":" || date5[commaIndex + 20] !== " " || date5[commaIndex + 21] !== "G" || date5[commaIndex + 22] !== "M" || date5[commaIndex + 23] !== "T") {
|
|
22011
22011
|
return void 0;
|
|
22012
22012
|
}
|
|
22013
|
-
let
|
|
22013
|
+
let day3 = 0;
|
|
22014
22014
|
if (date5[commaIndex + 2] === "0") {
|
|
22015
22015
|
const code4 = date5.charCodeAt(commaIndex + 3);
|
|
22016
22016
|
if (code4 < 49 || code4 > 57) {
|
|
22017
22017
|
return void 0;
|
|
22018
22018
|
}
|
|
22019
|
-
|
|
22019
|
+
day3 = code4 - 48;
|
|
22020
22020
|
} else {
|
|
22021
22021
|
const code1 = date5.charCodeAt(commaIndex + 2);
|
|
22022
22022
|
if (code1 < 49 || code1 > 51) {
|
|
@@ -22026,7 +22026,7 @@ var require_date = __commonJS({
|
|
|
22026
22026
|
if (code22 < 48 || code22 > 57) {
|
|
22027
22027
|
return void 0;
|
|
22028
22028
|
}
|
|
22029
|
-
|
|
22029
|
+
day3 = (code1 - 48) * 10 + (code22 - 48);
|
|
22030
22030
|
}
|
|
22031
22031
|
let monthIdx = -1;
|
|
22032
22032
|
if (date5[commaIndex + 5] === "J" && date5[commaIndex + 6] === "a" && date5[commaIndex + 7] === "n") {
|
|
@@ -22123,7 +22123,7 @@ var require_date = __commonJS({
|
|
|
22123
22123
|
}
|
|
22124
22124
|
second = (code1 - 48) * 10 + (code22 - 48);
|
|
22125
22125
|
}
|
|
22126
|
-
return makeDate(year, monthIdx,
|
|
22126
|
+
return makeDate(year, monthIdx, day3, hour, minute, second, weekday);
|
|
22127
22127
|
}
|
|
22128
22128
|
module.exports = {
|
|
22129
22129
|
parseHttpDate
|
|
@@ -31077,15 +31077,15 @@ ${value}`;
|
|
|
31077
31077
|
pos = 0;
|
|
31078
31078
|
}
|
|
31079
31079
|
}
|
|
31080
|
-
discardLeadingBytes(
|
|
31081
|
-
while (
|
|
31080
|
+
discardLeadingBytes(count19) {
|
|
31081
|
+
while (count19 > 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 (count19 < remaining) {
|
|
31085
|
+
this.linePos += count19;
|
|
31086
|
+
count19 = 0;
|
|
31087
31087
|
} else {
|
|
31088
|
-
|
|
31088
|
+
count19 -= 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 at9 = start2;
|
|
31727
|
+
while (at9 < end) {
|
|
31728
|
+
const next = text3.indexOf("&", at9);
|
|
31729
31729
|
const stop3 = next === -1 || next > end ? end : next;
|
|
31730
|
-
const pair = text3.slice(
|
|
31730
|
+
const pair = text3.slice(at9, 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: at9, end: stop3, name: "" });
|
|
31733
|
+
else out.push({ start: at9 + equals + 1, end: stop3, name: pair.slice(0, equals) });
|
|
31734
|
+
at9 = stop3 + 1;
|
|
31735
31735
|
}
|
|
31736
31736
|
}
|
|
31737
31737
|
function segmentsIn({
|
|
@@ -31789,8 +31789,8 @@ function isRecordIdValue(value) {
|
|
|
31789
31789
|
const prefix2 = RECORD_ID.exec(value)?.[1];
|
|
31790
31790
|
return prefix2 !== void 0 && !CREDENTIAL_ID_PREFIXES.has(prefix2);
|
|
31791
31791
|
}
|
|
31792
|
-
function isPlainRecordId({ text: text3, at:
|
|
31793
|
-
return !isSecretParameterName(
|
|
31792
|
+
function isPlainRecordId({ text: text3, at: at9 }) {
|
|
31793
|
+
return !isSecretParameterName(at9.name) && isRecordIdValue(text3.slice(at9.start, at9.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 count19 of counts.values()) {
|
|
31838
|
+
const p = count19 / sample.length;
|
|
31839
31839
|
entropy -= p * Math.log2(p);
|
|
31840
31840
|
}
|
|
31841
31841
|
return entropy;
|
|
@@ -32095,8 +32095,8 @@ var SECRET_RULE_IDS = [
|
|
|
32095
32095
|
URL_PARAMETER_RULE_ID
|
|
32096
32096
|
];
|
|
32097
32097
|
function keptLengthAtBoundary(match) {
|
|
32098
|
-
const
|
|
32099
|
-
return
|
|
32098
|
+
const at9 = match.search(/["'`]/);
|
|
32099
|
+
return at9 === -1 ? match.length : at9;
|
|
32100
32100
|
}
|
|
32101
32101
|
function valueSpan(rule, match) {
|
|
32102
32102
|
const fullStart = match.index ?? 0;
|
|
@@ -32406,41 +32406,41 @@ var FILE_EXTENSION = /^\.[A-Za-z][A-Za-z0-9]{0,7}$/;
|
|
|
32406
32406
|
function isPathShapeMatch({
|
|
32407
32407
|
text: text3,
|
|
32408
32408
|
match,
|
|
32409
|
-
at:
|
|
32409
|
+
at: at9
|
|
32410
32410
|
}) {
|
|
32411
|
-
if (match.end >
|
|
32411
|
+
if (match.end > at9.end) {
|
|
32412
32412
|
const rule = RULES.find((candidate) => candidate.id === match.ruleId);
|
|
32413
|
-
return !rule || rawMatches(rule, text3.slice(
|
|
32413
|
+
return !rule || rawMatches(rule, text3.slice(at9.start, at9.end)).length === 0;
|
|
32414
32414
|
}
|
|
32415
|
-
return FILE_EXTENSION.test(text3.slice(match.end,
|
|
32415
|
+
return FILE_EXTENSION.test(text3.slice(match.end, at9.end));
|
|
32416
32416
|
}
|
|
32417
32417
|
function placedInLink({
|
|
32418
32418
|
text: text3,
|
|
32419
32419
|
match,
|
|
32420
32420
|
urlValues
|
|
32421
32421
|
}) {
|
|
32422
|
-
const
|
|
32423
|
-
if (!
|
|
32422
|
+
const at9 = urlValueAt({ values: urlValues, offset: match.start });
|
|
32423
|
+
if (!at9) return [match];
|
|
32424
32424
|
const shape = SHAPE_RULE_IDS.has(match.ruleId);
|
|
32425
|
-
if (shape && isPlainRecordId({ text: text3, at:
|
|
32426
|
-
if (shape && !isSecretParameterName(
|
|
32427
|
-
const secretName = isSecretParameterName(
|
|
32428
|
-
const named = secretName && shape ? { parameter:
|
|
32425
|
+
if (shape && isPlainRecordId({ text: text3, at: at9 })) return [];
|
|
32426
|
+
if (shape && !isSecretParameterName(at9.name) && isPathShapeMatch({ text: text3, match, at: at9 })) return [];
|
|
32427
|
+
const secretName = isSecretParameterName(at9.name);
|
|
32428
|
+
const named = secretName && shape ? { parameter: at9.name } : {};
|
|
32429
32429
|
return [
|
|
32430
|
-
{ ...match, ...named, spanStart:
|
|
32430
|
+
{ ...match, ...named, spanStart: at9.start, start: at9.start, end: at9.end, spanEnd: at9.end }
|
|
32431
32431
|
];
|
|
32432
32432
|
}
|
|
32433
32433
|
function secretParameterValues({
|
|
32434
32434
|
text: text3,
|
|
32435
32435
|
urlValues
|
|
32436
32436
|
}) {
|
|
32437
|
-
return urlValues.filter((
|
|
32437
|
+
return urlValues.filter((at9) => isSecretParameterName(at9.name)).filter((at9) => isSecretParameterValue(text3.slice(at9.start, at9.end))).map((at9) => ({
|
|
32438
32438
|
ruleId: URL_PARAMETER_RULE_ID,
|
|
32439
|
-
spanStart:
|
|
32440
|
-
start:
|
|
32441
|
-
end:
|
|
32442
|
-
spanEnd:
|
|
32443
|
-
parameter:
|
|
32439
|
+
spanStart: at9.start,
|
|
32440
|
+
start: at9.start,
|
|
32441
|
+
end: at9.end,
|
|
32442
|
+
spanEnd: at9.end,
|
|
32443
|
+
parameter: at9.name
|
|
32444
32444
|
}));
|
|
32445
32445
|
}
|
|
32446
32446
|
function withExtension({ text: text3, match }) {
|
|
@@ -32663,17 +32663,17 @@ function createRedactor({ values }) {
|
|
|
32663
32663
|
let carry = "";
|
|
32664
32664
|
const scan = (text3, limit) => {
|
|
32665
32665
|
let out = "";
|
|
32666
|
-
let
|
|
32666
|
+
let at9 = 0;
|
|
32667
32667
|
pattern.lastIndex = 0;
|
|
32668
32668
|
for (const match of text3.matchAll(pattern)) {
|
|
32669
32669
|
if (match.index >= limit) break;
|
|
32670
|
-
if (match.index <
|
|
32671
|
-
out += text3.slice(
|
|
32672
|
-
|
|
32670
|
+
if (match.index < at9) continue;
|
|
32671
|
+
out += text3.slice(at9, match.index) + REDACTED;
|
|
32672
|
+
at9 = match.index + match[0].length;
|
|
32673
32673
|
}
|
|
32674
|
-
const emitUntil = Math.max(
|
|
32674
|
+
const emitUntil = Math.max(at9, limit);
|
|
32675
32675
|
carry = text3.slice(emitUntil);
|
|
32676
|
-
return out + text3.slice(
|
|
32676
|
+
return out + text3.slice(at9, emitUntil);
|
|
32677
32677
|
};
|
|
32678
32678
|
return {
|
|
32679
32679
|
push(chunk) {
|
|
@@ -33150,11 +33150,11 @@ function computeIsoYearMonthFieldsForMonthDay(monthCodeNumber, isLeapMonth) {
|
|
|
33150
33150
|
};
|
|
33151
33151
|
}
|
|
33152
33152
|
}
|
|
33153
|
-
function computeIsoFieldsFromParts(year, month,
|
|
33153
|
+
function computeIsoFieldsFromParts(year, month, day3) {
|
|
33154
33154
|
return {
|
|
33155
33155
|
year,
|
|
33156
33156
|
month,
|
|
33157
|
-
day:
|
|
33157
|
+
day: day3
|
|
33158
33158
|
};
|
|
33159
33159
|
}
|
|
33160
33160
|
function computeIsoDaysInMonth(year, month) {
|
|
@@ -33244,8 +33244,8 @@ function computeCalendarMonthCodeParts(calendar, year, month) {
|
|
|
33244
33244
|
function computeCalendarEraFields(calendar, isoDate) {
|
|
33245
33245
|
return 0 === calendar ? computeGregoryEraFields(isoDate) : calendar && calendar.h?.(isoDate) || {};
|
|
33246
33246
|
}
|
|
33247
|
-
function computeCalendarIsoFieldsFromParts(calendar, year, month,
|
|
33248
|
-
return calendar ? calendar.de(year, month,
|
|
33247
|
+
function computeCalendarIsoFieldsFromParts(calendar, year, month, day3) {
|
|
33248
|
+
return calendar ? calendar.de(year, month, day3) : computeIsoFieldsFromParts(year, month, day3);
|
|
33249
33249
|
}
|
|
33250
33250
|
function computeCalendarMonthsInYearForYear(calendar, year) {
|
|
33251
33251
|
return calendar ? calendar.j(year) : 12;
|
|
@@ -33677,8 +33677,8 @@ function roundBigNanoToInc(bigNano, bigNanoInc, roundingMode) {
|
|
|
33677
33677
|
return roundBigNanoToIncWithTail(bigNano, bigNanoInc, roundingMode, bigNano / bigNanoInc % 2n);
|
|
33678
33678
|
}
|
|
33679
33679
|
function roundBigNanoToDayOriginInc(bigNano, bigNanoInc, roundingMode) {
|
|
33680
|
-
const [
|
|
33681
|
-
const dayOriginNano =
|
|
33680
|
+
const [day3, timeNano] = divModFloorBigInt(bigNano, bigNanoInUtcDay);
|
|
33681
|
+
const dayOriginNano = day3 * bigNanoInUtcDay;
|
|
33682
33682
|
return dayOriginNano + roundBigNanoToIncWithTail(timeNano, bigNanoInc, roundingMode, (dayOriginNano / bigNanoInc + timeNano / bigNanoInc) % 2n);
|
|
33683
33683
|
}
|
|
33684
33684
|
function roundBigNanoToIncWithTail(bigNano, bigNanoInc, roundingMode, quotientTail) {
|
|
@@ -33880,7 +33880,7 @@ function dateAddWithOverflow(calendar, isoDateFields, durationFields, overflow)
|
|
|
33880
33880
|
}
|
|
33881
33881
|
function addDateMonths(calendar, isoDateFields, years, months, overflow) {
|
|
33882
33882
|
const dateParts = computeCalendarDateFields(calendar, isoDateFields);
|
|
33883
|
-
let { year, month, day:
|
|
33883
|
+
let { year, month, day: day3 } = dateParts;
|
|
33884
33884
|
if (years) {
|
|
33885
33885
|
const [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, year, month);
|
|
33886
33886
|
year += years, month = computeYearMovedMonth(calendar, monthCodeNumber, isLeapMonth, calendar ? calendar.p(year) : void 0, overflow), month = clampEntity("month", month, 1, computeCalendarMonthsInYearForYear(calendar, year), overflow);
|
|
@@ -33889,7 +33889,7 @@ function addDateMonths(calendar, isoDateFields, years, months, overflow) {
|
|
|
33889
33889
|
const yearMonthParts = calendar ? calendar.K(year, month, months) : addIsoMonths(year, month, months);
|
|
33890
33890
|
({ year, month } = yearMonthParts);
|
|
33891
33891
|
}
|
|
33892
|
-
return
|
|
33892
|
+
return day3 = clampEntity("day", day3, 1, computeCalendarDaysInMonthForYearMonth(calendar, year, month), overflow), computeCalendarIsoFieldsFromParts(calendar, year, month, day3);
|
|
33893
33893
|
}
|
|
33894
33894
|
function computeYearMovedMonth(calendar, monthCodeNumber, isLeapMonth, targetLeapMonth, overflow) {
|
|
33895
33895
|
if (isLeapMonth) {
|
|
@@ -34464,31 +34464,31 @@ function createPlainMonthDayFromFields(calendar, fields, options) {
|
|
|
34464
34464
|
const monthCodeParts = parseMonthCodeField(fields);
|
|
34465
34465
|
let yearMaybe = void 0 !== fields.eraYear || void 0 !== fields.year ? resolveCalendarYear(calendar, fields) : void 0;
|
|
34466
34466
|
const overflow = refineOverflowOptions(options);
|
|
34467
|
-
let
|
|
34467
|
+
let day3;
|
|
34468
34468
|
let monthCodeNumber;
|
|
34469
34469
|
let isLeapMonth;
|
|
34470
34470
|
if (void 0 === yearMaybe && isIso && (yearMaybe = 1972), void 0 !== yearMaybe) {
|
|
34471
34471
|
isIso || checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, yearMaybe, 1, 1));
|
|
34472
34472
|
const month = resolveCalendarMonth(calendar, fields, yearMaybe, overflow, monthCodeParts);
|
|
34473
|
-
|
|
34473
|
+
day3 = resolveCalendarDay(calendar, fields, month, yearMaybe, overflow), [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, yearMaybe, month);
|
|
34474
34474
|
} else {
|
|
34475
34475
|
void 0 === fields.monthCode && throwTypeError("Missing month/monthCode"), [monthCodeNumber, isLeapMonth] = monthCodeParts;
|
|
34476
34476
|
const referenceYear = calendar ? calendar.ne : 1972;
|
|
34477
34477
|
if (void 0 !== referenceYear) {
|
|
34478
|
-
|
|
34478
|
+
day3 = resolveCalendarDay(calendar, fields, resolveCalendarMonth(calendar, fields, referenceYear, overflow, monthCodeParts), referenceYear, overflow);
|
|
34479
34479
|
} else {
|
|
34480
34480
|
const constrainedDay = 0 === overflow && calendar ? calendar.fe?.(monthCodeNumber, isLeapMonth, fields.day) : void 0;
|
|
34481
|
-
|
|
34481
|
+
day3 = void 0 !== constrainedDay ? constrainedDay : fields.day;
|
|
34482
34482
|
}
|
|
34483
34483
|
}
|
|
34484
|
-
isLeapMonth && ((calendar && calendar.U?.[monthCodeNumber]) ?? 1 / 0) < fields.day && (1 === overflow && throwRangeError(invalidLeapMonth), isLeapMonth = 0,
|
|
34485
|
-
let res = calendar ? calendar.u(monthCodeNumber, Boolean(isLeapMonth),
|
|
34486
|
-
for (; !res && 0 === overflow &&
|
|
34487
|
-
|
|
34484
|
+
isLeapMonth && ((calendar && calendar.U?.[monthCodeNumber]) ?? 1 / 0) < fields.day && (1 === overflow && throwRangeError(invalidLeapMonth), isLeapMonth = 0, day3 = constrainToRange2(fields.day, 1, (calendar && calendar.R) ?? 1 / 0));
|
|
34485
|
+
let res = calendar ? calendar.u(monthCodeNumber, Boolean(isLeapMonth), day3) : computeIsoYearMonthFieldsForMonthDay(monthCodeNumber, Boolean(isLeapMonth));
|
|
34486
|
+
for (; !res && 0 === overflow && day3 > 1; ) {
|
|
34487
|
+
day3--, res = calendar ? calendar.u(monthCodeNumber, Boolean(isLeapMonth), day3) : computeIsoYearMonthFieldsForMonthDay(monthCodeNumber, Boolean(isLeapMonth));
|
|
34488
34488
|
}
|
|
34489
34489
|
res || throwRangeError("Cannot guess year");
|
|
34490
34490
|
const { year: finalYear, month: finalMonth } = res;
|
|
34491
|
-
return createDateSlots(checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, finalYear, finalMonth,
|
|
34491
|
+
return createDateSlots(checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, finalYear, finalMonth, day3)), calendar);
|
|
34492
34492
|
}
|
|
34493
34493
|
var RawDateTimeFormat = Intl.DateTimeFormat;
|
|
34494
34494
|
function formatEpochMilliToPartsRecord(intlFormat, epochMilli) {
|
|
@@ -34950,13 +34950,13 @@ function parsePlainMonthDay(s, resolveCalendar) {
|
|
|
34950
34950
|
}
|
|
34951
34951
|
const dateSlots = finalizeDateLike(parsePlainDateLike(s), projectIsoMonthDayDate, resolveCalendar);
|
|
34952
34952
|
const { calendar } = dateSlots;
|
|
34953
|
-
const { year: origYear, month: origMonth, day:
|
|
34953
|
+
const { year: origYear, month: origMonth, day: day3 } = computeCalendarDateFields(calendar, dateSlots);
|
|
34954
34954
|
const [monthCodeNumber, isLeapMonth] = computeCalendarMonthCodeParts(calendar, origYear, origMonth);
|
|
34955
|
-
const { year, month } = ((calendar2, monthCodeNumber2, isLeapMonth2,
|
|
34956
|
-
const yearMonthFields = calendar2 ? calendar2.u(monthCodeNumber2, isLeapMonth2,
|
|
34955
|
+
const { year, month } = ((calendar2, monthCodeNumber2, isLeapMonth2, day4) => {
|
|
34956
|
+
const yearMonthFields = calendar2 ? calendar2.u(monthCodeNumber2, isLeapMonth2, day4) : computeIsoYearMonthFieldsForMonthDay(monthCodeNumber2, isLeapMonth2);
|
|
34957
34957
|
return yearMonthFields || throwRangeError("Cannot guess year"), yearMonthFields;
|
|
34958
|
-
})(calendar, monthCodeNumber, isLeapMonth,
|
|
34959
|
-
return createDateSlots(checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, year, month,
|
|
34958
|
+
})(calendar, monthCodeNumber, isLeapMonth, day3);
|
|
34959
|
+
return createDateSlots(checkIsoDateInBounds(computeCalendarIsoFieldsFromParts(calendar, year, month, day3)), calendar);
|
|
34960
34960
|
}
|
|
34961
34961
|
function parsePlainTime(s) {
|
|
34962
34962
|
let organized = ((s2) => {
|
|
@@ -35017,10 +35017,10 @@ function finalizeDateLike(organized, isoDateProjector, resolveCalendar) {
|
|
|
35017
35017
|
return isoDateProjector && "iso8601" === organized.calendarId ? (validateIsoDateFields(organized), organized.re && validateTimeFields(organized), finalizeDate(isoDateProjector(organized), resolveCalendar)) : organized.re ? finalizeDateTime(organized, resolveCalendar) : finalizeDate(organized, resolveCalendar);
|
|
35018
35018
|
}
|
|
35019
35019
|
function projectIsoYearMonthDate(organized) {
|
|
35020
|
-
const
|
|
35020
|
+
const day3 = 12 * organized.year + organized.month === isoYearMonthIndexMin ? 20 : 1;
|
|
35021
35021
|
return {
|
|
35022
35022
|
...organized,
|
|
35023
|
-
day:
|
|
35023
|
+
day: day3
|
|
35024
35024
|
};
|
|
35025
35025
|
}
|
|
35026
35026
|
function projectIsoMonthDayDate(organized) {
|
|
@@ -35156,11 +35156,11 @@ function mergeZonedDateTimeFields(zonedDateTimeSlots, modFields, options) {
|
|
|
35156
35156
|
const { calendar, timeZone } = zonedDateTimeSlots;
|
|
35157
35157
|
const validFieldNames = getCalendarFieldNames(calendar, dateTimeAndOffsetFieldNamesAlpha, dateTimeAndOffsetFieldNamesWithEraAlpha);
|
|
35158
35158
|
const zonedSlots = zonedEpochSlotsToIso(zonedDateTimeSlots);
|
|
35159
|
-
const { year, month, day:
|
|
35159
|
+
const { year, month, day: day3 } = computeCalendarDateFields(calendar, zonedSlots);
|
|
35160
35160
|
const origFields = {
|
|
35161
35161
|
year,
|
|
35162
35162
|
monthCode: computeMonthCode(calendar, year, month),
|
|
35163
|
-
day:
|
|
35163
|
+
day: day3,
|
|
35164
35164
|
hour: zonedSlots.hour,
|
|
35165
35165
|
minute: zonedSlots.minute,
|
|
35166
35166
|
second: zonedSlots.second,
|
|
@@ -35181,11 +35181,11 @@ function mergeZonedDateTimeFields(zonedDateTimeSlots, modFields, options) {
|
|
|
35181
35181
|
function mergePlainDateTimeFields(plainDateTimeSlots, modFields, options) {
|
|
35182
35182
|
const { calendar } = plainDateTimeSlots;
|
|
35183
35183
|
const validFieldNames = getCalendarFieldNames(calendar, dateTimeFieldNamesAlpha, dateTimeFieldNamesWithEraAlpha);
|
|
35184
|
-
const { year, month, day:
|
|
35184
|
+
const { year, month, day: day3 } = computeCalendarDateFields(calendar, plainDateTimeSlots);
|
|
35185
35185
|
const origFields = {
|
|
35186
35186
|
year,
|
|
35187
35187
|
monthCode: computeMonthCode(calendar, year, month),
|
|
35188
|
-
day:
|
|
35188
|
+
day: day3,
|
|
35189
35189
|
hour: plainDateTimeSlots.hour,
|
|
35190
35190
|
minute: plainDateTimeSlots.minute,
|
|
35191
35191
|
second: plainDateTimeSlots.second,
|
|
@@ -35205,11 +35205,11 @@ function mergePlainDateTimeFields(plainDateTimeSlots, modFields, options) {
|
|
|
35205
35205
|
function mergePlainDateFields(plainDateSlots, modFields, options) {
|
|
35206
35206
|
const { calendar } = plainDateSlots;
|
|
35207
35207
|
const validFieldNames = getCalendarFieldNames(calendar, dateFieldNamesAlpha, dateFieldNamesWithEraAlpha);
|
|
35208
|
-
const { year, month, day:
|
|
35208
|
+
const { year, month, day: day3 } = computeCalendarDateFields(calendar, plainDateSlots);
|
|
35209
35209
|
return createPlainDateFromFields(calendar, mergeCalendarFields(calendar, {
|
|
35210
35210
|
year,
|
|
35211
35211
|
monthCode: computeMonthCode(calendar, year, month),
|
|
35212
|
-
day:
|
|
35212
|
+
day: day3
|
|
35213
35213
|
}, readAndRefineBagFields(modFields, validFieldNames, dateFieldRefiners)), options);
|
|
35214
35214
|
}
|
|
35215
35215
|
function mergePlainYearMonthFields(plainYearMonthSlots, modFields, options) {
|
|
@@ -35224,10 +35224,10 @@ function mergePlainYearMonthFields(plainYearMonthSlots, modFields, options) {
|
|
|
35224
35224
|
function mergePlainMonthDayFields(plainMonthDaySlots, modFields, options) {
|
|
35225
35225
|
const { calendar } = plainMonthDaySlots;
|
|
35226
35226
|
const validFieldNames = getCalendarFieldNames(calendar, dateFieldNamesAlpha, dateFieldNamesWithEraAlpha);
|
|
35227
|
-
const { year, month, day:
|
|
35227
|
+
const { year, month, day: day3 } = computeCalendarDateFields(calendar, plainMonthDaySlots);
|
|
35228
35228
|
return createPlainMonthDayFromFields(calendar, mergeCalendarFields(calendar, {
|
|
35229
35229
|
monthCode: computeMonthCode(calendar, year, month),
|
|
35230
|
-
day:
|
|
35230
|
+
day: day3
|
|
35231
35231
|
}, readAndRefineBagFields(modFields, validFieldNames, dateFieldRefiners)), options);
|
|
35232
35232
|
}
|
|
35233
35233
|
function mergePlainTimeFields(initialFields, mod, options) {
|
|
@@ -36905,10 +36905,10 @@ function heldBackLineOf({
|
|
|
36905
36905
|
var CLI_RELEASE_HEADER = "x-laze-cli-release";
|
|
36906
36906
|
var STAMP = /^(\d+)\.(\d+)\.(\d+)(?:-g([0-9a-f]+))?$/;
|
|
36907
36907
|
function releaseSkewOf({
|
|
36908
|
-
mine:
|
|
36908
|
+
mine: mine6,
|
|
36909
36909
|
server
|
|
36910
36910
|
}) {
|
|
36911
|
-
const have = STAMP.exec(
|
|
36911
|
+
const have = STAMP.exec(mine6);
|
|
36912
36912
|
const ships = STAMP.exec(server);
|
|
36913
36913
|
if (!have || !ships) return null;
|
|
36914
36914
|
for (const part of [1, 2, 3]) {
|
|
@@ -36918,51 +36918,51 @@ function releaseSkewOf({
|
|
|
36918
36918
|
return have[4] && ships[4] && have[4] !== ships[4] ? "other_build" : null;
|
|
36919
36919
|
}
|
|
36920
36920
|
function releaseWarningOf({
|
|
36921
|
-
mine:
|
|
36921
|
+
mine: mine6,
|
|
36922
36922
|
server,
|
|
36923
36923
|
sandbox
|
|
36924
36924
|
}) {
|
|
36925
|
-
const skew = releaseSkewOf({ mine:
|
|
36925
|
+
const skew = releaseSkewOf({ mine: mine6, server });
|
|
36926
36926
|
if (!skew || skew === "other_build") return null;
|
|
36927
36927
|
if (sandbox) {
|
|
36928
|
-
return `laze: this CLI is ${
|
|
36928
|
+
return `laze: this CLI is ${mine6}, but the server ships ${server}. Laze updates the computer's CLI each time the agent connects, so restart the agent if this stays.
|
|
36929
36929
|
`;
|
|
36930
36930
|
}
|
|
36931
36931
|
if (skew === "newer") {
|
|
36932
|
-
return `laze: this CLI is ${
|
|
36932
|
+
return `laze: this CLI is ${mine6}, newer than the server's ${server}; a command the server does not have yet fails.
|
|
36933
36933
|
`;
|
|
36934
36934
|
}
|
|
36935
|
-
return `laze: this CLI is ${
|
|
36935
|
+
return `laze: this CLI is ${mine6}, older than the server's ${server}. Update it with npm i -g ${CLI_PACKAGE_LATEST} (or laze update).
|
|
36936
36936
|
`;
|
|
36937
36937
|
}
|
|
36938
36938
|
function selfUpdateLineOf({
|
|
36939
|
-
mine:
|
|
36939
|
+
mine: mine6,
|
|
36940
36940
|
server,
|
|
36941
36941
|
manager
|
|
36942
36942
|
}) {
|
|
36943
|
-
return `laze: this CLI is ${
|
|
36943
|
+
return `laze: this CLI is ${mine6}, older than the server's ${server}. Updating it in the background with ${manager}; the next command runs the new one (LAZE_AUTO_UPDATE=0 turns this off).
|
|
36944
36944
|
`;
|
|
36945
36945
|
}
|
|
36946
36946
|
|
|
36947
36947
|
// src/rules/cli-installs.rules.ts
|
|
36948
36948
|
function newerInstallsOf({
|
|
36949
|
-
mine:
|
|
36949
|
+
mine: mine6,
|
|
36950
36950
|
installs
|
|
36951
36951
|
}) {
|
|
36952
36952
|
return installs.filter(
|
|
36953
|
-
(install) => install.version !== null && releaseSkewOf({ mine:
|
|
36953
|
+
(install) => install.version !== null && releaseSkewOf({ mine: mine6, server: install.version }) === "older"
|
|
36954
36954
|
);
|
|
36955
36955
|
}
|
|
36956
36956
|
function newerInstallLineOf({
|
|
36957
|
-
mine:
|
|
36957
|
+
mine: mine6,
|
|
36958
36958
|
script,
|
|
36959
36959
|
installs
|
|
36960
36960
|
}) {
|
|
36961
|
-
const newer = newerInstallsOf({ mine:
|
|
36961
|
+
const newer = newerInstallsOf({ mine: mine6, installs });
|
|
36962
36962
|
const [first] = newer;
|
|
36963
36963
|
if (!first) return null;
|
|
36964
36964
|
const others = newer.map((install) => `laze ${install.version} at ${install.path}`).join(", ");
|
|
36965
|
-
return `laze: this is laze ${
|
|
36965
|
+
return `laze: this is laze ${mine6} at ${script}, but a newer ${others} is installed. A shell runs the first laze on PATH: run ${first.path} by its path, or remove the older one.
|
|
36966
36966
|
`;
|
|
36967
36967
|
}
|
|
36968
36968
|
function shadowedLineOf({
|
|
@@ -36984,7 +36984,7 @@ function shadowedLinkLineOf({ shadow }) {
|
|
|
36984
36984
|
}
|
|
36985
36985
|
|
|
36986
36986
|
// src/rules/cli-version.rules.ts
|
|
36987
|
-
var STAMPED = "0.1.
|
|
36987
|
+
var STAMPED = "0.1.142";
|
|
36988
36988
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
36989
36989
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
36990
36990
|
}
|
|
@@ -37061,10 +37061,10 @@ async function otherInstallsOf({ context }) {
|
|
|
37061
37061
|
}
|
|
37062
37062
|
async function noteNewerInstall({
|
|
37063
37063
|
context,
|
|
37064
|
-
mine:
|
|
37064
|
+
mine: mine6 = cliVersionOf()
|
|
37065
37065
|
}) {
|
|
37066
37066
|
const { script, others } = await otherInstallsOf({ context });
|
|
37067
|
-
const line = newerInstallLineOf({ mine:
|
|
37067
|
+
const line = newerInstallLineOf({ mine: mine6, script, installs: others });
|
|
37068
37068
|
if (line) context.err(line);
|
|
37069
37069
|
}
|
|
37070
37070
|
async function rerunCommandOf({
|
|
@@ -37086,7 +37086,7 @@ import { basename as basename2, dirname as dirname3, join as join4, resolve } fr
|
|
|
37086
37086
|
|
|
37087
37087
|
// src/rules/hook-settings.rules.ts
|
|
37088
37088
|
var LAZE_HOOK_MARKER = "laze-cli-hook";
|
|
37089
|
-
var HOOK_TIMEOUTS = { Stop: 30, PreToolUse:
|
|
37089
|
+
var HOOK_TIMEOUTS = { Stop: 30, PreToolUse: 30, SessionStart: 30 };
|
|
37090
37090
|
var TIMEOUTS = HOOK_TIMEOUTS;
|
|
37091
37091
|
var WAIT_HOOK_TIMEOUT_SECONDS = 7 * 24 * 60 * 60;
|
|
37092
37092
|
function withHooks({
|
|
@@ -38873,14 +38873,14 @@ function codePointLength(str) {
|
|
|
38873
38873
|
const units = str.length;
|
|
38874
38874
|
if (!highSurrogate.test(str))
|
|
38875
38875
|
return units;
|
|
38876
|
-
let
|
|
38876
|
+
let count19 = units;
|
|
38877
38877
|
for (let i = 0; i < units - 1; i++) {
|
|
38878
38878
|
if ((str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320) {
|
|
38879
|
-
|
|
38879
|
+
count19--;
|
|
38880
38880
|
i++;
|
|
38881
38881
|
}
|
|
38882
38882
|
}
|
|
38883
|
-
return
|
|
38883
|
+
return count19;
|
|
38884
38884
|
}
|
|
38885
38885
|
function getLengthableOrigin(input2) {
|
|
38886
38886
|
if (Array.isArray(input2))
|
|
@@ -43235,8 +43235,8 @@ function az_default() {
|
|
|
43235
43235
|
}
|
|
43236
43236
|
|
|
43237
43237
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/be.js
|
|
43238
|
-
function getBelarusianPlural(
|
|
43239
|
-
const absCount = Math.abs(
|
|
43238
|
+
function getBelarusianPlural(count19, one, few, many) {
|
|
43239
|
+
const absCount = Math.abs(count19);
|
|
43240
43240
|
const lastDigit = absCount % 10;
|
|
43241
43241
|
const lastTwoDigits = absCount % 100;
|
|
43242
43242
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -45883,8 +45883,8 @@ function hu_default() {
|
|
|
45883
45883
|
}
|
|
45884
45884
|
|
|
45885
45885
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hy.js
|
|
45886
|
-
function getArmenianPlural(
|
|
45887
|
-
return Math.abs(
|
|
45886
|
+
function getArmenianPlural(count19, one, many) {
|
|
45887
|
+
return Math.abs(count19) === 1 ? one : many;
|
|
45888
45888
|
}
|
|
45889
45889
|
function withDefiniteArticle(word3) {
|
|
45890
45890
|
if (!word3)
|
|
@@ -48622,8 +48622,8 @@ function ro_default() {
|
|
|
48622
48622
|
}
|
|
48623
48623
|
|
|
48624
48624
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ru.js
|
|
48625
|
-
function getRussianPlural(
|
|
48626
|
-
const absCount = Math.abs(
|
|
48625
|
+
function getRussianPlural(count19, one, few, many) {
|
|
48626
|
+
const absCount = Math.abs(count19);
|
|
48627
48627
|
const lastDigit = absCount % 10;
|
|
48628
48628
|
const lastTwoDigits = absCount % 100;
|
|
48629
48629
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -59871,7 +59871,7 @@ var deviceGrantSummarySchemaDefinition = external_exports.object({
|
|
|
59871
59871
|
});
|
|
59872
59872
|
var deviceGrantSummarySchema = deviceGrantSummarySchemaDefinition;
|
|
59873
59873
|
var ApiKeyApi = moduleApi()("api-key");
|
|
59874
|
-
var apiKeyTrpc = defineTrpcContract("apiKey").mutation("create").withInput(createApiKeyInputSchema).withOutput(createdApiKeySchema).query("list").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.array(apiKeySummarySchema)).mutation("revoke").withInput(revokeApiKeyInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("listMine").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.array(personalApiKeySchema)).mutation("revokeMine").withInput(revokeApiKeyInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("deviceGrant").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), userCode: external_exports.string().min(1).max(20) })).withOutput(deviceGrantSummarySchema).mutation("approveDevice").withInput(decideDeviceGrantInputSchema).withOutput(external_exports.object({ approved: external_exports.literal(true) })).mutation("denyDevice").withInput(decideDeviceGrantInputSchema).withOutput(external_exports.object({ denied: external_exports.literal(true) })).build();
|
|
59874
|
+
var apiKeyTrpc = defineTrpcContract("apiKey").mutation("create").withInput(createApiKeyInputSchema).withOutput(createdApiKeySchema.meta({ deprecated: true })).query("list").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.array(apiKeySummarySchema).meta({ deprecated: true })).mutation("revoke").withInput(revokeApiKeyInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) }).meta({ deprecated: true })).query("listMine").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.array(personalApiKeySchema)).mutation("revokeMine").withInput(revokeApiKeyInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("deviceGrant").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), userCode: external_exports.string().min(1).max(20) })).withOutput(deviceGrantSummarySchema).mutation("approveDevice").withInput(decideDeviceGrantInputSchema).withOutput(external_exports.object({ approved: external_exports.literal(true) })).mutation("denyDevice").withInput(decideDeviceGrantInputSchema).withOutput(external_exports.object({ denied: external_exports.literal(true) })).build();
|
|
59875
59875
|
|
|
59876
59876
|
// ../../modules/api-key/contract/src/api-key.events.ts
|
|
59877
59877
|
var API_KEY_MACHINE_ALERT_KINDS = [
|
|
@@ -60756,6 +60756,7 @@ var VAULT_GMAIL_SEND_PATHS = [
|
|
|
60756
60756
|
];
|
|
60757
60757
|
var VAULT_MAX_LEASE_SECONDS = 2 * 86400;
|
|
60758
60758
|
var VAULT_LONGEST_LEASE_SECONDS = 7 * 86400;
|
|
60759
|
+
var VAULT_MONTH_LEASE_SECONDS = 30 * 86400;
|
|
60759
60760
|
var VAULT_LEASE_CHOICES = [
|
|
60760
60761
|
15 * 60,
|
|
60761
60762
|
3600,
|
|
@@ -61136,6 +61137,8 @@ var vaultApprovalRequestSchemaDefinition = external_exports.object({
|
|
|
61136
61137
|
connectionTitle: external_exports.string().nullable().default(null),
|
|
61137
61138
|
/** The longest lease Allow for this agent offers; null offers only once and deny. */
|
|
61138
61139
|
maxLeaseSeconds: external_exports.number().int().positive().nullable().default(null),
|
|
61140
|
+
/** The More menu's "Allow for 30 days for this agent"; null when the key may not give it. */
|
|
61141
|
+
monthLeaseSeconds: external_exports.number().int().positive().nullish(),
|
|
61139
61142
|
/** Allow covers the rest of the agent's turn ("Allow once" on a task card), not one command. */
|
|
61140
61143
|
coversTask: external_exports.boolean().optional(),
|
|
61141
61144
|
/** Who asks when it is a session outside Laze, not an agent: "Claude Code session on pat-mac". */
|
|
@@ -61148,13 +61151,15 @@ var answerVaultApprovalInputSchemaDefinition = external_exports.object({
|
|
|
61148
61151
|
workspaceId: external_exports.string().min(1),
|
|
61149
61152
|
requestId: external_exports.string().min(1),
|
|
61150
61153
|
answer: external_exports.enum(["approve_once", "approve_for_agent", "deny"]),
|
|
61151
|
-
/** Allow for this agent only: up to the connection's admin maximum. */
|
|
61154
|
+
/** Allow for this agent only: up to the connection's admin maximum, or the card's 30 days. */
|
|
61152
61155
|
durationSeconds: external_exports.number().int().positive().optional(),
|
|
61153
61156
|
via: vaultAnswerViaSchema,
|
|
61154
61157
|
/** A short reason, question or steer for the agent, sent with the answer. */
|
|
61155
61158
|
resolutionNote: resolutionNoteSchema,
|
|
61156
61159
|
/** A fresh passkey, Touch ID or Face ID proof: an Allow on a device-approval key needs one. */
|
|
61157
|
-
reauthToken: external_exports.string().min(1).max(200).optional()
|
|
61160
|
+
reauthToken: external_exports.string().min(1).max(200).optional(),
|
|
61161
|
+
/** The request ids the card showed; a joined ask not among them gets a card of its own. */
|
|
61162
|
+
seenRequestIds: external_exports.array(external_exports.string().min(1).max(64)).max(50).optional()
|
|
61158
61163
|
});
|
|
61159
61164
|
var answerVaultApprovalInputSchema = answerVaultApprovalInputSchemaDefinition;
|
|
61160
61165
|
var requestVaultActionInputSchemaDefinition = external_exports.object({
|
|
@@ -61433,7 +61438,7 @@ var vaultCoreTrpc = defineTrpcContract("vault").mutation("createConnection").wit
|
|
|
61433
61438
|
reason: external_exports.string().trim().min(1).max(200),
|
|
61434
61439
|
reauthToken: external_exports.string().min(1).max(200).optional()
|
|
61435
61440
|
})
|
|
61436
|
-
).withOutput(external_exports.object({ fields: external_exports.record(external_exports.string(), external_exports.string()) })).mutation("beginReauth").withInput(beginVaultReauthInputSchema).withOutput(vaultReauthChallengeSchema).mutation("confirmReauth").withInput(confirmVaultReauthInputSchema).withOutput(vaultReauthProofSchema).mutation("grantConnection").withInput(grantVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("lendToChannel").withInput(lendVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("revokeGrant").withInput(revokeVaultGrantInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("listGrants").withInput(connectionInput).withOutput(external_exports.array(vaultGrantSchema)).query("listKeyActivity").withInput(listVaultKeyActivityInputSchema).withOutput(external_exports.array(vaultKeyActivitySchema)).mutation("shareConnection").withInput(shareVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("approveShare").withInput(approveVaultShareInputSchema).withOutput(vaultGrantSchema).mutation("approveMachineKey").withInput(approveVaultMachineKeyInputSchema).withOutput(approvedVaultMachineKeySchema).query("readLock").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(vaultReadLockSchema).query("referenceHolder").withInput(vaultReferenceHolderInputSchema).withOutput(vaultReferenceHolderSchema).mutation("unlockReads").withInput(unlockVaultReadsInputSchema).withOutput(vaultReadLockSchema).mutation("sealConnection").withInput(sealVaultConnectionInputSchema).withOutput(vaultConnectionSchema).query("listApprovals").withInput(external_exports.object({ ...workspaceInput.shape, state: vaultApprovalListStateSchema.optional() })).withOutput(external_exports.array(vaultApprovalRequestSchema)).mutation("answerApproval").withInput(answerVaultApprovalInputSchema).withOutput(vaultApprovalRequestSchema).query("listAudit").withInput(vaultAuditReadInputSchema).withOutput(vaultAuditPageSchema).query("listActivity").withInput(vaultAuditReadInputSchema).withOutput(external_exports.array(vaultAuditEntrySchema)).query("listLeases").withInput(workspaceInput).withOutput(external_exports.array(vaultLeaseSchema)).mutation("endLease").withInput(endVaultLeaseInputSchema).withOutput(external_exports.object({ ended: external_exports.literal(true) })).query("mostAsked").withInput(vaultMostAskedInputSchema).withOutput(vaultMostAskedSchema).query("judgeStatus").withInput(workspaceInput).withOutput(vaultJudgeStatusSchema).query("listLevelLimits").withInput(workspaceInput).withOutput(external_exports.array(vaultLevelLimitSchema)).mutation("setLevelLimit").withInput(setVaultLevelLimitInputSchema).withOutput(external_exports.array(vaultLevelLimitSchema)).query("listDevices").withInput(listVaultDevicesInput).withOutput(external_exports.array(vaultDeviceSchema)).mutation("beginDeviceEnrolment").withInput(workspaceInput).withOutput(vaultDeviceEnrolmentSchema).mutation("finishDeviceEnrolment").withInput(finishVaultDeviceEnrolmentInputSchema).withOutput(vaultDeviceSchema).mutation("beginDeviceApproval").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ challenge: external_exports.string(), sealed: external_exports.array(vaultSealedMaterialSchema) })).mutation("approveDevice").withInput(approveVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("renameDevice").withInput(renameVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("removeDevice").withInput(
|
|
61441
|
+
).withOutput(external_exports.object({ fields: external_exports.record(external_exports.string(), external_exports.string()) })).mutation("beginReauth").withInput(beginVaultReauthInputSchema).withOutput(vaultReauthChallengeSchema).mutation("confirmReauth").withInput(confirmVaultReauthInputSchema).withOutput(vaultReauthProofSchema).mutation("grantConnection").withInput(grantVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("lendToChannel").withInput(lendVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("revokeGrant").withInput(revokeVaultGrantInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("listGrants").withInput(connectionInput).withOutput(external_exports.array(vaultGrantSchema)).query("listKeyActivity").withInput(listVaultKeyActivityInputSchema).withOutput(external_exports.array(vaultKeyActivitySchema)).mutation("shareConnection").withInput(shareVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("approveShare").withInput(approveVaultShareInputSchema).withOutput(vaultGrantSchema).mutation("approveMachineKey").withInput(approveVaultMachineKeyInputSchema).withOutput(approvedVaultMachineKeySchema).query("readLock").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(vaultReadLockSchema).query("referenceHolder").withInput(vaultReferenceHolderInputSchema).withOutput(vaultReferenceHolderSchema).mutation("unlockReads").withInput(unlockVaultReadsInputSchema).withOutput(vaultReadLockSchema).mutation("sealConnection").withInput(sealVaultConnectionInputSchema).withOutput(vaultConnectionSchema).query("listApprovals").withInput(external_exports.object({ ...workspaceInput.shape, state: vaultApprovalListStateSchema.optional() })).withOutput(external_exports.array(vaultApprovalRequestSchema)).mutation("answerApproval").withInput(answerVaultApprovalInputSchema).withOutput(vaultApprovalRequestSchema).query("listAudit").withInput(vaultAuditReadInputSchema).withOutput(vaultAuditPageSchema).query("listActivity").withInput(vaultAuditReadInputSchema).withOutput(external_exports.array(vaultAuditEntrySchema)).query("listLeases").withInput(workspaceInput).withOutput(external_exports.array(vaultLeaseSchema)).mutation("endLease").withInput(endVaultLeaseInputSchema).withOutput(external_exports.object({ ended: external_exports.literal(true) })).query("mostAsked").withInput(vaultMostAskedInputSchema).withOutput(vaultMostAskedSchema.meta({ deprecated: true })).query("judgeStatus").withInput(workspaceInput).withOutput(vaultJudgeStatusSchema).query("listLevelLimits").withInput(workspaceInput).withOutput(external_exports.array(vaultLevelLimitSchema)).mutation("setLevelLimit").withInput(setVaultLevelLimitInputSchema).withOutput(external_exports.array(vaultLevelLimitSchema)).query("listDevices").withInput(listVaultDevicesInput).withOutput(external_exports.array(vaultDeviceSchema)).mutation("beginDeviceEnrolment").withInput(workspaceInput).withOutput(vaultDeviceEnrolmentSchema).mutation("finishDeviceEnrolment").withInput(finishVaultDeviceEnrolmentInputSchema).withOutput(vaultDeviceSchema).mutation("beginDeviceApproval").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ challenge: external_exports.string(), sealed: external_exports.array(vaultSealedMaterialSchema) })).mutation("approveDevice").withInput(approveVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("renameDevice").withInput(renameVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("removeDevice").withInput(
|
|
61437
61442
|
external_exports.object({
|
|
61438
61443
|
...workspaceInput.shape,
|
|
61439
61444
|
deviceId: external_exports.string().min(1),
|
|
@@ -61445,7 +61450,7 @@ var vaultCoreTrpc = defineTrpcContract("vault").mutation("createConnection").wit
|
|
|
61445
61450
|
reason: external_exports.string().trim().min(1).max(200),
|
|
61446
61451
|
reauthToken: external_exports.string().min(1).max(200).optional()
|
|
61447
61452
|
})
|
|
61448
|
-
).withOutput(vaultSealedMaterialSchema).query("getSealedApproval").withInput(external_exports.object({ ...workspaceInput.shape, requestId: external_exports.string().min(1) })).withOutput(vaultSealedApprovalSchema).mutation("answerSealedApproval").withInput(answerSealedApprovalInputSchema).withOutput(vaultApprovalRequestSchema).mutation("compareSecret").withInput(compareVaultSecretInputSchema).withOutput(vaultSecretComparisonSchema).mutation("replaceSecretValue").withInput(replaceVaultSecretValueInputSchema).withOutput(vaultConnectionSchema).mutation("savePastedSecret").withInput(external_exports.object({ ...workspaceInput.shape, ...saveVaultPastedSecretBodySchema.shape })).withOutput(vaultPastedSecretSavedSchema).build();
|
|
61453
|
+
).withOutput(vaultSealedMaterialSchema).query("getSealedApproval").withInput(external_exports.object({ ...workspaceInput.shape, requestId: external_exports.string().min(1) })).withOutput(vaultSealedApprovalSchema).mutation("answerSealedApproval").withInput(answerSealedApprovalInputSchema).withOutput(vaultApprovalRequestSchema).mutation("compareSecret").withInput(compareVaultSecretInputSchema).withOutput(vaultSecretComparisonSchema.meta({ deprecated: true })).mutation("replaceSecretValue").withInput(replaceVaultSecretValueInputSchema).withOutput(vaultConnectionSchema.meta({ deprecated: true })).mutation("savePastedSecret").withInput(external_exports.object({ ...workspaceInput.shape, ...saveVaultPastedSecretBodySchema.shape })).withOutput(vaultPastedSecretSavedSchema).build();
|
|
61449
61454
|
var vaultAgentRuleTrpc = defineTrpcContract("vault").query("listAgentRules").withInput(listVaultAgentRulesInputSchema).withOutput(external_exports.array(vaultAgentRuleEntrySchema)).mutation("setAgentRule").withInput(setVaultAgentRuleInputSchema).withOutput(external_exports.array(vaultAgentRuleEntrySchema)).build();
|
|
61450
61455
|
var vaultTierTrpc = defineTrpcContract("vault").query("tierPolicy").withInput(workspaceInput).withOutput(vaultTierPolicySchema).mutation("setTierSetting").withInput(setVaultTierSettingInputSchema).withOutput(vaultTierPolicySchema).mutation("setSubjectTier").withInput(setVaultSubjectTierInputSchema).withOutput(vaultTierPolicySchema).build();
|
|
61451
61456
|
var vaultEgressHostTrpc = defineTrpcContract("vault").query("listEgressHosts").withInput(vaultEgressHostInputSchema.omit({ host: true })).withOutput(external_exports.array(vaultEgressHostSchema)).mutation("addEgressHost").withInput(vaultEgressHostInputSchema).withOutput(external_exports.array(vaultEgressHostSchema)).mutation("removeEgressHost").withInput(vaultEgressHostInputSchema).withOutput(external_exports.array(vaultEgressHostSchema)).build();
|
|
@@ -61527,6 +61532,8 @@ var vaultApprovalRequestedPayloadSchemaDefinition = external_exports.object({
|
|
|
61527
61532
|
why: external_exports.string(),
|
|
61528
61533
|
/** The longest lease the card may offer; null offers only once and deny. */
|
|
61529
61534
|
maxLeaseSeconds: external_exports.number().int().positive().nullable(),
|
|
61535
|
+
/** "Allow for 30 days for this agent" from the card's More menu; null when not offered. */
|
|
61536
|
+
monthLeaseSeconds: external_exports.number().int().positive().nullish(),
|
|
61530
61537
|
expiresAt: external_exports.iso.datetime(),
|
|
61531
61538
|
/** The thread the agent was answering in; null when it answered in the channel. */
|
|
61532
61539
|
threadRootId: external_exports.string().nullable().default(null),
|
|
@@ -61552,6 +61559,21 @@ var vaultApprovalRequestedPayloadSchemaDefinition = external_exports.object({
|
|
|
61552
61559
|
/** The connector's service ("Gmail") when the key is one; what everyone may see of the ask. */
|
|
61553
61560
|
service: external_exports.string().nullish()
|
|
61554
61561
|
});
|
|
61562
|
+
var vaultApprovalUpdatedPayloadSchemaDefinition = external_exports.object({
|
|
61563
|
+
workspaceId: external_exports.string().min(1),
|
|
61564
|
+
/** The card's own request, the one its feed card and push name. */
|
|
61565
|
+
requestId: external_exports.string().min(1),
|
|
61566
|
+
/** Every ask the card shows, `requestId` first; an answer covers only those its client saw. */
|
|
61567
|
+
requestIds: external_exports.array(external_exports.string().min(1)).min(1),
|
|
61568
|
+
/** "2 keys: ClickHouse prod, Grafana prod". */
|
|
61569
|
+
connectionLabel: external_exports.string(),
|
|
61570
|
+
/** The connector's service when every key shares it; null otherwise. */
|
|
61571
|
+
service: external_exports.string().nullish(),
|
|
61572
|
+
agentId: external_exports.string(),
|
|
61573
|
+
channelId: external_exports.string(),
|
|
61574
|
+
approverUserIds: external_exports.array(external_exports.string()),
|
|
61575
|
+
at: external_exports.iso.datetime()
|
|
61576
|
+
});
|
|
61555
61577
|
var vaultApprovalResolvedPayloadSchemaDefinition = external_exports.object({
|
|
61556
61578
|
workspaceId: external_exports.string().min(1),
|
|
61557
61579
|
requestId: external_exports.string().min(1),
|
|
@@ -62082,15 +62104,15 @@ function clustersIn({
|
|
|
62082
62104
|
const out = [];
|
|
62083
62105
|
let current3 = null;
|
|
62084
62106
|
for (let index = segment.start; index <= segment.end; index += 1) {
|
|
62085
|
-
const
|
|
62086
|
-
if (
|
|
62107
|
+
const count19 = flagged[index] ?? 0;
|
|
62108
|
+
if (count19 === 0) continue;
|
|
62087
62109
|
if (current3 && index - current3.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
|
|
62088
62110
|
current3.end = index;
|
|
62089
|
-
current3.values +=
|
|
62111
|
+
current3.values += count19;
|
|
62090
62112
|
continue;
|
|
62091
62113
|
}
|
|
62092
62114
|
if (current3) out.push(current3);
|
|
62093
|
-
current3 = { start: index, end: index, values:
|
|
62115
|
+
current3 = { start: index, end: index, values: count19 };
|
|
62094
62116
|
}
|
|
62095
62117
|
if (current3) out.push(current3);
|
|
62096
62118
|
return out;
|
|
@@ -62117,10 +62139,10 @@ function redactedBlocksAt({
|
|
|
62117
62139
|
}) {
|
|
62118
62140
|
const lines2 = text3.split("\n");
|
|
62119
62141
|
const starts = [];
|
|
62120
|
-
let
|
|
62142
|
+
let at9 = 0;
|
|
62121
62143
|
for (const line of lines2) {
|
|
62122
|
-
starts.push(
|
|
62123
|
-
|
|
62144
|
+
starts.push(at9);
|
|
62145
|
+
at9 += line.length + 1;
|
|
62124
62146
|
}
|
|
62125
62147
|
const lineAt = (offset) => starts.findLastIndex((start2) => start2 <= offset);
|
|
62126
62148
|
const flagged = lines2.map(() => 0);
|
|
@@ -62130,7 +62152,7 @@ function redactedBlocksAt({
|
|
|
62130
62152
|
}
|
|
62131
62153
|
const blocks = redactedBlocks({ lines: lines2, flagged });
|
|
62132
62154
|
const inside = (line) => blocks.some((block2) => line >= block2.start && line <= block2.end);
|
|
62133
|
-
const values = flagged.reduce((sum,
|
|
62155
|
+
const values = flagged.reduce((sum, count19, line) => inside(line) ? sum + count19 : sum, 0);
|
|
62134
62156
|
return { values, insideAt: (offset) => inside(lineAt(offset)) };
|
|
62135
62157
|
}
|
|
62136
62158
|
|
|
@@ -62189,6 +62211,21 @@ var vaultAppUseAnswerSchemaDefinition = external_exports.discriminatedUnion("dec
|
|
|
62189
62211
|
external_exports.object({ decision: external_exports.literal("deny"), code: external_exports.string(), message: external_exports.string() })
|
|
62190
62212
|
]);
|
|
62191
62213
|
|
|
62214
|
+
// ../../modules/vault/contract/src/vault-status-probe.ts
|
|
62215
|
+
var vaultStatusJudgeSchemaDefinition = external_exports.object({
|
|
62216
|
+
/** VAULT_JUDGE_ENABLED is on and a judge key is set. */
|
|
62217
|
+
isOn: external_exports.boolean(),
|
|
62218
|
+
/** The judge answered the made-up question. */
|
|
62219
|
+
isReady: external_exports.boolean(),
|
|
62220
|
+
/** What the judge's endpoint answered; null when it did not answer at all. */
|
|
62221
|
+
httpStatus: external_exports.number().int().nullable(),
|
|
62222
|
+
/** The host the judge calls: OpenAI's EU host or the LangWatch gateway. */
|
|
62223
|
+
endpointHost: external_exports.string(),
|
|
62224
|
+
checkedAt: external_exports.iso.datetime(),
|
|
62225
|
+
/** The answer came from the last check, made under VAULT_STATUS_PROBE_CACHE_MINUTES ago. */
|
|
62226
|
+
isCached: external_exports.boolean()
|
|
62227
|
+
});
|
|
62228
|
+
|
|
62192
62229
|
// ../../modules/vault/contract/src/vault-watch.ts
|
|
62193
62230
|
var count = external_exports.number().nonnegative().max(1e15);
|
|
62194
62231
|
var countMap = external_exports.record(external_exports.string().max(128), count).nullish().transform((value) => value ?? {});
|
|
@@ -62450,6 +62487,13 @@ var vaultAlertsSettleRequestedPayloadSchemaDefinition = external_exports.object(
|
|
|
62450
62487
|
requestId: external_exports.string().min(1),
|
|
62451
62488
|
at: external_exports.iso.datetime()
|
|
62452
62489
|
});
|
|
62490
|
+
var vaultLockRequestedPayloadSchemaDefinition = external_exports.object({
|
|
62491
|
+
/** The alert workspace (VAULT_ALERT_WORKSPACE_ID), whose stream records the request. */
|
|
62492
|
+
workspaceId: external_exports.string().min(1),
|
|
62493
|
+
reason: external_exports.string().trim().min(1).max(200),
|
|
62494
|
+
requestId: external_exports.string().min(1),
|
|
62495
|
+
at: external_exports.iso.datetime()
|
|
62496
|
+
});
|
|
62453
62497
|
var vaultWatchReportReceivedPayloadSchemaDefinition = external_exports.object({
|
|
62454
62498
|
/** The alert workspace (VAULT_ALERT_WORKSPACE_ID), where a stopped watchdog's card lands. */
|
|
62455
62499
|
workspaceId: external_exports.string().min(1),
|
|
@@ -63558,6 +63602,10 @@ var attentionCardSchemaDefinition = external_exports.object({
|
|
|
63558
63602
|
canAlwaysAllow: external_exports.boolean(),
|
|
63559
63603
|
/** How long "Allow for this agent" lasts, shown on the button; null when not known. */
|
|
63560
63604
|
alwaysLeaseSeconds: external_exports.number().int().positive().nullable().default(null),
|
|
63605
|
+
/** A vault card's More menu "Allow for 30 days for this agent"; null when not offered. */
|
|
63606
|
+
monthLeaseSeconds: external_exports.number().int().positive().nullish(),
|
|
63607
|
+
/** The vault key a card asks for, so its More menu opens that key's settings. */
|
|
63608
|
+
vaultConnectionId: external_exports.string().nullish(),
|
|
63561
63609
|
/** A vault card whose "Allow once" covers the rest of the agent's turn. */
|
|
63562
63610
|
allowCoversTask: external_exports.boolean().optional(),
|
|
63563
63611
|
/** The vault's request id when the card is a vault approval; null for a harness question. */
|
|
@@ -63571,8 +63619,12 @@ var attentionCardSchemaDefinition = external_exports.object({
|
|
|
63571
63619
|
/**
|
|
63572
63620
|
* A vault approval as everyone sees it: who decides and, for a connector, its service. The key,
|
|
63573
63621
|
* call and reason are only in the vault, which its deciders read through `attentionDetail`.
|
|
63622
|
+
* `keys` counts the keys of a card that gained some, so a decider's client reads it again.
|
|
63574
63623
|
*/
|
|
63575
|
-
waiting: external_exports.object({
|
|
63624
|
+
waiting: external_exports.object({
|
|
63625
|
+
service: external_exports.string().max(120).nullable(),
|
|
63626
|
+
keys: external_exports.number().int().min(2).max(50).optional()
|
|
63627
|
+
}).optional(),
|
|
63576
63628
|
/** People who may decide; empty means anyone in the conversation. */
|
|
63577
63629
|
deciderIds: external_exports.array(external_exports.string()),
|
|
63578
63630
|
state: attentionCardStateSchema,
|
|
@@ -63711,6 +63763,8 @@ var loginCardLoginSchemaDefinition = external_exports.object({
|
|
|
63711
63763
|
id: idSchema4,
|
|
63712
63764
|
name: external_exports.string().max(120),
|
|
63713
63765
|
status: external_exports.enum(["ready", "limited", "signed_out"]),
|
|
63766
|
+
/** With `signed_out`: Anthropic refused Claude Code on its subscription. */
|
|
63767
|
+
blocked: external_exports.boolean().optional(),
|
|
63714
63768
|
/** "session limit", "weekly limit": the window that ran out, for people. */
|
|
63715
63769
|
window: external_exports.string().max(40).nullable(),
|
|
63716
63770
|
until: external_exports.iso.datetime().nullable()
|
|
@@ -64805,7 +64859,9 @@ var searchInputSchemaDefinition = external_exports.object({
|
|
|
64805
64859
|
query: external_exports.string().trim().min(1).max(300),
|
|
64806
64860
|
limit: external_exports.number().int().min(1).max(50).default(20),
|
|
64807
64861
|
/** Newest first (the default), or the best matches among the newest 200 first. */
|
|
64808
|
-
sort: external_exports.enum(["recent", "relevance"]).optional()
|
|
64862
|
+
sort: external_exports.enum(["recent", "relevance"]).optional(),
|
|
64863
|
+
/** Only this conversation; one the reader cannot read finds nothing. */
|
|
64864
|
+
channelId: idSchema4.optional()
|
|
64809
64865
|
});
|
|
64810
64866
|
var searchInputSchema = searchInputSchemaDefinition;
|
|
64811
64867
|
var startUploadInputSchemaDefinition = external_exports.object({
|
|
@@ -65345,7 +65401,9 @@ var inProgressAskSchemaDefinition = external_exports.object({
|
|
|
65345
65401
|
/** A working turn waits on an approval card the reader can answer. */
|
|
65346
65402
|
waiting: external_exports.boolean().default(false),
|
|
65347
65403
|
startedAt: external_exports.iso.datetime(),
|
|
65348
|
-
endedAt: external_exports.iso.datetime().nullable()
|
|
65404
|
+
endedAt: external_exports.iso.datetime().nullable(),
|
|
65405
|
+
/** What the reader has not read in the place: the conversation's, or the thread's replies. */
|
|
65406
|
+
unread: external_exports.number().int().nonnegative().default(0)
|
|
65349
65407
|
});
|
|
65350
65408
|
var inProgressListSchemaDefinition = external_exports.object({ asks: external_exports.array(inProgressAskSchemaDefinition) });
|
|
65351
65409
|
var inProgressListSchema = inProgressListSchemaDefinition;
|
|
@@ -65392,7 +65450,7 @@ var chatChannelRolesTrpc = defineTrpcContract("chat").mutation("setChannelRole")
|
|
|
65392
65450
|
var chatMessagesTrpc = defineTrpcContract("chat").query("history", { mirrored: historyMirror }).withInput(historyInputSchema).withOutput(historyPageSchema).query("thread").withInput(messageInputSchema).withOutput(threadSchema).query("message").withInput(messageInputSchema).withOutput(messageSchema).mutation("post").withInput(postMessageInputSchema).withOutput(messageSchema).mutation("forward").withInput(forwardMessageInputSchema).withOutput(messageSchema).mutation("addMentioned").withInput(addMentionedInputSchema).withOutput(messageSchema).mutation("letMentionedKnow").withInput(letMentionedKnowInputSchema).withOutput(letMentionedKnowResultSchema).mutation("edit").withInput(editMessageInputSchema).withOutput(messageSchema).mutation("delete").withInput(messageInputSchema).withOutput(messageSchema).mutation("remove").withInput(messageInputSchema).withOutput(messageSchema).mutation("react").withInput(reactInputSchema).withOutput(messageSchema).mutation("signalTyping").withInput(signalTypingInputSchema).withOutput(external_exports.object({ sent: external_exports.literal(true) })).mutation("markRead").withInput(markReadInputSchema).withOutput(external_exports.object({ lastReadSeq: external_exports.number().int().nonnegative() })).mutation("markUnread").withInput(markUnreadInputSchema).withOutput(external_exports.object({ lastReadSeq: external_exports.number().int().nonnegative() })).query("search").withInput(searchInputSchema).withOutput(searchResultSchema).build();
|
|
65393
65451
|
var chatFilesTrpc = defineTrpcContract("chat").mutation("startUpload").withInput(startUploadInputSchema).withOutput(uploadTicketSchema).mutation("completeUpload").withInput(completeUploadInputSchema).withOutput(attachmentSchema).mutation("transcribeVoiceSegment").withInput(transcribeVoiceSegmentInputSchema).withOutput(voiceSegmentTextSchema).mutation("abortUpload").withInput(fileInputSchema).withOutput(external_exports.object({ aborted: external_exports.literal(true) })).query("fileLink").withInput(fileLinkInputSchema).withOutput(fileLinkSchema).query("fileLinks").withInput(fileLinksInputSchema).withOutput(fileLinksSchema).query("channelFiles").withInput(channelFilesInputSchema).withOutput(channelFilesSchema).mutation("renameAttachment").withInput(renameAttachmentInputSchema).withOutput(attachmentSchema).mutation("hideUnfurl").withInput(hideUnfurlInputSchema).withOutput(messageSchema).query("unfurlImage").withInput(unfurlImageInputSchema).withOutput(fileLinkSchema).query("searchGifs").withInput(searchGifsInputSchema).withOutput(gifResultsSchema).build();
|
|
65394
65452
|
var chatFollowingTrpc = defineTrpcContract("chat").mutation("setNotify").withInput(setNotifyInputSchema).withOutput(conversationSummarySchema).mutation("setReplySide").withInput(setReplySideInputSchema).withOutput(conversationSummarySchema).mutation("hideConversation").withInput(channelInputSchema).withOutput(external_exports.object({ hidden: external_exports.literal(true) })).mutation("followThread").withInput(followThreadInputSchema).withOutput(threadFollowSchema).query("threadFollow").withInput(messageInputSchema).withOutput(threadFollowSchema).query("threads", { mirrored: threadsMirror }).withInput(threadsInputSchema).withOutput(threadsPageSchema).query("threadsUnread").withInput(workspaceInputSchema).withOutput(threadsUnreadSchema).query("notificationCount").withInput(workspaceInputSchema).withOutput(external_exports.object({ count: external_exports.number().int().nonnegative() })).mutation("markThreadRead").withInput(messageInputSchema).withOutput(external_exports.object({ read: external_exports.literal(true) })).mutation("pin").withInput(pinMessageInputSchema).withOutput(messageSchema).mutation("retryMirrorDelivery").withInput(messageInputSchema).withOutput(external_exports.object({ retried: external_exports.boolean() })).mutation("alsoSendToSlack").withInput(messageInputSchema).withOutput(messageSchema).query("pins").withInput(channelInputSchema).withOutput(pinsPageSchema).query("saved").withInput(savedInputSchema).withOutput(savedPageSchema).query("savedMarks").withInput(workspaceInputSchema).withOutput(savedMarksSchema).mutation("saveMessage").withInput(saveMessageInputSchema).withOutput(savedStatusSchema).mutation("markSavedDone").withInput(markSavedDoneInputSchema).withOutput(savedStatusSchema).mutation("setReminder").withInput(setReminderInputSchema).withOutput(savedStatusSchema).query("activity").withInput(activityInputSchema).withOutput(activityPageSchema).mutation("markActivityRead").withInput(markActivityReadInputSchema).withOutput(external_exports.object({ read: external_exports.literal(true) })).build();
|
|
65395
|
-
var chatSessionTrpc = defineTrpcContract("chat").mutation("realtimeToken").withInput(workspaceInputSchema).withOutput(realtimeTokenSchema).query("drafts").withInput(workspaceInputSchema).withOutput(draftListSchema).mutation("saveDraft").withInput(saveDraftInputSchema).withOutput(draftSavedSchema).mutation("deleteDraft").withInput(deleteDraftInputSchema).withOutput(draftSavedSchema).query("sent").withInput(listSentInputSchema).withOutput(sentPageSchema).query("sidebarLayout").withInput(workspaceInputSchema).withOutput(sidebarLayoutSchema).mutation("editSidebar").withInput(editSidebarInputSchema).withOutput(sidebarLayoutSchema).query("inProgress").withInput(workspaceInputSchema).withOutput(inProgressListSchema).mutation("clearInProgress").withInput(clearInProgressInputSchema).withOutput(inProgressListSchema).query("readerPreferences").withInput(workspaceInputSchema).withOutput(readerPreferencesSchema).mutation("setReaderPreferences").withInput(setReaderPreferencesInputSchema).withOutput(readerPreferencesSchema).mutation("star").withInput(starInputSchema).withOutput(starStatusSchema).query("starred").withInput(workspaceInputSchema).withOutput(starredListSchema).mutation("scrubSecrets").withInput(scrubChatInputSchema).withOutput(chatScrubReportSchema).mutation("restoreScrubbed").withInput(messageInputSchema).withOutput(messageSchema).build();
|
|
65453
|
+
var chatSessionTrpc = defineTrpcContract("chat").mutation("realtimeToken").withInput(workspaceInputSchema).withOutput(realtimeTokenSchema).query("drafts").withInput(workspaceInputSchema).withOutput(draftListSchema).mutation("saveDraft").withInput(saveDraftInputSchema).withOutput(draftSavedSchema).mutation("deleteDraft").withInput(deleteDraftInputSchema).withOutput(draftSavedSchema).query("sent").withInput(listSentInputSchema).withOutput(sentPageSchema).query("sidebarLayout").withInput(workspaceInputSchema).withOutput(sidebarLayoutSchema).mutation("editSidebar").withInput(editSidebarInputSchema).withOutput(sidebarLayoutSchema).query("inProgress").withInput(workspaceInputSchema).withOutput(inProgressListSchema).mutation("clearInProgress").withInput(clearInProgressInputSchema).withOutput(inProgressListSchema).query("readerPreferences").withInput(workspaceInputSchema).withOutput(readerPreferencesSchema).mutation("setReaderPreferences").withInput(setReaderPreferencesInputSchema).withOutput(readerPreferencesSchema).mutation("star").withInput(starInputSchema).withOutput(starStatusSchema).query("starred").withInput(workspaceInputSchema).withOutput(starredListSchema).mutation("scrubSecrets").withInput(scrubChatInputSchema).withOutput(chatScrubReportSchema.meta({ deprecated: true })).mutation("restoreScrubbed").withInput(messageInputSchema).withOutput(messageSchema).build();
|
|
65396
65454
|
var chatScheduledTrpc = defineTrpcContract("chat").mutation("scheduleMessage").withInput(scheduleMessageInputSchema).withOutput(scheduledMessageSchema).query("scheduled").withInput(listScheduledInputSchema).withOutput(scheduledListSchema).mutation("editScheduled").withInput(editScheduledInputSchema).withOutput(scheduledMessageSchema).mutation("sendScheduledNow").withInput(scheduledInputSchema).withOutput(scheduledMessageSchema).mutation("cancelScheduled").withInput(scheduledInputSchema).withOutput(scheduledMessageSchema).build();
|
|
65397
65455
|
var chatPresenceTrpc = defineTrpcContract("chat").mutation("heartbeat").withInput(workspaceInputSchema).withOutput(heartbeatSchema).query("presence").withInput(workspaceInputSchema).withOutput(presenceListSchema).mutation("setStatus").withInput(setStatusInputSchema).withOutput(personPresenceSchema).mutation("clearStatus").withInput(workspaceInputSchema).withOutput(personPresenceSchema).mutation("setAway").withInput(setAwayInputSchema).withOutput(personPresenceSchema).build();
|
|
65398
65456
|
var chatTrpc = joinTrpcContracts(
|
|
@@ -66244,6 +66302,48 @@ var personSessionStartedPayloadSchemaDefinition = external_exports.object({
|
|
|
66244
66302
|
at: external_exports.iso.datetime()
|
|
66245
66303
|
});
|
|
66246
66304
|
|
|
66305
|
+
// ../../modules/notification/contract/src/push-outcomes.ts
|
|
66306
|
+
var pushOutcomeCodeSchema = external_exports.enum([
|
|
66307
|
+
"queued",
|
|
66308
|
+
"delivered",
|
|
66309
|
+
"token_gone",
|
|
66310
|
+
"retry",
|
|
66311
|
+
"refused",
|
|
66312
|
+
"expired",
|
|
66313
|
+
"withdrawn",
|
|
66314
|
+
"install_gone",
|
|
66315
|
+
"no_install",
|
|
66316
|
+
"push_off",
|
|
66317
|
+
"quiet",
|
|
66318
|
+
"burst",
|
|
66319
|
+
"held_active",
|
|
66320
|
+
"dropped_active"
|
|
66321
|
+
]);
|
|
66322
|
+
var PUSH_OUTCOME_APNS_STATUS = /^(?:|\d{3}(?: [A-Za-z]{1,40})?|unreachable)$/;
|
|
66323
|
+
var pushOutcomePushTypeSchema = external_exports.enum(["alert", "background"]);
|
|
66324
|
+
var count6 = external_exports.number().int().nonnegative();
|
|
66325
|
+
var day2 = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/);
|
|
66326
|
+
var pushOutcomeRowSchemaDefinition = external_exports.object({
|
|
66327
|
+
userId: external_exports.string().max(128),
|
|
66328
|
+
pushType: pushOutcomePushTypeSchema,
|
|
66329
|
+
code: pushOutcomeCodeSchema,
|
|
66330
|
+
apnsStatus: external_exports.string().regex(PUSH_OUTCOME_APNS_STATUS),
|
|
66331
|
+
count: count6
|
|
66332
|
+
}).strict();
|
|
66333
|
+
var pushOutcomeRowSchema = pushOutcomeRowSchemaDefinition;
|
|
66334
|
+
var pushOutcomeDayRowSchemaDefinition = external_exports.object({ day: day2, pushType: pushOutcomePushTypeSchema, code: pushOutcomeCodeSchema, count: count6 }).strict();
|
|
66335
|
+
var pushOutcomeDayRowSchema = pushOutcomeDayRowSchemaDefinition;
|
|
66336
|
+
var pushInstallRowSchemaDefinition = external_exports.object({
|
|
66337
|
+
userId: external_exports.string().max(128),
|
|
66338
|
+
environment: apnsEnvironmentSchema,
|
|
66339
|
+
installs: count6,
|
|
66340
|
+
/** The newest install's registration, ISO. */
|
|
66341
|
+
registeredAt: external_exports.iso.datetime(),
|
|
66342
|
+
/** The last push APNs took for any of them, ISO; null when none ever went through. */
|
|
66343
|
+
lastSuccessAt: external_exports.iso.datetime().nullable()
|
|
66344
|
+
}).strict();
|
|
66345
|
+
var pushInstallRowSchema = pushInstallRowSchemaDefinition;
|
|
66346
|
+
|
|
66247
66347
|
// ../../modules/notification/contract/src/notification.ui.ts
|
|
66248
66348
|
var notificationUi = uiTokens("notification");
|
|
66249
66349
|
var NotificationPauseHooksToken = notificationUi.hooks("pause");
|
|
@@ -66656,12 +66756,23 @@ var observeSenderInputSchemaDefinition = external_exports.object({
|
|
|
66656
66756
|
name: external_exports.string().trim().min(1).max(200),
|
|
66657
66757
|
avatarUrl: external_exports.string().max(2e3).nullable().default(null)
|
|
66658
66758
|
});
|
|
66759
|
+
var linkMirrorSenderInputSchemaDefinition = external_exports.object({
|
|
66760
|
+
workspaceId: external_exports.string().min(1),
|
|
66761
|
+
identity: external_exports.string().min(1).max(64),
|
|
66762
|
+
personId: external_exports.string().min(1).max(64)
|
|
66763
|
+
});
|
|
66764
|
+
var unlinkMirrorSenderInputSchemaDefinition = external_exports.object({
|
|
66765
|
+
workspaceId: external_exports.string().min(1),
|
|
66766
|
+
identity: external_exports.string().min(1).max(64),
|
|
66767
|
+
personId: external_exports.string().min(1).max(64),
|
|
66768
|
+
originKeyPrefix: external_exports.string().min(3).max(100)
|
|
66769
|
+
});
|
|
66659
66770
|
|
|
66660
66771
|
// ../../modules/chat/contract/src/chat.read-ops.ts
|
|
66661
|
-
var
|
|
66772
|
+
var count7 = external_exports.number().int().nonnegative();
|
|
66662
66773
|
var at = external_exports.iso.datetime();
|
|
66663
66774
|
var unreadMessageDefinition = external_exports.object({
|
|
66664
|
-
seq:
|
|
66775
|
+
seq: count7,
|
|
66665
66776
|
createdAt: at,
|
|
66666
66777
|
/** self is the reader; the others are the author's kind. */
|
|
66667
66778
|
author: external_exports.enum(["self", "person", "agent", "external"]),
|
|
@@ -66680,12 +66791,12 @@ var readConversationDefinition = external_exports.object({
|
|
|
66680
66791
|
direct: external_exports.boolean(),
|
|
66681
66792
|
/** The other side of a Laze DM paired with a Slack DM, or null. */
|
|
66682
66793
|
pairedWith: external_exports.string().nullable(),
|
|
66683
|
-
lastSeq:
|
|
66684
|
-
lastReadSeq:
|
|
66685
|
-
unreadHeldToSeq:
|
|
66686
|
-
hiddenAtSeq:
|
|
66687
|
-
unread:
|
|
66688
|
-
mentions:
|
|
66794
|
+
lastSeq: count7,
|
|
66795
|
+
lastReadSeq: count7,
|
|
66796
|
+
unreadHeldToSeq: count7.nullable(),
|
|
66797
|
+
hiddenAtSeq: count7.nullable(),
|
|
66798
|
+
unread: count7,
|
|
66799
|
+
mentions: count7,
|
|
66689
66800
|
lastMessageAt: at.nullable(),
|
|
66690
66801
|
/** When the newest message at or before the marker was written. */
|
|
66691
66802
|
markerAt: at.nullable(),
|
|
@@ -66695,7 +66806,7 @@ var readConversationDefinition = external_exports.object({
|
|
|
66695
66806
|
var chatReadFactsDefinition = external_exports.object({
|
|
66696
66807
|
conversations: external_exports.array(readConversationDefinition).max(40),
|
|
66697
66808
|
/** Conversations that qualified before the cap. */
|
|
66698
|
-
total:
|
|
66809
|
+
total: count7
|
|
66699
66810
|
});
|
|
66700
66811
|
var chatReadFactsSchema = chatReadFactsDefinition;
|
|
66701
66812
|
|
|
@@ -66715,41 +66826,68 @@ var supportAnswerNoticesDefinition = external_exports.object({
|
|
|
66715
66826
|
var supportAnswerNoticesSchema = supportAnswerNoticesDefinition;
|
|
66716
66827
|
|
|
66717
66828
|
// ../../modules/chat/contract/src/chat.link-domain-ops.ts
|
|
66718
|
-
var
|
|
66829
|
+
var count8 = external_exports.number().int().nonnegative();
|
|
66719
66830
|
var linkDomainDefinition = external_exports.object({
|
|
66720
66831
|
/** The link's host, lowercased, without `www.`. */
|
|
66721
66832
|
domain: external_exports.string(),
|
|
66722
66833
|
/** Previews on messages, one per message and preview. */
|
|
66723
|
-
links:
|
|
66834
|
+
links: count8,
|
|
66724
66835
|
/** Messages with at least one preview of this host. */
|
|
66725
|
-
messageCount:
|
|
66836
|
+
messageCount: count8,
|
|
66726
66837
|
/** Previews of this host a message author took off. */
|
|
66727
|
-
removed:
|
|
66838
|
+
removed: count8,
|
|
66728
66839
|
/** Distinct previews (addresses) of this host. */
|
|
66729
|
-
pages:
|
|
66840
|
+
pages: count8,
|
|
66730
66841
|
/** Pages whose preview carries a picture, and a page name. */
|
|
66731
|
-
pictured:
|
|
66732
|
-
named:
|
|
66842
|
+
pictured: count8,
|
|
66843
|
+
named: count8,
|
|
66733
66844
|
/** Pages whose fetch failed or was blocked. */
|
|
66734
|
-
failed:
|
|
66845
|
+
failed: count8,
|
|
66735
66846
|
/** The commonest path shapes, at most 5, each with its page count. */
|
|
66736
|
-
shapes: external_exports.array(external_exports.object({ shape: external_exports.string(), pages:
|
|
66847
|
+
shapes: external_exports.array(external_exports.object({ shape: external_exports.string(), pages: count8 })).max(5)
|
|
66737
66848
|
});
|
|
66738
66849
|
var linkDomainFactsDefinition = external_exports.object({
|
|
66739
66850
|
domains: external_exports.array(linkDomainDefinition),
|
|
66740
66851
|
/** Messages with previews read on this page, and how many previews they carry. */
|
|
66741
|
-
scannedMessageCount:
|
|
66742
|
-
scannedLinks:
|
|
66852
|
+
scannedMessageCount: count8,
|
|
66853
|
+
scannedLinks: count8,
|
|
66743
66854
|
/** Messages carrying exactly 1, 2, and 3 or more previews on this page. */
|
|
66744
|
-
messageCountByLinks: external_exports.array(
|
|
66855
|
+
messageCountByLinks: external_exports.array(count8).length(3),
|
|
66745
66856
|
/** Over the whole workspace: live messages with a link, and those with a preview. */
|
|
66746
|
-
linkedMessageCount:
|
|
66747
|
-
previewedMessageCount:
|
|
66857
|
+
linkedMessageCount: count8,
|
|
66858
|
+
previewedMessageCount: count8,
|
|
66748
66859
|
/** The last message id read; pass it back as `cursor` to read on, null at the end. */
|
|
66749
66860
|
nextCursor: external_exports.string().nullable()
|
|
66750
66861
|
});
|
|
66751
66862
|
var linkDomainFactsSchema = linkDomainFactsDefinition;
|
|
66752
66863
|
|
|
66864
|
+
// ../../modules/chat/contract/src/chat.author-ops.ts
|
|
66865
|
+
var count9 = external_exports.number().int().nonnegative();
|
|
66866
|
+
var at2 = external_exports.iso.datetime();
|
|
66867
|
+
var conversationAuthorDefinition = external_exports.object({
|
|
66868
|
+
kind: external_exports.enum(["person", "agent", "external"]),
|
|
66869
|
+
/** A person's user id, an agent's id, or a mirrored sender's identity such as `slack:T1:U1`. */
|
|
66870
|
+
id: external_exports.string(),
|
|
66871
|
+
/** The mirror that brought the messages in, or null for messages written in Laze. */
|
|
66872
|
+
source: external_exports.string().nullable(),
|
|
66873
|
+
messageCount: count9,
|
|
66874
|
+
firstAt: at2,
|
|
66875
|
+
lastAt: at2
|
|
66876
|
+
});
|
|
66877
|
+
var authoredConversationDefinition = external_exports.object({
|
|
66878
|
+
channelId: external_exports.string(),
|
|
66879
|
+
kind: external_exports.string(),
|
|
66880
|
+
/** The mirror's source, or null for a Laze conversation. */
|
|
66881
|
+
source: external_exports.string().nullable(),
|
|
66882
|
+
agentId: external_exports.string().nullable(),
|
|
66883
|
+
lastMessageAt: at2.nullable(),
|
|
66884
|
+
authors: external_exports.array(conversationAuthorDefinition).max(50)
|
|
66885
|
+
});
|
|
66886
|
+
var chatAuthorFactsDefinition = external_exports.object({
|
|
66887
|
+
conversations: external_exports.array(authoredConversationDefinition).max(20)
|
|
66888
|
+
});
|
|
66889
|
+
var chatAuthorFactsSchema = chatAuthorFactsDefinition;
|
|
66890
|
+
|
|
66753
66891
|
// ../../modules/workspace/contract/src/sign-up-source.ts
|
|
66754
66892
|
var TAG = /^[\p{L}\p{N} ._\-+:/@|]{1,100}$/u;
|
|
66755
66893
|
var PERSONA = /^[a-z0-9-]{1,40}$/;
|
|
@@ -67619,8 +67757,8 @@ var lazeAgentEventSchemaDefinition = external_exports.discriminatedUnion("type",
|
|
|
67619
67757
|
}),
|
|
67620
67758
|
external_exports.object({
|
|
67621
67759
|
type: external_exports.literal("error"),
|
|
67622
|
-
/** `model_key_denied`, `
|
|
67623
|
-
* `harness_error`, `harness_stopped`, `harness_start_failed`. */
|
|
67760
|
+
/** `model_key_denied`, `model_login_blocked`, `model_usage_limit`, `model_unavailable`,
|
|
67761
|
+
* `model_error`, `harness_error`, `harness_stopped`, `harness_start_failed`. */
|
|
67624
67762
|
code: external_exports.string().min(1),
|
|
67625
67763
|
message: external_exports.string(),
|
|
67626
67764
|
retryable: external_exports.boolean()
|
|
@@ -67777,8 +67915,6 @@ var agentSandboxSpecSchemaDefinition = external_exports.object({
|
|
|
67777
67915
|
mainChannelId: external_exports.string().regex(/^[a-zA-Z0-9_-]+$/).optional(),
|
|
67778
67916
|
/** Where the harness runs: a Laze computer when absent, else the owner's own machine. */
|
|
67779
67917
|
host: external_exports.object({ kind: external_exports.literal("machine"), machineId: external_exports.string().min(1) }).optional(),
|
|
67780
|
-
/** A personal agent's owner: their dedicated IP's route applies to this agent. */
|
|
67781
|
-
routeOwnerUserId: external_exports.string().min(1).optional(),
|
|
67782
67918
|
/** Set by the runtime from the workspace's plan: egress applies the Free plan's rules. */
|
|
67783
67919
|
freePlan: external_exports.boolean().optional(),
|
|
67784
67920
|
/** A migrated agent's imported session, used when its main session first starts. */
|
|
@@ -67961,7 +68097,10 @@ var computerPlacementSchemaDefinition = external_exports.object({
|
|
|
67961
68097
|
});
|
|
67962
68098
|
var setEgressRouteInputDefinition = external_exports.object({
|
|
67963
68099
|
workspaceId: external_exports.string().min(1),
|
|
68100
|
+
/** The computer key: a person's user id for their default computer, else the computer's id. */
|
|
67964
68101
|
ownerUserId: external_exports.string().min(1),
|
|
68102
|
+
/** Whose keychain holds the key, when not `ownerUserId`. */
|
|
68103
|
+
holderUserId: external_exports.string().min(1).optional(),
|
|
67965
68104
|
route: external_exports.object({
|
|
67966
68105
|
/** The `human_only` connection in the owner's keychain holding host, port and credentials. */
|
|
67967
68106
|
vaultConnectionId: external_exports.string().min(1),
|
|
@@ -69046,7 +69185,9 @@ var attentionDetailSchemaDefinition = external_exports.object({
|
|
|
69046
69185
|
line: external_exports.string(),
|
|
69047
69186
|
call: external_exports.string(),
|
|
69048
69187
|
detail: external_exports.string(),
|
|
69049
|
-
judgeLine: external_exports.string().nullable()
|
|
69188
|
+
judgeLine: external_exports.string().nullable(),
|
|
69189
|
+
/** The vault requests the card covers, its own first; an answer sends back the ones shown. */
|
|
69190
|
+
requestIds: external_exports.array(external_exports.string()).optional()
|
|
69050
69191
|
});
|
|
69051
69192
|
var attentionDetailSchema = attentionDetailSchemaDefinition;
|
|
69052
69193
|
var answerAttentionInputSchemaDefinition = external_exports.object({
|
|
@@ -69057,7 +69198,11 @@ var answerAttentionInputSchemaDefinition = external_exports.object({
|
|
|
69057
69198
|
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string().max(4e3)).max(20)).default({}),
|
|
69058
69199
|
resolutionNote: resolutionNoteSchema2,
|
|
69059
69200
|
/** Where the person answered a vault card from; a browser leaves it out. */
|
|
69060
|
-
via: external_exports.enum(["channel", "ios"]).optional()
|
|
69201
|
+
via: external_exports.enum(["channel", "ios"]).optional(),
|
|
69202
|
+
/** "always" on a vault card for the card's 30 days instead of the key's own length. */
|
|
69203
|
+
durationSeconds: external_exports.number().int().positive().optional(),
|
|
69204
|
+
/** On a vault card, the request ids the client showed; the answer covers only those. */
|
|
69205
|
+
seenRequestIds: external_exports.array(external_exports.string().min(1).max(64)).max(50).optional()
|
|
69061
69206
|
});
|
|
69062
69207
|
var answerAttentionInputSchema = answerAttentionInputSchemaDefinition;
|
|
69063
69208
|
var askAgentApprovalInputSchemaDefinition = external_exports.object({
|
|
@@ -69344,7 +69489,9 @@ var startConversationInputSchemaDefinition = external_exports.object({
|
|
|
69344
69489
|
body: firstMessageSchema,
|
|
69345
69490
|
clientKey: clientKeySchema,
|
|
69346
69491
|
/** A message the starter may read: the first message quotes it, as a forward does. */
|
|
69347
|
-
contextMessageId: idSchema8.optional()
|
|
69492
|
+
contextMessageId: idSchema8.optional(),
|
|
69493
|
+
/** Picked before the first send: added as Add people adds them, before the message posts. */
|
|
69494
|
+
members: addMembersInputSchema.shape.members.optional()
|
|
69348
69495
|
});
|
|
69349
69496
|
var startConversationInputSchema = startConversationInputSchemaDefinition;
|
|
69350
69497
|
var openConversationInputSchemaDefinition = external_exports.object({
|
|
@@ -69381,6 +69528,12 @@ var conversationSummarySchemaDefinition2 = external_exports.object({
|
|
|
69381
69528
|
url: lazeUrlSchema.optional()
|
|
69382
69529
|
});
|
|
69383
69530
|
var conversationSummarySchema2 = conversationSummarySchemaDefinition2;
|
|
69531
|
+
var toggledConversationSchemaDefinition = external_exports.object({
|
|
69532
|
+
...conversationSummarySchemaDefinition2.shape,
|
|
69533
|
+
workspaceId: workspaceIdSchema4,
|
|
69534
|
+
kind: external_exports.literal("chat")
|
|
69535
|
+
});
|
|
69536
|
+
var toggledConversationSchema = toggledConversationSchemaDefinition;
|
|
69384
69537
|
var startConversationAsCallerInputSchemaDefinition = external_exports.object({
|
|
69385
69538
|
agent: agentRefSchema3,
|
|
69386
69539
|
text: firstMessageSchema,
|
|
@@ -70728,6 +70881,10 @@ var langwatchSurfaces = defineSurfaces(langwatchTrpc, {
|
|
|
70728
70881
|
setMine: { rest: "langwatchMine", cli: "langwatch mine" }
|
|
70729
70882
|
});
|
|
70730
70883
|
|
|
70884
|
+
// ../../modules/langwatch/contract/src/langwatch.ui.ts
|
|
70885
|
+
var langwatchUi = uiTokens("langwatch");
|
|
70886
|
+
var LangwatchInvestigateSlot = langwatchUi.component("investigate");
|
|
70887
|
+
|
|
70731
70888
|
// ../../modules/agent/contract/src/agent-langwatch.ts
|
|
70732
70889
|
var agentRefSchema4 = external_exports.string().trim().min(1).max(80);
|
|
70733
70890
|
var workspaceIdSchema6 = external_exports.string().min(1);
|
|
@@ -70864,8 +71021,13 @@ var agentLoginChoicesInputSchema = agentLoginChoicesInputSchemaDefinition;
|
|
|
70864
71021
|
var agentLoginChoiceSchemaDefinition = external_exports.object({
|
|
70865
71022
|
id: external_exports.string().min(1),
|
|
70866
71023
|
name: external_exports.string(),
|
|
70867
|
-
/**
|
|
71024
|
+
/**
|
|
71025
|
+
* `room`: it can run now; `limited`: out of usage until `until`; `signed_out`: refused, or
|
|
71026
|
+
* refused for its Claude subscription (`blocked`).
|
|
71027
|
+
*/
|
|
70868
71028
|
status: external_exports.enum(["room", "limited", "signed_out"]),
|
|
71029
|
+
/** Anthropic refused Claude Code on its subscription; absent on older servers. */
|
|
71030
|
+
blocked: external_exports.boolean().optional(),
|
|
70869
71031
|
until: external_exports.iso.datetime().nullable(),
|
|
70870
71032
|
usedPercent: external_exports.number().nullable(),
|
|
70871
71033
|
/** The login the agent runs on now. */
|
|
@@ -71019,8 +71181,13 @@ var harnessLoginEntrySchemaDefinition = external_exports.object({
|
|
|
71019
71181
|
id: idSchema13,
|
|
71020
71182
|
harness: harnessSchema3,
|
|
71021
71183
|
name: external_exports.string(),
|
|
71022
|
-
/**
|
|
71184
|
+
/**
|
|
71185
|
+
* `invalid` once its provider refused the token, or while Anthropic refuses Claude Code on its
|
|
71186
|
+
* subscription (`blocked`); `out_of_usage` until `limitedUntil`.
|
|
71187
|
+
*/
|
|
71023
71188
|
state: external_exports.enum(["ready", "out_of_usage", "invalid"]),
|
|
71189
|
+
/** Anthropic refused Claude Code on its subscription; absent on older servers. */
|
|
71190
|
+
blocked: external_exports.boolean().optional(),
|
|
71024
71191
|
/** The tightest usage window's percent at the latest reading; null before one. */
|
|
71025
71192
|
usedPercent: external_exports.number().nullable(),
|
|
71026
71193
|
/** The soonest window reset at the latest reading. */
|
|
@@ -71235,6 +71402,8 @@ var loginSwitchSchemaDefinition = external_exports.object({
|
|
|
71235
71402
|
from: external_exports.string(),
|
|
71236
71403
|
to: external_exports.string(),
|
|
71237
71404
|
reason: loginSwitchReasonSchema,
|
|
71405
|
+
/** With `signed_out`: Anthropic refused the login's subscription, not its token. */
|
|
71406
|
+
blocked: external_exports.boolean().optional(),
|
|
71238
71407
|
/** The person who pressed the switch; null when the rotation rule made it. */
|
|
71239
71408
|
byName: external_exports.string().nullable()
|
|
71240
71409
|
});
|
|
@@ -71297,7 +71466,7 @@ var harnessSignInPollSchemaDefinition = external_exports.discriminatedUnion("sta
|
|
|
71297
71466
|
external_exports.object({ status: external_exports.literal("approved"), flow: external_exports.string() })
|
|
71298
71467
|
]);
|
|
71299
71468
|
var harnessSignInPollSchema = harnessSignInPollSchemaDefinition;
|
|
71300
|
-
var loginStateSchema = external_exports.enum(["ready", "out_of_usage", "invalid"]);
|
|
71469
|
+
var loginStateSchema = external_exports.enum(["ready", "out_of_usage", "invalid", "blocked"]);
|
|
71301
71470
|
var isoSchema = external_exports.iso.datetime();
|
|
71302
71471
|
var loginStatesSchemaDefinition = external_exports.object({
|
|
71303
71472
|
/** Logins signed in on a person's own Laze computer; Laze holds only the fact. */
|
|
@@ -72566,7 +72735,7 @@ var agentsCopy = {
|
|
|
72566
72735
|
paintOnly: true,
|
|
72567
72736
|
storable: agentsForDisk
|
|
72568
72737
|
};
|
|
72569
|
-
var agentCoreTrpc = defineTrpcContract("agents").query("list", { mirrored: agentsCopy }).withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentListEntrySchema)).mutation("create").withInput(createAgentInputSchema).withOutput(agentSchema).mutation("update").withInput(updateAgentInputSchema).withOutput(agentSchema).mutation("remove").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("transfer").withInput(transferAgentInputSchema).withOutput(agentSchema).mutation("resetSession").withInput(resetAgentSessionInputSchema).withOutput(agentSchema).query("faces").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentFaceSchema)).query("presence").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentPresenceSchema)).mutation("uploadAvatar").withInput(uploadAgentAvatarInputSchema).withOutput(uploadedAgentAvatarSchema).query("access").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(agentAccessSchema).query("loginActivity").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(loginActivitySchema).mutation("raiseBudget").withInput(raiseBudgetInputSchema).withOutput(raisedBudgetSchema).query("permissionPrompts").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.array(agentPermissionPromptSchema)).mutation("share").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).mutation("unshare").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).query("harnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(harnessLoginsSchema).mutation("saveHarnessLogin").withInput(saveHarnessLoginInputSchema).withOutput(harnessLoginsSchema).mutation("removeHarnessLogin").withInput(removeHarnessLoginInputSchema).withOutput(harnessLoginsSchema).query("listHarnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(harnessLoginListSchema).mutation("addHarnessLogin").withInput(addHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("renameHarnessLogin").withInput(renameHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("deleteHarnessLogin").withInput(deleteHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("checkLoginUsage").withInput(checkLoginUsageInputSchema).withOutput(loginUsageCheckSchema).query("loginPools").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(loginPoolsSchema).mutation("createLoginPool").withInput(createLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("renameLoginPool").withInput(renameLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("deleteLoginPool").withInput(loginPoolRefInputSchema).withOutput(loginPoolsSchema).mutation("addPoolLogin").withInput(addPoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("removePoolLogin").withInput(removePoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("setPoolMember").withInput(setPoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("removePoolMember").withInput(removePoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("setAgentPool").withInput(setAgentPoolInputSchema).withOutput(agentSchema).mutation("openDirect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.object({ channelId: idSchema19 })).mutation("startConversation").withInput(startConversationInputSchema).withOutput(startedConversationSchema).query("conversations").withInput(listConversationsInputSchema).withOutput(external_exports.array(conversationSummarySchema2)).mutation("joinConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("renameConversation").withInput(renameConversationInputSchema).withOutput(conversationSummarySchema2).mutation("leaveConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("deleteConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("mintLink").withInput(mintLinkInputSchema).withOutput(mintedLinkSchema).query("linkRedemption").withInput(linkRedemptionInputSchema).withOutput(linkRedemptionSchema).query("oauthRequest").withInput(oauthRequestInputSchema).withOutput(oauthRequestViewSchema).mutation("oauthApprove").withInput(approveOAuthInputSchema).withOutput(oauthRedirectSchema).mutation("oauthDeny").withInput(oauthRequestInputSchema).withOutput(oauthRedirectSchema).mutation("disconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("setGithub").withInput(setAgentGithubInputSchema).withOutput(agentSchema).query("githubWatches").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.array(agentGithubWatchSchema)).mutation("watchGithub").withInput(watchGithubInputSchema).withOutput(agentGithubWatchSchema).mutation("unwatchGithub").withInput(unwatchGithubInputSchema).withOutput(external_exports.object({ removed: external_exports.literal(true) })).build();
|
|
72738
|
+
var agentCoreTrpc = defineTrpcContract("agents").query("list", { mirrored: agentsCopy }).withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentListEntrySchema)).mutation("create").withInput(createAgentInputSchema).withOutput(agentSchema).mutation("update").withInput(updateAgentInputSchema).withOutput(agentSchema).mutation("remove").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("transfer").withInput(transferAgentInputSchema).withOutput(agentSchema).mutation("resetSession").withInput(resetAgentSessionInputSchema).withOutput(agentSchema).query("faces").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentFaceSchema)).query("presence").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentPresenceSchema)).mutation("uploadAvatar").withInput(uploadAgentAvatarInputSchema).withOutput(uploadedAgentAvatarSchema).query("access").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(agentAccessSchema).query("loginActivity").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(loginActivitySchema).mutation("raiseBudget").withInput(raiseBudgetInputSchema).withOutput(raisedBudgetSchema).query("permissionPrompts").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.array(agentPermissionPromptSchema)).mutation("share").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).mutation("unshare").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).query("harnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(harnessLoginsSchema).mutation("saveHarnessLogin").withInput(saveHarnessLoginInputSchema).withOutput(harnessLoginsSchema).mutation("removeHarnessLogin").withInput(removeHarnessLoginInputSchema).withOutput(harnessLoginsSchema).query("listHarnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(harnessLoginListSchema).mutation("addHarnessLogin").withInput(addHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("renameHarnessLogin").withInput(renameHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("deleteHarnessLogin").withInput(deleteHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("checkLoginUsage").withInput(checkLoginUsageInputSchema).withOutput(loginUsageCheckSchema).query("loginPools").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(loginPoolsSchema).mutation("createLoginPool").withInput(createLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("renameLoginPool").withInput(renameLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("deleteLoginPool").withInput(loginPoolRefInputSchema).withOutput(loginPoolsSchema).mutation("addPoolLogin").withInput(addPoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("removePoolLogin").withInput(removePoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("setPoolMember").withInput(setPoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("removePoolMember").withInput(removePoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("setAgentPool").withInput(setAgentPoolInputSchema).withOutput(agentSchema).mutation("openDirect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.object({ channelId: idSchema19 })).mutation("startConversation").withInput(startConversationInputSchema).withOutput(startedConversationSchema).query("conversations").withInput(listConversationsInputSchema).withOutput(external_exports.array(conversationSummarySchema2)).mutation("joinConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("renameConversation").withInput(renameConversationInputSchema).withOutput(conversationSummarySchema2).mutation("leaveConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("deleteConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("mintLink").withInput(mintLinkInputSchema).withOutput(mintedLinkSchema).query("linkRedemption").withInput(linkRedemptionInputSchema).withOutput(linkRedemptionSchema).query("oauthRequest").withInput(oauthRequestInputSchema).withOutput(oauthRequestViewSchema).mutation("oauthApprove").withInput(approveOAuthInputSchema).withOutput(oauthRedirectSchema).mutation("oauthDeny").withInput(oauthRequestInputSchema).withOutput(oauthRedirectSchema).mutation("disconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.object({ disconnected: external_exports.literal(true) }).meta({ deprecated: true })).mutation("setGithub").withInput(setAgentGithubInputSchema).withOutput(agentSchema).query("githubWatches").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.array(agentGithubWatchSchema)).mutation("watchGithub").withInput(watchGithubInputSchema).withOutput(agentGithubWatchSchema).mutation("unwatchGithub").withInput(unwatchGithubInputSchema).withOutput(external_exports.object({ removed: external_exports.literal(true) })).build();
|
|
72570
72739
|
var agentTurnTrpc = defineTrpcContract("agents").mutation("answerAttention").withInput(answerAttentionInputSchema).withOutput(external_exports.object({ answered: external_exports.literal(true) })).query("attentionDetail").withInput(attentionDetailInputSchema).withOutput(attentionDetailSchema).mutation("stopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ stopped: external_exports.literal(true) })).query("mayStopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ allowed: external_exports.boolean() })).mutation("retryTurn").withInput(retryAgentTurnInputSchema).withOutput(external_exports.object({ retried: external_exports.literal(true) })).query("retryState").withInput(retryAgentTurnInputSchema).withOutput(agentRetryStateSchema).query("liveSteps").withInput(liveStepsInputSchema).withOutput(liveStepsSchema).query("workingNow").withInput(agentWorkingInputSchema).withOutput(agentWorkingSchema).mutation("compactSession").withInput(compactAgentSessionInputSchema).withOutput(external_exports.object({ requested: external_exports.literal(true) })).mutation("catchUp").withInput(startCatchUpInputSchema).withOutput(catchUpRunSchema).mutation("catchUpAsk").withInput(askCatchUpInputSchema).withOutput(catchUpRunSchema).query("catchUpRun").withInput(catchUpRunInputSchema).withOutput(catchUpRunSchema).mutation("catchUpStop").withInput(catchUpRunInputSchema).withOutput(catchUpRunSchema).mutation("restartComputer").withInput(restartAgentComputerInputSchema).withOutput(external_exports.object({ restarted: external_exports.boolean() })).build();
|
|
72571
72740
|
var agentChannelSettingsTrpc = defineTrpcContract("agents").query("monitors").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(external_exports.array(agentMonitorSchema)).query("channelLevel").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19, channelId: idSchema19 })).withOutput(channelLevelSchema).mutation("setChannelLevel").withInput(setChannelLevelInputSchema).withOutput(channelLevelSchema).mutation("unmuteChannel").withInput(unmuteAgentChannelInputSchema).withOutput(channelLevelSchema).mutation("cancelHeld").withInput(cancelHeldInputSchema).withOutput(cancelHeldResultSchema).mutation("useLazeModelsUntilReset").withInput(useLazeModelsUntilResetInputSchema).withOutput(lazeModelsUntilResetSchema).query("agentLoginChoices").withInput(agentLoginChoicesInputSchema).withOutput(agentLoginChoicesSchema).mutation("switchAgentLogin").withInput(switchAgentLoginInputSchema).withOutput(switchedAgentLoginSchema).build();
|
|
72572
72741
|
var agentJoinTrpc = defineTrpcContract("agents").query("joinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("approveJoinRequest").withInput(approveJoinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("denyJoinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).build();
|
|
@@ -72582,7 +72751,7 @@ var agentRunsOnTrpc = defineTrpcContract("agents").mutation("setRunsOn").withInp
|
|
|
72582
72751
|
var agentWelcomeTrpc = defineTrpcContract("agents").mutation("pressWelcome").withInput(pressWelcomeInputSchema).withOutput(pressedWelcomeSchema).mutation("pressCollab").withInput(pressCollabInputSchema).withOutput(pressedCollabSchema).build();
|
|
72583
72752
|
var agentPoolGroupTrpc = defineTrpcContract("agents").mutation("addPoolGroup").withInput(poolGroupInputSchema).withOutput(loginPoolsSchema).mutation("removePoolGroup").withInput(poolGroupInputSchema).withOutput(loginPoolsSchema).build();
|
|
72584
72753
|
var agentOpenConversationTrpc = defineTrpcContract("agents").mutation("openConversation").withInput(openConversationInputSchema).withOutput(external_exports.object({ channelId: idSchema19 })).build();
|
|
72585
|
-
var agentConversationCloseTrpc = defineTrpcContract("agents").mutation("closeConversation").withInput(conversationInputSchema).withOutput(
|
|
72754
|
+
var agentConversationCloseTrpc = defineTrpcContract("agents").mutation("closeConversation").withInput(conversationInputSchema).withOutput(toggledConversationSchema).mutation("reopenConversation").withInput(conversationInputSchema).withOutput(toggledConversationSchema).mutation("convertConversation").withInput(convertConversationInputSchema).withOutput(convertedConversationSchema).build();
|
|
72586
72755
|
var agentShareRequestTrpc = defineTrpcContract("agents").mutation("askShare").withInput(askAgentShareInputSchema).withOutput(agentAccessSchema).mutation("cancelShareAsk").withInput(cancelAgentShareAskInputSchema).withOutput(agentAccessSchema).build();
|
|
72587
72756
|
var agentUsageActivityTrpc = defineTrpcContract("agents").query("usageActivity").withInput(agentUsageActivityInputSchema).withOutput(agentUsageActivitySchema).query("monthSpend").withInput(agentMonthSpendInputSchema).withOutput(agentMonthSpendSchema).query("spendCuts").withInput(agentSpendInputSchema).withOutput(agentSpendCutsSchema).build();
|
|
72588
72757
|
var agentReconnectTrpc = defineTrpcContract("agents").query("reconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(agentReconnectSchema).build();
|
|
@@ -72622,6 +72791,7 @@ var AgentLiveStepsSlot = agentUi.component("liveSteps");
|
|
|
72622
72791
|
var AgentComputerRestoreSlot = agentUi.component("computerRestore");
|
|
72623
72792
|
var AgentCatchUpSlot = agentUi.component("catchUp");
|
|
72624
72793
|
var AgentSessionHooksToken = agentUi.hooks("session");
|
|
72794
|
+
var AgentTurnHooksToken = agentUi.hooks("turn");
|
|
72625
72795
|
var AgentSetupBannerSlot = agentUi.component("setupBanner");
|
|
72626
72796
|
var AgentChatStartHooksToken = agentUi.hooks("chatStart");
|
|
72627
72797
|
var AgentThingsToDoSlot = agentUi.component("thingsToDo");
|
|
@@ -74469,8 +74639,8 @@ async function periodStartOf({
|
|
|
74469
74639
|
);
|
|
74470
74640
|
return report3.from;
|
|
74471
74641
|
} catch {
|
|
74472
|
-
const
|
|
74473
|
-
return Temporal3.PlainDateTime.from({ year:
|
|
74642
|
+
const day3 = now.toZonedDateTimeISO("UTC");
|
|
74643
|
+
return Temporal3.PlainDateTime.from({ year: day3.year, month: day3.month, day: 1 }).toZonedDateTime("UTC").toInstant().toString();
|
|
74474
74644
|
}
|
|
74475
74645
|
}
|
|
74476
74646
|
async function agentsActivity({ context, args }) {
|
|
@@ -74700,10 +74870,10 @@ function whereOf(message2) {
|
|
|
74700
74870
|
}
|
|
74701
74871
|
function catchUpLinesOf(message2) {
|
|
74702
74872
|
if (!message2.catchUp) return [];
|
|
74703
|
-
const { count:
|
|
74873
|
+
const { count: count19, older } = message2.catchUp;
|
|
74704
74874
|
const where = whereOf(message2);
|
|
74705
74875
|
const lines2 = [
|
|
74706
|
-
`${
|
|
74876
|
+
`${count19} ${count19 === 1 ? "message" : "messages"} in ${where} while you were away.`
|
|
74707
74877
|
];
|
|
74708
74878
|
if (older === 0) return lines2;
|
|
74709
74879
|
const channel = message2.channelKind === "public" || message2.channelKind === "private";
|
|
@@ -74731,9 +74901,9 @@ function hookContextOf({
|
|
|
74731
74901
|
messages,
|
|
74732
74902
|
self: self2
|
|
74733
74903
|
}) {
|
|
74734
|
-
const
|
|
74904
|
+
const count19 = messages.length === 1 ? "A message" : `${messages.length} messages`;
|
|
74735
74905
|
return [
|
|
74736
|
-
`${
|
|
74906
|
+
`${count19} reached you in Laze${selfClauseOf({ self: self2 })}:`,
|
|
74737
74907
|
"",
|
|
74738
74908
|
...messages.map((message2) => formatInboxMessage({ message: message2 })),
|
|
74739
74909
|
"",
|
|
@@ -74748,7 +74918,7 @@ function selfClauseOf({ self: self2 }) {
|
|
|
74748
74918
|
function record2(value) {
|
|
74749
74919
|
return typeof value === "object" && value !== null ? value : {};
|
|
74750
74920
|
}
|
|
74751
|
-
function
|
|
74921
|
+
function count10(value) {
|
|
74752
74922
|
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
74753
74923
|
}
|
|
74754
74924
|
function parse3(line) {
|
|
@@ -74784,17 +74954,17 @@ function compactionOf({
|
|
|
74784
74954
|
return {
|
|
74785
74955
|
key: typeof entry2.uuid === "string" ? entry2.uuid : String(index),
|
|
74786
74956
|
trigger: meta3.trigger === "manual" ? "manual" : "auto",
|
|
74787
|
-
tokensBefore:
|
|
74788
|
-
tokensAfter:
|
|
74957
|
+
tokensBefore: count10(meta3.preTokens),
|
|
74958
|
+
tokensAfter: count10(meta3.postTokens),
|
|
74789
74959
|
at: typeof entry2.timestamp === "string" ? entry2.timestamp : "1970-01-01T00:00:00.000Z"
|
|
74790
74960
|
};
|
|
74791
74961
|
}
|
|
74792
74962
|
function usageOf({ entry: entry2 }) {
|
|
74793
74963
|
const message2 = record2(entry2.message);
|
|
74794
74964
|
const usage2 = record2(message2.usage);
|
|
74795
|
-
const input2 =
|
|
74965
|
+
const input2 = count10(usage2.input_tokens);
|
|
74796
74966
|
if (input2 === void 0) return void 0;
|
|
74797
|
-
const cached2 = (
|
|
74967
|
+
const cached2 = (count10(usage2.cache_read_input_tokens) ?? 0) + (count10(usage2.cache_creation_input_tokens) ?? 0);
|
|
74798
74968
|
return {
|
|
74799
74969
|
tokens: input2 + cached2,
|
|
74800
74970
|
...typeof message2.model === "string" ? { model: message2.model } : {}
|
|
@@ -75330,6 +75500,24 @@ var slackBotCleanupOutcomePayloadSchemaDefinition = external_exports.object({
|
|
|
75330
75500
|
slackChannelId: external_exports.string().min(1),
|
|
75331
75501
|
outcome: external_exports.enum(["left", "kept", "failed"])
|
|
75332
75502
|
});
|
|
75503
|
+
var slackPersonMatchedPayloadSchemaDefinition = external_exports.object({
|
|
75504
|
+
workspaceId: external_exports.string().min(1),
|
|
75505
|
+
teamId: external_exports.string().min(1),
|
|
75506
|
+
slackUserId: external_exports.string().min(1),
|
|
75507
|
+
userId: external_exports.string().min(1),
|
|
75508
|
+
by: external_exports.enum(["link", "email"])
|
|
75509
|
+
});
|
|
75510
|
+
var slackPersonUnmatchRequestedPayloadSchemaDefinition = external_exports.object({
|
|
75511
|
+
workspaceId: external_exports.string().min(1),
|
|
75512
|
+
teamId: external_exports.string().min(1),
|
|
75513
|
+
slackUserId: external_exports.string().min(1),
|
|
75514
|
+
operatorId: external_exports.string().min(1).max(200),
|
|
75515
|
+
runId: external_exports.string().min(1)
|
|
75516
|
+
});
|
|
75517
|
+
var slackPeopleMatchRequestedPayloadSchemaDefinition = external_exports.object({
|
|
75518
|
+
workspaceId: external_exports.string().min(1),
|
|
75519
|
+
runId: external_exports.string().min(1)
|
|
75520
|
+
});
|
|
75333
75521
|
var slackLinkedPayloadSchemaDefinition = external_exports.object({
|
|
75334
75522
|
workspaceId: external_exports.string().min(1),
|
|
75335
75523
|
/** The Laze person who finished the flow. */
|
|
@@ -75699,8 +75887,8 @@ var slackConfig = Config.define((c) => ({
|
|
|
75699
75887
|
}));
|
|
75700
75888
|
|
|
75701
75889
|
// ../../modules/slack/contract/src/slack-ops.ts
|
|
75702
|
-
var
|
|
75703
|
-
var
|
|
75890
|
+
var count11 = external_exports.number().int().nonnegative();
|
|
75891
|
+
var at3 = external_exports.iso.datetime();
|
|
75704
75892
|
var slackMirrorHealthDefinition = external_exports.object({
|
|
75705
75893
|
mirrors: external_exports.array(
|
|
75706
75894
|
external_exports.object({
|
|
@@ -75712,19 +75900,19 @@ var slackMirrorHealthDefinition = external_exports.object({
|
|
|
75712
75900
|
/** Shared with another organisation, such as a Slack Connect channel. */
|
|
75713
75901
|
external: external_exports.boolean(),
|
|
75714
75902
|
botMember: external_exports.boolean(),
|
|
75715
|
-
linkedMembers:
|
|
75716
|
-
cacheDays:
|
|
75717
|
-
backfilledAt:
|
|
75718
|
-
reconciledAt:
|
|
75903
|
+
linkedMembers: count11,
|
|
75904
|
+
cacheDays: count11,
|
|
75905
|
+
backfilledAt: at3.nullable(),
|
|
75906
|
+
reconciledAt: at3.nullable(),
|
|
75719
75907
|
/** Message links Laze holds for the conversation, both ways. */
|
|
75720
|
-
links:
|
|
75908
|
+
links: count11,
|
|
75721
75909
|
/** Thread roots Laze holds a reply of. */
|
|
75722
|
-
threads:
|
|
75910
|
+
threads: count11,
|
|
75723
75911
|
/** Roots whose Slack reply count, when last read, is above the replies Laze holds. */
|
|
75724
|
-
threadsShort:
|
|
75725
|
-
repliesShort:
|
|
75912
|
+
threadsShort: count11,
|
|
75913
|
+
repliesShort: count11,
|
|
75726
75914
|
/** Threads Laze holds whose root is older than the cache window. */
|
|
75727
|
-
oldThreads:
|
|
75915
|
+
oldThreads: count11
|
|
75728
75916
|
})
|
|
75729
75917
|
)
|
|
75730
75918
|
});
|
|
@@ -75735,10 +75923,10 @@ var DURATION = /^(\d+)\s*(m|min|mins|minutes?|h|hours?|d|days?)$/i;
|
|
|
75735
75923
|
function minutesOf({ text: text3 }) {
|
|
75736
75924
|
const match = DURATION.exec(text3.trim());
|
|
75737
75925
|
if (!match?.[1] || !match[2]) return null;
|
|
75738
|
-
const
|
|
75926
|
+
const count19 = Number(match[1]);
|
|
75739
75927
|
const unit = match[2].toLowerCase()[0];
|
|
75740
75928
|
const perUnit = { d: 1440, h: 60, m: 1 };
|
|
75741
|
-
const minutes =
|
|
75929
|
+
const minutes = count19 * (perUnit[unit ?? "m"] ?? 1);
|
|
75742
75930
|
return minutes > 0 ? minutes : null;
|
|
75743
75931
|
}
|
|
75744
75932
|
function muteTextOf({ mute }) {
|
|
@@ -75951,7 +76139,7 @@ function slackHitLines({
|
|
|
75951
76139
|
...link3 ? [` ${link3}`] : []
|
|
75952
76140
|
];
|
|
75953
76141
|
}
|
|
75954
|
-
var
|
|
76142
|
+
var count12 = (n) => `${n} message${n === 1 ? "" : "s"}`;
|
|
75955
76143
|
function slackSectionLines({
|
|
75956
76144
|
slack: slack2,
|
|
75957
76145
|
laze,
|
|
@@ -75964,7 +76152,7 @@ function slackSectionLines({
|
|
|
75964
76152
|
});
|
|
75965
76153
|
if (slack2.teams.some((team) => team.state === "searched")) {
|
|
75966
76154
|
const found = slack2.hits.length;
|
|
75967
|
-
lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${
|
|
76155
|
+
lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${count12(found)}`);
|
|
75968
76156
|
}
|
|
75969
76157
|
for (const hit of slack2.hits) lines2.push(...slackHitLines({ hit, laze, url: url2, workspaceId }), "");
|
|
75970
76158
|
return lines2;
|
|
@@ -75975,7 +76163,7 @@ function formatSearch({
|
|
|
75975
76163
|
workspaceId
|
|
75976
76164
|
}) {
|
|
75977
76165
|
const { laze, slack: slack2, query } = output2;
|
|
75978
|
-
const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${
|
|
76166
|
+
const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${count12(laze.hits.length)} for "${query}"`];
|
|
75979
76167
|
for (const hit of laze.hits) {
|
|
75980
76168
|
lines2.push(...lazeHitLines({ hit, laze, url: url2, workspaceId }), "");
|
|
75981
76169
|
}
|
|
@@ -76007,8 +76195,8 @@ function lastCallAtOf({ text: text3, command }) {
|
|
|
76007
76195
|
} catch {
|
|
76008
76196
|
continue;
|
|
76009
76197
|
}
|
|
76010
|
-
const
|
|
76011
|
-
if (
|
|
76198
|
+
const at9 = callAtOf({ entry: entry2, command });
|
|
76199
|
+
if (at9 !== null) return at9;
|
|
76012
76200
|
}
|
|
76013
76201
|
return null;
|
|
76014
76202
|
}
|
|
@@ -76031,7 +76219,7 @@ function newestIsSubagent({
|
|
|
76031
76219
|
session,
|
|
76032
76220
|
subagents
|
|
76033
76221
|
}) {
|
|
76034
|
-
const newest = Math.max(...subagents.map((
|
|
76222
|
+
const newest = Math.max(...subagents.map((at9) => at9 ?? Number.NEGATIVE_INFINITY));
|
|
76035
76223
|
return Number.isFinite(newest) && newest >= (session ?? Number.NEGATIVE_INFINITY);
|
|
76036
76224
|
}
|
|
76037
76225
|
|
|
@@ -76091,8 +76279,8 @@ import { appendFile, mkdir as mkdir2 } from "node:fs/promises";
|
|
|
76091
76279
|
import { dirname as dirname5, join as join6 } from "node:path";
|
|
76092
76280
|
async function logDelivery({ context, line }) {
|
|
76093
76281
|
const folder = join6(dirname5(context.environment.configPath), "connect");
|
|
76094
|
-
const
|
|
76095
|
-
const stamped = `${
|
|
76282
|
+
const at9 = Temporal3.Instant.fromEpochMilliseconds(context.nowMs());
|
|
76283
|
+
const stamped = `${at9.toString({ smallestUnit: "second" })} ${line}
|
|
76096
76284
|
`;
|
|
76097
76285
|
context.out(stamped);
|
|
76098
76286
|
await mkdir2(folder, { recursive: true, mode: 448 });
|
|
@@ -76162,11 +76350,11 @@ async function sessionNotesOf({
|
|
|
76162
76350
|
dropped.push(await dropStale({ context, pid, path, tell }));
|
|
76163
76351
|
continue;
|
|
76164
76352
|
}
|
|
76165
|
-
const
|
|
76353
|
+
const at9 = await stat2(path).then(
|
|
76166
76354
|
(info) => info.mtimeMs,
|
|
76167
76355
|
() => 0
|
|
76168
76356
|
);
|
|
76169
|
-
notes.push({ pid, note, standing, at:
|
|
76357
|
+
notes.push({ pid, note, standing, at: at9 });
|
|
76170
76358
|
}
|
|
76171
76359
|
return { notes: notes.toSorted((a, b) => b.at - a.at), dropped };
|
|
76172
76360
|
}
|
|
@@ -76436,9 +76624,9 @@ async function settleProfile({
|
|
|
76436
76624
|
const here = bound && bound.host === hostname5() ? bound.key : void 0;
|
|
76437
76625
|
return context.store.update((config2) => {
|
|
76438
76626
|
const sessions = config2.sessions ?? {};
|
|
76439
|
-
const
|
|
76627
|
+
const mine6 = Object.keys(sessions).filter((key) => sessions[key] === profile);
|
|
76440
76628
|
if (bound === null) {
|
|
76441
|
-
return { result: `${profile}: bound to no session in Laze; ${
|
|
76629
|
+
return { result: `${profile}: bound to no session in Laze; ${mine6.length} kept` };
|
|
76442
76630
|
}
|
|
76443
76631
|
const taken = here && sessions[here] && sessions[here] !== profile;
|
|
76444
76632
|
const kept = Object.fromEntries(
|
|
@@ -76446,7 +76634,7 @@ async function settleProfile({
|
|
|
76446
76634
|
);
|
|
76447
76635
|
const next = here && !taken ? { ...kept, [here]: profile } : kept;
|
|
76448
76636
|
const where = here ?? `${bound.key} on ${bound.host}`;
|
|
76449
|
-
const line = taken ? `${profile}: Laze binds it to ${here}, which this machine binds to ${sessions[here]}; left unbound here` : `${profile}: listens in ${where}; dropped ${
|
|
76637
|
+
const line = taken ? `${profile}: Laze binds it to ${here}, which this machine binds to ${sessions[here]}; left unbound here` : `${profile}: listens in ${where}; dropped ${mine6.filter((key) => key !== here).length} other sessions`;
|
|
76450
76638
|
return { result: line, config: { ...config2, sessions: next } };
|
|
76451
76639
|
});
|
|
76452
76640
|
}
|
|
@@ -76839,8 +77027,8 @@ var AT_USAGE = `--at takes a date and time such as 2026-10-20T09:00, read in --t
|
|
|
76839
77027
|
such as Europe/Amsterdam) or this machine's zone; a time with its own offset is taken as written.`;
|
|
76840
77028
|
var OFFSET = /(Z|[+-]\d{2}(:?\d{2})?)$/i;
|
|
76841
77029
|
var DATE_AND_TIME = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;
|
|
76842
|
-
function sendAtOf({ at:
|
|
76843
|
-
const text3 =
|
|
77030
|
+
function sendAtOf({ at: at9, timeZone }) {
|
|
77031
|
+
const text3 = at9.trim();
|
|
76844
77032
|
if (!DATE_AND_TIME.test(text3)) return null;
|
|
76845
77033
|
try {
|
|
76846
77034
|
if (OFFSET.test(text3)) return Temporal3.Instant.from(text3.replace(" ", "T")).toString();
|
|
@@ -76904,9 +77092,9 @@ function scheduleAtOf({
|
|
|
76904
77092
|
usage: usage2
|
|
76905
77093
|
}) {
|
|
76906
77094
|
if (args.flags.at === void 0 && args.flags.tz === void 0) return null;
|
|
76907
|
-
const
|
|
77095
|
+
const at9 = flagText({ args, name: "at" });
|
|
76908
77096
|
const timeZone = flagText({ args, name: "tz" }) || currentTimeZone();
|
|
76909
|
-
const sendAt =
|
|
77097
|
+
const sendAt = at9 ? sendAtOf({ at: at9, timeZone }) : null;
|
|
76910
77098
|
if (!sendAt) throw new CliUsageError(`${usage2}
|
|
76911
77099
|
${AT_USAGE}`);
|
|
76912
77100
|
return { sendAt, timeZone };
|
|
@@ -76915,19 +77103,19 @@ async function scheduleMessage({
|
|
|
76915
77103
|
context,
|
|
76916
77104
|
args,
|
|
76917
77105
|
client,
|
|
76918
|
-
at:
|
|
77106
|
+
at: at9,
|
|
76919
77107
|
target,
|
|
76920
77108
|
body
|
|
76921
77109
|
}) {
|
|
76922
77110
|
const scheduled2 = await client.post("/api/agents/me/scheduled", {
|
|
76923
77111
|
...target,
|
|
76924
77112
|
body,
|
|
76925
|
-
sendAt:
|
|
77113
|
+
sendAt: at9.sendAt,
|
|
76926
77114
|
..."replyTo" in target && args.flags["also-channel"] === true ? { alsoInChannel: true } : {}
|
|
76927
77115
|
});
|
|
76928
77116
|
if (args.flags.json) context.out(`${JSON.stringify(scheduled2, null, 2)}
|
|
76929
77117
|
`);
|
|
76930
|
-
else context.out(scheduledLine({ scheduled: scheduled2, timeZone:
|
|
77118
|
+
else context.out(scheduledLine({ scheduled: scheduled2, timeZone: at9.timeZone }));
|
|
76931
77119
|
return void 0;
|
|
76932
77120
|
}
|
|
76933
77121
|
var USAGE = "Usage: laze scheduled [--channel <channel>] [--json], laze scheduled send|cancel <id>, laze scheduled edit <id> [--text <text|->] [--at <time> [--tz <zone>]]";
|
|
@@ -76968,18 +77156,18 @@ async function editOne({
|
|
|
76968
77156
|
args,
|
|
76969
77157
|
id: id8
|
|
76970
77158
|
}) {
|
|
76971
|
-
const
|
|
77159
|
+
const at9 = scheduleAtOf({ args, usage: EDIT_USAGE });
|
|
76972
77160
|
const body = await newTextOf({ context, args });
|
|
76973
|
-
if (!
|
|
77161
|
+
if (!at9 && body === void 0) throw new CliUsageError(EDIT_USAGE);
|
|
76974
77162
|
const { client } = await signedIn({ context, args });
|
|
76975
77163
|
const edited = await client.post("/api/agents/me/scheduled/edit", {
|
|
76976
77164
|
scheduledId: id8,
|
|
76977
77165
|
...body === void 0 ? {} : { body },
|
|
76978
|
-
...
|
|
77166
|
+
...at9 ? { sendAt: at9.sendAt } : {}
|
|
76979
77167
|
});
|
|
76980
77168
|
if (args.flags.json) return context.out(`${JSON.stringify(edited, null, 2)}
|
|
76981
77169
|
`);
|
|
76982
|
-
const timeZone =
|
|
77170
|
+
const timeZone = at9?.timeZone ?? currentTimeZone();
|
|
76983
77171
|
context.out(scheduledLine({ scheduled: edited, timeZone }).replace(/^Scheduled /, "Updated "));
|
|
76984
77172
|
}
|
|
76985
77173
|
async function actOn({
|
|
@@ -77187,12 +77375,12 @@ async function filesOf({
|
|
|
77187
77375
|
context,
|
|
77188
77376
|
args,
|
|
77189
77377
|
client,
|
|
77190
|
-
at:
|
|
77378
|
+
at: at9,
|
|
77191
77379
|
channel
|
|
77192
77380
|
}) {
|
|
77193
77381
|
const sources = fileSourcesOf({ args, what: "A message" });
|
|
77194
77382
|
if (sources.length === 0) return {};
|
|
77195
|
-
if (
|
|
77383
|
+
if (at9) throw new CliUsageError("A scheduled message (--at) cannot carry --image or --file yet");
|
|
77196
77384
|
const attachmentIds = await attachmentIdsOf({ context, client, sources, channel });
|
|
77197
77385
|
return { attachmentIds };
|
|
77198
77386
|
}
|
|
@@ -77211,17 +77399,17 @@ async function post({
|
|
|
77211
77399
|
}) {
|
|
77212
77400
|
const channel = args.words[1];
|
|
77213
77401
|
if (!channel) throw new CliUsageError(POST_USAGE);
|
|
77214
|
-
const
|
|
77402
|
+
const at9 = scheduleAtOf({ args, usage: POST_USAGE });
|
|
77215
77403
|
const { client, profile } = await signedIn({ context, args });
|
|
77216
77404
|
const typed = await textOf({ context, args, from: 2 });
|
|
77217
77405
|
const leaves = leavesLazeOf({ client, channel });
|
|
77218
77406
|
const body = await textToSend({ context, args, profile, client, text: typed, leaves });
|
|
77219
77407
|
const thread2 = flagText({ args, name: "thread" });
|
|
77220
77408
|
const via = viaOf({ args, usage: POST_USAGE });
|
|
77221
|
-
const files3 = await filesOf({ context, args, client, at:
|
|
77222
|
-
if (
|
|
77409
|
+
const files3 = await filesOf({ context, args, client, at: at9, channel: async () => channel });
|
|
77410
|
+
if (at9) {
|
|
77223
77411
|
const target = { channel, ...thread2 ? { threadRootId: thread2 } : {} };
|
|
77224
|
-
return scheduleMessage({ context, args, client, at:
|
|
77412
|
+
return scheduleMessage({ context, args, client, at: at9, target, body });
|
|
77225
77413
|
}
|
|
77226
77414
|
const posted = await keyedPost({
|
|
77227
77415
|
client,
|
|
@@ -77253,7 +77441,7 @@ async function reply({
|
|
|
77253
77441
|
}) {
|
|
77254
77442
|
const messageId = args.words[1];
|
|
77255
77443
|
if (!messageId) throw new CliUsageError(REPLY_USAGE);
|
|
77256
|
-
const
|
|
77444
|
+
const at9 = scheduleAtOf({ args, usage: REPLY_USAGE });
|
|
77257
77445
|
const { client, profile, name: name3 } = await signedIn({ context, args });
|
|
77258
77446
|
const channel = flagText({ args, name: "channel" });
|
|
77259
77447
|
const via = viaOf({ args, usage: REPLY_USAGE });
|
|
@@ -77264,11 +77452,11 @@ async function reply({
|
|
|
77264
77452
|
context,
|
|
77265
77453
|
args,
|
|
77266
77454
|
client,
|
|
77267
|
-
at:
|
|
77455
|
+
at: at9,
|
|
77268
77456
|
channel: () => replyChannelOf({ client, messageId, channel })
|
|
77269
77457
|
});
|
|
77270
|
-
if (
|
|
77271
|
-
return scheduleMessage({ context, args, client, at:
|
|
77458
|
+
if (at9) {
|
|
77459
|
+
return scheduleMessage({ context, args, client, at: at9, target: { replyTo: messageId }, body });
|
|
77272
77460
|
}
|
|
77273
77461
|
const posted = await keyedPost({
|
|
77274
77462
|
client,
|
|
@@ -77442,8 +77630,8 @@ function windowOf2(value) {
|
|
|
77442
77630
|
return Number.isInteger(tokens) && tokens > 0 ? tokens : void 0;
|
|
77443
77631
|
}
|
|
77444
77632
|
function modelFlagOf(args) {
|
|
77445
|
-
const
|
|
77446
|
-
if (
|
|
77633
|
+
const at9 = args?.indexOf("--model") ?? -1;
|
|
77634
|
+
if (at9 >= 0) return args?.[at9 + 1];
|
|
77447
77635
|
return args?.find((arg) => arg.startsWith("--model="))?.slice("--model=".length);
|
|
77448
77636
|
}
|
|
77449
77637
|
async function claudeRunOf({
|
|
@@ -78312,7 +78500,7 @@ var openclawAgentKeySchemaDefinition = external_exports.object({
|
|
|
78312
78500
|
});
|
|
78313
78501
|
var openclawAgentKeySchema = openclawAgentKeySchemaDefinition;
|
|
78314
78502
|
var OpenclawApi = moduleApi()("openclaw");
|
|
78315
|
-
var openclawTrpc = defineTrpcContract("openclaw").query("overview").withInput(external_exports.object({ workspaceId: workspaceIdSchema18 })).withOutput(openclawOverviewSchema).mutation("connect").withInput(connectOpenclawInputSchema).withOutput(openclawConnectionViewSchema).mutation("setAgent").withInput(setOpenclawAgentInputSchema).withOutput(openclawConnectionViewSchema).mutation("setFeed").withInput(setOpenclawFeedInputSchema).withOutput(openclawConnectionViewSchema).mutation("agentKey").withInput(openclawAgentRefSchema).withOutput(openclawAgentKeySchema).mutation("disconnect").withInput(openclawConnectionRefSchema).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).build();
|
|
78503
|
+
var openclawTrpc = defineTrpcContract("openclaw").query("overview").withInput(external_exports.object({ workspaceId: workspaceIdSchema18 })).withOutput(openclawOverviewSchema).mutation("connect").withInput(connectOpenclawInputSchema).withOutput(openclawConnectionViewSchema).mutation("setAgent").withInput(setOpenclawAgentInputSchema).withOutput(openclawConnectionViewSchema).mutation("setFeed").withInput(setOpenclawFeedInputSchema).withOutput(openclawConnectionViewSchema).mutation("agentKey").withInput(openclawAgentRefSchema).withOutput(openclawAgentKeySchema.meta({ deprecated: true })).mutation("disconnect").withInput(openclawConnectionRefSchema).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).build();
|
|
78316
78504
|
|
|
78317
78505
|
// ../../modules/openclaw/contract/src/openclaw.config.ts
|
|
78318
78506
|
var positiveInt5 = external_exports.coerce.number().int().positive();
|
|
@@ -78763,8 +78951,8 @@ async function waiterOf({
|
|
|
78763
78951
|
}) {
|
|
78764
78952
|
const lock = statePathOf({ context, kind: "waiters", profile });
|
|
78765
78953
|
const waiter = await jsonOf(lock);
|
|
78766
|
-
const
|
|
78767
|
-
return waiter &&
|
|
78954
|
+
const mine6 = waiter?.sessionId === key.slice(key.indexOf(":") + 1);
|
|
78955
|
+
return waiter && mine6 && context.processes.alive(waiter.pid) ? waiter.pid : void 0;
|
|
78768
78956
|
}
|
|
78769
78957
|
async function rearmRushGuards({ context }) {
|
|
78770
78958
|
let started = 0;
|
|
@@ -79563,8 +79751,8 @@ async function takeLock({
|
|
|
79563
79751
|
const self2 = context.processes.pid;
|
|
79564
79752
|
if (holder && holder.pid !== self2 && context.processes.alive(holder.pid)) {
|
|
79565
79753
|
const served = await holderClaudeOf({ context, holder });
|
|
79566
|
-
const
|
|
79567
|
-
if (served && context.processes.alive(served) && !
|
|
79754
|
+
const mine6 = preempt && served === claudePid && !holder.monitor;
|
|
79755
|
+
if (served && context.processes.alive(served) && !mine6) return false;
|
|
79568
79756
|
context.processes.stop(holder.pid);
|
|
79569
79757
|
}
|
|
79570
79758
|
const value = {
|
|
@@ -80451,6 +80639,8 @@ Your owner keeps API keys and passwords in the Laze vault. Use them only through
|
|
|
80451
80639
|
- \`laze vault run <name> --reason "<one plain sentence>" -- <command>\` runs the command with the
|
|
80452
80640
|
key's fields as environment variables. To put a value in an argument, let a shell expand it
|
|
80453
80641
|
inside the run: \`-- sh -c 'curl -H "Authorization: Bearer $OPENAI_API_KEY" <url>'\`.
|
|
80642
|
+
When a command needs several keys, name them all in one run (\`laze vault run a b c --reason ...\`):
|
|
80643
|
+
your owner answers one card instead of one per key.
|
|
80454
80644
|
- \`laze vault env --reason "<one plain sentence>" -- <command>\` runs it with every key a
|
|
80455
80645
|
\`.env.vault\` file names (\`--env <x>\` reads \`.env.<x>.vault\`, \`--names\` shows what each line
|
|
80456
80646
|
resolves to, never a value).
|
|
@@ -80939,10 +81129,10 @@ var SESSION_SCRUB_MAX_LINE = VAULT_SESSION_SCRUB_MAX_LINE;
|
|
|
80939
81129
|
function completeLinesOf({ chunk, from }) {
|
|
80940
81130
|
const lines2 = [];
|
|
80941
81131
|
let start2 = 0;
|
|
80942
|
-
for (let
|
|
80943
|
-
const text3 = chunk.subarray(start2,
|
|
80944
|
-
lines2.push({ at: from + start2, text: text3, bytes:
|
|
80945
|
-
start2 =
|
|
81132
|
+
for (let at9 = chunk.indexOf(10); at9 !== -1; at9 = chunk.indexOf(10, start2)) {
|
|
81133
|
+
const text3 = chunk.subarray(start2, at9).toString("utf8");
|
|
81134
|
+
lines2.push({ at: from + start2, text: text3, bytes: at9 - start2 });
|
|
81135
|
+
start2 = at9 + 1;
|
|
80946
81136
|
}
|
|
80947
81137
|
return { lines: lines2, end: from + start2 };
|
|
80948
81138
|
}
|
|
@@ -81018,9 +81208,9 @@ async function writeBack({ file: file4, rewrites }) {
|
|
|
81018
81208
|
let cursor = first.line.at;
|
|
81019
81209
|
let moved = 0;
|
|
81020
81210
|
for (const { line, text: text3 } of grown) {
|
|
81021
|
-
const
|
|
81022
|
-
const original = tail.subarray(
|
|
81023
|
-
parts.push(tail.subarray(cursor - first.line.at,
|
|
81211
|
+
const at9 = line.at - first.line.at;
|
|
81212
|
+
const original = tail.subarray(at9, at9 + line.bytes);
|
|
81213
|
+
parts.push(tail.subarray(cursor - first.line.at, at9));
|
|
81024
81214
|
const keep2 = !original.equals(Buffer3.from(line.text));
|
|
81025
81215
|
parts.push(keep2 ? original : Buffer3.from(text3));
|
|
81026
81216
|
if (!keep2) moved += Buffer3.byteLength(text3) - line.bytes;
|
|
@@ -81038,10 +81228,10 @@ async function pastLongLine({
|
|
|
81038
81228
|
size
|
|
81039
81229
|
}) {
|
|
81040
81230
|
const chunk = Buffer3.alloc(SESSION_SCRUB_READ_BYTES);
|
|
81041
|
-
for (let
|
|
81042
|
-
const { bytesRead } = await file4.read(chunk, 0, chunk.length,
|
|
81231
|
+
for (let at9 = from; at9 < size; at9 += chunk.length) {
|
|
81232
|
+
const { bytesRead } = await file4.read(chunk, 0, chunk.length, at9);
|
|
81043
81233
|
const newline = chunk.subarray(0, bytesRead).indexOf(10);
|
|
81044
|
-
if (newline !== -1) return
|
|
81234
|
+
if (newline !== -1) return at9 + newline + 1;
|
|
81045
81235
|
}
|
|
81046
81236
|
return from;
|
|
81047
81237
|
}
|
|
@@ -83880,8 +84070,13 @@ var appMemberSourceSchemaDefinition = external_exports.object({
|
|
|
83880
84070
|
]),
|
|
83881
84071
|
/** The channel, for `channel`: a pin there, a share with it, or the app's own channel. */
|
|
83882
84072
|
channelId: external_exports.string().nullable(),
|
|
83883
|
-
/**
|
|
84073
|
+
/**
|
|
84074
|
+
* The channel's name, or `@name` of the group for `group`. For a direct message, group or agent
|
|
84075
|
+
* conversation, the names of its members besides the reader. Null when the reader cannot see it.
|
|
84076
|
+
*/
|
|
83884
84077
|
channelName: external_exports.string().nullable(),
|
|
84078
|
+
/** The conversation's kind, for `channel`: a `#name` only for public and private channels. */
|
|
84079
|
+
channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]).nullable().optional(),
|
|
83885
84080
|
/** Unused since agents stopped holding apps through their owner; always null. */
|
|
83886
84081
|
ownerName: external_exports.string().nullable()
|
|
83887
84082
|
});
|
|
@@ -84359,9 +84554,9 @@ function formatAppMoney({
|
|
|
84359
84554
|
maximumFractionDigits: tiny ? 4 : 2
|
|
84360
84555
|
}).format(amount);
|
|
84361
84556
|
}
|
|
84362
|
-
var
|
|
84557
|
+
var count13 = new Intl.NumberFormat("en-US");
|
|
84363
84558
|
function plural2({ value, one, many }) {
|
|
84364
|
-
return `${
|
|
84559
|
+
return `${count13.format(value)} ${value === 1 ? one : many}`;
|
|
84365
84560
|
}
|
|
84366
84561
|
function appCostQuantityText(line) {
|
|
84367
84562
|
const { quantity } = line;
|
|
@@ -85644,19 +85839,19 @@ function buildFileOf({ path, bytes }) {
|
|
|
85644
85839
|
}
|
|
85645
85840
|
var WEEKDAYS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
|
|
85646
85841
|
function whenLabel({
|
|
85647
|
-
at:
|
|
85842
|
+
at: at9,
|
|
85648
85843
|
now,
|
|
85649
85844
|
timeZone
|
|
85650
85845
|
}) {
|
|
85651
85846
|
const zone = { timeZone: timeZone ?? currentTimeZone() };
|
|
85652
|
-
const days = differenceInCalendarDays(now.epochMilliseconds,
|
|
85653
|
-
const time3 = format(
|
|
85847
|
+
const days = differenceInCalendarDays(now.epochMilliseconds, at9, zone);
|
|
85848
|
+
const time3 = format(at9, "HH:mm", zone);
|
|
85654
85849
|
if (days === 0) return `Today ${time3}`;
|
|
85655
85850
|
if (days === 1) return `Yesterday ${time3}`;
|
|
85656
85851
|
if (days > 1 && days < 7) {
|
|
85657
|
-
return `${WEEKDAYS[toZonedDateTime(
|
|
85852
|
+
return `${WEEKDAYS[toZonedDateTime(at9, zone).dayOfWeek - 1] ?? ""} ${time3}`;
|
|
85658
85853
|
}
|
|
85659
|
-
return format(
|
|
85854
|
+
return format(at9, "d MMM HH:mm", zone);
|
|
85660
85855
|
}
|
|
85661
85856
|
function versionLine({
|
|
85662
85857
|
version: version2,
|
|
@@ -85671,8 +85866,8 @@ function versionLine({
|
|
|
85671
85866
|
}
|
|
85672
85867
|
function messageOf({ args }) {
|
|
85673
85868
|
const words = [...args.words];
|
|
85674
|
-
const
|
|
85675
|
-
const short =
|
|
85869
|
+
const at9 = words.indexOf("-m");
|
|
85870
|
+
const short = at9 >= 0 ? words.splice(at9, 2)[1] ?? "" : "";
|
|
85676
85871
|
const long = typeof args.flags.message === "string" ? args.flags.message : "";
|
|
85677
85872
|
return { message: (short || long).trim(), words };
|
|
85678
85873
|
}
|
|
@@ -85728,19 +85923,19 @@ async function h264LevelOf(path) {
|
|
|
85728
85923
|
try {
|
|
85729
85924
|
const { size } = await file4.stat();
|
|
85730
85925
|
const head = Buffer.alloc(16);
|
|
85731
|
-
for (let
|
|
85732
|
-
await file4.read(head, 0, 16,
|
|
85926
|
+
for (let at9 = 0; at9 + 8 <= size; ) {
|
|
85927
|
+
await file4.read(head, 0, 16, at9);
|
|
85733
85928
|
let length = head.readUInt32BE(0);
|
|
85734
85929
|
if (length === 1) length = Number(head.readBigUInt64BE(8));
|
|
85735
|
-
if (length === 0) length = size -
|
|
85930
|
+
if (length === 0) length = size - at9;
|
|
85736
85931
|
if (length < 8) return null;
|
|
85737
85932
|
if (head.toString("latin1", 4, 8) === "moov") {
|
|
85738
85933
|
const moov = Buffer.alloc(Math.min(length, 64 * 1024 * 1024));
|
|
85739
|
-
await file4.read(moov, 0, moov.byteLength,
|
|
85934
|
+
await file4.read(moov, 0, moov.byteLength, at9);
|
|
85740
85935
|
const box = moov.indexOf("avcC", 0, "latin1");
|
|
85741
85936
|
return box === -1 || box + 8 > moov.byteLength ? null : moov[box + 7] ?? null;
|
|
85742
85937
|
}
|
|
85743
|
-
|
|
85938
|
+
at9 += length;
|
|
85744
85939
|
}
|
|
85745
85940
|
return null;
|
|
85746
85941
|
} finally {
|
|
@@ -86036,7 +86231,9 @@ async function handedOut({
|
|
|
86036
86231
|
}
|
|
86037
86232
|
|
|
86038
86233
|
// src/services/vault-commands.service.ts
|
|
86039
|
-
var USAGE4 = `Usage: laze vault run <connection
|
|
86234
|
+
var USAGE4 = `Usage: laze vault run <connection>... --reason "<one plain sentence>" [--wait <s>] [--real-value] -- <command> [args...]
|
|
86235
|
+
Name every key the command needs in one run: they ask on one card. Runs nested in each other
|
|
86236
|
+
(laze vault run a -- laze vault run b -- cmd) are read as one run of both keys.
|
|
86040
86237
|
Runs the command with the connection's values in its environment, on a Laze agent's computer,
|
|
86041
86238
|
on a machine it runs on, where a connected agent runs, or signed in as yourself, where it asks
|
|
86042
86239
|
as the calling Claude Code, Codex, Kanban or terminal session.
|
|
@@ -86163,17 +86360,17 @@ async function releaseOf({ response }) {
|
|
|
86163
86360
|
return JSON.parse(text3);
|
|
86164
86361
|
}
|
|
86165
86362
|
async function envOf({
|
|
86166
|
-
release:
|
|
86363
|
+
release: release3,
|
|
86167
86364
|
run: run4
|
|
86168
86365
|
}) {
|
|
86169
|
-
if (!
|
|
86366
|
+
if (!release3.sealed) return release3.env;
|
|
86170
86367
|
const sealed = await openRunRelease({
|
|
86171
|
-
release:
|
|
86368
|
+
release: release3.sealed,
|
|
86172
86369
|
runPrivateKey: run4.privateKey,
|
|
86173
86370
|
runPublicKey: run4.publicKey,
|
|
86174
|
-
requestId:
|
|
86371
|
+
requestId: release3.sealed.requestId
|
|
86175
86372
|
});
|
|
86176
|
-
return { ...
|
|
86373
|
+
return { ...release3.env, ...sealed };
|
|
86177
86374
|
}
|
|
86178
86375
|
function deadlineOf({ args, nowMs: nowMs2 }) {
|
|
86179
86376
|
const wait = flagText({ args, name: "wait" }) || (args.flags.wait === true ? args.words[3] : "");
|
|
@@ -86188,27 +86385,27 @@ async function untilAnswered({
|
|
|
86188
86385
|
next,
|
|
86189
86386
|
deadline
|
|
86190
86387
|
}) {
|
|
86191
|
-
let
|
|
86192
|
-
while (
|
|
86388
|
+
let release3 = first;
|
|
86389
|
+
while (release3.outcome === "ask") {
|
|
86193
86390
|
if (context.nowMs() + POLL_MS > deadline) {
|
|
86194
|
-
context.err(`${
|
|
86391
|
+
context.err(`${release3.message}. Not approved yet; ask again later.
|
|
86195
86392
|
`);
|
|
86196
86393
|
return "capped";
|
|
86197
86394
|
}
|
|
86198
|
-
if (
|
|
86199
|
-
context.err(`${
|
|
86395
|
+
if (release3 === first) {
|
|
86396
|
+
context.err(`${release3.message}. Waiting for an answer (cards expire after 24 hours)...
|
|
86200
86397
|
`);
|
|
86201
86398
|
}
|
|
86202
86399
|
await context.sleep(POLL_MS);
|
|
86203
|
-
|
|
86400
|
+
release3 = await next(release3.requestId);
|
|
86204
86401
|
}
|
|
86205
|
-
return
|
|
86402
|
+
return release3;
|
|
86206
86403
|
}
|
|
86207
86404
|
function leaseHolds({
|
|
86208
|
-
release:
|
|
86405
|
+
release: release3,
|
|
86209
86406
|
nowMs: nowMs2
|
|
86210
86407
|
}) {
|
|
86211
|
-
const ends =
|
|
86408
|
+
const ends = release3.sealed?.leaseEndsAt;
|
|
86212
86409
|
return ends !== void 0 && Temporal3.Instant.from(ends).epochMilliseconds > nowMs2;
|
|
86213
86410
|
}
|
|
86214
86411
|
function standInFieldsOf({
|
|
@@ -86247,7 +86444,7 @@ async function vaultRelease({
|
|
|
86247
86444
|
...value && { value: true },
|
|
86248
86445
|
...realValue && { realValue: true }
|
|
86249
86446
|
});
|
|
86250
|
-
let
|
|
86447
|
+
let release3;
|
|
86251
86448
|
try {
|
|
86252
86449
|
const first = await releaseOf({
|
|
86253
86450
|
response: await reach({
|
|
@@ -86263,33 +86460,33 @@ async function vaultRelease({
|
|
|
86263
86460
|
init: { method: "GET", headers }
|
|
86264
86461
|
})
|
|
86265
86462
|
});
|
|
86266
|
-
|
|
86463
|
+
release3 = await untilAnswered({ context, first, next, deadline });
|
|
86267
86464
|
} catch (error63) {
|
|
86268
86465
|
if (!(error63 instanceof ServerGoneError)) throw error63;
|
|
86269
86466
|
context.err(`${error63.message}. Run the command again to keep waiting.
|
|
86270
86467
|
`);
|
|
86271
86468
|
return { exitCode: 75 };
|
|
86272
86469
|
}
|
|
86273
|
-
return settled2({ context, release:
|
|
86470
|
+
return settled2({ context, release: release3, run: run4, keyPath });
|
|
86274
86471
|
}
|
|
86275
86472
|
async function settled2({
|
|
86276
86473
|
context,
|
|
86277
|
-
release:
|
|
86474
|
+
release: release3,
|
|
86278
86475
|
run: run4,
|
|
86279
86476
|
keyPath
|
|
86280
86477
|
}) {
|
|
86281
|
-
if (
|
|
86282
|
-
if (
|
|
86478
|
+
if (release3 === "capped") return { exitCode: 75 };
|
|
86479
|
+
if (release3.outcome === "deny") {
|
|
86283
86480
|
await rm11(keyPath, { force: true });
|
|
86284
|
-
context.err(`${
|
|
86481
|
+
context.err(`${release3.message}
|
|
86285
86482
|
`);
|
|
86286
|
-
return { exitCode:
|
|
86483
|
+
return { exitCode: release3.exitCode || 1 };
|
|
86287
86484
|
}
|
|
86288
|
-
const values = await envOf({ release:
|
|
86289
|
-
if (!leaseHolds({ release:
|
|
86290
|
-
if (
|
|
86485
|
+
const values = await envOf({ release: release3, run: run4 });
|
|
86486
|
+
if (!leaseHolds({ release: release3, nowMs: context.nowMs() })) await rm11(keyPath, { force: true });
|
|
86487
|
+
if (release3.message) context.err(`${release3.message}
|
|
86291
86488
|
`);
|
|
86292
|
-
return { env: values, ...
|
|
86489
|
+
return { env: values, ...release3.boundary && { boundary: release3.boundary } };
|
|
86293
86490
|
}
|
|
86294
86491
|
function refusedRelease(error63) {
|
|
86295
86492
|
if (!(error63 instanceof LazeApiError)) throw error63;
|
|
@@ -86348,8 +86545,8 @@ async function keyRelease({
|
|
|
86348
86545
|
giveUpAt: deadline,
|
|
86349
86546
|
call: () => client.post(door.status, { requestId, ...door.extra })
|
|
86350
86547
|
}).catch(refusedRelease);
|
|
86351
|
-
const
|
|
86352
|
-
return settled2({ context, release:
|
|
86548
|
+
const release3 = await untilAnswered({ context, first, next, deadline });
|
|
86549
|
+
return settled2({ context, release: release3, run: run4, keyPath });
|
|
86353
86550
|
}
|
|
86354
86551
|
async function vaultRun({
|
|
86355
86552
|
context,
|
|
@@ -86460,8 +86657,8 @@ function channelOf({ context, args }) {
|
|
|
86460
86657
|
const channel = flagText({ args, name: "channel" }) || context.environment.inherited.LAZE_CHANNEL;
|
|
86461
86658
|
return channel ? { channel } : {};
|
|
86462
86659
|
}
|
|
86463
|
-
function word({ args, at:
|
|
86464
|
-
const value = args.words[
|
|
86660
|
+
function word({ args, at: at9 }) {
|
|
86661
|
+
const value = args.words[at9];
|
|
86465
86662
|
if (!value) throw new CliUsageError(BROWSER_TAB_USAGE);
|
|
86466
86663
|
return value;
|
|
86467
86664
|
}
|
|
@@ -87260,8 +87457,8 @@ function json2({
|
|
|
87260
87457
|
function withServeThemeScript(page) {
|
|
87261
87458
|
const head = /<head(\s[^>]*)?>/i.exec(page);
|
|
87262
87459
|
if (!head) return THEME_SCRIPT + page;
|
|
87263
|
-
const
|
|
87264
|
-
return page.slice(0,
|
|
87460
|
+
const at9 = head.index + head[0].length;
|
|
87461
|
+
return page.slice(0, at9) + THEME_SCRIPT + page.slice(at9);
|
|
87265
87462
|
}
|
|
87266
87463
|
async function staticFile({
|
|
87267
87464
|
folder,
|
|
@@ -87835,7 +88032,7 @@ var appWrite = async ({ context, args }) => {
|
|
|
87835
88032
|
});
|
|
87836
88033
|
};
|
|
87837
88034
|
function seedLine(seeded) {
|
|
87838
|
-
const created = Object.entries(seeded.created).map(([name3,
|
|
88035
|
+
const created = Object.entries(seeded.created).map(([name3, count19]) => `${count19} in ${name3}`);
|
|
87839
88036
|
const parts = [
|
|
87840
88037
|
created.length ? `Loaded starter records: ${created.join(", ")}.` : "",
|
|
87841
88038
|
seeded.skipped.length ? `Left ${seeded.skipped.join(", ")} as it was: it already holds records.` : ""
|
|
@@ -88161,8 +88358,8 @@ function cardLine({ choice }) {
|
|
|
88161
88358
|
var appCard = async ({ context, args }) => {
|
|
88162
88359
|
const client = await appClient({ context, args });
|
|
88163
88360
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
|
|
88164
|
-
const
|
|
88165
|
-
if (!Number.isInteger(
|
|
88361
|
+
const count19 = Number(flagText({ args, name: "rows", fallback: "5" }));
|
|
88362
|
+
if (!Number.isInteger(count19) || count19 < 1 || count19 > 10) {
|
|
88166
88363
|
throw new CliUsageError("--rows is a whole number from 1 to 10");
|
|
88167
88364
|
}
|
|
88168
88365
|
const text3 = (name3) => flagText({ args, name: name3 }) || null;
|
|
@@ -88175,7 +88372,7 @@ var appCard = async ({ context, args }) => {
|
|
|
88175
88372
|
collection: text3("collection"),
|
|
88176
88373
|
filter: flagText({ args, name: "where" }) || flagText({ args, name: "filter" }),
|
|
88177
88374
|
sort: flagText({ args, name: "sort" }),
|
|
88178
|
-
rows:
|
|
88375
|
+
rows: count19,
|
|
88179
88376
|
caption: text3("caption")
|
|
88180
88377
|
}
|
|
88181
88378
|
});
|
|
@@ -89798,17 +89995,17 @@ async function screen({ context, args }) {
|
|
|
89798
89995
|
async function status3({ context, args }) {
|
|
89799
89996
|
const client = await computeClient({ context, args });
|
|
89800
89997
|
const wanted = args.words[2];
|
|
89801
|
-
const
|
|
89998
|
+
const machines2 = (await client.get(PATHS2.machines)).filter(
|
|
89802
89999
|
(machine2) => (machine2.type !== "own" || machine2.sites.length > 0) && (!wanted || machine2.name === wanted)
|
|
89803
90000
|
);
|
|
89804
|
-
if (args.flags.json) return context.out(`${JSON.stringify(
|
|
90001
|
+
if (args.flags.json) return context.out(`${JSON.stringify(machines2, null, 2)}
|
|
89805
90002
|
`);
|
|
89806
|
-
if (
|
|
90003
|
+
if (machines2.length === 0)
|
|
89807
90004
|
return context.out(
|
|
89808
90005
|
wanted ? `No machine named ${wanted}.
|
|
89809
90006
|
` : "No machines. `laze browser setup <site>` makes one.\n"
|
|
89810
90007
|
);
|
|
89811
|
-
for (const machine2 of
|
|
90008
|
+
for (const machine2 of machines2) context.out(statusLine(machine2));
|
|
89812
90009
|
}
|
|
89813
90010
|
async function change({
|
|
89814
90011
|
context,
|
|
@@ -89873,9 +90070,9 @@ function presenceColumns(member) {
|
|
|
89873
90070
|
return [member.presence, `${status11.emoji} ${status11.text}`.trim() + until, ...dndColumn(member)];
|
|
89874
90071
|
}
|
|
89875
90072
|
function formatMembers({ detail }) {
|
|
89876
|
-
const
|
|
90073
|
+
const count19 = `${detail.members.length} ${detail.members.length === 1 ? "member" : "members"}`;
|
|
89877
90074
|
const ends = detail.endsAt ? `, ends ${utcTimeOf(detail.endsAt)}` : "";
|
|
89878
|
-
const head = `${channelLabelOf(detail)} (${detail.id}), ${
|
|
90075
|
+
const head = `${channelLabelOf(detail)} (${detail.id}), ${count19}${ends}`;
|
|
89879
90076
|
const rows = detail.members.map(
|
|
89880
90077
|
(member) => [ROLE[member.role], member.name, member.kind, member.id, ...presenceColumns(member)].join(" ")
|
|
89881
90078
|
);
|
|
@@ -89915,13 +90112,13 @@ function formatBrowsable({
|
|
|
89915
90112
|
}) {
|
|
89916
90113
|
if (channels3.length === 0) return "No channels to browse.\n";
|
|
89917
90114
|
const rows = channels3.map((channel) => {
|
|
89918
|
-
const
|
|
90115
|
+
const count19 = `${channel.memberCount} ${channel.memberCount === 1 ? "member" : "members"}`;
|
|
89919
90116
|
const marks = [
|
|
89920
90117
|
channel.joined ? "joined" : "not joined",
|
|
89921
90118
|
...channel.private ? ["private"] : [],
|
|
89922
90119
|
...channel.archived ? ["archived"] : []
|
|
89923
90120
|
].join(", ");
|
|
89924
|
-
const text3 = `#${channel.name} ${channel.id} ${
|
|
90121
|
+
const text3 = `#${channel.name} ${channel.id} ${count19} ${marks} ${channel.topic}`;
|
|
89925
90122
|
return withLink({ text: text3, url: channel.url, base });
|
|
89926
90123
|
});
|
|
89927
90124
|
return `${rows.join("\n")}
|
|
@@ -91110,8 +91307,8 @@ async function deliverOnce({
|
|
|
91110
91307
|
profile
|
|
91111
91308
|
}) {
|
|
91112
91309
|
const lock = statePathOf({ context, kind: "waiters", profile });
|
|
91113
|
-
const
|
|
91114
|
-
if (!
|
|
91310
|
+
const mine6 = (await holderOf({ path: lock }))?.pid === context.processes.pid;
|
|
91311
|
+
if (!mine6 && !await takeLock({ context, path: lock, claudePid, preempt: true })) {
|
|
91115
91312
|
return "outranked";
|
|
91116
91313
|
}
|
|
91117
91314
|
const named = { ...args, flags: { ...args.flags, profile } };
|
|
@@ -91214,6 +91411,7 @@ var browserTabAskDefinition = external_exports.object({
|
|
|
91214
91411
|
savedIn: external_exports.string(),
|
|
91215
91412
|
at: external_exports.iso.datetime()
|
|
91216
91413
|
});
|
|
91414
|
+
var browserTabSignInHintSchema = external_exports.enum(["google_code", "none"]);
|
|
91217
91415
|
var browserTabDefinition = external_exports.object({
|
|
91218
91416
|
id: external_exports.string().min(1),
|
|
91219
91417
|
workspaceId: external_exports.string().min(1),
|
|
@@ -91232,6 +91430,8 @@ var browserTabDefinition = external_exports.object({
|
|
|
91232
91430
|
reused: external_exports.boolean().optional(),
|
|
91233
91431
|
/** Only on a read: the site the owner's dedicated IP last failed to reach, lately. */
|
|
91234
91432
|
routeFailure: external_exports.object({ host: external_exports.string().min(1), at: external_exports.iso.datetime() }).nullable().optional(),
|
|
91433
|
+
/** Only on a read while a request is open, for who sees the screen: help for the page now. */
|
|
91434
|
+
signInHint: browserTabSignInHintSchema.optional(),
|
|
91235
91435
|
/** What the reader may do: see the screen, type into it, change the tab; asked: the open
|
|
91236
91436
|
* request names them. */
|
|
91237
91437
|
you: external_exports.object({
|
|
@@ -92560,7 +92760,11 @@ var dedicatedIpListDefinition = external_exports.object({
|
|
|
92560
92760
|
ownerName: external_exports.string(),
|
|
92561
92761
|
state: external_exports.enum(["pending", "on"]),
|
|
92562
92762
|
country: countryDefinition,
|
|
92563
|
-
monthlyPrice: external_exports.number().nonnegative()
|
|
92763
|
+
monthlyPrice: external_exports.number().nonnegative(),
|
|
92764
|
+
/** Since many addresses: which one, and the machine it is on. */
|
|
92765
|
+
id: external_exports.string().optional(),
|
|
92766
|
+
machineName: external_exports.string().nullable().optional(),
|
|
92767
|
+
scope: dedicatedIpScopeSchema.optional()
|
|
92564
92768
|
})
|
|
92565
92769
|
)
|
|
92566
92770
|
});
|
|
@@ -92600,6 +92804,100 @@ var restDedicatedIpOfferInputDefinition = dedicatedIpOfferInputDefinition.omit({
|
|
|
92600
92804
|
workspaceId: true
|
|
92601
92805
|
});
|
|
92602
92806
|
var restTurnOffDedicatedIpInputSchema = external_exports.object({});
|
|
92807
|
+
var dedicatedIpMachineDefinition = external_exports.discriminatedUnion("kind", [
|
|
92808
|
+
external_exports.object({ kind: external_exports.literal("computer"), computerId: external_exports.string().min(1).max(64) }),
|
|
92809
|
+
external_exports.object({ kind: external_exports.literal("browser"), machineId: external_exports.string().min(1).max(64) })
|
|
92810
|
+
]);
|
|
92811
|
+
var heldIpDefinition = external_exports.object({
|
|
92812
|
+
id: external_exports.string(),
|
|
92813
|
+
holderUserId: external_exports.string(),
|
|
92814
|
+
holderName: external_exports.string(),
|
|
92815
|
+
/** The viewer holds it, so may attach, edit and release it. */
|
|
92816
|
+
mine: external_exports.boolean(),
|
|
92817
|
+
state: external_exports.enum(["pending", "on"]),
|
|
92818
|
+
country: countryDefinition,
|
|
92819
|
+
address: external_exports.string().nullable(),
|
|
92820
|
+
scope: dedicatedIpScopeSchema,
|
|
92821
|
+
/** The sites a list-of-sites address carries; empty for anyone but the holder. */
|
|
92822
|
+
domains: external_exports.array(external_exports.string()),
|
|
92823
|
+
machine: external_exports.object({ ref: dedicatedIpMachineDefinition, name: external_exports.string() }).nullable(),
|
|
92824
|
+
troubleSince: external_exports.iso.datetime().nullable(),
|
|
92825
|
+
onSince: external_exports.iso.datetime().nullable(),
|
|
92826
|
+
monthlyPrice: external_exports.number().nonnegative()
|
|
92827
|
+
});
|
|
92828
|
+
var myDedicatedIpsDefinition = external_exports.object({
|
|
92829
|
+
available: external_exports.boolean(),
|
|
92830
|
+
currency: currencySchema,
|
|
92831
|
+
monthlyPrice: external_exports.number().nonnegative(),
|
|
92832
|
+
maxHeld: external_exports.number().int().positive(),
|
|
92833
|
+
defaultDomains: external_exports.array(external_exports.string()),
|
|
92834
|
+
ips: external_exports.array(heldIpDefinition),
|
|
92835
|
+
offNotice: external_exports.object({ reason: external_exports.enum(["credits", "left"]), at: external_exports.iso.datetime(), country: external_exports.string() }).nullable(),
|
|
92836
|
+
settingsUrl: external_exports.string()
|
|
92837
|
+
});
|
|
92838
|
+
var myDedicatedIpsSchema = myDedicatedIpsDefinition;
|
|
92839
|
+
var machineDedicatedIpsDefinition = external_exports.object({
|
|
92840
|
+
machines: external_exports.array(
|
|
92841
|
+
external_exports.object({
|
|
92842
|
+
machine: dedicatedIpMachineDefinition,
|
|
92843
|
+
ip: heldIpDefinition.nullable(),
|
|
92844
|
+
canChange: external_exports.boolean()
|
|
92845
|
+
})
|
|
92846
|
+
)
|
|
92847
|
+
});
|
|
92848
|
+
var machineDedicatedIpsSchema = machineDedicatedIpsDefinition;
|
|
92849
|
+
var heldIpAnswerDefinition = external_exports.object({ message: external_exports.string(), ip: heldIpDefinition.nullable() });
|
|
92850
|
+
var heldIpAnswerSchema = heldIpAnswerDefinition;
|
|
92851
|
+
var buyDedicatedIpInputDefinition = external_exports.object({
|
|
92852
|
+
workspaceId: external_exports.string().min(1),
|
|
92853
|
+
country: external_exports.string().trim().min(2).max(64),
|
|
92854
|
+
/** Attach it here as soon as it is on. */
|
|
92855
|
+
machine: dedicatedIpMachineDefinition.nullable().default(null)
|
|
92856
|
+
});
|
|
92857
|
+
var buyDedicatedIpInputSchema = buyDedicatedIpInputDefinition;
|
|
92858
|
+
var heldIpRefDefinition = external_exports.object({
|
|
92859
|
+
workspaceId: external_exports.string().min(1),
|
|
92860
|
+
ipId: external_exports.string().min(1).max(64)
|
|
92861
|
+
});
|
|
92862
|
+
var heldIpRefSchema = heldIpRefDefinition;
|
|
92863
|
+
var attachDedicatedIpInputDefinition = external_exports.object({
|
|
92864
|
+
...heldIpRefDefinition.shape,
|
|
92865
|
+
machine: dedicatedIpMachineDefinition
|
|
92866
|
+
});
|
|
92867
|
+
var attachDedicatedIpInputSchema = attachDedicatedIpInputDefinition;
|
|
92868
|
+
var detachDedicatedIpInputDefinition = external_exports.object({
|
|
92869
|
+
workspaceId: external_exports.string().min(1),
|
|
92870
|
+
machine: dedicatedIpMachineDefinition
|
|
92871
|
+
});
|
|
92872
|
+
var detachDedicatedIpInputSchema = detachDedicatedIpInputDefinition;
|
|
92873
|
+
var setHeldIpSitesInputDefinition = external_exports.object({
|
|
92874
|
+
...heldIpRefDefinition.shape,
|
|
92875
|
+
add: external_exports.array(external_exports.string().max(300)).max(DEDICATED_IP_MAX_DOMAINS).default([]),
|
|
92876
|
+
remove: external_exports.array(external_exports.string().max(300)).max(DEDICATED_IP_MAX_DOMAINS).default([]),
|
|
92877
|
+
reset: external_exports.boolean().default(false),
|
|
92878
|
+
scope: dedicatedIpScopeSchema.optional()
|
|
92879
|
+
});
|
|
92880
|
+
var setHeldIpSitesInputSchema = setHeldIpSitesInputDefinition;
|
|
92881
|
+
var restBuyDedicatedIpInputDefinition = buyDedicatedIpInputDefinition.omit({ workspaceId: true });
|
|
92882
|
+
var restHeldIpRefInputDefinition = heldIpRefDefinition.omit({ workspaceId: true });
|
|
92883
|
+
var restAttachDedicatedIpInputDefinition = attachDedicatedIpInputDefinition.omit({
|
|
92884
|
+
workspaceId: true
|
|
92885
|
+
});
|
|
92886
|
+
var restDetachDedicatedIpInputDefinition = detachDedicatedIpInputDefinition.omit({
|
|
92887
|
+
workspaceId: true
|
|
92888
|
+
});
|
|
92889
|
+
var restSetHeldIpSitesInputDefinition = setHeldIpSitesInputDefinition.omit({
|
|
92890
|
+
workspaceId: true
|
|
92891
|
+
});
|
|
92892
|
+
var HELD_IP_REST_PATHS = {
|
|
92893
|
+
mine: "/api/compute/ips",
|
|
92894
|
+
buy: "/api/compute/ips/buy",
|
|
92895
|
+
attach: "/api/compute/ips/attach",
|
|
92896
|
+
detach: "/api/compute/ips/detach",
|
|
92897
|
+
release: "/api/compute/ips/release",
|
|
92898
|
+
sites: "/api/compute/ips/sites",
|
|
92899
|
+
machines: "/api/compute/ips/machines"
|
|
92900
|
+
};
|
|
92603
92901
|
var DEDICATED_IP_REST_PATHS = {
|
|
92604
92902
|
mine: "/api/compute/ip",
|
|
92605
92903
|
off: "/api/compute/ip/off",
|
|
@@ -93412,7 +93710,7 @@ var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
|
|
|
93412
93710
|
var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema23, machineId: idSchema26 });
|
|
93413
93711
|
var ComputeApi = moduleApi()("compute");
|
|
93414
93712
|
var computeBrowserTabTrpc = defineTrpcContract("compute").query("browserTabs").withInput(browserTabListInputSchema).withOutput(browserTabListSchema).query("browserTab").withInput(browserTabInputSchema).withOutput(browserTabSchema).mutation("openBrowserTab").withInput(openBrowserTabInputSchema).withOutput(browserTabSchema).mutation("browserTabScreen").withInput(browserTabInputSchema).withOutput(browserTabScreenSchema).mutation("sizeBrowserTabScreen").withInput(browserTabScreenSizeInputSchema).withOutput(browserTabScreenSizeSchema).mutation("gotoBrowserTab").withInput(browserTabGotoInputSchema).withOutput(browserTabPageSchema).mutation("stepBrowserTab").withInput(browserTabStepInputSchema).withOutput(browserTabPageSchema).mutation("doneOnBrowserTab").withInput(browserTabInputSchema).withOutput(browserTabSchema).mutation("shareBrowserTab").withInput(browserTabShareInputSchema).withOutput(browserTabSchema).mutation("closeBrowserTab").withInput(browserTabInputSchema).withOutput(external_exports.object({ closed: external_exports.literal(true) })).build();
|
|
93415
|
-
var computeCoreTrpc = defineTrpcContract("compute").query("status").withInput(computeWorkspaceInputSchema).withOutput(computeStatusSchema).query("computer").withInput(computeWorkspaceInputSchema).withOutput(computerStatusSchema).mutation("setComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerSizeAnswerSchema).mutation("requestComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerRequestSchema).mutation("cancelComputerRequest").withInput(computerRequestRefSchema).withOutput(computerRequestSchema).mutation("restartComputer").withInput(restartComputerInputSchema).withOutput(computerRestartAnswerSchema).query("computers").withInput(computeWorkspaceInputSchema).withOutput(computerListSchema).query("dedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpStatusSchema).mutation("setDedicatedIp").withInput(setDedicatedIpInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("turnOffDedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("setDedicatedIpDomains").withInput(setDedicatedIpDomainsInputSchema).withOutput(dedicatedIpAnswerSchema).query("dedicatedIps").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpListSchema).query("dedicatedIpCountries").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpCountriesSchema).query("dedicatedIpOffer").withInput(dedicatedIpOfferInputSchema).withOutput(dedicatedIpOfferSchema).query("list").withInput(computeWorkspaceInputSchema).withOutput(external_exports.array(machineSchema)).query("get").withInput(machineRefSchema).withOutput(machineSchema).mutation("setupBrowser").withInput(setupBrowserInputSchema).withOutput(machineSchema).mutation("sleep").withInput(machineRefSchema).withOutput(machineSchema).mutation("wake").withInput(machineRefSchema).withOutput(machineSchema).mutation("delete").withInput(machineRefSchema).withOutput(machineSchema).mutation("rename").withInput(renameMachineInputSchema).withOutput(machineSchema).mutation("grant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("revokeGrant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("setBudget").withInput(setMachineBudgetInputSchema).withOutput(machineSchema).mutation("openScreen").withInput(openScreenInputSchema).withOutput(screenSessionSchema).mutation("openLoginTerminal").withInput(openLoginTerminalInputSchema).withOutput(loginTerminalSchema).mutation("finishScreen").withInput(screenRefSchema).withOutput(machineSchema).mutation("connectOwn").withInput(connectOwnMachineInputSchema).withOutput(ownMachineConnectSchema).mutation("newConnectCommand").withInput(machineRefSchema).withOutput(ownMachineConnectSchema).mutation("connectSsh").withInput(connectSshMachineInputSchema).withOutput(ownMachineSshConnectSchema).mutation("trustHostKey").withInput(trustHostKeyInputSchema).withOutput(machineSchema).mutation("checkHealth").withInput(machineRefSchema).withOutput(machineSchema).mutation("hostAgent").withInput(hostAgentInputSchema).withOutput(machineSchema).mutation("unhostAgent").withInput(unhostAgentInputSchema).withOutput(external_exports.object({ agentId: external_exports.string() })).mutation("pairWhatsapp").withInput(whatsappPairInputSchema).withOutput(whatsappPairingSchema).query("whatsappMirror").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).mutation("setWhatsappMirror").withInput(setWhatsappMirrorInputSchema).withOutput(whatsappMirrorSettingsSchema).query("whatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("cancelWhatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("unpairWhatsapp").withInput(machineRefSchema).withOutput(machineSchema).build();
|
|
93713
|
+
var computeCoreTrpc = defineTrpcContract("compute").query("status").withInput(computeWorkspaceInputSchema).withOutput(computeStatusSchema).query("computer").withInput(computeWorkspaceInputSchema).withOutput(computerStatusSchema).mutation("setComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerSizeAnswerSchema).mutation("requestComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerRequestSchema).mutation("cancelComputerRequest").withInput(computerRequestRefSchema).withOutput(computerRequestSchema).mutation("restartComputer").withInput(restartComputerInputSchema).withOutput(computerRestartAnswerSchema).query("computers").withInput(computeWorkspaceInputSchema).withOutput(computerListSchema).query("dedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpStatusSchema).mutation("setDedicatedIp").withInput(setDedicatedIpInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("turnOffDedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("setDedicatedIpDomains").withInput(setDedicatedIpDomainsInputSchema).withOutput(dedicatedIpAnswerSchema).query("dedicatedIps").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpListSchema).query("dedicatedIpCountries").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpCountriesSchema).query("dedicatedIpOffer").withInput(dedicatedIpOfferInputSchema).withOutput(dedicatedIpOfferSchema).query("myDedicatedIps").withInput(computeWorkspaceInputSchema).withOutput(myDedicatedIpsSchema).mutation("buyDedicatedIp").withInput(buyDedicatedIpInputSchema).withOutput(heldIpAnswerSchema).mutation("attachDedicatedIp").withInput(attachDedicatedIpInputSchema).withOutput(heldIpAnswerSchema).mutation("detachDedicatedIp").withInput(detachDedicatedIpInputSchema).withOutput(heldIpAnswerSchema).mutation("releaseDedicatedIp").withInput(heldIpRefSchema).withOutput(heldIpAnswerSchema).mutation("setHeldIpSites").withInput(setHeldIpSitesInputSchema).withOutput(heldIpAnswerSchema).query("machineDedicatedIps").withInput(computeWorkspaceInputSchema).withOutput(machineDedicatedIpsSchema).query("list").withInput(computeWorkspaceInputSchema).withOutput(external_exports.array(machineSchema)).query("get").withInput(machineRefSchema).withOutput(machineSchema).mutation("setupBrowser").withInput(setupBrowserInputSchema).withOutput(machineSchema).mutation("sleep").withInput(machineRefSchema).withOutput(machineSchema).mutation("wake").withInput(machineRefSchema).withOutput(machineSchema).mutation("delete").withInput(machineRefSchema).withOutput(machineSchema).mutation("rename").withInput(renameMachineInputSchema).withOutput(machineSchema).mutation("grant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("revokeGrant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("setBudget").withInput(setMachineBudgetInputSchema).withOutput(machineSchema).mutation("openScreen").withInput(openScreenInputSchema).withOutput(screenSessionSchema).mutation("openLoginTerminal").withInput(openLoginTerminalInputSchema).withOutput(loginTerminalSchema).mutation("finishScreen").withInput(screenRefSchema).withOutput(machineSchema).mutation("connectOwn").withInput(connectOwnMachineInputSchema).withOutput(ownMachineConnectSchema).mutation("newConnectCommand").withInput(machineRefSchema).withOutput(ownMachineConnectSchema).mutation("connectSsh").withInput(connectSshMachineInputSchema).withOutput(ownMachineSshConnectSchema.meta({ deprecated: true })).mutation("trustHostKey").withInput(trustHostKeyInputSchema).withOutput(machineSchema.meta({ deprecated: true })).mutation("checkHealth").withInput(machineRefSchema).withOutput(machineSchema).mutation("hostAgent").withInput(hostAgentInputSchema).withOutput(machineSchema).mutation("unhostAgent").withInput(unhostAgentInputSchema).withOutput(external_exports.object({ agentId: external_exports.string() })).mutation("pairWhatsapp").withInput(whatsappPairInputSchema).withOutput(whatsappPairingSchema).query("whatsappMirror").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).mutation("setWhatsappMirror").withInput(setWhatsappMirrorInputSchema).withOutput(whatsappMirrorSettingsSchema).query("whatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("cancelWhatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("unpairWhatsapp").withInput(machineRefSchema).withOutput(machineSchema).build();
|
|
93416
93714
|
var computeFleetTrpc = defineTrpcContract("compute").query("whatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("prepareWhatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("warmComputer").withInput(computeWorkspaceInputSchema).withOutput(warmComputerSchema).query("myComputers").withInput(computeWorkspaceInputSchema).withOutput(myComputersSchema).query("personComputer").withInput(personComputerInputSchema).withOutput(computerUseSchema2).mutation("createComputer").withInput(createComputerInputSchema).withOutput(computerStatusSchema).mutation("deleteComputer").withInput(deleteComputerInputSchema).withOutput(deleteComputerAnswerSchema).mutation("setComputerCreators").withInput(setComputerCreatorsInputSchema).withOutput(computerStatusSchema).mutation("setAgentComputer").withInput(setAgentComputerInputSchema).withOutput(agentComputerAnswerSchema).query("whatsappAgents").withInput(machineRefSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgent").withInput(setWhatsappAgentInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgentLease").withInput(setWhatsappAgentLeaseInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappEveryAgent").withInput(setWhatsappEveryAgentInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgentAccess").withInput(setWhatsappAgentAccessInputSchema).withOutput(whatsappAgentsSchema).mutation("checkWhatsappNow").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).query("whatsappChatPeople").withInput(whatsappChatPeopleInputSchema).withOutput(whatsappChatPeopleSchema).query("whatsappHistory").withInput(whatsappHistoryInputSchema).withOutput(whatsappHistoryPageSchema).mutation("watchWhatsappChat").withInput(whatsappWatchInputSchema).withOutput(whatsappWatchSchema).mutation("checkWhatsappReply").withInput(whatsappReplyCheckInputSchema).withOutput(whatsappReplyCheckSchema).build();
|
|
93417
93715
|
var computeTrpc = joinTrpcContracts(
|
|
93418
93716
|
"compute",
|
|
@@ -93637,7 +93935,7 @@ var whatsappOutKindSchema = external_exports.enum(WHATSAPP_OUT_KINDS);
|
|
|
93637
93935
|
var WHATSAPP_EVIDENCE_KINDS = ["ack", "delivered", "read", "echo", "found"];
|
|
93638
93936
|
var whatsappEvidenceKindSchema = external_exports.enum(WHATSAPP_EVIDENCE_KINDS);
|
|
93639
93937
|
var id2 = external_exports.string().min(1).max(200);
|
|
93640
|
-
var
|
|
93938
|
+
var at4 = external_exports.iso.datetime();
|
|
93641
93939
|
var code = external_exports.string().min(1).max(64).regex(/^[a-z_]+$/);
|
|
93642
93940
|
var sendRef = {
|
|
93643
93941
|
workspaceId: id2,
|
|
@@ -93645,7 +93943,7 @@ var sendRef = {
|
|
|
93645
93943
|
sendId: id2,
|
|
93646
93944
|
/** `whatsapp-out:<machine>:<send id>`: the stream's id. */
|
|
93647
93945
|
stream: id2,
|
|
93648
|
-
at:
|
|
93946
|
+
at: at4
|
|
93649
93947
|
};
|
|
93650
93948
|
var whatsappSendRequestedDefinition = external_exports.object({
|
|
93651
93949
|
...sendRef,
|
|
@@ -93655,7 +93953,7 @@ var whatsappSendRequestedDefinition = external_exports.object({
|
|
|
93655
93953
|
/** The WhatsApp id Laze chose for it; null while the computer still picks it. */
|
|
93656
93954
|
waId: id2.nullable(),
|
|
93657
93955
|
/** After this, with no evidence, the send reads "Check the chat". */
|
|
93658
|
-
sendBy:
|
|
93956
|
+
sendBy: at4,
|
|
93659
93957
|
files: external_exports.number().int().min(0).max(100)
|
|
93660
93958
|
});
|
|
93661
93959
|
var whatsappSendTakenDefinition = external_exports.object({
|
|
@@ -93671,10 +93969,10 @@ var whatsappSendEvidencedDefinition = external_exports.object({
|
|
|
93671
93969
|
});
|
|
93672
93970
|
var whatsappSendRefusedDefinition = external_exports.object({ ...sendRef, code });
|
|
93673
93971
|
var check2 = external_exports.number().int().positive().optional();
|
|
93674
|
-
var whatsappSendUnresolvedDefinition = external_exports.object({ ...sendRef, sendBy:
|
|
93972
|
+
var whatsappSendUnresolvedDefinition = external_exports.object({ ...sendRef, sendBy: at4, check: check2 });
|
|
93675
93973
|
var whatsappSendRecheckRequestedDefinition = external_exports.object({
|
|
93676
93974
|
...sendRef,
|
|
93677
|
-
sendBy:
|
|
93975
|
+
sendBy: at4,
|
|
93678
93976
|
asked: external_exports.number().int().nonnegative()
|
|
93679
93977
|
});
|
|
93680
93978
|
var WHATSAPP_SEND_STEPS = [
|
|
@@ -93703,8 +94001,8 @@ var whatsappSendUnresolvedIntentDefinition = external_exports.object({
|
|
|
93703
94001
|
machineId: external_exports.string(),
|
|
93704
94002
|
sendId: external_exports.string(),
|
|
93705
94003
|
stream: external_exports.string(),
|
|
93706
|
-
sendBy:
|
|
93707
|
-
at:
|
|
94004
|
+
sendBy: at4,
|
|
94005
|
+
at: at4,
|
|
93708
94006
|
check: check2
|
|
93709
94007
|
});
|
|
93710
94008
|
|
|
@@ -93895,8 +94193,8 @@ var sendWakeIntentDefinition = external_exports.object({
|
|
|
93895
94193
|
});
|
|
93896
94194
|
|
|
93897
94195
|
// ../../modules/compute/contract/src/whatsapp-ops.ts
|
|
93898
|
-
var
|
|
93899
|
-
var
|
|
94196
|
+
var count14 = external_exports.number().int().nonnegative();
|
|
94197
|
+
var at5 = external_exports.iso.datetime();
|
|
93900
94198
|
var whatsappMirrorHealthDefinition = external_exports.object({
|
|
93901
94199
|
mirrors: external_exports.array(
|
|
93902
94200
|
external_exports.object({
|
|
@@ -93906,40 +94204,40 @@ var whatsappMirrorHealthDefinition = external_exports.object({
|
|
|
93906
94204
|
provider: external_exports.string(),
|
|
93907
94205
|
mirrorOn: external_exports.boolean(),
|
|
93908
94206
|
/** When the mirror took its changes only as events (ADR-216); null while it still pulls. */
|
|
93909
|
-
eventsAt:
|
|
94207
|
+
eventsAt: at5.nullable(),
|
|
93910
94208
|
/** When the job last answered that it pulls its sends (ADR-220); null otherwise. */
|
|
93911
|
-
outboxAt:
|
|
94209
|
+
outboxAt: at5.nullable(),
|
|
93912
94210
|
cursor: external_exports.number().int(),
|
|
93913
|
-
nextVisitAt:
|
|
93914
|
-
touchedAt:
|
|
93915
|
-
createdAt:
|
|
93916
|
-
skipped: external_exports.object({ count:
|
|
94211
|
+
nextVisitAt: at5.nullable(),
|
|
94212
|
+
touchedAt: at5.nullable(),
|
|
94213
|
+
createdAt: at5,
|
|
94214
|
+
skipped: external_exports.object({ count: count14, from: external_exports.number().int().nullable(), at: at5.nullable() }),
|
|
93917
94215
|
/** The last pull that met files; null when none did. */
|
|
93918
94216
|
files: external_exports.object({
|
|
93919
|
-
at:
|
|
93920
|
-
attached:
|
|
93921
|
-
unavailable:
|
|
93922
|
-
retrying:
|
|
93923
|
-
dropped:
|
|
94217
|
+
at: at5,
|
|
94218
|
+
attached: count14,
|
|
94219
|
+
unavailable: count14,
|
|
94220
|
+
retrying: count14,
|
|
94221
|
+
dropped: count14,
|
|
93924
94222
|
failureCode: external_exports.string().nullable()
|
|
93925
94223
|
}).nullable(),
|
|
93926
94224
|
/** Intake holds (ADR-216 §11) by kind and code, with when the oldest was made. */
|
|
93927
|
-
holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count:
|
|
94225
|
+
holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count: count14, oldestAt: at5 })),
|
|
93928
94226
|
/**
|
|
93929
94227
|
* The computer store's fill (ADR-223): chats done, how many mirrored items from the last 6
|
|
93930
94228
|
* months Laze held, those the store held and those sent; the mirrored items Laze holds now
|
|
93931
94229
|
* and how many a trim to 7 days after last read would delete. Null before a fill started.
|
|
93932
94230
|
*/
|
|
93933
94231
|
storeFill: external_exports.object({
|
|
93934
|
-
chats:
|
|
93935
|
-
lazeHeld:
|
|
93936
|
-
alreadyHeld:
|
|
93937
|
-
sent:
|
|
94232
|
+
chats: count14,
|
|
94233
|
+
lazeHeld: count14,
|
|
94234
|
+
alreadyHeld: count14,
|
|
94235
|
+
sent: count14,
|
|
93938
94236
|
problem: external_exports.string().nullable(),
|
|
93939
|
-
filledAt:
|
|
93940
|
-
updatedAt:
|
|
93941
|
-
mirrored:
|
|
93942
|
-
trimmable:
|
|
94237
|
+
filledAt: at5.nullable(),
|
|
94238
|
+
updatedAt: at5,
|
|
94239
|
+
mirrored: count14,
|
|
94240
|
+
trimmable: count14
|
|
93943
94241
|
}).nullable().optional()
|
|
93944
94242
|
})
|
|
93945
94243
|
)
|
|
@@ -93969,7 +94267,7 @@ var whatsappSendsDefinition = external_exports.object({
|
|
|
93969
94267
|
quoted: external_exports.boolean(),
|
|
93970
94268
|
/** Sends to the same chat share a number, counted from 1 in this answer; never the chat. */
|
|
93971
94269
|
chatIndex: external_exports.number().int().min(1),
|
|
93972
|
-
files:
|
|
94270
|
+
files: count14,
|
|
93973
94271
|
/**
|
|
93974
94272
|
* Why a failed send did not go: its stored code, or for older sends the code its outcome
|
|
93975
94273
|
* line reads as; "other" when none fits, null for a send that did not fail.
|
|
@@ -93979,9 +94277,9 @@ var whatsappSendsDefinition = external_exports.object({
|
|
|
93979
94277
|
serverErrorCode: external_exports.number().int().nullable(),
|
|
93980
94278
|
/** For a blocked send, the computer's allow-list rule that refused it, when it named one. */
|
|
93981
94279
|
blockedBy: external_exports.enum(WHATSAPP_SEND_BLOCK_REASONS).nullable(),
|
|
93982
|
-
createdAt:
|
|
93983
|
-
claimedAt:
|
|
93984
|
-
sentAt:
|
|
94280
|
+
createdAt: at5,
|
|
94281
|
+
claimedAt: at5.nullable(),
|
|
94282
|
+
sentAt: at5.nullable()
|
|
93985
94283
|
})
|
|
93986
94284
|
)
|
|
93987
94285
|
});
|
|
@@ -93995,22 +94293,22 @@ var whatsappSendStreamsDefinition = external_exports.object({
|
|
|
93995
94293
|
kind: external_exports.enum(WHATSAPP_SEND_KINDS),
|
|
93996
94294
|
rowState: external_exports.string(),
|
|
93997
94295
|
failureCode: external_exports.string().nullable(),
|
|
93998
|
-
createdAt:
|
|
94296
|
+
createdAt: at5,
|
|
93999
94297
|
/** The stream's events, its last event's kind and time; zero and null for none. */
|
|
94000
|
-
events:
|
|
94298
|
+
events: count14,
|
|
94001
94299
|
lastEvent: external_exports.enum(["requested", "taken", "evidenced", "refused", "unresolved", "recheck_requested"]).nullable(),
|
|
94002
|
-
lastEventAt:
|
|
94300
|
+
lastEventAt: at5.nullable(),
|
|
94003
94301
|
/** The process's step and deadline; null when no process holds the send. */
|
|
94004
94302
|
step: external_exports.enum(["none", "queued", "taken", "sent", "refused", "unresolved"]).nullable(),
|
|
94005
|
-
sendBy:
|
|
94303
|
+
sendBy: at5.nullable(),
|
|
94006
94304
|
/** Whether the row and the process tell the same story. */
|
|
94007
94305
|
agrees: external_exports.boolean()
|
|
94008
94306
|
})
|
|
94009
94307
|
),
|
|
94010
94308
|
/** Counts over the answered sends. */
|
|
94011
|
-
total:
|
|
94012
|
-
agree:
|
|
94013
|
-
disagree:
|
|
94309
|
+
total: count14,
|
|
94310
|
+
agree: count14,
|
|
94311
|
+
disagree: count14
|
|
94014
94312
|
});
|
|
94015
94313
|
var whatsappSendStreamsSchema = whatsappSendStreamsDefinition;
|
|
94016
94314
|
var WHATSAPP_WAKE_STEPS = [
|
|
@@ -94032,7 +94330,7 @@ var whatsappWakeTimelineDefinition = external_exports.object({
|
|
|
94032
94330
|
/** Newest first. */
|
|
94033
94331
|
wakes: external_exports.array(
|
|
94034
94332
|
external_exports.object({
|
|
94035
|
-
requestedAt:
|
|
94333
|
+
requestedAt: at5,
|
|
94036
94334
|
/** watch, send, message, visit, link or unpair. */
|
|
94037
94335
|
cause: external_exports.string(),
|
|
94038
94336
|
/** done, failed, or open when no step came for a while. */
|
|
@@ -94049,12 +94347,12 @@ var whatsappWakeTimelineDefinition = external_exports.object({
|
|
|
94049
94347
|
steps: external_exports.array(
|
|
94050
94348
|
external_exports.object({
|
|
94051
94349
|
step: external_exports.enum(WHATSAPP_WAKE_STEPS),
|
|
94052
|
-
at:
|
|
94053
|
-
sincePreviousMs:
|
|
94054
|
-
sinceRequestMs:
|
|
94350
|
+
at: at5,
|
|
94351
|
+
sincePreviousMs: count14,
|
|
94352
|
+
sinceRequestMs: count14
|
|
94055
94353
|
})
|
|
94056
94354
|
),
|
|
94057
|
-
totalMs:
|
|
94355
|
+
totalMs: count14.nullable()
|
|
94058
94356
|
})
|
|
94059
94357
|
)
|
|
94060
94358
|
})
|
|
@@ -94082,9 +94380,9 @@ var STREAM_END_CAUSES = [
|
|
|
94082
94380
|
"done",
|
|
94083
94381
|
"other"
|
|
94084
94382
|
];
|
|
94085
|
-
var
|
|
94383
|
+
var at6 = external_exports.iso.datetime();
|
|
94086
94384
|
var relayEventDefinition = external_exports.object({
|
|
94087
|
-
at:
|
|
94385
|
+
at: at6,
|
|
94088
94386
|
kind: external_exports.enum(RELAY_EVENT_KINDS),
|
|
94089
94387
|
/** The stream's kind (cdp, screen, watch), or null for a link event. */
|
|
94090
94388
|
stream: external_exports.string().max(16).nullable(),
|
|
@@ -94096,8 +94394,8 @@ var computerBrowserFactsDefinition = external_exports.object({
|
|
|
94096
94394
|
machineId: external_exports.string().nullable(),
|
|
94097
94395
|
/** Whether this api process holds the connector's link now. */
|
|
94098
94396
|
linked: external_exports.boolean(),
|
|
94099
|
-
lastSeenAt:
|
|
94100
|
-
healthCheckedAt:
|
|
94397
|
+
lastSeenAt: at6.nullable(),
|
|
94398
|
+
healthCheckedAt: at6.nullable(),
|
|
94101
94399
|
daemonVersion: external_exports.string().max(80).nullable(),
|
|
94102
94400
|
diskTotalGb: external_exports.number().nonnegative().nullable(),
|
|
94103
94401
|
diskFreeGb: external_exports.number().nonnegative().nullable(),
|
|
@@ -94114,7 +94412,7 @@ var computerBrowserFactsDefinition = external_exports.object({
|
|
|
94114
94412
|
dedicatedIp: external_exports.enum(["none", "off", "pending", "on"]),
|
|
94115
94413
|
scope: dedicatedIpScopeSchema.nullable(),
|
|
94116
94414
|
countryCode: external_exports.string().max(8).nullable(),
|
|
94117
|
-
onSince:
|
|
94415
|
+
onSince: at6.nullable(),
|
|
94118
94416
|
browserLeaves: external_exports.enum(["dedicated_ip", "shared_address"])
|
|
94119
94417
|
})
|
|
94120
94418
|
});
|
|
@@ -94999,11 +95297,11 @@ function bundleOf({ text: text3, field }) {
|
|
|
94999
95297
|
for (const line of text3.split(/\r?\n/)) {
|
|
95000
95298
|
const kept = line.trim();
|
|
95001
95299
|
if (!kept || kept.startsWith("#")) continue;
|
|
95002
|
-
const
|
|
95003
|
-
if (
|
|
95300
|
+
const at9 = line.indexOf("=");
|
|
95301
|
+
if (at9 <= 0) {
|
|
95004
95302
|
throw new CliUsageError("Give KEY=value lines, or one value with --field <FIELD>.");
|
|
95005
95303
|
}
|
|
95006
|
-
fields[line.slice(0,
|
|
95304
|
+
fields[line.slice(0, at9).trim()] = line.slice(at9 + 1);
|
|
95007
95305
|
}
|
|
95008
95306
|
return { kind: "api_key_set", fields };
|
|
95009
95307
|
}
|
|
@@ -96582,7 +96880,7 @@ function nextClock({
|
|
|
96582
96880
|
timeZone
|
|
96583
96881
|
}) {
|
|
96584
96882
|
const local2 = now.toZonedDateTimeISO(timeZone);
|
|
96585
|
-
const
|
|
96883
|
+
const at9 = local2.with({
|
|
96586
96884
|
hour: Number(clock[1]),
|
|
96587
96885
|
minute: Number(clock[2]),
|
|
96588
96886
|
second: 0,
|
|
@@ -96590,7 +96888,7 @@ function nextClock({
|
|
|
96590
96888
|
microsecond: 0,
|
|
96591
96889
|
nanosecond: 0
|
|
96592
96890
|
});
|
|
96593
|
-
const next = Temporal3.ZonedDateTime.compare(
|
|
96891
|
+
const next = Temporal3.ZonedDateTime.compare(at9, local2) > 0 ? at9 : at9.add({ days: 1 });
|
|
96594
96892
|
return next.toString({ timeZoneName: "never", smallestUnit: "second" });
|
|
96595
96893
|
}
|
|
96596
96894
|
function dndInputOf({
|
|
@@ -97522,8 +97820,8 @@ var EXTERNAL_USAGE = `Usage:
|
|
|
97522
97820
|
laze external report <workspace> --note "<why>" report a workspace to Laze staff, and block it (admins)`;
|
|
97523
97821
|
var printJson6 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
|
|
97524
97822
|
`);
|
|
97525
|
-
function wordAt5({ args, at:
|
|
97526
|
-
const word3 = args.words[
|
|
97823
|
+
function wordAt5({ args, at: at9, what }) {
|
|
97824
|
+
const word3 = args.words[at9]?.trim();
|
|
97527
97825
|
if (!word3) throw new CliUsageError(`Name ${what}.
|
|
97528
97826
|
${EXTERNAL_USAGE}`);
|
|
97529
97827
|
return word3;
|
|
@@ -97532,8 +97830,8 @@ async function clientOf2({ context, args }) {
|
|
|
97532
97830
|
const session = await signedIn({ context, args });
|
|
97533
97831
|
const wanted = flagText({ args, name: "workspace" })?.trim();
|
|
97534
97832
|
if (!wanted) return { client: session.client };
|
|
97535
|
-
const
|
|
97536
|
-
const target =
|
|
97833
|
+
const mine6 = await session.client.post("/api/agents/me/workspace/mine", {});
|
|
97834
|
+
const target = mine6.find((each) => each.id === wanted) ?? mine6.find((each) => each.name.toLowerCase() === wanted.toLowerCase());
|
|
97537
97835
|
if (!target) {
|
|
97538
97836
|
throw new CliUsageError(`You are in no workspace named "${wanted}": laze workspace list.`);
|
|
97539
97837
|
}
|
|
@@ -97627,9 +97925,9 @@ async function invite2({ context, args }) {
|
|
|
97627
97925
|
});
|
|
97628
97926
|
if (args.flags.json) return printJson6(context, sent);
|
|
97629
97927
|
const sharing = sent.share ? `, sharing #${sent.share.name} once accepted` : "";
|
|
97630
|
-
const
|
|
97928
|
+
const at9 = sent.company ? ` at ${sent.company}` : "";
|
|
97631
97929
|
context.out(
|
|
97632
|
-
`Invited ${sent.email}${
|
|
97930
|
+
`Invited ${sent.email}${at9}${sharing}. Invitation ${sent.id} expires ${utcTimeOf(sent.expiresAt)}.
|
|
97633
97931
|
`
|
|
97634
97932
|
);
|
|
97635
97933
|
}
|
|
@@ -98199,6 +98497,10 @@ var feedApprovalSchemaDefinition = external_exports.object({
|
|
|
98199
98497
|
why: external_exports.string(),
|
|
98200
98498
|
/** The longest lease Allow for this agent may give; null offers only once and deny. */
|
|
98201
98499
|
maxLeaseSeconds: external_exports.number().int().positive().nullable(),
|
|
98500
|
+
/** The More menu's "Allow for 30 days for this agent"; null or absent when not offered. */
|
|
98501
|
+
monthLeaseSeconds: external_exports.number().int().positive().nullable().optional(),
|
|
98502
|
+
/** The vault key a card asks for, so its More menu opens that key's settings. */
|
|
98503
|
+
connectionId: external_exports.string().nullable().optional(),
|
|
98202
98504
|
/** A vault card whose "Allow once" covers the rest of the agent's turn. */
|
|
98203
98505
|
coversTask: external_exports.boolean().optional(),
|
|
98204
98506
|
/** A vault card whose key wants a device: Allow goes through a passkey, Touch ID or Face ID. */
|
|
@@ -98474,7 +98776,9 @@ var answerFeedApprovalInputSchemaDefinition = external_exports.object({
|
|
|
98474
98776
|
via: external_exports.enum(["feed", "ios"]).optional(),
|
|
98475
98777
|
durationSeconds: external_exports.number().int().positive().optional(),
|
|
98476
98778
|
/** Why, or a steer for the agent: one line, at most 500 characters once cleaned. */
|
|
98477
|
-
resolutionNote: external_exports.string().max(4e3).default("")
|
|
98779
|
+
resolutionNote: external_exports.string().max(4e3).default(""),
|
|
98780
|
+
/** A vault card's request ids as the client showed them; joined asks not among them stay open. */
|
|
98781
|
+
seenRequestIds: external_exports.array(external_exports.string().min(1).max(64)).max(50).optional()
|
|
98478
98782
|
});
|
|
98479
98783
|
var answerFeedApprovalInputSchema = answerFeedApprovalInputSchemaDefinition;
|
|
98480
98784
|
var decideFeedRequestInputSchemaDefinition = external_exports.object({
|
|
@@ -98801,12 +99105,12 @@ function draftFilesMissingText(names) {
|
|
|
98801
99105
|
}
|
|
98802
99106
|
|
|
98803
99107
|
// ../../modules/feed/contract/src/feed.decisions.ts
|
|
98804
|
-
function decisionsLineOf(
|
|
98805
|
-
return `${
|
|
99108
|
+
function decisionsLineOf(count19) {
|
|
99109
|
+
return `${count19} ${count19 === 1 ? "decision" : "decisions"} waiting on you`;
|
|
98806
99110
|
}
|
|
98807
99111
|
|
|
98808
99112
|
// ../../modules/feed/contract/src/feed.ops-counts.ts
|
|
98809
|
-
var
|
|
99113
|
+
var count15 = external_exports.number().int().nonnegative();
|
|
98810
99114
|
var FEED_OPS_SYSTEM_AUTHOR = /^[a-z][a-z0-9_-]{0,39}$/;
|
|
98811
99115
|
var FEED_OPS_NOTICE_FAMILY = /^notice:[a-z][a-z0-9_-]{0,39}$/;
|
|
98812
99116
|
var feedOpsCountRowSchemaDefinition = external_exports.object({
|
|
@@ -98820,13 +99124,13 @@ var feedOpsCountRowSchemaDefinition = external_exports.object({
|
|
|
98820
99124
|
/** The notice family of a notice card (`notice:other` when its reference has no plain one). */
|
|
98821
99125
|
noticeFamily: external_exports.string().regex(FEED_OPS_NOTICE_FAMILY).nullable(),
|
|
98822
99126
|
/** In the person's open list: what "N things need you" counts. */
|
|
98823
|
-
open:
|
|
99127
|
+
open: count15,
|
|
98824
99128
|
/** Open and not read, as the summary's "N unread" counts. */
|
|
98825
|
-
unread:
|
|
99129
|
+
unread: count15,
|
|
98826
99130
|
/** Open and urgent. */
|
|
98827
|
-
urgent:
|
|
99131
|
+
urgent: count15,
|
|
98828
99132
|
/** Coming up: snoozed or shown later, as the Snoozed tab lists. */
|
|
98829
|
-
snoozed:
|
|
99133
|
+
snoozed: count15
|
|
98830
99134
|
});
|
|
98831
99135
|
var feedOpsCountRowSchema = feedOpsCountRowSchemaDefinition;
|
|
98832
99136
|
|
|
@@ -98843,11 +99147,11 @@ function csvCellsOf(line) {
|
|
|
98843
99147
|
const cells = [];
|
|
98844
99148
|
let cell = "";
|
|
98845
99149
|
let quoted2 = false;
|
|
98846
|
-
for (let
|
|
98847
|
-
const char = line[
|
|
98848
|
-
if (quoted2 && char === '"' && line[
|
|
99150
|
+
for (let at9 = 0; at9 < line.length; at9 += 1) {
|
|
99151
|
+
const char = line[at9];
|
|
99152
|
+
if (quoted2 && char === '"' && line[at9 + 1] === '"') {
|
|
98849
99153
|
cell += '"';
|
|
98850
|
-
|
|
99154
|
+
at9 += 1;
|
|
98851
99155
|
} else if (char === '"') {
|
|
98852
99156
|
quoted2 = !quoted2;
|
|
98853
99157
|
} else if (char === "," && !quoted2) {
|
|
@@ -98912,11 +99216,11 @@ feed_draft_missing when a card points at a draft without its text; fix it, or pa
|
|
|
98912
99216
|
to post it as written.`;
|
|
98913
99217
|
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";
|
|
98914
99218
|
function pairOf({ value, flag: flag2 }) {
|
|
98915
|
-
const
|
|
98916
|
-
if (
|
|
99219
|
+
const at9 = value.indexOf("=");
|
|
99220
|
+
if (at9 <= 0 || at9 === value.length - 1) {
|
|
98917
99221
|
throw new Error(`--${flag2} takes <label>=<value>, got "${value}"`);
|
|
98918
99222
|
}
|
|
98919
|
-
return [value.slice(0,
|
|
99223
|
+
return [value.slice(0, at9), value.slice(at9 + 1)];
|
|
98920
99224
|
}
|
|
98921
99225
|
function sourceOf(value) {
|
|
98922
99226
|
return value.startsWith("@") && value.length > 1 ? { file: value.slice(1) } : { text: value };
|
|
@@ -99440,8 +99744,8 @@ function optionalWords(words) {
|
|
|
99440
99744
|
}
|
|
99441
99745
|
function shareLinesOf({ move: move3, answer: answer6 }) {
|
|
99442
99746
|
const names = answer6.people.map((person) => person.name).join(", ") || "no one new";
|
|
99443
|
-
const
|
|
99444
|
-
const items = `${
|
|
99747
|
+
const count19 = answer6.itemIds.length;
|
|
99748
|
+
const items = `${count19} item${count19 === 1 ? "" : "s"}`;
|
|
99445
99749
|
const head = move3 === "share" ? `Shared ${items} with ${names}` : `Took ${names} off ${items}`;
|
|
99446
99750
|
return [head, ...answer6.itemIds].map((line) => `${line}
|
|
99447
99751
|
`).join("");
|
|
@@ -99604,10 +99908,10 @@ async function ranksOf({
|
|
|
99604
99908
|
const [itemId, priority] = args.words.slice(2);
|
|
99605
99909
|
const named = itemId && priority ? [`${itemId}=${priority}`] : [];
|
|
99606
99910
|
return [...named, ...args.lists.set ?? []].map((pair) => {
|
|
99607
|
-
const
|
|
99608
|
-
if (
|
|
99911
|
+
const at9 = pair.indexOf("=");
|
|
99912
|
+
if (at9 < 1) throw new CliUsageError(USAGE11);
|
|
99609
99913
|
try {
|
|
99610
|
-
return { itemId: pair.slice(0,
|
|
99914
|
+
return { itemId: pair.slice(0, at9), priority: rankOf(pair.slice(at9 + 1)) };
|
|
99611
99915
|
} catch (error63) {
|
|
99612
99916
|
throw new CliUsageError(error63 instanceof Error ? error63.message : String(error63));
|
|
99613
99917
|
}
|
|
@@ -99959,8 +100263,8 @@ function peopleOf({ args }) {
|
|
|
99959
100263
|
if (people2.length > 0) return people2;
|
|
99960
100264
|
return one ? [one] : [];
|
|
99961
100265
|
}
|
|
99962
|
-
function wordAt6({ args, at:
|
|
99963
|
-
const word3 = args.words[
|
|
100266
|
+
function wordAt6({ args, at: at9 }) {
|
|
100267
|
+
const word3 = args.words[at9];
|
|
99964
100268
|
if (!word3) throw new CliUsageError(USAGE12);
|
|
99965
100269
|
return word3;
|
|
99966
100270
|
}
|
|
@@ -100090,13 +100394,13 @@ function formatHistory(output2) {
|
|
|
100090
100394
|
const lines2 = linesOf3(output2);
|
|
100091
100395
|
if (lines2.length === 0) return `${where}${from}: no messages.
|
|
100092
100396
|
`;
|
|
100093
|
-
const
|
|
100397
|
+
const count19 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
|
|
100094
100398
|
const blocks = lines2.map(blockOf2).join("\n\n");
|
|
100095
100399
|
const cursor = olderCursorOf(output2);
|
|
100096
100400
|
const older = cursor ? `
|
|
100097
100401
|
|
|
100098
100402
|
Older: laze history ${output2.channel} --before ${cursor}` : "";
|
|
100099
|
-
return `${where}${from}: ${
|
|
100403
|
+
return `${where}${from}: ${count19}, oldest first
|
|
100100
100404
|
|
|
100101
100405
|
${blocks}${older}
|
|
100102
100406
|
`;
|
|
@@ -100189,7 +100493,7 @@ function money2({ amount, currency: currency2 }) {
|
|
|
100189
100493
|
return `${currency2.toUpperCase()} ${Number(amount.toFixed(2))}`;
|
|
100190
100494
|
}
|
|
100191
100495
|
function inviteQuoteText(quote4) {
|
|
100192
|
-
const
|
|
100496
|
+
const at9 = (amount) => money2({ amount, currency: quote4.currency });
|
|
100193
100497
|
const people2 = `${quote4.peopleAfter} ${quote4.peopleAfter === 1 ? "person" : "people"}`;
|
|
100194
100498
|
const seats = quote4.freeSeatsLeft ? ` ${quote4.freeSeatsLeft} free ${quote4.freeSeatsLeft === 1 ? "seat" : "seats"} left.` : "";
|
|
100195
100499
|
if (quote4.plan === "free" && !quote4.upgradeNeeded) {
|
|
@@ -100199,11 +100503,11 @@ function inviteQuoteText(quote4) {
|
|
|
100199
100503
|
return `Your plan holds ${quote4.seatCap} people, at no charge.
|
|
100200
100504
|
`;
|
|
100201
100505
|
}
|
|
100202
|
-
const price = `${
|
|
100506
|
+
const price = `${at9(quote4.monthlyAfter)} a month for ${people2} (${at9(quote4.perPersonAfter)} per person).${seats}`;
|
|
100203
100507
|
if (quote4.upgradeNeeded)
|
|
100204
100508
|
return `Team: ${price} This starts Team, paid through Stripe Checkout.
|
|
100205
100509
|
`;
|
|
100206
|
-
const change2 = quote4.monthlyAfter === quote4.monthlyNow ? "No change to your price." : `Was ${
|
|
100510
|
+
const change2 = quote4.monthlyAfter === quote4.monthlyNow ? "No change to your price." : `Was ${at9(quote4.monthlyNow)}; the change is prorated as each person joins.`;
|
|
100207
100511
|
return `New price: ${price} ${change2}
|
|
100208
100512
|
`;
|
|
100209
100513
|
}
|
|
@@ -100339,7 +100643,15 @@ var IP_USAGE = `Usage:
|
|
|
100339
100643
|
laze ip domains add|remove <domain>... change them; laze ip domains reset brings the defaults back
|
|
100340
100644
|
laze ip scope all|sites all web traffic, or only your domains
|
|
100341
100645
|
laze ip offer [--site <domain>] the plain offer to pass on when a site blocks the shared address
|
|
100342
|
-
laze ip list who has one, its country and price (Owners and Admins)
|
|
100646
|
+
laze ip list who has one, its country and price (Owners and Admins)
|
|
100647
|
+
laze ip mine every dedicated IP you hold and the machine it is on
|
|
100648
|
+
laze ip buy <country> [--machine <m>] buy one more, optionally straight onto a machine
|
|
100649
|
+
laze ip attach <ip id> <machine> put one of yours on a machine; its old one comes off
|
|
100650
|
+
laze ip detach <machine> put a machine back on the shared address
|
|
100651
|
+
laze ip release <ip id> give one back; its charge stops
|
|
100652
|
+
laze ip sites <ip id> all|sites [add|remove <domain>...] what one of yours carries
|
|
100653
|
+
laze ip machines the IP address of each machine you see
|
|
100654
|
+
A machine is "default" (your default computer), a computer id, or browser:<machine id>.`;
|
|
100343
100655
|
var printJson7 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
|
|
100344
100656
|
`);
|
|
100345
100657
|
var OFF_REASONS = {
|
|
@@ -100464,6 +100776,98 @@ async function list9({ context, args }) {
|
|
|
100464
100776
|
${lines2.join("\n")}
|
|
100465
100777
|
`);
|
|
100466
100778
|
}
|
|
100779
|
+
function machineArgOf(word3) {
|
|
100780
|
+
if (!word3) return void 0;
|
|
100781
|
+
if (word3.startsWith("browser:")) {
|
|
100782
|
+
const machineId = word3.slice("browser:".length);
|
|
100783
|
+
return machineId ? { kind: "browser", machineId } : void 0;
|
|
100784
|
+
}
|
|
100785
|
+
return { kind: "computer", computerId: word3 };
|
|
100786
|
+
}
|
|
100787
|
+
function heldLine2(ip2) {
|
|
100788
|
+
const address = ip2.address ?? (ip2.state === "on" ? "dedicated" : "being bought");
|
|
100789
|
+
const mode = ip2.scope === "all" ? "all web traffic" : "only some sites";
|
|
100790
|
+
const machine2 = ip2.machine?.name ?? "not attached";
|
|
100791
|
+
return ` ${ip2.id} ${address} ${ip2.country.name} ${machine2} ${mode} ${ip2.monthlyPrice} a month`;
|
|
100792
|
+
}
|
|
100793
|
+
async function mine3({ context, args }) {
|
|
100794
|
+
const client = await computeClient({ context, args });
|
|
100795
|
+
const answer6 = await client.get(HELD_IP_REST_PATHS.mine);
|
|
100796
|
+
if (args.flags.json) return printJson7(context, answer6);
|
|
100797
|
+
if (!answer6.available) return context.out("Dedicated IPs are not available on this Laze.\n");
|
|
100798
|
+
if (answer6.ips.length === 0) return context.out("You hold no dedicated IP.\n");
|
|
100799
|
+
context.out(`Your dedicated IPs:
|
|
100800
|
+
${answer6.ips.map(heldLine2).join("\n")}
|
|
100801
|
+
`);
|
|
100802
|
+
}
|
|
100803
|
+
async function printHeld({ context, args }, answer6) {
|
|
100804
|
+
if (args.flags.json) return printJson7(context, answer6);
|
|
100805
|
+
context.out(`${answer6.message}
|
|
100806
|
+
`);
|
|
100807
|
+
}
|
|
100808
|
+
async function buy(run4) {
|
|
100809
|
+
const country = run4.args.words.slice(2).join(" ").trim();
|
|
100810
|
+
if (!country) throw new CliUsageError(IP_USAGE);
|
|
100811
|
+
const flag2 = run4.args.flags.machine;
|
|
100812
|
+
const machine2 = machineArgOf(typeof flag2 === "string" ? flag2 : void 0) ?? null;
|
|
100813
|
+
const client = await computeClient(run4);
|
|
100814
|
+
await printHeld(
|
|
100815
|
+
run4,
|
|
100816
|
+
await client.post(HELD_IP_REST_PATHS.buy, { country, machine: machine2 })
|
|
100817
|
+
);
|
|
100818
|
+
}
|
|
100819
|
+
async function attach(run4) {
|
|
100820
|
+
const [, , ipId, word3] = run4.args.words;
|
|
100821
|
+
const machine2 = machineArgOf(word3);
|
|
100822
|
+
if (!ipId || !machine2) throw new CliUsageError(IP_USAGE);
|
|
100823
|
+
const client = await computeClient(run4);
|
|
100824
|
+
await printHeld(
|
|
100825
|
+
run4,
|
|
100826
|
+
await client.post(HELD_IP_REST_PATHS.attach, { ipId, machine: machine2 })
|
|
100827
|
+
);
|
|
100828
|
+
}
|
|
100829
|
+
async function detach(run4) {
|
|
100830
|
+
const machine2 = machineArgOf(run4.args.words[2]);
|
|
100831
|
+
if (!machine2) throw new CliUsageError(IP_USAGE);
|
|
100832
|
+
const client = await computeClient(run4);
|
|
100833
|
+
await printHeld(run4, await client.post(HELD_IP_REST_PATHS.detach, { machine: machine2 }));
|
|
100834
|
+
}
|
|
100835
|
+
async function release2(run4) {
|
|
100836
|
+
const ipId = run4.args.words[2];
|
|
100837
|
+
if (!ipId) throw new CliUsageError(IP_USAGE);
|
|
100838
|
+
const client = await computeClient(run4);
|
|
100839
|
+
await printHeld(run4, await client.post(HELD_IP_REST_PATHS.release, { ipId }));
|
|
100840
|
+
}
|
|
100841
|
+
async function sites(run4) {
|
|
100842
|
+
const [, , ipId, mode, action, ...names] = run4.args.words;
|
|
100843
|
+
const parsed = dedicatedIpScopeSchema.safeParse(mode);
|
|
100844
|
+
if (!ipId || !parsed.success) throw new CliUsageError(IP_USAGE);
|
|
100845
|
+
const edit = action ? domainsEditOf({ action, names }) : {};
|
|
100846
|
+
if (!edit) throw new CliUsageError(IP_USAGE);
|
|
100847
|
+
const client = await computeClient(run4);
|
|
100848
|
+
await printHeld(
|
|
100849
|
+
run4,
|
|
100850
|
+
await client.post(HELD_IP_REST_PATHS.sites, {
|
|
100851
|
+
ipId,
|
|
100852
|
+
scope: parsed.data,
|
|
100853
|
+
...edit
|
|
100854
|
+
})
|
|
100855
|
+
);
|
|
100856
|
+
}
|
|
100857
|
+
async function machines({ context, args }) {
|
|
100858
|
+
const client = await computeClient({ context, args });
|
|
100859
|
+
const answer6 = await client.get(HELD_IP_REST_PATHS.machines);
|
|
100860
|
+
if (args.flags.json) return printJson7(context, answer6);
|
|
100861
|
+
const lines2 = answer6.machines.map(({ machine: machine2, ip: ip2 }) => {
|
|
100862
|
+
const name3 = machine2.kind === "browser" ? `browser:${machine2.machineId}` : machine2.computerId;
|
|
100863
|
+
if (!ip2) return ` ${name3} Shared`;
|
|
100864
|
+
const address = ip2.address ?? "Dedicated";
|
|
100865
|
+
return ` ${name3} ${address} ${ip2.country.name} ${ip2.holderName}'s`;
|
|
100866
|
+
});
|
|
100867
|
+
context.out(`IP addresses:
|
|
100868
|
+
${lines2.join("\n")}
|
|
100869
|
+
`);
|
|
100870
|
+
}
|
|
100467
100871
|
var IP_COMMANDS = {
|
|
100468
100872
|
status: status5,
|
|
100469
100873
|
on: turnOn,
|
|
@@ -100472,7 +100876,14 @@ var IP_COMMANDS = {
|
|
|
100472
100876
|
domains: domains2,
|
|
100473
100877
|
scope: scope2,
|
|
100474
100878
|
offer,
|
|
100475
|
-
list: list9
|
|
100879
|
+
list: list9,
|
|
100880
|
+
mine: mine3,
|
|
100881
|
+
buy,
|
|
100882
|
+
attach,
|
|
100883
|
+
detach,
|
|
100884
|
+
release: release2,
|
|
100885
|
+
sites,
|
|
100886
|
+
machines
|
|
100476
100887
|
};
|
|
100477
100888
|
async function ip({ context, args }) {
|
|
100478
100889
|
const name3 = args.words[1] ?? "status";
|
|
@@ -100785,8 +101196,8 @@ var KEYS_USAGE = `Usage:
|
|
|
100785
101196
|
laze keys revoke <id> --any revoke any key of the workspace (admins)`;
|
|
100786
101197
|
var printJson8 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
|
|
100787
101198
|
`);
|
|
100788
|
-
var lastUsed = (
|
|
100789
|
-
async function
|
|
101199
|
+
var lastUsed = (at9) => at9 ? `last used ${at9}` : "never used";
|
|
101200
|
+
async function mine4({ context, args }) {
|
|
100790
101201
|
const { client } = await signedIn({ context, args });
|
|
100791
101202
|
const keys2 = await client.get("/api/api-keys/mine");
|
|
100792
101203
|
if (args.flags.json) return printJson8(context, keys2);
|
|
@@ -100867,7 +101278,7 @@ async function revoke2({ context, args }) {
|
|
|
100867
101278
|
context.out(`Revoked ${apiKeyId}.
|
|
100868
101279
|
`);
|
|
100869
101280
|
}
|
|
100870
|
-
var KEY_COMMANDS = { mine:
|
|
101281
|
+
var KEY_COMMANDS = { mine: mine4, list: list10, create: create3, revoke: revoke2 };
|
|
100871
101282
|
async function keys({ context, args }) {
|
|
100872
101283
|
const name3 = args.words[1] ?? "mine";
|
|
100873
101284
|
const command = Object.hasOwn(KEY_COMMANDS, name3) ? KEY_COMMANDS[name3] : void 0;
|
|
@@ -101011,7 +101422,7 @@ async function pollOrCancel({
|
|
|
101011
101422
|
throw error63;
|
|
101012
101423
|
}
|
|
101013
101424
|
}
|
|
101014
|
-
async function
|
|
101425
|
+
async function mine5({ context, args }) {
|
|
101015
101426
|
const on = args.flags.on !== void 0;
|
|
101016
101427
|
const off = args.flags.off !== void 0;
|
|
101017
101428
|
if (on === off) throw new CliUsageError(`Pick --on or --off.
|
|
@@ -101134,7 +101545,7 @@ var LANGWATCH_COMMANDS = {
|
|
|
101134
101545
|
level,
|
|
101135
101546
|
test,
|
|
101136
101547
|
remove: remove7,
|
|
101137
|
-
mine:
|
|
101548
|
+
mine: mine5,
|
|
101138
101549
|
agent,
|
|
101139
101550
|
agents
|
|
101140
101551
|
};
|
|
@@ -101158,8 +101569,8 @@ var MACHINE_ACCESS_USAGE = [
|
|
|
101158
101569
|
" laze machine grant|revoke <machine> --member <userId> | --agent <agentId> share it or stop (owner)",
|
|
101159
101570
|
" laze machine budget <machine> <usd> [--period day|week|month] its spend cap (owner)"
|
|
101160
101571
|
].join("\n");
|
|
101161
|
-
function wordAt7({ args, at:
|
|
101162
|
-
const value = args.words[
|
|
101572
|
+
function wordAt7({ args, at: at9 }) {
|
|
101573
|
+
const value = args.words[at9];
|
|
101163
101574
|
if (!value) throw new CliUsageError(`Usage:
|
|
101164
101575
|
${MACHINE_ACCESS_USAGE}`);
|
|
101165
101576
|
return value;
|
|
@@ -101342,8 +101753,8 @@ async function trustHostKey({ context, args }) {
|
|
|
101342
101753
|
const hostKey = args.words[3];
|
|
101343
101754
|
const client = await computeClient({ context, args });
|
|
101344
101755
|
if (!hostKey) {
|
|
101345
|
-
const
|
|
101346
|
-
const offered =
|
|
101756
|
+
const machines2 = await client.get(COMPUTE_REST_PATHS.machines);
|
|
101757
|
+
const offered = machines2.find((one) => one.name === name3)?.ssh?.offeredHostKey;
|
|
101347
101758
|
if (!offered) return context.out(`${name3} offered no new host key.
|
|
101348
101759
|
`);
|
|
101349
101760
|
return context.out(
|
|
@@ -101363,12 +101774,12 @@ Check it on the machine (ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub, or th
|
|
|
101363
101774
|
}
|
|
101364
101775
|
async function list11({ context, args }) {
|
|
101365
101776
|
const client = await computeClient({ context, args });
|
|
101366
|
-
const
|
|
101367
|
-
if (args.flags.json) return context.out(`${JSON.stringify(
|
|
101777
|
+
const machines2 = await client.get(COMPUTE_REST_PATHS.machines);
|
|
101778
|
+
if (args.flags.json) return context.out(`${JSON.stringify(machines2, null, 2)}
|
|
101368
101779
|
`);
|
|
101369
|
-
if (
|
|
101780
|
+
if (machines2.length === 0)
|
|
101370
101781
|
return context.out("No machines. A person connects one with `laze machine connect <name>`.\n");
|
|
101371
|
-
for (const machine2 of
|
|
101782
|
+
for (const machine2 of machines2) context.out(listLine({ machine: machine2, base: client.baseUrl }));
|
|
101372
101783
|
}
|
|
101373
101784
|
async function health({ context, args }) {
|
|
101374
101785
|
const client = await computeClient({ context, args });
|
|
@@ -101445,10 +101856,10 @@ ${USAGE13}`);
|
|
|
101445
101856
|
if ("exitCode" in released) return released;
|
|
101446
101857
|
Object.assign(env, released.env);
|
|
101447
101858
|
}
|
|
101448
|
-
const
|
|
101449
|
-
if (
|
|
101859
|
+
const count19 = Object.keys(env).length;
|
|
101860
|
+
if (count19 > EXEC_ENV_MAX) {
|
|
101450
101861
|
context.err(
|
|
101451
|
-
`laze: these connections hold ${
|
|
101862
|
+
`laze: these connections hold ${count19} variables; at most ${EXEC_ENV_MAX} go with a command. Send fewer connections, or run the command with \`laze vault run\` where you run.
|
|
101452
101863
|
`
|
|
101453
101864
|
);
|
|
101454
101865
|
return { exitCode: 1 };
|
|
@@ -101605,7 +102016,7 @@ function secretRefusal({
|
|
|
101605
102016
|
rules = MCP_SECRET_COMMANDS
|
|
101606
102017
|
}) {
|
|
101607
102018
|
const { words, flags: flags2 } = parseArgs({ argv });
|
|
101608
|
-
const command = [3, 2, 1].map((
|
|
102019
|
+
const command = [3, 2, 1].map((count19) => words.slice(0, count19).join(" ")).find((name3) => Object.hasOwn(rules, name3));
|
|
101609
102020
|
const rule = command === void 0 ? void 0 : rules[command];
|
|
101610
102021
|
if (!command || !rule) return void 0;
|
|
101611
102022
|
const vaultFlag = rule.vaultFlag ?? "from-vault";
|
|
@@ -102356,11 +102767,11 @@ async function monitorAdd({ context, args }) {
|
|
|
102356
102767
|
});
|
|
102357
102768
|
if (args.flags.json) return context.out(`${JSON.stringify(added, null, 2)}
|
|
102358
102769
|
`);
|
|
102359
|
-
const
|
|
102770
|
+
const count19 = added.watching.length;
|
|
102360
102771
|
context.out(
|
|
102361
102772
|
`${added.monitor.id} ${added.monitor.name}
|
|
102362
102773
|
${added.watching.join(" ")}
|
|
102363
|
-
Watching ${
|
|
102774
|
+
Watching ${count19} ${count19 === 1 ? "channel" : "channels"}
|
|
102364
102775
|
`
|
|
102365
102776
|
);
|
|
102366
102777
|
}
|
|
@@ -102698,7 +103109,7 @@ import { dirname as dirname24, join as join34 } from "node:path";
|
|
|
102698
103109
|
var OPERATOR_KEY = {
|
|
102699
103110
|
lifetimeMinutes: 60,
|
|
102700
103111
|
/** A key nobody answered expires this long after it was asked for. */
|
|
102701
|
-
pendingMinutes:
|
|
103112
|
+
pendingMinutes: 120,
|
|
102702
103113
|
/** Requests one API key may have waiting at once. */
|
|
102703
103114
|
maxWaiting: 3
|
|
102704
103115
|
};
|
|
@@ -102724,6 +103135,8 @@ var argsDefinition = external_exports.record(
|
|
|
102724
103135
|
external_exports.string().max(64),
|
|
102725
103136
|
external_exports.union([external_exports.string().max(200), external_exports.number(), external_exports.boolean(), external_exports.null()])
|
|
102726
103137
|
);
|
|
103138
|
+
var OPERATOR_KEY_ASK_SOURCES = ["agent", "cli", "by_hand"];
|
|
103139
|
+
var operatorKeyAskSourceSchema = external_exports.enum(OPERATOR_KEY_ASK_SOURCES);
|
|
102727
103140
|
var operatorKeyStatusSchema = external_exports.enum([
|
|
102728
103141
|
"pending",
|
|
102729
103142
|
"approved",
|
|
@@ -102761,6 +103174,12 @@ var keyDefinition = external_exports.object({
|
|
|
102761
103174
|
askerName: external_exports.string().optional(),
|
|
102762
103175
|
/** The workspace of the API key that asked, where the card lands. */
|
|
102763
103176
|
askerWorkspaceId: external_exports.string(),
|
|
103177
|
+
/** Where the ask came from; null on a key stored before this was recorded, read as by hand. */
|
|
103178
|
+
askedVia: operatorKeyAskSourceSchema.nullable().default(null),
|
|
103179
|
+
/** The machine a CLI ask came from, as its `laze login` named it; null for any other. */
|
|
103180
|
+
askedFrom: external_exports.string().nullable().default(null),
|
|
103181
|
+
/** The person who made the asking key, by name; absent when it cannot be read. */
|
|
103182
|
+
askerPersonName: external_exports.string().optional(),
|
|
102764
103183
|
requestedAt: external_exports.iso.datetime(),
|
|
102765
103184
|
pendingUntil: external_exports.iso.datetime(),
|
|
102766
103185
|
decidedBy: external_exports.string().nullable(),
|
|
@@ -102806,7 +103225,7 @@ var OPERATOR_KEY_COPY = {
|
|
|
102806
103225
|
operator_key_too_many_waiting: `At most ${OPERATOR_KEY.maxWaiting} keys can wait at once`,
|
|
102807
103226
|
operator_key_not_found: "There is no such operator key",
|
|
102808
103227
|
operator_key_not_pending: "This key was already answered or has expired",
|
|
102809
|
-
operator_key_self_approval: "You asked for this
|
|
103228
|
+
operator_key_self_approval: "You asked for this with your own login, so another staff member has to approve it.",
|
|
102810
103229
|
operator_key_not_live: "This key is not approved, or its time is over",
|
|
102811
103230
|
operator_key_proof_refused: "The operator passkey did not confirm this approval",
|
|
102812
103231
|
operator_key_refused: "This key does not work here"
|
|
@@ -102856,9 +103275,9 @@ var viewDefinition = external_exports.object({
|
|
|
102856
103275
|
|
|
102857
103276
|
// ../../modules/rum/contract/src/browser-trace-reads.ts
|
|
102858
103277
|
var browserSessionIdSchema = external_exports.string().regex(/^[0-9a-f]{32}$/, "a session id: 32 hex characters");
|
|
102859
|
-
var
|
|
103278
|
+
var at7 = external_exports.iso.datetime();
|
|
102860
103279
|
var browserErrorDefinition = external_exports.object({
|
|
102861
|
-
at:
|
|
103280
|
+
at: at7,
|
|
102862
103281
|
traceId: external_exports.string(),
|
|
102863
103282
|
spanId: external_exports.string(),
|
|
102864
103283
|
sessionId: external_exports.string().nullable(),
|
|
@@ -102875,7 +103294,7 @@ var browserErrorDefinition = external_exports.object({
|
|
|
102875
103294
|
});
|
|
102876
103295
|
var browserErrorSchema = browserErrorDefinition;
|
|
102877
103296
|
var sessionSpanDefinition = external_exports.object({
|
|
102878
|
-
at:
|
|
103297
|
+
at: at7,
|
|
102879
103298
|
durationMs: external_exports.number().nonnegative(),
|
|
102880
103299
|
traceId: external_exports.string(),
|
|
102881
103300
|
spanId: external_exports.string(),
|
|
@@ -102892,7 +103311,7 @@ var sessionSpanDefinition = external_exports.object({
|
|
|
102892
103311
|
var sessionSpanSchema = sessionSpanDefinition;
|
|
102893
103312
|
var tracedServiceSchema = external_exports.string().regex(/^[a-z][a-z0-9.-]{0,63}$/, "a service name: lower case letters, digits, dots and dashes");
|
|
102894
103313
|
var serviceTraceDefinition = external_exports.object({
|
|
102895
|
-
at:
|
|
103314
|
+
at: at7,
|
|
102896
103315
|
durationMs: external_exports.number().nonnegative(),
|
|
102897
103316
|
traceId: external_exports.string(),
|
|
102898
103317
|
/** The trace's root span name and service, as Tempo summarises it; null when no root arrived. */
|
|
@@ -102900,6 +103319,23 @@ var serviceTraceDefinition = external_exports.object({
|
|
|
102900
103319
|
rootService: external_exports.string().nullable()
|
|
102901
103320
|
});
|
|
102902
103321
|
var serviceTraceSchema = serviceTraceDefinition;
|
|
103322
|
+
var tracedProcedureSchema = external_exports.string().regex(
|
|
103323
|
+
/^[a-zA-Z][a-zA-Z0-9.]{0,127}$/,
|
|
103324
|
+
"a procedure: letters, digits and dots, such as chat.post"
|
|
103325
|
+
);
|
|
103326
|
+
var handledErrorCodeSchema = external_exports.string().regex(/^[a-z][a-z0-9_]{0,63}$/, "an error code: lower case letters, digits and underscores");
|
|
103327
|
+
var refusedCallDefinition = external_exports.object({
|
|
103328
|
+
at: at7,
|
|
103329
|
+
durationMs: external_exports.number().nonnegative(),
|
|
103330
|
+
traceId: external_exports.string(),
|
|
103331
|
+
spanId: external_exports.string(),
|
|
103332
|
+
/** The procedure's path and the handled error's code; null when the span carried none. */
|
|
103333
|
+
procedure: external_exports.string().nullable(),
|
|
103334
|
+
code: external_exports.string().nullable(),
|
|
103335
|
+
/** The handled error's fault, `customer` or `system`; null when the span carried none. */
|
|
103336
|
+
fault: external_exports.string().nullable()
|
|
103337
|
+
});
|
|
103338
|
+
var refusedCallSchema = refusedCallDefinition;
|
|
102903
103339
|
|
|
102904
103340
|
// ../../modules/rum/contract/src/rum.api.ts
|
|
102905
103341
|
var RumApi = moduleApi()("rum");
|
|
@@ -103616,17 +104052,17 @@ var wikiMentionedPayloadSchemaDefinition = external_exports.object({
|
|
|
103616
104052
|
}).strict();
|
|
103617
104053
|
|
|
103618
104054
|
// ../../modules/wiki/contract/src/wiki-support-pages.ts
|
|
103619
|
-
var
|
|
103620
|
-
var wikiSupportPageCountDefinition = external_exports.object({ pages:
|
|
104055
|
+
var count16 = external_exports.number().int().nonnegative();
|
|
104056
|
+
var wikiSupportPageCountDefinition = external_exports.object({ pages: count16, workspaces: count16 }).strict();
|
|
103621
104057
|
var wikiSupportPageCountSchema = wikiSupportPageCountDefinition;
|
|
103622
104058
|
|
|
103623
104059
|
// ../../modules/wiki/contract/src/wiki-locked-pages.ts
|
|
103624
104060
|
var WIKI_LOCKED_PAGES_LIMIT = 200;
|
|
103625
|
-
var
|
|
104061
|
+
var count17 = external_exports.number().int().nonnegative();
|
|
103626
104062
|
var id6 = external_exports.string().min(1).max(200);
|
|
103627
104063
|
var wikiLockedPagesDefinition = external_exports.object({
|
|
103628
|
-
pages:
|
|
103629
|
-
workspaces:
|
|
104064
|
+
pages: count17,
|
|
104065
|
+
workspaces: count17,
|
|
103630
104066
|
locked: external_exports.array(external_exports.object({ workspaceId: id6, pageId: id6 }).strict()).max(WIKI_LOCKED_PAGES_LIMIT),
|
|
103631
104067
|
truncated: external_exports.boolean()
|
|
103632
104068
|
}).strict();
|
|
@@ -103690,12 +104126,12 @@ var funnelInputDefinition = external_exports.object({
|
|
|
103690
104126
|
to: external_exports.iso.datetime(),
|
|
103691
104127
|
bucketMinutes: external_exports.union([external_exports.literal(10), external_exports.literal(60), external_exports.literal(1440)]).default(60)
|
|
103692
104128
|
}).strict();
|
|
103693
|
-
var
|
|
104129
|
+
var count18 = external_exports.number().int().nonnegative();
|
|
103694
104130
|
var funnelCountsDefinition = external_exports.object({
|
|
103695
|
-
signUps:
|
|
103696
|
-
workspaces:
|
|
103697
|
-
activatedTeams:
|
|
103698
|
-
payingTeams:
|
|
104131
|
+
signUps: count18,
|
|
104132
|
+
workspaces: count18,
|
|
104133
|
+
activatedTeams: count18,
|
|
104134
|
+
payingTeams: count18
|
|
103699
104135
|
});
|
|
103700
104136
|
var funnelOutputDefinition = external_exports.object({
|
|
103701
104137
|
bucketMinutes: external_exports.number().int(),
|
|
@@ -103724,34 +104160,34 @@ var cohortOutputDefinition = external_exports.object({
|
|
|
103724
104160
|
promotionId: external_exports.string().nullable(),
|
|
103725
104161
|
plan: external_exports.string(),
|
|
103726
104162
|
paying: external_exports.boolean(),
|
|
103727
|
-
members:
|
|
104163
|
+
members: count18,
|
|
103728
104164
|
agents: external_exports.object({
|
|
103729
|
-
laze:
|
|
103730
|
-
connected:
|
|
104165
|
+
laze: count18,
|
|
104166
|
+
connected: count18,
|
|
103731
104167
|
firstLazeAgentAt: external_exports.iso.datetime().nullable()
|
|
103732
104168
|
}),
|
|
103733
|
-
turns:
|
|
103734
|
-
appsCreated:
|
|
103735
|
-
connectionsLinked:
|
|
104169
|
+
turns: count18,
|
|
104170
|
+
appsCreated: count18,
|
|
104171
|
+
connectionsLinked: count18,
|
|
103736
104172
|
/** Slack channels mirrored, Slack and Discord link and intake events, WhatsApp mirrors on. */
|
|
103737
104173
|
messaging: external_exports.object({
|
|
103738
|
-
slackChannels:
|
|
103739
|
-
slackEvents:
|
|
103740
|
-
discordEvents:
|
|
103741
|
-
whatsappMirrors:
|
|
104174
|
+
slackChannels: count18,
|
|
104175
|
+
slackEvents: count18,
|
|
104176
|
+
discordEvents: count18,
|
|
104177
|
+
whatsappMirrors: count18
|
|
103742
104178
|
}),
|
|
103743
104179
|
creatorLastMessageAt: external_exports.iso.datetime().nullable(),
|
|
103744
104180
|
/** The creator's last heartbeat from a Laze web or desktop window here; null when never. */
|
|
103745
104181
|
creatorLastSeenAt: external_exports.iso.datetime().nullable(),
|
|
103746
104182
|
/** Members whose last heartbeat here falls in the 7 days before `until`. */
|
|
103747
|
-
peopleSeenLast7Days:
|
|
104183
|
+
peopleSeenLast7Days: count18,
|
|
103748
104184
|
/** Live messages per UTC day; days with none are left out. */
|
|
103749
104185
|
days: external_exports.array(
|
|
103750
104186
|
external_exports.object({
|
|
103751
104187
|
day: external_exports.string(),
|
|
103752
|
-
byPeople:
|
|
103753
|
-
byAgents:
|
|
103754
|
-
people:
|
|
104188
|
+
byPeople: count18,
|
|
104189
|
+
byAgents: count18,
|
|
104190
|
+
people: count18
|
|
103755
104191
|
})
|
|
103756
104192
|
),
|
|
103757
104193
|
/** The once-only sends nurturing kept (first_agent_made, first_agent_nudge, ...). */
|
|
@@ -103775,29 +104211,29 @@ var capacityOutputDefinition = external_exports.object({
|
|
|
103775
104211
|
/** The last day of host load, oldest first. */
|
|
103776
104212
|
history: external_exports.array(hostLoadPointSchema)
|
|
103777
104213
|
});
|
|
103778
|
-
var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count:
|
|
104214
|
+
var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count: count18 }));
|
|
103779
104215
|
var snapshotOutputDefinition = external_exports.object({
|
|
103780
104216
|
workspaceId: external_exports.string(),
|
|
103781
104217
|
createdAt: external_exports.iso.datetime(),
|
|
103782
104218
|
plan: external_exports.string(),
|
|
103783
104219
|
status: external_exports.string(),
|
|
103784
|
-
seats: external_exports.object({ people:
|
|
104220
|
+
seats: external_exports.object({ people: count18, limit: external_exports.number().int().nullable() }),
|
|
103785
104221
|
membersByRole: tally,
|
|
103786
104222
|
invitesByStatus: tally,
|
|
103787
104223
|
agentsByKind: tally,
|
|
103788
104224
|
agentsByHosting: tally,
|
|
103789
|
-
agentsConnected:
|
|
104225
|
+
agentsConnected: count18,
|
|
103790
104226
|
flagsOn: external_exports.array(external_exports.string()),
|
|
103791
|
-
complimentaryComputers:
|
|
104227
|
+
complimentaryComputers: count18
|
|
103792
104228
|
});
|
|
103793
104229
|
var eventsInputDefinition = external_exports.object({ from: external_exports.iso.datetime(), to: external_exports.iso.datetime() }).strict();
|
|
103794
104230
|
var eventCountsDefinition = external_exports.object({
|
|
103795
|
-
total:
|
|
104231
|
+
total: count18,
|
|
103796
104232
|
/** Per type: how many, and the stored bytes of their payloads and sealed copies. */
|
|
103797
104233
|
byType: external_exports.array(
|
|
103798
104234
|
external_exports.object({
|
|
103799
104235
|
eventType: external_exports.string(),
|
|
103800
|
-
count:
|
|
104236
|
+
count: count18,
|
|
103801
104237
|
payloadBytes: external_exports.number().nonnegative(),
|
|
103802
104238
|
encryptedCopyBytes: external_exports.number().nonnegative()
|
|
103803
104239
|
})
|
|
@@ -103851,9 +104287,9 @@ var databaseHealthDefinition = external_exports.object({
|
|
|
103851
104287
|
deadlocks: external_exports.number().nonnegative(),
|
|
103852
104288
|
tempBytes: external_exports.number().nonnegative(),
|
|
103853
104289
|
connections: external_exports.object({
|
|
103854
|
-
total:
|
|
103855
|
-
byState: external_exports.array(external_exports.object({ state: external_exports.string(), count:
|
|
103856
|
-
waitingOnLocks:
|
|
104290
|
+
total: count18,
|
|
104291
|
+
byState: external_exports.array(external_exports.object({ state: external_exports.string(), count: count18 })),
|
|
104292
|
+
waitingOnLocks: count18,
|
|
103857
104293
|
longestActiveSeconds: external_exports.number().nonnegative(),
|
|
103858
104294
|
longestIdleInTransactionSeconds: external_exports.number().nonnegative()
|
|
103859
104295
|
}),
|
|
@@ -103908,7 +104344,7 @@ var tenantAgentsDefinition = external_exports.object({
|
|
|
103908
104344
|
createdAt: external_exports.iso.datetime(),
|
|
103909
104345
|
modelLevel: external_exports.string().nullable(),
|
|
103910
104346
|
model: external_exports.string().nullable(),
|
|
103911
|
-
channels:
|
|
104347
|
+
channels: count18,
|
|
103912
104348
|
limitedUntil: external_exports.iso.datetime().nullable(),
|
|
103913
104349
|
limitedBy: external_exports.string().nullable(),
|
|
103914
104350
|
pausedAt: external_exports.iso.datetime().nullable(),
|
|
@@ -103962,8 +104398,8 @@ var tenantBillingDefinition = external_exports.object({
|
|
|
103962
104398
|
currencyChosen: external_exports.boolean(),
|
|
103963
104399
|
cancelAtPeriodEnd: external_exports.boolean(),
|
|
103964
104400
|
period: external_exports.object({ start: external_exports.iso.datetime(), end: external_exports.iso.datetime() }).nullable(),
|
|
103965
|
-
seats: external_exports.object({ people:
|
|
103966
|
-
complimentarySeats:
|
|
104401
|
+
seats: external_exports.object({ people: count18, limit: count18.nullable(), monthlyPrice: external_exports.number() }),
|
|
104402
|
+
complimentarySeats: count18.nullable(),
|
|
103967
104403
|
credits: external_exports.object({
|
|
103968
104404
|
included: external_exports.number(),
|
|
103969
104405
|
includedLeft: external_exports.number(),
|
|
@@ -104002,14 +104438,14 @@ var tenantVaultDefinition = external_exports.object({
|
|
|
104002
104438
|
external_exports.object({
|
|
104003
104439
|
subject: external_exports.string(),
|
|
104004
104440
|
most: external_exports.string(),
|
|
104005
|
-
maxLeaseSeconds:
|
|
104441
|
+
maxLeaseSeconds: count18.nullable(),
|
|
104006
104442
|
blocked: external_exports.boolean(),
|
|
104007
104443
|
approveNew: external_exports.boolean(),
|
|
104008
104444
|
updatedAt: external_exports.iso.datetime()
|
|
104009
104445
|
})
|
|
104010
104446
|
),
|
|
104011
104447
|
/** Connections waiting for an admin, counted by kind; never a name, label or field. */
|
|
104012
|
-
waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count:
|
|
104448
|
+
waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count: count18 }))
|
|
104013
104449
|
});
|
|
104014
104450
|
var WHATSAPP_INTAKE_KEY_KINDS = ["msg", "edit", "del", "react", "read"];
|
|
104015
104451
|
var tenantWhatsappInputDefinition = external_exports.object({
|
|
@@ -104022,17 +104458,17 @@ var tenantWhatsappOutputDefinition = external_exports.object({
|
|
|
104022
104458
|
intake: external_exports.object({
|
|
104023
104459
|
since: external_exports.iso.datetime(),
|
|
104024
104460
|
until: external_exports.iso.datetime(),
|
|
104025
|
-
total:
|
|
104461
|
+
total: count18,
|
|
104026
104462
|
byKind: external_exports.array(
|
|
104027
104463
|
external_exports.object({
|
|
104028
104464
|
kind: external_exports.enum([...WHATSAPP_INTAKE_KEY_KINDS, "other"]),
|
|
104029
|
-
count:
|
|
104465
|
+
count: count18,
|
|
104030
104466
|
/** Events dated over a second after Laze got them, and the most ahead: a fast clock. */
|
|
104031
|
-
aheadOfLaze: external_exports.object({ count:
|
|
104467
|
+
aheadOfLaze: external_exports.object({ count: count18, maxAheadMs: external_exports.number().int() }).optional()
|
|
104032
104468
|
})
|
|
104033
104469
|
),
|
|
104034
104470
|
/** The workspace's chat messages and changes dated over a second after Laze stored them. */
|
|
104035
|
-
chatAheadOfLaze: external_exports.object({ count:
|
|
104471
|
+
chatAheadOfLaze: external_exports.object({ count: count18, maxAheadMs: external_exports.number().int() }).optional()
|
|
104036
104472
|
})
|
|
104037
104473
|
});
|
|
104038
104474
|
var computerBrowserInputDefinition = external_exports.object({
|
|
@@ -104074,6 +104510,10 @@ var computerBrowserOutputDefinition = external_exports.object({
|
|
|
104074
104510
|
var chatReadsInputDefinition = external_exports.object({
|
|
104075
104511
|
userId: external_exports.string().trim().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/)
|
|
104076
104512
|
}).strict();
|
|
104513
|
+
var opsId = external_exports.string().trim().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
104514
|
+
var chatAuthorsInputDefinition = external_exports.object({ channelId: opsId.optional(), agentId: opsId.optional() }).strict().refine((input2) => input2.channelId === void 0 !== (input2.agentId === void 0), {
|
|
104515
|
+
message: "Give a channelId or an agentId, not both."
|
|
104516
|
+
});
|
|
104077
104517
|
var linkDomainsInputDefinition = external_exports.object({
|
|
104078
104518
|
limit: external_exports.number().int().min(1).max(300).default(200),
|
|
104079
104519
|
cursor: external_exports.string().max(64).regex(/^[A-Za-z0-9_-]+$/).optional()
|
|
@@ -104158,6 +104598,18 @@ var feedCountsInputDefinition = external_exports.object({
|
|
|
104158
104598
|
cursor: cursorDefinition.optional()
|
|
104159
104599
|
}).strict();
|
|
104160
104600
|
var feedCountsOutputDefinition = external_exports.object({ counts: pageOf(feedOpsCountRowSchema) });
|
|
104601
|
+
var pushOutcomesInputDefinition = external_exports.object({
|
|
104602
|
+
from: external_exports.iso.datetime(),
|
|
104603
|
+
to: external_exports.iso.datetime(),
|
|
104604
|
+
userId: external_exports.string().trim().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/).optional(),
|
|
104605
|
+
limit: external_exports.number().int().min(1).max(500).default(200),
|
|
104606
|
+
cursor: cursorDefinition.optional()
|
|
104607
|
+
}).strict();
|
|
104608
|
+
var pushOutcomesOutputDefinition = external_exports.object({
|
|
104609
|
+
outcomes: pageOf(pushOutcomeRowSchema),
|
|
104610
|
+
byDay: external_exports.array(pushOutcomeDayRowSchema),
|
|
104611
|
+
installs: external_exports.array(pushInstallRowSchema)
|
|
104612
|
+
});
|
|
104161
104613
|
var variableReferenceKeysInputDefinition = external_exports.object({
|
|
104162
104614
|
limit: external_exports.number().int().min(1).max(500).default(100),
|
|
104163
104615
|
cursor: cursorDefinition.optional()
|
|
@@ -104215,6 +104667,17 @@ var serviceTracesInputDefinition = external_exports.object({
|
|
|
104215
104667
|
cursor: cursorDefinition.optional()
|
|
104216
104668
|
}).strict();
|
|
104217
104669
|
var serviceTracesOutputDefinition = external_exports.object({ traces: pageOf(serviceTraceSchema) });
|
|
104670
|
+
var refusedCallsInputDefinition = external_exports.object({
|
|
104671
|
+
from: external_exports.iso.datetime(),
|
|
104672
|
+
to: external_exports.iso.datetime(),
|
|
104673
|
+
/** The procedure's path, such as `chat.post`; every procedure when absent. */
|
|
104674
|
+
procedure: tracedProcedureSchema.optional(),
|
|
104675
|
+
/** The handled error's code, such as `message_not_found`; every code when absent. */
|
|
104676
|
+
code: handledErrorCodeSchema.optional(),
|
|
104677
|
+
limit: external_exports.number().int().min(1).max(500).default(100),
|
|
104678
|
+
cursor: cursorDefinition.optional()
|
|
104679
|
+
}).strict();
|
|
104680
|
+
var refusedCallsOutputDefinition = external_exports.object({ calls: pageOf(refusedCallSchema) });
|
|
104218
104681
|
var supportRenotifyInputDefinition = external_exports.object({
|
|
104219
104682
|
since: external_exports.iso.datetime(),
|
|
104220
104683
|
staffUserId: external_exports.string().min(1).max(64).optional(),
|
|
@@ -104364,6 +104827,13 @@ var OPS_FUNCTIONS = {
|
|
|
104364
104827
|
input: feedCountsInputDefinition,
|
|
104365
104828
|
output: feedCountsOutputDefinition
|
|
104366
104829
|
}),
|
|
104830
|
+
"tenant.push_outcomes": entry({
|
|
104831
|
+
title: "One workspace's phone pushes over a range: queued, delivered, failed and held, by code",
|
|
104832
|
+
scope: "tenant",
|
|
104833
|
+
view: "table",
|
|
104834
|
+
input: pushOutcomesInputDefinition,
|
|
104835
|
+
output: pushOutcomesOutputDefinition
|
|
104836
|
+
}),
|
|
104367
104837
|
"tenant.vault_connections": entry({
|
|
104368
104838
|
title: "One workspace's vault connections: status, sealing, provider and their audit codes",
|
|
104369
104839
|
scope: "tenant",
|
|
@@ -104392,6 +104862,13 @@ var OPS_FUNCTIONS = {
|
|
|
104392
104862
|
input: chatReadsInputDefinition,
|
|
104393
104863
|
output: chatReadFactsSchema
|
|
104394
104864
|
}),
|
|
104865
|
+
"tenant.chat_authors": entry({
|
|
104866
|
+
title: "Who wrote in one conversation or an agent's conversations: author kinds, ids, counts",
|
|
104867
|
+
scope: "tenant",
|
|
104868
|
+
view: "table",
|
|
104869
|
+
input: chatAuthorsInputDefinition,
|
|
104870
|
+
output: chatAuthorFactsSchema
|
|
104871
|
+
}),
|
|
104395
104872
|
"tenant.link_domains": entry({
|
|
104396
104873
|
title: "One workspace's link preview sites: hosts, link and message counts, path shapes",
|
|
104397
104874
|
scope: "tenant",
|
|
@@ -104470,6 +104947,13 @@ var OPS_FUNCTIONS = {
|
|
|
104470
104947
|
input: serviceTracesInputDefinition,
|
|
104471
104948
|
output: serviceTracesOutputDefinition
|
|
104472
104949
|
}),
|
|
104950
|
+
"traces.refused_calls": entry({
|
|
104951
|
+
title: "tRPC calls refused with an error code over a range: procedure, code, fault, trace ids and times",
|
|
104952
|
+
scope: "platform",
|
|
104953
|
+
view: "table",
|
|
104954
|
+
input: refusedCallsInputDefinition,
|
|
104955
|
+
output: refusedCallsOutputDefinition
|
|
104956
|
+
}),
|
|
104473
104957
|
"wiki.support_pages": entry({
|
|
104474
104958
|
title: "Wiki pages in a Laze Support channel or the staff triage, and their workspaces, as counts",
|
|
104475
104959
|
scope: "platform",
|
|
@@ -104548,21 +105032,31 @@ function typedArg(text3) {
|
|
|
104548
105032
|
}
|
|
104549
105033
|
function argsOf({ args }) {
|
|
104550
105034
|
const pairs = (args.lists.arg ?? []).map((pair) => {
|
|
104551
|
-
const
|
|
104552
|
-
if (
|
|
105035
|
+
const at9 = pair.indexOf("=");
|
|
105036
|
+
if (at9 < 1) throw new CliUsageError(`--arg takes name=value.
|
|
104553
105037
|
${OPERATOR_KEY_USAGE}`);
|
|
104554
|
-
const text3 = pair.slice(
|
|
104555
|
-
return [pair.slice(0,
|
|
105038
|
+
const text3 = pair.slice(at9 + 1);
|
|
105039
|
+
return [pair.slice(0, at9), typedArg(text3)];
|
|
104556
105040
|
});
|
|
104557
105041
|
return Object.fromEntries(pairs);
|
|
104558
105042
|
}
|
|
104559
105043
|
var EXPIRED_LINE = `Expired: nobody answered within ${OPERATOR_KEY.pendingMinutes} minutes. Nothing ran. Ask again with laze ops request.`;
|
|
105044
|
+
function waitingLine(key) {
|
|
105045
|
+
const tail = `Nothing runs until it is approved. It expires at ${key.pendingUntil} if nobody answers.`;
|
|
105046
|
+
if (key.asker !== "person") {
|
|
105047
|
+
return `Waiting for an operator's passkey at /ops/keys. ${tail}`;
|
|
105048
|
+
}
|
|
105049
|
+
if (key.askedVia === "cli" || key.askedVia === "agent") {
|
|
105050
|
+
return `Waiting for your passkey approval at /ops/keys. ${tail}`;
|
|
105051
|
+
}
|
|
105052
|
+
return `Waiting for another staff member's passkey at /ops/keys: you asked with your own login, so you cannot approve it. ${tail}`;
|
|
105053
|
+
}
|
|
104560
105054
|
function statusLine2({ key, nowMs: nowMs2 }) {
|
|
104561
105055
|
switch (key.status) {
|
|
104562
105056
|
case "approved":
|
|
104563
105057
|
return key.action === "ops.functions" ? `Approved until ${key.endsAt}. Run: laze ops call ${key.id} <${key.functions.join("|")}>` : `Approved until ${key.endsAt}. Run: laze ops use ${key.id}`;
|
|
104564
105058
|
case "pending":
|
|
104565
|
-
return Temporal3.Instant.from(key.pendingUntil).epochMilliseconds <= nowMs2 ? EXPIRED_LINE :
|
|
105059
|
+
return Temporal3.Instant.from(key.pendingUntil).epochMilliseconds <= nowMs2 ? EXPIRED_LINE : waitingLine(key);
|
|
104566
105060
|
case "expired":
|
|
104567
105061
|
return EXPIRED_LINE;
|
|
104568
105062
|
case "denied":
|
|
@@ -104811,21 +105305,21 @@ async function startedUpdate({
|
|
|
104811
105305
|
}
|
|
104812
105306
|
async function noteRelease({
|
|
104813
105307
|
context,
|
|
104814
|
-
mine:
|
|
105308
|
+
mine: mine6,
|
|
104815
105309
|
server,
|
|
104816
105310
|
sandbox,
|
|
104817
105311
|
quiet
|
|
104818
105312
|
}) {
|
|
104819
|
-
const warning = releaseWarningOf({ mine:
|
|
105313
|
+
const warning = releaseWarningOf({ mine: mine6, server, sandbox });
|
|
104820
105314
|
if (!warning) return false;
|
|
104821
|
-
const older = !sandbox && releaseSkewOf({ mine:
|
|
105315
|
+
const older = !sandbox && releaseSkewOf({ mine: mine6, server }) === "older";
|
|
104822
105316
|
const started = older ? await startedUpdate({ context, server }) : null;
|
|
104823
|
-
if (!quiet) context.err(started ? selfUpdateLineOf({ mine:
|
|
105317
|
+
if (!quiet) context.err(started ? selfUpdateLineOf({ mine: mine6, server, ...started }) : warning);
|
|
104824
105318
|
return true;
|
|
104825
105319
|
}
|
|
104826
105320
|
function watchingRelease({
|
|
104827
105321
|
context,
|
|
104828
|
-
mine:
|
|
105322
|
+
mine: mine6 = cliVersionOf(),
|
|
104829
105323
|
quiet = false
|
|
104830
105324
|
}) {
|
|
104831
105325
|
const sandbox = context.program.at(-1) === SANDBOX_CLI_PATH;
|
|
@@ -104835,7 +105329,7 @@ function watchingRelease({
|
|
|
104835
105329
|
fetcher: async (input2, init) => {
|
|
104836
105330
|
const response = await context.fetcher(input2, init);
|
|
104837
105331
|
const server = response.headers.get(CLI_RELEASE_HEADER);
|
|
104838
|
-
if (!warned && server) warned = await noteRelease({ context, mine:
|
|
105332
|
+
if (!warned && server) warned = await noteRelease({ context, mine: mine6, server, sandbox, quiet });
|
|
104839
105333
|
return response;
|
|
104840
105334
|
}
|
|
104841
105335
|
};
|
|
@@ -105056,14 +105550,14 @@ var CHECK_WAIT_TRIES = 30;
|
|
|
105056
105550
|
function timingOf(args) {
|
|
105057
105551
|
const cron = flagText({ args, name: "cron" });
|
|
105058
105552
|
const rrule = flagText({ args, name: "rrule" });
|
|
105059
|
-
const
|
|
105060
|
-
const given = [cron, rrule,
|
|
105553
|
+
const at9 = flagText({ args, name: "at" });
|
|
105554
|
+
const given = [cron, rrule, at9].filter(Boolean);
|
|
105061
105555
|
if (given.length !== 1)
|
|
105062
105556
|
throw new CliUsageError(`Give exactly one of --cron, --rrule or --at.
|
|
105063
105557
|
${USAGE17}`);
|
|
105064
105558
|
if (cron) return { kind: "cron", cron };
|
|
105065
105559
|
if (rrule) return { kind: "rrule", rrule };
|
|
105066
|
-
return { kind: "once", at:
|
|
105560
|
+
return { kind: "once", at: at9 };
|
|
105067
105561
|
}
|
|
105068
105562
|
function printSchedule({
|
|
105069
105563
|
context,
|
|
@@ -106094,7 +106588,7 @@ async function releaseAgeSettingsOf({
|
|
|
106094
106588
|
async function update2({
|
|
106095
106589
|
context,
|
|
106096
106590
|
args,
|
|
106097
|
-
mine:
|
|
106591
|
+
mine: mine6 = cliVersionOf()
|
|
106098
106592
|
}) {
|
|
106099
106593
|
const plan2 = updatePlanOf({ script: await realScriptOf({ program: context.program }) });
|
|
106100
106594
|
if (plan2.kind === "sandbox") {
|
|
@@ -106110,17 +106604,17 @@ async function update2({
|
|
|
106110
106604
|
}
|
|
106111
106605
|
const line = plan2.command.join(" ");
|
|
106112
106606
|
if (args.flags["dry-run"]) {
|
|
106113
|
-
context.out(`laze ${
|
|
106607
|
+
context.out(`laze ${mine6}, installed with ${plan2.manager}. Would run: ${line}
|
|
106114
106608
|
`);
|
|
106115
106609
|
return 0;
|
|
106116
106610
|
}
|
|
106117
106611
|
const latest = await latestReleaseOf({ context });
|
|
106118
|
-
if (latest && latest ===
|
|
106119
|
-
context.out(`laze ${
|
|
106612
|
+
if (latest && latest === mine6) {
|
|
106613
|
+
context.out(`laze ${mine6} is the latest release.
|
|
106120
106614
|
`);
|
|
106121
106615
|
return 0;
|
|
106122
106616
|
}
|
|
106123
|
-
context.out(`Updating laze ${
|
|
106617
|
+
context.out(`Updating laze ${mine6} with ${plan2.manager}: ${line}
|
|
106124
106618
|
`);
|
|
106125
106619
|
const code4 = await context.runCommand({ command: plan2.command, env: {} });
|
|
106126
106620
|
if (code4 !== 0) {
|
|
@@ -106128,12 +106622,12 @@ async function update2({
|
|
|
106128
106622
|
`);
|
|
106129
106623
|
return code4;
|
|
106130
106624
|
}
|
|
106131
|
-
return checkInstalled({ context, plan: plan2, mine:
|
|
106625
|
+
return checkInstalled({ context, plan: plan2, mine: mine6, latest });
|
|
106132
106626
|
}
|
|
106133
106627
|
async function checkInstalled({
|
|
106134
106628
|
context,
|
|
106135
106629
|
plan: plan2,
|
|
106136
|
-
mine:
|
|
106630
|
+
mine: mine6,
|
|
106137
106631
|
latest
|
|
106138
106632
|
}) {
|
|
106139
106633
|
const printed2 = await printedBy({ context, command: [...context.program, "--version"] });
|
|
@@ -106142,13 +106636,13 @@ async function checkInstalled({
|
|
|
106142
106636
|
context.out("Installed. `laze --version` names the new version.\n");
|
|
106143
106637
|
return 0;
|
|
106144
106638
|
}
|
|
106145
|
-
const held = latest ? releaseSkewOf({ mine: installed, server: latest }) === "older" : installed ===
|
|
106639
|
+
const held = latest ? releaseSkewOf({ mine: installed, server: latest }) === "older" : installed === mine6;
|
|
106146
106640
|
const { script, onPath } = await otherInstallsOf({ context });
|
|
106147
106641
|
const shadowed = shadowedLineOf({ updated: installed, script, onPath });
|
|
106148
106642
|
if (!held) {
|
|
106149
106643
|
context.out(
|
|
106150
|
-
installed ===
|
|
106151
|
-
` : `Updated laze ${
|
|
106644
|
+
installed === mine6 ? `laze ${mine6} is the latest release.
|
|
106645
|
+
` : `Updated laze ${mine6} to ${installed}.
|
|
106152
106646
|
`
|
|
106153
106647
|
);
|
|
106154
106648
|
if (shadowed) context.err(shadowed);
|
|
@@ -106194,10 +106688,10 @@ function bareLineOf({ line, where }) {
|
|
|
106194
106688
|
throw new CliUsageError(`${where}: not a name: ${line}`);
|
|
106195
106689
|
}
|
|
106196
106690
|
function lineOf5({ line, where }) {
|
|
106197
|
-
const
|
|
106198
|
-
if (
|
|
106199
|
-
const variable = line.slice(0,
|
|
106200
|
-
const value = line.slice(
|
|
106691
|
+
const at9 = line.indexOf("=");
|
|
106692
|
+
if (at9 === -1) return bareLineOf({ line, where });
|
|
106693
|
+
const variable = line.slice(0, at9).trim();
|
|
106694
|
+
const value = line.slice(at9 + 1).trim();
|
|
106201
106695
|
if (!VARIABLE.test(variable)) {
|
|
106202
106696
|
throw new CliUsageError(`${where}: not a variable name: ${variable}`);
|
|
106203
106697
|
}
|
|
@@ -106258,6 +106752,55 @@ function credentialProcessJson(fields) {
|
|
|
106258
106752
|
});
|
|
106259
106753
|
}
|
|
106260
106754
|
|
|
106755
|
+
// src/rules/vault-run-chain.rules.ts
|
|
106756
|
+
var CONNECTION2 = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
106757
|
+
var FOLDABLE_FLAGS = /* @__PURE__ */ new Set(["--reason", "--wait"]);
|
|
106758
|
+
function innerRunOf({
|
|
106759
|
+
command,
|
|
106760
|
+
profile
|
|
106761
|
+
}) {
|
|
106762
|
+
let at9 = 0;
|
|
106763
|
+
if (command[at9] !== "laze") return null;
|
|
106764
|
+
at9 += 1;
|
|
106765
|
+
let innerProfile = "";
|
|
106766
|
+
if (command[at9] === "--profile") {
|
|
106767
|
+
innerProfile = command[at9 + 1] ?? "";
|
|
106768
|
+
at9 += 2;
|
|
106769
|
+
}
|
|
106770
|
+
if (innerProfile !== profile || command[at9] !== "vault" || command[at9 + 1] !== "run") {
|
|
106771
|
+
return null;
|
|
106772
|
+
}
|
|
106773
|
+
at9 += 2;
|
|
106774
|
+
const names = [];
|
|
106775
|
+
while (at9 < command.length && command[at9] !== "--") {
|
|
106776
|
+
const word3 = command[at9] ?? "";
|
|
106777
|
+
if (word3.startsWith("--")) {
|
|
106778
|
+
if (!FOLDABLE_FLAGS.has(word3)) return null;
|
|
106779
|
+
at9 += 2;
|
|
106780
|
+
continue;
|
|
106781
|
+
}
|
|
106782
|
+
if (!CONNECTION2.test(word3)) return null;
|
|
106783
|
+
names.push(word3);
|
|
106784
|
+
at9 += 1;
|
|
106785
|
+
}
|
|
106786
|
+
if (names.length === 0 || command[at9] !== "--" || at9 + 1 >= command.length) return null;
|
|
106787
|
+
return { names, command: command.slice(at9 + 1) };
|
|
106788
|
+
}
|
|
106789
|
+
function vaultRunChainOf({
|
|
106790
|
+
names,
|
|
106791
|
+
command,
|
|
106792
|
+
profile = ""
|
|
106793
|
+
}) {
|
|
106794
|
+
const all = [...names];
|
|
106795
|
+
let rest = command;
|
|
106796
|
+
for (let inner = innerRunOf({ command: rest, profile }); inner; ) {
|
|
106797
|
+
all.push(...inner.names);
|
|
106798
|
+
rest = inner.command;
|
|
106799
|
+
inner = innerRunOf({ command: rest, profile });
|
|
106800
|
+
}
|
|
106801
|
+
return { names: [...new Set(all)], command: rest };
|
|
106802
|
+
}
|
|
106803
|
+
|
|
106261
106804
|
// src/services/vault-batch.service.ts
|
|
106262
106805
|
import { rm as rm20 } from "node:fs/promises";
|
|
106263
106806
|
async function batchOf({ response }) {
|
|
@@ -106410,7 +106953,7 @@ async function releaseBatch({
|
|
|
106410
106953
|
const { waiting } = sorted;
|
|
106411
106954
|
const later = await untilAllAnswered({ context, door, waiting, deadline });
|
|
106412
106955
|
if (later === "capped") return { exitCode: 75 };
|
|
106413
|
-
for (const [key,
|
|
106956
|
+
for (const [key, release3] of later) settled3.set(key, release3);
|
|
106414
106957
|
} catch (error63) {
|
|
106415
106958
|
if (!(error63 instanceof ServerGoneError)) throw error63;
|
|
106416
106959
|
context.err(`${error63.message}. Run the command again to keep waiting.
|
|
@@ -106433,10 +106976,10 @@ async function releaseBatch({
|
|
|
106433
106976
|
keyPath: door.keyPath
|
|
106434
106977
|
});
|
|
106435
106978
|
if ("exitCode" in outcome) return outcome;
|
|
106436
|
-
for (const [key,
|
|
106437
|
-
if (
|
|
106438
|
-
const { connectionId } =
|
|
106439
|
-
const fields = standInFieldsOf({ env:
|
|
106979
|
+
for (const [key, release3] of settled3) {
|
|
106980
|
+
if (release3.outcome !== "allow" || !release3.boundary) continue;
|
|
106981
|
+
const { connectionId } = release3.boundary;
|
|
106982
|
+
const fields = standInFieldsOf({ env: release3.env, boundary: release3.boundary });
|
|
106440
106983
|
await handedOut({ context, name: key, connectionId, fields });
|
|
106441
106984
|
}
|
|
106442
106985
|
return outcome;
|
|
@@ -106445,10 +106988,10 @@ function sortedReleasesOf({ entries }) {
|
|
|
106445
106988
|
const settled3 = /* @__PURE__ */ new Map();
|
|
106446
106989
|
const waiting = /* @__PURE__ */ new Map();
|
|
106447
106990
|
for (const entry2 of entries) {
|
|
106448
|
-
const
|
|
106449
|
-
if (!
|
|
106450
|
-
if (
|
|
106451
|
-
else settled3.set(keyOf(entry2),
|
|
106991
|
+
const release3 = entry2.release;
|
|
106992
|
+
if (!release3) continue;
|
|
106993
|
+
if (release3.outcome === "ask") waiting.set(keyOf(entry2), release3);
|
|
106994
|
+
else settled3.set(keyOf(entry2), release3);
|
|
106452
106995
|
}
|
|
106453
106996
|
return { settled: settled3, waiting };
|
|
106454
106997
|
}
|
|
@@ -106457,11 +107000,11 @@ function refusalOf({
|
|
|
106457
107000
|
settled: settled3
|
|
106458
107001
|
}) {
|
|
106459
107002
|
const codes = [];
|
|
106460
|
-
for (const
|
|
106461
|
-
if (
|
|
106462
|
-
context.err(`${
|
|
107003
|
+
for (const release3 of settled3.values()) {
|
|
107004
|
+
if (release3.outcome !== "deny") continue;
|
|
107005
|
+
context.err(`${release3.message}
|
|
106463
107006
|
`);
|
|
106464
|
-
codes.push(
|
|
107007
|
+
codes.push(release3.exitCode || 1);
|
|
106465
107008
|
}
|
|
106466
107009
|
if (codes.length === 0) return 0;
|
|
106467
107010
|
return codes.includes(77) ? 77 : codes[0] ?? 1;
|
|
@@ -106480,11 +107023,11 @@ async function valuesOf({
|
|
|
106480
107023
|
}
|
|
106481
107024
|
const opened = /* @__PURE__ */ new Map();
|
|
106482
107025
|
let keep2 = false;
|
|
106483
|
-
for (const [key,
|
|
106484
|
-
if (
|
|
106485
|
-
opened.set(key, await envOf({ release:
|
|
106486
|
-
if (leaseHolds({ release:
|
|
106487
|
-
if (
|
|
107026
|
+
for (const [key, release3] of settled3) {
|
|
107027
|
+
if (release3.outcome !== "allow") continue;
|
|
107028
|
+
opened.set(key, await envOf({ release: release3, run: run4 }));
|
|
107029
|
+
if (leaseHolds({ release: release3, nowMs: context.nowMs() })) keep2 = true;
|
|
107030
|
+
if (release3.message) context.err(`${release3.message}
|
|
106488
107031
|
`);
|
|
106489
107032
|
}
|
|
106490
107033
|
if (!keep2) await rm20(keyPath, { force: true });
|
|
@@ -106517,12 +107060,12 @@ The reason comes from --reason, else KV_REASON or LAZE_VAULT_REASON: set it on e
|
|
|
106517
107060
|
helm or terraform command, which reach this through credential_process.`;
|
|
106518
107061
|
function withWaitSeconds(args) {
|
|
106519
107062
|
if (args.flags.wait !== true) return args;
|
|
106520
|
-
const
|
|
106521
|
-
if (
|
|
107063
|
+
const at9 = args.words.findLastIndex((word3, index) => index >= 2 && /^\d+$/.test(word3));
|
|
107064
|
+
if (at9 === -1) return args;
|
|
106522
107065
|
return {
|
|
106523
107066
|
...args,
|
|
106524
|
-
words: args.words.filter((_, index) => index !==
|
|
106525
|
-
flags: { ...args.flags, wait: args.words[
|
|
107067
|
+
words: args.words.filter((_, index) => index !== at9),
|
|
107068
|
+
flags: { ...args.flags, wait: args.words[at9] ?? "" }
|
|
106526
107069
|
};
|
|
106527
107070
|
}
|
|
106528
107071
|
function reasonOf({ context, args }) {
|
|
@@ -106698,6 +107241,56 @@ ${AWS_USAGE}`
|
|
|
106698
107241
|
`);
|
|
106699
107242
|
return 0;
|
|
106700
107243
|
}
|
|
107244
|
+
async function vaultRunMany({
|
|
107245
|
+
context,
|
|
107246
|
+
args,
|
|
107247
|
+
names,
|
|
107248
|
+
command
|
|
107249
|
+
}) {
|
|
107250
|
+
const reason2 = flagText({ args, name: "reason" });
|
|
107251
|
+
if (!reason2)
|
|
107252
|
+
throw new CliUsageError(`Say why with --reason "<one plain sentence>"
|
|
107253
|
+
${ENV_USAGE}`);
|
|
107254
|
+
const badReason = refusedReason({ context, reason: reason2 });
|
|
107255
|
+
if (badReason !== null) return badReason;
|
|
107256
|
+
const lines2 = names.map((ref2) => ({ kind: "connection", ref: ref2 }));
|
|
107257
|
+
const outcome = await releasedKeys({
|
|
107258
|
+
context,
|
|
107259
|
+
args: withWaitSeconds(args),
|
|
107260
|
+
refs: refsOf(lines2),
|
|
107261
|
+
reason: reason2,
|
|
107262
|
+
command
|
|
107263
|
+
});
|
|
107264
|
+
if ("exitCode" in outcome) return outcome.exitCode;
|
|
107265
|
+
const { released, byConnection } = outcome;
|
|
107266
|
+
const prepared = preparedCommand({ command, released: byConnection });
|
|
107267
|
+
if ("refusal" in prepared) {
|
|
107268
|
+
context.err(`${prepared.refusal}
|
|
107269
|
+
`);
|
|
107270
|
+
return 1;
|
|
107271
|
+
}
|
|
107272
|
+
const env = environmentOf({ lines: lines2, released });
|
|
107273
|
+
const redact = [...released.values()].flatMap(({ fields }) => secretValuesOf({ fields }));
|
|
107274
|
+
return context.runCommand({ command: prepared.command, env, redact });
|
|
107275
|
+
}
|
|
107276
|
+
async function vaultRunChained({
|
|
107277
|
+
context,
|
|
107278
|
+
args: given
|
|
107279
|
+
}) {
|
|
107280
|
+
const args = withWaitSeconds(given);
|
|
107281
|
+
const chain = vaultRunChainOf({
|
|
107282
|
+
names: args.words.slice(2),
|
|
107283
|
+
command: args.rest,
|
|
107284
|
+
profile: flagText({ args, name: "profile" })
|
|
107285
|
+
});
|
|
107286
|
+
if (chain.names.length <= 1 || args.rest.length === 0) return vaultRun({ context, args: given });
|
|
107287
|
+
if (args.flags["real-value"] === true) {
|
|
107288
|
+
throw new CliUsageError(
|
|
107289
|
+
"laze vault run --real-value takes one key: run each key that needs its real value on its own"
|
|
107290
|
+
);
|
|
107291
|
+
}
|
|
107292
|
+
return vaultRunMany({ context, args, names: chain.names, command: chain.command });
|
|
107293
|
+
}
|
|
106701
107294
|
|
|
106702
107295
|
// src/services/vault-exec-provider-commands.service.ts
|
|
106703
107296
|
var EXEC_PROVIDER_USAGE = `Usage: laze vault exec-provider
|
|
@@ -106712,9 +107305,9 @@ function execProviderIds({ request: request2 }) {
|
|
|
106712
107305
|
return Array.isArray(ids) ? ids.filter((id8) => typeof id8 === "string") : [];
|
|
106713
107306
|
}
|
|
106714
107307
|
function splitExecId({ id: id8 }) {
|
|
106715
|
-
const
|
|
106716
|
-
if (
|
|
106717
|
-
return { connection: id8.slice(0,
|
|
107308
|
+
const at9 = id8.indexOf("#");
|
|
107309
|
+
if (at9 === -1) return { connection: id8 };
|
|
107310
|
+
return { connection: id8.slice(0, at9), field: id8.slice(at9 + 1) };
|
|
106718
107311
|
}
|
|
106719
107312
|
function valueOf({
|
|
106720
107313
|
fields,
|
|
@@ -106905,7 +107498,7 @@ async function vaultSave({ context, args }) {
|
|
|
106905
107498
|
// src/services/vault-scrub-commands.service.ts
|
|
106906
107499
|
function lineOf6(channel) {
|
|
106907
107500
|
const where = channel.name ? `#${channel.name}` : channel.channelId;
|
|
106908
|
-
const found = Object.entries(channel.found).map(([vendor,
|
|
107501
|
+
const found = Object.entries(channel.found).map(([vendor, count19]) => `${vendor} ${count19}`).join(", ");
|
|
106909
107502
|
const kinds = [`held ${channel.held}`, ...found ? [`found: ${found}`] : []].join("; ");
|
|
106910
107503
|
return `${where} scanned ${channel.scanned} changed ${channel.messages} ${kinds}
|
|
106911
107504
|
`;
|
|
@@ -107247,7 +107840,7 @@ var WHATSAPP_BUSINESS_SEND_UNRESOLVED_EVENT_TYPE = `${prefix}.unresolved`;
|
|
|
107247
107840
|
var WHATSAPP_BUSINESS_EVIDENCE = ["sent", "delivered", "read"];
|
|
107248
107841
|
var whatsappBusinessEvidenceSchema = external_exports.enum(WHATSAPP_BUSINESS_EVIDENCE);
|
|
107249
107842
|
var id7 = external_exports.string().min(1).max(200);
|
|
107250
|
-
var
|
|
107843
|
+
var at8 = external_exports.iso.datetime();
|
|
107251
107844
|
var code3 = external_exports.string().min(1).max(64).regex(/^[a-z_]+$/);
|
|
107252
107845
|
var sendRef2 = {
|
|
107253
107846
|
workspaceId: id7,
|
|
@@ -107255,16 +107848,16 @@ var sendRef2 = {
|
|
|
107255
107848
|
sendId: id7,
|
|
107256
107849
|
/** `wab-send:<send id>`: the stream's id. */
|
|
107257
107850
|
stream: id7,
|
|
107258
|
-
at:
|
|
107851
|
+
at: at8
|
|
107259
107852
|
};
|
|
107260
107853
|
var requestedDefinition = external_exports.object({
|
|
107261
107854
|
...sendRef2,
|
|
107262
107855
|
kind: external_exports.enum(["text", "template"]),
|
|
107263
107856
|
/** After this, with no answer from Meta, the send reads unconfirmed. */
|
|
107264
|
-
sendBy:
|
|
107857
|
+
sendBy: at8
|
|
107265
107858
|
});
|
|
107266
107859
|
var heldDefinition = external_exports.object({ ...sendRef2, attentionId: id7 });
|
|
107267
|
-
var releasedDefinition = external_exports.object({ ...sendRef2, sendBy:
|
|
107860
|
+
var releasedDefinition = external_exports.object({ ...sendRef2, sendBy: at8 });
|
|
107268
107861
|
var acceptedDefinition = external_exports.object({ ...sendRef2, wamid: id7 });
|
|
107269
107862
|
var evidencedDefinition = external_exports.object({
|
|
107270
107863
|
...sendRef2,
|
|
@@ -107272,7 +107865,7 @@ var evidencedDefinition = external_exports.object({
|
|
|
107272
107865
|
evidence: whatsappBusinessEvidenceSchema
|
|
107273
107866
|
});
|
|
107274
107867
|
var refusedDefinition = external_exports.object({ ...sendRef2, code: code3 });
|
|
107275
|
-
var unresolvedDefinition = external_exports.object({ ...sendRef2, sendBy:
|
|
107868
|
+
var unresolvedDefinition = external_exports.object({ ...sendRef2, sendBy: at8 });
|
|
107276
107869
|
var WHATSAPP_BUSINESS_SEND_STEPS = [
|
|
107277
107870
|
"none",
|
|
107278
107871
|
"queued",
|
|
@@ -107297,8 +107890,8 @@ var unresolvedIntentDefinition = external_exports.object({
|
|
|
107297
107890
|
connectionId: external_exports.string(),
|
|
107298
107891
|
sendId: external_exports.string(),
|
|
107299
107892
|
stream: external_exports.string(),
|
|
107300
|
-
sendBy:
|
|
107301
|
-
at:
|
|
107893
|
+
sendBy: at8,
|
|
107894
|
+
at: at8
|
|
107302
107895
|
});
|
|
107303
107896
|
|
|
107304
107897
|
// src/services/whatsapp-business-commands.service.ts
|
|
@@ -107671,8 +108264,8 @@ var USAGE20 = [
|
|
|
107671
108264
|
"With no machine it is the WhatsApp linked on your (or your agent's owner's) Laze computer.",
|
|
107672
108265
|
"A chat is its id, a phone number or a contact or group name."
|
|
107673
108266
|
].join("\n");
|
|
107674
|
-
function word2({ args, at:
|
|
107675
|
-
const value = args.words[
|
|
108267
|
+
function word2({ args, at: at9 }) {
|
|
108268
|
+
const value = args.words[at9];
|
|
107676
108269
|
if (!value) throw new CliUsageError(USAGE20);
|
|
107677
108270
|
return value;
|
|
107678
108271
|
}
|
|
@@ -107964,7 +108557,7 @@ function wikiFileMarkdown(file4) {
|
|
|
107964
108557
|
const label3 = file4.name.replace(/[[\]]/g, "");
|
|
107965
108558
|
return `${file4.contentType.startsWith("image/") ? "!" : ""}[${label3}](${file4.url})`;
|
|
107966
108559
|
}
|
|
107967
|
-
var
|
|
108560
|
+
var attach2 = async ({ context, args, usage: usage2 }) => {
|
|
107968
108561
|
const path = args.words[2];
|
|
107969
108562
|
const local2 = args.words[3];
|
|
107970
108563
|
if (!path || !local2) throw new CliUsageError(usage2);
|
|
@@ -108028,7 +108621,7 @@ var link = async ({ context, args, usage: usage2 }) => {
|
|
|
108028
108621
|
`);
|
|
108029
108622
|
};
|
|
108030
108623
|
var WIKI_FILE_COMMANDS = {
|
|
108031
|
-
attach,
|
|
108624
|
+
attach: attach2,
|
|
108032
108625
|
files: files2,
|
|
108033
108626
|
file: link
|
|
108034
108627
|
};
|
|
@@ -108295,8 +108888,8 @@ async function roles({ context, args }) {
|
|
|
108295
108888
|
const catalogue = await client.get("/api/roles");
|
|
108296
108889
|
if (args.flags.json) return printJson11(context, catalogue);
|
|
108297
108890
|
for (const role2 of catalogue) {
|
|
108298
|
-
const
|
|
108299
|
-
context.out(`${role2.label} ${
|
|
108891
|
+
const count19 = `${role2.permissions.length} permissions`;
|
|
108892
|
+
context.out(`${role2.label} ${count19} ${role2.description}
|
|
108300
108893
|
`);
|
|
108301
108894
|
context.out(` ${role2.permissions.join(", ")}
|
|
108302
108895
|
`);
|
|
@@ -108552,7 +109145,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
108552
109145
|
laze agent faces every agent's sloth seed or picture
|
|
108553
109146
|
laze adopt codex [--thread <id>] answer Laze messages in a Codex thread
|
|
108554
109147
|
laze adopt codex --status | --stop the background adopt that laze agent link started
|
|
108555
|
-
laze vault run <name
|
|
109148
|
+
laze vault run <name>... --reason "<why>" -- <cmd> run a command with vault keys, all on one card
|
|
108556
109149
|
laze vault env [<file>] --reason "<why>" -- <cmd> run a command with every key .env.vault names (agents)
|
|
108557
109150
|
laze vault env --names | --shell what .env.vault resolves to; export lines for a shell hook
|
|
108558
109151
|
laze vault aws <connection> [--reason "<why>"] AWS credential_process JSON from a short-lived STS session
|
|
@@ -108749,7 +109342,7 @@ var COMMANDS5 = {
|
|
|
108749
109342
|
wiki,
|
|
108750
109343
|
skill,
|
|
108751
109344
|
app,
|
|
108752
|
-
"vault run":
|
|
109345
|
+
"vault run": vaultRunChained,
|
|
108753
109346
|
"vault env": vaultEnv2,
|
|
108754
109347
|
"vault aws": vaultAws,
|
|
108755
109348
|
"vault exec-provider": vaultExecProvider,
|