rhachet 1.19.1 → 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.
@@ -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,0BAA0B;IAC1B,MAAM,MAAM,GAAG,MAAM,IAAA,2BAAY,EAAC;QAChC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU;QAC7B,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAjBW,QAAA,QAAQ,YAiBnB"}
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 = captures stdout and parses JSON output when available
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 = captures stdout and parses JSON output when available
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
- // execute and capture stdout
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;;;;;GAKG;AACI,MAAM,YAAY,GAAG,CAAC,KAG5B,EAAW,EAAE;IACZ,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,6BAA6B;IAC7B,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,O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AAC,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.1",
5
+ "version": "1.19.3",
6
6
  "repository": "ehmpathy/rhachet",
7
7
  "homepage": "https://github.com/ehmpathy/rhachet",
8
8
  "keywords": [
package/readme.md CHANGED
@@ -15,7 +15,7 @@ rhachet makes it simple to leverage thought routes - safely, easily, and effecti
15
15
  - 🔩 **rigid** routes for augmented orchestration
16
16
  - 💧 **fluid** routes for probabalistic exploration
17
17
 
18
- with rhachet, you can:
18
+ with rhachet, you can
19
19
  - declare thought routes, reusably and maintainably
20
20
  - apply thought routes, observably and reliably
21
21
  - compose and accumulate reusable thought skill
@@ -86,7 +86,7 @@ npm install rhachet
86
86
 
87
87
  ## cli
88
88
 
89
- rhachet provides cli commands for each thought route:
89
+ rhachet provides cli commands for each thought route
90
90
 
91
91
  | command | route | what it does |
92
92
  | ----------------- | ------- | ------------------------------------------ |
@@ -111,14 +111,16 @@ export const getRoleRegistries = () => [
111
111
 
112
112
  ### 🪨 solid: run
113
113
 
114
+ deterministic operations, no brain.
115
+
114
116
  ```sh
115
117
  npx rhachet run --skill gh.workflow.logs --workflow test
116
118
  ```
117
119
 
118
- deterministic operations, no brain.
119
-
120
120
  ### 🔩 rigid: act
121
121
 
122
+ augmented orchestration, harness controls flow, brain augments.
123
+
122
124
  ```sh
123
125
  npx rhachet act \
124
126
  --role mechanic --skill review \
@@ -130,18 +132,16 @@ npx rhachet act \
130
132
  --brain openai/codex
131
133
  ```
132
134
 
133
- augmented orchestration, harness controls flow, brain augments.
134
-
135
135
  ### 💧 fluid: ask
136
136
 
137
+ probabilistic exploration, brain decides the path.
138
+
137
139
  ```sh
138
140
  npx rhachet ask \
139
141
  --role skeptic \
140
142
  --ask "are birds real?"
141
143
  ```
142
144
 
143
- probabilistic exploration, brain decides the path.
144
-
145
145
  ## sdk
146
146
 
147
147
  rhachet provides a type-safe sdk for programmatic actor usage.
@@ -177,16 +177,18 @@ the `brains` allowlist:
177
177
 
178
178
  ### 🪨 solid: run
179
179
 
180
+ deterministic operations, no brain.
181
+
180
182
  ```ts
181
183
  await mechanic.run({
182
184
  skill: { 'gh.workflow.logs': { workflow: 'test' } },
183
185
  });
184
186
  ```
185
187
 
186
- deterministic operations, no brain.
187
-
188
188
  ### 🔩 rigid: act
189
189
 
190
+ augmented orchestration, harness controls flow, brain augments.
191
+
190
192
  ```ts
191
193
  // uses default brain (first in allowlist)
192
194
  await mechanic.act({
@@ -200,18 +202,16 @@ await mechanic.act({
200
202
  });
201
203
  ```
202
204
 
203
- augmented orchestration, harness controls flow, brain augments.
204
-
205
205
  ### 💧 fluid: ask
206
206
 
207
+ probabilistic exploration, brain decides the path.
208
+
207
209
  ```ts
208
210
  await skeptic.ask({
209
211
  prompt: 'are birds real?',
210
212
  });
211
213
  ```
212
214
 
213
- probabilistic exploration, brain decides the path.
214
-
215
215
  # vision
216
216
 
217
217
  build or use digital actors, who work even from your laptop, and work for anyone you choose.