@lazehq/cli 0.1.69 → 0.1.71

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 +227 -95
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -36927,7 +36927,7 @@ function flagText({
36927
36927
  }
36928
36928
 
36929
36929
  // src/rules/cli-version.rules.ts
36930
- var STAMPED = "0.1.69";
36930
+ var STAMPED = "0.1.71";
36931
36931
  function cliVersionOf({ stamped = STAMPED } = {}) {
36932
36932
  return stamped.startsWith("__") ? "dev" : stamped;
36933
36933
  }
@@ -59548,7 +59548,9 @@ var layoutPartSchemaDefinition = external_exports.union([
59548
59548
  ]);
59549
59549
  var messageLayoutSchemaDefinition = external_exports.object({
59550
59550
  /** No parts means the source drew only its text: no layout is kept. */
59551
- parts: external_exports.array(layoutPartSchemaDefinition).max(LAYOUT_BLOCKS_MAX)
59551
+ parts: external_exports.array(layoutPartSchemaDefinition).max(LAYOUT_BLOCKS_MAX),
59552
+ /** Served only: each https image on a host the page does not allow, to its signed address. */
59553
+ images: external_exports.record(external_exports.string().max(2e3), external_exports.string().max(5e3)).optional()
59552
59554
  });
59553
59555
  var messageLayoutSchema = messageLayoutSchemaDefinition;
59554
59556
 
@@ -60205,6 +60207,8 @@ var messageSchemaDefinition = external_exports.object({
60205
60207
  forward: messageForwardSchemaDefinition.nullable().optional(),
60206
60208
  /** The blocks and attachments a mirrored message's source drew; clients draw it for the body. */
60207
60209
  layout: messageLayoutSchema.nullable().optional(),
60210
+ /** Each https body image and outside author picture the page cannot load, to its Laze address. */
60211
+ images: external_exports.record(external_exports.string().max(2e3), external_exports.string().max(5e3)).optional(),
60208
60212
  /** A message written in Laze that its mirror is still waiting to send, or could not send. */
60209
60213
  mirrorDelivery: mirrorDeliverySchema.nullable().optional(),
60210
60214
  /** A thread reply also sent to its conversation: it shows in the thread and the channel. */
@@ -62188,6 +62192,13 @@ function withSlackMarkupAsText(text3) {
62188
62192
  return withSlackPeopleAsNames(text3).replace(SLACK_DATE_TOKEN, "$1").replace(ANGLE_LINK, (_link, address, label3) => label3 ?? address);
62189
62193
  }
62190
62194
 
62195
+ // ../../modules/chat/contract/src/chat.images.ts
62196
+ var externalImageParamsSchemaDefinition = external_exports.object({ workspaceId: external_exports.string().min(1).max(64) });
62197
+ var externalImageQuerySchemaDefinition = external_exports.object({
62198
+ u: external_exports.string().min(1).max(2e3),
62199
+ sig: external_exports.string().max(100).default("")
62200
+ });
62201
+
62191
62202
  // ../../modules/vault/contract/src/resolution-note.ts
62192
62203
  var RESOLUTION_NOTE_INPUT_MAX_CHARS = 4e3;
62193
62204
  function cleanResolutionNote(text3) {
@@ -63381,6 +63392,8 @@ var vaultApprovalResolvedPayloadSchemaDefinition = external_exports.object({
63381
63392
  endedWithTurn: external_exports.boolean().optional(),
63382
63393
  /** A task card: its Allow covered the rest of the agent's turn. */
63383
63394
  coversTask: external_exports.boolean().optional(),
63395
+ /** Settled by another card's Allow for this agent, whose lease now covers this ask too. */
63396
+ coveredByLease: external_exports.boolean().optional(),
63384
63397
  /** Who decides the card, so their open approvals lists refresh. */
63385
63398
  approverUserIds: external_exports.array(external_exports.string()).readonly().default([])
63386
63399
  });
@@ -65113,6 +65126,8 @@ var agentRuntimeConfig = Config.define((c) => ({
65113
65126
  ),
65114
65127
  /** The progress board's alerts folder; unset, a full host is only logged. */
65115
65128
  computerAlertDir: c.env("AGENT_RUNTIME_COMPUTER_ALERT_DIR", external_exports.string().min(1).optional()),
65129
+ /** The workspace whose Owners and Admins get an urgent feed card per capacity incident. */
65130
+ alertWorkspaceId: c.env("AGENT_RUNTIME_ALERT_WORKSPACE_ID", external_exports.string().min(1).optional()),
65116
65131
  /** Staff get a POST here once per capacity incident; unset, only the board alert. */
65117
65132
  opsWebhookUrl: c.env("AGENT_RUNTIME_OPS_WEBHOOK_URL", external_exports.url().optional()),
65118
65133
  /** How often the worker asks each host's vmd for its report. */
@@ -65182,6 +65197,17 @@ var sizeShape = {
65182
65197
  cpus: external_exports.number().positive(),
65183
65198
  diskGb: external_exports.number().int().positive()
65184
65199
  };
65200
+ var capacityNumbersDefinition = external_exports.object({
65201
+ hosts: external_exports.number().int(),
65202
+ awakeComputers: external_exports.number().int(),
65203
+ placedComputers: external_exports.number().int(),
65204
+ awakeCpus: external_exports.number(),
65205
+ awakeCpuLimit: external_exports.number(),
65206
+ awakeMemoryMb: external_exports.number(),
65207
+ awakeMemoryLimitMb: external_exports.number(),
65208
+ placedDiskGb: external_exports.number(),
65209
+ diskLimitGb: external_exports.number()
65210
+ });
65185
65211
  var computerPoolFactDefinition = external_exports.discriminatedUnion("kind", [
65186
65212
  external_exports.object({
65187
65213
  kind: external_exports.literal("host_registered"),
@@ -65250,7 +65276,27 @@ var computerPoolFactDefinition = external_exports.discriminatedUnion("kind", [
65250
65276
  wantedMemoryMb: external_exports.number(),
65251
65277
  what: external_exports.enum(["create", "wake", "resize"])
65252
65278
  }),
65253
- external_exports.object({ kind: external_exports.literal("pool_restored"), incidentId: external_exports.string(), refusals: external_exports.number() })
65279
+ external_exports.object({ kind: external_exports.literal("pool_restored"), incidentId: external_exports.string(), refusals: external_exports.number() }),
65280
+ /** The feed's urgent card for the alert workspace's Owners and Admins. */
65281
+ external_exports.object({
65282
+ kind: external_exports.literal("capacity_card_raised"),
65283
+ incidentId: external_exports.string(),
65284
+ workspaceId: external_exports.string(),
65285
+ recipientUserIds: external_exports.array(external_exports.string()),
65286
+ computerId: external_exports.string(),
65287
+ what: external_exports.enum(["create", "wake", "resize"]),
65288
+ /** A wake knows no disk: 0. */
65289
+ memoryMb: external_exports.number().int().nonnegative(),
65290
+ cpus: external_exports.number().nonnegative(),
65291
+ diskGb: external_exports.number().int().nonnegative(),
65292
+ numbers: capacityNumbersDefinition
65293
+ }),
65294
+ external_exports.object({
65295
+ kind: external_exports.literal("capacity_card_settled"),
65296
+ incidentId: external_exports.string(),
65297
+ workspaceId: external_exports.string(),
65298
+ refusals: external_exports.number()
65299
+ })
65254
65300
  ]);
65255
65301
  var computerPoolFactRecordDefinition = external_exports.object({
65256
65302
  factId: external_exports.string().min(1),
@@ -68125,7 +68171,7 @@ var lazeChangeSchemaDefinition = external_exports.object({
68125
68171
  // ../../modules/agent/contract/src/agent.config.ts
68126
68172
  var positiveInt3 = external_exports.coerce.number().int().positive();
68127
68173
  var agentConfig = Config.define((c) => ({
68128
- /** Agent replies in a row, in one conversation, before agents stop waking each other. */
68174
+ /** Agent messages in a row, each within 10 minutes of the last, before agents stop waking. */
68129
68175
  hopLimit: c.env("AGENT_HOP_LIMIT", positiveInt3.default(12)),
68130
68176
  /** The gateway's Anthropic-compatible root Claude Code reaches for a Laze model. */
68131
68177
  claudeGatewayUrl: c.env(
@@ -68149,6 +68195,8 @@ var agentConfig = Config.define((c) => ({
68149
68195
  "AGENT_CLAUDE_GATEWAY_THINKING",
68150
68196
  external_exports.enum(["on", "off"]).default("on")
68151
68197
  ),
68198
+ /** Where the inbox watchdog writes its progress board card; unset, it only logs. */
68199
+ opsAlertDir: c.env("AGENT_OPS_ALERT_DIR", external_exports.string().min(1).optional()),
68152
68200
  /** A harness prompt or question no one answers is denied or dismissed after this long. */
68153
68201
  attentionTimeoutMinutes: c.env("AGENT_ATTENTION_TIMEOUT_MINUTES", positiveInt3.default(30)),
68154
68202
  /** Where a GitHub signature links back; the origin the connect command fetches the CLI from. */
@@ -74533,6 +74581,9 @@ laze reply MESSAGE_ID "your answer"
74533
74581
  Use \`-\` instead of the text to read a long answer from stdin. \`laze inbox\` lists messages that
74534
74582
  are waiting, if you think one was missed.
74535
74583
 
74584
+ Your reply is the tool call. When you have replied or posted where it belongs, end the turn
74585
+ without a recap; the person's DM already shows your messages elsewhere.
74586
+
74536
74587
  ## Other things you can do
74537
74588
 
74538
74589
  - \`laze post <channel> "text"\` posts in a channel you are in. Add \`--image <path|url>\` or
@@ -88202,10 +88253,65 @@ async function external({ context, args }) {
88202
88253
  await command({ context, args });
88203
88254
  }
88204
88255
 
88256
+ // src/services/feed-access-commands.service.ts
88257
+ var USAGE9 = `Usage:
88258
+ laze agent feed-access the agents that manage your feed
88259
+ laze agent feed-access <agent> on|off let one of your personal agents sort your whole feed`;
88260
+ var SWITCH = { on: true, off: false };
88261
+ function linesOf2(delegates) {
88262
+ if (delegates.length === 0) return "No agent manages your feed.\n";
88263
+ const lines2 = delegates.map((one) => `${one.agentName} ${one.agentId} since ${one.grantedAt}`);
88264
+ return `${lines2.join("\n")}
88265
+ `;
88266
+ }
88267
+ async function agentFeedAccess({
88268
+ context,
88269
+ args
88270
+ }) {
88271
+ const [agent3, state] = [args.words[2], args.words[3]];
88272
+ if (agent3 && !(state === "on" || state === "off")) throw new CliUsageError(USAGE9);
88273
+ const { client } = await signedIn({ context, args });
88274
+ const delegates = agent3 && (state === "on" || state === "off") ? await client.post("/api/feed/delegates", { agent: agent3, on: SWITCH[state] }) : await client.get("/api/feed/delegates");
88275
+ if (args.flags.json) return context.out(`${JSON.stringify(delegates, null, 2)}
88276
+ `);
88277
+ const named = delegates.find((one) => one.agentId === agent3)?.agentName ?? agent3;
88278
+ if (agent3) context.out(`Manage my feed is ${state} for ${named}.
88279
+ `);
88280
+ context.out(linesOf2(delegates));
88281
+ }
88282
+
88205
88283
  // src/services/feed-commands.service.ts
88206
88284
  import { readFile as readFile32 } from "node:fs/promises";
88207
88285
  import { resolve as resolve15 } from "node:path";
88208
88286
 
88287
+ // ../../modules/feed/contract/src/feed.delegate.ts
88288
+ var feedDelegateSchemaDefinition = external_exports.object({
88289
+ agentId: external_exports.string(),
88290
+ agentName: external_exports.string(),
88291
+ grantedAt: external_exports.iso.datetime()
88292
+ });
88293
+ var feedDelegateSchema = feedDelegateSchemaDefinition;
88294
+ var setFeedDelegateInputSchemaDefinition = external_exports.object({
88295
+ workspaceId: external_exports.string().min(1),
88296
+ agentId: external_exports.string().min(1),
88297
+ on: external_exports.boolean()
88298
+ });
88299
+ var setFeedDelegateInputSchema = setFeedDelegateInputSchemaDefinition;
88300
+ var feedDelegateByKeyInputSchemaDefinition = external_exports.object({
88301
+ agent: external_exports.string().trim().min(1),
88302
+ on: external_exports.boolean()
88303
+ });
88304
+ var pinFeedItemInputSchemaDefinition = external_exports.object({
88305
+ workspaceId: external_exports.string().min(1),
88306
+ itemId: external_exports.string().min(1),
88307
+ pinned: external_exports.boolean()
88308
+ });
88309
+ var pinFeedItemInputSchema = pinFeedItemInputSchemaDefinition;
88310
+ var feedPinByKeyInputSchemaDefinition = external_exports.object({
88311
+ itemId: external_exports.string().min(1),
88312
+ pinned: external_exports.boolean()
88313
+ });
88314
+
88209
88315
  // ../../modules/feed/contract/src/feed.ts
88210
88316
  var feedAuthorSchemaDefinition = external_exports.object({
88211
88317
  kind: external_exports.enum(["agent", "person", "system"]),
@@ -88446,7 +88552,9 @@ var feedViewerStateSchemaDefinition = external_exports.object({
88446
88552
  /** On a shared item: the reader's own item they shared, or someone's item shared with them. */
88447
88553
  shared: external_exports.enum(["by_you", "with_you"]).optional(),
88448
88554
  /** The reader owns the item and may add or remove people on it. */
88449
- mayShare: external_exports.boolean().optional()
88555
+ mayShare: external_exports.boolean().optional(),
88556
+ /** Pinned first in the reader's open cards, by them or the agent managing their feed. */
88557
+ pinned: external_exports.boolean().optional()
88450
88558
  });
88451
88559
  var feedViewerStateSchema = feedViewerStateSchemaDefinition;
88452
88560
  var feedAssigneeSchemaDefinition = external_exports.object({
@@ -88752,12 +88860,13 @@ var feedFileLinkInputSchemaDefinition = external_exports.object({
88752
88860
  var feedFileLinkInputSchema = feedFileLinkInputSchemaDefinition;
88753
88861
  var feedFileLinkSchemaDefinition = external_exports.object({ url: external_exports.string(), expiresAt: external_exports.iso.datetime() });
88754
88862
  var feedFileLinkSchema = feedFileLinkSchemaDefinition;
88755
- var feedTrpc = defineTrpcContract("feed").query("channelItems").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), channelId: external_exports.string().min(1) })).withOutput(external_exports.array(feedAgentItemSchema)).query("list").withInput(listFeedInputSchema).withOutput(feedViewSchema).query("card").withInput(itemRef).withOutput(feedCardViewSchema).query("fileLink").withInput(feedFileLinkInputSchema).withOutput(feedFileLinkSchema).query("count").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.object({ count: external_exports.number().int().nonnegative() })).query("decisions").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(feedDecisionsSchema).mutation("act").withInput(actFeedItemInputSchema).withOutput(feedItemSchema).mutation("comment").withInput(commentFeedItemInputSchema).withOutput(feedItemSchema).mutation("done").withInput(itemRef).withOutput(feedItemSchema).mutation("stopAutoSend").withInput(itemRef).withOutput(feedItemSchema).mutation("putBack").withInput(putBackFeedItemInputSchema).withOutput(feedItemSchema).mutation("snooze").withInput(snoozeFeedItemInputSchema).withOutput(feedItemSchema).mutation("unsnooze").withInput(itemRef).withOutput(feedItemSchema).mutation("saveDraft").withInput(saveFeedDraftInputSchema).withOutput(feedItemSchema).mutation("editItem").withInput(editFeedItemInputSchema).withOutput(feedItemSchema).mutation("saveMessage").withInput(saveFeedMessageInputSchema).withOutput(feedItemSchema).mutation("share").withInput(shareFeedItemInputSchema).withOutput(feedShareAnswerSchema).mutation("unshare").withInput(unshareFeedItemInputSchema).withOutput(feedShareAnswerSchema).query("shareCandidates").withInput(itemRef).withOutput(external_exports.array(feedSharePersonSchema)).mutation("answerApproval").withInput(answerFeedApprovalInputSchema).withOutput(feedItemSchema).mutation("decidePublish").withInput(decideFeedPublishInputSchema).withOutput(feedItemSchema).mutation("decideAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideServer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAppAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideComputer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentJoin").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentTransfer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).build();
88863
+ var feedTrpc = defineTrpcContract("feed").query("channelItems").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), channelId: external_exports.string().min(1) })).withOutput(external_exports.array(feedAgentItemSchema)).query("list").withInput(listFeedInputSchema).withOutput(feedViewSchema).query("card").withInput(itemRef).withOutput(feedCardViewSchema).query("fileLink").withInput(feedFileLinkInputSchema).withOutput(feedFileLinkSchema).query("count").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.object({ count: external_exports.number().int().nonnegative() })).query("decisions").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(feedDecisionsSchema).mutation("act").withInput(actFeedItemInputSchema).withOutput(feedItemSchema).mutation("comment").withInput(commentFeedItemInputSchema).withOutput(feedItemSchema).mutation("done").withInput(itemRef).withOutput(feedItemSchema).mutation("stopAutoSend").withInput(itemRef).withOutput(feedItemSchema).mutation("putBack").withInput(putBackFeedItemInputSchema).withOutput(feedItemSchema).mutation("snooze").withInput(snoozeFeedItemInputSchema).withOutput(feedItemSchema).mutation("unsnooze").withInput(itemRef).withOutput(feedItemSchema).mutation("saveDraft").withInput(saveFeedDraftInputSchema).withOutput(feedItemSchema).mutation("editItem").withInput(editFeedItemInputSchema).withOutput(feedItemSchema).mutation("saveMessage").withInput(saveFeedMessageInputSchema).withOutput(feedItemSchema).mutation("share").withInput(shareFeedItemInputSchema).withOutput(feedShareAnswerSchema).mutation("unshare").withInput(unshareFeedItemInputSchema).withOutput(feedShareAnswerSchema).query("shareCandidates").withInput(itemRef).withOutput(external_exports.array(feedSharePersonSchema)).mutation("answerApproval").withInput(answerFeedApprovalInputSchema).withOutput(feedItemSchema).mutation("decidePublish").withInput(decideFeedPublishInputSchema).withOutput(feedItemSchema).mutation("decideAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideServer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAppAccess").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideComputer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentJoin").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("decideAgentTransfer").withInput(decideFeedRequestInputSchema).withOutput(feedItemSchema).mutation("pin").withInput(pinFeedItemInputSchema).withOutput(feedItemSchema).query("delegates").withInput(external_exports.object({ workspaceId: external_exports.string().min(1) })).withOutput(external_exports.array(feedDelegateSchema)).mutation("setDelegate").withInput(setFeedDelegateInputSchema).withOutput(external_exports.array(feedDelegateSchema)).build();
88756
88864
  var feedUi = uiTokens("feed");
88757
88865
  var FeedNavSlot = feedUi.component("nav");
88758
88866
  var FeedDecisionsSlot = feedUi.component("decisions");
88759
88867
  var FeedCountHooksToken = feedUi.hooks("count");
88760
88868
  var FeedChannelCardSlot = feedUi.component("channel-card");
88869
+ var FeedDelegateSlot = feedUi.component("delegate");
88761
88870
  var FeedSearchSlot = feedUi.component("search");
88762
88871
 
88763
88872
  // ../../modules/feed/contract/src/feed.events.ts
@@ -89034,7 +89143,7 @@ async function feedAttachmentIdsOf({
89034
89143
  }
89035
89144
 
89036
89145
  // src/services/feed-commands.service.ts
89037
- var USAGE9 = `Usage:
89146
+ var USAGE10 = `Usage:
89038
89147
  laze feed post <title> [--channel <channel>] [--tag <tag>] [--summary <line>]
89039
89148
  [--draft <text|@file>] [--draft-header "To: ...\\nRe: ..."]
89040
89149
  [--metric <json|@file.json> | --table <csv|@file.csv>]
@@ -89062,10 +89171,16 @@ var USAGE9 = `Usage:
89062
89171
  laze feed decisions [--json]
89063
89172
  laze feed act <id> <actionId> [--draft <text|@file>]
89064
89173
  laze feed comment <id> <text> [--draft <text|@file>] [--force]
89065
- laze feed done|put-back|unsnooze <id>
89174
+ laze feed done|put-back|unsnooze|pin|unpin <id>
89066
89175
  laze feed snooze <id> --until <ISO time>
89067
89176
  laze feed channel <channelId>
89068
89177
 
89178
+ Managing your owner's feed: when your owner turned on Manage my feed for you (in your settings,
89179
+ or laze agent feed-access <you> on), laze feed list, count, decisions, done, put-back, snooze,
89180
+ unsnooze, pin and unpin work on their whole feed, cards from every agent included. Close what
89181
+ is stale, snooze what can wait, pin what matters. You never press actions, comment or answer
89182
+ approvals there: those stay your owner's. Each change shows on the card as yours.
89183
+
89069
89184
  ${FEED_WRITING}`;
89070
89185
  function flagsOf(args) {
89071
89186
  try {
@@ -89130,7 +89245,7 @@ function printItem({
89130
89245
  }
89131
89246
  async function feedPost({ context, args }) {
89132
89247
  const title = args.words.slice(2).join(" ").trim();
89133
- if (!title) throw new CliUsageError(USAGE9);
89248
+ if (!title) throw new CliUsageError(USAGE10);
89134
89249
  const flags2 = flagsOf(args);
89135
89250
  const { client } = await signedIn({ context, args });
89136
89251
  const channel = flagText({ args, name: "channel" });
@@ -89153,7 +89268,7 @@ async function feedPost({ context, args }) {
89153
89268
  }
89154
89269
  async function feedUpdate({ context, args }) {
89155
89270
  const itemId = args.words[2];
89156
- if (!itemId) throw new CliUsageError(USAGE9);
89271
+ if (!itemId) throw new CliUsageError(USAGE10);
89157
89272
  const flags2 = flagsOf(args);
89158
89273
  const { client } = await signedIn({ context, args });
89159
89274
  const body = await bodyOf2({ context, flags: flags2 });
@@ -89192,7 +89307,7 @@ async function feedUpdate({ context, args }) {
89192
89307
  async function feedReply({ context, args }) {
89193
89308
  const itemId = args.words[2];
89194
89309
  const text3 = args.words.slice(3).join(" ").trim();
89195
- if (!itemId || !text3) throw new CliUsageError(USAGE9);
89310
+ if (!itemId || !text3) throw new CliUsageError(USAGE10);
89196
89311
  const { client } = await signedIn({ context, args });
89197
89312
  const replied = await client.post("/api/feed/items/reply", {
89198
89313
  itemId,
@@ -89205,7 +89320,7 @@ async function feedReply({ context, args }) {
89205
89320
  }
89206
89321
  async function feedRead({ context, args }) {
89207
89322
  const itemId = args.words[2];
89208
- if (!itemId) throw new CliUsageError(USAGE9);
89323
+ if (!itemId) throw new CliUsageError(USAGE10);
89209
89324
  const { client } = await signedIn({ context, args });
89210
89325
  const read4 = await client.post("/api/feed/items/read", { itemId });
89211
89326
  printItem({ context, args, item: read4 });
@@ -89224,7 +89339,7 @@ async function feedClose({ context, args }) {
89224
89339
  const itemId = args.words[2];
89225
89340
  const loop = flagText({ args, name: "loop" });
89226
89341
  const note = flagText({ args, name: "note" });
89227
- if (!note || Boolean(itemId) === Boolean(loop)) throw new CliUsageError(USAGE9);
89342
+ if (!note || Boolean(itemId) === Boolean(loop)) throw new CliUsageError(USAGE10);
89228
89343
  const { client } = await signedIn({ context, args });
89229
89344
  const closed = await client.post("/api/feed/items/close", {
89230
89345
  ...itemId ? { itemId } : { loop },
@@ -89239,7 +89354,7 @@ function shareCommand({ move: move3 }) {
89239
89354
  const itemId = args.words[2];
89240
89355
  const all = args.flags.all === true;
89241
89356
  const people2 = args.lists.with ?? [];
89242
- if (people2.length === 0 || Boolean(itemId) === all) throw new CliUsageError(USAGE9);
89357
+ if (people2.length === 0 || Boolean(itemId) === all) throw new CliUsageError(USAGE10);
89243
89358
  const label3 = flagText({ args, name: "label" });
89244
89359
  const group = flagText({ args, name: "group" });
89245
89360
  const { client } = await signedIn({ context, args });
@@ -89282,7 +89397,7 @@ async function feedLoops({ context, args }) {
89282
89397
  }
89283
89398
  async function feedGroupSummary({ context, args }) {
89284
89399
  const group = args.words.slice(2).join(" ").trim();
89285
- if (!group) throw new CliUsageError(USAGE9);
89400
+ if (!group) throw new CliUsageError(USAGE10);
89286
89401
  const { client } = await signedIn({ context, args });
89287
89402
  const pointer = await client.post("/api/feed/group-summary", { group });
89288
89403
  if (args.flags.json) return context.out(`${JSON.stringify(pointer, null, 2)}
@@ -89296,7 +89411,9 @@ var PLACES = { open: "open", coming_up: "coming up", handled: "handled" };
89296
89411
  function printCard2({ context, item }) {
89297
89412
  const when = item.me.place === "coming_up" ? ` (back ${item.me.snoozedUntil ?? item.showAt ?? ""})` : "";
89298
89413
  const handled = item.me.place === "handled" && item.me.handledLabel;
89299
- context.out(`${item.id} ${item.tag} ${item.title}${when}${handled ? ` ${handled}` : ""}
89414
+ const pinned = item.me.pinned ? " (pinned)" : "";
89415
+ const shown2 = `${item.title}${pinned}${when}${handled ? ` ${handled}` : ""}`;
89416
+ context.out(`${item.id} ${item.tag} ${shown2}
89300
89417
  `);
89301
89418
  if (item.me.place === "handled") return;
89302
89419
  if (item.approval) context.out(" an approval: answer it in Laze\n");
@@ -89362,7 +89479,7 @@ async function feedDecisions({ context, args }) {
89362
89479
  }
89363
89480
  async function feedAct({ context, args }) {
89364
89481
  const [itemId, actionId] = [args.words[2], args.words[3]];
89365
- if (!itemId || !actionId) throw new CliUsageError(USAGE9);
89482
+ if (!itemId || !actionId) throw new CliUsageError(USAGE10);
89366
89483
  const draft = await textFlag({ context, args, name: "draft" });
89367
89484
  const { client } = await signedIn({ context, args });
89368
89485
  const item = await client.post("/api/feed/mine/act", {
@@ -89375,7 +89492,7 @@ async function feedAct({ context, args }) {
89375
89492
  async function feedComment({ context, args }) {
89376
89493
  const itemId = args.words[2];
89377
89494
  const text3 = args.words.slice(3).join(" ").trim();
89378
- if (!itemId || !text3) throw new CliUsageError(USAGE9);
89495
+ if (!itemId || !text3) throw new CliUsageError(USAGE10);
89379
89496
  const draft = await textFlag({ context, args, name: "draft" });
89380
89497
  const { client } = await signedIn({ context, args });
89381
89498
  const item = await client.post("/api/feed/mine/comment", {
@@ -89386,10 +89503,19 @@ async function feedComment({ context, args }) {
89386
89503
  });
89387
89504
  printMoved({ context, args, item });
89388
89505
  }
89506
+ function pinItem(pinned) {
89507
+ return async ({ context, args }) => {
89508
+ const itemId = args.words[2];
89509
+ if (!itemId) throw new CliUsageError(USAGE10);
89510
+ const { client } = await signedIn({ context, args });
89511
+ const item = await client.post("/api/feed/mine/pin", { itemId, pinned });
89512
+ printMoved({ context, args, item });
89513
+ };
89514
+ }
89389
89515
  function moveItem(path) {
89390
89516
  return async ({ context, args }) => {
89391
89517
  const itemId = args.words[2];
89392
- if (!itemId) throw new CliUsageError(USAGE9);
89518
+ if (!itemId) throw new CliUsageError(USAGE10);
89393
89519
  const { client } = await signedIn({ context, args });
89394
89520
  const item = await client.post(`/api/feed/mine/${path}`, { itemId });
89395
89521
  printMoved({ context, args, item });
@@ -89398,14 +89524,14 @@ function moveItem(path) {
89398
89524
  async function feedSnooze({ context, args }) {
89399
89525
  const itemId = args.words[2];
89400
89526
  const until = flagText({ args, name: "until" });
89401
- if (!itemId || !until) throw new CliUsageError(USAGE9);
89527
+ if (!itemId || !until) throw new CliUsageError(USAGE10);
89402
89528
  const { client } = await signedIn({ context, args });
89403
89529
  const item = await client.post("/api/feed/mine/snooze", { itemId, until });
89404
89530
  printMoved({ context, args, item });
89405
89531
  }
89406
89532
  async function feedChannel({ context, args }) {
89407
89533
  const channelId = args.words[2];
89408
- if (!channelId) throw new CliUsageError(USAGE9);
89534
+ if (!channelId) throw new CliUsageError(USAGE10);
89409
89535
  const { client } = await signedIn({ context, args });
89410
89536
  const items = await client.post("/api/feed/channel", { channelId });
89411
89537
  if (args.flags.json) return context.out(`${JSON.stringify(items, null, 2)}
@@ -89432,13 +89558,15 @@ var FEED_COMMANDS = {
89432
89558
  done: moveItem("done"),
89433
89559
  "put-back": moveItem("put-back"),
89434
89560
  unsnooze: moveItem("unsnooze"),
89561
+ pin: pinItem(true),
89562
+ unpin: pinItem(false),
89435
89563
  snooze: feedSnooze,
89436
89564
  channel: feedChannel
89437
89565
  };
89438
89566
  async function feed({ context, args }) {
89439
89567
  const name3 = args.words[1] ?? "";
89440
89568
  const command = Object.hasOwn(FEED_COMMANDS, name3) ? FEED_COMMANDS[name3] : void 0;
89441
- if (!command) throw new CliUsageError(USAGE9);
89569
+ if (!command) throw new CliUsageError(USAGE10);
89442
89570
  await command({ context, args });
89443
89571
  }
89444
89572
 
@@ -89681,7 +89809,7 @@ import { readFile as readFile34 } from "node:fs/promises";
89681
89809
  function timeOf2(iso3) {
89682
89810
  return `${iso3.slice(0, 10)} ${iso3.slice(11, 16)} UTC`;
89683
89811
  }
89684
- function linesOf2(output2) {
89812
+ function linesOf3(output2) {
89685
89813
  const live = (output2.live?.messages ?? []).map((message2) => ({
89686
89814
  at: message2.createdAt,
89687
89815
  author: message2.authorName,
@@ -89711,7 +89839,7 @@ function blockOf2(line) {
89711
89839
  return [head, ...body, ...replies].join("\n");
89712
89840
  }
89713
89841
  function olderCursorOf(output2) {
89714
- const oldest = linesOf2(output2)[0];
89842
+ const oldest = linesOf3(output2)[0];
89715
89843
  if (!oldest) return null;
89716
89844
  const more = output2.live ? output2.live.hasOlder : output2.laze.hasOlder || output2.laze.liveBefore !== null;
89717
89845
  return more ? oldest.cursor : null;
@@ -89720,7 +89848,7 @@ function formatHistory(output2) {
89720
89848
  const { laze } = output2;
89721
89849
  const where = laze.channelName ? `#${laze.channelName}` : laze.channelId;
89722
89850
  const from = laze.mirror ? ` (mirrors ${laze.mirror.label})` : "";
89723
- const lines2 = linesOf2(output2);
89851
+ const lines2 = linesOf3(output2);
89724
89852
  if (lines2.length === 0) return `${where}${from}: no messages.
89725
89853
  `;
89726
89854
  const count5 = lines2.length === 1 ? "1 message" : `${lines2.length} messages`;
@@ -90705,7 +90833,7 @@ function machineAccessCommand(name3) {
90705
90833
  }
90706
90834
 
90707
90835
  // src/services/machine-commands.service.ts
90708
- var USAGE10 = [
90836
+ var USAGE11 = [
90709
90837
  "Usage: laze machine connect <name> the command to run on your own machine (people)",
90710
90838
  " laze machine connect <name> --again a new command for a machine you connected; the old code stops working",
90711
90839
  " laze machine connect <name> --ssh <user>@<host>[:port] a machine that cannot run the connector, over SSH (people)",
@@ -90751,7 +90879,7 @@ function listLine(machine2) {
90751
90879
  var EXEC_ENV_MAX = 32;
90752
90880
  function machineArg2({ args }) {
90753
90881
  const machine2 = args.words[2];
90754
- if (!machine2) throw new CliUsageError(USAGE10);
90882
+ if (!machine2) throw new CliUsageError(USAGE11);
90755
90883
  return machine2;
90756
90884
  }
90757
90885
  async function connect4({ context, args }) {
@@ -90777,7 +90905,7 @@ async function connectSsh({
90777
90905
  }) {
90778
90906
  const ssh = flagText({ args, name: "ssh" });
90779
90907
  if (!ssh) throw new CliUsageError(`--ssh takes <user>@<host>[:port]
90780
- ${USAGE10}`);
90908
+ ${USAGE11}`);
90781
90909
  const client = await computeClient({ context, args });
90782
90910
  const made = await client.post(COMPUTE_REST_PATHS.connectSsh, {
90783
90911
  name: name3,
@@ -90853,11 +90981,11 @@ async function exec({
90853
90981
  }) {
90854
90982
  const machine2 = machineArg2({ args });
90855
90983
  const command = commandText({ rest: args.rest });
90856
- if (!command.trim()) throw new CliUsageError(USAGE10);
90984
+ if (!command.trim()) throw new CliUsageError(USAGE11);
90857
90985
  const timeout = flagText({ args, name: "timeout" });
90858
90986
  if (timeout && !(Number(timeout) >= 1))
90859
90987
  throw new CliUsageError(`--timeout takes a number of seconds
90860
- ${USAGE10}`);
90988
+ ${USAGE11}`);
90861
90989
  const released = await vaultEnv({ context, args });
90862
90990
  if ("exitCode" in released) return released.exitCode;
90863
90991
  const client = await computeClient({ context, args });
@@ -90885,11 +91013,11 @@ async function vaultEnv({
90885
91013
  const connections = args.lists.vault ?? [];
90886
91014
  if (args.flags.vault === true)
90887
91015
  throw new CliUsageError(`--vault takes a connection name
90888
- ${USAGE10}`);
91016
+ ${USAGE11}`);
90889
91017
  if (connections.length === 0) return {};
90890
91018
  const reason = flagText({ args, name: "reason" });
90891
91019
  if (!reason) throw new CliUsageError(`Say why with --reason "<one plain sentence>"
90892
- ${USAGE10}`);
91020
+ ${USAGE11}`);
90893
91021
  const env = {};
90894
91022
  for (const connection of new Set(connections)) {
90895
91023
  const released = await vaultRelease({ context, args, connection, reason, command: args.rest });
@@ -90909,11 +91037,11 @@ ${USAGE10}`);
90909
91037
  async function host({ context, args }) {
90910
91038
  const machineName = args.words[2];
90911
91039
  const agent3 = args.words[3];
90912
- if (!machineName || !agent3) throw new CliUsageError(USAGE10);
91040
+ if (!machineName || !agent3) throw new CliUsageError(USAGE11);
90913
91041
  const whenOffline = flagText({ args, name: "when-offline", fallback: "wait" });
90914
91042
  if (whenOffline !== "wait" && whenOffline !== "computer" && whenOffline !== "sandbox")
90915
91043
  throw new CliUsageError(`--when-offline takes wait or computer
90916
- ${USAGE10}`);
91044
+ ${USAGE11}`);
90917
91045
  const client = await computeClient({ context, args });
90918
91046
  const machine2 = await client.post(COMPUTE_REST_PATHS.host, {
90919
91047
  machine: machineName,
@@ -90930,7 +91058,7 @@ ${USAGE10}`);
90930
91058
  }
90931
91059
  async function unhost({ context, args }) {
90932
91060
  const agent3 = args.words[2];
90933
- if (!agent3) throw new CliUsageError(USAGE10);
91061
+ if (!agent3) throw new CliUsageError(USAGE11);
90934
91062
  const client = await computeClient({ context, args });
90935
91063
  const done = await client.post(COMPUTE_REST_PATHS.unhost, { agent: agent3 });
90936
91064
  if (args.flags.json) return context.out(`${JSON.stringify(done, null, 2)}
@@ -90967,7 +91095,7 @@ async function machine({ context, args }) {
90967
91095
  if (command === "unhost") return unhost({ context, args });
90968
91096
  const access = machineAccessCommand(command);
90969
91097
  if (access) return access({ context, args });
90970
- throw new CliUsageError(USAGE10);
91098
+ throw new CliUsageError(USAGE11);
90971
91099
  }
90972
91100
 
90973
91101
  // src/services/mcp-server.service.ts
@@ -91257,7 +91385,7 @@ async function writeMount({
91257
91385
  }
91258
91386
 
91259
91387
  // src/services/memory-commands.service.ts
91260
- var USAGE11 = `Usage:
91388
+ var USAGE12 = `Usage:
91261
91389
  laze memory get SOUL.md|AGENTS.md|MEMORY.md [--channel <channel>]
91262
91390
  laze memory set <file> <text|@file|-> [--channel <channel>] [--base <version>]
91263
91391
  laze memory append MEMORY.md <text|@file|-> [--channel <channel>]
@@ -91283,7 +91411,7 @@ var PROVENANCES = ["said", "decided", "verified", "inferred", "observed"];
91283
91411
  var FILES = /* @__PURE__ */ new Set(["SOUL.md", "AGENTS.md", "MEMORY.md"]);
91284
91412
  function fileRef({ context, args }) {
91285
91413
  const file3 = args.words[2] ?? "";
91286
- if (!FILES.has(file3)) throw new CliUsageError(USAGE11);
91414
+ if (!FILES.has(file3)) throw new CliUsageError(USAGE12);
91287
91415
  const channel = turnChannel({ context, args });
91288
91416
  return { file: file3, ...channel ? { channel } : {} };
91289
91417
  }
@@ -91322,7 +91450,7 @@ async function memoryHistory({ context, args }) {
91322
91450
  async function memorySet({ context, args }) {
91323
91451
  const ref = fileRef({ context, args });
91324
91452
  const value = args.words.slice(3).join(" ");
91325
- if (!value) throw new CliUsageError(USAGE11);
91453
+ if (!value) throw new CliUsageError(USAGE12);
91326
91454
  const content = await textArgument({ context, value });
91327
91455
  const base = args.flags.base;
91328
91456
  const { client } = await signedIn({ context, args });
@@ -91338,7 +91466,7 @@ async function memorySet({ context, args }) {
91338
91466
  async function memoryAppend({ context, args }) {
91339
91467
  const ref = fileRef({ context, args });
91340
91468
  const value = args.words.slice(3).join(" ");
91341
- if (!value) throw new CliUsageError(USAGE11);
91469
+ if (!value) throw new CliUsageError(USAGE12);
91342
91470
  const text3 = await textArgument({ context, value });
91343
91471
  const { client } = await signedIn({ context, args });
91344
91472
  const saved3 = await client.post("/api/memory/append", { ...ref, text: text3 });
@@ -91348,7 +91476,7 @@ async function memoryAppend({ context, args }) {
91348
91476
  }
91349
91477
  async function memorySearch({ context, args }) {
91350
91478
  const query = args.words.slice(2).join(" ").trim();
91351
- if (!query) throw new CliUsageError(USAGE11);
91479
+ if (!query) throw new CliUsageError(USAGE12);
91352
91480
  const { client } = await signedIn({ context, args });
91353
91481
  const hits = await client.post("/api/memory/search", { query });
91354
91482
  if (args.flags.json) return context.out(`${JSON.stringify(hits, null, 2)}
@@ -91373,7 +91501,7 @@ async function memoryPull({ context, args }) {
91373
91501
  }
91374
91502
  function logTarget({ context, args }) {
91375
91503
  const layer = flagText({ args, name: "layer", fallback: "person" });
91376
- if (layer !== "person" && layer !== "agent") throw new CliUsageError(USAGE11);
91504
+ if (layer !== "person" && layer !== "agent") throw new CliUsageError(USAGE12);
91377
91505
  const channel = turnChannel({ context, args });
91378
91506
  const turn = (context.environment.inherited.LAZE_TURN_MESSAGES ?? "").split(",").map((id2) => id2.trim()).filter(Boolean);
91379
91507
  const message2 = flagText({ args, name: "message" }) || turn.at(-1) || "";
@@ -91399,7 +91527,7 @@ async function taggedLine({
91399
91527
  const [tag] = given;
91400
91528
  const value = args.flags[tag];
91401
91529
  const raw = typeof value === "string" ? value : args.words.slice(from).join(" ");
91402
- if (!raw.trim()) throw new CliUsageError(USAGE11);
91530
+ if (!raw.trim()) throw new CliUsageError(USAGE12);
91403
91531
  const text3 = await textArgument({ context, value: raw });
91404
91532
  return { tag, text: text3, pins: [...args.lists.pin ?? []] };
91405
91533
  }
@@ -91432,12 +91560,12 @@ async function logCall({
91432
91560
  }
91433
91561
  function entryId(args) {
91434
91562
  const id2 = Number((args.words[2] ?? "").replace(/^#/, ""));
91435
- if (!Number.isInteger(id2) || id2 < 0) throw new CliUsageError(USAGE11);
91563
+ if (!Number.isInteger(id2) || id2 < 0) throw new CliUsageError(USAGE12);
91436
91564
  return id2;
91437
91565
  }
91438
91566
  function blockArg(args) {
91439
91567
  const block2 = (args.words[2] ?? "").replace(/^#/, "");
91440
- if (!block2) throw new CliUsageError(USAGE11);
91568
+ if (!block2) throw new CliUsageError(USAGE12);
91441
91569
  return block2;
91442
91570
  }
91443
91571
  async function memoryNote({ context, args }) {
@@ -91455,7 +91583,7 @@ async function memoryRemove({ context, args }) {
91455
91583
  async function memoryNap({ context, args }) {
91456
91584
  const block2 = (args.words[2] ?? "").replace(/^#/, "");
91457
91585
  const text3 = args.words.slice(3).join(" ");
91458
- if (block2 && !text3) throw new CliUsageError(USAGE11);
91586
+ if (block2 && !text3) throw new CliUsageError(USAGE12);
91459
91587
  const line = text3 ? await textArgument({ context, value: text3 }) : "";
91460
91588
  await logCall({ context, args, path: "nap", body: block2 ? { block: block2, text: line } : {} });
91461
91589
  }
@@ -91467,7 +91595,7 @@ async function memoryForget({ context, args }) {
91467
91595
  }
91468
91596
  async function memoryRecall({ context, args }) {
91469
91597
  const query = args.words.slice(2).join(" ").trim();
91470
- if (!query) throw new CliUsageError(USAGE11);
91598
+ if (!query) throw new CliUsageError(USAGE12);
91471
91599
  await logCall({ context, args, path: "recall", body: { query } });
91472
91600
  }
91473
91601
  async function memoryWake({ context, args }) {
@@ -91513,7 +91641,7 @@ async function memoryImport({ context, args }) {
91513
91641
  const siesta = flagText({ args, name: "siesta" });
91514
91642
  if (siesta) return siestaImport({ context, args, dir: siesta });
91515
91643
  const dir = flagText({ args, name: "optmem" });
91516
- if (!dir) throw new CliUsageError(USAGE11);
91644
+ if (!dir) throw new CliUsageError(USAGE12);
91517
91645
  const root = resolve17(context.cwd, dir);
91518
91646
  const log = await readFile37(join26(root, "LOG.txt"));
91519
91647
  const sizes2 = (await readdir7(join26(root, "TREE")).catch(() => [])).filter(
@@ -91555,13 +91683,13 @@ var MEMORY_COMMANDS = {
91555
91683
  async function memory({ context, args }) {
91556
91684
  const name3 = args.words[1] ?? "";
91557
91685
  const command = Object.hasOwn(MEMORY_COMMANDS, name3) ? MEMORY_COMMANDS[name3] : void 0;
91558
- if (!command) throw new CliUsageError(USAGE11);
91686
+ if (!command) throw new CliUsageError(USAGE12);
91559
91687
  await command({ context, args });
91560
91688
  }
91561
91689
 
91562
91690
  // src/services/models-commands.service.ts
91563
91691
  var WINDOWS = ["day", "week", "month"];
91564
- var USAGE12 = `Usage:
91692
+ var USAGE13 = `Usage:
91565
91693
  laze models policy whether Laze models are on, the default budget and the cap
91566
91694
  laze models set-policy [on|off] [--default-day <usd|none>] [--cap-day <usd|none>] ... (admins)
91567
91695
  --default-week, --default-month, --cap-week and --cap-month set the other windows
@@ -91586,7 +91714,7 @@ function limitsFrom({
91586
91714
  const value = text3 === "none" ? null : Number(text3);
91587
91715
  if (value !== null && (!Number.isFinite(value) || value < 0))
91588
91716
  throw new CliUsageError(`--${prefix}${window2} takes an amount in USD or none.
91589
- ${USAGE12}`);
91717
+ ${USAGE13}`);
91590
91718
  next[window2] = value;
91591
91719
  changed = true;
91592
91720
  }
@@ -91611,12 +91739,12 @@ async function showPolicy({ context, args }) {
91611
91739
  }
91612
91740
  async function setPolicy({ context, args }) {
91613
91741
  const state = args.words[2];
91614
- if (state !== void 0 && state !== "on" && state !== "off") throw new CliUsageError(USAGE12);
91742
+ if (state !== void 0 && state !== "on" && state !== "off") throw new CliUsageError(USAGE13);
91615
91743
  const { client } = await signedIn({ context, args });
91616
91744
  const current3 = await client.get("/api/models/policy");
91617
91745
  const defaultBudget = limitsFrom({ args, prefix: "default-", current: current3.defaultBudget });
91618
91746
  const cap = limitsFrom({ args, prefix: "cap-", current: current3.cap });
91619
- if (!state && !defaultBudget && !cap) throw new CliUsageError(USAGE12);
91747
+ if (!state && !defaultBudget && !cap) throw new CliUsageError(USAGE13);
91620
91748
  const updated = await client.post("/api/models/policy", {
91621
91749
  ...state ? { lazeModels: state === "on" } : {},
91622
91750
  ...defaultBudget ? { defaultBudget } : {},
@@ -91657,11 +91785,11 @@ async function agentNamed({ client, name: name3 }) {
91657
91785
  }
91658
91786
  async function setBudget({ context, args }) {
91659
91787
  const name3 = args.words[2];
91660
- if (!name3) throw new CliUsageError(USAGE12);
91788
+ if (!name3) throw new CliUsageError(USAGE13);
91661
91789
  const { client } = await signedIn({ context, args });
91662
91790
  const agent3 = await agentNamed({ client, name: name3 });
91663
91791
  const next = limitsFrom({ args, prefix: "", current: agent3.budget });
91664
- if (!next) throw new CliUsageError(USAGE12);
91792
+ if (!next) throw new CliUsageError(USAGE13);
91665
91793
  const updated = await client.post("/api/models/agents/budget", {
91666
91794
  agentId: agent3.agentId,
91667
91795
  budget: next
@@ -91694,7 +91822,7 @@ var MODEL_COMMANDS = {
91694
91822
  async function models({ context, args }) {
91695
91823
  const name3 = args.words[1] ?? "policy";
91696
91824
  const command = Object.hasOwn(MODEL_COMMANDS, name3) ? MODEL_COMMANDS[name3] : void 0;
91697
- if (!command) throw new CliUsageError(USAGE12);
91825
+ if (!command) throw new CliUsageError(USAGE13);
91698
91826
  await command({ context, args });
91699
91827
  }
91700
91828
 
@@ -91772,7 +91900,7 @@ var monitorResume = stateRun("/api/agents/monitors/resume", "resume");
91772
91900
  var monitorRemove = stateRun("/api/agents/monitors/remove", "rm");
91773
91901
 
91774
91902
  // src/services/notification-commands.service.ts
91775
- var USAGE13 = `Usage:
91903
+ var USAGE14 = `Usage:
91776
91904
  laze notifications [show] your notification settings (people)
91777
91905
  laze notifications set [--channels all|mentions|nothing] [--keywords a,b] [--dnd on|off]
91778
91906
  [--dnd-from 22:00] [--dnd-to 08:00] [--tz <IANA zone>] [--push on|off] [--email on|off]
@@ -91801,14 +91929,14 @@ function switchOf({ args, name: name3 }) {
91801
91929
  if (!text3) return void 0;
91802
91930
  if (text3 !== "on" && text3 !== "off")
91803
91931
  throw new CliUsageError(`--${name3} takes on or off.
91804
- ${USAGE13}`);
91932
+ ${USAGE14}`);
91805
91933
  return text3 === "on";
91806
91934
  }
91807
91935
  function changesOf(args) {
91808
91936
  const channels3 = flagText({ args, name: "channels" });
91809
91937
  if (channels3 && !["all", "mentions", "nothing"].includes(channels3))
91810
91938
  throw new CliUsageError(`--channels takes all, mentions or nothing.
91811
- ${USAGE13}`);
91939
+ ${USAGE14}`);
91812
91940
  const keywords = typeof args.flags.keywords === "string" ? args.flags.keywords : void 0;
91813
91941
  const emailAfter = flagText({ args, name: "email-after" });
91814
91942
  const changes2 = {
@@ -91830,7 +91958,7 @@ async function showSettings({ context, args }) {
91830
91958
  }
91831
91959
  async function setSettings({ context, args }) {
91832
91960
  const changes2 = changesOf(args);
91833
- if (Object.keys(changes2).length === 0) throw new CliUsageError(USAGE13);
91961
+ if (Object.keys(changes2).length === 0) throw new CliUsageError(USAGE14);
91834
91962
  const { client } = await signedIn({ context, args });
91835
91963
  print8({
91836
91964
  context,
@@ -91841,7 +91969,7 @@ async function setSettings({ context, args }) {
91841
91969
  async function snoozeFor({ context, args }) {
91842
91970
  const word3 = args.words[2];
91843
91971
  const minutes = word3 === "off" ? 0 : Number(word3);
91844
- if (!word3 || !Number.isInteger(minutes) || minutes < 0) throw new CliUsageError(USAGE13);
91972
+ if (!word3 || !Number.isInteger(minutes) || minutes < 0) throw new CliUsageError(USAGE14);
91845
91973
  const { client } = await signedIn({ context, args });
91846
91974
  print8({
91847
91975
  context,
@@ -91859,7 +91987,7 @@ var NOTIFICATION_COMMANDS = {
91859
91987
  async function notifications({ context, args }) {
91860
91988
  const name3 = args.words[1] ?? "show";
91861
91989
  const command = Object.hasOwn(NOTIFICATION_COMMANDS, name3) ? NOTIFICATION_COMMANDS[name3] : void 0;
91862
- if (!command) throw new CliUsageError(USAGE13);
91990
+ if (!command) throw new CliUsageError(USAGE14);
91863
91991
  await command({ context, args });
91864
91992
  }
91865
91993
 
@@ -92369,7 +92497,7 @@ async function rushWakeHook({ context, args }) {
92369
92497
  }
92370
92498
 
92371
92499
  // src/services/schedule-commands.service.ts
92372
- var USAGE14 = `Usage:
92500
+ var USAGE15 = `Usage:
92373
92501
  laze schedule add <name> --prompt <text> (--cron "<m h dom mon dow>" | --rrule "<RRULE>" | --at <local time>)
92374
92502
  [--tz <IANA zone>] [--channel <channelId>] [--agent <agentId>]
92375
92503
  laze schedule list
@@ -92385,7 +92513,7 @@ function timingOf(args) {
92385
92513
  const given = [cron, rrule, at].filter(Boolean);
92386
92514
  if (given.length !== 1)
92387
92515
  throw new CliUsageError(`Give exactly one of --cron, --rrule or --at.
92388
- ${USAGE14}`);
92516
+ ${USAGE15}`);
92389
92517
  if (cron) return { kind: "cron", cron };
92390
92518
  if (rrule) return { kind: "rrule", rrule };
92391
92519
  return { kind: "once", at };
@@ -92400,7 +92528,7 @@ function printSchedule({ context, schedule: schedule2 }) {
92400
92528
  async function scheduleAdd({ context, args }) {
92401
92529
  const name3 = args.words.slice(2).join(" ").trim();
92402
92530
  const prompt = flagText({ args, name: "prompt" });
92403
- if (!name3 || !prompt) throw new CliUsageError(USAGE14);
92531
+ if (!name3 || !prompt) throw new CliUsageError(USAGE15);
92404
92532
  const timing = timingOf(args);
92405
92533
  const { client } = await signedIn({ context, args });
92406
92534
  const channelId = flagText({ args, name: "channel" });
@@ -92437,7 +92565,7 @@ function changesOf2(args) {
92437
92565
  async function scheduleUpdate({ context, args }) {
92438
92566
  const scheduleId = args.words[2];
92439
92567
  const changes2 = changesOf2(args);
92440
- if (!scheduleId || Object.keys(changes2).length === 0) throw new CliUsageError(USAGE14);
92568
+ if (!scheduleId || Object.keys(changes2).length === 0) throw new CliUsageError(USAGE15);
92441
92569
  const { client } = await signedIn({ context, args });
92442
92570
  const schedule2 = await client.post("/api/schedules/update", { scheduleId, ...changes2 });
92443
92571
  if (args.flags.json) return context.out(`${JSON.stringify(schedule2, null, 2)}
@@ -92454,7 +92582,7 @@ async function scheduleList({ context, args }) {
92454
92582
  function byId(path) {
92455
92583
  return async ({ context, args }) => {
92456
92584
  const scheduleId = args.words[2];
92457
- if (!scheduleId) throw new CliUsageError(USAGE14);
92585
+ if (!scheduleId) throw new CliUsageError(USAGE15);
92458
92586
  const { client } = await signedIn({ context, args });
92459
92587
  const answer6 = await client.post(`/api/schedules/${path}`, {
92460
92588
  scheduleId
@@ -92468,7 +92596,7 @@ function byId(path) {
92468
92596
  }
92469
92597
  async function scheduleRuns({ context, args }) {
92470
92598
  const scheduleId = args.words[2];
92471
- if (!scheduleId) throw new CliUsageError(USAGE14);
92599
+ if (!scheduleId) throw new CliUsageError(USAGE15);
92472
92600
  const { client } = await signedIn({ context, args });
92473
92601
  const runs = await client.post("/api/schedules/runs", { scheduleId });
92474
92602
  if (args.flags.json) return context.out(`${JSON.stringify(runs, null, 2)}
@@ -92482,7 +92610,7 @@ async function scheduleRuns({ context, args }) {
92482
92610
  }
92483
92611
  async function scheduleRun({ context, args }) {
92484
92612
  const scheduleId = args.words[2];
92485
- if (!scheduleId) throw new CliUsageError(USAGE14);
92613
+ if (!scheduleId) throw new CliUsageError(USAGE15);
92486
92614
  const { client } = await signedIn({ context, args });
92487
92615
  const run4 = await client.post("/api/schedules/run", { scheduleId });
92488
92616
  if (args.flags.json) return context.out(`${JSON.stringify(run4, null, 2)}
@@ -92503,14 +92631,14 @@ var SCHEDULE_COMMANDS = {
92503
92631
  async function schedule({ context, args }) {
92504
92632
  const name3 = args.words[1] ?? "";
92505
92633
  const command = Object.hasOwn(SCHEDULE_COMMANDS, name3) ? SCHEDULE_COMMANDS[name3] : void 0;
92506
- if (!command) throw new CliUsageError(USAGE14);
92634
+ if (!command) throw new CliUsageError(USAGE15);
92507
92635
  await command({ context, args });
92508
92636
  }
92509
92637
 
92510
92638
  // src/services/skill-commands.service.ts
92511
92639
  import { readdir as readdir8, readFile as readFile40 } from "node:fs/promises";
92512
92640
  import { join as join28, relative as relative6, resolve as resolve19 } from "node:path";
92513
- var USAGE15 = `Usage:
92641
+ var USAGE16 = `Usage:
92514
92642
  laze skill list [--agent <agentId>]
92515
92643
  laze skill install <catalogue-id> [--as <name>] [--agent <agentId>]
92516
92644
  laze skill install --from <folder> [--as <name>] [--agent <agentId>] a folder with a SKILL.md
@@ -92559,7 +92687,7 @@ async function skillList({ context, args }) {
92559
92687
  async function skillInstall({ context, args }) {
92560
92688
  const catalogueId = args.words[2];
92561
92689
  const from = flagText({ args, name: "from" });
92562
- if (!catalogueId === !from) throw new CliUsageError(USAGE15);
92690
+ if (!catalogueId === !from) throw new CliUsageError(USAGE16);
92563
92691
  const name3 = flagText({ args, name: "as" });
92564
92692
  const agent3 = flagText({ args, name: "agent" });
92565
92693
  const files2 = from ? await folderFiles({ root: resolve19(context.cwd, from) }) : void 0;
@@ -92577,7 +92705,7 @@ async function skillInstall({ context, args }) {
92577
92705
  }
92578
92706
  async function skillShow({ context, args }) {
92579
92707
  const name3 = args.words[2];
92580
- if (!name3) throw new CliUsageError(USAGE15);
92708
+ if (!name3) throw new CliUsageError(USAGE16);
92581
92709
  const agent3 = flagText({ args, name: "agent" });
92582
92710
  const { client } = await signedIn({ context, args });
92583
92711
  const skill2 = await client.post("/api/skills/show", {
@@ -92610,7 +92738,7 @@ function agentFlag(args) {
92610
92738
  }
92611
92739
  async function skillRemove({ context, args }) {
92612
92740
  const name3 = args.words[2];
92613
- if (!name3) throw new CliUsageError(USAGE15);
92741
+ if (!name3) throw new CliUsageError(USAGE16);
92614
92742
  const { client } = await signedIn({ context, args });
92615
92743
  const removed = await client.post("/api/skills/remove", {
92616
92744
  name: name3,
@@ -92627,7 +92755,7 @@ async function skillUpdate({ context, args }) {
92627
92755
  const description = typeof args.flags.description === "string" ? args.flags.description : void 0;
92628
92756
  const skillMdFile = flagText({ args, name: "skill-md" });
92629
92757
  if (!name3 || !newName && description === void 0 && !skillMdFile) {
92630
- throw new CliUsageError(USAGE15);
92758
+ throw new CliUsageError(USAGE16);
92631
92759
  }
92632
92760
  const skillMd = skillMdFile ? await readFile40(resolve19(context.cwd, skillMdFile), "utf8") : void 0;
92633
92761
  const { client } = await signedIn({ context, args });
@@ -92646,7 +92774,7 @@ async function skillUpdate({ context, args }) {
92646
92774
  function pinning({ unpin }) {
92647
92775
  return async ({ context, args }) => {
92648
92776
  const name3 = args.words[2];
92649
- if (!name3) throw new CliUsageError(USAGE15);
92777
+ if (!name3) throw new CliUsageError(USAGE16);
92650
92778
  const { client } = await signedIn({ context, args });
92651
92779
  const path = unpin ? "/api/skills/unpin" : "/api/skills/pin";
92652
92780
  const skill2 = await client.post(path, { name: name3, ...agentFlag(args) });
@@ -92670,7 +92798,7 @@ var SKILL_COMMANDS = {
92670
92798
  async function skill({ context, args }) {
92671
92799
  const name3 = args.words[1] ?? "";
92672
92800
  const command = Object.hasOwn(SKILL_COMMANDS, name3) ? SKILL_COMMANDS[name3] : void 0;
92673
- if (!command) throw new CliUsageError(USAGE15);
92801
+ if (!command) throw new CliUsageError(USAGE16);
92674
92802
  await command({ context, args });
92675
92803
  }
92676
92804
 
@@ -93281,11 +93409,11 @@ function statusLine2({ presence: presence2 }) {
93281
93409
  }
93282
93410
 
93283
93411
  // src/services/status-commands.service.ts
93284
- var USAGE16 = "Usage: laze status set <emoji> [text] [--for 30m|1h|4h|today|week|never] [--tz <zone>], laze status clear|away|active";
93412
+ var USAGE17 = "Usage: laze status set <emoji> [text] [--for 30m|1h|4h|today|week|never] [--tz <zone>], laze status clear|away|active";
93285
93413
  function clearAfterOf({ args }) {
93286
93414
  const wanted = flagText({ args, name: "for", fallback: "never" });
93287
93415
  const known = STATUS_CLEAR_AFTER.find((candidate) => candidate === wanted);
93288
- if (!known) throw new CliUsageError(USAGE16);
93416
+ if (!known) throw new CliUsageError(USAGE17);
93289
93417
  return known;
93290
93418
  }
93291
93419
  function answer5({
@@ -93299,7 +93427,7 @@ function answer5({
93299
93427
  }
93300
93428
  async function statusSet({ context, args }) {
93301
93429
  const [, , emoji4, ...words] = args.words;
93302
- if (!emoji4) throw new CliUsageError(USAGE16);
93430
+ if (!emoji4) throw new CliUsageError(USAGE17);
93303
93431
  const clearAfter = clearAfterOf({ args });
93304
93432
  const timeZone = flagText({ args, name: "tz" }) || Intl.DateTimeFormat().resolvedOptions().timeZone;
93305
93433
  const { client } = await signedIn({ context, args });
@@ -93323,7 +93451,7 @@ async function statusAway({ context, args }) {
93323
93451
  answer5({ context, args, presence: presence2 });
93324
93452
  }
93325
93453
  async function statusUsage() {
93326
- throw new CliUsageError(USAGE16);
93454
+ throw new CliUsageError(USAGE17);
93327
93455
  }
93328
93456
 
93329
93457
  // src/services/update-commands.service.ts
@@ -94829,7 +94957,7 @@ var PATHS3 = {
94829
94957
  var STATUS_WAIT_SECONDS2 = 50;
94830
94958
  var STATUS_CALLS2 = 2;
94831
94959
  var SETTLED = /* @__PURE__ */ new Set(["sent", "denied", "expired", "failed"]);
94832
- var USAGE17 = [
94960
+ var USAGE18 = [
94833
94961
  "Usage: laze whatsapp chats <machine> [--limit <n>] the chats on the machine, newest first",
94834
94962
  " laze whatsapp read <machine> <chat> [--limit <n>] a chat's last messages, oldest first",
94835
94963
  ' laze whatsapp send <machine> <chat> "<text>" send as the owner; an agent waits for their approval',
@@ -94839,14 +94967,14 @@ var USAGE17 = [
94839
94967
  ].join("\n");
94840
94968
  function word2({ args, at }) {
94841
94969
  const value = args.words[at];
94842
- if (!value) throw new CliUsageError(USAGE17);
94970
+ if (!value) throw new CliUsageError(USAGE18);
94843
94971
  return value;
94844
94972
  }
94845
94973
  function limitOf5({ args }) {
94846
94974
  const text3 = flagText({ args, name: "limit" });
94847
94975
  if (!text3) return {};
94848
94976
  const limit = Number(text3);
94849
- if (!Number.isInteger(limit) || limit < 1) throw new CliUsageError(USAGE17);
94977
+ if (!Number.isInteger(limit) || limit < 1) throw new CliUsageError(USAGE18);
94850
94978
  return { limit };
94851
94979
  }
94852
94980
  async function chats({ context, args }) {
@@ -94908,7 +95036,7 @@ Still waiting. Run \`laze whatsapp status ${send5.id}\` later to see the answer.
94908
95036
  }
94909
95037
  async function send4({ context, args }) {
94910
95038
  const text3 = args.words.slice(4).join(" ") || args.rest.join(" ");
94911
- if (!text3) throw new CliUsageError(USAGE17);
95039
+ if (!text3) throw new CliUsageError(USAGE18);
94912
95040
  const client = await computeClient({ context, args });
94913
95041
  const asked = await client.post(PATHS3.send, {
94914
95042
  machine: word2({ args, at: 2 }),
@@ -94938,11 +95066,11 @@ async function whatsapp({
94938
95066
  if (command === "status") return status10({ context, args });
94939
95067
  const linking = whatsappPairingCommand(command);
94940
95068
  if (linking) return linking({ context, args });
94941
- throw new CliUsageError(USAGE17);
95069
+ throw new CliUsageError(USAGE18);
94942
95070
  }
94943
95071
 
94944
95072
  // src/services/wiki-commands.service.ts
94945
- var USAGE18 = `Usage:
95073
+ var USAGE19 = `Usage:
94946
95074
  laze wiki list
94947
95075
  laze wiki get <path>
94948
95076
  laze wiki put <path> <markdown|@file|-> [--title <title>] [--channel <channel>] [--base <version>]
@@ -94962,7 +95090,7 @@ async function wikiList({ context, args }) {
94962
95090
  }
94963
95091
  async function wikiGet({ context, args }) {
94964
95092
  const path = args.words[2];
94965
- if (!path) throw new CliUsageError(USAGE18);
95093
+ if (!path) throw new CliUsageError(USAGE19);
94966
95094
  const { client } = await signedIn({ context, args });
94967
95095
  const page = await client.post("/api/wiki/get", { path });
94968
95096
  if (args.flags.json) return context.out(`${JSON.stringify(page, null, 2)}
@@ -94979,7 +95107,7 @@ Linked from: ${page.backlinks.map((link2) => link2.path).join(", ")}
94979
95107
  async function wikiPut({ context, args }) {
94980
95108
  const path = args.words[2];
94981
95109
  const value = args.words.slice(3).join(" ");
94982
- if (!path || !value) throw new CliUsageError(USAGE18);
95110
+ if (!path || !value) throw new CliUsageError(USAGE19);
94983
95111
  const body = await textArgument({ context, value });
94984
95112
  const title = flagText({ args, name: "title" });
94985
95113
  const channel = flagText({ args, name: "channel" });
@@ -94999,7 +95127,7 @@ async function wikiPut({ context, args }) {
94999
95127
  }
95000
95128
  async function wikiSearch({ context, args }) {
95001
95129
  const query = args.words.slice(2).join(" ").trim();
95002
- if (!query) throw new CliUsageError(USAGE18);
95130
+ if (!query) throw new CliUsageError(USAGE19);
95003
95131
  const { client } = await signedIn({ context, args });
95004
95132
  const hits = await client.post("/api/wiki/search", { query });
95005
95133
  if (args.flags.json) return context.out(`${JSON.stringify(hits, null, 2)}
@@ -95009,7 +95137,7 @@ async function wikiSearch({ context, args }) {
95009
95137
  }
95010
95138
  async function wikiHistory({ context, args }) {
95011
95139
  const path = args.words[2];
95012
- if (!path) throw new CliUsageError(USAGE18);
95140
+ if (!path) throw new CliUsageError(USAGE19);
95013
95141
  const { client } = await signedIn({ context, args });
95014
95142
  const revisions = await client.post("/api/wiki/history", { path });
95015
95143
  if (args.flags.json) return context.out(`${JSON.stringify(revisions, null, 2)}
@@ -95023,7 +95151,7 @@ async function wikiHistory({ context, args }) {
95023
95151
  }
95024
95152
  async function wikiMove({ context, args }) {
95025
95153
  const [, , path, to] = args.words;
95026
- if (!path || !to) throw new CliUsageError(USAGE18);
95154
+ if (!path || !to) throw new CliUsageError(USAGE19);
95027
95155
  const { client } = await signedIn({ context, args });
95028
95156
  const page = await client.post("/api/wiki/move", { path, to });
95029
95157
  if (args.flags.json) return context.out(`${JSON.stringify(page, null, 2)}
@@ -95033,7 +95161,7 @@ async function wikiMove({ context, args }) {
95033
95161
  }
95034
95162
  async function wikiRemove({ context, args }) {
95035
95163
  const path = args.words[2];
95036
- if (!path) throw new CliUsageError(USAGE18);
95164
+ if (!path) throw new CliUsageError(USAGE19);
95037
95165
  const { client } = await signedIn({ context, args });
95038
95166
  const removed = await client.post("/api/wiki/remove", { path });
95039
95167
  if (args.flags.json) return context.out(`${JSON.stringify(removed)}
@@ -95053,7 +95181,7 @@ var WIKI_COMMANDS = {
95053
95181
  async function wiki({ context, args }) {
95054
95182
  const name3 = args.words[1] ?? "";
95055
95183
  const command = Object.hasOwn(WIKI_COMMANDS, name3) ? WIKI_COMMANDS[name3] : void 0;
95056
- if (!command) throw new CliUsageError(USAGE18);
95184
+ if (!command) throw new CliUsageError(USAGE19);
95057
95185
  await command({ context, args });
95058
95186
  }
95059
95187
 
@@ -95209,6 +95337,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
95209
95337
  laze post <channel> <text|-> [--thread <id>] post as yourself (or as your agent); - reads stdin
95210
95338
  laze reply <message-id> <text|-> answer where the message was said: the channel,
95211
95339
  or its thread if it is in one; - reads stdin
95340
+ your reply is the post or reply: once it is where it belongs, end the turn with no recap
95212
95341
  --new-thread on reply starts a thread under a top-level message instead
95213
95342
  --also-channel on a thread reply shows it in the channel too, as "Also send to #channel" does
95214
95343
  --image <path|url|fileId> and --file <path|url|fileId> on post or reply attach files
@@ -95239,7 +95368,8 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
95239
95368
  laze feed update|reply|read <id>, laze feed inbox change, answer and read your items
95240
95369
  laze feed list|count|decisions your own feed as a person: cards and their actions
95241
95370
  laze feed act <id> <actionId>, comment <id> <text> answer a card in your feed
95242
- laze feed done|put-back|unsnooze <id>, snooze <id> --until <time> move a card
95371
+ laze feed done|put-back|unsnooze|pin|unpin <id>, snooze <id> --until <time> move or pin a card
95372
+ an agent whose owner turned on Manage my feed runs these on its owner's whole feed
95243
95373
  laze feed channel <channelId> the feed cards a channel shows
95244
95374
  laze schedule add <name> --prompt <p> --cron "0 8 * * 1-5" --tz <zone> work on a timer
95245
95375
  laze schedule list|update|pause|resume|rm|runs your agent's schedules and their runs
@@ -95260,6 +95390,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
95260
95390
  laze agent update <agent>|--self [--name] [--description] [--avatar|--avatar-emoji] [--model] [--effort] [--max-context] change an agent your owner owns, or yourself
95261
95391
  laze agent archive <agent> remove an agent your owner owns; kept 30 days
95262
95392
  laze agent archived removed agents you may restore, with the day each goes
95393
+ laze agent feed-access [<agent> on|off] let your own agent sort your whole feed (Manage my feed)
95263
95394
  laze agent restore|delete <agent> bring an archived agent back, or delete it for good now
95264
95395
  laze agent copy <agent> <name> a team copy of a personal agent, with its skills
95265
95396
  laze agent pause|resume <agent> [--reason <why>] pause an agent Laze runs, or resume it
@@ -95530,6 +95661,7 @@ var COMMANDS3 = {
95530
95661
  "agent update": updateAgent,
95531
95662
  "agent archive": archiveAgent,
95532
95663
  "agent archived": listArchivedAgents,
95664
+ "agent feed-access": agentFeedAccess,
95533
95665
  "agent restore": restoreAgent,
95534
95666
  "agent delete": deleteArchivedAgent,
95535
95667
  "agent copy": copyAgent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.69",
3
+ "version": "0.1.71",
4
4
  "description": "The Laze command line: sign in, read and post in chat, and connect your own Claude Code or Codex session as an agent.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",