nexus-agents 2.89.2 → 2.91.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.
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-CH7QIDHQ.js";
41
41
 
42
42
  // src/version.ts
43
- var VERSION = true ? "2.89.2" : "dev";
43
+ var VERSION = true ? "2.91.0" : "dev";
44
44
 
45
45
  // src/config/schemas-core.ts
46
46
  import { z } from "zod";
@@ -2096,7 +2096,7 @@ async function runDoctorFix(result) {
2096
2096
  writeLine2("\u2500".repeat(40));
2097
2097
  let fixCount = 0;
2098
2098
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2099
- const { runSetup } = await import("./setup-command-MXUNSSNJ.js");
2099
+ const { runSetup } = await import("./setup-command-B5QPHCKY.js");
2100
2100
  const setupResult = runSetup({
2101
2101
  skipMcp: true,
2102
2102
  skipRules: true,
@@ -2208,4 +2208,4 @@ export {
2208
2208
  startStdioServer,
2209
2209
  closeServer
2210
2210
  };
2211
- //# sourceMappingURL=chunk-5X7GAOVZ.js.map
2211
+ //# sourceMappingURL=chunk-DH4V6S5K.js.map
@@ -55,7 +55,7 @@ import {
55
55
  import {
56
56
  IssueTriage,
57
57
  sanitizeInput
58
- } from "./chunk-IOXR6W24.js";
58
+ } from "./chunk-6IV43POQ.js";
59
59
  import {
60
60
  generateSecurityPlan
61
61
  } from "./chunk-57HMLBYN.js";
@@ -82,7 +82,7 @@ import {
82
82
  DEFAULT_TASK_TTL_MS,
83
83
  DEFAULT_TOOL_RATE_LIMITS,
84
84
  clampTaskTtl
85
- } from "./chunk-5X7GAOVZ.js";
85
+ } from "./chunk-DH4V6S5K.js";
86
86
  import {
87
87
  getAvailabilityCache,
88
88
  resolveFallback
@@ -42521,7 +42521,7 @@ async function tryIssueTriage(task) {
42521
42521
  try {
42522
42522
  const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
42523
42523
  if (issueMatch === null) return null;
42524
- const { createIssueTriage } = await import("./issue-triage-IJGC3VZJ.js");
42524
+ const { createIssueTriage } = await import("./issue-triage-CDSHKFPP.js");
42525
42525
  const triage = createIssueTriage();
42526
42526
  const owner = issueMatch[1] ?? "";
42527
42527
  const num = issueMatch[2] ?? "";
@@ -51874,4 +51874,4 @@ export {
51874
51874
  detectBackend,
51875
51875
  createTaskTracker
51876
51876
  };
51877
- //# sourceMappingURL=chunk-44XYCZCU.js.map
51877
+ //# sourceMappingURL=chunk-PLFKZUVT.js.map
@@ -8,7 +8,7 @@ import {
8
8
  checkSqlite,
9
9
  defaultConfig,
10
10
  initDataDirectories
11
- } from "./chunk-5X7GAOVZ.js";
11
+ } from "./chunk-DH4V6S5K.js";
12
12
  import {
13
13
  probeAllClis
14
14
  } from "./chunk-X5BQF6HM.js";
@@ -1987,4 +1987,4 @@ export {
1987
1987
  setupCommand,
1988
1988
  setupCommandAsync
1989
1989
  };
1990
- //# sourceMappingURL=chunk-SCZOD5XC.js.map
1990
+ //# sourceMappingURL=chunk-W7YQOXCJ.js.map
package/dist/cli.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  import {
23
23
  setupCommandAsync,
24
24
  verifyCommand
25
- } from "./chunk-SCZOD5XC.js";
25
+ } from "./chunk-W7YQOXCJ.js";
26
26
  import "./chunk-2SMTCNXP.js";
27
27
  import {
28
28
  AuthHandler,
@@ -162,7 +162,7 @@ import {
162
162
  validateCommand,
163
163
  validateWorkflow,
164
164
  wrapInMarkdownFence
165
- } from "./chunk-44XYCZCU.js";
165
+ } from "./chunk-PLFKZUVT.js";
166
166
  import {
167
167
  resolveToken
168
168
  } from "./chunk-EAT4GTMT.js";
@@ -207,7 +207,7 @@ import {
207
207
  evaluatePolicy,
208
208
  parsePRUrl,
209
209
  sanitizeInput
210
- } from "./chunk-IOXR6W24.js";
210
+ } from "./chunk-6IV43POQ.js";
211
211
  import "./chunk-EFHZHCF2.js";
212
212
  import "./chunk-57HMLBYN.js";
213
213
  import "./chunk-HFOQKCD2.js";
@@ -235,7 +235,7 @@ import {
235
235
  loadConfig,
236
236
  runDoctor,
237
237
  validateNexusEnv
238
- } from "./chunk-5X7GAOVZ.js";
238
+ } from "./chunk-DH4V6S5K.js";
239
239
  import "./chunk-SFZESA5O.js";
240
240
  import "./chunk-6Q33PBXC.js";
241
241
  import {
package/dist/index.d.ts CHANGED
@@ -28025,10 +28025,17 @@ type SuspiciousSignal = z.infer<typeof SuspiciousSignalSchema>;
28025
28025
  */
28026
28026
  interface GitHubUserMetadata {
28027
28027
  readonly username: string;
28028
- readonly accountAgeDays: number;
28029
- readonly priorContributions: number;
28030
- readonly recentCommentCount: number;
28031
- readonly recentCommentWindowMinutes: number;
28028
+ /**
28029
+ * Account/activity fields are OPTIONAL (#3106). When a field is absent (the
28030
+ * caller couldn't fetch it — e.g. the firewall before Phase 3 wiring), its
28031
+ * signal is SKIPPED rather than fabricated: an unknown value must never be
28032
+ * treated as benign (the old hardcoded `365`/`0`) nor as hostile. Only the
28033
+ * `authorAssociation` + `injectionFlags` signals fire on absent activity data.
28034
+ */
28035
+ readonly accountAgeDays?: number;
28036
+ readonly priorContributions?: number;
28037
+ readonly recentCommentCount?: number;
28038
+ readonly recentCommentWindowMinutes?: number;
28032
28039
  readonly authorAssociation: string;
28033
28040
  readonly injectionFlags: readonly InjectionFlag[];
28034
28041
  }
@@ -28329,6 +28336,14 @@ interface FirewallResult {
28329
28336
  readonly sanitized: SanitizedInput;
28330
28337
  readonly trust: ClassifyResult;
28331
28338
  readonly reputation?: ReputationAssessment;
28339
+ /**
28340
+ * The tier consumers should ENFORCE on (#3106): the classifier tier
28341
+ * reconciled with the reputation assessment (demotion-only; Tier-1/allowlist
28342
+ * wins; equals `trust.trustTier` when reputation is absent). Previously the
28343
+ * reputation tier was computed but dropped — `trust.trustTier` alone left
28344
+ * reputation unenforced.
28345
+ */
28346
+ readonly effectiveTrustTier: TrustTier;
28332
28347
  readonly atl: string;
28333
28348
  readonly auditEvents: readonly {
28334
28349
  readonly id: string;
package/dist/index.js CHANGED
@@ -519,7 +519,7 @@ import {
519
519
  validateWorkflow,
520
520
  validateWorkflowDependencies,
521
521
  withLogging
522
- } from "./chunk-44XYCZCU.js";
522
+ } from "./chunk-PLFKZUVT.js";
523
523
  import {
524
524
  getTokenEnvVars,
525
525
  hasToken,
@@ -688,12 +688,13 @@ import {
688
688
  isMutatingAction,
689
689
  isReadOnlyAction,
690
690
  mapAuthorAssociation,
691
+ reconcileTrustTier,
691
692
  requiresCitation,
692
693
  requiresCorroboration,
693
694
  sanitizeInput,
694
695
  validateAgentAction,
695
696
  validateCorroboration
696
- } from "./chunk-IOXR6W24.js";
697
+ } from "./chunk-6IV43POQ.js";
697
698
  import {
698
699
  GitHubProvider,
699
700
  ScmError
@@ -737,7 +738,7 @@ import {
737
738
  getKnownNexusVarNames,
738
739
  startStdioServer,
739
740
  validateNexusEnv
740
- } from "./chunk-5X7GAOVZ.js";
741
+ } from "./chunk-DH4V6S5K.js";
741
742
  import {
742
743
  AvailabilityCache,
743
744
  filterAvailableModels,
@@ -4183,12 +4184,14 @@ var HostileInputFirewall = class {
4183
4184
  const sanitized = this.runSanitization(meta);
4184
4185
  const trust = this.runClassification(meta, sanitized);
4185
4186
  const reputation = this.runReputation(meta, sanitized);
4186
- const atl = this.buildATL(meta, trust, sanitized, reputation);
4187
+ const effectiveTrustTier = reconcileTrustTier(trust.trustTier, reputation);
4188
+ const atl = this.buildATL(meta, effectiveTrustTier, sanitized, reputation);
4187
4189
  const auditEvents = this.auditTrail.query().map((e) => ({ id: e.id, type: e.type }));
4188
4190
  return ok({
4189
4191
  sanitized,
4190
4192
  trust,
4191
4193
  ...reputation !== void 0 ? { reputation } : {},
4194
+ effectiveTrustTier,
4192
4195
  atl,
4193
4196
  auditEvents,
4194
4197
  durationMs: Date.now() - start
@@ -4266,10 +4269,6 @@ var HostileInputFirewall = class {
4266
4269
  if (!this.stages.reputationAssessment) return void 0;
4267
4270
  const metadata = {
4268
4271
  username: meta.username,
4269
- accountAgeDays: 365,
4270
- priorContributions: 0,
4271
- recentCommentCount: 0,
4272
- recentCommentWindowMinutes: 60,
4273
4272
  authorAssociation: meta.authorAssociation.toUpperCase(),
4274
4273
  injectionFlags: sanitized.injectionFlags
4275
4274
  };
@@ -4285,9 +4284,9 @@ var HostileInputFirewall = class {
4285
4284
  }
4286
4285
  return result;
4287
4286
  }
4288
- buildATL(meta, trust, sanitized, reputation) {
4287
+ buildATL(meta, effectiveTrustTier, sanitized, reputation) {
4289
4288
  const data = {
4290
- tier: trust.trustTier,
4289
+ tier: effectiveTrustTier,
4291
4290
  source: meta.sourceType,
4292
4291
  user: meta.username,
4293
4292
  sanitized: sanitized.wasModified,