@frockbot/kernel-do 0.3.15 → 0.3.17
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/package.json +3 -3
- package/src/applets.test.ts +6 -1
- package/src/applets.ts +3 -1
- package/src/authority.ts +319 -159
- package/src/conversations.test.ts +7 -9
- package/src/index.ts +1 -0
- package/src/model-timeout-settlement.test.ts +8 -8
- package/src/run-liveness.test.ts +2 -1
- package/src/run-records.ts +142 -6
- package/src/run-recovery.ts +2 -1
- package/src/run-terminal-open-turn.test.ts +9 -4
- package/src/run-terminal.ts +61 -44
- package/src/session-event-log.test.ts +267 -0
- package/src/session-event-log.ts +731 -0
- package/src/session-log-size.test.ts +250 -0
- package/src/storage-keys.ts +12 -0
- package/src/turn-admission.test.ts +54 -9
- package/src/turn-supersede.test.ts +161 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/kernel-do",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.17",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@frockbot/kernel-composition": "0.3.
|
|
16
|
-
"@frockbot/kernel-contracts": "0.3.
|
|
15
|
+
"@frockbot/kernel-composition": "0.3.17",
|
|
16
|
+
"@frockbot/kernel-contracts": "0.3.17",
|
|
17
17
|
"cordis": "4.0.0-rc.8"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
package/src/applets.test.ts
CHANGED
|
@@ -58,7 +58,12 @@ describe("Applet ids", () => {
|
|
|
58
58
|
expect(appletIdV1("user-42", "d".repeat(32))).toBe(
|
|
59
59
|
`user-42.${"d".repeat(32)}`,
|
|
60
60
|
);
|
|
61
|
-
|
|
61
|
+
// A User id as Better Auth mints it: mixed case, 32 characters.
|
|
62
|
+
expect(appletIdV1("vgpqfaCcwnPlzjYdb2mIfNcOW1YV0SkG", "d".repeat(32))).toBe(
|
|
63
|
+
`vgpqfaCcwnPlzjYdb2mIfNcOW1YV0SkG.${"d".repeat(32)}`,
|
|
64
|
+
);
|
|
65
|
+
expect(() => appletIdV1("user 42", "d".repeat(32))).toThrow();
|
|
66
|
+
expect(() => appletIdV1("", "d".repeat(32))).toThrow();
|
|
62
67
|
expect(() => appletIdV1("user-42", "nope")).toThrow();
|
|
63
68
|
});
|
|
64
69
|
|
package/src/applets.ts
CHANGED
|
@@ -413,7 +413,9 @@ async function sha256Hex(value: string): Promise<string> {
|
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
const APPLET_SECRET_V1 = /^[0-9a-f]{32}$/;
|
|
416
|
-
|
|
416
|
+
// A User id as the auth layer mints it: mixed case, underscore allowed. Must
|
|
417
|
+
// agree with `APPLET_ID_V1`'s owner half.
|
|
418
|
+
const APPLET_OWNER_V1 = /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,95}$/;
|
|
417
419
|
|
|
418
420
|
/**
|
|
419
421
|
* `<publicUserId>.<random>` — ADR 0015's share-id shape, reused.
|