@mearl/agent-runtime 3.0.0-beta.8 → 3.0.0

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.en.md ADDED
@@ -0,0 +1,11 @@
1
+ # @mearl/agent-runtime
2
+
3
+ [简体中文](README.md) | [English](README.en.md)
4
+
5
+ Local Codex app-server integration, generic Agent Provider contracts, and managed one-shot model execution. Qoder ACP is supplied by the optional [`@mearl/plugin-qoder`](../plugin-qoder/README.en.md).
6
+
7
+ This package provides independently usable local Agent adapters, model calls, and sessions. It depends on daemon-core, browser-core's protocol-only contracts, and public Provider SDKs, without depending on the browser extension, installer, or browser execution host.
8
+
9
+ Model, session, and Skill type contracts are maintained by browser-core and imported through protocol-only subpaths. This package also publicly exports them. Browser UIs and other consumers should reuse the public contracts instead of maintaining duplicate definitions.
10
+
11
+ Each `runCodexModel` call owns an independent Provider process and exposes only the read-only Agent mode declared in its capabilities. The host validates structured results, persists tasks, and terminates process trees. A pure generation mode requires a Provider with reliable tool-free execution support.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @mearl/agent-runtime
2
2
 
3
+ [简体中文](README.md) | [English](README.en.md)
4
+
3
5
  本机 Codex app-server、通用 Agent Provider 合同与受管理的一次性模型执行适配。Qoder ACP 由可选的 [`@mearl/plugin-qoder`](../plugin-qoder/README.md) 提供。
4
6
 
5
7
  此包提供可独立使用的本地 Agent 适配、模型调用和会话能力,依赖 daemon-core、browser-core 的纯协议合同和公开 Provider SDK,不依赖浏览器扩展、安装器或浏览器执行宿主。
@@ -1,2 +1,3 @@
1
1
  export * from './executable-resolver.js';
2
2
  export * from './process-env.js';
3
+ export * from './qoder-executable.js';
package/dist/execution.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './executable-resolver.js';
2
2
  export * from './process-env.js';
3
+ export * from './qoder-executable.js';
@@ -0,0 +1,10 @@
1
+ import fs from 'node:fs';
2
+ interface QoderExecutableCandidateOptions {
3
+ env?: NodeJS.ProcessEnv;
4
+ homedir?: () => string;
5
+ platform?: NodeJS.Platform;
6
+ processExecPath?: string;
7
+ readdirSync?: typeof fs.readdirSync;
8
+ }
9
+ export declare function qoderExecutableCandidatePaths(options?: QoderExecutableCandidateOptions): string[];
10
+ export {};
@@ -0,0 +1,35 @@
1
+ import fs from 'node:fs';
2
+ import os from 'node:os';
3
+ import path from 'node:path';
4
+ import { agentExecutableCandidatePaths } from './executable-resolver.js';
5
+ function qoderManagedExecutableCandidates(home, readdirSync = fs.readdirSync) {
6
+ const directory = path.join(home, '.qoder', 'bin', 'qodercli');
7
+ try {
8
+ return readdirSync(directory, { withFileTypes: true })
9
+ .filter(entry => entry.isFile() && entry.name.startsWith('qodercli-'))
10
+ .sort((left, right) => right.name.localeCompare(left.name, undefined, { numeric: true }))
11
+ .map(entry => path.join(directory, entry.name));
12
+ }
13
+ catch {
14
+ return [];
15
+ }
16
+ }
17
+ export function qoderExecutableCandidatePaths(options = {}) {
18
+ const env = options.env ?? process.env;
19
+ const home = (options.homedir ?? os.homedir)();
20
+ const platform = options.platform ?? process.platform;
21
+ const executableNames = platform === 'win32' ? ['qodercli.exe', 'qodercli.cmd'] : ['qodercli'];
22
+ return agentExecutableCandidatePaths({
23
+ executableNames,
24
+ configuredPath: env.MEARL_QODER_PATH,
25
+ env,
26
+ extraUserCandidates: [
27
+ ...qoderManagedExecutableCandidates(home, options.readdirSync),
28
+ ...executableNames.map(name => path.join(home, '.qoder', 'bin', name)),
29
+ ],
30
+ home,
31
+ platform,
32
+ processExecPath: options.processExecPath,
33
+ readdirSync: options.readdirSync,
34
+ });
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mearl/agent-runtime",
3
- "version": "3.0.0-beta.8",
3
+ "version": "3.0.0",
4
4
  "description": "Shared local agent provider runtimes for Mearl",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,6 +24,7 @@
24
24
  }
25
25
  },
26
26
  "files": [
27
+ "README.en.md",
27
28
  "dist",
28
29
  "!dist/**/*.map"
29
30
  ],
@@ -35,8 +36,8 @@
35
36
  "registry": "https://registry.npmjs.org"
36
37
  },
37
38
  "dependencies": {
38
- "@mearl/daemon-core": "3.0.0-beta.8",
39
- "@mearl/browser-core": "3.0.0-beta.8"
39
+ "@mearl/daemon-core": "3.0.0",
40
+ "@mearl/browser-core": "3.0.0"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@types/node": "^24.9.1",