@lazehq/cli 0.1.58 → 0.1.59

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 +11 -4
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -35882,7 +35882,7 @@ function flagText({
35882
35882
  }
35883
35883
 
35884
35884
  // src/rules/cli-version.rules.ts
35885
- var STAMPED = "0.1.58";
35885
+ var STAMPED = "0.1.59";
35886
35886
  function cliVersionOf({ stamped = STAMPED } = {}) {
35887
35887
  return stamped.startsWith("__") ? "dev" : stamped;
35888
35888
  }
@@ -65391,6 +65391,8 @@ var agentMigrationSchemaDefinition = external_exports.object({
65391
65391
  completedAt: external_exports.iso.datetime().nullable(),
65392
65392
  /** When the agent's machine last called Laze; null when it never did. */
65393
65393
  machineLastSeenAt: external_exports.iso.datetime().nullable(),
65394
+ /** When the agent was connected locally again after this; null while it runs in Laze. */
65395
+ reversedAt: external_exports.iso.datetime().nullable(),
65394
65396
  /** The agent's DM, where the request and the notice are. */
65395
65397
  channelId: external_exports.string().nullable(),
65396
65398
  /** The notice's place in the DM, once done. */
@@ -69653,20 +69655,24 @@ function waitSecondsOf({ args }) {
69653
69655
  async function refuseOtherSessionsInbox({
69654
69656
  context,
69655
69657
  args,
69656
- name: name3
69658
+ name: name3,
69659
+ client
69657
69660
  }) {
69658
69661
  if (args.flags.take) return;
69659
69662
  const bound = Object.entries((await context.store.read()).sessions ?? {}).filter(([, profile]) => profile === name3).map(([key]) => key);
69660
69663
  if (bound.length === 0) return;
69661
69664
  const here = await currentSessionOf({ context, args });
69662
69665
  if (here && bound.includes(sessionKeyOf({ session: here }))) return;
69666
+ await client.get("/api/agents/me").catch((error62) => {
69667
+ if (migratedNoticeOf(error62)) throw error62;
69668
+ });
69663
69669
  throw new CliUsageError(
69664
69670
  `${name3} is bound to the session ${bound.join(", ")}, and reading its inbox here would take those messages away from it. Read the channel with \`laze history <channel>\` instead, or pass --take to take them anyway.`
69665
69671
  );
69666
69672
  }
69667
69673
  async function inbox({ context, args }) {
69668
69674
  const { client, name: name3, profile } = await signedIn({ context, args });
69669
- if (profile.kind === "agent") await refuseOtherSessionsInbox({ context, args, name: name3 });
69675
+ if (profile.kind === "agent") await refuseOtherSessionsInbox({ context, args, name: name3, client });
69670
69676
  const waitSeconds = waitSecondsOf({ args });
69671
69677
  const messages = await receiveMessages({ context, client, waitSeconds });
69672
69678
  if (profile.kind === "agent" && context.environment.harness === "claude-code") {
@@ -73579,11 +73585,12 @@ async function migrate({ context, args }) {
73579
73585
  function statusLines(migration) {
73580
73586
  const removed = migration.removed;
73581
73587
  return [
73582
- `${migration.agentName}: ${migration.status}`,
73588
+ `${migration.agentName}: ${migration.reversedAt ? "connected locally again" : migration.status}`,
73583
73589
  `From ${HARNESS_NAMES3[migration.source] ?? migration.source} to ${targetOf(migration)}`,
73584
73590
  `Session: ${migration.mode === "resume" ? "resumed" : "started fresh from a summary"}`,
73585
73591
  `Asked: ${migration.requestedAt}`,
73586
73592
  ...migration.completedAt ? [`Done: ${migration.completedAt}`] : [],
73593
+ ...migration.reversedAt ? [`Connected locally again: ${migration.reversedAt}`] : [],
73587
73594
  ...removed ? [
73588
73595
  `Secrets removed: ${removed.local} on the machine, ${removed.vault} vault values, ${removed.patterns} key-shaped texts`
73589
73596
  ] : [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
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",