@volcengine/tls-observer-trae-install 0.0.2

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,5 @@
1
+ # @volcengine/tls-observer-trae-install
2
+
3
+ ## 0.0.1
4
+
5
+ - Initial Trae installer.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # @volcengine/tls-observer-trae-install
2
+
3
+ Installs `@volcengine/tls-observer-trae` locally and writes the TLS env file used by the Trae hook runtime.
4
+
5
+ ```bash
6
+ npm exec -y --package=@volcengine/tls-observer-trae-install -- tls-observer-trae-install
7
+ ```
8
+
9
+ For local development:
10
+
11
+ ```bash
12
+ TRAE_TLS_PLUGIN_SOURCE="$PWD/packages/trae" \
13
+ node packages/trae-install/bin/tls-observer-trae-install.mjs --force --skip-tls-config
14
+ ```
15
+
16
+ API Key mode requires an existing trace topic ID:
17
+
18
+ ```bash
19
+ npm exec -y --package=@volcengine/tls-observer-trae-install -- tls-observer-trae-install \
20
+ --trace-topic-id <trace-topic-id> \
21
+ --api-key <api-key>
22
+ ```
23
+
24
+ AK/SK mode can prepare the TLS Project and LogApp automatically, then write the discovered trace topic ID into the generated env file:
25
+
26
+ ```bash
27
+ npm exec -y --package=@volcengine/tls-observer-trae-install -- tls-observer-trae-install \
28
+ --ak <ak> \
29
+ --sk <sk> \
30
+ --project-name trae_observability \
31
+ --app-name trae-observability
32
+ ```
33
+
34
+ The installer writes:
35
+
36
+ - runtime package: `~/.trae-cn/plugins/tls-observer-trae`
37
+ - env file: `~/.trae-cn/tls-observer-trae.env`
38
+ - data root: `~/.trae-cn/plugins/data/tls-observer-trae`
39
+ - hook config reference: `~/.trae-cn/hooks.json`
40
+
41
+ Trae hook/plugin config locations differ across builds, so the hook reference file is intentionally explicit. It uses Trae's `version: 1` hook format and registers `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, and `Stop`; wire the generated config into the confirmed Trae hook config path.
42
+
43
+ The runtime does not require ContextFS credentials. It relies on Trae hook payloads from `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, and `Stop`.
@@ -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';