opencode-m365-copilot 0.2.1 → 0.2.2

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.
@@ -1,4 +1,4 @@
1
- import { C as SECRETS_FILE, S as CONFIG_DIR, _ as createCachePlugin, f as CLIENT_ID, g as authCodeFromUrl, h as SYDNEY_SCOPES, m as REDIRECT_URI, n as object, r as string, u as AUTHORITY, y as createLogger } from "./server-DDD-Hlhx.mjs";
1
+ import { C as SECRETS_FILE, S as CONFIG_DIR, _ as createCachePlugin, f as CLIENT_ID, g as authCodeFromUrl, h as SYDNEY_SCOPES, m as REDIRECT_URI, n as object, r as string, u as AUTHORITY, y as createLogger } from "./server-B_2RPeJD.mjs";
2
2
  import { existsSync, mkdirSync, readFileSync } from "node:fs";
3
3
  import { join } from "node:path";
4
4
  //#region src/login.ts
@@ -79,7 +79,7 @@ async function login(options = {}) {
79
79
  const secrets = loadSecrets(options.secretsFile);
80
80
  const interactive = options.interactive ?? !secrets?.mfaSecret;
81
81
  if (!interactive && !secrets) throw new Error(`No credentials at ${options.secretsFile ?? SECRETS_FILE}. Create it with { "email", "password", "mfaSecret" }, or sign in interactively with --interactive.`);
82
- const { PublicClientApplication, CryptoProvider } = await import("./dist-CX5bv-4h.mjs");
82
+ const { PublicClientApplication, CryptoProvider } = await import("./dist-JS8R_Thl.mjs");
83
83
  const app = new PublicClientApplication({
84
84
  auth: {
85
85
  clientId: CLIENT_ID,
package/dist/plugin.d.mts CHANGED
@@ -1,9 +1,5 @@
1
1
  import { Plugin } from "@opencode-ai/plugin";
2
2
  //#region src/plugin.d.ts
3
3
  declare const M365CopilotPlugin: Plugin;
4
- declare const _default: {
5
- id: string;
6
- server: Plugin;
7
- };
8
4
  //#endregion
9
- export { M365CopilotPlugin, _default as default };
5
+ export { M365CopilotPlugin, M365CopilotPlugin as default };
package/dist/plugin.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { a as applyPluginConfig, s as resolveOptions, t as startServer, v as createTokenClient, y as createLogger } from "./server-DDD-Hlhx.mjs";
2
- import { t as getOrCreateAgent } from "./agent-BF67A0cd.mjs";
1
+ import { a as applyPluginConfig, s as resolveOptions, t as startServer, v as createTokenClient, y as createLogger } from "./server-B_2RPeJD.mjs";
2
+ import { t as getOrCreateAgent } from "./agent-BXH7KR-e.mjs";
3
3
  //#region src/plugin.ts
4
4
  const log = createLogger("plugin");
5
5
  /**
@@ -55,9 +55,5 @@ const M365CopilotPlugin = async (input, rawOptions) => {
55
55
  }
56
56
  };
57
57
  };
58
- var plugin_default = {
59
- id: "opencode-m365-copilot",
60
- server: M365CopilotPlugin
61
- };
62
58
  //#endregion
63
- export { M365CopilotPlugin, plugin_default as default };
59
+ export { M365CopilotPlugin, M365CopilotPlugin as default };
@@ -145,7 +145,7 @@ function createTokenClient(options = {}) {
145
145
  const cache = /* @__PURE__ */ new Map();
146
146
  async function client() {
147
147
  if (app) return app;
148
- const { PublicClientApplication } = await import("./dist-CX5bv-4h.mjs");
148
+ const { PublicClientApplication } = await import("./dist-JS8R_Thl.mjs");
149
149
  app = new PublicClientApplication({
150
150
  auth: {
151
151
  clientId: CLIENT_ID,
package/dist/server.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { c as DEFAULT_MODEL, t as startServer } from "./server-DDD-Hlhx.mjs";
1
+ import { c as DEFAULT_MODEL, t as startServer } from "./server-B_2RPeJD.mjs";
2
2
  export { DEFAULT_MODEL, startServer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-m365-copilot",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
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
- "./server": {
18
+ "./proxy": {
19
19
  "types": "./dist/server.d.mts",
20
20
  "import": "./dist/server.mjs"
21
21
  }
@@ -27,7 +27,7 @@
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
  },