@photon-ai/flux 0.3.2 → 0.3.4

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 CHANGED
@@ -31,8 +31,8 @@ Flux is an open-sourced CLI tool that lets developers build and deploy LangChain
31
31
  ## Installation
32
32
 
33
33
  ```
34
- npm install @photon-cli/flux
35
- bun add @photon-cli/flux
34
+ npm install @photon-ai/flux
35
+ bun add @photon-ai/flux
36
36
  ```
37
37
 
38
38
  ---
@@ -41,13 +41,13 @@ bun add @photon-cli/flux
41
41
 
42
42
  | Command | Description |
43
43
  |---------|-------------|
44
- | `npx @photon-cli/flux` | Show help |
45
- | `npx @photon-cli/flux whoami` | Check account |
46
- | `npx @photon-cli/flux login` | Login and signup|
47
- | `npx @photon-cli/flux logout` | Logout |
48
- | `npx @photon-cli/flux run --local` | Start the development server (local mode) |
49
- | `npx @photon-cli/flux run --prod` | Start with live iMessage bridge |
50
- | `npx @photon-cli/flux validate` | Check your code for errors |
44
+ | `npx @photon-ai/flux` | Show help |
45
+ | `npx @photon-ai/flux whoami` | Check account |
46
+ | `npx @photon-ai/flux login` | Login and signup|
47
+ | `npx @photon-ai/flux logout` | Logout |
48
+ | `npx @photon-ai/flux run --local` | Start the development server (local mode) |
49
+ | `npx @photon-ai/flux run --prod` | Start with live iMessage bridge |
50
+ | `npx @photon-ai/flux validate` | Check your code for errors |
51
51
 
52
52
  ---
53
53
 
@@ -57,6 +57,15 @@ Message +16286298650 with you phone number to text the LangChain agent that you
57
57
 
58
58
  ---
59
59
 
60
+ ## Log in
61
+
62
+ Authentication is based on iMessage:
63
+ - The user (client) sends a code to the Flux number to prove phone ownership.
64
+ - The server generates a UUID per login attempt. It then waits for the iMessage text from the client with the UUID. Once verified, it will issue a token.
65
+ - Credentials (token, phone, timestamp) are saved to credentials.json. This way, the user only has to log in once.
66
+
67
+ ---
68
+
60
69
  ## Usage
61
70
 
62
71
  #### Step 1: Create LangChain Agent
@@ -77,11 +86,31 @@ export default {
77
86
  Authenticate with your phone number and iMessage:
78
87
 
79
88
  ```
80
- npx @photon-cli/flux login
89
+ npx @photon-ai/flux login
81
90
 
82
91
  Enter your phone number (e.g. +15551234567): +1234567890
83
- [FLUX] Validating with server...
84
- [FLUX] Logged in as +1234567890
92
+ [FLUX] Requesting verification code...
93
+ [FLUX] Verification code: d33gwu
94
+ [FLUX] Opening iMessage to send verification code...
95
+ [FLUX] Please send the code "d33gwu" to +16286298650 via iMessage.
96
+ [FLUX] Waiting for verification...
97
+ [FLUX] Successfully logged in as +1234567890
98
+ ```
99
+
100
+ If already logged in:
101
+
102
+ ```
103
+ npx @photon-ai/flux login
104
+
105
+ [FLUX] Already logged in as +1234567890
106
+ ```
107
+
108
+ Log out:
109
+
110
+ ```
111
+ npx @photon-ai/flux logout
112
+
113
+ [FLUX] Logged out.
85
114
  ```
86
115
 
87
116
  ### Step 3: Validate
@@ -89,7 +118,7 @@ Enter your phone number (e.g. +15551234567): +1234567890
89
118
  Validate that your agent works and exports correctly:
90
119
 
91
120
  ```
92
- npx @photon-cli/flux validate
121
+ npx @photon-ai/flux validate
93
122
 
94
123
  [FLUX] Validating agent.ts...
95
124
  [FLUX] Agent is valid!
@@ -100,7 +129,7 @@ npx @photon-cli/flux validate
100
129
  Test your agent through your terminal (no iMessage connection):
101
130
 
102
131
  ```
103
- npx @photon-cli/flux run --local
132
+ npx @photon-ai/flux run --local
104
133
 
105
134
  [FLUX] Welcome to Flux! Your agent is loaded.
106
135
  [FLUX] Type a message to test it. Press Ctrl+C to exit.
@@ -115,7 +144,7 @@ Agent: Hello! How can I assist you today?
115
144
  Run your agent locally and connect it to the iMessage bridge. When you message the FLUX number with your phone number, you will receive the output of your LangChain agent:
116
145
 
117
146
  ```
118
- npx @photon-cli/flux run --prod
147
+ npx @photon-ai/flux run --prod
119
148
 
120
149
  [FLUX] Loading agent from agent.ts...
121
150
  [FLUX] Agent loaded successfully!