@tradejs/app 3.1.29-beta.268 → 3.1.29-beta.270

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/app",
3
- "version": "3.1.29-beta.268",
3
+ "version": "3.1.29-beta.270",
4
4
  "description": "Installable Next.js UI for the TradeJS TypeScript framework: dashboards, backtests, charts, and runtime data.",
5
5
  "keywords": [
6
6
  "tradejs",
@@ -59,11 +59,11 @@
59
59
  "@emotion/react": "^11.14.0",
60
60
  "@modelcontextprotocol/sdk": "^1.32.1",
61
61
  "@node-oauth/oauth2-server": "^5.3.0",
62
- "@tradejs/core": "^3.1.29-beta.268",
63
- "@tradejs/indicators": "^3.1.29-beta.268",
64
- "@tradejs/infra": "^3.1.29-beta.268",
65
- "@tradejs/node": "^3.1.29-beta.268",
66
- "@tradejs/types": "^3.1.29-beta.268",
62
+ "@tradejs/core": "^3.1.29-beta.270",
63
+ "@tradejs/indicators": "^3.1.29-beta.270",
64
+ "@tradejs/infra": "^3.1.29-beta.270",
65
+ "@tradejs/node": "^3.1.29-beta.270",
66
+ "@tradejs/types": "^3.1.29-beta.270",
67
67
  "@types/bcryptjs": "2.4.6",
68
68
  "@types/lodash": "4.17.24",
69
69
  "@types/node": "24.13.3",
@@ -7,12 +7,14 @@ import {
7
7
  enqueueMcpJob,
8
8
  mcpId,
9
9
  publicMcpJob,
10
+ readAuthorizedMcpJob,
10
11
  readMcpBacktestPage,
11
12
  readMcpBacktestResult,
12
13
  readMcpChart,
13
14
  readMcpDeployments,
14
15
  readMcpEvaluationStats,
15
16
  readMcpJob,
17
+ readMcpJobLogs,
16
18
  readMcpMarket,
17
19
  readMcpRuntimePage,
18
20
  readMcpSignal,
@@ -358,22 +360,20 @@ export const createTradejsMcpServer = (principal: McpPrincipal) => {
358
360
  'Read the state of an owned background job. Disconnecting the client does not pause it. Failed jobs are never automatically rerun.',
359
361
  ['backtests:read', 'diagnostics:read', 'backtests:run', 'diagnostics:run'],
360
362
  { jobId: artifactId },
361
- async (args) => {
362
- const job = await readMcpJob(principal.userName, args.jobId);
363
- if (
364
- !principal.scopes.some(
365
- (scope) =>
366
- scope ===
367
- (job.kind === 'backtest'
368
- ? 'backtests:read'
369
- : 'diagnostics:read') ||
370
- scope ===
371
- (job.kind === 'backtest' ? 'backtests:run' : 'diagnostics:run'),
372
- )
373
- )
374
- throw new Error('Insufficient scope');
375
- return publicMcpJob(job);
363
+ async (args) =>
364
+ publicMcpJob(await readAuthorizedMcpJob(principal, args.jobId)),
365
+ );
366
+ tool(
367
+ 'job_get_logs',
368
+ 'Read redacted stdout/stderr retained for an owned job, including failures. Paginate until nextOffset=null. This is the worker tail (at most 150 entries, 1000 characters each), not the full process history; offsets may shift while running. Does not start or retry jobs.',
369
+ ['backtests:read', 'diagnostics:read', 'backtests:run', 'diagnostics:run'],
370
+ {
371
+ jobId: artifactId,
372
+ offset: z.number().int().min(0).max(Number.MAX_SAFE_INTEGER).default(0),
373
+ limit: z.number().int().min(1).max(100).default(50),
376
374
  },
375
+ async (args) =>
376
+ readMcpJobLogs(principal, args.jobId, args.offset, args.limit),
377
377
  );
378
378
  tool(
379
379
  'job_cancel',