Clarify private trading boundary
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
# Scratch / temp scripts
|
||||
scratch/
|
||||
|
||||
# Private trading layer (never commit strategy/bot execution code here)
|
||||
private-trading/
|
||||
trading-private/
|
||||
polyweather-trading-private/
|
||||
internal-trading/
|
||||
ops-trading-private/
|
||||
|
||||
# Data and Logs
|
||||
data/*.db
|
||||
data/*.db-*
|
||||
|
||||
@@ -60,7 +60,7 @@ Public docs center: `/docs/intro` on the main site (bilingual product documentat
|
||||
This repository is licensed under **GNU AGPL-3.0 only** from `2026-03-30` onward.
|
||||
|
||||
- Public in repo: weather aggregation, core analysis, dashboard, bot baseline, and standard payment flow.
|
||||
- Not included in this repository: private production data, internal operating thresholds, commercial risk rules, pricing strategy details, and growth tooling.
|
||||
- Not included in this repository: private production data, internal operating thresholds, commercial risk rules, pricing strategy details, growth tooling, internal mispricing strategy, position sizing rules, and trading bot execution code.
|
||||
- Trademark, brand, domain, production databases, and hosted-service operations are **not** granted by the code license.
|
||||
|
||||
See: [AGPL-3.0 & Commercial Boundary](docs/OPEN_CORE_POLICY.md)
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@
|
||||
本仓库自 `2026-03-30` 起采用 **GNU AGPL-3.0-only**。
|
||||
|
||||
- 仓库公开部分:天气聚合、基础分析、前端看板、Bot 基础能力、标准支付流程。
|
||||
- 不包含在仓库中的部分:生产私有数据、商业风控规则、运营阈值、收费策略细节、内部对账与增长工具。
|
||||
- 不包含在仓库中的部分:生产私有数据、商业风控规则、运营阈值、收费策略细节、内部对账与增长工具、内部错价策略、仓位规则与交易 Bot 执行代码。
|
||||
- 商标、品牌、域名、生产数据库与托管服务运营能力,不因代码许可证一并授权。
|
||||
|
||||
详细见:[AGPL-3.0 与商用边界](docs/OPEN_CORE_POLICY.md)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# AGPL-3.0 与商用边界
|
||||
|
||||
最后更新:`2026-03-30`
|
||||
最后更新:`2026-06-29`
|
||||
|
||||
## 1. 当前许可证
|
||||
|
||||
@@ -18,27 +18,37 @@
|
||||
- 天气数据采集与标准化(METAR / Open-Meteo / MGM / 官方结算源接口层)。
|
||||
- DEB、基础趋势分析、概率桶、历史对账、前端看板与 Bot 基础能力。
|
||||
- 标准支付流程、链上收款合约与公开 API/BFF 结构。
|
||||
- 面向用户的天气概率解释、公开市场简报与不含交易执行建议的市场映射。
|
||||
|
||||
## 4. 不在仓库许可证授权范围内的资产
|
||||
|
||||
- 商标、品牌名、域名、Logo、商店素材与市场宣传文案。
|
||||
- 生产数据库、用户资料、钱包映射、订阅审计日志、内部报表。
|
||||
- 私有运营脚本、增长工具、内部风控参数、收费策略细节与内部阈值。
|
||||
- 内部交易策略层:mispricing/edge 规则、YES/NO 方向判断、仓位规则、Kelly 或其他资金管理参数、自动/半自动下单 Bot、执行日志、PnL 复盘与任何钱包执行凭据。
|
||||
- 托管服务本身、SLA、客服、运维值守与内部告警路由。
|
||||
|
||||
## 5. 配置与数据安全红线
|
||||
## 5. 内部交易层边界
|
||||
|
||||
- 公开仓库可以输出天气证据、DEB、多模型一致性、观测进度与高斯分布概率。
|
||||
- 内部交易层只能在私有仓库或私有部署资产中实现,不在本仓库提交源码、配置或策略阈值。
|
||||
- 内部交易层如需使用本仓库数据,应通过稳定 API 或导出数据结构读取,不把下单策略反向写入公开产品层。
|
||||
- 禁止在公开页面、普通用户接口或公开文档中暴露 BUY YES / BUY NO、仓位建议、做市商错价评分、自动下单状态或内部策略参数。
|
||||
|
||||
## 6. 配置与数据安全红线
|
||||
|
||||
- 不提交:`.env`、私钥、API key、机器人 token、第三方 service role key。
|
||||
- 不提交:生产数据库、运行态快照、支付流水快照、用户身份信息。
|
||||
- 不提交:仅用于线上商业判断的私有规则库与内部操作手册。
|
||||
- 不提交:`private-trading/`、`trading-private/`、`polyweather-trading-private/`、`internal-trading/`、`ops-trading-private/` 下的任何内容。
|
||||
|
||||
## 6. 对部署者的要求
|
||||
## 7. 对部署者的要求
|
||||
|
||||
- 若你提供公开网络服务,应在产品界面中提供清晰可访问的源码入口。
|
||||
- 若你修改了本项目再对外提供网络服务,应公开与你实际运行版本对应的源码。
|
||||
- 若你使用了仓库外的私有数据、商标或运营资产,这些额外资产不因 AGPL 自动获得授权。
|
||||
|
||||
## 7. 法务与运营建议
|
||||
## 8. 法务与运营建议
|
||||
|
||||
- 代码许可证与商标/品牌授权应继续分离管理。
|
||||
- 官网应补充服务条款、隐私政策与付费权益说明。
|
||||
|
||||
@@ -32,9 +32,8 @@ const SUMMARY_TEXT = {
|
||||
region: { en: "Region", zh: "区域" },
|
||||
localTime: { en: "Local Time", zh: "当地时间" },
|
||||
gaussianMu: { en: "Gaussian μ", zh: "高斯 μ" },
|
||||
detailedProbability: { en: "Market Option Probability", zh: "市场选项概率" },
|
||||
detailedProbability: { en: "Gaussian Distribution Probability", zh: "高斯分布概率" },
|
||||
noProbabilityDistribution: { en: "No probability distribution", zh: "暂无详细概率" },
|
||||
marketMatch: { en: "Market Match", zh: "市场匹配" },
|
||||
median: { en: "Median", zh: "模型中位数" },
|
||||
spread: { en: "Spread", zh: "分歧范围" },
|
||||
empty: { en: "No model summary rows match the current filters.", zh: "当前筛选下没有模型汇总数据。" },
|
||||
@@ -42,7 +41,7 @@ const SUMMARY_TEXT = {
|
||||
total: { en: "rows", zh: "行" },
|
||||
} as const;
|
||||
|
||||
const MODEL_SUMMARY_COLUMN_COUNT = MODEL_SUMMARY_MODEL_COLUMNS.length + 8;
|
||||
const MODEL_SUMMARY_COLUMN_COUNT = MODEL_SUMMARY_MODEL_COLUMNS.length + 7;
|
||||
|
||||
function copy(key: keyof typeof SUMMARY_TEXT, isEn: boolean) {
|
||||
return SUMMARY_TEXT[key][isEn ? "en" : "zh"];
|
||||
@@ -160,34 +159,6 @@ function ModelSummaryRowView({
|
||||
<td className="min-w-[92px] px-3 py-2 text-right">
|
||||
<TemperatureCell value={row.gaussianMu} symbol={row.tempSymbol} emphasis="median" />
|
||||
</td>
|
||||
<td className="min-w-[420px] max-w-[520px] px-3 py-1.5 text-left">
|
||||
{row.marketMatches.length ? (
|
||||
<div className="flex flex-wrap items-center gap-1">
|
||||
{row.marketMatches.map((match) => {
|
||||
return (
|
||||
<a
|
||||
key={match.key}
|
||||
href={match.marketUrl || undefined}
|
||||
target={match.marketUrl ? "_blank" : undefined}
|
||||
rel={match.marketUrl ? "noreferrer" : undefined}
|
||||
className={clsx(
|
||||
"inline-flex items-center gap-1 rounded border px-1.5 py-0.5 font-mono text-[10px] font-bold tabular-nums",
|
||||
(match.modelProbability ?? 0) >= 0.2
|
||||
? "border-emerald-200 bg-emerald-50 text-emerald-800"
|
||||
: "border-slate-200 bg-slate-50 text-slate-600",
|
||||
)}
|
||||
title={`${match.label} model ${formatModelSummaryProbability(match.modelProbability)}`}
|
||||
>
|
||||
<span className="font-black">{match.label}</span>
|
||||
<span>{isEn ? "M" : "模"} {formatModelSummaryProbability(match.modelProbability)}</span>
|
||||
</a>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<span className="font-mono text-xs font-semibold text-slate-300">—</span>
|
||||
)}
|
||||
</td>
|
||||
</tr>
|
||||
{expanded ? (
|
||||
<tr className="border-b border-blue-100 bg-blue-50/35">
|
||||
@@ -392,7 +363,7 @@ export function ModelSummaryDashboard({
|
||||
<div className="min-h-0 flex-1 overflow-auto">
|
||||
<table
|
||||
className="w-full border-collapse text-xs"
|
||||
style={{ minWidth: "1940px" }}
|
||||
style={{ minWidth: "1520px" }}
|
||||
>
|
||||
<thead className="sticky top-0 z-20 bg-slate-50 text-[10px] font-black uppercase tracking-wide text-slate-500 shadow-[0_1px_0_0_#e2e8f0]">
|
||||
<tr>
|
||||
@@ -414,9 +385,6 @@ export function ModelSummaryDashboard({
|
||||
<th className="min-w-[92px] px-3 py-2 text-right text-violet-700">
|
||||
{copy("gaussianMu", isEn)}
|
||||
</th>
|
||||
<th className="min-w-[420px] max-w-[520px] px-3 py-2 text-left text-emerald-700">
|
||||
{copy("marketMatch", isEn)}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-slate-100 bg-white">
|
||||
|
||||
@@ -260,18 +260,20 @@ export function runTests() {
|
||||
modelSummarySource.includes("hasModelSummaryForecastData") &&
|
||||
modelSummarySource.includes("Gaussian μ") &&
|
||||
modelSummarySource.includes("高斯 μ") &&
|
||||
modelSummarySource.includes("Market Option Probability") &&
|
||||
modelSummarySource.includes("市场选项概率") &&
|
||||
modelSummarySource.includes("Gaussian Distribution Probability") &&
|
||||
modelSummarySource.includes("高斯分布概率") &&
|
||||
modelSummarySource.includes("expandedCityKeys") &&
|
||||
modelSummarySource.includes("toggleExpandedCity") &&
|
||||
modelSummarySource.includes("aria-expanded") &&
|
||||
modelSummarySource.includes("ChevronRight") &&
|
||||
modelSummarySource.includes("probabilityBuckets.map") &&
|
||||
!modelSummarySource.includes("Market Option Probability") &&
|
||||
!modelSummarySource.includes("市场选项概率") &&
|
||||
!modelSummarySource.includes("Detailed Probability") &&
|
||||
!modelSummarySource.includes("详细概率分布") &&
|
||||
modelSummarySource.includes("Market Match") &&
|
||||
modelSummarySource.includes("市场匹配") &&
|
||||
modelSummarySource.includes("marketMatches.map") &&
|
||||
!modelSummarySource.includes("Market Match") &&
|
||||
!modelSummarySource.includes("市场匹配") &&
|
||||
!modelSummarySource.includes("marketMatches.map") &&
|
||||
!modelSummarySource.includes("formatModelSummaryEdge") &&
|
||||
!modelSummarySource.includes("marketProbability") &&
|
||||
!modelSummarySource.includes("edgePercent") &&
|
||||
|
||||
Reference in New Issue
Block a user