@lazehq/cli 0.1.45 → 0.1.46

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.
Files changed (2) hide show
  1. package/dist/laze.mjs +625 -371
  2. 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.slice(match.start, match.end))));
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.45";
35721
+ var STAMPED = "0.1.46";
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(["draft", "live", "public", "deleted"]);
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 address the state names: the draft preview or the published app. */
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({ agentId: idSchema4, messageId: idSchema4 }).optional()
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,
@@ -58753,6 +58772,12 @@ var agentChatMemberInputSchemaDefinition = external_exports.object({
58753
58772
  ownerUserId: idSchema4,
58754
58773
  userId: idSchema4
58755
58774
  });
58775
+ var handAgentChatInputSchemaDefinition = external_exports.object({
58776
+ workspaceId: workspaceIdSchema,
58777
+ agent: openAgentDirectInputSchemaDefinition.shape.agent,
58778
+ fromUserId: idSchema4,
58779
+ toUserId: idSchema4
58780
+ });
58756
58781
  var historyInputSchemaDefinition = external_exports.object({
58757
58782
  workspaceId: workspaceIdSchema,
58758
58783
  channelId: idSchema4,
@@ -59151,7 +59176,9 @@ var threadsUnreadSchema = threadsUnreadSchemaDefinition;
59151
59176
  var workspaceUnreadSchemaDefinition = external_exports.object({
59152
59177
  workspaceId: workspaceIdSchema,
59153
59178
  unread: external_exports.number().int().nonnegative(),
59154
- mentions: external_exports.number().int().nonnegative()
59179
+ mentions: external_exports.number().int().nonnegative(),
59180
+ /** The Notifications count, the number the switcher, the bell and the tab show for it. */
59181
+ notifications: external_exports.number().int().nonnegative()
59155
59182
  });
59156
59183
  var workspaceUnreadSchema = workspaceUnreadSchemaDefinition;
59157
59184
  var activityKindSchema = external_exports.enum(["mention", "thread_reply", "keyword", "reaction"]);
@@ -59409,7 +59436,7 @@ var chatConversationsTrpc = defineTrpcContract("chat").query("overview").withInp
59409
59436
  var chatChannelRolesTrpc = defineTrpcContract("chat").mutation("setChannelRole").withInput(setChannelRoleInputSchema).withOutput(conversationSchema).mutation("extendChannel").withInput(extendChannelInputSchema).withOutput(conversationSchema).build();
59410
59437
  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
59438
  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();
59439
+ 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
59440
  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
59441
  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
59442
  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 +59722,9 @@ var messageNoticeSchema = external_exports.object({
59695
59722
  /** It came in through a mirror such as Slack, whose own app already rings: Laze stays silent. */
59696
59723
  mirrored: external_exports.boolean().optional(),
59697
59724
  /** An @channel or @here raised it, not the conversation's every-message level. */
59698
- broadcast: external_exports.boolean().optional()
59725
+ broadcast: external_exports.boolean().optional(),
59726
+ /** The person's Notifications count, from chat: the iPhone's icon badge shows it. */
59727
+ badge: external_exports.number().int().nonnegative().optional()
59699
59728
  });
59700
59729
  var approvalNoticeSchema = external_exports.object({
59701
59730
  workspaceId: workspaceIdSchema2,
@@ -59707,7 +59736,9 @@ var approvalNoticeSchema = external_exports.object({
59707
59736
  /** The plain line only, never the command or the secret's details. */
59708
59737
  body: external_exports.string().max(400),
59709
59738
  /** The chat message holding the card, or the feed when there is none. */
59710
- path: external_exports.string().startsWith("/").max(1024)
59739
+ path: external_exports.string().startsWith("/").max(1024),
59740
+ /** The person's Notifications count, from chat: the iPhone's icon badge shows it. */
59741
+ badge: external_exports.number().int().nonnegative().optional()
59711
59742
  });
59712
59743
  var feedNoticeSchema = external_exports.object({
59713
59744
  workspaceId: workspaceIdSchema2,
@@ -59723,7 +59754,9 @@ var feedNoticeSchema = external_exports.object({
59723
59754
  /** The feed event behind the push: each new event pushes, a retried one does not. */
59724
59755
  eventId: external_exports.string().min(1).max(200).optional(),
59725
59756
  /** Which setting turns it off; none means it always pushes. */
59726
- pushKind: feedPushKindSchema.optional()
59757
+ pushKind: feedPushKindSchema.optional(),
59758
+ /** The person's Notifications count, from chat: the iPhone's icon badge shows it. */
59759
+ badge: external_exports.number().int().nonnegative().optional()
59727
59760
  });
59728
59761
  var notifyInputSchemaDefinition = external_exports.discriminatedUnion("kind", [
59729
59762
  messageNoticeSchema,
@@ -62228,12 +62261,15 @@ var permissionSkipReasonSchema = external_exports.enum(["question", "plan", "pla
62228
62261
  var liveStepKindSchema = external_exports.enum(["tool", "subagent", "shell"]);
62229
62262
  var liveStepStatusSchema = external_exports.enum(["running", "done", "failed"]);
62230
62263
  var LIVE_STEP_LABEL_MAX = 160;
62264
+ var LIVE_STEP_DETAIL_MAX = 2e3;
62231
62265
  var LIVE_STEPS_BATCH_MAX = 100;
62232
62266
  var liveStepSchemaDefinition = external_exports.object({
62233
62267
  id: external_exports.string().min(1).max(200),
62234
62268
  kind: liveStepKindSchema,
62235
62269
  /** `Bash(Run the tests)` for a tool; the task for a subagent; what a shell runs. */
62236
62270
  label: external_exports.string().max(LIVE_STEP_LABEL_MAX),
62271
+ /** What the label cuts short, whole and masked: `cd /work; curl -s https://acme.test/...`. */
62272
+ detail: external_exports.string().max(LIVE_STEP_DETAIL_MAX).optional(),
62237
62273
  status: liveStepStatusSchema,
62238
62274
  /** Epoch ms. */
62239
62275
  startedAt: external_exports.number().int().nonnegative(),
@@ -63197,7 +63233,9 @@ var retryAgentTurnInputSchemaDefinition = external_exports.object({
63197
63233
  agentId: idSchema6,
63198
63234
  channelId: idSchema6,
63199
63235
  /** The person's message the failed turn was on. */
63200
- messageId: idSchema6
63236
+ messageId: idSchema6,
63237
+ /** The attempt the failure is about; when a later one is stored, it is not sent again. */
63238
+ failedAttempt: external_exports.number().int().min(1).optional()
63201
63239
  });
63202
63240
  var retryAgentTurnInputSchema = retryAgentTurnInputSchemaDefinition;
63203
63241
  var compactAgentSessionInputSchemaDefinition = external_exports.object({
@@ -63262,6 +63300,8 @@ var agentAttentionExpireIntentSchemaDefinition = external_exports.object({
63262
63300
  workspaceId: external_exports.string().min(1),
63263
63301
  attentionId: external_exports.string().min(1)
63264
63302
  });
63303
+ var agentRetryStateSchemaDefinition = external_exports.object({ retried: external_exports.boolean(), allowed: external_exports.boolean() });
63304
+ var agentRetryStateSchema = agentRetryStateSchemaDefinition;
63265
63305
 
63266
63306
  // ../../modules/agent/contract/src/agent-budget.ts
63267
63307
  var raiseBudgetInputSchemaDefinition = external_exports.object({
@@ -63273,6 +63313,119 @@ var raiseBudgetInputSchemaDefinition = external_exports.object({
63273
63313
  });
63274
63314
  var raiseBudgetInputSchema = raiseBudgetInputSchemaDefinition;
63275
63315
 
63316
+ // ../../modules/agent/contract/src/agent-catch-up.ts
63317
+ var CATCH_UP_QUESTION_MAX = 4e3;
63318
+ var catchUpSectionNameSchema = external_exports.enum([
63319
+ "asked",
63320
+ "status",
63321
+ "report",
63322
+ "facts",
63323
+ "waiting",
63324
+ "blocked",
63325
+ "other"
63326
+ ]);
63327
+ var catchUpRunKindSchema = external_exports.enum(["catchup", "btw"]);
63328
+ var catchUpRunStateSchema = external_exports.enum(["running", "done", "failed", "stopped"]);
63329
+ var catchUpRefSchemaDefinition = external_exports.object({
63330
+ /** `m1`, `m2` ...: the id the prompt numbers it with. */
63331
+ ref: external_exports.string().min(1),
63332
+ messageId: external_exports.string().min(1),
63333
+ seq: external_exports.number().int().positive(),
63334
+ author: external_exports.object({
63335
+ kind: external_exports.enum(["person", "agent", "external"]),
63336
+ id: external_exports.string(),
63337
+ name: external_exports.string()
63338
+ }),
63339
+ /** The person's own message the catch-up starts from. */
63340
+ you: external_exports.boolean(),
63341
+ at: external_exports.iso.datetime(),
63342
+ /** The first characters of the message on one line, for the citation's hover. */
63343
+ preview: external_exports.string()
63344
+ });
63345
+ var catchUpSinceSchemaDefinition = external_exports.object({
63346
+ messageId: external_exports.string().min(1),
63347
+ seq: external_exports.number().int().positive(),
63348
+ text: external_exports.string(),
63349
+ at: external_exports.iso.datetime()
63350
+ });
63351
+ var catchUpLineSchemaDefinition = external_exports.object({
63352
+ /** Null for a line the model wrote outside the JSON Lines shape, shown as plain text. */
63353
+ section: catchUpSectionNameSchema.nullable(),
63354
+ text: external_exports.string(),
63355
+ refs: external_exports.array(external_exports.string())
63356
+ });
63357
+ var catchUpExchangeSchemaDefinition = external_exports.object({
63358
+ runId: external_exports.string().min(1),
63359
+ question: external_exports.string(),
63360
+ answer: external_exports.string()
63361
+ });
63362
+ var catchUpRunSchemaDefinition = external_exports.object({
63363
+ id: external_exports.string().min(1),
63364
+ kind: catchUpRunKindSchema,
63365
+ workspaceId: external_exports.string().min(1),
63366
+ channelId: external_exports.string().min(1),
63367
+ agentId: external_exports.string().min(1),
63368
+ agentName: external_exports.string(),
63369
+ state: catchUpRunStateSchema,
63370
+ /** For a `btw`: the question, and the catch-up it follows up. */
63371
+ question: external_exports.string().nullable(),
63372
+ catchUpId: external_exports.string().nullable(),
63373
+ since: catchUpSinceSchemaDefinition.nullable(),
63374
+ refs: external_exports.array(catchUpRefSchemaDefinition),
63375
+ /** Messages between the first 40 and the last 360 that the side turn did not get. */
63376
+ leftOut: external_exports.number().int().nonnegative(),
63377
+ /** The answer as the model wrote it so far. */
63378
+ text: external_exports.string(),
63379
+ /** For a `catchup`: the answer read as lines, refs kept only when they name a listed message. */
63380
+ lines: external_exports.array(catchUpLineSchemaDefinition),
63381
+ /** Nothing to catch up on: answered at once, no model call. */
63382
+ nothing: external_exports.enum(["new", "here"]).nullable(),
63383
+ /** Why a failed run failed, in a sentence for the person. */
63384
+ error: external_exports.string().nullable(),
63385
+ /** A kept catch-up handed back because nothing came after what it covers. */
63386
+ reopened: external_exports.boolean(),
63387
+ /** For a `catchup`: its finished follow-ups, oldest first. */
63388
+ followUps: external_exports.array(catchUpExchangeSchemaDefinition),
63389
+ /** The stream's sequence the text is at; publications with a higher one are newer. */
63390
+ seq: external_exports.number().int().nonnegative(),
63391
+ startedAt: external_exports.iso.datetime(),
63392
+ endedAt: external_exports.iso.datetime().nullable(),
63393
+ /** Null where the realtime edge is not configured, or once the run ended. */
63394
+ stream: realtimeTokenSchema.nullable()
63395
+ });
63396
+ var catchUpRunSchema = catchUpRunSchemaDefinition;
63397
+ var catchUpPublicationSchemaDefinition = external_exports.object({
63398
+ type: external_exports.literal("catch_up_text"),
63399
+ runId: external_exports.string().min(1),
63400
+ seq: external_exports.number().int().positive(),
63401
+ state: catchUpRunStateSchema,
63402
+ text: external_exports.string(),
63403
+ error: external_exports.string().nullable()
63404
+ });
63405
+ var startCatchUpInputSchemaDefinition = external_exports.object({
63406
+ workspaceId: external_exports.string().min(1),
63407
+ channelId: external_exports.string().min(1),
63408
+ /** The agent the person named; else the conversation's, then the workspace's default agent. */
63409
+ agentId: external_exports.string().min(1).optional(),
63410
+ /** Runs a new catch-up even when the kept one still covers everything. */
63411
+ fresh: external_exports.boolean().optional(),
63412
+ /** The person's IANA time zone, for the times the side turn reads. */
63413
+ timeZone: external_exports.string().min(1).max(64).optional()
63414
+ });
63415
+ var startCatchUpInputSchema = startCatchUpInputSchemaDefinition;
63416
+ var askCatchUpInputSchemaDefinition = external_exports.object({
63417
+ workspaceId: external_exports.string().min(1),
63418
+ catchUpId: external_exports.string().min(1),
63419
+ question: external_exports.string().max(CATCH_UP_QUESTION_MAX)
63420
+ });
63421
+ var askCatchUpInputSchema = askCatchUpInputSchemaDefinition;
63422
+ var catchUpRunInputSchemaDefinition = external_exports.object({
63423
+ workspaceId: external_exports.string().min(1),
63424
+ runId: external_exports.string().min(1)
63425
+ });
63426
+ var catchUpRunInputSchema = catchUpRunInputSchemaDefinition;
63427
+ var SECTIONS = new Set(catchUpSectionNameSchema.options);
63428
+
63276
63429
  // ../../modules/agent/contract/src/agent-channel-mute.ts
63277
63430
  var MUTE_MINUTES_MAX = 30 * 24 * 60;
63278
63431
  var agentChannelMuteSchemaDefinition = external_exports.object({
@@ -64807,6 +64960,48 @@ var agentPermissionPromptSchemaDefinition = external_exports.object({
64807
64960
  });
64808
64961
  var agentPermissionPromptSchema = agentPermissionPromptSchemaDefinition;
64809
64962
 
64963
+ // ../../modules/agent/contract/src/agent-transfer.ts
64964
+ var workspaceIdSchema9 = external_exports.string().min(1);
64965
+ var idSchema13 = external_exports.string().min(1).max(200);
64966
+ var agentRefSchema5 = external_exports.string().trim().min(1).max(80);
64967
+ var agentTransferOfferSchemaDefinition = external_exports.object({
64968
+ id: external_exports.string().min(1),
64969
+ agentId: external_exports.string().min(1),
64970
+ agentName: external_exports.string(),
64971
+ /** The owner now, who keeps the agent until the recipient accepts. */
64972
+ fromUserId: external_exports.string().min(1),
64973
+ toUserId: external_exports.string().min(1),
64974
+ /** The owner, or a workspace admin who offered it for them. */
64975
+ offeredByUserId: external_exports.string().min(1),
64976
+ offeredAt: external_exports.iso.datetime(),
64977
+ expiresAt: external_exports.iso.datetime()
64978
+ });
64979
+ var agentTransferOfferSchema = agentTransferOfferSchemaDefinition;
64980
+ var agentTransferInputSchemaDefinition = external_exports.object({
64981
+ workspaceId: workspaceIdSchema9,
64982
+ agentId: idSchema13
64983
+ });
64984
+ var agentTransferInputSchema = agentTransferInputSchemaDefinition;
64985
+ var agentTransferAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema5 });
64986
+ var agentTransferOfferedPayloadSchemaDefinition = external_exports.object({
64987
+ workspaceId: external_exports.string().min(1),
64988
+ offerId: external_exports.string().min(1),
64989
+ agentId: external_exports.string().min(1),
64990
+ agentName: external_exports.string(),
64991
+ fromUserId: external_exports.string().min(1),
64992
+ toUserId: external_exports.string().min(1),
64993
+ offeredByUserId: external_exports.string().min(1),
64994
+ /** The offerer's name as the card reads it. */
64995
+ offeredByName: external_exports.string(),
64996
+ expiresAt: external_exports.iso.datetime()
64997
+ });
64998
+ var agentTransferResolvedPayloadSchemaDefinition = external_exports.object({
64999
+ workspaceId: external_exports.string().min(1),
65000
+ offerId: external_exports.string().min(1),
65001
+ state: external_exports.enum(["accepted", "declined", "cancelled"]),
65002
+ resolvedByUserId: external_exports.string().min(1)
65003
+ });
65004
+
64810
65005
  // ../../modules/agent/contract/src/agent-working.ts
64811
65006
  var agentWorkingInputSchemaDefinition = external_exports.object({
64812
65007
  workspaceId: external_exports.string().min(1),
@@ -64817,24 +65012,24 @@ var agentWorkingSchemaDefinition = external_exports.object({ working: external_e
64817
65012
  var agentWorkingSchema = agentWorkingSchemaDefinition;
64818
65013
 
64819
65014
  // ../../modules/agent/contract/src/agent-workspace-default.ts
64820
- var workspaceIdSchema9 = external_exports.string().min(1);
64821
- var idSchema13 = external_exports.string().min(1).max(200);
64822
- var agentRefSchema5 = external_exports.string().trim().min(1).max(80);
65015
+ var workspaceIdSchema10 = external_exports.string().min(1);
65016
+ var idSchema14 = external_exports.string().min(1).max(200);
65017
+ var agentRefSchema6 = external_exports.string().trim().min(1).max(80);
64823
65018
  var workspaceDefaultAgentSchemaDefinition = external_exports.object({
64824
65019
  /** Null when the workspace has none, or its pick was removed. */
64825
- agentId: idSchema13.nullable(),
65020
+ agentId: idSchema14.nullable(),
64826
65021
  name: external_exports.string().nullable()
64827
65022
  });
64828
65023
  var workspaceDefaultAgentSchema = workspaceDefaultAgentSchemaDefinition;
64829
65024
  var setWorkspaceDefaultAgentInputSchemaDefinition = external_exports.object({
64830
- workspaceId: workspaceIdSchema9,
65025
+ workspaceId: workspaceIdSchema10,
64831
65026
  /** A team agent of the workspace; null clears the pick. */
64832
- agentId: idSchema13.nullable()
65027
+ agentId: idSchema14.nullable()
64833
65028
  });
64834
65029
  var setWorkspaceDefaultAgentInputSchema = setWorkspaceDefaultAgentInputSchemaDefinition;
64835
65030
  var setWorkspaceDefaultAgentAsCallerInputSchemaDefinition = external_exports.object({
64836
65031
  /** The agent by id or name; null clears the pick. */
64837
- agent: agentRefSchema5.nullable()
65032
+ agent: agentRefSchema6.nullable()
64838
65033
  });
64839
65034
 
64840
65035
  // ../../modules/agent/contract/src/agent.ts
@@ -64842,8 +65037,8 @@ var AGENT_LINK_TTL_SECONDS = 30 * 60;
64842
65037
  var AGENT_JOIN_REQUEST_TTL_SECONDS = 24 * 60 * 60;
64843
65038
  var AGENT_ONLINE_WINDOW_SECONDS = 5 * 60;
64844
65039
  var INBOX_WAIT_MAX_SECONDS = 55;
64845
- var workspaceIdSchema10 = external_exports.string().min(1);
64846
- var idSchema14 = external_exports.string().min(1).max(80);
65040
+ var workspaceIdSchema11 = external_exports.string().min(1);
65041
+ var idSchema15 = external_exports.string().min(1).max(80);
64847
65042
  var agentHarnessSchema = external_exports.enum([
64848
65043
  "claude-code",
64849
65044
  "codex",
@@ -64890,27 +65085,27 @@ var agentContextSchemaDefinition = external_exports.object({
64890
65085
  updatedAt: external_exports.iso.datetime().nullable()
64891
65086
  });
64892
65087
  var agentHostSchemaDefinition = external_exports.object({
64893
- machineId: idSchema14,
65088
+ machineId: idSchema15,
64894
65089
  whenOffline: external_exports.enum(["wait", "sandbox"])
64895
65090
  });
64896
65091
  var setAgentHostInputSchemaDefinition = external_exports.object({
64897
- workspaceId: workspaceIdSchema10,
64898
- agentId: idSchema14,
65092
+ workspaceId: workspaceIdSchema11,
65093
+ agentId: idSchema15,
64899
65094
  host: agentHostSchemaDefinition.nullable()
64900
65095
  });
64901
65096
  var setAgentComputerKeyInputSchemaDefinition = external_exports.object({
64902
- workspaceId: workspaceIdSchema10,
64903
- agentId: idSchema14,
65097
+ workspaceId: workspaceIdSchema11,
65098
+ agentId: idSchema15,
64904
65099
  computerKey: external_exports.string().min(1).max(200).nullable()
64905
65100
  });
64906
65101
  var agentSchemaDefinition = external_exports.object({
64907
- id: idSchema14,
64908
- workspaceId: workspaceIdSchema10,
65102
+ id: idSchema15,
65103
+ workspaceId: workspaceIdSchema11,
64909
65104
  name: external_exports.string(),
64910
65105
  kind: external_exports.enum(["personal", "team"]),
64911
65106
  hosting: agentHostingSchema,
64912
65107
  harness: agentHarnessSchema,
64913
- ownerUserId: idSchema14,
65108
+ ownerUserId: idSchema15,
64914
65109
  status: external_exports.enum(["connected", "disconnected"]),
64915
65110
  online: external_exports.boolean(),
64916
65111
  lastSeenAt: external_exports.iso.datetime().nullable(),
@@ -64950,7 +65145,7 @@ var agentSchemaDefinition = external_exports.object({
64950
65145
  });
64951
65146
  var agentSchema = agentSchemaDefinition;
64952
65147
  var agentChannelSchemaDefinition = external_exports.object({
64953
- id: idSchema14,
65148
+ id: idSchema15,
64954
65149
  name: external_exports.string(),
64955
65150
  kind: external_exports.enum(["public", "private", "dm", "group", "chat"])
64956
65151
  });
@@ -64965,22 +65160,22 @@ var agentNameSchema = external_exports.string().trim().min(1).max(80);
64965
65160
  var instructionsSchema = external_exports.string().max(2e4);
64966
65161
  var linkedAvatarSchema = external_exports.string().trim().max(16);
64967
65162
  var createAgentInputSchemaDefinition = external_exports.object({
64968
- workspaceId: workspaceIdSchema10,
65163
+ workspaceId: workspaceIdSchema11,
64969
65164
  name: agentNameSchema,
64970
65165
  avatar: agentAvatarInputSchema.default(""),
64971
65166
  harness: hostedHarnessSchema,
64972
65167
  modelLevel: agentModelLevelSchema.optional(),
64973
65168
  kind: external_exports.enum(["personal", "team"]).default("personal"),
64974
65169
  instructions: instructionsSchema.default(""),
64975
- channelIds: external_exports.array(idSchema14).max(50).default([]),
65170
+ channelIds: external_exports.array(idSchema15).max(50).default([]),
64976
65171
  /** A Claude Code or Codex agent drawing from this login pool; a team one needs a pool. */
64977
65172
  /** The pool's id or name. */
64978
65173
  loginPoolId: external_exports.string().min(1).max(200).optional()
64979
65174
  });
64980
65175
  var createAgentInputSchema = createAgentInputSchemaDefinition;
64981
65176
  var updateAgentInputSchemaDefinition = external_exports.object({
64982
- workspaceId: workspaceIdSchema10,
64983
- agentId: idSchema14,
65177
+ workspaceId: workspaceIdSchema11,
65178
+ agentId: idSchema15,
64984
65179
  name: agentNameSchema.optional(),
64985
65180
  avatar: agentAvatarInputSchema.optional(),
64986
65181
  modelLevel: agentModelLevelSchema.optional(),
@@ -64992,7 +65187,7 @@ var updateAgentInputSchemaDefinition = external_exports.object({
64992
65187
  effort: runEffortInputSchema.optional(),
64993
65188
  instructions: instructionsSchema.optional(),
64994
65189
  /** The whole set: channels left out are left. */
64995
- channelIds: external_exports.array(idSchema14).max(50).optional(),
65190
+ channelIds: external_exports.array(idSchema15).max(50).optional(),
64996
65191
  /** Agents Laze runs only: paused, it does not wake until resumed and its messages wait. */
64997
65192
  paused: external_exports.boolean().optional(),
64998
65193
  /** Why it is paused, shown on the agents page and in the notice under held messages. */
@@ -65000,14 +65195,14 @@ var updateAgentInputSchemaDefinition = external_exports.object({
65000
65195
  });
65001
65196
  var updateAgentInputSchema = updateAgentInputSchemaDefinition;
65002
65197
  var saveHarnessLoginInputSchemaDefinition = external_exports.object({
65003
- workspaceId: workspaceIdSchema10,
65198
+ workspaceId: workspaceIdSchema11,
65004
65199
  harness: harnessLoginSchema,
65005
65200
  secret: external_exports.string().trim().min(10).max(2e4).optional(),
65006
65201
  signIn: harnessSignInValueSchema.optional()
65007
65202
  });
65008
65203
  var saveHarnessLoginInputSchema = saveHarnessLoginInputSchemaDefinition;
65009
65204
  var removeHarnessLoginInputSchemaDefinition = external_exports.object({
65010
- workspaceId: workspaceIdSchema10,
65205
+ workspaceId: workspaceIdSchema11,
65011
65206
  harness: harnessLoginSchema
65012
65207
  });
65013
65208
  var removeHarnessLoginInputSchema = removeHarnessLoginInputSchemaDefinition;
@@ -65019,13 +65214,13 @@ var harnessLoginsSchema = harnessLoginsSchemaDefinition;
65019
65214
  var lastRuntimeSchemaDefinition = external_exports.object({ harness: hostedHarnessSchema.nullable() });
65020
65215
  var lastRuntimeSchema = lastRuntimeSchemaDefinition;
65021
65216
  var mintLinkInputSchemaDefinition = external_exports.object({
65022
- workspaceId: workspaceIdSchema10,
65217
+ workspaceId: workspaceIdSchema11,
65023
65218
  /** Left out, the agent names itself when it joins, else it takes its harness's name. */
65024
65219
  name: external_exports.string().trim().max(80).optional(),
65025
65220
  /** The channel the agent joins once linked. */
65026
- channelId: idSchema14.optional(),
65221
+ channelId: idSchema15.optional(),
65027
65222
  /** One of the minting person's connected agents: redeeming gives it a new key instead. */
65028
- reconnectAgentId: idSchema14.optional()
65223
+ reconnectAgentId: idSchema15.optional()
65029
65224
  });
65030
65225
  var mintLinkInputSchema = mintLinkInputSchemaDefinition;
65031
65226
  var mintedLinkSchemaDefinition = external_exports.object({
@@ -65057,7 +65252,7 @@ var redeemedLinkSchemaDefinition = external_exports.object({
65057
65252
  agent: agentSchemaDefinition,
65058
65253
  /** The agent's own `lz_` key, shown once. */
65059
65254
  apiKey: external_exports.string(),
65060
- channelId: idSchema14.nullable(),
65255
+ channelId: idSchema15.nullable(),
65061
65256
  /** The owner's key that may only ask for a new agent (`laze agent request`), shown once. */
65062
65257
  requestKey: external_exports.string().nullable().optional()
65063
65258
  });
@@ -65096,12 +65291,12 @@ var joinRequestAnswerSchemaDefinition = external_exports.discriminatedUnion("sta
65096
65291
  })
65097
65292
  ]);
65098
65293
  var joinRequestInputSchemaDefinition = external_exports.object({
65099
- workspaceId: workspaceIdSchema10,
65294
+ workspaceId: workspaceIdSchema11,
65100
65295
  code: external_exports.string().trim().min(1).max(20)
65101
65296
  });
65102
65297
  var joinRequestInputSchema = joinRequestInputSchemaDefinition;
65103
65298
  var approveJoinRequestInputSchemaDefinition = external_exports.object({
65104
- workspaceId: workspaceIdSchema10,
65299
+ workspaceId: workspaceIdSchema11,
65105
65300
  code: external_exports.string().trim().min(1).max(20),
65106
65301
  /** The person may rename the agent as they approve it. */
65107
65302
  name: external_exports.string().trim().max(80).optional()
@@ -65122,12 +65317,12 @@ var inboxCatchUpSchemaDefinition = external_exports.object({
65122
65317
  });
65123
65318
  var inboxCatchUpSchema = inboxCatchUpSchemaDefinition;
65124
65319
  var inboxMessageSchemaDefinition = external_exports.object({
65125
- messageId: idSchema14,
65126
- channelId: idSchema14,
65320
+ messageId: idSchema15,
65321
+ channelId: idSchema15,
65127
65322
  channelName: external_exports.string(),
65128
65323
  channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65129
- threadRootId: idSchema14.nullable(),
65130
- author: external_exports.object({ kind: external_exports.enum(["person", "agent"]), id: idSchema14, name: external_exports.string() }),
65324
+ threadRootId: idSchema15.nullable(),
65325
+ author: external_exports.object({ kind: external_exports.enum(["person", "agent"]), id: idSchema15, name: external_exports.string() }),
65131
65326
  body: external_exports.string(),
65132
65327
  postedAt: external_exports.iso.datetime(),
65133
65328
  /** On the first message of each conversation in a catch up (agent-catch-up.feature). */
@@ -65147,16 +65342,20 @@ var inboxWaitingSchemaDefinition = external_exports.object({
65147
65342
  });
65148
65343
  var callerSchemaDefinition = external_exports.object({
65149
65344
  kind: external_exports.enum(["person", "agent"]),
65150
- id: idSchema14,
65345
+ id: idSchema15,
65151
65346
  name: external_exports.string(),
65152
- workspaceId: workspaceIdSchema10,
65347
+ workspaceId: workspaceIdSchema11,
65153
65348
  agent: agentSchemaDefinition.nullable(),
65154
65349
  /** Messages waiting in the agent's inbox, not taken yet; 0 for a person. */
65155
- pendingCount: external_exports.number().int().min(0).optional()
65350
+ pendingCount: external_exports.number().int().min(0).optional(),
65351
+ /** The person's language, or the agent owner's (BCP 47; en-US until they pick one). */
65352
+ language: external_exports.string().optional(),
65353
+ /** The person's time zone, or the agent owner's (IANA; UTC while Laze does not know it). */
65354
+ timeZone: external_exports.string().optional()
65156
65355
  });
65157
65356
  var agentChannelLevelSchema = external_exports.enum(["everything", "mentions"]);
65158
65357
  var callerChannelSchemaDefinition = external_exports.object({
65159
- id: idSchema14,
65358
+ id: idSchema15,
65160
65359
  name: external_exports.string(),
65161
65360
  kind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65162
65361
  unread: external_exports.number().int().nonnegative(),
@@ -65170,9 +65369,9 @@ var callerChannelSchemaDefinition = external_exports.object({
65170
65369
  isDefault: external_exports.boolean().default(false)
65171
65370
  });
65172
65371
  var setChannelLevelInputSchemaDefinition = external_exports.object({
65173
- workspaceId: workspaceIdSchema10,
65174
- agentId: idSchema14,
65175
- channelId: idSchema14,
65372
+ workspaceId: workspaceIdSchema11,
65373
+ agentId: idSchema15,
65374
+ channelId: idSchema15,
65176
65375
  level: agentChannelLevelSchema
65177
65376
  });
65178
65377
  var setChannelLevelInputSchema = setChannelLevelInputSchemaDefinition;
@@ -65195,12 +65394,12 @@ var postAsCallerInputSchemaDefinition = external_exports.object({
65195
65394
  /** A channel's name (with or without `#`) or id. */
65196
65395
  channel: external_exports.string().trim().min(1).max(81),
65197
65396
  body: external_exports.string().trim().min(1).max(4e4),
65198
- threadRootId: idSchema14.optional(),
65397
+ threadRootId: idSchema15.optional(),
65199
65398
  /** The messages of the agent's turn this post answers. */
65200
- answers: external_exports.array(idSchema14).max(200).optional()
65399
+ answers: external_exports.array(idSchema15).max(200).optional()
65201
65400
  });
65202
65401
  var replyAsCallerInputSchemaDefinition = external_exports.object({
65203
- messageId: idSchema14,
65402
+ messageId: idSchema15,
65204
65403
  body: external_exports.string().trim().min(1).max(4e4),
65205
65404
  /** Needed for a message that is not in the caller's inbox. */
65206
65405
  channel: external_exports.string().trim().min(1).max(81).optional(),
@@ -65209,18 +65408,18 @@ var replyAsCallerInputSchemaDefinition = external_exports.object({
65209
65408
  /** A thread reply also shows in the channel, as "Also send to #channel" does. */
65210
65409
  alsoInChannel: external_exports.boolean().optional(),
65211
65410
  /** The other messages of the agent's turn this reply answers. */
65212
- answers: external_exports.array(idSchema14).max(200).optional()
65411
+ answers: external_exports.array(idSchema15).max(200).optional()
65213
65412
  });
65214
65413
  var postedMessageSchemaDefinition = external_exports.object({
65215
- messageId: idSchema14,
65216
- channelId: idSchema14,
65217
- threadRootId: idSchema14.nullable(),
65414
+ messageId: idSchema15,
65415
+ channelId: idSchema15,
65416
+ threadRootId: idSchema15.nullable(),
65218
65417
  /** Workspace members the message mentioned who are not in the channel: it did not reach them. */
65219
65418
  notInChannel: external_exports.array(external_exports.object({ ...notInChannelSchema.shape, name: external_exports.string() })).default([]),
65220
65419
  /** Mentioned agents that are paused or out of usage: the message waits for each of them. */
65221
65420
  waitsFor: external_exports.array(
65222
65421
  external_exports.object({
65223
- agentId: idSchema14,
65422
+ agentId: idSchema15,
65224
65423
  name: external_exports.string(),
65225
65424
  cause: external_exports.enum(["paused", "out_of_usage"]),
65226
65425
  /** When an agent out of usage gets its usage back; null while paused. */
@@ -65235,15 +65434,15 @@ var searchAsCallerInputSchemaDefinition = external_exports.object({
65235
65434
  });
65236
65435
  var callerActorNameSchema = external_exports.object({
65237
65436
  kind: external_exports.enum(["person", "agent"]),
65238
- id: idSchema14,
65437
+ id: idSchema15,
65239
65438
  name: external_exports.string()
65240
65439
  });
65241
65440
  var callerSearchHitSchemaDefinition = external_exports.object({
65242
- messageId: idSchema14,
65243
- channelId: idSchema14,
65441
+ messageId: idSchema15,
65442
+ channelId: idSchema15,
65244
65443
  channelName: external_exports.string(),
65245
65444
  channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65246
- threadRootId: idSchema14.nullable(),
65445
+ threadRootId: idSchema15.nullable(),
65247
65446
  seq: external_exports.number().int().positive(),
65248
65447
  /** `external` for a mirrored message from someone outside Laze. */
65249
65448
  author: external_exports.object({
@@ -65265,7 +65464,7 @@ var callerSearchResultSchemaDefinition = external_exports.object({
65265
65464
  /** Names for the mention tokens in the bodies. */
65266
65465
  mentions: external_exports.object({
65267
65466
  actors: external_exports.array(callerActorNameSchema),
65268
- channels: external_exports.array(external_exports.object({ id: idSchema14, name: external_exports.string() }))
65467
+ channels: external_exports.array(external_exports.object({ id: idSchema15, name: external_exports.string() }))
65269
65468
  })
65270
65469
  });
65271
65470
  var agentActivityInputSchemaDefinition = external_exports.object({
@@ -65337,14 +65536,14 @@ var codexLoginRefreshInputSchemaDefinition = external_exports.object({
65337
65536
  authJson: external_exports.string().min(2).max(CODEX_LOGIN_MAX_LENGTH)
65338
65537
  });
65339
65538
  var AgentApi = moduleApi()("agent");
65340
- var agentCoreTrpc = defineTrpcContract("agents").query("list").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(external_exports.array(agentListEntrySchema)).mutation("create").withInput(createAgentInputSchema).withOutput(agentSchema).mutation("update").withInput(updateAgentInputSchema).withOutput(agentSchema).mutation("remove").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).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: workspaceIdSchema10 })).withOutput(external_exports.array(agentFaceSchema)).query("presence").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(external_exports.array(agentPresenceSchema)).mutation("uploadAvatar").withInput(uploadAgentAvatarInputSchema).withOutput(uploadedAgentAvatarSchema).query("access").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(agentAccessSchema).query("loginActivity").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(loginActivitySchema).mutation("raiseBudget").withInput(raiseBudgetInputSchema).withOutput(external_exports.object({ limitUsd: external_exports.number() })).query("permissionPrompts").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.array(agentPermissionPromptSchema)).mutation("share").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).mutation("unshare").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).query("harnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(harnessLoginsSchema).mutation("saveHarnessLogin").withInput(saveHarnessLoginInputSchema).withOutput(harnessLoginsSchema).mutation("removeHarnessLogin").withInput(removeHarnessLoginInputSchema).withOutput(harnessLoginsSchema).query("listHarnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).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: workspaceIdSchema10 })).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: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.object({ channelId: idSchema14 })).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: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("setGithub").withInput(setAgentGithubInputSchema).withOutput(agentSchema).query("githubWatches").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).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();
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: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.array(agentMonitorSchema)).query("channelLevel").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14, channelId: idSchema14 })).withOutput(channelLevelSchema).mutation("setChannelLevel").withInput(setChannelLevelInputSchema).withOutput(channelLevelSchema).mutation("unmuteChannel").withInput(unmuteAgentChannelInputSchema).withOutput(channelLevelSchema).mutation("cancelHeld").withInput(cancelHeldInputSchema).withOutput(cancelHeldResultSchema).build();
65539
+ 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();
65540
+ 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();
65541
+ 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
65542
  var agentJoinTrpc = defineTrpcContract("agents").query("joinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("approveJoinRequest").withInput(approveJoinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("denyJoinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).build();
65344
65543
  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: workspaceIdSchema10 })).withOutput(workspaceDefaultAgentSchema).mutation("setWorkspaceDefault").withInput(setWorkspaceDefaultAgentInputSchema).withOutput(workspaceDefaultAgentSchema).build();
65346
- var agentRuntimeChoiceTrpc = defineTrpcContract("agents").query("lastRuntime").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(lastRuntimeSchema).build();
65347
- var agentArchiveTrpc = defineTrpcContract("agents").query("archived").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).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) })).build();
65544
+ var agentWorkspaceDefaultTrpc = defineTrpcContract("agents").query("workspaceDefault").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(workspaceDefaultAgentSchema).mutation("setWorkspaceDefault").withInput(setWorkspaceDefaultAgentInputSchema).withOutput(workspaceDefaultAgentSchema).build();
65545
+ var agentRuntimeChoiceTrpc = defineTrpcContract("agents").query("lastRuntime").withInput(external_exports.object({ workspaceId: workspaceIdSchema11 })).withOutput(lastRuntimeSchema).build();
65546
+ 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
65547
  var agentTrpc = joinTrpcContracts(
65349
65548
  "agents",
65350
65549
  agentCoreTrpc,
@@ -65364,6 +65563,7 @@ var AgentLoginCardSlot = agentUi.component("loginCard");
65364
65563
  var AgentBudgetCardSlot = agentUi.component("budgetCard");
65365
65564
  var AgentStopTurnSlot = agentUi.component("stopTurn");
65366
65565
  var AgentLiveStepsSlot = agentUi.component("liveSteps");
65566
+ var AgentCatchUpSlot = agentUi.component("catchUp");
65367
65567
  var AgentSessionHooksToken = agentUi.hooks("session");
65368
65568
  var AgentCreateDialogSlot = agentUi.component("createDialog");
65369
65569
  var AgentEditDialogSlot = agentUi.component("editDialog");
@@ -65472,34 +65672,36 @@ var agentKeepsFailingPayloadSchemaDefinition = external_exports.object({
65472
65672
  });
65473
65673
 
65474
65674
  // ../../modules/agent/contract/src/agent-caller-access.ts
65475
- var agentRefSchema6 = external_exports.string().trim().min(1).max(80);
65476
- var idSchema15 = external_exports.string().min(1).max(64);
65477
- var agentAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema6 });
65675
+ var agentRefSchema7 = external_exports.string().trim().min(1).max(80);
65676
+ var idSchema16 = external_exports.string().min(1).max(64);
65677
+ var agentAsCallerInputSchemaDefinition = external_exports.object({ agent: agentRefSchema7 });
65478
65678
  var shareAgentAsCallerInputSchemaDefinition = external_exports.object({
65479
- agent: agentRefSchema6,
65679
+ agent: agentRefSchema7,
65480
65680
  grantee: agentGranteeSchema
65481
65681
  });
65482
65682
  var stopTurnAsCallerInputSchemaDefinition = external_exports.object({
65483
- agent: agentRefSchema6,
65484
- channelId: idSchema15
65683
+ agent: agentRefSchema7,
65684
+ channelId: idSchema16
65485
65685
  });
65486
65686
  var retryTurnAsCallerInputSchemaDefinition = external_exports.object({
65487
- agent: agentRefSchema6,
65488
- channelId: idSchema15,
65489
- messageId: idSchema15
65687
+ agent: agentRefSchema7,
65688
+ channelId: idSchema16,
65689
+ messageId: idSchema16
65490
65690
  });
65491
65691
  var postTurnFailureAsCallerInputSchemaDefinition = external_exports.object({
65492
- channelId: idSchema15,
65493
- threadRootId: idSchema15.optional(),
65692
+ channelId: idSchema16,
65693
+ threadRootId: idSchema16.optional(),
65494
65694
  /** The person's message the turn was on, which Try again sends to the agent again. */
65495
- messageId: idSchema15,
65695
+ messageId: idSchema16,
65696
+ /** The attempt that failed, so Try again knows once a later one is stored. */
65697
+ attempt: external_exports.number().int().min(1).optional(),
65496
65698
  line: external_exports.string().trim().min(1).max(1e3),
65497
65699
  details: external_exports.string().trim().min(1).max(2e3)
65498
65700
  });
65499
65701
  var mintLinkAsCallerInputSchemaDefinition = external_exports.object({
65500
65702
  /** Left out, the agent that joins with the link names itself. */
65501
65703
  name: external_exports.string().trim().max(80).optional(),
65502
- channelId: idSchema15.optional()
65704
+ channelId: idSchema16.optional()
65503
65705
  });
65504
65706
 
65505
65707
  // ../../modules/agent/contract/src/agent-secret-sweep.ts
@@ -65609,25 +65811,25 @@ var agentScheduledRunMissedPayloadSchemaDefinition = external_exports.object({
65609
65811
  });
65610
65812
 
65611
65813
  // ../../modules/agent/contract/src/agent-history.ts
65612
- var idSchema16 = external_exports.string().min(1).max(80);
65814
+ var idSchema17 = external_exports.string().min(1).max(80);
65613
65815
  var CALLER_HISTORY_LIMIT_MAX = 100;
65614
65816
  var historyAsCallerInputSchemaDefinition = external_exports.object({
65615
65817
  /** A channel the key's speaker is in, by id or name. */
65616
65818
  channel: external_exports.string().trim().min(1).max(200),
65617
65819
  /** Messages before this Laze message; none reads the newest page. */
65618
- before: idSchema16.optional(),
65820
+ before: idSchema17.optional(),
65619
65821
  /** Already past the cache: no cached messages, only where the live read goes on. */
65620
65822
  olderThan: external_exports.iso.datetime().optional(),
65621
65823
  limit: external_exports.number().int().min(1).max(CALLER_HISTORY_LIMIT_MAX).default(50)
65622
65824
  });
65623
65825
  var callerHistoryMessageSchemaDefinition = external_exports.object({
65624
- messageId: idSchema16,
65625
- threadRootId: idSchema16.nullable(),
65826
+ messageId: idSchema17,
65827
+ threadRootId: idSchema17.nullable(),
65626
65828
  seq: external_exports.number().int().positive(),
65627
65829
  /** `external` for a mirrored message from someone outside Laze. */
65628
65830
  author: external_exports.object({
65629
65831
  kind: external_exports.enum(["person", "agent", "external"]),
65630
- id: idSchema16,
65832
+ id: idSchema17,
65631
65833
  name: external_exports.string()
65632
65834
  }),
65633
65835
  body: external_exports.string(),
@@ -65637,7 +65839,7 @@ var callerHistoryMessageSchemaDefinition = external_exports.object({
65637
65839
  originKey: external_exports.string().nullable()
65638
65840
  });
65639
65841
  var callerHistorySchemaDefinition = external_exports.object({
65640
- channelId: idSchema16,
65842
+ channelId: idSchema17,
65641
65843
  channelName: external_exports.string(),
65642
65844
  channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65643
65845
  /** The outside workspace a mirrored conversation shows, such as "Slack ACME HQ". */
@@ -65651,12 +65853,12 @@ var callerHistorySchemaDefinition = external_exports.object({
65651
65853
  });
65652
65854
 
65653
65855
  // ../../modules/agent/contract/src/agent-channel-admin.ts
65654
- var idSchema17 = external_exports.string().min(1).max(80);
65856
+ var idSchema18 = external_exports.string().min(1).max(80);
65655
65857
  var channelRefSchema = external_exports.string().trim().min(1).max(200);
65656
65858
  var channelAsCallerInputSchemaDefinition = external_exports.object({ channel: channelRefSchema });
65657
65859
  var callerChannelMemberSchemaDefinition = external_exports.object({
65658
65860
  kind: external_exports.enum(["person", "agent"]),
65659
- id: idSchema17,
65861
+ id: idSchema18,
65660
65862
  name: external_exports.string(),
65661
65863
  role: external_exports.enum(["admin", "member"]),
65662
65864
  /** Active, away or unknown for a person the speaker may see; absent for agents. */
@@ -65666,7 +65868,7 @@ var callerChannelMemberSchemaDefinition = external_exports.object({
65666
65868
  doNotDisturb: doNotDisturbSchema.nullable().optional()
65667
65869
  });
65668
65870
  var callerChannelDetailSchemaDefinition = external_exports.object({
65669
- id: idSchema17,
65871
+ id: idSchema18,
65670
65872
  name: external_exports.string(),
65671
65873
  kind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65672
65874
  topic: external_exports.string(),
@@ -65697,17 +65899,17 @@ var activityAsCallerInputSchemaDefinition = external_exports.object({
65697
65899
  limit: external_exports.number().int().min(1).max(100).default(50)
65698
65900
  });
65699
65901
  var callerActivityItemSchemaDefinition = external_exports.object({
65700
- id: idSchema17,
65902
+ id: idSchema18,
65701
65903
  kind: external_exports.enum(["mention", "thread_reply", "keyword", "reaction"]),
65702
- channelId: idSchema17,
65904
+ channelId: idSchema18,
65703
65905
  channelName: external_exports.string(),
65704
65906
  channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65705
- messageId: idSchema17,
65706
- threadRootId: idSchema17.nullable(),
65907
+ messageId: idSchema18,
65908
+ threadRootId: idSchema18.nullable(),
65707
65909
  /** `external` is someone outside Laze whose message a mirror brought in, named at the source. */
65708
65910
  actor: external_exports.object({
65709
65911
  kind: external_exports.enum(["person", "agent", "external"]),
65710
- id: idSchema17,
65912
+ id: idSchema18,
65711
65913
  name: external_exports.string()
65712
65914
  }),
65713
65915
  emoji: external_exports.string().nullable(),
@@ -65724,12 +65926,12 @@ var setStatusAsCallerInputSchemaDefinition = setStatusInputSchema.omit({ workspa
65724
65926
  var setAwayAsCallerInputSchemaDefinition = external_exports.object({ away: external_exports.boolean() });
65725
65927
 
65726
65928
  // ../../modules/agent/contract/src/agent-scheduled.ts
65727
- var idSchema18 = external_exports.string().min(1).max(80);
65929
+ var idSchema19 = external_exports.string().min(1).max(80);
65728
65930
  var channelRefSchema2 = external_exports.string().trim().min(1).max(200);
65729
65931
  var scheduleAsCallerInputSchemaDefinition = external_exports.object({
65730
65932
  channel: channelRefSchema2.optional(),
65731
- threadRootId: idSchema18.optional(),
65732
- replyTo: idSchema18.optional(),
65933
+ threadRootId: idSchema19.optional(),
65934
+ replyTo: idSchema19.optional(),
65733
65935
  body: external_exports.string().trim().min(1).max(4e4),
65734
65936
  sendAt: external_exports.iso.datetime({ offset: true }),
65735
65937
  /** A reply that also goes to the channel at its time (`--also-channel`). */
@@ -65740,9 +65942,9 @@ var scheduleAsCallerInputSchemaDefinition = external_exports.object({
65740
65942
  var listScheduledAsCallerInputSchemaDefinition = external_exports.object({
65741
65943
  channel: channelRefSchema2.optional()
65742
65944
  });
65743
- var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId: idSchema18 });
65945
+ var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId: idSchema19 });
65744
65946
  var editScheduledAsCallerInputSchemaDefinition = external_exports.object({
65745
- scheduledId: idSchema18,
65947
+ scheduledId: idSchema19,
65746
65948
  body: external_exports.string().trim().min(1).max(4e4).optional(),
65747
65949
  sendAt: external_exports.iso.datetime({ offset: true }).optional()
65748
65950
  }).refine((input2) => input2.body !== void 0 || input2.sendAt !== void 0, {
@@ -66789,7 +66991,7 @@ var dismissSlackLinkPromptInputSchemaDefinition = external_exports.object({
66789
66991
  var dismissSlackLinkPromptInputSchema = dismissSlackLinkPromptInputSchemaDefinition;
66790
66992
 
66791
66993
  // ../../modules/slack/contract/src/slack-move.ts
66792
- var workspaceIdSchema11 = external_exports.string().min(1);
66994
+ var workspaceIdSchema12 = external_exports.string().min(1);
66793
66995
  var teamIdSchema = external_exports.string().regex(/^[TE][A-Z0-9]{2,20}$/);
66794
66996
  var slackChannelIdSchema = external_exports.string().regex(/^[CG][A-Z0-9]{2,20}$/);
66795
66997
  var slackUserIdSchema = external_exports.string().regex(/^[UW][A-Z0-9]{2,20}$/);
@@ -66862,7 +67064,7 @@ var slackMovePreviewSchemaDefinition = external_exports.object({
66862
67064
  });
66863
67065
  var slackMovePreviewSchema = slackMovePreviewSchemaDefinition;
66864
67066
  var slackMoveChannelInputSchemaDefinition = external_exports.object({
66865
- workspaceId: workspaceIdSchema11,
67067
+ workspaceId: workspaceIdSchema12,
66866
67068
  teamId: teamIdSchema,
66867
67069
  slackChannelId: slackChannelIdSchema
66868
67070
  });
@@ -66877,7 +67079,7 @@ var slackMoveRequestSchemaDefinition = external_exports.object({
66877
67079
  farewell: external_exports.string().trim().min(1).max(SLACK_FAREWELL_MAX).optional()
66878
67080
  });
66879
67081
  var startSlackMovesInputSchemaDefinition = external_exports.object({
66880
- workspaceId: workspaceIdSchema11,
67082
+ workspaceId: workspaceIdSchema12,
66881
67083
  teamId: teamIdSchema,
66882
67084
  channels: external_exports.array(slackMoveRequestSchemaDefinition).min(1).max(SLACK_MOVE_BATCH_MAX)
66883
67085
  });
@@ -66892,7 +67094,7 @@ var startedSlackMovesSchemaDefinition = external_exports.object({
66892
67094
  });
66893
67095
  var startedSlackMovesSchema = startedSlackMovesSchemaDefinition;
66894
67096
  var slackMoveInputSchemaDefinition = external_exports.object({
66895
- workspaceId: workspaceIdSchema11,
67097
+ workspaceId: workspaceIdSchema12,
66896
67098
  moveId: external_exports.string().min(1).max(100)
66897
67099
  });
66898
67100
  var slackMoveInputSchema = slackMoveInputSchemaDefinition;
@@ -66934,7 +67136,7 @@ var slackProfilesSchemaDefinition = external_exports.object({
66934
67136
  var slackProfilesSchema = slackProfilesSchemaDefinition;
66935
67137
 
66936
67138
  // ../../modules/slack/contract/src/slack-setup.ts
66937
- var workspaceIdSchema12 = external_exports.string().min(1);
67139
+ var workspaceIdSchema13 = external_exports.string().min(1);
66938
67140
  var appKeySchema = external_exports.string().regex(/^[a-z0-9]{8,64}$/);
66939
67141
  var returnToSchema3 = external_exports.string().startsWith("/").max(500).optional();
66940
67142
  var slackAppCredentialFieldSchema = external_exports.enum([
@@ -66943,7 +67145,7 @@ var slackAppCredentialFieldSchema = external_exports.enum([
66943
67145
  "clientSecret",
66944
67146
  "signingSecret"
66945
67147
  ]);
66946
- var beginSlackSetupInputSchemaDefinition = external_exports.object({ workspaceId: workspaceIdSchema12 });
67148
+ var beginSlackSetupInputSchemaDefinition = external_exports.object({ workspaceId: workspaceIdSchema13 });
66947
67149
  var beginSlackSetupInputSchema = beginSlackSetupInputSchemaDefinition;
66948
67150
  var slackSetupSchemaDefinition = external_exports.object({
66949
67151
  appKey: appKeySchema,
@@ -66957,7 +67159,7 @@ var slackSetupSchemaDefinition = external_exports.object({
66957
67159
  });
66958
67160
  var slackSetupSchema = slackSetupSchemaDefinition;
66959
67161
  var saveSlackAppCredentialsInputSchemaDefinition = external_exports.object({
66960
- workspaceId: workspaceIdSchema12,
67162
+ workspaceId: workspaceIdSchema13,
66961
67163
  appKey: appKeySchema,
66962
67164
  appId: external_exports.string().max(200),
66963
67165
  clientId: external_exports.string().max(200),
@@ -66967,7 +67169,7 @@ var saveSlackAppCredentialsInputSchemaDefinition = external_exports.object({
66967
67169
  });
66968
67170
  var saveSlackAppCredentialsInputSchema = saveSlackAppCredentialsInputSchemaDefinition;
66969
67171
  var installSlackAppInputSchemaDefinition = external_exports.object({
66970
- workspaceId: workspaceIdSchema12,
67172
+ workspaceId: workspaceIdSchema13,
66971
67173
  appKey: appKeySchema,
66972
67174
  returnTo: returnToSchema3
66973
67175
  });
@@ -67086,7 +67288,7 @@ var slackEventsPausedPayloadSchemaDefinition = external_exports.object({
67086
67288
  var SLACK_CACHE_DAYS_MAX = 30;
67087
67289
  var SLACK_HISTORY_PATH = "/api/slack/history";
67088
67290
  var SLACK_READ_BUDGET_MAX = 5e3;
67089
- var workspaceIdSchema13 = external_exports.string().min(1);
67291
+ var workspaceIdSchema14 = external_exports.string().min(1);
67090
67292
  var teamIdSchema2 = external_exports.string().regex(/^[TE][A-Z0-9]{2,20}$/);
67091
67293
  var slackChannelIdSchema2 = external_exports.string().regex(/^[CG][A-Z0-9]{2,20}$/);
67092
67294
  var slackConnectionStatusSchema = external_exports.enum(["connected", "needs_reinstall"]);
@@ -67150,13 +67352,13 @@ var slackChannelViewSchemaDefinition = external_exports.object({
67150
67352
  });
67151
67353
  var slackChannelViewSchema = slackChannelViewSchemaDefinition;
67152
67354
  var startSlackInstallInputSchemaDefinition = external_exports.object({
67153
- workspaceId: workspaceIdSchema13,
67355
+ workspaceId: workspaceIdSchema14,
67154
67356
  /** A path in Laze to land on afterwards; defaults to the Connectors page. */
67155
67357
  returnTo: external_exports.string().startsWith("/").max(500).optional()
67156
67358
  });
67157
67359
  var startSlackInstallInputSchema = startSlackInstallInputSchemaDefinition;
67158
67360
  var startSlackLinkInputSchemaDefinition = external_exports.object({
67159
- workspaceId: workspaceIdSchema13,
67361
+ workspaceId: workspaceIdSchema14,
67160
67362
  teamId: teamIdSchema2,
67161
67363
  returnTo: external_exports.string().startsWith("/").max(500).optional()
67162
67364
  });
@@ -67164,7 +67366,7 @@ var startSlackLinkInputSchema = startSlackLinkInputSchemaDefinition;
67164
67366
  var startedSlackAuthorizeSchemaDefinition = external_exports.object({ authorizeUrl: external_exports.url() });
67165
67367
  var startedSlackAuthorizeSchema = startedSlackAuthorizeSchemaDefinition;
67166
67368
  var startSlackSetupInputSchemaDefinition = external_exports.object({
67167
- workspaceId: workspaceIdSchema13,
67369
+ workspaceId: workspaceIdSchema14,
67168
67370
  configToken: external_exports.string().trim().min(10).max(1e3),
67169
67371
  returnTo: external_exports.string().startsWith("/").max(500).optional()
67170
67372
  });
@@ -67183,19 +67385,19 @@ var slackEventsHeadersSchemaDefinition = external_exports.object({
67183
67385
  });
67184
67386
  var slackEventsAnswerSchemaDefinition = external_exports.object({ challenge: external_exports.string().nullable() });
67185
67387
  var teamInputSchemaDefinition = external_exports.object({
67186
- workspaceId: workspaceIdSchema13,
67388
+ workspaceId: workspaceIdSchema14,
67187
67389
  teamId: teamIdSchema2
67188
67390
  });
67189
67391
  var slackTeamInputSchema = teamInputSchemaDefinition;
67190
67392
  var setSlackMirrorInputSchemaDefinition = external_exports.object({
67191
- workspaceId: workspaceIdSchema13,
67393
+ workspaceId: workspaceIdSchema14,
67192
67394
  teamId: teamIdSchema2,
67193
67395
  slackChannelId: slackChannelIdSchema2,
67194
67396
  mirrored: external_exports.boolean()
67195
67397
  });
67196
67398
  var setSlackMirrorInputSchema = setSlackMirrorInputSchemaDefinition;
67197
67399
  var updateSlackConnectionInputSchemaDefinition = external_exports.object({
67198
- workspaceId: workspaceIdSchema13,
67400
+ workspaceId: workspaceIdSchema14,
67199
67401
  teamId: teamIdSchema2,
67200
67402
  label: external_exports.string().trim().max(80).nullable().optional(),
67201
67403
  cacheDays: external_exports.number().int().min(1).max(SLACK_CACHE_DAYS_MAX).optional(),
@@ -67203,17 +67405,17 @@ var updateSlackConnectionInputSchemaDefinition = external_exports.object({
67203
67405
  });
67204
67406
  var updateSlackConnectionInputSchema = updateSlackConnectionInputSchemaDefinition;
67205
67407
  var updateSlackAppInputSchemaDefinition = external_exports.object({
67206
- workspaceId: workspaceIdSchema13,
67408
+ workspaceId: workspaceIdSchema14,
67207
67409
  teamId: teamIdSchema2,
67208
67410
  configToken: external_exports.string().trim().min(10).max(1e3)
67209
67411
  });
67210
67412
  var updateSlackAppInputSchema = updateSlackAppInputSchemaDefinition;
67211
67413
  var slackLinkParamsSchemaDefinition = external_exports.object({
67212
- workspaceId: workspaceIdSchema13,
67414
+ workspaceId: workspaceIdSchema14,
67213
67415
  teamId: teamIdSchema2
67214
67416
  });
67215
67417
  var slackHistoryInputSchemaDefinition = external_exports.object({
67216
- workspaceId: workspaceIdSchema13,
67418
+ workspaceId: workspaceIdSchema14,
67217
67419
  /** The Laze conversation that mirrors the Slack channel. */
67218
67420
  channelId: external_exports.string().min(1),
67219
67421
  /** Messages before this time; the oldest message the cache shows. */
@@ -67243,7 +67445,7 @@ var slackHistoryPageSchemaDefinition = external_exports.object({
67243
67445
  });
67244
67446
  var slackHistoryPageSchema = slackHistoryPageSchemaDefinition;
67245
67447
  var slackFileParamsSchemaDefinition = external_exports.object({
67246
- workspaceId: workspaceIdSchema13,
67448
+ workspaceId: workspaceIdSchema14,
67247
67449
  /** The Laze conversation that mirrors the Slack channel. */
67248
67450
  channelId: external_exports.string().min(1).max(200),
67249
67451
  fileId: external_exports.string().regex(/^F[A-Z0-9]{2,30}$/)
@@ -67251,7 +67453,7 @@ var slackFileParamsSchemaDefinition = external_exports.object({
67251
67453
  var SLACK_SEARCH_QUERY_MIN = 2;
67252
67454
  var SLACK_SEARCH_QUERY_MAX = 200;
67253
67455
  var slackSearchInputSchemaDefinition = external_exports.object({
67254
- workspaceId: workspaceIdSchema13,
67456
+ workspaceId: workspaceIdSchema14,
67255
67457
  query: external_exports.string().trim().min(SLACK_SEARCH_QUERY_MIN).max(SLACK_SEARCH_QUERY_MAX)
67256
67458
  });
67257
67459
  var slackSearchInputSchema = slackSearchInputSchemaDefinition;
@@ -67299,7 +67501,7 @@ var slackSearchAnswerSchemaDefinition = external_exports.object({
67299
67501
  });
67300
67502
  var slackSearchAnswerSchema = slackSearchAnswerSchemaDefinition;
67301
67503
  var SlackApi = moduleApi()("slack");
67302
- var workspaceInput3 = external_exports.object({ workspaceId: workspaceIdSchema13 });
67504
+ var workspaceInput3 = external_exports.object({ workspaceId: workspaceIdSchema14 });
67303
67505
  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
67506
 
67305
67507
  // ../../modules/slack/contract/src/slack-keys.ts
@@ -68840,7 +69042,7 @@ import { chmod as chmod2, mkdir as mkdir5, readFile as readFile6, writeFile as w
68840
69042
  import { dirname as dirname5, join as join7 } from "node:path";
68841
69043
 
68842
69044
  // ../../modules/openclaw/contract/src/openclaw.ts
68843
- var workspaceIdSchema14 = external_exports.string().min(1);
69045
+ var workspaceIdSchema15 = external_exports.string().min(1);
68844
69046
  var connectionIdSchema = external_exports.string().min(1).max(80);
68845
69047
  var openclawAgentIdSchema = external_exports.string().min(1).max(120);
68846
69048
  var openclawConnectionStatusSchema = external_exports.enum([
@@ -68895,14 +69097,14 @@ var openclawOverviewSchemaDefinition = external_exports.object({
68895
69097
  });
68896
69098
  var openclawOverviewSchema = openclawOverviewSchemaDefinition;
68897
69099
  var connectOpenclawInputSchemaDefinition = external_exports.object({
68898
- workspaceId: workspaceIdSchema14,
69100
+ workspaceId: workspaceIdSchema15,
68899
69101
  gatewayUrl: external_exports.string().trim().min(1).max(500),
68900
69102
  token: external_exports.string().trim().min(1).max(500),
68901
69103
  label: external_exports.string().trim().min(1).max(80).optional()
68902
69104
  });
68903
69105
  var connectOpenclawInputSchema = connectOpenclawInputSchemaDefinition;
68904
69106
  var openclawConnectionRefSchemaDefinition = external_exports.object({
68905
- workspaceId: workspaceIdSchema14,
69107
+ workspaceId: workspaceIdSchema15,
68906
69108
  connectionId: connectionIdSchema
68907
69109
  });
68908
69110
  var openclawConnectionRefSchema = openclawConnectionRefSchemaDefinition;
@@ -68929,7 +69131,7 @@ var openclawAgentKeySchemaDefinition = external_exports.object({
68929
69131
  });
68930
69132
  var openclawAgentKeySchema = openclawAgentKeySchemaDefinition;
68931
69133
  var OpenclawApi = moduleApi()("openclaw");
68932
- var openclawTrpc = defineTrpcContract("openclaw").query("overview").withInput(external_exports.object({ workspaceId: workspaceIdSchema14 })).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();
69134
+ 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
69135
 
68934
69136
  // ../../modules/openclaw/contract/src/openclaw.config.ts
68935
69137
  var positiveInt5 = external_exports.coerce.number().int().positive();
@@ -71578,7 +71780,7 @@ var CREATE_USAGE = "Usage: laze agent create --name <name> [--description <text>
71578
71780
  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
71781
  var ARCHIVE_USAGE = "Usage: laze agent archive <agent>";
71580
71782
  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>";
71783
+ var TRANSFER_USAGE = "Usage: laze agent transfer <agent> <member: user id, email or name> | accept|decline|cancel <agent> | offers";
71582
71784
  var RESET_USAGE = "Usage: laze agent reset-session <agent>";
71583
71785
  var HARNESSES = /* @__PURE__ */ new Set(["laze-models", "claude-code", "codex"]);
71584
71786
  var PICTURE_TYPES = {
@@ -71776,18 +71978,52 @@ async function pauseAgent({
71776
71978
  `
71777
71979
  );
71778
71980
  }
71981
+ var TRANSFER_ANSWERS = {
71982
+ accept: { path: "/api/agents/transfer/accept", done: "is yours now" },
71983
+ decline: { path: "/api/agents/transfer/decline", done: "stays with its owner" },
71984
+ cancel: { path: "/api/agents/transfer/cancel", done: "is no longer offered" }
71985
+ };
71779
71986
  async function transferAgent({
71780
71987
  context,
71781
71988
  args
71782
71989
  }) {
71783
- const [, , agent2, to] = args.words;
71784
- if (!agent2 || !to) throw new CliUsageError(TRANSFER_USAGE);
71990
+ const [, , first, second] = args.words;
71991
+ if (first === "offers") return transferOffers({ context, args });
71992
+ const answer4 = first && Object.hasOwn(TRANSFER_ANSWERS, first) ? first : null;
71993
+ if (answer4) {
71994
+ if (!second) throw new CliUsageError(TRANSFER_USAGE);
71995
+ const { path, done } = TRANSFER_ANSWERS[answer4];
71996
+ const { client: client2 } = await signedIn({ context, args });
71997
+ const answered = await client2.post(path, { agent: second });
71998
+ if (args.flags.json) return context.out(`${JSON.stringify(answered, null, 2)}
71999
+ `);
72000
+ return context.out(`${second} ${done}.
72001
+ `);
72002
+ }
72003
+ if (!first || !second) throw new CliUsageError(TRANSFER_USAGE);
71785
72004
  const { client } = await signedIn({ context, args });
71786
- const moved = await client.post("/api/agents/transfer", { agent: agent2, to });
72005
+ const moved = await client.post("/api/agents/transfer", { agent: first, to: second });
71787
72006
  if (args.flags.json) return context.out(`${JSON.stringify(moved, null, 2)}
71788
72007
  `);
71789
- context.out(`Transferred ${moved.name} to ${to}.
72008
+ context.out(
72009
+ moved.kind === "personal" ? `Offered ${moved.name} to ${second}. It moves once they accept, within 7 days.
72010
+ ` : `Transferred ${moved.name} to ${second}.
72011
+ `
72012
+ );
72013
+ }
72014
+ async function transferOffers({
72015
+ context,
72016
+ args
72017
+ }) {
72018
+ const { client } = await signedIn({ context, args });
72019
+ const offers = await client.get("/api/agents/transfer/offers");
72020
+ if (args.flags.json) return context.out(`${JSON.stringify(offers, null, 2)}
72021
+ `);
72022
+ if (offers.length === 0) return context.out("No transfer offers are waiting.\n");
72023
+ for (const offer2 of offers) {
72024
+ context.out(`${offer2.agentName} to ${offer2.toUserId} until ${offer2.expiresAt}
71790
72025
  `);
72026
+ }
71791
72027
  }
71792
72028
  async function resetAgentSession({
71793
72029
  context,
@@ -72405,7 +72641,7 @@ var appConnectionClaimsSchemaDefinition = external_exports.object({
72405
72641
  exp: external_exports.number().int(),
72406
72642
  wid: external_exports.string().min(1),
72407
72643
  app: external_exports.string().min(1),
72408
- site: external_exports.enum(["draft", "published"]),
72644
+ site: external_exports.string().optional(),
72409
72645
  fn: external_exports.string().min(1),
72410
72646
  conn: external_exports.string().min(1),
72411
72647
  method: external_exports.string().min(1).max(16),
@@ -72430,7 +72666,7 @@ var APP_VISIBILITIES = ["restricted", "channel", "internal", "public"];
72430
72666
  var appVisibilitySchema = external_exports.enum(APP_VISIBILITIES);
72431
72667
  var APP_ROLES = ["viewer", "editor", "builder"];
72432
72668
  var appRoleSchema = external_exports.enum(APP_ROLES);
72433
- var appSiteSchema = external_exports.enum(["published", "draft"]);
72669
+ var legacySiteSchema = external_exports.enum(["published", "draft"]).optional();
72434
72670
  var appVersionIdSchema = external_exports.string().regex(/^[0-9a-f]{40}$/);
72435
72671
  var MAX_APP_BUILD_BYTES = 10 * 1024 * 1024;
72436
72672
  var appActorSchemaDefinition = external_exports.object({
@@ -72474,12 +72710,10 @@ var appSchemaDefinition = external_exports.object({
72474
72710
  channelId: external_exports.string().nullable(),
72475
72711
  owner: appActorSchema,
72476
72712
  visibility: appVisibilitySchema,
72477
- /** `https://<app>--<workspace>.<domain>`: the published app's own origin. */
72713
+ /** `https://<app>--<workspace>.<domain>`: the app's own origin. */
72478
72714
  publishedUrl: external_exports.string(),
72479
- /** The draft preview's origin, `https://<app>--<workspace>--draft.<domain>`. */
72480
- draftUrl: external_exports.string(),
72715
+ /** The live version; null before the first push or while the app is taken offline. */
72481
72716
  publishedVersion: appVersionIdSchema.nullable(),
72482
- draftVersion: appVersionIdSchema.nullable(),
72483
72717
  pendingPublish: publishRequestSchema.nullable(),
72484
72718
  /** The standing approval for public publishes; absent or null when every one asks. */
72485
72719
  publishLease: publishLeaseSchema.nullable().optional(),
@@ -72618,12 +72852,6 @@ var commitInputSchemaDefinition = external_exports.object({
72618
72852
  functions: appFunctionDeclarationsSchema.optional()
72619
72853
  });
72620
72854
  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
72855
  var revertInputSchemaDefinition = external_exports.object({
72628
72856
  ...appRefSchemaDefinition.shape,
72629
72857
  version: appVersionIdSchema,
@@ -72632,7 +72860,7 @@ var revertInputSchemaDefinition = external_exports.object({
72632
72860
  var revertInputSchema = revertInputSchemaDefinition;
72633
72861
  var publishInputSchemaDefinition = external_exports.object({
72634
72862
  ...appRefSchemaDefinition.shape,
72635
- /** Defaults to the version the draft preview serves. */
72863
+ /** Defaults to the newest version. */
72636
72864
  version: appVersionIdSchema.optional(),
72637
72865
  /** Defaults to the app's current visibility. */
72638
72866
  visibility: appVisibilitySchema.optional(),
@@ -72653,6 +72881,11 @@ var publishOutcomeSchemaDefinition = external_exports.object({
72653
72881
  app: appSchema
72654
72882
  });
72655
72883
  var publishOutcomeSchema = publishOutcomeSchemaDefinition;
72884
+ var appPushSchemaDefinition = external_exports.object({
72885
+ ...appVersionSchemaDefinition.shape,
72886
+ publish: publishOutcomeSchemaDefinition
72887
+ });
72888
+ var appPushSchema = appPushSchemaDefinition;
72656
72889
  var nameVersionInputSchemaDefinition = external_exports.object({
72657
72890
  ...appRefSchemaDefinition.shape,
72658
72891
  version: appVersionIdSchema,
@@ -72690,23 +72923,30 @@ function versionMessageVerdict(message2) {
72690
72923
  }
72691
72924
  var defineCollectionInputSchemaDefinition = external_exports.object({
72692
72925
  ...appRefSchemaDefinition.shape,
72693
- /** Schema changes start on the draft and reach the published app when it is published. */
72694
- site: appSiteSchema.default("draft"),
72926
+ /** A schema change applies to the live data at once; records keep their values. */
72927
+ site: legacySiteSchema,
72695
72928
  name: collectionNameSchema,
72696
72929
  fields: external_exports.array(collectionFieldSchema).min(1),
72697
72930
  rules: collectionRulesSchemaDefinition.optional()
72698
72931
  });
72699
72932
  var defineCollectionInputSchema = defineCollectionInputSchemaDefinition;
72700
- var siteRefSchemaDefinition = external_exports.object({ ...appRefSchemaDefinition.shape, site: appSiteSchema });
72701
- var siteRefSchema = siteRefSchemaDefinition;
72702
- var resetDraftDataInputSchemaDefinition = external_exports.object({
72933
+ var appDataRefSchemaDefinition = external_exports.object({
72934
+ ...appRefSchemaDefinition.shape,
72935
+ site: legacySiteSchema
72936
+ });
72937
+ var appDataRefSchema = appDataRefSchemaDefinition;
72938
+ var seedDataInputSchemaDefinition = external_exports.object({
72703
72939
  ...appRefSchemaDefinition.shape,
72704
- /** Test data to load after the reset, by collection. */
72940
+ /** Starter records by collection; a collection that already holds records is left alone. */
72705
72941
  records: external_exports.record(collectionNameSchema, external_exports.array(appRecordSchema)).default({})
72706
72942
  });
72707
- var resetDraftDataInputSchema = resetDraftDataInputSchemaDefinition;
72943
+ var seedDataInputSchema = seedDataInputSchemaDefinition;
72944
+ var seedOutcomeSchemaDefinition = external_exports.object({
72945
+ created: external_exports.record(external_exports.string(), external_exports.number().int().nonnegative()),
72946
+ skipped: external_exports.array(external_exports.string())
72947
+ });
72708
72948
  var listRecordsInputSchemaDefinition = external_exports.object({
72709
- ...siteRefSchemaDefinition.shape,
72949
+ ...appDataRefSchemaDefinition.shape,
72710
72950
  collection: collectionNameSchema,
72711
72951
  filter: external_exports.string().max(2e3).optional(),
72712
72952
  sort: external_exports.string().max(200).optional(),
@@ -72715,7 +72955,7 @@ var listRecordsInputSchemaDefinition = external_exports.object({
72715
72955
  });
72716
72956
  var listRecordsInputSchema = listRecordsInputSchemaDefinition;
72717
72957
  var writeRecordInputSchemaDefinition = external_exports.object({
72718
- ...siteRefSchemaDefinition.shape,
72958
+ ...appDataRefSchemaDefinition.shape,
72719
72959
  collection: collectionNameSchema,
72720
72960
  /** Absent creates a record; present updates that one. */
72721
72961
  recordId: external_exports.string().min(1).optional(),
@@ -72723,26 +72963,26 @@ var writeRecordInputSchemaDefinition = external_exports.object({
72723
72963
  });
72724
72964
  var writeRecordInputSchema = writeRecordInputSchemaDefinition;
72725
72965
  var deleteRecordInputSchemaDefinition = external_exports.object({
72726
- ...siteRefSchemaDefinition.shape,
72966
+ ...appDataRefSchemaDefinition.shape,
72727
72967
  collection: collectionNameSchema,
72728
72968
  recordId: external_exports.string().min(1)
72729
72969
  });
72730
72970
  var deleteRecordInputSchema = deleteRecordInputSchemaDefinition;
72731
- var appPreviewSchemaDefinition = external_exports.object({
72732
- site: appSiteSchema,
72971
+ var appAddressSchemaDefinition = external_exports.object({
72972
+ /** The live version. */
72733
72973
  version: appVersionIdSchema,
72734
- /** The site's own origin; opening it signs the person in through Laze. */
72974
+ /** The app's own origin; opening it signs the person in through Laze when it needs one. */
72735
72975
  url: external_exports.string()
72736
72976
  });
72737
72977
  var appPullSchemaDefinition = external_exports.object({
72738
72978
  app: external_exports.object({ id: external_exports.string(), name: external_exports.string(), slug: external_exports.string() }),
72739
- site: appSiteSchema,
72979
+ /** The live version, or the newest one while nothing is live. */
72740
72980
  version: appVersionIdSchema,
72741
72981
  files: external_exports.array(appFileSchema),
72742
72982
  collections: external_exports.array(collectionSchema)
72743
72983
  });
72744
72984
  var exportRecordsInputSchemaDefinition = external_exports.object({
72745
- ...siteRefSchemaDefinition.shape,
72985
+ ...appDataRefSchemaDefinition.shape,
72746
72986
  collection: collectionNameSchema,
72747
72987
  format: external_exports.enum(["csv", "json"]).default("csv")
72748
72988
  });
@@ -72765,17 +73005,14 @@ var appKeyCallerViewSchemaDefinition = external_exports.object({
72765
73005
  });
72766
73006
  var signInHandoffInputSchemaDefinition = external_exports.object({
72767
73007
  ...appRefSchemaDefinition.shape,
72768
- /** Left out, the published site when there is one, else the draft. */
72769
- site: appSiteSchema.optional(),
73008
+ site: legacySiteSchema,
72770
73009
  /** Where the app sends the person after sign-in; kept on the app's own origin. */
72771
73010
  returnPath: external_exports.string().max(2e3).default("/")
72772
73011
  });
72773
73012
  var signInHandoffInputSchema = signInHandoffInputSchemaDefinition;
72774
73013
  var signInHandoffSchemaDefinition = external_exports.object({
72775
- /** The app origin's callback, carrying a one-use token valid only for this app and site. */
73014
+ /** The app origin's callback, carrying a one-use token valid only for this app. */
72776
73015
  redirectUrl: external_exports.string(),
72777
- /** The site the token opens. */
72778
- site: appSiteSchema,
72779
73016
  expiresAt: external_exports.iso.datetime()
72780
73017
  });
72781
73018
  var signInHandoffSchema = signInHandoffSchemaDefinition;
@@ -72820,7 +73057,7 @@ var appViewSchemaDefinition = external_exports.object({
72820
73057
  });
72821
73058
  var appViewSchema = appViewSchemaDefinition;
72822
73059
  var saveViewInputSchemaDefinition = external_exports.object({
72823
- ...siteRefSchemaDefinition.shape,
73060
+ ...appDataRefSchemaDefinition.shape,
72824
73061
  view: external_exports.object({
72825
73062
  ...viewSpecShape,
72826
73063
  /** Absent creates a view, or replaces the collection's view of the same name. */
@@ -72830,7 +73067,7 @@ var saveViewInputSchemaDefinition = external_exports.object({
72830
73067
  });
72831
73068
  var saveViewInputSchema = saveViewInputSchemaDefinition;
72832
73069
  var deleteViewInputSchemaDefinition = external_exports.object({
72833
- ...siteRefSchemaDefinition.shape,
73070
+ ...appDataRefSchemaDefinition.shape,
72834
73071
  viewId: external_exports.string().min(1)
72835
73072
  });
72836
73073
  var deleteViewInputSchema = deleteViewInputSchemaDefinition;
@@ -72864,7 +73101,7 @@ var appCardChoiceSchemaDefinition = external_exports.object({
72864
73101
  var appCardChoiceSchema = appCardChoiceSchemaDefinition;
72865
73102
  var APP_IMPORT_LIMITS = { maxBytes: 5 * 1024 * 1024, maxRows: 1e4 };
72866
73103
  var importRecordsInputSchemaDefinition = external_exports.object({
72867
- ...siteRefSchemaDefinition.shape,
73104
+ ...appDataRefSchemaDefinition.shape,
72868
73105
  collection: collectionNameSchema,
72869
73106
  /** The file's text, header row first. */
72870
73107
  csv: external_exports.string(),
@@ -72893,7 +73130,6 @@ var appFunctionLogEntrySchemaDefinition = external_exports.object({
72893
73130
  at: external_exports.string(),
72894
73131
  function: external_exports.string(),
72895
73132
  requestId: external_exports.string(),
72896
- site: appSiteSchema.optional(),
72897
73133
  /** `request` is the platform's note of one call; the others are the function's own output. */
72898
73134
  level: external_exports.enum(["request", "debug", "info", "warn", "error"]),
72899
73135
  message: external_exports.string(),
@@ -72957,7 +73193,7 @@ var appBackupStatusSchemaDefinition = external_exports.object({
72957
73193
  /** The last daily restore check of this app's databases. */
72958
73194
  check: external_exports.object({
72959
73195
  at: external_exports.string(),
72960
- failures: external_exports.array(external_exports.object({ appId: external_exports.string(), site: external_exports.string(), error: external_exports.string() }))
73196
+ failures: external_exports.array(external_exports.object({ appId: external_exports.string(), error: external_exports.string() }))
72961
73197
  }).optional()
72962
73198
  });
72963
73199
  var appBackupStatusSchema = appBackupStatusSchemaDefinition;
@@ -73139,6 +73375,33 @@ var appUserMailClaimsSchemaDefinition = external_exports.object({
73139
73375
  code: external_exports.string().regex(/^\d{6}$/)
73140
73376
  });
73141
73377
 
73378
+ // ../../modules/app/contract/src/app.faults.ts
73379
+ var reportAppFaultInputSchemaDefinition = external_exports.object({ token: external_exports.string().min(1).max(16384) });
73380
+ var reportedAppFaultSchemaDefinition = external_exports.object({ filed: external_exports.boolean() });
73381
+ var appFaultClaimsSchemaDefinition = external_exports.object({
73382
+ iss: external_exports.literal("laze-apps"),
73383
+ aud: external_exports.array(external_exports.string()).refine((aud) => aud.includes("laze-app-fault")),
73384
+ exp: external_exports.number().int(),
73385
+ wid: external_exports.string().min(1),
73386
+ app: external_exports.string().min(1),
73387
+ /** Sent by hosts from before apps were trunk-based; ignored. */
73388
+ site: external_exports.enum(["draft", "published"]).optional(),
73389
+ ver: external_exports.string().min(1).max(64),
73390
+ vid: external_exports.string().min(1),
73391
+ vname: external_exports.string().max(200),
73392
+ kind: external_exports.enum(["error", "rejection", "banner", "api"]),
73393
+ msg: external_exports.string().min(1).max(1e3),
73394
+ stack: external_exports.string().max(4e3).optional(),
73395
+ req: external_exports.object({
73396
+ method: external_exports.string().max(16),
73397
+ path: external_exports.string().max(600),
73398
+ status: external_exports.number().int(),
73399
+ code: external_exports.string().max(160).optional()
73400
+ }).optional(),
73401
+ act: external_exports.string().max(400),
73402
+ page: external_exports.string().max(600)
73403
+ });
73404
+
73142
73405
  // ../../modules/app/contract/src/app.cost.ts
73143
73406
  var APP_COST_PARTS = [
73144
73407
  "storage",
@@ -73299,8 +73562,7 @@ var appTriggersSchemaDefinition = external_exports.object({
73299
73562
  var appTriggersSchema = appTriggersSchemaDefinition;
73300
73563
  var addAppTriggerInputSchemaDefinition = external_exports.object({
73301
73564
  ...appRefSchema.shape,
73302
- /** Only the published site has triggers; draft is refused with app_trigger_needs_published. */
73303
- site: appSiteSchema.default("published"),
73565
+ site: legacySiteSchema,
73304
73566
  collection: collectionNameSchema,
73305
73567
  on: external_exports.array(appTriggerOpSchema).min(1).max(3),
73306
73568
  where: appTriggerWhereSchema.default({}),
@@ -73401,7 +73663,7 @@ var appPinSchemaDefinition = external_exports.object({
73401
73663
  name: external_exports.string(),
73402
73664
  /** The reader's role in the app; null when they cannot open it. */
73403
73665
  role: appRoleSchema.nullable(),
73404
- /** Whether the app serves a published version, else its draft preview. */
73666
+ /** Whether the app has a live version. */
73405
73667
  published: external_exports.boolean(),
73406
73668
  pinnedBy: appActorSchema,
73407
73669
  pinnedByName: external_exports.string().nullable(),
@@ -73492,7 +73754,6 @@ var appBackupCheckFailureSchemaDefinition = external_exports.object({
73492
73754
  appId: external_exports.string(),
73493
73755
  appName: external_exports.string(),
73494
73756
  owner: appActorSchema,
73495
- site: external_exports.string(),
73496
73757
  error: external_exports.string()
73497
73758
  });
73498
73759
  var appBackupCheckAlertsSchemaDefinition = external_exports.object({
@@ -73507,7 +73768,7 @@ var appBackupCheckAlertsSchemaDefinition = external_exports.object({
73507
73768
  });
73508
73769
 
73509
73770
  // ../../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(appVersionSchema).mutation("publish").withInput(publishInputSchema).withOutput(publishOutcomeSchema).query("collections").withInput(siteRefSchema).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(siteRefSchema).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();
73771
+ 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
73772
  var appConnectionsTrpc = defineTrpcContract("app").query("connections").withInput(appRefSchema).withOutput(appConnectionsSchema).mutation("allowConnection").withInput(appConnectionRefSchema).withOutput(appConnectionsSchema).mutation("revokeConnection").withInput(appConnectionRefSchema).withOutput(appConnectionsSchema).build();
73512
73773
  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
73774
  var appTrpc = joinTrpcContracts("app", appMainTrpc, appConnectionsTrpc, appPinsTrpc);
@@ -73520,16 +73781,19 @@ var createAppByKeyInputSchemaDefinition = external_exports.object({
73520
73781
  channel: external_exports.string().min(1).optional()
73521
73782
  });
73522
73783
  var appByKeySchemaDefinition = external_exports.object({ appId: external_exports.string().min(1) });
73523
- var siteByKeySchemaDefinition = external_exports.object({
73784
+ var appDataByKeySchemaDefinition = external_exports.object({
73524
73785
  ...appByKeySchemaDefinition.shape,
73525
- site: appSiteSchema
73786
+ site: legacySiteSchema
73526
73787
  });
73527
73788
  var commitByKeyInputSchemaDefinition = commitInputSchema.omit(byKey);
73528
- var deployByKeyInputSchemaDefinition = deployInputSchema.omit(byKey);
73789
+ var legacyDeployByKeyInputSchemaDefinition = external_exports.object({
73790
+ ...appByKeySchemaDefinition.shape,
73791
+ version: appVersionIdSchema.optional()
73792
+ });
73529
73793
  var revertByKeyInputSchemaDefinition = revertInputSchema.omit(byKey);
73530
73794
  var publishByKeyInputSchemaDefinition = publishInputSchema.omit(byKey);
73531
73795
  var defineCollectionByKeyInputSchemaDefinition = defineCollectionInputSchema.omit(byKey);
73532
- var resetDraftByKeyInputSchemaDefinition = resetDraftDataInputSchema.omit(byKey);
73796
+ var seedByKeyInputSchemaDefinition = seedDataInputSchema.omit(byKey);
73533
73797
  var listRecordsByKeyInputSchemaDefinition = listRecordsInputSchema.omit(byKey);
73534
73798
  var writeRecordByKeyInputSchemaDefinition = writeRecordInputSchema.omit(byKey);
73535
73799
  var deleteRecordByKeyInputSchemaDefinition = deleteRecordInputSchema.omit(byKey);
@@ -73569,7 +73833,7 @@ var APP_TEMPLATES = ["tracker", "crm", "dashboard", "form"];
73569
73833
  var APP_MANIFEST_FILE = "laze.app.json";
73570
73834
  var appManifestSchemaDefinition = external_exports.object({
73571
73835
  app: external_exports.object({ id: external_exports.string().min(1), name: external_exports.string(), slug: appSlugSchema }),
73572
- /** Defined on the draft by every `laze app push`, before the version is recorded. */
73836
+ /** Defined by every `laze app push`, before the version is recorded. */
73573
73837
  collections: external_exports.record(
73574
73838
  collectionNameSchema,
73575
73839
  external_exports.object({
@@ -73578,16 +73842,16 @@ var appManifestSchemaDefinition = external_exports.object({
73578
73842
  rules: collectionRulesSchema.optional()
73579
73843
  })
73580
73844
  ).default({}),
73581
- /** `email` lets visitors of the published app sign up with an email code, after an approval. */
73845
+ /** `email` lets visitors of the app sign up with an email code, after an approval. */
73582
73846
  users: external_exports.enum(["email"]).optional(),
73583
73847
  /**
73584
73848
  * Per server function, the vault connections it calls with (by name) and the outside hosts it
73585
73849
  * reaches: `{ "funnel": { "connections": ["posthog-read"], "hosts": ["api.open-meteo.com"] } }`.
73586
73850
  */
73587
73851
  functions: appFunctionDeclarationsSchema.optional(),
73588
- /** Data viewer tabs, saved on the draft by every `laze app push` after the collections. */
73852
+ /** Data viewer tabs, saved by every `laze app push` after the collections. */
73589
73853
  views: external_exports.array(appViewSpecSchema).default([]),
73590
- /** Test records `laze app seed` and `laze app push --seed` load into the draft. */
73854
+ /** Test records `laze app seed` and `laze app push --seed` load as test data. */
73591
73855
  seed: external_exports.record(collectionNameSchema, external_exports.array(appRecordSchema)).default({})
73592
73856
  });
73593
73857
  var appManifestSchema = appManifestSchemaDefinition;
@@ -73607,8 +73871,8 @@ var appCliCommands = [
73607
73871
  {
73608
73872
  command: "laze app push",
73609
73873
  operation: "commitVersion",
73610
- arguments: ["[dir]", "-m <what changed>", "--seed", "--no-publish"],
73611
- summary: 'Record the folder as a new version and publish it, so people see the change; -m says what changed in plain words ("update" or "wip" is refused). --no-publish keeps it in the draft preview. A publish that needs an approval asks for it. Server functions in functions/<name>.js ship with it'
73874
+ arguments: ["[dir]", "-m <what changed>", "--seed"],
73875
+ 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
73876
  },
73613
73877
  {
73614
73878
  command: "laze app logs",
@@ -73617,22 +73881,22 @@ var appCliCommands = [
73617
73881
  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
73882
  },
73619
73883
  {
73620
- command: "laze app preview",
73621
- operation: "getPreview",
73622
- arguments: ["--site draft|published"],
73623
- summary: "Print the address of the draft preview (or the published app)"
73884
+ command: "laze app url",
73885
+ operation: "getAddress",
73886
+ arguments: [],
73887
+ summary: "Print the live app's address"
73624
73888
  },
73625
73889
  {
73626
73890
  command: "laze app pull",
73627
73891
  operation: "pullFiles",
73628
- arguments: ["[dir]", "--site published|draft"],
73629
- summary: "Download the app'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"
73892
+ arguments: ["[dir]"],
73893
+ 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
73894
  },
73631
73895
  {
73632
73896
  command: "laze app publish",
73633
73897
  operation: "requestPublish",
73634
73898
  arguments: ["[version]", "--visibility restricted|channel|internal|public"],
73635
- summary: "Publish now for the people who can open the app; opening it to more people waits for an approval"
73899
+ 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
73900
  },
73637
73901
  {
73638
73902
  command: "laze app make-internal",
@@ -73644,7 +73908,7 @@ var appCliCommands = [
73644
73908
  command: "laze app unpublish",
73645
73909
  operation: "unpublish",
73646
73910
  arguments: [],
73647
- summary: "Take the published address offline at once; the data stays"
73911
+ summary: "Take the app's address offline at once; the data and versions stay"
73648
73912
  },
73649
73913
  {
73650
73914
  command: "laze app members",
@@ -73806,13 +74070,13 @@ var appCliCommands = [
73806
74070
  command: "laze app backups",
73807
74071
  operation: "getBackups",
73808
74072
  arguments: ["[app]"],
73809
- summary: "How far back the published data can be restored, and past restores"
74073
+ summary: "How far back the app's data can be restored, and past restores"
73810
74074
  },
73811
74075
  {
73812
74076
  command: "laze app restore",
73813
74077
  operation: "restoreData",
73814
74078
  arguments: ["[app]", "--to <ISO time>", "--undo <restore-id>"],
73815
- summary: "Put the published data back to a time, or undo a restore (admins, a person's key)"
74079
+ summary: "Put the app's data back to a time, or undo a restore (admins, a person's key)"
73816
74080
  },
73817
74081
  {
73818
74082
  command: "laze app users",
@@ -73847,37 +74111,31 @@ var appCliCommands = [
73847
74111
  {
73848
74112
  command: "laze app revert",
73849
74113
  operation: "revertToVersion",
73850
- arguments: ["<version>", "-m <message>", "--no-publish"],
73851
- summary: "Go back: a new version with an older version's files, published like a push (--no-publish keeps it in the draft); no record is deleted"
73852
- },
73853
- {
73854
- command: "laze app discard",
73855
- operation: "discardDraft",
73856
- arguments: [],
73857
- summary: "Stop serving the draft preview"
74114
+ arguments: ["<version>", "-m <message>"],
74115
+ summary: "Switch to any version: a new version with its files, live like a push; no record is deleted"
73858
74116
  },
73859
74117
  {
73860
74118
  command: "laze app collections define",
73861
74119
  operation: "defineCollection",
73862
- arguments: ["<name>", "--fields <json|@file>", "--site draft|published"],
74120
+ arguments: ["<name>", "--fields <json|@file>"],
73863
74121
  summary: "Create or migrate a collection's schema"
73864
74122
  },
73865
74123
  {
73866
74124
  command: "laze app collections list",
73867
74125
  operation: "listCollections",
73868
- arguments: ["--site draft|published"],
74126
+ arguments: [],
73869
74127
  summary: "Show each collection's schema and version"
73870
74128
  },
73871
74129
  {
73872
74130
  command: "laze app views list",
73873
74131
  operation: "listViews",
73874
- arguments: ["--site draft|published"],
74132
+ arguments: [],
73875
74133
  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
74134
  },
73877
74135
  {
73878
74136
  command: "laze app views rm",
73879
74137
  operation: "deleteView",
73880
- arguments: ["<viewId>", "--site draft|published"],
74138
+ arguments: ["<viewId>"],
73881
74139
  summary: "Delete a Data viewer view by the id `laze app views list` prints; a collection keeps one"
73882
74140
  },
73883
74141
  {
@@ -73896,38 +74154,38 @@ var appCliCommands = [
73896
74154
  },
73897
74155
  {
73898
74156
  command: "laze app seed",
73899
- operation: "resetDraftData",
74157
+ operation: "seedData",
73900
74158
  arguments: ["--records <json|@file>"],
73901
- summary: "Empty the draft data and load test records (default: the manifest's seed)"
74159
+ summary: "Load starter records (default: the manifest's seed) into collections that hold none yet; nothing is emptied"
73902
74160
  },
73903
74161
  {
73904
74162
  command: "laze app records list",
73905
74163
  operation: "listRecords",
73906
- arguments: ["<collection>", "--filter <expr>", "--sort <fields>", "--page <n>", "--site"],
74164
+ arguments: ["<collection>", "--filter <expr>", "--sort <fields>", "--page <n>"],
73907
74165
  summary: "List records, filtered and sorted"
73908
74166
  },
73909
74167
  {
73910
74168
  command: "laze app records write",
73911
74169
  operation: "writeRecord",
73912
- arguments: ["<collection>", "[record-id]", "--data <json>", "--site"],
74170
+ arguments: ["<collection>", "[record-id]", "--data <json>"],
73913
74171
  summary: "Create a record, or update one by id"
73914
74172
  },
73915
74173
  {
73916
74174
  command: "laze app records delete",
73917
74175
  operation: "deleteRecord",
73918
- arguments: ["<collection>", "<record-id>", "--site"],
74176
+ arguments: ["<collection>", "<record-id>"],
73919
74177
  summary: "Delete a record"
73920
74178
  },
73921
74179
  {
73922
74180
  command: "laze app export",
73923
74181
  operation: "exportRecords",
73924
- arguments: ["<collection>", "--format csv|json", "--out <file>", "--site"],
74182
+ arguments: ["<collection>", "--format csv|json", "--out <file>"],
73925
74183
  summary: "Write a collection's records as CSV (or JSON)"
73926
74184
  },
73927
74185
  {
73928
74186
  command: "laze app import",
73929
74187
  operation: "importRecords",
73930
- arguments: ["[app]", "<collection>", "<file.csv>", "--site", "--dry-run", "--refused <file>"],
74188
+ arguments: ["[app]", "<collection>", "<file.csv>", "--dry-run", "--refused <file>"],
73931
74189
  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
74190
  }
73933
74191
  ];
@@ -74650,7 +74908,7 @@ var publicApps = async ({ context, args, signed: signed2 }) => {
74650
74908
  };
74651
74909
  function backupsText({ name: name3, status: status9 }) {
74652
74910
  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 published data replicates to object storage." : "The published data does not replicate on this host.";
74911
+ const replicating = status9.replicating ? "The app data replicates to object storage." : "The app data does not replicate on this host.";
74654
74912
  const restores = status9.restores.map(
74655
74913
  (entry) => ` ${entry.id} ${entry.to ? `to ${entry.to}` : `undid ${entry.undid ?? ""}`}
74656
74914
  `
@@ -74674,7 +74932,7 @@ var restore = async ({ context, args, open: open3 }) => {
74674
74932
  appId,
74675
74933
  ...to ? { to } : { undo }
74676
74934
  });
74677
- const text2 = done.to ? `${name3}'s published data is back to ${done.to} (${done.id}). laze app restore --undo ${done.id} undoes it.
74935
+ const text2 = done.to ? `${name3}'s data is back to ${done.to} (${done.id}). laze app restore --undo ${done.id} undoes it.
74678
74936
  ` : `${name3}'s data from before ${done.undid ?? undo} is back (${done.id}).
74679
74937
  `;
74680
74938
  print2({ context, args, value: done, text: text2 });
@@ -74919,7 +75177,7 @@ async function add({ context, args, open: open3, word: word3 }) {
74919
75177
  const { client, appId, name: name3 } = await open3();
74920
75178
  const trigger = await client.post("/api/apps/triggers/add", { appId, ...body });
74921
75179
  const text2 = `Added a trigger on ${name3}:
74922
- ${triggerLine(trigger)}Matching changes to published ${word3} records wake ${trigger.agentName} in ${trigger.channelName}.
75180
+ ${triggerLine(trigger)}Matching changes to ${word3} records wake ${trigger.agentName} in ${trigger.channelName}.
74923
75181
  `;
74924
75182
  print4({ context, args, value: trigger, text: text2 });
74925
75183
  }
@@ -75015,11 +75273,15 @@ async function appClient({
75015
75273
  const turn = await turnTokenOf({ context, args, client, agent: profile.kind === "agent" });
75016
75274
  return turn ? client.withHeaders({ "x-laze-turn": turn }) : client;
75017
75275
  }
75018
- function siteOf(args, fallback) {
75019
- const site = flagText({ args, name: "site", fallback });
75020
- if (site !== "draft" && site !== "published")
75021
- throw new CliUsageError("--site is draft or published");
75022
- return site;
75276
+ function noteRetiredFlags({ context, args }) {
75277
+ if (args.flags["no-publish"] !== void 0) {
75278
+ context.err(
75279
+ "laze: --no-publish is no longer needed and is ignored: every push is the live app. laze app revert <version> switches back.\n"
75280
+ );
75281
+ }
75282
+ if (args.flags.site !== void 0) {
75283
+ context.err("laze: --site is ignored: an app has one live version and one set of data.\n");
75284
+ }
75023
75285
  }
75024
75286
  function folderOf({ context, word: word3 }) {
75025
75287
  return resolve6(context.cwd, word3 ?? ".");
@@ -75141,7 +75403,7 @@ var appList = async ({ context, args }) => {
75141
75403
  const client = await appClient({ context, args });
75142
75404
  const apps = await client.get("/api/apps");
75143
75405
  const lines2 = apps.map((app2) => {
75144
- const state = app2.publishedVersion ? `live (${app2.visibility})` : "draft only";
75406
+ const state = app2.publishedVersion ? `live (${app2.visibility})` : "not live";
75145
75407
  return `${app2.slug} ${app2.id} ${state} ${app2.publishedUrl}
75146
75408
  `;
75147
75409
  });
@@ -75187,70 +75449,55 @@ var appPush = async ({ context, args }) => {
75187
75449
  "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
75450
  );
75189
75451
  }
75452
+ noteRetiredFlags({ context, args });
75190
75453
  const client = await appClient({ context, args });
75191
75454
  const appId = await appIdOf({ client, args, folder });
75192
75455
  for (const [name3, collection] of Object.entries(manifest?.collections ?? {})) {
75193
75456
  await client.post("/api/apps/collections/define", {
75194
75457
  appId,
75195
- site: "draft",
75196
75458
  name: name3,
75197
75459
  fields: collection.fields,
75198
75460
  ...collection.rules ? { rules: collection.rules } : {}
75199
75461
  });
75200
75462
  }
75201
75463
  for (const view of manifest?.views ?? []) {
75202
- await client.post("/api/apps/views/define", { appId, site: "draft", view });
75464
+ await client.post("/api/apps/views/define", { appId, view });
75203
75465
  }
75204
- const version2 = await client.post("/api/apps/commit", {
75466
+ const pushed = await client.post("/api/apps/commit", {
75205
75467
  appId,
75206
75468
  message: message2,
75207
75469
  files: files2.map(({ bytes: _bytes, ...file3 }) => file3),
75208
75470
  ...manifest?.users ? { users: manifest.users } : {},
75209
75471
  ...manifest?.functions ? { functions: manifest.functions } : {}
75210
75472
  });
75211
- const app2 = await client.post("/api/apps/deploy", { appId, version: version2.version });
75212
- if (args.flags.seed && manifest) {
75213
- await client.post("/api/apps/seed", { appId, records: manifest.seed });
75214
- }
75215
- const published = await publishUnlessHeld({ client, args, appId, version: version2.version });
75473
+ const seeded = args.flags.seed && manifest ? await client.post("/api/apps/seed", { appId, records: manifest.seed }) : null;
75474
+ const { publish, ...version2 } = pushed;
75216
75475
  print5({
75217
75476
  context,
75218
75477
  args,
75219
- value: { version: version2, app: published?.app ?? app2, publish: published },
75478
+ value: { version: version2, app: publish.app, publish },
75220
75479
  text: `Pushed ${version2.version.slice(0, 7)} "${version2.message}" (${files2.length} files)
75221
- ${args.flags.seed ? "Loaded the seed records into the draft.\n" : ""}` + afterChangeLines({ app: app2, published })
75480
+ ` + (seeded ? seedLine(seeded) : "") + publishLine(publish)
75222
75481
  });
75223
75482
  };
75224
- async function publishUnlessHeld({
75225
- client,
75226
- args,
75227
- appId,
75228
- version: version2
75229
- }) {
75230
- if (args.flags["no-publish"]) return null;
75231
- return client.post("/api/apps/publish", { appId, version: version2 });
75483
+ function seedLine(seeded) {
75484
+ const created = Object.entries(seeded.created).map(([name3, count5]) => `${count5} in ${name3}`);
75485
+ const parts = [
75486
+ created.length ? `Loaded starter records: ${created.join(", ")}.` : "",
75487
+ seeded.skipped.length ? `Left ${seeded.skipped.join(", ")} as it was: it already holds records.` : ""
75488
+ ].filter(Boolean);
75489
+ return parts.length ? `${parts.join(" ")}
75490
+ ` : "No starter records to load.\n";
75232
75491
  }
75233
- function afterChangeLines({
75234
- app: app2,
75235
- published
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
- `;
75492
+ var appUrl = async ({ context, args }) => {
75493
+ if (args.words[1] === "preview") {
75494
+ context.err("laze: laze app preview is now laze app url: every push is the live app.\n");
75241
75495
  }
75242
- const live = published.request.status === "approved";
75243
- return publishLine(published) + (live ? "" : `Draft preview: ${app2.draftUrl}
75244
- `);
75245
- }
75246
- var appPreview = async ({ context, args }) => {
75496
+ noteRetiredFlags({ context, args });
75247
75497
  const client = await appClient({ context, args });
75248
75498
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75249
- const preview = await client.post("/api/apps/preview", {
75250
- appId,
75251
- site: siteOf(args, "draft")
75252
- });
75253
- print5({ context, args, value: preview, text: `${preview.url}
75499
+ const address = await client.post("/api/apps/preview", { appId });
75500
+ print5({ context, args, value: address, text: `${address.url}
75254
75501
  ` });
75255
75502
  };
75256
75503
  async function folderClaim({
@@ -75267,14 +75514,14 @@ var appPull = async ({ context, args }) => {
75267
75514
  const client = await appClient({ context, args });
75268
75515
  const word3 = args.words[2];
75269
75516
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: word3 }) });
75270
- const site = siteOf(args, "published");
75517
+ noteRetiredFlags({ context, args });
75271
75518
  let pulled;
75272
75519
  try {
75273
- pulled = await client.post("/api/apps/pull", { appId, site });
75520
+ pulled = await client.post("/api/apps/pull", { appId });
75274
75521
  } catch (error62) {
75275
75522
  if (error62 instanceof LazeApiError && error62.code === "app_has_no_version") {
75276
75523
  throw new CliUsageError(
75277
- "Nothing is published yet; `laze app pull --site draft` pulls the draft preview (app_has_no_version)"
75524
+ "The app has no version yet; laze app push puts the first one live (app_has_no_version)"
75278
75525
  );
75279
75526
  }
75280
75527
  throw error62;
@@ -75322,7 +75569,7 @@ var appPull = async ({ context, args }) => {
75322
75569
  context,
75323
75570
  args,
75324
75571
  value: { ...pulled, folder },
75325
- text: `Pulled ${pulled.files.length} files of ${pulled.app.name} (${site} version ${pulled.version.slice(0, 7)}) into ${where}
75572
+ text: `Pulled ${pulled.files.length} files of ${pulled.app.name} (version ${pulled.version.slice(0, 7)}) into ${where}
75326
75573
  ` + recordsHint({ names, slug: pulled.app.slug })
75327
75574
  });
75328
75575
  };
@@ -75353,14 +75600,14 @@ var PUBLISH_AUDIENCE = {
75353
75600
  function publishLine(outcome) {
75354
75601
  const { request: request2 } = outcome;
75355
75602
  if (request2.status === "pending") {
75356
- return `Waiting for approval (${request2.id}): opening the app to more people needs a workspace admin's yes.
75603
+ return `Waiting for approval (${request2.id}): this change needs a workspace admin's yes before it goes live.
75357
75604
  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
- Nothing changes for visitors until then; the request expires after 72 hours.
75605
+ The app keeps serving the version that was live until then; the request expires after 72 hours.
75359
75606
  `;
75360
75607
  }
75361
75608
  if (request2.status === "denied") return "The publish was denied.\n";
75362
75609
  const audience = PUBLISH_AUDIENCE[request2.visibility];
75363
- return `Published ${request2.version.slice(0, 7)} for ${audience}: ${outcome.app.publishedUrl}
75610
+ return `Live for ${audience}: ${outcome.app.publishedUrl}
75364
75611
  `;
75365
75612
  }
75366
75613
  async function versionOf({
@@ -75381,13 +75628,17 @@ async function versionOf({
75381
75628
  var appVersions = async ({ context, args }) => {
75382
75629
  const client = await appClient({ context, args });
75383
75630
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75384
- const versions = await client.post("/api/apps/versions", { appId });
75631
+ const [versions, app2] = await Promise.all([
75632
+ client.post("/api/apps/versions", { appId }),
75633
+ client.post("/api/apps/get", { appId })
75634
+ ]);
75635
+ const now = Temporal3.Instant.fromEpochMilliseconds(context.nowMs());
75385
75636
  print5({
75386
75637
  context,
75387
75638
  args,
75388
75639
  value: versions,
75389
75640
  text: versions.map(
75390
- (version2) => `${versionLine({ version: version2, now: Temporal3.Instant.fromEpochMilliseconds(context.nowMs()) })}
75641
+ (version2) => `${versionLine({ version: version2, now })}${version2.version === app2.publishedVersion ? " [live]" : ""}
75391
75642
  `
75392
75643
  ).join("") || "No versions yet.\n"
75393
75644
  });
@@ -75398,19 +75649,18 @@ var appRevert = async ({ context, args }) => {
75398
75649
  const client = await appClient({ context, args });
75399
75650
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75400
75651
  const { message: message2 } = messageOf({ args });
75401
- const version2 = await client.post("/api/apps/revert", {
75652
+ noteRetiredFlags({ context, args });
75653
+ const pushed = await client.post("/api/apps/revert", {
75402
75654
  appId,
75403
75655
  version: await versionOf({ client, appId, prefix }),
75404
75656
  ...message2 ? { message: message2 } : {}
75405
75657
  });
75406
- const app2 = await client.post("/api/apps/get", { appId });
75407
- const published = await publishUnlessHeld({ client, args, appId, version: version2.version });
75408
75658
  print5({
75409
75659
  context,
75410
75660
  args,
75411
- value: version2,
75412
- text: `Went back: new version ${version2.version.slice(0, 7)} "${version2.message}". No record was deleted; fields added since stay.
75413
- ` + afterChangeLines({ app: app2, published })
75661
+ value: pushed,
75662
+ text: `Switched: new version ${pushed.version.slice(0, 7)} "${pushed.message}". No record was deleted; fields added since stay.
75663
+ ` + publishLine(pushed.publish)
75414
75664
  });
75415
75665
  };
75416
75666
  var appMakeInternal = async ({ context, args }) => {
@@ -75444,12 +75694,10 @@ var appName = async ({ context, args }) => {
75444
75694
  `
75445
75695
  });
75446
75696
  };
75447
- var appDiscard = async ({ context, args }) => {
75448
- const client = await appClient({ context, args });
75449
- const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75450
- const app2 = await client.post("/api/apps/discard", { appId });
75451
- print5({ context, args, value: app2, text: `The draft of ${app2.name} is no longer served.
75452
- ` });
75697
+ var appDiscard = async ({ context }) => {
75698
+ context.err(
75699
+ "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"
75700
+ );
75453
75701
  };
75454
75702
  var appCollections = async ({ context, args }) => {
75455
75703
  const client = await appClient({ context, args });
@@ -75460,7 +75708,6 @@ var appCollections = async ({ context, args }) => {
75460
75708
  if (!name3 || !Array.isArray(fields)) throw new CliUsageError(USAGE5);
75461
75709
  const collection = await client.post("/api/apps/collections/define", {
75462
75710
  appId,
75463
- site: siteOf(args, "draft"),
75464
75711
  name: name3,
75465
75712
  fields
75466
75713
  });
@@ -75472,10 +75719,7 @@ var appCollections = async ({ context, args }) => {
75472
75719
  `
75473
75720
  });
75474
75721
  }
75475
- const collections = await client.post("/api/apps/collections", {
75476
- appId,
75477
- site: siteOf(args, "draft")
75478
- });
75722
+ const collections = await client.post("/api/apps/collections", { appId });
75479
75723
  const lines2 = collections.map(
75480
75724
  (collection) => `${collection.name} (v${collection.version}): ${collection.schema.fields.map((field) => `${field.name}:${field.type}${field.required ? "!" : ""}`).join(", ")}
75481
75725
  `
@@ -75484,27 +75728,21 @@ var appCollections = async ({ context, args }) => {
75484
75728
  };
75485
75729
  var appViewRemove = async ({ context, args }) => {
75486
75730
  const viewId = args.words[3];
75487
- if (!viewId)
75488
- throw new CliUsageError("Usage: laze app views rm <viewId> [--site draft|published]");
75731
+ if (!viewId) throw new CliUsageError("Usage: laze app views rm <viewId>");
75489
75732
  const client = await appClient({ context, args });
75490
75733
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75491
- const site = siteOf(args, "draft");
75492
75734
  const answer4 = await client.post("/api/apps/views/delete", {
75493
75735
  appId,
75494
- site,
75495
75736
  viewId
75496
75737
  });
75497
- print5({ context, args, value: answer4, text: `Deleted view ${viewId} from the ${site}.
75738
+ print5({ context, args, value: answer4, text: `Deleted view ${viewId}.
75498
75739
  ` });
75499
75740
  };
75500
75741
  var appViews = async ({ context, args }) => {
75501
75742
  if (args.words[2] === "rm") return appViewRemove({ context, args });
75502
75743
  const client = await appClient({ context, args });
75503
75744
  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
- });
75745
+ const views = await client.post("/api/apps/views", { appId });
75508
75746
  const lines2 = views.map(
75509
75747
  (view) => `${view.collection} ${view.name} ${view.type}${view.groupBy ? ` by ${view.groupBy}` : ""}${view.dateField ? ` on ${view.dateField}` : ""} ${view.id}
75510
75748
  `
@@ -75551,12 +75789,11 @@ var appSeed = async ({ context, args }) => {
75551
75789
  const client = await appClient({ context, args });
75552
75790
  const appId = await appIdOf({ client, args, folder });
75553
75791
  const records = await jsonFlag({ context, args, name: "records" }) ?? (await readManifest(folder))?.seed ?? {};
75554
- await client.post("/api/apps/seed", { appId, records });
75555
- context.out("The draft data was emptied and the records loaded.\n");
75792
+ const seeded = await client.post("/api/apps/seed", { appId, records });
75793
+ print5({ context, args, value: seeded, text: seedLine(seeded) });
75556
75794
  };
75557
- function recordPageText({ records, site }) {
75558
- if (records.totalItems === 0) return `No records in the ${site} data.
75559
- `;
75795
+ function recordPageText({ records }) {
75796
+ if (records.totalItems === 0) return "No records yet.\n";
75560
75797
  const lines2 = records.items.map((record4) => JSON.stringify(record4)).join("\n");
75561
75798
  return `${lines2}
75562
75799
  (page ${records.page} of ${records.totalPages}, ${records.totalItems} records)
@@ -75567,7 +75804,7 @@ var appRecords = async ({ context, args }) => {
75567
75804
  if (!collection) throw new CliUsageError(USAGE5);
75568
75805
  const client = await appClient({ context, args });
75569
75806
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75570
- const site = siteOf(args, "draft");
75807
+ noteRetiredFlags({ context, args });
75571
75808
  if (action === "write") {
75572
75809
  const data = await jsonFlag({ context, args, name: "data" });
75573
75810
  const recordId = args.words[4];
@@ -75575,7 +75812,6 @@ var appRecords = async ({ context, args }) => {
75575
75812
  "/api/apps/records/write",
75576
75813
  {
75577
75814
  appId,
75578
- site,
75579
75815
  collection,
75580
75816
  data,
75581
75817
  ...recordId ? { recordId } : {}
@@ -75587,7 +75823,7 @@ var appRecords = async ({ context, args }) => {
75587
75823
  if (action === "delete") {
75588
75824
  const recordId = args.words[4];
75589
75825
  if (!recordId) throw new CliUsageError(USAGE5);
75590
- await client.post("/api/apps/records/delete", { appId, site, collection, recordId });
75826
+ await client.post("/api/apps/records/delete", { appId, collection, recordId });
75591
75827
  return context.out(`Deleted ${recordId}
75592
75828
  `);
75593
75829
  }
@@ -75596,7 +75832,6 @@ var appRecords = async ({ context, args }) => {
75596
75832
  const sort = flagText({ args, name: "sort" });
75597
75833
  const records = await client.post("/api/apps/records", {
75598
75834
  appId,
75599
- site,
75600
75835
  collection,
75601
75836
  page,
75602
75837
  ...filter ? { filter } : {},
@@ -75606,7 +75841,7 @@ var appRecords = async ({ context, args }) => {
75606
75841
  context,
75607
75842
  args,
75608
75843
  value: records,
75609
- text: recordPageText({ records, site })
75844
+ text: recordPageText({ records })
75610
75845
  });
75611
75846
  };
75612
75847
  var appExport = async ({ context, args }) => {
@@ -75617,7 +75852,6 @@ var appExport = async ({ context, args }) => {
75617
75852
  const exported = await client.post("/api/apps/export", {
75618
75853
  appId,
75619
75854
  collection,
75620
- site: siteOf(args, "published"),
75621
75855
  format: flagText({ args, name: "format", fallback: "csv" })
75622
75856
  });
75623
75857
  const out = flagText({ args, name: "out" });
@@ -75644,7 +75878,6 @@ var appImport = async ({ context, args }) => {
75644
75878
  const result = await client.post("/api/apps/import", {
75645
75879
  appId,
75646
75880
  collection,
75647
- site: siteOf(args, "published"),
75648
75881
  csv,
75649
75882
  dryRun: Boolean(args.flags["dry-run"])
75650
75883
  });
@@ -75913,7 +76146,8 @@ var APP_COMMANDS = {
75913
76146
  create: appCreate,
75914
76147
  list: appList,
75915
76148
  push: appPush,
75916
- preview: appPreview,
76149
+ url: appUrl,
76150
+ preview: appUrl,
75917
76151
  pull: appPull,
75918
76152
  publish: appPublish,
75919
76153
  "make-internal": appMakeInternal,
@@ -76078,6 +76312,11 @@ async function whoami({ context, args }) {
76078
76312
  const who = me.kind === "agent" ? `agent ${me.name} (${me.id})` : `${me.name} (${me.id})`;
76079
76313
  context.out(`${who} in workspace ${me.workspaceId} at ${profile.url}, profile "${name3}"
76080
76314
  `);
76315
+ if (me.language || me.timeZone) {
76316
+ const whose = me.kind === "agent" ? "Owner's language" : "Language";
76317
+ context.out(`${whose} ${me.language ?? "en-US"}, time zone ${me.timeZone ?? "UTC"}
76318
+ `);
76319
+ }
76081
76320
  }
76082
76321
  async function workspaces({ context, args }) {
76083
76322
  const config2 = await context.store.read();
@@ -76274,7 +76513,7 @@ var BROWSER_TAB_USAGE = [
76274
76513
  " laze browser tab <tab> one tab: its owner, sharing and page",
76275
76514
  " laze browser goto <tab> <url> send the tab to another page",
76276
76515
  " laze browser read <tab> the page's address, title and text",
76277
- " laze browser ask <tab> <what> ask the tab's owner to sign in or click something there",
76516
+ " laze browser ask <tab> <what> ask the person you work for to sign in or click something there",
76278
76517
  " laze browser cdp <tab> a CDP address on the tab's browser",
76279
76518
  " laze browser share <tab> private|watch|use who sees the screen and who types into it",
76280
76519
  " laze browser close <tab> unpin the tab and close its browser",
@@ -76314,7 +76553,7 @@ async function openTab({ args, client, channel, print: print9 }) {
76314
76553
  tab,
76315
76554
  `Opened ${tab.title} (${tab.id}) in ${tab.ownerName}'s browser, pinned as a tab of the conversation.
76316
76555
  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 the owner's Done.
76556
+ If the site needs a sign-in, run \`laze browser ask ${tab.id} "Sign in to <site>"\` and wait for their Done.
76318
76557
  `
76319
76558
  );
76320
76559
  }
@@ -76354,7 +76593,7 @@ async function askOnTab({ args, client, channel, print: print9 }) {
76354
76593
  const asked = await client.post(BROWSER_TAB_PATHS.ask, { tab, text: text2, ...channel });
76355
76594
  print9(
76356
76595
  asked,
76357
- `Asked ${asked.ownerName} in the conversation; the tab shows them your request with Done.
76596
+ `Asked ${asked.ask?.userName ?? asked.ownerName} in the conversation; the tab shows them your request with Done.
76358
76597
  Wait for their "Done" message before you go on in ${asked.title}.
76359
76598
  `
76360
76599
  );
@@ -76879,11 +77118,11 @@ async function setup({ context, args }) {
76879
77118
  if (machine2.type === "own")
76880
77119
  return context.out(
76881
77120
  `The browser runs on ${machine2.name}, a person's own machine (${siteLine(machine2)}).
76882
- The screen link goes to its owner's DM. ${next}`
77121
+ The screen link is posted where you were asked, for its owner. ${next}`
76883
77122
  );
76884
77123
  context.out(
76885
77124
  `${machine2.name} is ${machine2.state} (${siteLine(machine2)}).
76886
- The screen link goes to your requester's DM once it is ready. ${next}`
77125
+ The screen link is posted where you were asked once it is ready. ${next}`
76887
77126
  );
76888
77127
  }
76889
77128
  async function cdp({ context, args }) {
@@ -76977,7 +77216,7 @@ async function screen({ context, args }) {
76977
77216
  `);
76978
77217
  context.out(
76979
77218
  link.url ? `${link.url}
76980
- ` : `Sent a fresh screen link for ${link.machine.name} to your requester's DM.
77219
+ ` : `Sent a fresh screen link for ${link.machine.name} where you were asked.
76981
77220
  `
76982
77221
  );
76983
77222
  }
@@ -78219,6 +78458,11 @@ var browserTabAskDefinition = external_exports.object({
78219
78458
  text: external_exports.string(),
78220
78459
  agentId: external_exports.string().min(1),
78221
78460
  agentName: external_exports.string(),
78461
+ /** The person the agent asked, mentioned in the conversation. */
78462
+ userId: external_exports.string().min(1),
78463
+ userName: external_exports.string(),
78464
+ /** Where the sign-in is kept and who can use it, in a sentence for people. */
78465
+ savedIn: external_exports.string(),
78222
78466
  at: external_exports.iso.datetime()
78223
78467
  });
78224
78468
  var browserTabDefinition = external_exports.object({
@@ -78232,11 +78476,17 @@ var browserTabDefinition = external_exports.object({
78232
78476
  ownerName: external_exports.string(),
78233
78477
  openedBy: browserTabActorDefinition,
78234
78478
  sharing: browserTabSharingSchema,
78235
- /** What an agent asked the owner to do in the tab, until the owner presses Done. */
78479
+ /** What an agent asked a person to do in the tab, until someone who may answer presses Done. */
78236
78480
  ask: browserTabAskDefinition.nullable(),
78237
78481
  createdAt: external_exports.iso.datetime(),
78238
- /** What the reader may do: see the screen, type into it, change the tab. */
78239
- you: external_exports.object({ see: external_exports.boolean(), type: external_exports.boolean(), owner: external_exports.boolean() })
78482
+ /** What the reader may do: see the screen, type into it, change the tab; asked: the open
78483
+ * request names them. */
78484
+ you: external_exports.object({
78485
+ see: external_exports.boolean(),
78486
+ type: external_exports.boolean(),
78487
+ owner: external_exports.boolean(),
78488
+ asked: external_exports.boolean()
78489
+ })
78240
78490
  });
78241
78491
  var browserTabSchema = browserTabDefinition;
78242
78492
  var browserTabListDefinition = external_exports.object({ tabs: external_exports.array(browserTabDefinition) });
@@ -79099,7 +79349,7 @@ var dedicatedIpKeyReleasedDefinition = external_exports.object({
79099
79349
  });
79100
79350
 
79101
79351
  // ../../modules/compute/contract/src/own-machine-ssh.ts
79102
- var workspaceIdSchema15 = external_exports.string().min(1).max(64);
79352
+ var workspaceIdSchema16 = external_exports.string().min(1).max(64);
79103
79353
  var machineRefText = external_exports.string().min(1).max(64);
79104
79354
  var sshHostKeySchema = external_exports.string().regex(/^SHA256:[A-Za-z0-9+/]{43}$/);
79105
79355
  function sshTargetText({ target }) {
@@ -79121,7 +79371,7 @@ var machineSshDefinition = external_exports.object({
79121
79371
  });
79122
79372
  var machineSshSchema = machineSshDefinition;
79123
79373
  var connectSshDefinition = external_exports.object({
79124
- workspaceId: workspaceIdSchema15,
79374
+ workspaceId: workspaceIdSchema16,
79125
79375
  /** Checked by `checkMachineName`, so a refusal reads as a sentence. */
79126
79376
  name: external_exports.string().max(200),
79127
79377
  /** `user@host[:port]`, checked by `parseSshTarget`. */
@@ -79130,7 +79380,7 @@ var connectSshDefinition = external_exports.object({
79130
79380
  var connectSshMachineInputSchema = connectSshDefinition;
79131
79381
  var restConnectSshDefinition = connectSshDefinition.omit({ workspaceId: true });
79132
79382
  var trustHostKeyDefinition = external_exports.object({
79133
- workspaceId: workspaceIdSchema15,
79383
+ workspaceId: workspaceIdSchema16,
79134
79384
  machine: machineRefText,
79135
79385
  hostKey: sshHostKeySchema
79136
79386
  });
@@ -79138,7 +79388,7 @@ var trustHostKeyInputSchema = trustHostKeyDefinition;
79138
79388
  var restTrustHostKeyDefinition = trustHostKeyDefinition.omit({ workspaceId: true });
79139
79389
 
79140
79390
  // ../../modules/compute/contract/src/own-machine-whatsapp.ts
79141
- var workspaceIdSchema16 = external_exports.string().min(1).max(64);
79391
+ var workspaceIdSchema17 = external_exports.string().min(1).max(64);
79142
79392
  var machineRefText2 = external_exports.string().min(1).max(64);
79143
79393
  var WHATSAPP_TEXT_MAX = 4096;
79144
79394
  var WHATSAPP_LIMIT_MAX = 200;
@@ -79175,25 +79425,25 @@ var messagesResultDefinition = external_exports.object({
79175
79425
  var limitSchema = external_exports.number().int().min(1).max(WHATSAPP_LIMIT_MAX);
79176
79426
  var chatRefSchema = external_exports.string().trim().min(1).max(200);
79177
79427
  var chatsInputDefinition = external_exports.object({
79178
- workspaceId: workspaceIdSchema16,
79428
+ workspaceId: workspaceIdSchema17,
79179
79429
  machine: machineRefText2,
79180
79430
  limit: limitSchema.optional()
79181
79431
  });
79182
79432
  var readInputDefinition = external_exports.object({
79183
- workspaceId: workspaceIdSchema16,
79433
+ workspaceId: workspaceIdSchema17,
79184
79434
  machine: machineRefText2,
79185
79435
  /** A chat id, a phone number or a contact or group name. */
79186
79436
  chat: chatRefSchema,
79187
79437
  limit: limitSchema.optional()
79188
79438
  });
79189
79439
  var sendInputDefinition = external_exports.object({
79190
- workspaceId: workspaceIdSchema16,
79440
+ workspaceId: workspaceIdSchema17,
79191
79441
  machine: machineRefText2,
79192
79442
  chat: chatRefSchema,
79193
79443
  text: external_exports.string().trim().min(1).max(WHATSAPP_TEXT_MAX)
79194
79444
  });
79195
79445
  var sendStatusInputDefinition = external_exports.object({
79196
- workspaceId: workspaceIdSchema16,
79446
+ workspaceId: workspaceIdSchema17,
79197
79447
  sendId: external_exports.string().min(1).max(64),
79198
79448
  /** Wait up to this long for the owner's answer; 0 answers at once. */
79199
79449
  waitSeconds: external_exports.number().int().min(0).max(WHATSAPP_STATUS_WAIT_MAX_SECONDS).default(0)
@@ -79231,7 +79481,7 @@ var whatsappPairingDefinition = external_exports.object({
79231
79481
  });
79232
79482
  var whatsappPairingSchema = whatsappPairingDefinition;
79233
79483
  var pairingRefDefinition = external_exports.object({
79234
- workspaceId: workspaceIdSchema16,
79484
+ workspaceId: workspaceIdSchema17,
79235
79485
  pairingId: external_exports.string().min(1).max(64)
79236
79486
  });
79237
79487
  var whatsappPairingRefSchema = pairingRefDefinition;
@@ -79252,7 +79502,7 @@ var COMPUTE_WHATSAPP_REST_PATHS = {
79252
79502
  };
79253
79503
 
79254
79504
  // ../../modules/compute/contract/src/own-machine.ts
79255
- var workspaceIdSchema17 = external_exports.string().min(1).max(64);
79505
+ var workspaceIdSchema18 = external_exports.string().min(1).max(64);
79256
79506
  var machineRefText3 = external_exports.string().min(1).max(64);
79257
79507
  var machineBrowserDefinition = external_exports.object({
79258
79508
  ready: external_exports.boolean(),
@@ -79285,7 +79535,7 @@ var machineHealthDefinition = external_exports.object({
79285
79535
  });
79286
79536
  var machineHealthSchema = machineHealthDefinition;
79287
79537
  var connectOwnDefinition = external_exports.object({
79288
- workspaceId: workspaceIdSchema17,
79538
+ workspaceId: workspaceIdSchema18,
79289
79539
  /** Checked by `checkMachineName`, so a refusal reads as a sentence. */
79290
79540
  name: external_exports.string().max(200)
79291
79541
  });
@@ -79293,7 +79543,7 @@ var connectOwnMachineInputSchema = connectOwnDefinition;
79293
79543
  var MACHINE_EXEC_MAX_SECONDS = 240;
79294
79544
  var MACHINE_EXEC_OUTPUT_BYTES = 1024 * 1024;
79295
79545
  var execDefinition = external_exports.object({
79296
- workspaceId: workspaceIdSchema17,
79546
+ workspaceId: workspaceIdSchema18,
79297
79547
  machine: machineRefText3,
79298
79548
  command: external_exports.string().min(1).max(64 * 1024),
79299
79549
  timeoutSeconds: external_exports.number().int().min(1).max(MACHINE_EXEC_MAX_SECONDS).optional(),
@@ -79365,14 +79615,14 @@ function gigabytes(bytes) {
79365
79615
  }
79366
79616
  var hostWhenOfflineSchema = external_exports.enum(["wait", "sandbox"]);
79367
79617
  var hostAgentDefinition = external_exports.object({
79368
- workspaceId: workspaceIdSchema17,
79618
+ workspaceId: workspaceIdSchema18,
79369
79619
  machine: machineRefText3,
79370
79620
  agentId: external_exports.string().min(1).max(64),
79371
79621
  whenOffline: hostWhenOfflineSchema.default("wait")
79372
79622
  });
79373
79623
  var hostAgentInputSchema = hostAgentDefinition;
79374
79624
  var unhostAgentDefinition = external_exports.object({
79375
- workspaceId: workspaceIdSchema17,
79625
+ workspaceId: workspaceIdSchema18,
79376
79626
  agentId: external_exports.string().min(1).max(64)
79377
79627
  });
79378
79628
  var unhostAgentInputSchema = unhostAgentDefinition;
@@ -79391,8 +79641,8 @@ var agentHostGrantDefinition = external_exports.object({
79391
79641
  });
79392
79642
 
79393
79643
  // ../../modules/compute/contract/src/compute.ts
79394
- var idSchema19 = external_exports.string().min(1).max(64);
79395
- var workspaceIdSchema18 = external_exports.string().min(1).max(64);
79644
+ var idSchema20 = external_exports.string().min(1).max(64);
79645
+ var workspaceIdSchema19 = external_exports.string().min(1).max(64);
79396
79646
  var machineStateSchema = external_exports.enum([
79397
79647
  "starting",
79398
79648
  "ready",
@@ -79413,24 +79663,24 @@ var machinePriceDefinition = external_exports.object({
79413
79663
  asleepMonthUsd: external_exports.number()
79414
79664
  });
79415
79665
  var machineGranteeKindSchema = external_exports.enum(["member", "agent"]);
79416
- var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id: idSchema19 });
79666
+ var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id: idSchema20 });
79417
79667
  var machineGrantDefinition = external_exports.object({
79418
79668
  kind: machineGranteeKindSchema,
79419
- id: idSchema19,
79420
- grantedByUserId: idSchema19,
79669
+ id: idSchema20,
79670
+ grantedByUserId: idSchema20,
79421
79671
  grantedAt: external_exports.iso.datetime()
79422
79672
  });
79423
79673
  var machineDefinition = external_exports.object({
79424
- id: idSchema19,
79425
- workspaceId: workspaceIdSchema18,
79674
+ id: idSchema20,
79675
+ workspaceId: workspaceIdSchema19,
79426
79676
  name: external_exports.string(),
79427
79677
  type: machineTypeSchema,
79428
79678
  zone: external_exports.string(),
79429
79679
  state: machineStateSchema,
79430
- ownerUserId: idSchema19,
79431
- requesterUserId: idSchema19,
79432
- renterAgentId: idSchema19.nullable(),
79433
- channelId: idSchema19.nullable(),
79680
+ ownerUserId: idSchema20,
79681
+ requesterUserId: idSchema20,
79682
+ renterAgentId: idSchema20.nullable(),
79683
+ channelId: idSchema20.nullable(),
79434
79684
  ipAddress: external_exports.string().nullable(),
79435
79685
  sites: external_exports.array(machineSiteDefinition),
79436
79686
  /** Members and agents the owner shared the machine with, beyond the owner's own agents. */
@@ -79462,7 +79712,7 @@ var machineDefinition = external_exports.object({
79462
79712
  /** The owner's agents set to run on this own machine. */
79463
79713
  hostedAgents: external_exports.array(
79464
79714
  external_exports.object({
79465
- id: idSchema19,
79715
+ id: idSchema20,
79466
79716
  name: external_exports.string(),
79467
79717
  whenOffline: external_exports.enum(["wait", "sandbox"])
79468
79718
  })
@@ -79473,23 +79723,23 @@ var machineDefinition = external_exports.object({
79473
79723
  var machineSchema = machineDefinition;
79474
79724
  var computeStatusDefinition = external_exports.object({ available: external_exports.boolean() });
79475
79725
  var computeStatusSchema = computeStatusDefinition;
79476
- var workspaceInputDefinition2 = external_exports.object({ workspaceId: workspaceIdSchema18 });
79726
+ var workspaceInputDefinition2 = external_exports.object({ workspaceId: workspaceIdSchema19 });
79477
79727
  var computeWorkspaceInputSchema = workspaceInputDefinition2;
79478
79728
  var machineRefDefinition = external_exports.object({
79479
- workspaceId: workspaceIdSchema18,
79729
+ workspaceId: workspaceIdSchema19,
79480
79730
  machine: external_exports.string().min(1).max(64)
79481
79731
  });
79482
79732
  var machineRefSchema = machineRefDefinition;
79483
79733
  var MACHINE_NAME_MAX = 40;
79484
79734
  var machineNameSchema = external_exports.string().min(2).max(MACHINE_NAME_MAX).regex(/^[a-z0-9][a-z0-9-]*$/, "lowercase letters, digits and dashes");
79485
79735
  var renameDefinition = external_exports.object({
79486
- workspaceId: workspaceIdSchema18,
79736
+ workspaceId: workspaceIdSchema19,
79487
79737
  machine: external_exports.string().min(1).max(64),
79488
79738
  name: external_exports.string().max(200)
79489
79739
  });
79490
79740
  var renameMachineInputSchema = renameDefinition;
79491
79741
  var setupBrowserDefinition = external_exports.object({
79492
- workspaceId: workspaceIdSchema18,
79742
+ workspaceId: workspaceIdSchema19,
79493
79743
  /** The site the person signs in to, as a host or a URL. */
79494
79744
  site: external_exports.string().min(1).max(500),
79495
79745
  name: machineNameSchema.optional(),
@@ -79498,29 +79748,29 @@ var setupBrowserDefinition = external_exports.object({
79498
79748
  });
79499
79749
  var setupBrowserInputSchema = setupBrowserDefinition;
79500
79750
  var grantDefinition = external_exports.object({
79501
- workspaceId: workspaceIdSchema18,
79751
+ workspaceId: workspaceIdSchema19,
79502
79752
  machine: external_exports.string().min(1).max(64),
79503
79753
  grantee: machineGranteeDefinition
79504
79754
  });
79505
79755
  var machineGrantInputSchema = grantDefinition;
79506
79756
  var setBudgetDefinition = external_exports.object({
79507
- workspaceId: workspaceIdSchema18,
79757
+ workspaceId: workspaceIdSchema19,
79508
79758
  machine: external_exports.string().min(1).max(64),
79509
79759
  budgetUsd: external_exports.number().min(0).max(1e4),
79510
79760
  period: machineBudgetPeriodSchema
79511
79761
  });
79512
79762
  var setMachineBudgetInputSchema = setBudgetDefinition;
79513
79763
  var openScreenDefinition = external_exports.object({
79514
- workspaceId: workspaceIdSchema18,
79764
+ workspaceId: workspaceIdSchema19,
79515
79765
  machine: external_exports.string().min(1).max(64),
79516
79766
  site: external_exports.string().min(1).max(500).optional()
79517
79767
  });
79518
79768
  var openScreenInputSchema = openScreenDefinition;
79519
- var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema18, sessionId: idSchema19 });
79769
+ var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema19, sessionId: idSchema20 });
79520
79770
  var screenRefSchema = screenRefDefinition;
79521
79771
  var screenSessionDefinition = external_exports.object({
79522
- sessionId: idSchema19,
79523
- machineId: idSchema19,
79772
+ sessionId: idSchema20,
79773
+ machineId: idSchema20,
79524
79774
  machineName: external_exports.string(),
79525
79775
  site: external_exports.string().nullable(),
79526
79776
  expiresAt: external_exports.iso.datetime(),
@@ -79554,7 +79804,7 @@ var ownMachineSshConnectDefinition = external_exports.object({
79554
79804
  publicKey: external_exports.string()
79555
79805
  });
79556
79806
  var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
79557
- var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema18, machineId: idSchema19 });
79807
+ var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema19, machineId: idSchema20 });
79558
79808
  var ComputeApi = moduleApi()("compute");
79559
79809
  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
79810
  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();
@@ -81607,6 +81857,7 @@ var feedApprovalSchemaDefinition = external_exports.object({
81607
81857
  "app_access",
81608
81858
  "computer",
81609
81859
  "agent_join",
81860
+ "agent_transfer",
81610
81861
  "vault_share"
81611
81862
  ]),
81612
81863
  requestId: external_exports.string(),
@@ -81910,7 +82161,7 @@ var feedFileLinkInputSchemaDefinition = external_exports.object({
81910
82161
  var feedFileLinkInputSchema = feedFileLinkInputSchemaDefinition;
81911
82162
  var feedFileLinkSchemaDefinition = external_exports.object({ url: external_exports.string(), expiresAt: external_exports.iso.datetime() });
81912
82163
  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();
82164
+ 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
82165
  var feedUi = uiTokens("feed");
81915
82166
  var FeedNavSlot = feedUi.component("nav");
81916
82167
  var FeedDecisionsSlot = feedUi.component("decisions");
@@ -86490,8 +86741,8 @@ var WHATSAPP_BUSINESS_REST_PATHS = {
86490
86741
  var WHATSAPP_BUSINESS_TEXT_MAX = 4096;
86491
86742
  var WHATSAPP_BUSINESS_LIMIT_MAX = 200;
86492
86743
  var WHATSAPP_BUSINESS_STATUS_WAIT_MAX_SECONDS = 50;
86493
- var workspaceIdSchema19 = external_exports.string().min(1).max(64);
86494
- var workspaceInput4 = external_exports.object({ workspaceId: workspaceIdSchema19 });
86744
+ var workspaceIdSchema20 = external_exports.string().min(1).max(64);
86745
+ var workspaceInput4 = external_exports.object({ workspaceId: workspaceIdSchema20 });
86495
86746
  var digits = (what) => external_exports.string().trim().regex(/^\d{5,30}$/, `${what} is the number Meta shows, digits only`);
86496
86747
  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
86748
  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 +86776,7 @@ var statusDefinition = external_exports.object({
86525
86776
  });
86526
86777
  var whatsappBusinessStatusSchema = statusDefinition;
86527
86778
  var connectDefinition = external_exports.object({
86528
- workspaceId: workspaceIdSchema19,
86779
+ workspaceId: workspaceIdSchema20,
86529
86780
  appId: digits("The app id"),
86530
86781
  wabaId: digits("The WhatsApp Business Account id"),
86531
86782
  phoneNumberId: digits("The phone number id"),
@@ -86548,7 +86799,7 @@ var webhookDefinition = external_exports.object({
86548
86799
  });
86549
86800
  var whatsappBusinessWebhookSchema = webhookDefinition;
86550
86801
  var settingsDefinition = external_exports.object({
86551
- workspaceId: workspaceIdSchema19,
86802
+ workspaceId: workspaceIdSchema20,
86552
86803
  /** The agent that answers; null for none. Left out keeps the current one. */
86553
86804
  agentId: external_exports.string().min(1).max(64).nullable().optional(),
86554
86805
  replyMode: whatsappBusinessReplyModeSchema.optional()
@@ -86568,7 +86819,7 @@ var whatsappBusinessConversationSchema = conversationDefinition;
86568
86819
  var limitSchema2 = external_exports.number().int().min(1).max(WHATSAPP_BUSINESS_LIMIT_MAX);
86569
86820
  var contactRefSchema = external_exports.string().trim().min(1).max(64);
86570
86821
  var conversationsInputDefinition = external_exports.object({
86571
- workspaceId: workspaceIdSchema19,
86822
+ workspaceId: workspaceIdSchema20,
86572
86823
  limit: limitSchema2.optional()
86573
86824
  });
86574
86825
  var whatsappBusinessConversationsInputSchema = conversationsInputDefinition;
@@ -86594,7 +86845,7 @@ var messageDefinition = external_exports.object({
86594
86845
  template: external_exports.string().nullable()
86595
86846
  });
86596
86847
  var readInputDefinition2 = external_exports.object({
86597
- workspaceId: workspaceIdSchema19,
86848
+ workspaceId: workspaceIdSchema20,
86598
86849
  contact: contactRefSchema,
86599
86850
  limit: limitSchema2.optional()
86600
86851
  });
@@ -86603,12 +86854,12 @@ var readDefinition = external_exports.object({
86603
86854
  messages: external_exports.array(messageDefinition)
86604
86855
  });
86605
86856
  var sendInputDefinition2 = external_exports.object({
86606
- workspaceId: workspaceIdSchema19,
86857
+ workspaceId: workspaceIdSchema20,
86607
86858
  to: contactRefSchema,
86608
86859
  text: external_exports.string().trim().min(1).max(WHATSAPP_BUSINESS_TEXT_MAX)
86609
86860
  });
86610
86861
  var sendTemplateInputDefinition = external_exports.object({
86611
- workspaceId: workspaceIdSchema19,
86862
+ workspaceId: workspaceIdSchema20,
86612
86863
  to: contactRefSchema,
86613
86864
  template: external_exports.string().trim().min(1).max(512),
86614
86865
  /** The template's language code; the only approved one when left out. */
@@ -86635,7 +86886,7 @@ function whatsappBusinessSendSettled({
86635
86886
  return state !== "waiting" && state !== "sending";
86636
86887
  }
86637
86888
  var sendStatusInputDefinition2 = external_exports.object({
86638
- workspaceId: workspaceIdSchema19,
86889
+ workspaceId: workspaceIdSchema20,
86639
86890
  sendId: external_exports.string().min(1).max(64),
86640
86891
  waitSeconds: external_exports.number().int().min(0).max(WHATSAPP_BUSINESS_STATUS_WAIT_MAX_SECONDS).default(0)
86641
86892
  });
@@ -86685,7 +86936,7 @@ var restSendStatusDefinition2 = sendStatusInputDefinition2.omit({ workspaceId: t
86685
86936
  var restSettingsDefinition = settingsDefinition.omit({ workspaceId: true });
86686
86937
  var restEmptyDefinition = external_exports.object({});
86687
86938
  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: workspaceIdSchema19 })).withOutput(whatsappBusinessPricesSchema).build();
86939
+ 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
86940
 
86690
86941
  // ../../modules/whatsapp-business/contract/src/whatsapp-business.config.ts
86691
86942
  var whatsappBusinessConfig = Config.define((c) => ({
@@ -87957,7 +88208,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
87957
88208
  laze memory get|set|append|history <file>, search, pull SOUL.md, AGENTS.md, a channel's MEMORY.md
87958
88209
  laze wiki list|get|put|search|history|mv|rm the workspace wiki
87959
88210
  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, preview, publish, revert
88211
+ laze app create <name> --template crm ... build an app: create, push (live at once), versions, revert
87961
88212
  laze app every laze app command, with its flags
87962
88213
  laze agents list | laze agents status <name> the workspace's agents and their context
87963
88214
  laze agents show <name> [--json] an agent's profile: kind, how it runs, intelligence
@@ -87974,7 +88225,10 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
87974
88225
  laze agent restore|delete <agent> bring an archived agent back, or delete it for good now
87975
88226
  laze agent copy <agent> <name> a team copy of a personal agent, with its skills
87976
88227
  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 another member (id, email or name)
88228
+ laze agent transfer <agent> <member> hand a team agent to a member, or offer a personal one
88229
+ laze agent transfer accept|decline <agent> answer a personal agent offered to you
88230
+ laze agent transfer cancel <agent> take back an offer you made
88231
+ laze agent transfer offers offers waiting that you made or were made
87978
88232
  laze agent reset-session <agent> stop its turn; its next message starts a fresh session
87979
88233
  laze agent default [<agent> | --clear] the workspace default agent; an Admin picks a team agent
87980
88234
  laze agent logins list|add|rename|remove|check|history your Claude and Codex logins; a token is read from stdin only
@@ -88013,9 +88267,9 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
88013
88267
  laze connect install|status|stop|uninstall the service that hands linked Codex sessions their messages
88014
88268
  laze openclaw list|connect|agent|agent-key|feed|disconnect your OpenClaw gateways and their agents
88015
88269
  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 owner to sign in there, never ask for a password
88270
+ 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
88271
  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: offer a browser machine, never ask for a password
88272
+ 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
88273
  laze browser setup <site> --on <machine> the browser on a person's own machine instead, at no Laze compute cost
88020
88274
  laze machine connect <name> connect your own machine (a Mac mini, a Linux box): the command to run on it
88021
88275
  laze machine connect <name> --ssh <user>@<host>[:port] a machine that cannot run the connector (a NAS), over SSH