@rackbops/docket-types 0.14.0 → 0.16.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/README.md +13 -10
- package/dist/extract.d.ts +43 -6
- package/dist/extract.d.ts.map +1 -1
- package/dist/extract.js +150 -19
- package/dist/extract.js.map +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/intake.d.ts +9 -6
- package/dist/intake.d.ts.map +1 -1
- package/dist/intake.js +15 -7
- package/dist/intake.js.map +1 -1
- package/dist/money.d.ts +12 -1
- package/dist/money.d.ts.map +1 -1
- package/dist/money.js +22 -2
- package/dist/money.js.map +1 -1
- package/dist/price.d.ts +9 -2
- package/dist/price.d.ts.map +1 -1
- package/dist/price.js +31 -13
- package/dist/price.js.map +1 -1
- package/dist/reminder.d.ts +4 -1
- package/dist/reminder.d.ts.map +1 -1
- package/dist/reminder.js +7 -3
- package/dist/reminder.js.map +1 -1
- package/dist/renewal.d.ts +2 -1
- package/dist/renewal.d.ts.map +1 -1
- package/dist/renewal.js.map +1 -1
- package/dist/research-answer.d.ts.map +1 -1
- package/dist/research-answer.js +12 -3
- package/dist/research-answer.js.map +1 -1
- package/dist/research-sources.d.ts +15 -4
- package/dist/research-sources.d.ts.map +1 -1
- package/dist/research-sources.js +18 -4
- package/dist/research-sources.js.map +1 -1
- package/dist/research.d.ts +1 -4
- package/dist/research.d.ts.map +1 -1
- package/dist/research.js +39 -35
- package/dist/research.js.map +1 -1
- package/dist/retry.d.ts +26 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +30 -0
- package/dist/retry.js.map +1 -0
- package/dist/scout.d.ts +5 -1
- package/dist/scout.d.ts.map +1 -1
- package/dist/scout.js +13 -21
- package/dist/scout.js.map +1 -1
- package/dist/want-ebay.d.ts +3 -3
- package/dist/want-ebay.d.ts.map +1 -1
- package/dist/want-ebay.js +8 -17
- package/dist/want-ebay.js.map +1 -1
- package/dist/want-shopify.d.ts +3 -2
- package/dist/want-shopify.d.ts.map +1 -1
- package/dist/want-shopify.js +8 -20
- package/dist/want-shopify.js.map +1 -1
- package/dist/want-sources.d.ts +23 -4
- package/dist/want-sources.d.ts.map +1 -1
- package/dist/want-sources.js +38 -17
- package/dist/want-sources.js.map +1 -1
- package/dist/want-text.d.ts +19 -0
- package/dist/want-text.d.ts.map +1 -0
- package/dist/want-text.js +41 -0
- package/dist/want-text.js.map +1 -0
- package/dist/wantjudge.d.ts.map +1 -1
- package/dist/wantjudge.js +14 -28
- package/dist/wantjudge.js.map +1 -1
- package/dist/wantlist.d.ts +5 -1
- package/dist/wantlist.d.ts.map +1 -1
- package/dist/wantlist.js +28 -24
- package/dist/wantlist.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
The tracker's task types, built on `@rackbops/docket-core`'s contract. Shipped so far:
|
|
4
4
|
|
|
5
5
|
- `reminder` (Lepid-Labs/city-hall#7): notify lane, `once` or `calendar`, done and snooze replies.
|
|
6
|
-
- `renewal` (city-hall#11): a `period` schedule rolling from the renewal date, asking
|
|
7
|
-
cancel / renewed at lead time; the decision and the amount recorded per period (the current
|
|
6
|
+
- `renewal` (Lepid-Labs/city-hall#11): a `period` schedule rolling from the renewal date, asking
|
|
7
|
+
keep / cancel / renewed at lead time; the decision and the amount recorded per period (the current
|
|
8
8
|
row in the task's state, the history in the series); cancel ends the task.
|
|
9
|
-
- `price` (city-hall#11): a `poll` schedule; each run reads the page through the host's
|
|
10
|
-
port, extracts the price structurally (JSON-LD, product and Open Graph meta tags, a JSON
|
|
11
|
-
or the owner's pattern; `extractPrice`), appends it to the series and alerts once per
|
|
12
|
-
of the drop line, measured from the first, last (default) or peak price seen; done stops
|
|
9
|
+
- `price` (Lepid-Labs/city-hall#11): a `poll` schedule; each run reads the page through the host's
|
|
10
|
+
`Fetch` port, extracts the price structurally (JSON-LD, product and Open Graph meta tags, a JSON
|
|
11
|
+
body, or the owner's pattern; `extractPrice`), appends it to the series and alerts once per
|
|
12
|
+
crossing of the drop line, measured from the first, last (default) or peak price seen; done stops
|
|
13
|
+
it.
|
|
13
14
|
|
|
14
15
|
- `research` (category 5, E8): execute lane, `once`, an optional deadline. Two `claude -p` Jobs
|
|
15
16
|
go through the runner:
|
|
@@ -40,9 +41,10 @@ The tracker's task types, built on `@rackbops/docket-core`'s contract. Shipped s
|
|
|
40
41
|
|
|
41
42
|
**Gathered pages** (0.8.0): with `sources: "sent"`, both runs work from pages the person's own
|
|
42
43
|
browser gathered and the host stored, quoted into their prompts as escaped data between
|
|
43
|
-
markers: up to 10 pages, 12,000 characters each and 100,000 in all.
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
markers: up to 10 pages, 12,000 characters each and 100,000 in all. Both runs may search
|
|
45
|
+
the web but open no page at all (`GATHERED_ALLOWED_TOOLS`, `WebSearch` only, and a bare `WebFetch`
|
|
46
|
+
deny, since 0.15.0, docket#66); `SENT_DISALLOWED_TOOLS` still bars BoardGameGeek and eBay
|
|
47
|
+
besides. `researchType({ readSources })` builds the type over the host's store, read by task id at
|
|
46
48
|
each run; `research` (and `TASK_TYPES`) has none, so a `sent` request there is not run. When a
|
|
47
49
|
`sent` request runs is the host's: it moves the run to now once the pages are in. A run with no
|
|
48
50
|
usable page, or a host with no store, makes no model call and tells the owner (in the review
|
|
@@ -170,7 +172,8 @@ The tracker's task types, built on `@rackbops/docket-core`'s contract. Shipped s
|
|
|
170
172
|
a tool's parameters, so the prompt is the only control for the proxy and for eBay through
|
|
171
173
|
Firecrawl (`WEB_DISALLOWED_TOOLS` still denies eBay to WebFetch). The reviewer's eBay handling
|
|
172
174
|
and the belt read the answer's addresses, so they apply whichever tool fetched the page. A run
|
|
173
|
-
on gathered pages
|
|
175
|
+
on gathered pages gets `GATHERED_ALLOWED_TOOLS` (`WebSearch` only, docket#66) and denies
|
|
176
|
+
`WebFetch` outright (`GATHERED_DENIED_TOOLS`) besides `SENT_DISALLOWED_TOOLS`. These Jobs need
|
|
174
177
|
runner 0.0.6 or later, whose ceiling admits the two names and which drops them when it has no
|
|
175
178
|
Firecrawl key; an older runner fails them (0.0.5 throws `ToolCeilingError`), so the runner is
|
|
176
179
|
released first.
|
package/dist/extract.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Price extraction from a fetched page, structured sources first (city-hall#11): JSON-LD
|
|
2
|
+
* Price extraction from a fetched page, structured sources first (Lepid-Labs/city-hall#11): JSON-LD
|
|
3
3
|
* `Product` / `Offer` blocks, then the product and Open Graph price meta tags, then any JSON
|
|
4
4
|
* body, then a pattern the owner supplied. Pure string work on plain text, no DOM, no model;
|
|
5
5
|
* the model fallback the plan budgets for (section 6) is a later type, not this one.
|
|
@@ -9,18 +9,55 @@ export interface ExtractedPrice {
|
|
|
9
9
|
currency?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Reads a number out of a price string: "$1,299.99", "1.299,99 EUR", "49,90", "USD 20"
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* Reads a number out of a price string: "$1,299.99", "1.299,99 EUR", "49,90", "USD 20",
|
|
13
|
+
* "1 299". The number ends at the first character that cannot continue it; a space continues it
|
|
14
|
+
* only when exactly three digits follow (a thousands group), so "$12.99 2 left" is 12.99 and
|
|
15
|
+
* "$20 50% off" is 20 (docket#39); and only before the first `.` or `,`. The last separator is the decimal mark when one, two, or four
|
|
16
|
+
* or more digits follow it, or when three follow a whole part of 0 ("0.995"); three digits after
|
|
17
|
+
* any other whole part are a thousands group, so "12.345" and "29.990" read as 12345 and 29990
|
|
18
|
+
* (free text cannot tell those from a decimal). A JSON-LD or JSON price string goes through
|
|
19
|
+
* `asPrice`, which reads a plain `.` decimal as one; meta tags, BGG's values and inbox prices come
|
|
20
|
+
* here and keep the thousands reading.
|
|
21
|
+
* Null when there is no digit.
|
|
15
22
|
*/
|
|
16
23
|
export declare function parsePrice(text: string): number | null;
|
|
17
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* The first price found walking a JSON value. At each level: the record's own `price` or
|
|
26
|
+
* `lowPrice` (with its `priceCurrency` or `currency`), then its `priceSpecification`, then its
|
|
27
|
+
* `offers`, then every other child in order (docket#56 pinned this order and this comment).
|
|
28
|
+
*/
|
|
18
29
|
export declare function priceFromJson(value: unknown, depth?: number): ExtractedPrice | null;
|
|
19
30
|
/** JSON-LD blocks in a page, parsed; broken blocks are skipped. */
|
|
20
31
|
export declare function jsonLdBlocks(html: string): unknown[];
|
|
21
32
|
/** The price from the page's meta tags, when a product or Open Graph price is declared. */
|
|
22
33
|
export declare function priceFromMeta(html: string): ExtractedPrice | null;
|
|
23
|
-
/** The
|
|
34
|
+
/** The longest owner pattern taken. */
|
|
35
|
+
export declare const MAX_PATTERN_CHARS = 300;
|
|
36
|
+
/**
|
|
37
|
+
* How much of a body an owner's pattern runs over. The price type runs on the notify lane, which
|
|
38
|
+
* never waits (plan 5.3), and a pattern runs on the event loop. `patternProblem` refuses the
|
|
39
|
+
* exponential shapes; the cap only limits the rest. It does not bound a polynomial one: an
|
|
40
|
+
* unanchored `.*\$(\d+)` over a one-line body with no `$` grows with the square of the length
|
|
41
|
+
* (about 6 s at 80,000 characters in review). A host that needs a hard bound runs the pattern
|
|
42
|
+
* off the loop, with a timeout.
|
|
43
|
+
*/
|
|
44
|
+
export declare const MAX_PATTERN_BODY_CHARS = 500000;
|
|
45
|
+
/**
|
|
46
|
+
* Why the owner's pattern is refused, or null when it is taken: it must parse, stay under
|
|
47
|
+
* `MAX_PATTERN_CHARS`, and repeat no group that could match one stretch of text in many ways
|
|
48
|
+
* (docket#45) -- a group that itself repeats (`(a+)+`, `(x*)*`) or holds an alternation whose
|
|
49
|
+
* branches overlap (`(a|a)*`, `(\s| )*`, `(.|\s)*`), the shapes that backtrack catastrophically
|
|
50
|
+
* on about thirty characters. A heuristic, not a proof: it reads the pattern's text, skipping
|
|
51
|
+
* escapes and character classes, so it also refuses safe shapes whose parts cannot overlap
|
|
52
|
+
* (`(?:\d+,)*\d+`, `(?:\s| )*`); the first is better said as a character class
|
|
53
|
+
* (`[\d,]+`). A host checks it when a pattern is saved; `priceFromPattern` refuses such a
|
|
54
|
+
* pattern too, and the price type never fetches with one.
|
|
55
|
+
*/
|
|
56
|
+
export declare function patternProblem(pattern: string): string | null;
|
|
57
|
+
/**
|
|
58
|
+
* The first capture group of the owner's pattern, read as a price, over at most
|
|
59
|
+
* `MAX_PATTERN_BODY_CHARS` of the body. A pattern `patternProblem` refuses reads nothing.
|
|
60
|
+
*/
|
|
24
61
|
export declare function priceFromPattern(body: string, pattern: string): ExtractedPrice | null;
|
|
25
62
|
/**
|
|
26
63
|
* The price a fetched body carries: the owner's pattern when given, else JSON-LD, else meta
|
package/dist/extract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED
|
|
1
|
+
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAyBtD;AAgCD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,cAAc,GAAG,IAAI,CAgC9E;AAMD,mEAAmE;AACnE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE,CAUpD;AAgBD,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAYjE;AAED,uCAAuC;AACvC,eAAO,MAAM,iBAAiB,MAAM,CAAA;AACpC;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,SAAU,CAAA;AAE7C;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAa7D;AAiED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAQrF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAiBlF"}
|
package/dist/extract.js
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Price extraction from a fetched page, structured sources first (city-hall#11): JSON-LD
|
|
2
|
+
* Price extraction from a fetched page, structured sources first (Lepid-Labs/city-hall#11): JSON-LD
|
|
3
3
|
* `Product` / `Offer` blocks, then the product and Open Graph price meta tags, then any JSON
|
|
4
4
|
* body, then a pattern the owner supplied. Pure string work on plain text, no DOM, no model;
|
|
5
5
|
* the model fallback the plan budgets for (section 6) is a later type, not this one.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
|
-
* Reads a number out of a price string: "$1,299.99", "1.299,99 EUR", "49,90", "USD 20"
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Reads a number out of a price string: "$1,299.99", "1.299,99 EUR", "49,90", "USD 20",
|
|
9
|
+
* "1 299". The number ends at the first character that cannot continue it; a space continues it
|
|
10
|
+
* only when exactly three digits follow (a thousands group), so "$12.99 2 left" is 12.99 and
|
|
11
|
+
* "$20 50% off" is 20 (docket#39); and only before the first `.` or `,`. The last separator is the decimal mark when one, two, or four
|
|
12
|
+
* or more digits follow it, or when three follow a whole part of 0 ("0.995"); three digits after
|
|
13
|
+
* any other whole part are a thousands group, so "12.345" and "29.990" read as 12345 and 29990
|
|
14
|
+
* (free text cannot tell those from a decimal). A JSON-LD or JSON price string goes through
|
|
15
|
+
* `asPrice`, which reads a plain `.` decimal as one; meta tags, BGG's values and inbox prices come
|
|
16
|
+
* here and keep the thousands reading.
|
|
17
|
+
* Null when there is no digit.
|
|
11
18
|
*/
|
|
12
19
|
export function parsePrice(text) {
|
|
13
|
-
|
|
20
|
+
// Spaces join thousands groups only before the first separator, so "$12.99 100 in stock" is
|
|
21
|
+
// 12.99 and "1 299,50" is 1299.5.
|
|
22
|
+
const m = /-?\d(?:\d|\s(?=\d{3}(?!\d)))*(?:[.,][\d.,]*)?/.exec(text.replace(/\u00a0/g, " "));
|
|
14
23
|
if (!m)
|
|
15
24
|
return null;
|
|
16
|
-
let digits = m[0].replace(/\s+/g, "");
|
|
25
|
+
let digits = m[0].replace(/\s+/g, "").replace(/[.,]+$/, "");
|
|
17
26
|
const negative = digits.startsWith("-");
|
|
18
27
|
if (negative)
|
|
19
28
|
digits = digits.slice(1);
|
|
20
|
-
const decimal = /[.,](\d{1,2})$/.exec(digits);
|
|
21
29
|
let whole = digits;
|
|
22
30
|
let fraction = "";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
const last = /[.,](\d+)$/.exec(digits);
|
|
32
|
+
if (last) {
|
|
33
|
+
const tail = last[1] ?? "";
|
|
34
|
+
const before = digits.slice(0, last.index).replace(/[.,]/g, "");
|
|
35
|
+
const isDecimal = tail.length !== 3 || /^0*$/.test(before);
|
|
36
|
+
if (isDecimal) {
|
|
37
|
+
whole = digits.slice(0, last.index);
|
|
38
|
+
fraction = tail;
|
|
39
|
+
}
|
|
26
40
|
}
|
|
27
41
|
whole = whole.replace(/[.,]/g, "");
|
|
28
42
|
if (whole === "" && fraction === "")
|
|
@@ -32,6 +46,8 @@ export function parsePrice(text) {
|
|
|
32
46
|
return null;
|
|
33
47
|
return negative ? -value : value;
|
|
34
48
|
}
|
|
49
|
+
/** A plain machine decimal, as schema.org and JSON bodies write a price: "29.990", "-5". */
|
|
50
|
+
const MACHINE_DECIMAL = /^\s*-?\d+(\.\d+)?\s*$/;
|
|
35
51
|
const CURRENCY = /^[A-Z]{3}$/;
|
|
36
52
|
function asCurrency(value) {
|
|
37
53
|
return typeof value === "string" && CURRENCY.test(value.trim().toUpperCase())
|
|
@@ -41,14 +57,24 @@ function asCurrency(value) {
|
|
|
41
57
|
function asPrice(value) {
|
|
42
58
|
if (typeof value === "number")
|
|
43
59
|
return Number.isFinite(value) ? value : null;
|
|
44
|
-
if (typeof value === "string")
|
|
60
|
+
if (typeof value === "string") {
|
|
61
|
+
// A structured price is written with a `.` decimal, so read it as one (docket#39).
|
|
62
|
+
if (MACHINE_DECIMAL.test(value)) {
|
|
63
|
+
const n = Number(value);
|
|
64
|
+
return Number.isFinite(n) ? n : null;
|
|
65
|
+
}
|
|
45
66
|
return parsePrice(value);
|
|
67
|
+
}
|
|
46
68
|
return null;
|
|
47
69
|
}
|
|
48
70
|
function isRecord(value) {
|
|
49
71
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
50
72
|
}
|
|
51
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* The first price found walking a JSON value. At each level: the record's own `price` or
|
|
75
|
+
* `lowPrice` (with its `priceCurrency` or `currency`), then its `priceSpecification`, then its
|
|
76
|
+
* `offers`, then every other child in order (docket#56 pinned this order and this comment).
|
|
77
|
+
*/
|
|
52
78
|
export function priceFromJson(value, depth = 0) {
|
|
53
79
|
if (depth > 12)
|
|
54
80
|
return null;
|
|
@@ -89,7 +115,8 @@ export function priceFromJson(value, depth = 0) {
|
|
|
89
115
|
}
|
|
90
116
|
return null;
|
|
91
117
|
}
|
|
92
|
-
|
|
118
|
+
// The type may be unquoted (`type=application/ld+json`), as minified pages write it (docket#56).
|
|
119
|
+
const JSON_LD = /<script[^>]*type\s*=\s*(?:["']application\/ld\+json["']|application\/ld\+json(?=[\s>]))[^>]*>([\s\S]*?)<\/script>/gi;
|
|
93
120
|
/** JSON-LD blocks in a page, parsed; broken blocks are skipped. */
|
|
94
121
|
export function jsonLdBlocks(html) {
|
|
95
122
|
const blocks = [];
|
|
@@ -129,16 +156,120 @@ export function priceFromMeta(html) {
|
|
|
129
156
|
}
|
|
130
157
|
return null;
|
|
131
158
|
}
|
|
132
|
-
/** The
|
|
133
|
-
export
|
|
134
|
-
|
|
159
|
+
/** The longest owner pattern taken. */
|
|
160
|
+
export const MAX_PATTERN_CHARS = 300;
|
|
161
|
+
/**
|
|
162
|
+
* How much of a body an owner's pattern runs over. The price type runs on the notify lane, which
|
|
163
|
+
* never waits (plan 5.3), and a pattern runs on the event loop. `patternProblem` refuses the
|
|
164
|
+
* exponential shapes; the cap only limits the rest. It does not bound a polynomial one: an
|
|
165
|
+
* unanchored `.*\$(\d+)` over a one-line body with no `$` grows with the square of the length
|
|
166
|
+
* (about 6 s at 80,000 characters in review). A host that needs a hard bound runs the pattern
|
|
167
|
+
* off the loop, with a timeout.
|
|
168
|
+
*/
|
|
169
|
+
export const MAX_PATTERN_BODY_CHARS = 500_000;
|
|
170
|
+
/**
|
|
171
|
+
* Why the owner's pattern is refused, or null when it is taken: it must parse, stay under
|
|
172
|
+
* `MAX_PATTERN_CHARS`, and repeat no group that could match one stretch of text in many ways
|
|
173
|
+
* (docket#45) -- a group that itself repeats (`(a+)+`, `(x*)*`) or holds an alternation whose
|
|
174
|
+
* branches overlap (`(a|a)*`, `(\s| )*`, `(.|\s)*`), the shapes that backtrack catastrophically
|
|
175
|
+
* on about thirty characters. A heuristic, not a proof: it reads the pattern's text, skipping
|
|
176
|
+
* escapes and character classes, so it also refuses safe shapes whose parts cannot overlap
|
|
177
|
+
* (`(?:\d+,)*\d+`, `(?:\s| )*`); the first is better said as a character class
|
|
178
|
+
* (`[\d,]+`). A host checks it when a pattern is saved; `priceFromPattern` refuses such a
|
|
179
|
+
* pattern too, and the price type never fetches with one.
|
|
180
|
+
*/
|
|
181
|
+
export function patternProblem(pattern) {
|
|
182
|
+
if (pattern.length > MAX_PATTERN_CHARS) {
|
|
183
|
+
return `the pattern is longer than ${MAX_PATTERN_CHARS} characters`;
|
|
184
|
+
}
|
|
135
185
|
try {
|
|
136
|
-
|
|
186
|
+
new RegExp(pattern, "i");
|
|
137
187
|
}
|
|
138
188
|
catch {
|
|
139
|
-
return
|
|
189
|
+
return "the pattern is not a valid regular expression";
|
|
140
190
|
}
|
|
141
|
-
|
|
191
|
+
return repeatsAnAmbiguousGroup(pattern)
|
|
192
|
+
? "the pattern repeats a group that itself repeats or has a |, like (a+)+ or (a|b)*, " +
|
|
193
|
+
"which can stall the tracker; use a character class, like [\\d,]+"
|
|
194
|
+
: null;
|
|
195
|
+
}
|
|
196
|
+
/** An unbounded quantifier at `i` in `p`: `*`, `+` or `{n,}`. */
|
|
197
|
+
function unboundedAt(p, i) {
|
|
198
|
+
const c = p[i];
|
|
199
|
+
return c === "*" || c === "+" || /^\{\d+,\}/.test(p.slice(i));
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* A repeating quantifier at `i`: unbounded, or `{n}` / `{n,m}` above 1. (`{,3}` is no quantifier
|
|
203
|
+
* in a pattern without the `u` flag: it matches itself.)
|
|
204
|
+
*/
|
|
205
|
+
function repeatsAt(p, i) {
|
|
206
|
+
if (unboundedAt(p, i))
|
|
207
|
+
return true;
|
|
208
|
+
const m = /^\{(\d+)(?:,(\d+))?\}/.exec(p.slice(i));
|
|
209
|
+
return m !== null && Number(m[2] ?? m[1]) > 1;
|
|
210
|
+
}
|
|
211
|
+
function repeatsAnAmbiguousGroup(p) {
|
|
212
|
+
// One entry per open group: whether anything inside it repeats without bound, and whether it
|
|
213
|
+
// holds an alternation (its own `|`, or one in an unrepeated group inside it).
|
|
214
|
+
const open = [];
|
|
215
|
+
const top = () => open[open.length - 1];
|
|
216
|
+
let inside = false;
|
|
217
|
+
for (let i = 0; i < p.length; i++) {
|
|
218
|
+
const c = p[i];
|
|
219
|
+
if (c === "\\") {
|
|
220
|
+
i++;
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (inside) {
|
|
224
|
+
if (c === "]")
|
|
225
|
+
inside = false;
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
if (c === "[") {
|
|
229
|
+
inside = true;
|
|
230
|
+
if (p[i + 1] === "]")
|
|
231
|
+
i++;
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
if (c === "(") {
|
|
235
|
+
open.push({ repeats: false, alt: false });
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
238
|
+
if (c === "|") {
|
|
239
|
+
const g = top();
|
|
240
|
+
if (g)
|
|
241
|
+
g.alt = true;
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
if (c === ")") {
|
|
245
|
+
const g = open.pop() ?? { repeats: false, alt: false };
|
|
246
|
+
const repeated = repeatsAt(p, i + 1);
|
|
247
|
+
if (repeated && (g.repeats || g.alt))
|
|
248
|
+
return true;
|
|
249
|
+
const parent = top();
|
|
250
|
+
if (parent) {
|
|
251
|
+
if (g.repeats || unboundedAt(p, i + 1))
|
|
252
|
+
parent.repeats = true;
|
|
253
|
+
if (g.alt && !repeated)
|
|
254
|
+
parent.alt = true;
|
|
255
|
+
}
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
const g = top();
|
|
259
|
+
if (g && unboundedAt(p, i))
|
|
260
|
+
g.repeats = true;
|
|
261
|
+
}
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* The first capture group of the owner's pattern, read as a price, over at most
|
|
266
|
+
* `MAX_PATTERN_BODY_CHARS` of the body. A pattern `patternProblem` refuses reads nothing.
|
|
267
|
+
*/
|
|
268
|
+
export function priceFromPattern(body, pattern) {
|
|
269
|
+
if (patternProblem(pattern) !== null)
|
|
270
|
+
return null;
|
|
271
|
+
const re = new RegExp(pattern, "i");
|
|
272
|
+
const m = re.exec(body.slice(0, MAX_PATTERN_BODY_CHARS));
|
|
142
273
|
const captured = m?.[1] ?? m?.[0];
|
|
143
274
|
if (captured === undefined)
|
|
144
275
|
return null;
|
package/dist/extract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH
|
|
1
|
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,4FAA4F;IAC5F,kCAAkC;IAClC,MAAM,CAAC,GAAG,+CAA+C,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAA;IAC5F,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IACnB,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IAC3D,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACvC,IAAI,QAAQ;QAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACtC,IAAI,KAAK,GAAG,MAAM,CAAA;IAClB,IAAI,QAAQ,GAAG,EAAE,CAAA;IACjB,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACtC,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EA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AG,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IACjC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,IAAI,CAAA;IACvC,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IAClC,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAA;AAC1C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,OAAgB;IACzD,IAAI,OAAO;QAAE,OAAO,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACnD,KAAK,MAAM,KAAK,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;QAClC,IAAI,KAAK;YAAE,OAAO,KAAK,CAAA;IACzB,CAAC;IACD,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAA;IAChC,IAAI,IAAI;QAAE,OAAO,IAAI,CAAA;IACrB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;IAC3B,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACvD,IAAI,CAAC;YACH,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;QAC3C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAA;QACb,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,28 +3,30 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The six categories of the plan (section 1.2) as type identifiers, and the types shipped so far:
|
|
5
5
|
* `reminder` with the reminder slice (Lepid-Labs/city-hall#7), `renewal` and `price` with the
|
|
6
|
-
* renewal and price-tracker slice (city-hall#11), and `research` (category 5, E8), the
|
|
7
|
-
* execute-lane type: a research run and a reviewer run through the runner. `scout` (category
|
|
8
|
-
* `wantlist` and the judged `wantjudge` (category 2) came from the tracker plugin in 0.6.0 (E9,
|
|
6
|
+
* renewal and price-tracker slice (Lepid-Labs/city-hall#11), and `research` (category 5, E8), the
|
|
7
|
+
* first execute-lane type: a research run and a reviewer run through the runner. `scout` (category
|
|
8
|
+
* 1), `wantlist` and the judged `wantjudge` (category 2) came from the tracker plugin in 0.6.0 (E9,
|
|
9
9
|
* plan item 104).
|
|
10
10
|
*/
|
|
11
11
|
import type { TaskType } from "@rackbops/docket-core";
|
|
12
12
|
export type { Lane } from "@rackbops/docket-core";
|
|
13
|
-
export { type ExtractedPrice, extractPrice, jsonLdBlocks, parsePrice, priceFromJson, priceFromMeta, priceFromPattern, } from "./extract.js";
|
|
14
|
-
export { checkDraft, INTAKE_MAX_BUDGET_USD, INTAKE_MAX_TURNS, INTAKE_SCHEMA, INTAKE_STATES, INTAKE_TIMEOUT_MS, type IntakeAnswer, type IntakeContext, type IntakeDraft, type IntakeField, type IntakeLine, type IntakeRead, type IntakeState, type IntakeTask, type IntakeType, type IntakeValue, intakeJob, MAX_LINE_CHARS, MAX_REPLY_CHARS, MAX_TRANSCRIPT_CHARS, readIntake, transcriptLines, } from "./intake.js";
|
|
15
|
-
export { money } from "./money.js";
|
|
13
|
+
export { type ExtractedPrice, extractPrice, jsonLdBlocks, MAX_PATTERN_BODY_CHARS, MAX_PATTERN_CHARS, parsePrice, patternProblem, priceFromJson, priceFromMeta, priceFromPattern, } from "./extract.js";
|
|
14
|
+
export { checkDraft, INTAKE_ALLOWED_TOOLS, INTAKE_MAX_BUDGET_USD, INTAKE_MAX_TURNS, INTAKE_SCHEMA, INTAKE_STATES, INTAKE_TIMEOUT_MS, type IntakeAnswer, type IntakeContext, type IntakeDraft, type IntakeField, type IntakeLine, type IntakeRead, type IntakeState, type IntakeTask, type IntakeType, type IntakeValue, intakeJob, MAX_LINE_CHARS, MAX_REPLY_CHARS, MAX_TRANSCRIPT_CHARS, readIntake, transcriptLines, } from "./intake.js";
|
|
15
|
+
export { currencyCode, money } from "./money.js";
|
|
16
16
|
export { BASELINE_RULES, type BaselineRule, DEFAULT_BASELINE, DEFAULT_DROP_PERCENT, MISSES_BEFORE_TELLING, type PriceConfig, type PriceState, price, reference, } from "./price.js";
|
|
17
17
|
export { DEFAULT_SNOOZE_MS, type ReminderConfig, reminder, snoozeUntil } from "./reminder.js";
|
|
18
18
|
export { decisionOf, isRenewalDecision, RENEWAL_DECISIONS, type RenewalConfig, type RenewalDecision, type RenewalState, renewal, } from "./renewal.js";
|
|
19
19
|
export { AUTH_RETRY_MS, deadlineOf, draftJson, MAX_CONTEXT_CHARS, MAX_QUESTION_CHARS, MAX_TRIES, MIN_SOURCES_WAIT_MS, RESEARCH_MAX_BUDGET_USD, RESEARCH_MAX_TURNS, RESEARCH_TIMEOUT_MS, REVIEW_MAX_BUDGET_USD, REVIEW_MAX_TURNS, REVIEW_TIMEOUT_MS, type ResearchConfig, type ResearchJobOptions, type ResearchOptions, type ResearchPhase, type ResearchState, research, researchJob, researchState, researchType, reviewJob, usesSentSources, } from "./research.js";
|
|
20
20
|
export { ANSWER_SCHEMA, type BlockedPage, clean, fitMessage, MAX_BLOCKED, MAX_MESSAGE_CHARS, parseAnswer, parseBlocked, parseReview, REVIEW_SCHEMA, type ResearchAnswer, type ResearchFinding, type Review, renderAnswer, renderUpdate, safeUrl, VERDICTS, type Verdict, ZWSP, } from "./research-answer.js";
|
|
21
|
-
export { BARRED_SITES, blockedKey, type GatheredPage, gatheredPages, MAX_GATHERED_CHARS, MAX_GATHERED_PAGES, MAX_PAGE_CHARS, MAX_PAGE_TITLE_CHARS, MIN_PAGE_CHARS, NOT_OPENED_WHY, pagesBlock, pagesJson, type ReadSources, SENT_DISALLOWED_TOOLS, SOURCES_DEADLINE_MARGIN_MINUTES, SOURCES_DEADLINE_MARGIN_MS, SOURCES_WAIT_DAYS, SOURCES_WAIT_MS, sourcesExpiry, uniqueBlocked, WEB_DISALLOWED_TOOLS, withBarredSites, } from "./research-sources.js";
|
|
21
|
+
export { BARRED_SITES, blockedKey, GATHERED_ALLOWED_TOOLS, GATHERED_DENIED_TOOLS, type GatheredPage, gatheredPages, MAX_GATHERED_CHARS, MAX_GATHERED_PAGES, MAX_PAGE_CHARS, MAX_PAGE_TITLE_CHARS, MIN_PAGE_CHARS, NOT_OPENED_WHY, pagesBlock, pagesJson, type ReadSources, SENT_DISALLOWED_TOOLS, SOURCES_DEADLINE_MARGIN_MINUTES, SOURCES_DEADLINE_MARGIN_MS, SOURCES_WAIT_DAYS, SOURCES_WAIT_MS, sourcesExpiry, uniqueBlocked, WEB_DISALLOWED_TOOLS, withBarredSites, } from "./research-sources.js";
|
|
22
22
|
export { BGG_CATEGORIES, bggCategoryUrl, FIRECRAWL_TOOLS, WEB_ALLOWED_TOOLS, } from "./research-web.js";
|
|
23
|
+
export { RETRIED, type Retry, retryOutcome } from "./retry.js";
|
|
23
24
|
export { itemKey, LENS_TEXT, LENSES, type Lens, lensOf, MAX_FOR_CHARS, MAX_INTEREST_CHARS, MAX_INTERESTS, MAX_ITEMS, MAX_SCOUT_NOTES, MAX_SHOWN, MIN_ITEMS, PROMPT_SHOWN, parseScout, renderScout, SCOUT_MAX_BUDGET_USD, SCOUT_MAX_TURNS, SCOUT_SCHEMA, SCOUT_TIMEOUT_MS, type ScoutConfig, type ScoutItem, type ScoutState, type ShownItem, scout, scoutJob, scoutState, } from "./scout.js";
|
|
24
25
|
export { BGG_ATTRIBUTION, BGG_HOST, BGG_SPACING_MS, type BggOptions, bggSource, bggThingUrl, MAX_SCANNED, parseBggThingId, parseMarketplace, } from "./want-bgg.js";
|
|
25
26
|
export { EBAY_ATTRIBUTION, EBAY_CURRENCY, EBAY_LIMIT, EBAY_MARKETPLACE, EBAY_SEARCH_PATH, type EbayBrowse, type EbayRequest, type EbaySearch, ebayRequest, ebaySource, parseEbayAnswer, } from "./want-ebay.js";
|
|
26
27
|
export { matchesWords, minorUnits, parseShopifyAnswer, SHOPIFY_ATTRIBUTION, SHOPIFY_CAPABILITY, SHOPIFY_COUNTRY, SHOPIFY_CREDITS, SHOPIFY_CURRENCY, SHOPIFY_LIMIT, SHOPIFY_PROVIDER, type ShopifyRequest, type ShopifyScrape, type ShopifySearch, searchWords, shopifyQuery, shopifyRequest, shopifySource, } from "./want-shopify.js";
|
|
27
|
-
export { inboxSource, isEbayHost, type Listing, listingKey,
|
|
28
|
+
export { inboxSource, isEbayHost, type Listing, listingKey, MAX_LISTINGS, NEVER_EBAY, pageSource, type ReadInbox, readListings, type SearchLimits, SOURCE_IDS, type Source, type SourceId, SourceMiss, SourceUnavailableError, type Submitted, submittedListing, } from "./want-sources.js";
|
|
29
|
+
export { SOURCE_TEXT, type SourceText, sourceText } from "./want-text.js";
|
|
28
30
|
export { FITS, type Fit, JUDGE_MAX_BUDGET_USD, JUDGE_MAX_TURNS, JUDGE_SCHEMA, JUDGE_TIMEOUT_MS, type JudgeOptions, type JudgeState, type JudgeVerdict, judgeHosts, judgeJob, judgeState, parseVerdicts, RETRY_GRACE_MS, renderJudged, renderUnchecked, wantjudgeType, } from "./wantjudge.js";
|
|
29
31
|
export { clip, inert, keepsFindings, listingFinding, listingLine, MAX_DM_CHARS, MAX_NEW_PER_RUN, MAX_REPORTED, miss, moreLine, type Polled, pollWant, priceText, renderWant, SHOWN_IN_DM, type WantConfig, type WantState, wantlistType, wantState, withinLimits, } from "./wantlist.js";
|
|
30
32
|
/**
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAUrD,YAAY,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EACL,KAAK,cAAc,EACnB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,SAAS,EACT,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,UAAU,EACV,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAUrD,YAAY,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EACL,KAAK,cAAc,EACnB,YAAY,EACZ,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,SAAS,EACT,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,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Q,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9C,2FAA2F;AAC3F,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,MAAM,CAEvD;AAED,2EAA2E;AAC3E,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CASjE,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The six categories of the plan (section 1.2) as type identifiers, and the types shipped so far:
|
|
5
5
|
* `reminder` with the reminder slice (Lepid-Labs/city-hall#7), `renewal` and `price` with the
|
|
6
|
-
* renewal and price-tracker slice (city-hall#11), and `research` (category 5, E8), the
|
|
7
|
-
* execute-lane type: a research run and a reviewer run through the runner. `scout` (category
|
|
8
|
-
* `wantlist` and the judged `wantjudge` (category 2) came from the tracker plugin in 0.6.0 (E9,
|
|
6
|
+
* renewal and price-tracker slice (Lepid-Labs/city-hall#11), and `research` (category 5, E8), the
|
|
7
|
+
* first execute-lane type: a research run and a reviewer run through the runner. `scout` (category
|
|
8
|
+
* 1), `wantlist` and the judged `wantjudge` (category 2) came from the tracker plugin in 0.6.0 (E9,
|
|
9
9
|
* plan item 104).
|
|
10
10
|
*/
|
|
11
11
|
import { price } from "./price.js";
|
|
@@ -16,21 +16,23 @@ import { scout } from "./scout.js";
|
|
|
16
16
|
import { pageSource } from "./want-sources.js";
|
|
17
17
|
import { wantjudgeType } from "./wantjudge.js";
|
|
18
18
|
import { wantlistType } from "./wantlist.js";
|
|
19
|
-
export { extractPrice, jsonLdBlocks, parsePrice, priceFromJson, priceFromMeta, priceFromPattern, } from "./extract.js";
|
|
20
|
-
export { checkDraft, INTAKE_MAX_BUDGET_USD, INTAKE_MAX_TURNS, INTAKE_SCHEMA, INTAKE_STATES, INTAKE_TIMEOUT_MS, intakeJob, MAX_LINE_CHARS, MAX_REPLY_CHARS, MAX_TRANSCRIPT_CHARS, readIntake, transcriptLines, } from "./intake.js";
|
|
21
|
-
export { money } from "./money.js";
|
|
19
|
+
export { extractPrice, jsonLdBlocks, MAX_PATTERN_BODY_CHARS, MAX_PATTERN_CHARS, parsePrice, patternProblem, priceFromJson, priceFromMeta, priceFromPattern, } from "./extract.js";
|
|
20
|
+
export { checkDraft, INTAKE_ALLOWED_TOOLS, INTAKE_MAX_BUDGET_USD, INTAKE_MAX_TURNS, INTAKE_SCHEMA, INTAKE_STATES, INTAKE_TIMEOUT_MS, intakeJob, MAX_LINE_CHARS, MAX_REPLY_CHARS, MAX_TRANSCRIPT_CHARS, readIntake, transcriptLines, } from "./intake.js";
|
|
21
|
+
export { currencyCode, money } from "./money.js";
|
|
22
22
|
export { BASELINE_RULES, DEFAULT_BASELINE, DEFAULT_DROP_PERCENT, MISSES_BEFORE_TELLING, price, reference, } from "./price.js";
|
|
23
23
|
export { DEFAULT_SNOOZE_MS, reminder, snoozeUntil } from "./reminder.js";
|
|
24
24
|
export { decisionOf, isRenewalDecision, RENEWAL_DECISIONS, renewal, } from "./renewal.js";
|
|
25
25
|
export { AUTH_RETRY_MS, deadlineOf, draftJson, MAX_CONTEXT_CHARS, MAX_QUESTION_CHARS, MAX_TRIES, MIN_SOURCES_WAIT_MS, RESEARCH_MAX_BUDGET_USD, RESEARCH_MAX_TURNS, RESEARCH_TIMEOUT_MS, REVIEW_MAX_BUDGET_USD, REVIEW_MAX_TURNS, REVIEW_TIMEOUT_MS, research, researchJob, researchState, researchType, reviewJob, usesSentSources, } from "./research.js";
|
|
26
26
|
export { ANSWER_SCHEMA, clean, fitMessage, MAX_BLOCKED, MAX_MESSAGE_CHARS, parseAnswer, parseBlocked, parseReview, REVIEW_SCHEMA, renderAnswer, renderUpdate, safeUrl, VERDICTS, ZWSP, } from "./research-answer.js";
|
|
27
|
-
export { BARRED_SITES, blockedKey, gatheredPages, MAX_GATHERED_CHARS, MAX_GATHERED_PAGES, MAX_PAGE_CHARS, MAX_PAGE_TITLE_CHARS, MIN_PAGE_CHARS, NOT_OPENED_WHY, pagesBlock, pagesJson, SENT_DISALLOWED_TOOLS, SOURCES_DEADLINE_MARGIN_MINUTES, SOURCES_DEADLINE_MARGIN_MS, SOURCES_WAIT_DAYS, SOURCES_WAIT_MS, sourcesExpiry, uniqueBlocked, WEB_DISALLOWED_TOOLS, withBarredSites, } from "./research-sources.js";
|
|
27
|
+
export { BARRED_SITES, blockedKey, GATHERED_ALLOWED_TOOLS, GATHERED_DENIED_TOOLS, gatheredPages, MAX_GATHERED_CHARS, MAX_GATHERED_PAGES, MAX_PAGE_CHARS, MAX_PAGE_TITLE_CHARS, MIN_PAGE_CHARS, NOT_OPENED_WHY, pagesBlock, pagesJson, SENT_DISALLOWED_TOOLS, SOURCES_DEADLINE_MARGIN_MINUTES, SOURCES_DEADLINE_MARGIN_MS, SOURCES_WAIT_DAYS, SOURCES_WAIT_MS, sourcesExpiry, uniqueBlocked, WEB_DISALLOWED_TOOLS, withBarredSites, } from "./research-sources.js";
|
|
28
28
|
export { BGG_CATEGORIES, bggCategoryUrl, FIRECRAWL_TOOLS, WEB_ALLOWED_TOOLS, } from "./research-web.js";
|
|
29
|
+
export { RETRIED, retryOutcome } from "./retry.js";
|
|
29
30
|
export { itemKey, LENS_TEXT, LENSES, lensOf, MAX_FOR_CHARS, MAX_INTEREST_CHARS, MAX_INTERESTS, MAX_ITEMS, MAX_SCOUT_NOTES, MAX_SHOWN, MIN_ITEMS, PROMPT_SHOWN, parseScout, renderScout, SCOUT_MAX_BUDGET_USD, SCOUT_MAX_TURNS, SCOUT_SCHEMA, SCOUT_TIMEOUT_MS, scout, scoutJob, scoutState, } from "./scout.js";
|
|
30
31
|
export { BGG_ATTRIBUTION, BGG_HOST, BGG_SPACING_MS, bggSource, bggThingUrl, MAX_SCANNED, parseBggThingId, parseMarketplace, } from "./want-bgg.js";
|
|
31
32
|
export { EBAY_ATTRIBUTION, EBAY_CURRENCY, EBAY_LIMIT, EBAY_MARKETPLACE, EBAY_SEARCH_PATH, ebayRequest, ebaySource, parseEbayAnswer, } from "./want-ebay.js";
|
|
32
33
|
export { matchesWords, minorUnits, parseShopifyAnswer, SHOPIFY_ATTRIBUTION, SHOPIFY_CAPABILITY, SHOPIFY_COUNTRY, SHOPIFY_CREDITS, SHOPIFY_CURRENCY, SHOPIFY_LIMIT, SHOPIFY_PROVIDER, searchWords, shopifyQuery, shopifyRequest, shopifySource, } from "./want-shopify.js";
|
|
33
|
-
export { inboxSource, isEbayHost, listingKey,
|
|
34
|
+
export { inboxSource, isEbayHost, listingKey, MAX_LISTINGS, NEVER_EBAY, pageSource, readListings, SOURCE_IDS, SourceMiss, SourceUnavailableError, submittedListing, } from "./want-sources.js";
|
|
35
|
+
export { SOURCE_TEXT, sourceText } from "./want-text.js";
|
|
34
36
|
export { FITS, JUDGE_MAX_BUDGET_USD, JUDGE_MAX_TURNS, JUDGE_SCHEMA, JUDGE_TIMEOUT_MS, judgeHosts, judgeJob, judgeState, parseVerdicts, RETRY_GRACE_MS, renderJudged, renderUnchecked, wantjudgeType, } from "./wantjudge.js";
|
|
35
37
|
export { clip, inert, keepsFindings, listingFinding, listingLine, MAX_DM_CHARS, MAX_NEW_PER_RUN, MAX_REPORTED, miss, moreLine, pollWant, priceText, renderWant, SHOWN_IN_DM, wantlistType, wantState, withinLimits, } from "./wantlist.js";
|
|
36
38
|
/**
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA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ACR,UAAU,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,IAAI,EACJ,KAAK,EACL,aAAa,EACb,cAAc,EACd,WAAW,EACX,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,IAAI,EACJ,QAAQ,EAER,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EAGX,YAAY,EACZ,SAAS,EACT,YAAY,GACb,MAAM,eAAe,CAAA;AAEtB;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,UAAU;IACV,SAAS;IACT,OAAO;IACP,UAAU;IACV,OAAO;IACP,UAAU;IACV,WAAW;CACH,CAAA;AAIV,2FAA2F;AAC3F,MAAM,UAAU,QAAQ,CAAC,KAAa;IACpC,OAAQ,QAA8B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AACxD,CAAC;AAED,2EAA2E;AAC3E,MAAM,CAAC,MAAM,UAAU,GAAgD,MAAM,CAAC,MAAM,CAAC;IACnF,QAAQ,EAAE,QAA6B;IACvC,OAAO,EAAE,OAA4B;IACrC,KAAK,EAAE,KAA0B;IACjC,QAAQ,EAAE,QAA6B;IACvC,KAAK,EAAE,KAA0B;IACjC,0FAA0F;IAC1F,QAAQ,EAAE,YAAY,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAsB;IACjE,SAAS,EAAE,aAAa,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAsB;CACpE,CAAC,CAAA"}
|
package/dist/intake.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ import { type JobResult, type JobSpec } from "@rackbops/docket-core";
|
|
|
9
9
|
* Decided on the design (Rod, 2026-10-19): the host keeps the transcript and sends it whole
|
|
10
10
|
* each turn, so every turn is a one-shot `claude -p` run (`--no-session-persistence`, no
|
|
11
11
|
* `resumeSessionId`), and plan item 81's transcripts on the runner stay untouched. The model gets
|
|
12
|
-
*
|
|
12
|
+
* web search and nothing else (0.15.0, after Rod's first test asked it a game's kickoff time): it
|
|
13
|
+
* looks up a public fact, talks and drafts, and plain code saves (plan 5.6, tier 0). The field list is the
|
|
13
14
|
* tracker's own editor fields as its `GET /types` describes them (plan item 68), so a draft is
|
|
14
15
|
* checked against exactly what the editor accepts.
|
|
15
16
|
*/
|
|
@@ -75,10 +76,12 @@ export declare const MAX_LINE_CHARS = 2000;
|
|
|
75
76
|
export declare const MAX_TRANSCRIPT_CHARS = 24000;
|
|
76
77
|
/** A reply longer than this is cut: one Discord message, with room to spare. */
|
|
77
78
|
export declare const MAX_REPLY_CHARS = 1500;
|
|
78
|
-
/** A turn's caps: it reads a transcript
|
|
79
|
-
export declare const INTAKE_MAX_TURNS =
|
|
80
|
-
export declare const INTAKE_MAX_BUDGET_USD = 0.
|
|
81
|
-
export declare const INTAKE_TIMEOUT_MS =
|
|
79
|
+
/** A turn's caps: it reads a transcript, may search the web once or twice, and answers. */
|
|
80
|
+
export declare const INTAKE_MAX_TURNS = 8;
|
|
81
|
+
export declare const INTAKE_MAX_BUDGET_USD = 0.25;
|
|
82
|
+
export declare const INTAKE_TIMEOUT_MS = 120000;
|
|
83
|
+
/** The one tool a turn may use: search results, never a fetched page (no WebFetch). */
|
|
84
|
+
export declare const INTAKE_ALLOWED_TOOLS: readonly string[];
|
|
82
85
|
export declare const INTAKE_STATES: readonly IntakeState[];
|
|
83
86
|
/** The one answer each turn returns (`--json-schema`), in the portable JSON Schema subset. */
|
|
84
87
|
export declare const INTAKE_SCHEMA: {
|
|
@@ -117,7 +120,7 @@ export declare const INTAKE_SCHEMA: {
|
|
|
117
120
|
};
|
|
118
121
|
/** The transcript as prompt lines, each person line cut, the oldest dropped past the budget (the first kept). */
|
|
119
122
|
export declare function transcriptLines(transcript: readonly IntakeLine[]): string[];
|
|
120
|
-
/** One turn as a Job: the whole transcript, the field list,
|
|
123
|
+
/** One turn as a Job: the whole transcript, the field list, web search only, small caps. */
|
|
121
124
|
export declare function intakeJob(ctx: IntakeContext): JobSpec;
|
|
122
125
|
/**
|
|
123
126
|
* Why `draft` cannot be shown as it stands, or null when it fits the field list: the type is
|
package/dist/intake.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../src/intake.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,OAAO,EACb,MAAM,uBAAuB,CAAA;AAE9B
|
|
1
|
+
{"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../src/intake.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,OAAO,EACb,MAAM,uBAAuB,CAAA;AAE9B;;;;;;;;;;;;;;GAcG;AAEH,oFAAoF;AACpF,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACrC,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,gEAAgE;AAChE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,IAAI,EAAE,WAAW,EAAE,CAAA;CACpB;AAED,sFAAsF;AACtF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,+EAA+E;AAC/E,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAA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