@themoltnet/agent-daemon 0.47.0 → 0.49.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/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2808 -36
- package/dist/main.js +13 -0
- package/dist/pi.js +2 -2
- package/package.json +16 -8
package/dist/main.js
CHANGED
|
@@ -89,6 +89,18 @@ initInstrumentation({
|
|
|
89
89
|
pg: false
|
|
90
90
|
});
|
|
91
91
|
//#endregion
|
|
92
|
+
//#region src/lib/supervisor-parent-guard.ts
|
|
93
|
+
/** Exit a supervised run when its serve parent's IPC channel disappears. */
|
|
94
|
+
function installSupervisorParentGuard(proc = process) {
|
|
95
|
+
if (proc.env["MOLTNET_SUPERVISED_RUN"] !== "1" || typeof proc.disconnect !== "function") return false;
|
|
96
|
+
if (proc.connected === false) {
|
|
97
|
+
proc.kill(proc.pid, "SIGTERM");
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
proc.once("disconnect", () => proc.kill(proc.pid, "SIGTERM"));
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
92
104
|
//#region src/runtime-loader.ts
|
|
93
105
|
function extractRuntimeModule(argv) {
|
|
94
106
|
const remaining = [];
|
|
@@ -154,6 +166,7 @@ function isDaemonRuntimeAdapter(value) {
|
|
|
154
166
|
}
|
|
155
167
|
//#endregion
|
|
156
168
|
//#region src/main.ts
|
|
169
|
+
installSupervisorParentGuard();
|
|
157
170
|
async function main() {
|
|
158
171
|
const selection = extractRuntimeModule(process.argv.slice(2));
|
|
159
172
|
return runAgentDaemonCli({
|
package/dist/pi.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Value } from "typebox/value";
|
|
|
7
7
|
import { GONDOLIN_BASE_EXECUTABLES, GONDOLIN_TOOL_NAMES, MOLTNET_TOOL_NAMES, agentSigningCapability, buildPiExecutorManifest, createPiTaskExecutor, defineGondolinTemplate, definePiRuntime } from "@themoltnet/pi-runtime";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
import * as ed from "@noble/ed25519";
|
|
10
|
-
import { createHash as createHash$1, randomBytes } from "crypto";
|
|
10
|
+
import { createHash as createHash$1, randomBytes as randomBytes$1 } from "crypto";
|
|
11
11
|
import "multiformats/codecs/raw";
|
|
12
12
|
import "multiformats/hashes/digest";
|
|
13
13
|
import "@noble/hashes/sha2";
|
|
@@ -134,7 +134,7 @@ var cryptoService = {
|
|
|
134
134
|
return this.verify(signedMessage.message, signedMessage.signature, signedMessage.publicKey);
|
|
135
135
|
},
|
|
136
136
|
generateChallenge() {
|
|
137
|
-
return `moltnet:challenge:${randomBytes(32).toString("hex")}:${Date.now()}`;
|
|
137
|
+
return `moltnet:challenge:${randomBytes$1(32).toString("hex")}:${Date.now()}`;
|
|
138
138
|
},
|
|
139
139
|
async derivePublicKey(privateKeyBase64) {
|
|
140
140
|
const privateKeyBytes = new Uint8Array(Buffer.from(privateKeyBase64, "base64"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/agent-daemon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Universal MoltNet agent daemon host with a built-in Pi/Gondolin runtime and support for trusted operator-owned runtime modules. CLI: moltnet-agent.",
|
|
@@ -50,7 +50,10 @@
|
|
|
50
50
|
"@earendil-works/gondolin": "^0.12.0",
|
|
51
51
|
"@earendil-works/pi-ai": "0.79.4",
|
|
52
52
|
"@earendil-works/pi-coding-agent": "0.79.4",
|
|
53
|
+
"@fastify/cors": "^11.0.0",
|
|
54
|
+
"@fastify/helmet": "^13.0.1",
|
|
53
55
|
"@fastify/otel": "^0.18.0",
|
|
56
|
+
"@fastify/rate-limit": "^10.2.1",
|
|
54
57
|
"@ipld/dag-cbor": "^9.2.5",
|
|
55
58
|
"@noble/ciphers": "^1.2.0",
|
|
56
59
|
"@noble/curves": "^2.0.0",
|
|
@@ -72,31 +75,36 @@
|
|
|
72
75
|
"@opentelemetry/sdk-trace-base": "^2.5.1",
|
|
73
76
|
"@opentelemetry/sdk-trace-node": "^2.5.1",
|
|
74
77
|
"@opentelemetry/semantic-conventions": "^1.39.0",
|
|
78
|
+
"fastify": "^5.8.5",
|
|
75
79
|
"fastify-plugin": "^5.1.0",
|
|
76
80
|
"multiformats": "^13.3.0",
|
|
77
81
|
"pino": "^10.3.1",
|
|
78
82
|
"pino-opentelemetry-transport": "^3.0.0",
|
|
79
83
|
"pino-pretty": "^13.1.3",
|
|
84
|
+
"proper-lockfile": "4.1.2",
|
|
80
85
|
"typebox": "^1.2.8",
|
|
86
|
+
"@themoltnet/agent-runtime": "0.45.2",
|
|
81
87
|
"@themoltnet/os-keyring": "0.3.0",
|
|
82
|
-
"@themoltnet/
|
|
83
|
-
"@themoltnet/
|
|
84
|
-
"@themoltnet/sdk": "0.139.0"
|
|
88
|
+
"@themoltnet/pi-runtime": "0.14.0",
|
|
89
|
+
"@themoltnet/sdk": "0.140.0"
|
|
85
90
|
},
|
|
86
91
|
"devDependencies": {
|
|
92
|
+
"@types/proper-lockfile": "^4.1.4",
|
|
87
93
|
"tsx": "^4.7.0",
|
|
88
94
|
"typescript": "~5.9.2",
|
|
89
95
|
"vite": "^8.0.0",
|
|
90
96
|
"vite-plugin-dts": "^4.5.4",
|
|
91
97
|
"vitest": "^3.0.0",
|
|
98
|
+
"@moltnet/agent-eval": "0.1.0",
|
|
92
99
|
"@moltnet/bootstrap": "0.1.0",
|
|
93
100
|
"@moltnet/crypto-service": "0.1.0",
|
|
94
|
-
"@moltnet/execution-plan": "0.1.0",
|
|
95
101
|
"@moltnet/execution-integrations": "0.1.0",
|
|
96
|
-
"@moltnet/
|
|
97
|
-
"@moltnet/
|
|
102
|
+
"@moltnet/execution-plan": "0.1.0",
|
|
103
|
+
"@moltnet/loopback-companion": "0.1.0",
|
|
98
104
|
"@moltnet/tasks": "0.1.0",
|
|
99
|
-
"@moltnet/
|
|
105
|
+
"@moltnet/models": "0.1.0",
|
|
106
|
+
"@moltnet/runtime-profiles": "0.1.0",
|
|
107
|
+
"@moltnet/observability": "0.1.0"
|
|
100
108
|
},
|
|
101
109
|
"nx": {
|
|
102
110
|
"projectType": "application",
|