@byollm/server 0.1.0-alpha.52 → 0.1.0-alpha.54
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 +53 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
> [!WARNING]
|
|
2
|
-
> **Alpha (`0.1.0-alpha.
|
|
2
|
+
> **Alpha (`0.1.0-alpha.54`) — under active development. Don't use this yet.**
|
|
3
3
|
>
|
|
4
4
|
> Install it deliberately: `npm install @byollm/server@alpha`.
|
|
5
5
|
>
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
> packages published and `@byollm/server` did not: a Sigstore
|
|
106
106
|
> transparency-log 409 on its provenance attestation. The workflow's
|
|
107
107
|
> "already published" guard correctly refuses to resume a partial publish,
|
|
108
|
-
> so `0.1.0-alpha.
|
|
108
|
+
> so `0.1.0-alpha.54` is that release, whole.
|
|
109
109
|
>
|
|
110
110
|
> If you run the Supabase adapter, `alpha.21` needs
|
|
111
111
|
> `20260819010000_completed_by_lease_id.sql`: alpha.19 shipped §3.6's
|
|
@@ -222,7 +222,7 @@ whichever one it did not pair with.
|
|
|
222
222
|
const job = await getApp().enqueue({
|
|
223
223
|
kind: "llm.generate",
|
|
224
224
|
audience: "private", // this user's own device only — the default
|
|
225
|
-
owner:
|
|
225
|
+
owner: ownerId, // who this is depends on your mode — see below
|
|
226
226
|
payload: { prompt: `Summarize this transcript:\n\n${transcript}` },
|
|
227
227
|
});
|
|
228
228
|
|
|
@@ -241,6 +241,56 @@ const { outcome, fallback } = await job.result({
|
|
|
241
241
|
`noRunnerAvailable` path — never a bare promise that hangs forever. If nobody
|
|
242
242
|
is online to run the job, you find out and can fall back.
|
|
243
243
|
|
|
244
|
+
## Who `owner` is — this differs by mode
|
|
245
|
+
|
|
246
|
+
`owner` names the person whose devices should do the work, and the two
|
|
247
|
+
connection modes do not use the same names for people. Getting this wrong is
|
|
248
|
+
the one integration mistake that produces no error: the job enqueues, returns
|
|
249
|
+
an id, and never routes.
|
|
250
|
+
|
|
251
|
+
**Direct** — daemons reach your own handlers, and you are the only party who
|
|
252
|
+
knows who anybody is. `owner` is your own user id, from your session, never
|
|
253
|
+
from the client. That is what the example above shows.
|
|
254
|
+
|
|
255
|
+
**Cloud** — daemons reach `hub.byollm.cloud`, which has its own identity
|
|
256
|
+
space: rosters, consents and budgets all speak **BYOLLM ids**. Your user id
|
|
257
|
+
means nothing there. `owner` must be the person's BYOLLM id.
|
|
258
|
+
|
|
259
|
+
Ask them for it. Every signed-in person can read it on their byollm.cloud
|
|
260
|
+
account page under **Your BYOLLM id**, with a copy button. Add a settings
|
|
261
|
+
field, have them paste it, store it against your own user record.
|
|
262
|
+
|
|
263
|
+
The id names them and authorises nothing — someone holding it can address work
|
|
264
|
+
to a person and cannot deliver it, because the consent row is what opens the
|
|
265
|
+
route. So a pasted id is not a credential you are being trusted with, and a
|
|
266
|
+
wrong one is harmless. Two things still matter: it must come from the person's
|
|
267
|
+
own account rather than being inferred by your app, and they must connect your
|
|
268
|
+
site on byollm.cloud before anything routes.
|
|
269
|
+
|
|
270
|
+
**A wrong id is silence, not an error.** The relay routes on a consented
|
|
271
|
+
`(site, owner)` pair, so a mistyped id — or one belonging to somebody who has
|
|
272
|
+
not connected your site — matches no route. The job waits, then expires. So
|
|
273
|
+
check ids when you receive them rather than when you enqueue:
|
|
274
|
+
|
|
275
|
+
```ts
|
|
276
|
+
const { available } = await getApp().runnerAvailability({
|
|
277
|
+
kind: "llm.generate",
|
|
278
|
+
owner: pastedByollmId,
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
if (!available) {
|
|
282
|
+
// Existence-neutral, deliberately.
|
|
283
|
+
return "That id has no devices for you. Check it, or connect this site on byollm.cloud.";
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Keep that message vague on purpose. A typo'd id and an id belonging to somebody
|
|
288
|
+
who has not connected you give the same answer, and that is the system working
|
|
289
|
+
rather than a limitation to route around — telling them apart would make this
|
|
290
|
+
call an account-existence oracle: probe a guess, sort the answers, enumerate.
|
|
291
|
+
Never write "no such account". If you ever get an answer that *does*
|
|
292
|
+
distinguish them, that is a bug worth reporting.
|
|
293
|
+
|
|
244
294
|
## The approval page
|
|
245
295
|
|
|
246
296
|
Pairing is a device-code exchange, so you need one page where a signed-in user
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byollm/server",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.54",
|
|
4
4
|
"description": "Framework-agnostic BYOLLM protocol handlers, a reference in-memory store, a Next.js mount, and a Supabase adapter.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"node": ">=22.14"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@byollm/protocol": "0.1.0-alpha.
|
|
33
|
+
"@byollm/protocol": "0.1.0-alpha.54"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@supabase/supabase-js": "^2.58.0"
|