@yandu/types 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ import type { CapabilityRegistry } from './capabilities/CapabilityRegistry.js';
2
+ export interface KernelSystem {
3
+ registry: unknown;
4
+ acpRegistry: unknown;
5
+ loop: unknown;
6
+ capabilities: CapabilityRegistry;
7
+ createContext(workingDirectory?: string): unknown;
8
+ }
9
+ //# sourceMappingURL=KernelSystem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KernelSystem.d.ts","sourceRoot":"","sources":["../src/KernelSystem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,kBAAkB,CAAC;IACjC,aAAa,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACnD"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { KernelSystem } from './KernelSystem.js';
2
+ export interface Plugin {
3
+ name: string;
4
+ version: string;
5
+ register(system: KernelSystem): void;
6
+ }
7
+ //# sourceMappingURL=Plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../src/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;CACtC"}
package/dist/Plugin.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ export type CapabilityType = 'translation' | 'feed' | 'converter' | 'search' | 'im' | 'embedding' | 'import' | 'tool' | 'config';
2
+ export interface CapabilityDescriptor {
3
+ type: CapabilityType;
4
+ id: string;
5
+ name: string;
6
+ description?: string;
7
+ version?: string;
8
+ }
9
+ export interface CapabilityRegistry {
10
+ register<T>(descriptor: CapabilityDescriptor, implementation: T): void;
11
+ unregister(capabilityId: string): boolean;
12
+ get<T>(capabilityId: string): T | undefined;
13
+ getByType<T>(type: CapabilityType): Map<string, T>;
14
+ listDescriptors(type?: CapabilityType): CapabilityDescriptor[];
15
+ has(capabilityId: string): boolean;
16
+ }
17
+ //# sourceMappingURL=CapabilityRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CapabilityRegistry.d.ts","sourceRoot":"","sources":["../../src/capabilities/CapabilityRegistry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,MAAM,GACN,WAAW,GACX,QAAQ,GACR,IAAI,GACJ,WAAW,GACX,QAAQ,GACR,MAAM,GACN,QAAQ,CAAC;AAEb,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,oBAAoB,EAAE,cAAc,EAAE,CAAC,GAAG,IAAI,CAAC;IACvE,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1C,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAC5C,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACnD,eAAe,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,oBAAoB,EAAE,CAAC;IAC/D,GAAG,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;CACpC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ export interface AdapterTranslateOptions {
2
+ context?: string;
3
+ domain?: string;
4
+ baseUrl?: string;
5
+ }
6
+ export interface TranslationAdapter {
7
+ id: string;
8
+ name: string;
9
+ supportsStreaming: boolean;
10
+ maxTextLength: number;
11
+ supportsMirrorUrl?: boolean;
12
+ translate(text: string, targetLanguage: string, options?: AdapterTranslateOptions): Promise<string>;
13
+ translateStream?(text: string, targetLanguage: string, onChunk: (chunk: string) => void): Promise<void>;
14
+ }
15
+ //# sourceMappingURL=TranslationAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslationAdapter.d.ts","sourceRoot":"","sources":["../../src/capabilities/TranslationAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpG,eAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzG"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export type { Plugin } from './Plugin.js';
2
+ export type { KernelSystem } from './KernelSystem.js';
3
+ export type { CapabilityType, CapabilityDescriptor, CapabilityRegistry, } from './capabilities/CapabilityRegistry.js';
4
+ export type { TranslationAdapter, AdapterTranslateOptions } from './capabilities/TranslationAdapter.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@yandu/types",
3
+ "version": "0.0.1",
4
+ "description": "Yandu plugin types and capability interfaces",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "tsc",
13
+ "prepublishOnly": "npm run build"
14
+ },
15
+ "devDependencies": {
16
+ "typescript": "^5.6.0"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ }
21
+ }