@lazehq/cli 0.1.134 → 0.1.135

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 +67 -19
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -36960,7 +36960,7 @@ function shadowedLinkLineOf({ shadow }) {
36960
36960
  }
36961
36961
 
36962
36962
  // src/rules/cli-version.rules.ts
36963
- var STAMPED = "0.1.134";
36963
+ var STAMPED = "0.1.135";
36964
36964
  function cliVersionOf({ stamped = STAMPED } = {}) {
36965
36965
  return stamped.startsWith("__") ? "dev" : stamped;
36966
36966
  }
@@ -37534,7 +37534,8 @@ var SWITCHES = /* @__PURE__ */ new Set([
37534
37534
  "all",
37535
37535
  "resend",
37536
37536
  "replace",
37537
- "ask"
37537
+ "ask",
37538
+ "real-value"
37538
37539
  ]);
37539
37540
  function parseArgs({ argv }) {
37540
37541
  const words = [];
@@ -60218,7 +60219,9 @@ var vaultValueShapeSchemaDefinition = external_exports.object({
60218
60219
  var vaultValueShapeSchema = vaultValueShapeSchemaDefinition;
60219
60220
  var vaultBoundaryHandoutSchemaDefinition = external_exports.object({
60220
60221
  connectionId: external_exports.string(),
60221
- shapes: external_exports.record(external_exports.string(), vaultValueShapeSchema).optional()
60222
+ shapes: external_exports.record(external_exports.string(), vaultValueShapeSchema).optional(),
60223
+ /** The fields that hold a placeholder on the computer; the release's other fields are values. */
60224
+ fields: external_exports.array(external_exports.string()).optional()
60222
60225
  });
60223
60226
  var vaultBoundaryHandoutSchema = vaultBoundaryHandoutSchemaDefinition;
60224
60227
  var vaultEgressHostSchemaDefinition = external_exports.object({
@@ -61049,12 +61052,16 @@ var vaultEgressReleaseInputSchemaDefinition = external_exports.object({
61049
61052
  /** The run's P-256 public key, base64url; a sealed connection is released only to it. */
61050
61053
  recipient: external_exports.string().max(200).optional(),
61051
61054
  /** Set by a computer's egress proxy: a key it swaps comes back as shapes, not values. */
61052
- placeholders: external_exports.boolean().default(false)
61055
+ placeholders: external_exports.boolean().default(false),
61056
+ /** `laze vault run --value` on a computer: the real value in place of the stand-in, if judged. */
61057
+ realValue: external_exports.boolean().default(false)
61053
61058
  });
61054
61059
  var vaultEgressReleaseInputSchema = vaultEgressReleaseInputSchemaDefinition;
61060
+ var vaultRunHandoutSchema = external_exports.enum(["placeholders", "real_value", "value"]);
61055
61061
  var vaultEgressStatusInputSchemaDefinition = external_exports.object({
61056
61062
  agentId: external_exports.string().min(1),
61057
- requestId: external_exports.string().min(1)
61063
+ requestId: external_exports.string().min(1),
61064
+ handout: vaultRunHandoutSchema.default("value")
61058
61065
  });
61059
61066
  var vaultApprovalStateSchema = external_exports.enum([
61060
61067
  "pending",
@@ -62507,7 +62514,7 @@ var vaultSessionSchemaDefinition = external_exports.object({
62507
62514
  });
62508
62515
  var vaultSessionSchema = vaultSessionSchemaDefinition;
62509
62516
  var vaultSessionReleaseInputSchemaDefinition = external_exports.object({
62510
- ...vaultEgressReleaseInputSchema.omit({ agentId: true, placeholders: true }).shape,
62517
+ ...vaultEgressReleaseInputSchema.omit({ agentId: true, placeholders: true, realValue: true }).shape,
62511
62518
  session: vaultSessionSchema
62512
62519
  });
62513
62520
  var vaultSessionStatusInputSchemaDefinition = external_exports.object({
@@ -65696,7 +65703,9 @@ var approvalNoticeSchema = external_exports.object({
65696
65703
  /** The chat message holding the card, or the feed when there is none. */
65697
65704
  path: external_exports.string().startsWith("/").max(1024),
65698
65705
  /** The person's Notifications count, from chat: the iPhone's icon badge shows it. */
65699
- badge: external_exports.number().int().nonnegative().optional()
65706
+ badge: external_exports.number().int().nonnegative().optional(),
65707
+ /** The connector it asks for, as a picture: its logo, or the vault ring for a plain key. */
65708
+ avatar: noticeAvatarSchemaDefinition.optional()
65700
65709
  });
65701
65710
  var feedNoticeSchema = external_exports.object({
65702
65711
  workspaceId: workspaceIdSchema2,
@@ -72117,6 +72126,7 @@ var agentTurnTokenSchemaDefinition = external_exports.object({
72117
72126
  var {
72118
72127
  agentId: _agentId,
72119
72128
  placeholders: _placeholders,
72129
+ realValue: _realValue,
72120
72130
  ...releaseShape
72121
72131
  } = vaultEgressReleaseInputSchema.shape;
72122
72132
  var agentVaultReleaseInputSchemaDefinition = external_exports.object({
@@ -73128,7 +73138,7 @@ var AGENT_MCP_TOOLS = [
73128
73138
  name: "support_read_thread",
73129
73139
  operationId: "supportAgentThread",
73130
73140
  readOnly: true,
73131
- description: "Laze Support only: read the support thread your turn names, as plain text."
73141
+ description: "Laze Support only: read the support thread your turn names: its text, voice notes' words, and its newest pictures to look at."
73132
73142
  },
73133
73143
  {
73134
73144
  name: "support_answer",
@@ -85457,16 +85467,18 @@ async function handedOut({
85457
85467
  () => void 0
85458
85468
  );
85459
85469
  context.err(
85460
- `laze vault: ${Object.keys(fields).join(", ")} of ${name3} ${Object.keys(fields).length === 1 ? "holds" : "hold"} a stand-in; Laze's proxy puts the key in only on sites approved for it. A command that needs the value itself (signing, a database) needs ${name3} marked "Used on the computer only".
85470
+ `laze vault: ${Object.keys(fields).join(", ")} of ${name3} ${Object.keys(fields).length === 1 ? "holds" : "hold"} a stand-in; Laze's proxy puts the key in only on sites approved for it. A command that needs the value itself (signing, SSH, a database) can ask for it with laze vault run --real-value.
85461
85471
  `
85462
85472
  );
85463
85473
  }
85464
85474
 
85465
85475
  // src/services/vault-commands.service.ts
85466
- var USAGE3 = `Usage: laze vault run <connection> --reason "<one plain sentence>" [--wait <s>] -- <command> [args...]
85476
+ var USAGE3 = `Usage: laze vault run <connection> --reason "<one plain sentence>" [--wait <s>] [--real-value] -- <command> [args...]
85467
85477
  Runs the command with the connection's values in its environment, on a Laze agent's computer,
85468
85478
  on a machine it runs on, where a connected agent runs, or signed in as yourself, where it asks
85469
85479
  as the calling Claude Code, Codex, Kanban or terminal session.
85480
+ --real-value on a Laze computer: the key's real value, not the stand-in, for a command that
85481
+ signs or connects with it itself (SSH, a database, AWS); the vault judges each ask
85470
85482
  --channel <id> the conversation whose turn it runs in, when the agent answers in several
85471
85483
  --as <name> the session's name on the card when signed in as yourself (or LAZE_SESSION_NAME)`;
85472
85484
  var POLL_MS = 3e3;
@@ -85636,13 +85648,22 @@ function leaseHolds({
85636
85648
  const ends = release2.sealed?.leaseEndsAt;
85637
85649
  return ends !== void 0 && Temporal3.Instant.from(ends).epochMilliseconds > nowMs2;
85638
85650
  }
85651
+ function standInFieldsOf({
85652
+ env,
85653
+ boundary
85654
+ }) {
85655
+ const named = boundary.fields;
85656
+ if (!named) return { ...env };
85657
+ return Object.fromEntries(Object.entries(env).filter(([field]) => named.includes(field)));
85658
+ }
85639
85659
  async function vaultRelease({
85640
85660
  context,
85641
85661
  args,
85642
85662
  connection,
85643
85663
  reason: reason2,
85644
85664
  command,
85645
- value = false
85665
+ value = false,
85666
+ realValue = false
85646
85667
  }) {
85647
85668
  const deadline = deadlineOf({ args, nowMs: context.nowMs() });
85648
85669
  const env = context.environment.inherited;
@@ -85660,7 +85681,8 @@ async function vaultRelease({
85660
85681
  reason: reason2,
85661
85682
  command,
85662
85683
  recipient: run4.publicKey,
85663
- ...value && { value: true }
85684
+ ...value && { value: true },
85685
+ ...realValue && { realValue: true }
85664
85686
  });
85665
85687
  let release2;
85666
85688
  try {
@@ -85786,11 +85808,20 @@ ${USAGE3}`);
85786
85808
  );
85787
85809
  return 1;
85788
85810
  }
85789
- const released = await vaultRelease({ context, args, connection, reason: reason2, command: args.rest });
85811
+ const realValue = args.flags["real-value"] === true;
85812
+ const released = await vaultRelease({
85813
+ context,
85814
+ args,
85815
+ connection,
85816
+ reason: reason2,
85817
+ command: args.rest,
85818
+ realValue
85819
+ });
85790
85820
  if ("exitCode" in released) return released.exitCode;
85791
85821
  if (released.boundary) {
85792
85822
  const { connectionId } = released.boundary;
85793
- await handedOut({ context, name: connection, connectionId, fields: released.env });
85823
+ const fields = standInFieldsOf({ env: released.env, boundary: released.boundary });
85824
+ await handedOut({ context, name: connection, connectionId, fields });
85794
85825
  }
85795
85826
  const prepared = preparedCommand({
85796
85827
  command: args.rest,
@@ -93966,7 +93997,7 @@ async function answerSupportLine({
93966
93997
  const scoped = client.withHeaders({ "x-laze-turn": turn });
93967
93998
  try {
93968
93999
  const answer6 = call.body === void 0 ? await scoped.get(call.path) : await scoped.post(call.path, call.body);
93969
- return rpc(id8, { result: { content: [{ type: "text", text: JSON.stringify(answer6) }] } });
94000
+ return rpc(id8, { result: { content: contentOf(answer6) } });
93970
94001
  } catch (error63) {
93971
94002
  if (!(error63 instanceof LazeApiError)) throw error63;
93972
94003
  const text3 = `${error63.code}: ${error63.message}`;
@@ -93989,6 +94020,20 @@ function routeOf({
93989
94020
  }
93990
94021
  return null;
93991
94022
  }
94023
+ function contentOf(answer6) {
94024
+ const { images, ...rest } = recordOf3(answer6);
94025
+ const pictures = Array.isArray(images) ? images.map(recordOf3) : [];
94026
+ if (pictures.length === 0) return [{ type: "text", text: JSON.stringify(answer6) }];
94027
+ return [
94028
+ { type: "text", text: JSON.stringify(rest) },
94029
+ ...pictures.flatMap(
94030
+ ({ attachmentId, messageId, data, contentType }) => typeof data === "string" && typeof contentType === "string" ? [
94031
+ { type: "text", text: `Picture ${String(attachmentId)} on line ${String(messageId)}:` },
94032
+ { type: "image", data, mimeType: contentType }
94033
+ ] : []
94034
+ )
94035
+ ];
94036
+ }
93992
94037
  function rpc(id8, body) {
93993
94038
  return JSON.stringify({ jsonrpc: "2.0", id: id8, ...body });
93994
94039
  }
@@ -97534,6 +97579,8 @@ var feedApprovalSchemaDefinition = external_exports.object({
97534
97579
  /** The app, for an `app_publish` or `app_access` card. */
97535
97580
  appId: external_exports.string().nullable(),
97536
97581
  subject: external_exports.string(),
97582
+ /** A vault card's connector ("Gmail") when its key is one, so the card shows that logo. */
97583
+ service: external_exports.string().nullable().optional(),
97537
97584
  action: external_exports.string(),
97538
97585
  agentId: external_exports.string(),
97539
97586
  reason: external_exports.string(),
@@ -100138,7 +100185,7 @@ var PERSONAL_WORDS = {
100138
100185
  };
100139
100186
  var printJson9 = (context, data) => context.out(`${JSON.stringify(data, null, 2)}
100140
100187
  `);
100141
- function contentOf({ value, flag: flag2 }) {
100188
+ function contentOf2({ value, flag: flag2 }) {
100142
100189
  if (value === "full" || value === "metadata") return value;
100143
100190
  throw new CliUsageError(`${flag2} takes full or metadata.
100144
100191
  ${LANGWATCH_USAGE}`);
@@ -100258,7 +100305,7 @@ ${LANGWATCH_USAGE}`);
100258
100305
  }
100259
100306
  async function turnOn2({ context, args }) {
100260
100307
  const content = args.flags.content;
100261
- const level2 = content === void 0 ? void 0 : contentOf({ value: flagText({ args, name: "content" }), flag: "--content" });
100308
+ const level2 = content === void 0 ? void 0 : contentOf2({ value: flagText({ args, name: "content" }), flag: "--content" });
100262
100309
  const { client } = await signedIn({ context, args });
100263
100310
  const integration = await client.post(
100264
100311
  LANGWATCH_REST_PATHS.enable,
@@ -100283,7 +100330,7 @@ ${LANGWATCH_USAGE}`);
100283
100330
  }
100284
100331
  async function level({ context, args }) {
100285
100332
  const personalLevel = personalOf({ args });
100286
- const team = args.words[2] === void 0 && personalLevel !== void 0 ? void 0 : contentOf({ value: args.words[2], flag: "level" });
100333
+ const team = args.words[2] === void 0 && personalLevel !== void 0 ? void 0 : contentOf2({ value: args.words[2], flag: "level" });
100287
100334
  const { client } = await signedIn({ context, args });
100288
100335
  const integration = await client.post(LANGWATCH_REST_PATHS.level, {
100289
100336
  ...team ? { level: team } : {},
@@ -105567,7 +105614,8 @@ async function releaseBatch({
105567
105614
  for (const [key, release2] of settled3) {
105568
105615
  if (release2.outcome !== "allow" || !release2.boundary) continue;
105569
105616
  const { connectionId } = release2.boundary;
105570
- await handedOut({ context, name: key, connectionId, fields: release2.env });
105617
+ const fields = standInFieldsOf({ env: release2.env, boundary: release2.boundary });
105618
+ await handedOut({ context, name: key, connectionId, fields });
105571
105619
  }
105572
105620
  return outcome;
105573
105621
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.134",
3
+ "version": "0.1.135",
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",