@lazehq/cli 0.1.53 → 0.1.54
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 +338 -103
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -13696,8 +13696,8 @@ var require_pool_base = __commonJS({
|
|
|
13696
13696
|
}
|
|
13697
13697
|
get [kPending]() {
|
|
13698
13698
|
let ret = this[kQueued];
|
|
13699
|
-
for (const { [kPending]:
|
|
13700
|
-
ret +=
|
|
13699
|
+
for (const { [kPending]: pending2 } of this[kClients]) {
|
|
13700
|
+
ret += pending2;
|
|
13701
13701
|
}
|
|
13702
13702
|
return ret;
|
|
13703
13703
|
}
|
|
@@ -18623,19 +18623,19 @@ var require_mock_agent = __commonJS({
|
|
|
18623
18623
|
}
|
|
18624
18624
|
pendingInterceptors() {
|
|
18625
18625
|
const mockAgentClients = this[kClients];
|
|
18626
|
-
return Array.from(mockAgentClients.entries()).flatMap(([origin, dispatcher]) => dispatcher[kDispatches].map((dispatch) => ({ ...dispatch, origin }))).filter(({ pending }) =>
|
|
18626
|
+
return Array.from(mockAgentClients.entries()).flatMap(([origin, dispatcher]) => dispatcher[kDispatches].map((dispatch) => ({ ...dispatch, origin }))).filter(({ pending: pending2 }) => pending2);
|
|
18627
18627
|
}
|
|
18628
18628
|
assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) {
|
|
18629
|
-
const
|
|
18630
|
-
if (
|
|
18629
|
+
const pending2 = this.pendingInterceptors();
|
|
18630
|
+
if (pending2.length === 0) {
|
|
18631
18631
|
return;
|
|
18632
18632
|
}
|
|
18633
18633
|
throw new UndiciError(
|
|
18634
|
-
|
|
18634
|
+
pending2.length === 1 ? `1 interceptor is pending:
|
|
18635
18635
|
|
|
18636
|
-
${pendingInterceptorsFormatter.format(
|
|
18636
|
+
${pendingInterceptorsFormatter.format(pending2)}`.trim() : `${pending2.length} interceptors are pending:
|
|
18637
18637
|
|
|
18638
|
-
${pendingInterceptorsFormatter.format(
|
|
18638
|
+
${pendingInterceptorsFormatter.format(pending2)}`.trim()
|
|
18639
18639
|
);
|
|
18640
18640
|
}
|
|
18641
18641
|
};
|
|
@@ -35738,7 +35738,8 @@ var SWITCHES = /* @__PURE__ */ new Set([
|
|
|
35738
35738
|
"done",
|
|
35739
35739
|
"names",
|
|
35740
35740
|
"shell",
|
|
35741
|
-
"self"
|
|
35741
|
+
"self",
|
|
35742
|
+
"all"
|
|
35742
35743
|
]);
|
|
35743
35744
|
function parseArgs({ argv }) {
|
|
35744
35745
|
const words = [];
|
|
@@ -35776,7 +35777,7 @@ function flagText({
|
|
|
35776
35777
|
}
|
|
35777
35778
|
|
|
35778
35779
|
// src/rules/cli-version.rules.ts
|
|
35779
|
-
var STAMPED = "0.1.
|
|
35780
|
+
var STAMPED = "0.1.54";
|
|
35780
35781
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
35781
35782
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
35782
35783
|
}
|
|
@@ -52433,13 +52434,13 @@ var recordProcessor = (schema, ctx, _json, params) => {
|
|
|
52433
52434
|
...params,
|
|
52434
52435
|
path: [...params.path, "propertyNames"]
|
|
52435
52436
|
});
|
|
52436
|
-
let
|
|
52437
|
-
if (!
|
|
52438
|
-
|
|
52439
|
-
pendingRecords.set(ctx,
|
|
52437
|
+
let pending2 = pendingRecords.get(ctx);
|
|
52438
|
+
if (!pending2) {
|
|
52439
|
+
pending2 = [];
|
|
52440
|
+
pendingRecords.set(ctx, pending2);
|
|
52440
52441
|
ctx.deferred.push(() => rewriteKeyNames(ctx));
|
|
52441
52442
|
}
|
|
52442
|
-
|
|
52443
|
+
pending2.push(schema);
|
|
52443
52444
|
}
|
|
52444
52445
|
json6.additionalProperties = processSchema(def.valueType, ctx, {
|
|
52445
52446
|
...params,
|
|
@@ -58243,7 +58244,9 @@ var unfurlSchemaDefinition = external_exports.object({
|
|
|
58243
58244
|
title: external_exports.string().nullable(),
|
|
58244
58245
|
description: external_exports.string().nullable(),
|
|
58245
58246
|
siteName: external_exports.string().nullable(),
|
|
58246
|
-
image: boxSchema.nullable()
|
|
58247
|
+
image: boxSchema.nullable(),
|
|
58248
|
+
/** The site has an icon, read with `unfurlImage` and part `icon`. */
|
|
58249
|
+
icon: external_exports.boolean().default(false)
|
|
58247
58250
|
});
|
|
58248
58251
|
var mirrorSourceSchema = external_exports.enum(["slack", "whatsapp_business", "laze"]);
|
|
58249
58252
|
var mirrorDeliverySchema = external_exports.enum(["waiting", "failed"]);
|
|
@@ -58695,7 +58698,9 @@ var browsableChannelSchemaDefinition = external_exports.object({
|
|
|
58695
58698
|
private: external_exports.boolean().default(false),
|
|
58696
58699
|
/** The newest message's time; null before the first message. */
|
|
58697
58700
|
lastMessageAt: external_exports.iso.datetime().nullable().default(null),
|
|
58698
|
-
createdAt: external_exports.iso.datetime().nullable().default(null)
|
|
58701
|
+
createdAt: external_exports.iso.datetime().nullable().default(null),
|
|
58702
|
+
/** Where it is mirrored from, such as Slack; null for a channel that lives only in Laze. */
|
|
58703
|
+
mirrorSource: mirrorSourceSchema.nullable().optional()
|
|
58699
58704
|
});
|
|
58700
58705
|
var browsableChannelSchema = browsableChannelSchemaDefinition;
|
|
58701
58706
|
var historyPageSchemaDefinition = external_exports.object({
|
|
@@ -58713,6 +58718,8 @@ var searchHitSchemaDefinition = external_exports.object({
|
|
|
58713
58718
|
message: messageSchemaDefinition,
|
|
58714
58719
|
channelName: external_exports.string(),
|
|
58715
58720
|
channelKind: conversationKindSchema,
|
|
58721
|
+
/** Where the channel is mirrored from, such as Slack; null for one that lives only in Laze. */
|
|
58722
|
+
channelSource: mirrorSourceSchema.nullable().optional(),
|
|
58716
58723
|
/** The attachments whose name or text matched, when the match was in a file. */
|
|
58717
58724
|
matchedAttachmentIds: external_exports.array(idSchema4)
|
|
58718
58725
|
});
|
|
@@ -58776,6 +58783,13 @@ var updateChannelInputSchemaDefinition = external_exports.object({
|
|
|
58776
58783
|
var updateChannelInputSchema = updateChannelInputSchemaDefinition;
|
|
58777
58784
|
var logChannelHintSchemaDefinition = external_exports.object({ suggested: external_exports.boolean() });
|
|
58778
58785
|
var logChannelHintSchema = logChannelHintSchemaDefinition;
|
|
58786
|
+
var externalNoticeSchemaDefinition = external_exports.object({ seen: external_exports.array(external_exports.string()) });
|
|
58787
|
+
var externalNoticeSchema = externalNoticeSchemaDefinition;
|
|
58788
|
+
var dismissExternalNoticeInputSchemaDefinition = external_exports.object({
|
|
58789
|
+
...channelInputSchemaDefinition.shape,
|
|
58790
|
+
seen: external_exports.array(external_exports.string().min(1).max(200)).max(1e3)
|
|
58791
|
+
});
|
|
58792
|
+
var dismissExternalNoticeInputSchema = dismissExternalNoticeInputSchemaDefinition;
|
|
58779
58793
|
var setDefaultAgentInputSchemaDefinition = external_exports.object({
|
|
58780
58794
|
workspaceId: workspaceIdSchema,
|
|
58781
58795
|
channelId: idSchema4,
|
|
@@ -58992,7 +59006,9 @@ var updateMirroredInputSchemaDefinition = external_exports.object({
|
|
|
58992
59006
|
layout: messageLayoutSchema.nullable().optional(),
|
|
58993
59007
|
deleted: external_exports.boolean().default(false),
|
|
58994
59008
|
/** Laze read the source's message again, which is not an edit: no edited mark. */
|
|
58995
|
-
rerendered: external_exports.boolean().default(false)
|
|
59009
|
+
rerendered: external_exports.boolean().default(false),
|
|
59010
|
+
/** The source says the message was never edited: an edited mark Laze gave it comes off. */
|
|
59011
|
+
neverEdited: external_exports.boolean().default(false)
|
|
58996
59012
|
});
|
|
58997
59013
|
var pinMirroredInputSchemaDefinition = external_exports.object({
|
|
58998
59014
|
workspaceId: workspaceIdSchema,
|
|
@@ -59250,6 +59266,25 @@ var hideUnfurlInputSchemaDefinition = external_exports.object({
|
|
|
59250
59266
|
unfurlId: idSchema4
|
|
59251
59267
|
});
|
|
59252
59268
|
var hideUnfurlInputSchema = hideUnfurlInputSchemaDefinition;
|
|
59269
|
+
var customEmojiNameSchema = external_exports.string().regex(/^[a-z0-9_+'-]{1,100}$/).describe("A custom emoji's name, as written between colons.");
|
|
59270
|
+
var customEmojiSchemaDefinition = external_exports.object({
|
|
59271
|
+
name: customEmojiNameSchema,
|
|
59272
|
+
url: external_exports.string().max(2e3).regex(/^https:\/\/[^\s()<>]+$/)
|
|
59273
|
+
});
|
|
59274
|
+
var customEmojiListSchemaDefinition = external_exports.object({ emoji: external_exports.array(customEmojiSchemaDefinition) });
|
|
59275
|
+
var customEmojiListSchema = customEmojiListSchemaDefinition;
|
|
59276
|
+
var saveCustomEmojiInputSchemaDefinition = external_exports.object({
|
|
59277
|
+
workspaceId: workspaceIdSchema,
|
|
59278
|
+
emoji: external_exports.array(customEmojiSchemaDefinition).max(1e4),
|
|
59279
|
+
/** Names the source no longer has, dropped from the workspace's set. */
|
|
59280
|
+
removed: external_exports.array(customEmojiNameSchema).max(1e4).default([])
|
|
59281
|
+
});
|
|
59282
|
+
var unfurlImageInputSchemaDefinition = external_exports.object({
|
|
59283
|
+
...hideUnfurlInputSchemaDefinition.shape,
|
|
59284
|
+
/** The preview's picture, or the site's icon. */
|
|
59285
|
+
part: external_exports.enum(["image", "icon"]).default("image")
|
|
59286
|
+
});
|
|
59287
|
+
var unfurlImageInputSchema = unfurlImageInputSchemaDefinition;
|
|
59253
59288
|
var notifyLevelSchema = external_exports.enum(["default", "all", "mentions", "nothing"]);
|
|
59254
59289
|
var setNotifyInputSchemaDefinition = external_exports.object({
|
|
59255
59290
|
workspaceId: workspaceIdSchema,
|
|
@@ -59334,7 +59369,11 @@ var notificationSummaryEntrySchemaDefinition = external_exports.object({
|
|
|
59334
59369
|
body: external_exports.string(),
|
|
59335
59370
|
/** The address in Laze that opens it, without the origin. */
|
|
59336
59371
|
path: external_exports.string(),
|
|
59337
|
-
at: external_exports.iso.datetime()
|
|
59372
|
+
at: external_exports.iso.datetime(),
|
|
59373
|
+
/** The conversation it is in, by name ("sam", "#dev") and id, with what is unread in it. */
|
|
59374
|
+
name: external_exports.string(),
|
|
59375
|
+
conversationId: external_exports.string(),
|
|
59376
|
+
count: external_exports.number().int().positive()
|
|
59338
59377
|
});
|
|
59339
59378
|
var notificationSummarySchemaDefinition = external_exports.object({
|
|
59340
59379
|
count: external_exports.number().int().nonnegative(),
|
|
@@ -59551,10 +59590,10 @@ var joinedChannelSchemaDefinition = external_exports.object({
|
|
|
59551
59590
|
kind: external_exports.enum(["public", "private"])
|
|
59552
59591
|
});
|
|
59553
59592
|
var ChatApi = moduleApi()("chat");
|
|
59554
|
-
var chatConversationsTrpc = defineTrpcContract("chat").query("overview").withInput(workspaceInputSchema).withOutput(chatOverviewSchema).query("unreadSummary").withInput(external_exports.object({})).withOutput(external_exports.array(workspaceUnreadSchema)).query("browse").withInput(workspaceInputSchema).withOutput(external_exports.array(browsableChannelSchema)).mutation("createChannel").withInput(createChannelInputSchema).withOutput(conversationSchema).mutation("join").withInput(channelInputSchema).withOutput(conversationSchema).mutation("leave").withInput(channelInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("updateChannel").withInput(updateChannelInputSchema).withOutput(conversationSchema).mutation("setDefaultAgent").withInput(setDefaultAgentInputSchema).withOutput(conversationSchema).query("logChannelHint").withInput(channelInputSchema).withOutput(logChannelHintSchema).mutation("dismissLogChannelHint").withInput(channelInputSchema).withOutput(external_exports.object({ dismissed: external_exports.literal(true) })).mutation("archiveChannel").withInput(channelInputSchema).withOutput(conversationSchema).mutation("unarchiveChannel").withInput(channelInputSchema).withOutput(conversationSchema).mutation("addMembers").withInput(addMembersInputSchema).withOutput(conversationSchema).mutation("removeMember").withInput(removeMemberInputSchema).withOutput(conversationSchema).mutation("openDirect").withInput(openDirectInputSchema).withOutput(conversationSchema).query("conversation").withInput(channelInputSchema).withOutput(conversationSchema).build();
|
|
59593
|
+
var chatConversationsTrpc = defineTrpcContract("chat").query("overview").withInput(workspaceInputSchema).withOutput(chatOverviewSchema).query("unreadSummary").withInput(external_exports.object({})).withOutput(external_exports.array(workspaceUnreadSchema)).query("browse").withInput(workspaceInputSchema).withOutput(external_exports.array(browsableChannelSchema)).mutation("createChannel").withInput(createChannelInputSchema).withOutput(conversationSchema).mutation("join").withInput(channelInputSchema).withOutput(conversationSchema).mutation("leave").withInput(channelInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("updateChannel").withInput(updateChannelInputSchema).withOutput(conversationSchema).mutation("setDefaultAgent").withInput(setDefaultAgentInputSchema).withOutput(conversationSchema).query("logChannelHint").withInput(channelInputSchema).withOutput(logChannelHintSchema).mutation("dismissLogChannelHint").withInput(channelInputSchema).withOutput(external_exports.object({ dismissed: external_exports.literal(true) })).query("externalNotice").withInput(channelInputSchema).withOutput(externalNoticeSchema).mutation("dismissExternalNotice").withInput(dismissExternalNoticeInputSchema).withOutput(externalNoticeSchema).mutation("archiveChannel").withInput(channelInputSchema).withOutput(conversationSchema).mutation("unarchiveChannel").withInput(channelInputSchema).withOutput(conversationSchema).mutation("addMembers").withInput(addMembersInputSchema).withOutput(conversationSchema).mutation("removeMember").withInput(removeMemberInputSchema).withOutput(conversationSchema).mutation("openDirect").withInput(openDirectInputSchema).withOutput(conversationSchema).query("conversation").withInput(channelInputSchema).withOutput(conversationSchema).build();
|
|
59555
59594
|
var chatChannelRolesTrpc = defineTrpcContract("chat").mutation("setChannelRole").withInput(setChannelRoleInputSchema).withOutput(conversationSchema).mutation("extendChannel").withInput(extendChannelInputSchema).withOutput(conversationSchema).build();
|
|
59556
59595
|
var chatMessagesTrpc = defineTrpcContract("chat").query("history").withInput(historyInputSchema).withOutput(historyPageSchema).query("thread").withInput(messageInputSchema).withOutput(threadSchema).mutation("post").withInput(postMessageInputSchema).withOutput(messageSchema).mutation("forward").withInput(forwardMessageInputSchema).withOutput(messageSchema).mutation("addMentioned").withInput(addMentionedInputSchema).withOutput(messageSchema).mutation("edit").withInput(editMessageInputSchema).withOutput(messageSchema).mutation("delete").withInput(messageInputSchema).withOutput(messageSchema).mutation("remove").withInput(messageInputSchema).withOutput(messageSchema).mutation("react").withInput(reactInputSchema).withOutput(messageSchema).mutation("signalTyping").withInput(signalTypingInputSchema).withOutput(external_exports.object({ sent: external_exports.literal(true) })).mutation("markRead").withInput(markReadInputSchema).withOutput(external_exports.object({ lastReadSeq: external_exports.number().int().nonnegative() })).mutation("markUnread").withInput(markUnreadInputSchema).withOutput(external_exports.object({ lastReadSeq: external_exports.number().int().nonnegative() })).query("search").withInput(searchInputSchema).withOutput(searchResultSchema).build();
|
|
59557
|
-
var chatFilesTrpc = defineTrpcContract("chat").mutation("startUpload").withInput(startUploadInputSchema).withOutput(uploadTicketSchema).mutation("completeUpload").withInput(completeUploadInputSchema).withOutput(attachmentSchema).mutation("abortUpload").withInput(fileInputSchema).withOutput(external_exports.object({ aborted: external_exports.literal(true) })).query("fileLink").withInput(fileLinkInputSchema).withOutput(fileLinkSchema).query("channelFiles").withInput(channelFilesInputSchema).withOutput(channelFilesSchema).mutation("renameAttachment").withInput(renameAttachmentInputSchema).withOutput(attachmentSchema).mutation("hideUnfurl").withInput(hideUnfurlInputSchema).withOutput(messageSchema).query("unfurlImage").withInput(
|
|
59596
|
+
var chatFilesTrpc = defineTrpcContract("chat").mutation("startUpload").withInput(startUploadInputSchema).withOutput(uploadTicketSchema).mutation("completeUpload").withInput(completeUploadInputSchema).withOutput(attachmentSchema).mutation("abortUpload").withInput(fileInputSchema).withOutput(external_exports.object({ aborted: external_exports.literal(true) })).query("fileLink").withInput(fileLinkInputSchema).withOutput(fileLinkSchema).query("channelFiles").withInput(channelFilesInputSchema).withOutput(channelFilesSchema).mutation("renameAttachment").withInput(renameAttachmentInputSchema).withOutput(attachmentSchema).mutation("hideUnfurl").withInput(hideUnfurlInputSchema).withOutput(messageSchema).query("unfurlImage").withInput(unfurlImageInputSchema).withOutput(fileLinkSchema).query("customEmoji").withInput(workspaceInputSchema).withOutput(customEmojiListSchema).query("searchGifs").withInput(searchGifsInputSchema).withOutput(gifResultsSchema).build();
|
|
59558
59597
|
var chatFollowingTrpc = defineTrpcContract("chat").mutation("setNotify").withInput(setNotifyInputSchema).withOutput(conversationSummarySchema).mutation("hideConversation").withInput(channelInputSchema).withOutput(external_exports.object({ hidden: external_exports.literal(true) })).mutation("followThread").withInput(followThreadInputSchema).withOutput(threadFollowSchema).query("threadFollow").withInput(messageInputSchema).withOutput(threadFollowSchema).query("threads").withInput(threadsInputSchema).withOutput(threadsPageSchema).query("threadsUnread").withInput(workspaceInputSchema).withOutput(threadsUnreadSchema).query("notificationCount").withInput(workspaceInputSchema).withOutput(external_exports.object({ count: external_exports.number().int().nonnegative() })).mutation("markThreadRead").withInput(messageInputSchema).withOutput(external_exports.object({ read: external_exports.literal(true) })).mutation("pin").withInput(pinMessageInputSchema).withOutput(messageSchema).query("pins").withInput(channelInputSchema).withOutput(pinsPageSchema).query("saved").withInput(savedInputSchema).withOutput(savedPageSchema).query("savedMarks").withInput(workspaceInputSchema).withOutput(savedMarksSchema).mutation("saveMessage").withInput(saveMessageInputSchema).withOutput(savedStatusSchema).mutation("markSavedDone").withInput(markSavedDoneInputSchema).withOutput(savedStatusSchema).mutation("setReminder").withInput(setReminderInputSchema).withOutput(savedStatusSchema).query("activity").withInput(activityInputSchema).withOutput(activityPageSchema).mutation("markActivityRead").withInput(markActivityReadInputSchema).withOutput(external_exports.object({ read: external_exports.literal(true) })).build();
|
|
59559
59598
|
var chatSessionTrpc = defineTrpcContract("chat").mutation("realtimeToken").withInput(workspaceInputSchema).withOutput(realtimeTokenSchema).query("drafts").withInput(workspaceInputSchema).withOutput(draftListSchema).mutation("saveDraft").withInput(saveDraftInputSchema).withOutput(draftSavedSchema).mutation("deleteDraft").withInput(deleteDraftInputSchema).withOutput(draftSavedSchema).query("sent").withInput(listSentInputSchema).withOutput(sentPageSchema).query("sidebarLayout").withInput(workspaceInputSchema).withOutput(sidebarLayoutSchema).mutation("editSidebar").withInput(editSidebarInputSchema).withOutput(sidebarLayoutSchema).mutation("star").withInput(starInputSchema).withOutput(starStatusSchema).query("starred").withInput(workspaceInputSchema).withOutput(starredListSchema).mutation("scrubSecrets").withInput(scrubChatInputSchema).withOutput(chatScrubReportSchema).mutation("restoreScrubbed").withInput(messageInputSchema).withOutput(messageSchema).build();
|
|
59560
59599
|
var chatScheduledTrpc = defineTrpcContract("chat").mutation("scheduleMessage").withInput(scheduleMessageInputSchema).withOutput(scheduledMessageSchema).query("scheduled").withInput(listScheduledInputSchema).withOutput(scheduledListSchema).mutation("editScheduled").withInput(editScheduledInputSchema).withOutput(scheduledMessageSchema).mutation("sendScheduledNow").withInput(scheduledInputSchema).withOutput(scheduledMessageSchema).mutation("cancelScheduled").withInput(scheduledInputSchema).withOutput(scheduledMessageSchema).build();
|
|
@@ -59678,7 +59717,9 @@ var webPushPublicKeySchema = webPushPublicKeySchemaDefinition;
|
|
|
59678
59717
|
var digestItemSchemaDefinition = external_exports.object({
|
|
59679
59718
|
title: external_exports.string().min(1).max(200),
|
|
59680
59719
|
body: external_exports.string().max(400),
|
|
59681
|
-
url: external_exports.url()
|
|
59720
|
+
url: external_exports.url(),
|
|
59721
|
+
/** What is unread in it, shown as a badge on an unread line. */
|
|
59722
|
+
count: external_exports.number().int().positive().optional()
|
|
59682
59723
|
});
|
|
59683
59724
|
var DIGEST_LISTED = 10;
|
|
59684
59725
|
var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template", [
|
|
@@ -60042,6 +60083,16 @@ var { publicBaseUrl } = Config.define((c) => ({
|
|
|
60042
60083
|
external_exports.string().optional().transform((value) => value?.trim() || void 0)
|
|
60043
60084
|
)
|
|
60044
60085
|
}));
|
|
60086
|
+
var { publicOriginAliases } = Config.define((c) => ({
|
|
60087
|
+
publicOriginAliases: c.env(
|
|
60088
|
+
"BASE_HOST_ALIASES",
|
|
60089
|
+
external_exports.string().optional().transform((value) => originsOf({ list: value ?? "" }))
|
|
60090
|
+
)
|
|
60091
|
+
}));
|
|
60092
|
+
function originsOf({ list: list11 }) {
|
|
60093
|
+
const origins = list11.split(",").map((entry) => entry.trim()).filter((entry) => URL.canParse(entry)).map((entry) => new URL(entry)).filter((url2) => url2.protocol === "https:" || url2.protocol === "http:").map((url2) => url2.origin);
|
|
60094
|
+
return [...new Set(origins)];
|
|
60095
|
+
}
|
|
60045
60096
|
var { appsDomain } = Config.define((c) => ({
|
|
60046
60097
|
appsDomain: c.env("APPS_DOMAIN", external_exports.string().min(1).default("rchaves.app"))
|
|
60047
60098
|
}));
|
|
@@ -61615,6 +61666,8 @@ var vaultConfig = Config.define((c) => ({
|
|
|
61615
61666
|
appAttestDev: c.env("VAULT_APP_ATTEST_DEV", environmentBooleanSchema.default(false)),
|
|
61616
61667
|
/** The origin passkeys are made on; unset accepts any localhost origin, for development. */
|
|
61617
61668
|
publicBaseUrl,
|
|
61669
|
+
/** Other origins of the deployment passkeys may be made on, each its own relying party. */
|
|
61670
|
+
publicOriginAliases,
|
|
61618
61671
|
/** A file each audit chain head is appended to as a JSON line; unset only logs the heads. */
|
|
61619
61672
|
auditHeadFile: c.env("VAULT_AUDIT_HEAD_FILE", external_exports.string().min(1).optional()),
|
|
61620
61673
|
/** vaultd's socket; set, the master key and data keys stay in vaultd, unset keeps them here. */
|
|
@@ -67375,6 +67428,12 @@ var slackStatusSchemaDefinition = external_exports.object({
|
|
|
67375
67428
|
emoji: external_exports.string(),
|
|
67376
67429
|
text: external_exports.string()
|
|
67377
67430
|
});
|
|
67431
|
+
var slackCompanySchemaDefinition = external_exports.object({
|
|
67432
|
+
teamId: external_exports.string(),
|
|
67433
|
+
/** Its Slack name; its team id when Slack could not say. */
|
|
67434
|
+
name: external_exports.string(),
|
|
67435
|
+
iconUrl: external_exports.string().nullable()
|
|
67436
|
+
});
|
|
67378
67437
|
var slackProfileSchemaDefinition = external_exports.object({
|
|
67379
67438
|
id: external_exports.string(),
|
|
67380
67439
|
teamId: external_exports.string(),
|
|
@@ -67388,7 +67447,9 @@ var slackProfileSchemaDefinition = external_exports.object({
|
|
|
67388
67447
|
/** Their profile in Slack; null when the workspace's Slack address is unknown. */
|
|
67389
67448
|
url: external_exports.string().nullable(),
|
|
67390
67449
|
/** The linked Laze person, on an answer for `personIds`. */
|
|
67391
|
-
personId: external_exports.string().optional()
|
|
67450
|
+
personId: external_exports.string().optional(),
|
|
67451
|
+
/** Their company when it is not the connected Slack workspace, as in a Slack Connect channel. */
|
|
67452
|
+
company: slackCompanySchemaDefinition.nullable().optional()
|
|
67392
67453
|
});
|
|
67393
67454
|
var slackProfilesSchemaDefinition = external_exports.object({
|
|
67394
67455
|
profiles: external_exports.array(slackProfileSchemaDefinition)
|
|
@@ -67398,6 +67459,26 @@ var slackLinkedNamesSchemaDefinition = external_exports.object({
|
|
|
67398
67459
|
people: external_exports.array(external_exports.object({ personId: external_exports.string().min(1), names: external_exports.array(external_exports.string()) }))
|
|
67399
67460
|
});
|
|
67400
67461
|
var slackLinkedNamesSchema = slackLinkedNamesSchemaDefinition;
|
|
67462
|
+
var slackExternalPeopleInputSchemaDefinition = external_exports.object({
|
|
67463
|
+
workspaceId: external_exports.string().min(1),
|
|
67464
|
+
channelId: external_exports.string().min(1).max(64)
|
|
67465
|
+
});
|
|
67466
|
+
var slackExternalPeopleInputSchema = slackExternalPeopleInputSchemaDefinition;
|
|
67467
|
+
var slackExternalPersonSchemaDefinition = external_exports.object({
|
|
67468
|
+
/** As their messages' author id: `slack:<connected team>:<user id>`. */
|
|
67469
|
+
id: external_exports.string(),
|
|
67470
|
+
name: external_exports.string(),
|
|
67471
|
+
avatarUrl: external_exports.string().nullable()
|
|
67472
|
+
});
|
|
67473
|
+
var slackExternalPeopleSchemaDefinition = external_exports.object({
|
|
67474
|
+
companies: external_exports.array(
|
|
67475
|
+
external_exports.object({
|
|
67476
|
+
...slackCompanySchemaDefinition.shape,
|
|
67477
|
+
people: external_exports.array(slackExternalPersonSchemaDefinition)
|
|
67478
|
+
})
|
|
67479
|
+
)
|
|
67480
|
+
});
|
|
67481
|
+
var slackExternalPeopleSchema = slackExternalPeopleSchemaDefinition;
|
|
67401
67482
|
|
|
67402
67483
|
// ../../modules/slack/contract/src/slack-setup.ts
|
|
67403
67484
|
var workspaceIdSchema13 = external_exports.string().min(1);
|
|
@@ -67470,9 +67551,20 @@ var slackMessageEventSchemaDefinition = external_exports.object({
|
|
|
67470
67551
|
/** Slack's `channel_type`: channel, group, mpim or im; null when Slack left it out. */
|
|
67471
67552
|
channelType: external_exports.string().nullable().default(null),
|
|
67472
67553
|
/** The reactions on the message and who added each, as `conversations.history` lists them. */
|
|
67473
|
-
reactions: external_exports.array(
|
|
67554
|
+
reactions: external_exports.array(
|
|
67555
|
+
external_exports.object({
|
|
67556
|
+
name: external_exports.string().min(1),
|
|
67557
|
+
users: external_exports.array(external_exports.string()),
|
|
67558
|
+
/** The picture of a custom emoji from another organisation, as Slack lists it. */
|
|
67559
|
+
url: external_exports.string().nullable().optional()
|
|
67560
|
+
})
|
|
67561
|
+
).optional(),
|
|
67474
67562
|
/** A bot or app post's own icon, from `icons` or `bot_profile`; null when Slack sent none. */
|
|
67475
67563
|
iconUrl: external_exports.string().nullable().default(null),
|
|
67564
|
+
/** The author's own Slack workspace, Slack's `user_team`: another company's in Slack Connect. */
|
|
67565
|
+
userTeam: external_exports.string().nullable().default(null),
|
|
67566
|
+
/** The name and photo Slack sent with the message (`user_profile`); dropped once handled. */
|
|
67567
|
+
userProfile: external_exports.object({ name: external_exports.string(), avatarUrl: external_exports.string().nullable() }).nullable().default(null),
|
|
67476
67568
|
/** The ts of the last reply in the thread this message starts, as history lists it. */
|
|
67477
67569
|
latestReply: external_exports.string().nullable().default(null),
|
|
67478
67570
|
/** When the message was last edited, Slack's `edited.ts`; null when it never was. */
|
|
@@ -67483,7 +67575,12 @@ var slackMessageEventSchemaDefinition = external_exports.object({
|
|
|
67483
67575
|
sourceText: external_exports.string().optional(),
|
|
67484
67576
|
attachments: external_exports.array(external_exports.record(external_exports.string(), external_exports.unknown())).optional(),
|
|
67485
67577
|
/** For `tokens_revoked`: the Slack users whose tokens were revoked, and whether the bot's was. */
|
|
67486
|
-
revoked: external_exports.object({ userIds: external_exports.array(external_exports.string()), bot: external_exports.boolean() }).optional()
|
|
67578
|
+
revoked: external_exports.object({ userIds: external_exports.array(external_exports.string()), bot: external_exports.boolean() }).optional(),
|
|
67579
|
+
/** For `emoji_changed`: the custom emoji added (`value` a picture or `alias:x`) and removed. */
|
|
67580
|
+
emojiChange: external_exports.object({
|
|
67581
|
+
added: external_exports.array(external_exports.object({ name: external_exports.string(), value: external_exports.string() })),
|
|
67582
|
+
removed: external_exports.array(external_exports.string())
|
|
67583
|
+
}).optional()
|
|
67487
67584
|
});
|
|
67488
67585
|
var slackEventReceivedPayloadSchemaDefinition = external_exports.object({
|
|
67489
67586
|
workspaceId: external_exports.string().min(1),
|
|
@@ -67766,7 +67863,7 @@ var slackSearchAnswerSchemaDefinition = external_exports.object({
|
|
|
67766
67863
|
var slackSearchAnswerSchema = slackSearchAnswerSchemaDefinition;
|
|
67767
67864
|
var SlackApi = moduleApi()("slack");
|
|
67768
67865
|
var workspaceInput3 = external_exports.object({ workspaceId: workspaceIdSchema14 });
|
|
67769
|
-
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).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).build();
|
|
67866
|
+
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).build();
|
|
67770
67867
|
|
|
67771
67868
|
// ../../modules/slack/contract/src/slack-keys.ts
|
|
67772
67869
|
var SLACK_KEY_PATHS = {
|
|
@@ -72884,7 +72981,7 @@ var appFunctionUsesSchemaDefinition = external_exports.object({
|
|
|
72884
72981
|
connections: external_exports.array(connectionNameSchema).max(20).default([]),
|
|
72885
72982
|
hosts: external_exports.array(appOutsideHostSchema).max(20).default([])
|
|
72886
72983
|
});
|
|
72887
|
-
var appFunctionDeclarationsSchemaDefinition = external_exports.record(appFunctionNameSchema, appFunctionUsesSchemaDefinition).refine((
|
|
72984
|
+
var appFunctionDeclarationsSchemaDefinition = external_exports.record(appFunctionNameSchema, appFunctionUsesSchemaDefinition).refine((functions) => Object.keys(functions).length <= 50, "At most 50 functions");
|
|
72888
72985
|
var appFunctionDeclarationsSchema = appFunctionDeclarationsSchemaDefinition;
|
|
72889
72986
|
var appDeclaredConnectionSchemaDefinition = external_exports.object({
|
|
72890
72987
|
name: external_exports.string(),
|
|
@@ -73456,13 +73553,16 @@ var listFunctionLogsInputSchemaDefinition = external_exports.object({
|
|
|
73456
73553
|
limit: external_exports.number().int().positive().max(1e3).default(100)
|
|
73457
73554
|
});
|
|
73458
73555
|
var listFunctionLogsInputSchema = listFunctionLogsInputSchemaDefinition;
|
|
73459
|
-
var
|
|
73556
|
+
var appWorkspaceSettingsSchemaDefinition = external_exports.object({
|
|
73460
73557
|
workspaceId: external_exports.string().min(1),
|
|
73461
|
-
/** Off: pushes with functions are refused and every function answers app_functions_disabled. */
|
|
73462
|
-
functionsEnabled: external_exports.boolean(),
|
|
73463
73558
|
/** On: a Builder makes an app public at once. Off: a public publish asks an admin. */
|
|
73464
73559
|
publicAppsAllowed: external_exports.boolean()
|
|
73465
73560
|
});
|
|
73561
|
+
var appWorkspaceSettingsSchema = appWorkspaceSettingsSchemaDefinition;
|
|
73562
|
+
var appFunctionSettingsSchemaDefinition = external_exports.object({
|
|
73563
|
+
...appWorkspaceSettingsSchemaDefinition.shape,
|
|
73564
|
+
functionsEnabled: external_exports.boolean()
|
|
73565
|
+
});
|
|
73466
73566
|
var appFunctionSettingsSchema = appFunctionSettingsSchemaDefinition;
|
|
73467
73567
|
var workspaceRefSchemaDefinition = external_exports.object({ workspaceId: external_exports.string().min(1) });
|
|
73468
73568
|
var appWorkspaceRefSchema = workspaceRefSchemaDefinition;
|
|
@@ -73555,6 +73655,8 @@ var appMemberSourceSchemaDefinition = external_exports.object({
|
|
|
73555
73655
|
var appMemberSchemaDefinition = external_exports.object({
|
|
73556
73656
|
member: external_exports.object({ type: external_exports.enum(["user", "agent"]), id: external_exports.string().min(1) }),
|
|
73557
73657
|
name: external_exports.string(),
|
|
73658
|
+
/** A person's picture, uploaded or from Google; null or absent for agents and without one. */
|
|
73659
|
+
image: external_exports.string().nullable().optional(),
|
|
73558
73660
|
role: appRoleSchema,
|
|
73559
73661
|
sources: external_exports.array(appMemberSourceSchemaDefinition).min(1),
|
|
73560
73662
|
/** Whether a Builder can take this access away here: only a direct share is removable. */
|
|
@@ -74174,10 +74276,17 @@ var appBackupCheckAlertsSchemaDefinition = external_exports.object({
|
|
|
74174
74276
|
});
|
|
74175
74277
|
|
|
74176
74278
|
// ../../modules/app/contract/src/app.trpc.ts
|
|
74177
|
-
var appMainTrpc = defineTrpcContract("app").query("list").withInput(listAppsInputSchema).withOutput(external_exports.array(appSchema)).query("get").withInput(appRefSchema).withOutput(appSchema).mutation("create").withInput(createAppInputSchema).withOutput(appSchema).mutation("rename").withInput(renameAppInputSchema).withOutput(appSchema).mutation("archive").withInput(appRefSchema).withOutput(appSchema).mutation("unarchive").withInput(appRefSchema).withOutput(appSchema).mutation("delete").withInput(deleteAppInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).query("versions").withInput(appRefSchema).withOutput(external_exports.array(appVersionSchema)).mutation("revert").withInput(revertInputSchema).withOutput(appPushSchema).mutation("publish").withInput(publishInputSchema).withOutput(publishOutcomeSchema).query("collections").withInput(appDataRefSchema).withOutput(external_exports.array(collectionSchema)).query("records").withInput(listRecordsInputSchema).withOutput(recordPageSchema).mutation("writeRecord").withInput(writeRecordInputSchema).withOutput(appRecordSchema).mutation("deleteRecord").withInput(deleteRecordInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).query("views").withInput(appDataRefSchema).withOutput(external_exports.array(appViewSchema)).mutation("saveView").withInput(saveViewInputSchema).withOutput(appViewSchema).mutation("deleteView").withInput(deleteViewInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("chooseCardRows").withInput(chooseCardRowsInputSchema).withOutput(appCardChoiceSchema).query("exportRecords").withInput(exportRecordsInputSchema).withOutput(recordExportSchema).mutation("importRecords").withInput(importRecordsInputSchema).withOutput(recordImportSchema).mutation("decidePublish").withInput(decidePublishInputSchema).withOutput(publishOutcomeSchema).mutation("nameVersion").withInput(nameVersionInputSchema).withOutput(appVersionSchema).mutation("makeInternal").withInput(appRefSchema).withOutput(appSchema).mutation("revokePublishLease").withInput(appRefSchema).withOutput(appSchema).mutation("signInHandoff").withInput(signInHandoffInputSchema).withOutput(signInHandoffSchema).query("functionLogs").withInput(listFunctionLogsInputSchema).withOutput(external_exports.array(appFunctionLogEntrySchema)).query("
|
|
74279
|
+
var appMainTrpc = defineTrpcContract("app").query("list").withInput(listAppsInputSchema).withOutput(external_exports.array(appSchema)).query("get").withInput(appRefSchema).withOutput(appSchema).mutation("create").withInput(createAppInputSchema).withOutput(appSchema).mutation("rename").withInput(renameAppInputSchema).withOutput(appSchema).mutation("archive").withInput(appRefSchema).withOutput(appSchema).mutation("unarchive").withInput(appRefSchema).withOutput(appSchema).mutation("delete").withInput(deleteAppInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).query("versions").withInput(appRefSchema).withOutput(external_exports.array(appVersionSchema)).mutation("revert").withInput(revertInputSchema).withOutput(appPushSchema).mutation("publish").withInput(publishInputSchema).withOutput(publishOutcomeSchema).query("collections").withInput(appDataRefSchema).withOutput(external_exports.array(collectionSchema)).query("records").withInput(listRecordsInputSchema).withOutput(recordPageSchema).mutation("writeRecord").withInput(writeRecordInputSchema).withOutput(appRecordSchema).mutation("deleteRecord").withInput(deleteRecordInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).query("views").withInput(appDataRefSchema).withOutput(external_exports.array(appViewSchema)).mutation("saveView").withInput(saveViewInputSchema).withOutput(appViewSchema).mutation("deleteView").withInput(deleteViewInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("chooseCardRows").withInput(chooseCardRowsInputSchema).withOutput(appCardChoiceSchema).query("exportRecords").withInput(exportRecordsInputSchema).withOutput(recordExportSchema).mutation("importRecords").withInput(importRecordsInputSchema).withOutput(recordImportSchema).mutation("decidePublish").withInput(decidePublishInputSchema).withOutput(publishOutcomeSchema).mutation("nameVersion").withInput(nameVersionInputSchema).withOutput(appVersionSchema).mutation("makeInternal").withInput(appRefSchema).withOutput(appSchema).mutation("revokePublishLease").withInput(appRefSchema).withOutput(appSchema).mutation("signInHandoff").withInput(signInHandoffInputSchema).withOutput(signInHandoffSchema).query("functionLogs").withInput(listFunctionLogsInputSchema).withOutput(external_exports.array(appFunctionLogEntrySchema)).query("access").withInput(appRefSchema).withOutput(appAccessSchema).query("members").withInput(appRefSchema).withOutput(appMembersSchema).mutation("grantAccess").withInput(grantAppAccessInputSchema).withOutput(appAccessSchema).mutation("revokeAccess").withInput(revokeAppAccessInputSchema).withOutput(appAccessSchema).mutation("setVisibility").withInput(setAppVisibilityInputSchema).withOutput(visibilityOutcomeSchema).mutation("setMemberRole").withInput(setMemberRoleInputSchema).withOutput(appAccessSchema).mutation("unpublish").withInput(appRefSchema).withOutput(appSchema).query("door").withInput(appRefSchema).withOutput(appDoorSchema).mutation("requestAccess").withInput(appRefSchema).withOutput(appDoorSchema).mutation("decideAccess").withInput(decideAppAccessInputSchema).withOutput(appAccessRequestSchema).query("users").withInput(appRefSchema).withOutput(appUsersSchema).mutation("blockUser").withInput(blockAppUserInputSchema).withOutput(appUsersSchema).mutation("deleteUser").withInput(deleteAppUserInputSchema).withOutput(deletedAppUserSchema).query("backups").withInput(appRefSchema).withOutput(appBackupStatusSchema).mutation("restoreData").withInput(restoreAppDataInputSchema).withOutput(appRestoreSchema).query("cost").withInput(appRefSchema).withOutput(appCostSchema).mutation("setBudget").withInput(setAppBudgetInputSchema).withOutput(appCostSchema).query("triggers").withInput(appRefSchema).withOutput(appTriggersSchema).mutation("setTriggerPaused").withInput(setAppTriggerPausedInputSchema).withOutput(appTriggerSchema).mutation("removeTrigger").withInput(appTriggerRefSchema).withOutput(external_exports.object({ removed: external_exports.literal(true) })).build();
|
|
74178
74280
|
var appConnectionsTrpc = defineTrpcContract("app").query("connections").withInput(appRefSchema).withOutput(appConnectionsSchema).mutation("allowConnection").withInput(appConnectionRefSchema).withOutput(appConnectionsSchema).mutation("revokeConnection").withInput(appConnectionRefSchema).withOutput(appConnectionsSchema).build();
|
|
74179
74281
|
var appPinsTrpc = defineTrpcContract("app").query("pins").withInput(channelPinsInputSchema).withOutput(channelAppPinsSchema).mutation("pin").withInput(pinAppInputSchema).withOutput(channelAppPinsSchema).mutation("unpin").withInput(pinAppInputSchema).withOutput(channelAppPinsSchema).mutation("setPinView").withInput(setPinViewInputSchema).withOutput(channelAppPinsSchema).mutation("reorderPins").withInput(reorderPinsInputSchema).withOutput(channelAppPinsSchema).mutation("setPinRole").withInput(setPinRoleInputSchema).withOutput(appAccessSchema).build();
|
|
74180
|
-
var
|
|
74282
|
+
var appSettingsTrpc = defineTrpcContract("app").query("workspaceSettings").withInput(appWorkspaceRefSchema).withOutput(appWorkspaceSettingsSchema).query("functionSettings").withInput(appWorkspaceRefSchema).withOutput(appFunctionSettingsSchema).mutation("setFunctionsEnabled").withInput(setFunctionsEnabledInputSchema).withOutput(appFunctionSettingsSchema).mutation("setPublicAppsAllowed").withInput(setPublicAppsAllowedInputSchema).withOutput(appFunctionSettingsSchema).build();
|
|
74283
|
+
var appTrpc = joinTrpcContracts(
|
|
74284
|
+
"app",
|
|
74285
|
+
appMainTrpc,
|
|
74286
|
+
appConnectionsTrpc,
|
|
74287
|
+
appPinsTrpc,
|
|
74288
|
+
appSettingsTrpc
|
|
74289
|
+
);
|
|
74181
74290
|
|
|
74182
74291
|
// ../../modules/app/contract/src/app.rest.ts
|
|
74183
74292
|
var byKey = { workspaceId: true };
|
|
@@ -74219,7 +74328,7 @@ var pinRoleByKeyInputSchemaDefinition = setPinRoleInputSchema.omit(byKey);
|
|
|
74219
74328
|
var decideAccessByKeyInputSchemaDefinition = decideAppAccessInputSchema.omit(byKey);
|
|
74220
74329
|
var renameAppByKeyInputSchemaDefinition = renameAppInputSchema.omit(byKey);
|
|
74221
74330
|
var deleteAppByKeyInputSchemaDefinition = deleteAppInputSchema.omit(byKey);
|
|
74222
|
-
var
|
|
74331
|
+
var workspaceSettingsByKeyInputSchemaDefinition = external_exports.object({});
|
|
74223
74332
|
var setFunctionsEnabledByKeyInputSchemaDefinition = setFunctionsEnabledInputSchema.omit(byKey);
|
|
74224
74333
|
var setPublicAppsAllowedByKeyInputSchemaDefinition = setPublicAppsAllowedInputSchema.omit(byKey);
|
|
74225
74334
|
var restoreDataByKeyInputSchemaDefinition = external_exports.object({
|
|
@@ -74473,12 +74582,6 @@ var appCliCommands = [
|
|
|
74473
74582
|
arguments: ["[app]"],
|
|
74474
74583
|
summary: "Make the builder ask again before its next public publish (admins, a person's key)"
|
|
74475
74584
|
},
|
|
74476
|
-
{
|
|
74477
|
-
command: "laze app functions",
|
|
74478
|
-
operation: "setFunctionsEnabled",
|
|
74479
|
-
arguments: ["[on|off]"],
|
|
74480
|
-
summary: "Whether the workspace's apps run server functions; on and off need an admin"
|
|
74481
|
-
},
|
|
74482
74585
|
{
|
|
74483
74586
|
command: "laze app public-apps",
|
|
74484
74587
|
operation: "setPublicAppsAllowed",
|
|
@@ -75341,25 +75444,13 @@ var revokeLease = async ({ context, args, open: open3 }) => {
|
|
|
75341
75444
|
`;
|
|
75342
75445
|
print2({ context, args, value: app2, text: text2 });
|
|
75343
75446
|
};
|
|
75344
|
-
var functions = async ({ context, args, signed: signed2 }) => {
|
|
75345
|
-
const word3 = args.words[2];
|
|
75346
|
-
if (word3 !== void 0 && word3 !== "on" && word3 !== "off") {
|
|
75347
|
-
throw new CliUsageError("Usage: laze app functions [on|off]");
|
|
75348
|
-
}
|
|
75349
|
-
const client = await signed2();
|
|
75350
|
-
const settings3 = word3 === void 0 ? await client.post("/api/apps/functions", {}) : await client.post("/api/apps/functions/enabled", {
|
|
75351
|
-
enabled: word3 === "on"
|
|
75352
|
-
});
|
|
75353
|
-
const text2 = settings3.functionsEnabled ? "Server functions are on for this workspace's apps.\n" : "Server functions are off: pushes with functions are refused and every function answers app_functions_disabled.\n";
|
|
75354
|
-
print2({ context, args, value: settings3, text: text2 });
|
|
75355
|
-
};
|
|
75356
75447
|
var publicApps = async ({ context, args, signed: signed2 }) => {
|
|
75357
75448
|
const word3 = args.words[2];
|
|
75358
75449
|
if (word3 !== void 0 && word3 !== "on" && word3 !== "off") {
|
|
75359
75450
|
throw new CliUsageError("Usage: laze app public-apps [on|off]");
|
|
75360
75451
|
}
|
|
75361
75452
|
const client = await signed2();
|
|
75362
|
-
const settings3 = word3 === void 0 ? await client.post("/api/apps/
|
|
75453
|
+
const settings3 = word3 === void 0 ? await client.post("/api/apps/settings", {}) : await client.post("/api/apps/public-apps", {
|
|
75363
75454
|
allowed: word3 === "on"
|
|
75364
75455
|
});
|
|
75365
75456
|
const text2 = settings3.publicAppsAllowed ? "Public apps are allowed: a Builder makes an app public without asking an admin.\n" : "Public apps ask an admin first: making an app public waits for an Owner or Admin to approve.\n";
|
|
@@ -75444,7 +75535,6 @@ var appManageCommands = {
|
|
|
75444
75535
|
unarchive,
|
|
75445
75536
|
delete: remove,
|
|
75446
75537
|
"revoke-lease": revokeLease,
|
|
75447
|
-
functions,
|
|
75448
75538
|
"public-apps": publicApps,
|
|
75449
75539
|
backups,
|
|
75450
75540
|
restore,
|
|
@@ -75962,14 +76052,14 @@ async function jsonFlag({
|
|
|
75962
76052
|
}
|
|
75963
76053
|
async function listFiles(folder) {
|
|
75964
76054
|
const found = [];
|
|
75965
|
-
const
|
|
75966
|
-
while (
|
|
75967
|
-
const current2 =
|
|
76055
|
+
const pending2 = [folder];
|
|
76056
|
+
while (pending2.length > 0 && found.length <= MAX_FILES) {
|
|
76057
|
+
const current2 = pending2.pop() ?? folder;
|
|
75968
76058
|
for (const entry of await readdir6(current2, { withFileTypes: true })) {
|
|
75969
76059
|
const path = join19(current2, entry.name);
|
|
75970
76060
|
const rel = relative3(folder, path).split(sep3).join("/");
|
|
75971
76061
|
if (isSkippedPath({ path: rel })) continue;
|
|
75972
|
-
if (entry.isDirectory())
|
|
76062
|
+
if (entry.isDirectory()) pending2.push(path);
|
|
75973
76063
|
else if (entry.isFile()) found.push(path);
|
|
75974
76064
|
}
|
|
75975
76065
|
}
|
|
@@ -76883,7 +76973,6 @@ var APP_COMMANDS = {
|
|
|
76883
76973
|
unarchive: managed(appManageCommands.unarchive),
|
|
76884
76974
|
delete: managed(appManageCommands.delete),
|
|
76885
76975
|
"revoke-lease": managed(appManageCommands["revoke-lease"]),
|
|
76886
|
-
functions: managed(appManageCommands.functions),
|
|
76887
76976
|
"public-apps": managed(appManageCommands["public-apps"]),
|
|
76888
76977
|
backups: managed(appManageCommands.backups),
|
|
76889
76978
|
restore: managed(appManageCommands.restore),
|
|
@@ -77082,8 +77171,8 @@ function printAccount({ context, args }, account) {
|
|
|
77082
77171
|
if (args.flags.json) return printJson(context, account);
|
|
77083
77172
|
const of = (amount) => money(amount, account.currency);
|
|
77084
77173
|
const plan2 = account.plan === "team" ? `Team, ${of(account.seats.monthlyPrice)} a month for ${account.seats.people} people` : "Free, for one person";
|
|
77085
|
-
const
|
|
77086
|
-
context.out(`Plan: ${plan2}${
|
|
77174
|
+
const pending2 = account.status === "pending_payment" ? " (payment pending: run laze billing checkout)" : "";
|
|
77175
|
+
context.out(`Plan: ${plan2}${pending2}
|
|
77087
77176
|
`);
|
|
77088
77177
|
context.out(
|
|
77089
77178
|
`Credits: ${of(account.credits.includedLeft)} of ${of(account.credits.included)} included left, ${of(account.credits.prepaid)} prepaid${prepaidNoteOf(account, of)}${account.credits.paused ? " (paused: top up to resume)" : ""}
|
|
@@ -81436,7 +81525,7 @@ async function relayMcpLines({
|
|
|
81436
81525
|
lines: lines2,
|
|
81437
81526
|
watchMs = WATCH_MS2
|
|
81438
81527
|
}) {
|
|
81439
|
-
const
|
|
81528
|
+
const pending2 = lines2[Symbol.asyncIterator]();
|
|
81440
81529
|
const { profile } = await signedIn({ context, args });
|
|
81441
81530
|
const env = context.environment.inherited;
|
|
81442
81531
|
if (!profile.agentId || !env.LAZE_TURN_FILE)
|
|
@@ -81469,7 +81558,7 @@ async function relayMcpLines({
|
|
|
81469
81558
|
const timer = setInterval(() => void recheckTools({ relay: relay2, listed }), watchMs);
|
|
81470
81559
|
timer.unref?.();
|
|
81471
81560
|
try {
|
|
81472
|
-
for (let next = await
|
|
81561
|
+
for (let next = await pending2.next(); !next.done; next = await pending2.next()) {
|
|
81473
81562
|
if (next.value.trim()) await relayLine({ relay: relay2, listed, line: next.value });
|
|
81474
81563
|
}
|
|
81475
81564
|
} finally {
|
|
@@ -82636,6 +82725,8 @@ var EXTERNAL_CONNECTION_REST_PATHS = {
|
|
|
82636
82725
|
invitations: "/api/external-connections/invitations",
|
|
82637
82726
|
invite: "/api/external-connections/invite",
|
|
82638
82727
|
revoke: "/api/external-connections/revoke",
|
|
82728
|
+
resend: "/api/external-connections/resend",
|
|
82729
|
+
pending: "/api/external-connections/pending",
|
|
82639
82730
|
accept: "/api/external-connections/accept",
|
|
82640
82731
|
decline: "/api/external-connections/decline",
|
|
82641
82732
|
forward: "/api/external-connections/forward",
|
|
@@ -82708,6 +82799,8 @@ var externalConnectionSchema = connectionDefinition;
|
|
|
82708
82799
|
var sentInviteDefinition = external_exports.object({
|
|
82709
82800
|
id: external_exports.string(),
|
|
82710
82801
|
email: external_exports.string(),
|
|
82802
|
+
/** The company the inviter named for the address; null when none was given. */
|
|
82803
|
+
company: external_exports.string().nullable(),
|
|
82711
82804
|
state: externalInviteStateSchema,
|
|
82712
82805
|
invitedBy: personDefinition,
|
|
82713
82806
|
/** The channel shared once it is accepted. */
|
|
@@ -82760,11 +82853,33 @@ var inviteInputDefinition = external_exports.object({
|
|
|
82760
82853
|
workspaceId: workspaceIdSchema20,
|
|
82761
82854
|
email: external_exports.email().max(320),
|
|
82762
82855
|
/** The first channel to share, by id or name; it is shared once the invitation is accepted. */
|
|
82763
|
-
share: external_exports.string().trim().min(1).max(81).optional()
|
|
82856
|
+
share: external_exports.string().trim().min(1).max(81).optional(),
|
|
82857
|
+
/** The invited company's name, shown while the channel waits for them. */
|
|
82858
|
+
company: external_exports.string().trim().min(1).max(80).optional()
|
|
82764
82859
|
});
|
|
82765
82860
|
var externalInviteInputSchema = inviteInputDefinition;
|
|
82766
82861
|
var inviteRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema20, inviteId: idSchema21 });
|
|
82767
82862
|
var externalInviteRefSchema = inviteRefDefinition;
|
|
82863
|
+
var pendingShareDefinition = external_exports.object({
|
|
82864
|
+
channelId: external_exports.string(),
|
|
82865
|
+
channelName: external_exports.string(),
|
|
82866
|
+
/** `invite` waits on an open invitation naming the channel, `share` on a connected workspace. */
|
|
82867
|
+
kind: external_exports.enum(["invite", "share"]),
|
|
82868
|
+
/** The invitation's id (Resend, Cancel revokes it) or the share's id (Cancel stops it). */
|
|
82869
|
+
id: external_exports.string(),
|
|
82870
|
+
/** Who must accept: the connected workspace, the invited company, else the address's domain. */
|
|
82871
|
+
peerName: external_exports.string(),
|
|
82872
|
+
sentAt: iso,
|
|
82873
|
+
/** When an invitation lapses; null for a share, which waits until answered or stopped. */
|
|
82874
|
+
expiresAt: iso.nullable()
|
|
82875
|
+
});
|
|
82876
|
+
var pendingSharesDefinition = external_exports.object({
|
|
82877
|
+
/** Whether the reader may share, resend and cancel: an Admin or Owner of the workspace. */
|
|
82878
|
+
manages: external_exports.boolean(),
|
|
82879
|
+
/** Channels the reader can see that wait for another workspace to accept. */
|
|
82880
|
+
pending: external_exports.array(pendingShareDefinition)
|
|
82881
|
+
});
|
|
82882
|
+
var externalPendingSharesSchema = pendingSharesDefinition;
|
|
82768
82883
|
var acceptInviteDefinition = external_exports.object({
|
|
82769
82884
|
/** The workspace to connect: one where the person is Admin or Owner. */
|
|
82770
82885
|
workspaceId: workspaceIdSchema20,
|
|
@@ -82839,7 +82954,7 @@ var directDefinition = external_exports.object({
|
|
|
82839
82954
|
});
|
|
82840
82955
|
var externalDirectSchema = directDefinition;
|
|
82841
82956
|
var ExternalConnectionApi = moduleApi()("external-connection");
|
|
82842
|
-
var externalConnectionTrpc = defineTrpcContract("externalConnection").query("overview").withInput(workspaceInput4).withOutput(externalOverviewSchema).query("roster").withInput(externalRosterInputSchema).withOutput(externalRosterSchema).query("myInvitations").withInput(workspaceInput4).withOutput(external_exports.array(externalInvitationSchema)).mutation("invite").withInput(externalInviteInputSchema).withOutput(externalSentInviteSchema).mutation("revokeInvite").withInput(externalInviteRefSchema).withOutput(externalSentInviteSchema).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();
|
|
82957
|
+
var externalConnectionTrpc = defineTrpcContract("externalConnection").query("overview").withInput(workspaceInput4).withOutput(externalOverviewSchema).query("roster").withInput(externalRosterInputSchema).withOutput(externalRosterSchema).query("myInvitations").withInput(workspaceInput4).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(workspaceInput4).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();
|
|
82843
82958
|
|
|
82844
82959
|
// ../../modules/external-connection/contract/src/external-connection.config.ts
|
|
82845
82960
|
var externalConnectionConfig = Config.define(() => ({ publicBaseUrl }));
|
|
@@ -82859,6 +82974,12 @@ var shareRefDefinition2 = externalShareRefSchema.omit(keyed);
|
|
|
82859
82974
|
var reportDefinition = externalReportInputSchema.omit(keyed);
|
|
82860
82975
|
var directDefinition2 = externalOpenDirectInputSchema.omit(keyed);
|
|
82861
82976
|
|
|
82977
|
+
// ../../modules/external-connection/contract/src/external-connection.ui.ts
|
|
82978
|
+
var externalUi = uiTokens("external-connection");
|
|
82979
|
+
var ExternalShareDialogSlot = externalUi.component("share-dialog");
|
|
82980
|
+
var ExternalChannelBannerSlot = externalUi.component("channel-banner");
|
|
82981
|
+
var ExternalSharingHooksToken = externalUi.hooks("sharing");
|
|
82982
|
+
|
|
82862
82983
|
// src/services/workspace-commands.service.ts
|
|
82863
82984
|
import { readFile as readFile26 } from "node:fs/promises";
|
|
82864
82985
|
import { resolve as resolve9 } from "node:path";
|
|
@@ -83281,8 +83402,10 @@ var EXTERNAL_USAGE = `Usage:
|
|
|
83281
83402
|
laze external list connected workspaces, their shared channels and settings
|
|
83282
83403
|
laze external roster <channel id> the other workspace's people in a shared channel
|
|
83283
83404
|
laze external invites invitations to you, and requests forwarded to your admins
|
|
83284
|
-
laze external invite <email> [--share <#channel>] invite another company's admin (admins)
|
|
83405
|
+
laze external invite <email> [--share <#channel>] [--company <name>] invite another company's admin (admins)
|
|
83285
83406
|
laze external revoke <invitation id> take back an open invitation (admins)
|
|
83407
|
+
laze external resend <invitation id> send an open invitation again with a new link (admins)
|
|
83408
|
+
laze external pending channels waiting for another workspace to accept
|
|
83286
83409
|
laze external accept <invitation id> [--workspace <name|id>] [--secret <link secret>] connect (admins)
|
|
83287
83410
|
laze external decline <invitation id> decline an invitation (admins)
|
|
83288
83411
|
laze external forward <invitation id> hand an invitation addressed to you to your admins
|
|
@@ -83393,18 +83516,48 @@ async function invitations({ context, args }) {
|
|
|
83393
83516
|
async function invite2({ context, args }) {
|
|
83394
83517
|
const email3 = wordAt3({ args, at: 2, what: "the address to invite" });
|
|
83395
83518
|
const share3 = flagText({ args, name: "share" })?.trim();
|
|
83519
|
+
const company = flagText({ args, name: "company" })?.trim();
|
|
83396
83520
|
const { client } = await clientOf2({ context, args });
|
|
83397
83521
|
const sent = await client.post(EXTERNAL_CONNECTION_REST_PATHS.invite, {
|
|
83398
83522
|
email: email3,
|
|
83399
|
-
...share3 ? { share: share3 } : {}
|
|
83523
|
+
...share3 ? { share: share3 } : {},
|
|
83524
|
+
...company ? { company } : {}
|
|
83400
83525
|
});
|
|
83401
83526
|
if (args.flags.json) return printJson6(context, sent);
|
|
83402
83527
|
const sharing = sent.share ? `, sharing #${sent.share.name} once accepted` : "";
|
|
83528
|
+
const at = sent.company ? ` at ${sent.company}` : "";
|
|
83529
|
+
context.out(
|
|
83530
|
+
`Invited ${sent.email}${at}${sharing}. Invitation ${sent.id} expires ${utcTimeOf(sent.expiresAt)}.
|
|
83531
|
+
`
|
|
83532
|
+
);
|
|
83533
|
+
}
|
|
83534
|
+
async function resend({ context, args }) {
|
|
83535
|
+
const inviteId = wordAt3({ args, at: 2, what: "the invitation's id" });
|
|
83536
|
+
const { client } = await clientOf2({ context, args });
|
|
83537
|
+
const sent = await client.post(EXTERNAL_CONNECTION_REST_PATHS.resend, {
|
|
83538
|
+
inviteId
|
|
83539
|
+
});
|
|
83540
|
+
if (args.flags.json) return printJson6(context, sent);
|
|
83403
83541
|
context.out(
|
|
83404
|
-
`
|
|
83542
|
+
`Sent invitation ${sent.id} to ${sent.email} again with a new link. It expires ${utcTimeOf(sent.expiresAt)}.
|
|
83405
83543
|
`
|
|
83406
83544
|
);
|
|
83407
83545
|
}
|
|
83546
|
+
async function pending({ context, args }) {
|
|
83547
|
+
const { client } = await clientOf2({ context, args });
|
|
83548
|
+
const answer5 = await client.get(EXTERNAL_CONNECTION_REST_PATHS.pending);
|
|
83549
|
+
if (args.flags.json) return printJson6(context, answer5);
|
|
83550
|
+
if (answer5.pending.length === 0)
|
|
83551
|
+
return context.out("No channel is waiting on another workspace.\n");
|
|
83552
|
+
for (const each of answer5.pending) {
|
|
83553
|
+
const what = each.kind === "invite" ? "invitation" : "share";
|
|
83554
|
+
const until = each.expiresAt ? `, expires ${utcTimeOf(each.expiresAt)}` : "";
|
|
83555
|
+
context.out(
|
|
83556
|
+
`#${each.channelName} waiting for ${each.peerName} to accept the ${what}${until} ${each.id}
|
|
83557
|
+
`
|
|
83558
|
+
);
|
|
83559
|
+
}
|
|
83560
|
+
}
|
|
83408
83561
|
async function inviteRef({ context, args, path }) {
|
|
83409
83562
|
const inviteId = wordAt3({ args, at: 2, what: "the invitation's id" });
|
|
83410
83563
|
const { client } = await clientOf2({ context, args });
|
|
@@ -83561,6 +83714,8 @@ var EXTERNAL_COMMANDS = {
|
|
|
83561
83714
|
invites: invitations,
|
|
83562
83715
|
invite: invite2,
|
|
83563
83716
|
revoke,
|
|
83717
|
+
resend,
|
|
83718
|
+
pending,
|
|
83564
83719
|
accept,
|
|
83565
83720
|
decline,
|
|
83566
83721
|
forward,
|
|
@@ -83810,9 +83965,24 @@ var feedViewerStateSchemaDefinition = external_exports.object({
|
|
|
83810
83965
|
/** The person joined the item's channel after it was posted. */
|
|
83811
83966
|
beforeYouJoined: external_exports.boolean().optional(),
|
|
83812
83967
|
/** The item is the person's alone, so they may edit its title and summary. */
|
|
83813
|
-
canEdit: external_exports.boolean().optional()
|
|
83968
|
+
canEdit: external_exports.boolean().optional(),
|
|
83969
|
+
/** On a shared item: the reader's own item they shared, or someone's item shared with them. */
|
|
83970
|
+
shared: external_exports.enum(["by_you", "with_you"]).optional(),
|
|
83971
|
+
/** The reader owns the item and may add or remove people on it. */
|
|
83972
|
+
mayShare: external_exports.boolean().optional()
|
|
83814
83973
|
});
|
|
83815
83974
|
var feedViewerStateSchema = feedViewerStateSchemaDefinition;
|
|
83975
|
+
var feedAssigneeSchemaDefinition = external_exports.object({
|
|
83976
|
+
userId: external_exports.string(),
|
|
83977
|
+
name: external_exports.string(),
|
|
83978
|
+
/** Who added them; null for the owner. */
|
|
83979
|
+
sharedByName: external_exports.string().nullable()
|
|
83980
|
+
});
|
|
83981
|
+
var feedSharingSchemaDefinition = external_exports.object({
|
|
83982
|
+
ownerUserId: external_exports.string(),
|
|
83983
|
+
ownerName: external_exports.string(),
|
|
83984
|
+
assignees: external_exports.array(feedAssigneeSchemaDefinition)
|
|
83985
|
+
});
|
|
83816
83986
|
var feedItemSchemaDefinition = external_exports.object({
|
|
83817
83987
|
id: external_exports.string(),
|
|
83818
83988
|
workspaceId: external_exports.string(),
|
|
@@ -83848,6 +84018,8 @@ var feedItemSchemaDefinition = external_exports.object({
|
|
|
83848
84018
|
createdAt: external_exports.iso.datetime(),
|
|
83849
84019
|
updatedAt: external_exports.iso.datetime(),
|
|
83850
84020
|
lastReplyAt: external_exports.iso.datetime().nullable(),
|
|
84021
|
+
/** Set once the item is shared with someone besides its owner. */
|
|
84022
|
+
sharing: feedSharingSchemaDefinition.nullable().optional(),
|
|
83851
84023
|
me: feedViewerStateSchema
|
|
83852
84024
|
});
|
|
83853
84025
|
var feedItemSchema = feedItemSchemaDefinition;
|
|
@@ -84061,6 +84233,33 @@ var feedSnoozeByKeyInputSchemaDefinition = external_exports.object({
|
|
|
84061
84233
|
until: external_exports.iso.datetime({ offset: true })
|
|
84062
84234
|
});
|
|
84063
84235
|
var feedChannelItemsByKeyInputSchemaDefinition = external_exports.object({ channelId: external_exports.string().min(1) });
|
|
84236
|
+
var shareFeedItemInputSchemaDefinition = external_exports.object({
|
|
84237
|
+
...itemRef.shape,
|
|
84238
|
+
userIds: external_exports.array(external_exports.string().min(1)).min(1).max(20)
|
|
84239
|
+
});
|
|
84240
|
+
var shareFeedItemInputSchema = shareFeedItemInputSchemaDefinition;
|
|
84241
|
+
var unshareFeedItemInputSchemaDefinition = external_exports.object({
|
|
84242
|
+
...itemRef.shape,
|
|
84243
|
+
userId: external_exports.string().min(1)
|
|
84244
|
+
});
|
|
84245
|
+
var unshareFeedItemInputSchema = unshareFeedItemInputSchemaDefinition;
|
|
84246
|
+
var feedSharePersonSchemaDefinition = external_exports.object({ userId: external_exports.string(), name: external_exports.string() });
|
|
84247
|
+
var feedSharePersonSchema = feedSharePersonSchemaDefinition;
|
|
84248
|
+
var feedShareAnswerSchemaDefinition = external_exports.object({
|
|
84249
|
+
itemIds: external_exports.array(external_exports.string()),
|
|
84250
|
+
people: external_exports.array(feedSharePersonSchemaDefinition),
|
|
84251
|
+
item: feedItemSchemaDefinition.nullable()
|
|
84252
|
+
});
|
|
84253
|
+
var feedShareAnswerSchema = feedShareAnswerSchemaDefinition;
|
|
84254
|
+
var feedShareByKeyInputSchemaDefinition = external_exports.object({
|
|
84255
|
+
itemId: external_exports.string().min(1).optional(),
|
|
84256
|
+
all: external_exports.boolean().default(false),
|
|
84257
|
+
label: feedLabelSchema.optional(),
|
|
84258
|
+
group: feedGroupSchema.optional(),
|
|
84259
|
+
with: external_exports.array(external_exports.string().trim().min(1)).min(1).max(20)
|
|
84260
|
+
}).refine((input2) => Boolean(input2.itemId) !== input2.all, {
|
|
84261
|
+
message: "Name one item by its id, or --all, not both"
|
|
84262
|
+
});
|
|
84064
84263
|
var FeedApi = moduleApi()("feed");
|
|
84065
84264
|
var feedFileLinkInputSchemaDefinition = external_exports.object({
|
|
84066
84265
|
workspaceId: external_exports.string().min(1),
|
|
@@ -84072,7 +84271,7 @@ var feedFileLinkInputSchemaDefinition = external_exports.object({
|
|
|
84072
84271
|
var feedFileLinkInputSchema = feedFileLinkInputSchemaDefinition;
|
|
84073
84272
|
var feedFileLinkSchemaDefinition = external_exports.object({ url: external_exports.string(), expiresAt: external_exports.iso.datetime() });
|
|
84074
84273
|
var feedFileLinkSchema = feedFileLinkSchemaDefinition;
|
|
84075
|
-
var feedTrpc = defineTrpcContract("feed").query("channelItems").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), channelId: external_exports.string().min(1) })).withOutput(external_exports.array(feedAgentItemSchema)).query("list").withInput(listFeedInputSchema).withOutput(feedViewSchema).query("card").withInput(itemRef).withOutput(feedCardViewSchema).query("fileLink").withInput(feedFileLinkInputSchema).withOutput(feedFileLinkSchema).query("count").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.object({ count: external_exports.number().int().nonnegative() })).query("decisions").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(feedDecisionsSchema).mutation("act").withInput(actFeedItemInputSchema).withOutput(feedItemSchema).mutation("comment").withInput(commentFeedItemInputSchema).withOutput(feedItemSchema).mutation("done").withInput(itemRef).withOutput(feedItemSchema).mutation("stopAutoSend").withInput(itemRef).withOutput(feedItemSchema).mutation("putBack").withInput(putBackFeedItemInputSchema).withOutput(feedItemSchema).mutation("snooze").withInput(snoozeFeedItemInputSchema).withOutput(feedItemSchema).mutation("unsnooze").withInput(itemRef).withOutput(feedItemSchema).mutation("saveDraft").withInput(saveFeedDraftInputSchema).withOutput(feedItemSchema).mutation("editItem").withInput(editFeedItemInputSchema).withOutput(feedItemSchema).mutation("saveMessage").withInput(saveFeedMessageInputSchema).withOutput(feedItemSchema).mutation("answerApproval").withInput(answerFeedApprovalInputSchema).withOutput(feedItemSchema).mutation("decidePublish").withInput(decideFeedPublishInputSchema).withOutput(feedItemSchema).mutation("decideAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideServer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAppAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideComputer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentJoin").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentTransfer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).build();
|
|
84274
|
+
var feedTrpc = defineTrpcContract("feed").query("channelItems").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), channelId: external_exports.string().min(1) })).withOutput(external_exports.array(feedAgentItemSchema)).query("list").withInput(listFeedInputSchema).withOutput(feedViewSchema).query("card").withInput(itemRef).withOutput(feedCardViewSchema).query("fileLink").withInput(feedFileLinkInputSchema).withOutput(feedFileLinkSchema).query("count").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.object({ count: external_exports.number().int().nonnegative() })).query("decisions").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(feedDecisionsSchema).mutation("act").withInput(actFeedItemInputSchema).withOutput(feedItemSchema).mutation("comment").withInput(commentFeedItemInputSchema).withOutput(feedItemSchema).mutation("done").withInput(itemRef).withOutput(feedItemSchema).mutation("stopAutoSend").withInput(itemRef).withOutput(feedItemSchema).mutation("putBack").withInput(putBackFeedItemInputSchema).withOutput(feedItemSchema).mutation("snooze").withInput(snoozeFeedItemInputSchema).withOutput(feedItemSchema).mutation("unsnooze").withInput(itemRef).withOutput(feedItemSchema).mutation("saveDraft").withInput(saveFeedDraftInputSchema).withOutput(feedItemSchema).mutation("editItem").withInput(editFeedItemInputSchema).withOutput(feedItemSchema).mutation("saveMessage").withInput(saveFeedMessageInputSchema).withOutput(feedItemSchema).mutation("share").withInput(shareFeedItemInputSchema).withOutput(feedShareAnswerSchema).mutation("unshare").withInput(unshareFeedItemInputSchema).withOutput(feedShareAnswerSchema).query("shareCandidates").withInput(itemRef).withOutput(external_exports.array(feedSharePersonSchema)).mutation("answerApproval").withInput(answerFeedApprovalInputSchema).withOutput(feedItemSchema).mutation("decidePublish").withInput(decideFeedPublishInputSchema).withOutput(feedItemSchema).mutation("decideAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideServer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAppAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideComputer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentJoin").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentTransfer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).build();
|
|
84076
84275
|
var feedUi = uiTokens("feed");
|
|
84077
84276
|
var FeedNavSlot = feedUi.component("nav");
|
|
84078
84277
|
var FeedDecisionsSlot = feedUi.component("decisions");
|
|
@@ -84376,6 +84575,8 @@ var USAGE9 = `Usage:
|
|
|
84376
84575
|
laze feed inbox
|
|
84377
84576
|
laze feed close <id>|--loop <key> --note <text>
|
|
84378
84577
|
laze feed loops [--json]
|
|
84578
|
+
laze feed share <id>|--all [--label <word>|--group <name>] --with <person>...
|
|
84579
|
+
laze feed unshare <id>|--all --with <person>...
|
|
84379
84580
|
laze feed group-summary <group>
|
|
84380
84581
|
laze feed list [--json]
|
|
84381
84582
|
laze feed count
|
|
@@ -84508,6 +84709,38 @@ async function feedClose({ context, args }) {
|
|
|
84508
84709
|
context.out(`${closed.item.id} closed ${closed.item.title}
|
|
84509
84710
|
`);
|
|
84510
84711
|
}
|
|
84712
|
+
function shareCommand({ move: move3 }) {
|
|
84713
|
+
return async ({ context, args }) => {
|
|
84714
|
+
const itemId = args.words[2];
|
|
84715
|
+
const all = args.flags.all === true;
|
|
84716
|
+
const people2 = args.lists.with ?? [];
|
|
84717
|
+
if (people2.length === 0 || Boolean(itemId) === all) throw new CliUsageError(USAGE9);
|
|
84718
|
+
const label3 = flagText({ args, name: "label" });
|
|
84719
|
+
const group = flagText({ args, name: "group" });
|
|
84720
|
+
const { client } = await signedIn({ context, args });
|
|
84721
|
+
const answer5 = await client.post(`/api/feed/items/${move3}`, {
|
|
84722
|
+
...itemId ? { itemId } : { all: true },
|
|
84723
|
+
...optionalWords({ label: label3, group }),
|
|
84724
|
+
with: people2
|
|
84725
|
+
});
|
|
84726
|
+
if (args.flags.json) return context.out(`${JSON.stringify(answer5, null, 2)}
|
|
84727
|
+
`);
|
|
84728
|
+
context.out(shareLinesOf({ move: move3, answer: answer5 }));
|
|
84729
|
+
};
|
|
84730
|
+
}
|
|
84731
|
+
function optionalWords(words) {
|
|
84732
|
+
return Object.fromEntries(
|
|
84733
|
+
Object.entries(words).filter((entry) => Boolean(entry[1]))
|
|
84734
|
+
);
|
|
84735
|
+
}
|
|
84736
|
+
function shareLinesOf({ move: move3, answer: answer5 }) {
|
|
84737
|
+
const names = answer5.people.map((person) => person.name).join(", ") || "no one new";
|
|
84738
|
+
const count5 = answer5.itemIds.length;
|
|
84739
|
+
const items = `${count5} item${count5 === 1 ? "" : "s"}`;
|
|
84740
|
+
const head = move3 === "share" ? `Shared ${items} with ${names}` : `Took ${names} off ${items}`;
|
|
84741
|
+
return [head, ...answer5.itemIds].map((line) => `${line}
|
|
84742
|
+
`).join("");
|
|
84743
|
+
}
|
|
84511
84744
|
async function feedLoops({ context, args }) {
|
|
84512
84745
|
const { client } = await signedIn({ context, args });
|
|
84513
84746
|
const loops = await client.get("/api/feed/loops");
|
|
@@ -84664,6 +84897,8 @@ var FEED_COMMANDS = {
|
|
|
84664
84897
|
"group-summary": feedGroupSummary,
|
|
84665
84898
|
close: feedClose,
|
|
84666
84899
|
loops: feedLoops,
|
|
84900
|
+
share: shareCommand({ move: "share" }),
|
|
84901
|
+
unshare: shareCommand({ move: "unshare" }),
|
|
84667
84902
|
list: feedList,
|
|
84668
84903
|
count: feedCount,
|
|
84669
84904
|
decisions: feedDecisions,
|
|
@@ -85186,19 +85421,19 @@ async function readPending({
|
|
|
85186
85421
|
url: url2,
|
|
85187
85422
|
args
|
|
85188
85423
|
}) {
|
|
85189
|
-
const
|
|
85424
|
+
const pending2 = await readFile31(pendingPathOf({ context }), "utf8").then(
|
|
85190
85425
|
(text2) => JSON.parse(text2),
|
|
85191
85426
|
() => void 0
|
|
85192
85427
|
);
|
|
85193
|
-
if (!
|
|
85194
|
-
if (args && !asksTheSame({ pending, flags: flaggedOf({ args }) })) return void 0;
|
|
85195
|
-
return Temporal3.Instant.from(
|
|
85428
|
+
if (!pending2 || pending2.url !== url2) return void 0;
|
|
85429
|
+
if (args && !asksTheSame({ pending: pending2, flags: flaggedOf({ args }) })) return void 0;
|
|
85430
|
+
return Temporal3.Instant.from(pending2.expiresAt).epochMilliseconds > context.nowMs() ? pending2 : void 0;
|
|
85196
85431
|
}
|
|
85197
|
-
async function keepPending({ context, pending }) {
|
|
85432
|
+
async function keepPending({ context, pending: pending2 }) {
|
|
85198
85433
|
const path = pendingPathOf({ context });
|
|
85199
85434
|
await mkdir20(dirname19(path), { recursive: true, mode: 448 });
|
|
85200
85435
|
const temporary = `${path}.${process.pid}.tmp`;
|
|
85201
|
-
await writeFile20(temporary, JSON.stringify(
|
|
85436
|
+
await writeFile20(temporary, JSON.stringify(pending2), { mode: 384 });
|
|
85202
85437
|
await rename6(temporary, path);
|
|
85203
85438
|
}
|
|
85204
85439
|
async function dropPending({ context }) {
|
|
@@ -85218,9 +85453,9 @@ function flaggedOf({ args }) {
|
|
|
85218
85453
|
const forEmail = flagText({ args, name: "for" });
|
|
85219
85454
|
return { ...workspace2 ? { workspace: workspace2 } : {}, ...forEmail ? { forEmail } : {} };
|
|
85220
85455
|
}
|
|
85221
|
-
function asksTheSame({ pending, flags: flags2 }) {
|
|
85456
|
+
function asksTheSame({ pending: pending2, flags: flags2 }) {
|
|
85222
85457
|
if (!flags2.workspace && !flags2.forEmail) return true;
|
|
85223
|
-
return flags2.workspace ===
|
|
85458
|
+
return flags2.workspace === pending2.asked?.workspace && flags2.forEmail === pending2.asked?.forEmail;
|
|
85224
85459
|
}
|
|
85225
85460
|
async function askedOf({
|
|
85226
85461
|
context,
|
|
@@ -85234,27 +85469,27 @@ async function askedOf({
|
|
|
85234
85469
|
)).trim();
|
|
85235
85470
|
return answer5 ? { workspace: answer5 } : {};
|
|
85236
85471
|
}
|
|
85237
|
-
function waitingText({ pending, resumed }) {
|
|
85238
|
-
const where =
|
|
85239
|
-
`The request waits in ${
|
|
85472
|
+
function waitingText({ pending: pending2, resumed }) {
|
|
85473
|
+
const where = pending2.workspaceName ? [
|
|
85474
|
+
`The request waits in ${pending2.workspaceName}'s feed for its approvers; it also opens at ${pending2.approveUrl}`
|
|
85240
85475
|
] : [
|
|
85241
|
-
`Ask your person to open ${
|
|
85476
|
+
`Ask your person to open ${pending2.approveUrl} and approve it once.`,
|
|
85242
85477
|
"Pass --workspace <name> next time so it shows in their feed."
|
|
85243
85478
|
];
|
|
85244
|
-
const first = `${resumed ? "Still waiting" : "Asked to join Laze"}: code ${
|
|
85479
|
+
const first = `${resumed ? "Still waiting" : "Asked to join Laze"}: code ${pending2.code}.`;
|
|
85245
85480
|
return [first, ...where, ""].join("\n");
|
|
85246
85481
|
}
|
|
85247
|
-
async function stillOurs({ context, pending }) {
|
|
85248
|
-
const kept = await readPending({ context, url:
|
|
85249
|
-
return kept?.requestToken ===
|
|
85482
|
+
async function stillOurs({ context, pending: pending2 }) {
|
|
85483
|
+
const kept = await readPending({ context, url: pending2.url });
|
|
85484
|
+
return kept?.requestToken === pending2.requestToken;
|
|
85250
85485
|
}
|
|
85251
85486
|
async function pollOnce({
|
|
85252
85487
|
context,
|
|
85253
85488
|
client,
|
|
85254
|
-
pending
|
|
85489
|
+
pending: pending2
|
|
85255
85490
|
}) {
|
|
85256
85491
|
const answer5 = await client.post("/api/agents/join-requests/poll", {
|
|
85257
|
-
requestToken:
|
|
85492
|
+
requestToken: pending2.requestToken
|
|
85258
85493
|
}).catch(async (error62) => {
|
|
85259
85494
|
if (!(error62 instanceof LazeApiError)) throw error62;
|
|
85260
85495
|
if (error62.code === "agent_join_request_claimed") return { status: "taken" };
|
|
@@ -85274,15 +85509,15 @@ async function approvalOf({
|
|
|
85274
85509
|
context,
|
|
85275
85510
|
args,
|
|
85276
85511
|
client,
|
|
85277
|
-
pending
|
|
85512
|
+
pending: pending2
|
|
85278
85513
|
}) {
|
|
85279
85514
|
const deadline = context.nowMs() + waitSecondsOf3({ args }) * 1e3;
|
|
85280
|
-
const polls = Math.ceil(waitSecondsOf3({ args }) /
|
|
85515
|
+
const polls = Math.ceil(waitSecondsOf3({ args }) / pending2.intervalSeconds) + 1;
|
|
85281
85516
|
for (let poll = 0; poll < polls; poll += 1) {
|
|
85282
|
-
if (poll > 0 && !await stillOurs({ context, pending })) return { kind: "taken" };
|
|
85283
|
-
const outcome = await pollOnce({ context, client, pending });
|
|
85517
|
+
if (poll > 0 && !await stillOurs({ context, pending: pending2 })) return { kind: "taken" };
|
|
85518
|
+
const outcome = await pollOnce({ context, client, pending: pending2 });
|
|
85284
85519
|
if (outcome.kind !== "waiting" || context.nowMs() >= deadline) return outcome;
|
|
85285
|
-
await context.sleep(
|
|
85520
|
+
await context.sleep(pending2.intervalSeconds * 1e3);
|
|
85286
85521
|
}
|
|
85287
85522
|
return { kind: "waiting" };
|
|
85288
85523
|
}
|
|
@@ -85292,28 +85527,28 @@ async function joinAsAgent({ context, args }) {
|
|
|
85292
85527
|
const client = LazeClient.create({ baseUrl: url2, fetcher: context.fetcher });
|
|
85293
85528
|
const resumed = args.flags.restart ? void 0 : await readPending({ context, url: url2, args });
|
|
85294
85529
|
const asked = resumed ? {} : await askedOf({ context, args });
|
|
85295
|
-
const
|
|
85530
|
+
const pending2 = resumed ?? await client.post("/api/agents/join-requests", {
|
|
85296
85531
|
harness,
|
|
85297
85532
|
...asked,
|
|
85298
85533
|
...flagText({ args, name: "name" }) ? { name: flagText({ args, name: "name" }) } : {},
|
|
85299
85534
|
...flagText({ args, name: "note" }) ? { note: flagText({ args, name: "note" }) } : {}
|
|
85300
85535
|
}).then((started) => ({ ...started, url: url2, asked })).catch((error62) => sandboxed({ context, error: error62 }));
|
|
85301
|
-
if (!resumed) await keepPending({ context, pending });
|
|
85302
|
-
context.out(waitingText({ pending, resumed: !!resumed }));
|
|
85303
|
-
const outcome = await approvalOf({ context, args, client, pending });
|
|
85536
|
+
if (!resumed) await keepPending({ context, pending: pending2 });
|
|
85537
|
+
context.out(waitingText({ pending: pending2, resumed: !!resumed }));
|
|
85538
|
+
const outcome = await approvalOf({ context, args, client, pending: pending2 });
|
|
85304
85539
|
if (outcome.kind === "taken") {
|
|
85305
85540
|
context.out("This request already joined in another `laze join` run. Run `laze whoami`.\n");
|
|
85306
85541
|
return;
|
|
85307
85542
|
}
|
|
85308
85543
|
if (outcome.kind === "approved") {
|
|
85309
85544
|
const { linked } = outcome;
|
|
85310
|
-
const where = outcome.workspaceName ||
|
|
85545
|
+
const where = outcome.workspaceName || pending2.workspaceName || linked.agent.workspaceId;
|
|
85311
85546
|
context.out(`Joined ${where} as ${linked.agent.name}.
|
|
85312
85547
|
`);
|
|
85313
85548
|
return settleLinked({ context, args, url: url2, harness, pid, linked });
|
|
85314
85549
|
}
|
|
85315
85550
|
context.out(
|
|
85316
|
-
`Not approved yet. Run \`laze join\` again to keep waiting; the code works until ${
|
|
85551
|
+
`Not approved yet. Run \`laze join\` again to keep waiting; the code works until ${pending2.expiresAt}.
|
|
85317
85552
|
`
|
|
85318
85553
|
);
|
|
85319
85554
|
}
|
|
@@ -88237,8 +88472,8 @@ async function untilAllAnswered({
|
|
|
88237
88472
|
return "capped";
|
|
88238
88473
|
}
|
|
88239
88474
|
await context.sleep(POLL_MS);
|
|
88240
|
-
for (const [key,
|
|
88241
|
-
const next = await door.status(
|
|
88475
|
+
for (const [key, pending2] of waiting) {
|
|
88476
|
+
const next = await door.status(pending2.requestId);
|
|
88242
88477
|
if (next.outcome === "ask") waiting.set(key, next);
|
|
88243
88478
|
else {
|
|
88244
88479
|
waiting.delete(key);
|
|
@@ -88595,15 +88830,15 @@ async function vaultSaveFromMessage({
|
|
|
88595
88830
|
// src/services/vault-save-commands.service.ts
|
|
88596
88831
|
async function vaultSave({ context, args }) {
|
|
88597
88832
|
if (flagText({ args, name: "from-message" })) return vaultSaveFromMessage({ context, args });
|
|
88598
|
-
const
|
|
88833
|
+
const pending2 = args.words[2];
|
|
88599
88834
|
const name3 = flagText({ args, name: "name" });
|
|
88600
88835
|
const description = flagText({ args, name: "description" });
|
|
88601
|
-
if (!
|
|
88836
|
+
if (!pending2 || !name3 || !description) throw new CliUsageError(SAVE_USAGE);
|
|
88602
88837
|
const saved3 = await postInTurn({
|
|
88603
88838
|
context,
|
|
88604
88839
|
args,
|
|
88605
88840
|
path: "/api/vault/pending-secrets/save",
|
|
88606
|
-
body: { pending, name: name3, description }
|
|
88841
|
+
body: { pending: pending2, name: name3, description }
|
|
88607
88842
|
});
|
|
88608
88843
|
printSaved({ context, args, saved: saved3 });
|
|
88609
88844
|
}
|
package/package.json
CHANGED