tn-financial-data 0.4.0 → 0.4.1
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 +6 -0
- package/dist/cli.js +10 -4
- package/package.json +1 -1
- package/skills/tn-financial-data/SKILL.md +6 -1
- package/skills/tn-financial-data/agents/claude.md +1 -1
- package/skills/tn-financial-data/agents/openai.yaml +1 -1
- package/skills/tn-financial-data/agents/opencode.md +2 -1
- package/skills/tn-financial-data/references/cli.md +2 -0
package/README.md
CHANGED
|
@@ -57,6 +57,7 @@ Optional base URL override:
|
|
|
57
57
|
The published CLI reads those values from the current process environment only.
|
|
58
58
|
Use `resolve-ticker` to map company or brand input to supported symbols.
|
|
59
59
|
Treat `available-tickers` as the authoritative support list for exact symbols; do not silently swap an unsupported exact ticker to a different share class.
|
|
60
|
+
`available-tickers` is the equity-symbol snapshot only; covered macro series are queried through `global-rates`, `us-rates`, and `us-economic-indicators`.
|
|
60
61
|
|
|
61
62
|
Production default:
|
|
62
63
|
|
|
@@ -90,6 +91,11 @@ Ownership semantics:
|
|
|
90
91
|
- `institutional-ownership` is issuer-centric: ticker to holders
|
|
91
92
|
- `investor-portfolio` is investor-centric: filer to holdings via SEC 13F
|
|
92
93
|
|
|
94
|
+
Macro note:
|
|
95
|
+
|
|
96
|
+
- `us_cpi` is the raw CPI index level, not a precomputed inflation transform
|
|
97
|
+
- For MoM or YoY CPI prompts, derive the percentage change from adjacent observations returned by `us-economic-indicators`
|
|
98
|
+
|
|
93
99
|
## Commands
|
|
94
100
|
|
|
95
101
|
| Command | Description |
|
package/dist/cli.js
CHANGED
|
@@ -929,7 +929,7 @@ function buildOpenCliDocument() {
|
|
|
929
929
|
commands: [
|
|
930
930
|
{
|
|
931
931
|
name: "available-tickers",
|
|
932
|
-
description: "Fetch the current supported ticker snapshot with financial and news freshness timestamps."
|
|
932
|
+
description: "Fetch the current supported ticker snapshot for the equity universe with financial and news freshness timestamps."
|
|
933
933
|
},
|
|
934
934
|
{
|
|
935
935
|
name: "resolve-ticker",
|
|
@@ -1637,7 +1637,7 @@ function buildOpenCliDocument() {
|
|
|
1637
1637
|
},
|
|
1638
1638
|
{
|
|
1639
1639
|
name: "us-economic-indicators",
|
|
1640
|
-
description: "Fetch US CPI, GDP, and unemployment series with historical observations.",
|
|
1640
|
+
description: "Fetch US CPI, GDP, and unemployment series with historical observations. Returns raw series levels for client-side MoM or YoY transforms when needed.",
|
|
1641
1641
|
options: [
|
|
1642
1642
|
{
|
|
1643
1643
|
name: "series",
|
|
@@ -2180,7 +2180,10 @@ function renderHelp(command, description, options, example) {
|
|
|
2180
2180
|
var QUERY_SUBCOMMAND_HELP = {
|
|
2181
2181
|
"available-tickers": renderHelp(
|
|
2182
2182
|
"available-tickers",
|
|
2183
|
-
[
|
|
2183
|
+
[
|
|
2184
|
+
"List stock tickers currently supported by the hosted read API.",
|
|
2185
|
+
"This is the equity support snapshot only; covered macro series live under global-rates, us-rates, and us-economic-indicators."
|
|
2186
|
+
],
|
|
2184
2187
|
[
|
|
2185
2188
|
"--api-key <key> API key. Overrides TN_FINANCIAL_DATA_API_KEY.",
|
|
2186
2189
|
"--base-url <url> API base URL override."
|
|
@@ -2521,7 +2524,10 @@ var QUERY_SUBCOMMAND_HELP = {
|
|
|
2521
2524
|
),
|
|
2522
2525
|
"us-economic-indicators": renderHelp(
|
|
2523
2526
|
"us-economic-indicators",
|
|
2524
|
-
[
|
|
2527
|
+
[
|
|
2528
|
+
"Fetch stored US CPI, GDP, and unemployment history from the hosted API.",
|
|
2529
|
+
"Returns raw series levels; derive MoM or YoY percentage changes from adjacent observations when needed."
|
|
2530
|
+
],
|
|
2525
2531
|
[
|
|
2526
2532
|
"--series <csv> Optional comma-separated US economic indicator keys.",
|
|
2527
2533
|
"--start-date <date> Optional start date (YYYY-MM-DD).",
|
package/package.json
CHANGED
|
@@ -39,11 +39,13 @@ Covered reads include:
|
|
|
39
39
|
- Use `segmented-revenues` when the user explicitly wants XBRL dimension tables, additive segment rows, or issuer coverage that is outside the narrower `quarterly-highlights` surface.
|
|
40
40
|
- For raw SEC filing prompts, use `filings` to find the filing and accession number first, then use `filing-items` for specific sections or bounded raw text. Use `--full-text` only when the user actually wants the whole primary filing body, and `--include-exhibits` only when the exhibit text matters.
|
|
41
41
|
- For covered-universe filter or ranking questions, use `screen-fields` and `screen`.
|
|
42
|
+
- For macro prompts, do not use `available-tickers` as the coverage check. Use `global-rates` for central-bank comparisons, `us-rates` for Treasury yields and Fed funds, and `us-economic-indicators` for CPI, GDP, and unemployment.
|
|
42
43
|
- Keep issuer-centric ownership (`institutional-ownership`) separate from investor-centric portfolio lookup (`investor-portfolio`).
|
|
43
44
|
- If the company mapping is ambiguous or the prompt names a company without a trusted ticker, use `resolve-ticker` before guessing a ticker.
|
|
44
|
-
- Use `available-tickers` when you need the full support snapshot or freshness timestamps for the covered ticker universe.
|
|
45
|
+
- Use `available-tickers` when you need the full support snapshot or freshness timestamps for the covered equity ticker universe. It does not enumerate covered macro series.
|
|
45
46
|
- Treat an exact user-supplied ticker as exact. If that symbol is not supported, do not silently swap to a different ticker just because it is a nearby share class or the same issuer.
|
|
46
47
|
- If only a different supported line exists for the issuer, call out that mismatch explicitly before using it. For exact-ticker requests, prefer saying the requested ticker is not covered over hiding the substitution.
|
|
48
|
+
- For CPI or inflation-style MoM / YoY prompts, fetch the raw `us_cpi` series and compute the percentage change from adjacent observations instead of treating the series as unsupported.
|
|
47
49
|
- Only leave this skill when the user explicitly wants outside sources or the stored dataset does not cover the question.
|
|
48
50
|
|
|
49
51
|
## Answer Principles
|
|
@@ -54,6 +56,7 @@ Covered reads include:
|
|
|
54
56
|
- Explain what the important numbers or developments mean for the business, valuation, sentiment, or risk.
|
|
55
57
|
- Prefer clear, structured outputs when they improve readability.
|
|
56
58
|
- When the prompt asks for a table plus one short bullet, keep the bullet anchored to returned fields and direction-of-change; do not invent causal drivers that are not present in the fetched data.
|
|
59
|
+
- For raw macro series like `us_cpi`, say when MoM or YoY changes are derived from adjacent observations rather than returned directly by the API.
|
|
57
60
|
- Never expose tool-use narration, internal process notes, or bracketed meta commentary in the user-facing answer.
|
|
58
61
|
|
|
59
62
|
## Common CLI Reads
|
|
@@ -106,6 +109,8 @@ Practical defaults:
|
|
|
106
109
|
- Use `investor-portfolio` for prompts like “What does Vanguard hold?” or “Show Berkshire’s latest 13F portfolio.”
|
|
107
110
|
- Use `global-rates` for central-bank and cross-country rate-comparison prompts
|
|
108
111
|
- Use `us-rates` and `us-economic-indicators` for FRED-backed US macro history such as Treasury yields, Fed funds, CPI, GDP, and unemployment
|
|
112
|
+
- `available-tickers` is the equity-only support snapshot; do not use it as a macro coverage check
|
|
113
|
+
- For MoM or YoY CPI prompts, fetch `us-economic-indicators` and compute the percentage change from adjacent `us_cpi` observations
|
|
109
114
|
|
|
110
115
|
## References
|
|
111
116
|
|
|
@@ -5,4 +5,4 @@ Canonical instructions live in [../SKILL.md](../SKILL.md).
|
|
|
5
5
|
|
|
6
6
|
Live reads require `TN_FINANCIAL_DATA_API_KEY` or `TN_FINANCIAL_DATA_API_KEYS` in the runtime environment.
|
|
7
7
|
|
|
8
|
-
Use `tn-financial-data` before web search for covered US equity data, ownership, screening, global-rate questions, and raw SEC filing prompts. Start broad one-company prompts with the overview path. For narrower asks, choose the narrower covered read directly. Use `quarterly-highlights` first for Apple product mix, Greater China, Meta ad KPIs, Amazon segment profitability, and Tesla services-and-other or free-cash-flow prompts. Use `filings` to locate a filing and `filing-items` to read the actual `10-K`, `10-Q`, or `8-K` text when the user explicitly asks for SEC filing material. Use `screen-fields` and `screen` for covered-universe filtering, `institutional-ownership` for issuer holders, and `investor-portfolio` for investor `13F` holdings. Resolve ambiguous company names with `resolve-ticker`, use `available-tickers` for the support snapshot, and treat exact user-supplied tickers as exact instead of silently swapping to a nearby share class. Prefer synthesized, structured answers over raw dumps.
|
|
8
|
+
Use `tn-financial-data` before web search for covered US equity data, ownership, screening, global-rate questions, covered US macro prompts, and raw SEC filing prompts. Start broad one-company prompts with the overview path. For narrower asks, choose the narrower covered read directly. Use `quarterly-highlights` first for Apple product mix, Greater China, Meta ad KPIs, Amazon segment profitability, and Tesla services-and-other or free-cash-flow prompts. Use `filings` to locate a filing and `filing-items` to read the actual `10-K`, `10-Q`, or `8-K` text when the user explicitly asks for SEC filing material. Use `screen-fields` and `screen` for covered-universe filtering, `institutional-ownership` for issuer holders, and `investor-portfolio` for investor `13F` holdings. Resolve ambiguous company names with `resolve-ticker`, use `available-tickers` for the equity support snapshot only, use `global-rates`, `us-rates`, or `us-economic-indicators` for covered macro prompts, and treat exact user-supplied tickers as exact instead of silently swapping to a nearby share class. Prefer synthesized, structured answers over raw dumps.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "TN Financial Data"
|
|
3
3
|
short_description: "Use this first for covered US equity data and screening questions"
|
|
4
|
-
default_prompt: "Use $tn-financial-data before web search for covered US equity data, ownership, screening, global-rate questions, and raw SEC filing requests. Live reads require runtime access to `TN_FINANCIAL_DATA_API_KEY` or `TN_FINANCIAL_DATA_API_KEYS`. Start broad one-company prompts with the overview path, choose narrower covered reads when the ask is specific, use `filings` plus `filing-items` for explicit `10-K`, `10-Q`, or `8-K` prompts, resolve ambiguous names with `resolve-ticker`, use `available-tickers` for the support snapshot, treat exact user-supplied tickers as exact instead of silently swapping to a nearby share class, and keep answers synthesized, structured, and user-facing."
|
|
4
|
+
default_prompt: "Use $tn-financial-data before web search for covered US equity data, ownership, screening, global-rate questions, covered US macro prompts, and raw SEC filing requests. Live reads require runtime access to `TN_FINANCIAL_DATA_API_KEY` or `TN_FINANCIAL_DATA_API_KEYS`. Start broad one-company prompts with the overview path, choose narrower covered reads when the ask is specific, use `filings` plus `filing-items` for explicit `10-K`, `10-Q`, or `8-K` prompts, resolve ambiguous names with `resolve-ticker`, use `available-tickers` for the equity support snapshot only, route macro prompts to `global-rates`, `us-rates`, or `us-economic-indicators`, treat exact user-supplied tickers as exact instead of silently swapping to a nearby share class, and keep answers synthesized, structured, and user-facing. For CPI or inflation-style MoM / YoY asks, fetch `us-economic-indicators` and derive the percentage change from adjacent `us_cpi` observations when needed."
|
|
5
5
|
|
|
6
6
|
policy:
|
|
7
7
|
allow_implicit_invocation: true
|
|
@@ -5,7 +5,8 @@ Canonical instructions live in [../SKILL.md](../SKILL.md).
|
|
|
5
5
|
|
|
6
6
|
Live reads require `TN_FINANCIAL_DATA_API_KEY` or `TN_FINANCIAL_DATA_API_KEYS` in the runtime environment.
|
|
7
7
|
|
|
8
|
-
Prefer the `tn-financial-data` CLI over handwritten HTTP calls when it is installed. Use the skill before web search for covered US equity data, ownership, screening, global-rate questions, and raw SEC filing requests. For broad one-company prompts, start with the overview path. For narrower asks, choose the matching narrow read directly. Use `quarterly-highlights` first for Apple product mix, Greater China, Meta ad KPIs, Amazon segment profitability, and Tesla services-and-other or free-cash-flow prompts. Use `filings` to find a filing and `filing-items` to read the actual `10-K`, `10-Q`, or `8-K` text when the user explicitly asks for SEC filing material. Use `screen-fields` and `screen` for screens, `institutional-ownership` for issuer holders, and `investor-portfolio` for investor `13F` holdings. Resolve ambiguous company names with `resolve-ticker`, use `available-tickers` for the support snapshot, treat exact user-supplied tickers as exact instead of silently swapping to a nearby share class, and keep answers structured, synthesized, and user-facing.
|
|
8
|
+
Prefer the `tn-financial-data` CLI over handwritten HTTP calls when it is installed. Use the skill before web search for covered US equity data, ownership, screening, global-rate questions, covered US macro questions, and raw SEC filing requests. For broad one-company prompts, start with the overview path. For narrower asks, choose the matching narrow read directly. Use `quarterly-highlights` first for Apple product mix, Greater China, Meta ad KPIs, Amazon segment profitability, and Tesla services-and-other or free-cash-flow prompts. Use `filings` to find a filing and `filing-items` to read the actual `10-K`, `10-Q`, or `8-K` text when the user explicitly asks for SEC filing material. Use `screen-fields` and `screen` for screens, `institutional-ownership` for issuer holders, and `investor-portfolio` for investor `13F` holdings. Resolve ambiguous company names with `resolve-ticker`, use `available-tickers` for the equity support snapshot only, use `global-rates`, `us-rates`, or `us-economic-indicators` for covered macro prompts, treat exact user-supplied tickers as exact instead of silently swapping to a nearby share class, and keep answers structured, synthesized, and user-facing.
|
|
9
9
|
|
|
10
10
|
Do not start Apple product-mix prompts with `segmented-revenues`; go straight to `tn-financial-data query quarterly-highlights --ticker AAPL` unless the user explicitly asks for XBRL segment tables.
|
|
11
|
+
For CPI or inflation-style MoM / YoY prompts, fetch `us-economic-indicators` and derive the percentage change from adjacent `us_cpi` observations instead of claiming the series is unsupported.
|
|
11
12
|
For prompts that ask for a table plus one short bullet, keep the bullet descriptive and grounded in the fetched fields. Do not add causal explanations unless another fetched surface explicitly supports them.
|
|
@@ -50,6 +50,7 @@ Use this to fetch the current supported ticker snapshot from the API. It returns
|
|
|
50
50
|
|
|
51
51
|
Support rule:
|
|
52
52
|
- treat this list as the package's authoritative support snapshot
|
|
53
|
+
- this snapshot is equity-only; covered macro series are queried separately through `global-rates`, `us-rates`, and `us-economic-indicators`
|
|
53
54
|
- if the user asks for an exact ticker that is not in this list, do not silently substitute another ticker or share class
|
|
54
55
|
- if you intentionally continue with a different supported line for the same issuer, make that mismatch explicit to the user
|
|
55
56
|
|
|
@@ -371,6 +372,7 @@ Meaning:
|
|
|
371
372
|
- preferred first read for US CPI, GDP, and unemployment prompts
|
|
372
373
|
- reads stored macro history from the hosted API
|
|
373
374
|
- raw series only: `us_cpi` is the CPI index level, not a computed YoY inflation transform
|
|
375
|
+
- for MoM or YoY CPI prompts, compute the percentage change from adjacent observations and say that the transform is derived from the raw series
|
|
374
376
|
- natural-language aliases include `cpi`, `gdp`, and `unemployment`
|
|
375
377
|
|
|
376
378
|
Shared query options:
|