@ubean/ai 0.7.3 → 0.7.5

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.
@@ -1,6 +1,6 @@
1
1
  import { safeParse } from "valibot";
2
2
  import { toJsonSchema } from "@valibot/to-json-schema";
3
- //#region src/core.ts
3
+ // src/core.ts
4
4
  const registeredProviders = /* @__PURE__ */ new Map();
5
5
  let defaultProviderId;
6
6
  /** Register a provider (idempotent by id). */
@@ -235,5 +235,4 @@ function defineAgent(config) {
235
235
  asHandler
236
236
  };
237
237
  }
238
- //#endregion
239
238
  export { resolveModel as a, defineProvider as i, defineAgent as n, defineAgentTool as r, configureAI as t };
package/dist/gateway.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { m as ProviderDefinition } from "./types-B5I0sGbf.js";
2
- //#region src/gateway.d.ts
1
+ import { m as ProviderDefinition } from "./types-DuOvO7wY.js";
3
2
  /**
4
3
  * DeepSeek (https://www.deepseek.com/).
5
4
  * Default base URL is `https://api.deepseek.com/v1`.
@@ -48,5 +47,4 @@ export declare const google: ProviderDefinition;
48
47
  export declare const groq: ProviderDefinition;
49
48
  /** All built-in gateway providers exported from this module. */
50
49
  export declare const allGatewayProviders: ProviderDefinition[];
51
- //#endregion
52
50
  export type { ProviderDefinition };
package/dist/gateway.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/gateway.ts
1
+ // src/gateway.ts
2
2
  /**
3
3
  * DeepSeek (https://www.deepseek.com/).
4
4
  * Default base URL is `https://api.deepseek.com/v1`.
@@ -83,5 +83,4 @@ const allGatewayProviders = [
83
83
  google,
84
84
  groq
85
85
  ];
86
- //#endregion
87
86
  export { allGatewayProviders, anthropic, deepseek, google, groq, omniRoute, openai, openrouter };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { _ as UbeanAIProviderOptions, a as AgentStreamChunk, c as AgentToolContext, d as AgentUsage, f as AgentUserMessage, g as ResolvedModel, h as ProviderKind, i as AgentRunResult, l as AgentToolResult, m as ProviderDefinition, n as AgentConfig, o as AgentTool, p as ModelString, r as AgentInput, s as AgentToolCall, t as AgentAssistantMessage, u as AgentToolSet, v as UbeanAgent } from "./types-B5I0sGbf.js";
1
+ import { _ as UbeanAIProviderOptions, a as AgentStreamChunk, c as AgentToolContext, d as AgentUsage, f as AgentUserMessage, g as ResolvedModel, h as ProviderKind, i as AgentRunResult, l as AgentToolResult, m as ProviderDefinition, n as AgentConfig, o as AgentTool, p as ModelString, r as AgentInput, s as AgentToolCall, t as AgentAssistantMessage, u as AgentToolSet, v as UbeanAgent } from "./types-DuOvO7wY.js";
2
2
  import * as v from "valibot";
3
- //#region src/core.d.ts
4
3
  /** Register a provider (idempotent by id). */
5
4
  export declare function defineProvider(definition: ProviderDefinition): void;
6
5
  /** Configure the fallback provider used when a model string has no provider segment. */
@@ -21,5 +20,4 @@ export declare function defineAgentTool<T extends AgentTool['input']>(tool: Agen
21
20
  * only returns the ubean-idiomatic surface (`run`/`stream`/`asHandler`).
22
21
  */
23
22
  export declare function defineAgent<T = unknown>(config: AgentConfig): UbeanAgent<T>;
24
- //#endregion
25
23
  export { type AgentAssistantMessage, type AgentConfig, type AgentInput, type AgentRunResult, type AgentStreamChunk, type AgentTool, type AgentToolCall, type AgentToolContext, type AgentToolResult, type AgentToolSet, type AgentUsage, type AgentUserMessage, type ModelString, type ProviderDefinition, type ProviderKind, type ResolvedModel, type UbeanAIProviderOptions, type UbeanAgent, v };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as resolveModel, i as defineProvider, n as defineAgent, r as defineAgentTool, t as configureAI } from "./core-B-pZdSgG.js";
1
+ import { a as resolveModel, i as defineProvider, n as defineAgent, r as defineAgentTool, t as configureAI } from "./core-DllixiG1.js";
2
2
  import * as v from "valibot";
3
3
  export { configureAI, defineAgent, defineAgentTool, defineProvider, resolveModel, v };
@@ -1,6 +1,5 @@
1
- import { a as AgentStreamChunk, i as AgentRunResult, l as AgentToolResult, r as AgentInput, s as AgentToolCall, v as UbeanAgent } from "../types-B5I0sGbf.js";
1
+ import { a as AgentStreamChunk, i as AgentRunResult, l as AgentToolResult, r as AgentInput, s as AgentToolCall, v as UbeanAgent } from "../types-DuOvO7wY.js";
2
2
  import { ComputedRef, Ref } from "vue";
3
- //#region src/runtime/vue.d.ts
4
3
  /** A single chat message managed by `useChat`. */
5
4
  export interface ChatMessage {
6
5
  id: string;
@@ -70,5 +69,4 @@ export declare function useAIProvider(): {
70
69
  defaultProvider?: string;
71
70
  defaultModel?: string;
72
71
  };
73
- //#endregion
74
72
  export type { AgentInput, AgentRunResult, AgentStreamChunk, AgentToolCall, AgentToolResult, UbeanAgent };
@@ -1,5 +1,5 @@
1
1
  import { computed, ref, shallowRef } from "vue";
2
- //#region src/runtime/vue.ts
2
+ // src/runtime/vue.ts
3
3
  /**
4
4
  * `@ubean/ai/runtime/vue` — Vue runtime composables.
5
5
  *
@@ -209,5 +209,4 @@ function useAgent(agent) {
209
209
  function useAIProvider() {
210
210
  return providerConfig;
211
211
  }
212
- //#endregion
213
212
  export { setAIProviderConfig, useAIProvider, useAgent, useChat };
@@ -1,6 +1,5 @@
1
1
  import { GenericSchema, InferOutput } from "valibot";
2
2
  import { Handler } from "hono";
3
- //#region src/types.d.ts
4
3
  /**
5
4
  * @ubean/ai type definitions.
6
5
  *
@@ -191,5 +190,4 @@ interface UbeanAIProviderOptions {
191
190
  /** Default model id used when neither the model string nor defaultProvider resolve. */
192
191
  defaultModel?: string;
193
192
  }
194
- //#endregion
195
193
  export { UbeanAIProviderOptions as _, AgentStreamChunk as a, AgentToolContext as c, AgentUsage as d, AgentUserMessage as f, ResolvedModel as g, ProviderKind as h, AgentRunResult as i, AgentToolResult as l, ProviderDefinition as m, AgentConfig as n, AgentTool as o, ModelString as p, AgentInput as r, AgentToolCall as s, AgentAssistantMessage as t, AgentToolSet as u, UbeanAgent as v };
package/dist/vite.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { m as ProviderDefinition } from "./types-B5I0sGbf.js";
1
+ import { m as ProviderDefinition } from "./types-DuOvO7wY.js";
2
2
  import { Plugin } from "vite";
3
- //#region src/vite.d.ts
4
3
  export interface UbeanAiOptions {
5
4
  /** Master switch. Disabled plugin returns a noop. */
6
5
  enabled?: boolean;
@@ -14,5 +13,4 @@ export interface UbeanAiOptions {
14
13
  /** Type-safe helper for defining AI options (pass-through). */
15
14
  export declare function defineAiConfig(options: UbeanAiOptions): UbeanAiOptions;
16
15
  export declare function ubeanAiPlugin(userOptions?: UbeanAiOptions): Plugin;
17
- //#endregion
18
16
  export { ubeanAiPlugin as default };
package/dist/vite.js CHANGED
@@ -1,6 +1,6 @@
1
- import { i as defineProvider } from "./core-B-pZdSgG.js";
1
+ import { i as defineProvider } from "./core-DllixiG1.js";
2
2
  import { registerComponentResolver } from "@ubean/build";
3
- //#region src/vite.ts
3
+ // src/vite.ts
4
4
  /** Composable API names auto-importable from `@ubean/ai/runtime/vue`. */
5
5
  const RUNTIME_COMPOSABLES = [
6
6
  "useChat",
@@ -54,5 +54,4 @@ ${defaultProvider ? `setAIProviderConfig({ defaultProvider: ${JSON.stringify(def
54
54
  export { useChat, useAgent, useAIProvider, setAIProviderConfig };
55
55
  `;
56
56
  }
57
- //#endregion
58
57
  export { ubeanAiPlugin as default, ubeanAiPlugin, defineAiConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubean/ai",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "AI large-model integration for the ubean framework: defineAgent + defineAgentTool + Vue runtime (thin orchestration over the Vercel AI SDK)",
5
5
  "files": [
6
6
  "dist"
@@ -28,7 +28,7 @@
28
28
  }
29
29
  },
30
30
  "dependencies": {
31
- "@ubean/build": "0.7.3",
31
+ "@ubean/build": "0.7.5",
32
32
  "@valibot/to-json-schema": "^1.8.0",
33
33
  "valibot": "^1.5.0"
34
34
  },
@@ -36,8 +36,8 @@
36
36
  "@types/node": "^26.6.5",
37
37
  "hono": "4.13.13",
38
38
  "typescript": "npm:typescript-native-bridge@latest",
39
- "vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
40
- "vite-plus": "1.3.0",
39
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
40
+ "vite-plus": "1.4.0",
41
41
  "vue": "^3.5.44"
42
42
  },
43
43
  "peerDependencies": {