adaptive-bitmask 1.0.0-rc.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/LICENSE +21 -0
- package/README.md +454 -0
- package/dist/ai/index.d.mts +123 -0
- package/dist/ai/index.d.ts +123 -0
- package/dist/ai/index.js +1141 -0
- package/dist/ai/index.mjs +173 -0
- package/dist/chunk-ZWEXRT33.mjs +2402 -0
- package/dist/coordinator-Df48t6yJ.d.mts +521 -0
- package/dist/coordinator-Df48t6yJ.d.ts +521 -0
- package/dist/index.d.mts +431 -0
- package/dist/index.d.ts +431 -0
- package/dist/index.js +2484 -0
- package/dist/index.mjs +118 -0
- package/package.json +82 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AdaptiveBitmaskError,
|
|
3
|
+
Arbiter,
|
|
4
|
+
ArbiterError,
|
|
5
|
+
BITMASK_WIDTH,
|
|
6
|
+
BitmaskMessage,
|
|
7
|
+
CircuitBreaker,
|
|
8
|
+
Coordinator,
|
|
9
|
+
CoordinatorError,
|
|
10
|
+
EMERGENCY_RANGE,
|
|
11
|
+
HIGH_FREQ_RANGE,
|
|
12
|
+
HealthChecker,
|
|
13
|
+
HttpTransport,
|
|
14
|
+
LogLevel,
|
|
15
|
+
Logger,
|
|
16
|
+
MED_FREQ_RANGE,
|
|
17
|
+
MESSAGE_SIZE_BYTES,
|
|
18
|
+
MemoryError,
|
|
19
|
+
MessageValidationError,
|
|
20
|
+
MetricsCollector,
|
|
21
|
+
NetworkError,
|
|
22
|
+
Profiler,
|
|
23
|
+
RecoveryManager,
|
|
24
|
+
RuntimeError,
|
|
25
|
+
SchemaManager,
|
|
26
|
+
SchemaValidationError,
|
|
27
|
+
SharedCognition,
|
|
28
|
+
SystemError,
|
|
29
|
+
TimeoutError,
|
|
30
|
+
TimeoutManager,
|
|
31
|
+
ValidationError,
|
|
32
|
+
Validator,
|
|
33
|
+
WebSocketTransport,
|
|
34
|
+
activeBits,
|
|
35
|
+
clearBit,
|
|
36
|
+
createEnvelope,
|
|
37
|
+
createFinancialArbiter,
|
|
38
|
+
createHttpTransport,
|
|
39
|
+
createMetricsCollector,
|
|
40
|
+
createProductionLogger,
|
|
41
|
+
createRoboticArbiter,
|
|
42
|
+
createWebSocketTransport,
|
|
43
|
+
decode,
|
|
44
|
+
decodeEnvelope,
|
|
45
|
+
delta,
|
|
46
|
+
emergencyBits,
|
|
47
|
+
empty,
|
|
48
|
+
encode,
|
|
49
|
+
forEachSetBit,
|
|
50
|
+
fromBytes,
|
|
51
|
+
hammingDistance,
|
|
52
|
+
hasEmergency,
|
|
53
|
+
intersect,
|
|
54
|
+
merge,
|
|
55
|
+
popcount,
|
|
56
|
+
setBit,
|
|
57
|
+
testBit,
|
|
58
|
+
toBytes
|
|
59
|
+
} from "./chunk-ZWEXRT33.mjs";
|
|
60
|
+
export {
|
|
61
|
+
AdaptiveBitmaskError,
|
|
62
|
+
Arbiter,
|
|
63
|
+
ArbiterError,
|
|
64
|
+
BITMASK_WIDTH,
|
|
65
|
+
BitmaskMessage,
|
|
66
|
+
CircuitBreaker,
|
|
67
|
+
Coordinator,
|
|
68
|
+
CoordinatorError,
|
|
69
|
+
EMERGENCY_RANGE,
|
|
70
|
+
HIGH_FREQ_RANGE,
|
|
71
|
+
HealthChecker,
|
|
72
|
+
HttpTransport,
|
|
73
|
+
LogLevel,
|
|
74
|
+
Logger,
|
|
75
|
+
MED_FREQ_RANGE,
|
|
76
|
+
MESSAGE_SIZE_BYTES,
|
|
77
|
+
MemoryError,
|
|
78
|
+
MessageValidationError,
|
|
79
|
+
MetricsCollector,
|
|
80
|
+
NetworkError,
|
|
81
|
+
Profiler,
|
|
82
|
+
RecoveryManager,
|
|
83
|
+
RuntimeError,
|
|
84
|
+
SchemaManager,
|
|
85
|
+
SchemaValidationError,
|
|
86
|
+
SharedCognition,
|
|
87
|
+
SystemError,
|
|
88
|
+
TimeoutError,
|
|
89
|
+
TimeoutManager,
|
|
90
|
+
ValidationError,
|
|
91
|
+
Validator,
|
|
92
|
+
WebSocketTransport,
|
|
93
|
+
activeBits,
|
|
94
|
+
clearBit,
|
|
95
|
+
createEnvelope,
|
|
96
|
+
createFinancialArbiter,
|
|
97
|
+
createHttpTransport,
|
|
98
|
+
createMetricsCollector,
|
|
99
|
+
createProductionLogger,
|
|
100
|
+
createRoboticArbiter,
|
|
101
|
+
createWebSocketTransport,
|
|
102
|
+
decode,
|
|
103
|
+
decodeEnvelope,
|
|
104
|
+
delta,
|
|
105
|
+
emergencyBits,
|
|
106
|
+
empty,
|
|
107
|
+
encode,
|
|
108
|
+
forEachSetBit,
|
|
109
|
+
fromBytes,
|
|
110
|
+
hammingDistance,
|
|
111
|
+
hasEmergency,
|
|
112
|
+
intersect,
|
|
113
|
+
merge,
|
|
114
|
+
popcount,
|
|
115
|
+
setBit,
|
|
116
|
+
testBit,
|
|
117
|
+
toBytes
|
|
118
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "adaptive-bitmask",
|
|
3
|
+
"version": "1.0.0-rc.1",
|
|
4
|
+
"description": "Sub-10ms coordination protocol for multi-agent systems. 85× bandwidth reduction through semantic bitmask encoding.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./ai": {
|
|
15
|
+
"types": "./dist/ai/index.d.ts",
|
|
16
|
+
"import": "./dist/ai/index.mjs",
|
|
17
|
+
"require": "./dist/ai/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "tsup src/index.ts src/ai/index.ts --format cjs,esm --dts --clean",
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"test:watch": "vitest",
|
|
29
|
+
"lint": "tsc --noEmit",
|
|
30
|
+
"benchmark": "npm run build && npm run benchmark:run",
|
|
31
|
+
"benchmark:run": "node benchmarks/run.mjs",
|
|
32
|
+
"benchmark:check": "node benchmarks/check.mjs",
|
|
33
|
+
"prepublishOnly": "npm run build"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"multi-agent",
|
|
37
|
+
"coordination",
|
|
38
|
+
"bitmask",
|
|
39
|
+
"protocol",
|
|
40
|
+
"low-latency",
|
|
41
|
+
"ai-agents",
|
|
42
|
+
"semantic-compression",
|
|
43
|
+
"mas",
|
|
44
|
+
"llm",
|
|
45
|
+
"real-time"
|
|
46
|
+
],
|
|
47
|
+
"author": "Harry Jiang",
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "https://github.com/jverene/adaptive-bitmask"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"ai": ">=4.0.0",
|
|
55
|
+
"ws": ">=8.0.0",
|
|
56
|
+
"zod": ">=3.0.0"
|
|
57
|
+
},
|
|
58
|
+
"peerDependenciesMeta": {
|
|
59
|
+
"ai": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"zod": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"ws": {
|
|
66
|
+
"optional": true
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@types/node": "^20.19.37",
|
|
71
|
+
"@types/ws": "^8.18.1",
|
|
72
|
+
"ai": "^4.0.0",
|
|
73
|
+
"tsup": "^8.0.0",
|
|
74
|
+
"typescript": "^5.4.0",
|
|
75
|
+
"vitest": "^1.6.0",
|
|
76
|
+
"ws": "^8.19.0",
|
|
77
|
+
"zod": "^3.23.0"
|
|
78
|
+
},
|
|
79
|
+
"engines": {
|
|
80
|
+
"node": ">=18"
|
|
81
|
+
}
|
|
82
|
+
}
|