@dosu/cli 0.28.1 → 0.29.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.
- package/bin/dosu.js +62 -16
- 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.
|
|
4580
|
+
var VERSION = "0.29.1", 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 = "8d9ba113842a";
|
|
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 {
|
|
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) => [
|
|
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) => [
|
|
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) => [
|
|
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) => [
|
|
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();
|
|
@@ -15765,12 +15787,13 @@ function reviewCommand() {
|
|
|
15765
15787
|
}
|
|
15766
15788
|
const client = createTypedClient(cfg);
|
|
15767
15789
|
const ksId = await getKnowledgeStoreId2(client, cfg.space_id);
|
|
15768
|
-
const
|
|
15790
|
+
const result = await client.review.listPending.query({
|
|
15769
15791
|
knowledgeStoreId: ksId,
|
|
15770
15792
|
deploymentId: cfg.deployment_id
|
|
15771
15793
|
});
|
|
15794
|
+
const { items, truncated, total } = result;
|
|
15772
15795
|
if (opts.json) {
|
|
15773
|
-
printResult(
|
|
15796
|
+
printResult(result, opts);
|
|
15774
15797
|
return;
|
|
15775
15798
|
}
|
|
15776
15799
|
if (!items || items.length === 0) {
|
|
@@ -15792,6 +15815,9 @@ function reviewCommand() {
|
|
|
15792
15815
|
i2.pendingStatus,
|
|
15793
15816
|
formatDate(i2.createdAt)
|
|
15794
15817
|
]), { rawData: items });
|
|
15818
|
+
if (truncated) {
|
|
15819
|
+
console.log(import_picocolors20.default.dim(`Showing ${items.length} of ${total}+ pending items (list truncated).`));
|
|
15820
|
+
}
|
|
15795
15821
|
});
|
|
15796
15822
|
cmd.command("diff").description("Show a pending review item (doc-change diff or draft reply body)").argument("<id>", "Review item ID (from `dosu review list`)").option("--json", "Output as JSON").action(async (id, opts) => {
|
|
15797
15823
|
const cfg = requireConfig10();
|
|
@@ -16123,7 +16149,7 @@ function suggestCommand() {
|
|
|
16123
16149
|
org_id: cfg.org_id,
|
|
16124
16150
|
excluded_provider_slugs: []
|
|
16125
16151
|
});
|
|
16126
|
-
const dataSourceIds = dataSources.map((ds) => ds.id);
|
|
16152
|
+
const dataSourceIds = dataSources.map((ds) => ds.id).filter((id) => id !== null);
|
|
16127
16153
|
const result = await client.suggestedDoc.generate.mutate({
|
|
16128
16154
|
knowledgeStoreId: ksId,
|
|
16129
16155
|
dataSourceIds
|
|
@@ -16186,7 +16212,11 @@ function tagsCommand() {
|
|
|
16186
16212
|
console.log(import_picocolors23.default.dim("No tags found."));
|
|
16187
16213
|
return;
|
|
16188
16214
|
}
|
|
16189
|
-
printTable(["ID", "Name", "Description"], tags.map((t2) => [
|
|
16215
|
+
printTable(["ID", "Name", "Description"], tags.map((t2) => [
|
|
16216
|
+
t2.topic_id.slice(0, 8),
|
|
16217
|
+
t2.name,
|
|
16218
|
+
t2.description ?? "—"
|
|
16219
|
+
]), { rawData: tags });
|
|
16190
16220
|
});
|
|
16191
16221
|
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
16222
|
const cfg = requireConfig13();
|
|
@@ -16243,18 +16273,34 @@ function threadsCommand() {
|
|
|
16243
16273
|
const cfg = requireConfig14();
|
|
16244
16274
|
const client = createTypedClient(cfg);
|
|
16245
16275
|
const input = {
|
|
16276
|
+
__testing_scope__: undefined,
|
|
16277
|
+
active: undefined,
|
|
16278
|
+
archived: undefined,
|
|
16279
|
+
channels: undefined,
|
|
16280
|
+
chatOnly: undefined,
|
|
16281
|
+
confidenceLevels: undefined,
|
|
16282
|
+
inbox_archived: undefined,
|
|
16283
|
+
previewOnly: undefined,
|
|
16284
|
+
providers: undefined,
|
|
16285
|
+
read: undefined,
|
|
16286
|
+
resolved: undefined,
|
|
16287
|
+
search: undefined,
|
|
16246
16288
|
space_id: cfg.space_id,
|
|
16289
|
+
workspaces: undefined,
|
|
16247
16290
|
limit: Math.min(Number.parseInt(opts.limit ?? "20", 10), 100)
|
|
16248
16291
|
};
|
|
16249
16292
|
if (opts.search)
|
|
16250
16293
|
input.search = opts.search;
|
|
16251
16294
|
if (opts.status === "resolved")
|
|
16252
16295
|
input.resolved = true;
|
|
16253
|
-
if (opts.status === "archived")
|
|
16296
|
+
if (opts.status === "archived") {
|
|
16254
16297
|
input.archived = true;
|
|
16298
|
+
input.inbox_archived = true;
|
|
16299
|
+
}
|
|
16255
16300
|
if (opts.status === "pending") {
|
|
16256
16301
|
input.resolved = false;
|
|
16257
16302
|
input.archived = false;
|
|
16303
|
+
input.inbox_archived = false;
|
|
16258
16304
|
}
|
|
16259
16305
|
const data = await client.thread.list.query(input);
|
|
16260
16306
|
const threads = data.list;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dosu/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.1",
|
|
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",
|