@goodandready/dsh-cron 0.3.29 → 0.3.30

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.
@@ -323,7 +323,7 @@
323
323
  });
324
324
  const data = await res.json();
325
325
  if (gen !== fetchGenRef.current) return;
326
- if (data && data.ok) {
326
+ if (data && data.ok !== false) {
327
327
  setTasks(data.tasks || []);
328
328
  setRecs(data.recommendations || []);
329
329
  setStats(data.stats || null);
package/lib/client.js CHANGED
@@ -1830,7 +1830,7 @@ signal: controller ? controller.signal : undefined,
1830
1830
  });
1831
1831
  const data = await res.json();
1832
1832
  if (gen !== fetchGenRef.current) return;
1833
- if (data && data.ok) {
1833
+ if (data && data.ok !== false) {
1834
1834
  setTasks(data.tasks || []);
1835
1835
  setRecs(data.recommendations || []);
1836
1836
  setStats(data.stats || null);
@@ -23,7 +23,7 @@ export async function getModelsHandler(ctx, req, res, sendJson) {
23
23
  const url = new URL(req.url, 'http://127.0.0.1');
24
24
  const wanted = url.searchParams.get('provider') || '';
25
25
  if (wanted === '') {
26
- sendJson(res, 200, { current, providers, models: [] });
26
+ sendJson(res, 200, { ok: true, current, providers, models: [] });
27
27
  return;
28
28
  }
29
29
 
@@ -34,11 +34,12 @@ export async function getModelsHandler(ctx, req, res, sendJson) {
34
34
  rows = await llm.listModels(wanted);
35
35
  }
36
36
  sendJson(res, 200, {
37
+ ok: true,
37
38
  current,
38
39
  providers,
39
40
  models: (rows ?? []).map((m) => ({ id: m.id, name: m.name ?? m.id })),
40
41
  });
41
42
  } catch {
42
- sendJson(res, 200, { current, providers, models: [] });
43
+ sendJson(res, 200, { ok: true, current, providers, models: [] });
43
44
  }
44
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-cron",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Background automation runner for DSH: isolated agent runs, script/HTTP/SSH/Docker runtimes, cost guard, notifications, heartbeats.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",