@michaelmagan/dnumb 0.1.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.
Files changed (133) hide show
  1. package/AGENTS.md +180 -0
  2. package/LICENSE +21 -0
  3. package/README.md +297 -0
  4. package/dist/analysis/cluster.cjs +114 -0
  5. package/dist/analysis/cluster.d.cts +68 -0
  6. package/dist/analysis/cluster.d.ts +68 -0
  7. package/dist/analysis/cluster.js +109 -0
  8. package/dist/analysis/distances.cjs +124 -0
  9. package/dist/analysis/distances.d.cts +58 -0
  10. package/dist/analysis/distances.d.ts +58 -0
  11. package/dist/analysis/distances.js +119 -0
  12. package/dist/analysis/geometry.cjs +60 -0
  13. package/dist/analysis/geometry.d.cts +34 -0
  14. package/dist/analysis/geometry.d.ts +34 -0
  15. package/dist/analysis/geometry.js +53 -0
  16. package/dist/analysis/layout-tree.cjs +245 -0
  17. package/dist/analysis/layout-tree.d.cts +45 -0
  18. package/dist/analysis/layout-tree.d.ts +45 -0
  19. package/dist/analysis/layout-tree.js +242 -0
  20. package/dist/analysis/region-query.cjs +71 -0
  21. package/dist/analysis/region-query.d.cts +25 -0
  22. package/dist/analysis/region-query.d.ts +25 -0
  23. package/dist/analysis/region-query.js +67 -0
  24. package/dist/analysis/types.cjs +7 -0
  25. package/dist/analysis/types.d.cts +143 -0
  26. package/dist/analysis/types.d.ts +143 -0
  27. package/dist/analysis/types.js +6 -0
  28. package/dist/bundle.cjs +182 -0
  29. package/dist/bundle.d.cts +91 -0
  30. package/dist/bundle.d.ts +91 -0
  31. package/dist/bundle.js +175 -0
  32. package/dist/cli.cjs +755 -0
  33. package/dist/cli.d.cts +2 -0
  34. package/dist/cli.d.ts +2 -0
  35. package/dist/cli.js +719 -0
  36. package/dist/diff/changes.cjs +656 -0
  37. package/dist/diff/changes.d.cts +2 -0
  38. package/dist/diff/changes.d.ts +2 -0
  39. package/dist/diff/changes.js +653 -0
  40. package/dist/diff/identity.cjs +167 -0
  41. package/dist/diff/identity.d.cts +62 -0
  42. package/dist/diff/identity.d.ts +62 -0
  43. package/dist/diff/identity.js +159 -0
  44. package/dist/diff/index.cjs +84 -0
  45. package/dist/diff/index.d.cts +76 -0
  46. package/dist/diff/index.d.ts +76 -0
  47. package/dist/diff/index.js +68 -0
  48. package/dist/diff/match.cjs +156 -0
  49. package/dist/diff/match.d.cts +17 -0
  50. package/dist/diff/match.d.ts +17 -0
  51. package/dist/diff/match.js +152 -0
  52. package/dist/diff/render.cjs +540 -0
  53. package/dist/diff/render.d.cts +2 -0
  54. package/dist/diff/render.d.ts +2 -0
  55. package/dist/diff/render.js +537 -0
  56. package/dist/diff/types.cjs +2 -0
  57. package/dist/diff/types.d.cts +211 -0
  58. package/dist/diff/types.d.ts +211 -0
  59. package/dist/diff/types.js +1 -0
  60. package/dist/digest/index.cjs +8 -0
  61. package/dist/digest/index.d.cts +4 -0
  62. package/dist/digest/index.d.ts +4 -0
  63. package/dist/digest/index.js +2 -0
  64. package/dist/digest/parse.cjs +163 -0
  65. package/dist/digest/parse.d.cts +80 -0
  66. package/dist/digest/parse.d.ts +80 -0
  67. package/dist/digest/parse.js +160 -0
  68. package/dist/digest/render.cjs +1575 -0
  69. package/dist/digest/render.d.cts +41 -0
  70. package/dist/digest/render.d.ts +41 -0
  71. package/dist/digest/render.js +1571 -0
  72. package/dist/digest/types.cjs +10 -0
  73. package/dist/digest/types.d.cts +86 -0
  74. package/dist/digest/types.d.ts +86 -0
  75. package/dist/digest/types.js +9 -0
  76. package/dist/index.cjs +61 -0
  77. package/dist/index.d.cts +27 -0
  78. package/dist/index.d.ts +27 -0
  79. package/dist/index.js +19 -0
  80. package/dist/page.cjs +35 -0
  81. package/dist/page.d.cts +40 -0
  82. package/dist/page.d.ts +40 -0
  83. package/dist/page.js +31 -0
  84. package/dist/playwright.cjs +138 -0
  85. package/dist/playwright.d.cts +69 -0
  86. package/dist/playwright.d.ts +69 -0
  87. package/dist/playwright.js +131 -0
  88. package/dist/query.cjs +1152 -0
  89. package/dist/query.d.cts +47 -0
  90. package/dist/query.d.ts +47 -0
  91. package/dist/query.js +1146 -0
  92. package/dist/snapshot/capture.cjs +80 -0
  93. package/dist/snapshot/capture.d.cts +34 -0
  94. package/dist/snapshot/capture.d.ts +34 -0
  95. package/dist/snapshot/capture.js +77 -0
  96. package/dist/snapshot/cdp.cjs +450 -0
  97. package/dist/snapshot/cdp.d.cts +36 -0
  98. package/dist/snapshot/cdp.d.ts +36 -0
  99. package/dist/snapshot/cdp.js +447 -0
  100. package/dist/snapshot/clip.cjs +100 -0
  101. package/dist/snapshot/clip.d.cts +26 -0
  102. package/dist/snapshot/clip.d.ts +26 -0
  103. package/dist/snapshot/clip.js +96 -0
  104. package/dist/snapshot/collect.cjs +358 -0
  105. package/dist/snapshot/collect.d.cts +18 -0
  106. package/dist/snapshot/collect.d.ts +18 -0
  107. package/dist/snapshot/collect.js +355 -0
  108. package/dist/snapshot/color.cjs +1039 -0
  109. package/dist/snapshot/color.d.cts +316 -0
  110. package/dist/snapshot/color.d.ts +316 -0
  111. package/dist/snapshot/color.js +1026 -0
  112. package/dist/snapshot/facts.cjs +167 -0
  113. package/dist/snapshot/facts.d.cts +48 -0
  114. package/dist/snapshot/facts.d.ts +48 -0
  115. package/dist/snapshot/facts.js +161 -0
  116. package/dist/snapshot/limits.cjs +69 -0
  117. package/dist/snapshot/limits.d.cts +59 -0
  118. package/dist/snapshot/limits.d.ts +59 -0
  119. package/dist/snapshot/limits.js +65 -0
  120. package/dist/snapshot/not-measured.cjs +44 -0
  121. package/dist/snapshot/not-measured.d.cts +14 -0
  122. package/dist/snapshot/not-measured.d.ts +14 -0
  123. package/dist/snapshot/not-measured.js +41 -0
  124. package/dist/snapshot/types.cjs +2 -0
  125. package/dist/snapshot/types.d.cts +238 -0
  126. package/dist/snapshot/types.d.ts +238 -0
  127. package/dist/snapshot/types.js +1 -0
  128. package/dist/spec/index.cjs +9 -0
  129. package/dist/spec/index.d.cts +15 -0
  130. package/dist/spec/index.d.ts +15 -0
  131. package/dist/spec/index.js +6 -0
  132. package/package.json +141 -0
  133. package/skills/dnumb/SKILL.md +136 -0
@@ -0,0 +1,47 @@
1
+ import type { Bundle } from "./bundle.cjs";
2
+ export declare const Q_VERBS: readonly ["describe", "find", "at", "within", "distance", "nearest", "facts", "color"];
3
+ /**
4
+ * A verb could not answer the question as asked. The message is the whole
5
+ * product: it names what was wrong and the command that fixes it, because an
6
+ * agent that gets `no element "e99"` and no route forward will guess.
7
+ */
8
+ export declare class QueryError extends Error {
9
+ name: string;
10
+ }
11
+ export interface VerbResult {
12
+ /** The default rendering. No trailing newline; the CLI adds exactly one. */
13
+ text: string;
14
+ /** The `--json` payload. Always an object carrying `verb`. */
15
+ json: unknown;
16
+ }
17
+ export interface QueryOptions {
18
+ /** `look` only: scope the digest to one element id or tag. */
19
+ focus?: string;
20
+ /** `look` only: emit the edge-cluster histogram header. */
21
+ edges?: boolean;
22
+ /**
23
+ * `look` only: soft target for total digest body characters -- the
24
+ * standing meter (`renderDigest`'s own `DEFAULT_BUDGET_CHARS`,
25
+ * `digest/render.ts`). Undefined here means "let the library decide", not
26
+ * "no budget" -- `renderDigest` supplies its own default when this is
27
+ * omitted, so this file must never duplicate that number.
28
+ */
29
+ budgetChars?: number;
30
+ /**
31
+ * `look` only: soft target for digest body *lines* -- the budget's
32
+ * original unit. Still honored when passed explicitly, but as an
33
+ * *additional* ceiling on top of `budgetChars`, never a replacement for it
34
+ * (`RenderDigestOptions.budgetLines`'s own doc comment, `digest/types.ts`).
35
+ */
36
+ budgetLines?: number;
37
+ /** `nearest` only: how many neighbours. */
38
+ k?: number;
39
+ /** How many rows the list verbs print. 0 means every row. */
40
+ limit?: number;
41
+ /** `color` only: per-element fact lines instead of the pair table. */
42
+ all?: boolean;
43
+ }
44
+ /** `look` — the digest, which is the format the whole package exists to print. */
45
+ export declare function look(bundle: Bundle, options?: QueryOptions): VerbResult;
46
+ /** Dispatches one `q` verb. Throws `QueryError` for anything the caller can fix. */
47
+ export declare function query(bundle: Bundle, verb: string, args?: string[], options?: QueryOptions): VerbResult;
@@ -0,0 +1,47 @@
1
+ import type { Bundle } from "./bundle.js";
2
+ export declare const Q_VERBS: readonly ["describe", "find", "at", "within", "distance", "nearest", "facts", "color"];
3
+ /**
4
+ * A verb could not answer the question as asked. The message is the whole
5
+ * product: it names what was wrong and the command that fixes it, because an
6
+ * agent that gets `no element "e99"` and no route forward will guess.
7
+ */
8
+ export declare class QueryError extends Error {
9
+ name: string;
10
+ }
11
+ export interface VerbResult {
12
+ /** The default rendering. No trailing newline; the CLI adds exactly one. */
13
+ text: string;
14
+ /** The `--json` payload. Always an object carrying `verb`. */
15
+ json: unknown;
16
+ }
17
+ export interface QueryOptions {
18
+ /** `look` only: scope the digest to one element id or tag. */
19
+ focus?: string;
20
+ /** `look` only: emit the edge-cluster histogram header. */
21
+ edges?: boolean;
22
+ /**
23
+ * `look` only: soft target for total digest body characters -- the
24
+ * standing meter (`renderDigest`'s own `DEFAULT_BUDGET_CHARS`,
25
+ * `digest/render.ts`). Undefined here means "let the library decide", not
26
+ * "no budget" -- `renderDigest` supplies its own default when this is
27
+ * omitted, so this file must never duplicate that number.
28
+ */
29
+ budgetChars?: number;
30
+ /**
31
+ * `look` only: soft target for digest body *lines* -- the budget's
32
+ * original unit. Still honored when passed explicitly, but as an
33
+ * *additional* ceiling on top of `budgetChars`, never a replacement for it
34
+ * (`RenderDigestOptions.budgetLines`'s own doc comment, `digest/types.ts`).
35
+ */
36
+ budgetLines?: number;
37
+ /** `nearest` only: how many neighbours. */
38
+ k?: number;
39
+ /** How many rows the list verbs print. 0 means every row. */
40
+ limit?: number;
41
+ /** `color` only: per-element fact lines instead of the pair table. */
42
+ all?: boolean;
43
+ }
44
+ /** `look` — the digest, which is the format the whole package exists to print. */
45
+ export declare function look(bundle: Bundle, options?: QueryOptions): VerbResult;
46
+ /** Dispatches one `q` verb. Throws `QueryError` for anything the caller can fix. */
47
+ export declare function query(bundle: Bundle, verb: string, args?: string[], options?: QueryOptions): VerbResult;