@themoltnet/agent-daemon 0.43.0 → 0.44.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/README.md +10 -0
- package/dist/cli.js +117 -28
- package/dist/pi.d.ts.map +1 -1
- package/dist/pi.js +3 -2
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -128,6 +128,16 @@ hostname pattern, and port (HTTPS/443 by default). See
|
|
|
128
128
|
This does not provide diary or Git commit signing; private-key operations remain
|
|
129
129
|
host capabilities.
|
|
130
130
|
|
|
131
|
+
Host capabilities replace the last reason for `guest-config`: the stock runtime
|
|
132
|
+
declares `agent-signing`, so `git commit -S` and `moltnet entry create-signed`
|
|
133
|
+
work inside the guest while the seed stays on the host (the daemon injects a
|
|
134
|
+
signer bound to the authenticated identity and projects a non-secret gitconfig,
|
|
135
|
+
an `SSH_AUTH_SOCK` service, and `MOLTNET_SIGNER_URL`). Grant
|
|
136
|
+
`capability:agent-signing` (or per-operation `capability:agent-signing:<op>`)
|
|
137
|
+
in the tool policy. `--git-author "Name <email>"` / `MOLTNET_GIT_AUTHOR`
|
|
138
|
+
overrides the projected git identity. See
|
|
139
|
+
[Host capabilities](../../docs/operate/running-agents.md#host-capabilities).
|
|
140
|
+
|
|
131
141
|
`sync-sessions` does not prepare or attest executors, so it remains independent
|
|
132
142
|
of `MOLTNET_PRIVATE_KEY`.
|
|
133
143
|
|
package/dist/cli.js
CHANGED
|
@@ -8,20 +8,20 @@ import "multiformats/hashes/sha2";
|
|
|
8
8
|
import "typebox/value";
|
|
9
9
|
import { dirname, join, resolve } from "node:path";
|
|
10
10
|
import { parseArgs, promisify } from "node:util";
|
|
11
|
-
import { AgentRuntime, ApiTaskReporter, ApiTaskSource, PollingApiTaskSource, resolveProfileWarmSessionTtlSec, resolveRuntimeProfile, resolveRuntimeProfiles, validateRuntimeProfilePrerequisites } from "@themoltnet/agent-runtime";
|
|
11
|
+
import { AgentRuntime, ApiTaskReporter, ApiTaskSource, PollingApiTaskSource, createLocalSeedSigner, resolveAgentIdentity, resolveProfileWarmSessionTtlSec, resolveRuntimeProfile, resolveRuntimeProfiles, validateRuntimeProfilePrerequisites } from "@themoltnet/agent-runtime";
|
|
12
12
|
import { GuestEnvironmentBoundaryError, assertGuestEnvironmentBoundary, createPiRetryTriage, findMainWorktree, isResolvedPathInsideRoot, normalizeRetryTriageResult, redactRetryTriageSecrets } from "@themoltnet/pi-runtime";
|
|
13
13
|
import { execFile, execFileSync } from "node:child_process";
|
|
14
14
|
import { createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, realpathSync, rmSync } from "node:fs";
|
|
15
15
|
import { AuthenticationError, MoltNetError, connect, createExecutorAttestor, readConfig } from "@themoltnet/sdk";
|
|
16
16
|
import { createNodeSecretProviderRegistry } from "@themoltnet/sdk/node";
|
|
17
17
|
import { createHash, randomUUID } from "node:crypto";
|
|
18
|
+
import * as ed from "@noble/ed25519";
|
|
19
|
+
import { createHash as createHash$1, randomBytes } from "crypto";
|
|
18
20
|
import "multiformats/codecs/raw";
|
|
19
21
|
import "multiformats/hashes/digest";
|
|
20
22
|
import "@noble/hashes/sha2";
|
|
21
23
|
import "multiformats/bases/base32";
|
|
22
24
|
import { ed25519 } from "@noble/curves/ed25519.js";
|
|
23
|
-
import * as ed from "@noble/ed25519";
|
|
24
|
-
import { createHash as createHash$1, randomBytes } from "crypto";
|
|
25
25
|
import "@ipld/dag-cbor";
|
|
26
26
|
import "@noble/ciphers/chacha";
|
|
27
27
|
import "@noble/hashes/hkdf";
|
|
@@ -690,12 +690,12 @@ var RUNTIME_PROFILE_CONTEXT_CATALOGUE = {
|
|
|
690
690
|
},
|
|
691
691
|
"accountable-delivery-v1": {
|
|
692
692
|
binding: "prompt_prefix",
|
|
693
|
-
content: "# Accountable delivery\n\n- Pair every commit made during this task with a task-provenance diary entry created by the `moltnet_create_entry` custom tool. Put the returned id in a `MoltNet-Diary: <id>` commit trailer. The tool does not currently promise a content signature; never describe an entry as signed
|
|
693
|
+
content: "# Accountable delivery\n\n- Pair every commit made during this task with a task-provenance diary entry created by the `moltnet_create_entry` custom tool. Put the returned id in a `MoltNet-Diary: <id>` commit trailer. The tool does not currently promise a content signature unless you pass `signed: true` while the runtime kernel declares the `agent-signing` host capability; never describe an entry as signed otherwise.\n- When the runtime kernel declares `agent-signing`, sign commits normally with `git commit -S`: the signature is brokered to the trusted host through `SSH_AUTH_SOCK` and no private key exists in the guest. Without that capability commits are unsigned; do not disable signing the runtime provides, and never try to obtain a key from host configuration.\n- Push a branch and open or update a pull request only when the task asks for it. Use a host-brokered GitHub placeholder only when the runtime kernel declares one; if no GitHub credential is active, the authenticated operation is unavailable.\n- Keep changes, commits, and any requested pull request coherent enough to review independently.",
|
|
694
694
|
slug: "accountable-delivery-v1"
|
|
695
695
|
},
|
|
696
696
|
"judgment-diary-v1": {
|
|
697
697
|
binding: "prompt_prefix",
|
|
698
|
-
content: "# Judgment diary discipline\n\n- For an `assess_brief`, `judge_pack`, or `pr_review` task, create a diary entry with the `moltnet_create_entry` custom tool before submitting the structured judgment. Capture the rationale and evidence that support the verdict. Do not claim a content signature unless the
|
|
698
|
+
content: "# Judgment diary discipline\n\n- For an `assess_brief`, `judge_pack`, or `pr_review` task, create a diary entry with the `moltnet_create_entry` custom tool before submitting the structured judgment. Capture the rationale and evidence that support the verdict. Do not claim a content signature unless you created the entry with `signed: true` under a runtime that declares the `agent-signing` host capability.\n- Add the `judgment` tag and the active task type tag (`assess_brief`, `judge_pack`, or `pr_review`). For `judge_pack`, also add `rubric:<rubricId>` from the task facts.\n- Do not use a shell `moltnet entry` command: task provenance is injected only by the custom tool.",
|
|
699
699
|
slug: "judgment-diary-v1"
|
|
700
700
|
},
|
|
701
701
|
"proactive-memory-v1": {
|
|
@@ -710,7 +710,7 @@ var RUNTIME_PROFILE_CONTEXT_CATALOGUE = {
|
|
|
710
710
|
},
|
|
711
711
|
"task-diary-discipline-v1": {
|
|
712
712
|
binding: "prompt_prefix",
|
|
713
|
-
content: "# Task diary discipline\n\n- During a daemon task, create diary entries only through the `moltnet_create_entry` custom tool. It binds entries to the current task diary and injects task, type, attempt, and correlation provenance tags.\n- Do not shell out to `moltnet entry create`, `moltnet entry create-signed`, or any other `moltnet entry` subcommand from bash while a task is running. Those paths bypass the custom tool's task-tag injection, so task-filtered diary queries cannot find the entry.\n- You may add useful tags, but do not try to replace task provenance supplied by the runtime.",
|
|
713
|
+
content: "# Task diary discipline\n\n- During a daemon task, create diary entries only through the `moltnet_create_entry` custom tool. It binds entries to the current task diary and injects task, type, attempt, and correlation provenance tags.\n- Do not shell out to `moltnet entry create`, `moltnet entry create-signed`, or any other `moltnet entry` subcommand from bash while a task is running. For a content-signed entry pass `signed: true` to the custom tool instead; it signs on the trusted host. Those shell paths bypass the custom tool's task-tag injection, so task-filtered diary queries cannot find the entry.\n- You may add useful tags, but do not try to replace task provenance supplied by the runtime.",
|
|
714
714
|
slug: "task-diary-discipline-v1"
|
|
715
715
|
},
|
|
716
716
|
"verification-and-artifacts-v1": {
|
|
@@ -1132,7 +1132,11 @@ Type.Object({ name: Type.String({
|
|
|
1132
1132
|
maxLength: 255
|
|
1133
1133
|
}) });
|
|
1134
1134
|
Type.Object({
|
|
1135
|
-
role: Type.Optional(Type.Union([
|
|
1135
|
+
role: Type.Optional(Type.Union([
|
|
1136
|
+
Type.Literal("manager"),
|
|
1137
|
+
Type.Literal("executor"),
|
|
1138
|
+
Type.Literal("member")
|
|
1139
|
+
])),
|
|
1136
1140
|
maxUses: Type.Optional(Type.Integer({
|
|
1137
1141
|
minimum: 1,
|
|
1138
1142
|
default: 1
|
|
@@ -1144,10 +1148,15 @@ Type.Object({
|
|
|
1144
1148
|
}))
|
|
1145
1149
|
});
|
|
1146
1150
|
Type.Object({ code: Type.String({ minLength: 1 }) });
|
|
1147
|
-
Type.Object({ role: Type.Union([
|
|
1151
|
+
Type.Object({ role: Type.Union([
|
|
1152
|
+
Type.Literal("manager"),
|
|
1153
|
+
Type.Literal("executor"),
|
|
1154
|
+
Type.Literal("member")
|
|
1155
|
+
]) });
|
|
1148
1156
|
var TeamRoleSchema = Type.Union([
|
|
1149
1157
|
Type.Literal("owner"),
|
|
1150
1158
|
Type.Literal("manager"),
|
|
1159
|
+
Type.Literal("executor"),
|
|
1151
1160
|
Type.Literal("member")
|
|
1152
1161
|
]);
|
|
1153
1162
|
Type.Object({
|
|
@@ -1158,7 +1167,11 @@ var DateTimeUnsafe = Type.Unsafe(Type.String({ format: "date-time" }));
|
|
|
1158
1167
|
Type.Object({
|
|
1159
1168
|
id: UuidSchema,
|
|
1160
1169
|
code: Type.String(),
|
|
1161
|
-
role: Type.Union([
|
|
1170
|
+
role: Type.Union([
|
|
1171
|
+
Type.Literal("manager"),
|
|
1172
|
+
Type.Literal("executor"),
|
|
1173
|
+
Type.Literal("member")
|
|
1174
|
+
]),
|
|
1162
1175
|
maxUses: Type.Integer(),
|
|
1163
1176
|
useCount: Type.Integer(),
|
|
1164
1177
|
expiresAt: DateTimeUnsafe,
|
|
@@ -1190,11 +1203,19 @@ Type.Object({
|
|
|
1190
1203
|
});
|
|
1191
1204
|
Type.Object({
|
|
1192
1205
|
teamId: UuidSchema,
|
|
1193
|
-
role: Type.Union([
|
|
1206
|
+
role: Type.Union([
|
|
1207
|
+
Type.Literal("manager"),
|
|
1208
|
+
Type.Literal("executor"),
|
|
1209
|
+
Type.Literal("member")
|
|
1210
|
+
])
|
|
1194
1211
|
});
|
|
1195
1212
|
Type.Object({
|
|
1196
1213
|
updated: Type.Boolean(),
|
|
1197
|
-
role: Type.Union([
|
|
1214
|
+
role: Type.Union([
|
|
1215
|
+
Type.Literal("manager"),
|
|
1216
|
+
Type.Literal("executor"),
|
|
1217
|
+
Type.Literal("member")
|
|
1218
|
+
])
|
|
1198
1219
|
});
|
|
1199
1220
|
Type.Object({ deleted: Type.Boolean() });
|
|
1200
1221
|
Type.Object({ removed: Type.Boolean() });
|
|
@@ -1204,6 +1225,7 @@ var FoundingMemberSchema = Type.Object({
|
|
|
1204
1225
|
role: Type.Union([
|
|
1205
1226
|
Type.Literal("owner"),
|
|
1206
1227
|
Type.Literal("manager"),
|
|
1228
|
+
Type.Literal("executor"),
|
|
1207
1229
|
Type.Literal("member")
|
|
1208
1230
|
])
|
|
1209
1231
|
});
|
|
@@ -3359,6 +3381,12 @@ var COMMON_OPTIONAL_FLAGS = `\
|
|
|
3359
3381
|
sandbox policy.
|
|
3360
3382
|
--agent-root <path> Directory that owns .moltnet/<agent>. Default:
|
|
3361
3383
|
CWD, with git root fallback when available.
|
|
3384
|
+
--git-author <"Name <email>">
|
|
3385
|
+
Non-secret git identity projected into the
|
|
3386
|
+
guest for host-brokered commit signing. Default:
|
|
3387
|
+
host git config (OAuth2) or
|
|
3388
|
+
<identityId>+<agent>[bot]@users.noreply.github.com.
|
|
3389
|
+
Env: MOLTNET_GIT_AUTHOR.
|
|
3362
3390
|
--guest-credential-mode <mode>
|
|
3363
3391
|
Guest trust boundary: host-authenticated or
|
|
3364
3392
|
guest-config. Defaults to host-authenticated for
|
|
@@ -3714,6 +3742,7 @@ function loadConfig() {
|
|
|
3714
3742
|
piCodingAgentDir: process.env["PI_CODING_AGENT_DIR"] ?? "",
|
|
3715
3743
|
authMode: detectAuthMode(process.env),
|
|
3716
3744
|
signingPrivateKey: process.env["MOLTNET_PRIVATE_KEY"] ?? "",
|
|
3745
|
+
gitAuthor: process.env["MOLTNET_GIT_AUTHOR"] ?? "",
|
|
3717
3746
|
traceIdlePolling: readBoolean("MOLTNET_TRACE_IDLE_POLLING", process.env["MOLTNET_TRACE_IDLE_POLLING"])
|
|
3718
3747
|
};
|
|
3719
3748
|
}
|
|
@@ -3738,6 +3767,30 @@ async function abortActiveAttemptOnSignal(opts) {
|
|
|
3738
3767
|
}
|
|
3739
3768
|
}
|
|
3740
3769
|
//#endregion
|
|
3770
|
+
//#region src/lib/agent-identity.ts
|
|
3771
|
+
/**
|
|
3772
|
+
* Build the non-secret identity projected into guests. Host git config is a
|
|
3773
|
+
* non-secret input and is consulted only on OAuth2 hosts, which already read
|
|
3774
|
+
* that configuration for the signing seed; configless agent-key hosts never
|
|
3775
|
+
* touch a config directory.
|
|
3776
|
+
*/
|
|
3777
|
+
async function resolveDaemonAgentIdentity(input) {
|
|
3778
|
+
let hostGit;
|
|
3779
|
+
if (input.gitAuthor === void 0 && input.authMode === "oauth2") {
|
|
3780
|
+
const config = await readConfig(input.agentDir);
|
|
3781
|
+
hostGit = config?.git ? {
|
|
3782
|
+
name: config.git.name,
|
|
3783
|
+
email: config.git.email
|
|
3784
|
+
} : void 0;
|
|
3785
|
+
}
|
|
3786
|
+
return resolveAgentIdentity({
|
|
3787
|
+
agentName: input.agentName,
|
|
3788
|
+
whoami: input.whoami,
|
|
3789
|
+
gitAuthor: input.gitAuthor,
|
|
3790
|
+
hostGit
|
|
3791
|
+
});
|
|
3792
|
+
}
|
|
3793
|
+
//#endregion
|
|
3741
3794
|
//#region src/lib/correlation.ts
|
|
3742
3795
|
var execFileAsync = promisify(execFile);
|
|
3743
3796
|
var CORRELATION_TRAILER_KEY = "Moltnet-Correlation-Id";
|
|
@@ -4256,6 +4309,19 @@ function recoverScratchWorkspacePath(producer, stateDirs) {
|
|
|
4256
4309
|
const fallback = join(stateDirs.rootDir, "task-workspaces", producer.workspace.workspaceId);
|
|
4257
4310
|
return existsSync(fallback) ? fallback : null;
|
|
4258
4311
|
}
|
|
4312
|
+
//#endregion
|
|
4313
|
+
//#region ../../libs/crypto-service/src/ssh.ts
|
|
4314
|
+
/**
|
|
4315
|
+
* SSH key format conversion for MoltNet Ed25519 keys
|
|
4316
|
+
*
|
|
4317
|
+
* Converts MoltNet agent keys (ed25519:<base64>) to OpenSSH format
|
|
4318
|
+
* for use with git commit signing and SSH authentication.
|
|
4319
|
+
*/
|
|
4320
|
+
if (!ed.etc.sha512Sync) ed.etc.sha512Sync = (...m) => {
|
|
4321
|
+
const hash = createHash$1("sha512");
|
|
4322
|
+
m.forEach((msg) => hash.update(msg));
|
|
4323
|
+
return hash.digest();
|
|
4324
|
+
};
|
|
4259
4325
|
new TextEncoder();
|
|
4260
4326
|
//#endregion
|
|
4261
4327
|
//#region ../../libs/crypto-service/src/crypto.service.ts
|
|
@@ -4408,19 +4474,7 @@ ed.etc.sha512Sync = (...m) => {
|
|
|
4408
4474
|
m.forEach((msg) => hash.update(msg));
|
|
4409
4475
|
return hash.digest();
|
|
4410
4476
|
};
|
|
4411
|
-
|
|
4412
|
-
//#region ../../libs/crypto-service/src/ssh.ts
|
|
4413
|
-
/**
|
|
4414
|
-
* SSH key format conversion for MoltNet Ed25519 keys
|
|
4415
|
-
*
|
|
4416
|
-
* Converts MoltNet agent keys (ed25519:<base64>) to OpenSSH format
|
|
4417
|
-
* for use with git commit signing and SSH authentication.
|
|
4418
|
-
*/
|
|
4419
|
-
if (!ed.etc.sha512Sync) ed.etc.sha512Sync = (...m) => {
|
|
4420
|
-
const hash = createHash$1("sha512");
|
|
4421
|
-
m.forEach((msg) => hash.update(msg));
|
|
4422
|
-
return hash.digest();
|
|
4423
|
-
};
|
|
4477
|
+
new TextEncoder().encode("SSHSIG");
|
|
4424
4478
|
//#endregion
|
|
4425
4479
|
//#region src/lib/executor-attestation.ts
|
|
4426
4480
|
var DAEMON_REQUIRED_SCOPES = AGENT_CREDENTIAL_SCOPES;
|
|
@@ -4942,6 +4996,7 @@ function commonOptionDefs() {
|
|
|
4942
4996
|
},
|
|
4943
4997
|
"agent-root": { type: "string" },
|
|
4944
4998
|
"guest-credential-mode": { type: "string" },
|
|
4999
|
+
"git-author": { type: "string" },
|
|
4945
5000
|
"lease-ttl-sec": { type: "string" },
|
|
4946
5001
|
"heartbeat-interval-ms": { type: "string" },
|
|
4947
5002
|
"max-batch-size": { type: "string" },
|
|
@@ -5652,7 +5707,7 @@ async function runPolling(opts) {
|
|
|
5652
5707
|
if (taskTypes.length === 0) console.error(`[${opts.modeLabel}] --task-types is empty — daemon will accept any registered type. Pass an explicit list to limit scope (e.g. --task-types fulfill_brief).`);
|
|
5653
5708
|
const cfg = loadConfig();
|
|
5654
5709
|
const agentRootDir = resolve(process.cwd(), values["agent-root"] ?? process.cwd());
|
|
5655
|
-
const { ctx, signingPrivateKey, startupWhoami } = await (async () => {
|
|
5710
|
+
const { ctx, signingPrivateKey, startupWhoami, agentIdentity, hostCapabilitySigner } = await (async () => {
|
|
5656
5711
|
let gate = "resolve_agent_context";
|
|
5657
5712
|
try {
|
|
5658
5713
|
const resolvedContext = await resolveAgentContext(baseCommon.agent, {
|
|
@@ -5678,10 +5733,24 @@ async function runPolling(opts) {
|
|
|
5678
5733
|
whoami,
|
|
5679
5734
|
signingPrivateKey: privateKey
|
|
5680
5735
|
});
|
|
5736
|
+
gate = "resolve_agent_identity";
|
|
5737
|
+
const agentIdentity = await resolveDaemonAgentIdentity({
|
|
5738
|
+
agentName: baseCommon.agent,
|
|
5739
|
+
whoami,
|
|
5740
|
+
authMode: cfg.authMode,
|
|
5741
|
+
agentDir: resolvedContext.agentDir,
|
|
5742
|
+
gitAuthor: values["git-author"] ?? (cfg.gitAuthor || void 0)
|
|
5743
|
+
});
|
|
5681
5744
|
return {
|
|
5682
5745
|
ctx: resolvedContext,
|
|
5683
5746
|
signingPrivateKey: privateKey,
|
|
5684
|
-
startupWhoami: whoami
|
|
5747
|
+
startupWhoami: whoami,
|
|
5748
|
+
agentIdentity,
|
|
5749
|
+
hostCapabilitySigner: createLocalSeedSigner({
|
|
5750
|
+
privateKeySeed: privateKey,
|
|
5751
|
+
agent: resolvedContext.agent,
|
|
5752
|
+
identity: agentIdentity
|
|
5753
|
+
})
|
|
5685
5754
|
};
|
|
5686
5755
|
} catch (error) {
|
|
5687
5756
|
await logDaemonStartupFailure({
|
|
@@ -6112,6 +6181,9 @@ async function runPolling(opts) {
|
|
|
6112
6181
|
const rawExecuteTask = selected.preparedRuntime.createTaskExecutor({
|
|
6113
6182
|
agentName: common.agent,
|
|
6114
6183
|
moltnetAgent: ctx.agent,
|
|
6184
|
+
agentIdentity,
|
|
6185
|
+
hostCapabilitySigner,
|
|
6186
|
+
hostCapabilityLogger: taskLogger,
|
|
6115
6187
|
guestCredentialMode: ctx.guestCredentialMode,
|
|
6116
6188
|
agentRootDir: ctx.agentRootDir,
|
|
6117
6189
|
mountPath: sandbox.rootDir,
|
|
@@ -6276,7 +6348,7 @@ async function runOnce(argv, runtimeAdapter = defaultPiDaemonAdapter) {
|
|
|
6276
6348
|
const cfg = loadConfig();
|
|
6277
6349
|
const initialOpts = opts;
|
|
6278
6350
|
const agentRootDir = resolve(process.cwd(), values["agent-root"] ?? process.cwd());
|
|
6279
|
-
const { ctx, signingPrivateKey } = await (async () => {
|
|
6351
|
+
const { ctx, signingPrivateKey, agentIdentity, hostCapabilitySigner } = await (async () => {
|
|
6280
6352
|
let gate = "resolve_agent_context";
|
|
6281
6353
|
try {
|
|
6282
6354
|
const resolvedContext = await resolveAgentContext(initialOpts.agent, {
|
|
@@ -6302,9 +6374,23 @@ async function runOnce(argv, runtimeAdapter = defaultPiDaemonAdapter) {
|
|
|
6302
6374
|
whoami,
|
|
6303
6375
|
signingPrivateKey: privateKey
|
|
6304
6376
|
});
|
|
6377
|
+
gate = "resolve_agent_identity";
|
|
6378
|
+
const agentIdentity = await resolveDaemonAgentIdentity({
|
|
6379
|
+
agentName: initialOpts.agent,
|
|
6380
|
+
whoami,
|
|
6381
|
+
authMode: cfg.authMode,
|
|
6382
|
+
agentDir: resolvedContext.agentDir,
|
|
6383
|
+
gitAuthor: values["git-author"] ?? (cfg.gitAuthor || void 0)
|
|
6384
|
+
});
|
|
6305
6385
|
return {
|
|
6306
6386
|
ctx: resolvedContext,
|
|
6307
|
-
signingPrivateKey: privateKey
|
|
6387
|
+
signingPrivateKey: privateKey,
|
|
6388
|
+
agentIdentity,
|
|
6389
|
+
hostCapabilitySigner: createLocalSeedSigner({
|
|
6390
|
+
privateKeySeed: privateKey,
|
|
6391
|
+
agent: resolvedContext.agent,
|
|
6392
|
+
identity: agentIdentity
|
|
6393
|
+
})
|
|
6308
6394
|
};
|
|
6309
6395
|
} catch (error) {
|
|
6310
6396
|
await logDaemonStartupFailure({
|
|
@@ -6479,6 +6565,9 @@ async function runOnce(argv, runtimeAdapter = defaultPiDaemonAdapter) {
|
|
|
6479
6565
|
const rawExecuteTask = preparedRuntime.createTaskExecutor({
|
|
6480
6566
|
agentName: opts.agent,
|
|
6481
6567
|
moltnetAgent: ctx.agent,
|
|
6568
|
+
agentIdentity,
|
|
6569
|
+
hostCapabilitySigner,
|
|
6570
|
+
hostCapabilityLogger: rootLogger,
|
|
6482
6571
|
guestCredentialMode: ctx.guestCredentialMode,
|
|
6483
6572
|
agentRootDir: ctx.agentRootDir,
|
|
6484
6573
|
mountPath: sandbox.rootDir,
|
package/dist/pi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pi.d.ts","sourceRoot":"","sources":["../src/pi.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"pi.d.ts","sourceRoot":"","sources":["../src/pi.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AAEhF,eAAO,MAAM,oBAAoB,kkBAIvB,CAAC;AAEX,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,mBAAmB,GAC3B,oBAAoB,CA4DtB;AAED,eAAO,MAAM,0BAA0B,qBASrC,CAAC;AAEH,eAAO,MAAM,sBAAsB,sBAElC,CAAC"}
|
package/dist/pi.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { GONDOLIN_BASE_EXECUTABLES, GONDOLIN_TOOL_NAMES, MOLTNET_TOOL_NAMES, buildPiExecutorManifest, createPiTaskExecutor, defineGondolinTemplate, definePiRuntime } from "@themoltnet/pi-runtime";
|
|
2
|
+
import { GONDOLIN_BASE_EXECUTABLES, GONDOLIN_TOOL_NAMES, MOLTNET_TOOL_NAMES, agentSigningCapability, buildPiExecutorManifest, createPiTaskExecutor, defineGondolinTemplate, definePiRuntime } from "@themoltnet/pi-runtime";
|
|
3
3
|
//#region src/pi.ts
|
|
4
4
|
var PI_KERNEL_TOOL_NAMES = [
|
|
5
5
|
...GONDOLIN_TOOL_NAMES,
|
|
@@ -59,7 +59,8 @@ var defaultPiRuntimeDefinition = definePiRuntime({
|
|
|
59
59
|
id: "moltnet-default-gondolin",
|
|
60
60
|
version: "1",
|
|
61
61
|
executables: GONDOLIN_BASE_EXECUTABLES
|
|
62
|
-
})
|
|
62
|
+
}),
|
|
63
|
+
hostCapabilities: [agentSigningCapability]
|
|
63
64
|
});
|
|
64
65
|
var defaultPiDaemonAdapter = createPiDaemonAdapter(defaultPiRuntimeDefinition);
|
|
65
66
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/agent-daemon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.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.",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"pino-opentelemetry-transport": "^3.0.0",
|
|
79
79
|
"pino-pretty": "^13.1.3",
|
|
80
80
|
"typebox": "^1.2.8",
|
|
81
|
-
"@themoltnet/agent-runtime": "0.
|
|
81
|
+
"@themoltnet/agent-runtime": "0.44.0",
|
|
82
82
|
"@themoltnet/os-keyring": "0.2.0",
|
|
83
|
-
"@themoltnet/
|
|
84
|
-
"@themoltnet/
|
|
83
|
+
"@themoltnet/sdk": "0.137.0",
|
|
84
|
+
"@themoltnet/pi-runtime": "0.12.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"tsx": "^4.7.0",
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
"vite": "^8.0.0",
|
|
90
90
|
"vite-plugin-dts": "^4.5.4",
|
|
91
91
|
"vitest": "^3.0.0",
|
|
92
|
-
"@moltnet/
|
|
92
|
+
"@moltnet/crypto-service": "0.1.0",
|
|
93
93
|
"@moltnet/models": "0.1.0",
|
|
94
|
-
"@moltnet/
|
|
94
|
+
"@moltnet/observability": "0.1.0",
|
|
95
95
|
"@moltnet/tasks": "0.1.0",
|
|
96
|
-
"@moltnet/
|
|
97
|
-
"@moltnet/
|
|
96
|
+
"@moltnet/bootstrap": "0.1.0",
|
|
97
|
+
"@moltnet/runtime-profiles": "0.1.0"
|
|
98
98
|
},
|
|
99
99
|
"nx": {
|
|
100
100
|
"projectType": "application",
|