@yandu/types 0.0.2 → 0.0.3

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.
@@ -2,6 +2,12 @@ import type { CapabilityRegistry } from './capabilities/CapabilityRegistry.js';
2
2
  export interface PluginConfig {
3
3
  get<T>(key: string): T | undefined;
4
4
  }
5
+ export interface AIModelOptions {
6
+ providerId: string;
7
+ modelId: string;
8
+ apiKey: string;
9
+ baseUrl?: string;
10
+ }
5
11
  export interface KernelSystem {
6
12
  registry: unknown;
7
13
  acpRegistry: unknown;
@@ -9,5 +15,7 @@ export interface KernelSystem {
9
15
  capabilities: CapabilityRegistry;
10
16
  config: PluginConfig;
11
17
  createContext(workingDirectory?: string): unknown;
18
+ /** 获取 AI SDK LanguageModel 实例(插件需自行将结果 cast 为所需类型) */
19
+ getModel?(options: AIModelOptions): Promise<unknown>;
12
20
  }
13
21
  //# sourceMappingURL=KernelSystem.d.ts.map
@@ -1 +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,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,kBAAkB,CAAC;IACjC,MAAM,EAAE,YAAY,CAAC;IACrB,aAAa,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACnD"}
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,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,kBAAkB,CAAC;IACjC,MAAM,EAAE,YAAY,CAAC;IACrB,aAAa,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClD,sDAAsD;IACtD,QAAQ,CAAC,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtD"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type { Plugin } from './Plugin.js';
2
- export type { KernelSystem, PluginConfig } from './KernelSystem.js';
2
+ export type { KernelSystem, PluginConfig, AIModelOptions } from './KernelSystem.js';
3
3
  export type { CapabilityType, CapabilityDescriptor, CapabilityRegistry, } from './capabilities/CapabilityRegistry.js';
4
4
  export type { TranslationAdapter, AdapterTranslateOptions } from './capabilities/TranslationAdapter.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACpE,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC"}
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,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpF,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yandu/types",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Yandu plugin types and capability interfaces",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",