rhachet 1.19.2 → 1.19.3
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/domain.operations/actor/actorRun.js +2 -1
- package/dist/domain.operations/actor/actorRun.js.map +1 -1
- package/dist/domain.operations/invoke/executeSkill.d.ts +3 -1
- package/dist/domain.operations/invoke/executeSkill.js +14 -2
- package/dist/domain.operations/invoke/executeSkill.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,10 +14,11 @@ const actorRun = async (input) => {
|
|
|
14
14
|
for (const [key, value] of Object.entries(input.args)) {
|
|
15
15
|
argsArray.push(`--${key}`, String(value));
|
|
16
16
|
}
|
|
17
|
-
// execute skill via spawn
|
|
17
|
+
// execute skill via spawn (capture mode for SDK return value)
|
|
18
18
|
const result = await (0, executeSkill_1.executeSkill)({
|
|
19
19
|
skill: input.skill.executable,
|
|
20
20
|
args: argsArray,
|
|
21
|
+
stream: false,
|
|
21
22
|
});
|
|
22
23
|
return result;
|
|
23
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actorRun.js","sourceRoot":"","sources":["../../../src/domain.operations/actor/actorRun.ts"],"names":[],"mappings":";;;AACA,6EAA0E;AAE1E;;;;;GAKG;AACI,MAAM,QAAQ,GAAG,KAAK,EAAE,KAG9B,EAAoB,EAAE;IACrB,8CAA8C;IAC9C,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACtD,SAAS,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"actorRun.js","sourceRoot":"","sources":["../../../src/domain.operations/actor/actorRun.ts"],"names":[],"mappings":";;;AACA,6EAA0E;AAE1E;;;;;GAKG;AACI,MAAM,QAAQ,GAAG,KAAK,EAAE,KAG9B,EAAoB,EAAE;IACrB,8CAA8C;IAC9C,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACtD,SAAS,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,8DAA8D;IAC9D,MAAM,MAAM,GAAG,MAAM,IAAA,2BAAY,EAAC;QAChC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU;QAC7B,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAlBW,QAAA,QAAQ,YAkBnB"}
|
|
@@ -3,9 +3,11 @@ import type { RoleSkillExecutable } from '../../domain.objects/RoleSkillExecutab
|
|
|
3
3
|
* .what = executes a skill script with passthrough args
|
|
4
4
|
* .why = runs the discovered skill with full arg passthrough
|
|
5
5
|
*
|
|
6
|
-
* .note =
|
|
6
|
+
* .note = when stream=true (default), streams stdout/stderr progressively
|
|
7
|
+
* .note = when stream=false, captures stdout and parses JSON output
|
|
7
8
|
*/
|
|
8
9
|
export declare const executeSkill: (input: {
|
|
9
10
|
skill: RoleSkillExecutable;
|
|
10
11
|
args: string[];
|
|
12
|
+
stream?: boolean;
|
|
11
13
|
}) => unknown;
|
|
@@ -6,9 +6,12 @@ const node_child_process_1 = require("node:child_process");
|
|
|
6
6
|
* .what = executes a skill script with passthrough args
|
|
7
7
|
* .why = runs the discovered skill with full arg passthrough
|
|
8
8
|
*
|
|
9
|
-
* .note =
|
|
9
|
+
* .note = when stream=true (default), streams stdout/stderr progressively
|
|
10
|
+
* .note = when stream=false, captures stdout and parses JSON output
|
|
10
11
|
*/
|
|
11
12
|
const executeSkill = (input) => {
|
|
13
|
+
// default to streaming (backwards compatible with CLI behavior)
|
|
14
|
+
const stream = input.stream ?? true;
|
|
12
15
|
// build command with args
|
|
13
16
|
const command = [input.skill.path, ...input.args]
|
|
14
17
|
.map((arg) => {
|
|
@@ -18,7 +21,16 @@ const executeSkill = (input) => {
|
|
|
18
21
|
return arg;
|
|
19
22
|
})
|
|
20
23
|
.join(' ');
|
|
21
|
-
//
|
|
24
|
+
// streaming mode: inherit stdio for progressive output
|
|
25
|
+
if (stream) {
|
|
26
|
+
(0, node_child_process_1.execSync)(command, {
|
|
27
|
+
cwd: process.cwd(),
|
|
28
|
+
shell: '/bin/bash',
|
|
29
|
+
stdio: 'inherit',
|
|
30
|
+
});
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
// capture mode: capture stdout for JSON parsing
|
|
22
34
|
const stdout = (0, node_child_process_1.execSync)(command, {
|
|
23
35
|
cwd: process.cwd(),
|
|
24
36
|
shell: '/bin/bash',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeSkill.js","sourceRoot":"","sources":["../../../src/domain.operations/invoke/executeSkill.ts"],"names":[],"mappings":";;;AAEA,2DAA8C;AAE9C
|
|
1
|
+
{"version":3,"file":"executeSkill.js","sourceRoot":"","sources":["../../../src/domain.operations/invoke/executeSkill.ts"],"names":[],"mappings":";;;AAEA,2DAA8C;AAE9C;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAAC,KAI5B,EAAW,EAAE;IACZ,gEAAgE;IAChE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC;IAEpC,0BAA0B;IAC1B,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC;SAC9C,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACX,yBAAyB;QACzB,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,OAAO,IAAI,GAAG,GAAG,CAAC;QACzC,OAAO,GAAG,CAAC;IACb,CAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,uDAAuD;IACvD,IAAI,MAAM,EAAE,CAAC;QACX,IAAA,6BAAQ,EAAC,OAAO,EAAE;YAChB,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;YAClB,KAAK,EAAE,WAAW;YAClB,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,gDAAgD;IAChD,MAAM,MAAM,GAAG,IAAA,6BAAQ,EAAC,OAAO,EAAE;QAC/B,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;QAClB,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;IAEH,+BAA+B;IAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAE/B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,sCAAsC;QACtC,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC,CAAC;AA5CW,QAAA,YAAY,gBA4CvB"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "rhachet",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "A framework for reliable, thorough thought. Weave threads of thought via stitches.",
|
|
5
|
-
"version": "1.19.
|
|
5
|
+
"version": "1.19.3",
|
|
6
6
|
"repository": "ehmpathy/rhachet",
|
|
7
7
|
"homepage": "https://github.com/ehmpathy/rhachet",
|
|
8
8
|
"keywords": [
|