@lazehq/cli 0.1.71 → 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 +737 -273
- 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. */
|
|
@@ -60129,6 +60158,11 @@ var messageRefSchemaDefinition = external_exports.object({
|
|
|
60129
60158
|
threadRootId: idSchema4.nullable(),
|
|
60130
60159
|
messageId: idSchema4
|
|
60131
60160
|
});
|
|
60161
|
+
var messageFeedRefSchemaDefinition = external_exports.object({
|
|
60162
|
+
cardId: idSchema4,
|
|
60163
|
+
kind: external_exports.enum(["added", "updated"])
|
|
60164
|
+
});
|
|
60165
|
+
var MESSAGE_FEED_REFS_MAX = 20;
|
|
60132
60166
|
var messageMembershipSchemaDefinition = external_exports.object({
|
|
60133
60167
|
change: external_exports.enum(["joined", "left", "added", "removed"]),
|
|
60134
60168
|
/** Who joined, left, was added or was removed. */
|
|
@@ -60220,7 +60254,9 @@ var messageSchemaDefinition = external_exports.object({
|
|
|
60220
60254
|
/** The key the sender posted it under, so the sender's screen swaps its pending copy for it. */
|
|
60221
60255
|
clientKey: external_exports.string().optional(),
|
|
60222
60256
|
/** On the sender's post answer only: who the mentions did not reach, being outside it. */
|
|
60223
|
-
notInChannel: external_exports.array(notInChannelSchemaDefinition).optional()
|
|
60257
|
+
notInChannel: external_exports.array(notInChannelSchemaDefinition).optional(),
|
|
60258
|
+
/** An agent's reply: the feed cards it added or changed in that turn; absent means none. */
|
|
60259
|
+
feedRefs: external_exports.array(messageFeedRefSchemaDefinition).max(MESSAGE_FEED_REFS_MAX).optional()
|
|
60224
60260
|
});
|
|
60225
60261
|
var messageSchema = messageSchemaDefinition;
|
|
60226
60262
|
var departedPersonSchemaDefinition = external_exports.object({
|
|
@@ -60316,7 +60352,9 @@ var browsableChannelSchemaDefinition = external_exports.object({
|
|
|
60316
60352
|
lastMessageAt: external_exports.iso.datetime().nullable().default(null),
|
|
60317
60353
|
createdAt: external_exports.iso.datetime().nullable().default(null),
|
|
60318
60354
|
/** Where it is mirrored from, such as Slack; null for a channel that lives only in Laze. */
|
|
60319
|
-
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()
|
|
60320
60358
|
});
|
|
60321
60359
|
var browsableChannelSchema = browsableChannelSchemaDefinition;
|
|
60322
60360
|
var historyPageSchemaDefinition = external_exports.object({
|
|
@@ -60536,6 +60574,8 @@ var postMessageInputSchemaDefinition = external_exports.object({
|
|
|
60536
60574
|
/** In a direct message: notify the people in Do Not Disturb anyway, once. */
|
|
60537
60575
|
notifyAnyway: external_exports.boolean().optional(),
|
|
60538
60576
|
attachmentIds: external_exports.array(idSchema4).max(10).default([]),
|
|
60577
|
+
/** The feed cards an agent's reply links; chat keeps them only when an agent posts. */
|
|
60578
|
+
feedRefs: external_exports.array(messageFeedRefSchemaDefinition).max(MESSAGE_FEED_REFS_MAX).optional(),
|
|
60539
60579
|
/** The sender's own key for this post: sending it again answers the message stored first. */
|
|
60540
60580
|
clientKey: external_exports.string().regex(/^[A-Za-z0-9_-]{8,64}$/).optional()
|
|
60541
60581
|
}).refine((input2) => input2.body.trim().length > 0 || input2.attachmentIds.length > 0, {
|
|
@@ -62287,6 +62327,20 @@ var finishVaultDeviceEnrolmentInputSchemaDefinition = external_exports.object({
|
|
|
62287
62327
|
reauthToken: external_exports.string().min(1).optional()
|
|
62288
62328
|
});
|
|
62289
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);
|
|
62290
62344
|
var sealedRecipientSchema = external_exports.object({
|
|
62291
62345
|
deviceId: external_exports.string().min(1),
|
|
62292
62346
|
epk: base64Url,
|
|
@@ -62878,8 +62932,8 @@ var openVaultTurnInputSchemaDefinition = external_exports.object({
|
|
|
62878
62932
|
/** A shorter life than the deployment's turn TTL, for a token made for one command. */
|
|
62879
62933
|
ttlMinutes: external_exports.number().int().positive().optional(),
|
|
62880
62934
|
/**
|
|
62881
|
-
* The task an "Allow
|
|
62882
|
-
* 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.
|
|
62883
62937
|
*/
|
|
62884
62938
|
task: external_exports.object({ id: external_exports.string().min(1).max(200), scope: external_exports.string().max(300).nullable() }).nullable().optional()
|
|
62885
62939
|
});
|
|
@@ -63005,7 +63059,7 @@ var vaultApprovalRequestSchemaDefinition = external_exports.object({
|
|
|
63005
63059
|
connectionTitle: external_exports.string().nullable().default(null),
|
|
63006
63060
|
/** The longest lease Allow for this agent offers; null offers only once and deny. */
|
|
63007
63061
|
maxLeaseSeconds: external_exports.number().int().positive().nullable().default(null),
|
|
63008
|
-
/** 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. */
|
|
63009
63063
|
coversTask: external_exports.boolean().optional(),
|
|
63010
63064
|
/** Who asks when it is a session outside Laze, not an agent: "Claude Code session on pat-mac". */
|
|
63011
63065
|
agentLabel: external_exports.string().nullable().optional(),
|
|
@@ -63234,7 +63288,7 @@ var vaultTrpc = defineTrpcContract("vault").mutation("createConnection").withInp
|
|
|
63234
63288
|
reason: external_exports.string().trim().min(1).max(200),
|
|
63235
63289
|
reauthToken: external_exports.string().min(1).max(200).optional()
|
|
63236
63290
|
})
|
|
63237
|
-
).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(
|
|
63238
63292
|
external_exports.object({
|
|
63239
63293
|
...workspaceInput.shape,
|
|
63240
63294
|
deviceId: external_exports.string().min(1),
|
|
@@ -63362,7 +63416,7 @@ var vaultApprovalRequestedPayloadSchemaDefinition = external_exports.object({
|
|
|
63362
63416
|
sealed: external_exports.boolean().default(false),
|
|
63363
63417
|
/** For a send, the message it would send, read from the provider. */
|
|
63364
63418
|
draft: vaultDraftPreviewSchema.nullable().default(null),
|
|
63365
|
-
/** 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. */
|
|
63366
63420
|
coversTask: external_exports.boolean().optional(),
|
|
63367
63421
|
/** What a task card's Allow covers when it is wider than one turn: "this session of ...". */
|
|
63368
63422
|
taskScope: external_exports.string().nullable().optional(),
|
|
@@ -64349,7 +64403,9 @@ var liveStepSchemaDefinition = external_exports.object({
|
|
|
64349
64403
|
/** A subagent's type or model, such as `Explore` or `claude-haiku-4-5`. */
|
|
64350
64404
|
agent: external_exports.string().max(80).optional(),
|
|
64351
64405
|
/** A subagent's tool calls so far. */
|
|
64352
|
-
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()
|
|
64353
64409
|
});
|
|
64354
64410
|
var liveStepSchema = liveStepSchemaDefinition;
|
|
64355
64411
|
var harnessModelSchemaDefinition = external_exports.object({
|
|
@@ -65314,6 +65370,257 @@ var computerPoolWatchStateDefinition = external_exports.object({
|
|
|
65314
65370
|
var computerHostProbeIntentSchemaDefinition = external_exports.object({ hostId: external_exports.string() });
|
|
65315
65371
|
var computerMoveIntentSchemaDefinition = external_exports.object({ moveId: external_exports.string(), computerId: external_exports.string() });
|
|
65316
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
|
+
|
|
65317
65624
|
// ../../modules/agent/contract/src/agent-attention.ts
|
|
65318
65625
|
var workspaceIdSchema3 = external_exports.string().min(1);
|
|
65319
65626
|
var idSchema6 = external_exports.string().min(1).max(80);
|
|
@@ -65413,7 +65720,9 @@ var agentTurnStopRequestedPayloadSchemaDefinition = external_exports.object({
|
|
|
65413
65720
|
stoppedByUserId: external_exports.string().min(1),
|
|
65414
65721
|
stoppedByName: external_exports.string().default(""),
|
|
65415
65722
|
/** A session reset: the turn stops and the harness starts a fresh session in the main thread. */
|
|
65416
|
-
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()
|
|
65417
65726
|
});
|
|
65418
65727
|
var agentCompactRequestedPayloadSchemaDefinition = external_exports.object({
|
|
65419
65728
|
workspaceId: external_exports.string().min(1),
|
|
@@ -65593,18 +65902,10 @@ var restartAgentComputerInputSchemaDefinition = external_exports.object({
|
|
|
65593
65902
|
});
|
|
65594
65903
|
var restartAgentComputerInputSchema = restartAgentComputerInputSchemaDefinition;
|
|
65595
65904
|
|
|
65596
|
-
// ../../modules/agent/contract/src/agent-context-window.ts
|
|
65597
|
-
var AGENT_CONTEXT_WINDOW = {
|
|
65598
|
-
default: 4e5,
|
|
65599
|
-
min: 1e5,
|
|
65600
|
-
max: 1e6
|
|
65601
|
-
};
|
|
65602
|
-
var contextWindowInputSchema = external_exports.number().int().min(AGENT_CONTEXT_WINDOW.min).max(AGENT_CONTEXT_WINDOW.max);
|
|
65603
|
-
|
|
65604
65905
|
// ../../modules/agent/contract/src/agent-conversations.ts
|
|
65605
65906
|
var idSchema7 = external_exports.string().min(1).max(64);
|
|
65606
65907
|
var workspaceIdSchema4 = external_exports.string().min(1).max(64);
|
|
65607
|
-
var
|
|
65908
|
+
var agentRefSchema3 = external_exports.string().trim().min(1).max(80);
|
|
65608
65909
|
var firstMessageSchema = external_exports.string().trim().min(1).max(4e4);
|
|
65609
65910
|
var clientKeySchema = external_exports.string().regex(/^[A-Za-z0-9_-]{8,64}$/).optional();
|
|
65610
65911
|
var startConversationInputSchemaDefinition = external_exports.object({
|
|
@@ -65640,12 +65941,12 @@ var listConversationsInputSchemaDefinition = external_exports.object({
|
|
|
65640
65941
|
var listConversationsInputSchema = listConversationsInputSchemaDefinition;
|
|
65641
65942
|
var conversationSummarySchema2 = chatSummarySchema;
|
|
65642
65943
|
var startConversationAsCallerInputSchemaDefinition = external_exports.object({
|
|
65643
|
-
agent:
|
|
65944
|
+
agent: agentRefSchema3,
|
|
65644
65945
|
text: firstMessageSchema,
|
|
65645
65946
|
about: idSchema7.optional().describe("The id of a message to continue from: the first message quotes it.")
|
|
65646
65947
|
});
|
|
65647
65948
|
var listConversationsAsCallerInputSchemaDefinition = external_exports.object({
|
|
65648
|
-
agent:
|
|
65949
|
+
agent: agentRefSchema3.optional(),
|
|
65649
65950
|
unnamed: external_exports.boolean().optional()
|
|
65650
65951
|
});
|
|
65651
65952
|
var renameConversationAsCallerInputSchemaDefinition = external_exports.object({
|
|
@@ -65671,63 +65972,6 @@ function namingFirstTextOf({ channelIds }) {
|
|
|
65671
65972
|
].join("\n");
|
|
65672
65973
|
}
|
|
65673
65974
|
|
|
65674
|
-
// ../../modules/agent/contract/src/agent-face.ts
|
|
65675
|
-
var AGENT_AVATAR_MAX = 120;
|
|
65676
|
-
var AGENT_AVATAR_MAX_BYTES = 1024 * 1024;
|
|
65677
|
-
var AGENT_AVATAR_PICK_MAX_BYTES = 10 * 1024 * 1024;
|
|
65678
|
-
var AGENT_AVATAR_TYPES = ["image/png", "image/jpeg", "image/webp"];
|
|
65679
|
-
var SLOTH_PATTERN = /^sloth:([a-z0-9]{1,32})$/;
|
|
65680
|
-
var FILE_PATTERN = /^file:([A-Za-z0-9_-]{1,64})$/;
|
|
65681
|
-
var EMOJI_PATTERN = new RegExp("^emoji:((?:\\p{Extended_Pictographic}|\\p{Emoji_Component}|\\p{Regional_Indicator}|\\u200d|\\ufe0f|\\u20e3){1,16})$", "u");
|
|
65682
|
-
var PICTOGRAPH = new RegExp("\\p{Extended_Pictographic}|\\p{Regional_Indicator}|\\u20e3", "u");
|
|
65683
|
-
var EMOJI_PREFIX = "emoji:";
|
|
65684
|
-
function isEmojiAvatar(avatar) {
|
|
65685
|
-
const emoji4 = EMOJI_PATTERN.exec(avatar)?.[1];
|
|
65686
|
-
if (!emoji4 || !PICTOGRAPH.test(emoji4)) return false;
|
|
65687
|
-
return [...new Intl.Segmenter(void 0, { granularity: "grapheme" }).segment(emoji4)].length === 1;
|
|
65688
|
-
}
|
|
65689
|
-
function emojiAvatar(emoji4) {
|
|
65690
|
-
return `${EMOJI_PREFIX}${emoji4}`;
|
|
65691
|
-
}
|
|
65692
|
-
var agentAvatarInputSchema = external_exports.string().trim().max(AGENT_AVATAR_MAX).refine(
|
|
65693
|
-
(value) => value === "" || SLOTH_PATTERN.test(value) || FILE_PATTERN.test(value) || isEmojiAvatar(value),
|
|
65694
|
-
{ message: "An avatar is a sloth, an uploaded picture or one emoji" }
|
|
65695
|
-
);
|
|
65696
|
-
var uploadAgentAvatarInputSchemaDefinition = external_exports.object({
|
|
65697
|
-
workspaceId: external_exports.string().min(1),
|
|
65698
|
-
contentType: external_exports.enum(AGENT_AVATAR_TYPES),
|
|
65699
|
-
/** The cropped square picture, base64. */
|
|
65700
|
-
dataBase64: external_exports.string().min(1).max(Math.ceil(AGENT_AVATAR_MAX_BYTES * 4 / 3) + 8)
|
|
65701
|
-
});
|
|
65702
|
-
var uploadAgentAvatarInputSchema = uploadAgentAvatarInputSchemaDefinition;
|
|
65703
|
-
var uploadedAgentAvatarSchemaDefinition = external_exports.object({
|
|
65704
|
-
/** What `avatar` takes on create or update. */
|
|
65705
|
-
avatar: external_exports.string(),
|
|
65706
|
-
/** A short-lived link to show the picture until the agent is saved. */
|
|
65707
|
-
url: external_exports.string()
|
|
65708
|
-
});
|
|
65709
|
-
var uploadedAgentAvatarSchema = uploadedAgentAvatarSchemaDefinition;
|
|
65710
|
-
var agentFaceSchemaDefinition = external_exports.object({
|
|
65711
|
-
agentId: external_exports.string(),
|
|
65712
|
-
name: external_exports.string(),
|
|
65713
|
-
/** The sloth's seed; null when the agent shows a picture. With an emoji, its id's sloth. */
|
|
65714
|
-
seed: external_exports.string().nullable(),
|
|
65715
|
-
/** A short-lived link to its picture; null for a sloth. */
|
|
65716
|
-
imageUrl: external_exports.string().nullable(),
|
|
65717
|
-
/** Deleted for good: its old messages show a grey sloth. */
|
|
65718
|
-
gone: external_exports.boolean().default(false),
|
|
65719
|
-
/** How it runs and whose it is, "Laze models · Ada": tells agents sharing a name apart. */
|
|
65720
|
-
detail: external_exports.string().default(""),
|
|
65721
|
-
/** The emoji it shows instead of its sloth; null for a sloth or a picture. */
|
|
65722
|
-
emoji: external_exports.string().nullable().optional()
|
|
65723
|
-
});
|
|
65724
|
-
var agentFaceSchema = agentFaceSchemaDefinition;
|
|
65725
|
-
var agentPresenceSchemaDefinition = external_exports.object({
|
|
65726
|
-
agentId: external_exports.string(),
|
|
65727
|
-
presence: external_exports.enum(["active", "away", "offline"])
|
|
65728
|
-
});
|
|
65729
|
-
var agentPresenceSchema = agentPresenceSchemaDefinition;
|
|
65730
|
-
|
|
65731
65975
|
// ../../modules/connector/contract/src/connector-cards.ts
|
|
65732
65976
|
var suggestConnectInputSchemaDefinition = external_exports.object({
|
|
65733
65977
|
/** The service by name: `gmail`, `linear`, `google-calendar`. */
|
|
@@ -66723,7 +66967,7 @@ var langwatchSurfaces = defineSurfaces(
|
|
|
66723
66967
|
);
|
|
66724
66968
|
|
|
66725
66969
|
// ../../modules/agent/contract/src/agent-langwatch.ts
|
|
66726
|
-
var
|
|
66970
|
+
var agentRefSchema4 = external_exports.string().trim().min(1).max(80);
|
|
66727
66971
|
var workspaceIdSchema6 = external_exports.string().min(1);
|
|
66728
66972
|
var idSchema9 = external_exports.string().min(1).max(80);
|
|
66729
66973
|
var choiceShape = {
|
|
@@ -66748,9 +66992,9 @@ var setAgentLangwatchInputSchemaDefinition = external_exports.object({
|
|
|
66748
66992
|
...choiceShape
|
|
66749
66993
|
});
|
|
66750
66994
|
var setAgentLangwatchInputSchema = setAgentLangwatchInputSchemaDefinition;
|
|
66751
|
-
var agentLangwatchAsCallerInputSchemaDefinition = external_exports.object({ agent:
|
|
66995
|
+
var agentLangwatchAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema4 });
|
|
66752
66996
|
var setAgentLangwatchAsCallerInputSchemaDefinition = external_exports.object({
|
|
66753
|
-
agent:
|
|
66997
|
+
agent: agentRefSchema4,
|
|
66754
66998
|
...choiceShape
|
|
66755
66999
|
});
|
|
66756
67000
|
var agentLangwatchTracingSchema = langwatchAgentTracingSchema;
|
|
@@ -66758,7 +67002,7 @@ var agentLangwatchTracingSchema = langwatchAgentTracingSchema;
|
|
|
66758
67002
|
// ../../modules/agent/contract/src/agent-lifecycle.ts
|
|
66759
67003
|
var workspaceIdSchema7 = external_exports.string().min(1);
|
|
66760
67004
|
var idSchema10 = external_exports.string().min(1).max(200);
|
|
66761
|
-
var
|
|
67005
|
+
var agentRefSchema5 = external_exports.string().trim().min(1).max(80);
|
|
66762
67006
|
var memberRefSchema = external_exports.string().trim().min(1).max(320);
|
|
66763
67007
|
var transferAgentInputSchemaDefinition = external_exports.object({
|
|
66764
67008
|
workspaceId: workspaceIdSchema7,
|
|
@@ -66773,10 +67017,10 @@ var resetAgentSessionInputSchemaDefinition = external_exports.object({
|
|
|
66773
67017
|
});
|
|
66774
67018
|
var resetAgentSessionInputSchema = resetAgentSessionInputSchemaDefinition;
|
|
66775
67019
|
var transferAgentAsCallerInputSchemaDefinition = external_exports.object({
|
|
66776
|
-
agent:
|
|
67020
|
+
agent: agentRefSchema5,
|
|
66777
67021
|
to: memberRefSchema
|
|
66778
67022
|
});
|
|
66779
|
-
var resetAgentSessionAsCallerInputSchemaDefinition = external_exports.object({ agent:
|
|
67023
|
+
var resetAgentSessionAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema5 });
|
|
66780
67024
|
|
|
66781
67025
|
// ../../modules/agent/contract/src/agent-link-redemption.ts
|
|
66782
67026
|
var workspaceIdSchema8 = external_exports.string().min(1);
|
|
@@ -66968,6 +67212,15 @@ var loginPoolSchemaDefinition = external_exports.object({
|
|
|
66968
67212
|
createdAt: external_exports.iso.datetime(),
|
|
66969
67213
|
members: external_exports.array(external_exports.object({ userId: idSchema12, name: external_exports.string(), role: loginPoolRoleSchema })),
|
|
66970
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([]),
|
|
66971
67224
|
logins: external_exports.array(
|
|
66972
67225
|
external_exports.object({
|
|
66973
67226
|
id: idSchema12,
|
|
@@ -67036,6 +67289,17 @@ var removePoolMemberInputSchemaDefinition = external_exports.object({
|
|
|
67036
67289
|
...memberRefShape
|
|
67037
67290
|
});
|
|
67038
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
|
+
});
|
|
67039
67303
|
var setAgentPoolInputSchemaDefinition = external_exports.object({
|
|
67040
67304
|
workspaceId: workspaceIdSchema9,
|
|
67041
67305
|
/** The agent's id or, from the CLI, its name. */
|
|
@@ -67149,125 +67413,6 @@ var harnessSignInPollSchemaDefinition = external_exports.discriminatedUnion("sta
|
|
|
67149
67413
|
]);
|
|
67150
67414
|
var harnessSignInPollSchema = harnessSignInPollSchemaDefinition;
|
|
67151
67415
|
|
|
67152
|
-
// ../../modules/agent/contract/src/agent-run-config.ts
|
|
67153
|
-
var harnessModelsSchemaDefinition = external_exports.object({
|
|
67154
|
-
models: external_exports.array(harnessModelSchema).max(100),
|
|
67155
|
-
/** The model the harness runs when Laze names none; null when it did not say. */
|
|
67156
|
-
defaultModel: external_exports.string().max(200).nullable(),
|
|
67157
|
-
readAt: external_exports.iso.datetime()
|
|
67158
|
-
});
|
|
67159
|
-
var harnessModelsSchema = harnessModelsSchemaDefinition;
|
|
67160
|
-
var runModelInputSchema = external_exports.string().trim().min(1).max(200).nullable();
|
|
67161
|
-
var runEffortInputSchema = external_exports.string().trim().min(1).max(40).regex(/^[a-z]+$/).nullable();
|
|
67162
|
-
var EFFORT_LABELS = {
|
|
67163
|
-
minimal: "Minimal",
|
|
67164
|
-
low: "Low",
|
|
67165
|
-
medium: "Medium",
|
|
67166
|
-
high: "High",
|
|
67167
|
-
xhigh: "Extra high",
|
|
67168
|
-
max: "Max",
|
|
67169
|
-
ultra: "Ultra"
|
|
67170
|
-
};
|
|
67171
|
-
function effortLabelOf({ effort }) {
|
|
67172
|
-
return EFFORT_LABELS[effort] ?? `${effort.charAt(0).toUpperCase()}${effort.slice(1)}`;
|
|
67173
|
-
}
|
|
67174
|
-
function tokensLabelOf({ tokens }) {
|
|
67175
|
-
if (tokens >= 1e6) return `${Math.round(tokens / 1e5) / 10}M`;
|
|
67176
|
-
return `${Math.round(tokens / 1e3)}k`;
|
|
67177
|
-
}
|
|
67178
|
-
function pickRunningModel({ agent: agent3 }) {
|
|
67179
|
-
if (agent3.harness === "laze-models") return null;
|
|
67180
|
-
const listed = agent3.harnessModels?.models ?? [];
|
|
67181
|
-
const wanted = agent3.model ?? agent3.harnessModels?.defaultModel ?? null;
|
|
67182
|
-
return listed.find((one) => one.id === wanted) ?? (agent3.model ? null : listed[0] ?? null);
|
|
67183
|
-
}
|
|
67184
|
-
function contextCapOf({ agent: agent3 }) {
|
|
67185
|
-
if (agent3.harness === "laze-models") return { tokens: AGENT_CONTEXT_WINDOW.max, known: true };
|
|
67186
|
-
const window2 = pickRunningModel({ agent: agent3 })?.contextWindow ?? null;
|
|
67187
|
-
return window2 ? { tokens: window2, known: true } : { tokens: AGENT_CONTEXT_WINDOW.max, known: false };
|
|
67188
|
-
}
|
|
67189
|
-
var LEVEL_NAMES = { fast: "Laze Fast", frontier: "Laze Frontier" };
|
|
67190
|
-
function modelLineOf({ agent: agent3 }) {
|
|
67191
|
-
if (agent3.harness === "laze-models") return LEVEL_NAMES[agent3.modelLevel ?? "fast"];
|
|
67192
|
-
const running = pickRunningModel({ agent: agent3 });
|
|
67193
|
-
if (agent3.model) return running?.name || agent3.model;
|
|
67194
|
-
return running ? `Default (${running.name || running.id})` : "Default";
|
|
67195
|
-
}
|
|
67196
|
-
function describeEffort({ agent: agent3 }) {
|
|
67197
|
-
const running = pickRunningModel({ agent: agent3 });
|
|
67198
|
-
if (agent3.effort) return effortLabelOf({ effort: agent3.effort });
|
|
67199
|
-
if (running && running.efforts.length === 0) return null;
|
|
67200
|
-
const fallback = running?.defaultEffort;
|
|
67201
|
-
return fallback ? `Default (${effortLabelOf({ effort: fallback })})` : "Default";
|
|
67202
|
-
}
|
|
67203
|
-
function contextLineOf({ agent: agent3 }) {
|
|
67204
|
-
const cap = contextCapOf({ agent: agent3 });
|
|
67205
|
-
if (agent3.harness === "laze-models") {
|
|
67206
|
-
const tokens = agent3.contextWindow ?? AGENT_CONTEXT_WINDOW.default;
|
|
67207
|
-
return `${tokensLabelOf({ tokens })}, up to ${tokensLabelOf({ tokens: cap.tokens })}`;
|
|
67208
|
-
}
|
|
67209
|
-
if (!cap.known) {
|
|
67210
|
-
return agent3.contextWindow ? `${tokensLabelOf({ tokens: agent3.contextWindow })}, or the model's window if smaller` : "The model's own window";
|
|
67211
|
-
}
|
|
67212
|
-
const set2 = agent3.contextWindow ? Math.min(agent3.contextWindow, cap.tokens) : null;
|
|
67213
|
-
if (!set2 || set2 === cap.tokens)
|
|
67214
|
-
return `${tokensLabelOf({ tokens: cap.tokens })}, the most this model takes`;
|
|
67215
|
-
return `${tokensLabelOf({ tokens: set2 })} of the ${tokensLabelOf({ tokens: cap.tokens })} this model takes`;
|
|
67216
|
-
}
|
|
67217
|
-
function agentRunSummaryOf({ agent: agent3 }) {
|
|
67218
|
-
return {
|
|
67219
|
-
model: modelLineOf({ agent: agent3 }),
|
|
67220
|
-
effort: describeEffort({ agent: agent3 }),
|
|
67221
|
-
context: contextLineOf({ agent: agent3 })
|
|
67222
|
-
};
|
|
67223
|
-
}
|
|
67224
|
-
|
|
67225
|
-
// ../../modules/agent/contract/src/agent-manage.ts
|
|
67226
|
-
var hostedHarnessSchema = external_exports.enum(["laze-models", "claude-code", "codex"]);
|
|
67227
|
-
var nameSchema = external_exports.string().trim().min(1).max(80);
|
|
67228
|
-
var descriptionSchema = external_exports.string().max(2e4);
|
|
67229
|
-
var agentRefSchema5 = external_exports.string().trim().min(1).max(80);
|
|
67230
|
-
var createAgentAsCallerInputSchemaDefinition = external_exports.object({
|
|
67231
|
-
name: nameSchema,
|
|
67232
|
-
/** What the agent is for; it becomes the agent's instructions. */
|
|
67233
|
-
description: descriptionSchema.default(""),
|
|
67234
|
-
harness: hostedHarnessSchema.default("laze-models"),
|
|
67235
|
-
avatar: agentAvatarInputSchema.default(""),
|
|
67236
|
-
/** A team agent belongs to the workspace; on Claude Code or Codex it needs `loginPoolId`. */
|
|
67237
|
-
kind: external_exports.enum(["personal", "team"]).default("personal"),
|
|
67238
|
-
/** The login pool's id or name, one the caller is a member of. */
|
|
67239
|
-
loginPoolId: external_exports.string().trim().min(1).max(200).optional()
|
|
67240
|
-
});
|
|
67241
|
-
var createdAgentSchemaDefinition = external_exports.object({
|
|
67242
|
-
agentId: external_exports.string(),
|
|
67243
|
-
name: external_exports.string(),
|
|
67244
|
-
harness: hostedHarnessSchema,
|
|
67245
|
-
ownerUserId: external_exports.string(),
|
|
67246
|
-
/** The owner's direct message with the new agent. */
|
|
67247
|
-
channelId: external_exports.string()
|
|
67248
|
-
});
|
|
67249
|
-
var updateAgentAsCallerInputSchemaDefinition = external_exports.strictObject({
|
|
67250
|
-
/** Left out, the agent whose key calls: `laze agent update --self`. */
|
|
67251
|
-
agent: agentRefSchema5.optional(),
|
|
67252
|
-
name: nameSchema.optional(),
|
|
67253
|
-
description: descriptionSchema.optional(),
|
|
67254
|
-
avatar: agentAvatarInputSchema.optional(),
|
|
67255
|
-
/** The max context of an agent Laze runs, in tokens, 100k to 1M; null for its default. */
|
|
67256
|
-
contextWindow: contextWindowInputSchema.nullable().optional(),
|
|
67257
|
-
/** The model its login lists, or null for the harness's default. */
|
|
67258
|
-
model: runModelInputSchema.optional(),
|
|
67259
|
-
/** The thinking level its model lists, or null for the model's default. */
|
|
67260
|
-
effort: runEffortInputSchema.optional(),
|
|
67261
|
-
/** Pauses or resumes an agent Laze runs. */
|
|
67262
|
-
paused: external_exports.boolean().optional(),
|
|
67263
|
-
pauseReason: external_exports.string().trim().max(200).optional()
|
|
67264
|
-
});
|
|
67265
|
-
var archiveAgentAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema5 });
|
|
67266
|
-
var uploadAvatarAsCallerInputSchemaDefinition = external_exports.object({
|
|
67267
|
-
contentType: external_exports.string().min(1).max(100),
|
|
67268
|
-
dataBase64: external_exports.string().min(1).max(Math.ceil(AGENT_AVATAR_PICK_MAX_BYTES * 4 / 3) + 8)
|
|
67269
|
-
});
|
|
67270
|
-
|
|
67271
67416
|
// ../../modules/agent/contract/src/agent-migration.ts
|
|
67272
67417
|
var workspaceIdSchema10 = external_exports.string().min(1);
|
|
67273
67418
|
var idSchema13 = external_exports.string().min(1).max(200);
|
|
@@ -67513,6 +67658,20 @@ var agentPermissionPromptSchemaDefinition = external_exports.object({
|
|
|
67513
67658
|
});
|
|
67514
67659
|
var agentPermissionPromptSchema = agentPermissionPromptSchemaDefinition;
|
|
67515
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
|
+
|
|
67516
67675
|
// ../../modules/agent/contract/src/agent-transfer.ts
|
|
67517
67676
|
var workspaceIdSchema12 = external_exports.string().min(1);
|
|
67518
67677
|
var idSchema15 = external_exports.string().min(1).max(200);
|
|
@@ -67555,6 +67714,21 @@ var agentTransferResolvedPayloadSchemaDefinition = external_exports.object({
|
|
|
67555
67714
|
resolvedByUserId: external_exports.string().min(1)
|
|
67556
67715
|
});
|
|
67557
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
|
+
|
|
67558
67732
|
// ../../modules/agent/contract/src/agent-working.ts
|
|
67559
67733
|
var agentWorkingInputSchemaDefinition = external_exports.object({
|
|
67560
67734
|
workspaceId: external_exports.string().min(1),
|
|
@@ -67667,7 +67841,14 @@ var agentSchemaDefinition = external_exports.object({
|
|
|
67667
67841
|
avatar: external_exports.string().max(AGENT_AVATAR_MAX).default(""),
|
|
67668
67842
|
/** A Laze agent's SOUL.md. */
|
|
67669
67843
|
instructions: external_exports.string().default(""),
|
|
67844
|
+
/** A Laze models agent's level: the one picked, or what Default resolves to. */
|
|
67670
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),
|
|
67671
67852
|
/** The max context of an agent Laze runs, in tokens; null for its default or a connected one. */
|
|
67672
67853
|
contextWindow: external_exports.number().int().positive().nullable().default(null),
|
|
67673
67854
|
/** The model a Claude Code or Codex agent runs; null for its harness's default. */
|
|
@@ -67733,7 +67914,8 @@ var updateAgentInputSchemaDefinition = external_exports.object({
|
|
|
67733
67914
|
agentId: idSchema17,
|
|
67734
67915
|
name: agentNameSchema.optional(),
|
|
67735
67916
|
avatar: agentAvatarInputSchema.optional(),
|
|
67736
|
-
|
|
67917
|
+
/** A Laze models agent's level; null puts it back on Default. */
|
|
67918
|
+
modelLevel: agentModelLevelSchema.nullable().optional(),
|
|
67737
67919
|
/** Agents Laze runs only; a connected agent refuses it. Null puts back the default. */
|
|
67738
67920
|
contextWindow: contextWindowInputSchema.nullable().optional(),
|
|
67739
67921
|
/** A model its login lists, or null for the harness's default; Claude Code and Codex only. */
|
|
@@ -68123,6 +68305,9 @@ var agentWorkspaceDefaultTrpc = defineTrpcContract("agents").query("workspaceDef
|
|
|
68123
68305
|
var agentRuntimeChoiceTrpc = defineTrpcContract("agents").query("lastRuntime").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).withOutput(lastRuntimeSchema).build();
|
|
68124
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();
|
|
68125
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();
|
|
68126
68311
|
var agentTrpc = joinTrpcContracts(
|
|
68127
68312
|
"agents",
|
|
68128
68313
|
agentCoreTrpc,
|
|
@@ -68134,7 +68319,10 @@ var agentTrpc = joinTrpcContracts(
|
|
|
68134
68319
|
agentWorkspaceDefaultTrpc,
|
|
68135
68320
|
agentRuntimeChoiceTrpc,
|
|
68136
68321
|
agentArchiveTrpc,
|
|
68137
|
-
agentMigrationTrpc
|
|
68322
|
+
agentMigrationTrpc,
|
|
68323
|
+
agentPoolModelTrpc,
|
|
68324
|
+
agentRunsOnTrpc,
|
|
68325
|
+
agentWelcomeTrpc
|
|
68138
68326
|
);
|
|
68139
68327
|
var agentUi = uiTokens("agent");
|
|
68140
68328
|
var AgentNavSlot = agentUi.component("nav");
|
|
@@ -68142,12 +68330,13 @@ var AgentAttentionCardSlot = agentUi.component("attentionCard");
|
|
|
68142
68330
|
var AgentComputerCardSlot = agentUi.component("computerCard");
|
|
68143
68331
|
var AgentLoginCardSlot = agentUi.component("loginCard");
|
|
68144
68332
|
var AgentBudgetCardSlot = agentUi.component("budgetCard");
|
|
68333
|
+
var AgentWelcomeCardSlot = agentUi.component("welcomeCard");
|
|
68145
68334
|
var AgentStopTurnSlot = agentUi.component("stopTurn");
|
|
68146
68335
|
var AgentLiveStepsSlot = agentUi.component("liveSteps");
|
|
68147
68336
|
var AgentCatchUpSlot = agentUi.component("catchUp");
|
|
68148
68337
|
var AgentSessionHooksToken = agentUi.hooks("session");
|
|
68149
68338
|
var AgentCreateDialogSlot = agentUi.component("createDialog");
|
|
68150
|
-
var
|
|
68339
|
+
var AgentRunsOnPickerSlot = agentUi.component("runsOnPicker");
|
|
68151
68340
|
var AgentEditDialogSlot = agentUi.component("editDialog");
|
|
68152
68341
|
var AgentFaceSlot = agentUi.component("face");
|
|
68153
68342
|
var AgentAccessSlot = agentUi.component("access");
|
|
@@ -68186,9 +68375,10 @@ var agentConfig = Config.define((c) => ({
|
|
|
68186
68375
|
"AGENT_CLAUDE_GATEWAY_MIDDLE",
|
|
68187
68376
|
external_exports.string().min(1).default("claude-sonnet-5-5")
|
|
68188
68377
|
),
|
|
68378
|
+
/** Laze Small: Sonnet 5.5, the small level (Haiku was too weak, Rogerio 2026-10-28). */
|
|
68189
68379
|
claudeGatewayFastModel: c.env(
|
|
68190
68380
|
"AGENT_CLAUDE_GATEWAY_FAST",
|
|
68191
|
-
external_exports.string().min(1).default("claude-
|
|
68381
|
+
external_exports.string().min(1).default("claude-sonnet-5-5")
|
|
68192
68382
|
),
|
|
68193
68383
|
/** `off` turns Claude Code's thinking off on Laze models, for a gateway lane that refuses it. */
|
|
68194
68384
|
claudeGatewayThinking: c.env(
|
|
@@ -68464,13 +68654,22 @@ var callerHistorySchemaDefinition = external_exports.object({
|
|
|
68464
68654
|
liveBefore: external_exports.iso.datetime().nullable()
|
|
68465
68655
|
});
|
|
68466
68656
|
|
|
68467
|
-
// ../../modules/agent/contract/src/agent-
|
|
68657
|
+
// ../../modules/agent/contract/src/agent-feed-refs.ts
|
|
68468
68658
|
var idSchema20 = external_exports.string().min(1).max(80);
|
|
68659
|
+
var recordTurnFeedRefInputSchemaDefinition = external_exports.object({
|
|
68660
|
+
cardId: idSchema20,
|
|
68661
|
+
kind: external_exports.enum(["added", "updated"]),
|
|
68662
|
+
/** The card's own chat threads: a reply in one of them links nothing. */
|
|
68663
|
+
ownThreadRootIds: external_exports.array(idSchema20).max(50).default([])
|
|
68664
|
+
});
|
|
68665
|
+
|
|
68666
|
+
// ../../modules/agent/contract/src/agent-channel-admin.ts
|
|
68667
|
+
var idSchema21 = external_exports.string().min(1).max(80);
|
|
68469
68668
|
var channelRefSchema = external_exports.string().trim().min(1).max(200);
|
|
68470
68669
|
var channelAsCallerInputSchemaDefinition = external_exports.object({ channel: channelRefSchema });
|
|
68471
68670
|
var callerChannelMemberSchemaDefinition = external_exports.object({
|
|
68472
68671
|
kind: external_exports.enum(["person", "agent"]),
|
|
68473
|
-
id:
|
|
68672
|
+
id: idSchema21,
|
|
68474
68673
|
name: external_exports.string(),
|
|
68475
68674
|
role: external_exports.enum(["admin", "member"]),
|
|
68476
68675
|
/** Active, away or unknown for a person the speaker may see; absent for agents. */
|
|
@@ -68480,7 +68679,7 @@ var callerChannelMemberSchemaDefinition = external_exports.object({
|
|
|
68480
68679
|
doNotDisturb: doNotDisturbSchema.nullable().optional()
|
|
68481
68680
|
});
|
|
68482
68681
|
var callerChannelDetailSchemaDefinition = external_exports.object({
|
|
68483
|
-
id:
|
|
68682
|
+
id: idSchema21,
|
|
68484
68683
|
name: external_exports.string(),
|
|
68485
68684
|
kind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
68486
68685
|
topic: external_exports.string(),
|
|
@@ -68511,17 +68710,17 @@ var activityAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
68511
68710
|
limit: external_exports.number().int().min(1).max(100).default(50)
|
|
68512
68711
|
});
|
|
68513
68712
|
var callerActivityItemSchemaDefinition = external_exports.object({
|
|
68514
|
-
id:
|
|
68713
|
+
id: idSchema21,
|
|
68515
68714
|
kind: external_exports.enum(["mention", "thread_reply", "keyword", "reaction"]),
|
|
68516
|
-
channelId:
|
|
68715
|
+
channelId: idSchema21,
|
|
68517
68716
|
channelName: external_exports.string(),
|
|
68518
68717
|
channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
68519
|
-
messageId:
|
|
68520
|
-
threadRootId:
|
|
68718
|
+
messageId: idSchema21,
|
|
68719
|
+
threadRootId: idSchema21.nullable(),
|
|
68521
68720
|
/** `external` is someone outside Laze whose message a mirror brought in, named at the source. */
|
|
68522
68721
|
actor: external_exports.object({
|
|
68523
68722
|
kind: external_exports.enum(["person", "agent", "external"]),
|
|
68524
|
-
id:
|
|
68723
|
+
id: idSchema21,
|
|
68525
68724
|
name: external_exports.string()
|
|
68526
68725
|
}),
|
|
68527
68726
|
emoji: external_exports.string().nullable(),
|
|
@@ -68538,12 +68737,12 @@ var setStatusAsCallerInputSchemaDefinition = setStatusInputSchema.omit({ workspa
|
|
|
68538
68737
|
var setAwayAsCallerInputSchemaDefinition = external_exports.object({ away: external_exports.boolean() });
|
|
68539
68738
|
|
|
68540
68739
|
// ../../modules/agent/contract/src/agent-scheduled.ts
|
|
68541
|
-
var
|
|
68740
|
+
var idSchema22 = external_exports.string().min(1).max(80);
|
|
68542
68741
|
var channelRefSchema2 = external_exports.string().trim().min(1).max(200);
|
|
68543
68742
|
var scheduleAsCallerInputSchemaDefinition = external_exports.object({
|
|
68544
68743
|
channel: channelRefSchema2.optional(),
|
|
68545
|
-
threadRootId:
|
|
68546
|
-
replyTo:
|
|
68744
|
+
threadRootId: idSchema22.optional(),
|
|
68745
|
+
replyTo: idSchema22.optional(),
|
|
68547
68746
|
body: external_exports.string().trim().min(1).max(4e4),
|
|
68548
68747
|
sendAt: external_exports.iso.datetime({ offset: true }),
|
|
68549
68748
|
/** A reply that also goes to the channel at its time (`--also-channel`). */
|
|
@@ -68554,9 +68753,9 @@ var scheduleAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
68554
68753
|
var listScheduledAsCallerInputSchemaDefinition = external_exports.object({
|
|
68555
68754
|
channel: channelRefSchema2.optional()
|
|
68556
68755
|
});
|
|
68557
|
-
var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId:
|
|
68756
|
+
var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId: idSchema22 });
|
|
68558
68757
|
var editScheduledAsCallerInputSchemaDefinition = external_exports.object({
|
|
68559
|
-
scheduledId:
|
|
68758
|
+
scheduledId: idSchema22,
|
|
68560
68759
|
body: external_exports.string().trim().min(1).max(4e4).optional(),
|
|
68561
68760
|
sendAt: external_exports.iso.datetime({ offset: true }).optional()
|
|
68562
68761
|
}).refine((input2) => input2.body !== void 0 || input2.sendAt !== void 0, {
|
|
@@ -69315,7 +69514,6 @@ import { mkdir as mkdir16, readFile as readFile16, writeFile as writeFile15 } fr
|
|
|
69315
69514
|
import { join as join17, resolve as resolve5 } from "node:path";
|
|
69316
69515
|
|
|
69317
69516
|
// src/rules/agent-profile.rules.ts
|
|
69318
|
-
var LEVELS = { fast: "Laze Fast", frontier: "Laze Frontier" };
|
|
69319
69517
|
var HARNESS_NAMES = {
|
|
69320
69518
|
"claude-code": "Claude Code",
|
|
69321
69519
|
codex: "Codex",
|
|
@@ -69330,7 +69528,7 @@ var HARNESS_NAMES = {
|
|
|
69330
69528
|
var PLANS = { "claude-code": "Claude", codex: "ChatGPT" };
|
|
69331
69529
|
var harnessName = (harness) => HARNESS_NAMES[harness] ?? harness;
|
|
69332
69530
|
function intelligenceOf({ agent: agent3, owner }) {
|
|
69333
|
-
if (agent3.harness === "laze-models") return
|
|
69531
|
+
if (agent3.harness === "laze-models") return modelLineOf({ agent: agent3 });
|
|
69334
69532
|
const plan2 = PLANS[agent3.harness];
|
|
69335
69533
|
if (!plan2 || agent3.hosting === "connected") return harnessName(agent3.harness);
|
|
69336
69534
|
if (agent3.loginPoolId) return `${harnessName(agent3.harness)} on a login pool`;
|
|
@@ -69377,6 +69575,7 @@ function agentProfileOf({
|
|
|
69377
69575
|
status: statusOf({ agent: agent3 }),
|
|
69378
69576
|
login: loginOf({ agent: agent3 }),
|
|
69379
69577
|
model: run4?.model ?? null,
|
|
69578
|
+
modelNote: run4 ? describeDefaultModelNote({ agent: agent3 }) ?? null : null,
|
|
69380
69579
|
effort: run4?.effort ?? null,
|
|
69381
69580
|
maxContext: run4?.context ?? null,
|
|
69382
69581
|
createdAt: agent3.createdAt.slice(0, 10),
|
|
@@ -69392,6 +69591,7 @@ function formatAgentProfile({ profile }) {
|
|
|
69392
69591
|
["Status", profile.status],
|
|
69393
69592
|
["Login", profile.login],
|
|
69394
69593
|
["Model", profile.model],
|
|
69594
|
+
["Model note", profile.modelNote],
|
|
69395
69595
|
["Thinking effort", profile.effort],
|
|
69396
69596
|
["Max context", profile.maxContext],
|
|
69397
69597
|
["Created", profile.createdAt],
|
|
@@ -69705,6 +69905,25 @@ var slackEmojiImportSchemaDefinition = external_exports.object({
|
|
|
69705
69905
|
});
|
|
69706
69906
|
var slackEmojiImportSchema = slackEmojiImportSchemaDefinition;
|
|
69707
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
|
+
|
|
69708
69927
|
// ../../modules/slack/contract/src/slack-link-prompt.ts
|
|
69709
69928
|
var slackLinkPromptKindSchema = external_exports.enum(["connect", "relink"]);
|
|
69710
69929
|
var slackLinkPromptSchemaDefinition = external_exports.object({
|
|
@@ -69901,6 +70120,15 @@ var slackExternalPeopleSchemaDefinition = external_exports.object({
|
|
|
69901
70120
|
)
|
|
69902
70121
|
});
|
|
69903
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;
|
|
69904
70132
|
|
|
69905
70133
|
// ../../modules/slack/contract/src/slack-setup.ts
|
|
69906
70134
|
var workspaceIdSchema16 = external_exports.string().min(1);
|
|
@@ -70288,7 +70516,7 @@ var slackSearchAnswerSchemaDefinition = external_exports.object({
|
|
|
70288
70516
|
var slackSearchAnswerSchema = slackSearchAnswerSchemaDefinition;
|
|
70289
70517
|
var SlackApi = moduleApi()("slack");
|
|
70290
70518
|
var workspaceInput3 = external_exports.object({ workspaceId: workspaceIdSchema17 });
|
|
70291
|
-
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();
|
|
70292
70520
|
|
|
70293
70521
|
// ../../modules/slack/contract/src/slack-keys.ts
|
|
70294
70522
|
var SLACK_KEY_PATHS = {
|
|
@@ -71623,13 +71851,13 @@ async function listChannels({ context, args }) {
|
|
|
71623
71851
|
`);
|
|
71624
71852
|
}
|
|
71625
71853
|
}
|
|
71626
|
-
var
|
|
71854
|
+
var LEVELS = ["everything", "mentions"];
|
|
71627
71855
|
async function setChannelLevel({
|
|
71628
71856
|
context,
|
|
71629
71857
|
args
|
|
71630
71858
|
}) {
|
|
71631
71859
|
const [, , channel, level2] = args.words;
|
|
71632
|
-
const known =
|
|
71860
|
+
const known = LEVELS.find((candidate) => candidate === level2);
|
|
71633
71861
|
if (!channel || !known) {
|
|
71634
71862
|
throw new CliUsageError("Usage: laze channel set <channel> everything|mentions");
|
|
71635
71863
|
}
|
|
@@ -74611,6 +74839,9 @@ the full text in \`--draft\`, the recipients and subject in
|
|
|
74611
74839
|
not the drafts folder). Never leave it only in Gmail drafts. If they edit the text on the card,
|
|
74612
74840
|
the press brings you the edited text: update the native draft with it first, then send.
|
|
74613
74841
|
|
|
74842
|
+
A card you post or update while answering is linked under your reply: don't describe where the
|
|
74843
|
+
card is, say what changed.
|
|
74844
|
+
|
|
74614
74845
|
## Apps
|
|
74615
74846
|
|
|
74616
74847
|
Asked for an app (a tracker, a CRM, a dashboard, a page that explains something), read the full
|
|
@@ -75479,6 +75710,9 @@ function formatPool({ pool, nowMs }) {
|
|
|
75479
75710
|
` Members: ${pool.members.map((member) => `${member.name} (${member.role})`).join(", ") || "none"}`
|
|
75480
75711
|
);
|
|
75481
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
|
+
}
|
|
75482
75716
|
return lines2.join("\n");
|
|
75483
75717
|
}
|
|
75484
75718
|
function formatOnePool({ pool, nowMs }) {
|
|
@@ -75589,6 +75823,18 @@ function runChangesOf({ args }) {
|
|
|
75589
75823
|
...effort !== void 0 && { effort }
|
|
75590
75824
|
};
|
|
75591
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
|
+
}
|
|
75592
75838
|
function runLinesOf({ agent: agent3 }) {
|
|
75593
75839
|
if (agent3.hosting !== "laze") return [];
|
|
75594
75840
|
const summary = agentRunSummaryOf({ agent: agent3 });
|
|
@@ -75794,6 +76040,7 @@ async function resetAgentSession({
|
|
|
75794
76040
|
context.out(`Reset ${reset.name}'s session. Its next message starts a fresh one.
|
|
75795
76041
|
`);
|
|
75796
76042
|
}
|
|
76043
|
+
var HARNESS_WORDS = { "claude-code": "Claude Code", codex: "Codex" };
|
|
75797
76044
|
var PATHS = {
|
|
75798
76045
|
logins: "/api/agents/logins",
|
|
75799
76046
|
renameLogin: "/api/agents/logins/rename",
|
|
@@ -75808,6 +76055,8 @@ var PATHS = {
|
|
|
75808
76055
|
setPoolMember: "/api/agents/pools/members",
|
|
75809
76056
|
removePoolMember: "/api/agents/pools/members/remove",
|
|
75810
76057
|
setAgentPool: "/api/agents/pool",
|
|
76058
|
+
setRunsOn: "/api/agents/runs-on",
|
|
76059
|
+
setPoolModel: "/api/agents/pools/model",
|
|
75811
76060
|
loginActivity: "/api/agents/login-activity"
|
|
75812
76061
|
};
|
|
75813
76062
|
var LOGINS_HELP = `Usage: laze agent logins list|add|sign-in|rename|remove|check|history
|
|
@@ -75827,7 +76076,7 @@ var LOGINS_HELP = `Usage: laze agent logins list|add|sign-in|rename|remove|check
|
|
|
75827
76076
|
laze agent logins history <agent> [--json] the agent's login switches of 90 days,
|
|
75828
76077
|
and the login it moves to next once the one in use is at 80%
|
|
75829
76078
|
`;
|
|
75830
|
-
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
|
|
75831
76080
|
|
|
75832
76081
|
laze agent pools list [--json] the pools you are in, every pool for admins
|
|
75833
76082
|
laze agent pools create <name> you become its manager
|
|
@@ -75840,10 +76089,28 @@ var POOLS_HELP = `Usage: laze agent pools list|create|rename|delete|add-login|re
|
|
|
75840
76089
|
laze agent pools remove-login <pool> <login> the login's contributor or a manager
|
|
75841
76090
|
laze agent pools grant <pool> <person> [--role member|manager] managers; a user id, email or name
|
|
75842
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)
|
|
75843
76094
|
`;
|
|
75844
76095
|
var SET_POOL_USAGE = `Usage: laze agent set-pool <agent> <pool|none>
|
|
75845
76096
|
Sets the pool a Claude Code or Codex agent draws its logins from; none goes back to its owner's own logins.
|
|
75846
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
|
+
};
|
|
75847
76114
|
var LOGIN_HARNESSES = /* @__PURE__ */ new Set(["claude-code", "codex"]);
|
|
75848
76115
|
var ROLES = /* @__PURE__ */ new Set(["member", "manager"]);
|
|
75849
76116
|
var SECRET_FLAGS = ["token", "secret", "value", "auth"];
|
|
@@ -76109,6 +76376,26 @@ var POOL_ACTIONS = {
|
|
|
76109
76376
|
printPools(step, pools, `${step.second} is now a ${role2} of ${step.first}.`);
|
|
76110
76377
|
}
|
|
76111
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
|
+
},
|
|
76112
76399
|
revoke: {
|
|
76113
76400
|
words: 2,
|
|
76114
76401
|
run: async (step) => {
|
|
@@ -76165,6 +76452,35 @@ async function setAgentPool({
|
|
|
76165
76452
|
);
|
|
76166
76453
|
});
|
|
76167
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
|
+
}
|
|
76168
76484
|
|
|
76169
76485
|
// src/services/agent-migrate-commands.service.ts
|
|
76170
76486
|
import { readFile as readFile18, stat as stat7 } from "node:fs/promises";
|
|
@@ -76261,8 +76577,19 @@ function transcriptPartsOf({
|
|
|
76261
76577
|
return { parts: kept.slice(-maxParts), truncated: true };
|
|
76262
76578
|
}
|
|
76263
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
|
+
|
|
76264
76591
|
// src/services/agent-migrate-commands.service.ts
|
|
76265
|
-
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]
|
|
76266
76593
|
move your connected Claude Code or Codex agent into Laze, as the same agent: its own session
|
|
76267
76594
|
uploads its conversation with secrets removed, then Laze runs it; --to picks where it runs
|
|
76268
76595
|
(its own harness when left out), --level the Laze models level, --resend asks its session again
|
|
@@ -76274,7 +76601,6 @@ laze agent migrate upload <migrationId> --transcript <file.jsonl> [--profile <ag
|
|
|
76274
76601
|
OpenClaw agent's main session; one over the cap starts at its last compaction
|
|
76275
76602
|
`;
|
|
76276
76603
|
var TARGETS = /* @__PURE__ */ new Set(["claude-code", "codex", "laze-models"]);
|
|
76277
|
-
var LEVELS3 = /* @__PURE__ */ new Set(["fast", "frontier"]);
|
|
76278
76604
|
var HARNESS_NAMES3 = {
|
|
76279
76605
|
"claude-code": "Claude Code",
|
|
76280
76606
|
codex: "Codex",
|
|
@@ -76285,7 +76611,7 @@ var FILE_NAME2 = /^[A-Za-z0-9._-]{1,200}\.jsonl$/;
|
|
|
76285
76611
|
var quoted = (value) => /^[\w.@:+-]+$/.test(value) ? value : `"${value.replaceAll('"', '\\"')}"`;
|
|
76286
76612
|
function targetOf(migration) {
|
|
76287
76613
|
const name3 = HARNESS_NAMES3[migration.target] ?? migration.target;
|
|
76288
|
-
return migration.modelLevel ? `${name3}, ${migration.modelLevel}` : name3;
|
|
76614
|
+
return migration.modelLevel ? `${name3}, ${levelWordOf({ level: migration.modelLevel })}` : name3;
|
|
76289
76615
|
}
|
|
76290
76616
|
function modeLine(migration) {
|
|
76291
76617
|
return migration.mode === "resume" ? "Laze resumes that same session" : "Laze starts a fresh session from a summary of it";
|
|
@@ -76298,8 +76624,9 @@ function agentOf({ args, usage }) {
|
|
|
76298
76624
|
async function migrate({ context, args }) {
|
|
76299
76625
|
const agent3 = args.words[2] ?? "";
|
|
76300
76626
|
const harness = flagText({ args, name: "to" });
|
|
76301
|
-
const
|
|
76302
|
-
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);
|
|
76303
76630
|
if (!agent3 || !known) {
|
|
76304
76631
|
throw new CliUsageError(`Usage: ${MIGRATE_USAGE}`);
|
|
76305
76632
|
}
|
|
@@ -76812,6 +77139,33 @@ var publishLeaseSchemaDefinition = external_exports.object({
|
|
|
76812
77139
|
grantedAt: external_exports.iso.datetime()
|
|
76813
77140
|
});
|
|
76814
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;
|
|
76815
77169
|
var appSchemaDefinition = external_exports.object({
|
|
76816
77170
|
id: external_exports.string().min(1),
|
|
76817
77171
|
workspaceId: external_exports.string().min(1),
|
|
@@ -76843,6 +77197,10 @@ var appSchemaDefinition = external_exports.object({
|
|
|
76843
77197
|
templateName: external_exports.string().nullable().optional(),
|
|
76844
77198
|
/** That template's version when the app was made, so a later version can be offered. */
|
|
76845
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(),
|
|
76846
77204
|
createdAt: external_exports.iso.datetime(),
|
|
76847
77205
|
updatedAt: external_exports.iso.datetime()
|
|
76848
77206
|
});
|
|
@@ -78037,6 +78395,17 @@ var appBackupCheckAlertsSchemaDefinition = external_exports.object({
|
|
|
78037
78395
|
adminUserIds: external_exports.array(external_exports.string())
|
|
78038
78396
|
});
|
|
78039
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
|
+
|
|
78040
78409
|
// ../../modules/app/contract/src/app.templates.ts
|
|
78041
78410
|
var APP_TEMPLATE_SOURCES = ["laze"];
|
|
78042
78411
|
var templateCollectionsSchema = external_exports.record(
|
|
@@ -78553,7 +78922,13 @@ var appConfig = Config.define((c) => ({
|
|
|
78553
78922
|
),
|
|
78554
78923
|
domain: appsDomain,
|
|
78555
78924
|
/** The progress board's alerts folder; unset, an app over its limits is only logged. */
|
|
78556
|
-
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"))
|
|
78557
78932
|
}));
|
|
78558
78933
|
|
|
78559
78934
|
// src/rules/app-build.rules.ts
|
|
@@ -82484,7 +82859,7 @@ async function activityRead({ context, args }) {
|
|
|
82484
82859
|
|
|
82485
82860
|
// src/services/channel-config-commands.service.ts
|
|
82486
82861
|
var AGENT_HINT2 = "Roles, archiving and removing others are a channel admin's change: ask one.\n";
|
|
82487
|
-
var
|
|
82862
|
+
var LEVELS2 = ["default", "all", "mentions", "nothing", "mute", "unmute"];
|
|
82488
82863
|
async function changing2({
|
|
82489
82864
|
context,
|
|
82490
82865
|
profile,
|
|
@@ -82670,7 +83045,7 @@ function instantOf({ until }) {
|
|
|
82670
83045
|
}
|
|
82671
83046
|
function notifyBodyOf({ args }) {
|
|
82672
83047
|
const [, , channel, word3] = args.words;
|
|
82673
|
-
const level2 =
|
|
83048
|
+
const level2 = LEVELS2.find((candidate) => candidate === word3);
|
|
82674
83049
|
if (!channel || !level2) throw new CliUsageError(NOTIFY_USAGE);
|
|
82675
83050
|
if (level2 === "unmute") return { channel, muted: false };
|
|
82676
83051
|
if (level2 !== "mute") return { channel, level: level2 };
|
|
@@ -84671,7 +85046,7 @@ var agentHostGrantDefinition = external_exports.object({
|
|
|
84671
85046
|
});
|
|
84672
85047
|
|
|
84673
85048
|
// ../../modules/compute/contract/src/compute.ts
|
|
84674
|
-
var
|
|
85049
|
+
var idSchema23 = external_exports.string().min(1).max(64);
|
|
84675
85050
|
var workspaceIdSchema22 = external_exports.string().min(1).max(64);
|
|
84676
85051
|
var machineStateSchema = external_exports.enum([
|
|
84677
85052
|
"starting",
|
|
@@ -84693,24 +85068,24 @@ var machinePriceDefinition = external_exports.object({
|
|
|
84693
85068
|
asleepMonthUsd: external_exports.number()
|
|
84694
85069
|
});
|
|
84695
85070
|
var machineGranteeKindSchema = external_exports.enum(["member", "agent"]);
|
|
84696
|
-
var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id:
|
|
85071
|
+
var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id: idSchema23 });
|
|
84697
85072
|
var machineGrantDefinition = external_exports.object({
|
|
84698
85073
|
kind: machineGranteeKindSchema,
|
|
84699
|
-
id:
|
|
84700
|
-
grantedByUserId:
|
|
85074
|
+
id: idSchema23,
|
|
85075
|
+
grantedByUserId: idSchema23,
|
|
84701
85076
|
grantedAt: external_exports.iso.datetime()
|
|
84702
85077
|
});
|
|
84703
85078
|
var machineDefinition = external_exports.object({
|
|
84704
|
-
id:
|
|
85079
|
+
id: idSchema23,
|
|
84705
85080
|
workspaceId: workspaceIdSchema22,
|
|
84706
85081
|
name: external_exports.string(),
|
|
84707
85082
|
type: machineTypeSchema,
|
|
84708
85083
|
zone: external_exports.string(),
|
|
84709
85084
|
state: machineStateSchema,
|
|
84710
|
-
ownerUserId:
|
|
84711
|
-
requesterUserId:
|
|
84712
|
-
renterAgentId:
|
|
84713
|
-
channelId:
|
|
85085
|
+
ownerUserId: idSchema23,
|
|
85086
|
+
requesterUserId: idSchema23,
|
|
85087
|
+
renterAgentId: idSchema23.nullable(),
|
|
85088
|
+
channelId: idSchema23.nullable(),
|
|
84714
85089
|
ipAddress: external_exports.string().nullable(),
|
|
84715
85090
|
sites: external_exports.array(machineSiteDefinition),
|
|
84716
85091
|
/** Members and agents the owner shared the machine with, beyond the owner's own agents. */
|
|
@@ -84742,7 +85117,7 @@ var machineDefinition = external_exports.object({
|
|
|
84742
85117
|
/** The owner's agents set to run on this own machine. */
|
|
84743
85118
|
hostedAgents: external_exports.array(
|
|
84744
85119
|
external_exports.object({
|
|
84745
|
-
id:
|
|
85120
|
+
id: idSchema23,
|
|
84746
85121
|
name: external_exports.string(),
|
|
84747
85122
|
whenOffline: external_exports.enum(["wait", "sandbox"])
|
|
84748
85123
|
})
|
|
@@ -84796,11 +85171,11 @@ var openScreenDefinition = external_exports.object({
|
|
|
84796
85171
|
site: external_exports.string().min(1).max(500).optional()
|
|
84797
85172
|
});
|
|
84798
85173
|
var openScreenInputSchema = openScreenDefinition;
|
|
84799
|
-
var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, sessionId:
|
|
85174
|
+
var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, sessionId: idSchema23 });
|
|
84800
85175
|
var screenRefSchema = screenRefDefinition;
|
|
84801
85176
|
var screenSessionDefinition = external_exports.object({
|
|
84802
|
-
sessionId:
|
|
84803
|
-
machineId:
|
|
85177
|
+
sessionId: idSchema23,
|
|
85178
|
+
machineId: idSchema23,
|
|
84804
85179
|
machineName: external_exports.string(),
|
|
84805
85180
|
site: external_exports.string().nullable(),
|
|
84806
85181
|
expiresAt: external_exports.iso.datetime(),
|
|
@@ -84834,7 +85209,7 @@ var ownMachineSshConnectDefinition = external_exports.object({
|
|
|
84834
85209
|
publicKey: external_exports.string()
|
|
84835
85210
|
});
|
|
84836
85211
|
var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
|
|
84837
|
-
var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, machineId:
|
|
85212
|
+
var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, machineId: idSchema23 });
|
|
84838
85213
|
var ComputeApi = moduleApi()("compute");
|
|
84839
85214
|
var computeCoreTrpc = defineTrpcContract("compute").query("status").withInput(computeWorkspaceInputSchema).withOutput(computeStatusSchema).query("browserTabs").withInput(browserTabListInputSchema).withOutput(browserTabListSchema).query("browserTab").withInput(browserTabInputSchema).withOutput(browserTabSchema).mutation("openBrowserTab").withInput(openBrowserTabInputSchema).withOutput(browserTabSchema).mutation("browserTabScreen").withInput(browserTabInputSchema).withOutput(browserTabScreenSchema).mutation("sizeBrowserTabScreen").withInput(browserTabScreenSizeInputSchema).withOutput(browserTabScreenSizeSchema).mutation("gotoBrowserTab").withInput(browserTabGotoInputSchema).withOutput(browserTabPageSchema).mutation("doneOnBrowserTab").withInput(browserTabInputSchema).withOutput(browserTabSchema).mutation("shareBrowserTab").withInput(browserTabShareInputSchema).withOutput(browserTabSchema).mutation("closeBrowserTab").withInput(browserTabInputSchema).withOutput(external_exports.object({ closed: external_exports.literal(true) })).query("computer").withInput(computeWorkspaceInputSchema).withOutput(computerStatusSchema).mutation("setComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerSizeAnswerSchema).mutation("requestComputerSize").withInput(setComputerSizeInputSchema).withOutput(computerRequestSchema).mutation("cancelComputerRequest").withInput(computerRequestRefSchema).withOutput(computerRequestSchema).mutation("restartComputer").withInput(restartComputerInputSchema).withOutput(computerRestartAnswerSchema).query("computers").withInput(computeWorkspaceInputSchema).withOutput(computerListSchema).query("dedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpStatusSchema).mutation("setDedicatedIp").withInput(setDedicatedIpInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("turnOffDedicatedIp").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpAnswerSchema).mutation("setDedicatedIpDomains").withInput(setDedicatedIpDomainsInputSchema).withOutput(dedicatedIpAnswerSchema).query("dedicatedIps").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpListSchema).query("dedicatedIpCountries").withInput(computeWorkspaceInputSchema).withOutput(dedicatedIpCountriesSchema).query("dedicatedIpOffer").withInput(dedicatedIpOfferInputSchema).withOutput(dedicatedIpOfferSchema).query("list").withInput(computeWorkspaceInputSchema).withOutput(external_exports.array(machineSchema)).query("get").withInput(machineRefSchema).withOutput(machineSchema).mutation("setupBrowser").withInput(setupBrowserInputSchema).withOutput(machineSchema).mutation("sleep").withInput(machineRefSchema).withOutput(machineSchema).mutation("wake").withInput(machineRefSchema).withOutput(machineSchema).mutation("delete").withInput(machineRefSchema).withOutput(machineSchema).mutation("rename").withInput(renameMachineInputSchema).withOutput(machineSchema).mutation("grant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("revokeGrant").withInput(machineGrantInputSchema).withOutput(machineSchema).mutation("setBudget").withInput(setMachineBudgetInputSchema).withOutput(machineSchema).mutation("openScreen").withInput(openScreenInputSchema).withOutput(screenSessionSchema).mutation("finishScreen").withInput(screenRefSchema).withOutput(machineSchema).mutation("connectOwn").withInput(connectOwnMachineInputSchema).withOutput(ownMachineConnectSchema).mutation("newConnectCommand").withInput(machineRefSchema).withOutput(ownMachineConnectSchema).mutation("connectSsh").withInput(connectSshMachineInputSchema).withOutput(ownMachineSshConnectSchema).mutation("trustHostKey").withInput(trustHostKeyInputSchema).withOutput(machineSchema).mutation("checkHealth").withInput(machineRefSchema).withOutput(machineSchema).mutation("hostAgent").withInput(hostAgentInputSchema).withOutput(machineSchema).mutation("unhostAgent").withInput(unhostAgentInputSchema).withOutput(external_exports.object({ agentId: external_exports.string() })).mutation("pairWhatsapp").withInput(machineRefSchema).withOutput(whatsappPairingSchema).query("whatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("cancelWhatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("unpairWhatsapp").withInput(machineRefSchema).withOutput(machineSchema).build();
|
|
84840
85215
|
var computeFleetTrpc = defineTrpcContract("compute").query("myComputers").withInput(computeWorkspaceInputSchema).withOutput(myComputersSchema).mutation("createComputer").withInput(createComputerInputSchema).withOutput(computerStatusSchema).mutation("deleteComputer").withInput(deleteComputerInputSchema).withOutput(deleteComputerAnswerSchema).mutation("setComputerCreators").withInput(setComputerCreatorsInputSchema).withOutput(computerStatusSchema).mutation("setAgentComputer").withInput(setAgentComputerInputSchema).withOutput(agentComputerAnswerSchema).build();
|
|
@@ -85833,7 +86208,26 @@ var judgeStatus = async ({ context, args }) => {
|
|
|
85833
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"
|
|
85834
86209
|
);
|
|
85835
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
|
+
};
|
|
85836
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
|
+
}
|
|
85837
86231
|
const { client } = await signedIn({ context, args });
|
|
85838
86232
|
const devices = await client.get("/api/vault/devices");
|
|
85839
86233
|
if (args.flags.json) return printJson4({ context, data: devices });
|
|
@@ -85935,8 +86329,9 @@ var VAULT_USAGE = `Usage (your own key; an agent's key lists and runs its owner'
|
|
|
85935
86329
|
laze vault audit|activity [--connection <c>] [--limit <n>] [--before <seq>] (audit: admins)
|
|
85936
86330
|
laze vault most-asked [--days <n>] (admins)
|
|
85937
86331
|
laze vault approvals [--state pending] cards you answer; answer them in Laze
|
|
85938
|
-
laze vault judge | laze vault devices
|
|
85939
|
-
|
|
86332
|
+
laze vault judge | laze vault devices
|
|
86333
|
+
laze vault devices rename <deviceId> <name>`;
|
|
86334
|
+
function levelOf2(args) {
|
|
85940
86335
|
const level2 = flagText({ args, name: "level" });
|
|
85941
86336
|
if (!level2) return void 0;
|
|
85942
86337
|
const known = vaultLevelOfCliName(level2);
|
|
@@ -85993,7 +86388,7 @@ function settingsOf(args) {
|
|
|
85993
86388
|
const rules = args.flags.rules;
|
|
85994
86389
|
return {
|
|
85995
86390
|
...label3 && { label: label3 },
|
|
85996
|
-
...
|
|
86391
|
+
...levelOf2(args) && { sensitivity: levelOf2(args) },
|
|
85997
86392
|
...typeof rules === "string" && { rules },
|
|
85998
86393
|
...approvers && { approverUserIds: [...approvers] },
|
|
85999
86394
|
...lease && { maxLeaseSeconds: lease === "none" ? null : secondsOf(lease) },
|
|
@@ -86026,7 +86421,7 @@ var add3 = async ({ context, args }) => {
|
|
|
86026
86421
|
const created = await client.post("/api/vault/connections", {
|
|
86027
86422
|
name: name3,
|
|
86028
86423
|
keychain: await keychainOf2({ client, args }),
|
|
86029
|
-
sensitivity:
|
|
86424
|
+
sensitivity: levelOf2(args) ?? "checked",
|
|
86030
86425
|
...settingsOf(args),
|
|
86031
86426
|
secret
|
|
86032
86427
|
});
|
|
@@ -86236,7 +86631,7 @@ var start = async ({ context, args, client }) => {
|
|
|
86236
86631
|
const provider = wordAt2(args, 2);
|
|
86237
86632
|
const name3 = flagText({ args, name: "name" });
|
|
86238
86633
|
const again = flagText({ args, name: "again" });
|
|
86239
|
-
const level2 =
|
|
86634
|
+
const level2 = levelOf2(args);
|
|
86240
86635
|
const started = await client.post(CONNECTOR_KEY_PATHS.start, {
|
|
86241
86636
|
provider,
|
|
86242
86637
|
keychain: await keychainOf2({ client, args }),
|
|
@@ -86283,7 +86678,7 @@ async function addServer({
|
|
|
86283
86678
|
const label3 = flagText({ args, name: "label" });
|
|
86284
86679
|
if (!name3 || !label3) throw new CliUsageError(CONNECTOR_USAGE);
|
|
86285
86680
|
const again = flagText({ args, name: "again" });
|
|
86286
|
-
const level2 =
|
|
86681
|
+
const level2 = levelOf2(args);
|
|
86287
86682
|
const added = await client.post(CONNECTOR_KEY_PATHS.mcpAdd, {
|
|
86288
86683
|
serverUrl,
|
|
86289
86684
|
name: name3,
|
|
@@ -87258,7 +87653,7 @@ var EXTERNAL_CONNECTION_REST_PATHS = {
|
|
|
87258
87653
|
report: "/api/external-connections/report"
|
|
87259
87654
|
};
|
|
87260
87655
|
var workspaceIdSchema25 = external_exports.string().min(1).max(64);
|
|
87261
|
-
var
|
|
87656
|
+
var idSchema24 = external_exports.string().min(1).max(64);
|
|
87262
87657
|
var iso2 = external_exports.iso.datetime();
|
|
87263
87658
|
var workspaceInput5 = external_exports.object({ workspaceId: workspaceIdSchema25 });
|
|
87264
87659
|
var connectionReference = external_exports.string().trim().min(1).max(120);
|
|
@@ -87364,8 +87759,17 @@ var rosterDefinition = external_exports.object({
|
|
|
87364
87759
|
members: external_exports.array(rosterMemberDefinition)
|
|
87365
87760
|
});
|
|
87366
87761
|
var externalRosterSchema = rosterDefinition;
|
|
87367
|
-
var rosterInputDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, channelId:
|
|
87762
|
+
var rosterInputDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, channelId: idSchema24 });
|
|
87368
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;
|
|
87369
87773
|
var inviteInputDefinition = external_exports.object({
|
|
87370
87774
|
workspaceId: workspaceIdSchema25,
|
|
87371
87775
|
email: external_exports.email().max(320),
|
|
@@ -87375,7 +87779,7 @@ var inviteInputDefinition = external_exports.object({
|
|
|
87375
87779
|
company: external_exports.string().trim().min(1).max(80).optional()
|
|
87376
87780
|
});
|
|
87377
87781
|
var externalInviteInputSchema = inviteInputDefinition;
|
|
87378
|
-
var inviteRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, inviteId:
|
|
87782
|
+
var inviteRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, inviteId: idSchema24 });
|
|
87379
87783
|
var externalInviteRefSchema = inviteRefDefinition;
|
|
87380
87784
|
var pendingShareDefinition = external_exports.object({
|
|
87381
87785
|
channelId: external_exports.string(),
|
|
@@ -87400,7 +87804,7 @@ var externalPendingSharesSchema = pendingSharesDefinition;
|
|
|
87400
87804
|
var acceptInviteDefinition = external_exports.object({
|
|
87401
87805
|
/** The workspace to connect: one where the person is Admin or Owner. */
|
|
87402
87806
|
workspaceId: workspaceIdSchema25,
|
|
87403
|
-
inviteId:
|
|
87807
|
+
inviteId: idSchema24,
|
|
87404
87808
|
/** The emailed link's secret; without it the invitation must be addressed to the person. */
|
|
87405
87809
|
secret: external_exports.string().trim().max(200).optional()
|
|
87406
87810
|
});
|
|
@@ -87428,7 +87832,7 @@ var shareInputDefinition = external_exports.object({
|
|
|
87428
87832
|
var externalShareInputSchema = shareInputDefinition;
|
|
87429
87833
|
var acceptShareDefinition = external_exports.object({
|
|
87430
87834
|
workspaceId: workspaceIdSchema25,
|
|
87431
|
-
shareId:
|
|
87835
|
+
shareId: idSchema24,
|
|
87432
87836
|
/** Its name here; the host's name when left out. */
|
|
87433
87837
|
name: external_exports.string().trim().min(1).max(80).optional(),
|
|
87434
87838
|
visibility: external_exports.enum(["public", "private"]).default("public")
|
|
@@ -87471,7 +87875,7 @@ var directDefinition = external_exports.object({
|
|
|
87471
87875
|
});
|
|
87472
87876
|
var externalDirectSchema = directDefinition;
|
|
87473
87877
|
var ExternalConnectionApi = moduleApi()("external-connection");
|
|
87474
|
-
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();
|
|
87475
87879
|
|
|
87476
87880
|
// ../../modules/external-connection/contract/src/external-connection.config.ts
|
|
87477
87881
|
var externalConnectionConfig = Config.define(() => ({ publicBaseUrl }));
|
|
@@ -88515,7 +88919,7 @@ var feedApprovalSchemaDefinition = external_exports.object({
|
|
|
88515
88919
|
why: external_exports.string(),
|
|
88516
88920
|
/** The longest lease Allow for this agent may give; null offers only once and deny. */
|
|
88517
88921
|
maxLeaseSeconds: external_exports.number().int().positive().nullable(),
|
|
88518
|
-
/** 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. */
|
|
88519
88923
|
coversTask: external_exports.boolean().optional(),
|
|
88520
88924
|
/** A vault card whose key wants a device: Allow goes through a passkey, Touch ID or Face ID. */
|
|
88521
88925
|
deviceApproval: external_exports.boolean().optional(),
|
|
@@ -88641,7 +89045,9 @@ var feedAgentItemSchemaDefinition = external_exports.object({
|
|
|
88641
89045
|
item: feedItemSchema.omit({ me: true }),
|
|
88642
89046
|
recipientUserIds: external_exports.array(external_exports.string()),
|
|
88643
89047
|
/** Person entries newer than the agent's own last reply, as messages ready to act on. */
|
|
88644
|
-
messages: external_exports.array(external_exports.string())
|
|
89048
|
+
messages: external_exports.array(external_exports.string()),
|
|
89049
|
+
/** On a post or update in a turn: the turn's reply will link the card. */
|
|
89050
|
+
linkedToReply: external_exports.boolean().optional()
|
|
88645
89051
|
});
|
|
88646
89052
|
var feedAgentItemSchema = feedAgentItemSchemaDefinition;
|
|
88647
89053
|
var itemRef = external_exports.object({ workspaceId: external_exports.string().min(1), itemId: external_exports.string().min(1) });
|
|
@@ -88866,6 +89272,7 @@ var FeedNavSlot = feedUi.component("nav");
|
|
|
88866
89272
|
var FeedDecisionsSlot = feedUi.component("decisions");
|
|
88867
89273
|
var FeedCountHooksToken = feedUi.hooks("count");
|
|
88868
89274
|
var FeedChannelCardSlot = feedUi.component("channel-card");
|
|
89275
|
+
var FeedReplyLinksSlot = feedUi.component("reply-links");
|
|
88869
89276
|
var FeedDelegateSlot = feedUi.component("delegate");
|
|
88870
89277
|
var FeedSearchSlot = feedUi.component("search");
|
|
88871
89278
|
|
|
@@ -89143,6 +89550,27 @@ async function feedAttachmentIdsOf({
|
|
|
89143
89550
|
}
|
|
89144
89551
|
|
|
89145
89552
|
// src/services/feed-commands.service.ts
|
|
89553
|
+
var FEED_LINKED_LINE = "This card will be linked under your reply.";
|
|
89554
|
+
async function feedTurnOf({
|
|
89555
|
+
context,
|
|
89556
|
+
client,
|
|
89557
|
+
agent: agent3,
|
|
89558
|
+
channel
|
|
89559
|
+
}) {
|
|
89560
|
+
const env = context.environment.inherited;
|
|
89561
|
+
const read4 = async () => {
|
|
89562
|
+
const pinned = env.LAZE_TURN_TOKEN?.trim();
|
|
89563
|
+
if (pinned) return pinned;
|
|
89564
|
+
if (env.LAZE_TURN_FILE) return (await readFile32(env.LAZE_TURN_FILE, "utf8")).trim();
|
|
89565
|
+
return agent3 ? connectedTurnTokenOf({ client, channelId: channel }) : "";
|
|
89566
|
+
};
|
|
89567
|
+
const turn = await read4().catch(() => "");
|
|
89568
|
+
return turn ? client.withHeaders({ "x-laze-turn": turn }) : client;
|
|
89569
|
+
}
|
|
89570
|
+
function sayLinked({ context, item }) {
|
|
89571
|
+
if (item.linkedToReply) context.err(`${FEED_LINKED_LINE}
|
|
89572
|
+
`);
|
|
89573
|
+
}
|
|
89146
89574
|
var USAGE10 = `Usage:
|
|
89147
89575
|
laze feed post <title> [--channel <channel>] [--tag <tag>] [--summary <line>]
|
|
89148
89576
|
[--draft <text|@file>] [--draft-header "To: ...\\nRe: ..."]
|
|
@@ -89247,13 +89675,19 @@ async function feedPost({ context, args }) {
|
|
|
89247
89675
|
const title = args.words.slice(2).join(" ").trim();
|
|
89248
89676
|
if (!title) throw new CliUsageError(USAGE10);
|
|
89249
89677
|
const flags2 = flagsOf(args);
|
|
89250
|
-
const { client } = await signedIn({ context, args });
|
|
89678
|
+
const { client, profile } = await signedIn({ context, args });
|
|
89251
89679
|
const channel = flagText({ args, name: "channel" });
|
|
89252
89680
|
const loop = flagText({ args, name: "loop" });
|
|
89253
89681
|
const body = await bodyOf2({ context, flags: flags2 });
|
|
89254
89682
|
refuseNamedFilesMissing({ args, body, carriesFiles: hasFeedFiles(args) });
|
|
89255
89683
|
const attachmentIds = await feedAttachmentIdsOf({ context, args, client, channel });
|
|
89256
|
-
const
|
|
89684
|
+
const inTurn2 = await feedTurnOf({
|
|
89685
|
+
context,
|
|
89686
|
+
client,
|
|
89687
|
+
agent: profile.kind === "agent",
|
|
89688
|
+
channel: channel || null
|
|
89689
|
+
});
|
|
89690
|
+
const posted = await inTurn2.post("/api/feed/items", {
|
|
89257
89691
|
...body,
|
|
89258
89692
|
title,
|
|
89259
89693
|
...attachmentIds.length > 0 ? { attachmentIds } : {},
|
|
@@ -89262,6 +89696,7 @@ async function feedPost({ context, args }) {
|
|
|
89262
89696
|
...loop && args.flags.reopen ? { reopen: true } : {},
|
|
89263
89697
|
to: [...args.lists.to ?? []]
|
|
89264
89698
|
});
|
|
89699
|
+
sayLinked({ context, item: posted });
|
|
89265
89700
|
if (args.flags.json) return printItem({ context, args, item: posted });
|
|
89266
89701
|
context.out(`${posted.item.id}
|
|
89267
89702
|
`);
|
|
@@ -89270,7 +89705,7 @@ async function feedUpdate({ context, args }) {
|
|
|
89270
89705
|
const itemId = args.words[2];
|
|
89271
89706
|
if (!itemId) throw new CliUsageError(USAGE10);
|
|
89272
89707
|
const flags2 = flagsOf(args);
|
|
89273
|
-
const { client } = await signedIn({ context, args });
|
|
89708
|
+
const { client, profile } = await signedIn({ context, args });
|
|
89274
89709
|
const body = await bodyOf2({ context, flags: flags2 });
|
|
89275
89710
|
const title = flagText({ args, name: "title" });
|
|
89276
89711
|
const removing = args.lists["remove-file"] ?? [];
|
|
@@ -89295,13 +89730,20 @@ async function feedUpdate({ context, args }) {
|
|
|
89295
89730
|
people: current3.recipientUserIds
|
|
89296
89731
|
}) : [];
|
|
89297
89732
|
const attachmentIds = adding || removing.length > 0 ? [...kept.map((file3) => file3.id), ...added] : void 0;
|
|
89298
|
-
const
|
|
89733
|
+
const inTurn2 = await feedTurnOf({
|
|
89734
|
+
context,
|
|
89735
|
+
client,
|
|
89736
|
+
agent: profile.kind === "agent",
|
|
89737
|
+
channel: current3?.item.channelId ?? null
|
|
89738
|
+
});
|
|
89739
|
+
const updated = await inTurn2.post("/api/feed/items/update", {
|
|
89299
89740
|
...body,
|
|
89300
89741
|
...attachmentIds ? { attachmentIds } : {},
|
|
89301
89742
|
...title ? { title } : {},
|
|
89302
89743
|
itemId,
|
|
89303
89744
|
reopen: Boolean(args.flags.reopen)
|
|
89304
89745
|
});
|
|
89746
|
+
sayLinked({ context, item: updated });
|
|
89305
89747
|
printItem({ context, args, item: updated });
|
|
89306
89748
|
}
|
|
89307
89749
|
async function feedReply({ context, args }) {
|
|
@@ -91691,12 +92133,27 @@ async function memory({ context, args }) {
|
|
|
91691
92133
|
var WINDOWS = ["day", "week", "month"];
|
|
91692
92134
|
var USAGE13 = `Usage:
|
|
91693
92135
|
laze models policy whether Laze models are on, the default budget and the cap
|
|
91694
|
-
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)
|
|
91695
92138
|
--default-week, --default-month, --cap-week and --cap-month set the other windows
|
|
91696
92139
|
laze models agents each Laze-model agent's budget and spend
|
|
91697
92140
|
laze models budget <agent> [--day <usd|none>] [--week <usd|none>] [--month <usd|none>]
|
|
91698
92141
|
the agent's owner or an admin, up to the cap; never an agent's own key
|
|
91699
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
|
+
}
|
|
91700
92157
|
var usd = (value) => `${Number(value.toFixed(2))} USD`;
|
|
91701
92158
|
var limitsLine = (limits) => WINDOWS.map(
|
|
91702
92159
|
(window2) => `${window2} ${limits[window2] === null ? "none" : usd(limits[window2])}`
|
|
@@ -91724,6 +92181,8 @@ function printPolicy(context, policy) {
|
|
|
91724
92181
|
const state = policy.lazeModels ? "on" : "off";
|
|
91725
92182
|
const available = policy.available ? "" : " (not set up on this server)";
|
|
91726
92183
|
context.out(`Laze models: ${state}${available}
|
|
92184
|
+
`);
|
|
92185
|
+
context.out(`Default level: ${LEVEL_LINES[policy.defaultLevel ?? "none"]}
|
|
91727
92186
|
`);
|
|
91728
92187
|
context.out(`Default budget per agent: ${limitsLine(policy.defaultBudget)}
|
|
91729
92188
|
`);
|
|
@@ -91744,9 +92203,12 @@ async function setPolicy({ context, args }) {
|
|
|
91744
92203
|
const current3 = await client.get("/api/models/policy");
|
|
91745
92204
|
const defaultBudget = limitsFrom({ args, prefix: "default-", current: current3.defaultBudget });
|
|
91746
92205
|
const cap = limitsFrom({ args, prefix: "cap-", current: current3.cap });
|
|
91747
|
-
|
|
92206
|
+
const defaultLevel = levelFrom({ args });
|
|
92207
|
+
if (!state && !defaultBudget && !cap && defaultLevel === void 0)
|
|
92208
|
+
throw new CliUsageError(USAGE13);
|
|
91748
92209
|
const updated = await client.post("/api/models/policy", {
|
|
91749
92210
|
...state ? { lazeModels: state === "on" } : {},
|
|
92211
|
+
...defaultLevel !== void 0 ? { defaultLevel } : {},
|
|
91750
92212
|
...defaultBudget ? { defaultBudget } : {},
|
|
91751
92213
|
...cap ? { cap } : {}
|
|
91752
92214
|
});
|
|
@@ -95401,8 +95863,9 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95401
95863
|
laze agent reset-session <agent> stop its turn; its next message starts a fresh session
|
|
95402
95864
|
laze agent default [<agent> | --clear] the workspace default agent; an Admin picks a team agent
|
|
95403
95865
|
laze agent logins list|add|rename|remove|check|history your Claude and Codex logins; a token is read from stdin only
|
|
95404
|
-
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
|
|
95405
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
|
|
95406
95869
|
laze agent access|dm|disconnect <agent> who can talk to it, your conversation with it, revoke its key
|
|
95407
95870
|
laze agent permission-prompts <agent> each permission prompt its harness raised and rush's answer
|
|
95408
95871
|
laze agent share|unshare <agent> --person <userId> | --channel <channelId> share it (its owner)
|
|
@@ -95412,7 +95875,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95412
95875
|
without --name the agent picks its own
|
|
95413
95876
|
laze agent invite --reconnect <agent> a link that connects one of your agents again with a new key,
|
|
95414
95877
|
a migrated one back on its own machine
|
|
95415
|
-
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]
|
|
95416
95879
|
move your connected agent into Laze as the same agent; its session uploads its conversation, secrets removed
|
|
95417
95880
|
laze agent migrate status|cancel <agent> the latest migration, or cancel one still waiting
|
|
95418
95881
|
laze agent migrate upload <migrationId> run inside the agent's own session: hands its transcript to Laze
|
|
@@ -95673,6 +96136,7 @@ var COMMANDS3 = {
|
|
|
95673
96136
|
"agent logins": agentLogins,
|
|
95674
96137
|
"agent pools": agentPools,
|
|
95675
96138
|
"agent set-pool": setAgentPool,
|
|
96139
|
+
"agent runs-on": setAgentRunsOn,
|
|
95676
96140
|
notifications,
|
|
95677
96141
|
roles,
|
|
95678
96142
|
audit,
|