@lazehq/cli 0.1.70 → 0.1.72
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 +136 -40
- 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.72";
|
|
36931
36931
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
36932
36932
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
36933
36933
|
}
|
|
@@ -60129,6 +60129,11 @@ var messageRefSchemaDefinition = external_exports.object({
|
|
|
60129
60129
|
threadRootId: idSchema4.nullable(),
|
|
60130
60130
|
messageId: idSchema4
|
|
60131
60131
|
});
|
|
60132
|
+
var messageFeedRefSchemaDefinition = external_exports.object({
|
|
60133
|
+
cardId: idSchema4,
|
|
60134
|
+
kind: external_exports.enum(["added", "updated"])
|
|
60135
|
+
});
|
|
60136
|
+
var MESSAGE_FEED_REFS_MAX = 20;
|
|
60132
60137
|
var messageMembershipSchemaDefinition = external_exports.object({
|
|
60133
60138
|
change: external_exports.enum(["joined", "left", "added", "removed"]),
|
|
60134
60139
|
/** Who joined, left, was added or was removed. */
|
|
@@ -60220,7 +60225,9 @@ var messageSchemaDefinition = external_exports.object({
|
|
|
60220
60225
|
/** The key the sender posted it under, so the sender's screen swaps its pending copy for it. */
|
|
60221
60226
|
clientKey: external_exports.string().optional(),
|
|
60222
60227
|
/** On the sender's post answer only: who the mentions did not reach, being outside it. */
|
|
60223
|
-
notInChannel: external_exports.array(notInChannelSchemaDefinition).optional()
|
|
60228
|
+
notInChannel: external_exports.array(notInChannelSchemaDefinition).optional(),
|
|
60229
|
+
/** An agent's reply: the feed cards it added or changed in that turn; absent means none. */
|
|
60230
|
+
feedRefs: external_exports.array(messageFeedRefSchemaDefinition).max(MESSAGE_FEED_REFS_MAX).optional()
|
|
60224
60231
|
});
|
|
60225
60232
|
var messageSchema = messageSchemaDefinition;
|
|
60226
60233
|
var departedPersonSchemaDefinition = external_exports.object({
|
|
@@ -60536,6 +60543,8 @@ var postMessageInputSchemaDefinition = external_exports.object({
|
|
|
60536
60543
|
/** In a direct message: notify the people in Do Not Disturb anyway, once. */
|
|
60537
60544
|
notifyAnyway: external_exports.boolean().optional(),
|
|
60538
60545
|
attachmentIds: external_exports.array(idSchema4).max(10).default([]),
|
|
60546
|
+
/** The feed cards an agent's reply links; chat keeps them only when an agent posts. */
|
|
60547
|
+
feedRefs: external_exports.array(messageFeedRefSchemaDefinition).max(MESSAGE_FEED_REFS_MAX).optional(),
|
|
60539
60548
|
/** The sender's own key for this post: sending it again answers the message stored first. */
|
|
60540
60549
|
clientKey: external_exports.string().regex(/^[A-Za-z0-9_-]{8,64}$/).optional()
|
|
60541
60550
|
}).refine((input2) => input2.body.trim().length > 0 || input2.attachmentIds.length > 0, {
|
|
@@ -65126,6 +65135,8 @@ var agentRuntimeConfig = Config.define((c) => ({
|
|
|
65126
65135
|
),
|
|
65127
65136
|
/** The progress board's alerts folder; unset, a full host is only logged. */
|
|
65128
65137
|
computerAlertDir: c.env("AGENT_RUNTIME_COMPUTER_ALERT_DIR", external_exports.string().min(1).optional()),
|
|
65138
|
+
/** The workspace whose Owners and Admins get an urgent feed card per capacity incident. */
|
|
65139
|
+
alertWorkspaceId: c.env("AGENT_RUNTIME_ALERT_WORKSPACE_ID", external_exports.string().min(1).optional()),
|
|
65129
65140
|
/** Staff get a POST here once per capacity incident; unset, only the board alert. */
|
|
65130
65141
|
opsWebhookUrl: c.env("AGENT_RUNTIME_OPS_WEBHOOK_URL", external_exports.url().optional()),
|
|
65131
65142
|
/** How often the worker asks each host's vmd for its report. */
|
|
@@ -65195,6 +65206,17 @@ var sizeShape = {
|
|
|
65195
65206
|
cpus: external_exports.number().positive(),
|
|
65196
65207
|
diskGb: external_exports.number().int().positive()
|
|
65197
65208
|
};
|
|
65209
|
+
var capacityNumbersDefinition = external_exports.object({
|
|
65210
|
+
hosts: external_exports.number().int(),
|
|
65211
|
+
awakeComputers: external_exports.number().int(),
|
|
65212
|
+
placedComputers: external_exports.number().int(),
|
|
65213
|
+
awakeCpus: external_exports.number(),
|
|
65214
|
+
awakeCpuLimit: external_exports.number(),
|
|
65215
|
+
awakeMemoryMb: external_exports.number(),
|
|
65216
|
+
awakeMemoryLimitMb: external_exports.number(),
|
|
65217
|
+
placedDiskGb: external_exports.number(),
|
|
65218
|
+
diskLimitGb: external_exports.number()
|
|
65219
|
+
});
|
|
65198
65220
|
var computerPoolFactDefinition = external_exports.discriminatedUnion("kind", [
|
|
65199
65221
|
external_exports.object({
|
|
65200
65222
|
kind: external_exports.literal("host_registered"),
|
|
@@ -65263,7 +65285,27 @@ var computerPoolFactDefinition = external_exports.discriminatedUnion("kind", [
|
|
|
65263
65285
|
wantedMemoryMb: external_exports.number(),
|
|
65264
65286
|
what: external_exports.enum(["create", "wake", "resize"])
|
|
65265
65287
|
}),
|
|
65266
|
-
external_exports.object({ kind: external_exports.literal("pool_restored"), incidentId: external_exports.string(), refusals: external_exports.number() })
|
|
65288
|
+
external_exports.object({ kind: external_exports.literal("pool_restored"), incidentId: external_exports.string(), refusals: external_exports.number() }),
|
|
65289
|
+
/** The feed's urgent card for the alert workspace's Owners and Admins. */
|
|
65290
|
+
external_exports.object({
|
|
65291
|
+
kind: external_exports.literal("capacity_card_raised"),
|
|
65292
|
+
incidentId: external_exports.string(),
|
|
65293
|
+
workspaceId: external_exports.string(),
|
|
65294
|
+
recipientUserIds: external_exports.array(external_exports.string()),
|
|
65295
|
+
computerId: external_exports.string(),
|
|
65296
|
+
what: external_exports.enum(["create", "wake", "resize"]),
|
|
65297
|
+
/** A wake knows no disk: 0. */
|
|
65298
|
+
memoryMb: external_exports.number().int().nonnegative(),
|
|
65299
|
+
cpus: external_exports.number().nonnegative(),
|
|
65300
|
+
diskGb: external_exports.number().int().nonnegative(),
|
|
65301
|
+
numbers: capacityNumbersDefinition
|
|
65302
|
+
}),
|
|
65303
|
+
external_exports.object({
|
|
65304
|
+
kind: external_exports.literal("capacity_card_settled"),
|
|
65305
|
+
incidentId: external_exports.string(),
|
|
65306
|
+
workspaceId: external_exports.string(),
|
|
65307
|
+
refusals: external_exports.number()
|
|
65308
|
+
})
|
|
65267
65309
|
]);
|
|
65268
65310
|
var computerPoolFactRecordDefinition = external_exports.object({
|
|
65269
65311
|
factId: external_exports.string().min(1),
|
|
@@ -68431,13 +68473,22 @@ var callerHistorySchemaDefinition = external_exports.object({
|
|
|
68431
68473
|
liveBefore: external_exports.iso.datetime().nullable()
|
|
68432
68474
|
});
|
|
68433
68475
|
|
|
68434
|
-
// ../../modules/agent/contract/src/agent-
|
|
68476
|
+
// ../../modules/agent/contract/src/agent-feed-refs.ts
|
|
68435
68477
|
var idSchema20 = external_exports.string().min(1).max(80);
|
|
68478
|
+
var recordTurnFeedRefInputSchemaDefinition = external_exports.object({
|
|
68479
|
+
cardId: idSchema20,
|
|
68480
|
+
kind: external_exports.enum(["added", "updated"]),
|
|
68481
|
+
/** The card's own chat threads: a reply in one of them links nothing. */
|
|
68482
|
+
ownThreadRootIds: external_exports.array(idSchema20).max(50).default([])
|
|
68483
|
+
});
|
|
68484
|
+
|
|
68485
|
+
// ../../modules/agent/contract/src/agent-channel-admin.ts
|
|
68486
|
+
var idSchema21 = external_exports.string().min(1).max(80);
|
|
68436
68487
|
var channelRefSchema = external_exports.string().trim().min(1).max(200);
|
|
68437
68488
|
var channelAsCallerInputSchemaDefinition = external_exports.object({ channel: channelRefSchema });
|
|
68438
68489
|
var callerChannelMemberSchemaDefinition = external_exports.object({
|
|
68439
68490
|
kind: external_exports.enum(["person", "agent"]),
|
|
68440
|
-
id:
|
|
68491
|
+
id: idSchema21,
|
|
68441
68492
|
name: external_exports.string(),
|
|
68442
68493
|
role: external_exports.enum(["admin", "member"]),
|
|
68443
68494
|
/** Active, away or unknown for a person the speaker may see; absent for agents. */
|
|
@@ -68447,7 +68498,7 @@ var callerChannelMemberSchemaDefinition = external_exports.object({
|
|
|
68447
68498
|
doNotDisturb: doNotDisturbSchema.nullable().optional()
|
|
68448
68499
|
});
|
|
68449
68500
|
var callerChannelDetailSchemaDefinition = external_exports.object({
|
|
68450
|
-
id:
|
|
68501
|
+
id: idSchema21,
|
|
68451
68502
|
name: external_exports.string(),
|
|
68452
68503
|
kind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
68453
68504
|
topic: external_exports.string(),
|
|
@@ -68478,17 +68529,17 @@ var activityAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
68478
68529
|
limit: external_exports.number().int().min(1).max(100).default(50)
|
|
68479
68530
|
});
|
|
68480
68531
|
var callerActivityItemSchemaDefinition = external_exports.object({
|
|
68481
|
-
id:
|
|
68532
|
+
id: idSchema21,
|
|
68482
68533
|
kind: external_exports.enum(["mention", "thread_reply", "keyword", "reaction"]),
|
|
68483
|
-
channelId:
|
|
68534
|
+
channelId: idSchema21,
|
|
68484
68535
|
channelName: external_exports.string(),
|
|
68485
68536
|
channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
68486
|
-
messageId:
|
|
68487
|
-
threadRootId:
|
|
68537
|
+
messageId: idSchema21,
|
|
68538
|
+
threadRootId: idSchema21.nullable(),
|
|
68488
68539
|
/** `external` is someone outside Laze whose message a mirror brought in, named at the source. */
|
|
68489
68540
|
actor: external_exports.object({
|
|
68490
68541
|
kind: external_exports.enum(["person", "agent", "external"]),
|
|
68491
|
-
id:
|
|
68542
|
+
id: idSchema21,
|
|
68492
68543
|
name: external_exports.string()
|
|
68493
68544
|
}),
|
|
68494
68545
|
emoji: external_exports.string().nullable(),
|
|
@@ -68505,12 +68556,12 @@ var setStatusAsCallerInputSchemaDefinition = setStatusInputSchema.omit({ workspa
|
|
|
68505
68556
|
var setAwayAsCallerInputSchemaDefinition = external_exports.object({ away: external_exports.boolean() });
|
|
68506
68557
|
|
|
68507
68558
|
// ../../modules/agent/contract/src/agent-scheduled.ts
|
|
68508
|
-
var
|
|
68559
|
+
var idSchema22 = external_exports.string().min(1).max(80);
|
|
68509
68560
|
var channelRefSchema2 = external_exports.string().trim().min(1).max(200);
|
|
68510
68561
|
var scheduleAsCallerInputSchemaDefinition = external_exports.object({
|
|
68511
68562
|
channel: channelRefSchema2.optional(),
|
|
68512
|
-
threadRootId:
|
|
68513
|
-
replyTo:
|
|
68563
|
+
threadRootId: idSchema22.optional(),
|
|
68564
|
+
replyTo: idSchema22.optional(),
|
|
68514
68565
|
body: external_exports.string().trim().min(1).max(4e4),
|
|
68515
68566
|
sendAt: external_exports.iso.datetime({ offset: true }),
|
|
68516
68567
|
/** A reply that also goes to the channel at its time (`--also-channel`). */
|
|
@@ -68521,9 +68572,9 @@ var scheduleAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
68521
68572
|
var listScheduledAsCallerInputSchemaDefinition = external_exports.object({
|
|
68522
68573
|
channel: channelRefSchema2.optional()
|
|
68523
68574
|
});
|
|
68524
|
-
var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId:
|
|
68575
|
+
var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId: idSchema22 });
|
|
68525
68576
|
var editScheduledAsCallerInputSchemaDefinition = external_exports.object({
|
|
68526
|
-
scheduledId:
|
|
68577
|
+
scheduledId: idSchema22,
|
|
68527
68578
|
body: external_exports.string().trim().min(1).max(4e4).optional(),
|
|
68528
68579
|
sendAt: external_exports.iso.datetime({ offset: true }).optional()
|
|
68529
68580
|
}).refine((input2) => input2.body !== void 0 || input2.sendAt !== void 0, {
|
|
@@ -74548,6 +74599,9 @@ laze reply MESSAGE_ID "your answer"
|
|
|
74548
74599
|
Use \`-\` instead of the text to read a long answer from stdin. \`laze inbox\` lists messages that
|
|
74549
74600
|
are waiting, if you think one was missed.
|
|
74550
74601
|
|
|
74602
|
+
Your reply is the tool call. When you have replied or posted where it belongs, end the turn
|
|
74603
|
+
without a recap; the person's DM already shows your messages elsewhere.
|
|
74604
|
+
|
|
74551
74605
|
## Other things you can do
|
|
74552
74606
|
|
|
74553
74607
|
- \`laze post <channel> "text"\` posts in a channel you are in. Add \`--image <path|url>\` or
|
|
@@ -74575,6 +74629,9 @@ the full text in \`--draft\`, the recipients and subject in
|
|
|
74575
74629
|
not the drafts folder). Never leave it only in Gmail drafts. If they edit the text on the card,
|
|
74576
74630
|
the press brings you the edited text: update the native draft with it first, then send.
|
|
74577
74631
|
|
|
74632
|
+
A card you post or update while answering is linked under your reply: don't describe where the
|
|
74633
|
+
card is, say what changed.
|
|
74634
|
+
|
|
74578
74635
|
## Apps
|
|
74579
74636
|
|
|
74580
74637
|
Asked for an app (a tracker, a CRM, a dashboard, a page that explains something), read the full
|
|
@@ -84635,7 +84692,7 @@ var agentHostGrantDefinition = external_exports.object({
|
|
|
84635
84692
|
});
|
|
84636
84693
|
|
|
84637
84694
|
// ../../modules/compute/contract/src/compute.ts
|
|
84638
|
-
var
|
|
84695
|
+
var idSchema23 = external_exports.string().min(1).max(64);
|
|
84639
84696
|
var workspaceIdSchema22 = external_exports.string().min(1).max(64);
|
|
84640
84697
|
var machineStateSchema = external_exports.enum([
|
|
84641
84698
|
"starting",
|
|
@@ -84657,24 +84714,24 @@ var machinePriceDefinition = external_exports.object({
|
|
|
84657
84714
|
asleepMonthUsd: external_exports.number()
|
|
84658
84715
|
});
|
|
84659
84716
|
var machineGranteeKindSchema = external_exports.enum(["member", "agent"]);
|
|
84660
|
-
var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id:
|
|
84717
|
+
var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id: idSchema23 });
|
|
84661
84718
|
var machineGrantDefinition = external_exports.object({
|
|
84662
84719
|
kind: machineGranteeKindSchema,
|
|
84663
|
-
id:
|
|
84664
|
-
grantedByUserId:
|
|
84720
|
+
id: idSchema23,
|
|
84721
|
+
grantedByUserId: idSchema23,
|
|
84665
84722
|
grantedAt: external_exports.iso.datetime()
|
|
84666
84723
|
});
|
|
84667
84724
|
var machineDefinition = external_exports.object({
|
|
84668
|
-
id:
|
|
84725
|
+
id: idSchema23,
|
|
84669
84726
|
workspaceId: workspaceIdSchema22,
|
|
84670
84727
|
name: external_exports.string(),
|
|
84671
84728
|
type: machineTypeSchema,
|
|
84672
84729
|
zone: external_exports.string(),
|
|
84673
84730
|
state: machineStateSchema,
|
|
84674
|
-
ownerUserId:
|
|
84675
|
-
requesterUserId:
|
|
84676
|
-
renterAgentId:
|
|
84677
|
-
channelId:
|
|
84731
|
+
ownerUserId: idSchema23,
|
|
84732
|
+
requesterUserId: idSchema23,
|
|
84733
|
+
renterAgentId: idSchema23.nullable(),
|
|
84734
|
+
channelId: idSchema23.nullable(),
|
|
84678
84735
|
ipAddress: external_exports.string().nullable(),
|
|
84679
84736
|
sites: external_exports.array(machineSiteDefinition),
|
|
84680
84737
|
/** Members and agents the owner shared the machine with, beyond the owner's own agents. */
|
|
@@ -84706,7 +84763,7 @@ var machineDefinition = external_exports.object({
|
|
|
84706
84763
|
/** The owner's agents set to run on this own machine. */
|
|
84707
84764
|
hostedAgents: external_exports.array(
|
|
84708
84765
|
external_exports.object({
|
|
84709
|
-
id:
|
|
84766
|
+
id: idSchema23,
|
|
84710
84767
|
name: external_exports.string(),
|
|
84711
84768
|
whenOffline: external_exports.enum(["wait", "sandbox"])
|
|
84712
84769
|
})
|
|
@@ -84760,11 +84817,11 @@ var openScreenDefinition = external_exports.object({
|
|
|
84760
84817
|
site: external_exports.string().min(1).max(500).optional()
|
|
84761
84818
|
});
|
|
84762
84819
|
var openScreenInputSchema = openScreenDefinition;
|
|
84763
|
-
var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, sessionId:
|
|
84820
|
+
var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, sessionId: idSchema23 });
|
|
84764
84821
|
var screenRefSchema = screenRefDefinition;
|
|
84765
84822
|
var screenSessionDefinition = external_exports.object({
|
|
84766
|
-
sessionId:
|
|
84767
|
-
machineId:
|
|
84823
|
+
sessionId: idSchema23,
|
|
84824
|
+
machineId: idSchema23,
|
|
84768
84825
|
machineName: external_exports.string(),
|
|
84769
84826
|
site: external_exports.string().nullable(),
|
|
84770
84827
|
expiresAt: external_exports.iso.datetime(),
|
|
@@ -84798,7 +84855,7 @@ var ownMachineSshConnectDefinition = external_exports.object({
|
|
|
84798
84855
|
publicKey: external_exports.string()
|
|
84799
84856
|
});
|
|
84800
84857
|
var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
|
|
84801
|
-
var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, machineId:
|
|
84858
|
+
var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, machineId: idSchema23 });
|
|
84802
84859
|
var ComputeApi = moduleApi()("compute");
|
|
84803
84860
|
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();
|
|
84804
84861
|
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();
|
|
@@ -87222,7 +87279,7 @@ var EXTERNAL_CONNECTION_REST_PATHS = {
|
|
|
87222
87279
|
report: "/api/external-connections/report"
|
|
87223
87280
|
};
|
|
87224
87281
|
var workspaceIdSchema25 = external_exports.string().min(1).max(64);
|
|
87225
|
-
var
|
|
87282
|
+
var idSchema24 = external_exports.string().min(1).max(64);
|
|
87226
87283
|
var iso2 = external_exports.iso.datetime();
|
|
87227
87284
|
var workspaceInput5 = external_exports.object({ workspaceId: workspaceIdSchema25 });
|
|
87228
87285
|
var connectionReference = external_exports.string().trim().min(1).max(120);
|
|
@@ -87328,7 +87385,7 @@ var rosterDefinition = external_exports.object({
|
|
|
87328
87385
|
members: external_exports.array(rosterMemberDefinition)
|
|
87329
87386
|
});
|
|
87330
87387
|
var externalRosterSchema = rosterDefinition;
|
|
87331
|
-
var rosterInputDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, channelId:
|
|
87388
|
+
var rosterInputDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, channelId: idSchema24 });
|
|
87332
87389
|
var externalRosterInputSchema = rosterInputDefinition;
|
|
87333
87390
|
var inviteInputDefinition = external_exports.object({
|
|
87334
87391
|
workspaceId: workspaceIdSchema25,
|
|
@@ -87339,7 +87396,7 @@ var inviteInputDefinition = external_exports.object({
|
|
|
87339
87396
|
company: external_exports.string().trim().min(1).max(80).optional()
|
|
87340
87397
|
});
|
|
87341
87398
|
var externalInviteInputSchema = inviteInputDefinition;
|
|
87342
|
-
var inviteRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, inviteId:
|
|
87399
|
+
var inviteRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, inviteId: idSchema24 });
|
|
87343
87400
|
var externalInviteRefSchema = inviteRefDefinition;
|
|
87344
87401
|
var pendingShareDefinition = external_exports.object({
|
|
87345
87402
|
channelId: external_exports.string(),
|
|
@@ -87364,7 +87421,7 @@ var externalPendingSharesSchema = pendingSharesDefinition;
|
|
|
87364
87421
|
var acceptInviteDefinition = external_exports.object({
|
|
87365
87422
|
/** The workspace to connect: one where the person is Admin or Owner. */
|
|
87366
87423
|
workspaceId: workspaceIdSchema25,
|
|
87367
|
-
inviteId:
|
|
87424
|
+
inviteId: idSchema24,
|
|
87368
87425
|
/** The emailed link's secret; without it the invitation must be addressed to the person. */
|
|
87369
87426
|
secret: external_exports.string().trim().max(200).optional()
|
|
87370
87427
|
});
|
|
@@ -87392,7 +87449,7 @@ var shareInputDefinition = external_exports.object({
|
|
|
87392
87449
|
var externalShareInputSchema = shareInputDefinition;
|
|
87393
87450
|
var acceptShareDefinition = external_exports.object({
|
|
87394
87451
|
workspaceId: workspaceIdSchema25,
|
|
87395
|
-
shareId:
|
|
87452
|
+
shareId: idSchema24,
|
|
87396
87453
|
/** Its name here; the host's name when left out. */
|
|
87397
87454
|
name: external_exports.string().trim().min(1).max(80).optional(),
|
|
87398
87455
|
visibility: external_exports.enum(["public", "private"]).default("public")
|
|
@@ -88605,7 +88662,9 @@ var feedAgentItemSchemaDefinition = external_exports.object({
|
|
|
88605
88662
|
item: feedItemSchema.omit({ me: true }),
|
|
88606
88663
|
recipientUserIds: external_exports.array(external_exports.string()),
|
|
88607
88664
|
/** Person entries newer than the agent's own last reply, as messages ready to act on. */
|
|
88608
|
-
messages: external_exports.array(external_exports.string())
|
|
88665
|
+
messages: external_exports.array(external_exports.string()),
|
|
88666
|
+
/** On a post or update in a turn: the turn's reply will link the card. */
|
|
88667
|
+
linkedToReply: external_exports.boolean().optional()
|
|
88609
88668
|
});
|
|
88610
88669
|
var feedAgentItemSchema = feedAgentItemSchemaDefinition;
|
|
88611
88670
|
var itemRef = external_exports.object({ workspaceId: external_exports.string().min(1), itemId: external_exports.string().min(1) });
|
|
@@ -88830,6 +88889,7 @@ var FeedNavSlot = feedUi.component("nav");
|
|
|
88830
88889
|
var FeedDecisionsSlot = feedUi.component("decisions");
|
|
88831
88890
|
var FeedCountHooksToken = feedUi.hooks("count");
|
|
88832
88891
|
var FeedChannelCardSlot = feedUi.component("channel-card");
|
|
88892
|
+
var FeedReplyLinksSlot = feedUi.component("reply-links");
|
|
88833
88893
|
var FeedDelegateSlot = feedUi.component("delegate");
|
|
88834
88894
|
var FeedSearchSlot = feedUi.component("search");
|
|
88835
88895
|
|
|
@@ -89107,6 +89167,27 @@ async function feedAttachmentIdsOf({
|
|
|
89107
89167
|
}
|
|
89108
89168
|
|
|
89109
89169
|
// src/services/feed-commands.service.ts
|
|
89170
|
+
var FEED_LINKED_LINE = "This card will be linked under your reply.";
|
|
89171
|
+
async function feedTurnOf({
|
|
89172
|
+
context,
|
|
89173
|
+
client,
|
|
89174
|
+
agent: agent3,
|
|
89175
|
+
channel
|
|
89176
|
+
}) {
|
|
89177
|
+
const env = context.environment.inherited;
|
|
89178
|
+
const read4 = async () => {
|
|
89179
|
+
const pinned = env.LAZE_TURN_TOKEN?.trim();
|
|
89180
|
+
if (pinned) return pinned;
|
|
89181
|
+
if (env.LAZE_TURN_FILE) return (await readFile32(env.LAZE_TURN_FILE, "utf8")).trim();
|
|
89182
|
+
return agent3 ? connectedTurnTokenOf({ client, channelId: channel }) : "";
|
|
89183
|
+
};
|
|
89184
|
+
const turn = await read4().catch(() => "");
|
|
89185
|
+
return turn ? client.withHeaders({ "x-laze-turn": turn }) : client;
|
|
89186
|
+
}
|
|
89187
|
+
function sayLinked({ context, item }) {
|
|
89188
|
+
if (item.linkedToReply) context.err(`${FEED_LINKED_LINE}
|
|
89189
|
+
`);
|
|
89190
|
+
}
|
|
89110
89191
|
var USAGE10 = `Usage:
|
|
89111
89192
|
laze feed post <title> [--channel <channel>] [--tag <tag>] [--summary <line>]
|
|
89112
89193
|
[--draft <text|@file>] [--draft-header "To: ...\\nRe: ..."]
|
|
@@ -89211,13 +89292,19 @@ async function feedPost({ context, args }) {
|
|
|
89211
89292
|
const title = args.words.slice(2).join(" ").trim();
|
|
89212
89293
|
if (!title) throw new CliUsageError(USAGE10);
|
|
89213
89294
|
const flags2 = flagsOf(args);
|
|
89214
|
-
const { client } = await signedIn({ context, args });
|
|
89295
|
+
const { client, profile } = await signedIn({ context, args });
|
|
89215
89296
|
const channel = flagText({ args, name: "channel" });
|
|
89216
89297
|
const loop = flagText({ args, name: "loop" });
|
|
89217
89298
|
const body = await bodyOf2({ context, flags: flags2 });
|
|
89218
89299
|
refuseNamedFilesMissing({ args, body, carriesFiles: hasFeedFiles(args) });
|
|
89219
89300
|
const attachmentIds = await feedAttachmentIdsOf({ context, args, client, channel });
|
|
89220
|
-
const
|
|
89301
|
+
const inTurn2 = await feedTurnOf({
|
|
89302
|
+
context,
|
|
89303
|
+
client,
|
|
89304
|
+
agent: profile.kind === "agent",
|
|
89305
|
+
channel: channel || null
|
|
89306
|
+
});
|
|
89307
|
+
const posted = await inTurn2.post("/api/feed/items", {
|
|
89221
89308
|
...body,
|
|
89222
89309
|
title,
|
|
89223
89310
|
...attachmentIds.length > 0 ? { attachmentIds } : {},
|
|
@@ -89226,6 +89313,7 @@ async function feedPost({ context, args }) {
|
|
|
89226
89313
|
...loop && args.flags.reopen ? { reopen: true } : {},
|
|
89227
89314
|
to: [...args.lists.to ?? []]
|
|
89228
89315
|
});
|
|
89316
|
+
sayLinked({ context, item: posted });
|
|
89229
89317
|
if (args.flags.json) return printItem({ context, args, item: posted });
|
|
89230
89318
|
context.out(`${posted.item.id}
|
|
89231
89319
|
`);
|
|
@@ -89234,7 +89322,7 @@ async function feedUpdate({ context, args }) {
|
|
|
89234
89322
|
const itemId = args.words[2];
|
|
89235
89323
|
if (!itemId) throw new CliUsageError(USAGE10);
|
|
89236
89324
|
const flags2 = flagsOf(args);
|
|
89237
|
-
const { client } = await signedIn({ context, args });
|
|
89325
|
+
const { client, profile } = await signedIn({ context, args });
|
|
89238
89326
|
const body = await bodyOf2({ context, flags: flags2 });
|
|
89239
89327
|
const title = flagText({ args, name: "title" });
|
|
89240
89328
|
const removing = args.lists["remove-file"] ?? [];
|
|
@@ -89259,13 +89347,20 @@ async function feedUpdate({ context, args }) {
|
|
|
89259
89347
|
people: current3.recipientUserIds
|
|
89260
89348
|
}) : [];
|
|
89261
89349
|
const attachmentIds = adding || removing.length > 0 ? [...kept.map((file3) => file3.id), ...added] : void 0;
|
|
89262
|
-
const
|
|
89350
|
+
const inTurn2 = await feedTurnOf({
|
|
89351
|
+
context,
|
|
89352
|
+
client,
|
|
89353
|
+
agent: profile.kind === "agent",
|
|
89354
|
+
channel: current3?.item.channelId ?? null
|
|
89355
|
+
});
|
|
89356
|
+
const updated = await inTurn2.post("/api/feed/items/update", {
|
|
89263
89357
|
...body,
|
|
89264
89358
|
...attachmentIds ? { attachmentIds } : {},
|
|
89265
89359
|
...title ? { title } : {},
|
|
89266
89360
|
itemId,
|
|
89267
89361
|
reopen: Boolean(args.flags.reopen)
|
|
89268
89362
|
});
|
|
89363
|
+
sayLinked({ context, item: updated });
|
|
89269
89364
|
printItem({ context, args, item: updated });
|
|
89270
89365
|
}
|
|
89271
89366
|
async function feedReply({ context, args }) {
|
|
@@ -95301,6 +95396,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
95301
95396
|
laze post <channel> <text|-> [--thread <id>] post as yourself (or as your agent); - reads stdin
|
|
95302
95397
|
laze reply <message-id> <text|-> answer where the message was said: the channel,
|
|
95303
95398
|
or its thread if it is in one; - reads stdin
|
|
95399
|
+
your reply is the post or reply: once it is where it belongs, end the turn with no recap
|
|
95304
95400
|
--new-thread on reply starts a thread under a top-level message instead
|
|
95305
95401
|
--also-channel on a thread reply shows it in the channel too, as "Also send to #channel" does
|
|
95306
95402
|
--image <path|url|fileId> and --file <path|url|fileId> on post or reply attach files
|
package/package.json
CHANGED