@lazehq/cli 0.1.132 → 0.1.133

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 +13 -5
  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.132";
36963
+ var STAMPED = "0.1.133";
36964
36964
  function cliVersionOf({ stamped = STAMPED } = {}) {
36965
36965
  return stamped.startsWith("__") ? "dev" : stamped;
36966
36966
  }
@@ -37286,6 +37286,11 @@ var ConfigStore = class _ConfigStore {
37286
37286
  static create({ path }) {
37287
37287
  return new _ConfigStore(path);
37288
37288
  }
37289
+ /** How a login names its profile to Laze: `name`, or `<file>:name` for another config file. */
37290
+ loginProfileOf({ name: name3 }) {
37291
+ const file4 = basename2(this.path);
37292
+ return (file4 === "config.json" ? name3 : `${file4}:${name3}`).slice(0, 80);
37293
+ }
37289
37294
  async read() {
37290
37295
  const text3 = await readFile3(this.path, "utf8").catch((error63) => {
37291
37296
  if (error63.code === "ENOENT") return void 0;
@@ -59793,7 +59798,9 @@ var startDeviceGrantInputSchemaDefinition = external_exports.object({
59793
59798
  /** What the CLI calls itself on the approval page, such as "laze on build-box". */
59794
59799
  clientName: external_exports.string().trim().min(1).max(80).default("laze CLI"),
59795
59800
  /** The machine key the CLI made; the key it receives is bound to it. */
59796
- machineKey: machineKeyRegistrationSchema.optional()
59801
+ machineKey: machineKeyRegistrationSchema.optional(),
59802
+ /** The CLI profile signing in; a later login of that profile on this machine replaces the key. */
59803
+ profile: external_exports.string().trim().min(1).max(80).optional()
59797
59804
  });
59798
59805
  var startedDeviceGrantSchemaDefinition = external_exports.object({
59799
59806
  /** Eight characters the person sees and the approval page asks for. */
@@ -88104,7 +88111,7 @@ async function login({ context, args }) {
88104
88111
  const url2 = serverUrlOf({ context, args });
88105
88112
  const name3 = flagText({ args, name: "profile", fallback: "default" });
88106
88113
  const given = flagText({ args, name: "token" });
88107
- const token2 = given || await deviceToken({ context, url: url2, args });
88114
+ const token2 = given || await deviceToken({ context, url: url2, args, profile: name3 });
88108
88115
  const profile = await profileOf({ context, url: url2, token: token2 });
88109
88116
  const here = Boolean(args.flags.here);
88110
88117
  await context.store.saveProfile({
@@ -88129,7 +88136,8 @@ async function machineLine({ context }) {
88129
88136
  async function deviceToken({
88130
88137
  context,
88131
88138
  url: url2,
88132
- args
88139
+ args,
88140
+ profile
88133
88141
  }) {
88134
88142
  const client = LazeClient.create({ baseUrl: url2, fetcher: context.fetcher });
88135
88143
  const machineKey = await context.machineKeys?.registration().catch(() => void 0);
@@ -88139,7 +88147,7 @@ async function deviceToken({
88139
88147
  name: "client",
88140
88148
  fallback: `laze CLI on ${hostname8()}`.slice(0, 80)
88141
88149
  }),
88142
- ...machineKey ? { machineKey } : {}
88150
+ ...machineKey ? { machineKey, profile: context.store.loginProfileOf({ name: profile }) } : {}
88143
88151
  });
88144
88152
  context.out(
88145
88153
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.132",
3
+ "version": "0.1.133",
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",