dsh-builtin-browser 0.4.7 → 0.4.9

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.en.md +62 -491
  3. package/README.md +44 -470
  4. package/client.js +10 -10
  5. package/cordis.patch.yml +4 -4
  6. package/desktop-bridge/plugin-browser-bridge.js +1 -1
  7. package/docs/README.md +8 -4
  8. package/docs/architecture.md +82 -11
  9. package/docs/development.md +38 -0
  10. package/docs/limitations.md +49 -0
  11. package/docs/tool-reference.md +42 -42
  12. package/docs/user-guide.md +93 -37
  13. package/docs/why-browser.md +3 -3
  14. package/lib/browser/types.d.ts +2 -2
  15. package/lib/browser-electron/entry.d.ts +2 -2
  16. package/lib/browser-electron/entry.js +1 -1
  17. package/lib/browser-electron/history-store.d.ts +1 -1
  18. package/lib/browser-electron/history-store.js +1 -1
  19. package/lib/browser-electron/host-main.js +3 -3
  20. package/lib/browser-electron/provider.d.ts +9 -9
  21. package/lib/browser-electron/provider.js +14 -14
  22. package/lib/browser-electron/remote-host.js +1 -1
  23. package/lib/browser-electron/settings-store.d.ts +4 -4
  24. package/lib/browser-electron/system-browser.d.ts +60 -0
  25. package/lib/browser-electron/system-browser.js +257 -23
  26. package/lib/index.d.ts +1 -1
  27. package/lib/index.js +1 -1
  28. package/lib/tool-browser/element-fields.d.ts +4 -4
  29. package/lib/tool-browser/element-fields.js +6 -6
  30. package/lib/tool-browser/index.d.ts +6 -6
  31. package/lib/tool-browser/index.js +161 -139
  32. package/package.json +2 -2
  33. package/scripts/verify-host-compat.mjs +6 -6
  34. package/src/browser/types.ts +2 -2
  35. package/src/browser-electron/entry.ts +2 -2
  36. package/src/browser-electron/history-store.ts +1 -1
  37. package/src/browser-electron/host-main.ts +3 -3
  38. package/src/browser-electron/provider.ts +15 -15
  39. package/src/browser-electron/remote-host.ts +1 -1
  40. package/src/browser-electron/settings-store.ts +4 -4
  41. package/src/browser-electron/system-browser.ts +244 -16
  42. package/src/index.ts +1 -1
  43. package/src/tool-browser/element-fields.ts +6 -6
  44. package/src/tool-browser/index.ts +164 -140
@@ -8,9 +8,9 @@
8
8
  * and the tool's `output.schema` declared the properties. Nothing connected them, and the
9
9
  * result is this project's most repeatable bug:
10
10
  *
11
- * - `browser_a11y`'s `selector` — computed by the provider, declared by the schema,
11
+ * - `dsh_browser_a11y`'s `selector` — computed by the provider, declared by the schema,
12
12
  * printed by the renderer, and dropped by the projection. 134 tests stayed green.
13
- * - `browser_screenshot`'s `width`/`height` — measured by the provider, declared by the
13
+ * - `dsh_browser_screenshot`'s `width`/`height` — measured by the provider, declared by the
14
14
  * schema, and dropped by the projection. 172 tests stayed green. It was found a round
15
15
  * later, by reading the three places that agree and noticing the fourth did not.
16
16
  *
@@ -33,7 +33,7 @@ interface FieldSpec {
33
33
  }
34
34
 
35
35
  /**
36
- * The fields of one entry in `browser_snapshot` / `browser_open`'s `elements`.
36
+ * The fields of one entry in `dsh_browser_snapshot` / `dsh_browser_open`'s `elements`.
37
37
  *
38
38
  * `selector` is the reason this file exists; see the header. It was added to the schema and
39
39
  * the projection separately, and only one of them landed.
@@ -49,7 +49,7 @@ const ELEMENT_FIELDS = {
49
49
  } as const satisfies Record<string, FieldSpec>
50
50
 
51
51
  /**
52
- * The fields of one entry in `browser_a11y`'s `nodes`.
52
+ * The fields of one entry in `dsh_browser_a11y`'s `nodes`.
53
53
  *
54
54
  * Different shape from an element on purpose: a role and an accessible name carry meaning a
55
55
  * tag and a label string do not, and `depth` is what renders the tree.
@@ -91,7 +91,7 @@ function project(fields: Record<string, FieldSpec>, source: Record<string, unkno
91
91
  }
92
92
 
93
93
  /**
94
- * The `elements` item schema for browser_snapshot and browser_open.
94
+ * The `elements` item schema for dsh_browser_snapshot and dsh_browser_open.
95
95
  *
96
96
  * Written as a literal rather than generated, because `defineTool` validates the output schema
97
97
  * against its own `ValueSchemaSpec` and a generated `Record<string, …>` is too wide to satisfy
@@ -114,7 +114,7 @@ export const ELEMENT_ITEM_SCHEMA = {
114
114
  } as const
115
115
 
116
116
  /**
117
- * The `nodes` item schema for browser_a11y.
117
+ * The `nodes` item schema for dsh_browser_a11y.
118
118
  *
119
119
  * Same reasoning as {@link ELEMENT_ITEM_SCHEMA}: literal for the type checker, table-backed by
120
120
  * test.