Skip to content

FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.

Mcp and tool system fixes

tilakpatel22ec88590aa6e9
diff --git a/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.desktop b/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.desktop
index 7bbc5cae2..53c440025 100644
--- a/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.desktop
+++ b/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.desktop
@@ -4,11 +4,10 @@ Type=Application
Name=Fincept Terminal
GenericName=Financial Intelligence Terminal
Comment=Professional financial data terminal with AI analytics, trading, and market data
-Exec=FinceptTerminal %U
+Exec=FinceptTerminal
Icon=in.fincept.FinceptTerminal
Terminal=false
StartupWMClass=FinceptTerminal
StartupNotify=true
Categories=Finance;Office;Science;
-MimeType=application/x-fincept;
Keywords=finance;trading;stocks;crypto;portfolio;AI;analytics;markets;
diff --git a/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.metainfo.xml b/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.metainfo.xml
index ce24615a4..8287a615c 100644
--- a/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.metainfo.xml
+++ b/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.metainfo.xml
@@ -46,23 +46,23 @@
<screenshots>
<screenshot type="default">
<caption>Dashboard with customizable widget grid</caption>
- <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/main/images/Dashboard.png</image>
+ <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/v4.4.1/images/Dashboard.png</image>
</screenshot>
<screenshot>
<caption>Equity research with comprehensive analysis</caption>
- <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/main/images/EquityResearch.png</image>
+ <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/v4.4.1/images/EquityResearch.png</image>
</screenshot>
<screenshot>
<caption>Portfolio management and analytics</caption>
- <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/main/images/Portfolio.png</image>
+ <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/v4.4.1/images/Portfolio.png</image>
</screenshot>
<screenshot>
<caption>News aggregation from multiple sources</caption>
- <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/main/images/News.png</image>
+ <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/v4.4.1/images/News.png</image>
</screenshot>
<screenshot>
<caption>Visual node editor for workflows</caption>
- <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/main/images/NodeEditor.png</image>
+ <image>https://raw.githubusercontent.com/Fincept-Corporation/FinceptTerminal/v4.4.1/images/NodeEditor.png</image>
</screenshot>
</screenshots>
@@ -71,6 +71,15 @@
</provides>
<releases>
+ <!-- 4.5.0 is NOT released yet: no v4.4.1-style tag exists for it and
+ updates.json still reports 4.4.1. The Flatpak manifest therefore
+ builds v4.4.1, and the newest release listed here must match what
+ is actually shipped, or Flathub advertises a version whose binary
+ it does not have. Notes kept verbatim: on tagging v4.5.0, delete
+ these two comment lines and bump tag+commit in the manifest.
+ <release version="4.5.0" ...> block below is inert until then.
+ -->
+ <!--
<release version="4.5.0" date="2026-08-31">
<description>
<p>Fixes AI tool calling with Google Gemini. Around 150 tools take a free-form options object, which Gemini's schema cannot express; those tools were being advertised to Gemini as taking no arguments at all, so the assistant could call them but never pass them anything. They now work on Gemini as they already did on other providers.</p>
@@ -79,6 +88,7 @@
<p>Tool sequences now have a time limit as well as a step limit, and say which one ran out instead of stopping without explanation. Also fixes the AstraFlow and AstraFlow CN providers failing to find their endpoint when the base URL field was cleared.</p>
</description>
</release>
+ -->
<release version="4.4.1" date="2026-08-19">
<description>
<p>Adds the TickerAll (MetaTrader 5) broker integration, so MT5 accounts can be linked, funded and traded from the equity trading screen alongside the existing brokers.</p>
diff --git a/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.yml b/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.yml
index 325d82e89..76274b3c1 100644
--- a/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.yml
+++ b/fincept-qt/packaging/flatpak/in.fincept.FinceptTerminal.yml
@@ -52,10 +52,17 @@ modules:
- cmake --build _build --parallel
- cmake --install _build
sources:
- # Main repository
+ # Main repository.
+ # Flathub's linter REQUIRES a commit alongside a tag ("this is an error
+ # for new submissions if a commit is missing with a tag") — tags are
+ # mutable, so the commit is what makes the build reproducible.
+ # Pinned to the latest *released* tag. Bump both fields together on each
+ # release; a tag that does not exist fails the build at source fetch,
+ # which is what v4.5.0 did here before it was ever tagged.
- type: git
url: https://github.com/Fincept-Corporation/FinceptTerminal.git
- tag: v4.5.0
+ tag: v4.4.1
+ commit: 4d169bd4e1a5011ecc1d8befedb8e0d713dbfe3e
# Vendored FetchContent dependencies (no network during build)
- type: git
url: https://github.com/QtExcel/QXlsx.git
diff --git a/fincept-qt/packaging/flatpak/preflight.py b/fincept-qt/packaging/flatpak/preflight.py
new file mode 100644
index 000000000..18b872540
--- /dev/null
+++ b/fincept-qt/packaging/flatpak/preflight.py
@@ -0,0 +1,127 @@
+"""Offline pre-flight for the Flathub submission.
+
+Checks the subset of flatpak-builder-lint / AppStream rules that can be
+verified WITHOUT a Linux box, so the real lint run passes first time:
+
+ * every git source is pinned (Flathub: a tag without a commit is a hard
+ error for new submissions -- tags are mutable)
+ * the ref the manifest builds actually EXISTS on the remote, and its commit
+ matches the tag (the manifest once pointed at an untagged v4.5.0, so the
+ build could never have succeeded)
+ * screenshots are pinned to a tag/commit, not a mutable branch
+ * the newest <release> matches the version the manifest builds, so Flathub
+ cannot advertise a version whose binary it does not have
+ * the desktop entry is internally consistent with the manifest and declares
+ no MIME type or field code the app cannot honour
+
+Run: python preflight.py (needs pyyaml; exits non-zero on any failure)
+
+It does NOT replace flatpak-builder-lint -- run that on Linux too. See
+FLATHUB.md.
+"""
+import io, os, re, sys, subprocess, xml.dom.minidom
+import yaml
+
+D = os.path.dirname(os.path.abspath(__file__))
+# <repo>/fincept-qt/packaging/flatpak -> <repo>
+REPO = os.path.abspath(os.path.join(D, "..", "..", ".."))
+APPID = "in.fincept.FinceptTerminal"
+fails, warns = [], []
+
+def ck(ok, label, hard=True):
+ print(f" [{'PASS' if ok else ('FAIL' if hard else 'WARN')}] {label}")
+ if not ok:
+ (fails if hard else warns).append(label)
+
+print("[1] manifest YAML")
+man = yaml.safe_load(io.open(os.path.join(D, f"{APPID}.yml"), encoding="utf-8"))
+ck(man["id"] == APPID, f"id matches filename ({APPID})")
+ck(bool(man.get("command")), "command declared")
+ck(man.get("runtime") and man.get("sdk"), "runtime + sdk declared")
+
+print("[2] git sources pinned (Flathub: tag without commit = ERROR for new submissions)")
+srcs = [(m.get("name", "?"), s) for m in man["modules"] if isinstance(m, dict)
+ for s in m.get("sources", []) if isinstance(s, dict) and s.get("type") == "git"]
+ck(len(srcs) > 0, f"found {len(srcs)} git sources")
+for name, s in srcs:
+ url = s["url"].rsplit("/", 1)[-1]
+ if "tag" in s:
+ ck("commit" in s, f"{name}:{url} has tag -> must also have commit")
+ else:
+ ck("commit" in s, f"{name}:{url} pinned by commit")
+ if "commit" in s:
+ ck(bool(re.fullmatch(r"[0-9a-f]{40}", s["commit"])), f"{name}:{url} commit is full 40-char SHA")
+
+print("[3] built ref actually exists on the remote")
+for name, s in srcs:
+ if "FinceptTerminal.git" in s["url"]:
+ tag = s.get("tag")
+ r = subprocess.run(["git", "ls-remote", "--tags", "origin", f"refs/tags/{tag}"],
+ cwd=REPO, capture_output=True, text=True)
+ ck(bool(r.stdout.strip()), f"tag {tag} exists on origin")
+ if s.get("commit"):
+ r2 = subprocess.run(["git", "rev-parse", f"{tag}^{{commit}}"], cwd=REPO,
+ capture_output=True, text=True)
+ ck(r2.stdout.strip() == s["commit"], f"commit matches {tag} ({r2.stdout.strip()[:8]})")
+
+print("[4] metainfo XML")
+mp = os.path.join(D, f"{APPID}.metainfo.xml")
+dom = xml.dom.minidom.parse(mp)
+xt = io.open(mp, encoding="utf-8").read()
+ck(True, "well-formed XML")
+def one(tag):
+ n = dom.getElementsByTagName(tag)
+ return n[0].firstChild.nodeValue.strip() if n and n[0].firstChild else None
+ck(one("id") == APPID, "metainfo id matches app id")
+for t in ("name", "summary", "metadata_license", "project_license"):
+ ck(bool(one(t)), f"<{t}> present")
+ck(len(dom.getElementsByTagName("screenshot")) > 0, "has screenshots")
+ck(bool(dom.getElementsByTagName("content_rating")), "has content_rating (OARS)")
+launch = dom.getElementsByTagName("launchable")
+ck(bool(launch) and launch[0].firstChild.nodeValue.strip() == f"{APPID}.desktop",
+ "launchable points at the desktop id")
+
+print("[5] screenshots not on a mutable branch")
+imgs = [n.firstChild.nodeValue.strip() for n in dom.getElementsByTagName("image") if n.firstChild]
+ck(len(imgs) > 0, f"{len(imgs)} screenshot URLs")
+for u in imgs:
+ ck("/main/" not in u and "/master/" not in u, f"pinned (not a branch): .../{u.rsplit('/',1)[-1]}")
+
+print("[6] newest listed release matches what the manifest builds")
+rels = [r.getAttribute("version") for r in dom.getElementsByTagName("release")]
+built = [s.get("tag") for _, s in srcs if "FinceptTerminal.git" in s["url"]][0].lstrip("v")
+ck(bool(rels), f"releases listed: {rels[:3]}")
+ck(rels and rels[0] == built, f"newest release {rels[0] if rels else None} == built version {built}")
+for r in dom.getElementsByTagName("release"):
+ ck(bool(re.fullmatch(r"\d{4}-\d{2}-\d{2}", r.getAttribute("date"))),
+ f"release {r.getAttribute('version')} date is ISO-8601")
+
+print("[7] desktop entry")
+dp = os.path.join(D, f"{APPID}.desktop")
+kv = dict(l.split("=", 1) for l in io.open(dp, encoding="utf-8").read().splitlines()
+ if "=" in l and not l.startswith("["))
+ck(kv.get("Type") == "Application", "Type=Application")
+ck(bool(kv.get("Name")), "Name present")
+ck(kv.get("Icon") == APPID, f"Icon == app id ({APPID})")
+ck(kv.get("Exec", "").split()[0] == man["command"], "Exec binary == manifest command")
+cats = [c for c in kv.get("Categories", "").split(";") if c]
+MAIN = {"AudioVideo","Audio","Video","Development","Education","Game","Graphics",
+ "Network","Office","Science","Settings","System","Utility"}
+ck(bool(set(cats) & MAIN), f"has a main category ({sorted(set(cats) & MAIN)})")
+ck("MimeType" not in kv or bool(kv.get("MimeType")), "no empty MimeType")
+if "MimeType" in kv:
+ ck(False, "declares MimeType with no shared-mime-info XML installed", hard=False)
+ck("%" not in kv.get("Exec", ""), "Exec has no field code the app cannot honour")
+
+print("[8] installed assets exist")
+ck(os.path.isfile(os.path.join(REPO, "fincept-qt", "resources", f"{APPID}.png")), "256x256 icon present")
+for u in imgs:
+ rel = u.split("/images/")[-1]
+ ck(os.path.isfile(os.path.join(REPO, "images", rel)), f"screenshot source images/{rel}")
+
+print(f"\n{len(fails)} failure(s), {len(warns)} warning(s)")
+if fails:
+ for f in fails: print(" FAIL:", f)
+if warns:
+ for w in warns: print(" WARN:", w)
+sys.exit(1 if fails else 0)
diff --git a/fincept-qt/src/trading/brokers/icicidirect/IciciDirectBroker.h b/fincept-qt/src/trading/brokers/icicidirect/IciciDirectBroker.h
index 37796d251..116cf6b85 100644
--- a/fincept-qt/src/trading/brokers/icicidirect/IciciDirectBroker.h
+++ b/fincept-qt/src/trading/brokers/icicidirect/IciciDirectBroker.h
@@ -17,14 +17,24 @@ namespace fincept::trading {
/// DELETE=cancel). Symbol mapping (normal ticker <-> ICICI stock_code, plus F&O
/// expiry/strike/right decomposition) comes from InstrumentService ("icicidirect").
///
-/// Scope (v1): REST only. Live tick streaming (Breeze Socket.IO) is deferred, so
-/// ws_adapter_name() returns "".
+/// Live tick streaming IS supported: IciciDirectWebSocket speaks Breeze's
+/// Socket.IO (Engine.IO v4) transport and is constructed by AccountDataStream
+/// for this broker id. It shipped in the same commit as the REST surface — the
+/// "v1: REST only, streaming deferred" note that used to sit here was stale from
+/// the first release and claimed the opposite of what the code does.
class IciciDirectBroker : public IBroker {
public:
BrokerId id() const override { return BrokerId::IciciDirect; }
const char* name() const override { return "ICICI Direct"; }
const char* base_url() const override { return "https://api.icicidirect.com/breezeapi/api/v1"; }
- const char* ws_adapter_name() const override { return ""; } // streaming deferred
+ // Nothing dispatches on this today — AccountDataStream picks the socket with
+ // a hardcoded `broker_id_ == "..."` chain, and every other broker's adapter
+ // name is likewise unread. Leaving it empty is still wrong: ICICI was the only
+ // broker returning "" while all the others name their adapter, so the day this
+ // accessor becomes the dispatch key, ICICI is the one that silently loses
+ // streaming — and "" would read as a deliberate "no socket" rather than an
+ // oversight.
+ const char* ws_adapter_name() const override { return "icicidirect"; }
BrokerProfile profile() const override {
return BrokerProfile{
diff --git a/fincept-qt/src/trading/brokers/tickerall/TickerAllBroker.h b/fincept-qt/src/trading/brokers/tickerall/TickerAllBroker.h
index bf8538ca8..78810f2fe 100644
--- a/fincept-qt/src/trading/brokers/tickerall/TickerAllBroker.h
+++ b/fincept-qt/src/trading/brokers/tickerall/TickerAllBroker.h
@@ -85,7 +85,8 @@ class TickerAllBroker : public IBroker {
const QString& resolution, const QString& from_date,
const QString& to_date) override;
- // Streaming deferred, same as IciciDirectBroker. TickerAll does expose a
+ // Streaming genuinely is deferred here (unlike IciciDirectBroker, whose
+ // socket shipped alongside its REST surface). TickerAll does expose a
// WebSocket (wss://api.tickerall.com/v1/stream: ticks, positions, orders),
// and wiring an adapter here is the natural follow-up — it would also let
// get_quotes() serve real streamed bid/ask instead of the per-symbol M1