@lazehq/cli 0.1.44 → 0.1.45

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 +68 -13
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -31578,9 +31578,10 @@ function runRedacted({
31578
31578
  stdout: stdout2,
31579
31579
  stderr: stderr2,
31580
31580
  cwd,
31581
- signal
31581
+ signal,
31582
+ redact
31582
31583
  }) {
31583
- const values = Object.values(env);
31584
+ const values = redact ?? Object.values(env);
31584
31585
  return new Promise((resolve19, reject) => {
31585
31586
  const [file3, ...args] = command;
31586
31587
  const child = spawn(file3, args, {
@@ -35711,7 +35712,7 @@ function flagText({
35711
35712
  }
35712
35713
 
35713
35714
  // src/rules/cli-version.rules.ts
35714
- var STAMPED = "0.1.44";
35715
+ var STAMPED = "0.1.45";
35715
35716
  function cliVersionOf({ stamped = STAMPED } = {}) {
35716
35717
  return stamped.startsWith("__") ? "dev" : stamped;
35717
35718
  }
@@ -58381,7 +58382,9 @@ var feedCardSchemaDefinition = external_exports.object({
58381
58382
  });
58382
58383
  var failureCardSchemaDefinition = external_exports.object({
58383
58384
  type: external_exports.literal("failure"),
58384
- details: external_exports.string().min(1).max(NOTICE_DETAILS_MAX)
58385
+ details: external_exports.string().min(1).max(NOTICE_DETAILS_MAX),
58386
+ /** An agent's failed turn: Try again sends this person's message to the agent again. */
58387
+ retry: external_exports.object({ agentId: idSchema4, messageId: idSchema4 }).optional()
58385
58388
  });
58386
58389
  var messageCardSchemaDefinition = external_exports.discriminatedUnion("type", [
58387
58390
  attentionCardSchemaDefinition,
@@ -63189,6 +63192,14 @@ var stopAgentTurnInputSchemaDefinition = external_exports.object({
63189
63192
  channelId: idSchema6
63190
63193
  });
63191
63194
  var stopAgentTurnInputSchema = stopAgentTurnInputSchemaDefinition;
63195
+ var retryAgentTurnInputSchemaDefinition = external_exports.object({
63196
+ workspaceId: workspaceIdSchema3,
63197
+ agentId: idSchema6,
63198
+ channelId: idSchema6,
63199
+ /** The person's message the failed turn was on. */
63200
+ messageId: idSchema6
63201
+ });
63202
+ var retryAgentTurnInputSchema = retryAgentTurnInputSchemaDefinition;
63192
63203
  var compactAgentSessionInputSchemaDefinition = external_exports.object({
63193
63204
  workspaceId: workspaceIdSchema3,
63194
63205
  agentId: idSchema6,
@@ -65120,7 +65131,9 @@ var inboxMessageSchemaDefinition = external_exports.object({
65120
65131
  body: external_exports.string(),
65121
65132
  postedAt: external_exports.iso.datetime(),
65122
65133
  /** On the first message of each conversation in a catch up (agent-catch-up.feature). */
65123
- catchUp: inboxCatchUpSchema.optional()
65134
+ catchUp: inboxCatchUpSchema.optional(),
65135
+ /** Set from 2 on when a person pressed Try again: the same turn, tried once more. */
65136
+ attempt: external_exports.number().int().min(2).optional()
65124
65137
  });
65125
65138
  var receiveInboxInputSchemaDefinition = external_exports.object({
65126
65139
  waitSeconds: external_exports.coerce.number().int().min(0).max(INBOX_WAIT_MAX_SECONDS).default(0),
@@ -65325,7 +65338,7 @@ var codexLoginRefreshInputSchemaDefinition = external_exports.object({
65325
65338
  });
65326
65339
  var AgentApi = moduleApi()("agent");
65327
65340
  var agentCoreTrpc = defineTrpcContract("agents").query("list").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(external_exports.array(agentListEntrySchema)).mutation("create").withInput(createAgentInputSchema).withOutput(agentSchema).mutation("update").withInput(updateAgentInputSchema).withOutput(agentSchema).mutation("remove").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("transfer").withInput(transferAgentInputSchema).withOutput(agentSchema).mutation("resetSession").withInput(resetAgentSessionInputSchema).withOutput(agentSchema).query("faces").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(external_exports.array(agentFaceSchema)).query("presence").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(external_exports.array(agentPresenceSchema)).mutation("uploadAvatar").withInput(uploadAgentAvatarInputSchema).withOutput(uploadedAgentAvatarSchema).query("access").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(agentAccessSchema).query("loginActivity").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(loginActivitySchema).mutation("raiseBudget").withInput(raiseBudgetInputSchema).withOutput(external_exports.object({ limitUsd: external_exports.number() })).query("permissionPrompts").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.array(agentPermissionPromptSchema)).mutation("share").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).mutation("unshare").withInput(shareAgentInputSchema).withOutput(agentAccessSchema).query("harnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(harnessLoginsSchema).mutation("saveHarnessLogin").withInput(saveHarnessLoginInputSchema).withOutput(harnessLoginsSchema).mutation("removeHarnessLogin").withInput(removeHarnessLoginInputSchema).withOutput(harnessLoginsSchema).query("listHarnessLogins").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(harnessLoginListSchema).mutation("addHarnessLogin").withInput(addHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("renameHarnessLogin").withInput(renameHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("deleteHarnessLogin").withInput(deleteHarnessLoginInputSchema).withOutput(harnessLoginListSchema).mutation("checkLoginUsage").withInput(checkLoginUsageInputSchema).withOutput(loginUsageCheckSchema).query("loginPools").withInput(external_exports.object({ workspaceId: workspaceIdSchema10 })).withOutput(loginPoolsSchema).mutation("createLoginPool").withInput(createLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("renameLoginPool").withInput(renameLoginPoolInputSchema).withOutput(loginPoolsSchema).mutation("deleteLoginPool").withInput(loginPoolRefInputSchema).withOutput(loginPoolsSchema).mutation("addPoolLogin").withInput(addPoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("removePoolLogin").withInput(removePoolLoginInputSchema).withOutput(loginPoolsSchema).mutation("setPoolMember").withInput(setPoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("removePoolMember").withInput(removePoolMemberInputSchema).withOutput(loginPoolsSchema).mutation("setAgentPool").withInput(setAgentPoolInputSchema).withOutput(agentSchema).mutation("openDirect").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.object({ channelId: idSchema14 })).mutation("startConversation").withInput(startConversationInputSchema).withOutput(startedConversationSchema).query("conversations").withInput(listConversationsInputSchema).withOutput(external_exports.array(conversationSummarySchema2)).mutation("joinConversation").withInput(conversationInputSchema).withOutput(conversationSummarySchema2).mutation("renameConversation").withInput(renameConversationInputSchema).withOutput(conversationSummarySchema2).mutation("leaveConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("deleteConversation").withInput(conversationInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("mintLink").withInput(mintLinkInputSchema).withOutput(mintedLinkSchema).query("linkRedemption").withInput(linkRedemptionInputSchema).withOutput(linkRedemptionSchema).query("oauthRequest").withInput(oauthRequestInputSchema).withOutput(oauthRequestViewSchema).mutation("oauthApprove").withInput(approveOAuthInputSchema).withOutput(oauthRedirectSchema).mutation("oauthDeny").withInput(oauthRequestInputSchema).withOutput(oauthRedirectSchema).mutation("disconnect").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.object({ disconnected: external_exports.literal(true) })).mutation("setGithub").withInput(setAgentGithubInputSchema).withOutput(agentSchema).query("githubWatches").withInput(external_exports.object({ workspaceId: workspaceIdSchema10, agentId: idSchema14 })).withOutput(external_exports.array(agentGithubWatchSchema)).mutation("watchGithub").withInput(watchGithubInputSchema).withOutput(agentGithubWatchSchema).mutation("unwatchGithub").withInput(unwatchGithubInputSchema).withOutput(external_exports.object({ removed: external_exports.literal(true) })).build();
65328
- var agentTurnTrpc = defineTrpcContract("agents").mutation("answerAttention").withInput(answerAttentionInputSchema).withOutput(external_exports.object({ answered: external_exports.literal(true) })).mutation("stopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ stopped: external_exports.literal(true) })).query("mayStopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ allowed: external_exports.boolean() })).query("liveSteps").withInput(liveStepsInputSchema).withOutput(liveStepsSchema).query("workingNow").withInput(agentWorkingInputSchema).withOutput(agentWorkingSchema).mutation("compactSession").withInput(compactAgentSessionInputSchema).withOutput(external_exports.object({ requested: external_exports.literal(true) })).mutation("restartComputer").withInput(restartAgentComputerInputSchema).withOutput(external_exports.object({ restarted: external_exports.boolean() })).build();
65341
+ var agentTurnTrpc = defineTrpcContract("agents").mutation("answerAttention").withInput(answerAttentionInputSchema).withOutput(external_exports.object({ answered: external_exports.literal(true) })).mutation("stopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ stopped: external_exports.literal(true) })).query("mayStopTurn").withInput(stopAgentTurnInputSchema).withOutput(external_exports.object({ allowed: external_exports.boolean() })).mutation("retryTurn").withInput(retryAgentTurnInputSchema).withOutput(external_exports.object({ retried: external_exports.literal(true) })).query("liveSteps").withInput(liveStepsInputSchema).withOutput(liveStepsSchema).query("workingNow").withInput(agentWorkingInputSchema).withOutput(agentWorkingSchema).mutation("compactSession").withInput(compactAgentSessionInputSchema).withOutput(external_exports.object({ requested: external_exports.literal(true) })).mutation("restartComputer").withInput(restartAgentComputerInputSchema).withOutput(external_exports.object({ restarted: external_exports.boolean() })).build();
65329
65342
  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();
65330
65343
  var agentJoinTrpc = defineTrpcContract("agents").query("joinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("approveJoinRequest").withInput(approveJoinRequestInputSchema).withOutput(joinRequestViewSchema).mutation("denyJoinRequest").withInput(joinRequestInputSchema).withOutput(joinRequestViewSchema).build();
65331
65344
  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();
@@ -65360,6 +65373,7 @@ var AgentConnectDialogSlot = agentUi.component("connectDialog");
65360
65373
  var AgentChannelLevelSlot = agentUi.component("channelLevel");
65361
65374
  var AgentMuteNoticeSlot = agentUi.component("muteNotice");
65362
65375
  var AgentHopLimitNoticeSlot = agentUi.component("hopLimitNotice");
65376
+ var AgentRetryTurnSlot = agentUi.component("retryTurn");
65363
65377
  var AgentHeldNoticeSlot = agentUi.component("heldNotice");
65364
65378
 
65365
65379
  // ../../modules/agent/contract/src/agent.config.ts
@@ -65469,6 +65483,19 @@ var stopTurnAsCallerInputSchemaDefinition = external_exports.object({
65469
65483
  agent: agentRefSchema6,
65470
65484
  channelId: idSchema15
65471
65485
  });
65486
+ var retryTurnAsCallerInputSchemaDefinition = external_exports.object({
65487
+ agent: agentRefSchema6,
65488
+ channelId: idSchema15,
65489
+ messageId: idSchema15
65490
+ });
65491
+ var postTurnFailureAsCallerInputSchemaDefinition = external_exports.object({
65492
+ channelId: idSchema15,
65493
+ threadRootId: idSchema15.optional(),
65494
+ /** The person's message the turn was on, which Try again sends to the agent again. */
65495
+ messageId: idSchema15,
65496
+ line: external_exports.string().trim().min(1).max(1e3),
65497
+ details: external_exports.string().trim().min(1).max(2e3)
65498
+ });
65472
65499
  var mintLinkAsCallerInputSchemaDefinition = external_exports.object({
65473
65500
  /** Left out, the agent that joins with the link names itself. */
65474
65501
  name: external_exports.string().trim().max(80).optional(),
@@ -66262,6 +66289,17 @@ async function stopAgentTurn({ context, args }) {
66262
66289
  context.out(`Stopped ${agent2}'s turn.
66263
66290
  `);
66264
66291
  }
66292
+ async function retryAgentTurn({ context, args }) {
66293
+ const usage = "Usage: laze agent retry <agent> --channel <channelId> --message <messageId>";
66294
+ const agent2 = agentWord({ args, usage });
66295
+ const channelId = flagText({ args, name: "channel" });
66296
+ const messageId = flagText({ args, name: "message" });
66297
+ if (!channelId || !messageId) throw new CliUsageError(usage);
66298
+ const { client } = await signedIn({ context, args });
66299
+ await client.post("/api/agents/retry", { agent: agent2, channelId, messageId });
66300
+ context.out(`Sent the message to ${agent2} again.
66301
+ `);
66302
+ }
66265
66303
  async function disconnectAgent({ context, args }) {
66266
66304
  const agent2 = agentWord({ args, usage: "Usage: laze agent disconnect <agent>" });
66267
66305
  const { client } = await signedIn({ context, args });
@@ -86090,9 +86128,9 @@ function refusalOf({
86090
86128
  settled: settled2
86091
86129
  }) {
86092
86130
  const codes = [];
86093
- for (const [key, release2] of settled2) {
86131
+ for (const release2 of settled2.values()) {
86094
86132
  if (release2.outcome !== "deny") continue;
86095
- context.err(`laze vault: ${key}: ${release2.message}
86133
+ context.err(`${release2.message}
86096
86134
  `);
86097
86135
  codes.push(release2.exitCode || 1);
86098
86136
  }
@@ -86148,6 +86186,16 @@ Prints AWS credential_process JSON with a short-lived STS session minted from th
86148
86186
  With -- <command>, runs it with AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN set.
86149
86187
  The reason comes from --reason, else KV_REASON or LAZE_VAULT_REASON: set it on each aws, kubectl,
86150
86188
  helm or terraform command, which reach this through credential_process.`;
86189
+ function withWaitSeconds(args) {
86190
+ if (args.flags.wait !== true) return args;
86191
+ const at = args.words.findLastIndex((word3, index) => index >= 2 && /^\d+$/.test(word3));
86192
+ if (at === -1) return args;
86193
+ return {
86194
+ ...args,
86195
+ words: args.words.filter((_, index) => index !== at),
86196
+ flags: { ...args.flags, wait: args.words[at] ?? "" }
86197
+ };
86198
+ }
86151
86199
  function reasonOf({ context, args }) {
86152
86200
  const env = context.environment.inherited;
86153
86201
  return flagText({ args, name: "reason" }) || env.KV_REASON?.trim() || env.LAZE_VAULT_REASON?.trim() || "";
@@ -86226,8 +86274,9 @@ function wrappedCommandOf(args) {
86226
86274
  }
86227
86275
  async function vaultEnv2({
86228
86276
  context,
86229
- args
86277
+ args: given
86230
86278
  }) {
86279
+ const args = withWaitSeconds(given);
86231
86280
  if (args.flags.help) {
86232
86281
  context.out(`${ENV_USAGE}
86233
86282
  `);
@@ -86262,12 +86311,14 @@ ${ENV_USAGE}`);
86262
86311
  `);
86263
86312
  return 0;
86264
86313
  }
86265
- return context.runCommand({ command: args.rest, env });
86314
+ const redact = [...released.values()].flatMap(({ fields }) => Object.values(fields));
86315
+ return context.runCommand({ command: args.rest, env, redact });
86266
86316
  }
86267
86317
  async function vaultAws({
86268
86318
  context,
86269
- args
86319
+ args: given
86270
86320
  }) {
86321
+ const args = withWaitSeconds(given);
86271
86322
  const connection = args.words[2];
86272
86323
  if (!connection || args.flags.help) throw new CliUsageError(AWS_USAGE);
86273
86324
  const reason = reasonOf({ context, args });
@@ -87933,6 +87984,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
87933
87984
  laze agent permission-prompts <agent> each permission prompt its harness raised and rush's answer
87934
87985
  laze agent share|unshare <agent> --person <userId> | --channel <channelId> share it (its owner)
87935
87986
  laze agent stop <agent> --channel <channelId> stop its running turn there
87987
+ laze agent retry <agent> --channel <id> --message <id> Try again on its failed turn on that message
87936
87988
  laze agent invite [--name <name>] [--channel <id>] a one-time link that connects a new agent;
87937
87989
  without --name the agent picks its own
87938
87990
  laze agent faces every agent's sloth seed or picture
@@ -88186,6 +88238,7 @@ var COMMANDS3 = {
88186
88238
  "agent unshare": shareAgent,
88187
88239
  "agent dm": openAgentDirect,
88188
88240
  "agent stop": stopAgentTurn,
88241
+ "agent retry": retryAgentTurn,
88189
88242
  "agent disconnect": disconnectAgent,
88190
88243
  "agent invite": inviteAgent,
88191
88244
  "mcp gateway": serveMcpGateway,
@@ -88345,7 +88398,8 @@ async function runCommand({
88345
88398
  env,
88346
88399
  stdout: stdout2 = process.stdout,
88347
88400
  stderr: stderr2 = process.stderr,
88348
- signal
88401
+ signal,
88402
+ redact
88349
88403
  }) {
88350
88404
  const [program = "", ...rest] = command;
88351
88405
  try {
@@ -88355,7 +88409,8 @@ async function runCommand({
88355
88409
  baseEnv: inherited,
88356
88410
  stdout: stdout2,
88357
88411
  stderr: stderr2,
88358
- ...signal ? { signal } : {}
88412
+ ...signal ? { signal } : {},
88413
+ ...redact ? { redact } : {}
88359
88414
  });
88360
88415
  } catch (error62) {
88361
88416
  stderr2.write(`laze vault: ${error62 instanceof Error ? error62.message : String(error62)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
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",