@firmer/mesh 0.0.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.
Files changed (111) hide show
  1. package/README.md +24 -0
  2. package/dist/asm/index.d.ts +11 -0
  3. package/dist/cause/codeable.d.ts +5 -0
  4. package/dist/cause/errors.d.ts +1 -0
  5. package/dist/cause/index.d.ts +3 -0
  6. package/dist/cause/status.d.ts +46 -0
  7. package/dist/codec/codec.d.ts +43 -0
  8. package/dist/codec/index.d.ts +2 -0
  9. package/dist/codec/json.d.ts +12 -0
  10. package/dist/grpc/consumer.d.ts +8 -0
  11. package/dist/grpc/index.d.ts +3 -0
  12. package/dist/grpc/interceptor.d.ts +2 -0
  13. package/dist/grpc/provider.d.ts +5 -0
  14. package/dist/http/consumer.d.ts +12 -0
  15. package/dist/http/index.d.ts +2 -0
  16. package/dist/http/provider.d.ts +5 -0
  17. package/dist/index.d.ts +116 -0
  18. package/dist/macro/ark.d.ts +84 -0
  19. package/dist/macro/binding.d.ts +1 -0
  20. package/dist/macro/dsa.d.ts +20 -0
  21. package/dist/macro/env.d.ts +43 -0
  22. package/dist/macro/idx.d.ts +12 -0
  23. package/dist/macro/index.d.ts +10 -0
  24. package/dist/macro/inspector.d.ts +144 -0
  25. package/dist/macro/loader.d.ts +15 -0
  26. package/dist/macro/mpi.d.ts +21 -0
  27. package/dist/macro/mps.d.ts +12 -0
  28. package/dist/macro/spi.d.ts +13 -0
  29. package/dist/mesh.d.ts +2 -0
  30. package/dist/mesh.js +11088 -0
  31. package/dist/mesh.umd.cjs +24 -0
  32. package/dist/mpc/compiler.d.ts +23 -0
  33. package/dist/mpc/consumer.d.ts +28 -0
  34. package/dist/mpc/consumer_filter.d.ts +6 -0
  35. package/dist/mpc/context.d.ts +33 -0
  36. package/dist/mpc/eden.d.ts +44 -0
  37. package/dist/mpc/execution.d.ts +74 -0
  38. package/dist/mpc/filter.d.ts +19 -0
  39. package/dist/mpc/hook.d.ts +23 -0
  40. package/dist/mpc/index.d.ts +16 -0
  41. package/dist/mpc/invoker.d.ts +57 -0
  42. package/dist/mpc/mesh.d.ts +42 -0
  43. package/dist/mpc/mesh_eden.d.ts +25 -0
  44. package/dist/mpc/mock.d.ts +7 -0
  45. package/dist/mpc/provider.d.ts +10 -0
  46. package/dist/mpc/proxy.d.ts +6 -0
  47. package/dist/mpc/reference.d.ts +21 -0
  48. package/dist/mpc/service.d.ts +7 -0
  49. package/dist/mpc/urn.d.ts +32 -0
  50. package/dist/psi/builtin.d.ts +49 -0
  51. package/dist/psi/cache.d.ts +44 -0
  52. package/dist/psi/cipher.d.ts +73 -0
  53. package/dist/psi/cluster.d.ts +11 -0
  54. package/dist/psi/commerce.d.ts +20 -0
  55. package/dist/psi/context.d.ts +148 -0
  56. package/dist/psi/cryptor.d.ts +23 -0
  57. package/dist/psi/datahouse.d.ts +24 -0
  58. package/dist/psi/dispatcher.d.ts +13 -0
  59. package/dist/psi/endpoint.d.ts +14 -0
  60. package/dist/psi/evaluator.d.ts +20 -0
  61. package/dist/psi/graph.d.ts +11 -0
  62. package/dist/psi/index.d.ts +29 -0
  63. package/dist/psi/kms.d.ts +20 -0
  64. package/dist/psi/kv.d.ts +24 -0
  65. package/dist/psi/licenser.d.ts +24 -0
  66. package/dist/psi/locker.d.ts +19 -0
  67. package/dist/psi/network.d.ts +49 -0
  68. package/dist/psi/pipeline.d.ts +28 -0
  69. package/dist/psi/publisher.d.ts +12 -0
  70. package/dist/psi/registry.d.ts +20 -0
  71. package/dist/psi/routable.d.ts +37 -0
  72. package/dist/psi/savepoint.d.ts +24 -0
  73. package/dist/psi/scheduler.d.ts +47 -0
  74. package/dist/psi/sequence.d.ts +20 -0
  75. package/dist/psi/subscriber.d.ts +11 -0
  76. package/dist/psi/tokenizer.d.ts +48 -0
  77. package/dist/psi/transport.d.ts +33 -0
  78. package/dist/psi/vfs.d.ts +32 -0
  79. package/dist/psi/workflow.d.ts +35 -0
  80. package/dist/schema/citizen.d.ts +25 -0
  81. package/dist/schema/index.d.ts +2 -0
  82. package/dist/schema/schema.d.ts +2 -0
  83. package/dist/system/index.d.ts +1 -0
  84. package/dist/system/mesh_network.d.ts +15 -0
  85. package/dist/test/network.test.d.ts +4 -0
  86. package/dist/tool/addrs.d.ts +11 -0
  87. package/dist/tool/index.d.ts +3 -0
  88. package/dist/tool/table.d.ts +7 -0
  89. package/dist/tool/tool.d.ts +31 -0
  90. package/dist/types/builtin.d.ts +121 -0
  91. package/dist/types/cipher.d.ts +111 -0
  92. package/dist/types/document.d.ts +34 -0
  93. package/dist/types/entity.d.ts +59 -0
  94. package/dist/types/enums.d.ts +2 -0
  95. package/dist/types/environ.d.ts +52 -0
  96. package/dist/types/event.d.ts +55 -0
  97. package/dist/types/index.d.ts +20 -0
  98. package/dist/types/keys.d.ts +41 -0
  99. package/dist/types/license.d.ts +111 -0
  100. package/dist/types/oauth2.d.ts +138 -0
  101. package/dist/types/payload.d.ts +29 -0
  102. package/dist/types/principal.d.ts +35 -0
  103. package/dist/types/registration.d.ts +114 -0
  104. package/dist/types/route.d.ts +90 -0
  105. package/dist/types/savepoint.d.ts +34 -0
  106. package/dist/types/script.d.ts +26 -0
  107. package/dist/types/status.d.ts +13 -0
  108. package/dist/types/transport.d.ts +40 -0
  109. package/dist/types/version.d.ts +10 -0
  110. package/dist/types/workflow.d.ts +190 -0
  111. package/package.json +56 -0
@@ -0,0 +1,40 @@
1
+ export declare class Payload {
2
+ /**
3
+ * Packet index
4
+ */
5
+ idx: number;
6
+ /**
7
+ * Packet flag in TCPHeader
8
+ */
9
+ flag: number;
10
+ /**
11
+ * Packet body
12
+ */
13
+ body: Uint8Array;
14
+ }
15
+ export declare class Packet extends Payload {
16
+ /**
17
+ * Packet bucket
18
+ */
19
+ bucket: string;
20
+ /**
21
+ * Packet source
22
+ */
23
+ src: string;
24
+ /**
25
+ * Packet reference
26
+ */
27
+ rid: string;
28
+ /**
29
+ * Packet destination
30
+ */
31
+ dst: string;
32
+ /**
33
+ * Packet SNI
34
+ */
35
+ sni: string;
36
+ /**
37
+ * Packet net address
38
+ */
39
+ addr: string;
40
+ }
@@ -0,0 +1,10 @@
1
+ export declare class Versions {
2
+ /**
3
+ * Platform version. main.sub.feature.bugfix like 1.5.0.0
4
+ */
5
+ version: string;
6
+ /**
7
+ * Network modules info.
8
+ */
9
+ infos: Record<string, string>;
10
+ }
@@ -0,0 +1,190 @@
1
+ export declare class Worker {
2
+ /**
3
+ * Worker identity
4
+ */
5
+ no: string;
6
+ /**
7
+ * Worker name
8
+ */
9
+ name: string;
10
+ /**
11
+ * Worker alias
12
+ */
13
+ alias: string;
14
+ }
15
+ export declare class WorkIntent {
16
+ /**
17
+ * Business code
18
+ */
19
+ bno: string;
20
+ /**
21
+ * Workflow chart code
22
+ */
23
+ cno: string;
24
+ /**
25
+ * Workflow context
26
+ */
27
+ context: Record<string, string>;
28
+ /**
29
+ * Workflow applier
30
+ */
31
+ applier: Worker;
32
+ }
33
+ export declare class WorkVertex {
34
+ /**
35
+ * Workflow name
36
+ */
37
+ name: string;
38
+ /**
39
+ * Workflow alias
40
+ */
41
+ alias: string;
42
+ /**
43
+ * Workflow vertex attributes
44
+ */
45
+ attrs: Record<string, string>;
46
+ /**
47
+ * Workflow vertex kind
48
+ */
49
+ kind: number;
50
+ /**
51
+ * Workflow review group code
52
+ */
53
+ group: string;
54
+ }
55
+ export declare class WorkSide {
56
+ /**
57
+ * Workflow side src name
58
+ */
59
+ src: string;
60
+ /**
61
+ * Workflow side dst name
62
+ */
63
+ dst: string;
64
+ /**
65
+ * Workflow side condition
66
+ */
67
+ condition: string;
68
+ }
69
+ export declare class WorkChart {
70
+ /**
71
+ * Workflow chart code
72
+ */
73
+ cno: string;
74
+ /**
75
+ * Workflow name
76
+ */
77
+ name: string;
78
+ /**
79
+ * Workflow vertices
80
+ */
81
+ vertices: WorkVertex[];
82
+ /**
83
+ * Workflow sides
84
+ */
85
+ sides: WorkSide[];
86
+ /**
87
+ * Workflow status
88
+ */
89
+ status: number;
90
+ /**
91
+ * Workflow maintainer
92
+ */
93
+ maintainer: Worker;
94
+ }
95
+ export declare class WorkTask {
96
+ /**
97
+ * Workflow vertex
98
+ */
99
+ vertex: WorkVertex;
100
+ /**
101
+ * Workflow vertex reviewers
102
+ */
103
+ reviewers: Worker[];
104
+ /**
105
+ * Workflow vertex status
106
+ */
107
+ status: number;
108
+ /**
109
+ * Workflow context
110
+ */
111
+ context: Record<string, string>;
112
+ }
113
+ export declare class WorkRoutine {
114
+ /**
115
+ * Workflow routine code
116
+ */
117
+ rno: string;
118
+ /**
119
+ * Business code
120
+ */
121
+ bno: string;
122
+ /**
123
+ * Workflow context
124
+ */
125
+ context: Record<string, string>;
126
+ /**
127
+ * Workflow status
128
+ */
129
+ status: number;
130
+ /**
131
+ * Workflow chart
132
+ */
133
+ chart: WorkChart;
134
+ /**
135
+ * Workflow tasks
136
+ */
137
+ tasks: WorkTask[];
138
+ }
139
+ export declare class WorkGroup {
140
+ /**
141
+ * Work group identity
142
+ */
143
+ no: string;
144
+ /**
145
+ * Work group name
146
+ */
147
+ name: string;
148
+ /**
149
+ * Workflow group status
150
+ */
151
+ status: number;
152
+ /**
153
+ * Work group workers
154
+ */
155
+ workers: Worker[];
156
+ }
157
+ export declare class WorkContext {
158
+ /**
159
+ * Workflow routine code
160
+ */
161
+ rno: string;
162
+ /**
163
+ * Business code
164
+ */
165
+ bno: string;
166
+ /**
167
+ * Workflow chart code
168
+ */
169
+ cno: string;
170
+ /**
171
+ * Workflow context
172
+ */
173
+ context: Record<string, string>;
174
+ /**
175
+ * Workflow vertex
176
+ */
177
+ vertex: WorkVertex;
178
+ /**
179
+ * Workflow task
180
+ */
181
+ task: WorkTask;
182
+ /**
183
+ * Workflow applier
184
+ */
185
+ applier: Worker;
186
+ /**
187
+ * Workflow reviewer
188
+ */
189
+ reviewer: Worker;
190
+ }
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@firmer/mesh",
3
+ "version": "0.0.1",
4
+ "description": "Mesh: A lightweight, distributed, relational network architecture for MPC",
5
+ "homepage": "mesh",
6
+ "repository": "git.firmer.tech/firmer/mesh",
7
+ "author": "coyzeng@gmail.com",
8
+ "maintainers": [
9
+ "coyzeng@gmail.com"
10
+ ],
11
+ "license": "MIT",
12
+ "type": "module",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "main": "./dist/mesh.js",
17
+ "module": "./dist/mesh.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "import": "./dist/mesh.js",
21
+ "require": "./dist/mesh.umd.cjs"
22
+ }
23
+ },
24
+ "workspaces": [
25
+ "tsc"
26
+ ],
27
+ "scripts": {
28
+ "dev": "vite",
29
+ "build": "tsc && vite build",
30
+ "preview": "vite preview",
31
+ "test": "vitest",
32
+ "coverage": "vitest run --coverage"
33
+ },
34
+ "dependencies": {
35
+ "@grpc/grpc-js": "^1.13.4",
36
+ "@grpc/proto-loader": "^0.7.15",
37
+ "@types/node": "^24.0.1",
38
+ "async": "^3.2.6",
39
+ "axios": "^1.9.0",
40
+ "buffer": "^6.0.3",
41
+ "google-protobuf": "^3.21.4",
42
+ "grpc-web": "^1.5.0",
43
+ "lodash": "^4.17.21",
44
+ "moment": "^2.30.1"
45
+ },
46
+ "devDependencies": {
47
+ "@firmer/tsc": "0.0.1",
48
+ "@types/react": "^19.1.8",
49
+ "reflect-metadata": "^0.2.2",
50
+ "typescript": "^5.8.3",
51
+ "vite": "^6.3.5",
52
+ "vite-plugin-dts": "^4.5.4",
53
+ "vitest": "^3.2.3"
54
+ },
55
+ "packageManager": "yarn@4.9.2"
56
+ }