stigmergy 1.3.77-beta.2 → 1.3.77-beta.4
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/package.json
CHANGED
|
@@ -814,8 +814,47 @@ module.exports = ResumeSessionCommand;
|
|
|
814
814
|
|
|
815
815
|
// Export handler function for router
|
|
816
816
|
module.exports.handleResumeCommand = async function(args, options) {
|
|
817
|
-
|
|
818
|
-
|
|
817
|
+
// Always use the enhanced resumesession functionality
|
|
818
|
+
const { spawnSync } = require('child_process');
|
|
819
|
+
const path = require('path');
|
|
820
|
+
|
|
821
|
+
// Try to find the independent-resume.js script in different possible locations
|
|
822
|
+
const possiblePaths = [
|
|
823
|
+
path.join(__dirname, '../../../..', 'skills', 'resumesession', 'independent-resume.js'), // Development path
|
|
824
|
+
path.join(__dirname, '../../..', 'skills', 'resumesession', 'independent-resume.js'), // Global install path
|
|
825
|
+
path.join(__dirname, '../..', 'skills', 'resumesession', 'independent-resume.js'), // Alternative global path
|
|
826
|
+
path.join(__dirname, '..', 'skills', 'resumesession', 'independent-resume.js') // Another alternative
|
|
827
|
+
];
|
|
828
|
+
|
|
829
|
+
let scriptPath = null;
|
|
830
|
+
for (const p of possiblePaths) {
|
|
831
|
+
try {
|
|
832
|
+
require.resolve(p);
|
|
833
|
+
scriptPath = p;
|
|
834
|
+
break;
|
|
835
|
+
} catch (e) {
|
|
836
|
+
// Path doesn't exist, try the next one
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
if (!scriptPath) {
|
|
841
|
+
console.error('Could not find independent-resume.js script in any expected location');
|
|
842
|
+
return 1;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
const result = spawnSync('node', [scriptPath], {
|
|
846
|
+
stdio: 'pipe',
|
|
847
|
+
encoding: 'utf-8',
|
|
848
|
+
cwd: process.cwd()
|
|
849
|
+
});
|
|
850
|
+
|
|
851
|
+
if (result.status === 0) {
|
|
852
|
+
console.log(result.stdout);
|
|
853
|
+
return 0;
|
|
854
|
+
} else {
|
|
855
|
+
console.error('Enhanced resumesession failed:', result.stderr);
|
|
856
|
+
return 1;
|
|
857
|
+
}
|
|
819
858
|
};
|
|
820
859
|
|
|
821
860
|
// Export help function
|