opencode-m365-copilot 0.3.4 → 0.4.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 +19 -4
- package/dist/{agent-Cd7BGDdu.mjs → agent-CtiM1nN_.mjs} +2 -3
- package/dist/cli.mjs +4 -5
- package/dist/{dist-CMVPFMhc.mjs → dist-Dp9sO-mB.mjs} +402 -511
- package/dist/{login-DTenVKcz.mjs → login-CWvKVY0k.mjs} +4 -5
- package/dist/{otpauth.node-CBOz_1IZ.mjs → otpauth.node-DaSYf7YH.mjs} +21 -13
- package/dist/plugin.d.mts +0 -4
- package/dist/plugin.mjs +5 -8
- package/dist/{server-DQW-8ns2.mjs → server-Cow8-T6p.mjs} +289 -147
- package/dist/server.d.mts +1 -5
- package/dist/server.mjs +1 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -245,6 +245,22 @@ opencode-m365 serve [--port 4141] # run the proxy standalone, for any OpenAI
|
|
|
245
245
|
opencode-m365 doctor # check auth, agent, proxy and opencode wiring
|
|
246
246
|
```
|
|
247
247
|
|
|
248
|
+
## Images
|
|
249
|
+
|
|
250
|
+
Paste an image into opencode (or attach one with `opencode run -f shot.png`) and the
|
|
251
|
+
model sees it. opencode sends it to the proxy as an `image_url` data URL; the proxy
|
|
252
|
+
uploads it to M365 the way the Copilot web client does — `POST /m365Copilot/UploadFile`
|
|
253
|
+
into the same conversation — and the turn points at the upload with an `ImageFile`
|
|
254
|
+
annotation. Only images new to a turn are uploaded: M365 already holds the earlier ones.
|
|
255
|
+
|
|
256
|
+
- If an upload fails, the turn still runs and the model is told the image did not
|
|
257
|
+
arrive, so it says so instead of describing a picture it never saw.
|
|
258
|
+
- Data URLs only. A remote `https://` image URL is not fetched.
|
|
259
|
+
- The local titler model stays text-only; it never reaches M365.
|
|
260
|
+
- The M365 side is implemented from cramt/m365-copilot-proxy's measurement (one model,
|
|
261
|
+
agent attached and not); like the rest of this README's M365 claims, it has not been
|
|
262
|
+
run against a live tenant from here.
|
|
263
|
+
|
|
248
264
|
## Limits
|
|
249
265
|
|
|
250
266
|
- **600 user messages per conversation.** The proxy reuses one conversation per task,
|
|
@@ -265,10 +281,9 @@ opencode-m365 doctor # check auth, agent, proxy and opencode wi
|
|
|
265
281
|
## Development
|
|
266
282
|
|
|
267
283
|
```sh
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
pnpm build
|
|
284
|
+
npm ci
|
|
285
|
+
npm test # typechecks, then runs the suite; no network and no credentials required
|
|
286
|
+
npm run build
|
|
272
287
|
```
|
|
273
288
|
|
|
274
289
|
Tests run against a stub SignalR server (`test/stub-copilot.ts`) that speaks the real
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as createLogger, b as AGENT_FILE, d as POWERPLATFORM_SCOPE, l as BAP_SCOPE, y as writePrivateFile } from "./server-
|
|
1
|
+
import { _ as createLogger, b as AGENT_FILE, d as POWERPLATFORM_SCOPE, l as BAP_SCOPE, y as writePrivateFile } from "./server-Cow8-T6p.mjs";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
|
-
|
|
4
|
+
// src/agent.ts
|
|
5
5
|
/**
|
|
6
6
|
* The Copilot Studio declarative agent.
|
|
7
7
|
*
|
|
@@ -218,5 +218,4 @@ function writeCache(file, cache) {
|
|
|
218
218
|
log.warn("could not write the agent cache", String(error));
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
//#endregion
|
|
222
221
|
export { getOrCreateAgent as t };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as SECRETS_FILE, M as LOCAL_TITLE_MODEL, S as CONFIG_DIR, T as PROVIDER_ID, a as startServer, b as AGENT_FILE, g as createTokenClient, j as DEFAULT_MODEL, k as mergeOpencodeConfig, x as CACHE_FILE } from "./server-
|
|
3
|
-
import { t as getOrCreateAgent } from "./agent-
|
|
2
|
+
import { C as SECRETS_FILE, M as LOCAL_TITLE_MODEL, S as CONFIG_DIR, T as PROVIDER_ID, a as startServer, b as AGENT_FILE, g as createTokenClient, j as DEFAULT_MODEL, k as mergeOpencodeConfig, x as CACHE_FILE } from "./server-Cow8-T6p.mjs";
|
|
3
|
+
import { t as getOrCreateAgent } from "./agent-CtiM1nN_.mjs";
|
|
4
4
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import { dirname, join, resolve } from "node:path";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
|
-
|
|
8
|
+
// src/cli.ts
|
|
9
9
|
/**
|
|
10
10
|
* `opencode-m365` — sign in, wire up opencode, and check the plumbing.
|
|
11
11
|
*
|
|
@@ -46,7 +46,7 @@ to complete SSO/MFA by hand once — the only option on tenants with push-only
|
|
|
46
46
|
MFA, FIDO2, or a federated IdP.`);
|
|
47
47
|
}
|
|
48
48
|
async function doLogin(args) {
|
|
49
|
-
const { login } = await import("./login-
|
|
49
|
+
const { login } = await import("./login-CWvKVY0k.mjs");
|
|
50
50
|
const interactive = args.includes("--interactive");
|
|
51
51
|
try {
|
|
52
52
|
const account = await login({
|
|
@@ -197,5 +197,4 @@ main().catch((error) => {
|
|
|
197
197
|
console.error(error instanceof Error ? error.message : String(error));
|
|
198
198
|
process.exit(1);
|
|
199
199
|
});
|
|
200
|
-
//#endregion
|
|
201
200
|
export {};
|