@lazehq/cli 0.1.44 → 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 +683 -374
  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
@@ -31578,9 +31583,10 @@ function runRedacted({
31578
31583
  stdout: stdout2,
31579
31584
  stderr: stderr2,
31580
31585
  cwd,
31581
- signal
31586
+ signal,
31587
+ redact
31582
31588
  }) {
31583
- const values = Object.values(env);
31589
+ const values = redact ?? Object.values(env);
31584
31590
  return new Promise((resolve19, reject) => {
31585
31591
  const [file3, ...args] = command;
31586
31592
  const child = spawn(file3, args, {
@@ -35670,6 +35676,7 @@ var SWITCHES = /* @__PURE__ */ new Set([
35670
35676
  "clear",
35671
35677
  "wait-reply",
35672
35678
  "no-publish",
35679
+ // retired: accepted and ignored, every push is live
35673
35680
  "local",
35674
35681
  "done",
35675
35682
  "names",
@@ -35711,7 +35718,7 @@ function flagText({
35711
35718
  }
35712
35719
 
35713
35720
  // src/rules/cli-version.rules.ts
35714
- var STAMPED = "0.1.44";
35721
+ var STAMPED = "0.1.46";
35715
35722
  function cliVersionOf({ stamped = STAMPED } = {}) {
35716
35723
  return stamped.startsWith("__") ? "dev" : stamped;
35717
35724
  }
@@ -56402,6 +56409,12 @@ var HandledErrorRuntime = class _HandledErrorRuntime extends Error {
56402
56409
  tips;
56403
56410
  docsUrl;
56404
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
+ }
56405
56418
  /** Produce the full user-facing serialised shape. */
56406
56419
  serialize() {
56407
56420
  const { traceUrl, logsUrl } = _HandledErrorRuntime.traceLinks(this.traceId);
@@ -56419,6 +56432,7 @@ var HandledErrorRuntime = class _HandledErrorRuntime extends Error {
56419
56432
  retryable: this.retryable,
56420
56433
  ...this.tips.length > 0 ? { tips: this.tips } : {},
56421
56434
  ...this.docsUrl ? { docsUrl: this.docsUrl } : {},
56435
+ ...this.noticeOf() ? { notice: this.noticeOf() } : {},
56422
56436
  reasons: this.reasons.map(serializeReason)
56423
56437
  };
56424
56438
  }
@@ -57510,6 +57524,7 @@ var serializedHandledErrorWireSchema = external_exports.object({
57510
57524
  fault: handledErrorFaultSchema.default("customer"),
57511
57525
  tips: external_exports.array(external_exports.string()).optional(),
57512
57526
  docsUrl: external_exports.string().optional(),
57527
+ notice: external_exports.string().optional(),
57513
57528
  reasons: external_exports.array(serializedReasonSchema).default([])
57514
57529
  }).passthrough().transform((value, context) => {
57515
57530
  const code = value.code ?? value.kind;
@@ -58255,7 +58270,7 @@ var connectCardSchemaDefinition = external_exports.object({
58255
58270
  outcome: external_exports.string().max(400),
58256
58271
  expiresAt: external_exports.iso.datetime()
58257
58272
  });
58258
- var appCardStateSchema = external_exports.enum(["draft", "live", "public", "deleted"]);
58273
+ var appCardStateSchema = external_exports.enum(["offline", "live", "public", "deleted"]);
58259
58274
  var appCardSchemaDefinition = external_exports.object({
58260
58275
  type: external_exports.literal("app"),
58261
58276
  appId: idSchema4,
@@ -58263,7 +58278,7 @@ var appCardSchemaDefinition = external_exports.object({
58263
58278
  /** What the newest version changed, in the agent's words. */
58264
58279
  caption: external_exports.string().max(400),
58265
58280
  state: appCardStateSchema,
58266
- /** The address the state names: the draft preview or the published app. */
58281
+ /** The app's own address. */
58267
58282
  url: external_exports.string().max(500),
58268
58283
  /** The collection whose first rows the card shows; null takes the view's, or the first one. */
58269
58284
  collection: external_exports.string().max(120).nullable().default(null),
@@ -58381,7 +58396,14 @@ var feedCardSchemaDefinition = external_exports.object({
58381
58396
  });
58382
58397
  var failureCardSchemaDefinition = external_exports.object({
58383
58398
  type: external_exports.literal("failure"),
58384
- details: external_exports.string().min(1).max(NOTICE_DETAILS_MAX)
58399
+ details: external_exports.string().min(1).max(NOTICE_DETAILS_MAX),
58400
+ /** An agent's failed turn: Try again sends this person's message to the agent again. */
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()
58385
58407
  });
58386
58408
  var messageCardSchemaDefinition = external_exports.discriminatedUnion("type", [
58387
58409
  attentionCardSchemaDefinition,
@@ -58750,6 +58772,12 @@ var agentChatMemberInputSchemaDefinition = external_exports.object({
58750
58772
  ownerUserId: idSchema4,
58751
58773
  userId: idSchema4
58752
58774
  });
58775
+ var handAgentChatInputSchemaDefinition = external_exports.object({
58776
+ workspaceId: workspaceIdSchema,
58777
+ agent: openAgentDirectInputSchemaDefinition.shape.agent,
58778
+ fromUserId: idSchema4,
58779
+ toUserId: idSchema4
58780
+ });
58753
58781
  var historyInputSchemaDefinition = external_exports.object({
58754
58782
  workspaceId: workspaceIdSchema,
58755
58783
  channelId: idSchema4,
@@ -59148,7 +59176,9 @@ var threadsUnreadSchema = threadsUnreadSchemaDefinition;
59148
59176
  var workspaceUnreadSchemaDefinition = external_exports.object({
59149
59177
  workspaceId: workspaceIdSchema,
59150
59178
  unread: external_exports.number().int().nonnegative(),
59151
- 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()
59152
59182
  });
59153
59183
  var workspaceUnreadSchema = workspaceUnreadSchemaDefinition;
59154
59184
  var activityKindSchema = external_exports.enum(["mention", "thread_reply", "keyword", "reaction"]);
@@ -59406,7 +59436,7 @@ var chatConversationsTrpc = defineTrpcContract("chat").query("overview").withInp
59406
59436
  var chatChannelRolesTrpc = defineTrpcContract("chat").mutation("setChannelRole").withInput(setChannelRoleInputSchema).withOutput(conversationSchema).mutation("extendChannel").withInput(extendChannelInputSchema).withOutput(conversationSchema).build();
59407
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();
59408
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();
59409
- 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();
59410
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();
59411
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();
59412
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();
@@ -59692,7 +59722,9 @@ var messageNoticeSchema = external_exports.object({
59692
59722
  /** It came in through a mirror such as Slack, whose own app already rings: Laze stays silent. */
59693
59723
  mirrored: external_exports.boolean().optional(),
59694
59724
  /** An @channel or @here raised it, not the conversation's every-message level. */
59695
- 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()
59696
59728
  });
59697
59729
  var approvalNoticeSchema = external_exports.object({
59698
59730
  workspaceId: workspaceIdSchema2,
@@ -59704,7 +59736,9 @@ var approvalNoticeSchema = external_exports.object({
59704
59736
  /** The plain line only, never the command or the secret's details. */
59705
59737
  body: external_exports.string().max(400),
59706
59738
  /** The chat message holding the card, or the feed when there is none. */
59707
- 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()
59708
59742
  });
59709
59743
  var feedNoticeSchema = external_exports.object({
59710
59744
  workspaceId: workspaceIdSchema2,
@@ -59720,7 +59754,9 @@ var feedNoticeSchema = external_exports.object({
59720
59754
  /** The feed event behind the push: each new event pushes, a retried one does not. */
59721
59755
  eventId: external_exports.string().min(1).max(200).optional(),
59722
59756
  /** Which setting turns it off; none means it always pushes. */
59723
- 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()
59724
59760
  });
59725
59761
  var notifyInputSchemaDefinition = external_exports.discriminatedUnion("kind", [
59726
59762
  messageNoticeSchema,
@@ -62225,12 +62261,15 @@ var permissionSkipReasonSchema = external_exports.enum(["question", "plan", "pla
62225
62261
  var liveStepKindSchema = external_exports.enum(["tool", "subagent", "shell"]);
62226
62262
  var liveStepStatusSchema = external_exports.enum(["running", "done", "failed"]);
62227
62263
  var LIVE_STEP_LABEL_MAX = 160;
62264
+ var LIVE_STEP_DETAIL_MAX = 2e3;
62228
62265
  var LIVE_STEPS_BATCH_MAX = 100;
62229
62266
  var liveStepSchemaDefinition = external_exports.object({
62230
62267
  id: external_exports.string().min(1).max(200),
62231
62268
  kind: liveStepKindSchema,
62232
62269
  /** `Bash(Run the tests)` for a tool; the task for a subagent; what a shell runs. */
62233
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(),
62234
62273
  status: liveStepStatusSchema,
62235
62274
  /** Epoch ms. */
62236
62275
  startedAt: external_exports.number().int().nonnegative(),
@@ -63189,6 +63228,16 @@ var stopAgentTurnInputSchemaDefinition = external_exports.object({
63189
63228
  channelId: idSchema6
63190
63229
  });
63191
63230
  var stopAgentTurnInputSchema = stopAgentTurnInputSchemaDefinition;
63231
+ var retryAgentTurnInputSchemaDefinition = external_exports.object({
63232
+ workspaceId: workspaceIdSchema3,
63233
+ agentId: idSchema6,
63234
+ channelId: idSchema6,
63235
+ /** The person's message the failed turn was on. */
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()
63239
+ });
63240
+ var retryAgentTurnInputSchema = retryAgentTurnInputSchemaDefinition;
63192
63241
  var compactAgentSessionInputSchemaDefinition = external_exports.object({
63193
63242
  workspaceId: workspaceIdSchema3,
63194
63243
  agentId: idSchema6,
@@ -63251,6 +63300,8 @@ var agentAttentionExpireIntentSchemaDefinition = external_exports.object({
63251
63300
  workspaceId: external_exports.string().min(1),
63252
63301
  attentionId: external_exports.string().min(1)
63253
63302
  });
63303
+ var agentRetryStateSchemaDefinition = external_exports.object({ retried: external_exports.boolean(), allowed: external_exports.boolean() });
63304
+ var agentRetryStateSchema = agentRetryStateSchemaDefinition;
63254
63305
 
63255
63306
  // ../../modules/agent/contract/src/agent-budget.ts
63256
63307
  var raiseBudgetInputSchemaDefinition = external_exports.object({
@@ -63262,6 +63313,119 @@ var raiseBudgetInputSchemaDefinition = external_exports.object({
63262
63313
  });
63263
63314
  var raiseBudgetInputSchema = raiseBudgetInputSchemaDefinition;
63264
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
+
63265
63429
  // ../../modules/agent/contract/src/agent-channel-mute.ts
63266
63430
  var MUTE_MINUTES_MAX = 30 * 24 * 60;
63267
63431
  var agentChannelMuteSchemaDefinition = external_exports.object({
@@ -64796,6 +64960,48 @@ var agentPermissionPromptSchemaDefinition = external_exports.object({
64796
64960
  });
64797
64961
  var agentPermissionPromptSchema = agentPermissionPromptSchemaDefinition;
64798
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
+
64799
65005
  // ../../modules/agent/contract/src/agent-working.ts
64800
65006
  var agentWorkingInputSchemaDefinition = external_exports.object({
64801
65007
  workspaceId: external_exports.string().min(1),
@@ -64806,24 +65012,24 @@ var agentWorkingSchemaDefinition = external_exports.object({ working: external_e
64806
65012
  var agentWorkingSchema = agentWorkingSchemaDefinition;
64807
65013
 
64808
65014
  // ../../modules/agent/contract/src/agent-workspace-default.ts
64809
- var workspaceIdSchema9 = external_exports.string().min(1);
64810
- var idSchema13 = external_exports.string().min(1).max(200);
64811
- 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);
64812
65018
  var workspaceDefaultAgentSchemaDefinition = external_exports.object({
64813
65019
  /** Null when the workspace has none, or its pick was removed. */
64814
- agentId: idSchema13.nullable(),
65020
+ agentId: idSchema14.nullable(),
64815
65021
  name: external_exports.string().nullable()
64816
65022
  });
64817
65023
  var workspaceDefaultAgentSchema = workspaceDefaultAgentSchemaDefinition;
64818
65024
  var setWorkspaceDefaultAgentInputSchemaDefinition = external_exports.object({
64819
- workspaceId: workspaceIdSchema9,
65025
+ workspaceId: workspaceIdSchema10,
64820
65026
  /** A team agent of the workspace; null clears the pick. */
64821
- agentId: idSchema13.nullable()
65027
+ agentId: idSchema14.nullable()
64822
65028
  });
64823
65029
  var setWorkspaceDefaultAgentInputSchema = setWorkspaceDefaultAgentInputSchemaDefinition;
64824
65030
  var setWorkspaceDefaultAgentAsCallerInputSchemaDefinition = external_exports.object({
64825
65031
  /** The agent by id or name; null clears the pick. */
64826
- agent: agentRefSchema5.nullable()
65032
+ agent: agentRefSchema6.nullable()
64827
65033
  });
64828
65034
 
64829
65035
  // ../../modules/agent/contract/src/agent.ts
@@ -64831,8 +65037,8 @@ var AGENT_LINK_TTL_SECONDS = 30 * 60;
64831
65037
  var AGENT_JOIN_REQUEST_TTL_SECONDS = 24 * 60 * 60;
64832
65038
  var AGENT_ONLINE_WINDOW_SECONDS = 5 * 60;
64833
65039
  var INBOX_WAIT_MAX_SECONDS = 55;
64834
- var workspaceIdSchema10 = external_exports.string().min(1);
64835
- 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);
64836
65042
  var agentHarnessSchema = external_exports.enum([
64837
65043
  "claude-code",
64838
65044
  "codex",
@@ -64879,27 +65085,27 @@ var agentContextSchemaDefinition = external_exports.object({
64879
65085
  updatedAt: external_exports.iso.datetime().nullable()
64880
65086
  });
64881
65087
  var agentHostSchemaDefinition = external_exports.object({
64882
- machineId: idSchema14,
65088
+ machineId: idSchema15,
64883
65089
  whenOffline: external_exports.enum(["wait", "sandbox"])
64884
65090
  });
64885
65091
  var setAgentHostInputSchemaDefinition = external_exports.object({
64886
- workspaceId: workspaceIdSchema10,
64887
- agentId: idSchema14,
65092
+ workspaceId: workspaceIdSchema11,
65093
+ agentId: idSchema15,
64888
65094
  host: agentHostSchemaDefinition.nullable()
64889
65095
  });
64890
65096
  var setAgentComputerKeyInputSchemaDefinition = external_exports.object({
64891
- workspaceId: workspaceIdSchema10,
64892
- agentId: idSchema14,
65097
+ workspaceId: workspaceIdSchema11,
65098
+ agentId: idSchema15,
64893
65099
  computerKey: external_exports.string().min(1).max(200).nullable()
64894
65100
  });
64895
65101
  var agentSchemaDefinition = external_exports.object({
64896
- id: idSchema14,
64897
- workspaceId: workspaceIdSchema10,
65102
+ id: idSchema15,
65103
+ workspaceId: workspaceIdSchema11,
64898
65104
  name: external_exports.string(),
64899
65105
  kind: external_exports.enum(["personal", "team"]),
64900
65106
  hosting: agentHostingSchema,
64901
65107
  harness: agentHarnessSchema,
64902
- ownerUserId: idSchema14,
65108
+ ownerUserId: idSchema15,
64903
65109
  status: external_exports.enum(["connected", "disconnected"]),
64904
65110
  online: external_exports.boolean(),
64905
65111
  lastSeenAt: external_exports.iso.datetime().nullable(),
@@ -64939,7 +65145,7 @@ var agentSchemaDefinition = external_exports.object({
64939
65145
  });
64940
65146
  var agentSchema = agentSchemaDefinition;
64941
65147
  var agentChannelSchemaDefinition = external_exports.object({
64942
- id: idSchema14,
65148
+ id: idSchema15,
64943
65149
  name: external_exports.string(),
64944
65150
  kind: external_exports.enum(["public", "private", "dm", "group", "chat"])
64945
65151
  });
@@ -64954,22 +65160,22 @@ var agentNameSchema = external_exports.string().trim().min(1).max(80);
64954
65160
  var instructionsSchema = external_exports.string().max(2e4);
64955
65161
  var linkedAvatarSchema = external_exports.string().trim().max(16);
64956
65162
  var createAgentInputSchemaDefinition = external_exports.object({
64957
- workspaceId: workspaceIdSchema10,
65163
+ workspaceId: workspaceIdSchema11,
64958
65164
  name: agentNameSchema,
64959
65165
  avatar: agentAvatarInputSchema.default(""),
64960
65166
  harness: hostedHarnessSchema,
64961
65167
  modelLevel: agentModelLevelSchema.optional(),
64962
65168
  kind: external_exports.enum(["personal", "team"]).default("personal"),
64963
65169
  instructions: instructionsSchema.default(""),
64964
- channelIds: external_exports.array(idSchema14).max(50).default([]),
65170
+ channelIds: external_exports.array(idSchema15).max(50).default([]),
64965
65171
  /** A Claude Code or Codex agent drawing from this login pool; a team one needs a pool. */
64966
65172
  /** The pool's id or name. */
64967
65173
  loginPoolId: external_exports.string().min(1).max(200).optional()
64968
65174
  });
64969
65175
  var createAgentInputSchema = createAgentInputSchemaDefinition;
64970
65176
  var updateAgentInputSchemaDefinition = external_exports.object({
64971
- workspaceId: workspaceIdSchema10,
64972
- agentId: idSchema14,
65177
+ workspaceId: workspaceIdSchema11,
65178
+ agentId: idSchema15,
64973
65179
  name: agentNameSchema.optional(),
64974
65180
  avatar: agentAvatarInputSchema.optional(),
64975
65181
  modelLevel: agentModelLevelSchema.optional(),
@@ -64981,7 +65187,7 @@ var updateAgentInputSchemaDefinition = external_exports.object({
64981
65187
  effort: runEffortInputSchema.optional(),
64982
65188
  instructions: instructionsSchema.optional(),
64983
65189
  /** The whole set: channels left out are left. */
64984
- channelIds: external_exports.array(idSchema14).max(50).optional(),
65190
+ channelIds: external_exports.array(idSchema15).max(50).optional(),
64985
65191
  /** Agents Laze runs only: paused, it does not wake until resumed and its messages wait. */
64986
65192
  paused: external_exports.boolean().optional(),
64987
65193
  /** Why it is paused, shown on the agents page and in the notice under held messages. */
@@ -64989,14 +65195,14 @@ var updateAgentInputSchemaDefinition = external_exports.object({
64989
65195
  });
64990
65196
  var updateAgentInputSchema = updateAgentInputSchemaDefinition;
64991
65197
  var saveHarnessLoginInputSchemaDefinition = external_exports.object({
64992
- workspaceId: workspaceIdSchema10,
65198
+ workspaceId: workspaceIdSchema11,
64993
65199
  harness: harnessLoginSchema,
64994
65200
  secret: external_exports.string().trim().min(10).max(2e4).optional(),
64995
65201
  signIn: harnessSignInValueSchema.optional()
64996
65202
  });
64997
65203
  var saveHarnessLoginInputSchema = saveHarnessLoginInputSchemaDefinition;
64998
65204
  var removeHarnessLoginInputSchemaDefinition = external_exports.object({
64999
- workspaceId: workspaceIdSchema10,
65205
+ workspaceId: workspaceIdSchema11,
65000
65206
  harness: harnessLoginSchema
65001
65207
  });
65002
65208
  var removeHarnessLoginInputSchema = removeHarnessLoginInputSchemaDefinition;
@@ -65008,13 +65214,13 @@ var harnessLoginsSchema = harnessLoginsSchemaDefinition;
65008
65214
  var lastRuntimeSchemaDefinition = external_exports.object({ harness: hostedHarnessSchema.nullable() });
65009
65215
  var lastRuntimeSchema = lastRuntimeSchemaDefinition;
65010
65216
  var mintLinkInputSchemaDefinition = external_exports.object({
65011
- workspaceId: workspaceIdSchema10,
65217
+ workspaceId: workspaceIdSchema11,
65012
65218
  /** Left out, the agent names itself when it joins, else it takes its harness's name. */
65013
65219
  name: external_exports.string().trim().max(80).optional(),
65014
65220
  /** The channel the agent joins once linked. */
65015
- channelId: idSchema14.optional(),
65221
+ channelId: idSchema15.optional(),
65016
65222
  /** One of the minting person's connected agents: redeeming gives it a new key instead. */
65017
- reconnectAgentId: idSchema14.optional()
65223
+ reconnectAgentId: idSchema15.optional()
65018
65224
  });
65019
65225
  var mintLinkInputSchema = mintLinkInputSchemaDefinition;
65020
65226
  var mintedLinkSchemaDefinition = external_exports.object({
@@ -65046,7 +65252,7 @@ var redeemedLinkSchemaDefinition = external_exports.object({
65046
65252
  agent: agentSchemaDefinition,
65047
65253
  /** The agent's own `lz_` key, shown once. */
65048
65254
  apiKey: external_exports.string(),
65049
- channelId: idSchema14.nullable(),
65255
+ channelId: idSchema15.nullable(),
65050
65256
  /** The owner's key that may only ask for a new agent (`laze agent request`), shown once. */
65051
65257
  requestKey: external_exports.string().nullable().optional()
65052
65258
  });
@@ -65085,12 +65291,12 @@ var joinRequestAnswerSchemaDefinition = external_exports.discriminatedUnion("sta
65085
65291
  })
65086
65292
  ]);
65087
65293
  var joinRequestInputSchemaDefinition = external_exports.object({
65088
- workspaceId: workspaceIdSchema10,
65294
+ workspaceId: workspaceIdSchema11,
65089
65295
  code: external_exports.string().trim().min(1).max(20)
65090
65296
  });
65091
65297
  var joinRequestInputSchema = joinRequestInputSchemaDefinition;
65092
65298
  var approveJoinRequestInputSchemaDefinition = external_exports.object({
65093
- workspaceId: workspaceIdSchema10,
65299
+ workspaceId: workspaceIdSchema11,
65094
65300
  code: external_exports.string().trim().min(1).max(20),
65095
65301
  /** The person may rename the agent as they approve it. */
65096
65302
  name: external_exports.string().trim().max(80).optional()
@@ -65111,16 +65317,18 @@ var inboxCatchUpSchemaDefinition = external_exports.object({
65111
65317
  });
65112
65318
  var inboxCatchUpSchema = inboxCatchUpSchemaDefinition;
65113
65319
  var inboxMessageSchemaDefinition = external_exports.object({
65114
- messageId: idSchema14,
65115
- channelId: idSchema14,
65320
+ messageId: idSchema15,
65321
+ channelId: idSchema15,
65116
65322
  channelName: external_exports.string(),
65117
65323
  channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65118
- threadRootId: idSchema14.nullable(),
65119
- 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() }),
65120
65326
  body: external_exports.string(),
65121
65327
  postedAt: external_exports.iso.datetime(),
65122
65328
  /** On the first message of each conversation in a catch up (agent-catch-up.feature). */
65123
- catchUp: inboxCatchUpSchema.optional()
65329
+ catchUp: inboxCatchUpSchema.optional(),
65330
+ /** Set from 2 on when a person pressed Try again: the same turn, tried once more. */
65331
+ attempt: external_exports.number().int().min(2).optional()
65124
65332
  });
65125
65333
  var receiveInboxInputSchemaDefinition = external_exports.object({
65126
65334
  waitSeconds: external_exports.coerce.number().int().min(0).max(INBOX_WAIT_MAX_SECONDS).default(0),
@@ -65134,16 +65342,20 @@ var inboxWaitingSchemaDefinition = external_exports.object({
65134
65342
  });
65135
65343
  var callerSchemaDefinition = external_exports.object({
65136
65344
  kind: external_exports.enum(["person", "agent"]),
65137
- id: idSchema14,
65345
+ id: idSchema15,
65138
65346
  name: external_exports.string(),
65139
- workspaceId: workspaceIdSchema10,
65347
+ workspaceId: workspaceIdSchema11,
65140
65348
  agent: agentSchemaDefinition.nullable(),
65141
65349
  /** Messages waiting in the agent's inbox, not taken yet; 0 for a person. */
65142
- 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()
65143
65355
  });
65144
65356
  var agentChannelLevelSchema = external_exports.enum(["everything", "mentions"]);
65145
65357
  var callerChannelSchemaDefinition = external_exports.object({
65146
- id: idSchema14,
65358
+ id: idSchema15,
65147
65359
  name: external_exports.string(),
65148
65360
  kind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65149
65361
  unread: external_exports.number().int().nonnegative(),
@@ -65157,9 +65369,9 @@ var callerChannelSchemaDefinition = external_exports.object({
65157
65369
  isDefault: external_exports.boolean().default(false)
65158
65370
  });
65159
65371
  var setChannelLevelInputSchemaDefinition = external_exports.object({
65160
- workspaceId: workspaceIdSchema10,
65161
- agentId: idSchema14,
65162
- channelId: idSchema14,
65372
+ workspaceId: workspaceIdSchema11,
65373
+ agentId: idSchema15,
65374
+ channelId: idSchema15,
65163
65375
  level: agentChannelLevelSchema
65164
65376
  });
65165
65377
  var setChannelLevelInputSchema = setChannelLevelInputSchemaDefinition;
@@ -65182,12 +65394,12 @@ var postAsCallerInputSchemaDefinition = external_exports.object({
65182
65394
  /** A channel's name (with or without `#`) or id. */
65183
65395
  channel: external_exports.string().trim().min(1).max(81),
65184
65396
  body: external_exports.string().trim().min(1).max(4e4),
65185
- threadRootId: idSchema14.optional(),
65397
+ threadRootId: idSchema15.optional(),
65186
65398
  /** The messages of the agent's turn this post answers. */
65187
- answers: external_exports.array(idSchema14).max(200).optional()
65399
+ answers: external_exports.array(idSchema15).max(200).optional()
65188
65400
  });
65189
65401
  var replyAsCallerInputSchemaDefinition = external_exports.object({
65190
- messageId: idSchema14,
65402
+ messageId: idSchema15,
65191
65403
  body: external_exports.string().trim().min(1).max(4e4),
65192
65404
  /** Needed for a message that is not in the caller's inbox. */
65193
65405
  channel: external_exports.string().trim().min(1).max(81).optional(),
@@ -65196,18 +65408,18 @@ var replyAsCallerInputSchemaDefinition = external_exports.object({
65196
65408
  /** A thread reply also shows in the channel, as "Also send to #channel" does. */
65197
65409
  alsoInChannel: external_exports.boolean().optional(),
65198
65410
  /** The other messages of the agent's turn this reply answers. */
65199
- answers: external_exports.array(idSchema14).max(200).optional()
65411
+ answers: external_exports.array(idSchema15).max(200).optional()
65200
65412
  });
65201
65413
  var postedMessageSchemaDefinition = external_exports.object({
65202
- messageId: idSchema14,
65203
- channelId: idSchema14,
65204
- threadRootId: idSchema14.nullable(),
65414
+ messageId: idSchema15,
65415
+ channelId: idSchema15,
65416
+ threadRootId: idSchema15.nullable(),
65205
65417
  /** Workspace members the message mentioned who are not in the channel: it did not reach them. */
65206
65418
  notInChannel: external_exports.array(external_exports.object({ ...notInChannelSchema.shape, name: external_exports.string() })).default([]),
65207
65419
  /** Mentioned agents that are paused or out of usage: the message waits for each of them. */
65208
65420
  waitsFor: external_exports.array(
65209
65421
  external_exports.object({
65210
- agentId: idSchema14,
65422
+ agentId: idSchema15,
65211
65423
  name: external_exports.string(),
65212
65424
  cause: external_exports.enum(["paused", "out_of_usage"]),
65213
65425
  /** When an agent out of usage gets its usage back; null while paused. */
@@ -65222,15 +65434,15 @@ var searchAsCallerInputSchemaDefinition = external_exports.object({
65222
65434
  });
65223
65435
  var callerActorNameSchema = external_exports.object({
65224
65436
  kind: external_exports.enum(["person", "agent"]),
65225
- id: idSchema14,
65437
+ id: idSchema15,
65226
65438
  name: external_exports.string()
65227
65439
  });
65228
65440
  var callerSearchHitSchemaDefinition = external_exports.object({
65229
- messageId: idSchema14,
65230
- channelId: idSchema14,
65441
+ messageId: idSchema15,
65442
+ channelId: idSchema15,
65231
65443
  channelName: external_exports.string(),
65232
65444
  channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65233
- threadRootId: idSchema14.nullable(),
65445
+ threadRootId: idSchema15.nullable(),
65234
65446
  seq: external_exports.number().int().positive(),
65235
65447
  /** `external` for a mirrored message from someone outside Laze. */
65236
65448
  author: external_exports.object({
@@ -65252,7 +65464,7 @@ var callerSearchResultSchemaDefinition = external_exports.object({
65252
65464
  /** Names for the mention tokens in the bodies. */
65253
65465
  mentions: external_exports.object({
65254
65466
  actors: external_exports.array(callerActorNameSchema),
65255
- 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() }))
65256
65468
  })
65257
65469
  });
65258
65470
  var agentActivityInputSchemaDefinition = external_exports.object({
@@ -65324,14 +65536,14 @@ var codexLoginRefreshInputSchemaDefinition = external_exports.object({
65324
65536
  authJson: external_exports.string().min(2).max(CODEX_LOGIN_MAX_LENGTH)
65325
65537
  });
65326
65538
  var AgentApi = moduleApi()("agent");
65327
- 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();
65328
- 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() })).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();
65329
- 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();
65330
65542
  var agentJoinTrpc = defineTrpcContract("agents").query("joinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("approveJoinRequest").withInput(approveJoinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("denyJoinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).build();
65331
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();
65332
- var agentWorkspaceDefaultTrpc = defineTrpcContract("agents").query("workspaceDefault").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(workspaceDefaultAgentSchema).mutation("setWorkspaceDefault").withInput(setWorkspaceDefaultAgentInputSchema).withOutput(workspaceDefaultAgentSchema).build();
65333
- var agentRuntimeChoiceTrpc = defineTrpcContract("agents").query("lastRuntime").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(lastRuntimeSchema).build();
65334
- 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();
65335
65547
  var agentTrpc = joinTrpcContracts(
65336
65548
  "agents",
65337
65549
  agentCoreTrpc,
@@ -65351,6 +65563,7 @@ var AgentLoginCardSlot = agentUi.component("loginCard");
65351
65563
  var AgentBudgetCardSlot = agentUi.component("budgetCard");
65352
65564
  var AgentStopTurnSlot = agentUi.component("stopTurn");
65353
65565
  var AgentLiveStepsSlot = agentUi.component("liveSteps");
65566
+ var AgentCatchUpSlot = agentUi.component("catchUp");
65354
65567
  var AgentSessionHooksToken = agentUi.hooks("session");
65355
65568
  var AgentCreateDialogSlot = agentUi.component("createDialog");
65356
65569
  var AgentEditDialogSlot = agentUi.component("editDialog");
@@ -65360,6 +65573,7 @@ var AgentConnectDialogSlot = agentUi.component("connectDialog");
65360
65573
  var AgentChannelLevelSlot = agentUi.component("channelLevel");
65361
65574
  var AgentMuteNoticeSlot = agentUi.component("muteNotice");
65362
65575
  var AgentHopLimitNoticeSlot = agentUi.component("hopLimitNotice");
65576
+ var AgentRetryTurnSlot = agentUi.component("retryTurn");
65363
65577
  var AgentHeldNoticeSlot = agentUi.component("heldNotice");
65364
65578
 
65365
65579
  // ../../modules/agent/contract/src/agent.config.ts
@@ -65458,21 +65672,36 @@ var agentKeepsFailingPayloadSchemaDefinition = external_exports.object({
65458
65672
  });
65459
65673
 
65460
65674
  // ../../modules/agent/contract/src/agent-caller-access.ts
65461
- var agentRefSchema6 = external_exports.string().trim().min(1).max(80);
65462
- var idSchema15 = external_exports.string().min(1).max(64);
65463
- 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 });
65464
65678
  var shareAgentAsCallerInputSchemaDefinition = external_exports.object({
65465
- agent: agentRefSchema6,
65679
+ agent: agentRefSchema7,
65466
65680
  grantee: agentGranteeSchema
65467
65681
  });
65468
65682
  var stopTurnAsCallerInputSchemaDefinition = external_exports.object({
65469
- agent: agentRefSchema6,
65470
- channelId: idSchema15
65683
+ agent: agentRefSchema7,
65684
+ channelId: idSchema16
65685
+ });
65686
+ var retryTurnAsCallerInputSchemaDefinition = external_exports.object({
65687
+ agent: agentRefSchema7,
65688
+ channelId: idSchema16,
65689
+ messageId: idSchema16
65690
+ });
65691
+ var postTurnFailureAsCallerInputSchemaDefinition = external_exports.object({
65692
+ channelId: idSchema16,
65693
+ threadRootId: idSchema16.optional(),
65694
+ /** The person's message the turn was on, which Try again sends to the agent again. */
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(),
65698
+ line: external_exports.string().trim().min(1).max(1e3),
65699
+ details: external_exports.string().trim().min(1).max(2e3)
65471
65700
  });
65472
65701
  var mintLinkAsCallerInputSchemaDefinition = external_exports.object({
65473
65702
  /** Left out, the agent that joins with the link names itself. */
65474
65703
  name: external_exports.string().trim().max(80).optional(),
65475
- channelId: idSchema15.optional()
65704
+ channelId: idSchema16.optional()
65476
65705
  });
65477
65706
 
65478
65707
  // ../../modules/agent/contract/src/agent-secret-sweep.ts
@@ -65582,25 +65811,25 @@ var agentScheduledRunMissedPayloadSchemaDefinition = external_exports.object({
65582
65811
  });
65583
65812
 
65584
65813
  // ../../modules/agent/contract/src/agent-history.ts
65585
- var idSchema16 = external_exports.string().min(1).max(80);
65814
+ var idSchema17 = external_exports.string().min(1).max(80);
65586
65815
  var CALLER_HISTORY_LIMIT_MAX = 100;
65587
65816
  var historyAsCallerInputSchemaDefinition = external_exports.object({
65588
65817
  /** A channel the key's speaker is in, by id or name. */
65589
65818
  channel: external_exports.string().trim().min(1).max(200),
65590
65819
  /** Messages before this Laze message; none reads the newest page. */
65591
- before: idSchema16.optional(),
65820
+ before: idSchema17.optional(),
65592
65821
  /** Already past the cache: no cached messages, only where the live read goes on. */
65593
65822
  olderThan: external_exports.iso.datetime().optional(),
65594
65823
  limit: external_exports.number().int().min(1).max(CALLER_HISTORY_LIMIT_MAX).default(50)
65595
65824
  });
65596
65825
  var callerHistoryMessageSchemaDefinition = external_exports.object({
65597
- messageId: idSchema16,
65598
- threadRootId: idSchema16.nullable(),
65826
+ messageId: idSchema17,
65827
+ threadRootId: idSchema17.nullable(),
65599
65828
  seq: external_exports.number().int().positive(),
65600
65829
  /** `external` for a mirrored message from someone outside Laze. */
65601
65830
  author: external_exports.object({
65602
65831
  kind: external_exports.enum(["person", "agent", "external"]),
65603
- id: idSchema16,
65832
+ id: idSchema17,
65604
65833
  name: external_exports.string()
65605
65834
  }),
65606
65835
  body: external_exports.string(),
@@ -65610,7 +65839,7 @@ var callerHistoryMessageSchemaDefinition = external_exports.object({
65610
65839
  originKey: external_exports.string().nullable()
65611
65840
  });
65612
65841
  var callerHistorySchemaDefinition = external_exports.object({
65613
- channelId: idSchema16,
65842
+ channelId: idSchema17,
65614
65843
  channelName: external_exports.string(),
65615
65844
  channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65616
65845
  /** The outside workspace a mirrored conversation shows, such as "Slack ACME HQ". */
@@ -65624,12 +65853,12 @@ var callerHistorySchemaDefinition = external_exports.object({
65624
65853
  });
65625
65854
 
65626
65855
  // ../../modules/agent/contract/src/agent-channel-admin.ts
65627
- var idSchema17 = external_exports.string().min(1).max(80);
65856
+ var idSchema18 = external_exports.string().min(1).max(80);
65628
65857
  var channelRefSchema = external_exports.string().trim().min(1).max(200);
65629
65858
  var channelAsCallerInputSchemaDefinition = external_exports.object({ channel: channelRefSchema });
65630
65859
  var callerChannelMemberSchemaDefinition = external_exports.object({
65631
65860
  kind: external_exports.enum(["person", "agent"]),
65632
- id: idSchema17,
65861
+ id: idSchema18,
65633
65862
  name: external_exports.string(),
65634
65863
  role: external_exports.enum(["admin", "member"]),
65635
65864
  /** Active, away or unknown for a person the speaker may see; absent for agents. */
@@ -65639,7 +65868,7 @@ var callerChannelMemberSchemaDefinition = external_exports.object({
65639
65868
  doNotDisturb: doNotDisturbSchema.nullable().optional()
65640
65869
  });
65641
65870
  var callerChannelDetailSchemaDefinition = external_exports.object({
65642
- id: idSchema17,
65871
+ id: idSchema18,
65643
65872
  name: external_exports.string(),
65644
65873
  kind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65645
65874
  topic: external_exports.string(),
@@ -65670,17 +65899,17 @@ var activityAsCallerInputSchemaDefinition = external_exports.object({
65670
65899
  limit: external_exports.number().int().min(1).max(100).default(50)
65671
65900
  });
65672
65901
  var callerActivityItemSchemaDefinition = external_exports.object({
65673
- id: idSchema17,
65902
+ id: idSchema18,
65674
65903
  kind: external_exports.enum(["mention", "thread_reply", "keyword", "reaction"]),
65675
- channelId: idSchema17,
65904
+ channelId: idSchema18,
65676
65905
  channelName: external_exports.string(),
65677
65906
  channelKind: external_exports.enum(["public", "private", "dm", "group", "chat"]),
65678
- messageId: idSchema17,
65679
- threadRootId: idSchema17.nullable(),
65907
+ messageId: idSchema18,
65908
+ threadRootId: idSchema18.nullable(),
65680
65909
  /** `external` is someone outside Laze whose message a mirror brought in, named at the source. */
65681
65910
  actor: external_exports.object({
65682
65911
  kind: external_exports.enum(["person", "agent", "external"]),
65683
- id: idSchema17,
65912
+ id: idSchema18,
65684
65913
  name: external_exports.string()
65685
65914
  }),
65686
65915
  emoji: external_exports.string().nullable(),
@@ -65697,12 +65926,12 @@ var setStatusAsCallerInputSchemaDefinition = setStatusInputSchema.omit({ workspa
65697
65926
  var setAwayAsCallerInputSchemaDefinition = external_exports.object({ away: external_exports.boolean() });
65698
65927
 
65699
65928
  // ../../modules/agent/contract/src/agent-scheduled.ts
65700
- var idSchema18 = external_exports.string().min(1).max(80);
65929
+ var idSchema19 = external_exports.string().min(1).max(80);
65701
65930
  var channelRefSchema2 = external_exports.string().trim().min(1).max(200);
65702
65931
  var scheduleAsCallerInputSchemaDefinition = external_exports.object({
65703
65932
  channel: channelRefSchema2.optional(),
65704
- threadRootId: idSchema18.optional(),
65705
- replyTo: idSchema18.optional(),
65933
+ threadRootId: idSchema19.optional(),
65934
+ replyTo: idSchema19.optional(),
65706
65935
  body: external_exports.string().trim().min(1).max(4e4),
65707
65936
  sendAt: external_exports.iso.datetime({ offset: true }),
65708
65937
  /** A reply that also goes to the channel at its time (`--also-channel`). */
@@ -65713,9 +65942,9 @@ var scheduleAsCallerInputSchemaDefinition = external_exports.object({
65713
65942
  var listScheduledAsCallerInputSchemaDefinition = external_exports.object({
65714
65943
  channel: channelRefSchema2.optional()
65715
65944
  });
65716
- var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId: idSchema18 });
65945
+ var scheduledAsCallerInputSchemaDefinition = external_exports.object({ scheduledId: idSchema19 });
65717
65946
  var editScheduledAsCallerInputSchemaDefinition = external_exports.object({
65718
- scheduledId: idSchema18,
65947
+ scheduledId: idSchema19,
65719
65948
  body: external_exports.string().trim().min(1).max(4e4).optional(),
65720
65949
  sendAt: external_exports.iso.datetime({ offset: true }).optional()
65721
65950
  }).refine((input2) => input2.body !== void 0 || input2.sendAt !== void 0, {
@@ -66262,6 +66491,17 @@ async function stopAgentTurn({ context, args }) {
66262
66491
  context.out(`Stopped ${agent2}'s turn.
66263
66492
  `);
66264
66493
  }
66494
+ async function retryAgentTurn({ context, args }) {
66495
+ const usage = "Usage: laze agent retry <agent> --channel <channelId> --message <messageId>";
66496
+ const agent2 = agentWord({ args, usage });
66497
+ const channelId = flagText({ args, name: "channel" });
66498
+ const messageId = flagText({ args, name: "message" });
66499
+ if (!channelId || !messageId) throw new CliUsageError(usage);
66500
+ const { client } = await signedIn({ context, args });
66501
+ await client.post("/api/agents/retry", { agent: agent2, channelId, messageId });
66502
+ context.out(`Sent the message to ${agent2} again.
66503
+ `);
66504
+ }
66265
66505
  async function disconnectAgent({ context, args }) {
66266
66506
  const agent2 = agentWord({ args, usage: "Usage: laze agent disconnect <agent>" });
66267
66507
  const { client } = await signedIn({ context, args });
@@ -66751,7 +66991,7 @@ var dismissSlackLinkPromptInputSchemaDefinition = external_exports.object({
66751
66991
  var dismissSlackLinkPromptInputSchema = dismissSlackLinkPromptInputSchemaDefinition;
66752
66992
 
66753
66993
  // ../../modules/slack/contract/src/slack-move.ts
66754
- var workspaceIdSchema11 = external_exports.string().min(1);
66994
+ var workspaceIdSchema12 = external_exports.string().min(1);
66755
66995
  var teamIdSchema = external_exports.string().regex(/^[TE][A-Z0-9]{2,20}$/);
66756
66996
  var slackChannelIdSchema = external_exports.string().regex(/^[CG][A-Z0-9]{2,20}$/);
66757
66997
  var slackUserIdSchema = external_exports.string().regex(/^[UW][A-Z0-9]{2,20}$/);
@@ -66824,7 +67064,7 @@ var slackMovePreviewSchemaDefinition = external_exports.object({
66824
67064
  });
66825
67065
  var slackMovePreviewSchema = slackMovePreviewSchemaDefinition;
66826
67066
  var slackMoveChannelInputSchemaDefinition = external_exports.object({
66827
- workspaceId: workspaceIdSchema11,
67067
+ workspaceId: workspaceIdSchema12,
66828
67068
  teamId: teamIdSchema,
66829
67069
  slackChannelId: slackChannelIdSchema
66830
67070
  });
@@ -66839,7 +67079,7 @@ var slackMoveRequestSchemaDefinition = external_exports.object({
66839
67079
  farewell: external_exports.string().trim().min(1).max(SLACK_FAREWELL_MAX).optional()
66840
67080
  });
66841
67081
  var startSlackMovesInputSchemaDefinition = external_exports.object({
66842
- workspaceId: workspaceIdSchema11,
67082
+ workspaceId: workspaceIdSchema12,
66843
67083
  teamId: teamIdSchema,
66844
67084
  channels: external_exports.array(slackMoveRequestSchemaDefinition).min(1).max(SLACK_MOVE_BATCH_MAX)
66845
67085
  });
@@ -66854,7 +67094,7 @@ var startedSlackMovesSchemaDefinition = external_exports.object({
66854
67094
  });
66855
67095
  var startedSlackMovesSchema = startedSlackMovesSchemaDefinition;
66856
67096
  var slackMoveInputSchemaDefinition = external_exports.object({
66857
- workspaceId: workspaceIdSchema11,
67097
+ workspaceId: workspaceIdSchema12,
66858
67098
  moveId: external_exports.string().min(1).max(100)
66859
67099
  });
66860
67100
  var slackMoveInputSchema = slackMoveInputSchemaDefinition;
@@ -66896,7 +67136,7 @@ var slackProfilesSchemaDefinition = external_exports.object({
66896
67136
  var slackProfilesSchema = slackProfilesSchemaDefinition;
66897
67137
 
66898
67138
  // ../../modules/slack/contract/src/slack-setup.ts
66899
- var workspaceIdSchema12 = external_exports.string().min(1);
67139
+ var workspaceIdSchema13 = external_exports.string().min(1);
66900
67140
  var appKeySchema = external_exports.string().regex(/^[a-z0-9]{8,64}$/);
66901
67141
  var returnToSchema3 = external_exports.string().startsWith("/").max(500).optional();
66902
67142
  var slackAppCredentialFieldSchema = external_exports.enum([
@@ -66905,7 +67145,7 @@ var slackAppCredentialFieldSchema = external_exports.enum([
66905
67145
  "clientSecret",
66906
67146
  "signingSecret"
66907
67147
  ]);
66908
- var beginSlackSetupInputSchemaDefinition = external_exports.object({ workspaceId: workspaceIdSchema12 });
67148
+ var beginSlackSetupInputSchemaDefinition = external_exports.object({ workspaceId: workspaceIdSchema13 });
66909
67149
  var beginSlackSetupInputSchema = beginSlackSetupInputSchemaDefinition;
66910
67150
  var slackSetupSchemaDefinition = external_exports.object({
66911
67151
  appKey: appKeySchema,
@@ -66919,7 +67159,7 @@ var slackSetupSchemaDefinition = external_exports.object({
66919
67159
  });
66920
67160
  var slackSetupSchema = slackSetupSchemaDefinition;
66921
67161
  var saveSlackAppCredentialsInputSchemaDefinition = external_exports.object({
66922
- workspaceId: workspaceIdSchema12,
67162
+ workspaceId: workspaceIdSchema13,
66923
67163
  appKey: appKeySchema,
66924
67164
  appId: external_exports.string().max(200),
66925
67165
  clientId: external_exports.string().max(200),
@@ -66929,7 +67169,7 @@ var saveSlackAppCredentialsInputSchemaDefinition = external_exports.object({
66929
67169
  });
66930
67170
  var saveSlackAppCredentialsInputSchema = saveSlackAppCredentialsInputSchemaDefinition;
66931
67171
  var installSlackAppInputSchemaDefinition = external_exports.object({
66932
- workspaceId: workspaceIdSchema12,
67172
+ workspaceId: workspaceIdSchema13,
66933
67173
  appKey: appKeySchema,
66934
67174
  returnTo: returnToSchema3
66935
67175
  });
@@ -67048,7 +67288,7 @@ var slackEventsPausedPayloadSchemaDefinition = external_exports.object({
67048
67288
  var SLACK_CACHE_DAYS_MAX = 30;
67049
67289
  var SLACK_HISTORY_PATH = "/api/slack/history";
67050
67290
  var SLACK_READ_BUDGET_MAX = 5e3;
67051
- var workspaceIdSchema13 = external_exports.string().min(1);
67291
+ var workspaceIdSchema14 = external_exports.string().min(1);
67052
67292
  var teamIdSchema2 = external_exports.string().regex(/^[TE][A-Z0-9]{2,20}$/);
67053
67293
  var slackChannelIdSchema2 = external_exports.string().regex(/^[CG][A-Z0-9]{2,20}$/);
67054
67294
  var slackConnectionStatusSchema = external_exports.enum(["connected", "needs_reinstall"]);
@@ -67112,13 +67352,13 @@ var slackChannelViewSchemaDefinition = external_exports.object({
67112
67352
  });
67113
67353
  var slackChannelViewSchema = slackChannelViewSchemaDefinition;
67114
67354
  var startSlackInstallInputSchemaDefinition = external_exports.object({
67115
- workspaceId: workspaceIdSchema13,
67355
+ workspaceId: workspaceIdSchema14,
67116
67356
  /** A path in Laze to land on afterwards; defaults to the Connectors page. */
67117
67357
  returnTo: external_exports.string().startsWith("/").max(500).optional()
67118
67358
  });
67119
67359
  var startSlackInstallInputSchema = startSlackInstallInputSchemaDefinition;
67120
67360
  var startSlackLinkInputSchemaDefinition = external_exports.object({
67121
- workspaceId: workspaceIdSchema13,
67361
+ workspaceId: workspaceIdSchema14,
67122
67362
  teamId: teamIdSchema2,
67123
67363
  returnTo: external_exports.string().startsWith("/").max(500).optional()
67124
67364
  });
@@ -67126,7 +67366,7 @@ var startSlackLinkInputSchema = startSlackLinkInputSchemaDefinition;
67126
67366
  var startedSlackAuthorizeSchemaDefinition = external_exports.object({ authorizeUrl: external_exports.url() });
67127
67367
  var startedSlackAuthorizeSchema = startedSlackAuthorizeSchemaDefinition;
67128
67368
  var startSlackSetupInputSchemaDefinition = external_exports.object({
67129
- workspaceId: workspaceIdSchema13,
67369
+ workspaceId: workspaceIdSchema14,
67130
67370
  configToken: external_exports.string().trim().min(10).max(1e3),
67131
67371
  returnTo: external_exports.string().startsWith("/").max(500).optional()
67132
67372
  });
@@ -67145,19 +67385,19 @@ var slackEventsHeadersSchemaDefinition = external_exports.object({
67145
67385
  });
67146
67386
  var slackEventsAnswerSchemaDefinition = external_exports.object({ challenge: external_exports.string().nullable() });
67147
67387
  var teamInputSchemaDefinition = external_exports.object({
67148
- workspaceId: workspaceIdSchema13,
67388
+ workspaceId: workspaceIdSchema14,
67149
67389
  teamId: teamIdSchema2
67150
67390
  });
67151
67391
  var slackTeamInputSchema = teamInputSchemaDefinition;
67152
67392
  var setSlackMirrorInputSchemaDefinition = external_exports.object({
67153
- workspaceId: workspaceIdSchema13,
67393
+ workspaceId: workspaceIdSchema14,
67154
67394
  teamId: teamIdSchema2,
67155
67395
  slackChannelId: slackChannelIdSchema2,
67156
67396
  mirrored: external_exports.boolean()
67157
67397
  });
67158
67398
  var setSlackMirrorInputSchema = setSlackMirrorInputSchemaDefinition;
67159
67399
  var updateSlackConnectionInputSchemaDefinition = external_exports.object({
67160
- workspaceId: workspaceIdSchema13,
67400
+ workspaceId: workspaceIdSchema14,
67161
67401
  teamId: teamIdSchema2,
67162
67402
  label: external_exports.string().trim().max(80).nullable().optional(),
67163
67403
  cacheDays: external_exports.number().int().min(1).max(SLACK_CACHE_DAYS_MAX).optional(),
@@ -67165,17 +67405,17 @@ var updateSlackConnectionInputSchemaDefinition = external_exports.object({
67165
67405
  });
67166
67406
  var updateSlackConnectionInputSchema = updateSlackConnectionInputSchemaDefinition;
67167
67407
  var updateSlackAppInputSchemaDefinition = external_exports.object({
67168
- workspaceId: workspaceIdSchema13,
67408
+ workspaceId: workspaceIdSchema14,
67169
67409
  teamId: teamIdSchema2,
67170
67410
  configToken: external_exports.string().trim().min(10).max(1e3)
67171
67411
  });
67172
67412
  var updateSlackAppInputSchema = updateSlackAppInputSchemaDefinition;
67173
67413
  var slackLinkParamsSchemaDefinition = external_exports.object({
67174
- workspaceId: workspaceIdSchema13,
67414
+ workspaceId: workspaceIdSchema14,
67175
67415
  teamId: teamIdSchema2
67176
67416
  });
67177
67417
  var slackHistoryInputSchemaDefinition = external_exports.object({
67178
- workspaceId: workspaceIdSchema13,
67418
+ workspaceId: workspaceIdSchema14,
67179
67419
  /** The Laze conversation that mirrors the Slack channel. */
67180
67420
  channelId: external_exports.string().min(1),
67181
67421
  /** Messages before this time; the oldest message the cache shows. */
@@ -67205,7 +67445,7 @@ var slackHistoryPageSchemaDefinition = external_exports.object({
67205
67445
  });
67206
67446
  var slackHistoryPageSchema = slackHistoryPageSchemaDefinition;
67207
67447
  var slackFileParamsSchemaDefinition = external_exports.object({
67208
- workspaceId: workspaceIdSchema13,
67448
+ workspaceId: workspaceIdSchema14,
67209
67449
  /** The Laze conversation that mirrors the Slack channel. */
67210
67450
  channelId: external_exports.string().min(1).max(200),
67211
67451
  fileId: external_exports.string().regex(/^F[A-Z0-9]{2,30}$/)
@@ -67213,7 +67453,7 @@ var slackFileParamsSchemaDefinition = external_exports.object({
67213
67453
  var SLACK_SEARCH_QUERY_MIN = 2;
67214
67454
  var SLACK_SEARCH_QUERY_MAX = 200;
67215
67455
  var slackSearchInputSchemaDefinition = external_exports.object({
67216
- workspaceId: workspaceIdSchema13,
67456
+ workspaceId: workspaceIdSchema14,
67217
67457
  query: external_exports.string().trim().min(SLACK_SEARCH_QUERY_MIN).max(SLACK_SEARCH_QUERY_MAX)
67218
67458
  });
67219
67459
  var slackSearchInputSchema = slackSearchInputSchemaDefinition;
@@ -67261,7 +67501,7 @@ var slackSearchAnswerSchemaDefinition = external_exports.object({
67261
67501
  });
67262
67502
  var slackSearchAnswerSchema = slackSearchAnswerSchemaDefinition;
67263
67503
  var SlackApi = moduleApi()("slack");
67264
- var workspaceInput3 = external_exports.object({ workspaceId: workspaceIdSchema13 });
67504
+ var workspaceInput3 = external_exports.object({ workspaceId: workspaceIdSchema14 });
67265
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();
67266
67506
 
67267
67507
  // ../../modules/slack/contract/src/slack-keys.ts
@@ -68802,7 +69042,7 @@ import { chmod as chmod2, mkdir as mkdir5, readFile as readFile6, writeFile as w
68802
69042
  import { dirname as dirname5, join as join7 } from "node:path";
68803
69043
 
68804
69044
  // ../../modules/openclaw/contract/src/openclaw.ts
68805
- var workspaceIdSchema14 = external_exports.string().min(1);
69045
+ var workspaceIdSchema15 = external_exports.string().min(1);
68806
69046
  var connectionIdSchema = external_exports.string().min(1).max(80);
68807
69047
  var openclawAgentIdSchema = external_exports.string().min(1).max(120);
68808
69048
  var openclawConnectionStatusSchema = external_exports.enum([
@@ -68857,14 +69097,14 @@ var openclawOverviewSchemaDefinition = external_exports.object({
68857
69097
  });
68858
69098
  var openclawOverviewSchema = openclawOverviewSchemaDefinition;
68859
69099
  var connectOpenclawInputSchemaDefinition = external_exports.object({
68860
- workspaceId: workspaceIdSchema14,
69100
+ workspaceId: workspaceIdSchema15,
68861
69101
  gatewayUrl: external_exports.string().trim().min(1).max(500),
68862
69102
  token: external_exports.string().trim().min(1).max(500),
68863
69103
  label: external_exports.string().trim().min(1).max(80).optional()
68864
69104
  });
68865
69105
  var connectOpenclawInputSchema = connectOpenclawInputSchemaDefinition;
68866
69106
  var openclawConnectionRefSchemaDefinition = external_exports.object({
68867
- workspaceId: workspaceIdSchema14,
69107
+ workspaceId: workspaceIdSchema15,
68868
69108
  connectionId: connectionIdSchema
68869
69109
  });
68870
69110
  var openclawConnectionRefSchema = openclawConnectionRefSchemaDefinition;
@@ -68891,7 +69131,7 @@ var openclawAgentKeySchemaDefinition = external_exports.object({
68891
69131
  });
68892
69132
  var openclawAgentKeySchema = openclawAgentKeySchemaDefinition;
68893
69133
  var OpenclawApi = moduleApi()("openclaw");
68894
- 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();
68895
69135
 
68896
69136
  // ../../modules/openclaw/contract/src/openclaw.config.ts
68897
69137
  var positiveInt5 = external_exports.coerce.number().int().positive();
@@ -71540,7 +71780,7 @@ var CREATE_USAGE = "Usage: laze agent create --name <name> [--description <text>
71540
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]";
71541
71781
  var ARCHIVE_USAGE = "Usage: laze agent archive <agent>";
71542
71782
  var PAUSE_USAGE = 'Usage: laze agent pause <agent> [--reason "<why>"] | laze agent resume <agent>';
71543
- 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";
71544
71784
  var RESET_USAGE = "Usage: laze agent reset-session <agent>";
71545
71785
  var HARNESSES = /* @__PURE__ */ new Set(["laze-models", "claude-code", "codex"]);
71546
71786
  var PICTURE_TYPES = {
@@ -71738,18 +71978,52 @@ async function pauseAgent({
71738
71978
  `
71739
71979
  );
71740
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
+ };
71741
71986
  async function transferAgent({
71742
71987
  context,
71743
71988
  args
71744
71989
  }) {
71745
- const [, , agent2, to] = args.words;
71746
- 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);
71747
72004
  const { client } = await signedIn({ context, args });
71748
- const moved = await client.post("/api/agents/transfer", { agent: agent2, to });
72005
+ const moved = await client.post("/api/agents/transfer", { agent: first, to: second });
71749
72006
  if (args.flags.json) return context.out(`${JSON.stringify(moved, null, 2)}
71750
72007
  `);
71751
- 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}
71752
72025
  `);
72026
+ }
71753
72027
  }
71754
72028
  async function resetAgentSession({
71755
72029
  context,
@@ -72367,7 +72641,7 @@ var appConnectionClaimsSchemaDefinition = external_exports.object({
72367
72641
  exp: external_exports.number().int(),
72368
72642
  wid: external_exports.string().min(1),
72369
72643
  app: external_exports.string().min(1),
72370
- site: external_exports.enum(["draft", "published"]),
72644
+ site: external_exports.string().optional(),
72371
72645
  fn: external_exports.string().min(1),
72372
72646
  conn: external_exports.string().min(1),
72373
72647
  method: external_exports.string().min(1).max(16),
@@ -72392,7 +72666,7 @@ var APP_VISIBILITIES = ["restricted", "channel", "internal", "public"];
72392
72666
  var appVisibilitySchema = external_exports.enum(APP_VISIBILITIES);
72393
72667
  var APP_ROLES = ["viewer", "editor", "builder"];
72394
72668
  var appRoleSchema = external_exports.enum(APP_ROLES);
72395
- var appSiteSchema = external_exports.enum(["published", "draft"]);
72669
+ var legacySiteSchema = external_exports.enum(["published", "draft"]).optional();
72396
72670
  var appVersionIdSchema = external_exports.string().regex(/^[0-9a-f]{40}$/);
72397
72671
  var MAX_APP_BUILD_BYTES = 10 * 1024 * 1024;
72398
72672
  var appActorSchemaDefinition = external_exports.object({
@@ -72436,12 +72710,10 @@ var appSchemaDefinition = external_exports.object({
72436
72710
  channelId: external_exports.string().nullable(),
72437
72711
  owner: appActorSchema,
72438
72712
  visibility: appVisibilitySchema,
72439
- /** `https://<app>--<workspace>.<domain>`: the published app's own origin. */
72713
+ /** `https://<app>--<workspace>.<domain>`: the app's own origin. */
72440
72714
  publishedUrl: external_exports.string(),
72441
- /** The draft preview's origin, `https://<app>--<workspace>--draft.<domain>`. */
72442
- draftUrl: external_exports.string(),
72715
+ /** The live version; null before the first push or while the app is taken offline. */
72443
72716
  publishedVersion: appVersionIdSchema.nullable(),
72444
- draftVersion: appVersionIdSchema.nullable(),
72445
72717
  pendingPublish: publishRequestSchema.nullable(),
72446
72718
  /** The standing approval for public publishes; absent or null when every one asks. */
72447
72719
  publishLease: publishLeaseSchema.nullable().optional(),
@@ -72580,12 +72852,6 @@ var commitInputSchemaDefinition = external_exports.object({
72580
72852
  functions: appFunctionDeclarationsSchema.optional()
72581
72853
  });
72582
72854
  var commitInputSchema = commitInputSchemaDefinition;
72583
- var deployInputSchemaDefinition = external_exports.object({
72584
- ...appRefSchemaDefinition.shape,
72585
- /** Defaults to the latest version. */
72586
- version: appVersionIdSchema.optional()
72587
- });
72588
- var deployInputSchema = deployInputSchemaDefinition;
72589
72855
  var revertInputSchemaDefinition = external_exports.object({
72590
72856
  ...appRefSchemaDefinition.shape,
72591
72857
  version: appVersionIdSchema,
@@ -72594,7 +72860,7 @@ var revertInputSchemaDefinition = external_exports.object({
72594
72860
  var revertInputSchema = revertInputSchemaDefinition;
72595
72861
  var publishInputSchemaDefinition = external_exports.object({
72596
72862
  ...appRefSchemaDefinition.shape,
72597
- /** Defaults to the version the draft preview serves. */
72863
+ /** Defaults to the newest version. */
72598
72864
  version: appVersionIdSchema.optional(),
72599
72865
  /** Defaults to the app's current visibility. */
72600
72866
  visibility: appVisibilitySchema.optional(),
@@ -72615,6 +72881,11 @@ var publishOutcomeSchemaDefinition = external_exports.object({
72615
72881
  app: appSchema
72616
72882
  });
72617
72883
  var publishOutcomeSchema = publishOutcomeSchemaDefinition;
72884
+ var appPushSchemaDefinition = external_exports.object({
72885
+ ...appVersionSchemaDefinition.shape,
72886
+ publish: publishOutcomeSchemaDefinition
72887
+ });
72888
+ var appPushSchema = appPushSchemaDefinition;
72618
72889
  var nameVersionInputSchemaDefinition = external_exports.object({
72619
72890
  ...appRefSchemaDefinition.shape,
72620
72891
  version: appVersionIdSchema,
@@ -72652,23 +72923,30 @@ function versionMessageVerdict(message2) {
72652
72923
  }
72653
72924
  var defineCollectionInputSchemaDefinition = external_exports.object({
72654
72925
  ...appRefSchemaDefinition.shape,
72655
- /** Schema changes start on the draft and reach the published app when it is published. */
72656
- site: appSiteSchema.default("draft"),
72926
+ /** A schema change applies to the live data at once; records keep their values. */
72927
+ site: legacySiteSchema,
72657
72928
  name: collectionNameSchema,
72658
72929
  fields: external_exports.array(collectionFieldSchema).min(1),
72659
72930
  rules: collectionRulesSchemaDefinition.optional()
72660
72931
  });
72661
72932
  var defineCollectionInputSchema = defineCollectionInputSchemaDefinition;
72662
- var siteRefSchemaDefinition = external_exports.object({ ...appRefSchemaDefinition.shape, site: appSiteSchema });
72663
- var siteRefSchema = siteRefSchemaDefinition;
72664
- var resetDraftDataInputSchemaDefinition = external_exports.object({
72933
+ var appDataRefSchemaDefinition = external_exports.object({
72665
72934
  ...appRefSchemaDefinition.shape,
72666
- /** Test data to load after the reset, by collection. */
72935
+ site: legacySiteSchema
72936
+ });
72937
+ var appDataRefSchema = appDataRefSchemaDefinition;
72938
+ var seedDataInputSchemaDefinition = external_exports.object({
72939
+ ...appRefSchemaDefinition.shape,
72940
+ /** Starter records by collection; a collection that already holds records is left alone. */
72667
72941
  records: external_exports.record(collectionNameSchema, external_exports.array(appRecordSchema)).default({})
72668
72942
  });
72669
- 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
+ });
72670
72948
  var listRecordsInputSchemaDefinition = external_exports.object({
72671
- ...siteRefSchemaDefinition.shape,
72949
+ ...appDataRefSchemaDefinition.shape,
72672
72950
  collection: collectionNameSchema,
72673
72951
  filter: external_exports.string().max(2e3).optional(),
72674
72952
  sort: external_exports.string().max(200).optional(),
@@ -72677,7 +72955,7 @@ var listRecordsInputSchemaDefinition = external_exports.object({
72677
72955
  });
72678
72956
  var listRecordsInputSchema = listRecordsInputSchemaDefinition;
72679
72957
  var writeRecordInputSchemaDefinition = external_exports.object({
72680
- ...siteRefSchemaDefinition.shape,
72958
+ ...appDataRefSchemaDefinition.shape,
72681
72959
  collection: collectionNameSchema,
72682
72960
  /** Absent creates a record; present updates that one. */
72683
72961
  recordId: external_exports.string().min(1).optional(),
@@ -72685,26 +72963,26 @@ var writeRecordInputSchemaDefinition = external_exports.object({
72685
72963
  });
72686
72964
  var writeRecordInputSchema = writeRecordInputSchemaDefinition;
72687
72965
  var deleteRecordInputSchemaDefinition = external_exports.object({
72688
- ...siteRefSchemaDefinition.shape,
72966
+ ...appDataRefSchemaDefinition.shape,
72689
72967
  collection: collectionNameSchema,
72690
72968
  recordId: external_exports.string().min(1)
72691
72969
  });
72692
72970
  var deleteRecordInputSchema = deleteRecordInputSchemaDefinition;
72693
- var appPreviewSchemaDefinition = external_exports.object({
72694
- site: appSiteSchema,
72971
+ var appAddressSchemaDefinition = external_exports.object({
72972
+ /** The live version. */
72695
72973
  version: appVersionIdSchema,
72696
- /** 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. */
72697
72975
  url: external_exports.string()
72698
72976
  });
72699
72977
  var appPullSchemaDefinition = external_exports.object({
72700
72978
  app: external_exports.object({ id: external_exports.string(), name: external_exports.string(), slug: external_exports.string() }),
72701
- site: appSiteSchema,
72979
+ /** The live version, or the newest one while nothing is live. */
72702
72980
  version: appVersionIdSchema,
72703
72981
  files: external_exports.array(appFileSchema),
72704
72982
  collections: external_exports.array(collectionSchema)
72705
72983
  });
72706
72984
  var exportRecordsInputSchemaDefinition = external_exports.object({
72707
- ...siteRefSchemaDefinition.shape,
72985
+ ...appDataRefSchemaDefinition.shape,
72708
72986
  collection: collectionNameSchema,
72709
72987
  format: external_exports.enum(["csv", "json"]).default("csv")
72710
72988
  });
@@ -72727,17 +73005,14 @@ var appKeyCallerViewSchemaDefinition = external_exports.object({
72727
73005
  });
72728
73006
  var signInHandoffInputSchemaDefinition = external_exports.object({
72729
73007
  ...appRefSchemaDefinition.shape,
72730
- /** Left out, the published site when there is one, else the draft. */
72731
- site: appSiteSchema.optional(),
73008
+ site: legacySiteSchema,
72732
73009
  /** Where the app sends the person after sign-in; kept on the app's own origin. */
72733
73010
  returnPath: external_exports.string().max(2e3).default("/")
72734
73011
  });
72735
73012
  var signInHandoffInputSchema = signInHandoffInputSchemaDefinition;
72736
73013
  var signInHandoffSchemaDefinition = external_exports.object({
72737
- /** 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. */
72738
73015
  redirectUrl: external_exports.string(),
72739
- /** The site the token opens. */
72740
- site: appSiteSchema,
72741
73016
  expiresAt: external_exports.iso.datetime()
72742
73017
  });
72743
73018
  var signInHandoffSchema = signInHandoffSchemaDefinition;
@@ -72782,7 +73057,7 @@ var appViewSchemaDefinition = external_exports.object({
72782
73057
  });
72783
73058
  var appViewSchema = appViewSchemaDefinition;
72784
73059
  var saveViewInputSchemaDefinition = external_exports.object({
72785
- ...siteRefSchemaDefinition.shape,
73060
+ ...appDataRefSchemaDefinition.shape,
72786
73061
  view: external_exports.object({
72787
73062
  ...viewSpecShape,
72788
73063
  /** Absent creates a view, or replaces the collection's view of the same name. */
@@ -72792,7 +73067,7 @@ var saveViewInputSchemaDefinition = external_exports.object({
72792
73067
  });
72793
73068
  var saveViewInputSchema = saveViewInputSchemaDefinition;
72794
73069
  var deleteViewInputSchemaDefinition = external_exports.object({
72795
- ...siteRefSchemaDefinition.shape,
73070
+ ...appDataRefSchemaDefinition.shape,
72796
73071
  viewId: external_exports.string().min(1)
72797
73072
  });
72798
73073
  var deleteViewInputSchema = deleteViewInputSchemaDefinition;
@@ -72826,7 +73101,7 @@ var appCardChoiceSchemaDefinition = external_exports.object({
72826
73101
  var appCardChoiceSchema = appCardChoiceSchemaDefinition;
72827
73102
  var APP_IMPORT_LIMITS = { maxBytes: 5 * 1024 * 1024, maxRows: 1e4 };
72828
73103
  var importRecordsInputSchemaDefinition = external_exports.object({
72829
- ...siteRefSchemaDefinition.shape,
73104
+ ...appDataRefSchemaDefinition.shape,
72830
73105
  collection: collectionNameSchema,
72831
73106
  /** The file's text, header row first. */
72832
73107
  csv: external_exports.string(),
@@ -72855,7 +73130,6 @@ var appFunctionLogEntrySchemaDefinition = external_exports.object({
72855
73130
  at: external_exports.string(),
72856
73131
  function: external_exports.string(),
72857
73132
  requestId: external_exports.string(),
72858
- site: appSiteSchema.optional(),
72859
73133
  /** `request` is the platform's note of one call; the others are the function's own output. */
72860
73134
  level: external_exports.enum(["request", "debug", "info", "warn", "error"]),
72861
73135
  message: external_exports.string(),
@@ -72919,7 +73193,7 @@ var appBackupStatusSchemaDefinition = external_exports.object({
72919
73193
  /** The last daily restore check of this app's databases. */
72920
73194
  check: external_exports.object({
72921
73195
  at: external_exports.string(),
72922
- 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() }))
72923
73197
  }).optional()
72924
73198
  });
72925
73199
  var appBackupStatusSchema = appBackupStatusSchemaDefinition;
@@ -73101,6 +73375,33 @@ var appUserMailClaimsSchemaDefinition = external_exports.object({
73101
73375
  code: external_exports.string().regex(/^\d{6}$/)
73102
73376
  });
73103
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
+
73104
73405
  // ../../modules/app/contract/src/app.cost.ts
73105
73406
  var APP_COST_PARTS = [
73106
73407
  "storage",
@@ -73261,8 +73562,7 @@ var appTriggersSchemaDefinition = external_exports.object({
73261
73562
  var appTriggersSchema = appTriggersSchemaDefinition;
73262
73563
  var addAppTriggerInputSchemaDefinition = external_exports.object({
73263
73564
  ...appRefSchema.shape,
73264
- /** Only the published site has triggers; draft is refused with app_trigger_needs_published. */
73265
- site: appSiteSchema.default("published"),
73565
+ site: legacySiteSchema,
73266
73566
  collection: collectionNameSchema,
73267
73567
  on: external_exports.array(appTriggerOpSchema).min(1).max(3),
73268
73568
  where: appTriggerWhereSchema.default({}),
@@ -73363,7 +73663,7 @@ var appPinSchemaDefinition = external_exports.object({
73363
73663
  name: external_exports.string(),
73364
73664
  /** The reader's role in the app; null when they cannot open it. */
73365
73665
  role: appRoleSchema.nullable(),
73366
- /** Whether the app serves a published version, else its draft preview. */
73666
+ /** Whether the app has a live version. */
73367
73667
  published: external_exports.boolean(),
73368
73668
  pinnedBy: appActorSchema,
73369
73669
  pinnedByName: external_exports.string().nullable(),
@@ -73454,7 +73754,6 @@ var appBackupCheckFailureSchemaDefinition = external_exports.object({
73454
73754
  appId: external_exports.string(),
73455
73755
  appName: external_exports.string(),
73456
73756
  owner: appActorSchema,
73457
- site: external_exports.string(),
73458
73757
  error: external_exports.string()
73459
73758
  });
73460
73759
  var appBackupCheckAlertsSchemaDefinition = external_exports.object({
@@ -73469,7 +73768,7 @@ var appBackupCheckAlertsSchemaDefinition = external_exports.object({
73469
73768
  });
73470
73769
 
73471
73770
  // ../../modules/app/contract/src/app.trpc.ts
73472
- 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();
73473
73772
  var appConnectionsTrpc = defineTrpcContract("app").query("connections").withInput(appRefSchema).withOutput(appConnectionsSchema).mutation("allowConnection").withInput(appConnectionRefSchema).withOutput(appConnectionsSchema).mutation("revokeConnection").withInput(appConnectionRefSchema).withOutput(appConnectionsSchema).build();
73474
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();
73475
73774
  var appTrpc = joinTrpcContracts("app", appMainTrpc, appConnectionsTrpc, appPinsTrpc);
@@ -73482,16 +73781,19 @@ var createAppByKeyInputSchemaDefinition = external_exports.object({
73482
73781
  channel: external_exports.string().min(1).optional()
73483
73782
  });
73484
73783
  var appByKeySchemaDefinition = external_exports.object({ appId: external_exports.string().min(1) });
73485
- var siteByKeySchemaDefinition = external_exports.object({
73784
+ var appDataByKeySchemaDefinition = external_exports.object({
73486
73785
  ...appByKeySchemaDefinition.shape,
73487
- site: appSiteSchema
73786
+ site: legacySiteSchema
73488
73787
  });
73489
73788
  var commitByKeyInputSchemaDefinition = commitInputSchema.omit(byKey);
73490
- var deployByKeyInputSchemaDefinition = deployInputSchema.omit(byKey);
73789
+ var legacyDeployByKeyInputSchemaDefinition = external_exports.object({
73790
+ ...appByKeySchemaDefinition.shape,
73791
+ version: appVersionIdSchema.optional()
73792
+ });
73491
73793
  var revertByKeyInputSchemaDefinition = revertInputSchema.omit(byKey);
73492
73794
  var publishByKeyInputSchemaDefinition = publishInputSchema.omit(byKey);
73493
73795
  var defineCollectionByKeyInputSchemaDefinition = defineCollectionInputSchema.omit(byKey);
73494
- var resetDraftByKeyInputSchemaDefinition = resetDraftDataInputSchema.omit(byKey);
73796
+ var seedByKeyInputSchemaDefinition = seedDataInputSchema.omit(byKey);
73495
73797
  var listRecordsByKeyInputSchemaDefinition = listRecordsInputSchema.omit(byKey);
73496
73798
  var writeRecordByKeyInputSchemaDefinition = writeRecordInputSchema.omit(byKey);
73497
73799
  var deleteRecordByKeyInputSchemaDefinition = deleteRecordInputSchema.omit(byKey);
@@ -73531,7 +73833,7 @@ var APP_TEMPLATES = ["tracker", "crm", "dashboard", "form"];
73531
73833
  var APP_MANIFEST_FILE = "laze.app.json";
73532
73834
  var appManifestSchemaDefinition = external_exports.object({
73533
73835
  app: external_exports.object({ id: external_exports.string().min(1), name: external_exports.string(), slug: appSlugSchema }),
73534
- /** 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. */
73535
73837
  collections: external_exports.record(
73536
73838
  collectionNameSchema,
73537
73839
  external_exports.object({
@@ -73540,16 +73842,16 @@ var appManifestSchemaDefinition = external_exports.object({
73540
73842
  rules: collectionRulesSchema.optional()
73541
73843
  })
73542
73844
  ).default({}),
73543
- /** `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. */
73544
73846
  users: external_exports.enum(["email"]).optional(),
73545
73847
  /**
73546
73848
  * Per server function, the vault connections it calls with (by name) and the outside hosts it
73547
73849
  * reaches: `{ "funnel": { "connections": ["posthog-read"], "hosts": ["api.open-meteo.com"] } }`.
73548
73850
  */
73549
73851
  functions: appFunctionDeclarationsSchema.optional(),
73550
- /** 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. */
73551
73853
  views: external_exports.array(appViewSpecSchema).default([]),
73552
- /** 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. */
73553
73855
  seed: external_exports.record(collectionNameSchema, external_exports.array(appRecordSchema)).default({})
73554
73856
  });
73555
73857
  var appManifestSchema = appManifestSchemaDefinition;
@@ -73569,8 +73871,8 @@ var appCliCommands = [
73569
73871
  {
73570
73872
  command: "laze app push",
73571
73873
  operation: "commitVersion",
73572
- arguments: ["[dir]", "-m <what changed>", "--seed", "--no-publish"],
73573
- 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`
73574
73876
  },
73575
73877
  {
73576
73878
  command: "laze app logs",
@@ -73579,22 +73881,22 @@ var appCliCommands = [
73579
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"
73580
73882
  },
73581
73883
  {
73582
- command: "laze app preview",
73583
- operation: "getPreview",
73584
- arguments: ["--site draft|published"],
73585
- 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"
73586
73888
  },
73587
73889
  {
73588
73890
  command: "laze app pull",
73589
73891
  operation: "pullFiles",
73590
- arguments: ["[dir]", "--site published|draft"],
73591
- 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"
73592
73894
  },
73593
73895
  {
73594
73896
  command: "laze app publish",
73595
73897
  operation: "requestPublish",
73596
73898
  arguments: ["[version]", "--visibility restricted|channel|internal|public"],
73597
- 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"
73598
73900
  },
73599
73901
  {
73600
73902
  command: "laze app make-internal",
@@ -73606,7 +73908,7 @@ var appCliCommands = [
73606
73908
  command: "laze app unpublish",
73607
73909
  operation: "unpublish",
73608
73910
  arguments: [],
73609
- 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"
73610
73912
  },
73611
73913
  {
73612
73914
  command: "laze app members",
@@ -73768,13 +74070,13 @@ var appCliCommands = [
73768
74070
  command: "laze app backups",
73769
74071
  operation: "getBackups",
73770
74072
  arguments: ["[app]"],
73771
- 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"
73772
74074
  },
73773
74075
  {
73774
74076
  command: "laze app restore",
73775
74077
  operation: "restoreData",
73776
74078
  arguments: ["[app]", "--to <ISO time>", "--undo <restore-id>"],
73777
- 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)"
73778
74080
  },
73779
74081
  {
73780
74082
  command: "laze app users",
@@ -73809,37 +74111,31 @@ var appCliCommands = [
73809
74111
  {
73810
74112
  command: "laze app revert",
73811
74113
  operation: "revertToVersion",
73812
- arguments: ["<version>", "-m <message>", "--no-publish"],
73813
- 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"
73814
- },
73815
- {
73816
- command: "laze app discard",
73817
- operation: "discardDraft",
73818
- arguments: [],
73819
- 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"
73820
74116
  },
73821
74117
  {
73822
74118
  command: "laze app collections define",
73823
74119
  operation: "defineCollection",
73824
- arguments: ["<name>", "--fields <json|@file>", "--site draft|published"],
74120
+ arguments: ["<name>", "--fields <json|@file>"],
73825
74121
  summary: "Create or migrate a collection's schema"
73826
74122
  },
73827
74123
  {
73828
74124
  command: "laze app collections list",
73829
74125
  operation: "listCollections",
73830
- arguments: ["--site draft|published"],
74126
+ arguments: [],
73831
74127
  summary: "Show each collection's schema and version"
73832
74128
  },
73833
74129
  {
73834
74130
  command: "laze app views list",
73835
74131
  operation: "listViews",
73836
- arguments: ["--site draft|published"],
74132
+ arguments: [],
73837
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`
73838
74134
  },
73839
74135
  {
73840
74136
  command: "laze app views rm",
73841
74137
  operation: "deleteView",
73842
- arguments: ["<viewId>", "--site draft|published"],
74138
+ arguments: ["<viewId>"],
73843
74139
  summary: "Delete a Data viewer view by the id `laze app views list` prints; a collection keeps one"
73844
74140
  },
73845
74141
  {
@@ -73858,38 +74154,38 @@ var appCliCommands = [
73858
74154
  },
73859
74155
  {
73860
74156
  command: "laze app seed",
73861
- operation: "resetDraftData",
74157
+ operation: "seedData",
73862
74158
  arguments: ["--records <json|@file>"],
73863
- 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"
73864
74160
  },
73865
74161
  {
73866
74162
  command: "laze app records list",
73867
74163
  operation: "listRecords",
73868
- arguments: ["<collection>", "--filter <expr>", "--sort <fields>", "--page <n>", "--site"],
74164
+ arguments: ["<collection>", "--filter <expr>", "--sort <fields>", "--page <n>"],
73869
74165
  summary: "List records, filtered and sorted"
73870
74166
  },
73871
74167
  {
73872
74168
  command: "laze app records write",
73873
74169
  operation: "writeRecord",
73874
- arguments: ["<collection>", "[record-id]", "--data <json>", "--site"],
74170
+ arguments: ["<collection>", "[record-id]", "--data <json>"],
73875
74171
  summary: "Create a record, or update one by id"
73876
74172
  },
73877
74173
  {
73878
74174
  command: "laze app records delete",
73879
74175
  operation: "deleteRecord",
73880
- arguments: ["<collection>", "<record-id>", "--site"],
74176
+ arguments: ["<collection>", "<record-id>"],
73881
74177
  summary: "Delete a record"
73882
74178
  },
73883
74179
  {
73884
74180
  command: "laze app export",
73885
74181
  operation: "exportRecords",
73886
- arguments: ["<collection>", "--format csv|json", "--out <file>", "--site"],
74182
+ arguments: ["<collection>", "--format csv|json", "--out <file>"],
73887
74183
  summary: "Write a collection's records as CSV (or JSON)"
73888
74184
  },
73889
74185
  {
73890
74186
  command: "laze app import",
73891
74187
  operation: "importRecords",
73892
- arguments: ["[app]", "<collection>", "<file.csv>", "--site", "--dry-run", "--refused <file>"],
74188
+ arguments: ["[app]", "<collection>", "<file.csv>", "--dry-run", "--refused <file>"],
73893
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"
73894
74190
  }
73895
74191
  ];
@@ -74612,7 +74908,7 @@ var publicApps = async ({ context, args, signed: signed2 }) => {
74612
74908
  };
74613
74909
  function backupsText({ name: name3, status: status9 }) {
74614
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.";
74615
- 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.";
74616
74912
  const restores = status9.restores.map(
74617
74913
  (entry) => ` ${entry.id} ${entry.to ? `to ${entry.to}` : `undid ${entry.undid ?? ""}`}
74618
74914
  `
@@ -74636,7 +74932,7 @@ var restore = async ({ context, args, open: open3 }) => {
74636
74932
  appId,
74637
74933
  ...to ? { to } : { undo }
74638
74934
  });
74639
- 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.
74640
74936
  ` : `${name3}'s data from before ${done.undid ?? undo} is back (${done.id}).
74641
74937
  `;
74642
74938
  print2({ context, args, value: done, text: text2 });
@@ -74881,7 +75177,7 @@ async function add({ context, args, open: open3, word: word3 }) {
74881
75177
  const { client, appId, name: name3 } = await open3();
74882
75178
  const trigger = await client.post("/api/apps/triggers/add", { appId, ...body });
74883
75179
  const text2 = `Added a trigger on ${name3}:
74884
- ${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}.
74885
75181
  `;
74886
75182
  print4({ context, args, value: trigger, text: text2 });
74887
75183
  }
@@ -74977,11 +75273,15 @@ async function appClient({
74977
75273
  const turn = await turnTokenOf({ context, args, client, agent: profile.kind === "agent" });
74978
75274
  return turn ? client.withHeaders({ "x-laze-turn": turn }) : client;
74979
75275
  }
74980
- function siteOf(args, fallback) {
74981
- const site = flagText({ args, name: "site", fallback });
74982
- if (site !== "draft" && site !== "published")
74983
- throw new CliUsageError("--site is draft or published");
74984
- 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
+ }
74985
75285
  }
74986
75286
  function folderOf({ context, word: word3 }) {
74987
75287
  return resolve6(context.cwd, word3 ?? ".");
@@ -75103,7 +75403,7 @@ var appList = async ({ context, args }) => {
75103
75403
  const client = await appClient({ context, args });
75104
75404
  const apps = await client.get("/api/apps");
75105
75405
  const lines2 = apps.map((app2) => {
75106
- const state = app2.publishedVersion ? `live (${app2.visibility})` : "draft only";
75406
+ const state = app2.publishedVersion ? `live (${app2.visibility})` : "not live";
75107
75407
  return `${app2.slug} ${app2.id} ${state} ${app2.publishedUrl}
75108
75408
  `;
75109
75409
  });
@@ -75149,70 +75449,55 @@ var appPush = async ({ context, args }) => {
75149
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."
75150
75450
  );
75151
75451
  }
75452
+ noteRetiredFlags({ context, args });
75152
75453
  const client = await appClient({ context, args });
75153
75454
  const appId = await appIdOf({ client, args, folder });
75154
75455
  for (const [name3, collection] of Object.entries(manifest?.collections ?? {})) {
75155
75456
  await client.post("/api/apps/collections/define", {
75156
75457
  appId,
75157
- site: "draft",
75158
75458
  name: name3,
75159
75459
  fields: collection.fields,
75160
75460
  ...collection.rules ? { rules: collection.rules } : {}
75161
75461
  });
75162
75462
  }
75163
75463
  for (const view of manifest?.views ?? []) {
75164
- await client.post("/api/apps/views/define", { appId, site: "draft", view });
75464
+ await client.post("/api/apps/views/define", { appId, view });
75165
75465
  }
75166
- const version2 = await client.post("/api/apps/commit", {
75466
+ const pushed = await client.post("/api/apps/commit", {
75167
75467
  appId,
75168
75468
  message: message2,
75169
75469
  files: files2.map(({ bytes: _bytes, ...file3 }) => file3),
75170
75470
  ...manifest?.users ? { users: manifest.users } : {},
75171
75471
  ...manifest?.functions ? { functions: manifest.functions } : {}
75172
75472
  });
75173
- const app2 = await client.post("/api/apps/deploy", { appId, version: version2.version });
75174
- if (args.flags.seed && manifest) {
75175
- await client.post("/api/apps/seed", { appId, records: manifest.seed });
75176
- }
75177
- 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;
75178
75475
  print5({
75179
75476
  context,
75180
75477
  args,
75181
- value: { version: version2, app: published?.app ?? app2, publish: published },
75478
+ value: { version: version2, app: publish.app, publish },
75182
75479
  text: `Pushed ${version2.version.slice(0, 7)} "${version2.message}" (${files2.length} files)
75183
- ${args.flags.seed ? "Loaded the seed records into the draft.\n" : ""}` + afterChangeLines({ app: app2, published })
75480
+ ` + (seeded ? seedLine(seeded) : "") + publishLine(publish)
75184
75481
  });
75185
75482
  };
75186
- async function publishUnlessHeld({
75187
- client,
75188
- args,
75189
- appId,
75190
- version: version2
75191
- }) {
75192
- if (args.flags["no-publish"]) return null;
75193
- 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";
75194
75491
  }
75195
- function afterChangeLines({
75196
- app: app2,
75197
- published
75198
- }) {
75199
- if (!published) {
75200
- return `Draft preview: ${app2.draftUrl}
75201
- Not published: people still see the app as it was. Run laze app publish when it is ready.
75202
- `;
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");
75203
75495
  }
75204
- const live = published.request.status === "approved";
75205
- return publishLine(published) + (live ? "" : `Draft preview: ${app2.draftUrl}
75206
- `);
75207
- }
75208
- var appPreview = async ({ context, args }) => {
75496
+ noteRetiredFlags({ context, args });
75209
75497
  const client = await appClient({ context, args });
75210
75498
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75211
- const preview = await client.post("/api/apps/preview", {
75212
- appId,
75213
- site: siteOf(args, "draft")
75214
- });
75215
- 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}
75216
75501
  ` });
75217
75502
  };
75218
75503
  async function folderClaim({
@@ -75229,14 +75514,14 @@ var appPull = async ({ context, args }) => {
75229
75514
  const client = await appClient({ context, args });
75230
75515
  const word3 = args.words[2];
75231
75516
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: word3 }) });
75232
- const site = siteOf(args, "published");
75517
+ noteRetiredFlags({ context, args });
75233
75518
  let pulled;
75234
75519
  try {
75235
- pulled = await client.post("/api/apps/pull", { appId, site });
75520
+ pulled = await client.post("/api/apps/pull", { appId });
75236
75521
  } catch (error62) {
75237
75522
  if (error62 instanceof LazeApiError && error62.code === "app_has_no_version") {
75238
75523
  throw new CliUsageError(
75239
- "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)"
75240
75525
  );
75241
75526
  }
75242
75527
  throw error62;
@@ -75284,7 +75569,7 @@ var appPull = async ({ context, args }) => {
75284
75569
  context,
75285
75570
  args,
75286
75571
  value: { ...pulled, folder },
75287
- 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}
75288
75573
  ` + recordsHint({ names, slug: pulled.app.slug })
75289
75574
  });
75290
75575
  };
@@ -75315,14 +75600,14 @@ var PUBLISH_AUDIENCE = {
75315
75600
  function publishLine(outcome) {
75316
75601
  const { request: request2 } = outcome;
75317
75602
  if (request2.status === "pending") {
75318
- 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.
75319
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.
75320
- 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.
75321
75606
  `;
75322
75607
  }
75323
75608
  if (request2.status === "denied") return "The publish was denied.\n";
75324
75609
  const audience = PUBLISH_AUDIENCE[request2.visibility];
75325
- return `Published ${request2.version.slice(0, 7)} for ${audience}: ${outcome.app.publishedUrl}
75610
+ return `Live for ${audience}: ${outcome.app.publishedUrl}
75326
75611
  `;
75327
75612
  }
75328
75613
  async function versionOf({
@@ -75343,13 +75628,17 @@ async function versionOf({
75343
75628
  var appVersions = async ({ context, args }) => {
75344
75629
  const client = await appClient({ context, args });
75345
75630
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75346
- 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());
75347
75636
  print5({
75348
75637
  context,
75349
75638
  args,
75350
75639
  value: versions,
75351
75640
  text: versions.map(
75352
- (version2) => `${versionLine({ version: version2, now: Temporal3.Instant.fromEpochMilliseconds(context.nowMs()) })}
75641
+ (version2) => `${versionLine({ version: version2, now })}${version2.version === app2.publishedVersion ? " [live]" : ""}
75353
75642
  `
75354
75643
  ).join("") || "No versions yet.\n"
75355
75644
  });
@@ -75360,19 +75649,18 @@ var appRevert = async ({ context, args }) => {
75360
75649
  const client = await appClient({ context, args });
75361
75650
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75362
75651
  const { message: message2 } = messageOf({ args });
75363
- const version2 = await client.post("/api/apps/revert", {
75652
+ noteRetiredFlags({ context, args });
75653
+ const pushed = await client.post("/api/apps/revert", {
75364
75654
  appId,
75365
75655
  version: await versionOf({ client, appId, prefix }),
75366
75656
  ...message2 ? { message: message2 } : {}
75367
75657
  });
75368
- const app2 = await client.post("/api/apps/get", { appId });
75369
- const published = await publishUnlessHeld({ client, args, appId, version: version2.version });
75370
75658
  print5({
75371
75659
  context,
75372
75660
  args,
75373
- value: version2,
75374
- text: `Went back: new version ${version2.version.slice(0, 7)} "${version2.message}". No record was deleted; fields added since stay.
75375
- ` + 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)
75376
75664
  });
75377
75665
  };
75378
75666
  var appMakeInternal = async ({ context, args }) => {
@@ -75406,12 +75694,10 @@ var appName = async ({ context, args }) => {
75406
75694
  `
75407
75695
  });
75408
75696
  };
75409
- var appDiscard = async ({ context, args }) => {
75410
- const client = await appClient({ context, args });
75411
- const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75412
- const app2 = await client.post("/api/apps/discard", { appId });
75413
- print5({ context, args, value: app2, text: `The draft of ${app2.name} is no longer served.
75414
- ` });
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
+ );
75415
75701
  };
75416
75702
  var appCollections = async ({ context, args }) => {
75417
75703
  const client = await appClient({ context, args });
@@ -75422,7 +75708,6 @@ var appCollections = async ({ context, args }) => {
75422
75708
  if (!name3 || !Array.isArray(fields)) throw new CliUsageError(USAGE5);
75423
75709
  const collection = await client.post("/api/apps/collections/define", {
75424
75710
  appId,
75425
- site: siteOf(args, "draft"),
75426
75711
  name: name3,
75427
75712
  fields
75428
75713
  });
@@ -75434,10 +75719,7 @@ var appCollections = async ({ context, args }) => {
75434
75719
  `
75435
75720
  });
75436
75721
  }
75437
- const collections = await client.post("/api/apps/collections", {
75438
- appId,
75439
- site: siteOf(args, "draft")
75440
- });
75722
+ const collections = await client.post("/api/apps/collections", { appId });
75441
75723
  const lines2 = collections.map(
75442
75724
  (collection) => `${collection.name} (v${collection.version}): ${collection.schema.fields.map((field) => `${field.name}:${field.type}${field.required ? "!" : ""}`).join(", ")}
75443
75725
  `
@@ -75446,27 +75728,21 @@ var appCollections = async ({ context, args }) => {
75446
75728
  };
75447
75729
  var appViewRemove = async ({ context, args }) => {
75448
75730
  const viewId = args.words[3];
75449
- if (!viewId)
75450
- throw new CliUsageError("Usage: laze app views rm <viewId> [--site draft|published]");
75731
+ if (!viewId) throw new CliUsageError("Usage: laze app views rm <viewId>");
75451
75732
  const client = await appClient({ context, args });
75452
75733
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75453
- const site = siteOf(args, "draft");
75454
75734
  const answer4 = await client.post("/api/apps/views/delete", {
75455
75735
  appId,
75456
- site,
75457
75736
  viewId
75458
75737
  });
75459
- print5({ context, args, value: answer4, text: `Deleted view ${viewId} from the ${site}.
75738
+ print5({ context, args, value: answer4, text: `Deleted view ${viewId}.
75460
75739
  ` });
75461
75740
  };
75462
75741
  var appViews = async ({ context, args }) => {
75463
75742
  if (args.words[2] === "rm") return appViewRemove({ context, args });
75464
75743
  const client = await appClient({ context, args });
75465
75744
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75466
- const views = await client.post("/api/apps/views", {
75467
- appId,
75468
- site: siteOf(args, "draft")
75469
- });
75745
+ const views = await client.post("/api/apps/views", { appId });
75470
75746
  const lines2 = views.map(
75471
75747
  (view) => `${view.collection} ${view.name} ${view.type}${view.groupBy ? ` by ${view.groupBy}` : ""}${view.dateField ? ` on ${view.dateField}` : ""} ${view.id}
75472
75748
  `
@@ -75513,12 +75789,11 @@ var appSeed = async ({ context, args }) => {
75513
75789
  const client = await appClient({ context, args });
75514
75790
  const appId = await appIdOf({ client, args, folder });
75515
75791
  const records = await jsonFlag({ context, args, name: "records" }) ?? (await readManifest(folder))?.seed ?? {};
75516
- await client.post("/api/apps/seed", { appId, records });
75517
- 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) });
75518
75794
  };
75519
- function recordPageText({ records, site }) {
75520
- if (records.totalItems === 0) return `No records in the ${site} data.
75521
- `;
75795
+ function recordPageText({ records }) {
75796
+ if (records.totalItems === 0) return "No records yet.\n";
75522
75797
  const lines2 = records.items.map((record4) => JSON.stringify(record4)).join("\n");
75523
75798
  return `${lines2}
75524
75799
  (page ${records.page} of ${records.totalPages}, ${records.totalItems} records)
@@ -75529,7 +75804,7 @@ var appRecords = async ({ context, args }) => {
75529
75804
  if (!collection) throw new CliUsageError(USAGE5);
75530
75805
  const client = await appClient({ context, args });
75531
75806
  const appId = await appIdOf({ client, args, folder: folderOf({ context, word: void 0 }) });
75532
- const site = siteOf(args, "draft");
75807
+ noteRetiredFlags({ context, args });
75533
75808
  if (action === "write") {
75534
75809
  const data = await jsonFlag({ context, args, name: "data" });
75535
75810
  const recordId = args.words[4];
@@ -75537,7 +75812,6 @@ var appRecords = async ({ context, args }) => {
75537
75812
  "/api/apps/records/write",
75538
75813
  {
75539
75814
  appId,
75540
- site,
75541
75815
  collection,
75542
75816
  data,
75543
75817
  ...recordId ? { recordId } : {}
@@ -75549,7 +75823,7 @@ var appRecords = async ({ context, args }) => {
75549
75823
  if (action === "delete") {
75550
75824
  const recordId = args.words[4];
75551
75825
  if (!recordId) throw new CliUsageError(USAGE5);
75552
- await client.post("/api/apps/records/delete", { appId, site, collection, recordId });
75826
+ await client.post("/api/apps/records/delete", { appId, collection, recordId });
75553
75827
  return context.out(`Deleted ${recordId}
75554
75828
  `);
75555
75829
  }
@@ -75558,7 +75832,6 @@ var appRecords = async ({ context, args }) => {
75558
75832
  const sort = flagText({ args, name: "sort" });
75559
75833
  const records = await client.post("/api/apps/records", {
75560
75834
  appId,
75561
- site,
75562
75835
  collection,
75563
75836
  page,
75564
75837
  ...filter ? { filter } : {},
@@ -75568,7 +75841,7 @@ var appRecords = async ({ context, args }) => {
75568
75841
  context,
75569
75842
  args,
75570
75843
  value: records,
75571
- text: recordPageText({ records, site })
75844
+ text: recordPageText({ records })
75572
75845
  });
75573
75846
  };
75574
75847
  var appExport = async ({ context, args }) => {
@@ -75579,7 +75852,6 @@ var appExport = async ({ context, args }) => {
75579
75852
  const exported = await client.post("/api/apps/export", {
75580
75853
  appId,
75581
75854
  collection,
75582
- site: siteOf(args, "published"),
75583
75855
  format: flagText({ args, name: "format", fallback: "csv" })
75584
75856
  });
75585
75857
  const out = flagText({ args, name: "out" });
@@ -75606,7 +75878,6 @@ var appImport = async ({ context, args }) => {
75606
75878
  const result = await client.post("/api/apps/import", {
75607
75879
  appId,
75608
75880
  collection,
75609
- site: siteOf(args, "published"),
75610
75881
  csv,
75611
75882
  dryRun: Boolean(args.flags["dry-run"])
75612
75883
  });
@@ -75875,7 +76146,8 @@ var APP_COMMANDS = {
75875
76146
  create: appCreate,
75876
76147
  list: appList,
75877
76148
  push: appPush,
75878
- preview: appPreview,
76149
+ url: appUrl,
76150
+ preview: appUrl,
75879
76151
  pull: appPull,
75880
76152
  publish: appPublish,
75881
76153
  "make-internal": appMakeInternal,
@@ -76040,6 +76312,11 @@ async function whoami({ context, args }) {
76040
76312
  const who = me.kind === "agent" ? `agent ${me.name} (${me.id})` : `${me.name} (${me.id})`;
76041
76313
  context.out(`${who} in workspace ${me.workspaceId} at ${profile.url}, profile "${name3}"
76042
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
+ }
76043
76320
  }
76044
76321
  async function workspaces({ context, args }) {
76045
76322
  const config2 = await context.store.read();
@@ -76236,7 +76513,7 @@ var BROWSER_TAB_USAGE = [
76236
76513
  " laze browser tab <tab> one tab: its owner, sharing and page",
76237
76514
  " laze browser goto <tab> <url> send the tab to another page",
76238
76515
  " laze browser read <tab> the page's address, title and text",
76239
- " 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",
76240
76517
  " laze browser cdp <tab> a CDP address on the tab's browser",
76241
76518
  " laze browser share <tab> private|watch|use who sees the screen and who types into it",
76242
76519
  " laze browser close <tab> unpin the tab and close its browser",
@@ -76276,7 +76553,7 @@ async function openTab({ args, client, channel, print: print9 }) {
76276
76553
  tab,
76277
76554
  `Opened ${tab.title} (${tab.id}) in ${tab.ownerName}'s browser, pinned as a tab of the conversation.
76278
76555
  Everyone in it watches the screen live. Page: ${tab.url}
76279
- 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.
76280
76557
  `
76281
76558
  );
76282
76559
  }
@@ -76316,7 +76593,7 @@ async function askOnTab({ args, client, channel, print: print9 }) {
76316
76593
  const asked = await client.post(BROWSER_TAB_PATHS.ask, { tab, text: text2, ...channel });
76317
76594
  print9(
76318
76595
  asked,
76319
- `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.
76320
76597
  Wait for their "Done" message before you go on in ${asked.title}.
76321
76598
  `
76322
76599
  );
@@ -76841,11 +77118,11 @@ async function setup({ context, args }) {
76841
77118
  if (machine2.type === "own")
76842
77119
  return context.out(
76843
77120
  `The browser runs on ${machine2.name}, a person's own machine (${siteLine(machine2)}).
76844
- The screen link goes to its owner's DM. ${next}`
77121
+ The screen link is posted where you were asked, for its owner. ${next}`
76845
77122
  );
76846
77123
  context.out(
76847
77124
  `${machine2.name} is ${machine2.state} (${siteLine(machine2)}).
76848
- 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}`
76849
77126
  );
76850
77127
  }
76851
77128
  async function cdp({ context, args }) {
@@ -76939,7 +77216,7 @@ async function screen({ context, args }) {
76939
77216
  `);
76940
77217
  context.out(
76941
77218
  link.url ? `${link.url}
76942
- ` : `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.
76943
77220
  `
76944
77221
  );
76945
77222
  }
@@ -78181,6 +78458,11 @@ var browserTabAskDefinition = external_exports.object({
78181
78458
  text: external_exports.string(),
78182
78459
  agentId: external_exports.string().min(1),
78183
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(),
78184
78466
  at: external_exports.iso.datetime()
78185
78467
  });
78186
78468
  var browserTabDefinition = external_exports.object({
@@ -78194,11 +78476,17 @@ var browserTabDefinition = external_exports.object({
78194
78476
  ownerName: external_exports.string(),
78195
78477
  openedBy: browserTabActorDefinition,
78196
78478
  sharing: browserTabSharingSchema,
78197
- /** 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. */
78198
78480
  ask: browserTabAskDefinition.nullable(),
78199
78481
  createdAt: external_exports.iso.datetime(),
78200
- /** What the reader may do: see the screen, type into it, change the tab. */
78201
- 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
+ })
78202
78490
  });
78203
78491
  var browserTabSchema = browserTabDefinition;
78204
78492
  var browserTabListDefinition = external_exports.object({ tabs: external_exports.array(browserTabDefinition) });
@@ -79061,7 +79349,7 @@ var dedicatedIpKeyReleasedDefinition = external_exports.object({
79061
79349
  });
79062
79350
 
79063
79351
  // ../../modules/compute/contract/src/own-machine-ssh.ts
79064
- var workspaceIdSchema15 = external_exports.string().min(1).max(64);
79352
+ var workspaceIdSchema16 = external_exports.string().min(1).max(64);
79065
79353
  var machineRefText = external_exports.string().min(1).max(64);
79066
79354
  var sshHostKeySchema = external_exports.string().regex(/^SHA256:[A-Za-z0-9+/]{43}$/);
79067
79355
  function sshTargetText({ target }) {
@@ -79083,7 +79371,7 @@ var machineSshDefinition = external_exports.object({
79083
79371
  });
79084
79372
  var machineSshSchema = machineSshDefinition;
79085
79373
  var connectSshDefinition = external_exports.object({
79086
- workspaceId: workspaceIdSchema15,
79374
+ workspaceId: workspaceIdSchema16,
79087
79375
  /** Checked by `checkMachineName`, so a refusal reads as a sentence. */
79088
79376
  name: external_exports.string().max(200),
79089
79377
  /** `user@host[:port]`, checked by `parseSshTarget`. */
@@ -79092,7 +79380,7 @@ var connectSshDefinition = external_exports.object({
79092
79380
  var connectSshMachineInputSchema = connectSshDefinition;
79093
79381
  var restConnectSshDefinition = connectSshDefinition.omit({ workspaceId: true });
79094
79382
  var trustHostKeyDefinition = external_exports.object({
79095
- workspaceId: workspaceIdSchema15,
79383
+ workspaceId: workspaceIdSchema16,
79096
79384
  machine: machineRefText,
79097
79385
  hostKey: sshHostKeySchema
79098
79386
  });
@@ -79100,7 +79388,7 @@ var trustHostKeyInputSchema = trustHostKeyDefinition;
79100
79388
  var restTrustHostKeyDefinition = trustHostKeyDefinition.omit({ workspaceId: true });
79101
79389
 
79102
79390
  // ../../modules/compute/contract/src/own-machine-whatsapp.ts
79103
- var workspaceIdSchema16 = external_exports.string().min(1).max(64);
79391
+ var workspaceIdSchema17 = external_exports.string().min(1).max(64);
79104
79392
  var machineRefText2 = external_exports.string().min(1).max(64);
79105
79393
  var WHATSAPP_TEXT_MAX = 4096;
79106
79394
  var WHATSAPP_LIMIT_MAX = 200;
@@ -79137,25 +79425,25 @@ var messagesResultDefinition = external_exports.object({
79137
79425
  var limitSchema = external_exports.number().int().min(1).max(WHATSAPP_LIMIT_MAX);
79138
79426
  var chatRefSchema = external_exports.string().trim().min(1).max(200);
79139
79427
  var chatsInputDefinition = external_exports.object({
79140
- workspaceId: workspaceIdSchema16,
79428
+ workspaceId: workspaceIdSchema17,
79141
79429
  machine: machineRefText2,
79142
79430
  limit: limitSchema.optional()
79143
79431
  });
79144
79432
  var readInputDefinition = external_exports.object({
79145
- workspaceId: workspaceIdSchema16,
79433
+ workspaceId: workspaceIdSchema17,
79146
79434
  machine: machineRefText2,
79147
79435
  /** A chat id, a phone number or a contact or group name. */
79148
79436
  chat: chatRefSchema,
79149
79437
  limit: limitSchema.optional()
79150
79438
  });
79151
79439
  var sendInputDefinition = external_exports.object({
79152
- workspaceId: workspaceIdSchema16,
79440
+ workspaceId: workspaceIdSchema17,
79153
79441
  machine: machineRefText2,
79154
79442
  chat: chatRefSchema,
79155
79443
  text: external_exports.string().trim().min(1).max(WHATSAPP_TEXT_MAX)
79156
79444
  });
79157
79445
  var sendStatusInputDefinition = external_exports.object({
79158
- workspaceId: workspaceIdSchema16,
79446
+ workspaceId: workspaceIdSchema17,
79159
79447
  sendId: external_exports.string().min(1).max(64),
79160
79448
  /** Wait up to this long for the owner's answer; 0 answers at once. */
79161
79449
  waitSeconds: external_exports.number().int().min(0).max(WHATSAPP_STATUS_WAIT_MAX_SECONDS).default(0)
@@ -79193,7 +79481,7 @@ var whatsappPairingDefinition = external_exports.object({
79193
79481
  });
79194
79482
  var whatsappPairingSchema = whatsappPairingDefinition;
79195
79483
  var pairingRefDefinition = external_exports.object({
79196
- workspaceId: workspaceIdSchema16,
79484
+ workspaceId: workspaceIdSchema17,
79197
79485
  pairingId: external_exports.string().min(1).max(64)
79198
79486
  });
79199
79487
  var whatsappPairingRefSchema = pairingRefDefinition;
@@ -79214,7 +79502,7 @@ var COMPUTE_WHATSAPP_REST_PATHS = {
79214
79502
  };
79215
79503
 
79216
79504
  // ../../modules/compute/contract/src/own-machine.ts
79217
- var workspaceIdSchema17 = external_exports.string().min(1).max(64);
79505
+ var workspaceIdSchema18 = external_exports.string().min(1).max(64);
79218
79506
  var machineRefText3 = external_exports.string().min(1).max(64);
79219
79507
  var machineBrowserDefinition = external_exports.object({
79220
79508
  ready: external_exports.boolean(),
@@ -79247,7 +79535,7 @@ var machineHealthDefinition = external_exports.object({
79247
79535
  });
79248
79536
  var machineHealthSchema = machineHealthDefinition;
79249
79537
  var connectOwnDefinition = external_exports.object({
79250
- workspaceId: workspaceIdSchema17,
79538
+ workspaceId: workspaceIdSchema18,
79251
79539
  /** Checked by `checkMachineName`, so a refusal reads as a sentence. */
79252
79540
  name: external_exports.string().max(200)
79253
79541
  });
@@ -79255,7 +79543,7 @@ var connectOwnMachineInputSchema = connectOwnDefinition;
79255
79543
  var MACHINE_EXEC_MAX_SECONDS = 240;
79256
79544
  var MACHINE_EXEC_OUTPUT_BYTES = 1024 * 1024;
79257
79545
  var execDefinition = external_exports.object({
79258
- workspaceId: workspaceIdSchema17,
79546
+ workspaceId: workspaceIdSchema18,
79259
79547
  machine: machineRefText3,
79260
79548
  command: external_exports.string().min(1).max(64 * 1024),
79261
79549
  timeoutSeconds: external_exports.number().int().min(1).max(MACHINE_EXEC_MAX_SECONDS).optional(),
@@ -79327,14 +79615,14 @@ function gigabytes(bytes) {
79327
79615
  }
79328
79616
  var hostWhenOfflineSchema = external_exports.enum(["wait", "sandbox"]);
79329
79617
  var hostAgentDefinition = external_exports.object({
79330
- workspaceId: workspaceIdSchema17,
79618
+ workspaceId: workspaceIdSchema18,
79331
79619
  machine: machineRefText3,
79332
79620
  agentId: external_exports.string().min(1).max(64),
79333
79621
  whenOffline: hostWhenOfflineSchema.default("wait")
79334
79622
  });
79335
79623
  var hostAgentInputSchema = hostAgentDefinition;
79336
79624
  var unhostAgentDefinition = external_exports.object({
79337
- workspaceId: workspaceIdSchema17,
79625
+ workspaceId: workspaceIdSchema18,
79338
79626
  agentId: external_exports.string().min(1).max(64)
79339
79627
  });
79340
79628
  var unhostAgentInputSchema = unhostAgentDefinition;
@@ -79353,8 +79641,8 @@ var agentHostGrantDefinition = external_exports.object({
79353
79641
  });
79354
79642
 
79355
79643
  // ../../modules/compute/contract/src/compute.ts
79356
- var idSchema19 = external_exports.string().min(1).max(64);
79357
- 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);
79358
79646
  var machineStateSchema = external_exports.enum([
79359
79647
  "starting",
79360
79648
  "ready",
@@ -79375,24 +79663,24 @@ var machinePriceDefinition = external_exports.object({
79375
79663
  asleepMonthUsd: external_exports.number()
79376
79664
  });
79377
79665
  var machineGranteeKindSchema = external_exports.enum(["member", "agent"]);
79378
- var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id: idSchema19 });
79666
+ var machineGranteeDefinition = external_exports.object({ kind: machineGranteeKindSchema, id: idSchema20 });
79379
79667
  var machineGrantDefinition = external_exports.object({
79380
79668
  kind: machineGranteeKindSchema,
79381
- id: idSchema19,
79382
- grantedByUserId: idSchema19,
79669
+ id: idSchema20,
79670
+ grantedByUserId: idSchema20,
79383
79671
  grantedAt: external_exports.iso.datetime()
79384
79672
  });
79385
79673
  var machineDefinition = external_exports.object({
79386
- id: idSchema19,
79387
- workspaceId: workspaceIdSchema18,
79674
+ id: idSchema20,
79675
+ workspaceId: workspaceIdSchema19,
79388
79676
  name: external_exports.string(),
79389
79677
  type: machineTypeSchema,
79390
79678
  zone: external_exports.string(),
79391
79679
  state: machineStateSchema,
79392
- ownerUserId: idSchema19,
79393
- requesterUserId: idSchema19,
79394
- renterAgentId: idSchema19.nullable(),
79395
- channelId: idSchema19.nullable(),
79680
+ ownerUserId: idSchema20,
79681
+ requesterUserId: idSchema20,
79682
+ renterAgentId: idSchema20.nullable(),
79683
+ channelId: idSchema20.nullable(),
79396
79684
  ipAddress: external_exports.string().nullable(),
79397
79685
  sites: external_exports.array(machineSiteDefinition),
79398
79686
  /** Members and agents the owner shared the machine with, beyond the owner's own agents. */
@@ -79424,7 +79712,7 @@ var machineDefinition = external_exports.object({
79424
79712
  /** The owner's agents set to run on this own machine. */
79425
79713
  hostedAgents: external_exports.array(
79426
79714
  external_exports.object({
79427
- id: idSchema19,
79715
+ id: idSchema20,
79428
79716
  name: external_exports.string(),
79429
79717
  whenOffline: external_exports.enum(["wait", "sandbox"])
79430
79718
  })
@@ -79435,23 +79723,23 @@ var machineDefinition = external_exports.object({
79435
79723
  var machineSchema = machineDefinition;
79436
79724
  var computeStatusDefinition = external_exports.object({ available: external_exports.boolean() });
79437
79725
  var computeStatusSchema = computeStatusDefinition;
79438
- var workspaceInputDefinition2 = external_exports.object({ workspaceId: workspaceIdSchema18 });
79726
+ var workspaceInputDefinition2 = external_exports.object({ workspaceId: workspaceIdSchema19 });
79439
79727
  var computeWorkspaceInputSchema = workspaceInputDefinition2;
79440
79728
  var machineRefDefinition = external_exports.object({
79441
- workspaceId: workspaceIdSchema18,
79729
+ workspaceId: workspaceIdSchema19,
79442
79730
  machine: external_exports.string().min(1).max(64)
79443
79731
  });
79444
79732
  var machineRefSchema = machineRefDefinition;
79445
79733
  var MACHINE_NAME_MAX = 40;
79446
79734
  var machineNameSchema = external_exports.string().min(2).max(MACHINE_NAME_MAX).regex(/^[a-z0-9][a-z0-9-]*$/, "lowercase letters, digits and dashes");
79447
79735
  var renameDefinition = external_exports.object({
79448
- workspaceId: workspaceIdSchema18,
79736
+ workspaceId: workspaceIdSchema19,
79449
79737
  machine: external_exports.string().min(1).max(64),
79450
79738
  name: external_exports.string().max(200)
79451
79739
  });
79452
79740
  var renameMachineInputSchema = renameDefinition;
79453
79741
  var setupBrowserDefinition = external_exports.object({
79454
- workspaceId: workspaceIdSchema18,
79742
+ workspaceId: workspaceIdSchema19,
79455
79743
  /** The site the person signs in to, as a host or a URL. */
79456
79744
  site: external_exports.string().min(1).max(500),
79457
79745
  name: machineNameSchema.optional(),
@@ -79460,29 +79748,29 @@ var setupBrowserDefinition = external_exports.object({
79460
79748
  });
79461
79749
  var setupBrowserInputSchema = setupBrowserDefinition;
79462
79750
  var grantDefinition = external_exports.object({
79463
- workspaceId: workspaceIdSchema18,
79751
+ workspaceId: workspaceIdSchema19,
79464
79752
  machine: external_exports.string().min(1).max(64),
79465
79753
  grantee: machineGranteeDefinition
79466
79754
  });
79467
79755
  var machineGrantInputSchema = grantDefinition;
79468
79756
  var setBudgetDefinition = external_exports.object({
79469
- workspaceId: workspaceIdSchema18,
79757
+ workspaceId: workspaceIdSchema19,
79470
79758
  machine: external_exports.string().min(1).max(64),
79471
79759
  budgetUsd: external_exports.number().min(0).max(1e4),
79472
79760
  period: machineBudgetPeriodSchema
79473
79761
  });
79474
79762
  var setMachineBudgetInputSchema = setBudgetDefinition;
79475
79763
  var openScreenDefinition = external_exports.object({
79476
- workspaceId: workspaceIdSchema18,
79764
+ workspaceId: workspaceIdSchema19,
79477
79765
  machine: external_exports.string().min(1).max(64),
79478
79766
  site: external_exports.string().min(1).max(500).optional()
79479
79767
  });
79480
79768
  var openScreenInputSchema = openScreenDefinition;
79481
- var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema18, sessionId: idSchema19 });
79769
+ var screenRefDefinition = external_exports.object({ workspaceId: workspaceIdSchema19, sessionId: idSchema20 });
79482
79770
  var screenRefSchema = screenRefDefinition;
79483
79771
  var screenSessionDefinition = external_exports.object({
79484
- sessionId: idSchema19,
79485
- machineId: idSchema19,
79772
+ sessionId: idSchema20,
79773
+ machineId: idSchema20,
79486
79774
  machineName: external_exports.string(),
79487
79775
  site: external_exports.string().nullable(),
79488
79776
  expiresAt: external_exports.iso.datetime(),
@@ -79516,7 +79804,7 @@ var ownMachineSshConnectDefinition = external_exports.object({
79516
79804
  publicKey: external_exports.string()
79517
79805
  });
79518
79806
  var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
79519
- var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema18, machineId: idSchema19 });
79807
+ var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema19, machineId: idSchema20 });
79520
79808
  var ComputeApi = moduleApi()("compute");
79521
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();
79522
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();
@@ -81569,6 +81857,7 @@ var feedApprovalSchemaDefinition = external_exports.object({
81569
81857
  "app_access",
81570
81858
  "computer",
81571
81859
  "agent_join",
81860
+ "agent_transfer",
81572
81861
  "vault_share"
81573
81862
  ]),
81574
81863
  requestId: external_exports.string(),
@@ -81872,7 +82161,7 @@ var feedFileLinkInputSchemaDefinition = external_exports.object({
81872
82161
  var feedFileLinkInputSchema = feedFileLinkInputSchemaDefinition;
81873
82162
  var feedFileLinkSchemaDefinition = external_exports.object({ url: external_exports.string(), expiresAt: external_exports.iso.datetime() });
81874
82163
  var feedFileLinkSchema = feedFileLinkSchemaDefinition;
81875
- 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();
81876
82165
  var feedUi = uiTokens("feed");
81877
82166
  var FeedNavSlot = feedUi.component("nav");
81878
82167
  var FeedDecisionsSlot = feedUi.component("decisions");
@@ -86090,9 +86379,9 @@ function refusalOf({
86090
86379
  settled: settled2
86091
86380
  }) {
86092
86381
  const codes = [];
86093
- for (const [key, release2] of settled2) {
86382
+ for (const release2 of settled2.values()) {
86094
86383
  if (release2.outcome !== "deny") continue;
86095
- context.err(`laze vault: ${key}: ${release2.message}
86384
+ context.err(`${release2.message}
86096
86385
  `);
86097
86386
  codes.push(release2.exitCode || 1);
86098
86387
  }
@@ -86148,6 +86437,16 @@ Prints AWS credential_process JSON with a short-lived STS session minted from th
86148
86437
  With -- <command>, runs it with AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN set.
86149
86438
  The reason comes from --reason, else KV_REASON or LAZE_VAULT_REASON: set it on each aws, kubectl,
86150
86439
  helm or terraform command, which reach this through credential_process.`;
86440
+ function withWaitSeconds(args) {
86441
+ if (args.flags.wait !== true) return args;
86442
+ const at = args.words.findLastIndex((word3, index) => index >= 2 && /^\d+$/.test(word3));
86443
+ if (at === -1) return args;
86444
+ return {
86445
+ ...args,
86446
+ words: args.words.filter((_, index) => index !== at),
86447
+ flags: { ...args.flags, wait: args.words[at] ?? "" }
86448
+ };
86449
+ }
86151
86450
  function reasonOf({ context, args }) {
86152
86451
  const env = context.environment.inherited;
86153
86452
  return flagText({ args, name: "reason" }) || env.KV_REASON?.trim() || env.LAZE_VAULT_REASON?.trim() || "";
@@ -86226,8 +86525,9 @@ function wrappedCommandOf(args) {
86226
86525
  }
86227
86526
  async function vaultEnv2({
86228
86527
  context,
86229
- args
86528
+ args: given
86230
86529
  }) {
86530
+ const args = withWaitSeconds(given);
86231
86531
  if (args.flags.help) {
86232
86532
  context.out(`${ENV_USAGE}
86233
86533
  `);
@@ -86262,12 +86562,14 @@ ${ENV_USAGE}`);
86262
86562
  `);
86263
86563
  return 0;
86264
86564
  }
86265
- return context.runCommand({ command: args.rest, env });
86565
+ const redact = [...released.values()].flatMap(({ fields }) => Object.values(fields));
86566
+ return context.runCommand({ command: args.rest, env, redact });
86266
86567
  }
86267
86568
  async function vaultAws({
86268
86569
  context,
86269
- args
86570
+ args: given
86270
86571
  }) {
86572
+ const args = withWaitSeconds(given);
86271
86573
  const connection = args.words[2];
86272
86574
  if (!connection || args.flags.help) throw new CliUsageError(AWS_USAGE);
86273
86575
  const reason = reasonOf({ context, args });
@@ -86439,8 +86741,8 @@ var WHATSAPP_BUSINESS_REST_PATHS = {
86439
86741
  var WHATSAPP_BUSINESS_TEXT_MAX = 4096;
86440
86742
  var WHATSAPP_BUSINESS_LIMIT_MAX = 200;
86441
86743
  var WHATSAPP_BUSINESS_STATUS_WAIT_MAX_SECONDS = 50;
86442
- var workspaceIdSchema19 = external_exports.string().min(1).max(64);
86443
- 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 });
86444
86746
  var digits = (what) => external_exports.string().trim().regex(/^\d{5,30}$/, `${what} is the number Meta shows, digits only`);
86445
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");
86446
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");
@@ -86474,7 +86776,7 @@ var statusDefinition = external_exports.object({
86474
86776
  });
86475
86777
  var whatsappBusinessStatusSchema = statusDefinition;
86476
86778
  var connectDefinition = external_exports.object({
86477
- workspaceId: workspaceIdSchema19,
86779
+ workspaceId: workspaceIdSchema20,
86478
86780
  appId: digits("The app id"),
86479
86781
  wabaId: digits("The WhatsApp Business Account id"),
86480
86782
  phoneNumberId: digits("The phone number id"),
@@ -86497,7 +86799,7 @@ var webhookDefinition = external_exports.object({
86497
86799
  });
86498
86800
  var whatsappBusinessWebhookSchema = webhookDefinition;
86499
86801
  var settingsDefinition = external_exports.object({
86500
- workspaceId: workspaceIdSchema19,
86802
+ workspaceId: workspaceIdSchema20,
86501
86803
  /** The agent that answers; null for none. Left out keeps the current one. */
86502
86804
  agentId: external_exports.string().min(1).max(64).nullable().optional(),
86503
86805
  replyMode: whatsappBusinessReplyModeSchema.optional()
@@ -86517,7 +86819,7 @@ var whatsappBusinessConversationSchema = conversationDefinition;
86517
86819
  var limitSchema2 = external_exports.number().int().min(1).max(WHATSAPP_BUSINESS_LIMIT_MAX);
86518
86820
  var contactRefSchema = external_exports.string().trim().min(1).max(64);
86519
86821
  var conversationsInputDefinition = external_exports.object({
86520
- workspaceId: workspaceIdSchema19,
86822
+ workspaceId: workspaceIdSchema20,
86521
86823
  limit: limitSchema2.optional()
86522
86824
  });
86523
86825
  var whatsappBusinessConversationsInputSchema = conversationsInputDefinition;
@@ -86543,7 +86845,7 @@ var messageDefinition = external_exports.object({
86543
86845
  template: external_exports.string().nullable()
86544
86846
  });
86545
86847
  var readInputDefinition2 = external_exports.object({
86546
- workspaceId: workspaceIdSchema19,
86848
+ workspaceId: workspaceIdSchema20,
86547
86849
  contact: contactRefSchema,
86548
86850
  limit: limitSchema2.optional()
86549
86851
  });
@@ -86552,12 +86854,12 @@ var readDefinition = external_exports.object({
86552
86854
  messages: external_exports.array(messageDefinition)
86553
86855
  });
86554
86856
  var sendInputDefinition2 = external_exports.object({
86555
- workspaceId: workspaceIdSchema19,
86857
+ workspaceId: workspaceIdSchema20,
86556
86858
  to: contactRefSchema,
86557
86859
  text: external_exports.string().trim().min(1).max(WHATSAPP_BUSINESS_TEXT_MAX)
86558
86860
  });
86559
86861
  var sendTemplateInputDefinition = external_exports.object({
86560
- workspaceId: workspaceIdSchema19,
86862
+ workspaceId: workspaceIdSchema20,
86561
86863
  to: contactRefSchema,
86562
86864
  template: external_exports.string().trim().min(1).max(512),
86563
86865
  /** The template's language code; the only approved one when left out. */
@@ -86584,7 +86886,7 @@ function whatsappBusinessSendSettled({
86584
86886
  return state !== "waiting" && state !== "sending";
86585
86887
  }
86586
86888
  var sendStatusInputDefinition2 = external_exports.object({
86587
- workspaceId: workspaceIdSchema19,
86889
+ workspaceId: workspaceIdSchema20,
86588
86890
  sendId: external_exports.string().min(1).max(64),
86589
86891
  waitSeconds: external_exports.number().int().min(0).max(WHATSAPP_BUSINESS_STATUS_WAIT_MAX_SECONDS).default(0)
86590
86892
  });
@@ -86634,7 +86936,7 @@ var restSendStatusDefinition2 = sendStatusInputDefinition2.omit({ workspaceId: t
86634
86936
  var restSettingsDefinition = settingsDefinition.omit({ workspaceId: true });
86635
86937
  var restEmptyDefinition = external_exports.object({});
86636
86938
  var WhatsappBusinessApi = moduleApi()("whatsapp-business");
86637
- 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();
86638
86940
 
86639
86941
  // ../../modules/whatsapp-business/contract/src/whatsapp-business.config.ts
86640
86942
  var whatsappBusinessConfig = Config.define((c) => ({
@@ -87906,7 +88208,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
87906
88208
  laze memory get|set|append|history <file>, search, pull SOUL.md, AGENTS.md, a channel's MEMORY.md
87907
88209
  laze wiki list|get|put|search|history|mv|rm the workspace wiki
87908
88210
  laze skill list|install|show|pull|rm|update|pin|unpin your agent's skills and the catalogue
87909
- 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
87910
88212
  laze app every laze app command, with its flags
87911
88213
  laze agents list | laze agents status <name> the workspace's agents and their context
87912
88214
  laze agents show <name> [--json] an agent's profile: kind, how it runs, intelligence
@@ -87923,7 +88225,10 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
87923
88225
  laze agent restore|delete <agent> bring an archived agent back, or delete it for good now
87924
88226
  laze agent copy <agent> <name> a team copy of a personal agent, with its skills
87925
88227
  laze agent pause|resume <agent> [--reason <why>] pause an agent Laze runs, or resume it
87926
- 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
87927
88232
  laze agent reset-session <agent> stop its turn; its next message starts a fresh session
87928
88233
  laze agent default [<agent> | --clear] the workspace default agent; an Admin picks a team agent
87929
88234
  laze agent logins list|add|rename|remove|check|history your Claude and Codex logins; a token is read from stdin only
@@ -87933,6 +88238,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
87933
88238
  laze agent permission-prompts <agent> each permission prompt its harness raised and rush's answer
87934
88239
  laze agent share|unshare <agent> --person <userId> | --channel <channelId> share it (its owner)
87935
88240
  laze agent stop <agent> --channel <channelId> stop its running turn there
88241
+ laze agent retry <agent> --channel <id> --message <id> Try again on its failed turn on that message
87936
88242
  laze agent invite [--name <name>] [--channel <id>] a one-time link that connects a new agent;
87937
88243
  without --name the agent picks its own
87938
88244
  laze agent faces every agent's sloth seed or picture
@@ -87961,9 +88267,9 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
87961
88267
  laze connect install|status|stop|uninstall the service that hands linked Codex sessions their messages
87962
88268
  laze openclaw list|connect|agent|agent-key|feed|disconnect your OpenClaw gateways and their agents
87963
88269
  laze browser open|tabs|goto|read|ask|cdp|share|close a live browser tab pinned to the conversation
87964
- 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
87965
88271
  laze browser setup|cdp|screen|status <machine> a machine with Chrome a person signs in on, for agents
87966
- 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
87967
88273
  laze browser setup <site> --on <machine> the browser on a person's own machine instead, at no Laze compute cost
87968
88274
  laze machine connect <name> connect your own machine (a Mac mini, a Linux box): the command to run on it
87969
88275
  laze machine connect <name> --ssh <user>@<host>[:port] a machine that cannot run the connector (a NAS), over SSH
@@ -88186,6 +88492,7 @@ var COMMANDS3 = {
88186
88492
  "agent unshare": shareAgent,
88187
88493
  "agent dm": openAgentDirect,
88188
88494
  "agent stop": stopAgentTurn,
88495
+ "agent retry": retryAgentTurn,
88189
88496
  "agent disconnect": disconnectAgent,
88190
88497
  "agent invite": inviteAgent,
88191
88498
  "mcp gateway": serveMcpGateway,
@@ -88345,7 +88652,8 @@ async function runCommand({
88345
88652
  env,
88346
88653
  stdout: stdout2 = process.stdout,
88347
88654
  stderr: stderr2 = process.stderr,
88348
- signal
88655
+ signal,
88656
+ redact
88349
88657
  }) {
88350
88658
  const [program = "", ...rest] = command;
88351
88659
  try {
@@ -88355,7 +88663,8 @@ async function runCommand({
88355
88663
  baseEnv: inherited,
88356
88664
  stdout: stdout2,
88357
88665
  stderr: stderr2,
88358
- ...signal ? { signal } : {}
88666
+ ...signal ? { signal } : {},
88667
+ ...redact ? { redact } : {}
88359
88668
  });
88360
88669
  } catch (error62) {
88361
88670
  stderr2.write(`laze vault: ${error62 instanceof Error ? error62.message : String(error62)}