evolcore 0.0.7 → 0.0.9

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.
Files changed (230) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +38 -4
  3. package/dist/agents/baseagent.js +117 -24
  4. package/dist/agents/claude-runner.js +31 -2
  5. package/dist/agents/codex-app-server-client.js +37 -2
  6. package/dist/agents/codex-runner.js +11 -3
  7. package/dist/aun/aid/control-aid.js +40 -27
  8. package/dist/aun/aid/domain.js +23 -0
  9. package/dist/aun/msg/group.js +9 -9
  10. package/dist/aun/msg/p2p.js +11 -6
  11. package/dist/aun/msg/upload.js +43 -29
  12. package/dist/aun/outbox.js +48 -5
  13. package/dist/channels/aun.js +225 -71
  14. package/dist/cli/aun-commands.js +10 -7
  15. package/dist/cli/bench.js +4 -3
  16. package/dist/cli/daemon-commands.js +208 -68
  17. package/dist/cli/data-command.js +62 -35
  18. package/dist/cli/index.js +11 -1
  19. package/dist/cli/init-channel.js +1 -1
  20. package/dist/cli/init.js +112 -17
  21. package/dist/cli/model.js +5 -5
  22. package/dist/cli/restart-monitor.js +102 -22
  23. package/dist/config/builtin-role-templates.js +4 -3
  24. package/dist/config/config-field-policy.js +6 -2
  25. package/dist/config/config-manager.js +79 -11
  26. package/dist/config/gateway-config.js +80 -35
  27. package/dist/config/role-schema.js +18 -3
  28. package/dist/config/role-service.js +3 -3
  29. package/dist/config/role-store.js +4 -3
  30. package/dist/config-store.js +19 -3
  31. package/dist/core/auth/operation-authorizer.js +3 -1
  32. package/dist/core/baseagent-loader.js +5 -3
  33. package/dist/core/bootstrap-service.js +0 -12
  34. package/dist/core/capability/providers/codex-capability-provider.js +2 -2
  35. package/dist/core/channel-loader.js +15 -2
  36. package/dist/core/command/command-handler.js +1 -1
  37. package/dist/core/command/evol-menu-version-gate.js +3 -2
  38. package/dist/core/command/menu-handler.js +50 -28
  39. package/dist/core/command/menu-protocol.js +7 -4
  40. package/dist/core/command/slash-handler.js +4 -4
  41. package/dist/core/data-migration.js +517 -24
  42. package/dist/core/inference/text-inference.js +18 -5
  43. package/dist/core/message/message-bridge.js +17 -6
  44. package/dist/core/message/response-engine.js +22 -3
  45. package/dist/core/model/config-scope.js +3 -3
  46. package/dist/core/permission/tool-policy.js +18 -0
  47. package/dist/core/protected-paths.js +12 -1
  48. package/dist/index.js +794 -725
  49. package/dist/ipc.js +3 -1
  50. package/dist/product.js +1 -0
  51. package/dist/utils/autostart.js +27 -0
  52. package/dist/utils/codex-cli.js +39 -0
  53. package/dist/utils/cross-platform.js +147 -18
  54. package/dist/utils/ecweb-utils.js +15 -2
  55. package/dist/utils/instance-registry.js +43 -6
  56. package/dist/utils/macos-autostart.js +179 -0
  57. package/dist/utils/process-introspect.js +7 -3
  58. package/dist/utils/windows-autostart.js +130 -0
  59. package/ecagent/dist/agent-loop.d.ts +1 -1
  60. package/ecagent/dist/agent-loop.js +1 -1
  61. package/ecagent/dist/agent.d.ts +1 -1
  62. package/ecagent/dist/agent.js +1 -1
  63. package/ecagent/dist/harness/agent-harness.d.ts +1 -1
  64. package/ecagent/dist/harness/compaction/branch-summarization.d.ts +1 -1
  65. package/ecagent/dist/harness/compaction/compaction.d.ts +1 -1
  66. package/ecagent/dist/harness/compaction/utils.d.ts +1 -1
  67. package/ecagent/dist/harness/messages.d.ts +1 -1
  68. package/ecagent/dist/harness/session/session.d.ts +1 -1
  69. package/ecagent/dist/harness/types.d.ts +1 -1
  70. package/ecagent/dist/proxy.d.ts +1 -1
  71. package/ecagent/dist/proxy.js +1 -1
  72. package/ecagent/dist/types.d.ts +1 -1
  73. package/kits/migrations/migrate-role-config-v5.mjs +27 -2
  74. package/kits/rules/01-overview.md +3 -2
  75. package/kits/schemas/_meta.json +2 -1
  76. package/kits/schemas/agent-config.schema.10.json +19 -1
  77. package/kits/schemas/daemon.schema.4.json +136 -0
  78. package/kits/schemas/defaults.schema.4.json +15 -1
  79. package/kits/schemas/relation-config.schema.8.json +22 -1
  80. package/kits/schemas/role-config.schema.1.json +2 -2
  81. package/package.json +2 -4
  82. package/ecagent/dist/agent-loop.d.ts.map +0 -1
  83. package/ecagent/dist/agent-loop.js.map +0 -1
  84. package/ecagent/dist/agent.d.ts.map +0 -1
  85. package/ecagent/dist/agent.js.map +0 -1
  86. package/ecagent/dist/harness/agent-harness.d.ts.map +0 -1
  87. package/ecagent/dist/harness/agent-harness.js.map +0 -1
  88. package/ecagent/dist/harness/compaction/branch-summarization.d.ts.map +0 -1
  89. package/ecagent/dist/harness/compaction/branch-summarization.js.map +0 -1
  90. package/ecagent/dist/harness/compaction/compaction.d.ts.map +0 -1
  91. package/ecagent/dist/harness/compaction/compaction.js.map +0 -1
  92. package/ecagent/dist/harness/compaction/utils.d.ts.map +0 -1
  93. package/ecagent/dist/harness/compaction/utils.js.map +0 -1
  94. package/ecagent/dist/harness/env/nodejs.d.ts.map +0 -1
  95. package/ecagent/dist/harness/env/nodejs.js.map +0 -1
  96. package/ecagent/dist/harness/messages.d.ts.map +0 -1
  97. package/ecagent/dist/harness/messages.js.map +0 -1
  98. package/ecagent/dist/harness/prompt-templates.d.ts.map +0 -1
  99. package/ecagent/dist/harness/prompt-templates.js.map +0 -1
  100. package/ecagent/dist/harness/session/jsonl-repo.d.ts.map +0 -1
  101. package/ecagent/dist/harness/session/jsonl-repo.js.map +0 -1
  102. package/ecagent/dist/harness/session/jsonl-storage.d.ts.map +0 -1
  103. package/ecagent/dist/harness/session/jsonl-storage.js.map +0 -1
  104. package/ecagent/dist/harness/session/memory-repo.d.ts.map +0 -1
  105. package/ecagent/dist/harness/session/memory-repo.js.map +0 -1
  106. package/ecagent/dist/harness/session/memory-storage.d.ts.map +0 -1
  107. package/ecagent/dist/harness/session/memory-storage.js.map +0 -1
  108. package/ecagent/dist/harness/session/repo-utils.d.ts.map +0 -1
  109. package/ecagent/dist/harness/session/repo-utils.js.map +0 -1
  110. package/ecagent/dist/harness/session/session.d.ts.map +0 -1
  111. package/ecagent/dist/harness/session/session.js.map +0 -1
  112. package/ecagent/dist/harness/session/uuid.d.ts.map +0 -1
  113. package/ecagent/dist/harness/session/uuid.js.map +0 -1
  114. package/ecagent/dist/harness/skills.d.ts.map +0 -1
  115. package/ecagent/dist/harness/skills.js.map +0 -1
  116. package/ecagent/dist/harness/system-prompt.d.ts.map +0 -1
  117. package/ecagent/dist/harness/system-prompt.js.map +0 -1
  118. package/ecagent/dist/harness/types.d.ts.map +0 -1
  119. package/ecagent/dist/harness/types.js.map +0 -1
  120. package/ecagent/dist/harness/utils/shell-output.d.ts.map +0 -1
  121. package/ecagent/dist/harness/utils/shell-output.js.map +0 -1
  122. package/ecagent/dist/harness/utils/truncate.d.ts.map +0 -1
  123. package/ecagent/dist/harness/utils/truncate.js.map +0 -1
  124. package/ecagent/dist/index.d.ts.map +0 -1
  125. package/ecagent/dist/index.js.map +0 -1
  126. package/ecagent/dist/node.d.ts.map +0 -1
  127. package/ecagent/dist/node.js.map +0 -1
  128. package/ecagent/dist/proxy.d.ts.map +0 -1
  129. package/ecagent/dist/proxy.js.map +0 -1
  130. package/ecagent/dist/runtime/api/lazy.d.ts.map +0 -1
  131. package/ecagent/dist/runtime/api/lazy.js.map +0 -1
  132. package/ecagent/dist/runtime/api/pi-messages.d.ts.map +0 -1
  133. package/ecagent/dist/runtime/api/pi-messages.js.map +0 -1
  134. package/ecagent/dist/runtime/api/pi-messages.lazy.d.ts.map +0 -1
  135. package/ecagent/dist/runtime/api/pi-messages.lazy.js.map +0 -1
  136. package/ecagent/dist/runtime/auth/context.d.ts.map +0 -1
  137. package/ecagent/dist/runtime/auth/context.js.map +0 -1
  138. package/ecagent/dist/runtime/auth/credential-store.d.ts.map +0 -1
  139. package/ecagent/dist/runtime/auth/credential-store.js.map +0 -1
  140. package/ecagent/dist/runtime/auth/helpers.d.ts.map +0 -1
  141. package/ecagent/dist/runtime/auth/helpers.js.map +0 -1
  142. package/ecagent/dist/runtime/auth/resolve.d.ts.map +0 -1
  143. package/ecagent/dist/runtime/auth/resolve.js.map +0 -1
  144. package/ecagent/dist/runtime/auth/types.d.ts.map +0 -1
  145. package/ecagent/dist/runtime/auth/types.js.map +0 -1
  146. package/ecagent/dist/runtime/compat.d.ts.map +0 -1
  147. package/ecagent/dist/runtime/compat.js.map +0 -1
  148. package/ecagent/dist/runtime/index.d.ts.map +0 -1
  149. package/ecagent/dist/runtime/index.js.map +0 -1
  150. package/ecagent/dist/runtime/models.d.ts.map +0 -1
  151. package/ecagent/dist/runtime/models.js.map +0 -1
  152. package/ecagent/dist/runtime/oauth.d.ts.map +0 -1
  153. package/ecagent/dist/runtime/oauth.js.map +0 -1
  154. package/ecagent/dist/runtime/providers/faux.d.ts.map +0 -1
  155. package/ecagent/dist/runtime/providers/faux.js.map +0 -1
  156. package/ecagent/dist/runtime/types.d.ts.map +0 -1
  157. package/ecagent/dist/runtime/types.js.map +0 -1
  158. package/ecagent/dist/runtime/utils/diagnostics.d.ts.map +0 -1
  159. package/ecagent/dist/runtime/utils/diagnostics.js.map +0 -1
  160. package/ecagent/dist/runtime/utils/event-stream.d.ts.map +0 -1
  161. package/ecagent/dist/runtime/utils/event-stream.js.map +0 -1
  162. package/ecagent/dist/runtime/utils/headers.d.ts.map +0 -1
  163. package/ecagent/dist/runtime/utils/headers.js.map +0 -1
  164. package/ecagent/dist/runtime/utils/json-parse.d.ts.map +0 -1
  165. package/ecagent/dist/runtime/utils/json-parse.js.map +0 -1
  166. package/ecagent/dist/runtime/utils/oauth/types.d.ts.map +0 -1
  167. package/ecagent/dist/runtime/utils/oauth/types.js.map +0 -1
  168. package/ecagent/dist/runtime/utils/overflow.d.ts.map +0 -1
  169. package/ecagent/dist/runtime/utils/overflow.js.map +0 -1
  170. package/ecagent/dist/runtime/utils/provider-env.d.ts.map +0 -1
  171. package/ecagent/dist/runtime/utils/provider-env.js.map +0 -1
  172. package/ecagent/dist/runtime/utils/retry.d.ts.map +0 -1
  173. package/ecagent/dist/runtime/utils/retry.js.map +0 -1
  174. package/ecagent/dist/runtime/utils/typebox-helpers.d.ts.map +0 -1
  175. package/ecagent/dist/runtime/utils/typebox-helpers.js.map +0 -1
  176. package/ecagent/dist/runtime/utils/validation.d.ts.map +0 -1
  177. package/ecagent/dist/runtime/utils/validation.js.map +0 -1
  178. package/ecagent/dist/types.d.ts.map +0 -1
  179. package/ecagent/dist/types.js.map +0 -1
  180. package/ecagent/package.json +0 -93
  181. package/ecagent/src/agent-loop.ts +0 -792
  182. package/ecagent/src/agent.ts +0 -575
  183. package/ecagent/src/harness/agent-harness.ts +0 -1029
  184. package/ecagent/src/harness/compaction/branch-summarization.ts +0 -261
  185. package/ecagent/src/harness/compaction/compaction.ts +0 -753
  186. package/ecagent/src/harness/compaction/utils.ts +0 -144
  187. package/ecagent/src/harness/env/nodejs.ts +0 -569
  188. package/ecagent/src/harness/messages.ts +0 -164
  189. package/ecagent/src/harness/prompt-templates.ts +0 -267
  190. package/ecagent/src/harness/session/jsonl-repo.ts +0 -179
  191. package/ecagent/src/harness/session/jsonl-storage.ts +0 -314
  192. package/ecagent/src/harness/session/memory-repo.ts +0 -50
  193. package/ecagent/src/harness/session/memory-storage.ts +0 -133
  194. package/ecagent/src/harness/session/repo-utils.ts +0 -51
  195. package/ecagent/src/harness/session/session.ts +0 -338
  196. package/ecagent/src/harness/session/uuid.ts +0 -54
  197. package/ecagent/src/harness/skills.ts +0 -375
  198. package/ecagent/src/harness/system-prompt.ts +0 -34
  199. package/ecagent/src/harness/types.ts +0 -838
  200. package/ecagent/src/harness/utils/shell-output.ts +0 -135
  201. package/ecagent/src/harness/utils/truncate.ts +0 -344
  202. package/ecagent/src/index.ts +0 -46
  203. package/ecagent/src/node.ts +0 -2
  204. package/ecagent/src/proxy.ts +0 -367
  205. package/ecagent/src/runtime/api/lazy.ts +0 -70
  206. package/ecagent/src/runtime/api/pi-messages.lazy.ts +0 -4
  207. package/ecagent/src/runtime/api/pi-messages.ts +0 -436
  208. package/ecagent/src/runtime/auth/context.ts +0 -45
  209. package/ecagent/src/runtime/auth/credential-store.ts +0 -47
  210. package/ecagent/src/runtime/auth/helpers.ts +0 -46
  211. package/ecagent/src/runtime/auth/resolve.ts +0 -141
  212. package/ecagent/src/runtime/auth/types.ts +0 -182
  213. package/ecagent/src/runtime/compat.ts +0 -158
  214. package/ecagent/src/runtime/index.ts +0 -31
  215. package/ecagent/src/runtime/models.ts +0 -452
  216. package/ecagent/src/runtime/oauth.ts +0 -1
  217. package/ecagent/src/runtime/providers/faux.ts +0 -538
  218. package/ecagent/src/runtime/types.ts +0 -718
  219. package/ecagent/src/runtime/utils/diagnostics.ts +0 -45
  220. package/ecagent/src/runtime/utils/event-stream.ts +0 -88
  221. package/ecagent/src/runtime/utils/headers.ts +0 -18
  222. package/ecagent/src/runtime/utils/json-parse.ts +0 -124
  223. package/ecagent/src/runtime/utils/oauth/types.ts +0 -79
  224. package/ecagent/src/runtime/utils/overflow.ts +0 -165
  225. package/ecagent/src/runtime/utils/provider-env.ts +0 -52
  226. package/ecagent/src/runtime/utils/retry.ts +0 -101
  227. package/ecagent/src/runtime/utils/typebox-helpers.ts +0 -24
  228. package/ecagent/src/runtime/utils/validation.ts +0 -310
  229. package/ecagent/src/types.ts +0 -430
  230. package/ecagent/tsconfig.build.json +0 -32
@@ -17,6 +17,7 @@ import { resolvePaths, agentConfig as agentConfigPath, agentContactConfig, agent
17
17
  import { atomicReadJson, atomicWriteJson } from '../utils/atomic-write.js';
18
18
  import { fileCache } from '../core/daemon-file-cache.js';
19
19
  import { isValidAid } from '../aun/aid/validation.js';
20
+ import { normalizeAidDomain } from '../aun/aid/domain.js';
20
21
  import { isExplicitGroupId } from '../aun/group-identity.js';
21
22
  import { parseContactAlias } from './contact-alias.js';
22
23
  import { loadSchema, listSchemaVersions, currentVersion, isSchemaName, } from './schema-registry.js';
@@ -504,10 +505,40 @@ export function read(target, sel, opts = {}) {
504
505
  : target === ConfigTarget.Relation
505
506
  ? foldLegacyProactiveBlock(migrated)
506
507
  : migrated;
508
+ // Agent read compatibility may move the legacy top-level `agents` block to
509
+ // `baseagents`, so canonicalize effort after that structural migration.
510
+ const canonicalized = normalizeBaseagentEffortCompat(normalized);
507
511
  if (!opts.expand)
508
- return normalized;
512
+ return canonicalized;
509
513
  const resolver = buildEnvResolver(envScopeFor(sel));
510
- return expandVars(normalized, resolver);
514
+ return expandVars(canonicalized, resolver);
515
+ }
516
+ /**
517
+ * Canonicalize the legacy Codex `reasoning` config key to the public `effort`
518
+ * key. The runner may still accept `reasoning` as an input alias, but all
519
+ * config scopes resolve and persist the same `effort` field.
520
+ */
521
+ function normalizeBaseagentEffortCompat(value) {
522
+ const rawBaseagents = value?.baseagents;
523
+ if (!rawBaseagents || typeof rawBaseagents !== 'object' || Array.isArray(rawBaseagents))
524
+ return value;
525
+ const baseagents = { ...rawBaseagents };
526
+ let changed = false;
527
+ for (const [name, rawBlock] of Object.entries(baseagents)) {
528
+ if (!rawBlock || typeof rawBlock !== 'object' || Array.isArray(rawBlock))
529
+ continue;
530
+ const block = { ...rawBlock };
531
+ if (Object.prototype.hasOwnProperty.call(block, 'reasoning')) {
532
+ if (block.effort === undefined)
533
+ block.effort = block.reasoning;
534
+ delete block.reasoning;
535
+ baseagents[name] = block;
536
+ changed = true;
537
+ }
538
+ }
539
+ if (!changed)
540
+ return value;
541
+ return { ...value, baseagents };
511
542
  }
512
543
  function normalizeAgentConfigForRead(value, aid) {
513
544
  const config = foldLegacyProactiveBlock(normalizeAgentLifecycle(value));
@@ -548,7 +579,7 @@ function groupFor(target, sel) {
548
579
  return 'config';
549
580
  }
550
581
  function normalizeAgentConfigForWrite(value) {
551
- const mutable = { ...value };
582
+ const mutable = normalizeBaseagentEffortCompat({ ...value });
552
583
  normalizeShowActivitiesCompat(mutable);
553
584
  // AID 格式校验
554
585
  if (mutable.aid && !isValidAid(mutable.aid)) {
@@ -571,8 +602,22 @@ function normalizeAgentConfigForWrite(value) {
571
602
  }
572
603
  return mutable;
573
604
  }
605
+ function normalizeProcessConfigForWrite(value) {
606
+ const configuredAidDomain = value.aun?.defaultAidDomain;
607
+ if (configuredAidDomain === undefined)
608
+ return value;
609
+ try {
610
+ return {
611
+ ...value,
612
+ aun: { ...value.aun, defaultAidDomain: normalizeAidDomain(configuredAidDomain, 'aun.defaultAidDomain') },
613
+ };
614
+ }
615
+ catch (error) {
616
+ throw new ConfigError('VALIDATION_ERROR', error instanceof Error ? error.message : String(error));
617
+ }
618
+ }
574
619
  function normalizeRelationConfigForWrite(value) {
575
- const mutable = { ...value };
620
+ const mutable = normalizeBaseagentEffortCompat({ ...value });
576
621
  normalizeShowActivitiesCompat(mutable);
577
622
  return mutable;
578
623
  }
@@ -638,12 +683,15 @@ export function write(target, value, sel, opts = {}) {
638
683
  : loadSchema(TARGET_SCHEMA[target]);
639
684
  const withVer = ensureSchemaVersion(value, schema.version);
640
685
  const migrated = withVer;
686
+ const canonicalized = normalizeBaseagentEffortCompat(migrated);
641
687
  // Agent config 写入规范化(aid 校验、projects 字段清理)
642
688
  const normalized = target === ConfigTarget.Agent
643
- ? normalizeAgentConfigForWrite(migrated)
689
+ ? normalizeAgentConfigForWrite(canonicalized)
644
690
  : target === ConfigTarget.Relation
645
- ? normalizeRelationConfigForWrite(migrated)
646
- : migrated;
691
+ ? normalizeRelationConfigForWrite(canonicalized)
692
+ : target === ConfigTarget.Process
693
+ ? normalizeProcessConfigForWrite(canonicalized)
694
+ : canonicalized;
647
695
  // 1. Schema 校验
648
696
  if (!opts.skipValidate) {
649
697
  validateOrThrow(schema, normalized, target);
@@ -836,7 +884,7 @@ function ensureSchemaVersion(value, version) {
836
884
  }
837
885
  function validateOrThrow(schema, value, target) {
838
886
  const ok = schema.validate(value);
839
- const scopeErrors = validateProcessOnlyFields(target, value);
887
+ const scopeErrors = [...validateProcessOnlyFields(target, value), ...validateProcessAidDomain(target, value)];
840
888
  if (!ok || scopeErrors.length > 0) {
841
889
  const errs = [
842
890
  ...scopeErrors,
@@ -853,9 +901,29 @@ function validateOrThrow(schema, value, target) {
853
901
  function validateProcessOnlyFields(target, value) {
854
902
  if (target === ConfigTarget.Process || !value || typeof value !== 'object')
855
903
  return [];
856
- if (!Object.prototype.hasOwnProperty.call(value, 'debug'))
904
+ const errors = [];
905
+ if (Object.prototype.hasOwnProperty.call(value, 'debug')) {
906
+ errors.push('/debug is only allowed in process config');
907
+ }
908
+ const aun = value.aun;
909
+ if (aun && typeof aun === 'object' && Object.prototype.hasOwnProperty.call(aun, 'defaultEncrypt')) {
910
+ errors.push('/aun/defaultEncrypt is only allowed in process config');
911
+ }
912
+ return errors;
913
+ }
914
+ function validateProcessAidDomain(target, value) {
915
+ if (target !== ConfigTarget.Process || !value || typeof value !== 'object')
916
+ return [];
917
+ const configuredAidDomain = value?.aun?.defaultAidDomain;
918
+ if (configuredAidDomain === undefined)
919
+ return [];
920
+ try {
921
+ normalizeAidDomain(configuredAidDomain, 'aun.defaultAidDomain');
857
922
  return [];
858
- return ['/debug is only allowed in process config'];
923
+ }
924
+ catch (error) {
925
+ return [`/aun/defaultAidDomain ${error instanceof Error ? error.message : String(error)}`];
926
+ }
859
927
  }
860
928
  /**
861
929
  * responseModeParams 桶专项校验。
@@ -908,7 +976,7 @@ export function validateConfig(target, value) {
908
976
  : loadSchema(TARGET_SCHEMA[target]);
909
977
  const withVer = ensureSchemaVersion(value, schema.version);
910
978
  const ok = schema.validate(withVer);
911
- const errors = validateProcessOnlyFields(target, withVer);
979
+ const errors = [...validateProcessOnlyFields(target, withVer), ...validateProcessAidDomain(target, withVer)];
912
980
  if (ok && errors.length === 0)
913
981
  return [];
914
982
  return [
@@ -29,6 +29,47 @@ const DISPLAY_NAMES = {
29
29
  };
30
30
  // ── 掩码 ──
31
31
  const ENV_PREFIX = '$ENV:';
32
+ // Claude Code supports both credential variable names. Keep AUTH_TOKEN first
33
+ // to match the runtime resolver's precedence.
34
+ const standardEnvKeys = {
35
+ apiKey: ['ANTHROPIC_AUTH_TOKEN'],
36
+ baseUrl: ['ANTHROPIC_BASE_URL'],
37
+ };
38
+ function envKeysForGateway(type, field) {
39
+ if (type === 'claude' && field === 'apiKey')
40
+ return ['ANTHROPIC_AUTH_TOKEN', 'ANTHROPIC_API_KEY'];
41
+ return standardEnvKeys[field];
42
+ }
43
+ function firstEnvValue(env, names) {
44
+ for (const name of names) {
45
+ const value = env[name];
46
+ if (value)
47
+ return { name, value };
48
+ }
49
+ return undefined;
50
+ }
51
+ const DEBUG_SECRET_KEY = /(?:key|token|secret|password|authorization|credential|private)/i;
52
+ function redactDebugValue(value, key) {
53
+ if (typeof value === 'string') {
54
+ if (value === '(未设置)')
55
+ return value;
56
+ if (key && DEBUG_SECRET_KEY.test(key) && !value.startsWith(ENV_PREFIX))
57
+ return '***';
58
+ return value;
59
+ }
60
+ if (Array.isArray(value))
61
+ return value.map(item => redactDebugValue(item));
62
+ if (value && typeof value === 'object') {
63
+ return Object.fromEntries(Object.entries(value)
64
+ .map(([childKey, childValue]) => [childKey, redactDebugValue(childValue, childKey)]));
65
+ }
66
+ return value;
67
+ }
68
+ function redactMismatchValue(value, field) {
69
+ if (!value)
70
+ return value;
71
+ return field === 'apiKey' && !value.startsWith(ENV_PREFIX) ? '***' : value;
72
+ }
32
73
  function maskApiKey(raw) {
33
74
  if (typeof raw !== 'string' || !raw)
34
75
  return { mask: undefined, isEnvRef: false };
@@ -203,21 +244,17 @@ function detectEnvMismatch(defaults, aids) {
203
244
  // 读取全局 .env 文件
204
245
  const rootEnvPath = path.join(resolvePaths().root, '.env');
205
246
  const rootEnvVars = parseEnvFileSync(rootEnvPath);
206
- // 标准环境变量映射
207
- const standardEnvKeys = {
208
- apiKey: 'ANTHROPIC_AUTH_TOKEN',
209
- baseUrl: 'ANTHROPIC_BASE_URL',
210
- };
211
247
  // 记录进程环境变量
212
- const processEnvDebug = {
248
+ const processEnvDebug = redactDebugValue({
213
249
  ANTHROPIC_BASE_URL: process.env.ANTHROPIC_BASE_URL || '(未设置)',
214
250
  ANTHROPIC_AUTH_TOKEN: process.env.ANTHROPIC_AUTH_TOKEN || '(未设置)',
215
- };
251
+ ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY || '(未设置)',
252
+ });
216
253
  // 收集调试信息返回给前端
217
254
  result.debug = {
218
255
  processEnv: processEnvDebug,
219
- rootEnvFile: rootEnvVars,
220
- defaultsConfig: defaultsBa,
256
+ rootEnvFile: redactDebugValue(rootEnvVars),
257
+ defaultsConfig: redactDebugValue(defaultsBa),
221
258
  };
222
259
  // 检测全局默认配置中的环境变量
223
260
  for (const type of GATEWAY_TYPES) {
@@ -243,23 +280,25 @@ function detectEnvMismatch(defaults, aids) {
243
280
  }
244
281
  }
245
282
  // 情况2:配置值是实际值(非 $ENV 引用),检查是否应该使用环境变量
246
- else if (typeof val === 'string' && val && standardEnvKeys[field]) {
247
- const envVarName = standardEnvKeys[field];
248
- const fileValue = rootEnvVars[envVarName];
249
- const processValue = process.env[envVarName];
283
+ else if (typeof val === 'string' && val && envKeysForGateway(type, field)) {
284
+ const envKeys = envKeysForGateway(type, field);
285
+ const envValue = firstEnvValue(process.env, envKeys);
286
+ const fileValue = firstEnvValue(rootEnvVars, envKeys);
287
+ const envVarName = envValue?.name;
288
+ const processValue = envValue?.value;
250
289
  // 如果进程环境中有值,但配置中的值与进程环境不一致
251
- if (processValue && val !== processValue) {
290
+ if (processValue && val !== processValue && envVarName) {
252
291
  // 同时检查 .env 文件:如果 .env 也没有这个值,说明需要同步
253
- if (!fileValue || fileValue !== processValue) {
292
+ if (!fileValue || fileValue.value !== processValue) {
254
293
  result.hasMismatch = true;
255
294
  result.mismatches.push({
256
295
  aid: 'defaults',
257
296
  type,
258
297
  field,
259
- envValue: fileValue || '(.env 中未设置)',
260
- configValue: val,
298
+ envValue: redactMismatchValue(fileValue?.value, field) || '(.env 中未设置)',
299
+ configValue: redactMismatchValue(val, field) || val,
261
300
  envVarName,
262
- processValue,
301
+ processValue: redactMismatchValue(processValue, field),
263
302
  });
264
303
  }
265
304
  }
@@ -295,18 +334,20 @@ function detectEnvMismatch(defaults, aids) {
295
334
  }
296
335
  }
297
336
  // 情况2:配置值是实际值
298
- else if (typeof val === 'string' && val && standardEnvKeys[field]) {
299
- const envVarName = standardEnvKeys[field];
300
- const fileValue = agentEnvVars[envVarName];
301
- const processValue = process.env[envVarName];
302
- if (processValue && val !== processValue) {
303
- if (!fileValue || fileValue !== processValue) {
337
+ else if (typeof val === 'string' && val && envKeysForGateway(type, field)) {
338
+ const envKeys = envKeysForGateway(type, field);
339
+ const envValue = firstEnvValue(process.env, envKeys);
340
+ const fileValue = firstEnvValue(agentEnvVars, envKeys);
341
+ const envVarName = envValue?.name;
342
+ const processValue = envValue?.value;
343
+ if (processValue && val !== processValue && envVarName) {
344
+ if (!fileValue || fileValue.value !== processValue) {
304
345
  result.hasMismatch = true;
305
346
  result.mismatches.push({
306
347
  aid,
307
348
  type,
308
349
  field,
309
- envValue: fileValue || '(.env 中未设置)',
350
+ envValue: redactMismatchValue(fileValue?.value, field) || '(.env 中未设置)',
310
351
  configValue: `配置值与环境变量 ${envVarName} 不一致`,
311
352
  });
312
353
  }
@@ -707,11 +748,13 @@ export async function gatewaySyncEnv(args) {
707
748
  }
708
749
  // 情况2:实际值型,但与进程环境变量不一致
709
750
  else {
710
- const standardEnvKey = field === 'apiKey' ? 'ANTHROPIC_AUTH_TOKEN' : field === 'baseUrl' ? 'ANTHROPIC_BASE_URL' : null;
711
- if (standardEnvKey) {
712
- const processValue = process.env[standardEnvKey];
713
- if (processValue && val !== processValue) {
714
- block[field] = processValue;
751
+ const envKeys = envKeysForGateway(type, field);
752
+ const envValue = envKeys
753
+ ? firstEnvValue(process.env, envKeys)
754
+ : undefined;
755
+ if (envValue) {
756
+ if (val !== envValue.value) {
757
+ block[field] = envValue.value;
715
758
  hasChanges = true;
716
759
  }
717
760
  }
@@ -751,11 +794,13 @@ export async function gatewaySyncEnv(args) {
751
794
  }
752
795
  // 情况2:实际值型
753
796
  else {
754
- const standardEnvKey = field === 'apiKey' ? 'ANTHROPIC_AUTH_TOKEN' : field === 'baseUrl' ? 'ANTHROPIC_BASE_URL' : null;
755
- if (standardEnvKey) {
756
- const processValue = process.env[standardEnvKey];
757
- if (processValue && val !== processValue) {
758
- block[field] = processValue;
797
+ const envKeys = envKeysForGateway(type, field);
798
+ const envValue = envKeys
799
+ ? firstEnvValue(process.env, envKeys)
800
+ : undefined;
801
+ if (envValue) {
802
+ if (val !== envValue.value) {
803
+ block[field] = envValue.value;
759
804
  hasChanges = true;
760
805
  }
761
806
  }
@@ -1,4 +1,18 @@
1
1
  import { loadSchema } from './schema-registry.js';
2
+ const LEGACY_CODEX_EFFORT_FIELD = 'baseagents.codex.reasoning';
3
+ const CODEX_EFFORT_FIELD = 'baseagents.codex.effort';
4
+ /** Convert the legacy flattened Codex role permission key to `effort`. */
5
+ export function normalizeRoleEffortCompat(value) {
6
+ if (!isRecord(value) || !isRecord(value.permissions)
7
+ || !Object.hasOwn(value.permissions, LEGACY_CODEX_EFFORT_FIELD))
8
+ return value;
9
+ const permissions = { ...value.permissions };
10
+ if (!Object.hasOwn(permissions, CODEX_EFFORT_FIELD)) {
11
+ permissions[CODEX_EFFORT_FIELD] = permissions[LEGACY_CODEX_EFFORT_FIELD];
12
+ }
13
+ delete permissions[LEGACY_CODEX_EFFORT_FIELD];
14
+ return { ...value, permissions };
15
+ }
2
16
  export function rolePermissionFields() {
3
17
  const raw = loadSchema('role-config').raw['x-permission-fields'];
4
18
  if (!Array.isArray(raw))
@@ -41,9 +55,10 @@ export function rolePermissionFieldPatterns(field) {
41
55
  }
42
56
  /** Shared RoleService/Menu validation backed by the published role schema. */
43
57
  export function validateRoleConfig(value) {
44
- const normalized = isRecord(value) && !Object.hasOwn(value, '$schema_version')
45
- ? { ...value, $schema_version: 1 }
46
- : value;
58
+ const compatible = normalizeRoleEffortCompat(value);
59
+ const normalized = isRecord(compatible) && !Object.hasOwn(compatible, '$schema_version')
60
+ ? { ...compatible, $schema_version: 1 }
61
+ : compatible;
47
62
  const schema = loadSchema('role-config');
48
63
  if (!schema.validate(normalized)) {
49
64
  return (schema.validate.errors ?? []).map(error => ({
@@ -6,7 +6,7 @@ import { loadSchema } from './schema-registry.js';
6
6
  import { clearRoleStoreCache, getStoredRoleRegistry, isRoleName, readRoleStore, roleRegistryExists, } from './role-store.js';
7
7
  import { expectedRoleRank, isManagementRole } from './builtin-roles.js';
8
8
  import { readBuiltinRoleTemplate } from './builtin-role-templates.js';
9
- import { validateRoleConfig } from './role-schema.js';
9
+ import { normalizeRoleEffortCompat, validateRoleConfig } from './role-schema.js';
10
10
  export class RoleServiceError extends Error {
11
11
  code;
12
12
  data;
@@ -43,7 +43,7 @@ export function writeRoleRegistry(selfAid, value) {
43
43
  export function writeRoleDefinition(selfAid, roleId, value) {
44
44
  if (!isRoleName(roleId))
45
45
  throw new RoleServiceError('INVALID_ROLE_ID', `Invalid role id: ${roleId}`);
46
- const normalized = { ...value, rank: expectedRoleRank(roleId), $schema_version: 1 };
46
+ const normalized = normalizeRoleEffortCompat({ ...value, rank: expectedRoleRank(roleId), $schema_version: 1 });
47
47
  validateRoleDefinition(normalized);
48
48
  const registry = readRoleRegistry(selfAid);
49
49
  if (!registry.roles.includes(roleId)) {
@@ -93,7 +93,7 @@ export function listRoleDiagnostics(selfAid) {
93
93
  return readRoleStore(selfAid).diagnostics;
94
94
  }
95
95
  function writeRoleDefinitionFile(selfAid, roleId, value) {
96
- const normalized = { ...value, rank: expectedRoleRank(roleId), $schema_version: 1 };
96
+ const normalized = normalizeRoleEffortCompat({ ...value, rank: expectedRoleRank(roleId), $schema_version: 1 });
97
97
  validateRoleDefinition(normalized);
98
98
  const file = agentRoleConfig(selfAid, roleId);
99
99
  fs.mkdirSync(path.dirname(file), { recursive: true });
@@ -5,7 +5,7 @@ import { agentRoleConfig, agentRolesDir, agentRolesIndex, kitsRoleTemplatesDir,
5
5
  import { applyManagementRoleCeiling, expectedRoleRank, getManagementRoleDefinition } from './builtin-roles.js';
6
6
  import { readBuiltinRoleTemplate } from './builtin-role-templates.js';
7
7
  import { loadSchema } from './schema-registry.js';
8
- import { validateRoleConfig } from './role-schema.js';
8
+ import { normalizeRoleEffortCompat, validateRoleConfig } from './role-schema.js';
9
9
  const ROLE_NAME_RE = /^[a-z0-9_-]+$/;
10
10
  const BUILTIN_ROLES = ['owner', 'admin', 'member', 'visitor'];
11
11
  const cache = new Map();
@@ -154,9 +154,10 @@ function readDefinition(selfAid, roleId, diagnostics) {
154
154
  }
155
155
  if (raw === null)
156
156
  continue;
157
- const issues = validateRoleConfig(raw);
157
+ const normalizedRaw = normalizeRoleEffortCompat(raw);
158
+ const issues = validateRoleConfig(normalizedRaw);
158
159
  if (issues.length === 0) {
159
- const { $schema_version: _schemaVersion, ...definition } = raw;
160
+ const { $schema_version: _schemaVersion, ...definition } = normalizedRaw;
160
161
  const expectedRank = expectedRoleRank(roleId);
161
162
  if (definition.rank !== undefined && definition.rank !== expectedRank) {
162
163
  diagnostics.push({
@@ -20,6 +20,7 @@ import path from 'path';
20
20
  import { resolvePaths, agentDir, } from './paths.js';
21
21
  import { atomicReadJson, atomicWriteJson } from './utils/atomic-write.js';
22
22
  import { checkAgentDir, isValidAid } from './aun/aid/validation.js';
23
+ import { normalizeAidDomain } from './aun/aid/domain.js';
23
24
  import { isValidChannelName } from './core/channel-loader.js';
24
25
  import { CONFIG_SCHEMA_VERSION } from './types.js';
25
26
  import { ConfigTarget, read as cfgRead, write as cfgWrite } from './config/config-manager.js';
@@ -29,7 +30,7 @@ import { parseStableSemver } from './utils/stable-semver.js';
29
30
  /** 读 {root}/daemon.json。文件不存在返回 {},不报错。 */
30
31
  export function loadDaemonConfig() {
31
32
  const raw = atomicReadJson(resolvePaths().daemonConfig);
32
- return validateDaemonConfig(raw ?? {});
33
+ return validateDaemonConfig(raw ?? {}, false);
33
34
  }
34
35
  let eckSnapshotsConfigCache;
35
36
  /** Parse the process-level snapshot gate once for the current daemon lifecycle. */
@@ -50,9 +51,16 @@ export function isEckSnapshotsEnabled() {
50
51
  }
51
52
  /** 原子写入 {root}/daemon.json。调用方负责传完整对象(含要保留的字段)。 */
52
53
  export function saveDaemonConfig(value) {
53
- atomicWriteJson(resolvePaths().daemonConfig, validateDaemonConfig(value));
54
+ const configPath = resolvePaths().daemonConfig;
55
+ const current = atomicReadJson(configPath);
56
+ // A legacy default is irrelevant while an existing control AID is retained.
57
+ // Validate the field when it is created or changed, but do not make unrelated
58
+ // daemon.json updates fail because of a persisted, unused legacy value.
59
+ const validateAidDomain = current === null
60
+ || current.aun?.defaultAidDomain !== value.aun?.defaultAidDomain;
61
+ atomicWriteJson(configPath, validateDaemonConfig(value, validateAidDomain));
54
62
  }
55
- function validateDaemonConfig(value) {
63
+ function validateDaemonConfig(value, validateAidDomain) {
56
64
  const minEvolVersion = value.aun?.minEvolVersion;
57
65
  if (minEvolVersion !== undefined && !parseStableSemver(minEvolVersion)) {
58
66
  throw new Error('daemon.json.aun.minEvolVersion must use stable X.Y.Z format');
@@ -61,6 +69,14 @@ function validateDaemonConfig(value) {
61
69
  if (menuTokenRequired !== undefined && typeof menuTokenRequired !== 'boolean') {
62
70
  throw new Error('daemon.json.aun.menuTokenRequired must be a boolean');
63
71
  }
72
+ const defaultEncrypt = value.aun?.defaultEncrypt;
73
+ if (defaultEncrypt !== undefined && typeof defaultEncrypt !== 'boolean') {
74
+ throw new Error('daemon.json.aun.defaultEncrypt must be a boolean');
75
+ }
76
+ if (validateAidDomain && value.aun?.defaultAidDomain !== undefined) {
77
+ const defaultAidDomain = normalizeAidDomain(value.aun.defaultAidDomain, 'daemon.json.aun.defaultAidDomain');
78
+ return { ...value, aun: { ...value.aun, defaultAidDomain } };
79
+ }
64
80
  return value;
65
81
  }
66
82
  const SUPPORTED_CHANNEL_TYPES = new Set([
@@ -673,7 +673,9 @@ function parseLegacyChannelType(peerKey) {
673
673
  }
674
674
  function checkFieldOverride(ctx, field) {
675
675
  const roleDef = getRoleDefinition(ctx.role, ctx.selfAid);
676
- const fieldPermission = roleDef?.permissions?.[field];
676
+ const fieldPermission = roleDef
677
+ ? resolveRoleFieldPermission(roleDef.permissions || {}, field)
678
+ : undefined;
677
679
  if (!fieldPermission) {
678
680
  return { ok: false, reason: `Role ${ctx.role} has no field permission for ${field}` };
679
681
  }
@@ -20,16 +20,16 @@ export class AgentLoader {
20
20
  * Iterate over all EvolAgents in the registry × all registered plugins.
21
21
  * Each successful (agent, plugin) pair yields one runner instance.
22
22
  */
23
- createAll(registry, callbacks) {
23
+ createAll(registry, callbacks, creationErrors) {
24
24
  const instances = [];
25
25
  const allAgents = registry.runnableAgents();
26
26
  for (const agent of allAgents) {
27
- instances.push(...this.createForAgent(agent, callbacks));
27
+ instances.push(...this.createForAgent(agent, callbacks, creationErrors));
28
28
  }
29
29
  return instances;
30
30
  }
31
31
  /** Create runners for one EvolAgent, used by runtime hot-load. */
32
- createForAgent(agent, callbacks) {
32
+ createForAgent(agent, callbacks, creationErrors) {
33
33
  const instances = [];
34
34
  for (const [pluginName, plugin] of this.plugins) {
35
35
  if (!plugin.isEnabled(agent)) {
@@ -46,6 +46,8 @@ export class AgentLoader {
46
46
  logger.info(`✓ Runner created: agent=${instance.evolagentName} baseagent=${instance.baseagent}`);
47
47
  }
48
48
  catch (error) {
49
+ const message = error instanceof Error ? error.message : String(error);
50
+ creationErrors?.push({ evolagentName: agent.name, baseagent: pluginName, message });
49
51
  logger.error(`✗ Failed to create runner for agent='${agent.name}' baseagent='${pluginName}':`, error);
50
52
  }
51
53
  }
@@ -74,7 +74,6 @@ export class BootstrapService {
74
74
  agentName: aid,
75
75
  }), { kind: 'result.text', text, isFinal: true });
76
76
  this.eventBus.publish({ type: 'agent:bootstrap-started', aid, channel: channelType || ctx.channelKey, timestamp: Date.now() });
77
- await this.sendAunBindingCredentialIfSupported(ctx.adapter, recipientId, agentName, baseagent);
78
77
  logger.info(`[Bootstrap] Started for ${aid} via ${ctx.channelKey} (${ctx.source})`);
79
78
  return true;
80
79
  }
@@ -154,15 +153,4 @@ export class BootstrapService {
154
153
  logger.warn(`[Bootstrap] Failed to publish agent.md for ${aid}: ${e instanceof Error ? e.message : String(e)}`);
155
154
  }
156
155
  }
157
- async sendAunBindingCredentialIfSupported(adapter, owner, name, baseagent) {
158
- const sendBinding = adapter._sendBindingCredential;
159
- if (typeof sendBinding !== 'function')
160
- return;
161
- try {
162
- await sendBinding(owner, name, baseagent);
163
- }
164
- catch (e) {
165
- logger.warn(`[Bootstrap] Binding credential failed: ${e instanceof Error ? e.message : String(e)}`);
166
- }
167
- }
168
156
  }
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import os from 'os';
3
3
  import path from 'path';
4
- import { execFileSync } from 'child_process';
4
+ import { execCodexCliSync } from '../../../utils/codex-cli.js';
5
5
  function listDirectories(dir) {
6
6
  try {
7
7
  if (!fs.existsSync(dir))
@@ -34,7 +34,7 @@ function discoverSkills(ctx) {
34
34
  }
35
35
  function runCodexJson(args) {
36
36
  try {
37
- const output = execFileSync('codex', args, {
37
+ const output = execCodexCliSync(args, {
38
38
  encoding: 'utf-8',
39
39
  timeout: 3000,
40
40
  stdio: ['ignore', 'pipe', 'pipe'],
@@ -27,9 +27,11 @@ export function showActivitiesPolicy(mode, chatType, _identity) {
27
27
  // ── ChannelLoader ──────────────────────────────────────────────────────────
28
28
  export class ChannelLoader {
29
29
  processDebug;
30
+ aunDefaultEncrypt;
30
31
  plugins = new Map();
31
- constructor(processDebug) {
32
+ constructor(processDebug, aunDefaultEncrypt) {
32
33
  this.processDebug = processDebug;
34
+ this.aunDefaultEncrypt = aunDefaultEncrypt;
33
35
  }
34
36
  register(plugin) {
35
37
  if (this.plugins.has(plugin.name)) {
@@ -51,6 +53,7 @@ export class ChannelLoader {
51
53
  agentName: agent.aid,
52
54
  defaultProjectPath: agent.config.projects?.defaultPath ?? process.cwd(),
53
55
  debug: this.processDebug,
56
+ aunDefaultEncrypt: this.aunDefaultEncrypt,
54
57
  };
55
58
  // Build the full list of config instances to create.
56
59
  // AUN is synthesised from agent.aid; any explicit aun entry in channels[] is skipped.
@@ -61,6 +64,8 @@ export class ChannelLoader {
61
64
  aid: agent.aid,
62
65
  owner: agent.getOwner(aunEffName),
63
66
  enabled: true,
67
+ keystorePath: agent.config.aun?.keystorePath,
68
+ gatewayUrl: agent.config.aun?.gatewayUrl,
64
69
  };
65
70
  const configInsts = [aunInst];
66
71
  for (const inst of agent.config.channels) {
@@ -240,7 +245,14 @@ export function buildReloadHooks(deps) {
240
245
  const isImplicitAun = channelName === aunEffName;
241
246
  // Find config instance: implicit AUN gets a synthetic entry; others scan channels[].
242
247
  const cfgInst = isImplicitAun
243
- ? { type: 'aun', name: aunEffName, aid, enabled: true }
248
+ ? {
249
+ type: 'aun',
250
+ name: aunEffName,
251
+ aid,
252
+ enabled: true,
253
+ keystorePath: agent.config?.aun?.keystorePath,
254
+ gatewayUrl: agent.config?.aun?.gatewayUrl,
255
+ }
244
256
  : (() => {
245
257
  const agentChannels = agent.config?.channels ?? [];
246
258
  return agentChannels.find((i) => {
@@ -257,6 +269,7 @@ export function buildReloadHooks(deps) {
257
269
  agentName: agent.aid ?? agent.config?.aid,
258
270
  defaultProjectPath: agent.config?.projects?.defaultPath ?? process.cwd(),
259
271
  debug: channelLoader.processDebug,
272
+ aunDefaultEncrypt: channelLoader.aunDefaultEncrypt,
260
273
  };
261
274
  const plugin = channelLoader.getPlugin(cfgInst.type);
262
275
  if (!plugin)
@@ -372,7 +372,7 @@ export class CommandHandler {
372
372
  const effortDecision = validateRuntimeStringFieldOverride({
373
373
  selfAid: definition.agentAid,
374
374
  role,
375
- field: `baseagents.${base}.${base === 'codex' ? 'reasoning' : 'effort'}`,
375
+ field: `baseagents.${base}.effort`,
376
376
  value: definition.execution.effort,
377
377
  });
378
378
  if (!effortDecision.ok)
@@ -30,9 +30,10 @@ export function isEvolMenuVersionGateEnabled() {
30
30
  export function isAunMenuTokenRequired() {
31
31
  return loadDaemonConfig().aun?.menuTokenRequired === true;
32
32
  }
33
- export function evolMenuResponseTransportMetadata(_requestEncrypted) {
33
+ export function evolMenuResponseTransportMetadata() {
34
34
  return {
35
- encrypted: true,
35
+ // Clear inherited request state so AUNChannel applies daemon aun.defaultEncrypt.
36
+ encrypted: undefined,
36
37
  protectedHeaders: { ec_version: readInstalledEvolcoreVersion() },
37
38
  };
38
39
  }