@premai/api-sdk 1.0.41 → 1.0.42

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 @@
1
+ export declare function runClaudeCode(forwardedArgs?: string[]): Promise<number>;
@@ -0,0 +1,7 @@
1
+ export declare function interactivePickModel(models: {
2
+ id: string;
3
+ display_name: string;
4
+ }[]): Promise<{
5
+ id: string;
6
+ display_name: string;
7
+ }>;
@@ -0,0 +1,13 @@
1
+ export type ProxyConfig = {
2
+ host: string;
3
+ port: number;
4
+ proxyUrl: string;
5
+ enclaveUrl: string;
6
+ kek: string;
7
+ };
8
+ export type ProxyHandle = {
9
+ stop: () => void;
10
+ ready: Promise<void>;
11
+ whenCrashed: Promise<never>;
12
+ };
13
+ export declare function startProxySubprocess(config: ProxyConfig): ProxyHandle;
@@ -0,0 +1,3 @@
1
+ export declare function promptValue(label: string, options?: {
2
+ secret?: boolean;
3
+ }): Promise<string>;
@@ -0,0 +1,3 @@
1
+ import type { Router } from "express";
2
+ import type { RvencServerDeps } from "../server/create-app";
3
+ export declare function registerOpenAICompatRoutes(router: Router, deps: RvencServerDeps): void;
@@ -0,0 +1,8 @@
1
+ import express from "express";
2
+ import type { RvencClient } from "../core";
3
+ import type { CreateServerAppOptions, ServerCompatMode } from "../types";
4
+ export type RvencServerDeps = {
5
+ getOrCreateClient: (apiKey: string) => Promise<RvencClient>;
6
+ };
7
+ export declare function createServerApp(compat?: ServerCompatMode): express.Application;
8
+ export declare function createServerApp(options: CreateServerAppOptions): express.Application;
@@ -0,0 +1,7 @@
1
+ import type { Application } from "express";
2
+ export declare function registerApiDiscoveryRoute(app: Application, mount: {
3
+ openai: boolean;
4
+ anthropic: boolean;
5
+ openaiPrefix: string;
6
+ anthropicPrefix: string;
7
+ }): void;
@@ -0,0 +1,9 @@
1
+ import type { ServerCompatMode } from "../types";
2
+ export declare function normalizeRoutePrefix(raw: string | undefined): string;
3
+ export declare const DEFAULT_OPENAI_ROUTE_PREFIX_BOTH = "/openai";
4
+ export declare const DEFAULT_ANTHROPIC_ROUTE_PREFIX_BOTH = "/anthropic";
5
+ export declare function resolvePrefixesForCompat(compat: ServerCompatMode, openaiRaw: string | undefined, anthropicRaw: string | undefined): {
6
+ openaiPrefix: string;
7
+ anthropicPrefix: string;
8
+ };
9
+ export declare function prefixedRoute(prefix: string, path: string): string;
@@ -0,0 +1,8 @@
1
+ import multer from "multer";
2
+ import { type RvencClient } from "../core";
3
+ import type { ServerOptions } from "../types";
4
+ export declare const DEFAULT_HOST: string;
5
+ export declare const DEFAULT_PORT: number;
6
+ export declare const audioUpload: multer.Multer;
7
+ export declare function applyServerOptions(options: ServerOptions): void;
8
+ export declare function getOrCreateRvencClient(apiKey: string): Promise<RvencClient>;
@@ -0,0 +1,4 @@
1
+ import type { ServerOptions } from "../types";
2
+ export declare function startServer(options?: ServerOptions): Promise<{
3
+ close: () => void;
4
+ }>;
package/dist/server.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- #!/usr/bin/env node
2
- import type { ServerOptions } from './types';
3
- declare const app: import("express-serve-static-core").Express;
4
- export declare function startServer(options?: ServerOptions): Promise<void>;
5
- export default app;
1
+ import { createServerApp } from "./server/create-app";
2
+ export type { RvencServerDeps } from "./server/create-app";
3
+ export { DEFAULT_ANTHROPIC_ROUTE_PREFIX_BOTH, DEFAULT_OPENAI_ROUTE_PREFIX_BOTH, normalizeRoutePrefix, resolvePrefixesForCompat, } from "./server/route-prefix";
4
+ export { createServerApp };
5
+ export { startServer } from "./server/start";
6
+ declare const _default: import("express").Application;
7
+ export default _default;
package/dist/types.d.ts CHANGED
@@ -121,7 +121,7 @@ export interface IndexFilesResponse {
121
121
  data: {
122
122
  results: Array<{
123
123
  file_id: string;
124
- rag_status: 'running' | 'stopped' | 'failure' | 'success' | null;
124
+ rag_status: "running" | "stopped" | "failure" | "success" | null;
125
125
  success: boolean;
126
126
  error?: string;
127
127
  }>;
@@ -271,7 +271,7 @@ export interface TranscribeWithDiarizationDecrypted {
271
271
  detectedLanguage?: string;
272
272
  }
273
273
  export interface SpreadsheetContentDecrypted {
274
- format: 'csv' | 'xlsx';
274
+ format: "csv" | "xlsx";
275
275
  data?: unknown[][];
276
276
  sheets?: Array<{
277
277
  name: string;
@@ -284,7 +284,7 @@ export interface SpreadsheetContentDecrypted {
284
284
  error?: string;
285
285
  }
286
286
  export interface DataFileContentDecrypted {
287
- format: 'json' | 'xml';
287
+ format: "json" | "xml";
288
288
  content: string;
289
289
  summary?: {
290
290
  type?: string;
@@ -328,6 +328,7 @@ export interface ExecuteToolResponseWrapper {
328
328
  data: ExecuteToolResponse;
329
329
  error?: string;
330
330
  }
331
+ export type ServerCompatMode = "openai" | "anthropic" | "both";
331
332
  export type ServerOptions = {
332
333
  host?: string;
333
334
  port?: number;
@@ -335,7 +336,12 @@ export type ServerOptions = {
335
336
  enclaveUrl?: string;
336
337
  kek?: string;
337
338
  attest?: boolean;
339
+ compat?: ServerCompatMode;
340
+ openaiRoutePrefix?: string;
341
+ anthropicRoutePrefix?: string;
342
+ jsonBodyLimit?: string;
338
343
  };
344
+ export type CreateServerAppOptions = Pick<ServerOptions, "compat" | "openaiRoutePrefix" | "anthropicRoutePrefix" | "jsonBodyLimit">;
339
345
  export interface ListModelsParams {
340
346
  type?: string;
341
347
  }
package/package.json CHANGED
@@ -4,10 +4,11 @@
4
4
  },
5
5
  "homepage": "https://github.com/premai-io/api-sdk-ts",
6
6
  "name": "@premai/api-sdk",
7
- "version": "1.0.41",
7
+ "version": "1.0.42",
8
8
  "main": "./dist/index.cjs",
9
9
  "bin": {
10
- "pcci-proxy": "./dist/cli.cjs"
10
+ "confidential-proxy": "./dist/cli.mjs",
11
+ "confidential-claude": "./dist/cli-claude.mjs"
11
12
  },
12
13
  "keywords": [],
13
14
  "author": "",
@@ -65,7 +66,8 @@
65
66
  "@noble/curves": "^1.8.1",
66
67
  "@noble/hashes": "^1.7.1",
67
68
  "@noble/post-quantum": "^0.5.2",
68
- "@premai/reticle": "^0.4.6",
69
+ "@premai/reticle": "^0.4.7",
70
+ "@types/react": "^19.2.15",
69
71
  "bare-abort-controller": "^1.1.1",
70
72
  "bare-crypto": "^1.13.5",
71
73
  "bare-encoding": "^1.0.3",
@@ -74,9 +76,12 @@
74
76
  "bare-process": "^4.4.1",
75
77
  "date-fns": "^4.1.0",
76
78
  "dotenv": "^17.2.3",
79
+ "env-paths": "^4.0.0",
77
80
  "express": "^4.18.2",
81
+ "ink": "^7.0.4",
78
82
  "multer": "^2.0.2",
79
83
  "openai": "^6.9.1",
84
+ "react": "^19.2.6",
80
85
  "typescript": "^5.9.3",
81
86
  "zod": "^4.2.1"
82
87
  },