palmier 0.9.6 → 0.9.7

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 (250) hide show
  1. package/README.md +28 -13
  2. package/dist/agents/agent.d.ts +0 -1
  3. package/dist/agents/agent.js +0 -1
  4. package/dist/agents/aider.d.ts +0 -1
  5. package/dist/agents/aider.js +0 -1
  6. package/dist/agents/claude.d.ts +0 -1
  7. package/dist/agents/claude.js +0 -1
  8. package/dist/agents/cline.d.ts +0 -1
  9. package/dist/agents/cline.js +0 -1
  10. package/dist/agents/codex.d.ts +0 -1
  11. package/dist/agents/codex.js +0 -1
  12. package/dist/agents/copilot.d.ts +0 -1
  13. package/dist/agents/copilot.js +0 -1
  14. package/dist/agents/cursor.d.ts +0 -1
  15. package/dist/agents/cursor.js +0 -1
  16. package/dist/agents/deepagents.d.ts +0 -1
  17. package/dist/agents/deepagents.js +0 -1
  18. package/dist/agents/droid.d.ts +0 -1
  19. package/dist/agents/droid.js +0 -1
  20. package/dist/agents/gemini.d.ts +0 -1
  21. package/dist/agents/gemini.js +0 -1
  22. package/dist/agents/goose.d.ts +0 -1
  23. package/dist/agents/goose.js +0 -1
  24. package/dist/agents/hermes.d.ts +0 -1
  25. package/dist/agents/hermes.js +0 -1
  26. package/dist/agents/kimi.d.ts +0 -1
  27. package/dist/agents/kimi.js +0 -1
  28. package/dist/agents/kiro.d.ts +0 -1
  29. package/dist/agents/kiro.js +0 -1
  30. package/dist/agents/openclaw.d.ts +0 -1
  31. package/dist/agents/openclaw.js +0 -1
  32. package/dist/agents/opencode.d.ts +0 -1
  33. package/dist/agents/opencode.js +0 -1
  34. package/dist/agents/qoder.d.ts +0 -1
  35. package/dist/agents/qoder.js +0 -1
  36. package/dist/agents/qwen.d.ts +0 -1
  37. package/dist/agents/qwen.js +0 -1
  38. package/dist/agents/shared-prompt.d.ts +0 -1
  39. package/dist/agents/shared-prompt.js +0 -1
  40. package/dist/client-store.d.ts +0 -1
  41. package/dist/client-store.js +0 -1
  42. package/dist/commands/clients.d.ts +0 -1
  43. package/dist/commands/clients.js +0 -1
  44. package/dist/commands/info.d.ts +0 -1
  45. package/dist/commands/info.js +0 -1
  46. package/dist/commands/init.d.ts +0 -1
  47. package/dist/commands/init.js +1 -2
  48. package/dist/commands/pair.d.ts +0 -1
  49. package/dist/commands/pair.js +0 -1
  50. package/dist/commands/restart.d.ts +0 -1
  51. package/dist/commands/restart.js +0 -1
  52. package/dist/commands/run.d.ts +0 -1
  53. package/dist/commands/run.js +0 -1
  54. package/dist/commands/serve.d.ts +0 -1
  55. package/dist/commands/serve.js +0 -1
  56. package/dist/commands/uninstall.d.ts +0 -1
  57. package/dist/commands/uninstall.js +0 -1
  58. package/dist/config.d.ts +0 -1
  59. package/dist/config.js +0 -1
  60. package/dist/event-queues.d.ts +0 -1
  61. package/dist/event-queues.js +0 -1
  62. package/dist/events.d.ts +0 -1
  63. package/dist/events.js +0 -1
  64. package/dist/index.d.ts +0 -1
  65. package/dist/index.js +0 -1
  66. package/dist/linked-device.d.ts +0 -1
  67. package/dist/linked-device.js +0 -1
  68. package/dist/mcp-handler.d.ts +0 -1
  69. package/dist/mcp-handler.js +0 -1
  70. package/dist/mcp-tools.d.ts +0 -1
  71. package/dist/mcp-tools.js +0 -1
  72. package/dist/nats-client.d.ts +0 -1
  73. package/dist/nats-client.js +0 -1
  74. package/dist/network.d.ts +0 -1
  75. package/dist/network.js +0 -1
  76. package/dist/notification-store.d.ts +0 -1
  77. package/dist/notification-store.js +0 -1
  78. package/dist/pending-requests.d.ts +0 -1
  79. package/dist/pending-requests.js +0 -1
  80. package/dist/platform/index.d.ts +0 -1
  81. package/dist/platform/index.js +0 -1
  82. package/dist/platform/linux.d.ts +0 -1
  83. package/dist/platform/linux.js +0 -1
  84. package/dist/platform/macos.d.ts +0 -1
  85. package/dist/platform/macos.js +0 -1
  86. package/dist/platform/platform.d.ts +0 -1
  87. package/dist/platform/platform.js +0 -1
  88. package/dist/platform/windows.d.ts +0 -1
  89. package/dist/platform/windows.js +0 -1
  90. package/dist/pwa/assets/{index-MLEFUP3r.js → index-DWvRAUiy.js} +31 -31
  91. package/dist/pwa/assets/{web-B1sKCc7e.js → web-C4iZbqTC.js} +1 -1
  92. package/dist/pwa/assets/{web-ETD-8ZHd.js → web-CBFqJGX6.js} +1 -1
  93. package/dist/pwa/assets/{web-B4xEa6WO.js → web-DL4uXOpS.js} +1 -1
  94. package/dist/pwa/index.html +2 -2
  95. package/dist/pwa/service-worker.js +1 -1
  96. package/dist/rpc-handler.d.ts +0 -1
  97. package/dist/rpc-handler.js +0 -1
  98. package/dist/sms-store.d.ts +0 -1
  99. package/dist/sms-store.js +0 -1
  100. package/dist/spawn-command.d.ts +0 -1
  101. package/dist/spawn-command.js +0 -1
  102. package/dist/task.d.ts +0 -1
  103. package/dist/task.js +0 -1
  104. package/dist/transports/http-transport.d.ts +0 -1
  105. package/dist/transports/http-transport.js +0 -1
  106. package/dist/transports/nats-transport.d.ts +0 -1
  107. package/dist/transports/nats-transport.js +0 -1
  108. package/dist/types.d.ts +0 -1
  109. package/dist/types.js +0 -1
  110. package/dist/update-checker.d.ts +0 -1
  111. package/dist/update-checker.js +0 -1
  112. package/package.json +5 -1
  113. package/.github/workflows/ci.yml +0 -16
  114. package/.github/workflows/publish.yml +0 -37
  115. package/CLAUDE.md +0 -22
  116. package/palmier-server/.github/workflows/ci.yml +0 -21
  117. package/palmier-server/.github/workflows/deploy.yml +0 -38
  118. package/palmier-server/CLAUDE.md +0 -17
  119. package/palmier-server/PRODUCTION.md +0 -358
  120. package/palmier-server/README.md +0 -231
  121. package/palmier-server/nats.conf +0 -19
  122. package/palmier-server/package.json +0 -15
  123. package/palmier-server/pnpm-lock.yaml +0 -7639
  124. package/palmier-server/pnpm-workspace.yaml +0 -3
  125. package/palmier-server/pwa/index.html +0 -16
  126. package/palmier-server/pwa/logo/logo_20260421.png +0 -0
  127. package/palmier-server/pwa/package.json +0 -34
  128. package/palmier-server/pwa/public/apple-touch-icon.png +0 -0
  129. package/palmier-server/pwa/public/favicon.ico +0 -0
  130. package/palmier-server/pwa/public/pwa-192x192.png +0 -0
  131. package/palmier-server/pwa/public/pwa-512x512.png +0 -0
  132. package/palmier-server/pwa/src/App.css +0 -3012
  133. package/palmier-server/pwa/src/App.tsx +0 -59
  134. package/palmier-server/pwa/src/agentLabels.ts +0 -11
  135. package/palmier-server/pwa/src/api.ts +0 -67
  136. package/palmier-server/pwa/src/components/CapabilityToggles.tsx +0 -170
  137. package/palmier-server/pwa/src/components/ConnectionStatusIcon.tsx +0 -113
  138. package/palmier-server/pwa/src/components/HostMenu.tsx +0 -429
  139. package/palmier-server/pwa/src/components/PermissionsDialog.tsx +0 -34
  140. package/palmier-server/pwa/src/components/PullToRefreshIndicator.tsx +0 -46
  141. package/palmier-server/pwa/src/components/RunDetailView.tsx +0 -343
  142. package/palmier-server/pwa/src/components/SessionComposer.tsx +0 -157
  143. package/palmier-server/pwa/src/components/SessionsView.tsx +0 -326
  144. package/palmier-server/pwa/src/components/SwipeToDeleteRow.tsx +0 -170
  145. package/palmier-server/pwa/src/components/TabBar.tsx +0 -40
  146. package/palmier-server/pwa/src/components/TaskCard.tsx +0 -255
  147. package/palmier-server/pwa/src/components/TaskForm.tsx +0 -766
  148. package/palmier-server/pwa/src/components/TasksView.tsx +0 -179
  149. package/palmier-server/pwa/src/constants.ts +0 -2
  150. package/palmier-server/pwa/src/contexts/HostConnectionContext.tsx +0 -432
  151. package/palmier-server/pwa/src/contexts/HostStoreContext.tsx +0 -124
  152. package/palmier-server/pwa/src/draftGuard.ts +0 -24
  153. package/palmier-server/pwa/src/formatTime.ts +0 -44
  154. package/palmier-server/pwa/src/hooks/useBackClose.ts +0 -75
  155. package/palmier-server/pwa/src/hooks/useMediaQuery.ts +0 -17
  156. package/palmier-server/pwa/src/hooks/usePullToRefresh.ts +0 -102
  157. package/palmier-server/pwa/src/hooks/usePushSubscription.ts +0 -77
  158. package/palmier-server/pwa/src/main.tsx +0 -14
  159. package/palmier-server/pwa/src/native/Device.ts +0 -49
  160. package/palmier-server/pwa/src/pages/Dashboard.tsx +0 -542
  161. package/palmier-server/pwa/src/pages/PairHost.tsx +0 -232
  162. package/palmier-server/pwa/src/pages/PairSetup.tsx +0 -134
  163. package/palmier-server/pwa/src/service-worker.ts +0 -142
  164. package/palmier-server/pwa/src/types.ts +0 -75
  165. package/palmier-server/pwa/src/vite-env.d.ts +0 -11
  166. package/palmier-server/pwa/tsconfig.json +0 -21
  167. package/palmier-server/pwa/tsconfig.node.json +0 -19
  168. package/palmier-server/pwa/vite.config.ts +0 -47
  169. package/palmier-server/server/.env.example +0 -20
  170. package/palmier-server/server/package.json +0 -36
  171. package/palmier-server/server/src/db.ts +0 -44
  172. package/palmier-server/server/src/fcm.ts +0 -74
  173. package/palmier-server/server/src/index.ts +0 -688
  174. package/palmier-server/server/src/nats-jwt.ts +0 -299
  175. package/palmier-server/server/src/nats-setup.ts +0 -48
  176. package/palmier-server/server/src/nats.ts +0 -33
  177. package/palmier-server/server/src/notify.ts +0 -34
  178. package/palmier-server/server/src/push.ts +0 -68
  179. package/palmier-server/server/src/routes/device.ts +0 -224
  180. package/palmier-server/server/src/routes/fcm.ts +0 -64
  181. package/palmier-server/server/src/routes/hosts.ts +0 -56
  182. package/palmier-server/server/src/routes/push.ts +0 -101
  183. package/palmier-server/server/tsconfig.json +0 -20
  184. package/palmier-server/spec.md +0 -533
  185. package/src/agents/agent-instructions.md +0 -28
  186. package/src/agents/agent.ts +0 -114
  187. package/src/agents/aider.ts +0 -35
  188. package/src/agents/claude.ts +0 -39
  189. package/src/agents/cline.ts +0 -35
  190. package/src/agents/codex.ts +0 -40
  191. package/src/agents/copilot.ts +0 -37
  192. package/src/agents/cursor.ts +0 -36
  193. package/src/agents/deepagents.ts +0 -36
  194. package/src/agents/droid.ts +0 -35
  195. package/src/agents/gemini.ts +0 -43
  196. package/src/agents/goose.ts +0 -33
  197. package/src/agents/hermes.ts +0 -36
  198. package/src/agents/kimi.ts +0 -35
  199. package/src/agents/kiro.ts +0 -36
  200. package/src/agents/openclaw.ts +0 -29
  201. package/src/agents/opencode.ts +0 -36
  202. package/src/agents/qoder.ts +0 -36
  203. package/src/agents/qwen.ts +0 -32
  204. package/src/agents/shared-prompt.ts +0 -30
  205. package/src/client-store.ts +0 -68
  206. package/src/commands/clients.ts +0 -29
  207. package/src/commands/info.ts +0 -29
  208. package/src/commands/init.ts +0 -165
  209. package/src/commands/pair.ts +0 -137
  210. package/src/commands/restart.ts +0 -6
  211. package/src/commands/run.ts +0 -608
  212. package/src/commands/serve.ts +0 -211
  213. package/src/commands/uninstall.ts +0 -9
  214. package/src/config.ts +0 -36
  215. package/src/cross-spawn.d.ts +0 -5
  216. package/src/event-queues.ts +0 -41
  217. package/src/events.ts +0 -29
  218. package/src/index.ts +0 -111
  219. package/src/linked-device.ts +0 -52
  220. package/src/mcp-handler.ts +0 -200
  221. package/src/mcp-tools.ts +0 -839
  222. package/src/nats-client.ts +0 -19
  223. package/src/network.ts +0 -96
  224. package/src/notification-store.ts +0 -30
  225. package/src/pending-requests.ts +0 -73
  226. package/src/platform/index.ts +0 -20
  227. package/src/platform/linux.ts +0 -296
  228. package/src/platform/macos.ts +0 -329
  229. package/src/platform/platform.ts +0 -31
  230. package/src/platform/windows.ts +0 -299
  231. package/src/rpc-handler.ts +0 -691
  232. package/src/sms-store.ts +0 -28
  233. package/src/spawn-command.ts +0 -123
  234. package/src/task.ts +0 -343
  235. package/src/transports/http-transport.ts +0 -478
  236. package/src/transports/nats-transport.ts +0 -76
  237. package/src/types.ts +0 -89
  238. package/src/update-checker.ts +0 -40
  239. package/test/agent-instructions.test.ts +0 -209
  240. package/test/agent-output-parsing.test.ts +0 -74
  241. package/test/linux-cron.test.ts +0 -41
  242. package/test/macos-plist.test.ts +0 -112
  243. package/test/notification-store.test.ts +0 -57
  244. package/test/pairing.test.ts +0 -35
  245. package/test/result-state.test.ts +0 -110
  246. package/test/task-parsing.test.ts +0 -82
  247. package/test/taskrun-messages.test.ts +0 -224
  248. package/test/tsconfig.json +0 -9
  249. package/test/windows-xml.test.ts +0 -89
  250. package/tsconfig.json +0 -19
@@ -1,20 +0,0 @@
1
- PORT=3000
2
-
3
- # PostgreSQL
4
- DATABASE_URL=postgresql://user:password@localhost:5432/palmier
5
-
6
- # NATS
7
- NATS_URL=nats://localhost:4222
8
- NATS_HOST_URL=nats://192.168.1.100:4222
9
- # Production: wss://nats.palmier.me LAN dev: ws://192.168.1.100:9222
10
- NATS_WS_URL=ws://192.168.1.100:9222
11
- NATS_TOKEN=
12
-
13
- # Web Push (generate with: npx web-push generate-vapid-keys)
14
- VAPID_PUBLIC_KEY=
15
- VAPID_PRIVATE_KEY=
16
- VAPID_MAILTO=mailto:admin@example.com
17
-
18
- # Firebase Admin SDK (for FCM push to Android devices)
19
- # Download from: Firebase Console → Project Settings → Service accounts → Generate new private key
20
- GOOGLE_APPLICATION_CREDENTIALS=./palmier-firebase-adminsdk.json
@@ -1,36 +0,0 @@
1
- {
2
- "name": "palmier-server",
3
- "version": "0.0.1",
4
- "private": true,
5
- "scripts": {
6
- "dev": "tsx watch src/index.ts",
7
- "build": "tsc",
8
- "start": "node dist/index.js",
9
- "nats-setup": "tsx src/nats-setup.ts"
10
- },
11
- "dependencies": {
12
- "bcrypt": "^5.1.1",
13
- "cors": "^2.8.5",
14
- "dotenv": "^16.4.7",
15
- "express": "^4.21.2",
16
- "firebase-admin": "^13.8.0",
17
- "helmet": "^8.0.0",
18
- "jsonwebtoken": "^9.0.2",
19
- "nats": "^2.29.1",
20
- "nkeys.js": "^1.1.0",
21
- "pg": "^8.13.1",
22
- "uuid": "^11.0.5",
23
- "web-push": "^3.6.7"
24
- },
25
- "devDependencies": {
26
- "@types/bcrypt": "^5.0.2",
27
- "@types/cors": "^2.8.17",
28
- "@types/express": "^5.0.0",
29
- "@types/jsonwebtoken": "^9.0.7",
30
- "@types/pg": "^8.11.10",
31
- "@types/uuid": "^10.0.0",
32
- "@types/web-push": "^3.6.4",
33
- "tsx": "^4.19.2",
34
- "typescript": "^5.7.3"
35
- }
36
- }
@@ -1,44 +0,0 @@
1
- import pg from "pg";
2
-
3
- const { Pool } = pg;
4
-
5
- export const pool = new Pool({
6
- connectionString: process.env.DATABASE_URL,
7
- });
8
-
9
- export async function initDb(): Promise<void> {
10
- const client = await pool.connect();
11
- try {
12
- await client.query(`
13
- CREATE TABLE IF NOT EXISTS hosts (
14
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
15
- name VARCHAR(255),
16
- created_at TIMESTAMPTZ DEFAULT NOW()
17
- );
18
- `);
19
- await client.query(`
20
- CREATE TABLE IF NOT EXISTS push_subscriptions (
21
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
22
- host_id UUID NOT NULL REFERENCES hosts(id) ON DELETE CASCADE,
23
- endpoint TEXT NOT NULL,
24
- p256dh TEXT NOT NULL,
25
- auth TEXT NOT NULL,
26
- created_at TIMESTAMPTZ DEFAULT NOW(),
27
- UNIQUE(host_id, endpoint)
28
- );
29
- `);
30
- await client.query(`
31
- CREATE TABLE IF NOT EXISTS fcm_tokens (
32
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
33
- host_id UUID NOT NULL REFERENCES hosts(id) ON DELETE CASCADE,
34
- fcm_token TEXT NOT NULL,
35
- device_label VARCHAR(255),
36
- updated_at TIMESTAMPTZ DEFAULT NOW(),
37
- UNIQUE(host_id, fcm_token)
38
- );
39
- `);
40
- console.log("Database tables initialized.");
41
- } finally {
42
- client.release();
43
- }
44
- }
@@ -1,74 +0,0 @@
1
- import admin from "firebase-admin";
2
- import { pool } from "./db.js";
3
-
4
- let initialized = false;
5
-
6
- function ensureInitialized(): boolean {
7
- if (initialized) return true;
8
-
9
- if (!process.env.GOOGLE_APPLICATION_CREDENTIALS) {
10
- console.warn("GOOGLE_APPLICATION_CREDENTIALS not set. FCM will not work.");
11
- return false;
12
- }
13
-
14
- admin.initializeApp({
15
- credential: admin.credential.applicationDefault(),
16
- });
17
- initialized = true;
18
- return true;
19
- }
20
-
21
- export async function sendFcmToClients(
22
- hostId: string,
23
- data: Record<string, string>
24
- ): Promise<void> {
25
- if (!ensureInitialized()) {
26
- console.warn("[FCM] Not initialized, skipping message for host", hostId);
27
- return;
28
- }
29
-
30
- const result = await pool.query(
31
- "SELECT fcm_token FROM fcm_tokens WHERE host_id = $1",
32
- [hostId]
33
- );
34
-
35
- if (result.rows.length === 0) {
36
- console.warn(`[FCM] No FCM tokens registered for host ${hostId}`);
37
- return;
38
- }
39
-
40
- const sendPromises = result.rows.map(async (row) => {
41
- try {
42
- await admin.messaging().send({
43
- token: row.fcm_token,
44
- data,
45
- });
46
- } catch (err: any) {
47
- if (
48
- err.code === "messaging/registration-token-not-registered" ||
49
- err.code === "messaging/invalid-registration-token"
50
- ) {
51
- await pool.query(
52
- "DELETE FROM fcm_tokens WHERE host_id = $1 AND fcm_token = $2",
53
- [hostId, row.fcm_token]
54
- );
55
- console.log(`[FCM] Removed stale token for host ${hostId}`);
56
- } else {
57
- console.error(`[FCM] Failed to send to token:`, err.message);
58
- }
59
- }
60
- });
61
-
62
- await Promise.allSettled(sendPromises);
63
- }
64
-
65
- export async function sendFcmToDevice(
66
- fcmToken: string,
67
- data: Record<string, string>
68
- ): Promise<void> {
69
- if (!ensureInitialized()) {
70
- throw new Error("FCM not initialized");
71
- }
72
-
73
- await admin.messaging().send({ token: fcmToken, data });
74
- }