freddie 0.0.113 → 0.0.114
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.
|
|
3
|
+
"version": "0.0.114",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Open JS agent harness built on pi-mono, floosie, xstate, and anentrypoint-design",
|
|
6
6
|
"bin": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@mariozechner/pi-ai": "^0.70.6",
|
|
27
27
|
"@mariozechner/pi-coding-agent": "^0.70.6",
|
|
28
28
|
"@mariozechner/pi-tui": "^0.70.6",
|
|
29
|
-
"acptoapi": "^1.0.
|
|
30
|
-
"anentrypoint-design": "^0.0.
|
|
29
|
+
"acptoapi": "^1.0.112",
|
|
30
|
+
"anentrypoint-design": "^0.0.135",
|
|
31
31
|
"commander": "^14.0.0",
|
|
32
32
|
"express": "^5.0.0",
|
|
33
33
|
"flatspace": "^1.0.18",
|
|
@@ -32,14 +32,12 @@ export async function callLLM({ messages, tools = [], model } = {}) {
|
|
|
32
32
|
const headers = { 'content-type': 'application/json', authorization: 'Bearer none' }
|
|
33
33
|
const cwd = process.cwd()
|
|
34
34
|
if (Array.isArray(tools) && tools.length) headers['x-cwd'] = cwd
|
|
35
|
-
//
|
|
36
|
-
// (gh-pages →
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const _pageLb = (() => { try { const h = ((typeof location !== 'undefined' && location.hostname) || '').toLowerCase(); return h === 'localhost' || h === '127.0.0.1' || h === '' || h === '::1' } catch { return true } })()
|
|
40
|
-
if (_isLb && !_pageLb) throw new Error(`acptoapi unreachable: page on ${typeof location !== 'undefined' ? location.hostname : '?'} cannot reach loopback ${base}`)
|
|
35
|
+
// Rely on AbortController timeout. acptoapi v1+ ships CORS + Private
|
|
36
|
+
// Network Access headers so cross-origin loopback (gh-pages → localhost)
|
|
37
|
+
// succeeds when acptoapi is running. The earlier preemptive loopback
|
|
38
|
+
// refusal caused false negatives on reachable endpoints.
|
|
41
39
|
const _ac = new AbortController()
|
|
42
|
-
const _tid = setTimeout(() => _ac.abort(new Error('acptoapi fetch timeout')),
|
|
40
|
+
const _tid = setTimeout(() => _ac.abort(new Error('acptoapi fetch timeout')), 60000)
|
|
43
41
|
let res
|
|
44
42
|
try {
|
|
45
43
|
res = await fetch(base.replace(/\/$/, '') + '/chat/completions', {
|