@clawos-dev/clawd 0.2.175-beta.353.590ff71 → 0.2.175

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
@@ -55660,22 +55660,11 @@ function buildAppBuilderHandlers(deps) {
55660
55660
  }
55661
55661
 
55662
55662
  // src/handlers/shift.ts
55663
- var UI_DEFAULT_DURATION_MS = 30 * 6e4;
55664
- var UI_MAX_DURATION_MS = 60 * 6e4;
55665
- function pickUiDurationMs(timeoutMs) {
55666
- return Math.min(timeoutMs ?? UI_DEFAULT_DURATION_MS, UI_MAX_DURATION_MS);
55667
- }
55668
- function everyMsToCron(everyMs) {
55669
- if (everyMs <= 6e4) return "* * * * *";
55670
- const minutes = Math.floor(everyMs / 6e4);
55671
- if (minutes < 60) return `*/${minutes} * * * *`;
55672
- const hours = Math.floor(minutes / 60);
55673
- if (hours < 24) return `0 */${hours} * * *`;
55674
- const days = Math.max(1, Math.floor(hours / 24));
55675
- return `0 0 */${days} * *`;
55676
- }
55677
55663
  function daemonShiftToUiShift(d, nowMs) {
55678
- const durationMs = pickUiDurationMs(d.timeoutMs);
55664
+ if (d.schedule.kind === "at") {
55665
+ const atMs = Date.parse(d.schedule.at);
55666
+ if (Number.isNaN(atMs) || atMs <= nowMs) return null;
55667
+ }
55679
55668
  const noteParts = [d.name];
55680
55669
  if (d.prompt && d.prompt.length > 0) {
55681
55670
  const promptPreview = d.prompt.length > 120 ? `${d.prompt.slice(0, 117)}\u2026` : d.prompt;
@@ -55683,49 +55672,12 @@ function daemonShiftToUiShift(d, nowMs) {
55683
55672
  }
55684
55673
  if (!d.enabled) noteParts.push("(disabled)");
55685
55674
  const note = noteParts.join(" \u2014 ");
55686
- switch (d.schedule.kind) {
55687
- case "at": {
55688
- const startMs = Date.parse(d.schedule.at);
55689
- if (Number.isNaN(startMs)) return null;
55690
- if (startMs + durationMs <= nowMs) return null;
55691
- return {
55692
- id: d.id,
55693
- agentId: d.targetPersona,
55694
- schedule: {
55695
- kind: "single",
55696
- start: new Date(startMs).toISOString(),
55697
- end: new Date(startMs + durationMs).toISOString()
55698
- },
55699
- note
55700
- };
55701
- }
55702
- case "cron": {
55703
- return {
55704
- id: d.id,
55705
- agentId: d.targetPersona,
55706
- schedule: {
55707
- kind: "recurring",
55708
- cron: d.schedule.expr,
55709
- ...d.schedule.tz ? { tz: d.schedule.tz } : {},
55710
- durationMs
55711
- },
55712
- note
55713
- };
55714
- }
55715
- case "every": {
55716
- const cron = everyMsToCron(d.schedule.everyMs);
55717
- return {
55718
- id: d.id,
55719
- agentId: d.targetPersona,
55720
- schedule: {
55721
- kind: "recurring",
55722
- cron,
55723
- durationMs
55724
- },
55725
- note
55726
- };
55727
- }
55728
- }
55675
+ return {
55676
+ id: d.id,
55677
+ agentId: d.targetPersona,
55678
+ schedule: d.schedule,
55679
+ note
55680
+ };
55729
55681
  }
55730
55682
  function buildShiftHandlers(deps) {
55731
55683
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.175-beta.353.590ff71",
3
+ "version": "0.2.175",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",