@lazehq/cli 0.1.119 → 0.1.121
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 +789 -306
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -31077,15 +31077,15 @@ ${value}`;
|
|
|
31077
31077
|
pos = 0;
|
|
31078
31078
|
}
|
|
31079
31079
|
}
|
|
31080
|
-
discardLeadingBytes(
|
|
31081
|
-
while (
|
|
31080
|
+
discardLeadingBytes(count13) {
|
|
31081
|
+
while (count13 > 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 (count13 < remaining) {
|
|
31085
|
+
this.linePos += count13;
|
|
31086
|
+
count13 = 0;
|
|
31087
31087
|
} else {
|
|
31088
|
-
|
|
31088
|
+
count13 -= remaining;
|
|
31089
31089
|
this.lineChunkIndex++;
|
|
31090
31090
|
this.linePos = 0;
|
|
31091
31091
|
}
|
|
@@ -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 count13 of counts.values()) {
|
|
31838
|
+
const p = count13 / sample.length;
|
|
31839
31839
|
entropy -= p * Math.log2(p);
|
|
31840
31840
|
}
|
|
31841
31841
|
return entropy;
|
|
@@ -36881,10 +36881,10 @@ function heldBackLineOf({
|
|
|
36881
36881
|
var CLI_RELEASE_HEADER = "x-laze-cli-release";
|
|
36882
36882
|
var STAMP = /^(\d+)\.(\d+)\.(\d+)(?:-g([0-9a-f]+))?$/;
|
|
36883
36883
|
function releaseSkewOf({
|
|
36884
|
-
mine:
|
|
36884
|
+
mine: mine5,
|
|
36885
36885
|
server
|
|
36886
36886
|
}) {
|
|
36887
|
-
const have = STAMP.exec(
|
|
36887
|
+
const have = STAMP.exec(mine5);
|
|
36888
36888
|
const ships = STAMP.exec(server);
|
|
36889
36889
|
if (!have || !ships) return null;
|
|
36890
36890
|
for (const part of [1, 2, 3]) {
|
|
@@ -36894,51 +36894,51 @@ function releaseSkewOf({
|
|
|
36894
36894
|
return have[4] && ships[4] && have[4] !== ships[4] ? "other_build" : null;
|
|
36895
36895
|
}
|
|
36896
36896
|
function releaseWarningOf({
|
|
36897
|
-
mine:
|
|
36897
|
+
mine: mine5,
|
|
36898
36898
|
server,
|
|
36899
36899
|
sandbox
|
|
36900
36900
|
}) {
|
|
36901
|
-
const skew = releaseSkewOf({ mine:
|
|
36901
|
+
const skew = releaseSkewOf({ mine: mine5, server });
|
|
36902
36902
|
if (!skew || skew === "other_build") return null;
|
|
36903
36903
|
if (sandbox) {
|
|
36904
|
-
return `laze: this CLI is ${
|
|
36904
|
+
return `laze: this CLI is ${mine5}, but the server ships ${server}. Laze updates the computer's CLI each time the agent connects, so restart the agent if this stays.
|
|
36905
36905
|
`;
|
|
36906
36906
|
}
|
|
36907
36907
|
if (skew === "newer") {
|
|
36908
|
-
return `laze: this CLI is ${
|
|
36908
|
+
return `laze: this CLI is ${mine5}, newer than the server's ${server}; a command the server does not have yet fails.
|
|
36909
36909
|
`;
|
|
36910
36910
|
}
|
|
36911
|
-
return `laze: this CLI is ${
|
|
36911
|
+
return `laze: this CLI is ${mine5}, older than the server's ${server}. Update it with npm i -g ${CLI_PACKAGE_LATEST} (or laze update).
|
|
36912
36912
|
`;
|
|
36913
36913
|
}
|
|
36914
36914
|
function selfUpdateLineOf({
|
|
36915
|
-
mine:
|
|
36915
|
+
mine: mine5,
|
|
36916
36916
|
server,
|
|
36917
36917
|
manager
|
|
36918
36918
|
}) {
|
|
36919
|
-
return `laze: this CLI is ${
|
|
36919
|
+
return `laze: this CLI is ${mine5}, 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).
|
|
36920
36920
|
`;
|
|
36921
36921
|
}
|
|
36922
36922
|
|
|
36923
36923
|
// src/rules/cli-installs.rules.ts
|
|
36924
36924
|
function newerInstallsOf({
|
|
36925
|
-
mine:
|
|
36925
|
+
mine: mine5,
|
|
36926
36926
|
installs
|
|
36927
36927
|
}) {
|
|
36928
36928
|
return installs.filter(
|
|
36929
|
-
(install) => install.version !== null && releaseSkewOf({ mine:
|
|
36929
|
+
(install) => install.version !== null && releaseSkewOf({ mine: mine5, server: install.version }) === "older"
|
|
36930
36930
|
);
|
|
36931
36931
|
}
|
|
36932
36932
|
function newerInstallLineOf({
|
|
36933
|
-
mine:
|
|
36933
|
+
mine: mine5,
|
|
36934
36934
|
script,
|
|
36935
36935
|
installs
|
|
36936
36936
|
}) {
|
|
36937
|
-
const newer = newerInstallsOf({ mine:
|
|
36937
|
+
const newer = newerInstallsOf({ mine: mine5, installs });
|
|
36938
36938
|
const [first] = newer;
|
|
36939
36939
|
if (!first) return null;
|
|
36940
36940
|
const others = newer.map((install) => `laze ${install.version} at ${install.path}`).join(", ");
|
|
36941
|
-
return `laze: this is laze ${
|
|
36941
|
+
return `laze: this is laze ${mine5} 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.
|
|
36942
36942
|
`;
|
|
36943
36943
|
}
|
|
36944
36944
|
function shadowedLineOf({
|
|
@@ -36960,7 +36960,7 @@ function shadowedLinkLineOf({ shadow }) {
|
|
|
36960
36960
|
}
|
|
36961
36961
|
|
|
36962
36962
|
// src/rules/cli-version.rules.ts
|
|
36963
|
-
var STAMPED = "0.1.
|
|
36963
|
+
var STAMPED = "0.1.121";
|
|
36964
36964
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
36965
36965
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
36966
36966
|
}
|
|
@@ -37037,10 +37037,10 @@ async function otherInstallsOf({ context }) {
|
|
|
37037
37037
|
}
|
|
37038
37038
|
async function noteNewerInstall({
|
|
37039
37039
|
context,
|
|
37040
|
-
mine:
|
|
37040
|
+
mine: mine5 = cliVersionOf()
|
|
37041
37041
|
}) {
|
|
37042
37042
|
const { script, others } = await otherInstallsOf({ context });
|
|
37043
|
-
const line = newerInstallLineOf({ mine:
|
|
37043
|
+
const line = newerInstallLineOf({ mine: mine5, script, installs: others });
|
|
37044
37044
|
if (line) context.err(line);
|
|
37045
37045
|
}
|
|
37046
37046
|
async function rerunCommandOf({
|
|
@@ -38725,14 +38725,14 @@ function codePointLength(str) {
|
|
|
38725
38725
|
const units = str.length;
|
|
38726
38726
|
if (!highSurrogate.test(str))
|
|
38727
38727
|
return units;
|
|
38728
|
-
let
|
|
38728
|
+
let count13 = units;
|
|
38729
38729
|
for (let i = 0; i < units - 1; i++) {
|
|
38730
38730
|
if ((str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320) {
|
|
38731
|
-
|
|
38731
|
+
count13--;
|
|
38732
38732
|
i++;
|
|
38733
38733
|
}
|
|
38734
38734
|
}
|
|
38735
|
-
return
|
|
38735
|
+
return count13;
|
|
38736
38736
|
}
|
|
38737
38737
|
function getLengthableOrigin(input2) {
|
|
38738
38738
|
if (Array.isArray(input2))
|
|
@@ -43087,8 +43087,8 @@ function az_default() {
|
|
|
43087
43087
|
}
|
|
43088
43088
|
|
|
43089
43089
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/be.js
|
|
43090
|
-
function getBelarusianPlural(
|
|
43091
|
-
const absCount = Math.abs(
|
|
43090
|
+
function getBelarusianPlural(count13, one, few, many) {
|
|
43091
|
+
const absCount = Math.abs(count13);
|
|
43092
43092
|
const lastDigit = absCount % 10;
|
|
43093
43093
|
const lastTwoDigits = absCount % 100;
|
|
43094
43094
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -45735,8 +45735,8 @@ function hu_default() {
|
|
|
45735
45735
|
}
|
|
45736
45736
|
|
|
45737
45737
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/hy.js
|
|
45738
|
-
function getArmenianPlural(
|
|
45739
|
-
return Math.abs(
|
|
45738
|
+
function getArmenianPlural(count13, one, many) {
|
|
45739
|
+
return Math.abs(count13) === 1 ? one : many;
|
|
45740
45740
|
}
|
|
45741
45741
|
function withDefiniteArticle(word3) {
|
|
45742
45742
|
if (!word3)
|
|
@@ -48474,8 +48474,8 @@ function ro_default() {
|
|
|
48474
48474
|
}
|
|
48475
48475
|
|
|
48476
48476
|
// ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/ru.js
|
|
48477
|
-
function getRussianPlural(
|
|
48478
|
-
const absCount = Math.abs(
|
|
48477
|
+
function getRussianPlural(count13, one, few, many) {
|
|
48478
|
+
const absCount = Math.abs(count13);
|
|
48479
48479
|
const lastDigit = absCount % 10;
|
|
48480
48480
|
const lastTwoDigits = absCount % 100;
|
|
48481
48481
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -61817,15 +61817,15 @@ function clustersIn({
|
|
|
61817
61817
|
const out = [];
|
|
61818
61818
|
let current3 = null;
|
|
61819
61819
|
for (let index = segment.start; index <= segment.end; index += 1) {
|
|
61820
|
-
const
|
|
61821
|
-
if (
|
|
61820
|
+
const count13 = flagged[index] ?? 0;
|
|
61821
|
+
if (count13 === 0) continue;
|
|
61822
61822
|
if (current3 && index - current3.end - 1 <= REDACTED_BLOCK_MAX_GAP) {
|
|
61823
61823
|
current3.end = index;
|
|
61824
|
-
current3.values +=
|
|
61824
|
+
current3.values += count13;
|
|
61825
61825
|
continue;
|
|
61826
61826
|
}
|
|
61827
61827
|
if (current3) out.push(current3);
|
|
61828
|
-
current3 = { start: index, end: index, values:
|
|
61828
|
+
current3 = { start: index, end: index, values: count13 };
|
|
61829
61829
|
}
|
|
61830
61830
|
if (current3) out.push(current3);
|
|
61831
61831
|
return out;
|
|
@@ -61865,7 +61865,7 @@ function redactedBlocksAt({
|
|
|
61865
61865
|
}
|
|
61866
61866
|
const blocks = redactedBlocks({ lines: lines2, flagged });
|
|
61867
61867
|
const inside = (line) => blocks.some((block2) => line >= block2.start && line <= block2.end);
|
|
61868
|
-
const values = flagged.reduce((sum,
|
|
61868
|
+
const values = flagged.reduce((sum, count13, line) => inside(line) ? sum + count13 : sum, 0);
|
|
61869
61869
|
return { values, insideAt: (offset) => inside(lineAt(offset)) };
|
|
61870
61870
|
}
|
|
61871
61871
|
|
|
@@ -62420,6 +62420,56 @@ var vaultOpsAskSchemaDefinition = external_exports.object({
|
|
|
62420
62420
|
var vaultOpsAskSchema = vaultOpsAskSchemaDefinition;
|
|
62421
62421
|
var vaultOpsAsksSchemaDefinition = external_exports.object({ rows: external_exports.array(vaultOpsAskSchema), total: count3 });
|
|
62422
62422
|
|
|
62423
|
+
// ../../modules/vault/contract/src/vault-ops-connections.ts
|
|
62424
|
+
var count4 = external_exports.number().int().nonnegative();
|
|
62425
|
+
var idText3 = external_exports.string().max(128);
|
|
62426
|
+
var codeText2 = external_exports.string().regex(/^[a-z][a-z0-9_.]{0,39}$/);
|
|
62427
|
+
var vaultOpsConnectionSchemaDefinition = external_exports.object({
|
|
62428
|
+
connectionId: idText3,
|
|
62429
|
+
kind: vaultConnectionKindSchema,
|
|
62430
|
+
/** An OAuth or MCP connection's provider (`gmail`); null for none, `other` for free text. */
|
|
62431
|
+
provider: codeText2.nullable(),
|
|
62432
|
+
holderKind: external_exports.enum(["personal", "workspace", "agent", "pool"]),
|
|
62433
|
+
/** The person, agent or pool that owns the keychain; null for the workspace's. */
|
|
62434
|
+
holderId: idText3.nullable(),
|
|
62435
|
+
sensitivity: vaultSensitivitySchema,
|
|
62436
|
+
everyUseAsks: external_exports.boolean(),
|
|
62437
|
+
deviceApproval: external_exports.boolean(),
|
|
62438
|
+
waitingApproval: external_exports.boolean(),
|
|
62439
|
+
serverOpens: external_exports.boolean(),
|
|
62440
|
+
sealing: external_exports.enum(["envelope_v1", "sealed_v2"]),
|
|
62441
|
+
/** The devices a `sealed_v2` bundle is sealed to; 0 on `envelope_v1`. */
|
|
62442
|
+
recipients: count4,
|
|
62443
|
+
status: codeText2,
|
|
62444
|
+
/** When the stored access token runs out; null for none. */
|
|
62445
|
+
grantExpiresAt: external_exports.iso.datetime().nullable(),
|
|
62446
|
+
createdAt: external_exports.iso.datetime(),
|
|
62447
|
+
updatedAt: external_exports.iso.datetime()
|
|
62448
|
+
});
|
|
62449
|
+
var vaultOpsConnectionSchema = vaultOpsConnectionSchemaDefinition;
|
|
62450
|
+
var vaultOpsConnectionEventSchemaDefinition = external_exports.object({
|
|
62451
|
+
seq: count4,
|
|
62452
|
+
connectionId: idText3,
|
|
62453
|
+
action: codeText2,
|
|
62454
|
+
outcome: codeText2,
|
|
62455
|
+
actorKind: external_exports.enum(["user", "agent", "system"]),
|
|
62456
|
+
decider: codeText2.nullable(),
|
|
62457
|
+
agentId: idText3.nullable(),
|
|
62458
|
+
requestId: idText3.nullable(),
|
|
62459
|
+
/** The entry's stored code (`vault_oauth_refresh_failed`); null when it holds none. */
|
|
62460
|
+
code: codeText2.nullable(),
|
|
62461
|
+
/** The provider's error code on a refused refresh (`invalid_grant`); null when not kept. */
|
|
62462
|
+
providerCode: codeText2.nullable(),
|
|
62463
|
+
/** More of the entry is in its sealed text, which this read never opens. */
|
|
62464
|
+
moreInSeal: external_exports.boolean(),
|
|
62465
|
+
at: external_exports.iso.datetime()
|
|
62466
|
+
});
|
|
62467
|
+
var vaultOpsConnectionEventSchema = vaultOpsConnectionEventSchemaDefinition;
|
|
62468
|
+
var vaultOpsConnectionsSchemaDefinition = external_exports.object({
|
|
62469
|
+
connections: external_exports.array(vaultOpsConnectionSchema),
|
|
62470
|
+
events: external_exports.array(vaultOpsConnectionEventSchema)
|
|
62471
|
+
});
|
|
62472
|
+
|
|
62423
62473
|
// ../../modules/chat/contract/src/chat.close.ts
|
|
62424
62474
|
var conversationOpenDaysSchemaDefinition = external_exports.union([external_exports.literal(7), external_exports.literal(14), external_exports.literal(30), external_exports.literal(90)]).nullable();
|
|
62425
62475
|
var conversationOpenDaysSchema = conversationOpenDaysSchemaDefinition;
|
|
@@ -65113,6 +65163,10 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
|
|
|
65113
65163
|
width: external_exports.number().int().positive().max(600),
|
|
65114
65164
|
height: external_exports.number().int().positive().max(600)
|
|
65115
65165
|
}),
|
|
65166
|
+
/** Lines after the button, such as an ask to reply and a sign-off. */
|
|
65167
|
+
closing: external_exports.array(external_exports.string().min(1).max(600)).max(3).optional(),
|
|
65168
|
+
/** Where replies go: only an address on laze.so, whose mail reaches staff. */
|
|
65169
|
+
replyTo: external_exports.email().regex(/@laze\.so$/i, "a laze.so address").optional(),
|
|
65116
65170
|
unsubscribeUrl: external_exports.url()
|
|
65117
65171
|
}),
|
|
65118
65172
|
/**
|
|
@@ -65722,6 +65776,17 @@ var awayPausedPayloadSchemaDefinition = external_exports.object({
|
|
|
65722
65776
|
changeId: external_exports.string().min(1),
|
|
65723
65777
|
at: external_exports.iso.datetime()
|
|
65724
65778
|
});
|
|
65779
|
+
var personSessionStartedPayloadSchemaDefinition = external_exports.object({
|
|
65780
|
+
workspaceId: external_exports.string().min(1),
|
|
65781
|
+
userId: external_exports.string().min(1),
|
|
65782
|
+
/** The Laze client the person used: the web app, the desktop app or the iPhone app. */
|
|
65783
|
+
client: callerClientSchema,
|
|
65784
|
+
/** Their use before this session; null for the first one, or when the client cannot say. */
|
|
65785
|
+
previousSeenAt: external_exports.iso.datetime().nullable(),
|
|
65786
|
+
/** One per person and session: a retry of the same start records it once. */
|
|
65787
|
+
sessionId: external_exports.string().min(1).max(300),
|
|
65788
|
+
at: external_exports.iso.datetime()
|
|
65789
|
+
});
|
|
65725
65790
|
|
|
65726
65791
|
// ../../modules/notification/contract/src/notification.ui.ts
|
|
65727
65792
|
var notificationUi = uiTokens("notification");
|
|
@@ -65815,6 +65880,10 @@ var messagePostedPayloadSchemaDefinition = external_exports.object({
|
|
|
65815
65880
|
forward: postedForwardSchemaDefinition.nullable().optional(),
|
|
65816
65881
|
/** The card this message carries, such as an approval: a system card, not something said. */
|
|
65817
65882
|
cardType: external_exports.string().optional(),
|
|
65883
|
+
/** Its conversation's kind when a person or agent posted it; absent on mirrored, older facts. */
|
|
65884
|
+
channelKind: conversationKindSchema.optional(),
|
|
65885
|
+
/** An agent is a member of its conversation, such as a direct message with one. */
|
|
65886
|
+
withAgent: external_exports.boolean().optional(),
|
|
65818
65887
|
/** Mirrored history in a batch: no live publication of its own, its conversation reads again. */
|
|
65819
65888
|
quiet: external_exports.boolean().optional(),
|
|
65820
65889
|
/**
|
|
@@ -66129,10 +66198,10 @@ var observeSenderInputSchemaDefinition = external_exports.object({
|
|
|
66129
66198
|
});
|
|
66130
66199
|
|
|
66131
66200
|
// ../../modules/chat/contract/src/chat.read-ops.ts
|
|
66132
|
-
var
|
|
66201
|
+
var count5 = external_exports.number().int().nonnegative();
|
|
66133
66202
|
var at = external_exports.iso.datetime();
|
|
66134
66203
|
var unreadMessageDefinition = external_exports.object({
|
|
66135
|
-
seq:
|
|
66204
|
+
seq: count5,
|
|
66136
66205
|
createdAt: at,
|
|
66137
66206
|
/** self is the reader; the others are the author's kind. */
|
|
66138
66207
|
author: external_exports.enum(["self", "person", "agent", "external"]),
|
|
@@ -66151,12 +66220,12 @@ var readConversationDefinition = external_exports.object({
|
|
|
66151
66220
|
direct: external_exports.boolean(),
|
|
66152
66221
|
/** The other side of a Laze DM paired with a Slack DM, or null. */
|
|
66153
66222
|
pairedWith: external_exports.string().nullable(),
|
|
66154
|
-
lastSeq:
|
|
66155
|
-
lastReadSeq:
|
|
66156
|
-
unreadHeldToSeq:
|
|
66157
|
-
hiddenAtSeq:
|
|
66158
|
-
unread:
|
|
66159
|
-
mentions:
|
|
66223
|
+
lastSeq: count5,
|
|
66224
|
+
lastReadSeq: count5,
|
|
66225
|
+
unreadHeldToSeq: count5.nullable(),
|
|
66226
|
+
hiddenAtSeq: count5.nullable(),
|
|
66227
|
+
unread: count5,
|
|
66228
|
+
mentions: count5,
|
|
66160
66229
|
lastMessageAt: at.nullable(),
|
|
66161
66230
|
/** When the newest message at or before the marker was written. */
|
|
66162
66231
|
markerAt: at.nullable(),
|
|
@@ -66166,41 +66235,41 @@ var readConversationDefinition = external_exports.object({
|
|
|
66166
66235
|
var chatReadFactsDefinition = external_exports.object({
|
|
66167
66236
|
conversations: external_exports.array(readConversationDefinition).max(40),
|
|
66168
66237
|
/** Conversations that qualified before the cap. */
|
|
66169
|
-
total:
|
|
66238
|
+
total: count5
|
|
66170
66239
|
});
|
|
66171
66240
|
var chatReadFactsSchema = chatReadFactsDefinition;
|
|
66172
66241
|
|
|
66173
66242
|
// ../../modules/chat/contract/src/chat.link-domain-ops.ts
|
|
66174
|
-
var
|
|
66243
|
+
var count6 = external_exports.number().int().nonnegative();
|
|
66175
66244
|
var linkDomainDefinition = external_exports.object({
|
|
66176
66245
|
/** The link's host, lowercased, without `www.`. */
|
|
66177
66246
|
domain: external_exports.string(),
|
|
66178
66247
|
/** Previews on messages, one per message and preview. */
|
|
66179
|
-
links:
|
|
66248
|
+
links: count6,
|
|
66180
66249
|
/** Messages with at least one preview of this host. */
|
|
66181
|
-
messageCount:
|
|
66250
|
+
messageCount: count6,
|
|
66182
66251
|
/** Previews of this host a message author took off. */
|
|
66183
|
-
removed:
|
|
66252
|
+
removed: count6,
|
|
66184
66253
|
/** Distinct previews (addresses) of this host. */
|
|
66185
|
-
pages:
|
|
66254
|
+
pages: count6,
|
|
66186
66255
|
/** Pages whose preview carries a picture, and a page name. */
|
|
66187
|
-
pictured:
|
|
66188
|
-
named:
|
|
66256
|
+
pictured: count6,
|
|
66257
|
+
named: count6,
|
|
66189
66258
|
/** Pages whose fetch failed or was blocked. */
|
|
66190
|
-
failed:
|
|
66259
|
+
failed: count6,
|
|
66191
66260
|
/** The commonest path shapes, at most 5, each with its page count. */
|
|
66192
|
-
shapes: external_exports.array(external_exports.object({ shape: external_exports.string(), pages:
|
|
66261
|
+
shapes: external_exports.array(external_exports.object({ shape: external_exports.string(), pages: count6 })).max(5)
|
|
66193
66262
|
});
|
|
66194
66263
|
var linkDomainFactsDefinition = external_exports.object({
|
|
66195
66264
|
domains: external_exports.array(linkDomainDefinition),
|
|
66196
66265
|
/** Messages with previews read on this page, and how many previews they carry. */
|
|
66197
|
-
scannedMessageCount:
|
|
66198
|
-
scannedLinks:
|
|
66266
|
+
scannedMessageCount: count6,
|
|
66267
|
+
scannedLinks: count6,
|
|
66199
66268
|
/** Messages carrying exactly 1, 2, and 3 or more previews on this page. */
|
|
66200
|
-
messageCountByLinks: external_exports.array(
|
|
66269
|
+
messageCountByLinks: external_exports.array(count6).length(3),
|
|
66201
66270
|
/** Over the whole workspace: live messages with a link, and those with a preview. */
|
|
66202
|
-
linkedMessageCount:
|
|
66203
|
-
previewedMessageCount:
|
|
66271
|
+
linkedMessageCount: count6,
|
|
66272
|
+
previewedMessageCount: count6,
|
|
66204
66273
|
/** The last message id read; pass it back as `cursor` to read on, null at the end. */
|
|
66205
66274
|
nextCursor: external_exports.string().nullable()
|
|
66206
66275
|
});
|
|
@@ -66212,6 +66281,8 @@ var PERSONA = /^[a-z0-9-]{1,40}$/;
|
|
|
66212
66281
|
var REFERRAL_CODE = /^[0-9A-Za-z]{4,64}$/;
|
|
66213
66282
|
var HOST = /^[a-z0-9.-]{1,253}$/;
|
|
66214
66283
|
var tagSchema = external_exports.string().regex(TAG).nullable();
|
|
66284
|
+
var AD_NETWORKS = ["google", "meta", "microsoft", "reddit", "linkedin"];
|
|
66285
|
+
var adNetworkSchema = external_exports.enum(AD_NETWORKS);
|
|
66215
66286
|
var signUpSourceSchemaDefinition = external_exports.object({
|
|
66216
66287
|
source: tagSchema,
|
|
66217
66288
|
medium: tagSchema,
|
|
@@ -66225,7 +66296,9 @@ var signUpSourceSchemaDefinition = external_exports.object({
|
|
|
66225
66296
|
/** The persona page the visitor came through, such as `sales` for `/for/sales`. */
|
|
66226
66297
|
persona: external_exports.string().regex(PERSONA).nullable(),
|
|
66227
66298
|
/** The code of the referral link the visitor first opened. */
|
|
66228
|
-
referralCode: external_exports.string().regex(REFERRAL_CODE).nullable()
|
|
66299
|
+
referralCode: external_exports.string().regex(REFERRAL_CODE).nullable(),
|
|
66300
|
+
/** The ad network a click id on the first visit named; absent from sources kept before it. */
|
|
66301
|
+
adNetwork: adNetworkSchema.nullable().default(null)
|
|
66229
66302
|
});
|
|
66230
66303
|
var signUpSourceSchema = signUpSourceSchemaDefinition;
|
|
66231
66304
|
var HEARD_FROM_ANSWERS = [
|
|
@@ -66609,6 +66682,10 @@ var SignInSettingsSlot = workspaceUi.extension("settings.signIn");
|
|
|
66609
66682
|
var AppsSettingsSlot = workspaceUi.extension("settings.apps");
|
|
66610
66683
|
var ConversationSettingsSlot = workspaceUi.extension("settings.conversations");
|
|
66611
66684
|
var BillingSettingsSlot = workspaceUi.extension("settings.billing");
|
|
66685
|
+
var UsageSettingsSlot = workspaceUi.extension("settings.usage");
|
|
66686
|
+
var UsageActivitySettingsSlot = workspaceUi.extension("settings.usageActivity");
|
|
66687
|
+
var UsageTracingSettingsSlot = workspaceUi.extension("settings.usageTracing");
|
|
66688
|
+
var UsageAccountsSettingsSlot = workspaceUi.extension("settings.usageAccounts");
|
|
66612
66689
|
var ModelSettingsSlot = workspaceUi.extension("settings.models");
|
|
66613
66690
|
var AgentLoginsSettingsSlot = workspaceUi.extension("settings.agentLogins");
|
|
66614
66691
|
var LoginPoolsSettingsSlot = workspaceUi.extension("settings.loginPools");
|
|
@@ -66746,6 +66823,20 @@ var ACTIVATION_WINDOW_MS = ACTIVATION_DAYS * 24 * 60 * 60 * 1e3;
|
|
|
66746
66823
|
// ../../modules/workspace/contract/src/workspace-links.ts
|
|
66747
66824
|
var lazeUrlSchema = external_exports.string().min(1).describe("The resource's web address in Laze");
|
|
66748
66825
|
|
|
66826
|
+
// ../../modules/workspace/contract/src/workspace-audience.ts
|
|
66827
|
+
var audienceKindSchema = external_exports.enum(["qa", "staff", "external"]);
|
|
66828
|
+
var audienceMemberSchemaDefinition = external_exports.object({
|
|
66829
|
+
userId: external_exports.string().min(1),
|
|
66830
|
+
role: workspaceRoleSchema,
|
|
66831
|
+
kind: audienceKindSchema
|
|
66832
|
+
});
|
|
66833
|
+
var workspaceAudienceSchemaDefinition = external_exports.object({
|
|
66834
|
+
workspaceId: external_exports.string().min(1),
|
|
66835
|
+
/** Its creator's kind while they are a member, else its first Owner's. */
|
|
66836
|
+
kind: audienceKindSchema,
|
|
66837
|
+
members: external_exports.array(audienceMemberSchemaDefinition)
|
|
66838
|
+
});
|
|
66839
|
+
|
|
66749
66840
|
// ../../modules/agent/contract/src/agent-access.ts
|
|
66750
66841
|
var idSchema6 = external_exports.string().min(1).max(80);
|
|
66751
66842
|
var agentGranteeSchemaDefinition = external_exports.discriminatedUnion("kind", [
|
|
@@ -66983,7 +67074,9 @@ var lazeAgentEventSchemaDefinition = external_exports.discriminatedUnion("type",
|
|
|
66983
67074
|
/** Set when the session sends the turn's messages again then (epoch ms): not a failure yet. */
|
|
66984
67075
|
retryAt: external_exports.number().int().nonnegative().optional(),
|
|
66985
67076
|
/** Why a failed turn failed, as the session's error event said it. */
|
|
66986
|
-
failure: external_exports.object({ code: external_exports.string().min(1), message: external_exports.string() }).optional()
|
|
67077
|
+
failure: external_exports.object({ code: external_exports.string().min(1), message: external_exports.string() }).optional(),
|
|
67078
|
+
/** How long the turn ran from its start, in ms; absent from older supervisors. */
|
|
67079
|
+
durationMs: external_exports.number().int().nonnegative().optional()
|
|
66987
67080
|
}),
|
|
66988
67081
|
external_exports.object({ type: external_exports.literal("text_delta"), messageId: external_exports.string().optional(), text: external_exports.string() }),
|
|
66989
67082
|
/** Steps that changed since the last batch, coalesced on the computer; streamed, never stored. */
|
|
@@ -69814,11 +69907,15 @@ var LANGWATCH_REST_PATHS = {
|
|
|
69814
69907
|
level: "/api/langwatch/level",
|
|
69815
69908
|
test: "/api/langwatch/test",
|
|
69816
69909
|
remove: "/api/langwatch/remove",
|
|
69817
|
-
connect: "/api/langwatch/connect"
|
|
69910
|
+
connect: "/api/langwatch/connect",
|
|
69911
|
+
connectPoll: "/api/langwatch/connect/poll",
|
|
69912
|
+
connectCancel: "/api/langwatch/connect/cancel",
|
|
69913
|
+
mine: "/api/langwatch/mine"
|
|
69818
69914
|
};
|
|
69819
69915
|
var workspaceIdSchema5 = external_exports.string().min(1).max(64);
|
|
69820
69916
|
var iso = external_exports.iso.datetime();
|
|
69821
69917
|
var langwatchContentLevelSchema = external_exports.enum(["full", "metadata"]);
|
|
69918
|
+
var langwatchPersonalLevelSchema = external_exports.enum(["metadata", "off"]);
|
|
69822
69919
|
var langwatchAgentLevelSchema = external_exports.enum(["full", "metadata", "off"]);
|
|
69823
69920
|
var langwatchSignalSchema = external_exports.enum(["traces", "logs", "metrics"]);
|
|
69824
69921
|
var outcomeDefinition = external_exports.object({ at: iso, ok: external_exports.boolean(), message: external_exports.string() });
|
|
@@ -69831,10 +69928,18 @@ var integrationDefinition = external_exports.object({
|
|
|
69831
69928
|
/** The key's last four characters; null without a key. */
|
|
69832
69929
|
keyEnding: external_exports.string().nullable(),
|
|
69833
69930
|
level: langwatchContentLevelSchema,
|
|
69931
|
+
/** Personal agents' default. */
|
|
69932
|
+
personalLevel: langwatchPersonalLevelSchema.default("metadata"),
|
|
69834
69933
|
updatedAt: iso.nullable(),
|
|
69835
69934
|
lastTest: outcomeDefinition.nullable(),
|
|
69836
69935
|
/** The latest batch forwarded or refused; null before the first. */
|
|
69837
|
-
lastDelivery: outcomeDefinition.nullable()
|
|
69936
|
+
lastDelivery: outcomeDefinition.nullable(),
|
|
69937
|
+
/** The project Connect with LangWatch picked; null for a pasted key. */
|
|
69938
|
+
project: external_exports.object({ name: external_exports.string(), organizationName: external_exports.string(), url: external_exports.string() }).nullable(),
|
|
69939
|
+
/** When LangWatch last accepted a batch of traces; null before the first. */
|
|
69940
|
+
lastTraceAt: iso.nullable(),
|
|
69941
|
+
/** The reader sends their own personal agents' messages too (full). */
|
|
69942
|
+
mine: external_exports.boolean()
|
|
69838
69943
|
});
|
|
69839
69944
|
var workspaceInputDefinition = external_exports.object({ workspaceId: workspaceIdSchema5 });
|
|
69840
69945
|
var saveKeyDefinition = external_exports.object({
|
|
@@ -69853,7 +69958,8 @@ var enableDefinition = external_exports.object({
|
|
|
69853
69958
|
var langwatchEnableInputSchema = enableDefinition;
|
|
69854
69959
|
var levelDefinition = external_exports.object({
|
|
69855
69960
|
workspaceId: workspaceIdSchema5,
|
|
69856
|
-
level: langwatchContentLevelSchema
|
|
69961
|
+
level: langwatchContentLevelSchema.optional(),
|
|
69962
|
+
personalLevel: langwatchPersonalLevelSchema.optional()
|
|
69857
69963
|
});
|
|
69858
69964
|
var langwatchLevelInputSchema = levelDefinition;
|
|
69859
69965
|
var testResultDefinition = external_exports.object({
|
|
@@ -69877,6 +69983,7 @@ var langwatchUntracedReasonSchema = external_exports.enum([
|
|
|
69877
69983
|
"not_hosted",
|
|
69878
69984
|
"own_machine",
|
|
69879
69985
|
"harness",
|
|
69986
|
+
/** No longer given: personal agents send metadata by default. */
|
|
69880
69987
|
"not_opted_in",
|
|
69881
69988
|
"agent_off"
|
|
69882
69989
|
]);
|
|
@@ -69889,18 +69996,34 @@ var agentTracingDefinition = external_exports.object({
|
|
|
69889
69996
|
eligible: external_exports.boolean(),
|
|
69890
69997
|
workspaceEnabled: external_exports.boolean(),
|
|
69891
69998
|
workspaceLevel: langwatchContentLevelSchema,
|
|
69892
|
-
/**
|
|
69999
|
+
/** Its traces may carry content: a team agent, or a personal agent its owner set to full. */
|
|
69893
70000
|
optedIn: external_exports.boolean(),
|
|
69894
|
-
/** The
|
|
69895
|
-
override: langwatchAgentLevelSchema.nullable()
|
|
70001
|
+
/** The level someone chose for this agent; null when it takes its default. */
|
|
70002
|
+
override: langwatchAgentLevelSchema.nullable(),
|
|
70003
|
+
/** The agent's level, chosen or default, whether or not its traces can go. */
|
|
70004
|
+
level: langwatchAgentLevelSchema.default("off"),
|
|
70005
|
+
/** What it takes without a choice: the workspace's level for a team agent, metadata else. */
|
|
70006
|
+
defaultLevel: langwatchAgentLevelSchema.default("metadata")
|
|
69896
70007
|
});
|
|
69897
70008
|
var langwatchAgentTracingSchema = agentTracingDefinition;
|
|
69898
70009
|
var agentChoiceDefinition = external_exports.object({
|
|
69899
|
-
/**
|
|
70010
|
+
/** Deprecated: true sets full (owner only), false sets metadata. Use `level`. */
|
|
69900
70011
|
optIn: external_exports.boolean().optional(),
|
|
69901
|
-
/** The agent's own level, or `follow` for
|
|
70012
|
+
/** The agent's own level, or `follow` for its default. */
|
|
69902
70013
|
level: external_exports.union([langwatchAgentLevelSchema, external_exports.literal("follow")]).optional()
|
|
69903
70014
|
});
|
|
70015
|
+
var agentRowDefinition = external_exports.object({
|
|
70016
|
+
agentId: external_exports.string(),
|
|
70017
|
+
name: external_exports.string(),
|
|
70018
|
+
kind: external_exports.enum(["personal", "team"]),
|
|
70019
|
+
ownerUserId: external_exports.string(),
|
|
70020
|
+
/** The owner's name or email; null when they left. */
|
|
70021
|
+
ownerName: external_exports.string().nullable(),
|
|
70022
|
+
tracing: agentTracingDefinition,
|
|
70023
|
+
/** The levels this viewer may pick for it; empty when they may not change it. */
|
|
70024
|
+
choices: external_exports.array(langwatchAgentLevelSchema)
|
|
70025
|
+
});
|
|
70026
|
+
var langwatchAgentRowSchema = agentRowDefinition;
|
|
69904
70027
|
var langwatchOtlpPayloadSchemaDefinition = external_exports.record(external_exports.string(), external_exports.unknown());
|
|
69905
70028
|
var langwatchOtlpPayloadSchema = langwatchOtlpPayloadSchemaDefinition;
|
|
69906
70029
|
var ingestDefinition = external_exports.object({
|
|
@@ -69931,15 +70054,21 @@ var connectStartDefinition = external_exports.object({
|
|
|
69931
70054
|
});
|
|
69932
70055
|
var langwatchConnectStartInputSchema = connectStartDefinition;
|
|
69933
70056
|
var connectStartedDefinition = external_exports.object({
|
|
69934
|
-
/**
|
|
69935
|
-
|
|
70057
|
+
/** Names the attempt when the page asks how it is going. */
|
|
70058
|
+
attemptId: external_exports.string(),
|
|
70059
|
+
/** LangWatch's approval page, where the person picks a project. */
|
|
70060
|
+
verificationUrl: external_exports.string(),
|
|
70061
|
+
/** The code LangWatch's page shows, to check it is this connect. */
|
|
70062
|
+
userCode: external_exports.string(),
|
|
70063
|
+
expiresAt: iso,
|
|
70064
|
+
/** The approval page again, for pages loaded before the device flow. */
|
|
70065
|
+
authorizeUrl: external_exports.string().meta({ deprecated: true })
|
|
69936
70066
|
});
|
|
69937
|
-
var
|
|
69938
|
-
|
|
69939
|
-
|
|
69940
|
-
error: external_exports.string().max(200).optional(),
|
|
69941
|
-
error_description: external_exports.string().max(2e3).optional()
|
|
70067
|
+
var connectAttemptDefinition = external_exports.object({
|
|
70068
|
+
workspaceId: workspaceIdSchema5,
|
|
70069
|
+
attemptId: external_exports.string().min(1).max(200)
|
|
69942
70070
|
});
|
|
70071
|
+
var langwatchConnectAttemptInputSchema = connectAttemptDefinition;
|
|
69943
70072
|
var langwatchConnectErrorSchema = external_exports.enum([
|
|
69944
70073
|
"state_invalid",
|
|
69945
70074
|
"expired",
|
|
@@ -69949,11 +70078,29 @@ var langwatchConnectErrorSchema = external_exports.enum([
|
|
|
69949
70078
|
"mint_failed",
|
|
69950
70079
|
"save_failed"
|
|
69951
70080
|
]);
|
|
70081
|
+
var connectStatusDefinition = external_exports.discriminatedUnion("state", [
|
|
70082
|
+
external_exports.object({ state: external_exports.literal("waiting") }),
|
|
70083
|
+
external_exports.object({ state: external_exports.literal("connected"), integration: integrationDefinition }),
|
|
70084
|
+
external_exports.object({ state: external_exports.literal("failed"), error: langwatchConnectErrorSchema })
|
|
70085
|
+
]);
|
|
70086
|
+
var connectCancelledDefinition = external_exports.object({ cancelled: external_exports.boolean() });
|
|
70087
|
+
var mineDefinition = external_exports.object({ workspaceId: workspaceIdSchema5, on: external_exports.boolean() });
|
|
70088
|
+
var langwatchMineInputSchema = mineDefinition;
|
|
69952
70089
|
var LangwatchApi = moduleApi()("langwatch");
|
|
69953
|
-
var langwatchTrpc = defineTrpcContract("langwatch").query("integration").withInput(workspaceInputDefinition).withOutput(integrationDefinition).mutation("saveKey").withInput(saveKeyDefinition).withOutput(integrationDefinition).mutation("enable").withInput(enableDefinition).withOutput(integrationDefinition).mutation("disable").withInput(workspaceInputDefinition).withOutput(integrationDefinition).mutation("setLevel").withInput(levelDefinition).withOutput(integrationDefinition).mutation("test").withInput(workspaceInputDefinition).withOutput(testResultDefinition).mutation("remove").withInput(workspaceInputDefinition).withOutput(integrationDefinition).mutation("connectStart").withInput(connectStartDefinition).withOutput(connectStartedDefinition).build();
|
|
70090
|
+
var langwatchTrpc = defineTrpcContract("langwatch").query("integration").withInput(workspaceInputDefinition).withOutput(integrationDefinition).mutation("saveKey").withInput(saveKeyDefinition).withOutput(integrationDefinition).mutation("enable").withInput(enableDefinition).withOutput(integrationDefinition).mutation("disable").withInput(workspaceInputDefinition).withOutput(integrationDefinition).mutation("setLevel").withInput(levelDefinition).withOutput(integrationDefinition).mutation("test").withInput(workspaceInputDefinition).withOutput(testResultDefinition).mutation("remove").withInput(workspaceInputDefinition).withOutput(integrationDefinition).mutation("connectStart").withInput(connectStartDefinition).withOutput(connectStartedDefinition).mutation("connectPoll").withInput(connectAttemptDefinition).withOutput(connectStatusDefinition).mutation("connectCancel").withInput(connectAttemptDefinition).withOutput(connectCancelledDefinition).mutation("setMine").withInput(mineDefinition).withOutput(integrationDefinition).build();
|
|
69954
70091
|
|
|
69955
70092
|
// ../../modules/langwatch/contract/src/langwatch.config.ts
|
|
69956
|
-
var langwatchConfig = Config.define(() => ({
|
|
70093
|
+
var langwatchConfig = Config.define((c) => ({
|
|
70094
|
+
/**
|
|
70095
|
+
* Dev stacks only: a LangWatch on this machine (`http://127.0.0.1:<port>`) that may be
|
|
70096
|
+
* connected, past the public-https rule and the SSRF fence. Production refuses to boot with it.
|
|
70097
|
+
*/
|
|
70098
|
+
devEndpoint: c.env(
|
|
70099
|
+
"LAZE_LANGWATCH_DEV_ENDPOINT",
|
|
70100
|
+
external_exports.string().regex(/^http:\/\/(127\.0\.0\.1|localhost):\d{1,5}$/).optional()
|
|
70101
|
+
),
|
|
70102
|
+
nodeEnvironment
|
|
70103
|
+
}));
|
|
69957
70104
|
|
|
69958
70105
|
// ../../modules/langwatch/contract/src/langwatch.rest.ts
|
|
69959
70106
|
var keyed = { workspaceId: true };
|
|
@@ -69962,33 +70109,32 @@ var saveKeyDefinition2 = langwatchSaveKeyInputSchema.omit(keyed);
|
|
|
69962
70109
|
var enableDefinition2 = langwatchEnableInputSchema.omit(keyed);
|
|
69963
70110
|
var levelDefinition2 = langwatchLevelInputSchema.omit(keyed);
|
|
69964
70111
|
var connectDefinition = langwatchConnectStartInputSchema.omit(keyed);
|
|
70112
|
+
var connectAttemptDefinition2 = langwatchConnectAttemptInputSchema.omit(keyed);
|
|
70113
|
+
var mineDefinition2 = langwatchMineInputSchema.omit(keyed);
|
|
69965
70114
|
|
|
69966
70115
|
// ../../modules/langwatch/contract/src/langwatch.surfaces.ts
|
|
69967
|
-
var langwatchSurfaces = defineSurfaces(
|
|
69968
|
-
|
|
69969
|
-
{
|
|
69970
|
-
|
|
69971
|
-
|
|
69972
|
-
|
|
69973
|
-
|
|
69974
|
-
|
|
69975
|
-
|
|
69976
|
-
|
|
69977
|
-
|
|
69978
|
-
}
|
|
69979
|
-
|
|
69980
|
-
langwatchConnectCallback: { machineOnly: "LangWatch's OAuth callback, a browser redirect" }
|
|
69981
|
-
}
|
|
69982
|
-
);
|
|
70116
|
+
var langwatchSurfaces = defineSurfaces(langwatchTrpc, {
|
|
70117
|
+
integration: { rest: "langwatchStatus", cli: "langwatch status" },
|
|
70118
|
+
saveKey: { rest: "langwatchSetKey", cli: "langwatch set-key" },
|
|
70119
|
+
enable: { rest: "langwatchEnable", cli: "langwatch on" },
|
|
70120
|
+
disable: { rest: "langwatchDisable", cli: "langwatch off" },
|
|
70121
|
+
setLevel: { rest: "langwatchLevel", cli: "langwatch level" },
|
|
70122
|
+
test: { rest: "langwatchTest", cli: "langwatch test" },
|
|
70123
|
+
remove: { rest: "langwatchRemove", cli: "langwatch remove" },
|
|
70124
|
+
connectStart: { rest: "langwatchConnect", cli: "langwatch connect" },
|
|
70125
|
+
connectPoll: { rest: "langwatchConnectPoll", cli: "langwatch connect" },
|
|
70126
|
+
connectCancel: { rest: "langwatchConnectCancel", cli: "langwatch connect" },
|
|
70127
|
+
setMine: { rest: "langwatchMine", cli: "langwatch mine" }
|
|
70128
|
+
});
|
|
69983
70129
|
|
|
69984
70130
|
// ../../modules/agent/contract/src/agent-langwatch.ts
|
|
69985
70131
|
var agentRefSchema4 = external_exports.string().trim().min(1).max(80);
|
|
69986
70132
|
var workspaceIdSchema6 = external_exports.string().min(1);
|
|
69987
70133
|
var idSchema10 = external_exports.string().min(1).max(80);
|
|
69988
70134
|
var choiceShape = {
|
|
69989
|
-
/**
|
|
70135
|
+
/** Deprecated: true sets full (owner only), false sets metadata. Use `level`. */
|
|
69990
70136
|
optIn: external_exports.boolean().optional(),
|
|
69991
|
-
/** The agent's own level, or `follow` for
|
|
70137
|
+
/** The agent's own level, or `follow` for its default. */
|
|
69992
70138
|
level: external_exports.union([langwatchAgentLevelSchema, external_exports.literal("follow")]).optional()
|
|
69993
70139
|
};
|
|
69994
70140
|
var agentTelemetryInputSchemaDefinition = external_exports.object({
|
|
@@ -70013,6 +70159,10 @@ var setAgentLangwatchAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
70013
70159
|
...choiceShape
|
|
70014
70160
|
});
|
|
70015
70161
|
var agentLangwatchTracingSchema = langwatchAgentTracingSchema;
|
|
70162
|
+
var agentLangwatchListInputSchemaDefinition = external_exports.object({ workspaceId: workspaceIdSchema6 });
|
|
70163
|
+
var agentLangwatchListInputSchema = agentLangwatchListInputSchemaDefinition;
|
|
70164
|
+
var agentLangwatchRowsSchemaDefinition = external_exports.array(langwatchAgentRowSchema);
|
|
70165
|
+
var agentLangwatchRowsSchema = agentLangwatchRowsSchemaDefinition;
|
|
70016
70166
|
|
|
70017
70167
|
// ../../modules/agent/contract/src/agent-lifecycle.ts
|
|
70018
70168
|
var workspaceIdSchema7 = external_exports.string().min(1);
|
|
@@ -70351,6 +70501,8 @@ var loginPoolSchemaDefinition = external_exports.object({
|
|
|
70351
70501
|
contributedByName: external_exports.string(),
|
|
70352
70502
|
/** Whether an agent runs on it now. */
|
|
70353
70503
|
inUse: external_exports.boolean(),
|
|
70504
|
+
/** How many of the pool's agents run on it now. */
|
|
70505
|
+
agentsOnIt: external_exports.number().int().nonnegative().optional(),
|
|
70354
70506
|
usedPercent: external_exports.number().nullable(),
|
|
70355
70507
|
resetsAt: external_exports.iso.datetime().nullable(),
|
|
70356
70508
|
limitedUntil: external_exports.iso.datetime().nullable(),
|
|
@@ -70964,6 +71116,56 @@ var agentTransferResolvedPayloadSchemaDefinition = external_exports.object({
|
|
|
70964
71116
|
resolvedByUserId: external_exports.string().min(1)
|
|
70965
71117
|
});
|
|
70966
71118
|
|
|
71119
|
+
// ../../modules/agent/contract/src/agent-usage-activity.ts
|
|
71120
|
+
var usageHarnessSchema = external_exports.enum(["claude-code", "codex", "laze-models"]);
|
|
71121
|
+
var agentUsageActivityInputDefinition = external_exports.object({
|
|
71122
|
+
workspaceId: external_exports.string().min(1),
|
|
71123
|
+
/** The period's start; the browser takes it from the credits report or the days it covers. */
|
|
71124
|
+
from: external_exports.iso.datetime(),
|
|
71125
|
+
/** The period's end; now when absent. */
|
|
71126
|
+
to: external_exports.iso.datetime().optional()
|
|
71127
|
+
});
|
|
71128
|
+
var agentUsageActivityInputSchema = agentUsageActivityInputDefinition;
|
|
71129
|
+
var agentUsageActivityQueryDefinition = agentUsageActivityInputDefinition.omit({
|
|
71130
|
+
workspaceId: true
|
|
71131
|
+
});
|
|
71132
|
+
var agentUsageActivityRowDefinition = external_exports.object({
|
|
71133
|
+
agentId: external_exports.string(),
|
|
71134
|
+
/** Its current name, or the last one for a removed agent; null once it is deleted. */
|
|
71135
|
+
name: external_exports.string().nullable(),
|
|
71136
|
+
kind: external_exports.enum(["personal", "team"]).nullable(),
|
|
71137
|
+
/** The owner of a personal agent; null for a team or deleted one. */
|
|
71138
|
+
ownerName: external_exports.string().nullable(),
|
|
71139
|
+
removed: external_exports.boolean(),
|
|
71140
|
+
/** The harness of its newest turn in the period. */
|
|
71141
|
+
harness: usageHarnessSchema,
|
|
71142
|
+
turns: external_exports.number().int().nonnegative(),
|
|
71143
|
+
failedTurns: external_exports.number().int().nonnegative(),
|
|
71144
|
+
inputTokens: external_exports.number().int().nonnegative(),
|
|
71145
|
+
outputTokens: external_exports.number().int().nonnegative()
|
|
71146
|
+
});
|
|
71147
|
+
var loginShareDefinition = external_exports.object({
|
|
71148
|
+
/** The login's vault connection id, as the login lists name it. */
|
|
71149
|
+
loginId: external_exports.string(),
|
|
71150
|
+
/** The agents that spent its tokens, most first; percents are whole and of this login. */
|
|
71151
|
+
agents: external_exports.array(
|
|
71152
|
+
external_exports.object({
|
|
71153
|
+
agentId: external_exports.string(),
|
|
71154
|
+
name: external_exports.string().nullable(),
|
|
71155
|
+
tokens: external_exports.number().int().nonnegative(),
|
|
71156
|
+
percent: external_exports.number().int().min(0).max(100)
|
|
71157
|
+
})
|
|
71158
|
+
)
|
|
71159
|
+
});
|
|
71160
|
+
var agentUsageActivityDefinition = external_exports.object({
|
|
71161
|
+
workspaceId: external_exports.string(),
|
|
71162
|
+
from: external_exports.iso.datetime(),
|
|
71163
|
+
to: external_exports.iso.datetime(),
|
|
71164
|
+
agents: external_exports.array(agentUsageActivityRowDefinition),
|
|
71165
|
+
logins: external_exports.array(loginShareDefinition)
|
|
71166
|
+
});
|
|
71167
|
+
var agentUsageActivitySchema = agentUsageActivityDefinition;
|
|
71168
|
+
|
|
70967
71169
|
// ../../modules/agent/contract/src/agent-welcome.ts
|
|
70968
71170
|
var pressWelcomeInputSchemaDefinition = external_exports.object({
|
|
70969
71171
|
workspaceId: external_exports.string().min(1),
|
|
@@ -71630,7 +71832,7 @@ var agentLoginTroubleTrpc = defineTrpcContract("agents").mutation("replaceHarnes
|
|
|
71630
71832
|
var agentWorkspaceDefaultTrpc = defineTrpcContract("agents").query("workspaceDefault").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(workspaceDefaultAgentSchema).mutation("setWorkspaceDefault").withInput(setWorkspaceDefaultAgentInputSchema).withOutput(workspaceDefaultAgentSchema).build();
|
|
71631
71833
|
var agentRuntimeChoiceTrpc = defineTrpcContract("agents").query("setup").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(agentSetupReadingSchema).mutation("retrySetup").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(agentSchema).query("lastRuntime").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(lastRuntimeSchema).build();
|
|
71632
71834
|
var agentArchiveTrpc = defineTrpcContract("agents").query("archived").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(archivedAgentSchema)).mutation("restore").withInput(restoreAgentInputSchema).withOutput(agentSchema).mutation("copy").withInput(copyAgentInputSchema).withOutput(agentSchema).mutation("deleteArchived").withInput(restoreAgentInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).query("transferOffers").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(external_exports.array(agentTransferOfferSchema)).mutation("acceptTransfer").withInput(agentTransferInputSchema).withOutput(agentSchema).mutation("declineTransfer").withInput(agentTransferInputSchema).withOutput(external_exports.object({ declined: external_exports.literal(true) })).mutation("cancelTransfer").withInput(agentTransferInputSchema).withOutput(external_exports.object({ cancelled: external_exports.literal(true) })).build();
|
|
71633
|
-
var agentLangwatchTrpc = defineTrpcContract("agents").query("langwatchTracing").withInput(agentLangwatchInputSchema).withOutput(agentLangwatchTracingSchema).mutation("setLangwatchTracing").withInput(setAgentLangwatchInputSchema).withOutput(agentLangwatchTracingSchema).build();
|
|
71835
|
+
var agentLangwatchTrpc = defineTrpcContract("agents").query("langwatchTracing").withInput(agentLangwatchInputSchema).withOutput(agentLangwatchTracingSchema).mutation("setLangwatchTracing").withInput(setAgentLangwatchInputSchema).withOutput(agentLangwatchTracingSchema).query("langwatchAgents").withInput(agentLangwatchListInputSchema).withOutput(agentLangwatchRowsSchema).build();
|
|
71634
71836
|
var agentPoolModelTrpc = defineTrpcContract("agents").mutation("setLoginPoolModel").withInput(setLoginPoolModelInputSchema).withOutput(loginPoolsSchema).build();
|
|
71635
71837
|
var agentRunsOnTrpc = defineTrpcContract("agents").mutation("setRunsOn").withInput(setRunsOnInputSchema).withOutput(agentSchema).build();
|
|
71636
71838
|
var agentWelcomeTrpc = defineTrpcContract("agents").mutation("pressWelcome").withInput(pressWelcomeInputSchema).withOutput(pressedWelcomeSchema).mutation("pressCollab").withInput(pressCollabInputSchema).withOutput(pressedCollabSchema).build();
|
|
@@ -71638,12 +71840,14 @@ var agentPoolGroupTrpc = defineTrpcContract("agents").mutation("addPoolGroup").w
|
|
|
71638
71840
|
var agentOpenConversationTrpc = defineTrpcContract("agents").mutation("openConversation").withInput(openConversationInputSchema).withOutput(external_exports.object({ channelId: idSchema19 })).build();
|
|
71639
71841
|
var agentConversationCloseTrpc = defineTrpcContract("agents").mutation("closeConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("reopenConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("convertConversation").withInput(convertConversationInputSchema).withOutput(convertedConversationSchema).build();
|
|
71640
71842
|
var agentShareRequestTrpc = defineTrpcContract("agents").mutation("askShare").withInput(askAgentShareInputSchema).withOutput(agentAccessSchema).mutation("cancelShareAsk").withInput(cancelAgentShareAskInputSchema).withOutput(agentAccessSchema).build();
|
|
71843
|
+
var agentUsageActivityTrpc = defineTrpcContract("agents").query("usageActivity").withInput(agentUsageActivityInputSchema).withOutput(agentUsageActivitySchema).build();
|
|
71641
71844
|
var agentReconnectTrpc = defineTrpcContract("agents").query("reconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema19 })).withOutput(agentReconnectSchema).build();
|
|
71642
71845
|
var agentTrpc = joinTrpcContracts(
|
|
71643
71846
|
"agents",
|
|
71644
71847
|
agentCoreTrpc,
|
|
71645
71848
|
agentPoolGroupTrpc,
|
|
71646
71849
|
agentReconnectTrpc,
|
|
71850
|
+
agentUsageActivityTrpc,
|
|
71647
71851
|
agentShareRequestTrpc,
|
|
71648
71852
|
agentOpenConversationTrpc,
|
|
71649
71853
|
agentConversationCloseTrpc,
|
|
@@ -71799,7 +72003,15 @@ var agentTurnEndedPayloadSchemaDefinition = external_exports.object({
|
|
|
71799
72003
|
/** What the session said when the turn failed. */
|
|
71800
72004
|
reason: external_exports.string().max(500).optional(),
|
|
71801
72005
|
/** The failure's kind (`model_error`, `model_key_denied`...); one kind makes one streak. */
|
|
71802
|
-
code: external_exports.string().max(80).optional()
|
|
72006
|
+
code: external_exports.string().max(80).optional(),
|
|
72007
|
+
/** When the turn ended; absent on older facts. */
|
|
72008
|
+
endedAt: external_exports.iso.datetime().optional(),
|
|
72009
|
+
/** How long the turn ran, when its supervisor said. */
|
|
72010
|
+
durationMs: external_exports.number().int().nonnegative().optional(),
|
|
72011
|
+
/** The agent's harness, hosting and owner when the turn ended; absent on older facts. */
|
|
72012
|
+
harness: external_exports.string().max(40).optional(),
|
|
72013
|
+
hosting: external_exports.string().max(40).optional(),
|
|
72014
|
+
ownerUserId: external_exports.string().max(80).optional()
|
|
71803
72015
|
});
|
|
71804
72016
|
var agentTurnFailuresStateSchemaDefinition = external_exports.object({
|
|
71805
72017
|
workspaceId: external_exports.string(),
|
|
@@ -73256,9 +73468,9 @@ function serverUrlOf({ context, args }) {
|
|
|
73256
73468
|
// src/services/agent-access-commands.service.ts
|
|
73257
73469
|
var SHARE_USAGE = "Usage: laze agent share <agent> --person <userId> | --group <groupId> | --agent <agent>\n laze agent share <agent> --ask --person <userId> [--agent <agent> ...]\n laze agent unshare <agent> --person <userId> | --group <groupId> | --channel <channelId> | --agent <agent>";
|
|
73258
73470
|
var CHANNEL_SHARE_GONE = "An agent joins a channel from the channel: laze channel add <channel> <agent>";
|
|
73259
|
-
function agentWord({ args, usage }) {
|
|
73471
|
+
function agentWord({ args, usage: usage2 }) {
|
|
73260
73472
|
const agent3 = args.words[2];
|
|
73261
|
-
if (!agent3) throw new CliUsageError(
|
|
73473
|
+
if (!agent3) throw new CliUsageError(usage2);
|
|
73262
73474
|
return agent3;
|
|
73263
73475
|
}
|
|
73264
73476
|
function printAccess({ context, args, access }) {
|
|
@@ -73267,14 +73479,14 @@ function printAccess({ context, args, access }) {
|
|
|
73267
73479
|
const people2 = access.people.map((person) => person.userId).join(", ") || "no one";
|
|
73268
73480
|
const channels3 = access.channels.map((channel) => `#${channel.name}`).join(", ") || "none";
|
|
73269
73481
|
const groups2 = (access.groups ?? []).map((group) => `@${group.name}`).join(", ") || "none";
|
|
73270
|
-
const
|
|
73482
|
+
const agents2 = (access.agents ?? []).map((agent3) => agent3.name).join(", ") || "none";
|
|
73271
73483
|
const addedTo = (access.addedTo ?? []).map((agent3) => agent3.name).join(", ") || "none";
|
|
73272
73484
|
context.out(
|
|
73273
73485
|
`${access.kind} agent, owned by ${access.ownerUserId}
|
|
73274
73486
|
People: ${people2}
|
|
73275
73487
|
Groups: ${groups2}
|
|
73276
73488
|
Channels: ${channels3}
|
|
73277
|
-
Agents: ${
|
|
73489
|
+
Agents: ${agents2}
|
|
73278
73490
|
Can DM: ${addedTo}
|
|
73279
73491
|
`
|
|
73280
73492
|
);
|
|
@@ -73373,21 +73585,21 @@ async function openAgentDirect({ context, args }) {
|
|
|
73373
73585
|
`);
|
|
73374
73586
|
}
|
|
73375
73587
|
async function stopAgentTurn({ context, args }) {
|
|
73376
|
-
const
|
|
73377
|
-
const agent3 = agentWord({ args, usage });
|
|
73588
|
+
const usage2 = "Usage: laze agent stop <agent> --channel <channelId>";
|
|
73589
|
+
const agent3 = agentWord({ args, usage: usage2 });
|
|
73378
73590
|
const channelId = flagText({ args, name: "channel" });
|
|
73379
|
-
if (!channelId) throw new CliUsageError(
|
|
73591
|
+
if (!channelId) throw new CliUsageError(usage2);
|
|
73380
73592
|
const { client } = await signedIn({ context, args });
|
|
73381
73593
|
await client.post("/api/agents/stop", { agent: agent3, channelId });
|
|
73382
73594
|
context.out(`Stopped ${agent3}'s turn.
|
|
73383
73595
|
`);
|
|
73384
73596
|
}
|
|
73385
73597
|
async function retryAgentTurn({ context, args }) {
|
|
73386
|
-
const
|
|
73387
|
-
const agent3 = agentWord({ args, usage });
|
|
73598
|
+
const usage2 = "Usage: laze agent retry <agent> --channel <channelId> --message <messageId>";
|
|
73599
|
+
const agent3 = agentWord({ args, usage: usage2 });
|
|
73388
73600
|
const channelId = flagText({ args, name: "channel" });
|
|
73389
73601
|
const messageId = flagText({ args, name: "message" });
|
|
73390
|
-
if (!channelId || !messageId) throw new CliUsageError(
|
|
73602
|
+
if (!channelId || !messageId) throw new CliUsageError(usage2);
|
|
73391
73603
|
const { client } = await signedIn({ context, args });
|
|
73392
73604
|
await client.post("/api/agents/retry", { agent: agent3, channelId, messageId });
|
|
73393
73605
|
context.out(`Sent the message to ${agent3} again.
|
|
@@ -73424,6 +73636,65 @@ ${link2.prompt}
|
|
|
73424
73636
|
);
|
|
73425
73637
|
}
|
|
73426
73638
|
|
|
73639
|
+
// src/services/agent-activity-commands.service.ts
|
|
73640
|
+
var AGENTS_ACTIVITY_USAGE = `Usage:
|
|
73641
|
+
laze agents activity [--period 7d|30d|period] turns, failures and tokens per agent, most tokens first (default: this billing period)
|
|
73642
|
+
`;
|
|
73643
|
+
var DAYS = { "7d": 7, "30d": 30 };
|
|
73644
|
+
var RUNS_ON = {
|
|
73645
|
+
"claude-code": "Claude Code",
|
|
73646
|
+
codex: "Codex",
|
|
73647
|
+
"laze-models": "Laze credits"
|
|
73648
|
+
};
|
|
73649
|
+
async function periodStartOf({
|
|
73650
|
+
client,
|
|
73651
|
+
now
|
|
73652
|
+
}) {
|
|
73653
|
+
try {
|
|
73654
|
+
const report3 = await client.get(
|
|
73655
|
+
"/api/billing-account/usage?period=billing_period"
|
|
73656
|
+
);
|
|
73657
|
+
return report3.from;
|
|
73658
|
+
} catch {
|
|
73659
|
+
const day2 = now.toZonedDateTimeISO("UTC");
|
|
73660
|
+
return Temporal3.PlainDateTime.from({ year: day2.year, month: day2.month, day: 1 }).toZonedDateTime("UTC").toInstant().toString();
|
|
73661
|
+
}
|
|
73662
|
+
}
|
|
73663
|
+
async function agentsActivity({ context, args }) {
|
|
73664
|
+
const { client } = await signedIn({ context, args });
|
|
73665
|
+
const asked = flagText({ args, name: "period", fallback: "period" });
|
|
73666
|
+
const days = DAYS[asked];
|
|
73667
|
+
if (!days && asked !== "period") {
|
|
73668
|
+
throw new CliUsageError(`--period takes 7d, 30d or period.
|
|
73669
|
+
${AGENTS_ACTIVITY_USAGE}`);
|
|
73670
|
+
}
|
|
73671
|
+
const now = nowInstant();
|
|
73672
|
+
const from = days ? now.subtract({ hours: 24 * days }).toString() : await periodStartOf({ client, now });
|
|
73673
|
+
const activity2 = await client.get(
|
|
73674
|
+
`/api/agents/usage-activity?from=${encodeURIComponent(from)}`
|
|
73675
|
+
);
|
|
73676
|
+
if (args.flags.json) {
|
|
73677
|
+
context.out(`${JSON.stringify(activity2, null, 2)}
|
|
73678
|
+
`);
|
|
73679
|
+
return;
|
|
73680
|
+
}
|
|
73681
|
+
context.out(`Agent activity ${activity2.from.slice(0, 10)} to ${activity2.to.slice(0, 10)}
|
|
73682
|
+
`);
|
|
73683
|
+
if (activity2.agents.length === 0) {
|
|
73684
|
+
context.out("No agent turns in this period.\n");
|
|
73685
|
+
return;
|
|
73686
|
+
}
|
|
73687
|
+
activity2.agents.forEach((row, index) => {
|
|
73688
|
+
const name3 = row.name ?? "Deleted agent";
|
|
73689
|
+
const removed = row.removed ? " (removed)" : "";
|
|
73690
|
+
const tokens = (row.inputTokens + row.outputTokens).toLocaleString("en-GB");
|
|
73691
|
+
context.out(
|
|
73692
|
+
`${index + 1}. ${name3}${removed} on ${RUNS_ON[row.harness]}: ${row.turns} turns, ${row.failedTurns} failed, ${tokens} tokens
|
|
73693
|
+
`
|
|
73694
|
+
);
|
|
73695
|
+
});
|
|
73696
|
+
}
|
|
73697
|
+
|
|
73427
73698
|
// src/services/agent-archive-commands.service.ts
|
|
73428
73699
|
var RESTORE_USAGE = "Usage: laze agent restore <agent>";
|
|
73429
73700
|
var DELETE_USAGE = "Usage: laze agent delete <agent>";
|
|
@@ -73695,10 +73966,10 @@ function whereOf(message2) {
|
|
|
73695
73966
|
}
|
|
73696
73967
|
function catchUpLinesOf(message2) {
|
|
73697
73968
|
if (!message2.catchUp) return [];
|
|
73698
|
-
const { count:
|
|
73969
|
+
const { count: count13, older } = message2.catchUp;
|
|
73699
73970
|
const where = whereOf(message2);
|
|
73700
73971
|
const lines2 = [
|
|
73701
|
-
`${
|
|
73972
|
+
`${count13} ${count13 === 1 ? "message" : "messages"} in ${where} while you were away.`
|
|
73702
73973
|
];
|
|
73703
73974
|
if (older === 0) return lines2;
|
|
73704
73975
|
const channel = message2.channelKind === "public" || message2.channelKind === "private";
|
|
@@ -73726,9 +73997,9 @@ function hookContextOf({
|
|
|
73726
73997
|
messages,
|
|
73727
73998
|
self: self2
|
|
73728
73999
|
}) {
|
|
73729
|
-
const
|
|
74000
|
+
const count13 = messages.length === 1 ? "A message" : `${messages.length} messages`;
|
|
73730
74001
|
return [
|
|
73731
|
-
`${
|
|
74002
|
+
`${count13} reached you in Laze${selfClauseOf({ self: self2 })}:`,
|
|
73732
74003
|
"",
|
|
73733
74004
|
...messages.map((message2) => formatInboxMessage({ message: message2 })),
|
|
73734
74005
|
"",
|
|
@@ -73743,7 +74014,7 @@ function selfClauseOf({ self: self2 }) {
|
|
|
73743
74014
|
function record2(value) {
|
|
73744
74015
|
return typeof value === "object" && value !== null ? value : {};
|
|
73745
74016
|
}
|
|
73746
|
-
function
|
|
74017
|
+
function count7(value) {
|
|
73747
74018
|
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
|
|
73748
74019
|
}
|
|
73749
74020
|
function parse3(line) {
|
|
@@ -73764,17 +74035,17 @@ function compactionOf({
|
|
|
73764
74035
|
return {
|
|
73765
74036
|
key: typeof entry2.uuid === "string" ? entry2.uuid : String(index),
|
|
73766
74037
|
trigger: meta3.trigger === "manual" ? "manual" : "auto",
|
|
73767
|
-
tokensBefore:
|
|
73768
|
-
tokensAfter:
|
|
74038
|
+
tokensBefore: count7(meta3.preTokens),
|
|
74039
|
+
tokensAfter: count7(meta3.postTokens),
|
|
73769
74040
|
at: typeof entry2.timestamp === "string" ? entry2.timestamp : "1970-01-01T00:00:00.000Z"
|
|
73770
74041
|
};
|
|
73771
74042
|
}
|
|
73772
74043
|
function usageOf({ entry: entry2 }) {
|
|
73773
74044
|
const message2 = record2(entry2.message);
|
|
73774
|
-
const
|
|
73775
|
-
const input2 =
|
|
74045
|
+
const usage2 = record2(message2.usage);
|
|
74046
|
+
const input2 = count7(usage2.input_tokens);
|
|
73776
74047
|
if (input2 === void 0) return void 0;
|
|
73777
|
-
const cached2 = (
|
|
74048
|
+
const cached2 = (count7(usage2.cache_read_input_tokens) ?? 0) + (count7(usage2.cache_creation_input_tokens) ?? 0);
|
|
73778
74049
|
return {
|
|
73779
74050
|
tokens: input2 + cached2,
|
|
73780
74051
|
...typeof message2.model === "string" ? { model: message2.model } : {}
|
|
@@ -73793,10 +74064,10 @@ function readTranscript({ lines: lines2 }) {
|
|
|
73793
74064
|
contextTokens = compaction.tokensAfter ?? contextTokens;
|
|
73794
74065
|
continue;
|
|
73795
74066
|
}
|
|
73796
|
-
const
|
|
73797
|
-
if (!
|
|
73798
|
-
contextTokens =
|
|
73799
|
-
if (
|
|
74067
|
+
const usage2 = entry2.type === "assistant" ? usageOf({ entry: entry2 }) : void 0;
|
|
74068
|
+
if (!usage2) continue;
|
|
74069
|
+
contextTokens = usage2.tokens;
|
|
74070
|
+
if (usage2.model) contextWindow = contextWindowOf({ model: usage2.model });
|
|
73800
74071
|
}
|
|
73801
74072
|
return { contextTokens, contextWindow, compactions };
|
|
73802
74073
|
}
|
|
@@ -74096,7 +74367,13 @@ var slackExternalPeopleSchemaDefinition = external_exports.object({
|
|
|
74096
74367
|
});
|
|
74097
74368
|
var slackExternalPeopleSchema = slackExternalPeopleSchemaDefinition;
|
|
74098
74369
|
var slackChannelPeopleSchemaDefinition = external_exports.object({
|
|
74099
|
-
people: external_exports.array(
|
|
74370
|
+
people: external_exports.array(
|
|
74371
|
+
external_exports.object({
|
|
74372
|
+
...slackExternalPersonSchemaDefinition.shape,
|
|
74373
|
+
/** Their Slack workspace when it is not the connected one, as in Slack Connect. */
|
|
74374
|
+
company: slackCompanySchemaDefinition.nullable().optional()
|
|
74375
|
+
})
|
|
74376
|
+
)
|
|
74100
74377
|
});
|
|
74101
74378
|
var slackChannelPeopleSchema = slackChannelPeopleSchemaDefinition;
|
|
74102
74379
|
var slackExternalPeopleCountsInputSchemaDefinition = external_exports.object({
|
|
@@ -74473,6 +74750,8 @@ var slackHistoryMessageSchemaDefinition = external_exports.object({
|
|
|
74473
74750
|
authorAvatarUrl: external_exports.string().nullable(),
|
|
74474
74751
|
/** The Laze person behind the Slack account when linked. */
|
|
74475
74752
|
authorUserId: external_exports.string().nullable(),
|
|
74753
|
+
/** The Slack author's external id, such as `slack:T1:U1`, for their profile card; else null. */
|
|
74754
|
+
authorExternalId: external_exports.string().nullable().default(null),
|
|
74476
74755
|
/** Laze markdown, linked people as mentions. */
|
|
74477
74756
|
body: external_exports.string(),
|
|
74478
74757
|
replyCount: external_exports.number().int().nonnegative(),
|
|
@@ -74534,6 +74813,8 @@ var slackSearchHitSchemaDefinition = external_exports.object({
|
|
|
74534
74813
|
authorAvatarUrl: external_exports.string().nullable(),
|
|
74535
74814
|
/** The Laze person behind the Slack account when linked. */
|
|
74536
74815
|
authorUserId: external_exports.string().nullable(),
|
|
74816
|
+
/** The Slack author's external id, such as `slack:T1:U1`, for their profile card; else null. */
|
|
74817
|
+
authorExternalId: external_exports.string().nullable().default(null),
|
|
74537
74818
|
/** Laze markdown, linked people as mentions. */
|
|
74538
74819
|
body: external_exports.string(),
|
|
74539
74820
|
/** Where the message opens in Slack. */
|
|
@@ -74662,7 +74943,7 @@ var slackConfig = Config.define((c) => ({
|
|
|
74662
74943
|
}));
|
|
74663
74944
|
|
|
74664
74945
|
// ../../modules/slack/contract/src/slack-ops.ts
|
|
74665
|
-
var
|
|
74946
|
+
var count8 = external_exports.number().int().nonnegative();
|
|
74666
74947
|
var at2 = external_exports.iso.datetime();
|
|
74667
74948
|
var slackMirrorHealthDefinition = external_exports.object({
|
|
74668
74949
|
mirrors: external_exports.array(
|
|
@@ -74675,19 +74956,19 @@ var slackMirrorHealthDefinition = external_exports.object({
|
|
|
74675
74956
|
/** Shared with another organisation, such as a Slack Connect channel. */
|
|
74676
74957
|
external: external_exports.boolean(),
|
|
74677
74958
|
botMember: external_exports.boolean(),
|
|
74678
|
-
linkedMembers:
|
|
74679
|
-
cacheDays:
|
|
74959
|
+
linkedMembers: count8,
|
|
74960
|
+
cacheDays: count8,
|
|
74680
74961
|
backfilledAt: at2.nullable(),
|
|
74681
74962
|
reconciledAt: at2.nullable(),
|
|
74682
74963
|
/** Message links Laze holds for the conversation, both ways. */
|
|
74683
|
-
links:
|
|
74964
|
+
links: count8,
|
|
74684
74965
|
/** Thread roots Laze holds a reply of. */
|
|
74685
|
-
threads:
|
|
74966
|
+
threads: count8,
|
|
74686
74967
|
/** Roots whose Slack reply count, when last read, is above the replies Laze holds. */
|
|
74687
|
-
threadsShort:
|
|
74688
|
-
repliesShort:
|
|
74968
|
+
threadsShort: count8,
|
|
74969
|
+
repliesShort: count8,
|
|
74689
74970
|
/** Threads Laze holds whose root is older than the cache window. */
|
|
74690
|
-
oldThreads:
|
|
74971
|
+
oldThreads: count8
|
|
74691
74972
|
})
|
|
74692
74973
|
)
|
|
74693
74974
|
});
|
|
@@ -74698,10 +74979,10 @@ var DURATION = /^(\d+)\s*(m|min|mins|minutes?|h|hours?|d|days?)$/i;
|
|
|
74698
74979
|
function minutesOf({ text: text3 }) {
|
|
74699
74980
|
const match = DURATION.exec(text3.trim());
|
|
74700
74981
|
if (!match?.[1] || !match[2]) return null;
|
|
74701
|
-
const
|
|
74982
|
+
const count13 = Number(match[1]);
|
|
74702
74983
|
const unit = match[2].toLowerCase()[0];
|
|
74703
74984
|
const perUnit = { d: 1440, h: 60, m: 1 };
|
|
74704
|
-
const minutes =
|
|
74985
|
+
const minutes = count13 * (perUnit[unit ?? "m"] ?? 1);
|
|
74705
74986
|
return minutes > 0 ? minutes : null;
|
|
74706
74987
|
}
|
|
74707
74988
|
function muteTextOf({ mute }) {
|
|
@@ -74748,6 +75029,24 @@ function waitsForLinesOf({ posted }) {
|
|
|
74748
75029
|
}).join("");
|
|
74749
75030
|
}
|
|
74750
75031
|
|
|
75032
|
+
// src/rules/promise-reminder.rules.ts
|
|
75033
|
+
var PROMISE = /\b(?:i['’]ll|i will|i['’]m going to|i am going to|we['’]ll|let me get back|get back to you|working on it|on it|starting (?:on it |it )?now)\b|\bback (?:in (?:about |around |~)?\d+\s*(?:min|minutes|mins|h|hours?)|shortly|soon|later)\b/i;
|
|
75034
|
+
function ownWordsOf(text3) {
|
|
75035
|
+
return text3.replace(/```[\s\S]*?```/g, " ").split("\n").filter((line) => !line.trimStart().startsWith(">")).join("\n");
|
|
75036
|
+
}
|
|
75037
|
+
function promisesLaterWork({ text: text3 }) {
|
|
75038
|
+
return PROMISE.test(ownWordsOf(text3));
|
|
75039
|
+
}
|
|
75040
|
+
function promiseReminderOf({ text: text3 }) {
|
|
75041
|
+
if (!promisesLaterWork({ text: text3 })) return "";
|
|
75042
|
+
return [
|
|
75043
|
+
"You promised work in that message. Nothing runs after your turn ends and nothing wakes you",
|
|
75044
|
+
"for it, so do the work now in this turn and post the result when it is done, or set a",
|
|
75045
|
+
"`laze schedule` for it, or say plainly that it waits on someone. You cannot see the clock,",
|
|
75046
|
+
"so never promise a time: say what you will do, then do it.\n"
|
|
75047
|
+
].join(" ");
|
|
75048
|
+
}
|
|
75049
|
+
|
|
74751
75050
|
// src/rules/search-format.rules.ts
|
|
74752
75051
|
var SNIPPET_CHARACTERS = 160;
|
|
74753
75052
|
var TOKEN = /<@(person|agent):([A-Za-z0-9_-]+)>|<!(channel|here)>|<#([A-Za-z0-9_-]{1,64})>/g;
|
|
@@ -74862,7 +75161,7 @@ function slackHitLines({
|
|
|
74862
75161
|
...link2 ? [` ${link2}`] : []
|
|
74863
75162
|
];
|
|
74864
75163
|
}
|
|
74865
|
-
var
|
|
75164
|
+
var count9 = (n) => `${n} message${n === 1 ? "" : "s"}`;
|
|
74866
75165
|
function slackSectionLines({
|
|
74867
75166
|
slack: slack2,
|
|
74868
75167
|
laze,
|
|
@@ -74875,7 +75174,7 @@ function slackSectionLines({
|
|
|
74875
75174
|
});
|
|
74876
75175
|
if (slack2.teams.some((team) => team.state === "searched")) {
|
|
74877
75176
|
const found = slack2.hits.length;
|
|
74878
|
-
lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${
|
|
75177
|
+
lines2.push(found === 0 ? "From Slack: nothing more." : `From Slack: ${count9(found)}`);
|
|
74879
75178
|
}
|
|
74880
75179
|
for (const hit of slack2.hits) lines2.push(...slackHitLines({ hit, laze, url: url2, workspaceId }), "");
|
|
74881
75180
|
return lines2;
|
|
@@ -74886,7 +75185,7 @@ function formatSearch({
|
|
|
74886
75185
|
workspaceId
|
|
74887
75186
|
}) {
|
|
74888
75187
|
const { laze, slack: slack2, query } = output2;
|
|
74889
|
-
const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${
|
|
75188
|
+
const lines2 = laze.hits.length === 0 ? [`No Laze messages match "${query}".`] : [`Laze: ${count9(laze.hits.length)} for "${query}"`];
|
|
74890
75189
|
for (const hit of laze.hits) {
|
|
74891
75190
|
lines2.push(...lazeHitLines({ hit, laze, url: url2, workspaceId }), "");
|
|
74892
75191
|
}
|
|
@@ -75301,8 +75600,8 @@ async function takeOverHere({
|
|
|
75301
75600
|
if (!session || !meta3.session || meta3.host !== session.host) return false;
|
|
75302
75601
|
const sessions = (await context.store.read()).sessions ?? {};
|
|
75303
75602
|
const theirs = sessions[meta3.session];
|
|
75304
|
-
const
|
|
75305
|
-
const stale =
|
|
75603
|
+
const mine5 = sessions[sessionKeyOf({ session })] === profile;
|
|
75604
|
+
const stale = mine5 && theirs !== void 0 && theirs !== profile;
|
|
75306
75605
|
const claudePid = (await nearestHarnessOf({ context }))?.pid;
|
|
75307
75606
|
if (!stale && await liveElsewhere({ context, key: meta3.session, claudePid })) return false;
|
|
75308
75607
|
await forSession({ client, session }).post("/api/agents/me/bind", {});
|
|
@@ -75767,13 +76066,13 @@ function formatScheduled({ list: list13 }) {
|
|
|
75767
76066
|
// src/services/scheduled-commands.service.ts
|
|
75768
76067
|
function scheduleAtOf({
|
|
75769
76068
|
args,
|
|
75770
|
-
usage
|
|
76069
|
+
usage: usage2
|
|
75771
76070
|
}) {
|
|
75772
76071
|
if (args.flags.at === void 0 && args.flags.tz === void 0) return null;
|
|
75773
76072
|
const at8 = flagText({ args, name: "at" });
|
|
75774
76073
|
const timeZone = flagText({ args, name: "tz" }) || currentTimeZone();
|
|
75775
76074
|
const sendAt = at8 ? sendAtOf({ at: at8, timeZone }) : null;
|
|
75776
|
-
if (!sendAt) throw new CliUsageError(`${
|
|
76075
|
+
if (!sendAt) throw new CliUsageError(`${usage2}
|
|
75777
76076
|
${AT_USAGE}`);
|
|
75778
76077
|
return { sendAt, timeZone };
|
|
75779
76078
|
}
|
|
@@ -76086,6 +76385,7 @@ async function post({
|
|
|
76086
76385
|
context.out(linkLineOf({ url: posted.url, base: client.baseUrl }));
|
|
76087
76386
|
context.out(notInChannelLineOf({ posted, channel }));
|
|
76088
76387
|
context.out(waitsForLinesOf({ posted }));
|
|
76388
|
+
context.out(promiseReminderOf({ text: body }));
|
|
76089
76389
|
return void 0;
|
|
76090
76390
|
}
|
|
76091
76391
|
async function reply({
|
|
@@ -76128,6 +76428,7 @@ async function reply({
|
|
|
76128
76428
|
context.out(linkLineOf({ url: posted.url, base: client.baseUrl }));
|
|
76129
76429
|
context.out(notInChannelLineOf({ posted, channel: channel ?? "the channel" }));
|
|
76130
76430
|
context.out(waitsForLinesOf({ posted }));
|
|
76431
|
+
context.out(promiseReminderOf({ text: body }));
|
|
76131
76432
|
return void 0;
|
|
76132
76433
|
}
|
|
76133
76434
|
async function receiveMessages({
|
|
@@ -77566,8 +77867,8 @@ async function waiterOf({
|
|
|
77566
77867
|
}) {
|
|
77567
77868
|
const lock = statePathOf({ context, kind: "waiters", profile });
|
|
77568
77869
|
const waiter = await jsonOf(lock);
|
|
77569
|
-
const
|
|
77570
|
-
return waiter &&
|
|
77870
|
+
const mine5 = waiter?.sessionId === key.slice(key.indexOf(":") + 1);
|
|
77871
|
+
return waiter && mine5 && context.processes.alive(waiter.pid) ? waiter.pid : void 0;
|
|
77571
77872
|
}
|
|
77572
77873
|
async function rearmRushGuards({ context }) {
|
|
77573
77874
|
let started = 0;
|
|
@@ -78286,8 +78587,8 @@ async function takeLock({
|
|
|
78286
78587
|
const self2 = context.processes.pid;
|
|
78287
78588
|
if (holder && holder.pid !== self2 && context.processes.alive(holder.pid)) {
|
|
78288
78589
|
const served = await holderClaudeOf({ context, holder });
|
|
78289
|
-
const
|
|
78290
|
-
if (served && context.processes.alive(served) && !
|
|
78590
|
+
const mine5 = preempt && served === claudePid && !holder.monitor;
|
|
78591
|
+
if (served && context.processes.alive(served) && !mine5) return false;
|
|
78291
78592
|
context.processes.stop(holder.pid);
|
|
78292
78593
|
}
|
|
78293
78594
|
const value = {
|
|
@@ -78575,10 +78876,10 @@ function absorbTurnEvent({ result: result2, message: message2 }) {
|
|
|
78575
78876
|
return;
|
|
78576
78877
|
}
|
|
78577
78878
|
if (message2.method !== "thread/tokenUsage/updated") return;
|
|
78578
|
-
const
|
|
78579
|
-
const total = record3(
|
|
78879
|
+
const usage2 = record3(params.tokenUsage);
|
|
78880
|
+
const total = record3(usage2.last).totalTokens;
|
|
78580
78881
|
if (typeof total === "number") result2.contextTokens = total;
|
|
78581
|
-
const window2 =
|
|
78882
|
+
const window2 = usage2.modelContextWindow;
|
|
78582
78883
|
if (typeof window2 === "number" && window2 > 0) result2.contextWindow = window2;
|
|
78583
78884
|
}
|
|
78584
78885
|
var TURN_HEARTBEAT_MS = 1e4;
|
|
@@ -79666,9 +79967,9 @@ function lineOf(agent3) {
|
|
|
79666
79967
|
}
|
|
79667
79968
|
async function listAgents({ context, args }) {
|
|
79668
79969
|
const { client } = await signedIn({ context, args });
|
|
79669
|
-
const
|
|
79970
|
+
const agents2 = await client.get("/api/agents");
|
|
79670
79971
|
const wanted = args.words[2];
|
|
79671
|
-
const shown2 = wanted ?
|
|
79972
|
+
const shown2 = wanted ? agents2.filter((agent3) => agent3.id === wanted || agent3.name === wanted) : agents2;
|
|
79672
79973
|
if (wanted && shown2.length === 0) throw new CliUsageError(`No agent named ${wanted}.`);
|
|
79673
79974
|
if (args.flags.json) return context.out(`${JSON.stringify(shown2, null, 2)}
|
|
79674
79975
|
`);
|
|
@@ -79696,8 +79997,8 @@ async function showAgent({ context, args }) {
|
|
|
79696
79997
|
const wanted = args.words[2];
|
|
79697
79998
|
if (!wanted) throw new CliUsageError("Usage: laze agents show <agent> [--json]");
|
|
79698
79999
|
const { client, profile } = await signedIn({ context, args });
|
|
79699
|
-
const
|
|
79700
|
-
const agent3 =
|
|
80000
|
+
const agents2 = await client.get("/api/agents");
|
|
80001
|
+
const agent3 = agents2.find((one) => one.id === wanted || one.name === wanted);
|
|
79701
80002
|
if (!agent3) throw new CliUsageError(`No agent named ${wanted}.`);
|
|
79702
80003
|
const members3 = await client.get("/api/workspaces/current/members");
|
|
79703
80004
|
const nameOf2 = (userId) => members3.find((member) => member.userId === userId)?.name ?? "";
|
|
@@ -80113,8 +80414,8 @@ function formatLogins({ list: list13, nowMs: nowMs2 }) {
|
|
|
80113
80414
|
}
|
|
80114
80415
|
const lines2 = list13.logins.map((login2) => {
|
|
80115
80416
|
const state = login2.agentsOnIt > 0 ? `in use by ${login2.agentsOnIt} ${login2.agentsOnIt === 1 ? "agent" : "agents"}` : "ready";
|
|
80116
|
-
const
|
|
80117
|
-
let shown2 =
|
|
80417
|
+
const usage2 = usageOf2({ ...login2, nowMs: nowMs2 });
|
|
80418
|
+
let shown2 = usage2.startsWith("out of usage") ? usage2 : `${state}, ${usage2}`;
|
|
80118
80419
|
if (login2.state === "invalid") shown2 = INVALID2;
|
|
80119
80420
|
const line = `${HARNESS_NAMES2[login2.harness]} ${login2.name} (${shown2}) ${login2.id}`;
|
|
80120
80421
|
return login2.expiresSoon ? `${line}
|
|
@@ -80129,9 +80430,9 @@ function formatPool({ pool, nowMs: nowMs2 }) {
|
|
|
80129
80430
|
lines2.push(
|
|
80130
80431
|
pool.logins.length === 0 ? " Logins: none yet" : " Logins:",
|
|
80131
80432
|
...pool.logins.map((login2) => {
|
|
80132
|
-
const
|
|
80433
|
+
const usage2 = login2.invalid ? INVALID2 : usageOf2({ ...login2, nowMs: nowMs2 });
|
|
80133
80434
|
const use = login2.inUse && !login2.invalid ? "in use, " : "";
|
|
80134
|
-
const line = ` ${HARNESS_NAMES2[login2.harness]} ${login2.name} added by ${login2.contributedByName} (${use}${
|
|
80435
|
+
const line = ` ${HARNESS_NAMES2[login2.harness]} ${login2.name} added by ${login2.contributedByName} (${use}${usage2})`;
|
|
80135
80436
|
return login2.expiresSoon ? `${line}
|
|
80136
80437
|
${EXPIRES_SOON}` : line;
|
|
80137
80438
|
})
|
|
@@ -80205,12 +80506,12 @@ async function avatarOf({
|
|
|
80205
80506
|
context,
|
|
80206
80507
|
args,
|
|
80207
80508
|
client,
|
|
80208
|
-
usage
|
|
80509
|
+
usage: usage2
|
|
80209
80510
|
}) {
|
|
80210
80511
|
const path = flagText({ args, name: "avatar" });
|
|
80211
80512
|
if (args.flags["avatar-emoji"] !== void 0) {
|
|
80212
80513
|
const emoji4 = emojiAvatar(flagText({ args, name: "avatar-emoji" }).trim());
|
|
80213
|
-
if (path || !isEmojiAvatar(emoji4)) throw new CliUsageError(
|
|
80514
|
+
if (path || !isEmojiAvatar(emoji4)) throw new CliUsageError(usage2);
|
|
80214
80515
|
return emoji4;
|
|
80215
80516
|
}
|
|
80216
80517
|
if (!path) return void 0;
|
|
@@ -80562,7 +80863,7 @@ async function secretOnStdin({ context }) {
|
|
|
80562
80863
|
async function loginValueOf({
|
|
80563
80864
|
context,
|
|
80564
80865
|
args,
|
|
80565
|
-
usage
|
|
80866
|
+
usage: usage2
|
|
80566
80867
|
}) {
|
|
80567
80868
|
if (SECRET_FLAGS.some((flag2) => args.flags[flag2] !== void 0)) {
|
|
80568
80869
|
throw new CliUsageError(
|
|
@@ -80572,7 +80873,7 @@ async function loginValueOf({
|
|
|
80572
80873
|
const harness = flagText({ args, name: "harness" });
|
|
80573
80874
|
const name3 = flagText({ args, name: "name" }).trim();
|
|
80574
80875
|
const vaulted = args.flags["from-vault"];
|
|
80575
|
-
if (!LOGIN_HARNESSES.has(harness) || !name3 || vaulted === true) throw new CliUsageError(
|
|
80876
|
+
if (!LOGIN_HARNESSES.has(harness) || !name3 || vaulted === true) throw new CliUsageError(usage2);
|
|
80576
80877
|
const base = { harness, name: name3 };
|
|
80577
80878
|
if (typeof vaulted === "string" && vaulted.trim()) {
|
|
80578
80879
|
return { ...base, fromConnection: vaulted.trim() };
|
|
@@ -80911,9 +81212,9 @@ async function setAgentRunsOn({
|
|
|
80911
81212
|
}
|
|
80912
81213
|
const { client } = await signedIn({ context, args });
|
|
80913
81214
|
return refusing(context, async () => {
|
|
80914
|
-
const
|
|
81215
|
+
const agents2 = await client.get("/api/agents");
|
|
80915
81216
|
const wanted = agent3.toLowerCase();
|
|
80916
|
-
const before =
|
|
81217
|
+
const before = agents2.find((one) => one.id === agent3 || one.name.toLowerCase() === wanted);
|
|
80917
81218
|
const updated = await client.post(PATHS.setRunsOn, {
|
|
80918
81219
|
agentId: agent3,
|
|
80919
81220
|
harness,
|
|
@@ -81063,9 +81364,9 @@ function targetOf(migration) {
|
|
|
81063
81364
|
function modeLine(migration) {
|
|
81064
81365
|
return migration.mode === "resume" ? "Laze resumes that same session" : "Laze starts a fresh session from a summary of it";
|
|
81065
81366
|
}
|
|
81066
|
-
function agentOf({ args, usage }) {
|
|
81367
|
+
function agentOf({ args, usage: usage2 }) {
|
|
81067
81368
|
const agent3 = args.words[3] ?? "";
|
|
81068
|
-
if (!agent3) throw new CliUsageError(
|
|
81369
|
+
if (!agent3) throw new CliUsageError(usage2);
|
|
81069
81370
|
return agent3;
|
|
81070
81371
|
}
|
|
81071
81372
|
async function migrate({ context, args }) {
|
|
@@ -81370,10 +81671,10 @@ function askingAgentOf({
|
|
|
81370
81671
|
asked,
|
|
81371
81672
|
bound
|
|
81372
81673
|
}) {
|
|
81373
|
-
const
|
|
81674
|
+
const agents2 = Object.entries(config2.profiles).filter(([, one]) => one.kind === "agent");
|
|
81374
81675
|
const wanted = asked ?? bound;
|
|
81375
|
-
const named =
|
|
81376
|
-
return named.length > 0 || asked ? named :
|
|
81676
|
+
const named = agents2.filter(([name3]) => name3 === wanted);
|
|
81677
|
+
return named.length > 0 || asked ? named : agents2;
|
|
81377
81678
|
}
|
|
81378
81679
|
async function requestProfileOf({
|
|
81379
81680
|
context,
|
|
@@ -81386,19 +81687,19 @@ async function requestProfileOf({
|
|
|
81386
81687
|
const wanted = asked ? requestProfileNameOf({ profile: asked }) : bound && requestProfileNameOf({ profile: bound });
|
|
81387
81688
|
const found = requests2.find(([name3]) => name3 === wanted || name3 === asked) ?? (requests2.length === 1 && !asked ? requests2[0] : void 0);
|
|
81388
81689
|
if (found) return { name: found[0], profile: found[1] };
|
|
81389
|
-
const
|
|
81390
|
-
const [only, other] =
|
|
81690
|
+
const agents2 = askingAgentOf({ config: config2, asked, bound });
|
|
81691
|
+
const [only, other] = agents2;
|
|
81391
81692
|
if (only && !other) {
|
|
81392
81693
|
const profile = await mintedRequestProfile({ context, name: only[0], agent: only[1] });
|
|
81393
81694
|
return { name: requestProfileNameOf({ profile: only[0] }), profile };
|
|
81394
81695
|
}
|
|
81395
|
-
if (
|
|
81696
|
+
if (agents2.length === 0) {
|
|
81396
81697
|
throw new CliUsageError(
|
|
81397
81698
|
"No agent on this machine to ask with: run `laze agent link` from a session first."
|
|
81398
81699
|
);
|
|
81399
81700
|
}
|
|
81400
81701
|
throw new CliUsageError(
|
|
81401
|
-
`Several agents are linked here; pass --from <profile>: ${
|
|
81702
|
+
`Several agents are linked here; pass --from <profile>: ${agents2.map(([name3]) => name3).join(", ")}`
|
|
81402
81703
|
);
|
|
81403
81704
|
}
|
|
81404
81705
|
async function renewedRequestProfile({
|
|
@@ -82764,9 +83065,9 @@ function formatAppMoney({
|
|
|
82764
83065
|
maximumFractionDigits: tiny ? 4 : 2
|
|
82765
83066
|
}).format(amount);
|
|
82766
83067
|
}
|
|
82767
|
-
var
|
|
83068
|
+
var count10 = new Intl.NumberFormat("en-US");
|
|
82768
83069
|
function plural2({ value, one, many }) {
|
|
82769
|
-
return `${
|
|
83070
|
+
return `${count10.format(value)} ${value === 1 ? one : many}`;
|
|
82770
83071
|
}
|
|
82771
83072
|
function appCostQuantityText(line) {
|
|
82772
83073
|
const { quantity } = line;
|
|
@@ -84262,11 +84563,11 @@ ${asset.path}
|
|
|
84262
84563
|
async function list({ context, args, open: openApp }) {
|
|
84263
84564
|
const { client, appId, name: name3 } = await openApp();
|
|
84264
84565
|
const answer6 = await client.post("/api/apps/assets/list", { appId });
|
|
84265
|
-
const { usage } = answer6;
|
|
84566
|
+
const { usage: usage2 } = answer6;
|
|
84266
84567
|
const lines2 = answer6.assets.map(
|
|
84267
84568
|
(asset) => ` ${asset.path} ${sizeText(asset.sizeBytes)} ${asset.status}${asset.unreferencedSince ? ", no version uses it" : ""} ${asset.fileName}`
|
|
84268
84569
|
);
|
|
84269
|
-
const head = `${name3}: ${sizeText(
|
|
84570
|
+
const head = `${name3}: ${sizeText(usage2.appBytes)} of ${sizeText(usage2.appMaxBytes)} asset storage (workspace ${sizeText(usage2.workspaceBytes)} of ${sizeText(usage2.workspaceMaxBytes)})`;
|
|
84270
84571
|
const text3 = lines2.length === 0 ? `${head}
|
|
84271
84572
|
No assets yet: laze app asset add <file>
|
|
84272
84573
|
` : `${head}
|
|
@@ -85164,10 +85465,10 @@ function print2({
|
|
|
85164
85465
|
context.out(args.flags.json ? `${JSON.stringify(value, null, 2)}
|
|
85165
85466
|
` : text3);
|
|
85166
85467
|
}
|
|
85167
|
-
function appAndWord({ args, usage }) {
|
|
85468
|
+
function appAndWord({ args, usage: usage2 }) {
|
|
85168
85469
|
const words = args.words.slice(2);
|
|
85169
85470
|
const [app2, word3] = words.length >= 2 ? words : [void 0, ...words];
|
|
85170
|
-
if (!word3) throw new CliUsageError(
|
|
85471
|
+
if (!word3) throw new CliUsageError(usage2);
|
|
85171
85472
|
return { app: app2, word: word3 };
|
|
85172
85473
|
}
|
|
85173
85474
|
var rename2 = async ({ context, args, open: open7 }) => {
|
|
@@ -86109,7 +86410,7 @@ var appWrite = async ({ context, args }) => {
|
|
|
86109
86410
|
});
|
|
86110
86411
|
};
|
|
86111
86412
|
function seedLine(seeded) {
|
|
86112
|
-
const created = Object.entries(seeded.created).map(([name3,
|
|
86413
|
+
const created = Object.entries(seeded.created).map(([name3, count13]) => `${count13} in ${name3}`);
|
|
86113
86414
|
const parts = [
|
|
86114
86415
|
created.length ? `Loaded starter records: ${created.join(", ")}.` : "",
|
|
86115
86416
|
seeded.skipped.length ? `Left ${seeded.skipped.join(", ")} as it was: it already holds records.` : ""
|
|
@@ -86434,8 +86735,8 @@ function cardLine({ choice }) {
|
|
|
86434
86735
|
var appCard = async ({ context, args }) => {
|
|
86435
86736
|
const client = await appClient({ context, args });
|
|
86436
86737
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
|
|
86437
|
-
const
|
|
86438
|
-
if (!Number.isInteger(
|
|
86738
|
+
const count13 = Number(flagText({ args, name: "rows", fallback: "5" }));
|
|
86739
|
+
if (!Number.isInteger(count13) || count13 < 1 || count13 > 10) {
|
|
86439
86740
|
throw new CliUsageError("--rows is a whole number from 1 to 10");
|
|
86440
86741
|
}
|
|
86441
86742
|
const text3 = (name3) => flagText({ args, name: name3 }) || null;
|
|
@@ -86448,7 +86749,7 @@ var appCard = async ({ context, args }) => {
|
|
|
86448
86749
|
collection: text3("collection"),
|
|
86449
86750
|
filter: flagText({ args, name: "where" }) || flagText({ args, name: "filter" }),
|
|
86450
86751
|
sort: flagText({ args, name: "sort" }),
|
|
86451
|
-
rows:
|
|
86752
|
+
rows: count13,
|
|
86452
86753
|
caption: text3("caption")
|
|
86453
86754
|
}
|
|
86454
86755
|
});
|
|
@@ -87211,6 +87512,7 @@ async function changes({ context, args }) {
|
|
|
87211
87512
|
var BILLING_USAGE = `Usage:
|
|
87212
87513
|
laze billing [account] the plan, people, credits, auto-recharge and referral
|
|
87213
87514
|
laze billing invoices the workspace's invoices
|
|
87515
|
+
laze billing usage [--period 7d|30d|period] credits used per agent, highest first (default: this billing period)
|
|
87214
87516
|
laze billing checkout [--currency usd|eur] a Stripe Checkout link that starts Team (admins)
|
|
87215
87517
|
laze billing portal a Stripe link to manage cards and invoices (admins)
|
|
87216
87518
|
laze billing currency usd|eur bill in USD or EUR, until the first payment (admins)
|
|
@@ -87311,6 +87613,42 @@ async function invoices({ context, args }) {
|
|
|
87311
87613
|
);
|
|
87312
87614
|
}
|
|
87313
87615
|
}
|
|
87616
|
+
var USAGE_PERIODS = {
|
|
87617
|
+
"7d": "last_7_days",
|
|
87618
|
+
"30d": "last_30_days",
|
|
87619
|
+
period: "billing_period"
|
|
87620
|
+
};
|
|
87621
|
+
var USAGE_PERIOD_NAMES = {
|
|
87622
|
+
last_7_days: "the last 7 days",
|
|
87623
|
+
last_30_days: "the last 30 days",
|
|
87624
|
+
billing_period: "this billing period"
|
|
87625
|
+
};
|
|
87626
|
+
async function usage({ context, args }) {
|
|
87627
|
+
const { client } = await signedIn({ context, args });
|
|
87628
|
+
const asked = flagText({ args, name: "period", fallback: "period" });
|
|
87629
|
+
const period = USAGE_PERIODS[asked];
|
|
87630
|
+
if (!period) throw new CliUsageError(`--period takes 7d, 30d or period.
|
|
87631
|
+
${BILLING_USAGE}`);
|
|
87632
|
+
const [report3, agents2] = await Promise.all([
|
|
87633
|
+
client.get(`/api/billing-account/usage?period=${period}`),
|
|
87634
|
+
client.get("/api/agents").catch(() => [])
|
|
87635
|
+
]);
|
|
87636
|
+
if (args.flags.json) return printJson(context, report3);
|
|
87637
|
+
const of = (amount) => money(amount, report3.currency);
|
|
87638
|
+
const names = new Map(agents2.map((agent3) => [agent3.id, agent3.name]));
|
|
87639
|
+
const days = `${report3.from.slice(0, 10)} to ${report3.to.slice(0, 10)}`;
|
|
87640
|
+
context.out(
|
|
87641
|
+
`Used in ${USAGE_PERIOD_NAMES[report3.period] ?? report3.period} (${days}): ${of(report3.total)}
|
|
87642
|
+
`
|
|
87643
|
+
);
|
|
87644
|
+
if (report3.byAgent.length === 0) return context.out("No agent used credits in this period.\n");
|
|
87645
|
+
report3.byAgent.forEach((line, index) => {
|
|
87646
|
+
const share3 = report3.total > 0 ? Math.round(line.amount / report3.total * 100) : 0;
|
|
87647
|
+
const name3 = names.get(line.id) ?? "Deleted agent";
|
|
87648
|
+
context.out(`${index + 1}. ${name3} (${line.id}) ${of(line.amount)} ${share3}%
|
|
87649
|
+
`);
|
|
87650
|
+
});
|
|
87651
|
+
}
|
|
87314
87652
|
async function checkout({ context, args }) {
|
|
87315
87653
|
const { client } = await signedIn({ context, args });
|
|
87316
87654
|
const currency2 = flagText({ args, name: "currency" });
|
|
@@ -87439,6 +87777,7 @@ async function keep({ context, args }) {
|
|
|
87439
87777
|
var BILLING_COMMANDS = {
|
|
87440
87778
|
account: show,
|
|
87441
87779
|
invoices,
|
|
87780
|
+
usage,
|
|
87442
87781
|
checkout,
|
|
87443
87782
|
portal,
|
|
87444
87783
|
currency,
|
|
@@ -88104,9 +88443,9 @@ function presenceColumns(member) {
|
|
|
88104
88443
|
return [member.presence, `${status11.emoji} ${status11.text}`.trim() + until, ...dndColumn(member)];
|
|
88105
88444
|
}
|
|
88106
88445
|
function formatMembers({ detail }) {
|
|
88107
|
-
const
|
|
88446
|
+
const count13 = `${detail.members.length} ${detail.members.length === 1 ? "member" : "members"}`;
|
|
88108
88447
|
const ends = detail.endsAt ? `, ends ${utcTimeOf(detail.endsAt)}` : "";
|
|
88109
|
-
const head = `${channelLabelOf(detail)} (${detail.id}), ${
|
|
88448
|
+
const head = `${channelLabelOf(detail)} (${detail.id}), ${count13}${ends}`;
|
|
88110
88449
|
const rows = detail.members.map(
|
|
88111
88450
|
(member) => [ROLE[member.role], member.name, member.kind, member.id, ...presenceColumns(member)].join(" ")
|
|
88112
88451
|
);
|
|
@@ -88146,13 +88485,13 @@ function formatBrowsable({
|
|
|
88146
88485
|
}) {
|
|
88147
88486
|
if (channels3.length === 0) return "No channels to browse.\n";
|
|
88148
88487
|
const rows = channels3.map((channel) => {
|
|
88149
|
-
const
|
|
88488
|
+
const count13 = `${channel.memberCount} ${channel.memberCount === 1 ? "member" : "members"}`;
|
|
88150
88489
|
const marks = [
|
|
88151
88490
|
channel.joined ? "joined" : "not joined",
|
|
88152
88491
|
...channel.private ? ["private"] : [],
|
|
88153
88492
|
...channel.archived ? ["archived"] : []
|
|
88154
88493
|
].join(", ");
|
|
88155
|
-
const text3 = `#${channel.name} ${channel.id} ${
|
|
88494
|
+
const text3 = `#${channel.name} ${channel.id} ${count13} ${marks} ${channel.topic}`;
|
|
88156
88495
|
return withLink({ text: text3, url: channel.url, base });
|
|
88157
88496
|
});
|
|
88158
88497
|
return `${rows.join("\n")}
|
|
@@ -88400,9 +88739,9 @@ async function changeChannel({
|
|
|
88400
88739
|
}
|
|
88401
88740
|
});
|
|
88402
88741
|
}
|
|
88403
|
-
function channelOf2({ args, usage }) {
|
|
88742
|
+
function channelOf2({ args, usage: usage2 }) {
|
|
88404
88743
|
const channel = args.words[2];
|
|
88405
|
-
if (!channel) throw new CliUsageError(
|
|
88744
|
+
if (!channel) throw new CliUsageError(usage2);
|
|
88406
88745
|
return channel;
|
|
88407
88746
|
}
|
|
88408
88747
|
async function channelBrowse({ context, args }) {
|
|
@@ -88501,10 +88840,10 @@ async function channelUnarchive({ context, args }) {
|
|
|
88501
88840
|
`
|
|
88502
88841
|
});
|
|
88503
88842
|
}
|
|
88504
|
-
function addMembers(
|
|
88843
|
+
function addMembers(usage2) {
|
|
88505
88844
|
return async ({ context, args }) => {
|
|
88506
88845
|
const [, , channel, ...members3] = args.words;
|
|
88507
|
-
if (!channel || members3.length === 0) throw new CliUsageError(
|
|
88846
|
+
if (!channel || members3.length === 0) throw new CliUsageError(usage2);
|
|
88508
88847
|
return changeChannel({
|
|
88509
88848
|
context,
|
|
88510
88849
|
args,
|
|
@@ -88563,10 +88902,10 @@ var channelRemove = removeMember("Usage: laze channel remove <channel> <member>"
|
|
|
88563
88902
|
var conversationRemove = removeMember(
|
|
88564
88903
|
"Usage: laze conversation remove <conversation> <member>"
|
|
88565
88904
|
);
|
|
88566
|
-
function removeMember(
|
|
88905
|
+
function removeMember(usage2) {
|
|
88567
88906
|
return async ({ context, args }) => {
|
|
88568
88907
|
const [, , channel, member] = args.words;
|
|
88569
|
-
if (!channel || !member) throw new CliUsageError(
|
|
88908
|
+
if (!channel || !member) throw new CliUsageError(usage2);
|
|
88570
88909
|
return changeChannel({
|
|
88571
88910
|
context,
|
|
88572
88911
|
args,
|
|
@@ -89329,8 +89668,8 @@ async function deliverOnce({
|
|
|
89329
89668
|
profile
|
|
89330
89669
|
}) {
|
|
89331
89670
|
const lock = statePathOf({ context, kind: "waiters", profile });
|
|
89332
|
-
const
|
|
89333
|
-
if (!
|
|
89671
|
+
const mine5 = (await holderOf({ path: lock }))?.pid === context.processes.pid;
|
|
89672
|
+
if (!mine5 && !await takeLock({ context, path: lock, claudePid, preempt: true })) {
|
|
89334
89673
|
return "outranked";
|
|
89335
89674
|
}
|
|
89336
89675
|
const named = { ...args, flags: { ...args.flags, profile } };
|
|
@@ -89972,6 +90311,28 @@ var claimPromotionOutputDefinition = external_exports.object({
|
|
|
89972
90311
|
});
|
|
89973
90312
|
var claimPromotionOutputSchema = claimPromotionOutputDefinition;
|
|
89974
90313
|
|
|
90314
|
+
// ../../modules/billing/contract/src/billing.usage.ts
|
|
90315
|
+
var usagePeriodSchema = external_exports.enum(["last_7_days", "last_30_days", "billing_period"]);
|
|
90316
|
+
var usageInputDefinition = external_exports.object({
|
|
90317
|
+
workspaceId: external_exports.string().min(1),
|
|
90318
|
+
period: usagePeriodSchema.default("billing_period")
|
|
90319
|
+
});
|
|
90320
|
+
var billingUsageInputSchema = usageInputDefinition;
|
|
90321
|
+
var usageQueryDefinition = external_exports.object({ period: usagePeriodSchema.default("billing_period") });
|
|
90322
|
+
var usageLineDefinition = external_exports.object({ id: external_exports.string(), amount: external_exports.number() });
|
|
90323
|
+
var usageReportDefinition = external_exports.object({
|
|
90324
|
+
workspaceId: external_exports.string(),
|
|
90325
|
+
period: usagePeriodSchema,
|
|
90326
|
+
from: external_exports.iso.datetime(),
|
|
90327
|
+
to: external_exports.iso.datetime(),
|
|
90328
|
+
currency: currencySchema,
|
|
90329
|
+
total: external_exports.number(),
|
|
90330
|
+
byAgent: external_exports.array(usageLineDefinition),
|
|
90331
|
+
byChannel: external_exports.array(usageLineDefinition),
|
|
90332
|
+
byApp: external_exports.array(usageLineDefinition)
|
|
90333
|
+
});
|
|
90334
|
+
var billingUsageReportSchema = usageReportDefinition;
|
|
90335
|
+
|
|
89975
90336
|
// ../../modules/billing/contract/src/billing.ts
|
|
89976
90337
|
var workspaceInputDefinition2 = external_exports.object({ workspaceId: external_exports.string().min(1) });
|
|
89977
90338
|
var billingWorkspaceInputSchema = workspaceInputDefinition2;
|
|
@@ -90287,7 +90648,7 @@ var modelChargeBasisDefinition = external_exports.object({
|
|
|
90287
90648
|
rateDay: external_exports.string().nullable()
|
|
90288
90649
|
});
|
|
90289
90650
|
var BillingApi = moduleApi()("billing");
|
|
90290
|
-
var billingTrpc = defineTrpcContract("billing").query("account").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).query("invoices").withInput(billingWorkspaceInputSchema).withOutput(external_exports.array(billingInvoiceSchema)).mutation("startCheckout").withInput(startCheckoutInputSchema).withOutput(billingRedirectSchema).query("inviteQuote").withInput(inviteQuoteInputSchema).withOutput(inviteQuoteSchema).mutation("openPortal").withInput(openPortalInputSchema).withOutput(billingRedirectSchema).mutation("setCurrency").withInput(setCurrencyInputSchema).withOutput(billingAccountViewSchema).mutation("topUp").withInput(topUpInputSchema).withOutput(billingRedirectSchema).mutation("setAutoRecharge").withInput(setAutoRechargeInputSchema).withOutput(billingAccountViewSchema).mutation("applyReferral").withInput(applyReferralInputSchema).withOutput(billingAccountViewSchema).query("referralCard").withInput(billingWorkspaceInputSchema).withOutput(referralCardSchema).mutation("dismissReferralCard").withInput(billingWorkspaceInputSchema).withOutput(referralCardSchema).mutation("claimReferral").withInput(claimReferralInputSchema).withOutput(claimReferralOutputSchema).mutation("applyPromotion").withInput(applyPromotionInputSchema).withOutput(billingAccountViewSchema).mutation("claimPromotion").withInput(claimPromotionInputSchema).withOutput(claimPromotionOutputSchema).query("billingDetails").withInput(billingWorkspaceInputSchema).withOutput(billingDetailsSchema).mutation("setBillingDetails").withInput(setBillingDetailsInputSchema).withOutput(billingDetailsSchema).mutation("cancelPlan").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).mutation("keepPlan").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).build();
|
|
90651
|
+
var billingTrpc = defineTrpcContract("billing").query("account").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).query("invoices").withInput(billingWorkspaceInputSchema).withOutput(external_exports.array(billingInvoiceSchema)).query("usage").withInput(billingUsageInputSchema).withOutput(billingUsageReportSchema).mutation("startCheckout").withInput(startCheckoutInputSchema).withOutput(billingRedirectSchema).query("inviteQuote").withInput(inviteQuoteInputSchema).withOutput(inviteQuoteSchema).mutation("openPortal").withInput(openPortalInputSchema).withOutput(billingRedirectSchema).mutation("setCurrency").withInput(setCurrencyInputSchema).withOutput(billingAccountViewSchema).mutation("topUp").withInput(topUpInputSchema).withOutput(billingRedirectSchema).mutation("setAutoRecharge").withInput(setAutoRechargeInputSchema).withOutput(billingAccountViewSchema).mutation("applyReferral").withInput(applyReferralInputSchema).withOutput(billingAccountViewSchema).query("referralCard").withInput(billingWorkspaceInputSchema).withOutput(referralCardSchema).mutation("dismissReferralCard").withInput(billingWorkspaceInputSchema).withOutput(referralCardSchema).mutation("claimReferral").withInput(claimReferralInputSchema).withOutput(claimReferralOutputSchema).mutation("applyPromotion").withInput(applyPromotionInputSchema).withOutput(billingAccountViewSchema).mutation("claimPromotion").withInput(claimPromotionInputSchema).withOutput(claimPromotionOutputSchema).query("billingDetails").withInput(billingWorkspaceInputSchema).withOutput(billingDetailsSchema).mutation("setBillingDetails").withInput(setBillingDetailsInputSchema).withOutput(billingDetailsSchema).mutation("cancelPlan").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).mutation("keepPlan").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).build();
|
|
90291
90652
|
var stripeWebhookHeadersDefinition = external_exports.object({
|
|
90292
90653
|
"stripe-signature": external_exports.string().max(1e3).default("")
|
|
90293
90654
|
});
|
|
@@ -92051,7 +92412,7 @@ var sendWakeIntentDefinition = external_exports.object({
|
|
|
92051
92412
|
});
|
|
92052
92413
|
|
|
92053
92414
|
// ../../modules/compute/contract/src/whatsapp-ops.ts
|
|
92054
|
-
var
|
|
92415
|
+
var count11 = external_exports.number().int().nonnegative();
|
|
92055
92416
|
var at4 = external_exports.iso.datetime();
|
|
92056
92417
|
var whatsappMirrorHealthDefinition = external_exports.object({
|
|
92057
92418
|
mirrors: external_exports.array(
|
|
@@ -92069,18 +92430,18 @@ var whatsappMirrorHealthDefinition = external_exports.object({
|
|
|
92069
92430
|
nextVisitAt: at4.nullable(),
|
|
92070
92431
|
touchedAt: at4.nullable(),
|
|
92071
92432
|
createdAt: at4,
|
|
92072
|
-
skipped: external_exports.object({ count:
|
|
92433
|
+
skipped: external_exports.object({ count: count11, from: external_exports.number().int().nullable(), at: at4.nullable() }),
|
|
92073
92434
|
/** The last pull that met files; null when none did. */
|
|
92074
92435
|
files: external_exports.object({
|
|
92075
92436
|
at: at4,
|
|
92076
|
-
attached:
|
|
92077
|
-
unavailable:
|
|
92078
|
-
retrying:
|
|
92079
|
-
dropped:
|
|
92437
|
+
attached: count11,
|
|
92438
|
+
unavailable: count11,
|
|
92439
|
+
retrying: count11,
|
|
92440
|
+
dropped: count11,
|
|
92080
92441
|
failureCode: external_exports.string().nullable()
|
|
92081
92442
|
}).nullable(),
|
|
92082
92443
|
/** Intake holds (ADR-216 §11) by kind and code, with when the oldest was made. */
|
|
92083
|
-
holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count:
|
|
92444
|
+
holds: external_exports.array(external_exports.object({ kind: external_exports.string(), code: external_exports.string(), count: count11, oldestAt: at4 }))
|
|
92084
92445
|
})
|
|
92085
92446
|
)
|
|
92086
92447
|
});
|
|
@@ -92109,7 +92470,7 @@ var whatsappSendsDefinition = external_exports.object({
|
|
|
92109
92470
|
quoted: external_exports.boolean(),
|
|
92110
92471
|
/** Sends to the same chat share a number, counted from 1 in this answer; never the chat. */
|
|
92111
92472
|
chatIndex: external_exports.number().int().min(1),
|
|
92112
|
-
files:
|
|
92473
|
+
files: count11,
|
|
92113
92474
|
/**
|
|
92114
92475
|
* Why a failed send did not go: its stored code, or for older sends the code its outcome
|
|
92115
92476
|
* line reads as; "other" when none fits, null for a send that did not fail.
|
|
@@ -92137,7 +92498,7 @@ var whatsappSendStreamsDefinition = external_exports.object({
|
|
|
92137
92498
|
failureCode: external_exports.string().nullable(),
|
|
92138
92499
|
createdAt: at4,
|
|
92139
92500
|
/** The stream's events, its last event's kind and time; zero and null for none. */
|
|
92140
|
-
events:
|
|
92501
|
+
events: count11,
|
|
92141
92502
|
lastEvent: external_exports.enum(["requested", "taken", "evidenced", "refused", "unresolved", "recheck_requested"]).nullable(),
|
|
92142
92503
|
lastEventAt: at4.nullable(),
|
|
92143
92504
|
/** The process's step and deadline; null when no process holds the send. */
|
|
@@ -92148,9 +92509,9 @@ var whatsappSendStreamsDefinition = external_exports.object({
|
|
|
92148
92509
|
})
|
|
92149
92510
|
),
|
|
92150
92511
|
/** Counts over the answered sends. */
|
|
92151
|
-
total:
|
|
92152
|
-
agree:
|
|
92153
|
-
disagree:
|
|
92512
|
+
total: count11,
|
|
92513
|
+
agree: count11,
|
|
92514
|
+
disagree: count11
|
|
92154
92515
|
});
|
|
92155
92516
|
var whatsappSendStreamsSchema = whatsappSendStreamsDefinition;
|
|
92156
92517
|
var WHATSAPP_WAKE_STEPS = [
|
|
@@ -92190,11 +92551,11 @@ var whatsappWakeTimelineDefinition = external_exports.object({
|
|
|
92190
92551
|
external_exports.object({
|
|
92191
92552
|
step: external_exports.enum(WHATSAPP_WAKE_STEPS),
|
|
92192
92553
|
at: at4,
|
|
92193
|
-
sincePreviousMs:
|
|
92194
|
-
sinceRequestMs:
|
|
92554
|
+
sincePreviousMs: count11,
|
|
92555
|
+
sinceRequestMs: count11
|
|
92195
92556
|
})
|
|
92196
92557
|
),
|
|
92197
|
-
totalMs:
|
|
92558
|
+
totalMs: count11.nullable()
|
|
92198
92559
|
})
|
|
92199
92560
|
)
|
|
92200
92561
|
})
|
|
@@ -92379,8 +92740,8 @@ function creatorsOf(args) {
|
|
|
92379
92740
|
}
|
|
92380
92741
|
function lineOf3(computer2) {
|
|
92381
92742
|
const money4 = `${computer2.monthlyCharge} ${computer2.currency.toUpperCase()} a month`;
|
|
92382
|
-
const
|
|
92383
|
-
return ` ${computer2.computerId} ${computer2.name} ${computer2.kind} ${computer2.size} ${money4} ${
|
|
92743
|
+
const agents2 = `${computer2.agents.length} agent(s)`;
|
|
92744
|
+
return ` ${computer2.computerId} ${computer2.name} ${computer2.kind} ${computer2.size} ${money4} ${agents2} ${computer2.state}`;
|
|
92384
92745
|
}
|
|
92385
92746
|
async function mine({ context, args }) {
|
|
92386
92747
|
const client = await computeClient({ context, args });
|
|
@@ -95630,8 +95991,8 @@ async function clientOf2({ context, args }) {
|
|
|
95630
95991
|
const session = await signedIn({ context, args });
|
|
95631
95992
|
const wanted = flagText({ args, name: "workspace" })?.trim();
|
|
95632
95993
|
if (!wanted) return { client: session.client };
|
|
95633
|
-
const
|
|
95634
|
-
const target =
|
|
95994
|
+
const mine5 = await session.client.post("/api/agents/me/workspace/mine", {});
|
|
95995
|
+
const target = mine5.find((each) => each.id === wanted) ?? mine5.find((each) => each.name.toLowerCase() === wanted.toLowerCase());
|
|
95635
95996
|
if (!target) {
|
|
95636
95997
|
throw new CliUsageError(`You are in no workspace named "${wanted}": laze workspace list.`);
|
|
95637
95998
|
}
|
|
@@ -96876,8 +97237,8 @@ function draftFilesMissingText(names) {
|
|
|
96876
97237
|
}
|
|
96877
97238
|
|
|
96878
97239
|
// ../../modules/feed/contract/src/feed.decisions.ts
|
|
96879
|
-
function decisionsLineOf(
|
|
96880
|
-
return `${
|
|
97240
|
+
function decisionsLineOf(count13) {
|
|
97241
|
+
return `${count13} ${count13 === 1 ? "decision" : "decisions"} waiting on you`;
|
|
96881
97242
|
}
|
|
96882
97243
|
|
|
96883
97244
|
// src/rules/feed-input.rules.ts
|
|
@@ -97415,8 +97776,8 @@ function optionalWords(words) {
|
|
|
97415
97776
|
}
|
|
97416
97777
|
function shareLinesOf({ move: move3, answer: answer6 }) {
|
|
97417
97778
|
const names = answer6.people.map((person) => person.name).join(", ") || "no one new";
|
|
97418
|
-
const
|
|
97419
|
-
const items = `${
|
|
97779
|
+
const count13 = answer6.itemIds.length;
|
|
97780
|
+
const items = `${count13} item${count13 === 1 ? "" : "s"}`;
|
|
97420
97781
|
const head = move3 === "share" ? `Shared ${items} with ${names}` : `Took ${names} off ${items}`;
|
|
97421
97782
|
return [head, ...answer6.itemIds].map((line) => `${line}
|
|
97422
97783
|
`).join("");
|
|
@@ -98054,13 +98415,13 @@ function formatHistory(output2) {
|
|
|
98054
98415
|
const lines2 = linesOf3(output2);
|
|
98055
98416
|
if (lines2.length === 0) return `${where}${from}: no messages.
|
|
98056
98417
|
`;
|
|
98057
|
-
const
|
|
98418
|
+
const count13 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
|
|
98058
98419
|
const blocks = lines2.map(blockOf2).join("\n\n");
|
|
98059
98420
|
const cursor = olderCursorOf(output2);
|
|
98060
98421
|
const older = cursor ? `
|
|
98061
98422
|
|
|
98062
98423
|
Older: laze history ${output2.channel} --before ${cursor}` : "";
|
|
98063
|
-
return `${where}${from}: ${
|
|
98424
|
+
return `${where}${from}: ${count13}, oldest first
|
|
98064
98425
|
|
|
98065
98426
|
${blocks}${older}
|
|
98066
98427
|
`;
|
|
@@ -98835,19 +99196,31 @@ async function keys({ context, args }) {
|
|
|
98835
99196
|
// src/services/langwatch-commands.service.ts
|
|
98836
99197
|
var LANGWATCH_USAGE = `Usage:
|
|
98837
99198
|
laze langwatch status on or off, content level, endpoint, last test and delivery
|
|
98838
|
-
laze langwatch connect [--endpoint <url>]
|
|
99199
|
+
laze langwatch connect [--endpoint <url>] connect a LangWatch project: approve the link it prints (admins)
|
|
98839
99200
|
laze langwatch set-key [--endpoint <url>] save the LangWatch project API key piped on stdin (admins)
|
|
98840
99201
|
laze langwatch on [--content full|metadata] send hosted agents' traces to LangWatch (admins)
|
|
98841
99202
|
laze langwatch off stop sending traces (admins)
|
|
98842
|
-
laze langwatch level
|
|
99203
|
+
laze langwatch level [full|metadata] [--personal metadata|off] the defaults: team agents, personal agents (admins)
|
|
98843
99204
|
laze langwatch test send one test trace with the saved key (admins)
|
|
98844
99205
|
laze langwatch remove turn it off and delete the key from the vault (admins)
|
|
98845
|
-
laze langwatch
|
|
99206
|
+
laze langwatch agents every agent LangWatch can trace, its level, what you may pick
|
|
99207
|
+
laze langwatch agent <agent> [--level full|metadata|off|follow] one agent's traces
|
|
99208
|
+
laze langwatch mine --on|--off send your personal agents' messages too, or stop`;
|
|
98846
99209
|
var LANGWATCH_AGENT_PATH = "/api/agents/langwatch";
|
|
99210
|
+
var LANGWATCH_AGENTS_PATH = "/api/agents/langwatch/agents";
|
|
99211
|
+
var AGENT_LEVEL_WORDS = {
|
|
99212
|
+
full: "full",
|
|
99213
|
+
metadata: "metadata only",
|
|
99214
|
+
off: "off"
|
|
99215
|
+
};
|
|
98847
99216
|
var LEVEL_WORDS = {
|
|
98848
99217
|
full: "full",
|
|
98849
99218
|
metadata: "metadata only"
|
|
98850
99219
|
};
|
|
99220
|
+
var PERSONAL_WORDS = {
|
|
99221
|
+
metadata: "metadata only",
|
|
99222
|
+
off: "nothing"
|
|
99223
|
+
};
|
|
98851
99224
|
var printJson9 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
|
|
98852
99225
|
`);
|
|
98853
99226
|
function contentOf({ value, flag: flag2 }) {
|
|
@@ -98863,10 +99236,15 @@ function statusLines2(integration) {
|
|
|
98863
99236
|
}
|
|
98864
99237
|
const test2 = integration.lastTest;
|
|
98865
99238
|
const delivery = integration.lastDelivery;
|
|
99239
|
+
const { project } = integration;
|
|
98866
99240
|
return [
|
|
98867
99241
|
`LangWatch is ${integration.enabled ? "on" : "off"}, content ${LEVEL_WORDS[integration.level]}`,
|
|
99242
|
+
...project ? [` project: ${project.name} (${project.organizationName}) ${project.url}`] : [],
|
|
98868
99243
|
` endpoint: ${integration.endpoint}`,
|
|
98869
99244
|
` key ending in ${integration.keyEnding ?? "?"}`,
|
|
99245
|
+
integration.lastTraceAt ? ` last trace: ${utcTimeOf(integration.lastTraceAt)}` : " last trace: none yet",
|
|
99246
|
+
` team agents: content ${LEVEL_WORDS[integration.level]} unless set per agent`,
|
|
99247
|
+
` personal agents: ${PERSONAL_WORDS[integration.personalLevel]} unless their owner sends their messages too`,
|
|
98870
99248
|
test2 ? ` last test: ${test2.ok ? "accepted" : `failed, ${test2.message}`} at ${utcTimeOf(test2.at)}` : " last test: never",
|
|
98871
99249
|
...delivery ? [
|
|
98872
99250
|
` last delivery: ${delivery.ok ? "ok" : `failed, ${delivery.message}`} at ${utcTimeOf(delivery.at)}`
|
|
@@ -98898,10 +99276,11 @@ ${LANGWATCH_USAGE}`);
|
|
|
98898
99276
|
});
|
|
98899
99277
|
if (args.flags.json) return printJson9(context, integration);
|
|
98900
99278
|
context.out(
|
|
98901
|
-
`Saved the LangWatch key ending in ${integration.keyEnding ?? "?"} for ${integration.endpoint}.
|
|
99279
|
+
`Saved the LangWatch key ending in ${integration.keyEnding ?? "?"} for ${integration.endpoint}. LangWatch is ${integration.enabled ? "on" : "off"}.
|
|
98902
99280
|
`
|
|
98903
99281
|
);
|
|
98904
99282
|
}
|
|
99283
|
+
var CONNECT_POLL_MS = 3e3;
|
|
98905
99284
|
async function connect3({ context, args }) {
|
|
98906
99285
|
const endpoint = flagText({ args, name: "endpoint" }).trim();
|
|
98907
99286
|
const { client } = await signedIn({ context, args });
|
|
@@ -98909,11 +99288,57 @@ async function connect3({ context, args }) {
|
|
|
98909
99288
|
LANGWATCH_REST_PATHS.connect,
|
|
98910
99289
|
endpoint ? { endpoint } : {}
|
|
98911
99290
|
);
|
|
98912
|
-
if (args.flags.json)
|
|
98913
|
-
|
|
98914
|
-
|
|
98915
|
-
${started.
|
|
99291
|
+
if (!args.flags.json) {
|
|
99292
|
+
context.out(
|
|
99293
|
+
`Open this link, check LangWatch shows the code ${started.userCode} and pick the project:
|
|
99294
|
+
${started.verificationUrl}
|
|
99295
|
+
Waiting for you to approve (10 minutes at most)...
|
|
98916
99296
|
`
|
|
99297
|
+
);
|
|
99298
|
+
}
|
|
99299
|
+
const attempt = { attemptId: started.attemptId };
|
|
99300
|
+
for (; ; ) {
|
|
99301
|
+
await context.sleep(CONNECT_POLL_MS);
|
|
99302
|
+
const status11 = await pollOrCancel({ client, attempt });
|
|
99303
|
+
if (status11.state === "waiting") continue;
|
|
99304
|
+
if (args.flags.json) {
|
|
99305
|
+
printJson9(context, status11);
|
|
99306
|
+
return status11.state === "connected" ? 0 : 1;
|
|
99307
|
+
}
|
|
99308
|
+
if (status11.state === "failed") {
|
|
99309
|
+
context.err(`LangWatch was not connected (${status11.error}).
|
|
99310
|
+
`);
|
|
99311
|
+
return 1;
|
|
99312
|
+
}
|
|
99313
|
+
const { project } = status11.integration;
|
|
99314
|
+
context.out(
|
|
99315
|
+
project ? `Connected. Traces go to ${project.name} (${project.organizationName}): ${project.url}
|
|
99316
|
+
` : "Connected to LangWatch.\n"
|
|
99317
|
+
);
|
|
99318
|
+
return 0;
|
|
99319
|
+
}
|
|
99320
|
+
}
|
|
99321
|
+
async function pollOrCancel({
|
|
99322
|
+
client,
|
|
99323
|
+
attempt
|
|
99324
|
+
}) {
|
|
99325
|
+
try {
|
|
99326
|
+
return await client.post(LANGWATCH_REST_PATHS.connectPoll, attempt);
|
|
99327
|
+
} catch (error63) {
|
|
99328
|
+
await client.post(LANGWATCH_REST_PATHS.connectCancel, attempt).catch(() => void 0);
|
|
99329
|
+
throw error63;
|
|
99330
|
+
}
|
|
99331
|
+
}
|
|
99332
|
+
async function mine4({ context, args }) {
|
|
99333
|
+
const on = args.flags.on !== void 0;
|
|
99334
|
+
const off = args.flags.off !== void 0;
|
|
99335
|
+
if (on === off) throw new CliUsageError(`Pick --on or --off.
|
|
99336
|
+
${LANGWATCH_USAGE}`);
|
|
99337
|
+
const { client } = await signedIn({ context, args });
|
|
99338
|
+
const integration = await client.post(LANGWATCH_REST_PATHS.mine, { on });
|
|
99339
|
+
if (args.flags.json) return printJson9(context, integration);
|
|
99340
|
+
context.out(
|
|
99341
|
+
integration.mine ? "Your personal agents send their messages to LangWatch too, unless one is set otherwise.\n" : "Your personal agents follow the workspace default, unless one is set otherwise.\n"
|
|
98917
99342
|
);
|
|
98918
99343
|
}
|
|
98919
99344
|
async function turnOn2({ context, args }) {
|
|
@@ -98934,15 +99359,26 @@ async function turnOff2({ context, args }) {
|
|
|
98934
99359
|
if (args.flags.json) return printJson9(context, integration);
|
|
98935
99360
|
context.out("LangWatch is off. No traces are sent.\n");
|
|
98936
99361
|
}
|
|
99362
|
+
function personalOf({ args }) {
|
|
99363
|
+
if (args.flags.personal === void 0) return void 0;
|
|
99364
|
+
const value = flagText({ args, name: "personal" });
|
|
99365
|
+
if (value === "metadata" || value === "off") return value;
|
|
99366
|
+
throw new CliUsageError(`--personal takes metadata or off.
|
|
99367
|
+
${LANGWATCH_USAGE}`);
|
|
99368
|
+
}
|
|
98937
99369
|
async function level({ context, args }) {
|
|
98938
|
-
const
|
|
99370
|
+
const personalLevel = personalOf({ args });
|
|
99371
|
+
const team = args.words[2] === void 0 && personalLevel !== void 0 ? void 0 : contentOf({ value: args.words[2], flag: "level" });
|
|
98939
99372
|
const { client } = await signedIn({ context, args });
|
|
98940
99373
|
const integration = await client.post(LANGWATCH_REST_PATHS.level, {
|
|
98941
|
-
level:
|
|
99374
|
+
...team ? { level: team } : {},
|
|
99375
|
+
...personalLevel ? { personalLevel } : {}
|
|
98942
99376
|
});
|
|
98943
99377
|
if (args.flags.json) return printJson9(context, integration);
|
|
98944
|
-
context.out(
|
|
98945
|
-
`
|
|
99378
|
+
context.out(
|
|
99379
|
+
`Team agents send ${LEVEL_WORDS[integration.level]}; personal agents send ${PERSONAL_WORDS[integration.personalLevel]}.
|
|
99380
|
+
`
|
|
99381
|
+
);
|
|
98946
99382
|
}
|
|
98947
99383
|
async function test({ context, args }) {
|
|
98948
99384
|
const { client } = await signedIn({ context, args });
|
|
@@ -98979,16 +99415,14 @@ ${LANGWATCH_USAGE}`);
|
|
|
98979
99415
|
const off = args.flags.off !== void 0;
|
|
98980
99416
|
if (on && off) throw new CliUsageError(`Pick --on or --off.
|
|
98981
99417
|
${LANGWATCH_USAGE}`);
|
|
98982
|
-
const
|
|
98983
|
-
if (
|
|
99418
|
+
const given = args.flags.level === void 0 ? void 0 : flagText({ args, name: "level" });
|
|
99419
|
+
if (given !== void 0 && !["full", "metadata", "off", "follow"].includes(given)) {
|
|
98984
99420
|
throw new CliUsageError(`--level takes full, metadata, off or follow.
|
|
98985
99421
|
${LANGWATCH_USAGE}`);
|
|
98986
99422
|
}
|
|
99423
|
+
const picked = given ?? switchLevelOf({ on, off });
|
|
98987
99424
|
const { client } = await signedIn({ context, args });
|
|
98988
|
-
const choice = {
|
|
98989
|
-
...on || off ? { optIn: on } : {},
|
|
98990
|
-
...picked !== void 0 ? { level: picked } : {}
|
|
98991
|
-
};
|
|
99425
|
+
const choice = picked !== void 0 ? { level: picked } : {};
|
|
98992
99426
|
const tracing = Object.keys(choice).length === 0 ? await client.get(
|
|
98993
99427
|
`${LANGWATCH_AGENT_PATH}?agent=${encodeURIComponent(name3)}`
|
|
98994
99428
|
) : await client.post(LANGWATCH_AGENT_PATH, { agent: name3, ...choice });
|
|
@@ -98996,6 +99430,19 @@ ${LANGWATCH_USAGE}`);
|
|
|
98996
99430
|
context.out(`${agentLine({ name: name3, tracing })}
|
|
98997
99431
|
`);
|
|
98998
99432
|
}
|
|
99433
|
+
function agentRowLine(row) {
|
|
99434
|
+
const owner = row.ownerName ?? "former member";
|
|
99435
|
+
const may = row.choices.length > 0 ? `you may set ${row.choices.join(", ")}` : "you may not change it";
|
|
99436
|
+
return `${row.name} ${row.kind} ${owner} ${AGENT_LEVEL_WORDS[row.tracing.level]} (${may})`;
|
|
99437
|
+
}
|
|
99438
|
+
async function agents({ context, args }) {
|
|
99439
|
+
const { client } = await signedIn({ context, args });
|
|
99440
|
+
const rows = await client.get(LANGWATCH_AGENTS_PATH);
|
|
99441
|
+
if (args.flags.json) return printJson9(context, rows);
|
|
99442
|
+
if (rows.length === 0) return context.out("No agents LangWatch can trace yet.\n");
|
|
99443
|
+
context.out(`${rows.map(agentRowLine).join("\n")}
|
|
99444
|
+
`);
|
|
99445
|
+
}
|
|
98999
99446
|
var LANGWATCH_COMMANDS = {
|
|
99000
99447
|
status: status7,
|
|
99001
99448
|
"set-key": setKey,
|
|
@@ -99005,7 +99452,9 @@ var LANGWATCH_COMMANDS = {
|
|
|
99005
99452
|
level,
|
|
99006
99453
|
test,
|
|
99007
99454
|
remove: remove7,
|
|
99008
|
-
|
|
99455
|
+
mine: mine4,
|
|
99456
|
+
agent,
|
|
99457
|
+
agents
|
|
99009
99458
|
};
|
|
99010
99459
|
async function langwatch({ context, args }) {
|
|
99011
99460
|
const name3 = args.words[1] ?? "status";
|
|
@@ -99013,6 +99462,11 @@ async function langwatch({ context, args }) {
|
|
|
99013
99462
|
if (!command) throw new CliUsageError(LANGWATCH_USAGE);
|
|
99014
99463
|
return command({ context, args });
|
|
99015
99464
|
}
|
|
99465
|
+
function switchLevelOf({ on, off }) {
|
|
99466
|
+
if (on) return "full";
|
|
99467
|
+
if (off) return "off";
|
|
99468
|
+
return void 0;
|
|
99469
|
+
}
|
|
99016
99470
|
|
|
99017
99471
|
// src/services/machine-access-commands.service.ts
|
|
99018
99472
|
var MACHINE_ACCESS_USAGE = [
|
|
@@ -99302,10 +99756,10 @@ ${USAGE13}`);
|
|
|
99302
99756
|
if ("exitCode" in released) return released;
|
|
99303
99757
|
Object.assign(env, released.env);
|
|
99304
99758
|
}
|
|
99305
|
-
const
|
|
99306
|
-
if (
|
|
99759
|
+
const count13 = Object.keys(env).length;
|
|
99760
|
+
if (count13 > EXEC_ENV_MAX) {
|
|
99307
99761
|
context.err(
|
|
99308
|
-
`laze: these connections hold ${
|
|
99762
|
+
`laze: these connections hold ${count13} variables; at most ${EXEC_ENV_MAX} go with a command. Send fewer connections, or run the command with \`laze vault run\` where you run.
|
|
99309
99763
|
`
|
|
99310
99764
|
);
|
|
99311
99765
|
return { exitCode: 1 };
|
|
@@ -99460,7 +99914,7 @@ function secretRefusal({
|
|
|
99460
99914
|
rules = MCP_SECRET_COMMANDS
|
|
99461
99915
|
}) {
|
|
99462
99916
|
const { words, flags: flags2 } = parseArgs({ argv });
|
|
99463
|
-
const command = [3, 2, 1].map((
|
|
99917
|
+
const command = [3, 2, 1].map((count13) => words.slice(0, count13).join(" ")).find((name3) => Object.hasOwn(rules, name3));
|
|
99464
99918
|
const rule = command === void 0 ? void 0 : rules[command];
|
|
99465
99919
|
if (!command || !rule) return void 0;
|
|
99466
99920
|
const vaultFlag = rule.vaultFlag ?? "from-vault";
|
|
@@ -100211,11 +100665,11 @@ async function monitorAdd({ context, args }) {
|
|
|
100211
100665
|
});
|
|
100212
100666
|
if (args.flags.json) return context.out(`${JSON.stringify(added, null, 2)}
|
|
100213
100667
|
`);
|
|
100214
|
-
const
|
|
100668
|
+
const count13 = added.watching.length;
|
|
100215
100669
|
context.out(
|
|
100216
100670
|
`${added.monitor.id} ${added.monitor.name}
|
|
100217
100671
|
${added.watching.join(" ")}
|
|
100218
|
-
Watching ${
|
|
100672
|
+
Watching ${count13} ${count13 === 1 ? "channel" : "channels"}
|
|
100219
100673
|
`
|
|
100220
100674
|
);
|
|
100221
100675
|
}
|
|
@@ -101592,12 +102046,12 @@ var funnelInputDefinition = external_exports.object({
|
|
|
101592
102046
|
to: external_exports.iso.datetime(),
|
|
101593
102047
|
bucketMinutes: external_exports.union([external_exports.literal(10), external_exports.literal(60), external_exports.literal(1440)]).default(60)
|
|
101594
102048
|
}).strict();
|
|
101595
|
-
var
|
|
102049
|
+
var count12 = external_exports.number().int().nonnegative();
|
|
101596
102050
|
var funnelCountsDefinition = external_exports.object({
|
|
101597
|
-
signUps:
|
|
101598
|
-
workspaces:
|
|
101599
|
-
activatedTeams:
|
|
101600
|
-
payingTeams:
|
|
102051
|
+
signUps: count12,
|
|
102052
|
+
workspaces: count12,
|
|
102053
|
+
activatedTeams: count12,
|
|
102054
|
+
payingTeams: count12
|
|
101601
102055
|
});
|
|
101602
102056
|
var funnelOutputDefinition = external_exports.object({
|
|
101603
102057
|
bucketMinutes: external_exports.number().int(),
|
|
@@ -101620,33 +102074,40 @@ var cohortOutputDefinition = external_exports.object({
|
|
|
101620
102074
|
/** The creator's first page and campaign tag, as their sign-up kept them. */
|
|
101621
102075
|
landingPath: external_exports.string().nullable(),
|
|
101622
102076
|
campaign: external_exports.string().nullable(),
|
|
102077
|
+
/** The utm_source tag and the ad network a click id named, never the click id itself. */
|
|
102078
|
+
utmSource: external_exports.string().nullable(),
|
|
102079
|
+
adNetwork: external_exports.string().nullable(),
|
|
101623
102080
|
promotionId: external_exports.string().nullable(),
|
|
101624
102081
|
plan: external_exports.string(),
|
|
101625
102082
|
paying: external_exports.boolean(),
|
|
101626
|
-
members:
|
|
102083
|
+
members: count12,
|
|
101627
102084
|
agents: external_exports.object({
|
|
101628
|
-
laze:
|
|
101629
|
-
connected:
|
|
102085
|
+
laze: count12,
|
|
102086
|
+
connected: count12,
|
|
101630
102087
|
firstLazeAgentAt: external_exports.iso.datetime().nullable()
|
|
101631
102088
|
}),
|
|
101632
|
-
turns:
|
|
101633
|
-
appsCreated:
|
|
101634
|
-
connectionsLinked:
|
|
102089
|
+
turns: count12,
|
|
102090
|
+
appsCreated: count12,
|
|
102091
|
+
connectionsLinked: count12,
|
|
101635
102092
|
/** Slack channels mirrored, Slack and Discord link and intake events, WhatsApp mirrors on. */
|
|
101636
102093
|
messaging: external_exports.object({
|
|
101637
|
-
slackChannels:
|
|
101638
|
-
slackEvents:
|
|
101639
|
-
discordEvents:
|
|
101640
|
-
whatsappMirrors:
|
|
102094
|
+
slackChannels: count12,
|
|
102095
|
+
slackEvents: count12,
|
|
102096
|
+
discordEvents: count12,
|
|
102097
|
+
whatsappMirrors: count12
|
|
101641
102098
|
}),
|
|
101642
102099
|
creatorLastMessageAt: external_exports.iso.datetime().nullable(),
|
|
102100
|
+
/** The creator's last heartbeat from a Laze web or desktop window here; null when never. */
|
|
102101
|
+
creatorLastSeenAt: external_exports.iso.datetime().nullable(),
|
|
102102
|
+
/** Members whose last heartbeat here falls in the 7 days before `until`. */
|
|
102103
|
+
peopleSeenLast7Days: count12,
|
|
101643
102104
|
/** Live messages per UTC day; days with none are left out. */
|
|
101644
102105
|
days: external_exports.array(
|
|
101645
102106
|
external_exports.object({
|
|
101646
102107
|
day: external_exports.string(),
|
|
101647
|
-
byPeople:
|
|
101648
|
-
byAgents:
|
|
101649
|
-
people:
|
|
102108
|
+
byPeople: count12,
|
|
102109
|
+
byAgents: count12,
|
|
102110
|
+
people: count12
|
|
101650
102111
|
})
|
|
101651
102112
|
),
|
|
101652
102113
|
/** The once-only sends nurturing kept (first_agent_made, first_agent_nudge, ...). */
|
|
@@ -101670,25 +102131,25 @@ var capacityOutputDefinition = external_exports.object({
|
|
|
101670
102131
|
/** The last day of host load, oldest first. */
|
|
101671
102132
|
history: external_exports.array(hostLoadPointSchema)
|
|
101672
102133
|
});
|
|
101673
|
-
var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count:
|
|
102134
|
+
var tally = external_exports.array(external_exports.object({ key: external_exports.string(), count: count12 }));
|
|
101674
102135
|
var snapshotOutputDefinition = external_exports.object({
|
|
101675
102136
|
workspaceId: external_exports.string(),
|
|
101676
102137
|
createdAt: external_exports.iso.datetime(),
|
|
101677
102138
|
plan: external_exports.string(),
|
|
101678
102139
|
status: external_exports.string(),
|
|
101679
|
-
seats: external_exports.object({ people:
|
|
102140
|
+
seats: external_exports.object({ people: count12, limit: external_exports.number().int().nullable() }),
|
|
101680
102141
|
membersByRole: tally,
|
|
101681
102142
|
invitesByStatus: tally,
|
|
101682
102143
|
agentsByKind: tally,
|
|
101683
102144
|
agentsByHosting: tally,
|
|
101684
|
-
agentsConnected:
|
|
102145
|
+
agentsConnected: count12,
|
|
101685
102146
|
flagsOn: external_exports.array(external_exports.string()),
|
|
101686
|
-
complimentaryComputers:
|
|
102147
|
+
complimentaryComputers: count12
|
|
101687
102148
|
});
|
|
101688
102149
|
var eventsInputDefinition = external_exports.object({ from: external_exports.iso.datetime(), to: external_exports.iso.datetime() }).strict();
|
|
101689
102150
|
var eventCountsDefinition = external_exports.object({
|
|
101690
|
-
total:
|
|
101691
|
-
byType: external_exports.array(external_exports.object({ eventType: external_exports.string(), count:
|
|
102151
|
+
total: count12,
|
|
102152
|
+
byType: external_exports.array(external_exports.object({ eventType: external_exports.string(), count: count12 }))
|
|
101692
102153
|
});
|
|
101693
102154
|
var tenantEventsInputDefinition = external_exports.object({
|
|
101694
102155
|
from: external_exports.iso.datetime(),
|
|
@@ -101738,9 +102199,9 @@ var databaseHealthDefinition = external_exports.object({
|
|
|
101738
102199
|
deadlocks: external_exports.number().nonnegative(),
|
|
101739
102200
|
tempBytes: external_exports.number().nonnegative(),
|
|
101740
102201
|
connections: external_exports.object({
|
|
101741
|
-
total:
|
|
101742
|
-
byState: external_exports.array(external_exports.object({ state: external_exports.string(), count:
|
|
101743
|
-
waitingOnLocks:
|
|
102202
|
+
total: count12,
|
|
102203
|
+
byState: external_exports.array(external_exports.object({ state: external_exports.string(), count: count12 })),
|
|
102204
|
+
waitingOnLocks: count12,
|
|
101744
102205
|
longestActiveSeconds: external_exports.number().nonnegative(),
|
|
101745
102206
|
longestIdleInTransactionSeconds: external_exports.number().nonnegative()
|
|
101746
102207
|
}),
|
|
@@ -101771,7 +102232,7 @@ var tenantAgentsDefinition = external_exports.object({
|
|
|
101771
102232
|
createdAt: external_exports.iso.datetime(),
|
|
101772
102233
|
modelLevel: external_exports.string().nullable(),
|
|
101773
102234
|
model: external_exports.string().nullable(),
|
|
101774
|
-
channels:
|
|
102235
|
+
channels: count12,
|
|
101775
102236
|
limitedUntil: external_exports.iso.datetime().nullable(),
|
|
101776
102237
|
limitedBy: external_exports.string().nullable(),
|
|
101777
102238
|
pausedAt: external_exports.iso.datetime().nullable(),
|
|
@@ -101793,7 +102254,9 @@ var tenantPeopleDefinition = external_exports.object({
|
|
|
101793
102254
|
name: external_exports.string(),
|
|
101794
102255
|
email: external_exports.string(),
|
|
101795
102256
|
role: external_exports.string(),
|
|
101796
|
-
joinedAt: external_exports.iso.datetime()
|
|
102257
|
+
joinedAt: external_exports.iso.datetime(),
|
|
102258
|
+
/** The member's last heartbeat from a Laze web or desktop window here; null when never. */
|
|
102259
|
+
lastSeenAt: external_exports.iso.datetime().nullable()
|
|
101797
102260
|
})
|
|
101798
102261
|
),
|
|
101799
102262
|
/** Invitations not accepted yet, and who sent each. */
|
|
@@ -101823,8 +102286,8 @@ var tenantBillingDefinition = external_exports.object({
|
|
|
101823
102286
|
currencyChosen: external_exports.boolean(),
|
|
101824
102287
|
cancelAtPeriodEnd: external_exports.boolean(),
|
|
101825
102288
|
period: external_exports.object({ start: external_exports.iso.datetime(), end: external_exports.iso.datetime() }).nullable(),
|
|
101826
|
-
seats: external_exports.object({ people:
|
|
101827
|
-
complimentarySeats:
|
|
102289
|
+
seats: external_exports.object({ people: count12, limit: count12.nullable(), monthlyPrice: external_exports.number() }),
|
|
102290
|
+
complimentarySeats: count12.nullable(),
|
|
101828
102291
|
credits: external_exports.object({
|
|
101829
102292
|
included: external_exports.number(),
|
|
101830
102293
|
includedLeft: external_exports.number(),
|
|
@@ -101863,14 +102326,14 @@ var tenantVaultDefinition = external_exports.object({
|
|
|
101863
102326
|
external_exports.object({
|
|
101864
102327
|
subject: external_exports.string(),
|
|
101865
102328
|
most: external_exports.string(),
|
|
101866
|
-
maxLeaseSeconds:
|
|
102329
|
+
maxLeaseSeconds: count12.nullable(),
|
|
101867
102330
|
blocked: external_exports.boolean(),
|
|
101868
102331
|
approveNew: external_exports.boolean(),
|
|
101869
102332
|
updatedAt: external_exports.iso.datetime()
|
|
101870
102333
|
})
|
|
101871
102334
|
),
|
|
101872
102335
|
/** Connections waiting for an admin, counted by kind; never a name, label or field. */
|
|
101873
|
-
waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count:
|
|
102336
|
+
waitingByKind: external_exports.array(external_exports.object({ key: external_exports.string(), count: count12 }))
|
|
101874
102337
|
});
|
|
101875
102338
|
var WHATSAPP_INTAKE_KEY_KINDS = ["msg", "edit", "del", "react", "read"];
|
|
101876
102339
|
var tenantWhatsappInputDefinition = external_exports.object({
|
|
@@ -101883,17 +102346,17 @@ var tenantWhatsappOutputDefinition = external_exports.object({
|
|
|
101883
102346
|
intake: external_exports.object({
|
|
101884
102347
|
since: external_exports.iso.datetime(),
|
|
101885
102348
|
until: external_exports.iso.datetime(),
|
|
101886
|
-
total:
|
|
102349
|
+
total: count12,
|
|
101887
102350
|
byKind: external_exports.array(
|
|
101888
102351
|
external_exports.object({
|
|
101889
102352
|
kind: external_exports.enum([...WHATSAPP_INTAKE_KEY_KINDS, "other"]),
|
|
101890
|
-
count:
|
|
102353
|
+
count: count12,
|
|
101891
102354
|
/** Events dated over a second after Laze got them, and the most ahead: a fast clock. */
|
|
101892
|
-
aheadOfLaze: external_exports.object({ count:
|
|
102355
|
+
aheadOfLaze: external_exports.object({ count: count12, maxAheadMs: external_exports.number().int() }).optional()
|
|
101893
102356
|
})
|
|
101894
102357
|
),
|
|
101895
102358
|
/** The workspace's chat messages and changes dated over a second after Laze stored them. */
|
|
101896
|
-
chatAheadOfLaze: external_exports.object({ count:
|
|
102359
|
+
chatAheadOfLaze: external_exports.object({ count: count12, maxAheadMs: external_exports.number().int() }).optional()
|
|
101897
102360
|
})
|
|
101898
102361
|
});
|
|
101899
102362
|
var computerBrowserInputDefinition = external_exports.object({
|
|
@@ -101987,6 +102450,17 @@ var vaultAsksInputDefinition = external_exports.object({
|
|
|
101987
102450
|
cursor: cursorDefinition.optional()
|
|
101988
102451
|
}).strict();
|
|
101989
102452
|
var vaultAsksOutputDefinition = external_exports.object({ asks: pageOf(vaultOpsAskSchema) });
|
|
102453
|
+
var vaultConnectionsInputDefinition = external_exports.object({
|
|
102454
|
+
from: external_exports.iso.datetime(),
|
|
102455
|
+
to: external_exports.iso.datetime(),
|
|
102456
|
+
connectionId: external_exports.string().trim().min(1).max(128).optional(),
|
|
102457
|
+
limit: external_exports.number().int().min(1).max(500).default(100),
|
|
102458
|
+
cursor: cursorDefinition.optional()
|
|
102459
|
+
}).strict();
|
|
102460
|
+
var vaultConnectionsOutputDefinition = external_exports.object({
|
|
102461
|
+
connections: external_exports.array(vaultOpsConnectionSchema),
|
|
102462
|
+
events: pageOf(vaultOpsConnectionEventSchema)
|
|
102463
|
+
});
|
|
101990
102464
|
var browserErrorsInputDefinition = external_exports.object({
|
|
101991
102465
|
from: external_exports.iso.datetime(),
|
|
101992
102466
|
to: external_exports.iso.datetime(),
|
|
@@ -102092,7 +102566,7 @@ var OPS_FUNCTIONS = {
|
|
|
102092
102566
|
output: loginStatesSchema
|
|
102093
102567
|
}),
|
|
102094
102568
|
"tenant.people": entry({
|
|
102095
|
-
title: "One workspace's people: members' names, emails and
|
|
102569
|
+
title: "One workspace's people: members' names, emails, join and last seen times, and pending invites",
|
|
102096
102570
|
scope: "tenant",
|
|
102097
102571
|
view: "table",
|
|
102098
102572
|
input: noInputDefinition,
|
|
@@ -102141,6 +102615,13 @@ var OPS_FUNCTIONS = {
|
|
|
102141
102615
|
input: vaultAsksInputDefinition,
|
|
102142
102616
|
output: vaultAsksOutputDefinition
|
|
102143
102617
|
}),
|
|
102618
|
+
"tenant.vault_connections": entry({
|
|
102619
|
+
title: "One workspace's vault connections: status, sealing, provider and their audit codes",
|
|
102620
|
+
scope: "tenant",
|
|
102621
|
+
view: "table",
|
|
102622
|
+
input: vaultConnectionsInputDefinition,
|
|
102623
|
+
output: vaultConnectionsOutputDefinition
|
|
102624
|
+
}),
|
|
102144
102625
|
"tenant.whatsapp_sends": entry({
|
|
102145
102626
|
title: "One workspace's last WhatsApp sends: state, failure code and times, no content",
|
|
102146
102627
|
scope: "tenant",
|
|
@@ -102545,21 +103026,21 @@ async function startedUpdate({
|
|
|
102545
103026
|
}
|
|
102546
103027
|
async function noteRelease({
|
|
102547
103028
|
context,
|
|
102548
|
-
mine:
|
|
103029
|
+
mine: mine5,
|
|
102549
103030
|
server,
|
|
102550
103031
|
sandbox,
|
|
102551
103032
|
quiet
|
|
102552
103033
|
}) {
|
|
102553
|
-
const warning = releaseWarningOf({ mine:
|
|
103034
|
+
const warning = releaseWarningOf({ mine: mine5, server, sandbox });
|
|
102554
103035
|
if (!warning) return false;
|
|
102555
|
-
const older = !sandbox && releaseSkewOf({ mine:
|
|
103036
|
+
const older = !sandbox && releaseSkewOf({ mine: mine5, server }) === "older";
|
|
102556
103037
|
const started = older ? await startedUpdate({ context, server }) : null;
|
|
102557
|
-
if (!quiet) context.err(started ? selfUpdateLineOf({ mine:
|
|
103038
|
+
if (!quiet) context.err(started ? selfUpdateLineOf({ mine: mine5, server, ...started }) : warning);
|
|
102558
103039
|
return true;
|
|
102559
103040
|
}
|
|
102560
103041
|
function watchingRelease({
|
|
102561
103042
|
context,
|
|
102562
|
-
mine:
|
|
103043
|
+
mine: mine5 = cliVersionOf(),
|
|
102563
103044
|
quiet = false
|
|
102564
103045
|
}) {
|
|
102565
103046
|
const sandbox = context.program.at(-1) === SANDBOX_CLI_PATH;
|
|
@@ -102569,7 +103050,7 @@ function watchingRelease({
|
|
|
102569
103050
|
fetcher: async (input2, init) => {
|
|
102570
103051
|
const response = await context.fetcher(input2, init);
|
|
102571
103052
|
const server = response.headers.get(CLI_RELEASE_HEADER);
|
|
102572
|
-
if (!warned && server) warned = await noteRelease({ context, mine:
|
|
103053
|
+
if (!warned && server) warned = await noteRelease({ context, mine: mine5, server, sandbox, quiet });
|
|
102573
103054
|
return response;
|
|
102574
103055
|
}
|
|
102575
103056
|
};
|
|
@@ -103408,9 +103889,9 @@ function printClaim(context, claim3) {
|
|
|
103408
103889
|
`);
|
|
103409
103890
|
}
|
|
103410
103891
|
}
|
|
103411
|
-
function domainOf({ args, usage }) {
|
|
103892
|
+
function domainOf({ args, usage: usage2 }) {
|
|
103412
103893
|
const domain2 = args.words[2];
|
|
103413
|
-
if (!domain2) throw new CliUsageError(
|
|
103894
|
+
if (!domain2) throw new CliUsageError(usage2);
|
|
103414
103895
|
return domain2;
|
|
103415
103896
|
}
|
|
103416
103897
|
async function claimCall({
|
|
@@ -103726,7 +104207,7 @@ async function releaseAgeSettingsOf({
|
|
|
103726
104207
|
async function update2({
|
|
103727
104208
|
context,
|
|
103728
104209
|
args,
|
|
103729
|
-
mine:
|
|
104210
|
+
mine: mine5 = cliVersionOf()
|
|
103730
104211
|
}) {
|
|
103731
104212
|
const plan2 = updatePlanOf({ script: await realScriptOf({ program: context.program }) });
|
|
103732
104213
|
if (plan2.kind === "sandbox") {
|
|
@@ -103742,17 +104223,17 @@ async function update2({
|
|
|
103742
104223
|
}
|
|
103743
104224
|
const line = plan2.command.join(" ");
|
|
103744
104225
|
if (args.flags["dry-run"]) {
|
|
103745
|
-
context.out(`laze ${
|
|
104226
|
+
context.out(`laze ${mine5}, installed with ${plan2.manager}. Would run: ${line}
|
|
103746
104227
|
`);
|
|
103747
104228
|
return 0;
|
|
103748
104229
|
}
|
|
103749
104230
|
const latest = await latestReleaseOf({ context });
|
|
103750
|
-
if (latest && latest ===
|
|
103751
|
-
context.out(`laze ${
|
|
104231
|
+
if (latest && latest === mine5) {
|
|
104232
|
+
context.out(`laze ${mine5} is the latest release.
|
|
103752
104233
|
`);
|
|
103753
104234
|
return 0;
|
|
103754
104235
|
}
|
|
103755
|
-
context.out(`Updating laze ${
|
|
104236
|
+
context.out(`Updating laze ${mine5} with ${plan2.manager}: ${line}
|
|
103756
104237
|
`);
|
|
103757
104238
|
const code4 = await context.runCommand({ command: plan2.command, env: {} });
|
|
103758
104239
|
if (code4 !== 0) {
|
|
@@ -103760,12 +104241,12 @@ async function update2({
|
|
|
103760
104241
|
`);
|
|
103761
104242
|
return code4;
|
|
103762
104243
|
}
|
|
103763
|
-
return checkInstalled({ context, plan: plan2, mine:
|
|
104244
|
+
return checkInstalled({ context, plan: plan2, mine: mine5, latest });
|
|
103764
104245
|
}
|
|
103765
104246
|
async function checkInstalled({
|
|
103766
104247
|
context,
|
|
103767
104248
|
plan: plan2,
|
|
103768
|
-
mine:
|
|
104249
|
+
mine: mine5,
|
|
103769
104250
|
latest
|
|
103770
104251
|
}) {
|
|
103771
104252
|
const printed2 = await printedBy({ context, command: [...context.program, "--version"] });
|
|
@@ -103774,13 +104255,13 @@ async function checkInstalled({
|
|
|
103774
104255
|
context.out("Installed. `laze --version` names the new version.\n");
|
|
103775
104256
|
return 0;
|
|
103776
104257
|
}
|
|
103777
|
-
const held = latest ? releaseSkewOf({ mine: installed, server: latest }) === "older" : installed ===
|
|
104258
|
+
const held = latest ? releaseSkewOf({ mine: installed, server: latest }) === "older" : installed === mine5;
|
|
103778
104259
|
const { script, onPath } = await otherInstallsOf({ context });
|
|
103779
104260
|
const shadowed = shadowedLineOf({ updated: installed, script, onPath });
|
|
103780
104261
|
if (!held) {
|
|
103781
104262
|
context.out(
|
|
103782
|
-
installed ===
|
|
103783
|
-
` : `Updated laze ${
|
|
104263
|
+
installed === mine5 ? `laze ${mine5} is the latest release.
|
|
104264
|
+
` : `Updated laze ${mine5} to ${installed}.
|
|
103784
104265
|
`
|
|
103785
104266
|
);
|
|
103786
104267
|
if (shadowed) context.err(shadowed);
|
|
@@ -104454,7 +104935,7 @@ async function vaultSave({ context, args }) {
|
|
|
104454
104935
|
// src/services/vault-scrub-commands.service.ts
|
|
104455
104936
|
function lineOf6(channel) {
|
|
104456
104937
|
const where = channel.name ? `#${channel.name}` : channel.channelId;
|
|
104457
|
-
const found = Object.entries(channel.found).map(([vendor,
|
|
104938
|
+
const found = Object.entries(channel.found).map(([vendor, count13]) => `${vendor} ${count13}`).join(", ");
|
|
104458
104939
|
const kinds = [`held ${channel.held}`, ...found ? [`found: ${found}`] : []].join("; ");
|
|
104459
104940
|
return `${where} scanned ${channel.scanned} changed ${channel.messages} ${kinds}
|
|
104460
104941
|
`;
|
|
@@ -105531,8 +106012,8 @@ async function roles({ context, args }) {
|
|
|
105531
106012
|
const catalogue = await client.get("/api/roles");
|
|
105532
106013
|
if (args.flags.json) return printJson11(context, catalogue);
|
|
105533
106014
|
for (const role2 of catalogue) {
|
|
105534
|
-
const
|
|
105535
|
-
context.out(`${role2.label} ${
|
|
106015
|
+
const count13 = `${role2.permissions.length} permissions`;
|
|
106016
|
+
context.out(`${role2.label} ${count13} ${role2.description}
|
|
105536
106017
|
`);
|
|
105537
106018
|
context.out(` ${role2.permissions.join(", ")}
|
|
105538
106019
|
`);
|
|
@@ -105737,6 +106218,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
105737
106218
|
laze app every laze app command, with its flags
|
|
105738
106219
|
laze agents list | laze agents status <name> the workspace's agents and their context
|
|
105739
106220
|
laze agents show <name> [--json] an agent's profile: kind, how it runs, intelligence
|
|
106221
|
+
laze agents activity [--period 7d|30d|period] turns, failures and tokens per agent, most tokens first
|
|
105740
106222
|
laze join [--workspace <name|link>] [--for <email>] [--name <name>] [--project <folder>] ask to join as an agent: a person approves once in their feed
|
|
105741
106223
|
laze agent link --token <token> [--name <name>] [--project <folder>] connect this Claude Code or Codex session
|
|
105742
106224
|
laze agent bind the linked agent listens in this session from now on
|
|
@@ -105865,7 +106347,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
105865
106347
|
laze external share|accept-share|decline-share|unshare ... | dm <person> [<message>] shared channels and DMs
|
|
105866
106348
|
laze langwatch [status] | set-key | on|off | level <full|metadata> | test | remove hosted agents' traces
|
|
105867
106349
|
to a LangWatch project (admins); the key is read from stdin only
|
|
105868
|
-
laze langwatch agent <agent> [--
|
|
106350
|
+
laze langwatch agents | agent <agent> [--level full|metadata|off|follow] each agent's traces
|
|
105869
106351
|
laze sso domains|claim|verify|connect|connect-google|enforce|disconnect|remove single sign-on
|
|
105870
106352
|
(admins); an identity provider's client secret is read from stdin or --from-file only
|
|
105871
106353
|
laze scim tokens|create-token|revoke-token tokens for your identity provider's directory (admins)
|
|
@@ -105953,6 +106435,7 @@ var COMMANDS5 = {
|
|
|
105953
106435
|
history: history2,
|
|
105954
106436
|
"agents list": listAgents,
|
|
105955
106437
|
"agents show": showAgent,
|
|
106438
|
+
"agents activity": agentsActivity,
|
|
105956
106439
|
"agents status": listAgents,
|
|
105957
106440
|
agents: listAgents,
|
|
105958
106441
|
"agent link": linkAgent,
|