@claudeink/mcp-server 0.0.2 → 0.0.4

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.
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "auston-blog-crawler",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "description": "Blog subscription crawler with Defuddle for Auston content pipeline",
6
+ "scripts": {
7
+ "crawl": "node crawl.mjs",
8
+ "crawl:full": "node crawl.mjs --full",
9
+ "crawl:source": "node crawl.mjs --source",
10
+ "fetch:url": "node crawl.mjs --url"
11
+ },
12
+ "dependencies": {
13
+ "defuddle": "^0.6.6",
14
+ "jsdom": "^25.0.0"
15
+ }
16
+ }
@@ -0,0 +1,31 @@
1
+ import { JSDOM } from 'jsdom';
2
+
3
+ async function test() {
4
+ try {
5
+ const res = await fetch('https://www.therobotreport.com/category/news/', {
6
+ headers: {
7
+ 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
8
+ }
9
+ });
10
+ console.log('Status:', res.status);
11
+ const html = await res.text();
12
+ const dom = new JSDOM(html);
13
+ const doc = dom.window.document;
14
+ const links = doc.querySelectorAll('a');
15
+ const seen = new Set();
16
+ for (const a of links) {
17
+ const href = a.href;
18
+ const title = a.textContent.trim();
19
+ if (!href || !title || title.length < 15) continue;
20
+ if (!href.includes('therobotreport.com')) continue;
21
+ if (href.includes('/category/') || href.includes('/tag/') || href.includes('/page/')) continue;
22
+ if (seen.has(href)) continue;
23
+ seen.add(href);
24
+ console.log(title.slice(0, 80) + ' | ' + href);
25
+ }
26
+ console.log('\nTotal unique article links: ' + seen.size);
27
+ } catch(e) {
28
+ console.error('Error:', e.message);
29
+ }
30
+ }
31
+ test();
@@ -0,0 +1,35 @@
1
+ #!/bin/bash
2
+ # ============================================================
3
+ # ClaudeInk 工作流 - 打包脚本
4
+ # 将工作流模板打包为 tar.gz,放到 web/public/workflow/ 供下载
5
+ #
6
+ # 用法:bash workflow/tools/pack.sh
7
+ # ============================================================
8
+
9
+ set -e
10
+
11
+ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
12
+ WORKFLOW_DIR="$ROOT/workflow"
13
+ OUTPUT_DIR="$ROOT/web/public/workflow"
14
+
15
+ echo "📦 打包 ClaudeInk 工作流模板..."
16
+
17
+ mkdir -p "$OUTPUT_DIR"
18
+
19
+ cd "$WORKFLOW_DIR"
20
+
21
+ tar -czf "$OUTPUT_DIR/latest.tar.gz" \
22
+ --exclude='node_modules' \
23
+ --exclude='.git' \
24
+ --exclude='*.tar.gz' \
25
+ --exclude='tools/pack.sh' \
26
+ CLAUDE.md \
27
+ base-rules.md \
28
+ platforms/ \
29
+ accounts/ \
30
+ sources/ \
31
+ templates/ \
32
+ tools/
33
+
34
+ echo "✅ 打包完成: $OUTPUT_DIR/latest.tar.gz"
35
+ echo " 大小: $(du -h "$OUTPUT_DIR/latest.tar.gz" | cut -f1)"
@@ -0,0 +1,93 @@
1
+ #!/bin/bash
2
+ # ============================================================
3
+ # ClaudeInk 工作流 - 初始化脚本
4
+ # 由 Cowork 自动执行,用户无需手动操作
5
+ #
6
+ # 用法:bash tools/setup.sh [LICENSE_KEY]
7
+ # ============================================================
8
+
9
+ set -e
10
+
11
+ WORKDIR="$(cd "$(dirname "$0")/.." && pwd)"
12
+ cd "$WORKDIR"
13
+
14
+ LICENSE_KEY="${1:-}"
15
+
16
+ echo "🚀 ClaudeInk 工作流初始化中..."
17
+ echo " 工作目录: $WORKDIR"
18
+ echo ""
19
+
20
+ # ── 创建运行时目录 ──
21
+ echo "📁 创建目录结构..."
22
+
23
+ mkdir -p sources/articles
24
+ mkdir -p sources/video-transcripts
25
+ mkdir -p sources/notes
26
+ mkdir -p sources/data
27
+ mkdir -p sources/daily
28
+ mkdir -p templates
29
+ mkdir -p .claudeink
30
+
31
+ # 为每个已有账号创建运行时目录
32
+ for yaml_file in accounts/*.yaml; do
33
+ [ -f "$yaml_file" ] || continue
34
+ [[ "$(basename "$yaml_file")" == _template.yaml ]] && continue
35
+
36
+ id=$(grep '^id:' "$yaml_file" | head -1 | sed 's/id: *"\{0,1\}\([^"]*\)"\{0,1\}/\1/' | xargs)
37
+
38
+ if [ -n "$id" ]; then
39
+ drafts_path=$(grep 'drafts:' "$yaml_file" | head -1 | sed 's/.*drafts: *"\{0,1\}\([^"]*\)"\{0,1\}/\1/' | xargs)
40
+ published_path=$(grep 'published:' "$yaml_file" | head -1 | sed 's/.*published: *"\{0,1\}\([^"]*\)"\{0,1\}/\1/' | xargs)
41
+ assets_path=$(grep 'assets:' "$yaml_file" | head -1 | sed 's/.*assets: *"\{0,1\}\([^"]*\)"\{0,1\}/\1/' | xargs)
42
+
43
+ drafts_path="${drafts_path//\{id\}/$id}"
44
+ published_path="${published_path//\{id\}/$id}"
45
+ assets_path="${assets_path//\{id\}/$id}"
46
+
47
+ mkdir -p "$drafts_path" "$published_path" "$assets_path"
48
+ echo " ✅ 账号 $id: $drafts_path, $published_path, $assets_path"
49
+ fi
50
+ done
51
+
52
+ # ── 安装爬虫依赖 ──
53
+ if [ -f "tools/crawler/package.json" ]; then
54
+ echo "📦 安装爬虫依赖..."
55
+ cd tools/crawler
56
+ npm install --silent 2>/dev/null || echo " ⚠️ npm install 失败,稍后手动运行"
57
+ cd "$WORKDIR"
58
+ fi
59
+
60
+ # ── License 激活 ──
61
+ if [ -n "$LICENSE_KEY" ]; then
62
+ echo "🔑 激活 License..."
63
+ RESPONSE=$(curl -s -X POST https://app.claudeink.com/api/auth/activate \
64
+ -H "Content-Type: application/json" \
65
+ -d "{\"key\": \"$LICENSE_KEY\"}")
66
+
67
+ # 检查是否激活成功
68
+ if echo "$RESPONSE" | grep -q '"userId"'; then
69
+ echo "$RESPONSE" > .claudeink/credentials.json
70
+ chmod 600 .claudeink/credentials.json
71
+ echo " ✅ License 激活成功"
72
+ else
73
+ echo " ⚠️ License 激活失败: $RESPONSE"
74
+ echo " 可稍后使用 /激活 指令重试"
75
+ fi
76
+ fi
77
+
78
+ echo ""
79
+ echo "✅ ClaudeInk 工作流初始化完成!"
80
+ echo ""
81
+ echo "📂 目录结构:"
82
+ echo " $WORKDIR/"
83
+ echo " ├── CLAUDE.md (系统索引)"
84
+ echo " ├── base-rules.md (通用底座)"
85
+ echo " ├── platforms/ (平台规则)"
86
+ echo " ├── accounts/ (账号配置)"
87
+ echo " ├── sources/ (共享素材库)"
88
+ echo " └── tools/ (爬虫等工具)"
89
+ echo ""
90
+ echo "🎯 下一步:"
91
+ echo " 1. 读取 CLAUDE.md 确认系统就绪"
92
+ echo " 2. 使用 /新建账号 创建第一个自媒体账号"
93
+ echo " 3. 使用 /编写 开始内容创作"