@dosu/cli 0.22.0 → 0.23.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.
- package/bin/dosu.js +54 -7
- package/package.json +2 -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.23.0", INSTALL_CHANNEL = "npm";
|
|
4581
4581
|
|
|
4582
4582
|
// src/debug/logger.ts
|
|
4583
4583
|
import {
|
|
@@ -15259,8 +15259,55 @@ var import_picocolors18 = __toESM(require_picocolors(), 1);
|
|
|
15259
15259
|
function requireConfig9() {
|
|
15260
15260
|
return requireLoginConfig();
|
|
15261
15261
|
}
|
|
15262
|
+
function humanizeSource(origin, version) {
|
|
15263
|
+
switch (origin) {
|
|
15264
|
+
case "manual_update":
|
|
15265
|
+
return version <= 1 ? "User created" : "User updated";
|
|
15266
|
+
case "llm_generated":
|
|
15267
|
+
return "AI generated";
|
|
15268
|
+
case "sync_upstream":
|
|
15269
|
+
return "Synced from source";
|
|
15270
|
+
case "api_update":
|
|
15271
|
+
return "Created via API";
|
|
15272
|
+
default:
|
|
15273
|
+
return origin;
|
|
15274
|
+
}
|
|
15275
|
+
}
|
|
15276
|
+
async function getKnowledgeStoreId2(client, spaceId) {
|
|
15277
|
+
const store = await client.knowledgeStore.getBySpaceId.query({ space_id: spaceId });
|
|
15278
|
+
if (!store) {
|
|
15279
|
+
console.error(import_picocolors18.default.red("No knowledge store found for this deployment."));
|
|
15280
|
+
process.exit(1);
|
|
15281
|
+
}
|
|
15282
|
+
return store.id;
|
|
15283
|
+
}
|
|
15262
15284
|
function reviewCommand() {
|
|
15263
15285
|
const cmd = new Command("review").description("Document review workflow");
|
|
15286
|
+
cmd.command("list").description("List pending document review items").option("--json", "Output as JSON").action(async (opts) => {
|
|
15287
|
+
const cfg = requireConfig9();
|
|
15288
|
+
if (!cfg.space_id) {
|
|
15289
|
+
console.error(import_picocolors18.default.red("Missing space config. Run 'dosu setup' to reconfigure."));
|
|
15290
|
+
process.exit(1);
|
|
15291
|
+
}
|
|
15292
|
+
const client = createTypedClient(cfg);
|
|
15293
|
+
const ksId = await getKnowledgeStoreId2(client, cfg.space_id);
|
|
15294
|
+
const items = await client.review.listPending.query({ knowledgeStoreId: ksId });
|
|
15295
|
+
if (opts.json) {
|
|
15296
|
+
printResult(items, opts);
|
|
15297
|
+
return;
|
|
15298
|
+
}
|
|
15299
|
+
if (!items || items.length === 0) {
|
|
15300
|
+
console.log(import_picocolors18.default.dim("No pending review items."));
|
|
15301
|
+
return;
|
|
15302
|
+
}
|
|
15303
|
+
printTable(["Version ID", "Title", "Source", "Status", "Created"], items.map((i2) => [
|
|
15304
|
+
i2.pageVersionId.slice(0, 8),
|
|
15305
|
+
truncate(i2.title ?? "(untitled)", 40),
|
|
15306
|
+
humanizeSource(i2.origin, i2.version),
|
|
15307
|
+
i2.pendingStatus,
|
|
15308
|
+
formatDate(i2.createdAt)
|
|
15309
|
+
]), { rawData: items });
|
|
15310
|
+
});
|
|
15264
15311
|
cmd.command("context").description("Get review context for a thread").argument("<thread-id>", "Thread ID").option("--json", "Output as JSON").action(async (threadId, opts) => {
|
|
15265
15312
|
const cfg = requireConfig9();
|
|
15266
15313
|
const client = createTypedClient(cfg);
|
|
@@ -15418,7 +15465,7 @@ function requireConfig11() {
|
|
|
15418
15465
|
}
|
|
15419
15466
|
return cfg;
|
|
15420
15467
|
}
|
|
15421
|
-
async function
|
|
15468
|
+
async function getKnowledgeStoreId3(client, spaceId) {
|
|
15422
15469
|
const store = await client.knowledgeStore.getBySpaceId.query({
|
|
15423
15470
|
space_id: spaceId
|
|
15424
15471
|
});
|
|
@@ -15433,7 +15480,7 @@ function suggestCommand() {
|
|
|
15433
15480
|
cmd.command("list").description("List pending document suggestions").option("--json", "Output as JSON").action(async (opts) => {
|
|
15434
15481
|
const cfg = requireConfig11();
|
|
15435
15482
|
const client = createTypedClient(cfg);
|
|
15436
|
-
const ksId = await
|
|
15483
|
+
const ksId = await getKnowledgeStoreId3(client, cfg.space_id);
|
|
15437
15484
|
const suggestions = await client.suggestedDoc.listForKnowledgeStore.query({
|
|
15438
15485
|
knowledgeStoreId: ksId
|
|
15439
15486
|
});
|
|
@@ -15453,7 +15500,7 @@ function suggestCommand() {
|
|
|
15453
15500
|
cmd.command("generate").description("Generate new document suggestions from data sources").option("--json", "Output as JSON").action(async (opts) => {
|
|
15454
15501
|
const cfg = requireConfig11();
|
|
15455
15502
|
const client = createTypedClient(cfg);
|
|
15456
|
-
const ksId = await
|
|
15503
|
+
const ksId = await getKnowledgeStoreId3(client, cfg.space_id);
|
|
15457
15504
|
if (!cfg.org_id) {
|
|
15458
15505
|
console.error(import_picocolors20.default.red("Missing org config. Run 'dosu setup' to reconfigure."));
|
|
15459
15506
|
process.exit(1);
|
|
@@ -15498,7 +15545,7 @@ function requireConfig12() {
|
|
|
15498
15545
|
}
|
|
15499
15546
|
return cfg;
|
|
15500
15547
|
}
|
|
15501
|
-
async function
|
|
15548
|
+
async function getKnowledgeStoreId4(client, spaceId) {
|
|
15502
15549
|
const store = await client.knowledgeStore.getBySpaceId.query({
|
|
15503
15550
|
space_id: spaceId
|
|
15504
15551
|
});
|
|
@@ -15513,7 +15560,7 @@ function tagsCommand() {
|
|
|
15513
15560
|
cmd.command("list").description("List all tags").option("--json", "Output as JSON").action(async (opts) => {
|
|
15514
15561
|
const cfg = requireConfig12();
|
|
15515
15562
|
const client = createTypedClient(cfg);
|
|
15516
|
-
const ksId = await
|
|
15563
|
+
const ksId = await getKnowledgeStoreId4(client, cfg.space_id);
|
|
15517
15564
|
const tags = await client.topic.listTopicsByKnowledgeStore.query({
|
|
15518
15565
|
knowledge_store_id: ksId
|
|
15519
15566
|
});
|
|
@@ -15540,7 +15587,7 @@ function tagsCommand() {
|
|
|
15540
15587
|
cmd.command("pages").description("List pages with a specific tag").argument("<tag-id>", "Tag ID").option("--search <query>", "Search within tagged pages").option("--limit <n>", "Maximum results", "10").option("--json", "Output as JSON").action(async (tagId, opts) => {
|
|
15541
15588
|
const cfg = requireConfig12();
|
|
15542
15589
|
const client = createTypedClient(cfg);
|
|
15543
|
-
const ksId = await
|
|
15590
|
+
const ksId = await getKnowledgeStoreId4(client, cfg.space_id);
|
|
15544
15591
|
const result = await client.topic.getPagesByTopicId.query({
|
|
15545
15592
|
knowledge_store_id: ksId,
|
|
15546
15593
|
topic_id: tagId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dosu/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Dosu CLI - Manage MCP servers for AI tools",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@biomejs/biome": "^2.5.0",
|
|
39
39
|
"@clack/prompts": "^1.6.0",
|
|
40
|
-
"@dosu/api-types": "0.0.
|
|
40
|
+
"@dosu/api-types": "0.0.24",
|
|
41
41
|
"@semantic-release/changelog": "^6.0.3",
|
|
42
42
|
"@semantic-release/exec": "^7.1.0",
|
|
43
43
|
"@semantic-release/git": "^10.0.1",
|