nexus-agents 2.33.2 → 2.40.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 (84) hide show
  1. package/dist/{adaptive-memory-CHKKA4DI.js → adaptive-memory-VPXQL3EC.js} +3 -3
  2. package/dist/{chunk-72OMG44X.js → chunk-5DSQLHVJ.js} +2 -2
  3. package/dist/{chunk-YYPA3CBH.js → chunk-66QFTVYA.js} +3 -3
  4. package/dist/{chunk-WDNE6K4W.js → chunk-6PLFRWIP.js} +163 -6
  5. package/dist/chunk-6PLFRWIP.js.map +1 -0
  6. package/dist/{chunk-3RSILLFN.js → chunk-6VLI37KP.js} +2 -2
  7. package/dist/{chunk-7GKB7LPG.js → chunk-7KQOZERX.js} +2 -2
  8. package/dist/{chunk-XH6CQMDU.js → chunk-B422NMVP.js} +2 -2
  9. package/dist/{chunk-DWZZZGZD.js → chunk-BFRD2E7X.js} +24 -3
  10. package/dist/{chunk-DWZZZGZD.js.map → chunk-BFRD2E7X.js.map} +1 -1
  11. package/dist/{chunk-SI4GQN6Q.js → chunk-DDPRXENZ.js} +6 -6
  12. package/dist/{chunk-SKUW2NOC.js → chunk-EWWFRAJI.js} +2 -2
  13. package/dist/{chunk-FBS5MCJL.js → chunk-FEONLEBT.js} +2 -2
  14. package/dist/{chunk-3PNNEWR6.js → chunk-IXG4WPEZ.js} +3 -3
  15. package/dist/{chunk-QGB7QNEL.js → chunk-LHHVH6FN.js} +4 -4
  16. package/dist/{chunk-YT7REHTV.js → chunk-MBMXVGUJ.js} +2 -2
  17. package/dist/{chunk-MI2RHGLU.js → chunk-NQSX4YMA.js} +2 -2
  18. package/dist/{chunk-SOPWV5AT.js → chunk-R652E64E.js} +26 -26
  19. package/dist/{chunk-SOPWV5AT.js.map → chunk-R652E64E.js.map} +1 -1
  20. package/dist/{chunk-KDY5C63A.js → chunk-UH3RCHXZ.js} +2 -2
  21. package/dist/{chunk-WBMWVYOM.js → chunk-WPO7E2G3.js} +4 -4
  22. package/dist/{chunk-WKBCTGLE.js → chunk-XZ4UAABD.js} +3 -3
  23. package/dist/{chunk-BIZLM4CK.js → chunk-ZLLHK26B.js} +6 -6
  24. package/dist/{chunk-NOITIOCN.js → chunk-ZU7CZWMO.js} +2 -2
  25. package/dist/{cli-circuit-breaker-VRR5DKH3.js → cli-circuit-breaker-ECO3WMZ5.js} +4 -4
  26. package/dist/cli.d.ts +3 -1
  27. package/dist/cli.js +695 -137
  28. package/dist/cli.js.map +1 -1
  29. package/dist/{composite-router-E3BGQGLP.js → composite-router-K47YCABM.js} +2 -2
  30. package/dist/{consensus-vote-PP4WBNZV.js → consensus-vote-U465HI3O.js} +7 -7
  31. package/dist/{doctor-deep-MVG45YNL.js → doctor-deep-33EDFINE.js} +3 -3
  32. package/dist/{expert-bridge-SHKCEXGU.js → expert-bridge-VDNOTL7I.js} +3 -3
  33. package/dist/{factory-EISLNRL5.js → factory-RYP7KRFT.js} +4 -4
  34. package/dist/{factory-VJLXQYUO.js → factory-WH7M7GDL.js} +5 -5
  35. package/dist/index.d.ts +19 -4
  36. package/dist/index.js +18 -18
  37. package/dist/{issue-triage-OOKMZAPK.js → issue-triage-B2X5TTIW.js} +4 -4
  38. package/dist/{mcp-config-4B54K5RR.js → mcp-config-HU4CKV2F.js} +3 -3
  39. package/dist/{mobimem-OWZTGHYA.js → mobimem-3CY36FRY.js} +2 -2
  40. package/dist/{repo-security-plan-ORAZDJYH.js → repo-security-plan-PIAV5MVL.js} +3 -3
  41. package/dist/research-helpers-synthesize-DARFXHKG.js +10 -0
  42. package/dist/{routing-memory-HLNGW4BW.js → routing-memory-767SNGSY.js} +2 -2
  43. package/dist/{session-memory-YQPEWDFR.js → session-memory-PXCHCJJP.js} +3 -3
  44. package/dist/{setup-command-LQO75PWC.js → setup-command-7QJR42JE.js} +7 -7
  45. package/dist/{setup-config-FSMXLJ37.js → setup-config-QYB5ULQ2.js} +3 -3
  46. package/dist/{weather-report-J5EIDKVM.js → weather-report-DLCBVZK7.js} +2 -2
  47. package/package.json +8 -8
  48. package/dist/chunk-WDNE6K4W.js.map +0 -1
  49. package/dist/research-helpers-synthesize-EAJDTBFK.js +0 -10
  50. /package/dist/{adaptive-memory-CHKKA4DI.js.map → adaptive-memory-VPXQL3EC.js.map} +0 -0
  51. /package/dist/{chunk-72OMG44X.js.map → chunk-5DSQLHVJ.js.map} +0 -0
  52. /package/dist/{chunk-YYPA3CBH.js.map → chunk-66QFTVYA.js.map} +0 -0
  53. /package/dist/{chunk-3RSILLFN.js.map → chunk-6VLI37KP.js.map} +0 -0
  54. /package/dist/{chunk-7GKB7LPG.js.map → chunk-7KQOZERX.js.map} +0 -0
  55. /package/dist/{chunk-XH6CQMDU.js.map → chunk-B422NMVP.js.map} +0 -0
  56. /package/dist/{chunk-SI4GQN6Q.js.map → chunk-DDPRXENZ.js.map} +0 -0
  57. /package/dist/{chunk-SKUW2NOC.js.map → chunk-EWWFRAJI.js.map} +0 -0
  58. /package/dist/{chunk-FBS5MCJL.js.map → chunk-FEONLEBT.js.map} +0 -0
  59. /package/dist/{chunk-3PNNEWR6.js.map → chunk-IXG4WPEZ.js.map} +0 -0
  60. /package/dist/{chunk-QGB7QNEL.js.map → chunk-LHHVH6FN.js.map} +0 -0
  61. /package/dist/{chunk-YT7REHTV.js.map → chunk-MBMXVGUJ.js.map} +0 -0
  62. /package/dist/{chunk-MI2RHGLU.js.map → chunk-NQSX4YMA.js.map} +0 -0
  63. /package/dist/{chunk-KDY5C63A.js.map → chunk-UH3RCHXZ.js.map} +0 -0
  64. /package/dist/{chunk-WBMWVYOM.js.map → chunk-WPO7E2G3.js.map} +0 -0
  65. /package/dist/{chunk-WKBCTGLE.js.map → chunk-XZ4UAABD.js.map} +0 -0
  66. /package/dist/{chunk-BIZLM4CK.js.map → chunk-ZLLHK26B.js.map} +0 -0
  67. /package/dist/{chunk-NOITIOCN.js.map → chunk-ZU7CZWMO.js.map} +0 -0
  68. /package/dist/{cli-circuit-breaker-VRR5DKH3.js.map → cli-circuit-breaker-ECO3WMZ5.js.map} +0 -0
  69. /package/dist/{composite-router-E3BGQGLP.js.map → composite-router-K47YCABM.js.map} +0 -0
  70. /package/dist/{consensus-vote-PP4WBNZV.js.map → consensus-vote-U465HI3O.js.map} +0 -0
  71. /package/dist/{doctor-deep-MVG45YNL.js.map → doctor-deep-33EDFINE.js.map} +0 -0
  72. /package/dist/{expert-bridge-SHKCEXGU.js.map → expert-bridge-VDNOTL7I.js.map} +0 -0
  73. /package/dist/{factory-EISLNRL5.js.map → factory-RYP7KRFT.js.map} +0 -0
  74. /package/dist/{factory-VJLXQYUO.js.map → factory-WH7M7GDL.js.map} +0 -0
  75. /package/dist/{issue-triage-OOKMZAPK.js.map → issue-triage-B2X5TTIW.js.map} +0 -0
  76. /package/dist/{mcp-config-4B54K5RR.js.map → mcp-config-HU4CKV2F.js.map} +0 -0
  77. /package/dist/{mobimem-OWZTGHYA.js.map → mobimem-3CY36FRY.js.map} +0 -0
  78. /package/dist/{repo-security-plan-ORAZDJYH.js.map → repo-security-plan-PIAV5MVL.js.map} +0 -0
  79. /package/dist/{research-helpers-synthesize-EAJDTBFK.js.map → research-helpers-synthesize-DARFXHKG.js.map} +0 -0
  80. /package/dist/{routing-memory-HLNGW4BW.js.map → routing-memory-767SNGSY.js.map} +0 -0
  81. /package/dist/{session-memory-YQPEWDFR.js.map → session-memory-PXCHCJJP.js.map} +0 -0
  82. /package/dist/{setup-command-LQO75PWC.js.map → setup-command-7QJR42JE.js.map} +0 -0
  83. /package/dist/{setup-config-FSMXLJ37.js.map → setup-config-QYB5ULQ2.js.map} +0 -0
  84. /package/dist/{weather-report-J5EIDKVM.js.map → weather-report-DLCBVZK7.js.map} +0 -0
@@ -2,9 +2,9 @@ import {
2
2
  AdaptiveMemoryBackend,
3
3
  DEFAULT_SCORING_CONFIG,
4
4
  createAdaptiveMemory
5
- } from "./chunk-72OMG44X.js";
5
+ } from "./chunk-5DSQLHVJ.js";
6
6
  import "./chunk-633WH2ML.js";
7
- import "./chunk-DWZZZGZD.js";
7
+ import "./chunk-BFRD2E7X.js";
8
8
  import "./chunk-CLYZ7FWP.js";
9
9
  import "./chunk-UP2VWCW5.js";
10
10
  export {
@@ -12,4 +12,4 @@ export {
12
12
  DEFAULT_SCORING_CONFIG,
13
13
  createAdaptiveMemory
14
14
  };
15
- //# sourceMappingURL=adaptive-memory-CHKKA4DI.js.map
15
+ //# sourceMappingURL=adaptive-memory-VPXQL3EC.js.map
@@ -11,7 +11,7 @@ import {
11
11
  formatZodError,
12
12
  getTimeProvider,
13
13
  ok
14
- } from "./chunk-DWZZZGZD.js";
14
+ } from "./chunk-BFRD2E7X.js";
15
15
 
16
16
  // src/context/memory-backend-types.ts
17
17
  import { z } from "zod";
@@ -941,4 +941,4 @@ export {
941
941
  AdaptiveMemoryBackend,
942
942
  createAdaptiveMemory
943
943
  };
944
- //# sourceMappingURL=chunk-72OMG44X.js.map
944
+ //# sourceMappingURL=chunk-5DSQLHVJ.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  GitHubProvider,
3
3
  ScmError
4
- } from "./chunk-MI2RHGLU.js";
4
+ } from "./chunk-NQSX4YMA.js";
5
5
  import {
6
6
  CACHE_TIMEOUTS,
7
7
  createLogger,
8
8
  err,
9
9
  getTimeProvider,
10
10
  ok
11
- } from "./chunk-DWZZZGZD.js";
11
+ } from "./chunk-BFRD2E7X.js";
12
12
 
13
13
  // src/security/trust-types.ts
14
14
  import { z } from "zod";
@@ -1582,4 +1582,4 @@ export {
1582
1582
  IssueTriage,
1583
1583
  createIssueTriage
1584
1584
  };
1585
- //# sourceMappingURL=chunk-YYPA3CBH.js.map
1585
+ //# sourceMappingURL=chunk-66QFTVYA.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SessionMemory
3
- } from "./chunk-XH6CQMDU.js";
3
+ } from "./chunk-B422NMVP.js";
4
4
  import {
5
5
  AdaptiveMemoryBackend,
6
6
  HybridMemoryBackend,
@@ -9,7 +9,7 @@ import {
9
9
  getMemoryEntry,
10
10
  memoryExists,
11
11
  memoryRowToEntry
12
- } from "./chunk-72OMG44X.js";
12
+ } from "./chunk-5DSQLHVJ.js";
13
13
  import {
14
14
  stringifyValue,
15
15
  tokenizeFiltered
@@ -21,7 +21,7 @@ import {
21
21
  getAvailableClis,
22
22
  isCliAvailable,
23
23
  withTimeout
24
- } from "./chunk-3PNNEWR6.js";
24
+ } from "./chunk-IXG4WPEZ.js";
25
25
  import {
26
26
  AgentError,
27
27
  CACHE_TIMEOUTS,
@@ -66,7 +66,7 @@ import {
66
66
  resolveVoteTimeout,
67
67
  toRateLimitError,
68
68
  validateTimeout
69
- } from "./chunk-DWZZZGZD.js";
69
+ } from "./chunk-BFRD2E7X.js";
70
70
  import {
71
71
  OUTCOMES_FILE,
72
72
  ensureLearningDir
@@ -795,6 +795,157 @@ function contextForLogging(ctx) {
795
795
  };
796
796
  }
797
797
 
798
+ // src/security/access-constraint-deriver/denylist.ts
799
+ var UNBYPASSABLE_PATH_PATTERNS = [
800
+ // Environment files
801
+ ".env",
802
+ ".env.*",
803
+ "**/.env",
804
+ "**/.env.*",
805
+ // SSH credentials
806
+ "~/.ssh/**",
807
+ "**/ssh/id_*",
808
+ "**/*_rsa",
809
+ "**/*_ed25519",
810
+ "**/*.pem",
811
+ // Cloud credentials
812
+ "~/.aws/**",
813
+ "~/.azure/**",
814
+ "~/.gcp/**",
815
+ "~/.config/gcloud/**",
816
+ "~/.kube/config",
817
+ // Unix secret files
818
+ "/etc/shadow",
819
+ "/etc/sudoers",
820
+ "/etc/sudoers.d/**",
821
+ // Common secret file patterns
822
+ "**/secrets.*",
823
+ "**/credentials.*",
824
+ "**/private_key.*",
825
+ "**/id_rsa*"
826
+ ];
827
+ var UNBYPASSABLE_TOOL_NAMES = [
828
+ // Destructive git operations
829
+ "git_push_force",
830
+ "git_reset_hard",
831
+ "git_branch_delete_force",
832
+ "git_clean_force",
833
+ // Destructive filesystem
834
+ "rm_recursive_force",
835
+ "chmod_recursive",
836
+ // Identity / auth mutations
837
+ "ssh_add_key",
838
+ "gpg_add_key",
839
+ "npm_publish_force",
840
+ // Remote destruction
841
+ "github_repo_delete",
842
+ "github_org_transfer",
843
+ "aws_account_close"
844
+ ];
845
+ function compileGlobToRegex(pattern) {
846
+ const pat = pattern.toLowerCase();
847
+ const escaped = pat.replace(/[\\.+^$()|[\]{}]/g, "\\$&").replace(/\*\*/g, "__DOUBLESTAR__").replace(/\*/g, "[^/]*").replace(/__DOUBLESTAR__/g, ".*");
848
+ const anchored = escaped.startsWith("~/") ? `(^|/)${escaped.slice(2)}$` : escaped.startsWith("/") ? `^${escaped}$` : `(^|/)${escaped}$`;
849
+ return new RegExp(anchored);
850
+ }
851
+ var COMPILED_PATH_PATTERNS = UNBYPASSABLE_PATH_PATTERNS.map((pattern) => ({
852
+ pattern,
853
+ regex: compileGlobToRegex(pattern)
854
+ }));
855
+ function isPathDenied(path4) {
856
+ const normalized = path4.toLowerCase();
857
+ return COMPILED_PATH_PATTERNS.some((c) => c.regex.test(normalized));
858
+ }
859
+ function isToolDenied(toolName) {
860
+ return UNBYPASSABLE_TOOL_NAMES.includes(toolName);
861
+ }
862
+
863
+ // src/security/access-constraint-deriver/enforcer.ts
864
+ function checkAccess(toolName, policy, args) {
865
+ if (isToolDenied(toolName)) {
866
+ return {
867
+ decision: "deny",
868
+ reason: `tool "${toolName}" is on the unbypassable deny-tool list`,
869
+ matchedRule: "unbypassable:tool"
870
+ };
871
+ }
872
+ if (typeof args?.path === "string" && args.path.length > 0 && isPathDenied(args.path)) {
873
+ return {
874
+ decision: "deny",
875
+ reason: `path "${args.path}" is on the unbypassable deny-path list`,
876
+ matchedRule: "unbypassable:path"
877
+ };
878
+ }
879
+ if (policy.allowedTools === "*") return { decision: "allow" };
880
+ if (policy.allowedTools.includes(toolName)) return { decision: "allow" };
881
+ if (policy.mode === "audit") {
882
+ return {
883
+ decision: "log-and-allow",
884
+ warning: `tool "${toolName}" not in derived policy (audit mode)`
885
+ };
886
+ }
887
+ return {
888
+ decision: "deny",
889
+ reason: `tool "${toolName}" not in derived policy`,
890
+ matchedRule: "allowedTools"
891
+ };
892
+ }
893
+
894
+ // src/security/access-constraint-deriver/mcp-guard.ts
895
+ import { AsyncLocalStorage as AsyncLocalStorage2 } from "async_hooks";
896
+ var accessPolicyStorage = new AsyncLocalStorage2();
897
+ function getActivePolicy() {
898
+ return accessPolicyStorage.getStore();
899
+ }
900
+ function denyToToolResult(decision, requestId) {
901
+ return {
902
+ isError: true,
903
+ content: [
904
+ {
905
+ type: "text",
906
+ text: `access denied: ${decision.reason} (rule: ${decision.matchedRule}, request: ${requestId})`
907
+ }
908
+ ]
909
+ };
910
+ }
911
+
912
+ // src/security/access-constraint-deriver/chain-adapter.ts
913
+ function toGuardArgs(args) {
914
+ if (typeof args !== "object" || args === null) return void 0;
915
+ const path4 = args["path"];
916
+ return typeof path4 === "string" && path4.length > 0 ? { path: path4 } : void 0;
917
+ }
918
+ function createAccessPolicyChainMiddleware(toolName) {
919
+ return async (args, ctx, next) => {
920
+ const policy = getActivePolicy();
921
+ if (policy === void 0 || policy.mode === "off") {
922
+ return next(args, ctx);
923
+ }
924
+ const decision = checkAccess(toolName, policy, toGuardArgs(args));
925
+ if (decision.decision === "allow") {
926
+ return next(args, ctx);
927
+ }
928
+ if (decision.decision === "log-and-allow") {
929
+ ctx.logger.warn("access-policy: audit violation", {
930
+ tool: toolName,
931
+ warning: decision.warning,
932
+ policySource: policy.source,
933
+ requestId: ctx.requestContext.requestId
934
+ });
935
+ return next(args, ctx);
936
+ }
937
+ ctx.logger.info("access-policy: tool call denied", {
938
+ tool: toolName,
939
+ reason: decision.reason,
940
+ matchedRule: decision.matchedRule,
941
+ policySource: policy.source,
942
+ mode: policy.mode,
943
+ requestId: ctx.requestContext.requestId
944
+ });
945
+ return denyToToolResult(decision, ctx.requestContext.requestId);
946
+ };
947
+ }
948
+
798
949
  // src/mcp/middleware/middleware-chain.ts
799
950
  function errorResult(message, requestId) {
800
951
  return {
@@ -939,6 +1090,11 @@ function addTimeoutMiddleware(middlewares, config, skip2) {
939
1090
  middlewares.push(createTimeoutMiddleware(guard, config.toolName));
940
1091
  }
941
1092
  }
1093
+ function addAccessPolicyMiddleware(middlewares, config, skip2) {
1094
+ if (skip2.accessPolicy !== true) {
1095
+ middlewares.push(createAccessPolicyChainMiddleware(config.toolName));
1096
+ }
1097
+ }
942
1098
  function buildMiddlewareStack(config) {
943
1099
  const skip2 = config.skip ?? {};
944
1100
  const middlewares = [];
@@ -947,6 +1103,7 @@ function buildMiddlewareStack(config) {
947
1103
  addRateLimitMiddleware(middlewares, config, skip2);
948
1104
  addValidationMiddleware(middlewares, config, skip2);
949
1105
  addPolicyMiddleware(middlewares, config, skip2);
1106
+ addAccessPolicyMiddleware(middlewares, config, skip2);
950
1107
  addTimeoutMiddleware(middlewares, config, skip2);
951
1108
  return middlewares;
952
1109
  }
@@ -12347,7 +12504,7 @@ async function processVotesWithCascade(votes, opts) {
12347
12504
  var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
12348
12505
  async function runContrarianCheck(proposal, log) {
12349
12506
  try {
12350
- const { executeExpert } = await import("./expert-bridge-SHKCEXGU.js");
12507
+ const { executeExpert } = await import("./expert-bridge-VDNOTL7I.js");
12351
12508
  const prompt = [
12352
12509
  "You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
12353
12510
  "Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
@@ -12718,4 +12875,4 @@ export {
12718
12875
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
12719
12876
  registerConsensusVoteTool
12720
12877
  };
12721
- //# sourceMappingURL=chunk-WDNE6K4W.js.map
12878
+ //# sourceMappingURL=chunk-6PLFRWIP.js.map