feat: integrate automatic game resource delivery

This commit is contained in:
2026-09-06 09:50:49 +08:00
parent f721966f3c
commit 4df4bc9624
20 changed files with 1667 additions and 191 deletions

View File

@@ -148,6 +148,7 @@ export class PiProductTools {
toolName: PiProductToolName | string,
context: PiProductToolContext,
input: unknown,
onUpdate?: (result: PiProductToolResult) => void,
): Promise<PiProductToolResult> {
if (DEVICE_PACKAGE_TOOL_NAMES.includes(toolName as typeof DEVICE_PACKAGE_TOOL_NAMES[number])) {
if (!this.options.devicePackageTools) throw new Error('Device package management is unavailable');
@@ -176,6 +177,7 @@ export class PiProductTools {
workerRole: 'parent',
effectiveSkillIds: context.skillIds,
value: input,
...(onUpdate ? { onUpdate } : {}),
});
}
if (toolName !== 'runtime_context') throw new Error('Product tool is unavailable');