@drico2008/fincli 0.3.0 → 0.3.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/fincli/__init__.py +1 -1
- package/fincli/app/analysis/assistant_context.py +1 -1
- package/fincli/app/cli/router.py +3 -3
- package/fincli/app/modules/economic_calendar.py +1 -1
- package/fincli/app/plugins/loader.py +1 -1
- package/fincli/app/services/macro_data.py +1 -1
- package/fincli/app/storage/database.py +1 -1
- package/npm/bin/fincli.js +24 -1
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/fincli/__init__.py
CHANGED
|
@@ -6,7 +6,7 @@ import re
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
FINCLI_ASSISTANT_SYSTEM_PROMPT = """
|
|
9
|
-
You are FinCLI AI Assistance, the embedded assistant inside FinCLI v0.3.
|
|
9
|
+
You are FinCLI AI Assistance, the embedded assistant inside FinCLI v0.3.1.
|
|
10
10
|
|
|
11
11
|
Identity and scope:
|
|
12
12
|
- FinCLI is a terminal-first financial dashboard for market data, news/fundamentals, technical analysis, watchlists, portfolios, journals, and provider configuration.
|
package/fincli/app/cli/router.py
CHANGED
|
@@ -281,7 +281,7 @@ class CommandRouter:
|
|
|
281
281
|
)
|
|
282
282
|
|
|
283
283
|
def _help_table(self) -> Table:
|
|
284
|
-
table = Table(title="FinCLI v0.3.
|
|
284
|
+
table = Table(title="FinCLI v0.3.1 Commands", expand=True)
|
|
285
285
|
table.add_column("Command", style="cyan", no_wrap=True)
|
|
286
286
|
table.add_column("Group", style="magenta")
|
|
287
287
|
table.add_column("Fungsi", style="white")
|
|
@@ -624,7 +624,7 @@ class CommandRouter:
|
|
|
624
624
|
table.add_column("Check", style="cyan", no_wrap=True)
|
|
625
625
|
table.add_column("Status")
|
|
626
626
|
table.add_column("Detail", overflow="fold")
|
|
627
|
-
table.add_row("Version", "ok", "FinCLI v0.3.
|
|
627
|
+
table.add_row("Version", "ok", "FinCLI v0.3.1 command surface loaded.")
|
|
628
628
|
table.add_row("Database", "ok", str(self.db.db_file))
|
|
629
629
|
table.add_row("Market Provider", "ok", ", ".join(provider.name for provider in self.market_service.providers))
|
|
630
630
|
profile = self.user_profiles.get()
|
|
@@ -2366,7 +2366,7 @@ def _format_plugins(plugins: list[PluginManifest], status_only: bool = False) ->
|
|
|
2366
2366
|
if not status_only:
|
|
2367
2367
|
empty.append("Create ~/.fincli/plugins/<name>/plugin.json to register a local plugin.")
|
|
2368
2368
|
table.add_row(*empty)
|
|
2369
|
-
table.caption = "Plugins are manifest-only in v0.3.
|
|
2369
|
+
table.caption = "Plugins are manifest-only in v0.3.1; FinCLI does not execute plugin code yet."
|
|
2370
2370
|
return table
|
|
2371
2371
|
|
|
2372
2372
|
|
|
@@ -89,7 +89,7 @@ class PublicEconomicCalendarService:
|
|
|
89
89
|
client = self._client or httpx.AsyncClient(
|
|
90
90
|
timeout=20,
|
|
91
91
|
follow_redirects=True,
|
|
92
|
-
headers={"User-Agent": "FinCLI/0.3.
|
|
92
|
+
headers={"User-Agent": "FinCLI/0.3.1 economic-calendar"},
|
|
93
93
|
)
|
|
94
94
|
errors: list[str] = []
|
|
95
95
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Local plugin discovery for FinCLI.
|
|
2
2
|
|
|
3
|
-
Plugins are intentionally manifest-first in v0.3.
|
|
3
|
+
Plugins are intentionally manifest-first in v0.3.1: FinCLI reads metadata and
|
|
4
4
|
exposes status, but does not execute plugin code yet. This keeps the plugin
|
|
5
5
|
surface useful without creating a security footgun.
|
|
6
6
|
"""
|
|
@@ -19,7 +19,7 @@ class MacroIndicator:
|
|
|
19
19
|
class MacroDataService:
|
|
20
20
|
"""Return macro context from free fallback datasets.
|
|
21
21
|
|
|
22
|
-
v0.3.
|
|
22
|
+
v0.3.1 keeps this deterministic/offline so /macro remains usable without API keys.
|
|
23
23
|
Provider-backed DBnomics/FRED/World Bank adapters can hydrate this shape later.
|
|
24
24
|
"""
|
|
25
25
|
|
|
@@ -153,7 +153,7 @@ class FinCLIDatabase:
|
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
def _migrate_user_profile_schema(db: sqlite3.Connection) -> None:
|
|
156
|
-
"""Normalize older user_profile schemas to the v0.3.
|
|
156
|
+
"""Normalize older user_profile schemas to the v0.3.1 canonical shape."""
|
|
157
157
|
|
|
158
158
|
columns = {str(row["name"]) for row in db.execute("PRAGMA table_info(user_profile)").fetchall()}
|
|
159
159
|
canonical = {"id", "name", "equity", "currency", "leverage", "years_in_investment", "gameplay", "updated_at"}
|
package/npm/bin/fincli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require("fs");
|
|
4
4
|
const path = require("path");
|
|
5
|
-
const { spawn } = require("child_process");
|
|
5
|
+
const { spawn, spawnSync } = require("child_process");
|
|
6
6
|
|
|
7
7
|
const packageRoot = path.resolve(__dirname, "..", "..");
|
|
8
8
|
const packageJson = require(path.join(packageRoot, "package.json"));
|
|
@@ -25,6 +25,8 @@ function run() {
|
|
|
25
25
|
process.exit(1);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
ensurePythonRuntime();
|
|
29
|
+
|
|
28
30
|
const child = spawn(pythonBin, ["-m", "fincli.app.main", ...args], {
|
|
29
31
|
cwd: packageRoot,
|
|
30
32
|
stdio: "inherit"
|
|
@@ -39,4 +41,25 @@ function run() {
|
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
|
|
44
|
+
function ensurePythonRuntime() {
|
|
45
|
+
const probe = spawnSync(pythonBin, ["-c", "import textual, rich, httpx, pydantic, yfinance, pandas, numpy"], {
|
|
46
|
+
cwd: packageRoot,
|
|
47
|
+
stdio: "ignore"
|
|
48
|
+
});
|
|
49
|
+
if (probe.status === 0) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
console.error("FinCLI Python dependencies are incomplete. Repairing local npm runtime...");
|
|
54
|
+
const repair = spawnSync(pythonBin, ["-m", "pip", "install", "."], {
|
|
55
|
+
cwd: packageRoot,
|
|
56
|
+
stdio: "inherit"
|
|
57
|
+
});
|
|
58
|
+
if (repair.status !== 0) {
|
|
59
|
+
console.error("FinCLI runtime repair failed.");
|
|
60
|
+
console.error("Try reinstalling with: npm install -g @drico2008/fincli");
|
|
61
|
+
process.exit(repair.status ?? 1);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
42
65
|
run();
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED