oh-aicoding-tool 0.1.2 → 0.1.5
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 +79 -80
- package/bin/cli.js +257 -384
- package/package.json +27 -55
- package/CODEX_LANGFUSE_PLAN.md +0 -62
- package/bin/langfuse-cli.js +0 -718
- package/codex_langfuse_notify.py +0 -591
- package/langfuse_hook.py +0 -603
- package/opencode-ohai-report/.claude/commands/report-ai-issue.md +0 -60
- package/opencode-ohai-report/.opencode/commands/report-ai-issue.md +0 -30
- package/opencode-ohai-report/.opencode/plugins/oh-ai-report.ts +0 -569
- package/opencode-ohai-report/README.md +0 -45
- package/opencode-ohai-report/bin/cli.js +0 -421
- package/opencode-ohai-report/docs/opencode-ai-issue-collection-architecture.md +0 -313
- package/opencode-ohai-report/docs/opencode-ai-issue-collection-best-practices.md +0 -476
- package/opencode-ohai-report/docs/opencode-ai-issue-collection-phase1-summary.md +0 -405
- package/opencode-ohai-report/examples/issue_output.json +0 -4
- package/opencode-ohai-report/package.json +0 -40
- package/opencode-ohai-report/scripts/claude_report_hook.py +0 -257
- package/opencode-ohai-report/scripts/create_issue.py +0 -34
- package/opencode-ohai-report/scripts/install-claude-plugin.ps1 +0 -254
- package/opencode-ohai-report/scripts/install-opencode-plugin.ps1 +0 -264
- package/opencode-ohai-report/scripts/install-opencode-plugin.sh +0 -218
- package/opencode-ohai-report/scripts/merge-claude-settings.py +0 -99
- package/opencode-ohai-report/tools/ohai-report/README.md +0 -151
- package/opencode-ohai-report/tools/ohai-report/examples/issue-input.json +0 -26
- package/opencode-ohai-report/tools/ohai-report/ohai_report/__init__.py +0 -5
- package/opencode-ohai-report/tools/ohai-report/ohai_report/__main__.py +0 -9
- package/opencode-ohai-report/tools/ohai-report/ohai_report/cli.py +0 -319
- package/opencode-ohai-report/tools/ohai-report/ohai_report/git_context.py +0 -32
- package/opencode-ohai-report/tools/ohai-report/ohai_report/gitcode_defaults.py +0 -14
- package/opencode-ohai-report/tools/ohai-report/ohai_report/issue_markdown.py +0 -313
- package/opencode-ohai-report/tools/ohai-report/ohai_report/metadata.py +0 -360
- package/opencode-ohai-report/tools/ohai-report/ohai_report/observability/__init__.py +0 -1
- package/opencode-ohai-report/tools/ohai-report/ohai_report/observability/langfuse.py +0 -38
- package/opencode-ohai-report/tools/ohai-report/ohai_report/payload.py +0 -64
- package/opencode-ohai-report/tools/ohai-report/ohai_report/schema.py +0 -80
- package/opencode-ohai-report/tools/ohai-report/ohai_report/sinks/__init__.py +0 -1
- package/opencode-ohai-report/tools/ohai-report/ohai_report/sinks/base.py +0 -15
- package/opencode-ohai-report/tools/ohai-report/ohai_report/sinks/gitcode.py +0 -405
- package/opencode-ohai-report/tools/ohai-report/ohai_report/sinks/local.py +0 -21
- package/opencode-ohai-report/tools/ohai-report/ohai_report/sinks/webhook.py +0 -354
- package/opencode-ohai-report/tools/ohai-report/ohai_report/webhook_defaults.py +0 -9
- package/opencode-ohai-report/tools/ohai-report/ohai_report/workspace.py +0 -61
- package/opencode-ohai-report/tools/ohai-report/ohai_report.py +0 -10
- package/opencode-ohai-report/tools/ohai-report/schemas/report_issue.schema.json +0 -166
- package/scripts/codex-langfuse-check.mjs +0 -101
- package/scripts/codex-langfuse-setup.mjs +0 -181
- package/scripts/langfuse-check.mjs +0 -90
- package/scripts/langfuse-setup.mjs +0 -278
- package/scripts/opencode-langfuse-check.mjs +0 -94
- package/scripts/opencode-langfuse-run.mjs +0 -96
- package/scripts/opencode-langfuse-setup.mjs +0 -478
- package/scripts/resolve-opencode-cli.mjs +0 -58
- package/setup-langfuse.bat +0 -163
- package/setup-langfuse.sh +0 -130
package/README.md
CHANGED
|
@@ -1,115 +1,114 @@
|
|
|
1
1
|
# oh-aicoding-tool
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`oh-aicoding-tool` 是 AI Coding 工具的一站式聚合安装器。它本身不承载具体
|
|
4
|
+
产品逻辑,而是提供统一的终端菜单和命令转发能力,调用各功能包完成安装和配置。
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
- `oh-ai-report` issue feedback plugin installer for OpenCode and Claude Code.
|
|
6
|
+
## 项目定位
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
本仓是用户侧入口,适合在一次流程中安装或配置多个 AI Coding 辅助能力。
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
当前聚合两个功能包:
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```
|
|
12
|
+
| 能力 | npm 包 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| Langfuse 追踪 | `oh-langfuse` | 配置 Claude Code、OpenCode、Codex 的 Langfuse 链路追踪 |
|
|
15
|
+
| 问题上报插件 | `oh-aireport` | 安装 `/report-ai-issue`,配置 OpenCode / Claude Code 问题上报 |
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
CLI 运行时会解析依赖包暴露的 bin 并转发参数。因此功能逻辑变更应优先在对应功能包中完成:
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
- Langfuse 相关能力维护在 `oh-langfuse`;
|
|
20
|
+
- 问题上报相关能力维护在 `oh-aireport`;
|
|
21
|
+
- 聚合菜单、编排逻辑、依赖版本维护在本仓。
|
|
22
|
+
|
|
23
|
+
## 使用方式
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## Commands
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
oh-aicoding-tool # guided menu
|
|
35
|
-
oh-aicoding-tool langfuse setup
|
|
36
|
-
oh-aicoding-tool langfuse setup claude
|
|
37
|
-
oh-aicoding-tool langfuse setup opencode
|
|
38
|
-
oh-aicoding-tool langfuse setup codex
|
|
39
|
-
oh-aicoding-tool langfuse check
|
|
40
|
-
oh-aicoding-tool langfuse check environment
|
|
41
|
-
oh-aicoding-tool langfuse check claude
|
|
42
|
-
oh-aicoding-tool langfuse check opencode
|
|
43
|
-
oh-aicoding-tool langfuse check codex
|
|
44
|
-
oh-aicoding-tool report install opencode
|
|
45
|
-
oh-aicoding-tool report install claude
|
|
46
|
-
oh-aicoding-tool report install both
|
|
47
|
-
oh-aicoding-tool report doctor
|
|
25
|
+
运行交互式安装器:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx oh-aicoding-tool@latest
|
|
48
29
|
```
|
|
49
30
|
|
|
50
|
-
|
|
31
|
+
从当前仓库运行:
|
|
51
32
|
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
ohai-report
|
|
33
|
+
```bash
|
|
34
|
+
npm install
|
|
35
|
+
npm start
|
|
56
36
|
```
|
|
57
37
|
|
|
58
|
-
|
|
38
|
+
交互界面支持:
|
|
59
39
|
|
|
60
|
-
|
|
40
|
+
- `Up` / `Down`:移动选项;
|
|
41
|
+
- `Space`:选择或取消选择;
|
|
42
|
+
- `Enter`:继续;
|
|
43
|
+
- `q` 或 `Esc`:退出。
|
|
61
44
|
|
|
62
|
-
|
|
45
|
+
在不支持 raw input 的终端中,会自动退回到数字输入模式。
|
|
63
46
|
|
|
64
|
-
|
|
65
|
-
- OpenCode Langfuse
|
|
66
|
-
- Codex Langfuse
|
|
47
|
+
## 直接命令
|
|
67
48
|
|
|
68
|
-
|
|
49
|
+
Langfuse 命令会转发给 `oh-langfuse`:
|
|
69
50
|
|
|
70
|
-
|
|
51
|
+
```bash
|
|
52
|
+
npx oh-aicoding-tool@latest langfuse setup
|
|
53
|
+
npx oh-aicoding-tool@latest langfuse setup claude
|
|
54
|
+
npx oh-aicoding-tool@latest langfuse setup opencode
|
|
55
|
+
npx oh-aicoding-tool@latest langfuse setup codex
|
|
56
|
+
npx oh-aicoding-tool@latest langfuse check
|
|
57
|
+
npx oh-aicoding-tool@latest langfuse check environment
|
|
58
|
+
```
|
|
71
59
|
|
|
72
|
-
|
|
73
|
-
- Python / pip for Claude Code setup
|
|
74
|
-
- Python / pip for Codex setup
|
|
75
|
-
- OpenCode CLI for OpenCode setup
|
|
60
|
+
也支持 Langfuse 的短命令别名:
|
|
76
61
|
|
|
77
|
-
|
|
62
|
+
```bash
|
|
63
|
+
npx oh-aicoding-tool@latest setup
|
|
64
|
+
npx oh-aicoding-tool@latest check
|
|
65
|
+
```
|
|
78
66
|
|
|
79
|
-
|
|
67
|
+
问题上报命令会转发给 `oh-aireport`:
|
|
80
68
|
|
|
81
|
-
```
|
|
82
|
-
oh-aicoding-tool
|
|
69
|
+
```bash
|
|
70
|
+
npx oh-aicoding-tool@latest report install opencode --email xxxxx@huawei.com
|
|
71
|
+
npx oh-aicoding-tool@latest report install claude
|
|
72
|
+
npx oh-aicoding-tool@latest report install both
|
|
83
73
|
```
|
|
84
74
|
|
|
85
|
-
|
|
75
|
+
如果交互流程中未填写邮箱,聚合器会向 `oh-aireport` 传递 `--skip-email`,
|
|
76
|
+
邮箱配置可后续单独补充。
|
|
86
77
|
|
|
87
|
-
|
|
78
|
+
## 运行依赖
|
|
88
79
|
|
|
89
|
-
|
|
90
|
-
tool config so issue reports can carry a stable user identity.
|
|
80
|
+
聚合器自身需要 Node.js 和 npm。各功能包可能额外需要:
|
|
91
81
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
82
|
+
| 流程 | 额外依赖 |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| Claude Code Langfuse | Python、pip |
|
|
85
|
+
| OpenCode Langfuse | OpenCode CLI |
|
|
86
|
+
| Codex Langfuse | Python、pip |
|
|
87
|
+
| OpenCode 问题上报 | OpenCode 配置目录和插件文件 |
|
|
88
|
+
| Claude Code 问题上报 | Claude Code 配置目录和 Python hook |
|
|
98
89
|
|
|
99
|
-
##
|
|
90
|
+
## 目录结构
|
|
100
91
|
|
|
101
|
-
|
|
92
|
+
| 路径 | 说明 |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `bin/cli.js` | 聚合菜单和命令转发入口 |
|
|
95
|
+
| `package.json` | npm 包元数据和功能包依赖 |
|
|
96
|
+
| `README.md` | 使用和维护说明 |
|
|
102
97
|
|
|
103
|
-
|
|
98
|
+
## 发布顺序
|
|
104
99
|
|
|
105
|
-
|
|
100
|
+
因为本包依赖两个功能包,发布时建议按以下顺序:
|
|
106
101
|
|
|
107
|
-
|
|
102
|
+
1. 发布 `oh-langfuse`。
|
|
103
|
+
2. 发布 `oh-aireport`。
|
|
104
|
+
3. 更新本仓 `package.json` 中两个依赖版本。
|
|
105
|
+
4. 发布 `oh-aicoding-tool`。
|
|
108
106
|
|
|
109
|
-
|
|
107
|
+
发布前建议运行:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm run check
|
|
111
|
+
npm run pack:check
|
|
112
|
+
```
|
|
110
113
|
|
|
111
|
-
|
|
112
|
-
- The default secret key is not printed in the terminal UI.
|
|
113
|
-
- The CLI calls the Node setup/check scripts directly, so it avoids PowerShell `npm.ps1` execution-policy failures.
|
|
114
|
-
- The Python hook reads `userId` from hook payload first, then from configured environment variables.
|
|
115
|
-
- The Codex hook fails open: tracing errors are logged to `~/.codex/langfuse/codex_langfuse_notify.log` and do not block Codex.
|
|
114
|
+
本仓应保持轻量,只在菜单、编排逻辑、依赖版本或聚合入口行为变化时修改。
|