@themoltnet/agent-daemon 0.56.0 → 0.56.2
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.js +16 -4
- package/package.json +7 -7
package/dist/cli.js
CHANGED
|
@@ -773,6 +773,7 @@ var CREDENTIAL_SCOPES = {
|
|
|
773
773
|
TaskExecute: "task:execute",
|
|
774
774
|
TaskManage: "task:manage",
|
|
775
775
|
TaskRead: "task:read",
|
|
776
|
+
TaskWrite: "task:write",
|
|
776
777
|
TeamManage: "team:manage",
|
|
777
778
|
TeamRead: "team:read"
|
|
778
779
|
};
|
|
@@ -795,6 +796,8 @@ var AGENT_CREDENTIAL_SCOPES = [
|
|
|
795
796
|
CREDENTIAL_SCOPES.TaskClaim,
|
|
796
797
|
CREDENTIAL_SCOPES.TaskExecute
|
|
797
798
|
];
|
|
799
|
+
CREDENTIAL_SCOPES.AgentProfile, CREDENTIAL_SCOPES.TaskRead, CREDENTIAL_SCOPES.TaskWrite;
|
|
800
|
+
CREDENTIAL_SCOPES.AgentProfile, CREDENTIAL_SCOPES.DiaryRead, CREDENTIAL_SCOPES.PackRead, CREDENTIAL_SCOPES.RuntimeRead, CREDENTIAL_SCOPES.TaskRead, CREDENTIAL_SCOPES.TeamRead;
|
|
798
801
|
Object.freeze(ALL_CREDENTIAL_SCOPES.filter((scope) => scope !== CREDENTIAL_SCOPES.HumanProfile));
|
|
799
802
|
/**
|
|
800
803
|
* REST capabilities exercised by the current MCP tool surface.
|
|
@@ -815,6 +818,7 @@ var MCP_CLIENT_SCOPES = [
|
|
|
815
818
|
CREDENTIAL_SCOPES.TaskExecute,
|
|
816
819
|
CREDENTIAL_SCOPES.TaskManage,
|
|
817
820
|
CREDENTIAL_SCOPES.TaskRead,
|
|
821
|
+
CREDENTIAL_SCOPES.TaskWrite,
|
|
818
822
|
CREDENTIAL_SCOPES.TeamManage,
|
|
819
823
|
CREDENTIAL_SCOPES.TeamRead
|
|
820
824
|
];
|
|
@@ -1003,6 +1007,12 @@ var FingerprintSchema = Type.String({
|
|
|
1003
1007
|
pattern: "^[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}$",
|
|
1004
1008
|
description: "Key fingerprint (A1B2-C3D4-E5F6-G7H8)"
|
|
1005
1009
|
});
|
|
1010
|
+
var AgentAliasSchema = Type.String({
|
|
1011
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,62}$",
|
|
1012
|
+
minLength: 1,
|
|
1013
|
+
maxLength: 63,
|
|
1014
|
+
description: "Case-preserving network alias; self-asserted, not unique, never used for authorization or lookup"
|
|
1015
|
+
});
|
|
1006
1016
|
Type.Object({
|
|
1007
1017
|
title: Type.Optional(Type.String({ maxLength: 255 })),
|
|
1008
1018
|
content: Type.String({
|
|
@@ -1207,6 +1217,7 @@ var TeamMemberSchema = Type.Object({
|
|
|
1207
1217
|
subjectType: Type.Union([Type.Literal("agent"), Type.Literal("human")]),
|
|
1208
1218
|
role: TeamRoleSchema,
|
|
1209
1219
|
displayName: Type.String(),
|
|
1220
|
+
alias: Type.Optional(AgentAliasSchema),
|
|
1210
1221
|
fingerprint: Type.Optional(Type.String()),
|
|
1211
1222
|
email: Type.Optional(Type.String())
|
|
1212
1223
|
});
|
|
@@ -4271,7 +4282,7 @@ function createExecutionPlanCache(args) {
|
|
|
4271
4282
|
const existing = cache.get(key);
|
|
4272
4283
|
if (existing) return existing;
|
|
4273
4284
|
const plan = await maybeAttachWarmSlotContext(claimedTask, buildDaemonTaskExecutionPlan(claimedTask.task, args.stateDirs, args.slotIdentity, args.warmSessionTtlSec, args.workspacePolicy, claimedTask.attemptN), args.stateDirs, args.slotRegistry, runtimeSessionStore, sourceAttemptResolver);
|
|
4274
|
-
assertPlanAllowedByWorkspacePolicy(plan, args.workspacePolicy);
|
|
4285
|
+
assertPlanAllowedByWorkspacePolicy(plan, args.workspacePolicy, args.slotIdentity.runtimeProfileId);
|
|
4275
4286
|
cache.set(key, plan);
|
|
4276
4287
|
return plan;
|
|
4277
4288
|
},
|
|
@@ -4301,13 +4312,14 @@ function createNullRuntimeSessionStore() {
|
|
|
4301
4312
|
async uploadAttemptFinal() {}
|
|
4302
4313
|
};
|
|
4303
4314
|
}
|
|
4304
|
-
function assertPlanAllowedByWorkspacePolicy(plan, policy) {
|
|
4315
|
+
function assertPlanAllowedByWorkspacePolicy(plan, policy, runtimeProfileId) {
|
|
4305
4316
|
const allowed = new Set(policy?.allowedWorkspaceModes && policy.allowedWorkspaceModes.length > 0 ? policy.allowedWorkspaceModes : [
|
|
4306
4317
|
"none",
|
|
4307
4318
|
"shared_mount",
|
|
4308
4319
|
"dedicated_worktree"
|
|
4309
4320
|
]);
|
|
4310
4321
|
const effectiveMode = planToRuntimeProfileWorkspaceMode(plan);
|
|
4322
|
+
if (plan.workspaceRevision && effectiveMode !== "dedicated_worktree") throw new Error(`Runtime profile "${runtimeProfileId}" does not allow "dedicated_worktree", required by a revision-pinned task (resolved workspace mode "${effectiveMode}")`);
|
|
4311
4323
|
if (!allowed.has(effectiveMode)) throw new Error(`Runtime profile forbids final workspace mode "${effectiveMode}" for this task`);
|
|
4312
4324
|
}
|
|
4313
4325
|
function planToRuntimeProfileWorkspaceMode(plan) {
|
|
@@ -9538,7 +9550,7 @@ function assertIdentityMatches(current, expected, currentLabel, expectedLabel) {
|
|
|
9538
9550
|
if (!assessment.ok) throw new AgentServerIdentityError("verification_failed", `${currentLabel} ${assessment.label} does not match ${expectedLabel}`);
|
|
9539
9551
|
}
|
|
9540
9552
|
function verificationError(message, cause) {
|
|
9541
|
-
return new AgentServerIdentityError("verification_failed", message, { cause });
|
|
9553
|
+
return new AgentServerIdentityError("verification_failed", cause instanceof AuthenticationError ? cause.message : message, { cause });
|
|
9542
9554
|
}
|
|
9543
9555
|
/** Non-secret projection preserving the existing `/v1` response shape. */
|
|
9544
9556
|
function publicAgentView(store, activation) {
|
|
@@ -11852,7 +11864,7 @@ async function writeCache(cache) {
|
|
|
11852
11864
|
}
|
|
11853
11865
|
//#endregion
|
|
11854
11866
|
//#region src/version.ts
|
|
11855
|
-
var DAEMON_VERSION = "0.56.
|
|
11867
|
+
var DAEMON_VERSION = "0.56.2";
|
|
11856
11868
|
//#endregion
|
|
11857
11869
|
//#region src/cli.ts
|
|
11858
11870
|
async function runAgentDaemonCli(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/agent-daemon",
|
|
3
|
-
"version": "0.56.
|
|
3
|
+
"version": "0.56.2",
|
|
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.",
|
|
@@ -85,10 +85,10 @@
|
|
|
85
85
|
"proper-lockfile": "4.1.2",
|
|
86
86
|
"reflect-metadata": "^0.2.2",
|
|
87
87
|
"typebox": "^1.2.8",
|
|
88
|
-
"@themoltnet/agent-runtime": "1.0.
|
|
89
|
-
"@themoltnet/sdk": "0.141.1",
|
|
88
|
+
"@themoltnet/agent-runtime": "1.0.2",
|
|
90
89
|
"@themoltnet/os-keyring": "0.3.0",
|
|
91
|
-
"@themoltnet/pi-runtime": "0.15.
|
|
90
|
+
"@themoltnet/pi-runtime": "0.15.2",
|
|
91
|
+
"@themoltnet/sdk": "0.141.1"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@fastify/swagger": "^9.6.1",
|
|
@@ -99,14 +99,14 @@
|
|
|
99
99
|
"vite-plugin-dts": "^4.5.4",
|
|
100
100
|
"vitest": "^3.0.0",
|
|
101
101
|
"@moltnet/agent-eval": "0.1.0",
|
|
102
|
+
"@moltnet/bootstrap": "0.1.0",
|
|
102
103
|
"@moltnet/crypto-service": "0.1.0",
|
|
103
104
|
"@moltnet/execution-integrations": "0.1.0",
|
|
104
|
-
"@moltnet/execution-plan": "0.1.0",
|
|
105
|
-
"@moltnet/loopback-companion": "0.1.0",
|
|
106
|
-
"@moltnet/bootstrap": "0.1.0",
|
|
107
105
|
"@moltnet/models": "0.1.0",
|
|
106
|
+
"@moltnet/loopback-companion": "0.1.0",
|
|
108
107
|
"@moltnet/observability": "0.1.0",
|
|
109
108
|
"@moltnet/runtime-profiles": "0.1.0",
|
|
109
|
+
"@moltnet/execution-plan": "0.1.0",
|
|
110
110
|
"@moltnet/tasks": "0.1.0"
|
|
111
111
|
},
|
|
112
112
|
"nx": {
|