@descryy/runtime-identity-grounding 0.4.0 → 0.4.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.
@@ -14,7 +14,7 @@
14
14
  */
15
15
  import type { CapabilityStatus, SourceLocation } from "@descryy/runtime-contracts";
16
16
  /** Every way this can decline to name a component, as a closed set. A refusal is not an error and is never thrown — absence has to be representable data the caller can act on. */
17
- export declare const IDENTITY_REFUSALS: readonly ["probe-not-installed", "element-not-found", "not-react", "react-debug-fields-absent", "no-component-fiber", "anonymous-component", "vue-component-marker-absent", "framework-not-detected"];
17
+ export declare const IDENTITY_REFUSALS: readonly ["probe-not-installed", "element-not-found", "not-react", "react-debug-fields-absent", "no-component-fiber", "anonymous-component", "vue-component-marker-absent"];
18
18
  export type IdentityRefusal = (typeof IDENTITY_REFUSALS)[number];
19
19
  /** How a source location was obtained. The two values are the two React majors' genuinely different internals, not two implementations of one idea — see `identity-grounding.ts` for the measurements. */
20
20
  export declare const GROUNDING_MECHANISMS: readonly ["react-debug-source", "react-owner-stack", "vue-options-file"];
@@ -1 +1 @@
1
- {"version":3,"file":"element-identity.d.ts","sourceRoot":"","sources":["../src/element-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEnF,mLAAmL;AACnL,eAAO,MAAM,iBAAiB,uMAoDpB,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,0MAA0M;AAC1M,eAAO,MAAM,oBAAoB,0EAcvB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,eAAO,MAAM,eAAe,sEAAuE,CAAC;AACpG,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,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H;IAC9H,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC9C,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC;;;;;;OAMG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,MAAM,eAAe,GAAG,uBAAuB,GAAG,4BAA4B,GAAG,sBAAsB,CAAC;AAE9G;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,WAAW,GAAG,gBAAgB,CAAC;AAC3E,wBAAgB,aAAa,CAAC,YAAY,EAAE,UAAU,GAAG,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC"}
@@ -55,16 +55,6 @@ export const IDENTITY_REFUSALS = [
55
55
  * that stopped exposing `_debug*` in dev too."
56
56
  */
57
57
  "vue-component-marker-absent",
58
- /**
59
- * `createFrameworkAwareGrounder`'s own refusal (`framework-aware-grounder.ts`): neither a React
60
- * fiber key nor a Vue `__vueParentComponent` marker was found anywhere in the document, so
61
- * there is no framework-specific grounder to delegate to. Distinct from `not-react` (which
62
- * only rules out React) and from `vue-component-marker-absent` (which only rules out Vue) --
63
- * this one is the honest answer when *both* readings failed, which is the case a caller that
64
- * does not know the page's framework in advance is actually in. Never a reason to default to
65
- * React.
66
- */
67
- "framework-not-detected",
68
58
  ];
69
59
  /** How a source location was obtained. The two values are the two React majors' genuinely different internals, not two implementations of one idea — see `identity-grounding.ts` for the measurements. */
70
60
  export const GROUNDING_MECHANISMS = [
@@ -1 +1 @@
1
- {"version":3,"file":"element-identity.js","sourceRoot":"","sources":["../src/element-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,mLAAmL;AACnL,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,gKAAgK;IAChK,qBAAqB;IACrB,gDAAgD;IAChD,mBAAmB;IACnB,8IAA8I;IAC9I,WAAW;IACX;;;;;;;;;;;;;;;;OAgBG;IACH,2BAA2B;IAC3B,+JAA+J;IAC/J,oBAAoB;IACpB,qPAAqP;IACrP,qBAAqB;IACrB;;;;;;;;;;;OAWG;IACH,6BAA6B;IAC7B;;;;;;;;OAQG;IACH,wBAAwB;CAChB,CAAC;AAGX,0MAA0M;AAC1M,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,sHAAsH;IACtH,oBAAoB;IACpB,8IAA8I;IAC9I,mBAAmB;IACnB;;;;;;;OAOG;IACH,kBAAkB;CACV,CAAC;AAGX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,CAAU,CAAC;AAGpG,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,aAAa,EAAE,eAAe,EAAE,yBAAyB,EAAE,kBAAkB,CAAU,CAAC;AAU/H;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,aAAa,EAAE,cAAc,EAAE,sBAAsB,CAAU,CAAC;AAqElG,MAAM,UAAU,aAAa,CAAC,YAA8C,EAAE,MAAe;IAC3F,OAAO,YAAY,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC;AAChH,CAAC"}
1
+ {"version":3,"file":"element-identity.js","sourceRoot":"","sources":["../src/element-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,mLAAmL;AACnL,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,gKAAgK;IAChK,qBAAqB;IACrB,gDAAgD;IAChD,mBAAmB;IACnB,8IAA8I;IAC9I,WAAW;IACX;;;;;;;;;;;;;;;;OAgBG;IACH,2BAA2B;IAC3B,+JAA+J;IAC/J,oBAAoB;IACpB,qPAAqP;IACrP,qBAAqB;IACrB;;;;;;;;;;;OAWG;IACH,6BAA6B;CACrB,CAAC;AAGX,0MAA0M;AAC1M,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,sHAAsH;IACtH,oBAAoB;IACpB,8IAA8I;IAC9I,mBAAmB;IACnB;;;;;;;OAOG;IACH,kBAAkB;CACV,CAAC;AAGX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,CAAU,CAAC;AAGpG,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,aAAa,EAAE,eAAe,EAAE,yBAAyB,EAAE,kBAAkB,CAAU,CAAC;AAU/H;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,aAAa,EAAE,cAAc,EAAE,sBAAsB,CAAU,CAAC;AAqElG,MAAM,UAAU,aAAa,CAAC,YAA8C,EAAE,MAAe;IAC3F,OAAO,YAAY,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,EAAE,EAAE,CAAC;AAChH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -20,8 +20,4 @@ export type { VueIdentityGrounder } from "./vue-identity-grounder.ts";
20
20
  export { createVueIdentityGrounder } from "./vue-identity-grounder.ts";
21
21
  export type { GraphSymbolLocation } from "./graph-join.ts";
22
22
  export { symbolLocationForGraph } from "./graph-join.ts";
23
- export type { DetectableFramework, FrameworkDetectionResult, FrameworkDetector } from "./framework-detector.ts";
24
- export { DETECTABLE_FRAMEWORKS, FRAMEWORK_DETECTION_BINDING, createFrameworkDetector } from "./framework-detector.ts";
25
- export type { FrameworkAwareGrounder } from "./framework-aware-grounder.ts";
26
- export { createFrameworkAwareGrounder } from "./framework-aware-grounder.ts";
27
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,aAAa,EAAE,sBAAsB,EAAE,cAAc,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACtI,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEhH,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAEnF,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAA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AkB,EAAE,MAAM,kBAAkB,CAAC;AAEhH,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAEnF,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,YAAY,EAAE,WAAW,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAEjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -12,6 +12,4 @@ export { createVueIdentityGroundingProbe, VUE_IDENTITY_GROUNDING_BINDING } from
12
12
  export { groundFromVueProbe } from "./vue-identity-grounding.js";
13
13
  export { createVueIdentityGrounder } from "./vue-identity-grounder.js";
14
14
  export { symbolLocationForGraph } from "./graph-join.js";
15
- export { DETECTABLE_FRAMEWORKS, FRAMEWORK_DETECTION_BINDING, createFrameworkDetector } from "./framework-detector.js";
16
- export { createFrameworkAwareGrounder } from "./framework-aware-grounder.js";
17
15
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"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AAO,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAEjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descryy/runtime-identity-grounding",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "description": "Identity grounding: resolves an on-screen DOM element back to the React or Vue component that produced it, and to that component's authored file (and, for React, line). createFrameworkAwareGrounder detects which framework actually rendered the page (React's fiber marker, then Vue's component marker, else a named refusal) and grounds through the matching mechanism -- never a default to React. Injects through @descryy/runtime-browser's existing page.addInitScript seam; refuses by name on a production build rather than guessing. Consumed by descry-core's @descryy/mcp (packages/mcp/src/browser/playwright-driver.ts) and descry-desktop's @descry/session (packages/session/src/pipeline/browser-drive.ts).",
6
6
  "license": "UNLICENSED",
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@descryy/runtime-contracts": "0.3.3",
28
- "@descryy/runtime-adapter-typescript": "0.3.3",
29
- "@descryy/runtime-browser": "0.4.4",
28
+ "@descryy/runtime-adapter-typescript": "0.3.4",
29
+ "@descryy/runtime-browser": "0.4.5",
30
30
  "playwright-core": "^1.62.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@descryy/runtime-graph-correlator": "*",
34
- "@descryy/runtime-controller": "*"
33
+ "@descryy/runtime-graph-correlator": "0.4.5",
34
+ "@descryy/runtime-controller": "0.3.4"
35
35
  }
36
36
  }
@@ -1,35 +0,0 @@
1
- /**
2
- * Detect, then ground with the matching framework's grounder -- the single
3
- * seam both surfaces (`descry-core`'s `playwright-driver.ts`, the desktop's
4
- * `browser-drive.ts`) are meant to call instead of hardcoding
5
- * `createIdentityGrounder` (React). Composes `createFrameworkDetector`
6
- * (`framework-detector.ts`) with `createIdentityGrounder` (React,
7
- * `identity-grounder.ts`) and `createVueIdentityGrounder` (Vue,
8
- * `vue-identity-grounder.ts`); never defaults to either when detection
9
- * fails.
10
- *
11
- * `install()` installs all three page-side probes -- the detector's and
12
- * both frameworks' -- before first navigation, required by
13
- * `page.addInitScript`'s contract regardless of which framework the page
14
- * turns out to be, since detection cannot run until the document is live.
15
- * Installing a probe that never fires costs nothing beyond the one
16
- * `addInitScript` registration.
17
- *
18
- * `ground()` re-detects on every call rather than caching the framework
19
- * after the first success: a session's page can navigate to a different
20
- * app mid-session (a browser session's grounder is created once and reused
21
- * across the whole session, both in `playwright-driver.ts`'s long-lived
22
- * session and in the desktop's drive), and a framework cached from page 1
23
- * would silently misground page 2 rather than re-deciding honestly.
24
- */
25
- import type { Page } from "playwright-core";
26
- import type { ElementIdentity } from "./element-identity.ts";
27
- import { type IdentityGrounderOptions } from "./identity-grounder.ts";
28
- export interface FrameworkAwareGrounder {
29
- /** Installs every page-side probe (detection, React, Vue) into every document this page loads from now on. Call before navigating -- same `addInitScript` contract every probe in this package carries. */
30
- install(page: Page): Promise<void>;
31
- /** Detects the page's framework, then resolves one on-screen element through that framework's own grounder. Refuses by name (`framework-not-detected`) rather than guessing when neither framework's marker is present. */
32
- ground(page: Page, selector: string): Promise<ElementIdentity>;
33
- }
34
- export declare function createFrameworkAwareGrounder(options?: IdentityGrounderOptions): FrameworkAwareGrounder;
35
- //# sourceMappingURL=framework-aware-grounder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"framework-aware-grounder.d.ts","sourceRoot":"","sources":["../src/framework-aware-grounder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAiD,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAGrH,MAAM,WAAW,sBAAsB;IACrC,2MAA2M;IAC3M,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,2NAA2N;IAC3N,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAChE;AAED,wBAAgB,4BAA4B,CAAC,OAAO,GAAE,uBAA4B,GAAG,sBAAsB,CA6B1G"}
@@ -1,58 +0,0 @@
1
- /**
2
- * Detect, then ground with the matching framework's grounder -- the single
3
- * seam both surfaces (`descry-core`'s `playwright-driver.ts`, the desktop's
4
- * `browser-drive.ts`) are meant to call instead of hardcoding
5
- * `createIdentityGrounder` (React). Composes `createFrameworkDetector`
6
- * (`framework-detector.ts`) with `createIdentityGrounder` (React,
7
- * `identity-grounder.ts`) and `createVueIdentityGrounder` (Vue,
8
- * `vue-identity-grounder.ts`); never defaults to either when detection
9
- * fails.
10
- *
11
- * `install()` installs all three page-side probes -- the detector's and
12
- * both frameworks' -- before first navigation, required by
13
- * `page.addInitScript`'s contract regardless of which framework the page
14
- * turns out to be, since detection cannot run until the document is live.
15
- * Installing a probe that never fires costs nothing beyond the one
16
- * `addInitScript` registration.
17
- *
18
- * `ground()` re-detects on every call rather than caching the framework
19
- * after the first success: a session's page can navigate to a different
20
- * app mid-session (a browser session's grounder is created once and reused
21
- * across the whole session, both in `playwright-driver.ts`'s long-lived
22
- * session and in the desktop's drive), and a framework cached from page 1
23
- * would silently misground page 2 rather than re-deciding honestly.
24
- */
25
- import { capabilityFor } from "./element-identity.js";
26
- import { createFrameworkDetector } from "./framework-detector.js";
27
- import { createIdentityGrounder } from "./identity-grounder.js";
28
- import { createVueIdentityGrounder } from "./vue-identity-grounder.js";
29
- export function createFrameworkAwareGrounder(options = {}) {
30
- const detector = createFrameworkDetector();
31
- const reactGrounder = createIdentityGrounder(options);
32
- const vueGrounder = createVueIdentityGrounder();
33
- return {
34
- async install(page) {
35
- // Order doesn't matter -- addInitScript registrations are independent
36
- // and all three must land before the first navigation.
37
- await detector.install(page);
38
- await reactGrounder.install(page);
39
- await vueGrounder.install(page);
40
- },
41
- async ground(page, selector) {
42
- const result = await detector.detect(page);
43
- if (result.outcome === "detected") {
44
- return result.framework === "react" ? reactGrounder.ground(page, selector) : vueGrounder.ground(page, selector);
45
- }
46
- return {
47
- selector,
48
- fiberDistance: 0,
49
- outcome: "refused",
50
- refusal: "framework-not-detected",
51
- reason: result.reason,
52
- capability: capabilityFor("unavailable", result.reason),
53
- observedTypeName: null,
54
- };
55
- },
56
- };
57
- }
58
- //# sourceMappingURL=framework-aware-grounder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"framework-aware-grounder.js","sourceRoot":"","sources":["../src/framework-aware-grounder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAiC,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAuD,MAAM,wBAAwB,CAAC;AACrH,OAAO,EAAE,yBAAyB,EAA4B,MAAM,4BAA4B,CAAC;AASjG,MAAM,UAAU,4BAA4B,CAAC,UAAmC,EAAE;IAChF,MAAM,QAAQ,GAAG,uBAAuB,EAAE,CAAC;IAC3C,MAAM,aAAa,GAAqB,sBAAsB,CAAC,OAAO,CAAC,CAAC;IACxE,MAAM,WAAW,GAAwB,yBAAyB,EAAE,CAAC;IAErE,OAAO;QACL,KAAK,CAAC,OAAO,CAAC,IAAU;YACtB,sEAAsE;YACtE,uDAAuD;YACvD,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC7B,MAAM,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAClC,MAAM,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,IAAU,EAAE,QAAgB;YACvC,MAAM,MAAM,GAA6B,MAAM,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACrE,IAAI,MAAM,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;gBAClC,OAAO,MAAM,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAClH,CAAC;YACD,OAAO;gBACL,QAAQ;gBACR,aAAa,EAAE,CAAC;gBAChB,OAAO,EAAE,SAAS;gBAClB,OAAO,EAAE,wBAAwB;gBACjC,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,UAAU,EAAE,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC;gBACvD,gBAAgB,EAAE,IAAI;aACvB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,46 +0,0 @@
1
- /**
2
- * Which framework rendered this page, decided by scanning the live document
3
- * for the marker each framework's own probe already reads: React's fiber
4
- * key (`fiber-probe.ts`'s `FIBER_KEY_PREFIXES`), then Vue's
5
- * `__vueParentComponent` (`vue-probe.ts`). Neither found is a named
6
- * refusal -- never a default to React.
7
- *
8
- * This is the one place both surfaces (`descry-core`'s
9
- * `packages/mcp/src/browser/playwright-driver.ts` and `descry-desktop`'s
10
- * `packages/session/src/pipeline/browser-drive.ts`) are meant to call, so
11
- * detection is decided once and the two cannot drift on how they decide.
12
- * See `framework-aware-grounder.ts` for the composed grounder that uses
13
- * this to pick between `createIdentityGrounder` (React) and
14
- * `createVueIdentityGrounder` (Vue).
15
- *
16
- * Page-wide, not selector-scoped, deliberately: the element a caller wants
17
- * grounded may sit outside the framework's own mount root (a static
18
- * wrapper around an app), and a selector-scoped scan would misreport "not
19
- * React" for a real React page just because the queried node happens to sit
20
- * outside it. Scanning the whole document answers the honest, broader
21
- * question -- "did this framework render anything on this page at all" --
22
- * which is what deciding *which grounder to use* needs; the per-selector
23
- * probes answer the narrower one ("did it render *this* element") once a
24
- * grounder has already been chosen.
25
- */
26
- import type { Page } from "playwright-core";
27
- /** The single global this installs. One name, one function, no other footprint on the page -- same discipline as `fiber-probe.ts`'s and `vue-probe.ts`'s own bindings. */
28
- export declare const FRAMEWORK_DETECTION_BINDING = "__descryFrameworkDetection";
29
- /** Checked in this order, always: React's fiber marker, then Vue's component marker. Never the reverse, and never a default. */
30
- export declare const DETECTABLE_FRAMEWORKS: readonly ["react", "vue"];
31
- export type DetectableFramework = (typeof DETECTABLE_FRAMEWORKS)[number];
32
- export type FrameworkDetectionResult = {
33
- readonly outcome: "detected";
34
- readonly framework: DetectableFramework;
35
- } | {
36
- readonly outcome: "refused";
37
- readonly reason: string;
38
- };
39
- export interface FrameworkDetector {
40
- /** Installs the page-side reader into every document this page loads from now on. Call before navigating -- a page navigated first reports a `probe-not-installed`-shaped refusal, same contract `fiber-probe.ts`'s `install` documents. */
41
- install(page: Page): Promise<void>;
42
- /** Scans the page's current document and names which framework rendered it, or refuses by name. Never throws for a routine unavailability. */
43
- detect(page: Page): Promise<FrameworkDetectionResult>;
44
- }
45
- export declare function createFrameworkDetector(): FrameworkDetector;
46
- //# sourceMappingURL=framework-detector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"framework-detector.d.ts","sourceRoot":"","sources":["../src/framework-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5C,0KAA0K;AAC1K,eAAO,MAAM,2BAA2B,+BAA+B,CAAC;AAExE,gIAAgI;AAChI,eAAO,MAAM,qBAAqB,2BAA4B,CAAC;AAC/D,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,MAAM,MAAM,wBAAwB,GAChC;IAAE,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAA;CAAE,GACzE;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,4OAA4O;IAC5O,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,8IAA8I;IAC9I,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACvD;AAED,wBAAgB,uBAAuB,IAAI,iBAAiB,CAS3D"}
@@ -1,89 +0,0 @@
1
- /**
2
- * Which framework rendered this page, decided by scanning the live document
3
- * for the marker each framework's own probe already reads: React's fiber
4
- * key (`fiber-probe.ts`'s `FIBER_KEY_PREFIXES`), then Vue's
5
- * `__vueParentComponent` (`vue-probe.ts`). Neither found is a named
6
- * refusal -- never a default to React.
7
- *
8
- * This is the one place both surfaces (`descry-core`'s
9
- * `packages/mcp/src/browser/playwright-driver.ts` and `descry-desktop`'s
10
- * `packages/session/src/pipeline/browser-drive.ts`) are meant to call, so
11
- * detection is decided once and the two cannot drift on how they decide.
12
- * See `framework-aware-grounder.ts` for the composed grounder that uses
13
- * this to pick between `createIdentityGrounder` (React) and
14
- * `createVueIdentityGrounder` (Vue).
15
- *
16
- * Page-wide, not selector-scoped, deliberately: the element a caller wants
17
- * grounded may sit outside the framework's own mount root (a static
18
- * wrapper around an app), and a selector-scoped scan would misreport "not
19
- * React" for a real React page just because the queried node happens to sit
20
- * outside it. Scanning the whole document answers the honest, broader
21
- * question -- "did this framework render anything on this page at all" --
22
- * which is what deciding *which grounder to use* needs; the per-selector
23
- * probes answer the narrower one ("did it render *this* element") once a
24
- * grounder has already been chosen.
25
- */
26
- import { FIBER_KEY_PREFIXES } from "./fiber-probe.js";
27
- /** The single global this installs. One name, one function, no other footprint on the page -- same discipline as `fiber-probe.ts`'s and `vue-probe.ts`'s own bindings. */
28
- export const FRAMEWORK_DETECTION_BINDING = "__descryFrameworkDetection";
29
- /** Checked in this order, always: React's fiber marker, then Vue's component marker. Never the reverse, and never a default. */
30
- export const DETECTABLE_FRAMEWORKS = ["react", "vue"];
31
- export function createFrameworkDetector() {
32
- return {
33
- async install(page) {
34
- await page.addInitScript({ content: probeScriptSource() });
35
- },
36
- detect(page) {
37
- return page.evaluate(callSource());
38
- },
39
- };
40
- }
41
- /** Self-invoking, no arguments needed -- unlike the per-element probes there is no selector to serialise in. The `probe-not-installed` branch lives here, not in the injected script, for the same reason `fiber-probe.ts`'s `probeCallSource` gives: a script that never ran cannot report that it never ran. */
42
- function callSource() {
43
- return `(() => {
44
- const detection = window[${JSON.stringify(FRAMEWORK_DETECTION_BINDING)}];
45
- if (detection === undefined || typeof detection.detect !== "function") {
46
- return {
47
- outcome: "refused",
48
- reason: "the framework-detection probe was never installed (install() must run before the page's first navigation)",
49
- };
50
- }
51
- return detection.detect();
52
- })()`;
53
- }
54
- function probeScriptSource() {
55
- return `(() => {
56
- const FIBER_KEY_PREFIXES = ${JSON.stringify(FIBER_KEY_PREFIXES)};
57
-
58
- function hasReactFiberKey(element) {
59
- const keys = Object.keys(element);
60
- for (let i = 0; i < keys.length; i++) {
61
- for (let p = 0; p < FIBER_KEY_PREFIXES.length; p++) {
62
- if (keys[i].indexOf(FIBER_KEY_PREFIXES[p]) === 0) return true;
63
- }
64
- }
65
- return false;
66
- }
67
-
68
- function hasVueMarker(element) {
69
- return element.__vueParentComponent !== undefined && element.__vueParentComponent !== null;
70
- }
71
-
72
- window[${JSON.stringify(FRAMEWORK_DETECTION_BINDING)}] = {
73
- detect: function () {
74
- const all = document.querySelectorAll("*");
75
- for (let i = 0; i < all.length; i++) {
76
- if (hasReactFiberKey(all[i])) return { outcome: "detected", framework: "react" };
77
- }
78
- for (let i = 0; i < all.length; i++) {
79
- if (hasVueMarker(all[i])) return { outcome: "detected", framework: "vue" };
80
- }
81
- return {
82
- outcome: "refused",
83
- reason: "neither a React fiber key nor a Vue __vueParentComponent marker was found anywhere in the document",
84
- };
85
- },
86
- };
87
- })();`;
88
- }
89
- //# sourceMappingURL=framework-detector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"framework-detector.js","sourceRoot":"","sources":["../src/framework-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,0KAA0K;AAC1K,MAAM,CAAC,MAAM,2BAA2B,GAAG,4BAA4B,CAAC;AAExE,gIAAgI;AAChI,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,KAAK,CAAU,CAAC;AAc/D,MAAM,UAAU,uBAAuB;IACrC,OAAO;QACL,KAAK,CAAC,OAAO,CAAC,IAAU;YACtB,MAAM,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;QAC7D,CAAC;QACD,MAAM,CAAC,IAAU;YACf,OAAO,IAAI,CAAC,QAAQ,CAA2B,UAAU,EAAE,CAAC,CAAC;QAC/D,CAAC;KACF,CAAC;AACJ,CAAC;AAED,kTAAkT;AAClT,SAAS,UAAU;IACjB,OAAO;6BACoB,IAAI,CAAC,SAAS,CAAC,2BAA2B,CAAC;;;;;;;;KAQnE,CAAC;AACN,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO;+BACsB,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;;;;;;;;;;;;;;;;WAgBtD,IAAI,CAAC,SAAS,CAAC,2BAA2B,CAAC;;;;;;;;;;;;;;;MAehD,CAAC;AACP,CAAC"}