@requence/service 0.8.2-edge.1159 → 0.8.2-edge.1162
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 +47 -729
- package/build/index.js +255 -67
- package/build/index.js.map +11 -6
- package/build/types/helpers/src/protocol/command.d.ts +36 -0
- package/build/types/helpers/src/protocol/command.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/taskOptions.d.ts +3 -0
- package/build/types/helpers/src/protocol/taskOptions.d.ts.map +1 -1
- package/build/types/service/src/createAmqpConnection.d.ts +0 -1
- package/build/types/service/src/createAmqpConnection.d.ts.map +1 -1
- package/build/types/service/src/helpers.d.ts +20 -1
- package/build/types/service/src/helpers.d.ts.map +1 -1
- package/build/types/service/src/index.d.ts +2 -0
- package/build/types/service/src/index.d.ts.map +1 -1
- package/build/types/service/src/store.d.ts +104 -0
- package/build/types/service/src/store.d.ts.map +1 -0
- package/package.json +2 -1
|
@@ -70,6 +70,9 @@ export declare function createCommandSchemaWith(parseTreeList: (treeList: InputT
|
|
|
70
70
|
streamUrl: z.ZodOptional<z.ZodString>;
|
|
71
71
|
maxPayloadSize: z.ZodOptional<z.ZodNumber>;
|
|
72
72
|
maxFileSize: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
storeUrl: z.ZodOptional<z.ZodString>;
|
|
74
|
+
storeSignature: z.ZodOptional<z.ZodString>;
|
|
75
|
+
storeSignatures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
73
76
|
continuous: z.ZodDefault<z.ZodObject<{
|
|
74
77
|
maxReconnects: z.ZodDefault<z.ZodNumber>;
|
|
75
78
|
}, z.core.$strip>>;
|
|
@@ -92,6 +95,9 @@ export declare function createCommandSchemaWith(parseTreeList: (treeList: InputT
|
|
|
92
95
|
streamUrl?: string | undefined;
|
|
93
96
|
maxPayloadSize?: number | undefined;
|
|
94
97
|
maxFileSize?: number | undefined;
|
|
98
|
+
storeUrl?: string | undefined;
|
|
99
|
+
storeSignature?: string | undefined;
|
|
100
|
+
storeSignatures?: Record<string, string> | undefined;
|
|
95
101
|
continuous: {
|
|
96
102
|
maxReconnects: number;
|
|
97
103
|
};
|
|
@@ -402,6 +408,9 @@ export declare function createCommandSchemaWith(parseTreeList: (treeList: InputT
|
|
|
402
408
|
streamUrl?: string | undefined;
|
|
403
409
|
maxPayloadSize?: number | undefined;
|
|
404
410
|
maxFileSize?: number | undefined;
|
|
411
|
+
storeUrl?: string | undefined;
|
|
412
|
+
storeSignature?: string | undefined;
|
|
413
|
+
storeSignatures?: Record<string, string> | undefined;
|
|
405
414
|
continuous: {
|
|
406
415
|
maxReconnects: number;
|
|
407
416
|
};
|
|
@@ -449,6 +458,9 @@ export declare function createCommandSchemaWithAsync(parseTreeList: (treeList: I
|
|
|
449
458
|
streamUrl: z.ZodOptional<z.ZodString>;
|
|
450
459
|
maxPayloadSize: z.ZodOptional<z.ZodNumber>;
|
|
451
460
|
maxFileSize: z.ZodOptional<z.ZodNumber>;
|
|
461
|
+
storeUrl: z.ZodOptional<z.ZodString>;
|
|
462
|
+
storeSignature: z.ZodOptional<z.ZodString>;
|
|
463
|
+
storeSignatures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
452
464
|
continuous: z.ZodDefault<z.ZodObject<{
|
|
453
465
|
maxReconnects: z.ZodDefault<z.ZodNumber>;
|
|
454
466
|
}, z.core.$strip>>;
|
|
@@ -471,6 +483,9 @@ export declare function createCommandSchemaWithAsync(parseTreeList: (treeList: I
|
|
|
471
483
|
streamUrl?: string | undefined;
|
|
472
484
|
maxPayloadSize?: number | undefined;
|
|
473
485
|
maxFileSize?: number | undefined;
|
|
486
|
+
storeUrl?: string | undefined;
|
|
487
|
+
storeSignature?: string | undefined;
|
|
488
|
+
storeSignatures?: Record<string, string> | undefined;
|
|
474
489
|
continuous: {
|
|
475
490
|
maxReconnects: number;
|
|
476
491
|
};
|
|
@@ -781,6 +796,9 @@ export declare function createCommandSchemaWithAsync(parseTreeList: (treeList: I
|
|
|
781
796
|
streamUrl?: string | undefined;
|
|
782
797
|
maxPayloadSize?: number | undefined;
|
|
783
798
|
maxFileSize?: number | undefined;
|
|
799
|
+
storeUrl?: string | undefined;
|
|
800
|
+
storeSignature?: string | undefined;
|
|
801
|
+
storeSignatures?: Record<string, string> | undefined;
|
|
784
802
|
continuous: {
|
|
785
803
|
maxReconnects: number;
|
|
786
804
|
};
|
|
@@ -815,6 +833,9 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
|
|
|
815
833
|
streamUrl: z.ZodOptional<z.ZodString>;
|
|
816
834
|
maxPayloadSize: z.ZodOptional<z.ZodNumber>;
|
|
817
835
|
maxFileSize: z.ZodOptional<z.ZodNumber>;
|
|
836
|
+
storeUrl: z.ZodOptional<z.ZodString>;
|
|
837
|
+
storeSignature: z.ZodOptional<z.ZodString>;
|
|
838
|
+
storeSignatures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
818
839
|
continuous: z.ZodDefault<z.ZodObject<{
|
|
819
840
|
maxReconnects: z.ZodDefault<z.ZodNumber>;
|
|
820
841
|
}, z.core.$strip>>;
|
|
@@ -837,6 +858,9 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
|
|
|
837
858
|
streamUrl?: string | undefined;
|
|
838
859
|
maxPayloadSize?: number | undefined;
|
|
839
860
|
maxFileSize?: number | undefined;
|
|
861
|
+
storeUrl?: string | undefined;
|
|
862
|
+
storeSignature?: string | undefined;
|
|
863
|
+
storeSignatures?: Record<string, string> | undefined;
|
|
840
864
|
continuous: {
|
|
841
865
|
maxReconnects: number;
|
|
842
866
|
};
|
|
@@ -1147,6 +1171,9 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1147
1171
|
streamUrl?: string | undefined;
|
|
1148
1172
|
maxPayloadSize?: number | undefined;
|
|
1149
1173
|
maxFileSize?: number | undefined;
|
|
1174
|
+
storeUrl?: string | undefined;
|
|
1175
|
+
storeSignature?: string | undefined;
|
|
1176
|
+
storeSignatures?: Record<string, string> | undefined;
|
|
1150
1177
|
continuous: {
|
|
1151
1178
|
maxReconnects: number;
|
|
1152
1179
|
};
|
|
@@ -1230,6 +1257,9 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1230
1257
|
streamUrl: z.ZodOptional<z.ZodString>;
|
|
1231
1258
|
maxPayloadSize: z.ZodOptional<z.ZodNumber>;
|
|
1232
1259
|
maxFileSize: z.ZodOptional<z.ZodNumber>;
|
|
1260
|
+
storeUrl: z.ZodOptional<z.ZodString>;
|
|
1261
|
+
storeSignature: z.ZodOptional<z.ZodString>;
|
|
1262
|
+
storeSignatures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1233
1263
|
continuous: z.ZodDefault<z.ZodObject<{
|
|
1234
1264
|
maxReconnects: z.ZodDefault<z.ZodNumber>;
|
|
1235
1265
|
}, z.core.$strip>>;
|
|
@@ -1252,6 +1282,9 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1252
1282
|
streamUrl?: string | undefined;
|
|
1253
1283
|
maxPayloadSize?: number | undefined;
|
|
1254
1284
|
maxFileSize?: number | undefined;
|
|
1285
|
+
storeUrl?: string | undefined;
|
|
1286
|
+
storeSignature?: string | undefined;
|
|
1287
|
+
storeSignatures?: Record<string, string> | undefined;
|
|
1255
1288
|
continuous: {
|
|
1256
1289
|
maxReconnects: number;
|
|
1257
1290
|
};
|
|
@@ -1562,6 +1595,9 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1562
1595
|
streamUrl?: string | undefined;
|
|
1563
1596
|
maxPayloadSize?: number | undefined;
|
|
1564
1597
|
maxFileSize?: number | undefined;
|
|
1598
|
+
storeUrl?: string | undefined;
|
|
1599
|
+
storeSignature?: string | undefined;
|
|
1600
|
+
storeSignatures?: Record<string, string> | undefined;
|
|
1565
1601
|
continuous: {
|
|
1566
1602
|
maxReconnects: number;
|
|
1567
1603
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAG1B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,QAAQ,EAEd,MAAM,gBAAgB,CAAA;AAGvB,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AA6BrE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,QAAQ
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAG1B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,QAAQ,EAEd,MAAM,gBAAgB,CAAA;AAGvB,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AA6BrE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,E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KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -10,6 +10,9 @@ export declare const taskOptionsSchema: z.ZodObject<{
|
|
|
10
10
|
streamUrl: z.ZodOptional<z.ZodString>;
|
|
11
11
|
maxPayloadSize: z.ZodOptional<z.ZodNumber>;
|
|
12
12
|
maxFileSize: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
storeUrl: z.ZodOptional<z.ZodString>;
|
|
14
|
+
storeSignature: z.ZodOptional<z.ZodString>;
|
|
15
|
+
storeSignatures: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
16
|
continuous: z.ZodDefault<z.ZodObject<{
|
|
14
17
|
maxReconnects: z.ZodDefault<z.ZodNumber>;
|
|
15
18
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskOptions.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/taskOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"taskOptions.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/taskOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;iBAgE5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -21,7 +21,6 @@ interface ActorApi<V> {
|
|
|
21
21
|
send(data: ApiOutputValue<V, null>, options?: {
|
|
22
22
|
overwrite?: boolean;
|
|
23
23
|
}): void;
|
|
24
|
-
sendState(state: unknown): void;
|
|
25
24
|
/**
|
|
26
25
|
* Renders a UI component on the deferred node, for as long as this `act()`
|
|
27
26
|
* call runs — the `act()` re-attach of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAmqpConnection.d.ts","sourceRoot":"","sources":["../../../../src/createAmqpConnection.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,YAAY,EAclB,MAAM,mBAAmB,CAAA;AAiB1B,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAiB1B,OAA4B,EAE1B,KAAK,aAAa,EAClB,KAAK,SAAS,EAKf,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"createAmqpConnection.d.ts","sourceRoot":"","sources":["../../../../src/createAmqpConnection.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,YAAY,EAclB,MAAM,mBAAmB,CAAA;AAiB1B,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAiB1B,OAA4B,EAE1B,KAAK,aAAa,EAClB,KAAK,SAAS,EAKf,MAAM,cAAc,CAAA;AAIrB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAOtD,KAAK,mBAAmB,GAAG,2BAA2B,CAAA;AAatD,KAAK,KAAK,CAAC,CAAC,SAAS,MAAM,eAAe,CAAC,OAAO,IAChD,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;AACrC,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,eAAe,CAAC,OAAO,IACxD,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAA;AAC7C,KAAK,UAAU,CACb,CAAC,SAAS,MAAM,eAAe,CAAC,OAAO,EACvC,CAAC,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAC7C,CAAC,SAAS,aAAa,GAAG,IAAI,GAAG,CAAC,CAAA;AAEtC,KAAK,WAAW,CACd,CAA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AM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,eAAe,CAAC,OAAO,GACnE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,QAAQ,GACjD,sBAAsB,CAAC,CAAC,CAAC,GAErB,4BAA4B,CAAC,CAAC,CAAC,GAC/B,uBAAuB,CAAC,CAAC,CAAC,GAC1B,sBAAsB,CAAC,CAAC,CAAC,GAE3B,4BAA4B,CAAC,CAAC,CAAC,GAC/B,uBAAuB,CAAC,CAAC,CAAC,GAC1B,sBAAsB,CAAC,CAAC,CAAC,CAAA;AAmHjC,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,EACxC,EACE,GAAG,EACH,OAAO,EACP,QAAY,EACZ,MAAc,EACd,iBAAiB,EAKjB,iBAAkD,EAClD,iBAAiB,EACjB,IAAI,EACJ,UAAe,EACf,cAAc,EACd,uBAAuB,EACvB,GAAG,IAAI,EACR,EAAE,iBAAiB,GAAG;IAAE,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAAE,EAC5E,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,oBAkyDlC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
2
|
import type { CallbackObject } from '../../helpers/src/index.js';
|
|
3
|
+
import type { RequenceStore } from './store.ts';
|
|
3
4
|
import type { RenderProps, RequenceUI } from './ui.ts';
|
|
4
5
|
export type JSONValue = string | number | boolean | {
|
|
5
6
|
[x: string]: JSONValue;
|
|
@@ -33,7 +34,6 @@ export interface PrivilegedSends {
|
|
|
33
34
|
sendToOutput(name: string, data: unknown, options?: {
|
|
34
35
|
overwrite?: boolean;
|
|
35
36
|
}): void;
|
|
36
|
-
sendState(state: unknown): void;
|
|
37
37
|
invokeCallback(ref: CallbackObject, arg: unknown): void;
|
|
38
38
|
options: {
|
|
39
39
|
uploadUrl?: string;
|
|
@@ -63,6 +63,13 @@ export default function createContextHelper(options: {
|
|
|
63
63
|
props: unknown;
|
|
64
64
|
surfaceId: string;
|
|
65
65
|
}) => void;
|
|
66
|
+
/**
|
|
67
|
+
* This dispatch's store (#210), built by the caller because only it holds the
|
|
68
|
+
* capability and the two ids the address is composed from. Always present, so
|
|
69
|
+
* `context.store` is never the thing that is missing — a dispatch that
|
|
70
|
+
* carries no capability says so when a slot is read or written.
|
|
71
|
+
*/
|
|
72
|
+
store: RequenceStore;
|
|
66
73
|
sends: PrivilegedSends;
|
|
67
74
|
}): Promise<readonly [{
|
|
68
75
|
taskId: string;
|
|
@@ -70,6 +77,12 @@ export default function createContextHelper(options: {
|
|
|
70
77
|
configuration: unknown;
|
|
71
78
|
toOutput(name: string | null, value: unknown): OutputValue;
|
|
72
79
|
defer: (reason?: string) => string;
|
|
80
|
+
/**
|
|
81
|
+
* What this node remembers past the end of this message, and past the end
|
|
82
|
+
* of this task. `store.private(key)` / `store.shared(key)` is a local
|
|
83
|
+
* handle and makes no call — see `RequenceStore`.
|
|
84
|
+
*/
|
|
85
|
+
store: RequenceStore;
|
|
73
86
|
/**
|
|
74
87
|
* Renders a UI component on this node in the task canvas. `props` is a
|
|
75
88
|
* plain object and that is the entire contract — functions inside it arrive
|
|
@@ -122,6 +135,12 @@ export declare const handlerStorage: AsyncLocalStorage<{
|
|
|
122
135
|
configuration: unknown;
|
|
123
136
|
toOutput(name: string | null, value: unknown): OutputValue;
|
|
124
137
|
defer: (reason?: string) => string;
|
|
138
|
+
/**
|
|
139
|
+
* What this node remembers past the end of this message, and past the end
|
|
140
|
+
* of this task. `store.private(key)` / `store.shared(key)` is a local
|
|
141
|
+
* handle and makes no call — see `RequenceStore`.
|
|
142
|
+
*/
|
|
143
|
+
store: RequenceStore;
|
|
125
144
|
/**
|
|
126
145
|
* Renders a UI component on this node in the task canvas. `props` is a
|
|
127
146
|
* plain object and that is the entire contract — functions inside it arrive
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAIvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEtD,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC1B,KAAK,CAAC,SAAS,CAAC,GAChB,IAAI,GACJ,SAAS,CAAA;AAEb,qBAAa,UAAW,SAAQ,KAAK;IAChB,KAAK,CAAC,EAAE,MAAM;IAAjC,YAAmB,KAAK,CAAC,EAAE,MAAM,YAAA,EAEhC;CACF;AAED,qBAAa,SAAU,SAAQ,KAAK;CAAG;AAEvC,qBAAa,UAAW,SAAQ,KAAK;CAAG;AAExC,QAAA,MAAM,YAAY,eAAyB,CAAA;AAE3C,KAAK,WAAW,GAAG;IACjB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,KAAK,EAAE,GAAG,CAAA;CACX,CAAA;AAMD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG;IAClD,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,CAKA;AAOD,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,O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B,MAAM,GAAG,IAAI,SAAS,OAAO,GAAG,WAAW;qBArDzC,MAAM,KAAK,MAAM;IA6DlC;;;;OAIG;;IAGH;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;WACI,KAAK,MACN,UAAU,CAAC,KAAK,CAAC,SACd,WAAW,CAAC,KAAK,CAAC,kBACT;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;QAUtC,GAAG,UAAU,GAAG,EAAE;QAGlB,IAAI,UAAU,GAAG,EAAE;QAGnB,IAAI,UAAU,GAAG,EAAE;QAGnB,KAAK,UAAU,GAAG,EAAE;;kBAIR,MAAM;mBAGL,MAAM;;;;;kCAcxB;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAM9E,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,eAAe,CAAA;AAE/D,eAAO,MAAM,cAAc;;;;mBAhGR,MAAM,GAAG,IAAI,SAAS,OAAO,GAAG,WAAW;qBArDzC,MAAM,KAAK,MAAM;IA6DlC;;;;OAIG;;IAGH;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;WACI,KAAK,MACN,UAAU,CAAC,KAAK,CAAC,SACd,WAAW,CAAC,KAAK,CAAC,kBACT;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;QAUtC,GAAG,UAAU,GAAG,EAAE;QAGlB,IAAI,UAAU,GAAG,EAAE;QAGnB,IAAI,UAAU,GAAG,EAAE;QAGnB,KAAK,UAAU,GAAG,EAAE;;kBAIR,MAAM;mBAGL,MAAM;;;;;EAwB2C,CAAA"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { AmqpConnectionManagerOptions } from 'amqp-connection-manager';
|
|
2
2
|
import { type ConnectionApi, type ConnectionStateListener, type MessageHandler } from './createAmqpConnection.ts';
|
|
3
3
|
export { RequenceFile, RequenceStream } from '@requence/files';
|
|
4
|
+
export { StoreAddressFullError, StoreError, StoreRequestError, StoreTaskNotAllowedError, StoreUnauthorizedError, StoreUnavailableError, StoreValueNotStorableError, StoreValueTooLargeError, type StoreBinding, } from '@requence/store';
|
|
4
5
|
export { createCallback, type RequenceCallback, type WrappedRequenceCallback, } from '../../helpers/src/index.js';
|
|
5
6
|
export { type Bindable, type ConfigurationOf, type DurableCallback, type DurableCallbackContext, type DurableCallbackHandle, type DurableCallbackHandler, createDurableCallback, } from './durableCallback.ts';
|
|
6
7
|
export * from './errors.ts';
|
|
7
8
|
export type { ButtonProps, CheckboxProps, SelectOption, SelectProps, StackProps, SurfaceSpace, TextFieldProps, TextProps, } from './surfaceUi.ts';
|
|
9
|
+
export type { RequenceStore, StoreSlot } from './store.ts';
|
|
8
10
|
export * from './ui.ts';
|
|
9
11
|
export * from './utils.ts';
|
|
10
12
|
export { type ConnectionState, type ConnectionStateListener, MessageHandler, } from './createAmqpConnection.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAA;AAE3E,OAA6B,EAC3B,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EAEpB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAA;AAE3E,OAA6B,EAC3B,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EAEpB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAM9D,OAAO,EACL,qBAAq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AAA;IAC1B,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,iBAAiB,CAAC,EAAE,4BAA4B,CAAC,mBAAmB,CAAC,CAAA;IACrE,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAA;IAGvB,yBAAyB,CAAC,EAAE,OAAO,CAAA;IACnC;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AA4CD,wBAAgB,aAAa,CAC3B,CAAC,SAAS,MAAM,eAAe,CAAC,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EACvD,OAAO,EAAE,CAAC,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA;AAC/D,wBAAgB,aAAa,CAC3B,CAAC,SAAS,MAAM,eAAe,CAAC,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EACvD,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { type JSONValue, type StoreBinding } from '@requence/store';
|
|
2
|
+
/**
|
|
3
|
+
* A handle to a single slot — one key under one binding, private to this node or
|
|
4
|
+
* shared with every node of the subject.
|
|
5
|
+
*
|
|
6
|
+
* The value type is a parameter on the verb, not on `get()` (#190), so a held
|
|
7
|
+
* handle types the read and the write once. `get()` answers `T | null` and
|
|
8
|
+
* `set` takes `T | null` because `null` and unset collapse in the store (#181):
|
|
9
|
+
* the type is what forces an author to handle the cold start, and without it
|
|
10
|
+
* `private<number>` would lie on the first run.
|
|
11
|
+
*
|
|
12
|
+
* Every later operation (`increment`, `compareAndSet`) belongs here rather than
|
|
13
|
+
* on `store`, so adding one adds no name anywhere — as `delete` did (#223).
|
|
14
|
+
*/
|
|
15
|
+
export interface StoreSlot<T extends JSONValue = JSONValue> {
|
|
16
|
+
get(): Promise<T | null>;
|
|
17
|
+
set(value: T | null): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Frees the key. `set(null)` does NOT — `null` is a value and the key stays
|
|
20
|
+
* occupied — so this is the only escape from the 64-key cap for a node that
|
|
21
|
+
* writes computed keys (#223). Deleting a key that was never written is not
|
|
22
|
+
* an error: there is nothing to report, since unset and `null` collapse.
|
|
23
|
+
*/
|
|
24
|
+
delete(): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* `context.store` — what a node remembers past the end of its message, past the
|
|
28
|
+
* end of its task, and what two nodes remember together.
|
|
29
|
+
*
|
|
30
|
+
* **Two orthogonal axes, each said once** (#225): the VERB carries ownership,
|
|
31
|
+
* the ARGUMENT carries lifetime.
|
|
32
|
+
*
|
|
33
|
+
* ```ts
|
|
34
|
+
* context.store.private('cursor', 'task') // this node, this run
|
|
35
|
+
* context.store.private('cursor', 'taskTemplate') // this node, survives the run
|
|
36
|
+
* context.store.shared('cursor', 'task') // every node, this run
|
|
37
|
+
* context.store.shared('cursor', 'taskTemplate') // every node, survives the run
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* The binding **defaults to `task`** — the forgetful option — so the
|
|
41
|
+
* consequential case is always written out and `taskTemplate` can never be
|
|
42
|
+
* mistaken for temporary. `shared('cursor')` therefore states neither axis; the
|
|
43
|
+
* docs say the two axes outright rather than leaving them to be inferred.
|
|
44
|
+
*
|
|
45
|
+
* Ownership is a verb rather than a third binding literal because a wrong string
|
|
46
|
+
* is only caught at call time in Python and in both guests, while a missing
|
|
47
|
+
* method fails in every language.
|
|
48
|
+
*
|
|
49
|
+
* ```ts
|
|
50
|
+
* // held, when a handler touches the slot more than once
|
|
51
|
+
* const cursor = context.store.shared<number>('lastUid', 'taskTemplate')
|
|
52
|
+
* await cursor.set(((await cursor.get()) ?? 0) + 1)
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* The author never types an address: every part of one is derived from ids the
|
|
56
|
+
* platform already holds.
|
|
57
|
+
*/
|
|
58
|
+
export interface RequenceStore {
|
|
59
|
+
/** This node only — nothing else can read it. */
|
|
60
|
+
private<T extends JSONValue = JSONValue>(key: string, binding?: StoreBinding): StoreSlot<T>;
|
|
61
|
+
/**
|
|
62
|
+
* Every node of the same subject: one writes it, another's next run reads it.
|
|
63
|
+
*
|
|
64
|
+
* There is no referee — last write wins, and the Concurrency switch cannot
|
|
65
|
+
* help, because it makes a node wait for ITSELF and is keyed by node id (#225,
|
|
66
|
+
* D5). Two nodes writing one key lose a write.
|
|
67
|
+
*/
|
|
68
|
+
shared<T extends JSONValue = JSONValue>(key: string, binding?: StoreBinding): StoreSlot<T>;
|
|
69
|
+
}
|
|
70
|
+
export interface StoreDispatch {
|
|
71
|
+
/** the public store URL, off the dispatch — told, never derived */
|
|
72
|
+
url?: string;
|
|
73
|
+
/** the signature ui/backend minted for this task's tree */
|
|
74
|
+
signature?: string;
|
|
75
|
+
/** the running task, off the dispatch */
|
|
76
|
+
taskId: string;
|
|
77
|
+
/** the node being dispatched, off the dispatch */
|
|
78
|
+
nodeId?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Set only when this dispatch is a configuration-function evaluation (#224).
|
|
81
|
+
* `nodeId` is then the HOST node — the node being configured — and the store
|
|
82
|
+
* composes `private` slots into that node's CONFIGURATION box, which the host
|
|
83
|
+
* service cannot see and which cannot see the host service's own box.
|
|
84
|
+
* `shared` is the bridge between the two, and is unaffected.
|
|
85
|
+
*/
|
|
86
|
+
configuration?: boolean;
|
|
87
|
+
/** injectable for tests; defaults to the global `fetch` */
|
|
88
|
+
fetch?: typeof globalThis.fetch;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Builds the `store` of one dispatch's handler context.
|
|
92
|
+
*
|
|
93
|
+
* **Both verbs are local and do no I/O**, so a handler that never touches a slot
|
|
94
|
+
* makes zero calls — which is also why the client behind it is built on the
|
|
95
|
+
* first operation rather than here: a dispatch that never reads the store pays
|
|
96
|
+
* nothing for carrying a capability.
|
|
97
|
+
*
|
|
98
|
+
* A store call is an HTTP call and fails like one (#183): it throws at the line
|
|
99
|
+
* that made it, and an uncaught throw escalates as an ordinary node failure —
|
|
100
|
+
* the error branch when the node has one, the task when it does not. There is
|
|
101
|
+
* no retry, no timeout and no store-specific path.
|
|
102
|
+
*/
|
|
103
|
+
export declare function createStore(dispatch: StoreDispatch): RequenceStore;
|
|
104
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,YAAY,EAKlB,MAAM,iBAAiB,CAAA;AAExB;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS;IACxD,GAAG,IAAI,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;IACxB,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACnC;;;;;OAKG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,OAAO,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACrC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,YAAY,GACrB,SAAS,CAAC,CAAC,CAAC,CAAA;IACf;;;;;;OAMG;IACH,MAAM,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EACpC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,YAAY,GACrB,SAAS,CAAC,CAAC,CAAC,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAA;IACd,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;CAChC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa,CAiElE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@requence/service",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.8.2-edge.
|
|
4
|
+
"version": "0.8.2-edge.1162",
|
|
5
5
|
"bin": {
|
|
6
6
|
"requence-service": "build/cli.js"
|
|
7
7
|
},
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@requence/files": "workspace:*",
|
|
29
29
|
"@requence/helpers": "workspace:*",
|
|
30
30
|
"@requence/logger": "workspace:*",
|
|
31
|
+
"@requence/store": "workspace:*",
|
|
31
32
|
"@requence/transformer": "workspace:*",
|
|
32
33
|
"@requence/utils": "workspace:*",
|
|
33
34
|
"@types/amqplib": "^0.10.7",
|