agent-nuvira 3.3.9 → 3.3.11
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/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/orchestrator.js +6 -0
- package/dist/agents/orchestrator.js.map +1 -1
- package/dist/cli/chat.d.ts.map +1 -1
- package/dist/cli/chat.js +27 -17
- package/dist/cli/chat.js.map +1 -1
- package/dist/cli/config.d.ts +28 -0
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +155 -0
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/eval.d.ts +8 -0
- package/dist/cli/eval.d.ts.map +1 -1
- package/dist/cli/eval.js +64 -0
- package/dist/cli/eval.js.map +1 -1
- package/dist/cli/loop-executor.d.ts +13 -0
- package/dist/cli/loop-executor.d.ts.map +1 -1
- package/dist/cli/loop-executor.js +22 -18
- package/dist/cli/loop-executor.js.map +1 -1
- package/dist/config/capability-mode.d.ts +122 -0
- package/dist/config/capability-mode.d.ts.map +1 -0
- package/dist/config/capability-mode.js +132 -0
- package/dist/config/capability-mode.js.map +1 -0
- package/dist/config/limits.d.ts +47 -0
- package/dist/config/limits.d.ts.map +1 -0
- package/dist/config/limits.js +64 -0
- package/dist/config/limits.js.map +1 -0
- package/dist/config/process-env.d.ts.map +1 -1
- package/dist/config/process-env.js +44 -0
- package/dist/config/process-env.js.map +1 -1
- package/dist/config/types.d.ts +77 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/work-digest.d.ts +46 -0
- package/dist/config/work-digest.d.ts.map +1 -0
- package/dist/config/work-digest.js +80 -0
- package/dist/config/work-digest.js.map +1 -0
- package/dist/gateway/inbound-media.d.ts +18 -0
- package/dist/gateway/inbound-media.d.ts.map +1 -1
- package/dist/gateway/inbound-media.js +96 -2
- package/dist/gateway/inbound-media.js.map +1 -1
- package/dist/inference/anthropic-adapter.d.ts +6 -0
- package/dist/inference/anthropic-adapter.d.ts.map +1 -1
- package/dist/inference/anthropic-adapter.js +79 -8
- package/dist/inference/anthropic-adapter.js.map +1 -1
- package/dist/inference/gemini-adapter.d.ts +6 -0
- package/dist/inference/gemini-adapter.d.ts.map +1 -1
- package/dist/inference/gemini-adapter.js +73 -8
- package/dist/inference/gemini-adapter.js.map +1 -1
- package/dist/inference/groq-adapter.d.ts +3 -0
- package/dist/inference/groq-adapter.d.ts.map +1 -1
- package/dist/inference/groq-adapter.js +83 -40
- package/dist/inference/groq-adapter.js.map +1 -1
- package/dist/inference/interface.d.ts +7 -0
- package/dist/inference/interface.d.ts.map +1 -1
- package/dist/inference/model-probe.d.ts +17 -0
- package/dist/inference/model-probe.d.ts.map +1 -1
- package/dist/inference/model-probe.js +58 -1
- package/dist/inference/model-probe.js.map +1 -1
- package/dist/inference/model-validator.d.ts +16 -1
- package/dist/inference/model-validator.d.ts.map +1 -1
- package/dist/inference/model-validator.js +83 -2
- package/dist/inference/model-validator.js.map +1 -1
- package/dist/inference/nim-adapter.js +4 -4
- package/dist/inference/nim-adapter.js.map +1 -1
- package/dist/inference/openai-compat-adapter.d.ts +9 -0
- package/dist/inference/openai-compat-adapter.d.ts.map +1 -1
- package/dist/inference/openai-compat-adapter.js +101 -51
- package/dist/inference/openai-compat-adapter.js.map +1 -1
- package/dist/inference/openrouter-adapter.d.ts +3 -0
- package/dist/inference/openrouter-adapter.d.ts.map +1 -1
- package/dist/inference/openrouter-adapter.js +134 -57
- package/dist/inference/openrouter-adapter.js.map +1 -1
- package/dist/inference/reasoning-effort.d.ts +130 -0
- package/dist/inference/reasoning-effort.d.ts.map +1 -0
- package/dist/inference/reasoning-effort.js +237 -0
- package/dist/inference/reasoning-effort.js.map +1 -0
- package/dist/inference/route-resolver.d.ts +7 -0
- package/dist/inference/route-resolver.d.ts.map +1 -1
- package/dist/inference/route-resolver.js +2 -1
- package/dist/inference/route-resolver.js.map +1 -1
- package/dist/inference/sse.d.ts +6 -0
- package/dist/inference/sse.d.ts.map +1 -1
- package/dist/inference/sse.js +1 -0
- package/dist/inference/sse.js.map +1 -1
- package/dist/inference/tools.d.ts +13 -0
- package/dist/inference/tools.d.ts.map +1 -1
- package/dist/inference/tools.js +20 -2
- package/dist/inference/tools.js.map +1 -1
- package/dist/learning/autonomy-policy.d.ts +8 -0
- package/dist/learning/autonomy-policy.d.ts.map +1 -1
- package/dist/learning/autonomy-policy.js +34 -0
- package/dist/learning/autonomy-policy.js.map +1 -1
- package/dist/learning/capability-parity.d.ts +108 -0
- package/dist/learning/capability-parity.d.ts.map +1 -0
- package/dist/learning/capability-parity.js +154 -0
- package/dist/learning/capability-parity.js.map +1 -0
- package/dist/learning/cost-tracker.d.ts +28 -4
- package/dist/learning/cost-tracker.d.ts.map +1 -1
- package/dist/learning/cost-tracker.js +58 -8
- package/dist/learning/cost-tracker.js.map +1 -1
- package/dist/learning/eval-framework.d.ts +17 -0
- package/dist/learning/eval-framework.d.ts.map +1 -1
- package/dist/learning/eval-framework.js +63 -2
- package/dist/learning/eval-framework.js.map +1 -1
- package/dist/learning/model-capability.d.ts +94 -0
- package/dist/learning/model-capability.d.ts.map +1 -0
- package/dist/learning/model-capability.js +172 -0
- package/dist/learning/model-capability.js.map +1 -0
- package/dist/learning/model-registry.d.ts +33 -0
- package/dist/learning/model-registry.d.ts.map +1 -1
- package/dist/learning/model-registry.js +79 -0
- package/dist/learning/model-registry.js.map +1 -1
- package/dist/learning/reasoning-trace.d.ts +1 -1
- package/dist/learning/reasoning-trace.d.ts.map +1 -1
- package/dist/learning/reasoning-trace.js.map +1 -1
- package/dist/learning/resolve-options.d.ts.map +1 -1
- package/dist/learning/resolve-options.js +16 -3
- package/dist/learning/resolve-options.js.map +1 -1
- package/dist/learning/run-trace.d.ts +68 -0
- package/dist/learning/run-trace.d.ts.map +1 -1
- package/dist/learning/run-trace.js +101 -0
- package/dist/learning/run-trace.js.map +1 -1
- package/dist/tools/loop-skill-hint.d.ts +27 -0
- package/dist/tools/loop-skill-hint.d.ts.map +1 -1
- package/dist/tools/loop-skill-hint.js +189 -5
- package/dist/tools/loop-skill-hint.js.map +1 -1
- package/dist/tools/read-extract.d.ts +9 -3
- package/dist/tools/read-extract.d.ts.map +1 -1
- package/dist/tools/read-extract.js +70 -25
- package/dist/tools/read-extract.js.map +1 -1
- package/dist/tools/tool-loop.d.ts +120 -0
- package/dist/tools/tool-loop.d.ts.map +1 -1
- package/dist/tools/tool-loop.js +447 -5
- package/dist/tools/tool-loop.js.map +1 -1
- package/dist/web-dashboard/attachment-extract.d.ts +8 -1
- package/dist/web-dashboard/attachment-extract.d.ts.map +1 -1
- package/dist/web-dashboard/attachment-extract.js +14 -3
- package/dist/web-dashboard/attachment-extract.js.map +1 -1
- package/dist/web-dashboard/server.d.ts.map +1 -1
- package/dist/web-dashboard/server.js +160 -21
- package/dist/web-dashboard/server.js.map +1 -1
- package/dist/web-dashboard/src/types.d.ts +26 -0
- package/dist/web-dashboard/src/types.d.ts.map +1 -1
- package/dist/web-dashboard/workspace-guard.d.ts.map +1 -1
- package/dist/web-dashboard/workspace-guard.js +44 -4
- package/dist/web-dashboard/workspace-guard.js.map +1 -1
- package/package.json +1 -1
- package/src/web-dashboard/public/assets/index-BdKf5Xw2.js +207 -0
- package/src/web-dashboard/public/assets/index-BdKf5Xw2.js.map +1 -0
- package/src/web-dashboard/public/assets/index-C9eBskc9.css +1 -0
- package/src/web-dashboard/public/index.html +2 -2
- package/src/web-dashboard/public/assets/index-Beportyl.js +0 -207
- package/src/web-dashboard/public/assets/index-Beportyl.js.map +0 -1
- package/src/web-dashboard/public/assets/index-gtQyg9nm.css +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capability mode — the one switch that decides how much the agent spends on
|
|
3
|
+
* REASONING versus how much it saves.
|
|
4
|
+
*
|
|
5
|
+
* The product decision behind it: an agent is judged on whether it DELIVERS on
|
|
6
|
+
* the ask, with depth, and navigates its own failures — and a single bad
|
|
7
|
+
* experience is enough to lose a user. Cost-saving that produces a weak, nagging
|
|
8
|
+
* agent is a false economy. But cost is real, so the user owns the trade:
|
|
9
|
+
*
|
|
10
|
+
* - `balanced` (DEFAULT) — the agent uses the best model available for
|
|
11
|
+
* COMPLEX/CRITICAL work, cheaper models for simple/moderate work, and
|
|
12
|
+
* escalates when it detects a real stall. This is the recommended default:
|
|
13
|
+
* ~most of the reliability at a fraction of the cost.
|
|
14
|
+
* - `max` — cost is not a concern. Every turn routes to the strongest
|
|
15
|
+
* available model, paid models are always allowed, cost ceilings are lifted,
|
|
16
|
+
* and the loop is given the longest reasoning budget. This is "let the agent
|
|
17
|
+
* act with full depth, whatever it costs."
|
|
18
|
+
*
|
|
19
|
+
* What it deliberately does NOT change: every deterministic SAFETY invariant
|
|
20
|
+
* (deny-first commands, the workspace boundary, the git gates, effect
|
|
21
|
+
* verification). A model must never decide what is destructive, in either mode —
|
|
22
|
+
* so this switch can widen AUTONOMY and MODEL QUALITY, never the safety surface.
|
|
23
|
+
*
|
|
24
|
+
* Resolution order (highest wins): the process environment (`NUVIRA_CAPABILITY_MODE`
|
|
25
|
+
* or the legacy `BUFF_CAPABILITY_MODE`), then `routing.capabilityMode` in the
|
|
26
|
+
* config file, then the default. Read fresh on every turn, so a change applies to
|
|
27
|
+
* the next turn without a restart — the same rule the size limits follow.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* `max` mode's model-level REASONING floor — the difference between "prefer
|
|
31
|
+
* strong" (a scoring nudge that a cheap-but-strong-enough model can still win)
|
|
32
|
+
* and "require strong" (a hard eligibility gate). This is what makes the max
|
|
33
|
+
* promise checkable: candidates whose SERVED model scores below it are
|
|
34
|
+
* eliminated.
|
|
35
|
+
*
|
|
36
|
+
* 0.7 is the same calibration the router already trusts for the asks that must
|
|
37
|
+
* not be served by a weak model (effect-observing `verification`/`debugging`,
|
|
38
|
+
* and `planning`): it drops stacked fast-lite ids (`…-flash-lite` ≈ 0.65) and
|
|
39
|
+
* small models, while keeping a 70B id (≈ 0.80), a single `-flash` id (≈ 0.75)
|
|
40
|
+
* and frontier-family ids. It is NEVER a dead-end — the router's benign
|
|
41
|
+
* fallback restores the full ranking when the floor would eliminate everyone,
|
|
42
|
+
* so a deployment whose only credentialed provider is weak still gets served.
|
|
43
|
+
*/
|
|
44
|
+
export const MAX_CAPABILITY_MIN_REASONING = 0.7;
|
|
45
|
+
/**
|
|
46
|
+
* The reasoning depth `max` requests from a routed model, when that model is
|
|
47
|
+
* verified to accept a reasoning-effort parameter. `high` is the strongest
|
|
48
|
+
* value the OpenAI-compatible family accepts, and the largest thinking budget
|
|
49
|
+
* for the native families — i.e. "as much as this model will give."
|
|
50
|
+
*/
|
|
51
|
+
export const MAX_CAPABILITY_REASONING_EFFORT = 'high';
|
|
52
|
+
/** The default when nothing is configured. */
|
|
53
|
+
export const DEFAULT_CAPABILITY_MODE = 'balanced';
|
|
54
|
+
/** Env names, `NUVIRA_*` first with the legacy `BUFF_*` alias accepted. */
|
|
55
|
+
const ENV_NAMES = ['NUVIRA_CAPABILITY_MODE', 'BUFF_CAPABILITY_MODE'];
|
|
56
|
+
/**
|
|
57
|
+
* Parse a raw value into a mode. Accepts the two canonical names plus the
|
|
58
|
+
* intuitive synonyms a user might type, so a typo cannot silently leave the
|
|
59
|
+
* agent on the cheaper mode when the user asked for maximum depth:
|
|
60
|
+
* - `max` / `maximum` / `unlimited` / `performance` / `performance-first` → 'max'
|
|
61
|
+
* - `balanced` / `balance` / `default` → 'balanced'
|
|
62
|
+
* Returns null for anything unrecognized (the caller then falls through to the
|
|
63
|
+
* next source rather than guessing).
|
|
64
|
+
*/
|
|
65
|
+
export function parseCapabilityMode(raw) {
|
|
66
|
+
const v = String(raw ?? '').trim().toLowerCase();
|
|
67
|
+
if (!v)
|
|
68
|
+
return null;
|
|
69
|
+
if (v === 'max' || v === 'maximum' || v === 'unlimited' || v === 'performance' || v === 'performance-first') {
|
|
70
|
+
return 'max';
|
|
71
|
+
}
|
|
72
|
+
if (v === 'balanced' || v === 'balance' || v === 'default')
|
|
73
|
+
return 'balanced';
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The effective capability mode for this process.
|
|
78
|
+
*
|
|
79
|
+
* Reads the environment first (a shell export wins over the file, exactly like
|
|
80
|
+
* every other process switch), then the config file, then the default. Pure and
|
|
81
|
+
* never throws — a config read failure falls back to the default rather than
|
|
82
|
+
* breaking a turn.
|
|
83
|
+
*/
|
|
84
|
+
export function resolveCapabilityMode(cm) {
|
|
85
|
+
for (const name of ENV_NAMES) {
|
|
86
|
+
const parsed = parseCapabilityMode(process.env[name]);
|
|
87
|
+
if (parsed)
|
|
88
|
+
return parsed;
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
const routing = cm?.getAll?.()?.routing;
|
|
92
|
+
const parsed = parseCapabilityMode(typeof routing?.capabilityMode === 'string' ? routing.capabilityMode : undefined);
|
|
93
|
+
if (parsed)
|
|
94
|
+
return parsed;
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
// Best-effort — a config failure must not break routing.
|
|
98
|
+
}
|
|
99
|
+
return DEFAULT_CAPABILITY_MODE;
|
|
100
|
+
}
|
|
101
|
+
/** True when the user has asked for maximum capability (cost is not a concern). */
|
|
102
|
+
export function isMaxCapability(cm) {
|
|
103
|
+
return resolveCapabilityMode(cm) === 'max';
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The reasoning depth the current capability mode asks for, or `undefined`
|
|
107
|
+
* when the mode does not request one (`balanced`). Convenience over
|
|
108
|
+
* `capabilityRoutingPolicy(resolveCapabilityMode(cm))` for call sites that
|
|
109
|
+
* only need this one knob. Reading it is cheap and never throws.
|
|
110
|
+
*/
|
|
111
|
+
export function capabilityReasoningEffort(cm) {
|
|
112
|
+
return capabilityRoutingPolicy(resolveCapabilityMode(cm)).reasoningEffort;
|
|
113
|
+
}
|
|
114
|
+
/** The routing policy for a mode. `balanced` returns an empty object (no overrides). */
|
|
115
|
+
export function capabilityRoutingPolicy(mode) {
|
|
116
|
+
if (mode === 'max') {
|
|
117
|
+
return {
|
|
118
|
+
preferenceMode: 'performance-first',
|
|
119
|
+
allowPaid: true,
|
|
120
|
+
maxCostUsd: undefined,
|
|
121
|
+
// Not just "prefer capability" — require it. A paid-but-weak model must
|
|
122
|
+
// not satisfy a mode whose whole promise is "the strongest model."
|
|
123
|
+
minReasoning: MAX_CAPABILITY_MIN_REASONING,
|
|
124
|
+
// And having PICKED a strong model, ask it to reason deeply. Gated
|
|
125
|
+
// per-model (default-deny) so this can never break a model that lacks the
|
|
126
|
+
// parameter. See reasoning-effort.ts.
|
|
127
|
+
reasoningEffort: MAX_CAPABILITY_REASONING_EFFORT,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
return {};
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=capability-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-mode.js","sourceRoot":"","sources":["../../src/config/capability-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAQH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAoB,MAAM,CAAC;AAEvE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,uBAAuB,GAAmB,UAAU,CAAC;AAElE,2EAA2E;AAC3E,MAAM,SAAS,GAAG,CAAC,wBAAwB,EAAE,sBAAsB,CAAC,CAAC;AAErE;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAA8B;IAChE,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACjD,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,S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,KAAK,EAAE,CAAC;QACnB,OAAO;YACL,cAAc,EAAE,mBAAmB;YACnC,SAAS,EAAE,IAAI;YACf,UAAU,EAAE,SAAS;YACrB,wEAAwE;YACxE,mEAAmE;YACnE,YAAY,EAAE,4BAA4B;YAC1C,mEAAmE;YACnE,0EAA0E;YAC1E,sCAAsC;YACtC,eAAe,EAAE,+BAA+B;SACjD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configurable size limits — how much text one read may carry into a turn.
|
|
3
|
+
*
|
|
4
|
+
* Two limits used to be hardcoded constants that a user could not move:
|
|
5
|
+
*
|
|
6
|
+
* - `read_extract` capped one extraction at 40,000 characters. A 66,021-char
|
|
7
|
+
* lab report was therefore read only in part, and — worse — the truncation
|
|
8
|
+
* was reported in `metadata.truncated` but NOT in the text, so the model
|
|
9
|
+
* could (and did) assess half a document as if it were the whole one.
|
|
10
|
+
* - the dashboard composer refused any attachment over 300 KB. A project file
|
|
11
|
+
* larger than that had no route in at all.
|
|
12
|
+
*
|
|
13
|
+
* Both are now read from the environment on every call (so a change takes effect
|
|
14
|
+
* on the NEXT turn, and a value exported in a shell wins over the file, exactly
|
|
15
|
+
* like every other process switch), with the historical values as the defaults.
|
|
16
|
+
* The readers are pure and never throw: a malformed value falls back to the
|
|
17
|
+
* default rather than breaking a read.
|
|
18
|
+
*
|
|
19
|
+
* Names are `NUVIRA_*`; the `BUFF_*` aliases are accepted for compatibility.
|
|
20
|
+
*/
|
|
21
|
+
/** The historical `read_extract` cap, in characters. */
|
|
22
|
+
export declare const DEFAULT_EXTRACT_MAX_CHARS = 40000;
|
|
23
|
+
/** The historical dashboard attachment cap, in bytes (~300 KB). */
|
|
24
|
+
export declare const DEFAULT_ATTACHMENT_MAX_BYTES = 300000;
|
|
25
|
+
/**
|
|
26
|
+
* A sane upper bound, so a typo cannot ask for a gigabyte of extraction text and
|
|
27
|
+
* take the process out. 8M characters is ~2M tokens — already far past any
|
|
28
|
+
* model's window, so this only ever bites a mistake.
|
|
29
|
+
*/
|
|
30
|
+
export declare const MAX_EXTRACT_MAX_CHARS_CEILING = 8000000;
|
|
31
|
+
/** Ceiling on the attachment cap, in bytes (256 MB). */
|
|
32
|
+
export declare const MAX_ATTACHMENT_MAX_BYTES_CEILING: number;
|
|
33
|
+
/**
|
|
34
|
+
* The character budget for one `read_extract` call.
|
|
35
|
+
*
|
|
36
|
+
* Read fresh on every call, so setting the env var (from the dashboard's Process
|
|
37
|
+
* Environment page, the CLI, or a shell export) applies to the next read without
|
|
38
|
+
* a restart.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveExtractMaxChars(): number;
|
|
41
|
+
/**
|
|
42
|
+
* The size cap for one composer attachment, in bytes.
|
|
43
|
+
*
|
|
44
|
+
* Read fresh on every hydration, so raising it takes effect on the next turn.
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveAttachmentMaxBytes(): number;
|
|
47
|
+
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/config/limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,wDAAwD;AACxD,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD,mEAAmE;AACnE,eAAO,MAAM,4BAA4B,SAAU,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,UAAY,CAAC;AAEvD,wDAAwD;AACxD,eAAO,MAAM,gCAAgC,QAAoB,CAAC;AAclE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAO/C;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAOlD"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configurable size limits — how much text one read may carry into a turn.
|
|
3
|
+
*
|
|
4
|
+
* Two limits used to be hardcoded constants that a user could not move:
|
|
5
|
+
*
|
|
6
|
+
* - `read_extract` capped one extraction at 40,000 characters. A 66,021-char
|
|
7
|
+
* lab report was therefore read only in part, and — worse — the truncation
|
|
8
|
+
* was reported in `metadata.truncated` but NOT in the text, so the model
|
|
9
|
+
* could (and did) assess half a document as if it were the whole one.
|
|
10
|
+
* - the dashboard composer refused any attachment over 300 KB. A project file
|
|
11
|
+
* larger than that had no route in at all.
|
|
12
|
+
*
|
|
13
|
+
* Both are now read from the environment on every call (so a change takes effect
|
|
14
|
+
* on the NEXT turn, and a value exported in a shell wins over the file, exactly
|
|
15
|
+
* like every other process switch), with the historical values as the defaults.
|
|
16
|
+
* The readers are pure and never throw: a malformed value falls back to the
|
|
17
|
+
* default rather than breaking a read.
|
|
18
|
+
*
|
|
19
|
+
* Names are `NUVIRA_*`; the `BUFF_*` aliases are accepted for compatibility.
|
|
20
|
+
*/
|
|
21
|
+
/** The historical `read_extract` cap, in characters. */
|
|
22
|
+
export const DEFAULT_EXTRACT_MAX_CHARS = 40_000;
|
|
23
|
+
/** The historical dashboard attachment cap, in bytes (~300 KB). */
|
|
24
|
+
export const DEFAULT_ATTACHMENT_MAX_BYTES = 300_000;
|
|
25
|
+
/**
|
|
26
|
+
* A sane upper bound, so a typo cannot ask for a gigabyte of extraction text and
|
|
27
|
+
* take the process out. 8M characters is ~2M tokens — already far past any
|
|
28
|
+
* model's window, so this only ever bites a mistake.
|
|
29
|
+
*/
|
|
30
|
+
export const MAX_EXTRACT_MAX_CHARS_CEILING = 8_000_000;
|
|
31
|
+
/** Ceiling on the attachment cap, in bytes (256 MB). */
|
|
32
|
+
export const MAX_ATTACHMENT_MAX_BYTES_CEILING = 256 * 1024 * 1024;
|
|
33
|
+
/** Read an integer from the environment, falling back to `fallback` on anything invalid. */
|
|
34
|
+
function intFromEnv(names, fallback, min, max) {
|
|
35
|
+
for (const name of names) {
|
|
36
|
+
const raw = process.env[name];
|
|
37
|
+
if (raw === undefined || raw.trim() === '')
|
|
38
|
+
continue;
|
|
39
|
+
const n = Number(raw.trim());
|
|
40
|
+
if (!Number.isFinite(n) || !Number.isInteger(n) || n < min)
|
|
41
|
+
continue;
|
|
42
|
+
return Math.min(n, max);
|
|
43
|
+
}
|
|
44
|
+
return fallback;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The character budget for one `read_extract` call.
|
|
48
|
+
*
|
|
49
|
+
* Read fresh on every call, so setting the env var (from the dashboard's Process
|
|
50
|
+
* Environment page, the CLI, or a shell export) applies to the next read without
|
|
51
|
+
* a restart.
|
|
52
|
+
*/
|
|
53
|
+
export function resolveExtractMaxChars() {
|
|
54
|
+
return intFromEnv(['NUVIRA_EXTRACT_MAX_CHARS', 'BUFF_EXTRACT_MAX_CHARS'], DEFAULT_EXTRACT_MAX_CHARS, 1, MAX_EXTRACT_MAX_CHARS_CEILING);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The size cap for one composer attachment, in bytes.
|
|
58
|
+
*
|
|
59
|
+
* Read fresh on every hydration, so raising it takes effect on the next turn.
|
|
60
|
+
*/
|
|
61
|
+
export function resolveAttachmentMaxBytes() {
|
|
62
|
+
return intFromEnv(['NUVIRA_ATTACHMENT_MAX_BYTES', 'BUFF_ATTACHMENT_MAX_BYTES'], DEFAULT_ATTACHMENT_MAX_BYTES, 1, MAX_ATTACHMENT_MAX_BYTES_CEILING);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.js","sourceRoot":"","sources":["../../src/config/limits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,wDAAwD;AACxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAEhD,mEAAmE;AACnE,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAEpD;;;;GAIG;AACH,MAAM,CAAC,MAAM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oBAAoB,CAAA;CAAE,CAoB3E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,kBAAkB,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAkBtG"}
|
|
@@ -84,6 +84,50 @@ export const PROCESS_ENV_VARS = [
|
|
|
84
84
|
unsetMeans: 'Semantic recall is ON (the default). This switch turns it off.',
|
|
85
85
|
cliEquivalent: 'nuvira execute --no-session-recall · memory.sessionRecall in buffconfig.json',
|
|
86
86
|
},
|
|
87
|
+
{
|
|
88
|
+
name: 'NUVIRA_EXTRACT_MAX_CHARS',
|
|
89
|
+
label: 'Document extraction budget',
|
|
90
|
+
group: 'turn',
|
|
91
|
+
kind: 'text',
|
|
92
|
+
placeholder: '40000',
|
|
93
|
+
valueLabel: 'Save',
|
|
94
|
+
description: 'How many characters one read_extract call may return. A document larger than this is read only in part, and the truncation is stated in the returned text. Raise it to read a large report in one pass (up to 8,000,000).',
|
|
95
|
+
unsetMeans: '40,000 characters — about 10,000 words.',
|
|
96
|
+
cliEquivalent: 'nuvira config limit set extract-max-chars <n> · NUVIRA_EXTRACT_MAX_CHARS',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'NUVIRA_ATTACHMENT_MAX_BYTES',
|
|
100
|
+
label: 'Attachment size cap (bytes)',
|
|
101
|
+
group: 'turn',
|
|
102
|
+
kind: 'text',
|
|
103
|
+
placeholder: '300000',
|
|
104
|
+
valueLabel: 'Save',
|
|
105
|
+
description: 'The largest single file the dashboard composer will accept, in bytes. A file over this cap is refused before it is sent. Raise it for a project file larger than ~300 KB (up to 268435456 = 256 MB).',
|
|
106
|
+
unsetMeans: '300,000 bytes (~293 KB) per attachment, 10 attachments per turn.',
|
|
107
|
+
cliEquivalent: 'nuvira config limit set attachment-max-kb <n> · NUVIRA_ATTACHMENT_MAX_BYTES',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'NUVIRA_CAPABILITY_MODE',
|
|
111
|
+
label: 'Capability mode',
|
|
112
|
+
group: 'turn',
|
|
113
|
+
kind: 'text',
|
|
114
|
+
placeholder: 'balanced',
|
|
115
|
+
valueLabel: 'Save',
|
|
116
|
+
description: 'How much the agent spends on REASONING versus how much it saves. balanced (default): the best model for complex/critical work, cheaper models for simple work, and escalation when a stall is detected. max: cost is not a concern — every turn routes to the strongest model (a reasoning floor requires a strong served model, not merely a paid one), paid models are always allowed, cost ceilings are lifted, and the loop gets its longest reasoning budget.',
|
|
117
|
+
unsetMeans: 'balanced — the recommended default.',
|
|
118
|
+
cliEquivalent: 'nuvira config capability set <balanced|max> · NUVIRA_CAPABILITY_MODE',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'NUVIRA_WORK_DIGEST',
|
|
122
|
+
label: 'Work digest scope',
|
|
123
|
+
group: 'turn',
|
|
124
|
+
kind: 'text',
|
|
125
|
+
placeholder: 'all',
|
|
126
|
+
valueLabel: 'Save',
|
|
127
|
+
description: 'When the loop compacts a long turn\'s context, it can keep a short digest of what the turn has done (files changed, commands and whether they passed, tools used). all (default): always keep the digest. max: only under the max capability mode. off: never.',
|
|
128
|
+
unsetMeans: 'all — the digest is kept in every mode.',
|
|
129
|
+
cliEquivalent: 'NUVIRA_WORK_DIGEST=all|max|off',
|
|
130
|
+
},
|
|
87
131
|
{
|
|
88
132
|
name: 'NUVIRA_STRICT_MODEL',
|
|
89
133
|
label: 'Refuse model substitution',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-env.js","sourceRoot":"","sources":["../../src/config/process-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAwDH;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAiC;IAC5D;QACE,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,oBAAoB;QAC3B,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,MAA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AI,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACxD,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACzD,IAAI,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAClD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAoC,EAAE,KAAoB;IAC3F,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACjC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACxC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,QAAQ;YACX,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,IAAI,CAAC;QAC5F,KAAK,MAAM;YACT,OAAO,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,KAAK,CAAC;QAC3D,KAAK,YAAY;YACf,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC;QAC9B,KAAK,eAAe;YAClB,uEAAuE;YACvE,6DAA6D;YAC7D,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,OAAO,CAAC;QACzD;YACE,uEAAuE;YACvE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC"}
|
package/dist/config/types.d.ts
CHANGED
|
@@ -445,6 +445,26 @@ export interface RoutingConfig {
|
|
|
445
445
|
* served across a mode switch.
|
|
446
446
|
*/
|
|
447
447
|
preferenceMode?: 'balanced' | 'performance-first' | 'cost-first' | 'privacy-first';
|
|
448
|
+
/**
|
|
449
|
+
* Capability mode — how much the agent spends on REASONING versus how much it
|
|
450
|
+
* saves. 'balanced' (default): the best model for complex/critical work,
|
|
451
|
+
* cheaper models for simple work, escalation on a detected stall. 'max': cost
|
|
452
|
+
* is not a concern — every turn routes to the strongest available model, paid
|
|
453
|
+
* models are always allowed, and cost ceilings are lifted. Set via
|
|
454
|
+
* `nuvira config capability <balanced|max>` or `NUVIRA_CAPABILITY_MODE`. The
|
|
455
|
+
* mode only ever widens MODEL QUALITY and AUTONOMY; every deterministic safety
|
|
456
|
+
* invariant (deny-first commands, workspace boundary, git gates) is unchanged.
|
|
457
|
+
* Resolution: env var, then this config value, then the default ('balanced').
|
|
458
|
+
*/
|
|
459
|
+
capabilityMode?: 'balanced' | 'max';
|
|
460
|
+
/**
|
|
461
|
+
* When the loop's within-turn WORK DIGEST is injected on thread compaction.
|
|
462
|
+
* 'all' (default) — always keep a digest of what the turn did; 'max' — only
|
|
463
|
+
* under the `max` capability mode; 'off' — never. Set via
|
|
464
|
+
* `NUVIRA_WORK_DIGEST` or this value. Resolution: env, then config, then
|
|
465
|
+
* 'all'. See `src/config/work-digest.ts`.
|
|
466
|
+
*/
|
|
467
|
+
workDigest?: 'all' | 'max' | 'off';
|
|
448
468
|
}
|
|
449
469
|
/**
|
|
450
470
|
* Full configuration schema for .nuviraconfig.json
|
|
@@ -652,11 +672,68 @@ export interface ToolHookConfig {
|
|
|
652
672
|
/** A name for this hook, used in the report when it vetoes or fails. */
|
|
653
673
|
label?: string;
|
|
654
674
|
}
|
|
675
|
+
/**
|
|
676
|
+
* How much EXTRA reasoning to ask a model for, in provider-neutral terms.
|
|
677
|
+
*
|
|
678
|
+
* This is INTENT, not a wire value. Each adapter translates it into whatever
|
|
679
|
+
* its provider actually accepts (`reasoning_effort` for the OpenAI-compatible
|
|
680
|
+
* family, an extended-thinking budget for Anthropic, a thinking budget for
|
|
681
|
+
* Gemini). A provider that has no such knob simply ignores it — the value is
|
|
682
|
+
* always optional and never required for a call to succeed.
|
|
683
|
+
*
|
|
684
|
+
* Defined here (the config layer) rather than in the inference layer so both
|
|
685
|
+
* the capability policy and the adapters can name it without an import cycle.
|
|
686
|
+
*/
|
|
687
|
+
export type ReasoningEffort = 'low' | 'medium' | 'high';
|
|
688
|
+
/**
|
|
689
|
+
* The family of wire parameter used to request extra reasoning. The shape is a
|
|
690
|
+
* property of the PROVIDER (how it spells the knob), while whether a given
|
|
691
|
+
* MODEL accepts it is a separate, learned fact (see ModelRegistryEntry.
|
|
692
|
+
* reasoningCapability).
|
|
693
|
+
*/
|
|
694
|
+
export type ReasoningShape = 'openai-reasoning-effort' | 'anthropic-thinking' | 'gemini-thinking';
|
|
695
|
+
/**
|
|
696
|
+
* What we have LEARNED about whether one provider × model accepts a
|
|
697
|
+
* reasoning-effort parameter. Absent/`supported:false` means "do not send it"
|
|
698
|
+
* (default-deny): the knob is only ever emitted against positive evidence.
|
|
699
|
+
*/
|
|
700
|
+
export interface ReasoningCapability {
|
|
701
|
+
supported: boolean;
|
|
702
|
+
/** The exact wire parameter name (e.g. `reasoning_effort`, `thinking`). */
|
|
703
|
+
param: string;
|
|
704
|
+
/** The wire family, so a caller knows how to build the value. */
|
|
705
|
+
shape: ReasoningShape;
|
|
706
|
+
/** Epoch ms the capability was last established. */
|
|
707
|
+
verifiedAt: number;
|
|
708
|
+
/**
|
|
709
|
+
* How we learned it: the provider ADVERTISED it, a PROBE confirmed it, or a
|
|
710
|
+
* rejected request taught us it is NOT supported (`learned-unsupported`).
|
|
711
|
+
*/
|
|
712
|
+
source: 'advertised' | 'probed' | 'learned-unsupported';
|
|
713
|
+
}
|
|
655
714
|
/**
|
|
656
715
|
* Inference options passed to each generation call
|
|
657
716
|
* Note: provider is string to allow plugin-based providers
|
|
658
717
|
*/
|
|
659
718
|
export interface InferenceOptions {
|
|
719
|
+
/**
|
|
720
|
+
* Request additional reasoning depth from the model, in provider-neutral
|
|
721
|
+
* terms. Set by the routing layer when the capability mode calls for it
|
|
722
|
+
* (`max` → `high`); applied by an adapter ONLY when the registry has verified
|
|
723
|
+
* that the provider × model accepts the corresponding parameter, and retried
|
|
724
|
+
* WITHOUT the parameter if the provider rejects it. Absent → never sent, so
|
|
725
|
+
* the default path is byte-identical to before. See
|
|
726
|
+
* `src/inference/reasoning-effort.ts`.
|
|
727
|
+
*/
|
|
728
|
+
reasoningEffort?: ReasoningEffort;
|
|
729
|
+
/**
|
|
730
|
+
* INTERNAL — probe mode. When true, the adapter emits its provider's
|
|
731
|
+
* reasoning parameter UNCONDITIONALLY (bypassing the default-deny registry
|
|
732
|
+
* gate) so a probe can establish whether the model accepts it. The registry
|
|
733
|
+
* is updated from the outcome. Never set by routing; only the model probe
|
|
734
|
+
* sets it. See src/inference/model-probe.ts.
|
|
735
|
+
*/
|
|
736
|
+
reasoningProbe?: boolean;
|
|
660
737
|
model?: string;
|
|
661
738
|
temperature?: number;
|
|
662
739
|
maxTokens?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,QAAQ,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,MAAM,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAA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;AAElG;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,KAAK,EAAE,cAAc,CAAC;IACtB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,MAAM,EAAE,YAAY,GAAG,QAAQ,GAAG,qBAAqB,CAAC;CACzD;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work-digest scope — WHO gets the loop's within-turn compaction digest.
|
|
3
|
+
*
|
|
4
|
+
* The digest itself (see `tools/tool-loop.ts`) is deterministic and additive:
|
|
5
|
+
* when the thread is compacted, the loop injects one bounded record of what the
|
|
6
|
+
* turn has DONE (files changed, commands + verdicts, tools used) so a long turn
|
|
7
|
+
* does not lose its own history when old tool output is trimmed.
|
|
8
|
+
*
|
|
9
|
+
* It is ON for every mode by default, because losing the verdict of what you ran
|
|
10
|
+
* is a defect in any mode. But a user who wants the very leanest `balanced`
|
|
11
|
+
* prompt can scope it to `max` (the mode that already trades cost for depth), or
|
|
12
|
+
* turn it off entirely. Three values:
|
|
13
|
+
*
|
|
14
|
+
* - `all` (DEFAULT) — inject on every compaction, in every mode. Recommended.
|
|
15
|
+
* - `max` — inject ONLY under the `max` capability mode; `balanced` stays
|
|
16
|
+
* exactly as it was before the digest existed.
|
|
17
|
+
* - `off` — never inject.
|
|
18
|
+
*
|
|
19
|
+
* Resolution order (highest wins): the process environment (`NUVIRA_WORK_DIGEST`,
|
|
20
|
+
* or the legacy `BUFF_WORK_DIGEST`), then `routing.workDigest` in the config
|
|
21
|
+
* file, then the default. Pure and never throws — a broken config read falls
|
|
22
|
+
* back to the default rather than breaking a turn.
|
|
23
|
+
*/
|
|
24
|
+
import type { ConfigManager } from './manager.js';
|
|
25
|
+
/** Who receives the within-turn work digest. */
|
|
26
|
+
export type WorkDigestScope = 'all' | 'max' | 'off';
|
|
27
|
+
/** The default when nothing is configured — the digest is a pure improvement. */
|
|
28
|
+
export declare const DEFAULT_WORK_DIGEST_SCOPE: WorkDigestScope;
|
|
29
|
+
/**
|
|
30
|
+
* Parse a raw value into a scope. Intuitive synonyms are accepted so a typo
|
|
31
|
+
* cannot silently change behavior; returns null for anything unrecognized (the
|
|
32
|
+
* caller then falls through to the next source rather than guessing).
|
|
33
|
+
* - all / always / on / true / 1 → 'all'
|
|
34
|
+
* - max / performance / performance-first → 'max'
|
|
35
|
+
* - off / none / never / false / 0 → 'off'
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseWorkDigestScope(raw: string | undefined | null): WorkDigestScope | null;
|
|
38
|
+
/** The effective scope for this process. Env, then config, then the default. */
|
|
39
|
+
export declare function resolveWorkDigestScope(cm?: ConfigManager): WorkDigestScope;
|
|
40
|
+
/**
|
|
41
|
+
* Is the digest ACTIVE for this turn? Folds the scope together with the
|
|
42
|
+
* capability mode so the loop has one question to ask: `scope === 'max'` is the
|
|
43
|
+
* only case that depends on anything besides itself.
|
|
44
|
+
*/
|
|
45
|
+
export declare function isWorkDigestEnabled(cm?: ConfigManager): boolean;
|
|
46
|
+
//# sourceMappingURL=work-digest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-digest.d.ts","sourceRoot":"","sources":["../../src/config/work-digest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,gDAAgD;AAChD,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEpD,iFAAiF;AACjF,eAAO,MAAM,yBAAyB,EAAE,eAAuB,CAAC;AAKhE;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,eAAe,GAAG,IAAI,CAO3F;AAED,gFAAgF;AAChF,wBAAgB,sBAAsB,CAAC,EAAE,CAAC,EAAE,aAAa,GAAG,eAAe,CAa1E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,CAAC,EAAE,aAAa,GAAG,OAAO,CAK/D"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work-digest scope — WHO gets the loop's within-turn compaction digest.
|
|
3
|
+
*
|
|
4
|
+
* The digest itself (see `tools/tool-loop.ts`) is deterministic and additive:
|
|
5
|
+
* when the thread is compacted, the loop injects one bounded record of what the
|
|
6
|
+
* turn has DONE (files changed, commands + verdicts, tools used) so a long turn
|
|
7
|
+
* does not lose its own history when old tool output is trimmed.
|
|
8
|
+
*
|
|
9
|
+
* It is ON for every mode by default, because losing the verdict of what you ran
|
|
10
|
+
* is a defect in any mode. But a user who wants the very leanest `balanced`
|
|
11
|
+
* prompt can scope it to `max` (the mode that already trades cost for depth), or
|
|
12
|
+
* turn it off entirely. Three values:
|
|
13
|
+
*
|
|
14
|
+
* - `all` (DEFAULT) — inject on every compaction, in every mode. Recommended.
|
|
15
|
+
* - `max` — inject ONLY under the `max` capability mode; `balanced` stays
|
|
16
|
+
* exactly as it was before the digest existed.
|
|
17
|
+
* - `off` — never inject.
|
|
18
|
+
*
|
|
19
|
+
* Resolution order (highest wins): the process environment (`NUVIRA_WORK_DIGEST`,
|
|
20
|
+
* or the legacy `BUFF_WORK_DIGEST`), then `routing.workDigest` in the config
|
|
21
|
+
* file, then the default. Pure and never throws — a broken config read falls
|
|
22
|
+
* back to the default rather than breaking a turn.
|
|
23
|
+
*/
|
|
24
|
+
import { isMaxCapability } from './capability-mode.js';
|
|
25
|
+
/** The default when nothing is configured — the digest is a pure improvement. */
|
|
26
|
+
export const DEFAULT_WORK_DIGEST_SCOPE = 'all';
|
|
27
|
+
/** Env names, `NUVIRA_*` first with the legacy `BUFF_*` alias accepted. */
|
|
28
|
+
const ENV_NAMES = ['NUVIRA_WORK_DIGEST', 'BUFF_WORK_DIGEST'];
|
|
29
|
+
/**
|
|
30
|
+
* Parse a raw value into a scope. Intuitive synonyms are accepted so a typo
|
|
31
|
+
* cannot silently change behavior; returns null for anything unrecognized (the
|
|
32
|
+
* caller then falls through to the next source rather than guessing).
|
|
33
|
+
* - all / always / on / true / 1 → 'all'
|
|
34
|
+
* - max / performance / performance-first → 'max'
|
|
35
|
+
* - off / none / never / false / 0 → 'off'
|
|
36
|
+
*/
|
|
37
|
+
export function parseWorkDigestScope(raw) {
|
|
38
|
+
const v = String(raw ?? '').trim().toLowerCase();
|
|
39
|
+
if (!v)
|
|
40
|
+
return null;
|
|
41
|
+
if (v === 'all' || v === 'always' || v === 'on' || v === 'true' || v === '1')
|
|
42
|
+
return 'all';
|
|
43
|
+
if (v === 'max' || v === 'performance' || v === 'performance-first')
|
|
44
|
+
return 'max';
|
|
45
|
+
if (v === 'off' || v === 'none' || v === 'never' || v === 'false' || v === '0')
|
|
46
|
+
return 'off';
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
/** The effective scope for this process. Env, then config, then the default. */
|
|
50
|
+
export function resolveWorkDigestScope(cm) {
|
|
51
|
+
for (const name of ENV_NAMES) {
|
|
52
|
+
const parsed = parseWorkDigestScope(process.env[name]);
|
|
53
|
+
if (parsed)
|
|
54
|
+
return parsed;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const routing = cm?.getAll?.()?.routing;
|
|
58
|
+
const parsed = parseWorkDigestScope(typeof routing?.workDigest === 'string' ? routing.workDigest : undefined);
|
|
59
|
+
if (parsed)
|
|
60
|
+
return parsed;
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
// Best-effort — a config failure must not break a turn.
|
|
64
|
+
}
|
|
65
|
+
return DEFAULT_WORK_DIGEST_SCOPE;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Is the digest ACTIVE for this turn? Folds the scope together with the
|
|
69
|
+
* capability mode so the loop has one question to ask: `scope === 'max'` is the
|
|
70
|
+
* only case that depends on anything besides itself.
|
|
71
|
+
*/
|
|
72
|
+
export function isWorkDigestEnabled(cm) {
|
|
73
|
+
const scope = resolveWorkDigestScope(cm);
|
|
74
|
+
if (scope === 'all')
|
|
75
|
+
return true;
|
|
76
|
+
if (scope === 'off')
|
|
77
|
+
return false;
|
|
78
|
+
return isMaxCapability(cm);
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=work-digest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-digest.js","sourceRoot":"","sources":["../../src/config/work-digest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAKvD,iFAAiF;AACjF,MAAM,CAAC,MAAM,yBAAyB,GAAoB,KAAK,CAAC;AAEhE,2EAA2E;AAC3E,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAA8B;IAC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AAM,UAAU,mBAAmB,CAAC,EAAkB;IACpD,MAAM,KAAK,GAAG,sBAAsB,CAAC,EAAE,CAAC,CAAC;IACzC,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACjC,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAClC,OAAO,eAAe,CAAC,EAAE,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -43,6 +43,24 @@ export declare const INBOUND_MEDIA_TTL_MS: number;
|
|
|
43
43
|
* reports should not grow without bound.
|
|
44
44
|
*/
|
|
45
45
|
export declare const INBOUND_MEDIA_MAX_BYTES: number;
|
|
46
|
+
/**
|
|
47
|
+
* Sniff a document/image extension from the file's MAGIC BYTES.
|
|
48
|
+
*
|
|
49
|
+
* WHY THIS EXISTS. A transport's `fileName` is not guaranteed to carry an
|
|
50
|
+
* extension — WhatsApp in particular delivers a document whose name may be just
|
|
51
|
+
* the sender's title (live: an 8 MB, 28-page PDF named `Divya Sharma_report`).
|
|
52
|
+
* `read_extract` dispatches on the extension, so the file was persisted as
|
|
53
|
+
* `…-Divya Sharma_report` and refused with `unsupported_format: (no extension)`
|
|
54
|
+
* even though the bytes were a perfectly good `%PDF-1.4`. The MIME→extension
|
|
55
|
+
* fallback only fired when the filename was ABSENT, never to AUGMENT a present
|
|
56
|
+
* but extensionless name.
|
|
57
|
+
*
|
|
58
|
+
* Sniffing the bytes is the reliable signal: it is what the file actually IS,
|
|
59
|
+
* independent of what the transport chose to call it. Returns the canonical
|
|
60
|
+
* extension (with the leading dot) or null when nothing matches — in which case
|
|
61
|
+
* the caller keeps the name as-is and read_extract gives its honest refusal.
|
|
62
|
+
*/
|
|
63
|
+
export declare function sniffExtension(data: Uint8Array | undefined): string | null;
|
|
46
64
|
/**
|
|
47
65
|
* Reduce a sender-supplied name to a safe basename that keeps its extension —
|
|
48
66
|
* the name is untrusted and must never escape the artifact dir.
|