@theia/ai-copilot 1.75.0 → 1.76.0-next.10
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/README.md +86 -14
- package/lib/browser/copilot-auth-dialog.d.ts.map +1 -1
- package/lib/browser/copilot-auth-dialog.js +12 -4
- package/lib/browser/copilot-auth-dialog.js.map +1 -1
- package/lib/browser/copilot-frontend-application-contribution.d.ts +15 -1
- package/lib/browser/copilot-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/copilot-frontend-application-contribution.js +52 -24
- package/lib/browser/copilot-frontend-application-contribution.js.map +1 -1
- package/lib/common/copilot-auth-service.d.ts +27 -24
- package/lib/common/copilot-auth-service.d.ts.map +1 -1
- package/lib/common/copilot-language-models-manager.d.ts +3 -21
- package/lib/common/copilot-language-models-manager.d.ts.map +1 -1
- package/lib/common/copilot-language-models-manager.js +1 -13
- package/lib/common/copilot-language-models-manager.js.map +1 -1
- package/lib/common/copilot-preferences.d.ts +1 -0
- package/lib/common/copilot-preferences.d.ts.map +1 -1
- package/lib/common/copilot-preferences.js +24 -6
- package/lib/common/copilot-preferences.js.map +1 -1
- package/lib/common/index.d.ts +0 -1
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +0 -1
- package/lib/common/index.js.map +1 -1
- package/lib/node/copilot-auth-service-impl.d.ts +25 -16
- package/lib/node/copilot-auth-service-impl.d.ts.map +1 -1
- package/lib/node/copilot-auth-service-impl.js +67 -183
- package/lib/node/copilot-auth-service-impl.js.map +1 -1
- package/lib/node/copilot-auth-service-impl.spec.js +104 -168
- package/lib/node/copilot-auth-service-impl.spec.js.map +1 -1
- package/lib/node/copilot-backend-module.d.ts.map +1 -1
- package/lib/node/copilot-backend-module.js +10 -2
- package/lib/node/copilot-backend-module.js.map +1 -1
- package/lib/node/copilot-cli-auth-provider.d.ts +146 -0
- package/lib/node/copilot-cli-auth-provider.d.ts.map +1 -0
- package/lib/node/copilot-cli-auth-provider.js +430 -0
- package/lib/node/copilot-cli-auth-provider.js.map +1 -0
- package/lib/node/copilot-cli-auth-provider.spec.d.ts +2 -0
- package/lib/node/copilot-cli-auth-provider.spec.d.ts.map +1 -0
- package/lib/node/copilot-cli-auth-provider.spec.js +249 -0
- package/lib/node/copilot-cli-auth-provider.spec.js.map +1 -0
- package/lib/node/copilot-cli-locator.d.ts +120 -0
- package/lib/node/copilot-cli-locator.d.ts.map +1 -0
- package/lib/node/copilot-cli-locator.js +348 -0
- package/lib/node/copilot-cli-locator.js.map +1 -0
- package/lib/node/copilot-cli-locator.spec.d.ts +2 -0
- package/lib/node/copilot-cli-locator.spec.d.ts.map +1 -0
- package/lib/node/copilot-cli-locator.spec.js +327 -0
- package/lib/node/copilot-cli-locator.spec.js.map +1 -0
- package/lib/node/copilot-credential-store.d.ts +45 -0
- package/lib/node/copilot-credential-store.d.ts.map +1 -0
- package/lib/node/copilot-credential-store.js +96 -0
- package/lib/node/copilot-credential-store.js.map +1 -0
- package/lib/node/copilot-credential-store.spec.d.ts +2 -0
- package/lib/node/copilot-credential-store.spec.d.ts.map +1 -0
- package/lib/node/copilot-credential-store.spec.js +93 -0
- package/lib/node/copilot-credential-store.spec.js.map +1 -0
- package/lib/node/copilot-language-models-manager-impl.d.ts +20 -18
- package/lib/node/copilot-language-models-manager-impl.d.ts.map +1 -1
- package/lib/node/copilot-language-models-manager-impl.js +39 -67
- package/lib/node/copilot-language-models-manager-impl.js.map +1 -1
- package/lib/node/copilot-language-models-manager-impl.spec.d.ts +2 -0
- package/lib/node/copilot-language-models-manager-impl.spec.d.ts.map +1 -0
- package/lib/node/copilot-language-models-manager-impl.spec.js +119 -0
- package/lib/node/copilot-language-models-manager-impl.spec.js.map +1 -0
- package/lib/node/copilot-runtime-env.d.ts +20 -0
- package/lib/node/copilot-runtime-env.d.ts.map +1 -0
- package/lib/node/copilot-runtime-env.js +49 -0
- package/lib/node/copilot-runtime-env.js.map +1 -0
- package/lib/node/copilot-sdk-client-provider.d.ts +103 -0
- package/lib/node/copilot-sdk-client-provider.d.ts.map +1 -0
- package/lib/node/copilot-sdk-client-provider.js +247 -0
- package/lib/node/copilot-sdk-client-provider.js.map +1 -0
- package/lib/node/copilot-sdk-client-provider.spec.d.ts +2 -0
- package/lib/node/copilot-sdk-client-provider.spec.d.ts.map +1 -0
- package/lib/node/copilot-sdk-client-provider.spec.js +215 -0
- package/lib/node/copilot-sdk-client-provider.spec.js.map +1 -0
- package/lib/node/copilot-sdk-language-model.d.ts +85 -0
- package/lib/node/copilot-sdk-language-model.d.ts.map +1 -0
- package/lib/node/copilot-sdk-language-model.js +301 -0
- package/lib/node/copilot-sdk-language-model.js.map +1 -0
- package/lib/node/copilot-sdk-language-model.spec.d.ts +2 -0
- package/lib/node/copilot-sdk-language-model.spec.d.ts.map +1 -0
- package/lib/node/copilot-sdk-language-model.spec.js +302 -0
- package/lib/node/copilot-sdk-language-model.spec.js.map +1 -0
- package/lib/node/copilot-sdk-loader.d.ts +57 -0
- package/lib/node/copilot-sdk-loader.d.ts.map +1 -0
- package/lib/node/copilot-sdk-loader.js +133 -0
- package/lib/node/copilot-sdk-loader.js.map +1 -0
- package/lib/node/copilot-sdk-loader.spec.d.ts +2 -0
- package/lib/node/copilot-sdk-loader.spec.d.ts.map +1 -0
- package/lib/node/copilot-sdk-loader.spec.js +113 -0
- package/lib/node/copilot-sdk-loader.spec.js.map +1 -0
- package/lib/node/copilot-sdk-mappers.d.ts +49 -0
- package/lib/node/copilot-sdk-mappers.d.ts.map +1 -0
- package/lib/node/copilot-sdk-mappers.js +147 -0
- package/lib/node/copilot-sdk-mappers.js.map +1 -0
- package/lib/node/copilot-sdk-mappers.spec.d.ts +2 -0
- package/lib/node/copilot-sdk-mappers.spec.d.ts.map +1 -0
- package/lib/node/copilot-sdk-mappers.spec.js +133 -0
- package/lib/node/copilot-sdk-mappers.spec.js.map +1 -0
- package/lib/node/copilot-sdk-types.d.ts +198 -0
- package/lib/node/copilot-sdk-types.d.ts.map +1 -0
- package/lib/{common/copilot-oauth-config.js → node/copilot-sdk-types.js} +2 -13
- package/lib/node/copilot-sdk-types.js.map +1 -0
- package/lib/node/index.d.ts +9 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +9 -1
- package/lib/node/index.js.map +1 -1
- package/package.json +4 -6
- package/src/browser/copilot-auth-dialog.tsx +12 -8
- package/src/browser/copilot-frontend-application-contribution.ts +62 -29
- package/src/common/copilot-auth-service.ts +28 -24
- package/src/common/copilot-language-models-manager.ts +3 -28
- package/src/common/copilot-preferences.ts +24 -5
- package/src/common/index.ts +0 -1
- package/src/node/copilot-auth-service-impl.spec.ts +122 -207
- package/src/node/copilot-auth-service-impl.ts +63 -218
- package/src/node/copilot-backend-module.ts +11 -2
- package/src/node/copilot-cli-auth-provider.spec.ts +315 -0
- package/src/node/copilot-cli-auth-provider.ts +444 -0
- package/src/node/copilot-cli-locator.spec.ts +386 -0
- package/src/node/copilot-cli-locator.ts +363 -0
- package/src/node/copilot-credential-store.spec.ts +106 -0
- package/src/node/copilot-credential-store.ts +99 -0
- package/src/node/copilot-language-models-manager-impl.spec.ts +137 -0
- package/src/node/copilot-language-models-manager-impl.ts +51 -85
- package/src/node/copilot-runtime-env.ts +46 -0
- package/src/node/copilot-sdk-client-provider.spec.ts +253 -0
- package/src/node/copilot-sdk-client-provider.ts +241 -0
- package/src/node/copilot-sdk-language-model.spec.ts +363 -0
- package/src/node/copilot-sdk-language-model.ts +329 -0
- package/src/node/copilot-sdk-loader.spec.ts +126 -0
- package/src/node/copilot-sdk-loader.ts +142 -0
- package/src/node/copilot-sdk-mappers.spec.ts +151 -0
- package/src/node/copilot-sdk-mappers.ts +161 -0
- package/src/node/copilot-sdk-types.ts +276 -0
- package/src/node/index.ts +9 -1
- package/lib/common/copilot-oauth-config.d.ts +0 -33
- package/lib/common/copilot-oauth-config.d.ts.map +0 -1
- package/lib/common/copilot-oauth-config.js.map +0 -1
- package/lib/node/copilot-language-model.d.ts +0 -34
- package/lib/node/copilot-language-model.d.ts.map +0 -1
- package/lib/node/copilot-language-model.js +0 -236
- package/lib/node/copilot-language-model.js.map +0 -1
- package/lib/node/copilot-language-model.spec.d.ts +0 -2
- package/lib/node/copilot-language-model.spec.d.ts.map +0 -1
- package/lib/node/copilot-language-model.spec.js +0 -89
- package/lib/node/copilot-language-model.spec.js.map +0 -1
- package/src/common/copilot-oauth-config.ts +0 -55
- package/src/node/copilot-language-model.spec.ts +0 -106
- package/src/node/copilot-language-model.ts +0 -273
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-preferences.d.ts","sourceRoot":"","sources":["../../src/common/copilot-preferences.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAO,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAClE,eAAO,MAAM,4BAA4B,uCAAuC,CAAC;AACjF,eAAO,MAAM,2BAA2B,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"copilot-preferences.d.ts","sourceRoot":"","sources":["../../src/common/copilot-preferences.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAO,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAClE,eAAO,MAAM,4BAA4B,uCAAuC,CAAC;AACjF,eAAO,MAAM,2BAA2B,sCAAsC,CAAC;AAC/E,eAAO,MAAM,4BAA4B,uCAAuC,CAAC;AAEjF,eAAO,MAAM,wBAAwB,EAAE,gBAiDtC,CAAC"}
|
|
@@ -15,21 +15,26 @@
|
|
|
15
15
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
16
|
// *****************************************************************************
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.CopilotPreferencesSchema = exports.COPILOT_ENTERPRISE_URL_PREF = exports.COPILOT_MODEL_OVERRIDES_PREF = exports.COPILOT_ENABLED_PREF = void 0;
|
|
18
|
+
exports.CopilotPreferencesSchema = exports.COPILOT_EXECUTABLE_PATH_PREF = exports.COPILOT_ENTERPRISE_URL_PREF = exports.COPILOT_MODEL_OVERRIDES_PREF = exports.COPILOT_ENABLED_PREF = void 0;
|
|
19
19
|
const ai_core_preferences_1 = require("@theia/ai-core/lib/common/ai-core-preferences");
|
|
20
20
|
const core_1 = require("@theia/core");
|
|
21
21
|
exports.COPILOT_ENABLED_PREF = 'ai-features.copilot.enabled';
|
|
22
22
|
exports.COPILOT_MODEL_OVERRIDES_PREF = 'ai-features.copilot.modelOverrides';
|
|
23
23
|
exports.COPILOT_ENTERPRISE_URL_PREF = 'ai-features.copilot.enterpriseUrl';
|
|
24
|
+
exports.COPILOT_EXECUTABLE_PATH_PREF = 'ai-features.copilot.executablePath';
|
|
24
25
|
exports.CopilotPreferencesSchema = {
|
|
25
26
|
properties: {
|
|
26
27
|
[exports.COPILOT_ENABLED_PREF]: {
|
|
27
28
|
type: 'boolean',
|
|
28
29
|
typeDetails: { [ai_core_preferences_1.MODEL_PROVIDER_TYPE_DETAIL]: { label: 'GitHub Copilot' } },
|
|
29
30
|
markdownDescription: core_1.nls.localize('theia/ai/copilot/enabled/mdDescription', 'Enable the GitHub Copilot provider. When enabled, a status bar entry '
|
|
30
|
-
+ 'appears for authentication and available models are discovered from your Copilot subscription
|
|
31
|
+
+ 'appears for authentication and available models are discovered from your Copilot subscription.\n\n'
|
|
32
|
+
+ 'Requests are routed through the official GitHub Copilot CLI, which runs as a background process on the '
|
|
33
|
+
+ 'machine hosting the backend. It is given the credentials of your Copilot sign-in and nothing else, so a '
|
|
34
|
+
+ 'token in the environment or an existing sign-in of the GitHub CLI is not used.'),
|
|
31
35
|
title: ai_core_preferences_1.AI_CORE_PREFERENCES_TITLE,
|
|
32
|
-
default: true
|
|
36
|
+
default: true,
|
|
37
|
+
tags: ['experimental']
|
|
33
38
|
},
|
|
34
39
|
[exports.COPILOT_MODEL_OVERRIDES_PREF]: {
|
|
35
40
|
type: 'array',
|
|
@@ -40,13 +45,26 @@ exports.CopilotPreferencesSchema = {
|
|
|
40
45
|
default: [],
|
|
41
46
|
items: {
|
|
42
47
|
type: 'string'
|
|
43
|
-
}
|
|
48
|
+
},
|
|
49
|
+
tags: ['experimental']
|
|
44
50
|
},
|
|
45
51
|
[exports.COPILOT_ENTERPRISE_URL_PREF]: {
|
|
46
52
|
type: 'string',
|
|
47
|
-
markdownDescription: core_1.nls.localize('theia/ai/copilot/enterpriseUrl/mdDescription', 'GitHub Enterprise domain
|
|
53
|
+
markdownDescription: core_1.nls.localize('theia/ai/copilot/enterpriseUrl/mdDescription', 'GitHub Enterprise domain to authenticate and send requests against (e.g., `github.mycompany.com`). '
|
|
54
|
+
+ 'Leave empty for GitHub.com.'),
|
|
48
55
|
title: ai_core_preferences_1.AI_CORE_PREFERENCES_TITLE,
|
|
49
|
-
default: ''
|
|
56
|
+
default: '',
|
|
57
|
+
tags: ['experimental']
|
|
58
|
+
},
|
|
59
|
+
[exports.COPILOT_EXECUTABLE_PATH_PREF]: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
markdownDescription: core_1.nls.localize('theia/ai/copilot/executablePath/mdDescription', 'Location of the GitHub Copilot CLI executable on the machine hosting the backend. '
|
|
62
|
+
+ 'When empty (default), the CLI is searched for in the installation of the application, on the `PATH` '
|
|
63
|
+
+ 'and in the global `npm` directory. Set this when the CLI is installed somewhere else.\n\n'
|
|
64
|
+
+ 'The CLI is not shipped with the application, install it with `npm install -g @github/copilot`.'),
|
|
65
|
+
title: ai_core_preferences_1.AI_CORE_PREFERENCES_TITLE,
|
|
66
|
+
default: '',
|
|
67
|
+
tags: ['experimental']
|
|
50
68
|
}
|
|
51
69
|
}
|
|
52
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-preferences.js","sourceRoot":"","sources":["../../src/common/copilot-preferences.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,uFAA+I;AAC/I,sCAAoD;AAEvC,QAAA,oBAAoB,GAAG,6BAA6B,CAAC;AACrD,QAAA,4BAA4B,GAAG,oCAAoC,CAAC;AACpE,QAAA,2BAA2B,GAAG,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"copilot-preferences.js","sourceRoot":"","sources":["../../src/common/copilot-preferences.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,uFAA+I;AAC/I,sCAAoD;AAEvC,QAAA,oBAAoB,GAAG,6BAA6B,CAAC;AACrD,QAAA,4BAA4B,GAAG,oCAAoC,CAAC;AACpE,QAAA,2BAA2B,GAAG,mCAAmC,CAAC;AAClE,QAAA,4BAA4B,GAAG,oCAAoC,CAAC;AAEpE,QAAA,wBAAwB,GAAqB;IACtD,UAAU,EAAE;QACR,CAAC,4BAAoB,CAAC,EAAE;YACpB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,EAAE,CAAC,gDAA0B,CAAC,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAoC,EAAE;YAC5G,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAAC,wCAAwC,EACtE,uEAAuE;kBACrE,oGAAoG;kBACpG,yGAAyG;kBACzG,0GAA0G;kBAC1G,gFAAgF,CAAC;YACvF,KAAK,EAAE,+CAAyB;YAChC,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,CAAC,cAAc,CAAC;SACzB;QACD,CAAC,oCAA4B,CAAC,EAAE;YAC5B,IAAI,EAAE,OAAO;YACb,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAAC,+CAA+C,EAC7E,+DAA+D;kBAC7D,wFAAwF;kBACxF,oDAAoD,CAAC;YAC3D,KAAK,EAAE,+CAAyB;YAChC,OAAO,EAAE,EAAE;YACX,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;YACD,IAAI,EAAE,CAAC,cAAc,CAAC;SACzB;QACD,CAAC,mCAA2B,CAAC,EAAE;YAC3B,IAAI,EAAE,QAAQ;YACd,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAAC,8CAA8C,EAC5E,qGAAqG;kBACnG,6BAA6B,CAAC;YACpC,KAAK,EAAE,+CAAyB;YAChC,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,CAAC,cAAc,CAAC;SACzB;QACD,CAAC,oCAA4B,CAAC,EAAE;YAC5B,IAAI,EAAE,QAAQ;YACd,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAAC,+CAA+C,EAC7E,oFAAoF;kBAClF,sGAAsG;kBACtG,2FAA2F;kBAC3F,gGAAgG,CAAC;YACvG,KAAK,EAAE,+CAAyB;YAChC,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,CAAC,cAAc,CAAC;SACzB;KACJ;CACJ,CAAC"}
|
package/lib/common/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAgBA,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAgBA,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
package/lib/common/index.js
CHANGED
|
@@ -18,6 +18,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
const tslib_1 = require("tslib");
|
|
19
19
|
tslib_1.__exportStar(require("./copilot-language-models-manager"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./copilot-auth-service"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./copilot-oauth-config"), exports);
|
|
22
21
|
tslib_1.__exportStar(require("./copilot-preferences"), exports);
|
|
23
22
|
//# sourceMappingURL=index.js.map
|
package/lib/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,4EAAkD;AAClD,iEAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,4EAAkD;AAClD,iEAAuC;AACvC,gEAAsC"}
|
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
import { Emitter, Event, ILogger } from '@theia/core';
|
|
2
|
-
import { KeyStoreService } from '@theia/core/lib/common/key-store';
|
|
3
2
|
import { CopilotAuthService, CopilotAuthServiceClient, CopilotAuthState, DeviceCodeResponse } from '../common/copilot-auth-service';
|
|
4
|
-
import {
|
|
3
|
+
import { CopilotCliAuthProvider } from './copilot-cli-auth-provider';
|
|
4
|
+
import { CopilotCliLocator } from './copilot-cli-locator';
|
|
5
|
+
import { CopilotCredentialStore } from './copilot-credential-store';
|
|
5
6
|
/**
|
|
6
|
-
* Backend implementation of the GitHub Copilot
|
|
7
|
-
*
|
|
7
|
+
* Backend implementation of the GitHub Copilot authentication service.
|
|
8
|
+
*
|
|
9
|
+
* All Copilot requests are served by the official Copilot CLI, which owns its credentials, so this
|
|
10
|
+
* service only drives the sign-in of the CLI and reports its state, see {@link CopilotCliAuthProvider}.
|
|
8
11
|
*/
|
|
9
12
|
export declare class CopilotAuthServiceImpl implements CopilotAuthService {
|
|
10
|
-
protected readonly
|
|
13
|
+
protected readonly cliAuthProvider: CopilotCliAuthProvider;
|
|
14
|
+
protected readonly credentialStore: CopilotCredentialStore;
|
|
15
|
+
protected readonly cliLocator: CopilotCliLocator;
|
|
11
16
|
protected readonly logger: ILogger;
|
|
12
|
-
protected readonly oauthConfig: CopilotOAuthConfig;
|
|
13
17
|
protected client: CopilotAuthServiceClient | undefined;
|
|
14
18
|
protected cachedState: CopilotAuthState | undefined;
|
|
19
|
+
protected migrationRequired: boolean;
|
|
20
|
+
protected legacyCleanup: Promise<void>;
|
|
21
|
+
protected init(): void;
|
|
15
22
|
protected readonly onAuthStateChangedEmitter: Emitter<CopilotAuthState>;
|
|
16
23
|
readonly onAuthStateChanged: Event<CopilotAuthState>;
|
|
17
24
|
setClient(client: CopilotAuthServiceClient | undefined): void;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
initiateDeviceFlow(enterpriseUrl?: string): Promise<DeviceCodeResponse>;
|
|
23
|
-
pollForToken(deviceCode: string, interval: number, enterpriseUrl?: string): Promise<boolean>;
|
|
24
|
-
protected fetchAccountLabel(accessToken: string, enterpriseUrl?: string): Promise<string | undefined>;
|
|
25
|
-
getAuthState(): Promise<CopilotAuthState>;
|
|
26
|
-
getAccessToken(): Promise<string | undefined>;
|
|
25
|
+
setExecutablePath(path: string | undefined): Promise<void>;
|
|
26
|
+
startSignIn(enterpriseUrl?: string): Promise<DeviceCodeResponse>;
|
|
27
|
+
waitForSignIn(): Promise<boolean>;
|
|
28
|
+
cancelSignIn(): Promise<void>;
|
|
27
29
|
signOut(): Promise<void>;
|
|
30
|
+
getAuthState(): Promise<CopilotAuthState>;
|
|
31
|
+
/**
|
|
32
|
+
* The state as it currently is, with the request for a new sign-in attached when the credentials
|
|
33
|
+
* of the previous integration had to be discarded and none have been established since.
|
|
34
|
+
*
|
|
35
|
+
* Does not await the cleanup, so that it can be used from it.
|
|
36
|
+
*/
|
|
37
|
+
protected computeAuthState(): Promise<CopilotAuthState>;
|
|
28
38
|
protected updateAuthState(state: CopilotAuthState): void;
|
|
29
|
-
protected delay(ms: number): Promise<void>;
|
|
30
39
|
}
|
|
31
40
|
//# sourceMappingURL=copilot-auth-service-impl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-auth-service-impl.d.ts","sourceRoot":"","sources":["../../src/node/copilot-auth-service-impl.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"copilot-auth-service-impl.d.ts","sourceRoot":"","sources":["../../src/node/copilot-auth-service-impl.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EACH,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE;;;;;GAKG;AACH,qBACa,sBAAu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
20
20
|
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
21
|
const core_1 = require("@theia/core");
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const COPILOT_GRANT_TYPE = 'urn:ietf:params:oauth:grant-type:device_code';
|
|
22
|
+
const copilot_cli_auth_provider_1 = require("./copilot-cli-auth-provider");
|
|
23
|
+
const copilot_cli_locator_1 = require("./copilot-cli-locator");
|
|
24
|
+
const copilot_credential_store_1 = require("./copilot-credential-store");
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Backend implementation of the GitHub Copilot OAuth Device Flow authentication service.
|
|
33
|
-
* Handles device code generation, token polling, and credential storage.
|
|
26
|
+
* Backend implementation of the GitHub Copilot authentication service.
|
|
27
|
+
*
|
|
28
|
+
* All Copilot requests are served by the official Copilot CLI, which owns its credentials, so this
|
|
29
|
+
* service only drives the sign-in of the CLI and reports its state, see {@link CopilotCliAuthProvider}.
|
|
34
30
|
*/
|
|
35
31
|
let CopilotAuthServiceImpl = class CopilotAuthServiceImpl {
|
|
36
32
|
constructor() {
|
|
33
|
+
this.migrationRequired = false;
|
|
37
34
|
this.onAuthStateChangedEmitter = new core_1.Emitter();
|
|
38
35
|
this.onAuthStateChanged = this.onAuthStateChangedEmitter.event;
|
|
39
36
|
}
|
|
37
|
+
init() {
|
|
38
|
+
// The previous integration signed in with an OAuth application of its own and stored a token
|
|
39
|
+
// that is of no use here. Remove it instead of leaving it on the machine of the user.
|
|
40
|
+
this.legacyCleanup = this.credentialStore.deleteLegacy().then(async (removed) => {
|
|
41
|
+
this.migrationRequired = removed;
|
|
42
|
+
if (removed) {
|
|
43
|
+
this.logger.info('Copilot: discarded the sign-in of the previous integration, a new sign-in is required.');
|
|
44
|
+
this.updateAuthState(await this.computeAuthState());
|
|
45
|
+
}
|
|
46
|
+
}, error => this.logger.warn('Copilot: failed to clean up the previous sign-in:', error));
|
|
47
|
+
}
|
|
40
48
|
setClient(client) {
|
|
41
49
|
this.client = client;
|
|
42
50
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const domain = enterpriseUrl
|
|
46
|
-
.replace(/^https?:\/\//, '')
|
|
47
|
-
.replace(/\/$/, '');
|
|
48
|
-
return {
|
|
49
|
-
deviceCodeUrl: `https://${domain}/login/device/code`,
|
|
50
|
-
accessTokenUrl: `https://${domain}/login/oauth/access_token`
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
deviceCodeUrl: 'https://github.com/login/device/code',
|
|
55
|
-
accessTokenUrl: 'https://github.com/login/oauth/access_token'
|
|
56
|
-
};
|
|
51
|
+
async setExecutablePath(path) {
|
|
52
|
+
this.cliLocator.setConfiguredPath(path);
|
|
57
53
|
}
|
|
58
|
-
async
|
|
59
|
-
|
|
60
|
-
const response = await fetch(endpoints.deviceCodeUrl, {
|
|
61
|
-
method: 'POST',
|
|
62
|
-
headers: {
|
|
63
|
-
'Accept': 'application/json',
|
|
64
|
-
'Content-Type': 'application/json',
|
|
65
|
-
'User-Agent': this.oauthConfig.userAgent
|
|
66
|
-
},
|
|
67
|
-
body: JSON.stringify({
|
|
68
|
-
client_id: this.oauthConfig.clientId,
|
|
69
|
-
scope: COPILOT_SCOPE
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
if (!response.ok) {
|
|
73
|
-
const errorText = await response.text();
|
|
74
|
-
throw new Error(`Failed to initiate device authorization: ${response.status} - ${errorText}`);
|
|
75
|
-
}
|
|
76
|
-
const data = await response.json();
|
|
77
|
-
return data;
|
|
54
|
+
async startSignIn(enterpriseUrl) {
|
|
55
|
+
return this.cliAuthProvider.startLogin(enterpriseUrl);
|
|
78
56
|
}
|
|
79
|
-
async
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
await this.
|
|
84
|
-
attempts++;
|
|
85
|
-
const response = await fetch(endpoints.accessTokenUrl, {
|
|
86
|
-
method: 'POST',
|
|
87
|
-
headers: {
|
|
88
|
-
'Accept': 'application/json',
|
|
89
|
-
'Content-Type': 'application/json',
|
|
90
|
-
'User-Agent': this.oauthConfig.userAgent
|
|
91
|
-
},
|
|
92
|
-
body: JSON.stringify({
|
|
93
|
-
client_id: this.oauthConfig.clientId,
|
|
94
|
-
device_code: deviceCode,
|
|
95
|
-
grant_type: COPILOT_GRANT_TYPE
|
|
96
|
-
})
|
|
97
|
-
});
|
|
98
|
-
if (!response.ok) {
|
|
99
|
-
this.logger.error(`Token request failed: ${response.status}`);
|
|
100
|
-
continue;
|
|
101
|
-
}
|
|
102
|
-
const data = await response.json();
|
|
103
|
-
if (data.access_token) {
|
|
104
|
-
// Get user info for account label
|
|
105
|
-
const accountLabel = await this.fetchAccountLabel(data.access_token, enterpriseUrl);
|
|
106
|
-
// Store credentials
|
|
107
|
-
const credentials = {
|
|
108
|
-
accessToken: data.access_token,
|
|
109
|
-
accountLabel,
|
|
110
|
-
enterpriseUrl
|
|
111
|
-
};
|
|
112
|
-
await this.keyStoreService.setPassword(this.oauthConfig.keystoreService, this.oauthConfig.keystoreAccount, JSON.stringify(credentials));
|
|
113
|
-
// Update cached state and notify
|
|
114
|
-
const newState = {
|
|
115
|
-
isAuthenticated: true,
|
|
116
|
-
accountLabel,
|
|
117
|
-
enterpriseUrl
|
|
118
|
-
};
|
|
119
|
-
this.updateAuthState(newState);
|
|
120
|
-
return true;
|
|
121
|
-
}
|
|
122
|
-
if (data.error === 'authorization_pending') {
|
|
123
|
-
// User hasn't authorized yet, continue polling
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
if (data.error === 'slow_down') {
|
|
127
|
-
// Increase polling interval
|
|
128
|
-
interval += 5;
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
if (data.error === 'expired_token' || data.error === 'access_denied') {
|
|
132
|
-
this.logger.error(`Authorization failed: ${data.error} - ${data.error_description}`);
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
if (data.error) {
|
|
136
|
-
this.logger.error(`Unexpected error: ${data.error} - ${data.error_description}`);
|
|
137
|
-
return false;
|
|
138
|
-
}
|
|
57
|
+
async waitForSignIn() {
|
|
58
|
+
const success = await this.cliAuthProvider.waitForLogin();
|
|
59
|
+
if (success) {
|
|
60
|
+
this.cachedState = undefined;
|
|
61
|
+
this.updateAuthState(await this.cliAuthProvider.getAuthState());
|
|
139
62
|
}
|
|
140
|
-
return
|
|
63
|
+
return success;
|
|
141
64
|
}
|
|
142
|
-
async
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
'Authorization': `Bearer ${accessToken}`,
|
|
150
|
-
'User-Agent': this.oauthConfig.userAgent,
|
|
151
|
-
'Accept': 'application/vnd.github.v3+json'
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
if (response.ok) {
|
|
155
|
-
const userData = await response.json();
|
|
156
|
-
return userData.login;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
catch (error) {
|
|
160
|
-
this.logger.warn('Failed to fetch GitHub user info:', error);
|
|
161
|
-
}
|
|
162
|
-
return undefined;
|
|
65
|
+
async cancelSignIn() {
|
|
66
|
+
await this.cliAuthProvider.cancelLogin();
|
|
67
|
+
}
|
|
68
|
+
async signOut() {
|
|
69
|
+
await this.cliAuthProvider.signOut();
|
|
70
|
+
this.cachedState = undefined;
|
|
71
|
+
this.updateAuthState(await this.getAuthState());
|
|
163
72
|
}
|
|
164
73
|
async getAuthState() {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
const credentials = JSON.parse(stored);
|
|
172
|
-
// Tokens from the current OAuth App start with 'gho_'; other prefixes (e.g. 'ghu_') indicate a token from the previous GitHub App (Iv-prefixed client ID).
|
|
173
|
-
if (!credentials.accessToken.startsWith('gho_')) {
|
|
174
|
-
this.logger.info('Copilot: clearing outdated GitHub App token. Please sign in again.');
|
|
175
|
-
await this.keyStoreService.deletePassword(this.oauthConfig.keystoreService, this.oauthConfig.keystoreAccount);
|
|
176
|
-
this.cachedState = { isAuthenticated: false, migrationRequired: true };
|
|
177
|
-
return this.cachedState;
|
|
178
|
-
}
|
|
179
|
-
this.cachedState = {
|
|
180
|
-
isAuthenticated: true,
|
|
181
|
-
accountLabel: credentials.accountLabel,
|
|
182
|
-
enterpriseUrl: credentials.enterpriseUrl
|
|
183
|
-
};
|
|
184
|
-
return this.cachedState;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
catch (error) {
|
|
188
|
-
this.logger.warn('Failed to retrieve Copilot credentials:', error);
|
|
74
|
+
// Awaited so that a state requested early cannot be cached without the migration flag, which
|
|
75
|
+
// is the only thing that tells the user why they were signed out. The frontend evaluates it
|
|
76
|
+
// once at startup, so losing it there means losing it altogether.
|
|
77
|
+
await this.legacyCleanup;
|
|
78
|
+
if (!this.cachedState) {
|
|
79
|
+
this.cachedState = await this.computeAuthState();
|
|
189
80
|
}
|
|
190
|
-
this.cachedState = { isAuthenticated: false };
|
|
191
81
|
return this.cachedState;
|
|
192
82
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
this.logger.warn('Failed to retrieve Copilot access token:', error);
|
|
203
|
-
}
|
|
204
|
-
return undefined;
|
|
205
|
-
}
|
|
206
|
-
async signOut() {
|
|
207
|
-
try {
|
|
208
|
-
await this.keyStoreService.deletePassword(this.oauthConfig.keystoreService, this.oauthConfig.keystoreAccount);
|
|
209
|
-
}
|
|
210
|
-
catch (error) {
|
|
211
|
-
this.logger.warn('Failed to delete Copilot credentials:', error);
|
|
212
|
-
}
|
|
213
|
-
const newState = { isAuthenticated: false };
|
|
214
|
-
this.updateAuthState(newState);
|
|
83
|
+
/**
|
|
84
|
+
* The state as it currently is, with the request for a new sign-in attached when the credentials
|
|
85
|
+
* of the previous integration had to be discarded and none have been established since.
|
|
86
|
+
*
|
|
87
|
+
* Does not await the cleanup, so that it can be used from it.
|
|
88
|
+
*/
|
|
89
|
+
async computeAuthState() {
|
|
90
|
+
const state = await this.cliAuthProvider.getAuthState();
|
|
91
|
+
return state.isAuthenticated || !this.migrationRequired ? state : { ...state, migrationRequired: true };
|
|
215
92
|
}
|
|
216
93
|
updateAuthState(state) {
|
|
217
94
|
this.cachedState = state;
|
|
218
95
|
this.onAuthStateChangedEmitter.fire(state);
|
|
219
96
|
this.client?.onAuthStateChanged(state);
|
|
220
97
|
}
|
|
221
|
-
delay(ms) {
|
|
222
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
223
|
-
}
|
|
224
98
|
};
|
|
225
99
|
exports.CopilotAuthServiceImpl = CopilotAuthServiceImpl;
|
|
226
100
|
tslib_1.__decorate([
|
|
227
|
-
(0, inversify_1.inject)(
|
|
228
|
-
tslib_1.__metadata("design:type",
|
|
229
|
-
], CopilotAuthServiceImpl.prototype, "
|
|
101
|
+
(0, inversify_1.inject)(copilot_cli_auth_provider_1.CopilotCliAuthProvider),
|
|
102
|
+
tslib_1.__metadata("design:type", copilot_cli_auth_provider_1.CopilotCliAuthProvider)
|
|
103
|
+
], CopilotAuthServiceImpl.prototype, "cliAuthProvider", void 0);
|
|
104
|
+
tslib_1.__decorate([
|
|
105
|
+
(0, inversify_1.inject)(copilot_credential_store_1.CopilotCredentialStore),
|
|
106
|
+
tslib_1.__metadata("design:type", copilot_credential_store_1.CopilotCredentialStore)
|
|
107
|
+
], CopilotAuthServiceImpl.prototype, "credentialStore", void 0);
|
|
108
|
+
tslib_1.__decorate([
|
|
109
|
+
(0, inversify_1.inject)(copilot_cli_locator_1.CopilotCliLocator),
|
|
110
|
+
tslib_1.__metadata("design:type", copilot_cli_locator_1.CopilotCliLocator)
|
|
111
|
+
], CopilotAuthServiceImpl.prototype, "cliLocator", void 0);
|
|
230
112
|
tslib_1.__decorate([
|
|
231
113
|
(0, inversify_1.inject)(core_1.ILogger),
|
|
232
114
|
(0, inversify_1.named)('ai-copilot:CopilotAuthServiceImpl'),
|
|
233
115
|
tslib_1.__metadata("design:type", Object)
|
|
234
116
|
], CopilotAuthServiceImpl.prototype, "logger", void 0);
|
|
235
117
|
tslib_1.__decorate([
|
|
236
|
-
(0, inversify_1.
|
|
237
|
-
tslib_1.__metadata("design:type",
|
|
238
|
-
|
|
118
|
+
(0, inversify_1.postConstruct)(),
|
|
119
|
+
tslib_1.__metadata("design:type", Function),
|
|
120
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
121
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
122
|
+
], CopilotAuthServiceImpl.prototype, "init", null);
|
|
239
123
|
exports.CopilotAuthServiceImpl = CopilotAuthServiceImpl = tslib_1.__decorate([
|
|
240
124
|
(0, inversify_1.injectable)()
|
|
241
125
|
], CopilotAuthServiceImpl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copilot-auth-service-impl.js","sourceRoot":"","sources":["../../src/node/copilot-auth-service-impl.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,
|
|
1
|
+
{"version":3,"file":"copilot-auth-service-impl.js","sourceRoot":"","sources":["../../src/node/copilot-auth-service-impl.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF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