feat(plugins): move game resources behind marketplace

This commit is contained in:
2026-08-31 10:45:20 +08:00
parent 62304dc85b
commit fe656dd865
33 changed files with 1413 additions and 1018 deletions

View File

@@ -24,21 +24,16 @@ import type { KnownToolDetails, RuntimeContextDetailsV1 } from '../contracts';
import { BUNDLED_CODING_SKILL_IDS } from '../../../shared/coding-skills';
import { PiAgentBrowserTool } from './extensions/agent-browser';
import { reportChangedFiles } from './extensions/changed-file';
import { PiGameAssetTools } from './extensions/game-assets';
import { projectTaskState } from './extensions/task-state';
export type PiProductToolName =
| 'agent_browser'
| 'game_asset_browser'
| 'game_asset_review'
| 'task_state'
| 'changed_file'
| 'runtime_context';
const PI_PRODUCT_TOOL_NAMES = new Set<string>([
'agent_browser',
'game_asset_browser',
'game_asset_review',
'task_state',
'changed_file',
'runtime_context',
@@ -77,7 +72,6 @@ export interface PiProductToolsOptions {
export class PiProductTools {
readonly changeTracker: ConversationChangeTracker;
private readonly browser: PiAgentBrowserTool;
private readonly gameAssets = new PiGameAssetTools();
private capabilityRegistry: CodingCapabilityRegistry | undefined;
constructor(private readonly options: PiProductToolsOptions) {
@@ -152,12 +146,6 @@ export class PiProductTools {
if (toolName === 'agent_browser') {
return await this.browser.execute(context, input);
}
if (toolName === 'game_asset_browser') {
return await this.gameAssets.browse(context.projectPath, input, context.resourceId);
}
if (toolName === 'game_asset_review') {
return await this.gameAssets.review(context.projectPath, input, context.resourceId);
}
if (toolName === 'task_state') return projectTaskState(input);
if (toolName === 'changed_file') {
return await reportChangedFiles(this.changeTracker, context, input);