@premai/api-sdk 1.0.34 → 1.0.36

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/cli.cjs CHANGED
@@ -71,7 +71,8 @@ async function attest(apiKey, options = { enabled: true }) {
71
71
  if (options.model)
72
72
  query = query.with("model", options.model);
73
73
  try {
74
- const attested = await client.attest(query);
74
+ client.set_query(query);
75
+ const attested = await client.attest();
75
76
  const headers = attested.headers();
76
77
  const sessionId = attested.headers().gpu()?.get("x-session-id") ?? null;
77
78
  headers.free();
@@ -54,7 +54,8 @@ async function attest(apiKey, options = { enabled: true }) {
54
54
  if (options.model)
55
55
  query = query.with("model", options.model);
56
56
  try {
57
- const attested = await client.attest(query);
57
+ client.set_query(query);
58
+ const attested = await client.attest();
58
59
  const headers = attested.headers();
59
60
  const sessionId = attested.headers().gpu()?.get("x-session-id") ?? null;
60
61
  headers.free();
@@ -1414,6 +1415,7 @@ async function createRvencClient(options) {
1414
1415
  var core_default = createRvencClient;
1415
1416
  export {
1416
1417
  serializeDEKStore,
1418
+ loadPrem,
1417
1419
  isGatewayError,
1418
1420
  isAttestationError,
1419
1421
  initializeDEKStore,
@@ -285,7 +285,8 @@ async function attest(apiKey, options = { enabled: true }) {
285
285
  if (options.model)
286
286
  query = query.with("model", options.model);
287
287
  try {
288
- const attested = await client.attest(query);
288
+ client.set_query(query);
289
+ const attested = await client.attest();
289
290
  const headers = attested.headers();
290
291
  const sessionId = attested.headers().gpu()?.get("x-session-id") ?? null;
291
292
  headers.free();
@@ -16561,7 +16562,7 @@ function finalize(ctx, schema) {
16561
16562
  result.$schema = "http://json-schema.org/draft-07/schema#";
16562
16563
  } else if (ctx.target === "draft-04") {
16563
16564
  result.$schema = "http://json-schema.org/draft-04/schema#";
16564
- } else if (ctx.target === "openapi-3.0") {} else {}
16565
+ } else if (ctx.target === "openapi-3.0") {}
16565
16566
  if (ctx.external?.uri) {
16566
16567
  const id = ctx.external.registry.get(schema)?.id;
16567
16568
  if (!id)
@@ -16806,7 +16807,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
16806
16807
  if (val === undefined) {
16807
16808
  if (ctx.unrepresentable === "throw") {
16808
16809
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
16809
- } else {}
16810
+ }
16810
16811
  } else if (typeof val === "bigint") {
16811
16812
  if (ctx.unrepresentable === "throw") {
16812
16813
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -25684,6 +25685,7 @@ async function createRvencClient(options) {
25684
25685
  var core_default = createRvencClient;
25685
25686
  export {
25686
25687
  serializeDEKStore,
25688
+ loadPrem,
25687
25689
  isGatewayError,
25688
25690
  isAttestationError,
25689
25691
  initializeDEKStore,
package/dist/core.d.ts CHANGED
@@ -33,5 +33,5 @@ export type { ApiErrorResponse, DEKStore, DecryptedFile, DeleteFileOptions, Dele
33
33
  export { generateEncryptionKeys } from "./utils/crypto";
34
34
  export { deserializeDEKStore, generateNewClientKEK, getClientKEK, getClientKID, initializeDEKStore, serializeDEKStore, } from "./utils/dek-store";
35
35
  export type { OpenAI };
36
- export { getGatewayErrorMessage, isAttestationError, isGatewayError } from './utils/attestation';
36
+ export { getGatewayErrorMessage, isAttestationError, isGatewayError, loadPrem } from './utils/attestation';
37
37
  export default createRvencClient;
package/dist/index.cjs CHANGED
@@ -66,6 +66,7 @@ __export(exports_src, {
66
66
  startServer: () => startServer,
67
67
  serverApp: () => server_default,
68
68
  serializeDEKStore: () => serializeDEKStore,
69
+ loadPrem: () => loadPrem,
69
70
  isGatewayError: () => isGatewayError,
70
71
  isAttestationError: () => isAttestationError,
71
72
  initializeDEKStore: () => initializeDEKStore,
@@ -134,7 +135,8 @@ async function attest(apiKey, options = { enabled: true }) {
134
135
  if (options.model)
135
136
  query = query.with("model", options.model);
136
137
  try {
137
- const attested = await client.attest(query);
138
+ client.set_query(query);
139
+ const attested = await client.attest();
138
140
  const headers = attested.headers();
139
141
  const sessionId = attested.headers().gpu()?.get("x-session-id") ?? null;
140
142
  headers.free();
package/dist/index.mjs CHANGED
@@ -57,7 +57,8 @@ async function attest(apiKey, options = { enabled: true }) {
57
57
  if (options.model)
58
58
  query = query.with("model", options.model);
59
59
  try {
60
- const attested = await client.attest(query);
60
+ client.set_query(query);
61
+ const attested = await client.attest();
61
62
  const headers = attested.headers();
62
63
  const sessionId = attested.headers().gpu()?.get("x-session-id") ?? null;
63
64
  headers.free();
@@ -1696,6 +1697,7 @@ export {
1696
1697
  startServer,
1697
1698
  server_default as serverApp,
1698
1699
  serializeDEKStore,
1700
+ loadPrem,
1699
1701
  isGatewayError,
1700
1702
  isAttestationError,
1701
1703
  initializeDEKStore,
@@ -3,6 +3,7 @@ type AttestationError = Error & {
3
3
  cause: string[];
4
4
  kind?: PremRs.GatewayError;
5
5
  };
6
+ export declare function loadPrem(): Promise<typeof PremRs>;
6
7
  export declare function isAttestationError(err: unknown): err is AttestationError;
7
8
  export declare function isGatewayError(err: unknown): err is AttestationError & {
8
9
  kind: PremRs.GatewayError;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  },
5
5
  "homepage": "https://github.com/premai-io/api-sdk-ts",
6
6
  "name": "@premai/api-sdk",
7
- "version": "1.0.34",
7
+ "version": "1.0.36",
8
8
  "main": "./dist/index.cjs",
9
9
  "bin": {
10
10
  "pcci-proxy": "./dist/cli.cjs"
@@ -65,7 +65,7 @@
65
65
  "@noble/curves": "^1.8.1",
66
66
  "@noble/hashes": "^1.7.1",
67
67
  "@noble/post-quantum": "^0.5.2",
68
- "@premai/reticle": "0.3.1",
68
+ "@premai/reticle": "^0.4.3",
69
69
  "bare-abort-controller": "^1.1.1",
70
70
  "bare-crypto": "^1.13.5",
71
71
  "bare-encoding": "^1.0.3",