@lazehq/cli 0.1.92 → 0.1.94

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 +655 -106
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -37171,7 +37171,7 @@ function flagText({
37171
37171
  }
37172
37172
 
37173
37173
  // src/rules/cli-version.rules.ts
37174
- var STAMPED = "0.1.92";
37174
+ var STAMPED = "0.1.94";
37175
37175
  function cliVersionOf({ stamped = STAMPED } = {}) {
37176
37176
  return stamped.startsWith("__") ? "dev" : stamped;
37177
37177
  }
@@ -60229,7 +60229,8 @@ var createVaultConnectionInputSchemaDefinition = external_exports.object({
60229
60229
  name: vaultConnectionNameSchema,
60230
60230
  label: external_exports.string().trim().min(1).max(120),
60231
60231
  keychain: vaultOwnedKeychainSchema,
60232
- sensitivity: vaultSensitivitySchema,
60232
+ /** Left out, the connection starts at its connector tier's level (connector-tiers.feature). */
60233
+ sensitivity: vaultSensitivitySchema.optional(),
60233
60234
  rules: external_exports.string().max(2e3).default(""),
60234
60235
  approverUserIds: external_exports.array(external_exports.string().min(1)).default([]),
60235
60236
  maxLeaseSeconds: external_exports.number().int().positive().max(VAULT_MAX_LEASE_SECONDS).nullable().default(null),
@@ -60355,6 +60356,8 @@ var vaultWaitingShareSchemaDefinition = external_exports.object({
60355
60356
  keyLabel: external_exports.string(),
60356
60357
  /** The teammate the share is for. */
60357
60358
  recipientUserId: external_exports.string().min(1),
60359
+ /** The key's owner, who answers the share. */
60360
+ ownerUserId: external_exports.string().min(1),
60358
60361
  /** The agent that asked the share; null when it was asked from the CLI. */
60359
60362
  agentId: external_exports.string().nullable().default(null),
60360
60363
  expiresAt: external_exports.iso.datetime().nullable(),
@@ -60656,7 +60659,7 @@ var vaultConnectionUseSchemaDefinition = external_exports.object({
60656
60659
  requestId: external_exports.string().nullable().default(null),
60657
60660
  leaseId: external_exports.string().nullable().default(null),
60658
60661
  origin: vaultUseOriginSchema.nullable().default(null),
60659
- /** How a person's read happened: `page` (Reveal) or `own_secret` (the CLI or Laze for them). */
60662
+ /** How a read happened: `page` (Reveal), `own_secret` (the CLI) or `laze` (Laze's own code). */
60660
60663
  via: external_exports.string().nullable().default(null),
60661
60664
  /** On a share or a tier change: the person it named, the new tier, and the proof used. */
60662
60665
  change: external_exports.object({
@@ -60693,6 +60696,49 @@ var saveGithubInstallationInputSchemaDefinition = external_exports.object({
60693
60696
  var vaultJudgeStatusSchemaDefinition = external_exports.object({ configured: external_exports.boolean() });
60694
60697
  var vaultJudgeStatusSchema = vaultJudgeStatusSchemaDefinition;
60695
60698
  var vaultLimitSubjectSchema = external_exports.string().regex(/^[a-z0-9-]+(\.[a-z]+)?$/);
60699
+ var vaultTierSchema = external_exports.enum(["sensitive", "standard", "low_risk"]);
60700
+ var vaultTierSettingSchemaDefinition = external_exports.object({
60701
+ tier: vaultTierSchema,
60702
+ defaultLevel: vaultSensitivitySchema,
60703
+ /** Members cannot set a connection of this tier below its default, checked at every use. */
60704
+ enforced: external_exports.boolean()
60705
+ });
60706
+ var vaultTierSettingSchema = vaultTierSettingSchemaDefinition;
60707
+ var vaultTierSubjectSchemaDefinition = external_exports.object({
60708
+ subject: vaultLimitSubjectSchema,
60709
+ label: external_exports.string(),
60710
+ tier: vaultTierSchema,
60711
+ /** The tier Laze puts it in; null for a rule an admin added. */
60712
+ builtInTier: vaultTierSchema.nullable(),
60713
+ reason: external_exports.string()
60714
+ });
60715
+ var vaultTierSubjectSchema = vaultTierSubjectSchemaDefinition;
60716
+ var vaultTierPolicySchemaDefinition = external_exports.object({
60717
+ tiers: external_exports.array(vaultTierSettingSchema),
60718
+ subjects: external_exports.array(vaultTierSubjectSchema)
60719
+ });
60720
+ var vaultTierPolicySchema = vaultTierPolicySchemaDefinition;
60721
+ var setVaultTierSettingInputSchemaDefinition = external_exports.object({
60722
+ workspaceId: external_exports.string().min(1),
60723
+ tier: vaultTierSchema,
60724
+ defaultLevel: vaultSensitivitySchema,
60725
+ enforced: external_exports.boolean(),
60726
+ /** A passkey proof, needed when the change lowers a tier that started at Always ask or above. */
60727
+ reauthToken: external_exports.string().min(1).max(200).optional()
60728
+ });
60729
+ var setVaultTierSettingInputSchema = setVaultTierSettingInputSchemaDefinition;
60730
+ var setVaultSubjectTierInputSchemaDefinition = external_exports.object({
60731
+ workspaceId: external_exports.string().min(1),
60732
+ subject: vaultLimitSubjectSchema.optional(),
60733
+ serverUrl: external_exports.string().trim().min(3).max(500).optional(),
60734
+ label: external_exports.string().trim().min(1).max(80).optional(),
60735
+ tier: vaultTierSchema.nullable(),
60736
+ /** A passkey proof, needed when the move lowers a connector from Always ask or above. */
60737
+ reauthToken: external_exports.string().min(1).max(200).optional()
60738
+ }).refine((input2) => Boolean(input2.subject) !== Boolean(input2.serverUrl), {
60739
+ message: "Name a subject or a server address, not both"
60740
+ });
60741
+ var setVaultSubjectTierInputSchema = setVaultSubjectTierInputSchemaDefinition;
60696
60742
  var vaultLevelLimitSchemaDefinition = external_exports.object({
60697
60743
  subject: vaultLimitSubjectSchema,
60698
60744
  most: vaultSensitivitySchema,
@@ -60791,7 +60837,13 @@ var vaultCoreTrpc = defineTrpcContract("vault").mutation("createConnection").wit
60791
60837
  })
60792
60838
  ).withOutput(vaultSealedMaterialSchema).query("getSealedApproval").withInput(external_exports.object({ ...workspaceInput.shape, requestId: external_exports.string().min(1) })).withOutput(vaultSealedApprovalSchema).mutation("answerSealedApproval").withInput(answerSealedApprovalInputSchema).withOutput(vaultApprovalRequestSchema).mutation("compareSecret").withInput(compareVaultSecretInputSchema).withOutput(vaultSecretComparisonSchema).mutation("replaceSecretValue").withInput(replaceVaultSecretValueInputSchema).withOutput(vaultConnectionSchema).mutation("savePastedSecret").withInput(external_exports.object({ ...workspaceInput.shape, ...saveVaultPastedSecretBodySchema.shape })).withOutput(vaultPastedSecretSavedSchema).build();
60793
60839
  var vaultAgentRuleTrpc = defineTrpcContract("vault").query("listAgentRules").withInput(listVaultAgentRulesInputSchema).withOutput(external_exports.array(vaultAgentRuleEntrySchema)).mutation("setAgentRule").withInput(setVaultAgentRuleInputSchema).withOutput(external_exports.array(vaultAgentRuleEntrySchema)).build();
60794
- var vaultTrpc = joinTrpcContracts("vault", vaultCoreTrpc, vaultAgentRuleTrpc);
60840
+ var vaultTierTrpc = defineTrpcContract("vault").query("tierPolicy").withInput(workspaceInput).withOutput(vaultTierPolicySchema).mutation("setTierSetting").withInput(setVaultTierSettingInputSchema).withOutput(vaultTierPolicySchema).mutation("setSubjectTier").withInput(setVaultSubjectTierInputSchema).withOutput(vaultTierPolicySchema).build();
60841
+ var vaultTrpc = joinTrpcContracts(
60842
+ "vault",
60843
+ vaultCoreTrpc,
60844
+ vaultAgentRuleTrpc,
60845
+ vaultTierTrpc
60846
+ );
60795
60847
 
60796
60848
  // ../../modules/vault/contract/src/vault.config.ts
60797
60849
  var positiveInt = external_exports.coerce.number().int().positive();
@@ -60957,6 +61009,19 @@ var vaultShareSettledPayloadSchemaDefinition = external_exports.object({
60957
61009
  resolutionNote: external_exports.string().default(""),
60958
61010
  at: external_exports.iso.datetime()
60959
61011
  });
61012
+ var vaultShareWaitingPayloadSchemaDefinition = external_exports.object({
61013
+ workspaceId: external_exports.string().min(1),
61014
+ grantId: external_exports.string().min(1),
61015
+ ownerUserId: external_exports.string().min(1),
61016
+ at: external_exports.iso.datetime()
61017
+ });
61018
+
61019
+ // ../../modules/vault/contract/src/vault-tiers.ts
61020
+ var VAULT_TIER_BUILT_IN_LEVELS = {
61021
+ sensitive: "ask",
61022
+ standard: "checked",
61023
+ low_risk: "auto"
61024
+ };
60960
61025
 
60961
61026
  // ../../modules/vault/contract/src/vault-oauth.ts
60962
61027
  var tokenFieldsSchema = external_exports.object({
@@ -61184,6 +61249,12 @@ var vaultConnectionReconnectedPayloadSchemaDefinition = external_exports.object(
61184
61249
  outcome: external_exports.enum(["reconnected", "deleted"]),
61185
61250
  at: external_exports.iso.datetime()
61186
61251
  });
61252
+ var vaultConnectionDeletedPayloadSchemaDefinition = external_exports.object({
61253
+ workspaceId: external_exports.string().min(1),
61254
+ connectionId: external_exports.string().min(1),
61255
+ kind: external_exports.string().min(1),
61256
+ at: external_exports.iso.datetime()
61257
+ });
61187
61258
  var vaultConnectionSecretSetPayloadSchemaDefinition = external_exports.object({
61188
61259
  workspaceId: external_exports.string().min(1),
61189
61260
  connectionId: external_exports.string().min(1),
@@ -61975,6 +62046,9 @@ var externalImageQuerySchemaDefinition = external_exports.object({
61975
62046
  u: external_exports.string().min(1).max(2e3),
61976
62047
  sig: external_exports.string().max(100).default("")
61977
62048
  });
62049
+ var noticeAvatarParamsSchemaDefinition = external_exports.object({
62050
+ token: external_exports.string().min(1).max(4e3).regex(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.png$/)
62051
+ });
61978
62052
 
61979
62053
  // ../../modules/chat/contract/src/chat.layout.ts
61980
62054
  var LAYOUT_BLOCKS_MAX = 50;
@@ -62064,6 +62138,12 @@ var layoutFileSchemaDefinition = external_exports.object({
62064
62138
  path: external_exports.string().max(600).regex(/^\/api\/[^\s]*$/),
62065
62139
  image: external_exports.boolean()
62066
62140
  });
62141
+ var layoutQuotedSchemaDefinition = external_exports.object({
62142
+ originKey: external_exports.string().min(1).max(200),
62143
+ channelId: external_exports.string().min(1).max(100).nullable(),
62144
+ seq: external_exports.number().int().positive().nullable(),
62145
+ imageId: external_exports.string().min(1).max(100).nullable()
62146
+ });
62067
62147
  var layoutAttachmentSchemaDefinition = external_exports.object({
62068
62148
  type: external_exports.literal("attachment"),
62069
62149
  /** A list item draws its fields as a table; a shared message is a quoted message. */
@@ -62086,7 +62166,9 @@ var layoutAttachmentSchemaDefinition = external_exports.object({
62086
62166
  footer: markdown,
62087
62167
  footerIcon: imageUrl.nullable(),
62088
62168
  /** The attachment's time, a `<!date^...>` token the reader formats; "" for none. */
62089
- ts: markdown
62169
+ ts: markdown,
62170
+ /** A quote's original by its source key; Laze adds its place and picture when it holds it. */
62171
+ quoted: layoutQuotedSchemaDefinition.optional()
62090
62172
  });
62091
62173
  var layoutPartSchemaDefinition = external_exports.union([
62092
62174
  layoutBlockSchemaDefinition,
@@ -62702,6 +62784,14 @@ var scheduleRunCardSchemaDefinition = external_exports.object({
62702
62784
  prompt: external_exports.string().max(SCHEDULE_RUN_PROMPT_MAX)
62703
62785
  });
62704
62786
  var welcomeCardActionSchema = external_exports.enum(["slides", "connect_agent", "new_channel", "invite"]);
62787
+ var welcomeCollabSchemaDefinition = external_exports.object({
62788
+ /** The open invitation it sends again, by the invited address's name; null opens the dialog. */
62789
+ invite: external_exports.object({ inviteId: external_exports.string().min(1).max(200), name: external_exports.string().min(1).max(200) }).nullable(),
62790
+ /** The invitation went out again from the card. */
62791
+ sent: external_exports.boolean(),
62792
+ /** Closed by its person: it shows to no one. */
62793
+ dismissed: external_exports.boolean()
62794
+ });
62705
62795
  var welcomeCardSchemaDefinition = external_exports.object({
62706
62796
  type: external_exports.literal("welcome"),
62707
62797
  agentId: idSchema4,
@@ -62710,7 +62800,9 @@ var welcomeCardSchemaDefinition = external_exports.object({
62710
62800
  /** `welcome`: slides, connect and new channel; `invite`: the follow-up after the slides. */
62711
62801
  step: external_exports.enum(["welcome", "invite"]),
62712
62802
  /** The buttons already pressed that run once. */
62713
- pressed: external_exports.array(welcomeCardActionSchema).max(4)
62803
+ pressed: external_exports.array(welcomeCardActionSchema).max(4),
62804
+ /** Set on the boxed invite card that follows the slides. */
62805
+ collab: welcomeCollabSchemaDefinition.optional()
62714
62806
  });
62715
62807
  var messageCardSchemaDefinition = external_exports.discriminatedUnion("type", [
62716
62808
  attentionCardSchemaDefinition,
@@ -62838,7 +62930,9 @@ var messageSchemaDefinition = external_exports.object({
62838
62930
  /** On the sender's post answer only: who the mentions did not reach, being outside it. */
62839
62931
  notInChannel: external_exports.array(notInChannelSchemaDefinition).optional(),
62840
62932
  /** An agent's reply: the feed cards it added or changed in that turn; absent means none. */
62841
- feedRefs: external_exports.array(messageFeedRefSchemaDefinition).max(MESSAGE_FEED_REFS_MAX).optional()
62933
+ feedRefs: external_exports.array(messageFeedRefSchemaDefinition).max(MESSAGE_FEED_REFS_MAX).optional(),
62934
+ /** On an afterChange page and in realtime: its newest change number in this conversation. */
62935
+ changeSeq: external_exports.number().int().nonnegative().optional()
62842
62936
  });
62843
62937
  var messageSchema = messageSchemaDefinition;
62844
62938
  var departedPersonSchemaDefinition = external_exports.object({
@@ -62946,10 +63040,24 @@ var browsableChannelSchemaDefinition = external_exports.object({
62946
63040
  external: external_exports.boolean().optional()
62947
63041
  });
62948
63042
  var browsableChannelSchema = browsableChannelSchemaDefinition;
63043
+ var removedMessageSchemaDefinition = external_exports.object({
63044
+ id: external_exports.string(),
63045
+ /** Its newest change number in this conversation: it was moved out or erased. */
63046
+ changeSeq: external_exports.number().int().nonnegative()
63047
+ });
62949
63048
  var historyPageSchemaDefinition = external_exports.object({
62950
63049
  messages: external_exports.array(messageSchemaDefinition),
62951
63050
  hasOlder: external_exports.boolean(),
62952
- hasNewer: external_exports.boolean()
63051
+ hasNewer: external_exports.boolean(),
63052
+ /**
63053
+ * The afterChange that reads what changed after this page, so nothing is skipped. Spec:
63054
+ * modules/chat/specs/change-sync.feature. Absent from servers before ADR-202 M2.
63055
+ */
63056
+ nextChange: external_exports.number().int().nonnegative().optional(),
63057
+ /** On an afterChange page: messages that changed but are no longer in this conversation. */
63058
+ removed: external_exports.array(removedMessageSchemaDefinition).optional(),
63059
+ /** afterChange is older than the change log keeps: reload the conversation by seq. */
63060
+ resync: external_exports.literal(true).optional()
62953
63061
  });
62954
63062
  var historyPageSchema = historyPageSchemaDefinition;
62955
63063
  var threadSchemaDefinition = external_exports.object({
@@ -63160,8 +63268,19 @@ var historyInputSchemaDefinition = external_exports.object({
63160
63268
  before: external_exports.number().int().positive().optional(),
63161
63269
  after: external_exports.number().int().nonnegative().optional(),
63162
63270
  around: external_exports.number().int().positive().optional(),
63271
+ /**
63272
+ * Messages with a change numbered above this one, by their newest change, deleted ones
63273
+ * included; never with before, after or around. Spec: modules/chat/specs/change-sync.feature.
63274
+ */
63275
+ afterChange: external_exports.number().int().nonnegative().optional(),
63163
63276
  limit: external_exports.number().int().min(1).max(HISTORY_PAGE_MAX).default(50)
63164
- });
63277
+ }).refine(
63278
+ (input2) => input2.afterChange === void 0 || input2.before === void 0 && input2.after === void 0 && input2.around === void 0,
63279
+ {
63280
+ message: "afterChange reads changes; it takes no before, after or around",
63281
+ path: ["afterChange"]
63282
+ }
63283
+ );
63165
63284
  var historyInputSchema = historyInputSchemaDefinition;
63166
63285
  var postMessageInputSchemaDefinition = external_exports.object({
63167
63286
  workspaceId: workspaceIdSchema,
@@ -63261,6 +63380,7 @@ var postMirroredInputSchemaDefinition = external_exports.object({
63261
63380
  /** Files the mirror stored in this workspace's files, attached to the message. */
63262
63381
  fileIds: external_exports.array(idSchema4).max(10).default([])
63263
63382
  });
63383
+ var postMirroredInputSchema = postMirroredInputSchemaDefinition;
63264
63384
  var MIRROR_BATCH_MAX = 500;
63265
63385
  var postMirroredBatchInputSchemaDefinition = external_exports.object({
63266
63386
  workspaceId: workspaceIdSchema,
@@ -63831,6 +63951,7 @@ var draftFileSchemaDefinition = external_exports.object({
63831
63951
  label: external_exports.string().min(1).max(300),
63832
63952
  attachmentId: idSchema4
63833
63953
  });
63954
+ var draftFileSchema = draftFileSchemaDefinition;
63834
63955
  var draftSchemaDefinition = external_exports.object({
63835
63956
  channelId: idSchema4,
63836
63957
  threadRootId: idSchema4.nullable(),
@@ -63868,6 +63989,8 @@ var draftSavedSchema = draftSavedSchemaDefinition;
63868
63989
  var cardDraftSchemaDefinition = external_exports.object({
63869
63990
  cardId: idSchema4,
63870
63991
  text: external_exports.string().max(MESSAGE_BODY_MAX),
63992
+ /** The chips of files the comment's composer finished uploading; none from an older client. */
63993
+ files: external_exports.array(draftFileSchemaDefinition).max(10).default([]),
63871
63994
  /** The writer's clock when they typed it; the newest save wins. */
63872
63995
  savedAt: external_exports.iso.datetime()
63873
63996
  });
@@ -64047,6 +64170,12 @@ var apnsDeviceSchemaDefinition = external_exports.object({
64047
64170
  }).strict();
64048
64171
  var apnsStatusSchemaDefinition = external_exports.object({ available: external_exports.boolean(), bundleId: external_exports.string().min(1) }).strict();
64049
64172
  var apnsStatusSchema = apnsStatusSchemaDefinition;
64173
+ var apnsSenderSchemaDefinition = external_exports.object({
64174
+ id: external_exports.string().min(1).max(200),
64175
+ name: external_exports.string().max(120),
64176
+ image: external_exports.url().max(4096)
64177
+ }).strict();
64178
+ var apnsSenderSchema = apnsSenderSchemaDefinition;
64050
64179
  var apnsPayloadSchemaDefinition = external_exports.object({
64051
64180
  aps: external_exports.object({
64052
64181
  alert: external_exports.object({ title: external_exports.string().min(1).max(120), body: external_exports.string().max(400) }).optional(),
@@ -64056,7 +64185,9 @@ var apnsPayloadSchemaDefinition = external_exports.object({
64056
64185
  "thread-id": external_exports.string().min(1).max(200).optional(),
64057
64186
  category: external_exports.literal(APNS_APPROVAL_CATEGORY).optional(),
64058
64187
  "interruption-level": external_exports.enum(["passive", "active", "time-sensitive"]).optional(),
64059
- "content-available": external_exports.literal(1).optional()
64188
+ "content-available": external_exports.literal(1).optional(),
64189
+ /** The app's notification service may add the sender's picture before it shows. */
64190
+ "mutable-content": external_exports.literal(1).optional()
64060
64191
  }).strict(),
64061
64192
  workspaceId: external_exports.string().min(1),
64062
64193
  link: external_exports.string().startsWith("laze://").max(2048).optional(),
@@ -64081,7 +64212,9 @@ var apnsPayloadSchemaDefinition = external_exports.object({
64081
64212
  /** A read push: everything in the conversation (or thread) up to this seq is read. */
64082
64213
  readUpToSeq: external_exports.number().int().nonnegative().optional(),
64083
64214
  /** A read or retraction push: the person's Notifications total, as alert pushes carry it. */
64084
- badge: external_exports.number().int().nonnegative().optional()
64215
+ badge: external_exports.number().int().nonnegative().optional(),
64216
+ /** Who a message alert is from, for a communication notification with their picture. */
64217
+ sender: apnsSenderSchemaDefinition.optional()
64085
64218
  }).strict();
64086
64219
 
64087
64220
  // ../../modules/notification/contract/src/web-push.ts
@@ -64122,7 +64255,9 @@ var webPushPayloadSchemaDefinition = external_exports.object({
64122
64255
  url: external_exports.string().min(1).max(2048),
64123
64256
  tag: external_exports.string().min(1).max(200),
64124
64257
  /** Shown without the system sound, such as for a message a Slack mirror brought in. */
64125
- silent: external_exports.boolean().optional()
64258
+ silent: external_exports.boolean().optional(),
64259
+ /** The notification's picture, a path on this deployment; the Laze icon without one. */
64260
+ icon: external_exports.string().startsWith("/").max(4096).optional()
64126
64261
  }).strict();
64127
64262
  var webPushPayloadSchema = webPushPayloadSchemaDefinition;
64128
64263
  var requestWebPushDeliveryCommandSchemaDefinition = external_exports.object({
@@ -64324,6 +64459,10 @@ var noticeSenderSchemaDefinition = external_exports.object({
64324
64459
  name: external_exports.string().max(120)
64325
64460
  });
64326
64461
  var noticeSenderSchema = noticeSenderSchemaDefinition;
64462
+ var noticeAvatarSchemaDefinition = external_exports.object({
64463
+ icon: external_exports.string().startsWith("/").max(4096),
64464
+ sender: external_exports.string().startsWith("/").max(4096)
64465
+ });
64327
64466
  var messageNoticeSchema = external_exports.object({
64328
64467
  workspaceId: workspaceIdSchema2,
64329
64468
  userId: userIdSchema,
@@ -64350,7 +64489,9 @@ var messageNoticeSchema = external_exports.object({
64350
64489
  /** An @channel or @here raised it, not the conversation's every-message level. */
64351
64490
  broadcast: external_exports.boolean().optional(),
64352
64491
  /** The person's Notifications count, from chat: the iPhone's icon badge shows it. */
64353
- badge: external_exports.number().int().nonnegative().optional()
64492
+ badge: external_exports.number().int().nonnegative().optional(),
64493
+ /** Who it is from, as a picture; absent for a plain Laze channel, which shows the app icon. */
64494
+ avatar: noticeAvatarSchemaDefinition.optional()
64354
64495
  });
64355
64496
  var approvalNoticeSchema = external_exports.object({
64356
64497
  workspaceId: workspaceIdSchema2,
@@ -64410,7 +64551,9 @@ var desktopPublicationSchemaDefinition = external_exports.object({
64410
64551
  /** The message's place in its conversation, so reading past it closes the notification. */
64411
64552
  seq: external_exports.number().int().nonnegative().optional(),
64412
64553
  /** Shown without any sound, such as for a message a Slack mirror brought in. */
64413
- silent: external_exports.boolean().optional()
64554
+ silent: external_exports.boolean().optional(),
64555
+ /** Who it is from, as a picture; the desktop app shows the app icon without one. */
64556
+ avatar: noticeAvatarSchemaDefinition.optional()
64414
64557
  }).nullable(),
64415
64558
  badge: external_exports.number().int().nonnegative(),
64416
64559
  /** The tag of a notification to take back, such as one for a message since deleted. */
@@ -64597,7 +64740,9 @@ var heldPhonePushShape = {
64597
64740
  broadcast: external_exports.boolean().optional(),
64598
64741
  silent: external_exports.boolean().optional(),
64599
64742
  feed: heldFeedPushSchema.optional(),
64600
- burst: heldBurstPushSchema.optional()
64743
+ burst: heldBurstPushSchema.optional(),
64744
+ /** A message alert's sender, so a held alert still shows their picture. */
64745
+ sender: apnsSenderSchema.optional()
64601
64746
  };
64602
64747
  var phonePushHeldPayloadSchemaDefinition = external_exports.object({
64603
64748
  workspaceId: external_exports.string().min(1),
@@ -64801,7 +64946,9 @@ var messageChangedPayloadSchemaDefinition = external_exports.object({
64801
64946
  /** Members the message mentioned from outside were added, so its mentions now reach them. */
64802
64947
  "mentioned",
64803
64948
  /** A mirror is still waiting to send it to the source, or gave up. */
64804
- "mirror_delivery"
64949
+ "mirror_delivery",
64950
+ /** A mirror put a reply that landed before its root under that root (ADR-202 §3). */
64951
+ "moved"
64805
64952
  ]),
64806
64953
  /** Distinguishes two changes of one kind to one message. */
64807
64954
  changeId: external_exports.string().min(1),
@@ -64842,6 +64989,8 @@ var readMarkerMovedPayloadSchemaDefinition = external_exports.object({
64842
64989
  channelId: external_exports.string().min(1),
64843
64990
  reader: chatActorSchema,
64844
64991
  seq: external_exports.number().int().nonnegative(),
64992
+ /** The message at seq when the marker moved, as seq may be renumbered (ADR-202 §5). */
64993
+ messageId: external_exports.string().min(1).optional(),
64845
64994
  at: external_exports.iso.datetime(),
64846
64995
  /** A mirror moved it to match its source, so the source needs no telling. */
64847
64996
  fromSource: external_exports.boolean().default(false),
@@ -64870,7 +65019,10 @@ var realtimePublicationSchemaDefinition = external_exports.discriminatedUnion("t
64870
65019
  type: external_exports.literal("read_marker_moved"),
64871
65020
  workspaceId: external_exports.string(),
64872
65021
  channelId: external_exports.string(),
64873
- seq: external_exports.number().int()
65022
+ /** iOS 1.0 decodes it as a required Int: kept beside messageId (ADR-202 §5). */
65023
+ seq: external_exports.number().int(),
65024
+ /** The message the marker is at; absent at 0 and from servers before ADR-202 M2. */
65025
+ messageId: external_exports.string().optional()
64874
65026
  }),
64875
65027
  external_exports.object({
64876
65028
  type: external_exports.literal("activity"),
@@ -64983,6 +65135,7 @@ var ChatNewChannelDialogSlot = chatUi.component("new-channel-dialog");
64983
65135
  var ChatPeoplePickerSlot = chatUi.component("people-picker");
64984
65136
  var ChatAddPeopleDialogSlot = chatUi.component("add-people-dialog");
64985
65137
  var ChatHandoffComposerSlot = chatUi.component("handoff-composer");
65138
+ var ChatConversationsWithSlot = chatUi.component("conversations-with");
64986
65139
 
64987
65140
  // ../../modules/chat/contract/src/chat.markers.ts
64988
65141
  var FILE_MARKER = /<file:([A-Za-z0-9_-]{1,64})>/g;
@@ -65004,6 +65157,70 @@ function withSlackMarkupAsText(text3) {
65004
65157
  return withSlackPeopleAsNames(text3).replace(SLACK_DATE_TOKEN, "$1").replace(ANGLE_LINK, (_link, address, label3) => label3 ?? address);
65005
65158
  }
65006
65159
 
65160
+ // ../../modules/chat/contract/src/chat.observe.ts
65161
+ var originKeySchema = external_exports.string().min(1).max(200);
65162
+ var sourceMessageSchemaDefinition = external_exports.object({
65163
+ workspaceId: external_exports.string().min(1),
65164
+ channelId: external_exports.string().min(1).max(64),
65165
+ /** The message's key at the source, as `origin.key` named it when it was observed. */
65166
+ originKey: originKeySchema,
65167
+ /** The Laze message the mirror linked it to, such as one Laze sent there and has no origin. */
65168
+ messageId: external_exports.string().min(1).max(64).optional()
65169
+ });
65170
+ var observeMessageInputSchemaDefinition = external_exports.object({
65171
+ ...postMirroredInputSchema.shape,
65172
+ /** The source's render of the text, so a restyle of the same version is told apart. */
65173
+ renderHash: external_exports.string().max(200).nullable().default(null),
65174
+ /** The thread root's origin key, for a reply. */
65175
+ rootOriginKey: originKeySchema.nullable().default(null),
65176
+ /** Its edit version when first read already edited, such as from history. */
65177
+ version: external_exports.number().int().min(0).default(0)
65178
+ });
65179
+ var observeEditInputSchemaDefinition = external_exports.object({
65180
+ ...sourceMessageSchemaDefinition.shape,
65181
+ keyOwnerUserId: external_exports.string().min(1).max(64),
65182
+ version: external_exports.number().int().min(0),
65183
+ body: external_exports.string().max(MESSAGE_BODY_MAX),
65184
+ /** The source's blocks and attachments now; null drops them; left out keeps them. */
65185
+ layout: messageLayoutSchema.nullable().optional(),
65186
+ rerendered: external_exports.boolean().default(false),
65187
+ renderHash: external_exports.string().max(200).nullable().default(null),
65188
+ /** The source says the message was never edited: an edited mark Laze gave it comes off. */
65189
+ neverEdited: external_exports.boolean().default(false),
65190
+ fileIds: external_exports.array(external_exports.string().min(1).max(64)).max(10).default([])
65191
+ });
65192
+ var observeReactionsInputSchemaDefinition = external_exports.object({
65193
+ ...sourceMessageSchemaDefinition.shape,
65194
+ change: external_exports.discriminatedUnion("kind", [
65195
+ external_exports.object({
65196
+ kind: external_exports.literal("one"),
65197
+ actor: messageAuthorSchema,
65198
+ emoji: external_exports.string().trim().min(1).max(64),
65199
+ present: external_exports.boolean(),
65200
+ atMs: external_exports.number().int().min(0)
65201
+ }),
65202
+ external_exports.object({
65203
+ kind: external_exports.literal("snapshot"),
65204
+ readAtMs: external_exports.number().int().min(0),
65205
+ present: external_exports.array(external_exports.object({ actor: messageAuthorSchema, emoji: external_exports.string().trim().min(1).max(64) })).max(500)
65206
+ })
65207
+ ])
65208
+ });
65209
+ var observePinInputSchemaDefinition = external_exports.object({
65210
+ ...sourceMessageSchemaDefinition.shape,
65211
+ actor: messageAuthorSchema,
65212
+ /** The pinner's name at the source, kept when they are outside Laze. */
65213
+ actorName: external_exports.string().max(200).nullable().default(null),
65214
+ pinned: external_exports.boolean(),
65215
+ atMs: external_exports.number().int().min(0)
65216
+ });
65217
+ var observeSenderInputSchemaDefinition = external_exports.object({
65218
+ workspaceId: external_exports.string().min(1),
65219
+ identity: external_exports.string().min(1).max(64),
65220
+ name: external_exports.string().trim().min(1).max(200),
65221
+ avatarUrl: external_exports.string().max(2e3).nullable().default(null)
65222
+ });
65223
+
65007
65224
  // ../../modules/agent/contract/src/agent-access.ts
65008
65225
  var idSchema5 = external_exports.string().min(1).max(80);
65009
65226
  var agentGranteeSchemaDefinition = external_exports.discriminatedUnion("kind", [
@@ -66192,7 +66409,7 @@ var computerMoveIntentSchemaDefinition = external_exports.object({ moveId: exter
66192
66409
 
66193
66410
  // ../../modules/agent/contract/src/agent-context-window.ts
66194
66411
  var AGENT_CONTEXT_WINDOW = {
66195
- default: 4e5,
66412
+ default: 35e4,
66196
66413
  min: 1e5,
66197
66414
  max: 1e6
66198
66415
  };
@@ -66378,37 +66595,42 @@ var LEVEL_NAMES = { fast: "Laze Small", frontier: "Laze Frontier" };
66378
66595
  function modelLineOf({ agent: agent3 }) {
66379
66596
  if (agent3.harness === "laze-models") {
66380
66597
  const { level: level2, source } = levelOf({ agent: agent3 });
66381
- if (source === "agent") return LEVEL_NAMES[level2];
66382
- return source === "workspace" ? `Default (${LEVEL_NAMES[level2]}, the workspace default)` : `Default (${LEVEL_NAMES[level2]})`;
66598
+ return source === "workspace" ? `${LEVEL_NAMES[level2]}, the workspace default` : LEVEL_NAMES[level2];
66383
66599
  }
66384
66600
  const running = pickRunningModel({ agent: agent3 });
66385
66601
  const name3 = running ? versionedNameOf({ model: running }) || running.id : describeUnlistedPoolModel({ agent: agent3 }) ?? null;
66386
66602
  if (agent3.model) return name3 || agent3.model;
66387
- if (!name3) return "Default";
66603
+ if (!name3) return agent3.harness === "codex" ? "Codex's default model" : "Opus";
66388
66604
  const choice = defaultModelChoiceOf({ agent: agent3 });
66389
66605
  const from = choice.kind === "laze" && choice.poolName ? choice.poolName : null;
66390
- return from ? `Default (${name3}, from ${poolPhraseOf({ poolName: from })})` : `Default (${name3})`;
66606
+ return from ? `${name3}, from ${poolPhraseOf({ poolName: from })}` : name3;
66391
66607
  }
66392
- function describeEffort({ agent: agent3 }) {
66608
+ var AGENT_DEFAULT_EFFORT = "high";
66609
+ function launchEffortOf({ agent: agent3 }) {
66393
66610
  const running = pickRunningModel({ agent: agent3 });
66394
- if (agent3.effort) return effortLabelOf({ effort: agent3.effort });
66395
- if (running && running.efforts.length === 0) return null;
66396
- const fallback = running?.defaultEffort;
66397
- return fallback ? `Default (${effortLabelOf({ effort: fallback })})` : "Default";
66611
+ const effort = agent3.effort ?? (!running || running.efforts.includes(AGENT_DEFAULT_EFFORT) ? AGENT_DEFAULT_EFFORT : running.defaultEffort);
66612
+ return effort ? { kind: "set", effort } : { kind: "none" };
66398
66613
  }
66399
- function contextLineOf({ agent: agent3 }) {
66614
+ function describeEffort({ agent: agent3 }) {
66615
+ const launched = launchEffortOf({ agent: agent3 });
66616
+ return launched.kind === "set" ? effortLabelOf({ effort: launched.effort }) : null;
66617
+ }
66618
+ function claudeWindowOf({ model }) {
66619
+ const name3 = model ? `${model.name} ${model.description} ${model.id}` : "";
66620
+ return /haiku[ -]4[.-]5/i.test(name3) ? 2e5 : 1e6;
66621
+ }
66622
+ function contextTokensOf({ agent: agent3 }) {
66623
+ const set2 = agent3.contextWindow ?? AGENT_CONTEXT_WINDOW.default;
66624
+ if (agent3.harness === "laze-models") return set2;
66400
66625
  const cap = contextCapOf({ agent: agent3 });
66401
- if (agent3.harness === "laze-models") {
66402
- const tokens = agent3.contextWindow ?? AGENT_CONTEXT_WINDOW.default;
66403
- return `${tokensLabelOf({ tokens })}, up to ${tokensLabelOf({ tokens: cap.tokens })}`;
66626
+ if (cap.known) return Math.min(set2, cap.tokens);
66627
+ if (agent3.harness === "claude-code") {
66628
+ return Math.min(set2, claudeWindowOf({ model: pickRunningModel({ agent: agent3 }) }));
66404
66629
  }
66405
- if (!cap.known) {
66406
- return agent3.contextWindow ? `${tokensLabelOf({ tokens: agent3.contextWindow })}, or the model's window if smaller` : "The model's own window";
66407
- }
66408
- const set2 = agent3.contextWindow ? Math.min(agent3.contextWindow, cap.tokens) : null;
66409
- if (!set2 || set2 === cap.tokens)
66410
- return `${tokensLabelOf({ tokens: cap.tokens })}, the most this model takes`;
66411
- return `${tokensLabelOf({ tokens: set2 })} of the ${tokensLabelOf({ tokens: cap.tokens })} this model takes`;
66630
+ return set2;
66631
+ }
66632
+ function contextLineOf({ agent: agent3 }) {
66633
+ return tokensLabelOf({ tokens: contextTokensOf({ agent: agent3 }) });
66412
66634
  }
66413
66635
  function agentRunSummaryOf({ agent: agent3 }) {
66414
66636
  return {
@@ -66769,6 +66991,11 @@ var startConversationInputSchemaDefinition = external_exports.object({
66769
66991
  contextMessageId: idSchema7.optional()
66770
66992
  });
66771
66993
  var startConversationInputSchema = startConversationInputSchemaDefinition;
66994
+ var openConversationInputSchemaDefinition = external_exports.object({
66995
+ workspaceId: workspaceIdSchema4,
66996
+ agentId: idSchema7
66997
+ });
66998
+ var openConversationInputSchema = openConversationInputSchemaDefinition;
66772
66999
  var startedConversationSchemaDefinition = external_exports.object({
66773
67000
  channelId: idSchema7,
66774
67001
  messageId: idSchema7
@@ -67055,7 +67282,7 @@ var CONNECTOR_PROVIDERS = [
67055
67282
  description: "Search, read, archive and label mail and write drafts. Sending, trash and unsubscribing ask you first.",
67056
67283
  // gmail.modify covers reading, drafts and sending as well as labels, archive and trash.
67057
67284
  scopes: ["openid", "email", GMAIL_MODIFY_SCOPE],
67058
- sensitivity: "auto",
67285
+ sensitivity: VAULT_TIER_BUILT_IN_LEVELS.sensitive,
67059
67286
  maxLeaseSeconds: TWO_DAYS,
67060
67287
  egress: {
67061
67288
  upstream: "https://gmail.googleapis.com",
@@ -67077,7 +67304,7 @@ var CONNECTOR_PROVIDERS = [
67077
67304
  // Narrowest scope with events.list and events.insert on the primary calendar.
67078
67305
  "https://www.googleapis.com/auth/calendar.events.owned"
67079
67306
  ],
67080
- sensitivity: "auto",
67307
+ sensitivity: VAULT_TIER_BUILT_IN_LEVELS.standard,
67081
67308
  maxLeaseSeconds: null,
67082
67309
  egress: {
67083
67310
  upstream: "https://www.googleapis.com/calendar/v3",
@@ -67093,7 +67320,7 @@ var CONNECTOR_PROVIDERS = [
67093
67320
  category: "Files and knowledge",
67094
67321
  description: "Find and read your documents and files.",
67095
67322
  scopes: ["openid", "email", "https://www.googleapis.com/auth/drive.readonly"],
67096
- sensitivity: "auto",
67323
+ sensitivity: VAULT_TIER_BUILT_IN_LEVELS.sensitive,
67097
67324
  maxLeaseSeconds: TWO_DAYS,
67098
67325
  egress: {
67099
67326
  upstream: "https://www.googleapis.com/drive/v3",
@@ -67124,7 +67351,7 @@ var CONNECTOR_PROVIDERS = [
67124
67351
  url: "https://api.github.com/applications/{client_id}/grant"
67125
67352
  }
67126
67353
  },
67127
- sensitivity: "auto",
67354
+ sensitivity: VAULT_TIER_BUILT_IN_LEVELS.standard,
67128
67355
  maxLeaseSeconds: null,
67129
67356
  egress: { upstream: "https://api.github.com", header: "Authorization", prefix: "Bearer " },
67130
67357
  account: { url: "https://api.github.com/user", field: "login" },
@@ -67185,7 +67412,8 @@ var addMcpServerInputSchemaDefinition = external_exports.object({
67185
67412
  name: vaultConnectionNameSchema,
67186
67413
  label: external_exports.string().trim().min(1).max(120),
67187
67414
  keychain: vaultOwnedKeychainSchema,
67188
- sensitivity: vaultSensitivitySchema.default("auto"),
67415
+ /** Left out, the server starts at its tier's level (vault specs/connector-tiers.feature). */
67416
+ sensitivity: vaultSensitivitySchema.optional(),
67189
67417
  auth: mcpAuthSchema,
67190
67418
  /** Sign in again into an existing MCP connection, keeping its grants and settings. */
67191
67419
  connectionId: external_exports.string().min(1).optional(),
@@ -67261,6 +67489,14 @@ var waitingMcpServerSchemaDefinition = external_exports.object({
67261
67489
  /** ISO 8601 */
67262
67490
  addedAt: external_exports.iso.datetime()
67263
67491
  });
67492
+ var mcpServerApprovalChangedPayloadSchemaDefinition = external_exports.object({
67493
+ workspaceId: external_exports.string().min(1),
67494
+ connectionId: external_exports.string().min(1),
67495
+ change: external_exports.enum(["saved", "approved", "denied", "deleted"]),
67496
+ /** Unique per change. */
67497
+ changeId: external_exports.string().min(1),
67498
+ at: external_exports.iso.datetime()
67499
+ });
67264
67500
  var ConnectorApi = moduleApi()("connector");
67265
67501
  var workspaceInput2 = external_exports.object({ workspaceId: external_exports.string().min(1) });
67266
67502
  var connectionInput2 = external_exports.object({
@@ -68642,6 +68878,17 @@ var pressedWelcomeSchemaDefinition = external_exports.object({
68642
68878
  messageId: external_exports.string().min(1)
68643
68879
  });
68644
68880
  var pressedWelcomeSchema = pressedWelcomeSchemaDefinition;
68881
+ var pressCollabInputSchemaDefinition = external_exports.object({
68882
+ workspaceId: external_exports.string().min(1),
68883
+ /** The invite card's message. */
68884
+ messageId: external_exports.string().min(1),
68885
+ action: external_exports.enum(["resend", "dismiss"])
68886
+ });
68887
+ var pressCollabInputSchema = pressCollabInputSchemaDefinition;
68888
+ var pressedCollabSchemaDefinition = external_exports.object({
68889
+ outcome: external_exports.enum(["sent", "dismissed", "fallback"])
68890
+ });
68891
+ var pressedCollabSchema = pressedCollabSchemaDefinition;
68645
68892
 
68646
68893
  // ../../modules/agent/contract/src/agent-working.ts
68647
68894
  var agentWorkingInputSchemaDefinition = external_exports.object({
@@ -69242,14 +69489,16 @@ var agentArchiveTrpc = defineTrpcContract("agents").query("archived").withInput(
69242
69489
  var agentLangwatchTrpc = defineTrpcContract("agents").query("langwatchTracing").withInput(agentLangwatchInputSchema).withOutput(agentLangwatchTracingSchema).mutation("setLangwatchTracing").withInput(setAgentLangwatchInputSchema).withOutput(agentLangwatchTracingSchema).build();
69243
69490
  var agentPoolModelTrpc = defineTrpcContract("agents").mutation("setLoginPoolModel").withInput(setLoginPoolModelInputSchema).withOutput(loginPoolsSchema).build();
69244
69491
  var agentRunsOnTrpc = defineTrpcContract("agents").mutation("setRunsOn").withInput(setRunsOnInputSchema).withOutput(agentSchema).build();
69245
- var agentWelcomeTrpc = defineTrpcContract("agents").mutation("pressWelcome").withInput(pressWelcomeInputSchema).withOutput(pressedWelcomeSchema).build();
69492
+ var agentWelcomeTrpc = defineTrpcContract("agents").mutation("pressWelcome").withInput(pressWelcomeInputSchema).withOutput(pressedWelcomeSchema).mutation("pressCollab").withInput(pressCollabInputSchema).withOutput(pressedCollabSchema).build();
69246
69493
  var agentPoolGroupTrpc = defineTrpcContract("agents").mutation("addPoolGroup").withInput(poolGroupInputSchema).withOutput(loginPoolsSchema).mutation("removePoolGroup").withInput(poolGroupInputSchema).withOutput(loginPoolsSchema).build();
69494
+ var agentOpenConversationTrpc = defineTrpcContract("agents").mutation("openConversation").withInput(openConversationInputSchema).withOutput(external_exports.object({ channelId: idSchema17 })).build();
69247
69495
  var agentReconnectTrpc = defineTrpcContract("agents").query("reconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema14, agentId: idSchema17 })).withOutput(agentReconnectSchema).build();
69248
69496
  var agentTrpc = joinTrpcContracts(
69249
69497
  "agents",
69250
69498
  agentCoreTrpc,
69251
69499
  agentPoolGroupTrpc,
69252
69500
  agentReconnectTrpc,
69501
+ agentOpenConversationTrpc,
69253
69502
  agentTurnTrpc,
69254
69503
  agentChannelSettingsTrpc,
69255
69504
  agentJoinTrpc,
@@ -69270,6 +69519,7 @@ var AgentComputerCardSlot = agentUi.component("computerCard");
69270
69519
  var AgentLoginCardSlot = agentUi.component("loginCard");
69271
69520
  var AgentBudgetCardSlot = agentUi.component("budgetCard");
69272
69521
  var AgentWelcomeCardSlot = agentUi.component("welcomeCard");
69522
+ var AgentCollabCardSlot = agentUi.component("collabCard");
69273
69523
  var AgentStopTurnSlot = agentUi.component("stopTurn");
69274
69524
  var AgentOfflineLineSlot = agentUi.component("offlineLine");
69275
69525
  var AgentLiveStepsSlot = agentUi.component("liveSteps");
@@ -70239,13 +70489,12 @@ var LazeClient = class _LazeClient {
70239
70489
  ...signal ? { signal } : {}
70240
70490
  });
70241
70491
  const text3 = await response.text();
70242
- const parsed = text3 ? JSON.parse(text3) : void 0;
70243
70492
  if (!response.ok) {
70244
- const error63 = errorOf({ status: response.status, body: parsed });
70493
+ const error63 = apiErrorOf({ status: response.status, text: text3 });
70245
70494
  await this.toldMigrated(error63);
70246
70495
  throw error63;
70247
70496
  }
70248
- return parsed;
70497
+ return text3 ? JSON.parse(text3) : void 0;
70249
70498
  }
70250
70499
  };
70251
70500
  function apiErrorOf({ status: status11, text: text3 }) {
@@ -71303,6 +71552,10 @@ var slackExternalPeopleSchemaDefinition = external_exports.object({
71303
71552
  )
71304
71553
  });
71305
71554
  var slackExternalPeopleSchema = slackExternalPeopleSchemaDefinition;
71555
+ var slackChannelPeopleSchemaDefinition = external_exports.object({
71556
+ people: external_exports.array(slackExternalPersonSchemaDefinition)
71557
+ });
71558
+ var slackChannelPeopleSchema = slackChannelPeopleSchemaDefinition;
71306
71559
  var slackExternalPeopleCountsInputSchemaDefinition = external_exports.object({
71307
71560
  workspaceId: external_exports.string().min(1),
71308
71561
  channelIds: external_exports.array(external_exports.string().min(1).max(64)).max(200)
@@ -71484,6 +71737,10 @@ var slackBotCleanupRequestedPayloadSchemaDefinition = external_exports.object({
71484
71737
  runId: external_exports.string().min(1),
71485
71738
  dryRun: external_exports.boolean()
71486
71739
  });
71740
+ var slackMetadataProbeRequestedPayloadSchemaDefinition = external_exports.object({
71741
+ workspaceId: external_exports.string().min(1),
71742
+ runId: external_exports.string().min(1)
71743
+ });
71487
71744
  var slackCacheTrimRequestedPayloadSchemaDefinition = external_exports.object({
71488
71745
  workspaceId: external_exports.string().min(1),
71489
71746
  teamId: external_exports.string().min(1),
@@ -71721,7 +71978,7 @@ var slackSearchAnswerSchemaDefinition = external_exports.object({
71721
71978
  var slackSearchAnswerSchema = slackSearchAnswerSchemaDefinition;
71722
71979
  var SlackApi = moduleApi()("slack");
71723
71980
  var workspaceInput3 = external_exports.object({ workspaceId: workspaceIdSchema17 });
71724
- var slackTrpc = defineTrpcContract("slack").query("overview").withInput(workspaceInput3).withOutput(slackOverviewSchema).mutation("startSetup").withInput(startSlackSetupInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("beginSetup").withInput(beginSlackSetupInputSchema).withOutput(slackSetupSchema).mutation("saveAppCredentials").withInput(saveSlackAppCredentialsInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("installApp").withInput(installSlackAppInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("startInstall").withInput(startSlackInstallInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("startLink").withInput(startSlackLinkInputSchema).withOutput(startedSlackAuthorizeSchema).query("channels").withInput(slackTeamInputSchema).withOutput(external_exports.array(slackChannelViewSchema)).mutation("setMirror").withInput(setSlackMirrorInputSchema).withOutput(slackConnectionViewSchema).mutation("updateConnection").withInput(updateSlackConnectionInputSchema).withOutput(slackConnectionViewSchema).mutation("disconnect").withInput(slackTeamInputSchema).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("unlink").withInput(slackTeamInputSchema).withOutput(slackConnectionViewSchema).query("linkPrompts").withInput(workspaceInput3).withOutput(slackLinkPromptsSchema).mutation("dismissLinkPrompt").withInput(dismissSlackLinkPromptInputSchema).withOutput(slackLinkPromptsSchema).query("people").withInput(slackPeopleInputSchema).withOutput(slackPeopleSchema).query("bookmarks").withInput(slackBookmarksInputSchema).withOutput(slackBookmarksSchema).query("profiles").withInput(slackProfilesInputSchema).withOutput(slackProfilesSchema).query("linkedNames").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(slackLinkedNamesSchema).query("externalPeople").withInput(slackExternalPeopleInputSchema).withOutput(slackExternalPeopleSchema).query("externalPeopleCounts").withInput(slackExternalPeopleCountsInputSchema).withOutput(slackExternalPeopleCountsSchema).mutation("openDirect").withInput(openSlackDirectInputSchema).withOutput(openedSlackDirectSchema).mutation("invite").withInput(slackInviteInputSchema).withOutput(slackInvitedSchema).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).query("emojiSource").withInput(workspaceInput3).withOutput(slackEmojiSourceSchema).mutation("importEmoji").withInput(workspaceInput3).withOutput(slackEmojiImportSchema).build();
71981
+ var slackTrpc = defineTrpcContract("slack").query("overview").withInput(workspaceInput3).withOutput(slackOverviewSchema).mutation("startSetup").withInput(startSlackSetupInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("beginSetup").withInput(beginSlackSetupInputSchema).withOutput(slackSetupSchema).mutation("saveAppCredentials").withInput(saveSlackAppCredentialsInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("installApp").withInput(installSlackAppInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("startInstall").withInput(startSlackInstallInputSchema).withOutput(startedSlackAuthorizeSchema).mutation("startLink").withInput(startSlackLinkInputSchema).withOutput(startedSlackAuthorizeSchema).query("channels").withInput(slackTeamInputSchema).withOutput(external_exports.array(slackChannelViewSchema)).mutation("setMirror").withInput(setSlackMirrorInputSchema).withOutput(slackConnectionViewSchema).mutation("updateConnection").withInput(updateSlackConnectionInputSchema).withOutput(slackConnectionViewSchema).mutation("disconnect").withInput(slackTeamInputSchema).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("unlink").withInput(slackTeamInputSchema).withOutput(slackConnectionViewSchema).query("linkPrompts").withInput(workspaceInput3).withOutput(slackLinkPromptsSchema).mutation("dismissLinkPrompt").withInput(dismissSlackLinkPromptInputSchema).withOutput(slackLinkPromptsSchema).query("people").withInput(slackPeopleInputSchema).withOutput(slackPeopleSchema).query("bookmarks").withInput(slackBookmarksInputSchema).withOutput(slackBookmarksSchema).query("profiles").withInput(slackProfilesInputSchema).withOutput(slackProfilesSchema).query("linkedNames").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(slackLinkedNamesSchema).query("externalPeople").withInput(slackExternalPeopleInputSchema).withOutput(slackExternalPeopleSchema).query("channelPeople").withInput(slackExternalPeopleInputSchema).withOutput(slackChannelPeopleSchema).query("externalPeopleCounts").withInput(slackExternalPeopleCountsInputSchema).withOutput(slackExternalPeopleCountsSchema).mutation("openDirect").withInput(openSlackDirectInputSchema).withOutput(openedSlackDirectSchema).mutation("invite").withInput(slackInviteInputSchema).withOutput(slackInvitedSchema).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).query("emojiSource").withInput(workspaceInput3).withOutput(slackEmojiSourceSchema).mutation("importEmoji").withInput(workspaceInput3).withOutput(slackEmojiImportSchema).build();
71725
71982
 
71726
71983
  // ../../modules/slack/contract/src/slack-keys.ts
71727
71984
  var SLACK_KEY_PATHS = {
@@ -71812,6 +72069,8 @@ var slackConfig = Config.define((c) => ({
71812
72069
  signatureMaxAgeSeconds: c.env("SLACK_SIGNATURE_MAX_AGE_SECONDS", positiveInt4.default(300)),
71813
72070
  /** The progress board's alerts folder; unset, the missed-events card is only logged. */
71814
72071
  opsAlertDir: c.env("SLACK_OPS_ALERT_DIR", external_exports.string().min(1).optional()),
72072
+ /** On, Slack's changes land through chat's merge rows (ADR-202 M3); off keeps the old path. */
72073
+ mirrorObserve: c.env("SLACK_MIRROR_OBSERVE", external_exports.enum(["on", "off"]).default("off")),
71815
72074
  /** The longest wait between two Socket Mode reconnects. */
71816
72075
  reconnectMaxSeconds: c.env("SLACK_RECONNECT_MAX_SECONDS", positiveInt4.default(30))
71817
72076
  }));
@@ -73331,6 +73590,40 @@ function channelLabelIn(channel) {
73331
73590
  // src/services/claude-wait.service.ts
73332
73591
  import { readFile as readFile8, rm as rm6 } from "node:fs/promises";
73333
73592
 
73593
+ // src/rules/listener-retry.rules.ts
73594
+ var FIRST_MS = 1e3;
73595
+ var LISTENER_RETRY_CAP_MS = 5 * 60 * 1e3;
73596
+ var LISTENER_GIVE_UP_MS = 3 * 24 * 60 * 60 * 1e3;
73597
+ function refusedForGood(error63) {
73598
+ return error63 instanceof LazeApiError && (error63.status === 401 || error63.status === 403);
73599
+ }
73600
+ function listenerDelayMs({ failures, random }) {
73601
+ const ceiling = Math.min(LISTENER_RETRY_CAP_MS, FIRST_MS * 2 ** Math.max(0, failures - 1));
73602
+ return Math.round(ceiling * (0.5 + 0.5 * random));
73603
+ }
73604
+ var ListenerBackoff = class {
73605
+ failures = 0;
73606
+ firstAt;
73607
+ /** The next wait after a failure at `nowMs`; "give up" once failures have lasted 3 days. */
73608
+ failed({ nowMs: nowMs2, random = Math.random() }) {
73609
+ this.firstAt ??= nowMs2;
73610
+ this.failures += 1;
73611
+ if (nowMs2 - this.firstAt >= LISTENER_GIVE_UP_MS) return { giveUp: true };
73612
+ return { delayMs: listenerDelayMs({ failures: this.failures, random }) };
73613
+ }
73614
+ /** Failed tries in the current run. */
73615
+ tries() {
73616
+ return this.failures;
73617
+ }
73618
+ /** How many tries failed in the run that just ended, then a fresh run. */
73619
+ answered() {
73620
+ const failures = this.failures;
73621
+ this.failures = 0;
73622
+ this.firstAt = void 0;
73623
+ return failures;
73624
+ }
73625
+ };
73626
+
73334
73627
  // src/services/connect-service.service.ts
73335
73628
  import { createHash as createHash2 } from "node:crypto";
73336
73629
  import { mkdir as mkdir3, rm as rm5, writeFile } from "node:fs/promises";
@@ -74749,7 +75042,6 @@ async function runStateOf({ context }) {
74749
75042
  }
74750
75043
  var ROUND_SECONDS = 50;
74751
75044
  var REFRESH_MS = 3e4;
74752
- var MAX_RETRY_SECONDS3 = 60;
74753
75045
  var CLI_CHANGED_EXIT = 75;
74754
75046
  async function cliStampOf({ context }) {
74755
75047
  const file4 = context.program.at(-1);
@@ -74868,7 +75160,7 @@ async function serveRounds({
74868
75160
  report: report3,
74869
75161
  watch
74870
75162
  }) {
74871
- let wait = 1;
75163
+ const backoff = new ListenerBackoff();
74872
75164
  await report3(profile, "listening");
74873
75165
  while (!signal.aborted) {
74874
75166
  try {
@@ -74880,31 +75172,46 @@ async function serveRounds({
74880
75172
  signal,
74881
75173
  watch
74882
75174
  });
74883
- if (wait > 1) await report3(profile, "listening");
74884
- wait = 1;
75175
+ if (backoff.answered() > 0) await report3(profile, "listening");
74885
75176
  if (delivered === 0) await context.sleep(1e3, signal);
74886
75177
  } catch (error63) {
74887
- const migrated = migratedNoticeOf(error63);
74888
- if (migrated) {
74889
- await report3(profile, "stopped: the agent moved into Laze");
74890
- context.err(`${profile}: ${migrated.notice}
74891
- `);
74892
- return;
74893
- }
74894
- if (error63 instanceof LazeApiError && error63.status === 401) {
74895
- await report3(profile, "stopped: Laze refused the agent's key; link the session again");
74896
- context.err(`${profile}: Laze refused the key; this agent is no longer served
75178
+ const go = await afterRoundError({ context, profile, entry, report: report3, error: error63, backoff });
75179
+ if (go === "stop") return;
75180
+ await context.sleep(go.delayMs, signal);
75181
+ }
75182
+ }
75183
+ }
75184
+ async function afterRoundError({
75185
+ context,
75186
+ profile,
75187
+ entry,
75188
+ report: report3,
75189
+ error: error63,
75190
+ backoff
75191
+ }) {
75192
+ const migrated = migratedNoticeOf(error63);
75193
+ if (migrated) {
75194
+ await report3(profile, "stopped: the agent moved into Laze");
75195
+ context.err(`${profile}: ${migrated.notice}
74897
75196
  `);
74898
- return;
74899
- }
74900
- const state = stateOfError({ error: error63, delivery: entry.delivery });
74901
- await report3(profile, state);
74902
- context.err(`${profile}: ${state}; trying again in ${wait}s
75197
+ return "stop";
75198
+ }
75199
+ if (refusedForGood(error63)) {
75200
+ await report3(profile, "stopped: Laze refused the agent's key; link the session again");
75201
+ context.err(`${profile}: Laze refused the key; this agent is no longer served
74903
75202
  `);
74904
- await context.sleep(wait * 1e3, signal);
74905
- wait = Math.min(MAX_RETRY_SECONDS3, wait * 2);
74906
- }
75203
+ return "stop";
75204
+ }
75205
+ const next = backoff.failed({ nowMs: context.nowMs() });
75206
+ if ("giveUp" in next) {
75207
+ await report3(profile, "stopped: Laze has not answered for 3 days");
75208
+ return "stop";
74907
75209
  }
75210
+ const state = stateOfError({ error: error63, delivery: entry.delivery });
75211
+ await report3(profile, state);
75212
+ context.err(`${profile}: ${state}; trying again in ${Math.ceil(next.delayMs / 1e3)}s
75213
+ `);
75214
+ return next;
74908
75215
  }
74909
75216
  async function save(run4) {
74910
75217
  await writeStateJson({ path: run4.path, value: run4.state });
@@ -75356,8 +75663,12 @@ async function takeRound2({
75356
75663
  }
75357
75664
  }
75358
75665
  async function roundOf({ context, client, name: name3, lock, claudePid, session, seen }) {
75359
- if ((await holderOf({ path: lock }))?.pid !== context.processes.pid) return void 0;
75360
- if (claudePid && !context.processes.alive(claudePid)) return void 0;
75666
+ if ((await holderOf({ path: lock }))?.pid !== context.processes.pid) {
75667
+ return void 0;
75668
+ }
75669
+ if (claudePid && !context.processes.alive(claudePid)) {
75670
+ return void 0;
75671
+ }
75361
75672
  const due = await dueFromSpool({
75362
75673
  context,
75363
75674
  profile: name3,
@@ -75444,9 +75755,10 @@ async function waitForMessages({ context, args }) {
75444
75755
  const seen = () => input2.transcript_path ? readFile8(input2.transcript_path, "utf8") : Promise.resolve("");
75445
75756
  const deadline = context.nowMs() + (WAIT_HOOK_TIMEOUT_SECONDS - 60) * 1e3;
75446
75757
  try {
75758
+ const backoff = new ListenerBackoff();
75447
75759
  while (context.nowMs() < deadline) {
75448
75760
  const round = { context, client, name: name3, lock, claudePid, session, seen, rush };
75449
- const code = await settleRound(round);
75761
+ const code = await retryingRound({ round, backoff });
75450
75762
  if (code !== "again") return code;
75451
75763
  }
75452
75764
  return 0;
@@ -75455,6 +75767,60 @@ async function waitForMessages({ context, args }) {
75455
75767
  await rm6(lock, { force: true });
75456
75768
  }
75457
75769
  }
75770
+ async function retryingRound({ round, backoff }) {
75771
+ const { context, name: name3, claudePid } = round;
75772
+ const code = await settleRound(round).catch((error63) => {
75773
+ if (refusedForGood(error63) || migratedNoticeOf(error63)) throw error63;
75774
+ return { failed: error63 };
75775
+ });
75776
+ if (typeof code !== "object") {
75777
+ const failures = backoff.answered();
75778
+ if (failures > 0) {
75779
+ await logWaiter({
75780
+ context,
75781
+ line: `${name3}: reconnected to Laze after ${failures} failed ${failures === 1 ? "try" : "tries"}`
75782
+ });
75783
+ }
75784
+ return code;
75785
+ }
75786
+ if (claudePid && !context.processes.alive(claudePid)) return 0;
75787
+ const next = backoff.failed({ nowMs: context.nowMs() });
75788
+ if ("giveUp" in next) {
75789
+ context.err("laze: Laze has not answered for 3 days; the waiter stopped.\n");
75790
+ return 2;
75791
+ }
75792
+ if (backoff.tries() === 1) {
75793
+ const line = `${name3}: Laze did not answer (${String(code.failed)}), trying again`;
75794
+ await logWaiter({ context, line });
75795
+ }
75796
+ await context.sleep(next.delayMs);
75797
+ return "again";
75798
+ }
75799
+ async function refusedOnce({
75800
+ context,
75801
+ args,
75802
+ error: error63
75803
+ }) {
75804
+ const profile = String(args.flags.profile ?? "default");
75805
+ const path = statePathOf({ context, kind: "told", profile: `refused-${profile}` });
75806
+ const told = await readFile8(path, "utf8").then(
75807
+ () => true,
75808
+ () => false
75809
+ );
75810
+ if (told) return 0;
75811
+ await writeStateText({ path, text: String(context.nowMs()) });
75812
+ context.err(
75813
+ `Laze: Laze refused this agent's key (${String(error63)}), so messages no longer reach this session. Link it again: laze agent link.
75814
+ `
75815
+ );
75816
+ return 2;
75817
+ }
75818
+ async function logWaiter({ context, line }) {
75819
+ await logDelivery({
75820
+ context: { ...context, out: () => void 0 },
75821
+ line: `waiter ${line}`
75822
+ }).catch(() => void 0);
75823
+ }
75458
75824
  async function healRushDelivery({ context }) {
75459
75825
  await rearmRushGuards({ context }).catch((error63) => {
75460
75826
  context.err(`laze: could not check the other rush sessions: ${String(error63)}
@@ -75476,7 +75842,7 @@ async function waitHook({ context, args }) {
75476
75842
  `);
75477
75843
  return 2;
75478
75844
  }
75479
- if (error63 instanceof LazeApiError && error63.status === 401) return 0;
75845
+ if (refusedForGood(error63)) return refusedOnce({ context, args, error: error63 });
75480
75846
  context.err(`laze: the background waiter stopped: ${String(error63)}
75481
75847
  `);
75482
75848
  return 0;
@@ -76376,7 +76742,6 @@ import { rm as rm10 } from "node:fs/promises";
76376
76742
  var LAZE_MCP_SERVER = "laze";
76377
76743
  var DEV_CHANNELS_FLAG = "--dangerously-load-development-channels";
76378
76744
  var ROUND_SECONDS3 = 50;
76379
- var RETRY_MS = 5e3;
76380
76745
  function channelInstructionsOf({ server }) {
76381
76746
  return [
76382
76747
  `Messages from the Laze workspace arrive as <channel source="${server}" message_id="..." channel="..." author="...">text</channel>.`,
@@ -76455,6 +76820,44 @@ function notificationOf({
76455
76820
  ${answerHintOf({ message: message2, self: self2 })}`, meta: meta3 }
76456
76821
  });
76457
76822
  }
76823
+ async function inboxRound({
76824
+ context,
76825
+ client,
76826
+ signal,
76827
+ backoff
76828
+ }) {
76829
+ try {
76830
+ const taken = await client.post(
76831
+ "/api/agents/me/inbox",
76832
+ { waitSeconds: ROUND_SECONDS3 },
76833
+ { signal }
76834
+ );
76835
+ if (backoff.answered() > 0) context.err("laze mcp: reached Laze again\n");
76836
+ return taken;
76837
+ } catch (error63) {
76838
+ if (signal.aborted) return [];
76839
+ const migrated = migratedNoticeOf(error63);
76840
+ if (migrated) {
76841
+ context.err(`${migrated.notice}
76842
+ `);
76843
+ return void 0;
76844
+ }
76845
+ if (refusedForGood(error63)) {
76846
+ context.err(`laze mcp: Laze refused this agent's key: ${String(error63)}
76847
+ `);
76848
+ return void 0;
76849
+ }
76850
+ const next = backoff.failed({ nowMs: context.nowMs() });
76851
+ if ("giveUp" in next) {
76852
+ context.err("laze mcp: Laze has not answered for 3 days; stopped listening\n");
76853
+ return void 0;
76854
+ }
76855
+ context.err(`laze mcp: could not read the inbox: ${String(error63)}
76856
+ `);
76857
+ await context.sleep(next.delayMs, signal);
76858
+ return [];
76859
+ }
76860
+ }
76458
76861
  async function pushInbox({
76459
76862
  context,
76460
76863
  client,
@@ -76464,20 +76867,9 @@ async function pushInbox({
76464
76867
  const marker = statePathOf({ context, kind: "channels", profile });
76465
76868
  await writeStateJson({ path: marker, value: { pid: context.processes.pid } });
76466
76869
  try {
76870
+ const backoff = new ListenerBackoff();
76467
76871
  while (!signal.aborted) {
76468
- const messages = await client.post("/api/agents/me/inbox", { waitSeconds: ROUND_SECONDS3 }, { signal }).catch(async (error63) => {
76469
- if (signal.aborted) return [];
76470
- const migrated = migratedNoticeOf(error63);
76471
- if (migrated) {
76472
- context.err(`${migrated.notice}
76473
- `);
76474
- return void 0;
76475
- }
76476
- context.err(`laze mcp: could not read the inbox: ${String(error63)}
76477
- `);
76478
- await context.sleep(RETRY_MS, signal);
76479
- return [];
76480
- });
76872
+ const messages = await inboxRound({ context, client, signal, backoff });
76481
76873
  if (messages === void 0) break;
76482
76874
  if (messages.length === 0) {
76483
76875
  await context.sleep(1e3, signal);
@@ -79819,6 +80211,57 @@ var appCreatedPayloadSchemaDefinition = external_exports.object({
79819
80211
  at: external_exports.iso.datetime()
79820
80212
  });
79821
80213
 
80214
+ // ../../modules/app/contract/src/app.requests.ts
80215
+ var appPublishRequestChangedPayloadSchemaDefinition = external_exports.object({
80216
+ workspaceId: external_exports.string().min(1),
80217
+ appId: external_exports.string().min(1),
80218
+ requestId: external_exports.string().min(1),
80219
+ change: external_exports.enum(["requested", "answered", "expired", "withdrawn"]),
80220
+ /** One per change, so a request that waits again is a new fact. */
80221
+ changeId: external_exports.string().min(1),
80222
+ at: external_exports.iso.datetime()
80223
+ });
80224
+ var appAccessRequestChangedPayloadSchemaDefinition = external_exports.object({
80225
+ workspaceId: external_exports.string().min(1),
80226
+ appId: external_exports.string().min(1),
80227
+ requestId: external_exports.string().min(1),
80228
+ change: external_exports.enum(["requested", "answered", "withdrawn"]),
80229
+ changeId: external_exports.string().min(1),
80230
+ at: external_exports.iso.datetime()
80231
+ });
80232
+ var appTriggerPauseChangedPayloadSchemaDefinition = external_exports.object({
80233
+ workspaceId: external_exports.string().min(1),
80234
+ appId: external_exports.string().min(1),
80235
+ triggerId: external_exports.string().min(1),
80236
+ change: external_exports.enum(["paused", "resumed", "removed"]),
80237
+ changeId: external_exports.string().min(1),
80238
+ at: external_exports.iso.datetime()
80239
+ });
80240
+ var appBudgetAlertChangedPayloadSchemaDefinition = external_exports.object({
80241
+ workspaceId: external_exports.string().min(1),
80242
+ appId: external_exports.string().min(1),
80243
+ /** YYYY-MM in UTC, and the level the month stands at after the change: 0, 75, 95 or 100. */
80244
+ month: external_exports.string().min(1),
80245
+ level: external_exports.number().int().min(0),
80246
+ change: external_exports.enum(["reached", "set", "month_began"]),
80247
+ changeId: external_exports.string().min(1),
80248
+ at: external_exports.iso.datetime()
80249
+ });
80250
+ var appBackupCheckChangedPayloadSchemaDefinition = external_exports.object({
80251
+ workspaceId: external_exports.string().min(1),
80252
+ /** When the host's check finished; one check is one fact per workspace. */
80253
+ checkAt: external_exports.string().min(1),
80254
+ changeId: external_exports.string().min(1),
80255
+ at: external_exports.iso.datetime()
80256
+ });
80257
+ var appQuotaAlertChangedPayloadSchemaDefinition = external_exports.object({
80258
+ workspaceId: external_exports.string().min(1),
80259
+ /** Whether any app of the workspace reached a warning level; false lets old notices settle. */
80260
+ warned: external_exports.boolean(),
80261
+ changeId: external_exports.string().min(1),
80262
+ at: external_exports.iso.datetime()
80263
+ });
80264
+
79822
80265
  // ../../modules/app/contract/src/app.templates.ts
79823
80266
  var APP_TEMPLATE_SOURCES = ["laze"];
79824
80267
  var templateCollectionsSchema = external_exports.record(
@@ -84833,7 +85276,7 @@ var CHAT_ACTIONS_USAGE = `Usage:
84833
85276
  laze thread following <messageId> whether you follow it
84834
85277
  laze thread read <messageId> mark a followed thread read (people)
84835
85278
  laze threads [--limit <n>] | laze threads unread the threads you follow (people)
84836
- laze message edit <messageId> <text> edit your own message
85279
+ laze message edit <messageId> <text|-> edit your own message; - reads stdin
84837
85280
  laze message delete <messageId> delete your own message
84838
85281
  laze message remove <messageId> remove anyone's message (admins)
84839
85282
  laze message react <messageId> <emoji> add a reaction, or take yours back
@@ -84946,10 +85389,11 @@ var threads = async ({ context, args, client }) => {
84946
85389
  };
84947
85390
  var MESSAGE_VERBS = {
84948
85391
  edit: async ({ context, args, client }) => {
84949
- const body = args.words.slice(3).join(" ").trim();
84950
- if (!body) throw new CliUsageError(CHAT_ACTIONS_USAGE);
85392
+ const messageId = wordAt(args, 2);
85393
+ if (args.words.length < 4) throw new CliUsageError(CHAT_ACTIONS_USAGE);
85394
+ const body = await textOf({ context, args, from: 3 });
84951
85395
  const answer6 = await client.post(CHAT_KEY_PATHS.edit, {
84952
- messageId: wordAt(args, 2),
85396
+ messageId,
84953
85397
  body
84954
85398
  });
84955
85399
  print6({ context, args, answer: answer6, text: (it) => `Edited ${it.id}.
@@ -85553,7 +85997,9 @@ var computeConfig = Config.define((c) => ({
85553
85997
  iproyalApiBase: c.env(
85554
85998
  "LAZE_IPROYAL_API_BASE",
85555
85999
  external_exports.url().default("https://apid.iproyal.com/v1/reseller")
85556
- )
86000
+ ),
86001
+ /** WhatsApp edits and deletes land through chat's merge rows (ADR-202 M3); off keeps old path. */
86002
+ whatsappMirrorObserve: c.env("WHATSAPP_MIRROR_OBSERVE", external_exports.enum(["on", "off"]).default("off"))
85557
86003
  }));
85558
86004
 
85559
86005
  // ../../modules/billing/contract/src/billing.config.ts
@@ -86271,6 +86717,24 @@ var myComputersDefinition = external_exports.object({
86271
86717
  canAddShared: external_exports.boolean()
86272
86718
  });
86273
86719
  var myComputersSchema = myComputersDefinition;
86720
+ var computerUseDefinition = external_exports.object({
86721
+ computerId: external_exports.string(),
86722
+ name: external_exports.string(),
86723
+ state: external_exports.enum(["running", "asleep", "none"]),
86724
+ size: computerSizeSchema,
86725
+ cpu: external_exports.object({ busy: external_exports.number().nonnegative(), vcpu: external_exports.number().positive() }),
86726
+ memory: external_exports.object({ usedGb: external_exports.number().nonnegative(), totalGb: external_exports.number().positive() }),
86727
+ disk: external_exports.object({ usedGb: external_exports.number().nonnegative().nullable(), totalGb: external_exports.number().positive() }),
86728
+ /** Memory or disk at `COMPUTER_NEAR_FULL_SHARE` of the size or more. */
86729
+ nearFull: external_exports.boolean()
86730
+ });
86731
+ var computerUseSchema2 = computerUseDefinition;
86732
+ var personComputerInputDefinition = external_exports.object({
86733
+ workspaceId: external_exports.string().min(1).max(64),
86734
+ userId: external_exports.string().min(1).max(64),
86735
+ computerId: external_exports.string().min(1).max(64).optional()
86736
+ });
86737
+ var personComputerInputSchema = personComputerInputDefinition;
86274
86738
  var createComputerInputDefinition = external_exports.object({
86275
86739
  workspaceId: external_exports.string().min(1),
86276
86740
  name: external_exports.string().trim().min(1).max(40),
@@ -86372,6 +86836,16 @@ var computerChangedDefinition = external_exports.object({
86372
86836
  nextCheckAt: external_exports.number().int().nullable(),
86373
86837
  at: external_exports.iso.datetime()
86374
86838
  });
86839
+ var computerAttentionChangedDefinition = external_exports.object({
86840
+ workspaceId: external_exports.string().min(1),
86841
+ change: external_exports.enum(["request_opened", "request_closed", "guard_event", "whatsapp_touched"]),
86842
+ /** The request, guard event or machine the change is about. */
86843
+ subjectId: external_exports.string().min(1),
86844
+ /** Whose computer it is; null for a guard event, which is the workspace's. */
86845
+ userId: external_exports.string().nullable(),
86846
+ changeId: external_exports.string().min(1),
86847
+ at: external_exports.iso.datetime()
86848
+ });
86375
86849
 
86376
86850
  // ../../modules/compute/contract/src/dedicated-ip.ts
86377
86851
  var DEDICATED_IP_MAX_DOMAINS = 50;
@@ -86653,6 +87127,16 @@ var messagesResultDefinition = external_exports.object({
86653
87127
  chat: whatsappChatDefinition.pick({ id: true, name: true, group: true }),
86654
87128
  messages: external_exports.array(whatsappMessageDefinition)
86655
87129
  });
87130
+ var chatPeopleInputDefinition = external_exports.object({
87131
+ workspaceId: workspaceIdSchema20,
87132
+ channelId: external_exports.string().min(1).max(64)
87133
+ });
87134
+ var whatsappChatPeopleInputSchema = chatPeopleInputDefinition;
87135
+ var chatPeopleDefinition = external_exports.object({
87136
+ people: external_exports.array(external_exports.object({ name: external_exports.string().min(1).max(200) })),
87137
+ state: external_exports.enum(["listed", "none", "asleep", "unreachable"])
87138
+ });
87139
+ var whatsappChatPeopleSchema = chatPeopleDefinition;
86656
87140
  var limitSchema = external_exports.number().int().min(1).max(WHATSAPP_LIMIT_MAX);
86657
87141
  var chatRefSchema = external_exports.string().trim().min(1).max(200);
86658
87142
  var whatsappMachineRef = machineRefText2.optional();
@@ -86807,6 +87291,8 @@ var whatsappChangeDefinition = external_exports.object({
86807
87291
  sender: external_exports.string().max(500),
86808
87292
  text: external_exports.string(),
86809
87293
  deleted: external_exports.boolean(),
87294
+ /** The change's place in the store's change feed; absent from older connectors. */
87295
+ seq: external_exports.number().int().min(1).optional(),
86810
87296
  /** Fetched with a "media" request while the store is open; absent from older connectors. */
86811
87297
  media: whatsappChangeMediaDefinition.optional(),
86812
87298
  /** The chat's other ids, such as the hidden id it was first seen under; new in Nov 2026. */
@@ -87126,7 +87612,9 @@ var loginTerminalDefinition = external_exports.discriminatedUnion("status", [
87126
87612
  status: external_exports.literal("starting"),
87127
87613
  retryAfterSeconds: external_exports.number().int().positive(),
87128
87614
  /** The computer is awake and only its link is coming back, e.g. after a deploy. */
87129
- reconnecting: external_exports.boolean().optional()
87615
+ reconnecting: external_exports.boolean().optional(),
87616
+ /** Where the start is: the computer booting, or up and connecting to Laze. */
87617
+ step: external_exports.enum(["booting", "connecting"]).optional()
87130
87618
  }),
87131
87619
  external_exports.object({
87132
87620
  status: external_exports.literal("ready"),
@@ -87179,7 +87667,7 @@ var ownMachineSshConnectSchema = ownMachineSshConnectDefinition;
87179
87667
  var reconcileDefinition = external_exports.object({ workspaceId: workspaceIdSchema22, machineId: idSchema23 });
87180
87668
  var ComputeApi = moduleApi()("compute");
87181
87669
  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("openLoginTerminal").withInput(openLoginTerminalInputSchema).withOutput(loginTerminalSchema).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(whatsappPairInputSchema).withOutput(whatsappPairingSchema).query("whatsappMirror").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).mutation("setWhatsappMirror").withInput(setWhatsappMirrorInputSchema).withOutput(whatsappMirrorSettingsSchema).query("whatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("cancelWhatsappPairing").withInput(whatsappPairingRefSchema).withOutput(whatsappPairingSchema).mutation("unpairWhatsapp").withInput(machineRefSchema).withOutput(machineSchema).build();
87182
- var computeFleetTrpc = defineTrpcContract("compute").query("whatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("prepareWhatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("warmComputer").withInput(computeWorkspaceInputSchema).withOutput(warmComputerSchema).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).query("whatsappAgents").withInput(machineRefSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgent").withInput(setWhatsappAgentInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgentLease").withInput(setWhatsappAgentLeaseInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappEveryAgent").withInput(setWhatsappEveryAgentInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgentAccess").withInput(setWhatsappAgentAccessInputSchema).withOutput(whatsappAgentsSchema).mutation("checkWhatsappNow").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).build();
87670
+ var computeFleetTrpc = defineTrpcContract("compute").query("whatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("prepareWhatsappComputer").withInput(whatsappComputerInputSchema).withOutput(whatsappComputerSchema).mutation("warmComputer").withInput(computeWorkspaceInputSchema).withOutput(warmComputerSchema).query("myComputers").withInput(computeWorkspaceInputSchema).withOutput(myComputersSchema).query("personComputer").withInput(personComputerInputSchema).withOutput(computerUseSchema2).mutation("createComputer").withInput(createComputerInputSchema).withOutput(computerStatusSchema).mutation("deleteComputer").withInput(deleteComputerInputSchema).withOutput(deleteComputerAnswerSchema).mutation("setComputerCreators").withInput(setComputerCreatorsInputSchema).withOutput(computerStatusSchema).mutation("setAgentComputer").withInput(setAgentComputerInputSchema).withOutput(agentComputerAnswerSchema).query("whatsappAgents").withInput(machineRefSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgent").withInput(setWhatsappAgentInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgentLease").withInput(setWhatsappAgentLeaseInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappEveryAgent").withInput(setWhatsappEveryAgentInputSchema).withOutput(whatsappAgentsSchema).mutation("setWhatsappAgentAccess").withInput(setWhatsappAgentAccessInputSchema).withOutput(whatsappAgentsSchema).mutation("checkWhatsappNow").withInput(machineRefSchema).withOutput(whatsappMirrorSettingsSchema).query("whatsappChatPeople").withInput(whatsappChatPeopleInputSchema).withOutput(whatsappChatPeopleSchema).build();
87183
87671
  var computeTrpc = joinTrpcContracts("compute", computeCoreTrpc, computeFleetTrpc);
87184
87672
  var restMachineInputDefinition = external_exports.object({ machine: external_exports.string().min(1).max(64) });
87185
87673
  var restRenameInputDefinition = external_exports.object({
@@ -87251,6 +87739,7 @@ var ComputeWhatsappMessagingSlot = computeUi.component("whatsapp-messaging");
87251
87739
  var ComputeBrowserTabSlot = computeUi.component("browser-tab");
87252
87740
  var ComputeOpenBrowserSlot = computeUi.component("open-browser");
87253
87741
  var ComputeLoginTerminalSlot = computeUi.component("login-terminal");
87742
+ var ComputeComputerUseSlot = computeUi.component("computer-use");
87254
87743
 
87255
87744
  // ../../modules/compute/contract/src/computer-copy.ts
87256
87745
  var COMPUTER_COPY_MAX_BYTES = 2 * 1024 * 1024 * 1024;
@@ -89103,6 +89592,15 @@ var historyInputDefinition = external_exports.object({
89103
89592
  before: external_exports.iso.datetime()
89104
89593
  });
89105
89594
  var discordHistoryInputSchema = historyInputDefinition;
89595
+ var channelPeopleInputDefinition = external_exports.object({
89596
+ workspaceId: workspaceIdSchema24,
89597
+ channelId: external_exports.string().min(1).max(200)
89598
+ });
89599
+ var discordChannelPeopleInputSchema = channelPeopleInputDefinition;
89600
+ var channelPeopleDefinition = external_exports.object({
89601
+ people: external_exports.array(external_exports.object({ name: external_exports.string().min(1).max(100) })).max(200)
89602
+ });
89603
+ var discordChannelPeopleSchema = channelPeopleDefinition;
89106
89604
  var discordFileDefinition = external_exports.object({
89107
89605
  id: external_exports.string(),
89108
89606
  name: external_exports.string(),
@@ -89156,7 +89654,7 @@ var DISCORD_KEY_PATHS = {
89156
89654
  history: "/api/discord/history"
89157
89655
  };
89158
89656
  var DiscordApi = moduleApi()("discord");
89159
- var discordTrpc = defineTrpcContract("discord").query("overview").withInput(workspaceInput4).withOutput(discordOverviewSchema).mutation("beginSetup").withInput(workspaceInput4).withOutput(discordSetupSchema).mutation("saveApp").withInput(saveDiscordAppInputSchema).withOutput(startedDiscordAuthorizeSchema).mutation("startInstall").withInput(workspaceInput4).withOutput(startedDiscordAuthorizeSchema).mutation("startLink").withInput(discordGuildInputSchema).withOutput(startedDiscordAuthorizeSchema).mutation("unlink").withInput(discordGuildInputSchema).withOutput(discordConnectionViewSchema).query("channels").withInput(discordGuildInputSchema).withOutput(external_exports.array(discordChannelViewSchema)).mutation("pick").withInput(discordPickInputSchema).withOutput(discordChannelViewSchema).mutation("updateConnection").withInput(updateDiscordConnectionInputSchema).withOutput(discordConnectionViewSchema).mutation("disconnect").withInput(discordGuildInputSchema).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).query("history").withInput(discordHistoryInputSchema).withOutput(discordHistoryPageSchema).build();
89657
+ var discordTrpc = defineTrpcContract("discord").query("overview").withInput(workspaceInput4).withOutput(discordOverviewSchema).mutation("beginSetup").withInput(workspaceInput4).withOutput(discordSetupSchema).mutation("saveApp").withInput(saveDiscordAppInputSchema).withOutput(startedDiscordAuthorizeSchema).mutation("startInstall").withInput(workspaceInput4).withOutput(startedDiscordAuthorizeSchema).mutation("startLink").withInput(discordGuildInputSchema).withOutput(startedDiscordAuthorizeSchema).mutation("unlink").withInput(discordGuildInputSchema).withOutput(discordConnectionViewSchema).query("channels").withInput(discordGuildInputSchema).withOutput(external_exports.array(discordChannelViewSchema)).mutation("pick").withInput(discordPickInputSchema).withOutput(discordChannelViewSchema).mutation("updateConnection").withInput(updateDiscordConnectionInputSchema).withOutput(discordConnectionViewSchema).mutation("disconnect").withInput(discordGuildInputSchema).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).query("history").withInput(discordHistoryInputSchema).withOutput(discordHistoryPageSchema).query("channelPeople").withInput(discordChannelPeopleInputSchema).withOutput(discordChannelPeopleSchema).build();
89160
89658
 
89161
89659
  // ../../modules/discord/contract/src/discord.config.ts
89162
89660
  var positiveInt6 = external_exports.coerce.number().int().positive();
@@ -89164,6 +89662,8 @@ var discordConfig = Config.define((c) => ({
89164
89662
  publicBaseUrl,
89165
89663
  /** The versioned REST base; routes are `${apiUrl}/<route>`. */
89166
89664
  apiUrl: c.env("DISCORD_API_URL", external_exports.url().default("https://discord.com/api/v10")),
89665
+ /** On, Discord's changes land through chat's merge rows (ADR-202 M3); off keeps the old path. */
89666
+ mirrorObserve: c.env("DISCORD_MIRROR_OBSERVE", external_exports.enum(["on", "off"]).default("off")),
89167
89667
  /** Discord's consent page for installs and links. */
89168
89668
  authorizeUrl: c.env(
89169
89669
  "DISCORD_AUTHORIZE_URL",
@@ -89257,6 +89757,10 @@ var sweepIntentDefinition = external_exports.object({
89257
89757
  workspaceId: external_exports.string().min(1),
89258
89758
  guildId: external_exports.string().min(1)
89259
89759
  });
89760
+ var webhookProbeRequestedDefinition = external_exports.object({
89761
+ workspaceId: external_exports.string().min(1),
89762
+ runId: external_exports.string().min(1)
89763
+ });
89260
89764
 
89261
89765
  // src/services/discord-commands.service.ts
89262
89766
  var DISCORD_USAGE = `Usage (a person's key; Discord stays the source, each person picks their own channels):
@@ -90390,7 +90894,7 @@ var EXTERNAL_USAGE = `Usage:
90390
90894
  laze external accept-share <share id> [--name <name>] [--private] take a shared channel (admins)
90391
90895
  laze external decline-share <share id> turn a shared channel down (admins)
90392
90896
  laze external unshare <share id|#channel> stop sharing a channel, or leave one shared with you (admins)
90393
- laze external dm <person> [--connection <workspace>] [<message>] a DM with someone you share a channel with
90897
+ laze external dm <person> [--connection <workspace>] [<message>|-] a DM with someone you share a channel with
90394
90898
  laze external block <workspace> disconnect and refuse their invitations (admins)
90395
90899
  laze external report <workspace> --note "<why>" report a workspace to Laze staff, and block it (admins)`;
90396
90900
  var printJson6 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
@@ -90644,7 +91148,7 @@ async function unshare({ context, args }) {
90644
91148
  }
90645
91149
  async function direct({ context, args }) {
90646
91150
  const person = wordAt5({ args, at: 2, what: "the person" });
90647
- const body = args.words.slice(3).join(" ").trim();
91151
+ const body = args.words.length > 3 ? await textOf({ context, args, from: 3 }) : "";
90648
91152
  const connection = flagText({ args, name: "connection" })?.trim();
90649
91153
  const { client } = await clientOf2({ context, args });
90650
91154
  const answer6 = await client.post(EXTERNAL_CONNECTION_REST_PATHS.dm, {
@@ -91260,6 +91764,8 @@ var feedCommentPlaceSchema = feedCommentPlaceSchemaDefinition;
91260
91764
  var saveCommentDraftInputSchemaDefinition = external_exports.object({
91261
91765
  ...itemRef.shape,
91262
91766
  text: external_exports.string().max(MESSAGE_BODY_MAX),
91767
+ /** The chips of uploaded files in the comment; none from an older client. */
91768
+ files: external_exports.array(draftFileSchema).max(FEED_ATTACHMENTS_MAX).default([]),
91263
91769
  /** The writer's clock when they typed it; the newest save wins. */
91264
91770
  savedAt: external_exports.iso.datetime()
91265
91771
  });
@@ -91267,7 +91773,14 @@ var saveCommentDraftInputSchema = saveCommentDraftInputSchemaDefinition;
91267
91773
  var commentDraftSavedSchemaDefinition = external_exports.object({ saved: external_exports.boolean() });
91268
91774
  var commentDraftSavedSchema = commentDraftSavedSchemaDefinition;
91269
91775
  var commentDraftListSchemaDefinition = external_exports.object({
91270
- drafts: external_exports.array(external_exports.object({ itemId: external_exports.string(), text: external_exports.string(), savedAt: external_exports.iso.datetime() })),
91776
+ drafts: external_exports.array(
91777
+ external_exports.object({
91778
+ itemId: external_exports.string(),
91779
+ text: external_exports.string(),
91780
+ files: external_exports.array(draftFileSchema).default([]),
91781
+ savedAt: external_exports.iso.datetime()
91782
+ })
91783
+ ),
91271
91784
  /** Comments sent or deleted, and when, so a copy saved before that is dropped. */
91272
91785
  cleared: external_exports.array(external_exports.object({ itemId: external_exports.string(), savedAt: external_exports.iso.datetime() }))
91273
91786
  });
@@ -95174,6 +95687,7 @@ var verificationStatusSchemaDefinition = external_exports.discriminatedUnion("st
95174
95687
  external_exports.object({ state: external_exports.literal("verified") }),
95175
95688
  external_exports.object({ state: external_exports.literal("pending"), email: external_exports.string() })
95176
95689
  ]);
95690
+ var accountLookupSchemaDefinition = external_exports.object({ exists: external_exports.boolean() });
95177
95691
 
95178
95692
  // ../../modules/auth/contract/src/auth.api.ts
95179
95693
  var authUserSchemaDefinition = external_exports.object({
@@ -95681,6 +96195,12 @@ var revokeInviteInputSchemaDefinition = external_exports.object({
95681
96195
  inviteId: external_exports.string().min(1)
95682
96196
  });
95683
96197
  var revokeInviteInputSchema = revokeInviteInputSchemaDefinition;
96198
+ var resendInviteInputSchemaDefinition = external_exports.object({
96199
+ workspaceId: external_exports.string().min(1),
96200
+ inviteId: external_exports.string().min(1),
96201
+ /** Where the invited person lands on joining now; it replaces the invitation's landing. */
96202
+ landing: inviteLandingSchema.nullable()
96203
+ });
95684
96204
  var copiedInviteLinkSchemaDefinition = external_exports.object({
95685
96205
  inviteId: external_exports.string().min(1),
95686
96206
  email: external_exports.string(),
@@ -95800,6 +96320,25 @@ var requestApprovedDefinition = external_exports.object({
95800
96320
  /** ISO 8601. */
95801
96321
  at: external_exports.iso.datetime()
95802
96322
  });
96323
+ var accessRequestChangedDefinition = external_exports.object({
96324
+ workspaceId: external_exports.string().min(1),
96325
+ requestId: external_exports.string().min(1),
96326
+ change: external_exports.enum(["requested", "approved", "denied", "withdrawn", "expired"]),
96327
+ /** Unique per change. */
96328
+ changeId: external_exports.string().min(1),
96329
+ /** ISO 8601. */
96330
+ at: external_exports.iso.datetime()
96331
+ });
96332
+ var memberRoleChangedDefinition = external_exports.object({
96333
+ workspaceId: external_exports.string().min(1),
96334
+ userId: external_exports.string().min(1),
96335
+ /** The role the member holds now. */
96336
+ role: external_exports.string().min(1),
96337
+ /** Unique per change. */
96338
+ changeId: external_exports.string().min(1),
96339
+ /** ISO 8601. */
96340
+ at: external_exports.iso.datetime()
96341
+ });
95803
96342
  var deletionScheduledDefinition = external_exports.object({
95804
96343
  workspaceId: external_exports.string().min(1),
95805
96344
  byUserId: external_exports.string().min(1),
@@ -96839,7 +97378,6 @@ function watchingRelease({
96839
97378
  // src/services/rush-guard.service.ts
96840
97379
  import { rm as rm19 } from "node:fs/promises";
96841
97380
  var WATCH_MS3 = 2e3;
96842
- var RETRY_MS2 = 3e4;
96843
97381
  async function guardRound(guard) {
96844
97382
  const { context, client, name: name3, lock, claudePid, session, rush, launch } = guard;
96845
97383
  const key = session ? sessionKeyOf({ session }) : void 0;
@@ -96873,7 +97411,7 @@ function afterFailure({ context, error: error63 }) {
96873
97411
  `);
96874
97412
  return true;
96875
97413
  }
96876
- if (error63 instanceof LazeApiError && error63.status === 401) return true;
97414
+ if (refusedForGood(error63)) return true;
96877
97415
  context.err(`laze: the rush guard will try again: ${String(error63)}
96878
97416
  `);
96879
97417
  return "failed";
@@ -96881,12 +97419,23 @@ function afterFailure({ context, error: error63 }) {
96881
97419
  async function guardRounds(guard) {
96882
97420
  const { context } = guard;
96883
97421
  const deadline = context.nowMs() + WAIT_HOOK_TIMEOUT_SECONDS * 1e3;
97422
+ const backoff = new ListenerBackoff();
96884
97423
  while (context.nowMs() < deadline) {
96885
97424
  const done = await guardRound(guard).catch(
96886
97425
  (error63) => afterFailure({ context, error: error63 })
96887
97426
  );
96888
97427
  if (done === true) return 0;
96889
- await context.sleep(done === "failed" ? RETRY_MS2 : 1e3);
97428
+ if (done !== "failed") {
97429
+ if (backoff.answered() > 0) context.err("laze: the rush guard reached Laze again\n");
97430
+ await context.sleep(1e3);
97431
+ continue;
97432
+ }
97433
+ const next = backoff.failed({ nowMs: context.nowMs() });
97434
+ if ("giveUp" in next) {
97435
+ context.err("laze: Laze has not answered for 3 days; the rush guard stopped\n");
97436
+ return 0;
97437
+ }
97438
+ await context.sleep(next.delayMs);
96890
97439
  }
96891
97440
  return 0;
96892
97441
  }
@@ -98997,7 +99546,7 @@ var WHATSAPP_BUSINESS_USAGE = `Usage (the workspace's WhatsApp Business number o
98997
99546
  laze whatsapp-business status the number, its name, the answering agent, the reply mode
98998
99547
  laze whatsapp-business conversations [--limit <n>] the conversations you are in, newest first
98999
99548
  laze whatsapp-business read <contact> [--limit <n>] a contact's messages, oldest first, with each send's state
99000
- laze whatsapp-business send <contact> "<text>" text, only within 24 hours of their last message
99549
+ laze whatsapp-business send <contact> "<text>"|- text (- reads stdin), only within 24 hours of their last message
99001
99550
  laze whatsapp-business templates the account's message templates
99002
99551
  laze whatsapp-business send-template <contact> <template> [--language <code>] [--param <text>]... [--yes]
99003
99552
  without --yes it prints Meta's price and sends nothing; to someone who never wrote,
@@ -99168,7 +99717,7 @@ var read2 = async ({ context, args, client }) => {
99168
99717
  }
99169
99718
  };
99170
99719
  var send3 = async ({ context, args, client }) => {
99171
- const text3 = args.words.slice(3).join(" ") || args.rest.join(" ");
99720
+ const text3 = args.words.length > 3 ? await textOf({ context, args, from: 3 }) : args.rest.join(" ").trim();
99172
99721
  if (!text3) throw new CliUsageError(WHATSAPP_BUSINESS_USAGE);
99173
99722
  const asked = await client.post(WHATSAPP_BUSINESS_REST_PATHS.send, {
99174
99723
  to: wordAt10(args, 2),
@@ -99355,7 +99904,7 @@ var USAGE19 = [
99355
99904
  " laze whatsapp read [<machine>] <chat> [--limit <n>] a chat's last messages, oldest first",
99356
99905
  " (a read your owner set to Always ask waits for their answer; --request <id> picks it up later)",
99357
99906
  " laze whatsapp file [<machine>] <chat> <message-id> [--out <path>] save a message's photo, voice message or file",
99358
- ' laze whatsapp send <machine> <chat> "<text>" send as the owner; an agent waits for their approval',
99907
+ ' laze whatsapp send <machine> <chat> "<text>"|- send as the owner (- reads stdin); an agent waits for their approval',
99359
99908
  " laze whatsapp status <send-id> where a send stands",
99360
99909
  " laze whatsapp sync [<machine>] check WhatsApp now (the owner only)",
99361
99910
  WHATSAPP_PAIRING_USAGE,
@@ -99492,7 +100041,7 @@ Still waiting. Run \`laze whatsapp status ${send5.id}\` later to see the answer.
99492
100041
  return send5.state === "sent" || !SETTLED.has(send5.state) ? 0 : 1;
99493
100042
  }
99494
100043
  async function send4({ context, args }) {
99495
- const text3 = args.words.slice(4).join(" ") || args.rest.join(" ");
100044
+ const text3 = args.words.length > 4 ? await textOf({ context, args, from: 4 }) : args.rest.join(" ").trim();
99496
100045
  if (!text3) throw new CliUsageError(USAGE19);
99497
100046
  const client = await computeClient({ context, args });
99498
100047
  const asked = await client.post(PATHS3.send, {