Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"typescript": "^7.0.2"
},
"overrides": {
"highlight.js": "11.12.0"
"highlight.js": "11.12.0",
"undici": "8.11.2"
}
}
5 changes: 5 additions & 0 deletions scripts/standalone.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { tmpdir } from "node:os";
import { basename, join } from "node:path";
import { fileURLToPath } from "node:url";
import serverPackage from "../server/package.json";
import rootPackage from "../package.json";

async function run(argv: string[], cwd: string, env = process.env) {
const child = Bun.spawn(argv, {
Expand Down Expand Up @@ -211,6 +212,10 @@ test(
45_000,
);

test("standalone OAuth keeps the SDK undici override aligned with the server", () => {
expect(rootPackage.overrides.undici).toBe(serverPackage.dependencies.undici);
});

test("standalone Ranger emits Kimi device codes and saves OAuth credentials in either store", async () => {
const dir = await mkdtemp(join(tmpdir(), "roamgate-oauth-"));
const entry = join(dir, "oauth.ts");
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@earendil-works/pi-durable": "1.0.2",
"proper-lockfile": "4.1.2",
"typebox": "1.3.34",
"undici": "8.10.2",
"undici": "8.11.2",
"web-push": "^3.6.7"
}
}
3 changes: 2 additions & 1 deletion server/src/assistant/pi-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ export function createPiDriver(
directory: string,
loadSdk = async () => {
// Embed Pi's otherwise opaque OAuth imports for standalone executables.
// Keep undici aligned with the SDK so Bun resolves one pi-ai peer context.
// The root undici override keeps SDK and server on one pi-ai peer context.
// Split contexts leave the SDK OAuth loaders unregistered in Bun bundles.
const { registerBunOAuthFlows } = await import(
"@earendil-works/pi-ai/bun-oauth"
);
Expand Down
Loading