managed-deepagents 0.0.3-dev.18 → 0.0.3-dev.23
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/README.md +2 -5
- package/bin/mda.mjs +22 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -50,19 +50,16 @@ Create an `agent.ts` that exports a named `agent` definition:
|
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
52
|
import { defineDeepAgent } from "managed-deepagents";
|
|
53
|
-
import instructions from "./instructions.md" with { type: "text" };
|
|
54
53
|
import { queryDB } from "./tools/query-db";
|
|
55
54
|
|
|
55
|
+
// The system prompt comes from instructions.md next to this file.
|
|
56
56
|
export const agent = defineDeepAgent({
|
|
57
57
|
model: "openai:gpt-5.5",
|
|
58
|
-
systemPrompt: instructions,
|
|
59
58
|
tools: [queryDB],
|
|
60
59
|
});
|
|
61
60
|
```
|
|
62
61
|
|
|
63
|
-
`defineDeepAgent` accepts the `createDeepAgent` configuration surface minus the
|
|
64
|
-
managed keys: `backend`, `store`, and `checkpointer`. Those are provided by the
|
|
65
|
-
managed runtime when your agent is deployed.
|
|
62
|
+
`defineDeepAgent` accepts the [`createDeepAgent`](https://reference.langchain.com/javascript/deepagents/agent/createDeepAgent) configuration surface minus the managed keys: `backend`, `store`, `checkpointer`, `memory`, `skills`, and `systemPrompt`. Those are provided by the managed runtime when your agent is deployed. Write the system prompt in `instructions.md` next to `agent.ts`; the CLI embeds it at deploy time.
|
|
66
63
|
|
|
67
64
|
## Project Shape
|
|
68
65
|
|
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
|
|
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.
|
|
3
|
+
"version": "0.0.3-dev.23",
|
|
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.
|
|
54
|
-
"@langchain/managed-deepagents-darwin-x64": "0.0.3-dev.
|
|
55
|
-
"@langchain/managed-deepagents-linux-arm64": "0.0.3-dev.
|
|
56
|
-
"@langchain/managed-deepagents-linux-x64": "0.0.3-dev.
|
|
57
|
-
"@langchain/managed-deepagents-win32-x64": "0.0.3-dev.
|
|
58
|
-
"@langchain/managed-deepagents-win32-arm64": "0.0.3-dev.
|
|
53
|
+
"@langchain/managed-deepagents-darwin-arm64": "0.0.3-dev.23",
|
|
54
|
+
"@langchain/managed-deepagents-darwin-x64": "0.0.3-dev.23",
|
|
55
|
+
"@langchain/managed-deepagents-linux-arm64": "0.0.3-dev.23",
|
|
56
|
+
"@langchain/managed-deepagents-linux-x64": "0.0.3-dev.23",
|
|
57
|
+
"@langchain/managed-deepagents-win32-x64": "0.0.3-dev.23",
|
|
58
|
+
"@langchain/managed-deepagents-win32-arm64": "0.0.3-dev.23"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@types/node": "^
|
|
62
|
-
"typescript": "^
|
|
61
|
+
"@types/node": "^26.0.1",
|
|
62
|
+
"typescript": "^6.0.3",
|
|
63
63
|
"vitest": "^4.1.9"
|
|
64
64
|
}
|
|
65
65
|
}
|