nexus-agents 2.71.0 → 2.72.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/{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-7LHQBMBM.js → chunk-2JMUX5UA.js} +25 -12
- package/dist/{chunk-7LHQBMBM.js.map → chunk-2JMUX5UA.js.map} +1 -1
- 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-AGVLFRN7.js → chunk-3HR6UJ2E.js} +2269 -7188
- package/dist/chunk-3HR6UJ2E.js.map +1 -0
- 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-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-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-XHVDKY3X.js} +315 -31
- package/dist/chunk-XHVDKY3X.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 +358 -3357
- package/dist/index.js +70 -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-DVEBFKR2.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-DVEBFKR2.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,7 +12,6 @@ import {
|
|
|
12
12
|
AgentRoleSchema,
|
|
13
13
|
AgentRoleSchema2,
|
|
14
14
|
AgentRoleSchema3,
|
|
15
|
-
AgentRunnerError,
|
|
16
15
|
AgentStateMachine,
|
|
17
16
|
ArchitectureExpert,
|
|
18
17
|
ArtifactRefSchema,
|
|
@@ -37,7 +36,6 @@ import {
|
|
|
37
36
|
CHECKPOINT_SCHEMA_VERSION,
|
|
38
37
|
COMPLEXITY_ORDER,
|
|
39
38
|
CORE_PLUGINS,
|
|
40
|
-
CliAgentExecutor,
|
|
41
39
|
CodeChangeSchema,
|
|
42
40
|
CodeExpert,
|
|
43
41
|
CollaborationConfigSchema,
|
|
@@ -64,34 +62,27 @@ import {
|
|
|
64
62
|
DEFAULT_COMPOSER_CONFIG,
|
|
65
63
|
DEFAULT_DASHBOARD_CONFIG,
|
|
66
64
|
DEFAULT_DASHBOARD_RENDER_OPTIONS,
|
|
67
|
-
DEFAULT_EVALUATION_CONFIG,
|
|
68
65
|
DEFAULT_EXECUTION_TIME_MS,
|
|
69
66
|
DEFAULT_FEEDBACK_COLLECTOR_CONFIG,
|
|
70
67
|
DEFAULT_FEEDBACK_INTEGRATION_CONFIG,
|
|
71
68
|
DEFAULT_FOREST_CONFIG,
|
|
72
|
-
DEFAULT_HARNESS_EXECUTION_CONFIG,
|
|
73
69
|
DEFAULT_MAX_RETRIES,
|
|
74
|
-
DEFAULT_PATCH_OPTIONS,
|
|
75
70
|
DEFAULT_PATH_SCORING_OPTIONS,
|
|
76
71
|
DEFAULT_PERMISSIONS,
|
|
77
72
|
DEFAULT_POLICIES,
|
|
78
73
|
DEFAULT_RBAC,
|
|
79
|
-
DEFAULT_REPORT_CONFIG,
|
|
80
74
|
DEFAULT_RESOURCE_LIMITS,
|
|
81
75
|
DEFAULT_ROLE_MAPPINGS,
|
|
82
76
|
DEFAULT_SKILL_LIBRARY_CONFIG,
|
|
83
77
|
DEFAULT_SKILL_LOADER_CONFIG,
|
|
84
78
|
DEFAULT_STATISTICAL_OPTIONS,
|
|
85
79
|
DEFAULT_SWARM_OBSERVER_CONFIG,
|
|
86
|
-
DEFAULT_SWE_BENCH_CONFIG,
|
|
87
|
-
DEFAULT_TEST_RUNNER_CONFIG,
|
|
88
80
|
DEFAULT_TIMEOUTS,
|
|
89
81
|
DEFAULT_TRINITY_CONFIG,
|
|
90
82
|
DEFAULT_WAVE_CONFIG,
|
|
91
83
|
DEV_PIPELINE_TEMPLATE,
|
|
92
84
|
Dashboard,
|
|
93
85
|
DashboardConfigSchema,
|
|
94
|
-
DatasetLoadError,
|
|
95
86
|
DelegateInputSchema,
|
|
96
87
|
DelegateOutputSchema,
|
|
97
88
|
DependencyErrorCodeSchema,
|
|
@@ -103,8 +94,6 @@ import {
|
|
|
103
94
|
EXPERT_CAPABILITIES,
|
|
104
95
|
EXPERT_DEFAULT_CAPABILITIES,
|
|
105
96
|
EXPERT_DEFAULT_TEMPERATURES,
|
|
106
|
-
EvaluationHarness,
|
|
107
|
-
EvaluationHarnessError,
|
|
108
97
|
ExecuteExpertInputSchema,
|
|
109
98
|
ExecuteSpecInputSchema,
|
|
110
99
|
Expert,
|
|
@@ -135,9 +124,6 @@ import {
|
|
|
135
124
|
GeminiResponseParser,
|
|
136
125
|
GeneratedTestSchema,
|
|
137
126
|
GraphBuilder,
|
|
138
|
-
HarnessExecutor,
|
|
139
|
-
HarnessExecutorError,
|
|
140
|
-
HarnessVerifyAdapter,
|
|
141
127
|
ICTMConfigSchema,
|
|
142
128
|
ICTMInferenceResultSchema,
|
|
143
129
|
InMemoryAuditStorage,
|
|
@@ -150,7 +136,6 @@ import {
|
|
|
150
136
|
ListExpertsInputSchema,
|
|
151
137
|
ListWorkflowsInputSchema,
|
|
152
138
|
LoadedSkillSetSchema,
|
|
153
|
-
LockedWriter,
|
|
154
139
|
MAX_DIFF_LENGTH,
|
|
155
140
|
MAX_EXECUTION_TIME_MS,
|
|
156
141
|
MAX_STRIPPED_ELEMENTS_PER_EVENT,
|
|
@@ -160,7 +145,6 @@ import {
|
|
|
160
145
|
MemoryStatsInputSchema,
|
|
161
146
|
MemoryWriteInputSchema,
|
|
162
147
|
ModelSelectionSchema,
|
|
163
|
-
NexusAgentExecutor,
|
|
164
148
|
NodeStateSchema,
|
|
165
149
|
OrchestrateInputSchema,
|
|
166
150
|
OrchestrateOutputSchema,
|
|
@@ -176,8 +160,6 @@ import {
|
|
|
176
160
|
PROMPT_DEFINITIONS,
|
|
177
161
|
PR_REVIEW_ROLES,
|
|
178
162
|
ParallelProtocol,
|
|
179
|
-
PatchApplicator,
|
|
180
|
-
PatchApplicatorError,
|
|
181
163
|
PathScoreBreakdownSchema,
|
|
182
164
|
PathScoreSchema,
|
|
183
165
|
PipelineRunner,
|
|
@@ -187,13 +169,10 @@ import {
|
|
|
187
169
|
PolicyEngine,
|
|
188
170
|
PolicyGateSpecSchema,
|
|
189
171
|
PrReviewInputSchema,
|
|
190
|
-
PredictionWriteError,
|
|
191
|
-
PredictionWriter,
|
|
192
172
|
ProtocolFactory,
|
|
193
173
|
PruningStrategy,
|
|
194
174
|
QualitySignalsSchema,
|
|
195
175
|
QueryTraceInputSchema,
|
|
196
|
-
REPO_COMPLEXITY,
|
|
197
176
|
RESEARCH_PIPELINE_TEMPLATE,
|
|
198
177
|
ReasoningDepthSchema,
|
|
199
178
|
ReasoningNodeMetadataSchema,
|
|
@@ -204,8 +183,6 @@ import {
|
|
|
204
183
|
RegistryImportInputSchema,
|
|
205
184
|
RepoAnalyzeInputSchema,
|
|
206
185
|
RepoSecurityPlanInputSchema,
|
|
207
|
-
ReportGenerationError,
|
|
208
|
-
ReportGenerator,
|
|
209
186
|
ResearchAddInputSchema,
|
|
210
187
|
ResearchAddSourceInputSchema,
|
|
211
188
|
ResearchAnalyzeInputSchema,
|
|
@@ -223,10 +200,6 @@ import {
|
|
|
223
200
|
SKILL_PERMISSIONS,
|
|
224
201
|
STAGE_TYPES,
|
|
225
202
|
START,
|
|
226
|
-
SWEBenchRunner,
|
|
227
|
-
SWEBenchRunnerError,
|
|
228
|
-
SWE_BENCH_DATASETS,
|
|
229
|
-
SWE_BENCH_SYSTEM_PROMPT,
|
|
230
203
|
ScoreBreakdownSchema,
|
|
231
204
|
SearchCodebaseInputSchema,
|
|
232
205
|
SecurityErrorCodeSchema,
|
|
@@ -278,12 +251,9 @@ import {
|
|
|
278
251
|
TemplateMetadataSchema,
|
|
279
252
|
TemplateRegistry,
|
|
280
253
|
TerminationReasonSchema,
|
|
281
|
-
TestRunner,
|
|
282
|
-
TestRunnerError,
|
|
283
254
|
TestingExpert,
|
|
284
255
|
TextDashboardRenderer,
|
|
285
256
|
ToolSetSchema,
|
|
286
|
-
TraceLogger,
|
|
287
257
|
TreeStateSchema,
|
|
288
258
|
TreeStatisticsSchema,
|
|
289
259
|
TrinityConfigSchema,
|
|
@@ -309,23 +279,14 @@ import {
|
|
|
309
279
|
analyzeFailures,
|
|
310
280
|
analyzeTask,
|
|
311
281
|
append,
|
|
312
|
-
applyPatch,
|
|
313
282
|
areStepsCompleted,
|
|
314
283
|
buildDependencyGraph,
|
|
315
284
|
buildDependencyGraph2,
|
|
316
|
-
buildDockerArgs,
|
|
317
|
-
buildEnrichedPrompt,
|
|
318
|
-
buildHarnessArgs,
|
|
319
|
-
buildHarnessCommand,
|
|
320
285
|
buildPrReviewProposal,
|
|
321
286
|
calculateDistributionStats,
|
|
322
|
-
calculateEstimatedRemaining,
|
|
323
|
-
calculateMetrics,
|
|
324
287
|
calculateMinSampleSize,
|
|
325
288
|
calculateRegret,
|
|
326
|
-
calculateRepositoryMetrics,
|
|
327
289
|
calculateWinLoss,
|
|
328
|
-
canApplyPatch,
|
|
329
290
|
canExecuteSkill,
|
|
330
291
|
cancelExecution,
|
|
331
292
|
checkPermissionBoundary,
|
|
@@ -346,10 +307,8 @@ import {
|
|
|
346
307
|
createAttestation,
|
|
347
308
|
createAuditLogger,
|
|
348
309
|
createAuditTrail,
|
|
349
|
-
createBenchmarkMemory,
|
|
350
310
|
createCheckpoint,
|
|
351
311
|
createCheckpointStore,
|
|
352
|
-
createCliExecutor,
|
|
353
312
|
createCodeExpert,
|
|
354
313
|
createCollaborationSession,
|
|
355
314
|
createContextItem,
|
|
@@ -364,39 +323,24 @@ import {
|
|
|
364
323
|
createDevStageRegistry,
|
|
365
324
|
createDocumentationExpert,
|
|
366
325
|
createDryRunHandler,
|
|
367
|
-
createEmptyContext,
|
|
368
|
-
createEvaluationHarness,
|
|
369
326
|
createEventBusBridge,
|
|
370
327
|
createExecutionContext,
|
|
371
328
|
createExecutionPlan,
|
|
372
|
-
createExecutor,
|
|
373
|
-
createExplorationPrompt,
|
|
374
329
|
createFeedbackIntegration,
|
|
375
330
|
createGraphAuditBridge,
|
|
376
|
-
createHarnessExecutor,
|
|
377
|
-
createInitialProgress,
|
|
378
331
|
createInitializedWorkflowEngine,
|
|
379
|
-
createInstancePrompt,
|
|
380
332
|
createInteractionGraph,
|
|
381
333
|
createIsolatedRegistry,
|
|
382
334
|
createMcpLogger,
|
|
383
|
-
createMockExecutor,
|
|
384
|
-
createNexusExecutorFromEnv,
|
|
385
335
|
createOrchestrator,
|
|
386
336
|
createOrchestratorFactory,
|
|
387
337
|
createOutcomeFeedbackCollector,
|
|
388
|
-
createPatchApplicator,
|
|
389
|
-
createPrediction,
|
|
390
338
|
createProductionWorkflowEngine,
|
|
391
|
-
createProgressAdapter,
|
|
392
339
|
createProtocolFactory,
|
|
393
340
|
createRealWorkflowEngine,
|
|
394
|
-
createReportGenerator,
|
|
395
341
|
createResultAggregator,
|
|
396
|
-
createRetryPrompt,
|
|
397
342
|
createRoutingDecision,
|
|
398
343
|
createRoutingMetricsCollector,
|
|
399
|
-
createRunner,
|
|
400
344
|
createSandboxExecutor,
|
|
401
345
|
createSecurityError,
|
|
402
346
|
createSecurityExpert,
|
|
@@ -408,20 +352,15 @@ import {
|
|
|
408
352
|
createStateGuard,
|
|
409
353
|
createStateMachine,
|
|
410
354
|
createStepExecutor,
|
|
411
|
-
createSummaryPrompt,
|
|
412
355
|
createSwarmObserver,
|
|
413
356
|
createTaskOutcome,
|
|
414
357
|
createTaskQueue,
|
|
415
358
|
createTemplateRegistry,
|
|
416
|
-
createTestRunner,
|
|
417
359
|
createTestingExpert,
|
|
418
360
|
createTimer,
|
|
419
361
|
createToolLogger,
|
|
420
362
|
createTrinityCoordinator,
|
|
421
|
-
createValidatedExecutor,
|
|
422
|
-
createValidatedHarness,
|
|
423
363
|
createValidationDashboard,
|
|
424
|
-
createVariantRunner,
|
|
425
364
|
createWaveScheduler,
|
|
426
365
|
createWorkflowEngineDeps,
|
|
427
366
|
createWorkflowEngineDepsAsync,
|
|
@@ -430,7 +369,6 @@ import {
|
|
|
430
369
|
customReducer,
|
|
431
370
|
decomposeSpec,
|
|
432
371
|
delegateInputToTaskContract,
|
|
433
|
-
detectTestFramework,
|
|
434
372
|
emitCorroborationEvent,
|
|
435
373
|
emitExecutionComplete,
|
|
436
374
|
emitGraphExecutionEvent,
|
|
@@ -446,66 +384,39 @@ import {
|
|
|
446
384
|
emitStateUpdated,
|
|
447
385
|
emitStepCompleted,
|
|
448
386
|
emitTrustEvent,
|
|
449
|
-
estimateDifficulty,
|
|
450
387
|
estimateTokens,
|
|
451
388
|
evaluatePolicy as evaluatePolicy2,
|
|
452
|
-
evaluatePredictions,
|
|
453
389
|
executeDelegatePipeline,
|
|
454
390
|
executeGraph,
|
|
455
|
-
executeHarness,
|
|
456
|
-
executeInDocker,
|
|
457
391
|
executeOrchestratePipeline,
|
|
458
392
|
executeParallel,
|
|
459
393
|
executeSpec,
|
|
460
|
-
exportReport,
|
|
461
|
-
extractApproach,
|
|
462
394
|
extractExpressions,
|
|
463
|
-
extractFilesFromResponse,
|
|
464
|
-
extractHypothesis,
|
|
465
|
-
extractModelName,
|
|
466
|
-
extractPastSuccessRates,
|
|
467
|
-
extractPatch,
|
|
468
|
-
extractRepoFromInstanceId,
|
|
469
|
-
extractRepoName,
|
|
470
395
|
extractStateValue,
|
|
471
|
-
filterByRepo,
|
|
472
|
-
filterByVersion,
|
|
473
396
|
findMissingDependencies,
|
|
474
397
|
flushPipelineMemory,
|
|
475
398
|
formatCompileError,
|
|
476
|
-
formatContextForPrompt,
|
|
477
|
-
formatValidationResult,
|
|
478
|
-
generateReport,
|
|
479
399
|
getAvailableRoles,
|
|
480
400
|
getBuiltInTemplates,
|
|
481
401
|
getBuiltInTemplatesPath,
|
|
482
402
|
getBuiltInTemplatesWithMetadata,
|
|
483
403
|
getCapabilitiesForRole,
|
|
484
|
-
getCompletedInstanceIds,
|
|
485
404
|
getCompletedSteps,
|
|
486
|
-
getCpuCores,
|
|
487
|
-
getDatasetInfo,
|
|
488
|
-
getDockerVersion,
|
|
489
405
|
getEventBusStats,
|
|
490
406
|
getExecutionDuration,
|
|
491
407
|
getExecutionOrder,
|
|
492
408
|
getExpertRegistry,
|
|
493
409
|
getGraphRegistry,
|
|
494
410
|
getGraphWorkflowList,
|
|
495
|
-
getInstance,
|
|
496
|
-
getMemoryInfo,
|
|
497
411
|
getPipelinePluginRegistry,
|
|
498
412
|
getPolicy,
|
|
499
413
|
getPolicyMode,
|
|
500
|
-
getPythonVersion,
|
|
501
414
|
getRecommendedRole,
|
|
502
415
|
getReferencedSteps,
|
|
503
|
-
getResultsFilePath,
|
|
504
416
|
getSkillSetForTask,
|
|
505
417
|
getSkillsForTask,
|
|
506
418
|
getStepResult,
|
|
507
419
|
getSwarmObserver,
|
|
508
|
-
getSwebenchVersion,
|
|
509
420
|
getTemplate,
|
|
510
421
|
getTopologicalOrder,
|
|
511
422
|
getVariable,
|
|
@@ -515,40 +426,26 @@ import {
|
|
|
515
426
|
initializeBuiltInTemplates,
|
|
516
427
|
initializeEventBusBridge,
|
|
517
428
|
isCancelled,
|
|
518
|
-
isCliAvailable as isCliAvailable2,
|
|
519
429
|
isStepCompleted,
|
|
520
|
-
listInstances,
|
|
521
430
|
listTemplateIds,
|
|
522
431
|
loadCheckpointState,
|
|
523
|
-
loadDataset,
|
|
524
432
|
loadTemplateFile,
|
|
525
433
|
loadTemplatesFromDirectory,
|
|
526
434
|
loadWorkflowFile,
|
|
527
435
|
logToolError,
|
|
528
436
|
logToolStart,
|
|
529
437
|
logToolSuccess,
|
|
530
|
-
mapResolutionStatus,
|
|
531
|
-
mapStateToPhase,
|
|
532
|
-
mapTestStatus,
|
|
533
438
|
mapVoteDecisionToPrDecision,
|
|
534
439
|
meanConfidenceInterval,
|
|
535
440
|
orchestrateInputToTaskContract,
|
|
536
441
|
overwrite,
|
|
537
442
|
parseExpression,
|
|
538
|
-
parseJsonResults,
|
|
539
|
-
parseProgressLine,
|
|
540
443
|
parseSpec,
|
|
541
|
-
parseStdoutResults,
|
|
542
444
|
parseTemplateContent,
|
|
543
|
-
parseTestResults,
|
|
544
445
|
parseWorkflowJson,
|
|
545
446
|
parseWorkflowYaml,
|
|
546
447
|
proportionConfidenceInterval,
|
|
547
|
-
quickRun,
|
|
548
448
|
quickSelect,
|
|
549
|
-
readJsonResults,
|
|
550
|
-
readPredictions,
|
|
551
|
-
recordOutcome,
|
|
552
449
|
registerCorePlugins,
|
|
553
450
|
registerCreateExpertTool,
|
|
554
451
|
registerDelegateToModelTool,
|
|
@@ -592,14 +489,9 @@ import {
|
|
|
592
489
|
resolveV2Config,
|
|
593
490
|
resolveWithFallbacks,
|
|
594
491
|
runAdaptiveOrchestrator,
|
|
595
|
-
runAgentOnInstance,
|
|
596
|
-
runBenchmarkInstances,
|
|
597
|
-
runBenchmarkParallel,
|
|
598
492
|
runDevPipeline,
|
|
599
493
|
runGraphPipeline,
|
|
600
494
|
runPreconditions,
|
|
601
|
-
runSingleInstance,
|
|
602
|
-
runTests,
|
|
603
495
|
runVerification,
|
|
604
496
|
saveStageCheckpoint,
|
|
605
497
|
scoreByHybrid,
|
|
@@ -610,38 +502,21 @@ import {
|
|
|
610
502
|
setSwarmObserver,
|
|
611
503
|
setVariable,
|
|
612
504
|
snapshotContext,
|
|
613
|
-
sortByPriority,
|
|
614
505
|
storeStepResult,
|
|
615
|
-
transformHarnessOutput,
|
|
616
|
-
transformHarnessProgress,
|
|
617
|
-
transformInstanceResult,
|
|
618
|
-
transformTestResult,
|
|
619
|
-
translateEvaluationResult,
|
|
620
|
-
updateContext,
|
|
621
506
|
validateCapabilities,
|
|
622
507
|
validateCommand,
|
|
623
508
|
validateDependencyGraph,
|
|
624
|
-
validateDiskSpace,
|
|
625
|
-
validateDocker,
|
|
626
|
-
validateEnvironment,
|
|
627
509
|
validateExpressions,
|
|
628
510
|
validateICTM,
|
|
629
|
-
validatePatch,
|
|
630
|
-
validatePatchFormat,
|
|
631
|
-
validatePrediction,
|
|
632
|
-
validatePredictionsFile,
|
|
633
|
-
validatePython,
|
|
634
511
|
validateRBAC,
|
|
635
512
|
validateRequiredInputs,
|
|
636
513
|
validateScenario,
|
|
637
514
|
validateSkillExecution,
|
|
638
515
|
validateSkillProvenance,
|
|
639
|
-
validateSwebench,
|
|
640
516
|
validateWorkflow,
|
|
641
517
|
validateWorkflowDependencies,
|
|
642
|
-
withLogging
|
|
643
|
-
|
|
644
|
-
} from "./chunk-AGVLFRN7.js";
|
|
518
|
+
withLogging
|
|
519
|
+
} from "./chunk-3HR6UJ2E.js";
|
|
645
520
|
import {
|
|
646
521
|
SharedMemoryStore
|
|
647
522
|
} from "./chunk-ED6VQWNG.js";
|
|
@@ -649,16 +524,20 @@ import {
|
|
|
649
524
|
getTokenEnvVars,
|
|
650
525
|
hasToken,
|
|
651
526
|
resolveToken
|
|
652
|
-
} from "./chunk-
|
|
527
|
+
} from "./chunk-TF3GROMO.js";
|
|
653
528
|
import "./chunk-X2M7OF27.js";
|
|
529
|
+
import {
|
|
530
|
+
OPENAI_MODELS,
|
|
531
|
+
OPENAI_MODEL_ALIASES,
|
|
532
|
+
OpenAIAdapter,
|
|
533
|
+
createOpenAIAdapter
|
|
534
|
+
} from "./chunk-BVETPIOQ.js";
|
|
654
535
|
import {
|
|
655
536
|
executeExpert
|
|
656
|
-
} from "./chunk-
|
|
537
|
+
} from "./chunk-345KMHWH.js";
|
|
657
538
|
import {
|
|
658
|
-
AdapterModelError,
|
|
659
539
|
AgentFindingSchema,
|
|
660
540
|
AgentPerformanceSchema,
|
|
661
|
-
BaseAdapter,
|
|
662
541
|
CLAUDE_MODELS,
|
|
663
542
|
CLAUDE_MODEL_ALIASES,
|
|
664
543
|
ClaudeAdapter,
|
|
@@ -672,7 +551,6 @@ import {
|
|
|
672
551
|
CorrelationCoefficientSchema,
|
|
673
552
|
CorrelationTracker,
|
|
674
553
|
CorrelationTrackerStatsSchema,
|
|
675
|
-
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
676
554
|
DEFAULT_CONSENSUS_CONFIG,
|
|
677
555
|
DEFAULT_HIGHER_ORDER_CONFIG,
|
|
678
556
|
DEFAULT_VOTING_PROTOCOL_CONFIG,
|
|
@@ -698,9 +576,6 @@ import {
|
|
|
698
576
|
RejectionCategorySchema,
|
|
699
577
|
SdkAdapter,
|
|
700
578
|
SimpleMajorityStrategy,
|
|
701
|
-
StreamCancelledError,
|
|
702
|
-
StreamController,
|
|
703
|
-
StreamError,
|
|
704
579
|
SupermajorityStrategy,
|
|
705
580
|
UnanimousStrategy,
|
|
706
581
|
VOTING_THRESHOLDS,
|
|
@@ -713,14 +588,11 @@ import {
|
|
|
713
588
|
VotingStrategyFactory,
|
|
714
589
|
WeightedVoting,
|
|
715
590
|
actorFromContext,
|
|
716
|
-
bufferStream,
|
|
717
591
|
buildFinalResult,
|
|
718
592
|
buildPendingResult,
|
|
719
593
|
buildTimeoutResult,
|
|
720
594
|
calculateVoteWeight,
|
|
721
595
|
collectRealVotes,
|
|
722
|
-
collectStream,
|
|
723
|
-
concatStreams,
|
|
724
596
|
createAgentPairKey,
|
|
725
597
|
createClaudeAdapter,
|
|
726
598
|
createConsensusEngine,
|
|
@@ -732,7 +604,6 @@ import {
|
|
|
732
604
|
createOWVoting,
|
|
733
605
|
createPolicyContext,
|
|
734
606
|
createStrategyFactory,
|
|
735
|
-
createStream,
|
|
736
607
|
createValidator,
|
|
737
608
|
createVotingProtocol,
|
|
738
609
|
createWeightedVoting,
|
|
@@ -743,37 +614,49 @@ import {
|
|
|
743
614
|
evaluatePolicy,
|
|
744
615
|
extractRequestSystemPrompt,
|
|
745
616
|
extractSystemPrompt,
|
|
746
|
-
filterStream,
|
|
747
|
-
fromArray,
|
|
748
617
|
generateCacheKey,
|
|
749
618
|
generateProposalId,
|
|
750
619
|
logPolicyAudit,
|
|
751
620
|
logRateLimitAudit,
|
|
752
621
|
logToolInvocationAudit,
|
|
753
|
-
mergeStreams,
|
|
754
622
|
messagesToAnthropicFormat,
|
|
755
623
|
parseAgentPairKey,
|
|
756
|
-
reduceStream,
|
|
757
624
|
registerConsensusVoteTool,
|
|
758
|
-
requireApiKey,
|
|
759
625
|
resultToOutcome,
|
|
760
626
|
safePathsRule,
|
|
627
|
+
toolError,
|
|
628
|
+
toolSuccess,
|
|
629
|
+
toolSuccessStructured,
|
|
630
|
+
validateToolInput
|
|
631
|
+
} from "./chunk-53K3KEKT.js";
|
|
632
|
+
import {
|
|
633
|
+
AdapterModelError,
|
|
634
|
+
BaseAdapter,
|
|
635
|
+
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
636
|
+
StreamCancelledError,
|
|
637
|
+
StreamController,
|
|
638
|
+
StreamError,
|
|
639
|
+
bufferStream,
|
|
640
|
+
collectStream,
|
|
641
|
+
concatStreams,
|
|
642
|
+
createStream,
|
|
643
|
+
filterStream,
|
|
644
|
+
fromArray,
|
|
645
|
+
mergeStreams,
|
|
646
|
+
reduceStream,
|
|
647
|
+
requireApiKey,
|
|
761
648
|
skip,
|
|
762
649
|
take,
|
|
763
650
|
takeUntil,
|
|
764
651
|
tapStream,
|
|
765
|
-
toolError,
|
|
766
|
-
toolSuccess,
|
|
767
|
-
toolSuccessStructured,
|
|
768
652
|
transformStream,
|
|
769
653
|
validateApiKeyPresence,
|
|
770
|
-
validateToolInput,
|
|
771
654
|
withTimeout
|
|
772
|
-
} from "./chunk-
|
|
655
|
+
} from "./chunk-5MHIWRKB.js";
|
|
773
656
|
import {
|
|
774
657
|
PROVIDER_ENV_KEYS
|
|
775
|
-
} from "./chunk-
|
|
776
|
-
import "./chunk-
|
|
658
|
+
} from "./chunk-5WQ3SRSE.js";
|
|
659
|
+
import "./chunk-A35XORXU.js";
|
|
777
660
|
import {
|
|
778
661
|
AgentActionSchema,
|
|
779
662
|
GitHubReviewer,
|
|
@@ -806,11 +689,11 @@ import {
|
|
|
806
689
|
sanitizeInput,
|
|
807
690
|
validateAgentAction,
|
|
808
691
|
validateCorroboration
|
|
809
|
-
} from "./chunk-
|
|
692
|
+
} from "./chunk-V7ATY4BG.js";
|
|
810
693
|
import {
|
|
811
694
|
GitHubProvider,
|
|
812
695
|
ScmError
|
|
813
|
-
} from "./chunk-
|
|
696
|
+
} from "./chunk-3FIDMWFC.js";
|
|
814
697
|
import {
|
|
815
698
|
FALLBACK_SCANNER_DATA,
|
|
816
699
|
buildPlanFromAnalysis,
|
|
@@ -818,7 +701,7 @@ import {
|
|
|
818
701
|
generateSecurityPlan,
|
|
819
702
|
getRegistryManifest,
|
|
820
703
|
resolveScannerData
|
|
821
|
-
} from "./chunk-
|
|
704
|
+
} from "./chunk-L6N2S3UB.js";
|
|
822
705
|
import {
|
|
823
706
|
analyzeGitHubRepo,
|
|
824
707
|
analyzeRepo,
|
|
@@ -851,10 +734,10 @@ import {
|
|
|
851
734
|
resolveFallback,
|
|
852
735
|
startStdioServer,
|
|
853
736
|
validateNexusEnv
|
|
854
|
-
} from "./chunk-
|
|
737
|
+
} from "./chunk-XHVDKY3X.js";
|
|
855
738
|
import {
|
|
856
739
|
DEFAULTS
|
|
857
|
-
} from "./chunk-
|
|
740
|
+
} from "./chunk-2MD5MWCK.js";
|
|
858
741
|
import "./chunk-NUBSJGQZ.js";
|
|
859
742
|
import {
|
|
860
743
|
BaseCliAdapter,
|
|
@@ -884,7 +767,7 @@ import {
|
|
|
884
767
|
isCliAvailable,
|
|
885
768
|
isRetryableError,
|
|
886
769
|
sleep
|
|
887
|
-
} from "./chunk-
|
|
770
|
+
} from "./chunk-ES6GFP35.js";
|
|
888
771
|
import {
|
|
889
772
|
BUILT_IN_EXPERTS,
|
|
890
773
|
BuiltInExpertTypeSchema,
|
|
@@ -894,20 +777,16 @@ import {
|
|
|
894
777
|
safeValidateExpertConfig,
|
|
895
778
|
validateExpertConfig
|
|
896
779
|
} from "./chunk-ZM4O442V.js";
|
|
897
|
-
import "./chunk-
|
|
780
|
+
import "./chunk-2KB63QGE.js";
|
|
898
781
|
import {
|
|
899
782
|
MemoryError
|
|
900
|
-
} from "./chunk-
|
|
783
|
+
} from "./chunk-QECRZ3YA.js";
|
|
901
784
|
import "./chunk-633WH2ML.js";
|
|
902
|
-
import {
|
|
903
|
-
generateMcpConfig,
|
|
904
|
-
getDefaultAllowedTools
|
|
905
|
-
} from "./chunk-DWLATKBK.js";
|
|
906
785
|
import {
|
|
907
786
|
CliCircuitBreakerIntegration,
|
|
908
787
|
createCliCircuitBreakerIntegration
|
|
909
|
-
} from "./chunk-
|
|
910
|
-
import "./chunk-
|
|
788
|
+
} from "./chunk-QL4HCYRD.js";
|
|
789
|
+
import "./chunk-TQFRPFMG.js";
|
|
911
790
|
import {
|
|
912
791
|
AgentCapability,
|
|
913
792
|
AgentError,
|
|
@@ -980,12 +859,12 @@ import {
|
|
|
980
859
|
toError,
|
|
981
860
|
unwrap,
|
|
982
861
|
unwrapOr
|
|
983
|
-
} from "./chunk-
|
|
862
|
+
} from "./chunk-O4KUCF5S.js";
|
|
984
863
|
import {
|
|
985
864
|
ensureLearningDir,
|
|
986
865
|
getRulesFile
|
|
987
|
-
} from "./chunk-
|
|
988
|
-
import "./chunk-
|
|
866
|
+
} from "./chunk-I7ORMAO7.js";
|
|
867
|
+
import "./chunk-GOT7OAL5.js";
|
|
989
868
|
import "./chunk-UP2VWCW5.js";
|
|
990
869
|
|
|
991
870
|
// src/adapters/factory.ts
|
|
@@ -1594,495 +1473,6 @@ function withRetryWrapper(fn, options = {}) {
|
|
|
1594
1473
|
return (...args) => withRetry(() => fn(...args), options);
|
|
1595
1474
|
}
|
|
1596
1475
|
|
|
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
1476
|
// src/adapters/ollama-adapter.ts
|
|
2087
1477
|
import { Ollama } from "ollama";
|
|
2088
1478
|
var OLLAMA_MODELS = {
|
|
@@ -2100,8 +1490,8 @@ var OLLAMA_MODELS = {
|
|
|
2100
1490
|
GEMMA2: "gemma2"
|
|
2101
1491
|
};
|
|
2102
1492
|
var DEFAULT_OLLAMA_HOST = "http://localhost:11434";
|
|
2103
|
-
var
|
|
2104
|
-
function
|
|
1493
|
+
var DEFAULT_MAX_TOKENS = 2048;
|
|
1494
|
+
function mapStopReason(reason) {
|
|
2105
1495
|
if (reason === void 0 || reason === "") return "end_turn";
|
|
2106
1496
|
switch (reason) {
|
|
2107
1497
|
case "stop":
|
|
@@ -2134,7 +1524,7 @@ function mapOllamaMessageToContent(message) {
|
|
|
2134
1524
|
if (content.length === 0) content.push({ type: "text", text: "" });
|
|
2135
1525
|
return content;
|
|
2136
1526
|
}
|
|
2137
|
-
function
|
|
1527
|
+
function mapMessage(message) {
|
|
2138
1528
|
if (typeof message.content === "string") {
|
|
2139
1529
|
return { role: message.role, content: message.content };
|
|
2140
1530
|
}
|
|
@@ -2149,7 +1539,7 @@ function mapMessage2(message) {
|
|
|
2149
1539
|
}
|
|
2150
1540
|
return ollamaMessage;
|
|
2151
1541
|
}
|
|
2152
|
-
function
|
|
1542
|
+
function mapTool(tool) {
|
|
2153
1543
|
const fn = { name: tool.name, description: tool.description };
|
|
2154
1544
|
const schema = tool.inputSchema;
|
|
2155
1545
|
const hasProperties = Object.keys(schema).length > 0;
|
|
@@ -2158,7 +1548,7 @@ function mapTool2(tool) {
|
|
|
2158
1548
|
}
|
|
2159
1549
|
return { type: "function", function: fn };
|
|
2160
1550
|
}
|
|
2161
|
-
function
|
|
1551
|
+
function getModelCapabilities(modelId) {
|
|
2162
1552
|
const caps = [ModelCapability.COMPLETION, ModelCapability.STREAMING];
|
|
2163
1553
|
const lower = modelId.toLowerCase();
|
|
2164
1554
|
const toolModels = [
|
|
@@ -2182,7 +1572,7 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2182
1572
|
const baseConfig = {
|
|
2183
1573
|
providerId: "ollama",
|
|
2184
1574
|
modelId: config.modelId,
|
|
2185
|
-
capabilities:
|
|
1575
|
+
capabilities: getModelCapabilities(config.modelId),
|
|
2186
1576
|
baseUrl
|
|
2187
1577
|
};
|
|
2188
1578
|
if (config.timeout !== void 0) baseConfig.timeout = config.timeout;
|
|
@@ -2250,7 +1640,7 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2250
1640
|
controller.push({ type: "content_block_stop", index: 0 });
|
|
2251
1641
|
controller.push({
|
|
2252
1642
|
type: "message_delta",
|
|
2253
|
-
delta: { stop_reason:
|
|
1643
|
+
delta: { stop_reason: mapStopReason(chunk.done_reason) },
|
|
2254
1644
|
usage: this.calcUsage(chunk)
|
|
2255
1645
|
});
|
|
2256
1646
|
controller.push({ type: "message_stop" });
|
|
@@ -2263,7 +1653,7 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2263
1653
|
}
|
|
2264
1654
|
buildOptions(request) {
|
|
2265
1655
|
const options = {
|
|
2266
|
-
num_predict: request.maxTokens ??
|
|
1656
|
+
num_predict: request.maxTokens ?? DEFAULT_MAX_TOKENS
|
|
2267
1657
|
};
|
|
2268
1658
|
if (request.temperature !== void 0) options["temperature"] = request.temperature;
|
|
2269
1659
|
if (request.stop !== void 0 && request.stop.length > 0) options["stop"] = request.stop;
|
|
@@ -2271,13 +1661,13 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2271
1661
|
}
|
|
2272
1662
|
applyFormatAndTools(params, request) {
|
|
2273
1663
|
if (request.tools !== void 0 && request.tools.length > 0)
|
|
2274
|
-
params.tools = request.tools.map(
|
|
1664
|
+
params.tools = request.tools.map(mapTool);
|
|
2275
1665
|
if (request.responseFormat?.type === "json_object") params.format = "json";
|
|
2276
1666
|
else if (request.responseFormat?.type === "json_schema")
|
|
2277
1667
|
params.format = request.responseFormat.schema;
|
|
2278
1668
|
}
|
|
2279
1669
|
buildRequestParams(request) {
|
|
2280
|
-
const messages = request.messages.filter((m) => m.role !== "system").map(
|
|
1670
|
+
const messages = request.messages.filter((m) => m.role !== "system").map(mapMessage);
|
|
2281
1671
|
const systemPrompt = extractRequestSystemPrompt(request);
|
|
2282
1672
|
if (systemPrompt !== void 0) messages.unshift({ role: "system", content: systemPrompt });
|
|
2283
1673
|
const params = {
|
|
@@ -2292,7 +1682,7 @@ var OllamaAdapter = class extends BaseAdapter {
|
|
|
2292
1682
|
return {
|
|
2293
1683
|
content: mapOllamaMessageToContent(response.message),
|
|
2294
1684
|
usage: this.calcUsage(response),
|
|
2295
|
-
stopReason:
|
|
1685
|
+
stopReason: mapStopReason(response.done_reason),
|
|
2296
1686
|
model: response.model
|
|
2297
1687
|
};
|
|
2298
1688
|
}
|
|
@@ -2329,8 +1719,8 @@ var GEMINI_MODEL_ALIASES = {
|
|
|
2329
1719
|
"gemini-1.5-pro": GEMINI_MODELS.PRO_1_5,
|
|
2330
1720
|
"gemini-1.5-flash": GEMINI_MODELS.FLASH_1_5
|
|
2331
1721
|
};
|
|
2332
|
-
var
|
|
2333
|
-
function
|
|
1722
|
+
var DEFAULT_MAX_TOKENS2 = 8192;
|
|
1723
|
+
function mapStopReason2(finishReason) {
|
|
2334
1724
|
switch (finishReason) {
|
|
2335
1725
|
case "STOP":
|
|
2336
1726
|
return "end_turn";
|
|
@@ -2394,19 +1784,19 @@ function mapToolToFunctionDeclaration(tool) {
|
|
|
2394
1784
|
}
|
|
2395
1785
|
};
|
|
2396
1786
|
}
|
|
2397
|
-
function
|
|
1787
|
+
function resolveModelId(modelId) {
|
|
2398
1788
|
const canonical = findCanonicalModel("gemini", modelId);
|
|
2399
1789
|
if (canonical?.cliModelName !== void 0) return canonical.cliModelName;
|
|
2400
1790
|
return GEMINI_MODEL_ALIASES[modelId] ?? modelId;
|
|
2401
1791
|
}
|
|
2402
|
-
function
|
|
1792
|
+
function getModelCapabilities2(modelId) {
|
|
2403
1793
|
const capabilities = [
|
|
2404
1794
|
ModelCapability.COMPLETION,
|
|
2405
1795
|
ModelCapability.STREAMING,
|
|
2406
1796
|
ModelCapability.TOOL_USE,
|
|
2407
1797
|
ModelCapability.VISION
|
|
2408
1798
|
];
|
|
2409
|
-
const resolvedId =
|
|
1799
|
+
const resolvedId = resolveModelId(modelId);
|
|
2410
1800
|
if (resolvedId.includes("2.5") || resolvedId.includes("2.0")) {
|
|
2411
1801
|
capabilities.push(ModelCapability.EXTENDED_THINKING);
|
|
2412
1802
|
}
|
|
@@ -2424,11 +1814,11 @@ var GeminiAdapter = class extends BaseAdapter {
|
|
|
2424
1814
|
* @throws {ConfigError} If API key is missing
|
|
2425
1815
|
*/
|
|
2426
1816
|
constructor(config) {
|
|
2427
|
-
const resolvedModelId =
|
|
1817
|
+
const resolvedModelId = resolveModelId(config.modelId);
|
|
2428
1818
|
const baseConfig = {
|
|
2429
1819
|
providerId: "google",
|
|
2430
1820
|
modelId: resolvedModelId,
|
|
2431
|
-
capabilities:
|
|
1821
|
+
capabilities: getModelCapabilities2(config.modelId),
|
|
2432
1822
|
apiKey: config.apiKey
|
|
2433
1823
|
};
|
|
2434
1824
|
if (config.timeout !== void 0) {
|
|
@@ -2558,7 +1948,7 @@ var GeminiAdapter = class extends BaseAdapter {
|
|
|
2558
1948
|
*/
|
|
2559
1949
|
buildGenerationConfig(request) {
|
|
2560
1950
|
const config = {};
|
|
2561
|
-
config.maxOutputTokens = request.maxTokens ??
|
|
1951
|
+
config.maxOutputTokens = request.maxTokens ?? DEFAULT_MAX_TOKENS2;
|
|
2562
1952
|
const systemPrompt = extractRequestSystemPrompt(request);
|
|
2563
1953
|
if (systemPrompt !== void 0) config.systemInstruction = systemPrompt;
|
|
2564
1954
|
if (request.temperature !== void 0) config.temperature = request.temperature;
|
|
@@ -2633,7 +2023,7 @@ var GeminiAdapter = class extends BaseAdapter {
|
|
|
2633
2023
|
return {
|
|
2634
2024
|
content,
|
|
2635
2025
|
usage,
|
|
2636
|
-
stopReason:
|
|
2026
|
+
stopReason: mapStopReason2(candidate?.finishReason),
|
|
2637
2027
|
model: this.resolvedModelId
|
|
2638
2028
|
};
|
|
2639
2029
|
}
|
|
@@ -6694,7 +6084,7 @@ function buildVotingInput(plan, config) {
|
|
|
6694
6084
|
}
|
|
6695
6085
|
async function executeSingleVote(plan, config, log) {
|
|
6696
6086
|
try {
|
|
6697
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
6087
|
+
const { executeVoting } = await import("./consensus-vote-5V4KVHBE.js");
|
|
6698
6088
|
const input = buildVotingInput(plan, config);
|
|
6699
6089
|
const result = await executeVoting(input, log);
|
|
6700
6090
|
return parseVotingResult(result);
|
|
@@ -6823,7 +6213,6 @@ export {
|
|
|
6823
6213
|
AgentMessageSchema,
|
|
6824
6214
|
AgentPerformanceSchema,
|
|
6825
6215
|
AgentRoleSchema3 as AgentRoleSchema,
|
|
6826
|
-
AgentRunnerError,
|
|
6827
6216
|
AgentStateMachine,
|
|
6828
6217
|
StepExecutor as AgentStepExecutor,
|
|
6829
6218
|
AppConfigSchema,
|
|
@@ -6867,7 +6256,6 @@ export {
|
|
|
6867
6256
|
ClaudeAdapter,
|
|
6868
6257
|
ClaudeCliAdapter,
|
|
6869
6258
|
ClaudeResponseParser,
|
|
6870
|
-
CliAgentExecutor,
|
|
6871
6259
|
CliCircuitBreakerIntegration,
|
|
6872
6260
|
CliDetectionCache,
|
|
6873
6261
|
CliDetectionCacheConfigSchema,
|
|
@@ -6925,23 +6313,19 @@ export {
|
|
|
6925
6313
|
DEFAULT_DASHBOARD_CONFIG,
|
|
6926
6314
|
DEFAULT_DASHBOARD_RENDER_OPTIONS,
|
|
6927
6315
|
DEFAULT_DISTILLER_CONFIG,
|
|
6928
|
-
DEFAULT_EVALUATION_CONFIG,
|
|
6929
6316
|
DEFAULT_EXECUTION_TIME_MS,
|
|
6930
6317
|
DEFAULT_FEEDBACK_COLLECTOR_CONFIG,
|
|
6931
6318
|
DEFAULT_FEEDBACK_INTEGRATION_CONFIG,
|
|
6932
6319
|
DEFAULT_FOREST_CONFIG,
|
|
6933
|
-
DEFAULT_HARNESS_EXECUTION_CONFIG,
|
|
6934
6320
|
DEFAULT_HIGHER_ORDER_CONFIG,
|
|
6935
6321
|
DEFAULT_MAX_RETRIES,
|
|
6936
6322
|
DEFAULT_MEMORY_BENCHMARK_CONFIG,
|
|
6937
6323
|
DEFAULT_OUTCOME_STORAGE_CONFIG,
|
|
6938
|
-
DEFAULT_PATCH_OPTIONS,
|
|
6939
6324
|
DEFAULT_PATH_SCORING_OPTIONS,
|
|
6940
6325
|
DEFAULT_PERMISSIONS,
|
|
6941
6326
|
DEFAULT_POLICIES,
|
|
6942
6327
|
DEFAULT_PREFERENCE_ROUTER_CONFIG,
|
|
6943
6328
|
DEFAULT_RBAC,
|
|
6944
|
-
DEFAULT_REPORT_CONFIG,
|
|
6945
6329
|
DEFAULT_RESOURCE_LIMITS,
|
|
6946
6330
|
DEFAULT_RETRY_CONFIG,
|
|
6947
6331
|
DEFAULT_ROLE_MAPPINGS,
|
|
@@ -6950,8 +6334,6 @@ export {
|
|
|
6950
6334
|
DEFAULT_SKILL_LOADER_CONFIG,
|
|
6951
6335
|
DEFAULT_STATISTICAL_OPTIONS,
|
|
6952
6336
|
DEFAULT_SWARM_OBSERVER_CONFIG,
|
|
6953
|
-
DEFAULT_SWE_BENCH_CONFIG,
|
|
6954
|
-
DEFAULT_TEST_RUNNER_CONFIG,
|
|
6955
6337
|
DEFAULT_TIMEOUTS,
|
|
6956
6338
|
DEFAULT_TIMEOUT_PROFILE,
|
|
6957
6339
|
DEFAULT_TRINITY_CONFIG,
|
|
@@ -6962,7 +6344,6 @@ export {
|
|
|
6962
6344
|
DagEdgeSchema,
|
|
6963
6345
|
Dashboard,
|
|
6964
6346
|
DashboardConfigSchema,
|
|
6965
|
-
DatasetLoadError,
|
|
6966
6347
|
DelegateInputSchema,
|
|
6967
6348
|
DelegateOutputSchema,
|
|
6968
6349
|
DependencyErrorCodeSchema,
|
|
@@ -6978,8 +6359,6 @@ export {
|
|
|
6978
6359
|
EXPERT_TYPE_TO_ROLE,
|
|
6979
6360
|
ErrorCode,
|
|
6980
6361
|
EvaluationCriterionSchema,
|
|
6981
|
-
EvaluationHarness,
|
|
6982
|
-
EvaluationHarnessError,
|
|
6983
6362
|
EventBus,
|
|
6984
6363
|
ExecuteExpertInputSchema,
|
|
6985
6364
|
ExecuteSpecInputSchema,
|
|
@@ -7029,9 +6408,6 @@ export {
|
|
|
7029
6408
|
HARM_EMOTIONAL_CATEGORY,
|
|
7030
6409
|
HARM_FINANCIAL_CATEGORY,
|
|
7031
6410
|
HARM_PHYSICAL_CATEGORY,
|
|
7032
|
-
HarnessExecutor,
|
|
7033
|
-
HarnessExecutorError,
|
|
7034
|
-
HarnessVerifyAdapter,
|
|
7035
6411
|
HigherOrderVotingConfigSchema,
|
|
7036
6412
|
HigherOrderVotingResultSchema,
|
|
7037
6413
|
HigherOrderVotingStrategy,
|
|
@@ -7056,7 +6432,6 @@ export {
|
|
|
7056
6432
|
ListExpertsInputSchema,
|
|
7057
6433
|
ListWorkflowsInputSchema,
|
|
7058
6434
|
LoadedSkillSetSchema,
|
|
7059
|
-
LockedWriter,
|
|
7060
6435
|
LoggingConfigSchema,
|
|
7061
6436
|
MANIPULATION_CATEGORY,
|
|
7062
6437
|
MAX_DIFF_LENGTH,
|
|
@@ -7078,7 +6453,6 @@ export {
|
|
|
7078
6453
|
ModelTiersSchema,
|
|
7079
6454
|
NOOP_NOTIFIER,
|
|
7080
6455
|
NOOP_PROGRESS,
|
|
7081
|
-
NexusAgentExecutor,
|
|
7082
6456
|
NexusError,
|
|
7083
6457
|
NoAdapterError,
|
|
7084
6458
|
NodeStateSchema,
|
|
@@ -7114,8 +6488,6 @@ export {
|
|
|
7114
6488
|
ParallelProtocol,
|
|
7115
6489
|
ParseError,
|
|
7116
6490
|
ParsedSpecSchema,
|
|
7117
|
-
PatchApplicator,
|
|
7118
|
-
PatchApplicatorError,
|
|
7119
6491
|
PathScoreBreakdownSchema,
|
|
7120
6492
|
PathScoreSchema,
|
|
7121
6493
|
PersistentOutcomeStore,
|
|
@@ -7130,8 +6502,6 @@ export {
|
|
|
7130
6502
|
PolicyFirewall,
|
|
7131
6503
|
PolicyGateSpecSchema,
|
|
7132
6504
|
PrReviewInputSchema,
|
|
7133
|
-
PredictionWriteError,
|
|
7134
|
-
PredictionWriter,
|
|
7135
6505
|
PreferenceRouter,
|
|
7136
6506
|
PreferenceRouterConfigSchema,
|
|
7137
6507
|
ProofOfLearningStrategy,
|
|
@@ -7144,7 +6514,6 @@ export {
|
|
|
7144
6514
|
QueryFeatureExtractor,
|
|
7145
6515
|
QueryTraceInputSchema,
|
|
7146
6516
|
REJECTION_CATEGORIES,
|
|
7147
|
-
REPO_COMPLEXITY,
|
|
7148
6517
|
RESEARCH_PIPELINE_TEMPLATE,
|
|
7149
6518
|
RISK_AWARENESS_CATEGORY,
|
|
7150
6519
|
ROBUSTNESS_CATEGORY,
|
|
@@ -7160,8 +6529,6 @@ export {
|
|
|
7160
6529
|
RejectionCategorySchema,
|
|
7161
6530
|
RepoAnalyzeInputSchema,
|
|
7162
6531
|
RepoSecurityPlanInputSchema,
|
|
7163
|
-
ReportGenerationError,
|
|
7164
|
-
ReportGenerator,
|
|
7165
6532
|
ReputationCache,
|
|
7166
6533
|
ResearchAddInputSchema,
|
|
7167
6534
|
ResearchAddSourceInputSchema,
|
|
@@ -7189,10 +6556,6 @@ export {
|
|
|
7189
6556
|
SQLiteOutcomeStorage,
|
|
7190
6557
|
STAGE_TYPES,
|
|
7191
6558
|
START,
|
|
7192
|
-
SWEBenchRunner,
|
|
7193
|
-
SWEBenchRunnerError,
|
|
7194
|
-
SWE_BENCH_DATASETS,
|
|
7195
|
-
SWE_BENCH_SYSTEM_PROMPT,
|
|
7196
6559
|
SafetyCategoryId,
|
|
7197
6560
|
SafetyCategoryIdSchema,
|
|
7198
6561
|
SafetyCategorySchema,
|
|
@@ -7272,8 +6635,6 @@ export {
|
|
|
7272
6635
|
TemplateMetadataSchema,
|
|
7273
6636
|
TemplateRegistry,
|
|
7274
6637
|
TerminationReasonSchema,
|
|
7275
|
-
TestRunner,
|
|
7276
|
-
TestRunnerError,
|
|
7277
6638
|
TestingExpert,
|
|
7278
6639
|
TextDashboardRenderer,
|
|
7279
6640
|
TimeoutError,
|
|
@@ -7281,7 +6642,6 @@ export {
|
|
|
7281
6642
|
TokenCounter,
|
|
7282
6643
|
TokenCounterProvider,
|
|
7283
6644
|
ToolSetSchema,
|
|
7284
|
-
TraceLogger,
|
|
7285
6645
|
TreeStateSchema,
|
|
7286
6646
|
TreeStatisticsSchema,
|
|
7287
6647
|
TrinityConfigSchema,
|
|
@@ -7326,16 +6686,11 @@ export {
|
|
|
7326
6686
|
analyzeGitHubRepo,
|
|
7327
6687
|
analyzeRepo,
|
|
7328
6688
|
append,
|
|
7329
|
-
applyPatch,
|
|
7330
6689
|
areStepsCompleted,
|
|
7331
6690
|
assessReputation,
|
|
7332
6691
|
bufferStream,
|
|
7333
6692
|
buildDependencyGraph2 as buildDependencyGraph,
|
|
7334
|
-
buildDockerArgs,
|
|
7335
|
-
buildEnrichedPrompt,
|
|
7336
6693
|
buildFinalResult,
|
|
7337
|
-
buildHarnessArgs,
|
|
7338
|
-
buildHarnessCommand,
|
|
7339
6694
|
buildPendingResult,
|
|
7340
6695
|
buildPlanFromAnalysis,
|
|
7341
6696
|
buildPrReviewProposal,
|
|
@@ -7343,18 +6698,14 @@ export {
|
|
|
7343
6698
|
buildTimeoutResult,
|
|
7344
6699
|
calculateDelay,
|
|
7345
6700
|
calculateDistributionStats,
|
|
7346
|
-
calculateEstimatedRemaining,
|
|
7347
|
-
calculateMetrics,
|
|
7348
6701
|
calculateMetricsTotals,
|
|
7349
6702
|
calculateMinSampleSize,
|
|
7350
6703
|
calculateRegret,
|
|
7351
|
-
calculateRepositoryMetrics,
|
|
7352
6704
|
calculateRoutingDistribution,
|
|
7353
6705
|
calculateTokenCost,
|
|
7354
6706
|
calculateTokenMetrics,
|
|
7355
6707
|
calculateVoteWeight,
|
|
7356
6708
|
calculateWinLoss,
|
|
7357
|
-
canApplyPatch,
|
|
7358
6709
|
canExecuteSkill,
|
|
7359
6710
|
canInfluenceDecisions,
|
|
7360
6711
|
canPipelineProceed,
|
|
@@ -7397,7 +6748,6 @@ export {
|
|
|
7397
6748
|
createAttestation,
|
|
7398
6749
|
createAuditLogger,
|
|
7399
6750
|
createAuditTrail,
|
|
7400
|
-
createBenchmarkMemory,
|
|
7401
6751
|
createBenchmarkSummary,
|
|
7402
6752
|
createCheckpoint,
|
|
7403
6753
|
createCheckpointStore,
|
|
@@ -7405,7 +6755,6 @@ export {
|
|
|
7405
6755
|
createCliAdapter,
|
|
7406
6756
|
createCliCircuitBreakerIntegration,
|
|
7407
6757
|
createCliDetectionCache,
|
|
7408
|
-
createCliExecutor,
|
|
7409
6758
|
createCodeExpert,
|
|
7410
6759
|
createCollaborationSession,
|
|
7411
6760
|
createCompositeRouter,
|
|
@@ -7426,13 +6775,9 @@ export {
|
|
|
7426
6775
|
createDevStageRegistry,
|
|
7427
6776
|
createDocumentationExpert,
|
|
7428
6777
|
createDryRunHandler,
|
|
7429
|
-
createEmptyContext,
|
|
7430
|
-
createEvaluationHarness,
|
|
7431
6778
|
createEventBusBridge,
|
|
7432
6779
|
createExecutionContext,
|
|
7433
6780
|
createExecutionPlan,
|
|
7434
|
-
createExecutor,
|
|
7435
|
-
createExplorationPrompt,
|
|
7436
6781
|
createFeedbackIntegration,
|
|
7437
6782
|
createFeedbackSubscriber,
|
|
7438
6783
|
createFullGitHubProvider,
|
|
@@ -7440,23 +6785,18 @@ export {
|
|
|
7440
6785
|
createGitHubAdapter,
|
|
7441
6786
|
createGitHubProvider,
|
|
7442
6787
|
createGraphAuditBridge,
|
|
7443
|
-
createHarnessExecutor,
|
|
7444
6788
|
createHigherOrderVotingStrategy,
|
|
7445
6789
|
createIncompleteResult,
|
|
7446
6790
|
createInitialCostMetrics,
|
|
7447
|
-
createInitialProgress,
|
|
7448
6791
|
createInitialSessionMetrics,
|
|
7449
6792
|
createInitialTokenUsage,
|
|
7450
6793
|
createInitializedWorkflowEngine,
|
|
7451
|
-
createInstancePrompt,
|
|
7452
6794
|
createInteractionGraph,
|
|
7453
6795
|
createSwarmObserver as createInteractionSwarmObserver,
|
|
7454
6796
|
createIsolatedRegistry,
|
|
7455
6797
|
createLogger,
|
|
7456
6798
|
createMcpLogger,
|
|
7457
6799
|
createMcpNotifier,
|
|
7458
|
-
createMockExecutor,
|
|
7459
|
-
createNexusExecutorFromEnv,
|
|
7460
6800
|
createOWVoting,
|
|
7461
6801
|
createOllamaAdapter,
|
|
7462
6802
|
createOpenAIAdapter,
|
|
@@ -7464,22 +6804,16 @@ export {
|
|
|
7464
6804
|
createOrchestratorFactory,
|
|
7465
6805
|
createOutcomeFeedbackCollector,
|
|
7466
6806
|
createOutcomeStorage,
|
|
7467
|
-
createPatchApplicator,
|
|
7468
6807
|
createPolicyContext,
|
|
7469
|
-
createPrediction,
|
|
7470
6808
|
createPreferenceRouter,
|
|
7471
6809
|
createProductionWorkflowEngine,
|
|
7472
|
-
createProgressAdapter,
|
|
7473
6810
|
createPromotionOp,
|
|
7474
6811
|
createProtocolFactory,
|
|
7475
6812
|
createRateLimiter,
|
|
7476
6813
|
createRealWorkflowEngine,
|
|
7477
|
-
createReportGenerator,
|
|
7478
6814
|
createResultAggregator,
|
|
7479
|
-
createRetryPrompt,
|
|
7480
6815
|
createRoutingDecision,
|
|
7481
6816
|
createRoutingMetricsCollector,
|
|
7482
|
-
createRunner,
|
|
7483
6817
|
createSandboxExecutor,
|
|
7484
6818
|
createScmProvider,
|
|
7485
6819
|
createSecurityError,
|
|
@@ -7495,22 +6829,17 @@ export {
|
|
|
7495
6829
|
createStrategyDistiller,
|
|
7496
6830
|
createStrategyFactory,
|
|
7497
6831
|
createStream,
|
|
7498
|
-
createSummaryPrompt,
|
|
7499
6832
|
createTaskOutcome,
|
|
7500
6833
|
createTaskQueue,
|
|
7501
6834
|
createTemplateRegistry,
|
|
7502
|
-
createTestRunner,
|
|
7503
6835
|
createTestingExpert,
|
|
7504
6836
|
createTimer,
|
|
7505
6837
|
createTokenCounter,
|
|
7506
6838
|
createToolLogger,
|
|
7507
6839
|
createTrackedAgent,
|
|
7508
6840
|
createTrinityCoordinator,
|
|
7509
|
-
createValidatedExecutor,
|
|
7510
|
-
createValidatedHarness,
|
|
7511
6841
|
createValidationDashboard,
|
|
7512
6842
|
createValidator,
|
|
7513
|
-
createVariantRunner,
|
|
7514
6843
|
createVotingProtocol,
|
|
7515
6844
|
createWaveScheduler,
|
|
7516
6845
|
createWeightedVoting,
|
|
@@ -7526,7 +6855,6 @@ export {
|
|
|
7526
6855
|
detectFailurePatterns,
|
|
7527
6856
|
detectLatencyPatterns,
|
|
7528
6857
|
detectSuccessPatterns,
|
|
7529
|
-
detectTestFramework,
|
|
7530
6858
|
detectTrend,
|
|
7531
6859
|
determineFinalStatus,
|
|
7532
6860
|
emitCorroborationEvent,
|
|
@@ -7548,43 +6876,28 @@ export {
|
|
|
7548
6876
|
emitTrustEvent,
|
|
7549
6877
|
err,
|
|
7550
6878
|
estimateTokens2 as estimateBenchmarkTokens,
|
|
7551
|
-
estimateDifficulty,
|
|
7552
6879
|
estimateTaskComplexity,
|
|
7553
6880
|
estimateTokens,
|
|
7554
6881
|
evaluatePolicy2 as evaluatePipelinePolicy,
|
|
7555
6882
|
evaluatePolicy,
|
|
7556
|
-
evaluatePredictions,
|
|
7557
6883
|
evaluatePolicy3 as evaluateSecurityPolicy,
|
|
7558
6884
|
executeCliRetryLoop,
|
|
7559
6885
|
executeDelegatePipeline,
|
|
7560
6886
|
executeExpert,
|
|
7561
6887
|
executeGraph,
|
|
7562
|
-
executeHarness,
|
|
7563
|
-
executeInDocker,
|
|
7564
6888
|
executeOrchestratePipeline,
|
|
7565
6889
|
executeParallel,
|
|
7566
6890
|
executeSpec,
|
|
7567
|
-
exportReport,
|
|
7568
|
-
extractApproach,
|
|
7569
6891
|
extractBooleanField,
|
|
7570
6892
|
extractExpressions,
|
|
7571
|
-
extractFilesFromResponse,
|
|
7572
|
-
extractHypothesis,
|
|
7573
|
-
extractModelName,
|
|
7574
6893
|
extractNonErrorMessage,
|
|
7575
6894
|
extractNumberField,
|
|
7576
|
-
extractPastSuccessRates,
|
|
7577
|
-
extractPatch,
|
|
7578
|
-
extractRepoFromInstanceId,
|
|
7579
|
-
extractRepoName,
|
|
7580
6895
|
extractSessionId,
|
|
7581
6896
|
extractStateValue,
|
|
7582
6897
|
extractStringArrayField,
|
|
7583
6898
|
extractStringField,
|
|
7584
6899
|
filterAvailableModels,
|
|
7585
|
-
filterByRepo,
|
|
7586
6900
|
filterBySeverity,
|
|
7587
|
-
filterByVersion,
|
|
7588
6901
|
filterStream,
|
|
7589
6902
|
findActiveSession,
|
|
7590
6903
|
findMissingDependencies,
|
|
@@ -7594,14 +6907,10 @@ export {
|
|
|
7594
6907
|
formatBenchmarkResults,
|
|
7595
6908
|
formatComparisonResults,
|
|
7596
6909
|
formatCompileError,
|
|
7597
|
-
formatContextForPrompt,
|
|
7598
|
-
formatValidationResult,
|
|
7599
6910
|
fromArray,
|
|
7600
6911
|
generateATL,
|
|
7601
6912
|
generateBenchmarkReport,
|
|
7602
|
-
generateMcpConfig,
|
|
7603
6913
|
generateProposalId,
|
|
7604
|
-
generateReport,
|
|
7605
6914
|
generateSecurityPlan,
|
|
7606
6915
|
generateWeatherReport,
|
|
7607
6916
|
getAllTestCases,
|
|
@@ -7615,13 +6924,8 @@ export {
|
|
|
7615
6924
|
getCapabilitiesForRole,
|
|
7616
6925
|
getCategoriesByMinRiskLevel,
|
|
7617
6926
|
getCliForModelId,
|
|
7618
|
-
getCompletedInstanceIds,
|
|
7619
6927
|
getCompletedSteps,
|
|
7620
6928
|
getCorroborationRules,
|
|
7621
|
-
getCpuCores,
|
|
7622
|
-
getDatasetInfo,
|
|
7623
|
-
getDefaultAllowedTools,
|
|
7624
|
-
getDockerVersion,
|
|
7625
6929
|
getEventBusStats,
|
|
7626
6930
|
getExecutionDuration,
|
|
7627
6931
|
getExecutionOrder,
|
|
@@ -7629,27 +6933,22 @@ export {
|
|
|
7629
6933
|
getFallbackChain,
|
|
7630
6934
|
getGraphRegistry,
|
|
7631
6935
|
getGraphWorkflowList,
|
|
7632
|
-
getInstance,
|
|
7633
6936
|
getKnownNexusVarNames,
|
|
7634
|
-
getMemoryInfo,
|
|
7635
6937
|
getOutcomeStore,
|
|
7636
6938
|
getPipelineArtifactStore,
|
|
7637
6939
|
getPipelinePluginRegistry,
|
|
7638
6940
|
getPolicy,
|
|
7639
6941
|
getPolicyMode,
|
|
7640
|
-
getPythonVersion,
|
|
7641
6942
|
getRecommendedRole,
|
|
7642
6943
|
getReferencedSteps,
|
|
7643
6944
|
getRegistryManifest,
|
|
7644
6945
|
getRequiredTrustTier,
|
|
7645
|
-
getResultsFilePath,
|
|
7646
6946
|
getSafetyCategory,
|
|
7647
6947
|
getSafetyTaxonomySummary,
|
|
7648
6948
|
getSkillSetForTask,
|
|
7649
6949
|
getSkillsForTask,
|
|
7650
6950
|
getStepResult,
|
|
7651
6951
|
getSwarmObserver,
|
|
7652
|
-
getSwebenchVersion,
|
|
7653
6952
|
getTemplate,
|
|
7654
6953
|
getTestCasesByTags,
|
|
7655
6954
|
getTimeoutForTask,
|
|
@@ -7673,13 +6972,10 @@ export {
|
|
|
7673
6972
|
isOk,
|
|
7674
6973
|
isReadOnlyAction,
|
|
7675
6974
|
isRetryableError2 as isRetryableError,
|
|
7676
|
-
isCliAvailable2 as isSWEBenchCliAvailable,
|
|
7677
6975
|
isStepCompleted,
|
|
7678
6976
|
isZodError,
|
|
7679
|
-
listInstances,
|
|
7680
6977
|
listTemplateIds,
|
|
7681
6978
|
loadCheckpointState,
|
|
7682
|
-
loadDataset,
|
|
7683
6979
|
loadTemplateFile,
|
|
7684
6980
|
loadTemplatesFromDirectory,
|
|
7685
6981
|
loadWorkflowFile,
|
|
@@ -7693,9 +6989,6 @@ export {
|
|
|
7693
6989
|
map,
|
|
7694
6990
|
mapAuthorAssociation,
|
|
7695
6991
|
mapErr,
|
|
7696
|
-
mapResolutionStatus,
|
|
7697
|
-
mapStateToPhase,
|
|
7698
|
-
mapTestStatus,
|
|
7699
6992
|
mapVoteDecisionToPrDecision,
|
|
7700
6993
|
meanConfidenceInterval,
|
|
7701
6994
|
mergeStreams,
|
|
@@ -7706,20 +6999,12 @@ export {
|
|
|
7706
6999
|
parseATL,
|
|
7707
7000
|
parseAgentPairKey,
|
|
7708
7001
|
parseExpression,
|
|
7709
|
-
parseJsonResults,
|
|
7710
|
-
parseProgressLine,
|
|
7711
7002
|
parseSpec,
|
|
7712
|
-
parseStdoutResults,
|
|
7713
7003
|
parseTemplateContent,
|
|
7714
|
-
parseTestResults,
|
|
7715
7004
|
parseWorkflowJson,
|
|
7716
7005
|
parseWorkflowYaml,
|
|
7717
7006
|
proportionConfidenceInterval,
|
|
7718
|
-
quickRun,
|
|
7719
7007
|
quickSelect,
|
|
7720
|
-
readJsonResults,
|
|
7721
|
-
readPredictions,
|
|
7722
|
-
recordOutcome,
|
|
7723
7008
|
reduceStream,
|
|
7724
7009
|
registerConsensusVoteTool,
|
|
7725
7010
|
registerCorePlugins,
|
|
@@ -7774,10 +7059,7 @@ export {
|
|
|
7774
7059
|
resultToOutcome,
|
|
7775
7060
|
runAdapterLatencyBenchmark,
|
|
7776
7061
|
runAdaptiveOrchestrator,
|
|
7777
|
-
runAgentOnInstance,
|
|
7778
7062
|
runBenchmark,
|
|
7779
|
-
runBenchmarkInstances,
|
|
7780
|
-
runBenchmarkParallel,
|
|
7781
7063
|
runConsolidationBenchmark,
|
|
7782
7064
|
runDevPipeline,
|
|
7783
7065
|
runGraphPipeline,
|
|
@@ -7785,8 +7067,6 @@ export {
|
|
|
7785
7067
|
runMemoryBenchmarks,
|
|
7786
7068
|
runOperationBenchmark,
|
|
7787
7069
|
runPreconditions,
|
|
7788
|
-
runSingleInstance,
|
|
7789
|
-
runTests,
|
|
7790
7070
|
runTokenBenchmark,
|
|
7791
7071
|
runVerification,
|
|
7792
7072
|
safePathsRule,
|
|
@@ -7805,7 +7085,6 @@ export {
|
|
|
7805
7085
|
skip,
|
|
7806
7086
|
sleep,
|
|
7807
7087
|
snapshotContext,
|
|
7808
|
-
sortByPriority,
|
|
7809
7088
|
startStdioServer,
|
|
7810
7089
|
storeStepResult,
|
|
7811
7090
|
take,
|
|
@@ -7816,32 +7095,18 @@ export {
|
|
|
7816
7095
|
toolError,
|
|
7817
7096
|
toolSuccess,
|
|
7818
7097
|
toolSuccessStructured,
|
|
7819
|
-
transformHarnessOutput,
|
|
7820
|
-
transformHarnessProgress,
|
|
7821
|
-
transformInstanceResult,
|
|
7822
7098
|
transformStream,
|
|
7823
|
-
transformTestResult,
|
|
7824
|
-
translateEvaluationResult,
|
|
7825
7099
|
unwrap,
|
|
7826
7100
|
unwrapOr,
|
|
7827
|
-
updateContext,
|
|
7828
7101
|
validateAgentAction,
|
|
7829
7102
|
validateCommand,
|
|
7830
7103
|
validateCorroboration,
|
|
7831
7104
|
validateDependencyGraph,
|
|
7832
|
-
validateDiskSpace,
|
|
7833
|
-
validateDocker,
|
|
7834
|
-
validateEnvironment,
|
|
7835
7105
|
validateEvaluationCriterion,
|
|
7836
7106
|
validateExpertConfig,
|
|
7837
7107
|
validateExpressions,
|
|
7838
7108
|
validateICTM,
|
|
7839
7109
|
validateNexusEnv,
|
|
7840
|
-
validatePatch,
|
|
7841
|
-
validatePatchFormat,
|
|
7842
|
-
validatePrediction,
|
|
7843
|
-
validatePredictionsFile,
|
|
7844
|
-
validatePython,
|
|
7845
7110
|
validateRequiredInputs,
|
|
7846
7111
|
validateSafetyCategory,
|
|
7847
7112
|
validateScenario,
|
|
@@ -7849,7 +7114,6 @@ export {
|
|
|
7849
7114
|
validateSkillExecution,
|
|
7850
7115
|
validateSkillProvenance,
|
|
7851
7116
|
validateRBAC as validateSkillRBAC,
|
|
7852
|
-
validateSwebench,
|
|
7853
7117
|
validateTestCase,
|
|
7854
7118
|
validateToolInput,
|
|
7855
7119
|
validateWorkflow,
|
|
@@ -7857,7 +7121,6 @@ export {
|
|
|
7857
7121
|
withLogging,
|
|
7858
7122
|
withRetry,
|
|
7859
7123
|
withRetryWrapper,
|
|
7860
|
-
withTimeout
|
|
7861
|
-
writePredictions
|
|
7124
|
+
withTimeout
|
|
7862
7125
|
};
|
|
7863
7126
|
//# sourceMappingURL=index.js.map
|