@descryy/mcp 0.11.2 → 0.11.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.
- package/dist/bin/descry-mcp.js +6 -0
- package/dist/bin/descry-mcp.js.map +1 -1
- package/dist/browser/auth.d.ts +8 -0
- package/dist/browser/auth.d.ts.map +1 -1
- package/dist/browser/auth.js +12 -2
- package/dist/browser/auth.js.map +1 -1
- package/dist/credential-store.d.ts +22 -0
- package/dist/credential-store.d.ts.map +1 -0
- package/dist/credential-store.js +33 -0
- package/dist/credential-store.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/planner/predict-then-propose.d.ts +34 -1
- package/dist/planner/predict-then-propose.d.ts.map +1 -1
- package/dist/planner/predict-then-propose.js +51 -1
- package/dist/planner/predict-then-propose.js.map +1 -1
- package/dist/planner/propose-journey.d.ts +15 -0
- package/dist/planner/propose-journey.d.ts.map +1 -1
- package/dist/planner/propose-journey.js.map +1 -1
- package/dist/scenarios/browser-run-plan-projection.d.ts +24 -6
- package/dist/scenarios/browser-run-plan-projection.d.ts.map +1 -1
- package/dist/scenarios/browser-run-plan-projection.js +45 -9
- package/dist/scenarios/browser-run-plan-projection.js.map +1 -1
- package/dist/tools/browser-start-session.d.ts.map +1 -1
- package/dist/tools/browser-start-session.js +57 -11
- package/dist/tools/browser-start-session.js.map +1 -1
- package/dist/tools/browser.d.ts.map +1 -1
- package/dist/tools/browser.js +9 -0
- package/dist/tools/browser.js.map +1 -1
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +5 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/observe-runtime.d.ts +27 -0
- package/dist/tools/observe-runtime.d.ts.map +1 -1
- package/dist/tools/observe-runtime.js +230 -4
- package/dist/tools/observe-runtime.js.map +1 -1
- package/dist/tools/observe.d.ts.map +1 -1
- package/dist/tools/observe.js +45 -0
- package/dist/tools/observe.js.map +1 -1
- package/dist/tools/prove-reach.d.ts +74 -0
- package/dist/tools/prove-reach.d.ts.map +1 -0
- package/dist/tools/prove-reach.js +286 -0
- package/dist/tools/prove-reach.js.map +1 -0
- package/package.json +25 -21
package/dist/tools/observe.js
CHANGED
|
@@ -36,6 +36,8 @@ const VERB_SPECS = [
|
|
|
36
36
|
"filesystemPolicy",
|
|
37
37
|
"networkPolicy",
|
|
38
38
|
"sandboxBackend",
|
|
39
|
+
"journey",
|
|
40
|
+
"database",
|
|
39
41
|
],
|
|
40
42
|
},
|
|
41
43
|
{ verb: "tests", accepts: ["command", "cwd"] },
|
|
@@ -227,6 +229,49 @@ const SCHEMA = {
|
|
|
227
229
|
description: 'runtime only. Mechanism enforcing filesystemPolicy/networkPolicy. Defaults to "bwrap" ' +
|
|
228
230
|
'(Linux). "container" is the only option on macOS/Windows and does not compose with resourceLimits.',
|
|
229
231
|
},
|
|
232
|
+
journey: {
|
|
233
|
+
type: "object",
|
|
234
|
+
description: "runtime only. Drive a real browser inside this run's readiness window, so browser and backend " +
|
|
235
|
+
'evidence share one executionId. Omit for backend-only. Declare exactly one of "scenario" or ' +
|
|
236
|
+
'"startUrl"; no journey is invented.',
|
|
237
|
+
properties: {
|
|
238
|
+
service: { type: "string", description: "Which declared service the browser evidence is attributed to. Optional." },
|
|
239
|
+
scenario: {
|
|
240
|
+
type: "string",
|
|
241
|
+
description: "A committed scenario under descry/scenarios/, replayed in the readiness window from its own targetUrl.",
|
|
242
|
+
},
|
|
243
|
+
startUrl: { type: "string", description: 'Navigate here and observe, with no steps. Mutually exclusive with "scenario".' },
|
|
244
|
+
recordVideo: { type: "boolean", description: "Off by default. Returned as a VIDEO evidence artifact." },
|
|
245
|
+
headless: { type: "boolean", description: "Defaults to true." },
|
|
246
|
+
settleForMs: {
|
|
247
|
+
type: "integer",
|
|
248
|
+
description: "How long the page stays alive after the last step for late console/network activity. Defaults to 1000.",
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
additionalProperties: false,
|
|
252
|
+
},
|
|
253
|
+
database: {
|
|
254
|
+
type: "object",
|
|
255
|
+
description: "runtime only. The Postgres channel: where to tail the server's statement log from, so queries " +
|
|
256
|
+
"issued during the observation window become DATABASE_QUERY evidence. Node services get the " +
|
|
257
|
+
"node:sqlite preload with no declaration. Omit for no Postgres channel — the reply discloses it.",
|
|
258
|
+
properties: {
|
|
259
|
+
statementLog: {
|
|
260
|
+
type: "object",
|
|
261
|
+
description: "Never turns Postgres logging on — reads whatever the deployment already produces.",
|
|
262
|
+
properties: {
|
|
263
|
+
kind: { type: "string", enum: ["file", "dockerContainer"] },
|
|
264
|
+
path: { type: "string", description: 'kind "file": a log file the deployment already writes to.' },
|
|
265
|
+
container: { type: "string", description: 'kind "dockerContainer": tails `docker logs -f` for this container.' },
|
|
266
|
+
},
|
|
267
|
+
required: ["kind"],
|
|
268
|
+
additionalProperties: false,
|
|
269
|
+
},
|
|
270
|
+
service: { type: "string", description: "Which declared service the DATABASE_QUERY evidence is attributed to. Optional." },
|
|
271
|
+
},
|
|
272
|
+
required: ["statementLog"],
|
|
273
|
+
additionalProperties: false,
|
|
274
|
+
},
|
|
230
275
|
// --- tests only ---
|
|
231
276
|
command: {
|
|
232
277
|
type: "string",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.js","sourceRoot":"","sources":["../../src/tools/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAEpF,OAAO,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AAGtD,OAAO,EACL,GAAG,IAAI,UAAU,EACjB,cAAc,IAAI,qBAAqB,EACvC,8BAA8B,GAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,GAAG,IAAI,QAAQ,EAAE,cAAc,IAAI,mBAAmB,EAAE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AAG,CAAC,CAAC;AAC1E,CAAC;AAED;;;qEAGqE;AACrE,SAAS,cAAc,CAAC,IAA6B,EAAE,GAAgB;IACrE,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;IAChE,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;AAC3F,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,6CAA6C;IACpD,WAAW,EACT,+FAA+F;QAC/F,+FAA+F;QAC/F,8FAA8F;QAC9F,4FAA4F;QAC5F,+FAA+F;QAC/F,4DAA4D;QAC5D,gGAAgG;QAChG,gGAAgG;QAChG,gGAAgG;QAChG,sDAAsD;IACxD,WAAW,EAAE,MAA4C;IACzD,GAAG;IACH,cAAc;CACf,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `prove_reach` — closes RG-10's loop. "Rename that column and these screens go blank" is
|
|
3
|
+
* three claims, made in order, each on evidence the last one didn't have:
|
|
4
|
+
*
|
|
5
|
+
* 1. **Predict** — from a node (typically a `DATABASE_COLUMN`), walk `reachablePages`
|
|
6
|
+
* (`@descryy/core`) to whatever `PAGE`/`COMPONENT` nodes the data reaches, and propose a
|
|
7
|
+
* navigate-only journey to them, exactly as `predict_reach` already does — this tool calls
|
|
8
|
+
* the identical pure planner (`../planner/predict-then-propose.ts#predictThenPropose`), never
|
|
9
|
+
* a second implementation. Nothing runs yet: a caller who has not yet approved the drive gets
|
|
10
|
+
* back the prediction, the proposal and a confirmation token, and this tool's `describeAction`
|
|
11
|
+
* is what mints that token — the dispatcher (`../action-handshake.ts`) never calls `run` at
|
|
12
|
+
* all until the second call arrives, so "nothing runs" is structural, not a promise this file
|
|
13
|
+
* keeps by convention.
|
|
14
|
+
* 2. **Approve and drive** — a second call, `confirmToken` in hand, drives the exact proposed
|
|
15
|
+
* scenario for real via `../browser/scenario-runner.ts#replayScenario`, in a browser session
|
|
16
|
+
* the caller already started and consented (`browser({ verb: "start_session" })`). Never boots an app,
|
|
17
|
+
* never widens the journey beyond what was proposed: the scenario driven is the one frozen at
|
|
18
|
+
* mint time, byte for byte.
|
|
19
|
+
* 3. **Prove** — correlates which of the predicted pages the drive's own step results actually
|
|
20
|
+
* reached (`../planner/predict-then-propose.ts#visitedPageIds` + `#proveOrDisprove`) — a page
|
|
21
|
+
* counts as visited only when the exact navigate URL built from its own route name replayed
|
|
22
|
+
* as `"ran"`, never a guess from proximity.
|
|
23
|
+
* 4. **Conclude** — routes the real, walked graph path (`#combinedGraphPath`, never a synthesised
|
|
24
|
+
* one) and the runtime evidence the drive actually observed (console errors, failed requests)
|
|
25
|
+
* through the same finding funnel `draw_conclusion` uses — `reportCategory`, `@descryy/ir`,
|
|
26
|
+
* `packages/ir/src/finding.ts` — so the reply carries a governed category, not a raw tally the
|
|
27
|
+
* caller has to interpret. A drive that reached every predicted page cleanly, with nothing
|
|
28
|
+
* wrong observed, reports so honestly: `hasRuntimeEvidence` is false and the category is
|
|
29
|
+
* `unconfirmed` by G3's own precondition, not "confirmed" because the pages loaded.
|
|
30
|
+
*
|
|
31
|
+
* **class: "action"**, gated only when there is something to drive: a node that reaches nothing,
|
|
32
|
+
* or reaches only non-path-shaped pages/components with no navigate step to propose, has nothing
|
|
33
|
+
* to approve, so `describeAction` returns `undefined` and this reports the prediction immediately
|
|
34
|
+
* — same discipline as `predict_reach`'s own empty case, never a gate for its own sake.
|
|
35
|
+
*/
|
|
36
|
+
import { type ProvenReach } from "../planner/predict-then-propose.ts";
|
|
37
|
+
import type { JourneyCandidateNode } from "../planner/propose-journey.ts";
|
|
38
|
+
import type { Scenario } from "../scenarios/index.ts";
|
|
39
|
+
import { type BriefNode, type NodeCandidates, type ToolDefinition } from "./kit.ts";
|
|
40
|
+
export interface DriveResult {
|
|
41
|
+
readonly outcome: "passed" | "failed" | "unresolved" | "unverified";
|
|
42
|
+
readonly steps: readonly {
|
|
43
|
+
readonly url: string;
|
|
44
|
+
readonly status: string;
|
|
45
|
+
}[];
|
|
46
|
+
readonly consoleErrorCount: number;
|
|
47
|
+
readonly failedRequestCount: number;
|
|
48
|
+
}
|
|
49
|
+
export interface ProveReachReport {
|
|
50
|
+
readonly from: BriefNode;
|
|
51
|
+
readonly reachedPages: readonly BriefNode[];
|
|
52
|
+
readonly proposal: {
|
|
53
|
+
readonly scenario: Scenario;
|
|
54
|
+
readonly reachedNotProposed: readonly JourneyCandidateNode[];
|
|
55
|
+
} | null;
|
|
56
|
+
/** Null until a real drive ran — this call's own drive, never a caller-supplied one (that join
|
|
57
|
+
* is `predict_reach`'s `observedNodeIds`, a different, evidence-already-in-hand path). */
|
|
58
|
+
readonly drive: DriveResult | null;
|
|
59
|
+
readonly proof: ProvenReach | null;
|
|
60
|
+
/** The governed finding — null only when nothing was driven, because a category about a drive
|
|
61
|
+
* that never happened would be a claim this tool has no evidence for. */
|
|
62
|
+
readonly conclusion: {
|
|
63
|
+
readonly failurePoint: string;
|
|
64
|
+
readonly category: string;
|
|
65
|
+
readonly reliabilityClass: string;
|
|
66
|
+
readonly resolution: number;
|
|
67
|
+
readonly independentSignalTypes: number;
|
|
68
|
+
readonly directMechanismEvidence: boolean;
|
|
69
|
+
readonly hasRuntimeEvidence: boolean;
|
|
70
|
+
} | null;
|
|
71
|
+
}
|
|
72
|
+
export type ProveReachData = ProveReachReport | NodeCandidates;
|
|
73
|
+
export declare const proveReachTool: ToolDefinition;
|
|
74
|
+
//# sourceMappingURL=prove-reach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prove-reach.d.ts","sourceRoot":"","sources":["../../src/tools/pr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M,CAAC;QAC1B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;QAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;QACxC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;QAC1C,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;KACtC,GAAG,IAAI,CAAC;CACV;AAED,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,cAAc,CAAC;AA6Q/D,eAAO,MAAM,cAAc,EAAE,cAmB5B,CAAC"}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `prove_reach` — closes RG-10's loop. "Rename that column and these screens go blank" is
|
|
3
|
+
* three claims, made in order, each on evidence the last one didn't have:
|
|
4
|
+
*
|
|
5
|
+
* 1. **Predict** — from a node (typically a `DATABASE_COLUMN`), walk `reachablePages`
|
|
6
|
+
* (`@descryy/core`) to whatever `PAGE`/`COMPONENT` nodes the data reaches, and propose a
|
|
7
|
+
* navigate-only journey to them, exactly as `predict_reach` already does — this tool calls
|
|
8
|
+
* the identical pure planner (`../planner/predict-then-propose.ts#predictThenPropose`), never
|
|
9
|
+
* a second implementation. Nothing runs yet: a caller who has not yet approved the drive gets
|
|
10
|
+
* back the prediction, the proposal and a confirmation token, and this tool's `describeAction`
|
|
11
|
+
* is what mints that token — the dispatcher (`../action-handshake.ts`) never calls `run` at
|
|
12
|
+
* all until the second call arrives, so "nothing runs" is structural, not a promise this file
|
|
13
|
+
* keeps by convention.
|
|
14
|
+
* 2. **Approve and drive** — a second call, `confirmToken` in hand, drives the exact proposed
|
|
15
|
+
* scenario for real via `../browser/scenario-runner.ts#replayScenario`, in a browser session
|
|
16
|
+
* the caller already started and consented (`browser({ verb: "start_session" })`). Never boots an app,
|
|
17
|
+
* never widens the journey beyond what was proposed: the scenario driven is the one frozen at
|
|
18
|
+
* mint time, byte for byte.
|
|
19
|
+
* 3. **Prove** — correlates which of the predicted pages the drive's own step results actually
|
|
20
|
+
* reached (`../planner/predict-then-propose.ts#visitedPageIds` + `#proveOrDisprove`) — a page
|
|
21
|
+
* counts as visited only when the exact navigate URL built from its own route name replayed
|
|
22
|
+
* as `"ran"`, never a guess from proximity.
|
|
23
|
+
* 4. **Conclude** — routes the real, walked graph path (`#combinedGraphPath`, never a synthesised
|
|
24
|
+
* one) and the runtime evidence the drive actually observed (console errors, failed requests)
|
|
25
|
+
* through the same finding funnel `draw_conclusion` uses — `reportCategory`, `@descryy/ir`,
|
|
26
|
+
* `packages/ir/src/finding.ts` — so the reply carries a governed category, not a raw tally the
|
|
27
|
+
* caller has to interpret. A drive that reached every predicted page cleanly, with nothing
|
|
28
|
+
* wrong observed, reports so honestly: `hasRuntimeEvidence` is false and the category is
|
|
29
|
+
* `unconfirmed` by G3's own precondition, not "confirmed" because the pages loaded.
|
|
30
|
+
*
|
|
31
|
+
* **class: "action"**, gated only when there is something to drive: a node that reaches nothing,
|
|
32
|
+
* or reaches only non-path-shaped pages/components with no navigate step to propose, has nothing
|
|
33
|
+
* to approve, so `describeAction` returns `undefined` and this reports the prediction immediately
|
|
34
|
+
* — same discipline as `predict_reach`'s own empty case, never a gate for its own sake.
|
|
35
|
+
*/
|
|
36
|
+
import { directMechanismEvidence, evidencePrecondition, humanAssertedOnPath, independentSignalTypes, minimumResolution, reportCategory, } from "@descryy/ir";
|
|
37
|
+
import { combinedGraphPath, predictThenPropose, proveOrDisprove, visitedPageIds, } from "../planner/predict-then-propose.js";
|
|
38
|
+
import { browserAnswer, mutationRefusal, useSession, withinConsent } from "../browser/tool-support.js";
|
|
39
|
+
import { mutates, replayScenario } from "../browser/scenario-runner.js";
|
|
40
|
+
import { answer, briefNode, requiredString, optionalString, ToolInputError, } from "./kit.js";
|
|
41
|
+
import { resolveOneNode } from "./lookup.js";
|
|
42
|
+
const SCHEMA = {
|
|
43
|
+
type: "object",
|
|
44
|
+
properties: {
|
|
45
|
+
nodeId: { type: "string", description: "Graph node id to predict reach from — typically a DATABASE_COLUMN." },
|
|
46
|
+
symbol: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description: "Symbol name to start from, when you do not have a node id. Ambiguity is reported rather than guessed at — narrow it with \"file\".",
|
|
49
|
+
},
|
|
50
|
+
file: { type: "string", description: "Repository-relative path, to disambiguate \"symbol\" or to start from a file." },
|
|
51
|
+
targetUrl: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "REQUIRED. The running application's base URL — the same origin the browser session named in \"sessionId\" was consented for.",
|
|
54
|
+
},
|
|
55
|
+
sessionId: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "REQUIRED. A browser session id from browser({ verb: \"start_session\" }), already consented for targetUrl's origin. " +
|
|
58
|
+
"This tool never starts a browser itself and never widens consent beyond that session's own.",
|
|
59
|
+
},
|
|
60
|
+
name: { type: "string", description: "What to call the proposed scenario. Defaults to \"predicted-journey\"." },
|
|
61
|
+
confirmToken: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "The token returned by a previous call. The first call predicts and proposes but drives nothing; call " +
|
|
64
|
+
"again with \"confirmToken\" to actually drive the proposed journey and correlate the result — with " +
|
|
65
|
+
"the arguments frozen when the token was minted, never whatever the confirming call supplies, so " +
|
|
66
|
+
"changing nodeId, targetUrl, sessionId or any other field on the confirming call is discarded rather " +
|
|
67
|
+
"than applied, and the reply discloses that it was; call again without confirmToken for a fresh token " +
|
|
68
|
+
"if something needs to change. A token is single-use, expires, and is only valid for this tool.",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
required: ["targetUrl", "sessionId"],
|
|
72
|
+
additionalProperties: false,
|
|
73
|
+
};
|
|
74
|
+
/** Resolves the start node and computes the identical prediction `predict_reach` would, from the
|
|
75
|
+
* same pure planner. Shared by `describeAction` and `run` so the two can never compute two
|
|
76
|
+
* different predictions for what a caller reads as one call. */
|
|
77
|
+
function prepare(args, ctx) {
|
|
78
|
+
const nodeIdArg = optionalString(args, "nodeId");
|
|
79
|
+
const symbol = optionalString(args, "symbol");
|
|
80
|
+
const file = optionalString(args, "file");
|
|
81
|
+
const targetUrl = requiredString(args, "targetUrl");
|
|
82
|
+
const sessionId = requiredString(args, "sessionId");
|
|
83
|
+
const name = optionalString(args, "name") ?? "predicted-journey";
|
|
84
|
+
if (nodeIdArg === undefined && symbol === undefined && file === undefined) {
|
|
85
|
+
throw new ToolInputError('give one of "nodeId", "symbol" or "file"');
|
|
86
|
+
}
|
|
87
|
+
const found = resolveOneNode(ctx.session, { nodeId: nodeIdArg, symbol, file });
|
|
88
|
+
if (found.node === null) {
|
|
89
|
+
return { ok: false, candidates: found.candidates.map(briefNode), headline: found.headline, notes: found.notes };
|
|
90
|
+
}
|
|
91
|
+
const provider = ctx.session.provider();
|
|
92
|
+
const base = provider.baseStamp();
|
|
93
|
+
const predicted = predictThenPropose(provider, found.node.id, { targetUrl, name, savedAtCommit: base.commitSha ?? "" });
|
|
94
|
+
return { ok: true, value: { node: found.node, predicted, targetUrl, sessionId } };
|
|
95
|
+
}
|
|
96
|
+
function drivable(predicted) {
|
|
97
|
+
return predicted.proposal !== null && predicted.proposal.scenario.steps.length > 0;
|
|
98
|
+
}
|
|
99
|
+
function emptyReport(node, predicted) {
|
|
100
|
+
return {
|
|
101
|
+
from: node === null ? { id: "", type: "", name: "", resolution: 0 } : briefNode(node),
|
|
102
|
+
reachedPages: predicted === null ? [] : predicted.reachedPages.map((n) => ({ id: n.id, type: n.type, name: n.name, resolution: 0 })),
|
|
103
|
+
proposal: predicted?.proposal === null || predicted === null
|
|
104
|
+
? null
|
|
105
|
+
: { scenario: predicted.proposal.scenario, reachedNotProposed: predicted.proposal.reachedNotProposed },
|
|
106
|
+
drive: null,
|
|
107
|
+
proof: null,
|
|
108
|
+
conclusion: null,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
async function describeAction(args, ctx) {
|
|
112
|
+
const prep = prepare(args, ctx);
|
|
113
|
+
if (!prep.ok)
|
|
114
|
+
return undefined; // nothing resolvable — run() reports the refusal immediately, no gate
|
|
115
|
+
const { node, predicted, sessionId } = prep.value;
|
|
116
|
+
if (!drivable(predicted))
|
|
117
|
+
return undefined; // nothing to drive — run() reports the prediction alone
|
|
118
|
+
const steps = predicted.proposal.scenario.steps.length;
|
|
119
|
+
const pageNames = predicted.reachedPages.map((p) => p.name);
|
|
120
|
+
return (`drive ${steps} navigate step(s) in browser session "${sessionId}", toward ${predicted.reachedPages.length} ` +
|
|
121
|
+
`predicted page/component reached from ${node.name} (${pageNames.slice(0, 5).join(", ")}${pageNames.length > 5 ? ", …" : ""}), ` +
|
|
122
|
+
"then correlate what the drive actually reached — and any console error or failed request observed while " +
|
|
123
|
+
"it ran — into a governed finding via the same gate draw_conclusion uses.");
|
|
124
|
+
}
|
|
125
|
+
async function run(args, ctx) {
|
|
126
|
+
const prep = prepare(args, ctx);
|
|
127
|
+
const base = ctx.session.provider().baseStamp();
|
|
128
|
+
if (!prep.ok) {
|
|
129
|
+
return {
|
|
130
|
+
result: { data: { candidates: prep.candidates }, stamp: { ...base, resolutionFloor: 0 }, truncated: false, notes: prep.notes },
|
|
131
|
+
nameLevel: true,
|
|
132
|
+
state: "refused",
|
|
133
|
+
headline: prep.headline,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
const { node, predicted, targetUrl, sessionId } = prep.value;
|
|
137
|
+
const notes = [...predicted.notes];
|
|
138
|
+
if (!drivable(predicted)) {
|
|
139
|
+
return answer({
|
|
140
|
+
headline: predicted.proposal === null
|
|
141
|
+
? `${node.name} reaches no PAGE or COMPONENT this graph can walk to. Not a claim it reaches none in the running application — see notes.`
|
|
142
|
+
: `${node.name} reaches ${predicted.reachedPages.length} page/component, but none has a path-shaped route name — nothing to drive or prove.`,
|
|
143
|
+
state: "empty",
|
|
144
|
+
nameLevel: true,
|
|
145
|
+
resolutionFloor: 0,
|
|
146
|
+
commitSha: base.commitSha,
|
|
147
|
+
graphBuiltAt: base.graphBuiltAt,
|
|
148
|
+
irSchemaVersion: base.irSchemaVersion,
|
|
149
|
+
commitSpread: base.commitSpread,
|
|
150
|
+
repoCount: base.repoCount,
|
|
151
|
+
notes,
|
|
152
|
+
data: emptyReport(node, predicted),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
// A non-empty proposal only reaches this line once the two-call handshake has already
|
|
156
|
+
// approved it — `describeAction` above gates every other case. Drive it, exactly as proposed.
|
|
157
|
+
const scenario = predicted.proposal.scenario;
|
|
158
|
+
const found = await useSession(ctx.session.browserSessions(), sessionId);
|
|
159
|
+
if (!found.ok) {
|
|
160
|
+
return browserAnswer({
|
|
161
|
+
ctx,
|
|
162
|
+
state: found.dead.state,
|
|
163
|
+
headline: found.dead.headline,
|
|
164
|
+
notes: [...notes, ...found.dead.notes],
|
|
165
|
+
data: emptyReport(node, predicted),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
const { entry } = found;
|
|
169
|
+
if (!withinConsent(entry, targetUrl)) {
|
|
170
|
+
return browserAnswer({
|
|
171
|
+
ctx,
|
|
172
|
+
state: "refused",
|
|
173
|
+
headline: `The predicted journey targets ${targetUrl}, outside this session's consent.`,
|
|
174
|
+
notes: [
|
|
175
|
+
...notes,
|
|
176
|
+
`This session was consented for ${entry.consentedOrigin} only. Start a session against that origin to drive this prediction.`,
|
|
177
|
+
],
|
|
178
|
+
data: emptyReport(node, predicted),
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
const refusedForSafety = mutationRefusal(entry);
|
|
182
|
+
if (refusedForSafety !== null && mutates(scenario)) {
|
|
183
|
+
// Dead in practice — proposeJourney only ever emits navigate steps — kept for the day a
|
|
184
|
+
// future planner proposes more, so a readOnly profile still refuses rather than driving.
|
|
185
|
+
return browserAnswer({
|
|
186
|
+
ctx,
|
|
187
|
+
state: "refused",
|
|
188
|
+
headline: `${entry.profile?.name ?? "This environment"} is read-only.`,
|
|
189
|
+
notes: [...notes, refusedForSafety],
|
|
190
|
+
data: emptyReport(node, predicted),
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
if (entry.page.currentUrl() !== scenario.targetUrl) {
|
|
194
|
+
await entry.page.navigate(scenario.targetUrl);
|
|
195
|
+
}
|
|
196
|
+
ctx.progress(`Driving the predicted journey from ${node.name}`);
|
|
197
|
+
const replay = await replayScenario(ctx, ctx.session.browserSessions(), sessionId, scenario, process.env, ctx.session.credentialStore);
|
|
198
|
+
const visited = visitedPageIds(predicted, targetUrl, replay.steps.map((s) => ({ url: s.url, status: s.status })));
|
|
199
|
+
const proof = proveOrDisprove(predicted, { visitedNodeIds: visited });
|
|
200
|
+
// The hypothesis's own structural mechanism — every page the walk predicted, not only the ones
|
|
201
|
+
// this one drive happened to confirm — so the finding's graphPath describes what the graph
|
|
202
|
+
// claims propagates, and the runtime evidence below is what says whether it broke anything.
|
|
203
|
+
const graphPath = combinedGraphPath(predicted, predicted.reachedPages.map((p) => p.id));
|
|
204
|
+
const runtimeEvidence = [
|
|
205
|
+
...replay.evidence.consoleErrors.map((e) => ({ signal: "browser-console", detail: e.text, directMechanism: false })),
|
|
206
|
+
...replay.evidence.failedRequests.map((r) => {
|
|
207
|
+
const reached = replay.graph.reached.find((n) => n.via.method === r.method && n.via.url === r.url);
|
|
208
|
+
return {
|
|
209
|
+
signal: "network",
|
|
210
|
+
detail: `${r.method} ${r.url} failed${r.status === null ? "" : ` (status ${r.status})`}`,
|
|
211
|
+
...(reached === undefined ? {} : { nodeId: reached.nodeId, directMechanism: reached.nodeId === node.id }),
|
|
212
|
+
};
|
|
213
|
+
}),
|
|
214
|
+
];
|
|
215
|
+
const hasRuntimeEvidence = evidencePrecondition(runtimeEvidence);
|
|
216
|
+
const resolution = minimumResolution(graphPath);
|
|
217
|
+
const humanAsserted = humanAssertedOnPath(graphPath);
|
|
218
|
+
const eSignals = independentSignalTypes(runtimeEvidence);
|
|
219
|
+
const mMechanism = directMechanismEvidence(runtimeEvidence, node.id);
|
|
220
|
+
const gated = reportCategory({
|
|
221
|
+
hasRuntimeEvidence,
|
|
222
|
+
independentSignalTypes: eSignals,
|
|
223
|
+
directMechanismEvidence: mMechanism,
|
|
224
|
+
resolution,
|
|
225
|
+
// Name-level throughout — a route path is read off a node's qualified name, same as
|
|
226
|
+
// predict_reach's own cap, never a type-checked shape.
|
|
227
|
+
nameLevel: true,
|
|
228
|
+
humanAsserted,
|
|
229
|
+
});
|
|
230
|
+
const proofNotes = [
|
|
231
|
+
`Drove the proposed journey for real: ${proof.proven.length} of ${predicted.reachedPages.length} predicted ` +
|
|
232
|
+
`page(s)/component(s) confirmed reached, ${proof.disproven.length} not reached by this drive.`,
|
|
233
|
+
hasRuntimeEvidence
|
|
234
|
+
? `${runtimeEvidence.length} runtime observation(s) fed the gate — ${replay.evidence.consoleErrors.length} console error(s), ` +
|
|
235
|
+
`${replay.evidence.failedRequests.length} failed request(s).`
|
|
236
|
+
: "No console error or failed request was observed during this drive, so G3's evidence precondition fails " +
|
|
237
|
+
"and this reports unconfirmed regardless of the graph path — reaching a page cleanly is not evidence it broke.",
|
|
238
|
+
];
|
|
239
|
+
return browserAnswer({
|
|
240
|
+
ctx,
|
|
241
|
+
headline: `"${node.name}": ${gated.category} (reliability ${gated.reliabilityClass}). Drove ${scenario.steps.length} step(s), ` +
|
|
242
|
+
`${proof.proven.length} predicted page(s) confirmed reached, ${proof.disproven.length} not.`,
|
|
243
|
+
notes: [...notes, ...proofNotes, ...replay.notes],
|
|
244
|
+
data: {
|
|
245
|
+
from: briefNode(node),
|
|
246
|
+
reachedPages: predicted.reachedPages.map((n) => ({ id: n.id, type: n.type, name: n.name, resolution: 0 })),
|
|
247
|
+
proposal: { scenario: predicted.proposal.scenario, reachedNotProposed: predicted.proposal.reachedNotProposed },
|
|
248
|
+
drive: {
|
|
249
|
+
outcome: replay.outcome,
|
|
250
|
+
steps: replay.steps.map((s) => ({ url: s.url, status: s.status })),
|
|
251
|
+
consoleErrorCount: replay.evidence.consoleErrors.length,
|
|
252
|
+
failedRequestCount: replay.evidence.failedRequests.length,
|
|
253
|
+
},
|
|
254
|
+
proof,
|
|
255
|
+
conclusion: {
|
|
256
|
+
failurePoint: node.id,
|
|
257
|
+
category: gated.category,
|
|
258
|
+
reliabilityClass: gated.reliabilityClass,
|
|
259
|
+
resolution,
|
|
260
|
+
independentSignalTypes: eSignals,
|
|
261
|
+
directMechanismEvidence: mMechanism,
|
|
262
|
+
hasRuntimeEvidence,
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
export const proveReachTool = {
|
|
268
|
+
name: "prove_reach",
|
|
269
|
+
class: "action",
|
|
270
|
+
tier: "conclusion",
|
|
271
|
+
version: "1.0.0",
|
|
272
|
+
title: "Predict which pages a data change reaches, then drive a real browser to prove or disprove it",
|
|
273
|
+
description: "RG-10's full loop: predicts which PAGE/COMPONENT nodes a node (typically a DATABASE_COLUMN) reaches, " +
|
|
274
|
+
"exactly as predict_reach does, and proposes a navigate-only journey. The first call performs nothing " +
|
|
275
|
+
"and returns a confirmation token; call again with confirmToken to drive that exact proposed journey for " +
|
|
276
|
+
"real, in an already-consented browser session (sessionId, from browser({ verb: \"start_session\" })), then correlate " +
|
|
277
|
+
"which predicted pages the drive actually reached and route the graph path plus whatever the drive " +
|
|
278
|
+
"observed (console errors, failed requests) through the same governed gate draw_conclusion uses. Never " +
|
|
279
|
+
"boots an app, never clicks or types beyond the navigate-only proposal, and never widens the journey the " +
|
|
280
|
+
"first call showed you. A drive that reaches every predicted page with nothing wrong observed reports " +
|
|
281
|
+
"unconfirmed, honestly — a clean page load is not evidence of breakage.",
|
|
282
|
+
inputSchema: SCHEMA,
|
|
283
|
+
run,
|
|
284
|
+
describeAction,
|
|
285
|
+
};
|
|
286
|
+
//# sourceMappingURL=prove-reach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prove-reach.js","sourceRoot":"","sources":["../../src/tools/prove-reach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;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AS,CAAC,kBAAkB,EAAE;YAChH,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClE,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM;gBACvD,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM;aAC1D;YACD,KAAK;YACL,UAAU,EAAE;gBACV,YAAY,EAAE,IAAI,CAAC,EAAE;gBACrB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;gBACxC,UAAU;gBACV,sBAAsB,EAAE,QAAQ;gBAChC,uBAAuB,EAAE,UAAU;gBACnC,kBAAkB;aACnB;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,8FAA8F;IACrG,WAAW,EACT,uGAAuG;QACvG,uGAAuG;QACvG,0GAA0G;QAC1G,uHAAuH;QACvH,oGAAoG;QACpG,wGAAwG;QACxG,0GAA0G;QAC1G,uGAAuG;QACvG,wEAAwE;IAC1E,WAAW,EAAE,MAA4C;IACzD,GAAG;IACH,cAAc;CACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descryy/mcp",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Descry's MCP server: the agent-facing front door over the query layer. The stdio transport is JSON-RPC 2.0 by hand rather than seventeen packages of HTTP and OAuth. Twenty tools; most read the graph and nothing else. The @descryy dependencies are here for the three that do more: observe_runtime boots or attaches to a real application, observe_tests runs the project's own test suite, and the browser tools drive a real browser — each writing what it witnessed into the graph as R4 facts. @descryy/runtime-browser is declared below like the others. It is still imported by specifier at call time rather than statically — not because it is unpublished (it is not) but because that indirection is an injection seam real tests use to drive the settle logic against a fake module with no real browser involved; see playwright-driver.ts. A missing package, a missing Chromium binary, or an import failure each still returns a named, remediable refusal rather than a crash or an empty result.",
|
|
5
|
+
"description": "Descry's MCP server: the agent-facing front door over the query layer. The stdio transport is JSON-RPC 2.0 by hand rather than seventeen packages of HTTP and OAuth. Twenty-one tools; most read the graph and nothing else. The @descryy dependencies are here for the three that do more: observe_runtime boots or attaches to a real application, observe_tests runs the project's own test suite, and the browser tools drive a real browser — each writing what it witnessed into the graph as R4 facts. @descryy/runtime-browser is declared below like the others. It is still imported by specifier at call time rather than statically — not because it is unpublished (it is not) but because that indirection is an injection seam real tests use to drive the settle logic against a fake module with no real browser involved; see playwright-driver.ts. A missing package, a missing Chromium binary, or an import failure each still returns a named, remediable refusal rather than a crash or an empty result.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -35,31 +35,35 @@
|
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsc -b"
|
|
37
37
|
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"pg": "8.13.1"
|
|
40
|
+
},
|
|
38
41
|
"dependencies": {
|
|
39
|
-
"@descryy/core": "0.
|
|
42
|
+
"@descryy/core": "0.9.1",
|
|
40
43
|
"@descryy/ir": "0.10.0",
|
|
41
|
-
"@descryy/runtime-backend-observation": "0.3.
|
|
42
|
-
"@descryy/runtime-browser": "0.4.
|
|
44
|
+
"@descryy/runtime-backend-observation": "0.3.6",
|
|
45
|
+
"@descryy/runtime-browser": "0.4.7",
|
|
43
46
|
"@descryy/runtime-contracts": "0.3.3",
|
|
44
|
-
"@descryy/runtime-controller": "0.3.
|
|
45
|
-
"@descryy/runtime-
|
|
46
|
-
"@descryy/runtime-
|
|
47
|
+
"@descryy/runtime-controller": "0.3.6",
|
|
48
|
+
"@descryy/runtime-database-observation": "0.4.7",
|
|
49
|
+
"@descryy/runtime-environment-profile": "0.4.5",
|
|
50
|
+
"@descryy/runtime-evidence-correlation": "0.4.8",
|
|
47
51
|
"@descryy/runtime-evidence-store": "0.4.2",
|
|
48
|
-
"@descryy/runtime-graph-correlator": "0.4.
|
|
49
|
-
"@descryy/runtime-identity-grounding": "0.4.
|
|
50
|
-
"@descryy/runtime-orchestrator": "0.4.
|
|
51
|
-
"@descryy/runtime-test-runner": "0.4.
|
|
52
|
+
"@descryy/runtime-graph-correlator": "0.4.7",
|
|
53
|
+
"@descryy/runtime-identity-grounding": "0.4.3",
|
|
54
|
+
"@descryy/runtime-orchestrator": "0.4.7",
|
|
55
|
+
"@descryy/runtime-test-runner": "0.4.8"
|
|
52
56
|
},
|
|
53
57
|
"optionalDependencies": {
|
|
54
|
-
"@descryy/runtime-adapter-typescript": "0.3.
|
|
55
|
-
"@descryy/runtime-adapter-csharp": "0.1.
|
|
56
|
-
"@descryy/runtime-adapter-go": "0.1.
|
|
57
|
-
"@descryy/runtime-adapter-jvm": "0.1.
|
|
58
|
-
"@descryy/runtime-adapter-php": "0.1.
|
|
59
|
-
"@descryy/runtime-adapter-python": "0.4.
|
|
60
|
-
"@descryy/runtime-adapter-ruby": "0.0.
|
|
61
|
-
"@descryy/runtime-adapter-rust": "0.1.
|
|
62
|
-
"@descryy/runtime-adapter-swift": "0.1.
|
|
58
|
+
"@descryy/runtime-adapter-typescript": "0.3.6",
|
|
59
|
+
"@descryy/runtime-adapter-csharp": "0.1.5",
|
|
60
|
+
"@descryy/runtime-adapter-go": "0.1.5",
|
|
61
|
+
"@descryy/runtime-adapter-jvm": "0.1.5",
|
|
62
|
+
"@descryy/runtime-adapter-php": "0.1.5",
|
|
63
|
+
"@descryy/runtime-adapter-python": "0.4.5",
|
|
64
|
+
"@descryy/runtime-adapter-ruby": "0.0.4",
|
|
65
|
+
"@descryy/runtime-adapter-rust": "0.1.5",
|
|
66
|
+
"@descryy/runtime-adapter-swift": "0.1.5",
|
|
63
67
|
"@descryy/adapter-typescript": "0.5.1",
|
|
64
68
|
"@descryy/adapter-csharp": "0.5.1",
|
|
65
69
|
"@descryy/adapter-go": "0.5.1",
|