aos-harness 0.7.0 → 0.7.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 +1 -1
- package/package.json +3 -3
- package/src/commands/init.ts +1 -1
- package/src/commands/run.ts +1 -1
- package/src/index.ts +11 -1
- package/src/utils.ts +19 -2
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Pick the AI CLI you'll drive agents with and install the matching adapter. You c
|
|
|
25
25
|
npm i -g @aos-harness/claude-code-adapter # Anthropic's Claude Code
|
|
26
26
|
npm i -g @aos-harness/gemini-adapter # Google's Gemini CLI
|
|
27
27
|
npm i -g @aos-harness/codex-adapter # OpenAI's Codex CLI
|
|
28
|
-
npm i -g @aos-harness/pi-adapter # Pi (pi
|
|
28
|
+
npm i -g @aos-harness/pi-adapter # Pi (https://pi.dev)
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
### 3. Initialize and run
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aos-harness",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Agentic Orchestration System — assemble AI agents into deliberation and execution teams",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": { "access": "public" },
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"test": "bun run src/index.ts validate"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@aos-harness/adapter-shared": "0.7.
|
|
40
|
-
"@aos-harness/runtime": "0.7.
|
|
39
|
+
"@aos-harness/adapter-shared": "0.7.1",
|
|
40
|
+
"@aos-harness/runtime": "0.7.1",
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
42
42
|
"js-yaml": "^4.1.0"
|
|
43
43
|
},
|
package/src/commands/init.ts
CHANGED
|
@@ -175,7 +175,7 @@ ${c.bold("Customization")}
|
|
|
175
175
|
Claude Code: ${c.cyan(`npm i -g @aos-harness/claude-code-adapter@${v}`)}
|
|
176
176
|
Gemini CLI: ${c.cyan(`npm i -g @aos-harness/gemini-adapter@${v}`)}
|
|
177
177
|
Codex CLI: ${c.cyan(`npm i -g @aos-harness/codex-adapter@${v}`)}
|
|
178
|
-
Pi (pi
|
|
178
|
+
Pi (pi.dev): ${c.cyan(`npm i -g @aos-harness/pi-adapter@${v}`)}
|
|
179
179
|
|
|
180
180
|
${c.dim("Pick one (or more). Then run `aos run`.")}
|
|
181
181
|
`);
|
package/src/commands/run.ts
CHANGED
|
@@ -390,7 +390,7 @@ ${c.bold(`AOS ${sessionType} Session`)}
|
|
|
390
390
|
const adapterEntry = resolvedAdapterDir ? join(resolvedAdapterDir, "src", "index.ts") : null;
|
|
391
391
|
if (!adapterEntry || !existsSync(adapterEntry)) {
|
|
392
392
|
console.error(c.red(`Pi adapter not found.`));
|
|
393
|
-
console.error(c.yellow("Make sure Pi CLI is installed: https://github.com/pi-
|
|
393
|
+
console.error(c.yellow("Make sure Pi CLI is installed: https://pi.dev (source: https://github.com/badlogic/pi-mono)"));
|
|
394
394
|
console.error(c.dim("Install the adapter package:"));
|
|
395
395
|
console.error(c.dim(" npm i -g @aos-harness/pi-adapter"));
|
|
396
396
|
console.error(c.dim(" # or in a project: npm i @aos-harness/pi-adapter"));
|
package/src/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { validateCommand } from "./commands/validate";
|
|
|
17
17
|
import { listCommand } from "./commands/list";
|
|
18
18
|
import { replayCommand } from "./commands/replay";
|
|
19
19
|
import { c, parseArgs } from "./colors";
|
|
20
|
+
import { getCliVersion } from "./utils";
|
|
20
21
|
|
|
21
22
|
// ── Help ────────────────────────────────────────────────────────
|
|
22
23
|
|
|
@@ -62,6 +63,15 @@ ${c.bold("EXAMPLES")}
|
|
|
62
63
|
async function main(): Promise<void> {
|
|
63
64
|
const parsed = parseArgs(process.argv);
|
|
64
65
|
|
|
66
|
+
// --version / --v / -v all print the version read from package.json
|
|
67
|
+
if (
|
|
68
|
+
(parsed.flags.version || parsed.flags.v || parsed.flags.V) &&
|
|
69
|
+
!parsed.command
|
|
70
|
+
) {
|
|
71
|
+
console.log(`${c.bold("AOS Harness")} v${getCliVersion()}`);
|
|
72
|
+
process.exit(0);
|
|
73
|
+
}
|
|
74
|
+
|
|
65
75
|
if (parsed.flags.help && !parsed.command) {
|
|
66
76
|
printHelp();
|
|
67
77
|
process.exit(0);
|
|
@@ -90,7 +100,7 @@ async function main(): Promise<void> {
|
|
|
90
100
|
const { detectProject } = await import("./utils");
|
|
91
101
|
const projectDir = detectProject(process.cwd());
|
|
92
102
|
if (!projectDir) {
|
|
93
|
-
console.log(`\n${c.bold("AOS Harness")} ${c.dim(
|
|
103
|
+
console.log(`\n${c.bold("AOS Harness")} ${c.dim(`v${getCliVersion()}`)}\n`);
|
|
94
104
|
console.log(` No AOS project detected in this directory.`);
|
|
95
105
|
console.log(` Would you like to initialize one? ${c.dim("(Y/n)")}\n`);
|
|
96
106
|
process.stdout.write(" > ");
|
package/src/utils.ts
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Shared utilities for CLI commands.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { join, normalize, resolve, sep } from "node:path";
|
|
6
|
-
import { existsSync, readdirSync } from "node:fs";
|
|
5
|
+
import { join, normalize, resolve, sep, dirname } from "node:path";
|
|
6
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -190,6 +191,22 @@ export function getPackageCoreDir(): string | null {
|
|
|
190
191
|
return null;
|
|
191
192
|
}
|
|
192
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Read the CLI's own version from package.json at runtime. Works both in the
|
|
196
|
+
* monorepo (where import.meta.url → cli/src/utils.ts) and after npm install
|
|
197
|
+
* (where it → node_modules/aos-harness/src/utils.ts). In both cases `..`
|
|
198
|
+
* lands on the package root containing package.json.
|
|
199
|
+
*/
|
|
200
|
+
export function getCliVersion(): string {
|
|
201
|
+
try {
|
|
202
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
203
|
+
const raw = readFileSync(join(here, "..", "package.json"), "utf-8");
|
|
204
|
+
return (JSON.parse(raw) as { version: string }).version ?? "unknown";
|
|
205
|
+
} catch {
|
|
206
|
+
return "unknown";
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
193
210
|
/**
|
|
194
211
|
* Adapters the CLI is permitted to load. Security boundary, not a convenience
|
|
195
212
|
* list: expanding it requires a CLI release because every entry has been
|