@magemetrics/core 0.11.3 → 0.11.4

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/index.d.ts CHANGED
@@ -150,9 +150,6 @@ declare interface components {
150
150
  ReportData: {
151
151
  [key: string]: unknown;
152
152
  }[];
153
- VisualizationData: {
154
- [key: string]: string | (number | null) | unknown | null;
155
- }[];
156
153
  VisualizationWithData: {
157
154
  id: number;
158
155
  flow_data_id: number;
@@ -275,6 +272,9 @@ declare interface components {
275
272
  sampledCount: number;
276
273
  };
277
274
  };
275
+ VisualizationData: {
276
+ [key: string]: string | (number | null) | unknown | null;
277
+ }[];
278
278
  /** @description Prompt starter template */
279
279
  PromptStarter: {
280
280
  id: number;
@@ -292,7 +292,7 @@ declare interface components {
292
292
  /** Format: uuid */
293
293
  id: string;
294
294
  /** Format: uuid */
295
- agent_id: string;
295
+ agent_id: string | null;
296
296
  /** Format: uuid */
297
297
  flow_id: string | null;
298
298
  /** @enum {string} */
@@ -334,7 +334,18 @@ declare interface components {
334
334
  [key: string]: unknown;
335
335
  };
336
336
  } | null;
337
+ cached?: boolean;
337
338
  };
339
+ StartAgentRunRequest: {
340
+ /** Format: uuid */
341
+ agent_id: string;
342
+ /** @default {} */
343
+ inputs: {
344
+ [key: string]: unknown;
345
+ };
346
+ execution_context?: components["schemas"]["ExecutionContextInput"];
347
+ };
348
+ ExecutionContextInput: components["schemas"]["ImpersonateContext"] | components["schemas"]["CustomMetadataContext"];
338
349
  ImpersonateContext: {
339
350
  /**
340
351
  * @description discriminator enum property added by openapi-typescript
@@ -355,16 +366,6 @@ declare interface components {
355
366
  [key: string]: unknown;
356
367
  };
357
368
  };
358
- ExecutionContextInput: components["schemas"]["ImpersonateContext"] | components["schemas"]["CustomMetadataContext"];
359
- StartAgentRunRequest: {
360
- /** Format: uuid */
361
- agent_id: string;
362
- /** @default {} */
363
- inputs: {
364
- [key: string]: unknown;
365
- };
366
- execution_context?: components["schemas"]["ExecutionContextInput"];
367
- };
368
369
  Agent: {
369
370
  /** Format: uuid */
370
371
  id: string;
@@ -410,6 +411,20 @@ declare interface components {
410
411
  /** @description Detailed steps or description of what the task will do */
411
412
  description?: string;
412
413
  }[] | null;
414
+ model_config: {
415
+ /** @enum {string} */
416
+ model: "gemini-3.1-pro-preview";
417
+ /** @enum {string} */
418
+ thinking?: "low" | "high";
419
+ } | {
420
+ /** @enum {string} */
421
+ model: "claude-sonnet-4-6" | "claude-opus-4-6";
422
+ /** @enum {string} */
423
+ effort?: "low" | "medium" | "high";
424
+ } | {
425
+ /** @enum {string} */
426
+ model: "claude-haiku-4-5";
427
+ } | null;
413
428
  master_prompt_name: string | null;
414
429
  master_prompt_version: number | null;
415
430
  created_at: string;
@@ -427,14 +442,6 @@ declare interface components {
427
442
  /** @enum {string} */
428
443
  type: "global";
429
444
  };
430
- SchemaPath: {
431
- /** @description Schema or dataset name in the source database */
432
- dataset: string;
433
- /** @description Table name in the source database */
434
- table_name: string;
435
- /** @description Column name (optional). Omit for table-level items, include for column-level items. */
436
- column_name?: string;
437
- };
438
445
  CreateSchemaKnowledgeItem: {
439
446
  content: string;
440
447
  /** @description Optional identifier from your system, used for lookup and batch operations */
@@ -448,6 +455,14 @@ declare interface components {
448
455
  type: "schema";
449
456
  path: components["schemas"]["SchemaPath"];
450
457
  };
458
+ SchemaPath: {
459
+ /** @description Schema or dataset name in the source database */
460
+ dataset: string;
461
+ /** @description Table name in the source database */
462
+ table_name: string;
463
+ /** @description Column name (optional). Omit for table-level items, include for column-level items. */
464
+ column_name?: string;
465
+ };
451
466
  };
452
467
  responses: never;
453
468
  parameters: never;
@@ -3219,6 +3234,20 @@ declare interface operations {
3219
3234
  /** @description Detailed steps or description of what the task will do */
3220
3235
  description?: string;
3221
3236
  }[];
3237
+ model_config?: {
3238
+ /** @enum {string} */
3239
+ model: "gemini-3.1-pro-preview";
3240
+ /** @enum {string} */
3241
+ thinking?: "low" | "high";
3242
+ } | {
3243
+ /** @enum {string} */
3244
+ model: "claude-sonnet-4-6" | "claude-opus-4-6";
3245
+ /** @enum {string} */
3246
+ effort?: "low" | "medium" | "high";
3247
+ } | {
3248
+ /** @enum {string} */
3249
+ model: "claude-haiku-4-5";
3250
+ };
3222
3251
  master_prompt_name?: string;
3223
3252
  master_prompt_version?: number;
3224
3253
  };
@@ -3359,6 +3388,20 @@ declare interface operations {
3359
3388
  /** @description Detailed steps or description of what the task will do */
3360
3389
  description?: string;
3361
3390
  }[] | null;
3391
+ model_config?: {
3392
+ /** @enum {string} */
3393
+ model: "gemini-3.1-pro-preview";
3394
+ /** @enum {string} */
3395
+ thinking?: "low" | "high";
3396
+ } | {
3397
+ /** @enum {string} */
3398
+ model: "claude-sonnet-4-6" | "claude-opus-4-6";
3399
+ /** @enum {string} */
3400
+ effort?: "low" | "medium" | "high";
3401
+ } | {
3402
+ /** @enum {string} */
3403
+ model: "claude-haiku-4-5";
3404
+ } | null;
3362
3405
  master_prompt_name?: string | null;
3363
3406
  master_prompt_version?: number | null;
3364
3407
  };
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ var addApiKeyHeader = (apiKey) => {
58
58
 
59
59
  // package.json
60
60
  var package_default = {
61
- version: "0.11.3"};
61
+ version: "0.11.4"};
62
62
 
63
63
  // src/core/MageMetricsEventEmitter.ts
64
64
  var MageMetricsEventEmitter = class {
@@ -152,7 +152,7 @@ var hashString = (value) => {
152
152
  return Array.from(hash).map((b) => b.toString(16).padStart(2, "0")).join("");
153
153
  };
154
154
 
155
- // ../../node_modules/.pnpm/@asteasolutions+zod-to-openapi@8.1.0_zod@4.3.6/node_modules/@asteasolutions/zod-to-openapi/dist/index.mjs
155
+ // ../../node_modules/.pnpm/@asteasolutions+zod-to-openapi@8.4.1_zod@4.3.6/node_modules/@asteasolutions/zod-to-openapi/dist/index.mjs
156
156
  function __rest(s, e) {
157
157
  var t = {};
158
158
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -170,9 +170,11 @@ var ZodTypeKeys = {
170
170
  ZodBigInt: "bigint",
171
171
  ZodBoolean: "boolean",
172
172
  ZodDefault: "default",
173
+ ZodPrefault: "prefault",
173
174
  ZodTransform: "transform",
174
175
  ZodEnum: "enum",
175
176
  ZodIntersection: "intersection",
177
+ ZodLazy: "lazy",
176
178
  ZodLiteral: "literal",
177
179
  ZodNever: "never",
178
180
  ZodNull: "null",
@@ -191,7 +193,8 @@ var ZodTypeKeys = {
191
193
  ZodDiscriminatedUnion: "union",
192
194
  ZodUnknown: "unknown",
193
195
  ZodVoid: "void",
194
- ZodDate: "date"
196
+ ZodDate: "date",
197
+ ZodTemplateLiteral: "template_literal"
195
198
  };
196
199
  function isZodType(schema, typeNames) {
197
200
  const typeNamesArray = Array.isArray(typeNames) ? typeNames : [typeNames];
@@ -205,7 +208,7 @@ function isZodType(schema, typeNames) {
205
208
  });
206
209
  }
207
210
  function isAnyZodType(schema) {
208
- return "def" in schema;
211
+ return schema && "def" in schema;
209
212
  }
210
213
  var $ZodRegistry = class {
211
214
  constructor() {
@@ -284,6 +287,7 @@ var Metadata = class {
284
287
  "ZodOptional",
285
288
  "ZodNullable",
286
289
  "ZodDefault",
290
+ "ZodPrefault",
287
291
  "ZodReadonly",
288
292
  "ZodNonOptional"
289
293
  ]) && isAnyZodType(schema._zod.def.innerType)) {
@@ -344,7 +348,8 @@ var Metadata = class {
344
348
  return this.unwrapUntil(schema);
345
349
  }
346
350
  static getDefaultValue(zodSchema) {
347
- const unwrapped = this.unwrapUntil(zodSchema, "ZodDefault");
351
+ var _a;
352
+ const unwrapped = (_a = this.unwrapUntil(zodSchema, "ZodDefault")) !== null && _a !== void 0 ? _a : this.unwrapUntil(zodSchema, "ZodPrefault");
348
353
  return unwrapped === null || unwrapped === void 0 ? void 0 : unwrapped._zod.def.defaultValue;
349
354
  }
350
355
  static unwrapUntil(schema, typeName) {
@@ -355,6 +360,7 @@ var Metadata = class {
355
360
  "ZodOptional",
356
361
  "ZodNullable",
357
362
  "ZodDefault",
363
+ "ZodPrefault",
358
364
  "ZodReadonly",
359
365
  "ZodNonOptional"
360
366
  ]) && isAnyZodType(schema._zod.def.innerType)) {
@@ -417,7 +423,13 @@ function extendZodWithOpenApi(zod) {
417
423
  param: Object.assign(Object.assign({}, currentMetadata === null || currentMetadata === void 0 ? void 0 : currentMetadata.param), param)
418
424
  } : void 0);
419
425
  const result = new this.constructor(this._def);
420
- Metadata.setMetadataInRegistry(result, Object.assign(Object.assign({}, Object.keys(_internal).length > 0 ? { _internal } : void 0), resultMetadata));
426
+ function setMetadata(schema) {
427
+ Metadata.setMetadataInRegistry(schema, Object.assign(Object.assign({}, Object.keys(_internal).length > 0 ? { _internal } : void 0), resultMetadata));
428
+ }
429
+ setMetadata(result);
430
+ if (isZodType(result, "ZodLazy")) {
431
+ setMetadata(this);
432
+ }
421
433
  if (isZodType(result, "ZodObject")) {
422
434
  const currentMetadata2 = Metadata.getMetadataFromRegistry(result);
423
435
  const originalExtend = result.extend;
@@ -470,7 +482,7 @@ function getOpenApiConfiguration(refOrOpenapi, metadataOrOptions, options) {
470
482
  };
471
483
  }
472
484
 
473
- // ../../node_modules/.pnpm/hono@4.11.10/node_modules/hono/dist/router/reg-exp-router/node.js
485
+ // ../../node_modules/.pnpm/hono@4.12.4/node_modules/hono/dist/router/reg-exp-router/node.js
474
486
  new Set(".\\+*[^]$()");
475
487
  var createRoute = (routeConfig) => {
476
488
  const route = {
@@ -627,7 +639,7 @@ var ExternalAuthProvider = class {
627
639
  supabaseClient = null;
628
640
  noAuthApiClient = null;
629
641
  authApiResponse = null;
630
- processedJwt = Symbol("initial");
642
+ processedJwt = /* @__PURE__ */ Symbol("initial");
631
643
  userId = null;
632
644
  events = new MageMetricsEventEmitter();
633
645
  constructor(config) {
@@ -669,7 +681,7 @@ var ExternalAuthProvider = class {
669
681
  async updateExternalJwt(jwt) {
670
682
  if (this.config.externalJwt === jwt) return;
671
683
  this.config.externalJwt = jwt;
672
- this.processedJwt = Symbol("updating");
684
+ this.processedJwt = /* @__PURE__ */ Symbol("updating");
673
685
  await this.initialize();
674
686
  }
675
687
  async logout() {