@prophecy-dev/sdk 0.1.0 → 0.1.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.
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Market defaults — centralised constants for market generation, validation,
3
+ * and publishing. Every value is exported individually so partners can
4
+ * cherry-pick, and also bundled into typed config objects for convenience.
5
+ */
6
+ export declare const CATEGORIES: readonly ["crypto", "sport", "pop_culture", "technology", "politics", "science", "entertainment"];
7
+ export type MarketCategory = (typeof CATEGORIES)[number];
8
+ export declare const DEFAULT_CATEGORY: MarketCategory;
9
+ export declare const ENTITY_TYPES: readonly ["country", "person", "company", "team", "crypto", "topic"];
10
+ export type EntityType = (typeof ENTITY_TYPES)[number];
11
+ /** Minimum virality score (1-10) for a market to be published. */
12
+ export declare const VIRALITY_THRESHOLD = 6;
13
+ /** Minimum resolution-URL confidence (1-10) for a market to be published. */
14
+ export declare const RESOLUTION_CONFIDENCE_THRESHOLD = 4;
15
+ /** Embedding cosine-similarity threshold for duplicate detection (0-1). */
16
+ export declare const SIMILARITY_THRESHOLD = 0.85;
17
+ /** Default duration in hours when the LLM doesn't provide one. */
18
+ export declare const DEFAULT_DURATION_HOURS = 168;
19
+ /** Minimum allowed market duration in hours. */
20
+ export declare const MIN_DURATION_HOURS = 1;
21
+ /** Maximum allowed market duration in hours. */
22
+ export declare const MAX_DURATION_HOURS = 720;
23
+ /** Binary market probability floor. */
24
+ export declare const MIN_BINARY_PROBABILITY = 0.05;
25
+ /** Binary market probability ceiling. */
26
+ export declare const MAX_BINARY_PROBABILITY = 0.95;
27
+ /** Multi-outcome per-option probability floor. */
28
+ export declare const MIN_OPTION_PROBABILITY = 0.02;
29
+ /** Multi-outcome per-option probability ceiling. */
30
+ export declare const MAX_OPTION_PROBABILITY = 0.95;
31
+ /** Default initial liquidity per option, in ETH units. */
32
+ export declare const DEFAULT_LIQUIDITY = "100";
33
+ /** Seconds before trading starts (buffer after creation tx). */
34
+ export declare const DEFAULT_TRADING_START_BUFFER_SECONDS = 60;
35
+ /** Default resolution window in hours after trading ends. */
36
+ export declare const DEFAULT_RESOLUTION_HOURS = 1;
37
+ /** Maximum number of active markets before the pipeline stops creating new ones. */
38
+ export declare const ACTIVE_MARKET_CAP = 5000;
39
+ /**
40
+ * Domains that always fail resolution (JS-rendered, auth walls, unreliable).
41
+ * Exported as a plain array so partners can spread + extend.
42
+ */
43
+ export declare const BANNED_DOMAINS: readonly ["x.com", "twitter.com", "charts.spotify.com", "xtracker.polymarket.com", "www.youtube.com", "youtube.com", "www.espncricinfo.com", "espncricinfo.com", "liquipedia.net", "www.dotabuff.com", "dotabuff.com", "www.premierleague.com", "premierleague.com", "gol.gg", "www.gol.gg"];
44
+ export type BannedDomain = (typeof BANNED_DOMAINS)[number];
45
+ export declare const DURATION_HINTS: Record<string, string>;
46
+ /** @internal */
47
+ export declare const VIRALITY_RUBRIC: {
48
+ readonly '9-10': "massive global interest (Super Bowl, elections)";
49
+ readonly '7-8': "mainstream (top-20 crypto, major sports leagues, significant news)";
50
+ readonly '5-6': "niche interest";
51
+ readonly '1-4': "very low interest";
52
+ };
53
+ /** @internal */
54
+ export declare const RESOLUTION_CONFIDENCE_RUBRIC: {
55
+ readonly '9-10': "URL always contains the answer (CoinGecko, ESPN scoreboard)";
56
+ readonly '7-8': "URL very likely has the answer (major news, official standings)";
57
+ readonly '4-6': "uncertain (general news, social media)";
58
+ readonly '1-3': "unlikely to have a clear answer";
59
+ };
60
+ /** @internal */
61
+ export declare const CONFIDENCE_TIERS: {
62
+ readonly explicit: {
63
+ readonly min: 0.9;
64
+ readonly max: 1;
65
+ readonly label: "URL explicitly states the outcome";
66
+ };
67
+ readonly strong: {
68
+ readonly min: 0.5;
69
+ readonly max: 0.8;
70
+ readonly label: "Strong but indirect evidence";
71
+ };
72
+ readonly tangential: {
73
+ readonly min: 0.1;
74
+ readonly max: 0.4;
75
+ readonly label: "Tangentially related content";
76
+ };
77
+ readonly none: {
78
+ readonly min: 0;
79
+ readonly max: 0.1;
80
+ readonly label: "No relevant information — UNKNOWN";
81
+ };
82
+ };
83
+ /** Confidence below this forces UNKNOWN regardless of LLM output. */
84
+ export declare const LOW_CONFIDENCE_OVERRIDE = 0.6;
85
+ /** @internal */
86
+ export declare const PROBABILITY_CALIBRATION: {
87
+ readonly frontrunner: {
88
+ readonly min: 0.1;
89
+ readonly max: 0.3;
90
+ };
91
+ readonly midfield: {
92
+ readonly min: 0.02;
93
+ readonly max: 0.08;
94
+ };
95
+ readonly backmarker: {
96
+ readonly min: 0.002;
97
+ readonly max: 0.02;
98
+ };
99
+ };
100
+ /** All defaults as a single object — easy to spread and override. */
101
+ export declare const MARKET_DEFAULTS: {
102
+ readonly categories: readonly ["crypto", "sport", "pop_culture", "technology", "politics", "science", "entertainment"];
103
+ readonly defaultCategory: "politics";
104
+ readonly entityTypes: readonly ["country", "person", "company", "team", "crypto", "topic"];
105
+ readonly viralityThreshold: 6;
106
+ readonly resolutionConfidenceThreshold: 4;
107
+ readonly similarityThreshold: 0.85;
108
+ readonly defaultDurationHours: 168;
109
+ readonly minDurationHours: 1;
110
+ readonly maxDurationHours: 720;
111
+ readonly minBinaryProbability: 0.05;
112
+ readonly maxBinaryProbability: 0.95;
113
+ readonly minOptionProbability: 0.02;
114
+ readonly maxOptionProbability: 0.95;
115
+ readonly defaultLiquidity: "100";
116
+ readonly defaultTradingStartBufferSeconds: 60;
117
+ readonly defaultResolutionHours: 1;
118
+ readonly activeMarketCap: 5000;
119
+ readonly bannedDomains: readonly ["x.com", "twitter.com", "charts.spotify.com", "xtracker.polymarket.com", "www.youtube.com", "youtube.com", "www.espncricinfo.com", "espncricinfo.com", "liquipedia.net", "www.dotabuff.com", "dotabuff.com", "www.premierleague.com", "premierleague.com", "gol.gg", "www.gol.gg"];
120
+ readonly durationHints: Record<string, string>;
121
+ readonly lowConfidenceOverride: 0.6;
122
+ };
123
+ export type MarketDefaultsConfig = typeof MARKET_DEFAULTS;
124
+ //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AAEV,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAM1D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKjD,CAAA;AAUD,gBAAgB;AAChB,eAAO,MAAM,eAAe;;;;;CAKlB,CAAA;AAEV,gBAAgB;AAChB,eAAO,MAAM,4BAA4B;;;;;CAK/B,CAAA;AAEV,gBAAgB;AAChB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;CAKnB,CAAA;AAEV,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,MAAM,CAAA;AAE1C,gBAAgB;AAChB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;CAI1B,CAAA;AAMV,qEAAqE;AACrE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;CAqBlB,CAAA;AAEV,MAAM,MAAM,oBAAoB,GAAG,OAAO,eAAe,CAAA"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Prompt builders for every LLM use-case in the Prophecy market lifecycle.
3
+ *
4
+ * Each builder accepts an optional partial config so callers can override
5
+ * specific sections while keeping sensible defaults. The returned string
6
+ * is the system prompt — pass it straight to your LLM provider.
7
+ */
8
+ import { CONFIDENCE_TIERS, PROBABILITY_CALIBRATION } from './market-defaults';
9
+ export interface MarketGenerationPromptConfig {
10
+ /** Extra instructions appended to the system prompt. */
11
+ extraInstructions?: string;
12
+ /** Override the list of valid categories. */
13
+ categories?: readonly string[];
14
+ /** Default suggested duration in hours. */
15
+ defaultDurationHours?: number;
16
+ /** URL guidance block appended to the prompt. */
17
+ urlGuidance?: string;
18
+ /** Override banned domains list. */
19
+ bannedDomains?: readonly string[];
20
+ }
21
+ export declare function buildMarketGenerationPrompt(overrides?: Partial<MarketGenerationPromptConfig>): string;
22
+ export interface ReframePromptConfig {
23
+ categories?: readonly string[];
24
+ durationHints?: Record<string, string>;
25
+ bannedDomains?: readonly string[];
26
+ extraInstructions?: string;
27
+ }
28
+ export declare function buildReframePrompt(overrides?: Partial<ReframePromptConfig>): string;
29
+ export interface GroupingPromptConfig {
30
+ minOptions?: number;
31
+ maxOptions?: number;
32
+ extraInstructions?: string;
33
+ }
34
+ export declare function buildGroupingPrompt(overrides?: Partial<GroupingPromptConfig>): string;
35
+ export interface ResolutionEvalPromptConfig {
36
+ confidenceTiers?: typeof CONFIDENCE_TIERS;
37
+ lowConfidenceOverride?: number;
38
+ extraInstructions?: string;
39
+ }
40
+ export declare function buildResolutionEvalPrompt(overrides?: Partial<ResolutionEvalPromptConfig>): string;
41
+ export interface CarouselPromptConfig {
42
+ maxSlots?: number;
43
+ extraCriteria?: string;
44
+ extraInstructions?: string;
45
+ }
46
+ export declare function buildCarouselPrompt(overrides?: Partial<CarouselPromptConfig>): string;
47
+ export interface ProbabilityEstimationPromptConfig {
48
+ calibration?: typeof PROBABILITY_CALIBRATION;
49
+ extraInstructions?: string;
50
+ }
51
+ export declare function buildProbabilityEstimationPrompt(overrides?: Partial<ProbabilityEstimationPromptConfig>): string;
52
+ export interface EntityExtractionPromptConfig {
53
+ entityTypes?: readonly string[];
54
+ maxEntities?: number;
55
+ extraInstructions?: string;
56
+ }
57
+ export declare function buildEntityExtractionPrompt(overrides?: Partial<EntityExtractionPromptConfig>): string;
58
+ export interface NewsContextPromptConfig {
59
+ maxArticles?: number;
60
+ preferredSources?: string[];
61
+ extraInstructions?: string;
62
+ }
63
+ export declare function buildNewsContextPrompt(overrides?: Partial<NewsContextPromptConfig>): string;
64
+ export interface UrlGuidanceConfig {
65
+ bannedDomains?: readonly string[];
66
+ extraGuidance?: string;
67
+ }
68
+ export declare function buildUrlGuidanceBlock(overrides?: Partial<UrlGuidanceConfig>): string;
69
+ //# sourceMappingURL=market-prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"market-prompts.d.ts","sourceRoot":"","sources":["../src/market-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAG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 /**
2
+ * Market validation utilities — shared logic for clamping, URL checks,
3
+ * and LLM response parsing.
4
+ *
5
+ * These are the pure functions that prophecy-social currently has spread
6
+ * across market-types.ts, url-validation.ts, and market-pipeline.ts.
7
+ * Partners can use them directly or through the higher-level prompt builders.
8
+ */
9
+ /**
10
+ * Clamp a duration value to the allowed range.
11
+ * Returns the default if the input is not a finite number.
12
+ */
13
+ export declare function clampDuration(hours: unknown, opts?: {
14
+ min?: number;
15
+ max?: number;
16
+ fallback?: number;
17
+ }): number;
18
+ /**
19
+ * Clamp a binary (YES/NO) probability to the allowed range.
20
+ */
21
+ export declare function clampBinaryProbability(p: number, opts?: {
22
+ min?: number;
23
+ max?: number;
24
+ }): number;
25
+ /**
26
+ * Clamp each option probability and normalise so the array sums to 1.0.
27
+ */
28
+ export declare function normalizeOptionProbabilities(probs: number[], opts?: {
29
+ min?: number;
30
+ max?: number;
31
+ }): number[];
32
+ /**
33
+ * Returns true if the string is a valid http(s) URL.
34
+ */
35
+ export declare function isValidUrl(url: string): boolean;
36
+ /**
37
+ * Returns true if the URL's hostname is in the banned list.
38
+ * Accepts an optional custom banned list (defaults to SDK's BANNED_DOMAINS).
39
+ */
40
+ export declare function isBannedDomain(url: string, bannedList?: readonly string[]): boolean;
41
+ /**
42
+ * Generate a Google News search fallback URL from a market question.
43
+ */
44
+ export declare function googleNewsFallbackUrl(question: string): string;
45
+ export type GeneratedMarketBase = {
46
+ question: string;
47
+ description: string;
48
+ resolution_criteria: string;
49
+ prompt: string;
50
+ options: string[];
51
+ expected_result: string;
52
+ category: string;
53
+ subcategory: string;
54
+ tags: string[];
55
+ suggested_duration_hours: number;
56
+ source_references: string[];
57
+ };
58
+ /**
59
+ * Parse an LLM JSON response into a GeneratedMarketBase.
60
+ *
61
+ * Handles markdown code fences, trailing text, unescaped newlines,
62
+ * and trailing commas — all common LLM quirks.
63
+ *
64
+ * Returns the typed base plus the raw parsed record for callers
65
+ * that need to access extra fields (virality_score, etc.).
66
+ */
67
+ export declare function parseLlmMarketJson(responseText: string): GeneratedMarketBase & {
68
+ _raw: Record<string, unknown>;
69
+ };
70
+ //# sourceMappingURL=market-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"market-validation.d.ts","sourceRoot":"","sources":["../src/market-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAkBH;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,OAAO,EACd,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GACvD,MAAM,CAMR;AAMD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAI/F;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,MAAM,EAAE,CAQV;AAMD;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAO/C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAQnF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAO9D;AAMD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,wBAAwB,EAAE,MAAM,CAAA;IAChC,iBAAiB,EAAE,MAAM,EAAE,CAAA;CAC5B,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,MAAM,GACnB,mBAAmB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CA+EzD"}
package/dist/markets.d.ts CHANGED
@@ -21,7 +21,7 @@ export interface MarketData {
21
21
  [key: string]: unknown;
22
22
  }
23
23
  export interface SearchMarketsParams {
24
- query?: string;
24
+ q?: string;
25
25
  status?: string[];
26
26
  venue?: string;
27
27
  sort?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"markets.d.ts","sourceRoot":"","sources":["../src/markets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAKpC,MAAM,WAAW,UAAU;IACzB,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,CAAC,GAAG,EAAE,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,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,MAAM,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,UAAU,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC7F,6DAA6D;IAC7D,GAAG,CAAC,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;CACpE;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,gBAAgB,CAgCzF"}
package/package.json CHANGED
@@ -1,62 +1,62 @@
1
- {
2
- "name": "@prophecy-dev/sdk",
3
- "version": "0.1.0",
4
- "description": "Prophecy SDK — market creation, LLM, permits, chain, Arbiter client",
5
- "type": "module",
6
- "license": "MIT",
7
- "publishConfig": {
8
- "registry": "https://registry.npmjs.org/",
9
- "access": "restricted"
10
- },
11
- "main": "./dist/index.cjs",
12
- "module": "./dist/index.js",
13
- "types": "./dist/index.d.ts",
14
- "exports": {
15
- ".": {
16
- "types": "./dist/index.d.ts",
17
- "import": "./dist/index.js",
18
- "require": "./dist/index.cjs"
19
- }
20
- },
21
- "files": [
22
- "dist"
23
- ],
24
- "scripts": {
25
- "dev": "tsx build.ts --watch",
26
- "build": "tsc --project tsconfig.build.json && tsx build.ts",
27
- "test": "vitest run",
28
- "test:unit": "vitest run"
29
- },
30
- "dependencies": {
31
- "@prophecy-dev/types": "*",
32
- "ai": "4.3.16",
33
- "viem": "2.47.4",
34
- "zod": "3.25.67"
35
- },
36
- "peerDependencies": {
37
- "@ai-sdk/google-vertex": ">=2.0.0",
38
- "@ai-sdk/openai": ">=1.0.0",
39
- "@ai-sdk/anthropic": ">=1.0.0",
40
- "@ai-sdk/google": ">=1.0.0"
41
- },
42
- "peerDependenciesMeta": {
43
- "@ai-sdk/google-vertex": {
44
- "optional": true
45
- },
46
- "@ai-sdk/openai": {
47
- "optional": true
48
- },
49
- "@ai-sdk/anthropic": {
50
- "optional": true
51
- },
52
- "@ai-sdk/google": {
53
- "optional": true
54
- }
55
- },
56
- "devDependencies": {
57
- "esbuild": "0.27.3",
58
- "tsx": "4.21.0",
59
- "typescript": "5.9.3",
60
- "vitest": "4.0.18"
61
- }
62
- }
1
+ {
2
+ "name": "@prophecy-dev/sdk",
3
+ "version": "0.1.2",
4
+ "description": "Prophecy SDK — market creation, LLM, permits, chain, Arbiter client",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/",
9
+ "access": "public"
10
+ },
11
+ "main": "./dist/index.cjs",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js",
18
+ "require": "./dist/index.cjs"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "scripts": {
25
+ "dev": "tsx build.ts --watch",
26
+ "build": "tsc --project tsconfig.build.json && tsx build.ts",
27
+ "test": "vitest run",
28
+ "test:unit": "vitest run"
29
+ },
30
+ "dependencies": {
31
+ "@prophecy-dev/types": "*",
32
+ "ai": "4.3.16",
33
+ "viem": "2.47.4",
34
+ "zod": "3.25.67"
35
+ },
36
+ "peerDependencies": {
37
+ "@ai-sdk/google-vertex": ">=2.0.0",
38
+ "@ai-sdk/openai": ">=1.0.0",
39
+ "@ai-sdk/anthropic": ">=1.0.0",
40
+ "@ai-sdk/google": ">=1.0.0"
41
+ },
42
+ "peerDependenciesMeta": {
43
+ "@ai-sdk/google-vertex": {
44
+ "optional": true
45
+ },
46
+ "@ai-sdk/openai": {
47
+ "optional": true
48
+ },
49
+ "@ai-sdk/anthropic": {
50
+ "optional": true
51
+ },
52
+ "@ai-sdk/google": {
53
+ "optional": true
54
+ }
55
+ },
56
+ "devDependencies": {
57
+ "esbuild": "0.27.3",
58
+ "tsx": "4.21.0",
59
+ "typescript": "5.9.3",
60
+ "vitest": "4.0.18"
61
+ }
62
+ }