@vocmarket/tihao-sop 0.1.14
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/.claude-plugin/plugin.json +8 -0
- package/.mcp.json +10 -0
- package/README.md +66 -0
- package/bin/tihao-sourcing.js +31 -0
- package/docs/acceptance-checklist.md +110 -0
- package/docs/capability-map.md +14 -0
- package/docs/install-guide.md +309 -0
- package/docs/live-provider-integration-runbook.md +230 -0
- package/docs/payment-package-links.md +42 -0
- package/docs/reference-evidence-roadmap.md +327 -0
- package/docs/release-notes.md +352 -0
- package/docs/sk//350/256/257/351/243/236env.md +17 -0
- package/install.js +122 -0
- package/mcp/src/core/credentials.js +84 -0
- package/mcp/src/core/files.js +177 -0
- package/mcp/src/core/payment-links.js +92 -0
- package/mcp/src/core/result-envelope.js +54 -0
- package/mcp/src/features/tihao-sourcing/brief-parser.js +498 -0
- package/mcp/src/features/tihao-sourcing/live-provider.js +252 -0
- package/mcp/src/features/tihao-sourcing/multimodal-evidence.js +335 -0
- package/mcp/src/features/tihao-sourcing/preference-memory.js +115 -0
- package/mcp/src/features/tihao-sourcing/ranker.js +171 -0
- package/mcp/src/features/tihao-sourcing/reference-baselines.js +120 -0
- package/mcp/src/features/tihao-sourcing/reference-enrichment-provider.js +113 -0
- package/mcp/src/features/tihao-sourcing/report.js +333 -0
- package/mcp/src/features/tihao-sourcing/sample-data.js +141 -0
- package/mcp/src/features/tihao-sourcing/sourcing-workflow.js +126 -0
- package/mcp/src/server.js +201 -0
- package/mcp/src/tools/cli-args.js +37 -0
- package/mcp/src/tools/tihao-brief-sourcing-run.js +26 -0
- package/mcp/src/tools/tihao-preference-update.js +24 -0
- package/memory-templates/tihao-sourcing-profile.json +19 -0
- package/package.json +58 -0
- package/scripts/acceptance.js +67 -0
- package/scripts/brief-fixture-smoke.js +60 -0
- package/scripts/live-acceptance.js +68 -0
- package/scripts/product-acceptance-audit.js +181 -0
- package/scripts/provider-contract-audit.js +368 -0
- package/scripts/smoke-mcp.js +55 -0
- package/scripts/smoke-package.js +338 -0
- package/skill-package-manifest.json +40 -0
- package/skills/tihao-creator-sourcing/SKILL.md +219 -0
- package/skills/tihao-creator-sourcing/references/live-mode.md +73 -0
- package/skills/tihao-creator-sourcing/references/output-format.md +49 -0
- package/skills/tihao-creator-sourcing/references/user-workflow.md +29 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tihao-sourcing",
|
|
3
|
+
"description": "Tihao AI creator sourcing skills for Claude Code: upload/read client briefs, generate business-ready blogger lists, use sample or live VOC e-commerce data, handle token/recharge states, and keep sourcing preference memory.",
|
|
4
|
+
"version": "0.1.14",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "nkkj-BrainHack"
|
|
7
|
+
}
|
|
8
|
+
}
|
package/.mcp.json
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Tihao SOP
|
|
2
|
+
|
|
3
|
+
Claude Code 技能包:按提号 SOP 读取客户 Brief,生成商务可复核的博主/达人推荐名单。
|
|
4
|
+
|
|
5
|
+
Published npm package:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
@vocmarket/tihao-sop
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Recommended workspace install:
|
|
12
|
+
|
|
13
|
+
```powershell
|
|
14
|
+
npx --yes @vocmarket/tihao-sop@latest workspace --smoke
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Full installation guide:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
docs/install-guide.md
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Real-provider integration runbook:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
docs/live-provider-integration-runbook.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What It Does
|
|
30
|
+
|
|
31
|
+
- `sample` 模式:无 token 跑通 brief -> 博主名单流程。
|
|
32
|
+
- `live` 模式:调用公司 `voc-e-commerce` 代理接口,使用 JustOne-backed 数据。
|
|
33
|
+
- 输出 Markdown、JSON、CSV 三份结果。
|
|
34
|
+
- 无 token、401、403、额度不足时返回友好的开通/充值提示,不暴露原始错误或 token。
|
|
35
|
+
- 支持偏好记忆,把客户反馈沉淀到下次选号。
|
|
36
|
+
- 支持参考博主链接、TikHub-compatible 基线补证接口和 ffmpeg/ASR/Vision-ready 证据卡接口;真实 provider 通过 `docs/live-provider-integration-runbook.md` 单独验收。
|
|
37
|
+
|
|
38
|
+
## Local Development
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
npm install
|
|
42
|
+
npm run sample
|
|
43
|
+
npm run smoke:package
|
|
44
|
+
npm run acceptance
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Workspace install from local source:
|
|
48
|
+
|
|
49
|
+
```powershell
|
|
50
|
+
node install.js --workspace --smoke
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Live small run:
|
|
54
|
+
|
|
55
|
+
```powershell
|
|
56
|
+
$env:TIHAO_SESSION_TOKEN="<your-session-token>"
|
|
57
|
+
$env:TIHAO_COMPANY="<your-company-object-id>"
|
|
58
|
+
npm run live
|
|
59
|
+
npm run live:acceptance
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## MCP Tools
|
|
63
|
+
|
|
64
|
+
- `tihao_brief_sourcing_run`
|
|
65
|
+
- `tihao_token_check`
|
|
66
|
+
- `tihao_preference_update`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { spawnSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
const command = process.argv[2] || 'help';
|
|
6
|
+
const root = path.resolve(__dirname, '..');
|
|
7
|
+
|
|
8
|
+
if (command === 'install' || command === 'workspace') {
|
|
9
|
+
const args = [path.join(root, 'install.js')];
|
|
10
|
+
if (command === 'workspace') args.push('--workspace');
|
|
11
|
+
args.push(...process.argv.slice(3));
|
|
12
|
+
const result = spawnSync(process.execPath, args, { stdio: 'inherit', cwd: process.cwd() });
|
|
13
|
+
process.exit(result.status || 0);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (command === 'sample') {
|
|
17
|
+
const result = spawnSync(process.execPath, [
|
|
18
|
+
path.join(root, 'mcp/src/tools/tihao-brief-sourcing-run.js'),
|
|
19
|
+
'--collection-mode',
|
|
20
|
+
'sample',
|
|
21
|
+
...process.argv.slice(3)
|
|
22
|
+
], { stdio: 'inherit', cwd: process.cwd() });
|
|
23
|
+
process.exit(result.status || 0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
console.log([
|
|
27
|
+
'tihao-sourcing commands:',
|
|
28
|
+
' tihao-sourcing install Install plugin to user Claude directory',
|
|
29
|
+
' tihao-sourcing workspace --smoke Install plugin into current workspace and run smoke',
|
|
30
|
+
' tihao-sourcing sample --brief <file> Run sample brief-to-blogger-list workflow'
|
|
31
|
+
].join('\n'));
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Acceptance Checklist
|
|
2
|
+
|
|
3
|
+
Updated: 2026-06-04
|
|
4
|
+
|
|
5
|
+
## Automated Gates
|
|
6
|
+
|
|
7
|
+
Run from the package root:
|
|
8
|
+
|
|
9
|
+
```powershell
|
|
10
|
+
npm install
|
|
11
|
+
npm run acceptance
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The acceptance script verifies:
|
|
15
|
+
|
|
16
|
+
- package smoke: sample brief-to-list workflow writes Markdown, JSON, and CSV;
|
|
17
|
+
- brief parser extracts the demo brief brand, platform target count, and fan range;
|
|
18
|
+
- preference memory update writes a memory JSON;
|
|
19
|
+
- no-token live path returns `needs_token` with `errors=[]`;
|
|
20
|
+
- mocked 403 returns `needs_recharge` with `errors=[]`;
|
|
21
|
+
- mocked 401 returns `needs_valid_token` with `errors=[]`;
|
|
22
|
+
- mocked 200 live response normalizes at least one creator;
|
|
23
|
+
- product-manager acceptance audit verifies report sections, reference anchors, evidence cards, CSV/JSON evidence fields, and no token/provisional-pricing leakage;
|
|
24
|
+
- MCP protocol smoke connects to the server, lists tools, and calls sample/token tools;
|
|
25
|
+
- `npm pack --dry-run` includes only intended package files;
|
|
26
|
+
- workspace install writes `.mcp.json`, `.claude/plugins/tihao-sourcing`, and `.claude/skills/tihao-creator-sourcing`.
|
|
27
|
+
|
|
28
|
+
Dedicated product audit:
|
|
29
|
+
|
|
30
|
+
```powershell
|
|
31
|
+
npm run acceptance:pm
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This audit runs a DHA-style sample with reference baselines and multimodal evidence cards, then checks that:
|
|
35
|
+
|
|
36
|
+
- Markdown includes reference anchors, multimodal evidence cards, business list, review advice, and generated files;
|
|
37
|
+
- JSON keeps `referenceLinks`, `referenceStyleAnchors`, `evidenceCards`, `referenceSimilarity`, and evidence signals;
|
|
38
|
+
- CSV keeps `referenceSimilarity`, `evidenceSignals`, and `evidenceRiskHints`;
|
|
39
|
+
- reports do not leak tokens or provisional pricing.
|
|
40
|
+
|
|
41
|
+
Provider contract audit:
|
|
42
|
+
|
|
43
|
+
```powershell
|
|
44
|
+
npm run acceptance:providers:mock
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This verifies the TikHub-compatible reference enrichment contract and multimodal evidence-card contract with a local mock provider.
|
|
48
|
+
|
|
49
|
+
When real provider credentials are available, run:
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
$env:TIKHUB_BASE_URL="<reference enrichment provider>"
|
|
53
|
+
$env:TIKHUB_TOKEN="<optional tikhub token>"
|
|
54
|
+
$env:TIHAO_EVIDENCE_BASE_URL="<multimodal evidence provider>"
|
|
55
|
+
$env:TIHAO_EVIDENCE_TOKEN="<optional evidence provider token>"
|
|
56
|
+
npm run acceptance:providers
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The real provider gate verifies:
|
|
60
|
+
|
|
61
|
+
- reference links can become at least one `referenceBaseline`;
|
|
62
|
+
- candidates receive `referenceSimilarity`;
|
|
63
|
+
- the evidence provider returns at least one `evidenceCard`;
|
|
64
|
+
- candidates receive `evidenceSignals`;
|
|
65
|
+
- provider results do not leak Authorization headers or env tokens.
|
|
66
|
+
- mocked provider requests include `contractVersion=tihao-provider-v1`, reference links/style anchors, evidence creators, requested evidence capabilities, and optional evidence Authorization.
|
|
67
|
+
- mocked Doubao video analysis contract verifies `doubao-seed-2-0-pro`, Authorization, requested visual capabilities, and OpenAI-style JSON evidenceCards parsing.
|
|
68
|
+
|
|
69
|
+
Detailed real-provider runbook:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
docs/live-provider-integration-runbook.md
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Manual Live Gate
|
|
76
|
+
|
|
77
|
+
Run only with a safe test account and enough quota:
|
|
78
|
+
|
|
79
|
+
```powershell
|
|
80
|
+
$env:TIHAO_SESSION_TOKEN="<Parse sessionToken>"
|
|
81
|
+
$env:TIHAO_COMPANY="<Company objectId>"
|
|
82
|
+
npm run live:acceptance
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
This gate verifies the real online `voc-e-commerce` proxy and billing path at the smallest useful scale:
|
|
86
|
+
|
|
87
|
+
- `keywordLimit=1`;
|
|
88
|
+
- `pagesPerKeyword=1`;
|
|
89
|
+
- at least one live candidate is produced;
|
|
90
|
+
- Markdown/JSON/CSV files are written;
|
|
91
|
+
- the token is not present in the returned result.
|
|
92
|
+
|
|
93
|
+
## Current Known Limit
|
|
94
|
+
|
|
95
|
+
The package cannot prove the real online live gate unless a valid Parse `sessionToken` and `Company objectId` are available in the environment. The automated suite uses a local mock server to verify all user-facing auth/recharge states without consuming quota.
|
|
96
|
+
|
|
97
|
+
## Customer-Ready Criteria
|
|
98
|
+
|
|
99
|
+
The package is customer-demo ready when:
|
|
100
|
+
|
|
101
|
+
- `npm run acceptance` passes;
|
|
102
|
+
- a sample brief report shows target count, current candidate count, platform coverage, and gaps;
|
|
103
|
+
- reference links and evidence cards are visible in the report when provided;
|
|
104
|
+
- no raw 401/403/upstream body is shown in chat output;
|
|
105
|
+
- no token appears in reports or structured results;
|
|
106
|
+
- workspace install succeeds in a fresh temp directory.
|
|
107
|
+
|
|
108
|
+
The package is production-live ready when the manual live gate also passes with the customer's own test token and company.
|
|
109
|
+
|
|
110
|
+
The package is multimodal-live ready only when `npm run acceptance:providers` passes against the real TikHub/evidence providers, and at least one real ffmpeg/ASR/Vision evidence card has been reviewed manually.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Capability Map
|
|
2
|
+
|
|
3
|
+
| Capability | Tool | Mode | Output |
|
|
4
|
+
| --- | --- | --- | --- |
|
|
5
|
+
| Brief parsing | `tihao_brief_sourcing_run` | sample/live | structured criteria |
|
|
6
|
+
| Reference blogger anchors | `tihao_brief_sourcing_run` | sample/live | referenceLinks, referenceStyleAnchors, referenceSignals |
|
|
7
|
+
| Reference baseline cache | `tihao_brief_sourcing_run` | sample/live | referenceBaselines, referenceSimilarity, referenceHitPoints |
|
|
8
|
+
| Reference enrichment provider | `tihao_brief_sourcing_run` | sample/live | optional TikHub-compatible baseline enrichment with friendly warnings |
|
|
9
|
+
| Multimodal evidence cards | `tihao_brief_sourcing_run` | sample/live | evidenceCards, visual/asr/text signals, manual-review hints |
|
|
10
|
+
| Real provider runbook | docs | manual/live | `docs/live-provider-integration-runbook.md` |
|
|
11
|
+
| Blogger list generation | `tihao_brief_sourcing_run` | sample/live | Markdown, JSON, CSV |
|
|
12
|
+
| Token check | `tihao_token_check` | live | friendly state |
|
|
13
|
+
| Preference memory | `tihao_preference_update` | sample/live | memory JSON |
|
|
14
|
+
| No-token/recharge UX | `tihao_brief_sourcing_run` | live | payment link with `errors=[]` |
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# Tihao SOP 下载安装指南
|
|
2
|
+
|
|
3
|
+
适用包名:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
@vocmarket/tihao-sop
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
适用对象:
|
|
10
|
+
|
|
11
|
+
- 客户侧商务、运营或投放同事:在 Claude Code 中上传/指定 Brief,生成可复核的博主名单。
|
|
12
|
+
- 内部交付同事:给客户安装、验收、排查环境问题。
|
|
13
|
+
- 开发/发布同事:确认 npm 包名、安装命令、版本更新与本地验证流程。
|
|
14
|
+
|
|
15
|
+
> 说明:本指南不包含接口定价。价格与套餐以后单独维护,避免客户侧文档和实际计费口径不一致。
|
|
16
|
+
|
|
17
|
+
## 1. 安装前准备
|
|
18
|
+
|
|
19
|
+
客户电脑或演示机需要具备:
|
|
20
|
+
|
|
21
|
+
- 已安装 Node.js,建议 Node.js 18 或更高版本。
|
|
22
|
+
- 已安装 Claude Code,并能打开目标工作区。
|
|
23
|
+
- 能访问 npm registry。
|
|
24
|
+
- 如需使用真实数据 live 模式,需要已开通的 Tihao / VOC 电商数据中台 token。
|
|
25
|
+
|
|
26
|
+
检查 Node.js:
|
|
27
|
+
|
|
28
|
+
```powershell
|
|
29
|
+
node -v
|
|
30
|
+
npm -v
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 2. 推荐安装方式:工作区安装
|
|
34
|
+
|
|
35
|
+
在需要使用提号 SOP 的项目目录中打开终端,执行:
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
npx --yes @vocmarket/tihao-sop@latest workspace --smoke
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
安装成功后,会在当前工作区写入:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
.mcp.json
|
|
45
|
+
.claude/plugins/tihao-sourcing
|
|
46
|
+
.claude/skills/tihao-creator-sourcing/SKILL.md
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`--smoke` 会自动做一次本地检查,确认:
|
|
50
|
+
|
|
51
|
+
- npm 包可正常下载;
|
|
52
|
+
- Claude Code 插件文件已复制到工作区;
|
|
53
|
+
- MCP server 入口可识别;
|
|
54
|
+
- 提号技能入口可识别;
|
|
55
|
+
- 不需要真实 token 也能完成基础安装验收。
|
|
56
|
+
|
|
57
|
+
安装完成后,建议重启 Claude Code 或刷新当前工作区,让新的 skill 和 MCP server 生效。
|
|
58
|
+
|
|
59
|
+
## 3. 全局安装方式
|
|
60
|
+
|
|
61
|
+
如果内部交付同事需要在多套客户工作区重复安装,可以先全局安装:
|
|
62
|
+
|
|
63
|
+
```powershell
|
|
64
|
+
npm install -g @vocmarket/tihao-sop
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
之后进入任意客户工作区,执行:
|
|
68
|
+
|
|
69
|
+
```powershell
|
|
70
|
+
tihao-sourcing workspace --smoke
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
全局安装适合内部交付机;客户侧优先推荐第 2 节的 `npx` 工作区安装方式,因为命令更短,也更容易固定到最新发布版本。
|
|
74
|
+
|
|
75
|
+
## 4. 在 Claude Code 中使用
|
|
76
|
+
|
|
77
|
+
安装完成后,在 Claude Code 中用自然语言描述即可。例如:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
读取 E:\workspace\tihao-ai\dha_brief.xlsx,按照提号 SOP 给我一版小红书博主名单。
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
或先跑无消耗演示:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
先用 sample 模式跑通这个 brief,输出商务可复核名单。
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
真实数据小规模验证:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
用 live 小规模检索这个 brief,keywordLimit=1,pagesPerKeyword=1。
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
常见输入材料:
|
|
96
|
+
|
|
97
|
+
- `.xlsx` 客户 Brief;
|
|
98
|
+
- `.xls` 表格型 Brief;
|
|
99
|
+
- `.md` 或 `.txt` 文本 Brief;
|
|
100
|
+
- Brief 中的参考博主、参考链接、平台目标、粉丝量要求、内容风格、禁投规则等。
|
|
101
|
+
|
|
102
|
+
## 5. Token 配置
|
|
103
|
+
|
|
104
|
+
sample 模式不需要 token。
|
|
105
|
+
|
|
106
|
+
live 模式需要平台侧可用 token。任选一种方式配置。
|
|
107
|
+
|
|
108
|
+
当前终端临时配置:
|
|
109
|
+
|
|
110
|
+
```powershell
|
|
111
|
+
$env:TIHAO_SESSION_TOKEN="<Parse sessionToken>"
|
|
112
|
+
$env:TIHAO_COMPANY="<Company objectId>"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
写入当前工作区 `.env.local`:
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
TIHAO_SESSION_TOKEN=<Parse sessionToken>
|
|
119
|
+
TIHAO_COMPANY=<Company objectId>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
兼容变量名:
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
TIHAO_SESSION_TOKEN
|
|
126
|
+
VOC_ECOMMERCE_TOKEN
|
|
127
|
+
VOC_TOKEN
|
|
128
|
+
TIHAO_COMPANY
|
|
129
|
+
VOC_ECOMMERCE_COMPANY
|
|
130
|
+
COMPANY_OBJECT_ID
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
安全要求:
|
|
134
|
+
|
|
135
|
+
- 不要把真实 token 发到群里。
|
|
136
|
+
- 不要把 `.env.local` 提交到 git。
|
|
137
|
+
- 不要把 token 写进 Brief、报告或交付文档。
|
|
138
|
+
- 客户侧演示优先用 sample 模式确认流程,再切 live 模式做小规模验证。
|
|
139
|
+
|
|
140
|
+
## 6. 输出文件
|
|
141
|
+
|
|
142
|
+
每次运行会输出三类结果:
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
tihao-sourcing-report.md
|
|
146
|
+
tihao-sourcing-result.json
|
|
147
|
+
tihao-sourcing-client-list.csv
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
用途:
|
|
151
|
+
|
|
152
|
+
- `tihao-sourcing-report.md`:给商务和客户看的可读报告。
|
|
153
|
+
- `tihao-sourcing-result.json`:给后续系统或二次分析使用的结构化结果。
|
|
154
|
+
- `tihao-sourcing-client-list.csv`:给商务筛选、导入表格或继续补充报价信息。
|
|
155
|
+
|
|
156
|
+
Claude Code 聊天窗口里也会直接返回核心名单摘要,客户不需要只靠文件路径找结果。
|
|
157
|
+
|
|
158
|
+
## 7. 验收命令
|
|
159
|
+
|
|
160
|
+
客户侧安装验收:
|
|
161
|
+
|
|
162
|
+
```powershell
|
|
163
|
+
npx --yes @vocmarket/tihao-sop@latest workspace --smoke
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
本地源码验收:
|
|
167
|
+
|
|
168
|
+
```powershell
|
|
169
|
+
cd E:\workspace\tihao-ai\claude-code-tihao-sourcing
|
|
170
|
+
npm run smoke:package
|
|
171
|
+
npm run smoke:briefs
|
|
172
|
+
npm run mcp:smoke
|
|
173
|
+
npm run acceptance
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
真实数据 live 验收需要有效 token 和额度:
|
|
177
|
+
|
|
178
|
+
```powershell
|
|
179
|
+
cd E:\workspace\tihao-ai\claude-code-tihao-sourcing
|
|
180
|
+
$env:TIHAO_SESSION_TOKEN="<Parse sessionToken>"
|
|
181
|
+
$env:TIHAO_COMPANY="<Company objectId>"
|
|
182
|
+
npm run live:acceptance
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
如果没有有效 token,不要把 live 验收写成已通过;只能说明 sample、安装和本地流程已通过。
|
|
186
|
+
|
|
187
|
+
## 8. 更新版本
|
|
188
|
+
|
|
189
|
+
客户侧更新到最新版本:
|
|
190
|
+
|
|
191
|
+
```powershell
|
|
192
|
+
npx --yes @vocmarket/tihao-sop@latest workspace --smoke
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
如果本机 npm 缓存导致拿到旧版本,可以换一个临时缓存:
|
|
196
|
+
|
|
197
|
+
```powershell
|
|
198
|
+
$cache = Join-Path $env:TEMP "npm-cache-tihao-sop"
|
|
199
|
+
npx --yes @vocmarket/tihao-sop@latest workspace --smoke --cache $cache
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
查看 npm 最新版本:
|
|
203
|
+
|
|
204
|
+
```powershell
|
|
205
|
+
npm view @vocmarket/tihao-sop version
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## 9. 卸载
|
|
209
|
+
|
|
210
|
+
工作区卸载时,删除当前项目下这些文件或目录:
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
.claude/plugins/tihao-sourcing
|
|
214
|
+
.claude/skills/tihao-creator-sourcing
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
然后检查 `.mcp.json`,删除 `tihao-sourcing` 对应配置。
|
|
218
|
+
|
|
219
|
+
如果曾经做过全局安装,可以执行:
|
|
220
|
+
|
|
221
|
+
```powershell
|
|
222
|
+
npm uninstall -g @vocmarket/tihao-sop
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## 10. 常见问题
|
|
226
|
+
|
|
227
|
+
### npx 提示找不到包
|
|
228
|
+
|
|
229
|
+
确认包名必须是:
|
|
230
|
+
|
|
231
|
+
```text
|
|
232
|
+
@vocmarket/tihao-sop
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
不要再使用旧临时包名:
|
|
236
|
+
|
|
237
|
+
```text
|
|
238
|
+
@gangvy/claude-code-tihao-sourcing
|
|
239
|
+
@gangvy/tihao-sop
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
旧包名只保留迁移提示,客户安装统一使用 `@vocmarket/tihao-sop`。
|
|
243
|
+
|
|
244
|
+
### 安装后 Claude Code 没识别技能
|
|
245
|
+
|
|
246
|
+
处理顺序:
|
|
247
|
+
|
|
248
|
+
1. 确认安装命令是在目标工作区目录执行的。
|
|
249
|
+
2. 确认 `.claude/skills/tihao-creator-sourcing/SKILL.md` 存在。
|
|
250
|
+
3. 确认 `.mcp.json` 里存在 `tihao-sourcing`。
|
|
251
|
+
4. 重启 Claude Code 或重新打开工作区。
|
|
252
|
+
|
|
253
|
+
### live 提示需要 token
|
|
254
|
+
|
|
255
|
+
说明当前工作区没有读到可用的 token。按第 5 节重新配置:
|
|
256
|
+
|
|
257
|
+
```text
|
|
258
|
+
TIHAO_SESSION_TOKEN
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
或:
|
|
262
|
+
|
|
263
|
+
```text
|
|
264
|
+
VOC_ECOMMERCE_TOKEN
|
|
265
|
+
VOC_TOKEN
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### live 提示需要开通或充值
|
|
269
|
+
|
|
270
|
+
说明账号或公司维度的 `/apig/voc-e-commerce` 权限、额度或余额不足。
|
|
271
|
+
|
|
272
|
+
技能包会返回友好的开通/充值提示,不会把原始鉴权报错、上游错误体或 token 暴露给客户。
|
|
273
|
+
|
|
274
|
+
### 只想演示流程,不想消耗额度
|
|
275
|
+
|
|
276
|
+
使用 sample 模式:
|
|
277
|
+
|
|
278
|
+
```text
|
|
279
|
+
先用 sample 模式按这个 brief 跑一版提号名单。
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
sample 模式适合演示:
|
|
283
|
+
|
|
284
|
+
- Brief 读取;
|
|
285
|
+
- 提号规则识别;
|
|
286
|
+
- 博主名单结构;
|
|
287
|
+
- 偏好记忆;
|
|
288
|
+
- 报告和 CSV 输出。
|
|
289
|
+
|
|
290
|
+
它不代表真实平台库存结果,正式交付前仍需用 live 模式小规模复核。
|
|
291
|
+
|
|
292
|
+
## 11. 内部发布提示
|
|
293
|
+
|
|
294
|
+
内部发布时使用包内 npm 脚本,不要手写散装命令:
|
|
295
|
+
|
|
296
|
+
```powershell
|
|
297
|
+
cd E:\workspace\tihao-ai\claude-code-tihao-sourcing
|
|
298
|
+
npm run publish:dry
|
|
299
|
+
npm run publish:npm
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
发布前必须确认:
|
|
303
|
+
|
|
304
|
+
- `package.json` 版本号已更新;
|
|
305
|
+
- `npm run acceptance` 已通过;
|
|
306
|
+
- 文档没有真实 token、价格、未确认承诺;
|
|
307
|
+
- npm 登录态或 npm token 有发布 `@vocmarket/tihao-sop` 的权限。
|
|
308
|
+
|
|
309
|
+
发布到不同包名不需要新 npm token,前提是当前 npm 账号或 token 对目标 scope/package 有发布权限。包名变化由 `package.json` 的 `name` 决定。
|