model-orchestrator 0.1.8 → 0.1.10
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/CHANGELOG.md +34 -0
- package/README.md +22 -0
- package/bin/cli.js +17 -2
- package/package.json +1 -1
- package/templates/advanced/vm/jobs/weekly-audit.sh +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,38 @@ All notable changes to this project are documented here. The format follows [Kee
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.1.10] - 2026-09-07
|
|
8
|
+
|
|
9
|
+
Closes the last two verification items on #11. Both had been described as needing vendor sign-ins or infrastructure that was not available. Both turned out to be doable with what was already here, and doing them found a real defect.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **The generated weekly audit orphaned a temp file on every timeout.** A run killed by the unit's `TimeoutStartSec` dies on SIGKILL, so no trap and no cleanup line of ours can run, and its `reports/.audit-<stamp>-XXXXXX` file was left behind forever. The job now sweeps `.audit-*` older than a day at start. A day is far outside the unit's own 900s deadline, so a temp belonging to a run still in flight can never be swept. Found by actually starting the unit on Ubuntu; the previous text-only assertion could not see it.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `test/fixtures/`: raw output captured from **real vendor CLI runs**, with `manifest.json` recording the vendor version, the exact flags, the exit code, and what each fixture proves. Every other judge test in this repository uses shapes written by hand. The capture earned itself immediately: real codex 0.153.4 emits an `item.completed` whose item is `type:"error"` (a skills-budget warning) *before* `turn.completed`, which no synthetic fixture contained, and real agy returns `"OK\n"` with a trailing newline. `test/fixtures.test.js` runs every judge against them.
|
|
18
|
+
- `test/systemd/run-on-ubuntu.sh` and its README: starts the generated job as a **real systemd user unit** and proves that the timeout kills the whole cgroup (a detached grandchild does not survive it), that a failed rerun preserves the previous report, that a malformed gateway key exits 2 before anything is written, and that the new sweep removes an aged orphan while leaving a fresh one alone. 11/11 on Ubuntu 24.04.4 LTS, systemd 255. Not part of `npm test`, which has no systemd to run against.
|
|
19
|
+
|
|
20
|
+
### Notes
|
|
21
|
+
|
|
22
|
+
- `test/fixtures/README.md` states its own gaps rather than hiding them: qwen's success shape is still synthetic because its key was not present in the capture environment, and `claude` and `ollama` have no judge, so no fixture.
|
|
23
|
+
|
|
24
|
+
## [0.1.9] - 2026-09-06
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- `--version` and `-v` on the installer, printing the package version and exiting before anything else is validated, so it answers from a broken or half-configured directory.
|
|
29
|
+
- A "Vendor version compatibility" section in the README, naming the exact vendor CLI version each lane was built against, and saying plainly that the installer checks a binary's presence and never its version. Closes the compatibility-statement item on #11.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- `-h` and `-v` are now parsed. Both were listed in the flag table but unreachable, because parsing required a `--` prefix and rejected every single-dash argument. Strictness is unchanged: `-x` is still `unexpected argument`, `--versionn` still `unknown flag`.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- The live-canary question on #11 is answered by design rather than left open: the canary is `cli-run --doctor --run`, which runs on the user's machine against the user's own sign-ins. A maintainer-credential canary in CI would prove one machine works and bill per run, so it is documented as deliberately absent.
|
|
38
|
+
|
|
7
39
|
## [0.1.8] - 2026-09-06
|
|
8
40
|
|
|
9
41
|
### Added
|
|
@@ -129,6 +161,8 @@ First release.
|
|
|
129
161
|
- Adversarial audit: two Codex rounds plus a two-engine review (Codex, Antigravity); findings and fixes in `docs/audit-brief.md`. After the review: subagents go to the project root (`--project`), snippet paths computed from `--dir`, lane sections rendered from the selection, a primary agent required, level 3 asks for API keys separately from CLIs, images and CLI installs pinned, an activation summary at the end of every install.
|
|
130
162
|
|
|
131
163
|
[Unreleased]: https://github.com/aunysillyme/model-orchestrator/compare/v0.1.7...HEAD
|
|
164
|
+
[0.1.10]: https://github.com/aunysillyme/model-orchestrator/compare/v0.1.9...v0.1.10
|
|
165
|
+
[0.1.9]: https://github.com/aunysillyme/model-orchestrator/compare/v0.1.8...v0.1.9
|
|
132
166
|
[0.1.8]: https://github.com/aunysillyme/model-orchestrator/compare/v0.1.7...v0.1.8
|
|
133
167
|
[0.1.7]: https://github.com/aunysillyme/model-orchestrator/compare/v0.1.6...v0.1.7
|
|
134
168
|
[0.1.6]: https://github.com/aunysillyme/model-orchestrator/compare/v0.1.5...v0.1.6
|
package/README.md
CHANGED
|
@@ -108,6 +108,28 @@ Most of what this package ships is text an agent is asked to follow. Be clear ab
|
|
|
108
108
|
|
|
109
109
|
If you need a property in the third row to be enforced, that is a router, a policy engine or a sandbox, and this package does not claim to be one.
|
|
110
110
|
|
|
111
|
+
### Vendor version compatibility
|
|
112
|
+
|
|
113
|
+
**This package detects that a binary exists. It does not check its version, and a present binary is not a working lane.** `--doctor` reports presence, and with `--run` sends one lane a one-word canary; neither validates that the vendor's flags, output shape or auth still match what the generated files assume.
|
|
114
|
+
|
|
115
|
+
The lane wiring and the output judges were written against these versions, which are the ones this release was exercised on:
|
|
116
|
+
|
|
117
|
+
| Lane | Vendor | Version this release was built against |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| `claude` | Anthropic | 2.1.226 |
|
|
120
|
+
| `codex` | OpenAI | codex-cli 0.153.4 |
|
|
121
|
+
| `agy` | Google | 1.1.27 |
|
|
122
|
+
| `grok` | xAI | 1.0.5 |
|
|
123
|
+
| `hermes` | Nous Research | 0.20.0 |
|
|
124
|
+
| `qwen` | Alibaba | 0.22.3 |
|
|
125
|
+
| `ollama` | local | 0.33.3 |
|
|
126
|
+
|
|
127
|
+
Recorded on 2026-09-06 from the maintainer's own installs, by running each CLI's own version flag. Nothing here is pinned: these CLIs ship breaking flag changes on their own schedules, so a newer version may work perfectly, or may change a flag the generated wiring passes. When a lane starts failing after a vendor upgrade, compare against this table first.
|
|
128
|
+
|
|
129
|
+
**The live canary runs on your machine, with your credentials.** That is what `node bin/cli-run.mjs --doctor --run` is: it sends every enabled lane one tiny prompt through your own sign-ins and reports `canary ok` or `canary FAILED rc=` per lane. Run it after install, and again after any vendor upgrade.
|
|
130
|
+
|
|
131
|
+
It deliberately does not run in this repository's CI. A canary is only meaningful against real credentials, and there are no credentials a maintainer could supply that would tell **you** anything about **your** lanes: your sign-ins, your quota, your vendor versions. A maintainer-credential canary in CI would prove one machine works and bill someone per run to do it. So CI runs the full suite against stub lanes on Ubuntu and macOS, Node 18/20/22, plus a packaged install into a clean consumer, and the live check ships to you instead.
|
|
132
|
+
|
|
111
133
|
## Principles the whole thing rests on
|
|
112
134
|
|
|
113
135
|
1. **Route by capability tier, not model name.** Default down, escalate on evidence.
|
package/bin/cli.js
CHANGED
|
@@ -17,13 +17,18 @@ import { planFiles, writeFiles, resolveSelection, resolveTools, resolveApis, dir
|
|
|
17
17
|
// turn a dry run into a real one.
|
|
18
18
|
const SPEC = {
|
|
19
19
|
level: 'value', ais: 'value', primary: 'value', dir: 'value', project: 'value', tools: 'value', apis: 'value',
|
|
20
|
-
yes: 'bool', force: 'bool', dry: 'bool', 'dry-run': 'bool', 'no-install': 'bool', 'no-tools': 'bool', 'no-apis': 'bool', 'upgrade-runtime': 'bool', 'update-docs': 'bool', list: 'bool', help: 'bool', h: 'bool'
|
|
20
|
+
yes: 'bool', force: 'bool', dry: 'bool', 'dry-run': 'bool', 'no-install': 'bool', 'no-tools': 'bool', 'no-apis': 'bool', 'upgrade-runtime': 'bool', 'update-docs': 'bool', list: 'bool', help: 'bool', h: 'bool', version: 'bool', v: 'bool'
|
|
21
21
|
};
|
|
22
22
|
export function parseArgs(argv) {
|
|
23
23
|
const out = {};
|
|
24
24
|
const errors = [];
|
|
25
25
|
for (let i = 0; i < argv.length; i++) {
|
|
26
|
-
|
|
26
|
+
let a = argv[i];
|
|
27
|
+
// The only single-dash forms, both bool: everything else stays strict, so a
|
|
28
|
+
// typo cannot be silently absorbed as a short flag. `-h`/`-v` were listed in
|
|
29
|
+
// SPEC before 0.1.9 but unreachable, because parsing required a `--` prefix.
|
|
30
|
+
if (a === '-h') a = '--help';
|
|
31
|
+
else if (a === '-v') a = '--version';
|
|
27
32
|
if (!a.startsWith('--')) {
|
|
28
33
|
errors.push(`unexpected argument: ${a}`);
|
|
29
34
|
continue;
|
|
@@ -69,6 +74,14 @@ if (parsed.errors.length) {
|
|
|
69
74
|
const flag = (name) => parsed.out[name] === true;
|
|
70
75
|
const opt = (name) => (typeof parsed.out[name] === 'string' ? parsed.out[name] : null);
|
|
71
76
|
|
|
77
|
+
// Answered before anything else is validated, so `--version` works from a
|
|
78
|
+
// broken or half-configured directory: the one question a user asks when they
|
|
79
|
+
// are about to file a bug must never depend on the rest of the run.
|
|
80
|
+
if (flag('version') || flag('v')) {
|
|
81
|
+
console.log(GENERATOR_VERSION);
|
|
82
|
+
process.exit(0);
|
|
83
|
+
}
|
|
84
|
+
|
|
72
85
|
if (flag('help') || flag('h')) {
|
|
73
86
|
console.log(`model-orchestrator: set up a model orchestrator for the AIs you actually have.
|
|
74
87
|
|
|
@@ -96,6 +109,8 @@ Flags
|
|
|
96
109
|
--dry, --dry-run print the plan, write nothing
|
|
97
110
|
--no-install never offer to run npm installs
|
|
98
111
|
--list print the catalog
|
|
112
|
+
--version, -v print the version and exit
|
|
113
|
+
--help, -h print this and exit
|
|
99
114
|
`);
|
|
100
115
|
process.exit(0);
|
|
101
116
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "model-orchestrator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "A model orchestrator you can npm run: route every task to the cheapest AI that does it well, across one agent, many CLIs, or a whole virtual machine. Three levels, one installer that asks what you have access to.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,14 @@ RUNNER_SECS="${RUNNER_SECS:-600}" # the model call; TimeoutStartSec in the uni
|
|
|
18
18
|
cd "$INSTALL_DIR" || { echo "weekly-audit: $INSTALL_DIR missing" >&2; exit 2; }
|
|
19
19
|
mkdir -p reports
|
|
20
20
|
|
|
21
|
+
# Sweep temp files a previous run could not clean up. A run killed by the unit's
|
|
22
|
+
# TimeoutStartSec dies on SIGKILL, so no trap and no cleanup line of ours can
|
|
23
|
+
# run, and its `.audit-<stamp>-XXXXXX` file is orphaned in reports/ forever.
|
|
24
|
+
# Measured on Ubuntu 24.04 / systemd 255, 2026-09-07: one orphan per timeout.
|
|
25
|
+
# Anything older than a day cannot belong to a live run (the unit's own deadline
|
|
26
|
+
# is 900s), so removing it is safe even if another run is in flight.
|
|
27
|
+
find reports -maxdepth 1 -name '.audit-*' -type f -mtime +0 -delete 2>/dev/null || true
|
|
28
|
+
|
|
21
29
|
# bounded SECS cmd... : run cmd, and after SECS kill it AND every descendant
|
|
22
30
|
# (a probe that forks, or a stub that ignores its own flags, must not hold a
|
|
23
31
|
# pipe open). Process groups do not help here: bash disables job control inside
|