goofish-cli 0.2.4__tar.gz → 0.4.0__tar.gz
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.
- goofish_cli-0.4.0/.claude-plugin/marketplace.json +59 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/.gitignore +4 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/CHANGELOG.md +72 -1
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/PKG-INFO +105 -19
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/README.md +101 -16
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/pyproject.toml +22 -2
- goofish_cli-0.4.0/skills/goofish-overview/SKILL.md +97 -0
- goofish_cli-0.4.0/skills/goofish-overview/references/accounts.md +43 -0
- goofish_cli-0.4.0/skills/goofish-overview/references/mcp-tools-index.md +84 -0
- goofish_cli-0.4.0/skills/goofish-overview/references/xianyu-concepts.md +97 -0
- goofish_cli-0.4.0/skills/goofish-publish-item/SKILL.md +165 -0
- goofish_cli-0.4.0/skills/goofish-publish-item/references/category-selection.md +78 -0
- goofish_cli-0.4.0/skills/goofish-publish-item/references/common-pitfalls.md +94 -0
- goofish_cli-0.4.0/skills/goofish-publish-item/references/image-checklist.md +67 -0
- goofish_cli-0.4.0/skills/goofish-publish-item/references/title-formula.md +91 -0
- goofish_cli-0.4.0/skills/goofish-reply-buyer/SKILL.md +174 -0
- goofish_cli-0.4.0/skills/goofish-reply-buyer/references/bargain-ladder.md +115 -0
- goofish_cli-0.4.0/skills/goofish-reply-buyer/references/intent-classification.md +114 -0
- goofish_cli-0.4.0/skills/goofish-reply-buyer/references/tone-guide.md +120 -0
- goofish_cli-0.4.0/skills/goofish-risk-guard/SKILL.md +118 -0
- goofish_cli-0.4.0/skills/goofish-risk-guard/references/external-contact-keywords.md +92 -0
- goofish_cli-0.4.0/skills/goofish-risk-guard/references/forbidden-words.md +103 -0
- goofish_cli-0.4.0/skills/goofish-risk-guard/references/publish-red-lines.md +122 -0
- goofish_cli-0.4.0/skills/goofish-risk-guard/references/x5sec-recovery.md +89 -0
- goofish_cli-0.4.0/skills/goofish-shop-diagnosis/SKILL.md +147 -0
- goofish_cli-0.4.0/skills/goofish-shop-diagnosis/references/diagnosis-workflow.md +119 -0
- goofish_cli-0.4.0/skills/goofish-shop-diagnosis/references/rank-factors.md +120 -0
- goofish_cli-0.4.0/skills/goofish-shop-diagnosis/references/traffic-drop-causes.md +133 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/cli.py +10 -1
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/auth/login.py +34 -23
- goofish_cli-0.4.0/src/goofish_cli/commands/item/list.py +128 -0
- goofish_cli-0.4.0/src/goofish_cli/commands/search/search.py +376 -0
- goofish_cli-0.4.0/src/goofish_cli/commands/skills/install.py +84 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/browser.py +35 -28
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/browser_cookie.py +30 -13
- goofish_cli-0.4.0/src/goofish_cli/core/cookie_types.py +10 -0
- goofish_cli-0.4.0/src/goofish_cli/core/crypto.py +35 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/qr_login.py +51 -30
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/refresh.py +38 -18
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/registry.py +3 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/session.py +81 -29
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/sign.py +5 -3
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/mcp_server.py +10 -0
- goofish_cli-0.2.4/.env.example +0 -11
- goofish_cli-0.2.4/.github/ISSUE_TEMPLATE/bug_report.yml +0 -54
- goofish_cli-0.2.4/.github/ISSUE_TEMPLATE/feature_request.yml +0 -22
- goofish_cli-0.2.4/.github/pull_request_template.md +0 -26
- goofish_cli-0.2.4/.github/workflows/ci.yml +0 -57
- goofish_cli-0.2.4/.github/workflows/publish.yml +0 -42
- goofish_cli-0.2.4/CONTRIBUTING.md +0 -59
- goofish_cli-0.2.4/docs/architecture.md +0 -89
- goofish_cli-0.2.4/docs/compliance.md +0 -43
- goofish_cli-0.2.4/docs/mcp-setup.md +0 -69
- goofish_cli-0.2.4/examples/publish_from_folder.py +0 -70
- goofish_cli-0.2.4/examples/watch_to_autoreply.sh +0 -26
- goofish_cli-0.2.4/src/goofish_cli/commands/search/search.py +0 -169
- goofish_cli-0.2.4/tests/test_auth_login.py +0 -74
- goofish_cli-0.2.4/tests/test_browser_cookie.py +0 -164
- goofish_cli-0.2.4/tests/test_guard.py +0 -46
- goofish_cli-0.2.4/tests/test_item_view.py +0 -24
- goofish_cli-0.2.4/tests/test_limiter.py +0 -29
- goofish_cli-0.2.4/tests/test_list_chats.py +0 -106
- goofish_cli-0.2.4/tests/test_mtop.py +0 -59
- goofish_cli-0.2.4/tests/test_publish_payload.py +0 -70
- goofish_cli-0.2.4/tests/test_qr_login.py +0 -129
- goofish_cli-0.2.4/tests/test_refresh.py +0 -122
- goofish_cli-0.2.4/tests/test_registry.py +0 -33
- goofish_cli-0.2.4/tests/test_search.py +0 -36
- goofish_cli-0.2.4/tests/test_session_bootstrap.py +0 -137
- goofish_cli-0.2.4/tests/test_sign.py +0 -29
- goofish_cli-0.2.4/tests/test_ws_codec.py +0 -127
- goofish_cli-0.2.4/uv.lock +0 -1509
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/LICENSE +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/NOTICE +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/examples/README.md +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/auth/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/auth/reset_guard.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/auth/status.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/category/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/category/recommend.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/item/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/item/delete.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/item/get.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/item/publish.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/item/view.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/location/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/location/default.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/media/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/media/upload.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/message/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/message/history.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/message/list_chats.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/message/send.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/message/watch.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/commands/search/__init__.py +0 -0
- {goofish_cli-0.2.4/tests → goofish_cli-0.4.0/src/goofish_cli/commands/skills}/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/__init__.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/errors.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/guard.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/limiter.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/mtop.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/output.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/strategy.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/token.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/core/ws.py +0 -0
- {goofish_cli-0.2.4 → goofish_cli-0.4.0}/src/goofish_cli/static/goofish_js_version_2.js +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://claude.ai/schemas/plugin-marketplace.json",
|
|
3
|
+
"name": "goofish-cli-skills",
|
|
4
|
+
"displayName": "goofish-cli Skills",
|
|
5
|
+
"description": "闲鱼(goofish.com)自动化运营的 Claude Skills 套件。配合 goofish-cli MCP server 使用,让 Agent 在发布商品 / 回复买家 / 风控预检 / 店铺诊断这些场景里上手即会。",
|
|
6
|
+
"version": "0.4.0",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "fancy",
|
|
9
|
+
"url": "https://github.com/fancyboi999"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/fancyboi999/goofish-cli",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/fancyboi999/goofish-cli.git"
|
|
15
|
+
},
|
|
16
|
+
"license": "Apache-2.0",
|
|
17
|
+
"requires": {
|
|
18
|
+
"mcp": ["goofish"]
|
|
19
|
+
},
|
|
20
|
+
"plugins": [
|
|
21
|
+
{
|
|
22
|
+
"name": "goofish-overview",
|
|
23
|
+
"source": "./skills/goofish-overview",
|
|
24
|
+
"description": "闲鱼自动化总入口:介绍工具定位、账号模型、15 个 MCP 工具速查、风控底线,并指向其它专项 skill。"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "goofish-risk-guard",
|
|
28
|
+
"source": "./skills/goofish-risk-guard",
|
|
29
|
+
"description": "发布 / 发消息 / 风控恢复三道闸门。内置违禁词表、外联词表、x5sec 恢复指引。被其它 skill 频繁引用。"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "goofish-publish-item",
|
|
33
|
+
"source": "./skills/goofish-publish-item",
|
|
34
|
+
"description": "从描述 / 图片到商品发布的闭环:类目识别 → 标题 5 段式生成 → 风控扫描 → 批量传图 → 用户确认 → 调 item_publish。"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "goofish-reply-buyer",
|
|
38
|
+
"source": "./skills/goofish-reply-buyer",
|
|
39
|
+
"description": "买家消息闭环:拉未读 → 意图分类 → 议价阶梯策略 → 风控扫描 → 用户确认发送。不托管发送权。"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "goofish-shop-diagnosis",
|
|
43
|
+
"source": "./skills/goofish-shop-diagnosis",
|
|
44
|
+
"description": "限流 / 降权 / 曝光掉的归因诊断。search_items 买家视角搜 + item_view 历史对比 → 给嫌疑排序和修复清单。"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"install": {
|
|
48
|
+
"preferredMethod": "cli",
|
|
49
|
+
"cli": {
|
|
50
|
+
"command": "uvx",
|
|
51
|
+
"args": ["--from", "goofish-cli", "goofish", "skills", "install"],
|
|
52
|
+
"description": "运行 `uvx --from goofish-cli goofish skills install` 把所有 skill 复制到 ~/.claude/skills/。"
|
|
53
|
+
},
|
|
54
|
+
"manual": {
|
|
55
|
+
"description": "也可以直接 clone 仓库并把 skills/ 下的任一目录拷到 ~/.claude/skills/。"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"tags": ["xianyu", "goofish", "ecommerce", "automation", "mcp", "chinese"]
|
|
59
|
+
}
|
|
@@ -6,6 +6,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.4.0] - 2026-09-07
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- 搜索支持 `goofish search items --pages N`,跨页按商品 ID 去重;默认仍读取一页,
|
|
13
|
+
`--limit` 控制所有页面的结果总数。返回 `pages_fetched`、`pages_total` 和
|
|
14
|
+
`stopped_reason`,说明实际翻页数量与停止原因。翻页过程中发生错误或遇到登录阻拦时,
|
|
15
|
+
保留已经取得的结果。
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- 浏览器导入、JSON 导入、扫码登录和 Cookie 刷新保留 Cookie 的 domain/path,
|
|
19
|
+
防止同名 Cookie 覆盖或注入到错误域名、路径;兼容旧版扁平 Cookie 数据。
|
|
20
|
+
- 修复 Cookie 刷新在 `persist=False` 时的异常,并保持内存与持久化记录一致。
|
|
21
|
+
- 恢复搜索成功时的结构化返回;仅在首屏没有结果且明确要求登录时重试一次。
|
|
22
|
+
|
|
23
|
+
## [0.3.0] - 2026-08-19
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- **Claude Skills 套件**(5 个 skill,打包进 wheel):把 goofish-cli 从"给 Agent 用的
|
|
27
|
+
工具"升级成"给 Agent 的完整经验体"。Agent 在 Claude Code / Cursor 里识别到闲鱼任务
|
|
28
|
+
即加载对应 skill 走 reference 知识库,不再 zero-shot 试错。
|
|
29
|
+
- `goofish-overview`:总入口。介绍定位、账号模型、15 个 MCP 工具速查、风控硬红线,
|
|
30
|
+
dispatch 到其他 4 个专项 skill。
|
|
31
|
+
- `goofish-risk-guard`:知识库型 skill。内置违禁词表、外联词正则、发布红线清单、
|
|
32
|
+
RGV587/x5sec 恢复指引。被 publish-item / reply-buyer 频繁引用。
|
|
33
|
+
- `goofish-publish-item`:发布闭环。类目识别 → 标题 5 段式生成 → 风控扫描 →
|
|
34
|
+
批量传图 → 用户确认 → `item_publish`。强约束"不跳过用户确认"。
|
|
35
|
+
- `goofish-reply-buyer`:消息闭环。`message_watch/list_chats/history/send` 四件套
|
|
36
|
+
+ 议价小刀/大刀/屠龙刀三档策略 + 意图 5 分类。不托管发送权。
|
|
37
|
+
- `goofish-shop-diagnosis`:限流诊断。`search_items` 买家视角搜 + `item_view`
|
|
38
|
+
历史对比 → 归因清单给嫌疑排序 + 修复建议。纯读不写。
|
|
39
|
+
- **`goofish skills install` 命令**(`commands/skills/install.py`):把内置 skill
|
|
40
|
+
复制到 `~/.claude/skills/`(或 `--dest` 指定路径)。`--list` 仅列举,`--force`
|
|
41
|
+
覆盖已存在。支持 `uvx --from goofish-cli goofish skills install` 一行装机。
|
|
42
|
+
- **`.claude-plugin/marketplace.json`**:Claude Code Plugin Marketplace 分发清单,
|
|
43
|
+
5 个 skill 均登记在 `plugins` 数组,`install.cli` 指向 `goofish skills install`。
|
|
44
|
+
- **wheel 打包 skills**:hatch `force-include` 把项目根 `skills/` 装进
|
|
45
|
+
`goofish_cli/_bundled_skills/`,运行时用 `goofish_cli.__file__` 拿包路径定位
|
|
46
|
+
(不依赖 namespace package 的 importlib.resources 行为,避免 py 版本差异坑)。
|
|
47
|
+
- **OpenClaw / ClawHub compatible bundle**:用 `.codex-plugin/plugin.json`、`.mcp.json`
|
|
48
|
+
和 5 个内置 skills 组成 Codex-compatible bundle;OpenClaw 2026.6.1+ 可一次安装 MCP
|
|
49
|
+
server 与 skills。默认公开 13 个业务 tools,并排除登录、重置风控、长时间 watch 和
|
|
50
|
+
skills 安装等 4 个需要操作者控制的 tools。
|
|
51
|
+
- **`goofish item list`**:通过 `mtop.idle.web.xyh.item.list` 分页列出当前账号的在售和
|
|
52
|
+
已下架商品,提取价格、状态、图片和文本标签;后续修复了图片图标 key 泄漏、重复商品、
|
|
53
|
+
空页继续翻页和异常 `nextPage` 导致的无限循环风险。
|
|
54
|
+
- **OpenClaw 包验证**:检查四处版本对齐、MCP tool filter、archive 文件白名单、敏感内容,
|
|
55
|
+
并通过 embedded-agent trajectory 验证实际 bundle 工具目录。
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
- `pyproject.toml` 新增 `[tool.hatch.build.targets.wheel.force-include]` 和
|
|
59
|
+
`[tool.hatch.build.targets.sdist]` 段。wheel 只 force-include `skills/`(运行时
|
|
60
|
+
`goofish skills install` 唯一需要的资源);sdist 额外带 `.claude-plugin/` 和
|
|
61
|
+
`README / CHANGELOG / LICENSE`,便于从源码分发时拿到完整元数据。
|
|
62
|
+
- skills 同时记录 OpenClaw (`goofish__*`) 和 Claude (`mcp__goofish__*`) 的 MCP tool 名。
|
|
63
|
+
- MCP Python SDK 约束为 `mcp>=1.2,<2`;2.0 已移除当前 server 使用的
|
|
64
|
+
`mcp.server.fastmcp`,未迁移前禁止 clean install 静默跨主版本。
|
|
65
|
+
- `goofish-cli` 在交互终端启动时明确提示它是 MCP stdio server;Typer positional metadata
|
|
66
|
+
只进入 CLI wrapper,pyexecjs 的编码 workaround 也不再全局替换 `subprocess.Popen`。
|
|
67
|
+
|
|
68
|
+
### Fixed
|
|
69
|
+
- 修复闲鱼登录页改版后 `auth login --qr` 必然超时:入口改为 `/login`,按 passport frame
|
|
70
|
+
URL 重新定位跨文档导航后的 iframe,并兼容 QR 从 `<canvas>` 改为 `<img>` 的 DOM。
|
|
71
|
+
|
|
72
|
+
### Security
|
|
73
|
+
- Cookie 文件改为 Fernet 加密存储,使用机器与用户信息派生本地密钥;旧版明文 cookie
|
|
74
|
+
首次读取时自动迁移为密文。
|
|
75
|
+
- 新增全仓库敏感标识扫描,阻止真实格式的账号、会话、发送者和消息标识进入提交与
|
|
76
|
+
OpenClaw/ClawHub 发布产物。
|
|
77
|
+
|
|
9
78
|
## [0.2.4] - 2026-04-22
|
|
10
79
|
|
|
11
80
|
### Added
|
|
@@ -127,7 +196,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
127
196
|
- 本版本需要用户手动从浏览器导入 cookie(含 `unb` / `_m_h5_tk` / `x5sec`)
|
|
128
197
|
- 遇到 `RGV587_ERROR` 风控时,需在浏览器完成滑块验证并**重新导出**带 `x5sec` 的 cookie
|
|
129
198
|
|
|
130
|
-
[Unreleased]: https://github.com/fancyboi999/goofish-cli/compare/v0.
|
|
199
|
+
[Unreleased]: https://github.com/fancyboi999/goofish-cli/compare/v0.4.0...HEAD
|
|
200
|
+
[0.4.0]: https://github.com/fancyboi999/goofish-cli/compare/v0.3.0...v0.4.0
|
|
201
|
+
[0.3.0]: https://github.com/fancyboi999/goofish-cli/compare/v0.2.4...v0.3.0
|
|
131
202
|
[0.2.4]: https://github.com/fancyboi999/goofish-cli/compare/v0.2.3...v0.2.4
|
|
132
203
|
[0.2.3]: https://github.com/fancyboi999/goofish-cli/compare/v0.2.2...v0.2.3
|
|
133
204
|
[0.2.2]: https://github.com/fancyboi999/goofish-cli/compare/v0.2.1...v0.2.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: goofish-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: 闲鱼 CLI — 支持 MCP,未来支持 Claude Skills。为 AI Agent 提供闲鱼自动化基础能力。
|
|
5
5
|
Project-URL: Homepage, https://github.com/fancyboi999/goofish-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/fancyboi999/goofish-cli
|
|
@@ -19,8 +19,9 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
19
19
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
20
20
|
Requires-Python: >=3.11
|
|
21
21
|
Requires-Dist: browser-cookie3>=0.20
|
|
22
|
+
Requires-Dist: cryptography>=41.0
|
|
22
23
|
Requires-Dist: loguru>=0.7
|
|
23
|
-
Requires-Dist: mcp
|
|
24
|
+
Requires-Dist: mcp<2,>=1.2
|
|
24
25
|
Requires-Dist: playwright>=1.58.0
|
|
25
26
|
Requires-Dist: pydantic>=2.6
|
|
26
27
|
Requires-Dist: pyexecjs>=1.5
|
|
@@ -54,12 +55,29 @@ Description-Content-Type: text/markdown
|
|
|
54
55
|
|
|
55
56
|
</div>
|
|
56
57
|
|
|
58
|
+
<p align="center">
|
|
59
|
+
<a href="media/goofish-cli-promo.mp4">
|
|
60
|
+
<img src="media/goofish-cli-promo.gif" alt="goofish-cli 演示" width="760">
|
|
61
|
+
</a>
|
|
62
|
+
<br>
|
|
63
|
+
<em>▶️ 点击查看带终端音效 + 配乐的高清 MP4(46s)</em>
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
<!--
|
|
67
|
+
想在 README 里内嵌「带声音的播放器」?GitHub 上唯一的办法:
|
|
68
|
+
1. 打开本仓库任意 issue / PR 评论框(或 Releases 编辑页)
|
|
69
|
+
2. 把 media/goofish-cli-promo.mp4 拖进去,等它生成 https://github.com/user-attachments/assets/xxxx 链接
|
|
70
|
+
3. 把那串链接单独一行粘进这里,GitHub 会自动渲染成带声音的播放器
|
|
71
|
+
(提交进仓库的 mp4 用 <video> 标签会被 GitHub 过滤,不渲染)
|
|
72
|
+
-->
|
|
73
|
+
|
|
57
74
|
`goofish-cli` 把闲鱼(Xianyu/Goofish)的核心运营能力抽成一套结构化命令,
|
|
58
|
-
|
|
75
|
+
**同一份定义**同时输出给四种消费者:
|
|
59
76
|
|
|
60
77
|
- 👨💻 **人类**:`goofish item get 12345 --format table`
|
|
61
78
|
- 🤖 **AI Agent(Claude Code / Cursor / Codex)**:`uvx goofish-cli` → 自动注册成 MCP tool
|
|
62
|
-
- 🧩 **Claude Skills
|
|
79
|
+
- 🧩 **Claude Skills**(v0.3):5 个内置 skill,`goofish skills install` 一行装到 `~/.claude/skills/`
|
|
80
|
+
- **OpenClaw**:ClawHub bundle 一次安装 MCP server + 5 个 skills
|
|
63
81
|
|
|
64
82
|
> 架构思想来自 [opencli](https://github.com/jackwener/opencli) 的 single-registry 设计。
|
|
65
83
|
|
|
@@ -67,7 +85,7 @@ Description-Content-Type: text/markdown
|
|
|
67
85
|
|
|
68
86
|
## ✨ 核心特性
|
|
69
87
|
|
|
70
|
-
- 🔐 **
|
|
88
|
+
- 🔐 **17 个命令覆盖核心链路**:发布、下架、查询、图片上传、AI 类目识别、默认地址、IM 收发 + 会话列表、skills 安装
|
|
71
89
|
- 📡 **真·实时 IM**:WebSocket 长连 + 自动重连 + **三类事件分类输出**
|
|
72
90
|
- `event=message`(收到消息)· `event=read`(已读回执)· `event=new_msg`(轻量通知)
|
|
73
91
|
- 🛡 **内置风控护栏**:令牌桶限流(1 写/分钟)+ RGV587 自动熔断
|
|
@@ -88,7 +106,7 @@ goofish auth login ~/Downloads/goofish-cookies.json
|
|
|
88
106
|
|
|
89
107
|
# 3. 验证登录态
|
|
90
108
|
goofish auth status
|
|
91
|
-
# → {"unb":"
|
|
109
|
+
# → {"unb":"<masked-unb>","tracknick":"<masked-tracknick>","nick":"...","valid":true}
|
|
92
110
|
|
|
93
111
|
# 4. 干活
|
|
94
112
|
goofish item get 1045171414271
|
|
@@ -98,6 +116,72 @@ goofish message send <cid> <toid> --text "在的" # 发消息
|
|
|
98
116
|
|
|
99
117
|
---
|
|
100
118
|
|
|
119
|
+
## 🧩 Claude Skills(v0.3 新增)
|
|
120
|
+
|
|
121
|
+
v0.3 起内置 5 个 Claude Skill,装完之后 Claude Code / Cursor 里的 Agent 在识别到
|
|
122
|
+
闲鱼任务就会自动加载对应 skill 的知识库,**不再靠 zero-shot 试错**。
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# 装到 ~/.claude/skills/(默认)
|
|
126
|
+
goofish skills install
|
|
127
|
+
|
|
128
|
+
# 或者只看有哪些 skill,不拷贝
|
|
129
|
+
goofish skills install --list
|
|
130
|
+
|
|
131
|
+
# 或者装到自定义目录 + 覆盖已有的
|
|
132
|
+
goofish skills install --dest ./skills --force
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 5 个 skill 分工
|
|
136
|
+
|
|
137
|
+
| Skill | 什么时候激活 | 核心能力 |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| `goofish-overview` | 用户首次提闲鱼 / 问这工具能干啥 | 总入口,dispatch 到其他 4 个 skill |
|
|
140
|
+
| `goofish-publish-item` | 发商品 / 上架 / 挂闲置 | 类目识别 → 标题 5 段式 → 风控扫描 → 图片检查 → 确认发布 |
|
|
141
|
+
| `goofish-reply-buyer` | 回消息 / 看未读 / 议价 | 拉未读 → 意图 5 分类 → 议价三档(小刀/大刀/屠龙刀)→ 用户确认发送 |
|
|
142
|
+
| `goofish-risk-guard` | 发布前 / 发送前 / 被限流了 | 违禁词表、外联词正则、发布红线、x5sec 恢复指引(被其他 skill 频繁引用) |
|
|
143
|
+
| `goofish-shop-diagnosis` | 店铺没流量 / 曝光掉了 | 买家视角搜索 + 历史对比 → 归因清单 + 修复建议(纯读不写) |
|
|
144
|
+
|
|
145
|
+
skill 的源文件在仓库的 `skills/` 目录下(每个 skill 一个子目录,含 `SKILL.md`
|
|
146
|
+
+ `references/*.md` 知识库)。也可以走 Claude Code Plugin Marketplace 安装:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
claude /plugin marketplace add fancyboi999/goofish-cli
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## OpenClaw / ClawHub
|
|
155
|
+
|
|
156
|
+
OpenClaw `2026.6.1` 及以上可把本仓库作为 compatible bundle 加载。已发布到
|
|
157
|
+
[ClawHub](https://clawhub.ai/plugins/openclaw-goofish),安装:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
openclaw plugins install clawhub:openclaw-goofish
|
|
161
|
+
|
|
162
|
+
# 登录态由用户在终端初始化,不交给 Agent 覆盖
|
|
163
|
+
uvx --from goofish-cli==0.4.0 goofish auth login --qr
|
|
164
|
+
|
|
165
|
+
openclaw plugins inspect goofish --json
|
|
166
|
+
openclaw gateway restart
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
本地开发无需发布:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
openclaw plugins install -l .
|
|
173
|
+
openclaw plugins inspect goofish --json
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
重启后新会话会获得 5 个 skills,以及 `goofish__auth_status`、
|
|
177
|
+
`goofish__item_get` 等 MCP tools。bundle 默认不暴露需要操作者执行或会长期阻塞的
|
|
178
|
+
`auth_login`、`auth_reset_guard`、`message_watch`、`skills_install`。
|
|
179
|
+
|
|
180
|
+
运行 MCP server 需要 PATH 中有 [`uv`](https://docs.astral.sh/uv/)。完整说明见
|
|
181
|
+
[MCP 接入指南](./docs/mcp-setup.md)。
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
101
185
|
## 📟 命令详略与真实输出
|
|
102
186
|
|
|
103
187
|
<details open>
|
|
@@ -132,8 +216,8 @@ $ goofish list-commands --format table
|
|
|
132
216
|
|
|
133
217
|
```json
|
|
134
218
|
{
|
|
135
|
-
"unb": "
|
|
136
|
-
"tracknick": "
|
|
219
|
+
"unb": "<masked-unb>",
|
|
220
|
+
"tracknick": "<masked-tracknick>",
|
|
137
221
|
"nick": "闲鱼用户昵称",
|
|
138
222
|
"valid": true,
|
|
139
223
|
"h5_token_exp": "2026-04-21T20:30:00+08:00"
|
|
@@ -151,10 +235,10 @@ $ goofish message watch
|
|
|
151
235
|
实时输出(小号给主号发 3 条 + 主号读了所有消息):
|
|
152
236
|
|
|
153
237
|
```jsonl
|
|
154
|
-
{"event":"message","cid":"
|
|
155
|
-
{"event":"message","cid":"
|
|
156
|
-
{"event":"message","cid":"
|
|
157
|
-
{"event":"read","cid":"
|
|
238
|
+
{"event":"message","cid":"<masked-cid>","send_user_id":"<masked-user-id>","send_user_name":"小号昵称","send_message":"测试消息1"}
|
|
239
|
+
{"event":"message","cid":"<masked-cid>","send_user_id":"<masked-user-id>","send_user_name":"小号昵称","send_message":"测试消息2"}
|
|
240
|
+
{"event":"message","cid":"<masked-cid>","send_user_id":"<masked-user-id>","send_user_name":"小号昵称","send_message":"测试消息3"}
|
|
241
|
+
{"event":"read","cid":"<masked-cid>","msg_ids":["<masked-msg-id-1>","<masked-msg-id-2>","<masked-msg-id-3>"],"status":1,"ts":"<masked-timestamp>"}
|
|
158
242
|
```
|
|
159
243
|
|
|
160
244
|
| 事件 | 字段 |
|
|
@@ -170,12 +254,12 @@ $ goofish message watch
|
|
|
170
254
|
<summary><b><code>goofish message send</code></b> — 主动发消息</summary>
|
|
171
255
|
|
|
172
256
|
```bash
|
|
173
|
-
$ goofish message send
|
|
257
|
+
$ goofish message send <masked-cid> <masked-user-id> \
|
|
174
258
|
--text "在的 claude 测试成功 ✅" --item-id 1045171414271
|
|
175
259
|
```
|
|
176
260
|
|
|
177
261
|
```json
|
|
178
|
-
{"ok": true, "mid": "
|
|
262
|
+
{"ok": true, "mid": "<masked-message-id>", "cid": "<masked-cid>"}
|
|
179
263
|
```
|
|
180
264
|
</details>
|
|
181
265
|
|
|
@@ -246,10 +330,12 @@ Claude 会自动把全部命令看成 tool:`goofish_item_get` / `goofish_item_
|
|
|
246
330
|
- [x] v0.1:12 个命令 + MCP + IM 三类事件
|
|
247
331
|
- [x] v0.2:`goofish message list-chats`(会话列表 + sessionType 分类:1 真人 / 3 系统 / 6 互动 / 23 通知;`--watch-secs` 支持合并 WS `ackDiff(pts=0)` 历史推送补齐 h5 接口漏掉的会话)
|
|
248
332
|
- [x] v0.2:浏览器自动化链路(吸纳 [OpenCLI](https://github.com/jackwener/opencli) 精华)—— Playwright + 系统 Chrome 驱动 `goofish search items` / `goofish item view`,抗风控 & 完整字段
|
|
249
|
-
- [
|
|
250
|
-
- [
|
|
251
|
-
- [ ] v0.
|
|
252
|
-
- [ ] v0.
|
|
333
|
+
- [x] v0.2.3 / v0.2.4:session 自动续命(passport 快速进入)+ `auth login --qr` 扫码兜底
|
|
334
|
+
- [x] v0.3:Claude Skills 包装(5 个 skill:overview / risk-guard / publish-item / reply-buyer / shop-diagnosis)+ `goofish skills install`
|
|
335
|
+
- [ ] v0.4:`goofish message create-chat`(主动与陌生用户建会话)
|
|
336
|
+
- [ ] v0.4:`goofish order`(订单状态查询 / 发货)
|
|
337
|
+
- [ ] v0.4:历史数据落盘(SQLite / JSONL),给 shop-diagnosis 做时序归因
|
|
338
|
+
- [ ] v0.5:支持发视频消息
|
|
253
339
|
|
|
254
340
|
---
|
|
255
341
|
|
|
@@ -15,12 +15,29 @@
|
|
|
15
15
|
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="media/goofish-cli-promo.mp4">
|
|
20
|
+
<img src="media/goofish-cli-promo.gif" alt="goofish-cli 演示" width="760">
|
|
21
|
+
</a>
|
|
22
|
+
<br>
|
|
23
|
+
<em>▶️ 点击查看带终端音效 + 配乐的高清 MP4(46s)</em>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
想在 README 里内嵌「带声音的播放器」?GitHub 上唯一的办法:
|
|
28
|
+
1. 打开本仓库任意 issue / PR 评论框(或 Releases 编辑页)
|
|
29
|
+
2. 把 media/goofish-cli-promo.mp4 拖进去,等它生成 https://github.com/user-attachments/assets/xxxx 链接
|
|
30
|
+
3. 把那串链接单独一行粘进这里,GitHub 会自动渲染成带声音的播放器
|
|
31
|
+
(提交进仓库的 mp4 用 <video> 标签会被 GitHub 过滤,不渲染)
|
|
32
|
+
-->
|
|
33
|
+
|
|
18
34
|
`goofish-cli` 把闲鱼(Xianyu/Goofish)的核心运营能力抽成一套结构化命令,
|
|
19
|
-
|
|
35
|
+
**同一份定义**同时输出给四种消费者:
|
|
20
36
|
|
|
21
37
|
- 👨💻 **人类**:`goofish item get 12345 --format table`
|
|
22
38
|
- 🤖 **AI Agent(Claude Code / Cursor / Codex)**:`uvx goofish-cli` → 自动注册成 MCP tool
|
|
23
|
-
- 🧩 **Claude Skills
|
|
39
|
+
- 🧩 **Claude Skills**(v0.3):5 个内置 skill,`goofish skills install` 一行装到 `~/.claude/skills/`
|
|
40
|
+
- **OpenClaw**:ClawHub bundle 一次安装 MCP server + 5 个 skills
|
|
24
41
|
|
|
25
42
|
> 架构思想来自 [opencli](https://github.com/jackwener/opencli) 的 single-registry 设计。
|
|
26
43
|
|
|
@@ -28,7 +45,7 @@
|
|
|
28
45
|
|
|
29
46
|
## ✨ 核心特性
|
|
30
47
|
|
|
31
|
-
- 🔐 **
|
|
48
|
+
- 🔐 **17 个命令覆盖核心链路**:发布、下架、查询、图片上传、AI 类目识别、默认地址、IM 收发 + 会话列表、skills 安装
|
|
32
49
|
- 📡 **真·实时 IM**:WebSocket 长连 + 自动重连 + **三类事件分类输出**
|
|
33
50
|
- `event=message`(收到消息)· `event=read`(已读回执)· `event=new_msg`(轻量通知)
|
|
34
51
|
- 🛡 **内置风控护栏**:令牌桶限流(1 写/分钟)+ RGV587 自动熔断
|
|
@@ -49,7 +66,7 @@ goofish auth login ~/Downloads/goofish-cookies.json
|
|
|
49
66
|
|
|
50
67
|
# 3. 验证登录态
|
|
51
68
|
goofish auth status
|
|
52
|
-
# → {"unb":"
|
|
69
|
+
# → {"unb":"<masked-unb>","tracknick":"<masked-tracknick>","nick":"...","valid":true}
|
|
53
70
|
|
|
54
71
|
# 4. 干活
|
|
55
72
|
goofish item get 1045171414271
|
|
@@ -59,6 +76,72 @@ goofish message send <cid> <toid> --text "在的" # 发消息
|
|
|
59
76
|
|
|
60
77
|
---
|
|
61
78
|
|
|
79
|
+
## 🧩 Claude Skills(v0.3 新增)
|
|
80
|
+
|
|
81
|
+
v0.3 起内置 5 个 Claude Skill,装完之后 Claude Code / Cursor 里的 Agent 在识别到
|
|
82
|
+
闲鱼任务就会自动加载对应 skill 的知识库,**不再靠 zero-shot 试错**。
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# 装到 ~/.claude/skills/(默认)
|
|
86
|
+
goofish skills install
|
|
87
|
+
|
|
88
|
+
# 或者只看有哪些 skill,不拷贝
|
|
89
|
+
goofish skills install --list
|
|
90
|
+
|
|
91
|
+
# 或者装到自定义目录 + 覆盖已有的
|
|
92
|
+
goofish skills install --dest ./skills --force
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 5 个 skill 分工
|
|
96
|
+
|
|
97
|
+
| Skill | 什么时候激活 | 核心能力 |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| `goofish-overview` | 用户首次提闲鱼 / 问这工具能干啥 | 总入口,dispatch 到其他 4 个 skill |
|
|
100
|
+
| `goofish-publish-item` | 发商品 / 上架 / 挂闲置 | 类目识别 → 标题 5 段式 → 风控扫描 → 图片检查 → 确认发布 |
|
|
101
|
+
| `goofish-reply-buyer` | 回消息 / 看未读 / 议价 | 拉未读 → 意图 5 分类 → 议价三档(小刀/大刀/屠龙刀)→ 用户确认发送 |
|
|
102
|
+
| `goofish-risk-guard` | 发布前 / 发送前 / 被限流了 | 违禁词表、外联词正则、发布红线、x5sec 恢复指引(被其他 skill 频繁引用) |
|
|
103
|
+
| `goofish-shop-diagnosis` | 店铺没流量 / 曝光掉了 | 买家视角搜索 + 历史对比 → 归因清单 + 修复建议(纯读不写) |
|
|
104
|
+
|
|
105
|
+
skill 的源文件在仓库的 `skills/` 目录下(每个 skill 一个子目录,含 `SKILL.md`
|
|
106
|
+
+ `references/*.md` 知识库)。也可以走 Claude Code Plugin Marketplace 安装:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
claude /plugin marketplace add fancyboi999/goofish-cli
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## OpenClaw / ClawHub
|
|
115
|
+
|
|
116
|
+
OpenClaw `2026.6.1` 及以上可把本仓库作为 compatible bundle 加载。已发布到
|
|
117
|
+
[ClawHub](https://clawhub.ai/plugins/openclaw-goofish),安装:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
openclaw plugins install clawhub:openclaw-goofish
|
|
121
|
+
|
|
122
|
+
# 登录态由用户在终端初始化,不交给 Agent 覆盖
|
|
123
|
+
uvx --from goofish-cli==0.4.0 goofish auth login --qr
|
|
124
|
+
|
|
125
|
+
openclaw plugins inspect goofish --json
|
|
126
|
+
openclaw gateway restart
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
本地开发无需发布:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
openclaw plugins install -l .
|
|
133
|
+
openclaw plugins inspect goofish --json
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
重启后新会话会获得 5 个 skills,以及 `goofish__auth_status`、
|
|
137
|
+
`goofish__item_get` 等 MCP tools。bundle 默认不暴露需要操作者执行或会长期阻塞的
|
|
138
|
+
`auth_login`、`auth_reset_guard`、`message_watch`、`skills_install`。
|
|
139
|
+
|
|
140
|
+
运行 MCP server 需要 PATH 中有 [`uv`](https://docs.astral.sh/uv/)。完整说明见
|
|
141
|
+
[MCP 接入指南](./docs/mcp-setup.md)。
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
62
145
|
## 📟 命令详略与真实输出
|
|
63
146
|
|
|
64
147
|
<details open>
|
|
@@ -93,8 +176,8 @@ $ goofish list-commands --format table
|
|
|
93
176
|
|
|
94
177
|
```json
|
|
95
178
|
{
|
|
96
|
-
"unb": "
|
|
97
|
-
"tracknick": "
|
|
179
|
+
"unb": "<masked-unb>",
|
|
180
|
+
"tracknick": "<masked-tracknick>",
|
|
98
181
|
"nick": "闲鱼用户昵称",
|
|
99
182
|
"valid": true,
|
|
100
183
|
"h5_token_exp": "2026-04-21T20:30:00+08:00"
|
|
@@ -112,10 +195,10 @@ $ goofish message watch
|
|
|
112
195
|
实时输出(小号给主号发 3 条 + 主号读了所有消息):
|
|
113
196
|
|
|
114
197
|
```jsonl
|
|
115
|
-
{"event":"message","cid":"
|
|
116
|
-
{"event":"message","cid":"
|
|
117
|
-
{"event":"message","cid":"
|
|
118
|
-
{"event":"read","cid":"
|
|
198
|
+
{"event":"message","cid":"<masked-cid>","send_user_id":"<masked-user-id>","send_user_name":"小号昵称","send_message":"测试消息1"}
|
|
199
|
+
{"event":"message","cid":"<masked-cid>","send_user_id":"<masked-user-id>","send_user_name":"小号昵称","send_message":"测试消息2"}
|
|
200
|
+
{"event":"message","cid":"<masked-cid>","send_user_id":"<masked-user-id>","send_user_name":"小号昵称","send_message":"测试消息3"}
|
|
201
|
+
{"event":"read","cid":"<masked-cid>","msg_ids":["<masked-msg-id-1>","<masked-msg-id-2>","<masked-msg-id-3>"],"status":1,"ts":"<masked-timestamp>"}
|
|
119
202
|
```
|
|
120
203
|
|
|
121
204
|
| 事件 | 字段 |
|
|
@@ -131,12 +214,12 @@ $ goofish message watch
|
|
|
131
214
|
<summary><b><code>goofish message send</code></b> — 主动发消息</summary>
|
|
132
215
|
|
|
133
216
|
```bash
|
|
134
|
-
$ goofish message send
|
|
217
|
+
$ goofish message send <masked-cid> <masked-user-id> \
|
|
135
218
|
--text "在的 claude 测试成功 ✅" --item-id 1045171414271
|
|
136
219
|
```
|
|
137
220
|
|
|
138
221
|
```json
|
|
139
|
-
{"ok": true, "mid": "
|
|
222
|
+
{"ok": true, "mid": "<masked-message-id>", "cid": "<masked-cid>"}
|
|
140
223
|
```
|
|
141
224
|
</details>
|
|
142
225
|
|
|
@@ -207,10 +290,12 @@ Claude 会自动把全部命令看成 tool:`goofish_item_get` / `goofish_item_
|
|
|
207
290
|
- [x] v0.1:12 个命令 + MCP + IM 三类事件
|
|
208
291
|
- [x] v0.2:`goofish message list-chats`(会话列表 + sessionType 分类:1 真人 / 3 系统 / 6 互动 / 23 通知;`--watch-secs` 支持合并 WS `ackDiff(pts=0)` 历史推送补齐 h5 接口漏掉的会话)
|
|
209
292
|
- [x] v0.2:浏览器自动化链路(吸纳 [OpenCLI](https://github.com/jackwener/opencli) 精华)—— Playwright + 系统 Chrome 驱动 `goofish search items` / `goofish item view`,抗风控 & 完整字段
|
|
210
|
-
- [
|
|
211
|
-
- [
|
|
212
|
-
- [ ] v0.
|
|
213
|
-
- [ ] v0.
|
|
293
|
+
- [x] v0.2.3 / v0.2.4:session 自动续命(passport 快速进入)+ `auth login --qr` 扫码兜底
|
|
294
|
+
- [x] v0.3:Claude Skills 包装(5 个 skill:overview / risk-guard / publish-item / reply-buyer / shop-diagnosis)+ `goofish skills install`
|
|
295
|
+
- [ ] v0.4:`goofish message create-chat`(主动与陌生用户建会话)
|
|
296
|
+
- [ ] v0.4:`goofish order`(订单状态查询 / 发货)
|
|
297
|
+
- [ ] v0.4:历史数据落盘(SQLite / JSONL),给 shop-diagnosis 做时序归因
|
|
298
|
+
- [ ] v0.5:支持发视频消息
|
|
214
299
|
|
|
215
300
|
---
|
|
216
301
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "goofish-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.4.0"
|
|
8
8
|
description = "闲鱼 CLI — 支持 MCP,未来支持 Claude Skills。为 AI Agent 提供闲鱼自动化基础能力。"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "Apache-2.0" }
|
|
@@ -28,10 +28,13 @@ dependencies = [
|
|
|
28
28
|
"rich>=13.7",
|
|
29
29
|
"pyyaml>=6.0",
|
|
30
30
|
"tenacity>=8.2",
|
|
31
|
-
|
|
31
|
+
# v2 renames FastMCP to MCPServer and requires a server migration.
|
|
32
|
+
# Keep the existing FastMCP implementation on the maintained v1 line for now.
|
|
33
|
+
"mcp>=1.2,<2",
|
|
32
34
|
"websockets>=13",
|
|
33
35
|
"browser-cookie3>=0.20",
|
|
34
36
|
"playwright>=1.58.0",
|
|
37
|
+
"cryptography>=41.0",
|
|
35
38
|
]
|
|
36
39
|
|
|
37
40
|
[project.optional-dependencies]
|
|
@@ -63,6 +66,23 @@ Changelog = "https://github.com/fancyboi999/goofish-cli/blob/main/CHANGELOG.md"
|
|
|
63
66
|
[tool.hatch.build.targets.wheel]
|
|
64
67
|
packages = ["src/goofish_cli"]
|
|
65
68
|
|
|
69
|
+
# 内置 Claude Skills:把项目根 `skills/` 收进 wheel 的 `goofish_cli/_bundled_skills/`,
|
|
70
|
+
# 让 `goofish skills install` 能按包内路径定位到它(当前实现用 `goofish_cli.__file__`
|
|
71
|
+
# 拼子路径,不依赖 importlib.resources,避免 namespace package 在不同 py 版本上的行为差异)。
|
|
72
|
+
[tool.hatch.build.targets.wheel.force-include]
|
|
73
|
+
"skills" = "src/goofish_cli/_bundled_skills"
|
|
74
|
+
|
|
75
|
+
[tool.hatch.build.targets.sdist]
|
|
76
|
+
include = [
|
|
77
|
+
"src/",
|
|
78
|
+
"skills/",
|
|
79
|
+
".claude-plugin/",
|
|
80
|
+
"README.md",
|
|
81
|
+
"CHANGELOG.md",
|
|
82
|
+
"LICENSE",
|
|
83
|
+
"pyproject.toml",
|
|
84
|
+
]
|
|
85
|
+
|
|
66
86
|
[tool.ruff]
|
|
67
87
|
line-length = 100
|
|
68
88
|
target-version = "py311"
|