@aion0/forge 0.4.12 → 0.4.13

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/RELEASE_NOTES.md CHANGED
@@ -1,14 +1,11 @@
1
- # Forge v0.4.12
1
+ # Forge v0.4.13
2
2
 
3
3
  Released: 2026-03-23
4
4
 
5
- ## Changes since v0.4.11
5
+ ## Changes since v0.4.12
6
6
 
7
- ### Features
8
- - feat: terminal bell notification + Java/Scala file support
7
+ ### Bug Fixes
8
+ - fix: bell notification only triggers on claude completion, not terminal idle
9
9
 
10
- ### Other
11
- - support more dev language
12
10
 
13
-
14
- **Full Changelog**: https://github.com/aiwatching/forge/compare/v0.4.11...v0.4.12
11
+ **Full Changelog**: https://github.com/aiwatching/forge/compare/v0.4.12...v0.4.13
@@ -1120,8 +1120,7 @@ const MemoTerminalPane = memo(function TerminalPane({
1120
1120
  if (!containerRef.current) return;
1121
1121
 
1122
1122
  let disposed = false; // guard against post-cleanup writes (React Strict Mode)
1123
- let bellIdleTimer = 0;
1124
- let bellActivityBytes = 0;
1123
+ let bellOutputBuffer = '';
1125
1124
 
1126
1125
  // Read terminal theme from CSS variables
1127
1126
  const cs = getComputedStyle(document.documentElement);
@@ -1258,14 +1257,16 @@ const MemoTerminalPane = memo(function TerminalPane({
1258
1257
  const msg = JSON.parse(event.data);
1259
1258
  if (msg.type === 'output') {
1260
1259
  try { term.write(msg.data); } catch {};
1261
- // Bell idle detection
1262
- bellActivityBytes += (msg.data as string).length;
1263
- clearTimeout(bellIdleTimer);
1264
- if (bellActivityBytes >= 200 && bellEnabledPanes.has(id)) {
1265
- bellIdleTimer = window.setTimeout(() => {
1266
- bellActivityBytes = 0;
1260
+ // Bell: detect claude completion (cost summary or prompt after activity)
1261
+ if (bellEnabledPanes.has(id)) {
1262
+ bellOutputBuffer += msg.data as string;
1263
+ // Keep only last 500 chars
1264
+ if (bellOutputBuffer.length > 500) bellOutputBuffer = bellOutputBuffer.slice(-500);
1265
+ // Claude outputs cost/token info when done, or returns to prompt ❯
1266
+ if (bellOutputBuffer.includes('input tokens') || bellOutputBuffer.includes('output tokens') || bellOutputBuffer.includes('api_cost')) {
1267
+ bellOutputBuffer = '';
1267
1268
  fireBellNotification(id);
1268
- }, 8000);
1269
+ }
1269
1270
  }
1270
1271
  } else if (msg.type === 'connected') {
1271
1272
  connectedSession = msg.sessionName;
@@ -1415,7 +1416,6 @@ const MemoTerminalPane = memo(function TerminalPane({
1415
1416
  visObserver.disconnect();
1416
1417
  clearTimeout(resizeTimer);
1417
1418
  clearTimeout(reconnectTimer);
1418
- clearTimeout(bellIdleTimer);
1419
1419
  window.removeEventListener('terminal-drag-end', onDragEnd);
1420
1420
  resizeObserver.disconnect();
1421
1421
  // Strict Mode cleanup: if disposed within 2s of mount and we created a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aion0/forge",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "description": "Unified AI workflow platform — multi-model task orchestration, persistent sessions, web terminal, remote access",
5
5
  "type": "module",
6
6
  "scripts": {