@xutest1/sdk 0.0.1 → 0.0.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.
- package/dist/gen/client/client.gen.js +0 -1
- package/dist/server.js +13 -12
- package/package.json +18 -17
package/dist/server.js
CHANGED
|
@@ -4,9 +4,8 @@ import { join, dirname } from "node:path";
|
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
// Find the ae3code binary from optionalDependencies
|
|
6
6
|
function findBinary() {
|
|
7
|
-
const platform = process.platform;
|
|
8
|
-
const arch = process.arch;
|
|
9
|
-
// Map to package names
|
|
7
|
+
const platform = process.platform;
|
|
8
|
+
const arch = process.arch;
|
|
10
9
|
const platformMap = {
|
|
11
10
|
'darwin-arm64': '@xutest1/darwin-arm64',
|
|
12
11
|
'darwin-x64': '@xutest1/darwin-x64',
|
|
@@ -17,25 +16,27 @@ function findBinary() {
|
|
|
17
16
|
const key = `${platform}-${arch}`;
|
|
18
17
|
const pkgName = platformMap[key];
|
|
19
18
|
if (!pkgName) {
|
|
20
|
-
|
|
19
|
+
console.warn(`No binary package for platform ${key}, falling back to PATH`);
|
|
20
|
+
return 'ae3code';
|
|
21
21
|
}
|
|
22
22
|
const binaryName = platform === 'win32' ? 'ae3code.exe' : 'ae3code';
|
|
23
|
-
// Try to find
|
|
23
|
+
// Try to find in node_modules relative to this file
|
|
24
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
24
25
|
const possiblePaths = [
|
|
25
|
-
// When installed as dependency
|
|
26
|
-
join(
|
|
27
|
-
//
|
|
26
|
+
// When installed as dependency: node_modules/@xutest1/sdk/dist -> node_modules/@xutest1/darwin-arm64/bin
|
|
27
|
+
join(__dirname, '..', '..', pkgName, 'bin', binaryName),
|
|
28
|
+
// Alternative path
|
|
29
|
+
join(__dirname, '..', '..', '..', pkgName, 'bin', binaryName),
|
|
30
|
+
// From cwd
|
|
28
31
|
join(process.cwd(), 'node_modules', pkgName, 'bin', binaryName),
|
|
29
|
-
// Fallback to global
|
|
30
|
-
binaryName,
|
|
31
32
|
];
|
|
32
33
|
for (const p of possiblePaths) {
|
|
33
34
|
if (existsSync(p)) {
|
|
34
35
|
return p;
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
//
|
|
38
|
-
return
|
|
38
|
+
// Fallback to PATH
|
|
39
|
+
return 'ae3code';
|
|
39
40
|
}
|
|
40
41
|
export async function createOpencodeServer(options) {
|
|
41
42
|
options = Object.assign({
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xutest1/sdk",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"author": "A3Code",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"keywords": ["a3code", "ai", "sdk", "coding", "agent"],
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "A3Code SDK - Build AI agents with agentic coding capabilities",
|
|
8
5
|
"type": "module",
|
|
9
|
-
"main": "
|
|
10
|
-
"types": "
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
11
8
|
"exports": {
|
|
12
9
|
".": {
|
|
13
10
|
"import": "./dist/index.js",
|
|
@@ -15,16 +12,20 @@
|
|
|
15
12
|
}
|
|
16
13
|
},
|
|
17
14
|
"files": ["dist"],
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"@xutest1/darwin-x64": "0.0.1",
|
|
21
|
-
"@xutest1/linux-x64": "0.0.1",
|
|
22
|
-
"@xutest1/linux-arm64": "0.0.1",
|
|
23
|
-
"@xutest1/win32-x64": "0.0.1"
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc"
|
|
24
17
|
},
|
|
25
18
|
"devDependencies": {
|
|
26
|
-
"@
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
"@types/node": "^20.0.0",
|
|
20
|
+
"typescript": "^5.0.0"
|
|
21
|
+
},
|
|
22
|
+
"optionalDependencies": {
|
|
23
|
+
"@xutest1/darwin-arm64": "0.0.3",
|
|
24
|
+
"@xutest1/darwin-x64": "0.0.3",
|
|
25
|
+
"@xutest1/linux-x64": "0.0.3",
|
|
26
|
+
"@xutest1/linux-arm64": "0.0.3",
|
|
27
|
+
"@xutest1/win32-x64": "0.0.3"
|
|
28
|
+
},
|
|
29
|
+
"keywords": ["a3code", "ai", "agent", "coding", "sdk", "vllm"],
|
|
30
|
+
"license": "MIT"
|
|
30
31
|
}
|