@inspecto-dev/cli 0.3.5 → 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.
- package/.turbo/turbo-build.log +4 -4
- package/.turbo/turbo-test.log +205 -11710
- package/CHANGELOG.md +14 -0
- package/README.md +4 -2
- package/dist/bin.js +1 -1
- package/dist/{chunk-7ABJRH3F.js → chunk-LLQA5L7E.js} +139 -18
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/commands/integration-automation.ts +9 -3
- package/src/commands/integration-host-ide.ts +17 -5
- package/src/commands/integration-install.ts +38 -9
- package/src/detect/ide.ts +35 -2
- package/src/inject/extension.ts +30 -0
- package/src/integrations/capabilities.ts +38 -0
- package/tests/extension-installer.test.ts +48 -0
- 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/shared-capabilities.test.ts +4 -0
package/CHANGELOG.md
CHANGED
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
|
@@ -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.
|
|
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
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inspecto-dev/cli",
|
|
3
|
-
"version": "0.3.
|
|
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.
|
|
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
|
|
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 === '
|
|
134
|
-
process.env.COCO_IDE_PLUGIN_TYPE === '
|
|
135
|
-
(process.env.npm_config_user_agent && process.env.npm_config_user_agent.includes('
|
|
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('
|
|
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
|
|