@aibridge/cli 0.0.2 → 0.1.1

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/README.md ADDED
@@ -0,0 +1,87 @@
1
+ <div align="center">
2
+ <img src="assets/logo.png" alt="aibridge logo" width="140" />
3
+
4
+ # aibridge
5
+
6
+ **Let your coding agent drive the other AIs on your machine.** Cross-provider agent-to-agent delegation — plan, implement, review, red-team, and generate images across Grok, Gemini, Codex & Claude through the CLIs you already have. No API keys.
7
+
8
+ [![skills.sh](https://skills.sh/b/ycmjason/aibridge)](https://skills.sh/ycmjason/aibridge)
9
+ [![npm](https://img.shields.io/npm/v/%40aibridge%2Fcli)](https://www.npmjs.com/package/@aibridge/cli)
10
+ [![node](https://img.shields.io/node/v/%40aibridge%2Fcli)](https://www.npmjs.com/package/@aibridge/cli)
11
+ [![license](https://img.shields.io/github/license/ycmjason/aibridge)](LICENSE)
12
+
13
+ Works in **Claude Code**, **Cursor**, **Codex**, **Gemini CLI**, **OpenCode**, and 70+ other agents via [the skills CLI](https://github.com/vercel-labs/skills).
14
+ </div>
15
+
16
+ ---
17
+
18
+ Your agent is one model, from one provider. Your machine probably has several more sitting behind CLIs you already use — `grok`, `agy` (Antigravity), `codex`, `claude`. **aibridge** turns them into seats your agent can drive: a planner that studies your repo, an implementer that edits it and runs your real tests, a reviewer from a *different* model family that cross-checks the diff against the plan, concurrent one-shot delegates — and capabilities your agent's own provider may not offer at all, like real image generation (gpt-image-2, Grok Imagine).
19
+
20
+ ## Install
21
+
22
+ One step — install the skill into your agent(s):
23
+
24
+ ```bash
25
+ npx skills add ycmjason/aibridge
26
+ ```
27
+
28
+ That's it. The skill runs the CLI on demand via `npx -y @aibridge/cli` — nothing else to install. Ask your agent to "use aibridge", or try it yourself:
29
+
30
+ ```bash
31
+ npx -y @aibridge/cli subagent "summarize the architecture of this repo"
32
+ ```
33
+
34
+ <sup>Want the `aibridge` command on your PATH for manual use? `npm i -g @aibridge/cli` (optional).</sup>
35
+
36
+ ## Commands
37
+
38
+ | Command | Use when |
39
+ |---|---|
40
+ | `aibridge plan "<task>"` | You want a delegate model to study the repo and expand a task into a detailed, reviewable **plan file** before any code is written |
41
+ | `aibridge implement <plan.md>` | You have an approved plan file and want it executed in place — with your project's **real typecheck and tests** run until green |
42
+ | `aibridge review [--plan <plan.md>]` | You want a **different model** to pressure-test the working-tree diff against the plan contract (over-reach is a finding) — or to review the plan itself before implementing |
43
+ | `aibridge subagent "<task>"` | A self-contained task deserves a concurrent delegate, a cross-model second opinion, or a red-team pass |
44
+ | `aibridge image-gen "<prompt>"` | You need a real raster image — gpt-image-2 (default) or Grok Imagine, with render verification |
45
+ | `aibridge quota` | Two-second check of every backend's remaining quota before you pipeline work |
46
+ | `aibridge runs` | Inspect or watch past delegation runs (`~/.aibridge/runs`) |
47
+
48
+ The three verbs compose into an orchestrator-driven loop your agent stays in charge of:
49
+
50
+ ```
51
+ aibridge plan "add rate limiting to the API" # delegate writes plan.md
52
+ # → your agent reads, edits, approves the plan
53
+ aibridge implement plan.md # another model executes it, runs your gates
54
+ aibridge review --plan plan.md # a third seat cross-checks the diff
55
+ ```
56
+
57
+ Plan files — not their contents — travel between stages, so the loop is nearly free on your agent's context.
58
+
59
+ ## How it works
60
+
61
+ - **The skill carries judgment; the CLI owns execution.** The skill teaches your agent prompt-craft, seat selection, and when to gate; the CLI deterministically drives the backing CLIs, captures their output, verifies results (a "generated image" under 100 KB is a code-drawn fake, an empty answer is a quota death), and logs every run.
62
+ - **Seats stay cross-model by default.** Grok plans and reviews, Gemini implements — a model never reviews its own diff, and independent eyes catch what shared blind spots miss.
63
+ - **No API keys.** Delegation runs on the backing CLIs' existing logins, each spending its own quota. (The skill treats a backend that shares your agent's own quota pool as a last resort.)
64
+ - **Models are canonical slugs**: `<vendor>-<cli>/<model>[-<effort>]` — e.g. `xai-grok/grok-4.5`, `google-antigravity/gemini-3.6-flash`, `openai-codex/gpt-5.6-sol-high`, `anthropic-claude/opus`. No aliases; `aibridge <command> --help` lists every seat.
65
+
66
+ ## Requirements
67
+
68
+ - **Node ≥ 24.11**
69
+ - The backing CLIs you want to use, on `PATH` and authed: [`grok`](https://github.com/superagent-ai/grok-cli), `agy` (Antigravity), [`codex`](https://github.com/openai/codex), [`claude`](https://claude.com/claude-code) — any subset works; commands fail fast with install hints for missing ones.
70
+
71
+ ## Packages
72
+
73
+ Everything is published under the [`@aibridge`](https://www.npmjs.com/org/aibridge) scope: [`@aibridge/cli`](https://www.npmjs.com/package/@aibridge/cli) (the command), `@aibridge/proc` (spawn/capture), and one driver per backing CLI — `@aibridge/driver-agy`, `@aibridge/driver-grok`, `@aibridge/driver-codex`, `@aibridge/driver-claude` — reusable if you want to drive a single CLI from your own code.
74
+
75
+ ## Contributing & development
76
+
77
+ Dev docs, architecture, and the working agreements for coding agents live in [`AGENTS.md`](AGENTS.md); design history in [`docs/`](docs/). Quick loop:
78
+
79
+ ```bash
80
+ pnpm install
81
+ pnpm check && pnpm typecheck && pnpm test
82
+ node packages/cli/src/cli.ts --help
83
+ ```
84
+
85
+ ## License
86
+
87
+ [MIT](LICENSE) © Jason Yu
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { r as runCli, t as buildContext } from "./context-BgY0Re1f.mjs";
2
+ import { r as runCli, t as buildContext } from "./context-8JjDzZBG.mjs";
3
3
  //#region src/cli.ts
4
4
  await runCli(buildContext(process), process.argv.slice(2));
5
5
  //#endregion
@@ -23,7 +23,7 @@ const MODELS = {
23
23
  "medium",
24
24
  "high"
25
25
  ],
26
- brief: "xAI Grok 4.5 via grok CLI — default for plan & review; off-budget"
26
+ brief: "xAI Grok 4.5 via grok CLI — default for plan & review; own xAI login"
27
27
  },
28
28
  "google-antigravity/gemini-3.6-flash": {
29
29
  slug: "google-antigravity/gemini-3.6-flash",
@@ -35,28 +35,28 @@ const MODELS = {
35
35
  "high"
36
36
  ],
37
37
  defaultEffort: "high",
38
- brief: "Google Gemini 3.6 Flash via agy — default for implement; off-budget"
38
+ brief: "Google Gemini 3.6 Flash via agy — default for implement; own Antigravity login"
39
39
  },
40
40
  "google-antigravity/claude-sonnet-4-6": {
41
41
  slug: "google-antigravity/claude-sonnet-4-6",
42
42
  backend: "agy",
43
43
  backendModel: "claude-sonnet-4-6",
44
44
  efforts: null,
45
- brief: "Claude Sonnet 4.6 (thinking) via agy — off-budget"
45
+ brief: "Claude Sonnet 4.6 (thinking) via agy — own Antigravity login"
46
46
  },
47
47
  "google-antigravity/claude-opus-4-6-thinking": {
48
48
  slug: "google-antigravity/claude-opus-4-6-thinking",
49
49
  backend: "agy",
50
50
  backendModel: "claude-opus-4-6-thinking",
51
51
  efforts: null,
52
- brief: "Claude Opus 4.6 (thinking) via agy — off-budget heavyweight"
52
+ brief: "Claude Opus 4.6 (thinking) via agy — own Antigravity login; heavyweight"
53
53
  },
54
54
  "google-antigravity/gpt-oss-120b-medium": {
55
55
  slug: "google-antigravity/gpt-oss-120b-medium",
56
56
  backend: "agy",
57
57
  backendModel: "gpt-oss-120b-medium",
58
58
  efforts: null,
59
- brief: "GPT-OSS 120B (medium) via agy — off-budget"
59
+ brief: "GPT-OSS 120B (medium) via agy — own Antigravity login"
60
60
  },
61
61
  "openai-codex/gpt-5.6-sol": {
62
62
  slug: "openai-codex/gpt-5.6-sol",
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { C as listModelHelpLines, S as formatUnknownModelError, T as supportsImageGen, _ as DEFAULT_IMPLEMENTER, a as readRunLogs, b as backendModelId, c as evaluateCodexPreflight, d as renderPreflightRefusal, f as delegate, g as DEFAULT_IMAGE_GEN, h as positiveIntSeconds, i as listRuns, l as preflightCodex, m as nonEmptyPrompt, n as app, o as startRun, p as getDriver, r as runCli, s as evaluateAgyPreflight, t as buildContext, u as preflightModel, v as DEFAULT_MODEL, w as resolveModel, x as formatImageGenModelError, y as MODELS } from "./context-BgY0Re1f.mjs";
1
+ import { C as listModelHelpLines, S as formatUnknownModelError, T as supportsImageGen, _ as DEFAULT_IMPLEMENTER, a as readRunLogs, b as backendModelId, c as evaluateCodexPreflight, d as renderPreflightRefusal, f as delegate, g as DEFAULT_IMAGE_GEN, h as positiveIntSeconds, i as listRuns, l as preflightCodex, m as nonEmptyPrompt, n as app, o as startRun, p as getDriver, r as runCli, s as evaluateAgyPreflight, t as buildContext, u as preflightModel, v as DEFAULT_MODEL, w as resolveModel, x as formatImageGenModelError, y as MODELS } from "./context-8JjDzZBG.mjs";
2
2
  export { DEFAULT_IMAGE_GEN, DEFAULT_IMPLEMENTER, DEFAULT_MODEL, MODELS, app, backendModelId, buildContext, delegate, evaluateAgyPreflight, evaluateCodexPreflight, formatImageGenModelError, formatUnknownModelError, getDriver, listModelHelpLines, listRuns, nonEmptyPrompt, positiveIntSeconds, preflightCodex, preflightModel, readRunLogs, renderPreflightRefusal, resolveModel, runCli, startRun, supportsImageGen };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aibridge/cli",
3
- "version": "0.0.2",
4
- "description": "CLI that bridges tasks to non-Claude AI CLIs (plan / implement / review / subagent / image-gen)",
3
+ "version": "0.1.1",
4
+ "description": "CLI that bridges tasks to AI CLIs on your machine (plan / implement / review / subagent / image-gen)",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "engines": {
@@ -35,11 +35,11 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@stricli/core": "1.3.0",
38
- "@aibridge/proc": "0.0.2",
39
- "@aibridge/driver-agy": "0.0.2",
40
- "@aibridge/driver-grok": "0.0.2",
41
- "@aibridge/driver-codex": "0.0.2",
42
- "@aibridge/driver-claude": "0.0.2"
38
+ "@aibridge/proc": "0.1.1",
39
+ "@aibridge/driver-agy": "0.1.1",
40
+ "@aibridge/driver-grok": "0.1.1",
41
+ "@aibridge/driver-codex": "0.1.1",
42
+ "@aibridge/driver-claude": "0.1.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "tsdown": "0.22.14"
package/src/models.ts CHANGED
@@ -29,7 +29,7 @@ export const MODELS: Record<string, ModelSpec> = {
29
29
  backend: 'grok',
30
30
  backendModel: 'grok-4.5',
31
31
  efforts: ['low', 'medium', 'high'],
32
- brief: 'xAI Grok 4.5 via grok CLI — default for plan & review; off-budget',
32
+ brief: 'xAI Grok 4.5 via grok CLI — default for plan & review; own xAI login',
33
33
  },
34
34
  'google-antigravity/gemini-3.6-flash': {
35
35
  slug: 'google-antigravity/gemini-3.6-flash',
@@ -37,28 +37,28 @@ export const MODELS: Record<string, ModelSpec> = {
37
37
  backendModel: 'gemini-3.6-flash',
38
38
  efforts: ['low', 'medium', 'high'],
39
39
  defaultEffort: 'high',
40
- brief: 'Google Gemini 3.6 Flash via agy — default for implement; off-budget',
40
+ brief: 'Google Gemini 3.6 Flash via agy — default for implement; own Antigravity login',
41
41
  },
42
42
  'google-antigravity/claude-sonnet-4-6': {
43
43
  slug: 'google-antigravity/claude-sonnet-4-6',
44
44
  backend: 'agy',
45
45
  backendModel: 'claude-sonnet-4-6',
46
46
  efforts: null,
47
- brief: 'Claude Sonnet 4.6 (thinking) via agy — off-budget',
47
+ brief: 'Claude Sonnet 4.6 (thinking) via agy — own Antigravity login',
48
48
  },
49
49
  'google-antigravity/claude-opus-4-6-thinking': {
50
50
  slug: 'google-antigravity/claude-opus-4-6-thinking',
51
51
  backend: 'agy',
52
52
  backendModel: 'claude-opus-4-6-thinking',
53
53
  efforts: null,
54
- brief: 'Claude Opus 4.6 (thinking) via agy — off-budget heavyweight',
54
+ brief: 'Claude Opus 4.6 (thinking) via agy — own Antigravity login; heavyweight',
55
55
  },
56
56
  'google-antigravity/gpt-oss-120b-medium': {
57
57
  slug: 'google-antigravity/gpt-oss-120b-medium',
58
58
  backend: 'agy',
59
59
  backendModel: 'gpt-oss-120b-medium',
60
60
  efforts: null,
61
- brief: 'GPT-OSS 120B (medium) via agy — off-budget',
61
+ brief: 'GPT-OSS 120B (medium) via agy — own Antigravity login',
62
62
  },
63
63
  'openai-codex/gpt-5.6-sol': {
64
64
  slug: 'openai-codex/gpt-5.6-sol',