@github/copilot-language-server 1.566.0 → 1.567.0
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/dist/assets/cls-builtin-plugins/package.json +2 -2
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/.plugin/plugin.json +2 -2
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/README.md +12 -6
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/dist/browser-mcp.cjs +44 -44
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/dist/browser-run-worker.cjs +30 -30
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/dist/native-host.cjs +22 -22
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/scripts/activate.mjs +34 -10
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/scripts/browserPrerequisites.d.mts +59 -0
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/scripts/doctor.mjs +10246 -253
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/scripts/nativeMessagingRegistration.mjs +4537 -1463
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/skills/activate/SKILL.md +21 -8
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/skills/browser-use/BROWSER-RUN.md +331 -169
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/skills/browser-use/SKILL.md +116 -240
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/skills/deactivate/SKILL.md +11 -7
- package/dist/assets/cls-builtin-plugins/plugins/browser-use/skills/doctor/SKILL.md +16 -8
- package/dist/main.js +1108 -1090
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/cliVersion.js +1 -1
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/client.js +5 -1
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/session.js +10 -1
- package/dist/node_modules/@github/copilot-sdk/package.json +12 -12
- package/package.json +20 -20
|
@@ -5,25 +5,49 @@
|
|
|
5
5
|
import {
|
|
6
6
|
runActivationCli,
|
|
7
7
|
runSessionStartActivation,
|
|
8
|
+
verifyBrowserConnection,
|
|
8
9
|
waitForBrowserConnection,
|
|
9
10
|
} from "./nativeMessagingRegistration.mjs";
|
|
10
11
|
|
|
11
12
|
const args = process.argv.slice(2);
|
|
12
13
|
const sessionStart = args.length === 1 && args[0] === "--session-start";
|
|
13
14
|
if (sessionStart) {
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
15
|
+
const outcome = await runSessionStartActivation();
|
|
16
|
+
if (shouldVerifyConnection(outcome)) {
|
|
16
17
|
await waitForBrowserConnection();
|
|
17
18
|
}
|
|
18
19
|
process.exitCode = 0;
|
|
19
20
|
} else {
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
const outcome = await runActivationCli(args);
|
|
22
|
+
if (shouldVerifyConnection(outcome)) {
|
|
23
|
+
await waitForBrowserConnection();
|
|
24
|
+
try {
|
|
25
|
+
const { runDoctorCli } = await import("./doctor.mjs");
|
|
26
|
+
const report = await runDoctorCli([]);
|
|
27
|
+
const available = await verifyBrowserConnection();
|
|
28
|
+
if (available && report.status !== "fail") {
|
|
29
|
+
console.log("Browser runtime connected with a compatible RPC version.");
|
|
30
|
+
console.log("Browser activation verified. Browser is available.");
|
|
31
|
+
} else {
|
|
32
|
+
console.error(
|
|
33
|
+
"[copilot-browser] Browser verification failed. Browser registration remains installed.",
|
|
34
|
+
);
|
|
35
|
+
console.error(
|
|
36
|
+
available
|
|
37
|
+
? "Follow the diagnostics above to complete Browser setup."
|
|
38
|
+
: "No compatible Browser connection was confirmed. Follow the diagnostics above and open Chrome or Edge with the matching extension enabled.",
|
|
39
|
+
);
|
|
40
|
+
process.exitCode = 1;
|
|
41
|
+
}
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error(
|
|
44
|
+
"[copilot-browser] Browser verification could not complete. Browser registration remains installed. Reinstall the plugin and run /browser-use:doctor.",
|
|
45
|
+
);
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
28
48
|
}
|
|
29
49
|
}
|
|
50
|
+
|
|
51
|
+
function shouldVerifyConnection(outcome) {
|
|
52
|
+
return outcome && outcome.status !== "repair_required";
|
|
53
|
+
}
|
package/dist/assets/cls-builtin-plugins/plugins/browser-use/scripts/browserPrerequisites.d.mts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export type BrowserPrerequisiteStatus = "pass" | "warn" | "fail";
|
|
2
|
+
|
|
3
|
+
export interface BrowserPrerequisiteCheck {
|
|
4
|
+
id: string;
|
|
5
|
+
status: BrowserPrerequisiteStatus;
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface BrowserExtensionState {
|
|
10
|
+
state: "enabled" | "disabled" | "unknown";
|
|
11
|
+
version?: string;
|
|
12
|
+
rpcVersion?: number;
|
|
13
|
+
protocolRange?: string;
|
|
14
|
+
protocolMetadataInvalid?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface BrowserExtensionInstallUrls {
|
|
18
|
+
chromeWebStore?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function diagnoseInstalledExtensions(
|
|
22
|
+
extensionId: string,
|
|
23
|
+
extensionInstallUrls?: BrowserExtensionInstallUrls,
|
|
24
|
+
): Promise<{ checks: BrowserPrerequisiteCheck[]; states: BrowserExtensionState[] }>;
|
|
25
|
+
|
|
26
|
+
export function classifyInstalledExtensionChecks(
|
|
27
|
+
states: BrowserExtensionState[],
|
|
28
|
+
browserStatus: BrowserPrerequisiteStatus,
|
|
29
|
+
extensionInstallUrls?: BrowserExtensionInstallUrls,
|
|
30
|
+
): BrowserPrerequisiteCheck[];
|
|
31
|
+
|
|
32
|
+
export function classifyExtensionInstallations(
|
|
33
|
+
states: BrowserExtensionState[],
|
|
34
|
+
browserStatus: BrowserPrerequisiteStatus,
|
|
35
|
+
extensionInstallUrls?: BrowserExtensionInstallUrls,
|
|
36
|
+
): BrowserPrerequisiteCheck;
|
|
37
|
+
|
|
38
|
+
export function classifyExtensionVersions(
|
|
39
|
+
states: BrowserExtensionState[],
|
|
40
|
+
): BrowserPrerequisiteCheck;
|
|
41
|
+
|
|
42
|
+
export function classifyExtensionRpcVersions(
|
|
43
|
+
states: BrowserExtensionState[],
|
|
44
|
+
): BrowserPrerequisiteCheck;
|
|
45
|
+
|
|
46
|
+
export function firstIncompatibleExtensionProtocolRange(
|
|
47
|
+
states: BrowserExtensionState[],
|
|
48
|
+
pluginRange: string,
|
|
49
|
+
): string | undefined;
|
|
50
|
+
|
|
51
|
+
export function allEnabledExtensionsSupportProtocolRange(
|
|
52
|
+
states: BrowserExtensionState[],
|
|
53
|
+
pluginRange: string,
|
|
54
|
+
): boolean;
|
|
55
|
+
|
|
56
|
+
export function readExtensionStates(
|
|
57
|
+
profileRoots: string[],
|
|
58
|
+
extensionId: string,
|
|
59
|
+
): Promise<BrowserExtensionState[]>;
|