agent-nuvira 3.3.0 → 3.3.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/.agents/skills/code-assessment/SKILL.md +10 -1
- package/.agents/skills/index.json +1 -1
- package/README.md +42 -1
- package/dist/cli/cli-program.d.ts.map +1 -1
- package/dist/cli/cli-program.js +6 -2
- package/dist/cli/cli-program.js.map +1 -1
- package/dist/cli/commands.d.ts +2 -1
- package/dist/cli/commands.d.ts.map +1 -1
- package/dist/cli/commands.js +3 -2
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/config.js +2 -2
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/dashboard.d.ts +26 -0
- package/dist/cli/dashboard.d.ts.map +1 -1
- package/dist/cli/dashboard.js +123 -3
- package/dist/cli/dashboard.js.map +1 -1
- package/dist/cli/intent.d.ts +1 -1
- package/dist/cli/intent.js +2 -2
- package/dist/cli/intent.js.map +1 -1
- package/dist/cli/loop-executor.d.ts +7 -0
- package/dist/cli/loop-executor.d.ts.map +1 -1
- package/dist/cli/loop-executor.js +1 -0
- package/dist/cli/loop-executor.js.map +1 -1
- package/dist/cli/process-control.d.ts +15 -0
- package/dist/cli/process-control.d.ts.map +1 -1
- package/dist/cli/process-control.js +38 -14
- package/dist/cli/process-control.js.map +1 -1
- package/dist/forwarded.d.ts +2 -0
- package/dist/forwarded.d.ts.map +1 -0
- package/dist/forwarded.js +2 -0
- package/dist/forwarded.js.map +1 -0
- package/dist/inference/tool-call-utils.d.ts +44 -0
- package/dist/inference/tool-call-utils.d.ts.map +1 -1
- package/dist/inference/tool-call-utils.js +126 -4
- package/dist/inference/tool-call-utils.js.map +1 -1
- package/dist/learning/autonomy-policy.d.ts +6 -0
- package/dist/learning/autonomy-policy.d.ts.map +1 -1
- package/dist/learning/autonomy-policy.js +75 -23
- package/dist/learning/autonomy-policy.js.map +1 -1
- package/dist/learning/eval-framework.d.ts +24 -0
- package/dist/learning/eval-framework.d.ts.map +1 -1
- package/dist/learning/eval-framework.js +291 -0
- package/dist/learning/eval-framework.js.map +1 -1
- package/dist/learning/intent-envelope.d.ts +162 -0
- package/dist/learning/intent-envelope.d.ts.map +1 -0
- package/dist/learning/intent-envelope.js +235 -0
- package/dist/learning/intent-envelope.js.map +1 -0
- 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/run-trace.d.ts +164 -0
- package/dist/learning/run-trace.d.ts.map +1 -0
- package/dist/learning/run-trace.js +342 -0
- package/dist/learning/run-trace.js.map +1 -0
- package/dist/learning/skill-store.d.ts.map +1 -1
- package/dist/learning/skill-store.js +5 -1
- package/dist/learning/skill-store.js.map +1 -1
- package/dist/learning/skill-types.d.ts +14 -0
- package/dist/learning/skill-types.d.ts.map +1 -1
- package/dist/learning/skill-types.js +19 -0
- package/dist/learning/skill-types.js.map +1 -1
- package/dist/resources/command-manifest.json +10 -10
- package/dist/skills/bundled-skills.d.ts.map +1 -1
- package/dist/skills/bundled-skills.js +13 -2
- package/dist/skills/bundled-skills.js.map +1 -1
- package/dist/tools/coding-tools.d.ts.map +1 -1
- package/dist/tools/coding-tools.js +33 -8
- package/dist/tools/coding-tools.js.map +1 -1
- package/dist/tools/edit-verification.d.ts +78 -0
- package/dist/tools/edit-verification.d.ts.map +1 -1
- package/dist/tools/edit-verification.js +213 -16
- package/dist/tools/edit-verification.js.map +1 -1
- package/dist/tools/registry.d.ts +31 -2
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +44 -5
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/run-cli.d.ts.map +1 -1
- package/dist/tools/run-cli.js +15 -2
- package/dist/tools/run-cli.js.map +1 -1
- package/dist/tools/run-terminal.d.ts.map +1 -1
- package/dist/tools/run-terminal.js +23 -4
- package/dist/tools/run-terminal.js.map +1 -1
- package/dist/tools/skill-tool.d.ts.map +1 -1
- package/dist/tools/skill-tool.js +5 -0
- package/dist/tools/skill-tool.js.map +1 -1
- package/dist/tools/tool-loop.d.ts +28 -1
- package/dist/tools/tool-loop.d.ts.map +1 -1
- package/dist/tools/tool-loop.js +261 -14
- package/dist/tools/tool-loop.js.map +1 -1
- package/dist/web-dashboard/chat-console.d.ts +5 -0
- package/dist/web-dashboard/chat-console.d.ts.map +1 -1
- package/dist/web-dashboard/chat-console.js +32 -3
- package/dist/web-dashboard/chat-console.js.map +1 -1
- package/dist/web-dashboard/server.d.ts +46 -0
- package/dist/web-dashboard/server.d.ts.map +1 -1
- package/dist/web-dashboard/server.js +115 -1
- package/dist/web-dashboard/server.js.map +1 -1
- package/dist/web-dashboard/src/admin-auth.d.ts +49 -2
- package/dist/web-dashboard/src/admin-auth.d.ts.map +1 -1
- package/dist/web-dashboard/src/admin-auth.js +64 -3
- package/dist/web-dashboard/src/admin-auth.js.map +1 -1
- package/dist/web-dashboard/src/types.d.ts +41 -0
- package/dist/web-dashboard/src/types.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/web-dashboard/public/assets/index-CjvoBhlz.js +207 -0
- package/src/web-dashboard/public/assets/index-CjvoBhlz.js.map +1 -0
- package/src/web-dashboard/public/index.html +1 -1
- package/src/web-dashboard/public/assets/index-kCUkORm7.js +0 -207
- package/src/web-dashboard/public/assets/index-kCUkORm7.js.map +0 -1
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Run Trace — the loop's representation of ITS OWN behaviour.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS EXISTS (the "it took no concern out of it" audit):
|
|
5
|
+
*
|
|
6
|
+
* A user asked agent-nuvira, in as many words, "why are you asking me this again
|
|
7
|
+
* and again?" — and the turn did not acknowledge it. Not because the model was
|
|
8
|
+
* incapable, but because **nothing in the architecture held the fact that it had
|
|
9
|
+
* asked four times**. The loop's counters measure the loop's own NUDGES
|
|
10
|
+
* (`permissionNudges < 1`), not the model's repeated questions; the gates judge
|
|
11
|
+
* the CURRENT step's text; and the transcript is not a data structure anything
|
|
12
|
+
* reasons over. So the agent could not notice a loop, could not answer a
|
|
13
|
+
* question about one, and could not stop one.
|
|
14
|
+
*
|
|
15
|
+
* That is the whole difference between an agent that reviews its own actions and
|
|
16
|
+
* one that merely executes a pipeline: a REPRESENTATION of the run. This module
|
|
17
|
+
* is it. Every question the agent asks is recorded with a *shape*, every refused
|
|
18
|
+
* tool call is recorded with its reason, and every mutation is recorded with its
|
|
19
|
+
* target — so the run can answer three questions it previously could not:
|
|
20
|
+
*
|
|
21
|
+
* 1. "Have I already asked this?" -> the repetition gate refuses to re-ask.
|
|
22
|
+
* 2. "What did the user answer?" -> the earlier answer is handed back.
|
|
23
|
+
* 3. "Why are you asking again?" -> a self-report the model answers FROM.
|
|
24
|
+
*
|
|
25
|
+
* SCOPE: per CONVERSATION, like the intent envelope — the dashboard console
|
|
26
|
+
* keeps one plan store per session and re-injects it every turn, so the trace
|
|
27
|
+
* outlives the turn and a loop across turns is visible. Storage is bounded (the
|
|
28
|
+
* last N entries), so a long conversation cannot grow it without limit.
|
|
29
|
+
*
|
|
30
|
+
* DELIBERATELY DETERMINISTIC AND LLM-FREE: like `autonomy-policy.ts`, this is a
|
|
31
|
+
* guard rail around a model's own instinct. Asking a model "are you looping?" on
|
|
32
|
+
* every step is both expensive and unreliable; counting is neither. The model is
|
|
33
|
+
* asked to INTERPRET the trace only when the user asks about it.
|
|
34
|
+
*/
|
|
35
|
+
/** The salient content of a question — what it is actually about. */
|
|
36
|
+
export interface QuestionShape {
|
|
37
|
+
/** Explicit targets: backticked text, file paths, command names. */
|
|
38
|
+
targets: string[];
|
|
39
|
+
/** Significant words, boilerplate removed. */
|
|
40
|
+
tokens: string[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Reduce a question to its salient shape.
|
|
44
|
+
*
|
|
45
|
+
* Targets are the strongest signal: if two questions both name `node -c
|
|
46
|
+
* script.js`, they are the same ask however differently they are phrased. Tokens
|
|
47
|
+
* are the fallback for a question with no explicit target.
|
|
48
|
+
*/
|
|
49
|
+
export declare function questionShape(question: string): QuestionShape;
|
|
50
|
+
/** Above this overlap two questions are treated as the same ask. */
|
|
51
|
+
export declare const SAME_QUESTION_OVERLAP = 0.6;
|
|
52
|
+
/**
|
|
53
|
+
* Is this the same question as an earlier one?
|
|
54
|
+
*
|
|
55
|
+
* Targets first — a shared target means the same thing is being asked about,
|
|
56
|
+
* which is the reliable signal ("May I run `node -c script.js`?" vs "Run a
|
|
57
|
+
* JavaScript syntax check (`node -c script.js`)?"). Only when neither has a
|
|
58
|
+
* target does token overlap decide, so a genuinely different question with the
|
|
59
|
+
* same shape ("which runtime?" … "which database?") is not counted as a repeat.
|
|
60
|
+
*/
|
|
61
|
+
export declare function isSameQuestion(a: QuestionShape, b: QuestionShape): boolean;
|
|
62
|
+
/** One question the agent asked. */
|
|
63
|
+
interface AskRecord {
|
|
64
|
+
question: string;
|
|
65
|
+
shape: QuestionShape;
|
|
66
|
+
/** False when the gate settled it without showing the user. */
|
|
67
|
+
shown: boolean;
|
|
68
|
+
/** The user's answer, when there was one. */
|
|
69
|
+
answer?: string;
|
|
70
|
+
at: number;
|
|
71
|
+
}
|
|
72
|
+
/** How many of each record the trace keeps (bounded — a long run must not grow). */
|
|
73
|
+
export declare const MAX_TRACE_ENTRIES = 60;
|
|
74
|
+
/** The trace's counts, as data (see {@link RunTrace.snapshot}). */
|
|
75
|
+
export interface RunTraceSnapshot {
|
|
76
|
+
/** Questions the agent asked, including the ones a gate suppressed. */
|
|
77
|
+
asks: number;
|
|
78
|
+
/** Questions that actually reached the user — the interruptions they felt. */
|
|
79
|
+
shownAsks: number;
|
|
80
|
+
/** Questions that repeated one already asked (the loop signal). */
|
|
81
|
+
repeatedAsks: number;
|
|
82
|
+
/** Tool calls refused, by any gate. */
|
|
83
|
+
refusals: number;
|
|
84
|
+
/** Workspace mutations applied. */
|
|
85
|
+
mutations: number;
|
|
86
|
+
/** The distinct files changed. */
|
|
87
|
+
paths: string[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The run's own behaviour, as data.
|
|
91
|
+
*
|
|
92
|
+
* A class (not a plain array) because every consumer asks a QUESTION of it —
|
|
93
|
+
* "have I asked this?", "what was the answer?", "did I loop?" — and those
|
|
94
|
+
* questions should be answered in one place rather than re-derived by each
|
|
95
|
+
* caller.
|
|
96
|
+
*/
|
|
97
|
+
export declare class RunTrace {
|
|
98
|
+
private asks;
|
|
99
|
+
private refusals;
|
|
100
|
+
private mutations;
|
|
101
|
+
/** Prior asks that are the SAME question as this one (excluding it). */
|
|
102
|
+
priorAskMatches(question: string): AskRecord[];
|
|
103
|
+
/** The most recent SHOWN answer to this question, if the user gave one. */
|
|
104
|
+
priorAnswer(question: string): string | undefined;
|
|
105
|
+
/** Record that the agent asked something, and whether the user saw it. */
|
|
106
|
+
recordAsk(question: string, shown: boolean, answer?: string): void;
|
|
107
|
+
/** Prior refusals of the SAME tool for the SAME reason. */
|
|
108
|
+
priorRefusalMatches(tool: string, detail: string): number;
|
|
109
|
+
recordRefusal(tool: string, reason: string, detail: string): void;
|
|
110
|
+
recordMutation(tool: string, path?: string): void;
|
|
111
|
+
countAsks(): number;
|
|
112
|
+
countShownAsks(): number;
|
|
113
|
+
/**
|
|
114
|
+
* How many questions were asked more than once. The single number that says
|
|
115
|
+
* "this run looped on the conversation" — and the metric the fix is judged by.
|
|
116
|
+
*/
|
|
117
|
+
repeatedAskCount(): number;
|
|
118
|
+
/**
|
|
119
|
+
* The counts, as a plain object — for surfaces that need the NUMBERS rather
|
|
120
|
+
* than the prose (the loop's result, the eval metric, the dashboard badge).
|
|
121
|
+
*
|
|
122
|
+
* `shownAsks` is the one that matters to a user: how many times the run
|
|
123
|
+
* actually stopped and asked them something. `asks` counts attempts, which is
|
|
124
|
+
* the number a gate can influence before the user ever sees it.
|
|
125
|
+
*/
|
|
126
|
+
snapshot(): RunTraceSnapshot;
|
|
127
|
+
/** Distinct questions, each with how many times it was asked and its answer. */
|
|
128
|
+
askSummary(): Array<{
|
|
129
|
+
question: string;
|
|
130
|
+
times: number;
|
|
131
|
+
answer?: string;
|
|
132
|
+
}>;
|
|
133
|
+
distinctMutationPaths(): string[];
|
|
134
|
+
/**
|
|
135
|
+
* The trace as text, for the model to answer FROM.
|
|
136
|
+
*
|
|
137
|
+
* Written for a reader that must not mistake it for a summary of the work: it
|
|
138
|
+
* describes the agent's OWN behaviour, so the number it leads with is the one
|
|
139
|
+
* a stuck run needs to see — how often it repeated itself.
|
|
140
|
+
*/
|
|
141
|
+
selfReport(): string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* The correction handed back when the turn closes on a question the user has
|
|
145
|
+
* ALREADY answered.
|
|
146
|
+
*
|
|
147
|
+
* Deliberately does NOT say "proceed": a bare order to carry on would be unsafe
|
|
148
|
+
* when the answer was "no". It says the answer is already in hand — so act on
|
|
149
|
+
* it, or state plainly what blocks you. That is the difference between stopping
|
|
150
|
+
* a loop and bulldozing a decision.
|
|
151
|
+
*/
|
|
152
|
+
export declare function repeatNudge(question: string, answer?: string): string;
|
|
153
|
+
/** Is the user asking about the agent's own behaviour? */
|
|
154
|
+
export declare function detectProcessComplaint(text: string): boolean;
|
|
155
|
+
/** Is this object usable as a trace key (a session handle)? */
|
|
156
|
+
export declare function isTraceKey(key: unknown): key is object;
|
|
157
|
+
/** The trace for a conversation, created on first use. */
|
|
158
|
+
export declare function runTraceFor(key: object): RunTrace;
|
|
159
|
+
/** The trace for a conversation, or undefined when none exists yet. */
|
|
160
|
+
export declare function peekRunTrace(key: object | undefined): RunTrace | undefined;
|
|
161
|
+
/** Drop the trace (the conversation ended). */
|
|
162
|
+
export declare function clearRunTrace(key: object | undefined): void;
|
|
163
|
+
export {};
|
|
164
|
+
//# sourceMappingURL=run-trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-trace.d.ts","sourceRoot":"","sources":["../../src/learning/run-trace.ts"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QAAQ,CAOjD;AAED,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAE1E;AAED,+CAA+C;AAC/C,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAE3D"}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Run Trace — the loop's representation of ITS OWN behaviour.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS EXISTS (the "it took no concern out of it" audit):
|
|
5
|
+
*
|
|
6
|
+
* A user asked agent-nuvira, in as many words, "why are you asking me this again
|
|
7
|
+
* and again?" — and the turn did not acknowledge it. Not because the model was
|
|
8
|
+
* incapable, but because **nothing in the architecture held the fact that it had
|
|
9
|
+
* asked four times**. The loop's counters measure the loop's own NUDGES
|
|
10
|
+
* (`permissionNudges < 1`), not the model's repeated questions; the gates judge
|
|
11
|
+
* the CURRENT step's text; and the transcript is not a data structure anything
|
|
12
|
+
* reasons over. So the agent could not notice a loop, could not answer a
|
|
13
|
+
* question about one, and could not stop one.
|
|
14
|
+
*
|
|
15
|
+
* That is the whole difference between an agent that reviews its own actions and
|
|
16
|
+
* one that merely executes a pipeline: a REPRESENTATION of the run. This module
|
|
17
|
+
* is it. Every question the agent asks is recorded with a *shape*, every refused
|
|
18
|
+
* tool call is recorded with its reason, and every mutation is recorded with its
|
|
19
|
+
* target — so the run can answer three questions it previously could not:
|
|
20
|
+
*
|
|
21
|
+
* 1. "Have I already asked this?" -> the repetition gate refuses to re-ask.
|
|
22
|
+
* 2. "What did the user answer?" -> the earlier answer is handed back.
|
|
23
|
+
* 3. "Why are you asking again?" -> a self-report the model answers FROM.
|
|
24
|
+
*
|
|
25
|
+
* SCOPE: per CONVERSATION, like the intent envelope — the dashboard console
|
|
26
|
+
* keeps one plan store per session and re-injects it every turn, so the trace
|
|
27
|
+
* outlives the turn and a loop across turns is visible. Storage is bounded (the
|
|
28
|
+
* last N entries), so a long conversation cannot grow it without limit.
|
|
29
|
+
*
|
|
30
|
+
* DELIBERATELY DETERMINISTIC AND LLM-FREE: like `autonomy-policy.ts`, this is a
|
|
31
|
+
* guard rail around a model's own instinct. Asking a model "are you looping?" on
|
|
32
|
+
* every step is both expensive and unreliable; counting is neither. The model is
|
|
33
|
+
* asked to INTERPRET the trace only when the user asks about it.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* Words that carry no signal about WHAT is being asked — permission boilerplate
|
|
37
|
+
* and ordinary English. Stripping them is what lets "May I run `node -c
|
|
38
|
+
* script.js` to verify?" and "Run a JavaScript syntax check (`node -c
|
|
39
|
+
* script.js`)?" collapse to the same question.
|
|
40
|
+
*/
|
|
41
|
+
const STOPWORDS = new Set([
|
|
42
|
+
'the', 'and', 'you', 'your', 'yours', 'for', 'with', 'that', 'this', 'these', 'those',
|
|
43
|
+
'are', 'was', 'were', 'can', 'may', 'should', 'would', 'could', 'will', 'shall',
|
|
44
|
+
'please', 'want', 'like', 'let', 'me', 'us', 'to', 'of', 'in', 'on', 'at', 'by', 'it',
|
|
45
|
+
'is', 'be', 'been', 'do', 'does', 'did', 'doing', 'have', 'has', 'had', 'not', 'no',
|
|
46
|
+
'yes', 'ok', 'okay', 'a', 'an', 'i', 'we', 'my', 'our', 'about', 'then', 'than',
|
|
47
|
+
'run', 'running', 'ran', 'verify', 'verifying', 'verified', 'check', 'checking',
|
|
48
|
+
'perform', 'performing', 'before', 'after', 'now', 'again', 'sure', 'proceed',
|
|
49
|
+
'continue', 'go', 'ahead', 'use', 'using', 'make', 'making', 'need', 'needs', 'help',
|
|
50
|
+
'just', 'also', 'here', 'there', 'what', 'why', 'how', 'some', 'any', 'all',
|
|
51
|
+
]);
|
|
52
|
+
/** Normalize text for comparison (case, whitespace, punctuation-insensitive). */
|
|
53
|
+
function normalize(text) {
|
|
54
|
+
return String(text ?? '')
|
|
55
|
+
.toLowerCase()
|
|
56
|
+
.replace(/[^\p{L}\p{N}./_-]+/gu, ' ')
|
|
57
|
+
.replace(/\s+/g, ' ')
|
|
58
|
+
.trim();
|
|
59
|
+
}
|
|
60
|
+
/** File-ish and command-ish targets, matched without requiring backticks. */
|
|
61
|
+
const FILE_TARGET_RE = /\b[\w./-]+\.(?:js|cjs|mjs|ts|tsx|jsx|json|css|scss|html|md|py|go|rs|java|rb|yml|yaml|sh|toml|sql)\b/gi;
|
|
62
|
+
// NOTE: deliberately no `go`/`make`/`bun`-style English-word collisions — a
|
|
63
|
+
// command NAME is a target, but "make the logo bigger" must not become one, or
|
|
64
|
+
// two unrelated questions would collide on the shared word "make".
|
|
65
|
+
const COMMAND_TARGET_RE = /\b(?:node|npm|npx|pnpm|yarn|deno|python3?|pip3?|git|tsc|vitest|jest|mocha|cargo|docker|kubectl|curl|gh)\b[^\s`.,;:!?)]*/gi;
|
|
66
|
+
/**
|
|
67
|
+
* Reduce a question to its salient shape.
|
|
68
|
+
*
|
|
69
|
+
* Targets are the strongest signal: if two questions both name `node -c
|
|
70
|
+
* script.js`, they are the same ask however differently they are phrased. Tokens
|
|
71
|
+
* are the fallback for a question with no explicit target.
|
|
72
|
+
*/
|
|
73
|
+
export function questionShape(question) {
|
|
74
|
+
const text = String(question ?? '');
|
|
75
|
+
const targets = new Set();
|
|
76
|
+
for (const m of text.matchAll(/`([^`]+)`/g)) {
|
|
77
|
+
const t = normalize(m[1]);
|
|
78
|
+
if (t)
|
|
79
|
+
targets.add(t);
|
|
80
|
+
}
|
|
81
|
+
for (const m of text.matchAll(FILE_TARGET_RE))
|
|
82
|
+
targets.add(normalize(m[0]));
|
|
83
|
+
for (const m of text.matchAll(COMMAND_TARGET_RE)) {
|
|
84
|
+
const t = normalize(m[0]);
|
|
85
|
+
if (t)
|
|
86
|
+
targets.add(t);
|
|
87
|
+
}
|
|
88
|
+
const tokens = [...new Set(normalize(text).split(' ').filter((w) => w.length >= 3 && !STOPWORDS.has(w)))];
|
|
89
|
+
return { targets: [...targets].sort(), tokens };
|
|
90
|
+
}
|
|
91
|
+
/** Jaccard overlap of two token sets (0 when either is empty). */
|
|
92
|
+
function jaccard(a, b) {
|
|
93
|
+
if (a.length === 0 || b.length === 0)
|
|
94
|
+
return 0;
|
|
95
|
+
const setB = new Set(b);
|
|
96
|
+
const shared = a.filter((t) => setB.has(t)).length;
|
|
97
|
+
return shared / (a.length + b.length - shared);
|
|
98
|
+
}
|
|
99
|
+
/** Above this overlap two questions are treated as the same ask. */
|
|
100
|
+
export const SAME_QUESTION_OVERLAP = 0.6;
|
|
101
|
+
/**
|
|
102
|
+
* Is this the same question as an earlier one?
|
|
103
|
+
*
|
|
104
|
+
* Targets first — a shared target means the same thing is being asked about,
|
|
105
|
+
* which is the reliable signal ("May I run `node -c script.js`?" vs "Run a
|
|
106
|
+
* JavaScript syntax check (`node -c script.js`)?"). Only when neither has a
|
|
107
|
+
* target does token overlap decide, so a genuinely different question with the
|
|
108
|
+
* same shape ("which runtime?" … "which database?") is not counted as a repeat.
|
|
109
|
+
*/
|
|
110
|
+
export function isSameQuestion(a, b) {
|
|
111
|
+
if (a.targets.length > 0 && b.targets.length > 0) {
|
|
112
|
+
return a.targets.some((t) => b.targets.includes(t));
|
|
113
|
+
}
|
|
114
|
+
return jaccard(a.tokens, b.tokens) >= SAME_QUESTION_OVERLAP;
|
|
115
|
+
}
|
|
116
|
+
/** How many of each record the trace keeps (bounded — a long run must not grow). */
|
|
117
|
+
export const MAX_TRACE_ENTRIES = 60;
|
|
118
|
+
/**
|
|
119
|
+
* The run's own behaviour, as data.
|
|
120
|
+
*
|
|
121
|
+
* A class (not a plain array) because every consumer asks a QUESTION of it —
|
|
122
|
+
* "have I asked this?", "what was the answer?", "did I loop?" — and those
|
|
123
|
+
* questions should be answered in one place rather than re-derived by each
|
|
124
|
+
* caller.
|
|
125
|
+
*/
|
|
126
|
+
export class RunTrace {
|
|
127
|
+
asks = [];
|
|
128
|
+
refusals = [];
|
|
129
|
+
mutations = [];
|
|
130
|
+
/** Prior asks that are the SAME question as this one (excluding it). */
|
|
131
|
+
priorAskMatches(question) {
|
|
132
|
+
const shape = questionShape(question);
|
|
133
|
+
return this.asks.filter((a) => isSameQuestion(shape, a.shape));
|
|
134
|
+
}
|
|
135
|
+
/** The most recent SHOWN answer to this question, if the user gave one. */
|
|
136
|
+
priorAnswer(question) {
|
|
137
|
+
const matches = this.priorAskMatches(question).filter((a) => a.shown && a.answer);
|
|
138
|
+
return matches.length > 0 ? matches[matches.length - 1].answer : undefined;
|
|
139
|
+
}
|
|
140
|
+
/** Record that the agent asked something, and whether the user saw it. */
|
|
141
|
+
recordAsk(question, shown, answer) {
|
|
142
|
+
this.asks.push({
|
|
143
|
+
question: String(question ?? ''),
|
|
144
|
+
shape: questionShape(question),
|
|
145
|
+
shown,
|
|
146
|
+
...(answer ? { answer } : {}),
|
|
147
|
+
at: Date.now(),
|
|
148
|
+
});
|
|
149
|
+
if (this.asks.length > MAX_TRACE_ENTRIES)
|
|
150
|
+
this.asks.shift();
|
|
151
|
+
}
|
|
152
|
+
/** Prior refusals of the SAME tool for the SAME reason. */
|
|
153
|
+
priorRefusalMatches(tool, detail) {
|
|
154
|
+
const signature = normalize(detail).slice(0, 200);
|
|
155
|
+
return this.refusals.filter((r) => r.tool === tool && r.signature === signature).length;
|
|
156
|
+
}
|
|
157
|
+
recordRefusal(tool, reason, detail) {
|
|
158
|
+
this.refusals.push({
|
|
159
|
+
tool,
|
|
160
|
+
signature: normalize(detail).slice(0, 200),
|
|
161
|
+
detail: String(detail ?? '').slice(0, 200),
|
|
162
|
+
at: Date.now(),
|
|
163
|
+
});
|
|
164
|
+
if (this.refusals.length > MAX_TRACE_ENTRIES)
|
|
165
|
+
this.refusals.shift();
|
|
166
|
+
}
|
|
167
|
+
recordMutation(tool, path) {
|
|
168
|
+
this.mutations.push({ tool, ...(path ? { path } : {}), at: Date.now() });
|
|
169
|
+
if (this.mutations.length > MAX_TRACE_ENTRIES)
|
|
170
|
+
this.mutations.shift();
|
|
171
|
+
}
|
|
172
|
+
countAsks() {
|
|
173
|
+
return this.asks.length;
|
|
174
|
+
}
|
|
175
|
+
countShownAsks() {
|
|
176
|
+
return this.asks.filter((a) => a.shown).length;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* How many questions were asked more than once. The single number that says
|
|
180
|
+
* "this run looped on the conversation" — and the metric the fix is judged by.
|
|
181
|
+
*/
|
|
182
|
+
repeatedAskCount() {
|
|
183
|
+
let repeats = 0;
|
|
184
|
+
for (let i = 0; i < this.asks.length; i += 1) {
|
|
185
|
+
for (let j = 0; j < i; j += 1) {
|
|
186
|
+
if (isSameQuestion(this.asks[i].shape, this.asks[j].shape)) {
|
|
187
|
+
repeats += 1;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return repeats;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* The counts, as a plain object — for surfaces that need the NUMBERS rather
|
|
196
|
+
* than the prose (the loop's result, the eval metric, the dashboard badge).
|
|
197
|
+
*
|
|
198
|
+
* `shownAsks` is the one that matters to a user: how many times the run
|
|
199
|
+
* actually stopped and asked them something. `asks` counts attempts, which is
|
|
200
|
+
* the number a gate can influence before the user ever sees it.
|
|
201
|
+
*/
|
|
202
|
+
snapshot() {
|
|
203
|
+
return {
|
|
204
|
+
asks: this.asks.length,
|
|
205
|
+
shownAsks: this.countShownAsks(),
|
|
206
|
+
repeatedAsks: this.repeatedAskCount(),
|
|
207
|
+
refusals: this.refusals.length,
|
|
208
|
+
mutations: this.mutations.length,
|
|
209
|
+
paths: this.distinctMutationPaths(),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
/** Distinct questions, each with how many times it was asked and its answer. */
|
|
213
|
+
askSummary() {
|
|
214
|
+
const groups = [];
|
|
215
|
+
for (const ask of this.asks) {
|
|
216
|
+
const hit = groups.find((g) => isSameQuestion(g.shape, ask.shape));
|
|
217
|
+
if (hit) {
|
|
218
|
+
hit.times += 1;
|
|
219
|
+
if (ask.shown && ask.answer)
|
|
220
|
+
hit.answer = ask.answer;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
groups.push({ shape: ask.shape, question: ask.question, times: 1, answer: ask.shown ? ask.answer : undefined });
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return groups.map(({ question, times, answer }) => ({
|
|
227
|
+
question,
|
|
228
|
+
times,
|
|
229
|
+
...(answer ? { answer } : {}),
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
232
|
+
distinctMutationPaths() {
|
|
233
|
+
return [...new Set(this.mutations.map((m) => m.path).filter((p) => Boolean(p)))];
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* The trace as text, for the model to answer FROM.
|
|
237
|
+
*
|
|
238
|
+
* Written for a reader that must not mistake it for a summary of the work: it
|
|
239
|
+
* describes the agent's OWN behaviour, so the number it leads with is the one
|
|
240
|
+
* a stuck run needs to see — how often it repeated itself.
|
|
241
|
+
*/
|
|
242
|
+
selfReport() {
|
|
243
|
+
const lines = ['[Run trace — your own behaviour this conversation]'];
|
|
244
|
+
const shown = this.countShownAsks();
|
|
245
|
+
const repeated = this.repeatedAskCount();
|
|
246
|
+
if (this.asks.length === 0) {
|
|
247
|
+
lines.push('You have not asked the user any questions.');
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
lines.push(`You asked ${this.asks.length} question(s); ${shown} reached the user; ` +
|
|
251
|
+
`${repeated} of them repeated a question you had already asked.`);
|
|
252
|
+
for (const s of this.askSummary()) {
|
|
253
|
+
const answer = s.answer ? ` — the user answered: "${s.answer}"` : ' — no answer recorded';
|
|
254
|
+
lines.push(` • asked ${s.times}×: ${s.question.slice(0, 140)}${answer}`);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (this.refusals.length > 0) {
|
|
258
|
+
lines.push(`Refused tool calls: ${this.refusals.length}.`);
|
|
259
|
+
for (const r of this.refusals.slice(-5)) {
|
|
260
|
+
lines.push(` • ${r.tool}: ${r.detail}`);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
const paths = this.distinctMutationPaths();
|
|
264
|
+
lines.push(paths.length > 0
|
|
265
|
+
? `Files you changed: ${paths.slice(0, 10).join(', ')}${paths.length > 10 ? ` (+${paths.length - 10} more)` : ''}.`
|
|
266
|
+
: 'You have not changed any files.');
|
|
267
|
+
if (repeated > 0) {
|
|
268
|
+
lines.push('You REPEATED a question the user had already answered. Do not ask it again: ' +
|
|
269
|
+
'the answer above is the answer. Either act on it, or state plainly what blocks you.');
|
|
270
|
+
}
|
|
271
|
+
return lines.join('\n');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* The correction handed back when the turn closes on a question the user has
|
|
276
|
+
* ALREADY answered.
|
|
277
|
+
*
|
|
278
|
+
* Deliberately does NOT say "proceed": a bare order to carry on would be unsafe
|
|
279
|
+
* when the answer was "no". It says the answer is already in hand — so act on
|
|
280
|
+
* it, or state plainly what blocks you. That is the difference between stopping
|
|
281
|
+
* a loop and bulldozing a decision.
|
|
282
|
+
*/
|
|
283
|
+
export function repeatNudge(question, answer) {
|
|
284
|
+
return ('You just asked a question the user has ALREADY answered in this conversation: ' +
|
|
285
|
+
`"${String(question ?? '').slice(0, 200)}". ` +
|
|
286
|
+
(answer ? `Their answer was: "${answer}". ` : '') +
|
|
287
|
+
'Do NOT ask it again. Act on the answer you already have, or — if it genuinely ' +
|
|
288
|
+
'does not settle the matter — say plainly what blocks you and what you need, instead ' +
|
|
289
|
+
'of repeating the question. Repeating a question the user has answered is the one ' +
|
|
290
|
+
'behaviour they will read as the agent being stuck.');
|
|
291
|
+
}
|
|
292
|
+
// ─── Frame detection: when is the user asking ABOUT the run? ────────────────
|
|
293
|
+
/**
|
|
294
|
+
* The user asking about the agent's OWN behaviour ("why are you asking me this
|
|
295
|
+
* again and again?", "stop asking every second", "you keep asking permission").
|
|
296
|
+
*
|
|
297
|
+
* This is a distinct frame from a request: it is not work to be done, it is a
|
|
298
|
+
* question about the run. It must route the trace to the model rather than the
|
|
299
|
+
* ordinary "the request does not authorize files" analysis path — which is what
|
|
300
|
+
* previously happened, so the complaint was answered with planning prose and the
|
|
301
|
+
* loop continued.
|
|
302
|
+
*/
|
|
303
|
+
const PROCESS_COMPLAINT_RE = new RegExp([
|
|
304
|
+
'\\b(?:why|how\\s+come)\\b[^?]{0,80}\\b(?:ask|asks|asking|question|questions|prompt|prompts|prompting|permission)\\b',
|
|
305
|
+
'\\b(?:stop|quit|enough)\\s+(?:it\\s+)?(?:with\\s+)?(?:the\\s+)?(?:asking|questions|prompts|permission)\\b',
|
|
306
|
+
'\\byou\\s+(?:keep|kept|are\\s+always)\\s+asking\\b',
|
|
307
|
+
'\\bask(?:ing)?\\s+(?:me\\s+)?(?:again|repeatedly|every\\s+(?:second|time|step|turn))\\b',
|
|
308
|
+
'\\bsame\\s+question\\b',
|
|
309
|
+
'\\b(?:permission|approval)\\s+(?:again|every)\\b',
|
|
310
|
+
].join('|'), 'i');
|
|
311
|
+
/** Is the user asking about the agent's own behaviour? */
|
|
312
|
+
export function detectProcessComplaint(text) {
|
|
313
|
+
const t = String(text ?? '').trim();
|
|
314
|
+
if (!t)
|
|
315
|
+
return false;
|
|
316
|
+
return PROCESS_COMPLAINT_RE.test(t);
|
|
317
|
+
}
|
|
318
|
+
// ─── Per-conversation storage ───────────────────────────────────────────────
|
|
319
|
+
const traces = new WeakMap();
|
|
320
|
+
/** Is this object usable as a trace key (a session handle)? */
|
|
321
|
+
export function isTraceKey(key) {
|
|
322
|
+
return (typeof key === 'object' && key !== null) || typeof key === 'function';
|
|
323
|
+
}
|
|
324
|
+
/** The trace for a conversation, created on first use. */
|
|
325
|
+
export function runTraceFor(key) {
|
|
326
|
+
let trace = traces.get(key);
|
|
327
|
+
if (!trace) {
|
|
328
|
+
trace = new RunTrace();
|
|
329
|
+
traces.set(key, trace);
|
|
330
|
+
}
|
|
331
|
+
return trace;
|
|
332
|
+
}
|
|
333
|
+
/** The trace for a conversation, or undefined when none exists yet. */
|
|
334
|
+
export function peekRunTrace(key) {
|
|
335
|
+
return isTraceKey(key) ? traces.get(key) : undefined;
|
|
336
|
+
}
|
|
337
|
+
/** Drop the trace (the conversation ended). */
|
|
338
|
+
export function clearRunTrace(key) {
|
|
339
|
+
if (isTraceKey(key))
|
|
340
|
+
traces.delete(key);
|
|
341
|
+
}
|
|
342
|
+
//# sourceMappingURL=run-trace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-trace.js","sourceRoot":"","sources":["../../src/learning/run-trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAUH;;;;;GAKG;AACH,MAAM,SAAS,GAAwB,IAAI,GAAG,CAAC;IAC7C,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IACrF,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO;IAC/E,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACrF,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI;IACnF,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM;IAC/E,KAAK,EA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,EAAE,KAAK,GAAG,MAAM;IAqBvC;;;OAGG;IACH,cAAc,CAAC,OAAO,GAAE,OAAe,GAAG,MAAM;IA4ChD;;OAEG;IACH,UAAU,IAAI,YAAY;IAyC1B;;OAEG;IACH,KAAK,IAAI,IAAI;IAUb;;OAEG;IACH,gBAAgB,IAAI,KAAK,CAAC;QACxB,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAeF;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM;IA6BlD;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAS5B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAc1B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoBzB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAyGvB,OAAO,CAAC,SAAS;IAajB,OAAO,CAAC,SAAS;CAIlB;AAMD,wBAAgB,aAAa,IAAI,UAAU,CAK1C;AAED,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import { readFileSync, writeFileSync, existsSync, mkdirSync, readdirSync, unlinkSync } from 'node:fs';
|
|
15
15
|
import { join } from 'node:path';
|
|
16
16
|
import { resolveNuviraHome } from '../config/paths.js';
|
|
17
|
-
import { MAX_SKILLS } from './skill-types.js';
|
|
17
|
+
import { MAX_SKILLS, SKILL_PRECEDENCE_NOTE } from './skill-types.js';
|
|
18
18
|
import { ALL_BUNDLED_SKILLS as BUNDLED_SKILLS } from '../skills/bundled-skills.js';
|
|
19
19
|
import { logger } from '../utils/logger.js';
|
|
20
20
|
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
@@ -553,6 +553,10 @@ export class SkillStore {
|
|
|
553
553
|
sections.push(`- **${param.name}** ${required}${defaultVal}: ${param.description}`);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
+
// Precedence — stated before the steps so they are read as methodology,
|
|
557
|
+
// never as an authorisation to override the live request.
|
|
558
|
+
sections.push('\n## Precedence');
|
|
559
|
+
sections.push(SKILL_PRECEDENCE_NOTE);
|
|
556
560
|
// Steps (the core methodology)
|
|
557
561
|
sections.push('\n## Execution Steps');
|
|
558
562
|
sections.push('\nFollow these steps in order:');
|