agent-nuvira 3.3.11 → 3.3.12
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 +32 -1
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/orchestrator.js +28 -12
- package/dist/agents/orchestrator.js.map +1 -1
- package/dist/cli/chat.d.ts +36 -0
- package/dist/cli/chat.d.ts.map +1 -1
- package/dist/cli/chat.js +422 -36
- package/dist/cli/chat.js.map +1 -1
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +14 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/execute.d.ts.map +1 -1
- package/dist/cli/execute.js +8 -0
- package/dist/cli/execute.js.map +1 -1
- package/dist/cli/loop-executor.d.ts.map +1 -1
- package/dist/cli/loop-executor.js +12 -7
- package/dist/cli/loop-executor.js.map +1 -1
- package/dist/cli/tool-install-prompt.d.ts +58 -0
- package/dist/cli/tool-install-prompt.d.ts.map +1 -1
- package/dist/cli/tool-install-prompt.js +137 -0
- package/dist/cli/tool-install-prompt.js.map +1 -1
- package/dist/cli/weak-model-prompt.d.ts +16 -7
- package/dist/cli/weak-model-prompt.d.ts.map +1 -1
- package/dist/cli/weak-model-prompt.js +24 -8
- package/dist/cli/weak-model-prompt.js.map +1 -1
- package/dist/config/types.d.ts +36 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/context/cache.d.ts +35 -1
- package/dist/context/cache.d.ts.map +1 -1
- package/dist/context/cache.js +31 -2
- package/dist/context/cache.js.map +1 -1
- package/dist/inference/model-catalog.d.ts +17 -0
- package/dist/inference/model-catalog.d.ts.map +1 -1
- package/dist/inference/model-catalog.js +42 -7
- package/dist/inference/model-catalog.js.map +1 -1
- package/dist/inference/tool-call-utils.d.ts +4 -3
- package/dist/inference/tool-call-utils.d.ts.map +1 -1
- package/dist/inference/tool-call-utils.js +16 -4
- package/dist/inference/tool-call-utils.js.map +1 -1
- package/dist/learning/agentic-route-gate.d.ts +104 -0
- package/dist/learning/agentic-route-gate.d.ts.map +1 -0
- package/dist/learning/agentic-route-gate.js +125 -0
- package/dist/learning/agentic-route-gate.js.map +1 -0
- package/dist/learning/auto-router.d.ts +36 -0
- package/dist/learning/auto-router.d.ts.map +1 -1
- package/dist/learning/auto-router.js +115 -8
- package/dist/learning/auto-router.js.map +1 -1
- package/dist/learning/build-prerequisites.d.ts +68 -0
- package/dist/learning/build-prerequisites.d.ts.map +1 -0
- package/dist/learning/build-prerequisites.js +267 -0
- package/dist/learning/build-prerequisites.js.map +1 -0
- package/dist/learning/continuation-intent.d.ts +43 -0
- package/dist/learning/continuation-intent.d.ts.map +1 -0
- package/dist/learning/continuation-intent.js +82 -0
- package/dist/learning/continuation-intent.js.map +1 -0
- package/dist/learning/model-harness.d.ts +19 -0
- package/dist/learning/model-harness.d.ts.map +1 -1
- package/dist/learning/model-harness.js +27 -0
- package/dist/learning/model-harness.js.map +1 -1
- package/dist/learning/prompt-budget.d.ts +91 -0
- package/dist/learning/prompt-budget.d.ts.map +1 -0
- package/dist/learning/prompt-budget.js +99 -0
- package/dist/learning/prompt-budget.js.map +1 -0
- package/dist/learning/reasoning-trace.d.ts +55 -2
- package/dist/learning/reasoning-trace.d.ts.map +1 -1
- package/dist/learning/reasoning-trace.js +48 -0
- package/dist/learning/reasoning-trace.js.map +1 -1
- package/dist/learning/resilient-call.d.ts.map +1 -1
- package/dist/learning/resilient-call.js +16 -3
- package/dist/learning/resilient-call.js.map +1 -1
- package/dist/learning/routing-history.d.ts +13 -0
- package/dist/learning/routing-history.d.ts.map +1 -1
- package/dist/learning/routing-history.js.map +1 -1
- package/dist/learning/turn-report.d.ts +78 -0
- package/dist/learning/turn-report.d.ts.map +1 -0
- package/dist/learning/turn-report.js +140 -0
- package/dist/learning/turn-report.js.map +1 -0
- package/dist/tools/edit-verification.d.ts +2 -11
- package/dist/tools/edit-verification.d.ts.map +1 -1
- package/dist/tools/edit-verification.js +33 -1
- package/dist/tools/edit-verification.js.map +1 -1
- package/dist/tools/loop-skill-hint.d.ts +51 -0
- package/dist/tools/loop-skill-hint.d.ts.map +1 -1
- package/dist/tools/loop-skill-hint.js +87 -2
- package/dist/tools/loop-skill-hint.js.map +1 -1
- package/dist/tools/plan-store.d.ts +104 -3
- package/dist/tools/plan-store.d.ts.map +1 -1
- package/dist/tools/plan-store.js +250 -6
- package/dist/tools/plan-store.js.map +1 -1
- package/dist/tools/registry.d.ts +20 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +17 -4
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/run-terminal.d.ts.map +1 -1
- package/dist/tools/run-terminal.js +34 -0
- package/dist/tools/run-terminal.js.map +1 -1
- package/dist/tools/tool-loop.d.ts +29 -0
- package/dist/tools/tool-loop.d.ts.map +1 -1
- package/dist/tools/tool-loop.js +259 -8
- package/dist/tools/tool-loop.js.map +1 -1
- package/dist/utils/effect-verification.js +1 -1
- package/dist/utils/effect-verification.js.map +1 -1
- package/dist/web-dashboard/chat-console.d.ts +21 -1
- package/dist/web-dashboard/chat-console.d.ts.map +1 -1
- package/dist/web-dashboard/chat-console.js +33 -5
- package/dist/web-dashboard/chat-console.js.map +1 -1
- package/dist/web-dashboard/server.d.ts.map +1 -1
- package/dist/web-dashboard/server.js +38 -0
- package/dist/web-dashboard/server.js.map +1 -1
- package/dist/web-dashboard/src/types.d.ts +71 -0
- package/dist/web-dashboard/src/types.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/web-dashboard/public/assets/index-BrZcYhy6.js +207 -0
- package/src/web-dashboard/public/assets/index-BrZcYhy6.js.map +1 -0
- package/src/web-dashboard/public/assets/{index-C9eBskc9.css → index-DsWczTa6.css} +1 -1
- package/src/web-dashboard/public/index.html +2 -2
- package/src/web-dashboard/public/assets/index-BdKf5Xw2.js +0 -207
- package/src/web-dashboard/public/assets/index-BdKf5Xw2.js.map +0 -1
package/README.md
CHANGED
|
@@ -1095,7 +1095,38 @@ agent-nuvira config set routing.maxCostUsd 0.005
|
|
|
1095
1095
|
# Minimum capability floors for auto-routed tasks (0–1)
|
|
1096
1096
|
agent-nuvira config set routing.minSpeed 0.5
|
|
1097
1097
|
agent-nuvira config set routing.minReasoning 0.6
|
|
1098
|
-
|
|
1098
|
+
|
|
1099
|
+
# Weak-model consent (agentic/software tasks). ASK-FIRST by default: if a
|
|
1100
|
+
# software task can only run on a weak model, the agent asks ONCE for the
|
|
1101
|
+
# session (approve the weak model, or wait for a strong one) — never a silent
|
|
1102
|
+
# downgrade. This value governs only the surfaces that CANNOT ask (gateway
|
|
1103
|
+
# channels, headless/CI):
|
|
1104
|
+
# ask (default) — never silently use a weak model: fail over or abort honestly
|
|
1105
|
+
# auto-allow — proceed on the weak model (records the verdict)
|
|
1106
|
+
# deny — never use a weak model
|
|
1107
|
+
agent-nuvira config set routing.weakModelPolicy ask
|
|
1108
|
+
|
|
1109
|
+
# Outbound PROMPT budget (chars). When the assembled prompt exceeds maxTotal,
|
|
1110
|
+
# optional context is dropped lowest-value-first (skill hint → recall → …); the
|
|
1111
|
+
# identity/tool contract is never trimmed. Set on the config file:
|
|
1112
|
+
# "routing": { "promptBudget": { "warnTotal": 40000, "maxTotal": 48000 } }
|
|
1113
|
+
```
|
|
1114
|
+
|
|
1115
|
+
**Plan gate (E2).** A workspace-directing turn that tries to edit FILES before
|
|
1116
|
+
it has declared a plan is stopped **once**: the first file mutation is refused
|
|
1117
|
+
and the model is told to call `plan_todo` first. Terminal commands (builds,
|
|
1118
|
+
tests) are nudged but never blocked — a command is a step a plan is meant to
|
|
1119
|
+
reach, not a change to gate. The block is bounded: the second attempt runs even
|
|
1120
|
+
without a plan, so it guides rather than walls. A turn that declares a plan in
|
|
1121
|
+
the same step is never blocked.
|
|
1122
|
+
|
|
1123
|
+
**Turn report (E).** Every turn derives a plan → track → verify report — steps
|
|
1124
|
+
done, files changed, and a verification verdict (`verified` | `unverified` |
|
|
1125
|
+
`blocked` | `not-applicable`), plus the honesty flags that produced it. It is
|
|
1126
|
+
built from **recorded evidence** (the plan store, tool outcomes and the honesty
|
|
1127
|
+
flags), never from the model's own narration, so it cannot be talked into
|
|
1128
|
+
calling unverified work "done". It is surfaced on the console, in the dashboard
|
|
1129
|
+
chat, and persisted on the reasoning trace for review in the Trace tab.
|
|
1099
1130
|
|
|
1100
1131
|
#### How the routing engine works (v1.51.0)
|
|
1101
1132
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAWH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAiBrD,OAAO,KAAK,EAAwC,QAAQ,EAAe,MAAM,YAAY,CAAC;AA0B9F,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;AAS/F,OAAO,
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAWH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAiBrD,OAAO,KAAK,EAAwC,QAAQ,EAAe,MAAM,YAAY,CAAC;AA0B9F,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;AAS/F,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,4BAA4B,CAAC;AA4DpC,iDAAiD;AACjD,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,QAAQ,C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;IACH,OAAO,CAAC,oBAAoB;IAuB5B,OAAO,CAAC,WAAW;CAqCpB"}
|
|
@@ -64,7 +64,9 @@ import { scanForInjections, formatScanReport } from '../security/scanner.js';
|
|
|
64
64
|
import { withLogCorrelation } from '../enterprise/log.js';
|
|
65
65
|
import { withAgentAnswerQualityGate } from './answer-quality-gate.js';
|
|
66
66
|
import { getMetrics } from '../enterprise/metrics.js';
|
|
67
|
-
import { getAutoRouter, isAutoModel, isAutoProvider, } from '../learning/auto-router.js';
|
|
67
|
+
import { getAutoRouter, isAgenticTask, isAutoModel, isAutoProvider, } from '../learning/auto-router.js';
|
|
68
|
+
import { isAgenticCapableModel } from '../learning/model-harness.js';
|
|
69
|
+
import { weakRouteNotice } from '../learning/agentic-route-gate.js';
|
|
68
70
|
import { analyzeComplexity } from '../learning/hybrid-router.js';
|
|
69
71
|
import { getModelRegistry } from '../learning/model-registry.js';
|
|
70
72
|
import { buildAutoResolveOptions } from '../learning/resolve-options.js';
|
|
@@ -1487,17 +1489,31 @@ export class Orchestrator {
|
|
|
1487
1489
|
* to fail complex tasks. Warning only — the user keeps control.
|
|
1488
1490
|
*/
|
|
1489
1491
|
maybeWarnWeakLocalModel(decision) {
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1492
|
+
// B2 — CAPABILITY-based, not locality-based. Prefer the router's own verdict
|
|
1493
|
+
// (A1) when present; else fall back to the shared predicate on the served
|
|
1494
|
+
// pair. The legacy local+low-score case is kept so a weak LOCAL model is
|
|
1495
|
+
// still surfaced even when the router had no task profile to judge against.
|
|
1496
|
+
const capable = typeof decision.agenticCapable === 'boolean'
|
|
1497
|
+
? decision.agenticCapable
|
|
1498
|
+
: isAgenticCapableModel(decision.model, decision.provider);
|
|
1499
|
+
const agentic = decision.taskProfile && decision.complexity
|
|
1500
|
+
? isAgenticTask(decision.complexity, decision.taskProfile)
|
|
1501
|
+
: false;
|
|
1502
|
+
const weakForAgenticAsk = agentic && !capable;
|
|
1503
|
+
const weakLocalLegacy = decision.provider === 'local' && typeof decision.score === 'number' && decision.score < 0.5;
|
|
1504
|
+
if (!weakForAgenticAsk && !weakLocalLegacy)
|
|
1505
|
+
return;
|
|
1506
|
+
// One shared wording (A4/B2) so chat, the orchestrator and the dashboard
|
|
1507
|
+
// cannot describe the same situation three different ways.
|
|
1508
|
+
const notice = weakRouteNotice(decision, agentic) ??
|
|
1509
|
+
`⚠️ Auto-routing found only a weak LOCAL model (${decision.model}, score ${decision.score.toFixed(2)}/1.0) — no verified cloud model is available.`;
|
|
1510
|
+
logger.warn(` ${notice} ` +
|
|
1511
|
+
`Complex tasks may run slowly or fail. Add a real API key (nuvira provider set) or run with an explicit --model for reliable results.`);
|
|
1512
|
+
this.eventBus.emit(EventNames.ORCHESTRATOR_AGENT_UPDATE, {
|
|
1513
|
+
agentType: 'orchestrator',
|
|
1514
|
+
stage: 'routing',
|
|
1515
|
+
message: `⚠️ Only a weak model (${decision.model}) is available — this pipeline may be slow or fail. Add a real API key for better results.`,
|
|
1516
|
+
}, 'orchestrator');
|
|
1501
1517
|
}
|
|
1502
1518
|
/**
|
|
1503
1519
|
* Post-pipeline learning: create skills from successful complex tasks.
|