aos-harness 0.5.1 → 0.5.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@aos-harness/claude-code-adapter",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "AOS Harness adapter for Anthropic's Claude Code CLI.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,8 +16,8 @@
16
16
  "files": ["src/", "README.md"],
17
17
  "publishConfig": { "access": "public" },
18
18
  "dependencies": {
19
- "@aos-harness/runtime": "0.5.1",
20
- "@aos-harness/adapter-shared": "0.5.1"
19
+ "@aos-harness/runtime": "0.5.2",
20
+ "@aos-harness/adapter-shared": "0.5.2"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/bun": "latest",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aos-harness/codex-adapter",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "AOS Harness adapter for OpenAI's Codex CLI.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,8 +16,8 @@
16
16
  "files": ["src/", "README.md"],
17
17
  "publishConfig": { "access": "public" },
18
18
  "dependencies": {
19
- "@aos-harness/runtime": "0.5.1",
20
- "@aos-harness/adapter-shared": "0.5.1"
19
+ "@aos-harness/runtime": "0.5.2",
20
+ "@aos-harness/adapter-shared": "0.5.2"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/bun": "latest",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aos-harness/gemini-adapter",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "AOS Harness adapter for Google's Gemini CLI.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,8 +16,8 @@
16
16
  "files": ["src/", "README.md"],
17
17
  "publishConfig": { "access": "public" },
18
18
  "dependencies": {
19
- "@aos-harness/runtime": "0.5.1",
20
- "@aos-harness/adapter-shared": "0.5.1"
19
+ "@aos-harness/runtime": "0.5.2",
20
+ "@aos-harness/adapter-shared": "0.5.2"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/bun": "latest",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aos-harness/pi-adapter",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "AOS Harness adapter for the Pi coding agent runtime.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,8 +19,8 @@
19
19
  "files": ["src/", "README.md"],
20
20
  "publishConfig": { "access": "public" },
21
21
  "dependencies": {
22
- "@aos-harness/adapter-shared": "0.5.1",
23
- "@aos-harness/runtime": "0.5.1",
22
+ "@aos-harness/adapter-shared": "0.5.2",
23
+ "@aos-harness/runtime": "0.5.2",
24
24
  "js-yaml": "^4.1.0"
25
25
  },
26
26
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aos-harness/adapter-shared",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Shared base classes and utilities for AOS Harness platform adapters.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -19,7 +19,7 @@
19
19
  "files": ["src/", "README.md"],
20
20
  "publishConfig": { "access": "public" },
21
21
  "dependencies": {
22
- "@aos-harness/runtime": "0.5.1",
22
+ "@aos-harness/runtime": "0.5.2",
23
23
  "js-yaml": "^4.1.0"
24
24
  },
25
25
  "devDependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aos-harness",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Agentic Orchestration System — assemble AI agents into deliberation and execution teams",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,8 +36,8 @@
36
36
  "test": "bun run src/index.ts validate"
37
37
  },
38
38
  "dependencies": {
39
- "@aos-harness/adapter-shared": "0.5.1",
40
- "@aos-harness/runtime": "0.5.1",
39
+ "@aos-harness/adapter-shared": "0.5.2",
40
+ "@aos-harness/runtime": "0.5.2",
41
41
  "@modelcontextprotocol/sdk": "^1.29.0",
42
42
  "js-yaml": "^4.1.0"
43
43
  },
@@ -15,7 +15,7 @@
15
15
  import { join, dirname } from "node:path";
16
16
  import { fileURLToPath } from "node:url";
17
17
  import { tmpdir } from "node:os";
18
- import { readFileSync } from "node:fs";
18
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
19
19
  import readline from "node:readline";
20
20
  import {
21
21
  BaseEventBus,
@@ -60,7 +60,52 @@ const ADAPTER_MAP: Record<string, { package: string; className: string }> = {
60
60
  },
61
61
  };
62
62
 
63
- async function loadAdapterRuntime(platform: string): Promise<any> {
63
+ // CLI version read once at module load, used in the 0.6.0 deprecation
64
+ // warning so the suggested install command pins to the matching version.
65
+ function readCliVersion(): string {
66
+ try {
67
+ const here = dirname(fileURLToPath(import.meta.url));
68
+ const raw = readFileSync(join(here, "..", "package.json"), "utf-8");
69
+ return (JSON.parse(raw) as { version: string }).version ?? "unknown";
70
+ } catch {
71
+ return "unknown";
72
+ }
73
+ }
74
+ const CLI_VERSION = readCliVersion();
75
+
76
+ // Session-level dedup for the deprecation warning. If the process uses
77
+ // multiple adapters, we still only warn once per run.
78
+ let deprecationWarnedThisSession = false;
79
+
80
+ function maybeWarnAdapterDeprecation(pkg: string, projectRoot: string): void {
81
+ if (deprecationWarnedThisSession) return;
82
+ const flagPath = join(projectRoot, ".aos", "migration-warned-0.6");
83
+ if (existsSync(flagPath)) return;
84
+ deprecationWarnedThisSession = true;
85
+
86
+ const useColor = !!process.stderr.isTTY;
87
+ const y = useColor ? "\x1b[33m" : "";
88
+ const b = useColor ? "\x1b[1m" : "";
89
+ const r = useColor ? "\x1b[0m" : "";
90
+
91
+ console.error(
92
+ `\n${y}${b}⚠ Deprecation: bundled adapters will be removed in aos-harness@0.6.0.${r}\n` +
93
+ ` This project is using the bundled copy of ${pkg}.\n` +
94
+ ` Install the standalone package to silence this warning and prepare for 0.6.0:\n\n` +
95
+ ` npm i -g ${pkg}@${CLI_VERSION}\n` +
96
+ ` # or in a project: npm i ${pkg}@${CLI_VERSION}\n\n` +
97
+ ` This warning appears once per project. Delete .aos/migration-warned-0.6 to re-enable.\n`,
98
+ );
99
+
100
+ try {
101
+ mkdirSync(dirname(flagPath), { recursive: true });
102
+ writeFileSync(flagPath, new Date().toISOString() + "\n");
103
+ } catch {
104
+ // non-fatal — if we can't write the flag, the warning just repeats next run.
105
+ }
106
+ }
107
+
108
+ async function loadAdapterRuntime(platform: string, projectRoot: string): Promise<any> {
64
109
  const entry = ADAPTER_MAP[platform];
65
110
  if (!entry) throw new Error(`Unknown adapter: ${platform}`);
66
111
 
@@ -87,6 +132,7 @@ async function loadAdapterRuntime(platform: string): Promise<any> {
87
132
  const mod = await import(fallback);
88
133
  const version = await readAdapterVersion(`file://${fallback}`);
89
134
  console.error(`[adapter] loaded ${entry.package}@${version} (bundled: ${fallback})`);
135
+ maybeWarnAdapterDeprecation(entry.package, projectRoot);
90
136
  return mod[entry.className];
91
137
  }
92
138
  }
@@ -104,7 +150,7 @@ export async function runAdapterSession(config: AdapterSessionConfig): Promise<v
104
150
  };
105
151
 
106
152
  log("loading adapter runtime");
107
- const RuntimeClass = await loadAdapterRuntime(config.platform);
153
+ const RuntimeClass = await loadAdapterRuntime(config.platform, config.root);
108
154
 
109
155
  // ── Layer composition ──────────────────────────────────────
110
156
  const eventBus = new BaseEventBus();