@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,11 @@
1
+ {
2
+ "name": "portfolio-read-mcp-server",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "index.js",
6
+ "dependencies": {
7
+ "@modelcontextprotocol/sdk": "^1.29.0",
8
+ "xlsx": "^0.18.5",
9
+ "zod": "^4.3.6"
10
+ }
11
+ }
@@ -23,9 +23,9 @@ import { withProfileLock } from '../../src/profile-lock.js';
23
23
  const SERVER_URL = process.env.SERVER_URL ?? '';
24
24
  const MACHINE_API_KEY = process.env.MACHINE_API_KEY ?? '';
25
25
  const AGENT_ID = process.env.AGENT_ID ?? '';
26
- const TEAM_ID = process.env.TEAM_ID ?? '';
26
+ const WORKSPACE_ID = process.env.WORKSPACE_ID ?? '';
27
27
  const WORKSPACE_DIR = process.env.WORKSPACE_DIR ?? process.cwd();
28
- const TEAM_WORKSPACE_DIR = path.dirname(WORKSPACE_DIR);
28
+ const WORKSPACE_ROOT_DIR = path.dirname(WORKSPACE_DIR);
29
29
 
30
30
  // ── Platform registry ──────────────────────────────────────────────────────────
31
31
 
@@ -87,7 +87,7 @@ async function api(method, path, body) {
87
87
  });
88
88
  if (!res.ok) {
89
89
  const text = await res.text();
90
- throw new Error(`Lightcone API ${method} ${path} failed (${res.status}): ${text}`);
90
+ throw new Error(`lightcone API ${method} ${path} failed (${res.status}): ${text}`);
91
91
  }
92
92
  return res.json();
93
93
  }
@@ -139,15 +139,15 @@ function workspacePathFromMediaPath(filePath, approvalData) {
139
139
 
140
140
  const normalized = filePath.replaceAll('\\', '/');
141
141
  const virtualMatch = normalized.match(/^\/agent-workspace\/([^/]+)\/workspace\/(.+)$/);
142
- if (virtualMatch) return { teamId: virtualMatch[1], relPath: virtualMatch[2] };
142
+ if (virtualMatch) return { workspaceId: virtualMatch[1], relPath: virtualMatch[2] };
143
143
 
144
144
  const workspaceSegmentMatch = normalized.match(/\/workspace\/((?:artifacts|notes|tmp)\/.+)$/);
145
145
  if (workspaceSegmentMatch) {
146
- return { teamId: approvalData?.teamId ?? TEAM_ID, relPath: workspaceSegmentMatch[1] };
146
+ return { workspaceId: approvalData?.workspaceId ?? WORKSPACE_ID, relPath: workspaceSegmentMatch[1] };
147
147
  }
148
148
 
149
149
  if (!path.isAbsolute(filePath) && /^(artifacts|notes|tmp)\//.test(normalized)) {
150
- return { teamId: approvalData?.teamId ?? TEAM_ID, relPath: normalized };
150
+ return { workspaceId: approvalData?.workspaceId ?? WORKSPACE_ID, relPath: normalized };
151
151
  }
152
152
 
153
153
  return null;
@@ -157,23 +157,23 @@ async function materializeWorkspaceMedia(filePath, approvalData) {
157
157
  if (!filePath || existsSync(filePath)) return filePath;
158
158
 
159
159
  const workspacePath = workspacePathFromMediaPath(filePath, approvalData);
160
- if (!workspacePath?.teamId || !workspacePath.relPath) return filePath;
160
+ if (!workspacePath?.workspaceId || !workspacePath.relPath) return filePath;
161
161
 
162
- const localPath = path.resolve(TEAM_WORKSPACE_DIR, workspacePath.relPath);
163
- const allowedRoots = ['artifacts', 'notes', 'tmp'].map(dir => path.join(TEAM_WORKSPACE_DIR, dir));
162
+ const localPath = path.resolve(WORKSPACE_ROOT_DIR, workspacePath.relPath);
163
+ const allowedRoots = ['artifacts', 'notes', 'tmp'].map(dir => path.join(WORKSPACE_ROOT_DIR, dir));
164
164
  if (!allowedRoots.some(root => isInsideDir(localPath, root))) {
165
- throw new Error(`workspace media path is outside allowed team workspace directories: ${filePath}`);
165
+ throw new Error(`workspace media path is outside allowed workspace directories: ${filePath}`);
166
166
  }
167
167
 
168
168
  if (existsSync(localPath)) return localPath;
169
169
 
170
170
  const data = await api(
171
171
  'GET',
172
- `/team-memory?path=${encodeURIComponent(workspacePath.relPath)}&teamId=${encodeURIComponent(workspacePath.teamId)}`
172
+ `/workspace-memory?path=${encodeURIComponent(workspacePath.relPath)}&workspaceId=${encodeURIComponent(workspacePath.workspaceId)}`
173
173
  );
174
174
  mkdirSync(path.dirname(localPath), { recursive: true });
175
175
  writeFileSync(localPath, decodeWorkspaceContent(data.content));
176
- console.error(`[publisher] Materialized team workspace media ${workspacePath.relPath} -> ${localPath}`);
176
+ console.error(`[publisher] Materialized workspace media ${workspacePath.relPath} -> ${localPath}`);
177
177
  return localPath;
178
178
  }
179
179
 
@@ -201,12 +201,12 @@ function validateLocalFile(filePath, { kind, required = false, allowedExts = []
201
201
  const allowedRoots = [
202
202
  realpathSync(WORKSPACE_DIR),
203
203
  ...['artifacts', 'notes', 'tmp']
204
- .map(dir => path.join(TEAM_WORKSPACE_DIR, dir))
204
+ .map(dir => path.join(WORKSPACE_ROOT_DIR, dir))
205
205
  .filter(existsSync)
206
206
  .map(dir => realpathSync(dir)),
207
207
  ];
208
208
  if (!allowedRoots.some(root => isInsideDir(realFile, root))) {
209
- throw new Error(`${kind} file must be inside the agent workspace or team shared artifacts/notes/tmp directory: ${filePath}`);
209
+ throw new Error(`${kind} file must be inside the agent workspace or workspace shared artifacts/notes/tmp directory: ${filePath}`);
210
210
  }
211
211
 
212
212
  const stat = statSync(realFile);
@@ -0,0 +1,16 @@
1
+ {
2
+ "id": "publisher",
3
+ "name": "Publisher MCP Server",
4
+ "version": "0.1.0",
5
+ "runtime": "node",
6
+ "entrypoint": "index.js",
7
+ "tool_declarations": [
8
+ { "name": "get_platform_requirements", "classification": "cacheable" },
9
+ { "name": "check_login_status", "classification": "mandatory" },
10
+ { "name": "publish_content", "classification": "mandatory" }
11
+ ],
12
+ "smoke_test": {
13
+ "tool": "get_platform_requirements",
14
+ "arguments": { "platform": "xhs", "content_type": "image_text" }
15
+ }
16
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightcone-ai/daemon",
3
- "version": "0.9.79",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {