open-agents-ai 0.187.549 → 0.187.550
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/dist/index.js +23 -8
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7809,15 +7809,12 @@ async function handleCmd(cmd) {
|
|
|
7809
7809
|
writeResp(id, { ok: true, output: JSON.stringify({ streaming: true, stream_file: icStreamFile }) });
|
|
7810
7810
|
try {
|
|
7811
7811
|
for await (var icEvt of icStreamGen) {
|
|
7812
|
-
appendFileSync(icStreamFile, JSON.stringify({ type: 'event', event: icEvt.event || '', seq: icEvt.seq || 0, data: icEvt.data }) + '
|
|
7813
|
-
');
|
|
7812
|
+
appendFileSync(icStreamFile, JSON.stringify({ type: 'event', event: icEvt.event || '', seq: icEvt.seq || 0, data: icEvt.data }) + '\\n');
|
|
7814
7813
|
}
|
|
7815
|
-
appendFileSync(icStreamFile, JSON.stringify({ type: 'done' }) + '
|
|
7816
|
-
');
|
|
7814
|
+
appendFileSync(icStreamFile, JSON.stringify({ type: 'done' }) + '\\n');
|
|
7817
7815
|
dlog('invoke_capability: stream complete');
|
|
7818
7816
|
} catch (icStreamErr) {
|
|
7819
|
-
appendFileSync(icStreamFile, JSON.stringify({ type: 'error', error: String(icStreamErr.message || icStreamErr) }) + '
|
|
7820
|
-
');
|
|
7817
|
+
appendFileSync(icStreamFile, JSON.stringify({ type: 'error', error: String(icStreamErr.message || icStreamErr) }) + '\\n');
|
|
7821
7818
|
dlog('invoke_capability: stream error: ' + (icStreamErr.message || icStreamErr));
|
|
7822
7819
|
}
|
|
7823
7820
|
break;
|
|
@@ -587712,7 +587709,7 @@ async function handleGenerateShare(ctx3) {
|
|
|
587712
587709
|
const tool = new NexusTool2(repoRoot);
|
|
587713
587710
|
await Promise.race([
|
|
587714
587711
|
tool.execute({ action: "connect" }),
|
|
587715
|
-
new Promise((_r, rej) => setTimeout(() => rej(new Error("nexus connect
|
|
587712
|
+
new Promise((_r, rej) => setTimeout(() => rej(new Error("nexus connect 8s budget")), 8e3))
|
|
587716
587713
|
]).catch(() => null);
|
|
587717
587714
|
peerInfo = resolveLocalPeerId();
|
|
587718
587715
|
} catch {
|
|
@@ -592716,13 +592713,30 @@ async function generateShareUrl() {
|
|
|
592716
592713
|
const out = document.getElementById('share-result');
|
|
592717
592714
|
if (!out) return;
|
|
592718
592715
|
out.style.display = 'block';
|
|
592719
|
-
|
|
592716
|
+
// The first call after a daemon restart can take ~5-8s while the
|
|
592717
|
+
// backend wakes nexus. Show a visible progress hint so the user
|
|
592718
|
+
// knows nothing is hung.
|
|
592719
|
+
out.innerHTML =
|
|
592720
|
+
'<div style="color:var(--color-fg-muted)" id="share-progress">' +
|
|
592721
|
+
' generating share key' +
|
|
592722
|
+
' <span id="share-dots">…</span>' +
|
|
592723
|
+
' <div style="font-size:0.68rem;margin-top:4px">waking nexus for global reach (up to 8s) — falls back to direct-HTTP if unavailable</div>' +
|
|
592724
|
+
'</div>';
|
|
592725
|
+
// Animated dots so the user sees it's alive.
|
|
592726
|
+
let _shareDotN = 1;
|
|
592727
|
+
const _shareDotsTimer = setInterval(() => {
|
|
592728
|
+
const el = document.getElementById('share-dots');
|
|
592729
|
+
if (!el) { clearInterval(_shareDotsTimer); return; }
|
|
592730
|
+
_shareDotN = (_shareDotN % 3) + 1;
|
|
592731
|
+
el.textContent = '.'.repeat(_shareDotN);
|
|
592732
|
+
}, 400);
|
|
592720
592733
|
try {
|
|
592721
592734
|
const r = await fetch('/v1/share/generate', {
|
|
592722
592735
|
method: 'POST',
|
|
592723
592736
|
headers: { ...headers(), 'Content-Type': 'application/json' },
|
|
592724
592737
|
body: JSON.stringify({ scope: 'run' }),
|
|
592725
592738
|
});
|
|
592739
|
+
clearInterval(_shareDotsTimer);
|
|
592726
592740
|
if (r.status === 403) {
|
|
592727
592741
|
out.innerHTML = '<div style="color:var(--color-error)">✗ admin scope required — your current key does not have permission to mint share URLs. Set an admin-scope key first.</div>';
|
|
592728
592742
|
return;
|
|
@@ -592774,6 +592788,7 @@ async function generateShareUrl() {
|
|
|
592774
592788
|
window.__oaLastTorUrl = j.torShareUrl || null;
|
|
592775
592789
|
saveRecentKey({ key: j.key, host: j.host + ':' + j.port, label: j.label || ('shared ' + j.host) });
|
|
592776
592790
|
} catch (e) {
|
|
592791
|
+
clearInterval(_shareDotsTimer);
|
|
592777
592792
|
out.innerHTML = '<div style="color:var(--color-error)">✗ ' + escapeHtml(e && e.message ? e.message : String(e)) + '</div>';
|
|
592778
592793
|
}
|
|
592779
592794
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-agents-ai",
|
|
3
|
-
"version": "0.187.
|
|
3
|
+
"version": "0.187.550",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "open-agents-ai",
|
|
9
|
-
"version": "0.187.
|
|
9
|
+
"version": "0.187.550",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED