@dosu/cli 0.28.1 → 0.29.0

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/bin/dosu.js +56 -14
  2. package/package.json +1 -2
package/bin/dosu.js CHANGED
@@ -4577,7 +4577,7 @@ var init_dist4 = __esm(() => {
4577
4577
  function getVersionString() {
4578
4578
  return `v${VERSION}`;
4579
4579
  }
4580
- var VERSION = "0.28.1", INSTALL_CHANNEL = "npm";
4580
+ var VERSION = "0.29.0", INSTALL_CHANNEL = "npm";
4581
4581
 
4582
4582
  // src/debug/logger.ts
4583
4583
  import {
@@ -4710,6 +4710,9 @@ var init_logger = __esm(() => {
4710
4710
  };
4711
4711
  });
4712
4712
 
4713
+ // src/client/contract.ts
4714
+ var CLI_CONTRACT_HASH = "140d68a8c401";
4715
+
4713
4716
  // src/client/trpc.ts
4714
4717
  var exports_trpc = {};
4715
4718
  __export(exports_trpc, {
@@ -4727,7 +4730,7 @@ function createTypedClient(config) {
4727
4730
  return createTRPCClient({
4728
4731
  links: [
4729
4732
  httpLink({
4730
- url: `${webAppURL}/api/trpc`,
4733
+ url: `${webAppURL}/api/cli-trpc`,
4731
4734
  transformer: dist_default,
4732
4735
  async headers() {
4733
4736
  if (isTokenExpired(config)) {
@@ -4738,7 +4741,10 @@ function createTypedClient(config) {
4738
4741
  throw new Error("session expired. Run 'dosu login' to re-authenticate");
4739
4742
  }
4740
4743
  }
4741
- return { "Supabase-Access-Token": config.access_token };
4744
+ return {
4745
+ "Supabase-Access-Token": config.access_token,
4746
+ "x-dosu-cli-contract": CLI_CONTRACT_HASH
4747
+ };
4742
4748
  },
4743
4749
  async fetch(url, options) {
4744
4750
  const res = await globalThis.fetch(url, options);
@@ -4753,7 +4759,8 @@ function createTypedClient(config) {
4753
4759
  ...options,
4754
4760
  headers: {
4755
4761
  ...options?.headers,
4756
- "Supabase-Access-Token": config.access_token
4762
+ "Supabase-Access-Token": config.access_token,
4763
+ "x-dosu-cli-contract": CLI_CONTRACT_HASH
4757
4764
  }
4758
4765
  });
4759
4766
  }
@@ -10989,8 +10996,11 @@ function createAnonymousClient() {
10989
10996
  return createTRPCClient({
10990
10997
  links: [
10991
10998
  httpLink({
10992
- url: `${webAppURL}/api/trpc`,
10993
- transformer: dist_default
10999
+ url: `${webAppURL}/api/cli-trpc`,
11000
+ transformer: dist_default,
11001
+ headers: {
11002
+ "x-dosu-cli-contract": CLI_CONTRACT_HASH
11003
+ }
10994
11004
  })
10995
11005
  ]
10996
11006
  });
@@ -15431,7 +15441,10 @@ function integrationsCommand() {
15431
15441
  console.log(import_picocolors16.default.dim("No Slack channels found."));
15432
15442
  return;
15433
15443
  }
15434
- printTable(["ID", "Name"], channels.map((c3) => [c3.channel_id, c3.name ?? "(unnamed)"]), { rawData: channels });
15444
+ printTable(["ID", "Name"], channels.map((c3) => [
15445
+ c3.channel_id,
15446
+ c3.name ?? "(unnamed)"
15447
+ ]), { rawData: channels });
15435
15448
  });
15436
15449
  cmd.command("slack-join").description("Join a Slack channel").argument("<channel-id>", "Slack channel ID").option("--json", "Output as JSON").action(async (channelId, opts) => {
15437
15450
  const cfg = requireConfig6();
@@ -15481,7 +15494,7 @@ function knowledgeCommand() {
15481
15494
  org_id: cfg.org_id,
15482
15495
  excluded_provider_slugs: []
15483
15496
  });
15484
- const dataSourceIds = dataSources.map((ds) => ds.id);
15497
+ const dataSourceIds = dataSources.map((ds) => ds.id).filter((id) => id !== null);
15485
15498
  if (dataSourceIds.length === 0) {
15486
15499
  console.log(import_picocolors17.default.dim("No data sources connected. Add data sources in the Dosu dashboard."));
15487
15500
  return;
@@ -15502,7 +15515,10 @@ function knowledgeCommand() {
15502
15515
  }
15503
15516
  const limit = Number.parseInt(opts.limit ?? "10", 10);
15504
15517
  const limited = results.slice(0, limit);
15505
- printTable(["Title", "Type"], limited.map((r2) => [truncate(r2.title ?? "(untitled)", 60), r2.entity_type ?? "—"]), { json: false, rawData: limited });
15518
+ printTable(["Title", "Type"], limited.map((r2) => [
15519
+ truncate(r2.title ?? "(untitled)", 60),
15520
+ r2.entity_type ?? "—"
15521
+ ]), { json: false, rawData: limited });
15506
15522
  if (results.length > limit) {
15507
15523
  console.log(import_picocolors17.default.dim(`
15508
15524
  ${results.length - limit} more results not shown.`));
@@ -15553,7 +15569,10 @@ function membersCommand() {
15553
15569
  console.log(import_picocolors18.default.dim("No members or invitations found."));
15554
15570
  return;
15555
15571
  }
15556
- printTable(["Email", "Org"], data.items.map((m3) => [m3.email ?? "—", m3.org?.name ?? "—"]), { rawData: data });
15572
+ printTable(["Email", "Org"], data.items.map((m3) => [
15573
+ m3.email ?? "—",
15574
+ m3.org?.name ?? "—"
15575
+ ]), { rawData: data });
15557
15576
  });
15558
15577
  cmd.command("invite").description("Invite a member to the organization").argument("<email>", "Email address to invite").option("--role <role>", "Role: admin or member", "member").option("--json", "Output as JSON").action(async (email, opts) => {
15559
15578
  const cfg = requireConfig8();
@@ -15582,7 +15601,10 @@ function membersCommand() {
15582
15601
  console.log(import_picocolors18.default.dim("No pending access requests."));
15583
15602
  return;
15584
15603
  }
15585
- printTable(["Email", "Org"], data.items.map((r2) => [r2.email ?? "—", r2.org?.name ?? "—"]), { rawData: data });
15604
+ printTable(["Email", "Org"], data.items.map((r2) => [
15605
+ r2.email ?? "—",
15606
+ r2.org?.name ?? "—"
15607
+ ]), { rawData: data });
15586
15608
  });
15587
15609
  cmd.command("approve").description("Approve an access request").argument("<email>", "Email of requester").option("--json", "Output as JSON").action(async (email, opts) => {
15588
15610
  const cfg = requireConfig8();
@@ -16123,7 +16145,7 @@ function suggestCommand() {
16123
16145
  org_id: cfg.org_id,
16124
16146
  excluded_provider_slugs: []
16125
16147
  });
16126
- const dataSourceIds = dataSources.map((ds) => ds.id);
16148
+ const dataSourceIds = dataSources.map((ds) => ds.id).filter((id) => id !== null);
16127
16149
  const result = await client.suggestedDoc.generate.mutate({
16128
16150
  knowledgeStoreId: ksId,
16129
16151
  dataSourceIds
@@ -16186,7 +16208,11 @@ function tagsCommand() {
16186
16208
  console.log(import_picocolors23.default.dim("No tags found."));
16187
16209
  return;
16188
16210
  }
16189
- printTable(["ID", "Name", "Description"], tags.map((t2) => [t2.topic_id.slice(0, 8), t2.name, t2.description ?? "—"]), { rawData: tags });
16211
+ printTable(["ID", "Name", "Description"], tags.map((t2) => [
16212
+ t2.topic_id.slice(0, 8),
16213
+ t2.name,
16214
+ t2.description ?? "—"
16215
+ ]), { rawData: tags });
16190
16216
  });
16191
16217
  cmd.command("remove").description("Remove a tag from a page").argument("<tag-id>", "Tag ID").argument("<page-id>", "Page ID").option("--json", "Output as JSON").action(async (tagId, pageId, opts) => {
16192
16218
  const cfg = requireConfig13();
@@ -16243,18 +16269,34 @@ function threadsCommand() {
16243
16269
  const cfg = requireConfig14();
16244
16270
  const client = createTypedClient(cfg);
16245
16271
  const input = {
16272
+ __testing_scope__: undefined,
16273
+ active: undefined,
16274
+ archived: undefined,
16275
+ channels: undefined,
16276
+ chatOnly: undefined,
16277
+ confidenceLevels: undefined,
16278
+ inbox_archived: undefined,
16279
+ previewOnly: undefined,
16280
+ providers: undefined,
16281
+ read: undefined,
16282
+ resolved: undefined,
16283
+ search: undefined,
16246
16284
  space_id: cfg.space_id,
16285
+ workspaces: undefined,
16247
16286
  limit: Math.min(Number.parseInt(opts.limit ?? "20", 10), 100)
16248
16287
  };
16249
16288
  if (opts.search)
16250
16289
  input.search = opts.search;
16251
16290
  if (opts.status === "resolved")
16252
16291
  input.resolved = true;
16253
- if (opts.status === "archived")
16292
+ if (opts.status === "archived") {
16254
16293
  input.archived = true;
16294
+ input.inbox_archived = true;
16295
+ }
16255
16296
  if (opts.status === "pending") {
16256
16297
  input.resolved = false;
16257
16298
  input.archived = false;
16299
+ input.inbox_archived = false;
16258
16300
  }
16259
16301
  const data = await client.thread.list.query(input);
16260
16302
  const threads = data.list;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosu/cli",
3
- "version": "0.28.1",
3
+ "version": "0.29.0",
4
4
  "type": "module",
5
5
  "description": "Dosu CLI - Manage MCP servers for AI tools",
6
6
  "license": "MIT",
@@ -37,7 +37,6 @@
37
37
  "devDependencies": {
38
38
  "@biomejs/biome": "^2.5.0",
39
39
  "@clack/prompts": "^1.6.0",
40
- "@dosu/api-types": "0.0.36",
41
40
  "@semantic-release/changelog": "^6.0.3",
42
41
  "@semantic-release/exec": "^7.1.0",
43
42
  "@semantic-release/git": "^10.0.1",