@descryy/mcp 0.1.2 → 0.3.0
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 +30 -2
- package/dist/bin/descry-mcp.js.map +1 -1
- package/dist/browser/driver.d.ts +236 -0
- package/dist/browser/driver.d.ts.map +1 -0
- package/dist/browser/driver.js +70 -0
- package/dist/browser/driver.js.map +1 -0
- package/dist/browser/evidence.d.ts +47 -0
- package/dist/browser/evidence.d.ts.map +1 -0
- package/dist/browser/evidence.js +55 -0
- package/dist/browser/evidence.js.map +1 -0
- package/dist/browser/fake-driver.d.ts +58 -0
- package/dist/browser/fake-driver.d.ts.map +1 -0
- package/dist/browser/fake-driver.js +161 -0
- package/dist/browser/fake-driver.js.map +1 -0
- package/dist/browser/graph-write.d.ts +86 -0
- package/dist/browser/graph-write.d.ts.map +1 -0
- package/dist/browser/graph-write.js +135 -0
- package/dist/browser/graph-write.js.map +1 -0
- package/dist/browser/playwright-driver.d.ts +65 -0
- package/dist/browser/playwright-driver.d.ts.map +1 -0
- package/dist/browser/playwright-driver.js +359 -0
- package/dist/browser/playwright-driver.js.map +1 -0
- package/dist/browser/provider.d.ts +49 -0
- package/dist/browser/provider.d.ts.map +1 -0
- package/dist/browser/provider.js +28 -0
- package/dist/browser/provider.js.map +1 -0
- package/dist/browser/registry.d.ts +182 -0
- package/dist/browser/registry.d.ts.map +1 -0
- package/dist/browser/registry.js +215 -0
- package/dist/browser/registry.js.map +1 -0
- package/dist/browser/scenario-resolve.d.ts +62 -0
- package/dist/browser/scenario-resolve.d.ts.map +1 -0
- package/dist/browser/scenario-resolve.js +127 -0
- package/dist/browser/scenario-resolve.js.map +1 -0
- package/dist/browser/scenario-runner.d.ts +113 -0
- package/dist/browser/scenario-runner.d.ts.map +1 -0
- package/dist/browser/scenario-runner.js +315 -0
- package/dist/browser/scenario-runner.js.map +1 -0
- package/dist/browser/stack-parser.d.ts +43 -0
- package/dist/browser/stack-parser.d.ts.map +1 -0
- package/dist/browser/stack-parser.js +112 -0
- package/dist/browser/stack-parser.js.map +1 -0
- package/dist/browser/tool-support.d.ts +113 -0
- package/dist/browser/tool-support.d.ts.map +1 -0
- package/dist/browser/tool-support.js +181 -0
- package/dist/browser/tool-support.js.map +1 -0
- package/dist/disclosure-ledger.d.ts +38 -0
- package/dist/disclosure-ledger.d.ts.map +1 -0
- package/dist/disclosure-ledger.js +40 -0
- package/dist/disclosure-ledger.js.map +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +12 -3
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +12 -3
- package/dist/protocol.js.map +1 -1
- package/dist/render.d.ts +121 -10
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +96 -15
- package/dist/render.js.map +1 -1
- package/dist/runtime-registry.d.ts +63 -0
- package/dist/runtime-registry.d.ts.map +1 -0
- package/dist/runtime-registry.js +131 -0
- package/dist/runtime-registry.js.map +1 -0
- package/dist/scenarios/index.d.ts +4 -0
- package/dist/scenarios/index.d.ts.map +1 -0
- package/dist/scenarios/index.js +4 -0
- package/dist/scenarios/index.js.map +1 -0
- package/dist/scenarios/parse.d.ts +32 -0
- package/dist/scenarios/parse.d.ts.map +1 -0
- package/dist/scenarios/parse.js +199 -0
- package/dist/scenarios/parse.js.map +1 -0
- package/dist/scenarios/scenario.d.ts +115 -0
- package/dist/scenarios/scenario.d.ts.map +1 -0
- package/dist/scenarios/scenario.js +41 -0
- package/dist/scenarios/scenario.js.map +1 -0
- package/dist/scenarios/storage.d.ts +51 -0
- package/dist/scenarios/storage.d.ts.map +1 -0
- package/dist/scenarios/storage.js +93 -0
- package/dist/scenarios/storage.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +11 -3
- package/dist/server.js.map +1 -1
- package/dist/session.d.ts +142 -2
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +266 -4
- package/dist/session.js.map +1 -1
- package/dist/tools/analyze.d.ts +41 -1
- package/dist/tools/analyze.d.ts.map +1 -1
- package/dist/tools/analyze.js +111 -9
- package/dist/tools/analyze.js.map +1 -1
- package/dist/tools/browser-click.d.ts +36 -0
- package/dist/tools/browser-click.d.ts.map +1 -0
- package/dist/tools/browser-click.js +117 -0
- package/dist/tools/browser-click.js.map +1 -0
- package/dist/tools/browser-close-session.d.ts +24 -0
- package/dist/tools/browser-close-session.d.ts.map +1 -0
- package/dist/tools/browser-close-session.js +63 -0
- package/dist/tools/browser-close-session.js.map +1 -0
- package/dist/tools/browser-fill.d.ts +49 -0
- package/dist/tools/browser-fill.d.ts.map +1 -0
- package/dist/tools/browser-fill.js +138 -0
- package/dist/tools/browser-fill.js.map +1 -0
- package/dist/tools/browser-navigate.d.ts +32 -0
- package/dist/tools/browser-navigate.d.ts.map +1 -0
- package/dist/tools/browser-navigate.js +103 -0
- package/dist/tools/browser-navigate.js.map +1 -0
- package/dist/tools/browser-run-scenario.d.ts +54 -0
- package/dist/tools/browser-run-scenario.d.ts.map +1 -0
- package/dist/tools/browser-run-scenario.js +228 -0
- package/dist/tools/browser-run-scenario.js.map +1 -0
- package/dist/tools/browser-save-scenario.d.ts +44 -0
- package/dist/tools/browser-save-scenario.d.ts.map +1 -0
- package/dist/tools/browser-save-scenario.js +298 -0
- package/dist/tools/browser-save-scenario.js.map +1 -0
- package/dist/tools/browser-snapshot.d.ts +60 -0
- package/dist/tools/browser-snapshot.d.ts.map +1 -0
- package/dist/tools/browser-snapshot.js +139 -0
- package/dist/tools/browser-snapshot.js.map +1 -0
- package/dist/tools/browser-start-session.d.ts +43 -0
- package/dist/tools/browser-start-session.d.ts.map +1 -0
- package/dist/tools/browser-start-session.js +272 -0
- package/dist/tools/browser-start-session.js.map +1 -0
- package/dist/tools/browser-type.d.ts +48 -0
- package/dist/tools/browser-type.d.ts.map +1 -0
- package/dist/tools/browser-type.js +136 -0
- package/dist/tools/browser-type.js.map +1 -0
- package/dist/tools/contracts.d.ts +15 -0
- package/dist/tools/contracts.d.ts.map +1 -1
- package/dist/tools/contracts.js +14 -3
- package/dist/tools/contracts.js.map +1 -1
- package/dist/tools/cross-pr.d.ts.map +1 -1
- package/dist/tools/cross-pr.js +1 -0
- package/dist/tools/cross-pr.js.map +1 -1
- package/dist/tools/git-diff.d.ts.map +1 -1
- package/dist/tools/git-diff.js +104 -4
- package/dist/tools/git-diff.js.map +1 -1
- package/dist/tools/git-history.d.ts.map +1 -1
- package/dist/tools/git-history.js +1 -0
- package/dist/tools/git-history.js.map +1 -1
- package/dist/tools/history.js +1 -1
- package/dist/tools/history.js.map +1 -1
- package/dist/tools/impact.d.ts +9 -0
- package/dist/tools/impact.d.ts.map +1 -1
- package/dist/tools/impact.js +4 -4
- package/dist/tools/impact.js.map +1 -1
- package/dist/tools/index.d.ts +12 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +31 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/kit.d.ts +11 -1
- package/dist/tools/kit.d.ts.map +1 -1
- package/dist/tools/kit.js +3 -0
- package/dist/tools/kit.js.map +1 -1
- package/dist/tools/link-workspace.d.ts.map +1 -1
- package/dist/tools/link-workspace.js +13 -1
- package/dist/tools/link-workspace.js.map +1 -1
- package/dist/tools/mark-incident.d.ts +69 -0
- package/dist/tools/mark-incident.d.ts.map +1 -0
- package/dist/tools/mark-incident.js +212 -0
- package/dist/tools/mark-incident.js.map +1 -0
- package/dist/tools/observe-runtime.d.ts +292 -0
- package/dist/tools/observe-runtime.d.ts.map +1 -0
- package/dist/tools/observe-runtime.js +1192 -0
- package/dist/tools/observe-runtime.js.map +1 -0
- package/dist/tools/observe-tests.d.ts +125 -0
- package/dist/tools/observe-tests.d.ts.map +1 -0
- package/dist/tools/observe-tests.js +313 -0
- package/dist/tools/observe-tests.js.map +1 -0
- package/dist/tools/pr-analysis.d.ts +71 -13
- package/dist/tools/pr-analysis.d.ts.map +1 -1
- package/dist/tools/pr-analysis.js +55 -12
- package/dist/tools/pr-analysis.js.map +1 -1
- package/dist/tools/pre-push.d.ts +77 -0
- package/dist/tools/pre-push.d.ts.map +1 -0
- package/dist/tools/pre-push.js +250 -0
- package/dist/tools/pre-push.js.map +1 -0
- package/dist/tools/propagation.d.ts.map +1 -1
- package/dist/tools/propagation.js +1 -0
- package/dist/tools/propagation.js.map +1 -1
- package/dist/tools/questions.d.ts.map +1 -1
- package/dist/tools/questions.js +101 -14
- package/dist/tools/questions.js.map +1 -1
- package/dist/tools/refusal-fetch.d.ts.map +1 -1
- package/dist/tools/refusal-fetch.js +1 -0
- package/dist/tools/refusal-fetch.js.map +1 -1
- package/dist/tools/runtime-incident.d.ts +92 -0
- package/dist/tools/runtime-incident.d.ts.map +1 -0
- package/dist/tools/runtime-incident.js +144 -0
- package/dist/tools/runtime-incident.js.map +1 -0
- package/dist/tools/scope.d.ts.map +1 -1
- package/dist/tools/scope.js +1 -0
- package/dist/tools/scope.js.map +1 -1
- package/dist/tools/similar-incidents.d.ts +13 -0
- package/dist/tools/similar-incidents.d.ts.map +1 -1
- package/dist/tools/similar-incidents.js +22 -8
- package/dist/tools/similar-incidents.js.map +1 -1
- package/dist/tools/verification-status.d.ts +22 -0
- package/dist/tools/verification-status.d.ts.map +1 -1
- package/dist/tools/verification-status.js +52 -5
- package/dist/tools/verification-status.js.map +1 -1
- package/dist/tools/verify-claim.d.ts.map +1 -1
- package/dist/tools/verify-claim.js +5 -0
- package/dist/tools/verify-claim.js.map +1 -1
- package/package.json +16 -4
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `browser_save_scenario` — an explored session becomes a durable, repeatable
|
|
3
|
+
* scenario.
|
|
4
|
+
*
|
|
5
|
+
* ## Everything goes out through `writeScenario`
|
|
6
|
+
*
|
|
7
|
+
* There is deliberately no private path to disk here. `writeScenario`
|
|
8
|
+
* validates on the way *out* as well as in, and that is not redundant: a
|
|
9
|
+
* scenario is written once and read on every push afterwards, so a fault saved
|
|
10
|
+
* today surfaces during a check somebody is waiting on, long after the session
|
|
11
|
+
* that could have explained it is gone. A tool that serialized its own JSON
|
|
12
|
+
* would be a second writer with a first writer's rules, and the second one is
|
|
13
|
+
* the one that ships a file nothing can read.
|
|
14
|
+
*
|
|
15
|
+
* ## A step carries no ref, and this schema offers no way to send one
|
|
16
|
+
*
|
|
17
|
+
* The ref refusal is enforced twice on purpose. The format module rejects a
|
|
18
|
+
* step carrying a `ref` **by name**, with the reason in the message; this
|
|
19
|
+
* schema does not declare the field at all. A caller working from a
|
|
20
|
+
* `browser_snapshot` reply has the three durable fields already — every
|
|
21
|
+
* snapshot element carries `role`, `name` and `selector` — so the natural
|
|
22
|
+
* thing to copy is the right thing to store.
|
|
23
|
+
*
|
|
24
|
+
* ## What the session supplies
|
|
25
|
+
*
|
|
26
|
+
* The consented origin (a scenario may not be saved pointing somewhere this
|
|
27
|
+
* session was never allowed to drive), the URL to start from, and the
|
|
28
|
+
* provenance pair. The steps are the caller's: this server has no exploration
|
|
29
|
+
* planner and does not pretend to have recorded intent it never saw.
|
|
30
|
+
*/
|
|
31
|
+
import { gitHead } from "@descryy/core";
|
|
32
|
+
import { browserAnswer, useSession, withinConsent } from "../browser/tool-support.js";
|
|
33
|
+
import { SCENARIO_SCHEMA_VERSION, scenarioPath, writeScenario } from "../scenarios/index.js";
|
|
34
|
+
import { optionalString, requiredString, ToolInputError } from "./kit.js";
|
|
35
|
+
const TARGET_SCHEMA = {
|
|
36
|
+
type: "object",
|
|
37
|
+
description: "The element, named the way a replay can find it again: all three of role, name and selector, together, " +
|
|
38
|
+
"always. Copy them from a browser_snapshot element — every one carries all three. There is no ref field " +
|
|
39
|
+
"and there cannot be one: a ref is scoped to the snapshot that issued it and a replay is always a later " +
|
|
40
|
+
"session. There is also no fallback between the three at replay: a selector that still matches while the " +
|
|
41
|
+
"role or name disagrees stops the replay rather than substituting quietly, because that substitution is " +
|
|
42
|
+
"how a scenario keeps reporting green against a page that changed underneath it.",
|
|
43
|
+
properties: {
|
|
44
|
+
role: { type: "string", description: "The element's ARIA role, as browser_snapshot reported it." },
|
|
45
|
+
name: { type: "string", description: "The element's accessible name, as browser_snapshot reported it." },
|
|
46
|
+
selector: { type: "string", description: "The selector browser_snapshot reported for it." },
|
|
47
|
+
},
|
|
48
|
+
required: ["role", "name", "selector"],
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
};
|
|
51
|
+
const SCHEMA = {
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
sessionId: { type: "string", description: "REQUIRED. The browser session this scenario was explored in." },
|
|
55
|
+
name: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "REQUIRED. What to call it. Becomes descry/scenarios/<name>.scenario.json — a committed file, " +
|
|
58
|
+
"reviewable in a diff, and deliberately not under .descry/, which is gitignored and would make the " +
|
|
59
|
+
"scenario vanish on CI's fresh checkout.",
|
|
60
|
+
},
|
|
61
|
+
description: { type: "string", description: "Free text for whoever reads the file later. Optional." },
|
|
62
|
+
targetUrl: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "Where a replay should start. Defaults to the session's current URL, and must be on the origin this " +
|
|
65
|
+
"session was consented for — a saved file cannot widen a consent grant.",
|
|
66
|
+
},
|
|
67
|
+
steps: {
|
|
68
|
+
type: "array",
|
|
69
|
+
description: "REQUIRED, and at least one. The sequence to replay, in order. Every step is re-resolved against a " +
|
|
70
|
+
"fresh page at replay time.",
|
|
71
|
+
items: {
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: {
|
|
74
|
+
action: { type: "string", enum: ["navigate", "click", "type", "fill"], description: "navigate acts on the page; click, type and fill act on an element and need a target." },
|
|
75
|
+
target: TARGET_SCHEMA,
|
|
76
|
+
url: { type: "string", description: "Where to go. For navigate steps only." },
|
|
77
|
+
text: {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: "What to enter. For type and fill only, and the two differ in a way that decides whether a page " +
|
|
80
|
+
"behaves: type fires real keystrokes and appends, fill sets the value directly and fires none, " +
|
|
81
|
+
"so a field that opens an autocomplete or validates per character sees nothing at all from a fill.",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
required: ["action"],
|
|
85
|
+
additionalProperties: false,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
assertions: {
|
|
89
|
+
type: "array",
|
|
90
|
+
description: "REQUIRED, and may be empty. What this scenario claims about the application. Absent is refused " +
|
|
91
|
+
"rather than defaulted, because absent and empty are different statements: an empty list is an " +
|
|
92
|
+
"exploration saved honestly, and it replays as \"unverified\" — never as passed. A replay that clicks " +
|
|
93
|
+
"through a broken page and reports success is a false negative with a confident face on it, and the " +
|
|
94
|
+
"runner cannot invent a check it was never told about.",
|
|
95
|
+
items: {
|
|
96
|
+
type: "object",
|
|
97
|
+
properties: {
|
|
98
|
+
kind: {
|
|
99
|
+
type: "string",
|
|
100
|
+
enum: ["elementVisible", "textEquals", "urlEquals", "noConsoleErrors", "noFailedRequests"],
|
|
101
|
+
description: "elementVisible and textEquals are about one element and need a target; textEquals and urlEquals " +
|
|
102
|
+
"compare against expected. noConsoleErrors and noFailedRequests read the evidence gathered up to " +
|
|
103
|
+
"that point — an OBSERVED console error never blocks a push, but one the author asserted would " +
|
|
104
|
+
"not happen does, because a person claimed it.",
|
|
105
|
+
},
|
|
106
|
+
afterStep: {
|
|
107
|
+
type: "integer",
|
|
108
|
+
description: "Which step this runs after, by index. Omit for end-of-scenario. An index past the last step is " +
|
|
109
|
+
"refused here rather than discovered at replay: an assertion that never runs never says so, and " +
|
|
110
|
+
"the scenario reports green because its only check was unreachable.",
|
|
111
|
+
},
|
|
112
|
+
target: TARGET_SCHEMA,
|
|
113
|
+
expected: { type: "string", description: "The value to compare against, for the kinds that compare one." },
|
|
114
|
+
},
|
|
115
|
+
required: ["kind"],
|
|
116
|
+
additionalProperties: false,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
confirmToken: {
|
|
120
|
+
type: "string",
|
|
121
|
+
description: "Not normally needed. Consent for this session was granted at browser_start_session, and this call " +
|
|
122
|
+
"writes a file rather than driving the browser. The field is declared because the handshake reads it " +
|
|
123
|
+
"for every action-class tool.",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
required: ["sessionId", "name", "steps", "assertions"],
|
|
127
|
+
additionalProperties: false,
|
|
128
|
+
};
|
|
129
|
+
function readObjectArray(args, key) {
|
|
130
|
+
const raw = args[key];
|
|
131
|
+
if (raw === undefined || raw === null) {
|
|
132
|
+
throw new ToolInputError(`"${key}" is required. Absent and empty are different statements here — send [] to say this scenario ` +
|
|
133
|
+
"has none, which is stored honestly and replays as unverified.");
|
|
134
|
+
}
|
|
135
|
+
if (!Array.isArray(raw) || raw.some((item) => typeof item !== "object" || item === null || Array.isArray(item))) {
|
|
136
|
+
throw new ToolInputError(`"${key}" must be an array of objects`);
|
|
137
|
+
}
|
|
138
|
+
return raw;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Shape the caller's arguments into a `Scenario` **without validating them**.
|
|
142
|
+
*
|
|
143
|
+
* Deliberate: `writeScenario` is the validator, and a second one here would be
|
|
144
|
+
* a second set of rules to keep in step with the first. Everything a caller
|
|
145
|
+
* got wrong comes back through the format module's own messages, which are the
|
|
146
|
+
* ones the file's future readers will see.
|
|
147
|
+
*/
|
|
148
|
+
function shape(args, name, targetUrl, savedAtCommit) {
|
|
149
|
+
const steps = readObjectArray(args, "steps").map((step) => ({
|
|
150
|
+
action: step["action"],
|
|
151
|
+
target: (step["target"] ?? null),
|
|
152
|
+
url: (step["url"] ?? null),
|
|
153
|
+
text: (step["text"] ?? null),
|
|
154
|
+
}));
|
|
155
|
+
const assertions = readObjectArray(args, "assertions").map((assertion) => ({
|
|
156
|
+
kind: assertion["kind"],
|
|
157
|
+
afterStep: (assertion["afterStep"] ?? null),
|
|
158
|
+
target: (assertion["target"] ?? null),
|
|
159
|
+
expected: (assertion["expected"] ?? null),
|
|
160
|
+
}));
|
|
161
|
+
return {
|
|
162
|
+
schemaVersion: SCENARIO_SCHEMA_VERSION,
|
|
163
|
+
name,
|
|
164
|
+
description: optionalString(args, "description") ?? null,
|
|
165
|
+
targetUrl,
|
|
166
|
+
savedAt: new Date().toISOString(),
|
|
167
|
+
savedAtCommit,
|
|
168
|
+
steps,
|
|
169
|
+
assertions,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* The commit this scenario was authored against.
|
|
174
|
+
*
|
|
175
|
+
* Provenance only — nothing expires on it and nothing refuses because of it.
|
|
176
|
+
* It exists so a replay failure can say *the scenario was written against a
|
|
177
|
+
* different revision of this application*, which is usually the answer to "why
|
|
178
|
+
* did this break". A directory that is not a git checkout records the empty
|
|
179
|
+
* string and the reply says so, rather than a plausible-looking placeholder
|
|
180
|
+
* that a later reader would try to `git show`.
|
|
181
|
+
*/
|
|
182
|
+
async function commitOf(repoPath) {
|
|
183
|
+
try {
|
|
184
|
+
return await gitHead(repoPath);
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
return "";
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async function run(args, ctx) {
|
|
191
|
+
const sessionId = requiredString(args, "sessionId");
|
|
192
|
+
const name = requiredString(args, "name");
|
|
193
|
+
const found = await useSession(ctx.session.browserSessions(), sessionId);
|
|
194
|
+
if (!found.ok) {
|
|
195
|
+
return browserAnswer({
|
|
196
|
+
ctx,
|
|
197
|
+
state: found.dead.state,
|
|
198
|
+
headline: found.dead.headline,
|
|
199
|
+
notes: [
|
|
200
|
+
...found.dead.notes,
|
|
201
|
+
"Nothing was written. A scenario records a session somebody explored, and there is no session here " +
|
|
202
|
+
"to record.",
|
|
203
|
+
],
|
|
204
|
+
data: blank(sessionId, name),
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
const { entry } = found;
|
|
208
|
+
const targetUrl = optionalString(args, "targetUrl") ?? entry.page.currentUrl();
|
|
209
|
+
if (!withinConsent(entry, targetUrl)) {
|
|
210
|
+
return browserAnswer({
|
|
211
|
+
ctx,
|
|
212
|
+
state: "refused",
|
|
213
|
+
headline: `${targetUrl} is outside this session's consented origin.`,
|
|
214
|
+
notes: [
|
|
215
|
+
`This session's consent covers the origin ${entry.consentedOrigin} alone, and a saved scenario cannot point somewhere ` +
|
|
216
|
+
"it was never allowed to drive — storing one would launder a consent grant into a file that outlives " +
|
|
217
|
+
"the session. Nothing was written.",
|
|
218
|
+
],
|
|
219
|
+
data: blank(sessionId, name),
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
const scenario = shape(args, name, targetUrl, await commitOf(ctx.session.repoPath));
|
|
223
|
+
try {
|
|
224
|
+
// The one write path. `writeScenario` validates on the way out, so an
|
|
225
|
+
// artifact that this reader could not read back never reaches disk.
|
|
226
|
+
await writeScenario(ctx.session.repoPath, scenario);
|
|
227
|
+
}
|
|
228
|
+
catch (error) {
|
|
229
|
+
return browserAnswer({
|
|
230
|
+
ctx,
|
|
231
|
+
state: "refused",
|
|
232
|
+
headline: `Scenario "${name}" was not saved.`,
|
|
233
|
+
notes: [
|
|
234
|
+
String(error instanceof Error ? error.message : error),
|
|
235
|
+
"Validated on the way out on purpose: a scenario is written once and read on every push afterwards, " +
|
|
236
|
+
"so a fault stored today would surface during a check somebody is waiting on, long after this " +
|
|
237
|
+
"session could have explained it.",
|
|
238
|
+
],
|
|
239
|
+
data: blank(sessionId, name),
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
const path = scenarioPath(ctx.session.repoPath, name);
|
|
243
|
+
return browserAnswer({
|
|
244
|
+
ctx,
|
|
245
|
+
headline: `Saved scenario "${name}" — ${scenario.steps.length} step(s), ${scenario.assertions.length} assertion(s).`,
|
|
246
|
+
notes: [
|
|
247
|
+
`Written to ${path}. Commit it: scenarios are source, and one that is not committed works locally, ` +
|
|
248
|
+
"vanishes on CI's fresh checkout, and reports nothing rather than failing.",
|
|
249
|
+
...(scenario.assertions.length === 0
|
|
250
|
+
? [
|
|
251
|
+
"This scenario asserts nothing, so a replay of it will report \"unverified\" rather than passed. " +
|
|
252
|
+
"Saving an exploration is deliberately possible; an exploration replayed without incident has " +
|
|
253
|
+
"verified nothing.",
|
|
254
|
+
]
|
|
255
|
+
: []),
|
|
256
|
+
...(scenario.savedAtCommit === ""
|
|
257
|
+
? [
|
|
258
|
+
"No commit was recorded — this directory is not a git checkout. The scenario is stored and " +
|
|
259
|
+
"replayable; a later failure just cannot say which revision it was written against.",
|
|
260
|
+
]
|
|
261
|
+
: []),
|
|
262
|
+
],
|
|
263
|
+
data: {
|
|
264
|
+
sessionId,
|
|
265
|
+
name,
|
|
266
|
+
path,
|
|
267
|
+
targetUrl,
|
|
268
|
+
stepCount: scenario.steps.length,
|
|
269
|
+
assertionCount: scenario.assertions.length,
|
|
270
|
+
savedAt: scenario.savedAt,
|
|
271
|
+
savedAtCommit: scenario.savedAtCommit,
|
|
272
|
+
},
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
function blank(sessionId, name) {
|
|
276
|
+
return { sessionId, name, path: "", targetUrl: "", stepCount: 0, assertionCount: 0, savedAt: "", savedAtCommit: "" };
|
|
277
|
+
}
|
|
278
|
+
export const browserSaveScenarioTool = {
|
|
279
|
+
name: "browser_save_scenario",
|
|
280
|
+
title: "Save an explored session as a scenario",
|
|
281
|
+
description: "Turn a session you have explored into a durable, repeatable scenario — a committed file under " +
|
|
282
|
+
"descry/scenarios/ that browser_run_scenario replays and a pre-push check can run with no agent in the " +
|
|
283
|
+
"loop. Steps name their elements by role, name and selector together, never by a snapshot ref, because a " +
|
|
284
|
+
"ref means nothing in a later session. Assertions are required and may be empty; an empty one is stored " +
|
|
285
|
+
"honestly and replays as unverified rather than passed. The file is validated before it is written, so " +
|
|
286
|
+
"a scenario that could not be read back is refused now rather than during a check somebody is waiting on.",
|
|
287
|
+
class: "action",
|
|
288
|
+
tier: "evidence",
|
|
289
|
+
version: "1.0.0",
|
|
290
|
+
inputSchema: SCHEMA,
|
|
291
|
+
run,
|
|
292
|
+
// Undefined, for the reason the verbs have and one of its own: this call
|
|
293
|
+
// writes into the repository the developer already pointed Descry at, in a
|
|
294
|
+
// path they name, and the session it records was confirmed at
|
|
295
|
+
// browser_start_session.
|
|
296
|
+
describeAction: () => undefined,
|
|
297
|
+
};
|
|
298
|
+
//# sourceMappingURL=browser-save-scenario.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-save-scenario.js","sourceRoot":"","sources":["../../src/tools/browser-save-scenario.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,aAAa,EAAiB,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAyC,MAAM,UAAU,CAAC;AAejH,MAAM,aAAa,GAAG;IACpB,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,yGAAyG;QACzG,yGAAyG;QACzG,yGAAyG;QACzG,0GAA0G;QAC1G,yGAAyG;QACzG,iFAAiF;IACnF,UAAU,EAAE;QACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2DAA2D,EAAE;QAClG,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iEAAiE,EAAE;QACxG,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gDAAgD,EAAE;KAC5F;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC;IACtC,oBAAoB,EAAE,KAAK;CACnB,CAAC;AAEX,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ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,CAAC,CAAC,EAAE,CAAC;SACR;QACD,IAAI,EAAE;YACJ,SAAS;YACT,IAAI;YACJ,IAAI;YACJ,SAAS;YACT,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM;YAChC,cAAc,EAAE,QAAQ,CAAC,UAAU,CAAC,MAAM;YAC1C,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,aAAa,EAAE,QAAQ,CAAC,aAAa;SACtC;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,KAAK,CAAC,SAAiB,EAAE,IAAY;IAC5C,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC;AACvH,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAmB;IACrD,IAAI,EAAE,uBAAuB;IAC7B,KAAK,EAAE,wCAAwC;IAC/C,WAAW,EACT,gGAAgG;QAChG,wGAAwG;QACxG,0GAA0G;QAC1G,yGAAyG;QACzG,wGAAwG;QACxG,0GAA0G;IAC5G,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,MAAM;IACnB,GAAG;IACH,yEAAyE;IACzE,2EAA2E;IAC3E,8DAA8D;IAC9D,yBAAyB;IACzB,cAAc,EAAE,GAAG,EAAE,CAAC,SAAS;CAChC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `browser_snapshot` — what is on the page, as refs an action can take.
|
|
3
|
+
*
|
|
4
|
+
* ## Why this tool implements `fitToBudget` from its first commit
|
|
5
|
+
*
|
|
6
|
+
* A real accessibility tree is tens of thousands of bytes. `get_git_diff`
|
|
7
|
+
* shipped without an aggregate reply ceiling, returned 228,860 characters on
|
|
8
|
+
* an ordinary branch diff, and was rejected by the host before the caller saw
|
|
9
|
+
* any of it; the fix that followed bounded patch text and still failed at
|
|
10
|
+
* 84,516, because a reply is not only patch text. That lesson was paid for
|
|
11
|
+
* twice, and a brand-new tool whose payload grows with the user's application
|
|
12
|
+
* is precisely where it would be paid for a third time.
|
|
13
|
+
*
|
|
14
|
+
* So the budget hook is here from day one, and the test asserts the
|
|
15
|
+
* serialized `CallToolResult` rather than asserting that a cap ran.
|
|
16
|
+
*
|
|
17
|
+
* ## `totalElements` is never the capped number
|
|
18
|
+
*
|
|
19
|
+
* A snapshot that quietly returned the first forty elements would teach a
|
|
20
|
+
* calling agent that the page has forty elements. It would then conclude the
|
|
21
|
+
* button it needs is absent, which is a wrong answer produced by a correct
|
|
22
|
+
* tool. So the uncapped count is always present and always the real one, and
|
|
23
|
+
* a shortened reply says so in a note.
|
|
24
|
+
*/
|
|
25
|
+
import type { BrowserEvidenceReport } from "../browser/evidence.ts";
|
|
26
|
+
import { type BrowserGraphWrite } from "../browser/graph-write.ts";
|
|
27
|
+
import { type ToolDefinition } from "./kit.ts";
|
|
28
|
+
import type { ReplyFit } from "../render.ts";
|
|
29
|
+
import type { SnapshotElement } from "../browser/driver.ts";
|
|
30
|
+
export interface BrowserPageData {
|
|
31
|
+
readonly sessionId: string;
|
|
32
|
+
readonly url: string;
|
|
33
|
+
readonly title: string;
|
|
34
|
+
readonly elements: readonly SnapshotElement[];
|
|
35
|
+
/**
|
|
36
|
+
* How many elements the page has. **Never the number in `elements`** when
|
|
37
|
+
* the two differ — that is the whole point of carrying it.
|
|
38
|
+
*/
|
|
39
|
+
readonly totalElements: number;
|
|
40
|
+
readonly evidence: BrowserEvidenceReport;
|
|
41
|
+
/** Graph nodes this page's own requests reached, and any R4 edges witnessed. §5.3's "any graph node reached, surfaced in the same reply". */
|
|
42
|
+
readonly graph: BrowserGraphWrite;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* What `browser_snapshot` returns. An alias of the shared page shape, so
|
|
46
|
+
* `browser_navigate` — which answers the same question — cannot drift from it.
|
|
47
|
+
*/
|
|
48
|
+
export type BrowserSnapshotData = BrowserPageData;
|
|
49
|
+
/**
|
|
50
|
+
* Shrink by dropping elements from the end of the window, never by dropping
|
|
51
|
+
* the count or the evidence.
|
|
52
|
+
*
|
|
53
|
+
* Evidence stays because it is the part a caller cannot re-request by paging —
|
|
54
|
+
* the observations were drained when this reply was built, and a second
|
|
55
|
+
* snapshot would return a different set. Elements can always be asked for
|
|
56
|
+
* again with `startAt`, so they are what gives way.
|
|
57
|
+
*/
|
|
58
|
+
export declare function fitSnapshot(data: BrowserSnapshotData, budgetBytes: number): ReplyFit<BrowserSnapshotData>;
|
|
59
|
+
export declare const browserSnapshotTool: ToolDefinition;
|
|
60
|
+
//# sourceMappingURL=browser-snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-snapshot.d.ts","sourceRoot":"","sources":["../../src/tools/browser-snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAqD,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAClG,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,CAAC;IAC9C;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IACzC,6IAA6I;IAC7I,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AA6ElD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAwBzG;AAED,eAAO,MAAM,mBAAmB,EAAE,cAajC,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `browser_snapshot` — what is on the page, as refs an action can take.
|
|
3
|
+
*
|
|
4
|
+
* ## Why this tool implements `fitToBudget` from its first commit
|
|
5
|
+
*
|
|
6
|
+
* A real accessibility tree is tens of thousands of bytes. `get_git_diff`
|
|
7
|
+
* shipped without an aggregate reply ceiling, returned 228,860 characters on
|
|
8
|
+
* an ordinary branch diff, and was rejected by the host before the caller saw
|
|
9
|
+
* any of it; the fix that followed bounded patch text and still failed at
|
|
10
|
+
* 84,516, because a reply is not only patch text. That lesson was paid for
|
|
11
|
+
* twice, and a brand-new tool whose payload grows with the user's application
|
|
12
|
+
* is precisely where it would be paid for a third time.
|
|
13
|
+
*
|
|
14
|
+
* So the budget hook is here from day one, and the test asserts the
|
|
15
|
+
* serialized `CallToolResult` rather than asserting that a cap ran.
|
|
16
|
+
*
|
|
17
|
+
* ## `totalElements` is never the capped number
|
|
18
|
+
*
|
|
19
|
+
* A snapshot that quietly returned the first forty elements would teach a
|
|
20
|
+
* calling agent that the page has forty elements. It would then conclude the
|
|
21
|
+
* button it needs is absent, which is a wrong answer produced by a correct
|
|
22
|
+
* tool. So the uncapped count is always present and always the real one, and
|
|
23
|
+
* a shortened reply says so in a note.
|
|
24
|
+
*/
|
|
25
|
+
import { browserAnswer, observeAndCorrelate, useSession } from "../browser/tool-support.js";
|
|
26
|
+
import { NO_GRAPH_WRITE } from "../browser/graph-write.js";
|
|
27
|
+
import { optionalInteger, requiredString } from "./kit.js";
|
|
28
|
+
const SCHEMA = {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
sessionId: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "REQUIRED. The id returned by browser_start_session.",
|
|
34
|
+
},
|
|
35
|
+
startAt: {
|
|
36
|
+
type: "integer",
|
|
37
|
+
minimum: 0,
|
|
38
|
+
description: "Skip this many elements before listing. Use it to page through a large page: compare the number " +
|
|
39
|
+
"of elements you received against totalElements, which is always the real count, and ask again " +
|
|
40
|
+
"with startAt set past what you have seen.",
|
|
41
|
+
},
|
|
42
|
+
limit: {
|
|
43
|
+
type: "integer",
|
|
44
|
+
minimum: 1,
|
|
45
|
+
description: "At most this many elements. A reply too large for the host is shortened further regardless, and says so.",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
required: ["sessionId"],
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
};
|
|
51
|
+
async function run(args, ctx) {
|
|
52
|
+
const sessionId = requiredString(args, "sessionId");
|
|
53
|
+
const startAt = optionalInteger(args, "startAt", 0) ?? 0;
|
|
54
|
+
const limit = optionalInteger(args, "limit", 1);
|
|
55
|
+
const found = await useSession(ctx.session.browserSessions(), sessionId);
|
|
56
|
+
if (!found.ok) {
|
|
57
|
+
return browserAnswer({
|
|
58
|
+
ctx,
|
|
59
|
+
state: found.dead.state,
|
|
60
|
+
headline: found.dead.headline,
|
|
61
|
+
notes: found.dead.notes,
|
|
62
|
+
data: { sessionId: "", url: "", title: "", elements: [], totalElements: 0, evidence: found.dead.evidence, graph: NO_GRAPH_WRITE },
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const { entry } = found;
|
|
66
|
+
ctx.progress("Reading the page");
|
|
67
|
+
const snapshot = await entry.page.snapshot();
|
|
68
|
+
const observed = await observeAndCorrelate(ctx, entry);
|
|
69
|
+
const evidence = observed.evidence;
|
|
70
|
+
const windowed = snapshot.elements.slice(startAt, limit === undefined ? undefined : startAt + limit);
|
|
71
|
+
const notes = [...observed.notes];
|
|
72
|
+
if (windowed.length < snapshot.totalElements) {
|
|
73
|
+
notes.push(`Showing ${windowed.length} of ${snapshot.totalElements} elements, from index ${startAt}. ` +
|
|
74
|
+
"totalElements is always the real count — ask again with startAt past what you have seen.");
|
|
75
|
+
}
|
|
76
|
+
const data = {
|
|
77
|
+
sessionId: entry.sessionId,
|
|
78
|
+
url: snapshot.url,
|
|
79
|
+
title: snapshot.title,
|
|
80
|
+
elements: windowed,
|
|
81
|
+
totalElements: snapshot.totalElements,
|
|
82
|
+
evidence,
|
|
83
|
+
graph: observed.graph,
|
|
84
|
+
};
|
|
85
|
+
return browserAnswer({
|
|
86
|
+
ctx,
|
|
87
|
+
headline: `${snapshot.url} — ${windowed.length} of ${snapshot.totalElements} elements.`,
|
|
88
|
+
notes,
|
|
89
|
+
data,
|
|
90
|
+
fitToBudget: (budgetBytes) => fitSnapshot(data, budgetBytes),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Shrink by dropping elements from the end of the window, never by dropping
|
|
95
|
+
* the count or the evidence.
|
|
96
|
+
*
|
|
97
|
+
* Evidence stays because it is the part a caller cannot re-request by paging —
|
|
98
|
+
* the observations were drained when this reply was built, and a second
|
|
99
|
+
* snapshot would return a different set. Elements can always be asked for
|
|
100
|
+
* again with `startAt`, so they are what gives way.
|
|
101
|
+
*/
|
|
102
|
+
export function fitSnapshot(data, budgetBytes) {
|
|
103
|
+
const fits = (elements) => Buffer.byteLength(JSON.stringify({ ...data, elements }), "utf8") <= budgetBytes;
|
|
104
|
+
if (fits(data.elements))
|
|
105
|
+
return { data, notes: [] };
|
|
106
|
+
let low = 0;
|
|
107
|
+
let high = data.elements.length;
|
|
108
|
+
while (low < high) {
|
|
109
|
+
const mid = Math.ceil((low + high) / 2);
|
|
110
|
+
if (fits(data.elements.slice(0, mid)))
|
|
111
|
+
low = mid;
|
|
112
|
+
else
|
|
113
|
+
high = mid - 1;
|
|
114
|
+
}
|
|
115
|
+
const kept = data.elements.slice(0, low);
|
|
116
|
+
return {
|
|
117
|
+
data: { ...data, elements: kept },
|
|
118
|
+
notes: [
|
|
119
|
+
`The page's elements did not fit in one reply, so ${kept.length} of ${data.totalElements} are included. ` +
|
|
120
|
+
`totalElements is the real count, not the number shown — ask again with startAt set to ${kept.length} ` +
|
|
121
|
+
"for the next batch.",
|
|
122
|
+
],
|
|
123
|
+
truncatedDetail: { shown: kept.length, total: data.totalElements, more: null },
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export const browserSnapshotTool = {
|
|
127
|
+
name: "browser_snapshot",
|
|
128
|
+
title: "Read the current page",
|
|
129
|
+
description: "Return the elements on the page an open browser session is showing, each with a ref the click, type " +
|
|
130
|
+
"and fill tools take. Also returns anything the page produced since your last call — console errors and " +
|
|
131
|
+
"failed requests, raw and untriaged. totalElements is always the page's real element count, so a short " +
|
|
132
|
+
"list means the rest did not fit rather than that the page is small.",
|
|
133
|
+
class: "stateful-read",
|
|
134
|
+
tier: "evidence",
|
|
135
|
+
version: "1.0.0",
|
|
136
|
+
inputSchema: SCHEMA,
|
|
137
|
+
run,
|
|
138
|
+
};
|
|
139
|
+
//# sourceMappingURL=browser-snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-snapshot.js","sourceRoot":"","sources":["../../src/tools/browser-snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,cAAc,EAA0B,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,cAAc,EAAyC,MAAM,UAAU,CAAC;AAyBlG,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,QAAQ;IACd,UAAU,E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,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE;KAC/E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAmB;IACjD,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,sGAAsG;QACtG,yGAAyG;QACzG,wGAAwG;QACxG,qEAAqE;IACvE,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,MAAM;IACnB,GAAG;CACJ,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `browser_start_session` — open a real browser against the developer's app.
|
|
3
|
+
*
|
|
4
|
+
* ## Why this one is the gate
|
|
5
|
+
*
|
|
6
|
+
* `DEC-380` puts consent here and nowhere
|
|
7
|
+
* else. This is the call where a target URL is named, so it is the only call
|
|
8
|
+
* where the fact a developer actually approves — *Descry may drive a browser
|
|
9
|
+
* against this application* — can be stated. A per-click confirmation would
|
|
10
|
+
* describe "click ref-14", which is a string the caller supplied one call
|
|
11
|
+
* earlier and can neither evaluate nor be surprised by, and it would train
|
|
12
|
+
* callers to confirm reflexively.
|
|
13
|
+
*
|
|
14
|
+
* The grant is bound to this URL's **origin**. `browser_navigate` refuses to
|
|
15
|
+
* leave it. Without that bound, "drive my local app" would silently become
|
|
16
|
+
* "drive anything".
|
|
17
|
+
*
|
|
18
|
+
* ## Class
|
|
19
|
+
*
|
|
20
|
+
* `action`, unambiguously: this launches a process and points it at a running
|
|
21
|
+
* application. It is the only browser tool that mints a token; the verbs it
|
|
22
|
+
* consents for redeem nothing, because the session they run in has already
|
|
23
|
+
* been confirmed.
|
|
24
|
+
*/
|
|
25
|
+
import type { BrowserEvidenceReport } from "../browser/evidence.ts";
|
|
26
|
+
import { type BrowserGraphWrite } from "../browser/graph-write.ts";
|
|
27
|
+
import { type ToolDefinition } from "./kit.ts";
|
|
28
|
+
export interface BrowserStartSessionData {
|
|
29
|
+
/** Hand this to every other browser tool. Valid on this connection only. */
|
|
30
|
+
readonly sessionId: string;
|
|
31
|
+
readonly url: string;
|
|
32
|
+
readonly title: string;
|
|
33
|
+
/** The origin this session's consent covers. Navigation outside it refuses. */
|
|
34
|
+
readonly consentedOrigin: string;
|
|
35
|
+
/** The safety level this session runs under, or null when no profile was given. */
|
|
36
|
+
readonly safetyLevel: "readOnly" | "write" | "destructiveWithApproval" | null;
|
|
37
|
+
/** How many elements the landing page has, before any reply budget applies. */
|
|
38
|
+
readonly totalElements: number;
|
|
39
|
+
readonly evidence: BrowserEvidenceReport;
|
|
40
|
+
readonly graph: BrowserGraphWrite;
|
|
41
|
+
}
|
|
42
|
+
export declare const browserStartSessionTool: ToolDefinition;
|
|
43
|
+
//# sourceMappingURL=browser-start-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-start-session.d.ts","sourceRoot":"","sources":["../../src/tools/browser-start-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAOnF,OAAO,EAAmG,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAGhJ,MAAM,WAAW,uBAAuB;IACtC,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,mFAAmF;IACnF,QAAQ,CAAC,WAAW,EAAE,UAAU,GAAG,OAAO,GAAG,yBAAyB,GAAG,IAAI,CAAC;IAC9E,+EAA+E;IAC/E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;CACnC;AAoPD,eAAO,MAAM,uBAAuB,EAAE,cAsBrC,CAAC"}
|