@lazehq/cli 0.1.72 → 0.1.73
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 +640 -235
- 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.73";
|
|
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({
|
|
@@ -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(
|
|
@@ -69333,7 +69514,6 @@ import { mkdir as mkdir16, readFile as readFile16, writeFile as writeFile15 } fr
|
|
|
69333
69514
|
import { join as join17, resolve as resolve5 } from "node:path";
|
|
69334
69515
|
|
|
69335
69516
|
// src/rules/agent-profile.rules.ts
|
|
69336
|
-
var LEVELS = { fast: "Laze Fast", frontier: "Laze Frontier" };
|
|
69337
69517
|
var HARNESS_NAMES = {
|
|
69338
69518
|
"claude-code": "Claude Code",
|
|
69339
69519
|
codex: "Codex",
|
|
@@ -69348,7 +69528,7 @@ var HARNESS_NAMES = {
|
|
|
69348
69528
|
var PLANS = { "claude-code": "Claude", codex: "ChatGPT" };
|
|
69349
69529
|
var harnessName = (harness) => HARNESS_NAMES[harness] ?? harness;
|
|
69350
69530
|
function intelligenceOf({ agent: agent3, owner }) {
|
|
69351
|
-
if (agent3.harness === "laze-models") return
|
|
69531
|
+
if (agent3.harness === "laze-models") return modelLineOf({ agent: agent3 });
|
|
69352
69532
|
const plan2 = PLANS[agent3.harness];
|
|
69353
69533
|
if (!plan2 || agent3.hosting === "connected") return harnessName(agent3.harness);
|
|
69354
69534
|
if (agent3.loginPoolId) return `${harnessName(agent3.harness)} on a login pool`;
|
|
@@ -69395,6 +69575,7 @@ function agentProfileOf({
|
|
|
69395
69575
|
status: statusOf({ agent: agent3 }),
|
|
69396
69576
|
login: loginOf({ agent: agent3 }),
|
|
69397
69577
|
model: run4?.model ?? null,
|
|
69578
|
+
modelNote: run4 ? describeDefaultModelNote({ agent: agent3 }) ?? null : null,
|
|
69398
69579
|
effort: run4?.effort ?? null,
|
|
69399
69580
|
maxContext: run4?.context ?? null,
|
|
69400
69581
|
createdAt: agent3.createdAt.slice(0, 10),
|
|
@@ -69410,6 +69591,7 @@ function formatAgentProfile({ profile }) {
|
|
|
69410
69591
|
["Status", profile.status],
|
|
69411
69592
|
["Login", profile.login],
|
|
69412
69593
|
["Model", profile.model],
|
|
69594
|
+
["Model note", profile.modelNote],
|
|
69413
69595
|
["Thinking effort", profile.effort],
|
|
69414
69596
|
["Max context", profile.maxContext],
|
|
69415
69597
|
["Created", profile.createdAt],
|
|
@@ -69723,6 +69905,25 @@ var slackEmojiImportSchemaDefinition = external_exports.object({
|
|
|
69723
69905
|
});
|
|
69724
69906
|
var slackEmojiImportSchema = slackEmojiImportSchemaDefinition;
|
|
69725
69907
|
|
|
69908
|
+
// ../../modules/slack/contract/src/slack-invite.ts
|
|
69909
|
+
var slackInviteMemberSchemaDefinition = external_exports.object({
|
|
69910
|
+
kind: external_exports.enum(["person", "agent"]),
|
|
69911
|
+
id: external_exports.string().min(1),
|
|
69912
|
+
/** An agent's name, as chat's addMembers takes it. */
|
|
69913
|
+
name: external_exports.string().min(1).max(80).optional()
|
|
69914
|
+
});
|
|
69915
|
+
var slackInviteInputSchemaDefinition = external_exports.object({
|
|
69916
|
+
workspaceId: external_exports.string().min(1),
|
|
69917
|
+
/** The Laze conversation that mirrors the Slack channel. */
|
|
69918
|
+
channelId: external_exports.string().min(1),
|
|
69919
|
+
members: external_exports.array(slackInviteMemberSchemaDefinition).min(1).max(100),
|
|
69920
|
+
/** The sender's key: the line for `members[i]` carries `<key>-<i>`. */
|
|
69921
|
+
clientKey: external_exports.string().regex(/^[A-Za-z0-9_-]{8,48}$/).optional()
|
|
69922
|
+
});
|
|
69923
|
+
var slackInviteInputSchema = slackInviteInputSchemaDefinition;
|
|
69924
|
+
var slackInvitedSchemaDefinition = external_exports.object({ channelId: external_exports.string() });
|
|
69925
|
+
var slackInvitedSchema = slackInvitedSchemaDefinition;
|
|
69926
|
+
|
|
69726
69927
|
// ../../modules/slack/contract/src/slack-link-prompt.ts
|
|
69727
69928
|
var slackLinkPromptKindSchema = external_exports.enum(["connect", "relink"]);
|
|
69728
69929
|
var slackLinkPromptSchemaDefinition = external_exports.object({
|
|
@@ -69919,6 +70120,15 @@ var slackExternalPeopleSchemaDefinition = external_exports.object({
|
|
|
69919
70120
|
)
|
|
69920
70121
|
});
|
|
69921
70122
|
var slackExternalPeopleSchema = slackExternalPeopleSchemaDefinition;
|
|
70123
|
+
var slackExternalPeopleCountsInputSchemaDefinition = external_exports.object({
|
|
70124
|
+
workspaceId: external_exports.string().min(1),
|
|
70125
|
+
channelIds: external_exports.array(external_exports.string().min(1).max(64)).max(200)
|
|
70126
|
+
});
|
|
70127
|
+
var slackExternalPeopleCountsInputSchema = slackExternalPeopleCountsInputSchemaDefinition;
|
|
70128
|
+
var slackExternalPeopleCountsSchemaDefinition = external_exports.object({
|
|
70129
|
+
counts: external_exports.array(external_exports.object({ channelId: external_exports.string(), count: external_exports.number().int().nonnegative() }))
|
|
70130
|
+
});
|
|
70131
|
+
var slackExternalPeopleCountsSchema = slackExternalPeopleCountsSchemaDefinition;
|
|
69922
70132
|
|
|
69923
70133
|
// ../../modules/slack/contract/src/slack-setup.ts
|
|
69924
70134
|
var workspaceIdSchema16 = external_exports.string().min(1);
|
|
@@ -70306,7 +70516,7 @@ var slackSearchAnswerSchemaDefinition = external_exports.object({
|
|
|
70306
70516
|
var slackSearchAnswerSchema = slackSearchAnswerSchemaDefinition;
|
|
70307
70517
|
var SlackApi = moduleApi()("slack");
|
|
70308
70518
|
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();
|
|
70519
|
+
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
70520
|
|
|
70311
70521
|
// ../../modules/slack/contract/src/slack-keys.ts
|
|
70312
70522
|
var SLACK_KEY_PATHS = {
|
|
@@ -71641,13 +71851,13 @@ async function listChannels({ context, args }) {
|
|
|
71641
71851
|
`);
|
|
71642
71852
|
}
|
|
71643
71853
|
}
|
|
71644
|
-
var
|
|
71854
|
+
var LEVELS = ["everything", "mentions"];
|
|
71645
71855
|
async function setChannelLevel({
|
|
71646
71856
|
context,
|
|
71647
71857
|
args
|
|
71648
71858
|
}) {
|
|
71649
71859
|
const [, , channel, level2] = args.words;
|
|
71650
|
-
const known =
|
|
71860
|
+
const known = LEVELS.find((candidate) => candidate === level2);
|
|
71651
71861
|
if (!channel || !known) {
|
|
71652
71862
|
throw new CliUsageError("Usage: laze channel set <channel> everything|mentions");
|
|
71653
71863
|
}
|
|
@@ -75500,6 +75710,9 @@ function formatPool({ pool, nowMs }) {
|
|
|
75500
75710
|
` Members: ${pool.members.map((member) => `${member.name} (${member.role})`).join(", ") || "none"}`
|
|
75501
75711
|
);
|
|
75502
75712
|
lines2.push(` Agents: ${pool.agents.map((agent3) => agent3.name).join(", ") || "none"}`);
|
|
75713
|
+
for (const set2 of pool.defaultModels ?? []) {
|
|
75714
|
+
lines2.push(` Default model for ${HARNESS_NAMES2[set2.harness]}: ${set2.name || set2.model}`);
|
|
75715
|
+
}
|
|
75503
75716
|
return lines2.join("\n");
|
|
75504
75717
|
}
|
|
75505
75718
|
function formatOnePool({ pool, nowMs }) {
|
|
@@ -75610,6 +75823,18 @@ function runChangesOf({ args }) {
|
|
|
75610
75823
|
...effort !== void 0 && { effort }
|
|
75611
75824
|
};
|
|
75612
75825
|
}
|
|
75826
|
+
function poolDefaultNameOf({
|
|
75827
|
+
pools,
|
|
75828
|
+
pool,
|
|
75829
|
+
harness
|
|
75830
|
+
}) {
|
|
75831
|
+
const wanted = pool.trim().toLowerCase();
|
|
75832
|
+
const found = pools.pools.find(
|
|
75833
|
+
(one) => one.id === pool || one.name.trim().toLowerCase() === wanted
|
|
75834
|
+
);
|
|
75835
|
+
const set2 = found?.defaultModels.find((one) => one.harness === harness);
|
|
75836
|
+
return set2 ? set2.name || set2.model : void 0;
|
|
75837
|
+
}
|
|
75613
75838
|
function runLinesOf({ agent: agent3 }) {
|
|
75614
75839
|
if (agent3.hosting !== "laze") return [];
|
|
75615
75840
|
const summary = agentRunSummaryOf({ agent: agent3 });
|
|
@@ -75815,6 +76040,7 @@ async function resetAgentSession({
|
|
|
75815
76040
|
context.out(`Reset ${reset.name}'s session. Its next message starts a fresh one.
|
|
75816
76041
|
`);
|
|
75817
76042
|
}
|
|
76043
|
+
var HARNESS_WORDS = { "claude-code": "Claude Code", codex: "Codex" };
|
|
75818
76044
|
var PATHS = {
|
|
75819
76045
|
logins: "/api/agents/logins",
|
|
75820
76046
|
renameLogin: "/api/agents/logins/rename",
|
|
@@ -75829,6 +76055,8 @@ var PATHS = {
|
|
|
75829
76055
|
setPoolMember: "/api/agents/pools/members",
|
|
75830
76056
|
removePoolMember: "/api/agents/pools/members/remove",
|
|
75831
76057
|
setAgentPool: "/api/agents/pool",
|
|
76058
|
+
setRunsOn: "/api/agents/runs-on",
|
|
76059
|
+
setPoolModel: "/api/agents/pools/model",
|
|
75832
76060
|
loginActivity: "/api/agents/login-activity"
|
|
75833
76061
|
};
|
|
75834
76062
|
var LOGINS_HELP = `Usage: laze agent logins list|add|sign-in|rename|remove|check|history
|
|
@@ -75848,7 +76076,7 @@ var LOGINS_HELP = `Usage: laze agent logins list|add|sign-in|rename|remove|check
|
|
|
75848
76076
|
laze agent logins history <agent> [--json] the agent's login switches of 90 days,
|
|
75849
76077
|
and the login it moves to next once the one in use is at 80%
|
|
75850
76078
|
`;
|
|
75851
|
-
var POOLS_HELP = `Usage: laze agent pools list|create|rename|delete|add-login|remove-login|grant|revoke
|
|
76079
|
+
var POOLS_HELP = `Usage: laze agent pools list|create|rename|delete|add-login|remove-login|grant|revoke|set-model
|
|
75852
76080
|
|
|
75853
76081
|
laze agent pools list [--json] the pools you are in, every pool for admins
|
|
75854
76082
|
laze agent pools create <name> you become its manager
|
|
@@ -75861,10 +76089,28 @@ var POOLS_HELP = `Usage: laze agent pools list|create|rename|delete|add-login|re
|
|
|
75861
76089
|
laze agent pools remove-login <pool> <login> the login's contributor or a manager
|
|
75862
76090
|
laze agent pools grant <pool> <person> [--role member|manager] managers; a user id, email or name
|
|
75863
76091
|
laze agent pools revoke <pool> <person> managers; a user id, email or name
|
|
76092
|
+
laze agent pools set-model <pool> <model|none> [--harness claude-code|codex]
|
|
76093
|
+
managers and admins: what the pool's agents on Default run (Claude Code unless --harness)
|
|
75864
76094
|
`;
|
|
75865
76095
|
var SET_POOL_USAGE = `Usage: laze agent set-pool <agent> <pool|none>
|
|
75866
76096
|
Sets the pool a Claude Code or Codex agent draws its logins from; none goes back to its owner's own logins.
|
|
75867
76097
|
`;
|
|
76098
|
+
var RUNS_ON_USAGE = `Usage: laze agent runs-on <agent> laze|claude|codex [--pool <pool>]
|
|
76099
|
+
Moves an agent Laze runs to Laze models (Laze credits), or to Claude Code or Codex on your own
|
|
76100
|
+
logins or on a pool you are in. A move to another runtime starts a new session on its next turn.
|
|
76101
|
+
`;
|
|
76102
|
+
var RUNTIMES = {
|
|
76103
|
+
laze: "laze-models",
|
|
76104
|
+
"laze-models": "laze-models",
|
|
76105
|
+
claude: "claude-code",
|
|
76106
|
+
"claude-code": "claude-code",
|
|
76107
|
+
codex: "codex"
|
|
76108
|
+
};
|
|
76109
|
+
var RUNTIME_NAMES = {
|
|
76110
|
+
"laze-models": "Laze models",
|
|
76111
|
+
"claude-code": "Claude Code",
|
|
76112
|
+
codex: "Codex"
|
|
76113
|
+
};
|
|
75868
76114
|
var LOGIN_HARNESSES = /* @__PURE__ */ new Set(["claude-code", "codex"]);
|
|
75869
76115
|
var ROLES = /* @__PURE__ */ new Set(["member", "manager"]);
|
|
75870
76116
|
var SECRET_FLAGS = ["token", "secret", "value", "auth"];
|
|
@@ -76130,6 +76376,26 @@ var POOL_ACTIONS = {
|
|
|
76130
76376
|
printPools(step, pools, `${step.second} is now a ${role2} of ${step.first}.`);
|
|
76131
76377
|
}
|
|
76132
76378
|
},
|
|
76379
|
+
"set-model": {
|
|
76380
|
+
words: 2,
|
|
76381
|
+
run: async (step) => {
|
|
76382
|
+
const harness = flagText({ args: step.args, name: "harness", fallback: "claude-code" });
|
|
76383
|
+
if (harness !== "claude-code" && harness !== "codex") throw new CliUsageError(POOLS_HELP);
|
|
76384
|
+
const model = step.second.trim().toLowerCase() === "none" ? null : step.second.trim();
|
|
76385
|
+
const pools = await step.client.post(PATHS.setPoolModel, {
|
|
76386
|
+
poolId: step.first,
|
|
76387
|
+
harness,
|
|
76388
|
+
model
|
|
76389
|
+
});
|
|
76390
|
+
const named = HARNESS_WORDS[harness];
|
|
76391
|
+
const set2 = poolDefaultNameOf({ pools, pool: step.first, harness });
|
|
76392
|
+
printPools(
|
|
76393
|
+
step,
|
|
76394
|
+
pools,
|
|
76395
|
+
set2 ? `Default model for ${named} on ${step.first}: ${set2}.` : `${step.first} has no default model for ${named}: its agents run their own default.`
|
|
76396
|
+
);
|
|
76397
|
+
}
|
|
76398
|
+
},
|
|
76133
76399
|
revoke: {
|
|
76134
76400
|
words: 2,
|
|
76135
76401
|
run: async (step) => {
|
|
@@ -76186,6 +76452,35 @@ async function setAgentPool({
|
|
|
76186
76452
|
);
|
|
76187
76453
|
});
|
|
76188
76454
|
}
|
|
76455
|
+
async function setAgentRunsOn({
|
|
76456
|
+
context,
|
|
76457
|
+
args
|
|
76458
|
+
}) {
|
|
76459
|
+
const [, , agent3, runtime] = args.words;
|
|
76460
|
+
const harness = runtime ? RUNTIMES[runtime.toLowerCase()] : void 0;
|
|
76461
|
+
const pool = typeof args.flags.pool === "string" ? args.flags.pool : null;
|
|
76462
|
+
if (!agent3 || !harness || pool && harness === "laze-models") {
|
|
76463
|
+
throw new CliUsageError(RUNS_ON_USAGE);
|
|
76464
|
+
}
|
|
76465
|
+
const { client } = await signedIn({ context, args });
|
|
76466
|
+
return refusing(context, async () => {
|
|
76467
|
+
const agents = await client.get("/api/agents");
|
|
76468
|
+
const wanted = agent3.toLowerCase();
|
|
76469
|
+
const before = agents.find((one) => one.id === agent3 || one.name.toLowerCase() === wanted);
|
|
76470
|
+
const updated = await client.post(PATHS.setRunsOn, {
|
|
76471
|
+
agentId: agent3,
|
|
76472
|
+
harness,
|
|
76473
|
+
poolId: pool
|
|
76474
|
+
});
|
|
76475
|
+
if (args.flags.json) return context.out(`${JSON.stringify(updated, null, 2)}
|
|
76476
|
+
`);
|
|
76477
|
+
const own2 = harness === "laze-models" ? "" : " on your own logins";
|
|
76478
|
+
const where = pool ? ` on ${pool}` : own2;
|
|
76479
|
+
const fresh = before?.harness !== harness ? " It starts a new session on its next turn." : "";
|
|
76480
|
+
context.out(`${updated.name} runs on ${RUNTIME_NAMES[harness]}${where}.${fresh}
|
|
76481
|
+
`);
|
|
76482
|
+
});
|
|
76483
|
+
}
|
|
76189
76484
|
|
|
76190
76485
|
// src/services/agent-migrate-commands.service.ts
|
|
76191
76486
|
import { readFile as readFile18, stat as stat7 } from "node:fs/promises";
|
|
@@ -76282,8 +76577,19 @@ function transcriptPartsOf({
|
|
|
76282
76577
|
return { parts: kept.slice(-maxParts), truncated: true };
|
|
76283
76578
|
}
|
|
76284
76579
|
|
|
76580
|
+
// src/rules/model-level.rules.ts
|
|
76581
|
+
function wireLevelOf({ text: text3 }) {
|
|
76582
|
+
const word3 = text3.trim().toLowerCase();
|
|
76583
|
+
if (word3 === "small" || word3 === "fast") return "fast";
|
|
76584
|
+
if (word3 === "frontier") return "frontier";
|
|
76585
|
+
return void 0;
|
|
76586
|
+
}
|
|
76587
|
+
function levelWordOf({ level: level2 }) {
|
|
76588
|
+
return level2 === "fast" ? "small" : level2;
|
|
76589
|
+
}
|
|
76590
|
+
|
|
76285
76591
|
// src/services/agent-migrate-commands.service.ts
|
|
76286
|
-
var MIGRATE_USAGE = `laze agent migrate <agent> [--to claude-code|codex|laze-models] [--level
|
|
76592
|
+
var MIGRATE_USAGE = `laze agent migrate <agent> [--to claude-code|codex|laze-models] [--level small|frontier] [--resend]
|
|
76287
76593
|
move your connected Claude Code or Codex agent into Laze, as the same agent: its own session
|
|
76288
76594
|
uploads its conversation with secrets removed, then Laze runs it; --to picks where it runs
|
|
76289
76595
|
(its own harness when left out), --level the Laze models level, --resend asks its session again
|
|
@@ -76295,7 +76601,6 @@ laze agent migrate upload <migrationId> --transcript <file.jsonl> [--profile <ag
|
|
|
76295
76601
|
OpenClaw agent's main session; one over the cap starts at its last compaction
|
|
76296
76602
|
`;
|
|
76297
76603
|
var TARGETS = /* @__PURE__ */ new Set(["claude-code", "codex", "laze-models"]);
|
|
76298
|
-
var LEVELS3 = /* @__PURE__ */ new Set(["fast", "frontier"]);
|
|
76299
76604
|
var HARNESS_NAMES3 = {
|
|
76300
76605
|
"claude-code": "Claude Code",
|
|
76301
76606
|
codex: "Codex",
|
|
@@ -76306,7 +76611,7 @@ var FILE_NAME2 = /^[A-Za-z0-9._-]{1,200}\.jsonl$/;
|
|
|
76306
76611
|
var quoted = (value) => /^[\w.@:+-]+$/.test(value) ? value : `"${value.replaceAll('"', '\\"')}"`;
|
|
76307
76612
|
function targetOf(migration) {
|
|
76308
76613
|
const name3 = HARNESS_NAMES3[migration.target] ?? migration.target;
|
|
76309
|
-
return migration.modelLevel ? `${name3}, ${migration.modelLevel}` : name3;
|
|
76614
|
+
return migration.modelLevel ? `${name3}, ${levelWordOf({ level: migration.modelLevel })}` : name3;
|
|
76310
76615
|
}
|
|
76311
76616
|
function modeLine(migration) {
|
|
76312
76617
|
return migration.mode === "resume" ? "Laze resumes that same session" : "Laze starts a fresh session from a summary of it";
|
|
@@ -76319,8 +76624,9 @@ function agentOf({ args, usage }) {
|
|
|
76319
76624
|
async function migrate({ context, args }) {
|
|
76320
76625
|
const agent3 = args.words[2] ?? "";
|
|
76321
76626
|
const harness = flagText({ args, name: "to" });
|
|
76322
|
-
const
|
|
76323
|
-
const
|
|
76627
|
+
const levelText = flagText({ args, name: "level" });
|
|
76628
|
+
const level2 = levelText ? wireLevelOf({ text: levelText }) : void 0;
|
|
76629
|
+
const known = (!harness || TARGETS.has(harness)) && (!levelText || level2);
|
|
76324
76630
|
if (!agent3 || !known) {
|
|
76325
76631
|
throw new CliUsageError(`Usage: ${MIGRATE_USAGE}`);
|
|
76326
76632
|
}
|
|
@@ -76833,6 +77139,33 @@ var publishLeaseSchemaDefinition = external_exports.object({
|
|
|
76833
77139
|
grantedAt: external_exports.iso.datetime()
|
|
76834
77140
|
});
|
|
76835
77141
|
var publishLeaseSchema = publishLeaseSchemaDefinition;
|
|
77142
|
+
var appSharedWithSchemaDefinition = external_exports.object({
|
|
77143
|
+
type: external_exports.enum(["user", "agent"]),
|
|
77144
|
+
id: external_exports.string().min(1),
|
|
77145
|
+
name: external_exports.string(),
|
|
77146
|
+
/** A person's picture, or an agent's uploaded one; null draws initials or a sloth. */
|
|
77147
|
+
image: external_exports.string().nullable(),
|
|
77148
|
+
/** An agent's sloth seed; null for people and pictures. */
|
|
77149
|
+
seed: external_exports.string().nullable()
|
|
77150
|
+
});
|
|
77151
|
+
var appPlaceSchemaDefinition = external_exports.object({
|
|
77152
|
+
kind: external_exports.enum(["channel", "conversation", "agent"]),
|
|
77153
|
+
/** The conversation's id. */
|
|
77154
|
+
id: external_exports.string().min(1),
|
|
77155
|
+
/** The channel's name, the other people in a conversation, or the agent's name. */
|
|
77156
|
+
name: external_exports.string(),
|
|
77157
|
+
/** The agent of a chat, drawn as its face; null for channels and conversations. */
|
|
77158
|
+
face: appSharedWithSchemaDefinition.nullable()
|
|
77159
|
+
});
|
|
77160
|
+
var appSharingSchemaDefinition = external_exports.object({
|
|
77161
|
+
/** The owner first, then direct shares; at most five. Empty for workspace and public apps. */
|
|
77162
|
+
people: external_exports.array(appSharedWithSchemaDefinition).max(5),
|
|
77163
|
+
/** People and agents shared with beyond those listed. */
|
|
77164
|
+
more: external_exports.number().int().nonnegative(),
|
|
77165
|
+
/** The app's channel or channel shares, then its pins; only conversations the reader is in. */
|
|
77166
|
+
places: external_exports.array(appPlaceSchemaDefinition)
|
|
77167
|
+
});
|
|
77168
|
+
var appSharingSchema = appSharingSchemaDefinition;
|
|
76836
77169
|
var appSchemaDefinition = external_exports.object({
|
|
76837
77170
|
id: external_exports.string().min(1),
|
|
76838
77171
|
workspaceId: external_exports.string().min(1),
|
|
@@ -76864,6 +77197,10 @@ var appSchemaDefinition = external_exports.object({
|
|
|
76864
77197
|
templateName: external_exports.string().nullable().optional(),
|
|
76865
77198
|
/** That template's version when the app was made, so a later version can be offered. */
|
|
76866
77199
|
templateVersion: external_exports.number().int().positive().nullable().optional(),
|
|
77200
|
+
/** Who it is shared with; only the app list fills it. */
|
|
77201
|
+
sharing: appSharingSchema.optional(),
|
|
77202
|
+
/** The live version's screenshot, behind the app's own access; null until one is taken. */
|
|
77203
|
+
previewUrl: external_exports.string().nullable().optional(),
|
|
76867
77204
|
createdAt: external_exports.iso.datetime(),
|
|
76868
77205
|
updatedAt: external_exports.iso.datetime()
|
|
76869
77206
|
});
|
|
@@ -78058,6 +78395,17 @@ var appBackupCheckAlertsSchemaDefinition = external_exports.object({
|
|
|
78058
78395
|
adminUserIds: external_exports.array(external_exports.string())
|
|
78059
78396
|
});
|
|
78060
78397
|
|
|
78398
|
+
// ../../modules/app/contract/src/app.previews.ts
|
|
78399
|
+
var appPreviewRefSchemaDefinition = external_exports.object({
|
|
78400
|
+
workspaceId: external_exports.string().min(1).max(64),
|
|
78401
|
+
appId: external_exports.string().min(1).max(64),
|
|
78402
|
+
version: appVersionIdSchema
|
|
78403
|
+
});
|
|
78404
|
+
var appPreviewRequestedPayloadSchemaDefinition = external_exports.object({
|
|
78405
|
+
...appPreviewRefSchemaDefinition.shape,
|
|
78406
|
+
requestId: external_exports.string().min(1)
|
|
78407
|
+
});
|
|
78408
|
+
|
|
78061
78409
|
// ../../modules/app/contract/src/app.templates.ts
|
|
78062
78410
|
var APP_TEMPLATE_SOURCES = ["laze"];
|
|
78063
78411
|
var templateCollectionsSchema = external_exports.record(
|
|
@@ -78574,7 +78922,13 @@ var appConfig = Config.define((c) => ({
|
|
|
78574
78922
|
),
|
|
78575
78923
|
domain: appsDomain,
|
|
78576
78924
|
/** 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())
|
|
78925
|
+
opsAlertDir: c.env("APP_OPS_ALERT_DIR", external_exports.string().min(1).optional()),
|
|
78926
|
+
/** The headless Chromium that screenshots apps; unset, no previews are taken. */
|
|
78927
|
+
previewChromium: c.env("APP_PREVIEW_CHROMIUM", external_exports.string().min(1).optional()),
|
|
78928
|
+
/** Where the capture reaches app origins: the local nginx, so a capture never leaves the box. */
|
|
78929
|
+
previewAddress: c.env("APP_PREVIEW_ADDRESS", external_exports.string().min(1).default("127.0.0.1")),
|
|
78930
|
+
/** "1" runs Chromium without its own sandbox, only where it runs as root (tests); never prod. */
|
|
78931
|
+
previewNoSandbox: c.env("APP_PREVIEW_NO_SANDBOX", external_exports.enum(["0", "1"]).default("0"))
|
|
78578
78932
|
}));
|
|
78579
78933
|
|
|
78580
78934
|
// src/rules/app-build.rules.ts
|
|
@@ -82505,7 +82859,7 @@ async function activityRead({ context, args }) {
|
|
|
82505
82859
|
|
|
82506
82860
|
// src/services/channel-config-commands.service.ts
|
|
82507
82861
|
var AGENT_HINT2 = "Roles, archiving and removing others are a channel admin's change: ask one.\n";
|
|
82508
|
-
var
|
|
82862
|
+
var LEVELS2 = ["default", "all", "mentions", "nothing", "mute", "unmute"];
|
|
82509
82863
|
async function changing2({
|
|
82510
82864
|
context,
|
|
82511
82865
|
profile,
|
|
@@ -82691,7 +83045,7 @@ function instantOf({ until }) {
|
|
|
82691
83045
|
}
|
|
82692
83046
|
function notifyBodyOf({ args }) {
|
|
82693
83047
|
const [, , channel, word3] = args.words;
|
|
82694
|
-
const level2 =
|
|
83048
|
+
const level2 = LEVELS2.find((candidate) => candidate === word3);
|
|
82695
83049
|
if (!channel || !level2) throw new CliUsageError(NOTIFY_USAGE);
|
|
82696
83050
|
if (level2 === "unmute") return { channel, muted: false };
|
|
82697
83051
|
if (level2 !== "mute") return { channel, level: level2 };
|
|
@@ -85854,7 +86208,26 @@ var judgeStatus = async ({ context, args }) => {
|
|
|
85854
86208
|
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
86209
|
);
|
|
85856
86210
|
};
|
|
86211
|
+
var renameDevice = async ({ context, args }) => {
|
|
86212
|
+
const deviceId = args.words[3];
|
|
86213
|
+
const label3 = args.words.slice(4).join(" ").trim();
|
|
86214
|
+
if (!deviceId || !label3) {
|
|
86215
|
+
throw new CliUsageError("Usage: laze vault devices rename <deviceId> <name>");
|
|
86216
|
+
}
|
|
86217
|
+
if (label3.length > VAULT_DEVICE_NAME_MAX) {
|
|
86218
|
+
throw new CliUsageError(`A device name is at most ${VAULT_DEVICE_NAME_MAX} characters.`);
|
|
86219
|
+
}
|
|
86220
|
+
const { client } = await signedIn({ context, args });
|
|
86221
|
+
const device = await client.post("/api/vault/devices/rename", { deviceId, label: label3 });
|
|
86222
|
+
if (args.flags.json) return printJson4({ context, data: device });
|
|
86223
|
+
context.out(`Renamed ${device.id} to ${device.label}.
|
|
86224
|
+
`);
|
|
86225
|
+
};
|
|
85857
86226
|
var listDevices = async ({ context, args }) => {
|
|
86227
|
+
if (args.words[2] === "rename") return renameDevice({ context, args });
|
|
86228
|
+
if (args.words[2] !== void 0) {
|
|
86229
|
+
throw new CliUsageError("Usage: laze vault devices [rename <deviceId> <name>]");
|
|
86230
|
+
}
|
|
85858
86231
|
const { client } = await signedIn({ context, args });
|
|
85859
86232
|
const devices = await client.get("/api/vault/devices");
|
|
85860
86233
|
if (args.flags.json) return printJson4({ context, data: devices });
|
|
@@ -85956,8 +86329,9 @@ var VAULT_USAGE = `Usage (your own key; an agent's key lists and runs its owner'
|
|
|
85956
86329
|
laze vault audit|activity [--connection <c>] [--limit <n>] [--before <seq>] (audit: admins)
|
|
85957
86330
|
laze vault most-asked [--days <n>] (admins)
|
|
85958
86331
|
laze vault approvals [--state pending] cards you answer; answer them in Laze
|
|
85959
|
-
laze vault judge | laze vault devices
|
|
85960
|
-
|
|
86332
|
+
laze vault judge | laze vault devices
|
|
86333
|
+
laze vault devices rename <deviceId> <name>`;
|
|
86334
|
+
function levelOf2(args) {
|
|
85961
86335
|
const level2 = flagText({ args, name: "level" });
|
|
85962
86336
|
if (!level2) return void 0;
|
|
85963
86337
|
const known = vaultLevelOfCliName(level2);
|
|
@@ -86014,7 +86388,7 @@ function settingsOf(args) {
|
|
|
86014
86388
|
const rules = args.flags.rules;
|
|
86015
86389
|
return {
|
|
86016
86390
|
...label3 && { label: label3 },
|
|
86017
|
-
...
|
|
86391
|
+
...levelOf2(args) && { sensitivity: levelOf2(args) },
|
|
86018
86392
|
...typeof rules === "string" && { rules },
|
|
86019
86393
|
...approvers && { approverUserIds: [...approvers] },
|
|
86020
86394
|
...lease && { maxLeaseSeconds: lease === "none" ? null : secondsOf(lease) },
|
|
@@ -86047,7 +86421,7 @@ var add3 = async ({ context, args }) => {
|
|
|
86047
86421
|
const created = await client.post("/api/vault/connections", {
|
|
86048
86422
|
name: name3,
|
|
86049
86423
|
keychain: await keychainOf2({ client, args }),
|
|
86050
|
-
sensitivity:
|
|
86424
|
+
sensitivity: levelOf2(args) ?? "checked",
|
|
86051
86425
|
...settingsOf(args),
|
|
86052
86426
|
secret
|
|
86053
86427
|
});
|
|
@@ -86257,7 +86631,7 @@ var start = async ({ context, args, client }) => {
|
|
|
86257
86631
|
const provider = wordAt2(args, 2);
|
|
86258
86632
|
const name3 = flagText({ args, name: "name" });
|
|
86259
86633
|
const again = flagText({ args, name: "again" });
|
|
86260
|
-
const level2 =
|
|
86634
|
+
const level2 = levelOf2(args);
|
|
86261
86635
|
const started = await client.post(CONNECTOR_KEY_PATHS.start, {
|
|
86262
86636
|
provider,
|
|
86263
86637
|
keychain: await keychainOf2({ client, args }),
|
|
@@ -86304,7 +86678,7 @@ async function addServer({
|
|
|
86304
86678
|
const label3 = flagText({ args, name: "label" });
|
|
86305
86679
|
if (!name3 || !label3) throw new CliUsageError(CONNECTOR_USAGE);
|
|
86306
86680
|
const again = flagText({ args, name: "again" });
|
|
86307
|
-
const level2 =
|
|
86681
|
+
const level2 = levelOf2(args);
|
|
86308
86682
|
const added = await client.post(CONNECTOR_KEY_PATHS.mcpAdd, {
|
|
86309
86683
|
serverUrl,
|
|
86310
86684
|
name: name3,
|
|
@@ -87387,6 +87761,15 @@ var rosterDefinition = external_exports.object({
|
|
|
87387
87761
|
var externalRosterSchema = rosterDefinition;
|
|
87388
87762
|
var rosterInputDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, channelId: idSchema24 });
|
|
87389
87763
|
var externalRosterInputSchema = rosterInputDefinition;
|
|
87764
|
+
var rosterCountsInputDefinition = external_exports.object({
|
|
87765
|
+
workspaceId: workspaceIdSchema25,
|
|
87766
|
+
channelIds: external_exports.array(idSchema24).max(200)
|
|
87767
|
+
});
|
|
87768
|
+
var externalRosterCountsInputSchema = rosterCountsInputDefinition;
|
|
87769
|
+
var rosterCountsDefinition = external_exports.object({
|
|
87770
|
+
counts: external_exports.array(external_exports.object({ channelId: external_exports.string(), count: external_exports.number().int().nonnegative() }))
|
|
87771
|
+
});
|
|
87772
|
+
var externalRosterCountsSchema = rosterCountsDefinition;
|
|
87390
87773
|
var inviteInputDefinition = external_exports.object({
|
|
87391
87774
|
workspaceId: workspaceIdSchema25,
|
|
87392
87775
|
email: external_exports.email().max(320),
|
|
@@ -87492,7 +87875,7 @@ var directDefinition = external_exports.object({
|
|
|
87492
87875
|
});
|
|
87493
87876
|
var externalDirectSchema = directDefinition;
|
|
87494
87877
|
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();
|
|
87878
|
+
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
87879
|
|
|
87497
87880
|
// ../../modules/external-connection/contract/src/external-connection.config.ts
|
|
87498
87881
|
var externalConnectionConfig = Config.define(() => ({ publicBaseUrl }));
|
|
@@ -88536,7 +88919,7 @@ var feedApprovalSchemaDefinition = external_exports.object({
|
|
|
88536
88919
|
why: external_exports.string(),
|
|
88537
88920
|
/** The longest lease Allow for this agent may give; null offers only once and deny. */
|
|
88538
88921
|
maxLeaseSeconds: external_exports.number().int().positive().nullable(),
|
|
88539
|
-
/** A vault card whose Allow covers the rest of the agent's turn
|
|
88922
|
+
/** A vault card whose "Allow once" covers the rest of the agent's turn. */
|
|
88540
88923
|
coversTask: external_exports.boolean().optional(),
|
|
88541
88924
|
/** A vault card whose key wants a device: Allow goes through a passkey, Touch ID or Face ID. */
|
|
88542
88925
|
deviceApproval: external_exports.boolean().optional(),
|
|
@@ -91750,12 +92133,27 @@ async function memory({ context, args }) {
|
|
|
91750
92133
|
var WINDOWS = ["day", "week", "month"];
|
|
91751
92134
|
var USAGE13 = `Usage:
|
|
91752
92135
|
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)
|
|
92136
|
+
laze models set-policy [on|off] [--default-level small|frontier|none] [--default-day <usd|none>] [--cap-day <usd|none>] ... (admins)
|
|
92137
|
+
--default-level sets what agents on Default run (none: Laze Frontier, Laze's default)
|
|
91754
92138
|
--default-week, --default-month, --cap-week and --cap-month set the other windows
|
|
91755
92139
|
laze models agents each Laze-model agent's budget and spend
|
|
91756
92140
|
laze models budget <agent> [--day <usd|none>] [--week <usd|none>] [--month <usd|none>]
|
|
91757
92141
|
the agent's owner or an admin, up to the cap; never an agent's own key
|
|
91758
92142
|
laze models spend the workspace's spend per window, agent and channel`;
|
|
92143
|
+
var LEVEL_LINES = {
|
|
92144
|
+
fast: "Laze Small (Sonnet 5.5)",
|
|
92145
|
+
frontier: "Laze Frontier (Opus 5.5)",
|
|
92146
|
+
none: "Laze Frontier (Opus 5.5), Laze's default"
|
|
92147
|
+
};
|
|
92148
|
+
function levelFrom({ args }) {
|
|
92149
|
+
const text3 = flagText({ args, name: "default-level" });
|
|
92150
|
+
if (!text3) return void 0;
|
|
92151
|
+
if (text3 === "none") return null;
|
|
92152
|
+
const level2 = wireLevelOf({ text: text3 });
|
|
92153
|
+
if (level2) return level2;
|
|
92154
|
+
throw new CliUsageError(`--default-level takes small, frontier or none.
|
|
92155
|
+
${USAGE13}`);
|
|
92156
|
+
}
|
|
91759
92157
|
var usd = (value) => `${Number(value.toFixed(2))} USD`;
|
|
91760
92158
|
var limitsLine = (limits) => WINDOWS.map(
|
|
91761
92159
|
(window2) => `${window2} ${limits[window2] === null ? "none" : usd(limits[window2])}`
|
|
@@ -91783,6 +92181,8 @@ function printPolicy(context, policy) {
|
|
|
91783
92181
|
const state = policy.lazeModels ? "on" : "off";
|
|
91784
92182
|
const available = policy.available ? "" : " (not set up on this server)";
|
|
91785
92183
|
context.out(`Laze models: ${state}${available}
|
|
92184
|
+
`);
|
|
92185
|
+
context.out(`Default level: ${LEVEL_LINES[policy.defaultLevel ?? "none"]}
|
|
91786
92186
|
`);
|
|
91787
92187
|
context.out(`Default budget per agent: ${limitsLine(policy.defaultBudget)}
|
|
91788
92188
|
`);
|
|
@@ -91803,9 +92203,12 @@ async function setPolicy({ context, args }) {
|
|
|
91803
92203
|
const current3 = await client.get("/api/models/policy");
|
|
91804
92204
|
const defaultBudget = limitsFrom({ args, prefix: "default-", current: current3.defaultBudget });
|
|
91805
92205
|
const cap = limitsFrom({ args, prefix: "cap-", current: current3.cap });
|
|
91806
|
-
|
|
92206
|
+
const defaultLevel = levelFrom({ args });
|
|
92207
|
+
if (!state && !defaultBudget && !cap && defaultLevel === void 0)
|
|
92208
|
+
throw new CliUsageError(USAGE13);
|
|
91807
92209
|
const updated = await client.post("/api/models/policy", {
|
|
91808
92210
|
...state ? { lazeModels: state === "on" } : {},
|
|
92211
|
+
...defaultLevel !== void 0 ? { defaultLevel } : {},
|
|
91809
92212
|
...defaultBudget ? { defaultBudget } : {},
|
|
91810
92213
|
...cap ? { cap } : {}
|
|
91811
92214
|
});
|
|
@@ -95460,8 +95863,9 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95460
95863
|
laze agent reset-session <agent> stop its turn; its next message starts a fresh session
|
|
95461
95864
|
laze agent default [<agent> | --clear] the workspace default agent; an Admin picks a team agent
|
|
95462
95865
|
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
|
|
95866
|
+
laze agent pools list|create|rename|delete|add-login|remove-login|grant|revoke|set-model shared login pools
|
|
95464
95867
|
laze agent set-pool <agent> <pool|none> the pool a Claude Code or Codex agent draws its logins from
|
|
95868
|
+
laze agent runs-on <agent> laze|claude|codex [--pool <pool>] moves it to Laze credits, Claude Code or Codex
|
|
95465
95869
|
laze agent access|dm|disconnect <agent> who can talk to it, your conversation with it, revoke its key
|
|
95466
95870
|
laze agent permission-prompts <agent> each permission prompt its harness raised and rush's answer
|
|
95467
95871
|
laze agent share|unshare <agent> --person <userId> | --channel <channelId> share it (its owner)
|
|
@@ -95471,7 +95875,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95471
95875
|
without --name the agent picks its own
|
|
95472
95876
|
laze agent invite --reconnect <agent> a link that connects one of your agents again with a new key,
|
|
95473
95877
|
a migrated one back on its own machine
|
|
95474
|
-
laze agent migrate <agent> [--to claude-code|codex|laze-models] [--level
|
|
95878
|
+
laze agent migrate <agent> [--to claude-code|codex|laze-models] [--level small|frontier] [--resend]
|
|
95475
95879
|
move your connected agent into Laze as the same agent; its session uploads its conversation, secrets removed
|
|
95476
95880
|
laze agent migrate status|cancel <agent> the latest migration, or cancel one still waiting
|
|
95477
95881
|
laze agent migrate upload <migrationId> run inside the agent's own session: hands its transcript to Laze
|
|
@@ -95732,6 +96136,7 @@ var COMMANDS3 = {
|
|
|
95732
96136
|
"agent logins": agentLogins,
|
|
95733
96137
|
"agent pools": agentPools,
|
|
95734
96138
|
"agent set-pool": setAgentPool,
|
|
96139
|
+
"agent runs-on": setAgentRunsOn,
|
|
95735
96140
|
notifications,
|
|
95736
96141
|
roles,
|
|
95737
96142
|
audit,
|