@lazehq/cli 0.1.72 → 0.1.74
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 +673 -253
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -36927,7 +36927,7 @@ function flagText({
|
|
|
36927
36927
|
}
|
|
36928
36928
|
|
|
36929
36929
|
// src/rules/cli-version.rules.ts
|
|
36930
|
-
var STAMPED = "0.1.
|
|
36930
|
+
var STAMPED = "0.1.74";
|
|
36931
36931
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
36932
36932
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
36933
36933
|
}
|
|
@@ -59456,10 +59456,27 @@ var plain = external_exports.string().max(LAYOUT_TEXT_MAX);
|
|
|
59456
59456
|
var imageUrl = external_exports.url({ protocol: /^https?$/ }).max(2e3);
|
|
59457
59457
|
var linkUrl = external_exports.string().max(3e3);
|
|
59458
59458
|
var layoutImageSchemaDefinition = external_exports.object({ url: imageUrl, alt: plain });
|
|
59459
|
+
var buttonStyle = external_exports.enum(["default", "primary", "danger"]);
|
|
59460
|
+
var layoutConfirmSchemaDefinition = external_exports.object({
|
|
59461
|
+
title: plain,
|
|
59462
|
+
text: markdown,
|
|
59463
|
+
confirm: plain,
|
|
59464
|
+
deny: plain,
|
|
59465
|
+
style: buttonStyle
|
|
59466
|
+
});
|
|
59467
|
+
var layoutOptionSchemaDefinition = external_exports.object({
|
|
59468
|
+
text: plain,
|
|
59469
|
+
url: linkUrl.nullable(),
|
|
59470
|
+
selected: external_exports.boolean().optional()
|
|
59471
|
+
});
|
|
59459
59472
|
var layoutButtonSchemaDefinition = external_exports.object({
|
|
59460
59473
|
text: plain,
|
|
59461
59474
|
url: linkUrl.nullable(),
|
|
59462
|
-
style:
|
|
59475
|
+
style: buttonStyle,
|
|
59476
|
+
opens: external_exports.enum(["link", "source"]).optional(),
|
|
59477
|
+
control: external_exports.enum(["button", "overflow", "select", "date", "time", "datetime", "checkboxes", "radio"]).optional(),
|
|
59478
|
+
options: external_exports.array(layoutOptionSchemaDefinition).max(LAYOUT_ITEMS_MAX).optional(),
|
|
59479
|
+
confirm: layoutConfirmSchemaDefinition.optional()
|
|
59463
59480
|
});
|
|
59464
59481
|
var layoutAccessorySchemaDefinition = external_exports.discriminatedUnion("type", [
|
|
59465
59482
|
external_exports.object({ type: external_exports.literal("image"), image: layoutImageSchemaDefinition }),
|
|
@@ -59923,7 +59940,7 @@ var attentionCardSchemaDefinition = external_exports.object({
|
|
|
59923
59940
|
canAlwaysAllow: external_exports.boolean(),
|
|
59924
59941
|
/** How long "Allow for this agent" lasts, shown on the button; null when not known. */
|
|
59925
59942
|
alwaysLeaseSeconds: external_exports.number().int().positive().nullable().default(null),
|
|
59926
|
-
/** A vault card whose Allow covers the rest of the agent's turn
|
|
59943
|
+
/** A vault card whose "Allow once" covers the rest of the agent's turn. */
|
|
59927
59944
|
allowCoversTask: external_exports.boolean().optional(),
|
|
59928
59945
|
/** The vault's request id when the card is a vault approval; null for a harness question. */
|
|
59929
59946
|
vaultRequestId: external_exports.string().nullable().default(null),
|
|
@@ -60109,6 +60126,17 @@ var failureCardSchemaDefinition = external_exports.object({
|
|
|
60109
60126
|
attempt: external_exports.number().int().min(1).optional()
|
|
60110
60127
|
}).optional()
|
|
60111
60128
|
});
|
|
60129
|
+
var welcomeCardActionSchema = external_exports.enum(["slides", "connect_agent", "new_channel", "invite"]);
|
|
60130
|
+
var welcomeCardSchemaDefinition = external_exports.object({
|
|
60131
|
+
type: external_exports.literal("welcome"),
|
|
60132
|
+
agentId: idSchema4,
|
|
60133
|
+
/** The person the buttons are for. */
|
|
60134
|
+
forUserId: external_exports.string().min(1).max(200),
|
|
60135
|
+
/** `welcome`: slides, connect and new channel; `invite`: the follow-up after the slides. */
|
|
60136
|
+
step: external_exports.enum(["welcome", "invite"]),
|
|
60137
|
+
/** The buttons already pressed that run once. */
|
|
60138
|
+
pressed: external_exports.array(welcomeCardActionSchema).max(4)
|
|
60139
|
+
});
|
|
60112
60140
|
var messageCardSchemaDefinition = external_exports.discriminatedUnion("type", [
|
|
60113
60141
|
attentionCardSchemaDefinition,
|
|
60114
60142
|
connectCardSchemaDefinition,
|
|
@@ -60120,7 +60148,8 @@ var messageCardSchemaDefinition = external_exports.discriminatedUnion("type", [
|
|
|
60120
60148
|
hopLimitCardSchemaDefinition,
|
|
60121
60149
|
budgetCardSchemaDefinition,
|
|
60122
60150
|
feedCardSchemaDefinition,
|
|
60123
|
-
failureCardSchemaDefinition
|
|
60151
|
+
failureCardSchemaDefinition,
|
|
60152
|
+
welcomeCardSchemaDefinition
|
|
60124
60153
|
]);
|
|
60125
60154
|
var messageRefSchemaDefinition = external_exports.object({
|
|
60126
60155
|
/** `conversation` points at a conversation with the agent, by its channel. */
|
|
@@ -60323,7 +60352,9 @@ var browsableChannelSchemaDefinition = external_exports.object({
|
|
|
60323
60352
|
lastMessageAt: external_exports.iso.datetime().nullable().default(null),
|
|
60324
60353
|
createdAt: external_exports.iso.datetime().nullable().default(null),
|
|
60325
60354
|
/** Where it is mirrored from, such as Slack; null for a channel that lives only in Laze. */
|
|
60326
|
-
mirrorSource: mirrorSourceSchema.nullable().optional()
|
|
60355
|
+
mirrorSource: mirrorSourceSchema.nullable().optional(),
|
|
60356
|
+
/** Another company is in it now: Slack Connect, or shared with another Laze workspace. */
|
|
60357
|
+
external: external_exports.boolean().optional()
|
|
60327
60358
|
});
|
|
60328
60359
|
var browsableChannelSchema = browsableChannelSchemaDefinition;
|
|
60329
60360
|
var historyPageSchemaDefinition = external_exports.object({
|
|
@@ -60386,7 +60417,7 @@ var createChannelInputSchemaDefinition = external_exports.object({
|
|
|
60386
60417
|
memberUserIds: external_exports.array(idSchema4).max(100).default([]),
|
|
60387
60418
|
/** An agent creator's name, kept on its membership so notices name it. */
|
|
60388
60419
|
creatorName: external_exports.string().trim().min(1).max(80).optional(),
|
|
60389
|
-
/**
|
|
60420
|
+
/** Sent by older clients and ignored: new channels never end on their own. */
|
|
60390
60421
|
endsAt: external_exports.iso.datetime().optional()
|
|
60391
60422
|
});
|
|
60392
60423
|
var createChannelInputSchema = createChannelInputSchemaDefinition;
|
|
@@ -62296,6 +62327,20 @@ var finishVaultDeviceEnrolmentInputSchemaDefinition = external_exports.object({
|
|
|
62296
62327
|
reauthToken: external_exports.string().min(1).optional()
|
|
62297
62328
|
});
|
|
62298
62329
|
var finishVaultDeviceEnrolmentInputSchema = finishVaultDeviceEnrolmentInputSchemaDefinition;
|
|
62330
|
+
var VAULT_DEVICE_NAME_MAX = 40;
|
|
62331
|
+
var renameVaultDeviceInputSchemaDefinition = external_exports.object({
|
|
62332
|
+
workspaceId: external_exports.string().min(1),
|
|
62333
|
+
deviceId: external_exports.string().min(1),
|
|
62334
|
+
label: external_exports.string().trim().min(1).max(VAULT_DEVICE_NAME_MAX)
|
|
62335
|
+
});
|
|
62336
|
+
var renameVaultDeviceInputSchema = renameVaultDeviceInputSchemaDefinition;
|
|
62337
|
+
var BARE_DEVICE_LABELS = {
|
|
62338
|
+
"This Mac": "Mac",
|
|
62339
|
+
Mac: "Mac",
|
|
62340
|
+
iPhone: "iPhone",
|
|
62341
|
+
iPad: "iPad"
|
|
62342
|
+
};
|
|
62343
|
+
var VAULT_BARE_DEVICE_LABELS = Object.keys(BARE_DEVICE_LABELS);
|
|
62299
62344
|
var sealedRecipientSchema = external_exports.object({
|
|
62300
62345
|
deviceId: external_exports.string().min(1),
|
|
62301
62346
|
epk: base64Url,
|
|
@@ -62887,8 +62932,8 @@ var openVaultTurnInputSchemaDefinition = external_exports.object({
|
|
|
62887
62932
|
/** A shorter life than the deployment's turn TTL, for a token made for one command. */
|
|
62888
62933
|
ttlMinutes: external_exports.number().int().positive().optional(),
|
|
62889
62934
|
/**
|
|
62890
|
-
* The task an "Allow
|
|
62891
|
-
* each command; named, every turn opened for it shares one task, which `scope` describes.
|
|
62935
|
+
* The task an "Allow once" on a task card covers: left out, the turn is its own task; null asks
|
|
62936
|
+
* for each command; named, every turn opened for it shares one task, which `scope` describes.
|
|
62892
62937
|
*/
|
|
62893
62938
|
task: external_exports.object({ id: external_exports.string().min(1).max(200), scope: external_exports.string().max(300).nullable() }).nullable().optional()
|
|
62894
62939
|
});
|
|
@@ -63014,7 +63059,7 @@ var vaultApprovalRequestSchemaDefinition = external_exports.object({
|
|
|
63014
63059
|
connectionTitle: external_exports.string().nullable().default(null),
|
|
63015
63060
|
/** The longest lease Allow for this agent offers; null offers only once and deny. */
|
|
63016
63061
|
maxLeaseSeconds: external_exports.number().int().positive().nullable().default(null),
|
|
63017
|
-
/** Allow covers the rest of the agent's turn ("Allow
|
|
63062
|
+
/** Allow covers the rest of the agent's turn ("Allow once" on a task card), not one command. */
|
|
63018
63063
|
coversTask: external_exports.boolean().optional(),
|
|
63019
63064
|
/** Who asks when it is a session outside Laze, not an agent: "Claude Code session on pat-mac". */
|
|
63020
63065
|
agentLabel: external_exports.string().nullable().optional(),
|
|
@@ -63243,7 +63288,7 @@ var vaultTrpc = defineTrpcContract("vault").mutation("createConnection").withInp
|
|
|
63243
63288
|
reason: external_exports.string().trim().min(1).max(200),
|
|
63244
63289
|
reauthToken: external_exports.string().min(1).max(200).optional()
|
|
63245
63290
|
})
|
|
63246
|
-
).withOutput(external_exports.object({ fields: external_exports.record(external_exports.string(), external_exports.string()) })).mutation("beginReauth").withInput(workspaceInput).withOutput(vaultReauthChallengeSchema).mutation("confirmReauth").withInput(confirmVaultReauthInputSchema).withOutput(vaultReauthProofSchema).mutation("grantConnection").withInput(grantVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("lendToChannel").withInput(lendVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("revokeGrant").withInput(revokeVaultGrantInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("listGrants").withInput(connectionInput).withOutput(external_exports.array(vaultGrantSchema)).mutation("shareConnection").withInput(shareVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("approveShare").withInput(approveVaultShareInputSchema).withOutput(vaultGrantSchema).mutation("approveMachineKey").withInput(approveVaultMachineKeyInputSchema).withOutput(approvedVaultMachineKeySchema).query("readLock").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(vaultReadLockSchema).query("referenceHolder").withInput(vaultReferenceHolderInputSchema).withOutput(vaultReferenceHolderSchema).mutation("unlockReads").withInput(unlockVaultReadsInputSchema).withOutput(vaultReadLockSchema).mutation("sealConnection").withInput(sealVaultConnectionInputSchema).withOutput(vaultConnectionSchema).query("listApprovals").withInput(external_exports.object({ ...workspaceInput.shape, state: vaultApprovalListStateSchema.optional() })).withOutput(external_exports.array(vaultApprovalRequestSchema)).mutation("answerApproval").withInput(answerVaultApprovalInputSchema).withOutput(vaultApprovalRequestSchema).query("listAudit").withInput(vaultAuditReadInputSchema).withOutput(vaultAuditPageSchema).query("listActivity").withInput(vaultAuditReadInputSchema).withOutput(external_exports.array(vaultAuditEntrySchema)).query("listLeases").withInput(workspaceInput).withOutput(external_exports.array(vaultLeaseSchema)).mutation("endLease").withInput(endVaultLeaseInputSchema).withOutput(external_exports.object({ ended: external_exports.literal(true) })).query("mostAsked").withInput(vaultMostAskedInputSchema).withOutput(vaultMostAskedSchema).query("judgeStatus").withInput(workspaceInput).withOutput(vaultJudgeStatusSchema).query("listLevelLimits").withInput(workspaceInput).withOutput(external_exports.array(vaultLevelLimitSchema)).mutation("setLevelLimit").withInput(setVaultLevelLimitInputSchema).withOutput(external_exports.array(vaultLevelLimitSchema)).query("listDevices").withInput(listVaultDevicesInput).withOutput(external_exports.array(vaultDeviceSchema)).mutation("beginDeviceEnrolment").withInput(workspaceInput).withOutput(vaultDeviceEnrolmentSchema).mutation("finishDeviceEnrolment").withInput(finishVaultDeviceEnrolmentInputSchema).withOutput(vaultDeviceSchema).mutation("beginDeviceApproval").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ challenge: external_exports.string(), sealed: external_exports.array(vaultSealedMaterialSchema) })).mutation("approveDevice").withInput(approveVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("removeDevice").withInput(
|
|
63291
|
+
).withOutput(external_exports.object({ fields: external_exports.record(external_exports.string(), external_exports.string()) })).mutation("beginReauth").withInput(workspaceInput).withOutput(vaultReauthChallengeSchema).mutation("confirmReauth").withInput(confirmVaultReauthInputSchema).withOutput(vaultReauthProofSchema).mutation("grantConnection").withInput(grantVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("lendToChannel").withInput(lendVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("revokeGrant").withInput(revokeVaultGrantInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).query("listGrants").withInput(connectionInput).withOutput(external_exports.array(vaultGrantSchema)).mutation("shareConnection").withInput(shareVaultConnectionInputSchema).withOutput(vaultGrantSchema).mutation("approveShare").withInput(approveVaultShareInputSchema).withOutput(vaultGrantSchema).mutation("approveMachineKey").withInput(approveVaultMachineKeyInputSchema).withOutput(approvedVaultMachineKeySchema).query("readLock").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(vaultReadLockSchema).query("referenceHolder").withInput(vaultReferenceHolderInputSchema).withOutput(vaultReferenceHolderSchema).mutation("unlockReads").withInput(unlockVaultReadsInputSchema).withOutput(vaultReadLockSchema).mutation("sealConnection").withInput(sealVaultConnectionInputSchema).withOutput(vaultConnectionSchema).query("listApprovals").withInput(external_exports.object({ ...workspaceInput.shape, state: vaultApprovalListStateSchema.optional() })).withOutput(external_exports.array(vaultApprovalRequestSchema)).mutation("answerApproval").withInput(answerVaultApprovalInputSchema).withOutput(vaultApprovalRequestSchema).query("listAudit").withInput(vaultAuditReadInputSchema).withOutput(vaultAuditPageSchema).query("listActivity").withInput(vaultAuditReadInputSchema).withOutput(external_exports.array(vaultAuditEntrySchema)).query("listLeases").withInput(workspaceInput).withOutput(external_exports.array(vaultLeaseSchema)).mutation("endLease").withInput(endVaultLeaseInputSchema).withOutput(external_exports.object({ ended: external_exports.literal(true) })).query("mostAsked").withInput(vaultMostAskedInputSchema).withOutput(vaultMostAskedSchema).query("judgeStatus").withInput(workspaceInput).withOutput(vaultJudgeStatusSchema).query("listLevelLimits").withInput(workspaceInput).withOutput(external_exports.array(vaultLevelLimitSchema)).mutation("setLevelLimit").withInput(setVaultLevelLimitInputSchema).withOutput(external_exports.array(vaultLevelLimitSchema)).query("listDevices").withInput(listVaultDevicesInput).withOutput(external_exports.array(vaultDeviceSchema)).mutation("beginDeviceEnrolment").withInput(workspaceInput).withOutput(vaultDeviceEnrolmentSchema).mutation("finishDeviceEnrolment").withInput(finishVaultDeviceEnrolmentInputSchema).withOutput(vaultDeviceSchema).mutation("beginDeviceApproval").withInput(external_exports.object({ ...workspaceInput.shape, deviceId: external_exports.string().min(1) })).withOutput(external_exports.object({ challenge: external_exports.string(), sealed: external_exports.array(vaultSealedMaterialSchema) })).mutation("approveDevice").withInput(approveVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("renameDevice").withInput(renameVaultDeviceInputSchema).withOutput(vaultDeviceSchema).mutation("removeDevice").withInput(
|
|
63247
63292
|
external_exports.object({
|
|
63248
63293
|
...workspaceInput.shape,
|
|
63249
63294
|
deviceId: external_exports.string().min(1),
|
|
@@ -63371,7 +63416,7 @@ var vaultApprovalRequestedPayloadSchemaDefinition = external_exports.object({
|
|
|
63371
63416
|
sealed: external_exports.boolean().default(false),
|
|
63372
63417
|
/** For a send, the message it would send, read from the provider. */
|
|
63373
63418
|
draft: vaultDraftPreviewSchema.nullable().default(null),
|
|
63374
|
-
/** Allow covers the rest of the agent's turn ("Allow
|
|
63419
|
+
/** Allow covers the rest of the agent's turn ("Allow once" on a task card), not one command. */
|
|
63375
63420
|
coversTask: external_exports.boolean().optional(),
|
|
63376
63421
|
/** What a task card's Allow covers when it is wider than one turn: "this session of ...". */
|
|
63377
63422
|
taskScope: external_exports.string().nullable().optional(),
|
|
@@ -64358,7 +64403,9 @@ var liveStepSchemaDefinition = external_exports.object({
|
|
|
64358
64403
|
/** A subagent's type or model, such as `Explore` or `claude-haiku-4-5`. */
|
|
64359
64404
|
agent: external_exports.string().max(80).optional(),
|
|
64360
64405
|
/** A subagent's tool calls so far. */
|
|
64361
|
-
steps: external_exports.number().int().nonnegative().optional()
|
|
64406
|
+
steps: external_exports.number().int().nonnegative().optional(),
|
|
64407
|
+
/** A subagent's own tool line: the id of the subagent row it belongs under. */
|
|
64408
|
+
parent: external_exports.string().min(1).max(200).optional()
|
|
64362
64409
|
});
|
|
64363
64410
|
var liveStepSchema = liveStepSchemaDefinition;
|
|
64364
64411
|
var harnessModelSchemaDefinition = external_exports.object({
|
|
@@ -65323,6 +65370,257 @@ var computerPoolWatchStateDefinition = external_exports.object({
|
|
|
65323
65370
|
var computerHostProbeIntentSchemaDefinition = external_exports.object({ hostId: external_exports.string() });
|
|
65324
65371
|
var computerMoveIntentSchemaDefinition = external_exports.object({ moveId: external_exports.string(), computerId: external_exports.string() });
|
|
65325
65372
|
|
|
65373
|
+
// ../../modules/agent/contract/src/agent-context-window.ts
|
|
65374
|
+
var AGENT_CONTEXT_WINDOW = {
|
|
65375
|
+
default: 4e5,
|
|
65376
|
+
min: 1e5,
|
|
65377
|
+
max: 1e6
|
|
65378
|
+
};
|
|
65379
|
+
var contextWindowInputSchema = external_exports.number().int().min(AGENT_CONTEXT_WINDOW.min).max(AGENT_CONTEXT_WINDOW.max);
|
|
65380
|
+
|
|
65381
|
+
// ../../modules/agent/contract/src/agent-face.ts
|
|
65382
|
+
var AGENT_AVATAR_MAX = 120;
|
|
65383
|
+
var AGENT_AVATAR_MAX_BYTES = 1024 * 1024;
|
|
65384
|
+
var AGENT_AVATAR_PICK_MAX_BYTES = 10 * 1024 * 1024;
|
|
65385
|
+
var AGENT_AVATAR_TYPES = ["image/png", "image/jpeg", "image/webp"];
|
|
65386
|
+
var SLOTH_PATTERN = /^sloth:([a-z0-9]{1,32})$/;
|
|
65387
|
+
var FILE_PATTERN = /^file:([A-Za-z0-9_-]{1,64})$/;
|
|
65388
|
+
var EMOJI_PATTERN = new RegExp("^emoji:((?:\\p{Extended_Pictographic}|\\p{Emoji_Component}|\\p{Regional_Indicator}|\\u200d|\\ufe0f|\\u20e3){1,16})$", "u");
|
|
65389
|
+
var PICTOGRAPH = new RegExp("\\p{Extended_Pictographic}|\\p{Regional_Indicator}|\\u20e3", "u");
|
|
65390
|
+
var EMOJI_PREFIX = "emoji:";
|
|
65391
|
+
function isEmojiAvatar(avatar) {
|
|
65392
|
+
const emoji4 = EMOJI_PATTERN.exec(avatar)?.[1];
|
|
65393
|
+
if (!emoji4 || !PICTOGRAPH.test(emoji4)) return false;
|
|
65394
|
+
return [...new Intl.Segmenter(void 0, { granularity: "grapheme" }).segment(emoji4)].length === 1;
|
|
65395
|
+
}
|
|
65396
|
+
function emojiAvatar(emoji4) {
|
|
65397
|
+
return `${EMOJI_PREFIX}${emoji4}`;
|
|
65398
|
+
}
|
|
65399
|
+
var agentAvatarInputSchema = external_exports.string().trim().max(AGENT_AVATAR_MAX).refine(
|
|
65400
|
+
(value) => value === "" || SLOTH_PATTERN.test(value) || FILE_PATTERN.test(value) || isEmojiAvatar(value),
|
|
65401
|
+
{ message: "An avatar is a sloth, an uploaded picture or one emoji" }
|
|
65402
|
+
);
|
|
65403
|
+
var uploadAgentAvatarInputSchemaDefinition = external_exports.object({
|
|
65404
|
+
workspaceId: external_exports.string().min(1),
|
|
65405
|
+
contentType: external_exports.enum(AGENT_AVATAR_TYPES),
|
|
65406
|
+
/** The cropped square picture, base64. */
|
|
65407
|
+
dataBase64: external_exports.string().min(1).max(Math.ceil(AGENT_AVATAR_MAX_BYTES * 4 / 3) + 8)
|
|
65408
|
+
});
|
|
65409
|
+
var uploadAgentAvatarInputSchema = uploadAgentAvatarInputSchemaDefinition;
|
|
65410
|
+
var uploadedAgentAvatarSchemaDefinition = external_exports.object({
|
|
65411
|
+
/** What `avatar` takes on create or update. */
|
|
65412
|
+
avatar: external_exports.string(),
|
|
65413
|
+
/** A short-lived link to show the picture until the agent is saved. */
|
|
65414
|
+
url: external_exports.string()
|
|
65415
|
+
});
|
|
65416
|
+
var uploadedAgentAvatarSchema = uploadedAgentAvatarSchemaDefinition;
|
|
65417
|
+
var agentFaceSchemaDefinition = external_exports.object({
|
|
65418
|
+
agentId: external_exports.string(),
|
|
65419
|
+
name: external_exports.string(),
|
|
65420
|
+
/** The sloth's seed; null when the agent shows a picture. With an emoji, its id's sloth. */
|
|
65421
|
+
seed: external_exports.string().nullable(),
|
|
65422
|
+
/** A short-lived link to its picture; null for a sloth. */
|
|
65423
|
+
imageUrl: external_exports.string().nullable(),
|
|
65424
|
+
/** Deleted for good: its old messages show a grey sloth. */
|
|
65425
|
+
gone: external_exports.boolean().default(false),
|
|
65426
|
+
/** How it runs and whose it is, "Laze models · Ada": tells agents sharing a name apart. */
|
|
65427
|
+
detail: external_exports.string().default(""),
|
|
65428
|
+
/** The emoji it shows instead of its sloth; null for a sloth or a picture. */
|
|
65429
|
+
emoji: external_exports.string().nullable().optional()
|
|
65430
|
+
});
|
|
65431
|
+
var agentFaceSchema = agentFaceSchemaDefinition;
|
|
65432
|
+
var agentPresenceSchemaDefinition = external_exports.object({
|
|
65433
|
+
agentId: external_exports.string(),
|
|
65434
|
+
presence: external_exports.enum(["active", "away", "offline"])
|
|
65435
|
+
});
|
|
65436
|
+
var agentPresenceSchema = agentPresenceSchemaDefinition;
|
|
65437
|
+
|
|
65438
|
+
// ../../modules/agent/contract/src/agent-run-config.ts
|
|
65439
|
+
var harnessModelsSchemaDefinition = external_exports.object({
|
|
65440
|
+
models: external_exports.array(harnessModelSchema).max(100),
|
|
65441
|
+
/** The model the harness runs when Laze names none; null when it did not say. */
|
|
65442
|
+
defaultModel: external_exports.string().max(200).nullable(),
|
|
65443
|
+
readAt: external_exports.iso.datetime()
|
|
65444
|
+
});
|
|
65445
|
+
var harnessModelsSchema = harnessModelsSchemaDefinition;
|
|
65446
|
+
var runModelInputSchema = external_exports.string().trim().min(1).max(200).nullable();
|
|
65447
|
+
var runEffortInputSchema = external_exports.string().trim().min(1).max(40).regex(/^[a-z]+$/).nullable();
|
|
65448
|
+
var EFFORT_LABELS = {
|
|
65449
|
+
minimal: "Minimal",
|
|
65450
|
+
low: "Low",
|
|
65451
|
+
medium: "Medium",
|
|
65452
|
+
high: "High",
|
|
65453
|
+
xhigh: "Extra high",
|
|
65454
|
+
max: "Max",
|
|
65455
|
+
ultra: "Ultra"
|
|
65456
|
+
};
|
|
65457
|
+
function effortLabelOf({ effort }) {
|
|
65458
|
+
return EFFORT_LABELS[effort] ?? `${effort.charAt(0).toUpperCase()}${effort.slice(1)}`;
|
|
65459
|
+
}
|
|
65460
|
+
function tokensLabelOf({ tokens }) {
|
|
65461
|
+
if (tokens >= 1e6) return `${Math.round(tokens / 1e5) / 10}M`;
|
|
65462
|
+
return `${Math.round(tokens / 1e3)}k`;
|
|
65463
|
+
}
|
|
65464
|
+
var poolDefaultModelSchemaDefinition = external_exports.object({
|
|
65465
|
+
model: external_exports.string().min(1).max(200),
|
|
65466
|
+
/** The model as its listing named it when set, "Fable 5"; empty when no agent had listed it. */
|
|
65467
|
+
name: external_exports.string().max(200).default(""),
|
|
65468
|
+
poolName: external_exports.string()
|
|
65469
|
+
});
|
|
65470
|
+
var poolDefaultModelSchema = poolDefaultModelSchemaDefinition;
|
|
65471
|
+
var CLAUDE_CODE_DEFAULT_MODEL = "opus";
|
|
65472
|
+
var LAZE_DEFAULT_LEVEL = "frontier";
|
|
65473
|
+
var listsModel = ({ listing, model }) => listing.length === 0 || listing.some((one) => one.id === model);
|
|
65474
|
+
function defaultModelChoiceOf({ agent: agent3 }) {
|
|
65475
|
+
const listed = agent3.harnessModels?.models ?? [];
|
|
65476
|
+
const pool = agent3.poolDefaultModel;
|
|
65477
|
+
if (pool && listsModel({ listing: listed, model: pool.model })) {
|
|
65478
|
+
return { kind: "laze", model: pool.model, poolName: pool.poolName };
|
|
65479
|
+
}
|
|
65480
|
+
if (agent3.harness !== "claude-code") return { kind: "harness" };
|
|
65481
|
+
return listsModel({ listing: listed, model: CLAUDE_CODE_DEFAULT_MODEL }) ? { kind: "laze", model: CLAUDE_CODE_DEFAULT_MODEL } : { kind: "harness" };
|
|
65482
|
+
}
|
|
65483
|
+
function launchModelChoiceOf({ agent: agent3 }) {
|
|
65484
|
+
return agent3.model ? { kind: "laze", model: agent3.model } : defaultModelChoiceOf({ agent: agent3 });
|
|
65485
|
+
}
|
|
65486
|
+
function levelOf({ agent: agent3 }) {
|
|
65487
|
+
if (agent3.modelLevel && !agent3.isModelLevelDefault) {
|
|
65488
|
+
return { level: agent3.modelLevel, source: "agent" };
|
|
65489
|
+
}
|
|
65490
|
+
if (agent3.workspaceModelLevel) return { level: agent3.workspaceModelLevel, source: "workspace" };
|
|
65491
|
+
return { level: LAZE_DEFAULT_LEVEL, source: "laze" };
|
|
65492
|
+
}
|
|
65493
|
+
function versionedNameOf({ model }) {
|
|
65494
|
+
const head = model.description.split(" \xB7 ")[0]?.trim() ?? "";
|
|
65495
|
+
const named = model.name && head.startsWith(`${model.name} `) && /\d/.test(head);
|
|
65496
|
+
return named && head.length <= 60 ? head : model.name;
|
|
65497
|
+
}
|
|
65498
|
+
function pickRunningModel({ agent: agent3 }) {
|
|
65499
|
+
if (agent3.harness === "laze-models") return null;
|
|
65500
|
+
const listed = agent3.harnessModels?.models ?? [];
|
|
65501
|
+
const choice = launchModelChoiceOf({ agent: agent3 });
|
|
65502
|
+
const wanted = choice.kind === "laze" ? choice.model : agent3.harnessModels?.defaultModel;
|
|
65503
|
+
return listed.find((one) => one.id === wanted) ?? (agent3.model ? null : listed[0] ?? null);
|
|
65504
|
+
}
|
|
65505
|
+
function describeUnlistedPoolModel({
|
|
65506
|
+
agent: agent3
|
|
65507
|
+
}) {
|
|
65508
|
+
const pool = agent3.poolDefaultModel;
|
|
65509
|
+
if (!pool || agent3.model || (agent3.harnessModels?.models.length ?? 0) > 0) return void 0;
|
|
65510
|
+
return pool.name || pool.model;
|
|
65511
|
+
}
|
|
65512
|
+
function poolStemOf({ poolName }) {
|
|
65513
|
+
return poolName.trim().replace(/\s+pool$/i, "") || poolName.trim();
|
|
65514
|
+
}
|
|
65515
|
+
function poolPhraseOf({ poolName }) {
|
|
65516
|
+
return `the ${poolStemOf({ poolName })} pool`;
|
|
65517
|
+
}
|
|
65518
|
+
function describeDefaultModelNote({ agent: agent3 }) {
|
|
65519
|
+
const pool = agent3.poolDefaultModel;
|
|
65520
|
+
if (agent3.model || agent3.harness === "laze-models" || !pool) return void 0;
|
|
65521
|
+
const choice = defaultModelChoiceOf({ agent: agent3 });
|
|
65522
|
+
if (choice.kind === "laze" && choice.poolName) return void 0;
|
|
65523
|
+
const running = pickRunningModel({ agent: agent3 });
|
|
65524
|
+
const runs = running ? versionedNameOf({ model: running }) || running.id : "the login's own default";
|
|
65525
|
+
const phrase = poolPhraseOf({ poolName: pool.poolName });
|
|
65526
|
+
const head = `${phrase.charAt(0).toUpperCase()}${phrase.slice(1)}`;
|
|
65527
|
+
return `${head} default, ${pool.name || pool.model}, is not on this login, so Default runs ${runs}.`;
|
|
65528
|
+
}
|
|
65529
|
+
function contextCapOf({ agent: agent3 }) {
|
|
65530
|
+
if (agent3.harness === "laze-models") return { tokens: AGENT_CONTEXT_WINDOW.max, known: true };
|
|
65531
|
+
const window2 = pickRunningModel({ agent: agent3 })?.contextWindow ?? null;
|
|
65532
|
+
return window2 ? { tokens: window2, known: true } : { tokens: AGENT_CONTEXT_WINDOW.max, known: false };
|
|
65533
|
+
}
|
|
65534
|
+
var LEVEL_NAMES = { fast: "Laze Small", frontier: "Laze Frontier" };
|
|
65535
|
+
function modelLineOf({ agent: agent3 }) {
|
|
65536
|
+
if (agent3.harness === "laze-models") {
|
|
65537
|
+
const { level: level2, source } = levelOf({ agent: agent3 });
|
|
65538
|
+
if (source === "agent") return LEVEL_NAMES[level2];
|
|
65539
|
+
return source === "workspace" ? `Default (${LEVEL_NAMES[level2]}, the workspace default)` : `Default (${LEVEL_NAMES[level2]})`;
|
|
65540
|
+
}
|
|
65541
|
+
const running = pickRunningModel({ agent: agent3 });
|
|
65542
|
+
const name3 = running ? versionedNameOf({ model: running }) || running.id : describeUnlistedPoolModel({ agent: agent3 }) ?? null;
|
|
65543
|
+
if (agent3.model) return name3 || agent3.model;
|
|
65544
|
+
if (!name3) return "Default";
|
|
65545
|
+
const choice = defaultModelChoiceOf({ agent: agent3 });
|
|
65546
|
+
const from = choice.kind === "laze" && choice.poolName ? choice.poolName : null;
|
|
65547
|
+
return from ? `Default (${name3}, from ${poolPhraseOf({ poolName: from })})` : `Default (${name3})`;
|
|
65548
|
+
}
|
|
65549
|
+
function describeEffort({ agent: agent3 }) {
|
|
65550
|
+
const running = pickRunningModel({ agent: agent3 });
|
|
65551
|
+
if (agent3.effort) return effortLabelOf({ effort: agent3.effort });
|
|
65552
|
+
if (running && running.efforts.length === 0) return null;
|
|
65553
|
+
const fallback = running?.defaultEffort;
|
|
65554
|
+
return fallback ? `Default (${effortLabelOf({ effort: fallback })})` : "Default";
|
|
65555
|
+
}
|
|
65556
|
+
function contextLineOf({ agent: agent3 }) {
|
|
65557
|
+
const cap = contextCapOf({ agent: agent3 });
|
|
65558
|
+
if (agent3.harness === "laze-models") {
|
|
65559
|
+
const tokens = agent3.contextWindow ?? AGENT_CONTEXT_WINDOW.default;
|
|
65560
|
+
return `${tokensLabelOf({ tokens })}, up to ${tokensLabelOf({ tokens: cap.tokens })}`;
|
|
65561
|
+
}
|
|
65562
|
+
if (!cap.known) {
|
|
65563
|
+
return agent3.contextWindow ? `${tokensLabelOf({ tokens: agent3.contextWindow })}, or the model's window if smaller` : "The model's own window";
|
|
65564
|
+
}
|
|
65565
|
+
const set2 = agent3.contextWindow ? Math.min(agent3.contextWindow, cap.tokens) : null;
|
|
65566
|
+
if (!set2 || set2 === cap.tokens)
|
|
65567
|
+
return `${tokensLabelOf({ tokens: cap.tokens })}, the most this model takes`;
|
|
65568
|
+
return `${tokensLabelOf({ tokens: set2 })} of the ${tokensLabelOf({ tokens: cap.tokens })} this model takes`;
|
|
65569
|
+
}
|
|
65570
|
+
function agentRunSummaryOf({ agent: agent3 }) {
|
|
65571
|
+
return {
|
|
65572
|
+
model: modelLineOf({ agent: agent3 }),
|
|
65573
|
+
effort: describeEffort({ agent: agent3 }),
|
|
65574
|
+
context: contextLineOf({ agent: agent3 })
|
|
65575
|
+
};
|
|
65576
|
+
}
|
|
65577
|
+
|
|
65578
|
+
// ../../modules/agent/contract/src/agent-manage.ts
|
|
65579
|
+
var hostedHarnessSchema = external_exports.enum(["laze-models", "claude-code", "codex"]);
|
|
65580
|
+
var nameSchema = external_exports.string().trim().min(1).max(80);
|
|
65581
|
+
var descriptionSchema = external_exports.string().max(2e4);
|
|
65582
|
+
var agentRefSchema2 = external_exports.string().trim().min(1).max(80);
|
|
65583
|
+
var createAgentAsCallerInputSchemaDefinition = external_exports.object({
|
|
65584
|
+
name: nameSchema,
|
|
65585
|
+
/** What the agent is for; it becomes the agent's instructions. */
|
|
65586
|
+
description: descriptionSchema.default(""),
|
|
65587
|
+
harness: hostedHarnessSchema.default("laze-models"),
|
|
65588
|
+
avatar: agentAvatarInputSchema.default(""),
|
|
65589
|
+
/** A team agent belongs to the workspace; on Claude Code or Codex it needs `loginPoolId`. */
|
|
65590
|
+
kind: external_exports.enum(["personal", "team"]).default("personal"),
|
|
65591
|
+
/** The login pool's id or name, one the caller is a member of. */
|
|
65592
|
+
loginPoolId: external_exports.string().trim().min(1).max(200).optional()
|
|
65593
|
+
});
|
|
65594
|
+
var createdAgentSchemaDefinition = external_exports.object({
|
|
65595
|
+
agentId: external_exports.string(),
|
|
65596
|
+
name: external_exports.string(),
|
|
65597
|
+
harness: hostedHarnessSchema,
|
|
65598
|
+
ownerUserId: external_exports.string(),
|
|
65599
|
+
/** The owner's direct message with the new agent. */
|
|
65600
|
+
channelId: external_exports.string()
|
|
65601
|
+
});
|
|
65602
|
+
var updateAgentAsCallerInputSchemaDefinition = external_exports.strictObject({
|
|
65603
|
+
/** Left out, the agent whose key calls: `laze agent update --self`. */
|
|
65604
|
+
agent: agentRefSchema2.optional(),
|
|
65605
|
+
name: nameSchema.optional(),
|
|
65606
|
+
description: descriptionSchema.optional(),
|
|
65607
|
+
avatar: agentAvatarInputSchema.optional(),
|
|
65608
|
+
/** The max context of an agent Laze runs, in tokens, 100k to 1M; null for its default. */
|
|
65609
|
+
contextWindow: contextWindowInputSchema.nullable().optional(),
|
|
65610
|
+
/** The model its login lists, or null for the harness's default. */
|
|
65611
|
+
model: runModelInputSchema.optional(),
|
|
65612
|
+
/** The thinking level its model lists, or null for the model's default. */
|
|
65613
|
+
effort: runEffortInputSchema.optional(),
|
|
65614
|
+
/** Pauses or resumes an agent Laze runs. */
|
|
65615
|
+
paused: external_exports.boolean().optional(),
|
|
65616
|
+
pauseReason: external_exports.string().trim().max(200).optional()
|
|
65617
|
+
});
|
|
65618
|
+
var archiveAgentAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema2 });
|
|
65619
|
+
var uploadAvatarAsCallerInputSchemaDefinition = external_exports.object({
|
|
65620
|
+
contentType: external_exports.string().min(1).max(100),
|
|
65621
|
+
dataBase64: external_exports.string().min(1).max(Math.ceil(AGENT_AVATAR_PICK_MAX_BYTES * 4 / 3) + 8)
|
|
65622
|
+
});
|
|
65623
|
+
|
|
65326
65624
|
// ../../modules/agent/contract/src/agent-attention.ts
|
|
65327
65625
|
var workspaceIdSchema3 = external_exports.string().min(1);
|
|
65328
65626
|
var idSchema6 = external_exports.string().min(1).max(80);
|
|
@@ -65422,7 +65720,9 @@ var agentTurnStopRequestedPayloadSchemaDefinition = external_exports.object({
|
|
|
65422
65720
|
stoppedByUserId: external_exports.string().min(1),
|
|
65423
65721
|
stoppedByName: external_exports.string().default(""),
|
|
65424
65722
|
/** A session reset: the turn stops and the harness starts a fresh session in the main thread. */
|
|
65425
|
-
freshSession: external_exports.boolean().optional()
|
|
65723
|
+
freshSession: external_exports.boolean().optional(),
|
|
65724
|
+
/** The runtime a reset follows a move to; absent for a reset someone asked for. */
|
|
65725
|
+
movedTo: hostedHarnessSchema.optional()
|
|
65426
65726
|
});
|
|
65427
65727
|
var agentCompactRequestedPayloadSchemaDefinition = external_exports.object({
|
|
65428
65728
|
workspaceId: external_exports.string().min(1),
|
|
@@ -65602,18 +65902,10 @@ var restartAgentComputerInputSchemaDefinition = external_exports.object({
|
|
|
65602
65902
|
});
|
|
65603
65903
|
var restartAgentComputerInputSchema = restartAgentComputerInputSchemaDefinition;
|
|
65604
65904
|
|
|
65605
|
-
// ../../modules/agent/contract/src/agent-context-window.ts
|
|
65606
|
-
var AGENT_CONTEXT_WINDOW = {
|
|
65607
|
-
default: 4e5,
|
|
65608
|
-
min: 1e5,
|
|
65609
|
-
max: 1e6
|
|
65610
|
-
};
|
|
65611
|
-
var contextWindowInputSchema = external_exports.number().int().min(AGENT_CONTEXT_WINDOW.min).max(AGENT_CONTEXT_WINDOW.max);
|
|
65612
|
-
|
|
65613
65905
|
// ../../modules/agent/contract/src/agent-conversations.ts
|
|
65614
65906
|
var idSchema7 = external_exports.string().min(1).max(64);
|
|
65615
65907
|
var workspaceIdSchema4 = external_exports.string().min(1).max(64);
|
|
65616
|
-
var
|
|
65908
|
+
var agentRefSchema3 = external_exports.string().trim().min(1).max(80);
|
|
65617
65909
|
var firstMessageSchema = external_exports.string().trim().min(1).max(4e4);
|
|
65618
65910
|
var clientKeySchema = external_exports.string().regex(/^[A-Za-z0-9_-]{8,64}$/).optional();
|
|
65619
65911
|
var startConversationInputSchemaDefinition = external_exports.object({
|
|
@@ -65649,12 +65941,12 @@ var listConversationsInputSchemaDefinition = external_exports.object({
|
|
|
65649
65941
|
var listConversationsInputSchema = listConversationsInputSchemaDefinition;
|
|
65650
65942
|
var conversationSummarySchema2 = chatSummarySchema;
|
|
65651
65943
|
var startConversationAsCallerInputSchemaDefinition = external_exports.object({
|
|
65652
|
-
agent:
|
|
65944
|
+
agent: agentRefSchema3,
|
|
65653
65945
|
text: firstMessageSchema,
|
|
65654
65946
|
about: idSchema7.optional().describe("The id of a message to continue from: the first message quotes it.")
|
|
65655
65947
|
});
|
|
65656
65948
|
var listConversationsAsCallerInputSchemaDefinition = external_exports.object({
|
|
65657
|
-
agent:
|
|
65949
|
+
agent: agentRefSchema3.optional(),
|
|
65658
65950
|
unnamed: external_exports.boolean().optional()
|
|
65659
65951
|
});
|
|
65660
65952
|
var renameConversationAsCallerInputSchemaDefinition = external_exports.object({
|
|
@@ -65680,63 +65972,6 @@ function namingFirstTextOf({ channelIds }) {
|
|
|
65680
65972
|
].join("\n");
|
|
65681
65973
|
}
|
|
65682
65974
|
|
|
65683
|
-
// ../../modules/agent/contract/src/agent-face.ts
|
|
65684
|
-
var AGENT_AVATAR_MAX = 120;
|
|
65685
|
-
var AGENT_AVATAR_MAX_BYTES = 1024 * 1024;
|
|
65686
|
-
var AGENT_AVATAR_PICK_MAX_BYTES = 10 * 1024 * 1024;
|
|
65687
|
-
var AGENT_AVATAR_TYPES = ["image/png", "image/jpeg", "image/webp"];
|
|
65688
|
-
var SLOTH_PATTERN = /^sloth:([a-z0-9]{1,32})$/;
|
|
65689
|
-
var FILE_PATTERN = /^file:([A-Za-z0-9_-]{1,64})$/;
|
|
65690
|
-
var EMOJI_PATTERN = new RegExp("^emoji:((?:\\p{Extended_Pictographic}|\\p{Emoji_Component}|\\p{Regional_Indicator}|\\u200d|\\ufe0f|\\u20e3){1,16})$", "u");
|
|
65691
|
-
var PICTOGRAPH = new RegExp("\\p{Extended_Pictographic}|\\p{Regional_Indicator}|\\u20e3", "u");
|
|
65692
|
-
var EMOJI_PREFIX = "emoji:";
|
|
65693
|
-
function isEmojiAvatar(avatar) {
|
|
65694
|
-
const emoji4 = EMOJI_PATTERN.exec(avatar)?.[1];
|
|
65695
|
-
if (!emoji4 || !PICTOGRAPH.test(emoji4)) return false;
|
|
65696
|
-
return [...new Intl.Segmenter(void 0, { granularity: "grapheme" }).segment(emoji4)].length === 1;
|
|
65697
|
-
}
|
|
65698
|
-
function emojiAvatar(emoji4) {
|
|
65699
|
-
return `${EMOJI_PREFIX}${emoji4}`;
|
|
65700
|
-
}
|
|
65701
|
-
var agentAvatarInputSchema = external_exports.string().trim().max(AGENT_AVATAR_MAX).refine(
|
|
65702
|
-
(value) => value === "" || SLOTH_PATTERN.test(value) || FILE_PATTERN.test(value) || isEmojiAvatar(value),
|
|
65703
|
-
{ message: "An avatar is a sloth, an uploaded picture or one emoji" }
|
|
65704
|
-
);
|
|
65705
|
-
var uploadAgentAvatarInputSchemaDefinition = external_exports.object({
|
|
65706
|
-
workspaceId: external_exports.string().min(1),
|
|
65707
|
-
contentType: external_exports.enum(AGENT_AVATAR_TYPES),
|
|
65708
|
-
/** The cropped square picture, base64. */
|
|
65709
|
-
dataBase64: external_exports.string().min(1).max(Math.ceil(AGENT_AVATAR_MAX_BYTES * 4 / 3) + 8)
|
|
65710
|
-
});
|
|
65711
|
-
var uploadAgentAvatarInputSchema = uploadAgentAvatarInputSchemaDefinition;
|
|
65712
|
-
var uploadedAgentAvatarSchemaDefinition = external_exports.object({
|
|
65713
|
-
/** What `avatar` takes on create or update. */
|
|
65714
|
-
avatar: external_exports.string(),
|
|
65715
|
-
/** A short-lived link to show the picture until the agent is saved. */
|
|
65716
|
-
url: external_exports.string()
|
|
65717
|
-
});
|
|
65718
|
-
var uploadedAgentAvatarSchema = uploadedAgentAvatarSchemaDefinition;
|
|
65719
|
-
var agentFaceSchemaDefinition = external_exports.object({
|
|
65720
|
-
agentId: external_exports.string(),
|
|
65721
|
-
name: external_exports.string(),
|
|
65722
|
-
/** The sloth's seed; null when the agent shows a picture. With an emoji, its id's sloth. */
|
|
65723
|
-
seed: external_exports.string().nullable(),
|
|
65724
|
-
/** A short-lived link to its picture; null for a sloth. */
|
|
65725
|
-
imageUrl: external_exports.string().nullable(),
|
|
65726
|
-
/** Deleted for good: its old messages show a grey sloth. */
|
|
65727
|
-
gone: external_exports.boolean().default(false),
|
|
65728
|
-
/** How it runs and whose it is, "Laze models · Ada": tells agents sharing a name apart. */
|
|
65729
|
-
detail: external_exports.string().default(""),
|
|
65730
|
-
/** The emoji it shows instead of its sloth; null for a sloth or a picture. */
|
|
65731
|
-
emoji: external_exports.string().nullable().optional()
|
|
65732
|
-
});
|
|
65733
|
-
var agentFaceSchema = agentFaceSchemaDefinition;
|
|
65734
|
-
var agentPresenceSchemaDefinition = external_exports.object({
|
|
65735
|
-
agentId: external_exports.string(),
|
|
65736
|
-
presence: external_exports.enum(["active", "away", "offline"])
|
|
65737
|
-
});
|
|
65738
|
-
var agentPresenceSchema = agentPresenceSchemaDefinition;
|
|
65739
|
-
|
|
65740
65975
|
// ../../modules/connector/contract/src/connector-cards.ts
|
|
65741
65976
|
var suggestConnectInputSchemaDefinition = external_exports.object({
|
|
65742
65977
|
/** The service by name: `gmail`, `linear`, `google-calendar`. */
|
|
@@ -66732,7 +66967,7 @@ var langwatchSurfaces = defineSurfaces(
|
|
|
66732
66967
|
);
|
|
66733
66968
|
|
|
66734
66969
|
// ../../modules/agent/contract/src/agent-langwatch.ts
|
|
66735
|
-
var
|
|
66970
|
+
var agentRefSchema4 = external_exports.string().trim().min(1).max(80);
|
|
66736
66971
|
var workspaceIdSchema6 = external_exports.string().min(1);
|
|
66737
66972
|
var idSchema9 = external_exports.string().min(1).max(80);
|
|
66738
66973
|
var choiceShape = {
|
|
@@ -66757,9 +66992,9 @@ var setAgentLangwatchInputSchemaDefinition = external_exports.object({
|
|
|
66757
66992
|
...choiceShape
|
|
66758
66993
|
});
|
|
66759
66994
|
var setAgentLangwatchInputSchema = setAgentLangwatchInputSchemaDefinition;
|
|
66760
|
-
var agentLangwatchAsCallerInputSchemaDefinition = external_exports.object({ agent:
|
|
66995
|
+
var agentLangwatchAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema4 });
|
|
66761
66996
|
var setAgentLangwatchAsCallerInputSchemaDefinition = external_exports.object({
|
|
66762
|
-
agent:
|
|
66997
|
+
agent: agentRefSchema4,
|
|
66763
66998
|
...choiceShape
|
|
66764
66999
|
});
|
|
66765
67000
|
var agentLangwatchTracingSchema = langwatchAgentTracingSchema;
|
|
@@ -66767,7 +67002,7 @@ var agentLangwatchTracingSchema = langwatchAgentTracingSchema;
|
|
|
66767
67002
|
// ../../modules/agent/contract/src/agent-lifecycle.ts
|
|
66768
67003
|
var workspaceIdSchema7 = external_exports.string().min(1);
|
|
66769
67004
|
var idSchema10 = external_exports.string().min(1).max(200);
|
|
66770
|
-
var
|
|
67005
|
+
var agentRefSchema5 = external_exports.string().trim().min(1).max(80);
|
|
66771
67006
|
var memberRefSchema = external_exports.string().trim().min(1).max(320);
|
|
66772
67007
|
var transferAgentInputSchemaDefinition = external_exports.object({
|
|
66773
67008
|
workspaceId: workspaceIdSchema7,
|
|
@@ -66782,10 +67017,10 @@ var resetAgentSessionInputSchemaDefinition = external_exports.object({
|
|
|
66782
67017
|
});
|
|
66783
67018
|
var resetAgentSessionInputSchema = resetAgentSessionInputSchemaDefinition;
|
|
66784
67019
|
var transferAgentAsCallerInputSchemaDefinition = external_exports.object({
|
|
66785
|
-
agent:
|
|
67020
|
+
agent: agentRefSchema5,
|
|
66786
67021
|
to: memberRefSchema
|
|
66787
67022
|
});
|
|
66788
|
-
var resetAgentSessionAsCallerInputSchemaDefinition = external_exports.object({ agent:
|
|
67023
|
+
var resetAgentSessionAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema5 });
|
|
66789
67024
|
|
|
66790
67025
|
// ../../modules/agent/contract/src/agent-link-redemption.ts
|
|
66791
67026
|
var workspaceIdSchema8 = external_exports.string().min(1);
|
|
@@ -66977,6 +67212,15 @@ var loginPoolSchemaDefinition = external_exports.object({
|
|
|
66977
67212
|
createdAt: external_exports.iso.datetime(),
|
|
66978
67213
|
members: external_exports.array(external_exports.object({ userId: idSchema12, name: external_exports.string(), role: loginPoolRoleSchema })),
|
|
66979
67214
|
agents: external_exports.array(external_exports.object({ id: idSchema12, name: external_exports.string(), harness: external_exports.string() })),
|
|
67215
|
+
/** What its agents on Default run per harness; a harness left out has none set. */
|
|
67216
|
+
defaultModels: external_exports.array(external_exports.object({ harness: harnessSchema2, model: external_exports.string(), name: external_exports.string() })).default([]),
|
|
67217
|
+
/** The models the workspace's agents listed per harness, for the default model picker. */
|
|
67218
|
+
modelOptions: external_exports.array(
|
|
67219
|
+
external_exports.object({
|
|
67220
|
+
harness: harnessSchema2,
|
|
67221
|
+
models: external_exports.array(external_exports.object({ id: external_exports.string(), name: external_exports.string() }))
|
|
67222
|
+
})
|
|
67223
|
+
).default([]),
|
|
66980
67224
|
logins: external_exports.array(
|
|
66981
67225
|
external_exports.object({
|
|
66982
67226
|
id: idSchema12,
|
|
@@ -67045,6 +67289,17 @@ var removePoolMemberInputSchemaDefinition = external_exports.object({
|
|
|
67045
67289
|
...memberRefShape
|
|
67046
67290
|
});
|
|
67047
67291
|
var removePoolMemberInputSchema = removePoolMemberInputSchemaDefinition;
|
|
67292
|
+
var setLoginPoolModelInputSchemaDefinition = external_exports.object({
|
|
67293
|
+
workspaceId: workspaceIdSchema9,
|
|
67294
|
+
/** The pool's id or, from the CLI, its name. */
|
|
67295
|
+
poolId: external_exports.string().min(1).max(200),
|
|
67296
|
+
harness: harnessSchema2,
|
|
67297
|
+
model: external_exports.string().trim().min(1).max(200).nullable()
|
|
67298
|
+
});
|
|
67299
|
+
var setLoginPoolModelInputSchema = setLoginPoolModelInputSchemaDefinition;
|
|
67300
|
+
var setLoginPoolModelAsCallerInputSchema = setLoginPoolModelInputSchemaDefinition.omit({
|
|
67301
|
+
workspaceId: true
|
|
67302
|
+
});
|
|
67048
67303
|
var setAgentPoolInputSchemaDefinition = external_exports.object({
|
|
67049
67304
|
workspaceId: workspaceIdSchema9,
|
|
67050
67305
|
/** The agent's id or, from the CLI, its name. */
|
|
@@ -67158,125 +67413,6 @@ var harnessSignInPollSchemaDefinition = external_exports.discriminatedUnion("sta
|
|
|
67158
67413
|
]);
|
|
67159
67414
|
var harnessSignInPollSchema = harnessSignInPollSchemaDefinition;
|
|
67160
67415
|
|
|
67161
|
-
// ../../modules/agent/contract/src/agent-run-config.ts
|
|
67162
|
-
var harnessModelsSchemaDefinition = external_exports.object({
|
|
67163
|
-
models: external_exports.array(harnessModelSchema).max(100),
|
|
67164
|
-
/** The model the harness runs when Laze names none; null when it did not say. */
|
|
67165
|
-
defaultModel: external_exports.string().max(200).nullable(),
|
|
67166
|
-
readAt: external_exports.iso.datetime()
|
|
67167
|
-
});
|
|
67168
|
-
var harnessModelsSchema = harnessModelsSchemaDefinition;
|
|
67169
|
-
var runModelInputSchema = external_exports.string().trim().min(1).max(200).nullable();
|
|
67170
|
-
var runEffortInputSchema = external_exports.string().trim().min(1).max(40).regex(/^[a-z]+$/).nullable();
|
|
67171
|
-
var EFFORT_LABELS = {
|
|
67172
|
-
minimal: "Minimal",
|
|
67173
|
-
low: "Low",
|
|
67174
|
-
medium: "Medium",
|
|
67175
|
-
high: "High",
|
|
67176
|
-
xhigh: "Extra high",
|
|
67177
|
-
max: "Max",
|
|
67178
|
-
ultra: "Ultra"
|
|
67179
|
-
};
|
|
67180
|
-
function effortLabelOf({ effort }) {
|
|
67181
|
-
return EFFORT_LABELS[effort] ?? `${effort.charAt(0).toUpperCase()}${effort.slice(1)}`;
|
|
67182
|
-
}
|
|
67183
|
-
function tokensLabelOf({ tokens }) {
|
|
67184
|
-
if (tokens >= 1e6) return `${Math.round(tokens / 1e5) / 10}M`;
|
|
67185
|
-
return `${Math.round(tokens / 1e3)}k`;
|
|
67186
|
-
}
|
|
67187
|
-
function pickRunningModel({ agent: agent3 }) {
|
|
67188
|
-
if (agent3.harness === "laze-models") return null;
|
|
67189
|
-
const listed = agent3.harnessModels?.models ?? [];
|
|
67190
|
-
const wanted = agent3.model ?? agent3.harnessModels?.defaultModel ?? null;
|
|
67191
|
-
return listed.find((one) => one.id === wanted) ?? (agent3.model ? null : listed[0] ?? null);
|
|
67192
|
-
}
|
|
67193
|
-
function contextCapOf({ agent: agent3 }) {
|
|
67194
|
-
if (agent3.harness === "laze-models") return { tokens: AGENT_CONTEXT_WINDOW.max, known: true };
|
|
67195
|
-
const window2 = pickRunningModel({ agent: agent3 })?.contextWindow ?? null;
|
|
67196
|
-
return window2 ? { tokens: window2, known: true } : { tokens: AGENT_CONTEXT_WINDOW.max, known: false };
|
|
67197
|
-
}
|
|
67198
|
-
var LEVEL_NAMES = { fast: "Laze Fast", frontier: "Laze Frontier" };
|
|
67199
|
-
function modelLineOf({ agent: agent3 }) {
|
|
67200
|
-
if (agent3.harness === "laze-models") return LEVEL_NAMES[agent3.modelLevel ?? "fast"];
|
|
67201
|
-
const running = pickRunningModel({ agent: agent3 });
|
|
67202
|
-
if (agent3.model) return running?.name || agent3.model;
|
|
67203
|
-
return running ? `Default (${running.name || running.id})` : "Default";
|
|
67204
|
-
}
|
|
67205
|
-
function describeEffort({ agent: agent3 }) {
|
|
67206
|
-
const running = pickRunningModel({ agent: agent3 });
|
|
67207
|
-
if (agent3.effort) return effortLabelOf({ effort: agent3.effort });
|
|
67208
|
-
if (running && running.efforts.length === 0) return null;
|
|
67209
|
-
const fallback = running?.defaultEffort;
|
|
67210
|
-
return fallback ? `Default (${effortLabelOf({ effort: fallback })})` : "Default";
|
|
67211
|
-
}
|
|
67212
|
-
function contextLineOf({ agent: agent3 }) {
|
|
67213
|
-
const cap = contextCapOf({ agent: agent3 });
|
|
67214
|
-
if (agent3.harness === "laze-models") {
|
|
67215
|
-
const tokens = agent3.contextWindow ?? AGENT_CONTEXT_WINDOW.default;
|
|
67216
|
-
return `${tokensLabelOf({ tokens })}, up to ${tokensLabelOf({ tokens: cap.tokens })}`;
|
|
67217
|
-
}
|
|
67218
|
-
if (!cap.known) {
|
|
67219
|
-
return agent3.contextWindow ? `${tokensLabelOf({ tokens: agent3.contextWindow })}, or the model's window if smaller` : "The model's own window";
|
|
67220
|
-
}
|
|
67221
|
-
const set2 = agent3.contextWindow ? Math.min(agent3.contextWindow, cap.tokens) : null;
|
|
67222
|
-
if (!set2 || set2 === cap.tokens)
|
|
67223
|
-
return `${tokensLabelOf({ tokens: cap.tokens })}, the most this model takes`;
|
|
67224
|
-
return `${tokensLabelOf({ tokens: set2 })} of the ${tokensLabelOf({ tokens: cap.tokens })} this model takes`;
|
|
67225
|
-
}
|
|
67226
|
-
function agentRunSummaryOf({ agent: agent3 }) {
|
|
67227
|
-
return {
|
|
67228
|
-
model: modelLineOf({ agent: agent3 }),
|
|
67229
|
-
effort: describeEffort({ agent: agent3 }),
|
|
67230
|
-
context: contextLineOf({ agent: agent3 })
|
|
67231
|
-
};
|
|
67232
|
-
}
|
|
67233
|
-
|
|
67234
|
-
// ../../modules/agent/contract/src/agent-manage.ts
|
|
67235
|
-
var hostedHarnessSchema = external_exports.enum(["laze-models", "claude-code", "codex"]);
|
|
67236
|
-
var nameSchema = external_exports.string().trim().min(1).max(80);
|
|
67237
|
-
var descriptionSchema = external_exports.string().max(2e4);
|
|
67238
|
-
var agentRefSchema5 = external_exports.string().trim().min(1).max(80);
|
|
67239
|
-
var createAgentAsCallerInputSchemaDefinition = external_exports.object({
|
|
67240
|
-
name: nameSchema,
|
|
67241
|
-
/** What the agent is for; it becomes the agent's instructions. */
|
|
67242
|
-
description: descriptionSchema.default(""),
|
|
67243
|
-
harness: hostedHarnessSchema.default("laze-models"),
|
|
67244
|
-
avatar: agentAvatarInputSchema.default(""),
|
|
67245
|
-
/** A team agent belongs to the workspace; on Claude Code or Codex it needs `loginPoolId`. */
|
|
67246
|
-
kind: external_exports.enum(["personal", "team"]).default("personal"),
|
|
67247
|
-
/** The login pool's id or name, one the caller is a member of. */
|
|
67248
|
-
loginPoolId: external_exports.string().trim().min(1).max(200).optional()
|
|
67249
|
-
});
|
|
67250
|
-
var createdAgentSchemaDefinition = external_exports.object({
|
|
67251
|
-
agentId: external_exports.string(),
|
|
67252
|
-
name: external_exports.string(),
|
|
67253
|
-
harness: hostedHarnessSchema,
|
|
67254
|
-
ownerUserId: external_exports.string(),
|
|
67255
|
-
/** The owner's direct message with the new agent. */
|
|
67256
|
-
channelId: external_exports.string()
|
|
67257
|
-
});
|
|
67258
|
-
var updateAgentAsCallerInputSchemaDefinition = external_exports.strictObject({
|
|
67259
|
-
/** Left out, the agent whose key calls: `laze agent update --self`. */
|
|
67260
|
-
agent: agentRefSchema5.optional(),
|
|
67261
|
-
name: nameSchema.optional(),
|
|
67262
|
-
description: descriptionSchema.optional(),
|
|
67263
|
-
avatar: agentAvatarInputSchema.optional(),
|
|
67264
|
-
/** The max context of an agent Laze runs, in tokens, 100k to 1M; null for its default. */
|
|
67265
|
-
contextWindow: contextWindowInputSchema.nullable().optional(),
|
|
67266
|
-
/** The model its login lists, or null for the harness's default. */
|
|
67267
|
-
model: runModelInputSchema.optional(),
|
|
67268
|
-
/** The thinking level its model lists, or null for the model's default. */
|
|
67269
|
-
effort: runEffortInputSchema.optional(),
|
|
67270
|
-
/** Pauses or resumes an agent Laze runs. */
|
|
67271
|
-
paused: external_exports.boolean().optional(),
|
|
67272
|
-
pauseReason: external_exports.string().trim().max(200).optional()
|
|
67273
|
-
});
|
|
67274
|
-
var archiveAgentAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema5 });
|
|
67275
|
-
var uploadAvatarAsCallerInputSchemaDefinition = external_exports.object({
|
|
67276
|
-
contentType: external_exports.string().min(1).max(100),
|
|
67277
|
-
dataBase64: external_exports.string().min(1).max(Math.ceil(AGENT_AVATAR_PICK_MAX_BYTES * 4 / 3) + 8)
|
|
67278
|
-
});
|
|
67279
|
-
|
|
67280
67416
|
// ../../modules/agent/contract/src/agent-migration.ts
|
|
67281
67417
|
var workspaceIdSchema10 = external_exports.string().min(1);
|
|
67282
67418
|
var idSchema13 = external_exports.string().min(1).max(200);
|
|
@@ -67522,6 +67658,20 @@ var agentPermissionPromptSchemaDefinition = external_exports.object({
|
|
|
67522
67658
|
});
|
|
67523
67659
|
var agentPermissionPromptSchema = agentPermissionPromptSchemaDefinition;
|
|
67524
67660
|
|
|
67661
|
+
// ../../modules/agent/contract/src/agent-runs-on.ts
|
|
67662
|
+
var setRunsOnInputSchemaDefinition = external_exports.object({
|
|
67663
|
+
workspaceId: external_exports.string().min(1),
|
|
67664
|
+
/** The agent's id or, from the CLI, its name. */
|
|
67665
|
+
agentId: external_exports.string().min(1).max(200),
|
|
67666
|
+
harness: hostedHarnessSchema,
|
|
67667
|
+
/** The pool a Claude Code or Codex agent draws from, by id or name; null for its owner's. */
|
|
67668
|
+
poolId: external_exports.string().trim().min(1).max(200).nullable().default(null)
|
|
67669
|
+
});
|
|
67670
|
+
var setRunsOnInputSchema = setRunsOnInputSchemaDefinition;
|
|
67671
|
+
var setRunsOnAsCallerInputSchema = setRunsOnInputSchemaDefinition.omit({
|
|
67672
|
+
workspaceId: true
|
|
67673
|
+
});
|
|
67674
|
+
|
|
67525
67675
|
// ../../modules/agent/contract/src/agent-transfer.ts
|
|
67526
67676
|
var workspaceIdSchema12 = external_exports.string().min(1);
|
|
67527
67677
|
var idSchema15 = external_exports.string().min(1).max(200);
|
|
@@ -67564,6 +67714,21 @@ var agentTransferResolvedPayloadSchemaDefinition = external_exports.object({
|
|
|
67564
67714
|
resolvedByUserId: external_exports.string().min(1)
|
|
67565
67715
|
});
|
|
67566
67716
|
|
|
67717
|
+
// ../../modules/agent/contract/src/agent-welcome.ts
|
|
67718
|
+
var pressWelcomeInputSchemaDefinition = external_exports.object({
|
|
67719
|
+
workspaceId: external_exports.string().min(1),
|
|
67720
|
+
/** The welcome message the person pressed a button on. */
|
|
67721
|
+
messageId: external_exports.string().min(1),
|
|
67722
|
+
/** The one button that runs on the server: sends the slides request as the person. */
|
|
67723
|
+
action: external_exports.literal("slides")
|
|
67724
|
+
});
|
|
67725
|
+
var pressWelcomeInputSchema = pressWelcomeInputSchemaDefinition;
|
|
67726
|
+
var pressedWelcomeSchemaDefinition = external_exports.object({
|
|
67727
|
+
/** The person's message the button sent. */
|
|
67728
|
+
messageId: external_exports.string().min(1)
|
|
67729
|
+
});
|
|
67730
|
+
var pressedWelcomeSchema = pressedWelcomeSchemaDefinition;
|
|
67731
|
+
|
|
67567
67732
|
// ../../modules/agent/contract/src/agent-working.ts
|
|
67568
67733
|
var agentWorkingInputSchemaDefinition = external_exports.object({
|
|
67569
67734
|
workspaceId: external_exports.string().min(1),
|
|
@@ -67676,7 +67841,14 @@ var agentSchemaDefinition = external_exports.object({
|
|
|
67676
67841
|
avatar: external_exports.string().max(AGENT_AVATAR_MAX).default(""),
|
|
67677
67842
|
/** A Laze agent's SOUL.md. */
|
|
67678
67843
|
instructions: external_exports.string().default(""),
|
|
67844
|
+
/** A Laze models agent's level: the one picked, or what Default resolves to. */
|
|
67679
67845
|
modelLevel: agentModelLevelSchema.nullable().default(null),
|
|
67846
|
+
/** True when `modelLevel` is what Default resolves to, not a level someone picked. */
|
|
67847
|
+
isModelLevelDefault: external_exports.boolean().default(false),
|
|
67848
|
+
/** The workspace default level an admin set; null leaves Laze's own, Laze Frontier. */
|
|
67849
|
+
workspaceModelLevel: agentModelLevelSchema.nullable().default(null),
|
|
67850
|
+
/** Its login pool's default model for its harness; null without a pool or a default. */
|
|
67851
|
+
poolDefaultModel: poolDefaultModelSchema.nullable().default(null),
|
|
67680
67852
|
/** The max context of an agent Laze runs, in tokens; null for its default or a connected one. */
|
|
67681
67853
|
contextWindow: external_exports.number().int().positive().nullable().default(null),
|
|
67682
67854
|
/** The model a Claude Code or Codex agent runs; null for its harness's default. */
|
|
@@ -67742,7 +67914,8 @@ var updateAgentInputSchemaDefinition = external_exports.object({
|
|
|
67742
67914
|
agentId: idSchema17,
|
|
67743
67915
|
name: agentNameSchema.optional(),
|
|
67744
67916
|
avatar: agentAvatarInputSchema.optional(),
|
|
67745
|
-
|
|
67917
|
+
/** A Laze models agent's level; null puts it back on Default. */
|
|
67918
|
+
modelLevel: agentModelLevelSchema.nullable().optional(),
|
|
67746
67919
|
/** Agents Laze runs only; a connected agent refuses it. Null puts back the default. */
|
|
67747
67920
|
contextWindow: contextWindowInputSchema.nullable().optional(),
|
|
67748
67921
|
/** A model its login lists, or null for the harness's default; Claude Code and Codex only. */
|
|
@@ -68132,6 +68305,9 @@ var agentWorkspaceDefaultTrpc = defineTrpcContract("agents").query("workspaceDef
|
|
|
68132
68305
|
var agentRuntimeChoiceTrpc = defineTrpcContract("agents").query("lastRuntime").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(lastRuntimeSchema).build();
|
|
68133
68306
|
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();
|
|
68134
68307
|
var agentLangwatchTrpc = defineTrpcContract("agents").query("langwatchTracing").withInput(agentLangwatchInputSchema).withOutput(agentLangwatchTracingSchema).mutation("setLangwatchTracing").withInput(setAgentLangwatchInputSchema).withOutput(agentLangwatchTracingSchema).build();
|
|
68308
|
+
var agentPoolModelTrpc = defineTrpcContract("agents").mutation("setLoginPoolModel").withInput(setLoginPoolModelInputSchema).withOutput(loginPoolsSchema).build();
|
|
68309
|
+
var agentRunsOnTrpc = defineTrpcContract("agents").mutation("setRunsOn").withInput(setRunsOnInputSchema).withOutput(agentSchema).build();
|
|
68310
|
+
var agentWelcomeTrpc = defineTrpcContract("agents").mutation("pressWelcome").withInput(pressWelcomeInputSchema).withOutput(pressedWelcomeSchema).build();
|
|
68135
68311
|
var agentTrpc = joinTrpcContracts(
|
|
68136
68312
|
"agents",
|
|
68137
68313
|
agentCoreTrpc,
|
|
@@ -68143,7 +68319,10 @@ var agentTrpc = joinTrpcContracts(
|
|
|
68143
68319
|
agentWorkspaceDefaultTrpc,
|
|
68144
68320
|
agentRuntimeChoiceTrpc,
|
|
68145
68321
|
agentArchiveTrpc,
|
|
68146
|
-
agentMigrationTrpc
|
|
68322
|
+
agentMigrationTrpc,
|
|
68323
|
+
agentPoolModelTrpc,
|
|
68324
|
+
agentRunsOnTrpc,
|
|
68325
|
+
agentWelcomeTrpc
|
|
68147
68326
|
);
|
|
68148
68327
|
var agentUi = uiTokens("agent");
|
|
68149
68328
|
var AgentNavSlot = agentUi.component("nav");
|
|
@@ -68151,12 +68330,13 @@ var AgentAttentionCardSlot = agentUi.component("attentionCard");
|
|
|
68151
68330
|
var AgentComputerCardSlot = agentUi.component("computerCard");
|
|
68152
68331
|
var AgentLoginCardSlot = agentUi.component("loginCard");
|
|
68153
68332
|
var AgentBudgetCardSlot = agentUi.component("budgetCard");
|
|
68333
|
+
var AgentWelcomeCardSlot = agentUi.component("welcomeCard");
|
|
68154
68334
|
var AgentStopTurnSlot = agentUi.component("stopTurn");
|
|
68155
68335
|
var AgentLiveStepsSlot = agentUi.component("liveSteps");
|
|
68156
68336
|
var AgentCatchUpSlot = agentUi.component("catchUp");
|
|
68157
68337
|
var AgentSessionHooksToken = agentUi.hooks("session");
|
|
68158
68338
|
var AgentCreateDialogSlot = agentUi.component("createDialog");
|
|
68159
|
-
var
|
|
68339
|
+
var AgentRunsOnPickerSlot = agentUi.component("runsOnPicker");
|
|
68160
68340
|
var AgentEditDialogSlot = agentUi.component("editDialog");
|
|
68161
68341
|
var AgentFaceSlot = agentUi.component("face");
|
|
68162
68342
|
var AgentAccessSlot = agentUi.component("access");
|
|
@@ -68195,9 +68375,10 @@ var agentConfig = Config.define((c) => ({
|
|
|
68195
68375
|
"AGENT_CLAUDE_GATEWAY_MIDDLE",
|
|
68196
68376
|
external_exports.string().min(1).default("claude-sonnet-5-5")
|
|
68197
68377
|
),
|
|
68378
|
+
/** Laze Small: Sonnet 5.5, the small level (Haiku was too weak, Rogerio 2026-10-28). */
|
|
68198
68379
|
claudeGatewayFastModel: c.env(
|
|
68199
68380
|
"AGENT_CLAUDE_GATEWAY_FAST",
|
|
68200
|
-
external_exports.string().min(1).default("claude-
|
|
68381
|
+
external_exports.string().min(1).default("claude-sonnet-5-5")
|
|
68201
68382
|
),
|
|
68202
68383
|
/** `off` turns Claude Code's thinking off on Laze models, for a gateway lane that refuses it. */
|
|
68203
68384
|
claudeGatewayThinking: c.env(
|
|
@@ -68518,6 +68699,7 @@ var createChannelAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
68518
68699
|
name: external_exports.string().trim().min(1).max(80),
|
|
68519
68700
|
visibility: external_exports.enum(["public", "private"]).default("public"),
|
|
68520
68701
|
topic: external_exports.string().trim().max(250).default(""),
|
|
68702
|
+
/** Sent by older CLIs and ignored: new channels never end on their own. */
|
|
68521
68703
|
temporary: external_exports.enum(CALLER_CHANNEL_DURATIONS).optional()
|
|
68522
68704
|
});
|
|
68523
68705
|
var extendChannelAsCallerInputSchemaDefinition = external_exports.object({
|
|
@@ -68704,7 +68886,9 @@ var callerInviteManySchemaDefinition = external_exports.object({
|
|
|
68704
68886
|
/** Some invitations wait for Team (or for seats) before any email goes out. */
|
|
68705
68887
|
held: external_exports.boolean(),
|
|
68706
68888
|
/** The conversation they land in; null without `to`. */
|
|
68707
|
-
channelId: external_exports.string().nullable()
|
|
68889
|
+
channelId: external_exports.string().nullable(),
|
|
68890
|
+
/** When some wait: what the plan needs and who can act, said so an agent can pass it on. */
|
|
68891
|
+
planRequired: external_exports.string().nullable().default(null)
|
|
68708
68892
|
});
|
|
68709
68893
|
var callerRequestInvitesSchemaDefinition = external_exports.object({
|
|
68710
68894
|
requests: external_exports.array(callerAccessRequestSchemaDefinition),
|
|
@@ -69333,7 +69517,6 @@ import { mkdir as mkdir16, readFile as readFile16, writeFile as writeFile15 } fr
|
|
|
69333
69517
|
import { join as join17, resolve as resolve5 } from "node:path";
|
|
69334
69518
|
|
|
69335
69519
|
// src/rules/agent-profile.rules.ts
|
|
69336
|
-
var LEVELS = { fast: "Laze Fast", frontier: "Laze Frontier" };
|
|
69337
69520
|
var HARNESS_NAMES = {
|
|
69338
69521
|
"claude-code": "Claude Code",
|
|
69339
69522
|
codex: "Codex",
|
|
@@ -69348,7 +69531,7 @@ var HARNESS_NAMES = {
|
|
|
69348
69531
|
var PLANS = { "claude-code": "Claude", codex: "ChatGPT" };
|
|
69349
69532
|
var harnessName = (harness) => HARNESS_NAMES[harness] ?? harness;
|
|
69350
69533
|
function intelligenceOf({ agent: agent3, owner }) {
|
|
69351
|
-
if (agent3.harness === "laze-models") return
|
|
69534
|
+
if (agent3.harness === "laze-models") return modelLineOf({ agent: agent3 });
|
|
69352
69535
|
const plan2 = PLANS[agent3.harness];
|
|
69353
69536
|
if (!plan2 || agent3.hosting === "connected") return harnessName(agent3.harness);
|
|
69354
69537
|
if (agent3.loginPoolId) return `${harnessName(agent3.harness)} on a login pool`;
|
|
@@ -69395,6 +69578,7 @@ function agentProfileOf({
|
|
|
69395
69578
|
status: statusOf({ agent: agent3 }),
|
|
69396
69579
|
login: loginOf({ agent: agent3 }),
|
|
69397
69580
|
model: run4?.model ?? null,
|
|
69581
|
+
modelNote: run4 ? describeDefaultModelNote({ agent: agent3 }) ?? null : null,
|
|
69398
69582
|
effort: run4?.effort ?? null,
|
|
69399
69583
|
maxContext: run4?.context ?? null,
|
|
69400
69584
|
createdAt: agent3.createdAt.slice(0, 10),
|
|
@@ -69410,6 +69594,7 @@ function formatAgentProfile({ profile }) {
|
|
|
69410
69594
|
["Status", profile.status],
|
|
69411
69595
|
["Login", profile.login],
|
|
69412
69596
|
["Model", profile.model],
|
|
69597
|
+
["Model note", profile.modelNote],
|
|
69413
69598
|
["Thinking effort", profile.effort],
|
|
69414
69599
|
["Max context", profile.maxContext],
|
|
69415
69600
|
["Created", profile.createdAt],
|
|
@@ -69723,6 +69908,25 @@ var slackEmojiImportSchemaDefinition = external_exports.object({
|
|
|
69723
69908
|
});
|
|
69724
69909
|
var slackEmojiImportSchema = slackEmojiImportSchemaDefinition;
|
|
69725
69910
|
|
|
69911
|
+
// ../../modules/slack/contract/src/slack-invite.ts
|
|
69912
|
+
var slackInviteMemberSchemaDefinition = external_exports.object({
|
|
69913
|
+
kind: external_exports.enum(["person", "agent"]),
|
|
69914
|
+
id: external_exports.string().min(1),
|
|
69915
|
+
/** An agent's name, as chat's addMembers takes it. */
|
|
69916
|
+
name: external_exports.string().min(1).max(80).optional()
|
|
69917
|
+
});
|
|
69918
|
+
var slackInviteInputSchemaDefinition = external_exports.object({
|
|
69919
|
+
workspaceId: external_exports.string().min(1),
|
|
69920
|
+
/** The Laze conversation that mirrors the Slack channel. */
|
|
69921
|
+
channelId: external_exports.string().min(1),
|
|
69922
|
+
members: external_exports.array(slackInviteMemberSchemaDefinition).min(1).max(100),
|
|
69923
|
+
/** The sender's key: the line for `members[i]` carries `<key>-<i>`. */
|
|
69924
|
+
clientKey: external_exports.string().regex(/^[A-Za-z0-9_-]{8,48}$/).optional()
|
|
69925
|
+
});
|
|
69926
|
+
var slackInviteInputSchema = slackInviteInputSchemaDefinition;
|
|
69927
|
+
var slackInvitedSchemaDefinition = external_exports.object({ channelId: external_exports.string() });
|
|
69928
|
+
var slackInvitedSchema = slackInvitedSchemaDefinition;
|
|
69929
|
+
|
|
69726
69930
|
// ../../modules/slack/contract/src/slack-link-prompt.ts
|
|
69727
69931
|
var slackLinkPromptKindSchema = external_exports.enum(["connect", "relink"]);
|
|
69728
69932
|
var slackLinkPromptSchemaDefinition = external_exports.object({
|
|
@@ -69919,6 +70123,15 @@ var slackExternalPeopleSchemaDefinition = external_exports.object({
|
|
|
69919
70123
|
)
|
|
69920
70124
|
});
|
|
69921
70125
|
var slackExternalPeopleSchema = slackExternalPeopleSchemaDefinition;
|
|
70126
|
+
var slackExternalPeopleCountsInputSchemaDefinition = external_exports.object({
|
|
70127
|
+
workspaceId: external_exports.string().min(1),
|
|
70128
|
+
channelIds: external_exports.array(external_exports.string().min(1).max(64)).max(200)
|
|
70129
|
+
});
|
|
70130
|
+
var slackExternalPeopleCountsInputSchema = slackExternalPeopleCountsInputSchemaDefinition;
|
|
70131
|
+
var slackExternalPeopleCountsSchemaDefinition = external_exports.object({
|
|
70132
|
+
counts: external_exports.array(external_exports.object({ channelId: external_exports.string(), count: external_exports.number().int().nonnegative() }))
|
|
70133
|
+
});
|
|
70134
|
+
var slackExternalPeopleCountsSchema = slackExternalPeopleCountsSchemaDefinition;
|
|
69922
70135
|
|
|
69923
70136
|
// ../../modules/slack/contract/src/slack-setup.ts
|
|
69924
70137
|
var workspaceIdSchema16 = external_exports.string().min(1);
|
|
@@ -70252,7 +70465,9 @@ var slackFileParamsSchemaDefinition = external_exports.object({
|
|
|
70252
70465
|
fileId: external_exports.string().regex(/^F[A-Z0-9]{2,30}$/)
|
|
70253
70466
|
});
|
|
70254
70467
|
var slackFileQuerySchemaDefinition = external_exports.object({
|
|
70255
|
-
via: external_exports.string().min(1).max(200).optional()
|
|
70468
|
+
via: external_exports.string().min(1).max(200).optional(),
|
|
70469
|
+
/** "1" answers the file as a download of plain bytes, whatever its type. */
|
|
70470
|
+
download: external_exports.literal("1").optional()
|
|
70256
70471
|
});
|
|
70257
70472
|
var SLACK_SEARCH_QUERY_MIN = 2;
|
|
70258
70473
|
var SLACK_SEARCH_QUERY_MAX = 200;
|
|
@@ -70306,7 +70521,7 @@ var slackSearchAnswerSchemaDefinition = external_exports.object({
|
|
|
70306
70521
|
var slackSearchAnswerSchema = slackSearchAnswerSchemaDefinition;
|
|
70307
70522
|
var SlackApi = moduleApi()("slack");
|
|
70308
70523
|
var workspaceInput3 = external_exports.object({ workspaceId: workspaceIdSchema17 });
|
|
70309
|
-
var slackTrpc = defineTrpcContract("slack").query("overview").withInput(workspaceInput3).withOutput(slackOverviewSchema).mutation("startSetup").withInput(startSlackSetupInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("beginSetup").withInput(beginSlackSetupInputSchema).withOutput(slackSetupSchema).mutation("saveAppCredentials").withInput(saveSlackAppCredentialsInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("installApp").withInput(installSlackAppInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("startInstall").withInput(startSlackInstallInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("startLink").withInput(startSlackLinkInputSchema).withOutput(startedSlackAuthorizeSchema).query("channels").withInput(slackTeamInputSchema).withOutput(external_exports.array(slackChannelViewSchema)).mutation("setMirror").withInput(setSlackMirrorInputSchema).withOutput(slackConnectionViewSchema).mutation("updateConnection").withInput(updateSlackConnectionInputSchema).withOutput(slackConnectionViewSchema).mutation("disconnect").withInput(slackTeamInputSchema).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("unlink").withInput(slackTeamInputSchema).withOutput(slackConnectionViewSchema).query("linkPrompts").withInput(workspaceInput3).withOutput(slackLinkPromptsSchema).mutation("dismissLinkPrompt").withInput(dismissSlackLinkPromptInputSchema).withOutput(slackLinkPromptsSchema).query("people").withInput(slackPeopleInputSchema).withOutput(slackPeopleSchema).query("bookmarks").withInput(slackBookmarksInputSchema).withOutput(slackBookmarksSchema).query("profiles").withInput(slackProfilesInputSchema).withOutput(slackProfilesSchema).query("linkedNames").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(slackLinkedNamesSchema).query("externalPeople").withInput(slackExternalPeopleInputSchema).withOutput(slackExternalPeopleSchema).mutation("openDirect").withInput(openSlackDirectInputSchema).withOutput(openedSlackDirectSchema).mutation("updateApp").withInput(updateSlackAppInputSchema).withOutput(external_exports.object({ updated: external_exports.literal(true) })).query("history").withInput(slackHistoryInputSchema).withOutput(slackHistoryPageSchema).query("search").withInput(slackSearchInputSchema).withOutput(slackSearchAnswerSchema).query("movePreview").withInput(slackMoveChannelInputSchema).withOutput(slackMovePreviewSchema).mutation("startMoves").withInput(startSlackMovesInputSchema).withOutput(startedSlackMovesSchema).mutation("cancelMove").withInput(slackMoveInputSchema).withOutput(slackMoveViewSchema).query("moves").withInput(workspaceInput3).withOutput(slackMovesSchema).query("emojiSource").withInput(workspaceInput3).withOutput(slackEmojiSourceSchema).mutation("importEmoji").withInput(workspaceInput3).withOutput(slackEmojiImportSchema).build();
|
|
70524
|
+
var slackTrpc = defineTrpcContract("slack").query("overview").withInput(workspaceInput3).withOutput(slackOverviewSchema).mutation("startSetup").withInput(startSlackSetupInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("beginSetup").withInput(beginSlackSetupInputSchema).withOutput(slackSetupSchema).mutation("saveAppCredentials").withInput(saveSlackAppCredentialsInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("installApp").withInput(installSlackAppInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("startInstall").withInput(startSlackInstallInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("startLink").withInput(startSlackLinkInputSchema).withOutput(startedSlackAuthorizeSchema).query("channels").withInput(slackTeamInputSchema).withOutput(external_exports.array(slackChannelViewSchema)).mutation("setMirror").withInput(setSlackMirrorInputSchema).withOutput(slackConnectionViewSchema).mutation("updateConnection").withInput(updateSlackConnectionInputSchema).withOutput(slackConnectionViewSchema).mutation("disconnect").withInput(slackTeamInputSchema).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("unlink").withInput(slackTeamInputSchema).withOutput(slackConnectionViewSchema).query("linkPrompts").withInput(workspaceInput3).withOutput(slackLinkPromptsSchema).mutation("dismissLinkPrompt").withInput(dismissSlackLinkPromptInputSchema).withOutput(slackLinkPromptsSchema).query("people").withInput(slackPeopleInputSchema).withOutput(slackPeopleSchema).query("bookmarks").withInput(slackBookmarksInputSchema).withOutput(slackBookmarksSchema).query("profiles").withInput(slackProfilesInputSchema).withOutput(slackProfilesSchema).query("linkedNames").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(slackLinkedNamesSchema).query("externalPeople").withInput(slackExternalPeopleInputSchema).withOutput(slackExternalPeopleSchema).query("externalPeopleCounts").withInput(slackExternalPeopleCountsInputSchema).withOutput(slackExternalPeopleCountsSchema).mutation("openDirect").withInput(openSlackDirectInputSchema).withOutput(openedSlackDirectSchema).mutation("invite").withInput(slackInviteInputSchema).withOutput(slackInvitedSchema).mutation("updateApp").withInput(updateSlackAppInputSchema).withOutput(external_exports.object({ updated: external_exports.literal(true) })).query("history").withInput(slackHistoryInputSchema).withOutput(slackHistoryPageSchema).query("search").withInput(slackSearchInputSchema).withOutput(slackSearchAnswerSchema).query("movePreview").withInput(slackMoveChannelInputSchema).withOutput(slackMovePreviewSchema).mutation("startMoves").withInput(startSlackMovesInputSchema).withOutput(startedSlackMovesSchema).mutation("cancelMove").withInput(slackMoveInputSchema).withOutput(slackMoveViewSchema).query("moves").withInput(workspaceInput3).withOutput(slackMovesSchema).query("emojiSource").withInput(workspaceInput3).withOutput(slackEmojiSourceSchema).mutation("importEmoji").withInput(workspaceInput3).withOutput(slackEmojiImportSchema).build();
|
|
70310
70525
|
|
|
70311
70526
|
// ../../modules/slack/contract/src/slack-keys.ts
|
|
70312
70527
|
var SLACK_KEY_PATHS = {
|
|
@@ -71641,13 +71856,13 @@ async function listChannels({ context, args }) {
|
|
|
71641
71856
|
`);
|
|
71642
71857
|
}
|
|
71643
71858
|
}
|
|
71644
|
-
var
|
|
71859
|
+
var LEVELS = ["everything", "mentions"];
|
|
71645
71860
|
async function setChannelLevel({
|
|
71646
71861
|
context,
|
|
71647
71862
|
args
|
|
71648
71863
|
}) {
|
|
71649
71864
|
const [, , channel, level2] = args.words;
|
|
71650
|
-
const known =
|
|
71865
|
+
const known = LEVELS.find((candidate) => candidate === level2);
|
|
71651
71866
|
if (!channel || !known) {
|
|
71652
71867
|
throw new CliUsageError("Usage: laze channel set <channel> everything|mentions");
|
|
71653
71868
|
}
|
|
@@ -74640,6 +74855,11 @@ guide first: https://laze.so/docs/agents/apps.md. The short version:
|
|
|
74640
74855
|
- Create it where it was asked for, from the closest template (\`laze app templates\` lists
|
|
74641
74856
|
them): \`laze app create "<Name>" --template <template> --channel <channel>\`. The template is
|
|
74642
74857
|
the first live version, copied into a folder that is yours to change.
|
|
74858
|
+
- Templates are only for starting from nothing. Sent files that already are a page or a deck (an
|
|
74859
|
+
HTML export, a zip with index.html, a static site): unpack them as they are into a new app
|
|
74860
|
+
with no template (\`laze app create "<Name>" --channel <channel>\`), index.html at the top of
|
|
74861
|
+
its folder, then \`laze app push -m "<what it is>"\`. "Move them here" or "put this here" with
|
|
74862
|
+
an attachment means exactly that: do it, do not ask.
|
|
74643
74863
|
- Slides, a deck or a talk: start from \`laze app create <name> --template slides\`. Each slide
|
|
74644
74864
|
is a file in slides/, listed in order in slides/deck.json; the deck presents full screen and
|
|
74645
74865
|
exports PDF and HTML on its own.
|
|
@@ -75500,6 +75720,9 @@ function formatPool({ pool, nowMs }) {
|
|
|
75500
75720
|
` Members: ${pool.members.map((member) => `${member.name} (${member.role})`).join(", ") || "none"}`
|
|
75501
75721
|
);
|
|
75502
75722
|
lines2.push(` Agents: ${pool.agents.map((agent3) => agent3.name).join(", ") || "none"}`);
|
|
75723
|
+
for (const set2 of pool.defaultModels ?? []) {
|
|
75724
|
+
lines2.push(` Default model for ${HARNESS_NAMES2[set2.harness]}: ${set2.name || set2.model}`);
|
|
75725
|
+
}
|
|
75503
75726
|
return lines2.join("\n");
|
|
75504
75727
|
}
|
|
75505
75728
|
function formatOnePool({ pool, nowMs }) {
|
|
@@ -75610,6 +75833,18 @@ function runChangesOf({ args }) {
|
|
|
75610
75833
|
...effort !== void 0 && { effort }
|
|
75611
75834
|
};
|
|
75612
75835
|
}
|
|
75836
|
+
function poolDefaultNameOf({
|
|
75837
|
+
pools,
|
|
75838
|
+
pool,
|
|
75839
|
+
harness
|
|
75840
|
+
}) {
|
|
75841
|
+
const wanted = pool.trim().toLowerCase();
|
|
75842
|
+
const found = pools.pools.find(
|
|
75843
|
+
(one) => one.id === pool || one.name.trim().toLowerCase() === wanted
|
|
75844
|
+
);
|
|
75845
|
+
const set2 = found?.defaultModels.find((one) => one.harness === harness);
|
|
75846
|
+
return set2 ? set2.name || set2.model : void 0;
|
|
75847
|
+
}
|
|
75613
75848
|
function runLinesOf({ agent: agent3 }) {
|
|
75614
75849
|
if (agent3.hosting !== "laze") return [];
|
|
75615
75850
|
const summary = agentRunSummaryOf({ agent: agent3 });
|
|
@@ -75815,6 +76050,7 @@ async function resetAgentSession({
|
|
|
75815
76050
|
context.out(`Reset ${reset.name}'s session. Its next message starts a fresh one.
|
|
75816
76051
|
`);
|
|
75817
76052
|
}
|
|
76053
|
+
var HARNESS_WORDS = { "claude-code": "Claude Code", codex: "Codex" };
|
|
75818
76054
|
var PATHS = {
|
|
75819
76055
|
logins: "/api/agents/logins",
|
|
75820
76056
|
renameLogin: "/api/agents/logins/rename",
|
|
@@ -75829,6 +76065,8 @@ var PATHS = {
|
|
|
75829
76065
|
setPoolMember: "/api/agents/pools/members",
|
|
75830
76066
|
removePoolMember: "/api/agents/pools/members/remove",
|
|
75831
76067
|
setAgentPool: "/api/agents/pool",
|
|
76068
|
+
setRunsOn: "/api/agents/runs-on",
|
|
76069
|
+
setPoolModel: "/api/agents/pools/model",
|
|
75832
76070
|
loginActivity: "/api/agents/login-activity"
|
|
75833
76071
|
};
|
|
75834
76072
|
var LOGINS_HELP = `Usage: laze agent logins list|add|sign-in|rename|remove|check|history
|
|
@@ -75848,7 +76086,7 @@ var LOGINS_HELP = `Usage: laze agent logins list|add|sign-in|rename|remove|check
|
|
|
75848
76086
|
laze agent logins history <agent> [--json] the agent's login switches of 90 days,
|
|
75849
76087
|
and the login it moves to next once the one in use is at 80%
|
|
75850
76088
|
`;
|
|
75851
|
-
var POOLS_HELP = `Usage: laze agent pools list|create|rename|delete|add-login|remove-login|grant|revoke
|
|
76089
|
+
var POOLS_HELP = `Usage: laze agent pools list|create|rename|delete|add-login|remove-login|grant|revoke|set-model
|
|
75852
76090
|
|
|
75853
76091
|
laze agent pools list [--json] the pools you are in, every pool for admins
|
|
75854
76092
|
laze agent pools create <name> you become its manager
|
|
@@ -75861,10 +76099,28 @@ var POOLS_HELP = `Usage: laze agent pools list|create|rename|delete|add-login|re
|
|
|
75861
76099
|
laze agent pools remove-login <pool> <login> the login's contributor or a manager
|
|
75862
76100
|
laze agent pools grant <pool> <person> [--role member|manager] managers; a user id, email or name
|
|
75863
76101
|
laze agent pools revoke <pool> <person> managers; a user id, email or name
|
|
76102
|
+
laze agent pools set-model <pool> <model|none> [--harness claude-code|codex]
|
|
76103
|
+
managers and admins: what the pool's agents on Default run (Claude Code unless --harness)
|
|
75864
76104
|
`;
|
|
75865
76105
|
var SET_POOL_USAGE = `Usage: laze agent set-pool <agent> <pool|none>
|
|
75866
76106
|
Sets the pool a Claude Code or Codex agent draws its logins from; none goes back to its owner's own logins.
|
|
75867
76107
|
`;
|
|
76108
|
+
var RUNS_ON_USAGE = `Usage: laze agent runs-on <agent> laze|claude|codex [--pool <pool>]
|
|
76109
|
+
Moves an agent Laze runs to Laze models (Laze credits), or to Claude Code or Codex on your own
|
|
76110
|
+
logins or on a pool you are in. A move to another runtime starts a new session on its next turn.
|
|
76111
|
+
`;
|
|
76112
|
+
var RUNTIMES = {
|
|
76113
|
+
laze: "laze-models",
|
|
76114
|
+
"laze-models": "laze-models",
|
|
76115
|
+
claude: "claude-code",
|
|
76116
|
+
"claude-code": "claude-code",
|
|
76117
|
+
codex: "codex"
|
|
76118
|
+
};
|
|
76119
|
+
var RUNTIME_NAMES = {
|
|
76120
|
+
"laze-models": "Laze models",
|
|
76121
|
+
"claude-code": "Claude Code",
|
|
76122
|
+
codex: "Codex"
|
|
76123
|
+
};
|
|
75868
76124
|
var LOGIN_HARNESSES = /* @__PURE__ */ new Set(["claude-code", "codex"]);
|
|
75869
76125
|
var ROLES = /* @__PURE__ */ new Set(["member", "manager"]);
|
|
75870
76126
|
var SECRET_FLAGS = ["token", "secret", "value", "auth"];
|
|
@@ -76130,6 +76386,26 @@ var POOL_ACTIONS = {
|
|
|
76130
76386
|
printPools(step, pools, `${step.second} is now a ${role2} of ${step.first}.`);
|
|
76131
76387
|
}
|
|
76132
76388
|
},
|
|
76389
|
+
"set-model": {
|
|
76390
|
+
words: 2,
|
|
76391
|
+
run: async (step) => {
|
|
76392
|
+
const harness = flagText({ args: step.args, name: "harness", fallback: "claude-code" });
|
|
76393
|
+
if (harness !== "claude-code" && harness !== "codex") throw new CliUsageError(POOLS_HELP);
|
|
76394
|
+
const model = step.second.trim().toLowerCase() === "none" ? null : step.second.trim();
|
|
76395
|
+
const pools = await step.client.post(PATHS.setPoolModel, {
|
|
76396
|
+
poolId: step.first,
|
|
76397
|
+
harness,
|
|
76398
|
+
model
|
|
76399
|
+
});
|
|
76400
|
+
const named = HARNESS_WORDS[harness];
|
|
76401
|
+
const set2 = poolDefaultNameOf({ pools, pool: step.first, harness });
|
|
76402
|
+
printPools(
|
|
76403
|
+
step,
|
|
76404
|
+
pools,
|
|
76405
|
+
set2 ? `Default model for ${named} on ${step.first}: ${set2}.` : `${step.first} has no default model for ${named}: its agents run their own default.`
|
|
76406
|
+
);
|
|
76407
|
+
}
|
|
76408
|
+
},
|
|
76133
76409
|
revoke: {
|
|
76134
76410
|
words: 2,
|
|
76135
76411
|
run: async (step) => {
|
|
@@ -76186,6 +76462,35 @@ async function setAgentPool({
|
|
|
76186
76462
|
);
|
|
76187
76463
|
});
|
|
76188
76464
|
}
|
|
76465
|
+
async function setAgentRunsOn({
|
|
76466
|
+
context,
|
|
76467
|
+
args
|
|
76468
|
+
}) {
|
|
76469
|
+
const [, , agent3, runtime] = args.words;
|
|
76470
|
+
const harness = runtime ? RUNTIMES[runtime.toLowerCase()] : void 0;
|
|
76471
|
+
const pool = typeof args.flags.pool === "string" ? args.flags.pool : null;
|
|
76472
|
+
if (!agent3 || !harness || pool && harness === "laze-models") {
|
|
76473
|
+
throw new CliUsageError(RUNS_ON_USAGE);
|
|
76474
|
+
}
|
|
76475
|
+
const { client } = await signedIn({ context, args });
|
|
76476
|
+
return refusing(context, async () => {
|
|
76477
|
+
const agents = await client.get("/api/agents");
|
|
76478
|
+
const wanted = agent3.toLowerCase();
|
|
76479
|
+
const before = agents.find((one) => one.id === agent3 || one.name.toLowerCase() === wanted);
|
|
76480
|
+
const updated = await client.post(PATHS.setRunsOn, {
|
|
76481
|
+
agentId: agent3,
|
|
76482
|
+
harness,
|
|
76483
|
+
poolId: pool
|
|
76484
|
+
});
|
|
76485
|
+
if (args.flags.json) return context.out(`${JSON.stringify(updated, null, 2)}
|
|
76486
|
+
`);
|
|
76487
|
+
const own2 = harness === "laze-models" ? "" : " on your own logins";
|
|
76488
|
+
const where = pool ? ` on ${pool}` : own2;
|
|
76489
|
+
const fresh = before?.harness !== harness ? " It starts a new session on its next turn." : "";
|
|
76490
|
+
context.out(`${updated.name} runs on ${RUNTIME_NAMES[harness]}${where}.${fresh}
|
|
76491
|
+
`);
|
|
76492
|
+
});
|
|
76493
|
+
}
|
|
76189
76494
|
|
|
76190
76495
|
// src/services/agent-migrate-commands.service.ts
|
|
76191
76496
|
import { readFile as readFile18, stat as stat7 } from "node:fs/promises";
|
|
@@ -76282,8 +76587,19 @@ function transcriptPartsOf({
|
|
|
76282
76587
|
return { parts: kept.slice(-maxParts), truncated: true };
|
|
76283
76588
|
}
|
|
76284
76589
|
|
|
76590
|
+
// src/rules/model-level.rules.ts
|
|
76591
|
+
function wireLevelOf({ text: text3 }) {
|
|
76592
|
+
const word3 = text3.trim().toLowerCase();
|
|
76593
|
+
if (word3 === "small" || word3 === "fast") return "fast";
|
|
76594
|
+
if (word3 === "frontier") return "frontier";
|
|
76595
|
+
return void 0;
|
|
76596
|
+
}
|
|
76597
|
+
function levelWordOf({ level: level2 }) {
|
|
76598
|
+
return level2 === "fast" ? "small" : level2;
|
|
76599
|
+
}
|
|
76600
|
+
|
|
76285
76601
|
// src/services/agent-migrate-commands.service.ts
|
|
76286
|
-
var MIGRATE_USAGE = `laze agent migrate <agent> [--to claude-code|codex|laze-models] [--level
|
|
76602
|
+
var MIGRATE_USAGE = `laze agent migrate <agent> [--to claude-code|codex|laze-models] [--level small|frontier] [--resend]
|
|
76287
76603
|
move your connected Claude Code or Codex agent into Laze, as the same agent: its own session
|
|
76288
76604
|
uploads its conversation with secrets removed, then Laze runs it; --to picks where it runs
|
|
76289
76605
|
(its own harness when left out), --level the Laze models level, --resend asks its session again
|
|
@@ -76295,7 +76611,6 @@ laze agent migrate upload <migrationId> --transcript <file.jsonl> [--profile <ag
|
|
|
76295
76611
|
OpenClaw agent's main session; one over the cap starts at its last compaction
|
|
76296
76612
|
`;
|
|
76297
76613
|
var TARGETS = /* @__PURE__ */ new Set(["claude-code", "codex", "laze-models"]);
|
|
76298
|
-
var LEVELS3 = /* @__PURE__ */ new Set(["fast", "frontier"]);
|
|
76299
76614
|
var HARNESS_NAMES3 = {
|
|
76300
76615
|
"claude-code": "Claude Code",
|
|
76301
76616
|
codex: "Codex",
|
|
@@ -76306,7 +76621,7 @@ var FILE_NAME2 = /^[A-Za-z0-9._-]{1,200}\.jsonl$/;
|
|
|
76306
76621
|
var quoted = (value) => /^[\w.@:+-]+$/.test(value) ? value : `"${value.replaceAll('"', '\\"')}"`;
|
|
76307
76622
|
function targetOf(migration) {
|
|
76308
76623
|
const name3 = HARNESS_NAMES3[migration.target] ?? migration.target;
|
|
76309
|
-
return migration.modelLevel ? `${name3}, ${migration.modelLevel}` : name3;
|
|
76624
|
+
return migration.modelLevel ? `${name3}, ${levelWordOf({ level: migration.modelLevel })}` : name3;
|
|
76310
76625
|
}
|
|
76311
76626
|
function modeLine(migration) {
|
|
76312
76627
|
return migration.mode === "resume" ? "Laze resumes that same session" : "Laze starts a fresh session from a summary of it";
|
|
@@ -76319,8 +76634,9 @@ function agentOf({ args, usage }) {
|
|
|
76319
76634
|
async function migrate({ context, args }) {
|
|
76320
76635
|
const agent3 = args.words[2] ?? "";
|
|
76321
76636
|
const harness = flagText({ args, name: "to" });
|
|
76322
|
-
const
|
|
76323
|
-
const
|
|
76637
|
+
const levelText = flagText({ args, name: "level" });
|
|
76638
|
+
const level2 = levelText ? wireLevelOf({ text: levelText }) : void 0;
|
|
76639
|
+
const known = (!harness || TARGETS.has(harness)) && (!levelText || level2);
|
|
76324
76640
|
if (!agent3 || !known) {
|
|
76325
76641
|
throw new CliUsageError(`Usage: ${MIGRATE_USAGE}`);
|
|
76326
76642
|
}
|
|
@@ -76833,6 +77149,33 @@ var publishLeaseSchemaDefinition = external_exports.object({
|
|
|
76833
77149
|
grantedAt: external_exports.iso.datetime()
|
|
76834
77150
|
});
|
|
76835
77151
|
var publishLeaseSchema = publishLeaseSchemaDefinition;
|
|
77152
|
+
var appSharedWithSchemaDefinition = external_exports.object({
|
|
77153
|
+
type: external_exports.enum(["user", "agent"]),
|
|
77154
|
+
id: external_exports.string().min(1),
|
|
77155
|
+
name: external_exports.string(),
|
|
77156
|
+
/** A person's picture, or an agent's uploaded one; null draws initials or a sloth. */
|
|
77157
|
+
image: external_exports.string().nullable(),
|
|
77158
|
+
/** An agent's sloth seed; null for people and pictures. */
|
|
77159
|
+
seed: external_exports.string().nullable()
|
|
77160
|
+
});
|
|
77161
|
+
var appPlaceSchemaDefinition = external_exports.object({
|
|
77162
|
+
kind: external_exports.enum(["channel", "conversation", "agent"]),
|
|
77163
|
+
/** The conversation's id. */
|
|
77164
|
+
id: external_exports.string().min(1),
|
|
77165
|
+
/** The channel's name, the other people in a conversation, or the agent's name. */
|
|
77166
|
+
name: external_exports.string(),
|
|
77167
|
+
/** The agent of a chat, drawn as its face; null for channels and conversations. */
|
|
77168
|
+
face: appSharedWithSchemaDefinition.nullable()
|
|
77169
|
+
});
|
|
77170
|
+
var appSharingSchemaDefinition = external_exports.object({
|
|
77171
|
+
/** The owner first, then direct shares; at most five. Empty for workspace and public apps. */
|
|
77172
|
+
people: external_exports.array(appSharedWithSchemaDefinition).max(5),
|
|
77173
|
+
/** People and agents shared with beyond those listed. */
|
|
77174
|
+
more: external_exports.number().int().nonnegative(),
|
|
77175
|
+
/** The app's channel or channel shares, then its pins; only conversations the reader is in. */
|
|
77176
|
+
places: external_exports.array(appPlaceSchemaDefinition)
|
|
77177
|
+
});
|
|
77178
|
+
var appSharingSchema = appSharingSchemaDefinition;
|
|
76836
77179
|
var appSchemaDefinition = external_exports.object({
|
|
76837
77180
|
id: external_exports.string().min(1),
|
|
76838
77181
|
workspaceId: external_exports.string().min(1),
|
|
@@ -76864,6 +77207,10 @@ var appSchemaDefinition = external_exports.object({
|
|
|
76864
77207
|
templateName: external_exports.string().nullable().optional(),
|
|
76865
77208
|
/** That template's version when the app was made, so a later version can be offered. */
|
|
76866
77209
|
templateVersion: external_exports.number().int().positive().nullable().optional(),
|
|
77210
|
+
/** Who it is shared with; only the app list fills it. */
|
|
77211
|
+
sharing: appSharingSchema.optional(),
|
|
77212
|
+
/** The live version's screenshot, behind the app's own access; null until one is taken. */
|
|
77213
|
+
previewUrl: external_exports.string().nullable().optional(),
|
|
76867
77214
|
createdAt: external_exports.iso.datetime(),
|
|
76868
77215
|
updatedAt: external_exports.iso.datetime()
|
|
76869
77216
|
});
|
|
@@ -78058,6 +78405,17 @@ var appBackupCheckAlertsSchemaDefinition = external_exports.object({
|
|
|
78058
78405
|
adminUserIds: external_exports.array(external_exports.string())
|
|
78059
78406
|
});
|
|
78060
78407
|
|
|
78408
|
+
// ../../modules/app/contract/src/app.previews.ts
|
|
78409
|
+
var appPreviewRefSchemaDefinition = external_exports.object({
|
|
78410
|
+
workspaceId: external_exports.string().min(1).max(64),
|
|
78411
|
+
appId: external_exports.string().min(1).max(64),
|
|
78412
|
+
version: appVersionIdSchema
|
|
78413
|
+
});
|
|
78414
|
+
var appPreviewRequestedPayloadSchemaDefinition = external_exports.object({
|
|
78415
|
+
...appPreviewRefSchemaDefinition.shape,
|
|
78416
|
+
requestId: external_exports.string().min(1)
|
|
78417
|
+
});
|
|
78418
|
+
|
|
78061
78419
|
// ../../modules/app/contract/src/app.templates.ts
|
|
78062
78420
|
var APP_TEMPLATE_SOURCES = ["laze"];
|
|
78063
78421
|
var templateCollectionsSchema = external_exports.record(
|
|
@@ -78574,7 +78932,13 @@ var appConfig = Config.define((c) => ({
|
|
|
78574
78932
|
),
|
|
78575
78933
|
domain: appsDomain,
|
|
78576
78934
|
/** The progress board's alerts folder; unset, an app over its limits is only logged. */
|
|
78577
|
-
opsAlertDir: c.env("APP_OPS_ALERT_DIR", external_exports.string().min(1).optional())
|
|
78935
|
+
opsAlertDir: c.env("APP_OPS_ALERT_DIR", external_exports.string().min(1).optional()),
|
|
78936
|
+
/** The headless Chromium that screenshots apps; unset, no previews are taken. */
|
|
78937
|
+
previewChromium: c.env("APP_PREVIEW_CHROMIUM", external_exports.string().min(1).optional()),
|
|
78938
|
+
/** Where the capture reaches app origins: the local nginx, so a capture never leaves the box. */
|
|
78939
|
+
previewAddress: c.env("APP_PREVIEW_ADDRESS", external_exports.string().min(1).default("127.0.0.1")),
|
|
78940
|
+
/** "1" runs Chromium without its own sandbox, only where it runs as root (tests); never prod. */
|
|
78941
|
+
previewNoSandbox: c.env("APP_PREVIEW_NO_SANDBOX", external_exports.enum(["0", "1"]).default("0"))
|
|
78578
78942
|
}));
|
|
78579
78943
|
|
|
78580
78944
|
// src/rules/app-build.rules.ts
|
|
@@ -82244,8 +82608,7 @@ function roleChangedLine({
|
|
|
82244
82608
|
`;
|
|
82245
82609
|
}
|
|
82246
82610
|
function createdLine({ detail }) {
|
|
82247
|
-
|
|
82248
|
-
return `Created ${channelLabelOf(detail)} (${detail.id}), ${detail.kind}${ends}.
|
|
82611
|
+
return `Created ${channelLabelOf(detail)} (${detail.id}), ${detail.kind}.
|
|
82249
82612
|
`;
|
|
82250
82613
|
}
|
|
82251
82614
|
function extendedLine({ detail }) {
|
|
@@ -82414,17 +82777,13 @@ async function channelRole({
|
|
|
82414
82777
|
}
|
|
82415
82778
|
});
|
|
82416
82779
|
}
|
|
82417
|
-
var CREATE_USAGE2 = "Usage: laze channel create <name> [--private] [--topic <text>]
|
|
82780
|
+
var CREATE_USAGE2 = "Usage: laze channel create <name> [--private] [--topic <text>]";
|
|
82418
82781
|
async function channelCreate({
|
|
82419
82782
|
context,
|
|
82420
82783
|
args
|
|
82421
82784
|
}) {
|
|
82422
82785
|
const name3 = args.words[2];
|
|
82423
|
-
|
|
82424
|
-
const duration3 = CALLER_CHANNEL_DURATIONS.find((candidate) => candidate === temporary);
|
|
82425
|
-
if (!name3 || args.flags.temporary !== void 0 && !duration3) {
|
|
82426
|
-
throw new CliUsageError(CREATE_USAGE2);
|
|
82427
|
-
}
|
|
82786
|
+
if (!name3) throw new CliUsageError(CREATE_USAGE2);
|
|
82428
82787
|
const { client, profile } = await signedIn({ context, args });
|
|
82429
82788
|
return changing({
|
|
82430
82789
|
context,
|
|
@@ -82433,8 +82792,7 @@ async function channelCreate({
|
|
|
82433
82792
|
const detail = await client.post("/api/agents/me/channels/create", {
|
|
82434
82793
|
name: name3.replace(/^#/, ""),
|
|
82435
82794
|
visibility: args.flags.private ? "private" : "public",
|
|
82436
|
-
topic: flagText({ args, name: "topic" })
|
|
82437
|
-
...duration3 ? { temporary: duration3 } : {}
|
|
82795
|
+
topic: flagText({ args, name: "topic" })
|
|
82438
82796
|
});
|
|
82439
82797
|
if (args.flags.json) return context.out(`${JSON.stringify(detail, null, 2)}
|
|
82440
82798
|
`);
|
|
@@ -82505,7 +82863,7 @@ async function activityRead({ context, args }) {
|
|
|
82505
82863
|
|
|
82506
82864
|
// src/services/channel-config-commands.service.ts
|
|
82507
82865
|
var AGENT_HINT2 = "Roles, archiving and removing others are a channel admin's change: ask one.\n";
|
|
82508
|
-
var
|
|
82866
|
+
var LEVELS2 = ["default", "all", "mentions", "nothing", "mute", "unmute"];
|
|
82509
82867
|
async function changing2({
|
|
82510
82868
|
context,
|
|
82511
82869
|
profile,
|
|
@@ -82691,7 +83049,7 @@ function instantOf({ until }) {
|
|
|
82691
83049
|
}
|
|
82692
83050
|
function notifyBodyOf({ args }) {
|
|
82693
83051
|
const [, , channel, word3] = args.words;
|
|
82694
|
-
const level2 =
|
|
83052
|
+
const level2 = LEVELS2.find((candidate) => candidate === word3);
|
|
82695
83053
|
if (!channel || !level2) throw new CliUsageError(NOTIFY_USAGE);
|
|
82696
83054
|
if (level2 === "unmute") return { channel, muted: false };
|
|
82697
83055
|
if (level2 !== "mute") return { channel, level: level2 };
|
|
@@ -83886,7 +84244,7 @@ var inviteQuoteDefinition = external_exports.object({
|
|
|
83886
84244
|
plan: planSchema,
|
|
83887
84245
|
currency: currencySchema,
|
|
83888
84246
|
rule: teamPricingRuleSchema,
|
|
83889
|
-
/** Members plus
|
|
84247
|
+
/** Members plus open invitations: held ones on a paid Team, emailed ones otherwise. */
|
|
83890
84248
|
people: external_exports.number().int().nonnegative(),
|
|
83891
84249
|
peopleAfter: external_exports.number().int().nonnegative(),
|
|
83892
84250
|
/** What the workspace pays a month now: 0 on Free or a complimentary Team. */
|
|
@@ -83895,7 +84253,9 @@ var inviteQuoteDefinition = external_exports.object({
|
|
|
83895
84253
|
perPersonAfter: external_exports.number().nonnegative(),
|
|
83896
84254
|
/** Seats Team's first step still includes after the invite ("1 free seat left"); 0 when none. */
|
|
83897
84255
|
freeSeatsLeft: external_exports.number().int().nonnegative().default(0),
|
|
83898
|
-
/**
|
|
84256
|
+
/** More people Free still holds before Team, emailed invitations counted; 0 off Free. */
|
|
84257
|
+
freeInvitesLeft: external_exports.number().int().nonnegative().default(0),
|
|
84258
|
+
/** Free past its people, or a Team not paid for: inviting starts Team through Checkout. */
|
|
83899
84259
|
upgradeNeeded: external_exports.boolean(),
|
|
83900
84260
|
/** A live paid Team: the new people are added to the subscription, prorated, as they join. */
|
|
83901
84261
|
prorated: external_exports.boolean(),
|
|
@@ -85854,7 +86214,26 @@ var judgeStatus = async ({ context, args }) => {
|
|
|
85854
86214
|
status11.configured ? "Automatic approval is on: Laze checks each Auto use against the key's rules.\n" : "Automatic approval is switched off: every Auto use waits for your OK.\n"
|
|
85855
86215
|
);
|
|
85856
86216
|
};
|
|
86217
|
+
var renameDevice = async ({ context, args }) => {
|
|
86218
|
+
const deviceId = args.words[3];
|
|
86219
|
+
const label3 = args.words.slice(4).join(" ").trim();
|
|
86220
|
+
if (!deviceId || !label3) {
|
|
86221
|
+
throw new CliUsageError("Usage: laze vault devices rename <deviceId> <name>");
|
|
86222
|
+
}
|
|
86223
|
+
if (label3.length > VAULT_DEVICE_NAME_MAX) {
|
|
86224
|
+
throw new CliUsageError(`A device name is at most ${VAULT_DEVICE_NAME_MAX} characters.`);
|
|
86225
|
+
}
|
|
86226
|
+
const { client } = await signedIn({ context, args });
|
|
86227
|
+
const device = await client.post("/api/vault/devices/rename", { deviceId, label: label3 });
|
|
86228
|
+
if (args.flags.json) return printJson4({ context, data: device });
|
|
86229
|
+
context.out(`Renamed ${device.id} to ${device.label}.
|
|
86230
|
+
`);
|
|
86231
|
+
};
|
|
85857
86232
|
var listDevices = async ({ context, args }) => {
|
|
86233
|
+
if (args.words[2] === "rename") return renameDevice({ context, args });
|
|
86234
|
+
if (args.words[2] !== void 0) {
|
|
86235
|
+
throw new CliUsageError("Usage: laze vault devices [rename <deviceId> <name>]");
|
|
86236
|
+
}
|
|
85858
86237
|
const { client } = await signedIn({ context, args });
|
|
85859
86238
|
const devices = await client.get("/api/vault/devices");
|
|
85860
86239
|
if (args.flags.json) return printJson4({ context, data: devices });
|
|
@@ -85956,8 +86335,9 @@ var VAULT_USAGE = `Usage (your own key; an agent's key lists and runs its owner'
|
|
|
85956
86335
|
laze vault audit|activity [--connection <c>] [--limit <n>] [--before <seq>] (audit: admins)
|
|
85957
86336
|
laze vault most-asked [--days <n>] (admins)
|
|
85958
86337
|
laze vault approvals [--state pending] cards you answer; answer them in Laze
|
|
85959
|
-
laze vault judge | laze vault devices
|
|
85960
|
-
|
|
86338
|
+
laze vault judge | laze vault devices
|
|
86339
|
+
laze vault devices rename <deviceId> <name>`;
|
|
86340
|
+
function levelOf2(args) {
|
|
85961
86341
|
const level2 = flagText({ args, name: "level" });
|
|
85962
86342
|
if (!level2) return void 0;
|
|
85963
86343
|
const known = vaultLevelOfCliName(level2);
|
|
@@ -86014,7 +86394,7 @@ function settingsOf(args) {
|
|
|
86014
86394
|
const rules = args.flags.rules;
|
|
86015
86395
|
return {
|
|
86016
86396
|
...label3 && { label: label3 },
|
|
86017
|
-
...
|
|
86397
|
+
...levelOf2(args) && { sensitivity: levelOf2(args) },
|
|
86018
86398
|
...typeof rules === "string" && { rules },
|
|
86019
86399
|
...approvers && { approverUserIds: [...approvers] },
|
|
86020
86400
|
...lease && { maxLeaseSeconds: lease === "none" ? null : secondsOf(lease) },
|
|
@@ -86047,7 +86427,7 @@ var add3 = async ({ context, args }) => {
|
|
|
86047
86427
|
const created = await client.post("/api/vault/connections", {
|
|
86048
86428
|
name: name3,
|
|
86049
86429
|
keychain: await keychainOf2({ client, args }),
|
|
86050
|
-
sensitivity:
|
|
86430
|
+
sensitivity: levelOf2(args) ?? "checked",
|
|
86051
86431
|
...settingsOf(args),
|
|
86052
86432
|
secret
|
|
86053
86433
|
});
|
|
@@ -86257,7 +86637,7 @@ var start = async ({ context, args, client }) => {
|
|
|
86257
86637
|
const provider = wordAt2(args, 2);
|
|
86258
86638
|
const name3 = flagText({ args, name: "name" });
|
|
86259
86639
|
const again = flagText({ args, name: "again" });
|
|
86260
|
-
const level2 =
|
|
86640
|
+
const level2 = levelOf2(args);
|
|
86261
86641
|
const started = await client.post(CONNECTOR_KEY_PATHS.start, {
|
|
86262
86642
|
provider,
|
|
86263
86643
|
keychain: await keychainOf2({ client, args }),
|
|
@@ -86304,7 +86684,7 @@ async function addServer({
|
|
|
86304
86684
|
const label3 = flagText({ args, name: "label" });
|
|
86305
86685
|
if (!name3 || !label3) throw new CliUsageError(CONNECTOR_USAGE);
|
|
86306
86686
|
const again = flagText({ args, name: "again" });
|
|
86307
|
-
const level2 =
|
|
86687
|
+
const level2 = levelOf2(args);
|
|
86308
86688
|
const added = await client.post(CONNECTOR_KEY_PATHS.mcpAdd, {
|
|
86309
86689
|
serverUrl,
|
|
86310
86690
|
name: name3,
|
|
@@ -87387,6 +87767,15 @@ var rosterDefinition = external_exports.object({
|
|
|
87387
87767
|
var externalRosterSchema = rosterDefinition;
|
|
87388
87768
|
var rosterInputDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, channelId: idSchema24 });
|
|
87389
87769
|
var externalRosterInputSchema = rosterInputDefinition;
|
|
87770
|
+
var rosterCountsInputDefinition = external_exports.object({
|
|
87771
|
+
workspaceId: workspaceIdSchema25,
|
|
87772
|
+
channelIds: external_exports.array(idSchema24).max(200)
|
|
87773
|
+
});
|
|
87774
|
+
var externalRosterCountsInputSchema = rosterCountsInputDefinition;
|
|
87775
|
+
var rosterCountsDefinition = external_exports.object({
|
|
87776
|
+
counts: external_exports.array(external_exports.object({ channelId: external_exports.string(), count: external_exports.number().int().nonnegative() }))
|
|
87777
|
+
});
|
|
87778
|
+
var externalRosterCountsSchema = rosterCountsDefinition;
|
|
87390
87779
|
var inviteInputDefinition = external_exports.object({
|
|
87391
87780
|
workspaceId: workspaceIdSchema25,
|
|
87392
87781
|
email: external_exports.email().max(320),
|
|
@@ -87492,7 +87881,7 @@ var directDefinition = external_exports.object({
|
|
|
87492
87881
|
});
|
|
87493
87882
|
var externalDirectSchema = directDefinition;
|
|
87494
87883
|
var ExternalConnectionApi = moduleApi()("external-connection");
|
|
87495
|
-
var externalConnectionTrpc = defineTrpcContract("externalConnection").query("overview").withInput(workspaceInput5).withOutput(externalOverviewSchema).query("roster").withInput(externalRosterInputSchema).withOutput(externalRosterSchema).query("myInvitations").withInput(workspaceInput5).withOutput(external_exports.array(externalInvitationSchema)).mutation("invite").withInput(externalInviteInputSchema).withOutput(externalSentInviteSchema).mutation("revokeInvite").withInput(externalInviteRefSchema).withOutput(externalSentInviteSchema).mutation("resendInvite").withInput(externalInviteRefSchema).withOutput(externalSentInviteSchema).query("pendingShares").withInput(workspaceInput5).withOutput(externalPendingSharesSchema).mutation("acceptInvite").withInput(externalAcceptInviteInputSchema).withOutput(externalConnectionSchema).mutation("declineInvite").withInput(externalInviteRefSchema).withOutput(externalInviteAnsweredSchema).mutation("forwardInvite").withInput(externalInviteRefSchema).withOutput(externalInviteAnsweredSchema).mutation("disconnect").withInput(externalConnectionInputSchema).withOutput(externalConnectionSchema).mutation("updateSettings").withInput(externalSettingsInputSchema).withOutput(externalConnectionSchema).mutation("shareChannel").withInput(externalShareInputSchema).withOutput(externalSharedChannelSchema).mutation("acceptShare").withInput(externalAcceptShareInputSchema).withOutput(externalSharedChannelSchema).mutation("declineShare").withInput(externalShareRefSchema).withOutput(externalSharedChannelSchema).mutation("stopSharing").withInput(externalShareRefSchema).withOutput(externalSharedChannelSchema).mutation("block").withInput(externalConnectionInputSchema).withOutput(externalBlockedSchema).mutation("report").withInput(externalReportInputSchema).withOutput(externalBlockedSchema).mutation("openDirect").withInput(externalOpenDirectInputSchema).withOutput(externalDirectSchema).build();
|
|
87884
|
+
var externalConnectionTrpc = defineTrpcContract("externalConnection").query("overview").withInput(workspaceInput5).withOutput(externalOverviewSchema).query("roster").withInput(externalRosterInputSchema).withOutput(externalRosterSchema).query("rosterCounts").withInput(externalRosterCountsInputSchema).withOutput(externalRosterCountsSchema).query("myInvitations").withInput(workspaceInput5).withOutput(external_exports.array(externalInvitationSchema)).mutation("invite").withInput(externalInviteInputSchema).withOutput(externalSentInviteSchema).mutation("revokeInvite").withInput(externalInviteRefSchema).withOutput(externalSentInviteSchema).mutation("resendInvite").withInput(externalInviteRefSchema).withOutput(externalSentInviteSchema).query("pendingShares").withInput(workspaceInput5).withOutput(externalPendingSharesSchema).mutation("acceptInvite").withInput(externalAcceptInviteInputSchema).withOutput(externalConnectionSchema).mutation("declineInvite").withInput(externalInviteRefSchema).withOutput(externalInviteAnsweredSchema).mutation("forwardInvite").withInput(externalInviteRefSchema).withOutput(externalInviteAnsweredSchema).mutation("disconnect").withInput(externalConnectionInputSchema).withOutput(externalConnectionSchema).mutation("updateSettings").withInput(externalSettingsInputSchema).withOutput(externalConnectionSchema).mutation("shareChannel").withInput(externalShareInputSchema).withOutput(externalSharedChannelSchema).mutation("acceptShare").withInput(externalAcceptShareInputSchema).withOutput(externalSharedChannelSchema).mutation("declineShare").withInput(externalShareRefSchema).withOutput(externalSharedChannelSchema).mutation("stopSharing").withInput(externalShareRefSchema).withOutput(externalSharedChannelSchema).mutation("block").withInput(externalConnectionInputSchema).withOutput(externalBlockedSchema).mutation("report").withInput(externalReportInputSchema).withOutput(externalBlockedSchema).mutation("openDirect").withInput(externalOpenDirectInputSchema).withOutput(externalDirectSchema).build();
|
|
87496
87885
|
|
|
87497
87886
|
// ../../modules/external-connection/contract/src/external-connection.config.ts
|
|
87498
87887
|
var externalConnectionConfig = Config.define(() => ({ publicBaseUrl }));
|
|
@@ -88536,7 +88925,7 @@ var feedApprovalSchemaDefinition = external_exports.object({
|
|
|
88536
88925
|
why: external_exports.string(),
|
|
88537
88926
|
/** The longest lease Allow for this agent may give; null offers only once and deny. */
|
|
88538
88927
|
maxLeaseSeconds: external_exports.number().int().positive().nullable(),
|
|
88539
|
-
/** A vault card whose Allow covers the rest of the agent's turn
|
|
88928
|
+
/** A vault card whose "Allow once" covers the rest of the agent's turn. */
|
|
88540
88929
|
coversTask: external_exports.boolean().optional(),
|
|
88541
88930
|
/** A vault card whose key wants a device: Allow goes through a passkey, Touch ID or Face ID. */
|
|
88542
88931
|
deviceApproval: external_exports.boolean().optional(),
|
|
@@ -90017,6 +90406,9 @@ function inviteQuoteText(quote4) {
|
|
|
90017
90406
|
const at = (amount) => money2({ amount, currency: quote4.currency });
|
|
90018
90407
|
const people2 = `${quote4.peopleAfter} ${quote4.peopleAfter === 1 ? "person" : "people"}`;
|
|
90019
90408
|
const seats = quote4.freeSeatsLeft ? ` ${quote4.freeSeatsLeft} free ${quote4.freeSeatsLeft === 1 ? "seat" : "seats"} left.` : "";
|
|
90409
|
+
if (quote4.plan === "free" && !quote4.upgradeNeeded) {
|
|
90410
|
+
return "Free for up to 2 people, at no charge.\n";
|
|
90411
|
+
}
|
|
90020
90412
|
if (quote4.seatCap !== null && !quote4.upgradeNeeded) {
|
|
90021
90413
|
return `Your plan holds ${quote4.seatCap} people, at no charge.
|
|
90022
90414
|
`;
|
|
@@ -90046,6 +90438,12 @@ function inviteInput(args) {
|
|
|
90046
90438
|
const to = typeof args.flags.to === "string" ? args.flags.to : void 0;
|
|
90047
90439
|
return { emails, role: role2, ...to ? { to } : {}, confirmed: true };
|
|
90048
90440
|
}
|
|
90441
|
+
function heldLine(sent) {
|
|
90442
|
+
const held = sent.invites.filter((one) => one.status === "held").length;
|
|
90443
|
+
const emailed = sent.invites.length - held;
|
|
90444
|
+
const saved3 = `Saved ${held} ${held === 1 ? "invitation" : "invitations"} for Team: Free holds 2 people.`;
|
|
90445
|
+
return emailed > 0 ? `Invited ${emailed}. ${saved3}` : saved3;
|
|
90446
|
+
}
|
|
90049
90447
|
function refusedLines(refused) {
|
|
90050
90448
|
const why = { invalid: "not an email address", duplicate: "listed twice", member: "already in" };
|
|
90051
90449
|
return refused.map((one) => `Left out ${one.email}: ${why[one.reason]}.
|
|
@@ -90091,13 +90489,13 @@ async function invite3({ context, args }) {
|
|
|
90091
90489
|
returnPath
|
|
90092
90490
|
});
|
|
90093
90491
|
context.out(
|
|
90094
|
-
|
|
90492
|
+
`${heldLine(sent)} Open this link to upgrade to Team; they go out once it is paid: ${url2}
|
|
90095
90493
|
`
|
|
90096
90494
|
);
|
|
90097
90495
|
} catch (error63) {
|
|
90098
90496
|
if (!(error63 instanceof LazeApiError) || error63.status !== 403) throw error63;
|
|
90099
90497
|
context.out(
|
|
90100
|
-
|
|
90498
|
+
`${heldLine(sent)} An admin has to upgrade the workspace to Team (laze billing checkout) before they go out.
|
|
90101
90499
|
`
|
|
90102
90500
|
);
|
|
90103
90501
|
}
|
|
@@ -91750,12 +92148,27 @@ async function memory({ context, args }) {
|
|
|
91750
92148
|
var WINDOWS = ["day", "week", "month"];
|
|
91751
92149
|
var USAGE13 = `Usage:
|
|
91752
92150
|
laze models policy whether Laze models are on, the default budget and the cap
|
|
91753
|
-
laze models set-policy [on|off] [--default-day <usd|none>] [--cap-day <usd|none>] ... (admins)
|
|
92151
|
+
laze models set-policy [on|off] [--default-level small|frontier|none] [--default-day <usd|none>] [--cap-day <usd|none>] ... (admins)
|
|
92152
|
+
--default-level sets what agents on Default run (none: Laze Frontier, Laze's default)
|
|
91754
92153
|
--default-week, --default-month, --cap-week and --cap-month set the other windows
|
|
91755
92154
|
laze models agents each Laze-model agent's budget and spend
|
|
91756
92155
|
laze models budget <agent> [--day <usd|none>] [--week <usd|none>] [--month <usd|none>]
|
|
91757
92156
|
the agent's owner or an admin, up to the cap; never an agent's own key
|
|
91758
92157
|
laze models spend the workspace's spend per window, agent and channel`;
|
|
92158
|
+
var LEVEL_LINES = {
|
|
92159
|
+
fast: "Laze Small (Sonnet 5.5)",
|
|
92160
|
+
frontier: "Laze Frontier (Opus 5.5)",
|
|
92161
|
+
none: "Laze Frontier (Opus 5.5), Laze's default"
|
|
92162
|
+
};
|
|
92163
|
+
function levelFrom({ args }) {
|
|
92164
|
+
const text3 = flagText({ args, name: "default-level" });
|
|
92165
|
+
if (!text3) return void 0;
|
|
92166
|
+
if (text3 === "none") return null;
|
|
92167
|
+
const level2 = wireLevelOf({ text: text3 });
|
|
92168
|
+
if (level2) return level2;
|
|
92169
|
+
throw new CliUsageError(`--default-level takes small, frontier or none.
|
|
92170
|
+
${USAGE13}`);
|
|
92171
|
+
}
|
|
91759
92172
|
var usd = (value) => `${Number(value.toFixed(2))} USD`;
|
|
91760
92173
|
var limitsLine = (limits) => WINDOWS.map(
|
|
91761
92174
|
(window2) => `${window2} ${limits[window2] === null ? "none" : usd(limits[window2])}`
|
|
@@ -91783,6 +92196,8 @@ function printPolicy(context, policy) {
|
|
|
91783
92196
|
const state = policy.lazeModels ? "on" : "off";
|
|
91784
92197
|
const available = policy.available ? "" : " (not set up on this server)";
|
|
91785
92198
|
context.out(`Laze models: ${state}${available}
|
|
92199
|
+
`);
|
|
92200
|
+
context.out(`Default level: ${LEVEL_LINES[policy.defaultLevel ?? "none"]}
|
|
91786
92201
|
`);
|
|
91787
92202
|
context.out(`Default budget per agent: ${limitsLine(policy.defaultBudget)}
|
|
91788
92203
|
`);
|
|
@@ -91803,9 +92218,12 @@ async function setPolicy({ context, args }) {
|
|
|
91803
92218
|
const current3 = await client.get("/api/models/policy");
|
|
91804
92219
|
const defaultBudget = limitsFrom({ args, prefix: "default-", current: current3.defaultBudget });
|
|
91805
92220
|
const cap = limitsFrom({ args, prefix: "cap-", current: current3.cap });
|
|
91806
|
-
|
|
92221
|
+
const defaultLevel = levelFrom({ args });
|
|
92222
|
+
if (!state && !defaultBudget && !cap && defaultLevel === void 0)
|
|
92223
|
+
throw new CliUsageError(USAGE13);
|
|
91807
92224
|
const updated = await client.post("/api/models/policy", {
|
|
91808
92225
|
...state ? { lazeModels: state === "on" } : {},
|
|
92226
|
+
...defaultLevel !== void 0 ? { defaultLevel } : {},
|
|
91809
92227
|
...defaultBudget ? { defaultBudget } : {},
|
|
91810
92228
|
...cap ? { cap } : {}
|
|
91811
92229
|
});
|
|
@@ -95370,7 +95788,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95370
95788
|
laze channel members <channel> its people and agents, each an Admin or a Member
|
|
95371
95789
|
laze channel info <channel> its topic, members and your own setting there (agents)
|
|
95372
95790
|
laze channel role <channel> <member> admin|member change a channel role (channel admins, people)
|
|
95373
|
-
laze channel create <name> [--private] [--topic <t>]
|
|
95791
|
+
laze channel create <name> [--private] [--topic <t>] a new channel (people)
|
|
95374
95792
|
laze channel extend <channel> 1d|3d|7d|permanent keep a temporary channel longer (channel admins)
|
|
95375
95793
|
laze channel browse the channels you may join, joined or not, archived marked
|
|
95376
95794
|
laze channel join|leave <channel> join a channel, or leave one (people)
|
|
@@ -95460,8 +95878,9 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95460
95878
|
laze agent reset-session <agent> stop its turn; its next message starts a fresh session
|
|
95461
95879
|
laze agent default [<agent> | --clear] the workspace default agent; an Admin picks a team agent
|
|
95462
95880
|
laze agent logins list|add|rename|remove|check|history your Claude and Codex logins; a token is read from stdin only
|
|
95463
|
-
laze agent pools list|create|rename|delete|add-login|remove-login|grant|revoke shared login pools
|
|
95881
|
+
laze agent pools list|create|rename|delete|add-login|remove-login|grant|revoke|set-model shared login pools
|
|
95464
95882
|
laze agent set-pool <agent> <pool|none> the pool a Claude Code or Codex agent draws its logins from
|
|
95883
|
+
laze agent runs-on <agent> laze|claude|codex [--pool <pool>] moves it to Laze credits, Claude Code or Codex
|
|
95465
95884
|
laze agent access|dm|disconnect <agent> who can talk to it, your conversation with it, revoke its key
|
|
95466
95885
|
laze agent permission-prompts <agent> each permission prompt its harness raised and rush's answer
|
|
95467
95886
|
laze agent share|unshare <agent> --person <userId> | --channel <channelId> share it (its owner)
|
|
@@ -95471,7 +95890,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95471
95890
|
without --name the agent picks its own
|
|
95472
95891
|
laze agent invite --reconnect <agent> a link that connects one of your agents again with a new key,
|
|
95473
95892
|
a migrated one back on its own machine
|
|
95474
|
-
laze agent migrate <agent> [--to claude-code|codex|laze-models] [--level
|
|
95893
|
+
laze agent migrate <agent> [--to claude-code|codex|laze-models] [--level small|frontier] [--resend]
|
|
95475
95894
|
move your connected agent into Laze as the same agent; its session uploads its conversation, secrets removed
|
|
95476
95895
|
laze agent migrate status|cancel <agent> the latest migration, or cancel one still waiting
|
|
95477
95896
|
laze agent migrate upload <migrationId> run inside the agent's own session: hands its transcript to Laze
|
|
@@ -95732,6 +96151,7 @@ var COMMANDS3 = {
|
|
|
95732
96151
|
"agent logins": agentLogins,
|
|
95733
96152
|
"agent pools": agentPools,
|
|
95734
96153
|
"agent set-pool": setAgentPool,
|
|
96154
|
+
"agent runs-on": setAgentRunsOn,
|
|
95735
96155
|
notifications,
|
|
95736
96156
|
roles,
|
|
95737
96157
|
audit,
|