@lazehq/cli 0.1.71 → 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 +98 -39
- 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, {
|
|
@@ -68464,13 +68473,22 @@ var callerHistorySchemaDefinition = external_exports.object({
|
|
|
68464
68473
|
liveBefore: external_exports.iso.datetime().nullable()
|
|
68465
68474
|
});
|
|
68466
68475
|
|
|
68467
|
-
// ../../modules/agent/contract/src/agent-
|
|
68476
|
+
// ../../modules/agent/contract/src/agent-feed-refs.ts
|
|
68468
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);
|
|
68469
68487
|
var channelRefSchema = external_exports.string().trim().min(1).max(200);
|
|
68470
68488
|
var channelAsCallerInputSchemaDefinition = external_exports.object({ channel: channelRefSchema });
|
|
68471
68489
|
var callerChannelMemberSchemaDefinition = external_exports.object({
|
|
68472
68490
|
kind: external_exports.enum(["person", "agent"]),
|
|
68473
|
-
id:
|
|
68491
|
+
id: idSchema21,
|
|
68474
68492
|
name: external_exports.string(),
|
|
68475
68493
|
role: external_exports.enum(["admin", "member"]),
|
|
68476
68494
|
/** Active, away or unknown for a person the speaker may see; absent for agents. */
|
|
@@ -68480,7 +68498,7 @@ var callerChannelMemberSchemaDefinition = external_exports.object({
|
|
|
68480
68498
|
doNotDisturb: doNotDisturbSchema.nullable().optional()
|
|
68481
68499
|
});
|
|
68482
68500
|
var callerChannelDetailSchemaDefinition = external_exports.object({
|
|
68483
|
-
id:
|
|
68501
|
+
id: idSchema21,
|
|
68484
68502
|
name: external_exports.string(),
|
|
68485
68503
|
kind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
68486
68504
|
topic: external_exports.string(),
|
|
@@ -68511,17 +68529,17 @@ var activityAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
68511
68529
|
limit: external_exports.number().int().min(1).max(100).default(50)
|
|
68512
68530
|
});
|
|
68513
68531
|
var callerActivityItemSchemaDefinition = external_exports.object({
|
|
68514
|
-
id:
|
|
68532
|
+
id: idSchema21,
|
|
68515
68533
|
kind: external_exports.enum(["mention", "thread_reply", "keyword", "reaction"]),
|
|
68516
|
-
channelId:
|
|
68534
|
+
channelId: idSchema21,
|
|
68517
68535
|
channelName: external_exports.string(),
|
|
68518
68536
|
channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
68519
|
-
messageId:
|
|
68520
|
-
threadRootId:
|
|
68537
|
+
messageId: idSchema21,
|
|
68538
|
+
threadRootId: idSchema21.nullable(),
|
|
68521
68539
|
/** `external` is someone outside Laze whose message a mirror brought in, named at the source. */
|
|
68522
68540
|
actor: external_exports.object({
|
|
68523
68541
|
kind: external_exports.enum(["person", "agent", "external"]),
|
|
68524
|
-
id:
|
|
68542
|
+
id: idSchema21,
|
|
68525
68543
|
name: external_exports.string()
|
|
68526
68544
|
}),
|
|
68527
68545
|
emoji: external_exports.string().nullable(),
|
|
@@ -68538,12 +68556,12 @@ var setStatusAsCallerInputSchemaDefinition = setStatusInputSchema.omit({ workspa
|
|
|
68538
68556
|
var setAwayAsCallerInputSchemaDefinition = external_exports.object({ away: external_exports.boolean() });
|
|
68539
68557
|
|
|
68540
68558
|
// ../../modules/agent/contract/src/agent-scheduled.ts
|
|
68541
|
-
var
|
|
68559
|
+
var idSchema22 = external_exports.string().min(1).max(80);
|
|
68542
68560
|
var channelRefSchema2 = external_exports.string().trim().min(1).max(200);
|
|
68543
68561
|
var scheduleAsCallerInputSchemaDefinition = external_exports.object({
|
|
68544
68562
|
channel: channelRefSchema2.optional(),
|
|
68545
|
-
threadRootId:
|
|
68546
|
-
replyTo:
|
|
68563
|
+
threadRootId: idSchema22.optional(),
|
|
68564
|
+
replyTo: idSchema22.optional(),
|
|
68547
68565
|
body: external_exports.string().trim().min(1).max(4e4),
|
|
68548
68566
|
sendAt: external_exports.iso.datetime({ offset: true }),
|
|
68549
68567
|
/** A reply that also goes to the channel at its time (`--also-channel`). */
|
|
@@ -68554,9 +68572,9 @@ var scheduleAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
68554
68572
|
var listScheduledAsCallerInputSchemaDefinition = external_exports.object({
|
|
68555
68573
|
channel: channelRefSchema2.optional()
|
|
68556
68574
|
});
|
|
68557
|
-
var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId:
|
|
68575
|
+
var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId: idSchema22 });
|
|
68558
68576
|
var editScheduledAsCallerInputSchemaDefinition = external_exports.object({
|
|
68559
|
-
scheduledId:
|
|
68577
|
+
scheduledId: idSchema22,
|
|
68560
68578
|
body: external_exports.string().trim().min(1).max(4e4).optional(),
|
|
68561
68579
|
sendAt: external_exports.iso.datetime({ offset: true }).optional()
|
|
68562
68580
|
}).refine((input2) => input2.body !== void 0 || input2.sendAt !== void 0, {
|
|
@@ -74611,6 +74629,9 @@ the full text in \`--draft\`, the recipients and subject in
|
|
|
74611
74629
|
not the drafts folder). Never leave it only in Gmail drafts. If they edit the text on the card,
|
|
74612
74630
|
the press brings you the edited text: update the native draft with it first, then send.
|
|
74613
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
|
+
|
|
74614
74635
|
## Apps
|
|
74615
74636
|
|
|
74616
74637
|
Asked for an app (a tracker, a CRM, a dashboard, a page that explains something), read the full
|
|
@@ -84671,7 +84692,7 @@ var agentHostGrantDefinition = external_exports.object({
|
|
|
84671
84692
|
});
|
|
84672
84693
|
|
|
84673
84694
|
// ../../modules/compute/contract/src/compute.ts
|
|
84674
|
-
var
|
|
84695
|
+
var idSchema23 = external_exports.string().min(1).max(64);
|
|
84675
84696
|
var workspaceIdSchema22 = external_exports.string().min(1).max(64);
|
|
84676
84697
|
var machineStateSchema = external_exports.enum([
|
|
84677
84698
|
"starting",
|
|
@@ -84693,24 +84714,24 @@ var machinePriceDefinition = external_exports.object({
|
|
|
84693
84714
|
asleepMonthUsd: external_exports.number()
|
|
84694
84715
|
});
|
|
84695
84716
|
var machineGranteeKindSchema = external_exports.enum(["member", "agent"]);
|
|
84696
|
-
var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id:
|
|
84717
|
+
var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id: idSchema23 });
|
|
84697
84718
|
var machineGrantDefinition = external_exports.object({
|
|
84698
84719
|
kind: machineGranteeKindSchema,
|
|
84699
|
-
id:
|
|
84700
|
-
grantedByUserId:
|
|
84720
|
+
id: idSchema23,
|
|
84721
|
+
grantedByUserId: idSchema23,
|
|
84701
84722
|
grantedAt: external_exports.iso.datetime()
|
|
84702
84723
|
});
|
|
84703
84724
|
var machineDefinition = external_exports.object({
|
|
84704
|
-
id:
|
|
84725
|
+
id: idSchema23,
|
|
84705
84726
|
workspaceId: workspaceIdSchema22,
|
|
84706
84727
|
name: external_exports.string(),
|
|
84707
84728
|
type: machineTypeSchema,
|
|
84708
84729
|
zone: external_exports.string(),
|
|
84709
84730
|
state: machineStateSchema,
|
|
84710
|
-
ownerUserId:
|
|
84711
|
-
requesterUserId:
|
|
84712
|
-
renterAgentId:
|
|
84713
|
-
channelId:
|
|
84731
|
+
ownerUserId: idSchema23,
|
|
84732
|
+
requesterUserId: idSchema23,
|
|
84733
|
+
renterAgentId: idSchema23.nullable(),
|
|
84734
|
+
channelId: idSchema23.nullable(),
|
|
84714
84735
|
ipAddress: external_exports.string().nullable(),
|
|
84715
84736
|
sites: external_exports.array(machineSiteDefinition),
|
|
84716
84737
|
/** Members and agents the owner shared the machine with, beyond the owner's own agents. */
|
|
@@ -84742,7 +84763,7 @@ var machineDefinition = external_exports.object({
|
|
|
84742
84763
|
/** The owner's agents set to run on this own machine. */
|
|
84743
84764
|
hostedAgents: external_exports.array(
|
|
84744
84765
|
external_exports.object({
|
|
84745
|
-
id:
|
|
84766
|
+
id: idSchema23,
|
|
84746
84767
|
name: external_exports.string(),
|
|
84747
84768
|
whenOffline: external_exports.enum(["wait", "sandbox"])
|
|
84748
84769
|
})
|
|
@@ -84796,11 +84817,11 @@ var openScreenDefinition = external_exports.object({
|
|
|
84796
84817
|
site: external_exports.string().min(1).max(500).optional()
|
|
84797
84818
|
});
|
|
84798
84819
|
var openScreenInputSchema = openScreenDefinition;
|
|
84799
|
-
var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, sessionId:
|
|
84820
|
+
var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, sessionId: idSchema23 });
|
|
84800
84821
|
var screenRefSchema = screenRefDefinition;
|
|
84801
84822
|
var screenSessionDefinition = external_exports.object({
|
|
84802
|
-
sessionId:
|
|
84803
|
-
machineId:
|
|
84823
|
+
sessionId: idSchema23,
|
|
84824
|
+
machineId: idSchema23,
|
|
84804
84825
|
machineName: external_exports.string(),
|
|
84805
84826
|
site: external_exports.string().nullable(),
|
|
84806
84827
|
expiresAt: external_exports.iso.datetime(),
|
|
@@ -84834,7 +84855,7 @@ var ownMachineSshConnectDefinition = external_exports.object({
|
|
|
84834
84855
|
publicKey: external_exports.string()
|
|
84835
84856
|
});
|
|
84836
84857
|
var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
|
|
84837
|
-
var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, machineId:
|
|
84858
|
+
var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, machineId: idSchema23 });
|
|
84838
84859
|
var ComputeApi = moduleApi()("compute");
|
|
84839
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();
|
|
84840
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();
|
|
@@ -87258,7 +87279,7 @@ var EXTERNAL_CONNECTION_REST_PATHS = {
|
|
|
87258
87279
|
report: "/api/external-connections/report"
|
|
87259
87280
|
};
|
|
87260
87281
|
var workspaceIdSchema25 = external_exports.string().min(1).max(64);
|
|
87261
|
-
var
|
|
87282
|
+
var idSchema24 = external_exports.string().min(1).max(64);
|
|
87262
87283
|
var iso2 = external_exports.iso.datetime();
|
|
87263
87284
|
var workspaceInput5 = external_exports.object({ workspaceId: workspaceIdSchema25 });
|
|
87264
87285
|
var connectionReference = external_exports.string().trim().min(1).max(120);
|
|
@@ -87364,7 +87385,7 @@ var rosterDefinition = external_exports.object({
|
|
|
87364
87385
|
members: external_exports.array(rosterMemberDefinition)
|
|
87365
87386
|
});
|
|
87366
87387
|
var externalRosterSchema = rosterDefinition;
|
|
87367
|
-
var rosterInputDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, channelId:
|
|
87388
|
+
var rosterInputDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, channelId: idSchema24 });
|
|
87368
87389
|
var externalRosterInputSchema = rosterInputDefinition;
|
|
87369
87390
|
var inviteInputDefinition = external_exports.object({
|
|
87370
87391
|
workspaceId: workspaceIdSchema25,
|
|
@@ -87375,7 +87396,7 @@ var inviteInputDefinition = external_exports.object({
|
|
|
87375
87396
|
company: external_exports.string().trim().min(1).max(80).optional()
|
|
87376
87397
|
});
|
|
87377
87398
|
var externalInviteInputSchema = inviteInputDefinition;
|
|
87378
|
-
var inviteRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, inviteId:
|
|
87399
|
+
var inviteRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema25, inviteId: idSchema24 });
|
|
87379
87400
|
var externalInviteRefSchema = inviteRefDefinition;
|
|
87380
87401
|
var pendingShareDefinition = external_exports.object({
|
|
87381
87402
|
channelId: external_exports.string(),
|
|
@@ -87400,7 +87421,7 @@ var externalPendingSharesSchema = pendingSharesDefinition;
|
|
|
87400
87421
|
var acceptInviteDefinition = external_exports.object({
|
|
87401
87422
|
/** The workspace to connect: one where the person is Admin or Owner. */
|
|
87402
87423
|
workspaceId: workspaceIdSchema25,
|
|
87403
|
-
inviteId:
|
|
87424
|
+
inviteId: idSchema24,
|
|
87404
87425
|
/** The emailed link's secret; without it the invitation must be addressed to the person. */
|
|
87405
87426
|
secret: external_exports.string().trim().max(200).optional()
|
|
87406
87427
|
});
|
|
@@ -87428,7 +87449,7 @@ var shareInputDefinition = external_exports.object({
|
|
|
87428
87449
|
var externalShareInputSchema = shareInputDefinition;
|
|
87429
87450
|
var acceptShareDefinition = external_exports.object({
|
|
87430
87451
|
workspaceId: workspaceIdSchema25,
|
|
87431
|
-
shareId:
|
|
87452
|
+
shareId: idSchema24,
|
|
87432
87453
|
/** Its name here; the host's name when left out. */
|
|
87433
87454
|
name: external_exports.string().trim().min(1).max(80).optional(),
|
|
87434
87455
|
visibility: external_exports.enum(["public", "private"]).default("public")
|
|
@@ -88641,7 +88662,9 @@ var feedAgentItemSchemaDefinition = external_exports.object({
|
|
|
88641
88662
|
item: feedItemSchema.omit({ me: true }),
|
|
88642
88663
|
recipientUserIds: external_exports.array(external_exports.string()),
|
|
88643
88664
|
/** Person entries newer than the agent's own last reply, as messages ready to act on. */
|
|
88644
|
-
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()
|
|
88645
88668
|
});
|
|
88646
88669
|
var feedAgentItemSchema = feedAgentItemSchemaDefinition;
|
|
88647
88670
|
var itemRef = external_exports.object({ workspaceId: external_exports.string().min(1), itemId: external_exports.string().min(1) });
|
|
@@ -88866,6 +88889,7 @@ var FeedNavSlot = feedUi.component("nav");
|
|
|
88866
88889
|
var FeedDecisionsSlot = feedUi.component("decisions");
|
|
88867
88890
|
var FeedCountHooksToken = feedUi.hooks("count");
|
|
88868
88891
|
var FeedChannelCardSlot = feedUi.component("channel-card");
|
|
88892
|
+
var FeedReplyLinksSlot = feedUi.component("reply-links");
|
|
88869
88893
|
var FeedDelegateSlot = feedUi.component("delegate");
|
|
88870
88894
|
var FeedSearchSlot = feedUi.component("search");
|
|
88871
88895
|
|
|
@@ -89143,6 +89167,27 @@ async function feedAttachmentIdsOf({
|
|
|
89143
89167
|
}
|
|
89144
89168
|
|
|
89145
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
|
+
}
|
|
89146
89191
|
var USAGE10 = `Usage:
|
|
89147
89192
|
laze feed post <title> [--channel <channel>] [--tag <tag>] [--summary <line>]
|
|
89148
89193
|
[--draft <text|@file>] [--draft-header "To: ...\\nRe: ..."]
|
|
@@ -89247,13 +89292,19 @@ async function feedPost({ context, args }) {
|
|
|
89247
89292
|
const title = args.words.slice(2).join(" ").trim();
|
|
89248
89293
|
if (!title) throw new CliUsageError(USAGE10);
|
|
89249
89294
|
const flags2 = flagsOf(args);
|
|
89250
|
-
const { client } = await signedIn({ context, args });
|
|
89295
|
+
const { client, profile } = await signedIn({ context, args });
|
|
89251
89296
|
const channel = flagText({ args, name: "channel" });
|
|
89252
89297
|
const loop = flagText({ args, name: "loop" });
|
|
89253
89298
|
const body = await bodyOf2({ context, flags: flags2 });
|
|
89254
89299
|
refuseNamedFilesMissing({ args, body, carriesFiles: hasFeedFiles(args) });
|
|
89255
89300
|
const attachmentIds = await feedAttachmentIdsOf({ context, args, client, channel });
|
|
89256
|
-
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", {
|
|
89257
89308
|
...body,
|
|
89258
89309
|
title,
|
|
89259
89310
|
...attachmentIds.length > 0 ? { attachmentIds } : {},
|
|
@@ -89262,6 +89313,7 @@ async function feedPost({ context, args }) {
|
|
|
89262
89313
|
...loop && args.flags.reopen ? { reopen: true } : {},
|
|
89263
89314
|
to: [...args.lists.to ?? []]
|
|
89264
89315
|
});
|
|
89316
|
+
sayLinked({ context, item: posted });
|
|
89265
89317
|
if (args.flags.json) return printItem({ context, args, item: posted });
|
|
89266
89318
|
context.out(`${posted.item.id}
|
|
89267
89319
|
`);
|
|
@@ -89270,7 +89322,7 @@ async function feedUpdate({ context, args }) {
|
|
|
89270
89322
|
const itemId = args.words[2];
|
|
89271
89323
|
if (!itemId) throw new CliUsageError(USAGE10);
|
|
89272
89324
|
const flags2 = flagsOf(args);
|
|
89273
|
-
const { client } = await signedIn({ context, args });
|
|
89325
|
+
const { client, profile } = await signedIn({ context, args });
|
|
89274
89326
|
const body = await bodyOf2({ context, flags: flags2 });
|
|
89275
89327
|
const title = flagText({ args, name: "title" });
|
|
89276
89328
|
const removing = args.lists["remove-file"] ?? [];
|
|
@@ -89295,13 +89347,20 @@ async function feedUpdate({ context, args }) {
|
|
|
89295
89347
|
people: current3.recipientUserIds
|
|
89296
89348
|
}) : [];
|
|
89297
89349
|
const attachmentIds = adding || removing.length > 0 ? [...kept.map((file3) => file3.id), ...added] : void 0;
|
|
89298
|
-
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", {
|
|
89299
89357
|
...body,
|
|
89300
89358
|
...attachmentIds ? { attachmentIds } : {},
|
|
89301
89359
|
...title ? { title } : {},
|
|
89302
89360
|
itemId,
|
|
89303
89361
|
reopen: Boolean(args.flags.reopen)
|
|
89304
89362
|
});
|
|
89363
|
+
sayLinked({ context, item: updated });
|
|
89305
89364
|
printItem({ context, args, item: updated });
|
|
89306
89365
|
}
|
|
89307
89366
|
async function feedReply({ context, args }) {
|
package/package.json
CHANGED