nexus-agents 2.101.3 → 2.102.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.
- package/dist/{chunk-4JP6GACK.js → chunk-DR6YA645.js} +3 -3
- package/dist/{chunk-CYG62BXB.js → chunk-J6KO7RGF.js} +2 -2
- package/dist/{chunk-PHBPUEFM.js → chunk-MLTNGA4P.js} +1060 -927
- package/dist/chunk-MLTNGA4P.js.map +1 -0
- package/dist/{chunk-NOVS52US.js → chunk-PC6GNOES.js} +2 -2
- package/dist/{chunk-KYONCTIL.js → chunk-QYE6GEPY.js} +2 -2
- package/dist/{chunk-KAJPY6YZ.js → chunk-SXWJ7IUF.js} +20 -1
- package/dist/{chunk-KAJPY6YZ.js.map → chunk-SXWJ7IUF.js.map} +1 -1
- package/dist/cli.js +61 -10
- package/dist/cli.js.map +1 -1
- package/dist/{consensus-vote-IYYFI2P5.js → consensus-vote-QPHD5HGX.js} +3 -3
- package/dist/{improvement-review-BGFCQV4I.js → improvement-review-YFQ5T7I3.js} +3 -3
- package/dist/index.d.ts +128 -128
- package/dist/index.js +9 -70
- package/dist/index.js.map +1 -1
- package/dist/{setup-command-7O7VOMTI.js → setup-command-CRJACYUE.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-PHBPUEFM.js.map +0 -1
- /package/dist/{chunk-4JP6GACK.js.map → chunk-DR6YA645.js.map} +0 -0
- /package/dist/{chunk-CYG62BXB.js.map → chunk-J6KO7RGF.js.map} +0 -0
- /package/dist/{chunk-NOVS52US.js.map → chunk-PC6GNOES.js.map} +0 -0
- /package/dist/{chunk-KYONCTIL.js.map → chunk-QYE6GEPY.js.map} +0 -0
- /package/dist/{consensus-vote-IYYFI2P5.js.map → consensus-vote-QPHD5HGX.js.map} +0 -0
- /package/dist/{improvement-review-BGFCQV4I.js.map → improvement-review-YFQ5T7I3.js.map} +0 -0
- /package/dist/{setup-command-7O7VOMTI.js.map → setup-command-CRJACYUE.js.map} +0 -0
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
executeVoting,
|
|
7
7
|
registerConsensusVoteTool,
|
|
8
8
|
resetCorrelationTracker
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J6KO7RGF.js";
|
|
10
10
|
import "./chunk-FVWKAEYH.js";
|
|
11
11
|
import "./chunk-W65C5VVJ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-SXWJ7IUF.js";
|
|
13
13
|
import "./chunk-TDXLS2TY.js";
|
|
14
14
|
import "./chunk-L2NPJRZZ.js";
|
|
15
15
|
import "./chunk-LVGYWJDX.js";
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
registerConsensusVoteTool,
|
|
32
32
|
resetCorrelationTracker
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=consensus-vote-
|
|
34
|
+
//# sourceMappingURL=consensus-vote-QPHD5HGX.js.map
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
loadSelfEvalSignals,
|
|
9
9
|
registerImprovementReviewTool,
|
|
10
10
|
runImprovementReview
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-QYE6GEPY.js";
|
|
12
|
+
import "./chunk-SXWJ7IUF.js";
|
|
13
13
|
import "./chunk-KLYBJUTK.js";
|
|
14
14
|
import "./chunk-CH7QIDHQ.js";
|
|
15
15
|
import "./chunk-PR4QN5HX.js";
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
registerImprovementReviewTool,
|
|
25
25
|
runImprovementReview
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=improvement-review-
|
|
27
|
+
//# sourceMappingURL=improvement-review-YFQ5T7I3.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -25192,6 +25192,134 @@ declare class AuditLogger implements IAuditLogger {
|
|
|
25192
25192
|
}
|
|
25193
25193
|
declare function createAuditLogger(config: AuditLogConfig, storage?: IAuditStorage, logger?: ILogger): AuditLogger;
|
|
25194
25194
|
|
|
25195
|
+
/** Agent roles used in the pipeline. */
|
|
25196
|
+
type PipelineRole = 'researcher' | 'architect' | 'pm' | 'coder' | 'qa' | 'security';
|
|
25197
|
+
/** A task decomposed by the PM, potentially with conditional approval requirements. */
|
|
25198
|
+
interface PipelineTask {
|
|
25199
|
+
readonly id: string;
|
|
25200
|
+
readonly title: string;
|
|
25201
|
+
readonly description: string;
|
|
25202
|
+
readonly assignedTo: PipelineRole;
|
|
25203
|
+
readonly status: 'pending' | 'in_progress' | 'review' | 'done' | 'rejected';
|
|
25204
|
+
readonly feedback?: string;
|
|
25205
|
+
/** Implementation text from the code expert (surfaced for harness use). */
|
|
25206
|
+
readonly implementation?: string;
|
|
25207
|
+
/** Conditions required for task completion (from conditional_go vote). */
|
|
25208
|
+
readonly conditions?: readonly string[] | undefined;
|
|
25209
|
+
/** Caveats/warnings associated with the task (from conditional_go vote). */
|
|
25210
|
+
readonly caveats?: readonly string[] | undefined;
|
|
25211
|
+
}
|
|
25212
|
+
/** Vote result from consensus — discriminated union with conditional approval support. */
|
|
25213
|
+
type VoteResult = {
|
|
25214
|
+
readonly kind: 'approved';
|
|
25215
|
+
readonly approvalPercentage: number;
|
|
25216
|
+
} | {
|
|
25217
|
+
readonly kind: 'rejected';
|
|
25218
|
+
readonly feedback: string;
|
|
25219
|
+
readonly approvalPercentage: number;
|
|
25220
|
+
} | {
|
|
25221
|
+
readonly kind: 'conditional_go';
|
|
25222
|
+
readonly conditions: readonly string[];
|
|
25223
|
+
readonly caveats: readonly string[];
|
|
25224
|
+
readonly approvalPercentage: number;
|
|
25225
|
+
};
|
|
25226
|
+
/** QA review result. */
|
|
25227
|
+
interface QaReviewResult {
|
|
25228
|
+
readonly verdict: 'pass' | 'needs_work' | 'reject';
|
|
25229
|
+
readonly feedback: string;
|
|
25230
|
+
readonly issues: readonly string[];
|
|
25231
|
+
}
|
|
25232
|
+
/** Overall pipeline result. */
|
|
25233
|
+
interface DevPipelineResult {
|
|
25234
|
+
readonly completed: boolean;
|
|
25235
|
+
readonly plan: string;
|
|
25236
|
+
readonly tasks: readonly PipelineTask[];
|
|
25237
|
+
readonly voteIterations: number;
|
|
25238
|
+
readonly qaIterations: number;
|
|
25239
|
+
readonly securityPassed: boolean;
|
|
25240
|
+
}
|
|
25241
|
+
/** Pluggable stage implementations — inject real or mock agents. */
|
|
25242
|
+
interface DevPipelineStages {
|
|
25243
|
+
/** Research expert gathers context for the task. */
|
|
25244
|
+
research(task: string): Promise<string>;
|
|
25245
|
+
/** Architect creates a plan from research + task. */
|
|
25246
|
+
plan(task: string, research: string, priorFeedback?: string): Promise<string>;
|
|
25247
|
+
/**
|
|
25248
|
+
* Consensus vote on the plan. Returns approval + feedback. `research` is the
|
|
25249
|
+
* research-stage context, surfaced to voters so they can weigh research
|
|
25250
|
+
* maturity (#3258) — appended to the proposal as informational, untrusted
|
|
25251
|
+
* text (never as instructions).
|
|
25252
|
+
*/
|
|
25253
|
+
vote(plan: string, research: string): Promise<VoteResult>;
|
|
25254
|
+
/** PM decomposes approved plan into tasks. */
|
|
25255
|
+
decompose(plan: string): Promise<PipelineTask[]>;
|
|
25256
|
+
/** Code expert implements a task. Returns the work product. */
|
|
25257
|
+
implement(task: PipelineTask): Promise<string>;
|
|
25258
|
+
/** QA expert reviews implementation. */
|
|
25259
|
+
qaReview(task: PipelineTask, implementation: string): Promise<QaReviewResult>;
|
|
25260
|
+
/**
|
|
25261
|
+
* Local QA quality gate (typecheck/lint/tests/build) run before ship (#3356).
|
|
25262
|
+
* Optional: pipelines that don't supply it simply skip the gate. Returns
|
|
25263
|
+
* `passed` plus actionable `feedback` from the underlying `runQualityGate`
|
|
25264
|
+
* engine. Whether a red gate fails the phase is governed by the
|
|
25265
|
+
* `qualityGate` mode in {@link DevPipelineOptions}, not this method.
|
|
25266
|
+
*/
|
|
25267
|
+
qualityGate?(): Promise<{
|
|
25268
|
+
passed: boolean;
|
|
25269
|
+
feedback: string;
|
|
25270
|
+
}>;
|
|
25271
|
+
/** Security scan. Returns true if passed. */
|
|
25272
|
+
securityScan(): Promise<{
|
|
25273
|
+
passed: boolean;
|
|
25274
|
+
feedback: string;
|
|
25275
|
+
}>;
|
|
25276
|
+
}
|
|
25277
|
+
/** Pipeline execution mode. */
|
|
25278
|
+
type PipelineMode = 'autonomous' | 'harness';
|
|
25279
|
+
/**
|
|
25280
|
+
* Local quality-gate mode (#3356). Controls the pre-ship typecheck/lint/tests/build gate:
|
|
25281
|
+
* - 'off' (default): the gate is never run. Safe for repos lacking standard scripts.
|
|
25282
|
+
* - 'advisory': the gate runs and its feedback is recorded, but a red gate does
|
|
25283
|
+
* NOT fail the pipeline.
|
|
25284
|
+
* - 'blocking': a red gate fails the phase, the same way a blocking security
|
|
25285
|
+
* scan does.
|
|
25286
|
+
*/
|
|
25287
|
+
type QualityGateMode = 'off' | 'advisory' | 'blocking';
|
|
25288
|
+
/** Options for pipeline execution. */
|
|
25289
|
+
interface DevPipelineOptions {
|
|
25290
|
+
/** Session ID for checkpoint/resume. Omit for no persistence. */
|
|
25291
|
+
readonly sessionId?: string | undefined;
|
|
25292
|
+
/** When true, stop after plan+vote and return partial result (#1717). */
|
|
25293
|
+
readonly dryRun?: boolean | undefined;
|
|
25294
|
+
/**
|
|
25295
|
+
* Pipeline mode (#1704):
|
|
25296
|
+
* - 'autonomous' (default): full pipeline runs internally
|
|
25297
|
+
* - 'harness': stops after decompose, returns tasks for external implementation
|
|
25298
|
+
*/
|
|
25299
|
+
readonly mode?: PipelineMode | undefined;
|
|
25300
|
+
/**
|
|
25301
|
+
* Local pre-ship quality-gate mode (#3356). Default 'off' so the pipeline
|
|
25302
|
+
* never wedges repos that lack standard build/test scripts. See
|
|
25303
|
+
* {@link QualityGateMode}. Requires `stages.qualityGate` to be supplied;
|
|
25304
|
+
* if the stage is absent the gate is skipped regardless of mode.
|
|
25305
|
+
*/
|
|
25306
|
+
readonly qualityGate?: QualityGateMode | undefined;
|
|
25307
|
+
/** Optional BeliefMemory for hindsight updates after plan outcomes (#1720). */
|
|
25308
|
+
readonly beliefMemory?: IHindsightBeliefMemory | undefined;
|
|
25309
|
+
}
|
|
25310
|
+
/**
|
|
25311
|
+
* Execute the full multi-agent development pipeline.
|
|
25312
|
+
*
|
|
25313
|
+
* When `sessionId` is provided, each stage checkpoints to disk. On crash,
|
|
25314
|
+
* re-running with the same sessionId resumes from the last completed stage.
|
|
25315
|
+
*
|
|
25316
|
+
* @param task - High-level task description
|
|
25317
|
+
* @param stages - Pluggable stage implementations
|
|
25318
|
+
* @param options - Pipeline options (sessionId for checkpoint/resume)
|
|
25319
|
+
* @returns Pipeline result with all outputs
|
|
25320
|
+
*/
|
|
25321
|
+
declare function runDevPipeline(task: string, stages: DevPipelineStages, options?: DevPipelineOptions): Promise<DevPipelineResult>;
|
|
25322
|
+
|
|
25195
25323
|
/**
|
|
25196
25324
|
* PR Review Findings — typed verification gate per #2225 + #2233 Child 3
|
|
25197
25325
|
*
|
|
@@ -32203,134 +32331,6 @@ interface V2Config {
|
|
|
32203
32331
|
*/
|
|
32204
32332
|
declare function resolveV2Config(): V2Config;
|
|
32205
32333
|
|
|
32206
|
-
/** Agent roles used in the pipeline. */
|
|
32207
|
-
type PipelineRole = 'researcher' | 'architect' | 'pm' | 'coder' | 'qa' | 'security';
|
|
32208
|
-
/** A task decomposed by the PM, potentially with conditional approval requirements. */
|
|
32209
|
-
interface PipelineTask {
|
|
32210
|
-
readonly id: string;
|
|
32211
|
-
readonly title: string;
|
|
32212
|
-
readonly description: string;
|
|
32213
|
-
readonly assignedTo: PipelineRole;
|
|
32214
|
-
readonly status: 'pending' | 'in_progress' | 'review' | 'done' | 'rejected';
|
|
32215
|
-
readonly feedback?: string;
|
|
32216
|
-
/** Implementation text from the code expert (surfaced for harness use). */
|
|
32217
|
-
readonly implementation?: string;
|
|
32218
|
-
/** Conditions required for task completion (from conditional_go vote). */
|
|
32219
|
-
readonly conditions?: readonly string[] | undefined;
|
|
32220
|
-
/** Caveats/warnings associated with the task (from conditional_go vote). */
|
|
32221
|
-
readonly caveats?: readonly string[] | undefined;
|
|
32222
|
-
}
|
|
32223
|
-
/** Vote result from consensus — discriminated union with conditional approval support. */
|
|
32224
|
-
type VoteResult = {
|
|
32225
|
-
readonly kind: 'approved';
|
|
32226
|
-
readonly approvalPercentage: number;
|
|
32227
|
-
} | {
|
|
32228
|
-
readonly kind: 'rejected';
|
|
32229
|
-
readonly feedback: string;
|
|
32230
|
-
readonly approvalPercentage: number;
|
|
32231
|
-
} | {
|
|
32232
|
-
readonly kind: 'conditional_go';
|
|
32233
|
-
readonly conditions: readonly string[];
|
|
32234
|
-
readonly caveats: readonly string[];
|
|
32235
|
-
readonly approvalPercentage: number;
|
|
32236
|
-
};
|
|
32237
|
-
/** QA review result. */
|
|
32238
|
-
interface QaReviewResult {
|
|
32239
|
-
readonly verdict: 'pass' | 'needs_work' | 'reject';
|
|
32240
|
-
readonly feedback: string;
|
|
32241
|
-
readonly issues: readonly string[];
|
|
32242
|
-
}
|
|
32243
|
-
/** Overall pipeline result. */
|
|
32244
|
-
interface DevPipelineResult {
|
|
32245
|
-
readonly completed: boolean;
|
|
32246
|
-
readonly plan: string;
|
|
32247
|
-
readonly tasks: readonly PipelineTask[];
|
|
32248
|
-
readonly voteIterations: number;
|
|
32249
|
-
readonly qaIterations: number;
|
|
32250
|
-
readonly securityPassed: boolean;
|
|
32251
|
-
}
|
|
32252
|
-
/** Pluggable stage implementations — inject real or mock agents. */
|
|
32253
|
-
interface DevPipelineStages {
|
|
32254
|
-
/** Research expert gathers context for the task. */
|
|
32255
|
-
research(task: string): Promise<string>;
|
|
32256
|
-
/** Architect creates a plan from research + task. */
|
|
32257
|
-
plan(task: string, research: string, priorFeedback?: string): Promise<string>;
|
|
32258
|
-
/**
|
|
32259
|
-
* Consensus vote on the plan. Returns approval + feedback. `research` is the
|
|
32260
|
-
* research-stage context, surfaced to voters so they can weigh research
|
|
32261
|
-
* maturity (#3258) — appended to the proposal as informational, untrusted
|
|
32262
|
-
* text (never as instructions).
|
|
32263
|
-
*/
|
|
32264
|
-
vote(plan: string, research: string): Promise<VoteResult>;
|
|
32265
|
-
/** PM decomposes approved plan into tasks. */
|
|
32266
|
-
decompose(plan: string): Promise<PipelineTask[]>;
|
|
32267
|
-
/** Code expert implements a task. Returns the work product. */
|
|
32268
|
-
implement(task: PipelineTask): Promise<string>;
|
|
32269
|
-
/** QA expert reviews implementation. */
|
|
32270
|
-
qaReview(task: PipelineTask, implementation: string): Promise<QaReviewResult>;
|
|
32271
|
-
/**
|
|
32272
|
-
* Local QA quality gate (typecheck/lint/tests/build) run before ship (#3356).
|
|
32273
|
-
* Optional: pipelines that don't supply it simply skip the gate. Returns
|
|
32274
|
-
* `passed` plus actionable `feedback` from the underlying `runQualityGate`
|
|
32275
|
-
* engine. Whether a red gate fails the phase is governed by the
|
|
32276
|
-
* `qualityGate` mode in {@link DevPipelineOptions}, not this method.
|
|
32277
|
-
*/
|
|
32278
|
-
qualityGate?(): Promise<{
|
|
32279
|
-
passed: boolean;
|
|
32280
|
-
feedback: string;
|
|
32281
|
-
}>;
|
|
32282
|
-
/** Security scan. Returns true if passed. */
|
|
32283
|
-
securityScan(): Promise<{
|
|
32284
|
-
passed: boolean;
|
|
32285
|
-
feedback: string;
|
|
32286
|
-
}>;
|
|
32287
|
-
}
|
|
32288
|
-
/** Pipeline execution mode. */
|
|
32289
|
-
type PipelineMode = 'autonomous' | 'harness';
|
|
32290
|
-
/**
|
|
32291
|
-
* Local quality-gate mode (#3356). Controls the pre-ship typecheck/lint/tests/build gate:
|
|
32292
|
-
* - 'off' (default): the gate is never run. Safe for repos lacking standard scripts.
|
|
32293
|
-
* - 'advisory': the gate runs and its feedback is recorded, but a red gate does
|
|
32294
|
-
* NOT fail the pipeline.
|
|
32295
|
-
* - 'blocking': a red gate fails the phase, the same way a blocking security
|
|
32296
|
-
* scan does.
|
|
32297
|
-
*/
|
|
32298
|
-
type QualityGateMode = 'off' | 'advisory' | 'blocking';
|
|
32299
|
-
/** Options for pipeline execution. */
|
|
32300
|
-
interface DevPipelineOptions {
|
|
32301
|
-
/** Session ID for checkpoint/resume. Omit for no persistence. */
|
|
32302
|
-
readonly sessionId?: string | undefined;
|
|
32303
|
-
/** When true, stop after plan+vote and return partial result (#1717). */
|
|
32304
|
-
readonly dryRun?: boolean | undefined;
|
|
32305
|
-
/**
|
|
32306
|
-
* Pipeline mode (#1704):
|
|
32307
|
-
* - 'autonomous' (default): full pipeline runs internally
|
|
32308
|
-
* - 'harness': stops after decompose, returns tasks for external implementation
|
|
32309
|
-
*/
|
|
32310
|
-
readonly mode?: PipelineMode | undefined;
|
|
32311
|
-
/**
|
|
32312
|
-
* Local pre-ship quality-gate mode (#3356). Default 'off' so the pipeline
|
|
32313
|
-
* never wedges repos that lack standard build/test scripts. See
|
|
32314
|
-
* {@link QualityGateMode}. Requires `stages.qualityGate` to be supplied;
|
|
32315
|
-
* if the stage is absent the gate is skipped regardless of mode.
|
|
32316
|
-
*/
|
|
32317
|
-
readonly qualityGate?: QualityGateMode | undefined;
|
|
32318
|
-
/** Optional BeliefMemory for hindsight updates after plan outcomes (#1720). */
|
|
32319
|
-
readonly beliefMemory?: IHindsightBeliefMemory | undefined;
|
|
32320
|
-
}
|
|
32321
|
-
/**
|
|
32322
|
-
* Execute the full multi-agent development pipeline.
|
|
32323
|
-
*
|
|
32324
|
-
* When `sessionId` is provided, each stage checkpoints to disk. On crash,
|
|
32325
|
-
* re-running with the same sessionId resumes from the last completed stage.
|
|
32326
|
-
*
|
|
32327
|
-
* @param task - High-level task description
|
|
32328
|
-
* @param stages - Pluggable stage implementations
|
|
32329
|
-
* @param options - Pipeline options (sessionId for checkpoint/resume)
|
|
32330
|
-
* @returns Pipeline result with all outputs
|
|
32331
|
-
*/
|
|
32332
|
-
declare function runDevPipeline(task: string, stages: DevPipelineStages, options?: DevPipelineOptions): Promise<DevPipelineResult>;
|
|
32333
|
-
|
|
32334
32334
|
/**
|
|
32335
32335
|
* Expert Bridge — Programmatic access to the execute_expert pipeline (#1693)
|
|
32336
32336
|
*
|
package/dist/index.js
CHANGED
|
@@ -291,6 +291,7 @@ import {
|
|
|
291
291
|
calculateWinLoss,
|
|
292
292
|
canExecuteSkill,
|
|
293
293
|
cancelExecution,
|
|
294
|
+
checkForResearchTriggers,
|
|
294
295
|
checkPermissionBoundary,
|
|
295
296
|
checkPipelinePolicy,
|
|
296
297
|
checkpointToResult,
|
|
@@ -515,7 +516,7 @@ import {
|
|
|
515
516
|
validateWorkflow,
|
|
516
517
|
validateWorkflowDependencies,
|
|
517
518
|
withLogging
|
|
518
|
-
} from "./chunk-
|
|
519
|
+
} from "./chunk-MLTNGA4P.js";
|
|
519
520
|
import "./chunk-3ACDP4E6.js";
|
|
520
521
|
import {
|
|
521
522
|
getTokenEnvVars,
|
|
@@ -611,7 +612,7 @@ import {
|
|
|
611
612
|
resetGlobalRegistry,
|
|
612
613
|
withModelNotFoundFallback,
|
|
613
614
|
wrapResilientWithFallback
|
|
614
|
-
} from "./chunk-
|
|
615
|
+
} from "./chunk-J6KO7RGF.js";
|
|
615
616
|
import {
|
|
616
617
|
AdapterModelError,
|
|
617
618
|
BaseAdapter,
|
|
@@ -694,7 +695,7 @@ import {
|
|
|
694
695
|
import {
|
|
695
696
|
ImprovementReviewInputSchema,
|
|
696
697
|
registerImprovementReviewTool
|
|
697
|
-
} from "./chunk-
|
|
698
|
+
} from "./chunk-QYE6GEPY.js";
|
|
698
699
|
import {
|
|
699
700
|
NOOP_NOTIFIER,
|
|
700
701
|
PolicyConfigSchema,
|
|
@@ -718,7 +719,7 @@ import {
|
|
|
718
719
|
toolSuccess,
|
|
719
720
|
toolSuccessStructured,
|
|
720
721
|
validateToolInput
|
|
721
|
-
} from "./chunk-
|
|
722
|
+
} from "./chunk-SXWJ7IUF.js";
|
|
722
723
|
import {
|
|
723
724
|
FALLBACK_SCANNER_DATA,
|
|
724
725
|
buildPlanFromAnalysis,
|
|
@@ -757,7 +758,7 @@ import {
|
|
|
757
758
|
getKnownNexusVarNames,
|
|
758
759
|
startStdioServer,
|
|
759
760
|
validateNexusEnv
|
|
760
|
-
} from "./chunk-
|
|
761
|
+
} from "./chunk-DR6YA645.js";
|
|
761
762
|
import {
|
|
762
763
|
AvailabilityCache,
|
|
763
764
|
filterAvailableModels,
|
|
@@ -6015,70 +6016,8 @@ var GateCheckResultSchema = z16.object({
|
|
|
6015
6016
|
// src/pipeline/quality-pipeline.ts
|
|
6016
6017
|
var logger11 = createLogger({ component: "quality-pipeline" });
|
|
6017
6018
|
|
|
6018
|
-
// src/pipeline/research-trigger.ts
|
|
6019
|
-
var logger12 = createLogger({ component: "research-trigger" });
|
|
6020
|
-
var DEFAULT_QUALITY_THRESHOLD = 7;
|
|
6021
|
-
var DEFAULT_MAX_TRIGGERS = 3;
|
|
6022
|
-
function parseDiscoveries(text) {
|
|
6023
|
-
const items = [];
|
|
6024
|
-
const lines = text.split("\n");
|
|
6025
|
-
for (const line of lines) {
|
|
6026
|
-
const match = /(?:quality|score)[:\s]*(\d+(?:\.\d+)?)/i.exec(line);
|
|
6027
|
-
if (match !== null) {
|
|
6028
|
-
const quality = parseFloat(match[1]);
|
|
6029
|
-
const title = line.replace(match[0], "").replace(/\(\s*\)/g, "").replace(/^[-*•\s]+/, "").trim();
|
|
6030
|
-
if (title.length > 5) {
|
|
6031
|
-
items.push({ title, quality, source: "research_discover" });
|
|
6032
|
-
}
|
|
6033
|
-
}
|
|
6034
|
-
}
|
|
6035
|
-
return items;
|
|
6036
|
-
}
|
|
6037
|
-
function titleToId(title) {
|
|
6038
|
-
return `research-${title.toLowerCase().replace(/[^a-z0-9]+/g, "-").slice(0, 50)}`;
|
|
6039
|
-
}
|
|
6040
|
-
async function checkForResearchTriggers(config = {}) {
|
|
6041
|
-
const threshold = config.qualityThreshold ?? DEFAULT_QUALITY_THRESHOLD;
|
|
6042
|
-
const maxTriggers = config.maxTriggers ?? DEFAULT_MAX_TRIGGERS;
|
|
6043
|
-
const existing = config.existingTaskIds ?? /* @__PURE__ */ new Set();
|
|
6044
|
-
const topic = config.topic ?? "multi-agent orchestration";
|
|
6045
|
-
try {
|
|
6046
|
-
const result = await executeExpert(
|
|
6047
|
-
"research",
|
|
6048
|
-
`Use research_discover to find recent papers and repos about "${topic}". For each result, include: title, quality score (1-10), and source URL.`
|
|
6049
|
-
);
|
|
6050
|
-
if (!result.success) {
|
|
6051
|
-
logger12.debug("Research trigger: expert unavailable", { error: result.error });
|
|
6052
|
-
return [];
|
|
6053
|
-
}
|
|
6054
|
-
const discoveries = parseDiscoveries(result.text);
|
|
6055
|
-
const qualified = discoveries.filter((d) => d.quality >= threshold).filter((d) => !existing.has(titleToId(d.title)));
|
|
6056
|
-
const tasks = qualified.slice(0, maxTriggers).map((d) => ({
|
|
6057
|
-
id: titleToId(d.title),
|
|
6058
|
-
title: `Assess research: ${d.title}`,
|
|
6059
|
-
description: `Auto-triggered by research_discover (quality: ${String(d.quality)}/10).
|
|
6060
|
-
Source: ${d.source}
|
|
6061
|
-
|
|
6062
|
-
Assess this research for applicability to nexus-agents.`,
|
|
6063
|
-
assignedTo: "researcher",
|
|
6064
|
-
status: "pending"
|
|
6065
|
-
}));
|
|
6066
|
-
if (tasks.length > 0) {
|
|
6067
|
-
logger12.info("Research triggers created", {
|
|
6068
|
-
total: discoveries.length,
|
|
6069
|
-
qualified: qualified.length,
|
|
6070
|
-
triggered: tasks.length
|
|
6071
|
-
});
|
|
6072
|
-
}
|
|
6073
|
-
return tasks;
|
|
6074
|
-
} catch (error) {
|
|
6075
|
-
logger12.debug("Research trigger failed gracefully", { error: String(error) });
|
|
6076
|
-
return [];
|
|
6077
|
-
}
|
|
6078
|
-
}
|
|
6079
|
-
|
|
6080
6019
|
// src/pipeline/research-pipeline.ts
|
|
6081
|
-
var
|
|
6020
|
+
var logger12 = createLogger({ component: "research-pipeline" });
|
|
6082
6021
|
|
|
6083
6022
|
// src/pipeline/iterative-consensus.ts
|
|
6084
6023
|
var defaultLogger = createLogger({ component: "iterative-consensus" });
|
|
@@ -6147,7 +6086,7 @@ function buildVotingInput(plan, config) {
|
|
|
6147
6086
|
}
|
|
6148
6087
|
async function executeSingleVote(plan, config, log) {
|
|
6149
6088
|
try {
|
|
6150
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
6089
|
+
const { executeVoting } = await import("./consensus-vote-QPHD5HGX.js");
|
|
6151
6090
|
const input = buildVotingInput(plan, config);
|
|
6152
6091
|
const result = await executeVoting(input, log);
|
|
6153
6092
|
return parseVotingResult(result);
|
|
@@ -6173,7 +6112,7 @@ function parseVotingResult(result) {
|
|
|
6173
6112
|
}
|
|
6174
6113
|
|
|
6175
6114
|
// src/replay/replay-executor.ts
|
|
6176
|
-
var
|
|
6115
|
+
var logger13 = createLogger({ component: "ReplayExecutor" });
|
|
6177
6116
|
export {
|
|
6178
6117
|
ALLOWED_COMMANDS,
|
|
6179
6118
|
ARTIFACT_TYPES,
|