wordspace 0.0.11 → 0.0.12

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.
@@ -68,13 +68,22 @@ export async function run(target, force, harnessArg) {
68
68
  }
69
69
  else {
70
70
  log.step("Pick a coding agent");
71
- harness = await pickOne(installed, (h) => h.mode === "headless" ? `${h.name} (headless)` : h.name, "Select harness");
71
+ harness = await pickOne(installed, (h) => {
72
+ if (h.mode === "headless")
73
+ return `${h.name} (headless)`;
74
+ if (h.mode === "passthrough")
75
+ return `${h.name} (passthrough)`;
76
+ return h.name;
77
+ }, "Select harness");
72
78
  }
73
79
  }
74
80
  log.success(`Using ${harness.name}`);
75
81
  if (harness.mode === "headless") {
76
82
  log.warn("Headless mode — the agent will execute and exit without interaction.");
77
83
  }
84
+ else if (harness.mode === "passthrough") {
85
+ log.info("Passthrough mode — outputting workflow for the calling agent.");
86
+ }
78
87
  const cwd = process.cwd();
79
88
  // Auto-init if needed (harness-aware)
80
89
  ensureInit(cwd, harness);
@@ -108,6 +117,11 @@ export async function run(target, force, harnessArg) {
108
117
  prosePath = target;
109
118
  }
110
119
  const prompt = buildPrompt(harness, prosePath, cwd);
120
+ if (harness.mode === "passthrough") {
121
+ // The calling agent is already running — just output the prompt
122
+ console.log(prompt);
123
+ process.exit(0);
124
+ }
111
125
  console.log();
112
126
  if (harness.skillNative) {
113
127
  log.info(prompt);
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { search } from "./commands/search.js";
4
4
  import { add } from "./commands/add.js";
5
5
  import { run } from "./commands/run.js";
6
6
  import * as log from "./lib/log.js";
7
- const VERSION = "0.0.11";
7
+ const VERSION = "0.0.12";
8
8
  const HELP = `
9
9
  Usage: wordspace <command> [options]
10
10
 
@@ -7,8 +7,8 @@ export interface Harness {
7
7
  args: (prompt: string) => string[];
8
8
  /** URL or install command the user can use to install this harness. */
9
9
  installUrl: string;
10
- /** Whether the harness runs interactively or headless. */
11
- mode: "interactive" | "headless";
10
+ /** Whether the harness runs interactively, headless, or passthrough (already running). */
11
+ mode: "interactive" | "headless" | "passthrough";
12
12
  /** Whether the harness natively understands /open-prose skill commands. */
13
13
  skillNative: boolean;
14
14
  }
@@ -81,6 +81,14 @@ export const HARNESSES = [
81
81
  mode: "interactive",
82
82
  skillNative: false,
83
83
  },
84
+ {
85
+ name: "OpenClaw",
86
+ bin: "openclaw",
87
+ args: () => [],
88
+ installUrl: "npm i -g openclaw@latest",
89
+ mode: "passthrough",
90
+ skillNative: false,
91
+ },
84
92
  ];
85
93
  /** Return only the harnesses whose binary is found on PATH. */
86
94
  export function detectInstalled() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wordspace",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"