@cyanheads/secedgar-mcp-server 0.15.8 → 0.15.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/AGENTS.md +10 -7
  2. package/CLAUDE.md +10 -7
  3. package/README.md +11 -6
  4. package/changelog/0.15.x/0.15.9.md +32 -0
  5. package/dist/mcp-server/prompts/definitions/company-analysis.prompt.js +2 -2
  6. package/dist/mcp-server/prompts/definitions/company-analysis.prompt.js.map +1 -1
  7. package/dist/mcp-server/resources/definitions/concepts.resource.d.ts +2 -1
  8. package/dist/mcp-server/resources/definitions/concepts.resource.d.ts.map +1 -1
  9. package/dist/mcp-server/resources/definitions/concepts.resource.js +5 -4
  10. package/dist/mcp-server/resources/definitions/concepts.resource.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/compare-companies.tool.d.ts +10 -0
  12. package/dist/mcp-server/tools/definitions/compare-companies.tool.d.ts.map +1 -1
  13. package/dist/mcp-server/tools/definitions/compare-companies.tool.js +143 -14
  14. package/dist/mcp-server/tools/definitions/compare-companies.tool.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/fetch-frames.tool.d.ts +6 -1
  16. package/dist/mcp-server/tools/definitions/fetch-frames.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/fetch-frames.tool.js +93 -32
  18. package/dist/mcp-server/tools/definitions/fetch-frames.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/get-financials.tool.d.ts +6 -0
  20. package/dist/mcp-server/tools/definitions/get-financials.tool.d.ts.map +1 -1
  21. package/dist/mcp-server/tools/definitions/get-financials.tool.js +130 -60
  22. package/dist/mcp-server/tools/definitions/get-financials.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/get-snapshot.tool.d.ts +3 -0
  24. package/dist/mcp-server/tools/definitions/get-snapshot.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js +16 -7
  26. package/dist/mcp-server/tools/definitions/get-snapshot.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/index.d.ts +81 -57
  28. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/search-concepts.tool.d.ts +2 -1
  30. package/dist/mcp-server/tools/definitions/search-concepts.tool.d.ts.map +1 -1
  31. package/dist/mcp-server/tools/definitions/search-concepts.tool.js +5 -4
  32. package/dist/mcp-server/tools/definitions/search-concepts.tool.js.map +1 -1
  33. package/dist/services/edgar/concept-map.d.ts +38 -4
  34. package/dist/services/edgar/concept-map.d.ts.map +1 -1
  35. package/dist/services/edgar/concept-map.js +196 -9
  36. package/dist/services/edgar/concept-map.js.map +1 -1
  37. package/dist/services/edgar/concept-series.d.ts +79 -18
  38. package/dist/services/edgar/concept-series.d.ts.map +1 -1
  39. package/dist/services/edgar/concept-series.js +175 -25
  40. package/dist/services/edgar/concept-series.js.map +1 -1
  41. package/dist/services/edgar/edgar-api-service.d.ts +4 -6
  42. package/dist/services/edgar/edgar-api-service.d.ts.map +1 -1
  43. package/dist/services/edgar/edgar-api-service.js +34 -38
  44. package/dist/services/edgar/edgar-api-service.js.map +1 -1
  45. package/dist/services/edgar/mirror/edgar-mirror.d.ts +10 -1
  46. package/dist/services/edgar/mirror/edgar-mirror.d.ts.map +1 -1
  47. package/dist/services/edgar/mirror/edgar-mirror.js +52 -13
  48. package/dist/services/edgar/mirror/edgar-mirror.js.map +1 -1
  49. package/dist/services/edgar/trigram-similarity.d.ts +13 -0
  50. package/dist/services/edgar/trigram-similarity.d.ts.map +1 -0
  51. package/dist/services/edgar/trigram-similarity.js +40 -0
  52. package/dist/services/edgar/trigram-similarity.js.map +1 -0
  53. package/dist/services/edgar/types.d.ts +12 -2
  54. package/dist/services/edgar/types.d.ts.map +1 -1
  55. package/package.json +2 -2
  56. package/server.json +3 -3
@@ -2,6 +2,7 @@
2
2
  * @fileoverview Static mapping of friendly financial concept names to XBRL tags.
3
3
  * @module services/edgar/concept-map
4
4
  */
5
+ import { trigramSimilarity } from './trigram-similarity.js';
5
6
  /**
6
7
  * Friendly name → XBRL tag mapping. Tags are tried in order for companyconcept
7
8
  * lookups, and index 0 is the preferred total when two tags report the same
@@ -93,6 +94,17 @@ const CONCEPT_MAP = {
93
94
  unit: 'USD/shares',
94
95
  label: 'Earnings Per Share (Diluted)',
95
96
  },
97
+ shares_diluted: {
98
+ group: 'per_share',
99
+ // The EPS denominator, so it sits with the EPS lines it divides. A duration
100
+ // concept (the period's weighted average), reported in the `shares` unit.
101
+ tags: ['WeightedAverageNumberOfDilutedSharesOutstanding'],
102
+ // Confirmed in the 20-F companyfacts of Spotify (SPOT) and SAP.
103
+ ifrsTags: ['AdjustedWeightedAverageShares'],
104
+ taxonomy: 'us-gaap',
105
+ unit: 'shares',
106
+ label: 'Weighted-Average Diluted Shares',
107
+ },
96
108
  assets: {
97
109
  group: 'balance_sheet',
98
110
  tags: ['Assets'],
@@ -180,7 +192,15 @@ const CONCEPT_MAP = {
180
192
  },
181
193
  capex: {
182
194
  group: 'cash_flow',
183
- tags: ['PaymentsToAcquirePropertyPlantAndEquipment'],
195
+ /**
196
+ * `PaymentsToAcquireProductiveAssets` is the successor several large filers
197
+ * moved to (NVIDIA, Amazon, and Visa report capex only under it). It sits
198
+ * behind the PP&E tag, not ahead of it: it also counts software and other
199
+ * intangibles, and of the 75 filers reporting both for CY2025, 36 report a
200
+ * larger productive-assets figure. Behind the leader it only fills frames the
201
+ * PP&E-only tag does not report (#125, the #98 precedent).
202
+ */
203
+ tags: ['PaymentsToAcquirePropertyPlantAndEquipment', 'PaymentsToAcquireProductiveAssets'],
184
204
  ifrsTags: ['PurchaseOfPropertyPlantAndEquipmentClassifiedAsInvestingActivities'],
185
205
  taxonomy: 'us-gaap',
186
206
  unit: 'USD',
@@ -260,7 +280,15 @@ const CONCEPT_MAP = {
260
280
  },
261
281
  interest_expense: {
262
282
  group: 'income_statement',
263
- tags: ['InterestExpense', 'InterestExpenseDebt'],
283
+ /**
284
+ * `InterestExpenseNonoperating` is the income-statement caption filers moved
285
+ * to (NVIDIA and Microsoft report interest expense only under it). It sits
286
+ * last: it disagrees with `InterestExpense` for 26 of 53 CY2025 filers
287
+ * reporting both and with `InterestExpenseDebt` for 47 of 67, so behind them
288
+ * it only fills frames neither covers and moves no value either resolves
289
+ * (#125, the #98 precedent).
290
+ */
291
+ tags: ['InterestExpense', 'InterestExpenseDebt', 'InterestExpenseNonoperating'],
264
292
  /**
265
293
  * `InterestExpense` leads because it is the exact counterpart of the us-gaap
266
294
  * tag. `FinanceCosts` is the IAS 1 income-statement caption and is broader —
@@ -273,6 +301,24 @@ const CONCEPT_MAP = {
273
301
  unit: 'USD',
274
302
  label: 'Interest Expense',
275
303
  },
304
+ pretax_income: {
305
+ group: 'income_statement',
306
+ /**
307
+ * A priority ladder. The first tag is the face-of-statement pre-tax line; the
308
+ * second excludes equity-method income, and 217 of the 381 CY2025 filers
309
+ * reporting it report only it. Of the 164 reporting both, 108 agree, so the
310
+ * statement line leads and the narrower one fills the frames it lacks.
311
+ */
312
+ tags: [
313
+ 'IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest',
314
+ 'IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments',
315
+ ],
316
+ // Confirmed in the 20-F companyfacts of Spotify (SPOT) and SAP.
317
+ ifrsTags: ['ProfitLossBeforeTax'],
318
+ taxonomy: 'us-gaap',
319
+ unit: 'USD',
320
+ label: 'Pre-Tax Income (Loss)',
321
+ },
276
322
  tax_expense: {
277
323
  group: 'income_statement',
278
324
  tags: ['IncomeTaxExpenseBenefit'],
@@ -381,6 +427,32 @@ const CONCEPT_MAP = {
381
427
  unit: 'USD',
382
428
  label: 'Accounts Payable',
383
429
  },
430
+ ppe_net: {
431
+ group: 'balance_sheet',
432
+ tags: ['PropertyPlantAndEquipmentNet'],
433
+ /**
434
+ * The finance-lease-inclusive total is the primary line for 390 CY2025Q4I
435
+ * filers that report no `PropertyPlantAndEquipmentNet` (Alphabet, Meta, and
436
+ * Tesla among them), but it adds finance-lease right-of-use assets — a
437
+ * different definition, so it stays out of `tags` (#36).
438
+ */
439
+ relatedTags: [
440
+ {
441
+ tag: 'PropertyPlantAndEquipmentAndFinanceLeaseRightOfUseAssetAfterAccumulatedDepreciationAndAmortization',
442
+ note: 'Net PP&E plus finance-lease right-of-use assets; the primary line for filers that present the two together.',
443
+ },
444
+ ],
445
+ /**
446
+ * Confirmed in the 20-F companyfacts of Spotify (SPOT) and SAP. The IFRS
447
+ * right-of-use-inclusive element is the counterpart of the related tag above,
448
+ * not of `PropertyPlantAndEquipmentNet`, so it stays out for the same reason;
449
+ * a filer that moved to it (SAP, after CY2022) reads as a stopped series.
450
+ */
451
+ ifrsTags: ['PropertyPlantAndEquipment'],
452
+ taxonomy: 'us-gaap',
453
+ unit: 'USD',
454
+ label: 'Property, Plant & Equipment (Net)',
455
+ },
384
456
  goodwill: {
385
457
  group: 'balance_sheet',
386
458
  tags: ['Goodwill'],
@@ -456,26 +528,141 @@ const CONCEPT_MAP = {
456
528
  label: 'Financing Cash Flow',
457
529
  },
458
530
  };
531
+ /** The catalog key an input compares as: trimmed, lowercased, `-` and spaces as `_`. */
532
+ function catalogKey(input) {
533
+ return input.trim().toLowerCase().replace(/[- ]/g, '_');
534
+ }
459
535
  /**
460
- * Resolve a concept input to its mapping. Accepts friendly names or raw XBRL tags.
461
- * Returns undefined if the input is not a known friendly name (caller should treat it as a raw tag).
536
+ * Resolve a concept input to its mapping. Accepts friendly names in any case or
537
+ * separator form (`Net Income`, `NET_INCOME`), with surrounding whitespace ignored.
538
+ * Returns undefined if the input is not a known friendly name.
462
539
  */
463
540
  export function resolveConcept(input) {
464
- const normalized = input.toLowerCase().replace(/[- ]/g, '_');
465
- return CONCEPT_MAP[normalized];
541
+ return CONCEPT_MAP[catalogKey(input)];
542
+ }
543
+ /**
544
+ * The shape of every item element in the us-gaap, ifrs-full, dei, and srt
545
+ * taxonomies — the only elements that carry facts. SEC matches tags
546
+ * case-sensitively (`netincomeloss` 404s where `NetIncomeLoss` answers), so an
547
+ * input of any other shape can name nothing SEC holds, and it never reaches a
548
+ * request URL, where tags are interpolated as path segments (#128).
549
+ */
550
+ const XBRL_TAG_SHAPE = /^[A-Z][A-Za-z0-9]*$/;
551
+ /**
552
+ * Standard combinations of catalog concepts, keyed like the catalog. Each is
553
+ * answered with its formula rather than near-name suggestions, which for these
554
+ * names are noise (`free_cash_flow` scores highest against the other two
555
+ * cash-flow totals) or empty (`ebitda`). `total_debt` is deliberately absent:
556
+ * `debt` is long-term debt only and the catalog has no current-portion concept,
557
+ * so any formula would understate it. A catalog name is resolved before this
558
+ * table is read, so a future catalog entry of the same name wins.
559
+ */
560
+ const DERIVATIONS = {
561
+ free_cash_flow: 'operating_cash_flow − capex',
562
+ ebitda: 'operating_income + depreciation_amortization',
563
+ working_capital: 'current_assets − current_liabilities',
564
+ };
565
+ /** Minimum Dice score for a catalog name to be suggested — the company-name threshold. */
566
+ const SUGGESTION_THRESHOLD = 0.3;
567
+ /** Maximum number of catalog names suggested for one unknown input. */
568
+ const SUGGESTION_LIMIT = 3;
569
+ /**
570
+ * Up to three catalog names nearest an input's catalog key, each scored on its
571
+ * friendly name and on its label (words, not underscores) and kept at the higher
572
+ * of the two, ties broken by name. The label is what reaches `capex` from
573
+ * `capital_expenditures`, which scores 0.21 against the name alone.
574
+ */
575
+ function nearestConcepts(key) {
576
+ const words = key.replace(/_/g, ' ');
577
+ return Object.entries(CONCEPT_MAP)
578
+ .map(([name, mapping]) => ({
579
+ name,
580
+ score: Math.max(trigramSimilarity(key, name), trigramSimilarity(words, mapping.label.toLowerCase())),
581
+ }))
582
+ .filter((candidate) => candidate.score >= SUGGESTION_THRESHOLD)
583
+ .sort((a, b) => b.score - a.score || a.name.localeCompare(b.name))
584
+ .slice(0, SUGGESTION_LIMIT)
585
+ .map((candidate) => candidate.name);
586
+ }
587
+ /** Closing sentence of every unknown-concept hint. */
588
+ const UNKNOWN_CONCEPT_TAIL = 'List every supported name with secedgar_search_concepts; a raw XBRL tag is an element name in UpperCamelCase, such as NetIncomeLoss.';
589
+ /** The concept-specific part of a hint, lowercase-first so it can follow a concept name. */
590
+ function unknownConceptDetail({ derivation, suggestions }) {
591
+ const parts = [
592
+ ...(derivation ? [`derive it as ${derivation} from those concepts`] : []),
593
+ ...(suggestions.length === 1 ? [`the closest supported name is ${suggestions[0]}`] : []),
594
+ ...(suggestions.length > 1 ? [`closest supported names are ${suggestions.join(', ')}`] : []),
595
+ ];
596
+ return parts.join('; ') || 'no supported name is close';
597
+ }
598
+ /**
599
+ * Recovery text for one unknown concept: its derivation or its suggestions,
600
+ * then the pointer to secedgar_search_concepts. Every surface that reports an
601
+ * unknown concept words it with this.
602
+ */
603
+ export function unknownConceptHint(unknown) {
604
+ if (!unknown.derivation && unknown.suggestions.length === 0)
605
+ return UNKNOWN_CONCEPT_TAIL;
606
+ const detail = unknownConceptDetail(unknown);
607
+ return `${detail[0]?.toUpperCase()}${detail.slice(1)}. ${UNKNOWN_CONCEPT_TAIL}`;
608
+ }
609
+ /**
610
+ * Classify a concept input before any company resolution or SEC request.
611
+ * Returns undefined for a catalog name (any case or separator form) and for
612
+ * anything shaped like an XBRL element name — a well-formed tag the filer does
613
+ * not report stays the tool's own no-data answer (#45). Everything else is
614
+ * unknown, with its derivation or nearest catalog names (#128).
615
+ */
616
+ export function findUnknownConcept(input) {
617
+ if (resolveConcept(input))
618
+ return;
619
+ const concept = input.trim();
620
+ const key = catalogKey(input);
621
+ /**
622
+ * Read before the tag-shape test so `EBITDA` gets its formula: no us-gaap,
623
+ * ifrs-full, dei, or srt element is named like any derivation key, so a
624
+ * tag-shaped spelling of one could only ever 404.
625
+ */
626
+ const derivation = DERIVATIONS[key];
627
+ if (!derivation && XBRL_TAG_SHAPE.test(concept))
628
+ return;
629
+ const suggestions = derivation ? [] : nearestConcepts(key);
630
+ return { concept, ...(derivation ? { derivation } : {}), suggestions };
631
+ }
632
+ /**
633
+ * Message and recovery hint for failing on one or more unknown concepts, so
634
+ * every tool words the failure the same way. One concept carries its own hint;
635
+ * several name each concept's detail in turn, then the shared closing sentence.
636
+ */
637
+ export function describeUnknownConcepts(unknowns) {
638
+ const [only] = unknowns;
639
+ if (only && unknowns.length === 1) {
640
+ return {
641
+ message: `${only.concept ? `'${only.concept}'` : 'An empty concept'} is neither a supported concept name nor an XBRL tag.`,
642
+ hint: unknownConceptHint(only),
643
+ };
644
+ }
645
+ return {
646
+ message: `None of the requested concepts is a supported concept name or an XBRL tag: ${unknowns
647
+ .map((u) => `'${u.concept}'`)
648
+ .join(', ')}.`,
649
+ hint: `${unknowns.map((u) => `${u.concept} — ${unknownConceptDetail(u)}`).join('; ')}. ${UNKNOWN_CONCEPT_TAIL}`,
650
+ };
466
651
  }
467
652
  /**
468
653
  * Resolve a concept input plus a requested taxonomy into the taxonomy and tag
469
654
  * list to query. A friendly name that prefers its own taxonomy (`dei` for
470
655
  * shares_outstanding) keeps it unless the caller asked for something other than
471
656
  * the `us-gaap` default; `ifrs-full` uses the mapping's confirmed IFRS variants
472
- * when it has them and falls back to the standard tags otherwise. Unknown input
473
- * passes through as a raw XBRL tag under the requested taxonomy.
657
+ * when it has them and falls back to the standard tags otherwise. Any other
658
+ * input passes through, trimmed, as a raw XBRL tag under the requested
659
+ * taxonomy — callers reject what `findUnknownConcept` flags before this runs.
474
660
  */
475
661
  export function resolveConceptTarget(input, requestedTaxonomy) {
476
662
  const mapping = resolveConcept(input);
477
663
  if (!mapping) {
478
- return { label: input, tagSelection: 'priority', tags: [input], taxonomy: requestedTaxonomy };
664
+ const tag = input.trim();
665
+ return { label: tag, tagSelection: 'priority', tags: [tag], taxonomy: requestedTaxonomy };
479
666
  }
480
667
  const taxonomy = requestedTaxonomy === 'us-gaap' ? mapping.taxonomy : requestedTaxonomy;
481
668
  /** Defined only when IFRS was asked for and the mapping has confirmed variants — they carry their own selection. */
@@ -1 +1 @@
1
- {"version":3,"file":"concept-map.js","sourceRoot":"","sources":["../../../src/services/edgar/concept-map.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,GAAmC;IAClD,OAAO,EAAE;QACP,KAAK,EAAE,kBAAkB;QACzB;;;;;;;;;;;;;;;WAeG;QACH,IAAI,EAAE;YACJ,qDAAqD;YACrD,UAAU;YACV,qDAAqD;YACrD,iBAAiB;YACjB,sBAAsB;SACvB;QACD;;;;;;;WAOG;QACH,QAAQ,EAAE,CAAC,SAAS,EAAE,mCAAmC,CAAC;QAC1D,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,SAAS;KACjB;IACD,UAAU,EAAE;QACV,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,CAAC,eAAe,CAAC;QACvB,6DAA6D;QAC7D,QAAQ,EAAE,CAAC,YAAY,CAAC;QACxB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,mBAAmB;KAC3B;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,CAAC,qBAAqB,CAAC;QAC7B,QAAQ,EAAE,CAAC,mCAAmC,CAAC;QAC/C,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,yBAAyB;KACjC;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,CAAC,aAAa,CAAC;QACrB,QAAQ,EAAE,CAAC,aAAa,CAAC;QACzB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,cAAc;KACtB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,CAAC,uBAAuB,CAAC;QAC/B,QAAQ,EAAE,CAAC,2BAA2B,CAAC;QACvC,QAAQ,EAAE,SAAS;QACnB,I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AAC,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC;YACrC,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC;YACjD,GAAG,CAAC,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACnE,CAAC;QACF,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,25 +1,68 @@
1
1
  /**
2
2
  * @fileoverview Frame-aligned XBRL series resolution, shared by every tool that
3
3
  * reads company facts. One value per standard calendar period: entries without a
4
- * `frame` are dropped, same-frame collisions resolve by tag priority (index 0 =
5
- * the preferred total), and ties within one tag resolve to the latest `filed`
6
- * date so a restatement replaces the original. Extracted from `get_financials`
7
- * so the snapshot and comparison tools produce numbers identical to it rather
8
- * than re-implementing the rules.
4
+ * `frame` are dropped, a frame held by a proxy statement is answered with the
5
+ * filer's reporting-form fact for the same period, same-frame collisions resolve
6
+ * by tag priority (index 0 = the preferred total), and ties within one tag
7
+ * resolve to the latest `filed` date so a restatement replaces the original.
8
+ * Every resolved value names the tag and unit key it was read under. Extracted
9
+ * from `get_financials` so the snapshot and comparison tools produce numbers
10
+ * identical to it rather than re-implementing the rules.
9
11
  * @module services/edgar/concept-series
10
12
  */
11
13
  import type { CompanyConceptUnit, CompanyFactsResponse, ConceptTaxonomy, TagSelection } from './types.js';
14
+ /** A reported value carrying where it was read from. */
15
+ export interface SourcedUnit extends CompanyConceptUnit {
16
+ /** XBRL tag the value was reported under. */
17
+ tag: string;
18
+ /** Unit-of-measure key the value sat under in the payload (`USD`, `EUR`, `shares`). */
19
+ unit: string;
20
+ }
12
21
  /** A reported value carrying the priority index of the tag that produced it. */
13
- export interface TagPrioritizedUnit extends CompanyConceptUnit {
22
+ export interface TagPrioritizedUnit extends SourcedUnit {
14
23
  /** Position of the source tag in the concept's tag array. Lower wins a collision. */
15
24
  tagIndex: number;
16
25
  }
17
26
  /** A reported value guaranteed to carry a standard calendar-period frame. */
18
- export interface FramedUnit extends CompanyConceptUnit {
27
+ export interface FramedUnit extends SourcedUnit {
19
28
  frame: string;
20
29
  }
30
+ /**
31
+ * Whether a fact comes from a proxy or information statement. Since the
32
+ * pay-versus-performance rule a DEF 14A re-tags five fiscal years of
33
+ * `NetIncomeLoss`, and SEC frames the latest-filed fact for a period, so the
34
+ * proxy's figure — often rounded, sometimes mis-scaled or sign-flipped — holds
35
+ * the annual frame over the 10-K's (#123).
36
+ */
37
+ export declare function isProxyForm(form: string): boolean;
38
+ /**
39
+ * Whether a fact comes from a quarterly report. SEC frames any roughly
40
+ * year-long duration as `CY####`, including the trailing-twelve-month figure a
41
+ * 10-Q discloses, so a 10-Q fact filed after the 10-K can hold an annual frame
42
+ * for a year the filer has not closed (#142).
43
+ */
44
+ export declare function isQuarterlyForm(form: string): boolean;
21
45
  /** Period filter applied to a resolved series. */
22
46
  export type PeriodType = 'annual' | 'quarterly' | 'all';
47
+ /**
48
+ * The fact a frame should resolve to, or `undefined` when the frame holds no
49
+ * value for that period. Two holder forms are corrected; every other form keeps
50
+ * its frame — an 8-K recast carries a restatement no later periodic report
51
+ * repeats (Bank of America's CY2013 is 10,539M from its 2016 8-K against
52
+ * 11,431M in the 10-K before it).
53
+ *
54
+ * - A proxy statement (#123): the latest reporting-form fact for the same
55
+ * period, else the proxy value, which is still the filer's reported figure.
56
+ * - A quarterly report holding an annual `CY####` frame (#142): the latest
57
+ * same-period fact from a form that is neither a quarterly report nor a proxy
58
+ * statement (the 10-K, in practice), else the holder when it covers a
59
+ * closed fiscal year a later 10-Q happens to disclose ({@link closesFiscalYear}),
60
+ * else nothing — a trailing-twelve-month or unfinished-year figure is not an
61
+ * annual value. Quarterly and instant frames from 10-Qs are untouched.
62
+ *
63
+ * `sameSeries` is the holder's tag under its unit key.
64
+ */
65
+ export declare function frameHolderFact<T extends CompanyConceptUnit>(holder: T, sameSeries: readonly T[]): T | undefined;
23
66
  /**
24
67
  * Original index of the tag that answers the concept for this filer, or
25
68
  * `undefined` when no tag reported anything. This is the tag whose label,
@@ -49,8 +92,16 @@ export declare function preferredTagIndex(units: readonly TagPrioritizedUnit[],
49
92
  * {@link seriesStalenessCaveats} exists to report (#101, #102).
50
93
  *
51
94
  * Within one tag, the later `filed` date wins so an amended filing replaces the
52
- * original. Returns an empty map when nothing carried a frame — the caller
53
- * distinguishes that from "the concept is not reported at all".
95
+ * original. A frame held by a proxy statement, or an annual frame held by a
96
+ * quarterly report, is first corrected within its own tag and unit key
97
+ * ({@link frameHolderFact}), keeping the frame. That runs before the cross-tag
98
+ * collision, so a proxy-held frame in the leading tag takes its twin from that
99
+ * tag and is never handed to a lower one (#123); a trailing-twelve-month frame
100
+ * the leader holds drops out, and a lower tag may then fill it with a real
101
+ * annual value (#142).
102
+ *
103
+ * Returns an empty map when nothing carried a frame — the caller distinguishes
104
+ * that from "the concept is not reported at all".
54
105
  */
55
106
  export declare function resolveFrameSeries(units: readonly TagPrioritizedUnit[], selection?: TagSelection): Map<string, FramedUnit>;
56
107
  /** What a series' newest period is being measured against. */
@@ -122,31 +173,41 @@ export declare function seriesStalenessCaveats(tag: string, label: string, newes
122
173
  export declare function matchesPeriodType(frame: string, periodType: PeriodType): boolean;
123
174
  /** One concept resolved out of a companyfacts payload. */
124
175
  export interface ConceptSeries {
125
- /** XBRL taxonomy description. Absent for company-extension and older tags. */
176
+ /** XBRL taxonomy description of `tag`. Absent for company-extension and older tags. */
126
177
  description?: string;
127
- /** Human-readable label from the taxonomy. */
178
+ /** Human-readable taxonomy label of `tag`. */
128
179
  label: string;
129
- /** Frame-aligned values, newest first. Empty when the tag reports no framed periods. */
180
+ /**
181
+ * Frame-aligned values, newest first, each naming its own source tag and unit
182
+ * key. Empty when the tag reports no framed periods.
183
+ */
130
184
  series: FramedUnit[];
131
- /** The tag that produced the values. */
185
+ /** The tag behind the newest value — the one describing the line. */
132
186
  tag: string;
133
187
  /** Every tag attempted, in priority order. */
134
188
  tagsTried: string[];
135
189
  /** Taxonomy the values were read from. */
136
190
  taxonomy: string;
137
- /** Unit of measure key (e.g. `USD`, `USD/shares`, `shares`). */
191
+ /** Unit of measure key of the newest value (e.g. `USD`, `USD/shares`, `shares`). */
138
192
  unit: string;
139
193
  }
194
+ /**
195
+ * The tag a resolved series is described by: the one behind its newest value.
196
+ * A successor appended behind an older leader (#125) answers the recent frames
197
+ * while the leader answers the old ones, so the leader — or whichever tag
198
+ * `preferredTagIndex` picks — would describe the series by a tag that produced
199
+ * none of its current values. Under `coverage` only the winner contributes, so
200
+ * the two agree. Falls back to `preferredTagIndex` when nothing carried a frame.
201
+ */
202
+ export declare function describingTag(series: readonly FramedUnit[], units: readonly TagPrioritizedUnit[], selection: TagSelection): string | undefined;
140
203
  /**
141
204
  * Resolve one concept from a companyfacts payload, applying the same tag
142
205
  * selection and frame dedup as {@link resolveFrameSeries}. Returns `undefined`
143
206
  * when the filer reports none of the candidate tags under this taxonomy, which
144
207
  * the caller surfaces as a gap alongside the tags it tried.
145
208
  *
146
- * The reported `tag`, `label`, `description`, and `unit` come from the tag that
147
- * won for this filer, not from the first one present — under `coverage` those
148
- * differ, and describing the series by a tag that lost every frame would misname
149
- * the values.
209
+ * The reported `tag`, `label`, `description`, and `unit` describe the tag behind
210
+ * the newest value ({@link describingTag}), not the first one present.
150
211
  */
151
212
  export declare function seriesFromCompanyFacts(facts: CompanyFactsResponse, taxonomy: string, tags: readonly string[], selection?: TagSelection): ConceptSeries | undefined;
152
213
  //# sourceMappingURL=concept-series.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"concept-series.d.ts","sourceRoot":"","sources":["../../../src/services/edgar/concept-series.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GAS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E,UAAU,EAAE,UAAU,GAAG,OAAO,CAIhF;AAED,0DAA0D;AAC1D,MAAM,WAAW,aAAa;IAC5B,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,oBAAoB,EAC3B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,SAAS,GAAE,YAAyB,GACnC,aAAa,GAAG,SAAS,CAsC3B"}
1
+ {"version":3,"file":"concept-series.d.ts","sourceRoot":"","sources":["../../../src/services/edgar/concept-series.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,wDAAwD;AACxD,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gFAAgF;AAChF,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,qFAAqF;IACrF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,6EAA6E;AAC7E,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf;AASD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;A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