nexus-agents 2.57.0 → 2.58.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-7EYQBG3W.js} +4 -4
  2. package/dist/{chunk-QNYNQ257.js → chunk-GJ5BJU7A.js} +2 -2
  3. package/dist/{chunk-ZUWOFHNC.js → chunk-JKDHWOQL.js} +2 -2
  4. package/dist/{chunk-ZL3IBCH6.js → chunk-JLYJQ7OG.js} +6024 -5821
  5. package/dist/chunk-JLYJQ7OG.js.map +1 -0
  6. package/dist/{chunk-BOZ26RIB.js → chunk-L3NHOUEX.js} +52 -4
  7. package/dist/chunk-L3NHOUEX.js.map +1 -0
  8. package/dist/{chunk-SXWZS2V4.js → chunk-YQAOMDR2.js} +1 -1
  9. package/dist/chunk-YQAOMDR2.js.map +1 -0
  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-KSQEYBDA.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-7EYQBG3W.js.map} +0 -0
  27. /package/dist/{chunk-QNYNQ257.js.map → chunk-GJ5BJU7A.js.map} +0 -0
  28. /package/dist/{chunk-ZUWOFHNC.js.map → chunk-JKDHWOQL.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-KSQEYBDA.js.map} +0 -0
@@ -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