opencode-m365-copilot 0.2.1 → 0.3.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/README.md +50 -0
- package/dist/{agent-BF67A0cd.mjs → agent-BDA00x1V.mjs} +2 -2
- package/dist/cli.mjs +10 -5
- package/dist/{dist-CX5bv-4h.mjs → dist-C8jy_NH0.mjs} +543 -201
- package/dist/{login-Bjybi2AZ.mjs → login-Cb_rQQHO.mjs} +3 -3
- package/dist/{otpauth.node-klD_z4Tx.mjs → otpauth.node-BaAHzqxj.mjs} +18 -9
- package/dist/plugin.d.mts +8 -4
- package/dist/plugin.mjs +84 -24
- package/dist/{server-DDD-Hlhx.mjs → server-DuHBfcPQ.mjs} +2651 -1350
- package/dist/server.d.mts +15 -6
- package/dist/server.mjs +2 -2
- package/package.json +11 -6
package/dist/server.d.mts
CHANGED
|
@@ -8,10 +8,20 @@
|
|
|
8
8
|
* which says reasoning tones meta-analyse the injected prompt and disengage — that
|
|
9
9
|
* note predates the GPT-5.5 measurements. See README for the full story.
|
|
10
10
|
*/
|
|
11
|
-
declare const DEFAULT_MODEL = "gpt-5.5-think-deeper";
|
|
11
|
+
export declare const DEFAULT_MODEL = "gpt-5.5-think-deeper";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/server.d.ts
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Header a harness uses to declare what an auxiliary request is *for*.
|
|
16
|
+
*
|
|
17
|
+
* Node lowercases incoming header names, so this must stay lowercase to match.
|
|
18
|
+
*
|
|
19
|
+
* Only `title` is acted on. Compaction and generation are real model work and belong
|
|
20
|
+
* on the real model; titling is the one auxiliary request that would open a second
|
|
21
|
+
* M365 conversation per session, which is precisely the throttle signature.
|
|
22
|
+
*/
|
|
23
|
+
export declare const AUX_REQUEST_KIND_HEADER = "x-m365-request-kind";
|
|
24
|
+
export interface ServerDeps {
|
|
15
25
|
/** Supplies a Sydney chat token. */
|
|
16
26
|
getToken: () => Promise<string>;
|
|
17
27
|
/**
|
|
@@ -41,11 +51,10 @@ interface ServerDeps {
|
|
|
41
51
|
port?: number;
|
|
42
52
|
host?: string;
|
|
43
53
|
}
|
|
44
|
-
interface ProxyHandle {
|
|
54
|
+
export interface ProxyHandle {
|
|
45
55
|
url: string;
|
|
46
56
|
port: number;
|
|
47
57
|
close(): Promise<void>;
|
|
48
58
|
}
|
|
49
|
-
declare function startServer(deps: ServerDeps): Promise<ProxyHandle>;
|
|
50
|
-
//#endregion
|
|
51
|
-
export { DEFAULT_MODEL, ProxyHandle, ServerDeps, startServer };
|
|
59
|
+
export declare function startServer(deps: ServerDeps): Promise<ProxyHandle>;
|
|
60
|
+
//#endregion
|
package/dist/server.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { DEFAULT_MODEL, startServer };
|
|
1
|
+
import { E as DEFAULT_MODEL, n as startServer, t as AUX_REQUEST_KIND_HEADER } from "./server-DuHBfcPQ.mjs";
|
|
2
|
+
export { AUX_REQUEST_KIND_HEADER, DEFAULT_MODEL, startServer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-m365-copilot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Use your org's Microsoft 365 Copilot as the model backend for opencode",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"types": "./dist/plugin.d.mts",
|
|
16
16
|
"import": "./dist/plugin.mjs"
|
|
17
17
|
},
|
|
18
|
-
"./
|
|
18
|
+
"./proxy": {
|
|
19
19
|
"types": "./dist/server.d.mts",
|
|
20
20
|
"import": "./dist/server.mjs"
|
|
21
21
|
}
|
|
@@ -27,20 +27,21 @@
|
|
|
27
27
|
],
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "tsdown",
|
|
30
|
-
"test": "vitest run",
|
|
30
|
+
"test": "npm run typecheck && vitest run",
|
|
31
31
|
"test:watch": "vitest",
|
|
32
32
|
"typecheck": "tsc --noEmit"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@azure/msal-node": "^
|
|
35
|
+
"@azure/msal-node": "^6.0.0",
|
|
36
36
|
"@opencode-ai/plugin": "^1.18.18",
|
|
37
|
+
"@opencode/plugin": "^2.0.11",
|
|
37
38
|
"@types/node": "^26.2.0",
|
|
38
39
|
"@types/ws": "^8.18.1",
|
|
39
40
|
"otpauth": "^9.5.0",
|
|
40
41
|
"playwright": "^1.62.1",
|
|
41
|
-
"tsdown": "^0.
|
|
42
|
+
"tsdown": "^0.23.0",
|
|
42
43
|
"typescript": "^7.0.2",
|
|
43
|
-
"vitest": "^
|
|
44
|
+
"vitest": "^5.0.0",
|
|
44
45
|
"ws": "^8.20.0",
|
|
45
46
|
"zod": "^4.3.6"
|
|
46
47
|
},
|
|
@@ -62,12 +63,16 @@
|
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
64
65
|
"@opencode-ai/plugin": ">=1.18.0",
|
|
66
|
+
"@opencode/plugin": ">=2.0.0",
|
|
65
67
|
"playwright": ">=1.50.0"
|
|
66
68
|
},
|
|
67
69
|
"peerDependenciesMeta": {
|
|
68
70
|
"@opencode-ai/plugin": {
|
|
69
71
|
"optional": true
|
|
70
72
|
},
|
|
73
|
+
"@opencode/plugin": {
|
|
74
|
+
"optional": true
|
|
75
|
+
},
|
|
71
76
|
"playwright": {
|
|
72
77
|
"optional": true
|
|
73
78
|
}
|