@github/copilot-language-server 1.552.0 → 1.553.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.
Files changed (74) hide show
  1. package/README.md +94 -1
  2. package/dist/main.js +1021 -1011
  3. package/dist/node_modules/@github/copilot-sdk/dist/cjs/cliVersion.js +1 -1
  4. package/dist/node_modules/@github/copilot-sdk/dist/cjs/client.js +499 -36
  5. package/dist/node_modules/@github/copilot-sdk/dist/cjs/copilotRequestHandler.js +156 -20
  6. package/dist/node_modules/@github/copilot-sdk/dist/cjs/extension.js +11 -9
  7. package/dist/node_modules/@github/copilot-sdk/dist/cjs/ffiRuntimeHost.js +14 -3
  8. package/dist/node_modules/@github/copilot-sdk/dist/cjs/generated/rpc.js +1305 -304
  9. package/dist/node_modules/@github/copilot-sdk/dist/cjs/host.js +67 -0
  10. package/dist/node_modules/@github/copilot-sdk/dist/cjs/index.js +12 -7
  11. package/dist/node_modules/@github/copilot-sdk/dist/cjs/installationConfirmation.js +98 -0
  12. package/dist/node_modules/@github/copilot-sdk/dist/cjs/runtimeArtifacts.js +1 -0
  13. package/dist/node_modules/@github/copilot-sdk/dist/cjs/schema.js +40 -0
  14. package/dist/node_modules/@github/copilot-sdk/dist/cjs/session.js +474 -151
  15. package/dist/node_modules/@github/copilot-sdk/dist/cjs/sessionFsProvider.js +57 -0
  16. package/dist/node_modules/@github/copilot-sdk/dist/cjs/types.js +5 -2
  17. package/dist/node_modules/@github/copilot-sdk/dist/cjs/{factory.js → workflow.js} +33 -33
  18. package/dist/node_modules/@github/copilot-sdk/package.json +27 -16
  19. package/dist/node_modules/zod/locales/package.json +1 -2
  20. package/dist/node_modules/zod/mini/package.json +1 -2
  21. package/dist/node_modules/zod/package.json +1 -1
  22. package/dist/node_modules/zod/v3/package.json +1 -2
  23. package/dist/node_modules/zod/v4/classic/errors.js +2 -2
  24. package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +16 -31
  25. package/dist/node_modules/zod/v4/classic/from-json-schema.js +16 -31
  26. package/dist/node_modules/zod/v4/classic/package.json +1 -2
  27. package/dist/node_modules/zod/v4/classic/schemas.cjs +119 -358
  28. package/dist/node_modules/zod/v4/classic/schemas.js +118 -356
  29. package/dist/node_modules/zod/v4/core/api.cjs +2 -7
  30. package/dist/node_modules/zod/v4/core/api.js +2 -7
  31. package/dist/node_modules/zod/v4/core/core.cjs +1 -3
  32. package/dist/node_modules/zod/v4/core/core.js +2 -4
  33. package/dist/node_modules/zod/v4/core/errors.cjs +23 -26
  34. package/dist/node_modules/zod/v4/core/errors.js +23 -26
  35. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +20 -16
  36. package/dist/node_modules/zod/v4/core/json-schema-processors.js +20 -16
  37. package/dist/node_modules/zod/v4/core/package.json +1 -2
  38. package/dist/node_modules/zod/v4/core/parse.cjs +7 -7
  39. package/dist/node_modules/zod/v4/core/parse.js +7 -7
  40. package/dist/node_modules/zod/v4/core/regexes.cjs +3 -9
  41. package/dist/node_modules/zod/v4/core/regexes.js +1 -7
  42. package/dist/node_modules/zod/v4/core/schemas.cjs +65 -211
  43. package/dist/node_modules/zod/v4/core/schemas.js +64 -210
  44. package/dist/node_modules/zod/v4/core/to-json-schema.cjs +1 -12
  45. package/dist/node_modules/zod/v4/core/to-json-schema.js +1 -12
  46. package/dist/node_modules/zod/v4/core/util.cjs +30 -54
  47. package/dist/node_modules/zod/v4/core/util.js +32 -55
  48. package/dist/node_modules/zod/v4/core/versions.cjs +2 -2
  49. package/dist/node_modules/zod/v4/core/versions.js +2 -2
  50. package/dist/node_modules/zod/v4/locales/en.cjs +0 -4
  51. package/dist/node_modules/zod/v4/locales/en.js +0 -4
  52. package/dist/node_modules/zod/v4/locales/fr.cjs +7 -24
  53. package/dist/node_modules/zod/v4/locales/fr.js +7 -24
  54. package/dist/node_modules/zod/v4/locales/index.cjs +1 -8
  55. package/dist/node_modules/zod/v4/locales/index.js +0 -3
  56. package/dist/node_modules/zod/v4/locales/it.cjs +1 -1
  57. package/dist/node_modules/zod/v4/locales/it.js +1 -1
  58. package/dist/node_modules/zod/v4/locales/ka.cjs +8 -8
  59. package/dist/node_modules/zod/v4/locales/ka.js +8 -8
  60. package/dist/node_modules/zod/v4/locales/package.json +1 -2
  61. package/dist/node_modules/zod/v4/locales/uz.cjs +0 -1
  62. package/dist/node_modules/zod/v4/locales/uz.js +0 -1
  63. package/dist/node_modules/zod/v4/mini/package.json +1 -2
  64. package/dist/node_modules/zod/v4/mini/schemas.cjs +4 -41
  65. package/dist/node_modules/zod/v4/mini/schemas.js +4 -40
  66. package/dist/node_modules/zod/v4/package.json +1 -2
  67. package/dist/node_modules/zod/v4-mini/package.json +1 -2
  68. package/package.json +20 -20
  69. package/dist/node_modules/zod/v4/locales/el.cjs +0 -136
  70. package/dist/node_modules/zod/v4/locales/el.js +0 -109
  71. package/dist/node_modules/zod/v4/locales/hr.cjs +0 -149
  72. package/dist/node_modules/zod/v4/locales/hr.js +0 -122
  73. package/dist/node_modules/zod/v4/locales/ro.cjs +0 -146
  74. package/dist/node_modules/zod/v4/locales/ro.js +0 -119
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var host_exports = {};
20
+ __export(host_exports, {
21
+ AhpHost: () => AhpHost
22
+ });
23
+ module.exports = __toCommonJS(host_exports);
24
+ class AhpHost {
25
+ /** @internal */
26
+ constructor(info, disposeHost, publishHostSession, listHostSessions) {
27
+ this.disposeHost = disposeHost;
28
+ this.publishHostSession = publishHostSession;
29
+ this.listHostSessions = listHostSessions;
30
+ this.hostId = info.hostId;
31
+ this.url = info.url;
32
+ this.environmentId = info.environmentId;
33
+ this.token = info.token;
34
+ this.pid = info.pid;
35
+ }
36
+ disposeHost;
37
+ publishHostSession;
38
+ listHostSessions;
39
+ hostId;
40
+ /** Local WebSocket URL. Absent when only the GitHub environment is enabled. */
41
+ url;
42
+ /** Mission Control environment ID, when GitHub hosting is enabled. */
43
+ environmentId;
44
+ /** Connection token, when required by the listener. Treat this value as a secret. */
45
+ token;
46
+ /** Legacy separate host process ID. Absent for in-process listeners; use dispose() to stop. */
47
+ pid;
48
+ /** Ask the runtime to stop the listener and await its cleanup, on every call. */
49
+ dispose() {
50
+ return this.disposeHost();
51
+ }
52
+ /** Publish an attached application session into the durable compute-scoped host catalog. */
53
+ publishSession(sessionId) {
54
+ return this.publishHostSession(sessionId);
55
+ }
56
+ /** List all live and dormant catalog sessions advertised by this host. */
57
+ listSessions() {
58
+ return this.listHostSessions();
59
+ }
60
+ async [Symbol.asyncDispose]() {
61
+ await this.dispose();
62
+ }
63
+ }
64
+ // Annotate the CommonJS export names for ESM import in node:
65
+ 0 && (module.exports = {
66
+ AhpHost
67
+ });
@@ -18,6 +18,7 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var index_exports = {};
20
20
  __export(index_exports, {
21
+ AhpHost: () => import_host.AhpHost,
21
22
  BuiltInTools: () => import_toolSet.BuiltInTools,
22
23
  Canvas: () => import_canvas.Canvas,
23
24
  CanvasError: () => import_canvas.CanvasError,
@@ -28,30 +29,33 @@ __export(index_exports, {
28
29
  CopilotWebSocketForwarder: () => import_types2.CopilotWebSocketForwarder,
29
30
  CopilotWebSocketHandler: () => import_types2.CopilotWebSocketHandler,
30
31
  DisableBypassPermissionsModes: () => import_types.DisableBypassPermissionsModes,
31
- FactoryResumeError: () => import_factory.FactoryResumeError,
32
32
  RuntimeConnection: () => import_types.RuntimeConnection,
33
33
  SYSTEM_MESSAGE_SECTIONS: () => import_types2.SYSTEM_MESSAGE_SECTIONS,
34
34
  SessionFsSqliteTransactionFailure: () => import_types2.SessionFsSqliteTransactionFailure,
35
+ SessionFsWriteFailure: () => import_types2.SessionFsWriteFailure,
35
36
  ToolSet: () => import_toolSet.ToolSet,
37
+ WorkflowResumeError: () => import_workflow.WorkflowResumeError,
36
38
  approveAll: () => import_types2.approveAll,
37
39
  convertMcpCallToolResult: () => import_types2.convertMcpCallToolResult,
38
40
  createAttributedPermissionResult: () => import_types2.createAttributedPermissionResult,
39
41
  createCanvas: () => import_canvas.createCanvas,
40
42
  createSessionFsAdapter: () => import_types2.createSessionFsAdapter,
41
- defineFactory: () => import_factory.defineFactory,
42
43
  defineTool: () => import_types2.defineTool,
43
- isFactoryRunTerminal: () => import_factory.isFactoryRunTerminal
44
+ defineWorkflow: () => import_workflow.defineWorkflow,
45
+ isWorkflowRunTerminal: () => import_workflow.isWorkflowRunTerminal
44
46
  });
45
47
  module.exports = __toCommonJS(index_exports);
46
48
  var import_client = require("./client.js");
49
+ var import_host = require("./host.js");
47
50
  var import_types = require("./types.js");
48
51
  var import_toolSet = require("./toolSet.js");
49
52
  var import_session = require("./session.js");
50
- var import_factory = require("./factory.js");
53
+ var import_workflow = require("./workflow.js");
51
54
  var import_canvas = require("./canvas.js");
52
55
  var import_types2 = require("./types.js");
53
56
  // Annotate the CommonJS export names for ESM import in node:
54
57
  0 && (module.exports = {
58
+ AhpHost,
55
59
  BuiltInTools,
56
60
  Canvas,
57
61
  CanvasError,
@@ -62,17 +66,18 @@ var import_types2 = require("./types.js");
62
66
  CopilotWebSocketForwarder,
63
67
  CopilotWebSocketHandler,
64
68
  DisableBypassPermissionsModes,
65
- FactoryResumeError,
66
69
  RuntimeConnection,
67
70
  SYSTEM_MESSAGE_SECTIONS,
68
71
  SessionFsSqliteTransactionFailure,
72
+ SessionFsWriteFailure,
69
73
  ToolSet,
74
+ WorkflowResumeError,
70
75
  approveAll,
71
76
  convertMcpCallToolResult,
72
77
  createAttributedPermissionResult,
73
78
  createCanvas,
74
79
  createSessionFsAdapter,
75
- defineFactory,
76
80
  defineTool,
77
- isFactoryRunTerminal
81
+ defineWorkflow,
82
+ isWorkflowRunTerminal
78
83
  });
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var installationConfirmation_exports = {};
20
+ __export(installationConfirmation_exports, {
21
+ createInstallationConfirmationAdapter: () => createInstallationConfirmationAdapter
22
+ });
23
+ module.exports = __toCommonJS(installationConfirmation_exports);
24
+ var import_node = require("vscode-jsonrpc/node.js");
25
+ function createInstallationConfirmationAdapter(connection, handler) {
26
+ const closed = new import_node.CancellationTokenSource();
27
+ const closeSubscription = connection.onClose(() => closed.cancel());
28
+ const disposeSubscription = connection.onDispose(() => {
29
+ closed.cancel();
30
+ closed.dispose();
31
+ closeSubscription.dispose();
32
+ disposeSubscription.dispose();
33
+ });
34
+ return {
35
+ async confirm(request, token) {
36
+ if (!token) {
37
+ throw new Error("Installation confirmation request cancellation is unavailable");
38
+ }
39
+ const { confirmationId, reviewFingerprint } = request;
40
+ const combined = new import_node.CancellationTokenSource();
41
+ const subscriptions = [];
42
+ const cancelRequest = () => combined.cancel();
43
+ const cancelConnection = () => combined.cancel();
44
+ const checkCancellation = () => {
45
+ if (closed.token.isCancellationRequested) {
46
+ throw new Error("Installation confirmation connection closed");
47
+ }
48
+ if (token.isCancellationRequested) {
49
+ throw new import_node.ResponseError(-32800, "Installation confirmation request cancelled");
50
+ }
51
+ };
52
+ try {
53
+ subscriptions.push(
54
+ token.onCancellationRequested(cancelRequest),
55
+ closed.token.onCancellationRequested(cancelConnection)
56
+ );
57
+ if (token.isCancellationRequested || closed.token.isCancellationRequested) {
58
+ combined.cancel();
59
+ }
60
+ checkCancellation();
61
+ const cancelled = new Promise((_resolve, reject) => {
62
+ subscriptions.push(
63
+ token.onCancellationRequested(
64
+ () => reject(
65
+ new import_node.ResponseError(
66
+ -32800,
67
+ "Installation confirmation request cancelled"
68
+ )
69
+ )
70
+ ),
71
+ closed.token.onCancellationRequested(
72
+ () => reject(new Error("Installation confirmation connection closed"))
73
+ )
74
+ );
75
+ });
76
+ const decision = await Promise.race([
77
+ Promise.resolve().then(() => {
78
+ checkCancellation();
79
+ return handler(request, combined.token);
80
+ }),
81
+ cancelled
82
+ ]);
83
+ checkCancellation();
84
+ if (decision !== "confirm" && decision !== "decline" && decision !== "cancel") {
85
+ throw new Error("Invalid installation confirmation decision");
86
+ }
87
+ return { confirmationId, reviewFingerprint, decision };
88
+ } finally {
89
+ for (const subscription of subscriptions) subscription.dispose();
90
+ combined.dispose();
91
+ }
92
+ }
93
+ };
94
+ }
95
+ // Annotate the CommonJS export names for ESM import in node:
96
+ 0 && (module.exports = {
97
+ createInstallationConfirmationAdapter
98
+ });
@@ -51,6 +51,7 @@ const EXCLUDED_TOP_LEVEL = /* @__PURE__ */ new Set([
51
51
  "app.js",
52
52
  "assets",
53
53
  "changelog.json",
54
+ "cli-main.js",
54
55
  "copilot",
55
56
  "copilot.exe",
56
57
  "foundry-local-sdk",
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var schema_exports = {};
20
+ __export(schema_exports, {
21
+ isResponseSchema: () => isResponseSchema,
22
+ isZodSchema: () => isZodSchema,
23
+ toJsonSchema: () => toJsonSchema
24
+ });
25
+ module.exports = __toCommonJS(schema_exports);
26
+ function isZodSchema(value) {
27
+ return typeof value === "object" && value !== null && "toJSONSchema" in value && typeof value.toJSONSchema === "function";
28
+ }
29
+ function toJsonSchema(schema) {
30
+ return isZodSchema(schema) ? schema.toJSONSchema() : schema;
31
+ }
32
+ function isResponseSchema(value) {
33
+ return isZodSchema(value) && "parse" in value && typeof value.parse === "function";
34
+ }
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ isResponseSchema,
38
+ isZodSchema,
39
+ toJsonSchema
40
+ });