screw-bugs 0.1.9 → 0.1.11

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 (102) hide show
  1. package/README.md +100 -54
  2. package/dist/browser-playwright/capture.js +1 -1
  3. package/dist/build-info.json +3 -3
  4. package/dist/cli/app.js +6 -2
  5. package/dist/cli/commands.js +4 -3
  6. package/dist/cli/doctor.d.ts +17 -2
  7. package/dist/cli/doctor.js +62 -4
  8. package/dist/cli/mcp.js +7 -4
  9. package/dist/cli/report-server.d.ts +19 -10
  10. package/dist/cli/report-server.js +43 -18
  11. package/dist/cli/share.js +2 -2
  12. package/dist/cli/sign-in.d.ts +9 -3
  13. package/dist/cli/sign-in.js +12 -9
  14. package/dist/cli/tailnet.d.ts +57 -0
  15. package/dist/cli/tailnet.js +82 -0
  16. package/dist/core/index.d.ts +1 -14
  17. package/dist/core/index.js +3 -14
  18. package/dist/report/index.d.ts +1 -10
  19. package/dist/report/index.js +3 -10
  20. package/dist/schema/index.d.ts +1 -9
  21. package/dist/schema/index.js +3 -9
  22. package/package.json +14 -14
  23. package/dist/core/accounts.d.ts +0 -40
  24. package/dist/core/accounts.js +0 -95
  25. package/dist/core/css.d.ts +0 -95
  26. package/dist/core/css.js +0 -436
  27. package/dist/core/engine.d.ts +0 -75
  28. package/dist/core/engine.js +0 -560
  29. package/dist/core/errors.d.ts +0 -85
  30. package/dist/core/errors.js +0 -36
  31. package/dist/core/evidence.d.ts +0 -14
  32. package/dist/core/evidence.js +0 -131
  33. package/dist/core/labels.d.ts +0 -47
  34. package/dist/core/labels.js +0 -199
  35. package/dist/core/liveness.d.ts +0 -45
  36. package/dist/core/liveness.js +0 -66
  37. package/dist/core/marks.d.ts +0 -63
  38. package/dist/core/marks.js +0 -410
  39. package/dist/core/services.d.ts +0 -579
  40. package/dist/core/services.js +0 -25
  41. package/dist/core/share.d.ts +0 -68
  42. package/dist/core/share.js +0 -318
  43. package/dist/core/steps.d.ts +0 -106
  44. package/dist/core/steps.js +0 -722
  45. package/dist/core/uploads.d.ts +0 -49
  46. package/dist/core/uploads.js +0 -133
  47. package/dist/core/video.d.ts +0 -53
  48. package/dist/core/video.js +0 -241
  49. package/dist/core/viewport.d.ts +0 -28
  50. package/dist/core/viewport.js +0 -50
  51. package/dist/report/assets.d.ts +0 -34
  52. package/dist/report/assets.js +0 -105
  53. package/dist/report/bug.d.ts +0 -11
  54. package/dist/report/bug.js +0 -20
  55. package/dist/report/html.d.ts +0 -47
  56. package/dist/report/html.js +0 -923
  57. package/dist/report/icons.d.ts +0 -51
  58. package/dist/report/icons.js +0 -93
  59. package/dist/report/live.d.ts +0 -7
  60. package/dist/report/live.js +0 -135
  61. package/dist/report/logos.d.ts +0 -4
  62. package/dist/report/logos.js +0 -19
  63. package/dist/report/markup.d.ts +0 -50
  64. package/dist/report/markup.js +0 -156
  65. package/dist/report/menu-bar.d.ts +0 -60
  66. package/dist/report/menu-bar.js +0 -157
  67. package/dist/report/player.d.ts +0 -102
  68. package/dist/report/player.js +0 -315
  69. package/dist/report/pr-summary.d.ts +0 -11
  70. package/dist/report/pr-summary.js +0 -119
  71. package/dist/report/sha256.d.ts +0 -9
  72. package/dist/report/sha256.js +0 -97
  73. package/dist/report/share-page.d.ts +0 -48
  74. package/dist/report/share-page.js +0 -291
  75. package/dist/report/shots.d.ts +0 -59
  76. package/dist/report/shots.js +0 -280
  77. package/dist/report/sign-in.d.ts +0 -41
  78. package/dist/report/sign-in.js +0 -568
  79. package/dist/report/styles.d.ts +0 -3
  80. package/dist/report/styles.js +0 -274
  81. package/dist/report/view.d.ts +0 -296
  82. package/dist/report/view.js +0 -702
  83. package/dist/report/walkthrough.d.ts +0 -93
  84. package/dist/report/walkthrough.js +0 -716
  85. package/dist/schema/accounts.d.ts +0 -137
  86. package/dist/schema/accounts.js +0 -121
  87. package/dist/schema/config.d.ts +0 -7
  88. package/dist/schema/config.js +0 -6
  89. package/dist/schema/doctor.d.ts +0 -46
  90. package/dist/schema/doctor.js +0 -30
  91. package/dist/schema/evidence.d.ts +0 -1115
  92. package/dist/schema/evidence.js +0 -565
  93. package/dist/schema/findings.d.ts +0 -161
  94. package/dist/schema/findings.js +0 -82
  95. package/dist/schema/job.d.ts +0 -1905
  96. package/dist/schema/job.js +0 -577
  97. package/dist/schema/ledger.d.ts +0 -1124
  98. package/dist/schema/ledger.js +0 -285
  99. package/dist/schema/share.d.ts +0 -55
  100. package/dist/schema/share.js +0 -64
  101. package/dist/schema/status.d.ts +0 -7
  102. package/dist/schema/status.js +0 -11
@@ -1,161 +0,0 @@
1
- import { Schema } from 'effect';
2
- export declare const Severity: Schema.Literals<readonly ["high", "medium", "low"]>;
3
- export type Severity = typeof Severity.Type;
4
- /** `red` marks a problem; `green` marks something correct or as expected. */
5
- export declare const MarkColor: Schema.Literals<readonly ["red", "green"]>;
6
- export type MarkColor = typeof MarkColor.Type;
7
- export declare const Fix: Schema.Struct<{
8
- readonly title: Schema.String;
9
- readonly severity: Schema.Literals<readonly ["high", "medium", "low"]>;
10
- readonly caseIds: Schema.$Array<Schema.NonEmptyString>;
11
- readonly why: Schema.String;
12
- }>;
13
- export type Fix = typeof Fix.Type;
14
- /**
15
- * An element to mark on a screenshot, named like a step's target. screw-bugs finds it in the page
16
- * state saved with that screenshot and draws the box; the agent never gives coordinates.
17
- */
18
- export declare const Highlight: Schema.Struct<{
19
- readonly shot: Schema.NonEmptyString;
20
- readonly target: Schema.Struct<{
21
- readonly role: Schema.optionalKey<Schema.NonEmptyString>;
22
- readonly name: Schema.optionalKey<Schema.NonEmptyString>;
23
- readonly text: Schema.optionalKey<Schema.NonEmptyString>;
24
- readonly label: Schema.optionalKey<Schema.NonEmptyString>;
25
- readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
26
- readonly css: Schema.optionalKey<Schema.NonEmptyString>;
27
- readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
28
- readonly role: Schema.optionalKey<Schema.NonEmptyString>;
29
- readonly name: Schema.optionalKey<Schema.NonEmptyString>;
30
- readonly text: Schema.optionalKey<Schema.NonEmptyString>;
31
- readonly label: Schema.optionalKey<Schema.NonEmptyString>;
32
- readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
33
- readonly css: Schema.optionalKey<Schema.NonEmptyString>;
34
- readonly frame: Schema.optionalKey<Schema.Unknown>;
35
- }>, Schema.$Array<Schema.Struct<{
36
- readonly role: Schema.optionalKey<Schema.NonEmptyString>;
37
- readonly name: Schema.optionalKey<Schema.NonEmptyString>;
38
- readonly text: Schema.optionalKey<Schema.NonEmptyString>;
39
- readonly label: Schema.optionalKey<Schema.NonEmptyString>;
40
- readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
41
- readonly css: Schema.optionalKey<Schema.NonEmptyString>;
42
- readonly frame: Schema.optionalKey<Schema.Unknown>;
43
- }>>]>>;
44
- }>;
45
- readonly mark: Schema.Literals<readonly ["red", "green"]>;
46
- readonly note: Schema.optionalKey<Schema.String>;
47
- }>;
48
- export type Highlight = typeof Highlight.Type;
49
- export declare const KeyMoment: Schema.Struct<{
50
- readonly ms: Schema.Int;
51
- readonly label: Schema.String;
52
- }>;
53
- export type KeyMoment = typeof KeyMoment.Type;
54
- export declare const CaseFindings: Schema.Struct<{
55
- readonly id: Schema.NonEmptyString;
56
- readonly did: Schema.optionalKey<Schema.$Array<Schema.String>>;
57
- readonly worked: Schema.optionalKey<Schema.$Array<Schema.String>>;
58
- readonly didnt: Schema.optionalKey<Schema.$Array<Schema.String>>;
59
- readonly failed: Schema.optionalKey<Schema.String>;
60
- readonly highlights: Schema.optionalKey<Schema.$Array<Schema.Struct<{
61
- readonly shot: Schema.NonEmptyString;
62
- readonly target: Schema.Struct<{
63
- readonly role: Schema.optionalKey<Schema.NonEmptyString>;
64
- readonly name: Schema.optionalKey<Schema.NonEmptyString>;
65
- readonly text: Schema.optionalKey<Schema.NonEmptyString>;
66
- readonly label: Schema.optionalKey<Schema.NonEmptyString>;
67
- readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
68
- readonly css: Schema.optionalKey<Schema.NonEmptyString>;
69
- readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
70
- readonly role: Schema.optionalKey<Schema.NonEmptyString>;
71
- readonly name: Schema.optionalKey<Schema.NonEmptyString>;
72
- readonly text: Schema.optionalKey<Schema.NonEmptyString>;
73
- readonly label: Schema.optionalKey<Schema.NonEmptyString>;
74
- readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
75
- readonly css: Schema.optionalKey<Schema.NonEmptyString>;
76
- readonly frame: Schema.optionalKey<Schema.Unknown>;
77
- }>, Schema.$Array<Schema.Struct<{
78
- readonly role: Schema.optionalKey<Schema.NonEmptyString>;
79
- readonly name: Schema.optionalKey<Schema.NonEmptyString>;
80
- readonly text: Schema.optionalKey<Schema.NonEmptyString>;
81
- readonly label: Schema.optionalKey<Schema.NonEmptyString>;
82
- readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
83
- readonly css: Schema.optionalKey<Schema.NonEmptyString>;
84
- readonly frame: Schema.optionalKey<Schema.Unknown>;
85
- }>>]>>;
86
- }>;
87
- readonly mark: Schema.Literals<readonly ["red", "green"]>;
88
- readonly note: Schema.optionalKey<Schema.String>;
89
- }>>>;
90
- readonly keyMoments: Schema.optionalKey<Schema.$Array<Schema.Struct<{
91
- readonly ms: Schema.Int;
92
- readonly label: Schema.String;
93
- }>>>;
94
- readonly observed: Schema.optionalKey<Schema.$Array<Schema.String>>;
95
- }>;
96
- export type CaseFindings = typeof CaseFindings.Type;
97
- /** Something the run did not test, and why: a passing run covers only what its cases did. */
98
- export declare const NotTested: Schema.Struct<{
99
- readonly what: Schema.String;
100
- readonly why: Schema.String;
101
- }>;
102
- export type NotTested = typeof NotTested.Type;
103
- /** What `submit_findings` and `screw-bugs findings` take, and `findings.json` holds. */
104
- export declare const Findings: Schema.Struct<{
105
- readonly version: Schema.optionalKey<Schema.Literal<1>>;
106
- readonly headline: Schema.String;
107
- readonly fixes: Schema.$Array<Schema.Struct<{
108
- readonly title: Schema.String;
109
- readonly severity: Schema.Literals<readonly ["high", "medium", "low"]>;
110
- readonly caseIds: Schema.$Array<Schema.NonEmptyString>;
111
- readonly why: Schema.String;
112
- }>>;
113
- readonly cases: Schema.$Array<Schema.Struct<{
114
- readonly id: Schema.NonEmptyString;
115
- readonly did: Schema.optionalKey<Schema.$Array<Schema.String>>;
116
- readonly worked: Schema.optionalKey<Schema.$Array<Schema.String>>;
117
- readonly didnt: Schema.optionalKey<Schema.$Array<Schema.String>>;
118
- readonly failed: Schema.optionalKey<Schema.String>;
119
- readonly highlights: Schema.optionalKey<Schema.$Array<Schema.Struct<{
120
- readonly shot: Schema.NonEmptyString;
121
- readonly target: Schema.Struct<{
122
- readonly role: Schema.optionalKey<Schema.NonEmptyString>;
123
- readonly name: Schema.optionalKey<Schema.NonEmptyString>;
124
- readonly text: Schema.optionalKey<Schema.NonEmptyString>;
125
- readonly label: Schema.optionalKey<Schema.NonEmptyString>;
126
- readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
127
- readonly css: Schema.optionalKey<Schema.NonEmptyString>;
128
- readonly frame: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
129
- readonly role: Schema.optionalKey<Schema.NonEmptyString>;
130
- readonly name: Schema.optionalKey<Schema.NonEmptyString>;
131
- readonly text: Schema.optionalKey<Schema.NonEmptyString>;
132
- readonly label: Schema.optionalKey<Schema.NonEmptyString>;
133
- readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
134
- readonly css: Schema.optionalKey<Schema.NonEmptyString>;
135
- readonly frame: Schema.optionalKey<Schema.Unknown>;
136
- }>, Schema.$Array<Schema.Struct<{
137
- readonly role: Schema.optionalKey<Schema.NonEmptyString>;
138
- readonly name: Schema.optionalKey<Schema.NonEmptyString>;
139
- readonly text: Schema.optionalKey<Schema.NonEmptyString>;
140
- readonly label: Schema.optionalKey<Schema.NonEmptyString>;
141
- readonly alt: Schema.optionalKey<Schema.NonEmptyString>;
142
- readonly css: Schema.optionalKey<Schema.NonEmptyString>;
143
- readonly frame: Schema.optionalKey<Schema.Unknown>;
144
- }>>]>>;
145
- }>;
146
- readonly mark: Schema.Literals<readonly ["red", "green"]>;
147
- readonly note: Schema.optionalKey<Schema.String>;
148
- }>>>;
149
- readonly keyMoments: Schema.optionalKey<Schema.$Array<Schema.Struct<{
150
- readonly ms: Schema.Int;
151
- readonly label: Schema.String;
152
- }>>>;
153
- readonly observed: Schema.optionalKey<Schema.$Array<Schema.String>>;
154
- }>>;
155
- readonly notTested: Schema.optionalKey<Schema.$Array<Schema.Struct<{
156
- readonly what: Schema.String;
157
- readonly why: Schema.String;
158
- }>>>;
159
- readonly nextTests: Schema.optionalKey<Schema.$Array<Schema.String>>;
160
- }>;
161
- export type Findings = typeof Findings.Type;
@@ -1,82 +0,0 @@
1
- import { Schema } from 'effect';
2
- import { ShortLine as Line, Target } from './job.js';
3
- /*
4
- * The agent's write-up of an ended run: fixed, structured slots that the report lays out. Every
5
- * text is short and plain. The run's code sets each case's status; the only status the write-up
6
- * can give is `failed`, through a case's `failed` (see `judgedLedger`), never a pass. IDs (cases,
7
- * screenshots, timecodes) are checked against the run by `checkFindings` in core.
8
- */
9
- /** A list of at most `max` short lines. */
10
- const Lines = (max, length, description) => Schema.Array(Line(length))
11
- .check(Schema.isMaxLength(max, { message: `Use at most ${max} items` }))
12
- .annotate({ description: `${description} At most ${max} items of ${length} characters.` });
13
- export const Severity = Schema.Literals(['high', 'medium', 'low']);
14
- /** `red` marks a problem; `green` marks something correct or as expected. */
15
- export const MarkColor = Schema.Literals(['red', 'green']);
16
- export const Fix = Schema.Struct({
17
- title: Line(120, 'What to fix, such as "Sign-in error appears far from the form".'),
18
- severity: Severity,
19
- caseIds: Schema.Array(Schema.NonEmptyString)
20
- .check(Schema.isMinLength(1, { message: 'Name at least one case' }), Schema.isMaxLength(10, { message: 'Use at most 10 cases' }))
21
- .annotate({ description: 'IDs of the cases that show it, from run_status.' }),
22
- why: Line(240, 'Why it matters to a user.'),
23
- });
24
- /**
25
- * An element to mark on a screenshot, named like a step's target. screw-bugs finds it in the page
26
- * state saved with that screenshot and draws the box; the agent never gives coordinates.
27
- */
28
- export const Highlight = Schema.Struct({
29
- shot: Schema.NonEmptyString.annotate({
30
- description: 'Screenshot ID of this case from run_status, such as 01-03.',
31
- }),
32
- target: Target,
33
- mark: MarkColor.annotate({ description: 'red = the problem; green = correct or as expected.' }),
34
- note: Schema.optionalKey(Line(120, 'What the mark shows.')),
35
- });
36
- export const KeyMoment = Schema.Struct({
37
- ms: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)).annotate({
38
- description: "A timecode of this case from run_status (ms into the session's video).",
39
- }),
40
- label: Line(80, 'What happens then.'),
41
- });
42
- export const CaseFindings = Schema.Struct({
43
- id: Schema.NonEmptyString.annotate({ description: 'Case ID from run_status.' }),
44
- did: Schema.optionalKey(Lines(8, 160, 'What the case did, as a user would say it.')),
45
- worked: Schema.optionalKey(Lines(8, 160, 'What worked.')),
46
- didnt: Schema.optionalKey(Lines(8, 160, "What didn't work.")),
47
- failed: Schema.optionalKey(Line(160, 'Set when your own evidence (the database, logs, the screenshots, the video) shows the ' +
48
- 'case did not do what its success says, even if every check passed: what is wrong, in ' +
49
- 'one line. The case then counts as failed by your review everywhere results are shown. ' +
50
- 'Leave it out when the case did what it should; minor issues go in didnt. It can never ' +
51
- 'make a case pass.').check(Schema.makeFilter((text) => (/[\r\n]/.test(text) ? 'Use one line, with no line breaks' : undefined), { toJsonSchema: () => ({ pattern: '^[^\\r\\n]*$' }) }))),
52
- highlights: Schema.optionalKey(Schema.Array(Highlight)
53
- .check(Schema.isMaxLength(6, { message: 'Use at most 6 highlights per case' }))
54
- .annotate({ description: 'Elements to mark on this case’s screenshots. At most 6.' })),
55
- keyMoments: Schema.optionalKey(Schema.Array(KeyMoment)
56
- .check(Schema.isMaxLength(8, { message: 'Use at most 8 key moments per case' }))
57
- .annotate({ description: 'Moments in the video worth watching. At most 8.' })),
58
- observed: Schema.optionalKey(Lines(5, 200, 'Things you noticed that no step checked; the report shows them as observed, not checked.')),
59
- });
60
- /** Something the run did not test, and why: a passing run covers only what its cases did. */
61
- export const NotTested = Schema.Struct({
62
- what: Line(100, 'An area, flow or claim no case covered, such as "Exporting a portfolio".'),
63
- why: Line(160, 'Why it was not tested, such as "It needs a paid account".'),
64
- });
65
- /** What `submit_findings` and `screw-bugs findings` take, and `findings.json` holds. */
66
- export const Findings = Schema.Struct({
67
- version: Schema.optionalKey(Schema.Literal(1)),
68
- headline: Line(160, 'The verdict in one sentence, such as "Sign-in works, but errors are easy to miss."'),
69
- fixes: Schema.Array(Fix)
70
- .check(Schema.isMaxLength(10, { message: 'Use at most 10 fixes' }))
71
- .annotate({ description: 'What to fix, most important first. At most 10; may be empty.' }),
72
- cases: Schema.Array(CaseFindings)
73
- .check(Schema.isMaxLength(100, { message: 'Use at most 100 cases' }))
74
- .annotate({ description: 'Your write-up per case; leave out cases you have nothing on.' }),
75
- notTested: Schema.optionalKey(Schema.Array(NotTested)
76
- .check(Schema.isMaxLength(8, { message: 'Use at most 8 areas not tested' }))
77
- .annotate({
78
- description: 'What the run did not test, and why, so that passing cases are not read as full ' +
79
- 'coverage. At most 8.',
80
- })),
81
- nextTests: Schema.optionalKey(Lines(8, 200, 'What to test next.')),
82
- });