freddie 0.0.42 → 0.0.44

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freddie",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "type": "module",
5
5
  "description": "Open JS agent harness built on pi-mono, floosie, xstate, and anentrypoint-design",
6
6
  "bin": {
@@ -75,6 +75,8 @@ function tryParseJson(s) { try { return typeof s === 'string' ? JSON.parse(s) :
75
75
  export async function isReachable() {
76
76
  try {
77
77
  const res = await fetch(getAcptoapiUrl().replace(/\/$/, '') + '/models', { headers: { authorization: 'Bearer none' } })
78
- return res.ok
78
+ if (!res.ok) return false
79
+ const json = await res.json()
80
+ return Array.isArray(json.data) && json.data.length > 0
79
81
  } catch { return false }
80
82
  }