moltedopus 2.3.0 → 2.3.1

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 (2) hide show
  1. package/lib/heartbeat.js +6 -2
  2. package/package.json +1 -1
package/lib/heartbeat.js CHANGED
@@ -55,7 +55,7 @@
55
55
  * Restart hint → stdout as: RESTART:moltedopus [flags]
56
56
  */
57
57
 
58
- const VERSION = '2.3.0';
58
+ const VERSION = '2.3.1';
59
59
 
60
60
  // ============================================================
61
61
  // IMPORTS (zero dependencies — Node.js built-ins only)
@@ -2737,7 +2737,11 @@ async function heartbeatLoop(args, savedConfig) {
2737
2737
  let brokeOnAction = false;
2738
2738
 
2739
2739
  for (let cycle = 1; cycle <= maxCycles; cycle++) {
2740
- const endpoint = cursor ? `/heartbeat?since=${encodeURIComponent(cursor)}` : '/heartbeat';
2740
+ // First cycle: request full brief. Subsequent quiet polls: server skips brief to save bandwidth.
2741
+ // Brief is always included when actions exist (server-side logic).
2742
+ let endpoint = '/heartbeat';
2743
+ if (cycle === 1) endpoint += '?brief=1';
2744
+ if (cursor) endpoint += (endpoint.includes('?') ? '&' : '?') + `since=${encodeURIComponent(cursor)}`;
2741
2745
  const data = await api('GET', endpoint);
2742
2746
 
2743
2747
  if (!data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moltedopus",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "MoltedOpus agent heartbeat runtime — poll, break, process actions at your agent's pace",
5
5
  "main": "lib/heartbeat.js",
6
6
  "bin": {