@photon-cli/flux 0.2.8 → 0.3.0
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/README.md +26 -6
- package/dist/index.js +15 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,7 +14,26 @@
|
|
|
14
14
|
[](./LICENSE)
|
|
15
15
|
[](https://discord.gg/bZd4CMd2H5)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Flux is an open-sourced CLI tool that lets developers build and deploy LangChain agents that connect to iMessage at no cost and under 5 seconds.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
- **Deploy with a single command**: Export a LangChain agent and deploy it to iMessage with a single command.
|
|
24
|
+
- **Text your agent from your phone**: Send an iMessage to the Flux number and get responses from your running agent.
|
|
25
|
+
- **Testing mode**: Test your agent through your terminal before connecting to the iMessage brigde.
|
|
26
|
+
- **Phone Number Authentication**: Log in with just your phone number and iMessage.
|
|
27
|
+
- **Agent Validation**: Automatically validate your LangChain agent in the CLI.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
npm install @photon-cli/flux
|
|
35
|
+
bun add @photon-cli/flux
|
|
36
|
+
```
|
|
18
37
|
|
|
19
38
|
---
|
|
20
39
|
|
|
@@ -32,12 +51,13 @@ Build iMessage agents with just Python. Write your agent logic via LangChain, an
|
|
|
32
51
|
|
|
33
52
|
---
|
|
34
53
|
|
|
35
|
-
##
|
|
54
|
+
## Why Flux
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
36
60
|
|
|
37
|
-
```
|
|
38
|
-
npm install @photon-cli/flux
|
|
39
|
-
bun add @photon-cli/flux
|
|
40
|
-
```
|
|
41
61
|
|
|
42
62
|
---
|
|
43
63
|
|
package/dist/index.js
CHANGED
|
@@ -51853,19 +51853,13 @@ var GrpcClient = class {
|
|
|
51853
51853
|
pendingBidi = /* @__PURE__ */ new Map();
|
|
51854
51854
|
// bidi that is waiting for context
|
|
51855
51855
|
pendingBidiAck = /* @__PURE__ */ new Map();
|
|
51856
|
-
constructor(address, serviceImpls) {
|
|
51856
|
+
constructor(address, grpcOptions, serviceImpls) {
|
|
51857
51857
|
this.address = address;
|
|
51858
51858
|
this.serviceImpls = serviceImpls;
|
|
51859
51859
|
this.proto = loadProtoFromString(buildProtoString(serviceImpls));
|
|
51860
51860
|
const useSSL = !address.includes("localhost") && !address.includes("127.0.0.1") && !address.includes("0.0.0.0");
|
|
51861
51861
|
const credentials = useSSL ? import_nice_grpc.ChannelCredentials.createSsl() : import_nice_grpc.ChannelCredentials.createInsecure();
|
|
51862
|
-
this.channel = (0, import_nice_grpc.createChannel)(address, credentials,
|
|
51863
|
-
"grpc.max_receive_message_length": 10 * 1024 * 1024,
|
|
51864
|
-
"grpc.max_send_message_length": 10 * 1024 * 1024,
|
|
51865
|
-
"grpc.keepalive_time_ms": 3e4,
|
|
51866
|
-
"grpc.keepalive_timeout_ms": 1e4,
|
|
51867
|
-
"grpc.keepalive_permit_without_calls": 1
|
|
51868
|
-
});
|
|
51862
|
+
this.channel = (0, import_nice_grpc.createChannel)(address, credentials, grpcOptions);
|
|
51869
51863
|
this.clientFactory = (0, import_nice_grpc.createClientFactory)();
|
|
51870
51864
|
}
|
|
51871
51865
|
start() {
|
|
@@ -52072,8 +52066,19 @@ var GrpcClient = class {
|
|
|
52072
52066
|
});
|
|
52073
52067
|
}
|
|
52074
52068
|
};
|
|
52075
|
-
|
|
52076
|
-
|
|
52069
|
+
var DEFAULT_OPTIONS = {
|
|
52070
|
+
"grpc.max_receive_message_length": 1e4,
|
|
52071
|
+
"grpc.max_send_message_length": 5e3,
|
|
52072
|
+
"grpc.keepalive_time_ms": 3e4,
|
|
52073
|
+
"grpc.keepalive_timeout_ms": 1e4,
|
|
52074
|
+
"grpc.keepalive_permit_without_calls": 1
|
|
52075
|
+
};
|
|
52076
|
+
async function createGrpcClient(address, grpcOptionsOrServiceImpls, ...serviceImpls) {
|
|
52077
|
+
const isServiceImpl = grpcOptionsOrServiceImpls instanceof Object && "type" in grpcOptionsOrServiceImpls && "serviceClass" in grpcOptionsOrServiceImpls;
|
|
52078
|
+
const isChannelOptions = !isServiceImpl;
|
|
52079
|
+
const grpcOptions = isChannelOptions ? grpcOptionsOrServiceImpls : DEFAULT_OPTIONS;
|
|
52080
|
+
const allServiceImpls = isChannelOptions ? serviceImpls : [grpcOptionsOrServiceImpls, ...serviceImpls];
|
|
52081
|
+
const grpcClientInstance = new GrpcClient(address, grpcOptions, allServiceImpls);
|
|
52077
52082
|
grpcClientInstance.start();
|
|
52078
52083
|
await grpcClientInstance.waitUntilReady();
|
|
52079
52084
|
grpcClientInstance.watching();
|