@xyo-network/event-kit-protocol 2.1.0 → 2.2.1
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/dist/neutral/admissionTypes.d.ts +28 -13
- package/dist/neutral/admissionTypes.d.ts.map +1 -1
- package/dist/neutral/grantEvidence.d.ts +7 -5
- package/dist/neutral/grantEvidence.d.ts.map +1 -1
- package/dist/neutral/index.d.ts +5 -2
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +122 -37
- package/dist/neutral/index.mjs.map +4 -4
- package/dist/neutral/memoryWakeQueue.d.ts +2 -3
- package/dist/neutral/memoryWakeQueue.d.ts.map +1 -1
- package/dist/neutral/revocationRecognition.d.ts +8 -0
- package/dist/neutral/revocationRecognition.d.ts.map +1 -0
- package/dist/neutral/staleWakeLeaseError.d.ts +7 -0
- package/dist/neutral/staleWakeLeaseError.d.ts.map +1 -0
- package/dist/neutral/statementGraphWakeGrantAuthorizer.d.ts.map +1 -1
- package/dist/neutral/wakeQueue.d.ts +16 -4
- package/dist/neutral/wakeQueue.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -7,9 +7,8 @@ export interface MemoryWakeQueue<TWake = AdmittedWake> extends WakeQueue<TWake>
|
|
|
7
7
|
/**
|
|
8
8
|
* In-process `WakeQueue`.
|
|
9
9
|
*
|
|
10
|
-
* Structural evidence only: nothing survives process death
|
|
11
|
-
*
|
|
12
|
-
* restart. Use the filesystem or SQLite provider where durability matters.
|
|
10
|
+
* Structural evidence only: nothing survives process death. Explicit recovery
|
|
11
|
+
* invalidates every current lease, so callers must stop all consumers first.
|
|
13
12
|
*/
|
|
14
13
|
export declare function createMemoryWakeQueue<TWake = AdmittedWake>(): MemoryWakeQueue<TWake>;
|
|
15
14
|
//# sourceMappingURL=memoryWakeQueue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memoryWakeQueue.d.ts","sourceRoot":"","sources":["../../src/memoryWakeQueue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"memoryWakeQueue.d.ts","sourceRoot":"","sources":["../../src/memoryWakeQueue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAGV,SAAS,EACV,MAAM,gBAAgB,CAAA;AAEvB,MAAM,WAAW,eAAe,CAAC,KAAK,GAAG,YAAY,CAAE,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC7E,8DAA8D;IAC9D,aAAa,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;CACrC;AAYD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,GAAG,YAAY,KAAK,eAAe,CAAC,KAAK,CAAC,CAmDpF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which recomputable revocation a known target hash belongs to.
|
|
3
|
+
* The object is fully determined by the schema and that one hash field.
|
|
4
|
+
*/
|
|
5
|
+
export type RecomputableRevocationKind = 'acceptance' | 'grant' | 'key' | 'service' | 'subscription';
|
|
6
|
+
/** Canonical data hash of a strict revocation object for one known target hash. */
|
|
7
|
+
export declare function recomputableRevocationHash(kind: RecomputableRevocationKind, targetHash: string): Promise<string>;
|
|
8
|
+
//# sourceMappingURL=revocationRecognition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revocationRecognition.d.ts","sourceRoot":"","sources":["../../src/revocationRecognition.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,cAAc,CAAA;AAEpG,mFAAmF;AACnF,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,0BAA0B,EAChC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAEjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** An expired or already-completed lease cannot alter a queue successor. */
|
|
2
|
+
export declare class StaleWakeLeaseError extends Error {
|
|
3
|
+
readonly code = "stale-wake-lease";
|
|
4
|
+
readonly name = "StaleWakeLeaseError";
|
|
5
|
+
constructor(message?: string);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=staleWakeLeaseError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staleWakeLeaseError.d.ts","sourceRoot":"","sources":["../../src/staleWakeLeaseError.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,sBAAqB;IAClC,SAAkB,IAAI,yBAAwB;gBAElC,OAAO,SAAoC;CAGxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statementGraphWakeGrantAuthorizer.d.ts","sourceRoot":"","sources":["../../src/statementGraphWakeGrantAuthorizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACX,MAAM,gCAAgC,CAAA;AAMvC,OAAO,KAAK,EAGV,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,2BAA2B,CAAA;AAGvF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA;AAE5E,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,UAAU,EAAE,sCAAsC,CAAA;IAC3D,kFAAkF;IAClF,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAA;IACtC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAA;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,uCAAuC,CACrD,OAAO,EAAE,wCAAwC,GAChD,mBAAmB,
|
|
1
|
+
{"version":3,"file":"statementGraphWakeGrantAuthorizer.d.ts","sourceRoot":"","sources":["../../src/statementGraphWakeGrantAuthorizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACX,MAAM,gCAAgC,CAAA;AAMvC,OAAO,KAAK,EAGV,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,2BAA2B,CAAA;AAGvF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA;AAE5E,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,UAAU,EAAE,sCAAsC,CAAA;IAC3D,kFAAkF;IAClF,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAA;IACtC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAA;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,uCAAuC,CACrD,OAAO,EAAE,wCAAwC,GAChD,mBAAmB,CA2CrB"}
|
|
@@ -8,12 +8,23 @@ import type { AdmittedWake } from './types.ts';
|
|
|
8
8
|
* reclaim work whose consumer never finished.
|
|
9
9
|
*/
|
|
10
10
|
export interface LeasedWake<TWake = AdmittedWake> {
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Removes the entry permanently. Call only once the handler committed.
|
|
13
|
+
* Repeating a successful ack resolves; a stale or released lease throws
|
|
14
|
+
* StaleWakeLeaseError and cannot alter any successor.
|
|
15
|
+
*/
|
|
12
16
|
readonly ack: () => Promise<void>;
|
|
13
|
-
/** Returns
|
|
17
|
+
/** Returns work for another attempt. Same-release repeats resolve; stale or acked leases throw. */
|
|
14
18
|
readonly release: () => Promise<void>;
|
|
15
19
|
readonly wake: TWake;
|
|
16
20
|
}
|
|
21
|
+
export interface RecoverInflightOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Operator assertion that every consumer sharing the store has stopped.
|
|
24
|
+
* This is not a liveness check. Recovery deliberately invalidates all leases.
|
|
25
|
+
*/
|
|
26
|
+
readonly consumersStopped: true;
|
|
27
|
+
}
|
|
17
28
|
/**
|
|
18
29
|
* Provider-agnostic durable wake queue.
|
|
19
30
|
*
|
|
@@ -33,9 +44,10 @@ export interface WakeQueue<TWake = AdmittedWake> {
|
|
|
33
44
|
pendingCount: () => Promise<number>;
|
|
34
45
|
/**
|
|
35
46
|
* Returns every in-flight entry to pending and reports how many moved.
|
|
36
|
-
*
|
|
47
|
+
* Call only after ALL store consumers have stopped, including other processes.
|
|
48
|
+
* Startup alone does not establish quiescence. Captured leases are invalidated.
|
|
37
49
|
*/
|
|
38
|
-
recoverInflight: () => Promise<number>;
|
|
50
|
+
recoverInflight: (options: RecoverInflightOptions) => Promise<number>;
|
|
39
51
|
}
|
|
40
52
|
export type WakeHandler<TWake = AdmittedWake> = (wake: TWake) => Promise<void> | void;
|
|
41
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wakeQueue.d.ts","sourceRoot":"","sources":["../../src/wakeQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU,CAAC,KAAK,GAAG,YAAY;IAC9C
|
|
1
|
+
{"version":3,"file":"wakeQueue.d.ts","sourceRoot":"","sources":["../../src/wakeQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU,CAAC,KAAK,GAAG,YAAY;IAC9C;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,mGAAmG;IACnG,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAA;CAChC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS,CAAC,KAAK,GAAG,YAAY;IAC7C,6EAA6E;IAC7E,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,sEAAsE;IACtE,KAAK,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,CAAA;IACnD,mEAAmE;IACnE,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IACnC;;;;OAIG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CACtE;AAED,MAAM,MAAM,WAAW,CAAC,KAAK,GAAG,YAAY,IAAI,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;AAErF;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,KAAK,GAAG,YAAY,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAmB5H"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/event-kit-protocol",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Wallet-JWT Payload verification and admission contracts for XL1 Event Kit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -34,31 +34,31 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@hpke/core": "~1.9.0",
|
|
37
|
-
"@xyo-network/event-kit-schemas": "~2.1
|
|
37
|
+
"@xyo-network/event-kit-schemas": "~2.2.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@ariestools/sdk": "~9.0.1",
|
|
41
|
-
"@ariestools/toolchain": "~10.
|
|
42
|
-
"@ariestools/tsconfig": "~10.
|
|
41
|
+
"@ariestools/toolchain": "~10.1.5",
|
|
42
|
+
"@ariestools/tsconfig": "~10.1.5",
|
|
43
43
|
"@opentelemetry/api": "~1.9.1",
|
|
44
|
-
"@xyo-network/sdk": "~8.0
|
|
45
|
-
"@xyo-network/sdk-protocol": "~8.0.
|
|
46
|
-
"eslint": "~10.
|
|
44
|
+
"@xyo-network/sdk": "~8.1.0",
|
|
45
|
+
"@xyo-network/sdk-protocol": "~8.0.3",
|
|
46
|
+
"eslint": "~10.12.0",
|
|
47
47
|
"eslint-import-resolver-typescript": "~4.4.5",
|
|
48
48
|
"typescript": "~6.0.3",
|
|
49
|
-
"vite": "~8.3.
|
|
49
|
+
"vite": "~8.3.4",
|
|
50
50
|
"vitest": "~5.0.3",
|
|
51
51
|
"zod": "~4.6.5"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@ariestools/sdk": "^9.0",
|
|
55
55
|
"@opentelemetry/api": "^1.9",
|
|
56
|
-
"@xyo-network/sdk": "^8.
|
|
56
|
+
"@xyo-network/sdk": "^8.1",
|
|
57
57
|
"@xyo-network/sdk-protocol": "^8.0",
|
|
58
58
|
"zod": "^4.6"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
61
|
+
"node": ">=26"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|