@lazehq/cli 0.1.40 → 0.1.41

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 +31 -30
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -35708,7 +35708,7 @@ function flagText({
35708
35708
  }
35709
35709
 
35710
35710
  // src/rules/cli-version.rules.ts
35711
- var STAMPED = "0.1.40";
35711
+ var STAMPED = "0.1.41";
35712
35712
  function cliVersionOf({ stamped = STAMPED } = {}) {
35713
35713
  return stamped.startsWith("__") ? "dev" : stamped;
35714
35714
  }
@@ -62744,7 +62744,9 @@ var computerNoticeSchemaDefinition = external_exports.discriminatedUnion("type",
62744
62744
  external_exports.object({
62745
62745
  type: external_exports.literal("memory_stop"),
62746
62746
  /** "stopped: your agent computer is out of memory (3.9 of 4 GB)". */
62747
- text: external_exports.string().min(1).max(500)
62747
+ text: external_exports.string().min(1).max(500),
62748
+ /** False when the computer's own services held most of the memory: no bigger size to offer. */
62749
+ agentLoad: external_exports.boolean().optional()
62748
62750
  }),
62749
62751
  external_exports.object({
62750
62752
  type: external_exports.literal("disk_warning"),
@@ -64102,22 +64104,6 @@ var liveStepsSchemaDefinition = external_exports.object({
64102
64104
  visible: external_exports.boolean()
64103
64105
  });
64104
64106
  var liveStepsSchema = liveStepsSchemaDefinition;
64105
- var replyStepsInputSchemaDefinition = external_exports.object({
64106
- workspaceId: external_exports.string().min(1),
64107
- channelId: external_exports.string().min(1),
64108
- messageIds: external_exports.array(external_exports.string().min(1)).max(200)
64109
- });
64110
- var replyStepsInputSchema = replyStepsInputSchemaDefinition;
64111
- var replyStepsSchemaDefinition = external_exports.array(
64112
- external_exports.object({
64113
- messageId: external_exports.string().min(1),
64114
- agentId: external_exports.string().min(1),
64115
- turnKey: external_exports.string().min(1),
64116
- state: liveTurnStateSchema,
64117
- tools: external_exports.number().int().nonnegative()
64118
- })
64119
- );
64120
- var replyStepsSchema = replyStepsSchemaDefinition;
64121
64107
 
64122
64108
  // ../../modules/agent/contract/src/agent-login-trouble.ts
64123
64109
  var loginCardActionInputSchemaDefinition = external_exports.object({
@@ -65188,7 +65174,7 @@ var codexLoginRefreshInputSchemaDefinition = external_exports.object({
65188
65174
  });
65189
65175
  var AgentApi = moduleApi()("agent");
65190
65176
  var agentCoreTrpc = defineTrpcContract("agents").query("list").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(external_exports.array(agentListEntrySchema)).mutation("create").withInput(createAgentInputSchema).withOutput(agentSchema).mutation("update").withInput(updateAgentInputSchema).withOutput(agentSchema).mutation("remove").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("transfer").withInput(transferAgentInputSchema).withOutput(agentSchema).mutation("resetSession").withInput(resetAgentSessionInputSchema).withOutput(agentSchema).query("faces").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(external_exports.array(agentFaceSchema)).query("presence").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(external_exports.array(agentPresenceSchema)).mutation("uploadAvatar").withInput(uploadAgentAvatarInputSchema).withOutput(uploadedAgentAvatarSchema).query("access").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(agentAccessSchema).query("loginActivity").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(loginActivitySchema).mutation("raiseBudget").withInput(raiseBudgetInputSchema).withOutput(external_exports.object({ limitUsd: external_exports.number() })).query("permissionPrompts").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.array(agentPermissionPromptSchema)).mutation("share").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).mutation("unshare").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).query("harnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(harnessLoginsSchema).mutation("saveHarnessLogin").withInput(saveHarnessLoginInputSchema).withOutput(harnessLoginsSchema).mutation("removeHarnessLogin").withInput(removeHarnessLoginInputSchema).withOutput(harnessLoginsSchema).query("listHarnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(harnessLoginListSchema).mutation("addHarnessLogin").withInput(addHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("renameHarnessLogin").withInput(renameHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("deleteHarnessLogin").withInput(deleteHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("checkLoginUsage").withInput(checkLoginUsageInputSchema).withOutput(loginUsageCheckSchema).query("loginPools").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(loginPoolsSchema).mutation("createLoginPool").withInput(createLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("renameLoginPool").withInput(renameLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("deleteLoginPool").withInput(loginPoolRefInputSchema).withOutput(loginPoolsSchema).mutation("addPoolLogin").withInput(addPoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("removePoolLogin").withInput(removePoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("setPoolMember").withInput(setPoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("removePoolMember").withInput(removePoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("setAgentPool").withInput(setAgentPoolInputSchema).withOutput(agentSchema).mutation("openDirect").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.object({ channelId: idSchema14 })).mutation("startConversation").withInput(startConversationInputSchema).withOutput(startedConversationSchema).query("conversations").withInput(listConversationsInputSchema).withOutput(external_exports.array(conversationSummarySchema2)).mutation("joinConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("renameConversation").withInput(renameConversationInputSchema).withOutput(conversationSummarySchema2).mutation("leaveConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("deleteConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("mintLink").withInput(mintLinkInputSchema).withOutput(mintedLinkSchema).query("linkRedemption").withInput(linkRedemptionInputSchema).withOutput(linkRedemptionSchema).query("oauthRequest").withInput(oauthRequestInputSchema).withOutput(oauthRequestViewSchema).mutation("oauthApprove").withInput(approveOAuthInputSchema).withOutput(oauthRedirectSchema).mutation("oauthDeny").withInput(oauthRequestInputSchema).withOutput(oauthRedirectSchema).mutation("disconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("setGithub").withInput(setAgentGithubInputSchema).withOutput(agentSchema).query("githubWatches").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.array(agentGithubWatchSchema)).mutation("watchGithub").withInput(watchGithubInputSchema).withOutput(agentGithubWatchSchema).mutation("unwatchGithub").withInput(unwatchGithubInputSchema).withOutput(external_exports.object({ removed: external_exports.literal(true) })).build();
65191
- var agentTurnTrpc = defineTrpcContract("agents").mutation("answerAttention").withInput(answerAttentionInputSchema).withOutput(external_exports.object({ answered: external_exports.literal(true) })).mutation("stopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ stopped: external_exports.literal(true) })).query("mayStopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ allowed: external_exports.boolean() })).query("liveSteps").withInput(liveStepsInputSchema).withOutput(liveStepsSchema).query("workingNow").withInput(agentWorkingInputSchema).withOutput(agentWorkingSchema).query("replySteps").withInput(replyStepsInputSchema).withOutput(replyStepsSchema).mutation("compactSession").withInput(compactAgentSessionInputSchema).withOutput(external_exports.object({ requested: external_exports.literal(true) })).mutation("restartComputer").withInput(restartAgentComputerInputSchema).withOutput(external_exports.object({ restarted: external_exports.boolean() })).build();
65177
+ var agentTurnTrpc = defineTrpcContract("agents").mutation("answerAttention").withInput(answerAttentionInputSchema).withOutput(external_exports.object({ answered: external_exports.literal(true) })).mutation("stopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ stopped: external_exports.literal(true) })).query("mayStopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ allowed: external_exports.boolean() })).query("liveSteps").withInput(liveStepsInputSchema).withOutput(liveStepsSchema).query("workingNow").withInput(agentWorkingInputSchema).withOutput(agentWorkingSchema).mutation("compactSession").withInput(compactAgentSessionInputSchema).withOutput(external_exports.object({ requested: external_exports.literal(true) })).mutation("restartComputer").withInput(restartAgentComputerInputSchema).withOutput(external_exports.object({ restarted: external_exports.boolean() })).build();
65192
65178
  var agentChannelSettingsTrpc = defineTrpcContract("agents").query("monitors").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.array(agentMonitorSchema)).query("channelLevel").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14, channelId: idSchema14 })).withOutput(channelLevelSchema).mutation("setChannelLevel").withInput(setChannelLevelInputSchema).withOutput(channelLevelSchema).mutation("unmuteChannel").withInput(unmuteAgentChannelInputSchema).withOutput(channelLevelSchema).mutation("cancelHeld").withInput(cancelHeldInputSchema).withOutput(cancelHeldResultSchema).build();
65193
65179
  var agentJoinTrpc = defineTrpcContract("agents").query("joinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("approveJoinRequest").withInput(approveJoinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("denyJoinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).build();
65194
65180
  var agentLoginTroubleTrpc = defineTrpcContract("agents").mutation("replaceHarnessLogin").withInput(replaceHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("startHarnessSignIn").withInput(startHarnessSignInInputSchema).withOutput(harnessSignInSchema).mutation("pollHarnessSignIn").withInput(pollHarnessSignInInputSchema).withOutput(harnessSignInPollSchema).mutation("waitForLogins").withInput(loginCardActionInputSchema).withOutput(external_exports.object({ waiting: external_exports.boolean() })).mutation("useAnotherLogin").withInput(loginCardActionInputSchema).withOutput(external_exports.object({ loginName: external_exports.string() })).build();
@@ -79527,6 +79513,12 @@ function diskLine(status9) {
79527
79513
  const over = DISK_STATE_TEXT[disk.state];
79528
79514
  return `Disk: ${gb(disk.usedGb)} of ${gb(disk.totalGb)}${measured}${over}`;
79529
79515
  }
79516
+ function servicesLine(status9) {
79517
+ const agentsGb = status9.agents.reduce((sum, agent2) => sum + agent2.memoryGb, 0);
79518
+ const servicesGb = Math.max(0, status9.memory.usedGb - agentsGb);
79519
+ if (status9.memory.usedGb <= 0) return [];
79520
+ return [` Computer services (browser, desktop, system) memory ${gb(servicesGb)}`];
79521
+ }
79530
79522
  function printStatus({ context }, status9) {
79531
79523
  const current2 = status9.sizes.find((size) => size.current);
79532
79524
  const included = status9.sizes.find((size) => size.included);
@@ -79540,6 +79532,7 @@ function printStatus({ context }, status9) {
79540
79532
  ...status9.agents.map(
79541
79533
  (agent2) => ` ${agent2.name} ${agent2.state} CPU ${Number(agent2.cpuBusy.toFixed(1))} memory ${gb(agent2.memoryGb)}`
79542
79534
  ),
79535
+ ...servicesLine(status9),
79543
79536
  ...status9.memoryStops.length > 0 ? ["Memory stops:"] : [],
79544
79537
  ...status9.memoryStops.map(
79545
79538
  (stop3) => ` ${utc(stop3.at)} ${stop3.agentName} ${stop3.command} ${gb(stop3.memoryGb)}`
@@ -84423,9 +84416,24 @@ async function startedUpdate({
84423
84416
  });
84424
84417
  return { manager: plan2.manager };
84425
84418
  }
84419
+ async function noteRelease({
84420
+ context,
84421
+ mine: mine4,
84422
+ server,
84423
+ sandbox,
84424
+ quiet
84425
+ }) {
84426
+ const warning = releaseWarningOf({ mine: mine4, server, sandbox });
84427
+ if (!warning) return false;
84428
+ const older = !sandbox && releaseSkewOf({ mine: mine4, server }) === "older";
84429
+ const started = older ? await startedUpdate({ context, server }) : null;
84430
+ if (!quiet) context.err(started ? selfUpdateLineOf({ mine: mine4, server, ...started }) : warning);
84431
+ return true;
84432
+ }
84426
84433
  function watchingRelease({
84427
84434
  context,
84428
- mine: mine4 = cliVersionOf()
84435
+ mine: mine4 = cliVersionOf(),
84436
+ quiet = false
84429
84437
  }) {
84430
84438
  const sandbox = context.program.at(-1) === SANDBOX_CLI_PATH;
84431
84439
  let warned = false;
@@ -84434,15 +84442,7 @@ function watchingRelease({
84434
84442
  fetcher: async (input2, init) => {
84435
84443
  const response = await context.fetcher(input2, init);
84436
84444
  const server = response.headers.get(CLI_RELEASE_HEADER);
84437
- if (!warned && server) {
84438
- const warning = releaseWarningOf({ mine: mine4, server, sandbox });
84439
- if (warning) {
84440
- warned = true;
84441
- const older = !sandbox && releaseSkewOf({ mine: mine4, server }) === "older";
84442
- const started = older ? await startedUpdate({ context, server }) : null;
84443
- context.err(started ? selfUpdateLineOf({ mine: mine4, server, ...started }) : warning);
84444
- }
84445
- }
84445
+ if (!warned && server) warned = await noteRelease({ context, mine: mine4, server, sandbox, quiet });
84446
84446
  return response;
84447
84447
  }
84448
84448
  };
@@ -87536,7 +87536,8 @@ async function runCli({
87536
87536
  return command || args.flags.help ? 0 : 2;
87537
87537
  }
87538
87538
  try {
87539
- return await command({ context: watchingRelease({ context }), args }) ?? 0;
87539
+ const quiet = args.words[0] === "hook";
87540
+ return await command({ context: watchingRelease({ context, quiet }), args }) ?? 0;
87540
87541
  } catch (error62) {
87541
87542
  if (error62 instanceof CliUsageError) context.err(`${error62.message}
87542
87543
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
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",