@lazehq/cli 0.1.111 → 0.1.112

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 +47 -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.111";
36963
+ var STAMPED = "0.1.112";
36964
36964
  function cliVersionOf({ stamped = STAMPED } = {}) {
36965
36965
  return stamped.startsWith("__") ? "dev" : stamped;
36966
36966
  }
@@ -57370,6 +57370,11 @@ var AUTHZ_RESOURCES = {
57370
57370
  ownerKeys: {
57371
57371
  actions: ["use"],
57372
57372
  scopes: ["workspace"]
57373
+ },
57374
+ /** `manage`: change a running plan, auto-recharge, billing details and codes. */
57375
+ billing: {
57376
+ actions: ["manage"],
57377
+ scopes: ["workspace"]
57373
57378
  }
57374
57379
  };
57375
57380
  var AUTHZ_RESOURCE_NAMES = Object.keys(AUTHZ_RESOURCES);
@@ -71294,7 +71299,9 @@ var callerWorkspaceMemberSchemaDefinition = external_exports.object({
71294
71299
  role: roleSchema,
71295
71300
  joinedAt: external_exports.iso.datetime(),
71296
71301
  /** Other names they go by in the workspace; absent or empty without any. */
71297
- aliases: external_exports.array(external_exports.string()).optional()
71302
+ aliases: external_exports.array(external_exports.string()).optional(),
71303
+ /** Holds the Billing role beside their role; absent is false. */
71304
+ billing: external_exports.boolean().optional()
71298
71305
  });
71299
71306
  var callerWorkspaceInviteSchemaDefinition = external_exports.object({
71300
71307
  id: external_exports.string().min(1),
@@ -71361,6 +71368,10 @@ var changeRoleAsCallerInputSchemaDefinition = external_exports.object({
71361
71368
  member: memberRefSchema3,
71362
71369
  role: roleSchema
71363
71370
  });
71371
+ var setBillingAsCallerInputSchemaDefinition = external_exports.object({
71372
+ member: memberRefSchema3,
71373
+ billing: external_exports.boolean()
71374
+ });
71364
71375
  var groupRefSchema = external_exports.string().trim().min(1).max(80);
71365
71376
  var callerGroupSchemaDefinition = external_exports.object({
71366
71377
  id: external_exports.string().min(1),
@@ -93783,7 +93794,8 @@ async function list6({ context, args }) {
93783
93794
  answer: answer6,
93784
93795
  text: (members3) => members3.map((it) => {
93785
93796
  const aka2 = it.aliases?.length ? ` aka ${it.aliases.join(", ")}` : "";
93786
- return `${ROLE_NAMES2[it.role]} ${it.name} ${it.email} ${it.userId}${aka2}
93797
+ const role2 = it.billing ? `${ROLE_NAMES2[it.role]}, Billing` : ROLE_NAMES2[it.role];
93798
+ return `${role2} ${it.name} ${it.email} ${it.userId}${aka2}
93787
93799
  `;
93788
93800
  }).join("")
93789
93801
  });
@@ -93884,6 +93896,25 @@ async function role({ context, args }) {
93884
93896
  `
93885
93897
  });
93886
93898
  }
93899
+ async function billing2({ context, args }) {
93900
+ const [, , member, word3] = args.words;
93901
+ if (!member || word3 !== "on" && word3 !== "off")
93902
+ throw new CliUsageError("Usage: laze members billing <member> on|off");
93903
+ const on = word3 === "on";
93904
+ const { client } = await signedIn({ context, args });
93905
+ const answer6 = await client.post("/api/agents/me/workspace/billing-role", {
93906
+ member,
93907
+ billing: on
93908
+ });
93909
+ print7({
93910
+ context,
93911
+ args,
93912
+ answer: answer6,
93913
+ text: (it) => it.billing ? `${it.name} now holds the Billing role and can change the plan.
93914
+ ` : `${it.name} no longer holds the Billing role.
93915
+ `
93916
+ });
93917
+ }
93887
93918
  async function remove5({ context, args }) {
93888
93919
  const member = args.words[2];
93889
93920
  if (!member) throw new CliUsageError("Usage: laze members remove <member>");
@@ -93933,6 +93964,7 @@ var MEMBERS_COMMANDS = {
93933
93964
  "revoke-invite": revokeInvite,
93934
93965
  "invite-link": inviteLink,
93935
93966
  role,
93967
+ billing: billing2,
93936
93968
  aka,
93937
93969
  remove: remove5,
93938
93970
  requests,
@@ -93945,7 +93977,7 @@ async function members2({ context, args }) {
93945
93977
  const command = MEMBERS_COMMANDS[sub];
93946
93978
  if (!command) {
93947
93979
  throw new CliUsageError(
93948
- "Usage: laze members [invite | invites | revoke-invite | invite-link | role | aka | remove | requests | approve | deny]"
93980
+ "Usage: laze members [invite | invites | revoke-invite | invite-link | role | billing | aka | remove | requests | approve | deny]"
93949
93981
  );
93950
93982
  }
93951
93983
  return command({ context, args });
@@ -99229,7 +99261,9 @@ var workspaceMemberSchemaDefinition = external_exports.object({
99229
99261
  /** Their picture, an uploaded or Google one; null or absent without one. */
99230
99262
  image: external_exports.string().nullable().optional(),
99231
99263
  /** Other names they go by in this workspace ("Also known as"); absent or empty without any. */
99232
- aliases: external_exports.array(external_exports.string()).optional()
99264
+ aliases: external_exports.array(external_exports.string()).optional(),
99265
+ /** Holds the Billing role beside their role: changes the running plan; absent is false. */
99266
+ billing: external_exports.boolean().optional()
99233
99267
  });
99234
99268
  var workspaceMemberSchema = workspaceMemberSchemaDefinition;
99235
99269
  var ALIASES_MAX_COUNT = 5;
@@ -99388,6 +99422,12 @@ var changeRoleInputSchemaDefinition = external_exports.object({
99388
99422
  role: workspaceRoleSchema
99389
99423
  });
99390
99424
  var changeRoleInputSchema = changeRoleInputSchemaDefinition;
99425
+ var setBillingInputSchemaDefinition = external_exports.object({
99426
+ workspaceId: external_exports.string().min(1),
99427
+ userId: external_exports.string().min(1),
99428
+ billing: external_exports.boolean()
99429
+ });
99430
+ var setBillingInputSchema = setBillingInputSchemaDefinition;
99391
99431
  var removeMemberInputSchemaDefinition2 = external_exports.object({
99392
99432
  workspaceId: external_exports.string().min(1),
99393
99433
  userId: external_exports.string().min(1)
@@ -99410,7 +99450,7 @@ var settingsCopy = {
99410
99450
  paintOnly: true,
99411
99451
  storable: (copy2) => copy2
99412
99452
  };
99413
- var workspaceTrpc = defineTrpcContract("workspace").mutation("create").withInput(createWorkspaceInputSchema).withOutput(workspaceCreatedSchema).query("get", { mirrored: settingsCopy }).withInput(workspaceIdInputSchema).withOutput(workspaceSchema).query("mine").withInput(external_exports.object({})).withOutput(external_exports.array(myWorkspaceSchema)).query("members").withInput(workspaceIdInputSchema).withOutput(external_exports.array(workspaceMemberSchema)).query("myMembership").withInput(workspaceIdInputSchema).withOutput(workspaceMemberSchema.nullable()).mutation("setMyAliases").withInput(setAliasesInputSchema).withOutput(workspaceMemberSchema).mutation("changeRole").withInput(changeRoleInputSchema).withOutput(workspaceMemberSchema).mutation("removeMember").withInput(removeMemberInputSchema2).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("leave").withInput(workspaceIdInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("invite").withInput(inviteMemberInputSchema).withOutput(workspaceInviteSchema).mutation("inviteMany").withInput(inviteManyInputSchema).withOutput(inviteManyResultSchema).mutation("requestInvites").withInput(inviteManyInputSchema).withOutput(requestInvitesResultSchema).query("invites").withInput(workspaceIdInputSchema).withOutput(external_exports.array(workspaceInviteSchema)).query("invitees").withInput(workspaceIdInputSchema).withOutput(external_exports.array(workspaceInviteeSchema)).mutation("revokeInvite").withInput(revokeInviteInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).mutation("copyInviteLink").withInput(revokeInviteInputSchema).withOutput(copiedInviteLinkSchema).query("previewInvite").withInput(inviteLinkInputSchema).withOutput(invitePreviewSchema).mutation("acceptInvite").withInput(inviteLinkInputSchema).withOutput(acceptedInviteSchema).mutation("rename").withInput(renameWorkspaceInputSchema).withOutput(workspaceSchema).mutation("setLogo").withInput(setWorkspaceLogoInputSchema).withOutput(workspaceSchema).mutation("removeLogo").withInput(workspaceIdInputSchema).withOutput(workspaceSchema).mutation("delete").withInput(deleteWorkspaceInputSchema).withOutput(workspaceSchema).mutation("cancelDeletion").withInput(workspaceIdInputSchema).withOutput(workspaceSchema).mutation("requestInvite").withInput(requestInviteInputSchema).withOutput(accessRequestSchema).query("accessRequests").withInput(workspaceIdInputSchema).withOutput(external_exports.array(accessRequestSchema)).mutation("decideAccessRequest").withInput(decideAccessRequestInputSchema).withOutput(accessRequestSchema).mutation("withdrawJoinRequest").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), requestId: external_exports.string().min(1) })).withOutput(accessRequestSchema).query("groups").withInput(workspaceIdInputSchema).withOutput(external_exports.array(workspaceGroupSchema)).mutation("createGroup").withInput(createGroupInputSchema).withOutput(workspaceGroupSchema).mutation("renameGroup").withInput(renameGroupInputSchema).withOutput(workspaceGroupSchema).mutation("deleteGroup").withInput(groupInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("changeGroupMembers").withInput(changeGroupMembersInputSchema).withOutput(workspaceGroupSchema).build();
99453
+ var workspaceTrpc = defineTrpcContract("workspace").mutation("create").withInput(createWorkspaceInputSchema).withOutput(workspaceCreatedSchema).query("get", { mirrored: settingsCopy }).withInput(workspaceIdInputSchema).withOutput(workspaceSchema).query("mine").withInput(external_exports.object({})).withOutput(external_exports.array(myWorkspaceSchema)).query("members").withInput(workspaceIdInputSchema).withOutput(external_exports.array(workspaceMemberSchema)).query("myMembership").withInput(workspaceIdInputSchema).withOutput(workspaceMemberSchema.nullable()).mutation("setMyAliases").withInput(setAliasesInputSchema).withOutput(workspaceMemberSchema).mutation("changeRole").withInput(changeRoleInputSchema).withOutput(workspaceMemberSchema).mutation("setBilling").withInput(setBillingInputSchema).withOutput(workspaceMemberSchema).mutation("removeMember").withInput(removeMemberInputSchema2).withOutput(external_exports.object({ removed: external_exports.literal(true) })).mutation("leave").withInput(workspaceIdInputSchema).withOutput(external_exports.object({ left: external_exports.literal(true) })).mutation("invite").withInput(inviteMemberInputSchema).withOutput(workspaceInviteSchema).mutation("inviteMany").withInput(inviteManyInputSchema).withOutput(inviteManyResultSchema).mutation("requestInvites").withInput(inviteManyInputSchema).withOutput(requestInvitesResultSchema).query("invites").withInput(workspaceIdInputSchema).withOutput(external_exports.array(workspaceInviteSchema)).query("invitees").withInput(workspaceIdInputSchema).withOutput(external_exports.array(workspaceInviteeSchema)).mutation("revokeInvite").withInput(revokeInviteInputSchema).withOutput(external_exports.object({ revoked: external_exports.literal(true) })).mutation("copyInviteLink").withInput(revokeInviteInputSchema).withOutput(copiedInviteLinkSchema).query("previewInvite").withInput(inviteLinkInputSchema).withOutput(invitePreviewSchema).mutation("acceptInvite").withInput(inviteLinkInputSchema).withOutput(acceptedInviteSchema).mutation("rename").withInput(renameWorkspaceInputSchema).withOutput(workspaceSchema).mutation("setLogo").withInput(setWorkspaceLogoInputSchema).withOutput(workspaceSchema).mutation("removeLogo").withInput(workspaceIdInputSchema).withOutput(workspaceSchema).mutation("delete").withInput(deleteWorkspaceInputSchema).withOutput(workspaceSchema).mutation("cancelDeletion").withInput(workspaceIdInputSchema).withOutput(workspaceSchema).mutation("requestInvite").withInput(requestInviteInputSchema).withOutput(accessRequestSchema).query("accessRequests").withInput(workspaceIdInputSchema).withOutput(external_exports.array(accessRequestSchema)).mutation("decideAccessRequest").withInput(decideAccessRequestInputSchema).withOutput(accessRequestSchema).mutation("withdrawJoinRequest").withInput(external_exports.object({ workspaceId: external_exports.string().min(1), requestId: external_exports.string().min(1) })).withOutput(accessRequestSchema).query("groups").withInput(workspaceIdInputSchema).withOutput(external_exports.array(workspaceGroupSchema)).mutation("createGroup").withInput(createGroupInputSchema).withOutput(workspaceGroupSchema).mutation("renameGroup").withInput(renameGroupInputSchema).withOutput(workspaceGroupSchema).mutation("deleteGroup").withInput(groupInputSchema).withOutput(external_exports.object({ deleted: external_exports.literal(true) })).mutation("changeGroupMembers").withInput(changeGroupMembersInputSchema).withOutput(workspaceGroupSchema).build();
99414
99454
 
99415
99455
  // ../../modules/workspace/contract/src/workspace.config.ts
99416
99456
  var workspaceConfig = Config.define((c) => ({
@@ -103992,6 +104032,7 @@ var HELP = `laze: work in a Laze workspace from your terminal or your agent.
103992
104032
  laze members invite-link <email|id> a fresh link for an invitation, shown once (admins)
103993
104033
  laze members aka [<name>...] [--clear] the other names you go by, such as a nickname
103994
104034
  laze members role <member> owner|admin|member|guest change a member's role (admins)
104035
+ laze members billing <member> on|off give or take away the Billing role (admins)
103995
104036
  laze members remove <member> take someone out of the workspace (admins)
103996
104037
  laze members requests | approve <id> | deny <id> access requests waiting for an admin
103997
104038
  laze groups [list] the workspace's groups and who is in each
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.111",
3
+ "version": "0.1.112",
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",