@photon-cli/flux 0.2.5 → 0.2.7
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/{cli.js → index.js} +296 -293
- package/dist/index.js.map +1 -0
- package/package.json +13 -5
- package/dist/cli.d.ts +0 -42
- package/dist/cli.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@photon-cli/flux",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Flux CLI - Connect LangChain agents to iMessage",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"bin": {
|
|
7
|
-
"flux": "./dist/
|
|
8
|
+
"flux": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.js"
|
|
15
|
+
}
|
|
8
16
|
},
|
|
9
17
|
"files": [
|
|
10
18
|
"dist"
|
|
11
19
|
],
|
|
12
20
|
"scripts": {
|
|
13
|
-
"flux": "bun src/
|
|
21
|
+
"flux": "bun src/index.ts",
|
|
14
22
|
"build": "tsup",
|
|
15
|
-
"start": "node dist/
|
|
23
|
+
"start": "node dist/index.js"
|
|
16
24
|
},
|
|
17
25
|
"devDependencies": {
|
|
18
26
|
"@types/bun": "latest",
|
package/dist/cli.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Flux CLI - gRPC Client for iMessage Bridge
|
|
3
|
-
* ==========================================
|
|
4
|
-
* This code connects the Flux CLI to the Flux Server's iMessage bridge.
|
|
5
|
-
* Users define their LangChain agent in agent.ts with `export default agent`
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* FluxAgent interface - users must export default an object matching this interface
|
|
9
|
-
* The agent receives a message and returns a response string
|
|
10
|
-
*/
|
|
11
|
-
interface FluxAgent {
|
|
12
|
-
invoke: (input: {
|
|
13
|
-
message: string;
|
|
14
|
-
userPhoneNumber: string;
|
|
15
|
-
imageBase64?: string;
|
|
16
|
-
}) => Promise<string>;
|
|
17
|
-
}
|
|
18
|
-
interface IncomingMessage {
|
|
19
|
-
userPhoneNumber: string;
|
|
20
|
-
text: string;
|
|
21
|
-
imageBase64?: string;
|
|
22
|
-
chatGuid: string;
|
|
23
|
-
messageGuid: string;
|
|
24
|
-
}
|
|
25
|
-
interface OutgoingMessage {
|
|
26
|
-
userPhoneNumber: string;
|
|
27
|
-
text: string;
|
|
28
|
-
chatGuid?: string;
|
|
29
|
-
}
|
|
30
|
-
declare class FluxClient {
|
|
31
|
-
private client;
|
|
32
|
-
private phoneNumber;
|
|
33
|
-
private onMessage;
|
|
34
|
-
constructor(phoneNumber: string, onMessage: (message: IncomingMessage) => Promise<string | void>);
|
|
35
|
-
connect(): Promise<void>;
|
|
36
|
-
register(): Promise<boolean>;
|
|
37
|
-
private startMessageStream;
|
|
38
|
-
sendMessage(to: string, text: string, chatGuid?: string): Promise<boolean>;
|
|
39
|
-
disconnect(): Promise<void>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { type FluxAgent, FluxClient, type IncomingMessage, type OutgoingMessage };
|