@inspecto-dev/cli 0.3.6 → 0.3.8
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/.turbo/turbo-build.log +5 -5
- package/.turbo/turbo-test.log +6777 -205
- package/CHANGELOG.md +16 -0
- package/README.md +4 -2
- package/dist/bin.js +1 -1
- package/dist/{chunk-7ABJRH3F.js → chunk-B5JDHSP7.js} +166 -35
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/commands/integration-automation.ts +12 -4
- package/src/commands/integration-host-ide.ts +25 -6
- package/src/commands/integration-install.ts +48 -9
- package/src/detect/framework.ts +9 -6
- package/src/detect/ide.ts +42 -7
- package/src/detect/provider.ts +1 -1
- package/src/inject/extension.ts +30 -0
- package/src/inject/strategies/esbuild.ts +2 -2
- package/src/inject/strategies/rollup.ts +2 -2
- package/src/inject/strategies/rsbuild.ts +2 -2
- package/src/inject/strategies/rspack.ts +2 -2
- package/src/inject/strategies/vite.ts +2 -2
- package/src/inject/strategies/webpack.ts +2 -2
- package/src/integrations/capabilities.ts +38 -0
- package/tests/detect.test.ts +2 -2
- package/tests/extension-installer.test.ts +48 -0
- package/tests/framework.test.ts +27 -3
- package/tests/integration-automation.test.ts +1 -1
- package/tests/integration-host-ide.test.ts +54 -0
- package/tests/integration-install.test.ts +7 -7
- package/tests/plan.test.ts +16 -16
- package/tests/shared-capabilities.test.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @inspecto-dev/cli
|
|
2
2
|
|
|
3
|
+
## 0.3.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- release 0.3.8
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @inspecto-dev/types@0.3.8
|
|
10
|
+
|
|
11
|
+
## 0.3.7
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- release 0.3.7
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @inspecto-dev/types@0.3.7
|
|
18
|
+
|
|
3
19
|
## 0.3.6
|
|
4
20
|
|
|
5
21
|
### 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 `
|
|
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
|
@@ -202,14 +202,14 @@ var ViteStrategy = class {
|
|
|
202
202
|
supports(tool) {
|
|
203
203
|
return tool === "vite";
|
|
204
204
|
}
|
|
205
|
-
inject({ mod, detection }) {
|
|
205
|
+
inject({ mod, detection: _detection }) {
|
|
206
206
|
addVitePlugin(mod, {
|
|
207
207
|
from: "@inspecto-dev/plugin",
|
|
208
208
|
constructor: "inspecto",
|
|
209
209
|
imported: "vitePlugin"
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
|
-
getManualInstructions(
|
|
212
|
+
getManualInstructions(_detection, _reason) {
|
|
213
213
|
return [
|
|
214
214
|
`import { vitePlugin as inspecto } from '@inspecto-dev/plugin'`,
|
|
215
215
|
"",
|
|
@@ -228,10 +228,10 @@ var WebpackStrategy = class {
|
|
|
228
228
|
supports(tool) {
|
|
229
229
|
return tool === "webpack";
|
|
230
230
|
}
|
|
231
|
-
inject(
|
|
231
|
+
inject(_options) {
|
|
232
232
|
throw new Error("Webpack requires manual plugin configuration");
|
|
233
233
|
}
|
|
234
|
-
getManualInstructions(detection,
|
|
234
|
+
getManualInstructions(detection, _reason) {
|
|
235
235
|
const importPkg = detection.isLegacyWebpack ? "@inspecto-dev/plugin/legacy/webpack4" : "@inspecto-dev/plugin";
|
|
236
236
|
const pluginName = detection.isLegacyWebpack ? "webpack4Plugin" : "webpackPlugin";
|
|
237
237
|
const pluginCall = detection.isLegacyWebpack ? `process.env.NODE_ENV !== 'production' && inspecto({
|
|
@@ -256,10 +256,10 @@ var RspackStrategy = class {
|
|
|
256
256
|
supports(tool) {
|
|
257
257
|
return tool === "rspack";
|
|
258
258
|
}
|
|
259
|
-
inject(
|
|
259
|
+
inject(_options) {
|
|
260
260
|
throw new Error("Rspack requires manual plugin configuration");
|
|
261
261
|
}
|
|
262
|
-
getManualInstructions(detection,
|
|
262
|
+
getManualInstructions(detection, _reason) {
|
|
263
263
|
const importPkg = detection.isLegacyRspack ? "@inspecto-dev/plugin/legacy/rspack" : "@inspecto-dev/plugin";
|
|
264
264
|
const pluginCall = detection.isLegacyRspack ? `process.env.NODE_ENV !== 'production' && inspecto({
|
|
265
265
|
pathType: 'absolute',
|
|
@@ -283,10 +283,10 @@ var RsbuildStrategy = class {
|
|
|
283
283
|
supports(tool) {
|
|
284
284
|
return tool === "rsbuild";
|
|
285
285
|
}
|
|
286
|
-
inject(
|
|
286
|
+
inject(_options) {
|
|
287
287
|
throw new Error("Rsbuild requires manual plugin configuration due to nested structure");
|
|
288
288
|
}
|
|
289
|
-
getManualInstructions(
|
|
289
|
+
getManualInstructions(_detection, _reason) {
|
|
290
290
|
return [
|
|
291
291
|
`import { rspackPlugin as inspecto } from '@inspecto-dev/plugin'`,
|
|
292
292
|
"",
|
|
@@ -308,10 +308,10 @@ var EsbuildStrategy = class {
|
|
|
308
308
|
supports(tool) {
|
|
309
309
|
return tool === "esbuild";
|
|
310
310
|
}
|
|
311
|
-
inject(
|
|
311
|
+
inject(_options) {
|
|
312
312
|
throw new Error("Esbuild requires manual plugin configuration");
|
|
313
313
|
}
|
|
314
|
-
getManualInstructions(detection,
|
|
314
|
+
getManualInstructions(detection, _reason) {
|
|
315
315
|
return [
|
|
316
316
|
`1. Update your esbuild config (${detection.configPath}):`,
|
|
317
317
|
`import { esbuildPlugin as inspecto } from '@inspecto-dev/plugin'`,
|
|
@@ -339,10 +339,10 @@ var RollupStrategy = class {
|
|
|
339
339
|
supports(tool) {
|
|
340
340
|
return tool === "rollup";
|
|
341
341
|
}
|
|
342
|
-
inject(
|
|
342
|
+
inject(_options) {
|
|
343
343
|
throw new Error("Rollup requires manual plugin configuration");
|
|
344
344
|
}
|
|
345
|
-
getManualInstructions(detection,
|
|
345
|
+
getManualInstructions(detection, _reason) {
|
|
346
346
|
return [
|
|
347
347
|
`1. Update your rollup config (${detection.configPath}):`,
|
|
348
348
|
`import { rollupPlugin as inspecto } from '@inspecto-dev/plugin'`,
|
|
@@ -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:");
|
|
@@ -1803,22 +1869,25 @@ import { createRequire as createRequire2 } from "module";
|
|
|
1803
1869
|
var META_FRAMEWORK_MAP = {
|
|
1804
1870
|
next: "react",
|
|
1805
1871
|
nuxt: "vue",
|
|
1872
|
+
"@sveltejs/kit": "svelte",
|
|
1806
1873
|
"@remix-run/react": "react",
|
|
1807
1874
|
"@remix-run/dev": "react",
|
|
1808
1875
|
"@vue/nuxt": "vue",
|
|
1809
1876
|
"vite-plugin-vue": "vue",
|
|
1810
1877
|
"@vitejs/plugin-vue": "vue",
|
|
1878
|
+
"@sveltejs/vite-plugin-svelte": "svelte",
|
|
1879
|
+
"vite-plugin-solid": "solid",
|
|
1811
1880
|
"@vitejs/plugin-react": "react",
|
|
1812
1881
|
"@vitejs/plugin-react-swc": "react"
|
|
1813
1882
|
};
|
|
1814
1883
|
var SUPPORTED_FRAMEWORKS = [
|
|
1815
1884
|
{ framework: "react", deps: ["react", "react-dom"] },
|
|
1816
|
-
{ framework: "vue", deps: ["vue"] }
|
|
1885
|
+
{ framework: "vue", deps: ["vue"] },
|
|
1886
|
+
{ framework: "svelte", deps: ["svelte"] },
|
|
1887
|
+
{ framework: "solid", deps: ["solid-js"] },
|
|
1888
|
+
{ framework: "astro", deps: ["astro"] }
|
|
1817
1889
|
];
|
|
1818
1890
|
var UNSUPPORTED_FRAMEWORKS = [
|
|
1819
|
-
{ name: "Solid", dep: "solid-js" },
|
|
1820
|
-
{ name: "Svelte", dep: "svelte" },
|
|
1821
|
-
{ name: "SvelteKit", dep: "@sveltejs/kit" },
|
|
1822
1891
|
{ name: "Angular", dep: "@angular/core" },
|
|
1823
1892
|
{ name: "Preact", dep: "preact" },
|
|
1824
1893
|
{ name: "Lit", dep: "lit" },
|
|
@@ -1882,24 +1951,43 @@ async function detectIDE(root) {
|
|
|
1882
1951
|
if (process.env.CURSOR_TRACE_DIR || process.env.CURSOR_CHANNEL) {
|
|
1883
1952
|
detected.set("Cursor", { ide: "cursor", supported: true });
|
|
1884
1953
|
}
|
|
1885
|
-
if (process.env.
|
|
1954
|
+
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")) {
|
|
1955
|
+
detected.set("Trae CN", { ide: "trae-cn", supported: true });
|
|
1956
|
+
} 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
1957
|
detected.set("Trae", { ide: "trae", supported: true });
|
|
1887
1958
|
}
|
|
1959
|
+
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")) {
|
|
1960
|
+
detected.set("CodeBuddy CN", { ide: "codebuddy-cn", supported: true });
|
|
1961
|
+
} 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")) {
|
|
1962
|
+
detected.set("CodeBuddy", { ide: "codebuddy", supported: true });
|
|
1963
|
+
}
|
|
1888
1964
|
if (process.env.ZED_TERM) {
|
|
1889
1965
|
detected.set("Zed", { ide: "Zed", supported: false });
|
|
1890
1966
|
}
|
|
1891
1967
|
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
1968
|
detected.set("Windsurf", { ide: "Windsurf", supported: false });
|
|
1893
1969
|
}
|
|
1894
|
-
const [hasTrae, hasCursor, hasVscode, hasIdea] = await Promise.all([
|
|
1970
|
+
const [hasTrae, hasTraeCn, hasCursor, hasVscode, hasIdea, hasCodeBuddy, hasCodeBuddyCn] = await Promise.all([
|
|
1895
1971
|
exists(path9.join(root, ".trae")),
|
|
1972
|
+
exists(path9.join(root, ".trae-cn")),
|
|
1896
1973
|
exists(path9.join(root, ".cursor")),
|
|
1897
1974
|
exists(path9.join(root, ".vscode")),
|
|
1898
|
-
exists(path9.join(root, ".idea"))
|
|
1975
|
+
exists(path9.join(root, ".idea")),
|
|
1976
|
+
exists(path9.join(root, ".codebuddy")),
|
|
1977
|
+
exists(path9.join(root, ".codebuddy-cn"))
|
|
1899
1978
|
]);
|
|
1900
1979
|
if (hasTrae && !detected.has("Trae")) {
|
|
1901
1980
|
detected.set("Trae", { ide: "trae", supported: true });
|
|
1902
1981
|
}
|
|
1982
|
+
if (hasTraeCn && !detected.has("Trae CN")) {
|
|
1983
|
+
detected.set("Trae CN", { ide: "trae-cn", supported: true });
|
|
1984
|
+
}
|
|
1985
|
+
if (hasCodeBuddy && !detected.has("CodeBuddy")) {
|
|
1986
|
+
detected.set("CodeBuddy", { ide: "codebuddy", supported: true });
|
|
1987
|
+
}
|
|
1988
|
+
if (hasCodeBuddyCn && !detected.has("CodeBuddy CN")) {
|
|
1989
|
+
detected.set("CodeBuddy CN", { ide: "codebuddy-cn", supported: true });
|
|
1990
|
+
}
|
|
1903
1991
|
if (hasCursor && !detected.has("Cursor")) {
|
|
1904
1992
|
detected.set("Cursor", { ide: "cursor", supported: true });
|
|
1905
1993
|
}
|
|
@@ -4895,11 +4983,15 @@ function detectEnvHostIdes() {
|
|
|
4895
4983
|
if (process.env.CURSOR_TRACE_DIR || process.env.CURSOR_CHANNEL) {
|
|
4896
4984
|
detected.add("cursor");
|
|
4897
4985
|
}
|
|
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
4986
|
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
4987
|
detected.add("trae-cn");
|
|
4988
|
+
} 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")) {
|
|
4989
|
+
detected.add("trae");
|
|
4990
|
+
}
|
|
4991
|
+
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")) {
|
|
4992
|
+
detected.add("codebuddy-cn");
|
|
4993
|
+
} 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")) {
|
|
4994
|
+
detected.add("codebuddy");
|
|
4903
4995
|
}
|
|
4904
4996
|
if (detected.size === 0 && process.env.TERM_PROGRAM === "vscode") {
|
|
4905
4997
|
detected.add("vscode");
|
|
@@ -4907,7 +4999,14 @@ function detectEnvHostIdes() {
|
|
|
4907
4999
|
return Array.from(detected);
|
|
4908
5000
|
}
|
|
4909
5001
|
async function detectArtifactHostIdes(cwd) {
|
|
4910
|
-
const artifactOrder = [
|
|
5002
|
+
const artifactOrder = [
|
|
5003
|
+
"cursor",
|
|
5004
|
+
"trae",
|
|
5005
|
+
"trae-cn",
|
|
5006
|
+
"codebuddy",
|
|
5007
|
+
"codebuddy-cn",
|
|
5008
|
+
"vscode"
|
|
5009
|
+
];
|
|
4911
5010
|
const candidates = artifactOrder.map((ide) => ({
|
|
4912
5011
|
ide,
|
|
4913
5012
|
target: getHostIdeArtifactPath(ide, cwd)
|
|
@@ -4983,6 +5082,9 @@ async function isIdeExtensionInstalled(extensionId, extensionsDir) {
|
|
|
4983
5082
|
var ONBOARDING_PROMPT = "Set up Inspecto in this project";
|
|
4984
5083
|
var TOTAL_STEPS = 6;
|
|
4985
5084
|
var EXTENSION_ID2 = "inspecto.inspecto";
|
|
5085
|
+
var IDE_TO_URI_SCHEME = {
|
|
5086
|
+
"codebuddy-cn": "codebuddycn"
|
|
5087
|
+
};
|
|
4986
5088
|
function getPreviewReadyMessage() {
|
|
4987
5089
|
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
5090
|
}
|
|
@@ -5027,13 +5129,13 @@ async function runIntegrationAutomation(assistant, options = {}, cwd) {
|
|
|
5027
5129
|
}
|
|
5028
5130
|
if (!silent) {
|
|
5029
5131
|
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."
|
|
5132
|
+
"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
5133
|
);
|
|
5032
5134
|
}
|
|
5033
5135
|
return {
|
|
5034
5136
|
status: "blocked",
|
|
5035
5137
|
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.",
|
|
5138
|
+
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
5139
|
details
|
|
5038
5140
|
};
|
|
5039
5141
|
}
|
|
@@ -5051,7 +5153,8 @@ async function runIntegrationAutomation(assistant, options = {}, cwd) {
|
|
|
5051
5153
|
if (dispatchMode.mode) {
|
|
5052
5154
|
previewParams.set("overrides", JSON.stringify({ type: dispatchMode.mode }));
|
|
5053
5155
|
}
|
|
5054
|
-
const
|
|
5156
|
+
const uriScheme = resolvedHostIde.ide ? IDE_TO_URI_SCHEME[resolvedHostIde.ide] ?? resolvedHostIde.ide : "vscode";
|
|
5157
|
+
const launchUri = `${uriScheme}://inspecto.inspecto/send?${previewParams.toString()}`;
|
|
5055
5158
|
details.inspectoExtension = {
|
|
5056
5159
|
source: options.inspectoVsix ? "local_vsix" : "marketplace",
|
|
5057
5160
|
reference: options.inspectoVsix ?? EXTENSION_ID2
|
|
@@ -5295,7 +5398,7 @@ async function runIntegrationAutomation(assistant, options = {}, cwd) {
|
|
|
5295
5398
|
};
|
|
5296
5399
|
}
|
|
5297
5400
|
}
|
|
5298
|
-
function shouldAutoSend(assistant,
|
|
5401
|
+
function shouldAutoSend(assistant, _ide) {
|
|
5299
5402
|
if (assistant === "copilot") return true;
|
|
5300
5403
|
if (assistant === "codex") return true;
|
|
5301
5404
|
return false;
|
|
@@ -5357,49 +5460,56 @@ var INTEGRATION_MANIFESTS = [
|
|
|
5357
5460
|
assistant: "codex",
|
|
5358
5461
|
type: "native-skill",
|
|
5359
5462
|
installTarget: ".agents/skills/",
|
|
5360
|
-
preferredInstall: "npx @inspecto-dev/cli integrations install codex --host-ide <vscode|cursor|trae|trae-cn>",
|
|
5463
|
+
preferredInstall: "npx @inspecto-dev/cli integrations install codex --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
|
|
5361
5464
|
cliSupported: true
|
|
5362
5465
|
},
|
|
5363
5466
|
{
|
|
5364
5467
|
assistant: "claude-code",
|
|
5365
5468
|
type: "native-skill",
|
|
5366
5469
|
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>",
|
|
5470
|
+
preferredInstall: "npx @inspecto-dev/cli integrations install claude-code --scope project --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
|
|
5368
5471
|
cliSupported: true
|
|
5369
5472
|
},
|
|
5370
5473
|
{
|
|
5371
5474
|
assistant: "copilot",
|
|
5372
5475
|
type: "native-skill",
|
|
5373
5476
|
installTarget: ".github/skills/inspecto-onboarding/",
|
|
5374
|
-
preferredInstall: "npx @inspecto-dev/cli integrations install copilot --host-ide <vscode|cursor|trae|trae-cn>",
|
|
5477
|
+
preferredInstall: "npx @inspecto-dev/cli integrations install copilot --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
|
|
5375
5478
|
cliSupported: true
|
|
5376
5479
|
},
|
|
5377
5480
|
{
|
|
5378
5481
|
assistant: "cursor",
|
|
5379
5482
|
type: "native-skill",
|
|
5380
5483
|
installTarget: ".cursor/skills/inspecto-onboarding/",
|
|
5381
|
-
preferredInstall: "npx @inspecto-dev/cli integrations install cursor --host-ide <vscode|cursor|trae|trae-cn>",
|
|
5484
|
+
preferredInstall: "npx @inspecto-dev/cli integrations install cursor --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
|
|
5382
5485
|
cliSupported: true
|
|
5383
5486
|
},
|
|
5384
5487
|
{
|
|
5385
5488
|
assistant: "gemini",
|
|
5386
5489
|
type: "native-skill",
|
|
5387
5490
|
installTarget: ".gemini/skills/inspecto-onboarding/",
|
|
5388
|
-
preferredInstall: "npx @inspecto-dev/cli integrations install gemini --host-ide <vscode|cursor|trae|trae-cn>",
|
|
5491
|
+
preferredInstall: "npx @inspecto-dev/cli integrations install gemini --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
|
|
5389
5492
|
cliSupported: true
|
|
5390
5493
|
},
|
|
5391
5494
|
{
|
|
5392
5495
|
assistant: "trae",
|
|
5393
5496
|
type: "native-skill",
|
|
5394
5497
|
installTarget: ".trae/skills/inspecto-onboarding/",
|
|
5395
|
-
preferredInstall: "npx @inspecto-dev/cli integrations install trae --host-ide <vscode|cursor|trae|trae-cn>",
|
|
5498
|
+
preferredInstall: "npx @inspecto-dev/cli integrations install trae --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
|
|
5396
5499
|
cliSupported: true
|
|
5397
5500
|
},
|
|
5398
5501
|
{
|
|
5399
5502
|
assistant: "coco",
|
|
5400
5503
|
type: "native-skill",
|
|
5401
5504
|
installTarget: ".trae/skills/inspecto-onboarding/",
|
|
5402
|
-
preferredInstall: "npx @inspecto-dev/cli integrations install coco --host-ide <vscode|cursor|trae|trae-cn>",
|
|
5505
|
+
preferredInstall: "npx @inspecto-dev/cli integrations install coco --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
|
|
5506
|
+
cliSupported: true
|
|
5507
|
+
},
|
|
5508
|
+
{
|
|
5509
|
+
assistant: "codebuddy",
|
|
5510
|
+
type: "native-skill",
|
|
5511
|
+
installTarget: ".codebuddy/skills/inspecto-onboarding/",
|
|
5512
|
+
preferredInstall: "npx @inspecto-dev/cli integrations install codebuddy --host-ide <vscode|cursor|trae|trae-cn|codebuddy|codebuddy-cn>",
|
|
5403
5513
|
cliSupported: true
|
|
5404
5514
|
}
|
|
5405
5515
|
];
|
|
@@ -5476,7 +5586,7 @@ ${content}`;
|
|
|
5476
5586
|
}
|
|
5477
5587
|
if (shouldSkipAutomationForInstall(options)) {
|
|
5478
5588
|
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.";
|
|
5589
|
+
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
5590
|
const result2 = {
|
|
5481
5591
|
status: "partial",
|
|
5482
5592
|
assistant,
|
|
@@ -5676,6 +5786,24 @@ function resolveInstallPlan(assistant, options) {
|
|
|
5676
5786
|
successMessage: "Installed Coco skill to .trae/skills/inspecto-onboarding/SKILL.md",
|
|
5677
5787
|
nextStep: "Start a new Coco session."
|
|
5678
5788
|
};
|
|
5789
|
+
case "codebuddy":
|
|
5790
|
+
return {
|
|
5791
|
+
assets: [
|
|
5792
|
+
{
|
|
5793
|
+
source: `${REPO_RAW_BASE}/skills/inspecto-onboarding-codebuddy/SKILL.md`,
|
|
5794
|
+
target: ".codebuddy/skills/inspecto-onboarding/SKILL.md",
|
|
5795
|
+
localSource: "skills/inspecto-onboarding-codebuddy/SKILL.md"
|
|
5796
|
+
},
|
|
5797
|
+
{
|
|
5798
|
+
source: `${REPO_RAW_BASE}/skills/inspecto-onboarding-codebuddy/scripts/run-inspecto.sh`,
|
|
5799
|
+
target: ".codebuddy/skills/inspecto-onboarding/scripts/run-inspecto.sh",
|
|
5800
|
+
localSource: "skills/inspecto-onboarding-codebuddy/scripts/run-inspecto.sh",
|
|
5801
|
+
executable: true
|
|
5802
|
+
}
|
|
5803
|
+
],
|
|
5804
|
+
successMessage: "Installed CodeBuddy skill to .codebuddy/skills/inspecto-onboarding/SKILL.md",
|
|
5805
|
+
nextStep: "Open a new CodeBuddy chat and verify the inspecto-onboarding skill is available."
|
|
5806
|
+
};
|
|
5679
5807
|
default:
|
|
5680
5808
|
throw new Error(`Unknown assistant: ${assistant}`);
|
|
5681
5809
|
}
|
|
@@ -5700,6 +5828,7 @@ function getAssistantLabel2(assistant) {
|
|
|
5700
5828
|
if (assistant === "gemini") return "Gemini";
|
|
5701
5829
|
if (assistant === "trae") return "Trae";
|
|
5702
5830
|
if (assistant === "coco") return "Coco";
|
|
5831
|
+
if (assistant === "codebuddy") return "CodeBuddy";
|
|
5703
5832
|
return assistant;
|
|
5704
5833
|
}
|
|
5705
5834
|
function formatHostIdeLabel(ide) {
|
|
@@ -5707,6 +5836,8 @@ function formatHostIdeLabel(ide) {
|
|
|
5707
5836
|
if (ide === "cursor") return "Cursor";
|
|
5708
5837
|
if (ide === "trae") return "Trae";
|
|
5709
5838
|
if (ide === "trae-cn") return "Trae CN";
|
|
5839
|
+
if (ide === "codebuddy") return "CodeBuddy";
|
|
5840
|
+
if (ide === "codebuddy-cn") return "CodeBuddy CN";
|
|
5710
5841
|
return ide;
|
|
5711
5842
|
}
|
|
5712
5843
|
function resolveCodexPlan(options) {
|
package/dist/index.d.ts
CHANGED
|
@@ -405,6 +405,6 @@ interface ReportCommandErrorOptions {
|
|
|
405
405
|
declare function writeCommandOutput<T>(result: T, json: boolean, renderText: (value: T) => void): T;
|
|
406
406
|
declare function reportCommandError(error: unknown, options?: ReportCommandErrorOptions): void;
|
|
407
407
|
|
|
408
|
-
type Framework = 'react' | 'vue';
|
|
408
|
+
type Framework = 'react' | 'vue' | 'svelte' | 'solid' | 'astro';
|
|
409
409
|
|
|
410
410
|
export { type BuildTool, type DoctorDiagnostic, type DoctorResult, type Framework, type InitOptions, type InstallLock, type OnboardCommandResult, type OnboardStatus, type PackageManager, type ResolvedOnboardingSession, apply, collectDoctorResult, detect, devLink, devStatus, devUnlink, doctor, init, integrationDoctor, onboard, plan, reportCommandError, teardown, writeCommandOutput };
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inspecto-dev/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
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.
|
|
23
|
+
"@inspecto-dev/types": "0.3.8"
|
|
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,10 @@ export async function runIntegrationAutomation(
|
|
|
151
156
|
previewParams.set('overrides', JSON.stringify({ type: dispatchMode.mode }))
|
|
152
157
|
}
|
|
153
158
|
|
|
154
|
-
const
|
|
159
|
+
const uriScheme = resolvedHostIde.ide
|
|
160
|
+
? (IDE_TO_URI_SCHEME[resolvedHostIde.ide] ?? resolvedHostIde.ide)
|
|
161
|
+
: 'vscode'
|
|
162
|
+
const launchUri = `${uriScheme}://inspecto.inspecto/send?${previewParams.toString()}`
|
|
155
163
|
details.inspectoExtension = {
|
|
156
164
|
source: options.inspectoVsix ? 'local_vsix' : 'marketplace',
|
|
157
165
|
reference: options.inspectoVsix ?? EXTENSION_ID,
|
|
@@ -419,7 +427,7 @@ export async function runIntegrationAutomation(
|
|
|
419
427
|
}
|
|
420
428
|
}
|
|
421
429
|
|
|
422
|
-
function shouldAutoSend(assistant: string,
|
|
430
|
+
function shouldAutoSend(assistant: string, _ide: SupportedHostIde): boolean {
|
|
423
431
|
if (assistant === 'copilot') return true
|
|
424
432
|
if (assistant === 'codex') return true
|
|
425
433
|
return false
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import path from 'node:path'
|
|
2
2
|
import { exists, readJSON } from '../utils/fs.js'
|
|
3
3
|
import {
|
|
4
|
-
HOST_IDE_IDS,
|
|
5
4
|
getHostIdeArtifactPath,
|
|
6
5
|
isSupportedHostIde,
|
|
7
6
|
type SupportedHostIde,
|
|
@@ -121,6 +120,12 @@ function detectEnvHostIdes(): SupportedHostIde[] {
|
|
|
121
120
|
}
|
|
122
121
|
|
|
123
122
|
if (
|
|
123
|
+
process.env.__CFBundleIdentifier === 'com.byteocean.trae.cn' ||
|
|
124
|
+
process.env.COCO_IDE_PLUGIN_TYPE === 'TraeCN' ||
|
|
125
|
+
(process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('trae-cn'))
|
|
126
|
+
) {
|
|
127
|
+
detected.add('trae-cn')
|
|
128
|
+
} else if (
|
|
124
129
|
process.env.TRAE_APP_DIR ||
|
|
125
130
|
process.env.__CFBundleIdentifier === 'com.byteocean.trae' ||
|
|
126
131
|
process.env.COCO_IDE_PLUGIN_TYPE === 'Trae' ||
|
|
@@ -130,11 +135,18 @@ function detectEnvHostIdes(): SupportedHostIde[] {
|
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
if (
|
|
133
|
-
process.env.__CFBundleIdentifier === '
|
|
134
|
-
process.env.COCO_IDE_PLUGIN_TYPE === '
|
|
135
|
-
(process.env.npm_config_user_agent &&
|
|
138
|
+
process.env.__CFBundleIdentifier === 'ai.codebuddy.mac.cn' ||
|
|
139
|
+
process.env.COCO_IDE_PLUGIN_TYPE === 'CodeBuddyCN' ||
|
|
140
|
+
(process.env.npm_config_user_agent &&
|
|
141
|
+
process.env.npm_config_user_agent.includes('codebuddy-cn'))
|
|
136
142
|
) {
|
|
137
|
-
detected.add('
|
|
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,14 @@ function detectEnvHostIdes(): SupportedHostIde[] {
|
|
|
145
157
|
}
|
|
146
158
|
|
|
147
159
|
async function detectArtifactHostIdes(cwd: string): Promise<SupportedHostIde[]> {
|
|
148
|
-
const artifactOrder: SupportedHostIde[] = [
|
|
160
|
+
const artifactOrder: SupportedHostIde[] = [
|
|
161
|
+
'cursor',
|
|
162
|
+
'trae',
|
|
163
|
+
'trae-cn',
|
|
164
|
+
'codebuddy',
|
|
165
|
+
'codebuddy-cn',
|
|
166
|
+
'vscode',
|
|
167
|
+
]
|
|
149
168
|
const candidates = artifactOrder.map(ide => ({
|
|
150
169
|
ide,
|
|
151
170
|
target: getHostIdeArtifactPath(ide, cwd),
|