nexus-agents 8.42.13 → 8.43.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 (127) hide show
  1. package/dist/{ast-rule-runner-BOHCGJFS.js → ast-rule-runner-EPU4KNXJ.js} +3 -3
  2. package/dist/{child-mcp-config-WGA27P5Z.js → child-mcp-config-MQYS7D6P.js} +2 -2
  3. package/dist/{chunk-FDZVCOIQ.js → chunk-3QP3NJ4E.js} +2 -2
  4. package/dist/{chunk-ZXUJ4IZ4.js → chunk-4H44CQIZ.js} +2 -2
  5. package/dist/{chunk-OD5KVPTU.js → chunk-4NWC7WSP.js} +9 -9
  6. package/dist/{chunk-OD5KVPTU.js.map → chunk-4NWC7WSP.js.map} +1 -1
  7. package/dist/{chunk-UC4HIW3U.js → chunk-5CO7TEYR.js} +2 -2
  8. package/dist/{chunk-YPY3SKVB.js → chunk-6HMACBA3.js} +2 -2
  9. package/dist/{chunk-CBKAHM7G.js → chunk-AJFJYLUF.js} +17 -6
  10. package/dist/{chunk-CBKAHM7G.js.map → chunk-AJFJYLUF.js.map} +1 -1
  11. package/dist/{chunk-WENN453S.js → chunk-AMCNB2TJ.js} +5 -5
  12. package/dist/{chunk-LEY33SKP.js → chunk-AP3KIHPG.js} +2 -2
  13. package/dist/{chunk-QNZ5KLKB.js → chunk-B5R7KEZR.js} +7 -7
  14. package/dist/{chunk-EPX75GNG.js → chunk-BTWPTJF3.js} +3 -3
  15. package/dist/{chunk-3LIAXVMB.js → chunk-GCLLRAST.js} +3 -3
  16. package/dist/{chunk-CY3NQVUK.js → chunk-GWVEY32A.js} +7 -7
  17. package/dist/{chunk-E4DVW7L3.js → chunk-H77DZWRG.js} +2 -2
  18. package/dist/{chunk-QJGVEG3R.js → chunk-HMDFOPJY.js} +3 -3
  19. package/dist/{chunk-4XTCKYTR.js → chunk-IOV4B5R5.js} +2 -2
  20. package/dist/{chunk-QRQTZNBE.js → chunk-JSH5GCZK.js} +3 -3
  21. package/dist/{chunk-XZ47WD7T.js → chunk-LHIOFRJX.js} +6 -6
  22. package/dist/{chunk-NFM6BODN.js → chunk-LLJPMZKI.js} +132 -76
  23. package/dist/{chunk-NFM6BODN.js.map → chunk-LLJPMZKI.js.map} +1 -1
  24. package/dist/{chunk-KWY4GSGQ.js → chunk-LV3XDNDM.js} +2 -2
  25. package/dist/{chunk-KWY4GSGQ.js.map → chunk-LV3XDNDM.js.map} +1 -1
  26. package/dist/{chunk-FGBKWWIY.js → chunk-LVOXPW3M.js} +2 -2
  27. package/dist/{chunk-P6OFYKRT.js → chunk-LZL23U7Z.js} +2 -2
  28. package/dist/{chunk-AZ6KLPID.js → chunk-M7TQR4UU.js} +4 -4
  29. package/dist/{chunk-DN63HNKL.js → chunk-MLG2PR6E.js} +2 -2
  30. package/dist/{chunk-TKUKPHPX.js → chunk-NJDB4LVF.js} +19 -9
  31. package/dist/chunk-NJDB4LVF.js.map +1 -0
  32. package/dist/{chunk-F5M4MABK.js → chunk-OEKALQ2G.js} +2 -2
  33. package/dist/{chunk-PAQLTAX4.js → chunk-OO73573G.js} +2 -2
  34. package/dist/{chunk-5ZKIRWNN.js → chunk-P6DGZEWY.js} +4 -4
  35. package/dist/{chunk-CHQRA33X.js → chunk-RL6F6IUQ.js} +2 -2
  36. package/dist/{chunk-TSCB7FGE.js → chunk-S4QNCIZF.js} +5 -5
  37. package/dist/{chunk-PG35556E.js → chunk-U7JRUYB3.js} +2 -2
  38. package/dist/{chunk-KTRMTNZX.js → chunk-WPBF2POG.js} +4 -4
  39. package/dist/{chunk-3HEVTPO4.js → chunk-X2MX53O3.js} +2 -2
  40. package/dist/{chunk-KDFMC55T.js → chunk-Z4SCHKLH.js} +2 -2
  41. package/dist/{chunk-CY753H4P.js → chunk-ZSMK7RFK.js} +2 -2
  42. package/dist/{cli-circuit-breaker-SSHQHWU5.js → cli-circuit-breaker-LAOVTGFP.js} +3 -3
  43. package/dist/cli.js +43 -43
  44. package/dist/{composite-router-HA2E7JZA.js → composite-router-CN2SV6PX.js} +2 -2
  45. package/dist/{consensus-vote-ZIW3GBEI.js → consensus-vote-EM2FBZJC.js} +17 -17
  46. package/dist/{context-retriever-HEOEBL6B.js → context-retriever-3XRHW4EG.js} +8 -8
  47. package/dist/{doctor-deep-VQH5LSJM.js → doctor-deep-5CSAHVEP.js} +3 -3
  48. package/dist/{doctor-live-B3GFHHQZ.js → doctor-live-5NRILDTR.js} +9 -9
  49. package/dist/{expert-bridge-2DIYRMB2.js → expert-bridge-ZNNMHOQH.js} +4 -4
  50. package/dist/{factory-JHWFG6RN.js → factory-TE7DQKRW.js} +9 -9
  51. package/dist/{factory-C66XGNEW.js → factory-UYBTTLHZ.js} +5 -5
  52. package/dist/{improvement-review-Q5HPKDBZ.js → improvement-review-STXP27KF.js} +6 -6
  53. package/dist/index.d.ts +60 -2
  54. package/dist/index.js +31 -31
  55. package/dist/{init-opencode-NYRABAU4.js → init-opencode-WKKW7V7A.js} +6 -6
  56. package/dist/issue-triage-FRPETYSK.js +17 -0
  57. package/dist/{pr-reviewer-helpers-LHETFNEE.js → pr-reviewer-helpers-BR6YMKMR.js} +4 -4
  58. package/dist/{registry-command-J4I45ROW.js → registry-command-TWZXTXWB.js} +2 -2
  59. package/dist/{repo-security-plan-XIZB37ZY.js → repo-security-plan-3E3FSPD5.js} +3 -3
  60. package/dist/{research-helpers-synthesize-PWIDEIZ6.js → research-helpers-synthesize-NIDQS4XT.js} +4 -4
  61. package/dist/{routing-memory-DMJYEGGI.js → routing-memory-PGYUB4UJ.js} +2 -2
  62. package/dist/{session-memory-QH65QG4V.js → session-memory-D2IK4PC2.js} +3 -3
  63. package/dist/{setup-config-6BNUAUFO.js → setup-config-QELDNFFB.js} +3 -3
  64. package/dist/{setup-custom-api-GVTCQZQM.js → setup-custom-api-57TCCU7N.js} +4 -4
  65. package/dist/setup-data-dir-6ZIANYVT.js +29 -0
  66. package/dist/{tool-memory-HICOKETR.js → tool-memory-3B44V6CP.js} +5 -5
  67. package/dist/{unified-registry-LLDXH3WD.js → unified-registry-AIHYR7FG.js} +10 -10
  68. package/dist/{weather-report-NDFTFLCH.js → weather-report-2Q6RXC2D.js} +2 -2
  69. package/package.json +1 -1
  70. package/dist/chunk-TKUKPHPX.js.map +0 -1
  71. package/dist/issue-triage-JZ4MDAHR.js +0 -17
  72. package/dist/setup-data-dir-ULWQIFKW.js +0 -29
  73. /package/dist/{ast-rule-runner-BOHCGJFS.js.map → ast-rule-runner-EPU4KNXJ.js.map} +0 -0
  74. /package/dist/{child-mcp-config-WGA27P5Z.js.map → child-mcp-config-MQYS7D6P.js.map} +0 -0
  75. /package/dist/{chunk-FDZVCOIQ.js.map → chunk-3QP3NJ4E.js.map} +0 -0
  76. /package/dist/{chunk-ZXUJ4IZ4.js.map → chunk-4H44CQIZ.js.map} +0 -0
  77. /package/dist/{chunk-UC4HIW3U.js.map → chunk-5CO7TEYR.js.map} +0 -0
  78. /package/dist/{chunk-YPY3SKVB.js.map → chunk-6HMACBA3.js.map} +0 -0
  79. /package/dist/{chunk-WENN453S.js.map → chunk-AMCNB2TJ.js.map} +0 -0
  80. /package/dist/{chunk-LEY33SKP.js.map → chunk-AP3KIHPG.js.map} +0 -0
  81. /package/dist/{chunk-QNZ5KLKB.js.map → chunk-B5R7KEZR.js.map} +0 -0
  82. /package/dist/{chunk-EPX75GNG.js.map → chunk-BTWPTJF3.js.map} +0 -0
  83. /package/dist/{chunk-3LIAXVMB.js.map → chunk-GCLLRAST.js.map} +0 -0
  84. /package/dist/{chunk-CY3NQVUK.js.map → chunk-GWVEY32A.js.map} +0 -0
  85. /package/dist/{chunk-E4DVW7L3.js.map → chunk-H77DZWRG.js.map} +0 -0
  86. /package/dist/{chunk-QJGVEG3R.js.map → chunk-HMDFOPJY.js.map} +0 -0
  87. /package/dist/{chunk-4XTCKYTR.js.map → chunk-IOV4B5R5.js.map} +0 -0
  88. /package/dist/{chunk-QRQTZNBE.js.map → chunk-JSH5GCZK.js.map} +0 -0
  89. /package/dist/{chunk-XZ47WD7T.js.map → chunk-LHIOFRJX.js.map} +0 -0
  90. /package/dist/{chunk-FGBKWWIY.js.map → chunk-LVOXPW3M.js.map} +0 -0
  91. /package/dist/{chunk-P6OFYKRT.js.map → chunk-LZL23U7Z.js.map} +0 -0
  92. /package/dist/{chunk-AZ6KLPID.js.map → chunk-M7TQR4UU.js.map} +0 -0
  93. /package/dist/{chunk-DN63HNKL.js.map → chunk-MLG2PR6E.js.map} +0 -0
  94. /package/dist/{chunk-F5M4MABK.js.map → chunk-OEKALQ2G.js.map} +0 -0
  95. /package/dist/{chunk-PAQLTAX4.js.map → chunk-OO73573G.js.map} +0 -0
  96. /package/dist/{chunk-5ZKIRWNN.js.map → chunk-P6DGZEWY.js.map} +0 -0
  97. /package/dist/{chunk-CHQRA33X.js.map → chunk-RL6F6IUQ.js.map} +0 -0
  98. /package/dist/{chunk-TSCB7FGE.js.map → chunk-S4QNCIZF.js.map} +0 -0
  99. /package/dist/{chunk-PG35556E.js.map → chunk-U7JRUYB3.js.map} +0 -0
  100. /package/dist/{chunk-KTRMTNZX.js.map → chunk-WPBF2POG.js.map} +0 -0
  101. /package/dist/{chunk-3HEVTPO4.js.map → chunk-X2MX53O3.js.map} +0 -0
  102. /package/dist/{chunk-KDFMC55T.js.map → chunk-Z4SCHKLH.js.map} +0 -0
  103. /package/dist/{chunk-CY753H4P.js.map → chunk-ZSMK7RFK.js.map} +0 -0
  104. /package/dist/{cli-circuit-breaker-SSHQHWU5.js.map → cli-circuit-breaker-LAOVTGFP.js.map} +0 -0
  105. /package/dist/{composite-router-HA2E7JZA.js.map → composite-router-CN2SV6PX.js.map} +0 -0
  106. /package/dist/{consensus-vote-ZIW3GBEI.js.map → consensus-vote-EM2FBZJC.js.map} +0 -0
  107. /package/dist/{context-retriever-HEOEBL6B.js.map → context-retriever-3XRHW4EG.js.map} +0 -0
  108. /package/dist/{doctor-deep-VQH5LSJM.js.map → doctor-deep-5CSAHVEP.js.map} +0 -0
  109. /package/dist/{doctor-live-B3GFHHQZ.js.map → doctor-live-5NRILDTR.js.map} +0 -0
  110. /package/dist/{expert-bridge-2DIYRMB2.js.map → expert-bridge-ZNNMHOQH.js.map} +0 -0
  111. /package/dist/{factory-C66XGNEW.js.map → factory-TE7DQKRW.js.map} +0 -0
  112. /package/dist/{factory-JHWFG6RN.js.map → factory-UYBTTLHZ.js.map} +0 -0
  113. /package/dist/{improvement-review-Q5HPKDBZ.js.map → improvement-review-STXP27KF.js.map} +0 -0
  114. /package/dist/{init-opencode-NYRABAU4.js.map → init-opencode-WKKW7V7A.js.map} +0 -0
  115. /package/dist/{issue-triage-JZ4MDAHR.js.map → issue-triage-FRPETYSK.js.map} +0 -0
  116. /package/dist/{pr-reviewer-helpers-LHETFNEE.js.map → pr-reviewer-helpers-BR6YMKMR.js.map} +0 -0
  117. /package/dist/{registry-command-J4I45ROW.js.map → registry-command-TWZXTXWB.js.map} +0 -0
  118. /package/dist/{repo-security-plan-XIZB37ZY.js.map → repo-security-plan-3E3FSPD5.js.map} +0 -0
  119. /package/dist/{research-helpers-synthesize-PWIDEIZ6.js.map → research-helpers-synthesize-NIDQS4XT.js.map} +0 -0
  120. /package/dist/{routing-memory-DMJYEGGI.js.map → routing-memory-PGYUB4UJ.js.map} +0 -0
  121. /package/dist/{session-memory-QH65QG4V.js.map → session-memory-D2IK4PC2.js.map} +0 -0
  122. /package/dist/{setup-config-6BNUAUFO.js.map → setup-config-QELDNFFB.js.map} +0 -0
  123. /package/dist/{setup-custom-api-GVTCQZQM.js.map → setup-custom-api-57TCCU7N.js.map} +0 -0
  124. /package/dist/{setup-data-dir-ULWQIFKW.js.map → setup-data-dir-6ZIANYVT.js.map} +0 -0
  125. /package/dist/{tool-memory-HICOKETR.js.map → tool-memory-3B44V6CP.js.map} +0 -0
  126. /package/dist/{unified-registry-LLDXH3WD.js.map → unified-registry-AIHYR7FG.js.map} +0 -0
  127. /package/dist/{weather-report-NDFTFLCH.js.map → weather-report-2Q6RXC2D.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateSecurityPlan
3
- } from "./chunk-ZXUJ4IZ4.js";
3
+ } from "./chunk-4H44CQIZ.js";
4
4
  import {
5
5
  analyzeGitHubRepo
6
6
  } from "./chunk-DGWT7DXX.js";
@@ -21,10 +21,10 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-CY3NQVUK.js";
24
+ } from "./chunk-GWVEY32A.js";
25
25
  import {
26
26
  executeExpert
27
- } from "./chunk-QNZ5KLKB.js";
27
+ } from "./chunk-B5R7KEZR.js";
28
28
  import {
29
29
  JobStatusSchema,
30
30
  VOTER_ROLES,
@@ -55,7 +55,7 @@ import {
55
55
  toJobSummary,
56
56
  updateStage,
57
57
  writeJobCancelled
58
- } from "./chunk-OD5KVPTU.js";
58
+ } from "./chunk-4NWC7WSP.js";
59
59
  import {
60
60
  allOf,
61
61
  anyOf
@@ -63,19 +63,19 @@ import {
63
63
  import {
64
64
  normalizeTopicToCanonical,
65
65
  synthesizeResearch
66
- } from "./chunk-3LIAXVMB.js";
66
+ } from "./chunk-GCLLRAST.js";
67
67
  import {
68
68
  IssueTriage,
69
69
  createDurableAuditSink,
70
70
  createDurableAuditTrail
71
- } from "./chunk-XZ47WD7T.js";
71
+ } from "./chunk-LHIOFRJX.js";
72
72
  import {
73
73
  resolveEnvMode,
74
74
  sanitizeInput
75
- } from "./chunk-CY753H4P.js";
75
+ } from "./chunk-ZSMK7RFK.js";
76
76
  import {
77
77
  withPrerequisite
78
- } from "./chunk-QJGVEG3R.js";
78
+ } from "./chunk-HMDFOPJY.js";
79
79
  import {
80
80
  NOOP_NOTIFIER,
81
81
  RateLimiter,
@@ -100,18 +100,18 @@ import {
100
100
  withAuditTrail,
101
101
  withProgressHeartbeat,
102
102
  wrapToolWithTimeout
103
- } from "./chunk-CBKAHM7G.js";
103
+ } from "./chunk-AJFJYLUF.js";
104
104
  import {
105
105
  createAuditTrail,
106
106
  createGraphAuditBridge,
107
107
  emitPipelinePolicyEvent
108
- } from "./chunk-DN63HNKL.js";
108
+ } from "./chunk-MLG2PR6E.js";
109
109
  import {
110
110
  EventTopics,
111
111
  createEvent,
112
112
  getGlobalEventBus,
113
113
  getGlobalRegistry
114
- } from "./chunk-KTRMTNZX.js";
114
+ } from "./chunk-WPBF2POG.js";
115
115
  import {
116
116
  IDENTIFIER_RE,
117
117
  LANG_VALUES,
@@ -144,7 +144,7 @@ import {
144
144
  parseRegistry,
145
145
  sourceExistsInRegistry,
146
146
  summarizeContextForPrompt
147
- } from "./chunk-TSCB7FGE.js";
147
+ } from "./chunk-S4QNCIZF.js";
148
148
  import {
149
149
  REGISTRY_PATH,
150
150
  getProjectRoot,
@@ -152,25 +152,25 @@ import {
152
152
  loadTechniquesRegistry,
153
153
  resolveInsideRoot,
154
154
  resolveRegistryRoot
155
- } from "./chunk-CHQRA33X.js";
155
+ } from "./chunk-RL6F6IUQ.js";
156
156
  import {
157
157
  getTokenEnvVars,
158
158
  resolveToken
159
- } from "./chunk-FGBKWWIY.js";
159
+ } from "./chunk-LVOXPW3M.js";
160
160
  import {
161
161
  DEFAULT_RELEVANCE_CONFIG,
162
162
  MemoryImportance,
163
163
  MemoryType,
164
164
  calculateTextJaccardSimilarity,
165
165
  getToolMemory
166
- } from "./chunk-5ZKIRWNN.js";
166
+ } from "./chunk-P6DGZEWY.js";
167
167
  import {
168
168
  STOPWORDS,
169
169
  truncateWithInfo
170
170
  } from "./chunk-7LP6VJRP.js";
171
171
  import {
172
172
  createSessionMemory
173
- } from "./chunk-E4DVW7L3.js";
173
+ } from "./chunk-H77DZWRG.js";
174
174
  import {
175
175
  BUILT_IN_EXPERTS,
176
176
  BuiltInExpertTypeSchema,
@@ -188,25 +188,25 @@ import {
188
188
  getAvailableClis,
189
189
  sleep,
190
190
  withTimeout
191
- } from "./chunk-TKUKPHPX.js";
191
+ } from "./chunk-NJDB4LVF.js";
192
192
  import {
193
193
  BaseAdapter,
194
194
  createStream,
195
195
  requireApiKey,
196
196
  validateApiKeyPresence
197
- } from "./chunk-P6OFYKRT.js";
197
+ } from "./chunk-LZL23U7Z.js";
198
198
  import {
199
199
  DEFAULTS
200
- } from "./chunk-F5M4MABK.js";
200
+ } from "./chunk-OEKALQ2G.js";
201
201
  import {
202
202
  getAvailabilityCache,
203
203
  getCliForModelId,
204
204
  resolveFallback
205
- } from "./chunk-LEY33SKP.js";
205
+ } from "./chunk-AP3KIHPG.js";
206
206
  import {
207
207
  generateHyphenId,
208
208
  generateUUID
209
- } from "./chunk-UC4HIW3U.js";
209
+ } from "./chunk-5CO7TEYR.js";
210
210
  import {
211
211
  AGENT_ROUTER_TIMEOUTS,
212
212
  API_TIMEOUTS,
@@ -318,7 +318,7 @@ import {
318
318
  selectStrategyByManifest,
319
319
  toExpertTaskAnalysisResult,
320
320
  withStep
321
- } from "./chunk-EPX75GNG.js";
321
+ } from "./chunk-BTWPTJF3.js";
322
322
  import {
323
323
  ensureLearningDir,
324
324
  getMetaOutcomesFile,
@@ -29996,7 +29996,7 @@ function execIdFields(executionId) {
29996
29996
  async function populateUnifiedContextOnState(state, options) {
29997
29997
  const taskCandidate = state["task"];
29998
29998
  if (typeof taskCandidate !== "string" || taskCandidate === "") return;
29999
- const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-HEOEBL6B.js");
29999
+ const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-3XRHW4EG.js");
30000
30000
  const category = inferTaskCategory2(taskCandidate);
30001
30001
  const executionId = options?.executionId;
30002
30002
  const execFields = execIdFields(executionId);
@@ -35937,7 +35937,16 @@ var TaskAccessPolicySchema = z64.object({
35937
35937
  objectiveHash: z64.string(),
35938
35938
  derivedAt: z64.string(),
35939
35939
  source: AccessPolicySourceSchema,
35940
- mode: AccessPolicyModeSchema
35940
+ mode: AccessPolicyModeSchema,
35941
+ /**
35942
+ * The destructive verb the keyword deriver matched in the objective, when it
35943
+ * matched one. Optional and carried for DISCLOSURE only: no enforcement path
35944
+ * reads it, and `checkAccess` still returns `unmeasured` for such a policy
35945
+ * (#5895). It exists so the decision and its log line can say *why* an
35946
+ * objective was interesting, instead of being indistinguishable from an
35947
+ * ordinary read-only fallback.
35948
+ */
35949
+ refuseVerbMatched: z64.string().optional()
35941
35950
  });
35942
35951
 
35943
35952
  // src/security/access-constraint-deriver/config.ts
@@ -36032,32 +36041,37 @@ var REFUSE_VERBS = [
36032
36041
  "transfer ownership"
36033
36042
  ];
36034
36043
  function matchesAny2(content, keywords) {
36044
+ return firstMatch(content, keywords) !== void 0;
36045
+ }
36046
+ function firstMatch(content, keywords) {
36035
36047
  const lower = content.toLowerCase();
36036
- return keywords.some((k) => lower.includes(k));
36048
+ return keywords.find((k) => lower.includes(k));
36037
36049
  }
36038
36050
  function deriveFallbackPolicy(userObjective, mode, hash) {
36039
- const allowedOperations = classifyOperations(userObjective);
36051
+ const { operations, refuseVerbMatched } = classifyOperations(userObjective);
36040
36052
  return {
36041
36053
  allowedTools: [],
36042
36054
  allowedPathPatterns: [],
36043
- allowedOperations,
36055
+ allowedOperations: operations,
36044
36056
  objectiveHash: hash,
36045
36057
  derivedAt: (/* @__PURE__ */ new Date()).toISOString(),
36046
36058
  source: "fallback-keyword",
36047
- mode
36059
+ mode,
36060
+ ...refuseVerbMatched !== void 0 && { refuseVerbMatched }
36048
36061
  };
36049
36062
  }
36050
36063
  function classifyOperations(userObjective) {
36051
- if (matchesAny2(userObjective, REFUSE_VERBS)) {
36052
- return [];
36064
+ const refuseVerb = firstMatch(userObjective, REFUSE_VERBS);
36065
+ if (refuseVerb !== void 0) {
36066
+ return { operations: [], refuseVerbMatched: refuseVerb };
36053
36067
  }
36054
36068
  if (matchesAny2(userObjective, READ_WRITE_VERBS)) {
36055
- return ["read", "write"];
36069
+ return { operations: ["read", "write"] };
36056
36070
  }
36057
36071
  if (matchesAny2(userObjective, READ_ONLY_VERBS)) {
36058
- return ["read"];
36072
+ return { operations: ["read"] };
36059
36073
  }
36060
- return ["read"];
36074
+ return { operations: ["read"] };
36061
36075
  }
36062
36076
 
36063
36077
  // src/security/access-constraint-deriver/llm-deriver.ts
@@ -45271,9 +45285,19 @@ async function runGraphPipeline(task, template, stages, options) {
45271
45285
  const startTime = getTimeProvider().now();
45272
45286
  const graphResult = compileEffectiveGraph(template, stages, options);
45273
45287
  if (graphResult.error !== void 0) {
45274
- return buildError(template.id, graphResult.error, startTime);
45288
+ return {
45289
+ ...buildError(template.id, graphResult.error, startTime),
45290
+ ...stamp({ stagesPlanned: template.stages.length, stagesRun: 0 }, options)
45291
+ };
45275
45292
  }
45276
- return executeAndReport(task, template, graphResult.graph, options, startTime);
45293
+ return executeAndReport({
45294
+ task,
45295
+ template,
45296
+ graph: graphResult.graph,
45297
+ coverage: graphResult.coverage,
45298
+ options,
45299
+ startTime
45300
+ });
45277
45301
  }
45278
45302
  function compileEffectiveGraph(template, stages, options) {
45279
45303
  const effective = resolveEffectiveTemplate(template, options);
@@ -45281,9 +45305,13 @@ function compileEffectiveGraph(template, stages, options) {
45281
45305
  if (!compiled.ok || compiled.graph === void 0) {
45282
45306
  return { error: compiled.error ?? "Compilation failed" };
45283
45307
  }
45284
- return { graph: compiled.graph };
45308
+ return {
45309
+ graph: compiled.graph,
45310
+ coverage: { stagesPlanned: template.stages.length, stagesRun: effective.stages.length }
45311
+ };
45285
45312
  }
45286
- async function executeAndReport(task, template, graph, options, startTime) {
45313
+ async function executeAndReport(args) {
45314
+ const { task, template, graph, coverage, options, startTime } = args;
45287
45315
  logger36.info("Executing graph pipeline", {
45288
45316
  template: template.id,
45289
45317
  dryRun: options?.dryRun === true
@@ -45299,7 +45327,7 @@ async function executeAndReport(task, template, graph, options, startTime) {
45299
45327
  const durationMs = getTimeProvider().now() - startTime;
45300
45328
  if (!result.ok) {
45301
45329
  emitPipelineStageEvent(template.id, "pipeline", "failed", { error: result.error.message });
45302
- return buildError(template.id, result.error.message, startTime);
45330
+ return { ...buildError(template.id, result.error.message, startTime), ...stamp(coverage, options) };
45303
45331
  }
45304
45332
  const failures = describeFailedNodes(result.value.nodeResults);
45305
45333
  if (failures !== null) {
@@ -45312,7 +45340,8 @@ async function executeAndReport(task, template, graph, options, startTime) {
45312
45340
  // Keep whatever earlier stages produced — callers inspect finalState to
45313
45341
  // see how far the run got before it failed.
45314
45342
  finalState: result.value.finalState,
45315
- error: failures
45343
+ error: failures,
45344
+ ...stamp(coverage, options)
45316
45345
  };
45317
45346
  }
45318
45347
  emitPipelineStageEvent(template.id, "pipeline", "completed", { durationMs });
@@ -45321,9 +45350,13 @@ async function executeAndReport(task, template, graph, options, startTime) {
45321
45350
  templateId: template.id,
45322
45351
  stepsExecuted: result.value.stepsExecuted,
45323
45352
  durationMs,
45324
- finalState: result.value.finalState
45353
+ finalState: result.value.finalState,
45354
+ ...stamp(coverage, options)
45325
45355
  };
45326
45356
  }
45357
+ function stamp(coverage, options) {
45358
+ return { ...coverage, ...options?.dryRun === true ? { dryRun: true } : {} };
45359
+ }
45327
45360
  function describeFailedNodes(nodeResults) {
45328
45361
  const failed = nodeResults.filter((n) => n.status === "failed");
45329
45362
  if (failed.length === 0) return null;
@@ -45558,7 +45591,7 @@ async function tryIssueTriage(task) {
45558
45591
  try {
45559
45592
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
45560
45593
  if (issueMatch === null) return null;
45561
- const { createIssueTriage } = await import("./issue-triage-JZ4MDAHR.js");
45594
+ const { createIssueTriage } = await import("./issue-triage-FRPETYSK.js");
45562
45595
  const triage = createIssueTriage();
45563
45596
  const owner = issueMatch[1] ?? "";
45564
45597
  const num = issueMatch[2] ?? "";
@@ -45586,7 +45619,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
45586
45619
  ]);
45587
45620
  async function classifyWithLLM(task) {
45588
45621
  try {
45589
- const { executeExpert: executeExpert2 } = await import("./expert-bridge-2DIYRMB2.js");
45622
+ const { executeExpert: executeExpert2 } = await import("./expert-bridge-ZNNMHOQH.js");
45590
45623
  const prompt = [
45591
45624
  "Classify this task into exactly one pipeline template.",
45592
45625
  "Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
@@ -45960,7 +45993,7 @@ function buildVotingInput(plan, config) {
45960
45993
  }
45961
45994
  async function executeSingleVote(plan, config, log) {
45962
45995
  try {
45963
- const { executeVoting } = await import("./consensus-vote-ZIW3GBEI.js");
45996
+ const { executeVoting } = await import("./consensus-vote-EM2FBZJC.js");
45964
45997
  const input = buildVotingInput(plan, config);
45965
45998
  const result = await executeVoting(input, log);
45966
45999
  return parseVotingResult(result);
@@ -47522,7 +47555,7 @@ var memoryInitPromise = null;
47522
47555
  async function initPipelineMemory() {
47523
47556
  if (cachedMemory !== null) return cachedMemory;
47524
47557
  try {
47525
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-QH65QG4V.js");
47558
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-D2IK4PC2.js");
47526
47559
  const { getLearningDir } = await import("./learning-persistence-TX2WE7Y7.js");
47527
47560
  const mem = createSessionMemory2(getLearningDir());
47528
47561
  mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
@@ -47584,7 +47617,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
47584
47617
  callRecord(routingMemoryCache);
47585
47618
  return;
47586
47619
  }
47587
- routingMemoryInitPromise ??= import("./routing-memory-DMJYEGGI.js").then(({ createRoutingMemory }) => {
47620
+ routingMemoryInitPromise ??= import("./routing-memory-PGYUB4UJ.js").then(({ createRoutingMemory }) => {
47588
47621
  routingMemoryCache ??= createRoutingMemory();
47589
47622
  return routingMemoryCache;
47590
47623
  }).catch((error) => {
@@ -47618,7 +47651,7 @@ ${text}` : "";
47618
47651
  }
47619
47652
  async function getWeatherContext() {
47620
47653
  try {
47621
- const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-NDFTFLCH.js");
47654
+ const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-2Q6RXC2D.js");
47622
47655
  const report = generateWeatherReport2({ includeAdaptive: true });
47623
47656
  const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
47624
47657
  if (!Array.isArray(mappings) || mappings.length === 0) return "";
@@ -47636,7 +47669,7 @@ ${lines}
47636
47669
  }
47637
47670
  async function getMemoryContext(task) {
47638
47671
  try {
47639
- const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-QH65QG4V.js");
47672
+ const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-D2IK4PC2.js");
47640
47673
  const { getLearningDir } = await import("./learning-persistence-TX2WE7Y7.js");
47641
47674
  const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
47642
47675
  const learnings = memory.searchLearnings(task.slice(0, 200));
@@ -47755,7 +47788,7 @@ ${contextBlock}`;
47755
47788
  const strategy = config.votingStrategy ?? "higher_order";
47756
47789
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47757
47790
  try {
47758
- const { executeVoting } = await import("./consensus-vote-ZIW3GBEI.js");
47791
+ const { executeVoting } = await import("./consensus-vote-EM2FBZJC.js");
47759
47792
  const votingResult = await executeVoting(
47760
47793
  {
47761
47794
  proposal: buildVoteProposal(plan, research),
@@ -48186,7 +48219,7 @@ async function searchCodebaseForTask(task) {
48186
48219
  }
48187
48220
  async function queryResearchRegistry(task) {
48188
48221
  try {
48189
- const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-PWIDEIZ6.js");
48222
+ const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-NIDQS4XT.js");
48190
48223
  const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
48191
48224
  if (topic === void 0) return null;
48192
48225
  const result = await synthesizeResearch2(topic.slice(0, 50));
@@ -48257,7 +48290,7 @@ function createScanStageWrapper() {
48257
48290
  try {
48258
48291
  const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
48259
48292
  if (slug !== void 0) {
48260
- const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-XIZB37ZY.js");
48293
+ const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-3E3FSPD5.js");
48261
48294
  const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
48262
48295
  const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
48263
48296
  return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
@@ -51497,7 +51530,7 @@ var GitHubTaskTracker = class {
51497
51530
  cachedProvider = null;
51498
51531
  async getProvider() {
51499
51532
  if (this.cachedProvider !== null) return this.cachedProvider;
51500
- const { createScmProvider } = await import("./factory-C66XGNEW.js");
51533
+ const { createScmProvider } = await import("./factory-UYBTTLHZ.js");
51501
51534
  const result = await createScmProvider({ repo: this.config.repo ?? "" });
51502
51535
  if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
51503
51536
  this.cachedProvider = result.value;
@@ -51963,6 +51996,12 @@ function buildOutput3(result, simulated) {
51963
51996
  stepsExecuted: result.stepsExecuted,
51964
51997
  durationMs: result.durationMs,
51965
51998
  error: result.error ?? null,
51999
+ // #5812-adjacent (pipeline sweep): a dryRun truncates the template at
52000
+ // `dryRunStopAfter`, so `success: true` with `templateId: 'dev'` used to be
52001
+ // byte-identical whether qa and security ran or were sliced away. Say which.
52002
+ ...result.dryRun === true ? { dryRun: true } : {},
52003
+ stagesPlanned: result.stagesPlanned,
52004
+ stagesRun: result.stagesRun,
51966
52005
  // #4170: stamped only on an explicit NEXUS_ALLOW_SIMULATE=1 opt-in run so
51967
52006
  // a random demo panel can never pass as a real decision.
51968
52007
  ...simulated ? { simulated: true } : {},
@@ -52422,7 +52461,7 @@ async function probeSource(source, includeModelIds) {
52422
52461
  }
52423
52462
  }
52424
52463
  async function defaultSources(includeOpenRouter) {
52425
- const { createAllAdapters: createAllAdapters2 } = await import("./factory-JHWFG6RN.js");
52464
+ const { createAllAdapters: createAllAdapters2 } = await import("./factory-TE7DQKRW.js");
52426
52465
  const adapters = createAllAdapters2();
52427
52466
  return buildDefaultModelSources(adapters, { includeOpenRouter });
52428
52467
  }
@@ -54315,6 +54354,9 @@ var RoutingDecisionSchema = z127.object({
54315
54354
  timestamp: z127.iso.datetime(),
54316
54355
  query: z127.string(),
54317
54356
  routerType: z127.enum(["linucb", "preference", "quality", "cascade", "topsis"]),
54357
+ // Optional so a row persisted before #5812 still parses. Absence is read as
54358
+ // unmeasured by `isRouterTypeMeasured`, never as measured.
54359
+ routerTypeMeasured: z127.boolean().optional(),
54318
54360
  selectedModel: z127.string(),
54319
54361
  selectedTier: z127.enum(["strong", "weak"]).optional(),
54320
54362
  armIndex: z127.number().int().min(0).optional(),
@@ -54378,18 +54420,26 @@ function countOutcomesByClass(outcomes) {
54378
54420
  }
54379
54421
  return counts;
54380
54422
  }
54423
+ function isRouterTypeMeasured(decision) {
54424
+ return decision.routerTypeMeasured === true;
54425
+ }
54381
54426
  function countDecisionsByRouter(decisions) {
54382
- const counts = {
54427
+ const byRouter = {
54383
54428
  linucb: 0,
54384
54429
  preference: 0,
54385
54430
  quality: 0,
54386
54431
  cascade: 0,
54387
54432
  topsis: 0
54388
54433
  };
54434
+ let unattributed = 0;
54389
54435
  for (const decision of decisions) {
54390
- counts[decision.routerType]++;
54436
+ if (isRouterTypeMeasured(decision)) {
54437
+ byRouter[decision.routerType]++;
54438
+ } else {
54439
+ unattributed++;
54440
+ }
54391
54441
  }
54392
- return counts;
54442
+ return { byRouter, unattributed };
54393
54443
  }
54394
54444
  function calculateAverageQuality(outcomes) {
54395
54445
  if (outcomes.length === 0) return 0;
@@ -54559,7 +54609,7 @@ var OutcomeFeedbackCollector = class {
54559
54609
  }
54560
54610
  getStats() {
54561
54611
  const outcomesByClass = countOutcomesByClass(this.outcomes);
54562
- const decisionsByRouter = countDecisionsByRouter(this.decisionHistory);
54612
+ const routerCounts = countDecisionsByRouter(this.decisionHistory);
54563
54613
  const avgQuality = calculateAverageQuality(this.outcomes);
54564
54614
  const avgReward = this.calculateAverageReward();
54565
54615
  return {
@@ -54569,7 +54619,8 @@ var OutcomeFeedbackCollector = class {
54569
54619
  outcomesByClass,
54570
54620
  avgQualityScore: avgQuality,
54571
54621
  avgReward,
54572
- decisionsByRouter,
54622
+ decisionsByRouter: routerCounts.byRouter,
54623
+ decisionsUnattributed: routerCounts.unattributed,
54573
54624
  lastUpdatedAt: getTimeProvider().nowIso()
54574
54625
  };
54575
54626
  }
@@ -54703,18 +54754,32 @@ var MAX_DECISION_MAP_SIZE = 1e4;
54703
54754
  function getDecisiveRouterType(decision) {
54704
54755
  const stages = decision.stagesExecuted;
54705
54756
  if (stages.includes("linucb-selection") && decision.ucbScore !== void 0) {
54706
- return "linucb";
54757
+ return { routerType: "linucb", measured: true };
54707
54758
  }
54708
54759
  if (stages.includes("preference-routing") && decision.preferenceScore !== void 0) {
54709
- return "preference";
54760
+ return { routerType: "preference", measured: true };
54710
54761
  }
54711
54762
  if (stages.includes("zero-router") && decision.difficultyTier !== void 0) {
54712
- return "cascade";
54763
+ return { routerType: "cascade", measured: true };
54713
54764
  }
54714
54765
  if (stages.includes("topsis-ranking") && decision.topsisScore !== void 0) {
54715
- return "topsis";
54766
+ return { routerType: "topsis", measured: true };
54716
54767
  }
54717
- return "topsis";
54768
+ return { routerType: "topsis", measured: false };
54769
+ }
54770
+ function buildStoredDecision(id, traceId, routerType, decision) {
54771
+ return {
54772
+ id,
54773
+ traceId,
54774
+ timestamp: getTimeProvider().nowIso(),
54775
+ routerType,
54776
+ // Persisted telemetry is slot-level; collapse the distinct arm (#3422).
54777
+ selectedModel: routingArmDisplaySlot(decision.cliName),
54778
+ alternativeModels: decision.alternatives.map(routingArmDisplaySlot),
54779
+ confidence: decision.confidence,
54780
+ reason: decision.reason,
54781
+ taskProfile: serializeTaskProfile(decision.taskProfile)
54782
+ };
54718
54783
  }
54719
54784
  function serializeTaskProfile(profile) {
54720
54785
  return {
@@ -54771,9 +54836,11 @@ var FeedbackIntegration = class {
54771
54836
  task: decision.taskProfile.taskType,
54772
54837
  createdAt: now
54773
54838
  });
54839
+ const decisive = getDecisiveRouterType(decision);
54774
54840
  const routingDecision = createRoutingDecision({
54775
54841
  traceId: trace,
54776
- routerType: getDecisiveRouterType(decision),
54842
+ routerType: decisive.routerType,
54843
+ routerTypeMeasured: decisive.measured,
54777
54844
  selectedModel: decision.cliName,
54778
54845
  confidence: decision.confidence,
54779
54846
  query: decision.reason,
@@ -54785,18 +54852,7 @@ var FeedbackIntegration = class {
54785
54852
  const decisionWithId = { ...routingDecision, id };
54786
54853
  this.collector.recordRoutingDecision(decisionWithId);
54787
54854
  if (this.outcomeStorage !== void 0) {
54788
- const storedDecision = {
54789
- id,
54790
- traceId: trace,
54791
- timestamp: getTimeProvider().nowIso(),
54792
- routerType: getDecisiveRouterType(decision),
54793
- // Persisted telemetry is slot-level; collapse the distinct arm (#3422).
54794
- selectedModel: routingArmDisplaySlot(decision.cliName),
54795
- alternativeModels: decision.alternatives.map(routingArmDisplaySlot),
54796
- confidence: decision.confidence,
54797
- reason: decision.reason,
54798
- taskProfile: serializeTaskProfile(decision.taskProfile)
54799
- };
54855
+ const storedDecision = buildStoredDecision(id, trace, decisive.routerType, decision);
54800
54856
  this.outcomeStorage.storeDecision(storedDecision).catch((error) => {
54801
54857
  this.logger.warn("Failed to persist routing decision to SQLite", { id, error });
54802
54858
  });
@@ -56459,4 +56515,4 @@ export {
56459
56515
  startPipelineEventBridge,
56460
56516
  shutdownPipelineEventBridge
56461
56517
  };
56462
- //# sourceMappingURL=chunk-NFM6BODN.js.map
56518
+ //# sourceMappingURL=chunk-LLJPMZKI.js.map