@router-for-me/pi-cliproxyapi-provider 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/LICENSE +21 -0
- package/README.md +175 -0
- package/extensions/codex-stream.ts +153 -0
- package/extensions/index.ts +624 -0
- package/extensions/lib.ts +418 -0
- package/package.json +56 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers for CLIProxyAPI baseUrl normalization, model mapping, and config I/O.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
|
+
import { dirname, join } from "node:path";
|
|
7
|
+
|
|
8
|
+
// Local shape matching pi ThinkingLevelMap; avoid hard runtime peer imports here.
|
|
9
|
+
export type ThinkingLevelMap = Partial<
|
|
10
|
+
Record<"off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra", string | null>
|
|
11
|
+
>;
|
|
12
|
+
|
|
13
|
+
export const DEFAULT_PROVIDER_ID = "cliproxyapi";
|
|
14
|
+
export const DEFAULT_PROVIDER_NAME = "CLIProxyAPI";
|
|
15
|
+
export const DEFAULT_BASE_URL = "http://127.0.0.1:8317";
|
|
16
|
+
export const CONFIG_FILE_NAME = "cliproxyapi.json";
|
|
17
|
+
export const AUTH_FILE_NAME = "auth.json";
|
|
18
|
+
export const CLIENT_VERSION = "pi";
|
|
19
|
+
|
|
20
|
+
/** Keep login credentials effectively permanent; reconfigure via /cliproxyapi or /login. */
|
|
21
|
+
export const CREDENTIAL_TTL_MS = 100 * 365 * 24 * 60 * 60 * 1000;
|
|
22
|
+
|
|
23
|
+
export const ZERO_COST = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 } as const;
|
|
24
|
+
export const DEFAULT_MAX_TOKENS = 16384;
|
|
25
|
+
export const DEFAULT_CONTEXT_WINDOW = 128000;
|
|
26
|
+
|
|
27
|
+
const PI_THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max", "ultra"] as const;
|
|
28
|
+
|
|
29
|
+
export interface CliproxyConfigFile {
|
|
30
|
+
baseUrl?: string;
|
|
31
|
+
apiKey?: string;
|
|
32
|
+
providerId?: string;
|
|
33
|
+
providerName?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ResolvedIdentity {
|
|
37
|
+
providerId: string;
|
|
38
|
+
providerName: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ResolvedConnection {
|
|
42
|
+
baseUrlInput: string;
|
|
43
|
+
apiKey: string;
|
|
44
|
+
inferenceBaseUrl: string;
|
|
45
|
+
modelsUrl: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface CodexReasoningLevel {
|
|
49
|
+
effort?: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface CodexClientModel {
|
|
54
|
+
slug?: string;
|
|
55
|
+
id?: string;
|
|
56
|
+
display_name?: string;
|
|
57
|
+
name?: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
context_window?: number;
|
|
60
|
+
max_context_window?: number;
|
|
61
|
+
input_modalities?: string[];
|
|
62
|
+
supported_reasoning_levels?: CodexReasoningLevel[] | string[];
|
|
63
|
+
visibility?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface CodexClientModelsResponse {
|
|
67
|
+
models?: CodexClientModel[];
|
|
68
|
+
data?: CodexClientModel[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface PiProviderModel {
|
|
72
|
+
id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
reasoning: boolean;
|
|
75
|
+
input: Array<"text" | "image">;
|
|
76
|
+
cost: { input: number; output: number; cacheRead: number; cacheWrite: number };
|
|
77
|
+
contextWindow: number;
|
|
78
|
+
maxTokens: number;
|
|
79
|
+
thinkingLevelMap?: ThinkingLevelMap;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface OAuthRefreshMeta {
|
|
83
|
+
baseUrl: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function firstNonEmpty(...values: Array<string | undefined | null>): string | undefined {
|
|
87
|
+
for (const value of values) {
|
|
88
|
+
if (typeof value === "string" && value.trim()) {
|
|
89
|
+
return value.trim();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Normalize user-provided base URL into inference + models endpoints.
|
|
97
|
+
*
|
|
98
|
+
* Preferred input: host:port (e.g. http://127.0.0.1:8317)
|
|
99
|
+
* - /backend-api kept as-is for inference
|
|
100
|
+
* - /v1 rewritten to /backend-api for inference
|
|
101
|
+
* - models always at {root}/v1/models?client_version=pi
|
|
102
|
+
*/
|
|
103
|
+
export function resolveEndpoints(baseUrlInput: string): {
|
|
104
|
+
inferenceBaseUrl: string;
|
|
105
|
+
modelsUrl: string;
|
|
106
|
+
rootOrigin: string;
|
|
107
|
+
} {
|
|
108
|
+
let raw = baseUrlInput.trim();
|
|
109
|
+
if (!raw) {
|
|
110
|
+
throw new Error("baseUrl is empty");
|
|
111
|
+
}
|
|
112
|
+
if (!/^https?:\/\//i.test(raw)) {
|
|
113
|
+
raw = `http://${raw}`;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const url = new URL(raw);
|
|
117
|
+
let path = url.pathname.replace(/\/+$/, "");
|
|
118
|
+
|
|
119
|
+
if (path === "/v1") {
|
|
120
|
+
path = "/backend-api";
|
|
121
|
+
} else if (path.endsWith("/v1")) {
|
|
122
|
+
path = `${path.slice(0, -"/v1".length)}/backend-api`;
|
|
123
|
+
} else if (path === "" || path === "/") {
|
|
124
|
+
path = "/backend-api";
|
|
125
|
+
} else if (!path.endsWith("/backend-api")) {
|
|
126
|
+
path = `${path}/backend-api`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const rootPath = path.replace(/\/backend-api$/, "");
|
|
130
|
+
const inferenceBaseUrl = `${url.origin}${path}/`;
|
|
131
|
+
const modelsPath = `${rootPath}/v1/models`.replace(/\/{2,}/g, "/");
|
|
132
|
+
const modelsUrl = `${url.origin}${modelsPath}?client_version=${encodeURIComponent(CLIENT_VERSION)}`;
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
inferenceBaseUrl,
|
|
136
|
+
modelsUrl,
|
|
137
|
+
rootOrigin: url.origin,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function encodeRefreshMeta(baseUrl: string): string {
|
|
142
|
+
const meta: OAuthRefreshMeta = { baseUrl };
|
|
143
|
+
return JSON.stringify(meta);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function decodeRefreshMeta(refresh: string | undefined): OAuthRefreshMeta | null {
|
|
147
|
+
if (!refresh?.trim()) {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
const parsed = JSON.parse(refresh) as OAuthRefreshMeta;
|
|
152
|
+
if (parsed && typeof parsed.baseUrl === "string" && parsed.baseUrl.trim()) {
|
|
153
|
+
return { baseUrl: parsed.baseUrl.trim() };
|
|
154
|
+
}
|
|
155
|
+
} catch {
|
|
156
|
+
// Older / non-JSON refresh tokens are ignored.
|
|
157
|
+
}
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function loadConfigFile(agentDir: string): CliproxyConfigFile {
|
|
162
|
+
const configPath = join(agentDir, CONFIG_FILE_NAME);
|
|
163
|
+
try {
|
|
164
|
+
const raw = readFileSync(configPath, "utf8");
|
|
165
|
+
const parsed = JSON.parse(raw) as CliproxyConfigFile;
|
|
166
|
+
return parsed && typeof parsed === "object" ? parsed : {};
|
|
167
|
+
} catch (error) {
|
|
168
|
+
const err = error as NodeJS.ErrnoException;
|
|
169
|
+
if (err.code !== "ENOENT") {
|
|
170
|
+
throw error;
|
|
171
|
+
}
|
|
172
|
+
return {};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function saveConfigFile(agentDir: string, config: CliproxyConfigFile): void {
|
|
177
|
+
const configPath = join(agentDir, CONFIG_FILE_NAME);
|
|
178
|
+
mkdirSync(dirname(configPath), { recursive: true });
|
|
179
|
+
|
|
180
|
+
let existing: CliproxyConfigFile = {};
|
|
181
|
+
try {
|
|
182
|
+
existing = loadConfigFile(agentDir);
|
|
183
|
+
} catch {
|
|
184
|
+
existing = {};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const next: CliproxyConfigFile = {
|
|
188
|
+
...existing,
|
|
189
|
+
...config,
|
|
190
|
+
};
|
|
191
|
+
writeFileSync(configPath, `${JSON.stringify(next, null, 2)}\n`, "utf8");
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function loadAuthConnection(agentDir: string, providerId: string): { baseUrl?: string; apiKey?: string } | null {
|
|
195
|
+
const authPath = join(agentDir, AUTH_FILE_NAME);
|
|
196
|
+
try {
|
|
197
|
+
const raw = readFileSync(authPath, "utf8");
|
|
198
|
+
const data = JSON.parse(raw) as Record<string, any>;
|
|
199
|
+
const entry = data?.[providerId];
|
|
200
|
+
if (!entry || typeof entry !== "object") {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (entry.type === "oauth" && typeof entry.access === "string" && entry.access.trim()) {
|
|
205
|
+
const meta = decodeRefreshMeta(typeof entry.refresh === "string" ? entry.refresh : undefined);
|
|
206
|
+
return {
|
|
207
|
+
apiKey: entry.access.trim(),
|
|
208
|
+
baseUrl: meta?.baseUrl,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
if (entry.type === "api_key" && typeof entry.key === "string" && entry.key.trim()) {
|
|
213
|
+
return { apiKey: entry.key.trim() };
|
|
214
|
+
}
|
|
215
|
+
} catch (error) {
|
|
216
|
+
const err = error as NodeJS.ErrnoException;
|
|
217
|
+
if (err.code !== "ENOENT") {
|
|
218
|
+
throw error;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function resolveIdentity(agentDir: string): ResolvedIdentity {
|
|
225
|
+
let file: CliproxyConfigFile = {};
|
|
226
|
+
try {
|
|
227
|
+
file = loadConfigFile(agentDir);
|
|
228
|
+
} catch {
|
|
229
|
+
file = {};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return {
|
|
233
|
+
providerId: firstNonEmpty(process.env.CLIPROXYAPI_PROVIDER_ID, file.providerId, DEFAULT_PROVIDER_ID)!,
|
|
234
|
+
providerName: firstNonEmpty(process.env.CLIPROXYAPI_PROVIDER_NAME, file.providerName, DEFAULT_PROVIDER_NAME)!,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Resolve connection settings.
|
|
240
|
+
* Priority: env > cliproxyapi.json > auth.json (/login) > default baseUrl
|
|
241
|
+
*/
|
|
242
|
+
export function resolveConnection(agentDir: string, providerId: string): ResolvedConnection | null {
|
|
243
|
+
let file: CliproxyConfigFile = {};
|
|
244
|
+
try {
|
|
245
|
+
file = loadConfigFile(agentDir);
|
|
246
|
+
} catch {
|
|
247
|
+
file = {};
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
let auth: { baseUrl?: string; apiKey?: string } | null = null;
|
|
251
|
+
try {
|
|
252
|
+
auth = loadAuthConnection(agentDir, providerId);
|
|
253
|
+
} catch {
|
|
254
|
+
auth = null;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const baseUrlInput = firstNonEmpty(process.env.CLIPROXYAPI_BASE_URL, file.baseUrl, auth?.baseUrl, DEFAULT_BASE_URL)!;
|
|
258
|
+
const apiKey = firstNonEmpty(process.env.CLIPROXYAPI_API_KEY, file.apiKey, auth?.apiKey);
|
|
259
|
+
if (!apiKey) {
|
|
260
|
+
return null;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const endpoints = resolveEndpoints(baseUrlInput);
|
|
264
|
+
return {
|
|
265
|
+
baseUrlInput,
|
|
266
|
+
apiKey,
|
|
267
|
+
inferenceBaseUrl: endpoints.inferenceBaseUrl,
|
|
268
|
+
modelsUrl: endpoints.modelsUrl,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export function extractReasoningEfforts(model: CodexClientModel): string[] {
|
|
273
|
+
const raw = model.supported_reasoning_levels ?? [];
|
|
274
|
+
const efforts: string[] = [];
|
|
275
|
+
for (const entry of raw) {
|
|
276
|
+
const effort = typeof entry === "string" ? entry : typeof entry?.effort === "string" ? entry.effort : "";
|
|
277
|
+
const normalized = effort.trim().toLowerCase();
|
|
278
|
+
if (!normalized) continue;
|
|
279
|
+
if (!efforts.includes(normalized)) {
|
|
280
|
+
efforts.push(normalized);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return efforts;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export function buildThinkingLevelMap(efforts: string[]): ThinkingLevelMap | undefined {
|
|
287
|
+
if (efforts.length === 0) {
|
|
288
|
+
return undefined;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const supported = new Set(efforts);
|
|
292
|
+
const map: ThinkingLevelMap = {};
|
|
293
|
+
|
|
294
|
+
for (const level of PI_THINKING_LEVELS) {
|
|
295
|
+
if (level === "off") {
|
|
296
|
+
map.off = supported.has("none") ? "none" : null;
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
map[level] = supported.has(level) ? level : null;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return map;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export function buildInputModalities(model: CodexClientModel): Array<"text" | "image"> {
|
|
306
|
+
const raw = model.input_modalities ?? [];
|
|
307
|
+
const input: Array<"text" | "image"> = [];
|
|
308
|
+
for (const modality of raw) {
|
|
309
|
+
const value = String(modality).trim().toLowerCase();
|
|
310
|
+
if ((value === "text" || value === "image") && !input.includes(value)) {
|
|
311
|
+
input.push(value);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (!input.includes("text")) {
|
|
315
|
+
input.unshift("text");
|
|
316
|
+
}
|
|
317
|
+
return input;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export function toPiModel(model: CodexClientModel): PiProviderModel | null {
|
|
321
|
+
const id = (model.slug ?? model.id ?? "").trim();
|
|
322
|
+
if (!id) {
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
if (String(model.visibility ?? "").toLowerCase() === "hide") {
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
const efforts = extractReasoningEfforts(model);
|
|
330
|
+
const hasReasoning = efforts.some((effort) => effort !== "none");
|
|
331
|
+
const contextWindow =
|
|
332
|
+
(typeof model.context_window === "number" && model.context_window > 0 ? model.context_window : undefined) ??
|
|
333
|
+
(typeof model.max_context_window === "number" && model.max_context_window > 0
|
|
334
|
+
? model.max_context_window
|
|
335
|
+
: undefined) ??
|
|
336
|
+
DEFAULT_CONTEXT_WINDOW;
|
|
337
|
+
|
|
338
|
+
return {
|
|
339
|
+
id,
|
|
340
|
+
name: (model.display_name ?? model.name ?? id).trim() || id,
|
|
341
|
+
reasoning: hasReasoning,
|
|
342
|
+
input: buildInputModalities(model),
|
|
343
|
+
cost: { ...ZERO_COST },
|
|
344
|
+
contextWindow,
|
|
345
|
+
maxTokens: DEFAULT_MAX_TOKENS,
|
|
346
|
+
thinkingLevelMap: buildThinkingLevelMap(efforts),
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/** HTTP error from /v1/models (used to detect 401 and re-show setup commands). */
|
|
351
|
+
export class ModelsHttpError extends Error {
|
|
352
|
+
readonly status: number;
|
|
353
|
+
readonly statusText: string;
|
|
354
|
+
|
|
355
|
+
constructor(status: number, statusText: string, body: string) {
|
|
356
|
+
super(`models request failed: ${status} ${statusText}${body ? ` body=${body.slice(0, 200)}` : ""}`);
|
|
357
|
+
this.name = "ModelsHttpError";
|
|
358
|
+
this.status = status;
|
|
359
|
+
this.statusText = statusText;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export function isUnauthorizedModelsError(error: unknown): boolean {
|
|
364
|
+
return error instanceof ModelsHttpError && error.status === 401;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export async function fetchCodexModels(modelsUrl: string, apiKey: string): Promise<CodexClientModel[]> {
|
|
368
|
+
const response = await fetch(modelsUrl, {
|
|
369
|
+
headers: {
|
|
370
|
+
Authorization: `Bearer ${apiKey}`,
|
|
371
|
+
Accept: "application/json",
|
|
372
|
+
},
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
// Login validation only requires HTTP 200; non-2xx means credentials/baseUrl failed.
|
|
376
|
+
if (!response.ok) {
|
|
377
|
+
const body = await response.text().catch(() => "");
|
|
378
|
+
throw new ModelsHttpError(response.status, response.statusText, body);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// Status 200 is enough for success, even when the catalog is empty or non-JSON.
|
|
382
|
+
let payload: unknown;
|
|
383
|
+
try {
|
|
384
|
+
payload = await response.json();
|
|
385
|
+
} catch {
|
|
386
|
+
return [];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (Array.isArray(payload)) {
|
|
390
|
+
return payload as CodexClientModel[];
|
|
391
|
+
}
|
|
392
|
+
if (payload && typeof payload === "object") {
|
|
393
|
+
const obj = payload as CodexClientModelsResponse;
|
|
394
|
+
if (Array.isArray(obj.models)) {
|
|
395
|
+
return obj.models;
|
|
396
|
+
}
|
|
397
|
+
if (Array.isArray(obj.data)) {
|
|
398
|
+
return obj.data;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return [];
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export async function loadMappedModels(
|
|
405
|
+
baseUrlInput: string,
|
|
406
|
+
apiKey: string,
|
|
407
|
+
): Promise<{ models: PiProviderModel[]; inferenceBaseUrl: string; modelsUrl: string }> {
|
|
408
|
+
const endpoints = resolveEndpoints(baseUrlInput);
|
|
409
|
+
const remoteModels = await fetchCodexModels(endpoints.modelsUrl, apiKey);
|
|
410
|
+
const models = remoteModels.map(toPiModel).filter((model): model is PiProviderModel => model !== null);
|
|
411
|
+
|
|
412
|
+
// Empty catalog is valid: credentials passed (HTTP 200), just no usable models yet.
|
|
413
|
+
return {
|
|
414
|
+
models,
|
|
415
|
+
inferenceBaseUrl: endpoints.inferenceBaseUrl,
|
|
416
|
+
modelsUrl: endpoints.modelsUrl,
|
|
417
|
+
};
|
|
418
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@router-for-me/pi-cliproxyapi-provider",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Pi provider extension that auto-registers CLIProxyAPI models via /v1/models?client_version=pi",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"pi-package",
|
|
8
|
+
"pi-extension",
|
|
9
|
+
"cliproxyapi",
|
|
10
|
+
"openai-codex-responses"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/router-for-me/pi-cliproxyapi-provider.git"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/router-for-me/pi-cliproxyapi-provider#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/router-for-me/pi-cliproxyapi-provider/issues"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=20"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"test": "vitest run",
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"lint": "biome check .",
|
|
31
|
+
"format": "biome check --write .",
|
|
32
|
+
"check": "npm run typecheck && npm run lint && npm run test"
|
|
33
|
+
},
|
|
34
|
+
"pi": {
|
|
35
|
+
"extensions": [
|
|
36
|
+
"./extensions/index.ts"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"@earendil-works/pi-ai": "*",
|
|
41
|
+
"@earendil-works/pi-coding-agent": "*"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@biomejs/biome": "2.5.3",
|
|
45
|
+
"@earendil-works/pi-ai": "^0.80.6",
|
|
46
|
+
"@earendil-works/pi-coding-agent": "0.80.6",
|
|
47
|
+
"@types/node": "^22.15.21",
|
|
48
|
+
"typescript": "6.0.3",
|
|
49
|
+
"vitest": "4.1.9"
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"extensions",
|
|
53
|
+
"README.md",
|
|
54
|
+
"LICENSE"
|
|
55
|
+
]
|
|
56
|
+
}
|