@clawos-dev/clawd 0.2.173 → 0.2.174

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 (2) hide show
  1. package/dist/cli.cjs +10 -58
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -55606,22 +55606,11 @@ function buildAppBuilderHandlers(deps) {
55606
55606
  }
55607
55607
 
55608
55608
  // src/handlers/shift.ts
55609
- var UI_DEFAULT_DURATION_MS = 30 * 6e4;
55610
- var UI_MAX_DURATION_MS = 60 * 6e4;
55611
- function pickUiDurationMs(timeoutMs) {
55612
- return Math.min(timeoutMs ?? UI_DEFAULT_DURATION_MS, UI_MAX_DURATION_MS);
55613
- }
55614
- function everyMsToCron(everyMs) {
55615
- if (everyMs <= 6e4) return "* * * * *";
55616
- const minutes = Math.floor(everyMs / 6e4);
55617
- if (minutes < 60) return `*/${minutes} * * * *`;
55618
- const hours = Math.floor(minutes / 60);
55619
- if (hours < 24) return `0 */${hours} * * *`;
55620
- const days = Math.max(1, Math.floor(hours / 24));
55621
- return `0 0 */${days} * *`;
55622
- }
55623
55609
  function daemonShiftToUiShift(d, nowMs) {
55624
- const durationMs = pickUiDurationMs(d.timeoutMs);
55610
+ if (d.schedule.kind === "at") {
55611
+ const atMs = Date.parse(d.schedule.at);
55612
+ if (Number.isNaN(atMs) || atMs <= nowMs) return null;
55613
+ }
55625
55614
  const noteParts = [d.name];
55626
55615
  if (d.prompt && d.prompt.length > 0) {
55627
55616
  const promptPreview = d.prompt.length > 120 ? `${d.prompt.slice(0, 117)}\u2026` : d.prompt;
@@ -55629,49 +55618,12 @@ function daemonShiftToUiShift(d, nowMs) {
55629
55618
  }
55630
55619
  if (!d.enabled) noteParts.push("(disabled)");
55631
55620
  const note = noteParts.join(" \u2014 ");
55632
- switch (d.schedule.kind) {
55633
- case "at": {
55634
- const startMs = Date.parse(d.schedule.at);
55635
- if (Number.isNaN(startMs)) return null;
55636
- if (startMs + durationMs <= nowMs) return null;
55637
- return {
55638
- id: d.id,
55639
- agentId: d.targetPersona,
55640
- schedule: {
55641
- kind: "single",
55642
- start: new Date(startMs).toISOString(),
55643
- end: new Date(startMs + durationMs).toISOString()
55644
- },
55645
- note
55646
- };
55647
- }
55648
- case "cron": {
55649
- return {
55650
- id: d.id,
55651
- agentId: d.targetPersona,
55652
- schedule: {
55653
- kind: "recurring",
55654
- cron: d.schedule.expr,
55655
- ...d.schedule.tz ? { tz: d.schedule.tz } : {},
55656
- durationMs
55657
- },
55658
- note
55659
- };
55660
- }
55661
- case "every": {
55662
- const cron = everyMsToCron(d.schedule.everyMs);
55663
- return {
55664
- id: d.id,
55665
- agentId: d.targetPersona,
55666
- schedule: {
55667
- kind: "recurring",
55668
- cron,
55669
- durationMs
55670
- },
55671
- note
55672
- };
55673
- }
55674
- }
55621
+ return {
55622
+ id: d.id,
55623
+ agentId: d.targetPersona,
55624
+ schedule: d.schedule,
55625
+ note
55626
+ };
55675
55627
  }
55676
55628
  function buildShiftHandlers(deps) {
55677
55629
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.173",
3
+ "version": "0.2.174",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",