@kitelev/exocortex-cli 15.162.0 → 15.164.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/bin/ai-task-runner +39 -0
- package/bin/ai-task-worker +127 -0
- package/dist/index.js +149 -149
- package/package.json +4 -1
- package/scripts/postinstall.cjs +28 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitelev/exocortex-cli",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.164.0",
|
|
4
4
|
"description": "CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,9 +8,12 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
+
"bin",
|
|
12
|
+
"scripts",
|
|
11
13
|
"README.md"
|
|
12
14
|
],
|
|
13
15
|
"scripts": {
|
|
16
|
+
"postinstall": "node ./scripts/postinstall.cjs",
|
|
14
17
|
"build": "npm run build:bundle",
|
|
15
18
|
"build:tsc": "tsc",
|
|
16
19
|
"build:bundle": "node esbuild.config.mjs production",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
// Idempotent postinstall: copies ai-task-{runner,worker} to ~/.exocortex/bin/
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const os = require('os');
|
|
8
|
+
|
|
9
|
+
const BIN_SRC = path.join(__dirname, '..', 'bin');
|
|
10
|
+
const BIN_DST = path.join(os.homedir(), '.exocortex', 'bin');
|
|
11
|
+
|
|
12
|
+
const SCRIPTS = ['ai-task-runner', 'ai-task-worker'];
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
fs.mkdirSync(BIN_DST, { recursive: true });
|
|
16
|
+
for (const name of SCRIPTS) {
|
|
17
|
+
const src = path.join(BIN_SRC, name);
|
|
18
|
+
const dst = path.join(BIN_DST, name);
|
|
19
|
+
if (!fs.existsSync(src)) continue;
|
|
20
|
+
fs.copyFileSync(src, dst);
|
|
21
|
+
fs.chmodSync(dst, 0o755);
|
|
22
|
+
console.log(`[postinstall] installed ${name} → ${dst}`);
|
|
23
|
+
}
|
|
24
|
+
} catch (err) {
|
|
25
|
+
// Non-fatal: CI environments may not have HOME
|
|
26
|
+
console.error(`[postinstall] skipped (${err.message})`);
|
|
27
|
+
process.exit(0);
|
|
28
|
+
}
|