feat(coding): add marketplace package trust primitives
This commit is contained in:
@@ -12,6 +12,23 @@ export type PluginBillingMode =
|
||||
|
||||
export type PluginToolMutation = 'read' | 'write' | 'destructive';
|
||||
|
||||
export type CodingPluginRuntimeKind =
|
||||
| 'bundled_typed'
|
||||
| 'skill_only'
|
||||
| 'platform_hosted';
|
||||
|
||||
export type CodingPluginAcquisitionMode =
|
||||
| 'system_included'
|
||||
| 'user_acquired';
|
||||
|
||||
export type CodingPluginExecutionMode = 'synchronous' | 'accepted';
|
||||
|
||||
export interface CodingPluginPackageProvenance {
|
||||
readonly source: 'bundled' | 'marketplace';
|
||||
/** A trusted Package Store root, never a manifest-provided value. */
|
||||
readonly packageRoot: string;
|
||||
}
|
||||
|
||||
export interface CodingPluginSkillDefinition {
|
||||
id: string;
|
||||
entryPath: string;
|
||||
@@ -29,6 +46,8 @@ export interface CodingPluginToolDefinition {
|
||||
projectWriteLease: boolean;
|
||||
permissions: readonly string[];
|
||||
inputSchema: Readonly<Record<string, unknown>>;
|
||||
outputSchema?: Readonly<Record<string, unknown>>;
|
||||
executionMode?: CodingPluginExecutionMode;
|
||||
}
|
||||
|
||||
export interface CodingPluginOperationDefinition {
|
||||
@@ -43,6 +62,10 @@ export interface CodingPluginDefinition {
|
||||
contractVersion: number;
|
||||
displayName: string;
|
||||
description: string;
|
||||
runtimeKind: CodingPluginRuntimeKind;
|
||||
acquisitionMode: CodingPluginAcquisitionMode;
|
||||
releaseId: string | null;
|
||||
provenance: CodingPluginPackageProvenance;
|
||||
scope: 'project';
|
||||
adapterId: string;
|
||||
requiresBackend: boolean;
|
||||
@@ -404,6 +427,13 @@ export const DATA_SERVICE_PLUGIN_DEFINITION = freezeDeep({
|
||||
contractVersion: 1,
|
||||
displayName: '开发数据服务',
|
||||
description: '为当前项目提供受控的开发期 JSON 数据存储。',
|
||||
runtimeKind: 'bundled_typed',
|
||||
acquisitionMode: 'system_included',
|
||||
releaseId: null,
|
||||
provenance: {
|
||||
source: 'bundled',
|
||||
packageRoot: 'data-service',
|
||||
},
|
||||
scope: 'project',
|
||||
adapterId: DATA_SERVICE_ADAPTER_ID,
|
||||
requiresBackend: true,
|
||||
|
||||
Reference in New Issue
Block a user