@bojackduy/opencode-loopd 1.5.1 → 1.5.3
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/server.js +4 -2
- package/dist/tui.js +8 -6
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -425,6 +425,9 @@ function describeError(value) {
|
|
|
425
425
|
return value.message;
|
|
426
426
|
if (typeof value === "string")
|
|
427
427
|
return value;
|
|
428
|
+
if (typeof value === "object" && value !== null && "message" in value) {
|
|
429
|
+
return String(value.message);
|
|
430
|
+
}
|
|
428
431
|
try {
|
|
429
432
|
return JSON.stringify(value, errorReplacer);
|
|
430
433
|
} catch {
|
|
@@ -776,7 +779,6 @@ function createGoal(input) {
|
|
|
776
779
|
const now = new Date().toISOString();
|
|
777
780
|
return { ...input, tokensUsed: 0, timeUsedSeconds: 0, createdAt: now, updatedAt: now };
|
|
778
781
|
}
|
|
779
|
-
|
|
780
782
|
// src/application/loop-engine.ts
|
|
781
783
|
var HANDLED_EVENT_TYPES = new Set([
|
|
782
784
|
"session.idle",
|
|
@@ -989,7 +991,7 @@ function createLoopEngine(options) {
|
|
|
989
991
|
if (!runtime)
|
|
990
992
|
return false;
|
|
991
993
|
const error = event.properties?.error;
|
|
992
|
-
const message = error
|
|
994
|
+
const message = describeError(error) || "unknown error";
|
|
993
995
|
runtime.consecutiveFailures += 1;
|
|
994
996
|
runtime.lastError = message;
|
|
995
997
|
runtime.updatedAt = new Date().toISOString();
|
package/dist/tui.js
CHANGED
|
@@ -1326,6 +1326,8 @@ function LoopDashboard(props) {
|
|
|
1326
1326
|
},
|
|
1327
1327
|
children: (goal) => {
|
|
1328
1328
|
const rt = () => state()?.runtimes.find((r) => r.goalID === goal().id);
|
|
1329
|
+
const lp = () => goal().lastProgress;
|
|
1330
|
+
const blk = () => goal().blocker;
|
|
1329
1331
|
return (() => {
|
|
1330
1332
|
var _el$108 = _$createElement("box"), _el$109 = _$createElement("text"), _el$110 = _$createElement("span"), _el$111 = _$createTextNode(` `), _el$112 = _$createElement("span"), _el$113 = _$createTextNode(` `), _el$114 = _$createTextNode(`
|
|
1331
1333
|
`), _el$115 = _$createElement("span");
|
|
@@ -1375,7 +1377,7 @@ function LoopDashboard(props) {
|
|
|
1375
1377
|
})(), _el$114);
|
|
1376
1378
|
_$insert(_el$115, () => goal().objective.slice(0, 160));
|
|
1377
1379
|
_$insert(_el$109, (() => {
|
|
1378
|
-
var _c$8 = _$memo(() => !!
|
|
1380
|
+
var _c$8 = _$memo(() => !!lp());
|
|
1379
1381
|
return () => _c$8() && [(() => {
|
|
1380
1382
|
var _el$122 = _$createElement("span"), _el$123 = _$createTextNode(`
|
|
1381
1383
|
\u2714 `);
|
|
@@ -1386,7 +1388,7 @@ function LoopDashboard(props) {
|
|
|
1386
1388
|
return _el$122;
|
|
1387
1389
|
})(), (() => {
|
|
1388
1390
|
var _el$125 = _$createElement("span");
|
|
1389
|
-
_$insert(_el$125, () =>
|
|
1391
|
+
_$insert(_el$125, () => lp().summary.slice(0, 100));
|
|
1390
1392
|
_$effect((_$p) => _$setProp(_el$125, "style", {
|
|
1391
1393
|
fg: theme().text
|
|
1392
1394
|
}, _$p));
|
|
@@ -1394,7 +1396,7 @@ function LoopDashboard(props) {
|
|
|
1394
1396
|
})(), (() => {
|
|
1395
1397
|
var _el$126 = _$createElement("span"), _el$127 = _$createTextNode(` \u2192 `);
|
|
1396
1398
|
_$insertNode(_el$126, _el$127);
|
|
1397
|
-
_$insert(_el$126, () =>
|
|
1399
|
+
_$insert(_el$126, () => lp().next?.slice(0, 60) || "", null);
|
|
1398
1400
|
_$effect((_$p) => _$setProp(_el$126, "style", {
|
|
1399
1401
|
fg: theme().textMuted
|
|
1400
1402
|
}, _$p));
|
|
@@ -1402,7 +1404,7 @@ function LoopDashboard(props) {
|
|
|
1402
1404
|
})()];
|
|
1403
1405
|
})(), null);
|
|
1404
1406
|
_$insert(_el$109, (() => {
|
|
1405
|
-
var _c$9 = _$memo(() => !!
|
|
1407
|
+
var _c$9 = _$memo(() => !!blk());
|
|
1406
1408
|
return () => _c$9() && [(() => {
|
|
1407
1409
|
var _el$128 = _$createElement("span"), _el$129 = _$createTextNode(`
|
|
1408
1410
|
\u2716 blocked: `);
|
|
@@ -1414,7 +1416,7 @@ function LoopDashboard(props) {
|
|
|
1414
1416
|
return _el$128;
|
|
1415
1417
|
})(), (() => {
|
|
1416
1418
|
var _el$131 = _$createElement("span");
|
|
1417
|
-
_$insert(_el$131, () =>
|
|
1419
|
+
_$insert(_el$131, () => blk().reason.slice(0, 140));
|
|
1418
1420
|
_$effect((_$p) => _$setProp(_el$131, "style", {
|
|
1419
1421
|
fg: theme().error
|
|
1420
1422
|
}, _$p));
|
|
@@ -1422,7 +1424,7 @@ function LoopDashboard(props) {
|
|
|
1422
1424
|
})(), (() => {
|
|
1423
1425
|
var _el$132 = _$createElement("span"), _el$133 = _$createTextNode(` \u2014 `);
|
|
1424
1426
|
_$insertNode(_el$132, _el$133);
|
|
1425
|
-
_$insert(_el$132, () =>
|
|
1427
|
+
_$insert(_el$132, () => blk().needed.slice(0, 60), null);
|
|
1426
1428
|
_$effect((_$p) => _$setProp(_el$132, "style", {
|
|
1427
1429
|
fg: theme().textMuted
|
|
1428
1430
|
}, _$p));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@bojackduy/opencode-loopd",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.3",
|
|
5
5
|
"description": "Codex-inspired background goal engine for OpenCode — autonomous subagents, engine-driven loop, child worker sessions and modal TUI dashboard. Like Claude Code loop for OpenCode.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "AGPL-3.0-only",
|