@lazehq/cli 0.1.106 → 0.1.107

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 +12 -6
  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.106";
36963
+ var STAMPED = "0.1.107";
36964
36964
  function cliVersionOf({ stamped = STAMPED } = {}) {
36965
36965
  return stamped.startsWith("__") ? "dev" : stamped;
36966
36966
  }
@@ -71854,7 +71854,8 @@ function serverUrlOf({ context, args }) {
71854
71854
  }
71855
71855
 
71856
71856
  // src/services/agent-access-commands.service.ts
71857
- var SHARE_USAGE = "Usage: laze agent share|unshare <agent> --person <userId> | --group <groupId> | --channel <channelId> | --agent <agent>\n laze agent share <agent> --ask --person <userId> [--agent <agent> ...]";
71857
+ var SHARE_USAGE = "Usage: laze agent share <agent> --person <userId> | --group <groupId> | --agent <agent>\n laze agent share <agent> --ask --person <userId> [--agent <agent> ...]\n laze agent unshare <agent> --person <userId> | --group <groupId> | --channel <channelId> | --agent <agent>";
71858
+ var CHANNEL_SHARE_GONE = "An agent joins a channel from the channel: laze channel add <channel> <agent>";
71858
71859
  function agentWord({ args, usage }) {
71859
71860
  const agent3 = args.words[2];
71860
71861
  if (!agent3) throw new CliUsageError(usage);
@@ -71917,14 +71918,14 @@ function granteeOf({
71917
71918
  if (agent3) return { kind: "agent", agentId: agent3 };
71918
71919
  return { kind: "channel", channelId: channel };
71919
71920
  }
71920
- var GRANTEE_FLAGS = ["person", "group", "channel", "agent"];
71921
+ var GRANTEE_FLAGS = ["person", "group", "agent"];
71921
71922
  function askedGranteesOf(args) {
71922
71923
  return GRANTEE_FLAGS.flatMap(
71923
71924
  (name3) => (args.lists[name3] ?? []).map(
71924
71925
  (value) => granteeOf({
71925
71926
  person: name3 === "person" ? value : void 0,
71926
71927
  group: name3 === "group" ? value : void 0,
71927
- channel: name3 === "channel" ? value : void 0,
71928
+ channel: void 0,
71928
71929
  agent: name3 === "agent" ? value : void 0
71929
71930
  })
71930
71931
  )
@@ -71942,6 +71943,10 @@ async function askToShare({ context, args, agent: agent3 }) {
71942
71943
  }
71943
71944
  async function shareAgent({ context, args }) {
71944
71945
  const agent3 = agentWord({ args, usage: SHARE_USAGE });
71946
+ const sharing = args.words[1] !== "unshare";
71947
+ if (sharing && (args.flags.channel !== void 0 || (args.lists.channel ?? []).length > 0)) {
71948
+ throw new CliUsageError(CHANNEL_SHARE_GONE);
71949
+ }
71945
71950
  if (args.flags.ask === true) {
71946
71951
  if (args.words[1] === "unshare") throw new CliUsageError(SHARE_USAGE);
71947
71952
  return askToShare({ context, args, agent: agent3 });
@@ -71954,7 +71959,7 @@ async function shareAgent({ context, args }) {
71954
71959
  throw new CliUsageError(SHARE_USAGE);
71955
71960
  }
71956
71961
  const grantee = granteeOf({ person, group, channel, agent: other });
71957
- const path = args.words[1] === "unshare" ? "/api/agents/unshare" : "/api/agents/share";
71962
+ const path = sharing ? "/api/agents/share" : "/api/agents/unshare";
71958
71963
  const { client } = await signedIn({ context, args });
71959
71964
  printAccess({ context, args, access: await client.post(path, { agent: agent3, grantee }) });
71960
71965
  }
@@ -102659,7 +102664,8 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
102659
102664
  laze agent runs-on <agent> laze|claude|codex [--pool <pool>] moves it to Laze credits, Claude Code or Codex
102660
102665
  laze agent access|dm|disconnect <agent> who can talk to it, your conversation with it, revoke its key
102661
102666
  laze agent permission-prompts <agent> each permission prompt its harness raised and rush's answer
102662
- laze agent share|unshare <agent> --person <userId> | --group <groupId> | --channel <channelId> | --agent <agent> share it (its owner); an added agent DMs it
102667
+ laze agent share|unshare <agent> --person <userId> | --group <groupId> | --agent <agent> share it (its owner); an added agent DMs it
102668
+ laze agent unshare <agent> --channel <channelId> take it out of a channel (add it with laze channel add)
102663
102669
  laze agent share <agent> --ask --person <userId> [--agent <agent> ...] ask its owner to add them; they approve in their feed
102664
102670
  laze agent stop <agent> --channel <channelId> stop its running turn there
102665
102671
  laze agent retry <agent> --channel <id> --message <id> Try again on its failed turn on that message
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.106",
3
+ "version": "0.1.107",
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",