pi-mono/packages/connect/package.json
Armin Ronacher 7f2d80920a feat(connect): add pi-connect for browser sign-in
openConnect() gives browser apps a pi-ai Models collection: credentials and model catalogs in IndexedDB (Web Locks serialize token refreshes across tabs), OAuth sign-in in pi.dev's popup, the token requests browsers cannot send routed through pi.dev's relay, and support(), which says for every provider and method whether it works in the browser and why not.

Auth documents (metadata only, bundled and refreshed from pi.dev) describe the browser tiers; scripts/probe-cors.ts checks them against the providers' endpoints. The relay allowlist in relay.ts is the source pi.dev vendors.
2026-10-30 23:13:26 +01:00

61 lines
1.3 KiB
JSON

{
"name": "@earendil-works/pi-connect",
"version": "1.4.0",
"description": "Sign in to model providers from the browser with pi-ai: auth documents, a pi.dev sign-in popup and relay, and IndexedDB credential storage",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"./page": {
"source": "./src/page.ts",
"types": "./dist/page.d.ts",
"import": "./dist/page.js",
"default": "./dist/page.js"
},
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"dist",
"README.md",
"CHANGELOG.md"
],
"scripts": {
"clean": "shx rm -rf dist",
"build": "tsc -p tsconfig.build.json",
"test": "vitest --run",
"probe": "node scripts/probe-cors.ts",
"prepublishOnly": "npm run clean && npm run build"
},
"keywords": [
"ai",
"llm",
"oauth",
"browser",
"pi"
],
"author": "Earendil Works",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/earendil-works/pi.git",
"directory": "packages/connect"
},
"engines": {
"node": ">=22.19.0"
},
"dependencies": {
"@earendil-works/pi-ai": "1.4.0"
},
"devDependencies": {
"fake-indexeddb": "6.2.6",
"shx": "0.3.4",
"vitest": "4.1.12"
}
}