palmier 0.9.6 → 0.9.8
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 +28 -13
- package/dist/agents/agent.d.ts +0 -1
- package/dist/agents/agent.js +0 -1
- package/dist/agents/aider.d.ts +0 -1
- package/dist/agents/aider.js +0 -1
- package/dist/agents/claude.d.ts +0 -1
- package/dist/agents/claude.js +0 -1
- package/dist/agents/cline.d.ts +0 -1
- package/dist/agents/cline.js +0 -1
- package/dist/agents/codex.d.ts +0 -1
- package/dist/agents/codex.js +0 -1
- package/dist/agents/copilot.d.ts +0 -1
- package/dist/agents/copilot.js +0 -1
- package/dist/agents/cursor.d.ts +0 -1
- package/dist/agents/cursor.js +0 -1
- package/dist/agents/deepagents.d.ts +0 -1
- package/dist/agents/deepagents.js +0 -1
- package/dist/agents/droid.d.ts +0 -1
- package/dist/agents/droid.js +0 -1
- package/dist/agents/gemini.d.ts +0 -1
- package/dist/agents/gemini.js +0 -1
- package/dist/agents/goose.d.ts +0 -1
- package/dist/agents/goose.js +0 -1
- package/dist/agents/hermes.d.ts +0 -1
- package/dist/agents/hermes.js +0 -1
- package/dist/agents/kimi.d.ts +0 -1
- package/dist/agents/kimi.js +0 -1
- package/dist/agents/kiro.d.ts +0 -1
- package/dist/agents/kiro.js +0 -1
- package/dist/agents/openclaw.d.ts +0 -1
- package/dist/agents/openclaw.js +0 -1
- package/dist/agents/opencode.d.ts +0 -1
- package/dist/agents/opencode.js +0 -1
- package/dist/agents/qoder.d.ts +0 -1
- package/dist/agents/qoder.js +0 -1
- package/dist/agents/qwen.d.ts +0 -1
- package/dist/agents/qwen.js +0 -1
- package/dist/agents/shared-prompt.d.ts +0 -1
- package/dist/agents/shared-prompt.js +0 -1
- package/dist/client-store.d.ts +0 -1
- package/dist/client-store.js +0 -1
- package/dist/commands/clients.d.ts +0 -1
- package/dist/commands/clients.js +0 -1
- package/dist/commands/info.d.ts +0 -1
- package/dist/commands/info.js +0 -1
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.js +1 -2
- package/dist/commands/pair.d.ts +0 -1
- package/dist/commands/pair.js +0 -1
- package/dist/commands/restart.d.ts +0 -1
- package/dist/commands/restart.js +0 -1
- package/dist/commands/run.d.ts +0 -1
- package/dist/commands/run.js +19 -3
- package/dist/commands/serve.d.ts +0 -1
- package/dist/commands/serve.js +0 -1
- package/dist/commands/uninstall.d.ts +0 -1
- package/dist/commands/uninstall.js +0 -1
- package/dist/config.d.ts +0 -1
- package/dist/config.js +0 -1
- package/dist/event-queues.d.ts +0 -1
- package/dist/event-queues.js +0 -1
- package/dist/events.d.ts +0 -1
- package/dist/events.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/linked-device.d.ts +0 -1
- package/dist/linked-device.js +0 -1
- package/dist/mcp-handler.d.ts +0 -1
- package/dist/mcp-handler.js +0 -1
- package/dist/mcp-tools.d.ts +0 -1
- package/dist/mcp-tools.js +0 -1
- package/dist/nats-client.d.ts +0 -1
- package/dist/nats-client.js +0 -1
- package/dist/network.d.ts +0 -1
- package/dist/network.js +0 -1
- package/dist/notification-store.d.ts +0 -1
- package/dist/notification-store.js +0 -1
- package/dist/pending-requests.d.ts +0 -1
- package/dist/pending-requests.js +0 -1
- package/dist/platform/index.d.ts +0 -1
- package/dist/platform/index.js +0 -1
- package/dist/platform/linux.d.ts +0 -1
- package/dist/platform/linux.js +0 -1
- package/dist/platform/macos.d.ts +0 -1
- package/dist/platform/macos.js +0 -1
- package/dist/platform/platform.d.ts +0 -1
- package/dist/platform/platform.js +0 -1
- package/dist/platform/windows.d.ts +0 -1
- package/dist/platform/windows.js +0 -1
- package/dist/pwa/assets/{index-MLEFUP3r.js → index-DWvRAUiy.js} +31 -31
- package/dist/pwa/assets/{web-B1sKCc7e.js → web-C4iZbqTC.js} +1 -1
- package/dist/pwa/assets/{web-ETD-8ZHd.js → web-CBFqJGX6.js} +1 -1
- package/dist/pwa/assets/{web-B4xEa6WO.js → web-DL4uXOpS.js} +1 -1
- package/dist/pwa/index.html +2 -2
- package/dist/rpc-handler.d.ts +0 -1
- package/dist/rpc-handler.js +0 -1
- package/dist/sms-store.d.ts +0 -1
- package/dist/sms-store.js +0 -1
- package/dist/spawn-command.d.ts +0 -1
- package/dist/spawn-command.js +0 -1
- package/dist/task.d.ts +0 -1
- package/dist/task.js +0 -1
- package/dist/transports/http-transport.d.ts +0 -1
- package/dist/transports/http-transport.js +0 -1
- package/dist/transports/nats-transport.d.ts +0 -1
- package/dist/transports/nats-transport.js +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -1
- package/dist/update-checker.d.ts +0 -1
- package/dist/update-checker.js +0 -1
- package/package.json +11 -1
- package/.github/workflows/ci.yml +0 -16
- package/.github/workflows/publish.yml +0 -37
- package/CLAUDE.md +0 -22
- package/dist/pwa/apple-touch-icon.png +0 -0
- package/dist/pwa/manifest.webmanifest +0 -1
- package/dist/pwa/pwa-192x192.png +0 -0
- package/dist/pwa/pwa-512x512.png +0 -0
- package/dist/pwa/registerSW.js +0 -1
- package/dist/pwa/service-worker.js +0 -2
- package/palmier-server/.github/workflows/ci.yml +0 -21
- package/palmier-server/.github/workflows/deploy.yml +0 -38
- package/palmier-server/CLAUDE.md +0 -17
- package/palmier-server/PRODUCTION.md +0 -358
- package/palmier-server/README.md +0 -231
- package/palmier-server/nats.conf +0 -19
- package/palmier-server/package.json +0 -15
- package/palmier-server/pnpm-lock.yaml +0 -7639
- package/palmier-server/pnpm-workspace.yaml +0 -3
- package/palmier-server/pwa/index.html +0 -16
- package/palmier-server/pwa/logo/logo_20260421.png +0 -0
- package/palmier-server/pwa/package.json +0 -34
- package/palmier-server/pwa/public/apple-touch-icon.png +0 -0
- package/palmier-server/pwa/public/favicon.ico +0 -0
- package/palmier-server/pwa/public/pwa-192x192.png +0 -0
- package/palmier-server/pwa/public/pwa-512x512.png +0 -0
- package/palmier-server/pwa/src/App.css +0 -3012
- package/palmier-server/pwa/src/App.tsx +0 -59
- package/palmier-server/pwa/src/agentLabels.ts +0 -11
- package/palmier-server/pwa/src/api.ts +0 -67
- package/palmier-server/pwa/src/components/CapabilityToggles.tsx +0 -170
- package/palmier-server/pwa/src/components/ConnectionStatusIcon.tsx +0 -113
- package/palmier-server/pwa/src/components/HostMenu.tsx +0 -429
- package/palmier-server/pwa/src/components/PermissionsDialog.tsx +0 -34
- package/palmier-server/pwa/src/components/PullToRefreshIndicator.tsx +0 -46
- package/palmier-server/pwa/src/components/RunDetailView.tsx +0 -343
- package/palmier-server/pwa/src/components/SessionComposer.tsx +0 -157
- package/palmier-server/pwa/src/components/SessionsView.tsx +0 -326
- package/palmier-server/pwa/src/components/SwipeToDeleteRow.tsx +0 -170
- package/palmier-server/pwa/src/components/TabBar.tsx +0 -40
- package/palmier-server/pwa/src/components/TaskCard.tsx +0 -255
- package/palmier-server/pwa/src/components/TaskForm.tsx +0 -766
- package/palmier-server/pwa/src/components/TasksView.tsx +0 -179
- package/palmier-server/pwa/src/constants.ts +0 -2
- package/palmier-server/pwa/src/contexts/HostConnectionContext.tsx +0 -432
- package/palmier-server/pwa/src/contexts/HostStoreContext.tsx +0 -124
- package/palmier-server/pwa/src/draftGuard.ts +0 -24
- package/palmier-server/pwa/src/formatTime.ts +0 -44
- package/palmier-server/pwa/src/hooks/useBackClose.ts +0 -75
- package/palmier-server/pwa/src/hooks/useMediaQuery.ts +0 -17
- package/palmier-server/pwa/src/hooks/usePullToRefresh.ts +0 -102
- package/palmier-server/pwa/src/hooks/usePushSubscription.ts +0 -77
- package/palmier-server/pwa/src/main.tsx +0 -14
- package/palmier-server/pwa/src/native/Device.ts +0 -49
- package/palmier-server/pwa/src/pages/Dashboard.tsx +0 -542
- package/palmier-server/pwa/src/pages/PairHost.tsx +0 -232
- package/palmier-server/pwa/src/pages/PairSetup.tsx +0 -134
- package/palmier-server/pwa/src/service-worker.ts +0 -142
- package/palmier-server/pwa/src/types.ts +0 -75
- package/palmier-server/pwa/src/vite-env.d.ts +0 -11
- package/palmier-server/pwa/tsconfig.json +0 -21
- package/palmier-server/pwa/tsconfig.node.json +0 -19
- package/palmier-server/pwa/vite.config.ts +0 -47
- package/palmier-server/server/.env.example +0 -20
- package/palmier-server/server/package.json +0 -36
- package/palmier-server/server/src/db.ts +0 -44
- package/palmier-server/server/src/fcm.ts +0 -74
- package/palmier-server/server/src/index.ts +0 -688
- package/palmier-server/server/src/nats-jwt.ts +0 -299
- package/palmier-server/server/src/nats-setup.ts +0 -48
- package/palmier-server/server/src/nats.ts +0 -33
- package/palmier-server/server/src/notify.ts +0 -34
- package/palmier-server/server/src/push.ts +0 -68
- package/palmier-server/server/src/routes/device.ts +0 -224
- package/palmier-server/server/src/routes/fcm.ts +0 -64
- package/palmier-server/server/src/routes/hosts.ts +0 -56
- package/palmier-server/server/src/routes/push.ts +0 -101
- package/palmier-server/server/tsconfig.json +0 -20
- package/palmier-server/spec.md +0 -533
- package/src/agents/agent-instructions.md +0 -28
- package/src/agents/agent.ts +0 -114
- package/src/agents/aider.ts +0 -35
- package/src/agents/claude.ts +0 -39
- package/src/agents/cline.ts +0 -35
- package/src/agents/codex.ts +0 -40
- package/src/agents/copilot.ts +0 -37
- package/src/agents/cursor.ts +0 -36
- package/src/agents/deepagents.ts +0 -36
- package/src/agents/droid.ts +0 -35
- package/src/agents/gemini.ts +0 -43
- package/src/agents/goose.ts +0 -33
- package/src/agents/hermes.ts +0 -36
- package/src/agents/kimi.ts +0 -35
- package/src/agents/kiro.ts +0 -36
- package/src/agents/openclaw.ts +0 -29
- package/src/agents/opencode.ts +0 -36
- package/src/agents/qoder.ts +0 -36
- package/src/agents/qwen.ts +0 -32
- package/src/agents/shared-prompt.ts +0 -30
- package/src/client-store.ts +0 -68
- package/src/commands/clients.ts +0 -29
- package/src/commands/info.ts +0 -29
- package/src/commands/init.ts +0 -165
- package/src/commands/pair.ts +0 -137
- package/src/commands/restart.ts +0 -6
- package/src/commands/run.ts +0 -608
- package/src/commands/serve.ts +0 -211
- package/src/commands/uninstall.ts +0 -9
- package/src/config.ts +0 -36
- package/src/cross-spawn.d.ts +0 -5
- package/src/event-queues.ts +0 -41
- package/src/events.ts +0 -29
- package/src/index.ts +0 -111
- package/src/linked-device.ts +0 -52
- package/src/mcp-handler.ts +0 -200
- package/src/mcp-tools.ts +0 -839
- package/src/nats-client.ts +0 -19
- package/src/network.ts +0 -96
- package/src/notification-store.ts +0 -30
- package/src/pending-requests.ts +0 -73
- package/src/platform/index.ts +0 -20
- package/src/platform/linux.ts +0 -296
- package/src/platform/macos.ts +0 -329
- package/src/platform/platform.ts +0 -31
- package/src/platform/windows.ts +0 -299
- package/src/rpc-handler.ts +0 -691
- package/src/sms-store.ts +0 -28
- package/src/spawn-command.ts +0 -123
- package/src/task.ts +0 -343
- package/src/transports/http-transport.ts +0 -478
- package/src/transports/nats-transport.ts +0 -76
- package/src/types.ts +0 -89
- package/src/update-checker.ts +0 -40
- package/test/agent-instructions.test.ts +0 -209
- package/test/agent-output-parsing.test.ts +0 -74
- package/test/linux-cron.test.ts +0 -41
- package/test/macos-plist.test.ts +0 -112
- package/test/notification-store.test.ts +0 -57
- package/test/pairing.test.ts +0 -35
- package/test/result-state.test.ts +0 -110
- package/test/task-parsing.test.ts +0 -82
- package/test/taskrun-messages.test.ts +0 -224
- package/test/tsconfig.json +0 -9
- package/test/windows-xml.test.ts +0 -89
- package/tsconfig.json +0 -19
package/README.md
CHANGED
|
@@ -4,14 +4,29 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/palmier)
|
|
5
5
|
[](https://github.com/caihongxu/palmier/blob/master/LICENSE)
|
|
6
6
|
|
|
7
|
-
**Website:** [palmier.me](https://www.palmier.me) | **App:** [app.palmier.me](https://app.palmier.me)
|
|
7
|
+
**Website:** [palmier.me](https://www.palmier.me) | **Web App:** [app.palmier.me](https://app.palmier.me) | **Android App:** [caihongxu/palmier-android](https://github.com/caihongxu/palmier-android)
|
|
8
8
|
|
|
9
|
-
You have AI agents on your machine. Palmier is
|
|
9
|
+
You already have AI agents running on your machine. Palmier is an agent-agnostic bridge between those agents and your phone.
|
|
10
10
|
|
|
11
|
-
From your phone,
|
|
11
|
+
From your phone, you can start sessions, schedule tasks, approve requests, and review results. From your machine, your agents can use phone-side capabilities like notifications, location, SMS, contacts, and calendar — so they can react to the real world, not just the terminal.
|
|
12
12
|
|
|
13
13
|
It runs on your machine as a background daemon and pairs with a mobile-friendly PWA.
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
## What Palmier is
|
|
16
|
+
|
|
17
|
+
Palmier is an **agent-agnostic phone bridge and mobile control layer** for the agents you already use.
|
|
18
|
+
|
|
19
|
+
It is not:
|
|
20
|
+
|
|
21
|
+
* an agent runtime itself
|
|
22
|
+
* a replacement for Claude Code / Codex CLI / Gemini CLI / OpenClaw / Hermes
|
|
23
|
+
* a system for driving your phone UI like a human tapping through apps
|
|
24
|
+
|
|
25
|
+
Instead, Palmier focuses on:
|
|
26
|
+
|
|
27
|
+
* letting agents access phone-side capabilities and context in the background
|
|
28
|
+
* letting you talk to, manage, and schedule your agents from your phone
|
|
29
|
+
* making phone integrations work out of the box without requiring users to wire up separate calendar/email/contact stacks
|
|
15
30
|
|
|
16
31
|
## Quick Start
|
|
17
32
|
|
|
@@ -37,7 +52,7 @@ It runs on your machine as a background daemon and pairs with a mobile-friendly
|
|
|
37
52
|
palmier init
|
|
38
53
|
```
|
|
39
54
|
This detects your agents, configures access, installs the background daemon, and starts pairing.
|
|
40
|
-
4. Open `http://localhost
|
|
55
|
+
4. Open `http://localhost:7256` to access the app locally — no pairing needed.
|
|
41
56
|
5. To access from other devices, enter the pairing code shown after init into the [PWA](https://app.palmier.me).
|
|
42
57
|
|
|
43
58
|
### Prerequisites
|
|
@@ -52,9 +67,9 @@ Palmier runs as a background daemon (systemd on Linux, launchd on macOS, Task Sc
|
|
|
52
67
|
|
|
53
68
|
### MCP Server
|
|
54
69
|
|
|
55
|
-
Palmier exposes an [MCP](https://modelcontextprotocol.io) server at `http://localhost
|
|
70
|
+
Palmier exposes an [MCP](https://modelcontextprotocol.io) server at `http://localhost:7256/mcp` (streamable HTTP transport). MCP-capable agents can register it to get tool and resource definitions automatically. The same tools and resources are also available as REST endpoints for curl-based agents.
|
|
56
71
|
|
|
57
|
-
**MCP server URL:** `http://localhost
|
|
72
|
+
**MCP server URL:** `http://localhost:7256/mcp`
|
|
58
73
|
|
|
59
74
|
**Available tools:**
|
|
60
75
|
| Tool | Description |
|
|
@@ -117,17 +132,17 @@ Three ways to reach your host, ordered by setup effort:
|
|
|
117
132
|
|
|
118
133
|
| Mode | Where | Pairing | Notes |
|
|
119
134
|
|------|-------|---------|-------|
|
|
120
|
-
| **Local** | `http://localhost
|
|
135
|
+
| **Local** | `http://localhost:7256` in a browser on the host machine | Not required | Loopback only. No internet needed. |
|
|
121
136
|
| **Remote (web)** | [https://app.palmier.me](https://app.palmier.me) in any browser | Required | Always goes through the cloud relay. |
|
|
122
|
-
| **Remote (app)** | [Android APK](https://github.com/caihongxu/palmier-android/releases) | Required | Push notifications, device capabilities, and **auto-LAN**. |
|
|
137
|
+
| **Remote (app)** | [Android APK](https://github.com/caihongxu/palmier-android/releases/latest) | Required | Push notifications, device capabilities, and **auto-LAN**. |
|
|
123
138
|
|
|
124
|
-
**Auto-LAN (native app only).** When the Android app is on the same network as the host, it transparently routes RPC over direct LAN HTTP (`http://<host-ip
|
|
139
|
+
**Auto-LAN (native app only).** When the Android app is on the same network as the host, it transparently routes RPC over direct LAN HTTP (`http://<host-ip>:7256/rpc/...`) instead of through the relay — lower latency, no protocol change. Browser PWAs can't do this (Private Network Access / mixed-content restrictions) and stay on the relay.
|
|
125
140
|
|
|
126
141
|
## Security & Privacy
|
|
127
142
|
|
|
128
143
|
**Local mode** — all traffic stays on `127.0.0.1`. No data leaves your machine. The web UI, `/pair`, and `/events` reject any non-loopback caller; only `/rpc/<method>` (bearer-auth) and `/health` are reachable from the LAN.
|
|
129
144
|
|
|
130
|
-
**Server mode** — communication between your device and host is relayed through the Palmier cloud server over TLS-encrypted NATS connections. The server acts as a passthrough relay only — it does not store, log, or inspect any user data, task content, or agent output. The only data the server persists is a host registration ID used for message routing and
|
|
145
|
+
**Server mode** — communication between your device and host is relayed through the Palmier cloud server over TLS-encrypted NATS connections. The server acts as a passthrough relay only — it does not store, log, or inspect any user data, task content, or agent output. The only data the server persists is a host registration ID used for message routing and push subscription tokens for delivering notifications. See the [Privacy Policy](https://www.palmier.me/privacy) for full details.
|
|
131
146
|
|
|
132
147
|
**Auto-LAN** — direct LAN HTTP requests use the same client token (Bearer auth) generated during pairing. The host validates every `/rpc/*` call regardless of source.
|
|
133
148
|
|
|
@@ -137,7 +152,7 @@ In all modes, client tokens are generated and validated entirely on your host. T
|
|
|
137
152
|
|
|
138
153
|
### Pairing Devices
|
|
139
154
|
|
|
140
|
-
Local access (`http://localhost
|
|
155
|
+
Local access (`http://localhost:7256`) works immediately — no pairing needed.
|
|
141
156
|
|
|
142
157
|
For remote access (web or app), run `palmier pair` on the host to generate a code, then enter it at [https://app.palmier.me](https://app.palmier.me) or in the Android app. Pairing always goes through the relay; auto-LAN kicks in transparently afterward in the native app when on the same network.
|
|
143
158
|
|
|
@@ -226,7 +241,7 @@ To fully remove Palmier from a machine:
|
|
|
226
241
|
|
|
227
242
|
## Disclaimer
|
|
228
243
|
|
|
229
|
-
Palmier spawns AI agents that can read, write, and execute on your machine. [Read the full disclaimer](DISCLAIMER.md) before use.
|
|
244
|
+
Palmier spawns AI agents that can read, write, and execute on your machine. [Read the full disclaimer](DISCLAIMER.md) before use. By using Palmier, you agree to the [Terms of Service](https://www.palmier.me/terms) and [Privacy Policy](https://www.palmier.me/privacy).
|
|
230
245
|
|
|
231
246
|
## License
|
|
232
247
|
|
package/dist/agents/agent.d.ts
CHANGED
package/dist/agents/agent.js
CHANGED
package/dist/agents/aider.d.ts
CHANGED
package/dist/agents/aider.js
CHANGED
package/dist/agents/claude.d.ts
CHANGED
package/dist/agents/claude.js
CHANGED
package/dist/agents/cline.d.ts
CHANGED
package/dist/agents/cline.js
CHANGED
package/dist/agents/codex.d.ts
CHANGED
package/dist/agents/codex.js
CHANGED
package/dist/agents/copilot.d.ts
CHANGED
package/dist/agents/copilot.js
CHANGED
package/dist/agents/cursor.d.ts
CHANGED
package/dist/agents/cursor.js
CHANGED
package/dist/agents/droid.d.ts
CHANGED
package/dist/agents/droid.js
CHANGED
package/dist/agents/gemini.d.ts
CHANGED
package/dist/agents/gemini.js
CHANGED
package/dist/agents/goose.d.ts
CHANGED
package/dist/agents/goose.js
CHANGED
package/dist/agents/hermes.d.ts
CHANGED
package/dist/agents/hermes.js
CHANGED
package/dist/agents/kimi.d.ts
CHANGED
package/dist/agents/kimi.js
CHANGED
package/dist/agents/kiro.d.ts
CHANGED
package/dist/agents/kiro.js
CHANGED
package/dist/agents/openclaw.js
CHANGED
package/dist/agents/opencode.js
CHANGED
package/dist/agents/qoder.d.ts
CHANGED
package/dist/agents/qoder.js
CHANGED
package/dist/agents/qwen.d.ts
CHANGED
package/dist/agents/qwen.js
CHANGED
|
@@ -4,4 +4,3 @@ export declare const TASK_SUCCESS_MARKER = "[PALMIER_TASK_SUCCESS]";
|
|
|
4
4
|
export declare const TASK_FAILURE_MARKER = "[PALMIER_TASK_FAILURE]";
|
|
5
5
|
export declare const TASK_REPORT_PREFIX = "[PALMIER_REPORT]";
|
|
6
6
|
export declare const TASK_PERMISSION_PREFIX = "[PALMIER_PERMISSION]";
|
|
7
|
-
//# sourceMappingURL=shared-prompt.d.ts.map
|
|
@@ -20,4 +20,3 @@ export const TASK_SUCCESS_MARKER = "[PALMIER_TASK_SUCCESS]";
|
|
|
20
20
|
export const TASK_FAILURE_MARKER = "[PALMIER_TASK_FAILURE]";
|
|
21
21
|
export const TASK_REPORT_PREFIX = "[PALMIER_REPORT]";
|
|
22
22
|
export const TASK_PERMISSION_PREFIX = "[PALMIER_PERMISSION]";
|
|
23
|
-
//# sourceMappingURL=shared-prompt.js.map
|
package/dist/client-store.d.ts
CHANGED
|
@@ -9,4 +9,3 @@ export declare function revokeClient(token: string): boolean;
|
|
|
9
9
|
export declare function revokeAllClients(): number;
|
|
10
10
|
export declare function validateClient(token: string): boolean;
|
|
11
11
|
export declare function hasClients(): boolean;
|
|
12
|
-
//# sourceMappingURL=client-store.d.ts.map
|
package/dist/client-store.js
CHANGED
package/dist/commands/clients.js
CHANGED
package/dist/commands/info.d.ts
CHANGED
package/dist/commands/info.js
CHANGED
package/dist/commands/init.d.ts
CHANGED
package/dist/commands/init.js
CHANGED
|
@@ -39,7 +39,7 @@ export async function initCommand() {
|
|
|
39
39
|
console.log(` All tasks and execution data will be stored here.\n`);
|
|
40
40
|
console.log(` ${dim("Local:")} ${cyan(`http://localhost:${httpPort}`)}`);
|
|
41
41
|
console.log(` Open in a browser on this machine — no internet required.\n`);
|
|
42
|
-
console.log(` ${dim("Remote (app):")} ${cyan("https://github.com/caihongxu/palmier-android/releases")}`);
|
|
42
|
+
console.log(` ${dim("Remote (app):")} ${cyan("https://github.com/caihongxu/palmier-android/releases/latest")}`);
|
|
43
43
|
if (lanIp) {
|
|
44
44
|
console.log(` Download the Android APK. The app uses LAN for direct RPC`);
|
|
45
45
|
console.log(` on the same network (detected ${cyan(`http://${lanIp}:${httpPort}`)}),`);
|
|
@@ -136,4 +136,3 @@ async function registerHost(serverUrl, existingHostId) {
|
|
|
136
136
|
throw new Error(`Failed to register host: ${message}`);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
//# sourceMappingURL=init.js.map
|
package/dist/commands/pair.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export declare const PAIRING_EXPIRY_MS: number;
|
|
|
2
2
|
export declare function generatePairingCode(): string;
|
|
3
3
|
/** Listens on NATS (server mode) and HTTP (via serve daemon) in parallel. */
|
|
4
4
|
export declare function pairCommand(): Promise<void>;
|
|
5
|
-
//# sourceMappingURL=pair.d.ts.map
|
package/dist/commands/pair.js
CHANGED
package/dist/commands/restart.js
CHANGED
package/dist/commands/run.d.ts
CHANGED
|
@@ -5,4 +5,3 @@ export declare function parseReportFiles(output: string): string[];
|
|
|
5
5
|
export declare function parsePermissions(output: string): RequiredPermission[];
|
|
6
6
|
/** Falls back to "finished" if no success/failure marker is found. */
|
|
7
7
|
export declare function parseTaskOutcome(output: string): TaskRunningState;
|
|
8
|
-
//# sourceMappingURL=run.d.ts.map
|
package/dist/commands/run.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as fs from "fs";
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
import * as readline from "readline";
|
|
4
|
+
import { StringCodec } from "nats";
|
|
4
5
|
import { spawnCommand, spawnStreamingCommand } from "../spawn-command.js";
|
|
5
6
|
import { loadConfig } from "../config.js";
|
|
6
7
|
import { connectNats } from "../nats-client.js";
|
|
@@ -9,6 +10,18 @@ import { getAgent } from "../agents/agent.js";
|
|
|
9
10
|
import { getPlatform } from "../platform/index.js";
|
|
10
11
|
import { TASK_SUCCESS_MARKER, TASK_FAILURE_MARKER, TASK_REPORT_PREFIX, TASK_PERMISSION_PREFIX } from "../agents/shared-prompt.js";
|
|
11
12
|
import { publishHostEvent } from "../events.js";
|
|
13
|
+
async function sendPushNotification(nc, hostId, title, body) {
|
|
14
|
+
if (!nc)
|
|
15
|
+
return;
|
|
16
|
+
try {
|
|
17
|
+
const sc = StringCodec();
|
|
18
|
+
const subject = `host.${hostId}.push.send`;
|
|
19
|
+
await nc.request(subject, sc.encode(JSON.stringify({ hostId, title, body })), { timeout: 15_000 });
|
|
20
|
+
}
|
|
21
|
+
catch (err) {
|
|
22
|
+
console.warn(`[push] failed to send notification:`, err);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
12
25
|
/**
|
|
13
26
|
* Invoke the agent CLI in a continuation loop to handle permission requests.
|
|
14
27
|
* `invokeTask` is the ParsedTask whose prompt is passed to the agent (in
|
|
@@ -289,6 +302,8 @@ async function runCommandTriggeredMode(ctx) {
|
|
|
289
302
|
}
|
|
290
303
|
else {
|
|
291
304
|
invocationsFailed++;
|
|
305
|
+
const taskLabel = ctx.task.frontmatter.name || ctx.task.frontmatter.user_prompt;
|
|
306
|
+
await sendPushNotification(ctx.nc, ctx.config.hostId, `Task "${taskLabel}" invocation failed`, line.length > 200 ? line.slice(0, 200) + "…" : line);
|
|
292
307
|
}
|
|
293
308
|
appendLog(line, "", result.outcome);
|
|
294
309
|
// Signal "waiting for more input" in the UI.
|
|
@@ -381,6 +396,7 @@ async function runEventTriggeredMode(ctx) {
|
|
|
381
396
|
appendRunMessage(ctx.taskDir, ctx.runId, { role: "status", time: Date.now(), content: "", type: "monitoring" });
|
|
382
397
|
await publishHostEvent(ctx.nc, ctx.config.hostId, ctx.taskId, { event_type: "result-updated", run_id: ctx.runId });
|
|
383
398
|
let eventsProcessed = 0;
|
|
399
|
+
let lastOutcome = "finished";
|
|
384
400
|
try {
|
|
385
401
|
// eslint-disable-next-line no-constant-condition
|
|
386
402
|
while (true) {
|
|
@@ -396,7 +412,8 @@ async function runEventTriggeredMode(ctx) {
|
|
|
396
412
|
const perEventTask = {
|
|
397
413
|
frontmatter: { ...ctx.task.frontmatter, user_prompt: perEventPrompt },
|
|
398
414
|
};
|
|
399
|
-
await invokeAgentWithRetries(ctx, perEventTask);
|
|
415
|
+
const result = await invokeAgentWithRetries(ctx, perEventTask);
|
|
416
|
+
lastOutcome = result.outcome;
|
|
400
417
|
appendRunMessage(ctx.taskDir, ctx.runId, { role: "status", time: Date.now(), content: "", type: "monitoring" });
|
|
401
418
|
await publishHostEvent(ctx.nc, ctx.config.hostId, ctx.taskId, { event_type: "result-updated", run_id: ctx.runId });
|
|
402
419
|
}
|
|
@@ -407,7 +424,7 @@ async function runEventTriggeredMode(ctx) {
|
|
|
407
424
|
await publishHostEvent(ctx.nc, ctx.config.hostId, ctx.taskId, { event_type: "result-updated", run_id: ctx.runId });
|
|
408
425
|
return { outcome: "failed", endTime: Date.now() };
|
|
409
426
|
}
|
|
410
|
-
return { outcome:
|
|
427
|
+
return { outcome: lastOutcome, endTime: Date.now() };
|
|
411
428
|
}
|
|
412
429
|
async function publishTaskEvent(nc, config, taskDir, taskId, eventType, taskName, runId) {
|
|
413
430
|
writeTaskStatus(taskDir, {
|
|
@@ -513,4 +530,3 @@ export function parseTaskOutcome(output) {
|
|
|
513
530
|
return "finished";
|
|
514
531
|
return "finished";
|
|
515
532
|
}
|
|
516
|
-
//# sourceMappingURL=run.js.map
|
package/dist/commands/serve.d.ts
CHANGED
package/dist/commands/serve.js
CHANGED
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
package/dist/event-queues.d.ts
CHANGED
package/dist/event-queues.js
CHANGED
package/dist/events.d.ts
CHANGED
package/dist/events.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/linked-device.d.ts
CHANGED
|
@@ -6,4 +6,3 @@ export declare function getLinkedDevice(): LinkedDevice | null;
|
|
|
6
6
|
export declare function setLinkedDevice(clientToken: string, fcmToken: string): void;
|
|
7
7
|
export declare function clearLinkedDevice(): void;
|
|
8
8
|
export declare function clearLinkedDeviceIfMatches(clientToken: string): boolean;
|
|
9
|
-
//# sourceMappingURL=linked-device.d.ts.map
|
package/dist/linked-device.js
CHANGED
package/dist/mcp-handler.d.ts
CHANGED
|
@@ -8,4 +8,3 @@ export interface McpResponse {
|
|
|
8
8
|
export declare function getResourceSubscriptions(): Map<string, Set<string>>;
|
|
9
9
|
export declare function getAgentName(sessionId: string): string | undefined;
|
|
10
10
|
export declare function handleMcpRequest(body: string, sessionId: string | undefined, ctx: ToolContext): Promise<McpResponse>;
|
|
11
|
-
//# sourceMappingURL=mcp-handler.d.ts.map
|
package/dist/mcp-handler.js
CHANGED
package/dist/mcp-tools.d.ts
CHANGED
|
@@ -38,4 +38,3 @@ export interface ResourceDefinition {
|
|
|
38
38
|
export declare const agentResources: ResourceDefinition[];
|
|
39
39
|
export declare const agentResourceMap: Map<string, ResourceDefinition>;
|
|
40
40
|
export declare function generateEndpointDocs(port: number, taskId: string, tools?: ToolDefinition[], resources?: ResourceDefinition[]): string;
|
|
41
|
-
//# sourceMappingURL=mcp-tools.d.ts.map
|
package/dist/mcp-tools.js
CHANGED
package/dist/nats-client.d.ts
CHANGED
package/dist/nats-client.js
CHANGED
package/dist/network.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export declare function detectDefaultInterface(): Promise<string | null>;
|
|
2
2
|
export declare function getInterfaceIpv4(interfaceName: string): string | null;
|
|
3
3
|
export declare function buildLanUrl(port: number, interfaceName: string | undefined): string | null;
|
|
4
|
-
//# sourceMappingURL=network.d.ts.map
|