@lightcone-ai/daemon 0.9.79 → 0.10.0

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 (42) hide show
  1. package/mcp-servers/mysql/index.js +13 -5
  2. package/mcp-servers/mysql/manifest.json +16 -0
  3. package/mcp-servers/official/company-fundamentals/index.js +34 -0
  4. package/mcp-servers/official/company-fundamentals/manifest.json +14 -0
  5. package/mcp-servers/official/compliance-check/index.js +49 -0
  6. package/mcp-servers/official/compliance-check/manifest.json +14 -0
  7. package/mcp-servers/official/industry-report/index.js +34 -0
  8. package/mcp-servers/official/industry-report/manifest.json +14 -0
  9. package/mcp-servers/official/market-data-query/index.js +34 -0
  10. package/mcp-servers/official/market-data-query/manifest.json +14 -0
  11. package/mcp-servers/official/portfolio-analysis/index.js +74 -0
  12. package/mcp-servers/official/portfolio-analysis/manifest.json +14 -0
  13. package/mcp-servers/official/portfolio-read/index.js +34 -0
  14. package/mcp-servers/official/portfolio-read/manifest.json +14 -0
  15. package/mcp-servers/official/research-fetch/index.js +35 -0
  16. package/mcp-servers/official/research-fetch/manifest.json +14 -0
  17. package/mcp-servers/official/risk-metrics/index.js +34 -0
  18. package/mcp-servers/official/risk-metrics/manifest.json +14 -0
  19. package/mcp-servers/official-common/fixtures.js +273 -0
  20. package/mcp-servers/official-common/server.js +34 -0
  21. package/mcp-servers/platform/manifest.json +15 -0
  22. package/mcp-servers/portfolio-analysis/core.js +592 -0
  23. package/mcp-servers/portfolio-analysis/index.js +45 -0
  24. package/mcp-servers/portfolio-analysis/package-lock.json +1139 -0
  25. package/mcp-servers/portfolio-analysis/package.json +10 -0
  26. package/mcp-servers/portfolio-read/core.js +330 -0
  27. package/mcp-servers/portfolio-read/index.js +127 -0
  28. package/mcp-servers/portfolio-read/package-lock.json +1243 -0
  29. package/mcp-servers/portfolio-read/package.json +11 -0
  30. package/mcp-servers/publisher/index.js +14 -14
  31. package/mcp-servers/publisher/manifest.json +16 -0
  32. package/package.json +1 -1
  33. package/src/agent-manager.js +761 -188
  34. package/src/chat-bridge.js +567 -92
  35. package/src/connection.js +1 -1
  36. package/src/drivers/claude.js +48 -45
  37. package/src/drivers/codex.js +110 -8
  38. package/src/drivers/kimi.js +80 -35
  39. package/src/governance-state.js +89 -0
  40. package/src/index.js +34 -16
  41. package/src/lease-window.js +8 -0
  42. package/src/mcp-config.js +52 -23
@@ -0,0 +1,273 @@
1
+ export const FIXTURE_META = Object.freeze({
2
+ mode: 'fixture',
3
+ as_of: '2026-04-20',
4
+ disclaimer: 'Fixture mode: data is local, auditable, and not real-time market data.',
5
+ });
6
+
7
+ export const RESEARCH_FIXTURES = Object.freeze([
8
+ {
9
+ ticker: '600519.SH',
10
+ title: 'Moutai channel inventory remains healthy in Q1',
11
+ summary: 'Quarterly sell-through remains stable; premium segment demand shows resilience.',
12
+ published_at: '2026-04-15',
13
+ citation: {
14
+ id: 'fixture://research/moutai-q1-2026',
15
+ source: 'Local fixture research note',
16
+ },
17
+ },
18
+ {
19
+ ticker: 'NVDA.US',
20
+ title: 'GPU demand concentration risk increases with hyperscaler capex cycle',
21
+ summary: 'Revenue growth remains strong but dependency on top customers is elevated.',
22
+ published_at: '2026-04-10',
23
+ citation: {
24
+ id: 'fixture://research/nvda-capex-cycle-2026',
25
+ source: 'Local fixture thematic report',
26
+ },
27
+ },
28
+ {
29
+ ticker: 'AAPL.US',
30
+ title: 'Services mix expansion offsets hardware replacement-cycle softness',
31
+ summary: 'Gross margin profile remains supported by services contribution.',
32
+ published_at: '2026-04-08',
33
+ citation: {
34
+ id: 'fixture://research/aapl-services-mix-2026',
35
+ source: 'Local fixture sector brief',
36
+ },
37
+ },
38
+ ]);
39
+
40
+ export const MARKET_DATA_FIXTURES = Object.freeze({
41
+ '600519.SH': {
42
+ ticker: '600519.SH',
43
+ close: 1728.45,
44
+ change_pct_1d: -0.62,
45
+ change_pct_5d: 1.84,
46
+ volume: 3041980,
47
+ currency: 'CNY',
48
+ trading_day: '2026-04-20',
49
+ citation: {
50
+ id: 'fixture://market/600519-2026-04-20',
51
+ source: 'Local fixture market snapshot',
52
+ },
53
+ },
54
+ 'NVDA.US': {
55
+ ticker: 'NVDA.US',
56
+ close: 934.12,
57
+ change_pct_1d: 2.14,
58
+ change_pct_5d: 6.83,
59
+ volume: 51900321,
60
+ currency: 'USD',
61
+ trading_day: '2026-04-20',
62
+ citation: {
63
+ id: 'fixture://market/nvda-2026-04-20',
64
+ source: 'Local fixture market snapshot',
65
+ },
66
+ },
67
+ 'AAPL.US': {
68
+ ticker: 'AAPL.US',
69
+ close: 201.66,
70
+ change_pct_1d: 0.48,
71
+ change_pct_5d: 1.17,
72
+ volume: 41230500,
73
+ currency: 'USD',
74
+ trading_day: '2026-04-20',
75
+ citation: {
76
+ id: 'fixture://market/aapl-2026-04-20',
77
+ source: 'Local fixture market snapshot',
78
+ },
79
+ },
80
+ });
81
+
82
+ export const FUNDAMENTAL_FIXTURES = Object.freeze({
83
+ '600519.SH': {
84
+ ticker: '600519.SH',
85
+ fiscal_year: 2025,
86
+ revenue_billion: 153.4,
87
+ net_income_billion: 74.1,
88
+ gross_margin_pct: 91.8,
89
+ roe_pct: 31.2,
90
+ pe_ttm: 30.4,
91
+ pb: 9.4,
92
+ citation: {
93
+ id: 'fixture://fundamentals/600519-fy2025',
94
+ source: 'Local fixture fundamentals dataset',
95
+ },
96
+ },
97
+ 'NVDA.US': {
98
+ ticker: 'NVDA.US',
99
+ fiscal_year: 2025,
100
+ revenue_billion: 118.6,
101
+ net_income_billion: 62.4,
102
+ gross_margin_pct: 73.1,
103
+ roe_pct: 66.8,
104
+ pe_ttm: 42.7,
105
+ pb: 28.5,
106
+ citation: {
107
+ id: 'fixture://fundamentals/nvda-fy2025',
108
+ source: 'Local fixture fundamentals dataset',
109
+ },
110
+ },
111
+ 'AAPL.US': {
112
+ ticker: 'AAPL.US',
113
+ fiscal_year: 2025,
114
+ revenue_billion: 401.7,
115
+ net_income_billion: 102.8,
116
+ gross_margin_pct: 46.3,
117
+ roe_pct: 130.4,
118
+ pe_ttm: 28.9,
119
+ pb: 37.5,
120
+ citation: {
121
+ id: 'fixture://fundamentals/aapl-fy2025',
122
+ source: 'Local fixture fundamentals dataset',
123
+ },
124
+ },
125
+ });
126
+
127
+ export const INDUSTRY_FIXTURES = Object.freeze({
128
+ semiconductors: {
129
+ industry: 'semiconductors',
130
+ outlook: 'Capacity expansion remains front-loaded; demand quality diverges by end-market.',
131
+ key_metrics: {
132
+ inventory_weeks: 9.2,
133
+ yoy_revenue_growth_pct: 17.6,
134
+ margin_trend: 'stable_to_up',
135
+ },
136
+ citation: {
137
+ id: 'fixture://industry/semiconductors-2026q2',
138
+ source: 'Local fixture industry report',
139
+ },
140
+ },
141
+ baijiu: {
142
+ industry: 'baijiu',
143
+ outlook: 'Premium demand stable; channel de-stocking in mid-tier remains a watchpoint.',
144
+ key_metrics: {
145
+ yoy_revenue_growth_pct: 8.4,
146
+ channel_inventory_months: 2.6,
147
+ average_price_change_pct: 1.2,
148
+ },
149
+ citation: {
150
+ id: 'fixture://industry/baijiu-2026q2',
151
+ source: 'Local fixture industry report',
152
+ },
153
+ },
154
+ });
155
+
156
+ export const RISK_FIXTURES = Object.freeze({
157
+ '600519.SH': {
158
+ ticker: '600519.SH',
159
+ beta_1y: 0.82,
160
+ var_95_1d_pct: -2.1,
161
+ max_drawdown_1y_pct: -18.7,
162
+ volatility_30d_pct: 21.4,
163
+ citation: {
164
+ id: 'fixture://risk/600519-2026-04-20',
165
+ source: 'Local fixture risk metrics',
166
+ },
167
+ },
168
+ 'NVDA.US': {
169
+ ticker: 'NVDA.US',
170
+ beta_1y: 1.74,
171
+ var_95_1d_pct: -4.6,
172
+ max_drawdown_1y_pct: -31.4,
173
+ volatility_30d_pct: 47.9,
174
+ citation: {
175
+ id: 'fixture://risk/nvda-2026-04-20',
176
+ source: 'Local fixture risk metrics',
177
+ },
178
+ },
179
+ 'AAPL.US': {
180
+ ticker: 'AAPL.US',
181
+ beta_1y: 1.06,
182
+ var_95_1d_pct: -2.9,
183
+ max_drawdown_1y_pct: -22.5,
184
+ volatility_30d_pct: 28.3,
185
+ citation: {
186
+ id: 'fixture://risk/aapl-2026-04-20',
187
+ source: 'Local fixture risk metrics',
188
+ },
189
+ },
190
+ });
191
+
192
+ export const COMPLIANCE_RULES = Object.freeze([
193
+ {
194
+ id: 'no_specific_trade_quantity',
195
+ description: 'Do not provide specific buy/sell quantities.',
196
+ level: 'blocker',
197
+ },
198
+ {
199
+ id: 'require_citation_for_numeric_claims',
200
+ description: 'Numeric conclusions must include citation metadata.',
201
+ level: 'warn',
202
+ },
203
+ {
204
+ id: 'no_return_guarantee',
205
+ description: 'Do not guarantee returns or principal protection.',
206
+ level: 'blocker',
207
+ },
208
+ ]);
209
+
210
+ export const PORTFOLIO_FIXTURES = Object.freeze({
211
+ default: {
212
+ profile: 'default',
213
+ base_currency: 'CNY',
214
+ holdings: [
215
+ {
216
+ ticker: '600519.SH',
217
+ name: 'Kweichow Moutai',
218
+ quantity: 120,
219
+ avg_cost: 1685.2,
220
+ market_value: 207414,
221
+ sector: 'consumer_staples',
222
+ source: {
223
+ id: 'fixture://portfolio/default-2026-04-20',
224
+ source: 'Local fixture portfolio snapshot',
225
+ },
226
+ },
227
+ {
228
+ ticker: 'NVDA.US',
229
+ name: 'NVIDIA',
230
+ quantity: 35,
231
+ avg_cost: 861.4,
232
+ market_value: 32694,
233
+ sector: 'technology',
234
+ source: {
235
+ id: 'fixture://portfolio/default-2026-04-20',
236
+ source: 'Local fixture portfolio snapshot',
237
+ },
238
+ },
239
+ {
240
+ ticker: 'AAPL.US',
241
+ name: 'Apple',
242
+ quantity: 80,
243
+ avg_cost: 183.2,
244
+ market_value: 16133,
245
+ sector: 'technology',
246
+ source: {
247
+ id: 'fixture://portfolio/default-2026-04-20',
248
+ source: 'Local fixture portfolio snapshot',
249
+ },
250
+ },
251
+ ],
252
+ },
253
+ });
254
+
255
+ export function normalizeTicker(value) {
256
+ return String(value ?? '').trim().toUpperCase();
257
+ }
258
+
259
+ export function fixtureResponse(payload) {
260
+ return {
261
+ ...FIXTURE_META,
262
+ ...payload,
263
+ };
264
+ }
265
+
266
+ export function toTextContent(payload) {
267
+ return {
268
+ content: [{
269
+ type: 'text',
270
+ text: JSON.stringify(payload, null, 2),
271
+ }],
272
+ };
273
+ }
@@ -0,0 +1,34 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
+ import { toTextContent } from './fixtures.js';
4
+
5
+ export async function startFixtureServer({
6
+ serverId,
7
+ serverName,
8
+ version = '0.1.0',
9
+ toolName,
10
+ toolDescription,
11
+ inputSchema,
12
+ handler,
13
+ }) {
14
+ const server = new McpServer({ name: serverName, version });
15
+
16
+ server.tool(toolName, toolDescription, inputSchema, async (args) => {
17
+ try {
18
+ const payload = await handler(args ?? {});
19
+ return toTextContent(payload);
20
+ } catch (error) {
21
+ return {
22
+ isError: true,
23
+ content: [{
24
+ type: 'text',
25
+ text: `Error: ${error.message}`,
26
+ }],
27
+ };
28
+ }
29
+ });
30
+
31
+ const transport = new StdioServerTransport();
32
+ await server.connect(transport);
33
+ console.error(`[${serverId}] MCP fixture server started`);
34
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "id": "platform",
3
+ "name": "Platform Actions MCP Server",
4
+ "version": "0.1.0",
5
+ "runtime": "node",
6
+ "entrypoint": "index.js",
7
+ "tool_declarations": [
8
+ { "name": "platform_post", "classification": "mandatory" },
9
+ { "name": "platform_get_account", "classification": "cacheable" }
10
+ ],
11
+ "smoke_test": {
12
+ "tool": "platform_get_account",
13
+ "arguments": { "platform": "x" }
14
+ }
15
+ }