@lazehq/cli 0.1.8 → 0.1.9

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 +169 -81
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -8604,7 +8604,7 @@ function flagText({
8604
8604
  }
8605
8605
 
8606
8606
  // src/rules/cli-version.rules.ts
8607
- var STAMPED = "0.1.8";
8607
+ var STAMPED = "0.1.9";
8608
8608
  function cliVersionOf({ stamped = STAMPED } = {}) {
8609
8609
  return stamped.startsWith("__") ? "dev" : stamped;
8610
8610
  }
@@ -30436,6 +30436,7 @@ var FEATURE_NAMES = [
30436
30436
  "notification",
30437
30437
  "onboarding",
30438
30438
  "openclaw",
30439
+ "ops",
30439
30440
  "role",
30440
30441
  "schedule",
30441
30442
  "skill",
@@ -31135,6 +31136,11 @@ var messageMembershipSchemaDefinition = external_exports.object({
31135
31136
  /** A line under the row, such as what an added agent may read. */
31136
31137
  note: external_exports.string().max(500).nullable().default(null)
31137
31138
  });
31139
+ var messageCompactionSchemaDefinition = external_exports.object({
31140
+ trigger: external_exports.enum(["auto", "manual", "threshold", "overflow"]),
31141
+ tokensBefore: external_exports.number().int().nonnegative().nullable().default(null),
31142
+ tokensAfter: external_exports.number().int().nonnegative().nullable().default(null)
31143
+ });
31138
31144
  var messagePinSchemaDefinition = external_exports.object({
31139
31145
  by: chatActorSchemaDefinition,
31140
31146
  at: external_exports.iso.datetime()
@@ -31167,6 +31173,8 @@ var messageSchemaDefinition = external_exports.object({
31167
31173
  ref: messageRefSchemaDefinition.nullable().default(null),
31168
31174
  /** A join or leave notice's change: drawn as the member's row, never unread. */
31169
31175
  membership: messageMembershipSchemaDefinition.nullable().optional(),
31176
+ /** An agent's compaction: drawn as a divider across the conversation, never unread. */
31177
+ compaction: messageCompactionSchemaDefinition.nullable().optional(),
31170
31178
  /** The scrubber moved a secret out of the body: shown as "A secret was moved to the vault". */
31171
31179
  scrubbed: external_exports.boolean().optional(),
31172
31180
  /** Set while the message is pinned to its conversation. */
@@ -31466,6 +31474,8 @@ var postNoticeInputSchemaDefinition = external_exports.object({
31466
31474
  threadRootId: idSchema4.optional(),
31467
31475
  body: external_exports.string().trim().min(1).max(500),
31468
31476
  ref: messageRefSchemaDefinition.optional(),
31477
+ /** Set on the notice a compaction leaves, so it draws as a divider. */
31478
+ compaction: messageCompactionSchemaDefinition.optional(),
31469
31479
  /** One notice per key: a second post with it answers the first. */
31470
31480
  clientKey: external_exports.string().regex(/^[A-Za-z0-9_-]{8,64}$/).optional()
31471
31481
  });
@@ -31616,6 +31626,10 @@ var markAgentRemovedInputSchemaDefinition = external_exports.object({
31616
31626
  /** When it was removed; now when absent. */
31617
31627
  removedAt: external_exports.iso.datetime().optional()
31618
31628
  });
31629
+ var signalAppPinsChangedInputSchemaDefinition = external_exports.object({
31630
+ workspaceId: workspaceIdSchema,
31631
+ channelId: idSchema4
31632
+ });
31619
31633
  var signalTypingInputSchemaDefinition = external_exports.object({
31620
31634
  workspaceId: workspaceIdSchema,
31621
31635
  channelId: idSchema4,
@@ -32159,12 +32173,24 @@ var emailMessageSchemaDefinition = external_exports.discriminatedUnion("template
32159
32173
  items: external_exports.array(external_exports.object({ title: external_exports.string().min(1), body: external_exports.string(), url: external_exports.url() })).min(1).max(20),
32160
32174
  /** Items beyond the ones listed. */
32161
32175
  more: external_exports.number().int().nonnegative()
32176
+ }),
32177
+ external_exports.object({
32178
+ template: external_exports.literal("feedDigest"),
32179
+ to: external_exports.email(),
32180
+ /** The feed page. */
32181
+ url: external_exports.url(),
32182
+ /** Settings, Notifications, where the digest is turned off. */
32183
+ settingsUrl: external_exports.url(),
32184
+ items: external_exports.array(external_exports.object({ title: external_exports.string().min(1), body: external_exports.string(), url: external_exports.url() })).min(1).max(20),
32185
+ more: external_exports.number().int().nonnegative()
32162
32186
  })
32163
32187
  ]);
32164
32188
  var workspaceIdSchema2 = external_exports.string().min(1);
32165
32189
  var userIdSchema = external_exports.string().min(1).max(64);
32166
32190
  var clockSchema = external_exports.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "a time such as 22:00");
32167
32191
  var channelDefaultSchema = external_exports.enum(["all", "mentions", "nothing"]);
32192
+ var FEED_PUSH_KINDS = ["approvals", "urgent", "replies", "wakeups", "groups"];
32193
+ var feedPushKindSchema = external_exports.enum(FEED_PUSH_KINDS);
32168
32194
  var notificationSettingsSchemaDefinition = external_exports.object({
32169
32195
  channelDefault: channelDefaultSchema,
32170
32196
  /** Words that notify like a mention, matched whole and case-blind. */
@@ -32179,7 +32205,12 @@ var notificationSettingsSchemaDefinition = external_exports.object({
32179
32205
  pushEnabled: external_exports.boolean(),
32180
32206
  emailEnabled: external_exports.boolean(),
32181
32207
  /** Minutes away before unread mentions and direct messages are emailed. */
32182
- emailDelayMinutes: external_exports.number().int().min(1).max(24 * 60)
32208
+ emailDelayMinutes: external_exports.number().int().min(1).max(24 * 60),
32209
+ /** Feed pushes the person turned off. */
32210
+ feedMuted: external_exports.array(feedPushKindSchema).max(FEED_PUSH_KINDS.length),
32211
+ /** One email a day at `digestAt` listing open feed cards, when no device takes pushes. */
32212
+ digestEnabled: external_exports.boolean(),
32213
+ digestAt: clockSchema
32183
32214
  });
32184
32215
  var notificationSettingsSchema = notificationSettingsSchemaDefinition;
32185
32216
  var updateSettingsInputSchemaDefinition = external_exports.object({
@@ -32256,15 +32287,17 @@ var feedNoticeSchema = external_exports.object({
32256
32287
  workspaceId: workspaceIdSchema2,
32257
32288
  userId: userIdSchema,
32258
32289
  kind: external_exports.literal("feed"),
32259
- /** What collapses on the device: one item, or one brief. */
32290
+ /** What collapses on the device: one item, or one group. */
32260
32291
  tag: external_exports.string().min(1).max(200),
32261
32292
  title: external_exports.string().min(1).max(120),
32262
32293
  body: external_exports.string().max(400),
32263
- /** The feed page, opened on the item or the brief. */
32294
+ /** The feed page, opened on the item or the group. */
32264
32295
  path: external_exports.string().startsWith("/").max(1024),
32265
32296
  urgent: external_exports.boolean().default(false),
32266
32297
  /** The feed event behind the push: each new event pushes, a retried one does not. */
32267
- eventId: external_exports.string().min(1).max(200).optional()
32298
+ eventId: external_exports.string().min(1).max(200).optional(),
32299
+ /** Which setting turns it off; none means it always pushes. */
32300
+ pushKind: feedPushKindSchema.optional()
32268
32301
  });
32269
32302
  var notifyInputSchemaDefinition = external_exports.discriminatedUnion("kind", [
32270
32303
  messageNoticeSchema,
@@ -32594,6 +32627,34 @@ var pauseSummaryIntentSchemaDefinition = external_exports.object({
32594
32627
  userId: external_exports.string().min(1),
32595
32628
  since: external_exports.iso.datetime()
32596
32629
  });
32630
+ var feedDigestSetPayloadSchemaDefinition = external_exports.object({
32631
+ workspaceId: external_exports.string().min(1),
32632
+ userId: external_exports.string().min(1),
32633
+ enabled: external_exports.boolean(),
32634
+ /** Local HH:MM in `timeZone`. */
32635
+ digestAt: external_exports.string(),
32636
+ timeZone: external_exports.string(),
32637
+ changeId: external_exports.string().min(1),
32638
+ at: external_exports.iso.datetime()
32639
+ });
32640
+ var feedDigestDuePayloadSchemaDefinition = external_exports.object({
32641
+ workspaceId: external_exports.string().min(1),
32642
+ userId: external_exports.string().min(1),
32643
+ /** The digest time this email is for. */
32644
+ at: external_exports.iso.datetime()
32645
+ });
32646
+ var feedDigestStateSchemaDefinition = external_exports.object({
32647
+ workspaceId: external_exports.string(),
32648
+ userId: external_exports.string(),
32649
+ enabled: external_exports.boolean(),
32650
+ digestAt: external_exports.string(),
32651
+ timeZone: external_exports.string()
32652
+ });
32653
+ var feedDigestIntentSchemaDefinition = external_exports.object({
32654
+ workspaceId: external_exports.string().min(1),
32655
+ userId: external_exports.string().min(1),
32656
+ at: external_exports.iso.datetime()
32657
+ });
32597
32658
 
32598
32659
  // ../../modules/notification/contract/src/notification.ui.ts
32599
32660
  var notificationUi = uiTokens("notification");
@@ -32738,6 +32799,12 @@ var realtimePublicationSchemaDefinition = external_exports.discriminatedUnion("t
32738
32799
  threadRootId: external_exports.string().nullable(),
32739
32800
  actor: chatActorSchema
32740
32801
  }),
32802
+ /** The apps pinned to a conversation changed order: its members read the pins again. */
32803
+ external_exports.object({
32804
+ type: external_exports.literal("app_pins_changed"),
32805
+ workspaceId: external_exports.string(),
32806
+ channelId: external_exports.string()
32807
+ }),
32741
32808
  external_exports.object({ type: external_exports.literal("activity_added"), workspaceId: external_exports.string() }),
32742
32809
  /** The reader's followed threads or their read state changed, on another device too. */
32743
32810
  external_exports.object({ type: external_exports.literal("threads_changed"), workspaceId: external_exports.string() }),
@@ -36627,7 +36694,9 @@ var callerChannelSchemaDefinition = external_exports.object({
36627
36694
  /** A message there leaves Laze: the channel mirrors Slack or holds an agent run outside. */
36628
36695
  leavesLaze: external_exports.boolean().default(false),
36629
36696
  /** The caller's own mute there, while it lasts; null when not muted. */
36630
- mute: agentChannelMuteSchema.nullable().default(null)
36697
+ mute: agentChannelMuteSchema.nullable().default(null),
36698
+ /** The caller is the channel's default agent: it answers messages that name no agent. */
36699
+ isDefault: external_exports.boolean().default(false)
36631
36700
  });
36632
36701
  var setChannelLevelInputSchemaDefinition = external_exports.object({
36633
36702
  workspaceId: workspaceIdSchema8,
@@ -36977,6 +37046,24 @@ var agentRemovedPayloadSchemaDefinition = external_exports.object({
36977
37046
  removedByUserId: external_exports.string().min(1)
36978
37047
  });
36979
37048
 
37049
+ // ../../modules/agent/contract/src/agent-scheduled-run-missed.ts
37050
+ var scheduledRunMissReasonSchema = external_exports.enum([
37051
+ "agent_offline",
37052
+ "agent_removed",
37053
+ "conversation_gone"
37054
+ ]);
37055
+ var agentScheduledRunMissedPayloadSchemaDefinition = external_exports.object({
37056
+ workspaceId: external_exports.string().min(1),
37057
+ agentId: external_exports.string().min(1),
37058
+ agentName: external_exports.string(),
37059
+ scheduleId: external_exports.string().min(1),
37060
+ runId: external_exports.string().min(1),
37061
+ name: external_exports.string(),
37062
+ requesterUserId: external_exports.string().min(1),
37063
+ reason: scheduledRunMissReasonSchema,
37064
+ scheduledFor: external_exports.iso.datetime()
37065
+ });
37066
+
36980
37067
  // ../../modules/agent/contract/src/agent-history.ts
36981
37068
  var idSchema14 = external_exports.string().min(1).max(80);
36982
37069
  var CALLER_HISTORY_LIMIT_MAX = 100;
@@ -37611,7 +37698,7 @@ ${link.prompt}
37611
37698
 
37612
37699
  // src/services/agent-commands.service.ts
37613
37700
  import { mkdir as mkdir6, readFile as readFile5, writeFile as writeFile6 } from "node:fs/promises";
37614
- import { join as join6, resolve as resolve3 } from "node:path";
37701
+ import { join as join5, resolve as resolve3 } from "node:path";
37615
37702
 
37616
37703
  // src/rules/cli-invocation.rules.ts
37617
37704
  var NPX_CACHE = /[\\/]_npx[\\/]/;
@@ -39168,22 +39255,7 @@ function channelLabelIn(channel) {
39168
39255
  }
39169
39256
 
39170
39257
  // src/services/claude-project.service.ts
39171
- import { stat } from "node:fs/promises";
39172
- import { homedir as homedir2 } from "node:os";
39173
- import { basename, dirname as dirname4, isAbsolute, join as join4, relative, resolve as resolve2 } from "node:path";
39174
- async function isDirectory(path) {
39175
- return stat(path).then(
39176
- (found) => found.isDirectory(),
39177
- () => false
39178
- );
39179
- }
39180
- async function nearestProjectOf({ start: start2, home }) {
39181
- for (let folder = resolve2(start2); ; folder = dirname4(folder)) {
39182
- const ownClaude = folder !== home && await isDirectory(join4(folder, ".claude"));
39183
- if (ownClaude || await isDirectory(join4(folder, ".git"))) return folder;
39184
- if (dirname4(folder) === folder) return resolve2(start2);
39185
- }
39186
- }
39258
+ import { basename, isAbsolute, relative, resolve as resolve2 } from "node:path";
39187
39259
  function harnessIn({ words }) {
39188
39260
  const names = words.slice(0, 2).map((word2) => basename(word2).replace(/\.(js|mjs|cjs)$/, ""));
39189
39261
  if (names.includes("codex")) return "codex";
@@ -39215,16 +39287,13 @@ async function claudeProjectOf({
39215
39287
  env.CLAUDE_PROJECT_DIR ? resolve2(env.CLAUDE_PROJECT_DIR) : void 0,
39216
39288
  pid > 0 ? await context.processes.cwdOf(pid) : void 0
39217
39289
  ].filter((folder) => Boolean(folder));
39218
- if (candidates.length === 0) {
39219
- return nearestProjectOf({ start: context.cwd, home: resolve2(env.HOME || homedir2()) });
39220
- }
39221
39290
  return candidates.find((folder) => holds({ folder, inner: context.cwd })) ?? resolve2(context.cwd);
39222
39291
  }
39223
39292
 
39224
39293
  // src/services/codex-adopt.service.ts
39225
39294
  import { spawn as spawn2 } from "node:child_process";
39226
- import { mkdir as mkdir4, readdir, readFile as readFile4, rm as rm2, stat as stat2, writeFile as writeFile4 } from "node:fs/promises";
39227
- import { dirname as dirname5, join as join5 } from "node:path";
39295
+ import { mkdir as mkdir4, readdir, readFile as readFile4, rm as rm2, stat, writeFile as writeFile4 } from "node:fs/promises";
39296
+ import { dirname as dirname4, join as join4 } from "node:path";
39228
39297
  import { createInterface } from "node:readline";
39229
39298
 
39230
39299
  // src/rules/codex-requests.rules.ts
@@ -39344,11 +39413,11 @@ var CodexAppServer = class _CodexAppServer {
39344
39413
  }
39345
39414
  };
39346
39415
  async function newestThreadId({ codexHome }) {
39347
- const root = join5(codexHome, "sessions");
39416
+ const root = join4(codexHome, "sessions");
39348
39417
  const files2 = await readdir(root, { recursive: true }).catch(() => []);
39349
39418
  const rollouts = files2.filter((file3) => /rollout-.*\.jsonl$/.test(file3));
39350
39419
  const dated = await Promise.all(
39351
- rollouts.map(async (file3) => ({ file: file3, at: (await stat2(join5(root, file3))).mtimeMs }))
39420
+ rollouts.map(async (file3) => ({ file: file3, at: (await stat(join4(root, file3))).mtimeMs }))
39352
39421
  );
39353
39422
  const newest = dated.toSorted((a, b) => b.at - a.at)[0]?.file ?? "";
39354
39423
  const id = /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/.exec(newest);
@@ -39442,7 +39511,7 @@ async function startAdoptInBackground({
39442
39511
  const adopt = ["adopt", "codex", "--profile", profile, ...threadFlag({ thread: thread2 })];
39443
39512
  const argv = [...context.program, ...adopt, "--supervise"];
39444
39513
  const pid = context.processes.spawnDetached({ argv, logPath: log });
39445
- await mkdir4(dirname5(path), { recursive: true, mode: 448 });
39514
+ await mkdir4(dirname4(path), { recursive: true, mode: 448 });
39446
39515
  await writeFile4(path, JSON.stringify({ pid, thread: thread2, log, startedAt: context.nowMs() }));
39447
39516
  return [
39448
39517
  `Started \`${laze} adopt codex\` in the background (pid ${pid}). It answers each Laze message`,
@@ -39538,7 +39607,7 @@ async function adoptedThreadOf({
39538
39607
  }
39539
39608
  const forked = record3((await codex.call("thread/fork", { threadId })).thread).id;
39540
39609
  if (typeof forked !== "string") throw new Error("thread/fork answered no thread id");
39541
- await mkdir4(dirname5(path), { recursive: true, mode: 448 });
39610
+ await mkdir4(dirname4(path), { recursive: true, mode: 448 });
39542
39611
  await writeFile4(path, JSON.stringify({ ...forks, [threadId]: forked }));
39543
39612
  context.out(
39544
39613
  `Codex holds thread ${threadId} open elsewhere; answering in its new fork ${forked}.
@@ -39588,7 +39657,7 @@ async function adoptCodex({ context, args }) {
39588
39657
 
39589
39658
  // src/services/mcp-channel.service.ts
39590
39659
  import { mkdir as mkdir5, rm as rm3, writeFile as writeFile5 } from "node:fs/promises";
39591
- import { dirname as dirname6 } from "node:path";
39660
+ import { dirname as dirname5 } from "node:path";
39592
39661
  var LAZE_MCP_SERVER = "laze";
39593
39662
  var DEV_CHANNELS_FLAG = "--dangerously-load-development-channels";
39594
39663
  var ROUND_SECONDS = 50;
@@ -39671,7 +39740,7 @@ async function pushInbox({
39671
39740
  signal
39672
39741
  }) {
39673
39742
  const marker = statePathOf({ context, kind: "channels", profile });
39674
- await mkdir5(dirname6(marker), { recursive: true, mode: 448 });
39743
+ await mkdir5(dirname5(marker), { recursive: true, mode: 448 });
39675
39744
  await writeFile5(marker, JSON.stringify({ pid: context.processes.pid }));
39676
39745
  try {
39677
39746
  while (!signal.aborted) {
@@ -39740,8 +39809,8 @@ async function installHooks({
39740
39809
  directory,
39741
39810
  profile
39742
39811
  }) {
39743
- const folder = join6(directory, ".claude");
39744
- const path = join6(folder, "settings.local.json");
39812
+ const folder = join5(directory, ".claude");
39813
+ const path = join5(folder, "settings.local.json");
39745
39814
  const current2 = await readFile5(path, "utf8").then(
39746
39815
  (text2) => JSON.parse(text2),
39747
39816
  () => ({})
@@ -40601,7 +40670,7 @@ async function setAgentPool({
40601
40670
 
40602
40671
  // src/services/app-commands.service.ts
40603
40672
  import { mkdir as mkdir7, readdir as readdir2, readFile as readFile7, writeFile as writeFile8 } from "node:fs/promises";
40604
- import { dirname as dirname7, join as join8, relative as relative2, resolve as resolve5, sep } from "node:path";
40673
+ import { dirname as dirname6, join as join7, relative as relative2, resolve as resolve5, sep } from "node:path";
40605
40674
 
40606
40675
  // ../../modules/app/contract/src/app.connections.ts
40607
40676
  var appFunctionNameSchema = external_exports.string().regex(/^[a-z0-9][a-z0-9_-]{0,63}$/);
@@ -42964,7 +43033,7 @@ async function appPinsCommand({
42964
43033
  import { execFile } from "node:child_process";
42965
43034
  import { mkdtemp, rm as rm4, writeFile as writeFile7 } from "node:fs/promises";
42966
43035
  import { tmpdir } from "node:os";
42967
- import { join as join7 } from "node:path";
43036
+ import { join as join6 } from "node:path";
42968
43037
  import { promisify } from "node:util";
42969
43038
  var run = promisify(execFile);
42970
43039
  var MODULE_SYNTAX = /^\s*(import|export)\s/m;
@@ -42993,11 +43062,11 @@ async function scriptErrorsOf({
42993
43062
  const unknown2 = unknownCollectionsOf({ files: files2, collections });
42994
43063
  const scripts = files2.flatMap(scriptsOf);
42995
43064
  if (scripts.length === 0) return unknown2;
42996
- const dir = await mkdtemp(join7(tmpdir(), "laze-app-check-"));
43065
+ const dir = await mkdtemp(join6(tmpdir(), "laze-app-check-"));
42997
43066
  try {
42998
43067
  const errors = await Promise.all(
42999
43068
  scripts.map(async (script, index) => {
43000
- const file3 = join7(dir, `${index}.${script.module ? "mjs" : "cjs"}`);
43069
+ const file3 = join6(dir, `${index}.${script.module ? "mjs" : "cjs"}`);
43001
43070
  await writeFile7(file3, script.code);
43002
43071
  try {
43003
43072
  await run(process.execPath, ["--check", file3]);
@@ -43173,7 +43242,7 @@ function folderOf({ context, word: word2 }) {
43173
43242
  return resolve5(context.cwd, word2 ?? ".");
43174
43243
  }
43175
43244
  async function readManifest(folder) {
43176
- const text2 = await readFile7(join8(folder, APP_MANIFEST_FILE), "utf8").catch(() => void 0);
43245
+ const text2 = await readFile7(join7(folder, APP_MANIFEST_FILE), "utf8").catch(() => void 0);
43177
43246
  if (text2 === void 0) return void 0;
43178
43247
  const parsed = appManifestSchema.safeParse(JSON.parse(text2));
43179
43248
  if (!parsed.success) {
@@ -43221,7 +43290,7 @@ async function listFiles(folder) {
43221
43290
  while (pending.length > 0 && found.length <= MAX_FILES) {
43222
43291
  const current2 = pending.pop() ?? folder;
43223
43292
  for (const entry of await readdir2(current2, { withFileTypes: true })) {
43224
- const path = join8(current2, entry.name);
43293
+ const path = join7(current2, entry.name);
43225
43294
  const rel = relative2(folder, path).split(sep).join("/");
43226
43295
  if (isSkippedPath({ path: rel })) continue;
43227
43296
  if (entry.isDirectory()) pending.push(path);
@@ -43265,8 +43334,8 @@ var appCreate = async ({ context, args }) => {
43265
43334
  await mkdir7(folder, { recursive: true });
43266
43335
  const files2 = template ? templateFiles({ template, name: name2 }) : {};
43267
43336
  for (const [path, content] of Object.entries(files2)) {
43268
- await mkdir7(dirname7(join8(folder, path)), { recursive: true });
43269
- await writeFile8(join8(folder, path), content);
43337
+ await mkdir7(dirname6(join7(folder, path)), { recursive: true });
43338
+ await writeFile8(join7(folder, path), content);
43270
43339
  }
43271
43340
  const manifest = {
43272
43341
  app: { id: app2.id, name: app2.name, slug: app2.slug },
@@ -43274,7 +43343,7 @@ var appCreate = async ({ context, args }) => {
43274
43343
  views: template?.views ? [...template.views] : [],
43275
43344
  seed: template ? { ...template.seed } : {}
43276
43345
  };
43277
- await writeFile8(join8(folder, APP_MANIFEST_FILE), `${JSON.stringify(manifest, null, 2)}
43346
+ await writeFile8(join7(folder, APP_MANIFEST_FILE), `${JSON.stringify(manifest, null, 2)}
43278
43347
  `);
43279
43348
  print5({
43280
43349
  context,
@@ -44240,7 +44309,7 @@ async function billing({ context, args }) {
44240
44309
  // src/services/browser-commands.service.ts
44241
44310
  import { randomBytes } from "node:crypto";
44242
44311
  import { mkdir as mkdir8, readFile as readFile8, writeFile as writeFile9 } from "node:fs/promises";
44243
- import { dirname as dirname8, join as join9 } from "node:path";
44312
+ import { dirname as dirname7, join as join8 } from "node:path";
44244
44313
 
44245
44314
  // src/services/cdp-bridge.service.ts
44246
44315
  import { spawn as spawn3 } from "node:child_process";
@@ -44714,7 +44783,7 @@ async function cdp({ context, args }) {
44714
44783
  }
44715
44784
  function bridgeStatePath({ context, machine: machine2 }) {
44716
44785
  const safe = machine2.replace(/[^a-zA-Z0-9_-]/g, "_");
44717
- return join9(dirname8(context.environment.configPath), "bridges", `${safe}.json`);
44786
+ return join8(dirname7(context.environment.configPath), "bridges", `${safe}.json`);
44718
44787
  }
44719
44788
  async function bridgePort({
44720
44789
  context,
@@ -44735,7 +44804,7 @@ async function bridgePort({
44735
44804
  key,
44736
44805
  ...target
44737
44806
  });
44738
- await mkdir8(dirname8(path), { recursive: true, mode: 448 });
44807
+ await mkdir8(dirname7(path), { recursive: true, mode: 448 });
44739
44808
  await writeFile9(path, JSON.stringify({ port, key }), { mode: 384 });
44740
44809
  return port;
44741
44810
  }
@@ -45274,8 +45343,9 @@ function muteTextOf({ mute }) {
45274
45343
  }
45275
45344
  function settingRowOf({ channel }) {
45276
45345
  const level = channel.level === "everything" ? "Everything" : "Mentions only";
45346
+ const isDefault = channel.isDefault ? " default agent" : "";
45277
45347
  const mute = channel.mute ? ` ${muteTextOf({ mute: channel.mute })}` : "";
45278
- return `#${channel.name} ${level}${mute}
45348
+ return `#${channel.name} ${level}${isDefault}${mute}
45279
45349
  `;
45280
45350
  }
45281
45351
 
@@ -45743,7 +45813,7 @@ async function chatActions({
45743
45813
 
45744
45814
  // src/services/claude-wait.service.ts
45745
45815
  import { readFile as readFile10, rm as rm5, writeFile as writeFile10, mkdir as mkdir9 } from "node:fs/promises";
45746
- import { dirname as dirname9 } from "node:path";
45816
+ import { dirname as dirname8 } from "node:path";
45747
45817
  var ROUND_SECONDS2 = 50;
45748
45818
  var WATCH_MS = 2e3;
45749
45819
  var CHANNEL_CHECK_MS = 5e3;
@@ -45761,7 +45831,7 @@ async function takeLock({
45761
45831
  const holder = await holderOf({ path });
45762
45832
  const self2 = context.processes.pid;
45763
45833
  if (holder && holder.pid !== self2 && context.processes.alive(holder.pid)) return false;
45764
- await mkdir9(dirname9(path), { recursive: true, mode: 448 });
45834
+ await mkdir9(dirname8(path), { recursive: true, mode: 448 });
45765
45835
  await writeFile10(path, JSON.stringify({ pid: self2, ...sessionId ? { sessionId } : {} }));
45766
45836
  return true;
45767
45837
  }
@@ -46209,6 +46279,12 @@ var setComplimentaryPlanInputDefinition = external_exports.object({
46209
46279
  seats: external_exports.number().int().positive().max(1e4).nullable(),
46210
46280
  reason: external_exports.string().trim().min(3).max(500)
46211
46281
  });
46282
+ var grantCreditsInputDefinition = external_exports.object({
46283
+ workspaceId: external_exports.string().min(1),
46284
+ /** Whole currency units of the workspace's currency. */
46285
+ amount: external_exports.number().positive().max(1e4),
46286
+ reason: external_exports.string().trim().min(3).max(500)
46287
+ });
46212
46288
  var BillingApi = moduleApi()("billing");
46213
46289
  var billingTrpc = defineTrpcContract("billing").query("account").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).query("invoices").withInput(billingWorkspaceInputSchema).withOutput(external_exports.array(billingInvoiceSchema)).mutation("startCheckout").withInput(startCheckoutInputSchema).withOutput(billingRedirectSchema).mutation("openPortal").withInput(openPortalInputSchema).withOutput(billingRedirectSchema).mutation("setCurrency").withInput(setCurrencyInputSchema).withOutput(billingAccountViewSchema).mutation("topUp").withInput(topUpInputSchema).withOutput(billingRedirectSchema).mutation("setAutoRecharge").withInput(setAutoRechargeInputSchema).withOutput(billingAccountViewSchema).mutation("applyReferral").withInput(applyReferralInputSchema).withOutput(billingAccountViewSchema).build();
46214
46290
  var stripeWebhookHeadersDefinition = external_exports.object({
@@ -48289,8 +48365,8 @@ var DOMAINS_USAGE = `Usage:
48289
48365
  var printJson4 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
48290
48366
  `);
48291
48367
  function printDomain(context, row) {
48292
- const join13 = row.autoJoin ? "auto-join on" : "auto-join off";
48293
- context.out(`${row.domain} ${join13}${row.enforced ? " single sign-on enforced" : ""}
48368
+ const join12 = row.autoJoin ? "auto-join on" : "auto-join off";
48369
+ context.out(`${row.domain} ${join12}${row.enforced ? " single sign-on enforced" : ""}
48294
48370
  `);
48295
48371
  }
48296
48372
  async function list4({ context, args }) {
@@ -48377,10 +48453,10 @@ function feedFlagsOf({ args }) {
48377
48453
  if (args.flags.urgent) fields.urgent = true;
48378
48454
  const showAt = flagText({ args, name: "show-at" });
48379
48455
  if (showAt) fields.showAt = dateOf(showAt);
48380
- const brief = flagText({ args, name: "brief" });
48381
- if (brief) fields.brief = dateOf(brief);
48382
- const briefClass = flagText({ args, name: "class" });
48383
- if (briefClass) fields.briefClass = briefClass;
48456
+ const group = flagText({ args, name: "group" });
48457
+ if (group) fields.group = group;
48458
+ const labels = args.lists.label ?? [];
48459
+ if (labels.length > 0) fields.labels = [...labels];
48384
48460
  const autoSendOn = flagText({ args, name: "auto-send-on" });
48385
48461
  if (autoSendOn) fields.autoSendOn = dateOf(autoSendOn);
48386
48462
  return { fields: { ...fields, ...snoozeOf(args) }, texts };
@@ -48393,7 +48469,7 @@ var USAGE8 = `Usage:
48393
48469
  [--link <label>=<url>]... [--action <label>=<message>]... [--to <userId>]...
48394
48470
  [--urgent] [--done-label <line>] [--show-at <ISO time>]
48395
48471
  [--snooze-for <userId>... --until <ISO time>]
48396
- [--brief <YYYY-MM-DD> [--class money|promise|decide|nudge|risk|fyi]] [--loop <key> [--reopen]]
48472
+ [--group <name> [--label <word>]...] [--loop <key> [--reopen]]
48397
48473
  [--auto-send-on <YYYY-MM-DD>]
48398
48474
  laze feed update <id> [the post flags that change] [--title <title>]
48399
48475
  [--auto-send-on <YYYY-MM-DD>|none]
@@ -48403,7 +48479,7 @@ var USAGE8 = `Usage:
48403
48479
  laze feed inbox
48404
48480
  laze feed close <id>|--loop <key> --note <text>
48405
48481
  laze feed loops
48406
- laze feed brief-summary <YYYY-MM-DD>
48482
+ laze feed group-summary <group>
48407
48483
  laze feed list [--json]
48408
48484
  laze feed count
48409
48485
  laze feed act <id> <actionId> [--draft <text|@file>]
@@ -48535,11 +48611,11 @@ async function feedLoops({ context, args }) {
48535
48611
  `);
48536
48612
  }
48537
48613
  }
48538
- async function feedBriefSummary({ context, args }) {
48539
- const date5 = args.words[2];
48540
- if (!date5) throw new CliUsageError(USAGE8);
48614
+ async function feedGroupSummary({ context, args }) {
48615
+ const group = args.words.slice(2).join(" ").trim();
48616
+ if (!group) throw new CliUsageError(USAGE8);
48541
48617
  const { client } = await signedIn({ context, args });
48542
- const pointer = await client.post("/api/feed/brief-summary", { date: date5 });
48618
+ const pointer = await client.post("/api/feed/group-summary", { group });
48543
48619
  if (args.flags.json) return context.out(`${JSON.stringify(pointer, null, 2)}
48544
48620
  `);
48545
48621
  const link = pointer.link.startsWith("/") ? pointer.path : pointer.link;
@@ -48663,7 +48739,7 @@ var FEED_COMMANDS = {
48663
48739
  reply: feedReply,
48664
48740
  read: feedRead,
48665
48741
  inbox: feedInbox,
48666
- "brief-summary": feedBriefSummary,
48742
+ "group-summary": feedGroupSummary,
48667
48743
  close: feedClose,
48668
48744
  loops: feedLoops,
48669
48745
  list: feedList,
@@ -49176,11 +49252,11 @@ async function ip({ context, args }) {
49176
49252
 
49177
49253
  // src/services/join-commands.service.ts
49178
49254
  import { mkdir as mkdir10, readFile as readFile18, rename as rename4, rm as rm6, writeFile as writeFile11 } from "node:fs/promises";
49179
- import { dirname as dirname10, join as join10 } from "node:path";
49255
+ import { dirname as dirname9, join as join9 } from "node:path";
49180
49256
  var DEFAULT_WAIT_SECONDS = 100;
49181
49257
  var JOIN_USAGE = "Usage: laze join [--workspace <name|id|invite link>] [--for <email>] [--name <name>] [--note <text>] [--timeout <seconds>] [--project <folder>]";
49182
49258
  function pendingPathOf({ context }) {
49183
- return join10(dirname10(context.environment.configPath), "join", "pending.json");
49259
+ return join9(dirname9(context.environment.configPath), "join", "pending.json");
49184
49260
  }
49185
49261
  async function readPending({
49186
49262
  context,
@@ -49197,7 +49273,7 @@ async function readPending({
49197
49273
  }
49198
49274
  async function keepPending({ context, pending }) {
49199
49275
  const path = pendingPathOf({ context });
49200
- await mkdir10(dirname10(path), { recursive: true, mode: 448 });
49276
+ await mkdir10(dirname9(path), { recursive: true, mode: 448 });
49201
49277
  const temporary = `${path}.${process.pid}.tmp`;
49202
49278
  await writeFile11(temporary, JSON.stringify(pending), { mode: 384 });
49203
49279
  await rename4(temporary, path);
@@ -49519,7 +49595,7 @@ function machineAccessCommand(name2) {
49519
49595
  import { createHash } from "node:crypto";
49520
49596
  import { mkdir as mkdir11, readFile as readFile19, rm as rm7, writeFile as writeFile12 } from "node:fs/promises";
49521
49597
  import { tmpdir as tmpdir2 } from "node:os";
49522
- import { dirname as dirname11, join as join11 } from "node:path";
49598
+ import { dirname as dirname10, join as join10 } from "node:path";
49523
49599
  var USAGE9 = `Usage: laze vault run <connection> --reason "<one plain sentence>" [--wait <s>] -- <command> [args...]
49524
49600
  Runs the command with the connection's values in its environment, on a Laze agent's computer
49525
49601
  or on a machine it runs on.`;
@@ -49568,8 +49644,8 @@ function runKeyPathOf({
49568
49644
  connection
49569
49645
  }) {
49570
49646
  const name2 = createHash("sha256").update(connection).digest("hex");
49571
- const base = turnFile ? dirname11(turnFile) : join11(tmpdir2(), "laze-vault");
49572
- return join11(base, "vault-run-keys", `${name2}.json`);
49647
+ const base = turnFile ? dirname10(turnFile) : join10(tmpdir2(), "laze-vault");
49648
+ return join10(base, "vault-run-keys", `${name2}.json`);
49573
49649
  }
49574
49650
  async function runKeyAt({ path }) {
49575
49651
  const saved3 = await readFile19(path, "utf8").then(
@@ -49582,7 +49658,7 @@ async function runKeyAt({ path }) {
49582
49658
  }
49583
49659
  const fresh = await generateEcdhKeys();
49584
49660
  const jwk = await globalThis.crypto.subtle.exportKey("jwk", fresh.privateKey);
49585
- await mkdir11(dirname11(path), { recursive: true, mode: 448 });
49661
+ await mkdir11(dirname10(path), { recursive: true, mode: 448 });
49586
49662
  await writeFile12(path, JSON.stringify({ publicKey: fresh.publicKey, privateKey: jwk }), {
49587
49663
  mode: 384
49588
49664
  });
@@ -50255,7 +50331,7 @@ async function serveMcp({
50255
50331
 
50256
50332
  // src/services/mount-files.service.ts
50257
50333
  import { mkdir as mkdir12, readFile as readFile20, rm as rm8, writeFile as writeFile13 } from "node:fs/promises";
50258
- import { dirname as dirname12, relative as relative3, resolve as resolve9 } from "node:path";
50334
+ import { dirname as dirname11, relative as relative3, resolve as resolve9 } from "node:path";
50259
50335
  async function textArgument({
50260
50336
  context,
50261
50337
  value
@@ -50281,7 +50357,7 @@ async function writeMount({
50281
50357
  const inside = relative3(root, target);
50282
50358
  if (!inside || inside.startsWith(".."))
50283
50359
  throw new Error(`Refusing to write outside ${root}: ${file3.path}`);
50284
- await mkdir12(dirname12(target), { recursive: true });
50360
+ await mkdir12(dirname11(target), { recursive: true });
50285
50361
  await writeFile13(target, file3.content);
50286
50362
  }
50287
50363
  return root;
@@ -51056,7 +51132,8 @@ var USAGE14 = `Usage:
51056
51132
  laze schedule list
51057
51133
  laze schedule update <scheduleId> [--name <name>] [--prompt <text>] [--cron|--rrule|--at <when>]
51058
51134
  [--tz <IANA zone>] [--channel <channelId>|none] [--agent <agentId>]
51059
- laze schedule pause|resume|rm|runs <scheduleId>`;
51135
+ laze schedule pause|resume|rm|runs <scheduleId>
51136
+ laze schedule run <scheduleId> (one extra run now; the next fire stays)`;
51060
51137
  function timingOf(args) {
51061
51138
  const cron = flagText({ args, name: "cron" });
51062
51139
  const rrule = flagText({ args, name: "rrule" });
@@ -51159,6 +51236,16 @@ async function scheduleRuns({ context, args }) {
51159
51236
  `);
51160
51237
  }
51161
51238
  }
51239
+ async function scheduleRun({ context, args }) {
51240
+ const scheduleId = args.words[2];
51241
+ if (!scheduleId) throw new CliUsageError(USAGE14);
51242
+ const { client } = await signedIn({ context, args });
51243
+ const run3 = await client.post("/api/schedules/run", { scheduleId });
51244
+ if (args.flags.json) return context.out(`${JSON.stringify(run3, null, 2)}
51245
+ `);
51246
+ context.out(`${run3.scheduledFor} ${run3.status}
51247
+ `);
51248
+ }
51162
51249
  var SCHEDULE_COMMANDS = {
51163
51250
  add: scheduleAdd,
51164
51251
  list: scheduleList,
@@ -51166,7 +51253,8 @@ var SCHEDULE_COMMANDS = {
51166
51253
  pause: byId("pause"),
51167
51254
  resume: byId("resume"),
51168
51255
  rm: byId("remove"),
51169
- runs: scheduleRuns
51256
+ runs: scheduleRuns,
51257
+ run: scheduleRun
51170
51258
  };
51171
51259
  async function schedule({ context, args }) {
51172
51260
  const name2 = args.words[1] ?? "";
@@ -51177,7 +51265,7 @@ async function schedule({ context, args }) {
51177
51265
 
51178
51266
  // src/services/skill-commands.service.ts
51179
51267
  import { readdir as readdir3, readFile as readFile21 } from "node:fs/promises";
51180
- import { join as join12, relative as relative4, resolve as resolve10 } from "node:path";
51268
+ import { join as join11, relative as relative4, resolve as resolve10 } from "node:path";
51181
51269
  var USAGE15 = `Usage:
51182
51270
  laze skill list [--agent <agentId>]
51183
51271
  laze skill install <catalogue-id> [--as <name>] [--agent <agentId>]
@@ -51194,7 +51282,7 @@ async function folderFiles({ root }) {
51194
51282
  const files2 = [];
51195
51283
  for (const entry of entries) {
51196
51284
  if (!entry.isFile()) continue;
51197
- const full = join12(entry.parentPath, entry.name);
51285
+ const full = join11(entry.parentPath, entry.name);
51198
51286
  files2.push({ path: relative4(root, full), content: await readFile21(full, "utf8") });
51199
51287
  }
51200
51288
  return files2.toSorted((a, b) => a.path.localeCompare(b.path));
@@ -53807,7 +53895,7 @@ async function runCli({
53807
53895
  import { execFile as execFile2, spawn as spawn4 } from "node:child_process";
53808
53896
  import { mkdirSync, openSync } from "node:fs";
53809
53897
  import { readFile as readFile26, readlink } from "node:fs/promises";
53810
- import { dirname as dirname13 } from "node:path";
53898
+ import { dirname as dirname12 } from "node:path";
53811
53899
  import { promisify as promisify2 } from "node:util";
53812
53900
  var run2 = promisify2(execFile2);
53813
53901
  function alive(pid) {
@@ -53827,8 +53915,8 @@ async function argsOf(pid) {
53827
53915
  return line ? line.split(/\s+/) : void 0;
53828
53916
  }
53829
53917
  async function parentOf(pid) {
53830
- const stat3 = await readFile26(`/proc/${pid}/stat`, "utf8").catch(() => void 0);
53831
- const fromStat = stat3 ? Number(stat3.slice(stat3.lastIndexOf(")") + 2).split(" ")[1]) : NaN;
53918
+ const stat2 = await readFile26(`/proc/${pid}/stat`, "utf8").catch(() => void 0);
53919
+ const fromStat = stat2 ? Number(stat2.slice(stat2.lastIndexOf(")") + 2).split(" ")[1]) : NaN;
53832
53920
  if (fromStat > 0) return fromStat;
53833
53921
  const listed = await run2("ps", ["-o", "ppid=", "-p", String(pid)]).catch(() => void 0);
53834
53922
  const parent = Number(listed?.stdout.trim());
@@ -53844,7 +53932,7 @@ async function cwdOf(pid) {
53844
53932
  return line ? line.slice(1) : void 0;
53845
53933
  }
53846
53934
  function spawnDetached({ argv, logPath }) {
53847
- mkdirSync(dirname13(logPath), { recursive: true, mode: 448 });
53935
+ mkdirSync(dirname12(logPath), { recursive: true, mode: 448 });
53848
53936
  const log = openSync(logPath, "a", 384);
53849
53937
  const [program = "", ...rest] = argv;
53850
53938
  const child = spawn4(program, rest, { detached: true, stdio: ["ignore", log, log] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
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",