@everworker/oneringai 0.1.3 → 0.2.0

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,31 @@
1
+ /**
2
+ * Supported AI Vendors
3
+ *
4
+ * Use this enum instead of string literals for type safety.
5
+ * These map to specific provider implementations.
6
+ */
7
+ declare const Vendor: {
8
+ readonly OpenAI: "openai";
9
+ readonly Anthropic: "anthropic";
10
+ readonly Google: "google";
11
+ readonly GoogleVertex: "google-vertex";
12
+ readonly Groq: "groq";
13
+ readonly Together: "together";
14
+ readonly Perplexity: "perplexity";
15
+ readonly Grok: "grok";
16
+ readonly DeepSeek: "deepseek";
17
+ readonly Mistral: "mistral";
18
+ readonly Ollama: "ollama";
19
+ readonly Custom: "custom";
20
+ };
21
+ type Vendor = (typeof Vendor)[keyof typeof Vendor];
22
+ /**
23
+ * All vendor values as array (useful for validation)
24
+ */
25
+ declare const VENDORS: ("openai" | "anthropic" | "google" | "google-vertex" | "groq" | "together" | "perplexity" | "grok" | "deepseek" | "mistral" | "ollama" | "custom")[];
26
+ /**
27
+ * Check if a string is a valid vendor
28
+ */
29
+ declare function isVendor(value: string): value is Vendor;
30
+
31
+ export { Vendor as V, VENDORS as a, isVendor as i };
@@ -1,3 +1,4 @@
1
- export { aD as AfterToolContext, av as AgentEventName, A as AgentEvents, ay as AgenticLoopEventName, ax as AgenticLoopEvents, aG as ApprovalResult, aE as ApproveToolContext, m as AuditEntry, aC as BeforeToolContext, aI as ExecutionCompleteEvent, aw as ExecutionConfig, E as ExecutionContext, l as ExecutionMetrics, aH as ExecutionStartEvent, j as HistoryMode, aA as Hook, H as HookConfig, au as HookManager, az as HookName, aL as LLMRequestEvent, aM as LLMResponseEvent, aB as ModifyingHook, aK as ToolCompleteEvent, aF as ToolModification, aJ as ToolStartEvent } from '../../index-DCzFlLoN.cjs';
2
- import '../../IProvider-BP49c93d.cjs';
1
+ export { aD as AfterToolContext, av as AgentEventName, A as AgentEvents, ay as AgenticLoopEventName, ax as AgenticLoopEvents, aG as ApprovalResult, aE as ApproveToolContext, m as AuditEntry, aC as BeforeToolContext, aI as ExecutionCompleteEvent, aw as ExecutionConfig, E as ExecutionContext, l as ExecutionMetrics, aH as ExecutionStartEvent, j as HistoryMode, aA as Hook, H as HookConfig, au as HookManager, az as HookName, aL as LLMRequestEvent, aM as LLMResponseEvent, aB as ModifyingHook, aK as ToolCompleteEvent, aF as ToolModification, aJ as ToolStartEvent } from '../../index-MJ14lkui.cjs';
2
+ import '../../IProvider-c4QCbPjn.cjs';
3
+ import '../../Vendor-DYh_bzwo.cjs';
3
4
  import 'eventemitter3';
@@ -1,3 +1,4 @@
1
- export { aD as AfterToolContext, av as AgentEventName, A as AgentEvents, ay as AgenticLoopEventName, ax as AgenticLoopEvents, aG as ApprovalResult, aE as ApproveToolContext, m as AuditEntry, aC as BeforeToolContext, aI as ExecutionCompleteEvent, aw as ExecutionConfig, E as ExecutionContext, l as ExecutionMetrics, aH as ExecutionStartEvent, j as HistoryMode, aA as Hook, H as HookConfig, au as HookManager, az as HookName, aL as LLMRequestEvent, aM as LLMResponseEvent, aB as ModifyingHook, aK as ToolCompleteEvent, aF as ToolModification, aJ as ToolStartEvent } from '../../index-BmOYeqU7.js';
2
- import '../../IProvider-BP49c93d.js';
1
+ export { aD as AfterToolContext, av as AgentEventName, A as AgentEvents, ay as AgenticLoopEventName, ax as AgenticLoopEvents, aG as ApprovalResult, aE as ApproveToolContext, m as AuditEntry, aC as BeforeToolContext, aI as ExecutionCompleteEvent, aw as ExecutionConfig, E as ExecutionContext, l as ExecutionMetrics, aH as ExecutionStartEvent, j as HistoryMode, aA as Hook, H as HookConfig, au as HookManager, az as HookName, aL as LLMRequestEvent, aM as LLMResponseEvent, aB as ModifyingHook, aK as ToolCompleteEvent, aF as ToolModification, aJ as ToolStartEvent } from '../../index-B5UaeEvK.js';
2
+ import '../../IProvider-DcYJ3YE-.js';
3
+ import '../../Vendor-DYh_bzwo.js';
3
4
  import 'eventemitter3';
@@ -1833,7 +1833,14 @@ var Connector = class _Connector {
1833
1833
  }
1834
1834
  const startTime = Date.now();
1835
1835
  this.requestCount++;
1836
- const url = endpoint.startsWith("http") ? endpoint : `${this.baseURL}${endpoint}`;
1836
+ let url;
1837
+ if (endpoint.startsWith("http")) {
1838
+ url = endpoint;
1839
+ } else {
1840
+ const base = (this.baseURL ?? "").replace(/\/+$/, "");
1841
+ const path2 = endpoint.startsWith("/") ? endpoint : `/${endpoint}`;
1842
+ url = `${base}${path2}`;
1843
+ }
1837
1844
  const timeout = options?.timeout ?? this.config.timeout ?? DEFAULT_CONNECTOR_TIMEOUT;
1838
1845
  if (this.config.logging?.enabled) {
1839
1846
  this.logRequest(url, options);