@firmer/mesh 0.0.12 → 0.0.13
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/__vite-browser-external-_8GVkOFt.js +7 -0
- package/dist/cause/status.d.ts +6 -0
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/grpc/consumer.d.ts +1 -0
- package/dist/http/consumer.d.ts +1 -0
- package/dist/macro/mpi.d.ts +1 -1
- package/dist/mesh.js +8367 -14365
- package/dist/mesh.umd.cjs +10 -9
- package/dist/mpc/consumer.d.ts +12 -0
- package/dist/mpc/reference.d.ts +2 -0
- package/dist/psi/builtin.d.ts +6 -1
- package/dist/test/builtin.test.d.ts +0 -0
- package/dist/types/entity.d.ts +12 -2
- package/package.json +14 -8
- package/dist/__vite-browser-external-l0sNRNKZ.js +0 -1
package/dist/mpc/consumer.d.ts
CHANGED
|
@@ -25,4 +25,16 @@ export declare abstract class Consumer {
|
|
|
25
25
|
* @return Output payload
|
|
26
26
|
*/
|
|
27
27
|
abstract consume(ctx: Context, address: string, urn: string, execution: Execution<Reference>, inbound: Uint8Array): Promise<Uint8Array>;
|
|
28
|
+
/**
|
|
29
|
+
* Consumes sends the request and returns an async iterator of raw response bytes.
|
|
30
|
+
* The iterator is exhausted when the server finishes streaming.
|
|
31
|
+
*
|
|
32
|
+
* @param ctx Call context.
|
|
33
|
+
* @param address Remote address.
|
|
34
|
+
* @param urn Actual uniform resource domain name.
|
|
35
|
+
* @param execution Service reference.
|
|
36
|
+
* @param inbound Input arguments.
|
|
37
|
+
* @return AsyncIterator of output payload chunks
|
|
38
|
+
*/
|
|
39
|
+
abstract consumes(ctx: Context, address: string, urn: string, execution: Execution<Reference>, inbound: Uint8Array): AsyncIterableIterator<Uint8Array>;
|
|
28
40
|
}
|
package/dist/mpc/reference.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Inspector, InvocationHandler } from '../macro';
|
|
|
2
2
|
import { Invocation, Invoker } from './invoker';
|
|
3
3
|
import { Context } from '../psi';
|
|
4
4
|
import { Reference } from '../types';
|
|
5
|
+
import { Consumer } from './consumer';
|
|
5
6
|
import { Codec } from '../codec';
|
|
6
7
|
import { Execution } from './execution';
|
|
7
8
|
export declare class ReferenceInvokeHandler<T extends object> implements Invoker<any>, InvocationHandler {
|
|
@@ -12,6 +13,7 @@ export declare class ReferenceInvokeHandler<T extends object> implements Invoker
|
|
|
12
13
|
context(args: any[]): Context;
|
|
13
14
|
invoke(proxy: any, method: Inspector, args: any[]): any;
|
|
14
15
|
run(ctx: Context, invocation: Invocation): Promise<any>;
|
|
16
|
+
sse(ctx: Context, execution: Execution<Reference>, codec: Codec, consumer: Consumer, address: string, urn: string, buffer: Uint8Array): AsyncIterableIterator<any>;
|
|
15
17
|
deserialize(ctx: Context, execution: Execution<Reference>, codec: Codec, future: Uint8Array): Promise<any>;
|
|
16
18
|
referExecution(ctx: Context, inspector: Inspector): Execution<Reference>;
|
|
17
19
|
/**
|
package/dist/psi/builtin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context } from './context';
|
|
2
|
-
import { Versions } from '../types';
|
|
2
|
+
import { StreamEntity, StreamHello, Versions } from '../types';
|
|
3
3
|
export declare abstract class Builtin {
|
|
4
4
|
/**
|
|
5
5
|
* Doc export the documents.
|
|
@@ -31,6 +31,11 @@ export declare abstract class Builtin {
|
|
|
31
31
|
* 导出应用相关数据用于分析应用运行情况.
|
|
32
32
|
*/
|
|
33
33
|
dump(names: string[], ctx?: Context): Promise<Record<string, string>>;
|
|
34
|
+
/**
|
|
35
|
+
* SSE stream server.
|
|
36
|
+
* 服务端流式响应
|
|
37
|
+
*/
|
|
38
|
+
sse(hello: StreamHello, ctx?: Context): Promise<AsyncIterableIterator<StreamEntity>>;
|
|
34
39
|
}
|
|
35
40
|
export declare abstract class Hodor {
|
|
36
41
|
/**
|
|
File without changes
|
package/dist/types/entity.d.ts
CHANGED
|
@@ -106,6 +106,11 @@ export declare class StreamEntity {
|
|
|
106
106
|
* Batch代表一次对话的所有响应
|
|
107
107
|
*/
|
|
108
108
|
batch: string;
|
|
109
|
+
/**
|
|
110
|
+
* Step表示步骤
|
|
111
|
+
* Step表示步骤
|
|
112
|
+
*/
|
|
113
|
+
step: string;
|
|
109
114
|
}
|
|
110
115
|
export declare class StreamOption {
|
|
111
116
|
/**
|
|
@@ -155,6 +160,11 @@ export declare class StreamOption {
|
|
|
155
160
|
* 补充参数
|
|
156
161
|
*/
|
|
157
162
|
attaches: Record<string, string>;
|
|
163
|
+
/**
|
|
164
|
+
* agent交互的智能体
|
|
165
|
+
* agent交互的智能体
|
|
166
|
+
*/
|
|
167
|
+
agent: string;
|
|
158
168
|
}
|
|
159
169
|
export declare class StreamHello {
|
|
160
170
|
/**
|
|
@@ -186,7 +196,7 @@ export declare class StreamHello {
|
|
|
186
196
|
*/
|
|
187
197
|
options: StreamOption;
|
|
188
198
|
}
|
|
189
|
-
export declare class StreamPacket {
|
|
199
|
+
export declare class StreamPacket<T> {
|
|
190
200
|
/**
|
|
191
201
|
* Result code
|
|
192
202
|
* Result code
|
|
@@ -201,5 +211,5 @@ export declare class StreamPacket {
|
|
|
201
211
|
* AI generate content
|
|
202
212
|
* AI generate content
|
|
203
213
|
*/
|
|
204
|
-
content
|
|
214
|
+
content?: T;
|
|
205
215
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firmer/mesh",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"description": "Mesh: A lightweight, distributed, relational network architecture for MPC",
|
|
5
5
|
"homepage": "mesh",
|
|
6
6
|
"repository": "git.firmer.tech/firmer/mesh",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"module": "./dist/mesh.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
|
+
"types": "./dist/mesh.d.ts",
|
|
20
21
|
"import": "./dist/mesh.js",
|
|
21
22
|
"require": "./dist/mesh.umd.cjs"
|
|
22
23
|
}
|
|
@@ -34,24 +35,29 @@
|
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@grpc/grpc-js": "^1.14.3",
|
|
36
37
|
"@grpc/proto-loader": "^0.8.0",
|
|
37
|
-
"@types/node": "^25.2.0",
|
|
38
38
|
"async": "^3.2.6",
|
|
39
|
-
"axios": "^1.13.
|
|
39
|
+
"axios": "^1.13.6",
|
|
40
40
|
"buffer": "^6.0.3",
|
|
41
|
-
"google-protobuf": "^4.0.
|
|
41
|
+
"google-protobuf": "^4.0.2",
|
|
42
42
|
"grpc-web": "^2.0.2",
|
|
43
43
|
"lodash": "^4.17.23",
|
|
44
44
|
"moment": "^2.30.1"
|
|
45
45
|
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"react": ">=18.0.0"
|
|
48
|
+
},
|
|
46
49
|
"devDependencies": {
|
|
47
50
|
"@firmer/tsc": "0.0.1",
|
|
48
|
-
"@types/
|
|
49
|
-
"@
|
|
51
|
+
"@types/node": "^25.5.0",
|
|
52
|
+
"@types/react": "^19.2.14",
|
|
53
|
+
"@types/react-dom": "^19",
|
|
54
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
50
55
|
"reflect-metadata": "^0.2.2",
|
|
56
|
+
"rollup": "^4.59.0",
|
|
51
57
|
"typescript": "^5.9.3",
|
|
52
|
-
"vite": "^
|
|
58
|
+
"vite": "^8.0.1",
|
|
53
59
|
"vite-plugin-dts": "^4.5.4",
|
|
54
|
-
"vitest": "^4.0
|
|
60
|
+
"vitest": "^4.1.0"
|
|
55
61
|
},
|
|
56
62
|
"packageManager": "yarn@4.9.2"
|
|
57
63
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|