feat: prepare Zhinian desktop client for pilot release
This commit is contained in:
36
packages/skill-spec/src/index.ts
Normal file
36
packages/skill-spec/src/index.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import type { Artifact, Hotel, User } from '@yinian/kernel-core';
|
||||
|
||||
export interface SkillManifest {
|
||||
spec_version: '0.1';
|
||||
id: string;
|
||||
name: string;
|
||||
version: string;
|
||||
author: string;
|
||||
category: string;
|
||||
description: string;
|
||||
required_capabilities: string[];
|
||||
permissions: SkillPermissions;
|
||||
}
|
||||
|
||||
export interface SkillPermissions {
|
||||
network?: string[];
|
||||
filesystem?: 'none' | 'read' | 'read_write';
|
||||
shell?: boolean;
|
||||
}
|
||||
|
||||
export interface SkillRunContext {
|
||||
hotel: Hotel;
|
||||
user: User;
|
||||
emit: {
|
||||
progress(event: { phase: string; ratio?: number; message?: string }): void;
|
||||
log(level: 'info' | 'warn' | 'error', message: string): void;
|
||||
artifact(artifact: Artifact): void;
|
||||
};
|
||||
abortSignal: AbortSignal;
|
||||
}
|
||||
|
||||
export interface SkillRunResult {
|
||||
output: Record<string, unknown>;
|
||||
notifications?: Array<{ template: string; vars: Record<string, unknown> }>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user