@yourgpt/copilot-sdk 1.0.1 → 1.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.
- package/dist/{ThreadManager-BCVt-_k_.d.cts → ThreadManager-CUq5Ocu2.d.cts} +5 -30
- package/dist/{ThreadManager-BjC15mh8.d.ts → ThreadManager-JT0sqSSD.d.ts} +5 -30
- package/dist/{chunk-QSEGNATZ.js → chunk-CVD3X4MN.js} +3 -16
- package/dist/chunk-CVD3X4MN.js.map +1 -0
- package/dist/{chunk-XAVZZVUL.js → chunk-HPNLS3PQ.js} +3 -5
- package/dist/chunk-HPNLS3PQ.js.map +1 -0
- package/dist/{chunk-42YQ4ATO.cjs → chunk-MTFU6EHR.cjs} +2 -17
- package/dist/chunk-MTFU6EHR.cjs.map +1 -0
- package/dist/{chunk-BN75ZW24.cjs → chunk-QAXDWNK3.cjs} +27 -29
- package/dist/chunk-QAXDWNK3.cjs.map +1 -0
- package/dist/core/index.cjs +76 -84
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/react/index.cjs +42 -42
- package/dist/react/index.d.cts +2 -4
- package/dist/react/index.d.ts +2 -4
- package/dist/react/index.js +2 -2
- package/dist/ui/index.cjs +14 -18
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +0 -2
- package/dist/ui/index.d.ts +0 -2
- package/dist/ui/index.js +10 -14
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-42YQ4ATO.cjs.map +0 -1
- package/dist/chunk-BN75ZW24.cjs.map +0 -1
- package/dist/chunk-QSEGNATZ.js.map +0 -1
- package/dist/chunk-XAVZZVUL.js.map +0 -1
|
@@ -210,33 +210,16 @@ interface CustomKeywords {
|
|
|
210
210
|
declare function createCustomDetector(customKeywords: CustomKeywords): (message: string) => IntentDetectionResult;
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
|
-
*
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
* LLM configuration
|
|
213
|
+
* LLM configuration (optional overrides sent to server)
|
|
214
|
+
*
|
|
215
|
+
* Note: The server uses its own configured model.
|
|
216
|
+
* These are optional hints that the server may use.
|
|
218
217
|
*/
|
|
219
218
|
interface LLMConfig {
|
|
220
|
-
/** LLM provider */
|
|
221
|
-
provider: LLMProvider;
|
|
222
|
-
/** Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-latest') */
|
|
223
|
-
model?: string;
|
|
224
|
-
/** API key for the provider */
|
|
225
|
-
apiKey?: string;
|
|
226
|
-
/** Base URL for custom/self-hosted models */
|
|
227
|
-
baseUrl?: string;
|
|
228
219
|
/** Temperature (0-2) */
|
|
229
220
|
temperature?: number;
|
|
230
221
|
/** Maximum tokens in response */
|
|
231
222
|
maxTokens?: number;
|
|
232
|
-
/** Top P sampling */
|
|
233
|
-
topP?: number;
|
|
234
|
-
/** Frequency penalty */
|
|
235
|
-
frequencyPenalty?: number;
|
|
236
|
-
/** Presence penalty */
|
|
237
|
-
presencePenalty?: number;
|
|
238
|
-
/** Enable streaming responses (default: true) */
|
|
239
|
-
streaming?: boolean;
|
|
240
223
|
}
|
|
241
224
|
/**
|
|
242
225
|
* Cloud configuration (for managed hosting)
|
|
@@ -277,14 +260,6 @@ interface CopilotConfig {
|
|
|
277
260
|
/** Enable debug logging */
|
|
278
261
|
debug?: boolean;
|
|
279
262
|
}
|
|
280
|
-
/**
|
|
281
|
-
* Default LLM configurations per provider
|
|
282
|
-
*/
|
|
283
|
-
declare const DEFAULT_MODELS: Record<LLMProvider, string>;
|
|
284
|
-
/**
|
|
285
|
-
* Get default model for a provider
|
|
286
|
-
*/
|
|
287
|
-
declare function getDefaultModel(provider: LLMProvider): string;
|
|
288
263
|
|
|
289
264
|
/**
|
|
290
265
|
* Parameter types for actions
|
|
@@ -860,4 +835,4 @@ declare class ThreadManager {
|
|
|
860
835
|
*/
|
|
861
836
|
declare function createThreadManager(config?: ThreadManagerConfig, callbacks?: ThreadManagerCallbacks): ThreadManager;
|
|
862
837
|
|
|
863
|
-
export { type
|
|
838
|
+
export { type ActionParameter as A, type InternalKnowledgeBaseSearchResponse as B, type ConsoleLogOptions as C, actionToTool as D, type Extension as E, ThreadManager as F, createThreadManager as G, type HttpMethod as H, type IntentDetectionResult as I, createLocalStorageAdapter as J, type KnowledgeBaseProvider as K, type LLMConfig as L, localStorageAdapter as M, type NetworkRequestOptions as N, createMemoryAdapter as O, type ParameterType as P, noopAdapter as Q, SimpleThreadManagerState as R, type ScreenshotOptions as S, type ToolType as T, type ThreadManagerConfig as U, type ThreadManagerCallbacks as V, type CreateThreadOptions as W, type UpdateThreadOptions as X, type ThreadManagerState as Y, type LoadStatus as Z, type LocalStorageAdapterConfig as _, type ScreenshotResult as a, type ConsoleLogResult as b, type ConsoleLogEntry as c, type NetworkRequestResult as d, type NetworkRequestEntry as e, detectIntent as f, getPrimaryTool as g, hasToolSuggestions as h, generateSuggestionReason as i, createCustomDetector as j, type ConsoleLogType as k, type ToolsConfig as l, type ToolConsentRequest as m, type ToolConsentResponse as n, type CapturedContext as o, type CustomKeywords as p, type CloudConfig as q, type CopilotConfig as r, type ActionDefinition as s, type ActionRenderProps as t, type KnowledgeBaseConfig as u, type KnowledgeBaseResult as v, type KnowledgeBaseSearchRequest as w, type KnowledgeBaseSearchResponse as x, type InternalKnowledgeBaseConfig as y, type InternalKnowledgeBaseResult as z };
|
|
@@ -210,33 +210,16 @@ interface CustomKeywords {
|
|
|
210
210
|
declare function createCustomDetector(customKeywords: CustomKeywords): (message: string) => IntentDetectionResult;
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
|
-
*
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
* LLM configuration
|
|
213
|
+
* LLM configuration (optional overrides sent to server)
|
|
214
|
+
*
|
|
215
|
+
* Note: The server uses its own configured model.
|
|
216
|
+
* These are optional hints that the server may use.
|
|
218
217
|
*/
|
|
219
218
|
interface LLMConfig {
|
|
220
|
-
/** LLM provider */
|
|
221
|
-
provider: LLMProvider;
|
|
222
|
-
/** Model name (e.g., 'gpt-4o', 'claude-3-5-sonnet-latest') */
|
|
223
|
-
model?: string;
|
|
224
|
-
/** API key for the provider */
|
|
225
|
-
apiKey?: string;
|
|
226
|
-
/** Base URL for custom/self-hosted models */
|
|
227
|
-
baseUrl?: string;
|
|
228
219
|
/** Temperature (0-2) */
|
|
229
220
|
temperature?: number;
|
|
230
221
|
/** Maximum tokens in response */
|
|
231
222
|
maxTokens?: number;
|
|
232
|
-
/** Top P sampling */
|
|
233
|
-
topP?: number;
|
|
234
|
-
/** Frequency penalty */
|
|
235
|
-
frequencyPenalty?: number;
|
|
236
|
-
/** Presence penalty */
|
|
237
|
-
presencePenalty?: number;
|
|
238
|
-
/** Enable streaming responses (default: true) */
|
|
239
|
-
streaming?: boolean;
|
|
240
223
|
}
|
|
241
224
|
/**
|
|
242
225
|
* Cloud configuration (for managed hosting)
|
|
@@ -277,14 +260,6 @@ interface CopilotConfig {
|
|
|
277
260
|
/** Enable debug logging */
|
|
278
261
|
debug?: boolean;
|
|
279
262
|
}
|
|
280
|
-
/**
|
|
281
|
-
* Default LLM configurations per provider
|
|
282
|
-
*/
|
|
283
|
-
declare const DEFAULT_MODELS: Record<LLMProvider, string>;
|
|
284
|
-
/**
|
|
285
|
-
* Get default model for a provider
|
|
286
|
-
*/
|
|
287
|
-
declare function getDefaultModel(provider: LLMProvider): string;
|
|
288
263
|
|
|
289
264
|
/**
|
|
290
265
|
* Parameter types for actions
|
|
@@ -860,4 +835,4 @@ declare class ThreadManager {
|
|
|
860
835
|
*/
|
|
861
836
|
declare function createThreadManager(config?: ThreadManagerConfig, callbacks?: ThreadManagerCallbacks): ThreadManager;
|
|
862
837
|
|
|
863
|
-
export { type
|
|
838
|
+
export { type ActionParameter as A, type InternalKnowledgeBaseSearchResponse as B, type ConsoleLogOptions as C, actionToTool as D, type Extension as E, ThreadManager as F, createThreadManager as G, type HttpMethod as H, type IntentDetectionResult as I, createLocalStorageAdapter as J, type KnowledgeBaseProvider as K, type LLMConfig as L, localStorageAdapter as M, type NetworkRequestOptions as N, createMemoryAdapter as O, type ParameterType as P, noopAdapter as Q, SimpleThreadManagerState as R, type ScreenshotOptions as S, type ToolType as T, type ThreadManagerConfig as U, type ThreadManagerCallbacks as V, type CreateThreadOptions as W, type UpdateThreadOptions as X, type ThreadManagerState as Y, type LoadStatus as Z, type LocalStorageAdapterConfig as _, type ScreenshotResult as a, type ConsoleLogResult as b, type ConsoleLogEntry as c, type NetworkRequestResult as d, type NetworkRequestEntry as e, detectIntent as f, getPrimaryTool as g, hasToolSuggestions as h, generateSuggestionReason as i, createCustomDetector as j, type ConsoleLogType as k, type ToolsConfig as l, type ToolConsentRequest as m, type ToolConsentResponse as n, type CapturedContext as o, type CustomKeywords as p, type CloudConfig as q, type CopilotConfig as r, type ActionDefinition as s, type ActionRenderProps as t, type KnowledgeBaseConfig as u, type KnowledgeBaseResult as v, type KnowledgeBaseSearchRequest as w, type KnowledgeBaseSearchResponse as x, type InternalKnowledgeBaseConfig as y, type InternalKnowledgeBaseResult as z };
|
|
@@ -1388,19 +1388,6 @@ function isToolResult(message) {
|
|
|
1388
1388
|
return message.role === "tool" && !!message.tool_call_id;
|
|
1389
1389
|
}
|
|
1390
1390
|
|
|
1391
|
-
// src/core/types/config.ts
|
|
1392
|
-
var DEFAULT_MODELS = {
|
|
1393
|
-
openai: "gpt-4o",
|
|
1394
|
-
anthropic: "claude-3-5-sonnet-latest",
|
|
1395
|
-
google: "gemini-pro",
|
|
1396
|
-
groq: "llama-3.1-70b-versatile",
|
|
1397
|
-
ollama: "llama3",
|
|
1398
|
-
custom: "default"
|
|
1399
|
-
};
|
|
1400
|
-
function getDefaultModel(provider) {
|
|
1401
|
-
return DEFAULT_MODELS[provider] || "default";
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
1391
|
// src/core/types/actions.ts
|
|
1405
1392
|
function actionToTool(action) {
|
|
1406
1393
|
const properties = {};
|
|
@@ -2718,6 +2705,6 @@ function createThreadManager(config, callbacks) {
|
|
|
2718
2705
|
return new ThreadManager(config, callbacks);
|
|
2719
2706
|
}
|
|
2720
2707
|
|
|
2721
|
-
export { CLOUD_MAX_FILE_SIZE,
|
|
2722
|
-
//# sourceMappingURL=chunk-
|
|
2723
|
-
//# sourceMappingURL=chunk-
|
|
2708
|
+
export { CLOUD_MAX_FILE_SIZE, DEFAULT_YOURGPT_ENDPOINT, SimpleThreadManagerState, ThreadManager, actionToTool, builtinTools, captureCurrentLogs, captureScreenshot, clearConsoleLogs, clearNetworkRequests, consoleLogsTool, createAssistantMessage, createCloudStorage, createConsoleLogsTool, createCustomDetector, createLocalStorageAdapter, createMemoryAdapter, createMessage, createNetworkRequestsTool, createSSEStream, createScreenshotTool, createServerAdapter, createThreadManager, createToolCall, createToolMessage, createToolResult, createUserMessage, defaultSystemMessage, defineClientTool, defineServerTool, defineTool, detectIntent, failure, formatLogsForAI, formatRequestsForAI, formatSSE, generateId, generateMessageId, generateSuggestionReason, generateThreadId, generateThreadTitle, generateToolCallId, getAttachmentTypeFromMime, getConsoleErrors, getConsoleLogs, getConsoleWarnings, getFailedRequests, getNetworkRequests, getPrimaryTool, hasToolCalls, hasToolSuggestions, isConsoleCaptureActive, isNetworkCaptureActive, isScreenshotSupported, isToolResult, localStorageAdapter, networkRequestsTool, noopAdapter, parseSSELine, parseStreamEvent, parseToolCallArgs, processFileToAttachment, resizeScreenshot, screenshotTool, serializeStreamEvent, startConsoleCapture, startNetworkCapture, stopConsoleCapture, stopNetworkCapture, streamSSE, success, tool, toolToAnthropicFormat, toolToOpenAIFormat, zodObjectToInputSchema, zodToJsonSchema };
|
|
2709
|
+
//# sourceMappingURL=chunk-CVD3X4MN.js.map
|
|
2710
|
+
//# sourceMappingURL=chunk-CVD3X4MN.js.map
|