@agoric/internal 0.5.0-u23.0 → 0.5.0-u23.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/package.json +7 -3
- package/src/action-types.d.ts +89 -0
- package/src/action-types.d.ts.map +1 -0
- package/src/ava-force-exit.d.mts +2 -0
- package/src/ava-force-exit.d.mts.map +1 -0
- package/src/batched-deliver.d.ts +22 -0
- package/src/batched-deliver.d.ts.map +1 -0
- package/src/build-cache-types.d.ts +33 -0
- package/src/build-cache-types.d.ts.map +1 -0
- package/src/build-cache.d.ts +12 -0
- package/src/build-cache.d.ts.map +1 -0
- package/src/callback.d.ts +28 -0
- package/src/callback.d.ts.map +1 -0
- package/src/chain-storage-paths.d.ts +15 -0
- package/src/chain-storage-paths.d.ts.map +1 -0
- package/src/chain-utils.d.ts +27 -0
- package/src/chain-utils.d.ts.map +1 -0
- package/src/cli-utils.d.ts +2 -0
- package/src/cli-utils.d.ts.map +1 -0
- package/src/config.d.ts +54 -0
- package/src/config.d.ts.map +1 -0
- package/src/debug.d.ts +5 -0
- package/src/debug.d.ts.map +1 -0
- package/src/errors.d.ts +2 -0
- package/src/errors.d.ts.map +1 -0
- package/src/hex.d.ts +15 -0
- package/src/hex.d.ts.map +1 -0
- package/src/index.d.ts +16 -0
- package/src/index.d.ts.map +1 -0
- package/src/install-ses-debug.d.ts +2 -0
- package/src/install-ses-debug.d.ts.map +1 -0
- package/src/js-utils.d.ts +44 -0
- package/src/js-utils.d.ts.map +1 -0
- package/src/keyMirror.d.ts +3 -0
- package/src/keyMirror.d.ts.map +1 -0
- package/src/kv-store.d.ts +33 -0
- package/src/kv-store.d.ts.map +1 -0
- package/src/lib-chainStorage.d.ts +182 -0
- package/src/lib-chainStorage.d.ts.map +1 -0
- package/src/lib-nodejs/ava-unhandled-rejection.d.ts +28 -0
- package/src/lib-nodejs/ava-unhandled-rejection.d.ts.map +1 -0
- package/src/lib-nodejs/engine-gc.d.ts +3 -0
- package/src/lib-nodejs/engine-gc.d.ts.map +1 -0
- package/src/lib-nodejs/gc-and-finalize.d.ts +2 -0
- package/src/lib-nodejs/gc-and-finalize.d.ts.map +1 -0
- package/src/lib-nodejs/spawnSubprocessWorker.d.ts +13 -0
- package/src/lib-nodejs/spawnSubprocessWorker.d.ts.map +1 -0
- package/src/lib-nodejs/waitUntilQuiescent.d.ts +5 -0
- package/src/lib-nodejs/waitUntilQuiescent.d.ts.map +1 -0
- package/src/lib-nodejs/worker-protocol.d.ts +4 -0
- package/src/lib-nodejs/worker-protocol.d.ts.map +1 -0
- package/src/magic-cookie-test-only.d.ts +2 -0
- package/src/magic-cookie-test-only.d.ts.map +1 -0
- package/src/marshal/board-client-utils.d.ts +19 -0
- package/src/marshal/board-client-utils.d.ts.map +1 -0
- package/src/marshal/cap-data.d.ts +11 -0
- package/src/marshal/cap-data.d.ts.map +1 -0
- package/src/marshal/inaccessible-val.d.ts +2 -0
- package/src/marshal/inaccessible-val.d.ts.map +1 -0
- package/src/marshal/pure-data.d.ts +8 -0
- package/src/marshal/pure-data.d.ts.map +1 -0
- package/src/marshal/wrap-marshaller.d.ts +60 -0
- package/src/marshal/wrap-marshaller.d.ts.map +1 -0
- package/src/method-tools.d.ts +4 -0
- package/src/method-tools.d.ts.map +1 -0
- package/src/metrics.d.ts +183 -0
- package/src/metrics.d.ts.map +1 -0
- package/src/module-utils.d.ts +3 -0
- package/src/module-utils.d.ts.map +1 -0
- package/src/natural-sort.d.ts +2 -0
- package/src/natural-sort.d.ts.map +1 -0
- package/src/netstring.d.ts +24 -0
- package/src/netstring.d.ts.map +1 -0
- package/src/node/buffer-line-transform.d.ts +50 -0
- package/src/node/buffer-line-transform.d.ts.map +1 -0
- package/src/node/createBundles.d.ts +4 -0
- package/src/node/createBundles.d.ts.map +1 -0
- package/src/node/fs-stream.d.ts +13 -0
- package/src/node/fs-stream.d.ts.map +1 -0
- package/src/node/read-json.d.ts +2 -0
- package/src/node/read-json.d.ts.map +1 -0
- package/src/node/shutdown.d.ts +6 -0
- package/src/node/shutdown.d.ts.map +1 -0
- package/src/priority-senders.d.ts +33 -0
- package/src/priority-senders.d.ts.map +1 -0
- package/src/queue.d.ts +2 -0
- package/src/queue.d.ts.map +1 -0
- package/src/scratch.d.ts +19 -0
- package/src/scratch.d.ts.map +1 -0
- package/src/ses-utils.d.ts +90 -0
- package/src/ses-utils.d.ts.map +1 -0
- package/src/storage-test-utils.d.ts +76 -0
- package/src/storage-test-utils.d.ts.map +1 -0
- package/src/testing-utils.d.ts +8 -0
- package/src/testing-utils.d.ts.map +1 -0
- package/src/tmpDir.d.ts +2 -0
- package/src/tmpDir.d.ts.map +1 -0
- package/src/tokens.d.ts +34 -0
- package/src/tokens.d.ts.map +1 -0
- package/src/typeCheck.d.ts +9 -0
- package/src/typeCheck.d.ts.map +1 -0
- package/src/typeGuards.d.ts +23 -0
- package/src/typeGuards.d.ts.map +1 -0
- package/src/types.d.ts +100 -0
- package/src/types.d.ts.map +1 -0
- package/src/upgrade-api.d.ts +18 -0
- package/src/upgrade-api.d.ts.map +1 -0
- package/src/work-pool.d.ts +13 -0
- package/src/work-pool.d.ts.map +1 -0
- package/vendor/anylogger.d.ts +1 -0
- package/vendor/anylogger.d.ts.map +1 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a heap-based root storage node for a given backing function and root
|
|
3
|
+
* path.
|
|
4
|
+
*
|
|
5
|
+
* @param {(message: StorageMessage) => any} handleStorageMessage a function for
|
|
6
|
+
* sending a storageMessage object to the storage implementation (cf.
|
|
7
|
+
* golang/cosmos/x/vstorage/vstorage.go)
|
|
8
|
+
* @param {string} rootPath
|
|
9
|
+
* @param {object} [rootOptions]
|
|
10
|
+
* @param {boolean} [rootOptions.sequence] employ a wrapping structure that
|
|
11
|
+
* preserves each value set within a single block, and default child nodes to
|
|
12
|
+
* do the same
|
|
13
|
+
*/
|
|
14
|
+
export function makeChainStorageRoot(handleStorageMessage: (message: StorageMessage) => any, rootPath: string, rootOptions?: {
|
|
15
|
+
sequence?: boolean | undefined;
|
|
16
|
+
}): import("@endo/exo").Guarded<{
|
|
17
|
+
getPath(): string;
|
|
18
|
+
getStoreKey(): Promise<VStorageKey>;
|
|
19
|
+
makeChildNode(name: string, childNodeOptions?: {
|
|
20
|
+
sequence?: boolean;
|
|
21
|
+
}): StorageNode;
|
|
22
|
+
setValue(value: string): Promise<void>;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Convenience function for returning a storage node at or under its input,
|
|
26
|
+
* falling back to an inert object with the correct interface (but incomplete
|
|
27
|
+
* behavior) when that is unavailable.
|
|
28
|
+
*
|
|
29
|
+
* @param {ERef<Remote<StorageNode> | null>} storageNodeRef
|
|
30
|
+
* @param {string} childName
|
|
31
|
+
* @returns {Promise<Remote<StorageNode>>}
|
|
32
|
+
*/
|
|
33
|
+
export function makeStorageNodeChild(storageNodeRef: ERef<Remote<StorageNode> | null>, childName: string): Promise<Remote<StorageNode>>;
|
|
34
|
+
/**
|
|
35
|
+
* @import {ERef} from '@endo/far';
|
|
36
|
+
* @import {Marshal, Passable} from '@endo/marshal';
|
|
37
|
+
* @import {Remote, ERemote, TypedPattern} from './types.js';
|
|
38
|
+
* @import {EMarshaller} from './marshal/wrap-marshaller.js';
|
|
39
|
+
* @import {Zone} from '@agoric/base-zone';
|
|
40
|
+
* @import {Callback} from './types.js';
|
|
41
|
+
*/
|
|
42
|
+
/** @typedef {Marshal<unknown>} Marshaller */
|
|
43
|
+
/** @typedef {Pick<Marshaller, 'fromCapData'>} Unserializer */
|
|
44
|
+
/**
|
|
45
|
+
* Defined by vstorageStoreKey in vstorage.go
|
|
46
|
+
*
|
|
47
|
+
* @typedef VStorageKey
|
|
48
|
+
* @property {string} storeName
|
|
49
|
+
* @property {string} storeSubkey
|
|
50
|
+
* @property {string} dataPrefixBytes
|
|
51
|
+
* @property {string} [noDataValue]
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* @template [T=unknown]
|
|
55
|
+
* @typedef StreamCell
|
|
56
|
+
* @property {string} blockHeight corresponding with the write of `values`
|
|
57
|
+
* (decimal representation of a natural number)
|
|
58
|
+
* @property {T[]} values
|
|
59
|
+
*/
|
|
60
|
+
/** @type {TypedPattern<StreamCell>} */
|
|
61
|
+
export const StreamCellShape: TypedPattern<StreamCell>;
|
|
62
|
+
export function isStreamCell(cell: any): cell is StreamCell;
|
|
63
|
+
/** @type {(name: string) => void} */
|
|
64
|
+
export const assertPathSegment: (name: string) => void;
|
|
65
|
+
export function prepareChainStorageNode(zone: Zone): (messenger: Callback<(message: StorageMessage) => any>, path: string, args_2?: {
|
|
66
|
+
sequence?: boolean | undefined;
|
|
67
|
+
} | undefined) => import("@endo/exo").Guarded<{
|
|
68
|
+
getPath(): string;
|
|
69
|
+
getStoreKey(): Promise<VStorageKey>;
|
|
70
|
+
makeChildNode(name: string, childNodeOptions?: {
|
|
71
|
+
sequence?: boolean;
|
|
72
|
+
}): StorageNode;
|
|
73
|
+
setValue(value: string): Promise<void>;
|
|
74
|
+
}>;
|
|
75
|
+
export function makeSerializeToStorage(storageNode: ERemote<StorageNode>, marshaller: ERemote<EMarshaller>): (value: Passable) => Promise<void>;
|
|
76
|
+
export type Marshaller = Marshal<unknown>;
|
|
77
|
+
export type Unserializer = Pick<Marshaller, "fromCapData">;
|
|
78
|
+
/**
|
|
79
|
+
* Defined by vstorageStoreKey in vstorage.go
|
|
80
|
+
*/
|
|
81
|
+
export type VStorageKey = {
|
|
82
|
+
storeName: string;
|
|
83
|
+
storeSubkey: string;
|
|
84
|
+
dataPrefixBytes: string;
|
|
85
|
+
noDataValue?: string | undefined;
|
|
86
|
+
};
|
|
87
|
+
export type StreamCell<T = unknown> = {
|
|
88
|
+
/**
|
|
89
|
+
* corresponding with the write of `values`
|
|
90
|
+
* (decimal representation of a natural number)
|
|
91
|
+
*/
|
|
92
|
+
blockHeight: string;
|
|
93
|
+
values: T[];
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* This represents a node in an IAVL tree.
|
|
97
|
+
*
|
|
98
|
+
* The active implementation is x/vstorage, an Agoric extension of the Cosmos
|
|
99
|
+
* SDK.
|
|
100
|
+
*
|
|
101
|
+
* Vstorage is a hierarchical externally-reachable storage structure that
|
|
102
|
+
* identifies children by restricted ASCII name and is associated with arbitrary
|
|
103
|
+
* string-valued data for each node, defaulting to the empty string.
|
|
104
|
+
*/
|
|
105
|
+
export type StorageNode = {
|
|
106
|
+
/**
|
|
107
|
+
* publishes some data
|
|
108
|
+
*/
|
|
109
|
+
setValue: (data: string) => Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* the chain storage path at which the node was
|
|
112
|
+
* constructed
|
|
113
|
+
*/
|
|
114
|
+
getPath: () => string;
|
|
115
|
+
/**
|
|
116
|
+
* DEPRECATED use getPath
|
|
117
|
+
*/
|
|
118
|
+
getStoreKey: () => Promise<VStorageKey>;
|
|
119
|
+
makeChildNode: (subPath: string, options?: {
|
|
120
|
+
sequence?: boolean;
|
|
121
|
+
}) => StorageNode;
|
|
122
|
+
};
|
|
123
|
+
export type StoredFacet = {
|
|
124
|
+
/**
|
|
125
|
+
* the chain storage path at which the
|
|
126
|
+
* node was constructed
|
|
127
|
+
*/
|
|
128
|
+
getPath: () => Promise<string>;
|
|
129
|
+
/**
|
|
130
|
+
* DEPRECATED use getPath
|
|
131
|
+
*/
|
|
132
|
+
getStoreKey: StorageNode["getStoreKey"];
|
|
133
|
+
/**
|
|
134
|
+
* get the unserializer for the
|
|
135
|
+
* stored data
|
|
136
|
+
*/
|
|
137
|
+
getUnserializer: () => Unserializer;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
141
|
+
*/
|
|
142
|
+
export type StorageGetByPathMessageMethod = "get" | "getStoreKey" | "has" | "children" | "entries" | "values" | "size";
|
|
143
|
+
/**
|
|
144
|
+
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
145
|
+
*/
|
|
146
|
+
export type StorageUpdateEntriesMessageMethod = "set" | "setWithoutNotify" | "append";
|
|
147
|
+
/**
|
|
148
|
+
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
149
|
+
*/
|
|
150
|
+
export type StorageMessageMethod = StorageGetByPathMessageMethod | StorageUpdateEntriesMessageMethod;
|
|
151
|
+
/**
|
|
152
|
+
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
153
|
+
*/
|
|
154
|
+
export type StorageGetByPathMessageArgs = [path: string];
|
|
155
|
+
/**
|
|
156
|
+
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
157
|
+
*/
|
|
158
|
+
export type StorageEntry = [path: string, value?: string | null];
|
|
159
|
+
/**
|
|
160
|
+
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
161
|
+
*/
|
|
162
|
+
export type StorageUpdateEntriesMessageArgs = StorageEntry[];
|
|
163
|
+
/**
|
|
164
|
+
* Must match the switch in vstorage.go using `vstorageMessage` type
|
|
165
|
+
*/
|
|
166
|
+
export type StorageMessage = {
|
|
167
|
+
method: StorageGetByPathMessageMethod;
|
|
168
|
+
args: StorageGetByPathMessageArgs;
|
|
169
|
+
} | {
|
|
170
|
+
method: StorageUpdateEntriesMessageMethod;
|
|
171
|
+
args: StorageUpdateEntriesMessageArgs;
|
|
172
|
+
};
|
|
173
|
+
import type { Remote } from './types.js';
|
|
174
|
+
import type { ERef } from '@endo/far';
|
|
175
|
+
import type { TypedPattern } from './types.js';
|
|
176
|
+
import type { Zone } from '@agoric/base-zone';
|
|
177
|
+
import type { Callback } from './types.js';
|
|
178
|
+
import type { ERemote } from './types.js';
|
|
179
|
+
import type { EMarshaller } from './marshal/wrap-marshaller.js';
|
|
180
|
+
import type { Passable } from '@endo/marshal';
|
|
181
|
+
import type { Marshal } from '@endo/marshal';
|
|
182
|
+
//# sourceMappingURL=lib-chainStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib-chainStorage.d.ts","sourceRoot":"","sources":["lib-chainStorage.js"],"names":[],"mappings":"AAiPA;;;;;;;;;;;;GAYG;AACH,2DATW,CAAC,OAAO,EAAE,cAAc,KAAK,GAAG,YAGhC,MAAM,gBAEd;IAA8B,QAAQ;CAGxC;;mBAnEqB,OAAO,CAAC,WAAW,CAAC;wBAWzB,MAAM,qBACO;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GACtC,WAAW;oBAYA,MAAM,GAAK,OAAO,CAAC,IAAI,CAAC;GAqDhD;AAcD;;;;;;;;GAQG;AACH,qDAJW,KAAK,OAAO,WAAW,CAAC,GAAG,IAAI,CAAC,aAChC,MAAM,GACJ,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAMxC;AA3RD;;;;;;;GAOG;AAEH,6CAA6C;AAC7C,8DAA8D;AAE9D;;;;;;;;GAQG;AAEH;;;;;;GAMG;AAEH,uCAAuC;AACvC,8BADW,aAAa,UAAU,CAAC,CAIhC;AAwCI,mCAHI,GAAG,GACD,IAAI,IAAI,UAAU,CAOa;AAmB5C,qCAAqC;AACrC,gCADW,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAI/B;AAyCK,8CAFI,IAAI,kCAqBmB,cAAc,KAAK,GAAG;;;;mBAgBlC,OAAO,CAAC,WAAW,CAAC;wBAWzB,MAAM,qBACO;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GACtC,WAAW;oBAYA,MAAM,GAAK,OAAO,CAAC,IAAI,CAAC;GA0BhD;AA+DM,oDAJI,QAAQ,WAAW,CAAC,cACpB,QAAQ,WAAW,CAAC,GAClB,CAAC,KAAK,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAQ9C;yBAjSa,QAAQ,OAAO,CAAC;2BAChB,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC;;;;;eAM/B,MAAM;iBACN,MAAM;qBACN,MAAM;;;uBAKN,CAAC;;;;;iBAED,MAAM;YAEN,CAAC,EAAE;;;;;;;;;;;;;;;;cAoBH,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;;;;;aAC/B,MAAM,MAAM;;;;iBAEZ,MAAM,OAAO,CAAC,WAAW,CAAC;mBAC1B,CACT,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7B,WAAW;;;;;;;aA8BL,MAAM,OAAO,CAAC,MAAM,CAAC;;;;iBAErB,WAAW,CAAC,aAAa,CAAC;;;;;qBAC1B,MAAM,YAAY;;;;;4CAqBnB,KAAK,GACX,aAAa,GACb,KAAK,GACL,UAAU,GACV,SAAS,GACT,QAAQ,GACR,MAAM;;;;gDAGA,KAAK,GAAG,kBAAkB,GAAG,QAAQ;;;;mCAGrC,6BAA6B,GACnC,iCAAiC;;;;0CAG3B,CAAC,IAAI,EAAE,MAAM,CAAC;;;;2BAEd,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;;;;8CAErC,YAAY,EAAE;;;;6BAEd;IACJ,MAAM,EAAE,6BAA6B,CAAC;IACtC,IAAI,EAAE,2BAA2B,CAAC;CACnC,GACD;IACE,MAAM,EAAE,iCAAiC,CAAC;IAC1C,IAAI,EAAE,+BAA+B,CAAC;CACvC;4BAtIwC,YAAY;0BAFrC,WAAW;kCAEc,YAAY;0BAErC,mBAAmB;8BACf,YAAY;6BAHS,YAAY;iCAC9B,8BAA8B;8BAFxB,eAAe;6BAAf,eAAe"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {ExecutionContext, ImplementationFn, Macro, MacroDeclarationOptions,TestFn} from 'ava';
|
|
3
|
+
*/
|
|
4
|
+
/** Not an official AVA feature, so prefix with `AGORIC_` */
|
|
5
|
+
export const AGORIC_AVA_EXPECT_UNHANDLED_REJECTIONS: "AGORIC_AVA_EXPECT_UNHANDLED_REJECTIONS";
|
|
6
|
+
/** Backwards compatibility... */
|
|
7
|
+
export const AVA_EXPECT_UNHANDLED_REJECTIONS: "AGORIC_AVA_EXPECT_UNHANDLED_REJECTIONS";
|
|
8
|
+
export function countUnhandled(work: () => any | Promise<any>, { gcAndFinalize }: {
|
|
9
|
+
gcAndFinalize: () => Promise<void>;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
unhandled: number;
|
|
12
|
+
pending: number;
|
|
13
|
+
seenUnhandled: number;
|
|
14
|
+
}>;
|
|
15
|
+
export function makeExpectUnhandledRejection<C>({ test, sameWorker, importMetaUrl, }: {
|
|
16
|
+
test: TestFn<C>;
|
|
17
|
+
sameWorker?: boolean | undefined;
|
|
18
|
+
importMetaUrl: string;
|
|
19
|
+
}): (expectedUnhandled: number) => Macro<[name: string, impl: (t: ExecutionContext<C>) => any], C>;
|
|
20
|
+
export function makeExpectUnhandledRejectionMacro<C = unknown>({ test, sameWorker, importMetaUrl, }: {
|
|
21
|
+
test: TestFn<C>;
|
|
22
|
+
sameWorker?: boolean | undefined;
|
|
23
|
+
importMetaUrl: string;
|
|
24
|
+
}): (numUnhandled: number, innerMacro?: Macro<A, C>) => Macro<A, C>;
|
|
25
|
+
import type { TestFn } from 'ava';
|
|
26
|
+
import type { ExecutionContext } from 'ava';
|
|
27
|
+
import type { Macro } from 'ava';
|
|
28
|
+
//# sourceMappingURL=ava-unhandled-rejection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ava-unhandled-rejection.d.ts","sourceRoot":"","sources":["ava-unhandled-rejection.js"],"names":[],"mappings":"AAOA;;GAEG;AAEH,4DAA4D;AAC5D,qDACE,wCAAwC,CAAC;AAC3C,iCAAiC;AACjC,uFACyC;AA2ElC,qCAJI,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,qBAEhC;IAAoC,aAAa,EAAzC,MAAM,OAAO,CAAC,IAAI,CAAC;CAC7B;;;;GA4BA;AAeM,6CARM,CAAC,wCAEX;IAA0B,IAAI,EAAtB,OAAO,CAAC,CAAC;IACQ,UAAU;IACZ,aAAa,EAA5B,MAAM;CACd,GAAU,CAAE,iBAAiB,EAAE,MAAM,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EACzE,iBAAqB,CAAC,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAkEpC;AASM,kDANO,CAAC,kDAEZ;IAA0B,IAAI,EAAtB,OAAO,CAAC,CAAC;IACQ,UAAU;IACZ,aAAa,EAA5B,MAAM;CAChB,IAiBS,cAJG,MAIS,EAAE,aAHX,MAAM,CAAC,EAAE,CAAC,CAGW,KAFnB,MAAM,CAAC,EAAE,CAAC,CAAC,CAoCzB;4BAxP2F,KAAK;sCAAL,KAAK;2BAAL,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-gc.d.ts","sourceRoot":"","sources":["engine-gc.js"],"names":[],"mappings":";AAoBA,mCAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gc-and-finalize.d.ts","sourceRoot":"","sources":["gc-and-finalize.js"],"names":[],"mappings":"AAkEA,qEAwBC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function startSubprocessWorker(execPath: any, procArgs?: any[], { netstringMaxChunkSize }?: {
|
|
2
|
+
netstringMaxChunkSize?: undefined;
|
|
3
|
+
}): {
|
|
4
|
+
fromChild: {
|
|
5
|
+
on: (...args: any[]) => import("stream").Transform;
|
|
6
|
+
};
|
|
7
|
+
toChild: {
|
|
8
|
+
write: (...args: any[]) => boolean;
|
|
9
|
+
};
|
|
10
|
+
terminate: () => void;
|
|
11
|
+
done: Promise<any>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=spawnSubprocessWorker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawnSubprocessWorker.d.ts","sourceRoot":"","sources":["spawnSubprocessWorker.js"],"names":[],"mappings":"AA+BA;;;;;;;;;;;EA0DC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitUntilQuiescent.d.ts","sourceRoot":"","sources":["waitUntilQuiescent.js"],"names":[],"mappings":"AAGA;;GAEG;AAKH,oDAWC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-protocol.d.ts","sourceRoot":"","sources":["worker-protocol.js"],"names":[],"mappings":"AAMA,gDAqBC;AAED,gDAwBC;0BApDyB,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"magic-cookie-test-only.d.ts","sourceRoot":"","sources":["magic-cookie-test-only.js"],"names":[],"mappings":"AAMO,0CAEN"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function makeBoardRemote<BoardId = string | null>({ boardId, iface }: {
|
|
2
|
+
boardId: BoardId;
|
|
3
|
+
iface?: string;
|
|
4
|
+
}): BoardRemote<BoardId>;
|
|
5
|
+
export function slotToBoardRemote<BoardId = string>(boardId: BoardId, iface: string): BoardRemote<BoardId>;
|
|
6
|
+
export function boardSlottingMarshaller<BoardId = string | null>(slotToVal?: (slot: BoardId, iface: string) => any): Omit<Marshal<BoardId>, "serialize" | "unserialize">;
|
|
7
|
+
export function unmarshalFromVstorage(data: Map<string, string>, key: string, fromCapData: FromCapData<string>, index: number): any;
|
|
8
|
+
export function makeHistoryReviver(entries: [string, string][], slotToVal?: (slot: string, iface?: string) => any): {
|
|
9
|
+
getItem: (key: string) => any;
|
|
10
|
+
children: (prefix: string) => string[];
|
|
11
|
+
has: (k: string) => boolean;
|
|
12
|
+
};
|
|
13
|
+
export type BoardRemote<BoardId = string | null> = {
|
|
14
|
+
getBoardId: () => BoardId;
|
|
15
|
+
} & RemotableObject;
|
|
16
|
+
import type { Marshal } from '@endo/marshal';
|
|
17
|
+
import type { FromCapData } from '@endo/marshal';
|
|
18
|
+
import type { RemotableObject } from '@endo/pass-style';
|
|
19
|
+
//# sourceMappingURL=board-client-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-client-utils.d.ts","sourceRoot":"","sources":["board-client-utils.js"],"names":[],"mappings":"AAsBO,gCAJO,OAAO,sCACV;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAClC,WAAW,CAAC,OAAO,CAAC,CAKhC;AAOM,kCAJO,OAAO,oBACV,OAAO,SACP,MAAM,wBAGoB;AAsB9B,wCAJO,OAAO,8BACV,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,GAAG,GACnC,IAAI,CAAC,QAAQ,OAAO,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC,CAU/D;AAYM,4CAPI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,OACnB,MAAM,eACN,YAAY,MAAM,CAAC,SACnB,MAAM,GAEJ,GAAG,CAwBf;AASM,4CAHI,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,cAClB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,GAAG;mBAQlC,MAAM;uBAEN,MAAM;aAYN,MAAM;EAInB;wBArHa,OAAO,oBACR;IAAE,UAAU,EAAE,MAAM,OAAO,CAAA;CAAE,GAAG,eAAe;6BALM,eAAe;iCAAf,eAAe;qCAD/C,kBAAkB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {CapData} from '@endo/marshal';
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Assert that this is CapData
|
|
6
|
+
*
|
|
7
|
+
* @type {(data: unknown) => asserts data is CapData<unknown>}
|
|
8
|
+
*/
|
|
9
|
+
export const assertCapData: (data: unknown) => asserts data is CapData<unknown>;
|
|
10
|
+
import type { CapData } from '@endo/marshal';
|
|
11
|
+
//# sourceMappingURL=cap-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cap-data.d.ts","sourceRoot":"","sources":["cap-data.js"],"names":[],"mappings":"AAGA;;GAEG;AAEH;;;;GAIG;AACH,4BAFU,CAAC,IAAI,EAAE,OAAO,KAAK,QAAQ,IAAI,IAAI,QAAQ,OAAO,CAAC,CAO3D;6BAbwB,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inaccessible-val.d.ts","sourceRoot":"","sources":["inaccessible-val.js"],"names":[],"mappings":"AASO,2CAHI,MAAM,GAAG,SAAS,GAChB,GAAG,CAOf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const pureDataMarshaller: {
|
|
2
|
+
toCapData: import("@endo/marshal").ToCapData<CapData<unknown>>;
|
|
3
|
+
fromCapData: import("@endo/marshal").FromCapData<CapData<unknown>>;
|
|
4
|
+
serialize: import("@endo/marshal").ToCapData<CapData<unknown>>;
|
|
5
|
+
unserialize: import("@endo/marshal").FromCapData<CapData<unknown>>;
|
|
6
|
+
};
|
|
7
|
+
import type { CapData } from '@endo/marshal';
|
|
8
|
+
//# sourceMappingURL=pure-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pure-data.d.ts","sourceRoot":"","sources":["pure-data.js"],"names":[],"mappings":"AAUA;;;;;EAEG;6BAPuB,eAAe"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export function wrapRemoteMarshallerSendSlotsOnly<Slot = unknown>(marshaller: ERemote<Pick<EMarshaller<Slot>, "fromCapData" | "toCapData">>, { serializeBodyFormat, errorTagging, ...otherMarshalOptions }?: MakeMarshalOptions, { valToSlot, slotToVal, cacheSeveredVal, }?: {
|
|
2
|
+
valToSlot?: WeakMapAPI<any, Slot> | null | undefined;
|
|
3
|
+
slotToVal?: WeakMapAPI<Slot, any> | null | undefined;
|
|
4
|
+
cacheSeveredVal?: boolean | undefined;
|
|
5
|
+
}): ReturnType<typeof Far<EMarshaller<Slot>>>;
|
|
6
|
+
export function wrapRemoteMarshallerDirectSend<Slot = unknown>(marshaller: ERemote<Pick<EMarshaller<Slot>, "fromCapData" | "toCapData">>): ReturnType<typeof Far<EMarshaller<Slot>>>;
|
|
7
|
+
export function wrapRemoteMarshaller<Slot = unknown>(marshaller: ERemote<Pick<EMarshaller<Slot>, "fromCapData" | "toCapData">>, { serializeBodyFormat, errorTagging, ...otherMarshalOptions }?: MakeMarshalOptions, { valToSlot, slotToVal, cacheSeveredVal, }?: {
|
|
8
|
+
valToSlot?: WeakMapAPI<any, Slot> | null | undefined;
|
|
9
|
+
slotToVal?: WeakMapAPI<Slot, any> | null | undefined;
|
|
10
|
+
cacheSeveredVal?: boolean | undefined;
|
|
11
|
+
}): ReturnType<typeof Far<EMarshaller<Slot>>>;
|
|
12
|
+
/**
|
|
13
|
+
* A Marshaller which methods may be async. Use this type to indicate accepting
|
|
14
|
+
* either a sync or async marshaller, usually through `E` eventual-sends.
|
|
15
|
+
*/
|
|
16
|
+
export type EMarshaller<Slot = unknown> = Simplify<EOnly<Marshal<Slot>>>;
|
|
17
|
+
export type InterfaceSpec = "Remotable" | `Alleged: ${string}`;
|
|
18
|
+
export type RemotableSlotWrapper<Slot = unknown> = SlotWrapper<Slot> & PassStyled<"remotable", InterfaceSpec>;
|
|
19
|
+
import type { ERemote } from '../types.js';
|
|
20
|
+
import type { MakeMarshalOptions } from '@endo/marshal';
|
|
21
|
+
import type { WeakMapAPI } from '@endo/cache-map';
|
|
22
|
+
import { Far } from '@endo/far';
|
|
23
|
+
import type { Marshal } from '@endo/marshal';
|
|
24
|
+
import type { EOnly } from '@endo/eventual-send';
|
|
25
|
+
import type { Simplify } from '@endo/pass-style';
|
|
26
|
+
/**
|
|
27
|
+
* @import {WeakMapAPI} from '@endo/cache-map';
|
|
28
|
+
* @import {EOnly} from '@endo/eventual-send';
|
|
29
|
+
* @import {PassStyled, Simplify} from '@endo/pass-style';
|
|
30
|
+
* @import {CapData, Passable, Marshal, MakeMarshalOptions} from '@endo/marshal';
|
|
31
|
+
* @import {ERemote} from '../types.js';
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* A Marshaller which methods may be async. Use this type to indicate accepting
|
|
35
|
+
* either a sync or async marshaller, usually through `E` eventual-sends.
|
|
36
|
+
*
|
|
37
|
+
* @template [Slot=unknown]
|
|
38
|
+
* @typedef {Simplify<EOnly<Marshal<Slot>>>} EMarshaller
|
|
39
|
+
*/
|
|
40
|
+
/** @typedef {'Remotable' | `Alleged: ${string}`} InterfaceSpec */
|
|
41
|
+
/** @template [Slot=unknown] */
|
|
42
|
+
declare class SlotWrapper<Slot = unknown> {
|
|
43
|
+
/**
|
|
44
|
+
* @template [Slot=unknown]
|
|
45
|
+
* @param {SlotWrapper<Slot>} wrapper
|
|
46
|
+
* @returns {Slot}
|
|
47
|
+
*/
|
|
48
|
+
static getSlot<Slot_1 = unknown>(wrapper: SlotWrapper<Slot_1>): Slot_1;
|
|
49
|
+
/**
|
|
50
|
+
* @param {Slot} slot
|
|
51
|
+
* @param {string} [iface]
|
|
52
|
+
*/
|
|
53
|
+
constructor(slot: Slot, iface?: string);
|
|
54
|
+
/** @type {InterfaceSpec} */
|
|
55
|
+
[Symbol.toStringTag]: InterfaceSpec;
|
|
56
|
+
#private;
|
|
57
|
+
}
|
|
58
|
+
import type { PassStyled } from '@endo/pass-style';
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=wrap-marshaller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrap-marshaller.d.ts","sourceRoot":"","sources":["wrap-marshaller.js"],"names":[],"mappings":"AAqHO,kDATO,IAAI,wBACP,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,aAAa,GAAG,WAAW,CAAC,CAAC,kEAC7D,kBAAkB,+CAE1B;IAAiD,SAAS;IACT,SAAS;IACjC,eAAe;CACxC,GAAU,UAAU,CAAC,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CA4RrD;AAOM,+CAJO,IAAI,wBACP,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,aAAa,GAAG,WAAW,CAAC,CAAC,GAC3D,UAAU,CAAC,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAyBrD;AAxTM,qCATO,IAAI,wBACP,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,aAAa,GAAG,WAAW,CAAC,CAAC,kEAC7D,kBAAkB,+CAE1B;IAAiD,SAAS;IACT,SAAS;IACjC,eAAe;CACxC,GAAU,UAAU,CAAC,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CA4RrD;;;;;wBA1Xa,IAAI,cACL,SAAS,MAAM,QAAQ,IAAI,CAAC,CAAC,CAAC;4BAG7B,WAAW,GAAG,YAAY,MAAM,EAAE;iCAyClC,IAAI,cACL,WAAW,CAAC,IAAI,CAAC,GAAG,WAAW,WAAW,EAAE,aAAa,CAAC;6BArD7C,aAAa;wCAD0B,eAAe;gCAHnD,iBAAiB;oBAN1B,WAAW;6BASkC,eAAe;2BAFxD,qBAAqB;8BACN,kBAAkB;AAHzD;;;;;;GAMG;AAEH;;;;;;GAMG;AAEH,kEAAkE;AAElE,+BAA+B;AAC/B,0BADe,IAAI;IAsBjB;;;;OAIG;IACH,0CAHW,WAAW,CAAC,MAAI,CAAC,GACf,MAAI,CAIhB;IArBD;;;OAGG;IACH,kBAHW,IAAI,UACJ,MAAM,EAUhB;IAfD,4BAA4B;IAC5B,sBADW,aAAa,CACsB;;CAwB/C;gCA7CsC,kBAAkB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export function getMethodNames<K extends PropertyKey>(val: Record<K, any>): K[];
|
|
2
|
+
export function getStringMethodNames<K extends PropertyKey>(val: Record<K, any>): string[];
|
|
3
|
+
export function bindAllMethods<T extends Record<PropertyKey, any>>(obj: T): T;
|
|
4
|
+
//# sourceMappingURL=method-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-tools.d.ts","sourceRoot":"","sources":["method-tools.js"],"names":[],"mappings":"AAmBO,+BAJoB,CAAC,SAAd,WAAY,OACf,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,GACZ,CAAC,EAAE,CAG8B;AAUvC,qCAJoB,CAAC,SAAd,WAAY,OACf,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,GACZ,MAAM,EAAE,CAKlB;AA+BI,+BAJiC,CAAC,SAA3B,MAAM,CAAC,WAAW,EAAE,GAAG,CAAE,OAC5B,CAAC,GACC,CAAC,CAiBX"}
|
package/src/metrics.d.ts
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
export namespace HISTOGRAM_METRICS {
|
|
2
|
+
namespace swingset_crank_processing_time {
|
|
3
|
+
let description: "Processing time per crank (ms)";
|
|
4
|
+
let unit: "ms";
|
|
5
|
+
let boundaries: number[];
|
|
6
|
+
}
|
|
7
|
+
namespace swingset_block_processing_seconds {
|
|
8
|
+
let description_1: "Processing time per block";
|
|
9
|
+
export { description_1 as description };
|
|
10
|
+
let unit_1: "s";
|
|
11
|
+
export { unit_1 as unit };
|
|
12
|
+
export { HISTOGRAM_SECONDS_LATENCY_BOUNDARIES as boundaries };
|
|
13
|
+
}
|
|
14
|
+
namespace swingset_vat_startup {
|
|
15
|
+
let description_2: "Vat startup time (ms)";
|
|
16
|
+
export { description_2 as description };
|
|
17
|
+
let unit_2: "ms";
|
|
18
|
+
export { unit_2 as unit };
|
|
19
|
+
export { HISTOGRAM_MS_LATENCY_BOUNDARIES as boundaries };
|
|
20
|
+
}
|
|
21
|
+
namespace swingset_vat_delivery {
|
|
22
|
+
let description_3: "Vat delivery time (ms)";
|
|
23
|
+
export { description_3 as description };
|
|
24
|
+
let unit_3: "ms";
|
|
25
|
+
export { unit_3 as unit };
|
|
26
|
+
export { HISTOGRAM_MS_LATENCY_BOUNDARIES as boundaries };
|
|
27
|
+
}
|
|
28
|
+
namespace swingset_meter_usage {
|
|
29
|
+
let description_4: "Vat meter usage";
|
|
30
|
+
export { description_4 as description };
|
|
31
|
+
let unit_4: "ms";
|
|
32
|
+
export { unit_4 as unit };
|
|
33
|
+
export { HISTOGRAM_MS_LATENCY_BOUNDARIES as boundaries };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export namespace BLOCK_HISTOGRAM_METRICS {
|
|
37
|
+
namespace swingsetRunSeconds {
|
|
38
|
+
let unit_5: string;
|
|
39
|
+
export { unit_5 as unit };
|
|
40
|
+
export namespace advice {
|
|
41
|
+
let explicitBucketBoundaries: number[];
|
|
42
|
+
}
|
|
43
|
+
let description_5: "Per-block time spent executing SwingSet";
|
|
44
|
+
export { description_5 as description };
|
|
45
|
+
}
|
|
46
|
+
namespace swingsetChainSaveSeconds {
|
|
47
|
+
let unit_6: string;
|
|
48
|
+
export { unit_6 as unit };
|
|
49
|
+
export namespace advice_1 { }
|
|
50
|
+
export { advice_1 as advice };
|
|
51
|
+
let description_6: "Per-block time spent propagating SwingSet state into cosmos";
|
|
52
|
+
export { description_6 as description };
|
|
53
|
+
}
|
|
54
|
+
namespace swingsetCommitSeconds {
|
|
55
|
+
let unit_7: string;
|
|
56
|
+
export { unit_7 as unit };
|
|
57
|
+
export namespace advice_2 { }
|
|
58
|
+
export { advice_2 as advice };
|
|
59
|
+
let description_7: "Per-block time spent committing SwingSet state to host storage";
|
|
60
|
+
export { description_7 as description };
|
|
61
|
+
}
|
|
62
|
+
namespace cosmosCommitSeconds {
|
|
63
|
+
let unit_8: string;
|
|
64
|
+
export { unit_8 as unit };
|
|
65
|
+
export namespace advice_3 { }
|
|
66
|
+
export { advice_3 as advice };
|
|
67
|
+
let description_8: "Per-block time spent committing cosmos state";
|
|
68
|
+
export { description_8 as description };
|
|
69
|
+
}
|
|
70
|
+
namespace fullCommitSeconds {
|
|
71
|
+
let unit_9: string;
|
|
72
|
+
export { unit_9 as unit };
|
|
73
|
+
export namespace advice_4 { }
|
|
74
|
+
export { advice_4 as advice };
|
|
75
|
+
let description_9: "Per-block time spent committing state, inclusive of COMMIT_BLOCK processing plus time spent [outside of cosmic-swingset] before and after it";
|
|
76
|
+
export { description_9 as description };
|
|
77
|
+
}
|
|
78
|
+
namespace interBlockSeconds {
|
|
79
|
+
let unit_10: string;
|
|
80
|
+
export { unit_10 as unit };
|
|
81
|
+
export namespace advice_5 { }
|
|
82
|
+
export { advice_5 as advice };
|
|
83
|
+
let description_10: "Time spent idle between blocks";
|
|
84
|
+
export { description_10 as description };
|
|
85
|
+
}
|
|
86
|
+
namespace afterCommitHangoverSeconds {
|
|
87
|
+
let unit_11: string;
|
|
88
|
+
export { unit_11 as unit };
|
|
89
|
+
export namespace advice_6 { }
|
|
90
|
+
export { advice_6 as advice };
|
|
91
|
+
let description_11: "Per-block time spent waiting for previous-block afterCommit work";
|
|
92
|
+
export { description_11 as description };
|
|
93
|
+
}
|
|
94
|
+
namespace blockLagSeconds {
|
|
95
|
+
export namespace advice_7 {
|
|
96
|
+
let explicitBucketBoundaries_1: number[];
|
|
97
|
+
export { explicitBucketBoundaries_1 as explicitBucketBoundaries };
|
|
98
|
+
}
|
|
99
|
+
export { advice_7 as advice };
|
|
100
|
+
let unit_12: string;
|
|
101
|
+
export { unit_12 as unit };
|
|
102
|
+
let description_12: "The delay of each block from its expected begin time";
|
|
103
|
+
export { description_12 as description };
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export type QueueMetricAspect = (typeof QueueMetricAspect)[keyof typeof QueueMetricAspect];
|
|
107
|
+
export namespace QueueMetricAspect {
|
|
108
|
+
let Length: "length";
|
|
109
|
+
let IncrementCount: "increments";
|
|
110
|
+
let DecrementCount: "decrements";
|
|
111
|
+
}
|
|
112
|
+
export function makeQueueMetricsMeta(namePrefix: string, descPrefix: string): Record<QueueMetricAspect, {
|
|
113
|
+
name: string;
|
|
114
|
+
options: MetricAttributes;
|
|
115
|
+
}>;
|
|
116
|
+
export function makeQueueMetrics<QueueName extends string>({ otelMeter, namePrefix, descPrefix, console, }: {
|
|
117
|
+
otelMeter: OTelMeter;
|
|
118
|
+
namePrefix: string;
|
|
119
|
+
descPrefix: string;
|
|
120
|
+
console?: Pick<Console, "warn"> | undefined;
|
|
121
|
+
}): QueueMetrics<QueueName>;
|
|
122
|
+
/**
|
|
123
|
+
* @typedef KernelMetricMeta
|
|
124
|
+
* @property {string} key
|
|
125
|
+
* @property {string} name
|
|
126
|
+
* @property {{ dimension: string; value: string }} [sub]
|
|
127
|
+
* @property {string} description
|
|
128
|
+
* @property {boolean} [consensus]
|
|
129
|
+
* @property {MetricType} metricType
|
|
130
|
+
*/
|
|
131
|
+
/** @type {Omit<KernelMetricMeta, 'metricType'>[]} */
|
|
132
|
+
export const KERNEL_STATS_SUM_METRICS: Omit<KernelMetricMeta, "metricType">[];
|
|
133
|
+
/** @type {Omit<KernelMetricMeta, 'metricType'>[]} */
|
|
134
|
+
export const KERNEL_STATS_UPDOWN_METRICS: Omit<KernelMetricMeta, "metricType">[];
|
|
135
|
+
/** @type {KernelMetricMeta[]} */
|
|
136
|
+
export const KERNEL_STATS_METRICS: KernelMetricMeta[];
|
|
137
|
+
export type QueueMetrics<QueueName extends string> = {
|
|
138
|
+
/**
|
|
139
|
+
* must be
|
|
140
|
+
* called before any other function
|
|
141
|
+
*/
|
|
142
|
+
initLengths: (lengths: Record<QueueName, number>) => void;
|
|
143
|
+
updateLengths: (lengths: Record<QueueName, number>) => void;
|
|
144
|
+
/**
|
|
145
|
+
* for a
|
|
146
|
+
* non-negative delta
|
|
147
|
+
*/
|
|
148
|
+
incLength: (queue: QueueName, delta?: number) => void;
|
|
149
|
+
/**
|
|
150
|
+
* for a
|
|
151
|
+
* non-negative delta
|
|
152
|
+
*/
|
|
153
|
+
decLength: (queue: QueueName, delta?: number) => void;
|
|
154
|
+
};
|
|
155
|
+
export type KernelMetricMeta = {
|
|
156
|
+
key: string;
|
|
157
|
+
name: string;
|
|
158
|
+
sub?: {
|
|
159
|
+
dimension: string;
|
|
160
|
+
value: string;
|
|
161
|
+
} | undefined;
|
|
162
|
+
description: string;
|
|
163
|
+
consensus?: boolean | undefined;
|
|
164
|
+
metricType: MetricType;
|
|
165
|
+
};
|
|
166
|
+
declare const HISTOGRAM_SECONDS_LATENCY_BOUNDARIES: number[];
|
|
167
|
+
/**
|
|
168
|
+
* @import {Meter as OTelMeter, MetricAttributes} from '@opentelemetry/api';
|
|
169
|
+
* @import {TotalMap} from '@agoric/internal';
|
|
170
|
+
*/
|
|
171
|
+
declare const HISTOGRAM_MS_LATENCY_BOUNDARIES: number[];
|
|
172
|
+
import type { MetricAttributes } from '@opentelemetry/api';
|
|
173
|
+
import type { Meter as OTelMeter } from '@opentelemetry/api';
|
|
174
|
+
/**
|
|
175
|
+
* MetricType
|
|
176
|
+
*/
|
|
177
|
+
type MetricType = (typeof MetricType)[keyof typeof MetricType];
|
|
178
|
+
declare namespace MetricType {
|
|
179
|
+
let Counter: "counter";
|
|
180
|
+
let Gauge: "gauge";
|
|
181
|
+
}
|
|
182
|
+
export {};
|
|
183
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["metrics.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAqH2C,MAAM,EAAE;;;;;;;;;;gCAQxC,CAAC,OAAO,iBAAiB,EAAE,MAAM,OAAO,iBAAiB,CAAC;;;;;;AAiB9D,iDAPI,MAAM,cACN,MAAM,GACJ,MAAM,CACd,iBAAiB,EACrB;IAAM,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,CAC5C,CAoBH;AA0BM,iCARe,SAAS,SAAlB,MAAQ,mDAElB;IAA0B,SAAS,EAA3B,SAAS;IACM,UAAU,EAAzB,MAAM;IACS,UAAU,EAAzB,MAAM;IACyB,OAAO;CAC9C,GAAU,YAAY,CAAC,SAAS,CAAC,CA8GnC;AAQD;;;;;;;;GAQG;AACH,qDAAqD;AACrD,uCADW,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,EAAE,CAkF/C;AAEF,qDAAqD;AACrD,0CADW,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,EAAE,CA4D/C;AAGF,iCAAiC;AACjC,mCADW,gBAAgB,EAAE,CAI1B;yBA3SmB,SAAS,SAAlB,MAAQ;;;;;iBAEP,CAAC,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI;mBAE5C,CAAC,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI;;;;;eAC5C,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI;;;;;eAE1C,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI;;;SAsI1C,MAAM;UACN,MAAM;;mBACO,MAAM;eAAS,MAAM;;iBAClC,MAAM;;gBAEN,UAAU;;AAnRxB,6DACuD;AApBvD;;;GAGG;AAEH,wDAaE;sCAjBqD,oBAAoB;wCAApB,oBAAoB;;;;kBAyRhE,CAAC,OAAO,UAAU,EAAE,MAAM,OAAO,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-utils.d.ts","sourceRoot":"","sources":["module-utils.js"],"names":[],"mappings":"AAcO,sCAHI,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAc3B;AAWM,yCAJI,MAAM,WACN,MAAM,GACJ,MAAM,CAMlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"natural-sort.d.ts","sourceRoot":"","sources":["natural-sort.js"],"names":[],"mappings":"AAgDO,kCAJI,MAAM,KACN,MAAM,GACJ,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAmCtB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Buffer} data
|
|
3
|
+
* @returns {Buffer} netstring-wrapped
|
|
4
|
+
*/
|
|
5
|
+
export function encode(data: Buffer): Buffer;
|
|
6
|
+
export function netstringEncoderStream(): Transform;
|
|
7
|
+
/**
|
|
8
|
+
* @param {Buffer} data containing zero or more netstrings and maybe some
|
|
9
|
+
* leftover bytes
|
|
10
|
+
* @param {number} [optMaxChunkSize]
|
|
11
|
+
* @returns {{ leftover: Buffer; payloads: Buffer[] }} zero or more decoded
|
|
12
|
+
* Buffers, one per netstring,
|
|
13
|
+
*/
|
|
14
|
+
export function decode(data: Buffer, optMaxChunkSize?: number): {
|
|
15
|
+
leftover: Buffer;
|
|
16
|
+
payloads: Buffer[];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @param {number} [optMaxChunkSize]
|
|
20
|
+
* @returns {Transform}
|
|
21
|
+
*/
|
|
22
|
+
export function netstringDecoderStream(optMaxChunkSize?: number): Transform;
|
|
23
|
+
import { Transform } from 'node:stream';
|
|
24
|
+
//# sourceMappingURL=netstring.d.ts.map
|