opencastle 0.21.1 → 0.22.0

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.
Files changed (53) hide show
  1. package/dist/cli/convoy/engine.d.ts +3 -0
  2. package/dist/cli/convoy/engine.d.ts.map +1 -1
  3. package/dist/cli/convoy/engine.js +22 -1
  4. package/dist/cli/convoy/engine.js.map +1 -1
  5. package/dist/cli/convoy/engine.test.js +148 -0
  6. package/dist/cli/convoy/engine.test.js.map +1 -1
  7. package/dist/cli/convoy/export.d.ts.map +1 -1
  8. package/dist/cli/convoy/export.js +5 -0
  9. package/dist/cli/convoy/export.js.map +1 -1
  10. package/dist/cli/convoy/export.test.js +31 -0
  11. package/dist/cli/convoy/export.test.js.map +1 -1
  12. package/dist/cli/convoy/store.d.ts +5 -3
  13. package/dist/cli/convoy/store.d.ts.map +1 -1
  14. package/dist/cli/convoy/store.js +37 -11
  15. package/dist/cli/convoy/store.js.map +1 -1
  16. package/dist/cli/convoy/store.test.js +204 -4
  17. package/dist/cli/convoy/store.test.js.map +1 -1
  18. package/dist/cli/convoy/types.d.ts +6 -0
  19. package/dist/cli/convoy/types.d.ts.map +1 -1
  20. package/dist/cli/run/adapters/claude-code.d.ts.map +1 -1
  21. package/dist/cli/run/adapters/claude-code.js +13 -0
  22. package/dist/cli/run/adapters/claude-code.js.map +1 -1
  23. package/dist/cli/run/adapters/copilot.d.ts.map +1 -1
  24. package/dist/cli/run/adapters/copilot.js +8 -0
  25. package/dist/cli/run/adapters/copilot.js.map +1 -1
  26. package/dist/cli/run/adapters/cursor.d.ts.map +1 -1
  27. package/dist/cli/run/adapters/cursor.js +13 -0
  28. package/dist/cli/run/adapters/cursor.js.map +1 -1
  29. package/dist/cli/run/adapters/opencode.d.ts.map +1 -1
  30. package/dist/cli/run/adapters/opencode.js +13 -0
  31. package/dist/cli/run/adapters/opencode.js.map +1 -1
  32. package/dist/cli/run.d.ts.map +1 -1
  33. package/dist/cli/run.js +26 -0
  34. package/dist/cli/run.js.map +1 -1
  35. package/dist/cli/types.d.ts +8 -0
  36. package/dist/cli/types.d.ts.map +1 -1
  37. package/package.json +1 -1
  38. package/src/cli/convoy/engine.test.ts +177 -0
  39. package/src/cli/convoy/engine.ts +22 -1
  40. package/src/cli/convoy/export.test.ts +37 -0
  41. package/src/cli/convoy/export.ts +5 -0
  42. package/src/cli/convoy/store.test.ts +220 -4
  43. package/src/cli/convoy/store.ts +46 -20
  44. package/src/cli/convoy/types.ts +6 -0
  45. package/src/cli/run/adapters/claude-code.ts +13 -1
  46. package/src/cli/run/adapters/copilot.ts +8 -0
  47. package/src/cli/run/adapters/cursor.ts +13 -1
  48. package/src/cli/run/adapters/opencode.ts +13 -1
  49. package/src/cli/run.ts +23 -0
  50. package/src/cli/types.ts +9 -0
  51. package/src/dashboard/dist/index.html +11 -1
  52. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  53. package/src/dashboard/src/pages/index.astro +11 -1
@@ -1,25 +1,25 @@
1
1
  {
2
- "hash": "dad1bf5b",
2
+ "hash": "31a1a7a6",
3
3
  "configHash": "30f8ea04",
4
- "lockfileHash": "7da23643",
5
- "browserHash": "7b8dbd89",
4
+ "lockfileHash": "97475009",
5
+ "browserHash": "cb97a3a0",
6
6
  "optimized": {
7
7
  "astro > cssesc": {
8
8
  "src": "../../../../../node_modules/cssesc/cssesc.js",
9
9
  "file": "astro___cssesc.js",
10
- "fileHash": "fdcbc688",
10
+ "fileHash": "d4c8827f",
11
11
  "needsInterop": true
12
12
  },
13
13
  "astro > aria-query": {
14
14
  "src": "../../../../../node_modules/aria-query/lib/index.js",
15
15
  "file": "astro___aria-query.js",
16
- "fileHash": "6a420ed9",
16
+ "fileHash": "41875443",
17
17
  "needsInterop": true
18
18
  },
19
19
  "astro > axobject-query": {
20
20
  "src": "../../../../../node_modules/axobject-query/lib/index.js",
21
21
  "file": "astro___axobject-query.js",
22
- "fileHash": "6aa69f6b",
22
+ "fileHash": "d6770fdb",
23
23
  "needsInterop": true
24
24
  }
25
25
  },
@@ -309,6 +309,12 @@ const base = import.meta.env.BASE_URL;
309
309
  return div.innerHTML;
310
310
  }
311
311
 
312
+ function formatTokens(n) {
313
+ if (n >= 1000000) return (n / 1000000).toFixed(1) + 'M';
314
+ if (n >= 1000) return (n / 1000).toFixed(1) + 'K';
315
+ return String(n);
316
+ }
317
+
312
318
  // ── SVG Icon Library (empty states) ────────────────────
313
319
 
314
320
  const EMPTY_ICONS = {
@@ -1376,6 +1382,9 @@ const base = import.meta.env.BASE_URL;
1376
1382
  html += '<div class="convoy-stat"><span class="convoy-stat__label">Tasks</span><span class="convoy-stat__value">' + done + '/' + total + '</span></div>';
1377
1383
  html += '<div class="convoy-stat"><span class="convoy-stat__label">Events</span><span class="convoy-stat__value">' + (convoy.events_count || 0) + '</span></div>';
1378
1384
  html += '<div class="convoy-stat"><span class="convoy-stat__label">Started</span><span class="convoy-stat__value">' + (convoy.started_at ? formatTime(convoy.started_at) : '\u2014') + '</span></div>';
1385
+ if (convoy.total_tokens != null) {
1386
+ html += '<div class="convoy-stat"><span class="convoy-stat__label">Tokens</span><span class="convoy-stat__value">' + formatTokens(convoy.total_tokens) + '</span></div>';
1387
+ }
1379
1388
  html += '</div>';
1380
1389
 
1381
1390
  html += '<div class="convoy-progress">';
@@ -1385,7 +1394,7 @@ const base = import.meta.env.BASE_URL;
1385
1394
 
1386
1395
  if (convoy.tasks && convoy.tasks.length > 0) {
1387
1396
  html += '<table class="sessions-table convoy-tasks">';
1388
- html += '<thead><tr><th>Task</th><th>Phase</th><th>Agent</th><th>Adapter</th><th>Status</th><th>Retries</th></tr></thead>';
1397
+ html += '<thead><tr><th>Task</th><th>Phase</th><th>Agent</th><th>Adapter</th><th>Status</th><th>Retries</th><th>Tokens</th></tr></thead>';
1389
1398
  html += '<tbody>';
1390
1399
  convoy.tasks.forEach(function(t) {
1391
1400
  const tStatus = t.status === 'done' ? 'success'
@@ -1398,6 +1407,7 @@ const base = import.meta.env.BASE_URL;
1398
1407
  html += '<td>' + escapeHtml(t.adapter || '\u2014') + '</td>';
1399
1408
  html += '<td><span class="outcome-badge outcome-badge--' + tStatus + '">' + escapeHtml(t.status) + '</span></td>';
1400
1409
  html += '<td class="td-num">' + (t.retries || 0) + '</td>';
1410
+ html += '<td class="td-num">' + (t.total_tokens != null ? formatTokens(t.total_tokens) : '\u2014') + '</td>';
1401
1411
  html += '</tr>';
1402
1412
  });
1403
1413
  html += '</tbody></table>';