brass-runtime 1.13.4 → 1.13.6
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/agent/cli/main.cjs +2022 -0
- package/dist/agent/cli/main.js +184 -184
- package/dist/agent/index.cjs +153 -0
- package/dist/agent/index.js +153 -153
- package/dist/chunk-3IF374MG.js +121 -121
- package/dist/chunk-AC4RFFVX.cjs +407 -0
- package/dist/chunk-DB57UZBE.cjs +2879 -0
- package/dist/chunk-HRVX2IYW.js +345 -345
- package/dist/chunk-KT4IKCIU.cjs +2556 -0
- package/dist/chunk-TGOMLZ65.js +317 -317
- package/dist/http/index.cjs +453 -0
- package/dist/http/index.js +74 -74
- package/dist/index.cjs +855 -0
- package/dist/index.js +340 -340
- package/package.json +6 -8
- package/wasm/pkg/brass_runtime_wasm_engine.d.ts +92 -0
- package/wasm/pkg/brass_runtime_wasm_engine.js +657 -0
- package/wasm/pkg/brass_runtime_wasm_engine_bg.wasm +0 -0
- package/wasm/pkg/brass_runtime_wasm_engine_bg.wasm.d.ts +62 -0
- package/wasm/pkg/package.json +13 -0
- package/dist/agent/cli/main.d.mts +0 -1
- package/dist/agent/index.d.mts +0 -688
- package/dist/effect-ISvXPLgc.d.mts +0 -797
- package/dist/http/index.d.mts +0 -154
- package/dist/index.d.mts +0 -258
- package/dist/stream-C0-LWnUP.d.mts +0 -66
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brass-runtime",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.6",
|
|
4
4
|
"description": "Effect runtime utilities for TypeScript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Augusto Vivaldelli",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
|
-
"module": "./dist/index.
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
|
-
"import": "./dist/index.
|
|
13
|
+
"import": "./dist/index.mjs",
|
|
14
14
|
"require": "./dist/index.cjs"
|
|
15
15
|
},
|
|
16
16
|
"./http": {
|
|
17
17
|
"types": "./dist/http/index.d.ts",
|
|
18
|
-
"import": "./dist/http/index.
|
|
18
|
+
"import": "./dist/http/index.mjs",
|
|
19
19
|
"require": "./dist/http/index.cjs"
|
|
20
20
|
},
|
|
21
21
|
"./agent": {
|
|
22
22
|
"types": "./dist/agent/index.d.ts",
|
|
23
|
-
"import": "./dist/agent/index.
|
|
23
|
+
"import": "./dist/agent/index.mjs",
|
|
24
24
|
"require": "./dist/agent/index.cjs"
|
|
25
25
|
},
|
|
26
26
|
"./package.json": "./package.json",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
],
|
|
53
53
|
"scripts": {
|
|
54
54
|
"dev": "tsx src/examples/index.ts",
|
|
55
|
-
"clean": "rimraf dist",
|
|
55
|
+
"clean": "rimraf dist wasm/pkg",
|
|
56
56
|
"test": "vitest run",
|
|
57
57
|
"test:watch": "vitest",
|
|
58
58
|
"test:coverage": "vitest run --coverage",
|
|
@@ -64,8 +64,6 @@
|
|
|
64
64
|
"build:types": "tsc -p tsconfig.types.json",
|
|
65
65
|
"build:esm": "tsc -p tsconfig.esm.json",
|
|
66
66
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
67
|
-
"prepack": "npm run build:wasm && npm run build",
|
|
68
|
-
"prepublishOnly": "npm run build:wasm && npm run build",
|
|
69
67
|
"agent:dev": "tsx src/agent/cli/main.ts",
|
|
70
68
|
"agent:doctor": "tsx src/agent/cli/main.ts --doctor",
|
|
71
69
|
"agent:vscode:package": "node scripts/install-vscode-extension.mjs --no-code-install --no-settings",
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export class BrassWasmChunkBuffer {
|
|
5
|
+
free(): void;
|
|
6
|
+
[Symbol.dispose](): void;
|
|
7
|
+
clear(): void;
|
|
8
|
+
is_empty(): boolean;
|
|
9
|
+
is_full(): boolean;
|
|
10
|
+
len(): number;
|
|
11
|
+
max_chunk_size(): number;
|
|
12
|
+
constructor(max_chunk_size: number);
|
|
13
|
+
push(value: any): boolean;
|
|
14
|
+
stats_json(): string;
|
|
15
|
+
take_chunk(): Array<any>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class BrassWasmFiberRegistry {
|
|
19
|
+
free(): void;
|
|
20
|
+
[Symbol.dispose](): void;
|
|
21
|
+
add_joiner(fiber_id: number): number;
|
|
22
|
+
drain_wakeup(): number;
|
|
23
|
+
drop_fiber(fiber_id: number): boolean;
|
|
24
|
+
mark_done(fiber_id: number, state: number, now_ms: number): number;
|
|
25
|
+
mark_queued(fiber_id: number, now_ms: number): boolean;
|
|
26
|
+
mark_running(fiber_id: number, now_ms: number): boolean;
|
|
27
|
+
mark_suspended(fiber_id: number, now_ms: number): boolean;
|
|
28
|
+
constructor();
|
|
29
|
+
register_fiber(fiber_id: number, parent_id: number, scope_id: number, now_ms: number): boolean;
|
|
30
|
+
state_of(fiber_id: number): number;
|
|
31
|
+
stats_json(): string;
|
|
32
|
+
wake(fiber_id: number): boolean;
|
|
33
|
+
wake_queue_len(): number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class BrassWasmRingBuffer {
|
|
37
|
+
free(): void;
|
|
38
|
+
[Symbol.dispose](): void;
|
|
39
|
+
capacity(): number;
|
|
40
|
+
clear(): void;
|
|
41
|
+
is_empty(): boolean;
|
|
42
|
+
len(): number;
|
|
43
|
+
constructor(initial_capacity: number, max_capacity: number);
|
|
44
|
+
push(value: any): number;
|
|
45
|
+
shift(): any;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class BrassWasmSchedulerStateMachine {
|
|
49
|
+
free(): void;
|
|
50
|
+
[Symbol.dispose](): void;
|
|
51
|
+
/**
|
|
52
|
+
* Enter flushing. Returns the number of tasks this flush may run.
|
|
53
|
+
*/
|
|
54
|
+
begin_flush(): number;
|
|
55
|
+
capacity(): number;
|
|
56
|
+
clear(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Finish a flush. Returns the scheduling policy for the next flush:
|
|
59
|
+
* - 0 => schedule a micro flush
|
|
60
|
+
* - 1 => schedule a macro flush
|
|
61
|
+
* - 2 => no more work
|
|
62
|
+
*/
|
|
63
|
+
end_flush(ran: number): number;
|
|
64
|
+
/**
|
|
65
|
+
* Enqueue a task ref and return the scheduling policy:
|
|
66
|
+
* - 0 => schedule a micro flush
|
|
67
|
+
* - 1 => schedule a macro flush
|
|
68
|
+
* - 2 => no new flush needed
|
|
69
|
+
* - 3 => queue full / task dropped
|
|
70
|
+
*/
|
|
71
|
+
enqueue(task_ref: number): number;
|
|
72
|
+
is_flushing(): boolean;
|
|
73
|
+
is_scheduled(): boolean;
|
|
74
|
+
len(): number;
|
|
75
|
+
constructor(initial_capacity: number, max_capacity: number, flush_budget: number, micro_threshold: number);
|
|
76
|
+
shift(): number;
|
|
77
|
+
stats_json(): string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export class BrassWasmVm {
|
|
81
|
+
free(): void;
|
|
82
|
+
[Symbol.dispose](): void;
|
|
83
|
+
create_fiber(program_json: string): number;
|
|
84
|
+
drop_fiber(fiber_id: number): void;
|
|
85
|
+
interrupt(fiber_id: number, reason_ref: number): string;
|
|
86
|
+
constructor();
|
|
87
|
+
poll(fiber_id: number): string;
|
|
88
|
+
provide_effect(fiber_id: number, root: number, nodes_json: string): string;
|
|
89
|
+
provide_error(fiber_id: number, error_ref: number): string;
|
|
90
|
+
provide_value(fiber_id: number, value_ref: number): string;
|
|
91
|
+
stats_json(): string;
|
|
92
|
+
}
|