nexus-agents 2.91.0 → 2.92.1

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 (29) hide show
  1. package/dist/{chunk-W7YQOXCJ.js → chunk-74AO4RKT.js} +2 -2
  2. package/dist/{chunk-PLFKZUVT.js → chunk-G3CYK3WA.js} +7 -5
  3. package/dist/{chunk-PLFKZUVT.js.map → chunk-G3CYK3WA.js.map} +1 -1
  4. package/dist/{chunk-3RZWLQSC.js → chunk-G5XKEUAP.js} +74 -2
  5. package/dist/chunk-G5XKEUAP.js.map +1 -0
  6. package/dist/{chunk-6IV43POQ.js → chunk-L6JZCAFH.js} +96 -624
  7. package/dist/chunk-L6JZCAFH.js.map +1 -0
  8. package/dist/chunk-NR4NSTJH.js +547 -0
  9. package/dist/chunk-NR4NSTJH.js.map +1 -0
  10. package/dist/{chunk-X2M7OF27.js → chunk-OK6U5N5Y.js} +3 -1
  11. package/dist/chunk-OK6U5N5Y.js.map +1 -0
  12. package/dist/{chunk-DH4V6S5K.js → chunk-ZNR3ZVC6.js} +3 -3
  13. package/dist/cli.js +43 -20
  14. package/dist/cli.js.map +1 -1
  15. package/dist/index.d.ts +190 -190
  16. package/dist/index.js +19 -17
  17. package/dist/index.js.map +1 -1
  18. package/dist/{issue-triage-CDSHKFPP.js → issue-triage-FVZOVIRX.js} +3 -2
  19. package/dist/{pr-reviewer-helpers-WYPUYQ2U.js → pr-reviewer-helpers-RBUEJI6V.js} +14 -3
  20. package/dist/{setup-command-B5QPHCKY.js → setup-command-AZAWBZOP.js} +3 -3
  21. package/package.json +1 -1
  22. package/dist/chunk-3RZWLQSC.js.map +0 -1
  23. package/dist/chunk-6IV43POQ.js.map +0 -1
  24. package/dist/chunk-X2M7OF27.js.map +0 -1
  25. /package/dist/{chunk-W7YQOXCJ.js.map → chunk-74AO4RKT.js.map} +0 -0
  26. /package/dist/{chunk-DH4V6S5K.js.map → chunk-ZNR3ZVC6.js.map} +0 -0
  27. /package/dist/{issue-triage-CDSHKFPP.js.map → issue-triage-FVZOVIRX.js.map} +0 -0
  28. /package/dist/{pr-reviewer-helpers-WYPUYQ2U.js.map → pr-reviewer-helpers-RBUEJI6V.js.map} +0 -0
  29. /package/dist/{setup-command-B5QPHCKY.js.map → setup-command-AZAWBZOP.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -29168,6 +29168,196 @@ declare function computeAdaptiveThresholds(store: OutcomeStore, cli: CliNameLite
29168
29168
  */
29169
29169
  declare function detectTrend(outcomes: readonly TaskOutcome$2[], windowSize?: number): Trend;
29170
29170
 
29171
+ /**
29172
+ * nexus-agents/scm - SCM Provider Types
29173
+ *
29174
+ * Shared types for the centralized SCM (Source Control Management) module.
29175
+ * Supports GitHub (REST API + gh CLI) with extensibility for GitLab/Gitea.
29176
+ *
29177
+ * @module scm/types
29178
+ * (Source: Issue #1136 — Centralized SCM Provider Module)
29179
+ */
29180
+
29181
+ /** Supported SCM platforms. */
29182
+ type ScmPlatform = 'github' | 'gitlab' | 'gitea';
29183
+ /** Token resolution strategy. */
29184
+ type TokenStrategy = 'env' | 'cli' | 'config';
29185
+ /** Resolved SCM token with metadata. */
29186
+ interface ScmToken {
29187
+ /** The raw token value */
29188
+ readonly value: string;
29189
+ /** How the token was resolved */
29190
+ readonly strategy: TokenStrategy;
29191
+ /** SCM platform this token is for */
29192
+ readonly platform: ScmPlatform;
29193
+ }
29194
+ /** Token resolution configuration. */
29195
+ interface TokenResolverConfig {
29196
+ /** Explicit token (highest priority) */
29197
+ readonly token?: string;
29198
+ /** SCM platform to resolve for */
29199
+ readonly platform?: ScmPlatform;
29200
+ /** Custom env var name override */
29201
+ readonly envVar?: string;
29202
+ }
29203
+ /** SCM issue representation. */
29204
+ interface ScmIssue {
29205
+ readonly number: number;
29206
+ readonly title: string;
29207
+ readonly body: string;
29208
+ readonly labels: readonly string[];
29209
+ readonly author: string;
29210
+ readonly createdAt: string;
29211
+ }
29212
+ /** SCM pull/merge request representation. */
29213
+ interface ScmPullRequest {
29214
+ readonly number: number;
29215
+ readonly title: string;
29216
+ readonly body: string;
29217
+ readonly author: string;
29218
+ readonly base: string;
29219
+ readonly head: string;
29220
+ readonly url: string;
29221
+ }
29222
+ /** SCM comment representation. */
29223
+ interface ScmComment {
29224
+ readonly id: number;
29225
+ readonly body: string;
29226
+ readonly author: string;
29227
+ readonly createdAt: string;
29228
+ }
29229
+ /** PR creation options. */
29230
+ interface CreatePROptions {
29231
+ readonly title: string;
29232
+ readonly body: string;
29233
+ readonly head: string;
29234
+ readonly base: string;
29235
+ }
29236
+ /** PR merge options. */
29237
+ interface MergePROptions {
29238
+ readonly method?: 'merge' | 'squash' | 'rebase';
29239
+ readonly commitTitle?: string;
29240
+ readonly commitMessage?: string;
29241
+ readonly deleteBranch?: boolean;
29242
+ }
29243
+ /** PR status for merge eligibility. */
29244
+ interface PRStatus {
29245
+ readonly mergeable: boolean;
29246
+ readonly checksStatus: 'pending' | 'success' | 'failure';
29247
+ readonly reviewStatus: 'approved' | 'pending' | 'changes_requested';
29248
+ }
29249
+ /** Issue filter options. */
29250
+ interface IssueFilters {
29251
+ readonly labels?: readonly string[];
29252
+ readonly state?: 'open' | 'closed' | 'all';
29253
+ readonly limit?: number;
29254
+ }
29255
+ /** Unified SCM error with platform-aware context. */
29256
+ declare class ScmError extends Error {
29257
+ readonly platform: ScmPlatform;
29258
+ readonly statusCode?: number | undefined;
29259
+ readonly context?: Record<string, unknown> | undefined;
29260
+ constructor(message: string, platform: ScmPlatform, statusCode?: number | undefined, context?: Record<string, unknown> | undefined);
29261
+ }
29262
+ /** File change in a pull request. */
29263
+ interface ScmFileChange {
29264
+ readonly filename: string;
29265
+ readonly status: 'added' | 'removed' | 'modified' | 'renamed' | 'copied';
29266
+ readonly additions: number;
29267
+ readonly deletions: number;
29268
+ readonly patch?: string;
29269
+ readonly previousFilename?: string;
29270
+ }
29271
+ /** Extended PR with file diffs and stats. Used by IScmReviewer. */
29272
+ interface ScmPullRequestDetail extends ScmPullRequest {
29273
+ readonly draft: boolean;
29274
+ readonly authorAssociation: string;
29275
+ readonly labels: readonly string[];
29276
+ readonly files: readonly ScmFileChange[];
29277
+ readonly additions: number;
29278
+ readonly deletions: number;
29279
+ readonly headSha: string;
29280
+ }
29281
+ /** Extended issue with association and state. Used by IScmReviewer. */
29282
+ interface ScmIssueDetail extends ScmIssue {
29283
+ readonly authorAssociation: string;
29284
+ readonly state: string;
29285
+ readonly url: string;
29286
+ }
29287
+ /** Extended comment with author association. */
29288
+ interface ScmCommentDetail extends ScmComment {
29289
+ readonly authorAssociation: string;
29290
+ }
29291
+ /** Review decision for a pull request. */
29292
+ type ScmReviewDecision = 'approve' | 'request_changes' | 'comment';
29293
+ /** User metadata for reputation assessment. */
29294
+ interface ScmUserMetadata {
29295
+ readonly login: string;
29296
+ readonly name: string | null;
29297
+ readonly company: string | null;
29298
+ readonly followers: number;
29299
+ readonly following: number;
29300
+ readonly publicRepos: number;
29301
+ readonly createdAt: string;
29302
+ }
29303
+ /**
29304
+ * Core SCM provider interface.
29305
+ *
29306
+ * All methods return `Result<T, ScmError>` for consistent error handling
29307
+ * across GitHub REST API, gh CLI, and future GitLab/Gitea backends.
29308
+ */
29309
+ interface IScmProvider {
29310
+ /** Platform identifier. */
29311
+ readonly platform: ScmPlatform;
29312
+ /** Repository in owner/repo format. */
29313
+ readonly repo: string;
29314
+ getIssue(number: number): Promise<Result<ScmIssue, ScmError>>;
29315
+ listIssues(filters?: IssueFilters): Promise<Result<readonly ScmIssue[], ScmError>>;
29316
+ createIssue(title: string, body: string, labels?: readonly string[]): Promise<Result<ScmIssue, ScmError>>;
29317
+ addLabels(issueNumber: number, labels: readonly string[]): Promise<Result<void, ScmError>>;
29318
+ createPR(options: CreatePROptions): Promise<Result<ScmPullRequest, ScmError>>;
29319
+ mergePR(prNumber: number, options?: MergePROptions): Promise<Result<void, ScmError>>;
29320
+ getPRStatus(prNumber: number): Promise<Result<PRStatus, ScmError>>;
29321
+ addComment(issueNumber: number, body: string): Promise<Result<void, ScmError>>;
29322
+ listComments(issueNumber: number): Promise<Result<readonly ScmComment[], ScmError>>;
29323
+ }
29324
+ /**
29325
+ * Review trait — PR review capabilities.
29326
+ *
29327
+ * Implemented by platforms supporting code review workflows.
29328
+ * Consumers declare this trait when they need PR file diffs or review posting.
29329
+ */
29330
+ interface IScmReviewer {
29331
+ /** Fetch PR with full file diffs and stats. */
29332
+ getPullRequestDetail(prNumber: number): Promise<Result<ScmPullRequestDetail, ScmError>>;
29333
+ /** Post a review on a pull request. */
29334
+ createReview(prNumber: number, body: string, decision: ScmReviewDecision): Promise<Result<void, ScmError>>;
29335
+ /** Fetch issue with author association and state. */
29336
+ getIssueDetail(issueNumber: number): Promise<Result<ScmIssueDetail, ScmError>>;
29337
+ /** List comments with author associations. */
29338
+ listCommentDetails(issueNumber: number): Promise<Result<readonly ScmCommentDetail[], ScmError>>;
29339
+ }
29340
+ /**
29341
+ * User info trait — user metadata for reputation assessment.
29342
+ *
29343
+ * Implemented by platforms supporting user profile queries.
29344
+ * Consumers declare this trait when they need author reputation data.
29345
+ */
29346
+ interface IScmUserInfo {
29347
+ /** Fetch user metadata for reputation assessment. */
29348
+ fetchUserMetadata(username: string): Promise<Result<ScmUserMetadata, ScmError>>;
29349
+ }
29350
+ /**
29351
+ * Convenience type: provider with review capabilities.
29352
+ * Used by PR review workflows.
29353
+ */
29354
+ type ReviewCapableProvider = IScmProvider & IScmReviewer;
29355
+ /**
29356
+ * Convenience type: provider with all capabilities.
29357
+ * Used by full triage workflows that need review + user info.
29358
+ */
29359
+ type FullCapableProvider = IScmProvider & IScmReviewer & IScmUserInfo;
29360
+
29171
29361
  /**
29172
29362
  * nexus-agents/consensus - Voting Strategies
29173
29363
  *
@@ -31971,196 +32161,6 @@ declare class SharedMemoryStore {
31971
32161
  clear(): void;
31972
32162
  }
31973
32163
 
31974
- /**
31975
- * nexus-agents/scm - SCM Provider Types
31976
- *
31977
- * Shared types for the centralized SCM (Source Control Management) module.
31978
- * Supports GitHub (REST API + gh CLI) with extensibility for GitLab/Gitea.
31979
- *
31980
- * @module scm/types
31981
- * (Source: Issue #1136 — Centralized SCM Provider Module)
31982
- */
31983
-
31984
- /** Supported SCM platforms. */
31985
- type ScmPlatform = 'github' | 'gitlab' | 'gitea';
31986
- /** Token resolution strategy. */
31987
- type TokenStrategy = 'env' | 'cli' | 'config';
31988
- /** Resolved SCM token with metadata. */
31989
- interface ScmToken {
31990
- /** The raw token value */
31991
- readonly value: string;
31992
- /** How the token was resolved */
31993
- readonly strategy: TokenStrategy;
31994
- /** SCM platform this token is for */
31995
- readonly platform: ScmPlatform;
31996
- }
31997
- /** Token resolution configuration. */
31998
- interface TokenResolverConfig {
31999
- /** Explicit token (highest priority) */
32000
- readonly token?: string;
32001
- /** SCM platform to resolve for */
32002
- readonly platform?: ScmPlatform;
32003
- /** Custom env var name override */
32004
- readonly envVar?: string;
32005
- }
32006
- /** SCM issue representation. */
32007
- interface ScmIssue {
32008
- readonly number: number;
32009
- readonly title: string;
32010
- readonly body: string;
32011
- readonly labels: readonly string[];
32012
- readonly author: string;
32013
- readonly createdAt: string;
32014
- }
32015
- /** SCM pull/merge request representation. */
32016
- interface ScmPullRequest {
32017
- readonly number: number;
32018
- readonly title: string;
32019
- readonly body: string;
32020
- readonly author: string;
32021
- readonly base: string;
32022
- readonly head: string;
32023
- readonly url: string;
32024
- }
32025
- /** SCM comment representation. */
32026
- interface ScmComment {
32027
- readonly id: number;
32028
- readonly body: string;
32029
- readonly author: string;
32030
- readonly createdAt: string;
32031
- }
32032
- /** PR creation options. */
32033
- interface CreatePROptions {
32034
- readonly title: string;
32035
- readonly body: string;
32036
- readonly head: string;
32037
- readonly base: string;
32038
- }
32039
- /** PR merge options. */
32040
- interface MergePROptions {
32041
- readonly method?: 'merge' | 'squash' | 'rebase';
32042
- readonly commitTitle?: string;
32043
- readonly commitMessage?: string;
32044
- readonly deleteBranch?: boolean;
32045
- }
32046
- /** PR status for merge eligibility. */
32047
- interface PRStatus {
32048
- readonly mergeable: boolean;
32049
- readonly checksStatus: 'pending' | 'success' | 'failure';
32050
- readonly reviewStatus: 'approved' | 'pending' | 'changes_requested';
32051
- }
32052
- /** Issue filter options. */
32053
- interface IssueFilters {
32054
- readonly labels?: readonly string[];
32055
- readonly state?: 'open' | 'closed' | 'all';
32056
- readonly limit?: number;
32057
- }
32058
- /** Unified SCM error with platform-aware context. */
32059
- declare class ScmError extends Error {
32060
- readonly platform: ScmPlatform;
32061
- readonly statusCode?: number | undefined;
32062
- readonly context?: Record<string, unknown> | undefined;
32063
- constructor(message: string, platform: ScmPlatform, statusCode?: number | undefined, context?: Record<string, unknown> | undefined);
32064
- }
32065
- /** File change in a pull request. */
32066
- interface ScmFileChange {
32067
- readonly filename: string;
32068
- readonly status: 'added' | 'removed' | 'modified' | 'renamed' | 'copied';
32069
- readonly additions: number;
32070
- readonly deletions: number;
32071
- readonly patch?: string;
32072
- readonly previousFilename?: string;
32073
- }
32074
- /** Extended PR with file diffs and stats. Used by IScmReviewer. */
32075
- interface ScmPullRequestDetail extends ScmPullRequest {
32076
- readonly draft: boolean;
32077
- readonly authorAssociation: string;
32078
- readonly labels: readonly string[];
32079
- readonly files: readonly ScmFileChange[];
32080
- readonly additions: number;
32081
- readonly deletions: number;
32082
- readonly headSha: string;
32083
- }
32084
- /** Extended issue with association and state. Used by IScmReviewer. */
32085
- interface ScmIssueDetail extends ScmIssue {
32086
- readonly authorAssociation: string;
32087
- readonly state: string;
32088
- readonly url: string;
32089
- }
32090
- /** Extended comment with author association. */
32091
- interface ScmCommentDetail extends ScmComment {
32092
- readonly authorAssociation: string;
32093
- }
32094
- /** Review decision for a pull request. */
32095
- type ScmReviewDecision = 'approve' | 'request_changes' | 'comment';
32096
- /** User metadata for reputation assessment. */
32097
- interface ScmUserMetadata {
32098
- readonly login: string;
32099
- readonly name: string | null;
32100
- readonly company: string | null;
32101
- readonly followers: number;
32102
- readonly following: number;
32103
- readonly publicRepos: number;
32104
- readonly createdAt: string;
32105
- }
32106
- /**
32107
- * Core SCM provider interface.
32108
- *
32109
- * All methods return `Result<T, ScmError>` for consistent error handling
32110
- * across GitHub REST API, gh CLI, and future GitLab/Gitea backends.
32111
- */
32112
- interface IScmProvider {
32113
- /** Platform identifier. */
32114
- readonly platform: ScmPlatform;
32115
- /** Repository in owner/repo format. */
32116
- readonly repo: string;
32117
- getIssue(number: number): Promise<Result<ScmIssue, ScmError>>;
32118
- listIssues(filters?: IssueFilters): Promise<Result<readonly ScmIssue[], ScmError>>;
32119
- createIssue(title: string, body: string, labels?: readonly string[]): Promise<Result<ScmIssue, ScmError>>;
32120
- addLabels(issueNumber: number, labels: readonly string[]): Promise<Result<void, ScmError>>;
32121
- createPR(options: CreatePROptions): Promise<Result<ScmPullRequest, ScmError>>;
32122
- mergePR(prNumber: number, options?: MergePROptions): Promise<Result<void, ScmError>>;
32123
- getPRStatus(prNumber: number): Promise<Result<PRStatus, ScmError>>;
32124
- addComment(issueNumber: number, body: string): Promise<Result<void, ScmError>>;
32125
- listComments(issueNumber: number): Promise<Result<readonly ScmComment[], ScmError>>;
32126
- }
32127
- /**
32128
- * Review trait — PR review capabilities.
32129
- *
32130
- * Implemented by platforms supporting code review workflows.
32131
- * Consumers declare this trait when they need PR file diffs or review posting.
32132
- */
32133
- interface IScmReviewer {
32134
- /** Fetch PR with full file diffs and stats. */
32135
- getPullRequestDetail(prNumber: number): Promise<Result<ScmPullRequestDetail, ScmError>>;
32136
- /** Post a review on a pull request. */
32137
- createReview(prNumber: number, body: string, decision: ScmReviewDecision): Promise<Result<void, ScmError>>;
32138
- /** Fetch issue with author association and state. */
32139
- getIssueDetail(issueNumber: number): Promise<Result<ScmIssueDetail, ScmError>>;
32140
- /** List comments with author associations. */
32141
- listCommentDetails(issueNumber: number): Promise<Result<readonly ScmCommentDetail[], ScmError>>;
32142
- }
32143
- /**
32144
- * User info trait — user metadata for reputation assessment.
32145
- *
32146
- * Implemented by platforms supporting user profile queries.
32147
- * Consumers declare this trait when they need author reputation data.
32148
- */
32149
- interface IScmUserInfo {
32150
- /** Fetch user metadata for reputation assessment. */
32151
- fetchUserMetadata(username: string): Promise<Result<ScmUserMetadata, ScmError>>;
32152
- }
32153
- /**
32154
- * Convenience type: provider with review capabilities.
32155
- * Used by PR review workflows.
32156
- */
32157
- type ReviewCapableProvider = IScmProvider & IScmReviewer;
32158
- /**
32159
- * Convenience type: provider with all capabilities.
32160
- * Used by full triage workflows that need review + user info.
32161
- */
32162
- type FullCapableProvider = IScmProvider & IScmReviewer & IScmUserInfo;
32163
-
32164
32164
  /**
32165
32165
  * nexus-agents/scm - Centralized Token Resolver
32166
32166
  *
package/dist/index.js CHANGED
@@ -519,13 +519,13 @@ import {
519
519
  validateWorkflow,
520
520
  validateWorkflowDependencies,
521
521
  withLogging
522
- } from "./chunk-PLFKZUVT.js";
522
+ } from "./chunk-G3CYK3WA.js";
523
523
  import {
524
524
  getTokenEnvVars,
525
525
  hasToken,
526
526
  resolveToken
527
527
  } from "./chunk-EAT4GTMT.js";
528
- import "./chunk-X2M7OF27.js";
528
+ import "./chunk-OK6U5N5Y.js";
529
529
  import {
530
530
  OPENAI_MODELS,
531
531
  OPENAI_MODEL_ALIASES,
@@ -665,19 +665,8 @@ import {
665
665
  AgentActionSchema,
666
666
  GitHubReviewer,
667
667
  GitHubUserInfo,
668
- GitHubUserRoleSchema,
669
- InjectionFlagSchema,
670
- ROLE_DEFAULT_TRUST,
671
- ReputationCache,
672
- SanitizedInputSchema,
673
- SanitizerConfigSchema,
674
668
  SourceCitationSchema,
675
- StrippedElementSchema,
676
- SuspiciousSignalSchema,
677
- TRUST_TIER_NUMERIC,
678
- TrustTierSchema,
679
669
  ViolationSchema,
680
- assessReputation,
681
670
  canInfluenceDecisions,
682
671
  canProceed,
683
672
  classifyTrust,
@@ -688,17 +677,30 @@ import {
688
677
  isMutatingAction,
689
678
  isReadOnlyAction,
690
679
  mapAuthorAssociation,
691
- reconcileTrustTier,
692
680
  requiresCitation,
693
681
  requiresCorroboration,
694
- sanitizeInput,
695
682
  validateAgentAction,
696
683
  validateCorroboration
697
- } from "./chunk-6IV43POQ.js";
684
+ } from "./chunk-L6JZCAFH.js";
698
685
  import {
699
686
  GitHubProvider,
700
687
  ScmError
701
688
  } from "./chunk-EFHZHCF2.js";
689
+ import {
690
+ GitHubUserRoleSchema,
691
+ InjectionFlagSchema,
692
+ ROLE_DEFAULT_TRUST,
693
+ ReputationCache,
694
+ SanitizedInputSchema,
695
+ SanitizerConfigSchema,
696
+ StrippedElementSchema,
697
+ SuspiciousSignalSchema,
698
+ TRUST_TIER_NUMERIC,
699
+ TrustTierSchema,
700
+ assessReputation,
701
+ reconcileTrustTier,
702
+ sanitizeInput
703
+ } from "./chunk-NR4NSTJH.js";
702
704
  import {
703
705
  FALLBACK_SCANNER_DATA,
704
706
  buildPlanFromAnalysis,
@@ -738,7 +740,7 @@ import {
738
740
  getKnownNexusVarNames,
739
741
  startStdioServer,
740
742
  validateNexusEnv
741
- } from "./chunk-DH4V6S5K.js";
743
+ } from "./chunk-ZNR3ZVC6.js";
742
744
  import {
743
745
  AvailabilityCache,
744
746
  filterAvailableModels,