nexus-agents 2.57.0 → 2.59.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.
Files changed (32) hide show
  1. package/dist/{chunk-Y7CD6AZW.js → chunk-7USAZET2.js} +4 -4
  2. package/dist/{chunk-ZUWOFHNC.js → chunk-JKDHWOQL.js} +2 -2
  3. package/dist/{chunk-BOZ26RIB.js → chunk-L3NHOUEX.js} +52 -4
  4. package/dist/chunk-L3NHOUEX.js.map +1 -0
  5. package/dist/{chunk-ZL3IBCH6.js → chunk-V2Z7EHSY.js} +6047 -5820
  6. package/dist/chunk-V2Z7EHSY.js.map +1 -0
  7. package/dist/{chunk-SXWZS2V4.js → chunk-YQAOMDR2.js} +1 -1
  8. package/dist/chunk-YQAOMDR2.js.map +1 -0
  9. package/dist/{chunk-QNYNQ257.js → chunk-ZOQQGA3L.js} +2 -2
  10. package/dist/cli.js +9 -7
  11. package/dist/cli.js.map +1 -1
  12. package/dist/{consensus-vote-CQ2JP6DC.js → consensus-vote-HDM6HA5Z.js} +3 -3
  13. package/dist/{dist-4LDAFGC5.js → dist-RLMRWMYO.js} +994 -779
  14. package/dist/dist-RLMRWMYO.js.map +1 -0
  15. package/dist/{expert-bridge-LT7PKUPS.js → expert-bridge-BHTUNALT.js} +2 -2
  16. package/dist/{factory-FZ2KSVYC.js → factory-6MT5VKI3.js} +2 -2
  17. package/dist/index.d.ts +72 -45
  18. package/dist/index.js +6 -6
  19. package/dist/index.js.map +1 -1
  20. package/dist/{setup-command-6EJONTOU.js → setup-command-QAGEWX7G.js} +4 -4
  21. package/package.json +5 -5
  22. package/dist/chunk-BOZ26RIB.js.map +0 -1
  23. package/dist/chunk-SXWZS2V4.js.map +0 -1
  24. package/dist/chunk-ZL3IBCH6.js.map +0 -1
  25. package/dist/dist-4LDAFGC5.js.map +0 -1
  26. /package/dist/{chunk-Y7CD6AZW.js.map → chunk-7USAZET2.js.map} +0 -0
  27. /package/dist/{chunk-ZUWOFHNC.js.map → chunk-JKDHWOQL.js.map} +0 -0
  28. /package/dist/{chunk-QNYNQ257.js.map → chunk-ZOQQGA3L.js.map} +0 -0
  29. /package/dist/{consensus-vote-CQ2JP6DC.js.map → consensus-vote-HDM6HA5Z.js.map} +0 -0
  30. /package/dist/{expert-bridge-LT7PKUPS.js.map → expert-bridge-BHTUNALT.js.map} +0 -0
  31. /package/dist/{factory-FZ2KSVYC.js.map → factory-6MT5VKI3.js.map} +0 -0
  32. /package/dist/{setup-command-6EJONTOU.js.map → setup-command-QAGEWX7G.js.map} +0 -0
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-633WH2ML.js";
10
10
  import {
11
11
  createAllAdapters
12
- } from "./chunk-SXWZS2V4.js";
12
+ } from "./chunk-YQAOMDR2.js";
13
13
  import {
14
14
  CliNameSchema,
15
15
  DEFAULT_CAPABILITIES,
@@ -35,7 +35,7 @@ import {
35
35
  } from "./chunk-CLYZ7FWP.js";
36
36
 
37
37
  // src/version.ts
38
- var VERSION = true ? "2.57.0" : "dev";
38
+ var VERSION = true ? "2.59.0" : "dev";
39
39
 
40
40
  // src/config/schemas-core.ts
41
41
  import { z } from "zod";
@@ -2024,7 +2024,7 @@ async function runDoctorFix(result) {
2024
2024
  writeLine2("\u2500".repeat(40));
2025
2025
  let fixCount = 0;
2026
2026
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2027
- const { runSetup } = await import("./setup-command-6EJONTOU.js");
2027
+ const { runSetup } = await import("./setup-command-QAGEWX7G.js");
2028
2028
  const setupResult = runSetup({
2029
2029
  skipMcp: true,
2030
2030
  skipRules: true,
@@ -2133,4 +2133,4 @@ export {
2133
2133
  startStdioServer,
2134
2134
  closeServer
2135
2135
  };
2136
- //# sourceMappingURL=chunk-Y7CD6AZW.js.map
2136
+ //# sourceMappingURL=chunk-7USAZET2.js.map
@@ -38,7 +38,7 @@ function adaptCompositeRouter(compositeRouter) {
38
38
  }
39
39
  async function getRouter() {
40
40
  if (cachedRouter !== null) return cachedRouter;
41
- const { createAllAdapters } = await import("./factory-FZ2KSVYC.js");
41
+ const { createAllAdapters } = await import("./factory-6MT5VKI3.js");
42
42
  const { createCompositeRouter } = await import("./composite-router-A7URDW4X.js");
43
43
  const adapters = createAllAdapters();
44
44
  if (adapters.size === 0) return null;
@@ -136,4 +136,4 @@ ${prompt}`;
136
136
  export {
137
137
  executeExpert
138
138
  };
139
- //# sourceMappingURL=chunk-ZUWOFHNC.js.map
139
+ //# sourceMappingURL=chunk-JKDHWOQL.js.map
@@ -29,7 +29,7 @@ import {
29
29
  getAvailableClis,
30
30
  isCliAvailable,
31
31
  withTimeout
32
- } from "./chunk-SXWZS2V4.js";
32
+ } from "./chunk-YQAOMDR2.js";
33
33
  import {
34
34
  AgentError,
35
35
  CACHE_TIMEOUTS,
@@ -870,6 +870,38 @@ function isToolDenied(toolName) {
870
870
  return UNBYPASSABLE_TOOL_NAMES.includes(toolName);
871
871
  }
872
872
 
873
+ // src/security/access-constraint-deriver/tool-risk.ts
874
+ var READ_ONLY_TOOLS2 = /* @__PURE__ */ new Set([
875
+ // Discovery / listing
876
+ "list_experts",
877
+ "list_workflows",
878
+ // Research reads
879
+ "research_query",
880
+ "research_analyze",
881
+ "research_catalog_review",
882
+ "research_synthesize",
883
+ // Memory reads
884
+ "memory_query",
885
+ "memory_stats",
886
+ // Observability
887
+ "weather_report",
888
+ "query_trace",
889
+ "query_task_state",
890
+ // Codebase intelligence (read-only over local files)
891
+ "search_codebase",
892
+ "extract_symbols",
893
+ // Repo analysis (read-only)
894
+ "repo_analyze",
895
+ "repo_security_plan",
896
+ // Routing recommendation (no side effects — returns recommendation)
897
+ "delegate_to_model",
898
+ // Registry import (returns a draft template — does not write)
899
+ "registry_import"
900
+ ]);
901
+ function isRiskyTool(toolName) {
902
+ return !READ_ONLY_TOOLS2.has(toolName);
903
+ }
904
+
873
905
  // src/security/access-constraint-deriver/enforcer.ts
874
906
  function checkAccess(toolName, policy, args) {
875
907
  if (isToolDenied(toolName)) {
@@ -888,12 +920,28 @@ function checkAccess(toolName, policy, args) {
888
920
  }
889
921
  if (policy.allowedTools === "*") return { decision: "allow" };
890
922
  if (policy.allowedTools.includes(toolName)) return { decision: "allow" };
891
- if (policy.mode === "audit") {
923
+ return decideOnViolation(toolName, policy.mode);
924
+ }
925
+ function decideOnViolation(toolName, mode) {
926
+ if (mode === "audit") {
892
927
  return {
893
928
  decision: "log-and-allow",
894
929
  warning: `tool "${toolName}" not in derived policy (audit mode)`
895
930
  };
896
931
  }
932
+ if (mode === "confirm_risky") {
933
+ if (!isRiskyTool(toolName)) {
934
+ return {
935
+ decision: "log-and-allow",
936
+ warning: `tool "${toolName}" not in derived policy (confirm_risky mode, read-only \u2014 would have required human approval, allowed because read-only)`
937
+ };
938
+ }
939
+ return {
940
+ decision: "deny",
941
+ reason: `tool "${toolName}" not in derived policy (confirm_risky mode, risky \u2014 would have required human approval; denied for now, add to allowedTools or run in audit mode to allow)`,
942
+ matchedRule: "allowedTools:confirm_risky"
943
+ };
944
+ }
897
945
  return {
898
946
  decision: "deny",
899
947
  reason: `tool "${toolName}" not in derived policy`,
@@ -12807,7 +12855,7 @@ async function processVotesWithCascade(votes, opts) {
12807
12855
  var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
12808
12856
  async function runContrarianCheck(proposal, log) {
12809
12857
  try {
12810
- const { executeExpert } = await import("./expert-bridge-LT7PKUPS.js");
12858
+ const { executeExpert } = await import("./expert-bridge-BHTUNALT.js");
12811
12859
  const prompt = [
12812
12860
  "You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
12813
12861
  "Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
@@ -13180,4 +13228,4 @@ export {
13180
13228
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
13181
13229
  registerConsensusVoteTool
13182
13230
  };
13183
- //# sourceMappingURL=chunk-BOZ26RIB.js.map
13231
+ //# sourceMappingURL=chunk-L3NHOUEX.js.map