@volcengine/tls-observer-cursor-install 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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # @volcengine/tls-observer-cursor-install
2
+
3
+ ## 0.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 公网发包
8
+
9
+ ## 0.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Simplify Cursor trace collection
14
+
15
+ ## Unreleased
16
+
17
+ ### Patch Changes
18
+
19
+ - 将默认运行数据目录调整为 `~/.cursor/plugins/data/tls-observer-cursor`,以兼容统一排障路径。
20
+
21
+ ## 0.0.2
22
+
23
+ ### Patch Changes
24
+
25
+ - 安装包更新
26
+
27
+ ## 0.0.1
28
+
29
+ ### Patch Changes
30
+
31
+ - TLS 可观测
package/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # TLS Observer Cursor Installer
2
+
3
+ 一键安装 `@volcengine/tls-observer-cursor`,并把 Cursor agent hooks 接入到本机 `~/.cursor/hooks.json`。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm exec -y \
9
+ --package=@volcengine/tls-observer-cursor-install -- \
10
+ tls-observer-cursor-install
11
+ ```
12
+
13
+ 安装器默认从 registry 下载插件 `@latest`。使用 beta:
14
+
15
+ ```bash
16
+ npm exec -y \
17
+ --package=@volcengine/tls-observer-cursor-install -- \
18
+ tls-observer-cursor-install --beta
19
+ ```
20
+
21
+ `--plugin-version <version>` 可以指定精确版本或 dist-tag,并覆盖 `--beta`。
22
+
23
+ ## 安装结果
24
+
25
+ - 插件:`~/.cursor/tls-observer-cursor/plugin`
26
+ - Hooks:`~/.cursor/hooks.json`
27
+ - TLS env:`~/.cursor/tls-observer-cursor.env`
28
+ - 运行数据:`~/.cursor/plugins/data/tls-observer-cursor`
29
+
30
+ 安装器会给每个 Cursor agent hook event 追加一条本插件命令,例如:
31
+
32
+ ```json
33
+ {
34
+ "version": 1,
35
+ "hooks": {
36
+ "stop": [
37
+ {
38
+ "command": "\"/path/to/node\" \"~/.cursor/tls-observer-cursor/plugin/run-hook.mjs\"",
39
+ "timeout": 120
40
+ }
41
+ ]
42
+ }
43
+ }
44
+ ```
45
+
46
+ ## 非交互安装
47
+
48
+ ```bash
49
+ npm exec -y \
50
+ --package=@volcengine/tls-observer-cursor-install -- \
51
+ tls-observer-cursor-install \
52
+ --non-interactive \
53
+ --force \
54
+ --trace-topic-id <trace-topic-id> \
55
+ --api-key <api-key>
56
+ ```
57
+
58
+ TLS Region 默认是 `cn-beijing`,TLS Producer endpoint 会自动生成为 `tls-cn-beijing.volces.com`。如需切换 Region,使用 `--region <region>`;如需单独覆盖 endpoint,使用 `--tls-endpoint <host>`。旧的 `--otel-endpoint` 仅保留兼容。
59
+
60
+ AK/SK 模式将 `--api-key` 替换为 `--ak`、`--sk`,并可提供 `--project-name`、`--app-name` 自动准备 TLS LogApp。
61
+
62
+ ```bash
63
+ npm exec -y \
64
+ --package=@volcengine/tls-observer-cursor-install -- \
65
+ tls-observer-cursor-install \
66
+ --non-interactive \
67
+ --force \
68
+ --ak <ak> \
69
+ --sk <sk> \
70
+ --project-name cursor_observability \
71
+ --app-name cursor-observability-demo
72
+ ```
73
+
74
+ AK/SK 自动创建逻辑与 Claude Code installer 保持一致:如未传 `--trace-topic-id`,安装器会创建或复用 Project/LogApp,并从 LogApp 关联资源中发现 `trace` topic 写入 `CURSOR_TLS_TRACE_TOPIC_ID`。API Key 模式不会自动创建 TLS 资源,必须显式传入 trace topic ID。
75
+
76
+ 如果当前账号没有 `Cursor` 模板,可通过 `--template-name` 或 `--template-id` 指定可用模板。
77
+
78
+ ## 本地开发
79
+
80
+ ```bash
81
+ emo run build --filter @volcengine/tls-observer-cursor
82
+ emo run check --filter @volcengine/tls-observer-cursor-install
83
+ emo run build --filter @volcengine/tls-observer-cursor-install
84
+
85
+ CURSOR_PLUGIN_SOURCE="$PWD/packages/cursor" \
86
+ node packages/cursor-install/bin/tls-observer-cursor-install.mjs --force
87
+ ```
88
+
89
+ 安装器会读取源码包的 `publishConfig.directory`,因此本地开发与正式发布都会使用构建生成的 `dist-package`。
90
+
91
+ `sync-plugin` 仅用于生成安装器内的开发快照;正式安装路径以 registry 下载插件为准。
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import { run } from '../dist/index.js';
3
+
4
+ export { run } from '../dist/index.js';
5
+
6
+ run().catch((error) => {
7
+ console.error(error instanceof Error ? error.message : String(error));
8
+ process.exit(1);
9
+ });
@@ -0,0 +1 @@
1
+ export { run } from './installer/installer-runner.js';