@losoft/taube 0.0.0-stage → 0.1.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.
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "taube-plugins",
3
+ "interface": {
4
+ "displayName": "Taube Plugins"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "taube",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./plugins/taube"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_INSTALL"
16
+ },
17
+ "category": "Productivity"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "taube-plugins",
3
+ "description": "Taube plugins for dispatching coding agents.",
4
+ "owner": {
5
+ "name": "Taube contributors"
6
+ },
7
+ "plugins": [
8
+ {
9
+ "name": "taube",
10
+ "source": "./plugins/taube",
11
+ "description": "Dispatch coding agents from the terminal with Taube."
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "taube-plugins",
3
+ "owner": {
4
+ "name": "Taube contributors"
5
+ },
6
+ "metadata": {
7
+ "description": "Taube plugins for dispatching coding agents."
8
+ },
9
+ "plugins": [
10
+ {
11
+ "name": "taube",
12
+ "source": "plugins/taube",
13
+ "description": "Dispatch coding agents from the terminal with Taube."
14
+ }
15
+ ]
16
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 taube contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,132 @@
1
- # Temporary Holding Version
1
+ # Taube
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Taube lets Codex CLI, Claude Code, Cursor, and Grok Build hand tasks to each other from the terminal. You stay in the original conversation and get the other agent’s answer there.
4
+
5
+ > Ask Codex to review my current diff. Report any bugs with file names and line numbers.
6
+
7
+ Each host plugin adds the `taube-dispatch` skill. It calls the same local CLI in all four hosts. Taube starts a fresh target session through the Agent Client Protocol (ACP), without an MCP server. [acpx documentation](https://acpx.sh/)
8
+
9
+ ```text
10
+ Claude Code → taube → acpx → Codex
11
+ ```
12
+
13
+ You can also use the Taube command directly from a shell or script.
14
+
15
+ ## Install Taube
16
+
17
+ You need Node.js 22.13 or later and npm to install the Taube command. Install the CLI for the host you want to use. Sign in to each target agent you plan to dispatch.
18
+
19
+ ```sh
20
+ npm install -g @losoft/taube
21
+ taube surfaces
22
+ ```
23
+
24
+ ### Install from GitHub
25
+
26
+ To install from GitHub, you also need Git and Bun 1.4.2 or later. Keep `bun` on your `PATH` during installation. If you use npm 12, add `--allow-git=root` to the install command.
27
+
28
+ ```sh
29
+ npm install --prefix "$HOME/.local/share/taube" github:lorenzh/taube
30
+ export PATH="$HOME/.local/share/taube/node_modules/.bin:$PATH"
31
+ taube surfaces
32
+ ```
33
+
34
+ Add the `export PATH` line to your shell startup file to use Taube in future sessions.
35
+
36
+ `taube surfaces` lists the supported targets and names their effort options in JSON. It checks your `PATH` for each target's ACP launcher. Sign-in status remains unverified. On first use, `acpx` can install the target's adapter through npm.
37
+
38
+ ### Install your host plugin
39
+
40
+ Choose the host you use to start the task. Start the host from a shell with `taube` on its `PATH`.
41
+
42
+ #### Codex
43
+
44
+ ```sh
45
+ codex plugin marketplace add https://github.com/lorenzh/taube.git
46
+ codex plugin add taube@taube-plugins
47
+ ```
48
+
49
+ Start a new Codex session. Type `$` and select `taube-dispatch`.
50
+
51
+ #### Claude Code
52
+
53
+ ```sh
54
+ claude plugin marketplace add https://github.com/lorenzh/taube.git
55
+ claude plugin install taube@taube-plugins
56
+ ```
57
+
58
+ Start a new Claude Code session and run `/taube:taube-dispatch`.
59
+
60
+ #### Cursor
61
+
62
+ Add the GitHub marketplace from a terminal signed in to Cursor:
63
+
64
+ ```sh
65
+ cursor-agent plugin marketplace add https://github.com/lorenzh/taube.git
66
+ ```
67
+
68
+ Start `cursor-agent`, open `/plugins`, and install **Taube** from **taube-plugins**. In a fresh session, ask Cursor to use `taube-dispatch` to list the available targets. If you use the `agent` command, check `agent --version` first. Both Cursor and Grok can provide that name.
69
+
70
+ For a single CLI session, Cursor can also load the plugin included with a global npm installation.
71
+
72
+ ```sh
73
+ cursor-agent --plugin-dir "$(npm root -g)/@losoft/taube/plugins/taube"
74
+ ```
75
+
76
+ If you installed from GitHub with the prefix above, use this path.
77
+
78
+ ```sh
79
+ cursor-agent --plugin-dir "$HOME/.local/share/taube/node_modules/@losoft/taube/plugins/taube"
80
+ ```
81
+
82
+ #### Grok Build
83
+
84
+ ```sh
85
+ grok plugin install 'lorenzh/taube#plugins/taube' --trust
86
+ ```
87
+
88
+ `--trust` confirms that you trust the plugin from this repository. Start a new Grok Build session and run `/taube-dispatch`.
89
+
90
+ ## Dispatch a task
91
+
92
+ Ask Taube in your host to delegate a task to `codex`, `claude`, `cursor`, or `grok`. Include the working directory, the scope, and the result you want. An orchestration workflow can call `taube surfaces` to list targets before handing off a brief through `taube-dispatch`.
93
+
94
+ From a shell or script, send the brief on standard input.
95
+
96
+ ```sh
97
+ taube dispatch codex --cwd "$PWD" <<'BRIEF'
98
+ Review the recent changes for bugs. Return findings with file names and line numbers. Leave the files unchanged.
99
+ BRIEF
100
+ ```
101
+
102
+ The working directory defaults to the current directory. Use `--model ID` and `--effort LEVEL` to set individual options. If you omit either option, Taube uses the target's default for that option. Use model IDs and effort values supported by the target adapter. To dispatch to Cursor, put `cursor-agent` on your `PATH` and sign in with `cursor-agent login`. Choose a model variant offered by Cursor with `--model`. The Cursor adapter in this setup does not expose a separate `--effort` setting.
103
+
104
+ Taube streams the agent's answer to stdout and writes diagnostics to stderr. If the process fails or the turn is incomplete, Taube exits with a nonzero status. Some adapters return provider errors as answer text and mark the turn complete.
105
+
106
+ ### Authentication and permissions
107
+
108
+ The target uses its own login and permission settings. Taube does not inherit the calling host's Auto mode. Taube runs without interactive permission prompts. The calling host must allow the child process to reach its provider and access its session files.
109
+
110
+ Run Taube in workspaces you trust. The `acpx` CLI reads local project configuration. That configuration can set a custom launcher.
111
+
112
+ ## Development
113
+
114
+ Run the checks from a local copy of the repository.
115
+
116
+ ```sh
117
+ bun install --frozen-lockfile
118
+ bun run check
119
+ bun test
120
+ ```
121
+
122
+ To run installation checks for Codex, Claude Code, and Grok Build, put `codex`, `claude`, and `grok` on your `PATH`. The tests use isolated configuration directories and do not send model prompts.
123
+
124
+ ```sh
125
+ TAUBE_TEST_NATIVE_PLUGINS=1 bun test test/plugins.test.ts
126
+ ```
127
+
128
+ Contributions go through pull requests. CI checks the build, types, formatting, tests, and synchronized patch versions. [Contributor instructions](AGENTS.md)
129
+
130
+ ## License
131
+
132
+ [MIT](LICENSE)
package/dist/cli.js ADDED
@@ -0,0 +1,227 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/cli.ts
4
+ import { spawn } from "node:child_process";
5
+ import { once } from "node:events";
6
+ import { accessSync, constants as fsConstants, statSync } from "node:fs";
7
+ import { createRequire } from "node:module";
8
+ import { constants } from "node:os";
9
+ import { delimiter, resolve } from "node:path";
10
+ import { createInterface } from "node:readline";
11
+ import { text } from "node:stream/consumers";
12
+ import { parseArgs } from "node:util";
13
+ var targets = [
14
+ {
15
+ id: "codex",
16
+ profile: "codex",
17
+ launcher: "codex-acp",
18
+ effortOption: "reasoning_effort"
19
+ },
20
+ {
21
+ id: "claude",
22
+ profile: "claude",
23
+ launcher: "claude-agent-acp",
24
+ effortOption: "effort"
25
+ },
26
+ {
27
+ id: "grok",
28
+ profile: "grok-build",
29
+ launcher: "grok",
30
+ effortOption: "reasoning_effort"
31
+ },
32
+ {
33
+ id: "cursor",
34
+ profile: "cursor",
35
+ launcher: "cursor-agent",
36
+ effortOption: null
37
+ }
38
+ ];
39
+ var targetIds = targets.map(({ id }) => id);
40
+ var help = `Usage:
41
+ taube surfaces
42
+ taube dispatch <${targetIds.join("|")}> [--model ID] [--effort LEVEL] [--cwd DIR]
43
+
44
+ surfaces lists supported targets and checks each built-in ACP launcher on PATH.
45
+ dispatch reads one instruction from stdin, starts a fresh session, and streams
46
+ assistant text to stdout. Diagnostics go to stderr. A partial turn exits nonzero.
47
+ Omit model and effort to use the target defaults.
48
+ For Cursor, select an advertised model variant with --model. Cursor through
49
+ acpx does not expose a separate --effort setting.`;
50
+ function executableOnPath(command) {
51
+ const extensions = process.platform === "win32" ? (process.env.PATHEXT ?? ".EXE;.CMD;.BAT").split(";") : [""];
52
+ for (const directory of (process.env.PATH ?? "").split(delimiter)) {
53
+ for (const extension of extensions) {
54
+ const candidate = resolve(directory, command + extension);
55
+ try {
56
+ accessSync(candidate, fsConstants.X_OK);
57
+ if (statSync(candidate).isFile())
58
+ return candidate;
59
+ } catch {}
60
+ }
61
+ }
62
+ }
63
+ function surfaces() {
64
+ return {
65
+ targets: targets.map(({ id, profile, effortOption, launcher }) => ({
66
+ id,
67
+ profile,
68
+ effortOption,
69
+ launcher: {
70
+ command: launcher,
71
+ onPath: Boolean(executableOnPath(launcher))
72
+ },
73
+ account: "unverified"
74
+ }))
75
+ };
76
+ }
77
+ async function runAcpx(args, cwd, codex) {
78
+ const instruction = await text(process.stdin);
79
+ if (!instruction.trim())
80
+ throw new Error("Supply a non-empty instruction on stdin.");
81
+ const codexPath = codex && process.env.CODEX_PATH === undefined ? executableOnPath("codex") : null;
82
+ const acpx = createRequire(import.meta.url).resolve("acpx");
83
+ const child = spawn(process.execPath, [acpx, ...args], {
84
+ cwd,
85
+ env: codexPath ? { ...process.env, CODEX_PATH: codexPath } : process.env,
86
+ stdio: ["pipe", "pipe", "inherit"]
87
+ });
88
+ const exited = once(child, "close");
89
+ exited.catch(() => {});
90
+ child.stdin.on("error", (error) => {
91
+ if (error.code !== "EPIPE")
92
+ console.error(`taube: stdin: ${error.message}`);
93
+ });
94
+ child.stdin.end(JSON.stringify([{ type: "text", text: instruction }]));
95
+ let interrupted;
96
+ const forwardSignal = (signal) => {
97
+ interrupted ??= signal;
98
+ child.kill(signal);
99
+ };
100
+ const signals = ["SIGINT", "SIGTERM", "SIGHUP"];
101
+ const handlers = signals.map((signal) => () => forwardSignal(signal));
102
+ for (const [index, signal] of signals.entries())
103
+ process.on(signal, handlers[index]);
104
+ let promptId;
105
+ let stopReason;
106
+ let malformed = false;
107
+ let lastError;
108
+ let outputError;
109
+ const onOutputError = (error) => {
110
+ outputError = error;
111
+ child.kill("SIGTERM");
112
+ };
113
+ process.stdout.on("error", onOutputError);
114
+ try {
115
+ const lines = createInterface({
116
+ input: child.stdout,
117
+ crlfDelay: Infinity
118
+ });
119
+ for await (const line of lines) {
120
+ let event;
121
+ try {
122
+ event = JSON.parse(line);
123
+ if (!event || typeof event !== "object")
124
+ throw new Error;
125
+ } catch {
126
+ malformed = true;
127
+ continue;
128
+ }
129
+ if (event.method === "session/prompt")
130
+ promptId = event.id;
131
+ const update = event.params?.update;
132
+ if (!outputError && event.method === "session/update" && update?.sessionUpdate === "agent_message_chunk" && update.content?.type === "text" && typeof update.content.text === "string") {
133
+ if (!process.stdout.write(update.content.text))
134
+ await once(process.stdout, "drain");
135
+ }
136
+ if (promptId !== undefined && event.id === promptId && typeof event.result?.stopReason === "string")
137
+ stopReason = event.result.stopReason;
138
+ if (typeof event.error?.message === "string")
139
+ lastError = event.error.message;
140
+ }
141
+ const [status, exitSignal] = await exited;
142
+ if (outputError)
143
+ throw outputError;
144
+ const signal = interrupted ?? exitSignal;
145
+ if (signal) {
146
+ console.error(`taube: interrupted (${signal})`);
147
+ return 128 + constants.signals[signal];
148
+ }
149
+ if (status !== 0) {
150
+ console.error(`taube: ${lastError ?? `acpx exited with status ${status}`}`);
151
+ return status ?? 1;
152
+ }
153
+ if (malformed || !stopReason)
154
+ throw new Error("acpx returned an incomplete or invalid event stream");
155
+ if (stopReason !== "end_turn") {
156
+ console.error(`taube: target stopped with ${stopReason}`);
157
+ return stopReason === "cancelled" ? 130 : 1;
158
+ }
159
+ return 0;
160
+ } finally {
161
+ if (child.exitCode === null && child.signalCode === null) {
162
+ child.kill("SIGTERM");
163
+ await exited.catch(() => {});
164
+ }
165
+ process.stdout.off("error", onOutputError);
166
+ for (const [index, signal] of signals.entries())
167
+ process.off(signal, handlers[index]);
168
+ }
169
+ }
170
+ async function main([command, targetId, ...args]) {
171
+ if (!command || command === "--help" || command === "-h" || command === "dispatch" && (targetId === "--help" || targetId === "-h")) {
172
+ console.log(help);
173
+ return 0;
174
+ }
175
+ if (command === "surfaces" && !targetId) {
176
+ console.log(JSON.stringify(surfaces(), null, 2));
177
+ return 0;
178
+ }
179
+ if (command !== "dispatch")
180
+ throw new Error("Expected surfaces or dispatch. See taube --help.");
181
+ const target = targets.find(({ id }) => id === targetId);
182
+ if (!target)
183
+ throw new Error(`Choose one target: ${targetIds.join(", ")}.`);
184
+ const { values } = parseArgs({
185
+ args,
186
+ options: {
187
+ cwd: { type: "string" },
188
+ model: { type: "string" },
189
+ effort: { type: "string" },
190
+ help: { type: "boolean", short: "h" }
191
+ }
192
+ });
193
+ if (values.help) {
194
+ console.log(help);
195
+ return 0;
196
+ }
197
+ for (const [name, value] of Object.entries(values)) {
198
+ if (typeof value === "string" && !value.trim())
199
+ throw new Error(`--${name} needs a non-empty value`);
200
+ }
201
+ const cwd = resolve(values.cwd ?? ".");
202
+ const acpxArgs = [
203
+ "--cwd",
204
+ cwd,
205
+ "--format",
206
+ "json",
207
+ "--non-interactive-permissions",
208
+ "fail",
209
+ "--prompt-retries",
210
+ "0"
211
+ ];
212
+ if (values.model)
213
+ acpxArgs.push("--model", values.model);
214
+ acpxArgs.push(target.profile, "exec", "--file", "-");
215
+ if (values.effort) {
216
+ if (!target.effortOption)
217
+ throw new Error("Cursor through acpx does not support a separate --effort setting. Use --model with an advertised Cursor model variant.");
218
+ acpxArgs.push("--config-option", `${target.effortOption}=${values.effort}`);
219
+ }
220
+ return runAcpx(acpxArgs, cwd, target.id === "codex");
221
+ }
222
+ try {
223
+ process.exitCode = await main(process.argv.slice(2));
224
+ } catch (error) {
225
+ console.error(`taube: ${error instanceof Error ? error.message : String(error)}`);
226
+ process.exitCode = 1;
227
+ }
package/package.json CHANGED
@@ -1,6 +1,42 @@
1
1
  {
2
2
  "name": "@losoft/taube",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.5",
4
+ "description": "Delegate a coding task to Codex, Claude Code, Grok Build, or Cursor through acpx.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/lorenzh/taube.git"
10
+ },
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "bin": {
15
+ "taube": "dist/cli.js"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "plugins",
20
+ ".agents/plugins",
21
+ ".claude-plugin",
22
+ ".cursor-plugin"
23
+ ],
24
+ "packageManager": "bun@1.4.2",
25
+ "engines": {
26
+ "node": ">=22.13.0"
27
+ },
28
+ "scripts": {
29
+ "check": "biome check . && tsc --noEmit",
30
+ "test": "bun test",
31
+ "build": "bun build src/cli.ts --target=node --packages=external --outdir=dist",
32
+ "prepare": "bun run build"
33
+ },
34
+ "dependencies": {
35
+ "acpx": "0.23.0"
36
+ },
37
+ "devDependencies": {
38
+ "@biomejs/biome": "2.6.9",
39
+ "@types/bun": "1.4.2",
40
+ "typescript": "6.0.3"
41
+ }
42
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "taube",
3
+ "version": "0.1.5",
4
+ "description": "Dispatch coding agents from the terminal with Taube.",
5
+ "author": {
6
+ "name": "Taube contributors"
7
+ },
8
+ "license": "MIT"
9
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "taube",
3
+ "version": "0.1.5",
4
+ "description": "Dispatch coding agents from the terminal with Taube.",
5
+ "license": "MIT",
6
+ "skills": "./skills/",
7
+ "interface": {
8
+ "displayName": "Taube",
9
+ "shortDescription": "Dispatch Codex, Claude Code, Cursor, or Grok",
10
+ "category": "Productivity"
11
+ }
12
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "taube",
3
+ "version": "0.1.5",
4
+ "description": "Dispatch coding agents from the terminal with Taube.",
5
+ "author": {
6
+ "name": "Taube contributors"
7
+ },
8
+ "license": "MIT"
9
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "taube",
3
+ "version": "0.1.5",
4
+ "description": "Dispatch coding agents from the terminal with Taube.",
5
+ "license": "MIT"
6
+ }
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: taube-dispatch
3
+ description: Taube dispatch surface for agent orchestration. Use when orchestrating-agents or orchestrate-agents looks up available dispatch surfaces, or when the user asks to delegate coding work to Codex, Claude Code, Grok, or Cursor through Taube.
4
+ ---
5
+
6
+ # Dispatch coding agents with Taube
7
+
8
+ Find available coding agents and send an authorized task to the chosen agent.
9
+
10
+ **Use current dispatch capabilities and verify the requested model and effort before sending a brief.**
11
+
12
+ ## 1. Discover the dispatch surface
13
+
14
+ Run `taube surfaces` in a shell before offering Taube as a dispatch surface. Report each supported target, effort option, and detected launcher from its JSON output. Limit a discovery request to reporting these capabilities.
15
+
16
+ Treat launcher detection as a PATH check and authentication as unverified. Obtain concrete model IDs and effort values from verified target information or the user. If `taube` is missing or discovery fails, report the failure.
17
+
18
+ Done when the orchestrator has the available choices or the reason discovery could not return them.
19
+
20
+ ## 2. Dispatch the task
21
+
22
+ Use the target, working directory, and settings authorized by the user or the enclosing orchestration workflow. Write a self-contained brief with the task, relevant files, scope, and expected result.
23
+
24
+ Pass the brief on stdin to `taube dispatch <codex|claude|grok|cursor> [--model ID] [--effort LEVEL] [--cwd DIR]`. When a model or effort is selected, pass it explicitly. Omit an optional setting only when the target default is acceptable to the caller. If the target cannot select a required setting, report the limit and ask for a supported choice before dispatch.
25
+
26
+ Done when Taube has accepted the authorized brief or returned a dispatch error.
27
+
28
+ ## 3. Report the result
29
+
30
+ Wait for the command to exit. Report the result and any verification the agent provides. If the command fails, report its error and treat the task as unfinished.
31
+
32
+ Done when the orchestrator has the result or the concrete reason the agent run failed.
33
+
34
+ ## Example
35
+
36
+ For a read-only Claude Code review using target defaults, confirm `claude` in `taube surfaces`, then pass the brief to Taube.
37
+
38
+ ```sh
39
+ taube dispatch claude --cwd "$PWD" <<'BRIEF'
40
+ Review the README for broken relative links. Return each link and its line number. Leave the files untouched.
41
+ BRIEF
42
+ ```