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
|
@@ -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
|
-
}
|