@lazehq/cli 0.1.83 → 0.1.84
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 +48 -14
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -36990,7 +36990,7 @@ function flagText({
|
|
|
36990
36990
|
}
|
|
36991
36991
|
|
|
36992
36992
|
// src/rules/cli-version.rules.ts
|
|
36993
|
-
var STAMPED = "0.1.
|
|
36993
|
+
var STAMPED = "0.1.84";
|
|
36994
36994
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
36995
36995
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
36996
36996
|
}
|
|
@@ -62650,6 +62650,11 @@ var conversationSchemaDefinition = external_exports.object({
|
|
|
62650
62650
|
departed: external_exports.array(departedPersonSchemaDefinition).optional()
|
|
62651
62651
|
});
|
|
62652
62652
|
var conversationSchema = conversationSchemaDefinition;
|
|
62653
|
+
var reachableConversationSchemaDefinition = external_exports.object({
|
|
62654
|
+
conversation: conversationSchema,
|
|
62655
|
+
/** Whether any of the asked readers may read it; members are listed either way. */
|
|
62656
|
+
readable: external_exports.boolean()
|
|
62657
|
+
});
|
|
62653
62658
|
var conversationSummarySchemaDefinition = external_exports.object({
|
|
62654
62659
|
...conversationSchemaDefinition.shape,
|
|
62655
62660
|
lastReadSeq: external_exports.number().int().nonnegative(),
|
|
@@ -66230,7 +66235,9 @@ var askAgentApprovalInputSchemaDefinition = external_exports.object({
|
|
|
66230
66235
|
line: external_exports.string().min(1).max(500),
|
|
66231
66236
|
/** What exactly would happen, shown as code on the card. */
|
|
66232
66237
|
call: external_exports.string().max(8e3),
|
|
66233
|
-
deciderIds: external_exports.array(idSchema6).min(1).max(20)
|
|
66238
|
+
deciderIds: external_exports.array(idSchema6).min(1).max(20),
|
|
66239
|
+
/** Offers "Allow for" this long beside Allow once; the answer comes back as `leaseSeconds`. */
|
|
66240
|
+
leaseSeconds: external_exports.number().int().positive().max(30 * 86400).optional()
|
|
66234
66241
|
});
|
|
66235
66242
|
var stopAgentTurnInputSchemaDefinition = external_exports.object({
|
|
66236
66243
|
workspaceId: workspaceIdSchema3,
|
|
@@ -66270,7 +66277,9 @@ var agentAttentionRequestedPayloadSchemaDefinition = external_exports.object({
|
|
|
66270
66277
|
call: external_exports.string(),
|
|
66271
66278
|
/** Who may decide; empty means anyone in the conversation. */
|
|
66272
66279
|
deciderIds: external_exports.array(external_exports.string()),
|
|
66273
|
-
expiresAt: external_exports.iso.datetime()
|
|
66280
|
+
expiresAt: external_exports.iso.datetime(),
|
|
66281
|
+
/** The lease "Allow for" gives on another module's ask; null offers only allow and deny. */
|
|
66282
|
+
alwaysLeaseSeconds: external_exports.number().int().positive().nullable().default(null).catch(null)
|
|
66274
66283
|
});
|
|
66275
66284
|
var agentAttentionResolvedPayloadSchemaDefinition = external_exports.object({
|
|
66276
66285
|
workspaceId: external_exports.string().min(1),
|
|
@@ -66283,7 +66292,9 @@ var agentAttentionResolvedPayloadSchemaDefinition = external_exports.object({
|
|
|
66283
66292
|
channelId: external_exports.string().default(""),
|
|
66284
66293
|
requestId: external_exports.string().default(""),
|
|
66285
66294
|
/** What the waiting harness hears; the worker, which holds the sandbox link, sends it. */
|
|
66286
|
-
harness: attentionAnswerSchema.nullable().default(null).catch(null)
|
|
66295
|
+
harness: attentionAnswerSchema.nullable().default(null).catch(null),
|
|
66296
|
+
/** Another module's ask allowed for a while: the lease the decider picked; null otherwise. */
|
|
66297
|
+
leaseSeconds: external_exports.number().int().positive().nullable().default(null).catch(null)
|
|
66287
66298
|
});
|
|
66288
66299
|
var agentTurnStopRequestedPayloadSchemaDefinition = external_exports.object({
|
|
66289
66300
|
workspaceId: external_exports.string().min(1),
|
|
@@ -86095,13 +86106,23 @@ var WHATSAPP_AGENT_LEVELS = ["allow", "ask", "off"];
|
|
|
86095
86106
|
var whatsappAgentLevelSchema = external_exports.enum(WHATSAPP_AGENT_LEVELS);
|
|
86096
86107
|
var whatsappAgentControlSchema = external_exports.enum(["read", "send"]);
|
|
86097
86108
|
var WHATSAPP_READ_WAIT_MAX_SECONDS = 50;
|
|
86109
|
+
var WHATSAPP_LEASE_CHOICES = [3600, 86400, 172800];
|
|
86110
|
+
var WHATSAPP_LEASE_DEFAULT_SECONDS = 172800;
|
|
86111
|
+
var whatsappLeaseSecondsSchema = external_exports.number().int().refine((seconds) => WHATSAPP_LEASE_CHOICES.includes(seconds), {
|
|
86112
|
+
message: "A lease is 1 hour, 1 day or 2 days"
|
|
86113
|
+
});
|
|
86098
86114
|
var agentAccessDefinition = external_exports.object({
|
|
86099
86115
|
agentId: external_exports.string(),
|
|
86100
86116
|
name: external_exports.string(),
|
|
86101
86117
|
/** Whether anyone besides the owner can talk to the agent. */
|
|
86102
86118
|
shared: external_exports.boolean(),
|
|
86103
86119
|
read: whatsappAgentLevelSchema,
|
|
86104
|
-
send: whatsappAgentLevelSchema
|
|
86120
|
+
send: whatsappAgentLevelSchema,
|
|
86121
|
+
/** What "Allow for" on this agent's cards lasts. */
|
|
86122
|
+
leaseSeconds: external_exports.number().int().positive().default(WHATSAPP_LEASE_DEFAULT_SECONDS),
|
|
86123
|
+
/** Until when a lease lets the agent read, or send, with no card; null when none runs. */
|
|
86124
|
+
readLeaseUntil: external_exports.iso.datetime().nullable().default(null),
|
|
86125
|
+
sendLeaseUntil: external_exports.iso.datetime().nullable().default(null)
|
|
86105
86126
|
});
|
|
86106
86127
|
var agentsDefinition = external_exports.object({
|
|
86107
86128
|
machineId: external_exports.string(),
|
|
@@ -86118,6 +86139,13 @@ var setAgentDefinition = external_exports.object({
|
|
|
86118
86139
|
reauthToken: external_exports.string().min(1).max(200).optional()
|
|
86119
86140
|
});
|
|
86120
86141
|
var setWhatsappAgentInputSchema = setAgentDefinition;
|
|
86142
|
+
var setLeaseDefinition = external_exports.object({
|
|
86143
|
+
workspaceId: external_exports.string().min(1).max(64),
|
|
86144
|
+
machine: external_exports.string().min(1).max(64),
|
|
86145
|
+
agentId: external_exports.string().min(1).max(64),
|
|
86146
|
+
leaseSeconds: whatsappLeaseSecondsSchema
|
|
86147
|
+
});
|
|
86148
|
+
var setWhatsappAgentLeaseInputSchema = setLeaseDefinition;
|
|
86121
86149
|
|
|
86122
86150
|
// ../../modules/compute/contract/src/own-machine-whatsapp.ts
|
|
86123
86151
|
var workspaceIdSchema20 = external_exports.string().min(1).max(64);
|
|
@@ -86625,7 +86653,7 @@ var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
|
|
|
86625
86653
|
var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, machineId: idSchema23 });
|
|
86626
86654
|
var ComputeApi = moduleApi()("compute");
|
|
86627
86655
|
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(whatsappPairInputSchema).withOutput(whatsappPairingSchema).query("whatsappMirror").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).mutation("setWhatsappMirror").withInput(setWhatsappMirrorInputSchema).withOutput(whatsappMirrorSettingsSchema).query("whatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("cancelWhatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("unpairWhatsapp").withInput(machineRefSchema).withOutput(machineSchema).build();
|
|
86628
|
-
var computeFleetTrpc = defineTrpcContract("compute").query("whatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("prepareWhatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).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).query("whatsappAgents").withInput(machineRefSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgent").withInput(setWhatsappAgentInputSchema).withOutput(whatsappAgentsSchema).build();
|
|
86656
|
+
var computeFleetTrpc = defineTrpcContract("compute").query("whatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("prepareWhatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).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).query("whatsappAgents").withInput(machineRefSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgent").withInput(setWhatsappAgentInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgentLease").withInput(setWhatsappAgentLeaseInputSchema).withOutput(whatsappAgentsSchema).build();
|
|
86629
86657
|
var computeTrpc = joinTrpcContracts("compute", computeCoreTrpc, computeFleetTrpc);
|
|
86630
86658
|
var restMachineInputDefinition = external_exports.object({ machine: external_exports.string().min(1).max(64) });
|
|
86631
86659
|
var restRenameInputDefinition = external_exports.object({
|
|
@@ -86696,7 +86724,6 @@ var computeUi = uiTokens("compute");
|
|
|
86696
86724
|
var ComputeWhatsappMessagingSlot = computeUi.component("whatsapp-messaging");
|
|
86697
86725
|
var ComputeBrowserTabSlot = computeUi.component("browser-tab");
|
|
86698
86726
|
var ComputeOpenBrowserSlot = computeUi.component("open-browser");
|
|
86699
|
-
var ComputeBrowserLinkOfferSlot = computeUi.component("browser-link-offer");
|
|
86700
86727
|
|
|
86701
86728
|
// ../../modules/compute/contract/src/computer-copy.ts
|
|
86702
86729
|
var COMPUTER_COPY_MAX_BYTES = 2 * 1024 * 1024 * 1024;
|
|
@@ -90351,6 +90378,10 @@ var replyFeedItemInputSchemaDefinition = external_exports.object({
|
|
|
90351
90378
|
/** Snoozes the item for these people in the same step, as `update` does. */
|
|
90352
90379
|
snoozeFor: feedSnoozeForSchema.optional()
|
|
90353
90380
|
});
|
|
90381
|
+
var feedSetCardSchemaDefinition = external_exports.object({
|
|
90382
|
+
links: external_exports.array(feedLinkSchema),
|
|
90383
|
+
actions: external_exports.array(feedItemActionSchema)
|
|
90384
|
+
});
|
|
90354
90385
|
var feedEntrySchemaDefinition = external_exports.object({
|
|
90355
90386
|
id: external_exports.string(),
|
|
90356
90387
|
author: feedAuthorSchema,
|
|
@@ -90364,7 +90395,9 @@ var feedEntrySchemaDefinition = external_exports.object({
|
|
|
90364
90395
|
urgent: external_exports.boolean(),
|
|
90365
90396
|
createdAt: external_exports.iso.datetime(),
|
|
90366
90397
|
/** Files a person's comment carried, as they were when sent; their bytes stay in chat. */
|
|
90367
|
-
attachments: external_exports.array(feedAttachmentSchemaDefinition).max(FEED_ATTACHMENTS_MAX).optional()
|
|
90398
|
+
attachments: external_exports.array(feedAttachmentSchemaDefinition).max(FEED_ATTACHMENTS_MAX).optional(),
|
|
90399
|
+
/** On an agent's reply: the card's links and actions it set. Spec: feed-reply-card-set.feature */
|
|
90400
|
+
setCard: feedSetCardSchemaDefinition.optional()
|
|
90368
90401
|
});
|
|
90369
90402
|
var feedEntrySchema = feedEntrySchemaDefinition;
|
|
90370
90403
|
var feedApprovalStateSchema = external_exports.enum([
|
|
@@ -90861,6 +90894,7 @@ var FeedNavSlot = feedUi.component("nav");
|
|
|
90861
90894
|
var FeedDecisionsSlot = feedUi.component("decisions");
|
|
90862
90895
|
var FeedCountHooksToken = feedUi.hooks("count");
|
|
90863
90896
|
var FeedChannelCardSlot = feedUi.component("channel-card");
|
|
90897
|
+
var FeedCardPanelSlot = feedUi.component("card-panel");
|
|
90864
90898
|
var FeedReplyLinksSlot = feedUi.component("reply-links");
|
|
90865
90899
|
var FeedDelegateSlot = feedUi.component("delegate");
|
|
90866
90900
|
var FeedSearchSlot = feedUi.component("search");
|
|
@@ -91214,7 +91248,7 @@ var USAGE10 = `Usage:
|
|
|
91214
91248
|
[--image|--file <path|url|fileId>]... (adds) [--remove-file <fileId|name>]...
|
|
91215
91249
|
[--auto-send-on <YYYY-MM-DD>|none] [--priority high|low|normal|<0 to 100>|none]
|
|
91216
91250
|
[--show-at <ISO time>|none] [--snooze-for <userId>... --until <ISO time>|none] [--reopen]
|
|
91217
|
-
laze feed reply <id> <text
|
|
91251
|
+
laze feed reply <id> <text|-> [--done] [--quiet] [--urgent] [--force]
|
|
91218
91252
|
[--snooze-for <userId>... --until <ISO time>]
|
|
91219
91253
|
laze feed read <id>
|
|
91220
91254
|
laze feed inbox
|
|
@@ -91227,7 +91261,7 @@ var USAGE10 = `Usage:
|
|
|
91227
91261
|
laze feed count
|
|
91228
91262
|
laze feed decisions [--json]
|
|
91229
91263
|
laze feed act <id> <actionId> [--draft <text|@file>]
|
|
91230
|
-
laze feed comment <id> <text
|
|
91264
|
+
laze feed comment <id> <text|-> [--draft <text|@file>] [--force]
|
|
91231
91265
|
laze feed done|put-back|unsnooze|pin|unpin <id>
|
|
91232
91266
|
laze feed snooze <id> --until <ISO time>
|
|
91233
91267
|
laze feed channel <channelId>
|
|
@@ -91388,8 +91422,8 @@ async function feedUpdate({ context, args }) {
|
|
|
91388
91422
|
}
|
|
91389
91423
|
async function feedReply({ context, args }) {
|
|
91390
91424
|
const itemId = args.words[2];
|
|
91391
|
-
|
|
91392
|
-
|
|
91425
|
+
if (!itemId || args.words.length < 4) throw new CliUsageError(USAGE10);
|
|
91426
|
+
const text3 = await textOf({ context, args, from: 3 });
|
|
91393
91427
|
const { client } = await signedIn({ context, args });
|
|
91394
91428
|
const replied = await client.post("/api/feed/items/reply", {
|
|
91395
91429
|
itemId,
|
|
@@ -91579,8 +91613,8 @@ async function feedAct({ context, args }) {
|
|
|
91579
91613
|
}
|
|
91580
91614
|
async function feedComment({ context, args }) {
|
|
91581
91615
|
const itemId = args.words[2];
|
|
91582
|
-
|
|
91583
|
-
|
|
91616
|
+
if (!itemId || args.words.length < 4) throw new CliUsageError(USAGE10);
|
|
91617
|
+
const text3 = await textOf({ context, args, from: 3 });
|
|
91584
91618
|
const draft = await textFlag({ context, args, name: "draft" });
|
|
91585
91619
|
const { client } = await signedIn({ context, args });
|
|
91586
91620
|
const item = await client.post("/api/feed/mine/comment", {
|
package/package.json
CHANGED