palmier 0.8.1 → 0.8.4

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 (133) hide show
  1. package/CLAUDE.md +13 -0
  2. package/README.md +16 -14
  3. package/dist/agents/agent.d.ts +0 -4
  4. package/dist/agents/claude.js +1 -1
  5. package/dist/agents/codex.js +2 -2
  6. package/dist/agents/cursor.js +1 -1
  7. package/dist/agents/deepagents.js +1 -1
  8. package/dist/agents/gemini.js +3 -2
  9. package/dist/agents/goose.js +1 -1
  10. package/dist/agents/hermes.js +1 -1
  11. package/dist/agents/kiro.js +1 -1
  12. package/dist/agents/opencode.js +1 -1
  13. package/dist/agents/qoder.js +1 -1
  14. package/dist/agents/shared-prompt.d.ts +0 -3
  15. package/dist/agents/shared-prompt.js +0 -3
  16. package/dist/commands/info.d.ts +0 -3
  17. package/dist/commands/info.js +0 -5
  18. package/dist/commands/init.d.ts +0 -3
  19. package/dist/commands/init.js +2 -11
  20. package/dist/commands/pair.d.ts +1 -4
  21. package/dist/commands/pair.js +3 -12
  22. package/dist/commands/restart.d.ts +0 -3
  23. package/dist/commands/restart.js +0 -3
  24. package/dist/commands/run.d.ts +1 -14
  25. package/dist/commands/run.js +18 -61
  26. package/dist/commands/serve.d.ts +0 -3
  27. package/dist/commands/serve.js +29 -27
  28. package/dist/config.d.ts +0 -8
  29. package/dist/config.js +0 -8
  30. package/dist/device-capabilities.d.ts +1 -1
  31. package/dist/event-queues.d.ts +6 -21
  32. package/dist/event-queues.js +6 -21
  33. package/dist/events.d.ts +0 -6
  34. package/dist/events.js +1 -9
  35. package/dist/index.js +0 -1
  36. package/dist/mcp-handler.js +1 -2
  37. package/dist/mcp-tools.d.ts +0 -3
  38. package/dist/mcp-tools.js +12 -16
  39. package/dist/nats-client.d.ts +0 -3
  40. package/dist/nats-client.js +1 -4
  41. package/dist/pending-requests.d.ts +4 -18
  42. package/dist/pending-requests.js +4 -18
  43. package/dist/platform/index.d.ts +1 -4
  44. package/dist/platform/index.js +8 -7
  45. package/dist/platform/linux.d.ts +3 -9
  46. package/dist/platform/linux.js +9 -20
  47. package/dist/platform/macos.d.ts +32 -0
  48. package/dist/platform/macos.js +287 -0
  49. package/dist/platform/platform.d.ts +1 -4
  50. package/dist/platform/windows.d.ts +2 -5
  51. package/dist/platform/windows.js +19 -39
  52. package/dist/pwa/assets/index-499vYQvR.js +120 -0
  53. package/dist/pwa/assets/{index-CQxcuDhM.css → index-UaZFu6XL.css} +1 -1
  54. package/dist/pwa/assets/{web-DOyOiwsW.js → web-Bp48ONY3.js} +1 -1
  55. package/dist/pwa/assets/{web-D7Kq3Nvk.js → web-CyJutAy4.js} +1 -1
  56. package/dist/pwa/index.html +2 -2
  57. package/dist/pwa/service-worker.js +1 -1
  58. package/dist/rpc-handler.d.ts +0 -6
  59. package/dist/rpc-handler.js +14 -47
  60. package/dist/spawn-command.d.ts +10 -25
  61. package/dist/spawn-command.js +7 -15
  62. package/dist/task.d.ts +6 -64
  63. package/dist/task.js +7 -70
  64. package/dist/transports/http-transport.d.ts +0 -4
  65. package/dist/transports/http-transport.js +7 -28
  66. package/dist/transports/nats-transport.d.ts +0 -4
  67. package/dist/transports/nats-transport.js +3 -9
  68. package/dist/types.d.ts +3 -7
  69. package/dist/update-checker.d.ts +1 -4
  70. package/dist/update-checker.js +2 -5
  71. package/package.json +1 -1
  72. package/palmier-server/pwa/src/App.css +325 -22
  73. package/palmier-server/pwa/src/App.tsx +2 -0
  74. package/palmier-server/pwa/src/components/CapabilityToggles.tsx +288 -0
  75. package/palmier-server/pwa/src/components/HostMenu.tsx +20 -207
  76. package/palmier-server/pwa/src/components/RunDetailView.tsx +3 -3
  77. package/palmier-server/pwa/src/components/SessionComposer.tsx +11 -2
  78. package/palmier-server/pwa/src/components/SessionsView.tsx +60 -32
  79. package/palmier-server/pwa/src/components/SwipeToDeleteRow.tsx +160 -0
  80. package/palmier-server/pwa/src/components/TaskCard.tsx +1 -1
  81. package/palmier-server/pwa/src/components/TaskForm.tsx +207 -5
  82. package/palmier-server/pwa/src/components/TasksView.tsx +3 -1
  83. package/palmier-server/pwa/src/constants.ts +1 -1
  84. package/palmier-server/pwa/src/native/Device.ts +18 -2
  85. package/palmier-server/pwa/src/pages/Dashboard.tsx +13 -6
  86. package/palmier-server/pwa/src/pages/PairHost.tsx +3 -1
  87. package/palmier-server/pwa/src/pages/PairSetup.tsx +70 -0
  88. package/palmier-server/server/src/index.ts +7 -7
  89. package/palmier-server/server/src/routes/device.ts +4 -4
  90. package/palmier-server/spec.md +38 -7
  91. package/src/agents/agent.ts +0 -4
  92. package/src/agents/claude.ts +1 -1
  93. package/src/agents/codex.ts +2 -2
  94. package/src/agents/cursor.ts +1 -1
  95. package/src/agents/deepagents.ts +1 -1
  96. package/src/agents/gemini.ts +3 -2
  97. package/src/agents/goose.ts +1 -1
  98. package/src/agents/hermes.ts +1 -1
  99. package/src/agents/kiro.ts +1 -1
  100. package/src/agents/opencode.ts +1 -1
  101. package/src/agents/qoder.ts +1 -1
  102. package/src/agents/shared-prompt.ts +0 -3
  103. package/src/commands/info.ts +0 -5
  104. package/src/commands/init.ts +2 -11
  105. package/src/commands/pair.ts +3 -12
  106. package/src/commands/restart.ts +0 -3
  107. package/src/commands/run.ts +18 -65
  108. package/src/commands/serve.ts +28 -27
  109. package/src/config.ts +0 -8
  110. package/src/device-capabilities.ts +3 -2
  111. package/src/event-queues.ts +6 -21
  112. package/src/events.ts +1 -9
  113. package/src/index.ts +0 -1
  114. package/src/mcp-handler.ts +1 -2
  115. package/src/mcp-tools.ts +12 -18
  116. package/src/nats-client.ts +1 -4
  117. package/src/pending-requests.ts +4 -18
  118. package/src/platform/index.ts +5 -7
  119. package/src/platform/linux.ts +9 -20
  120. package/src/platform/macos.ts +310 -0
  121. package/src/platform/platform.ts +1 -4
  122. package/src/platform/windows.ts +19 -40
  123. package/src/rpc-handler.ts +14 -47
  124. package/src/spawn-command.ts +11 -27
  125. package/src/task.ts +7 -70
  126. package/src/transports/http-transport.ts +7 -39
  127. package/src/transports/nats-transport.ts +3 -9
  128. package/src/types.ts +3 -10
  129. package/src/update-checker.ts +2 -5
  130. package/test/macos-plist.test.ts +112 -0
  131. package/test/task-parsing.test.ts +2 -3
  132. package/test/windows-xml.test.ts +11 -12
  133. package/dist/pwa/assets/index-DQfOEB03.js +0 -120
@@ -1,55 +1,54 @@
1
1
  import { describe, it } from "node:test";
2
2
  import assert from "node:assert/strict";
3
- import { triggerToXml, buildTaskXml } from "../src/platform/windows.js";
3
+ import { scheduleValueToXml, buildTaskXml } from "../src/platform/windows.js";
4
4
 
5
- describe("triggerToXml", () => {
6
- it("converts a once trigger to TimeTrigger", () => {
7
- const xml = triggerToXml({ type: "once", value: "2026-03-28T09:00" });
5
+ describe("scheduleValueToXml", () => {
6
+ it("converts a specific_times value to TimeTrigger", () => {
7
+ const xml = scheduleValueToXml("specific_times", "2026-03-28T09:00");
8
8
  assert.equal(xml, "<TimeTrigger><StartBoundary>2026-03-28T09:00:00</StartBoundary></TimeTrigger>");
9
9
  });
10
10
 
11
11
  it("converts hourly cron to TimeTrigger with PT1H repetition", () => {
12
- const xml = triggerToXml({ type: "cron", value: "0 * * * *" });
12
+ const xml = scheduleValueToXml("crons", "0 * * * *");
13
13
  assert.ok(xml.includes("<Interval>PT1H</Interval>"), "should have hourly interval");
14
14
  assert.ok(xml.includes("<TimeTrigger>"), "should be a TimeTrigger");
15
15
  });
16
16
 
17
17
  it("converts daily cron to CalendarTrigger with DaysInterval", () => {
18
- const xml = triggerToXml({ type: "cron", value: "30 9 * * *" });
18
+ const xml = scheduleValueToXml("crons", "30 9 * * *");
19
19
  assert.ok(xml.includes("<ScheduleByDay>"), "should use ScheduleByDay");
20
20
  assert.ok(xml.includes("<DaysInterval>1</DaysInterval>"), "should have interval 1");
21
21
  assert.ok(xml.includes("T09:30:00"), "should encode time as 09:30");
22
22
  });
23
23
 
24
24
  it("converts weekly cron to CalendarTrigger with DaysOfWeek", () => {
25
- const xml = triggerToXml({ type: "cron", value: "0 10 * * 1" });
25
+ const xml = scheduleValueToXml("crons", "0 10 * * 1");
26
26
  assert.ok(xml.includes("<ScheduleByWeek>"), "should use ScheduleByWeek");
27
27
  assert.ok(xml.includes("<Monday />"), "day 1 should be Monday");
28
28
  assert.ok(xml.includes("T10:00:00"), "should encode time as 10:00");
29
29
  });
30
30
 
31
31
  it("converts weekly cron for Sunday (day 0)", () => {
32
- const xml = triggerToXml({ type: "cron", value: "0 8 * * 0" });
32
+ const xml = scheduleValueToXml("crons", "0 8 * * 0");
33
33
  assert.ok(xml.includes("<Sunday />"), "day 0 should be Sunday");
34
34
  });
35
35
 
36
36
  it("converts weekly cron for Sunday (day 7)", () => {
37
- const xml = triggerToXml({ type: "cron", value: "0 8 * * 7" });
37
+ const xml = scheduleValueToXml("crons", "0 8 * * 7");
38
38
  assert.ok(xml.includes("<Sunday />"), "day 7 should also be Sunday");
39
39
  });
40
40
 
41
41
  it("converts monthly cron to CalendarTrigger with DaysOfMonth", () => {
42
- const xml = triggerToXml({ type: "cron", value: "0 14 15 * *" });
42
+ const xml = scheduleValueToXml("crons", "0 14 15 * *");
43
43
  assert.ok(xml.includes("<ScheduleByMonth>"), "should use ScheduleByMonth");
44
44
  assert.ok(xml.includes("<Day>15</Day>"), "should have day 15");
45
45
  assert.ok(xml.includes("T14:00:00"), "should encode time as 14:00");
46
- // All months should be listed
47
46
  assert.ok(xml.includes("<January />"), "should include January");
48
47
  assert.ok(xml.includes("<December />"), "should include December");
49
48
  });
50
49
 
51
50
  it("throws on invalid cron expression", () => {
52
- assert.throws(() => triggerToXml({ type: "cron", value: "bad" }), /Invalid cron/);
51
+ assert.throws(() => scheduleValueToXml("crons", "bad"), /Invalid cron/);
53
52
  });
54
53
  });
55
54