visual-ai-assertions 0.7.0 → 0.7.2

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.cts CHANGED
@@ -1,5 +1,14 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ /** Supported reasoning effort levels. */
4
+ declare const ReasoningEffort: {
5
+ readonly LOW: "low";
6
+ readonly MEDIUM: "medium";
7
+ readonly HIGH: "high";
8
+ readonly XHIGH: "xhigh";
9
+ };
10
+ /** Union of valid reasoning effort values, derived from the ReasoningEffort constant. */
11
+ type ReasoningEffortLevel = (typeof ReasoningEffort)[keyof typeof ReasoningEffort];
3
12
  /** Supported provider identifiers used internally for pricing and provider selection. */
4
13
  declare const Provider: {
5
14
  readonly ANTHROPIC: "anthropic";
@@ -407,8 +416,6 @@ type ImageInput = Buffer | Uint8Array | string;
407
416
  type SupportedMimeType = "image/jpeg" | "image/png" | "image/webp" | "image/gif";
408
417
  /** Supported provider identifiers. */
409
418
  type ProviderName = "anthropic" | "openai" | "google";
410
- /** Optional reasoning depth requested from providers that support it. */
411
- type ReasoningEffort = "low" | "medium" | "high" | "xhigh";
412
419
  /**
413
420
  * Configuration for creating a visual AI client.
414
421
  *
@@ -430,7 +437,7 @@ interface VisualAIConfig {
430
437
  /** Log responses to stderr. */
431
438
  debugResponse?: boolean;
432
439
  maxTokens?: number;
433
- reasoningEffort?: ReasoningEffort;
440
+ reasoningEffort?: ReasoningEffortLevel;
434
441
  trackUsage?: boolean;
435
442
  }
436
443
  /** Optional instructions for `check()`. */
@@ -879,4 +886,4 @@ declare function assertVisualResult(result: CheckResult, label?: string): void;
879
886
  */
880
887
  declare function assertVisualCompareResult(result: CompareResult, label?: string): void;
881
888
 
882
- export { Accessibility, type AccessibilityCheckName, type AccessibilityOptions, type AskOptions, type AskResult, AskResultSchema, type ChangeEntry, ChangeEntrySchema, type CheckOptions, type CheckResult, CheckResultSchema, type CompareOptions, type CompareResult, CompareResultSchema, type Confidence, ConfidenceSchema, Content, type ContentCheckName, type ContentOptions, DEFAULT_MODELS, type DiffImageResult, type ElementsVisibilityOptions, type ImageInput, type Issue, type IssueCategory, IssueCategorySchema, type IssuePriority, IssuePrioritySchema, IssueSchema, type KnownModelName, Layout, type LayoutCheckName, type LayoutOptions, Model, type PageLoadOptions, Provider, type ProviderName, type ReasoningEffort, type StatementResult, StatementResultSchema, type SupportedMimeType, type UsageInfo, UsageInfoSchema, VisualAIAssertionError, VisualAIAuthError, type VisualAIClient, type VisualAIConfig, VisualAIConfigError, VisualAIError, type VisualAIErrorCode, VisualAIImageError, type VisualAIKnownError, VisualAIProviderError, VisualAIRateLimitError, VisualAIResponseParseError, VisualAITruncationError, assertVisualCompareResult, assertVisualResult, formatCheckResult, formatCompareResult, isVisualAIKnownError, visualAI };
889
+ export { Accessibility, type AccessibilityCheckName, type AccessibilityOptions, type AskOptions, type AskResult, AskResultSchema, type ChangeEntry, ChangeEntrySchema, type CheckOptions, type CheckResult, CheckResultSchema, type CompareOptions, type CompareResult, CompareResultSchema, type Confidence, ConfidenceSchema, Content, type ContentCheckName, type ContentOptions, DEFAULT_MODELS, type DiffImageResult, type ElementsVisibilityOptions, type ImageInput, type Issue, type IssueCategory, IssueCategorySchema, type IssuePriority, IssuePrioritySchema, IssueSchema, type KnownModelName, Layout, type LayoutCheckName, type LayoutOptions, Model, type PageLoadOptions, Provider, type ProviderName, ReasoningEffort, type ReasoningEffortLevel, type StatementResult, StatementResultSchema, type SupportedMimeType, type UsageInfo, UsageInfoSchema, VisualAIAssertionError, VisualAIAuthError, type VisualAIClient, type VisualAIConfig, VisualAIConfigError, VisualAIError, type VisualAIErrorCode, VisualAIImageError, type VisualAIKnownError, VisualAIProviderError, VisualAIRateLimitError, VisualAIResponseParseError, VisualAITruncationError, assertVisualCompareResult, assertVisualResult, formatCheckResult, formatCompareResult, isVisualAIKnownError, visualAI };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ /** Supported reasoning effort levels. */
4
+ declare const ReasoningEffort: {
5
+ readonly LOW: "low";
6
+ readonly MEDIUM: "medium";
7
+ readonly HIGH: "high";
8
+ readonly XHIGH: "xhigh";
9
+ };
10
+ /** Union of valid reasoning effort values, derived from the ReasoningEffort constant. */
11
+ type ReasoningEffortLevel = (typeof ReasoningEffort)[keyof typeof ReasoningEffort];
3
12
  /** Supported provider identifiers used internally for pricing and provider selection. */
4
13
  declare const Provider: {
5
14
  readonly ANTHROPIC: "anthropic";
@@ -407,8 +416,6 @@ type ImageInput = Buffer | Uint8Array | string;
407
416
  type SupportedMimeType = "image/jpeg" | "image/png" | "image/webp" | "image/gif";
408
417
  /** Supported provider identifiers. */
409
418
  type ProviderName = "anthropic" | "openai" | "google";
410
- /** Optional reasoning depth requested from providers that support it. */
411
- type ReasoningEffort = "low" | "medium" | "high" | "xhigh";
412
419
  /**
413
420
  * Configuration for creating a visual AI client.
414
421
  *
@@ -430,7 +437,7 @@ interface VisualAIConfig {
430
437
  /** Log responses to stderr. */
431
438
  debugResponse?: boolean;
432
439
  maxTokens?: number;
433
- reasoningEffort?: ReasoningEffort;
440
+ reasoningEffort?: ReasoningEffortLevel;
434
441
  trackUsage?: boolean;
435
442
  }
436
443
  /** Optional instructions for `check()`. */
@@ -879,4 +886,4 @@ declare function assertVisualResult(result: CheckResult, label?: string): void;
879
886
  */
880
887
  declare function assertVisualCompareResult(result: CompareResult, label?: string): void;
881
888
 
882
- export { Accessibility, type AccessibilityCheckName, type AccessibilityOptions, type AskOptions, type AskResult, AskResultSchema, type ChangeEntry, ChangeEntrySchema, type CheckOptions, type CheckResult, CheckResultSchema, type CompareOptions, type CompareResult, CompareResultSchema, type Confidence, ConfidenceSchema, Content, type ContentCheckName, type ContentOptions, DEFAULT_MODELS, type DiffImageResult, type ElementsVisibilityOptions, type ImageInput, type Issue, type IssueCategory, IssueCategorySchema, type IssuePriority, IssuePrioritySchema, IssueSchema, type KnownModelName, Layout, type LayoutCheckName, type LayoutOptions, Model, type PageLoadOptions, Provider, type ProviderName, type ReasoningEffort, type StatementResult, StatementResultSchema, type SupportedMimeType, type UsageInfo, UsageInfoSchema, VisualAIAssertionError, VisualAIAuthError, type VisualAIClient, type VisualAIConfig, VisualAIConfigError, VisualAIError, type VisualAIErrorCode, VisualAIImageError, type VisualAIKnownError, VisualAIProviderError, VisualAIRateLimitError, VisualAIResponseParseError, VisualAITruncationError, assertVisualCompareResult, assertVisualResult, formatCheckResult, formatCompareResult, isVisualAIKnownError, visualAI };
889
+ export { Accessibility, type AccessibilityCheckName, type AccessibilityOptions, type AskOptions, type AskResult, AskResultSchema, type ChangeEntry, ChangeEntrySchema, type CheckOptions, type CheckResult, CheckResultSchema, type CompareOptions, type CompareResult, CompareResultSchema, type Confidence, ConfidenceSchema, Content, type ContentCheckName, type ContentOptions, DEFAULT_MODELS, type DiffImageResult, type ElementsVisibilityOptions, type ImageInput, type Issue, type IssueCategory, IssueCategorySchema, type IssuePriority, IssuePrioritySchema, IssueSchema, type KnownModelName, Layout, type LayoutCheckName, type LayoutOptions, Model, type PageLoadOptions, Provider, type ProviderName, ReasoningEffort, type ReasoningEffortLevel, type StatementResult, StatementResultSchema, type SupportedMimeType, type UsageInfo, UsageInfoSchema, VisualAIAssertionError, VisualAIAuthError, type VisualAIClient, type VisualAIConfig, VisualAIConfigError, VisualAIError, type VisualAIErrorCode, VisualAIImageError, type VisualAIKnownError, VisualAIProviderError, VisualAIRateLimitError, VisualAIResponseParseError, VisualAITruncationError, assertVisualCompareResult, assertVisualResult, formatCheckResult, formatCompareResult, isVisualAIKnownError, visualAI };
package/dist/index.js CHANGED
@@ -1,4 +1,10 @@
1
1
  // src/constants.ts
2
+ var ReasoningEffort = {
3
+ LOW: "low",
4
+ MEDIUM: "medium",
5
+ HIGH: "high",
6
+ XHIGH: "xhigh"
7
+ };
2
8
  var Provider = {
3
9
  ANTHROPIC: "anthropic",
4
10
  OPENAI: "openai",
@@ -666,11 +672,9 @@ var OpenAIDriver = class {
666
672
  try {
667
673
  const format = options?.responseSchema ? {
668
674
  type: "json_schema",
669
- json_schema: {
670
- name: "visual_ai_response",
671
- strict: true,
672
- schema: options.responseSchema
673
- }
675
+ name: "visual_ai_response",
676
+ strict: true,
677
+ schema: options.responseSchema
674
678
  } : { type: "json_object" };
675
679
  const requestParams = {
676
680
  model: this.model,
@@ -1479,6 +1483,7 @@ export {
1479
1483
  Layout,
1480
1484
  Model,
1481
1485
  Provider,
1486
+ ReasoningEffort,
1482
1487
  StatementResultSchema,
1483
1488
  UsageInfoSchema,
1484
1489
  VisualAIAssertionError,