palmier 0.1.0 → 0.1.2

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
@@ -11,7 +11,7 @@ A Node.js CLI that runs on your machine as a persistent agent. It manages tasks,
11
11
  ## Installation
12
12
 
13
13
  ```bash
14
- npm install -g palmier-agent
14
+ npm install -g palmier
15
15
  ```
16
16
 
17
17
  ## CLI Commands
@@ -25,7 +25,7 @@ npm install -g palmier-agent
25
25
 
26
26
  ## Setup
27
27
 
28
- 1. Install the agent: `npm install -g palmier-agent`
28
+ 1. Install the agent: `npm install -g palmier`
29
29
  2. Register on the Palmier PWA and click **Add Agent**.
30
30
  3. Copy the provisioning token.
31
31
  4. Run `palmier init --token <token>` in your project directory.
@@ -35,6 +35,31 @@ The `init` command:
35
35
  - Installs a systemd user service for the agent
36
36
  - Configures Claude Code hooks for remote interaction
37
37
 
38
+ ### Verifying the Service
39
+
40
+ After `palmier init`, verify the agent is running:
41
+
42
+ ```bash
43
+ # Check service status
44
+ systemctl --user status palmier-agent.service
45
+
46
+ # View recent logs
47
+ journalctl --user -u palmier-agent.service -n 50 --no-pager
48
+
49
+ # Follow logs in real time
50
+ journalctl --user -u palmier-agent.service -f
51
+ ```
52
+
53
+ You should see `Active: active (running)` and log output showing a NATS connection. If the service failed:
54
+
55
+ ```bash
56
+ # Restart manually
57
+ systemctl --user restart palmier-agent.service
58
+
59
+ # Check config is valid
60
+ cat ~/.config/palmier/agent.json
61
+ ```
62
+
38
63
  ## How It Works
39
64
 
40
65
  - The agent runs as a **systemd user service**, staying alive in the background.
@@ -28,7 +28,7 @@ export async function initCommand(options) {
28
28
  const res = await fetch(`${decoded.server}/api/agents/claim`, {
29
29
  method: "POST",
30
30
  headers: { "Content-Type": "application/json" },
31
- body: JSON.stringify({ provisioning_token: decoded.token }),
31
+ body: JSON.stringify({ provisioning_token: options.token }),
32
32
  });
33
33
  if (!res.ok) {
34
34
  const body = await res.text();
@@ -12,7 +12,7 @@ export async function serveCommand() {
12
12
  const config = loadConfig();
13
13
  const nc = await connectNats(config);
14
14
  const sc = StringCodec();
15
- const subject = `user.${config.userId}.agent.${config.agentId}.rpc.*`;
15
+ const subject = `user.${config.userId}.agent.${config.agentId}.rpc.>`;
16
16
  console.log(`Subscribing to: ${subject}`);
17
17
  const sub = nc.subscribe(subject);
18
18
  // Graceful shutdown
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palmier",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Palmier agent CLI - provisions, executes tasks, and serves NATS RPC",
5
5
  "license": "ISC",
6
6
  "author": "Hongxu Cai",
@@ -43,7 +43,7 @@ export async function initCommand(options: InitOptions): Promise<void> {
43
43
  const res = await fetch(`${decoded.server}/api/agents/claim`, {
44
44
  method: "POST",
45
45
  headers: { "Content-Type": "application/json" },
46
- body: JSON.stringify({ provisioning_token: decoded.token }),
46
+ body: JSON.stringify({ provisioning_token: options.token }),
47
47
  });
48
48
 
49
49
  if (!res.ok) {
@@ -15,7 +15,7 @@ export async function serveCommand(): Promise<void> {
15
15
  const nc = await connectNats(config);
16
16
  const sc = StringCodec();
17
17
 
18
- const subject = `user.${config.userId}.agent.${config.agentId}.rpc.*`;
18
+ const subject = `user.${config.userId}.agent.${config.agentId}.rpc.>`;
19
19
  console.log(`Subscribing to: ${subject}`);
20
20
 
21
21
  const sub = nc.subscribe(subject);