@air-jam/mcp-server 1.0.0-beta.12 → 1.0.0-beta.13
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/README.md +11 -1
- package/dist/cli.js +68 -14
- package/dist/cli.js.map +1 -1
- package/dist/index.js +67 -13
- package/dist/index.js.map +1 -1
- package/dist/server.js +67 -13
- package/dist/server.js.map +1 -1
- package/dist/tools.js +67 -13
- package/dist/tools.js.map +1 -1
- package/package.json +2 -2
- package/src/tools.ts +69 -12
package/dist/index.js
CHANGED
|
@@ -55,7 +55,12 @@ import {
|
|
|
55
55
|
} from "@air-jam/devtools/game-session";
|
|
56
56
|
import { inspectGame, listGames } from "@air-jam/devtools/games";
|
|
57
57
|
import { readDevLogs } from "@air-jam/devtools/logs";
|
|
58
|
-
import {
|
|
58
|
+
import {
|
|
59
|
+
getPlatformMachineAuthStatus,
|
|
60
|
+
listStoredPlatformMachineAuthStatuses,
|
|
61
|
+
platformEnvironmentNames,
|
|
62
|
+
resolveExplicitPlatformUrl
|
|
63
|
+
} from "@air-jam/devtools/platform-auth";
|
|
59
64
|
import {
|
|
60
65
|
runCompleteEvaluation,
|
|
61
66
|
runQualityGate
|
|
@@ -207,7 +212,11 @@ var RELEASE_PROJECT_INPUT_SCHEMA = z.object({
|
|
|
207
212
|
distDir: z.string().optional()
|
|
208
213
|
});
|
|
209
214
|
var RELEASE_PLATFORM_INPUT_SCHEMA = z.object({
|
|
210
|
-
platformUrl: z.string().url().optional()
|
|
215
|
+
platformUrl: z.string().url().optional(),
|
|
216
|
+
environment: z.enum(platformEnvironmentNames).optional()
|
|
217
|
+
});
|
|
218
|
+
var AUTH_STATUS_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({
|
|
219
|
+
all: z.boolean().optional()
|
|
211
220
|
});
|
|
212
221
|
var RELEASE_VALIDATE_INPUT_SCHEMA = RELEASE_PROJECT_INPUT_SCHEMA.extend({
|
|
213
222
|
bundle: z.string().optional(),
|
|
@@ -329,8 +338,13 @@ var buildToolDefinitions = ({
|
|
|
329
338
|
},
|
|
330
339
|
"airjam.auth_status": {
|
|
331
340
|
description: "Inspect the locally stored Air Jam platform machine session used for hosted release operations.",
|
|
332
|
-
inputSchema:
|
|
333
|
-
run: async () =>
|
|
341
|
+
inputSchema: AUTH_STATUS_INPUT_SCHEMA,
|
|
342
|
+
run: async (input) => {
|
|
343
|
+
const platformUrl = resolveExplicitPlatformUrl(input);
|
|
344
|
+
return withJsonText(
|
|
345
|
+
input.all ? await listStoredPlatformMachineAuthStatuses() : await getPlatformMachineAuthStatus(platformUrl)
|
|
346
|
+
);
|
|
347
|
+
}
|
|
334
348
|
},
|
|
335
349
|
"airjam.release_doctor": {
|
|
336
350
|
description: "Inspect a standalone Air Jam game project for hosted release readiness and return structured local doctor output.",
|
|
@@ -382,13 +396,20 @@ var buildToolDefinitions = ({
|
|
|
382
396
|
inputSchema: RELEASE_LIST_INPUT_SCHEMA,
|
|
383
397
|
run: async ({
|
|
384
398
|
platformUrl,
|
|
399
|
+
environment,
|
|
385
400
|
game
|
|
386
401
|
}) => withJsonText(
|
|
387
402
|
game ? await listPlatformReleases({
|
|
388
|
-
platformUrl
|
|
403
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
404
|
+
platformUrl,
|
|
405
|
+
environment
|
|
406
|
+
}),
|
|
389
407
|
slugOrId: game
|
|
390
408
|
}) : await listPlatformReleaseTargets({
|
|
391
|
-
platformUrl
|
|
409
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
410
|
+
platformUrl,
|
|
411
|
+
environment
|
|
412
|
+
})
|
|
392
413
|
})
|
|
393
414
|
)
|
|
394
415
|
},
|
|
@@ -397,10 +418,14 @@ var buildToolDefinitions = ({
|
|
|
397
418
|
inputSchema: RELEASE_INSPECT_INPUT_SCHEMA,
|
|
398
419
|
run: async ({
|
|
399
420
|
platformUrl,
|
|
421
|
+
environment,
|
|
400
422
|
releaseId
|
|
401
423
|
}) => withJsonText(
|
|
402
424
|
await inspectPlatformRelease({
|
|
403
|
-
platformUrl
|
|
425
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
426
|
+
platformUrl,
|
|
427
|
+
environment
|
|
428
|
+
}),
|
|
404
429
|
releaseId
|
|
405
430
|
})
|
|
406
431
|
)
|
|
@@ -413,12 +438,16 @@ var buildToolDefinitions = ({
|
|
|
413
438
|
},
|
|
414
439
|
run: async ({
|
|
415
440
|
platformUrl,
|
|
441
|
+
environment,
|
|
416
442
|
releaseId,
|
|
417
443
|
cwd,
|
|
418
444
|
bundle
|
|
419
445
|
}) => withJsonText(
|
|
420
446
|
await uploadPlatformReleaseGeneration({
|
|
421
|
-
platformUrl
|
|
447
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
448
|
+
platformUrl,
|
|
449
|
+
environment
|
|
450
|
+
}),
|
|
422
451
|
releaseId,
|
|
423
452
|
cwd,
|
|
424
453
|
bundlePath: bundle
|
|
@@ -430,11 +459,15 @@ var buildToolDefinitions = ({
|
|
|
430
459
|
inputSchema: RELEASE_FINALIZE_INPUT_SCHEMA,
|
|
431
460
|
run: async ({
|
|
432
461
|
platformUrl,
|
|
462
|
+
environment,
|
|
433
463
|
releaseId,
|
|
434
464
|
generationId
|
|
435
465
|
}) => withJsonText(
|
|
436
466
|
await finalizePlatformReleaseGeneration({
|
|
437
|
-
platformUrl
|
|
467
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
468
|
+
platformUrl,
|
|
469
|
+
environment
|
|
470
|
+
}),
|
|
438
471
|
releaseId,
|
|
439
472
|
generationId
|
|
440
473
|
})
|
|
@@ -448,13 +481,17 @@ var buildToolDefinitions = ({
|
|
|
448
481
|
},
|
|
449
482
|
run: async ({
|
|
450
483
|
platformUrl,
|
|
484
|
+
environment,
|
|
451
485
|
releaseId,
|
|
452
486
|
generationId,
|
|
453
487
|
cwd,
|
|
454
488
|
out
|
|
455
489
|
}) => withJsonText(
|
|
456
490
|
await exportPlatformReleaseGeneration({
|
|
457
|
-
platformUrl
|
|
491
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
492
|
+
platformUrl,
|
|
493
|
+
environment
|
|
494
|
+
}),
|
|
458
495
|
releaseId,
|
|
459
496
|
generationId,
|
|
460
497
|
cwd,
|
|
@@ -470,6 +507,7 @@ var buildToolDefinitions = ({
|
|
|
470
507
|
},
|
|
471
508
|
run: async ({
|
|
472
509
|
platformUrl,
|
|
510
|
+
environment,
|
|
473
511
|
game,
|
|
474
512
|
versionLabel,
|
|
475
513
|
cwd,
|
|
@@ -481,7 +519,10 @@ var buildToolDefinitions = ({
|
|
|
481
519
|
publish
|
|
482
520
|
}) => withJsonText(
|
|
483
521
|
await submitPlatformRelease({
|
|
484
|
-
platformUrl
|
|
522
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
523
|
+
platformUrl,
|
|
524
|
+
environment
|
|
525
|
+
}),
|
|
485
526
|
slugOrId: game,
|
|
486
527
|
versionLabel,
|
|
487
528
|
cwd,
|
|
@@ -499,10 +540,14 @@ var buildToolDefinitions = ({
|
|
|
499
540
|
inputSchema: RELEASE_MUTATION_INPUT_SCHEMA,
|
|
500
541
|
run: async ({
|
|
501
542
|
platformUrl,
|
|
543
|
+
environment,
|
|
502
544
|
releaseId
|
|
503
545
|
}) => withJsonText(
|
|
504
546
|
await publishPlatformRelease({
|
|
505
|
-
platformUrl
|
|
547
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
548
|
+
platformUrl,
|
|
549
|
+
environment
|
|
550
|
+
}),
|
|
506
551
|
releaseId
|
|
507
552
|
})
|
|
508
553
|
)
|
|
@@ -512,8 +557,17 @@ var buildToolDefinitions = ({
|
|
|
512
557
|
inputSchema: RELEASE_MUTATION_INPUT_SCHEMA,
|
|
513
558
|
run: async ({
|
|
514
559
|
platformUrl,
|
|
560
|
+
environment,
|
|
515
561
|
releaseId
|
|
516
|
-
}) => withJsonText(
|
|
562
|
+
}) => withJsonText(
|
|
563
|
+
await archivePlatformRelease({
|
|
564
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
565
|
+
platformUrl,
|
|
566
|
+
environment
|
|
567
|
+
}),
|
|
568
|
+
releaseId
|
|
569
|
+
})
|
|
570
|
+
)
|
|
517
571
|
},
|
|
518
572
|
"airjam.start_dev": {
|
|
519
573
|
description: "Start the Air Jam local dev stack for the current project and return the managed process id plus resolved topology.",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config.ts","../src/server.ts","../src/tools.ts","../tool-contract.json","../src/version.ts"],"sourcesContent":["export {\n AIRJAM_CODEX_PROJECT_MCP_FILE,\n AIRJAM_PROJECT_MCP_FILE,\n createAirJamMcpServerDeclaration,\n createProjectLocalMcpConfig,\n inspectMcpProjectSetup,\n renderMcpClientProfile,\n writeProjectLocalMcpConfig,\n} from \"@air-jam/devtools/mcp-config\";\nexport type {\n AirJamMcpClientProfile,\n AirJamMcpClientProfileRender,\n AirJamMcpRegistrationInspection,\n AirJamMcpServerDeclaration,\n AirJamProjectLocalMcpConfig,\n InspectMcpProjectSetupResult,\n} from \"@air-jam/devtools/mcp-config\";\n","import { detectProjectContext } from \"@air-jam/devtools/context\";\nimport type {\n CreateTaskRequestHandlerExtra,\n TaskRequestHandlerExtra,\n} from \"@modelcontextprotocol/sdk/experimental/tasks\";\nimport { InMemoryTaskStore } from \"@modelcontextprotocol/sdk/experimental/tasks\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { CallToolResult } from \"@modelcontextprotocol/sdk/types.js\";\nimport {\n buildToolDefinitions,\n getRegisteredToolNamesForProjectMode,\n} from \"./tools.js\";\nimport { AIR_JAM_MCP_SERVER_VERSION } from \"./version.js\";\n\nconst DEFAULT_TASK_TTL_MS = 5 * 60 * 1000;\nconst TASK_CAPABLE_CLIENT_NOTE =\n \" Requires an MCP client with task-backed tool execution support.\";\n\nconst describeToolForRegistration = ({\n description,\n requiresTaskSupport,\n}: {\n description: string;\n requiresTaskSupport: boolean;\n}): string =>\n requiresTaskSupport\n ? `${description}${TASK_CAPABLE_CLIENT_NOTE}`\n : description;\n\nconst createToolErrorResult = (error: unknown): CallToolResult => ({\n content: [\n {\n type: \"text\",\n text:\n error instanceof Error\n ? error.message\n : `Air Jam MCP task failed: ${String(error)}`,\n },\n ],\n isError: true,\n});\n\n/**\n * Tools an embedding application replaces when it owns the game room: it runs\n * the development server, hosts the game and admits test runs into that room,\n * so agents never start another host, dev server or run of their own.\n */\nconst EMBEDDED_ROOM_OMITTED_TOOLS = new Set([\n \"airjam.start_dev\",\n \"airjam.stop_dev\",\n \"airjam.reset_local\",\n \"airjam.start_game_run\",\n \"airjam.stop_game_run\",\n \"airjam.steer_game_run\",\n \"airjam.open_game_session\",\n \"airjam.control_game_session_participant\",\n \"airjam.send_game_session_input\",\n \"airjam.read_game_session\",\n \"airjam.observe_game_session\",\n \"airjam.read_game_settings\",\n \"airjam.update_game_settings\",\n \"airjam.invoke_game_session_action\",\n \"airjam.capture_game_session_visuals\",\n \"airjam.close_game_session\",\n]);\n\nexport const createAirJamMcpServer = async ({\n cwd = process.cwd(),\n embeddedRoom = false,\n}: {\n cwd?: string;\n embeddedRoom?: boolean;\n} = {}): Promise<McpServer> => {\n const context = await detectProjectContext({ cwd });\n const toolDefinitions = buildToolDefinitions({\n projectMode: context.mode,\n });\n const registeredToolNames = getRegisteredToolNamesForProjectMode(\n context.mode,\n );\n const taskStore = new InMemoryTaskStore();\n const server = new McpServer(\n {\n name: \"air-jam\",\n version: AIR_JAM_MCP_SERVER_VERSION,\n },\n {\n capabilities: {\n tasks: {\n list: {},\n cancel: {},\n requests: {\n tools: {\n call: {},\n },\n },\n },\n },\n instructions:\n \"Use Air Jam tools before falling back to raw shell commands for Air Jam-native workflows. Start with inspect_project, read_logs with view=signal, and inspect_game when debugging runtime or game issues. If a tool advertises task-backed execution support as required, call it through an MCP client flow that supports tasks instead of assuming one blocking request/response call.\",\n taskStore,\n },\n );\n\n for (const toolName of registeredToolNames) {\n if (embeddedRoom && EMBEDDED_ROOM_OMITTED_TOOLS.has(toolName)) continue;\n const tool = toolDefinitions[toolName];\n const description = describeToolForRegistration({\n description: tool.description,\n requiresTaskSupport: tool.execution?.taskSupport === \"required\",\n });\n const baseConfig = {\n description,\n inputSchema: tool.inputSchema,\n };\n\n if (tool.execution?.taskSupport === \"required\") {\n server.experimental.tasks.registerToolTask(\n toolName,\n {\n ...baseConfig,\n execution: {\n taskSupport: \"required\",\n },\n },\n {\n createTask: async (\n args: unknown,\n { taskStore, taskRequestedTtl }: CreateTaskRequestHandlerExtra,\n ) => {\n const task = await taskStore.createTask({\n ttl: taskRequestedTtl ?? DEFAULT_TASK_TTL_MS,\n });\n\n void (async () => {\n try {\n const result = await tool.run(args as never);\n await taskStore.storeTaskResult(\n task.taskId,\n \"completed\",\n result,\n );\n } catch (error) {\n await taskStore.storeTaskResult(\n task.taskId,\n \"failed\",\n createToolErrorResult(error),\n );\n }\n })();\n\n return { task };\n },\n getTask: async (\n _args: unknown,\n { taskId, taskStore }: TaskRequestHandlerExtra,\n ) => taskStore.getTask(taskId),\n getTaskResult: async (\n _args: unknown,\n { taskId, taskStore }: TaskRequestHandlerExtra,\n ) => taskStore.getTaskResult(taskId) as Promise<CallToolResult>,\n },\n );\n continue;\n }\n\n server.registerTool(toolName, baseConfig, async (args: unknown) =>\n tool.run(args as never),\n );\n }\n\n return server;\n};\n","import { inspectProject } from \"@air-jam/devtools/context\";\nimport {\n getDevStatus,\n getTopology,\n resetLocalDev,\n startDev,\n stopDev,\n} from \"@air-jam/devtools/dev\";\nimport {\n gameRunAddressSchema,\n gameRunDiscoverySchema,\n gameRunSteerSchema,\n gameRunWaitSchema,\n startGameRunSchema,\n startPlayGameRunSchema,\n startTestGameRunSchema,\n} from \"@air-jam/devtools/game-runs\";\nimport {\n captureGameSessionVisuals,\n closeGameSession,\n controlGameSessionParticipant,\n gameSessionOperationSchemas,\n invokeGameSessionAction,\n listGameRuns,\n listGameTestProfiles,\n observeGameSession,\n openGameSession,\n readGameRun,\n readGameSession,\n readGameSettings,\n replayGameRun,\n sendGameSessionInput,\n startGameRun,\n steerGameRun,\n stopGameRun,\n updateGameSettings,\n waitGameRun,\n} from \"@air-jam/devtools/game-session\";\nimport { inspectGame, listGames } from \"@air-jam/devtools/games\";\nimport { readDevLogs } from \"@air-jam/devtools/logs\";\nimport { getPlatformMachineAuthStatus } from \"@air-jam/devtools/platform-auth\";\nimport {\n runCompleteEvaluation,\n runQualityGate,\n} from \"@air-jam/devtools/quality\";\nimport {\n archivePlatformRelease,\n bundleLocalRelease,\n exportPlatformReleaseGeneration,\n finalizePlatformReleaseGeneration,\n inspectLocalRelease,\n inspectPlatformRelease,\n listPlatformReleaseTargets,\n listPlatformReleases,\n publishPlatformRelease,\n submitPlatformRelease,\n uploadPlatformReleaseGeneration,\n validateLocalRelease,\n} from \"@air-jam/devtools/release\";\nimport type {\n CallToolResult,\n ToolExecution,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport { z } from \"zod\";\nimport toolContract from \"../tool-contract.json\" with { type: \"json\" };\n\ntype AirJamProjectMode = \"monorepo\" | \"standalone-game\" | \"unknown\";\ntype AirJamQualityGate =\n | \"typecheck\"\n | \"lint\"\n | \"test\"\n | \"build\"\n | \"format-check\"\n | \"scaffold-smoke\"\n | \"release-check\";\n\nexport type AirJamMcpToolDefinition = {\n description: string;\n inputSchema: z.ZodTypeAny;\n run: (args: never) => Promise<Pick<CallToolResult, \"content\">>;\n execution?: ToolExecution;\n};\n\nconst withJsonText = <T>(value: T) => ({\n content: [\n {\n type: \"text\" as const,\n text: JSON.stringify(value, null, 2),\n },\n ],\n});\n\nconst buildQualityGateSchema = (projectMode: AirJamProjectMode) =>\n z.object({\n cwd: z.string().optional(),\n gate:\n projectMode === \"monorepo\"\n ? z.enum([\n \"typecheck\",\n \"lint\",\n \"test\",\n \"build\",\n \"format-check\",\n \"scaffold-smoke\",\n \"release-check\",\n ] satisfies [AirJamQualityGate, ...AirJamQualityGate[]])\n : z.enum([\n \"typecheck\",\n \"lint\",\n \"test\",\n \"build\",\n \"format-check\",\n ] satisfies [AirJamQualityGate, ...AirJamQualityGate[]]),\n packageFilter: z.string().optional(),\n });\n\nconst buildStartDevSchema = (projectMode: AirJamProjectMode) =>\n z.object({\n cwd: z.string().optional(),\n gameId: z.string().optional(),\n mode:\n projectMode === \"monorepo\"\n ? z.enum([\"standalone-dev\", \"arcade-dev\", \"arcade-test\"]).optional()\n : z.literal(\"standalone-dev\").optional(),\n secure: z.boolean().optional(),\n });\n\nconst buildTopologySchema = (projectMode: AirJamProjectMode) =>\n z.object({\n cwd: z.string().optional(),\n gameId: z.string().optional(),\n mode:\n projectMode === \"monorepo\"\n ? z.enum([\"standalone-dev\", \"arcade-dev\", \"arcade-test\"]).optional()\n : z.literal(\"standalone-dev\").optional(),\n secure: z.boolean().optional(),\n });\n\nconst buildGameSessionModeSchema = (projectMode: AirJamProjectMode) =>\n projectMode === \"monorepo\"\n ? z.enum([\"standalone-dev\", \"arcade-dev\", \"arcade-test\"]).optional()\n : z.literal(\"standalone-dev\").optional();\n\nconst RELEASE_PROJECT_INPUT_SCHEMA = z.object({\n cwd: z.string().optional(),\n distDir: z.string().optional(),\n});\n\nconst RELEASE_PLATFORM_INPUT_SCHEMA = z.object({\n platformUrl: z.string().url().optional(),\n});\n\nconst RELEASE_VALIDATE_INPUT_SCHEMA = RELEASE_PROJECT_INPUT_SCHEMA.extend({\n bundle: z.string().optional(),\n skipBuild: z.boolean().optional(),\n});\n\nconst RELEASE_BUNDLE_INPUT_SCHEMA = RELEASE_PROJECT_INPUT_SCHEMA.extend({\n out: z.string().optional(),\n skipBuild: z.boolean().optional(),\n});\n\nconst RELEASE_LIST_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n game: z.string().optional(),\n});\n\nconst RELEASE_INSPECT_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n});\n\nconst RELEASE_SUBMIT_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n game: z.string().min(1),\n versionLabel: z.string().optional(),\n cwd: z.string().optional(),\n distDir: z.string().optional(),\n bundle: z.string().optional(),\n skipBuild: z.boolean().optional(),\n waitForProcessing: z.boolean().optional(),\n processingTimeoutSeconds: z.number().int().min(1).max(3_600).optional(),\n publish: z.boolean().optional(),\n});\n\nconst RELEASE_UPLOAD_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n cwd: z.string().optional(),\n bundle: z.string().min(1),\n});\n\nconst RELEASE_FINALIZE_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n generationId: z.string().min(1),\n});\n\nconst RELEASE_EXPORT_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n generationId: z.string().min(1),\n cwd: z.string().optional(),\n out: z.string().optional(),\n});\n\nconst RELEASE_MUTATION_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n});\n\nexport const READ_LOGS_INPUT_SCHEMA = z.object({\n cwd: z.string().optional(),\n view: z.string().optional(),\n source: z.string().optional(),\n trace: z.string().optional(),\n room: z.string().optional(),\n controller: z.string().optional(),\n event: z.string().optional(),\n process: z.string().optional(),\n level: z.string().optional(),\n runtime: z.string().optional(),\n epoch: z.number().int().optional(),\n consoleCategory: z.string().optional(),\n file: z.string().optional(),\n tail: z.number().int().nonnegative().optional(),\n});\n\nexport const INSPECT_GAME_INPUT_SCHEMA = z.object({\n cwd: z.string().optional(),\n gameId: z.string().optional(),\n});\n\nexport const STOP_DEV_INPUT_SCHEMA = z.object({\n cwd: z.string().optional(),\n processId: z.string().optional(),\n mode: z.enum([\"standalone-dev\", \"arcade-dev\", \"arcade-test\"]).optional(),\n});\n\nexport const buildToolDefinitions = ({\n projectMode,\n}: {\n projectMode: AirJamProjectMode;\n}): Record<string, AirJamMcpToolDefinition> => {\n const runQualityGateInputSchema = buildQualityGateSchema(projectMode);\n const startDevInputSchema = buildStartDevSchema(projectMode);\n const topologyInputSchema = buildTopologySchema(projectMode);\n const openGameSessionInputSchema = gameSessionOperationSchemas.open.extend({\n mode: buildGameSessionModeSchema(projectMode),\n });\n const captureGameSessionInputSchema = gameSessionOperationSchemas.capture;\n const gameSessionInputSchema = gameSessionOperationSchemas.close;\n const sendGameSessionInputSchema = gameSessionOperationSchemas.input;\n const readGameSessionInputSchema = gameSessionOperationSchemas.read;\n const observeGameSessionInputSchema = gameSessionOperationSchemas.observe;\n const invokeGameSessionActionInputSchema = gameSessionOperationSchemas.invoke;\n\n return {\n \"airjam.inspect_project\": {\n description:\n \"Inspect the current Air Jam project, detect monorepo vs standalone mode, and list available Air Jam capability groups.\",\n inputSchema: z.object({\n cwd: z.string().optional(),\n }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await inspectProject({ cwd })),\n },\n \"airjam.list_games\": {\n description:\n \"List Air Jam games visible from the current project. In the monorepo this returns first-party repo games; in a generated project it returns the current game.\",\n inputSchema: z.object({\n cwd: z.string().optional(),\n }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await listGames({ cwd })),\n },\n \"airjam.inspect_game\": {\n description:\n \"Inspect one Air Jam game, including config path, inferred controller route, agent-facing metadata, and available quality gates.\",\n inputSchema: INSPECT_GAME_INPUT_SCHEMA,\n run: async ({ cwd, gameId }: { cwd?: string; gameId?: string }) =>\n withJsonText(await inspectGame({ cwd, gameId })),\n },\n \"airjam.read_logs\": {\n description:\n \"Read the canonical Air Jam unified dev log stream. Start with view=signal and a bounded tail before adding more filters.\",\n inputSchema: READ_LOGS_INPUT_SCHEMA,\n run: async (input: z.infer<typeof READ_LOGS_INPUT_SCHEMA>) =>\n withJsonText(await readDevLogs({ ...input, tail: input.tail ?? 200 })),\n },\n \"airjam.run_quality_gate\": {\n description:\n \"Run one Air Jam quality gate such as typecheck, test, or build.\",\n inputSchema: runQualityGateInputSchema,\n run: async (input: z.infer<typeof runQualityGateInputSchema>) =>\n withJsonText(await runQualityGate(input)),\n },\n \"airjam.evaluate\": {\n description:\n \"Run the complete Air Jam game evaluation: typecheck, lint, tests, and a production build. Returns every gate result in one stable document.\",\n inputSchema: z.object({ cwd: z.string().optional() }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await runCompleteEvaluation({ cwd })),\n },\n \"airjam.auth_status\": {\n description:\n \"Inspect the locally stored Air Jam platform machine session used for hosted release operations.\",\n inputSchema: z.object({}),\n run: async () => withJsonText(await getPlatformMachineAuthStatus()),\n },\n \"airjam.release_doctor\": {\n description:\n \"Inspect a standalone Air Jam game project for hosted release readiness and return structured local doctor output.\",\n inputSchema: RELEASE_PROJECT_INPUT_SCHEMA,\n run: async ({\n cwd,\n distDir,\n }: z.infer<typeof RELEASE_PROJECT_INPUT_SCHEMA>) =>\n withJsonText(await inspectLocalRelease({ cwd, distDir })),\n },\n \"airjam.release_validate\": {\n description:\n \"Validate hosted release inputs for a standalone Air Jam game project or an existing hosted release zip.\",\n inputSchema: RELEASE_VALIDATE_INPUT_SCHEMA,\n run: async ({\n cwd,\n distDir,\n bundle,\n skipBuild,\n }: z.infer<typeof RELEASE_VALIDATE_INPUT_SCHEMA>) =>\n withJsonText(\n await validateLocalRelease({\n cwd,\n distDir,\n bundlePath: bundle,\n skipBuild,\n }),\n ),\n },\n \"airjam.release_bundle\": {\n description:\n \"Build and bundle a hosted release zip from a standalone Air Jam game project.\",\n inputSchema: RELEASE_BUNDLE_INPUT_SCHEMA,\n execution: {\n taskSupport: \"required\",\n },\n run: async ({\n cwd,\n distDir,\n out,\n skipBuild,\n }: z.infer<typeof RELEASE_BUNDLE_INPUT_SCHEMA>) =>\n withJsonText(\n await bundleLocalRelease({\n cwd,\n distDir,\n out,\n skipBuild,\n }),\n ),\n },\n \"airjam.release_list\": {\n description:\n \"List owned hosted games or, when given a game slug or id, list its hosted releases.\",\n inputSchema: RELEASE_LIST_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n game,\n }: z.infer<typeof RELEASE_LIST_INPUT_SCHEMA>) =>\n withJsonText(\n game\n ? await listPlatformReleases({\n platformUrl,\n slugOrId: game,\n })\n : await listPlatformReleaseTargets({\n platformUrl,\n }),\n ),\n },\n \"airjam.release_inspect\": {\n description: \"Inspect one hosted release on the Air Jam platform.\",\n inputSchema: RELEASE_INSPECT_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n releaseId,\n }: z.infer<typeof RELEASE_INSPECT_INPUT_SCHEMA>) =>\n withJsonText(\n await inspectPlatformRelease({\n platformUrl,\n releaseId,\n }),\n ),\n },\n \"airjam.release_upload\": {\n description:\n \"Upload an existing hosted release zip as a new immutable generation and return the exact generation needed for resumable finalization.\",\n inputSchema: RELEASE_UPLOAD_INPUT_SCHEMA,\n execution: {\n taskSupport: \"required\",\n },\n run: async ({\n platformUrl,\n releaseId,\n cwd,\n bundle,\n }: z.infer<typeof RELEASE_UPLOAD_INPUT_SCHEMA>) =>\n withJsonText(\n await uploadPlatformReleaseGeneration({\n platformUrl,\n releaseId,\n cwd,\n bundlePath: bundle,\n }),\n ),\n },\n \"airjam.release_finalize\": {\n description:\n \"Durably enqueue processing for one exact immutable hosted release generation and return its job; use release inspection to follow or recover it.\",\n inputSchema: RELEASE_FINALIZE_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n releaseId,\n generationId,\n }: z.infer<typeof RELEASE_FINALIZE_INPUT_SCHEMA>) =>\n withJsonText(\n await finalizePlatformReleaseGeneration({\n platformUrl,\n releaseId,\n generationId,\n }),\n ),\n },\n \"airjam.release_export\": {\n description:\n \"Download one exact immutable hosted release generation without overwriting an existing local archive.\",\n inputSchema: RELEASE_EXPORT_INPUT_SCHEMA,\n execution: {\n taskSupport: \"required\",\n },\n run: async ({\n platformUrl,\n releaseId,\n generationId,\n cwd,\n out,\n }: z.infer<typeof RELEASE_EXPORT_INPUT_SCHEMA>) =>\n withJsonText(\n await exportPlatformReleaseGeneration({\n platformUrl,\n releaseId,\n generationId,\n cwd,\n out,\n }),\n ),\n },\n \"airjam.release_submit\": {\n description:\n \"Bundle a standalone Air Jam game if needed, upload it as a hosted release draft, enqueue durable processing, optionally wait, and optionally publish after readiness.\",\n inputSchema: RELEASE_SUBMIT_INPUT_SCHEMA,\n execution: {\n taskSupport: \"required\",\n },\n run: async ({\n platformUrl,\n game,\n versionLabel,\n cwd,\n distDir,\n bundle,\n skipBuild,\n waitForProcessing,\n processingTimeoutSeconds,\n publish,\n }: z.infer<typeof RELEASE_SUBMIT_INPUT_SCHEMA>) =>\n withJsonText(\n await submitPlatformRelease({\n platformUrl,\n slugOrId: game,\n versionLabel,\n cwd,\n distDir,\n bundlePath: bundle,\n skipBuild,\n waitForProcessing,\n ...(processingTimeoutSeconds === undefined\n ? {}\n : { processingTimeoutMs: processingTimeoutSeconds * 1_000 }),\n publish,\n }),\n ),\n },\n \"airjam.release_publish\": {\n description: \"Publish one ready hosted release on the Air Jam platform.\",\n inputSchema: RELEASE_MUTATION_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n releaseId,\n }: z.infer<typeof RELEASE_MUTATION_INPUT_SCHEMA>) =>\n withJsonText(\n await publishPlatformRelease({\n platformUrl,\n releaseId,\n }),\n ),\n },\n \"airjam.release_archive\": {\n description:\n \"Retire one exact owned hosted release so it can no longer be played.\",\n inputSchema: RELEASE_MUTATION_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n releaseId,\n }: z.infer<typeof RELEASE_MUTATION_INPUT_SCHEMA>) =>\n withJsonText(await archivePlatformRelease({ platformUrl, releaseId })),\n },\n \"airjam.start_dev\": {\n description:\n \"Start the Air Jam local dev stack for the current project and return the managed process id plus resolved topology.\",\n inputSchema: startDevInputSchema,\n run: async (input: z.infer<typeof startDevInputSchema>) =>\n withJsonText(await startDev(input)),\n },\n \"airjam.stop_dev\": {\n description:\n \"Stop one or more Air Jam dev processes previously started by devtools.\",\n inputSchema: STOP_DEV_INPUT_SCHEMA,\n run: async (input: z.infer<typeof STOP_DEV_INPUT_SCHEMA>) =>\n withJsonText(await stopDev(input)),\n },\n \"airjam.status\": {\n description:\n \"List Air Jam dev processes plus unmanaged listeners on known local Air Jam ports.\",\n inputSchema: z.object({\n cwd: z.string().optional(),\n }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await getDevStatus({ cwd })),\n },\n \"airjam.reset_local\": {\n description:\n \"Best-effort cleanup for local Air Jam dev state: stop managed dev processes and stale known-port Air Jam listeners.\",\n inputSchema: z.object({\n cwd: z.string().optional(),\n }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await resetLocalDev({ cwd })),\n },\n \"airjam.topology\": {\n description:\n \"Return the resolved runtime topology and endpoint summary for the current project mode.\",\n inputSchema: topologyInputSchema,\n run: async (input: z.infer<typeof topologyInputSchema>) =>\n withJsonText(await getTopology(input)),\n },\n \"airjam.list_game_test_profiles\": {\n description:\n \"Discover authored game scenarios and their code, random or model policies. Runs own bounded participant lifetimes, with actual host observations and retained receipts.\",\n inputSchema: gameRunDiscoverySchema,\n run: async (input) => withJsonText(await listGameTestProfiles(input)),\n },\n \"airjam.start_game_run\": {\n description:\n \"Start an authored test (kind=test, profile, policy and budget) or a profile-free model player (kind=play, current room only, optional intent, ten-minute safety deadline and no verdict). Supply a stable UUID runId; retries return the same admission. Play requires the creator's granted current room. Tests may also target owned or headless rooms. Target headless plays with no page on game time, far faster than real time; owned plays the built page. Read or stop by runId.\",\n inputSchema: z.object({\n ...z.object(startTestGameRunSchema.shape).partial().shape,\n ...z.object(startPlayGameRunSchema.shape).partial().shape,\n kind: z.enum([\"test\", \"play\"]).default(\"test\"),\n runId: startTestGameRunSchema.shape.runId,\n target: startTestGameRunSchema.shape.target,\n }),\n run: async (input) =>\n withJsonText(await startGameRun(startGameRunSchema.parse(input))),\n },\n \"airjam.read_game_run\": {\n description:\n \"Read a run's actual state, controller ownership, counters, terminal reason and cleanup/evidence receipts.\",\n inputSchema: gameRunAddressSchema,\n run: async (input) => withJsonText(await readGameRun(input)),\n },\n \"airjam.wait_game_run\": {\n description:\n \"Wait for a terminal run or a bounded timeout. Returns the actual record; a timeout or disconnected client never stops the run.\",\n inputSchema: gameRunWaitSchema,\n run: async (input) => withJsonText(await waitGameRun(input)),\n },\n \"airjam.replay_game_run\": {\n description:\n \"Replay an ended headless run from its recorded input log on a fresh copy of the game, with no server or page, and report whether it ends where the run ended: the same agent view, simulation and step.\",\n inputSchema: gameRunAddressSchema,\n run: async (input) => withJsonText(await replayGameRun(input)),\n },\n \"airjam.stop_game_run\": {\n description:\n \"Stop a policy run, release its inputs, retain a final actual observation, and disconnect its owned controllers/host. Idempotent.\",\n inputSchema: gameRunAddressSchema,\n run: async (input) => withJsonText(await stopGameRun(input)),\n },\n \"airjam.steer_game_run\": {\n description:\n \"Change what one seat of an active run is trying to do, in words its decision-model policy reads, or clear it with null. Never sends a control; the policy still decides. Each change is recorded on the run with its time and source.\",\n inputSchema: gameRunSteerSchema,\n run: async (input) => withJsonText(await steerGameRun(input)),\n },\n \"airjam.list_game_runs\": {\n description:\n \"List activities admitted by this project's current session owner.\",\n inputSchema: gameRunDiscoverySchema.pick({ cwd: true }),\n run: async (input) => withJsonText(await listGameRuns(input)),\n },\n \"airjam.open_game_session\": {\n description:\n \"Open a separate owned test host with a virtual controller and live semantic actions. Omit roomId/controllerJoinUrl for semantic testing. Explicit room attachments are participant-only: inputs and raw controller tools, no semantic source interpretation or host actions.\",\n inputSchema: openGameSessionInputSchema,\n run: async (input: z.infer<typeof openGameSessionInputSchema>) =>\n withJsonText(await openGameSession(input)),\n },\n \"airjam.control_game_session_participant\": {\n description:\n \"Send a bounded agent participant input, semantic action or release through the actual room. Requires a fresh observed runtime identity and explicit controller-lifetime lease/sequence. Never grants host actions. Retry an unconfirmed command with the identical lease, sequence and envelope; never invent a new sequence to repeat an uncertain action.\",\n inputSchema: gameSessionOperationSchemas.control,\n run: async (input: z.infer<typeof gameSessionOperationSchemas.control>) =>\n withJsonText(await controlGameSessionParticipant(input)),\n },\n \"airjam.send_game_session_input\": {\n description:\n \"Send a player's declared controls through a previously opened Air Jam game session: a button true or false (false then true is one press), an axis a number from -1 to 1, a stick an { x, y }.\",\n inputSchema: sendGameSessionInputSchema,\n run: async (input: z.infer<typeof sendGameSessionInputSchema>) =>\n withJsonText(await sendGameSessionInput(input)),\n },\n \"airjam.read_game_session\": {\n description:\n \"Read authoritative live state and current semantic actions from an owned game host. Requires semanticAccess=owned-host; never interprets local source for someone else's room.\",\n inputSchema: readGameSessionInputSchema,\n run: async (input: z.infer<typeof readGameSessionInputSchema>) =>\n withJsonText(await readGameSession(input)),\n },\n \"airjam.observe_game_session\": {\n description:\n \"Observe fresh live semantic and host-local state from an owned game, with a bounded real render image when supported. Returns runtime identity, sample interval and surface coverage. Does not join a player or invoke actions; unsupported images are explicit.\",\n inputSchema: observeGameSessionInputSchema,\n run: async (input: z.infer<typeof observeGameSessionInputSchema>) => {\n const observation = await observeGameSession(input);\n const { visual, ...metadata } = observation;\n if (visual.status !== \"captured\") return withJsonText(observation);\n const { data, ...image } = visual.image;\n return {\n content: [\n ...withJsonText({\n ...metadata,\n visual: { status: \"captured\", image },\n }).content,\n { type: \"image\" as const, mimeType: image.mimeType, data },\n ],\n };\n },\n },\n \"airjam.read_game_settings\": {\n description:\n \"Read the current settings and revision from an owned live game host.\",\n inputSchema: gameSessionOperationSchemas[\"settings-read\"],\n run: async (\n input: z.infer<(typeof gameSessionOperationSchemas)[\"settings-read\"]>,\n ) => withJsonText(await readGameSettings(input)),\n },\n \"airjam.update_game_settings\": {\n description:\n \"Atomically change live settings on an owned game host using its current revision. Non-live settings require a new room.\",\n inputSchema: gameSessionOperationSchemas[\"settings-update\"],\n run: async (\n input: z.infer<(typeof gameSessionOperationSchemas)[\"settings-update\"]>,\n ) => withJsonText(await updateGameSettings(input)),\n },\n \"airjam.invoke_game_session_action\": {\n description:\n \"Invoke one discovered game-session action by its unified session action id, without manually choosing between player-semantic and host-staging internals.\",\n inputSchema: invokeGameSessionActionInputSchema,\n run: async (input: z.infer<typeof invokeGameSessionActionInputSchema>) =>\n withJsonText(await invokeGameSessionAction(input)),\n },\n \"airjam.capture_game_session_visuals\": {\n description:\n \"Capture canonical host and controller screenshots from the browser runtime owned by an open game session.\",\n inputSchema: captureGameSessionInputSchema,\n run: async (input: z.infer<typeof captureGameSessionInputSchema>) =>\n withJsonText(await captureGameSessionVisuals(input)),\n },\n \"airjam.close_game_session\": {\n description:\n \"Close one previously opened Air Jam game session and disconnect its virtual controller.\",\n inputSchema: gameSessionInputSchema,\n run: async (input: z.infer<typeof gameSessionInputSchema>) =>\n withJsonText(await closeGameSession(input)),\n },\n } as const;\n};\n\nexport type AirJamMcpToolDefinitions = ReturnType<typeof buildToolDefinitions>;\n\nexport const getRegisteredToolNamesForProjectMode = (\n projectMode: AirJamProjectMode,\n): ReadonlyArray<keyof AirJamMcpToolDefinitions> => {\n const mode =\n projectMode === \"monorepo\" || projectMode === \"standalone-game\"\n ? projectMode\n : \"unknown\";\n return toolContract[mode] as ReadonlyArray<keyof AirJamMcpToolDefinitions>;\n};\n","{\n \"monorepo\": [\n \"airjam.inspect_project\",\n \"airjam.auth_status\",\n \"airjam.list_games\",\n \"airjam.inspect_game\",\n \"airjam.read_logs\",\n \"airjam.run_quality_gate\",\n \"airjam.evaluate\",\n \"airjam.release_list\",\n \"airjam.release_inspect\",\n \"airjam.release_upload\",\n \"airjam.release_finalize\",\n \"airjam.release_export\",\n \"airjam.release_publish\",\n \"airjam.release_archive\",\n \"airjam.start_dev\",\n \"airjam.stop_dev\",\n \"airjam.status\",\n \"airjam.reset_local\",\n \"airjam.topology\",\n \"airjam.list_game_test_profiles\",\n \"airjam.start_game_run\",\n \"airjam.read_game_run\",\n \"airjam.wait_game_run\",\n \"airjam.stop_game_run\",\n \"airjam.steer_game_run\",\n \"airjam.list_game_runs\",\n \"airjam.open_game_session\",\n \"airjam.control_game_session_participant\",\n \"airjam.send_game_session_input\",\n \"airjam.read_game_session\",\n \"airjam.observe_game_session\",\n \"airjam.invoke_game_session_action\",\n \"airjam.read_game_settings\",\n \"airjam.update_game_settings\",\n \"airjam.capture_game_session_visuals\",\n \"airjam.close_game_session\"\n ],\n \"standalone-game\": [\n \"airjam.inspect_project\",\n \"airjam.auth_status\",\n \"airjam.list_games\",\n \"airjam.inspect_game\",\n \"airjam.read_logs\",\n \"airjam.run_quality_gate\",\n \"airjam.evaluate\",\n \"airjam.release_doctor\",\n \"airjam.release_validate\",\n \"airjam.release_bundle\",\n \"airjam.release_list\",\n \"airjam.release_inspect\",\n \"airjam.release_upload\",\n \"airjam.release_finalize\",\n \"airjam.release_export\",\n \"airjam.release_submit\",\n \"airjam.release_publish\",\n \"airjam.release_archive\",\n \"airjam.start_dev\",\n \"airjam.stop_dev\",\n \"airjam.status\",\n \"airjam.reset_local\",\n \"airjam.topology\",\n \"airjam.list_game_test_profiles\",\n \"airjam.start_game_run\",\n \"airjam.read_game_run\",\n \"airjam.wait_game_run\",\n \"airjam.stop_game_run\",\n \"airjam.steer_game_run\",\n \"airjam.list_game_runs\",\n \"airjam.open_game_session\",\n \"airjam.control_game_session_participant\",\n \"airjam.send_game_session_input\",\n \"airjam.read_game_session\",\n \"airjam.observe_game_session\",\n \"airjam.invoke_game_session_action\",\n \"airjam.read_game_settings\",\n \"airjam.update_game_settings\",\n \"airjam.capture_game_session_visuals\",\n \"airjam.close_game_session\"\n ],\n \"unknown\": [\"airjam.inspect_project\"]\n}\n","import fs from \"node:fs\";\n\ntype PackageManifest = {\n version?: unknown;\n};\n\nconst manifest = JSON.parse(\n fs.readFileSync(new URL(\"../package.json\", import.meta.url), \"utf8\"),\n) as PackageManifest;\n\nif (typeof manifest.version !== \"string\" || manifest.version.length === 0) {\n throw new Error(\"@air-jam/mcp-server package version is missing.\");\n}\n\nexport const AIR_JAM_MCP_SERVER_VERSION = manifest.version;\n"],"mappings":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AO,gBAAgB,QAAQ;AACrC,UAAM,cAAc,4BAA4B;AAAA,MAC9C,aAAa,KAAK;AAAA,MAClB,qBAAqB,KAAK,WAAW,gBAAgB;AAAA,IACvD,CAAC;AACD,UAAM,aAAa;AAAA,MACjB;AAAA,MACA,aAAa,KAAK;AAAA,IACpB;AAEA,QAAI,KAAK,WAAW,gBAAgB,YAAY;AAC9C,aAAO,aAAa,MAAM;AAAA,QACxB;AAAA,QACA;AAAA,UACE,GAAG;AAAA,UACH,WAAW;AAAA,YACT,aAAa;AAAA,UACf;AAAA,QACF;AAAA,QACA;AAAA,UACE,YAAY,OACV,MACA,EAAE,WAAAA,YAAW,iBAAiB,MAC3B;AACH,kBAAM,OAAO,MAAMA,WAAU,WAAW;AAAA,cACtC,KAAK,oBAAoB;AAAA,YAC3B,CAAC;AAED,kBAAM,YAAY;AAChB,kBAAI;AACF,sBAAM,SAAS,MAAM,KAAK,IAAI,IAAa;AAC3C,sBAAMA,WAAU;AAAA,kBACd,KAAK;AAAA,kBACL;AAAA,kBACA;AAAA,gBACF;AAAA,cACF,SAAS,OAAO;AACd,sBAAMA,WAAU;AAAA,kBACd,KAAK;AAAA,kBACL;AAAA,kBACA,sBAAsB,KAAK;AAAA,gBAC7B;AAAA,cACF;AAAA,YACF,GAAG;AAEH,mBAAO,EAAE,KAAK;AAAA,UAChB;AAAA,UACA,SAAS,OACP,OACA,EAAE,QAAQ,WAAAA,WAAU,MACjBA,WAAU,QAAQ,MAAM;AAAA,UAC7B,eAAe,OACb,OACA,EAAE,QAAQ,WAAAA,WAAU,MACjBA,WAAU,cAAc,MAAM;AAAA,QACrC;AAAA,MACF;AACA;AAAA,IACF;AAEA,WAAO;AAAA,MAAa;AAAA,MAAU;AAAA,MAAY,OAAO,SAC/C,KAAK,IAAI,IAAa;AAAA,IACxB;AAAA,EACF;AAEA,SAAO;AACT;","names":["taskStore"]}
|
|
1
|
+
{"version":3,"sources":["../src/config.ts","../src/server.ts","../src/tools.ts","../tool-contract.json","../src/version.ts"],"sourcesContent":["export {\n AIRJAM_CODEX_PROJECT_MCP_FILE,\n AIRJAM_PROJECT_MCP_FILE,\n createAirJamMcpServerDeclaration,\n createProjectLocalMcpConfig,\n inspectMcpProjectSetup,\n renderMcpClientProfile,\n writeProjectLocalMcpConfig,\n} from \"@air-jam/devtools/mcp-config\";\nexport type {\n AirJamMcpClientProfile,\n AirJamMcpClientProfileRender,\n AirJamMcpRegistrationInspection,\n AirJamMcpServerDeclaration,\n AirJamProjectLocalMcpConfig,\n InspectMcpProjectSetupResult,\n} from \"@air-jam/devtools/mcp-config\";\n","import { detectProjectContext } from \"@air-jam/devtools/context\";\nimport type {\n CreateTaskRequestHandlerExtra,\n TaskRequestHandlerExtra,\n} from \"@modelcontextprotocol/sdk/experimental/tasks\";\nimport { InMemoryTaskStore } from \"@modelcontextprotocol/sdk/experimental/tasks\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { CallToolResult } from \"@modelcontextprotocol/sdk/types.js\";\nimport {\n buildToolDefinitions,\n getRegisteredToolNamesForProjectMode,\n} from \"./tools.js\";\nimport { AIR_JAM_MCP_SERVER_VERSION } from \"./version.js\";\n\nconst DEFAULT_TASK_TTL_MS = 5 * 60 * 1000;\nconst TASK_CAPABLE_CLIENT_NOTE =\n \" Requires an MCP client with task-backed tool execution support.\";\n\nconst describeToolForRegistration = ({\n description,\n requiresTaskSupport,\n}: {\n description: string;\n requiresTaskSupport: boolean;\n}): string =>\n requiresTaskSupport\n ? `${description}${TASK_CAPABLE_CLIENT_NOTE}`\n : description;\n\nconst createToolErrorResult = (error: unknown): CallToolResult => ({\n content: [\n {\n type: \"text\",\n text:\n error instanceof Error\n ? error.message\n : `Air Jam MCP task failed: ${String(error)}`,\n },\n ],\n isError: true,\n});\n\n/**\n * Tools an embedding application replaces when it owns the game room: it runs\n * the development server, hosts the game and admits test runs into that room,\n * so agents never start another host, dev server or run of their own.\n */\nconst EMBEDDED_ROOM_OMITTED_TOOLS = new Set([\n \"airjam.start_dev\",\n \"airjam.stop_dev\",\n \"airjam.reset_local\",\n \"airjam.start_game_run\",\n \"airjam.stop_game_run\",\n \"airjam.steer_game_run\",\n \"airjam.open_game_session\",\n \"airjam.control_game_session_participant\",\n \"airjam.send_game_session_input\",\n \"airjam.read_game_session\",\n \"airjam.observe_game_session\",\n \"airjam.read_game_settings\",\n \"airjam.update_game_settings\",\n \"airjam.invoke_game_session_action\",\n \"airjam.capture_game_session_visuals\",\n \"airjam.close_game_session\",\n]);\n\nexport const createAirJamMcpServer = async ({\n cwd = process.cwd(),\n embeddedRoom = false,\n}: {\n cwd?: string;\n embeddedRoom?: boolean;\n} = {}): Promise<McpServer> => {\n const context = await detectProjectContext({ cwd });\n const toolDefinitions = buildToolDefinitions({\n projectMode: context.mode,\n });\n const registeredToolNames = getRegisteredToolNamesForProjectMode(\n context.mode,\n );\n const taskStore = new InMemoryTaskStore();\n const server = new McpServer(\n {\n name: \"air-jam\",\n version: AIR_JAM_MCP_SERVER_VERSION,\n },\n {\n capabilities: {\n tasks: {\n list: {},\n cancel: {},\n requests: {\n tools: {\n call: {},\n },\n },\n },\n },\n instructions:\n \"Use Air Jam tools before falling back to raw shell commands for Air Jam-native workflows. Start with inspect_project, read_logs with view=signal, and inspect_game when debugging runtime or game issues. If a tool advertises task-backed execution support as required, call it through an MCP client flow that supports tasks instead of assuming one blocking request/response call.\",\n taskStore,\n },\n );\n\n for (const toolName of registeredToolNames) {\n if (embeddedRoom && EMBEDDED_ROOM_OMITTED_TOOLS.has(toolName)) continue;\n const tool = toolDefinitions[toolName];\n const description = describeToolForRegistration({\n description: tool.description,\n requiresTaskSupport: tool.execution?.taskSupport === \"required\",\n });\n const baseConfig = {\n description,\n inputSchema: tool.inputSchema,\n };\n\n if (tool.execution?.taskSupport === \"required\") {\n server.experimental.tasks.registerToolTask(\n toolName,\n {\n ...baseConfig,\n execution: {\n taskSupport: \"required\",\n },\n },\n {\n createTask: async (\n args: unknown,\n { taskStore, taskRequestedTtl }: CreateTaskRequestHandlerExtra,\n ) => {\n const task = await taskStore.createTask({\n ttl: taskRequestedTtl ?? DEFAULT_TASK_TTL_MS,\n });\n\n void (async () => {\n try {\n const result = await tool.run(args as never);\n await taskStore.storeTaskResult(\n task.taskId,\n \"completed\",\n result,\n );\n } catch (error) {\n await taskStore.storeTaskResult(\n task.taskId,\n \"failed\",\n createToolErrorResult(error),\n );\n }\n })();\n\n return { task };\n },\n getTask: async (\n _args: unknown,\n { taskId, taskStore }: TaskRequestHandlerExtra,\n ) => taskStore.getTask(taskId),\n getTaskResult: async (\n _args: unknown,\n { taskId, taskStore }: TaskRequestHandlerExtra,\n ) => taskStore.getTaskResult(taskId) as Promise<CallToolResult>,\n },\n );\n continue;\n }\n\n server.registerTool(toolName, baseConfig, async (args: unknown) =>\n tool.run(args as never),\n );\n }\n\n return server;\n};\n","import { inspectProject } from \"@air-jam/devtools/context\";\nimport {\n getDevStatus,\n getTopology,\n resetLocalDev,\n startDev,\n stopDev,\n} from \"@air-jam/devtools/dev\";\nimport {\n gameRunAddressSchema,\n gameRunDiscoverySchema,\n gameRunSteerSchema,\n gameRunWaitSchema,\n startGameRunSchema,\n startPlayGameRunSchema,\n startTestGameRunSchema,\n} from \"@air-jam/devtools/game-runs\";\nimport {\n captureGameSessionVisuals,\n closeGameSession,\n controlGameSessionParticipant,\n gameSessionOperationSchemas,\n invokeGameSessionAction,\n listGameRuns,\n listGameTestProfiles,\n observeGameSession,\n openGameSession,\n readGameRun,\n readGameSession,\n readGameSettings,\n replayGameRun,\n sendGameSessionInput,\n startGameRun,\n steerGameRun,\n stopGameRun,\n updateGameSettings,\n waitGameRun,\n} from \"@air-jam/devtools/game-session\";\nimport { inspectGame, listGames } from \"@air-jam/devtools/games\";\nimport { readDevLogs } from \"@air-jam/devtools/logs\";\nimport {\n getPlatformMachineAuthStatus,\n listStoredPlatformMachineAuthStatuses,\n platformEnvironmentNames,\n resolveExplicitPlatformUrl,\n} from \"@air-jam/devtools/platform-auth\";\nimport {\n runCompleteEvaluation,\n runQualityGate,\n} from \"@air-jam/devtools/quality\";\nimport {\n archivePlatformRelease,\n bundleLocalRelease,\n exportPlatformReleaseGeneration,\n finalizePlatformReleaseGeneration,\n inspectLocalRelease,\n inspectPlatformRelease,\n listPlatformReleaseTargets,\n listPlatformReleases,\n publishPlatformRelease,\n submitPlatformRelease,\n uploadPlatformReleaseGeneration,\n validateLocalRelease,\n} from \"@air-jam/devtools/release\";\nimport type {\n CallToolResult,\n ToolExecution,\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport { z } from \"zod\";\nimport toolContract from \"../tool-contract.json\" with { type: \"json\" };\n\ntype AirJamProjectMode = \"monorepo\" | \"standalone-game\" | \"unknown\";\ntype AirJamQualityGate =\n | \"typecheck\"\n | \"lint\"\n | \"test\"\n | \"build\"\n | \"format-check\"\n | \"scaffold-smoke\"\n | \"release-check\";\n\nexport type AirJamMcpToolDefinition = {\n description: string;\n inputSchema: z.ZodTypeAny;\n run: (args: never) => Promise<Pick<CallToolResult, \"content\">>;\n execution?: ToolExecution;\n};\n\nconst withJsonText = <T>(value: T) => ({\n content: [\n {\n type: \"text\" as const,\n text: JSON.stringify(value, null, 2),\n },\n ],\n});\n\nconst buildQualityGateSchema = (projectMode: AirJamProjectMode) =>\n z.object({\n cwd: z.string().optional(),\n gate:\n projectMode === \"monorepo\"\n ? z.enum([\n \"typecheck\",\n \"lint\",\n \"test\",\n \"build\",\n \"format-check\",\n \"scaffold-smoke\",\n \"release-check\",\n ] satisfies [AirJamQualityGate, ...AirJamQualityGate[]])\n : z.enum([\n \"typecheck\",\n \"lint\",\n \"test\",\n \"build\",\n \"format-check\",\n ] satisfies [AirJamQualityGate, ...AirJamQualityGate[]]),\n packageFilter: z.string().optional(),\n });\n\nconst buildStartDevSchema = (projectMode: AirJamProjectMode) =>\n z.object({\n cwd: z.string().optional(),\n gameId: z.string().optional(),\n mode:\n projectMode === \"monorepo\"\n ? z.enum([\"standalone-dev\", \"arcade-dev\", \"arcade-test\"]).optional()\n : z.literal(\"standalone-dev\").optional(),\n secure: z.boolean().optional(),\n });\n\nconst buildTopologySchema = (projectMode: AirJamProjectMode) =>\n z.object({\n cwd: z.string().optional(),\n gameId: z.string().optional(),\n mode:\n projectMode === \"monorepo\"\n ? z.enum([\"standalone-dev\", \"arcade-dev\", \"arcade-test\"]).optional()\n : z.literal(\"standalone-dev\").optional(),\n secure: z.boolean().optional(),\n });\n\nconst buildGameSessionModeSchema = (projectMode: AirJamProjectMode) =>\n projectMode === \"monorepo\"\n ? z.enum([\"standalone-dev\", \"arcade-dev\", \"arcade-test\"]).optional()\n : z.literal(\"standalone-dev\").optional();\n\nconst RELEASE_PROJECT_INPUT_SCHEMA = z.object({\n cwd: z.string().optional(),\n distDir: z.string().optional(),\n});\n\nconst RELEASE_PLATFORM_INPUT_SCHEMA = z.object({\n platformUrl: z.string().url().optional(),\n environment: z.enum(platformEnvironmentNames).optional(),\n});\n\nconst AUTH_STATUS_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n all: z.boolean().optional(),\n});\n\nconst RELEASE_VALIDATE_INPUT_SCHEMA = RELEASE_PROJECT_INPUT_SCHEMA.extend({\n bundle: z.string().optional(),\n skipBuild: z.boolean().optional(),\n});\n\nconst RELEASE_BUNDLE_INPUT_SCHEMA = RELEASE_PROJECT_INPUT_SCHEMA.extend({\n out: z.string().optional(),\n skipBuild: z.boolean().optional(),\n});\n\nconst RELEASE_LIST_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n game: z.string().optional(),\n});\n\nconst RELEASE_INSPECT_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n});\n\nconst RELEASE_SUBMIT_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n game: z.string().min(1),\n versionLabel: z.string().optional(),\n cwd: z.string().optional(),\n distDir: z.string().optional(),\n bundle: z.string().optional(),\n skipBuild: z.boolean().optional(),\n waitForProcessing: z.boolean().optional(),\n processingTimeoutSeconds: z.number().int().min(1).max(3_600).optional(),\n publish: z.boolean().optional(),\n});\n\nconst RELEASE_UPLOAD_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n cwd: z.string().optional(),\n bundle: z.string().min(1),\n});\n\nconst RELEASE_FINALIZE_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n generationId: z.string().min(1),\n});\n\nconst RELEASE_EXPORT_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n generationId: z.string().min(1),\n cwd: z.string().optional(),\n out: z.string().optional(),\n});\n\nconst RELEASE_MUTATION_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({\n releaseId: z.string().min(1),\n});\n\nexport const READ_LOGS_INPUT_SCHEMA = z.object({\n cwd: z.string().optional(),\n view: z.string().optional(),\n source: z.string().optional(),\n trace: z.string().optional(),\n room: z.string().optional(),\n controller: z.string().optional(),\n event: z.string().optional(),\n process: z.string().optional(),\n level: z.string().optional(),\n runtime: z.string().optional(),\n epoch: z.number().int().optional(),\n consoleCategory: z.string().optional(),\n file: z.string().optional(),\n tail: z.number().int().nonnegative().optional(),\n});\n\nexport const INSPECT_GAME_INPUT_SCHEMA = z.object({\n cwd: z.string().optional(),\n gameId: z.string().optional(),\n});\n\nexport const STOP_DEV_INPUT_SCHEMA = z.object({\n cwd: z.string().optional(),\n processId: z.string().optional(),\n mode: z.enum([\"standalone-dev\", \"arcade-dev\", \"arcade-test\"]).optional(),\n});\n\nexport const buildToolDefinitions = ({\n projectMode,\n}: {\n projectMode: AirJamProjectMode;\n}): Record<string, AirJamMcpToolDefinition> => {\n const runQualityGateInputSchema = buildQualityGateSchema(projectMode);\n const startDevInputSchema = buildStartDevSchema(projectMode);\n const topologyInputSchema = buildTopologySchema(projectMode);\n const openGameSessionInputSchema = gameSessionOperationSchemas.open.extend({\n mode: buildGameSessionModeSchema(projectMode),\n });\n const captureGameSessionInputSchema = gameSessionOperationSchemas.capture;\n const gameSessionInputSchema = gameSessionOperationSchemas.close;\n const sendGameSessionInputSchema = gameSessionOperationSchemas.input;\n const readGameSessionInputSchema = gameSessionOperationSchemas.read;\n const observeGameSessionInputSchema = gameSessionOperationSchemas.observe;\n const invokeGameSessionActionInputSchema = gameSessionOperationSchemas.invoke;\n\n return {\n \"airjam.inspect_project\": {\n description:\n \"Inspect the current Air Jam project, detect monorepo vs standalone mode, and list available Air Jam capability groups.\",\n inputSchema: z.object({\n cwd: z.string().optional(),\n }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await inspectProject({ cwd })),\n },\n \"airjam.list_games\": {\n description:\n \"List Air Jam games visible from the current project. In the monorepo this returns first-party repo games; in a generated project it returns the current game.\",\n inputSchema: z.object({\n cwd: z.string().optional(),\n }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await listGames({ cwd })),\n },\n \"airjam.inspect_game\": {\n description:\n \"Inspect one Air Jam game, including config path, inferred controller route, agent-facing metadata, and available quality gates.\",\n inputSchema: INSPECT_GAME_INPUT_SCHEMA,\n run: async ({ cwd, gameId }: { cwd?: string; gameId?: string }) =>\n withJsonText(await inspectGame({ cwd, gameId })),\n },\n \"airjam.read_logs\": {\n description:\n \"Read the canonical Air Jam unified dev log stream. Start with view=signal and a bounded tail before adding more filters.\",\n inputSchema: READ_LOGS_INPUT_SCHEMA,\n run: async (input: z.infer<typeof READ_LOGS_INPUT_SCHEMA>) =>\n withJsonText(await readDevLogs({ ...input, tail: input.tail ?? 200 })),\n },\n \"airjam.run_quality_gate\": {\n description:\n \"Run one Air Jam quality gate such as typecheck, test, or build.\",\n inputSchema: runQualityGateInputSchema,\n run: async (input: z.infer<typeof runQualityGateInputSchema>) =>\n withJsonText(await runQualityGate(input)),\n },\n \"airjam.evaluate\": {\n description:\n \"Run the complete Air Jam game evaluation: typecheck, lint, tests, and a production build. Returns every gate result in one stable document.\",\n inputSchema: z.object({ cwd: z.string().optional() }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await runCompleteEvaluation({ cwd })),\n },\n \"airjam.auth_status\": {\n description:\n \"Inspect the locally stored Air Jam platform machine session used for hosted release operations.\",\n inputSchema: AUTH_STATUS_INPUT_SCHEMA,\n run: async (input: z.infer<typeof AUTH_STATUS_INPUT_SCHEMA>) => {\n const platformUrl = resolveExplicitPlatformUrl(input);\n return withJsonText(\n input.all\n ? await listStoredPlatformMachineAuthStatuses()\n : await getPlatformMachineAuthStatus(platformUrl),\n );\n },\n },\n \"airjam.release_doctor\": {\n description:\n \"Inspect a standalone Air Jam game project for hosted release readiness and return structured local doctor output.\",\n inputSchema: RELEASE_PROJECT_INPUT_SCHEMA,\n run: async ({\n cwd,\n distDir,\n }: z.infer<typeof RELEASE_PROJECT_INPUT_SCHEMA>) =>\n withJsonText(await inspectLocalRelease({ cwd, distDir })),\n },\n \"airjam.release_validate\": {\n description:\n \"Validate hosted release inputs for a standalone Air Jam game project or an existing hosted release zip.\",\n inputSchema: RELEASE_VALIDATE_INPUT_SCHEMA,\n run: async ({\n cwd,\n distDir,\n bundle,\n skipBuild,\n }: z.infer<typeof RELEASE_VALIDATE_INPUT_SCHEMA>) =>\n withJsonText(\n await validateLocalRelease({\n cwd,\n distDir,\n bundlePath: bundle,\n skipBuild,\n }),\n ),\n },\n \"airjam.release_bundle\": {\n description:\n \"Build and bundle a hosted release zip from a standalone Air Jam game project.\",\n inputSchema: RELEASE_BUNDLE_INPUT_SCHEMA,\n execution: {\n taskSupport: \"required\",\n },\n run: async ({\n cwd,\n distDir,\n out,\n skipBuild,\n }: z.infer<typeof RELEASE_BUNDLE_INPUT_SCHEMA>) =>\n withJsonText(\n await bundleLocalRelease({\n cwd,\n distDir,\n out,\n skipBuild,\n }),\n ),\n },\n \"airjam.release_list\": {\n description:\n \"List owned hosted games or, when given a game slug or id, list its hosted releases.\",\n inputSchema: RELEASE_LIST_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n environment,\n game,\n }: z.infer<typeof RELEASE_LIST_INPUT_SCHEMA>) =>\n withJsonText(\n game\n ? await listPlatformReleases({\n platformUrl: resolveExplicitPlatformUrl({\n platformUrl,\n environment,\n }),\n slugOrId: game,\n })\n : await listPlatformReleaseTargets({\n platformUrl: resolveExplicitPlatformUrl({\n platformUrl,\n environment,\n }),\n }),\n ),\n },\n \"airjam.release_inspect\": {\n description: \"Inspect one hosted release on the Air Jam platform.\",\n inputSchema: RELEASE_INSPECT_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n environment,\n releaseId,\n }: z.infer<typeof RELEASE_INSPECT_INPUT_SCHEMA>) =>\n withJsonText(\n await inspectPlatformRelease({\n platformUrl: resolveExplicitPlatformUrl({\n platformUrl,\n environment,\n }),\n releaseId,\n }),\n ),\n },\n \"airjam.release_upload\": {\n description:\n \"Upload an existing hosted release zip as a new immutable generation and return the exact generation needed for resumable finalization.\",\n inputSchema: RELEASE_UPLOAD_INPUT_SCHEMA,\n execution: {\n taskSupport: \"required\",\n },\n run: async ({\n platformUrl,\n environment,\n releaseId,\n cwd,\n bundle,\n }: z.infer<typeof RELEASE_UPLOAD_INPUT_SCHEMA>) =>\n withJsonText(\n await uploadPlatformReleaseGeneration({\n platformUrl: resolveExplicitPlatformUrl({\n platformUrl,\n environment,\n }),\n releaseId,\n cwd,\n bundlePath: bundle,\n }),\n ),\n },\n \"airjam.release_finalize\": {\n description:\n \"Durably enqueue processing for one exact immutable hosted release generation and return its job; use release inspection to follow or recover it.\",\n inputSchema: RELEASE_FINALIZE_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n environment,\n releaseId,\n generationId,\n }: z.infer<typeof RELEASE_FINALIZE_INPUT_SCHEMA>) =>\n withJsonText(\n await finalizePlatformReleaseGeneration({\n platformUrl: resolveExplicitPlatformUrl({\n platformUrl,\n environment,\n }),\n releaseId,\n generationId,\n }),\n ),\n },\n \"airjam.release_export\": {\n description:\n \"Download one exact immutable hosted release generation without overwriting an existing local archive.\",\n inputSchema: RELEASE_EXPORT_INPUT_SCHEMA,\n execution: {\n taskSupport: \"required\",\n },\n run: async ({\n platformUrl,\n environment,\n releaseId,\n generationId,\n cwd,\n out,\n }: z.infer<typeof RELEASE_EXPORT_INPUT_SCHEMA>) =>\n withJsonText(\n await exportPlatformReleaseGeneration({\n platformUrl: resolveExplicitPlatformUrl({\n platformUrl,\n environment,\n }),\n releaseId,\n generationId,\n cwd,\n out,\n }),\n ),\n },\n \"airjam.release_submit\": {\n description:\n \"Bundle a standalone Air Jam game if needed, upload it as a hosted release draft, enqueue durable processing, optionally wait, and optionally publish after readiness.\",\n inputSchema: RELEASE_SUBMIT_INPUT_SCHEMA,\n execution: {\n taskSupport: \"required\",\n },\n run: async ({\n platformUrl,\n environment,\n game,\n versionLabel,\n cwd,\n distDir,\n bundle,\n skipBuild,\n waitForProcessing,\n processingTimeoutSeconds,\n publish,\n }: z.infer<typeof RELEASE_SUBMIT_INPUT_SCHEMA>) =>\n withJsonText(\n await submitPlatformRelease({\n platformUrl: resolveExplicitPlatformUrl({\n platformUrl,\n environment,\n }),\n slugOrId: game,\n versionLabel,\n cwd,\n distDir,\n bundlePath: bundle,\n skipBuild,\n waitForProcessing,\n ...(processingTimeoutSeconds === undefined\n ? {}\n : { processingTimeoutMs: processingTimeoutSeconds * 1_000 }),\n publish,\n }),\n ),\n },\n \"airjam.release_publish\": {\n description: \"Publish one ready hosted release on the Air Jam platform.\",\n inputSchema: RELEASE_MUTATION_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n environment,\n releaseId,\n }: z.infer<typeof RELEASE_MUTATION_INPUT_SCHEMA>) =>\n withJsonText(\n await publishPlatformRelease({\n platformUrl: resolveExplicitPlatformUrl({\n platformUrl,\n environment,\n }),\n releaseId,\n }),\n ),\n },\n \"airjam.release_archive\": {\n description:\n \"Retire one exact owned hosted release so it can no longer be played.\",\n inputSchema: RELEASE_MUTATION_INPUT_SCHEMA,\n run: async ({\n platformUrl,\n environment,\n releaseId,\n }: z.infer<typeof RELEASE_MUTATION_INPUT_SCHEMA>) =>\n withJsonText(\n await archivePlatformRelease({\n platformUrl: resolveExplicitPlatformUrl({\n platformUrl,\n environment,\n }),\n releaseId,\n }),\n ),\n },\n \"airjam.start_dev\": {\n description:\n \"Start the Air Jam local dev stack for the current project and return the managed process id plus resolved topology.\",\n inputSchema: startDevInputSchema,\n run: async (input: z.infer<typeof startDevInputSchema>) =>\n withJsonText(await startDev(input)),\n },\n \"airjam.stop_dev\": {\n description:\n \"Stop one or more Air Jam dev processes previously started by devtools.\",\n inputSchema: STOP_DEV_INPUT_SCHEMA,\n run: async (input: z.infer<typeof STOP_DEV_INPUT_SCHEMA>) =>\n withJsonText(await stopDev(input)),\n },\n \"airjam.status\": {\n description:\n \"List Air Jam dev processes plus unmanaged listeners on known local Air Jam ports.\",\n inputSchema: z.object({\n cwd: z.string().optional(),\n }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await getDevStatus({ cwd })),\n },\n \"airjam.reset_local\": {\n description:\n \"Best-effort cleanup for local Air Jam dev state: stop managed dev processes and stale known-port Air Jam listeners.\",\n inputSchema: z.object({\n cwd: z.string().optional(),\n }),\n run: async ({ cwd }: { cwd?: string }) =>\n withJsonText(await resetLocalDev({ cwd })),\n },\n \"airjam.topology\": {\n description:\n \"Return the resolved runtime topology and endpoint summary for the current project mode.\",\n inputSchema: topologyInputSchema,\n run: async (input: z.infer<typeof topologyInputSchema>) =>\n withJsonText(await getTopology(input)),\n },\n \"airjam.list_game_test_profiles\": {\n description:\n \"Discover authored game scenarios and their code, random or model policies. Runs own bounded participant lifetimes, with actual host observations and retained receipts.\",\n inputSchema: gameRunDiscoverySchema,\n run: async (input) => withJsonText(await listGameTestProfiles(input)),\n },\n \"airjam.start_game_run\": {\n description:\n \"Start an authored test (kind=test, profile, policy and budget) or a profile-free model player (kind=play, current room only, optional intent, ten-minute safety deadline and no verdict). Supply a stable UUID runId; retries return the same admission. Play requires the creator's granted current room. Tests may also target owned or headless rooms. Target headless plays with no page on game time, far faster than real time; owned plays the built page. Read or stop by runId.\",\n inputSchema: z.object({\n ...z.object(startTestGameRunSchema.shape).partial().shape,\n ...z.object(startPlayGameRunSchema.shape).partial().shape,\n kind: z.enum([\"test\", \"play\"]).default(\"test\"),\n runId: startTestGameRunSchema.shape.runId,\n target: startTestGameRunSchema.shape.target,\n }),\n run: async (input) =>\n withJsonText(await startGameRun(startGameRunSchema.parse(input))),\n },\n \"airjam.read_game_run\": {\n description:\n \"Read a run's actual state, controller ownership, counters, terminal reason and cleanup/evidence receipts.\",\n inputSchema: gameRunAddressSchema,\n run: async (input) => withJsonText(await readGameRun(input)),\n },\n \"airjam.wait_game_run\": {\n description:\n \"Wait for a terminal run or a bounded timeout. Returns the actual record; a timeout or disconnected client never stops the run.\",\n inputSchema: gameRunWaitSchema,\n run: async (input) => withJsonText(await waitGameRun(input)),\n },\n \"airjam.replay_game_run\": {\n description:\n \"Replay an ended headless run from its recorded input log on a fresh copy of the game, with no server or page, and report whether it ends where the run ended: the same agent view, simulation and step.\",\n inputSchema: gameRunAddressSchema,\n run: async (input) => withJsonText(await replayGameRun(input)),\n },\n \"airjam.stop_game_run\": {\n description:\n \"Stop a policy run, release its inputs, retain a final actual observation, and disconnect its owned controllers/host. Idempotent.\",\n inputSchema: gameRunAddressSchema,\n run: async (input) => withJsonText(await stopGameRun(input)),\n },\n \"airjam.steer_game_run\": {\n description:\n \"Change what one seat of an active run is trying to do, in words its decision-model policy reads, or clear it with null. Never sends a control; the policy still decides. Each change is recorded on the run with its time and source.\",\n inputSchema: gameRunSteerSchema,\n run: async (input) => withJsonText(await steerGameRun(input)),\n },\n \"airjam.list_game_runs\": {\n description:\n \"List activities admitted by this project's current session owner.\",\n inputSchema: gameRunDiscoverySchema.pick({ cwd: true }),\n run: async (input) => withJsonText(await listGameRuns(input)),\n },\n \"airjam.open_game_session\": {\n description:\n \"Open a separate owned test host with a virtual controller and live semantic actions. Omit roomId/controllerJoinUrl for semantic testing. Explicit room attachments are participant-only: inputs and raw controller tools, no semantic source interpretation or host actions.\",\n inputSchema: openGameSessionInputSchema,\n run: async (input: z.infer<typeof openGameSessionInputSchema>) =>\n withJsonText(await openGameSession(input)),\n },\n \"airjam.control_game_session_participant\": {\n description:\n \"Send a bounded agent participant input, semantic action or release through the actual room. Requires a fresh observed runtime identity and explicit controller-lifetime lease/sequence. Never grants host actions. Retry an unconfirmed command with the identical lease, sequence and envelope; never invent a new sequence to repeat an uncertain action.\",\n inputSchema: gameSessionOperationSchemas.control,\n run: async (input: z.infer<typeof gameSessionOperationSchemas.control>) =>\n withJsonText(await controlGameSessionParticipant(input)),\n },\n \"airjam.send_game_session_input\": {\n description:\n \"Send a player's declared controls through a previously opened Air Jam game session: a button true or false (false then true is one press), an axis a number from -1 to 1, a stick an { x, y }.\",\n inputSchema: sendGameSessionInputSchema,\n run: async (input: z.infer<typeof sendGameSessionInputSchema>) =>\n withJsonText(await sendGameSessionInput(input)),\n },\n \"airjam.read_game_session\": {\n description:\n \"Read authoritative live state and current semantic actions from an owned game host. Requires semanticAccess=owned-host; never interprets local source for someone else's room.\",\n inputSchema: readGameSessionInputSchema,\n run: async (input: z.infer<typeof readGameSessionInputSchema>) =>\n withJsonText(await readGameSession(input)),\n },\n \"airjam.observe_game_session\": {\n description:\n \"Observe fresh live semantic and host-local state from an owned game, with a bounded real render image when supported. Returns runtime identity, sample interval and surface coverage. Does not join a player or invoke actions; unsupported images are explicit.\",\n inputSchema: observeGameSessionInputSchema,\n run: async (input: z.infer<typeof observeGameSessionInputSchema>) => {\n const observation = await observeGameSession(input);\n const { visual, ...metadata } = observation;\n if (visual.status !== \"captured\") return withJsonText(observation);\n const { data, ...image } = visual.image;\n return {\n content: [\n ...withJsonText({\n ...metadata,\n visual: { status: \"captured\", image },\n }).content,\n { type: \"image\" as const, mimeType: image.mimeType, data },\n ],\n };\n },\n },\n \"airjam.read_game_settings\": {\n description:\n \"Read the current settings and revision from an owned live game host.\",\n inputSchema: gameSessionOperationSchemas[\"settings-read\"],\n run: async (\n input: z.infer<(typeof gameSessionOperationSchemas)[\"settings-read\"]>,\n ) => withJsonText(await readGameSettings(input)),\n },\n \"airjam.update_game_settings\": {\n description:\n \"Atomically change live settings on an owned game host using its current revision. Non-live settings require a new room.\",\n inputSchema: gameSessionOperationSchemas[\"settings-update\"],\n run: async (\n input: z.infer<(typeof gameSessionOperationSchemas)[\"settings-update\"]>,\n ) => withJsonText(await updateGameSettings(input)),\n },\n \"airjam.invoke_game_session_action\": {\n description:\n \"Invoke one discovered game-session action by its unified session action id, without manually choosing between player-semantic and host-staging internals.\",\n inputSchema: invokeGameSessionActionInputSchema,\n run: async (input: z.infer<typeof invokeGameSessionActionInputSchema>) =>\n withJsonText(await invokeGameSessionAction(input)),\n },\n \"airjam.capture_game_session_visuals\": {\n description:\n \"Capture canonical host and controller screenshots from the browser runtime owned by an open game session.\",\n inputSchema: captureGameSessionInputSchema,\n run: async (input: z.infer<typeof captureGameSessionInputSchema>) =>\n withJsonText(await captureGameSessionVisuals(input)),\n },\n \"airjam.close_game_session\": {\n description:\n \"Close one previously opened Air Jam game session and disconnect its virtual controller.\",\n inputSchema: gameSessionInputSchema,\n run: async (input: z.infer<typeof gameSessionInputSchema>) =>\n withJsonText(await closeGameSession(input)),\n },\n } as const;\n};\n\nexport type AirJamMcpToolDefinitions = ReturnType<typeof buildToolDefinitions>;\n\nexport const getRegisteredToolNamesForProjectMode = (\n projectMode: AirJamProjectMode,\n): ReadonlyArray<keyof AirJamMcpToolDefinitions> => {\n const mode =\n projectMode === \"monorepo\" || projectMode === \"standalone-game\"\n ? projectMode\n : \"unknown\";\n return toolContract[mode] as ReadonlyArray<keyof AirJamMcpToolDefinitions>;\n};\n","{\n \"monorepo\": [\n \"airjam.inspect_project\",\n \"airjam.auth_status\",\n \"airjam.list_games\",\n \"airjam.inspect_game\",\n \"airjam.read_logs\",\n \"airjam.run_quality_gate\",\n \"airjam.evaluate\",\n \"airjam.release_list\",\n \"airjam.release_inspect\",\n \"airjam.release_upload\",\n \"airjam.release_finalize\",\n \"airjam.release_export\",\n \"airjam.release_publish\",\n \"airjam.release_archive\",\n \"airjam.start_dev\",\n \"airjam.stop_dev\",\n \"airjam.status\",\n \"airjam.reset_local\",\n \"airjam.topology\",\n \"airjam.list_game_test_profiles\",\n \"airjam.start_game_run\",\n \"airjam.read_game_run\",\n \"airjam.wait_game_run\",\n \"airjam.stop_game_run\",\n \"airjam.steer_game_run\",\n \"airjam.list_game_runs\",\n \"airjam.open_game_session\",\n \"airjam.control_game_session_participant\",\n \"airjam.send_game_session_input\",\n \"airjam.read_game_session\",\n \"airjam.observe_game_session\",\n \"airjam.invoke_game_session_action\",\n \"airjam.read_game_settings\",\n \"airjam.update_game_settings\",\n \"airjam.capture_game_session_visuals\",\n \"airjam.close_game_session\"\n ],\n \"standalone-game\": [\n \"airjam.inspect_project\",\n \"airjam.auth_status\",\n \"airjam.list_games\",\n \"airjam.inspect_game\",\n \"airjam.read_logs\",\n \"airjam.run_quality_gate\",\n \"airjam.evaluate\",\n \"airjam.release_doctor\",\n \"airjam.release_validate\",\n \"airjam.release_bundle\",\n \"airjam.release_list\",\n \"airjam.release_inspect\",\n \"airjam.release_upload\",\n \"airjam.release_finalize\",\n \"airjam.release_export\",\n \"airjam.release_submit\",\n \"airjam.release_publish\",\n \"airjam.release_archive\",\n \"airjam.start_dev\",\n \"airjam.stop_dev\",\n \"airjam.status\",\n \"airjam.reset_local\",\n \"airjam.topology\",\n \"airjam.list_game_test_profiles\",\n \"airjam.start_game_run\",\n \"airjam.read_game_run\",\n \"airjam.wait_game_run\",\n \"airjam.stop_game_run\",\n \"airjam.steer_game_run\",\n \"airjam.list_game_runs\",\n \"airjam.open_game_session\",\n \"airjam.control_game_session_participant\",\n \"airjam.send_game_session_input\",\n \"airjam.read_game_session\",\n \"airjam.observe_game_session\",\n \"airjam.invoke_game_session_action\",\n \"airjam.read_game_settings\",\n \"airjam.update_game_settings\",\n \"airjam.capture_game_session_visuals\",\n \"airjam.close_game_session\"\n ],\n \"unknown\": [\"airjam.inspect_project\"]\n}\n","import fs from \"node:fs\";\n\ntype PackageManifest = {\n version?: unknown;\n};\n\nconst manifest = JSON.parse(\n fs.readFileSync(new URL(\"../package.json\", import.meta.url), \"utf8\"),\n) as PackageManifest;\n\nif (typeof manifest.version !== \"string\" || manifest.version.length === 0) {\n throw new Error(\"@air-jam/mcp-server package version is missing.\");\n}\n\nexport const AIR_JAM_MCP_SERVER_VERSION = manifest.version;\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACRP,SAAS,4BAA4B;AAKrC,SAAS,yBAAyB;AAClC,SAAS,iBAAiB;;;ACN1B,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,aAAa,iBAAiB;AACvC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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 @@ import {
|
|
|
44
44
|
} from "@air-jam/devtools/game-session";
|
|
45
45
|
import { inspectGame, listGames } from "@air-jam/devtools/games";
|
|
46
46
|
import { readDevLogs } from "@air-jam/devtools/logs";
|
|
47
|
-
import {
|
|
47
|
+
import {
|
|
48
|
+
getPlatformMachineAuthStatus,
|
|
49
|
+
listStoredPlatformMachineAuthStatuses,
|
|
50
|
+
platformEnvironmentNames,
|
|
51
|
+
resolveExplicitPlatformUrl
|
|
52
|
+
} from "@air-jam/devtools/platform-auth";
|
|
48
53
|
import {
|
|
49
54
|
runCompleteEvaluation,
|
|
50
55
|
runQualityGate
|
|
@@ -196,7 +201,11 @@ var RELEASE_PROJECT_INPUT_SCHEMA = z.object({
|
|
|
196
201
|
distDir: z.string().optional()
|
|
197
202
|
});
|
|
198
203
|
var RELEASE_PLATFORM_INPUT_SCHEMA = z.object({
|
|
199
|
-
platformUrl: z.string().url().optional()
|
|
204
|
+
platformUrl: z.string().url().optional(),
|
|
205
|
+
environment: z.enum(platformEnvironmentNames).optional()
|
|
206
|
+
});
|
|
207
|
+
var AUTH_STATUS_INPUT_SCHEMA = RELEASE_PLATFORM_INPUT_SCHEMA.extend({
|
|
208
|
+
all: z.boolean().optional()
|
|
200
209
|
});
|
|
201
210
|
var RELEASE_VALIDATE_INPUT_SCHEMA = RELEASE_PROJECT_INPUT_SCHEMA.extend({
|
|
202
211
|
bundle: z.string().optional(),
|
|
@@ -318,8 +327,13 @@ var buildToolDefinitions = ({
|
|
|
318
327
|
},
|
|
319
328
|
"airjam.auth_status": {
|
|
320
329
|
description: "Inspect the locally stored Air Jam platform machine session used for hosted release operations.",
|
|
321
|
-
inputSchema:
|
|
322
|
-
run: async () =>
|
|
330
|
+
inputSchema: AUTH_STATUS_INPUT_SCHEMA,
|
|
331
|
+
run: async (input) => {
|
|
332
|
+
const platformUrl = resolveExplicitPlatformUrl(input);
|
|
333
|
+
return withJsonText(
|
|
334
|
+
input.all ? await listStoredPlatformMachineAuthStatuses() : await getPlatformMachineAuthStatus(platformUrl)
|
|
335
|
+
);
|
|
336
|
+
}
|
|
323
337
|
},
|
|
324
338
|
"airjam.release_doctor": {
|
|
325
339
|
description: "Inspect a standalone Air Jam game project for hosted release readiness and return structured local doctor output.",
|
|
@@ -371,13 +385,20 @@ var buildToolDefinitions = ({
|
|
|
371
385
|
inputSchema: RELEASE_LIST_INPUT_SCHEMA,
|
|
372
386
|
run: async ({
|
|
373
387
|
platformUrl,
|
|
388
|
+
environment,
|
|
374
389
|
game
|
|
375
390
|
}) => withJsonText(
|
|
376
391
|
game ? await listPlatformReleases({
|
|
377
|
-
platformUrl
|
|
392
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
393
|
+
platformUrl,
|
|
394
|
+
environment
|
|
395
|
+
}),
|
|
378
396
|
slugOrId: game
|
|
379
397
|
}) : await listPlatformReleaseTargets({
|
|
380
|
-
platformUrl
|
|
398
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
399
|
+
platformUrl,
|
|
400
|
+
environment
|
|
401
|
+
})
|
|
381
402
|
})
|
|
382
403
|
)
|
|
383
404
|
},
|
|
@@ -386,10 +407,14 @@ var buildToolDefinitions = ({
|
|
|
386
407
|
inputSchema: RELEASE_INSPECT_INPUT_SCHEMA,
|
|
387
408
|
run: async ({
|
|
388
409
|
platformUrl,
|
|
410
|
+
environment,
|
|
389
411
|
releaseId
|
|
390
412
|
}) => withJsonText(
|
|
391
413
|
await inspectPlatformRelease({
|
|
392
|
-
platformUrl
|
|
414
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
415
|
+
platformUrl,
|
|
416
|
+
environment
|
|
417
|
+
}),
|
|
393
418
|
releaseId
|
|
394
419
|
})
|
|
395
420
|
)
|
|
@@ -402,12 +427,16 @@ var buildToolDefinitions = ({
|
|
|
402
427
|
},
|
|
403
428
|
run: async ({
|
|
404
429
|
platformUrl,
|
|
430
|
+
environment,
|
|
405
431
|
releaseId,
|
|
406
432
|
cwd,
|
|
407
433
|
bundle
|
|
408
434
|
}) => withJsonText(
|
|
409
435
|
await uploadPlatformReleaseGeneration({
|
|
410
|
-
platformUrl
|
|
436
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
437
|
+
platformUrl,
|
|
438
|
+
environment
|
|
439
|
+
}),
|
|
411
440
|
releaseId,
|
|
412
441
|
cwd,
|
|
413
442
|
bundlePath: bundle
|
|
@@ -419,11 +448,15 @@ var buildToolDefinitions = ({
|
|
|
419
448
|
inputSchema: RELEASE_FINALIZE_INPUT_SCHEMA,
|
|
420
449
|
run: async ({
|
|
421
450
|
platformUrl,
|
|
451
|
+
environment,
|
|
422
452
|
releaseId,
|
|
423
453
|
generationId
|
|
424
454
|
}) => withJsonText(
|
|
425
455
|
await finalizePlatformReleaseGeneration({
|
|
426
|
-
platformUrl
|
|
456
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
457
|
+
platformUrl,
|
|
458
|
+
environment
|
|
459
|
+
}),
|
|
427
460
|
releaseId,
|
|
428
461
|
generationId
|
|
429
462
|
})
|
|
@@ -437,13 +470,17 @@ var buildToolDefinitions = ({
|
|
|
437
470
|
},
|
|
438
471
|
run: async ({
|
|
439
472
|
platformUrl,
|
|
473
|
+
environment,
|
|
440
474
|
releaseId,
|
|
441
475
|
generationId,
|
|
442
476
|
cwd,
|
|
443
477
|
out
|
|
444
478
|
}) => withJsonText(
|
|
445
479
|
await exportPlatformReleaseGeneration({
|
|
446
|
-
platformUrl
|
|
480
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
481
|
+
platformUrl,
|
|
482
|
+
environment
|
|
483
|
+
}),
|
|
447
484
|
releaseId,
|
|
448
485
|
generationId,
|
|
449
486
|
cwd,
|
|
@@ -459,6 +496,7 @@ var buildToolDefinitions = ({
|
|
|
459
496
|
},
|
|
460
497
|
run: async ({
|
|
461
498
|
platformUrl,
|
|
499
|
+
environment,
|
|
462
500
|
game,
|
|
463
501
|
versionLabel,
|
|
464
502
|
cwd,
|
|
@@ -470,7 +508,10 @@ var buildToolDefinitions = ({
|
|
|
470
508
|
publish
|
|
471
509
|
}) => withJsonText(
|
|
472
510
|
await submitPlatformRelease({
|
|
473
|
-
platformUrl
|
|
511
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
512
|
+
platformUrl,
|
|
513
|
+
environment
|
|
514
|
+
}),
|
|
474
515
|
slugOrId: game,
|
|
475
516
|
versionLabel,
|
|
476
517
|
cwd,
|
|
@@ -488,10 +529,14 @@ var buildToolDefinitions = ({
|
|
|
488
529
|
inputSchema: RELEASE_MUTATION_INPUT_SCHEMA,
|
|
489
530
|
run: async ({
|
|
490
531
|
platformUrl,
|
|
532
|
+
environment,
|
|
491
533
|
releaseId
|
|
492
534
|
}) => withJsonText(
|
|
493
535
|
await publishPlatformRelease({
|
|
494
|
-
platformUrl
|
|
536
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
537
|
+
platformUrl,
|
|
538
|
+
environment
|
|
539
|
+
}),
|
|
495
540
|
releaseId
|
|
496
541
|
})
|
|
497
542
|
)
|
|
@@ -501,8 +546,17 @@ var buildToolDefinitions = ({
|
|
|
501
546
|
inputSchema: RELEASE_MUTATION_INPUT_SCHEMA,
|
|
502
547
|
run: async ({
|
|
503
548
|
platformUrl,
|
|
549
|
+
environment,
|
|
504
550
|
releaseId
|
|
505
|
-
}) => withJsonText(
|
|
551
|
+
}) => withJsonText(
|
|
552
|
+
await archivePlatformRelease({
|
|
553
|
+
platformUrl: resolveExplicitPlatformUrl({
|
|
554
|
+
platformUrl,
|
|
555
|
+
environment
|
|
556
|
+
}),
|
|
557
|
+
releaseId
|
|
558
|
+
})
|
|
559
|
+
)
|
|
506
560
|
},
|
|
507
561
|
"airjam.start_dev": {
|
|
508
562
|
description: "Start the Air Jam local dev stack for the current project and return the managed process id plus resolved topology.",
|