agent-nuvira 3.0.1 → 3.1.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/README.md +67 -0
- package/dist/agents/agents/context-gatherer.d.ts +5 -3
- package/dist/agents/agents/context-gatherer.d.ts.map +1 -1
- package/dist/agents/agents/context-gatherer.js +10 -9
- package/dist/agents/agents/context-gatherer.js.map +1 -1
- package/dist/agents/agents/reasoner.d.ts +2 -1
- package/dist/agents/agents/reasoner.d.ts.map +1 -1
- package/dist/agents/agents/reasoner.js +2 -1
- package/dist/agents/agents/reasoner.js.map +1 -1
- package/dist/agents/agents/reviewer-tool-calling.d.ts +3 -3
- package/dist/agents/agents/reviewer-tool-calling.js +3 -3
- package/dist/agents/agents/writer-tool-calling.d.ts +3 -3
- package/dist/agents/agents/writer-tool-calling.js +3 -3
- package/dist/agents/agents/writer.js +5 -5
- package/dist/agents/agents/writer.js.map +1 -1
- package/dist/agents/answer-quality-gate.d.ts +64 -0
- package/dist/agents/answer-quality-gate.d.ts.map +1 -0
- package/dist/agents/answer-quality-gate.js +94 -0
- package/dist/agents/answer-quality-gate.js.map +1 -0
- package/dist/agents/orchestrator.d.ts +6 -6
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/orchestrator.js +48 -24
- package/dist/agents/orchestrator.js.map +1 -1
- package/dist/agents/prompt-assembly.d.ts +3 -3
- package/dist/agents/prompt-assembly.js +3 -3
- package/dist/agents/tool-calling-agent.d.ts +3 -3
- package/dist/agents/tool-calling-agent.js +3 -3
- package/dist/cli/chat.d.ts +27 -9
- package/dist/cli/chat.d.ts.map +1 -1
- package/dist/cli/chat.js +171 -38
- package/dist/cli/chat.js.map +1 -1
- package/dist/cli/config.d.ts +25 -0
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +158 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/execute.d.ts.map +1 -1
- package/dist/cli/execute.js +59 -9
- package/dist/cli/execute.js.map +1 -1
- package/dist/cli/gateway.d.ts +7 -0
- package/dist/cli/gateway.d.ts.map +1 -1
- package/dist/cli/gateway.js +45 -0
- package/dist/cli/gateway.js.map +1 -1
- package/dist/cli/loop-executor.d.ts.map +1 -1
- package/dist/cli/loop-executor.js +87 -27
- package/dist/cli/loop-executor.js.map +1 -1
- package/dist/cli/models.d.ts.map +1 -1
- package/dist/cli/models.js +63 -0
- package/dist/cli/models.js.map +1 -1
- package/dist/config/manager.d.ts.map +1 -1
- package/dist/config/manager.js +17 -3
- package/dist/config/manager.js.map +1 -1
- package/dist/config/types.d.ts +25 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/gateway/adapters.d.ts +24 -0
- package/dist/gateway/adapters.d.ts.map +1 -1
- package/dist/gateway/adapters.js +19 -0
- package/dist/gateway/adapters.js.map +1 -1
- package/dist/gateway/channel-directory.d.ts +24 -0
- package/dist/gateway/channel-directory.d.ts.map +1 -1
- package/dist/gateway/channel-directory.js.map +1 -1
- package/dist/gateway/delivery.d.ts +7 -1
- package/dist/gateway/delivery.d.ts.map +1 -1
- package/dist/gateway/delivery.js +7 -1
- package/dist/gateway/delivery.js.map +1 -1
- package/dist/gateway/gateway-log.d.ts +74 -0
- package/dist/gateway/gateway-log.d.ts.map +1 -0
- package/dist/gateway/gateway-log.js +167 -0
- package/dist/gateway/gateway-log.js.map +1 -0
- package/dist/gateway/inbox.d.ts +8 -1
- package/dist/gateway/inbox.d.ts.map +1 -1
- package/dist/gateway/inbox.js.map +1 -1
- package/dist/gateway/registry.d.ts +170 -1
- package/dist/gateway/registry.d.ts.map +1 -1
- package/dist/gateway/registry.js +578 -35
- package/dist/gateway/registry.js.map +1 -1
- package/dist/gateway/whatsapp/baileys-bridge.d.ts +98 -1
- package/dist/gateway/whatsapp/baileys-bridge.d.ts.map +1 -1
- package/dist/gateway/whatsapp/baileys-bridge.js +264 -63
- package/dist/gateway/whatsapp/baileys-bridge.js.map +1 -1
- package/dist/gateway/whatsapp/bridge.d.ts +32 -0
- package/dist/gateway/whatsapp/bridge.d.ts.map +1 -1
- package/dist/gateway/whatsapp/bridge.js.map +1 -1
- package/dist/inference/tool-call-utils.d.ts +146 -0
- package/dist/inference/tool-call-utils.d.ts.map +1 -1
- package/dist/inference/tool-call-utils.js +381 -3
- package/dist/inference/tool-call-utils.js.map +1 -1
- package/dist/learning/auto-router.d.ts +65 -1
- package/dist/learning/auto-router.d.ts.map +1 -1
- package/dist/learning/auto-router.js +156 -1
- package/dist/learning/auto-router.js.map +1 -1
- package/dist/learning/hub-skill-catalog.d.ts.map +1 -1
- package/dist/learning/hub-skill-catalog.js +10 -3
- package/dist/learning/hub-skill-catalog.js.map +1 -1
- package/dist/learning/reasoning-trace.d.ts +49 -2
- package/dist/learning/reasoning-trace.d.ts.map +1 -1
- package/dist/learning/reasoning-trace.js +22 -1
- package/dist/learning/reasoning-trace.js.map +1 -1
- package/dist/learning/resilient-call.d.ts +116 -0
- package/dist/learning/resilient-call.d.ts.map +1 -1
- package/dist/learning/resilient-call.js +400 -15
- package/dist/learning/resilient-call.js.map +1 -1
- package/dist/nlu/conversation-gate.d.ts.map +1 -1
- package/dist/nlu/conversation-gate.js +23 -2
- package/dist/nlu/conversation-gate.js.map +1 -1
- package/dist/nlu/intent.d.ts +35 -0
- package/dist/nlu/intent.d.ts.map +1 -1
- package/dist/nlu/intent.js +192 -3
- package/dist/nlu/intent.js.map +1 -1
- package/dist/nlu/schema.d.ts +2 -2
- package/dist/tools/ask-user.d.ts.map +1 -1
- package/dist/tools/ask-user.js +19 -3
- package/dist/tools/ask-user.js.map +1 -1
- package/dist/tools/coding-tools.d.ts +61 -8
- package/dist/tools/coding-tools.d.ts.map +1 -1
- package/dist/tools/coding-tools.js +308 -53
- package/dist/tools/coding-tools.js.map +1 -1
- package/dist/tools/gateway-send.d.ts.map +1 -1
- package/dist/tools/gateway-send.js +81 -4
- package/dist/tools/gateway-send.js.map +1 -1
- package/dist/tools/git-digest.d.ts +25 -0
- package/dist/tools/git-digest.d.ts.map +1 -0
- package/dist/tools/git-digest.js +68 -0
- package/dist/tools/git-digest.js.map +1 -0
- package/dist/tools/loop-project-context.d.ts +3 -3
- package/dist/tools/loop-project-context.d.ts.map +1 -1
- package/dist/tools/loop-project-context.js +9 -42
- package/dist/tools/loop-project-context.js.map +1 -1
- package/dist/tools/loop-skill-hint.d.ts +44 -7
- package/dist/tools/loop-skill-hint.d.ts.map +1 -1
- package/dist/tools/loop-skill-hint.js +117 -26
- package/dist/tools/loop-skill-hint.js.map +1 -1
- package/dist/tools/registry.d.ts +14 -0
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +29 -9
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/tool-loop.d.ts +79 -4
- package/dist/tools/tool-loop.d.ts.map +1 -1
- package/dist/tools/tool-loop.js +233 -6
- package/dist/tools/tool-loop.js.map +1 -1
- package/dist/tools/toolsets.js +2 -2
- package/dist/tools/toolsets.js.map +1 -1
- package/dist/tools/unified-diff.d.ts +39 -0
- package/dist/tools/unified-diff.d.ts.map +1 -0
- package/dist/tools/unified-diff.js +182 -0
- package/dist/tools/unified-diff.js.map +1 -0
- package/dist/web-dashboard/chat-console.d.ts +18 -0
- package/dist/web-dashboard/chat-console.d.ts.map +1 -1
- package/dist/web-dashboard/chat-console.js +36 -6
- package/dist/web-dashboard/chat-console.js.map +1 -1
- package/dist/web-dashboard/project-context.d.ts +7 -0
- package/dist/web-dashboard/project-context.d.ts.map +1 -1
- package/dist/web-dashboard/project-context.js +3 -0
- package/dist/web-dashboard/project-context.js.map +1 -1
- package/dist/web-dashboard/server.d.ts +13 -0
- package/dist/web-dashboard/server.d.ts.map +1 -1
- package/dist/web-dashboard/server.js +29 -2
- package/dist/web-dashboard/server.js.map +1 -1
- package/dist/web-dashboard/src/types.d.ts +24 -1
- package/dist/web-dashboard/src/types.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/web-dashboard/public/assets/index-CQW0qv1r.js +207 -0
- package/src/web-dashboard/public/assets/index-CQW0qv1r.js.map +1 -0
- package/src/web-dashboard/public/index.html +1 -1
- package/dist/app.js +0 -26
- package/dist/auth-api.d.ts +0 -2
- package/dist/auth-api.d.ts.map +0 -1
- package/dist/auth-api.js +0 -61
- package/dist/auth-api.js.map +0 -1
- package/dist/auth.test.d.ts +0 -1
- package/dist/auth.test.d.ts.map +0 -1
- package/dist/auth.test.js +0 -3
- package/dist/auth.test.js.map +0 -1
- package/dist/config/auth.js +0 -18
- package/dist/config/jwt.js +0 -24
- package/dist/config/keys.js +0 -14
- package/dist/file.d.ts +0 -1
- package/dist/file.d.ts.map +0 -1
- package/dist/file.js +0 -2
- package/dist/file.js.map +0 -1
- package/dist/middleware/auth.js +0 -30
- package/dist/passport.js +0 -34
- package/dist/routes/auth.d.ts +0 -3
- package/dist/routes/auth.d.ts.map +0 -1
- package/dist/routes/auth.js +0 -47
- package/dist/routes/auth.js.map +0 -1
- package/dist/routes/user.js +0 -31
- package/dist/server.js +0 -17
- package/dist/web-dashboard/src/App.js +0 -85
- package/dist/web-dashboard/src/admin-auth.test.js +0 -186
- package/dist/web-dashboard/src/ansi.js +0 -23
- package/dist/web-dashboard/src/ansi.test.js +0 -31
- package/dist/web-dashboard/src/api-admin-auth.test.js +0 -172
- package/dist/web-dashboard/src/api-admin.test.js +0 -65
- package/dist/web-dashboard/src/api-hub.test.js +0 -117
- package/dist/web-dashboard/src/api.js +0 -1421
- package/dist/web-dashboard/src/api.test.js +0 -51
- package/dist/web-dashboard/src/artifacts.js +0 -128
- package/dist/web-dashboard/src/artifacts.test.js +0 -139
- package/dist/web-dashboard/src/components/AdminPanel.js +0 -567
- package/dist/web-dashboard/src/components/AdminPanel.test.js +0 -288
- package/dist/web-dashboard/src/components/AgentHub.js +0 -1580
- package/dist/web-dashboard/src/components/AgentHub.test.js +0 -343
- package/dist/web-dashboard/src/components/BedrockOnboarding.js +0 -320
- package/dist/web-dashboard/src/components/BenchmarkCharts.js +0 -228
- package/dist/web-dashboard/src/components/ChatPage.js +0 -1586
- package/dist/web-dashboard/src/components/ChatPage.test.js +0 -899
- package/dist/web-dashboard/src/components/ContactsPage.js +0 -141
- package/dist/web-dashboard/src/components/CostDashboard.js +0 -105
- package/dist/web-dashboard/src/components/DAGView.js +0 -477
- package/dist/web-dashboard/src/components/DAGView.test.js +0 -147
- package/dist/web-dashboard/src/components/EnvVarEditor.js +0 -138
- package/dist/web-dashboard/src/components/EvalsPage.js +0 -73
- package/dist/web-dashboard/src/components/EvalsPage.test.js +0 -120
- package/dist/web-dashboard/src/components/ExecutionHistory.js +0 -201
- package/dist/web-dashboard/src/components/GatewayPage.js +0 -40
- package/dist/web-dashboard/src/components/GatewayPage.test.js +0 -74
- package/dist/web-dashboard/src/components/HealthPanel.js +0 -68
- package/dist/web-dashboard/src/components/HistoryBrowser.js +0 -34
- package/dist/web-dashboard/src/components/Layout.js +0 -50
- package/dist/web-dashboard/src/components/Markdown.js +0 -152
- package/dist/web-dashboard/src/components/Markdown.test.js +0 -126
- package/dist/web-dashboard/src/components/MarkdownZeroDep.js +0 -237
- package/dist/web-dashboard/src/components/MemoryPanel.js +0 -81
- package/dist/web-dashboard/src/components/ModelTimeline.js +0 -298
- package/dist/web-dashboard/src/components/ModelsPanel.js +0 -1484
- package/dist/web-dashboard/src/components/ModelsPanel.test.js +0 -460
- package/dist/web-dashboard/src/components/Overview.js +0 -123
- package/dist/web-dashboard/src/components/PhaseTimeline.js +0 -359
- package/dist/web-dashboard/src/components/PhaseTimeline.test.js +0 -234
- package/dist/web-dashboard/src/components/PlatformConfigSection.js +0 -384
- package/dist/web-dashboard/src/components/PlatformConfigSection.test.js +0 -106
- package/dist/web-dashboard/src/components/PlatformsPage.js +0 -250
- package/dist/web-dashboard/src/components/QuotaPanel.js +0 -159
- package/dist/web-dashboard/src/components/QuotaPanel.test.js +0 -85
- package/dist/web-dashboard/src/components/RequestsPanel.js +0 -229
- package/dist/web-dashboard/src/components/RequestsPanel.test.js +0 -103
- package/dist/web-dashboard/src/components/RoutingInsightsPanel.js +0 -938
- package/dist/web-dashboard/src/components/RoutingInsightsPanel.test.js +0 -339
- package/dist/web-dashboard/src/components/RoutingWalkthrough.js +0 -408
- package/dist/web-dashboard/src/components/RoutingWalkthrough.test.js +0 -209
- package/dist/web-dashboard/src/components/TaskConsole.js +0 -119
- package/dist/web-dashboard/src/components/TaskConsole.test.js +0 -123
- package/dist/web-dashboard/src/components/TasksPage.js +0 -256
- package/dist/web-dashboard/src/components/TasksPage.test.js +0 -103
- package/dist/web-dashboard/src/components/TracePanel.js +0 -306
- package/dist/web-dashboard/src/components/WhatsAppPanel.js +0 -195
- package/dist/web-dashboard/src/components/WhatsAppPanel.test.js +0 -122
- package/dist/web-dashboard/src/jsonOrNull.js +0 -37
- package/dist/web-dashboard/src/main.js +0 -15
- package/dist/web-dashboard/src/mask.js +0 -11
- package/dist/web-dashboard/vite.config.js +0 -23
- package/dist/web-dashboard/vitest.config.js +0 -15
- package/src/web-dashboard/public/assets/index-56yPnN_m.js +0 -207
- package/src/web-dashboard/public/assets/index-56yPnN_m.js.map +0 -1
|
@@ -44,7 +44,7 @@ export interface OrchestratorOptions {
|
|
|
44
44
|
* Use tool-calling agents for writer and reviewer steps.
|
|
45
45
|
* When true, the orchestrator routes 'writer' tasks to 'writer-tc' and
|
|
46
46
|
* 'reviewer' tasks to 'reviewer-tc' — iterative read→edit→verify loops
|
|
47
|
-
* instead of one-shot LLM calls.
|
|
47
|
+
* instead of one-shot LLM calls.
|
|
48
48
|
*
|
|
49
49
|
* Defaults to `DEFAULT_USE_TOOL_CALLING` (true). Absent means "use the
|
|
50
50
|
* default" — pass an explicit `false` to force the one-shot writer, which
|
|
@@ -235,7 +235,7 @@ export interface ExecutionStats {
|
|
|
235
235
|
* malformed code fence loses the whole task. `writer-tc`/`reviewer-tc` run a
|
|
236
236
|
* prompt-based read→edit→verify loop instead, which is provider-agnostic (no
|
|
237
237
|
* native function calling required) and is the single largest capability gap
|
|
238
|
-
* between this harness and
|
|
238
|
+
* between this harness and a fully agentic harness, weak models most of all.
|
|
239
239
|
*
|
|
240
240
|
* It is therefore ON by default; `--no-tool-calling` (CLI) or
|
|
241
241
|
* `useToolCalling: false` (API) restores the one-shot writer.
|
|
@@ -383,8 +383,8 @@ export declare class Orchestrator {
|
|
|
383
383
|
private createLLMProvider;
|
|
384
384
|
/**
|
|
385
385
|
* CHANGE-002: Create a fast/cheap LLM for file finding.
|
|
386
|
-
*
|
|
387
|
-
*
|
|
386
|
+
* Use a small, fast model (like Gemini Flash) for file selection instead
|
|
387
|
+
* of the main (expensive) model.
|
|
388
388
|
*
|
|
389
389
|
* The file finder only needs to:
|
|
390
390
|
* 1. Read the file tree
|
|
@@ -392,8 +392,8 @@ export declare class Orchestrator {
|
|
|
392
392
|
* 3. Return file paths
|
|
393
393
|
*
|
|
394
394
|
* This doesn't require a powerful model — a fast model with good instruction
|
|
395
|
-
* following is sufficient.
|
|
396
|
-
*
|
|
395
|
+
* following is sufficient. A finetuned small model is well suited to this
|
|
396
|
+
* exact purpose.
|
|
397
397
|
*
|
|
398
398
|
* Returns a cheap LLM call function, or null if no fast model is available.
|
|
399
399
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AASH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AASrD,OAAO,KAAK,EAAwC,QAAQ,EAAe,MAAM,YAAY,CAAC;AAO9F,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAgB9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAuB,KAAK,YAAY,EAAqB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings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;;;;;;OAQG;IACH,OAAO,CAAC,yBAAyB;IAcjC,OAAO,CAAC,0BAA0B;IA2ElC,OAAO,CAAC,mBAAmB;IAyB3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,gBAAgB;IAOxB;;;;;;;OAOG;IACH,OAAO,CAAC,wBAAwB;IA+BhC;;;;;;;;;OASG;IACH,OAAO,CAAC,yBAAyB;IAKjC;;;;;;;;;OASG;IACH;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;IAqChC,OAAO,CAAC,kBAAkB;IA4C1B,gEAAgE;IAChE,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,+BAA+B;IAiJvC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,4BAA4B;IAiBpC;;;;;;;;;OASG;IACH,OAAO,CAAC,uBAAuB;IAyB/B,OAAO,CAAC,2BAA2B;IA0BnC;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAkDpB,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,WAAW;CAwBpB"}
|
|
@@ -53,6 +53,7 @@ import { ErrorRepairEngine } from '../learning/error-repair.js';
|
|
|
53
53
|
import { estimateTokens } from '../learning/cost-tracker.js';
|
|
54
54
|
import { scanForInjections, formatScanReport } from '../security/scanner.js';
|
|
55
55
|
import { withLogCorrelation } from '../enterprise/log.js';
|
|
56
|
+
import { withAgentAnswerQualityGate } from './answer-quality-gate.js';
|
|
56
57
|
import { getMetrics } from '../enterprise/metrics.js';
|
|
57
58
|
import { getAutoRouter, isAutoModel, isAutoProvider, } from '../learning/auto-router.js';
|
|
58
59
|
import { analyzeComplexity } from '../learning/hybrid-router.js';
|
|
@@ -124,7 +125,7 @@ function createAgent(agentType, registry) {
|
|
|
124
125
|
* malformed code fence loses the whole task. `writer-tc`/`reviewer-tc` run a
|
|
125
126
|
* prompt-based read→edit→verify loop instead, which is provider-agnostic (no
|
|
126
127
|
* native function calling required) and is the single largest capability gap
|
|
127
|
-
* between this harness and
|
|
128
|
+
* between this harness and a fully agentic harness, weak models most of all.
|
|
128
129
|
*
|
|
129
130
|
* It is therefore ON by default; `--no-tool-calling` (CLI) or
|
|
130
131
|
* `useToolCalling: false` (API) restores the one-shot writer.
|
|
@@ -686,12 +687,16 @@ export class Orchestrator {
|
|
|
686
687
|
// API" goal does NOT get website-deployment methodology. For a
|
|
687
688
|
// website-deployment skill (bundled OR hub-installed), require
|
|
688
689
|
// hosting-specific intent words.
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
690
|
+
//
|
|
691
|
+
// This pipeline path used to apply ONLY the website-deploy rule and NO
|
|
692
|
+
// evidence filter at all — so it was the most exposed injection surface
|
|
693
|
+
// (live 2026-09-21: `wsl-setup` methodology injected into a cross-platform
|
|
694
|
+
// GUI app plan because the goal named "Windows and Linux"). It now uses
|
|
695
|
+
// the SAME `isSkillActivated` predicate as the chat/execute loop, so the
|
|
696
|
+
// three surfaces cannot disagree about what a goal is evidence FOR.
|
|
697
|
+
const { isSkillActivated } = await import('../tools/loop-skill-hint.js');
|
|
698
|
+
if (matchedSkill && !isSkillActivated(goal, matchedSkill))
|
|
699
|
+
matchedSkill = null;
|
|
695
700
|
if (matchedSkill) {
|
|
696
701
|
// Load full methodology from skill_view() (Hermes progressive disclosure)
|
|
697
702
|
let fullMethodology = '';
|
|
@@ -726,15 +731,12 @@ export class Orchestrator {
|
|
|
726
731
|
// recommendation, the planner still owns the final plan.
|
|
727
732
|
const { findHubSkillMatch } = await import('../learning/hub-skill-catalog.js');
|
|
728
733
|
let hubMatch = findHubSkillMatch(goal);
|
|
729
|
-
//
|
|
730
|
-
//
|
|
731
|
-
//
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
if (!HOSTING_INTENT.test(goalLower))
|
|
736
|
-
hubMatch = null;
|
|
737
|
-
}
|
|
734
|
+
// SAME activation gate as the compiled skill (website-deploy needs
|
|
735
|
+
// hosting intent) AND the evidence filter the hub scorer has never had:
|
|
736
|
+
// its name/description keyword score is a candidate RANKING, not proof
|
|
737
|
+
// the goal asked for the methodology.
|
|
738
|
+
if (hubMatch && !isSkillActivated(goal, hubMatch))
|
|
739
|
+
hubMatch = null;
|
|
738
740
|
if (hubMatch) {
|
|
739
741
|
// Load full methodology from skill_view() (Hermes progressive disclosure)
|
|
740
742
|
let fullMethodology = '';
|
|
@@ -1574,8 +1576,8 @@ export class Orchestrator {
|
|
|
1574
1576
|
}
|
|
1575
1577
|
/**
|
|
1576
1578
|
* CHANGE-002: Create a fast/cheap LLM for file finding.
|
|
1577
|
-
*
|
|
1578
|
-
*
|
|
1579
|
+
* Use a small, fast model (like Gemini Flash) for file selection instead
|
|
1580
|
+
* of the main (expensive) model.
|
|
1579
1581
|
*
|
|
1580
1582
|
* The file finder only needs to:
|
|
1581
1583
|
* 1. Read the file tree
|
|
@@ -1583,8 +1585,8 @@ export class Orchestrator {
|
|
|
1583
1585
|
* 3. Return file paths
|
|
1584
1586
|
*
|
|
1585
1587
|
* This doesn't require a powerful model — a fast model with good instruction
|
|
1586
|
-
* following is sufficient.
|
|
1587
|
-
*
|
|
1588
|
+
* following is sufficient. A finetuned small model is well suited to this
|
|
1589
|
+
* exact purpose.
|
|
1588
1590
|
*
|
|
1589
1591
|
* Returns a cheap LLM call function, or null if no fast model is available.
|
|
1590
1592
|
*/
|
|
@@ -1632,7 +1634,12 @@ export class Orchestrator {
|
|
|
1632
1634
|
}
|
|
1633
1635
|
async runAgent(agent, vault, callLLM, _options) {
|
|
1634
1636
|
try {
|
|
1635
|
-
|
|
1637
|
+
// Same answer-quality gate as the task path (see the wiring above): the
|
|
1638
|
+
// reasoner and planner are executed HERE with their own LLM function, so
|
|
1639
|
+
// without this their summaries would be the only agent output still able
|
|
1640
|
+
// to carry a leaked reasoning trace into the report.
|
|
1641
|
+
const gated = withAgentAnswerQualityGate(callLLM, { agent: agent.name, taskId: 'single' });
|
|
1642
|
+
return await withLogCorrelation({ taskId: 'single' }, () => agent.execute(vault.context, gated));
|
|
1636
1643
|
}
|
|
1637
1644
|
catch (err) {
|
|
1638
1645
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -1915,7 +1922,7 @@ export class Orchestrator {
|
|
|
1915
1922
|
const agentModel = options.model || options.agentModels?.[effectiveAgentType] || options.agentModels?.[task.agentType];
|
|
1916
1923
|
let taskBoundProvider;
|
|
1917
1924
|
const useResilient = autoRouting && (options.resilientRouting !== false);
|
|
1918
|
-
const
|
|
1925
|
+
const routedAgentCallLLM = autoRouting
|
|
1919
1926
|
? (useResilient
|
|
1920
1927
|
? this.createResilientAutoRoutedLLM({
|
|
1921
1928
|
agentType: effectiveAgentType,
|
|
@@ -1943,6 +1950,23 @@ export class Orchestrator {
|
|
|
1943
1950
|
provider: options.provider,
|
|
1944
1951
|
model: agentModel || options.model,
|
|
1945
1952
|
});
|
|
1953
|
+
// ── AGENT ANSWER-QUALITY GATE ──────────────────────────────────────
|
|
1954
|
+
// The agents do NOT go through the loop engine, so the generation-time
|
|
1955
|
+
// quality gate that protects chat/`execute` never saw them: each agent is
|
|
1956
|
+
// handed this function and calls the provider directly. A traced reply
|
|
1957
|
+
// (the model narrating the conversation or reciting its instructions)
|
|
1958
|
+
// therefore became the task's SUMMARY — rendered as
|
|
1959
|
+
// `• ✅ Reasoner: The user wants a project plan … I should use the
|
|
1960
|
+
// \`plan_todo\` tool…`. Wrapping here (rather than inside each agent)
|
|
1961
|
+
// covers every agent type and every path that hands the agent this
|
|
1962
|
+
// function — the first pass, the repair engine, the reviewer-fix
|
|
1963
|
+
// strategy — while leaving the orchestrator's housekeeping calls (file
|
|
1964
|
+
// finding, memory) alone. One corrective retry, then the render sites'
|
|
1965
|
+
// salvage/suppress takes over.
|
|
1966
|
+
const agentCallLLM = withAgentAnswerQualityGate(routedAgentCallLLM, {
|
|
1967
|
+
agent: effectiveAgentType,
|
|
1968
|
+
taskId: task.id,
|
|
1969
|
+
});
|
|
1946
1970
|
// Skip tester and debugger tasks in skip-tests mode
|
|
1947
1971
|
if (options.skipTests && (task.agentType === 'tester' || task.agentType === 'debugger')) {
|
|
1948
1972
|
vault.updateTaskStatus(task.id, 'completed', 'Skipped (--skip-tests)');
|
|
@@ -1972,7 +1996,7 @@ export class Orchestrator {
|
|
|
1972
1996
|
// Tool-calling agent routing: when useToolCalling is enabled, route
|
|
1973
1997
|
// 'writer' and 'reviewer' tasks to their tool-calling variants.
|
|
1974
1998
|
// This gives the LLM iterative read→edit→verify capability instead
|
|
1975
|
-
// of a single-shot LLM call
|
|
1999
|
+
// of a single-shot LLM call.
|
|
1976
2000
|
let actualAgentType = effectiveAgentType;
|
|
1977
2001
|
if (resolveUseToolCalling(options)) {
|
|
1978
2002
|
if (effectiveAgentType === 'writer') {
|
|
@@ -1996,7 +2020,7 @@ export class Orchestrator {
|
|
|
1996
2020
|
// attach to the correct board line (fresh instance per task → no races).
|
|
1997
2021
|
agent.currentTaskId = task.id;
|
|
1998
2022
|
// CHANGE-002: Create a fast/cheap file finder LLM for context-gatherer.
|
|
1999
|
-
//
|
|
2023
|
+
// A finetuned small model is well suited to file finding — fast,
|
|
2000
2024
|
// cheap, and accurate for this narrow task. When available, inject it
|
|
2001
2025
|
// into the context-gatherer's metadata so it uses the fast model instead
|
|
2002
2026
|
// of the main (expensive) model for file selection.
|