@rackbops/docket-types 0.20.0 → 0.22.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 +11 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/news.d.ts +90 -4
- package/dist/news.d.ts.map +1 -1
- package/dist/news.js +319 -33
- package/dist/news.js.map +1 -1
- package/dist/want-ebay.d.ts +6 -3
- package/dist/want-ebay.d.ts.map +1 -1
- package/dist/want-ebay.js +77 -30
- package/dist/want-ebay.js.map +1 -1
- package/dist/want-sources.d.ts +21 -0
- package/dist/want-sources.d.ts.map +1 -1
- package/dist/want-sources.js +7 -0
- package/dist/want-sources.js.map +1 -1
- package/dist/wantjudge.d.ts +32 -3
- package/dist/wantjudge.d.ts.map +1 -1
- package/dist/wantjudge.js +207 -14
- package/dist/wantjudge.js.map +1 -1
- package/dist/wantlist.d.ts +7 -0
- package/dist/wantlist.d.ts.map +1 -1
- package/dist/wantlist.js +1 -0
- package/dist/wantlist.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -234,7 +234,17 @@ The tracker's task types, built on `@rackbops/docket-core`'s contract. Shipped s
|
|
|
234
234
|
and items whose title or kind holds an `exclude` entry are dropped in plain code; with nothing
|
|
235
235
|
left the run ends with "no news" and no DM. Otherwise a reviewer Job (12 turns, 0.75 USD, 5 minutes) checks each
|
|
236
236
|
item against its own page (the subject itself, a kind that counts, recent, nothing called on
|
|
237
|
-
sale from a snippet) and only the kept ones are DMed,
|
|
237
|
+
sale from a snippet, worth sending by the owner's `notes`) and only the kept ones are DMed,
|
|
238
|
+
each a finding with its link and date. When the search gives them, an item also carries its
|
|
239
|
+
release date, price and availability (shown on one line) and `flag`, the search model's own
|
|
240
|
+
note on what the owner's notes ask to point out (a "Note:" line); the review checks each against
|
|
241
|
+
the page and the notes and drops an item with one it cannot bear out. Bare text with a link in
|
|
242
|
+
it (a summary, a date, a detail, a show's field) is dropped, and an item whose title holds one
|
|
243
|
+
is dropped whole, so the DM's only links are the item's page and a show's tickets, never eBay.
|
|
244
|
+
`notes` is the owner's own words on what is worth sending -- who it is for, what to skip, what
|
|
245
|
+
to point out -- and goes to both runs; past 500 characters it is cut. Keeping a special edition
|
|
246
|
+
while skipping plain copies is the reviewer's reading of the notes: an `exclude` entry drops
|
|
247
|
+
every title holding it, in plain code.
|
|
238
248
|
A review that fails for good sends nothing; three failed runs in a row (search or review) are
|
|
239
249
|
told once.
|
|
240
250
|
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type { Lane } from "@rackbops/docket-core";
|
|
|
14
14
|
export { type ExtractedPrice, extractPrice, jsonLdBlocks, MAX_PATTERN_BODY_CHARS, MAX_PATTERN_CHARS, parsePrice, patternProblem, priceFromJson, priceFromMeta, priceFromPattern, } from "./extract.js";
|
|
15
15
|
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";
|
|
16
16
|
export { currencyCode, money } from "./money.js";
|
|
17
|
-
export { LOOKBACK_DAYS, MAX_DISAMBIGUATE_CHARS, MAX_INCLUDE, MAX_KIND_CHARS, MAX_NEWS_ITEMS, MAX_SEEN, MAX_SUBJECT_CHARS, NEWS_MAX_BUDGET_USD, NEWS_MAX_TURNS, NEWS_REVIEW_MAX_BUDGET_USD, NEWS_REVIEW_MAX_TURNS, NEWS_REVIEW_SCHEMA, NEWS_SCHEMA, type NewsConfig, type NewsItem, type NewsPhase, type NewsShow, type NewsState, news, newsJob, newsKeys, newsReviewJob, newsState, PROMPT_SEEN, parseNews, parseNewsReview, renderNews, titleKey, } from "./news.js";
|
|
17
|
+
export { changedFacts, factsOf, LOOKBACK_DAYS, MAX_DISAMBIGUATE_CHARS, MAX_INCLUDE, MAX_KIND_CHARS, MAX_NEWS_ITEMS, MAX_NOTES_CHARS, MAX_SEEN, MAX_SENT, MAX_SUBJECT_CHARS, NEWS_MAX_BUDGET_USD, NEWS_MAX_TURNS, NEWS_REVIEW_MAX_BUDGET_USD, NEWS_REVIEW_MAX_TURNS, NEWS_REVIEW_SCHEMA, NEWS_SCHEMA, type NewsConfig, type NewsFacts, type NewsItem, type NewsPhase, type NewsShow, type NewsState, news, newsJob, newsKeys, newsReviewJob, newsState, PROMPT_SEEN, parseNews, parseNewsReview, renderNews, type SentItem, titleKey, } from "./news.js";
|
|
18
18
|
export { BASELINE_RULES, type BaselineRule, DEFAULT_BASELINE, DEFAULT_DROP_PERCENT, MISSES_BEFORE_TELLING, type PriceConfig, type PriceState, price, reference, } from "./price.js";
|
|
19
19
|
export { DEFAULT_SNOOZE_MS, type ReminderConfig, reminder, snoozeUntil } from "./reminder.js";
|
|
20
20
|
export { decisionOf, isRenewalDecision, RENEWAL_DECISIONS, type RenewalConfig, type RenewalDecision, type RenewalState, renewal, } from "./renewal.js";
|
|
@@ -27,10 +27,10 @@ export { itemKey, LENS_TEXT, LENSES, type Lens, lensOf, MAX_FOR_CHARS, MAX_INTER
|
|
|
27
27
|
export { BGG_ATTRIBUTION, BGG_HOST, BGG_SPACING_MS, type BggOptions, bggSource, bggThingUrl, MAX_SCANNED, parseBggThingId, parseMarketplace, } from "./want-bgg.js";
|
|
28
28
|
export { DETAIL_CHARS, EBAY_ATTRIBUTION, EBAY_CURRENCY, EBAY_ITEM_ID, EBAY_ITEM_PATH, EBAY_LIMIT, EBAY_MARKETPLACE, EBAY_SEARCH_PATH, type EbayBrowse, type EbayRequest, type EbaySearch, ebayItemRequest, ebayRequest, ebaySource, parseEbayAnswer, parseEbayItem, } from "./want-ebay.js";
|
|
29
29
|
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";
|
|
30
|
-
export { inboxSource, isEbayHost, type Listing, type ListingDetail, 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";
|
|
30
|
+
export { inboxSource, isEbayHost, type Listing, type ListingDetail, ListingUnreadable, 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";
|
|
31
31
|
export { SOURCE_TEXT, type SourceText, sourceText } from "./want-text.js";
|
|
32
|
-
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";
|
|
33
|
-
export { checkMark, clip, confirmListings, EXCLUDE_CHARS, hasConfirm, inert, isExcluded, keepsFindings, listingFinding, listingLine, MAX_DM_CHARS, MAX_EXCLUDE, MAX_NEW_PER_RUN, MAX_REPORTED, miss, moreLine, type Polled, parseExclude, pollWant, priceText, renderWant, SHOWN_IN_DM, type WantConfig, type WantState, wanted, wantlistType, wantState, withinLimits, } from "./wantlist.js";
|
|
32
|
+
export { FITS, type Fit, type HeldItem, JUDGE_DETAIL_CHARS, JUDGE_MAX_BUDGET_USD, JUDGE_MAX_TURNS, JUDGE_SCHEMA, JUDGE_TIMEOUT_MS, type JudgeItem, type JudgeOptions, type JudgeState, type JudgeVerdict, judgeHosts, judgeJob, judgeState, parseVerdicts, RETRY_GRACE_MS, renderJudged, renderUnchecked, wantjudgeType, } from "./wantjudge.js";
|
|
33
|
+
export { checkMark, clip, confirmListings, EXCLUDE_CHARS, hasConfirm, inert, isExcluded, keepsFindings, listingFinding, listingLine, MAX_DM_CHARS, MAX_EXCLUDE, MAX_NEW_PER_RUN, MAX_REPORTED, MAX_WANT_NOTES, miss, moreLine, type Polled, parseExclude, pollWant, priceText, renderWant, SHOWN_IN_DM, type WantConfig, type WantState, wanted, wantlistType, wantState, withinLimits, } from "./wantlist.js";
|
|
34
34
|
/**
|
|
35
35
|
* The six task categories the tracker starts with (plan section 1.2), as type identifiers, then
|
|
36
36
|
* `wantjudge`: category 2's watch with the model's look first (plan 5.4), a type of its own.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAWrD,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,EAC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,GAAG,KAAK,IAAI,MAAM,CAEvD;AAED,2EAA2E;AAC3E,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAUjE,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import { wantlistType } from "./wantlist.js";
|
|
|
21
21
|
export { extractPrice, jsonLdBlocks, MAX_PATTERN_BODY_CHARS, MAX_PATTERN_CHARS, parsePrice, patternProblem, priceFromJson, priceFromMeta, priceFromPattern, } from "./extract.js";
|
|
22
22
|
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";
|
|
23
23
|
export { currencyCode, money } from "./money.js";
|
|
24
|
-
export { LOOKBACK_DAYS, MAX_DISAMBIGUATE_CHARS, MAX_INCLUDE, MAX_KIND_CHARS, MAX_NEWS_ITEMS, MAX_SEEN, MAX_SUBJECT_CHARS, NEWS_MAX_BUDGET_USD, NEWS_MAX_TURNS, NEWS_REVIEW_MAX_BUDGET_USD, NEWS_REVIEW_MAX_TURNS, NEWS_REVIEW_SCHEMA, NEWS_SCHEMA, news, newsJob, newsKeys, newsReviewJob, newsState, PROMPT_SEEN, parseNews, parseNewsReview, renderNews, titleKey, } from "./news.js";
|
|
24
|
+
export { changedFacts, factsOf, LOOKBACK_DAYS, MAX_DISAMBIGUATE_CHARS, MAX_INCLUDE, MAX_KIND_CHARS, MAX_NEWS_ITEMS, MAX_NOTES_CHARS, MAX_SEEN, MAX_SENT, MAX_SUBJECT_CHARS, NEWS_MAX_BUDGET_USD, NEWS_MAX_TURNS, NEWS_REVIEW_MAX_BUDGET_USD, NEWS_REVIEW_MAX_TURNS, NEWS_REVIEW_SCHEMA, NEWS_SCHEMA, news, newsJob, newsKeys, newsReviewJob, newsState, PROMPT_SEEN, parseNews, parseNewsReview, renderNews, titleKey, } from "./news.js";
|
|
25
25
|
export { BASELINE_RULES, DEFAULT_BASELINE, DEFAULT_DROP_PERCENT, MISSES_BEFORE_TELLING, price, reference, } from "./price.js";
|
|
26
26
|
export { DEFAULT_SNOOZE_MS, reminder, snoozeUntil } from "./reminder.js";
|
|
27
27
|
export { decisionOf, isRenewalDecision, RENEWAL_DECISIONS, renewal, } from "./renewal.js";
|
|
@@ -34,10 +34,10 @@ export { itemKey, LENS_TEXT, LENSES, lensOf, MAX_FOR_CHARS, MAX_INTEREST_CHARS,
|
|
|
34
34
|
export { BGG_ATTRIBUTION, BGG_HOST, BGG_SPACING_MS, bggSource, bggThingUrl, MAX_SCANNED, parseBggThingId, parseMarketplace, } from "./want-bgg.js";
|
|
35
35
|
export { DETAIL_CHARS, EBAY_ATTRIBUTION, EBAY_CURRENCY, EBAY_ITEM_ID, EBAY_ITEM_PATH, EBAY_LIMIT, EBAY_MARKETPLACE, EBAY_SEARCH_PATH, ebayItemRequest, ebayRequest, ebaySource, parseEbayAnswer, parseEbayItem, } from "./want-ebay.js";
|
|
36
36
|
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";
|
|
37
|
-
export { inboxSource, isEbayHost, listingKey, MAX_LISTINGS, NEVER_EBAY, pageSource, readListings, SOURCE_IDS, SourceMiss, SourceUnavailableError, submittedListing, } from "./want-sources.js";
|
|
37
|
+
export { inboxSource, isEbayHost, ListingUnreadable, listingKey, MAX_LISTINGS, NEVER_EBAY, pageSource, readListings, SOURCE_IDS, SourceMiss, SourceUnavailableError, submittedListing, } from "./want-sources.js";
|
|
38
38
|
export { SOURCE_TEXT, sourceText } from "./want-text.js";
|
|
39
|
-
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";
|
|
40
|
-
export { checkMark, clip, confirmListings, EXCLUDE_CHARS, hasConfirm, inert, isExcluded, keepsFindings, listingFinding, listingLine, MAX_DM_CHARS, MAX_EXCLUDE, MAX_NEW_PER_RUN, MAX_REPORTED, miss, moreLine, parseExclude, pollWant, priceText, renderWant, SHOWN_IN_DM, wanted, wantlistType, wantState, withinLimits, } from "./wantlist.js";
|
|
39
|
+
export { FITS, JUDGE_DETAIL_CHARS, 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";
|
|
40
|
+
export { checkMark, clip, confirmListings, EXCLUDE_CHARS, hasConfirm, inert, isExcluded, keepsFindings, listingFinding, listingLine, MAX_DM_CHARS, MAX_EXCLUDE, MAX_NEW_PER_RUN, MAX_REPORTED, MAX_WANT_NOTES, miss, moreLine, parseExclude, pollWant, priceText, renderWant, SHOWN_IN_DM, wanted, wantlistType, wantState, withinLimits, } from "./wantlist.js";
|
|
41
41
|
/**
|
|
42
42
|
* The six task categories the tracker starts with (plan section 1.2), as type identifiers, then
|
|
43
43
|
* `wantjudge`: category 2's watch with the model's look first (plan 5.4), a type of its own.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAA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EACd,IAAI,EACJ,QAAQ,EAER,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EAGX,MAAM,EACN,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;IACX,MAAM;CACE,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;IACnE,IAAI,EAAE,IAAyB;CAChC,CAAC,CAAA"}
|
package/dist/news.d.ts
CHANGED
|
@@ -17,15 +17,32 @@ import { type JobSpec } from "@rackbops/docket-core";
|
|
|
17
17
|
* 2. the review Job checks each pending item against its own page: about this subject (not a
|
|
18
18
|
* similarly named act or thing, with `disambiguate`'s notes), of a kind `include` names and none
|
|
19
19
|
* `exclude` does, recent, and saying only what its page says ("on sale" or "available to buy"
|
|
20
|
-
* never from a search snippet)
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* never from a search snippet), and worth sending by the owner's `notes`. Only the items it
|
|
21
|
+
* keeps are DMed, each a finding with its link and date, and with its release date, price and
|
|
22
|
+
* availability when its page gives them, and what the notes ask to point out; the review drops
|
|
23
|
+
* an item with any detail its page does not bear out, rather than send it wrong. Every pending
|
|
24
|
+
* item's link is remembered in `seen` once reviewed, kept or not, so a rejected page is not
|
|
25
|
+
* reviewed again each run; a sent item's title is remembered too.
|
|
26
|
+
*
|
|
27
|
+
* An item sent before comes back once when a detail of it changed (L8 of rackbops-bot-plugins#368):
|
|
28
|
+
* `sent` keeps each sent item's page and its release date, price, availability and show date,
|
|
29
|
+
* venue and city. A search that finds the same page again with one of those details different
|
|
30
|
+
* sends it to the review as an update, marked with what changed. Only a change between two given
|
|
31
|
+
* values counts: a detail missing then or now is no change, so a model that left a detail out the
|
|
32
|
+
* first time does not make it news later. Only the same page counts, never another page with the
|
|
33
|
+
* same title: two pages of one item may disagree (a label's price and a shop's), and two shows
|
|
34
|
+
* may share a title ("Tour dates announced"). The search is shown the newest sent items with their
|
|
35
|
+
* pages and last details, so it reports a change rather than skipping the item. An update the
|
|
36
|
+
* review rejects is remembered by what it claimed (`tried`), so the same claim is not reviewed
|
|
37
|
+
* every run.
|
|
23
38
|
*
|
|
24
39
|
* A review that fails for good sends nothing: its pending items are dropped unseen, so a later run
|
|
25
40
|
* may find them again. A search or review that fails for good is a missed run; the owner hears once,
|
|
26
41
|
* at `MISSES_BEFORE_TELLING` in a row (the price tracker's rule). Failures retry as research's do
|
|
27
42
|
* (`retry.ts`); a usage limit never reaches `finish`. Model output is data: every field is capped,
|
|
28
|
-
* cleaned, a link must be http(s) (`safeUrl`),
|
|
43
|
+
* cleaned, a link must be http(s) (`safeUrl`), an item linking to eBay is never kept, and text the
|
|
44
|
+
* DM shows bare is dropped when it holds a link (an item whose title does is dropped whole), so
|
|
45
|
+
* the DM's only links are the item's page and a show's tickets, each in <...> and never eBay.
|
|
29
46
|
*/
|
|
30
47
|
export interface NewsConfig {
|
|
31
48
|
/** Who or what to watch: "Platinum Blonde (the Canadian band)". */
|
|
@@ -41,6 +58,11 @@ export interface NewsConfig {
|
|
|
41
58
|
disambiguate?: string;
|
|
42
59
|
/** Report shows with their city, venue, date and tickets. */
|
|
43
60
|
shows?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* What makes an item worth sending, in the owner's words, for both runs: who it is for, what to
|
|
63
|
+
* skip ("not plain copies of albums I own"), what to point out ("shows near December 12").
|
|
64
|
+
*/
|
|
65
|
+
notes?: string;
|
|
44
66
|
}
|
|
45
67
|
export interface NewsShow {
|
|
46
68
|
city: string;
|
|
@@ -57,6 +79,40 @@ export interface NewsItem {
|
|
|
57
79
|
/** When it was published or announced, as the page says. */
|
|
58
80
|
date: string;
|
|
59
81
|
show?: NewsShow;
|
|
82
|
+
/** When it comes out, as its page says, when that differs from `date`. */
|
|
83
|
+
released?: string;
|
|
84
|
+
/** Its price, as its page says. */
|
|
85
|
+
price?: string;
|
|
86
|
+
/** Whether and where it can be had, as its page says: "preorder", "sold out". */
|
|
87
|
+
availability?: string;
|
|
88
|
+
/** What the owner's notes ask to point out about it: "two days before December 12". */
|
|
89
|
+
flag?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Set only by this type, never by the model: the item was sent before and this is what changed
|
|
92
|
+
* ("show date: December 12 -> December 13"). An item carrying it is an update.
|
|
93
|
+
*/
|
|
94
|
+
update?: string;
|
|
95
|
+
}
|
|
96
|
+
/** The details of a sent item whose change sends it again. */
|
|
97
|
+
export interface NewsFacts {
|
|
98
|
+
released?: string;
|
|
99
|
+
price?: string;
|
|
100
|
+
availability?: string;
|
|
101
|
+
showDate?: string;
|
|
102
|
+
venue?: string;
|
|
103
|
+
city?: string;
|
|
104
|
+
}
|
|
105
|
+
/** A sent item, as remembered to tell a later change: its page, its two keys and its details. */
|
|
106
|
+
export interface SentItem {
|
|
107
|
+
/** The page it was sent with: only this page, found again, can carry a change. */
|
|
108
|
+
url: string;
|
|
109
|
+
link: string;
|
|
110
|
+
title: string;
|
|
111
|
+
/** The item's title as sent, for the search prompt. */
|
|
112
|
+
name: string;
|
|
113
|
+
facts: NewsFacts;
|
|
114
|
+
/** A digest of the last update the review rejected (what it claimed), so it is not reviewed again. */
|
|
115
|
+
tried?: string;
|
|
60
116
|
}
|
|
61
117
|
export type NewsPhase = "search" | "review";
|
|
62
118
|
export interface NewsState {
|
|
@@ -67,6 +123,8 @@ export interface NewsState {
|
|
|
67
123
|
seen: string[];
|
|
68
124
|
/** Titles of the items sent, oldest first, at most `PROMPT_SEEN`: the search is told of them. */
|
|
69
125
|
recent: string[];
|
|
126
|
+
/** The items sent, with their details, oldest first, at most `MAX_SENT`. */
|
|
127
|
+
sent: SentItem[];
|
|
70
128
|
/** Failed tries of the current phase. */
|
|
71
129
|
failures: number;
|
|
72
130
|
/** Runs in a row that failed for good. */
|
|
@@ -78,12 +136,15 @@ export declare const MAX_SUBJECT_CHARS = 200;
|
|
|
78
136
|
export declare const MAX_INCLUDE = 10;
|
|
79
137
|
export declare const MAX_KIND_CHARS = 80;
|
|
80
138
|
export declare const MAX_DISAMBIGUATE_CHARS = 500;
|
|
139
|
+
export declare const MAX_NOTES_CHARS = 500;
|
|
81
140
|
/** Items one search may return, and so one DM may carry. */
|
|
82
141
|
export declare const MAX_NEWS_ITEMS = 10;
|
|
83
142
|
/** Keys remembered (two per item); past this the oldest may come back, months later. */
|
|
84
143
|
export declare const MAX_SEEN = 600;
|
|
85
144
|
/** Titles of sent items the search prompt names. */
|
|
86
145
|
export declare const PROMPT_SEEN = 30;
|
|
146
|
+
/** Sent items whose details are remembered; past this the oldest is no longer re-alerted on a change. */
|
|
147
|
+
export declare const MAX_SENT = 100;
|
|
87
148
|
/** How far back an item may be, in the prompts: the watch looks for news, not the archive. */
|
|
88
149
|
export declare const LOOKBACK_DAYS = 30;
|
|
89
150
|
/** Proposed, like the scout's (item 61): a search is a scout-sized look, a review a short one. */
|
|
@@ -136,6 +197,21 @@ export declare const NEWS_SCHEMA: {
|
|
|
136
197
|
};
|
|
137
198
|
readonly required: readonly ["city", "venue", "date"];
|
|
138
199
|
};
|
|
200
|
+
readonly released: {
|
|
201
|
+
readonly type: "string";
|
|
202
|
+
readonly description: "When it comes out, if not the same as date.";
|
|
203
|
+
};
|
|
204
|
+
readonly price: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
};
|
|
207
|
+
readonly availability: {
|
|
208
|
+
readonly type: "string";
|
|
209
|
+
readonly description: "Preorder, in stock, sold out, and where.";
|
|
210
|
+
};
|
|
211
|
+
readonly flag: {
|
|
212
|
+
readonly type: "string";
|
|
213
|
+
readonly description: "What the notes ask to point out about it.";
|
|
214
|
+
};
|
|
139
215
|
};
|
|
140
216
|
readonly required: readonly ["title", "kind", "summary", "url", "date"];
|
|
141
217
|
};
|
|
@@ -174,6 +250,16 @@ export declare const NEWS_REVIEW_SCHEMA: {
|
|
|
174
250
|
export declare function titleKey(title: string): string;
|
|
175
251
|
/** Both keys an item is remembered by: its link's and its title's. */
|
|
176
252
|
export declare function newsKeys(item: Pick<NewsItem, "url" | "title">): [string, string];
|
|
253
|
+
/** An item's details that a change of re-alerts on; empty ones left out. */
|
|
254
|
+
export declare function factsOf(item: NewsItem): NewsFacts;
|
|
255
|
+
/**
|
|
256
|
+
* What changed from `before` to `now`, as the DM says it ("show date: December 12 -> December
|
|
257
|
+
* 13"); empty when nothing did. Only a detail given both times counts: one `now` lacks has not
|
|
258
|
+
* changed (the page left it out), and one `before` lacked is not news (the first search may have
|
|
259
|
+
* left it out). Case, spacing and punctuation are no change; whether two wordings mean the same
|
|
260
|
+
* ("preorder", "available for preorder") is the review's to say.
|
|
261
|
+
*/
|
|
262
|
+
export declare function changedFacts(before: NewsFacts, now: NewsFacts): string;
|
|
177
263
|
/** The state as stored, or a fresh one; anything unreadable in it is dropped. */
|
|
178
264
|
export declare function newsState(value: unknown): NewsState;
|
|
179
265
|
/** The search run: the subject and its kinds, what was already reported, and the rules for an item. */
|
package/dist/news.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"news.d.ts","sourceRoot":"","sources":["../src/news.ts"],"names":[],"mappings":"AACA,OAAO,EASL,KA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