jivamai 0.2.35-dev.d2841ed → 0.2.36-dev.585a79c

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +33 -22
  3. package/dist/assets/index-Bq6UOGmB.js +31 -0
  4. package/dist/assets/index-Cfzu38a9.css +10 -0
  5. package/dist/index.html +3 -4
  6. package/dist-server/chunks/app-dyjklpmq.js +1 -0
  7. package/dist-server/chunks/backend-native-BuOQg63V.js +1 -0
  8. package/dist-server/chunks/check-Dfu6LJ5T.js +1 -0
  9. package/dist-server/chunks/commands-D6ShdULB.js +1 -0
  10. package/dist-server/chunks/index-DQBkyFMj.js +1 -0
  11. package/dist-server/chunks/install-C47VmXPi.js +1 -0
  12. package/dist-server/chunks/instance-CmcKHS07.js +1 -0
  13. package/dist-server/chunks/paths-DUWfc_fo.js +1 -0
  14. package/dist-server/chunks/serve-child-7qCALmDg.js +1 -0
  15. package/dist-server/chunks/ui-Cwjf6icI.js +1 -0
  16. package/dist-server/chunks/window-BjCpn4iD.js +1 -0
  17. package/dist-server/index.js +1 -1
  18. package/package.json +23 -3
  19. package/assets/icon.png +0 -0
  20. package/assets/logo.png +0 -0
  21. package/dist/assets/index-CBle-lrz.js +0 -31
  22. package/dist/assets/index-D-HpXwe4.css +0 -10
  23. package/dist/manifest.json +0 -24
  24. package/dist/offline.html +0 -343
  25. package/dist/sw.js +0 -44
  26. package/dist-server/icon-192.png +0 -0
  27. package/dist-server/icon-512.png +0 -0
  28. package/dist-server/logo.png +0 -0
  29. package/dist-server/manifest.json +0 -24
  30. package/dist-server/offline.html +0 -343
  31. package/dist-server/sw.js +0 -44
  32. package/index.html +0 -18
  33. package/portal_home.png +0 -0
  34. package/proposal.md +0 -61
  35. package/public/icon-192.png +0 -0
  36. package/public/icon-512.png +0 -0
  37. package/public/logo.png +0 -0
  38. package/public/manifest.json +0 -24
  39. package/public/offline.html +0 -343
  40. package/public/sw.js +0 -44
package/CHANGELOG.md CHANGED
@@ -8,6 +8,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ### Added — Synthetic provider, and usage you can actually see
12
+
13
+ - **Added** [Synthetic](https://synthetic.new) as a provider and recommend it first in the provider picker for people who want a flat monthly plan and no token bills. Default model `syn:large:vision`; its context window comes from Synthetic's public model catalog.
14
+ - **Added** account-level usage straight from the provider (Settings → Usage, and a chip beside the model chip): Synthetic plan quota (`/v2/quotas`), OpenRouter key limit, spend and credit balance (`/key`, `/credits`), Together month-to-date spend (`/v1/billing/usage`, beta). Providers with no usage API (Groq, Sarvam, Krutrim) say so and link to their console.
15
+ - **Added** a local usage ledger (`~/.jivam/usage-ledger.jsonl`, numbers only) so every provider gets today / 7-day / 30-day / all-time totals, a 14-day chart and a by-model breakdown. Turns that could not be priced are counted as unpriced, never as $0.
16
+ - **Added** each conversation's cost to the sidebar (it was saved by jiva-core but never shown).
17
+ - **Changed** turns on a subscription plan to read "included in your plan" instead of "cost unknown".
18
+
19
+ ### Changed — Desktop shell: native window, no background service
20
+
21
+ Jivam is now a "borrowed shell" desktop app. See `docs/architecture/desktop-shell.md`.
22
+
23
+ - **Added** a native window (WKWebView on macOS, WebView2 on Windows) via `@webviewjs/webview`, installed by `jivam install` into `~/.jivam/runtime` with pinned integrity hashes. A browser window is the loud fallback.
24
+ - **Added** `jivam install` (builds `~/Applications/Jivam.app` / a Start menu shortcut on the user's machine), `uninstall`, `check`, `stop`, `status`, `serve`. `npm i -g jivamai jiva-core && jivam install` and the one-line installers do the same thing.
25
+ - **Removed** the background service (LaunchAgent / HKCU Run + PowerShell supervisor), the Safari "Add to Dock" and Edge "install as app" flows and their in-app guides, the PWA manifest and service worker, `jivam start/--install/--server-only`. An upgrade removes what the old versions left behind, including automatically when the old service restarts onto the new code.
26
+ - **Changed** the shell and the server into separate processes; the server exits when the window process dies.
27
+ - **Security**: the local server now checks the `Host` and `Origin` headers and requires a per-launch secret (one-time launch code → session cookie; master token for the CLI). Previously any local process or web page could call it.
28
+ - **Changed** single-instance handling (`~/.jivam/instance.json`): a second `jivam` focuses the open window.
29
+ - **Changed** the in-app updater to restart the whole app itself after installing; the update dialog is mounted again (it was only rendered while an install guide was open).
30
+ - **Changed** conversation export to save into `~/Downloads` and reveal the file (the native window has no download UI).
31
+ - **Fixed** the workspace folder picker blocking the server while open, and `open-external` building a shell command string from a path.
32
+ - **Fixed** (Windows) the window showing the Node.js icon: the taskbar icon is now given when the window is created and set again shortly after, the title bar and taskbar get icon sizes close to what Windows draws, the window gets an application identity (a short PowerShell step, logged as `[window] taskbar identity`) so the taskbar uses its icon instead of `node.exe`'s and a pin made from the running window launches Jivam, `jivam check` reports missing icon images and whether that step can run (against a real, hidden window), and the shortcut icon names its image explicitly (`Jivam.ico,0`). The identity step no longer calls `InitPropVariantFromString`, which some Windows versions do not export from `propsys.dll`.
33
+ - **Added** tests (`npm test`) and a CI workflow covering Ubuntu, Intel and Apple Silicon macOS, and Windows, on Node 20 and 24.
34
+
35
+
11
36
  ### Changed — Architecture: Direct SDK Integration
12
37
 
13
38
  After investigation, the Jiva HTTP server (`jiva-core/dist/interfaces/http/index.js`) is designed
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Jivam
2
2
 
3
- Jivam is the desktop UI for [Jiva](https://github.com/KarmaloopAI/Jiva), the autonomous AI agent. It runs as a local web server (`localhost:7842`) served from an npm package — no Electron, no code signing, no app store required.
3
+ Jivam is the desktop UI for [Jiva](https://github.com/KarmaloopAI/Jiva), the autonomous AI agent. It is a small local server (listening on `127.0.0.1` only) shown in a **native window drawn by your operating system's own web view** — WebKit on macOS, Microsoft Edge WebView2 on Windows — installed from npm. No Electron, no code signing, no app store, and no background service.
4
4
 
5
- Install once with a single command and get a native app experience: a clean, address-bar-free window pinned to your Dock (macOS, via Safari's native "Add to Dock") or Start Menu (Windows, via Edge's "Install this site as an app"), with a background service that's already running by the time you click the icon.
5
+ `jivam install` builds the app on your own machine: `Jivam.app` in your Applications folder on macOS, a Start menu entry on Windows. Nothing that your OS would need to trust is downloaded.
6
6
 
7
7
  ## Quick Install
8
8
 
@@ -19,34 +19,37 @@ irm https://raw.githubusercontent.com/KarmaloopAI/Jivam/main/scripts/install.ps1
19
19
  The installer will:
20
20
  1. Install Node.js 20+ if not already present (via nvm on Mac/Linux; via winget, or a no-admin portable install if that's not available, on Windows)
21
21
  2. Install `jivamai` and `jiva-core` globally via npm
22
- 3. Set up Jivam as a persistent background service (a macOS LaunchAgent, or a Startup-folder entry on Windows — no admin rights needed either way)
23
- 4. Open Safari (macOS) or Edge (Windows) with an on-screen walkthrough for the one manual step — adding Jivam to your Dock / installing it as an app
24
-
25
- After that, click the **Jivam** icon to launch — the server is already running in the background, so there's no wait.
22
+ 3. Run `jivam install`, which adds Jivam to your Applications folder / Start menu, and removes the old background service and Safari / Edge web app if an earlier version left them
23
+ 4. Open Jivam — add your model API key and you're ready to go
26
24
 
27
25
  ## Manual Install
28
26
 
29
- If you prefer to install manually:
27
+ Exactly the same result:
30
28
 
31
29
  ```bash
32
30
  npm install -g jivamai jiva-core
33
-
34
- # Set up the background service + Dock/Start Menu icon
35
- jivam --install
36
-
37
- # Or just run directly in the terminal
38
- jivam
31
+ jivam install
39
32
  ```
40
33
 
41
- `jivam` also supports `--version`, `--help`, and `start`/`stop`/`restart`/`status` for managing the background service.
34
+ Afterwards, open Jivam from Applications, Spotlight or the Start menu — or just run `jivam`.
35
+
36
+ | Command | |
37
+ |---|---|
38
+ | `jivam` | Open Jivam (brings the window forward if it's already open) |
39
+ | `jivam install` / `uninstall` | Add / remove the app (your settings and conversations are kept) |
40
+ | `jivam check` | Self-test: server, security, native window |
41
+ | `jivam stop` / `status` | Quit / inspect a running Jivam |
42
+ | `jivam serve` | No native window; open the UI in your own browser |
42
43
 
43
44
  ## How it works
44
45
 
45
- - `jivam` starts an Express server on `localhost:7842` and serves the UI — a real web app, no bundled browser
46
- - On macOS, `jivam --install` guides you through Safari's native "Add to Dock" (Sonoma+), which creates a genuinely separate, single-instance `.app` bundle — not a `--app=` window sharing a browser's own identity
47
- - On Windows, it guides you through Edge's "Install this site as an app," with Desktop/Start Menu shortcuts as a fallback if that isn't completed
48
- - The server runs as a persistent background service (started at login, auto-restarted on crash) so it's already up by the time any icon is clicked
49
- - Jivam checks for updates in the background and shows a non-intrusive banner when one's available — nothing is installed until you click Update
46
+ - The window is borrowed from the OS (WKWebView / WebView2) through [`@webviewjs/webview`](https://www.npmjs.com/package/@webviewjs/webview), fetched and integrity-pinned by `jivam install` into `~/.jivam/runtime`. If it can't run (for example WebView2 is missing on an old Windows 10), Jivam opens in a browser window and tells you why in Settings → About
47
+ - The window and the server are separate processes, so a busy agent never freezes the window; the server can't outlive it
48
+ - Only the Jivam window can talk to the server: it checks the `Host` and `Origin` headers and a per-launch secret, so other programs and web pages in your browser can't
49
+ - On macOS the app is a thin bundle (a launcher script and a symlink to your Node) created locally, so Gatekeeper never judges it; on Windows it's a shortcut to a hidden launcher
50
+ - Jivam checks for updates in the background and shows a non-intrusive banner when one's available — nothing is installed until you click Update, and then it restarts itself
51
+
52
+ See [docs/architecture/desktop-shell.md](docs/architecture/desktop-shell.md) for the full picture, including what is and isn't covered by automated tests.
50
53
 
51
54
  ## Features
52
55
 
@@ -54,7 +57,8 @@ jivam
54
57
  - Deep Run mode for complex multi-step tasks
55
58
  - File attachments with automatic format conversion
56
59
  - MCP (Model Context Protocol) server management
57
- - One-click provider setup (Sarvam, Krutrim, Groq, Together AI, OpenAI-compatible), with a live model picker and mid-session model switching
60
+ - One-click provider setup (Synthetic, Sarvam, Krutrim, Groq, Together AI, OpenRouter, OpenAI-compatible), with a live model picker and mid-session model switching
61
+ - Usage and cost you can see: per-turn tokens and cost, your plan quota or credit balance straight from the provider (Synthetic, OpenRouter, Together), a running tally for every provider, and per-conversation cost in the sidebar (Settings → Usage)
58
62
  - Persona management and customizable settings
59
63
  - Cloud mode for remote Jiva instances
60
64
 
@@ -74,7 +78,12 @@ npm run build
74
78
  npm start
75
79
  ```
76
80
 
77
- The dev server runs the React frontend on port `5173` (with HMR) and the Express backend on port `7842`. API and WebSocket requests are proxied automatically.
81
+ The dev server runs the React frontend on port `5173` (with HMR) and the Express backend on port `7842`; API and WebSocket requests are proxied automatically. Dev mode has no native window and no access gate. To try the real shell from a checkout: `npm run build:unobfuscated && npm link && jivam install`.
82
+
83
+ ```bash
84
+ npm test # unit, security and shell-lifecycle tests
85
+ npm run typecheck:server
86
+ ```
78
87
 
79
88
  ## Publishing
80
89
 
@@ -89,7 +98,9 @@ Requires an `NPM_TOKEN` secret set in the repository's GitHub Actions settings.
89
98
 
90
99
  - Node.js 20+
91
100
  - [jiva-core](https://www.npmjs.com/package/jiva-core) (installed automatically by the install scripts)
92
- - macOS 12+ or Windows 10/11 (or Linux, without the Dock/Start Menu app step)
101
+ - macOS 10.15+ (Intel or Apple Silicon) or Windows 10/11 (x64 or ARM64)
102
+ - Windows 10 may need the Microsoft WebView2 runtime; `jivam install` offers to install it (signed by Microsoft, no administrator rights)
103
+ - Linux: no native window yet — use `jivam serve`
93
104
 
94
105
  ## License
95
106