@tangle-network/braid 0.1.2 → 0.1.3
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type AnalystRegistry, type
|
|
1
|
+
import { type AnalystRegistry, type TraceAnalysisEngine, type TraceAnalysisStore } from '@tangle-network/agent-eval';
|
|
2
2
|
export declare const BRAID_QUESTION_ANALYST_ID = "question";
|
|
3
3
|
declare function prepareQuestionContext(store: TraceAnalysisStore): Promise<string>;
|
|
4
4
|
export declare const BRAID_QUESTION_ANALYST_DEFINITION: Readonly<{
|
|
5
5
|
id: "question";
|
|
6
6
|
description: "Answers one operator question against one frozen run with cited evidence.";
|
|
7
7
|
area: "question-answer";
|
|
8
|
-
version: "1.
|
|
8
|
+
version: "1.5.0";
|
|
9
9
|
question: "Answer the operator question about this frozen run.";
|
|
10
10
|
instructions: string;
|
|
11
11
|
prepareContext: typeof prepareQuestionContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-analyst.d.ts","sourceRoot":"","sources":["../../../src/adapters/analysis/question-analyst.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAEpB,KAAK,
|
|
1
|
+
{"version":3,"file":"question-analyst.d.ts","sourceRoot":"","sources":["../../../src/adapters/analysis/question-analyst.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAEpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAExB,MAAM,4BAA4B,CAAA;AAGnC,eAAO,MAAM,yBAAyB,aAAa,CAAA;AAEnD,iBAAe,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAYhF;AAED,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;EAuCX,CAAA;AAMnC,yFAAyF;AACzF,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,mBAAmB,GAC1B,IAAI,CAQN"}
|
|
@@ -12,27 +12,27 @@ async function prepareQuestionContext(store) {
|
|
|
12
12
|
`Exact trace id: ${JSON.stringify(traceId)}.`,
|
|
13
13
|
'Call viewTrace for this exact id in your first code step.',
|
|
14
14
|
'Do not spend a model step printing the question or analyst instructions.',
|
|
15
|
-
'FINAL OUTPUT RULES:',
|
|
16
|
-
'Omit subject from every finding.',
|
|
17
|
-
'Every evidence object must include one exact scalar string excerpt from the cited span.',
|
|
18
|
-
'Never use an attribute label or a constructed JSON fragment as an excerpt.',
|
|
19
|
-
'For numeric facts, quote a related model, status, or output string from the same span.',
|
|
20
|
-
'Before SUBMIT, ensure each distinct request in Focus has one finding or one explicit limit.',
|
|
21
|
-
'The final call must be SUBMIT(answer=answer, findings_json=json.dumps(findings)).',
|
|
22
|
-
'Never pass either output positionally or pass the findings list without JSON encoding.',
|
|
23
15
|
].join('\n');
|
|
24
16
|
}
|
|
25
17
|
export const BRAID_QUESTION_ANALYST_DEFINITION = Object.freeze({
|
|
26
18
|
id: BRAID_QUESTION_ANALYST_ID,
|
|
27
19
|
description: 'Answers one operator question against one frozen run with cited evidence.',
|
|
28
20
|
area: 'question-answer',
|
|
29
|
-
version: '1.
|
|
21
|
+
version: '1.5.0',
|
|
30
22
|
question: 'Answer the operator question about this frozen run.',
|
|
31
23
|
instructions: [
|
|
24
|
+
'OUTPUT CONTRACT:',
|
|
25
|
+
'Omit subject from every finding.',
|
|
26
|
+
'Return one to five findings.',
|
|
27
|
+
'Every evidence object must include one exact scalar string excerpt from the cited span.',
|
|
28
|
+
'Copy each excerpt verbatim; never use an attribute label or a constructed JSON fragment.',
|
|
29
|
+
'For numeric facts, quote a related model, status, or output string from the same span.',
|
|
30
|
+
'Before SUBMIT, ensure each distinct request in Focus has one finding or one explicit limit.',
|
|
31
|
+
'The final call must be SUBMIT(answer=answer, findings_json=json.dumps(findings)).',
|
|
32
|
+
'Never pass either output positionally or pass the findings list without JSON encoding.',
|
|
32
33
|
'Answer only the operator question shown after "Focus:".',
|
|
33
34
|
'Use the trace tools before you answer.',
|
|
34
35
|
'Follow PREPARED CONTEXT and inspect its exact trace id first.',
|
|
35
|
-
'Return one to five findings.',
|
|
36
36
|
'Answer every distinct request in Focus with a finding or an explicit limitation finding.',
|
|
37
37
|
'Write each finding claim as a direct answer, not as a defect label.',
|
|
38
38
|
'Cite the exact trace span that supports each claim.',
|
|
@@ -40,13 +40,8 @@ export const BRAID_QUESTION_ANALYST_DEFINITION = Object.freeze({
|
|
|
40
40
|
'Use a higher severity only when the trace proves a risk.',
|
|
41
41
|
'If the trace cannot answer part of the question, state that limit in a finding.',
|
|
42
42
|
'Cite the nearest trace span that proves the evidence boundary.',
|
|
43
|
-
'Every citation must copy one exact string value from the cited span.',
|
|
44
|
-
'Do not prefix an excerpt with its attribute name.',
|
|
45
|
-
'For numeric facts, quote a related model, status, or output string from the same span.',
|
|
46
43
|
'Do not invent missing actions, results, costs, or verification.',
|
|
47
44
|
'Use recommended_action only to tell the reviewer what to inspect next.',
|
|
48
|
-
'Finish the investigation with SUBMIT(answer=answer, findings_json=json.dumps(findings)).',
|
|
49
|
-
'Pass findings_json as a JSON string; do not pass findings positionally or as findings.',
|
|
50
45
|
].join('\n'),
|
|
51
46
|
prepareContext: prepareQuestionContext,
|
|
52
47
|
toolGroup: 'singleTrace',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question-analyst.js","sourceRoot":"","sources":["../../../src/adapters/analysis/question-analyst.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,kBAAkB,GAInB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAA;AAEnD,KAAK,UAAU,sBAAsB,CAAC,KAAyB;IAC7D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IAC5C,MAAM,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