@reticlehq/browser 2.13.1 → 3.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.
- package/dist/actions/actions-dom.d.ts +8 -20
- package/dist/actions/actions-dom.js +70 -69
- package/dist/actions/actions-press.d.ts +14 -0
- package/dist/actions/actions-press.js +123 -0
- package/dist/actions/actions.d.ts +1 -89
- package/dist/actions/actions.js +64 -365
- package/dist/actions/appeared-text.d.ts +0 -20
- package/dist/actions/appeared-text.js +6 -36
- package/dist/actions/danger-context.d.ts +3 -0
- package/dist/actions/danger-context.js +39 -0
- package/dist/actions/scroll.d.ts +8 -10
- package/dist/actions/scroll.js +28 -17
- package/dist/actions/synthetic/synthetic-input.d.ts +2 -0
- package/dist/actions/synthetic/synthetic-input.js +13 -0
- package/dist/actions/value-input.d.ts +0 -30
- package/dist/actions/value-input.js +0 -33
- package/dist/commands/commands.d.ts +0 -2
- package/dist/commands/commands.js +10 -70
- package/dist/connect-options.d.ts +2 -96
- package/dist/dom/a11y.d.ts +0 -29
- package/dist/dom/a11y.js +3 -90
- package/dist/dom/addressing/auto-anchor.d.ts +25 -0
- package/dist/dom/addressing/auto-anchor.js +41 -0
- package/dist/dom/addressing/refs.d.ts +14 -0
- package/dist/dom/addressing/refs.js +114 -0
- package/dist/dom/addressing/source.d.ts +9 -0
- package/dist/dom/addressing/source.js +29 -0
- package/dist/dom/chart.d.ts +0 -61
- package/dist/dom/chart.js +0 -60
- package/dist/dom/desktop-capture.d.ts +0 -30
- package/dist/dom/desktop-capture.js +1 -73
- package/dist/dom/dom-ignore.d.ts +0 -30
- package/dist/dom/dom-ignore.js +1 -48
- package/dist/dom/occlusion.d.ts +0 -7
- package/dist/dom/occlusion.js +31 -12
- package/dist/dom/paint-context.d.ts +6 -0
- package/dist/dom/paint-context.js +38 -0
- package/dist/dom/query.d.ts +0 -14
- package/dist/dom/query.js +50 -216
- package/dist/dom/realm.d.ts +0 -20
- package/dist/dom/realm.js +0 -28
- package/dist/dom/shadow-registry.d.ts +0 -33
- package/dist/dom/shadow-registry.js +2 -72
- package/dist/dom/snapshot.d.ts +2 -43
- package/dist/dom/snapshot.js +27 -152
- package/dist/dom/theme.d.ts +0 -37
- package/dist/dom/theme.js +2 -52
- package/dist/dom/virtualized.d.ts +0 -17
- package/dist/dom/virtualized.js +0 -27
- package/dist/edit-epoch.d.ts +1 -23
- package/dist/edit-epoch.js +1 -53
- package/dist/index.d.ts +4 -5
- package/dist/index.js +4 -28
- package/dist/observers/animation.d.ts +0 -1
- package/dist/observers/animation.js +1 -4
- package/dist/observers/blind-spots.d.ts +0 -26
- package/dist/observers/blind-spots.js +3 -62
- package/dist/observers/console.d.ts +1 -2
- package/dist/observers/console.js +41 -30
- package/dist/observers/context-open.d.ts +1 -11
- package/dist/observers/context-open.js +10 -14
- package/dist/observers/departure.d.ts +3 -0
- package/dist/observers/departure.js +52 -0
- package/dist/observers/dialogs.d.ts +2 -0
- package/dist/observers/dialogs.js +39 -0
- package/dist/observers/dom.js +28 -52
- package/dist/observers/download.d.ts +1 -2
- package/dist/observers/download.js +39 -56
- package/dist/observers/focus.d.ts +0 -6
- package/dist/observers/focus.js +0 -7
- package/dist/observers/frames.d.ts +0 -9
- package/dist/observers/frames.js +1 -28
- package/dist/observers/health.d.ts +0 -5
- package/dist/observers/health.js +2 -34
- package/dist/observers/install-all.d.ts +2 -0
- package/dist/observers/install-all.js +26 -27
- package/dist/observers/ipc.d.ts +0 -25
- package/dist/observers/ipc.js +0 -65
- package/dist/observers/navigation.d.ts +2 -0
- package/dist/observers/navigation.js +33 -0
- package/dist/observers/net-detail/network-body.d.ts +12 -0
- package/dist/observers/net-detail/network-body.js +71 -0
- package/dist/observers/net-detail/network-redact.d.ts +1 -0
- package/dist/observers/net-detail/network-redact.js +1 -0
- package/dist/observers/network-stream.d.ts +0 -21
- package/dist/observers/network-stream.js +3 -46
- package/dist/observers/network.d.ts +3 -27
- package/dist/observers/network.js +178 -295
- package/dist/observers/perf.d.ts +0 -10
- package/dist/observers/perf.js +0 -16
- package/dist/observers/route.d.ts +1 -2
- package/dist/observers/route.js +13 -19
- package/dist/observers/scroll.d.ts +0 -1
- package/dist/observers/scroll.js +2 -11
- package/dist/observers/sdk-failure.d.ts +1 -9
- package/dist/observers/sdk-failure.js +1 -30
- package/dist/observers/state.d.ts +1 -11
- package/dist/observers/state.js +13 -41
- package/dist/observers/storage.d.ts +0 -14
- package/dist/observers/storage.js +10 -34
- package/dist/observers/types.d.ts +0 -15
- package/dist/observers/types.js +0 -14
- package/dist/patching/capture-method.d.ts +0 -24
- package/dist/patching/capture-method.js +0 -26
- package/dist/presenter/chrome/layers.d.ts +2 -0
- package/dist/presenter/chrome/layers.js +2 -0
- package/dist/presenter/chrome/log-kinds.d.ts +12 -0
- package/dist/presenter/chrome/log-kinds.js +7 -0
- package/dist/presenter/{overlay.d.ts → chrome/overlay.d.ts} +0 -1
- package/dist/presenter/{overlay.js → chrome/overlay.js} +0 -1
- package/dist/presenter/chrome/presenter-brand.d.ts +3 -0
- package/dist/presenter/{presenter-brand.js → chrome/presenter-brand.js} +0 -21
- package/dist/presenter/chrome/presenter-effects.d.ts +4 -0
- package/dist/presenter/{presenter-effects.js → chrome/presenter-effects.js} +1 -10
- package/dist/presenter/chrome/presenter-hud-chrome.d.ts +7 -0
- package/dist/presenter/{presenter-hud-chrome.js → chrome/presenter-hud-chrome.js} +0 -10
- package/dist/presenter/chrome/presenter-log.d.ts +17 -0
- package/dist/presenter/{presenter-log.js → chrome/presenter-log.js} +5 -54
- package/dist/presenter/chrome/presenter-report-copy.d.ts +51 -0
- package/dist/presenter/chrome/presenter-report-copy.js +95 -0
- package/dist/presenter/chrome/presenter-safe-html.d.ts +2 -0
- package/dist/presenter/chrome/presenter-safe-html.js +16 -0
- package/dist/presenter/{presenter-tally.d.ts → chrome/presenter-tally.d.ts} +0 -5
- package/dist/presenter/{presenter-tally.js → chrome/presenter-tally.js} +1 -5
- package/dist/presenter/{presenter-verbs.js → chrome/presenter-verbs.js} +0 -7
- package/dist/presenter/{presenter-heroicons-data.d.ts → icons/presenter-heroicons-data.d.ts} +1 -8
- package/dist/presenter/{presenter-heroicons-data.js → icons/presenter-heroicons-data.js} +1 -8
- package/dist/presenter/{presenter-icons.d.ts → icons/presenter-icons.d.ts} +1 -6
- package/dist/presenter/{presenter-icons.js → icons/presenter-icons.js} +1 -6
- package/dist/presenter/presenter-account-styles.d.ts +1 -0
- package/dist/presenter/presenter-account-styles.js +99 -0
- package/dist/presenter/presenter-account.d.ts +40 -0
- package/dist/presenter/presenter-account.js +178 -0
- package/dist/presenter/presenter-config.d.ts +10 -107
- package/dist/presenter/presenter-config.js +5 -92
- package/dist/presenter/presenter-controls.d.ts +1 -35
- package/dist/presenter/presenter-controls.js +10 -133
- package/dist/presenter/presenter-dock-layout.d.ts +0 -3
- package/dist/presenter/presenter-dock-layout.js +1 -5
- package/dist/presenter/presenter-drag.d.ts +2 -42
- package/dist/presenter/presenter-drag.js +3 -76
- package/dist/presenter/presenter-glow.d.ts +0 -21
- package/dist/presenter/presenter-glow.js +2 -28
- package/dist/presenter/presenter-hud-position.d.ts +18 -0
- package/dist/presenter/presenter-hud-position.js +50 -0
- package/dist/presenter/presenter-report-styles.d.ts +0 -6
- package/dist/presenter/presenter-report-styles.js +22 -7
- package/dist/presenter/presenter-report.d.ts +5 -7
- package/dist/presenter/presenter-report.js +44 -95
- package/dist/presenter/presenter-run-state.d.ts +1 -8
- package/dist/presenter/presenter-run-state.js +1 -6
- package/dist/presenter/presenter-settings-styles.d.ts +0 -1
- package/dist/presenter/presenter-settings-styles.js +2 -2
- package/dist/presenter/presenter-settings.d.ts +5 -23
- package/dist/presenter/presenter-settings.js +21 -33
- package/dist/presenter/presenter-shell-styles.js +23 -20
- package/dist/presenter/presenter-shell.d.ts +6 -18
- package/dist/presenter/presenter-shell.js +26 -77
- package/dist/presenter/presenter-styles.d.ts +2 -10
- package/dist/presenter/presenter-styles.js +6 -12
- package/dist/presenter/presenter-workspace.d.ts +4 -4
- package/dist/presenter/presenter-workspace.js +30 -10
- package/dist/presenter/presenter.d.ts +3 -63
- package/dist/presenter/presenter.js +29 -132
- package/dist/presenter/tour/tour-view.d.ts +33 -0
- package/dist/presenter/tour/tour-view.js +188 -0
- package/dist/presenter/tour/tour.d.ts +25 -0
- package/dist/presenter/tour/tour.js +245 -0
- package/dist/recorder/recorder-styles.d.ts +0 -6
- package/dist/recorder/recorder-styles.js +0 -6
- package/dist/recorder/recorder.d.ts +0 -34
- package/dist/recorder/recorder.js +6 -49
- package/dist/registry/auto-testids.d.ts +0 -19
- package/dist/registry/auto-testids.js +1 -21
- package/dist/registry/capabilities.d.ts +0 -31
- package/dist/registry/capabilities.js +1 -46
- package/dist/registry/commit-and-signal.d.ts +0 -6
- package/dist/registry/commit-and-signal.js +1 -7
- package/dist/registry/declared-channels.d.ts +2 -0
- package/dist/registry/declared-channels.js +14 -0
- package/dist/registry/declared-platform.d.ts +4 -0
- package/dist/registry/declared-platform.js +34 -0
- package/dist/registry/domains.d.ts +0 -8
- package/dist/registry/domains.js +0 -7
- package/dist/registry/emitter.d.ts +0 -14
- package/dist/registry/emitter.js +1 -11
- package/dist/registry/store-adapters.d.ts +0 -186
- package/dist/registry/store-adapters.js +1 -164
- package/dist/registry/{adapters.d.ts → stores/adapters.d.ts} +0 -10
- package/dist/registry/{adapters.js → stores/adapters.js} +0 -10
- package/dist/registry/stores.d.ts +0 -33
- package/dist/registry/stores.js +1 -60
- package/dist/reticle-presenter-helpers.d.ts +0 -13
- package/dist/reticle-presenter-helpers.js +10 -20
- package/dist/reticle-singleton.d.ts +2 -0
- package/dist/reticle-singleton.js +3 -0
- package/dist/reticle.d.ts +1 -52
- package/dist/reticle.js +115 -180
- package/dist/review/annotator-styles.js +1 -8
- package/dist/review/annotator.d.ts +2 -13
- package/dist/review/annotator.js +2 -42
- package/dist/review/mark-anchor.d.ts +0 -11
- package/dist/review/mark-anchor.js +3 -11
- package/dist/security/serialization.d.ts +0 -20
- package/dist/security/serialization.js +1 -66
- package/dist/session-continuity.d.ts +0 -16
- package/dist/session-continuity.js +1 -20
- package/dist/timers/clock.d.ts +1 -14
- package/dist/timers/clock.js +59 -60
- package/dist/timers/console/native-console.js +5 -0
- package/dist/timers/native/native-timers.d.ts +11 -0
- package/dist/timers/native/native-timers.js +48 -0
- package/dist/transport/transport.d.ts +0 -51
- package/dist/transport/transport.js +5 -131
- package/dist/transport/unreachable-message.d.ts +0 -17
- package/dist/transport/unreachable-message.js +0 -17
- package/dist/util/captured-method.d.ts +0 -35
- package/dist/util/captured-method.js +0 -35
- package/package.json +5 -4
- package/dist/actions/synthetic-input.d.ts +0 -9
- package/dist/actions/synthetic-input.js +0 -40
- package/dist/dom/auto-anchor.d.ts +0 -65
- package/dist/dom/auto-anchor.js +0 -74
- package/dist/dom/refs.d.ts +0 -90
- package/dist/dom/refs.js +0 -245
- package/dist/dom/source.d.ts +0 -53
- package/dist/dom/source.js +0 -74
- package/dist/observers/network-body.d.ts +0 -35
- package/dist/observers/network-body.js +0 -168
- package/dist/observers/network-redact.d.ts +0 -20
- package/dist/observers/network-redact.js +0 -80
- package/dist/presenter/presenter-brand.d.ts +0 -22
- package/dist/presenter/presenter-effects.d.ts +0 -13
- package/dist/presenter/presenter-hud-chrome.d.ts +0 -17
- package/dist/presenter/presenter-log.d.ts +0 -64
- package/dist/presenter/presenter-report-copy.d.ts +0 -112
- package/dist/presenter/presenter-report-copy.js +0 -156
- package/dist/presenter/presenter-test-helpers.d.ts +0 -16
- package/dist/presenter/presenter-test-helpers.js +0 -41
- package/dist/timers/native-console.js +0 -9
- package/dist/timers/native-timers.d.ts +0 -36
- package/dist/timers/native-timers.js +0 -78
- /package/dist/presenter/{presenter-verbs.d.ts → chrome/presenter-verbs.d.ts} +0 -0
- /package/dist/timers/{native-console.d.ts → console/native-console.d.ts} +0 -0
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { type ImpactScope, type ImpactSnapshot } from '@reticlehq/core';
|
|
2
|
-
/**
|
|
3
|
-
* What the report SAYS, kept away from how it looks.
|
|
4
|
-
*
|
|
5
|
-
* The wording here is the product's only claim about its own worth, so it is written once, in one
|
|
6
|
-
* place, and tested. Two audiences, two registers:
|
|
7
|
-
*
|
|
8
|
-
* - The REPORT is private. It is the user's own data, so it can carry everything, estimates
|
|
9
|
-
* included, as long as each estimate shows what it is measured against.
|
|
10
|
-
* - The SHARE card is public, and the research on developer stat-cards is blunt about what happens
|
|
11
|
-
* to a public card that leads with vendor savings: estimated token/time savings are the most
|
|
12
|
-
* mocked class of number in AI tooling (JetBrains measured ~10% against a viral 65% claim), and
|
|
13
|
-
* percentiles without a denominator get called misleading. So the card leads with what the
|
|
14
|
-
* user's own setup CAUGHT, and publishes its unknowns - the credibility move, and the thing a
|
|
15
|
-
* scoreboard would never do.
|
|
16
|
-
*/
|
|
17
|
-
/** Reticle's own links, as they appear in the report footer. */
|
|
18
|
-
export declare const REPORT_LINKS: {
|
|
19
|
-
readonly DOCS: "https://docs.reticle.sh";
|
|
20
|
-
readonly SITE: "https://reticle.sh";
|
|
21
|
-
readonly GITHUB: "https://github.com/reticlehq/reticle";
|
|
22
|
-
readonly DISCORD: "https://discord.gg/BwAbzv9ZRz";
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* The X handle used for `via=` on a share.
|
|
26
|
-
*
|
|
27
|
-
* Empty until somebody who owns the account fills it in, and the share URL omits the parameter
|
|
28
|
-
* while it is - a guessed handle credits a stranger, and there is no way for code to know.
|
|
29
|
-
*/
|
|
30
|
-
export declare const SHARE_VIA_HANDLE = "";
|
|
31
|
-
export declare const REPORT_TEXT: {
|
|
32
|
-
readonly TITLE: "Impact";
|
|
33
|
-
readonly PROJECT: "This project";
|
|
34
|
-
readonly GLOBAL: "Everything on this machine";
|
|
35
|
-
/**
|
|
36
|
-
* What `counts.failed` actually is: a verdict whose declared consequence did not hold.
|
|
37
|
-
*
|
|
38
|
-
* It used to read "defects caught before you saw them", which overclaims in the one direction a
|
|
39
|
-
* verification tool must never overclaim. A failed verdict is not proof of a defect in the app —
|
|
40
|
-
* it is equally the shape of an assertion that was wrong. Measured in the field: an agent
|
|
41
|
-
* asserted a clean console on an app with ordinary dev-mode logging, the verdict went red, and
|
|
42
|
-
* the panel reported a defect nobody had found.
|
|
43
|
-
*
|
|
44
|
-
* The honest word is what Reticle DID: it refused to pass them. That is true of the assertion
|
|
45
|
-
* error and the real bug alike, and it still reads as the tool having done its job.
|
|
46
|
-
*/
|
|
47
|
-
readonly HERO_DEFECTS: "checks Reticle refused to pass";
|
|
48
|
-
readonly VERDICTS: "Verdicts";
|
|
49
|
-
readonly PASSED: "passed";
|
|
50
|
-
readonly FAILED: "failed";
|
|
51
|
-
readonly UNKNOWN: "unknown";
|
|
52
|
-
readonly UNKNOWN_HELP: "Reticle drove the app and could not tell what happened. Not a pass - shown, not hidden.";
|
|
53
|
-
readonly CALLS: "Tool calls";
|
|
54
|
-
readonly TOKENS: "Tokens returned";
|
|
55
|
-
readonly DRIVING: "Time driving";
|
|
56
|
-
readonly SESSIONS: "Sessions";
|
|
57
|
-
readonly STREAK: "day streak";
|
|
58
|
-
readonly LONGEST: "Longest run";
|
|
59
|
-
readonly SAVED_TOKENS: "Tokens saved";
|
|
60
|
-
readonly SAVED_MINUTES: "Time saved";
|
|
61
|
-
readonly ESTIMATE_TAG: "estimate";
|
|
62
|
-
readonly CHART: "Verdicts, last 30 days";
|
|
63
|
-
readonly DEFECTS: "What broke";
|
|
64
|
-
readonly DEFECTS_MORE: "Manage all of them on the dashboard";
|
|
65
|
-
/**
|
|
66
|
-
* What an UNLINKED user is told, and the only place the product tells them.
|
|
67
|
-
*
|
|
68
|
-
* The dashboard link renders only when `dashboardUrl` exists, which means only once a repo is
|
|
69
|
-
* already linked — so the person most likely to want one, watching this record climb on their own
|
|
70
|
-
* machine, was never told it existed. The single mention anywhere else is a daemon log line.
|
|
71
|
-
*
|
|
72
|
-
* Stated as a FACT about where the record lives, not as a pitch. It sits at the foot of a panel
|
|
73
|
-
* somebody opened on purpose, so it informs rather than interrupts, and it appears only once
|
|
74
|
-
* there is a verdict worth keeping — an offer to preserve nothing is just an advert.
|
|
75
|
-
*/
|
|
76
|
-
readonly LOCAL_ONLY: "This record stops at this machine.";
|
|
77
|
-
readonly LOCAL_ONLY_ACTION: "reticle login";
|
|
78
|
-
readonly LOCAL_ONLY_TAIL: "keeps it, and lets a team see it.";
|
|
79
|
-
readonly DEFECTS_NONE: "Nothing has failed a declared consequence yet.";
|
|
80
|
-
readonly EMPTY: "Nothing recorded yet. Drive the app once and this fills in.";
|
|
81
|
-
readonly SHARE: "Share";
|
|
82
|
-
readonly COPY: "Copy";
|
|
83
|
-
readonly COPIED: "Copied";
|
|
84
|
-
readonly REFER: "Send to a friend";
|
|
85
|
-
};
|
|
86
|
-
/** "4.2k", "1.3M" - a number a person reads at a glance rather than counts digits in. */
|
|
87
|
-
export declare function compactNumber(n: number): string;
|
|
88
|
-
/** "2h 14m", "47m", "38s" - the same duration vocabulary the activity strip uses. */
|
|
89
|
-
export declare function compactDuration(ms: number): string;
|
|
90
|
-
/**
|
|
91
|
-
* The post itself.
|
|
92
|
-
*
|
|
93
|
-
* Leads with defects caught, then the verdict split INCLUDING unknowns, then the superlative. No
|
|
94
|
-
* estimated savings, no percentile, no leaderboard: those are the four things the evidence says get
|
|
95
|
-
* a dev-tool card mocked rather than shared.
|
|
96
|
-
*/
|
|
97
|
-
export declare function buildShareText(scope: ImpactScope, projectName?: string): string;
|
|
98
|
-
/** X share intent. `via` is omitted while no handle is configured. */
|
|
99
|
-
export declare function buildXShareUrl(text: string): string;
|
|
100
|
-
/**
|
|
101
|
-
* LinkedIn share.
|
|
102
|
-
*
|
|
103
|
-
* `share-offsite` takes a url and NOTHING else - the title/summary parameters were deprecated in
|
|
104
|
-
* 2018 and are ignored, so the caption has to reach the composer some other way. The report copies
|
|
105
|
-
* it to the clipboard before opening this, which is the only path that works without asking the
|
|
106
|
-
* user for posting permissions.
|
|
107
|
-
*/
|
|
108
|
-
export declare function buildLinkedInShareUrl(): string;
|
|
109
|
-
/** What a referral says: the tool, not the sender's numbers. */
|
|
110
|
-
export declare function buildReferralText(): string;
|
|
111
|
-
/** Narrow an unknown push payload to a snapshot. Invalid shapes are ignored, never rendered. */
|
|
112
|
-
export declare function parseImpactSnapshot(value: unknown): ImpactSnapshot | undefined;
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { ImpactSnapshotSchema } from '@reticlehq/core';
|
|
2
|
-
/**
|
|
3
|
-
* What the report SAYS, kept away from how it looks.
|
|
4
|
-
*
|
|
5
|
-
* The wording here is the product's only claim about its own worth, so it is written once, in one
|
|
6
|
-
* place, and tested. Two audiences, two registers:
|
|
7
|
-
*
|
|
8
|
-
* - The REPORT is private. It is the user's own data, so it can carry everything, estimates
|
|
9
|
-
* included, as long as each estimate shows what it is measured against.
|
|
10
|
-
* - The SHARE card is public, and the research on developer stat-cards is blunt about what happens
|
|
11
|
-
* to a public card that leads with vendor savings: estimated token/time savings are the most
|
|
12
|
-
* mocked class of number in AI tooling (JetBrains measured ~10% against a viral 65% claim), and
|
|
13
|
-
* percentiles without a denominator get called misleading. So the card leads with what the
|
|
14
|
-
* user's own setup CAUGHT, and publishes its unknowns - the credibility move, and the thing a
|
|
15
|
-
* scoreboard would never do.
|
|
16
|
-
*/
|
|
17
|
-
/** Reticle's own links, as they appear in the report footer. */
|
|
18
|
-
export const REPORT_LINKS = {
|
|
19
|
-
DOCS: 'https://docs.reticle.sh',
|
|
20
|
-
SITE: 'https://reticle.sh',
|
|
21
|
-
GITHUB: 'https://github.com/reticlehq/reticle',
|
|
22
|
-
DISCORD: 'https://discord.gg/BwAbzv9ZRz',
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* The X handle used for `via=` on a share.
|
|
26
|
-
*
|
|
27
|
-
* Empty until somebody who owns the account fills it in, and the share URL omits the parameter
|
|
28
|
-
* while it is - a guessed handle credits a stranger, and there is no way for code to know.
|
|
29
|
-
*/
|
|
30
|
-
export const SHARE_VIA_HANDLE = '';
|
|
31
|
-
export const REPORT_TEXT = {
|
|
32
|
-
TITLE: 'Impact',
|
|
33
|
-
PROJECT: 'This project',
|
|
34
|
-
GLOBAL: 'Everything on this machine',
|
|
35
|
-
/**
|
|
36
|
-
* What `counts.failed` actually is: a verdict whose declared consequence did not hold.
|
|
37
|
-
*
|
|
38
|
-
* It used to read "defects caught before you saw them", which overclaims in the one direction a
|
|
39
|
-
* verification tool must never overclaim. A failed verdict is not proof of a defect in the app —
|
|
40
|
-
* it is equally the shape of an assertion that was wrong. Measured in the field: an agent
|
|
41
|
-
* asserted a clean console on an app with ordinary dev-mode logging, the verdict went red, and
|
|
42
|
-
* the panel reported a defect nobody had found.
|
|
43
|
-
*
|
|
44
|
-
* The honest word is what Reticle DID: it refused to pass them. That is true of the assertion
|
|
45
|
-
* error and the real bug alike, and it still reads as the tool having done its job.
|
|
46
|
-
*/
|
|
47
|
-
HERO_DEFECTS: 'checks Reticle refused to pass',
|
|
48
|
-
VERDICTS: 'Verdicts',
|
|
49
|
-
PASSED: 'passed',
|
|
50
|
-
FAILED: 'failed',
|
|
51
|
-
UNKNOWN: 'unknown',
|
|
52
|
-
UNKNOWN_HELP: 'Reticle drove the app and could not tell what happened. Not a pass - shown, not hidden.',
|
|
53
|
-
CALLS: 'Tool calls',
|
|
54
|
-
TOKENS: 'Tokens returned',
|
|
55
|
-
DRIVING: 'Time driving',
|
|
56
|
-
SESSIONS: 'Sessions',
|
|
57
|
-
STREAK: 'day streak',
|
|
58
|
-
LONGEST: 'Longest run',
|
|
59
|
-
SAVED_TOKENS: 'Tokens saved',
|
|
60
|
-
SAVED_MINUTES: 'Time saved',
|
|
61
|
-
ESTIMATE_TAG: 'estimate',
|
|
62
|
-
CHART: 'Verdicts, last 30 days',
|
|
63
|
-
DEFECTS: 'What broke',
|
|
64
|
-
DEFECTS_MORE: 'Manage all of them on the dashboard',
|
|
65
|
-
/**
|
|
66
|
-
* What an UNLINKED user is told, and the only place the product tells them.
|
|
67
|
-
*
|
|
68
|
-
* The dashboard link renders only when `dashboardUrl` exists, which means only once a repo is
|
|
69
|
-
* already linked — so the person most likely to want one, watching this record climb on their own
|
|
70
|
-
* machine, was never told it existed. The single mention anywhere else is a daemon log line.
|
|
71
|
-
*
|
|
72
|
-
* Stated as a FACT about where the record lives, not as a pitch. It sits at the foot of a panel
|
|
73
|
-
* somebody opened on purpose, so it informs rather than interrupts, and it appears only once
|
|
74
|
-
* there is a verdict worth keeping — an offer to preserve nothing is just an advert.
|
|
75
|
-
*/
|
|
76
|
-
LOCAL_ONLY: 'This record stops at this machine.',
|
|
77
|
-
LOCAL_ONLY_ACTION: 'reticle login',
|
|
78
|
-
LOCAL_ONLY_TAIL: 'keeps it, and lets a team see it.',
|
|
79
|
-
DEFECTS_NONE: 'Nothing has failed a declared consequence yet.',
|
|
80
|
-
EMPTY: 'Nothing recorded yet. Drive the app once and this fills in.',
|
|
81
|
-
SHARE: 'Share',
|
|
82
|
-
COPY: 'Copy',
|
|
83
|
-
COPIED: 'Copied',
|
|
84
|
-
REFER: 'Send to a friend',
|
|
85
|
-
};
|
|
86
|
-
/** "4.2k", "1.3M" - a number a person reads at a glance rather than counts digits in. */
|
|
87
|
-
export function compactNumber(n) {
|
|
88
|
-
if (n < 1000)
|
|
89
|
-
return String(Math.round(n));
|
|
90
|
-
if (n < 1_000_000)
|
|
91
|
-
return `${trim(n / 1000)}k`;
|
|
92
|
-
return `${trim(n / 1_000_000)}M`;
|
|
93
|
-
}
|
|
94
|
-
function trim(n) {
|
|
95
|
-
return n >= 10 ? String(Math.round(n)) : String(Math.round(n * 10) / 10);
|
|
96
|
-
}
|
|
97
|
-
/** "2h 14m", "47m", "38s" - the same duration vocabulary the activity strip uses. */
|
|
98
|
-
export function compactDuration(ms) {
|
|
99
|
-
const s = Math.floor(ms / 1000);
|
|
100
|
-
if (s < 60)
|
|
101
|
-
return `${String(s)}s`;
|
|
102
|
-
const m = Math.floor(s / 60);
|
|
103
|
-
if (m < 60)
|
|
104
|
-
return `${String(m)}m`;
|
|
105
|
-
const h = Math.floor(m / 60);
|
|
106
|
-
return 0 === m % 60 ? `${String(h)}h` : `${String(h)}h ${String(m % 60)}m`;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* The post itself.
|
|
110
|
-
*
|
|
111
|
-
* Leads with defects caught, then the verdict split INCLUDING unknowns, then the superlative. No
|
|
112
|
-
* estimated savings, no percentile, no leaderboard: those are the four things the evidence says get
|
|
113
|
-
* a dev-tool card mocked rather than shared.
|
|
114
|
-
*/
|
|
115
|
-
export function buildShareText(scope, projectName) {
|
|
116
|
-
const c = scope.counts;
|
|
117
|
-
const where = projectName !== undefined && projectName.length > 0 ? ` on ${projectName}` : '';
|
|
118
|
-
const lines = [
|
|
119
|
-
`My agent verified its own work ${String(c.verdicts)} times${where}.`,
|
|
120
|
-
`${String(c.failed)} checks it refused to pass before I looked at any of them.`,
|
|
121
|
-
];
|
|
122
|
-
if (c.unknown > 0) {
|
|
123
|
-
lines.push(`${String(c.unknown)} came back "unknown" - it drove the app and could not tell. That is the number I watch.`);
|
|
124
|
-
}
|
|
125
|
-
if (scope.records.longestRunMs > 0) {
|
|
126
|
-
lines.push(`Longest unattended run: ${compactDuration(scope.records.longestRunMs)}.`);
|
|
127
|
-
}
|
|
128
|
-
return lines.join('\n');
|
|
129
|
-
}
|
|
130
|
-
/** X share intent. `via` is omitted while no handle is configured. */
|
|
131
|
-
export function buildXShareUrl(text) {
|
|
132
|
-
const params = new URLSearchParams({ text, url: REPORT_LINKS.SITE });
|
|
133
|
-
if (SHARE_VIA_HANDLE.length > 0)
|
|
134
|
-
params.set('via', SHARE_VIA_HANDLE);
|
|
135
|
-
return `https://twitter.com/intent/tweet?${params.toString()}`;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* LinkedIn share.
|
|
139
|
-
*
|
|
140
|
-
* `share-offsite` takes a url and NOTHING else - the title/summary parameters were deprecated in
|
|
141
|
-
* 2018 and are ignored, so the caption has to reach the composer some other way. The report copies
|
|
142
|
-
* it to the clipboard before opening this, which is the only path that works without asking the
|
|
143
|
-
* user for posting permissions.
|
|
144
|
-
*/
|
|
145
|
-
export function buildLinkedInShareUrl() {
|
|
146
|
-
return `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(REPORT_LINKS.SITE)}`;
|
|
147
|
-
}
|
|
148
|
-
/** What a referral says: the tool, not the sender's numbers. */
|
|
149
|
-
export function buildReferralText() {
|
|
150
|
-
return `I have been verifying my agent's work from inside the running app with Reticle - it returns pass/fail with the file:line to fix. ${REPORT_LINKS.SITE}`;
|
|
151
|
-
}
|
|
152
|
-
/** Narrow an unknown push payload to a snapshot. Invalid shapes are ignored, never rendered. */
|
|
153
|
-
export function parseImpactSnapshot(value) {
|
|
154
|
-
const parsed = ImpactSnapshotSchema.safeParse(value);
|
|
155
|
-
return parsed.success ? parsed.data : undefined;
|
|
156
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** Shared fixtures for the presenter test suites (presenter.test.ts + presenter-lifecycle.test.ts). */
|
|
2
|
-
export declare const FAST_IDLE_MS = 20;
|
|
3
|
-
export declare const FAST_FADE_MS = 5;
|
|
4
|
-
export declare const flush: () => Promise<void>;
|
|
5
|
-
export declare const wait: (ms: number) => Promise<void>;
|
|
6
|
-
/** Poll a predicate until true or timeout - robust to real-timer lateness under load (no flake). */
|
|
7
|
-
export declare const until: (pred: () => boolean, ms?: number) => Promise<boolean>;
|
|
8
|
-
export declare const dataOn: () => string | null;
|
|
9
|
-
export declare const dataBusy: () => string | null;
|
|
10
|
-
interface GlowFlips {
|
|
11
|
-
enters: number;
|
|
12
|
-
exits: number;
|
|
13
|
-
stop: () => void;
|
|
14
|
-
}
|
|
15
|
-
export declare function trackGlowFlips(glow: HTMLElement): GlowFlips;
|
|
16
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/** Shared fixtures for the presenter test suites (presenter.test.ts + presenter-lifecycle.test.ts). */
|
|
2
|
-
export const FAST_IDLE_MS = 20;
|
|
3
|
-
export const FAST_FADE_MS = 5;
|
|
4
|
-
export const flush = () => new Promise((r) => setTimeout(r, 0));
|
|
5
|
-
export const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
6
|
-
/** Poll a predicate until true or timeout - robust to real-timer lateness under load (no flake). */
|
|
7
|
-
export const until = async (pred, ms = 1000) => {
|
|
8
|
-
const t0 = Date.now();
|
|
9
|
-
while (!pred()) {
|
|
10
|
-
if (Date.now() - t0 > ms)
|
|
11
|
-
return false;
|
|
12
|
-
await wait(5);
|
|
13
|
-
}
|
|
14
|
-
return true;
|
|
15
|
-
};
|
|
16
|
-
export const dataOn = () => document.querySelector('[data-reticle-glow]')?.getAttribute('data-on') ?? null;
|
|
17
|
-
export const dataBusy = () => document.querySelector('[data-reticle-glow]')?.getAttribute('data-busy') ?? null;
|
|
18
|
-
export function trackGlowFlips(glow) {
|
|
19
|
-
const counts = { enters: 0, exits: 0 };
|
|
20
|
-
const obs = new MutationObserver((recs) => {
|
|
21
|
-
for (const r of recs) {
|
|
22
|
-
if (r.attributeName !== 'data-on')
|
|
23
|
-
continue;
|
|
24
|
-
const v = glow.getAttribute('data-on');
|
|
25
|
-
if ('1' === v)
|
|
26
|
-
counts.enters++;
|
|
27
|
-
if ('0' === v)
|
|
28
|
-
counts.exits++;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
obs.observe(glow, { attributes: true, attributeFilter: ['data-on'] });
|
|
32
|
-
return {
|
|
33
|
-
get enters() {
|
|
34
|
-
return counts.enters;
|
|
35
|
-
},
|
|
36
|
-
get exits() {
|
|
37
|
-
return counts.exits;
|
|
38
|
-
},
|
|
39
|
-
stop: () => obs.disconnect(),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Native console.warn captured at module load, BEFORE installConsole patches console.
|
|
2
|
-
// SDK-internal diagnostics (transport failures, unreachable-bridge, store registration warnings)
|
|
3
|
-
// MUST use this instead of bare `console.warn` — otherwise they emit spurious CONSOLE_WARN
|
|
4
|
-
// events to the agent, polluting the observation stream with SDK internals.
|
|
5
|
-
const g = globalThis;
|
|
6
|
-
const realWarn = 'function' === typeof g.console?.warn ? g.console.warn.bind(g.console) : null;
|
|
7
|
-
export const nativeWarn = (...args) => {
|
|
8
|
-
realWarn?.(...args);
|
|
9
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Monotonic "now" bound at load. clock.ts deliberately does NOT patch performance.now, so this
|
|
3
|
-
* stays live even when the app clock (reticle_clock) is frozen — the presenter state machine relies
|
|
4
|
-
* on it. Falls back to 0 in SSR where performance is absent.
|
|
5
|
-
*/
|
|
6
|
-
export declare const nativeNow: () => number;
|
|
7
|
-
export declare const nativeSetTimeout: (cb: () => void, ms?: number) => number;
|
|
8
|
-
export declare const nativeClearTimeout: (id: number) => void;
|
|
9
|
-
/**
|
|
10
|
-
* A self-rescheduling interval built on the bound real timer. We do NOT use
|
|
11
|
-
* `setInterval` because reticle_clock can freeze the app's timers — a native, pre-bound
|
|
12
|
-
* timer keeps the page-health heartbeat ticking so a frozen clock never reads as stale.
|
|
13
|
-
* Returns a stop function.
|
|
14
|
-
*/
|
|
15
|
-
export declare const nativeSetInterval: (cb: () => void, ms: number) => (() => void);
|
|
16
|
-
/** Outcome of a bounded frame/settle wait. */
|
|
17
|
-
interface FrameOutcome {
|
|
18
|
-
/** true = a real rAF fired within budget; false = the timeout fallback fired. */
|
|
19
|
-
settled: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* One animation frame, BOUNDED: races real rAF against a nativeSetTimeout(FRAME_BUDGET_MS).
|
|
23
|
-
* In a throttled/background tab rAF never fires, so the timer wins and we still resolve.
|
|
24
|
-
* Returns whether rAF won (settled:true) or the fallback fired (settled:false).
|
|
25
|
-
*/
|
|
26
|
-
export declare const boundedFrame: (budgetMs?: number) => Promise<FrameOutcome>;
|
|
27
|
-
/** One animation frame, BOUNDED — delegates to boundedFrame so it never hangs in a throttled tab. */
|
|
28
|
-
export declare const nativeFrame: () => Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* "Settle": let the framework flush. Awaits a microtask then one BOUNDED animation frame so a
|
|
31
|
-
* React commit (and the MutationObserver records it triggers) lands before the caller returns.
|
|
32
|
-
* Uses native timers/rAF so a frozen app clock (reticle_clock) never stalls it, AND is bounded so a
|
|
33
|
-
* throttled/background tab (rAF never fires) never deadlocks. Reports whether a real frame fired.
|
|
34
|
-
*/
|
|
35
|
-
export declare const settle: (budgetMs?: number) => Promise<FrameOutcome>;
|
|
36
|
-
export {};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
// Native timers captured (bound) at module load, BEFORE any fake-clock patch. The SDK uses
|
|
2
|
-
// these for its own internal waits (presenter pacing, hover dwell, transport reconnect) so
|
|
3
|
-
// that freezing the app's clock (reticle_clock) never deadlocks Reticle itself.
|
|
4
|
-
//
|
|
5
|
-
// Important: we bind the reference now. Resolving `setTimeout` at call time would pick up the
|
|
6
|
-
// patched (frozen) timer once reticle_clock freezes the clock — which would hang the SDK.
|
|
7
|
-
const g = globalThis;
|
|
8
|
-
const realSetTimeout = 'function' === typeof g.setTimeout ? g.setTimeout.bind(g) : null;
|
|
9
|
-
const realClearTimeout = 'function' === typeof g.clearTimeout ? g.clearTimeout.bind(g) : null;
|
|
10
|
-
const realRaf = 'function' === typeof g.requestAnimationFrame ? g.requestAnimationFrame.bind(g) : null;
|
|
11
|
-
const realPerfNow = 'function' === typeof g.performance?.now ? g.performance.now.bind(g.performance) : null;
|
|
12
|
-
/**
|
|
13
|
-
* Monotonic "now" bound at load. clock.ts deliberately does NOT patch performance.now, so this
|
|
14
|
-
* stays live even when the app clock (reticle_clock) is frozen — the presenter state machine relies
|
|
15
|
-
* on it. Falls back to 0 in SSR where performance is absent.
|
|
16
|
-
*/
|
|
17
|
-
export const nativeNow = () => (realPerfNow ? realPerfNow() : 0);
|
|
18
|
-
export const nativeSetTimeout = (cb, ms = 0) => realSetTimeout ? realSetTimeout(cb, ms) : 0;
|
|
19
|
-
export const nativeClearTimeout = (id) => {
|
|
20
|
-
realClearTimeout?.(id);
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* A self-rescheduling interval built on the bound real timer. We do NOT use
|
|
24
|
-
* `setInterval` because reticle_clock can freeze the app's timers — a native, pre-bound
|
|
25
|
-
* timer keeps the page-health heartbeat ticking so a frozen clock never reads as stale.
|
|
26
|
-
* Returns a stop function.
|
|
27
|
-
*/
|
|
28
|
-
export const nativeSetInterval = (cb, ms) => {
|
|
29
|
-
let stopped = false;
|
|
30
|
-
let id = 0;
|
|
31
|
-
const tick = () => {
|
|
32
|
-
if (stopped)
|
|
33
|
-
return;
|
|
34
|
-
cb();
|
|
35
|
-
if (stopped)
|
|
36
|
-
return;
|
|
37
|
-
id = nativeSetTimeout(tick, ms);
|
|
38
|
-
};
|
|
39
|
-
id = nativeSetTimeout(tick, ms);
|
|
40
|
-
return () => {
|
|
41
|
-
stopped = true;
|
|
42
|
-
nativeClearTimeout(id);
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
/** Max time we wait for a real animation frame before giving up and resolving anyway. */
|
|
46
|
-
const FRAME_BUDGET_MS = 200;
|
|
47
|
-
/**
|
|
48
|
-
* One animation frame, BOUNDED: races real rAF against a nativeSetTimeout(FRAME_BUDGET_MS).
|
|
49
|
-
* In a throttled/background tab rAF never fires, so the timer wins and we still resolve.
|
|
50
|
-
* Returns whether rAF won (settled:true) or the fallback fired (settled:false).
|
|
51
|
-
*/
|
|
52
|
-
export const boundedFrame = (budgetMs = FRAME_BUDGET_MS) => new Promise((resolve) => {
|
|
53
|
-
let done = false;
|
|
54
|
-
const finish = (settled) => {
|
|
55
|
-
if (done)
|
|
56
|
-
return;
|
|
57
|
-
done = true;
|
|
58
|
-
nativeClearTimeout(timer);
|
|
59
|
-
resolve({ settled });
|
|
60
|
-
};
|
|
61
|
-
const timer = nativeSetTimeout(() => finish(false), budgetMs);
|
|
62
|
-
if (realRaf)
|
|
63
|
-
realRaf(() => finish(true));
|
|
64
|
-
else
|
|
65
|
-
nativeSetTimeout(() => finish(true), 0); // jsdom/SSR: 0ms timer "is" the frame
|
|
66
|
-
});
|
|
67
|
-
/** One animation frame, BOUNDED — delegates to boundedFrame so it never hangs in a throttled tab. */
|
|
68
|
-
export const nativeFrame = () => boundedFrame().then(() => undefined);
|
|
69
|
-
/**
|
|
70
|
-
* "Settle": let the framework flush. Awaits a microtask then one BOUNDED animation frame so a
|
|
71
|
-
* React commit (and the MutationObserver records it triggers) lands before the caller returns.
|
|
72
|
-
* Uses native timers/rAF so a frozen app clock (reticle_clock) never stalls it, AND is bounded so a
|
|
73
|
-
* throttled/background tab (rAF never fires) never deadlocks. Reports whether a real frame fired.
|
|
74
|
-
*/
|
|
75
|
-
export const settle = async (budgetMs = FRAME_BUDGET_MS) => {
|
|
76
|
-
await Promise.resolve(); // drain the current microtask queue (React scheduler tick)
|
|
77
|
-
return boundedFrame(budgetMs); // one bounded frame so commit + MutationObserver records flush
|
|
78
|
-
};
|
|
File without changes
|
|
File without changes
|