@jaxonshaw/multi-model-kit 0.1.1 → 0.1.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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "multi-model-kit",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Route work across coding models and keep task handoffs recoverable."
5
5
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-model-kit",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Route work across coding models and keep task handoffs recoverable.",
5
5
  "skills": "./skills/"
6
6
  }
package/INSTALL-AGENT.md CHANGED
@@ -7,7 +7,7 @@ same arguments work with `multi-model-kit` after a global npm install. Python 3.
7
7
 
8
8
  1. Run the installer with `--plan --json`. The plan reads local files and CLI
9
9
  availability, then prints the selected host, actions, conflicts, routing and
10
- fallback suggestions, takeover setting, and digest. It writes no files and
10
+ fallback suggestions, effective settings, and digest. It writes no files and
11
11
  contacts no provider or daemon. npm itself may have to fetch the package
12
12
  before it can run the installer.
13
13
  2. Show the user the plan. Resolve host choices and conflicts, then rerun the
@@ -56,16 +56,46 @@ earlier global links and rule blocks after a manual native plugin install.
56
56
  words to automatic cross-provider takeover. Include it separately in both
57
57
  plan and apply. General install approval is insufficient. The default is
58
58
  off and a repeat install keeps the existing setting. Enabling this switch
59
- acts as standing consent in the plain terminal (`claude-org`), whereas Paseo
60
- and T3 Code still require explicit user consent for the current unit at
61
- runtime. When `takeover.setting` is `"on"`, the plan lists any non-target
62
- provider host lacking all three installed skills in `takeover.missingHosts`
63
- (`[]` when `"off"`).
59
+ grants standing consent in Paseo and the plain terminal (`claude-org`). T3
60
+ Code still requires explicit consent for each unit. When `takeover.setting`
61
+ is `"on"`, the plan lists any non-target provider host lacking all three
62
+ installed skills in `takeover.missingHosts` (`[]` when `"off"`).
64
63
  - Paseo can optionally install the bundled quota plugin with `--quota-plugin`
65
64
  and capture agy quota with `--agy-snapshot`. Show the settings change and
66
65
  get approval before adding `--agy-snapshot` to plan and apply. ZeroSub is a
67
66
  separate, optional plugin for Claude accounts and Claude↔GPT forks. See
68
67
  [ZeroSub’s installation guide](https://github.com/kapybara-org/zerosub).
68
+ - Use `--zerosub absent|fork-off|fork-on` in both plan and apply to record
69
+ whether ZeroSub is absent or its automatic fork is off or on. The plan shows
70
+ the recorded value under `settings.zerosub`. Omit the option if unsure or
71
+ to keep an existing answer.
72
+ - Pass `--fork-plugin` with `--host paseo` or `--host all` in both plan and
73
+ apply to install `multi-model-kit-fork`. The wizard defaults to Yes when
74
+ it detects ZeroSub. The plugin requires Paseo 0.18.1+ and was verified
75
+ against ZeroSub 1.35.0 installed as `zerosub`. For matching Codex forks
76
+ with a workspace-root `.handoff.md`, it sets `auto-review` and adds the
77
+ self-claim instructions before the first turn. ZeroSub maps a Claude session
78
+ explicitly set to Bypass Permissions to Codex Full Access, which the plugin
79
+ preserves. With the default Codex provider options, Full Access disables
80
+ command approvals and the filesystem and network sandbox. Make the `task-handoff`
81
+ skill available to Codex by including Codex in the install. To use
82
+ automatic forks, enable them in ZeroSub and pass `--zerosub fork-on`
83
+ to record your choice.
84
+ `--check --host paseo` reports plugin registration, and uninstall removes
85
+ the registration owned by the installer.
86
+ - For unattended Antigravity sessions, an explicit opt-in is
87
+ `--paseo-agy-mode full-access` with `--host paseo` or `--host all`. Pass it in
88
+ both plan and apply. It changes future MMK launches and profiles generated
89
+ with `--agent-profiles`. Use `--paseo-agy-mode auto` to restore the default
90
+ and include `--agent-profiles` again to restore existing managed profiles.
91
+ - If the user opts into Paseo agent profiles, pass `--agent-profiles` with
92
+ `--host paseo` or `--host all` in both plan and apply. The interactive wizard
93
+ defaults to No. The plan lists the names generated from `model-route` and
94
+ whether the existing Paseo config will be backed up. Apply replaces the
95
+ `mmk-` profiles, keeps personal profiles in order, and runs `paseo reload`.
96
+ Quick Tasks uses a profile system prompt and requires Paseo 0.18.0 or later.
97
+ Use `--check --host paseo` to see the profile status. An uninstall that
98
+ includes Paseo removes the `mmk-` profiles and reloads the daemon.
69
99
 
70
100
  ## Upgrade or uninstall
71
101
 
package/README.md CHANGED
@@ -16,7 +16,7 @@ English | [简体中文](https://github.com/TheJason1997/multi-model-kit/blob/ma
16
16
  (scrub the story, click any node, search, switch theme)
17
17
  </p>
18
18
 
19
- `multi-model-kit` is a lightweight toolkit of rules, skills, offline CLI scripts, and plugin manifests for coordinating AI coding models across Paseo, T3 Code, [Claude Code](https://claude.com/claude-code), Codex, Gemini CLI, and Antigravity (`agy`). Whether you subscribe to one, two, or all three model providers, it routes tasks to the right model tier, isolates subtask edits in dedicated git worktrees, pairs authors with independent reviewers, and keeps work recoverable across context compaction, rate limits, and machines—with no server or database required.
19
+ `multi-model-kit` is a lightweight toolkit of rules, skills, offline CLI scripts, and plugin manifests for coordinating AI coding models across [Paseo](https://github.com/getpaseo/paseo), [T3 Code](https://github.com/pingdotgg/t3code), [Claude Code](https://claude.com/claude-code), [Codex](https://github.com/openai/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), and [Antigravity](https://antigravity.google) (`agy`). Whether you subscribe to one, two, or all three model providers, it routes tasks to the right model tier, isolates subtask edits in dedicated git worktrees, pairs authors with independent reviewers, and keeps work recoverable across context compaction, rate limits, and machines—with no server or database required.
20
20
 
21
21
  ## What it does
22
22
 
@@ -48,7 +48,7 @@ At runtime, whichever enabled model receives your task acts as the **lead**, own
48
48
 
49
49
  ### Quick install
50
50
 
51
- Core scripts require POSIX `sh` and `python3` (3.8+); the `npx` / `npm` installer and optional `agy` snapshot capture also require Node.js. Make sure `~/.local/bin` is on your `PATH`.
51
+ Core scripts require POSIX `sh` and [`python3`](https://www.python.org) (3.8+); the `npx` / `npm` installer and optional `agy` snapshot capture also require [Node.js](https://nodejs.org). Make sure `~/.local/bin` is on your `PATH`.
52
52
 
53
53
  ```sh
54
54
  # Run the interactive wizard directly via npx:
@@ -82,7 +82,7 @@ Running without flags in an interactive terminal launches a five-step wizard to
82
82
 
83
83
  - **Paseo (preferred channel):** Run the wizard inside Paseo or pass `--host paseo --provider <claude|codex|gemini>`. Paseo dispatches subtasks natively across isolated worktrees and provider sessions without extra dispatch plugins.
84
84
  - **T3 Code:** Pass `--host t3 --provider <claude|codex|gemini>` to install rules, skills, and routing commands for your session provider. T3 Code coordinates subtasks and fallback switches through native worktree delegation and thread configuration.
85
- - **Terminal (Claude Code / Codex / Gemini CLI):** Pass `--host claude`, `--host codex`, `--host gemini`, `--host antigravity`, or `--host terminal`. Claude Code and Codex register native plugins by default (pass `--global` for instruction-file marker blocks and skill symlinks), while Gemini CLI and Antigravity share `~/.gemini/GEMINI.md` and `~/.gemini/skills/` (you can also install only the skills via `npx skills add TheJason1997/multi-model-kit`, or pair plain-terminal cross-model dispatch with Compound Engineering).
85
+ - **Terminal (Claude Code / Codex / Gemini CLI):** Pass `--host claude`, `--host codex`, `--host gemini`, `--host antigravity`, or `--host terminal`. Claude Code and Codex register native plugins by default (pass `--global` for instruction-file marker blocks and skill symlinks), while Gemini CLI and Antigravity share `~/.gemini/GEMINI.md` and `~/.gemini/skills/` (you can also install only the skills via `npx skills add TheJason1997/multi-model-kit` ([skills](https://github.com/vercel-labs/skills)) TheJason1997/multi-model-kit`, or pair plain-terminal cross-model dispatch with [Compound Engineering](https://github.com/EveryInc/compound-engineering-plugin)).
86
86
 
87
87
  ### Optional components
88
88
 
@@ -93,7 +93,7 @@ Running without flags in an interactive terminal launches a five-step wizard to
93
93
 
94
94
  ## Configuration
95
95
 
96
- User settings live at `~/.config/multi-model-kit/config.json` (or `$XDG_CONFIG_HOME/multi-model-kit/config.json`). If you subscribe to all three providers (`claude`, `codex`, `gemini`) and use the default role mappings, no config file is needed—`model-route` falls back to `config/defaults.json` automatically. Create `config.json` via the wizard or by hand to choose `enabled` providers and `fallback` order, override per-role `roles` or provider `models` (`small`, `medium`, `large`), adjust `quota` thresholds (default `85` / `98`), toggle `takeover` (`"on"` / `"off"`), customize `workflow` slots (`brainstorm`, `plan`, `doc-review`, `work`), set `terminalDispatch` (`"ce"` or `"none"`), toggle `autoload`, or configure BYOK `connections`.
96
+ User settings live at `~/.config/multi-model-kit/config.json` (or `$XDG_CONFIG_HOME/multi-model-kit/config.json`). If you subscribe to all three providers (`claude`, `codex`, `gemini`) and use the default role mappings, no config file is needed—`model-route` falls back to `config/defaults.json` automatically. Create `config.json` via the wizard or by hand to choose `enabled` providers and `fallback` order, override per-role `roles` or provider `models` (`small`, `medium`, `large`), adjust `quota` thresholds (default `85` / `98`), toggle `takeover` (`"on"` / `"off"`), customize `workflow` slots (`brainstorm`, `plan`, `doc-review`, `work`), set `terminalDispatch` (`"ce"` or `"none"`), toggle `autoload`, or configure BYOK `connections`. In Paseo, `takeover: "on"` counts as standing consent for every unit (as in the terminal; T3 Code still asks per unit), and `zerosub` (`"absent"` / `"fork-off"` / `"fork-on"`) declares ZeroSub's state; only when ZeroSub is verified absent (`"absent"`) or its own auto-fork is actually off (`"fork-off"`), every configured, usable Claude pool for the task is limited, and the takeover checks pass does the watcher start an `auto-review` GPT lead. With `"fork-on"` and the `multi-model-kit-fork` Paseo plugin enabled, no watcher is started: the plugin prepares the ZeroSub fork to claim the lead from the board. It uses `auto-review` by default and preserves `full-access` when ZeroSub carries it over from a Claude session in Bypass Permissions mode.
97
97
 
98
98
  `model-route` runs completely offline without network calls or file writes. After updating `config.json`, run `model-route --preview` to inspect the resolved primary model and fallback chain for every role at once, or query a single role, workflow setting, or quota snapshot directly:
99
99
 
package/bin/model-route CHANGED
@@ -12,7 +12,8 @@ from urllib.parse import urlsplit
12
12
 
13
13
  TIERS = ("small", "medium", "large")
14
14
  EFFORTS = ("low", "medium", "high")
15
- SETTINGS = ("autoload", "workflow", "terminalDispatch")
15
+ SETTINGS = ("autoload", "workflow", "terminalDispatch", "takeover", "paseoAgyMode")
16
+ ZEROSUB_STATES = ("absent", "fork-off", "fork-on")
16
17
  PASEO_MODES = {"claude": "auto", "codex": "auto-review", "gemini": None}
17
18
 
18
19
 
@@ -100,8 +101,10 @@ def validate(config, defaults):
100
101
  providers = defaults["models"]
101
102
  roles = defaults["roles"]
102
103
  allowed_fields = ("enabled", "fallback", "roles", "models", "roleModels", "smallModels",
103
- "quota", "takeover", "connections", *SETTINGS)
104
+ "quota", "zerosub", "connections", *SETTINGS)
104
105
  for key, value, path in fields(config, allowed_fields):
106
+ if key == "zerosub":
107
+ continue # Unknown or stale attestations must not prevent routing.
105
108
  if key in ("enabled", "fallback"):
106
109
  choices(value, providers, path)
107
110
  require(key != "enabled" or value, path, "must enable at least one provider")
@@ -138,6 +141,8 @@ def validate(config, defaults):
138
141
  require(quota["softPct"] < quota["switchPct"], path, "softPct must be less than switchPct")
139
142
  elif key == "takeover":
140
143
  choice(value, ("on", "off"), path)
144
+ elif key == "paseoAgyMode":
145
+ choice(value, ("auto", "full-access"), path)
141
146
  elif key == "connections":
142
147
  validate_connections(value, path)
143
148
  elif key == "workflow":
@@ -277,6 +282,8 @@ def main():
277
282
  and args.tier is None,
278
283
  "--settings", "cannot be combined with a role or author options")
279
284
  result = {key: config.get(key, defaults[key]) for key in SETTINGS}
285
+ zerosub = config.get("zerosub")
286
+ result["zerosub"] = zerosub if zerosub in ZEROSUB_STATES else None
280
287
  if result["workflow"]:
281
288
  result["workflow"] = {**defaults["workflow"], **result["workflow"]}
282
289
  else:
package/bin/quota-status CHANGED
@@ -13,7 +13,7 @@ set -u
13
13
 
14
14
  store=$HOME/.claude/plugins/store
15
15
  exec python3 -I - "$store" "${CLAUDE_ORG-}" "$0" "$@" <<'PY'
16
- import argparse, glob, json, os, re, shutil, subprocess, sys, time
16
+ import argparse, glob, hashlib, json, os, re, shutil, subprocess, sys, time
17
17
  from datetime import datetime, timezone
18
18
  from pathlib import Path
19
19
 
@@ -129,23 +129,26 @@ def paseo_reports():
129
129
  if not paseo:
130
130
  return []
131
131
  try:
132
- result = subprocess.run([paseo, 'usage', '--json'], capture_output=True, check=True, timeout=3)
132
+ # A live Antigravity fetch can take 25 seconds before falling back to its snapshot.
133
+ result = subprocess.run([paseo, 'usage', '--json'], capture_output=True, check=True, timeout=30)
133
134
  reports = json.loads(result.stdout)
134
135
  except (OSError, ValueError, subprocess.SubprocessError):
135
136
  return None
136
137
  return reports if isinstance(reports, list) else None
137
138
 
138
139
  def paseo_rows(reports):
139
- if reports is None:
140
- yield quota_row('paseo', None, None, None, None, None, None)
141
- return
142
140
  for entry in reports:
143
141
  if not isinstance(entry, dict):
144
142
  continue
145
143
  source_id, pool, report = entry.get('sourceId'), entry.get('id'), entry.get('report')
146
144
  if not isinstance(source_id, str) or not isinstance(pool, str) or not isinstance(report, dict):
147
145
  continue
148
- # Paseo's ZeroSub IDs are hashed; org-switch stores independent org aliases.
146
+ # Custom sources may use account identifiers as keys. Keep public local
147
+ # pools and existing SHA-256 keys, and alias other IDs across queries.
148
+ key = pool[len(source_id) + 1:] if pool.startswith(source_id + ':') else pool
149
+ if pool != source_id + ':local' and not re.fullmatch(r'[0-9a-f]{64}', key):
150
+ digest = hashlib.sha256(pool.encode('utf-8', errors='surrogatepass')).hexdigest()
151
+ pool = f'{source_id}:account-{digest[:8]}'
149
152
  usable = report.get('status') == 'available'
150
153
  observed = ts(report.get('observedAt'))
151
154
  if observed is None:
@@ -171,6 +174,10 @@ def agy_rows():
171
174
  yield from external_rows('agy', 'antigravity', pool, matching, observed)
172
175
 
173
176
  reports = paseo_reports()
177
+ paseo = list(paseo_rows(reports or []))
178
+ paseo_failed = reports != [] and not paseo
179
+ if paseo_failed:
180
+ paseo.append(quota_row('paseo', None, None, None, None, None, None))
174
181
  if args.json:
175
182
  rows = []
176
183
  for name in sorted(ledgers.keys() | blocks.keys()):
@@ -182,12 +189,12 @@ if args.json:
182
189
  if name in blocks:
183
190
  rows.append(quota_row('org-switch', 'claude-orgs', name, 'block', None,
184
191
  blocks[name], None, blocked=blocks[name] > now))
185
- rows.extend(paseo_rows(reports))
192
+ rows.extend(paseo)
186
193
  rows.extend(agy_rows())
187
194
  print(json.dumps(rows))
188
195
  sys.exit(0)
189
196
 
190
- if reports is None:
197
+ if paseo_failed:
191
198
  print('Paseo 额度: 未知(查询失败)')
192
199
  if not ledgers:
193
200
  print('读数文件读不出来(空文件或不是 JSON)' if broken else '还没有读数')
@@ -33,6 +33,7 @@
33
33
  "fallback": ["claude", "codex", "gemini"],
34
34
  "quota": {"softPct": 85, "switchPct": 98},
35
35
  "takeover": "off",
36
+ "paseoAgyMode": "auto",
36
37
  "connections": {},
37
38
  "autoload": true,
38
39
  "workflow": {
@@ -0,0 +1,63 @@
1
+ [
2
+ {
3
+ "id": "mmk-implement-design",
4
+ "name": "Implement & Design",
5
+ "notes": "Roles: implement, design. Use for feature code, UI, visual and motion work, reading a codebase, and architecture trade-offs, in an isolated worktree. Not for reviewing Claude-authored changes. If this conflicts with `model-route <role>`, follow model-route."
6
+ },
7
+ {
8
+ "id": "mmk-backend-debug-research",
9
+ "name": "Backend, Debug & Research",
10
+ "notes": "Roles: backend, debug, research. Use for backend and data logic, algorithms, hard bugs, performance, operations triage, and broad research. Not for UI work or long-form writing. If this conflicts with `model-route <role>`, follow model-route."
11
+ },
12
+ {
13
+ "id": "mmk-review-codex",
14
+ "name": "Review (Codex)",
15
+ "notes": "Role: review. Use to independently review diffs authored by Claude or Gemini; read-only, report blocking issues with how they happen. Never use to review Codex-authored changes; use Review (Claude) instead. If this conflicts with `model-route review --author <provider>`, follow model-route."
16
+ },
17
+ {
18
+ "id": "mmk-review-claude",
19
+ "name": "Review (Claude)",
20
+ "notes": "Role: review. Use only to independently review diffs authored by Codex; read-only, report blocking issues with how they happen. For Claude- or Gemini-authored changes use Review (Codex). If this conflicts with `model-route review --author <provider>`, follow model-route."
21
+ },
22
+ {
23
+ "id": "mmk-writing",
24
+ "name": "Writing",
25
+ "notes": "Role: write. Use for documentation, copy, polishing, and ideas. Return the full text; the lead saves it and verifies facts. Cannot call Paseo tools, so never use for dispatch, watching, or takeover. If this conflicts with `model-route write`, follow model-route."
26
+ },
27
+ {
28
+ "id": "mmk-quick-tasks",
29
+ "name": "Quick Tasks",
30
+ "notes": "Roles: fetch, search, triage, format, receipt, test, visual. Use for batch lookups, reading known pages, first-pass triage, formatting, running existing tests, and visual checks. Receipts must list sources, read scope, and anything not retrieved; the lead spot-checks. Not for design decisions or multi-file changes. If this conflicts with `model-route <role>`, follow model-route.",
31
+ "systemPrompt": "Keep reports short. Always state exact sources or file paths with line ranges, what you actually read, commands you ran, and anything you could not retrieve."
32
+ },
33
+ {
34
+ "id": "mmk-long-form-writing",
35
+ "name": "Long-form Writing",
36
+ "notes": "Role: write-long. Use for long documents such as READMEs, guides, and full rewrites. Return the full text; the lead verifies facts. Cannot call Paseo tools. If this conflicts with `model-route write-long`, follow model-route."
37
+ },
38
+ {
39
+ "id": "mmk-locate-mechanical",
40
+ "name": "Locate & Mechanical",
41
+ "notes": "Roles: locate, mechanical. Use to find code by file and line, and for cross-file mechanical edits that follow an explicit rule; re-run tests after edits. Not for open-ended design or root-cause debugging. If this conflicts with `model-route <role>`, follow model-route."
42
+ },
43
+ {
44
+ "id": "mmk-translation",
45
+ "name": "Translation",
46
+ "notes": "Role: translate. Use for translating existing text while keeping facts, code, and links unchanged. Cannot call Paseo tools. If this conflicts with `model-route translate`, follow model-route."
47
+ },
48
+ {
49
+ "id": "mmk-lead-claude",
50
+ "name": "Lead · Claude",
51
+ "notes": "Top-level lead session, selected manually by the user only. Never dispatch subtasks or reviews to this profile."
52
+ },
53
+ {
54
+ "id": "mmk-lead-codex",
55
+ "name": "Lead · Codex",
56
+ "notes": "Top-level lead session, selected manually by the user only. Never dispatch subtasks or reviews to this profile."
57
+ },
58
+ {
59
+ "id": "mmk-lead-gemini",
60
+ "name": "Lead · Gemini",
61
+ "notes": "Top-level lead session, selected manually by the user only. Never dispatch subtasks or reviews to this profile."
62
+ }
63
+ ]