@inspecto-dev/cli 0.3.6 → 0.3.7

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @inspecto-dev/cli@0.3.6 build /Users/bytedance/Works/hugo.felix/inspecto/packages/cli
3
+ > @inspecto-dev/cli@0.3.7 build /Users/bytedance/Works/hugo.felix/inspecto/packages/cli
4
4
  > tsup
5
5
 
6
6
  CLI Building entry: src/bin.ts, src/index.ts
@@ -10,11 +10,11 @@
10
10
  CLI Target: node18
11
11
  CLI Cleaning output folder
12
12
  ESM Build start
13
- ESM dist/index.js 435.00 B
14
13
  ESM dist/bin.js 12.37 KB
15
- ESM dist/chunk-7ABJRH3F.js 202.95 KB
16
- ESM ⚡️ Build success in 92ms
14
+ ESM dist/index.js 435.00 B
15
+ ESM dist/chunk-LLQA5L7E.js 208.92 KB
16
+ ESM ⚡️ Build success in 204ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 1945ms
18
+ DTS ⚡️ Build success in 2598ms
19
19
  DTS dist/bin.d.ts 185.00 B
20
20
  DTS dist/index.d.ts 11.94 KB
@@ -1,16 +1,16 @@
1
1
 
2
- > @inspecto-dev/cli@0.3.5 test /Users/bytedance/Works/hugo.felix/inspecto/packages/cli
2
+ > @inspecto-dev/cli@0.3.6 test /Users/bytedance/Works/hugo.felix/inspecto/packages/cli
3
3
  > vitest run --passWithNoTests
4
4
 
5
5
 
6
6
  RUN v1.6.1 /Users/bytedance/Works/hugo.felix/inspecto/packages/cli
7
7
 
8
- ✓ tests/build-tool.test.ts (9 tests) 33ms
9
- ✓ tests/integration-dispatch-mode.test.ts (8 tests) 201ms
10
- ✓ tests/extension-installer.test.ts (6 tests) 203ms
11
- ✓ tests/integration-automation.test.ts (16 tests) 200ms
8
+ ✓ tests/build-tool.test.ts (9 tests) 14ms
9
+ ✓ tests/extension-installer.test.ts (6 tests) 75ms
10
+ ✓ tests/integration-host-ide.test.ts (12 tests) 77ms
11
+ ✓ tests/integration-automation.test.ts (16 tests) 84ms
12
12
  ✓ tests/onboard.test.ts (12 tests) 10ms
13
- ✓ tests/doctor.test.ts (6 tests) 10ms
13
+ ✓ tests/doctor.test.ts (6 tests) 9ms
14
14
  - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
15
15
  stdout | tests/apply.test.ts > apply onboarding flow > applies the supported setup path and returns structured mutations and post-install state
16
16
  ✔ Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies
@@ -18,42 +18,25 @@ stdout | tests/apply.test.ts > apply onboarding flow > applies the supported set
18
18
  ✔ Created .inspecto/prompts.local.json
19
19
 
20
20
  stdout | tests/apply.test.ts > apply onboarding flow > only injects the explicitly selected build target
21
- ✔ Dependencies installed successfully
22
- - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
23
- ✔ Dependencies installed successfully
24
21
  ✔ Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies
25
22
  ✔ Created .inspecto/settings.local.json
26
- - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
27
- ✔ Dependencies installed successfully
28
23
  ✔ Created .inspecto/prompts.local.json
29
24
 
30
- - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
31
25
  stdout | tests/apply.test.ts > apply onboarding flow > supports legacy rspack partial onboarding without attempting automatic injection
32
26
  ✔ Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies
33
- ✔ Dependencies installed successfully
34
27
  ✔ Created .inspecto/settings.local.json
35
- - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
36
- ✔ Dependencies installed successfully
37
28
  ✔ Created .inspecto/prompts.local.json
38
29
 
39
30
  stdout | tests/apply.test.ts > apply onboarding flow > supports webpack 4 partial onboarding without attempting automatic injection
40
- - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
41
- ✔ Dependencies installed successfully
42
31
  ✔ Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies
43
- - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
44
32
  ✔ Created .inspecto/settings.local.json
45
- ✔ Dependencies installed successfully
46
- - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
47
33
  ✔ Created .inspecto/prompts.local.json
48
- ✔ Dependencies installed successfully
49
34
 
50
35
  stdout | tests/apply.test.ts > apply onboarding flow > auto-applies high-confidence Next.js config patches for guided plans
51
36
  ✔ Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies
52
37
  ✔ Applied guided patch to next.config.mjs
53
38
  ✔ Created .inspecto/settings.local.json
54
- - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
55
39
  ✔ Created .inspecto/prompts.local.json
56
- ✔ Dependencies installed successfully
57
40
 
58
41
  stdout | tests/apply.test.ts > apply onboarding flow > auto-applies high-confidence Next.js patches for exported nextConfig objects
59
42
  ✔ Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies
@@ -65,8 +48,6 @@ stdout | tests/apply.test.ts > apply onboarding flow > preserves manual patch fo
65
48
  ✔ Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies
66
49
  ✔ Created .inspecto/settings.local.json
67
50
  ✔ Created .inspecto/prompts.local.json
68
- - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
69
- ✔ Dependencies installed successfully
70
51
 
71
52
  stdout | tests/apply.test.ts > apply onboarding flow > auto-applies high-confidence Nuxt config patches for guided plans
72
53
  ✔ Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies
@@ -74,7 +55,30 @@ stdout | tests/apply.test.ts > apply onboarding flow > auto-applies high-confide
74
55
  ✔ Created .inspecto/settings.local.json
75
56
  ✔ Created .inspecto/prompts.local.json
76
57
 
77
- ✓ tests/apply.test.ts (18 tests) 23ms
58
+ ✓ tests/apply.test.ts (18 tests) 18ms
59
+ ✔ Dependencies installed successfully
60
+ - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
61
+ ✔ Dependencies installed successfully
62
+ - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
63
+ ✔ Dependencies installed successfully
64
+ - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
65
+ ✔ Dependencies installed successfully
66
+ - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
67
+ ✔ Dependencies installed successfully
68
+ - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
69
+ ✔ Dependencies installed successfully
70
+ - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
71
+ ✔ Dependencies installed successfully
72
+ - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
73
+ ✔ Dependencies installed successfully
74
+ - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
75
+ ✔ Dependencies installed successfully
76
+ - Installing devDependencies via: pnpm add -D @inspecto-dev/plugin @inspecto-dev/core
77
+ ✔ Dependencies installed successfully
78
+ ✓ tests/integration-dispatch-mode.test.ts (8 tests) 21ms
79
+ ✓ tests/session.test.ts (1 test) 4ms
80
+ ✓ tests/integration-doctor.test.ts (4 tests) 23ms
81
+ ✓ tests/init.test.ts (6 tests) 6ms
78
82
  stdout | tests/init.test.ts > init in monorepo roots > routes installation and config generation into the selected app instead of the monorepo root
79
83
 
80
84
  ✦ Inspecto Setup
@@ -141,15 +145,16 @@ stdout | tests/init.test.ts > init in monorepo roots > preserves detected prefer
141
145
  → 2. Open your app in the browser.
142
146
  → 3. Hold Alt + Click any element to inspect.
143
147
 
144
- ✓ tests/init.test.ts (6 tests) 8ms
145
- ✓ tests/integration-host-ide.test.ts (9 tests) 58ms
146
- ✓ tests/integration-doctor.test.ts (4 tests) 59ms
147
- ✓ tests/session.test.ts (1 test) 3ms
148
- ✓ tests/nextjs-guidance.test.ts (4 tests) 289ms
149
- ✓ tests/session-resolve.test.ts (3 tests) 15ms
150
- ✓ tests/plan.test.ts (21 tests) 753ms
151
- ✓ tests/integration-install.test.ts (28 tests) 1140ms
152
- ✓ tests/ide.test.ts (6 tests) 7ms
148
+ ✓ tests/nextjs-guidance.test.ts (4 tests) 113ms
149
+ ✓ tests/session-resolve.test.ts (3 tests) 4ms
150
+ ✓ tests/plan.test.ts (21 tests) 371ms
151
+ ✓ tests/integration-install.test.ts (28 tests) 529ms
152
+ ✓ tests/detect.test.ts (1 test) 2ms
153
+ ✓ tests/ide.test.ts (6 tests) 3ms
154
+ ✓ tests/logger.test.ts (5 tests) 7ms
155
+ ✓ tests/instructions.test.ts (2 tests) 5ms
156
+ ✓ tests/shared-capabilities.test.ts (3 tests) 3ms
157
+ ✓ tests/dev-config.test.ts (4 tests) 4ms
153
158
  stdout | tests/dev-config.test.ts > dev config commands > writes cliBin into .inspecto/dev.json
154
159
  {
155
160
  "status": "ok",
@@ -186,20 +191,15 @@ stdout | tests/dev-config.test.ts > dev config commands > clears the dev config
186
191
  "config": {}
187
192
  }
188
193
 
189
- ✓ tests/dev-config.test.ts (4 tests) 13ms
190
- ✓ tests/logger.test.ts (5 tests) 9ms
191
- ✓ tests/detect.test.ts (1 test) 3ms
192
- ✓ tests/instructions.test.ts (2 tests) 7ms
193
- ✓ tests/shared-capabilities.test.ts (3 tests) 2ms
194
- ✓ tests/framework.test.ts (5 tests) 6ms
195
- ✓ tests/workspace-build-tool.test.ts (1 test) 18ms
196
- ✓ tests/nuxt-guidance.test.ts (2 tests) 120ms
197
- ✓ tests/ast-injector.test.ts (1 test) 4ms
198
- ✓ tests/runner-script.test.ts (15 tests) 2441ms
199
- ✓ tests/install-wrapper.test.ts (3 tests) 2198ms
194
+ ✓ tests/workspace-build-tool.test.ts (1 test) 6ms
195
+ ✓ tests/framework.test.ts (5 tests) 3ms
196
+ ✓ tests/nuxt-guidance.test.ts (2 tests) 10ms
197
+ ✓ tests/ast-injector.test.ts (1 test) 3ms
198
+ ✓ tests/runner-script.test.ts (15 tests) 2302ms
199
+ ✓ tests/install-wrapper.test.ts (3 tests) 2443ms
200
200
 
201
201
  Test Files 27 passed (27)
202
- Tests 199 passed (199)
203
- Start at 11:45:48
204
- Duration 3.92s (transform 3.88s, setup 0ms, collect 6.55s, tests 7.83s, environment 13ms, prepare 7.96s)
202
+ Tests 202 passed (202)
203
+ Start at 14:41:23
204
+ Duration 3.53s (transform 2.28s, setup 3ms, collect 3.74s, tests 6.15s, environment 4ms, prepare 3.90s)
205
205
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @inspecto-dev/cli
2
2
 
3
+ ## 0.3.7
4
+
5
+ ### Patch Changes
6
+
7
+ - release 0.3.7
8
+ - Updated dependencies
9
+ - @inspecto-dev/types@0.3.7
10
+
3
11
  ## 0.3.6
4
12
 
5
13
  ### Patch Changes
package/README.md CHANGED
@@ -17,11 +17,12 @@ npx @inspecto-dev/cli integrations install cursor --host-ide cursor
17
17
  npx @inspecto-dev/cli integrations install gemini --host-ide vscode
18
18
  npx @inspecto-dev/cli integrations install trae --host-ide trae-cn
19
19
  npx @inspecto-dev/cli integrations install coco --host-ide trae-cn
20
+ npx @inspecto-dev/cli integrations install codebuddy --host-ide codebuddy-cn
20
21
  ```
21
22
 
22
- Supported assistants currently include `codex`, `claude-code`, `copilot`, `cursor`, `gemini`, `trae`, and `coco`.
23
+ Supported assistants currently include `codex`, `claude-code`, `copilot`, `cursor`, `gemini`, `trae`, `coco`, and `codebuddy`.
23
24
 
24
- `--host-ide` values: `vscode`, `cursor`, `trae`, `trae-cn`.
25
+ `--host-ide` values: `vscode`, `cursor`, `trae`, `trae-cn`, `codebuddy`, `codebuddy-cn`.
25
26
 
26
27
  Inspect available integration targets with:
27
28
 
@@ -104,6 +105,7 @@ inspecto integrations install codex --host-ide vscode
104
105
  inspecto integrations path codex
105
106
  inspecto integrations install claude-code --scope project --host-ide vscode
106
107
  inspecto integrations install cursor --host-ide cursor
108
+ inspecto integrations install codebuddy --host-ide codebuddy-cn
107
109
  ```
108
110
 
109
111
  #### `inspecto integrations doctor`
package/dist/bin.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  printIntegrationPath,
15
15
  reportCommandError,
16
16
  teardown
17
- } from "./chunk-7ABJRH3F.js";
17
+ } from "./chunk-LLQA5L7E.js";
18
18
 
19
19
  // src/bin.ts
20
20
  import { cac } from "cac";
@@ -585,6 +585,44 @@ var HOST_IDE_CAPABILITIES = {
585
585
  `${process.env.PROGRAMFILES}\\Trae CN\\resources\\app\\bin\\trae-cn.cmd`
586
586
  ]
587
587
  }
588
+ },
589
+ codebuddy: {
590
+ label: "CodeBuddy",
591
+ artifactDir: ".codebuddy",
592
+ extensionDir: ".codebuddy/extensions",
593
+ binaryName: "codebuddy",
594
+ binaryPaths: {
595
+ darwin: [
596
+ "/Applications/CodeBuddy.app/Contents/Resources/app/bin/codebuddy",
597
+ "/Applications/CodeBuddy.app/Contents/Resources/app/bin/code",
598
+ `${process.env.HOME}/Applications/CodeBuddy.app/Contents/Resources/app/bin/codebuddy`,
599
+ `${process.env.HOME}/Applications/CodeBuddy.app/Contents/Resources/app/bin/code`
600
+ ],
601
+ linux: ["/usr/bin/codebuddy", "/opt/CodeBuddy/resources/app/bin/codebuddy"],
602
+ win32: [
603
+ `${process.env.LOCALAPPDATA}\\Programs\\CodeBuddy\\resources\\app\\bin\\codebuddy.cmd`,
604
+ `${process.env.PROGRAMFILES}\\CodeBuddy\\resources\\app\\bin\\codebuddy.cmd`
605
+ ]
606
+ }
607
+ },
608
+ "codebuddy-cn": {
609
+ label: "CodeBuddy CN",
610
+ artifactDir: ".codebuddy-cn",
611
+ extensionDir: ".codebuddy-cn/extensions",
612
+ binaryName: "codebuddy-cn",
613
+ binaryPaths: {
614
+ darwin: [
615
+ "/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/codebuddy-cn",
616
+ "/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/code",
617
+ `${process.env.HOME}/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/codebuddy-cn`,
618
+ `${process.env.HOME}/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/code`
619
+ ],
620
+ linux: ["/usr/bin/codebuddy-cn", "/opt/CodeBuddy CN/resources/app/bin/codebuddy-cn"],
621
+ win32: [
622
+ `${process.env.LOCALAPPDATA}\\Programs\\CodeBuddy CN\\resources\\app\\bin\\codebuddy-cn.cmd`,
623
+ `${process.env.PROGRAMFILES}\\CodeBuddy CN\\resources\\app\\bin\\codebuddy-cn.cmd`
624
+ ]
625
+ }
588
626
  }
589
627
  };
590
628
  function getHostIdeResolutionSourceLabel(source) {
@@ -800,6 +838,34 @@ async function installExtension(dryRun, ide, quiet = false, extensionRef = EXTEN
800
838
  }
801
839
  }
802
840
  }
841
+ if (ide === "codebuddy" && process.platform === "darwin") {
842
+ const codebuddyPath = await findIdeBinary("codebuddy");
843
+ if (codebuddyPath) {
844
+ const result = await installAlternativeIdeExtension(
845
+ codebuddyPath,
846
+ getHostIdeLabel("codebuddy"),
847
+ extensionRef,
848
+ quiet
849
+ );
850
+ if (result) {
851
+ return result;
852
+ }
853
+ }
854
+ }
855
+ if (ide === "codebuddy-cn" && process.platform === "darwin") {
856
+ const codebuddyCnPath = await findIdeBinary("codebuddy-cn");
857
+ if (codebuddyCnPath) {
858
+ const result = await installAlternativeIdeExtension(
859
+ codebuddyCnPath,
860
+ getHostIdeLabel("codebuddy-cn"),
861
+ extensionRef,
862
+ quiet
863
+ );
864
+ if (result) {
865
+ return result;
866
+ }
867
+ }
868
+ }
803
869
  if (!quiet) {
804
870
  log.warn(`Could not auto-install extension for ${ide}`);
805
871
  log.hint("Please install it manually to enable Inspector features:");
@@ -1882,24 +1948,43 @@ async function detectIDE(root) {
1882
1948
  if (process.env.CURSOR_TRACE_DIR || process.env.CURSOR_CHANNEL) {
1883
1949
  detected.set("Cursor", { ide: "cursor", supported: true });
1884
1950
  }
1885
- if (process.env.TRAE_APP_DIR || process.env.__CFBundleIdentifier === "com.byteocean.trae" || process.env.COCO_IDE_PLUGIN_TYPE === "Trae" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("trae")) {
1951
+ if (process.env.__CFBundleIdentifier === "com.byteocean.trae.cn" || process.env.COCO_IDE_PLUGIN_TYPE === "TraeCN" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("trae-cn")) {
1952
+ detected.set("Trae CN", { ide: "trae-cn", supported: true });
1953
+ } else if (process.env.TRAE_APP_DIR || process.env.__CFBundleIdentifier === "com.byteocean.trae" || process.env.COCO_IDE_PLUGIN_TYPE === "Trae" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("trae")) {
1886
1954
  detected.set("Trae", { ide: "trae", supported: true });
1887
1955
  }
1956
+ if (process.env.__CFBundleIdentifier === "ai.codebuddy.mac.cn" || process.env.COCO_IDE_PLUGIN_TYPE === "CodeBuddyCN" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("codebuddy-cn")) {
1957
+ detected.set("CodeBuddy CN", { ide: "codebuddy-cn", supported: true });
1958
+ } else if (process.env.__CFBundleIdentifier === "ai.codebuddy.mac" || process.env.COCO_IDE_PLUGIN_TYPE === "CodeBuddy" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("codebuddy")) {
1959
+ detected.set("CodeBuddy", { ide: "codebuddy", supported: true });
1960
+ }
1888
1961
  if (process.env.ZED_TERM) {
1889
1962
  detected.set("Zed", { ide: "Zed", supported: false });
1890
1963
  }
1891
1964
  if (process.env.WINDSURF_APP_DIR || process.env.WINDSURF_CHANNEL || process.env.__CFBundleIdentifier === "com.codeium.windsurf" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("windsurf")) {
1892
1965
  detected.set("Windsurf", { ide: "Windsurf", supported: false });
1893
1966
  }
1894
- const [hasTrae, hasCursor, hasVscode, hasIdea] = await Promise.all([
1967
+ const [hasTrae, hasTraeCn, hasCursor, hasVscode, hasIdea, hasCodeBuddy, hasCodeBuddyCn] = await Promise.all([
1895
1968
  exists(path9.join(root, ".trae")),
1969
+ exists(path9.join(root, ".trae-cn")),
1896
1970
  exists(path9.join(root, ".cursor")),
1897
1971
  exists(path9.join(root, ".vscode")),
1898
- exists(path9.join(root, ".idea"))
1972
+ exists(path9.join(root, ".idea")),
1973
+ exists(path9.join(root, ".codebuddy")),
1974
+ exists(path9.join(root, ".codebuddy-cn"))
1899
1975
  ]);
1900
1976
  if (hasTrae && !detected.has("Trae")) {
1901
1977
  detected.set("Trae", { ide: "trae", supported: true });
1902
1978
  }
1979
+ if (hasTraeCn && !detected.has("Trae CN")) {
1980
+ detected.set("Trae CN", { ide: "trae-cn", supported: true });
1981
+ }
1982
+ if (hasCodeBuddy && !detected.has("CodeBuddy")) {
1983
+ detected.set("CodeBuddy", { ide: "codebuddy", supported: true });
1984
+ }
1985
+ if (hasCodeBuddyCn && !detected.has("CodeBuddy CN")) {
1986
+ detected.set("CodeBuddy CN", { ide: "codebuddy-cn", supported: true });
1987
+ }
1903
1988
  if (hasCursor && !detected.has("Cursor")) {
1904
1989
  detected.set("Cursor", { ide: "cursor", supported: true });
1905
1990
  }
@@ -4895,11 +4980,15 @@ function detectEnvHostIdes() {
4895
4980
  if (process.env.CURSOR_TRACE_DIR || process.env.CURSOR_CHANNEL) {
4896
4981
  detected.add("cursor");
4897
4982
  }
4898
- if (process.env.TRAE_APP_DIR || process.env.__CFBundleIdentifier === "com.byteocean.trae" || process.env.COCO_IDE_PLUGIN_TYPE === "Trae" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("trae")) {
4899
- detected.add("trae");
4900
- }
4901
4983
  if (process.env.__CFBundleIdentifier === "com.byteocean.trae.cn" || process.env.COCO_IDE_PLUGIN_TYPE === "TraeCN" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("trae-cn")) {
4902
4984
  detected.add("trae-cn");
4985
+ } else if (process.env.TRAE_APP_DIR || process.env.__CFBundleIdentifier === "com.byteocean.trae" || process.env.COCO_IDE_PLUGIN_TYPE === "Trae" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("trae")) {
4986
+ detected.add("trae");
4987
+ }
4988
+ if (process.env.__CFBundleIdentifier === "ai.codebuddy.mac.cn" || process.env.COCO_IDE_PLUGIN_TYPE === "CodeBuddyCN" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("codebuddy-cn")) {
4989
+ detected.add("codebuddy-cn");
4990
+ } else if (process.env.__CFBundleIdentifier === "ai.codebuddy.mac" || process.env.COCO_IDE_PLUGIN_TYPE === "CodeBuddy" || process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes("codebuddy")) {
4991
+ detected.add("codebuddy");
4903
4992
  }
4904
4993
  if (detected.size === 0 && process.env.TERM_PROGRAM === "vscode") {
4905
4994
  detected.add("vscode");
@@ -4907,7 +4996,7 @@ function detectEnvHostIdes() {
4907
4996
  return Array.from(detected);
4908
4997
  }
4909
4998
  async function detectArtifactHostIdes(cwd) {
4910
- const artifactOrder = ["cursor", "trae", "trae-cn", "vscode"];
4999
+ const artifactOrder = ["cursor", "trae", "trae-cn", "codebuddy", "codebuddy-cn", "vscode"];
4911
5000
  const candidates = artifactOrder.map((ide) => ({
4912
5001
  ide,
4913
5002
  target: getHostIdeArtifactPath(ide, cwd)
@@ -4983,6 +5072,9 @@ async function isIdeExtensionInstalled(extensionId, extensionsDir) {
4983
5072
  var ONBOARDING_PROMPT = "Set up Inspecto in this project";
4984
5073
  var TOTAL_STEPS = 6;
4985
5074
  var EXTENSION_ID2 = "inspecto.inspecto";
5075
+ var IDE_TO_URI_SCHEME = {
5076
+ "codebuddy-cn": "codebuddycn"
5077
+ };
4986
5078
  function getPreviewReadyMessage() {
4987
5079
  return "Preview complete. Inspecto did not write files or open IDE windows. Review the resolved setup below, then rerun without --preview to apply it.";
4988
5080
  }
@@ -5027,13 +5119,13 @@ async function runIntegrationAutomation(assistant, options = {}, cwd) {
5027
5119
  }
5028
5120
  if (!silent) {
5029
5121
  log.hint(
5030
- "Re-run with --host-ide <vscode|cursor|trae|trae-cn> or run the command from the target IDE terminal to continue automatic setup."
5122
+ "Re-run with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> or run the command from the target IDE terminal to continue automatic setup."
5031
5123
  );
5032
5124
  }
5033
5125
  return {
5034
5126
  status: "blocked",
5035
5127
  message: getHostIdeBlockedMessage(),
5036
- nextStep: "Re-run with --host-ide <vscode|cursor|trae|trae-cn> or run the command from the target IDE terminal to continue automatic setup.",
5128
+ nextStep: "Re-run with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> or run the command from the target IDE terminal to continue automatic setup.",
5037
5129
  details
5038
5130
  };
5039
5131
  }
@@ -5051,7 +5143,8 @@ async function runIntegrationAutomation(assistant, options = {}, cwd) {
5051
5143
  if (dispatchMode.mode) {
5052
5144
  previewParams.set("overrides", JSON.stringify({ type: dispatchMode.mode }));
5053
5145
  }
5054
- const launchUri = `${resolvedHostIde.ide}://inspecto.inspecto/send?${previewParams.toString()}`;
5146
+ const uriScheme = resolvedHostIde.ide ? IDE_TO_URI_SCHEME[resolvedHostIde.ide] ?? resolvedHostIde.ide : "vscode";
5147
+ const launchUri = `${uriScheme}://inspecto.inspecto/send?${previewParams.toString()}`;
5055
5148
  details.inspectoExtension = {
5056
5149
  source: options.inspectoVsix ? "local_vsix" : "marketplace",
5057
5150
  reference: options.inspectoVsix ?? EXTENSION_ID2
@@ -5357,49 +5450,56 @@ var INTEGRATION_MANIFESTS = [
5357
5450
  assistant: "codex",
5358
5451
  type: "native-skill",
5359
5452
  installTarget: ".agents/skills/",
5360
- preferredInstall: "npx @inspecto-dev/cli integrations install codex --host-ide <vscode|cursor|trae|trae-cn>",
5453
+ preferredInstall: "npx @inspecto-dev/cli integrations install codex --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
5361
5454
  cliSupported: true
5362
5455
  },
5363
5456
  {
5364
5457
  assistant: "claude-code",
5365
5458
  type: "native-skill",
5366
5459
  installTarget: ".claude/skills/ or ~/.claude/skills/",
5367
- preferredInstall: "npx @inspecto-dev/cli integrations install claude-code --scope project --host-ide <vscode|cursor|trae|trae-cn>",
5460
+ preferredInstall: "npx @inspecto-dev/cli integrations install claude-code --scope project --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
5368
5461
  cliSupported: true
5369
5462
  },
5370
5463
  {
5371
5464
  assistant: "copilot",
5372
5465
  type: "native-skill",
5373
5466
  installTarget: ".github/skills/inspecto-onboarding/",
5374
- preferredInstall: "npx @inspecto-dev/cli integrations install copilot --host-ide <vscode|cursor|trae|trae-cn>",
5467
+ preferredInstall: "npx @inspecto-dev/cli integrations install copilot --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
5375
5468
  cliSupported: true
5376
5469
  },
5377
5470
  {
5378
5471
  assistant: "cursor",
5379
5472
  type: "native-skill",
5380
5473
  installTarget: ".cursor/skills/inspecto-onboarding/",
5381
- preferredInstall: "npx @inspecto-dev/cli integrations install cursor --host-ide <vscode|cursor|trae|trae-cn>",
5474
+ preferredInstall: "npx @inspecto-dev/cli integrations install cursor --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
5382
5475
  cliSupported: true
5383
5476
  },
5384
5477
  {
5385
5478
  assistant: "gemini",
5386
5479
  type: "native-skill",
5387
5480
  installTarget: ".gemini/skills/inspecto-onboarding/",
5388
- preferredInstall: "npx @inspecto-dev/cli integrations install gemini --host-ide <vscode|cursor|trae|trae-cn>",
5481
+ preferredInstall: "npx @inspecto-dev/cli integrations install gemini --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
5389
5482
  cliSupported: true
5390
5483
  },
5391
5484
  {
5392
5485
  assistant: "trae",
5393
5486
  type: "native-skill",
5394
5487
  installTarget: ".trae/skills/inspecto-onboarding/",
5395
- preferredInstall: "npx @inspecto-dev/cli integrations install trae --host-ide <vscode|cursor|trae|trae-cn>",
5488
+ preferredInstall: "npx @inspecto-dev/cli integrations install trae --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
5396
5489
  cliSupported: true
5397
5490
  },
5398
5491
  {
5399
5492
  assistant: "coco",
5400
5493
  type: "native-skill",
5401
5494
  installTarget: ".trae/skills/inspecto-onboarding/",
5402
- preferredInstall: "npx @inspecto-dev/cli integrations install coco --host-ide <vscode|cursor|trae|trae-cn>",
5495
+ preferredInstall: "npx @inspecto-dev/cli integrations install coco --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
5496
+ cliSupported: true
5497
+ },
5498
+ {
5499
+ assistant: "codebuddy",
5500
+ type: "native-skill",
5501
+ installTarget: ".codebuddy/skills/inspecto-onboarding/",
5502
+ preferredInstall: "npx @inspecto-dev/cli integrations install codebuddy --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
5403
5503
  cliSupported: true
5404
5504
  }
5405
5505
  ];
@@ -5476,7 +5576,7 @@ ${content}`;
5476
5576
  }
5477
5577
  if (shouldSkipAutomationForInstall(options)) {
5478
5578
  const message2 = `Installed ${getAssistantLabel2(assistant)} integration assets. User-level installs only write integration assets and do not launch onboarding automatically.`;
5479
- const nextStep = options.ide ? `Run the install command again from your target project root with --host-ide ${options.ide} when you want to launch onboarding automatically.` : "Run the install command again from your target project root with --host-ide <vscode|cursor|trae|trae-cn> when you want to launch onboarding automatically.";
5579
+ const nextStep = options.ide ? `Run the install command again from your target project root with --host-ide ${options.ide} when you want to launch onboarding automatically.` : "Run the install command again from your target project root with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> when you want to launch onboarding automatically.";
5480
5580
  const result2 = {
5481
5581
  status: "partial",
5482
5582
  assistant,
@@ -5676,6 +5776,24 @@ function resolveInstallPlan(assistant, options) {
5676
5776
  successMessage: "Installed Coco skill to .trae/skills/inspecto-onboarding/SKILL.md",
5677
5777
  nextStep: "Start a new Coco session."
5678
5778
  };
5779
+ case "codebuddy":
5780
+ return {
5781
+ assets: [
5782
+ {
5783
+ source: `${REPO_RAW_BASE}/skills/inspecto-onboarding-codebuddy/SKILL.md`,
5784
+ target: ".codebuddy/skills/inspecto-onboarding/SKILL.md",
5785
+ localSource: "skills/inspecto-onboarding-codebuddy/SKILL.md"
5786
+ },
5787
+ {
5788
+ source: `${REPO_RAW_BASE}/skills/inspecto-onboarding-codebuddy/scripts/run-inspecto.sh`,
5789
+ target: ".codebuddy/skills/inspecto-onboarding/scripts/run-inspecto.sh",
5790
+ localSource: "skills/inspecto-onboarding-codebuddy/scripts/run-inspecto.sh",
5791
+ executable: true
5792
+ }
5793
+ ],
5794
+ successMessage: "Installed CodeBuddy skill to .codebuddy/skills/inspecto-onboarding/SKILL.md",
5795
+ nextStep: "Open a new CodeBuddy chat and verify the inspecto-onboarding skill is available."
5796
+ };
5679
5797
  default:
5680
5798
  throw new Error(`Unknown assistant: ${assistant}`);
5681
5799
  }
@@ -5700,6 +5818,7 @@ function getAssistantLabel2(assistant) {
5700
5818
  if (assistant === "gemini") return "Gemini";
5701
5819
  if (assistant === "trae") return "Trae";
5702
5820
  if (assistant === "coco") return "Coco";
5821
+ if (assistant === "codebuddy") return "CodeBuddy";
5703
5822
  return assistant;
5704
5823
  }
5705
5824
  function formatHostIdeLabel(ide) {
@@ -5707,6 +5826,8 @@ function formatHostIdeLabel(ide) {
5707
5826
  if (ide === "cursor") return "Cursor";
5708
5827
  if (ide === "trae") return "Trae";
5709
5828
  if (ide === "trae-cn") return "Trae CN";
5829
+ if (ide === "codebuddy") return "CodeBuddy";
5830
+ if (ide === "codebuddy-cn") return "CodeBuddy CN";
5710
5831
  return ide;
5711
5832
  }
5712
5833
  function resolveCodexPlan(options) {
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  reportCommandError,
14
14
  teardown,
15
15
  writeCommandOutput
16
- } from "./chunk-7ABJRH3F.js";
16
+ } from "./chunk-LLQA5L7E.js";
17
17
  export {
18
18
  apply,
19
19
  collectDoctorResult,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inspecto-dev/cli",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "CLI tools for Inspecto onboarding and lifecycle management",
5
5
  "keywords": [
6
6
  "inspecto",
@@ -20,7 +20,7 @@
20
20
  "ora": "^9.3.0",
21
21
  "picocolors": "^1.0.0",
22
22
  "prompts": "^2.4.2",
23
- "@inspecto-dev/types": "0.3.6"
23
+ "@inspecto-dev/types": "0.3.7"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^20.19.39",
@@ -19,6 +19,11 @@ const ONBOARDING_PROMPT = 'Set up Inspecto in this project'
19
19
  const TOTAL_STEPS = 6
20
20
  const EXTENSION_ID = 'inspecto.inspecto'
21
21
 
22
+ // Maps CLI IDE identifiers to their actual URI scheme
23
+ const IDE_TO_URI_SCHEME: Record<string, string> = {
24
+ 'codebuddy-cn': 'codebuddycn',
25
+ }
26
+
22
27
  interface IntegrationAutomationOptions {
23
28
  ide?: string
24
29
  inspectoVsix?: string
@@ -122,14 +127,14 @@ export async function runIntegrationAutomation(
122
127
  }
123
128
  if (!silent) {
124
129
  log.hint(
125
- 'Re-run with --host-ide <vscode|cursor|trae|trae-cn> or run the command from the target IDE terminal to continue automatic setup.',
130
+ 'Re-run with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> or run the command from the target IDE terminal to continue automatic setup.',
126
131
  )
127
132
  }
128
133
  return {
129
134
  status: 'blocked',
130
135
  message: getHostIdeBlockedMessage(),
131
136
  nextStep:
132
- 'Re-run with --host-ide <vscode|cursor|trae|trae-cn> or run the command from the target IDE terminal to continue automatic setup.',
137
+ 'Re-run with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> or run the command from the target IDE terminal to continue automatic setup.',
133
138
  details,
134
139
  }
135
140
  }
@@ -151,7 +156,8 @@ export async function runIntegrationAutomation(
151
156
  previewParams.set('overrides', JSON.stringify({ type: dispatchMode.mode }))
152
157
  }
153
158
 
154
- const launchUri = `${resolvedHostIde.ide}://inspecto.inspecto/send?${previewParams.toString()}`
159
+ const uriScheme = resolvedHostIde.ide ? (IDE_TO_URI_SCHEME[resolvedHostIde.ide] ?? resolvedHostIde.ide) : 'vscode'
160
+ const launchUri = `${uriScheme}://inspecto.inspecto/send?${previewParams.toString()}`
155
161
  details.inspectoExtension = {
156
162
  source: options.inspectoVsix ? 'local_vsix' : 'marketplace',
157
163
  reference: options.inspectoVsix ?? EXTENSION_ID,
@@ -121,6 +121,12 @@ function detectEnvHostIdes(): SupportedHostIde[] {
121
121
  }
122
122
 
123
123
  if (
124
+ process.env.__CFBundleIdentifier === 'com.byteocean.trae.cn' ||
125
+ process.env.COCO_IDE_PLUGIN_TYPE === 'TraeCN' ||
126
+ (process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('trae-cn'))
127
+ ) {
128
+ detected.add('trae-cn')
129
+ } else if (
124
130
  process.env.TRAE_APP_DIR ||
125
131
  process.env.__CFBundleIdentifier === 'com.byteocean.trae' ||
126
132
  process.env.COCO_IDE_PLUGIN_TYPE === 'Trae' ||
@@ -130,11 +136,17 @@ function detectEnvHostIdes(): SupportedHostIde[] {
130
136
  }
131
137
 
132
138
  if (
133
- process.env.__CFBundleIdentifier === 'com.byteocean.trae.cn' ||
134
- process.env.COCO_IDE_PLUGIN_TYPE === 'TraeCN' ||
135
- (process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('trae-cn'))
139
+ process.env.__CFBundleIdentifier === 'ai.codebuddy.mac.cn' ||
140
+ process.env.COCO_IDE_PLUGIN_TYPE === 'CodeBuddyCN' ||
141
+ (process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('codebuddy-cn'))
136
142
  ) {
137
- detected.add('trae-cn')
143
+ detected.add('codebuddy-cn')
144
+ } else if (
145
+ process.env.__CFBundleIdentifier === 'ai.codebuddy.mac' ||
146
+ process.env.COCO_IDE_PLUGIN_TYPE === 'CodeBuddy' ||
147
+ (process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('codebuddy'))
148
+ ) {
149
+ detected.add('codebuddy')
138
150
  }
139
151
 
140
152
  if (detected.size === 0 && process.env.TERM_PROGRAM === 'vscode') {
@@ -145,7 +157,7 @@ function detectEnvHostIdes(): SupportedHostIde[] {
145
157
  }
146
158
 
147
159
  async function detectArtifactHostIdes(cwd: string): Promise<SupportedHostIde[]> {
148
- const artifactOrder: SupportedHostIde[] = ['cursor', 'trae', 'trae-cn', 'vscode']
160
+ const artifactOrder: SupportedHostIde[] = ['cursor', 'trae', 'trae-cn', 'codebuddy', 'codebuddy-cn', 'vscode']
149
161
  const candidates = artifactOrder.map(ide => ({
150
162
  ide,
151
163
  target: getHostIdeArtifactPath(ide, cwd),
@@ -19,7 +19,7 @@ import {
19
19
  const REPO_RAW_BASE = 'https://raw.githubusercontent.com/inspecto-dev/inspecto/main'
20
20
  const TOTAL_STEPS = 6
21
21
 
22
- type AssistantId = 'codex' | 'claude-code' | 'copilot' | 'cursor' | 'gemini' | 'trae' | 'coco'
22
+ type AssistantId = 'codex' | 'claude-code' | 'copilot' | 'cursor' | 'gemini' | 'trae' | 'coco' | 'codebuddy'
23
23
  type ClaudeScope = 'project' | 'user'
24
24
  type CopilotMode = 'skills' | 'instructions' | 'agents'
25
25
  type CursorMode = 'skills' | 'rules' | 'agents'
@@ -86,7 +86,7 @@ const INTEGRATION_MANIFESTS: IntegrationManifest[] = [
86
86
  type: 'native-skill',
87
87
  installTarget: '.agents/skills/',
88
88
  preferredInstall:
89
- 'npx @inspecto-dev/cli integrations install codex --host-ide <vscode|cursor|trae|trae-cn>',
89
+ 'npx @inspecto-dev/cli integrations install codex --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
90
90
  cliSupported: true,
91
91
  },
92
92
  {
@@ -94,7 +94,7 @@ const INTEGRATION_MANIFESTS: IntegrationManifest[] = [
94
94
  type: 'native-skill',
95
95
  installTarget: '.claude/skills/ or ~/.claude/skills/',
96
96
  preferredInstall:
97
- 'npx @inspecto-dev/cli integrations install claude-code --scope project --host-ide <vscode|cursor|trae|trae-cn>',
97
+ 'npx @inspecto-dev/cli integrations install claude-code --scope project --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
98
98
  cliSupported: true,
99
99
  },
100
100
  {
@@ -102,7 +102,7 @@ const INTEGRATION_MANIFESTS: IntegrationManifest[] = [
102
102
  type: 'native-skill',
103
103
  installTarget: '.github/skills/inspecto-onboarding/',
104
104
  preferredInstall:
105
- 'npx @inspecto-dev/cli integrations install copilot --host-ide <vscode|cursor|trae|trae-cn>',
105
+ 'npx @inspecto-dev/cli integrations install copilot --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
106
106
  cliSupported: true,
107
107
  },
108
108
  {
@@ -110,7 +110,7 @@ const INTEGRATION_MANIFESTS: IntegrationManifest[] = [
110
110
  type: 'native-skill',
111
111
  installTarget: '.cursor/skills/inspecto-onboarding/',
112
112
  preferredInstall:
113
- 'npx @inspecto-dev/cli integrations install cursor --host-ide <vscode|cursor|trae|trae-cn>',
113
+ 'npx @inspecto-dev/cli integrations install cursor --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
114
114
  cliSupported: true,
115
115
  },
116
116
  {
@@ -118,7 +118,7 @@ const INTEGRATION_MANIFESTS: IntegrationManifest[] = [
118
118
  type: 'native-skill',
119
119
  installTarget: '.gemini/skills/inspecto-onboarding/',
120
120
  preferredInstall:
121
- 'npx @inspecto-dev/cli integrations install gemini --host-ide <vscode|cursor|trae|trae-cn>',
121
+ 'npx @inspecto-dev/cli integrations install gemini --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
122
122
  cliSupported: true,
123
123
  },
124
124
  {
@@ -126,7 +126,7 @@ const INTEGRATION_MANIFESTS: IntegrationManifest[] = [
126
126
  type: 'native-skill',
127
127
  installTarget: '.trae/skills/inspecto-onboarding/',
128
128
  preferredInstall:
129
- 'npx @inspecto-dev/cli integrations install trae --host-ide <vscode|cursor|trae|trae-cn>',
129
+ 'npx @inspecto-dev/cli integrations install trae --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
130
130
  cliSupported: true,
131
131
  },
132
132
  {
@@ -134,7 +134,15 @@ const INTEGRATION_MANIFESTS: IntegrationManifest[] = [
134
134
  type: 'native-skill',
135
135
  installTarget: '.trae/skills/inspecto-onboarding/',
136
136
  preferredInstall:
137
- 'npx @inspecto-dev/cli integrations install coco --host-ide <vscode|cursor|trae|trae-cn>',
137
+ 'npx @inspecto-dev/cli integrations install coco --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
138
+ cliSupported: true,
139
+ },
140
+ {
141
+ assistant: 'codebuddy',
142
+ type: 'native-skill',
143
+ installTarget: '.codebuddy/skills/inspecto-onboarding/',
144
+ preferredInstall:
145
+ 'npx @inspecto-dev/cli integrations install codebuddy --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
138
146
  cliSupported: true,
139
147
  },
140
148
  ]
@@ -235,7 +243,7 @@ export async function installIntegration(
235
243
  const message = `Installed ${getAssistantLabel(assistant)} integration assets. User-level installs only write integration assets and do not launch onboarding automatically.`
236
244
  const nextStep = options.ide
237
245
  ? `Run the install command again from your target project root with --host-ide ${options.ide} when you want to launch onboarding automatically.`
238
- : 'Run the install command again from your target project root with --host-ide <vscode|cursor|trae|trae-cn> when you want to launch onboarding automatically.'
246
+ : 'Run the install command again from your target project root with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> when you want to launch onboarding automatically.'
239
247
  const result: IntegrationInstallResult = {
240
248
  status: 'partial',
241
249
  assistant,
@@ -486,6 +494,24 @@ function resolveInstallPlan(assistant: string, options: InstallIntegrationOption
486
494
  successMessage: 'Installed Coco skill to .trae/skills/inspecto-onboarding/SKILL.md',
487
495
  nextStep: 'Start a new Coco session.',
488
496
  }
497
+ case 'codebuddy':
498
+ return {
499
+ assets: [
500
+ {
501
+ source: `${REPO_RAW_BASE}/skills/inspecto-onboarding-codebuddy/SKILL.md`,
502
+ target: '.codebuddy/skills/inspecto-onboarding/SKILL.md',
503
+ localSource: 'skills/inspecto-onboarding-codebuddy/SKILL.md',
504
+ },
505
+ {
506
+ source: `${REPO_RAW_BASE}/skills/inspecto-onboarding-codebuddy/scripts/run-inspecto.sh`,
507
+ target: '.codebuddy/skills/inspecto-onboarding/scripts/run-inspecto.sh',
508
+ localSource: 'skills/inspecto-onboarding-codebuddy/scripts/run-inspecto.sh',
509
+ executable: true,
510
+ },
511
+ ],
512
+ successMessage: 'Installed CodeBuddy skill to .codebuddy/skills/inspecto-onboarding/SKILL.md',
513
+ nextStep: 'Open a new CodeBuddy chat and verify the inspecto-onboarding skill is available.',
514
+ }
489
515
  default:
490
516
  throw new Error(`Unknown assistant: ${assistant}`)
491
517
  }
@@ -515,6 +541,7 @@ function getAssistantLabel(assistant: string): string {
515
541
  if (assistant === 'gemini') return 'Gemini'
516
542
  if (assistant === 'trae') return 'Trae'
517
543
  if (assistant === 'coco') return 'Coco'
544
+ if (assistant === 'codebuddy') return 'CodeBuddy'
518
545
  return assistant
519
546
  }
520
547
 
@@ -523,6 +550,8 @@ function formatHostIdeLabel(ide: string): string {
523
550
  if (ide === 'cursor') return 'Cursor'
524
551
  if (ide === 'trae') return 'Trae'
525
552
  if (ide === 'trae-cn') return 'Trae CN'
553
+ if (ide === 'codebuddy') return 'CodeBuddy'
554
+ if (ide === 'codebuddy-cn') return 'CodeBuddy CN'
526
555
  return ide
527
556
  }
528
557
 
package/src/detect/ide.ts CHANGED
@@ -31,8 +31,14 @@ export async function detectIDE(root: string): Promise<IDEProbeResult> {
31
31
  detected.set('Cursor', { ide: 'cursor', supported: true })
32
32
  }
33
33
 
34
- // Trae
34
+ // Trae CN
35
35
  if (
36
+ process.env.__CFBundleIdentifier === 'com.byteocean.trae.cn' ||
37
+ process.env.COCO_IDE_PLUGIN_TYPE === 'TraeCN' ||
38
+ (process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('trae-cn'))
39
+ ) {
40
+ detected.set('Trae CN', { ide: 'trae-cn', supported: true })
41
+ } else if (
36
42
  process.env.TRAE_APP_DIR ||
37
43
  process.env.__CFBundleIdentifier === 'com.byteocean.trae' ||
38
44
  process.env.COCO_IDE_PLUGIN_TYPE === 'Trae' ||
@@ -41,6 +47,21 @@ export async function detectIDE(root: string): Promise<IDEProbeResult> {
41
47
  detected.set('Trae', { ide: 'trae', supported: true })
42
48
  }
43
49
 
50
+ // CodeBuddy CN
51
+ if (
52
+ process.env.__CFBundleIdentifier === 'ai.codebuddy.mac.cn' ||
53
+ process.env.COCO_IDE_PLUGIN_TYPE === 'CodeBuddyCN' ||
54
+ (process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('codebuddy-cn'))
55
+ ) {
56
+ detected.set('CodeBuddy CN', { ide: 'codebuddy-cn', supported: true })
57
+ } else if (
58
+ process.env.__CFBundleIdentifier === 'ai.codebuddy.mac' ||
59
+ process.env.COCO_IDE_PLUGIN_TYPE === 'CodeBuddy' ||
60
+ (process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('codebuddy'))
61
+ ) {
62
+ detected.set('CodeBuddy', { ide: 'codebuddy', supported: true })
63
+ }
64
+
44
65
  // Zed
45
66
  if (process.env.ZED_TERM) {
46
67
  detected.set('Zed', { ide: 'Zed', supported: false })
@@ -62,11 +83,14 @@ export async function detectIDE(root: string): Promise<IDEProbeResult> {
62
83
  // if (process.env.TERM_PROGRAM === 'vscode') { ... }
63
84
 
64
85
  // 2. Check Directory Artifacts (Indicates project has been opened in these IDEs)
65
- const [hasTrae, hasCursor, hasVscode, hasIdea] = await Promise.all([
86
+ const [hasTrae, hasTraeCn, hasCursor, hasVscode, hasIdea, hasCodeBuddy, hasCodeBuddyCn] = await Promise.all([
66
87
  exists(path.join(root, '.trae')),
88
+ exists(path.join(root, '.trae-cn')),
67
89
  exists(path.join(root, '.cursor')),
68
90
  exists(path.join(root, '.vscode')),
69
91
  exists(path.join(root, '.idea')),
92
+ exists(path.join(root, '.codebuddy')),
93
+ exists(path.join(root, '.codebuddy-cn')),
70
94
  ])
71
95
 
72
96
  // If a directory artifact exists, add it to the detection list.
@@ -74,6 +98,15 @@ export async function detectIDE(root: string): Promise<IDEProbeResult> {
74
98
  if (hasTrae && !detected.has('Trae')) {
75
99
  detected.set('Trae', { ide: 'trae', supported: true })
76
100
  }
101
+ if (hasTraeCn && !detected.has('Trae CN')) {
102
+ detected.set('Trae CN', { ide: 'trae-cn', supported: true })
103
+ }
104
+ if (hasCodeBuddy && !detected.has('CodeBuddy')) {
105
+ detected.set('CodeBuddy', { ide: 'codebuddy', supported: true })
106
+ }
107
+ if (hasCodeBuddyCn && !detected.has('CodeBuddy CN')) {
108
+ detected.set('CodeBuddy CN', { ide: 'codebuddy-cn', supported: true })
109
+ }
77
110
  if (hasCursor && !detected.has('Cursor')) {
78
111
  detected.set('Cursor', { ide: 'cursor', supported: true })
79
112
  }
@@ -256,6 +256,36 @@ export async function installExtension(
256
256
  }
257
257
  }
258
258
 
259
+ if (ide === 'codebuddy' && process.platform === 'darwin') {
260
+ const codebuddyPath = await findIdeBinary('codebuddy')
261
+ if (codebuddyPath) {
262
+ const result = await installAlternativeIdeExtension(
263
+ codebuddyPath,
264
+ getHostIdeLabel('codebuddy'),
265
+ extensionRef,
266
+ quiet,
267
+ )
268
+ if (result) {
269
+ return result
270
+ }
271
+ }
272
+ }
273
+
274
+ if (ide === 'codebuddy-cn' && process.platform === 'darwin') {
275
+ const codebuddyCnPath = await findIdeBinary('codebuddy-cn')
276
+ if (codebuddyCnPath) {
277
+ const result = await installAlternativeIdeExtension(
278
+ codebuddyCnPath,
279
+ getHostIdeLabel('codebuddy-cn'),
280
+ extensionRef,
281
+ quiet,
282
+ )
283
+ if (result) {
284
+ return result
285
+ }
286
+ }
287
+ }
288
+
259
289
  // Other IDEs: Prompt to install via VSIX
260
290
  if (!quiet) {
261
291
  log.warn(`Could not auto-install extension for ${ide}`)
@@ -94,6 +94,44 @@ export const HOST_IDE_CAPABILITIES: Record<SupportedHostIde, HostIdeCapability>
94
94
  ],
95
95
  },
96
96
  },
97
+ codebuddy: {
98
+ label: 'CodeBuddy',
99
+ artifactDir: '.codebuddy',
100
+ extensionDir: '.codebuddy/extensions',
101
+ binaryName: 'codebuddy',
102
+ binaryPaths: {
103
+ darwin: [
104
+ '/Applications/CodeBuddy.app/Contents/Resources/app/bin/codebuddy',
105
+ '/Applications/CodeBuddy.app/Contents/Resources/app/bin/code',
106
+ `${process.env.HOME}/Applications/CodeBuddy.app/Contents/Resources/app/bin/codebuddy`,
107
+ `${process.env.HOME}/Applications/CodeBuddy.app/Contents/Resources/app/bin/code`,
108
+ ],
109
+ linux: ['/usr/bin/codebuddy', '/opt/CodeBuddy/resources/app/bin/codebuddy'],
110
+ win32: [
111
+ `${process.env.LOCALAPPDATA}\\Programs\\CodeBuddy\\resources\\app\\bin\\codebuddy.cmd`,
112
+ `${process.env.PROGRAMFILES}\\CodeBuddy\\resources\\app\\bin\\codebuddy.cmd`,
113
+ ],
114
+ },
115
+ },
116
+ 'codebuddy-cn': {
117
+ label: 'CodeBuddy CN',
118
+ artifactDir: '.codebuddy-cn',
119
+ extensionDir: '.codebuddy-cn/extensions',
120
+ binaryName: 'codebuddy-cn',
121
+ binaryPaths: {
122
+ darwin: [
123
+ '/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/codebuddy-cn',
124
+ '/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/code',
125
+ `${process.env.HOME}/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/codebuddy-cn`,
126
+ `${process.env.HOME}/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/code`,
127
+ ],
128
+ linux: ['/usr/bin/codebuddy-cn', '/opt/CodeBuddy CN/resources/app/bin/codebuddy-cn'],
129
+ win32: [
130
+ `${process.env.LOCALAPPDATA}\\Programs\\CodeBuddy CN\\resources\\app\\bin\\codebuddy-cn.cmd`,
131
+ `${process.env.PROGRAMFILES}\\CodeBuddy CN\\resources\\app\\bin\\codebuddy-cn.cmd`,
132
+ ],
133
+ },
134
+ },
97
135
  }
98
136
 
99
137
  export { HOST_IDE_IDS, getHostIdeLabel, isSupportedHostIde }
@@ -177,6 +177,36 @@ describe('installExtension', () => {
177
177
  expect(logMock.success).toHaveBeenCalledWith('Trae CN extension already installed')
178
178
  expect(logMock.warn).not.toHaveBeenCalledWith('Could not auto-install extension for trae-cn')
179
179
  })
180
+
181
+ it('installs the CodeBuddy CN extension via the app bundle code launcher on macOS when available', async () => {
182
+ vi.spyOn(process, 'platform', 'get').mockReturnValue('darwin')
183
+ whichMock.mockResolvedValue(false)
184
+ existsMock.mockImplementation(async filePath => {
185
+ return filePath === '/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/code'
186
+ })
187
+ runMock.mockImplementation(async (_command, args: string[]) => {
188
+ if (args[0] === '--list-extensions') {
189
+ return { stdout: '', stderr: '' }
190
+ }
191
+ if (args[0] === '--install-extension') {
192
+ return { stdout: '', stderr: '' }
193
+ }
194
+ throw new Error(`unexpected args: ${args.join(' ')}`)
195
+ })
196
+
197
+ const { installExtension } = await import('../src/inject/extension.js')
198
+
199
+ await expect(installExtension(false, 'codebuddy-cn')).resolves.toMatchObject({
200
+ type: 'extension_installed',
201
+ id: 'inspecto.inspecto',
202
+ })
203
+
204
+ expect(runMock).toHaveBeenCalledWith(
205
+ '/Applications/CodeBuddy CN.app/Contents/Resources/app/bin/code',
206
+ ['--install-extension', 'inspecto.inspecto', '--force'],
207
+ )
208
+ expect(logMock.success).toHaveBeenCalledWith('CodeBuddy CN extension installed via CLI')
209
+ })
180
210
  })
181
211
 
182
212
  describe('openIdeWorkspace', () => {
@@ -202,4 +232,22 @@ describe('openIdeWorkspace', () => {
202
232
  ['--new-window', '/repo/app'],
203
233
  )
204
234
  })
235
+
236
+ it('opens CodeBuddy in a new window via the app bundle code launcher when available', async () => {
237
+ vi.spyOn(process, 'platform', 'get').mockReturnValue('darwin')
238
+ whichMock.mockResolvedValue(false)
239
+ existsMock.mockImplementation(async filePath => {
240
+ return filePath === '/Applications/CodeBuddy.app/Contents/Resources/app/bin/code'
241
+ })
242
+ runMock.mockResolvedValue({ stdout: '', stderr: '' })
243
+
244
+ const { openIdeWorkspace } = await import('../src/inject/extension.js')
245
+
246
+ await expect(openIdeWorkspace('codebuddy', '/repo/app')).resolves.toBe(true)
247
+
248
+ expect(runMock).toHaveBeenCalledWith(
249
+ '/Applications/CodeBuddy.app/Contents/Resources/app/bin/code',
250
+ ['--new-window', '/repo/app'],
251
+ )
252
+ })
205
253
  })
@@ -335,7 +335,7 @@ describe('runIntegrationAutomation', () => {
335
335
  'Step 2/6: Could not confidently resolve the host IDE',
336
336
  )
337
337
  expect(logMock.hint).toHaveBeenCalledWith(
338
- 'Re-run with --host-ide <vscode|cursor|trae|trae-cn> or run the command from the target IDE terminal to continue automatic setup.',
338
+ 'Re-run with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> or run the command from the target IDE terminal to continue automatic setup.',
339
339
  )
340
340
  })
341
341
 
@@ -57,6 +57,21 @@ describe('resolveIntegrationHostIde', () => {
57
57
  })
58
58
  })
59
59
 
60
+ it('accepts codebuddy as an explicit ide argument', async () => {
61
+ const { resolveIntegrationHostIde } = await import('../src/commands/integration-host-ide.js')
62
+
63
+ await expect(
64
+ resolveIntegrationHostIde({
65
+ explicitIde: 'codebuddy',
66
+ cwd: '/repo',
67
+ }),
68
+ ).resolves.toMatchObject({
69
+ ide: 'codebuddy',
70
+ confidence: 'high',
71
+ source: 'explicit',
72
+ })
73
+ })
74
+
60
75
  it('uses .inspecto settings ide when present', async () => {
61
76
  vi.mocked(fsUtils.readJSON).mockImplementation(async filePath => {
62
77
  if (filePath === '/repo/.inspecto/settings.local.json') {
@@ -99,6 +114,27 @@ describe('resolveIntegrationHostIde', () => {
99
114
  })
100
115
  })
101
116
 
117
+ it('uses codebuddy-cn from .inspecto settings when present', async () => {
118
+ vi.mocked(fsUtils.readJSON).mockImplementation(async filePath => {
119
+ if (filePath === '/repo/.inspecto/settings.local.json') {
120
+ return { ide: 'codebuddy-cn' }
121
+ }
122
+ return null
123
+ })
124
+
125
+ const { resolveIntegrationHostIde } = await import('../src/commands/integration-host-ide.js')
126
+
127
+ await expect(
128
+ resolveIntegrationHostIde({
129
+ cwd: '/repo',
130
+ }),
131
+ ).resolves.toMatchObject({
132
+ ide: 'codebuddy-cn',
133
+ confidence: 'high',
134
+ source: 'config',
135
+ })
136
+ })
137
+
102
138
  it('treats a single env-detected ide as high confidence', async () => {
103
139
  process.env.CURSOR_CHANNEL = 'stable'
104
140
 
@@ -151,6 +187,24 @@ describe('resolveIntegrationHostIde', () => {
151
187
  })
152
188
  })
153
189
 
190
+ it('treats a .codebuddy-cn project artifact as medium confidence', async () => {
191
+ vi.mocked(fsUtils.exists).mockImplementation(async filePath => {
192
+ return filePath === '/repo/.codebuddy-cn'
193
+ })
194
+
195
+ const { resolveIntegrationHostIde } = await import('../src/commands/integration-host-ide.js')
196
+
197
+ await expect(
198
+ resolveIntegrationHostIde({
199
+ cwd: '/repo',
200
+ }),
201
+ ).resolves.toMatchObject({
202
+ ide: 'codebuddy-cn',
203
+ confidence: 'medium',
204
+ source: 'artifact',
205
+ })
206
+ })
207
+
154
208
  it('refuses to resolve an ide when project artifacts are ambiguous', async () => {
155
209
  vi.mocked(fsUtils.exists).mockImplementation(async filePath => {
156
210
  return filePath === '/repo/.cursor' || filePath === '/repo/.vscode'
@@ -139,7 +139,7 @@ describe('integration install', () => {
139
139
  'Installed Codex integration assets. User-level installs only write integration assets and do not launch onboarding automatically.',
140
140
  )
141
141
  expect(logMock.hint).toHaveBeenCalledWith(
142
- 'Run the install command again from your target project root with --host-ide <vscode|cursor|trae|trae-cn> when you want to launch onboarding automatically.',
142
+ 'Run the install command again from your target project root with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> when you want to launch onboarding automatically.',
143
143
  )
144
144
  })
145
145
 
@@ -285,7 +285,7 @@ describe('integration install', () => {
285
285
  message:
286
286
  'Automatic setup stopped: Inspecto could not determine which IDE should receive onboarding.',
287
287
  nextStep:
288
- 'Re-run with --host-ide <vscode|cursor|trae|trae-cn> or run the command from the target IDE terminal to continue automatic setup.',
288
+ 'Re-run with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> or run the command from the target IDE terminal to continue automatic setup.',
289
289
  })
290
290
  resolveIntegrationHostIdeMock.mockResolvedValue({
291
291
  ide: null,
@@ -309,7 +309,7 @@ describe('integration install', () => {
309
309
  'Automatic setup stopped: Inspecto could not determine which IDE should receive onboarding.',
310
310
  )
311
311
  expect(logMock.hint).toHaveBeenCalledWith(
312
- 'Re-run with --host-ide <vscode|cursor|trae|trae-cn> or run the command from the target IDE terminal to continue automatic setup.',
312
+ 'Re-run with --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn> or run the command from the target IDE terminal to continue automatic setup.',
313
313
  )
314
314
  })
315
315
 
@@ -527,7 +527,7 @@ describe('integration install', () => {
527
527
  '/Users/tester/.claude/skills/inspecto-onboarding-claude-code/scripts/run-inspecto.sh',
528
528
  ],
529
529
  preferredInstall:
530
- 'npx @inspecto-dev/cli integrations install claude-code --scope project --host-ide <vscode|cursor|trae|trae-cn>',
530
+ 'npx @inspecto-dev/cli integrations install claude-code --scope project --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
531
531
  })
532
532
  })
533
533
 
@@ -542,7 +542,7 @@ describe('integration install', () => {
542
542
  '/Users/tester/.agents/skills/inspecto-onboarding-codex/scripts/run-inspecto.sh',
543
543
  ],
544
544
  preferredInstall:
545
- 'npx @inspecto-dev/cli integrations install codex --host-ide <vscode|cursor|trae|trae-cn>',
545
+ 'npx @inspecto-dev/cli integrations install codex --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
546
546
  })
547
547
  })
548
548
 
@@ -556,7 +556,7 @@ describe('integration install', () => {
556
556
  '.trae/skills/inspecto-onboarding/scripts/run-inspecto.sh',
557
557
  ],
558
558
  preferredInstall:
559
- 'npx @inspecto-dev/cli integrations install coco --host-ide <vscode|cursor|trae|trae-cn>',
559
+ 'npx @inspecto-dev/cli integrations install coco --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
560
560
  })
561
561
  })
562
562
 
@@ -569,7 +569,7 @@ describe('integration install', () => {
569
569
  '/Users/tester/.claude/skills/inspecto-onboarding-claude-code/SKILL.md',
570
570
  )
571
571
  expect(logMock.hint).toHaveBeenCalledWith(
572
- 'Preferred install: npx @inspecto-dev/cli integrations install claude-code --scope project --host-ide <vscode|cursor|trae|trae-cn>',
572
+ 'Preferred install: npx @inspecto-dev/cli integrations install claude-code --scope project --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>',
573
573
  )
574
574
  expect(logMock.hint).not.toHaveBeenCalledWith('Restart Claude Code to load the new skill.')
575
575
  })
@@ -11,6 +11,8 @@ describe('shared capabilities', () => {
11
11
  expect(getHostIdeLabel('cursor')).toBe('Cursor')
12
12
  expect(getHostIdeLabel('trae')).toBe('Trae')
13
13
  expect(getHostIdeLabel('trae-cn')).toBe('Trae CN')
14
+ expect(getHostIdeLabel('codebuddy')).toBe('CodeBuddy')
15
+ expect(getHostIdeLabel('codebuddy-cn')).toBe('CodeBuddy CN')
14
16
  })
15
17
 
16
18
  it('exposes supported host IDE guards', () => {
@@ -18,6 +20,8 @@ describe('shared capabilities', () => {
18
20
  expect(isSupportedHostIde('cursor')).toBe(true)
19
21
  expect(isSupportedHostIde('trae')).toBe(true)
20
22
  expect(isSupportedHostIde('trae-cn')).toBe(true)
23
+ expect(isSupportedHostIde('codebuddy')).toBe(true)
24
+ expect(isSupportedHostIde('codebuddy-cn')).toBe(true)
21
25
  expect(isSupportedHostIde('unknown')).toBe(false)
22
26
  })
23
27