@themoltnet/agent-daemon 0.36.0 → 0.37.1

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 CHANGED
@@ -94,6 +94,16 @@ fails fast if the key is rejected, is not an agent, or is bound to a different
94
94
  team. See
95
95
  [Run the daemon with an agent key](../../docs/operate/running-agents.md#run-the-daemon-with-an-agent-key).
96
96
 
97
+ An agent key used by the daemon needs this least-privilege scope set:
98
+
99
+ ```text
100
+ agent:profile runtime:read task:read task:claim task:execute
101
+ ```
102
+
103
+ The Console selects these five scopes by default. Broader key, diary, pack,
104
+ team-management, and runtime-management scopes are not required for normal
105
+ daemon operation.
106
+
97
107
  ### Pi provider auth
98
108
 
99
109
  The daemon resolves Pi config from the repository-local `.pi` directory by
package/dist/cli.js CHANGED
@@ -318,6 +318,46 @@ function deepFreeze(value) {
318
318
  deepFreeze(RUNTIME_PROFILE_CONTEXT_CATALOGUE);
319
319
  Object.freeze(Object.keys(RUNTIME_PROFILE_CONTEXT_CATALOGUE.recipes));
320
320
  //#endregion
321
+ //#region ../../libs/models/src/credential-scopes.ts
322
+ var CREDENTIAL_SCOPES = {
323
+ AgentProfile: "agent:profile",
324
+ ConnectorInvoke: "connector:invoke",
325
+ CryptoSign: "crypto:sign",
326
+ DiaryManage: "diary:manage",
327
+ DiaryRead: "diary:read",
328
+ DiaryWrite: "diary:write",
329
+ HumanProfile: "human:profile",
330
+ KeyManage: "key:manage",
331
+ PackRead: "pack:read",
332
+ PackWrite: "pack:write",
333
+ RuntimeManage: "runtime:manage",
334
+ RuntimeRead: "runtime:read",
335
+ TaskClaim: "task:claim",
336
+ TaskExecute: "task:execute",
337
+ TaskManage: "task:manage",
338
+ TaskRead: "task:read",
339
+ TeamManage: "team:manage",
340
+ TeamRead: "team:read"
341
+ };
342
+ var ALL_CREDENTIAL_SCOPES = Object.freeze(Object.values(CREDENTIAL_SCOPES));
343
+ CREDENTIAL_SCOPES.AgentProfile, CREDENTIAL_SCOPES.RuntimeRead, CREDENTIAL_SCOPES.TaskRead, CREDENTIAL_SCOPES.TaskClaim, CREDENTIAL_SCOPES.TaskExecute;
344
+ Object.freeze(ALL_CREDENTIAL_SCOPES.filter((scope) => scope !== CREDENTIAL_SCOPES.HumanProfile));
345
+ [
346
+ CREDENTIAL_SCOPES.AgentProfile,
347
+ CREDENTIAL_SCOPES.CryptoSign,
348
+ CREDENTIAL_SCOPES.DiaryManage,
349
+ CREDENTIAL_SCOPES.DiaryRead,
350
+ CREDENTIAL_SCOPES.DiaryWrite,
351
+ CREDENTIAL_SCOPES.HumanProfile,
352
+ CREDENTIAL_SCOPES.PackRead,
353
+ CREDENTIAL_SCOPES.PackWrite,
354
+ CREDENTIAL_SCOPES.TaskExecute,
355
+ CREDENTIAL_SCOPES.TaskManage,
356
+ CREDENTIAL_SCOPES.TaskRead,
357
+ CREDENTIAL_SCOPES.TeamManage,
358
+ CREDENTIAL_SCOPES.TeamRead
359
+ ].filter((scope) => scope !== CREDENTIAL_SCOPES.HumanProfile);
360
+ //#endregion
321
361
  //#region ../../libs/models/src/preview-sign.ts
322
362
  function schemaRef$1(schema, id) {
323
363
  return Type.Unsafe(Type.Ref(id));
package/dist/pi.d.ts CHANGED
@@ -2,5 +2,6 @@ import { PiRuntimeDefinition } from '@themoltnet/pi-runtime';
2
2
  import { DaemonRuntimeAdapter } from './runtime.js';
3
3
  export declare const PI_KERNEL_TOOL_NAMES: readonly ["read", "write", "edit", "bash", "ls", "find", "grep", "subagent", "moltnet_pack_get", "moltnet_pack_create", "moltnet_pack_provenance", "moltnet_pack_render", "moltnet_rendered_pack_list", "moltnet_rendered_pack_get", "moltnet_diary_tags", "moltnet_list_entries", "moltnet_get_entry", "moltnet_search_entries", "moltnet_create_entry", "moltnet_get_task", "moltnet_list_task_attempts", "moltnet_list_task_messages", "moltnet_upload_task_artifact", "moltnet_list_task_artifacts", "moltnet_download_task_artifact", "moltnet_review_session_errors", "moltnet_host_exec"];
4
4
  export declare function createPiDaemonAdapter(runtime: PiRuntimeDefinition): DaemonRuntimeAdapter;
5
+ export declare const defaultPiRuntimeDefinition: PiRuntimeDefinition;
5
6
  export declare const defaultPiDaemonAdapter: DaemonRuntimeAdapter;
6
7
  //# sourceMappingURL=pi.d.ts.map
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,EAOL,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AAEhF,eAAO,MAAM,oBAAoB,kkBAIvB,CAAC;AAEX,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,mBAAmB,GAC3B,oBAAoB,CAiEtB;AAED,eAAO,MAAM,sBAAsB,sBASlC,CAAC"}
1
+ {"version":3,"file":"pi.d.ts","sourceRoot":"","sources":["../src/pi.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,oBAAoB,EAAyB,MAAM,cAAc,CAAC;AAEhF,eAAO,MAAM,oBAAoB,kkBAIvB,CAAC;AAEX,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,mBAAmB,GAC3B,oBAAoB,CAiEtB;AAED,eAAO,MAAM,0BAA0B,qBAQrC,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_TOOL_NAMES, MOLTNET_TOOL_NAMES, buildPiExecutorManifest, createPiTaskExecutor, defineGondolinTemplate, definePiRuntime } from "@themoltnet/pi-runtime";
2
+ import { GONDOLIN_BASE_EXECUTABLES, GONDOLIN_TOOL_NAMES, MOLTNET_TOOL_NAMES, buildPiExecutorManifest, createPiTaskExecutor, defineGondolinTemplate, definePiRuntime } from "@themoltnet/pi-runtime";
3
3
  import { createExecutorAttestor } from "@themoltnet/sdk";
4
4
  //#region src/pi.ts
5
5
  var PI_KERNEL_TOOL_NAMES = [
@@ -58,13 +58,15 @@ function createPiDaemonAdapter(runtime) {
58
58
  }
59
59
  };
60
60
  }
61
- var defaultPiDaemonAdapter = createPiDaemonAdapter(definePiRuntime({
61
+ var defaultPiRuntimeDefinition = definePiRuntime({
62
62
  id: "moltnet-default-pi",
63
63
  version: "1",
64
64
  vm: defineGondolinTemplate({
65
65
  id: "moltnet-default-gondolin",
66
- version: "1"
66
+ version: "1",
67
+ executables: GONDOLIN_BASE_EXECUTABLES
67
68
  })
68
- }));
69
+ });
70
+ var defaultPiDaemonAdapter = createPiDaemonAdapter(defaultPiRuntimeDefinition);
69
71
  //#endregion
70
- export { PI_KERNEL_TOOL_NAMES, createPiDaemonAdapter, defaultPiDaemonAdapter };
72
+ export { PI_KERNEL_TOOL_NAMES, createPiDaemonAdapter, defaultPiDaemonAdapter, defaultPiRuntimeDefinition };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@themoltnet/agent-daemon",
3
- "version": "0.36.0",
3
+ "version": "0.37.1",
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.",
@@ -62,9 +62,9 @@
62
62
  "pino": "^10.3.1",
63
63
  "pino-pretty": "^13.1.3",
64
64
  "typebox": "^1.2.8",
65
- "@themoltnet/pi-runtime": "0.6.0",
66
- "@themoltnet/agent-runtime": "0.40.0",
67
- "@themoltnet/sdk": "0.128.0"
65
+ "@themoltnet/agent-runtime": "0.40.1",
66
+ "@themoltnet/pi-runtime": "0.6.2",
67
+ "@themoltnet/sdk": "0.129.0"
68
68
  },
69
69
  "devDependencies": {
70
70
  "tsx": "^4.7.0",
@@ -72,10 +72,10 @@
72
72
  "vite": "^8.0.0",
73
73
  "vite-plugin-dts": "^4.5.4",
74
74
  "vitest": "^3.0.0",
75
- "@moltnet/bootstrap": "0.1.0",
76
75
  "@moltnet/crypto-service": "0.1.0",
76
+ "@moltnet/observability": "0.1.0",
77
77
  "@moltnet/tasks": "0.1.0",
78
- "@moltnet/observability": "0.1.0"
78
+ "@moltnet/bootstrap": "0.1.0"
79
79
  },
80
80
  "nx": {
81
81
  "projectType": "application",