@hyorman/copilot-proxy-core 1.0.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/out/assistants/index.d.ts +15 -0
- package/out/assistants/index.js +16 -0
- package/out/assistants/index.js.map +1 -0
- package/out/assistants/routes.d.ts +16 -0
- package/out/assistants/routes.js +597 -0
- package/out/assistants/routes.js.map +1 -0
- package/out/assistants/runner.d.ts +48 -0
- package/out/assistants/runner.js +851 -0
- package/out/assistants/runner.js.map +1 -0
- package/out/assistants/state.d.ts +81 -0
- package/out/assistants/state.js +351 -0
- package/out/assistants/state.js.map +1 -0
- package/out/assistants/tools.d.ts +4 -0
- package/out/assistants/tools.js +8 -0
- package/out/assistants/tools.js.map +1 -0
- package/out/assistants/types.d.ts +254 -0
- package/out/assistants/types.js +5 -0
- package/out/assistants/types.js.map +1 -0
- package/out/backend.d.ts +24 -0
- package/out/backend.js +12 -0
- package/out/backend.js.map +1 -0
- package/out/index.d.ts +13 -0
- package/out/index.js +21 -0
- package/out/index.js.map +1 -0
- package/out/server.d.ts +12 -0
- package/out/server.js +504 -0
- package/out/server.js.map +1 -0
- package/out/skills/index.d.ts +3 -0
- package/out/skills/index.js +4 -0
- package/out/skills/index.js.map +1 -0
- package/out/skills/manifest.d.ts +25 -0
- package/out/skills/manifest.js +96 -0
- package/out/skills/manifest.js.map +1 -0
- package/out/skills/resolver.d.ts +22 -0
- package/out/skills/resolver.js +66 -0
- package/out/skills/resolver.js.map +1 -0
- package/out/skills/routes.d.ts +3 -0
- package/out/skills/routes.js +191 -0
- package/out/skills/routes.js.map +1 -0
- package/out/skills/state.d.ts +35 -0
- package/out/skills/state.js +155 -0
- package/out/skills/state.js.map +1 -0
- package/out/skills/storage.d.ts +30 -0
- package/out/skills/storage.js +171 -0
- package/out/skills/storage.js.map +1 -0
- package/out/skills/types.d.ts +141 -0
- package/out/skills/types.js +8 -0
- package/out/skills/types.js.map +1 -0
- package/out/toolConvert.d.ts +24 -0
- package/out/toolConvert.js +56 -0
- package/out/toolConvert.js.map +1 -0
- package/out/types.d.ts +291 -0
- package/out/types.js +2 -0
- package/out/types.js.map +1 -0
- package/out/utils.d.ts +28 -0
- package/out/utils.js +81 -0
- package/out/utils.js.map +1 -0
- package/package.json +36 -0
package/out/types.d.ts
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
export interface StructuredMessageContent {
|
|
2
|
+
type: string;
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ChatMessage {
|
|
6
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
7
|
+
content: string | StructuredMessageContent[] | null;
|
|
8
|
+
tool_calls?: ToolCall[];
|
|
9
|
+
tool_call_id?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ChatCompletionRequest {
|
|
13
|
+
messages: ChatMessage[];
|
|
14
|
+
model: string;
|
|
15
|
+
stream?: boolean;
|
|
16
|
+
tools?: FunctionTool[];
|
|
17
|
+
tool_choice?: 'none' | 'auto' | {
|
|
18
|
+
type: 'function';
|
|
19
|
+
function: {
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
temperature?: number;
|
|
24
|
+
top_p?: number;
|
|
25
|
+
max_tokens?: number;
|
|
26
|
+
stop?: string | string[];
|
|
27
|
+
presence_penalty?: number;
|
|
28
|
+
frequency_penalty?: number;
|
|
29
|
+
user?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface FunctionTool {
|
|
32
|
+
type: 'function';
|
|
33
|
+
function: {
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
parameters?: Record<string, unknown>;
|
|
37
|
+
strict?: boolean;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface ToolCall {
|
|
41
|
+
id: string;
|
|
42
|
+
type: 'function';
|
|
43
|
+
function: {
|
|
44
|
+
name: string;
|
|
45
|
+
arguments: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface CompletionRequest {
|
|
49
|
+
model: string;
|
|
50
|
+
prompt: string | string[];
|
|
51
|
+
max_tokens?: number;
|
|
52
|
+
temperature?: number;
|
|
53
|
+
top_p?: number;
|
|
54
|
+
n?: number;
|
|
55
|
+
stream?: boolean;
|
|
56
|
+
stop?: string | string[];
|
|
57
|
+
presence_penalty?: number;
|
|
58
|
+
frequency_penalty?: number;
|
|
59
|
+
user?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface CompletionChoice {
|
|
62
|
+
index: number;
|
|
63
|
+
text: string;
|
|
64
|
+
finish_reason: string;
|
|
65
|
+
logprobs: null;
|
|
66
|
+
}
|
|
67
|
+
export interface CompletionResponse {
|
|
68
|
+
id: string;
|
|
69
|
+
object: 'text_completion';
|
|
70
|
+
created: number;
|
|
71
|
+
model: string;
|
|
72
|
+
choices: CompletionChoice[];
|
|
73
|
+
usage: ChatCompletionUsage;
|
|
74
|
+
}
|
|
75
|
+
export interface EmbeddingRequest {
|
|
76
|
+
input: string | string[];
|
|
77
|
+
model: string;
|
|
78
|
+
encoding_format?: 'float' | 'base64';
|
|
79
|
+
dimensions?: number;
|
|
80
|
+
user?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface EmbeddingObject {
|
|
83
|
+
object: 'embedding';
|
|
84
|
+
embedding: number[];
|
|
85
|
+
index: number;
|
|
86
|
+
}
|
|
87
|
+
export interface EmbeddingResponse {
|
|
88
|
+
object: 'list';
|
|
89
|
+
data: EmbeddingObject[];
|
|
90
|
+
model: string;
|
|
91
|
+
usage: {
|
|
92
|
+
prompt_tokens: number;
|
|
93
|
+
total_tokens: number;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export interface ModelObject {
|
|
97
|
+
id: string;
|
|
98
|
+
object: 'model';
|
|
99
|
+
created: number;
|
|
100
|
+
owned_by: string;
|
|
101
|
+
}
|
|
102
|
+
export interface ModelsListResponse {
|
|
103
|
+
object: 'list';
|
|
104
|
+
data: ModelObject[];
|
|
105
|
+
}
|
|
106
|
+
export interface OpenAIErrorResponse {
|
|
107
|
+
error: {
|
|
108
|
+
message: string;
|
|
109
|
+
type: string;
|
|
110
|
+
param: string | null;
|
|
111
|
+
code: string | null;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export interface ChatCompletionResponse {
|
|
115
|
+
id: string;
|
|
116
|
+
object: 'chat.completion';
|
|
117
|
+
created: number;
|
|
118
|
+
model: string;
|
|
119
|
+
choices: ChatCompletionChoice[];
|
|
120
|
+
usage: ChatCompletionUsage;
|
|
121
|
+
service_tier: string | null;
|
|
122
|
+
system_fingerprint: string | null;
|
|
123
|
+
}
|
|
124
|
+
export interface ChatCompletionChoice {
|
|
125
|
+
index: number;
|
|
126
|
+
message: ChatCompletionMessage;
|
|
127
|
+
logprobs: object | null;
|
|
128
|
+
finish_reason: 'stop' | 'tool_calls' | 'length' | 'content_filter' | null;
|
|
129
|
+
}
|
|
130
|
+
export interface ChatCompletionMessage {
|
|
131
|
+
role: 'assistant';
|
|
132
|
+
content: string | null;
|
|
133
|
+
refusal?: string | null;
|
|
134
|
+
annotations?: unknown[];
|
|
135
|
+
tool_calls?: ToolCall[];
|
|
136
|
+
}
|
|
137
|
+
export interface ChatCompletionUsage {
|
|
138
|
+
prompt_tokens: number;
|
|
139
|
+
completion_tokens: number;
|
|
140
|
+
total_tokens: number;
|
|
141
|
+
prompt_tokens_details?: {
|
|
142
|
+
cached_tokens: number;
|
|
143
|
+
audio_tokens: number;
|
|
144
|
+
};
|
|
145
|
+
completion_tokens_details?: {
|
|
146
|
+
reasoning_tokens: number;
|
|
147
|
+
audio_tokens: number;
|
|
148
|
+
accepted_prediction_tokens: number;
|
|
149
|
+
rejected_prediction_tokens: number;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
export interface ChatCompletionChunkDelta {
|
|
153
|
+
role?: string;
|
|
154
|
+
content?: string | null;
|
|
155
|
+
tool_calls?: ToolCallChunk[];
|
|
156
|
+
}
|
|
157
|
+
export interface ToolCallChunk {
|
|
158
|
+
index: number;
|
|
159
|
+
id?: string;
|
|
160
|
+
type?: 'function';
|
|
161
|
+
function?: {
|
|
162
|
+
name?: string;
|
|
163
|
+
arguments?: string;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
export interface ChatCompletionChunkChoice {
|
|
167
|
+
delta: ChatCompletionChunkDelta;
|
|
168
|
+
index: number;
|
|
169
|
+
finish_reason: 'stop' | 'tool_calls' | 'length' | 'content_filter' | '' | null;
|
|
170
|
+
}
|
|
171
|
+
export interface ChatCompletionChunk {
|
|
172
|
+
id: string;
|
|
173
|
+
object: 'chat.completion.chunk';
|
|
174
|
+
created: number;
|
|
175
|
+
model: string;
|
|
176
|
+
choices: ChatCompletionChunkChoice[];
|
|
177
|
+
}
|
|
178
|
+
export interface ResponseInputItem {
|
|
179
|
+
type?: 'message';
|
|
180
|
+
role: 'user' | 'assistant' | 'system';
|
|
181
|
+
content: string | ResponseContentItem[];
|
|
182
|
+
}
|
|
183
|
+
export interface ResponseContentItem {
|
|
184
|
+
type: 'input_text' | 'output_text';
|
|
185
|
+
text: string;
|
|
186
|
+
}
|
|
187
|
+
export interface CreateResponseRequest {
|
|
188
|
+
model: string;
|
|
189
|
+
input: string | ResponseInputItem[];
|
|
190
|
+
instructions?: string;
|
|
191
|
+
stream?: boolean;
|
|
192
|
+
temperature?: number;
|
|
193
|
+
max_output_tokens?: number;
|
|
194
|
+
top_p?: number;
|
|
195
|
+
store?: boolean;
|
|
196
|
+
metadata?: Record<string, string>;
|
|
197
|
+
tools?: FunctionTool[] | any[];
|
|
198
|
+
tool_choice?: 'none' | 'auto' | 'required' | {
|
|
199
|
+
type: 'function';
|
|
200
|
+
name: string;
|
|
201
|
+
};
|
|
202
|
+
previous_response_id?: string;
|
|
203
|
+
parallel_tool_calls?: boolean;
|
|
204
|
+
user?: string;
|
|
205
|
+
skills?: import('./skills/types.js').SkillAttachment[];
|
|
206
|
+
}
|
|
207
|
+
export interface ResponseOutputItem {
|
|
208
|
+
type: 'message';
|
|
209
|
+
id: string;
|
|
210
|
+
status: 'completed' | 'in_progress' | 'failed';
|
|
211
|
+
role: 'assistant';
|
|
212
|
+
content: ResponseOutputContent[];
|
|
213
|
+
}
|
|
214
|
+
export interface ResponseOutputContent {
|
|
215
|
+
type: 'output_text';
|
|
216
|
+
text: string;
|
|
217
|
+
annotations: unknown[];
|
|
218
|
+
}
|
|
219
|
+
export interface ResponseObject {
|
|
220
|
+
id: string;
|
|
221
|
+
object: 'response';
|
|
222
|
+
created_at: number;
|
|
223
|
+
status: 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete';
|
|
224
|
+
background: boolean;
|
|
225
|
+
completed_at: number | null;
|
|
226
|
+
conversation: {
|
|
227
|
+
id: string;
|
|
228
|
+
} | null;
|
|
229
|
+
error: {
|
|
230
|
+
message: string;
|
|
231
|
+
type: string;
|
|
232
|
+
code: string;
|
|
233
|
+
} | null;
|
|
234
|
+
incomplete_details: {
|
|
235
|
+
reason: string;
|
|
236
|
+
} | null;
|
|
237
|
+
instructions: string | null;
|
|
238
|
+
max_output_tokens: number | null;
|
|
239
|
+
max_tool_calls: number | null;
|
|
240
|
+
model: string;
|
|
241
|
+
output: ResponseOutputItemUnion[];
|
|
242
|
+
output_text: string;
|
|
243
|
+
parallel_tool_calls: boolean;
|
|
244
|
+
previous_response_id: string | null;
|
|
245
|
+
reasoning: {
|
|
246
|
+
effort: string | null;
|
|
247
|
+
generate_summary: string | null;
|
|
248
|
+
summary: string | null;
|
|
249
|
+
} | null;
|
|
250
|
+
service_tier: string | null;
|
|
251
|
+
temperature: number;
|
|
252
|
+
text: {
|
|
253
|
+
format: {
|
|
254
|
+
type: string;
|
|
255
|
+
};
|
|
256
|
+
} | null;
|
|
257
|
+
tool_choice: 'none' | 'auto' | 'required' | {
|
|
258
|
+
type: 'function';
|
|
259
|
+
name: string;
|
|
260
|
+
} | string;
|
|
261
|
+
tools: unknown[];
|
|
262
|
+
top_p: number;
|
|
263
|
+
truncation: 'auto' | 'disabled';
|
|
264
|
+
usage: {
|
|
265
|
+
input_tokens: number;
|
|
266
|
+
input_tokens_details: {
|
|
267
|
+
cached_tokens: number;
|
|
268
|
+
};
|
|
269
|
+
output_tokens: number;
|
|
270
|
+
output_tokens_details: {
|
|
271
|
+
reasoning_tokens: number;
|
|
272
|
+
};
|
|
273
|
+
total_tokens: number;
|
|
274
|
+
} | null;
|
|
275
|
+
user: string | null;
|
|
276
|
+
metadata: Record<string, string>;
|
|
277
|
+
}
|
|
278
|
+
export interface ResponseFunctionCallItem {
|
|
279
|
+
type: 'function_call';
|
|
280
|
+
id: string;
|
|
281
|
+
call_id: string;
|
|
282
|
+
name: string;
|
|
283
|
+
arguments: string;
|
|
284
|
+
status: 'completed' | 'in_progress';
|
|
285
|
+
}
|
|
286
|
+
export interface ResponseFunctionCallOutputItem {
|
|
287
|
+
type: 'function_call_output';
|
|
288
|
+
call_id: string;
|
|
289
|
+
output: string;
|
|
290
|
+
}
|
|
291
|
+
export type ResponseOutputItemUnion = ResponseOutputItem | ResponseFunctionCallItem;
|
package/out/types.js
ADDED
package/out/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/out/utils.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Utilities
|
|
3
|
+
*
|
|
4
|
+
* Common helpers used across the server, routes, and runner modules.
|
|
5
|
+
*/
|
|
6
|
+
import type { NextFunction, Request, Response } from 'express';
|
|
7
|
+
import { OpenAIErrorResponse } from './types.js';
|
|
8
|
+
import { Message, MessageAttachment } from './assistants/types.js';
|
|
9
|
+
export declare function generateId(prefix: string): string;
|
|
10
|
+
export declare function errorResponse(message: string, type?: string, param?: string | null, code?: string | null): OpenAIErrorResponse;
|
|
11
|
+
export declare function notFoundError(resource: string): OpenAIErrorResponse;
|
|
12
|
+
export interface CreateMessageOptions {
|
|
13
|
+
threadId: string;
|
|
14
|
+
messageId: string;
|
|
15
|
+
content: string;
|
|
16
|
+
role?: 'user' | 'assistant';
|
|
17
|
+
assistantId?: string | null;
|
|
18
|
+
runId?: string | null;
|
|
19
|
+
attachments?: MessageAttachment[];
|
|
20
|
+
metadata?: Record<string, string>;
|
|
21
|
+
status?: 'completed' | 'in_progress' | 'incomplete';
|
|
22
|
+
}
|
|
23
|
+
export declare function createMessage(opts: CreateMessageOptions): Message;
|
|
24
|
+
export declare function generateApiToken(): string;
|
|
25
|
+
export declare function setApiTokens(tokens: string[]): void;
|
|
26
|
+
export declare function addApiToken(token: string): void;
|
|
27
|
+
export declare function removeApiToken(token: string): void;
|
|
28
|
+
export declare function authMiddleware(req: Request, res: Response, next: NextFunction): void | Response<any, Record<string, any>>;
|
package/out/utils.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Utilities
|
|
3
|
+
*
|
|
4
|
+
* Common helpers used across the server, routes, and runner modules.
|
|
5
|
+
*/
|
|
6
|
+
import { randomBytes } from 'crypto';
|
|
7
|
+
// ==================== ID Generation ====================
|
|
8
|
+
const ID_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
9
|
+
const ID_LENGTH = 24;
|
|
10
|
+
export function generateId(prefix) {
|
|
11
|
+
let id = '';
|
|
12
|
+
for (let i = 0; i < ID_LENGTH; i++) {
|
|
13
|
+
id += ID_CHARS.charAt(Math.floor(Math.random() * ID_CHARS.length));
|
|
14
|
+
}
|
|
15
|
+
return `${prefix}_${id}`;
|
|
16
|
+
}
|
|
17
|
+
// ==================== Error Response ====================
|
|
18
|
+
export function errorResponse(message, type = 'invalid_request_error', param = null, code = null) {
|
|
19
|
+
return {
|
|
20
|
+
error: { message, type, param, code }
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export function notFoundError(resource) {
|
|
24
|
+
return errorResponse(`No ${resource} found`, 'invalid_request_error', null, 'resource_not_found');
|
|
25
|
+
}
|
|
26
|
+
export function createMessage(opts) {
|
|
27
|
+
const now = Math.floor(Date.now() / 1000);
|
|
28
|
+
const isCompleted = (opts.status ?? 'completed') === 'completed';
|
|
29
|
+
return {
|
|
30
|
+
id: opts.messageId,
|
|
31
|
+
object: 'thread.message',
|
|
32
|
+
created_at: now,
|
|
33
|
+
thread_id: opts.threadId,
|
|
34
|
+
status: opts.status ?? 'completed',
|
|
35
|
+
incomplete_details: null,
|
|
36
|
+
completed_at: isCompleted ? now : null,
|
|
37
|
+
incomplete_at: null,
|
|
38
|
+
role: opts.role ?? 'user',
|
|
39
|
+
content: [{
|
|
40
|
+
type: 'text',
|
|
41
|
+
text: { value: opts.content, annotations: [] }
|
|
42
|
+
}],
|
|
43
|
+
assistant_id: opts.assistantId ?? null,
|
|
44
|
+
run_id: opts.runId ?? null,
|
|
45
|
+
attachments: opts.attachments ?? [],
|
|
46
|
+
metadata: opts.metadata ?? {}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
// ==================== Auth Middleware ====================
|
|
50
|
+
export function generateApiToken() {
|
|
51
|
+
return 'cpx_' + randomBytes(32).toString('hex');
|
|
52
|
+
}
|
|
53
|
+
let validTokens = new Set();
|
|
54
|
+
export function setApiTokens(tokens) {
|
|
55
|
+
validTokens = new Set(tokens);
|
|
56
|
+
}
|
|
57
|
+
export function addApiToken(token) {
|
|
58
|
+
validTokens.add(token);
|
|
59
|
+
}
|
|
60
|
+
export function removeApiToken(token) {
|
|
61
|
+
validTokens.delete(token);
|
|
62
|
+
}
|
|
63
|
+
export function authMiddleware(req, res, next) {
|
|
64
|
+
if (validTokens.size === 0) {
|
|
65
|
+
return next();
|
|
66
|
+
}
|
|
67
|
+
const authHeader = req.headers.authorization;
|
|
68
|
+
if (!authHeader) {
|
|
69
|
+
return res.status(401).json(errorResponse('Missing authorization header. Include "Authorization: Bearer <token>" header.', 'authentication_error', 'authorization', 'missing_authorization'));
|
|
70
|
+
}
|
|
71
|
+
const parts = authHeader.split(' ');
|
|
72
|
+
if (parts.length !== 2 || parts[0] !== 'Bearer') {
|
|
73
|
+
return res.status(401).json(errorResponse('Invalid authorization header format. Use "Authorization: Bearer <token>".', 'authentication_error', 'authorization', 'invalid_authorization_format'));
|
|
74
|
+
}
|
|
75
|
+
const token = parts[1];
|
|
76
|
+
if (!validTokens.has(token)) {
|
|
77
|
+
return res.status(401).json(errorResponse('Invalid API token.', 'authentication_error', 'authorization', 'invalid_token'));
|
|
78
|
+
}
|
|
79
|
+
next();
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=utils.js.map
|
package/out/utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAIrC,0DAA0D;AAE1D,MAAM,QAAQ,GAAG,gEAAgE,CAAC;AAClF,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;QACnC,EAAE,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,GAAG,MAAM,IAAI,EAAE,EAAE,CAAC;AAC3B,CAAC;AAED,2DAA2D;AAE3D,MAAM,UAAU,aAAa,CAC3B,OAAe,EACf,IAAI,GAAG,uBAAuB,EAC9B,QAAuB,IAAI,EAC3B,OAAsB,IAAI;IAE1B,OAAO;QACL,KAAK,EAAE,EAAE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CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CACzB,aAAa,CACX,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,eAAe,CAChB,CACF,CAAC;IACJ,CAAC;IAED,IAAI,EAAE,CAAC;AACT,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hyorman/copilot-proxy-core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Core shared library for Copilot Proxy",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "out/index.js",
|
|
7
|
+
"types": "out/index.d.ts",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"author": "hyorman",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/hyorman/copilot-proxy.git",
|
|
13
|
+
"directory": "packages/core"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"out"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"prepublishOnly": "npm run build",
|
|
21
|
+
"test": "vitest run"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"express": "^4.18.2",
|
|
25
|
+
"morgan": "^1.10.0",
|
|
26
|
+
"multer": "^2.1.1"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/express": "^4.17.14",
|
|
30
|
+
"@types/morgan": "^1.9.4",
|
|
31
|
+
"@types/multer": "^2.1.0",
|
|
32
|
+
"@types/node": "^18.11.18",
|
|
33
|
+
"typescript": "^5.4.0",
|
|
34
|
+
"vitest": "^4.0.18"
|
|
35
|
+
}
|
|
36
|
+
}
|