@descryy/mcp 0.11.8 → 0.12.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/dist/action-handshake.d.ts.map +1 -1
- package/dist/action-handshake.js +5 -1
- package/dist/action-handshake.js.map +1 -1
- package/dist/browser/driver.d.ts +74 -0
- package/dist/browser/driver.d.ts.map +1 -1
- package/dist/browser/driver.js +48 -0
- package/dist/browser/driver.js.map +1 -1
- package/dist/browser/fake-driver.d.ts +39 -0
- package/dist/browser/fake-driver.d.ts.map +1 -1
- package/dist/browser/fake-driver.js +123 -5
- package/dist/browser/fake-driver.js.map +1 -1
- package/dist/browser/fault-attribution.d.ts +75 -39
- package/dist/browser/fault-attribution.d.ts.map +1 -1
- package/dist/browser/fault-attribution.js +100 -89
- package/dist/browser/fault-attribution.js.map +1 -1
- package/dist/browser/graph-write.d.ts +22 -2
- package/dist/browser/graph-write.d.ts.map +1 -1
- package/dist/browser/graph-write.js +60 -2
- package/dist/browser/graph-write.js.map +1 -1
- package/dist/browser/identity-graph-write.d.ts +26 -2
- package/dist/browser/identity-graph-write.d.ts.map +1 -1
- package/dist/browser/identity-graph-write.js +44 -2
- package/dist/browser/identity-graph-write.js.map +1 -1
- package/dist/browser/playwright-driver.d.ts.map +1 -1
- package/dist/browser/playwright-driver.js +63 -8
- package/dist/browser/playwright-driver.js.map +1 -1
- package/dist/browser/provider.d.ts +5 -0
- package/dist/browser/provider.d.ts.map +1 -1
- package/dist/browser/provider.js.map +1 -1
- package/dist/browser/reach-recording-session.d.ts.map +1 -1
- package/dist/browser/reach-recording-session.js +10 -0
- package/dist/browser/reach-recording-session.js.map +1 -1
- package/dist/browser/scenario-runner.d.ts.map +1 -1
- package/dist/browser/scenario-runner.js +2 -0
- package/dist/browser/scenario-runner.js.map +1 -1
- package/dist/browser/tool-support.d.ts.map +1 -1
- package/dist/browser/tool-support.js +6 -1
- package/dist/browser/tool-support.js.map +1 -1
- package/dist/findings/index.d.ts +2 -0
- package/dist/findings/index.d.ts.map +1 -0
- package/dist/findings/index.js +2 -0
- package/dist/findings/index.js.map +1 -0
- package/dist/findings/store.d.ts +81 -0
- package/dist/findings/store.d.ts.map +1 -0
- package/dist/findings/store.js +148 -0
- package/dist/findings/store.js.map +1 -0
- package/dist/fs-gateway.d.ts +57 -0
- package/dist/fs-gateway.d.ts.map +1 -0
- package/dist/fs-gateway.js +86 -0
- package/dist/fs-gateway.js.map +1 -0
- package/dist/scenarios/storage.d.ts.map +1 -1
- package/dist/scenarios/storage.js +3 -3
- package/dist/scenarios/storage.js.map +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +8 -13
- package/dist/session.js.map +1 -1
- package/dist/tools/browser-read.d.ts +19 -12
- package/dist/tools/browser-read.d.ts.map +1 -1
- package/dist/tools/browser-read.js +34 -18
- package/dist/tools/browser-read.js.map +1 -1
- package/dist/tools/browser-record-start.d.ts +20 -0
- package/dist/tools/browser-record-start.d.ts.map +1 -0
- package/dist/tools/browser-record-start.js +97 -0
- package/dist/tools/browser-record-start.js.map +1 -0
- package/dist/tools/browser-record-stop.d.ts +25 -0
- package/dist/tools/browser-record-stop.d.ts.map +1 -0
- package/dist/tools/browser-record-stop.js +102 -0
- package/dist/tools/browser-record-stop.js.map +1 -0
- package/dist/tools/browser-start-session.d.ts.map +1 -1
- package/dist/tools/browser-start-session.js +12 -0
- package/dist/tools/browser-start-session.js.map +1 -1
- package/dist/tools/browser.d.ts.map +1 -1
- package/dist/tools/browser.js +6 -0
- package/dist/tools/browser.js.map +1 -1
- package/dist/tools/chain.d.ts +5 -0
- package/dist/tools/chain.d.ts.map +1 -1
- package/dist/tools/chain.js +5 -2
- package/dist/tools/chain.js.map +1 -1
- package/dist/tools/draw-conclusion.d.ts +18 -2
- package/dist/tools/draw-conclusion.d.ts.map +1 -1
- package/dist/tools/draw-conclusion.js +69 -11
- package/dist/tools/draw-conclusion.js.map +1 -1
- package/dist/tools/finding-lookup.d.ts +58 -0
- package/dist/tools/finding-lookup.d.ts.map +1 -0
- package/dist/tools/finding-lookup.js +261 -0
- package/dist/tools/finding-lookup.js.map +1 -0
- package/dist/tools/kit.d.ts +1 -1
- package/dist/tools/link-workspace.d.ts +7 -0
- package/dist/tools/link-workspace.d.ts.map +1 -1
- package/dist/tools/link-workspace.js +20 -0
- package/dist/tools/link-workspace.js.map +1 -1
- package/dist/tools/propagation.d.ts +14 -8
- package/dist/tools/propagation.d.ts.map +1 -1
- package/dist/tools/propagation.js +23 -15
- package/dist/tools/propagation.js.map +1 -1
- package/dist/tools/prove-reach.d.ts +8 -0
- package/dist/tools/prove-reach.d.ts.map +1 -1
- package/dist/tools/prove-reach.js +80 -2
- package/dist/tools/prove-reach.js.map +1 -1
- package/dist/tools/workspace.d.ts.map +1 -1
- package/dist/tools/workspace.js +10 -2
- package/dist/tools/workspace.js.map +1 -1
- package/package.json +21 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/tools/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AAwCtD,MAAM,UAAU,GAAkD;IAChE,aAAa,EAAE,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IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,CAAC;wBAC1F,WAAW,EAAE,iEAAiE;qBAC/E;oBACD,SAAS,EAAE;wBACT,IAAI,EAAE,SAAS;wBACf,WAAW,EAAE,uDAAuD;qBACrE;oBACD,MAAM,EAAE,aAAa;oBACrB,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2BAA2B,EAAE;iBACvE;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,oBAAoB,EAAE,KAAK;aAC5B;SACF;QAED,YAAY,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,yFAAyF;gBACzF,6BAA6B;SAChC;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,oBAAoB,EAAE,KAAK;CACnB,CAAC;AAEX,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,sBAAsB;IAC7B,WAAW,EACT,wFAAwF;QACxF,2FAA2F;QAC3F,+FAA+F;IACjG,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,MAAM;IACnB,GAAG;IACH,cAAc;IACd,UAAU;CACX,CAAC"}
|
package/dist/tools/chain.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ export interface ChainStageReport {
|
|
|
25
25
|
readonly node?: BriefNode;
|
|
26
26
|
/** Set iff `!present`. */
|
|
27
27
|
readonly reason?: string;
|
|
28
|
+
/** B1: true when a real browser interaction resolved to this exact node (witnessed),
|
|
29
|
+
* false when it is graph-only, omitted wherever the distinction does not apply. See
|
|
30
|
+
* `ChainStage.witnessed` (`@descryy/core`) for the full reasoning — meaningful only on
|
|
31
|
+
* the "click" stage. */
|
|
32
|
+
readonly witnessed?: boolean;
|
|
28
33
|
}
|
|
29
34
|
export interface ChainReport {
|
|
30
35
|
readonly origin: BriefNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../src/tools/chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../src/tools/chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAA2D,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE7G,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,KAAK,cAAc,EACpB,MAAM,UAAU,CAAC;AAIlB,6DAA6D;AAC7D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;2DAEuD;IACvD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,0BAA0B;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;6BAGyB;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,YAAY,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACjF;AAED,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,cAAc,CAAC;AAoFrD,eAAO,MAAM,SAAS,EAAE,cAYvB,CAAC"}
|
package/dist/tools/chain.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* only. Neither is a language check here — this tool walks whatever edges
|
|
14
14
|
* the graph holds and reports what it finds.
|
|
15
15
|
*/
|
|
16
|
-
import { traceUserChain } from "@descryy/core";
|
|
16
|
+
import { hasObservedInteraction, traceUserChain } from "@descryy/core";
|
|
17
17
|
import { briefNode, optionalString, ToolInputError, } from "./kit.js";
|
|
18
18
|
import { resolveOneNode } from "./lookup.js";
|
|
19
19
|
function reportStage(stage) {
|
|
@@ -22,6 +22,7 @@ function reportStage(stage) {
|
|
|
22
22
|
present: stage.present,
|
|
23
23
|
...(stage.node === null ? {} : { node: briefNode(stage.node) }),
|
|
24
24
|
...(stage.reason === null ? {} : { reason: stage.reason }),
|
|
25
|
+
...(stage.witnessed === null ? {} : { witnessed: stage.witnessed }),
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
const SCHEMA = {
|
|
@@ -63,7 +64,9 @@ async function run(args, ctx) {
|
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
ctx.progress(`Walking the chain from ${found.node.name}`);
|
|
66
|
-
const chain = traceUserChain(provider, found.node.id
|
|
67
|
+
const chain = traceUserChain(provider, found.node.id, {
|
|
68
|
+
isWitnessed: (nodeId) => hasObservedInteraction(ctx.session.store().driver, nodeId),
|
|
69
|
+
});
|
|
67
70
|
const notes = [...found.notes, ...chain.notes];
|
|
68
71
|
return {
|
|
69
72
|
result: {
|
package/dist/tools/chain.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/tools/chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAwC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/tools/chain.ts"],"names":[],"mappings":"AAAA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AAK,EAAE,MAAM;IACb,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,yEAAyE;IAChF,WAAW,EACT,0FAA0F;QAC1F,yFAAyF;QACzF,iGAAiG;IACnG,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
|
@@ -20,11 +20,27 @@
|
|
|
20
20
|
* `class: "read"` — same as this server's other three conclusion tools (`validate`, `contracts`,
|
|
21
21
|
* `cross_pr`): it changes nothing and mints no token. A category computed from evidence the
|
|
22
22
|
* caller already supplied is a read over that evidence, not a new write against the target.
|
|
23
|
+
*
|
|
24
|
+
* **`verb`, since 1.1.0.** `gate` is everything above, unchanged. `get`/`list`
|
|
25
|
+
* (`./finding-lookup.ts`) read a governed finding back from `.descry/findings/` — the read half
|
|
26
|
+
* of the write `prove_reach` already performs, so a later session, a different tool, or a person
|
|
27
|
+
* can retrieve a conclusion this surface minted rather than it existing only in that call's own
|
|
28
|
+
* reply. Folded into this tool rather than a sixteenth one: both `get`/`list` and `gate` are
|
|
29
|
+
* `class: "read"`, `tier: "conclusion"` — the same read-a-governed-finding contract, one reading
|
|
30
|
+
* evidence just supplied, the other reading evidence a past call persisted. Ratified by
|
|
31
|
+
* `DEC-NEXT-draw-conclusion-finding-lookup-verbs.md`. **Breaking**: `verb` is now required — a
|
|
32
|
+
* caller invoking the old single-purpose shape with no `verb` is refused, the same tradeoff
|
|
33
|
+
* `check`/`reach` already made when they merged.
|
|
23
34
|
*/
|
|
24
35
|
import { type ResolutionLevel } from "@descryy/ir";
|
|
25
36
|
import { type ToolContext, type ToolDefinition } from "./kit.ts";
|
|
37
|
+
import { type FindingGetData, type FindingListData } from "./finding-lookup.ts";
|
|
26
38
|
import type { ToolAnswer } from "../render.ts";
|
|
27
|
-
|
|
39
|
+
/** The union `draw_conclusion` can return today — `gate`'s own shape plus the two read verbs'.
|
|
40
|
+
* A verb added without extending this union does not compile (`output-shapes.test.ts`'s own
|
|
41
|
+
* reasoning for why a merged tool's declared type is a union, not a lie). */
|
|
42
|
+
export type DrawConclusionData = GateConclusionData | FindingGetData | FindingListData;
|
|
43
|
+
export interface GateConclusionData {
|
|
28
44
|
readonly failurePoint: string;
|
|
29
45
|
/** §19's five-category vocabulary — the same `ReportCategory` the desktop's report surface renders. */
|
|
30
46
|
readonly category: string;
|
|
@@ -50,6 +66,6 @@ export interface DrawConclusionData {
|
|
|
50
66
|
* compile. The tool object stays the registry's entry point; this is the typed
|
|
51
67
|
* one, for tests and for any in-process caller that needs the shape.
|
|
52
68
|
*/
|
|
53
|
-
export declare function runDrawConclusion(args: Record<string, unknown>, ctx: ToolContext): Promise<ToolAnswer<
|
|
69
|
+
export declare function runDrawConclusion(args: Record<string, unknown>, ctx: ToolContext): Promise<ToolAnswer<GateConclusionData>>;
|
|
54
70
|
export declare const drawConclusionTool: ToolDefinition;
|
|
55
71
|
//# sourceMappingURL=draw-conclusion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-conclusion.d.ts","sourceRoot":"","sources":["../../src/tools/draw-conclusion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"draw-conclusion.d.ts","sourceRoot":"","sources":["../../src/tools/draw-conclusion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAYL,KAAK,eAAe,EAGrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAA4E,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAE3I,OAAO,EAAiC,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC/G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;8EAE8E;AAC9E,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG,cAAc,GAAG,eAAe,CAAC;AAEvF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,uGAAuG;IACvG,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,0GAA0G;IAC1G,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IACrC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC;mFAC+E;IAC/E,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAoKD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,GAAG,EAAE,WAAW,GACf,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CA0EzC;AASD,eAAO,MAAM,kBAAkB,EAAE,cAchC,CAAC"}
|
|
@@ -20,9 +20,22 @@
|
|
|
20
20
|
* `class: "read"` — same as this server's other three conclusion tools (`validate`, `contracts`,
|
|
21
21
|
* `cross_pr`): it changes nothing and mints no token. A category computed from evidence the
|
|
22
22
|
* caller already supplied is a read over that evidence, not a new write against the target.
|
|
23
|
+
*
|
|
24
|
+
* **`verb`, since 1.1.0.** `gate` is everything above, unchanged. `get`/`list`
|
|
25
|
+
* (`./finding-lookup.ts`) read a governed finding back from `.descry/findings/` — the read half
|
|
26
|
+
* of the write `prove_reach` already performs, so a later session, a different tool, or a person
|
|
27
|
+
* can retrieve a conclusion this surface minted rather than it existing only in that call's own
|
|
28
|
+
* reply. Folded into this tool rather than a sixteenth one: both `get`/`list` and `gate` are
|
|
29
|
+
* `class: "read"`, `tier: "conclusion"` — the same read-a-governed-finding contract, one reading
|
|
30
|
+
* evidence just supplied, the other reading evidence a past call persisted. Ratified by
|
|
31
|
+
* `DEC-NEXT-draw-conclusion-finding-lookup-verbs.md`. **Breaking**: `verb` is now required — a
|
|
32
|
+
* caller invoking the old single-purpose shape with no `verb` is refused, the same tradeoff
|
|
33
|
+
* `check`/`reach` already made when they merged.
|
|
23
34
|
*/
|
|
24
|
-
import { directMechanismEvidence, evidencePrecondition, humanAssertedOnPath, independentSignalTypes, minimumResolution, reportCategory, RESOLUTION_LEVELS, RUNTIME_SIGNAL_TYPES, } from "@descryy/ir";
|
|
35
|
+
import { deriveNameLevel, directMechanismEvidence, evidencePrecondition, humanAssertedOnPath, independentSignalTypes, minimumResolution, reportCategory, RESOLUTION_LEVELS, RUNTIME_SIGNAL_TYPES, } from "@descryy/ir";
|
|
25
36
|
import { answer, optionalBoolean, optionalInteger, requiredString, ToolInputError } from "./kit.js";
|
|
37
|
+
import { selectVerb } from "./verb.js";
|
|
38
|
+
import { runFindingGet, runFindingList } from "./finding-lookup.js";
|
|
26
39
|
const EDGE_TYPE_ENUM = [
|
|
27
40
|
"CALLS",
|
|
28
41
|
"IMPORTS",
|
|
@@ -40,12 +53,25 @@ const EDGE_TYPE_ENUM = [
|
|
|
40
53
|
"CHANGES_WITH",
|
|
41
54
|
"INCIDENT_CORRELATED",
|
|
42
55
|
];
|
|
56
|
+
const VERBS = ["gate", "get", "list"];
|
|
57
|
+
const VERB_SPECS = [
|
|
58
|
+
{ verb: "gate", accepts: ["failurePoint", "graphPath", "runtimeEvidence", "nameLevel", "reproductionCount"] },
|
|
59
|
+
{ verb: "get", accepts: ["id"] },
|
|
60
|
+
{ verb: "list", accepts: ["limit"] },
|
|
61
|
+
];
|
|
43
62
|
const SCHEMA = {
|
|
44
63
|
type: "object",
|
|
45
64
|
properties: {
|
|
65
|
+
verb: {
|
|
66
|
+
type: "string",
|
|
67
|
+
enum: [...VERBS],
|
|
68
|
+
description: "gate: compute a governed category from evidence and a graph path you already hold. " +
|
|
69
|
+
"get: read one previously-gated finding back from .descry/findings/, by id. " +
|
|
70
|
+
"list: recent stored findings, newest first.",
|
|
71
|
+
},
|
|
46
72
|
failurePoint: {
|
|
47
73
|
type: "string",
|
|
48
|
-
description: "Node id claimed to have failed; must match a runtime observation's nodeId exactly.",
|
|
74
|
+
description: "gate only, REQUIRED. Node id claimed to have failed; must match a runtime observation's nodeId exactly.",
|
|
49
75
|
},
|
|
50
76
|
graphPath: {
|
|
51
77
|
type: "array",
|
|
@@ -86,14 +112,24 @@ const SCHEMA = {
|
|
|
86
112
|
},
|
|
87
113
|
nameLevel: {
|
|
88
114
|
type: "boolean",
|
|
89
|
-
description: "
|
|
115
|
+
description: "Derived from graphPath (only name-resolution edges = name-level). If given, it can only " +
|
|
116
|
+
"lower that: false wins, true is ignored unless the derivation agrees.",
|
|
90
117
|
},
|
|
91
118
|
reproductionCount: {
|
|
92
119
|
type: "integer",
|
|
93
|
-
description: "Independent times observed. Optional; echoed back, doesn't yet affect reportCategory.",
|
|
120
|
+
description: "gate only. Independent times observed. Optional; echoed back, doesn't yet affect reportCategory.",
|
|
121
|
+
},
|
|
122
|
+
id: {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "get only, REQUIRED. The finding id to read back, as returned by prove_reach's persistedFindingId.",
|
|
125
|
+
},
|
|
126
|
+
limit: {
|
|
127
|
+
type: "integer",
|
|
128
|
+
minimum: 1,
|
|
129
|
+
description: "list only. Cap on findings in the reply, newest first. Default 20.",
|
|
94
130
|
},
|
|
95
131
|
},
|
|
96
|
-
required: ["
|
|
132
|
+
required: ["verb"],
|
|
97
133
|
additionalProperties: false,
|
|
98
134
|
};
|
|
99
135
|
function readGraphPath(args) {
|
|
@@ -174,7 +210,13 @@ export async function runDrawConclusion(args, ctx) {
|
|
|
174
210
|
const failurePoint = requiredString(args, "failurePoint");
|
|
175
211
|
const graphPath = readGraphPath(args);
|
|
176
212
|
const runtimeEvidence = readRuntimeEvidence(args);
|
|
177
|
-
|
|
213
|
+
// Server-derived, deterministic — never the caller's own say-so. A supplied "nameLevel" may
|
|
214
|
+
// only lower this: combined by AND, so `true` is inert unless the derivation independently
|
|
215
|
+
// agrees, and an omitted value leaves the derivation untouched. See the schema doc above and
|
|
216
|
+
// DEC-NEXT-deterministic-name-level-derivation.md.
|
|
217
|
+
const derivedNameLevel = deriveNameLevel({ graphPath });
|
|
218
|
+
const suppliedNameLevel = optionalBoolean(args, "nameLevel");
|
|
219
|
+
const nameLevel = derivedNameLevel && (suppliedNameLevel ?? true);
|
|
178
220
|
const reproductionCount = optionalInteger(args, "reproductionCount", 0) ?? null;
|
|
179
221
|
const hasRuntimeEvidence = evidencePrecondition(runtimeEvidence);
|
|
180
222
|
const resolution = minimumResolution(graphPath);
|
|
@@ -214,6 +256,11 @@ export async function runDrawConclusion(args, ctx) {
|
|
|
214
256
|
...(runtimeEvidence.length === 0
|
|
215
257
|
? ["\"runtimeEvidence\" was empty, so G3 fails and this call returns \"unconfirmed\" regardless of graphPath."]
|
|
216
258
|
: []),
|
|
259
|
+
...(suppliedNameLevel === true && !derivedNameLevel
|
|
260
|
+
? ["\"nameLevel: true\" was supplied but ignored — deriveNameLevel found no deterministic " +
|
|
261
|
+
"basis for it in \"graphPath\", and a supplied value can only lower this tool's own " +
|
|
262
|
+
"derivation, never raise it."]
|
|
263
|
+
: []),
|
|
217
264
|
],
|
|
218
265
|
data: {
|
|
219
266
|
failurePoint,
|
|
@@ -229,15 +276,26 @@ export async function runDrawConclusion(args, ctx) {
|
|
|
229
276
|
},
|
|
230
277
|
});
|
|
231
278
|
}
|
|
279
|
+
async function run(args, ctx) {
|
|
280
|
+
const verb = selectVerb(args, "verb", VERB_SPECS);
|
|
281
|
+
if (verb === "gate")
|
|
282
|
+
return (await runDrawConclusion(args, ctx));
|
|
283
|
+
if (verb === "get")
|
|
284
|
+
return (await runFindingGet(args, ctx));
|
|
285
|
+
return (await runFindingList(args, ctx));
|
|
286
|
+
}
|
|
232
287
|
export const drawConclusionTool = {
|
|
233
288
|
name: "draw_conclusion",
|
|
234
289
|
class: "read",
|
|
235
290
|
tier: "conclusion",
|
|
236
|
-
version: "1.
|
|
237
|
-
title: "Gate evidence
|
|
238
|
-
description: "
|
|
239
|
-
"the governance gate assigns them. Does not gather evidence itself; states a
|
|
291
|
+
version: "1.1.0",
|
|
292
|
+
title: "Gate evidence into a governed finding category, or read one back",
|
|
293
|
+
description: "gate: take a graph path and runtime evidence you already hold, and return the report " +
|
|
294
|
+
"category the governance gate assigns them. Does not gather evidence itself; states a " +
|
|
295
|
+
"verdict. get: read one previously-gated finding back from .descry/findings/, by id — " +
|
|
296
|
+
"category, file, line, evidence, diagnosis and recommended action. list: recent stored " +
|
|
297
|
+
"findings, newest first.",
|
|
240
298
|
inputSchema: SCHEMA,
|
|
241
|
-
run
|
|
299
|
+
run,
|
|
242
300
|
};
|
|
243
301
|
//# sourceMappingURL=draw-conclusion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-conclusion.js","sourceRoot":"","sources":["../../src/tools/draw-conclusion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"draw-conclusion.js","sourceRoot":"","sources":["../../src/tools/draw-conclusion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,GAMrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAyC,MAAM,UAAU,CAAC;AAC3I,OAAO,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAA6C,MAAM,qBAAqB,CAAC;AA0B/G,MAAM,cAAc,GA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AAG,CAAC,CAAmC,CAAC;IACnG,IAAI,IAAI,KAAK,KAAK;QAAE,OAAO,CAAC,MAAM,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAmC,CAAC;IAC9F,OAAO,CAAC,MAAM,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAmC,CAAC;AAC7E,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAmB;IAChD,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,kEAAkE;IACzE,WAAW,EACT,uFAAuF;QACvF,uFAAuF;QACvF,uFAAuF;QACvF,wFAAwF;QACxF,yBAAyB;IAC3B,WAAW,EAAE,MAA4C;IACzD,GAAG;CACJ,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `draw_conclusion`'s `get`/`list` verbs — a read-class way for any MCP-connected agent to fetch
|
|
3
|
+
* a governed finding back from `.descry/findings/` (`../findings/store.ts`), rather than only
|
|
4
|
+
* being able to mint one (`gate`, `../draw-conclusion.ts`'s original behaviour) or lose it the
|
|
5
|
+
* moment a caller's own reply is gone.
|
|
6
|
+
*
|
|
7
|
+
* Lives in its own file rather than inline in `draw-conclusion.ts` for the same reason
|
|
8
|
+
* `predict-reach.ts`/`propose-journey.ts` sit beside `reach.ts`: the dispatcher stays readable,
|
|
9
|
+
* and each verb's own logic is one file a reader can hold in their head. Unlike those two,
|
|
10
|
+
* `get`/`list` never existed as standalone top-level tools, so there is no retired name to alias
|
|
11
|
+
* — `tools/aliases.ts` gets no new entry for this merge.
|
|
12
|
+
*
|
|
13
|
+
* `class: "read"`, same as `gate`: reading a finding back changes nothing and mints no token.
|
|
14
|
+
* `tier: "conclusion"`, same as `gate`: a stored finding's `category` is a G4-gated verdict, not
|
|
15
|
+
* a graph fact — the same reasoning `tool-tiers.test.ts` already states for `gate` itself.
|
|
16
|
+
*/
|
|
17
|
+
import { type BriefNode, type ToolContext } from "./kit.ts";
|
|
18
|
+
import type { ToolAnswer } from "../render.ts";
|
|
19
|
+
export interface FindingGetData {
|
|
20
|
+
readonly id: string;
|
|
21
|
+
/** `false` means nothing is stored under this id — not the same as an empty finding. */
|
|
22
|
+
readonly found: boolean;
|
|
23
|
+
readonly producedBy: string | null;
|
|
24
|
+
readonly recordedAt: string | null;
|
|
25
|
+
/** §19's category, rederived from the stored G4 inputs — never the cached string, per
|
|
26
|
+
* `../findings/store.ts`'s own doc comment on why a reader calls `rederive()`. */
|
|
27
|
+
readonly category: string | null;
|
|
28
|
+
readonly reliabilityClass: string | null;
|
|
29
|
+
readonly finding: string | null;
|
|
30
|
+
readonly scope: string | null;
|
|
31
|
+
readonly recommendedAction: string | null;
|
|
32
|
+
readonly evidence: readonly string[];
|
|
33
|
+
readonly affectedComponents: readonly BriefNode[];
|
|
34
|
+
/** Filled from the primary affected component's own graph range when the finding recorded
|
|
35
|
+
* none directly — item 4's "fill the line from the node" rule. */
|
|
36
|
+
readonly file: string | null;
|
|
37
|
+
readonly line: number | null;
|
|
38
|
+
/** Non-null only when `file`/`line` came from a fallback (the endpoint's handler), not the
|
|
39
|
+
* finding's own primary node — e.g. `"handler of GET /orders"`. */
|
|
40
|
+
readonly locatedVia: string | null;
|
|
41
|
+
readonly relevantChange: string | null;
|
|
42
|
+
}
|
|
43
|
+
export declare function runFindingGet(args: Record<string, unknown>, ctx: ToolContext): Promise<ToolAnswer<FindingGetData>>;
|
|
44
|
+
export interface FindingListItem {
|
|
45
|
+
readonly id: string;
|
|
46
|
+
readonly producedBy: string;
|
|
47
|
+
readonly recordedAt: string;
|
|
48
|
+
readonly category: string;
|
|
49
|
+
readonly finding: string;
|
|
50
|
+
}
|
|
51
|
+
export interface FindingListData {
|
|
52
|
+
readonly findings: readonly FindingListItem[];
|
|
53
|
+
/** Count before `limit` — honest about what was capped, same convention as
|
|
54
|
+
* `similar_incidents`'s `matchesTotal`. */
|
|
55
|
+
readonly total: number;
|
|
56
|
+
}
|
|
57
|
+
export declare function runFindingList(args: Record<string, unknown>, ctx: ToolContext): Promise<ToolAnswer<FindingListData>>;
|
|
58
|
+
//# sourceMappingURL=finding-lookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finding-lookup.d.ts","sourceRoot":"","sources":["../../src/tools/finding-lookup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA0C/C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;uFACmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,kBAAkB,EAAE,SAAS,SAAS,EAAE,CAAC;IAClD;uEACmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;wEACoE;IACpE,QAAQ,CAAC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