@siftd/connect-agent 0.2.4 → 0.2.5

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/heartbeat.js CHANGED
@@ -10,7 +10,7 @@ import { hostname } from 'os';
10
10
  import { createHash } from 'crypto';
11
11
  import { getServerUrl, getAgentToken, getUserId, isCloudMode } from './config.js';
12
12
  const HEARTBEAT_INTERVAL = 10000; // 10 seconds
13
- const VERSION = '0.2.4'; // Should match package.json
13
+ const VERSION = '0.2.5'; // Should match package.json
14
14
  const state = {
15
15
  intervalId: null,
16
16
  runnerId: null,
@@ -695,15 +695,19 @@ Be specific about what you want done.`,
695
695
  if (context) {
696
696
  prompt = `Context: ${context}\n\nTask: ${task}`;
697
697
  }
698
- // Add checkpoint instructions to prevent data loss on timeout
698
+ // Add checkpoint and logging instructions to prevent data loss
699
+ const logFile = `/tmp/worker-${id}-log.txt`;
699
700
  prompt += `
700
701
 
701
- IMPORTANT - Progress Saving:
702
- - Output your findings as you go, don't wait until the end
702
+ IMPORTANT - Progress & Logging:
703
+ - Output findings as you go, don't wait until the end
703
704
  - Print discoveries, file paths, and insights immediately as you find them
704
- - If you're exploring multiple files, report on each one before moving to the next
705
- - If you hit a timeout, the orchestrator should still have your partial findings
706
- - Keep responses concise but don't batch output until the very end`;
705
+ - Report on each file/step before moving to the next
706
+
707
+ REQUIRED - Log Export:
708
+ At the END of your work, create a final log file at: ${logFile}
709
+ Include: job_id=${id}, timestamp, summary of work done, files modified, key findings.
710
+ This ensures nothing is lost even if your output gets truncated.`;
707
711
  console.log(`[ORCHESTRATOR] Delegating to worker ${id}: ${task.slice(0, 80)}...`);
708
712
  return new Promise((resolve) => {
709
713
  const job = {
@@ -70,14 +70,19 @@ export class WorkerManager {
70
70
  this.saveJob(job);
71
71
  // Spawn Claude CLI process
72
72
  try {
73
- // Add checkpoint instructions to prevent data loss on timeout
73
+ // Add checkpoint and logging instructions to prevent data loss
74
+ const logFile = `/tmp/worker-${jobId}-log.txt`;
74
75
  const enhancedTask = `${task}
75
76
 
76
- IMPORTANT - Progress Saving:
77
+ IMPORTANT - Progress & Logging:
77
78
  - Output findings as you go, don't wait until the end
78
79
  - Print discoveries and insights immediately as you find them
79
80
  - Report on each file/step before moving to the next
80
- - Keep responses concise but don't batch output`;
81
+
82
+ REQUIRED - Log Export:
83
+ At the END of your work, create a final log file at: ${logFile}
84
+ Include: job_id=${jobId}, timestamp, summary of work done, files modified, key findings.
85
+ This ensures nothing is lost even if your output gets truncated.`;
81
86
  // Escape single quotes in task for shell safety
82
87
  const escapedTask = enhancedTask.replace(/'/g, "'\\''");
83
88
  // Spawn using bash -l -c to ensure proper PATH resolution (NVM, etc.)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siftd/connect-agent",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Master orchestrator agent - control Claude Code remotely via web",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",