nexus-agents 2.71.0 → 2.72.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.
- package/dist/{adaptive-memory-MKSYEBST.js → adaptive-memory-UPE76IP6.js} +5 -5
- package/dist/{chunk-DWLATKBK.js → child-mcp-config-5HRJGLCR.js} +6 -4
- package/dist/child-mcp-config-5HRJGLCR.js.map +1 -0
- package/dist/{chunk-ZPPX2K57.js → chunk-2KB63QGE.js} +2 -2
- package/dist/{chunk-L2LQ3TSV.js → chunk-2MD5MWCK.js} +2 -2
- package/dist/{chunk-ANC3HU6F.js → chunk-345KMHWH.js} +6 -6
- package/dist/chunk-345KMHWH.js.map +1 -0
- package/dist/{chunk-NER7H3RJ.js → chunk-3FIDMWFC.js} +2 -2
- package/dist/{chunk-POQQ7A5E.js → chunk-53K3KEKT.js} +51 -707
- package/dist/chunk-53K3KEKT.js.map +1 -0
- package/dist/chunk-5MHIWRKB.js +691 -0
- package/dist/chunk-5MHIWRKB.js.map +1 -0
- package/dist/{chunk-VGZJIR22.js → chunk-5WQ3SRSE.js} +2 -2
- package/dist/{chunk-TOYPY5XA.js → chunk-A35XORXU.js} +73 -10
- package/dist/chunk-A35XORXU.js.map +1 -0
- package/dist/chunk-BVETPIOQ.js +556 -0
- package/dist/chunk-BVETPIOQ.js.map +1 -0
- package/dist/{chunk-7LHQBMBM.js → chunk-C3JGKBL2.js} +25 -12
- package/dist/{chunk-7LHQBMBM.js.map → chunk-C3JGKBL2.js.map} +1 -1
- package/dist/{chunk-OF7CYMMA.js → chunk-DA5UDQYW.js} +2 -2
- package/dist/{chunk-XATH462F.js → chunk-ES6GFP35.js} +186 -34
- package/dist/chunk-ES6GFP35.js.map +1 -0
- package/dist/chunk-GOT7OAL5.js +59 -0
- package/dist/chunk-GOT7OAL5.js.map +1 -0
- package/dist/{chunk-LJT65EA7.js → chunk-I7ORMAO7.js} +2 -2
- package/dist/{chunk-AGVLFRN7.js → chunk-J4VR2WNI.js} +2998 -7188
- package/dist/chunk-J4VR2WNI.js.map +1 -0
- package/dist/{chunk-LMRKHQG5.js → chunk-L6N2S3UB.js} +2 -2
- package/dist/{chunk-7OBFO4GF.js → chunk-O4KUCF5S.js} +125 -40
- package/dist/chunk-O4KUCF5S.js.map +1 -0
- package/dist/chunk-P5OFZWDW.js +303 -0
- package/dist/chunk-P5OFZWDW.js.map +1 -0
- package/dist/{chunk-MJHOSM5U.js → chunk-QECRZ3YA.js} +2 -2
- package/dist/{chunk-WYSHXPKK.js → chunk-QL4HCYRD.js} +4 -44
- package/dist/chunk-QL4HCYRD.js.map +1 -0
- package/dist/{chunk-E66KFRSJ.js → chunk-TF3GROMO.js} +2 -2
- package/dist/{chunk-U3HZQTUF.js → chunk-TQFRPFMG.js} +2 -2
- package/dist/{chunk-KJCSRP34.js → chunk-V7ATY4BG.js} +3 -3
- package/dist/{chunk-32RIOULO.js → chunk-VPC3YNFR.js} +2 -2
- package/dist/{chunk-3BKVYSY6.js → chunk-VTVKC4FS.js} +4 -4
- package/dist/{chunk-U6BK5DQU.js → chunk-YOREAPF6.js} +315 -31
- package/dist/chunk-YOREAPF6.js.map +1 -0
- package/dist/cli-circuit-breaker-GFF2RLBZ.js +14 -0
- package/dist/cli.d.ts +3 -1
- package/dist/cli.js +1038 -1581
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-AYVJPIOS.js → composite-router-33F3F74I.js} +4 -4
- package/dist/{consensus-vote-EXWACBMR.js → consensus-vote-5V4KVHBE.js} +12 -11
- package/dist/doctor-deep-AHDTNURD.js +13 -0
- package/dist/expert-bridge-DMDHHDEU.js +11 -0
- package/dist/factory-FVD7PZ6S.js +15 -0
- package/dist/{factory-KMBWFIX2.js → factory-VQS3HJ7V.js} +6 -6
- package/dist/index.d.ts +997 -3517
- package/dist/index.js +74 -807
- package/dist/index.js.map +1 -1
- package/dist/init-opencode-EIOIPVWL.js +158 -0
- package/dist/init-opencode-EIOIPVWL.js.map +1 -0
- package/dist/issue-triage-HJUJWGAD.js +16 -0
- package/dist/{learning-persistence-FILWP3IR.js → learning-persistence-N6ILD2HX.js} +3 -3
- package/dist/{mobimem-77W5ED4Z.js → mobimem-BOJFXQ7B.js} +4 -4
- package/dist/{nexus-data-dir-M6DYKIHJ.js → nexus-data-dir-77UO7N6J.js} +2 -2
- package/dist/{registry-command-BBLIXULQ.js → registry-command-NCWUJKAF.js} +4 -4
- package/dist/{repo-security-plan-7SNM7JQN.js → repo-security-plan-3J45VAD6.js} +5 -5
- package/dist/research-helpers-synthesize-UGQHZZJN.js +12 -0
- package/dist/{routing-memory-DCIZEEVC.js → routing-memory-NO7QEH7T.js} +4 -4
- package/dist/{session-memory-5TSAASQW.js → session-memory-DOXLEWEU.js} +5 -5
- package/dist/{setup-command-5VGIQETA.js → setup-command-BWUFMZ7U.js} +10 -10
- package/dist/setup-config-E3JZYSLR.js +11 -0
- package/dist/{setup-custom-api-IQX3GD2D.js → setup-custom-api-DHJ5DRH2.js} +6 -6
- package/dist/{weather-report-NETGWTJX.js → weather-report-FNN4OX3N.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-7OBFO4GF.js.map +0 -1
- package/dist/chunk-AGVLFRN7.js.map +0 -1
- package/dist/chunk-ANC3HU6F.js.map +0 -1
- package/dist/chunk-DWLATKBK.js.map +0 -1
- package/dist/chunk-FDNWRZNJ.js +0 -22
- package/dist/chunk-FDNWRZNJ.js.map +0 -1
- package/dist/chunk-POQQ7A5E.js.map +0 -1
- package/dist/chunk-TOYPY5XA.js.map +0 -1
- package/dist/chunk-U6BK5DQU.js.map +0 -1
- package/dist/chunk-WYSHXPKK.js.map +0 -1
- package/dist/chunk-XATH462F.js.map +0 -1
- package/dist/cli-circuit-breaker-2CJ6NV52.js +0 -14
- package/dist/doctor-deep-BJFDBGPO.js +0 -13
- package/dist/expert-bridge-75WNNWI4.js +0 -11
- package/dist/factory-H5BYL4V5.js +0 -15
- package/dist/issue-triage-4SEP4WID.js +0 -16
- package/dist/mcp-config-OCWIXE2Y.js +0 -13
- package/dist/research-helpers-synthesize-7CI2FJE5.js +0 -12
- package/dist/setup-config-EA5RDIO2.js +0 -11
- package/dist/weather-report-NETGWTJX.js.map +0 -1
- /package/dist/{adaptive-memory-MKSYEBST.js.map → adaptive-memory-UPE76IP6.js.map} +0 -0
- /package/dist/{chunk-ZPPX2K57.js.map → chunk-2KB63QGE.js.map} +0 -0
- /package/dist/{chunk-L2LQ3TSV.js.map → chunk-2MD5MWCK.js.map} +0 -0
- /package/dist/{chunk-NER7H3RJ.js.map → chunk-3FIDMWFC.js.map} +0 -0
- /package/dist/{chunk-VGZJIR22.js.map → chunk-5WQ3SRSE.js.map} +0 -0
- /package/dist/{chunk-OF7CYMMA.js.map → chunk-DA5UDQYW.js.map} +0 -0
- /package/dist/{chunk-LJT65EA7.js.map → chunk-I7ORMAO7.js.map} +0 -0
- /package/dist/{chunk-LMRKHQG5.js.map → chunk-L6N2S3UB.js.map} +0 -0
- /package/dist/{chunk-MJHOSM5U.js.map → chunk-QECRZ3YA.js.map} +0 -0
- /package/dist/{chunk-E66KFRSJ.js.map → chunk-TF3GROMO.js.map} +0 -0
- /package/dist/{chunk-U3HZQTUF.js.map → chunk-TQFRPFMG.js.map} +0 -0
- /package/dist/{chunk-KJCSRP34.js.map → chunk-V7ATY4BG.js.map} +0 -0
- /package/dist/{chunk-32RIOULO.js.map → chunk-VPC3YNFR.js.map} +0 -0
- /package/dist/{chunk-3BKVYSY6.js.map → chunk-VTVKC4FS.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-2CJ6NV52.js.map → cli-circuit-breaker-GFF2RLBZ.js.map} +0 -0
- /package/dist/{composite-router-AYVJPIOS.js.map → composite-router-33F3F74I.js.map} +0 -0
- /package/dist/{consensus-vote-EXWACBMR.js.map → consensus-vote-5V4KVHBE.js.map} +0 -0
- /package/dist/{doctor-deep-BJFDBGPO.js.map → doctor-deep-AHDTNURD.js.map} +0 -0
- /package/dist/{expert-bridge-75WNNWI4.js.map → expert-bridge-DMDHHDEU.js.map} +0 -0
- /package/dist/{factory-H5BYL4V5.js.map → factory-FVD7PZ6S.js.map} +0 -0
- /package/dist/{factory-KMBWFIX2.js.map → factory-VQS3HJ7V.js.map} +0 -0
- /package/dist/{issue-triage-4SEP4WID.js.map → issue-triage-HJUJWGAD.js.map} +0 -0
- /package/dist/{learning-persistence-FILWP3IR.js.map → learning-persistence-N6ILD2HX.js.map} +0 -0
- /package/dist/{mcp-config-OCWIXE2Y.js.map → mobimem-BOJFXQ7B.js.map} +0 -0
- /package/dist/{mobimem-77W5ED4Z.js.map → nexus-data-dir-77UO7N6J.js.map} +0 -0
- /package/dist/{registry-command-BBLIXULQ.js.map → registry-command-NCWUJKAF.js.map} +0 -0
- /package/dist/{nexus-data-dir-M6DYKIHJ.js.map → repo-security-plan-3J45VAD6.js.map} +0 -0
- /package/dist/{repo-security-plan-7SNM7JQN.js.map → research-helpers-synthesize-UGQHZZJN.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-7CI2FJE5.js.map → routing-memory-NO7QEH7T.js.map} +0 -0
- /package/dist/{routing-memory-DCIZEEVC.js.map → session-memory-DOXLEWEU.js.map} +0 -0
- /package/dist/{session-memory-5TSAASQW.js.map → setup-command-BWUFMZ7U.js.map} +0 -0
- /package/dist/{setup-command-5VGIQETA.js.map → setup-config-E3JZYSLR.js.map} +0 -0
- /package/dist/{setup-custom-api-IQX3GD2D.js.map → setup-custom-api-DHJ5DRH2.js.map} +0 -0
- /package/dist/{setup-config-EA5RDIO2.js.map → weather-report-FNN4OX3N.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGitHubProvider,
|
|
3
3
|
createScmProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VTVKC4FS.js";
|
|
5
5
|
import {
|
|
6
6
|
ALLOWED_COMMANDS,
|
|
7
7
|
ARTIFACT_TYPES,
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
AgentRoleSchema,
|
|
13
13
|
AgentRoleSchema2,
|
|
14
14
|
AgentRoleSchema3,
|
|
15
|
-
AgentRunnerError,
|
|
16
15
|
AgentStateMachine,
|
|
16
|
+
AgenticAdapter,
|
|
17
17
|
ArchitectureExpert,
|
|
18
18
|
ArtifactRefSchema,
|
|
19
19
|
AuditActorSchema,
|
|
@@ -37,7 +37,6 @@ import {
|
|
|
37
37
|
CHECKPOINT_SCHEMA_VERSION,
|
|
38
38
|
COMPLEXITY_ORDER,
|
|
39
39
|
CORE_PLUGINS,
|
|
40
|
-
CliAgentExecutor,
|
|
41
40
|
CodeChangeSchema,
|
|
42
41
|
CodeExpert,
|
|
43
42
|
CollaborationConfigSchema,
|
|
@@ -64,34 +63,27 @@ import {
|
|
|
64
63
|
DEFAULT_COMPOSER_CONFIG,
|
|
65
64
|
DEFAULT_DASHBOARD_CONFIG,
|
|
66
65
|
DEFAULT_DASHBOARD_RENDER_OPTIONS,
|
|
67
|
-
DEFAULT_EVALUATION_CONFIG,
|
|
68
66
|
DEFAULT_EXECUTION_TIME_MS,
|
|
69
67
|
DEFAULT_FEEDBACK_COLLECTOR_CONFIG,
|
|
70
68
|
DEFAULT_FEEDBACK_INTEGRATION_CONFIG,
|
|
71
69
|
DEFAULT_FOREST_CONFIG,
|
|
72
|
-
DEFAULT_HARNESS_EXECUTION_CONFIG,
|
|
73
70
|
DEFAULT_MAX_RETRIES,
|
|
74
|
-
DEFAULT_PATCH_OPTIONS,
|
|
75
71
|
DEFAULT_PATH_SCORING_OPTIONS,
|
|
76
72
|
DEFAULT_PERMISSIONS,
|
|
77
73
|
DEFAULT_POLICIES,
|
|
78
74
|
DEFAULT_RBAC,
|
|
79
|
-
DEFAULT_REPORT_CONFIG,
|
|
80
75
|
DEFAULT_RESOURCE_LIMITS,
|
|
81
76
|
DEFAULT_ROLE_MAPPINGS,
|
|
82
77
|
DEFAULT_SKILL_LIBRARY_CONFIG,
|
|
83
78
|
DEFAULT_SKILL_LOADER_CONFIG,
|
|
84
79
|
DEFAULT_STATISTICAL_OPTIONS,
|
|
85
80
|
DEFAULT_SWARM_OBSERVER_CONFIG,
|
|
86
|
-
DEFAULT_SWE_BENCH_CONFIG,
|
|
87
|
-
DEFAULT_TEST_RUNNER_CONFIG,
|
|
88
81
|
DEFAULT_TIMEOUTS,
|
|
89
82
|
DEFAULT_TRINITY_CONFIG,
|
|
90
83
|
DEFAULT_WAVE_CONFIG,
|
|
91
84
|
DEV_PIPELINE_TEMPLATE,
|
|
92
85
|
Dashboard,
|
|
93
86
|
DashboardConfigSchema,
|
|
94
|
-
DatasetLoadError,
|
|
95
87
|
DelegateInputSchema,
|
|
96
88
|
DelegateOutputSchema,
|
|
97
89
|
DependencyErrorCodeSchema,
|
|
@@ -103,8 +95,6 @@ import {
|
|
|
103
95
|
EXPERT_CAPABILITIES,
|
|
104
96
|
EXPERT_DEFAULT_CAPABILITIES,
|
|
105
97
|
EXPERT_DEFAULT_TEMPERATURES,
|
|
106
|
-
EvaluationHarness,
|
|
107
|
-
EvaluationHarnessError,
|
|
108
98
|
ExecuteExpertInputSchema,
|
|
109
99
|
ExecuteSpecInputSchema,
|
|
110
100
|
Expert,
|
|
@@ -135,9 +125,6 @@ import {
|
|
|
135
125
|
GeminiResponseParser,
|
|
136
126
|
GeneratedTestSchema,
|
|
137
127
|
GraphBuilder,
|
|
138
|
-
HarnessExecutor,
|
|
139
|
-
HarnessExecutorError,
|
|
140
|
-
HarnessVerifyAdapter,
|
|
141
128
|
ICTMConfigSchema,
|
|
142
129
|
ICTMInferenceResultSchema,
|
|
143
130
|
InMemoryAuditStorage,
|
|
@@ -150,7 +137,6 @@ import {
|
|
|
150
137
|
ListExpertsInputSchema,
|
|
151
138
|
ListWorkflowsInputSchema,
|
|
152
139
|
LoadedSkillSetSchema,
|
|
153
|
-
LockedWriter,
|
|
154
140
|
MAX_DIFF_LENGTH,
|
|
155
141
|
MAX_EXECUTION_TIME_MS,
|
|
156
142
|
MAX_STRIPPED_ELEMENTS_PER_EVENT,
|
|
@@ -160,7 +146,6 @@ import {
|
|
|
160
146
|
MemoryStatsInputSchema,
|
|
161
147
|
MemoryWriteInputSchema,
|
|
162
148
|
ModelSelectionSchema,
|
|
163
|
-
NexusAgentExecutor,
|
|
164
149
|
NodeStateSchema,
|
|
165
150
|
OrchestrateInputSchema,
|
|
166
151
|
OrchestrateOutputSchema,
|
|
@@ -176,8 +161,6 @@ import {
|
|
|
176
161
|
PROMPT_DEFINITIONS,
|
|
177
162
|
PR_REVIEW_ROLES,
|
|
178
163
|
ParallelProtocol,
|
|
179
|
-
PatchApplicator,
|
|
180
|
-
PatchApplicatorError,
|
|
181
164
|
PathScoreBreakdownSchema,
|
|
182
165
|
PathScoreSchema,
|
|
183
166
|
PipelineRunner,
|
|
@@ -187,13 +170,10 @@ import {
|
|
|
187
170
|
PolicyEngine,
|
|
188
171
|
PolicyGateSpecSchema,
|
|
189
172
|
PrReviewInputSchema,
|
|
190
|
-
PredictionWriteError,
|
|
191
|
-
PredictionWriter,
|
|
192
173
|
ProtocolFactory,
|
|
193
174
|
PruningStrategy,
|
|
194
175
|
QualitySignalsSchema,
|
|
195
176
|
QueryTraceInputSchema,
|
|
196
|
-
REPO_COMPLEXITY,
|
|
197
177
|
RESEARCH_PIPELINE_TEMPLATE,
|
|
198
178
|
ReasoningDepthSchema,
|
|
199
179
|
ReasoningNodeMetadataSchema,
|
|
@@ -204,8 +184,6 @@ import {
|
|
|
204
184
|
RegistryImportInputSchema,
|
|
205
185
|
RepoAnalyzeInputSchema,
|
|
206
186
|
RepoSecurityPlanInputSchema,
|
|
207
|
-
ReportGenerationError,
|
|
208
|
-
ReportGenerator,
|
|
209
187
|
ResearchAddInputSchema,
|
|
210
188
|
ResearchAddSourceInputSchema,
|
|
211
189
|
ResearchAnalyzeInputSchema,
|
|
@@ -223,10 +201,6 @@ import {
|
|
|
223
201
|
SKILL_PERMISSIONS,
|
|
224
202
|
STAGE_TYPES,
|
|
225
203
|
START,
|
|
226
|
-
SWEBenchRunner,
|
|
227
|
-
SWEBenchRunnerError,
|
|
228
|
-
SWE_BENCH_DATASETS,
|
|
229
|
-
SWE_BENCH_SYSTEM_PROMPT,
|
|
230
204
|
ScoreBreakdownSchema,
|
|
231
205
|
SearchCodebaseInputSchema,
|
|
232
206
|
SecurityErrorCodeSchema,
|
|
@@ -278,12 +252,9 @@ import {
|
|
|
278
252
|
TemplateMetadataSchema,
|
|
279
253
|
TemplateRegistry,
|
|
280
254
|
TerminationReasonSchema,
|
|
281
|
-
TestRunner,
|
|
282
|
-
TestRunnerError,
|
|
283
255
|
TestingExpert,
|
|
284
256
|
TextDashboardRenderer,
|
|
285
257
|
ToolSetSchema,
|
|
286
|
-
TraceLogger,
|
|
287
258
|
TreeStateSchema,
|
|
288
259
|
TreeStatisticsSchema,
|
|
289
260
|
TrinityConfigSchema,
|
|
@@ -309,23 +280,14 @@ import {
|
|
|
309
280
|
analyzeFailures,
|
|
310
281
|
analyzeTask,
|
|
311
282
|
append,
|
|
312
|
-
applyPatch,
|
|
313
283
|
areStepsCompleted,
|
|
314
284
|
buildDependencyGraph,
|
|
315
285
|
buildDependencyGraph2,
|
|
316
|
-
buildDockerArgs,
|
|
317
|
-
buildEnrichedPrompt,
|
|
318
|
-
buildHarnessArgs,
|
|
319
|
-
buildHarnessCommand,
|
|
320
286
|
buildPrReviewProposal,
|
|
321
287
|
calculateDistributionStats,
|
|
322
|
-
calculateEstimatedRemaining,
|
|
323
|
-
calculateMetrics,
|
|
324
288
|
calculateMinSampleSize,
|
|
325
289
|
calculateRegret,
|
|
326
|
-
calculateRepositoryMetrics,
|
|
327
290
|
calculateWinLoss,
|
|
328
|
-
canApplyPatch,
|
|
329
291
|
canExecuteSkill,
|
|
330
292
|
cancelExecution,
|
|
331
293
|
checkPermissionBoundary,
|
|
@@ -342,14 +304,13 @@ import {
|
|
|
342
304
|
computeOutcomeReward,
|
|
343
305
|
containsExpressions,
|
|
344
306
|
createAgentStages,
|
|
307
|
+
createAgenticAdapter,
|
|
345
308
|
createArchitectureExpert,
|
|
346
309
|
createAttestation,
|
|
347
310
|
createAuditLogger,
|
|
348
311
|
createAuditTrail,
|
|
349
|
-
createBenchmarkMemory,
|
|
350
312
|
createCheckpoint,
|
|
351
313
|
createCheckpointStore,
|
|
352
|
-
createCliExecutor,
|
|
353
314
|
createCodeExpert,
|
|
354
315
|
createCollaborationSession,
|
|
355
316
|
createContextItem,
|
|
@@ -364,39 +325,24 @@ import {
|
|
|
364
325
|
createDevStageRegistry,
|
|
365
326
|
createDocumentationExpert,
|
|
366
327
|
createDryRunHandler,
|
|
367
|
-
createEmptyContext,
|
|
368
|
-
createEvaluationHarness,
|
|
369
328
|
createEventBusBridge,
|
|
370
329
|
createExecutionContext,
|
|
371
330
|
createExecutionPlan,
|
|
372
|
-
createExecutor,
|
|
373
|
-
createExplorationPrompt,
|
|
374
331
|
createFeedbackIntegration,
|
|
375
332
|
createGraphAuditBridge,
|
|
376
|
-
createHarnessExecutor,
|
|
377
|
-
createInitialProgress,
|
|
378
333
|
createInitializedWorkflowEngine,
|
|
379
|
-
createInstancePrompt,
|
|
380
334
|
createInteractionGraph,
|
|
381
335
|
createIsolatedRegistry,
|
|
382
336
|
createMcpLogger,
|
|
383
|
-
createMockExecutor,
|
|
384
|
-
createNexusExecutorFromEnv,
|
|
385
337
|
createOrchestrator,
|
|
386
338
|
createOrchestratorFactory,
|
|
387
339
|
createOutcomeFeedbackCollector,
|
|
388
|
-
createPatchApplicator,
|
|
389
|
-
createPrediction,
|
|
390
340
|
createProductionWorkflowEngine,
|
|
391
|
-
createProgressAdapter,
|
|
392
341
|
createProtocolFactory,
|
|
393
342
|
createRealWorkflowEngine,
|
|
394
|
-
createReportGenerator,
|
|
395
343
|
createResultAggregator,
|
|
396
|
-
createRetryPrompt,
|
|
397
344
|
createRoutingDecision,
|
|
398
345
|
createRoutingMetricsCollector,
|
|
399
|
-
createRunner,
|
|
400
346
|
createSandboxExecutor,
|
|
401
347
|
createSecurityError,
|
|
402
348
|
createSecurityExpert,
|
|
@@ -408,20 +354,15 @@ import {
|
|
|
408
354
|
createStateGuard,
|
|
409
355
|
createStateMachine,
|
|
410
356
|
createStepExecutor,
|
|
411
|
-
createSummaryPrompt,
|
|
412
357
|
createSwarmObserver,
|
|
413
358
|
createTaskOutcome,
|
|
414
359
|
createTaskQueue,
|
|
415
360
|
createTemplateRegistry,
|
|
416
|
-
createTestRunner,
|
|
417
361
|
createTestingExpert,
|
|
418
362
|
createTimer,
|
|
419
363
|
createToolLogger,
|
|
420
364
|
createTrinityCoordinator,
|
|
421
|
-
createValidatedExecutor,
|
|
422
|
-
createValidatedHarness,
|
|
423
365
|
createValidationDashboard,
|
|
424
|
-
createVariantRunner,
|
|
425
366
|
createWaveScheduler,
|
|
426
367
|
createWorkflowEngineDeps,
|
|
427
368
|
createWorkflowEngineDepsAsync,
|
|
@@ -430,7 +371,6 @@ import {
|
|
|
430
371
|
customReducer,
|
|
431
372
|
decomposeSpec,
|
|
432
373
|
delegateInputToTaskContract,
|
|
433
|
-
detectTestFramework,
|
|
434
374
|
emitCorroborationEvent,
|
|
435
375
|
emitExecutionComplete,
|
|
436
376
|
emitGraphExecutionEvent,
|
|
@@ -446,66 +386,39 @@ import {
|
|
|
446
386
|
emitStateUpdated,
|
|
447
387
|
emitStepCompleted,
|
|
448
388
|
emitTrustEvent,
|
|
449
|
-
estimateDifficulty,
|
|
450
389
|
estimateTokens,
|
|
451
390
|
evaluatePolicy as evaluatePolicy2,
|
|
452
|
-
evaluatePredictions,
|
|
453
391
|
executeDelegatePipeline,
|
|
454
392
|
executeGraph,
|
|
455
|
-
executeHarness,
|
|
456
|
-
executeInDocker,
|
|
457
393
|
executeOrchestratePipeline,
|
|
458
394
|
executeParallel,
|
|
459
395
|
executeSpec,
|
|
460
|
-
exportReport,
|
|
461
|
-
extractApproach,
|
|
462
396
|
extractExpressions,
|
|
463
|
-
extractFilesFromResponse,
|
|
464
|
-
extractHypothesis,
|
|
465
|
-
extractModelName,
|
|
466
|
-
extractPastSuccessRates,
|
|
467
|
-
extractPatch,
|
|
468
|
-
extractRepoFromInstanceId,
|
|
469
|
-
extractRepoName,
|
|
470
397
|
extractStateValue,
|
|
471
|
-
filterByRepo,
|
|
472
|
-
filterByVersion,
|
|
473
398
|
findMissingDependencies,
|
|
474
399
|
flushPipelineMemory,
|
|
475
400
|
formatCompileError,
|
|
476
|
-
formatContextForPrompt,
|
|
477
|
-
formatValidationResult,
|
|
478
|
-
generateReport,
|
|
479
401
|
getAvailableRoles,
|
|
480
402
|
getBuiltInTemplates,
|
|
481
403
|
getBuiltInTemplatesPath,
|
|
482
404
|
getBuiltInTemplatesWithMetadata,
|
|
483
405
|
getCapabilitiesForRole,
|
|
484
|
-
getCompletedInstanceIds,
|
|
485
406
|
getCompletedSteps,
|
|
486
|
-
getCpuCores,
|
|
487
|
-
getDatasetInfo,
|
|
488
|
-
getDockerVersion,
|
|
489
407
|
getEventBusStats,
|
|
490
408
|
getExecutionDuration,
|
|
491
409
|
getExecutionOrder,
|
|
492
410
|
getExpertRegistry,
|
|
493
411
|
getGraphRegistry,
|
|
494
412
|
getGraphWorkflowList,
|
|
495
|
-
getInstance,
|
|
496
|
-
getMemoryInfo,
|
|
497
413
|
getPipelinePluginRegistry,
|
|
498
414
|
getPolicy,
|
|
499
415
|
getPolicyMode,
|
|
500
|
-
getPythonVersion,
|
|
501
416
|
getRecommendedRole,
|
|
502
417
|
getReferencedSteps,
|
|
503
|
-
getResultsFilePath,
|
|
504
418
|
getSkillSetForTask,
|
|
505
419
|
getSkillsForTask,
|
|
506
420
|
getStepResult,
|
|
507
421
|
getSwarmObserver,
|
|
508
|
-
getSwebenchVersion,
|
|
509
422
|
getTemplate,
|
|
510
423
|
getTopologicalOrder,
|
|
511
424
|
getVariable,
|
|
@@ -515,40 +428,26 @@ import {
|
|
|
515
428
|
initializeBuiltInTemplates,
|
|
516
429
|
initializeEventBusBridge,
|
|
517
430
|
isCancelled,
|
|
518
|
-
isCliAvailable as isCliAvailable2,
|
|
519
431
|
isStepCompleted,
|
|
520
|
-
listInstances,
|
|
521
432
|
listTemplateIds,
|
|
522
433
|
loadCheckpointState,
|
|
523
|
-
loadDataset,
|
|
524
434
|
loadTemplateFile,
|
|
525
435
|
loadTemplatesFromDirectory,
|
|
526
436
|
loadWorkflowFile,
|
|
527
437
|
logToolError,
|
|
528
438
|
logToolStart,
|
|
529
439
|
logToolSuccess,
|
|
530
|
-
mapResolutionStatus,
|
|
531
|
-
mapStateToPhase,
|
|
532
|
-
mapTestStatus,
|
|
533
440
|
mapVoteDecisionToPrDecision,
|
|
534
441
|
meanConfidenceInterval,
|
|
535
442
|
orchestrateInputToTaskContract,
|
|
536
443
|
overwrite,
|
|
537
444
|
parseExpression,
|
|
538
|
-
parseJsonResults,
|
|
539
|
-
parseProgressLine,
|
|
540
445
|
parseSpec,
|
|
541
|
-
parseStdoutResults,
|
|
542
446
|
parseTemplateContent,
|
|
543
|
-
parseTestResults,
|
|
544
447
|
parseWorkflowJson,
|
|
545
448
|
parseWorkflowYaml,
|
|
546
449
|
proportionConfidenceInterval,
|
|
547
|
-
quickRun,
|
|
548
450
|
quickSelect,
|
|
549
|
-
readJsonResults,
|
|
550
|
-
readPredictions,
|
|
551
|
-
recordOutcome,
|
|
552
451
|
registerCorePlugins,
|
|
553
452
|
registerCreateExpertTool,
|
|
554
453
|
registerDelegateToModelTool,
|
|
@@ -592,14 +491,9 @@ import {
|
|
|
592
491
|
resolveV2Config,
|
|
593
492
|
resolveWithFallbacks,
|
|
594
493
|
runAdaptiveOrchestrator,
|
|
595
|
-
runAgentOnInstance,
|
|
596
|
-
runBenchmarkInstances,
|
|
597
|
-
runBenchmarkParallel,
|
|
598
494
|
runDevPipeline,
|
|
599
495
|
runGraphPipeline,
|
|
600
496
|
runPreconditions,
|
|
601
|
-
runSingleInstance,
|
|
602
|
-
runTests,
|
|
603
497
|
runVerification,
|
|
604
498
|
saveStageCheckpoint,
|
|
605
499
|
scoreByHybrid,
|
|
@@ -610,38 +504,21 @@ import {
|
|
|
610
504
|
setSwarmObserver,
|
|
611
505
|
setVariable,
|
|
612
506
|
snapshotContext,
|
|
613
|
-
sortByPriority,
|
|
614
507
|
storeStepResult,
|
|
615
|
-
transformHarnessOutput,
|
|
616
|
-
transformHarnessProgress,
|
|
617
|
-
transformInstanceResult,
|
|
618
|
-
transformTestResult,
|
|
619
|
-
translateEvaluationResult,
|
|
620
|
-
updateContext,
|
|
621
508
|
validateCapabilities,
|
|
622
509
|
validateCommand,
|
|
623
510
|
validateDependencyGraph,
|
|
624
|
-
validateDiskSpace,
|
|
625
|
-
validateDocker,
|
|
626
|
-
validateEnvironment,
|
|
627
511
|
validateExpressions,
|
|
628
512
|
validateICTM,
|
|
629
|
-
validatePatch,
|
|
630
|
-
validatePatchFormat,
|
|
631
|
-
validatePrediction,
|
|
632
|
-
validatePredictionsFile,
|
|
633
|
-
validatePython,
|
|
634
513
|
validateRBAC,
|
|
635
514
|
validateRequiredInputs,
|
|
636
515
|
validateScenario,
|
|
637
516
|
validateSkillExecution,
|
|
638
517
|
validateSkillProvenance,
|
|
639
|
-
validateSwebench,
|
|
640
518
|
validateWorkflow,
|
|
641
519
|
validateWorkflowDependencies,
|
|
642
|
-
withLogging
|
|
643
|
-
|
|
644
|
-
} from "./chunk-AGVLFRN7.js";
|
|
520
|
+
withLogging
|
|
521
|
+
} from "./chunk-J4VR2WNI.js";
|
|
645
522
|
import {
|
|
646
523
|
SharedMemoryStore
|
|
647
524
|
} from "./chunk-ED6VQWNG.js";
|
|
@@ -649,16 +526,20 @@ import {
|
|
|
649
526
|
getTokenEnvVars,
|
|
650
527
|
hasToken,
|
|
651
528
|
resolveToken
|
|
652
|
-
} from "./chunk-
|
|
529
|
+
} from "./chunk-TF3GROMO.js";
|
|
653
530
|
import "./chunk-X2M7OF27.js";
|
|
531
|
+
import {
|
|
532
|
+
OPENAI_MODELS,
|
|
533
|
+
OPENAI_MODEL_ALIASES,
|
|
534
|
+
OpenAIAdapter,
|
|
535
|
+
createOpenAIAdapter
|
|
536
|
+
} from "./chunk-BVETPIOQ.js";
|
|
654
537
|
import {
|
|
655
538
|
executeExpert
|
|
656
|
-
} from "./chunk-
|
|
539
|
+
} from "./chunk-345KMHWH.js";
|
|
657
540
|
import {
|
|
658
|
-
AdapterModelError,
|
|
659
541
|
AgentFindingSchema,
|
|
660
542
|
AgentPerformanceSchema,
|
|
661
|
-
BaseAdapter,
|
|
662
543
|
CLAUDE_MODELS,
|
|
663
544
|
CLAUDE_MODEL_ALIASES,
|
|
664
545
|
ClaudeAdapter,
|
|
@@ -672,7 +553,6 @@ import {
|
|
|
672
553
|
CorrelationCoefficientSchema,
|
|
673
554
|
CorrelationTracker,
|
|
674
555
|
CorrelationTrackerStatsSchema,
|
|
675
|
-
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
676
556
|
DEFAULT_CONSENSUS_CONFIG,
|
|
677
557
|
DEFAULT_HIGHER_ORDER_CONFIG,
|
|
678
558
|
DEFAULT_VOTING_PROTOCOL_CONFIG,
|
|
@@ -698,9 +578,6 @@ import {
|
|
|
698
578
|
RejectionCategorySchema,
|
|
699
579
|
SdkAdapter,
|
|
700
580
|
SimpleMajorityStrategy,
|
|
701
|
-
StreamCancelledError,
|
|
702
|
-
StreamController,
|
|
703
|
-
StreamError,
|
|
704
581
|
SupermajorityStrategy,
|
|
705
582
|
UnanimousStrategy,
|
|
706
583
|
VOTING_THRESHOLDS,
|
|
@@ -713,14 +590,11 @@ import {
|
|
|
713
590
|
VotingStrategyFactory,
|
|
714
591
|
WeightedVoting,
|
|
715
592
|
actorFromContext,
|
|
716
|
-
bufferStream,
|
|
717
593
|
buildFinalResult,
|
|
718
594
|
buildPendingResult,
|
|
719
595
|
buildTimeoutResult,
|
|
720
596
|
calculateVoteWeight,
|
|
721
597
|
collectRealVotes,
|
|
722
|
-
collectStream,
|
|
723
|
-
concatStreams,
|
|
724
598
|
createAgentPairKey,
|
|
725
599
|
createClaudeAdapter,
|
|
726
600
|
createConsensusEngine,
|
|
@@ -732,7 +606,6 @@ import {
|
|
|
732
606
|
createOWVoting,
|
|
733
607
|
createPolicyContext,
|
|
734
608
|
createStrategyFactory,
|
|
735
|
-
createStream,
|
|
736
609
|
createValidator,
|
|
737
610
|
createVotingProtocol,
|
|
738
611
|
createWeightedVoting,
|
|
@@ -743,37 +616,49 @@ import {
|
|
|
743
616
|
evaluatePolicy,
|
|
744
617
|
extractRequestSystemPrompt,
|
|
745
618
|
extractSystemPrompt,
|
|
746
|
-
filterStream,
|
|
747
|
-
fromArray,
|
|
748
619
|
generateCacheKey,
|
|
749
620
|
generateProposalId,
|
|
750
621
|
logPolicyAudit,
|
|
751
622
|
logRateLimitAudit,
|
|
752
623
|
logToolInvocationAudit,
|
|
753
|
-
mergeStreams,
|
|
754
624
|
messagesToAnthropicFormat,
|
|
755
625
|
parseAgentPairKey,
|
|
756
|
-
reduceStream,
|
|
757
626
|
registerConsensusVoteTool,
|
|
758
|
-
requireApiKey,
|
|
759
627
|
resultToOutcome,
|
|
760
628
|
safePathsRule,
|
|
629
|
+
toolError,
|
|
630
|
+
toolSuccess,
|
|
631
|
+
toolSuccessStructured,
|
|
632
|
+
validateToolInput
|
|
633
|
+
} from "./chunk-53K3KEKT.js";
|
|
634
|
+
import {
|
|
635
|
+
AdapterModelError,
|
|
636
|
+
BaseAdapter,
|
|
637
|
+
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
638
|
+
StreamCancelledError,
|
|
639
|
+
StreamController,
|
|
640
|
+
StreamError,
|
|
641
|
+
bufferStream,
|
|
642
|
+
collectStream,
|
|
643
|
+
concatStreams,
|
|
644
|
+
createStream,
|
|
645
|
+
filterStream,
|
|
646
|
+
fromArray,
|
|
647
|
+
mergeStreams,
|
|
648
|
+
reduceStream,
|
|
649
|
+
requireApiKey,
|
|
761
650
|
skip,
|
|
762
651
|
take,
|
|
763
652
|
takeUntil,
|
|
764
653
|
tapStream,
|
|
765
|
-
toolError,
|
|
766
|
-
toolSuccess,
|
|
767
|
-
toolSuccessStructured,
|
|
768
654
|
transformStream,
|
|
769
655
|
validateApiKeyPresence,
|
|
770
|
-
validateToolInput,
|
|
771
656
|
withTimeout
|
|
772
|
-
} from "./chunk-
|
|
657
|
+
} from "./chunk-5MHIWRKB.js";
|
|
773
658
|
import {
|
|
774
659
|
PROVIDER_ENV_KEYS
|
|
775
|
-
} from "./chunk-
|
|
776
|
-
import "./chunk-
|
|
660
|
+
} from "./chunk-5WQ3SRSE.js";
|
|
661
|
+
import "./chunk-A35XORXU.js";
|
|
777
662
|
import {
|
|
778
663
|
AgentActionSchema,
|
|
779
664
|
GitHubReviewer,
|
|
@@ -806,11 +691,11 @@ import {
|
|
|
806
691
|
sanitizeInput,
|
|
807
692
|
validateAgentAction,
|
|
808
693
|
validateCorroboration
|
|
809
|
-
} from "./chunk-
|
|
694
|
+
} from "./chunk-V7ATY4BG.js";
|
|
810
695
|
import {
|
|
811
696
|
GitHubProvider,
|
|
812
697
|
ScmError
|
|
813
|
-
} from "./chunk-
|
|
698
|
+
} from "./chunk-3FIDMWFC.js";
|
|
814
699
|
import {
|
|
815
700
|
FALLBACK_SCANNER_DATA,
|
|
816
701
|
buildPlanFromAnalysis,
|
|
@@ -818,7 +703,7 @@ import {
|
|
|
818
703
|
generateSecurityPlan,
|
|
819
704
|
getRegistryManifest,
|
|
820
705
|
resolveScannerData
|
|
821
|
-
} from "./chunk-
|
|
706
|
+
} from "./chunk-L6N2S3UB.js";
|
|
822
707
|
import {
|
|
823
708
|
analyzeGitHubRepo,
|
|
824
709
|
analyzeRepo,
|
|
@@ -851,10 +736,10 @@ import {
|
|
|
851
736
|
resolveFallback,
|
|
852
737
|
startStdioServer,
|
|
853
738
|
validateNexusEnv
|
|
854
|
-
} from "./chunk-
|
|
739
|
+
} from "./chunk-YOREAPF6.js";
|
|
855
740
|
import {
|
|
856
741
|
DEFAULTS
|
|
857
|
-
} from "./chunk-
|
|
742
|
+
} from "./chunk-2MD5MWCK.js";
|
|
858
743
|
import "./chunk-NUBSJGQZ.js";
|
|
859
744
|
import {
|
|
860
745
|
BaseCliAdapter,
|
|
@@ -884,7 +769,7 @@ import {
|
|
|
884
769
|
isCliAvailable,
|
|
885
770
|
isRetryableError,
|
|
886
771
|
sleep
|
|
887
|
-
} from "./chunk-
|
|
772
|
+
} from "./chunk-ES6GFP35.js";
|
|
888
773
|
import {
|
|
889
774
|
BUILT_IN_EXPERTS,
|
|
890
775
|
BuiltInExpertTypeSchema,
|
|
@@ -894,20 +779,16 @@ import {
|
|
|
894
779
|
safeValidateExpertConfig,
|
|
895
780
|
validateExpertConfig
|
|
896
781
|
} from "./chunk-ZM4O442V.js";
|
|
897
|
-
import "./chunk-
|
|
782
|
+
import "./chunk-2KB63QGE.js";
|
|
898
783
|
import {
|
|
899
784
|
MemoryError
|
|
900
|
-
} from "./chunk-
|
|
785
|
+
} from "./chunk-QECRZ3YA.js";
|
|
901
786
|
import "./chunk-633WH2ML.js";
|
|
902
|
-
import {
|
|
903
|
-
generateMcpConfig,
|
|
904
|
-
getDefaultAllowedTools
|
|
905
|
-
} from "./chunk-DWLATKBK.js";
|
|
906
787
|
import {
|
|
907
788
|
CliCircuitBreakerIntegration,
|
|
908
789
|
createCliCircuitBreakerIntegration
|
|
909
|
-
} from "./chunk-
|
|
910
|
-
import "./chunk-
|
|
790
|
+
} from "./chunk-QL4HCYRD.js";
|
|
791
|
+
import "./chunk-TQFRPFMG.js";
|
|
911
792
|
import {
|
|
912
793
|
AgentCapability,
|
|
913
794
|
AgentError,
|
|
@@ -980,12 +861,12 @@ import {
|
|
|
980
861
|
toError,
|
|
981
862
|
unwrap,
|
|
982
863
|
unwrapOr
|
|
983
|
-
} from "./chunk-
|
|
864
|
+
} from "./chunk-O4KUCF5S.js";
|
|
984
865
|
import {
|
|
985
866
|
ensureLearningDir,
|
|
986
867
|
getRulesFile
|
|
987
|
-
} from "./chunk-
|
|
988
|
-
import "./chunk-
|
|
868
|
+
} from "./chunk-I7ORMAO7.js";
|
|
869
|
+
import "./chunk-GOT7OAL5.js";
|
|
989
870
|
import "./chunk-UP2VWCW5.js";
|
|
990
871
|
|
|
991
872
|
// src/adapters/factory.ts
|
|
@@ -1594,495 +1475,6 @@ function withRetryWrapper(fn, options = {}) {
|
|
|
1594
1475
|
return (...args) => withRetry(() => fn(...args), options);
|
|
1595
1476
|
}
|
|
1596
1477
|
|
|
1597
|
-
// src/adapters/openai-adapter.ts
|
|
1598
|
-
import OpenAI from "openai";
|
|
1599
|
-
|
|
1600
|
-
// src/adapters/openai-types.ts
|
|
1601
|
-
var OPENAI_MODELS = {
|
|
1602
|
-
GPT_5_2: "gpt-5.2",
|
|
1603
|
-
GPT_5_2_INSTANT: "gpt-5.2-chat-latest",
|
|
1604
|
-
GPT_5_2_PRO: "gpt-5.2-pro",
|
|
1605
|
-
GPT_5_2_CODEX: getCliModelName("codex-5.2"),
|
|
1606
|
-
GPT_4O: "gpt-4o-2024-11-20",
|
|
1607
|
-
GPT_4O_MINI: "gpt-4o-mini-2024-07-18",
|
|
1608
|
-
GPT_4_TURBO: "gpt-4-turbo-2024-04-09",
|
|
1609
|
-
GPT_35_TURBO: "gpt-3.5-turbo-0125"
|
|
1610
|
-
};
|
|
1611
|
-
var OPENAI_MODEL_ALIASES = {
|
|
1612
|
-
"gpt-5.2-instant": OPENAI_MODELS.GPT_5_2_INSTANT,
|
|
1613
|
-
"gpt-4o": OPENAI_MODELS.GPT_4O,
|
|
1614
|
-
"gpt-4o-mini": OPENAI_MODELS.GPT_4O_MINI,
|
|
1615
|
-
"gpt-4-turbo": OPENAI_MODELS.GPT_4_TURBO,
|
|
1616
|
-
"gpt-3.5-turbo": OPENAI_MODELS.GPT_35_TURBO
|
|
1617
|
-
};
|
|
1618
|
-
var DEFAULT_MAX_TOKENS = 4096;
|
|
1619
|
-
function isFunctionToolCall(toolCall) {
|
|
1620
|
-
if (typeof toolCall !== "object" || toolCall === null) {
|
|
1621
|
-
return false;
|
|
1622
|
-
}
|
|
1623
|
-
const tc = toolCall;
|
|
1624
|
-
return tc["type"] === "function" && typeof tc["function"] === "object" && tc["function"] !== null;
|
|
1625
|
-
}
|
|
1626
|
-
function resolveModelId(modelId) {
|
|
1627
|
-
return OPENAI_MODEL_ALIASES[modelId] ?? modelId;
|
|
1628
|
-
}
|
|
1629
|
-
function getModelCapabilities(modelId) {
|
|
1630
|
-
const capabilities = [ModelCapability.COMPLETION, ModelCapability.STREAMING, ModelCapability.TOOL_USE];
|
|
1631
|
-
const resolvedId = resolveModelId(modelId);
|
|
1632
|
-
if (resolvedId.includes("gpt-4o") || resolvedId.includes("gpt-4-turbo") || resolvedId.includes("gpt-5.2")) {
|
|
1633
|
-
capabilities.push(ModelCapability.VISION);
|
|
1634
|
-
}
|
|
1635
|
-
if (resolvedId.includes("gpt-5.2")) {
|
|
1636
|
-
capabilities.push(ModelCapability.EXTENDED_THINKING);
|
|
1637
|
-
}
|
|
1638
|
-
return capabilities;
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
// src/adapters/openai-mappers.ts
|
|
1642
|
-
function mapStopReason(openaiReason) {
|
|
1643
|
-
switch (openaiReason) {
|
|
1644
|
-
case "stop":
|
|
1645
|
-
return "end_turn";
|
|
1646
|
-
case "length":
|
|
1647
|
-
return "max_tokens";
|
|
1648
|
-
case "tool_calls":
|
|
1649
|
-
case "function_call":
|
|
1650
|
-
return "tool_use";
|
|
1651
|
-
case "content_filter":
|
|
1652
|
-
return "end_turn";
|
|
1653
|
-
default:
|
|
1654
|
-
return "end_turn";
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
function mapChoiceToContentBlocks(choice) {
|
|
1658
|
-
const blocks = [];
|
|
1659
|
-
const message = choice.message;
|
|
1660
|
-
if (message.content !== null && message.content !== "") {
|
|
1661
|
-
blocks.push({ type: "text", text: message.content });
|
|
1662
|
-
}
|
|
1663
|
-
if (message.tool_calls !== void 0 && message.tool_calls.length > 0) {
|
|
1664
|
-
for (const toolCall of message.tool_calls) {
|
|
1665
|
-
if (isFunctionToolCall(toolCall)) {
|
|
1666
|
-
let parsedInput;
|
|
1667
|
-
try {
|
|
1668
|
-
parsedInput = JSON.parse(toolCall.function.arguments);
|
|
1669
|
-
} catch {
|
|
1670
|
-
parsedInput = { _raw: toolCall.function.arguments };
|
|
1671
|
-
}
|
|
1672
|
-
blocks.push({
|
|
1673
|
-
type: "tool_use",
|
|
1674
|
-
id: toolCall.id,
|
|
1675
|
-
name: toolCall.function.name,
|
|
1676
|
-
input: parsedInput
|
|
1677
|
-
});
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
if (blocks.length === 0) {
|
|
1682
|
-
blocks.push({ type: "text", text: "" });
|
|
1683
|
-
}
|
|
1684
|
-
return blocks;
|
|
1685
|
-
}
|
|
1686
|
-
function mapMessage(message) {
|
|
1687
|
-
if (message.role === "system") {
|
|
1688
|
-
return mapSystemMessage(message);
|
|
1689
|
-
}
|
|
1690
|
-
if (message.role === "user") {
|
|
1691
|
-
return mapUserMessage(message);
|
|
1692
|
-
}
|
|
1693
|
-
return mapAssistantMessage(message);
|
|
1694
|
-
}
|
|
1695
|
-
function mapSystemMessage(message) {
|
|
1696
|
-
const content = typeof message.content === "string" ? message.content : message.content.filter((b) => b.type === "text").map((b) => b.text).join("\n");
|
|
1697
|
-
return { role: "system", content };
|
|
1698
|
-
}
|
|
1699
|
-
function mapUserMessage(message) {
|
|
1700
|
-
if (typeof message.content === "string") {
|
|
1701
|
-
return { role: "user", content: message.content };
|
|
1702
|
-
}
|
|
1703
|
-
const toolResults = message.content.filter(
|
|
1704
|
-
(b) => b.type === "tool_result"
|
|
1705
|
-
);
|
|
1706
|
-
if (toolResults.length > 0) {
|
|
1707
|
-
const firstResult = toolResults[0];
|
|
1708
|
-
if (firstResult !== void 0) {
|
|
1709
|
-
return {
|
|
1710
|
-
role: "tool",
|
|
1711
|
-
tool_call_id: firstResult.tool_use_id,
|
|
1712
|
-
content: firstResult.content
|
|
1713
|
-
};
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
const content = message.content.map((block) => {
|
|
1717
|
-
if (block.type === "text") {
|
|
1718
|
-
return { type: "text", text: block.text };
|
|
1719
|
-
}
|
|
1720
|
-
if (block.type === "image") {
|
|
1721
|
-
return {
|
|
1722
|
-
type: "image_url",
|
|
1723
|
-
image_url: {
|
|
1724
|
-
url: `data:${block.source.media_type};base64,${block.source.data}`
|
|
1725
|
-
}
|
|
1726
|
-
};
|
|
1727
|
-
}
|
|
1728
|
-
return { type: "text", text: "" };
|
|
1729
|
-
});
|
|
1730
|
-
return { role: "user", content };
|
|
1731
|
-
}
|
|
1732
|
-
function mapAssistantMessage(message) {
|
|
1733
|
-
if (typeof message.content === "string") {
|
|
1734
|
-
return { role: "assistant", content: message.content };
|
|
1735
|
-
}
|
|
1736
|
-
const toolUses = message.content.filter(
|
|
1737
|
-
(b) => b.type === "tool_use"
|
|
1738
|
-
);
|
|
1739
|
-
const textContent = message.content.filter((b) => b.type === "text").map((b) => b.text).join("");
|
|
1740
|
-
if (toolUses.length > 0) {
|
|
1741
|
-
const assistantMessage = {
|
|
1742
|
-
role: "assistant",
|
|
1743
|
-
content: textContent !== "" ? textContent : null,
|
|
1744
|
-
tool_calls: toolUses.map((tool) => ({
|
|
1745
|
-
id: tool.id,
|
|
1746
|
-
type: "function",
|
|
1747
|
-
function: {
|
|
1748
|
-
name: tool.name,
|
|
1749
|
-
arguments: JSON.stringify(tool.input)
|
|
1750
|
-
}
|
|
1751
|
-
}))
|
|
1752
|
-
};
|
|
1753
|
-
return assistantMessage;
|
|
1754
|
-
}
|
|
1755
|
-
return { role: "assistant", content: textContent };
|
|
1756
|
-
}
|
|
1757
|
-
function mapTool(tool) {
|
|
1758
|
-
return {
|
|
1759
|
-
type: "function",
|
|
1760
|
-
function: {
|
|
1761
|
-
name: tool.name,
|
|
1762
|
-
description: tool.description,
|
|
1763
|
-
parameters: tool.inputSchema
|
|
1764
|
-
}
|
|
1765
|
-
};
|
|
1766
|
-
}
|
|
1767
|
-
function mapResponseUsage(response) {
|
|
1768
|
-
return {
|
|
1769
|
-
inputTokens: response.usage?.prompt_tokens ?? 0,
|
|
1770
|
-
outputTokens: response.usage?.completion_tokens ?? 0,
|
|
1771
|
-
totalTokens: response.usage?.total_tokens ?? 0
|
|
1772
|
-
};
|
|
1773
|
-
}
|
|
1774
|
-
function mapContentDelta(delta, currentIndex, hasStarted) {
|
|
1775
|
-
const chunks = [];
|
|
1776
|
-
if (delta.content !== void 0 && delta.content !== null && delta.content !== "") {
|
|
1777
|
-
if (currentIndex === 0 && !hasStarted) {
|
|
1778
|
-
chunks.push({
|
|
1779
|
-
type: "content_block_start",
|
|
1780
|
-
index: 0,
|
|
1781
|
-
contentBlock: { type: "text", text: "" }
|
|
1782
|
-
});
|
|
1783
|
-
}
|
|
1784
|
-
chunks.push({
|
|
1785
|
-
type: "content_block_delta",
|
|
1786
|
-
index: currentIndex,
|
|
1787
|
-
delta: { type: "text_delta", text: delta.content }
|
|
1788
|
-
});
|
|
1789
|
-
}
|
|
1790
|
-
return chunks;
|
|
1791
|
-
}
|
|
1792
|
-
function mapToolCallsDelta(delta) {
|
|
1793
|
-
const chunks = [];
|
|
1794
|
-
if (delta.tool_calls !== void 0 && delta.tool_calls.length > 0) {
|
|
1795
|
-
for (const toolCall of delta.tool_calls) {
|
|
1796
|
-
if (toolCall.function?.name !== void 0) {
|
|
1797
|
-
chunks.push({
|
|
1798
|
-
type: "content_block_start",
|
|
1799
|
-
index: toolCall.index,
|
|
1800
|
-
contentBlock: {
|
|
1801
|
-
type: "tool_use",
|
|
1802
|
-
id: toolCall.id ?? "",
|
|
1803
|
-
name: toolCall.function.name,
|
|
1804
|
-
input: {}
|
|
1805
|
-
}
|
|
1806
|
-
});
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
return chunks;
|
|
1811
|
-
}
|
|
1812
|
-
function mapFinishChunks(choice, chunk, currentIndex) {
|
|
1813
|
-
const chunks = [];
|
|
1814
|
-
if (choice.finish_reason !== null) {
|
|
1815
|
-
chunks.push({
|
|
1816
|
-
type: "content_block_stop",
|
|
1817
|
-
index: currentIndex
|
|
1818
|
-
});
|
|
1819
|
-
chunks.push({
|
|
1820
|
-
type: "message_delta",
|
|
1821
|
-
delta: { stop_reason: mapStopReason(choice.finish_reason) },
|
|
1822
|
-
usage: {
|
|
1823
|
-
inputTokens: 0,
|
|
1824
|
-
outputTokens: chunk.usage?.completion_tokens ?? 0,
|
|
1825
|
-
totalTokens: chunk.usage?.total_tokens ?? 0
|
|
1826
|
-
}
|
|
1827
|
-
});
|
|
1828
|
-
chunks.push({ type: "message_stop" });
|
|
1829
|
-
}
|
|
1830
|
-
return chunks;
|
|
1831
|
-
}
|
|
1832
|
-
function mapStreamChunk(chunk, currentIndex, hasStarted) {
|
|
1833
|
-
const chunks = [];
|
|
1834
|
-
const choice = chunk.choices[0];
|
|
1835
|
-
if (!hasStarted) {
|
|
1836
|
-
chunks.push({
|
|
1837
|
-
type: "message_start",
|
|
1838
|
-
message: { model: chunk.model }
|
|
1839
|
-
});
|
|
1840
|
-
}
|
|
1841
|
-
if (choice === void 0) {
|
|
1842
|
-
return chunks;
|
|
1843
|
-
}
|
|
1844
|
-
const delta = choice.delta;
|
|
1845
|
-
chunks.push(...mapContentDelta(delta, currentIndex, hasStarted));
|
|
1846
|
-
chunks.push(...mapToolCallsDelta(delta));
|
|
1847
|
-
chunks.push(...mapFinishChunks(choice, chunk, currentIndex));
|
|
1848
|
-
return chunks;
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
// src/adapters/openai-adapter.ts
|
|
1852
|
-
var OpenAIAdapter = class extends BaseAdapter {
|
|
1853
|
-
client;
|
|
1854
|
-
resolvedModelId;
|
|
1855
|
-
/**
|
|
1856
|
-
* Creates a new OpenAIAdapter instance.
|
|
1857
|
-
*
|
|
1858
|
-
* @param config - OpenAI adapter configuration
|
|
1859
|
-
* @throws {ConfigError} If API key is missing
|
|
1860
|
-
*/
|
|
1861
|
-
constructor(config) {
|
|
1862
|
-
const resolvedModelId = resolveModelId(config.modelId);
|
|
1863
|
-
const baseConfig = {
|
|
1864
|
-
providerId: "openai",
|
|
1865
|
-
modelId: resolvedModelId,
|
|
1866
|
-
capabilities: getModelCapabilities(config.modelId),
|
|
1867
|
-
apiKey: config.apiKey
|
|
1868
|
-
};
|
|
1869
|
-
if (config.baseUrl !== void 0) {
|
|
1870
|
-
baseConfig.baseUrl = config.baseUrl;
|
|
1871
|
-
}
|
|
1872
|
-
if (config.timeout !== void 0) {
|
|
1873
|
-
baseConfig.timeout = config.timeout;
|
|
1874
|
-
}
|
|
1875
|
-
if (config.maxRetries !== void 0) {
|
|
1876
|
-
baseConfig.maxRetries = config.maxRetries;
|
|
1877
|
-
}
|
|
1878
|
-
super(baseConfig);
|
|
1879
|
-
this.resolvedModelId = resolvedModelId;
|
|
1880
|
-
requireApiKey(config.apiKey, "OpenAI", config.modelId);
|
|
1881
|
-
this.client = this.createClient(config);
|
|
1882
|
-
}
|
|
1883
|
-
/**
|
|
1884
|
-
* Creates the OpenAI client with configuration.
|
|
1885
|
-
*/
|
|
1886
|
-
createClient(config) {
|
|
1887
|
-
const clientOptions = {
|
|
1888
|
-
apiKey: config.apiKey,
|
|
1889
|
-
maxRetries: config.maxRetries ?? 2
|
|
1890
|
-
};
|
|
1891
|
-
if (config.baseUrl !== void 0) {
|
|
1892
|
-
clientOptions.baseURL = config.baseUrl;
|
|
1893
|
-
}
|
|
1894
|
-
if (config.timeout !== void 0) {
|
|
1895
|
-
clientOptions.timeout = config.timeout;
|
|
1896
|
-
}
|
|
1897
|
-
if (config.organization !== void 0) {
|
|
1898
|
-
clientOptions.organization = config.organization;
|
|
1899
|
-
}
|
|
1900
|
-
return new OpenAI(clientOptions);
|
|
1901
|
-
}
|
|
1902
|
-
/**
|
|
1903
|
-
* Validates adapter configuration.
|
|
1904
|
-
* Extends base validation with OpenAI-specific checks.
|
|
1905
|
-
*/
|
|
1906
|
-
validateConfig() {
|
|
1907
|
-
const baseResult = super.validateConfig();
|
|
1908
|
-
if (!baseResult.ok) {
|
|
1909
|
-
return baseResult;
|
|
1910
|
-
}
|
|
1911
|
-
const keyResult = validateApiKeyPresence(this.config.apiKey, this.providerId, this.modelId);
|
|
1912
|
-
if (!keyResult.ok) return keyResult;
|
|
1913
|
-
return ok(void 0);
|
|
1914
|
-
}
|
|
1915
|
-
/**
|
|
1916
|
-
* Send a completion request to OpenAI.
|
|
1917
|
-
*
|
|
1918
|
-
* @param request - The completion request
|
|
1919
|
-
* @returns Result with response or ModelError
|
|
1920
|
-
*/
|
|
1921
|
-
async complete(request) {
|
|
1922
|
-
this.logRequest(request);
|
|
1923
|
-
try {
|
|
1924
|
-
const response = await this.executeCompletion(request);
|
|
1925
|
-
this.logResponse(response);
|
|
1926
|
-
return ok(response);
|
|
1927
|
-
} catch (error) {
|
|
1928
|
-
return err(this.transformError(error));
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
/**
|
|
1932
|
-
* Stream a completion request from OpenAI.
|
|
1933
|
-
*
|
|
1934
|
-
* @param request - The completion request
|
|
1935
|
-
* @yields StreamChunk objects as they arrive
|
|
1936
|
-
*/
|
|
1937
|
-
async *stream(request) {
|
|
1938
|
-
this.logRequest(request);
|
|
1939
|
-
const [controller, iterable] = createStream();
|
|
1940
|
-
this.executeStream(request, controller).catch((error) => {
|
|
1941
|
-
const modelError = this.transformError(error);
|
|
1942
|
-
controller.error(modelError);
|
|
1943
|
-
});
|
|
1944
|
-
yield* iterable;
|
|
1945
|
-
}
|
|
1946
|
-
/**
|
|
1947
|
-
* Count tokens in text using OpenAI-specific estimation.
|
|
1948
|
-
*
|
|
1949
|
-
* @param text - Text to count tokens for
|
|
1950
|
-
* @returns Approximate token count
|
|
1951
|
-
*/
|
|
1952
|
-
countTokens(text) {
|
|
1953
|
-
return Promise.resolve(getTokenEstimator().estimateText(text, "openai"));
|
|
1954
|
-
}
|
|
1955
|
-
/**
|
|
1956
|
-
* Executes the completion request against the OpenAI API.
|
|
1957
|
-
*/
|
|
1958
|
-
async executeCompletion(request) {
|
|
1959
|
-
const params = this.buildRequestParams(request);
|
|
1960
|
-
const response = await this.client.chat.completions.create(params);
|
|
1961
|
-
return this.mapResponse(response);
|
|
1962
|
-
}
|
|
1963
|
-
/**
|
|
1964
|
-
* Executes streaming completion and pushes chunks to the controller.
|
|
1965
|
-
*/
|
|
1966
|
-
async executeStream(request, controller) {
|
|
1967
|
-
try {
|
|
1968
|
-
const params = this.buildRequestParams(request);
|
|
1969
|
-
const stream = await this.client.chat.completions.create({ ...params, stream: true });
|
|
1970
|
-
let contentIndex = 0;
|
|
1971
|
-
let hasStarted = false;
|
|
1972
|
-
for await (const chunk of stream) {
|
|
1973
|
-
const mappedChunks = mapStreamChunk(chunk, contentIndex, hasStarted);
|
|
1974
|
-
for (const mappedChunk of mappedChunks) {
|
|
1975
|
-
if (mappedChunk.type === "message_start") {
|
|
1976
|
-
hasStarted = true;
|
|
1977
|
-
}
|
|
1978
|
-
if (mappedChunk.type === "content_block_start") {
|
|
1979
|
-
contentIndex++;
|
|
1980
|
-
}
|
|
1981
|
-
controller.push(mappedChunk);
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
controller.complete();
|
|
1985
|
-
} catch (error) {
|
|
1986
|
-
const modelError = this.transformError(error);
|
|
1987
|
-
controller.error(modelError);
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
/**
|
|
1991
|
-
* Builds OpenAI API request parameters from our CompletionRequest.
|
|
1992
|
-
*/
|
|
1993
|
-
buildRequestParams(request) {
|
|
1994
|
-
const messages = this.buildMessages(request);
|
|
1995
|
-
const params = {
|
|
1996
|
-
model: this.resolvedModelId,
|
|
1997
|
-
messages,
|
|
1998
|
-
max_completion_tokens: request.maxTokens ?? DEFAULT_MAX_TOKENS
|
|
1999
|
-
};
|
|
2000
|
-
this.addOptionalParams(params, request);
|
|
2001
|
-
return params;
|
|
2002
|
-
}
|
|
2003
|
-
/**
|
|
2004
|
-
* Builds the messages array for the request.
|
|
2005
|
-
*/
|
|
2006
|
-
buildMessages(request) {
|
|
2007
|
-
const messages = [];
|
|
2008
|
-
if (request.systemPrompt !== void 0 && request.systemPrompt !== "") {
|
|
2009
|
-
messages.push({ role: "system", content: request.systemPrompt });
|
|
2010
|
-
}
|
|
2011
|
-
for (const msg of request.messages) {
|
|
2012
|
-
if (msg.role === "system" && request.systemPrompt !== void 0) {
|
|
2013
|
-
continue;
|
|
2014
|
-
}
|
|
2015
|
-
messages.push(mapMessage(msg));
|
|
2016
|
-
}
|
|
2017
|
-
return messages;
|
|
2018
|
-
}
|
|
2019
|
-
/**
|
|
2020
|
-
* Adds optional parameters to the request.
|
|
2021
|
-
*/
|
|
2022
|
-
addOptionalParams(params, request) {
|
|
2023
|
-
if (request.temperature !== void 0) {
|
|
2024
|
-
params.temperature = request.temperature;
|
|
2025
|
-
}
|
|
2026
|
-
if (request.stop !== void 0 && request.stop.length > 0) {
|
|
2027
|
-
params.stop = request.stop;
|
|
2028
|
-
}
|
|
2029
|
-
if (request.tools !== void 0 && request.tools.length > 0) {
|
|
2030
|
-
params.tools = request.tools.map(mapTool);
|
|
2031
|
-
}
|
|
2032
|
-
this.addResponseFormat(params, request);
|
|
2033
|
-
}
|
|
2034
|
-
/**
|
|
2035
|
-
* Adds response format to the request if specified.
|
|
2036
|
-
*/
|
|
2037
|
-
addResponseFormat(params, request) {
|
|
2038
|
-
if (request.responseFormat === void 0) {
|
|
2039
|
-
return;
|
|
2040
|
-
}
|
|
2041
|
-
if (request.responseFormat.type === "json_object") {
|
|
2042
|
-
params.response_format = { type: "json_object" };
|
|
2043
|
-
} else if (request.responseFormat.type === "json_schema") {
|
|
2044
|
-
params.response_format = {
|
|
2045
|
-
type: "json_schema",
|
|
2046
|
-
json_schema: {
|
|
2047
|
-
name: "response",
|
|
2048
|
-
schema: request.responseFormat.schema
|
|
2049
|
-
}
|
|
2050
|
-
};
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
/**
|
|
2054
|
-
* Maps OpenAI API response to our CompletionResponse format.
|
|
2055
|
-
*/
|
|
2056
|
-
mapResponse(response) {
|
|
2057
|
-
const firstChoice = response.choices[0];
|
|
2058
|
-
if (firstChoice === void 0) {
|
|
2059
|
-
return this.createEmptyResponse(response);
|
|
2060
|
-
}
|
|
2061
|
-
const content = mapChoiceToContentBlocks(firstChoice);
|
|
2062
|
-
const usage = mapResponseUsage(response);
|
|
2063
|
-
return {
|
|
2064
|
-
content,
|
|
2065
|
-
usage,
|
|
2066
|
-
stopReason: mapStopReason(firstChoice.finish_reason),
|
|
2067
|
-
model: response.model
|
|
2068
|
-
};
|
|
2069
|
-
}
|
|
2070
|
-
/**
|
|
2071
|
-
* Creates an empty response when no choices are returned.
|
|
2072
|
-
*/
|
|
2073
|
-
createEmptyResponse(response) {
|
|
2074
|
-
return {
|
|
2075
|
-
content: [{ type: "text", text: "" }],
|
|
2076
|
-
usage: mapResponseUsage(response),
|
|
2077
|
-
stopReason: "end_turn",
|
|
2078
|
-
model: response.model
|
|
2079
|
-
};
|
|
2080
|
-
}
|
|
2081
|
-
};
|
|
2082
|
-
function createOpenAIAdapter(config) {
|
|
2083
|
-
return new OpenAIAdapter(config);
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
1478
|
// src/adapters/ollama-adapter.ts
|
|
2087
1479
|
import { Ollama } from "ollama";
|
|
2088
1480
|
var OLLAMA_MODELS = {
|
|
@@ -2100,8 +1492,8 @@ var OLLAMA_MODELS = {
|
|
|
2100
1492
|
GEMMA2: "gemma2"
|
|
2101
1493
|
};
|
|
2102
1494
|
var DEFAULT_OLLAMA_HOST = "http://localhost:11434";
|
|
2103
|
-
var
|
|
2104
|
-
function
|
|
1495
|
+
var DEFAULT_MAX_TOKENS = 2048;
|
|
1496
|
+
function mapStopReason(reason) {
|
|
2105
1497
|
if (reason === void 0 || reason === "") return "end_turn";
|
|
2106
1498
|
switch (reason) {
|
|
2107
1499
|
case "stop":
|
|
@@ -2134,7 +1526,7 @@ function mapOllamaMessageToContent(message) {
|
|
|
2134
1526
|
if (content.length === 0) content.push({ type: "text", text: "" });
|
|
2135
1527
|
return content;
|
|
2136
1528
|
}
|
|
2137
|
-
function
|
|
1529
|
+
function mapMessage(message) {
|
|
2138
1530
|
if (typeof message.content === "string") {
|
|
2139
1531
|
return { role: message.role, content: message.content };
|
|
2140
1532
|
}
|
|
@@ -2149,7 +1541,7 @@ function mapMessage2(message) {
|
|
|
2149
1541
|
}
|
|
2150
1542
|
return ollamaMessage;
|
|
2151
1543
|
}
|
|
2152
|
-
function
|
|
1544
|
+
function mapTool(tool) {
|
|
2153
1545
|
const fn = { name: tool.name, description: tool.description };
|
|
2154
1546
|
const schema = tool.inputSchema;
|
|
2155
1547
|
const hasProperties = Object.keys(schema).length > 0;
|
|
@@ -2158,7 +1550,7 @@ function mapTool2(tool) {
|
|
|
2158
1550
|
}
|
|
2159
1551
|
return { type: "function", function: fn };
|
|
2160
1552
|
}
|
|
2161
|
-
function
|
|
1553
|
+
function getModelCapabilities(modelId) {
|
|
2162
1554
|
const caps = [ModelCapability.COMPLETION, ModelCapability.STREAMING];
|
|
2163
1555
|
const lower = modelId.toLowerCase();
|
|
2164
1556
|
const toolModels = [
|
|
@@ -2182,7 +1574,7 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2182
1574
|
const baseConfig = {
|
|
2183
1575
|
providerId: "ollama",
|
|
2184
1576
|
modelId: config.modelId,
|
|
2185
|
-
capabilities:
|
|
1577
|
+
capabilities: getModelCapabilities(config.modelId),
|
|
2186
1578
|
baseUrl
|
|
2187
1579
|
};
|
|
2188
1580
|
if (config.timeout !== void 0) baseConfig.timeout = config.timeout;
|
|
@@ -2250,7 +1642,7 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2250
1642
|
controller.push({ type: "content_block_stop", index: 0 });
|
|
2251
1643
|
controller.push({
|
|
2252
1644
|
type: "message_delta",
|
|
2253
|
-
delta: { stop_reason:
|
|
1645
|
+
delta: { stop_reason: mapStopReason(chunk.done_reason) },
|
|
2254
1646
|
usage: this.calcUsage(chunk)
|
|
2255
1647
|
});
|
|
2256
1648
|
controller.push({ type: "message_stop" });
|
|
@@ -2263,7 +1655,7 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2263
1655
|
}
|
|
2264
1656
|
buildOptions(request) {
|
|
2265
1657
|
const options = {
|
|
2266
|
-
num_predict: request.maxTokens ??
|
|
1658
|
+
num_predict: request.maxTokens ?? DEFAULT_MAX_TOKENS
|
|
2267
1659
|
};
|
|
2268
1660
|
if (request.temperature !== void 0) options["temperature"] = request.temperature;
|
|
2269
1661
|
if (request.stop !== void 0 && request.stop.length > 0) options["stop"] = request.stop;
|
|
@@ -2271,13 +1663,13 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2271
1663
|
}
|
|
2272
1664
|
applyFormatAndTools(params, request) {
|
|
2273
1665
|
if (request.tools !== void 0 && request.tools.length > 0)
|
|
2274
|
-
params.tools = request.tools.map(
|
|
1666
|
+
params.tools = request.tools.map(mapTool);
|
|
2275
1667
|
if (request.responseFormat?.type === "json_object") params.format = "json";
|
|
2276
1668
|
else if (request.responseFormat?.type === "json_schema")
|
|
2277
1669
|
params.format = request.responseFormat.schema;
|
|
2278
1670
|
}
|
|
2279
1671
|
buildRequestParams(request) {
|
|
2280
|
-
const messages = request.messages.filter((m) => m.role !== "system").map(
|
|
1672
|
+
const messages = request.messages.filter((m) => m.role !== "system").map(mapMessage);
|
|
2281
1673
|
const systemPrompt = extractRequestSystemPrompt(request);
|
|
2282
1674
|
if (systemPrompt !== void 0) messages.unshift({ role: "system", content: systemPrompt });
|
|
2283
1675
|
const params = {
|
|
@@ -2292,7 +1684,7 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2292
1684
|
return {
|
|
2293
1685
|
content: mapOllamaMessageToContent(response.message),
|
|
2294
1686
|
usage: this.calcUsage(response),
|
|
2295
|
-
stopReason:
|
|
1687
|
+
stopReason: mapStopReason(response.done_reason),
|
|
2296
1688
|
model: response.model
|
|
2297
1689
|
};
|
|
2298
1690
|
}
|
|
@@ -2329,8 +1721,8 @@ var GEMINI_MODEL_ALIASES = {
|
|
|
2329
1721
|
"gemini-1.5-pro": GEMINI_MODELS.PRO_1_5,
|
|
2330
1722
|
"gemini-1.5-flash": GEMINI_MODELS.FLASH_1_5
|
|
2331
1723
|
};
|
|
2332
|
-
var
|
|
2333
|
-
function
|
|
1724
|
+
var DEFAULT_MAX_TOKENS2 = 8192;
|
|
1725
|
+
function mapStopReason2(finishReason) {
|
|
2334
1726
|
switch (finishReason) {
|
|
2335
1727
|
case "STOP":
|
|
2336
1728
|
return "end_turn";
|
|
@@ -2394,19 +1786,19 @@ function mapToolToFunctionDeclaration(tool) {
|
|
|
2394
1786
|
}
|
|
2395
1787
|
};
|
|
2396
1788
|
}
|
|
2397
|
-
function
|
|
1789
|
+
function resolveModelId(modelId) {
|
|
2398
1790
|
const canonical = findCanonicalModel("gemini", modelId);
|
|
2399
1791
|
if (canonical?.cliModelName !== void 0) return canonical.cliModelName;
|
|
2400
1792
|
return GEMINI_MODEL_ALIASES[modelId] ?? modelId;
|
|
2401
1793
|
}
|
|
2402
|
-
function
|
|
1794
|
+
function getModelCapabilities2(modelId) {
|
|
2403
1795
|
const capabilities = [
|
|
2404
1796
|
ModelCapability.COMPLETION,
|
|
2405
1797
|
ModelCapability.STREAMING,
|
|
2406
1798
|
ModelCapability.TOOL_USE,
|
|
2407
1799
|
ModelCapability.VISION
|
|
2408
1800
|
];
|
|
2409
|
-
const resolvedId =
|
|
1801
|
+
const resolvedId = resolveModelId(modelId);
|
|
2410
1802
|
if (resolvedId.includes("2.5") || resolvedId.includes("2.0")) {
|
|
2411
1803
|
capabilities.push(ModelCapability.EXTENDED_THINKING);
|
|
2412
1804
|
}
|
|
@@ -2424,11 +1816,11 @@ var GeminiAdapter = class extends BaseAdapter {
|
|
|
2424
1816
|
* @throws {ConfigError} If API key is missing
|
|
2425
1817
|
*/
|
|
2426
1818
|
constructor(config) {
|
|
2427
|
-
const resolvedModelId =
|
|
1819
|
+
const resolvedModelId = resolveModelId(config.modelId);
|
|
2428
1820
|
const baseConfig = {
|
|
2429
1821
|
providerId: "google",
|
|
2430
1822
|
modelId: resolvedModelId,
|
|
2431
|
-
capabilities:
|
|
1823
|
+
capabilities: getModelCapabilities2(config.modelId),
|
|
2432
1824
|
apiKey: config.apiKey
|
|
2433
1825
|
};
|
|
2434
1826
|
if (config.timeout !== void 0) {
|
|
@@ -2558,7 +1950,7 @@ var GeminiAdapter = class extends BaseAdapter {
|
|
|
2558
1950
|
*/
|
|
2559
1951
|
buildGenerationConfig(request) {
|
|
2560
1952
|
const config = {};
|
|
2561
|
-
config.maxOutputTokens = request.maxTokens ??
|
|
1953
|
+
config.maxOutputTokens = request.maxTokens ?? DEFAULT_MAX_TOKENS2;
|
|
2562
1954
|
const systemPrompt = extractRequestSystemPrompt(request);
|
|
2563
1955
|
if (systemPrompt !== void 0) config.systemInstruction = systemPrompt;
|
|
2564
1956
|
if (request.temperature !== void 0) config.temperature = request.temperature;
|
|
@@ -2633,7 +2025,7 @@ var GeminiAdapter = class extends BaseAdapter {
|
|
|
2633
2025
|
return {
|
|
2634
2026
|
content,
|
|
2635
2027
|
usage,
|
|
2636
|
-
stopReason:
|
|
2028
|
+
stopReason: mapStopReason2(candidate?.finishReason),
|
|
2637
2029
|
model: this.resolvedModelId
|
|
2638
2030
|
};
|
|
2639
2031
|
}
|
|
@@ -6694,7 +6086,7 @@ function buildVotingInput(plan, config) {
|
|
|
6694
6086
|
}
|
|
6695
6087
|
async function executeSingleVote(plan, config, log) {
|
|
6696
6088
|
try {
|
|
6697
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
6089
|
+
const { executeVoting } = await import("./consensus-vote-5V4KVHBE.js");
|
|
6698
6090
|
const input = buildVotingInput(plan, config);
|
|
6699
6091
|
const result = await executeVoting(input, log);
|
|
6700
6092
|
return parseVotingResult(result);
|
|
@@ -6823,9 +6215,9 @@ export {
|
|
|
6823
6215
|
AgentMessageSchema,
|
|
6824
6216
|
AgentPerformanceSchema,
|
|
6825
6217
|
AgentRoleSchema3 as AgentRoleSchema,
|
|
6826
|
-
AgentRunnerError,
|
|
6827
6218
|
AgentStateMachine,
|
|
6828
6219
|
StepExecutor as AgentStepExecutor,
|
|
6220
|
+
AgenticAdapter,
|
|
6829
6221
|
AppConfigSchema,
|
|
6830
6222
|
ArchitectureExpert,
|
|
6831
6223
|
ArtifactRefSchema,
|
|
@@ -6867,7 +6259,6 @@ export {
|
|
|
6867
6259
|
ClaudeAdapter,
|
|
6868
6260
|
ClaudeCliAdapter,
|
|
6869
6261
|
ClaudeResponseParser,
|
|
6870
|
-
CliAgentExecutor,
|
|
6871
6262
|
CliCircuitBreakerIntegration,
|
|
6872
6263
|
CliDetectionCache,
|
|
6873
6264
|
CliDetectionCacheConfigSchema,
|
|
@@ -6925,23 +6316,19 @@ export {
|
|
|
6925
6316
|
DEFAULT_DASHBOARD_CONFIG,
|
|
6926
6317
|
DEFAULT_DASHBOARD_RENDER_OPTIONS,
|
|
6927
6318
|
DEFAULT_DISTILLER_CONFIG,
|
|
6928
|
-
DEFAULT_EVALUATION_CONFIG,
|
|
6929
6319
|
DEFAULT_EXECUTION_TIME_MS,
|
|
6930
6320
|
DEFAULT_FEEDBACK_COLLECTOR_CONFIG,
|
|
6931
6321
|
DEFAULT_FEEDBACK_INTEGRATION_CONFIG,
|
|
6932
6322
|
DEFAULT_FOREST_CONFIG,
|
|
6933
|
-
DEFAULT_HARNESS_EXECUTION_CONFIG,
|
|
6934
6323
|
DEFAULT_HIGHER_ORDER_CONFIG,
|
|
6935
6324
|
DEFAULT_MAX_RETRIES,
|
|
6936
6325
|
DEFAULT_MEMORY_BENCHMARK_CONFIG,
|
|
6937
6326
|
DEFAULT_OUTCOME_STORAGE_CONFIG,
|
|
6938
|
-
DEFAULT_PATCH_OPTIONS,
|
|
6939
6327
|
DEFAULT_PATH_SCORING_OPTIONS,
|
|
6940
6328
|
DEFAULT_PERMISSIONS,
|
|
6941
6329
|
DEFAULT_POLICIES,
|
|
6942
6330
|
DEFAULT_PREFERENCE_ROUTER_CONFIG,
|
|
6943
6331
|
DEFAULT_RBAC,
|
|
6944
|
-
DEFAULT_REPORT_CONFIG,
|
|
6945
6332
|
DEFAULT_RESOURCE_LIMITS,
|
|
6946
6333
|
DEFAULT_RETRY_CONFIG,
|
|
6947
6334
|
DEFAULT_ROLE_MAPPINGS,
|
|
@@ -6950,8 +6337,6 @@ export {
|
|
|
6950
6337
|
DEFAULT_SKILL_LOADER_CONFIG,
|
|
6951
6338
|
DEFAULT_STATISTICAL_OPTIONS,
|
|
6952
6339
|
DEFAULT_SWARM_OBSERVER_CONFIG,
|
|
6953
|
-
DEFAULT_SWE_BENCH_CONFIG,
|
|
6954
|
-
DEFAULT_TEST_RUNNER_CONFIG,
|
|
6955
6340
|
DEFAULT_TIMEOUTS,
|
|
6956
6341
|
DEFAULT_TIMEOUT_PROFILE,
|
|
6957
6342
|
DEFAULT_TRINITY_CONFIG,
|
|
@@ -6962,7 +6347,6 @@ export {
|
|
|
6962
6347
|
DagEdgeSchema,
|
|
6963
6348
|
Dashboard,
|
|
6964
6349
|
DashboardConfigSchema,
|
|
6965
|
-
DatasetLoadError,
|
|
6966
6350
|
DelegateInputSchema,
|
|
6967
6351
|
DelegateOutputSchema,
|
|
6968
6352
|
DependencyErrorCodeSchema,
|
|
@@ -6978,8 +6362,6 @@ export {
|
|
|
6978
6362
|
EXPERT_TYPE_TO_ROLE,
|
|
6979
6363
|
ErrorCode,
|
|
6980
6364
|
EvaluationCriterionSchema,
|
|
6981
|
-
EvaluationHarness,
|
|
6982
|
-
EvaluationHarnessError,
|
|
6983
6365
|
EventBus,
|
|
6984
6366
|
ExecuteExpertInputSchema,
|
|
6985
6367
|
ExecuteSpecInputSchema,
|
|
@@ -7029,9 +6411,6 @@ export {
|
|
|
7029
6411
|
HARM_EMOTIONAL_CATEGORY,
|
|
7030
6412
|
HARM_FINANCIAL_CATEGORY,
|
|
7031
6413
|
HARM_PHYSICAL_CATEGORY,
|
|
7032
|
-
HarnessExecutor,
|
|
7033
|
-
HarnessExecutorError,
|
|
7034
|
-
HarnessVerifyAdapter,
|
|
7035
6414
|
HigherOrderVotingConfigSchema,
|
|
7036
6415
|
HigherOrderVotingResultSchema,
|
|
7037
6416
|
HigherOrderVotingStrategy,
|
|
@@ -7056,7 +6435,6 @@ export {
|
|
|
7056
6435
|
ListExpertsInputSchema,
|
|
7057
6436
|
ListWorkflowsInputSchema,
|
|
7058
6437
|
LoadedSkillSetSchema,
|
|
7059
|
-
LockedWriter,
|
|
7060
6438
|
LoggingConfigSchema,
|
|
7061
6439
|
MANIPULATION_CATEGORY,
|
|
7062
6440
|
MAX_DIFF_LENGTH,
|
|
@@ -7078,7 +6456,6 @@ export {
|
|
|
7078
6456
|
ModelTiersSchema,
|
|
7079
6457
|
NOOP_NOTIFIER,
|
|
7080
6458
|
NOOP_PROGRESS,
|
|
7081
|
-
NexusAgentExecutor,
|
|
7082
6459
|
NexusError,
|
|
7083
6460
|
NoAdapterError,
|
|
7084
6461
|
NodeStateSchema,
|
|
@@ -7114,8 +6491,6 @@ export {
|
|
|
7114
6491
|
ParallelProtocol,
|
|
7115
6492
|
ParseError,
|
|
7116
6493
|
ParsedSpecSchema,
|
|
7117
|
-
PatchApplicator,
|
|
7118
|
-
PatchApplicatorError,
|
|
7119
6494
|
PathScoreBreakdownSchema,
|
|
7120
6495
|
PathScoreSchema,
|
|
7121
6496
|
PersistentOutcomeStore,
|
|
@@ -7130,8 +6505,6 @@ export {
|
|
|
7130
6505
|
PolicyFirewall,
|
|
7131
6506
|
PolicyGateSpecSchema,
|
|
7132
6507
|
PrReviewInputSchema,
|
|
7133
|
-
PredictionWriteError,
|
|
7134
|
-
PredictionWriter,
|
|
7135
6508
|
PreferenceRouter,
|
|
7136
6509
|
PreferenceRouterConfigSchema,
|
|
7137
6510
|
ProofOfLearningStrategy,
|
|
@@ -7144,7 +6517,6 @@ export {
|
|
|
7144
6517
|
QueryFeatureExtractor,
|
|
7145
6518
|
QueryTraceInputSchema,
|
|
7146
6519
|
REJECTION_CATEGORIES,
|
|
7147
|
-
REPO_COMPLEXITY,
|
|
7148
6520
|
RESEARCH_PIPELINE_TEMPLATE,
|
|
7149
6521
|
RISK_AWARENESS_CATEGORY,
|
|
7150
6522
|
ROBUSTNESS_CATEGORY,
|
|
@@ -7160,8 +6532,6 @@ export {
|
|
|
7160
6532
|
RejectionCategorySchema,
|
|
7161
6533
|
RepoAnalyzeInputSchema,
|
|
7162
6534
|
RepoSecurityPlanInputSchema,
|
|
7163
|
-
ReportGenerationError,
|
|
7164
|
-
ReportGenerator,
|
|
7165
6535
|
ReputationCache,
|
|
7166
6536
|
ResearchAddInputSchema,
|
|
7167
6537
|
ResearchAddSourceInputSchema,
|
|
@@ -7189,10 +6559,6 @@ export {
|
|
|
7189
6559
|
SQLiteOutcomeStorage,
|
|
7190
6560
|
STAGE_TYPES,
|
|
7191
6561
|
START,
|
|
7192
|
-
SWEBenchRunner,
|
|
7193
|
-
SWEBenchRunnerError,
|
|
7194
|
-
SWE_BENCH_DATASETS,
|
|
7195
|
-
SWE_BENCH_SYSTEM_PROMPT,
|
|
7196
6562
|
SafetyCategoryId,
|
|
7197
6563
|
SafetyCategoryIdSchema,
|
|
7198
6564
|
SafetyCategorySchema,
|
|
@@ -7272,8 +6638,6 @@ export {
|
|
|
7272
6638
|
TemplateMetadataSchema,
|
|
7273
6639
|
TemplateRegistry,
|
|
7274
6640
|
TerminationReasonSchema,
|
|
7275
|
-
TestRunner,
|
|
7276
|
-
TestRunnerError,
|
|
7277
6641
|
TestingExpert,
|
|
7278
6642
|
TextDashboardRenderer,
|
|
7279
6643
|
TimeoutError,
|
|
@@ -7281,7 +6645,6 @@ export {
|
|
|
7281
6645
|
TokenCounter,
|
|
7282
6646
|
TokenCounterProvider,
|
|
7283
6647
|
ToolSetSchema,
|
|
7284
|
-
TraceLogger,
|
|
7285
6648
|
TreeStateSchema,
|
|
7286
6649
|
TreeStatisticsSchema,
|
|
7287
6650
|
TrinityConfigSchema,
|
|
@@ -7326,16 +6689,11 @@ export {
|
|
|
7326
6689
|
analyzeGitHubRepo,
|
|
7327
6690
|
analyzeRepo,
|
|
7328
6691
|
append,
|
|
7329
|
-
applyPatch,
|
|
7330
6692
|
areStepsCompleted,
|
|
7331
6693
|
assessReputation,
|
|
7332
6694
|
bufferStream,
|
|
7333
6695
|
buildDependencyGraph2 as buildDependencyGraph,
|
|
7334
|
-
buildDockerArgs,
|
|
7335
|
-
buildEnrichedPrompt,
|
|
7336
6696
|
buildFinalResult,
|
|
7337
|
-
buildHarnessArgs,
|
|
7338
|
-
buildHarnessCommand,
|
|
7339
6697
|
buildPendingResult,
|
|
7340
6698
|
buildPlanFromAnalysis,
|
|
7341
6699
|
buildPrReviewProposal,
|
|
@@ -7343,18 +6701,14 @@ export {
|
|
|
7343
6701
|
buildTimeoutResult,
|
|
7344
6702
|
calculateDelay,
|
|
7345
6703
|
calculateDistributionStats,
|
|
7346
|
-
calculateEstimatedRemaining,
|
|
7347
|
-
calculateMetrics,
|
|
7348
6704
|
calculateMetricsTotals,
|
|
7349
6705
|
calculateMinSampleSize,
|
|
7350
6706
|
calculateRegret,
|
|
7351
|
-
calculateRepositoryMetrics,
|
|
7352
6707
|
calculateRoutingDistribution,
|
|
7353
6708
|
calculateTokenCost,
|
|
7354
6709
|
calculateTokenMetrics,
|
|
7355
6710
|
calculateVoteWeight,
|
|
7356
6711
|
calculateWinLoss,
|
|
7357
|
-
canApplyPatch,
|
|
7358
6712
|
canExecuteSkill,
|
|
7359
6713
|
canInfluenceDecisions,
|
|
7360
6714
|
canPipelineProceed,
|
|
@@ -7392,12 +6746,12 @@ export {
|
|
|
7392
6746
|
createAgentPairKey,
|
|
7393
6747
|
createAgentStages,
|
|
7394
6748
|
createStepExecutor as createAgentStepExecutor,
|
|
6749
|
+
createAgenticAdapter,
|
|
7395
6750
|
createAllAdapters,
|
|
7396
6751
|
createArchitectureExpert,
|
|
7397
6752
|
createAttestation,
|
|
7398
6753
|
createAuditLogger,
|
|
7399
6754
|
createAuditTrail,
|
|
7400
|
-
createBenchmarkMemory,
|
|
7401
6755
|
createBenchmarkSummary,
|
|
7402
6756
|
createCheckpoint,
|
|
7403
6757
|
createCheckpointStore,
|
|
@@ -7405,7 +6759,6 @@ export {
|
|
|
7405
6759
|
createCliAdapter,
|
|
7406
6760
|
createCliCircuitBreakerIntegration,
|
|
7407
6761
|
createCliDetectionCache,
|
|
7408
|
-
createCliExecutor,
|
|
7409
6762
|
createCodeExpert,
|
|
7410
6763
|
createCollaborationSession,
|
|
7411
6764
|
createCompositeRouter,
|
|
@@ -7426,13 +6779,9 @@ export {
|
|
|
7426
6779
|
createDevStageRegistry,
|
|
7427
6780
|
createDocumentationExpert,
|
|
7428
6781
|
createDryRunHandler,
|
|
7429
|
-
createEmptyContext,
|
|
7430
|
-
createEvaluationHarness,
|
|
7431
6782
|
createEventBusBridge,
|
|
7432
6783
|
createExecutionContext,
|
|
7433
6784
|
createExecutionPlan,
|
|
7434
|
-
createExecutor,
|
|
7435
|
-
createExplorationPrompt,
|
|
7436
6785
|
createFeedbackIntegration,
|
|
7437
6786
|
createFeedbackSubscriber,
|
|
7438
6787
|
createFullGitHubProvider,
|
|
@@ -7440,23 +6789,18 @@ export {
|
|
|
7440
6789
|
createGitHubAdapter,
|
|
7441
6790
|
createGitHubProvider,
|
|
7442
6791
|
createGraphAuditBridge,
|
|
7443
|
-
createHarnessExecutor,
|
|
7444
6792
|
createHigherOrderVotingStrategy,
|
|
7445
6793
|
createIncompleteResult,
|
|
7446
6794
|
createInitialCostMetrics,
|
|
7447
|
-
createInitialProgress,
|
|
7448
6795
|
createInitialSessionMetrics,
|
|
7449
6796
|
createInitialTokenUsage,
|
|
7450
6797
|
createInitializedWorkflowEngine,
|
|
7451
|
-
createInstancePrompt,
|
|
7452
6798
|
createInteractionGraph,
|
|
7453
6799
|
createSwarmObserver as createInteractionSwarmObserver,
|
|
7454
6800
|
createIsolatedRegistry,
|
|
7455
6801
|
createLogger,
|
|
7456
6802
|
createMcpLogger,
|
|
7457
6803
|
createMcpNotifier,
|
|
7458
|
-
createMockExecutor,
|
|
7459
|
-
createNexusExecutorFromEnv,
|
|
7460
6804
|
createOWVoting,
|
|
7461
6805
|
createOllamaAdapter,
|
|
7462
6806
|
createOpenAIAdapter,
|
|
@@ -7464,22 +6808,16 @@ export {
|
|
|
7464
6808
|
createOrchestratorFactory,
|
|
7465
6809
|
createOutcomeFeedbackCollector,
|
|
7466
6810
|
createOutcomeStorage,
|
|
7467
|
-
createPatchApplicator,
|
|
7468
6811
|
createPolicyContext,
|
|
7469
|
-
createPrediction,
|
|
7470
6812
|
createPreferenceRouter,
|
|
7471
6813
|
createProductionWorkflowEngine,
|
|
7472
|
-
createProgressAdapter,
|
|
7473
6814
|
createPromotionOp,
|
|
7474
6815
|
createProtocolFactory,
|
|
7475
6816
|
createRateLimiter,
|
|
7476
6817
|
createRealWorkflowEngine,
|
|
7477
|
-
createReportGenerator,
|
|
7478
6818
|
createResultAggregator,
|
|
7479
|
-
createRetryPrompt,
|
|
7480
6819
|
createRoutingDecision,
|
|
7481
6820
|
createRoutingMetricsCollector,
|
|
7482
|
-
createRunner,
|
|
7483
6821
|
createSandboxExecutor,
|
|
7484
6822
|
createScmProvider,
|
|
7485
6823
|
createSecurityError,
|
|
@@ -7495,22 +6833,17 @@ export {
|
|
|
7495
6833
|
createStrategyDistiller,
|
|
7496
6834
|
createStrategyFactory,
|
|
7497
6835
|
createStream,
|
|
7498
|
-
createSummaryPrompt,
|
|
7499
6836
|
createTaskOutcome,
|
|
7500
6837
|
createTaskQueue,
|
|
7501
6838
|
createTemplateRegistry,
|
|
7502
|
-
createTestRunner,
|
|
7503
6839
|
createTestingExpert,
|
|
7504
6840
|
createTimer,
|
|
7505
6841
|
createTokenCounter,
|
|
7506
6842
|
createToolLogger,
|
|
7507
6843
|
createTrackedAgent,
|
|
7508
6844
|
createTrinityCoordinator,
|
|
7509
|
-
createValidatedExecutor,
|
|
7510
|
-
createValidatedHarness,
|
|
7511
6845
|
createValidationDashboard,
|
|
7512
6846
|
createValidator,
|
|
7513
|
-
createVariantRunner,
|
|
7514
6847
|
createVotingProtocol,
|
|
7515
6848
|
createWaveScheduler,
|
|
7516
6849
|
createWeightedVoting,
|
|
@@ -7526,7 +6859,6 @@ export {
|
|
|
7526
6859
|
detectFailurePatterns,
|
|
7527
6860
|
detectLatencyPatterns,
|
|
7528
6861
|
detectSuccessPatterns,
|
|
7529
|
-
detectTestFramework,
|
|
7530
6862
|
detectTrend,
|
|
7531
6863
|
determineFinalStatus,
|
|
7532
6864
|
emitCorroborationEvent,
|
|
@@ -7548,43 +6880,28 @@ export {
|
|
|
7548
6880
|
emitTrustEvent,
|
|
7549
6881
|
err,
|
|
7550
6882
|
estimateTokens2 as estimateBenchmarkTokens,
|
|
7551
|
-
estimateDifficulty,
|
|
7552
6883
|
estimateTaskComplexity,
|
|
7553
6884
|
estimateTokens,
|
|
7554
6885
|
evaluatePolicy2 as evaluatePipelinePolicy,
|
|
7555
6886
|
evaluatePolicy,
|
|
7556
|
-
evaluatePredictions,
|
|
7557
6887
|
evaluatePolicy3 as evaluateSecurityPolicy,
|
|
7558
6888
|
executeCliRetryLoop,
|
|
7559
6889
|
executeDelegatePipeline,
|
|
7560
6890
|
executeExpert,
|
|
7561
6891
|
executeGraph,
|
|
7562
|
-
executeHarness,
|
|
7563
|
-
executeInDocker,
|
|
7564
6892
|
executeOrchestratePipeline,
|
|
7565
6893
|
executeParallel,
|
|
7566
6894
|
executeSpec,
|
|
7567
|
-
exportReport,
|
|
7568
|
-
extractApproach,
|
|
7569
6895
|
extractBooleanField,
|
|
7570
6896
|
extractExpressions,
|
|
7571
|
-
extractFilesFromResponse,
|
|
7572
|
-
extractHypothesis,
|
|
7573
|
-
extractModelName,
|
|
7574
6897
|
extractNonErrorMessage,
|
|
7575
6898
|
extractNumberField,
|
|
7576
|
-
extractPastSuccessRates,
|
|
7577
|
-
extractPatch,
|
|
7578
|
-
extractRepoFromInstanceId,
|
|
7579
|
-
extractRepoName,
|
|
7580
6899
|
extractSessionId,
|
|
7581
6900
|
extractStateValue,
|
|
7582
6901
|
extractStringArrayField,
|
|
7583
6902
|
extractStringField,
|
|
7584
6903
|
filterAvailableModels,
|
|
7585
|
-
filterByRepo,
|
|
7586
6904
|
filterBySeverity,
|
|
7587
|
-
filterByVersion,
|
|
7588
6905
|
filterStream,
|
|
7589
6906
|
findActiveSession,
|
|
7590
6907
|
findMissingDependencies,
|
|
@@ -7594,14 +6911,10 @@ export {
|
|
|
7594
6911
|
formatBenchmarkResults,
|
|
7595
6912
|
formatComparisonResults,
|
|
7596
6913
|
formatCompileError,
|
|
7597
|
-
formatContextForPrompt,
|
|
7598
|
-
formatValidationResult,
|
|
7599
6914
|
fromArray,
|
|
7600
6915
|
generateATL,
|
|
7601
6916
|
generateBenchmarkReport,
|
|
7602
|
-
generateMcpConfig,
|
|
7603
6917
|
generateProposalId,
|
|
7604
|
-
generateReport,
|
|
7605
6918
|
generateSecurityPlan,
|
|
7606
6919
|
generateWeatherReport,
|
|
7607
6920
|
getAllTestCases,
|
|
@@ -7615,13 +6928,8 @@ export {
|
|
|
7615
6928
|
getCapabilitiesForRole,
|
|
7616
6929
|
getCategoriesByMinRiskLevel,
|
|
7617
6930
|
getCliForModelId,
|
|
7618
|
-
getCompletedInstanceIds,
|
|
7619
6931
|
getCompletedSteps,
|
|
7620
6932
|
getCorroborationRules,
|
|
7621
|
-
getCpuCores,
|
|
7622
|
-
getDatasetInfo,
|
|
7623
|
-
getDefaultAllowedTools,
|
|
7624
|
-
getDockerVersion,
|
|
7625
6933
|
getEventBusStats,
|
|
7626
6934
|
getExecutionDuration,
|
|
7627
6935
|
getExecutionOrder,
|
|
@@ -7629,27 +6937,22 @@ export {
|
|
|
7629
6937
|
getFallbackChain,
|
|
7630
6938
|
getGraphRegistry,
|
|
7631
6939
|
getGraphWorkflowList,
|
|
7632
|
-
getInstance,
|
|
7633
6940
|
getKnownNexusVarNames,
|
|
7634
|
-
getMemoryInfo,
|
|
7635
6941
|
getOutcomeStore,
|
|
7636
6942
|
getPipelineArtifactStore,
|
|
7637
6943
|
getPipelinePluginRegistry,
|
|
7638
6944
|
getPolicy,
|
|
7639
6945
|
getPolicyMode,
|
|
7640
|
-
getPythonVersion,
|
|
7641
6946
|
getRecommendedRole,
|
|
7642
6947
|
getReferencedSteps,
|
|
7643
6948
|
getRegistryManifest,
|
|
7644
6949
|
getRequiredTrustTier,
|
|
7645
|
-
getResultsFilePath,
|
|
7646
6950
|
getSafetyCategory,
|
|
7647
6951
|
getSafetyTaxonomySummary,
|
|
7648
6952
|
getSkillSetForTask,
|
|
7649
6953
|
getSkillsForTask,
|
|
7650
6954
|
getStepResult,
|
|
7651
6955
|
getSwarmObserver,
|
|
7652
|
-
getSwebenchVersion,
|
|
7653
6956
|
getTemplate,
|
|
7654
6957
|
getTestCasesByTags,
|
|
7655
6958
|
getTimeoutForTask,
|
|
@@ -7673,13 +6976,10 @@ export {
|
|
|
7673
6976
|
isOk,
|
|
7674
6977
|
isReadOnlyAction,
|
|
7675
6978
|
isRetryableError2 as isRetryableError,
|
|
7676
|
-
isCliAvailable2 as isSWEBenchCliAvailable,
|
|
7677
6979
|
isStepCompleted,
|
|
7678
6980
|
isZodError,
|
|
7679
|
-
listInstances,
|
|
7680
6981
|
listTemplateIds,
|
|
7681
6982
|
loadCheckpointState,
|
|
7682
|
-
loadDataset,
|
|
7683
6983
|
loadTemplateFile,
|
|
7684
6984
|
loadTemplatesFromDirectory,
|
|
7685
6985
|
loadWorkflowFile,
|
|
@@ -7693,9 +6993,6 @@ export {
|
|
|
7693
6993
|
map,
|
|
7694
6994
|
mapAuthorAssociation,
|
|
7695
6995
|
mapErr,
|
|
7696
|
-
mapResolutionStatus,
|
|
7697
|
-
mapStateToPhase,
|
|
7698
|
-
mapTestStatus,
|
|
7699
6996
|
mapVoteDecisionToPrDecision,
|
|
7700
6997
|
meanConfidenceInterval,
|
|
7701
6998
|
mergeStreams,
|
|
@@ -7706,20 +7003,12 @@ export {
|
|
|
7706
7003
|
parseATL,
|
|
7707
7004
|
parseAgentPairKey,
|
|
7708
7005
|
parseExpression,
|
|
7709
|
-
parseJsonResults,
|
|
7710
|
-
parseProgressLine,
|
|
7711
7006
|
parseSpec,
|
|
7712
|
-
parseStdoutResults,
|
|
7713
7007
|
parseTemplateContent,
|
|
7714
|
-
parseTestResults,
|
|
7715
7008
|
parseWorkflowJson,
|
|
7716
7009
|
parseWorkflowYaml,
|
|
7717
7010
|
proportionConfidenceInterval,
|
|
7718
|
-
quickRun,
|
|
7719
7011
|
quickSelect,
|
|
7720
|
-
readJsonResults,
|
|
7721
|
-
readPredictions,
|
|
7722
|
-
recordOutcome,
|
|
7723
7012
|
reduceStream,
|
|
7724
7013
|
registerConsensusVoteTool,
|
|
7725
7014
|
registerCorePlugins,
|
|
@@ -7774,10 +7063,7 @@ export {
|
|
|
7774
7063
|
resultToOutcome,
|
|
7775
7064
|
runAdapterLatencyBenchmark,
|
|
7776
7065
|
runAdaptiveOrchestrator,
|
|
7777
|
-
runAgentOnInstance,
|
|
7778
7066
|
runBenchmark,
|
|
7779
|
-
runBenchmarkInstances,
|
|
7780
|
-
runBenchmarkParallel,
|
|
7781
7067
|
runConsolidationBenchmark,
|
|
7782
7068
|
runDevPipeline,
|
|
7783
7069
|
runGraphPipeline,
|
|
@@ -7785,8 +7071,6 @@ export {
|
|
|
7785
7071
|
runMemoryBenchmarks,
|
|
7786
7072
|
runOperationBenchmark,
|
|
7787
7073
|
runPreconditions,
|
|
7788
|
-
runSingleInstance,
|
|
7789
|
-
runTests,
|
|
7790
7074
|
runTokenBenchmark,
|
|
7791
7075
|
runVerification,
|
|
7792
7076
|
safePathsRule,
|
|
@@ -7805,7 +7089,6 @@ export {
|
|
|
7805
7089
|
skip,
|
|
7806
7090
|
sleep,
|
|
7807
7091
|
snapshotContext,
|
|
7808
|
-
sortByPriority,
|
|
7809
7092
|
startStdioServer,
|
|
7810
7093
|
storeStepResult,
|
|
7811
7094
|
take,
|
|
@@ -7816,32 +7099,18 @@ export {
|
|
|
7816
7099
|
toolError,
|
|
7817
7100
|
toolSuccess,
|
|
7818
7101
|
toolSuccessStructured,
|
|
7819
|
-
transformHarnessOutput,
|
|
7820
|
-
transformHarnessProgress,
|
|
7821
|
-
transformInstanceResult,
|
|
7822
7102
|
transformStream,
|
|
7823
|
-
transformTestResult,
|
|
7824
|
-
translateEvaluationResult,
|
|
7825
7103
|
unwrap,
|
|
7826
7104
|
unwrapOr,
|
|
7827
|
-
updateContext,
|
|
7828
7105
|
validateAgentAction,
|
|
7829
7106
|
validateCommand,
|
|
7830
7107
|
validateCorroboration,
|
|
7831
7108
|
validateDependencyGraph,
|
|
7832
|
-
validateDiskSpace,
|
|
7833
|
-
validateDocker,
|
|
7834
|
-
validateEnvironment,
|
|
7835
7109
|
validateEvaluationCriterion,
|
|
7836
7110
|
validateExpertConfig,
|
|
7837
7111
|
validateExpressions,
|
|
7838
7112
|
validateICTM,
|
|
7839
7113
|
validateNexusEnv,
|
|
7840
|
-
validatePatch,
|
|
7841
|
-
validatePatchFormat,
|
|
7842
|
-
validatePrediction,
|
|
7843
|
-
validatePredictionsFile,
|
|
7844
|
-
validatePython,
|
|
7845
7114
|
validateRequiredInputs,
|
|
7846
7115
|
validateSafetyCategory,
|
|
7847
7116
|
validateScenario,
|
|
@@ -7849,7 +7118,6 @@ export {
|
|
|
7849
7118
|
validateSkillExecution,
|
|
7850
7119
|
validateSkillProvenance,
|
|
7851
7120
|
validateRBAC as validateSkillRBAC,
|
|
7852
|
-
validateSwebench,
|
|
7853
7121
|
validateTestCase,
|
|
7854
7122
|
validateToolInput,
|
|
7855
7123
|
validateWorkflow,
|
|
@@ -7857,7 +7125,6 @@ export {
|
|
|
7857
7125
|
withLogging,
|
|
7858
7126
|
withRetry,
|
|
7859
7127
|
withRetryWrapper,
|
|
7860
|
-
withTimeout
|
|
7861
|
-
writePredictions
|
|
7128
|
+
withTimeout
|
|
7862
7129
|
};
|
|
7863
7130
|
//# sourceMappingURL=index.js.map
|