feat: integrate marketplace plugins with coding runtime

This commit is contained in:
2026-08-28 18:02:51 +08:00
parent 1d64b89499
commit 05917a789a
21 changed files with 1921 additions and 29 deletions

View File

@@ -56,6 +56,7 @@ export interface PiManagedSubagentChildOpenerOptions {
cliPath: string;
userDataDir: string;
bundledSkillsDir: string;
getSkillRoots?(): readonly string[] | Promise<readonly string[]>;
extensionHost: PiManagedExtensionHost;
loadProviderInput(): Promise<{ accounts: ProviderAccount[]; modelSummaries: ModelSummary[] }>;
resolveCredential(account: ProviderAccount): Promise<string | null>;
@@ -194,6 +195,7 @@ export function createPiManagedSubagentChildOpener(
const workerResources = options.capabilityRegistry
? await options.capabilityRegistry.resolveWorkerResources({
projectPath: project.path,
projectId: input.projectId,
assignedSkillIds: agent.skillIds,
role: 'child',
})
@@ -206,6 +208,12 @@ export function createPiManagedSubagentChildOpener(
skillEntries: workerResources.skillEntries,
catalogRevision: workerResources.catalogRevision,
bundledSkillsDir: options.bundledSkillsDir,
...(workerResources.skillRoots
? { skillRoots: workerResources.skillRoots }
: options.getSkillRoots ? { skillRoots: await options.getSkillRoots() } : {}),
...(workerResources.effectiveSnapshot
? { effectiveSnapshot: workerResources.effectiveSnapshot }
: {}),
revision: options.getRevision(),
});
const credential = await buildPiWorkerCredentialProjection({
@@ -224,6 +232,9 @@ export function createPiManagedSubagentChildOpener(
skillEntries: workerResources.skillEntries,
catalogRevision: workerResources.catalogRevision,
tools: [],
...(workerResources.effectiveSnapshot
? { effectiveSnapshot: workerResources.effectiveSnapshot }
: {}),
extensionsDir: managedPaths.extensionsDir,
role: 'child',
runId: input.runId,