@lazehq/cli 0.1.45 → 0.1.47
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 +796 -386
- package/package.json +1 -1
package/dist/laze.mjs
CHANGED
|
@@ -30889,6 +30889,7 @@ var FIRST_SECOND = 1577836800n;
|
|
|
30889
30889
|
var LAST_SECOND = 4102444800n;
|
|
30890
30890
|
var SEPARATOR = /[/?&=#]/;
|
|
30891
30891
|
var WORD = /^[A-Za-z-]{0,40}$/;
|
|
30892
|
+
var FILE_NAME = /^[A-Za-z0-9 ._-]{1,120}\.[A-Za-z0-9]{1,8}$/;
|
|
30892
30893
|
var SLACK_ID = /^[A-Z][A-Z0-9]{7,12}$/;
|
|
30893
30894
|
function isLazeId(token2) {
|
|
30894
30895
|
const body = LAZE_ID.exec(token2)?.[1];
|
|
@@ -30905,7 +30906,7 @@ function isLazeIdText(text2) {
|
|
|
30905
30906
|
const segments = text2.split(SEPARATOR).filter((segment) => segment.length > 0);
|
|
30906
30907
|
if (!segments.some(isLazeId)) return false;
|
|
30907
30908
|
return segments.every(
|
|
30908
|
-
(segment) => isLazeId(segment) || WORD.test(segment) || SLACK_ID.test(segment)
|
|
30909
|
+
(segment, index) => isLazeId(segment) || WORD.test(segment) || SLACK_ID.test(segment) || index > 0 && isLazeId(segments[index - 1] ?? "") && FILE_NAME.test(segment)
|
|
30909
30910
|
);
|
|
30910
30911
|
}
|
|
30911
30912
|
|
|
@@ -31455,7 +31456,7 @@ function matchSlice({
|
|
|
31455
31456
|
if (ruleIds && !ruleIds.has(rule.id)) continue;
|
|
31456
31457
|
if (rule.precondition && !rule.precondition(text2)) continue;
|
|
31457
31458
|
const matches = rawMatches(rule, text2);
|
|
31458
|
-
found.push(...matches.filter((match) => !isLazeIdText(text2
|
|
31459
|
+
found.push(...matches.filter((match) => !isLazeIdText(withExtension({ text: text2, match }))));
|
|
31459
31460
|
}
|
|
31460
31461
|
return withoutOverlaps(found).map((match) => {
|
|
31461
31462
|
const value = text2.slice(match.start, match.end);
|
|
@@ -31468,6 +31469,10 @@ function matchSlice({
|
|
|
31468
31469
|
};
|
|
31469
31470
|
});
|
|
31470
31471
|
}
|
|
31472
|
+
function withExtension({ text: text2, match }) {
|
|
31473
|
+
const extension2 = /^\.[A-Za-z0-9]{1,8}(?![A-Za-z0-9])/.exec(text2.slice(match.end))?.[0] ?? "";
|
|
31474
|
+
return text2.slice(match.start, match.end) + extension2;
|
|
31475
|
+
}
|
|
31471
31476
|
function findSecrets({
|
|
31472
31477
|
text: text2,
|
|
31473
31478
|
ruleIds
|
|
@@ -35671,6 +35676,7 @@ var SWITCHES = /* @__PURE__ */ new Set([
|
|
|
35671
35676
|
"clear",
|
|
35672
35677
|
"wait-reply",
|
|
35673
35678
|
"no-publish",
|
|
35679
|
+
// retired: accepted and ignored, every push is live
|
|
35674
35680
|
"local",
|
|
35675
35681
|
"done",
|
|
35676
35682
|
"names",
|
|
@@ -35712,7 +35718,7 @@ function flagText({
|
|
|
35712
35718
|
}
|
|
35713
35719
|
|
|
35714
35720
|
// src/rules/cli-version.rules.ts
|
|
35715
|
-
var STAMPED = "0.1.
|
|
35721
|
+
var STAMPED = "0.1.47";
|
|
35716
35722
|
function cliVersionOf({ stamped = STAMPED } = {}) {
|
|
35717
35723
|
return stamped.startsWith("__") ? "dev" : stamped;
|
|
35718
35724
|
}
|
|
@@ -56403,6 +56409,12 @@ var HandledErrorRuntime = class _HandledErrorRuntime extends Error {
|
|
|
56403
56409
|
tips;
|
|
56404
56410
|
docsUrl;
|
|
56405
56411
|
reasons;
|
|
56412
|
+
/** A refusal's own sentence, written to be shown (the message scan holds every one to it). */
|
|
56413
|
+
noticeOf() {
|
|
56414
|
+
if (this.httpStatus >= 500 || this.message === "" || this.message === this.code)
|
|
56415
|
+
return void 0;
|
|
56416
|
+
return this.message;
|
|
56417
|
+
}
|
|
56406
56418
|
/** Produce the full user-facing serialised shape. */
|
|
56407
56419
|
serialize() {
|
|
56408
56420
|
const { traceUrl, logsUrl } = _HandledErrorRuntime.traceLinks(this.traceId);
|
|
@@ -56420,6 +56432,7 @@ var HandledErrorRuntime = class _HandledErrorRuntime extends Error {
|
|
|
56420
56432
|
retryable: this.retryable,
|
|
56421
56433
|
...this.tips.length > 0 ? { tips: this.tips } : {},
|
|
56422
56434
|
...this.docsUrl ? { docsUrl: this.docsUrl } : {},
|
|
56435
|
+
...this.noticeOf() ? { notice: this.noticeOf() } : {},
|
|
56423
56436
|
reasons: this.reasons.map(serializeReason)
|
|
56424
56437
|
};
|
|
56425
56438
|
}
|
|
@@ -57511,6 +57524,7 @@ var serializedHandledErrorWireSchema = external_exports.object({
|
|
|
57511
57524
|
fault: handledErrorFaultSchema.default("customer"),
|
|
57512
57525
|
tips: external_exports.array(external_exports.string()).optional(),
|
|
57513
57526
|
docsUrl: external_exports.string().optional(),
|
|
57527
|
+
notice: external_exports.string().optional(),
|
|
57514
57528
|
reasons: external_exports.array(serializedReasonSchema).default([])
|
|
57515
57529
|
}).passthrough().transform((value, context) => {
|
|
57516
57530
|
const code = value.code ?? value.kind;
|
|
@@ -58256,7 +58270,7 @@ var connectCardSchemaDefinition = external_exports.object({
|
|
|
58256
58270
|
outcome: external_exports.string().max(400),
|
|
58257
58271
|
expiresAt: external_exports.iso.datetime()
|
|
58258
58272
|
});
|
|
58259
|
-
var appCardStateSchema = external_exports.enum(["
|
|
58273
|
+
var appCardStateSchema = external_exports.enum(["offline", "live", "public", "deleted"]);
|
|
58260
58274
|
var appCardSchemaDefinition = external_exports.object({
|
|
58261
58275
|
type: external_exports.literal("app"),
|
|
58262
58276
|
appId: idSchema4,
|
|
@@ -58264,7 +58278,7 @@ var appCardSchemaDefinition = external_exports.object({
|
|
|
58264
58278
|
/** What the newest version changed, in the agent's words. */
|
|
58265
58279
|
caption: external_exports.string().max(400),
|
|
58266
58280
|
state: appCardStateSchema,
|
|
58267
|
-
/** The
|
|
58281
|
+
/** The app's own address. */
|
|
58268
58282
|
url: external_exports.string().max(500),
|
|
58269
58283
|
/** The collection whose first rows the card shows; null takes the view's, or the first one. */
|
|
58270
58284
|
collection: external_exports.string().max(120).nullable().default(null),
|
|
@@ -58384,7 +58398,12 @@ var failureCardSchemaDefinition = external_exports.object({
|
|
|
58384
58398
|
type: external_exports.literal("failure"),
|
|
58385
58399
|
details: external_exports.string().min(1).max(NOTICE_DETAILS_MAX),
|
|
58386
58400
|
/** An agent's failed turn: Try again sends this person's message to the agent again. */
|
|
58387
|
-
retry: external_exports.object({
|
|
58401
|
+
retry: external_exports.object({
|
|
58402
|
+
agentId: idSchema4,
|
|
58403
|
+
messageId: idSchema4,
|
|
58404
|
+
/** The attempt that failed; a later one stored means it was already tried again. */
|
|
58405
|
+
attempt: external_exports.number().int().min(1).optional()
|
|
58406
|
+
}).optional()
|
|
58388
58407
|
});
|
|
58389
58408
|
var messageCardSchemaDefinition = external_exports.discriminatedUnion("type", [
|
|
58390
58409
|
attentionCardSchemaDefinition,
|
|
@@ -58496,6 +58515,12 @@ var messageSchemaDefinition = external_exports.object({
|
|
|
58496
58515
|
notInChannel: external_exports.array(notInChannelSchemaDefinition).optional()
|
|
58497
58516
|
});
|
|
58498
58517
|
var messageSchema = messageSchemaDefinition;
|
|
58518
|
+
var departedPersonSchemaDefinition = external_exports.object({
|
|
58519
|
+
id: idSchema4,
|
|
58520
|
+
name: external_exports.string(),
|
|
58521
|
+
/** When they left; null when chat learnt of it later, from the chat-departed-names task. */
|
|
58522
|
+
departedAt: external_exports.iso.datetime().nullable()
|
|
58523
|
+
});
|
|
58499
58524
|
var conversationSchemaDefinition = external_exports.object({
|
|
58500
58525
|
id: idSchema4,
|
|
58501
58526
|
workspaceId: workspaceIdSchema,
|
|
@@ -58524,7 +58549,12 @@ var conversationSchemaDefinition = external_exports.object({
|
|
|
58524
58549
|
/** Set when the conversation mirrors one outside Laze. */
|
|
58525
58550
|
mirror: conversationMirrorSchemaDefinition.nullable(),
|
|
58526
58551
|
/** For a `chat`, the agent it is with; null for every other kind. */
|
|
58527
|
-
agentId: idSchema4.nullish()
|
|
58552
|
+
agentId: idSchema4.nullish(),
|
|
58553
|
+
/**
|
|
58554
|
+
* Direct messages only: the people who left the workspace while in it, no longer members.
|
|
58555
|
+
* Spec: modules/chat/specs/departed-person-direct.feature. Absent means no one.
|
|
58556
|
+
*/
|
|
58557
|
+
departed: external_exports.array(departedPersonSchemaDefinition).optional()
|
|
58528
58558
|
});
|
|
58529
58559
|
var conversationSchema = conversationSchemaDefinition;
|
|
58530
58560
|
var conversationSummarySchemaDefinition = external_exports.object({
|
|
@@ -58753,6 +58783,12 @@ var agentChatMemberInputSchemaDefinition = external_exports.object({
|
|
|
58753
58783
|
ownerUserId: idSchema4,
|
|
58754
58784
|
userId: idSchema4
|
|
58755
58785
|
});
|
|
58786
|
+
var handAgentChatInputSchemaDefinition = external_exports.object({
|
|
58787
|
+
workspaceId: workspaceIdSchema,
|
|
58788
|
+
agent: openAgentDirectInputSchemaDefinition.shape.agent,
|
|
58789
|
+
fromUserId: idSchema4,
|
|
58790
|
+
toUserId: idSchema4
|
|
58791
|
+
});
|
|
58756
58792
|
var historyInputSchemaDefinition = external_exports.object({
|
|
58757
58793
|
workspaceId: workspaceIdSchema,
|
|
58758
58794
|
channelId: idSchema4,
|
|
@@ -58956,7 +58992,9 @@ var signalActivityInputSchemaDefinition = external_exports.object({
|
|
|
58956
58992
|
contextTokens: external_exports.number().int().nonnegative().nullable().default(null),
|
|
58957
58993
|
contextWindow: external_exports.number().int().positive().nullable().default(null),
|
|
58958
58994
|
/** With `queued`: the conversation the agent is busy in, named only to people who see it. */
|
|
58959
|
-
elsewhere: idSchema4.nullable().default(null)
|
|
58995
|
+
elsewhere: idSchema4.nullable().default(null),
|
|
58996
|
+
/** With `thinking`: no turn has taken the message yet ("Waiting for <agent> to pick this up"). */
|
|
58997
|
+
waiting: external_exports.boolean().default(false)
|
|
58960
58998
|
});
|
|
58961
58999
|
var setAgentLimitInputSchemaDefinition = external_exports.object({
|
|
58962
59000
|
workspaceId: workspaceIdSchema,
|
|
@@ -59151,7 +59189,9 @@ var threadsUnreadSchema = threadsUnreadSchemaDefinition;
|
|
|
59151
59189
|
var workspaceUnreadSchemaDefinition = external_exports.object({
|
|
59152
59190
|
workspaceId: workspaceIdSchema,
|
|
59153
59191
|
unread: external_exports.number().int().nonnegative(),
|
|
59154
|
-
mentions: external_exports.number().int().nonnegative()
|
|
59192
|
+
mentions: external_exports.number().int().nonnegative(),
|
|
59193
|
+
/** The Notifications count, the number the switcher, the bell and the tab show for it. */
|
|
59194
|
+
notifications: external_exports.number().int().nonnegative()
|
|
59155
59195
|
});
|
|
59156
59196
|
var workspaceUnreadSchema = workspaceUnreadSchemaDefinition;
|
|
59157
59197
|
var activityKindSchema = external_exports.enum(["mention", "thread_reply", "keyword", "reaction"]);
|
|
@@ -59409,7 +59449,7 @@ var chatConversationsTrpc = defineTrpcContract("chat").query("overview").withInp
|
|
|
59409
59449
|
var chatChannelRolesTrpc = defineTrpcContract("chat").mutation("setChannelRole").withInput(setChannelRoleInputSchema).withOutput(conversationSchema).mutation("extendChannel").withInput(extendChannelInputSchema).withOutput(conversationSchema).build();
|
|
59410
59450
|
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();
|
|
59411
59451
|
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(hideUnfurlInputSchema).withOutput(fileLinkSchema).build();
|
|
59412
|
-
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).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();
|
|
59452
|
+
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();
|
|
59413
59453
|
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();
|
|
59414
59454
|
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();
|
|
59415
59455
|
var chatPresenceTrpc = defineTrpcContract("chat").mutation("heartbeat").withInput(workspaceInputSchema).withOutput(heartbeatSchema).query("presence").withInput(workspaceInputSchema).withOutput(presenceListSchema).mutation("setStatus").withInput(setStatusInputSchema).withOutput(personPresenceSchema).mutation("clearStatus").withInput(workspaceInputSchema).withOutput(personPresenceSchema).mutation("setAway").withInput(setAwayInputSchema).withOutput(personPresenceSchema).build();
|
|
@@ -59695,7 +59735,9 @@ var messageNoticeSchema = external_exports.object({
|
|
|
59695
59735
|
/** It came in through a mirror such as Slack, whose own app already rings: Laze stays silent. */
|
|
59696
59736
|
mirrored: external_exports.boolean().optional(),
|
|
59697
59737
|
/** An @channel or @here raised it, not the conversation's every-message level. */
|
|
59698
|
-
broadcast: external_exports.boolean().optional()
|
|
59738
|
+
broadcast: external_exports.boolean().optional(),
|
|
59739
|
+
/** The person's Notifications count, from chat: the iPhone's icon badge shows it. */
|
|
59740
|
+
badge: external_exports.number().int().nonnegative().optional()
|
|
59699
59741
|
});
|
|
59700
59742
|
var approvalNoticeSchema = external_exports.object({
|
|
59701
59743
|
workspaceId: workspaceIdSchema2,
|
|
@@ -59707,7 +59749,9 @@ var approvalNoticeSchema = external_exports.object({
|
|
|
59707
59749
|
/** The plain line only, never the command or the secret's details. */
|
|
59708
59750
|
body: external_exports.string().max(400),
|
|
59709
59751
|
/** The chat message holding the card, or the feed when there is none. */
|
|
59710
|
-
path: external_exports.string().startsWith("/").max(1024)
|
|
59752
|
+
path: external_exports.string().startsWith("/").max(1024),
|
|
59753
|
+
/** The person's Notifications count, from chat: the iPhone's icon badge shows it. */
|
|
59754
|
+
badge: external_exports.number().int().nonnegative().optional()
|
|
59711
59755
|
});
|
|
59712
59756
|
var feedNoticeSchema = external_exports.object({
|
|
59713
59757
|
workspaceId: workspaceIdSchema2,
|
|
@@ -59723,7 +59767,9 @@ var feedNoticeSchema = external_exports.object({
|
|
|
59723
59767
|
/** The feed event behind the push: each new event pushes, a retried one does not. */
|
|
59724
59768
|
eventId: external_exports.string().min(1).max(200).optional(),
|
|
59725
59769
|
/** Which setting turns it off; none means it always pushes. */
|
|
59726
|
-
pushKind: feedPushKindSchema.optional()
|
|
59770
|
+
pushKind: feedPushKindSchema.optional(),
|
|
59771
|
+
/** The person's Notifications count, from chat: the iPhone's icon badge shows it. */
|
|
59772
|
+
badge: external_exports.number().int().nonnegative().optional()
|
|
59727
59773
|
});
|
|
59728
59774
|
var notifyInputSchemaDefinition = external_exports.discriminatedUnion("kind", [
|
|
59729
59775
|
messageNoticeSchema,
|
|
@@ -60373,7 +60419,9 @@ var realtimePublicationSchemaDefinition = external_exports.discriminatedUnion("t
|
|
|
60373
60419
|
text: external_exports.string(),
|
|
60374
60420
|
contextTokens: external_exports.number().int().nonnegative().nullable(),
|
|
60375
60421
|
contextWindow: external_exports.number().int().positive().nullable(),
|
|
60376
|
-
elsewhere: external_exports.string().nullable().optional()
|
|
60422
|
+
elsewhere: external_exports.string().nullable().optional(),
|
|
60423
|
+
/** With `thinking`: no turn has taken the message yet; apps that miss it read thinking. */
|
|
60424
|
+
waiting: external_exports.boolean().optional()
|
|
60377
60425
|
}),
|
|
60378
60426
|
external_exports.object({
|
|
60379
60427
|
type: external_exports.literal("typing"),
|
|
@@ -61818,6 +61866,15 @@ var vaultAlertRaisedPayloadSchemaDefinition = external_exports.object({
|
|
|
61818
61866
|
// ../../modules/vault/contract/src/vault-reference-chip.ts
|
|
61819
61867
|
var VaultReferenceChipSlot = uiTokens("vault").component("referenceChip");
|
|
61820
61868
|
var VaultMessageFootSlot = uiTokens("vault").component("messageFoot");
|
|
61869
|
+
var REFERENCE = /\{\{vault:([A-Za-z0-9_][A-Za-z0-9_./:-]*)\}\}/g;
|
|
61870
|
+
function vaultReferenceNames({ text: text2 }) {
|
|
61871
|
+
return [...new Set([...text2.matchAll(REFERENCE)].map((match) => match[1] ?? ""))].filter(
|
|
61872
|
+
(name3) => name3 !== ""
|
|
61873
|
+
);
|
|
61874
|
+
}
|
|
61875
|
+
function vaultReferenceConnectionName({ name: name3 }) {
|
|
61876
|
+
return name3.split(".")[0] ?? name3;
|
|
61877
|
+
}
|
|
61821
61878
|
|
|
61822
61879
|
// ../../modules/vault/contract/src/vault-pending.ts
|
|
61823
61880
|
var connectionName2 = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,62}$/);
|
|
@@ -62116,6 +62173,73 @@ var vaultAwsSessionSchemaDefinition = external_exports.object({
|
|
|
62116
62173
|
expiration: external_exports.iso.datetime({ offset: true })
|
|
62117
62174
|
});
|
|
62118
62175
|
|
|
62176
|
+
// ../../modules/vault/contract/src/vault-placeholders.ts
|
|
62177
|
+
var PLACEHOLDER = /\{\{\s*vault:[^}]*\}\}/;
|
|
62178
|
+
function unusableFieldProblems({
|
|
62179
|
+
fields
|
|
62180
|
+
}) {
|
|
62181
|
+
return Object.entries(fields).flatMap(([field, value]) => {
|
|
62182
|
+
if (PLACEHOLDER.test(value)) return [`${field} holds a vault placeholder, not a value`];
|
|
62183
|
+
if (value.trim() === field) return [`${field} holds its own name, not a value`];
|
|
62184
|
+
return [];
|
|
62185
|
+
});
|
|
62186
|
+
}
|
|
62187
|
+
function referenceParts(name3) {
|
|
62188
|
+
const dot = name3.indexOf(".");
|
|
62189
|
+
if (dot === -1) return { connection: name3, field: null };
|
|
62190
|
+
return { connection: name3.slice(0, dot), field: name3.slice(dot + 1) };
|
|
62191
|
+
}
|
|
62192
|
+
function commandReferenceNames({ command }) {
|
|
62193
|
+
return [...new Set(command.flatMap((word3) => vaultReferenceNames({ text: word3 })))];
|
|
62194
|
+
}
|
|
62195
|
+
function referenceValue({
|
|
62196
|
+
name: name3,
|
|
62197
|
+
released
|
|
62198
|
+
}) {
|
|
62199
|
+
const { connection, field } = referenceParts(name3);
|
|
62200
|
+
const fields = released.get(connection);
|
|
62201
|
+
if (!fields) {
|
|
62202
|
+
return {
|
|
62203
|
+
refusal: `{{vault:${name3}}} names ${connection}, which this run does not release`
|
|
62204
|
+
};
|
|
62205
|
+
}
|
|
62206
|
+
const names = Object.keys(fields).toSorted();
|
|
62207
|
+
if (field !== null) {
|
|
62208
|
+
const value = fields[field];
|
|
62209
|
+
if (value === void 0) {
|
|
62210
|
+
return { refusal: `${connection} has no field ${field}; its fields are ${names.join(", ")}` };
|
|
62211
|
+
}
|
|
62212
|
+
return { value };
|
|
62213
|
+
}
|
|
62214
|
+
const only = names.length === 1 ? fields[names[0] ?? ""] : void 0;
|
|
62215
|
+
if (only === void 0) {
|
|
62216
|
+
return {
|
|
62217
|
+
refusal: `{{vault:${connection}}} holds ${names.length} values (${names.join(", ")}); write {{vault:${connection}.FIELD}} or read $FIELD from the environment`
|
|
62218
|
+
};
|
|
62219
|
+
}
|
|
62220
|
+
return { value: only };
|
|
62221
|
+
}
|
|
62222
|
+
function fillCommandReferences({
|
|
62223
|
+
command,
|
|
62224
|
+
released
|
|
62225
|
+
}) {
|
|
62226
|
+
const values = /* @__PURE__ */ new Map();
|
|
62227
|
+
for (const name3 of commandReferenceNames({ command })) {
|
|
62228
|
+
const filled = referenceValue({ name: name3, released });
|
|
62229
|
+
if ("refusal" in filled) return filled;
|
|
62230
|
+
values.set(name3, filled.value);
|
|
62231
|
+
}
|
|
62232
|
+
if (values.size === 0) return { command: [...command] };
|
|
62233
|
+
return {
|
|
62234
|
+
command: command.map(
|
|
62235
|
+
(word3) => word3.replace(
|
|
62236
|
+
/\{\{vault:([A-Za-z0-9_][A-Za-z0-9_./:-]*)\}\}/g,
|
|
62237
|
+
(whole, name3) => values.get(name3) ?? whole
|
|
62238
|
+
)
|
|
62239
|
+
)
|
|
62240
|
+
};
|
|
62241
|
+
}
|
|
62242
|
+
|
|
62119
62243
|
// ../../modules/agent/contract/src/agent-access.ts
|
|
62120
62244
|
var idSchema5 = external_exports.string().min(1).max(80);
|
|
62121
62245
|
var agentGranteeSchemaDefinition = external_exports.discriminatedUnion("kind", [
|
|
@@ -62228,12 +62352,15 @@ var permissionSkipReasonSchema = external_exports.enum(["question", "plan", "pla
|
|
|
62228
62352
|
var liveStepKindSchema = external_exports.enum(["tool", "subagent", "shell"]);
|
|
62229
62353
|
var liveStepStatusSchema = external_exports.enum(["running", "done", "failed"]);
|
|
62230
62354
|
var LIVE_STEP_LABEL_MAX = 160;
|
|
62355
|
+
var LIVE_STEP_DETAIL_MAX = 2e3;
|
|
62231
62356
|
var LIVE_STEPS_BATCH_MAX = 100;
|
|
62232
62357
|
var liveStepSchemaDefinition = external_exports.object({
|
|
62233
62358
|
id: external_exports.string().min(1).max(200),
|
|
62234
62359
|
kind: liveStepKindSchema,
|
|
62235
62360
|
/** `Bash(Run the tests)` for a tool; the task for a subagent; what a shell runs. */
|
|
62236
62361
|
label: external_exports.string().max(LIVE_STEP_LABEL_MAX),
|
|
62362
|
+
/** What the label cuts short, whole and masked: `cd /work; curl -s https://acme.test/...`. */
|
|
62363
|
+
detail: external_exports.string().max(LIVE_STEP_DETAIL_MAX).optional(),
|
|
62237
62364
|
status: liveStepStatusSchema,
|
|
62238
62365
|
/** Epoch ms. */
|
|
62239
62366
|
startedAt: external_exports.number().int().nonnegative(),
|
|
@@ -63197,7 +63324,9 @@ var retryAgentTurnInputSchemaDefinition = external_exports.object({
|
|
|
63197
63324
|
agentId: idSchema6,
|
|
63198
63325
|
channelId: idSchema6,
|
|
63199
63326
|
/** The person's message the failed turn was on. */
|
|
63200
|
-
messageId: idSchema6
|
|
63327
|
+
messageId: idSchema6,
|
|
63328
|
+
/** The attempt the failure is about; when a later one is stored, it is not sent again. */
|
|
63329
|
+
failedAttempt: external_exports.number().int().min(1).optional()
|
|
63201
63330
|
});
|
|
63202
63331
|
var retryAgentTurnInputSchema = retryAgentTurnInputSchemaDefinition;
|
|
63203
63332
|
var compactAgentSessionInputSchemaDefinition = external_exports.object({
|
|
@@ -63262,6 +63391,8 @@ var agentAttentionExpireIntentSchemaDefinition = external_exports.object({
|
|
|
63262
63391
|
workspaceId: external_exports.string().min(1),
|
|
63263
63392
|
attentionId: external_exports.string().min(1)
|
|
63264
63393
|
});
|
|
63394
|
+
var agentRetryStateSchemaDefinition = external_exports.object({ retried: external_exports.boolean(), allowed: external_exports.boolean() });
|
|
63395
|
+
var agentRetryStateSchema = agentRetryStateSchemaDefinition;
|
|
63265
63396
|
|
|
63266
63397
|
// ../../modules/agent/contract/src/agent-budget.ts
|
|
63267
63398
|
var raiseBudgetInputSchemaDefinition = external_exports.object({
|
|
@@ -63273,6 +63404,119 @@ var raiseBudgetInputSchemaDefinition = external_exports.object({
|
|
|
63273
63404
|
});
|
|
63274
63405
|
var raiseBudgetInputSchema = raiseBudgetInputSchemaDefinition;
|
|
63275
63406
|
|
|
63407
|
+
// ../../modules/agent/contract/src/agent-catch-up.ts
|
|
63408
|
+
var CATCH_UP_QUESTION_MAX = 4e3;
|
|
63409
|
+
var catchUpSectionNameSchema = external_exports.enum([
|
|
63410
|
+
"asked",
|
|
63411
|
+
"status",
|
|
63412
|
+
"report",
|
|
63413
|
+
"facts",
|
|
63414
|
+
"waiting",
|
|
63415
|
+
"blocked",
|
|
63416
|
+
"other"
|
|
63417
|
+
]);
|
|
63418
|
+
var catchUpRunKindSchema = external_exports.enum(["catchup", "btw"]);
|
|
63419
|
+
var catchUpRunStateSchema = external_exports.enum(["running", "done", "failed", "stopped"]);
|
|
63420
|
+
var catchUpRefSchemaDefinition = external_exports.object({
|
|
63421
|
+
/** `m1`, `m2` ...: the id the prompt numbers it with. */
|
|
63422
|
+
ref: external_exports.string().min(1),
|
|
63423
|
+
messageId: external_exports.string().min(1),
|
|
63424
|
+
seq: external_exports.number().int().positive(),
|
|
63425
|
+
author: external_exports.object({
|
|
63426
|
+
kind: external_exports.enum(["person", "agent", "external"]),
|
|
63427
|
+
id: external_exports.string(),
|
|
63428
|
+
name: external_exports.string()
|
|
63429
|
+
}),
|
|
63430
|
+
/** The person's own message the catch-up starts from. */
|
|
63431
|
+
you: external_exports.boolean(),
|
|
63432
|
+
at: external_exports.iso.datetime(),
|
|
63433
|
+
/** The first characters of the message on one line, for the citation's hover. */
|
|
63434
|
+
preview: external_exports.string()
|
|
63435
|
+
});
|
|
63436
|
+
var catchUpSinceSchemaDefinition = external_exports.object({
|
|
63437
|
+
messageId: external_exports.string().min(1),
|
|
63438
|
+
seq: external_exports.number().int().positive(),
|
|
63439
|
+
text: external_exports.string(),
|
|
63440
|
+
at: external_exports.iso.datetime()
|
|
63441
|
+
});
|
|
63442
|
+
var catchUpLineSchemaDefinition = external_exports.object({
|
|
63443
|
+
/** Null for a line the model wrote outside the JSON Lines shape, shown as plain text. */
|
|
63444
|
+
section: catchUpSectionNameSchema.nullable(),
|
|
63445
|
+
text: external_exports.string(),
|
|
63446
|
+
refs: external_exports.array(external_exports.string())
|
|
63447
|
+
});
|
|
63448
|
+
var catchUpExchangeSchemaDefinition = external_exports.object({
|
|
63449
|
+
runId: external_exports.string().min(1),
|
|
63450
|
+
question: external_exports.string(),
|
|
63451
|
+
answer: external_exports.string()
|
|
63452
|
+
});
|
|
63453
|
+
var catchUpRunSchemaDefinition = external_exports.object({
|
|
63454
|
+
id: external_exports.string().min(1),
|
|
63455
|
+
kind: catchUpRunKindSchema,
|
|
63456
|
+
workspaceId: external_exports.string().min(1),
|
|
63457
|
+
channelId: external_exports.string().min(1),
|
|
63458
|
+
agentId: external_exports.string().min(1),
|
|
63459
|
+
agentName: external_exports.string(),
|
|
63460
|
+
state: catchUpRunStateSchema,
|
|
63461
|
+
/** For a `btw`: the question, and the catch-up it follows up. */
|
|
63462
|
+
question: external_exports.string().nullable(),
|
|
63463
|
+
catchUpId: external_exports.string().nullable(),
|
|
63464
|
+
since: catchUpSinceSchemaDefinition.nullable(),
|
|
63465
|
+
refs: external_exports.array(catchUpRefSchemaDefinition),
|
|
63466
|
+
/** Messages between the first 40 and the last 360 that the side turn did not get. */
|
|
63467
|
+
leftOut: external_exports.number().int().nonnegative(),
|
|
63468
|
+
/** The answer as the model wrote it so far. */
|
|
63469
|
+
text: external_exports.string(),
|
|
63470
|
+
/** For a `catchup`: the answer read as lines, refs kept only when they name a listed message. */
|
|
63471
|
+
lines: external_exports.array(catchUpLineSchemaDefinition),
|
|
63472
|
+
/** Nothing to catch up on: answered at once, no model call. */
|
|
63473
|
+
nothing: external_exports.enum(["new", "here"]).nullable(),
|
|
63474
|
+
/** Why a failed run failed, in a sentence for the person. */
|
|
63475
|
+
error: external_exports.string().nullable(),
|
|
63476
|
+
/** A kept catch-up handed back because nothing came after what it covers. */
|
|
63477
|
+
reopened: external_exports.boolean(),
|
|
63478
|
+
/** For a `catchup`: its finished follow-ups, oldest first. */
|
|
63479
|
+
followUps: external_exports.array(catchUpExchangeSchemaDefinition),
|
|
63480
|
+
/** The stream's sequence the text is at; publications with a higher one are newer. */
|
|
63481
|
+
seq: external_exports.number().int().nonnegative(),
|
|
63482
|
+
startedAt: external_exports.iso.datetime(),
|
|
63483
|
+
endedAt: external_exports.iso.datetime().nullable(),
|
|
63484
|
+
/** Null where the realtime edge is not configured, or once the run ended. */
|
|
63485
|
+
stream: realtimeTokenSchema.nullable()
|
|
63486
|
+
});
|
|
63487
|
+
var catchUpRunSchema = catchUpRunSchemaDefinition;
|
|
63488
|
+
var catchUpPublicationSchemaDefinition = external_exports.object({
|
|
63489
|
+
type: external_exports.literal("catch_up_text"),
|
|
63490
|
+
runId: external_exports.string().min(1),
|
|
63491
|
+
seq: external_exports.number().int().positive(),
|
|
63492
|
+
state: catchUpRunStateSchema,
|
|
63493
|
+
text: external_exports.string(),
|
|
63494
|
+
error: external_exports.string().nullable()
|
|
63495
|
+
});
|
|
63496
|
+
var startCatchUpInputSchemaDefinition = external_exports.object({
|
|
63497
|
+
workspaceId: external_exports.string().min(1),
|
|
63498
|
+
channelId: external_exports.string().min(1),
|
|
63499
|
+
/** The agent the person named; else the conversation's, then the workspace's default agent. */
|
|
63500
|
+
agentId: external_exports.string().min(1).optional(),
|
|
63501
|
+
/** Runs a new catch-up even when the kept one still covers everything. */
|
|
63502
|
+
fresh: external_exports.boolean().optional(),
|
|
63503
|
+
/** The person's IANA time zone, for the times the side turn reads. */
|
|
63504
|
+
timeZone: external_exports.string().min(1).max(64).optional()
|
|
63505
|
+
});
|
|
63506
|
+
var startCatchUpInputSchema = startCatchUpInputSchemaDefinition;
|
|
63507
|
+
var askCatchUpInputSchemaDefinition = external_exports.object({
|
|
63508
|
+
workspaceId: external_exports.string().min(1),
|
|
63509
|
+
catchUpId: external_exports.string().min(1),
|
|
63510
|
+
question: external_exports.string().max(CATCH_UP_QUESTION_MAX)
|
|
63511
|
+
});
|
|
63512
|
+
var askCatchUpInputSchema = askCatchUpInputSchemaDefinition;
|
|
63513
|
+
var catchUpRunInputSchemaDefinition = external_exports.object({
|
|
63514
|
+
workspaceId: external_exports.string().min(1),
|
|
63515
|
+
runId: external_exports.string().min(1)
|
|
63516
|
+
});
|
|
63517
|
+
var catchUpRunInputSchema = catchUpRunInputSchemaDefinition;
|
|
63518
|
+
var SECTIONS = new Set(catchUpSectionNameSchema.options);
|
|
63519
|
+
|
|
63276
63520
|
// ../../modules/agent/contract/src/agent-channel-mute.ts
|
|
63277
63521
|
var MUTE_MINUTES_MAX = 30 * 24 * 60;
|
|
63278
63522
|
var agentChannelMuteSchemaDefinition = external_exports.object({
|
|
@@ -63417,7 +63661,9 @@ var agentFaceSchemaDefinition = external_exports.object({
|
|
|
63417
63661
|
/** A short-lived link to its picture; null for a sloth. */
|
|
63418
63662
|
imageUrl: external_exports.string().nullable(),
|
|
63419
63663
|
/** Deleted for good: its old messages show a grey sloth. */
|
|
63420
|
-
gone: external_exports.boolean().default(false)
|
|
63664
|
+
gone: external_exports.boolean().default(false),
|
|
63665
|
+
/** How it runs and whose it is, "Laze models · Ada": tells agents sharing a name apart. */
|
|
63666
|
+
detail: external_exports.string().default("")
|
|
63421
63667
|
});
|
|
63422
63668
|
var agentFaceSchema = agentFaceSchemaDefinition;
|
|
63423
63669
|
var agentPresenceSchemaDefinition = external_exports.object({
|
|
@@ -64807,6 +65053,48 @@ var agentPermissionPromptSchemaDefinition = external_exports.object({
|
|
|
64807
65053
|
});
|
|
64808
65054
|
var agentPermissionPromptSchema = agentPermissionPromptSchemaDefinition;
|
|
64809
65055
|
|
|
65056
|
+
// ../../modules/agent/contract/src/agent-transfer.ts
|
|
65057
|
+
var workspaceIdSchema9 = external_exports.string().min(1);
|
|
65058
|
+
var idSchema13 = external_exports.string().min(1).max(200);
|
|
65059
|
+
var agentRefSchema5 = external_exports.string().trim().min(1).max(80);
|
|
65060
|
+
var agentTransferOfferSchemaDefinition = external_exports.object({
|
|
65061
|
+
id: external_exports.string().min(1),
|
|
65062
|
+
agentId: external_exports.string().min(1),
|
|
65063
|
+
agentName: external_exports.string(),
|
|
65064
|
+
/** The owner now, who keeps the agent until the recipient accepts. */
|
|
65065
|
+
fromUserId: external_exports.string().min(1),
|
|
65066
|
+
toUserId: external_exports.string().min(1),
|
|
65067
|
+
/** The owner, or a workspace admin who offered it for them. */
|
|
65068
|
+
offeredByUserId: external_exports.string().min(1),
|
|
65069
|
+
offeredAt: external_exports.iso.datetime(),
|
|
65070
|
+
expiresAt: external_exports.iso.datetime()
|
|
65071
|
+
});
|
|
65072
|
+
var agentTransferOfferSchema = agentTransferOfferSchemaDefinition;
|
|
65073
|
+
var agentTransferInputSchemaDefinition = external_exports.object({
|
|
65074
|
+
workspaceId: workspaceIdSchema9,
|
|
65075
|
+
agentId: idSchema13
|
|
65076
|
+
});
|
|
65077
|
+
var agentTransferInputSchema = agentTransferInputSchemaDefinition;
|
|
65078
|
+
var agentTransferAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema5 });
|
|
65079
|
+
var agentTransferOfferedPayloadSchemaDefinition = external_exports.object({
|
|
65080
|
+
workspaceId: external_exports.string().min(1),
|
|
65081
|
+
offerId: external_exports.string().min(1),
|
|
65082
|
+
agentId: external_exports.string().min(1),
|
|
65083
|
+
agentName: external_exports.string(),
|
|
65084
|
+
fromUserId: external_exports.string().min(1),
|
|
65085
|
+
toUserId: external_exports.string().min(1),
|
|
65086
|
+
offeredByUserId: external_exports.string().min(1),
|
|
65087
|
+
/** The offerer's name as the card reads it. */
|
|
65088
|
+
offeredByName: external_exports.string(),
|
|
65089
|
+
expiresAt: external_exports.iso.datetime()
|
|
65090
|
+
});
|
|
65091
|
+
var agentTransferResolvedPayloadSchemaDefinition = external_exports.object({
|
|
65092
|
+
workspaceId: external_exports.string().min(1),
|
|
65093
|
+
offerId: external_exports.string().min(1),
|
|
65094
|
+
state: external_exports.enum(["accepted", "declined", "cancelled"]),
|
|
65095
|
+
resolvedByUserId: external_exports.string().min(1)
|
|
65096
|
+
});
|
|
65097
|
+
|
|
64810
65098
|
// ../../modules/agent/contract/src/agent-working.ts
|
|
64811
65099
|
var agentWorkingInputSchemaDefinition = external_exports.object({
|
|
64812
65100
|
workspaceId: external_exports.string().min(1),
|
|
@@ -64817,24 +65105,24 @@ var agentWorkingSchemaDefinition = external_exports.object({ working: external_e
|
|
|
64817
65105
|
var agentWorkingSchema = agentWorkingSchemaDefinition;
|
|
64818
65106
|
|
|
64819
65107
|
// ../../modules/agent/contract/src/agent-workspace-default.ts
|
|
64820
|
-
var
|
|
64821
|
-
var
|
|
64822
|
-
var
|
|
65108
|
+
var workspaceIdSchema10 = external_exports.string().min(1);
|
|
65109
|
+
var idSchema14 = external_exports.string().min(1).max(200);
|
|
65110
|
+
var agentRefSchema6 = external_exports.string().trim().min(1).max(80);
|
|
64823
65111
|
var workspaceDefaultAgentSchemaDefinition = external_exports.object({
|
|
64824
65112
|
/** Null when the workspace has none, or its pick was removed. */
|
|
64825
|
-
agentId:
|
|
65113
|
+
agentId: idSchema14.nullable(),
|
|
64826
65114
|
name: external_exports.string().nullable()
|
|
64827
65115
|
});
|
|
64828
65116
|
var workspaceDefaultAgentSchema = workspaceDefaultAgentSchemaDefinition;
|
|
64829
65117
|
var setWorkspaceDefaultAgentInputSchemaDefinition = external_exports.object({
|
|
64830
|
-
workspaceId:
|
|
65118
|
+
workspaceId: workspaceIdSchema10,
|
|
64831
65119
|
/** A team agent of the workspace; null clears the pick. */
|
|
64832
|
-
agentId:
|
|
65120
|
+
agentId: idSchema14.nullable()
|
|
64833
65121
|
});
|
|
64834
65122
|
var setWorkspaceDefaultAgentInputSchema = setWorkspaceDefaultAgentInputSchemaDefinition;
|
|
64835
65123
|
var setWorkspaceDefaultAgentAsCallerInputSchemaDefinition = external_exports.object({
|
|
64836
65124
|
/** The agent by id or name; null clears the pick. */
|
|
64837
|
-
agent:
|
|
65125
|
+
agent: agentRefSchema6.nullable()
|
|
64838
65126
|
});
|
|
64839
65127
|
|
|
64840
65128
|
// ../../modules/agent/contract/src/agent.ts
|
|
@@ -64842,8 +65130,8 @@ var AGENT_LINK_TTL_SECONDS = 30 * 60;
|
|
|
64842
65130
|
var AGENT_JOIN_REQUEST_TTL_SECONDS = 24 * 60 * 60;
|
|
64843
65131
|
var AGENT_ONLINE_WINDOW_SECONDS = 5 * 60;
|
|
64844
65132
|
var INBOX_WAIT_MAX_SECONDS = 55;
|
|
64845
|
-
var
|
|
64846
|
-
var
|
|
65133
|
+
var workspaceIdSchema11 = external_exports.string().min(1);
|
|
65134
|
+
var idSchema15 = external_exports.string().min(1).max(80);
|
|
64847
65135
|
var agentHarnessSchema = external_exports.enum([
|
|
64848
65136
|
"claude-code",
|
|
64849
65137
|
"codex",
|
|
@@ -64890,27 +65178,27 @@ var agentContextSchemaDefinition = external_exports.object({
|
|
|
64890
65178
|
updatedAt: external_exports.iso.datetime().nullable()
|
|
64891
65179
|
});
|
|
64892
65180
|
var agentHostSchemaDefinition = external_exports.object({
|
|
64893
|
-
machineId:
|
|
65181
|
+
machineId: idSchema15,
|
|
64894
65182
|
whenOffline: external_exports.enum(["wait", "sandbox"])
|
|
64895
65183
|
});
|
|
64896
65184
|
var setAgentHostInputSchemaDefinition = external_exports.object({
|
|
64897
|
-
workspaceId:
|
|
64898
|
-
agentId:
|
|
65185
|
+
workspaceId: workspaceIdSchema11,
|
|
65186
|
+
agentId: idSchema15,
|
|
64899
65187
|
host: agentHostSchemaDefinition.nullable()
|
|
64900
65188
|
});
|
|
64901
65189
|
var setAgentComputerKeyInputSchemaDefinition = external_exports.object({
|
|
64902
|
-
workspaceId:
|
|
64903
|
-
agentId:
|
|
65190
|
+
workspaceId: workspaceIdSchema11,
|
|
65191
|
+
agentId: idSchema15,
|
|
64904
65192
|
computerKey: external_exports.string().min(1).max(200).nullable()
|
|
64905
65193
|
});
|
|
64906
65194
|
var agentSchemaDefinition = external_exports.object({
|
|
64907
|
-
id:
|
|
64908
|
-
workspaceId:
|
|
65195
|
+
id: idSchema15,
|
|
65196
|
+
workspaceId: workspaceIdSchema11,
|
|
64909
65197
|
name: external_exports.string(),
|
|
64910
65198
|
kind: external_exports.enum(["personal", "team"]),
|
|
64911
65199
|
hosting: agentHostingSchema,
|
|
64912
65200
|
harness: agentHarnessSchema,
|
|
64913
|
-
ownerUserId:
|
|
65201
|
+
ownerUserId: idSchema15,
|
|
64914
65202
|
status: external_exports.enum(["connected", "disconnected"]),
|
|
64915
65203
|
online: external_exports.boolean(),
|
|
64916
65204
|
lastSeenAt: external_exports.iso.datetime().nullable(),
|
|
@@ -64950,7 +65238,7 @@ var agentSchemaDefinition = external_exports.object({
|
|
|
64950
65238
|
});
|
|
64951
65239
|
var agentSchema = agentSchemaDefinition;
|
|
64952
65240
|
var agentChannelSchemaDefinition = external_exports.object({
|
|
64953
|
-
id:
|
|
65241
|
+
id: idSchema15,
|
|
64954
65242
|
name: external_exports.string(),
|
|
64955
65243
|
kind: external_exports.enum(["public", "private", "dm", "group", "chat"])
|
|
64956
65244
|
});
|
|
@@ -64965,22 +65253,22 @@ var agentNameSchema = external_exports.string().trim().min(1).max(80);
|
|
|
64965
65253
|
var instructionsSchema = external_exports.string().max(2e4);
|
|
64966
65254
|
var linkedAvatarSchema = external_exports.string().trim().max(16);
|
|
64967
65255
|
var createAgentInputSchemaDefinition = external_exports.object({
|
|
64968
|
-
workspaceId:
|
|
65256
|
+
workspaceId: workspaceIdSchema11,
|
|
64969
65257
|
name: agentNameSchema,
|
|
64970
65258
|
avatar: agentAvatarInputSchema.default(""),
|
|
64971
65259
|
harness: hostedHarnessSchema,
|
|
64972
65260
|
modelLevel: agentModelLevelSchema.optional(),
|
|
64973
65261
|
kind: external_exports.enum(["personal", "team"]).default("personal"),
|
|
64974
65262
|
instructions: instructionsSchema.default(""),
|
|
64975
|
-
channelIds: external_exports.array(
|
|
65263
|
+
channelIds: external_exports.array(idSchema15).max(50).default([]),
|
|
64976
65264
|
/** A Claude Code or Codex agent drawing from this login pool; a team one needs a pool. */
|
|
64977
65265
|
/** The pool's id or name. */
|
|
64978
65266
|
loginPoolId: external_exports.string().min(1).max(200).optional()
|
|
64979
65267
|
});
|
|
64980
65268
|
var createAgentInputSchema = createAgentInputSchemaDefinition;
|
|
64981
65269
|
var updateAgentInputSchemaDefinition = external_exports.object({
|
|
64982
|
-
workspaceId:
|
|
64983
|
-
agentId:
|
|
65270
|
+
workspaceId: workspaceIdSchema11,
|
|
65271
|
+
agentId: idSchema15,
|
|
64984
65272
|
name: agentNameSchema.optional(),
|
|
64985
65273
|
avatar: agentAvatarInputSchema.optional(),
|
|
64986
65274
|
modelLevel: agentModelLevelSchema.optional(),
|
|
@@ -64992,7 +65280,7 @@ var updateAgentInputSchemaDefinition = external_exports.object({
|
|
|
64992
65280
|
effort: runEffortInputSchema.optional(),
|
|
64993
65281
|
instructions: instructionsSchema.optional(),
|
|
64994
65282
|
/** The whole set: channels left out are left. */
|
|
64995
|
-
channelIds: external_exports.array(
|
|
65283
|
+
channelIds: external_exports.array(idSchema15).max(50).optional(),
|
|
64996
65284
|
/** Agents Laze runs only: paused, it does not wake until resumed and its messages wait. */
|
|
64997
65285
|
paused: external_exports.boolean().optional(),
|
|
64998
65286
|
/** Why it is paused, shown on the agents page and in the notice under held messages. */
|
|
@@ -65000,14 +65288,14 @@ var updateAgentInputSchemaDefinition = external_exports.object({
|
|
|
65000
65288
|
});
|
|
65001
65289
|
var updateAgentInputSchema = updateAgentInputSchemaDefinition;
|
|
65002
65290
|
var saveHarnessLoginInputSchemaDefinition = external_exports.object({
|
|
65003
|
-
workspaceId:
|
|
65291
|
+
workspaceId: workspaceIdSchema11,
|
|
65004
65292
|
harness: harnessLoginSchema,
|
|
65005
65293
|
secret: external_exports.string().trim().min(10).max(2e4).optional(),
|
|
65006
65294
|
signIn: harnessSignInValueSchema.optional()
|
|
65007
65295
|
});
|
|
65008
65296
|
var saveHarnessLoginInputSchema = saveHarnessLoginInputSchemaDefinition;
|
|
65009
65297
|
var removeHarnessLoginInputSchemaDefinition = external_exports.object({
|
|
65010
|
-
workspaceId:
|
|
65298
|
+
workspaceId: workspaceIdSchema11,
|
|
65011
65299
|
harness: harnessLoginSchema
|
|
65012
65300
|
});
|
|
65013
65301
|
var removeHarnessLoginInputSchema = removeHarnessLoginInputSchemaDefinition;
|
|
@@ -65019,13 +65307,13 @@ var harnessLoginsSchema = harnessLoginsSchemaDefinition;
|
|
|
65019
65307
|
var lastRuntimeSchemaDefinition = external_exports.object({ harness: hostedHarnessSchema.nullable() });
|
|
65020
65308
|
var lastRuntimeSchema = lastRuntimeSchemaDefinition;
|
|
65021
65309
|
var mintLinkInputSchemaDefinition = external_exports.object({
|
|
65022
|
-
workspaceId:
|
|
65310
|
+
workspaceId: workspaceIdSchema11,
|
|
65023
65311
|
/** Left out, the agent names itself when it joins, else it takes its harness's name. */
|
|
65024
65312
|
name: external_exports.string().trim().max(80).optional(),
|
|
65025
65313
|
/** The channel the agent joins once linked. */
|
|
65026
|
-
channelId:
|
|
65314
|
+
channelId: idSchema15.optional(),
|
|
65027
65315
|
/** One of the minting person's connected agents: redeeming gives it a new key instead. */
|
|
65028
|
-
reconnectAgentId:
|
|
65316
|
+
reconnectAgentId: idSchema15.optional()
|
|
65029
65317
|
});
|
|
65030
65318
|
var mintLinkInputSchema = mintLinkInputSchemaDefinition;
|
|
65031
65319
|
var mintedLinkSchemaDefinition = external_exports.object({
|
|
@@ -65057,7 +65345,7 @@ var redeemedLinkSchemaDefinition = external_exports.object({
|
|
|
65057
65345
|
agent: agentSchemaDefinition,
|
|
65058
65346
|
/** The agent's own `lz_` key, shown once. */
|
|
65059
65347
|
apiKey: external_exports.string(),
|
|
65060
|
-
channelId:
|
|
65348
|
+
channelId: idSchema15.nullable(),
|
|
65061
65349
|
/** The owner's key that may only ask for a new agent (`laze agent request`), shown once. */
|
|
65062
65350
|
requestKey: external_exports.string().nullable().optional()
|
|
65063
65351
|
});
|
|
@@ -65096,12 +65384,12 @@ var joinRequestAnswerSchemaDefinition = external_exports.discriminatedUnion("sta
|
|
|
65096
65384
|
})
|
|
65097
65385
|
]);
|
|
65098
65386
|
var joinRequestInputSchemaDefinition = external_exports.object({
|
|
65099
|
-
workspaceId:
|
|
65387
|
+
workspaceId: workspaceIdSchema11,
|
|
65100
65388
|
code: external_exports.string().trim().min(1).max(20)
|
|
65101
65389
|
});
|
|
65102
65390
|
var joinRequestInputSchema = joinRequestInputSchemaDefinition;
|
|
65103
65391
|
var approveJoinRequestInputSchemaDefinition = external_exports.object({
|
|
65104
|
-
workspaceId:
|
|
65392
|
+
workspaceId: workspaceIdSchema11,
|
|
65105
65393
|
code: external_exports.string().trim().min(1).max(20),
|
|
65106
65394
|
/** The person may rename the agent as they approve it. */
|
|
65107
65395
|
name: external_exports.string().trim().max(80).optional()
|
|
@@ -65122,12 +65410,12 @@ var inboxCatchUpSchemaDefinition = external_exports.object({
|
|
|
65122
65410
|
});
|
|
65123
65411
|
var inboxCatchUpSchema = inboxCatchUpSchemaDefinition;
|
|
65124
65412
|
var inboxMessageSchemaDefinition = external_exports.object({
|
|
65125
|
-
messageId:
|
|
65126
|
-
channelId:
|
|
65413
|
+
messageId: idSchema15,
|
|
65414
|
+
channelId: idSchema15,
|
|
65127
65415
|
channelName: external_exports.string(),
|
|
65128
65416
|
channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
65129
|
-
threadRootId:
|
|
65130
|
-
author: external_exports.object({ kind: external_exports.enum(["person", "agent"]), id:
|
|
65417
|
+
threadRootId: idSchema15.nullable(),
|
|
65418
|
+
author: external_exports.object({ kind: external_exports.enum(["person", "agent"]), id: idSchema15, name: external_exports.string() }),
|
|
65131
65419
|
body: external_exports.string(),
|
|
65132
65420
|
postedAt: external_exports.iso.datetime(),
|
|
65133
65421
|
/** On the first message of each conversation in a catch up (agent-catch-up.feature). */
|
|
@@ -65147,16 +65435,20 @@ var inboxWaitingSchemaDefinition = external_exports.object({
|
|
|
65147
65435
|
});
|
|
65148
65436
|
var callerSchemaDefinition = external_exports.object({
|
|
65149
65437
|
kind: external_exports.enum(["person", "agent"]),
|
|
65150
|
-
id:
|
|
65438
|
+
id: idSchema15,
|
|
65151
65439
|
name: external_exports.string(),
|
|
65152
|
-
workspaceId:
|
|
65440
|
+
workspaceId: workspaceIdSchema11,
|
|
65153
65441
|
agent: agentSchemaDefinition.nullable(),
|
|
65154
65442
|
/** Messages waiting in the agent's inbox, not taken yet; 0 for a person. */
|
|
65155
|
-
pendingCount: external_exports.number().int().min(0).optional()
|
|
65443
|
+
pendingCount: external_exports.number().int().min(0).optional(),
|
|
65444
|
+
/** The person's language, or the agent owner's (BCP 47; en-US until they pick one). */
|
|
65445
|
+
language: external_exports.string().optional(),
|
|
65446
|
+
/** The person's time zone, or the agent owner's (IANA; UTC while Laze does not know it). */
|
|
65447
|
+
timeZone: external_exports.string().optional()
|
|
65156
65448
|
});
|
|
65157
65449
|
var agentChannelLevelSchema = external_exports.enum(["everything", "mentions"]);
|
|
65158
65450
|
var callerChannelSchemaDefinition = external_exports.object({
|
|
65159
|
-
id:
|
|
65451
|
+
id: idSchema15,
|
|
65160
65452
|
name: external_exports.string(),
|
|
65161
65453
|
kind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
65162
65454
|
unread: external_exports.number().int().nonnegative(),
|
|
@@ -65170,9 +65462,9 @@ var callerChannelSchemaDefinition = external_exports.object({
|
|
|
65170
65462
|
isDefault: external_exports.boolean().default(false)
|
|
65171
65463
|
});
|
|
65172
65464
|
var setChannelLevelInputSchemaDefinition = external_exports.object({
|
|
65173
|
-
workspaceId:
|
|
65174
|
-
agentId:
|
|
65175
|
-
channelId:
|
|
65465
|
+
workspaceId: workspaceIdSchema11,
|
|
65466
|
+
agentId: idSchema15,
|
|
65467
|
+
channelId: idSchema15,
|
|
65176
65468
|
level: agentChannelLevelSchema
|
|
65177
65469
|
});
|
|
65178
65470
|
var setChannelLevelInputSchema = setChannelLevelInputSchemaDefinition;
|
|
@@ -65195,12 +65487,12 @@ var postAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
65195
65487
|
/** A channel's name (with or without `#`) or id. */
|
|
65196
65488
|
channel: external_exports.string().trim().min(1).max(81),
|
|
65197
65489
|
body: external_exports.string().trim().min(1).max(4e4),
|
|
65198
|
-
threadRootId:
|
|
65490
|
+
threadRootId: idSchema15.optional(),
|
|
65199
65491
|
/** The messages of the agent's turn this post answers. */
|
|
65200
|
-
answers: external_exports.array(
|
|
65492
|
+
answers: external_exports.array(idSchema15).max(200).optional()
|
|
65201
65493
|
});
|
|
65202
65494
|
var replyAsCallerInputSchemaDefinition = external_exports.object({
|
|
65203
|
-
messageId:
|
|
65495
|
+
messageId: idSchema15,
|
|
65204
65496
|
body: external_exports.string().trim().min(1).max(4e4),
|
|
65205
65497
|
/** Needed for a message that is not in the caller's inbox. */
|
|
65206
65498
|
channel: external_exports.string().trim().min(1).max(81).optional(),
|
|
@@ -65209,18 +65501,18 @@ var replyAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
65209
65501
|
/** A thread reply also shows in the channel, as "Also send to #channel" does. */
|
|
65210
65502
|
alsoInChannel: external_exports.boolean().optional(),
|
|
65211
65503
|
/** The other messages of the agent's turn this reply answers. */
|
|
65212
|
-
answers: external_exports.array(
|
|
65504
|
+
answers: external_exports.array(idSchema15).max(200).optional()
|
|
65213
65505
|
});
|
|
65214
65506
|
var postedMessageSchemaDefinition = external_exports.object({
|
|
65215
|
-
messageId:
|
|
65216
|
-
channelId:
|
|
65217
|
-
threadRootId:
|
|
65507
|
+
messageId: idSchema15,
|
|
65508
|
+
channelId: idSchema15,
|
|
65509
|
+
threadRootId: idSchema15.nullable(),
|
|
65218
65510
|
/** Workspace members the message mentioned who are not in the channel: it did not reach them. */
|
|
65219
65511
|
notInChannel: external_exports.array(external_exports.object({ ...notInChannelSchema.shape, name: external_exports.string() })).default([]),
|
|
65220
65512
|
/** Mentioned agents that are paused or out of usage: the message waits for each of them. */
|
|
65221
65513
|
waitsFor: external_exports.array(
|
|
65222
65514
|
external_exports.object({
|
|
65223
|
-
agentId:
|
|
65515
|
+
agentId: idSchema15,
|
|
65224
65516
|
name: external_exports.string(),
|
|
65225
65517
|
cause: external_exports.enum(["paused", "out_of_usage"]),
|
|
65226
65518
|
/** When an agent out of usage gets its usage back; null while paused. */
|
|
@@ -65235,15 +65527,15 @@ var searchAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
65235
65527
|
});
|
|
65236
65528
|
var callerActorNameSchema = external_exports.object({
|
|
65237
65529
|
kind: external_exports.enum(["person", "agent"]),
|
|
65238
|
-
id:
|
|
65530
|
+
id: idSchema15,
|
|
65239
65531
|
name: external_exports.string()
|
|
65240
65532
|
});
|
|
65241
65533
|
var callerSearchHitSchemaDefinition = external_exports.object({
|
|
65242
|
-
messageId:
|
|
65243
|
-
channelId:
|
|
65534
|
+
messageId: idSchema15,
|
|
65535
|
+
channelId: idSchema15,
|
|
65244
65536
|
channelName: external_exports.string(),
|
|
65245
65537
|
channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
65246
|
-
threadRootId:
|
|
65538
|
+
threadRootId: idSchema15.nullable(),
|
|
65247
65539
|
seq: external_exports.number().int().positive(),
|
|
65248
65540
|
/** `external` for a mirrored message from someone outside Laze. */
|
|
65249
65541
|
author: external_exports.object({
|
|
@@ -65265,7 +65557,7 @@ var callerSearchResultSchemaDefinition = external_exports.object({
|
|
|
65265
65557
|
/** Names for the mention tokens in the bodies. */
|
|
65266
65558
|
mentions: external_exports.object({
|
|
65267
65559
|
actors: external_exports.array(callerActorNameSchema),
|
|
65268
|
-
channels: external_exports.array(external_exports.object({ id:
|
|
65560
|
+
channels: external_exports.array(external_exports.object({ id: idSchema15, name: external_exports.string() }))
|
|
65269
65561
|
})
|
|
65270
65562
|
});
|
|
65271
65563
|
var agentActivityInputSchemaDefinition = external_exports.object({
|
|
@@ -65337,14 +65629,14 @@ var codexLoginRefreshInputSchemaDefinition = external_exports.object({
|
|
|
65337
65629
|
authJson: external_exports.string().min(2).max(CODEX_LOGIN_MAX_LENGTH)
|
|
65338
65630
|
});
|
|
65339
65631
|
var AgentApi = moduleApi()("agent");
|
|
65340
|
-
var agentCoreTrpc = defineTrpcContract("agents").query("list").withInput(external_exports.object({ workspaceId:
|
|
65341
|
-
var agentTurnTrpc = defineTrpcContract("agents").mutation("answerAttention").withInput(answerAttentionInputSchema).withOutput(external_exports.object({ answered: external_exports.literal(true) })).mutation("stopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ stopped: external_exports.literal(true) })).query("mayStopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ allowed: external_exports.boolean() })).mutation("retryTurn").withInput(retryAgentTurnInputSchema).withOutput(external_exports.object({ retried: external_exports.literal(true) })).query("liveSteps").withInput(liveStepsInputSchema).withOutput(liveStepsSchema).query("workingNow").withInput(agentWorkingInputSchema).withOutput(agentWorkingSchema).mutation("compactSession").withInput(compactAgentSessionInputSchema).withOutput(external_exports.object({ requested: external_exports.literal(true) })).mutation("restartComputer").withInput(restartAgentComputerInputSchema).withOutput(external_exports.object({ restarted: external_exports.boolean() })).build();
|
|
65342
|
-
var agentChannelSettingsTrpc = defineTrpcContract("agents").query("monitors").withInput(external_exports.object({ workspaceId:
|
|
65632
|
+
var agentCoreTrpc = defineTrpcContract("agents").query("list").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(external_exports.array(agentListEntrySchema)).mutation("create").withInput(createAgentInputSchema).withOutput(agentSchema).mutation("update").withInput(updateAgentInputSchema).withOutput(agentSchema).mutation("remove").withInput(external_exports.object({ workspaceId: workspaceIdSchema11, agentId: idSchema15 })).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("transfer").withInput(transferAgentInputSchema).withOutput(agentSchema).mutation("resetSession").withInput(resetAgentSessionInputSchema).withOutput(agentSchema).query("faces").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(external_exports.array(agentFaceSchema)).query("presence").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(external_exports.array(agentPresenceSchema)).mutation("uploadAvatar").withInput(uploadAgentAvatarInputSchema).withOutput(uploadedAgentAvatarSchema).query("access").withInput(external_exports.object({ workspaceId: workspaceIdSchema11, agentId: idSchema15 })).withOutput(agentAccessSchema).query("loginActivity").withInput(external_exports.object({ workspaceId: workspaceIdSchema11, agentId: idSchema15 })).withOutput(loginActivitySchema).mutation("raiseBudget").withInput(raiseBudgetInputSchema).withOutput(external_exports.object({ limitUsd: external_exports.number() })).query("permissionPrompts").withInput(external_exports.object({ workspaceId: workspaceIdSchema11, agentId: idSchema15 })).withOutput(external_exports.array(agentPermissionPromptSchema)).mutation("share").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).mutation("unshare").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).query("harnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(harnessLoginsSchema).mutation("saveHarnessLogin").withInput(saveHarnessLoginInputSchema).withOutput(harnessLoginsSchema).mutation("removeHarnessLogin").withInput(removeHarnessLoginInputSchema).withOutput(harnessLoginsSchema).query("listHarnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(harnessLoginListSchema).mutation("addHarnessLogin").withInput(addHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("renameHarnessLogin").withInput(renameHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("deleteHarnessLogin").withInput(deleteHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("checkLoginUsage").withInput(checkLoginUsageInputSchema).withOutput(loginUsageCheckSchema).query("loginPools").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(loginPoolsSchema).mutation("createLoginPool").withInput(createLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("renameLoginPool").withInput(renameLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("deleteLoginPool").withInput(loginPoolRefInputSchema).withOutput(loginPoolsSchema).mutation("addPoolLogin").withInput(addPoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("removePoolLogin").withInput(removePoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("setPoolMember").withInput(setPoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("removePoolMember").withInput(removePoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("setAgentPool").withInput(setAgentPoolInputSchema).withOutput(agentSchema).mutation("openDirect").withInput(external_exports.object({ workspaceId: workspaceIdSchema11, agentId: idSchema15 })).withOutput(external_exports.object({ channelId: idSchema15 })).mutation("startConversation").withInput(startConversationInputSchema).withOutput(startedConversationSchema).query("conversations").withInput(listConversationsInputSchema).withOutput(external_exports.array(conversationSummarySchema2)).mutation("joinConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("renameConversation").withInput(renameConversationInputSchema).withOutput(conversationSummarySchema2).mutation("leaveConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("deleteConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("mintLink").withInput(mintLinkInputSchema).withOutput(mintedLinkSchema).query("linkRedemption").withInput(linkRedemptionInputSchema).withOutput(linkRedemptionSchema).query("oauthRequest").withInput(oauthRequestInputSchema).withOutput(oauthRequestViewSchema).mutation("oauthApprove").withInput(approveOAuthInputSchema).withOutput(oauthRedirectSchema).mutation("oauthDeny").withInput(oauthRequestInputSchema).withOutput(oauthRedirectSchema).mutation("disconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema11, agentId: idSchema15 })).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("setGithub").withInput(setAgentGithubInputSchema).withOutput(agentSchema).query("githubWatches").withInput(external_exports.object({ workspaceId: workspaceIdSchema11, agentId: idSchema15 })).withOutput(external_exports.array(agentGithubWatchSchema)).mutation("watchGithub").withInput(watchGithubInputSchema).withOutput(agentGithubWatchSchema).mutation("unwatchGithub").withInput(unwatchGithubInputSchema).withOutput(external_exports.object({ removed: external_exports.literal(true) })).build();
|
|
65633
|
+
var agentTurnTrpc = defineTrpcContract("agents").mutation("answerAttention").withInput(answerAttentionInputSchema).withOutput(external_exports.object({ answered: external_exports.literal(true) })).mutation("stopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ stopped: external_exports.literal(true) })).query("mayStopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ allowed: external_exports.boolean() })).mutation("retryTurn").withInput(retryAgentTurnInputSchema).withOutput(external_exports.object({ retried: external_exports.literal(true) })).query("retryState").withInput(retryAgentTurnInputSchema).withOutput(agentRetryStateSchema).query("liveSteps").withInput(liveStepsInputSchema).withOutput(liveStepsSchema).query("workingNow").withInput(agentWorkingInputSchema).withOutput(agentWorkingSchema).mutation("compactSession").withInput(compactAgentSessionInputSchema).withOutput(external_exports.object({ requested: external_exports.literal(true) })).mutation("catchUp").withInput(startCatchUpInputSchema).withOutput(catchUpRunSchema).mutation("catchUpAsk").withInput(askCatchUpInputSchema).withOutput(catchUpRunSchema).query("catchUpRun").withInput(catchUpRunInputSchema).withOutput(catchUpRunSchema).mutation("catchUpStop").withInput(catchUpRunInputSchema).withOutput(catchUpRunSchema).mutation("restartComputer").withInput(restartAgentComputerInputSchema).withOutput(external_exports.object({ restarted: external_exports.boolean() })).build();
|
|
65634
|
+
var agentChannelSettingsTrpc = defineTrpcContract("agents").query("monitors").withInput(external_exports.object({ workspaceId: workspaceIdSchema11, agentId: idSchema15 })).withOutput(external_exports.array(agentMonitorSchema)).query("channelLevel").withInput(external_exports.object({ workspaceId: workspaceIdSchema11, agentId: idSchema15, channelId: idSchema15 })).withOutput(channelLevelSchema).mutation("setChannelLevel").withInput(setChannelLevelInputSchema).withOutput(channelLevelSchema).mutation("unmuteChannel").withInput(unmuteAgentChannelInputSchema).withOutput(channelLevelSchema).mutation("cancelHeld").withInput(cancelHeldInputSchema).withOutput(cancelHeldResultSchema).build();
|
|
65343
65635
|
var agentJoinTrpc = defineTrpcContract("agents").query("joinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("approveJoinRequest").withInput(approveJoinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("denyJoinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).build();
|
|
65344
65636
|
var agentLoginTroubleTrpc = defineTrpcContract("agents").mutation("replaceHarnessLogin").withInput(replaceHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("startHarnessSignIn").withInput(startHarnessSignInInputSchema).withOutput(harnessSignInSchema).mutation("pollHarnessSignIn").withInput(pollHarnessSignInInputSchema).withOutput(harnessSignInPollSchema).mutation("waitForLogins").withInput(loginCardActionInputSchema).withOutput(external_exports.object({ waiting: external_exports.boolean() })).mutation("useAnotherLogin").withInput(loginCardActionInputSchema).withOutput(external_exports.object({ loginName: external_exports.string() })).build();
|
|
65345
|
-
var agentWorkspaceDefaultTrpc = defineTrpcContract("agents").query("workspaceDefault").withInput(external_exports.object({ workspaceId:
|
|
65346
|
-
var agentRuntimeChoiceTrpc = defineTrpcContract("agents").query("lastRuntime").withInput(external_exports.object({ workspaceId:
|
|
65347
|
-
var agentArchiveTrpc = defineTrpcContract("agents").query("archived").withInput(external_exports.object({ workspaceId:
|
|
65637
|
+
var agentWorkspaceDefaultTrpc = defineTrpcContract("agents").query("workspaceDefault").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(workspaceDefaultAgentSchema).mutation("setWorkspaceDefault").withInput(setWorkspaceDefaultAgentInputSchema).withOutput(workspaceDefaultAgentSchema).build();
|
|
65638
|
+
var agentRuntimeChoiceTrpc = defineTrpcContract("agents").query("lastRuntime").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(lastRuntimeSchema).build();
|
|
65639
|
+
var agentArchiveTrpc = defineTrpcContract("agents").query("archived").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(external_exports.array(archivedAgentSchema)).mutation("restore").withInput(restoreAgentInputSchema).withOutput(agentSchema).mutation("copy").withInput(copyAgentInputSchema).withOutput(agentSchema).mutation("deleteArchived").withInput(restoreAgentInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).query("transferOffers").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(external_exports.array(agentTransferOfferSchema)).mutation("acceptTransfer").withInput(agentTransferInputSchema).withOutput(agentSchema).mutation("declineTransfer").withInput(agentTransferInputSchema).withOutput(external_exports.object({ declined: external_exports.literal(true) })).mutation("cancelTransfer").withInput(agentTransferInputSchema).withOutput(external_exports.object({ cancelled: external_exports.literal(true) })).build();
|
|
65348
65640
|
var agentTrpc = joinTrpcContracts(
|
|
65349
65641
|
"agents",
|
|
65350
65642
|
agentCoreTrpc,
|
|
@@ -65364,6 +65656,7 @@ var AgentLoginCardSlot = agentUi.component("loginCard");
|
|
|
65364
65656
|
var AgentBudgetCardSlot = agentUi.component("budgetCard");
|
|
65365
65657
|
var AgentStopTurnSlot = agentUi.component("stopTurn");
|
|
65366
65658
|
var AgentLiveStepsSlot = agentUi.component("liveSteps");
|
|
65659
|
+
var AgentCatchUpSlot = agentUi.component("catchUp");
|
|
65367
65660
|
var AgentSessionHooksToken = agentUi.hooks("session");
|
|
65368
65661
|
var AgentCreateDialogSlot = agentUi.component("createDialog");
|
|
65369
65662
|
var AgentEditDialogSlot = agentUi.component("editDialog");
|
|
@@ -65472,34 +65765,36 @@ var agentKeepsFailingPayloadSchemaDefinition = external_exports.object({
|
|
|
65472
65765
|
});
|
|
65473
65766
|
|
|
65474
65767
|
// ../../modules/agent/contract/src/agent-caller-access.ts
|
|
65475
|
-
var
|
|
65476
|
-
var
|
|
65477
|
-
var agentAsCallerInputSchemaDefinition = external_exports.object({ agent:
|
|
65768
|
+
var agentRefSchema7 = external_exports.string().trim().min(1).max(80);
|
|
65769
|
+
var idSchema16 = external_exports.string().min(1).max(64);
|
|
65770
|
+
var agentAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema7 });
|
|
65478
65771
|
var shareAgentAsCallerInputSchemaDefinition = external_exports.object({
|
|
65479
|
-
agent:
|
|
65772
|
+
agent: agentRefSchema7,
|
|
65480
65773
|
grantee: agentGranteeSchema
|
|
65481
65774
|
});
|
|
65482
65775
|
var stopTurnAsCallerInputSchemaDefinition = external_exports.object({
|
|
65483
|
-
agent:
|
|
65484
|
-
channelId:
|
|
65776
|
+
agent: agentRefSchema7,
|
|
65777
|
+
channelId: idSchema16
|
|
65485
65778
|
});
|
|
65486
65779
|
var retryTurnAsCallerInputSchemaDefinition = external_exports.object({
|
|
65487
|
-
agent:
|
|
65488
|
-
channelId:
|
|
65489
|
-
messageId:
|
|
65780
|
+
agent: agentRefSchema7,
|
|
65781
|
+
channelId: idSchema16,
|
|
65782
|
+
messageId: idSchema16
|
|
65490
65783
|
});
|
|
65491
65784
|
var postTurnFailureAsCallerInputSchemaDefinition = external_exports.object({
|
|
65492
|
-
channelId:
|
|
65493
|
-
threadRootId:
|
|
65785
|
+
channelId: idSchema16,
|
|
65786
|
+
threadRootId: idSchema16.optional(),
|
|
65494
65787
|
/** The person's message the turn was on, which Try again sends to the agent again. */
|
|
65495
|
-
messageId:
|
|
65788
|
+
messageId: idSchema16,
|
|
65789
|
+
/** The attempt that failed, so Try again knows once a later one is stored. */
|
|
65790
|
+
attempt: external_exports.number().int().min(1).optional(),
|
|
65496
65791
|
line: external_exports.string().trim().min(1).max(1e3),
|
|
65497
65792
|
details: external_exports.string().trim().min(1).max(2e3)
|
|
65498
65793
|
});
|
|
65499
65794
|
var mintLinkAsCallerInputSchemaDefinition = external_exports.object({
|
|
65500
65795
|
/** Left out, the agent that joins with the link names itself. */
|
|
65501
65796
|
name: external_exports.string().trim().max(80).optional(),
|
|
65502
|
-
channelId:
|
|
65797
|
+
channelId: idSchema16.optional()
|
|
65503
65798
|
});
|
|
65504
65799
|
|
|
65505
65800
|
// ../../modules/agent/contract/src/agent-secret-sweep.ts
|
|
@@ -65609,25 +65904,25 @@ var agentScheduledRunMissedPayloadSchemaDefinition = external_exports.object({
|
|
|
65609
65904
|
});
|
|
65610
65905
|
|
|
65611
65906
|
// ../../modules/agent/contract/src/agent-history.ts
|
|
65612
|
-
var
|
|
65907
|
+
var idSchema17 = external_exports.string().min(1).max(80);
|
|
65613
65908
|
var CALLER_HISTORY_LIMIT_MAX = 100;
|
|
65614
65909
|
var historyAsCallerInputSchemaDefinition = external_exports.object({
|
|
65615
65910
|
/** A channel the key's speaker is in, by id or name. */
|
|
65616
65911
|
channel: external_exports.string().trim().min(1).max(200),
|
|
65617
65912
|
/** Messages before this Laze message; none reads the newest page. */
|
|
65618
|
-
before:
|
|
65913
|
+
before: idSchema17.optional(),
|
|
65619
65914
|
/** Already past the cache: no cached messages, only where the live read goes on. */
|
|
65620
65915
|
olderThan: external_exports.iso.datetime().optional(),
|
|
65621
65916
|
limit: external_exports.number().int().min(1).max(CALLER_HISTORY_LIMIT_MAX).default(50)
|
|
65622
65917
|
});
|
|
65623
65918
|
var callerHistoryMessageSchemaDefinition = external_exports.object({
|
|
65624
|
-
messageId:
|
|
65625
|
-
threadRootId:
|
|
65919
|
+
messageId: idSchema17,
|
|
65920
|
+
threadRootId: idSchema17.nullable(),
|
|
65626
65921
|
seq: external_exports.number().int().positive(),
|
|
65627
65922
|
/** `external` for a mirrored message from someone outside Laze. */
|
|
65628
65923
|
author: external_exports.object({
|
|
65629
65924
|
kind: external_exports.enum(["person", "agent", "external"]),
|
|
65630
|
-
id:
|
|
65925
|
+
id: idSchema17,
|
|
65631
65926
|
name: external_exports.string()
|
|
65632
65927
|
}),
|
|
65633
65928
|
body: external_exports.string(),
|
|
@@ -65637,7 +65932,7 @@ var callerHistoryMessageSchemaDefinition = external_exports.object({
|
|
|
65637
65932
|
originKey: external_exports.string().nullable()
|
|
65638
65933
|
});
|
|
65639
65934
|
var callerHistorySchemaDefinition = external_exports.object({
|
|
65640
|
-
channelId:
|
|
65935
|
+
channelId: idSchema17,
|
|
65641
65936
|
channelName: external_exports.string(),
|
|
65642
65937
|
channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
65643
65938
|
/** The outside workspace a mirrored conversation shows, such as "Slack ACME HQ". */
|
|
@@ -65651,12 +65946,12 @@ var callerHistorySchemaDefinition = external_exports.object({
|
|
|
65651
65946
|
});
|
|
65652
65947
|
|
|
65653
65948
|
// ../../modules/agent/contract/src/agent-channel-admin.ts
|
|
65654
|
-
var
|
|
65949
|
+
var idSchema18 = external_exports.string().min(1).max(80);
|
|
65655
65950
|
var channelRefSchema = external_exports.string().trim().min(1).max(200);
|
|
65656
65951
|
var channelAsCallerInputSchemaDefinition = external_exports.object({ channel: channelRefSchema });
|
|
65657
65952
|
var callerChannelMemberSchemaDefinition = external_exports.object({
|
|
65658
65953
|
kind: external_exports.enum(["person", "agent"]),
|
|
65659
|
-
id:
|
|
65954
|
+
id: idSchema18,
|
|
65660
65955
|
name: external_exports.string(),
|
|
65661
65956
|
role: external_exports.enum(["admin", "member"]),
|
|
65662
65957
|
/** Active, away or unknown for a person the speaker may see; absent for agents. */
|
|
@@ -65666,7 +65961,7 @@ var callerChannelMemberSchemaDefinition = external_exports.object({
|
|
|
65666
65961
|
doNotDisturb: doNotDisturbSchema.nullable().optional()
|
|
65667
65962
|
});
|
|
65668
65963
|
var callerChannelDetailSchemaDefinition = external_exports.object({
|
|
65669
|
-
id:
|
|
65964
|
+
id: idSchema18,
|
|
65670
65965
|
name: external_exports.string(),
|
|
65671
65966
|
kind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
65672
65967
|
topic: external_exports.string(),
|
|
@@ -65697,17 +65992,17 @@ var activityAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
65697
65992
|
limit: external_exports.number().int().min(1).max(100).default(50)
|
|
65698
65993
|
});
|
|
65699
65994
|
var callerActivityItemSchemaDefinition = external_exports.object({
|
|
65700
|
-
id:
|
|
65995
|
+
id: idSchema18,
|
|
65701
65996
|
kind: external_exports.enum(["mention", "thread_reply", "keyword", "reaction"]),
|
|
65702
|
-
channelId:
|
|
65997
|
+
channelId: idSchema18,
|
|
65703
65998
|
channelName: external_exports.string(),
|
|
65704
65999
|
channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
|
|
65705
|
-
messageId:
|
|
65706
|
-
threadRootId:
|
|
66000
|
+
messageId: idSchema18,
|
|
66001
|
+
threadRootId: idSchema18.nullable(),
|
|
65707
66002
|
/** `external` is someone outside Laze whose message a mirror brought in, named at the source. */
|
|
65708
66003
|
actor: external_exports.object({
|
|
65709
66004
|
kind: external_exports.enum(["person", "agent", "external"]),
|
|
65710
|
-
id:
|
|
66005
|
+
id: idSchema18,
|
|
65711
66006
|
name: external_exports.string()
|
|
65712
66007
|
}),
|
|
65713
66008
|
emoji: external_exports.string().nullable(),
|
|
@@ -65724,12 +66019,12 @@ var setStatusAsCallerInputSchemaDefinition = setStatusInputSchema.omit({ workspa
|
|
|
65724
66019
|
var setAwayAsCallerInputSchemaDefinition = external_exports.object({ away: external_exports.boolean() });
|
|
65725
66020
|
|
|
65726
66021
|
// ../../modules/agent/contract/src/agent-scheduled.ts
|
|
65727
|
-
var
|
|
66022
|
+
var idSchema19 = external_exports.string().min(1).max(80);
|
|
65728
66023
|
var channelRefSchema2 = external_exports.string().trim().min(1).max(200);
|
|
65729
66024
|
var scheduleAsCallerInputSchemaDefinition = external_exports.object({
|
|
65730
66025
|
channel: channelRefSchema2.optional(),
|
|
65731
|
-
threadRootId:
|
|
65732
|
-
replyTo:
|
|
66026
|
+
threadRootId: idSchema19.optional(),
|
|
66027
|
+
replyTo: idSchema19.optional(),
|
|
65733
66028
|
body: external_exports.string().trim().min(1).max(4e4),
|
|
65734
66029
|
sendAt: external_exports.iso.datetime({ offset: true }),
|
|
65735
66030
|
/** A reply that also goes to the channel at its time (`--also-channel`). */
|
|
@@ -65740,9 +66035,9 @@ var scheduleAsCallerInputSchemaDefinition = external_exports.object({
|
|
|
65740
66035
|
var listScheduledAsCallerInputSchemaDefinition = external_exports.object({
|
|
65741
66036
|
channel: channelRefSchema2.optional()
|
|
65742
66037
|
});
|
|
65743
|
-
var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId:
|
|
66038
|
+
var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId: idSchema19 });
|
|
65744
66039
|
var editScheduledAsCallerInputSchemaDefinition = external_exports.object({
|
|
65745
|
-
scheduledId:
|
|
66040
|
+
scheduledId: idSchema19,
|
|
65746
66041
|
body: external_exports.string().trim().min(1).max(4e4).optional(),
|
|
65747
66042
|
sendAt: external_exports.iso.datetime({ offset: true }).optional()
|
|
65748
66043
|
}).refine((input2) => input2.body !== void 0 || input2.sendAt !== void 0, {
|
|
@@ -66789,7 +67084,7 @@ var dismissSlackLinkPromptInputSchemaDefinition = external_exports.object({
|
|
|
66789
67084
|
var dismissSlackLinkPromptInputSchema = dismissSlackLinkPromptInputSchemaDefinition;
|
|
66790
67085
|
|
|
66791
67086
|
// ../../modules/slack/contract/src/slack-move.ts
|
|
66792
|
-
var
|
|
67087
|
+
var workspaceIdSchema12 = external_exports.string().min(1);
|
|
66793
67088
|
var teamIdSchema = external_exports.string().regex(/^[TE][A-Z0-9]{2,20}$/);
|
|
66794
67089
|
var slackChannelIdSchema = external_exports.string().regex(/^[CG][A-Z0-9]{2,20}$/);
|
|
66795
67090
|
var slackUserIdSchema = external_exports.string().regex(/^[UW][A-Z0-9]{2,20}$/);
|
|
@@ -66862,7 +67157,7 @@ var slackMovePreviewSchemaDefinition = external_exports.object({
|
|
|
66862
67157
|
});
|
|
66863
67158
|
var slackMovePreviewSchema = slackMovePreviewSchemaDefinition;
|
|
66864
67159
|
var slackMoveChannelInputSchemaDefinition = external_exports.object({
|
|
66865
|
-
workspaceId:
|
|
67160
|
+
workspaceId: workspaceIdSchema12,
|
|
66866
67161
|
teamId: teamIdSchema,
|
|
66867
67162
|
slackChannelId: slackChannelIdSchema
|
|
66868
67163
|
});
|
|
@@ -66877,7 +67172,7 @@ var slackMoveRequestSchemaDefinition = external_exports.object({
|
|
|
66877
67172
|
farewell: external_exports.string().trim().min(1).max(SLACK_FAREWELL_MAX).optional()
|
|
66878
67173
|
});
|
|
66879
67174
|
var startSlackMovesInputSchemaDefinition = external_exports.object({
|
|
66880
|
-
workspaceId:
|
|
67175
|
+
workspaceId: workspaceIdSchema12,
|
|
66881
67176
|
teamId: teamIdSchema,
|
|
66882
67177
|
channels: external_exports.array(slackMoveRequestSchemaDefinition).min(1).max(SLACK_MOVE_BATCH_MAX)
|
|
66883
67178
|
});
|
|
@@ -66892,7 +67187,7 @@ var startedSlackMovesSchemaDefinition = external_exports.object({
|
|
|
66892
67187
|
});
|
|
66893
67188
|
var startedSlackMovesSchema = startedSlackMovesSchemaDefinition;
|
|
66894
67189
|
var slackMoveInputSchemaDefinition = external_exports.object({
|
|
66895
|
-
workspaceId:
|
|
67190
|
+
workspaceId: workspaceIdSchema12,
|
|
66896
67191
|
moveId: external_exports.string().min(1).max(100)
|
|
66897
67192
|
});
|
|
66898
67193
|
var slackMoveInputSchema = slackMoveInputSchemaDefinition;
|
|
@@ -66934,7 +67229,7 @@ var slackProfilesSchemaDefinition = external_exports.object({
|
|
|
66934
67229
|
var slackProfilesSchema = slackProfilesSchemaDefinition;
|
|
66935
67230
|
|
|
66936
67231
|
// ../../modules/slack/contract/src/slack-setup.ts
|
|
66937
|
-
var
|
|
67232
|
+
var workspaceIdSchema13 = external_exports.string().min(1);
|
|
66938
67233
|
var appKeySchema = external_exports.string().regex(/^[a-z0-9]{8,64}$/);
|
|
66939
67234
|
var returnToSchema3 = external_exports.string().startsWith("/").max(500).optional();
|
|
66940
67235
|
var slackAppCredentialFieldSchema = external_exports.enum([
|
|
@@ -66943,7 +67238,7 @@ var slackAppCredentialFieldSchema = external_exports.enum([
|
|
|
66943
67238
|
"clientSecret",
|
|
66944
67239
|
"signingSecret"
|
|
66945
67240
|
]);
|
|
66946
|
-
var beginSlackSetupInputSchemaDefinition = external_exports.object({ workspaceId:
|
|
67241
|
+
var beginSlackSetupInputSchemaDefinition = external_exports.object({ workspaceId: workspaceIdSchema13 });
|
|
66947
67242
|
var beginSlackSetupInputSchema = beginSlackSetupInputSchemaDefinition;
|
|
66948
67243
|
var slackSetupSchemaDefinition = external_exports.object({
|
|
66949
67244
|
appKey: appKeySchema,
|
|
@@ -66957,7 +67252,7 @@ var slackSetupSchemaDefinition = external_exports.object({
|
|
|
66957
67252
|
});
|
|
66958
67253
|
var slackSetupSchema = slackSetupSchemaDefinition;
|
|
66959
67254
|
var saveSlackAppCredentialsInputSchemaDefinition = external_exports.object({
|
|
66960
|
-
workspaceId:
|
|
67255
|
+
workspaceId: workspaceIdSchema13,
|
|
66961
67256
|
appKey: appKeySchema,
|
|
66962
67257
|
appId: external_exports.string().max(200),
|
|
66963
67258
|
clientId: external_exports.string().max(200),
|
|
@@ -66967,7 +67262,7 @@ var saveSlackAppCredentialsInputSchemaDefinition = external_exports.object({
|
|
|
66967
67262
|
});
|
|
66968
67263
|
var saveSlackAppCredentialsInputSchema = saveSlackAppCredentialsInputSchemaDefinition;
|
|
66969
67264
|
var installSlackAppInputSchemaDefinition = external_exports.object({
|
|
66970
|
-
workspaceId:
|
|
67265
|
+
workspaceId: workspaceIdSchema13,
|
|
66971
67266
|
appKey: appKeySchema,
|
|
66972
67267
|
returnTo: returnToSchema3
|
|
66973
67268
|
});
|
|
@@ -67086,7 +67381,7 @@ var slackEventsPausedPayloadSchemaDefinition = external_exports.object({
|
|
|
67086
67381
|
var SLACK_CACHE_DAYS_MAX = 30;
|
|
67087
67382
|
var SLACK_HISTORY_PATH = "/api/slack/history";
|
|
67088
67383
|
var SLACK_READ_BUDGET_MAX = 5e3;
|
|
67089
|
-
var
|
|
67384
|
+
var workspaceIdSchema14 = external_exports.string().min(1);
|
|
67090
67385
|
var teamIdSchema2 = external_exports.string().regex(/^[TE][A-Z0-9]{2,20}$/);
|
|
67091
67386
|
var slackChannelIdSchema2 = external_exports.string().regex(/^[CG][A-Z0-9]{2,20}$/);
|
|
67092
67387
|
var slackConnectionStatusSchema = external_exports.enum(["connected", "needs_reinstall"]);
|
|
@@ -67150,13 +67445,13 @@ var slackChannelViewSchemaDefinition = external_exports.object({
|
|
|
67150
67445
|
});
|
|
67151
67446
|
var slackChannelViewSchema = slackChannelViewSchemaDefinition;
|
|
67152
67447
|
var startSlackInstallInputSchemaDefinition = external_exports.object({
|
|
67153
|
-
workspaceId:
|
|
67448
|
+
workspaceId: workspaceIdSchema14,
|
|
67154
67449
|
/** A path in Laze to land on afterwards; defaults to the Connectors page. */
|
|
67155
67450
|
returnTo: external_exports.string().startsWith("/").max(500).optional()
|
|
67156
67451
|
});
|
|
67157
67452
|
var startSlackInstallInputSchema = startSlackInstallInputSchemaDefinition;
|
|
67158
67453
|
var startSlackLinkInputSchemaDefinition = external_exports.object({
|
|
67159
|
-
workspaceId:
|
|
67454
|
+
workspaceId: workspaceIdSchema14,
|
|
67160
67455
|
teamId: teamIdSchema2,
|
|
67161
67456
|
returnTo: external_exports.string().startsWith("/").max(500).optional()
|
|
67162
67457
|
});
|
|
@@ -67164,7 +67459,7 @@ var startSlackLinkInputSchema = startSlackLinkInputSchemaDefinition;
|
|
|
67164
67459
|
var startedSlackAuthorizeSchemaDefinition = external_exports.object({ authorizeUrl: external_exports.url() });
|
|
67165
67460
|
var startedSlackAuthorizeSchema = startedSlackAuthorizeSchemaDefinition;
|
|
67166
67461
|
var startSlackSetupInputSchemaDefinition = external_exports.object({
|
|
67167
|
-
workspaceId:
|
|
67462
|
+
workspaceId: workspaceIdSchema14,
|
|
67168
67463
|
configToken: external_exports.string().trim().min(10).max(1e3),
|
|
67169
67464
|
returnTo: external_exports.string().startsWith("/").max(500).optional()
|
|
67170
67465
|
});
|
|
@@ -67183,19 +67478,19 @@ var slackEventsHeadersSchemaDefinition = external_exports.object({
|
|
|
67183
67478
|
});
|
|
67184
67479
|
var slackEventsAnswerSchemaDefinition = external_exports.object({ challenge: external_exports.string().nullable() });
|
|
67185
67480
|
var teamInputSchemaDefinition = external_exports.object({
|
|
67186
|
-
workspaceId:
|
|
67481
|
+
workspaceId: workspaceIdSchema14,
|
|
67187
67482
|
teamId: teamIdSchema2
|
|
67188
67483
|
});
|
|
67189
67484
|
var slackTeamInputSchema = teamInputSchemaDefinition;
|
|
67190
67485
|
var setSlackMirrorInputSchemaDefinition = external_exports.object({
|
|
67191
|
-
workspaceId:
|
|
67486
|
+
workspaceId: workspaceIdSchema14,
|
|
67192
67487
|
teamId: teamIdSchema2,
|
|
67193
67488
|
slackChannelId: slackChannelIdSchema2,
|
|
67194
67489
|
mirrored: external_exports.boolean()
|
|
67195
67490
|
});
|
|
67196
67491
|
var setSlackMirrorInputSchema = setSlackMirrorInputSchemaDefinition;
|
|
67197
67492
|
var updateSlackConnectionInputSchemaDefinition = external_exports.object({
|
|
67198
|
-
workspaceId:
|
|
67493
|
+
workspaceId: workspaceIdSchema14,
|
|
67199
67494
|
teamId: teamIdSchema2,
|
|
67200
67495
|
label: external_exports.string().trim().max(80).nullable().optional(),
|
|
67201
67496
|
cacheDays: external_exports.number().int().min(1).max(SLACK_CACHE_DAYS_MAX).optional(),
|
|
@@ -67203,17 +67498,17 @@ var updateSlackConnectionInputSchemaDefinition = external_exports.object({
|
|
|
67203
67498
|
});
|
|
67204
67499
|
var updateSlackConnectionInputSchema = updateSlackConnectionInputSchemaDefinition;
|
|
67205
67500
|
var updateSlackAppInputSchemaDefinition = external_exports.object({
|
|
67206
|
-
workspaceId:
|
|
67501
|
+
workspaceId: workspaceIdSchema14,
|
|
67207
67502
|
teamId: teamIdSchema2,
|
|
67208
67503
|
configToken: external_exports.string().trim().min(10).max(1e3)
|
|
67209
67504
|
});
|
|
67210
67505
|
var updateSlackAppInputSchema = updateSlackAppInputSchemaDefinition;
|
|
67211
67506
|
var slackLinkParamsSchemaDefinition = external_exports.object({
|
|
67212
|
-
workspaceId:
|
|
67507
|
+
workspaceId: workspaceIdSchema14,
|
|
67213
67508
|
teamId: teamIdSchema2
|
|
67214
67509
|
});
|
|
67215
67510
|
var slackHistoryInputSchemaDefinition = external_exports.object({
|
|
67216
|
-
workspaceId:
|
|
67511
|
+
workspaceId: workspaceIdSchema14,
|
|
67217
67512
|
/** The Laze conversation that mirrors the Slack channel. */
|
|
67218
67513
|
channelId: external_exports.string().min(1),
|
|
67219
67514
|
/** Messages before this time; the oldest message the cache shows. */
|
|
@@ -67243,7 +67538,7 @@ var slackHistoryPageSchemaDefinition = external_exports.object({
|
|
|
67243
67538
|
});
|
|
67244
67539
|
var slackHistoryPageSchema = slackHistoryPageSchemaDefinition;
|
|
67245
67540
|
var slackFileParamsSchemaDefinition = external_exports.object({
|
|
67246
|
-
workspaceId:
|
|
67541
|
+
workspaceId: workspaceIdSchema14,
|
|
67247
67542
|
/** The Laze conversation that mirrors the Slack channel. */
|
|
67248
67543
|
channelId: external_exports.string().min(1).max(200),
|
|
67249
67544
|
fileId: external_exports.string().regex(/^F[A-Z0-9]{2,30}$/)
|
|
@@ -67251,7 +67546,7 @@ var slackFileParamsSchemaDefinition = external_exports.object({
|
|
|
67251
67546
|
var SLACK_SEARCH_QUERY_MIN = 2;
|
|
67252
67547
|
var SLACK_SEARCH_QUERY_MAX = 200;
|
|
67253
67548
|
var slackSearchInputSchemaDefinition = external_exports.object({
|
|
67254
|
-
workspaceId:
|
|
67549
|
+
workspaceId: workspaceIdSchema14,
|
|
67255
67550
|
query: external_exports.string().trim().min(SLACK_SEARCH_QUERY_MIN).max(SLACK_SEARCH_QUERY_MAX)
|
|
67256
67551
|
});
|
|
67257
67552
|
var slackSearchInputSchema = slackSearchInputSchemaDefinition;
|
|
@@ -67299,7 +67594,7 @@ var slackSearchAnswerSchemaDefinition = external_exports.object({
|
|
|
67299
67594
|
});
|
|
67300
67595
|
var slackSearchAnswerSchema = slackSearchAnswerSchemaDefinition;
|
|
67301
67596
|
var SlackApi = moduleApi()("slack");
|
|
67302
|
-
var workspaceInput3 = external_exports.object({ workspaceId:
|
|
67597
|
+
var workspaceInput3 = external_exports.object({ workspaceId: workspaceIdSchema14 });
|
|
67303
67598
|
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).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();
|
|
67304
67599
|
|
|
67305
67600
|
// ../../modules/slack/contract/src/slack-keys.ts
|
|
@@ -68840,7 +69135,7 @@ import { chmod as chmod2, mkdir as mkdir5, readFile as readFile6, writeFile as w
|
|
|
68840
69135
|
import { dirname as dirname5, join as join7 } from "node:path";
|
|
68841
69136
|
|
|
68842
69137
|
// ../../modules/openclaw/contract/src/openclaw.ts
|
|
68843
|
-
var
|
|
69138
|
+
var workspaceIdSchema15 = external_exports.string().min(1);
|
|
68844
69139
|
var connectionIdSchema = external_exports.string().min(1).max(80);
|
|
68845
69140
|
var openclawAgentIdSchema = external_exports.string().min(1).max(120);
|
|
68846
69141
|
var openclawConnectionStatusSchema = external_exports.enum([
|
|
@@ -68895,14 +69190,14 @@ var openclawOverviewSchemaDefinition = external_exports.object({
|
|
|
68895
69190
|
});
|
|
68896
69191
|
var openclawOverviewSchema = openclawOverviewSchemaDefinition;
|
|
68897
69192
|
var connectOpenclawInputSchemaDefinition = external_exports.object({
|
|
68898
|
-
workspaceId:
|
|
69193
|
+
workspaceId: workspaceIdSchema15,
|
|
68899
69194
|
gatewayUrl: external_exports.string().trim().min(1).max(500),
|
|
68900
69195
|
token: external_exports.string().trim().min(1).max(500),
|
|
68901
69196
|
label: external_exports.string().trim().min(1).max(80).optional()
|
|
68902
69197
|
});
|
|
68903
69198
|
var connectOpenclawInputSchema = connectOpenclawInputSchemaDefinition;
|
|
68904
69199
|
var openclawConnectionRefSchemaDefinition = external_exports.object({
|
|
68905
|
-
workspaceId:
|
|
69200
|
+
workspaceId: workspaceIdSchema15,
|
|
68906
69201
|
connectionId: connectionIdSchema
|
|
68907
69202
|
});
|
|
68908
69203
|
var openclawConnectionRefSchema = openclawConnectionRefSchemaDefinition;
|
|
@@ -68929,7 +69224,7 @@ var openclawAgentKeySchemaDefinition = external_exports.object({
|
|
|
68929
69224
|
});
|
|
68930
69225
|
var openclawAgentKeySchema = openclawAgentKeySchemaDefinition;
|
|
68931
69226
|
var OpenclawApi = moduleApi()("openclaw");
|
|
68932
|
-
var openclawTrpc = defineTrpcContract("openclaw").query("overview").withInput(external_exports.object({ workspaceId:
|
|
69227
|
+
var openclawTrpc = defineTrpcContract("openclaw").query("overview").withInput(external_exports.object({ workspaceId: workspaceIdSchema15 })).withOutput(openclawOverviewSchema).mutation("connect").withInput(connectOpenclawInputSchema).withOutput(openclawConnectionViewSchema).mutation("setAgent").withInput(setOpenclawAgentInputSchema).withOutput(openclawConnectionViewSchema).mutation("setFeed").withInput(setOpenclawFeedInputSchema).withOutput(openclawConnectionViewSchema).mutation("agentKey").withInput(openclawAgentRefSchema).withOutput(openclawAgentKeySchema).mutation("disconnect").withInput(openclawConnectionRefSchema).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).build();
|
|
68933
69228
|
|
|
68934
69229
|
// ../../modules/openclaw/contract/src/openclaw.config.ts
|
|
68935
69230
|
var positiveInt5 = external_exports.coerce.number().int().positive();
|
|
@@ -71578,7 +71873,7 @@ var CREATE_USAGE = "Usage: laze agent create --name <name> [--description <text>
|
|
|
71578
71873
|
var UPDATE_USAGE = "Usage: laze agent update <agent> [--name <name>] [--description <text>] [--avatar <file>] [--model <model>|default] [--effort <level>|default] [--max-context <tokens, such as 200k>|default]";
|
|
71579
71874
|
var ARCHIVE_USAGE = "Usage: laze agent archive <agent>";
|
|
71580
71875
|
var PAUSE_USAGE = 'Usage: laze agent pause <agent> [--reason "<why>"] | laze agent resume <agent>';
|
|
71581
|
-
var TRANSFER_USAGE = "Usage: laze agent transfer <agent> <member: user id, email or name>";
|
|
71876
|
+
var TRANSFER_USAGE = "Usage: laze agent transfer <agent> <member: user id, email or name> | accept|decline|cancel <agent> | offers";
|
|
71582
71877
|
var RESET_USAGE = "Usage: laze agent reset-session <agent>";
|
|
71583
71878
|
var HARNESSES = /* @__PURE__ */ new Set(["laze-models", "claude-code", "codex"]);
|
|
71584
71879
|
var PICTURE_TYPES = {
|
|
@@ -71776,18 +72071,52 @@ async function pauseAgent({
|
|
|
71776
72071
|
`
|
|
71777
72072
|
);
|
|
71778
72073
|
}
|
|
72074
|
+
var TRANSFER_ANSWERS = {
|
|
72075
|
+
accept: { path: "/api/agents/transfer/accept", done: "is yours now" },
|
|
72076
|
+
decline: { path: "/api/agents/transfer/decline", done: "stays with its owner" },
|
|
72077
|
+
cancel: { path: "/api/agents/transfer/cancel", done: "is no longer offered" }
|
|
72078
|
+
};
|
|
71779
72079
|
async function transferAgent({
|
|
71780
72080
|
context,
|
|
71781
72081
|
args
|
|
71782
72082
|
}) {
|
|
71783
|
-
const [, ,
|
|
71784
|
-
if (
|
|
72083
|
+
const [, , first, second] = args.words;
|
|
72084
|
+
if (first === "offers") return transferOffers({ context, args });
|
|
72085
|
+
const answer4 = first && Object.hasOwn(TRANSFER_ANSWERS, first) ? first : null;
|
|
72086
|
+
if (answer4) {
|
|
72087
|
+
if (!second) throw new CliUsageError(TRANSFER_USAGE);
|
|
72088
|
+
const { path, done } = TRANSFER_ANSWERS[answer4];
|
|
72089
|
+
const { client: client2 } = await signedIn({ context, args });
|
|
72090
|
+
const answered = await client2.post(path, { agent: second });
|
|
72091
|
+
if (args.flags.json) return context.out(`${JSON.stringify(answered, null, 2)}
|
|
72092
|
+
`);
|
|
72093
|
+
return context.out(`${second} ${done}.
|
|
72094
|
+
`);
|
|
72095
|
+
}
|
|
72096
|
+
if (!first || !second) throw new CliUsageError(TRANSFER_USAGE);
|
|
71785
72097
|
const { client } = await signedIn({ context, args });
|
|
71786
|
-
const moved = await client.post("/api/agents/transfer", { agent:
|
|
72098
|
+
const moved = await client.post("/api/agents/transfer", { agent: first, to: second });
|
|
71787
72099
|
if (args.flags.json) return context.out(`${JSON.stringify(moved, null, 2)}
|
|
71788
72100
|
`);
|
|
71789
|
-
context.out(
|
|
72101
|
+
context.out(
|
|
72102
|
+
moved.kind === "personal" ? `Offered ${moved.name} to ${second}. It moves once they accept, within 7 days.
|
|
72103
|
+
` : `Transferred ${moved.name} to ${second}.
|
|
72104
|
+
`
|
|
72105
|
+
);
|
|
72106
|
+
}
|
|
72107
|
+
async function transferOffers({
|
|
72108
|
+
context,
|
|
72109
|
+
args
|
|
72110
|
+
}) {
|
|
72111
|
+
const { client } = await signedIn({ context, args });
|
|
72112
|
+
const offers = await client.get("/api/agents/transfer/offers");
|
|
72113
|
+
if (args.flags.json) return context.out(`${JSON.stringify(offers, null, 2)}
|
|
72114
|
+
`);
|
|
72115
|
+
if (offers.length === 0) return context.out("No transfer offers are waiting.\n");
|
|
72116
|
+
for (const offer2 of offers) {
|
|
72117
|
+
context.out(`${offer2.agentName} to ${offer2.toUserId} until ${offer2.expiresAt}
|
|
71790
72118
|
`);
|
|
72119
|
+
}
|
|
71791
72120
|
}
|
|
71792
72121
|
async function resetAgentSession({
|
|
71793
72122
|
context,
|
|
@@ -72405,7 +72734,7 @@ var appConnectionClaimsSchemaDefinition = external_exports.object({
|
|
|
72405
72734
|
exp: external_exports.number().int(),
|
|
72406
72735
|
wid: external_exports.string().min(1),
|
|
72407
72736
|
app: external_exports.string().min(1),
|
|
72408
|
-
site: external_exports.
|
|
72737
|
+
site: external_exports.string().optional(),
|
|
72409
72738
|
fn: external_exports.string().min(1),
|
|
72410
72739
|
conn: external_exports.string().min(1),
|
|
72411
72740
|
method: external_exports.string().min(1).max(16),
|
|
@@ -72430,7 +72759,7 @@ var APP_VISIBILITIES = ["restricted", "channel", "internal", "public"];
|
|
|
72430
72759
|
var appVisibilitySchema = external_exports.enum(APP_VISIBILITIES);
|
|
72431
72760
|
var APP_ROLES = ["viewer", "editor", "builder"];
|
|
72432
72761
|
var appRoleSchema = external_exports.enum(APP_ROLES);
|
|
72433
|
-
var
|
|
72762
|
+
var legacySiteSchema = external_exports.enum(["published", "draft"]).optional();
|
|
72434
72763
|
var appVersionIdSchema = external_exports.string().regex(/^[0-9a-f]{40}$/);
|
|
72435
72764
|
var MAX_APP_BUILD_BYTES = 10 * 1024 * 1024;
|
|
72436
72765
|
var appActorSchemaDefinition = external_exports.object({
|
|
@@ -72474,12 +72803,10 @@ var appSchemaDefinition = external_exports.object({
|
|
|
72474
72803
|
channelId: external_exports.string().nullable(),
|
|
72475
72804
|
owner: appActorSchema,
|
|
72476
72805
|
visibility: appVisibilitySchema,
|
|
72477
|
-
/** `https://<app>--<workspace>.<domain>`: the
|
|
72806
|
+
/** `https://<app>--<workspace>.<domain>`: the app's own origin. */
|
|
72478
72807
|
publishedUrl: external_exports.string(),
|
|
72479
|
-
/** The
|
|
72480
|
-
draftUrl: external_exports.string(),
|
|
72808
|
+
/** The live version; null before the first push or while the app is taken offline. */
|
|
72481
72809
|
publishedVersion: appVersionIdSchema.nullable(),
|
|
72482
|
-
draftVersion: appVersionIdSchema.nullable(),
|
|
72483
72810
|
pendingPublish: publishRequestSchema.nullable(),
|
|
72484
72811
|
/** The standing approval for public publishes; absent or null when every one asks. */
|
|
72485
72812
|
publishLease: publishLeaseSchema.nullable().optional(),
|
|
@@ -72618,12 +72945,6 @@ var commitInputSchemaDefinition = external_exports.object({
|
|
|
72618
72945
|
functions: appFunctionDeclarationsSchema.optional()
|
|
72619
72946
|
});
|
|
72620
72947
|
var commitInputSchema = commitInputSchemaDefinition;
|
|
72621
|
-
var deployInputSchemaDefinition = external_exports.object({
|
|
72622
|
-
...appRefSchemaDefinition.shape,
|
|
72623
|
-
/** Defaults to the latest version. */
|
|
72624
|
-
version: appVersionIdSchema.optional()
|
|
72625
|
-
});
|
|
72626
|
-
var deployInputSchema = deployInputSchemaDefinition;
|
|
72627
72948
|
var revertInputSchemaDefinition = external_exports.object({
|
|
72628
72949
|
...appRefSchemaDefinition.shape,
|
|
72629
72950
|
version: appVersionIdSchema,
|
|
@@ -72632,7 +72953,7 @@ var revertInputSchemaDefinition = external_exports.object({
|
|
|
72632
72953
|
var revertInputSchema = revertInputSchemaDefinition;
|
|
72633
72954
|
var publishInputSchemaDefinition = external_exports.object({
|
|
72634
72955
|
...appRefSchemaDefinition.shape,
|
|
72635
|
-
/** Defaults to the version
|
|
72956
|
+
/** Defaults to the newest version. */
|
|
72636
72957
|
version: appVersionIdSchema.optional(),
|
|
72637
72958
|
/** Defaults to the app's current visibility. */
|
|
72638
72959
|
visibility: appVisibilitySchema.optional(),
|
|
@@ -72653,6 +72974,11 @@ var publishOutcomeSchemaDefinition = external_exports.object({
|
|
|
72653
72974
|
app: appSchema
|
|
72654
72975
|
});
|
|
72655
72976
|
var publishOutcomeSchema = publishOutcomeSchemaDefinition;
|
|
72977
|
+
var appPushSchemaDefinition = external_exports.object({
|
|
72978
|
+
...appVersionSchemaDefinition.shape,
|
|
72979
|
+
publish: publishOutcomeSchemaDefinition
|
|
72980
|
+
});
|
|
72981
|
+
var appPushSchema = appPushSchemaDefinition;
|
|
72656
72982
|
var nameVersionInputSchemaDefinition = external_exports.object({
|
|
72657
72983
|
...appRefSchemaDefinition.shape,
|
|
72658
72984
|
version: appVersionIdSchema,
|
|
@@ -72690,23 +73016,30 @@ function versionMessageVerdict(message2) {
|
|
|
72690
73016
|
}
|
|
72691
73017
|
var defineCollectionInputSchemaDefinition = external_exports.object({
|
|
72692
73018
|
...appRefSchemaDefinition.shape,
|
|
72693
|
-
/**
|
|
72694
|
-
site:
|
|
73019
|
+
/** A schema change applies to the live data at once; records keep their values. */
|
|
73020
|
+
site: legacySiteSchema,
|
|
72695
73021
|
name: collectionNameSchema,
|
|
72696
73022
|
fields: external_exports.array(collectionFieldSchema).min(1),
|
|
72697
73023
|
rules: collectionRulesSchemaDefinition.optional()
|
|
72698
73024
|
});
|
|
72699
73025
|
var defineCollectionInputSchema = defineCollectionInputSchemaDefinition;
|
|
72700
|
-
var
|
|
72701
|
-
|
|
72702
|
-
|
|
73026
|
+
var appDataRefSchemaDefinition = external_exports.object({
|
|
73027
|
+
...appRefSchemaDefinition.shape,
|
|
73028
|
+
site: legacySiteSchema
|
|
73029
|
+
});
|
|
73030
|
+
var appDataRefSchema = appDataRefSchemaDefinition;
|
|
73031
|
+
var seedDataInputSchemaDefinition = external_exports.object({
|
|
72703
73032
|
...appRefSchemaDefinition.shape,
|
|
72704
|
-
/**
|
|
73033
|
+
/** Starter records by collection; a collection that already holds records is left alone. */
|
|
72705
73034
|
records: external_exports.record(collectionNameSchema, external_exports.array(appRecordSchema)).default({})
|
|
72706
73035
|
});
|
|
72707
|
-
var
|
|
73036
|
+
var seedDataInputSchema = seedDataInputSchemaDefinition;
|
|
73037
|
+
var seedOutcomeSchemaDefinition = external_exports.object({
|
|
73038
|
+
created: external_exports.record(external_exports.string(), external_exports.number().int().nonnegative()),
|
|
73039
|
+
skipped: external_exports.array(external_exports.string())
|
|
73040
|
+
});
|
|
72708
73041
|
var listRecordsInputSchemaDefinition = external_exports.object({
|
|
72709
|
-
...
|
|
73042
|
+
...appDataRefSchemaDefinition.shape,
|
|
72710
73043
|
collection: collectionNameSchema,
|
|
72711
73044
|
filter: external_exports.string().max(2e3).optional(),
|
|
72712
73045
|
sort: external_exports.string().max(200).optional(),
|
|
@@ -72715,7 +73048,7 @@ var listRecordsInputSchemaDefinition = external_exports.object({
|
|
|
72715
73048
|
});
|
|
72716
73049
|
var listRecordsInputSchema = listRecordsInputSchemaDefinition;
|
|
72717
73050
|
var writeRecordInputSchemaDefinition = external_exports.object({
|
|
72718
|
-
...
|
|
73051
|
+
...appDataRefSchemaDefinition.shape,
|
|
72719
73052
|
collection: collectionNameSchema,
|
|
72720
73053
|
/** Absent creates a record; present updates that one. */
|
|
72721
73054
|
recordId: external_exports.string().min(1).optional(),
|
|
@@ -72723,26 +73056,26 @@ var writeRecordInputSchemaDefinition = external_exports.object({
|
|
|
72723
73056
|
});
|
|
72724
73057
|
var writeRecordInputSchema = writeRecordInputSchemaDefinition;
|
|
72725
73058
|
var deleteRecordInputSchemaDefinition = external_exports.object({
|
|
72726
|
-
...
|
|
73059
|
+
...appDataRefSchemaDefinition.shape,
|
|
72727
73060
|
collection: collectionNameSchema,
|
|
72728
73061
|
recordId: external_exports.string().min(1)
|
|
72729
73062
|
});
|
|
72730
73063
|
var deleteRecordInputSchema = deleteRecordInputSchemaDefinition;
|
|
72731
|
-
var
|
|
72732
|
-
|
|
73064
|
+
var appAddressSchemaDefinition = external_exports.object({
|
|
73065
|
+
/** The live version. */
|
|
72733
73066
|
version: appVersionIdSchema,
|
|
72734
|
-
/** The
|
|
73067
|
+
/** The app's own origin; opening it signs the person in through Laze when it needs one. */
|
|
72735
73068
|
url: external_exports.string()
|
|
72736
73069
|
});
|
|
72737
73070
|
var appPullSchemaDefinition = external_exports.object({
|
|
72738
73071
|
app: external_exports.object({ id: external_exports.string(), name: external_exports.string(), slug: external_exports.string() }),
|
|
72739
|
-
|
|
73072
|
+
/** The live version, or the newest one while nothing is live. */
|
|
72740
73073
|
version: appVersionIdSchema,
|
|
72741
73074
|
files: external_exports.array(appFileSchema),
|
|
72742
73075
|
collections: external_exports.array(collectionSchema)
|
|
72743
73076
|
});
|
|
72744
73077
|
var exportRecordsInputSchemaDefinition = external_exports.object({
|
|
72745
|
-
...
|
|
73078
|
+
...appDataRefSchemaDefinition.shape,
|
|
72746
73079
|
collection: collectionNameSchema,
|
|
72747
73080
|
format: external_exports.enum(["csv", "json"]).default("csv")
|
|
72748
73081
|
});
|
|
@@ -72765,17 +73098,14 @@ var appKeyCallerViewSchemaDefinition = external_exports.object({
|
|
|
72765
73098
|
});
|
|
72766
73099
|
var signInHandoffInputSchemaDefinition = external_exports.object({
|
|
72767
73100
|
...appRefSchemaDefinition.shape,
|
|
72768
|
-
|
|
72769
|
-
site: appSiteSchema.optional(),
|
|
73101
|
+
site: legacySiteSchema,
|
|
72770
73102
|
/** Where the app sends the person after sign-in; kept on the app's own origin. */
|
|
72771
73103
|
returnPath: external_exports.string().max(2e3).default("/")
|
|
72772
73104
|
});
|
|
72773
73105
|
var signInHandoffInputSchema = signInHandoffInputSchemaDefinition;
|
|
72774
73106
|
var signInHandoffSchemaDefinition = external_exports.object({
|
|
72775
|
-
/** The app origin's callback, carrying a one-use token valid only for this app
|
|
73107
|
+
/** The app origin's callback, carrying a one-use token valid only for this app. */
|
|
72776
73108
|
redirectUrl: external_exports.string(),
|
|
72777
|
-
/** The site the token opens. */
|
|
72778
|
-
site: appSiteSchema,
|
|
72779
73109
|
expiresAt: external_exports.iso.datetime()
|
|
72780
73110
|
});
|
|
72781
73111
|
var signInHandoffSchema = signInHandoffSchemaDefinition;
|
|
@@ -72820,7 +73150,7 @@ var appViewSchemaDefinition = external_exports.object({
|
|
|
72820
73150
|
});
|
|
72821
73151
|
var appViewSchema = appViewSchemaDefinition;
|
|
72822
73152
|
var saveViewInputSchemaDefinition = external_exports.object({
|
|
72823
|
-
...
|
|
73153
|
+
...appDataRefSchemaDefinition.shape,
|
|
72824
73154
|
view: external_exports.object({
|
|
72825
73155
|
...viewSpecShape,
|
|
72826
73156
|
/** Absent creates a view, or replaces the collection's view of the same name. */
|
|
@@ -72830,7 +73160,7 @@ var saveViewInputSchemaDefinition = external_exports.object({
|
|
|
72830
73160
|
});
|
|
72831
73161
|
var saveViewInputSchema = saveViewInputSchemaDefinition;
|
|
72832
73162
|
var deleteViewInputSchemaDefinition = external_exports.object({
|
|
72833
|
-
...
|
|
73163
|
+
...appDataRefSchemaDefinition.shape,
|
|
72834
73164
|
viewId: external_exports.string().min(1)
|
|
72835
73165
|
});
|
|
72836
73166
|
var deleteViewInputSchema = deleteViewInputSchemaDefinition;
|
|
@@ -72864,7 +73194,7 @@ var appCardChoiceSchemaDefinition = external_exports.object({
|
|
|
72864
73194
|
var appCardChoiceSchema = appCardChoiceSchemaDefinition;
|
|
72865
73195
|
var APP_IMPORT_LIMITS = { maxBytes: 5 * 1024 * 1024, maxRows: 1e4 };
|
|
72866
73196
|
var importRecordsInputSchemaDefinition = external_exports.object({
|
|
72867
|
-
...
|
|
73197
|
+
...appDataRefSchemaDefinition.shape,
|
|
72868
73198
|
collection: collectionNameSchema,
|
|
72869
73199
|
/** The file's text, header row first. */
|
|
72870
73200
|
csv: external_exports.string(),
|
|
@@ -72893,7 +73223,6 @@ var appFunctionLogEntrySchemaDefinition = external_exports.object({
|
|
|
72893
73223
|
at: external_exports.string(),
|
|
72894
73224
|
function: external_exports.string(),
|
|
72895
73225
|
requestId: external_exports.string(),
|
|
72896
|
-
site: appSiteSchema.optional(),
|
|
72897
73226
|
/** `request` is the platform's note of one call; the others are the function's own output. */
|
|
72898
73227
|
level: external_exports.enum(["request", "debug", "info", "warn", "error"]),
|
|
72899
73228
|
message: external_exports.string(),
|
|
@@ -72957,7 +73286,7 @@ var appBackupStatusSchemaDefinition = external_exports.object({
|
|
|
72957
73286
|
/** The last daily restore check of this app's databases. */
|
|
72958
73287
|
check: external_exports.object({
|
|
72959
73288
|
at: external_exports.string(),
|
|
72960
|
-
failures: external_exports.array(external_exports.object({ appId: external_exports.string(),
|
|
73289
|
+
failures: external_exports.array(external_exports.object({ appId: external_exports.string(), error: external_exports.string() }))
|
|
72961
73290
|
}).optional()
|
|
72962
73291
|
});
|
|
72963
73292
|
var appBackupStatusSchema = appBackupStatusSchemaDefinition;
|
|
@@ -73139,6 +73468,33 @@ var appUserMailClaimsSchemaDefinition = external_exports.object({
|
|
|
73139
73468
|
code: external_exports.string().regex(/^\d{6}$/)
|
|
73140
73469
|
});
|
|
73141
73470
|
|
|
73471
|
+
// ../../modules/app/contract/src/app.faults.ts
|
|
73472
|
+
var reportAppFaultInputSchemaDefinition = external_exports.object({ token: external_exports.string().min(1).max(16384) });
|
|
73473
|
+
var reportedAppFaultSchemaDefinition = external_exports.object({ filed: external_exports.boolean() });
|
|
73474
|
+
var appFaultClaimsSchemaDefinition = external_exports.object({
|
|
73475
|
+
iss: external_exports.literal("laze-apps"),
|
|
73476
|
+
aud: external_exports.array(external_exports.string()).refine((aud) => aud.includes("laze-app-fault")),
|
|
73477
|
+
exp: external_exports.number().int(),
|
|
73478
|
+
wid: external_exports.string().min(1),
|
|
73479
|
+
app: external_exports.string().min(1),
|
|
73480
|
+
/** Sent by hosts from before apps were trunk-based; ignored. */
|
|
73481
|
+
site: external_exports.enum(["draft", "published"]).optional(),
|
|
73482
|
+
ver: external_exports.string().min(1).max(64),
|
|
73483
|
+
vid: external_exports.string().min(1),
|
|
73484
|
+
vname: external_exports.string().max(200),
|
|
73485
|
+
kind: external_exports.enum(["error", "rejection", "banner", "api"]),
|
|
73486
|
+
msg: external_exports.string().min(1).max(1e3),
|
|
73487
|
+
stack: external_exports.string().max(4e3).optional(),
|
|
73488
|
+
req: external_exports.object({
|
|
73489
|
+
method: external_exports.string().max(16),
|
|
73490
|
+
path: external_exports.string().max(600),
|
|
73491
|
+
status: external_exports.number().int(),
|
|
73492
|
+
code: external_exports.string().max(160).optional()
|
|
73493
|
+
}).optional(),
|
|
73494
|
+
act: external_exports.string().max(400),
|
|
73495
|
+
page: external_exports.string().max(600)
|
|
73496
|
+
});
|
|
73497
|
+
|
|
73142
73498
|
// ../../modules/app/contract/src/app.cost.ts
|
|
73143
73499
|
var APP_COST_PARTS = [
|
|
73144
73500
|
"storage",
|
|
@@ -73299,8 +73655,7 @@ var appTriggersSchemaDefinition = external_exports.object({
|
|
|
73299
73655
|
var appTriggersSchema = appTriggersSchemaDefinition;
|
|
73300
73656
|
var addAppTriggerInputSchemaDefinition = external_exports.object({
|
|
73301
73657
|
...appRefSchema.shape,
|
|
73302
|
-
|
|
73303
|
-
site: appSiteSchema.default("published"),
|
|
73658
|
+
site: legacySiteSchema,
|
|
73304
73659
|
collection: collectionNameSchema,
|
|
73305
73660
|
on: external_exports.array(appTriggerOpSchema).min(1).max(3),
|
|
73306
73661
|
where: appTriggerWhereSchema.default({}),
|
|
@@ -73401,7 +73756,7 @@ var appPinSchemaDefinition = external_exports.object({
|
|
|
73401
73756
|
name: external_exports.string(),
|
|
73402
73757
|
/** The reader's role in the app; null when they cannot open it. */
|
|
73403
73758
|
role: appRoleSchema.nullable(),
|
|
73404
|
-
/** Whether the app
|
|
73759
|
+
/** Whether the app has a live version. */
|
|
73405
73760
|
published: external_exports.boolean(),
|
|
73406
73761
|
pinnedBy: appActorSchema,
|
|
73407
73762
|
pinnedByName: external_exports.string().nullable(),
|
|
@@ -73492,7 +73847,6 @@ var appBackupCheckFailureSchemaDefinition = external_exports.object({
|
|
|
73492
73847
|
appId: external_exports.string(),
|
|
73493
73848
|
appName: external_exports.string(),
|
|
73494
73849
|
owner: appActorSchema,
|
|
73495
|
-
site: external_exports.string(),
|
|
73496
73850
|
error: external_exports.string()
|
|
73497
73851
|
});
|
|
73498
73852
|
var appBackupCheckAlertsSchemaDefinition = external_exports.object({
|
|
@@ -73507,7 +73861,7 @@ var appBackupCheckAlertsSchemaDefinition = external_exports.object({
|
|
|
73507
73861
|
});
|
|
73508
73862
|
|
|
73509
73863
|
// ../../modules/app/contract/src/app.trpc.ts
|
|
73510
|
-
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(
|
|
73864
|
+
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("functionSettings").withInput(appWorkspaceRefSchema).withOutput(appFunctionSettingsSchema).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).mutation("setFunctionsEnabled").withInput(setFunctionsEnabledInputSchema).withOutput(appFunctionSettingsSchema).mutation("setPublicAppsAllowed").withInput(setPublicAppsAllowedInputSchema).withOutput(appFunctionSettingsSchema).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();
|
|
73511
73865
|
var appConnectionsTrpc = defineTrpcContract("app").query("connections").withInput(appRefSchema).withOutput(appConnectionsSchema).mutation("allowConnection").withInput(appConnectionRefSchema).withOutput(appConnectionsSchema).mutation("revokeConnection").withInput(appConnectionRefSchema).withOutput(appConnectionsSchema).build();
|
|
73512
73866
|
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).build();
|
|
73513
73867
|
var appTrpc = joinTrpcContracts("app", appMainTrpc, appConnectionsTrpc, appPinsTrpc);
|
|
@@ -73520,16 +73874,19 @@ var createAppByKeyInputSchemaDefinition = external_exports.object({
|
|
|
73520
73874
|
channel: external_exports.string().min(1).optional()
|
|
73521
73875
|
});
|
|
73522
73876
|
var appByKeySchemaDefinition = external_exports.object({ appId: external_exports.string().min(1) });
|
|
73523
|
-
var
|
|
73877
|
+
var appDataByKeySchemaDefinition = external_exports.object({
|
|
73524
73878
|
...appByKeySchemaDefinition.shape,
|
|
73525
|
-
site:
|
|
73879
|
+
site: legacySiteSchema
|
|
73526
73880
|
});
|
|
73527
73881
|
var commitByKeyInputSchemaDefinition = commitInputSchema.omit(byKey);
|
|
73528
|
-
var
|
|
73882
|
+
var legacyDeployByKeyInputSchemaDefinition = external_exports.object({
|
|
73883
|
+
...appByKeySchemaDefinition.shape,
|
|
73884
|
+
version: appVersionIdSchema.optional()
|
|
73885
|
+
});
|
|
73529
73886
|
var revertByKeyInputSchemaDefinition = revertInputSchema.omit(byKey);
|
|
73530
73887
|
var publishByKeyInputSchemaDefinition = publishInputSchema.omit(byKey);
|
|
73531
73888
|
var defineCollectionByKeyInputSchemaDefinition = defineCollectionInputSchema.omit(byKey);
|
|
73532
|
-
var
|
|
73889
|
+
var seedByKeyInputSchemaDefinition = seedDataInputSchema.omit(byKey);
|
|
73533
73890
|
var listRecordsByKeyInputSchemaDefinition = listRecordsInputSchema.omit(byKey);
|
|
73534
73891
|
var writeRecordByKeyInputSchemaDefinition = writeRecordInputSchema.omit(byKey);
|
|
73535
73892
|
var deleteRecordByKeyInputSchemaDefinition = deleteRecordInputSchema.omit(byKey);
|
|
@@ -73569,7 +73926,7 @@ var APP_TEMPLATES = ["tracker", "crm", "dashboard", "form"];
|
|
|
73569
73926
|
var APP_MANIFEST_FILE = "laze.app.json";
|
|
73570
73927
|
var appManifestSchemaDefinition = external_exports.object({
|
|
73571
73928
|
app: external_exports.object({ id: external_exports.string().min(1), name: external_exports.string(), slug: appSlugSchema }),
|
|
73572
|
-
/** Defined
|
|
73929
|
+
/** Defined by every `laze app push`, before the version is recorded. */
|
|
73573
73930
|
collections: external_exports.record(
|
|
73574
73931
|
collectionNameSchema,
|
|
73575
73932
|
external_exports.object({
|
|
@@ -73578,16 +73935,16 @@ var appManifestSchemaDefinition = external_exports.object({
|
|
|
73578
73935
|
rules: collectionRulesSchema.optional()
|
|
73579
73936
|
})
|
|
73580
73937
|
).default({}),
|
|
73581
|
-
/** `email` lets visitors of the
|
|
73938
|
+
/** `email` lets visitors of the app sign up with an email code, after an approval. */
|
|
73582
73939
|
users: external_exports.enum(["email"]).optional(),
|
|
73583
73940
|
/**
|
|
73584
73941
|
* Per server function, the vault connections it calls with (by name) and the outside hosts it
|
|
73585
73942
|
* reaches: `{ "funnel": { "connections": ["posthog-read"], "hosts": ["api.open-meteo.com"] } }`.
|
|
73586
73943
|
*/
|
|
73587
73944
|
functions: appFunctionDeclarationsSchema.optional(),
|
|
73588
|
-
/** Data viewer tabs, saved
|
|
73945
|
+
/** Data viewer tabs, saved by every `laze app push` after the collections. */
|
|
73589
73946
|
views: external_exports.array(appViewSpecSchema).default([]),
|
|
73590
|
-
/** Test records `laze app seed` and `laze app push --seed` load
|
|
73947
|
+
/** Test records `laze app seed` and `laze app push --seed` load as test data. */
|
|
73591
73948
|
seed: external_exports.record(collectionNameSchema, external_exports.array(appRecordSchema)).default({})
|
|
73592
73949
|
});
|
|
73593
73950
|
var appManifestSchema = appManifestSchemaDefinition;
|
|
@@ -73607,8 +73964,8 @@ var appCliCommands = [
|
|
|
73607
73964
|
{
|
|
73608
73965
|
command: "laze app push",
|
|
73609
73966
|
operation: "commitVersion",
|
|
73610
|
-
arguments: ["[dir]", "-m <what changed>", "--seed"
|
|
73611
|
-
summary:
|
|
73967
|
+
arguments: ["[dir]", "-m <what changed>", "--seed"],
|
|
73968
|
+
summary: `Record the folder as a new version: it is the live app at once, with laze.app.json's collections applied to the live data (records keep their values). -m says what changed in plain words ("update" or "wip" is refused). Going live waits only when an admin must approve it, and the push asks. Server functions in functions/<name>.js ship with it`
|
|
73612
73969
|
},
|
|
73613
73970
|
{
|
|
73614
73971
|
command: "laze app logs",
|
|
@@ -73617,22 +73974,22 @@ var appCliCommands = [
|
|
|
73617
73974
|
summary: "Show the server function log, newest first: each request, console output and errors with their stack. A function in functions/<name>.js exports default { fetch(request, env) } and answers /_laze/fn/<name>; env.LAZE reads and writes the app's records as the viewer; it has no other network"
|
|
73618
73975
|
},
|
|
73619
73976
|
{
|
|
73620
|
-
command: "laze app
|
|
73621
|
-
operation: "
|
|
73622
|
-
arguments: [
|
|
73623
|
-
summary: "Print the
|
|
73977
|
+
command: "laze app url",
|
|
73978
|
+
operation: "getAddress",
|
|
73979
|
+
arguments: [],
|
|
73980
|
+
summary: "Print the live app's address"
|
|
73624
73981
|
},
|
|
73625
73982
|
{
|
|
73626
73983
|
command: "laze app pull",
|
|
73627
73984
|
operation: "pullFiles",
|
|
73628
|
-
arguments: ["[dir]"
|
|
73629
|
-
summary: "Download the
|
|
73985
|
+
arguments: ["[dir]"],
|
|
73986
|
+
summary: "Download the live version's files and a laze.app.json into a folder (default ./<slug>), to read its page, plan or code; anyone who may open the app can pull it"
|
|
73630
73987
|
},
|
|
73631
73988
|
{
|
|
73632
73989
|
command: "laze app publish",
|
|
73633
73990
|
operation: "requestPublish",
|
|
73634
73991
|
arguments: ["[version]", "--visibility restricted|channel|internal|public"],
|
|
73635
|
-
summary: "
|
|
73992
|
+
summary: "Bring the app back online after unpublish, or open it to other people with --visibility; a push is live already. Opening it to more people may wait for an approval"
|
|
73636
73993
|
},
|
|
73637
73994
|
{
|
|
73638
73995
|
command: "laze app make-internal",
|
|
@@ -73644,7 +74001,7 @@ var appCliCommands = [
|
|
|
73644
74001
|
command: "laze app unpublish",
|
|
73645
74002
|
operation: "unpublish",
|
|
73646
74003
|
arguments: [],
|
|
73647
|
-
summary: "Take the
|
|
74004
|
+
summary: "Take the app's address offline at once; the data and versions stay"
|
|
73648
74005
|
},
|
|
73649
74006
|
{
|
|
73650
74007
|
command: "laze app members",
|
|
@@ -73806,13 +74163,13 @@ var appCliCommands = [
|
|
|
73806
74163
|
command: "laze app backups",
|
|
73807
74164
|
operation: "getBackups",
|
|
73808
74165
|
arguments: ["[app]"],
|
|
73809
|
-
summary: "How far back the
|
|
74166
|
+
summary: "How far back the app's data can be restored, and past restores"
|
|
73810
74167
|
},
|
|
73811
74168
|
{
|
|
73812
74169
|
command: "laze app restore",
|
|
73813
74170
|
operation: "restoreData",
|
|
73814
74171
|
arguments: ["[app]", "--to <ISO time>", "--undo <restore-id>"],
|
|
73815
|
-
summary: "Put the
|
|
74172
|
+
summary: "Put the app's data back to a time, or undo a restore (admins, a person's key)"
|
|
73816
74173
|
},
|
|
73817
74174
|
{
|
|
73818
74175
|
command: "laze app users",
|
|
@@ -73847,37 +74204,31 @@ var appCliCommands = [
|
|
|
73847
74204
|
{
|
|
73848
74205
|
command: "laze app revert",
|
|
73849
74206
|
operation: "revertToVersion",
|
|
73850
|
-
arguments: ["<version>", "-m <message>"
|
|
73851
|
-
summary: "
|
|
73852
|
-
},
|
|
73853
|
-
{
|
|
73854
|
-
command: "laze app discard",
|
|
73855
|
-
operation: "discardDraft",
|
|
73856
|
-
arguments: [],
|
|
73857
|
-
summary: "Stop serving the draft preview"
|
|
74207
|
+
arguments: ["<version>", "-m <message>"],
|
|
74208
|
+
summary: "Switch to any version: a new version with its files, live like a push; no record is deleted"
|
|
73858
74209
|
},
|
|
73859
74210
|
{
|
|
73860
74211
|
command: "laze app collections define",
|
|
73861
74212
|
operation: "defineCollection",
|
|
73862
|
-
arguments: ["<name>", "--fields <json|@file>"
|
|
74213
|
+
arguments: ["<name>", "--fields <json|@file>"],
|
|
73863
74214
|
summary: "Create or migrate a collection's schema"
|
|
73864
74215
|
},
|
|
73865
74216
|
{
|
|
73866
74217
|
command: "laze app collections list",
|
|
73867
74218
|
operation: "listCollections",
|
|
73868
|
-
arguments: [
|
|
74219
|
+
arguments: [],
|
|
73869
74220
|
summary: "Show each collection's schema and version"
|
|
73870
74221
|
},
|
|
73871
74222
|
{
|
|
73872
74223
|
command: "laze app views list",
|
|
73873
74224
|
operation: "listViews",
|
|
73874
|
-
arguments: [
|
|
74225
|
+
arguments: [],
|
|
73875
74226
|
summary: `Show each collection's Data viewer views: table, list, board (groupBy a select) or calendar (dateField a date); declare them under "views" in laze.app.json`
|
|
73876
74227
|
},
|
|
73877
74228
|
{
|
|
73878
74229
|
command: "laze app views rm",
|
|
73879
74230
|
operation: "deleteView",
|
|
73880
|
-
arguments: ["<viewId>"
|
|
74231
|
+
arguments: ["<viewId>"],
|
|
73881
74232
|
summary: "Delete a Data viewer view by the id `laze app views list` prints; a collection keeps one"
|
|
73882
74233
|
},
|
|
73883
74234
|
{
|
|
@@ -73896,38 +74247,38 @@ var appCliCommands = [
|
|
|
73896
74247
|
},
|
|
73897
74248
|
{
|
|
73898
74249
|
command: "laze app seed",
|
|
73899
|
-
operation: "
|
|
74250
|
+
operation: "seedData",
|
|
73900
74251
|
arguments: ["--records <json|@file>"],
|
|
73901
|
-
summary: "
|
|
74252
|
+
summary: "Load starter records (default: the manifest's seed) into collections that hold none yet; nothing is emptied"
|
|
73902
74253
|
},
|
|
73903
74254
|
{
|
|
73904
74255
|
command: "laze app records list",
|
|
73905
74256
|
operation: "listRecords",
|
|
73906
|
-
arguments: ["<collection>", "--filter <expr>", "--sort <fields>", "--page <n>"
|
|
74257
|
+
arguments: ["<collection>", "--filter <expr>", "--sort <fields>", "--page <n>"],
|
|
73907
74258
|
summary: "List records, filtered and sorted"
|
|
73908
74259
|
},
|
|
73909
74260
|
{
|
|
73910
74261
|
command: "laze app records write",
|
|
73911
74262
|
operation: "writeRecord",
|
|
73912
|
-
arguments: ["<collection>", "[record-id]", "--data <json>"
|
|
74263
|
+
arguments: ["<collection>", "[record-id]", "--data <json>"],
|
|
73913
74264
|
summary: "Create a record, or update one by id"
|
|
73914
74265
|
},
|
|
73915
74266
|
{
|
|
73916
74267
|
command: "laze app records delete",
|
|
73917
74268
|
operation: "deleteRecord",
|
|
73918
|
-
arguments: ["<collection>", "<record-id>"
|
|
74269
|
+
arguments: ["<collection>", "<record-id>"],
|
|
73919
74270
|
summary: "Delete a record"
|
|
73920
74271
|
},
|
|
73921
74272
|
{
|
|
73922
74273
|
command: "laze app export",
|
|
73923
74274
|
operation: "exportRecords",
|
|
73924
|
-
arguments: ["<collection>", "--format csv|json", "--out <file>"
|
|
74275
|
+
arguments: ["<collection>", "--format csv|json", "--out <file>"],
|
|
73925
74276
|
summary: "Write a collection's records as CSV (or JSON)"
|
|
73926
74277
|
},
|
|
73927
74278
|
{
|
|
73928
74279
|
command: "laze app import",
|
|
73929
74280
|
operation: "importRecords",
|
|
73930
|
-
arguments: ["[app]", "<collection>", "<file.csv>", "--
|
|
74281
|
+
arguments: ["[app]", "<collection>", "<file.csv>", "--dry-run", "--refused <file>"],
|
|
73931
74282
|
summary: "Create records from a CSV (5 MB and 10,000 rows at most); columns match fields by name, rows that break the schema are skipped and listed, --refused writes them with a reason column"
|
|
73932
74283
|
}
|
|
73933
74284
|
];
|
|
@@ -74650,7 +75001,7 @@ var publicApps = async ({ context, args, signed: signed2 }) => {
|
|
|
74650
75001
|
};
|
|
74651
75002
|
function backupsText({ name: name3, status: status9 }) {
|
|
74652
75003
|
const window2 = status9.from && status9.to ? `A restore can go back to any time from ${status9.from} to ${status9.to}.` : "Nothing to restore to yet.";
|
|
74653
|
-
const replicating = status9.replicating ? "The
|
|
75004
|
+
const replicating = status9.replicating ? "The app data replicates to object storage." : "The app data does not replicate on this host.";
|
|
74654
75005
|
const restores = status9.restores.map(
|
|
74655
75006
|
(entry) => ` ${entry.id} ${entry.to ? `to ${entry.to}` : `undid ${entry.undid ?? ""}`}
|
|
74656
75007
|
`
|
|
@@ -74674,7 +75025,7 @@ var restore = async ({ context, args, open: open3 }) => {
|
|
|
74674
75025
|
appId,
|
|
74675
75026
|
...to ? { to } : { undo }
|
|
74676
75027
|
});
|
|
74677
|
-
const text2 = done.to ? `${name3}'s
|
|
75028
|
+
const text2 = done.to ? `${name3}'s data is back to ${done.to} (${done.id}). laze app restore --undo ${done.id} undoes it.
|
|
74678
75029
|
` : `${name3}'s data from before ${done.undid ?? undo} is back (${done.id}).
|
|
74679
75030
|
`;
|
|
74680
75031
|
print2({ context, args, value: done, text: text2 });
|
|
@@ -74919,7 +75270,7 @@ async function add({ context, args, open: open3, word: word3 }) {
|
|
|
74919
75270
|
const { client, appId, name: name3 } = await open3();
|
|
74920
75271
|
const trigger = await client.post("/api/apps/triggers/add", { appId, ...body });
|
|
74921
75272
|
const text2 = `Added a trigger on ${name3}:
|
|
74922
|
-
${triggerLine(trigger)}Matching changes to
|
|
75273
|
+
${triggerLine(trigger)}Matching changes to ${word3} records wake ${trigger.agentName} in ${trigger.channelName}.
|
|
74923
75274
|
`;
|
|
74924
75275
|
print4({ context, args, value: trigger, text: text2 });
|
|
74925
75276
|
}
|
|
@@ -75015,11 +75366,15 @@ async function appClient({
|
|
|
75015
75366
|
const turn = await turnTokenOf({ context, args, client, agent: profile.kind === "agent" });
|
|
75016
75367
|
return turn ? client.withHeaders({ "x-laze-turn": turn }) : client;
|
|
75017
75368
|
}
|
|
75018
|
-
function
|
|
75019
|
-
|
|
75020
|
-
|
|
75021
|
-
|
|
75022
|
-
|
|
75369
|
+
function noteRetiredFlags({ context, args }) {
|
|
75370
|
+
if (args.flags["no-publish"] !== void 0) {
|
|
75371
|
+
context.err(
|
|
75372
|
+
"laze: --no-publish is no longer needed and is ignored: every push is the live app. laze app revert <version> switches back.\n"
|
|
75373
|
+
);
|
|
75374
|
+
}
|
|
75375
|
+
if (args.flags.site !== void 0) {
|
|
75376
|
+
context.err("laze: --site is ignored: an app has one live version and one set of data.\n");
|
|
75377
|
+
}
|
|
75023
75378
|
}
|
|
75024
75379
|
function folderOf({ context, word: word3 }) {
|
|
75025
75380
|
return resolve6(context.cwd, word3 ?? ".");
|
|
@@ -75141,7 +75496,7 @@ var appList = async ({ context, args }) => {
|
|
|
75141
75496
|
const client = await appClient({ context, args });
|
|
75142
75497
|
const apps = await client.get("/api/apps");
|
|
75143
75498
|
const lines2 = apps.map((app2) => {
|
|
75144
|
-
const state = app2.publishedVersion ? `live (${app2.visibility})` : "
|
|
75499
|
+
const state = app2.publishedVersion ? `live (${app2.visibility})` : "not live";
|
|
75145
75500
|
return `${app2.slug} ${app2.id} ${state} ${app2.publishedUrl}
|
|
75146
75501
|
`;
|
|
75147
75502
|
});
|
|
@@ -75187,70 +75542,55 @@ var appPush = async ({ context, args }) => {
|
|
|
75187
75542
|
"These scripts would fail in the browser, so the app would show a blank or broken page; fix them and push again (app_script_invalid). Nothing was uploaded."
|
|
75188
75543
|
);
|
|
75189
75544
|
}
|
|
75545
|
+
noteRetiredFlags({ context, args });
|
|
75190
75546
|
const client = await appClient({ context, args });
|
|
75191
75547
|
const appId = await appIdOf({ client, args, folder });
|
|
75192
75548
|
for (const [name3, collection] of Object.entries(manifest?.collections ?? {})) {
|
|
75193
75549
|
await client.post("/api/apps/collections/define", {
|
|
75194
75550
|
appId,
|
|
75195
|
-
site: "draft",
|
|
75196
75551
|
name: name3,
|
|
75197
75552
|
fields: collection.fields,
|
|
75198
75553
|
...collection.rules ? { rules: collection.rules } : {}
|
|
75199
75554
|
});
|
|
75200
75555
|
}
|
|
75201
75556
|
for (const view of manifest?.views ?? []) {
|
|
75202
|
-
await client.post("/api/apps/views/define", { appId,
|
|
75557
|
+
await client.post("/api/apps/views/define", { appId, view });
|
|
75203
75558
|
}
|
|
75204
|
-
const
|
|
75559
|
+
const pushed = await client.post("/api/apps/commit", {
|
|
75205
75560
|
appId,
|
|
75206
75561
|
message: message2,
|
|
75207
75562
|
files: files2.map(({ bytes: _bytes, ...file3 }) => file3),
|
|
75208
75563
|
...manifest?.users ? { users: manifest.users } : {},
|
|
75209
75564
|
...manifest?.functions ? { functions: manifest.functions } : {}
|
|
75210
75565
|
});
|
|
75211
|
-
const
|
|
75212
|
-
|
|
75213
|
-
await client.post("/api/apps/seed", { appId, records: manifest.seed });
|
|
75214
|
-
}
|
|
75215
|
-
const published = await publishUnlessHeld({ client, args, appId, version: version2.version });
|
|
75566
|
+
const seeded = args.flags.seed && manifest ? await client.post("/api/apps/seed", { appId, records: manifest.seed }) : null;
|
|
75567
|
+
const { publish, ...version2 } = pushed;
|
|
75216
75568
|
print5({
|
|
75217
75569
|
context,
|
|
75218
75570
|
args,
|
|
75219
|
-
value: { version: version2, app:
|
|
75571
|
+
value: { version: version2, app: publish.app, publish },
|
|
75220
75572
|
text: `Pushed ${version2.version.slice(0, 7)} "${version2.message}" (${files2.length} files)
|
|
75221
|
-
|
|
75573
|
+
` + (seeded ? seedLine(seeded) : "") + publishLine(publish)
|
|
75222
75574
|
});
|
|
75223
75575
|
};
|
|
75224
|
-
|
|
75225
|
-
|
|
75226
|
-
|
|
75227
|
-
|
|
75228
|
-
|
|
75229
|
-
|
|
75230
|
-
|
|
75231
|
-
|
|
75576
|
+
function seedLine(seeded) {
|
|
75577
|
+
const created = Object.entries(seeded.created).map(([name3, count5]) => `${count5} in ${name3}`);
|
|
75578
|
+
const parts = [
|
|
75579
|
+
created.length ? `Loaded starter records: ${created.join(", ")}.` : "",
|
|
75580
|
+
seeded.skipped.length ? `Left ${seeded.skipped.join(", ")} as it was: it already holds records.` : ""
|
|
75581
|
+
].filter(Boolean);
|
|
75582
|
+
return parts.length ? `${parts.join(" ")}
|
|
75583
|
+
` : "No starter records to load.\n";
|
|
75232
75584
|
}
|
|
75233
|
-
|
|
75234
|
-
|
|
75235
|
-
|
|
75236
|
-
}) {
|
|
75237
|
-
if (!published) {
|
|
75238
|
-
return `Draft preview: ${app2.draftUrl}
|
|
75239
|
-
Not published: people still see the app as it was. Run laze app publish when it is ready.
|
|
75240
|
-
`;
|
|
75585
|
+
var appUrl = async ({ context, args }) => {
|
|
75586
|
+
if (args.words[1] === "preview") {
|
|
75587
|
+
context.err("laze: laze app preview is now laze app url: every push is the live app.\n");
|
|
75241
75588
|
}
|
|
75242
|
-
|
|
75243
|
-
return publishLine(published) + (live ? "" : `Draft preview: ${app2.draftUrl}
|
|
75244
|
-
`);
|
|
75245
|
-
}
|
|
75246
|
-
var appPreview = async ({ context, args }) => {
|
|
75589
|
+
noteRetiredFlags({ context, args });
|
|
75247
75590
|
const client = await appClient({ context, args });
|
|
75248
75591
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
|
|
75249
|
-
const
|
|
75250
|
-
|
|
75251
|
-
site: siteOf(args, "draft")
|
|
75252
|
-
});
|
|
75253
|
-
print5({ context, args, value: preview, text: `${preview.url}
|
|
75592
|
+
const address = await client.post("/api/apps/preview", { appId });
|
|
75593
|
+
print5({ context, args, value: address, text: `${address.url}
|
|
75254
75594
|
` });
|
|
75255
75595
|
};
|
|
75256
75596
|
async function folderClaim({
|
|
@@ -75267,14 +75607,14 @@ var appPull = async ({ context, args }) => {
|
|
|
75267
75607
|
const client = await appClient({ context, args });
|
|
75268
75608
|
const word3 = args.words[2];
|
|
75269
75609
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: word3 }) });
|
|
75270
|
-
|
|
75610
|
+
noteRetiredFlags({ context, args });
|
|
75271
75611
|
let pulled;
|
|
75272
75612
|
try {
|
|
75273
|
-
pulled = await client.post("/api/apps/pull", { appId
|
|
75613
|
+
pulled = await client.post("/api/apps/pull", { appId });
|
|
75274
75614
|
} catch (error62) {
|
|
75275
75615
|
if (error62 instanceof LazeApiError && error62.code === "app_has_no_version") {
|
|
75276
75616
|
throw new CliUsageError(
|
|
75277
|
-
"
|
|
75617
|
+
"The app has no version yet; laze app push puts the first one live (app_has_no_version)"
|
|
75278
75618
|
);
|
|
75279
75619
|
}
|
|
75280
75620
|
throw error62;
|
|
@@ -75322,7 +75662,7 @@ var appPull = async ({ context, args }) => {
|
|
|
75322
75662
|
context,
|
|
75323
75663
|
args,
|
|
75324
75664
|
value: { ...pulled, folder },
|
|
75325
|
-
text: `Pulled ${pulled.files.length} files of ${pulled.app.name} (
|
|
75665
|
+
text: `Pulled ${pulled.files.length} files of ${pulled.app.name} (version ${pulled.version.slice(0, 7)}) into ${where}
|
|
75326
75666
|
` + recordsHint({ names, slug: pulled.app.slug })
|
|
75327
75667
|
});
|
|
75328
75668
|
};
|
|
@@ -75353,14 +75693,14 @@ var PUBLISH_AUDIENCE = {
|
|
|
75353
75693
|
function publishLine(outcome) {
|
|
75354
75694
|
const { request: request2 } = outcome;
|
|
75355
75695
|
if (request2.status === "pending") {
|
|
75356
|
-
return `Waiting for approval (${request2.id}):
|
|
75696
|
+
return `Waiting for approval (${request2.id}): this change needs a workspace admin's yes before it goes live.
|
|
75357
75697
|
They see a publish card in their Laze feed and on the app's page, and can approve once, for 24 hours or always for this app.
|
|
75358
|
-
|
|
75698
|
+
The app keeps serving the version that was live until then; the request expires after 72 hours.
|
|
75359
75699
|
`;
|
|
75360
75700
|
}
|
|
75361
75701
|
if (request2.status === "denied") return "The publish was denied.\n";
|
|
75362
75702
|
const audience = PUBLISH_AUDIENCE[request2.visibility];
|
|
75363
|
-
return `
|
|
75703
|
+
return `Live for ${audience}: ${outcome.app.publishedUrl}
|
|
75364
75704
|
`;
|
|
75365
75705
|
}
|
|
75366
75706
|
async function versionOf({
|
|
@@ -75381,13 +75721,17 @@ async function versionOf({
|
|
|
75381
75721
|
var appVersions = async ({ context, args }) => {
|
|
75382
75722
|
const client = await appClient({ context, args });
|
|
75383
75723
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
|
|
75384
|
-
const versions = await
|
|
75724
|
+
const [versions, app2] = await Promise.all([
|
|
75725
|
+
client.post("/api/apps/versions", { appId }),
|
|
75726
|
+
client.post("/api/apps/get", { appId })
|
|
75727
|
+
]);
|
|
75728
|
+
const now = Temporal3.Instant.fromEpochMilliseconds(context.nowMs());
|
|
75385
75729
|
print5({
|
|
75386
75730
|
context,
|
|
75387
75731
|
args,
|
|
75388
75732
|
value: versions,
|
|
75389
75733
|
text: versions.map(
|
|
75390
|
-
(version2) => `${versionLine({ version: version2, now
|
|
75734
|
+
(version2) => `${versionLine({ version: version2, now })}${version2.version === app2.publishedVersion ? " [live]" : ""}
|
|
75391
75735
|
`
|
|
75392
75736
|
).join("") || "No versions yet.\n"
|
|
75393
75737
|
});
|
|
@@ -75398,19 +75742,18 @@ var appRevert = async ({ context, args }) => {
|
|
|
75398
75742
|
const client = await appClient({ context, args });
|
|
75399
75743
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
|
|
75400
75744
|
const { message: message2 } = messageOf({ args });
|
|
75401
|
-
|
|
75745
|
+
noteRetiredFlags({ context, args });
|
|
75746
|
+
const pushed = await client.post("/api/apps/revert", {
|
|
75402
75747
|
appId,
|
|
75403
75748
|
version: await versionOf({ client, appId, prefix }),
|
|
75404
75749
|
...message2 ? { message: message2 } : {}
|
|
75405
75750
|
});
|
|
75406
|
-
const app2 = await client.post("/api/apps/get", { appId });
|
|
75407
|
-
const published = await publishUnlessHeld({ client, args, appId, version: version2.version });
|
|
75408
75751
|
print5({
|
|
75409
75752
|
context,
|
|
75410
75753
|
args,
|
|
75411
|
-
value:
|
|
75412
|
-
text: `
|
|
75413
|
-
` +
|
|
75754
|
+
value: pushed,
|
|
75755
|
+
text: `Switched: new version ${pushed.version.slice(0, 7)} "${pushed.message}". No record was deleted; fields added since stay.
|
|
75756
|
+
` + publishLine(pushed.publish)
|
|
75414
75757
|
});
|
|
75415
75758
|
};
|
|
75416
75759
|
var appMakeInternal = async ({ context, args }) => {
|
|
@@ -75444,12 +75787,10 @@ var appName = async ({ context, args }) => {
|
|
|
75444
75787
|
`
|
|
75445
75788
|
});
|
|
75446
75789
|
};
|
|
75447
|
-
var appDiscard = async ({ context
|
|
75448
|
-
|
|
75449
|
-
|
|
75450
|
-
|
|
75451
|
-
print5({ context, args, value: app2, text: `The draft of ${app2.name} is no longer served.
|
|
75452
|
-
` });
|
|
75790
|
+
var appDiscard = async ({ context }) => {
|
|
75791
|
+
context.err(
|
|
75792
|
+
"laze: laze app discard is retired: every push is the live app, so there is no separate copy to discard. Use laze app revert <version> to switch back.\n"
|
|
75793
|
+
);
|
|
75453
75794
|
};
|
|
75454
75795
|
var appCollections = async ({ context, args }) => {
|
|
75455
75796
|
const client = await appClient({ context, args });
|
|
@@ -75460,7 +75801,6 @@ var appCollections = async ({ context, args }) => {
|
|
|
75460
75801
|
if (!name3 || !Array.isArray(fields)) throw new CliUsageError(USAGE5);
|
|
75461
75802
|
const collection = await client.post("/api/apps/collections/define", {
|
|
75462
75803
|
appId,
|
|
75463
|
-
site: siteOf(args, "draft"),
|
|
75464
75804
|
name: name3,
|
|
75465
75805
|
fields
|
|
75466
75806
|
});
|
|
@@ -75472,10 +75812,7 @@ var appCollections = async ({ context, args }) => {
|
|
|
75472
75812
|
`
|
|
75473
75813
|
});
|
|
75474
75814
|
}
|
|
75475
|
-
const collections = await client.post("/api/apps/collections", {
|
|
75476
|
-
appId,
|
|
75477
|
-
site: siteOf(args, "draft")
|
|
75478
|
-
});
|
|
75815
|
+
const collections = await client.post("/api/apps/collections", { appId });
|
|
75479
75816
|
const lines2 = collections.map(
|
|
75480
75817
|
(collection) => `${collection.name} (v${collection.version}): ${collection.schema.fields.map((field) => `${field.name}:${field.type}${field.required ? "!" : ""}`).join(", ")}
|
|
75481
75818
|
`
|
|
@@ -75484,27 +75821,21 @@ var appCollections = async ({ context, args }) => {
|
|
|
75484
75821
|
};
|
|
75485
75822
|
var appViewRemove = async ({ context, args }) => {
|
|
75486
75823
|
const viewId = args.words[3];
|
|
75487
|
-
if (!viewId)
|
|
75488
|
-
throw new CliUsageError("Usage: laze app views rm <viewId> [--site draft|published]");
|
|
75824
|
+
if (!viewId) throw new CliUsageError("Usage: laze app views rm <viewId>");
|
|
75489
75825
|
const client = await appClient({ context, args });
|
|
75490
75826
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
|
|
75491
|
-
const site = siteOf(args, "draft");
|
|
75492
75827
|
const answer4 = await client.post("/api/apps/views/delete", {
|
|
75493
75828
|
appId,
|
|
75494
|
-
site,
|
|
75495
75829
|
viewId
|
|
75496
75830
|
});
|
|
75497
|
-
print5({ context, args, value: answer4, text: `Deleted view ${viewId}
|
|
75831
|
+
print5({ context, args, value: answer4, text: `Deleted view ${viewId}.
|
|
75498
75832
|
` });
|
|
75499
75833
|
};
|
|
75500
75834
|
var appViews = async ({ context, args }) => {
|
|
75501
75835
|
if (args.words[2] === "rm") return appViewRemove({ context, args });
|
|
75502
75836
|
const client = await appClient({ context, args });
|
|
75503
75837
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
|
|
75504
|
-
const views = await client.post("/api/apps/views", {
|
|
75505
|
-
appId,
|
|
75506
|
-
site: siteOf(args, "draft")
|
|
75507
|
-
});
|
|
75838
|
+
const views = await client.post("/api/apps/views", { appId });
|
|
75508
75839
|
const lines2 = views.map(
|
|
75509
75840
|
(view) => `${view.collection} ${view.name} ${view.type}${view.groupBy ? ` by ${view.groupBy}` : ""}${view.dateField ? ` on ${view.dateField}` : ""} ${view.id}
|
|
75510
75841
|
`
|
|
@@ -75551,12 +75882,11 @@ var appSeed = async ({ context, args }) => {
|
|
|
75551
75882
|
const client = await appClient({ context, args });
|
|
75552
75883
|
const appId = await appIdOf({ client, args, folder });
|
|
75553
75884
|
const records = await jsonFlag({ context, args, name: "records" }) ?? (await readManifest(folder))?.seed ?? {};
|
|
75554
|
-
await client.post("/api/apps/seed", { appId, records });
|
|
75555
|
-
|
|
75885
|
+
const seeded = await client.post("/api/apps/seed", { appId, records });
|
|
75886
|
+
print5({ context, args, value: seeded, text: seedLine(seeded) });
|
|
75556
75887
|
};
|
|
75557
|
-
function recordPageText({ records
|
|
75558
|
-
if (records.totalItems === 0) return
|
|
75559
|
-
`;
|
|
75888
|
+
function recordPageText({ records }) {
|
|
75889
|
+
if (records.totalItems === 0) return "No records yet.\n";
|
|
75560
75890
|
const lines2 = records.items.map((record4) => JSON.stringify(record4)).join("\n");
|
|
75561
75891
|
return `${lines2}
|
|
75562
75892
|
(page ${records.page} of ${records.totalPages}, ${records.totalItems} records)
|
|
@@ -75567,7 +75897,7 @@ var appRecords = async ({ context, args }) => {
|
|
|
75567
75897
|
if (!collection) throw new CliUsageError(USAGE5);
|
|
75568
75898
|
const client = await appClient({ context, args });
|
|
75569
75899
|
const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
|
|
75570
|
-
|
|
75900
|
+
noteRetiredFlags({ context, args });
|
|
75571
75901
|
if (action === "write") {
|
|
75572
75902
|
const data = await jsonFlag({ context, args, name: "data" });
|
|
75573
75903
|
const recordId = args.words[4];
|
|
@@ -75575,7 +75905,6 @@ var appRecords = async ({ context, args }) => {
|
|
|
75575
75905
|
"/api/apps/records/write",
|
|
75576
75906
|
{
|
|
75577
75907
|
appId,
|
|
75578
|
-
site,
|
|
75579
75908
|
collection,
|
|
75580
75909
|
data,
|
|
75581
75910
|
...recordId ? { recordId } : {}
|
|
@@ -75587,7 +75916,7 @@ var appRecords = async ({ context, args }) => {
|
|
|
75587
75916
|
if (action === "delete") {
|
|
75588
75917
|
const recordId = args.words[4];
|
|
75589
75918
|
if (!recordId) throw new CliUsageError(USAGE5);
|
|
75590
|
-
await client.post("/api/apps/records/delete", { appId,
|
|
75919
|
+
await client.post("/api/apps/records/delete", { appId, collection, recordId });
|
|
75591
75920
|
return context.out(`Deleted ${recordId}
|
|
75592
75921
|
`);
|
|
75593
75922
|
}
|
|
@@ -75596,7 +75925,6 @@ var appRecords = async ({ context, args }) => {
|
|
|
75596
75925
|
const sort = flagText({ args, name: "sort" });
|
|
75597
75926
|
const records = await client.post("/api/apps/records", {
|
|
75598
75927
|
appId,
|
|
75599
|
-
site,
|
|
75600
75928
|
collection,
|
|
75601
75929
|
page,
|
|
75602
75930
|
...filter ? { filter } : {},
|
|
@@ -75606,7 +75934,7 @@ var appRecords = async ({ context, args }) => {
|
|
|
75606
75934
|
context,
|
|
75607
75935
|
args,
|
|
75608
75936
|
value: records,
|
|
75609
|
-
text: recordPageText({ records
|
|
75937
|
+
text: recordPageText({ records })
|
|
75610
75938
|
});
|
|
75611
75939
|
};
|
|
75612
75940
|
var appExport = async ({ context, args }) => {
|
|
@@ -75617,7 +75945,6 @@ var appExport = async ({ context, args }) => {
|
|
|
75617
75945
|
const exported = await client.post("/api/apps/export", {
|
|
75618
75946
|
appId,
|
|
75619
75947
|
collection,
|
|
75620
|
-
site: siteOf(args, "published"),
|
|
75621
75948
|
format: flagText({ args, name: "format", fallback: "csv" })
|
|
75622
75949
|
});
|
|
75623
75950
|
const out = flagText({ args, name: "out" });
|
|
@@ -75644,7 +75971,6 @@ var appImport = async ({ context, args }) => {
|
|
|
75644
75971
|
const result = await client.post("/api/apps/import", {
|
|
75645
75972
|
appId,
|
|
75646
75973
|
collection,
|
|
75647
|
-
site: siteOf(args, "published"),
|
|
75648
75974
|
csv,
|
|
75649
75975
|
dryRun: Boolean(args.flags["dry-run"])
|
|
75650
75976
|
});
|
|
@@ -75846,7 +76172,7 @@ var appUnpublish = async ({ context, args }) => {
|
|
|
75846
76172
|
context,
|
|
75847
76173
|
args,
|
|
75848
76174
|
value: app2,
|
|
75849
|
-
text: `${app2.name} is
|
|
76175
|
+
text: `${app2.name} is offline. Its data and versions stay; laze app publish brings it back.
|
|
75850
76176
|
`
|
|
75851
76177
|
});
|
|
75852
76178
|
};
|
|
@@ -75913,7 +76239,8 @@ var APP_COMMANDS = {
|
|
|
75913
76239
|
create: appCreate,
|
|
75914
76240
|
list: appList,
|
|
75915
76241
|
push: appPush,
|
|
75916
|
-
|
|
76242
|
+
url: appUrl,
|
|
76243
|
+
preview: appUrl,
|
|
75917
76244
|
pull: appPull,
|
|
75918
76245
|
publish: appPublish,
|
|
75919
76246
|
"make-internal": appMakeInternal,
|
|
@@ -76078,6 +76405,11 @@ async function whoami({ context, args }) {
|
|
|
76078
76405
|
const who = me.kind === "agent" ? `agent ${me.name} (${me.id})` : `${me.name} (${me.id})`;
|
|
76079
76406
|
context.out(`${who} in workspace ${me.workspaceId} at ${profile.url}, profile "${name3}"
|
|
76080
76407
|
`);
|
|
76408
|
+
if (me.language || me.timeZone) {
|
|
76409
|
+
const whose = me.kind === "agent" ? "Owner's language" : "Language";
|
|
76410
|
+
context.out(`${whose} ${me.language ?? "en-US"}, time zone ${me.timeZone ?? "UTC"}
|
|
76411
|
+
`);
|
|
76412
|
+
}
|
|
76081
76413
|
}
|
|
76082
76414
|
async function workspaces({ context, args }) {
|
|
76083
76415
|
const config2 = await context.store.read();
|
|
@@ -76274,7 +76606,7 @@ var BROWSER_TAB_USAGE = [
|
|
|
76274
76606
|
" laze browser tab <tab> one tab: its owner, sharing and page",
|
|
76275
76607
|
" laze browser goto <tab> <url> send the tab to another page",
|
|
76276
76608
|
" laze browser read <tab> the page's address, title and text",
|
|
76277
|
-
" laze browser ask <tab> <what> ask the
|
|
76609
|
+
" laze browser ask <tab> <what> ask the person you work for to sign in or click something there",
|
|
76278
76610
|
" laze browser cdp <tab> a CDP address on the tab's browser",
|
|
76279
76611
|
" laze browser share <tab> private|watch|use who sees the screen and who types into it",
|
|
76280
76612
|
" laze browser close <tab> unpin the tab and close its browser",
|
|
@@ -76314,7 +76646,7 @@ async function openTab({ args, client, channel, print: print9 }) {
|
|
|
76314
76646
|
tab,
|
|
76315
76647
|
`Opened ${tab.title} (${tab.id}) in ${tab.ownerName}'s browser, pinned as a tab of the conversation.
|
|
76316
76648
|
Everyone in it watches the screen live. Page: ${tab.url}
|
|
76317
|
-
If the site needs a sign-in, run \`laze browser ask ${tab.id} "Sign in to <site>"\` and wait for
|
|
76649
|
+
If the site needs a sign-in, run \`laze browser ask ${tab.id} "Sign in to <site>"\` and wait for their Done.
|
|
76318
76650
|
`
|
|
76319
76651
|
);
|
|
76320
76652
|
}
|
|
@@ -76354,7 +76686,7 @@ async function askOnTab({ args, client, channel, print: print9 }) {
|
|
|
76354
76686
|
const asked = await client.post(BROWSER_TAB_PATHS.ask, { tab, text: text2, ...channel });
|
|
76355
76687
|
print9(
|
|
76356
76688
|
asked,
|
|
76357
|
-
`Asked ${asked.ownerName} in the conversation; the tab shows them your request with Done.
|
|
76689
|
+
`Asked ${asked.ask?.userName ?? asked.ownerName} in the conversation; the tab shows them your request with Done.
|
|
76358
76690
|
Wait for their "Done" message before you go on in ${asked.title}.
|
|
76359
76691
|
`
|
|
76360
76692
|
);
|
|
@@ -76879,11 +77211,11 @@ async function setup({ context, args }) {
|
|
|
76879
77211
|
if (machine2.type === "own")
|
|
76880
77212
|
return context.out(
|
|
76881
77213
|
`The browser runs on ${machine2.name}, a person's own machine (${siteLine(machine2)}).
|
|
76882
|
-
The screen link
|
|
77214
|
+
The screen link is posted where you were asked, for its owner. ${next}`
|
|
76883
77215
|
);
|
|
76884
77216
|
context.out(
|
|
76885
77217
|
`${machine2.name} is ${machine2.state} (${siteLine(machine2)}).
|
|
76886
|
-
The screen link
|
|
77218
|
+
The screen link is posted where you were asked once it is ready. ${next}`
|
|
76887
77219
|
);
|
|
76888
77220
|
}
|
|
76889
77221
|
async function cdp({ context, args }) {
|
|
@@ -76977,7 +77309,7 @@ async function screen({ context, args }) {
|
|
|
76977
77309
|
`);
|
|
76978
77310
|
context.out(
|
|
76979
77311
|
link.url ? `${link.url}
|
|
76980
|
-
` : `Sent a fresh screen link for ${link.machine.name}
|
|
77312
|
+
` : `Sent a fresh screen link for ${link.machine.name} where you were asked.
|
|
76981
77313
|
`
|
|
76982
77314
|
);
|
|
76983
77315
|
}
|
|
@@ -78219,6 +78551,11 @@ var browserTabAskDefinition = external_exports.object({
|
|
|
78219
78551
|
text: external_exports.string(),
|
|
78220
78552
|
agentId: external_exports.string().min(1),
|
|
78221
78553
|
agentName: external_exports.string(),
|
|
78554
|
+
/** The person the agent asked, mentioned in the conversation. */
|
|
78555
|
+
userId: external_exports.string().min(1),
|
|
78556
|
+
userName: external_exports.string(),
|
|
78557
|
+
/** Where the sign-in is kept and who can use it, in a sentence for people. */
|
|
78558
|
+
savedIn: external_exports.string(),
|
|
78222
78559
|
at: external_exports.iso.datetime()
|
|
78223
78560
|
});
|
|
78224
78561
|
var browserTabDefinition = external_exports.object({
|
|
@@ -78232,11 +78569,17 @@ var browserTabDefinition = external_exports.object({
|
|
|
78232
78569
|
ownerName: external_exports.string(),
|
|
78233
78570
|
openedBy: browserTabActorDefinition,
|
|
78234
78571
|
sharing: browserTabSharingSchema,
|
|
78235
|
-
/** What an agent asked
|
|
78572
|
+
/** What an agent asked a person to do in the tab, until someone who may answer presses Done. */
|
|
78236
78573
|
ask: browserTabAskDefinition.nullable(),
|
|
78237
78574
|
createdAt: external_exports.iso.datetime(),
|
|
78238
|
-
/** What the reader may do: see the screen, type into it, change the tab
|
|
78239
|
-
|
|
78575
|
+
/** What the reader may do: see the screen, type into it, change the tab; asked: the open
|
|
78576
|
+
* request names them. */
|
|
78577
|
+
you: external_exports.object({
|
|
78578
|
+
see: external_exports.boolean(),
|
|
78579
|
+
type: external_exports.boolean(),
|
|
78580
|
+
owner: external_exports.boolean(),
|
|
78581
|
+
asked: external_exports.boolean()
|
|
78582
|
+
})
|
|
78240
78583
|
});
|
|
78241
78584
|
var browserTabSchema = browserTabDefinition;
|
|
78242
78585
|
var browserTabListDefinition = external_exports.object({ tabs: external_exports.array(browserTabDefinition) });
|
|
@@ -79099,7 +79442,7 @@ var dedicatedIpKeyReleasedDefinition = external_exports.object({
|
|
|
79099
79442
|
});
|
|
79100
79443
|
|
|
79101
79444
|
// ../../modules/compute/contract/src/own-machine-ssh.ts
|
|
79102
|
-
var
|
|
79445
|
+
var workspaceIdSchema16 = external_exports.string().min(1).max(64);
|
|
79103
79446
|
var machineRefText = external_exports.string().min(1).max(64);
|
|
79104
79447
|
var sshHostKeySchema = external_exports.string().regex(/^SHA256:[A-Za-z0-9+/]{43}$/);
|
|
79105
79448
|
function sshTargetText({ target }) {
|
|
@@ -79121,7 +79464,7 @@ var machineSshDefinition = external_exports.object({
|
|
|
79121
79464
|
});
|
|
79122
79465
|
var machineSshSchema = machineSshDefinition;
|
|
79123
79466
|
var connectSshDefinition = external_exports.object({
|
|
79124
|
-
workspaceId:
|
|
79467
|
+
workspaceId: workspaceIdSchema16,
|
|
79125
79468
|
/** Checked by `checkMachineName`, so a refusal reads as a sentence. */
|
|
79126
79469
|
name: external_exports.string().max(200),
|
|
79127
79470
|
/** `user@host[:port]`, checked by `parseSshTarget`. */
|
|
@@ -79130,7 +79473,7 @@ var connectSshDefinition = external_exports.object({
|
|
|
79130
79473
|
var connectSshMachineInputSchema = connectSshDefinition;
|
|
79131
79474
|
var restConnectSshDefinition = connectSshDefinition.omit({ workspaceId: true });
|
|
79132
79475
|
var trustHostKeyDefinition = external_exports.object({
|
|
79133
|
-
workspaceId:
|
|
79476
|
+
workspaceId: workspaceIdSchema16,
|
|
79134
79477
|
machine: machineRefText,
|
|
79135
79478
|
hostKey: sshHostKeySchema
|
|
79136
79479
|
});
|
|
@@ -79138,7 +79481,7 @@ var trustHostKeyInputSchema = trustHostKeyDefinition;
|
|
|
79138
79481
|
var restTrustHostKeyDefinition = trustHostKeyDefinition.omit({ workspaceId: true });
|
|
79139
79482
|
|
|
79140
79483
|
// ../../modules/compute/contract/src/own-machine-whatsapp.ts
|
|
79141
|
-
var
|
|
79484
|
+
var workspaceIdSchema17 = external_exports.string().min(1).max(64);
|
|
79142
79485
|
var machineRefText2 = external_exports.string().min(1).max(64);
|
|
79143
79486
|
var WHATSAPP_TEXT_MAX = 4096;
|
|
79144
79487
|
var WHATSAPP_LIMIT_MAX = 200;
|
|
@@ -79175,25 +79518,25 @@ var messagesResultDefinition = external_exports.object({
|
|
|
79175
79518
|
var limitSchema = external_exports.number().int().min(1).max(WHATSAPP_LIMIT_MAX);
|
|
79176
79519
|
var chatRefSchema = external_exports.string().trim().min(1).max(200);
|
|
79177
79520
|
var chatsInputDefinition = external_exports.object({
|
|
79178
|
-
workspaceId:
|
|
79521
|
+
workspaceId: workspaceIdSchema17,
|
|
79179
79522
|
machine: machineRefText2,
|
|
79180
79523
|
limit: limitSchema.optional()
|
|
79181
79524
|
});
|
|
79182
79525
|
var readInputDefinition = external_exports.object({
|
|
79183
|
-
workspaceId:
|
|
79526
|
+
workspaceId: workspaceIdSchema17,
|
|
79184
79527
|
machine: machineRefText2,
|
|
79185
79528
|
/** A chat id, a phone number or a contact or group name. */
|
|
79186
79529
|
chat: chatRefSchema,
|
|
79187
79530
|
limit: limitSchema.optional()
|
|
79188
79531
|
});
|
|
79189
79532
|
var sendInputDefinition = external_exports.object({
|
|
79190
|
-
workspaceId:
|
|
79533
|
+
workspaceId: workspaceIdSchema17,
|
|
79191
79534
|
machine: machineRefText2,
|
|
79192
79535
|
chat: chatRefSchema,
|
|
79193
79536
|
text: external_exports.string().trim().min(1).max(WHATSAPP_TEXT_MAX)
|
|
79194
79537
|
});
|
|
79195
79538
|
var sendStatusInputDefinition = external_exports.object({
|
|
79196
|
-
workspaceId:
|
|
79539
|
+
workspaceId: workspaceIdSchema17,
|
|
79197
79540
|
sendId: external_exports.string().min(1).max(64),
|
|
79198
79541
|
/** Wait up to this long for the owner's answer; 0 answers at once. */
|
|
79199
79542
|
waitSeconds: external_exports.number().int().min(0).max(WHATSAPP_STATUS_WAIT_MAX_SECONDS).default(0)
|
|
@@ -79231,7 +79574,7 @@ var whatsappPairingDefinition = external_exports.object({
|
|
|
79231
79574
|
});
|
|
79232
79575
|
var whatsappPairingSchema = whatsappPairingDefinition;
|
|
79233
79576
|
var pairingRefDefinition = external_exports.object({
|
|
79234
|
-
workspaceId:
|
|
79577
|
+
workspaceId: workspaceIdSchema17,
|
|
79235
79578
|
pairingId: external_exports.string().min(1).max(64)
|
|
79236
79579
|
});
|
|
79237
79580
|
var whatsappPairingRefSchema = pairingRefDefinition;
|
|
@@ -79252,7 +79595,7 @@ var COMPUTE_WHATSAPP_REST_PATHS = {
|
|
|
79252
79595
|
};
|
|
79253
79596
|
|
|
79254
79597
|
// ../../modules/compute/contract/src/own-machine.ts
|
|
79255
|
-
var
|
|
79598
|
+
var workspaceIdSchema18 = external_exports.string().min(1).max(64);
|
|
79256
79599
|
var machineRefText3 = external_exports.string().min(1).max(64);
|
|
79257
79600
|
var machineBrowserDefinition = external_exports.object({
|
|
79258
79601
|
ready: external_exports.boolean(),
|
|
@@ -79285,7 +79628,7 @@ var machineHealthDefinition = external_exports.object({
|
|
|
79285
79628
|
});
|
|
79286
79629
|
var machineHealthSchema = machineHealthDefinition;
|
|
79287
79630
|
var connectOwnDefinition = external_exports.object({
|
|
79288
|
-
workspaceId:
|
|
79631
|
+
workspaceId: workspaceIdSchema18,
|
|
79289
79632
|
/** Checked by `checkMachineName`, so a refusal reads as a sentence. */
|
|
79290
79633
|
name: external_exports.string().max(200)
|
|
79291
79634
|
});
|
|
@@ -79293,7 +79636,7 @@ var connectOwnMachineInputSchema = connectOwnDefinition;
|
|
|
79293
79636
|
var MACHINE_EXEC_MAX_SECONDS = 240;
|
|
79294
79637
|
var MACHINE_EXEC_OUTPUT_BYTES = 1024 * 1024;
|
|
79295
79638
|
var execDefinition = external_exports.object({
|
|
79296
|
-
workspaceId:
|
|
79639
|
+
workspaceId: workspaceIdSchema18,
|
|
79297
79640
|
machine: machineRefText3,
|
|
79298
79641
|
command: external_exports.string().min(1).max(64 * 1024),
|
|
79299
79642
|
timeoutSeconds: external_exports.number().int().min(1).max(MACHINE_EXEC_MAX_SECONDS).optional(),
|
|
@@ -79365,14 +79708,14 @@ function gigabytes(bytes) {
|
|
|
79365
79708
|
}
|
|
79366
79709
|
var hostWhenOfflineSchema = external_exports.enum(["wait", "sandbox"]);
|
|
79367
79710
|
var hostAgentDefinition = external_exports.object({
|
|
79368
|
-
workspaceId:
|
|
79711
|
+
workspaceId: workspaceIdSchema18,
|
|
79369
79712
|
machine: machineRefText3,
|
|
79370
79713
|
agentId: external_exports.string().min(1).max(64),
|
|
79371
79714
|
whenOffline: hostWhenOfflineSchema.default("wait")
|
|
79372
79715
|
});
|
|
79373
79716
|
var hostAgentInputSchema = hostAgentDefinition;
|
|
79374
79717
|
var unhostAgentDefinition = external_exports.object({
|
|
79375
|
-
workspaceId:
|
|
79718
|
+
workspaceId: workspaceIdSchema18,
|
|
79376
79719
|
agentId: external_exports.string().min(1).max(64)
|
|
79377
79720
|
});
|
|
79378
79721
|
var unhostAgentInputSchema = unhostAgentDefinition;
|
|
@@ -79391,8 +79734,8 @@ var agentHostGrantDefinition = external_exports.object({
|
|
|
79391
79734
|
});
|
|
79392
79735
|
|
|
79393
79736
|
// ../../modules/compute/contract/src/compute.ts
|
|
79394
|
-
var
|
|
79395
|
-
var
|
|
79737
|
+
var idSchema20 = external_exports.string().min(1).max(64);
|
|
79738
|
+
var workspaceIdSchema19 = external_exports.string().min(1).max(64);
|
|
79396
79739
|
var machineStateSchema = external_exports.enum([
|
|
79397
79740
|
"starting",
|
|
79398
79741
|
"ready",
|
|
@@ -79413,24 +79756,24 @@ var machinePriceDefinition = external_exports.object({
|
|
|
79413
79756
|
asleepMonthUsd: external_exports.number()
|
|
79414
79757
|
});
|
|
79415
79758
|
var machineGranteeKindSchema = external_exports.enum(["member", "agent"]);
|
|
79416
|
-
var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id:
|
|
79759
|
+
var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id: idSchema20 });
|
|
79417
79760
|
var machineGrantDefinition = external_exports.object({
|
|
79418
79761
|
kind: machineGranteeKindSchema,
|
|
79419
|
-
id:
|
|
79420
|
-
grantedByUserId:
|
|
79762
|
+
id: idSchema20,
|
|
79763
|
+
grantedByUserId: idSchema20,
|
|
79421
79764
|
grantedAt: external_exports.iso.datetime()
|
|
79422
79765
|
});
|
|
79423
79766
|
var machineDefinition = external_exports.object({
|
|
79424
|
-
id:
|
|
79425
|
-
workspaceId:
|
|
79767
|
+
id: idSchema20,
|
|
79768
|
+
workspaceId: workspaceIdSchema19,
|
|
79426
79769
|
name: external_exports.string(),
|
|
79427
79770
|
type: machineTypeSchema,
|
|
79428
79771
|
zone: external_exports.string(),
|
|
79429
79772
|
state: machineStateSchema,
|
|
79430
|
-
ownerUserId:
|
|
79431
|
-
requesterUserId:
|
|
79432
|
-
renterAgentId:
|
|
79433
|
-
channelId:
|
|
79773
|
+
ownerUserId: idSchema20,
|
|
79774
|
+
requesterUserId: idSchema20,
|
|
79775
|
+
renterAgentId: idSchema20.nullable(),
|
|
79776
|
+
channelId: idSchema20.nullable(),
|
|
79434
79777
|
ipAddress: external_exports.string().nullable(),
|
|
79435
79778
|
sites: external_exports.array(machineSiteDefinition),
|
|
79436
79779
|
/** Members and agents the owner shared the machine with, beyond the owner's own agents. */
|
|
@@ -79462,7 +79805,7 @@ var machineDefinition = external_exports.object({
|
|
|
79462
79805
|
/** The owner's agents set to run on this own machine. */
|
|
79463
79806
|
hostedAgents: external_exports.array(
|
|
79464
79807
|
external_exports.object({
|
|
79465
|
-
id:
|
|
79808
|
+
id: idSchema20,
|
|
79466
79809
|
name: external_exports.string(),
|
|
79467
79810
|
whenOffline: external_exports.enum(["wait", "sandbox"])
|
|
79468
79811
|
})
|
|
@@ -79473,23 +79816,23 @@ var machineDefinition = external_exports.object({
|
|
|
79473
79816
|
var machineSchema = machineDefinition;
|
|
79474
79817
|
var computeStatusDefinition = external_exports.object({ available: external_exports.boolean() });
|
|
79475
79818
|
var computeStatusSchema = computeStatusDefinition;
|
|
79476
|
-
var workspaceInputDefinition2 = external_exports.object({ workspaceId:
|
|
79819
|
+
var workspaceInputDefinition2 = external_exports.object({ workspaceId: workspaceIdSchema19 });
|
|
79477
79820
|
var computeWorkspaceInputSchema = workspaceInputDefinition2;
|
|
79478
79821
|
var machineRefDefinition = external_exports.object({
|
|
79479
|
-
workspaceId:
|
|
79822
|
+
workspaceId: workspaceIdSchema19,
|
|
79480
79823
|
machine: external_exports.string().min(1).max(64)
|
|
79481
79824
|
});
|
|
79482
79825
|
var machineRefSchema = machineRefDefinition;
|
|
79483
79826
|
var MACHINE_NAME_MAX = 40;
|
|
79484
79827
|
var machineNameSchema = external_exports.string().min(2).max(MACHINE_NAME_MAX).regex(/^[a-z0-9][a-z0-9-]*$/, "lowercase letters, digits and dashes");
|
|
79485
79828
|
var renameDefinition = external_exports.object({
|
|
79486
|
-
workspaceId:
|
|
79829
|
+
workspaceId: workspaceIdSchema19,
|
|
79487
79830
|
machine: external_exports.string().min(1).max(64),
|
|
79488
79831
|
name: external_exports.string().max(200)
|
|
79489
79832
|
});
|
|
79490
79833
|
var renameMachineInputSchema = renameDefinition;
|
|
79491
79834
|
var setupBrowserDefinition = external_exports.object({
|
|
79492
|
-
workspaceId:
|
|
79835
|
+
workspaceId: workspaceIdSchema19,
|
|
79493
79836
|
/** The site the person signs in to, as a host or a URL. */
|
|
79494
79837
|
site: external_exports.string().min(1).max(500),
|
|
79495
79838
|
name: machineNameSchema.optional(),
|
|
@@ -79498,29 +79841,29 @@ var setupBrowserDefinition = external_exports.object({
|
|
|
79498
79841
|
});
|
|
79499
79842
|
var setupBrowserInputSchema = setupBrowserDefinition;
|
|
79500
79843
|
var grantDefinition = external_exports.object({
|
|
79501
|
-
workspaceId:
|
|
79844
|
+
workspaceId: workspaceIdSchema19,
|
|
79502
79845
|
machine: external_exports.string().min(1).max(64),
|
|
79503
79846
|
grantee: machineGranteeDefinition
|
|
79504
79847
|
});
|
|
79505
79848
|
var machineGrantInputSchema = grantDefinition;
|
|
79506
79849
|
var setBudgetDefinition = external_exports.object({
|
|
79507
|
-
workspaceId:
|
|
79850
|
+
workspaceId: workspaceIdSchema19,
|
|
79508
79851
|
machine: external_exports.string().min(1).max(64),
|
|
79509
79852
|
budgetUsd: external_exports.number().min(0).max(1e4),
|
|
79510
79853
|
period: machineBudgetPeriodSchema
|
|
79511
79854
|
});
|
|
79512
79855
|
var setMachineBudgetInputSchema = setBudgetDefinition;
|
|
79513
79856
|
var openScreenDefinition = external_exports.object({
|
|
79514
|
-
workspaceId:
|
|
79857
|
+
workspaceId: workspaceIdSchema19,
|
|
79515
79858
|
machine: external_exports.string().min(1).max(64),
|
|
79516
79859
|
site: external_exports.string().min(1).max(500).optional()
|
|
79517
79860
|
});
|
|
79518
79861
|
var openScreenInputSchema = openScreenDefinition;
|
|
79519
|
-
var screenRefDefinition = external_exports.object({ workspaceId:
|
|
79862
|
+
var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema19, sessionId: idSchema20 });
|
|
79520
79863
|
var screenRefSchema = screenRefDefinition;
|
|
79521
79864
|
var screenSessionDefinition = external_exports.object({
|
|
79522
|
-
sessionId:
|
|
79523
|
-
machineId:
|
|
79865
|
+
sessionId: idSchema20,
|
|
79866
|
+
machineId: idSchema20,
|
|
79524
79867
|
machineName: external_exports.string(),
|
|
79525
79868
|
site: external_exports.string().nullable(),
|
|
79526
79869
|
expiresAt: external_exports.iso.datetime(),
|
|
@@ -79554,7 +79897,7 @@ var ownMachineSshConnectDefinition = external_exports.object({
|
|
|
79554
79897
|
publicKey: external_exports.string()
|
|
79555
79898
|
});
|
|
79556
79899
|
var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
|
|
79557
|
-
var reconcileDefinition = external_exports.object({ workspaceId:
|
|
79900
|
+
var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema19, machineId: idSchema20 });
|
|
79558
79901
|
var ComputeApi = moduleApi()("compute");
|
|
79559
79902
|
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();
|
|
79560
79903
|
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();
|
|
@@ -80655,9 +80998,47 @@ async function vaultRun({
|
|
|
80655
80998
|
if (!connection || args.rest.length === 0) throw new CliUsageError(USAGE8);
|
|
80656
80999
|
if (!reason) throw new CliUsageError(`Say why with --reason "<one plain sentence>"
|
|
80657
81000
|
${USAGE8}`);
|
|
81001
|
+
const foreign = commandReferenceNames({ command: args.rest }).find(
|
|
81002
|
+
(name3) => vaultReferenceConnectionName({ name: name3 }) !== connection
|
|
81003
|
+
);
|
|
81004
|
+
if (foreign !== void 0) {
|
|
81005
|
+
const named = vaultReferenceConnectionName({ name: foreign });
|
|
81006
|
+
context.err(
|
|
81007
|
+
`laze vault: the command names {{vault:${foreign}}}, but this run releases only ${connection}, not ${named}. Nothing was asked and the command did not run.
|
|
81008
|
+
`
|
|
81009
|
+
);
|
|
81010
|
+
return 1;
|
|
81011
|
+
}
|
|
80658
81012
|
const released = await vaultRelease({ context, args, connection, reason, command: args.rest });
|
|
80659
81013
|
if ("exitCode" in released) return released.exitCode;
|
|
80660
|
-
|
|
81014
|
+
const prepared = preparedCommand({
|
|
81015
|
+
command: args.rest,
|
|
81016
|
+
released: /* @__PURE__ */ new Map([[connection, released.env]])
|
|
81017
|
+
});
|
|
81018
|
+
if ("refusal" in prepared) {
|
|
81019
|
+
context.err(`${prepared.refusal}
|
|
81020
|
+
`);
|
|
81021
|
+
return 1;
|
|
81022
|
+
}
|
|
81023
|
+
return context.runCommand({ command: prepared.command, env: released.env });
|
|
81024
|
+
}
|
|
81025
|
+
function preparedCommand({
|
|
81026
|
+
command,
|
|
81027
|
+
released
|
|
81028
|
+
}) {
|
|
81029
|
+
for (const [name3, fields] of released) {
|
|
81030
|
+
const [problem] = unusableFieldProblems({ fields });
|
|
81031
|
+
if (problem !== void 0) {
|
|
81032
|
+
return {
|
|
81033
|
+
refusal: `laze vault: ${name3}: ${problem}, so the command did not run. Ask its owner to save the real value on the vault page.`
|
|
81034
|
+
};
|
|
81035
|
+
}
|
|
81036
|
+
}
|
|
81037
|
+
const filled = fillCommandReferences({ command, released });
|
|
81038
|
+
if ("refusal" in filled) {
|
|
81039
|
+
return { refusal: `laze vault: ${filled.refusal}. The command did not run.` };
|
|
81040
|
+
}
|
|
81041
|
+
return filled;
|
|
80661
81042
|
}
|
|
80662
81043
|
|
|
80663
81044
|
// src/services/vault-share-commands.service.ts
|
|
@@ -81607,6 +81988,7 @@ var feedApprovalSchemaDefinition = external_exports.object({
|
|
|
81607
81988
|
"app_access",
|
|
81608
81989
|
"computer",
|
|
81609
81990
|
"agent_join",
|
|
81991
|
+
"agent_transfer",
|
|
81610
81992
|
"vault_share"
|
|
81611
81993
|
]),
|
|
81612
81994
|
requestId: external_exports.string(),
|
|
@@ -81910,7 +82292,7 @@ var feedFileLinkInputSchemaDefinition = external_exports.object({
|
|
|
81910
82292
|
var feedFileLinkInputSchema = feedFileLinkInputSchemaDefinition;
|
|
81911
82293
|
var feedFileLinkSchemaDefinition = external_exports.object({ url: external_exports.string(), expiresAt: external_exports.iso.datetime() });
|
|
81912
82294
|
var feedFileLinkSchema = feedFileLinkSchemaDefinition;
|
|
81913
|
-
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).build();
|
|
82295
|
+
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();
|
|
81914
82296
|
var feedUi = uiTokens("feed");
|
|
81915
82297
|
var FeedNavSlot = feedUi.component("nav");
|
|
81916
82298
|
var FeedDecisionsSlot = feedUi.component("decisions");
|
|
@@ -85889,7 +86271,7 @@ import { dirname as dirname22, join as join24, resolve as resolve15 } from "node
|
|
|
85889
86271
|
// src/rules/vault-manifest.rules.ts
|
|
85890
86272
|
var VARIABLE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
85891
86273
|
var CONNECTION = /^[a-z0-9][a-z0-9-]{0,62}$/;
|
|
85892
|
-
var
|
|
86274
|
+
var REFERENCE2 = /^\{\{vault:([A-Za-z0-9][A-Za-z0-9_/-]{0,127})\}\}$/;
|
|
85893
86275
|
function refOf(name3) {
|
|
85894
86276
|
return name3.split("/").at(-1) ?? name3;
|
|
85895
86277
|
}
|
|
@@ -85914,7 +86296,7 @@ function lineOf4({ line, where }) {
|
|
|
85914
86296
|
if (!VARIABLE.test(variable)) {
|
|
85915
86297
|
throw new CliUsageError(`${where}: not a variable name: ${variable}`);
|
|
85916
86298
|
}
|
|
85917
|
-
const reference =
|
|
86299
|
+
const reference = REFERENCE2.exec(value);
|
|
85918
86300
|
if (reference?.[1]) return { kind: "reference", variable, ref: refOf(reference[1]) };
|
|
85919
86301
|
return { kind: "plain", variable, value: unquoted(value) };
|
|
85920
86302
|
}
|
|
@@ -86272,6 +86654,23 @@ function wrappedCommandOf(args) {
|
|
|
86272
86654
|
if (!encoded) return ["(shell)"];
|
|
86273
86655
|
return [Buffer.from(encoded, "base64").toString("utf8").slice(0, 2e3)];
|
|
86274
86656
|
}
|
|
86657
|
+
async function releasedKeys({
|
|
86658
|
+
context,
|
|
86659
|
+
args,
|
|
86660
|
+
refs,
|
|
86661
|
+
reason,
|
|
86662
|
+
command
|
|
86663
|
+
}) {
|
|
86664
|
+
const byConnection = /* @__PURE__ */ new Map();
|
|
86665
|
+
if (refs.length === 0) return { released: /* @__PURE__ */ new Map(), byConnection };
|
|
86666
|
+
const outcome = await releaseBatch({ context, args, refs, reason, command: [...command] });
|
|
86667
|
+
if ("exitCode" in outcome) return outcome;
|
|
86668
|
+
for (const entry of outcome.entries) {
|
|
86669
|
+
const fields = outcome.released.get(entry.ref)?.fields;
|
|
86670
|
+
if (entry.connection && fields) byConnection.set(entry.connection.name, fields);
|
|
86671
|
+
}
|
|
86672
|
+
return { released: outcome.released, byConnection };
|
|
86673
|
+
}
|
|
86275
86674
|
async function vaultEnv2({
|
|
86276
86675
|
context,
|
|
86277
86676
|
args: given
|
|
@@ -86298,12 +86697,20 @@ ${ENV_USAGE}`);
|
|
|
86298
86697
|
const badReason = refusedReason({ context, reason });
|
|
86299
86698
|
if (badReason !== null) return badReason;
|
|
86300
86699
|
const refs = refsOf(lines2);
|
|
86301
|
-
|
|
86302
|
-
|
|
86303
|
-
|
|
86304
|
-
|
|
86305
|
-
|
|
86306
|
-
|
|
86700
|
+
const outcome = await releasedKeys({
|
|
86701
|
+
context,
|
|
86702
|
+
args,
|
|
86703
|
+
refs,
|
|
86704
|
+
reason,
|
|
86705
|
+
command: shell ? wrappedCommandOf(args) : args.rest
|
|
86706
|
+
});
|
|
86707
|
+
if ("exitCode" in outcome) return outcome.exitCode;
|
|
86708
|
+
const { released, byConnection } = outcome;
|
|
86709
|
+
const prepared = preparedCommand({ command: shell ? [] : args.rest, released: byConnection });
|
|
86710
|
+
if ("refusal" in prepared) {
|
|
86711
|
+
context.err(`${prepared.refusal}
|
|
86712
|
+
`);
|
|
86713
|
+
return 1;
|
|
86307
86714
|
}
|
|
86308
86715
|
const env = environmentOf({ lines: lines2, released });
|
|
86309
86716
|
if (shell) {
|
|
@@ -86312,7 +86719,7 @@ ${ENV_USAGE}`);
|
|
|
86312
86719
|
return 0;
|
|
86313
86720
|
}
|
|
86314
86721
|
const redact = [...released.values()].flatMap(({ fields }) => Object.values(fields));
|
|
86315
|
-
return context.runCommand({ command:
|
|
86722
|
+
return context.runCommand({ command: prepared.command, env, redact });
|
|
86316
86723
|
}
|
|
86317
86724
|
async function vaultAws({
|
|
86318
86725
|
context,
|
|
@@ -86490,8 +86897,8 @@ var WHATSAPP_BUSINESS_REST_PATHS = {
|
|
|
86490
86897
|
var WHATSAPP_BUSINESS_TEXT_MAX = 4096;
|
|
86491
86898
|
var WHATSAPP_BUSINESS_LIMIT_MAX = 200;
|
|
86492
86899
|
var WHATSAPP_BUSINESS_STATUS_WAIT_MAX_SECONDS = 50;
|
|
86493
|
-
var
|
|
86494
|
-
var workspaceInput4 = external_exports.object({ workspaceId:
|
|
86900
|
+
var workspaceIdSchema20 = external_exports.string().min(1).max(64);
|
|
86901
|
+
var workspaceInput4 = external_exports.object({ workspaceId: workspaceIdSchema20 });
|
|
86495
86902
|
var digits = (what) => external_exports.string().trim().regex(/^\d{5,30}$/, `${what} is the number Meta shows, digits only`);
|
|
86496
86903
|
var appSecretSchema = external_exports.string().trim().regex(/^[a-f0-9]{32}$/i, "The app secret is 32 letters and digits from App settings > Basic");
|
|
86497
86904
|
var accessTokenSchema = external_exports.string().trim().min(20, "The access token is the long permanent system user token").max(2e3).regex(/^\S+$/, "The access token is one line with no spaces");
|
|
@@ -86525,7 +86932,7 @@ var statusDefinition = external_exports.object({
|
|
|
86525
86932
|
});
|
|
86526
86933
|
var whatsappBusinessStatusSchema = statusDefinition;
|
|
86527
86934
|
var connectDefinition = external_exports.object({
|
|
86528
|
-
workspaceId:
|
|
86935
|
+
workspaceId: workspaceIdSchema20,
|
|
86529
86936
|
appId: digits("The app id"),
|
|
86530
86937
|
wabaId: digits("The WhatsApp Business Account id"),
|
|
86531
86938
|
phoneNumberId: digits("The phone number id"),
|
|
@@ -86548,7 +86955,7 @@ var webhookDefinition = external_exports.object({
|
|
|
86548
86955
|
});
|
|
86549
86956
|
var whatsappBusinessWebhookSchema = webhookDefinition;
|
|
86550
86957
|
var settingsDefinition = external_exports.object({
|
|
86551
|
-
workspaceId:
|
|
86958
|
+
workspaceId: workspaceIdSchema20,
|
|
86552
86959
|
/** The agent that answers; null for none. Left out keeps the current one. */
|
|
86553
86960
|
agentId: external_exports.string().min(1).max(64).nullable().optional(),
|
|
86554
86961
|
replyMode: whatsappBusinessReplyModeSchema.optional()
|
|
@@ -86568,7 +86975,7 @@ var whatsappBusinessConversationSchema = conversationDefinition;
|
|
|
86568
86975
|
var limitSchema2 = external_exports.number().int().min(1).max(WHATSAPP_BUSINESS_LIMIT_MAX);
|
|
86569
86976
|
var contactRefSchema = external_exports.string().trim().min(1).max(64);
|
|
86570
86977
|
var conversationsInputDefinition = external_exports.object({
|
|
86571
|
-
workspaceId:
|
|
86978
|
+
workspaceId: workspaceIdSchema20,
|
|
86572
86979
|
limit: limitSchema2.optional()
|
|
86573
86980
|
});
|
|
86574
86981
|
var whatsappBusinessConversationsInputSchema = conversationsInputDefinition;
|
|
@@ -86594,7 +87001,7 @@ var messageDefinition = external_exports.object({
|
|
|
86594
87001
|
template: external_exports.string().nullable()
|
|
86595
87002
|
});
|
|
86596
87003
|
var readInputDefinition2 = external_exports.object({
|
|
86597
|
-
workspaceId:
|
|
87004
|
+
workspaceId: workspaceIdSchema20,
|
|
86598
87005
|
contact: contactRefSchema,
|
|
86599
87006
|
limit: limitSchema2.optional()
|
|
86600
87007
|
});
|
|
@@ -86603,12 +87010,12 @@ var readDefinition = external_exports.object({
|
|
|
86603
87010
|
messages: external_exports.array(messageDefinition)
|
|
86604
87011
|
});
|
|
86605
87012
|
var sendInputDefinition2 = external_exports.object({
|
|
86606
|
-
workspaceId:
|
|
87013
|
+
workspaceId: workspaceIdSchema20,
|
|
86607
87014
|
to: contactRefSchema,
|
|
86608
87015
|
text: external_exports.string().trim().min(1).max(WHATSAPP_BUSINESS_TEXT_MAX)
|
|
86609
87016
|
});
|
|
86610
87017
|
var sendTemplateInputDefinition = external_exports.object({
|
|
86611
|
-
workspaceId:
|
|
87018
|
+
workspaceId: workspaceIdSchema20,
|
|
86612
87019
|
to: contactRefSchema,
|
|
86613
87020
|
template: external_exports.string().trim().min(1).max(512),
|
|
86614
87021
|
/** The template's language code; the only approved one when left out. */
|
|
@@ -86635,7 +87042,7 @@ function whatsappBusinessSendSettled({
|
|
|
86635
87042
|
return state !== "waiting" && state !== "sending";
|
|
86636
87043
|
}
|
|
86637
87044
|
var sendStatusInputDefinition2 = external_exports.object({
|
|
86638
|
-
workspaceId:
|
|
87045
|
+
workspaceId: workspaceIdSchema20,
|
|
86639
87046
|
sendId: external_exports.string().min(1).max(64),
|
|
86640
87047
|
waitSeconds: external_exports.number().int().min(0).max(WHATSAPP_BUSINESS_STATUS_WAIT_MAX_SECONDS).default(0)
|
|
86641
87048
|
});
|
|
@@ -86685,7 +87092,7 @@ var restSendStatusDefinition2 = sendStatusInputDefinition2.omit({ workspaceId: t
|
|
|
86685
87092
|
var restSettingsDefinition = settingsDefinition.omit({ workspaceId: true });
|
|
86686
87093
|
var restEmptyDefinition = external_exports.object({});
|
|
86687
87094
|
var WhatsappBusinessApi = moduleApi()("whatsapp-business");
|
|
86688
|
-
var whatsappBusinessTrpc = defineTrpcContract("whatsappBusiness").query("status").withInput(workspaceInput4).withOutput(whatsappBusinessStatusSchema).mutation("connect").withInput(connectWhatsappBusinessInputSchema).withOutput(whatsappBusinessWebhookSchema).mutation("check").withInput(workspaceInput4).withOutput(whatsappBusinessStatusSchema).mutation("verifyToken").withInput(workspaceInput4).withOutput(whatsappBusinessWebhookSchema).mutation("settings").withInput(updateWhatsappBusinessSettingsInputSchema).withOutput(whatsappBusinessStatusSchema).mutation("disconnect").withInput(workspaceInput4).withOutput(whatsappBusinessStatusSchema).query("conversations").withInput(whatsappBusinessConversationsInputSchema).withOutput(external_exports.array(whatsappBusinessConversationSchema)).query("templates").withInput(workspaceInput4).withOutput(external_exports.array(whatsappBusinessTemplateSchema)).query("prices").withInput(external_exports.object({ ...pricesInputDefinition.shape, workspaceId:
|
|
87095
|
+
var whatsappBusinessTrpc = defineTrpcContract("whatsappBusiness").query("status").withInput(workspaceInput4).withOutput(whatsappBusinessStatusSchema).mutation("connect").withInput(connectWhatsappBusinessInputSchema).withOutput(whatsappBusinessWebhookSchema).mutation("check").withInput(workspaceInput4).withOutput(whatsappBusinessStatusSchema).mutation("verifyToken").withInput(workspaceInput4).withOutput(whatsappBusinessWebhookSchema).mutation("settings").withInput(updateWhatsappBusinessSettingsInputSchema).withOutput(whatsappBusinessStatusSchema).mutation("disconnect").withInput(workspaceInput4).withOutput(whatsappBusinessStatusSchema).query("conversations").withInput(whatsappBusinessConversationsInputSchema).withOutput(external_exports.array(whatsappBusinessConversationSchema)).query("templates").withInput(workspaceInput4).withOutput(external_exports.array(whatsappBusinessTemplateSchema)).query("prices").withInput(external_exports.object({ ...pricesInputDefinition.shape, workspaceId: workspaceIdSchema20 })).withOutput(whatsappBusinessPricesSchema).build();
|
|
86689
87096
|
|
|
86690
87097
|
// ../../modules/whatsapp-business/contract/src/whatsapp-business.config.ts
|
|
86691
87098
|
var whatsappBusinessConfig = Config.define((c) => ({
|
|
@@ -87957,7 +88364,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
87957
88364
|
laze memory get|set|append|history <file>, search, pull SOUL.md, AGENTS.md, a channel's MEMORY.md
|
|
87958
88365
|
laze wiki list|get|put|search|history|mv|rm the workspace wiki
|
|
87959
88366
|
laze skill list|install|show|pull|rm|update|pin|unpin your agent's skills and the catalogue
|
|
87960
|
-
laze app create <name> --template crm ... build an app: create, push
|
|
88367
|
+
laze app create <name> --template crm ... build an app: create, push (live at once), versions, revert
|
|
87961
88368
|
laze app every laze app command, with its flags
|
|
87962
88369
|
laze agents list | laze agents status <name> the workspace's agents and their context
|
|
87963
88370
|
laze agents show <name> [--json] an agent's profile: kind, how it runs, intelligence
|
|
@@ -87974,7 +88381,10 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
87974
88381
|
laze agent restore|delete <agent> bring an archived agent back, or delete it for good now
|
|
87975
88382
|
laze agent copy <agent> <name> a team copy of a personal agent, with its skills
|
|
87976
88383
|
laze agent pause|resume <agent> [--reason <why>] pause an agent Laze runs, or resume it
|
|
87977
|
-
laze agent transfer <agent> <member> hand a team agent to
|
|
88384
|
+
laze agent transfer <agent> <member> hand a team agent to a member, or offer a personal one
|
|
88385
|
+
laze agent transfer accept|decline <agent> answer a personal agent offered to you
|
|
88386
|
+
laze agent transfer cancel <agent> take back an offer you made
|
|
88387
|
+
laze agent transfer offers offers waiting that you made or were made
|
|
87978
88388
|
laze agent reset-session <agent> stop its turn; its next message starts a fresh session
|
|
87979
88389
|
laze agent default [<agent> | --clear] the workspace default agent; an Admin picks a team agent
|
|
87980
88390
|
laze agent logins list|add|rename|remove|check|history your Claude and Codex logins; a token is read from stdin only
|
|
@@ -88013,9 +88423,9 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
|
|
|
88013
88423
|
laze connect install|status|stop|uninstall the service that hands linked Codex sessions their messages
|
|
88014
88424
|
laze openclaw list|connect|agent|agent-key|feed|disconnect your OpenClaw gateways and their agents
|
|
88015
88425
|
laze browser open|tabs|goto|read|ask|cdp|share|close a live browser tab pinned to the conversation
|
|
88016
|
-
Show your work: open pages in a browser tab of the conversation; ask the
|
|
88426
|
+
Show your work: open pages in a browser tab of the conversation; ask the person you work for to sign in there, never ask for a password
|
|
88017
88427
|
laze browser setup|cdp|screen|status <machine> a machine with Chrome a person signs in on, for agents
|
|
88018
|
-
Sites without an API need a person's login:
|
|
88428
|
+
Sites without an API need a person's login: open a browser tab and ask there, never ask for a password; a browser machine only when the person asks for one
|
|
88019
88429
|
laze browser setup <site> --on <machine> the browser on a person's own machine instead, at no Laze compute cost
|
|
88020
88430
|
laze machine connect <name> connect your own machine (a Mac mini, a Linux box): the command to run on it
|
|
88021
88431
|
laze machine connect <name> --ssh <user>@<host>[:port] a machine that cannot run the connector (a NAS), over SSH
|