@yaks/tracker 0.0.0-stage → 0.2.36
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/Histogram.js +71 -0
- package/Histogram.js.map +1 -0
- package/Histogram.ts +100 -0
- package/LICENSE +202 -0
- package/README.md +639 -2
- package/_dist/brief.d.ts +25 -0
- package/_dist/brief.d.ts.map +1 -0
- package/_dist/changes.d.ts +9 -0
- package/_dist/changes.d.ts.map +1 -0
- package/_dist/chart.d.ts +24 -0
- package/_dist/chart.d.ts.map +1 -0
- package/_dist/digest.d.ts +64 -0
- package/_dist/digest.d.ts.map +1 -0
- package/_dist/effects.d.ts +73 -0
- package/_dist/effects.d.ts.map +1 -0
- package/_dist/errors.d.ts +14 -0
- package/_dist/errors.d.ts.map +1 -0
- package/_dist/everywhere.d.ts +13 -0
- package/_dist/everywhere.d.ts.map +1 -0
- package/_dist/fault.d.ts +29 -0
- package/_dist/fault.d.ts.map +1 -0
- package/_dist/file.d.ts +6 -0
- package/_dist/file.d.ts.map +1 -0
- package/_dist/fixtime.d.ts +20 -0
- package/_dist/fixtime.d.ts.map +1 -0
- package/_dist/frames.d.ts +6 -0
- package/_dist/frames.d.ts.map +1 -0
- package/_dist/graph.d.ts +3 -0
- package/_dist/graph.d.ts.map +1 -0
- package/_dist/group.d.ts +21 -0
- package/_dist/group.d.ts.map +1 -0
- package/_dist/instrument.d.ts +37 -0
- package/_dist/instrument.d.ts.map +1 -0
- package/_dist/intake.d.ts +21 -0
- package/_dist/intake.d.ts.map +1 -0
- package/_dist/merge.d.ts +11 -0
- package/_dist/merge.d.ts.map +1 -0
- package/_dist/mod.d.ts +7 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/model.d.ts +20 -0
- package/_dist/model.d.ts.map +1 -0
- package/_dist/outage.d.ts +7 -0
- package/_dist/outage.d.ts.map +1 -0
- package/_dist/people.d.ts +3 -0
- package/_dist/people.d.ts.map +1 -0
- package/_dist/poll.d.ts +101 -0
- package/_dist/poll.d.ts.map +1 -0
- package/_dist/poll_thread.d.ts +8 -0
- package/_dist/poll_thread.d.ts.map +1 -0
- package/_dist/reading.d.ts +34 -0
- package/_dist/reading.d.ts.map +1 -0
- package/_dist/remote.d.ts +61 -0
- package/_dist/remote.d.ts.map +1 -0
- package/_dist/report.d.ts +324 -0
- package/_dist/report.d.ts.map +1 -0
- package/_dist/resolution.d.ts +22 -0
- package/_dist/resolution.d.ts.map +1 -0
- package/_dist/routes.d.ts +33 -0
- package/_dist/routes.d.ts.map +1 -0
- package/_dist/script.d.ts +8 -0
- package/_dist/script.d.ts.map +1 -0
- package/_dist/service.d.ts +30 -0
- package/_dist/service.d.ts.map +1 -0
- package/_dist/sync_health.d.ts +4 -0
- package/_dist/sync_health.d.ts.map +1 -0
- package/_dist/ticket.d.ts +14 -0
- package/_dist/ticket.d.ts.map +1 -0
- package/_dist/tools.d.ts +39 -0
- package/_dist/tools.d.ts.map +1 -0
- package/_dist/trace-intake.d.ts +25 -0
- package/_dist/trace-intake.d.ts.map +1 -0
- package/_dist/views.d.ts +11 -0
- package/_dist/views.d.ts.map +1 -0
- package/_dist/vocab.d.ts +9 -0
- package/_dist/vocab.d.ts.map +1 -0
- package/box.json +51 -0
- package/brief.js +86 -0
- package/brief.js.map +1 -0
- package/brief.ts +120 -0
- package/changes.js +57 -0
- package/changes.js.map +1 -0
- package/changes.ts +70 -0
- package/chart.js +186 -0
- package/chart.js.map +1 -0
- package/chart.ts +193 -0
- package/deno.json +1 -0
- package/digest.js +329 -0
- package/digest.js.map +1 -0
- package/digest.ts +406 -0
- package/effects.js +136 -0
- package/effects.js.map +1 -0
- package/effects.ts +178 -0
- package/errors.js +130 -0
- package/errors.js.map +1 -0
- package/errors.ts +185 -0
- package/everywhere.js +46 -0
- package/everywhere.js.map +1 -0
- package/everywhere.ts +66 -0
- package/fault.js +65 -0
- package/fault.js.map +1 -0
- package/fault.ts +107 -0
- package/file.js +87 -0
- package/file.js.map +1 -0
- package/file.ts +93 -0
- package/fixtime.js +67 -0
- package/fixtime.js.map +1 -0
- package/fixtime.ts +86 -0
- package/frames.js +77 -0
- package/frames.js.map +1 -0
- package/frames.ts +69 -0
- package/graph.js +7 -0
- package/graph.js.map +1 -0
- package/graph.ts +8 -0
- package/group.js +444 -0
- package/group.js.map +1 -0
- package/group.ts +533 -0
- package/inspect.js +471 -0
- package/inspect.js.map +1 -0
- package/inspect.ts +693 -0
- package/instrument.js +69 -0
- package/instrument.js.map +1 -0
- package/instrument.ts +93 -0
- package/intake.js +43 -0
- package/intake.js.map +1 -0
- package/intake.ts +84 -0
- package/merge.js +126 -0
- package/merge.js.map +1 -0
- package/merge.ts +115 -0
- package/migrate.ts +36 -0
- package/mod.js +8 -0
- package/mod.js.map +1 -0
- package/mod.ts +19 -0
- package/model.js +8 -0
- package/model.js.map +1 -0
- package/model.ts +27 -0
- package/outage.js +129 -0
- package/outage.js.map +1 -0
- package/outage.ts +158 -0
- package/package.json +133 -4
- package/page.d.ts +2 -0
- package/page.js +905 -0
- package/people.js +51 -0
- package/people.js.map +1 -0
- package/people.ts +82 -0
- package/poll.js +277 -0
- package/poll.js.map +1 -0
- package/poll.ts +411 -0
- package/poll_thread.js +104 -0
- package/poll_thread.js.map +1 -0
- package/poll_thread.ts +126 -0
- package/poll_worker.ts +45 -0
- package/reading.js +122 -0
- package/reading.js.map +1 -0
- package/reading.ts +162 -0
- package/reconcile.js +113 -0
- package/reconcile.js.map +1 -0
- package/reconcile.ts +130 -0
- package/remote.js +312 -0
- package/remote.js.map +1 -0
- package/remote.ts +397 -0
- package/report.js +825 -0
- package/report.js.map +1 -0
- package/report.ts +944 -0
- package/resolution.js +114 -0
- package/resolution.js.map +1 -0
- package/resolution.ts +123 -0
- package/routes.js +130 -0
- package/routes.js.map +1 -0
- package/routes.ts +163 -0
- package/script.js +13 -0
- package/script.js.map +1 -0
- package/script.ts +16 -0
- package/service.js +174 -0
- package/service.js.map +1 -0
- package/service.ts +215 -0
- package/spread.js +94 -0
- package/spread.js.map +1 -0
- package/spread.ts +101 -0
- package/sync_health.js +36 -0
- package/sync_health.js.map +1 -0
- package/sync_health.ts +65 -0
- package/ticket.js +6 -0
- package/ticket.js.map +1 -0
- package/ticket.ts +24 -0
- package/tools.js +305 -0
- package/tools.js.map +1 -0
- package/tools.ts +411 -0
- package/trace-intake.js +164 -0
- package/trace-intake.js.map +1 -0
- package/trace-intake.ts +148 -0
- package/views.js +247 -0
- package/views.js.map +1 -0
- package/views.ts +254 -0
- package/vocab.js +20 -0
- package/vocab.js.map +1 -0
- package/vocab.json +834 -0
- package/vocab.ts +14 -0
- package/yak-tracker@.service +22 -0
package/_dist/brief.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** A file as a person finds it in a project: its last three segments, the
|
|
2
|
+
* scheme and the checkout around them left off. */ export declare let place: (file: string) => string;
|
|
3
|
+
/** An address in a message: a file by its place, a URL without its query. */ export declare let link: (url: string) => string;
|
|
4
|
+
/** A message as one line a person reads: its first line, terminal colours
|
|
5
|
+
* left out, an address without its query, an id or a long number cut to its
|
|
6
|
+
* start. The message it stands for is unchanged. */ export declare let headline: (text: string) => string;
|
|
7
|
+
/** A title split where its thrown value's type ends, as the tracker writes
|
|
8
|
+
* it (`type: value`). A sentence without one is all message. */ export declare let thrown: (title: string) => {
|
|
9
|
+
type?: string;
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
/** A commit as people say it: seven characters of its sha. */ export declare let sha: (commit: string) => string;
|
|
13
|
+
/** A stack's text frame as `bug.spot` keeps it (`file:line function`): where
|
|
14
|
+
* it is, briefly, and what ran there. */ export declare let spot: (text: string) => {
|
|
15
|
+
place: string;
|
|
16
|
+
fn?: string;
|
|
17
|
+
file: string;
|
|
18
|
+
};
|
|
19
|
+
/** A moment to the second, in the reader's own clock and words. */ export declare let moment: (at: string) => string;
|
|
20
|
+
/** A number with its thousands marked, as people read it. */ export declare let figure: (n: number) => string;
|
|
21
|
+
/** A count and its noun, plural past one. */ export declare let count: (n: number, noun: string) => string;
|
|
22
|
+
/** Whom a bug reached, from the people its occurrences name and the kind of
|
|
23
|
+
* account they reached (`bug.people`, `bug.account`): a person's failure
|
|
24
|
+
* reads apart from a probe's at a glance. */ export declare let whom: (people: number, account: string | null | undefined) => string;
|
|
25
|
+
//# sourceMappingURL=brief.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brief.d.ts","sources":["../brief.ts"],"names":[],"mappings":"AAcA;iDACiD,GACjD,OAAO,YAAI,QAAS,MAAM,MAAM,KAAG,MAAM,CAIxC;AAID,2EAA2E,GAC3E,OAAO,YAAI,OAAQ,KAAK,MAAM,KAAG,MAAM,CACgC;AAOvE;;kDAEkD,GAClD,OAAO,YAAI,WAAY,MAAM,MAAM,KAAG,MAAM,CAMjC;AAKX;8DAC8D,GAC9D,OAAO,YAAI,SAAU,OAAO,MAAM;EAAK,OAAO,MAAM;EAAE,SAAS,MAAM;EAGpE;AAID,4DAA4D,GAC5D,OAAO,YAAI,MAAO,QAAQ,MAAM,KAAG,MAAM,CACqB;AAI9D;uCACuC,GACvC,OAAO,YAAI,OACT,MAAM,MAAM;EACT,OAAO,MAAM;EAAE,KAAK,MAAM;EAAE,MAAM,MAAM;EAK5C;AAED,iEAAiE,GACjE,OAAO,YAAI,SAAU,IAAI,MAAM,KAAG,MAAM,CAQpC;AASJ,2DAA2D,GAC3D,OAAO,YAAI,SAAU,GAAG,MAAM,KAAG,MAAM,CACgB;AAIvD,2CAA2C,GAC3C,OAAO,YAAI,QAAS,GAAG,MAAM,EAAE,MAAM,MAAM,KAAG,MAAM,CACR;AAO5C;;2CAE2C,GAC3C,OAAO,YAAI,OACT,QAAQ,MAAM,EACd,SAAS,MAAM,GAAG,IAAI,GAAG,SAAS,KACjC,MAAM,CAOiB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Clock } from "@yaks/fp";
|
|
2
|
+
import type { Doors } from "./poll.js";
|
|
3
|
+
export type Changes = {
|
|
4
|
+
version: (scope?: string) => Promise<string | undefined>;
|
|
5
|
+
scopes: () => Promise<string[]>;
|
|
6
|
+
close: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare let changes: (doors: Doors, _dts_1: never) => Changes;
|
|
9
|
+
//# sourceMappingURL=changes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sources":["../changes.ts"],"names":[],"mappings":"AAEA,cAAc,KAAK,wBAA6B;AAEhD,cAAc,KAAK,oBAAmB;AAGtC,YAAY;EACV,UAAU,QAAQ,MAAM,KAAK,QAAQ,MAAM,GAAG,SAAS;EACvD,cAAc,QAAQ,MAAM;EAC5B,aAAa,IAAI;;AAGnB,OAAO,YAAI,UACT,OAAO,OACP,kBACC,QAqDF"}
|
package/_dist/chart.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** One day of the chart: bugs opened (first seen or regressed) and fixed,
|
|
2
|
+
* the warnings that opened none, and the median time to fix of that day's
|
|
3
|
+
* fixes, in milliseconds. */ export type Day = {
|
|
4
|
+
day: string;
|
|
5
|
+
opened: number;
|
|
6
|
+
fixed: number;
|
|
7
|
+
warned: number;
|
|
8
|
+
fix?: number;
|
|
9
|
+
};
|
|
10
|
+
/** A chart's days as the query string its image is drawn from: the first
|
|
11
|
+
* day, then opened, fixed, minutes to fix and warnings, a day each. */ export declare let query: (days: Day[]) => string;
|
|
12
|
+
/** The days a chart's query string carries, or undefined for one that is
|
|
13
|
+
* not a chart's. An address from before warnings were counted draws none. */ export declare let days: (q: URLSearchParams) => Day[] | undefined;
|
|
14
|
+
/** The colours a chart is drawn in, which the letter's caption names. */ export declare let COLOURS: {
|
|
15
|
+
readonly opened: readonly [209, 73, 91];
|
|
16
|
+
readonly fixed: readonly [60, 154, 95];
|
|
17
|
+
readonly warned: readonly [150, 160, 180];
|
|
18
|
+
readonly fix: readonly [224, 161, 0];
|
|
19
|
+
};
|
|
20
|
+
/** The chart of `days` as PNG bytes, 1200 by 400 pixels. */ export declare let chart: (days: Day[]) => Promise<Uint8Array>;
|
|
21
|
+
/** Answer a request for a chart: the image its query string draws, kept by
|
|
22
|
+
* any cache for good since the same address always draws the same image, or
|
|
23
|
+
* 400 for an address that is not a chart's. */ export declare let serve: (url: URL) => Promise<Response>;
|
|
24
|
+
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.d.ts","sources":["../chart.ts"],"names":[],"mappings":"AAQA;;2BAE2B,GAC3B,YAAY;EACV,KAAK,MAAM;EACX,QAAQ,MAAM;EACd,OAAO,MAAM;EACb,QAAQ,MAAM;EACd,MAAM,MAAM;;AAQd;qEACqE,GACrE,OAAO,YAAI,QAAS,MAAM,UAAQ,MAAM,CAQJ;AAWpC;2EAC2E,GAC3E,OAAO,YAAI,OAAQ,GAAG,oBAAkB,QAAQ,SAAS,CAwBxD;AAED,uEAAuE,GACvE,OAAO,YAAI;WACT,kBAAS,KAAK,IAAI;WAClB,iBAAQ,IAAI,KAAK;WACjB,kBAAS,KAAK,KAAK;WACnB,eAAM,KAAK,KAAK;EACR;AAoBV,0DAA0D,GAC1D,OAAO,YAAI,QAAS,MAAM,UAAQ,QAAQ,YA8EzC;AAED;;6CAE6C,GAC7C,OAAO,YAAI,QAAe,KAAK,QAAM,QAAQ,UAS5C"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Bundle } from "@yaks/graph";
|
|
2
|
+
import { type Desk } from "./model.js";
|
|
3
|
+
import { type Day } from "./chart.js";
|
|
4
|
+
import { type InteractionSummary } from "@yaks/timing/interaction";
|
|
5
|
+
/** The owner's time zone: the digest goes out in his morning, and its days
|
|
6
|
+
* are his. */ export declare let ZONE: string;
|
|
7
|
+
/** When the digest goes out. */ export declare let EVERY: string;
|
|
8
|
+
/** How many days the chart shows. */ export declare let SPAN: number;
|
|
9
|
+
/** A moment's date in the owner's zone, as YYYY-MM-DD. */ export declare let day: (t: number) => string;
|
|
10
|
+
/** The chart's days: the `n` days up to and including `now`'s, each with the
|
|
11
|
+
* bugs that opened and were fixed on it, the warnings caught on it (from
|
|
12
|
+
* their times), and the median time to fix. */ export declare let series: (bugs: Bundle[], now: number, warnings?: number[]) => Day[];
|
|
13
|
+
/** Where the digest's links and chart point. */ export type Places = {
|
|
14
|
+
/** A bug's page. */ bug: (eid: string) => string;
|
|
15
|
+
/** The chart's image, its days' query string appended. */ chart?: string;
|
|
16
|
+
};
|
|
17
|
+
/** What the digest is written from besides the bugs: the day's interactions
|
|
18
|
+
* on the platform, and the times of the chart's warnings. */ export type Seen = {
|
|
19
|
+
timing?: InteractionSummary;
|
|
20
|
+
warnings?: number[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The digest of `bugs` at `now`: what opened and was fixed in the day before
|
|
24
|
+
* it, what is open, and the chart of the days before that.
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { digest } from '@yaks/tracker/digest'
|
|
28
|
+
* import { equal } from '@yaks/testing'
|
|
29
|
+
*
|
|
30
|
+
* let now = Date.parse('2026-11-20T12:00:00Z')
|
|
31
|
+
* let { title } = digest([
|
|
32
|
+
* { entity: { eid: 'a' }, doc: { title: 'TypeError: x' }, bug: { first: '2026-11-20T09:00:00Z', hits: 2, account: 'person', people: 1 } },
|
|
33
|
+
* { entity: { eid: 'b' }, doc: { title: 'Error: y' }, bug: { first: '2026-11-19T10:00:00Z' }, resolved: { at: '2026-11-19T13:00:00Z' } },
|
|
34
|
+
* ], now, { bug: (eid) => `https://bugs.example/${eid}` })
|
|
35
|
+
* equal(title, 'Bugs, Nov 20: 1 new, 1 fixed, 1 open, 1 reached a person')
|
|
36
|
+
* ```
|
|
37
|
+
*/ export declare let digest: (bugs: Bundle[], now: number, places: Places, _dts_1: never) => {
|
|
38
|
+
title: string;
|
|
39
|
+
body: string;
|
|
40
|
+
};
|
|
41
|
+
/** The recurring wake that sends the digest each morning, from `now` on. One
|
|
42
|
+
* store holds one, under a fixed eid, so writing it again moves nothing. */ export declare let wake: (now: number) => Bundle;
|
|
43
|
+
/** What the digest is sent with: its recipient by entity, the address it is
|
|
44
|
+
* from, the tracker web's address, this store's global eid, and where its
|
|
45
|
+
* chart is drawn (a `/chart.png` that reads its query string, ./chart.ts). */ export type Sending = {
|
|
46
|
+
to?: string;
|
|
47
|
+
from?: string;
|
|
48
|
+
url?: string;
|
|
49
|
+
store?: string;
|
|
50
|
+
chart?: string;
|
|
51
|
+
/** What makes this letter one of its own: the day by default, so the
|
|
52
|
+
* day's firings write one; a request that asks for one names its moment. */ key?: string;
|
|
53
|
+
/** The wake's firing, to which the scheduled letter belongs. */ fired?: {
|
|
54
|
+
entity: Bundle['entity'];
|
|
55
|
+
at: string;
|
|
56
|
+
};
|
|
57
|
+
/** Sections of the host's own, in Markdown, below the bugs' chart: the
|
|
58
|
+
* platform's trials (workers/tracker). One that fails leaves the digest
|
|
59
|
+
* without it, reported. */ more?: (now: number) => Promise<string[]>;
|
|
60
|
+
};
|
|
61
|
+
/** Write the digest due at `now` as a letter to `to`, once a day: a retried
|
|
62
|
+
* firing finds the day's letter. Only the newest scheduled digest still
|
|
63
|
+
* asks to go when the sender comes back. */ export declare let send: (g: Desk, now: number, {}: Sending, report?: (error: unknown) => void) => Promise<void>;
|
|
64
|
+
//# sourceMappingURL=digest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digest.d.ts","sources":["../digest.ts"],"names":[],"mappings":"AAOA,cAAc,MAAM,2BAAgC;AAKpD,SAAe,KAAK,IAAI,qBAAyB;AAGjD,SAAS,KAAK,GAAG,qBAA2B;AAa5C,SAGE,KAAK,kBAAkB,wCAGmB;AAE5C;YACY,GACZ,OAAO,YAAI,aAAwB;AACnC,8BAA8B,GAC9B,OAAO,YAAI,cAA2B;AACtC,mCAAmC,GACnC,OAAO,YAAI,aAAS;AAMpB,wDAAwD,GACxD,OAAO,YAAI,MAAO,GAAG,MAAM,KAAgB,MAAM,CAMnC;AAYd;;6CAE6C,GAC7C,OAAO,YAAI,SACT,MAAM,UACN,KAAK,MAAM,EACX,WAAU,MAAM,OAEf,MA6BF;AAED,8CAA8C,GAC9C,YAAY;EACV,kBAAkB,GAClB,MAAM,KAAK,MAAM,KAAK,MAAM;EAC5B,wDAAwD,GACxD,QAAQ,MAAM;;AAmDhB;2DAC2D,GAC3D,YAAY;EAAS,SAAS;EAAoB,WAAW,MAAM;;AAEnE;;;;;;;;;;;;;;;CAeC,GACD,OAAO,YAAI,SACT,MAAM,UACN,KAAK,MAAM,EACX,QAAQ,QACR;EACG,OAAO,MAAM;EAAE,MAAM,MAAM;EAiF/B;AAED;0EAC0E,GAC1E,OAAO,YAAI,OAAQ,KAAK,MAAM,KAAG,OAI/B;AAYF;;4EAE4E,GAC5E,YAAY;EACV,KAAK,MAAM;EACX,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,QAAQ,MAAM;EACd,QAAQ,MAAM;EACd;4EAC0E,GAC1E,MAAM,MAAM;EACZ,8DAA8D,GAC9D;IAAU,QAAQ,OAAO;IAAW,IAAI,MAAM;;EAC9C;;2BAEyB,GACzB,QAAQ,KAAK,MAAM,KAAK,QAAQ,MAAM;;AA6BxC;;0CAE0C,GAC1C,OAAO,YAAI,OACT,GAAG,MACH,KAAK,MAAM,EACX,IAAmD,OAAO,EAC1D,UAAS,OAAO,OAAO,KAAK,IAAI,KAC/B,QAAQ,IAAI,EA+Dd"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Graph } from "@yaks/graph";
|
|
2
|
+
import type { Handlers } from "@yaks/effects";
|
|
3
|
+
import { type Desk } from "./model.js";
|
|
4
|
+
import { type Enrich } from "./group.js";
|
|
5
|
+
import { type Explanation } from "./resolution.js";
|
|
6
|
+
export type Options = {
|
|
7
|
+
enrich?: Enrich;
|
|
8
|
+
/** The digest's recipient, by entity: the host resolves its address. */ to?: string;
|
|
9
|
+
from?: string;
|
|
10
|
+
/** Global eid of this tracker store, which the digest's links scope. */ store?: string;
|
|
11
|
+
/** Tracker web address for links in the digest. */ url?: string;
|
|
12
|
+
/** Where the digest's chart is drawn: a `/chart.png` (./chart.ts). */ chart?: string;
|
|
13
|
+
/** Sections of the host's own the digest carries (./digest.ts `Sending`). */ more?: (now: number) => Promise<string[]>;
|
|
14
|
+
/** Where a failure the digest survives is reported. */ report?: (error: unknown) => void | Promise<void>;
|
|
15
|
+
retain?: number;
|
|
16
|
+
/** Archive these occurrences in the tracker of `scope` (a space's) for
|
|
17
|
+
* `reason`, as its owner's `fixed` would, and resolve with `said` a bug of
|
|
18
|
+
* theirs left with none open: the platform's, which resolves bugs reported
|
|
19
|
+
* from people's apps ({@link settle}). */ settle?: (scope: string, eids: string[], reason: string, said?: Explanation) => Promise<unknown>;
|
|
20
|
+
/** Run again the work a resolved bug `bug` stopped for `owner` (a space,
|
|
21
|
+
* whose Operator keeps it), named by the faults its occurrences tagged
|
|
22
|
+
* `rerun` with the owner were reported under ({@link settle}). */ rerun?: (owner: string, faults: string[], bug: string, said?: Explanation) => Promise<unknown>;
|
|
23
|
+
};
|
|
24
|
+
/** A resolved bug closes the reports its occurrences stand for elsewhere: an
|
|
25
|
+
* occurrence tagged with another tracker's `scope` and its `occurrence` there
|
|
26
|
+
* (a break in a person's app, which yaks.app also records) is archived in
|
|
27
|
+
* that tracker, so the app's owner and their Operator stop hearing of a break
|
|
28
|
+
* yaks.app fixed; the reason is the resolution's cause. The resolution's
|
|
29
|
+
* explanation goes with them, and resolves the space's bug they leave with no
|
|
30
|
+
* open occurrence, so one fix never leaves a second copy open. An occurrence
|
|
31
|
+
* tagged `rerun` stopped work its owner (a space) keeps under the
|
|
32
|
+
* occurrence's fault, and each owner is handed the faults, so it runs that
|
|
33
|
+
* work again now it can finish (the tracker keeps one such occurrence of each
|
|
34
|
+
* owner, `retained`). Only occurrences from before the resolution are closed
|
|
35
|
+
* or run again; a later one is the bug back, open in both. Archiving again
|
|
36
|
+
* changes nothing, and an owner runs its work once for each bug, so a retry
|
|
37
|
+
* is safe.
|
|
38
|
+
*
|
|
39
|
+
* ```ts
|
|
40
|
+
* import { settle } from './effects.ts'
|
|
41
|
+
* import { equal } from '@yaks/testing'
|
|
42
|
+
* let at = (eid: string, t: string, tags = {}) =>
|
|
43
|
+
* ({ entity: { eid }, error: { at: t, bug: 'b', fault: 'f', tags } })
|
|
44
|
+
* let rows = [
|
|
45
|
+
* { entity: { eid: 'b' }, bug: {}, resolved: { at: '2026-10-18T16:00Z', cause: 'a leak', recur: 'no' } },
|
|
46
|
+
* at('e1', '2026-10-18T15:49Z', { scope: 's', occurrence: 'o1' }),
|
|
47
|
+
* at('e2', '2026-10-18T15:50Z', { scope: 's', occurrence: 'o2' }),
|
|
48
|
+
* at('e3', '2026-10-18T15:51Z'),
|
|
49
|
+
* at('e4', '2026-10-19T09:00Z', { scope: 's', occurrence: 'o4' }),
|
|
50
|
+
* at('e5', '2026-10-18T15:52Z', { rerun: 'ada' }),
|
|
51
|
+
* at('e6', '2026-10-19T09:01Z', { rerun: 'bo' }),
|
|
52
|
+
* ]
|
|
53
|
+
* let g = {
|
|
54
|
+
* get: (eids: string[]) => Promise.resolve(rows.filter((r) => eids.includes(r.entity.eid))),
|
|
55
|
+
* read: () => Promise.resolve(rows.filter((r) => 'error' in r)),
|
|
56
|
+
* }
|
|
57
|
+
* let sent: unknown[][] = [], ran: unknown[][] = []
|
|
58
|
+
* await settle(g as never, 'b', {
|
|
59
|
+
* settle: (...a) => Promise.resolve(sent.push(a)),
|
|
60
|
+
* rerun: (...a) => Promise.resolve(ran.push(a)),
|
|
61
|
+
* })
|
|
62
|
+
* let said = { cause: 'a leak', recur: 'no' }
|
|
63
|
+
* equal(sent, [['s', ['o1', 'o2'], 'Fixed by yaks.app: a leak', said]])
|
|
64
|
+
* equal(ran, [['ada', ['f'], 'b', said]])
|
|
65
|
+
* ```
|
|
66
|
+
*/ export declare let settle: (g: Desk, eid: string, options: Options) => Promise<void>;
|
|
67
|
+
export declare let effects: (host: {
|
|
68
|
+
graph: Graph;
|
|
69
|
+
config?: {
|
|
70
|
+
port?: number;
|
|
71
|
+
};
|
|
72
|
+
}, options?: Options) => Handlers;
|
|
73
|
+
//# sourceMappingURL=effects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effects.d.ts","sources":["../effects.ts"],"names":[],"mappings":"AAKA,cAAc,KAAK,2BAAgC;AACnD,cAAc,QAAQ,6BAAkC;AACxD,SAAe,KAAK,IAAI,qBAAyB;AACjD,SAAS,KAAK,MAAM,qBAA0C;AAG9D,SAAS,KAAK,WAAW,0BAAmD;AAI5E,YAAY;EACV,SAAS;EACT,sEAAsE,GACtE,KAAK,MAAM;EACX,OAAO,MAAM;EACb,sEAAsE,GACtE,QAAQ,MAAM;EACd,iDAAiD,GACjD,MAAM,MAAM;EACZ,oEAAoE,GACpE,QAAQ,MAAM;EACd,2EAA2E,GAC3E,QAAQ,KAAK,MAAM,KAAK,QAAQ,MAAM;EACtC,qDAAqD,GACrD,UAAU,OAAO,OAAO,KAAK,IAAI,GAAG,QAAQ,IAAI;EAChD,SAAS,MAAM;EACf;;;0CAGwC,GACxC,UACE,OAAO,MAAM,EACb,MAAM,MAAM,IACZ,QAAQ,MAAM,EACd,OAAO,gBACJ,QAAQ,OAAO;EACpB;;kEAEgE,GAChE,SACE,OAAO,MAAM,EACb,QAAQ,MAAM,IACd,KAAK,MAAM,EACX,OAAO,gBACJ,QAAQ,OAAO;;AAGtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CC,GACD,OAAO,YAAI,SACT,GAAG,MACH,KAAK,MAAM,EACX,SAAS,YACR,QAAQ,IAAI,EAgCd;AAED,OAAO,YAAI,UACT;EAAQ,OAAO;EAAO;IAAW,OAAO,MAAM;;GAC9C,UAAS,YACR,SAyCF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Options } from "./routes.js";
|
|
2
|
+
/** Seconds in a window said as 10m, 6h or 2d. */ export declare let duration: (since: string) => number;
|
|
3
|
+
/** A report's window: its length in seconds, its start, and how it was asked. */ export type Window = {
|
|
4
|
+
seconds: number;
|
|
5
|
+
from: string;
|
|
6
|
+
last: string;
|
|
7
|
+
};
|
|
8
|
+
/** The window a report covers, ending at `end`: `since` back, or a week. */ export declare let windowOf: (since: string | undefined, end: number) => Window;
|
|
9
|
+
/** The report's lines. The optional window matches unresolved bugs by their
|
|
10
|
+
* latest occurrence and times the fixes resolved within it; without one,
|
|
11
|
+
* fixes over the last week. Hits and first seen cover the whole group,
|
|
12
|
+
* including older samples. `resolved` adds each fix beside the bug it closed,
|
|
13
|
+
* as its resolver explained it. */ export declare let errors: (since: string | undefined, options: Options, _dts_1: never) => Promise<string[]>;
|
|
14
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sources":["../errors.ts"],"names":[],"mappings":"AASA,SAAS,KAAK,OAAO,sBAA2B;AAiBhD,+CAA+C,GAC/C,OAAO,YAAI,WAAY,OAAO,MAAM,KAAG,MAAM,CAU5C;AAED,+EAA+E,GAC/E,YAAY;EAAW,SAAS,MAAM;EAAE,MAAM,MAAM;EAAE,MAAM,MAAM;;AAElE,0EAA0E,GAC1E,OAAO,YAAI,WAAY,OAAO,MAAM,GAAG,SAAS,EAAE,KAAK,MAAM,KAAG,OAI/D;AAoCD;;;;iCAIiC,GACjC,OAAO,YAAI,SACT,OAAO,MAAM,GAAG,SAAS,EACzB,SAAS,SACT,kBAKC,QAAQ,MAAM,IAwFhB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Bundle } from "@yaks/graph";
|
|
2
|
+
import { type Options } from "./routes.js";
|
|
3
|
+
/** Every tracker's rows, the platform's first, a space tracker's naming its
|
|
4
|
+
* space in `$scope`; and each tracker that could not be read, and why. */ export type Everywhere = {
|
|
5
|
+
rows: Bundle[];
|
|
6
|
+
unread: string[];
|
|
7
|
+
};
|
|
8
|
+
/** What `each` reads from the platform tracker (`platform`) and from every
|
|
9
|
+
* space tracker, all at once. The platform's failure is the read's; a space
|
|
10
|
+
* tracker's, or its list's, is said in `unread` beside the rest. */ export declare let everywhere: (options: Options, each: (scope: string) => Promise<Bundle[]>, go?: typeof fetch) => Promise<Everywhere>;
|
|
11
|
+
/** A page of the bugs `query` answers in the tracker `scope` names, at most
|
|
12
|
+
* `limit`; a refusal throws. */ export declare let bugsIn: (options: Options, scope: string, query: string, limit?: number, go?: typeof fetch) => Promise<Bundle[]>;
|
|
13
|
+
//# sourceMappingURL=everywhere.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"everywhere.d.ts","sources":["../everywhere.ts"],"names":[],"mappings":"AAIA,cAAc,MAAM,2BAAgC;AAEpD,SAAS,KAAK,OAAO,sBAA2B;AAEhD;wEACwE,GACxE,YAAY;EAAe,MAAM;EAAU,QAAQ,MAAM;;AAEzD;;kEAEkE,GAClE,OAAO,YAAI,aACT,SAAS,SACT,OAAO,OAAO,MAAM,KAAK,QAAQ,WACjC,YAAW,UACV,QAAQ,YAyBV;AAED;8BAC8B,GAC9B,OAAO,YAAI,SACT,SAAS,SACT,OAAO,MAAM,EACb,OAAO,MAAM,EACb,gBACA,YAAW,UACV,QAAQ,UAWV"}
|
package/_dist/fault.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Bundle } from "@yaks/graph";
|
|
2
|
+
/**
|
|
3
|
+
* A message with its volatile parts replaced by `#`.
|
|
4
|
+
*
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { normalize } from '@yaks/tracker'
|
|
7
|
+
*
|
|
8
|
+
* normalize('T-42 failed at /srv/app.ts:10:3 after 300 tries')
|
|
9
|
+
* // '# failed at # after # tries'
|
|
10
|
+
* normalize('unknown prop: .recipy (closest declared: .recipe)')
|
|
11
|
+
* // 'unknown prop: .#'
|
|
12
|
+
* ```
|
|
13
|
+
*/ export declare let normalize: (text: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* The key one open bug is filed under: the broken entity's kind, the
|
|
16
|
+
* normalized message, and the normalized top frame of the stack. A failure
|
|
17
|
+
* Cloudflare names by its reference is the platform's, wherever our code
|
|
18
|
+
* met it, so it keys without a frame: one storage reset caught by several
|
|
19
|
+
* calls is one bug.
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { faultKey } from '@yaks/tracker'
|
|
23
|
+
*
|
|
24
|
+
* faultKey('session', 'exit 127 in S-9', 'Error\n at run (/a.ts:4:1)')
|
|
25
|
+
* // 'session:exit # in #@at run (#)'
|
|
26
|
+
* ```
|
|
27
|
+
*/ export declare let faultKey: (kind: string, message: string, stack?: string | null) => string;
|
|
28
|
+
/** Reporting and grouping use the same explicit or derived fault. */ export declare let faultOf: (row: Bundle) => string;
|
|
29
|
+
//# sourceMappingURL=fault.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fault.d.ts","sources":["../fault.ts"],"names":[],"mappings":"AAEA,cAAc,MAAM,2BAAgC;AAoBpD;;;;;;;;;;;CAWC,GACD,OAAO,YAAI,YAAa,MAAM,MAAM,KAAG,MAAM,CAyBlC;AAWX;;;;;;;;;;;;;CAaC,GACD,OAAO,YAAI,WACT,MAAM,MAAM,EACZ,SAAS,MAAM,EACf,QAAQ,MAAM,GAAG,IAAI,KACpB,MAAM,CAGR;AAED,mEAAmE,GACnE,OAAO,YAAI,UAAW,KAAK,WAAS,MAAM,CAKvC"}
|
package/_dist/file.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sources":["../file.ts"],"names":[],"mappings":"AAMA,cAAc,MAAM,uBAAsB;AAa1C,OAAO,YAAI,QAAS,KAAK,MAAM;EAC7B,SAAS,MAAM,MAAM,KAAK,QAAQ,IAAI;EACtC,QAAQ;EAuER"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Bundle } from "@yaks/graph";
|
|
2
|
+
/** When the bug last opened: its regression, else its first occurrence. */ export declare let opened: (b: Bundle) => number;
|
|
3
|
+
/** How long a resolved bug was open; undefined while it is open or when it
|
|
4
|
+
* was archived instead. */ export declare let fixtime: (b: Bundle) => number | undefined;
|
|
5
|
+
/** A duration to the two largest units that matter for a bug. */ export declare let span: (ms: number) => string;
|
|
6
|
+
/** How a set of timed things spread: how many, the median, and the worst
|
|
7
|
+
* with the thing it timed. */ export type Spread<T> = {
|
|
8
|
+
count: number;
|
|
9
|
+
median?: number;
|
|
10
|
+
worst?: {
|
|
11
|
+
ms: number;
|
|
12
|
+
of: T;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/** Median and worst over timed things, in any order. */ export declare let spread: <T>(timed: {
|
|
16
|
+
ms: number;
|
|
17
|
+
of: T;
|
|
18
|
+
}[]) => Spread<T>;
|
|
19
|
+
/** Median and worst time to fix over resolved bugs. */ export declare let fixes: (rows: Bundle[]) => Spread<Bundle>;
|
|
20
|
+
//# sourceMappingURL=fixtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtime.d.ts","sources":["../fixtime.ts"],"names":[],"mappings":"AAIA,cAAc,MAAM,2BAAsC;AAU1D,yEAAyE,GACzE,OAAO,YAAI,SAAU,GAAG,WAAS,MAAM,CAGtC;AAOD;yBACyB,GACzB,OAAO,YAAI,UAAW,GAAG,WAAS,MAAM,GAAG,SAAS,CAInD;AAMD,+DAA+D,GAC/D,OAAO,YAAI,OAAQ,IAAI,MAAM,KAAG,MAAM,CAUrC;AAED;4BAC4B,GAC5B,YAAY,OAAO;EACjB,OAAO,MAAM;EACb,SAAS,MAAM;EACf;IAAU,IAAI,MAAM;IAAE,IAAI;;;AAO5B,sDAAsD,GACtD,OAAO,YAAI,SAAU,GAAG;EAAS,IAAI,MAAM;EAAE,IAAI;QAAQ,OAAO,GAS/D;AAQD,qDAAqD,GACrD,OAAO,YAAI,QAAS,MAAM,aAAW,OAAO,QAIvC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Bundle } from "@yaks/graph";
|
|
2
|
+
import { type Frame } from "./model.js";
|
|
3
|
+
export declare let stackFrames: (stack: string) => Frame[];
|
|
4
|
+
export type Resolve = (frames: Frame[], commit: string) => Promise<Frame[]>;
|
|
5
|
+
export declare let enrichFrames: (resolve?: Resolve) => any;
|
|
6
|
+
//# sourceMappingURL=frames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frames.d.ts","sources":["../frames.ts"],"names":[],"mappings":"AAGA,cAAc,MAAM,2BAAgC;AACpD,SAAe,KAAK,KAAK,qBAAyB;AA0BlD,OAAO,YAAI,cAAe,OAAO,MAAM,KAAG,QAIxB;AAElB,YAAY,WAAW,QAAQ,SAAS,QAAQ,MAAM,KAAK,QAAQ;AACnE,OAAO,YAAI,eACR,UAAU,gBA8BV"}
|
package/_dist/graph.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sources":["../graph.ts"],"names":[],"mappings":"AAGA,cAAc,MAAM,2BAAgC;AAGpD,0EAA0E,GAC1E,OAAO,YAAI,eAAc,SAA2B"}
|
package/_dist/group.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Bundle } from "@yaks/graph";
|
|
2
|
+
import { type Desk } from "./model.js";
|
|
3
|
+
export type Enrich = (row: Bundle) => Bundle | Promise<Bundle>;
|
|
4
|
+
export declare let bugEid: (app: string, fault: string) => string;
|
|
5
|
+
export declare let release: (row: Bundle) => string;
|
|
6
|
+
/** A measured interval can reopen a bug when it starts at or after the fix
|
|
7
|
+
* went live. Other occurrences must follow resolution and name a release the
|
|
8
|
+
* group has not seen by then, if they name one. */ export declare let regresses: (row: Bundle, bug: Bundle, before: Bundle[]) => boolean;
|
|
9
|
+
export declare let grouped: (row: Bundle, bug: Bundle | undefined, before: Bundle[]) => Bundle[];
|
|
10
|
+
/** How many occurrences a bug keeps, besides the first of each release. */ export declare let RETAIN: number;
|
|
11
|
+
/** Existing groups can have migrated eids. New groups have deterministic ids;
|
|
12
|
+
* guarded counters serialize competing workers without process-local locks.
|
|
13
|
+
* Contention rebases here, without spending the effect's failure attempts.
|
|
14
|
+
* A warning joins none. Answers the bug the occurrence joined, if this call grouped it. */ export declare let group: (g: Desk, eid: string, enrich?: Enrich) => Promise<string | undefined>;
|
|
15
|
+
/** Newest hundred, plus the first occurrence of each release and the newest
|
|
16
|
+
* of each owner whose stopped work it names (`rerunOf`), which its bug's
|
|
17
|
+
* resolution hands back (./effects.ts `settle`). */ export declare let retained: (rows: Bundle[]) => Set<string>;
|
|
18
|
+
/** Deletes the occurrences of a bug that retention no longer keeps, reading
|
|
19
|
+
* only each one's time and release, and none while the bug's hits, which
|
|
20
|
+
* count every occurrence it ever grouped, are within the newest it keeps. */ export declare let trim: (g: Desk, bug: string) => Promise<void>;
|
|
21
|
+
//# sourceMappingURL=group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.d.ts","sources":["../group.ts"],"names":[],"mappings":"AAKA,cAAc,MAAM,2BAAsC;AAkB1D,SAAe,KAAK,IAAI,qBAA4C;AAGpE,YAAY,UAAU,KAAK,WAAW,SAAS,QAAQ;AACvD,OAAO,YAAI,SAAU,KAAK,MAAM,EAAE,OAAO,MAAM,KAAG,MAAM,CACG;AAC3D,OAAO,YAAI,UAAW,KAAK,WAAS,MAAM,CAOzC;AA8CD;;iDAEiD,GACjD,OAAO,YAAI,YAAa,KAAK,QAAQ,KAAK,QAAQ,QAAQ,aAAW,OAAO,CAGX;AA4CjE,OAAO,YAAI,UACT,KAAK,QACL,KAAK,SAAS,SAAS,EACvB,QAAQ,aACP,SAwFF;AAuED,yEAAyE,GACzE,OAAO,YAAI,eAAY;AA+CvB;;;yFAGyF,GACzF,OAAO,YAAI,QACT,GAAG,MACH,KAAK,MAAM,EACX,SAAS,WACR,QAAQ,MAAM,GAAG,SAAS,EAgD5B;AAED;;kDAEkD,GAClD,OAAO,YAAI,WAAY,MAAM,aAA2B,IAAI,MAAM,EAoBjE;AAED;;2EAE2E,GAC3E,OAAO,YAAI,OACT,GAAG,MACH,KAAK,MAAM,KAEV,QAAQ,IAAI,EAqBd"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@yaks/tracker/instrument` — a class whose every call runs inside a
|
|
3
|
+
* reporting boundary: its construction, and each method of its prototype,
|
|
4
|
+
* lifecycle callbacks and RPC alike. The boundary is given, so the class's
|
|
5
|
+
* failures are reported wherever the caller's tracker reports them, and a
|
|
6
|
+
* callback installed by construction keeps the invocation it was made in.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { instrument } from '@yaks/tracker/instrument'
|
|
10
|
+
* import { assertEquals } from '@std/assert'
|
|
11
|
+
*
|
|
12
|
+
* let entered: string[] = []
|
|
13
|
+
* class Shop {
|
|
14
|
+
* sell() {
|
|
15
|
+
* return 'sold'
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* let Tracked = instrument(Shop, (_args, name, run) => {
|
|
19
|
+
* entered.push(name)
|
|
20
|
+
* return run()
|
|
21
|
+
* })
|
|
22
|
+
* assertEquals(new Tracked().sell(), 'sold')
|
|
23
|
+
* assertEquals(entered, ['Shop constructor', 'Shop sell'])
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @module
|
|
27
|
+
*/ /** The boundary a call enters: the arguments its object was constructed
|
|
28
|
+
* with (a Durable Object's state and env), its name as `<Class> <method>`,
|
|
29
|
+
* the call, and the request it was handed, if any. It answers what the call
|
|
30
|
+
* answers. */ export type Enter = <T>(args: unknown[], name: string, run: () => T, request?: Request) => T;
|
|
31
|
+
type Method = (...args: unknown[]) => unknown;
|
|
32
|
+
/** Each method an object of a class answers, its own and those it inherits,
|
|
33
|
+
* by the nearest definition: everything short of `Object`'s own. */ export declare let methods: (prototype: object) => [string, Method][];
|
|
34
|
+
/** `Original`, with its construction and each of its prototype's methods run
|
|
35
|
+
* inside `enter`. `making`, when given, is told each construction's
|
|
36
|
+
* arguments and the class's name before the object is made. */ export declare let instrument: <C>(Original: C, enter: Enter, making?: (args: unknown[], name: string) => void) => C;
|
|
37
|
+
//# sourceMappingURL=instrument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrument.d.ts","sources":["../instrument.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BC,GAED;;;YAGY,GACZ,YAAY,SAAS,GACnB,MAAM,OAAO,IACb,MAAM,MAAM,EACZ,WAAW,GACX,UAAU,YACP;KAEA,UAAU,GAAG,MAAM,OAAO,OAAO,OAAO;AAE7C;kEACkE,GAClE,OAAO,YAAI,UAAW,WAAW,MAAM,MAAI,MAAM,EAAE,UAclD;AAED;;6DAE6D,GAC7D,OAAO,YAAI,aAAc,GACvB,UAAU,GACV,OAAO,OACP,UAAU,MAAM,OAAO,IAAI,MAAM,MAAM,KAAK,IAAI,KAC/C,EA0BF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Bundle, Graph } from "@yaks/graph";
|
|
2
|
+
export type Record = {
|
|
3
|
+
rows: Bundle[];
|
|
4
|
+
ack: () => void | Promise<void>;
|
|
5
|
+
/** A durable local receipt, retained until remote delivery is acknowledged. */ admitted?: boolean;
|
|
6
|
+
admit?: () => void | Promise<void>;
|
|
7
|
+
/** Sets the record aside, kept but no longer offered, once the graph
|
|
8
|
+
* refuses it for good: retrying a refusal can never succeed. */ refuse?: () => void | Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export type Source = () => AsyncIterable<Record>;
|
|
11
|
+
export declare let ingest: (g: Graph, rows: Bundle[]) => Promise<void>;
|
|
12
|
+
/** Passes over a source, each failure contained to its own record, then throws
|
|
13
|
+
* what failed. A record the graph refuses is set aside (`refuse`); one that
|
|
14
|
+
* failed otherwise (a locked database) stays and is offered again next pass.
|
|
15
|
+
* Nothing behind a failing record waits for it. */ export declare let each: (source: Source, stop: AbortSignal | undefined, work: (record: Record) => Promise<void>) => Promise<void>;
|
|
16
|
+
/** Every complete record, admitted then acknowledged. A `stop` that aborts
|
|
17
|
+
* ends it between records: the one in hand is committed and acknowledged, and
|
|
18
|
+
* the rest stay in the source for the next intake. */ export declare let intake: (g: Graph, source: Source, stop?: AbortSignal) => Promise<void>;
|
|
19
|
+
export { reserveTrace, TRACE_CEILING, TRACE_MAX_BUNDLES, TRACE_RESERVATION_WRITES, TRACE_ROW_BOUND, traceBatch, traceBudget } from "./trace-intake.js";
|
|
20
|
+
export type { TraceBatch, TraceBudget, TraceReservation } from "./trace-intake.js";
|
|
21
|
+
//# sourceMappingURL=intake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intake.d.ts","sources":["../intake.ts"],"names":[],"mappings":"AAGA,cAAc,MAAM,EAAE,KAAK,2BAAgC;AAG3D,YAAY;EACV,MAAM;EACN,WAAW,IAAI,GAAG,QAAQ,IAAI;EAC9B,6EAA6E,GAC7E,WAAW,OAAO;EAClB,cAAc,IAAI,GAAG,QAAQ,IAAI;EACjC;gEAC8D,GAC9D,eAAe,IAAI,GAAG,QAAQ,IAAI;;AAEpC,YAAY,eAAe,cAAc;AAEzC,OAAO,YAAI,SACT,GAAG,OACH,MAAM,aACL,QAAQ,IAAI,EAWd;AAED;;;iDAGiD,GACjD,OAAO,YAAI,OACT,QAAQ,QACR,MAAM,cAAc,SAAS,EAC7B,OAAO,QAAQ,WAAW,QAAQ,IAAI,MACrC,QAAQ,IAAI,EAad;AAED;;oDAEoD,GACpD,OAAO,YAAI,SACT,GAAG,OACH,QAAQ,QACR,OAAO,gBACN,QAAQ,IAAI,EAIX;AAEJ,SACE,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,UAAU,EACV,WAAW,4BACa;AAC1B,cACE,UAAU,EACV,WAAW,EACX,gBAAgB,4BACQ"}
|
package/_dist/merge.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Bundle } from "@yaks/graph";
|
|
2
|
+
import { type Desk } from "./model.js";
|
|
3
|
+
/** Follow a consolidated identity at the same boundary that reads its entity. */ export declare let survivor: (g: Pick<Desk, 'get'>, eid: string) => Promise<Bundle | undefined>;
|
|
4
|
+
/** One transaction per equivalent fault, including its occurrence receipts.
|
|
5
|
+
* Prefer an open group, so consolidation never resolves or reopens a failure.
|
|
6
|
+
* The survivor keeps its own resolution, task and correspondence. */ export declare let consolidation: (rows: Bundle[], errors: Bundle[]) => Bundle[];
|
|
7
|
+
/** Repair groups whose only difference was a bundle's content hash. */ export declare let regroup: (g: Desk) => Promise<{
|
|
8
|
+
bugs: number;
|
|
9
|
+
merged: number;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=merge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sources":["../merge.ts"],"names":[],"mappings":"AACA,cAAc,MAAM,2BAAgC;AAIpD,SAAe,KAAK,IAAI,qBAAyB;AAIjD,+EAA+E,GAC/E,OAAO,YAAI,WACT,GAAG,KAAK,MAAM,QACd,KAAK,MAAM,KACV,QAAQ,SAAS,SAAS,EAU5B;AAqBD;;mEAEmE,GACnE,OAAO,YAAI,gBAAiB,MAAM,UAAU,QAAQ,aAAW,SA8B9D;AAED,qEAAqE,GACrE,OAAO,YAAI,UACT,GAAG,SACF;EAAU,MAAM,MAAM;EAAE,QAAQ,MAAM;GAgCxC"}
|
package/_dist/mod.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { bugDoc, trackerDoc } from "./vocab.js";
|
|
2
|
+
export { faultKey, faultOf, normalize } from "./fault.js";
|
|
3
|
+
export { bugEid, type Enrich, group, grouped, regresses, release, retained, trim } from "./group.js";
|
|
4
|
+
export { type Crumb, type Frame, type Level } from "./model.js";
|
|
5
|
+
export { enrichFrames, type Resolve, stackFrames } from "./frames.js";
|
|
6
|
+
export { remoteBug, reopened } from "./reading.js";
|
|
7
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sources":["../mod.ts"],"names":[],"mappings":"AAGA,SAAS,MAAM,EAAE,UAAU,qBAAoB;AAC/C,SAAS,QAAQ,EAAE,OAAO,EAAE,SAAS,qBAAoB;AACzD,SACE,MAAM,EACN,KAAK,MAAM,EACX,KAAK,EACL,OAAO,EACP,SAAS,EACT,OAAO,EACP,QAAQ,EACR,IAAI,qBACa;AACnB,SAAS,KAAK,KAAK,EAAE,KAAK,KAAK,EAAE,KAAK,KAAK,qBAAoB;AAE/D,SAAS,YAAY,EAAE,KAAK,OAAO,EAAE,WAAW,sBAAqB;AACrE,SAAS,SAAS,EAAE,QAAQ,uBAAsB"}
|
package/_dist/model.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Graph } from "@yaks/graph";
|
|
2
|
+
/** The part of a graph the tracker's handlers read and write through: a
|
|
3
|
+
* bug's grouping, its frames and its letters. */ export type Desk = Pick<Graph, 'vocab' | 'get' | 'read' | 'apply'>;
|
|
4
|
+
export type Level = 'fatal' | 'error' | 'warning';
|
|
5
|
+
/** A mark a fixer or a resolution puts on a bug. */ export type Mark = 'taken' | 'resolved' | 'archived';
|
|
6
|
+
export type Frame = {
|
|
7
|
+
file: string;
|
|
8
|
+
line?: number;
|
|
9
|
+
column?: number;
|
|
10
|
+
function?: string;
|
|
11
|
+
app?: boolean;
|
|
12
|
+
module?: string;
|
|
13
|
+
symbol?: string;
|
|
14
|
+
};
|
|
15
|
+
export type Crumb = {
|
|
16
|
+
at: string;
|
|
17
|
+
category: string;
|
|
18
|
+
message: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sources":["../model.ts"],"names":[],"mappings":"AAEA,cAA4B,KAAK,2BAAgC;AAEjE;+CAC+C,GAC/C,YAAY,OAAO,KAAK,OAAO,UAAU,QAAQ,SAAS;AAC1D,YAAY,QAAQ,UAAU,UAAU;AACxC,kDAAkD,GAClD,YAAY,OAAO,UAAU,aAAa;AAC1C,YAAY;EACV,MAAM,MAAM;EACZ,OAAO,MAAM;EACb,SAAS,MAAM;EACf,WAAW,MAAM;EACjB,MAAM,OAAO;EACb,SAAS,MAAM;EACf,SAAS,MAAM;;AAEjB,YAAY;EAAU,IAAI,MAAM;EAAE,UAAU,MAAM;EAAE,SAAS,MAAM"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** How long the platform tracker may go unanswered before a pass reports it,
|
|
2
|
+
* in ms: five minutes, ten polls at the default pace. Each request already
|
|
3
|
+
* retries for up to a minute (./remote.ts), and what has passed on its own (a
|
|
4
|
+
* Durable Object reset, a runtime that stalls for half a minute, a bad path to
|
|
5
|
+
* one colo) was over well within it. Past it, the platform's own reports may
|
|
6
|
+
* not be landing, and nobody else is saying so. */ export declare const OUTAGE: 300_000;
|
|
7
|
+
//# sourceMappingURL=outage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outage.d.ts","sources":["../outage.ts"],"names":[],"mappings":"AAyBA;;;;;iDAKiD,GACjD,OAAO,cAAM,QAAS,QAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"people.d.ts","sources":["../people.ts"],"names":[],"mappings":"AASA,cAAc,QAAQ,2BAAgC;AA4BtD,OAAO,YAAI,UAAU,SAYpB"}
|