managed-deepagents 0.0.3-dev.17 → 0.0.3-dev.22

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.
Files changed (2) hide show
  1. package/bin/mda.mjs +22 -1
  2. package/package.json +9 -9
package/bin/mda.mjs CHANGED
@@ -5,9 +5,25 @@
5
5
  // (see src/resolve.ts, compiled to dist/resolve.js).
6
6
 
7
7
  import { spawnSync } from "node:child_process";
8
+ import { readFileSync } from "node:fs";
9
+ import { dirname, join } from "node:path";
10
+ import { fileURLToPath } from "node:url";
8
11
 
9
12
  import { resolveBinary } from "../dist/resolve.js";
10
13
 
14
+ // The package version is the runtime version users install from npm. Advertise
15
+ // it to the binary so `mda --version` reports the runtime rather than the CLI
16
+ // crate version (see crates/mda/src/version.rs).
17
+ function runtimeVersion() {
18
+ try {
19
+ const here = dirname(fileURLToPath(import.meta.url));
20
+ const pkg = JSON.parse(readFileSync(join(here, "..", "package.json"), "utf8"));
21
+ return typeof pkg.version === "string" ? pkg.version : undefined;
22
+ } catch {
23
+ return undefined;
24
+ }
25
+ }
26
+
11
27
  function main() {
12
28
  let binary;
13
29
  try {
@@ -17,7 +33,12 @@ function main() {
17
33
  process.exit(1);
18
34
  }
19
35
 
20
- const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
36
+ const version = runtimeVersion();
37
+ const env = version
38
+ ? { ...process.env, MDA_RUNTIME_VERSION: version }
39
+ : process.env;
40
+
41
+ const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit", env });
21
42
 
22
43
  if (result.error) {
23
44
  process.stderr.write(`failed to launch mda: ${result.error.message}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "managed-deepagents",
3
- "version": "0.0.3-dev.17",
3
+ "version": "0.0.3-dev.22",
4
4
  "description": "Managed Deep Agents — the `defineDeepAgent` authoring interface plus the CLI that compiles and deploys a code-first Deep Agent repository to a managed LangGraph runtime.",
5
5
  "keywords": [
6
6
  "langchain",
@@ -50,16 +50,16 @@
50
50
  "deepagents": "^1.10.4"
51
51
  },
52
52
  "optionalDependencies": {
53
- "@langchain/managed-deepagents-darwin-arm64": "0.0.3-dev.17",
54
- "@langchain/managed-deepagents-darwin-x64": "0.0.3-dev.17",
55
- "@langchain/managed-deepagents-linux-arm64": "0.0.3-dev.17",
56
- "@langchain/managed-deepagents-linux-x64": "0.0.3-dev.17",
57
- "@langchain/managed-deepagents-win32-x64": "0.0.3-dev.17",
58
- "@langchain/managed-deepagents-win32-arm64": "0.0.3-dev.17"
53
+ "@langchain/managed-deepagents-darwin-arm64": "0.0.3-dev.22",
54
+ "@langchain/managed-deepagents-darwin-x64": "0.0.3-dev.22",
55
+ "@langchain/managed-deepagents-linux-arm64": "0.0.3-dev.22",
56
+ "@langchain/managed-deepagents-linux-x64": "0.0.3-dev.22",
57
+ "@langchain/managed-deepagents-win32-x64": "0.0.3-dev.22",
58
+ "@langchain/managed-deepagents-win32-arm64": "0.0.3-dev.22"
59
59
  },
60
60
  "devDependencies": {
61
- "@types/node": "^20.0.0",
62
- "typescript": "^5.6.0",
61
+ "@types/node": "^26.0.1",
62
+ "typescript": "^6.0.3",
63
63
  "vitest": "^4.1.9"
64
64
  }
65
65
  }