@quilltap/plugin-types 2.5.1 → 2.5.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.
- package/dist/common/index.d.mts +78 -78
- package/dist/common/index.d.ts +78 -78
- package/dist/index-B__Tj6zS.d.mts +710 -0
- package/dist/index-B__Tj6zS.d.ts +710 -0
- package/dist/{index-DMY1o4_1.d.mts → index-BopBLWVq.d.mts} +51 -2
- package/dist/{index-BHELsKhd.d.ts → index-BxjmBw1K.d.ts} +51 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/llm/index.d.mts +1 -695
- package/dist/llm/index.d.ts +1 -695
- package/dist/plugins/index.d.mts +2 -2
- package/dist/plugins/index.d.ts +2 -2
- package/dist/providers/index.d.mts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/common/index.d.mts
CHANGED
|
@@ -1,81 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logger types for Quilltap plugin development
|
|
3
|
-
*
|
|
4
|
-
* @module @quilltap/plugin-types/common/logger
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Log level type
|
|
8
|
-
*/
|
|
9
|
-
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
10
|
-
/**
|
|
11
|
-
* Log context metadata
|
|
12
|
-
*/
|
|
13
|
-
interface LogContext {
|
|
14
|
-
/** Context identifier (e.g., module name) */
|
|
15
|
-
context?: string;
|
|
16
|
-
/** Additional metadata */
|
|
17
|
-
[key: string]: unknown;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Logger interface that plugins can implement or receive
|
|
21
|
-
*
|
|
22
|
-
* This interface is compatible with Quilltap's built-in logger.
|
|
23
|
-
* Plugins can use this interface to accept a logger from the host
|
|
24
|
-
* application or implement their own logging.
|
|
25
|
-
*/
|
|
26
|
-
interface PluginLogger {
|
|
27
|
-
/**
|
|
28
|
-
* Log a debug message
|
|
29
|
-
* @param message Message to log
|
|
30
|
-
* @param context Optional context metadata
|
|
31
|
-
*/
|
|
32
|
-
debug(message: string, context?: LogContext): void;
|
|
33
|
-
/**
|
|
34
|
-
* Log an info message
|
|
35
|
-
* @param message Message to log
|
|
36
|
-
* @param context Optional context metadata
|
|
37
|
-
*/
|
|
38
|
-
info(message: string, context?: LogContext): void;
|
|
39
|
-
/**
|
|
40
|
-
* Log a warning message
|
|
41
|
-
* @param message Message to log
|
|
42
|
-
* @param context Optional context metadata
|
|
43
|
-
*/
|
|
44
|
-
warn(message: string, context?: LogContext): void;
|
|
45
|
-
/**
|
|
46
|
-
* Log an error message
|
|
47
|
-
* @param message Message to log
|
|
48
|
-
* @param context Optional context metadata
|
|
49
|
-
* @param error Optional error object
|
|
50
|
-
*/
|
|
51
|
-
error(message: string, context?: LogContext, error?: Error): void;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Simple console-based logger for standalone plugin development
|
|
55
|
-
*
|
|
56
|
-
* This logger writes to the console and is useful for local
|
|
57
|
-
* plugin development and testing.
|
|
58
|
-
*
|
|
59
|
-
* @param prefix Prefix to add to all log messages
|
|
60
|
-
* @param minLevel Minimum log level to output (default: 'info')
|
|
61
|
-
* @returns A PluginLogger instance
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* const logger = createConsoleLogger('my-plugin', 'debug');
|
|
66
|
-
* logger.debug('Initializing plugin', { version: '1.0.0' });
|
|
67
|
-
* logger.info('Plugin ready');
|
|
68
|
-
* logger.error('Failed to connect', { endpoint: 'api.example.com' }, new Error('Connection refused'));
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
declare function createConsoleLogger(prefix: string, minLevel?: LogLevel): PluginLogger;
|
|
72
|
-
/**
|
|
73
|
-
* No-op logger for production or when logging is disabled
|
|
74
|
-
*
|
|
75
|
-
* @returns A PluginLogger that does nothing
|
|
76
|
-
*/
|
|
77
|
-
declare function createNoopLogger(): PluginLogger;
|
|
78
|
-
|
|
79
1
|
/**
|
|
80
2
|
* Common error types for Quilltap plugin development
|
|
81
3
|
*
|
|
@@ -155,4 +77,82 @@ declare class ToolExecutionError extends PluginError {
|
|
|
155
77
|
constructor(message: string, toolName?: string | undefined, pluginName?: string);
|
|
156
78
|
}
|
|
157
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Logger types for Quilltap plugin development
|
|
82
|
+
*
|
|
83
|
+
* @module @quilltap/plugin-types/common/logger
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* Log level type
|
|
87
|
+
*/
|
|
88
|
+
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
89
|
+
/**
|
|
90
|
+
* Log context metadata
|
|
91
|
+
*/
|
|
92
|
+
interface LogContext {
|
|
93
|
+
/** Context identifier (e.g., module name) */
|
|
94
|
+
context?: string;
|
|
95
|
+
/** Additional metadata */
|
|
96
|
+
[key: string]: unknown;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Logger interface that plugins can implement or receive
|
|
100
|
+
*
|
|
101
|
+
* This interface is compatible with Quilltap's built-in logger.
|
|
102
|
+
* Plugins can use this interface to accept a logger from the host
|
|
103
|
+
* application or implement their own logging.
|
|
104
|
+
*/
|
|
105
|
+
interface PluginLogger {
|
|
106
|
+
/**
|
|
107
|
+
* Log a debug message
|
|
108
|
+
* @param message Message to log
|
|
109
|
+
* @param context Optional context metadata
|
|
110
|
+
*/
|
|
111
|
+
debug(message: string, context?: LogContext): void;
|
|
112
|
+
/**
|
|
113
|
+
* Log an info message
|
|
114
|
+
* @param message Message to log
|
|
115
|
+
* @param context Optional context metadata
|
|
116
|
+
*/
|
|
117
|
+
info(message: string, context?: LogContext): void;
|
|
118
|
+
/**
|
|
119
|
+
* Log a warning message
|
|
120
|
+
* @param message Message to log
|
|
121
|
+
* @param context Optional context metadata
|
|
122
|
+
*/
|
|
123
|
+
warn(message: string, context?: LogContext): void;
|
|
124
|
+
/**
|
|
125
|
+
* Log an error message
|
|
126
|
+
* @param message Message to log
|
|
127
|
+
* @param context Optional context metadata
|
|
128
|
+
* @param error Optional error object
|
|
129
|
+
*/
|
|
130
|
+
error(message: string, context?: LogContext, error?: Error): void;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Simple console-based logger for standalone plugin development
|
|
134
|
+
*
|
|
135
|
+
* This logger writes to the console and is useful for local
|
|
136
|
+
* plugin development and testing.
|
|
137
|
+
*
|
|
138
|
+
* @param prefix Prefix to add to all log messages
|
|
139
|
+
* @param minLevel Minimum log level to output (default: 'info')
|
|
140
|
+
* @returns A PluginLogger instance
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* const logger = createConsoleLogger('my-plugin', 'debug');
|
|
145
|
+
* logger.debug('Initializing plugin', { version: '1.0.0' });
|
|
146
|
+
* logger.info('Plugin ready');
|
|
147
|
+
* logger.error('Failed to connect', { endpoint: 'api.example.com' }, new Error('Connection refused'));
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
declare function createConsoleLogger(prefix: string, minLevel?: LogLevel): PluginLogger;
|
|
151
|
+
/**
|
|
152
|
+
* No-op logger for production or when logging is disabled
|
|
153
|
+
*
|
|
154
|
+
* @returns A PluginLogger that does nothing
|
|
155
|
+
*/
|
|
156
|
+
declare function createNoopLogger(): PluginLogger;
|
|
157
|
+
|
|
158
158
|
export { ApiKeyError, AttachmentError, ConfigurationError, type LogContext, type LogLevel, ModelNotFoundError, PluginError, type PluginLogger, ProviderApiError, RateLimitError, ToolExecutionError, createConsoleLogger, createNoopLogger };
|
package/dist/common/index.d.ts
CHANGED
|
@@ -1,81 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logger types for Quilltap plugin development
|
|
3
|
-
*
|
|
4
|
-
* @module @quilltap/plugin-types/common/logger
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Log level type
|
|
8
|
-
*/
|
|
9
|
-
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
10
|
-
/**
|
|
11
|
-
* Log context metadata
|
|
12
|
-
*/
|
|
13
|
-
interface LogContext {
|
|
14
|
-
/** Context identifier (e.g., module name) */
|
|
15
|
-
context?: string;
|
|
16
|
-
/** Additional metadata */
|
|
17
|
-
[key: string]: unknown;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Logger interface that plugins can implement or receive
|
|
21
|
-
*
|
|
22
|
-
* This interface is compatible with Quilltap's built-in logger.
|
|
23
|
-
* Plugins can use this interface to accept a logger from the host
|
|
24
|
-
* application or implement their own logging.
|
|
25
|
-
*/
|
|
26
|
-
interface PluginLogger {
|
|
27
|
-
/**
|
|
28
|
-
* Log a debug message
|
|
29
|
-
* @param message Message to log
|
|
30
|
-
* @param context Optional context metadata
|
|
31
|
-
*/
|
|
32
|
-
debug(message: string, context?: LogContext): void;
|
|
33
|
-
/**
|
|
34
|
-
* Log an info message
|
|
35
|
-
* @param message Message to log
|
|
36
|
-
* @param context Optional context metadata
|
|
37
|
-
*/
|
|
38
|
-
info(message: string, context?: LogContext): void;
|
|
39
|
-
/**
|
|
40
|
-
* Log a warning message
|
|
41
|
-
* @param message Message to log
|
|
42
|
-
* @param context Optional context metadata
|
|
43
|
-
*/
|
|
44
|
-
warn(message: string, context?: LogContext): void;
|
|
45
|
-
/**
|
|
46
|
-
* Log an error message
|
|
47
|
-
* @param message Message to log
|
|
48
|
-
* @param context Optional context metadata
|
|
49
|
-
* @param error Optional error object
|
|
50
|
-
*/
|
|
51
|
-
error(message: string, context?: LogContext, error?: Error): void;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Simple console-based logger for standalone plugin development
|
|
55
|
-
*
|
|
56
|
-
* This logger writes to the console and is useful for local
|
|
57
|
-
* plugin development and testing.
|
|
58
|
-
*
|
|
59
|
-
* @param prefix Prefix to add to all log messages
|
|
60
|
-
* @param minLevel Minimum log level to output (default: 'info')
|
|
61
|
-
* @returns A PluginLogger instance
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* const logger = createConsoleLogger('my-plugin', 'debug');
|
|
66
|
-
* logger.debug('Initializing plugin', { version: '1.0.0' });
|
|
67
|
-
* logger.info('Plugin ready');
|
|
68
|
-
* logger.error('Failed to connect', { endpoint: 'api.example.com' }, new Error('Connection refused'));
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
declare function createConsoleLogger(prefix: string, minLevel?: LogLevel): PluginLogger;
|
|
72
|
-
/**
|
|
73
|
-
* No-op logger for production or when logging is disabled
|
|
74
|
-
*
|
|
75
|
-
* @returns A PluginLogger that does nothing
|
|
76
|
-
*/
|
|
77
|
-
declare function createNoopLogger(): PluginLogger;
|
|
78
|
-
|
|
79
1
|
/**
|
|
80
2
|
* Common error types for Quilltap plugin development
|
|
81
3
|
*
|
|
@@ -155,4 +77,82 @@ declare class ToolExecutionError extends PluginError {
|
|
|
155
77
|
constructor(message: string, toolName?: string | undefined, pluginName?: string);
|
|
156
78
|
}
|
|
157
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Logger types for Quilltap plugin development
|
|
82
|
+
*
|
|
83
|
+
* @module @quilltap/plugin-types/common/logger
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* Log level type
|
|
87
|
+
*/
|
|
88
|
+
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
89
|
+
/**
|
|
90
|
+
* Log context metadata
|
|
91
|
+
*/
|
|
92
|
+
interface LogContext {
|
|
93
|
+
/** Context identifier (e.g., module name) */
|
|
94
|
+
context?: string;
|
|
95
|
+
/** Additional metadata */
|
|
96
|
+
[key: string]: unknown;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Logger interface that plugins can implement or receive
|
|
100
|
+
*
|
|
101
|
+
* This interface is compatible with Quilltap's built-in logger.
|
|
102
|
+
* Plugins can use this interface to accept a logger from the host
|
|
103
|
+
* application or implement their own logging.
|
|
104
|
+
*/
|
|
105
|
+
interface PluginLogger {
|
|
106
|
+
/**
|
|
107
|
+
* Log a debug message
|
|
108
|
+
* @param message Message to log
|
|
109
|
+
* @param context Optional context metadata
|
|
110
|
+
*/
|
|
111
|
+
debug(message: string, context?: LogContext): void;
|
|
112
|
+
/**
|
|
113
|
+
* Log an info message
|
|
114
|
+
* @param message Message to log
|
|
115
|
+
* @param context Optional context metadata
|
|
116
|
+
*/
|
|
117
|
+
info(message: string, context?: LogContext): void;
|
|
118
|
+
/**
|
|
119
|
+
* Log a warning message
|
|
120
|
+
* @param message Message to log
|
|
121
|
+
* @param context Optional context metadata
|
|
122
|
+
*/
|
|
123
|
+
warn(message: string, context?: LogContext): void;
|
|
124
|
+
/**
|
|
125
|
+
* Log an error message
|
|
126
|
+
* @param message Message to log
|
|
127
|
+
* @param context Optional context metadata
|
|
128
|
+
* @param error Optional error object
|
|
129
|
+
*/
|
|
130
|
+
error(message: string, context?: LogContext, error?: Error): void;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Simple console-based logger for standalone plugin development
|
|
134
|
+
*
|
|
135
|
+
* This logger writes to the console and is useful for local
|
|
136
|
+
* plugin development and testing.
|
|
137
|
+
*
|
|
138
|
+
* @param prefix Prefix to add to all log messages
|
|
139
|
+
* @param minLevel Minimum log level to output (default: 'info')
|
|
140
|
+
* @returns A PluginLogger instance
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* const logger = createConsoleLogger('my-plugin', 'debug');
|
|
145
|
+
* logger.debug('Initializing plugin', { version: '1.0.0' });
|
|
146
|
+
* logger.info('Plugin ready');
|
|
147
|
+
* logger.error('Failed to connect', { endpoint: 'api.example.com' }, new Error('Connection refused'));
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
declare function createConsoleLogger(prefix: string, minLevel?: LogLevel): PluginLogger;
|
|
151
|
+
/**
|
|
152
|
+
* No-op logger for production or when logging is disabled
|
|
153
|
+
*
|
|
154
|
+
* @returns A PluginLogger that does nothing
|
|
155
|
+
*/
|
|
156
|
+
declare function createNoopLogger(): PluginLogger;
|
|
157
|
+
|
|
158
158
|
export { ApiKeyError, AttachmentError, ConfigurationError, type LogContext, type LogLevel, ModelNotFoundError, PluginError, type PluginLogger, ProviderApiError, RateLimitError, ToolExecutionError, createConsoleLogger, createNoopLogger };
|