@craftsman-apps/ambit 0.0.0-stage → 0.2.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/bin/ambit.js +19 -0
- package/package.json +23 -4
- package/README.md +0 -3
package/bin/ambit.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs the ambit binary from this platform's package, which npm installed through optionalDependencies.
|
|
3
|
+
'use strict';
|
|
4
|
+
const {spawnSync} = require('node:child_process');
|
|
5
|
+
const pkg = '@craftsman-apps/ambit-' + process.platform + '-' + process.arch;
|
|
6
|
+
let bin;
|
|
7
|
+
try {
|
|
8
|
+
bin = require.resolve(pkg + '/bin/ambit' + (process.platform === 'win32' ? '.exe' : ''));
|
|
9
|
+
} catch {
|
|
10
|
+
console.error('✗ no ambit binary for ' + process.platform + ' ' + process.arch + ' — the package ' + pkg + ' is not installed');
|
|
11
|
+
console.error(' next: npm install ' + pkg + ', or see https://ambitproject.dev/docs/quick-start');
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
const r = spawnSync(bin, process.argv.slice(2), {stdio: 'inherit'});
|
|
15
|
+
if (r.error) {
|
|
16
|
+
console.error('✗ cannot run ' + bin + ' — ' + r.error.message);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
process.exit(r.status === null ? 1 : r.status);
|
package/package.json
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@craftsman-apps/ambit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/craftsman-apps/ambit.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://ambitproject.dev",
|
|
10
|
+
"description": "Install, check and validate Ambit, the open-source MCP and LLM gateway. npx @craftsman-apps/ambit local up",
|
|
11
|
+
"bin": {
|
|
12
|
+
"ambit": "bin/ambit.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin"
|
|
16
|
+
],
|
|
17
|
+
"optionalDependencies": {
|
|
18
|
+
"@craftsman-apps/ambit-darwin-x64": "0.2.1",
|
|
19
|
+
"@craftsman-apps/ambit-darwin-arm64": "0.2.1",
|
|
20
|
+
"@craftsman-apps/ambit-linux-x64": "0.2.1",
|
|
21
|
+
"@craftsman-apps/ambit-linux-arm64": "0.2.1",
|
|
22
|
+
"@craftsman-apps/ambit-win32-x64": "0.2.1",
|
|
23
|
+
"@craftsman-apps/ambit-win32-arm64": "0.2.1"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/README.md
DELETED