@burdenoff/cli-sdk 2026.527.1 → 2026.626.1

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.
@@ -1,4 +1,4 @@
1
- import {a,s,j as j$1,g,v as v$1,k,t,e,h as h$1,f,c,b,o as o$1,m,n}from'../../chunk-LZQBJDKZ.js';import {q as q$1,o,h,g as g$1}from'../../chunk-TCBALVP4.js';function P(i){let d=i.command("workspace").description("Workspace context");d.command("current").description("Show current workspace").option("-f, --format <format>","Output format").action(a=>{let r=s(),t=r?.workspaceId??null;if(!t){j$1("No workspace set. Run: vibecontrols workspace set <id>");return}g(a,{workspaceId:t,organizationId:r?.organizationId??"-",hasWorkspaceToken:!!r?.workspaceToken},{headers:["Key","Value"],rows:[["Workspace ID",t],["Organization ID",r?.organizationId??"-"],["Has Workspace Token",String(!!r?.workspaceToken)]]});}),d.command("set").description("Set workspace ID and issue workspace token").argument("<id>","Workspace ID").action(async a=>{try{let r=s();if(!r?.accessToken)throw new o("Not authenticated. Run: vibecontrols auth login");let t$1=v$1(),e$1;j$1("Looking up workspace details...");try{let m=(await h(t$1.globalEndpoint,r.accessToken)).find(N=>N.id===a);m?e$1=m.organizationId:(k("Workspace not in your accessible list \u2014 using stored organization id as fallback"),e$1=r.organizationId);}catch{k("Could not fetch workspace details \u2014 using stored organization id"),e$1=r.organizationId;}if(r.accessToken&&e$1){j$1("Issuing workspace token...");try{let o=await g$1(t$1.workspaceEndpoint,r.accessToken,a,e$1);t({...r,workspaceId:a,organizationId:e$1,workspaceToken:o.token,workspaceTokenExpiresAt:new Date(o.expiresAt).getTime()}),e(),h$1(`Workspace set to: ${a} (token issued)`);return}catch(o){k(`Workspace token failed: ${o instanceof Error?o.message:String(o)}`);}}t({...r,workspaceId:a,organizationId:e$1}),e(),h$1(`Workspace set to: ${a}`);}catch(r){f(r);}}),d.command("list").description("List available workspaces").option("-f, --format <format>","Output format").action(async a=>{try{let r=s();if(!r?.accessToken)throw new o("Not authenticated. Run: vibecontrols auth login");let t=v$1(),e=await h(t.globalEndpoint,r.accessToken);g(a,e,{headers:["ID","Name","Slug","Organization ID"],rows:e.map(o=>[o.id,o.name,o.slug,o.organizationId])});}catch(r){f(r);}});}var T=`
1
+ import {a,t,k,h,w,l,u,f,i,g as g$1,c,b,p,n,o as o$1}from'../../chunk-WXDQ3S5J.js';import {q as q$1,o,h as h$1,g}from'../../chunk-TCBALVP4.js';function P(i$1){let d=i$1.command("workspace").description("Workspace context");d.command("current").description("Show current workspace").option("-f, --format <format>","Output format").action(a=>{let r=t(),t$1=r?.workspaceId??null;if(!t$1){k("No workspace set. Run: vibecontrols workspace set <id>");return}h(a,{workspaceId:t$1,organizationId:r?.organizationId??"-",hasWorkspaceToken:!!r?.workspaceToken},{headers:["Key","Value"],rows:[["Workspace ID",t$1],["Organization ID",r?.organizationId??"-"],["Has Workspace Token",String(!!r?.workspaceToken)]]});}),d.command("set").description("Set workspace ID and issue workspace token").argument("<id>","Workspace ID").action(async a=>{try{let r=t();if(!r?.accessToken)throw new o("Not authenticated. Run: vibecontrols auth login");let t$1=w(),e;k("Looking up workspace details...");try{let m=(await h$1(t$1.globalEndpoint,r.accessToken)).find(N=>N.id===a);m?e=m.organizationId:(l("Workspace not in your accessible list \u2014 using stored organization id as fallback"),e=r.organizationId);}catch{l("Could not fetch workspace details \u2014 using stored organization id"),e=r.organizationId;}if(r.accessToken&&e){k("Issuing workspace token...");try{let o=await g(t$1.workspaceEndpoint,r.accessToken,a,e);u({...r,workspaceId:a,organizationId:e,workspaceToken:o.token,workspaceTokenExpiresAt:new Date(o.expiresAt).getTime()}),f(),i(`Workspace set to: ${a} (token issued)`);return}catch(o){l(`Workspace token failed: ${o instanceof Error?o.message:String(o)}`);}}u({...r,workspaceId:a,organizationId:e}),f(),i(`Workspace set to: ${a}`);}catch(r){g$1(r);}}),d.command("list").description("List available workspaces").option("-f, --format <format>","Output format").action(async a=>{try{let r=t();if(!r?.accessToken)throw new o("Not authenticated. Run: vibecontrols auth login");let t$1=w(),e=await h$1(t$1.globalEndpoint,r.accessToken);h(a,e,{headers:["ID","Name","Slug","Organization ID"],rows:e.map(o=>[o.id,o.name,o.slug,o.organizationId])});}catch(r){g$1(r);}});}var T=`
2
2
  query GetWorkspace($id: ID!) {
3
3
  workspace(id: $id) {
4
4
  id name slug description tenantId organizationId status createdAt updatedAt
@@ -74,4 +74,4 @@ import {a,s,j as j$1,g,v as v$1,k,t,e,h as h$1,f,c,b,o as o$1,m,n}from'../../chu
74
74
  id action actorId summary createdAt
75
75
  }
76
76
  }
77
- `;function B(i){i.command("get").description("Get a workspace by id").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1=await c(T,{id:t});if(!o$1.workspace)throw new o(`Workspace ${t} not found`);g(e,o$1.workspace);}catch(o){f(o);}}),i.command("create").description("Create a workspace (global layer)").requiredOption("--name <name>").option("--description <s>").option("--tenant <id>","Target tenant id").option("--organization <id>","Owning organization id").option("--slug <slug>").option("-f, --format <format>").action(async t=>{try{let e={name:t.name,description:t.description,tenantId:t.tenant,organizationId:t.organization,slug:t.slug},o=await c($,{input:e});h$1(`Workspace created: ${o.createWorkspace.name}`),g(t,o.createWorkspace);}catch(e){f(e);}}),i.command("update").description("Update a workspace").argument("<id>").option("--name <s>").option("--description <s>").option("--status <s>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1={};if(e.name&&(o$1.name=e.name),e.description!==void 0&&(o$1.description=e.description),e.status&&(o$1.status=e.status.toUpperCase()),!Object.keys(o$1).length)throw new o("No updates specified");let m=await c(S,{id:t,input:o$1});h$1("Workspace updated"),g(e,m.updateWorkspace);}catch(o){f(o);}}),i.command("delete").description("Delete a workspace (workspace layer)").argument("<id>").action(async t=>{try{await b(_,{id:t}),h$1("Workspace deleted");}catch(e){f(e);}});let d=i.command("members").description("Workspace member management");d.command("list").description("List members of a workspace").requiredOption("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e=await b(j,{workspaceId:t.workspace,pagination:{limit:t.limit,offset:0}});g(t,e.workspaceMembers.items,{headers:["ID","UserID","Role","Status","Joined"],rows:e.workspaceMembers.items.map(o=>[o$1(o.id,12),o$1(o.userId,12),o.role??"-",m(o.status),n(o.createdAt)])});}catch(e){f(e);}}),d.command("add").description("Add a member to a workspace").requiredOption("--workspace <id>").requiredOption("--user <userId>").option("--role <r>","MEMBER|ADMIN|OWNER","MEMBER").option("-f, --format <format>").action(async t=>{try{let e={workspaceId:t.workspace,userId:t.user,role:(t.role??"MEMBER").toUpperCase()},o=await b(D,{input:e});h$1("Member added"),g(t,o.addWorkspaceMember);}catch(e){f(e);}}),d.command("remove").description("Remove a member by membership id").argument("<membershipId>").action(async t=>{try{await b(v,{id:t}),h$1("Member removed");}catch(e){f(e);}}),d.command("role").description("Update member role").requiredOption("--workspace <id>").requiredOption("--user <userId>").requiredOption("--role <r>").action(async t=>{try{let e={workspaceId:t.workspace,userId:t.user,roles:[t.role.toUpperCase()]};await b(x,{input:e}),h$1("Member role updated");}catch(e){f(e);}});let a=i.command("projects").description("Workspace projects");a.command("list").description("List projects").option("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={};t.workspace&&(e.workspaceId=t.workspace);let o=await b(z,{filter:Object.keys(e).length?e:void 0,pagination:{limit:t.limit,offset:0}});g(t,o.projects.items,{headers:["ID","Name","Workspace","Status","Created"],rows:o.projects.items.map(m$1=>[o$1(m$1.id,12),m$1.name,o$1(m$1.workspaceId,12),m(m$1.status),n(m$1.createdAt)])});}catch(e){f(e);}}),a.command("get").description("Get a project").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1=await b(K,{id:t});if(!o$1.project)throw new o(`Project ${t} not found`);g(e,o$1.project);}catch(o){f(o);}}),a.command("create").description("Create a project").requiredOption("--workspace <id>").requiredOption("--name <name>").option("--description <s>").option("-f, --format <format>").action(async t=>{try{let e={workspaceId:t.workspace,name:t.name,description:t.description},o=await b(L,{input:e});h$1("Project created"),g(t,o.createProject);}catch(e){f(e);}}),i.command("invite").description("Workspace invitations").command("accept").description("Accept a workspace invitation").argument("<invitationId>").action(async t=>{try{await b(U,{id:t}),h$1("Invitation accepted");}catch(e){f(e);}}),i.command("activity").description("Workspace activity log").requiredOption("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e=await b(q,{workspaceId:t.workspace,limit:t.limit,offset:0});g(t,e.getWorkspaceActivities);}catch(e){f(e);}});}var V={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],register(i,d){a(d),P(i);let a$1=i.commands.find(r=>r.name()==="workspace");if(!a$1)throw new q$1("workspace command group missing after registerWorkspaceCommands");B(a$1);}},pt=V;export{pt as default};
77
+ `;function B(i$1){i$1.command("get").description("Get a workspace by id").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1=await c(T,{id:t});if(!o$1.workspace)throw new o(`Workspace ${t} not found`);h(e,o$1.workspace);}catch(o){g$1(o);}}),i$1.command("create").description("Create a workspace (global layer)").requiredOption("--name <name>").option("--description <s>").option("--tenant <id>","Target tenant id").option("--organization <id>","Owning organization id").option("--slug <slug>").option("-f, --format <format>").action(async t=>{try{let e={name:t.name,description:t.description,tenantId:t.tenant,organizationId:t.organization,slug:t.slug},o=await c($,{input:e});i(`Workspace created: ${o.createWorkspace.name}`),h(t,o.createWorkspace);}catch(e){g$1(e);}}),i$1.command("update").description("Update a workspace").argument("<id>").option("--name <s>").option("--description <s>").option("--status <s>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1={};if(e.name&&(o$1.name=e.name),e.description!==void 0&&(o$1.description=e.description),e.status&&(o$1.status=e.status.toUpperCase()),!Object.keys(o$1).length)throw new o("No updates specified");let m=await c(S,{id:t,input:o$1});i("Workspace updated"),h(e,m.updateWorkspace);}catch(o){g$1(o);}}),i$1.command("delete").description("Delete a workspace (workspace layer)").argument("<id>").action(async t=>{try{await b(_,{id:t}),i("Workspace deleted");}catch(e){g$1(e);}});let d=i$1.command("members").description("Workspace member management");d.command("list").description("List members of a workspace").requiredOption("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e=await b(j,{workspaceId:t.workspace,pagination:{limit:t.limit,offset:0}});h(t,e.workspaceMembers.items,{headers:["ID","UserID","Role","Status","Joined"],rows:e.workspaceMembers.items.map(o=>[p(o.id,12),p(o.userId,12),o.role??"-",n(o.status),o$1(o.createdAt)])});}catch(e){g$1(e);}}),d.command("add").description("Add a member to a workspace").requiredOption("--workspace <id>").requiredOption("--user <userId>").option("--role <r>","MEMBER|ADMIN|OWNER","MEMBER").option("-f, --format <format>").action(async t=>{try{let e={workspaceId:t.workspace,userId:t.user,role:(t.role??"MEMBER").toUpperCase()},o=await b(D,{input:e});i("Member added"),h(t,o.addWorkspaceMember);}catch(e){g$1(e);}}),d.command("remove").description("Remove a member by membership id").argument("<membershipId>").action(async t=>{try{await b(v,{id:t}),i("Member removed");}catch(e){g$1(e);}}),d.command("role").description("Update member role").requiredOption("--workspace <id>").requiredOption("--user <userId>").requiredOption("--role <r>").action(async t=>{try{let e={workspaceId:t.workspace,userId:t.user,roles:[t.role.toUpperCase()]};await b(x,{input:e}),i("Member role updated");}catch(e){g$1(e);}});let a=i$1.command("projects").description("Workspace projects");a.command("list").description("List projects").option("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={};t.workspace&&(e.workspaceId=t.workspace);let o=await b(z,{filter:Object.keys(e).length?e:void 0,pagination:{limit:t.limit,offset:0}});h(t,o.projects.items,{headers:["ID","Name","Workspace","Status","Created"],rows:o.projects.items.map(m=>[p(m.id,12),m.name,p(m.workspaceId,12),n(m.status),o$1(m.createdAt)])});}catch(e){g$1(e);}}),a.command("get").description("Get a project").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1=await b(K,{id:t});if(!o$1.project)throw new o(`Project ${t} not found`);h(e,o$1.project);}catch(o){g$1(o);}}),a.command("create").description("Create a project").requiredOption("--workspace <id>").requiredOption("--name <name>").option("--description <s>").option("-f, --format <format>").action(async t=>{try{let e={workspaceId:t.workspace,name:t.name,description:t.description},o=await b(L,{input:e});i("Project created"),h(t,o.createProject);}catch(e){g$1(e);}}),i$1.command("invite").description("Workspace invitations").command("accept").description("Accept a workspace invitation").argument("<invitationId>").action(async t=>{try{await b(U,{id:t}),i("Invitation accepted");}catch(e){g$1(e);}}),i$1.command("activity").description("Workspace activity log").requiredOption("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e=await b(q,{workspaceId:t.workspace,limit:t.limit,offset:0});h(t,e.getWorkspaceActivities);}catch(e){g$1(e);}});}var V={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],register(i,d){a(d),P(i);let a$1=i.commands.find(r=>r.name()==="workspace");if(!a$1)throw new q$1("workspace command group missing after registerWorkspaceCommands");B(a$1);}},pt=V;export{pt as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/cli-sdk",
3
- "version": "2026.527.1",
3
+ "version": "2026.626.1",
4
4
  "description": "Modular CLI SDK shared across all Burdenoff product CLIs (vibecontrols, botlit, fluidgrids, bigconsole, healthybowl, devportal, workspaces). Each module exports CliModule contract; product CLIs become thin shells that pick which modules to mount.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "homepage": "https://github.com/algoshred/cli-sdk#readme",
69
69
  "publishConfig": {
70
- "access": "restricted",
70
+ "access": "public",
71
71
  "registry": "https://registry.npmjs.org/"
72
72
  },
73
73
  "dependencies": {
@@ -1 +0,0 @@
1
- import {b as b$1,o,p,q as q$1}from'./chunk-TCBALVP4.js';var r=null;function T(t){r=t;}function e(){if(!r)throw new q$1("vibecontrols module helpers used before setHelpersContext was called");return r}function c(){let t=e();if(!t.auth.isAuthenticated())throw new p(`Authentication required. Run \`${t.productName} auth login\`.`)}async function q(t,n){return c(),e().gql.workspace.request(t,n)}async function w(t,n){return e().gql.global.request(t,n)}async function b(t,n){return e().gql.global.request(t,n)}function A(){e().gql.reset();}function v(t){let n=t instanceof Error?t.message:String(t);throw new o(n)}function I(t,n,p){e().output.formatAndOutput(t,n,p);}function k(t){e().output.printSuccess(t);}function E(t){e().output.printError(t);}function O(t){e().output.printInfo(t);}function S(t){e().output.printWarning(t);}function D(t){e().output.printJson(t);}function y(t){return e().output.formatStatus(t)}function N(t){return e().output.formatDate(t)}function R(t,n){return e().output.truncate(t,n)}function W(t,n){return e().output.confirm(t,n)}function F(t,n){e().output.printTable(t,n);}function L(){return e()}function V(){return e().auth.read()}function P(t){e().auth.write(t);}function _(){e().auth.clear();}function K(){return e().config.read()}function G(t){return e().config.get(t)}function Y(t,n){e().config.set(t,n);}function j(){return e().config.path()}var H=b$1;function J(){return e().config.resolveOIDC()}function B(t){return t?t.expiresAt?Date.now()>=t.expiresAt:false:e().auth.isTokenExpired()}export{J as A,B,T as a,q as b,w as c,b as d,A as e,v as f,I as g,k as h,E as i,O as j,S as k,D as l,y as m,N as n,R as o,W as p,F as q,L as r,V as s,P as t,_ as u,K as v,G as w,Y as x,j as y,H as z};