@dimi-agent/cli 0.5.2 → 0.5.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/dimi_bridge.node +0 -0
- package/dist/main.mjs +21 -7
- package/package.json +4 -4
|
Binary file
|
package/dist/main.mjs
CHANGED
|
@@ -6,6 +6,9 @@ const __dirname = __cjsShimDirname(__filename);
|
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import * as nodeFs from "node:fs";
|
|
8
8
|
import Vt, { ReadStream, accessSync, appendFileSync, chmodSync, closeSync, constants, copyFileSync, createReadStream, createWriteStream, existsSync, fstatSync, lstatSync, mkdirSync, openSync, promises, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
9
|
+
import * as nodePath from "node:path";
|
|
10
|
+
import path, { basename, dirname, extname, isAbsolute, join, normalize, parse, posix, relative, resolve, sep, win32 } from "node:path";
|
|
11
|
+
import { fileURLToPath, format, pathToFileURL } from "node:url";
|
|
9
12
|
import jn, { access, appendFile, chmod, copyFile, cp, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
|
|
10
13
|
import so from "node:assert";
|
|
11
14
|
import net, { BlockList, isIP } from "node:net";
|
|
@@ -18,10 +21,7 @@ import * as zlib$14 from "node:zlib";
|
|
|
18
21
|
import zlib from "node:zlib";
|
|
19
22
|
import { performance as performance$1 } from "node:perf_hooks";
|
|
20
23
|
import crypto$1, { createHash, createHmac, getRandomValues, randomBytes, randomInt, randomUUID, timingSafeEqual } from "node:crypto";
|
|
21
|
-
import { fileURLToPath, format, pathToFileURL } from "node:url";
|
|
22
24
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
23
|
-
import * as nodePath from "node:path";
|
|
24
|
-
import path, { basename, dirname, extname, isAbsolute, join, normalize, parse, posix, relative, resolve, sep, win32 } from "node:path";
|
|
25
25
|
import { lookup } from "node:dns";
|
|
26
26
|
import Kr, { EventEmitter as EventEmitter$1 } from "events";
|
|
27
27
|
import { Buffer as Buffer$2 } from "buffer";
|
|
@@ -394174,14 +394174,28 @@ var init_main_app = __esmMin((() => {
|
|
|
394174
394174
|
/**
|
|
394175
394175
|
* Dimi process entry point.
|
|
394176
394176
|
*
|
|
394177
|
-
* This file must stay dependency-free (no static imports): ESM
|
|
394178
|
-
* imports resolve and evaluate *before* any top-level code here runs,
|
|
394179
|
-
* the agent-core-v2 OS backend modules read the legacy switch at module
|
|
394177
|
+
* This file must stay dependency-free (no static project imports): ESM
|
|
394178
|
+
* static imports resolve and evaluate *before* any top-level code here runs,
|
|
394179
|
+
* and the agent-core-v2 OS backend modules read the legacy switch at module
|
|
394180
394180
|
* load time. The process-wide `--legacy` flag therefore has to be set from
|
|
394181
394181
|
* argv before anything else loads, then the real entry (`main-app`) is
|
|
394182
|
-
* loaded dynamically.
|
|
394182
|
+
* loaded dynamically. Only node built-ins are imported here.
|
|
394183
394183
|
*/
|
|
394184
394184
|
if (process.argv.includes("--legacy")) process.env["DIMI_LEGACY"] = "1";
|
|
394185
|
+
if (process.env["DIMI_LEGACY"] !== "1" && !nativeBindingAvailable()) {
|
|
394186
|
+
process.env["DIMI_LEGACY"] = "1";
|
|
394187
|
+
process.stderr.write("dimi: native runtime unavailable (dimi_bridge.node not found); falling back to the legacy TypeScript backend. Reinstall or run \"dimi upgrade\" to get the Rust runtime.\n");
|
|
394188
|
+
}
|
|
394185
394189
|
await Promise.resolve().then(() => (init_main_app(), main_app_exports));
|
|
394190
|
+
/** Locate the napi binding without loading it. */
|
|
394191
|
+
function nativeBindingAvailable() {
|
|
394192
|
+
const require = createRequire(import.meta.url);
|
|
394193
|
+
const candidates = [resolve(dirname(fileURLToPath(import.meta.url)), "../dist/dimi_bridge.node")];
|
|
394194
|
+
try {
|
|
394195
|
+
const pkgPath = require.resolve("@dimi-agent/dimi-native/package.json");
|
|
394196
|
+
candidates.push(resolve(dirname(pkgPath), "dist/dimi_bridge.node"));
|
|
394197
|
+
} catch {}
|
|
394198
|
+
return candidates.some((candidate) => existsSync(candidate));
|
|
394199
|
+
}
|
|
394186
394200
|
//#endregion
|
|
394187
394201
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimi-agent/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "The Starting Point for Next-Gen Agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"zod": "^4.3.6",
|
|
62
62
|
"@dimi-agent/agent-core-v2": "^0.1.0",
|
|
63
63
|
"@dimi-agent/dimi-sdk": "^0.2.0",
|
|
64
|
+
"@dimi-agent/dimi-oauth": "^0.1.0",
|
|
64
65
|
"@dimi-agent/dimi-telemetry": "^0.1.0",
|
|
65
66
|
"@dimi-agent/dimi-web": "^0.1.0",
|
|
66
|
-
"@dimi-agent/
|
|
67
|
-
"@dimi-agent/kap-server": "^0.1.0",
|
|
67
|
+
"@dimi-agent/pi-tui": "^0.1.0",
|
|
68
68
|
"@dimi-agent/remote": "^0.1.0",
|
|
69
|
-
"@dimi-agent/
|
|
69
|
+
"@dimi-agent/kap-server": "^0.1.0"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
72
72
|
"@mariozechner/clipboard": "^0.3.9",
|