@puyinkai/xiaobao-cli 0.2.0 → 0.2.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/README.md +1 -1
- package/dist/{api-fsHHWWa3.mjs → api-DtFEKH3I.mjs} +2 -2
- package/dist/{audio-CRSMqaKo.mjs → audio-DhEiStuy.mjs} +2 -2
- package/dist/{auth-B4Yeoxae.mjs → auth-BYWDBat3.mjs} +3 -3
- package/dist/cli.mjs +11 -11
- package/dist/{consultant-E33hTGUO.mjs → consultant-DvH6ezCT.mjs} +1 -1
- package/dist/{current-CvAoml8L.mjs → current-gZDEGEmi.mjs} +2 -2
- package/dist/{customer-DcQ83oKD.mjs → customer-BtAtJyM8.mjs} +1 -1
- package/dist/{doc-0cdZeSpz.mjs → doc--iAF-laM.mjs} +2 -2
- package/dist/{doc-content-DqRX1V7P.mjs → doc-content-CqDVEgwX.mjs} +2 -2
- package/dist/{docs-bKt1q98C.mjs → docs-C_sC8m3F.mjs} +2 -2
- package/dist/{focus-XMRxnHPw.mjs → focus-BmLvFWII.mjs} +1 -1
- package/dist/{format-yjmxrbNm.mjs → format-CvKe7-yU.mjs} +6 -6
- package/dist/{kb-BEDA2vRF.mjs → kb-B9IY8-fu.mjs} +4 -4
- package/dist/{list-CnlQdzPp.mjs → list-CZVU6EVq.mjs} +2 -2
- package/dist/{list-dm9YaCG1.mjs → list-CiBpxZFs.mjs} +2 -2
- package/dist/{list-DFdDcHFq.mjs → list-DDGGG2p2.mjs} +2 -2
- package/dist/{list-BjYDuMgE.mjs → list-DW4Sk-76.mjs} +2 -2
- package/dist/{list-jy2wQpLh.mjs → list-DbReQZE2.mjs} +2 -2
- package/dist/{list-CZeh38GF.mjs → list-DmBz_8dR.mjs} +2 -2
- package/dist/{list-CrMOrnS-.mjs → list-VJImXOzy.mjs} +2 -2
- package/dist/{login-EtQi30zd.mjs → login-B5e9tJbS.mjs} +2 -2
- package/dist/{logout-DP7REhCd.mjs → logout-Dz_FFIRP.mjs} +2 -2
- package/dist/{project-BK3w8S8C.mjs → project-C2fvEuDl.mjs} +3 -3
- package/dist/{qa-DCT1gNwD.mjs → qa-C2TSTS-m.mjs} +2 -2
- package/dist/{resistance-Jyh976_G.mjs → resistance-BxOZNWbb.mjs} +1 -1
- package/dist/{search-CNCOdi46.mjs → search-CBWh8yKE.mjs} +2 -2
- package/dist/{summary-CXXVD46E.mjs → summary-CAm-WDNF.mjs} +2 -2
- package/dist/{text-C3Ap6L5n.mjs → text-bgoI1KC-.mjs} +2 -2
- package/dist/{use-Bn2OVJTX.mjs → use-xbTXVwXb.mjs} +2 -2
- package/dist/{visit-CMOoMrj9.mjs → visit-LX3B_OgE.mjs} +2 -2
- package/dist/{whoami-z-76WaCP.mjs → whoami-BMAFa4es.mjs} +2 -2
- package/package.json +1 -1
- package/skills/wangxiaobao-shared/SKILL.md +3 -3
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ xiaobao-cli audio list --from "2026-05-01 00:00:00" --to "2026-05-02 00:00:00" -
|
|
|
59
59
|
|
|
60
60
|
## 通用 flags
|
|
61
61
|
|
|
62
|
-
- `--format json|
|
|
62
|
+
- `--format toon|json|table` —— 默认 `toon`(省 token,适合 LLM 上下文);`json` 严格 JSON、agent/人类友好;`table` 暂未实现(回退 JSON)
|
|
63
63
|
- `--api-base <url>` / `--auth-base <url>` —— 覆盖默认(也可 env `XIAOBAO_API_BASE` / `XIAOBAO_AUTH_BASE`)
|
|
64
64
|
|
|
65
65
|
## 输出协议
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { t as loadActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
//#region src/commands/api.ts
|
|
8
8
|
/**
|
|
@@ -69,7 +69,7 @@ var api_default = defineCommand({
|
|
|
69
69
|
"auth-base": { type: "string" },
|
|
70
70
|
format: {
|
|
71
71
|
type: "string",
|
|
72
|
-
default: "
|
|
72
|
+
default: "toon"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
async run({ args }) {
|
|
@@ -6,8 +6,8 @@ var audio_default = defineCommand({
|
|
|
6
6
|
description: "录音元数据分页 / 单条文本查询"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
list: () => import("./list-
|
|
10
|
-
text: () => import("./text-
|
|
9
|
+
list: () => import("./list-CZVU6EVq.mjs").then((m) => m.default),
|
|
10
|
+
text: () => import("./text-bgoI1KC-.mjs").then((m) => m.default)
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
@@ -6,9 +6,9 @@ var auth_default = defineCommand({
|
|
|
6
6
|
description: "OAuth 登录 / 身份查询 / 登出(device flow)"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
login: () => import("./login-
|
|
10
|
-
whoami: () => import("./whoami-
|
|
11
|
-
logout: () => import("./logout-
|
|
9
|
+
login: () => import("./login-B5e9tJbS.mjs").then((m) => m.default),
|
|
10
|
+
whoami: () => import("./whoami-BMAFa4es.mjs").then((m) => m.default),
|
|
11
|
+
logout: () => import("./logout-Dz_FFIRP.mjs").then((m) => m.default)
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
package/dist/cli.mjs
CHANGED
|
@@ -19,17 +19,17 @@ runMain(defineCommand({
|
|
|
19
19
|
description: "旺小宝 CLI — host-agnostic 业务数据 / 问数 / 来访总结 / 知识库 能力 (openclaw-xiaobao plugin 的 CLI 等价物)"
|
|
20
20
|
},
|
|
21
21
|
subCommands: {
|
|
22
|
-
auth: () => import("./auth-
|
|
23
|
-
project: () => import("./project-
|
|
24
|
-
consultant: () => import("./consultant-
|
|
25
|
-
audio: () => import("./audio-
|
|
26
|
-
customer: () => import("./customer-
|
|
27
|
-
visit: () => import("./visit-
|
|
28
|
-
focus: () => import("./focus-
|
|
29
|
-
resistance: () => import("./resistance-
|
|
30
|
-
qa: () => import("./qa-
|
|
31
|
-
kb: () => import("./kb-
|
|
32
|
-
api: () => import("./api-
|
|
22
|
+
auth: () => import("./auth-BYWDBat3.mjs").then((m) => m.default),
|
|
23
|
+
project: () => import("./project-C2fvEuDl.mjs").then((m) => m.default),
|
|
24
|
+
consultant: () => import("./consultant-DvH6ezCT.mjs").then((m) => m.default),
|
|
25
|
+
audio: () => import("./audio-DhEiStuy.mjs").then((m) => m.default),
|
|
26
|
+
customer: () => import("./customer-BtAtJyM8.mjs").then((m) => m.default),
|
|
27
|
+
visit: () => import("./visit-LX3B_OgE.mjs").then((m) => m.default),
|
|
28
|
+
focus: () => import("./focus-BmLvFWII.mjs").then((m) => m.default),
|
|
29
|
+
resistance: () => import("./resistance-BxOZNWbb.mjs").then((m) => m.default),
|
|
30
|
+
qa: () => import("./qa-C2TSTS-m.mjs").then((m) => m.default),
|
|
31
|
+
kb: () => import("./kb-B9IY8-fu.mjs").then((m) => m.default),
|
|
32
|
+
api: () => import("./api-DtFEKH3I.mjs").then((m) => m.default)
|
|
33
33
|
}
|
|
34
34
|
}));
|
|
35
35
|
//#endregion
|
|
@@ -5,7 +5,7 @@ var consultant_default = defineCommand({
|
|
|
5
5
|
name: "consultant",
|
|
6
6
|
description: "查询有权限的置业顾问列表"
|
|
7
7
|
},
|
|
8
|
-
subCommands: { list: () => import("./list-
|
|
8
|
+
subCommands: { list: () => import("./list-CiBpxZFs.mjs").then((m) => m.default) }
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
11
|
export { consultant_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
2
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
2
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/commands/project/current.ts
|
|
5
5
|
/**
|
|
@@ -18,7 +18,7 @@ var current_default = defineCommand({
|
|
|
18
18
|
},
|
|
19
19
|
args: { format: {
|
|
20
20
|
type: "string",
|
|
21
|
-
default: "
|
|
21
|
+
default: "toon"
|
|
22
22
|
} },
|
|
23
23
|
async run({ args }) {
|
|
24
24
|
try {
|
|
@@ -5,7 +5,7 @@ var customer_default = defineCommand({
|
|
|
5
5
|
name: "customer",
|
|
6
6
|
description: "客户画像分页查询"
|
|
7
7
|
},
|
|
8
|
-
subCommands: { list: () => import("./list-
|
|
8
|
+
subCommands: { list: () => import("./list-DDGGG2p2.mjs").then((m) => m.default) }
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
11
|
export { customer_default as default };
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
//#region src/commands/kb/doc.ts
|
|
8
8
|
/**
|
|
@@ -25,7 +25,7 @@ var doc_default = defineCommand({
|
|
|
25
25
|
"auth-base": { type: "string" },
|
|
26
26
|
format: {
|
|
27
27
|
type: "string",
|
|
28
|
-
default: "
|
|
28
|
+
default: "toon"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
async run({ args }) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
//#region src/commands/kb/doc-content.ts
|
|
8
8
|
/**
|
|
@@ -33,7 +33,7 @@ var doc_content_default = defineCommand({
|
|
|
33
33
|
"auth-base": { type: "string" },
|
|
34
34
|
format: {
|
|
35
35
|
type: "string",
|
|
36
|
-
default: "
|
|
36
|
+
default: "toon"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
async run({ args }) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
//#region src/commands/kb/docs.ts
|
|
8
8
|
/**
|
|
@@ -24,7 +24,7 @@ var docs_default = defineCommand({
|
|
|
24
24
|
"auth-base": { type: "string" },
|
|
25
25
|
format: {
|
|
26
26
|
type: "string",
|
|
27
|
-
default: "
|
|
27
|
+
default: "toon"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
async run({ args }) {
|
|
@@ -5,7 +5,7 @@ var focus_default = defineCommand({
|
|
|
5
5
|
name: "focus",
|
|
6
6
|
description: "客户关注点标签分页查询"
|
|
7
7
|
},
|
|
8
|
-
subCommands: { list: () => import("./list-
|
|
8
|
+
subCommands: { list: () => import("./list-VJImXOzy.mjs").then((m) => m.default) }
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
11
|
export { focus_default as default };
|
|
@@ -560,21 +560,21 @@ function resolveOptions(options) {
|
|
|
560
560
|
/**
|
|
561
561
|
* Format a result payload to stdout in one of three flavours:
|
|
562
562
|
*
|
|
563
|
-
*
|
|
564
|
-
* toon TOON (Token-Oriented Object Notation) — ~30-50% fewer
|
|
563
|
+
* toon (default) TOON (Token-Oriented Object Notation) — ~30-50% fewer
|
|
565
564
|
* tokens on uniform array-of-objects (LLM context optimization)
|
|
565
|
+
* json pretty JSON, agent-friendly and human-OK
|
|
566
566
|
* table not implemented in 0.1.0 — falls back to pretty JSON
|
|
567
567
|
* (a v0.1.x target; pure cosmetic, doesn't affect agent flow)
|
|
568
568
|
*
|
|
569
569
|
* Errors / logs MUST NOT go through here — use stderr (console.error) so
|
|
570
570
|
* agents parsing stdout don't break.
|
|
571
571
|
*/
|
|
572
|
-
function writeResult(data, format = "
|
|
572
|
+
function writeResult(data, format = "toon") {
|
|
573
573
|
const text = normalize(format) === "toon" ? encode(data) : JSON.stringify(data, null, 2);
|
|
574
574
|
process.stdout.write(text + "\n");
|
|
575
575
|
}
|
|
576
576
|
/** Print an error structurally to stdout (still parseable) and human hint to stderr. */
|
|
577
|
-
function writeError(error, format = "
|
|
577
|
+
function writeError(error, format = "toon") {
|
|
578
578
|
const payload = serializeError(error);
|
|
579
579
|
const text = normalize(format) === "toon" ? encode(payload) : JSON.stringify(payload, null, 2);
|
|
580
580
|
process.stdout.write(text + "\n");
|
|
@@ -585,9 +585,9 @@ function writeError(error, format = "json") {
|
|
|
585
585
|
if (err.hint) process.stderr.write(`hint: ${err.hint}\n`);
|
|
586
586
|
}
|
|
587
587
|
function normalize(f) {
|
|
588
|
-
if (f === "
|
|
588
|
+
if (f === "json") return "json";
|
|
589
589
|
if (f === "table") return "table";
|
|
590
|
-
return "
|
|
590
|
+
return "toon";
|
|
591
591
|
}
|
|
592
592
|
function serializeError(error) {
|
|
593
593
|
if (error instanceof Error) {
|
|
@@ -6,10 +6,10 @@ var kb_default = defineCommand({
|
|
|
6
6
|
description: "项目知识库:语义检索 / 文档列表 / 文档详情 / 文档正文分页"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
search: () => import("./search-
|
|
10
|
-
docs: () => import("./docs-
|
|
11
|
-
doc: () => import("./doc-
|
|
12
|
-
"doc-content": () => import("./doc-content-
|
|
9
|
+
search: () => import("./search-CBWh8yKE.mjs").then((m) => m.default),
|
|
10
|
+
docs: () => import("./docs-C_sC8m3F.mjs").then((m) => m.default),
|
|
11
|
+
doc: () => import("./doc--iAF-laM.mjs").then((m) => m.default),
|
|
12
|
+
"doc-content": () => import("./doc-content-CqDVEgwX.mjs").then((m) => m.default)
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
//#endregion
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { n as mergeUserIds, r as toLocalDateTime, t as csvToArray } from "./util-CaPQBlNa.mjs";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
//#region src/commands/audio/list.ts
|
|
@@ -49,7 +49,7 @@ var list_default = defineCommand({
|
|
|
49
49
|
"auth-base": { type: "string" },
|
|
50
50
|
format: {
|
|
51
51
|
type: "string",
|
|
52
|
-
default: "
|
|
52
|
+
default: "toon"
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
async run({ args }) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
//#region src/commands/consultant/list.ts
|
|
8
8
|
/**
|
|
@@ -22,7 +22,7 @@ var list_default = defineCommand({
|
|
|
22
22
|
"auth-base": { type: "string" },
|
|
23
23
|
format: {
|
|
24
24
|
type: "string",
|
|
25
|
-
default: "
|
|
25
|
+
default: "toon"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
async run({ args }) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { r as toLocalDateTime } from "./util-CaPQBlNa.mjs";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
//#region src/commands/customer/list.ts
|
|
@@ -60,7 +60,7 @@ var list_default = defineCommand({
|
|
|
60
60
|
"auth-base": { type: "string" },
|
|
61
61
|
format: {
|
|
62
62
|
type: "string",
|
|
63
|
-
default: "
|
|
63
|
+
default: "toon"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
async run({ args }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
3
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/commands/project/list.ts
|
|
6
6
|
/**
|
|
@@ -26,7 +26,7 @@ var list_default = defineCommand({
|
|
|
26
26
|
"auth-base": { type: "string" },
|
|
27
27
|
format: {
|
|
28
28
|
type: "string",
|
|
29
|
-
default: "
|
|
29
|
+
default: "toon"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
async run({ args }) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { r as toLocalDateTime } from "./util-CaPQBlNa.mjs";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
//#region src/commands/visit/list.ts
|
|
@@ -47,7 +47,7 @@ var list_default = defineCommand({
|
|
|
47
47
|
"auth-base": { type: "string" },
|
|
48
48
|
format: {
|
|
49
49
|
type: "string",
|
|
50
|
-
default: "
|
|
50
|
+
default: "toon"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
async run({ args }) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { r as toLocalDateTime, t as csvToArray } from "./util-CaPQBlNa.mjs";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
//#region src/commands/resistance/list.ts
|
|
@@ -59,7 +59,7 @@ var list_default = defineCommand({
|
|
|
59
59
|
"auth-base": { type: "string" },
|
|
60
60
|
format: {
|
|
61
61
|
type: "string",
|
|
62
|
-
default: "
|
|
62
|
+
default: "toon"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
async run({ args }) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { r as toLocalDateTime, t as csvToArray } from "./util-CaPQBlNa.mjs";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
//#region src/commands/focus/list.ts
|
|
@@ -59,7 +59,7 @@ var list_default = defineCommand({
|
|
|
59
59
|
"auth-base": { type: "string" },
|
|
60
60
|
format: {
|
|
61
61
|
type: "string",
|
|
62
|
-
default: "
|
|
62
|
+
default: "toon"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
async run({ args }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveConfig, n as pollForToken, r as refreshToken, t as initiateDeviceAuthorization } from "./device-flow-D6JVcEap.mjs";
|
|
2
2
|
import { a as isAccessTokenValid, c as writePendingAuth, l as writeToken, n as clearPendingAuth, o as readPendingAuth, r as clearToken, s as readToken, t as NoPendingAuthError } from "./token-store-CXizLE2_.mjs";
|
|
3
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
3
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/commands/auth/login.ts
|
|
6
6
|
/**
|
|
@@ -56,7 +56,7 @@ var login_default = defineCommand({
|
|
|
56
56
|
},
|
|
57
57
|
format: {
|
|
58
58
|
type: "string",
|
|
59
|
-
default: "
|
|
59
|
+
default: "toon"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
async run({ args }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveConfig, i as revokeRefreshToken } from "./device-flow-D6JVcEap.mjs";
|
|
2
2
|
import { n as clearPendingAuth, r as clearToken, s as readToken } from "./token-store-CXizLE2_.mjs";
|
|
3
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
3
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
4
4
|
import { defineCommand } from "citty";
|
|
5
5
|
//#region src/commands/auth/logout.ts
|
|
6
6
|
/**
|
|
@@ -23,7 +23,7 @@ var logout_default = defineCommand({
|
|
|
23
23
|
},
|
|
24
24
|
format: {
|
|
25
25
|
type: "string",
|
|
26
|
-
default: "
|
|
26
|
+
default: "toon"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
async run({ args }) {
|
|
@@ -6,9 +6,9 @@ var project_default = defineCommand({
|
|
|
6
6
|
description: "查询 / 切换激活项目"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
list: () => import("./list-
|
|
10
|
-
use: () => import("./use-
|
|
11
|
-
current: () => import("./current-
|
|
9
|
+
list: () => import("./list-DW4Sk-76.mjs").then((m) => m.default),
|
|
10
|
+
use: () => import("./use-xbTXVwXb.mjs").then((m) => m.default),
|
|
11
|
+
current: () => import("./current-gZDEGEmi.mjs").then((m) => m.default)
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
//#endregion
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
//#region src/commands/qa.ts
|
|
8
8
|
/**
|
|
@@ -37,7 +37,7 @@ var qa_default = defineCommand({
|
|
|
37
37
|
"auth-base": { type: "string" },
|
|
38
38
|
format: {
|
|
39
39
|
type: "string",
|
|
40
|
-
default: "
|
|
40
|
+
default: "toon"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
async run({ args }) {
|
|
@@ -5,7 +5,7 @@ var resistance_default = defineCommand({
|
|
|
5
5
|
name: "resistance",
|
|
6
6
|
description: "客户抗性点标签分页查询"
|
|
7
7
|
},
|
|
8
|
-
subCommands: { list: () => import("./list-
|
|
8
|
+
subCommands: { list: () => import("./list-DmBz_8dR.mjs").then((m) => m.default) }
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
11
|
export { resistance_default as default };
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { t as csvToArray } from "./util-CaPQBlNa.mjs";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
//#region src/commands/kb/search.ts
|
|
@@ -46,7 +46,7 @@ var search_default = defineCommand({
|
|
|
46
46
|
"auth-base": { type: "string" },
|
|
47
47
|
format: {
|
|
48
48
|
type: "string",
|
|
49
|
-
default: "
|
|
49
|
+
default: "toon"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
async run({ args }) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { r as toLocalDateTime } from "./util-CaPQBlNa.mjs";
|
|
7
7
|
import { defineCommand } from "citty";
|
|
8
8
|
//#region src/commands/visit/summary.ts
|
|
@@ -54,7 +54,7 @@ var summary_default = defineCommand({
|
|
|
54
54
|
"auth-base": { type: "string" },
|
|
55
55
|
format: {
|
|
56
56
|
type: "string",
|
|
57
|
-
default: "
|
|
57
|
+
default: "toon"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
async run({ args }) {
|
|
@@ -2,7 +2,7 @@ import { a as resolveConfig } from "./device-flow-D6JVcEap.mjs";
|
|
|
2
2
|
import { t as xbApiFetch } from "./api-client-CDNjkArS.mjs";
|
|
3
3
|
import { n as requireActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
4
4
|
import { t as tenantProjectHeaders } from "./headers-DSnR4sjk.mjs";
|
|
5
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
5
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
6
6
|
import { defineCommand } from "citty";
|
|
7
7
|
//#region src/commands/audio/text.ts
|
|
8
8
|
/**
|
|
@@ -27,7 +27,7 @@ var text_default = defineCommand({
|
|
|
27
27
|
"auth-base": { type: "string" },
|
|
28
28
|
format: {
|
|
29
29
|
type: "string",
|
|
30
|
-
default: "
|
|
30
|
+
default: "toon"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
async run({ args }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as saveActiveProject } from "./project-store-CKVJa54T.mjs";
|
|
2
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
2
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/commands/project/use.ts
|
|
5
5
|
/**
|
|
@@ -35,7 +35,7 @@ var use_default = defineCommand({
|
|
|
35
35
|
},
|
|
36
36
|
format: {
|
|
37
37
|
type: "string",
|
|
38
|
-
default: "
|
|
38
|
+
default: "toon"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
async run({ args }) {
|
|
@@ -6,8 +6,8 @@ var visit_default = defineCommand({
|
|
|
6
6
|
description: "客户来访分页查询 / 来访接待总结"
|
|
7
7
|
},
|
|
8
8
|
subCommands: {
|
|
9
|
-
list: () => import("./list-
|
|
10
|
-
summary: () => import("./summary-
|
|
9
|
+
list: () => import("./list-DbReQZE2.mjs").then((m) => m.default),
|
|
10
|
+
summary: () => import("./summary-CAm-WDNF.mjs").then((m) => m.default)
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as decodeJwtPayload, s as readToken } from "./token-store-CXizLE2_.mjs";
|
|
2
|
-
import { n as writeResult, t as writeError } from "./format-
|
|
2
|
+
import { n as writeResult, t as writeError } from "./format-CvKe7-yU.mjs";
|
|
3
3
|
import { defineCommand } from "citty";
|
|
4
4
|
//#region src/commands/auth/whoami.ts
|
|
5
5
|
/**
|
|
@@ -15,7 +15,7 @@ var whoami_default = defineCommand({
|
|
|
15
15
|
},
|
|
16
16
|
args: { format: {
|
|
17
17
|
type: "string",
|
|
18
|
-
default: "
|
|
18
|
+
default: "toon"
|
|
19
19
|
} },
|
|
20
20
|
async run({ args }) {
|
|
21
21
|
try {
|
package/package.json
CHANGED
|
@@ -87,7 +87,7 @@ xiaobao-cli project current # 显示当前激活的 tenant/project + updatedAt
|
|
|
87
87
|
|
|
88
88
|
| 流 | 内容 |
|
|
89
89
|
| --- | --- |
|
|
90
|
-
| **stdout** | 结果 /
|
|
90
|
+
| **stdout** | 结果 / 错误对象,默认 **TOON 格式**(省 token);`--format json` 切回 JSON。均可机器解析 |
|
|
91
91
|
| **stderr** | 进度 / 人类友好错误提示 / verification URL 等。Agent 一般忽略 |
|
|
92
92
|
| **exit code** | 0 = 成功;非 0 = 失败(业务错误 / 参数错 / 网络错) |
|
|
93
93
|
|
|
@@ -97,8 +97,8 @@ Agent 消费时**只 parse stdout JSON**,stderr 是辅助。
|
|
|
97
97
|
|
|
98
98
|
| 值 | 用途 |
|
|
99
99
|
| --- | --- |
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
100
|
+
| `toon`(默认) | TOON 格式,uniform array of objects 省 30-50% token(LLM 上下文优化) |
|
|
101
|
+
| `json` | pretty JSON,agent / 人类都能读;需要严格 JSON 时显式加 `--format json` |
|
|
102
102
|
|
|
103
103
|
## 错误对象结构
|
|
104
104
|
|