friend-assistant 0.1.21 → 0.1.23

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
@@ -315,9 +315,9 @@ Speak or type in English, Hindi, Marathi, or a mix of them in one sentence ("आ
315
315
  - **The assistant has a manual for the screen.** It can read it any time (the `stage.guide` tool): every widget with its props, how to arrange them, the theme, files and ready recipes. It also knows what to do when the screen already has things on it: a short explanation goes **on top** as an overlay (it floats over a dimmed screen, moves nothing underneath, and leaves by itself after 30 seconds, or when you click away); something **important** clears the screen first (your pinned widgets stay) and is shown alone; a new topic replaces the old one; more of the same topic updates what is there.
316
316
  - **The theme.** Friend is a HUD: a near-black blue background, glass panels with a thin glowing edge, one accent colour, small letter-spaced labels and monospace numbers. The assistant is told the exact colours and your current accent, and the pages it draws in a sandbox use your colours automatically (`var(--accent)`, `var(--ink)` and so on).
317
317
 
318
- ## Telegram, WhatsApp and SMS
318
+ ## Telegram, WhatsApp and SMS (plugins)
319
319
 
320
- Settings → **Channels** (saved with your PIN). Two things come out of it: you can **talk to Friend from your phone**, and Friend can **message people for you and read their replies**.
320
+ These are **plugins**: Esc → **Plugins**. **Telegram** and **WhatsApp and SMS (Twilio)** are listed under *Available*; press **Install** (PIN). Once installed they move to *Installed* with **Configure** (the steps left, and the form for the token, numbers and linking), **Turn on / Turn off** and **Remove** (which forgets the tokens). You can also just ask Friend: "set up Telegram for me". It can install the plugin (you approve with your PIN), tell you exactly which step is next, set what is not secret (a phone number, the on/off switch) and open the Configure page on your screen. A token or password is only ever typed by you, on that page. Two things come out of it: you can **talk to Friend from your phone**, and Friend can **message people for you and read their replies**.
321
321
 
322
322
  - **Telegram** needs no public address. Create a bot with **@BotFather** (`/newbot`), paste the token, switch it on and save. Then press **Get a link code** (needs your PIN) and send `/link CODE` to your bot from your own Telegram. That chat is now yours: what you write there is answered like on your PC, in the same chat.
323
323
  - **SMS and WhatsApp** use one **Twilio** account (account SID, auth token, your Twilio SMS number and WhatsApp sender, and your own phone number). Twilio delivers incoming messages to `https://your-public-address/api/channels/twilio` (set it in Twilio as the "a message comes in" webhook, HTTP POST), so Friend needs a public address (`friend config set publicUrl https://…`). Every request is checked against Twilio's signature, and a message Twilio sends twice is run once.
@@ -325,6 +325,17 @@ Settings → **Channels** (saved with your PIN). Two things come out of it: you
325
325
  - **Sending.** "Message Anu on WhatsApp that I am late" uses the same approval rule as everything else (Settings → Approvals): in **manual** you read the recipient and the text and approve; in **auto** it goes without asking. Risky actions asked for from a phone are still decided on the PC.
326
326
  - **Safe by design.** Tokens are write-only (never shown again, never sent to the screen), the AI cannot change channel settings, one sender cannot flood you (limits per sender and per minute), and a link code works once, for ten minutes, and dies after five wrong guesses. Calls are not built yet.
327
327
 
328
+ ## Portfolio and brokers (Zerodha)
329
+
330
+ A plugin: Esc → **Plugins** → **Zerodha** → **Install** (PIN) → **Configure**. Friend reads your Zerodha account through Zerodha's Kite Connect API and answers "how is my portfolio doing?", on screen or by voice, or sends a **report** to Telegram or WhatsApp at the times you choose (for example 9:30 and 3:45 on weekdays). The full walk-through, including the first live login, is in [docs/guides/zerodha-setup.md](docs/guides/zerodha-setup.md).
331
+
332
+ - **Read only.** Friend can look at holdings, positions, funds and orders. It cannot place, change or cancel orders, never tells you what to buy or sell and never predicts prices. Settings → **Trading** shows *Read only*; the order levels are shown as "later version" and are locked. The assistant cannot change the broker settings or this level, even with your PIN.
333
+ - **Cost.** Nothing extra: no third-party service, Friend talks to Zerodha from your PC. Zerodha's free *Personal* API plan covers everything used here (live streaming and history are on their paid plan, which Friend does not need).
334
+ - **Login.** You sign in on Zerodha's own page, once a day (Zerodha ends the login about 6 am). Your password and 2FA never reach Friend. The API key and secret are write-only; the day's token is kept in a file only you can read. If the login has ended when a report is due, you get the login link on your phone instead, and the report follows once you sign in.
335
+ - **Reports.** Add them on the Configure page (PIN) or ask in chat. Every figure is worked out by Friend from your account, never written by the AI model; a restart never sends one twice. Time zone, market-holiday dates and the login reminder (minutes before the first report) are on the same page. They are also settings: `brokers.timezone`, `brokers.skipDates`, `brokers.loginReminderMinutes`, and `trading.level` (only `read`), all changed from the Settings screen.
336
+ - **Privacy.** The figures you ask about pass through the AI model you chose (Claude from Anthropic, or Ollama on this PC); a report goes to the messaging app you pick (Telegram or WhatsApp). The audit log records that a report was made, never the amounts.
337
+ - **More brokers.** A broker is one file implementing the `BrokerProvider` contract plus the shared contract tests (`runBrokerContract`); reports, tools and screens do not change.
338
+
328
339
  ## Pictures first: weather, stats and graphics
329
340
 
330
341
  Friend is meant to show answers, not only say them. It controls the whole screen and picks the object that fits (gauge, chart, table, timeline, graph, or its own animated page).
package/dist/BUILD.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "friend-assistant",
3
- "version": "0.1.21",
4
- "builtAt": "2026-10-10T13:46:03.467Z"
3
+ "version": "0.1.23",
4
+ "builtAt": "2026-10-10T17:47:20.739Z"
5
5
  }