@abhishek944/pi-embeddings 0.1.0 → 0.2.0

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.
@@ -1,200 +1,343 @@
1
- import { Type } from 'typebox';
2
1
  export declare const EMBED_TOOL = "embed";
3
2
  export declare const EMBED_COMPARE_TOOL = "embed_compare";
4
- export declare const EMBEDDINGS_DESCRIBE_TOOL = "embeddings_describe";
5
3
  export declare const EMBED_TOOL_DESCRIPTION = "Embed one or more text inputs with the server-configured embedding route. Provider, model, fallback routes and credentials stay in trusted settings; this tool cannot override them. Returns vectors and their actual generating space as structured data. Full text is preserved; the package owns prefixing and provider batching. Use embed_compare only for an explicit comparison.";
6
4
  export declare const EMBED_COMPARE_TOOL_DESCRIPTION = "Explicitly compare the same text inputs using exactly the configured compare routes. Every entry is a separate request and may incur charges. No implicit default, fallback, ranking or settings mutation.";
7
- export declare const EMBEDDINGS_DESCRIBE_TOOL_DESCRIPTION = "Report the selected configured embedding route, generating space and provider-free readiness diagnostics without inference or credentials. Information is not a reservation or a caller storage policy.";
8
- export declare const embedParameters: Type.TObject<{
9
- inputs: Type.TArray<Type.TString>;
5
+ export declare const embedParameters: import("typebox").TObject<{
6
+ inputs: import("typebox").TArray<import("typebox").TString>;
10
7
  }>;
11
- export declare const embedCompareParameters: Type.TObject<{
12
- inputs: Type.TArray<Type.TString>;
8
+ export declare const embedCompareParameters: import("typebox").TObject<{
9
+ inputs: import("typebox").TArray<import("typebox").TString>;
13
10
  }>;
14
- export declare const embeddingsDescribeParameters: Type.TObject<{}>;
15
- export declare const embedOutput: Type.TObject<{
16
- schemaVersion: Type.TLiteral<1>;
17
- outcomes: Type.TArray<Type.TUnion<[Type.TObject<{
18
- status: Type.TLiteral<"success">;
19
- index: Type.TInteger;
20
- vector: Type.TArray<Type.TNumber>;
21
- route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
22
- model: Type.TString;
23
- space: Type.TUnion<[Type.TObject<{
24
- provider: Type.TLiteral<"local">;
25
- model: Type.TLiteral<"embeddinggemma-2">;
26
- revision: Type.TString;
27
- quantization: Type.TLiteral<"Q8_0">;
28
- runtime: Type.TString;
29
- dimensions: Type.TLiteral<768>;
30
- format: Type.TLiteral<"host-display-attributes-v1">;
31
- prefix: Type.TLiteral<"title: none | text: ">;
32
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
33
- }>, Type.TObject<{
34
- provider: Type.TLiteral<"openai">;
35
- model: Type.TLiteral<"text-embedding-3-small">;
36
- revision: Type.TNull;
37
- quantization: Type.TNull;
38
- runtime: Type.TNull;
39
- dimensions: Type.TLiteral<1536>;
40
- format: Type.TLiteral<"host-display-attributes-v1">;
41
- prefix: Type.TLiteral<"title: none | text: ">;
42
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
43
- }>, Type.TObject<{
44
- provider: Type.TLiteral<"sarvam">;
45
- model: Type.TLiteral<"embeddinggemma-2">;
46
- revision: Type.TNull;
47
- quantization: Type.TNull;
48
- runtime: Type.TLiteral<"sarvam-v2">;
49
- dimensions: Type.TLiteral<768>;
50
- format: Type.TLiteral<"host-display-attributes-v1">;
51
- prefix: Type.TLiteral<"title: none | text: ">;
52
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
11
+ export declare const embedOutput: import("typebox").TObject<{
12
+ schemaVersion: import("typebox").TLiteral<2>;
13
+ provider: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TLiteral<"local">, import("typebox").TLiteral<"openai">, import("typebox").TLiteral<"sarvam">, import("typebox").TLiteral<"gateway">, import("typebox").TLiteral<"openrouter">, import("typebox").TLiteral<"cloudflare">]>, import("typebox").TNull]>;
14
+ model: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
15
+ space: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TObject<{
16
+ provider: import("typebox").TLiteral<"local">;
17
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
18
+ revision: import("typebox").TString;
19
+ quantization: import("typebox").TLiteral<"Q8_0">;
20
+ runtime: import("typebox").TString;
21
+ dimensions: import("typebox").TLiteral<768>;
22
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
23
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
24
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
25
+ }>, import("typebox").TObject<{
26
+ provider: import("typebox").TLiteral<"openai">;
27
+ model: import("typebox").TLiteral<"text-embedding-3-small">;
28
+ revision: import("typebox").TNull;
29
+ quantization: import("typebox").TNull;
30
+ runtime: import("typebox").TNull;
31
+ dimensions: import("typebox").TLiteral<1536>;
32
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
33
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
34
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
35
+ }>, import("typebox").TObject<{
36
+ provider: import("typebox").TLiteral<"sarvam">;
37
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
38
+ revision: import("typebox").TNull;
39
+ quantization: import("typebox").TNull;
40
+ runtime: import("typebox").TLiteral<"sarvam-v2">;
41
+ dimensions: import("typebox").TLiteral<768>;
42
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
43
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
44
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
45
+ }>, import("typebox").TObject<{
46
+ provider: import("typebox").TLiteral<"cloudflare">;
47
+ model: import("typebox").TLiteral<"@cf/baai/bge-base-en-v1.5">;
48
+ revision: import("typebox").TNull;
49
+ quantization: import("typebox").TNull;
50
+ runtime: import("typebox").TLiteral<"cloudflare-workers-ai">;
51
+ dimensions: import("typebox").TLiteral<768>;
52
+ pooling: import("typebox").TUnion<[import("typebox").TLiteral<"mean">, import("typebox").TLiteral<"cls">]>;
53
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
54
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
55
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
56
+ }>]>, import("typebox").TNull]>;
57
+ generations: import("typebox").TArray<import("typebox").TObject<{
58
+ provider: import("typebox").TUnion<[import("typebox").TLiteral<"local">, import("typebox").TLiteral<"openai">, import("typebox").TLiteral<"sarvam">, import("typebox").TLiteral<"gateway">, import("typebox").TLiteral<"openrouter">, import("typebox").TLiteral<"cloudflare">]>;
59
+ model: import("typebox").TString;
60
+ space: import("typebox").TUnion<[import("typebox").TObject<{
61
+ provider: import("typebox").TLiteral<"local">;
62
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
63
+ revision: import("typebox").TString;
64
+ quantization: import("typebox").TLiteral<"Q8_0">;
65
+ runtime: import("typebox").TString;
66
+ dimensions: import("typebox").TLiteral<768>;
67
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
68
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
69
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
70
+ }>, import("typebox").TObject<{
71
+ provider: import("typebox").TLiteral<"openai">;
72
+ model: import("typebox").TLiteral<"text-embedding-3-small">;
73
+ revision: import("typebox").TNull;
74
+ quantization: import("typebox").TNull;
75
+ runtime: import("typebox").TNull;
76
+ dimensions: import("typebox").TLiteral<1536>;
77
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
78
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
79
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
80
+ }>, import("typebox").TObject<{
81
+ provider: import("typebox").TLiteral<"sarvam">;
82
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
83
+ revision: import("typebox").TNull;
84
+ quantization: import("typebox").TNull;
85
+ runtime: import("typebox").TLiteral<"sarvam-v2">;
86
+ dimensions: import("typebox").TLiteral<768>;
87
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
88
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
89
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
90
+ }>, import("typebox").TObject<{
91
+ provider: import("typebox").TLiteral<"cloudflare">;
92
+ model: import("typebox").TLiteral<"@cf/baai/bge-base-en-v1.5">;
93
+ revision: import("typebox").TNull;
94
+ quantization: import("typebox").TNull;
95
+ runtime: import("typebox").TLiteral<"cloudflare-workers-ai">;
96
+ dimensions: import("typebox").TLiteral<768>;
97
+ pooling: import("typebox").TUnion<[import("typebox").TLiteral<"mean">, import("typebox").TLiteral<"cls">]>;
98
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
99
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
100
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
53
101
  }>]>;
54
- attemptId: Type.TString;
55
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
56
- }>, Type.TObject<{
57
- status: Type.TLiteral<"error">;
58
- index: Type.TInteger;
59
- code: Type.TUnion<[Type.TLiteral<"configuration-invalid">, Type.TLiteral<"route-unconfigured">, Type.TLiteral<"missing-credentials">, Type.TLiteral<"http-auth">, Type.TLiteral<"http-not-found">, Type.TLiteral<"http-rate-limit">, Type.TLiteral<"http-forbidden">, Type.TLiteral<"http-bad-request">, Type.TLiteral<"http-server-error">, Type.TLiteral<"transport-failed">, Type.TLiteral<"provider-response-invalid">, Type.TLiteral<"provider-response-mismatch">, Type.TLiteral<"vector-invalid">, Type.TLiteral<"vector-zero">, Type.TLiteral<"input-empty">, Type.TLiteral<"input-too-long">, Type.TLiteral<"tokenizer-roundtrip-failed">, Type.TLiteral<"attribution-unavailable">, Type.TLiteral<"local-resources-unavailable">, Type.TLiteral<"local-model-mismatch">, Type.TLiteral<"local-runtime-mismatch">, Type.TLiteral<"local-startup-failed">, Type.TLiteral<"local-cpu-startup-invalid">, Type.TLiteral<"cancelled">, Type.TLiteral<"unstarted">]>;
60
- attemptId: Type.TUnion<[Type.TString, Type.TNull]>;
102
+ }>>;
103
+ outcomes: import("typebox").TArray<import("typebox").TUnion<[import("typebox").TObject<{
104
+ status: import("typebox").TLiteral<"success">;
105
+ index: import("typebox").TInteger;
106
+ vector: import("typebox").TArray<import("typebox").TNumber>;
107
+ route: import("typebox").TUnion<[import("typebox").TLiteral<"local">, import("typebox").TLiteral<"openai">, import("typebox").TLiteral<"sarvam">, import("typebox").TLiteral<"gateway">, import("typebox").TLiteral<"openrouter">, import("typebox").TLiteral<"cloudflare">]>;
108
+ model: import("typebox").TString;
109
+ space: import("typebox").TUnion<[import("typebox").TObject<{
110
+ provider: import("typebox").TLiteral<"local">;
111
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
112
+ revision: import("typebox").TString;
113
+ quantization: import("typebox").TLiteral<"Q8_0">;
114
+ runtime: import("typebox").TString;
115
+ dimensions: import("typebox").TLiteral<768>;
116
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
117
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
118
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
119
+ }>, import("typebox").TObject<{
120
+ provider: import("typebox").TLiteral<"openai">;
121
+ model: import("typebox").TLiteral<"text-embedding-3-small">;
122
+ revision: import("typebox").TNull;
123
+ quantization: import("typebox").TNull;
124
+ runtime: import("typebox").TNull;
125
+ dimensions: import("typebox").TLiteral<1536>;
126
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
127
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
128
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
129
+ }>, import("typebox").TObject<{
130
+ provider: import("typebox").TLiteral<"sarvam">;
131
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
132
+ revision: import("typebox").TNull;
133
+ quantization: import("typebox").TNull;
134
+ runtime: import("typebox").TLiteral<"sarvam-v2">;
135
+ dimensions: import("typebox").TLiteral<768>;
136
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
137
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
138
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
139
+ }>, import("typebox").TObject<{
140
+ provider: import("typebox").TLiteral<"cloudflare">;
141
+ model: import("typebox").TLiteral<"@cf/baai/bge-base-en-v1.5">;
142
+ revision: import("typebox").TNull;
143
+ quantization: import("typebox").TNull;
144
+ runtime: import("typebox").TLiteral<"cloudflare-workers-ai">;
145
+ dimensions: import("typebox").TLiteral<768>;
146
+ pooling: import("typebox").TUnion<[import("typebox").TLiteral<"mean">, import("typebox").TLiteral<"cls">]>;
147
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
148
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
149
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
150
+ }>]>;
151
+ attemptId: import("typebox").TString;
152
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
153
+ }>, import("typebox").TObject<{
154
+ status: import("typebox").TLiteral<"error">;
155
+ index: import("typebox").TInteger;
156
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"configuration-invalid">, import("typebox").TLiteral<"route-unconfigured">, import("typebox").TLiteral<"missing-credentials">, import("typebox").TLiteral<"http-auth">, import("typebox").TLiteral<"http-not-found">, import("typebox").TLiteral<"http-rate-limit">, import("typebox").TLiteral<"http-forbidden">, import("typebox").TLiteral<"http-bad-request">, import("typebox").TLiteral<"http-server-error">, import("typebox").TLiteral<"transport-failed">, import("typebox").TLiteral<"provider-response-invalid">, import("typebox").TLiteral<"provider-response-mismatch">, import("typebox").TLiteral<"vector-invalid">, import("typebox").TLiteral<"vector-zero">, import("typebox").TLiteral<"input-empty">, import("typebox").TLiteral<"input-too-long">, import("typebox").TLiteral<"tokenizer-roundtrip-failed">, import("typebox").TLiteral<"attribution-unavailable">, import("typebox").TLiteral<"local-resources-unavailable">, import("typebox").TLiteral<"local-model-mismatch">, import("typebox").TLiteral<"local-runtime-mismatch">, import("typebox").TLiteral<"local-startup-failed">, import("typebox").TLiteral<"local-cpu-startup-invalid">, import("typebox").TLiteral<"cancelled">, import("typebox").TLiteral<"unstarted">]>;
157
+ attemptId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
61
158
  }>]>>;
62
- attempts: Type.TArray<Type.TObject<{
63
- id: Type.TString;
64
- route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
65
- model: Type.TString;
66
- routeIndex: Type.TInteger;
67
- status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
68
- usage: Type.TUnion<[Type.TObject<{
69
- providerReportedInputTokens: Type.TUnion<[Type.TInteger, Type.TNull]>;
70
- preparedInputTokens: Type.TUnion<[Type.TInteger, Type.TNull]>;
71
- billedTokens: Type.TUnion<[Type.TInteger, Type.TNull]>;
72
- }>, Type.TNull]>;
73
- errorCode: Type.TOptional<Type.TUnion<[Type.TLiteral<"configuration-invalid">, Type.TLiteral<"route-unconfigured">, Type.TLiteral<"missing-credentials">, Type.TLiteral<"http-auth">, Type.TLiteral<"http-not-found">, Type.TLiteral<"http-rate-limit">, Type.TLiteral<"http-forbidden">, Type.TLiteral<"http-bad-request">, Type.TLiteral<"http-server-error">, Type.TLiteral<"transport-failed">, Type.TLiteral<"provider-response-invalid">, Type.TLiteral<"provider-response-mismatch">, Type.TLiteral<"vector-invalid">, Type.TLiteral<"vector-zero">, Type.TLiteral<"input-empty">, Type.TLiteral<"input-too-long">, Type.TLiteral<"tokenizer-roundtrip-failed">, Type.TLiteral<"attribution-unavailable">, Type.TLiteral<"local-resources-unavailable">, Type.TLiteral<"local-model-mismatch">, Type.TLiteral<"local-runtime-mismatch">, Type.TLiteral<"local-startup-failed">, Type.TLiteral<"local-cpu-startup-invalid">, Type.TLiteral<"cancelled">, Type.TLiteral<"unstarted">]>>;
159
+ attempts: import("typebox").TArray<import("typebox").TObject<{
160
+ id: import("typebox").TString;
161
+ route: import("typebox").TUnion<[import("typebox").TLiteral<"local">, import("typebox").TLiteral<"openai">, import("typebox").TLiteral<"sarvam">, import("typebox").TLiteral<"gateway">, import("typebox").TLiteral<"openrouter">, import("typebox").TLiteral<"cloudflare">]>;
162
+ model: import("typebox").TString;
163
+ routeIndex: import("typebox").TInteger;
164
+ status: import("typebox").TUnion<[import("typebox").TLiteral<"success">, import("typebox").TLiteral<"error">, import("typebox").TLiteral<"cancelled">]>;
165
+ usage: import("typebox").TUnion<[import("typebox").TObject<{
166
+ providerReportedInputTokens: import("typebox").TUnion<[import("typebox").TInteger, import("typebox").TNull]>;
167
+ preparedInputTokens: import("typebox").TUnion<[import("typebox").TInteger, import("typebox").TNull]>;
168
+ billedTokens: import("typebox").TUnion<[import("typebox").TInteger, import("typebox").TNull]>;
169
+ }>, import("typebox").TNull]>;
170
+ errorCode: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TLiteral<"configuration-invalid">, import("typebox").TLiteral<"route-unconfigured">, import("typebox").TLiteral<"missing-credentials">, import("typebox").TLiteral<"http-auth">, import("typebox").TLiteral<"http-not-found">, import("typebox").TLiteral<"http-rate-limit">, import("typebox").TLiteral<"http-forbidden">, import("typebox").TLiteral<"http-bad-request">, import("typebox").TLiteral<"http-server-error">, import("typebox").TLiteral<"transport-failed">, import("typebox").TLiteral<"provider-response-invalid">, import("typebox").TLiteral<"provider-response-mismatch">, import("typebox").TLiteral<"vector-invalid">, import("typebox").TLiteral<"vector-zero">, import("typebox").TLiteral<"input-empty">, import("typebox").TLiteral<"input-too-long">, import("typebox").TLiteral<"tokenizer-roundtrip-failed">, import("typebox").TLiteral<"attribution-unavailable">, import("typebox").TLiteral<"local-resources-unavailable">, import("typebox").TLiteral<"local-model-mismatch">, import("typebox").TLiteral<"local-runtime-mismatch">, import("typebox").TLiteral<"local-startup-failed">, import("typebox").TLiteral<"local-cpu-startup-invalid">, import("typebox").TLiteral<"cancelled">, import("typebox").TLiteral<"unstarted">]>>;
74
171
  }>>;
75
172
  }>;
76
- export declare const embedCompareOutput: Type.TObject<{
77
- schemaVersion: Type.TLiteral<1>;
78
- entries: Type.TArray<Type.TObject<{
79
- route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
80
- model: Type.TString;
81
- status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
82
- result: Type.TObject<{
83
- schemaVersion: Type.TLiteral<1>;
84
- outcomes: Type.TArray<Type.TUnion<[Type.TObject<{
85
- status: Type.TLiteral<"success">;
86
- index: Type.TInteger;
87
- vector: Type.TArray<Type.TNumber>;
88
- route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
89
- model: Type.TString;
90
- space: Type.TUnion<[Type.TObject<{
91
- provider: Type.TLiteral<"local">;
92
- model: Type.TLiteral<"embeddinggemma-2">;
93
- revision: Type.TString;
94
- quantization: Type.TLiteral<"Q8_0">;
95
- runtime: Type.TString;
96
- dimensions: Type.TLiteral<768>;
97
- format: Type.TLiteral<"host-display-attributes-v1">;
98
- prefix: Type.TLiteral<"title: none | text: ">;
99
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
100
- }>, Type.TObject<{
101
- provider: Type.TLiteral<"openai">;
102
- model: Type.TLiteral<"text-embedding-3-small">;
103
- revision: Type.TNull;
104
- quantization: Type.TNull;
105
- runtime: Type.TNull;
106
- dimensions: Type.TLiteral<1536>;
107
- format: Type.TLiteral<"host-display-attributes-v1">;
108
- prefix: Type.TLiteral<"title: none | text: ">;
109
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
110
- }>, Type.TObject<{
111
- provider: Type.TLiteral<"sarvam">;
112
- model: Type.TLiteral<"embeddinggemma-2">;
113
- revision: Type.TNull;
114
- quantization: Type.TNull;
115
- runtime: Type.TLiteral<"sarvam-v2">;
116
- dimensions: Type.TLiteral<768>;
117
- format: Type.TLiteral<"host-display-attributes-v1">;
118
- prefix: Type.TLiteral<"title: none | text: ">;
119
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
173
+ export declare const embedCompareOutput: import("typebox").TObject<{
174
+ schemaVersion: import("typebox").TLiteral<2>;
175
+ entries: import("typebox").TArray<import("typebox").TObject<{
176
+ route: import("typebox").TUnion<[import("typebox").TLiteral<"local">, import("typebox").TLiteral<"openai">, import("typebox").TLiteral<"sarvam">, import("typebox").TLiteral<"gateway">, import("typebox").TLiteral<"openrouter">, import("typebox").TLiteral<"cloudflare">]>;
177
+ model: import("typebox").TString;
178
+ status: import("typebox").TUnion<[import("typebox").TLiteral<"success">, import("typebox").TLiteral<"error">, import("typebox").TLiteral<"cancelled">]>;
179
+ result: import("typebox").TObject<{
180
+ schemaVersion: import("typebox").TLiteral<2>;
181
+ provider: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TLiteral<"local">, import("typebox").TLiteral<"openai">, import("typebox").TLiteral<"sarvam">, import("typebox").TLiteral<"gateway">, import("typebox").TLiteral<"openrouter">, import("typebox").TLiteral<"cloudflare">]>, import("typebox").TNull]>;
182
+ model: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
183
+ space: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TObject<{
184
+ provider: import("typebox").TLiteral<"local">;
185
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
186
+ revision: import("typebox").TString;
187
+ quantization: import("typebox").TLiteral<"Q8_0">;
188
+ runtime: import("typebox").TString;
189
+ dimensions: import("typebox").TLiteral<768>;
190
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
191
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
192
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
193
+ }>, import("typebox").TObject<{
194
+ provider: import("typebox").TLiteral<"openai">;
195
+ model: import("typebox").TLiteral<"text-embedding-3-small">;
196
+ revision: import("typebox").TNull;
197
+ quantization: import("typebox").TNull;
198
+ runtime: import("typebox").TNull;
199
+ dimensions: import("typebox").TLiteral<1536>;
200
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
201
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
202
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
203
+ }>, import("typebox").TObject<{
204
+ provider: import("typebox").TLiteral<"sarvam">;
205
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
206
+ revision: import("typebox").TNull;
207
+ quantization: import("typebox").TNull;
208
+ runtime: import("typebox").TLiteral<"sarvam-v2">;
209
+ dimensions: import("typebox").TLiteral<768>;
210
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
211
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
212
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
213
+ }>, import("typebox").TObject<{
214
+ provider: import("typebox").TLiteral<"cloudflare">;
215
+ model: import("typebox").TLiteral<"@cf/baai/bge-base-en-v1.5">;
216
+ revision: import("typebox").TNull;
217
+ quantization: import("typebox").TNull;
218
+ runtime: import("typebox").TLiteral<"cloudflare-workers-ai">;
219
+ dimensions: import("typebox").TLiteral<768>;
220
+ pooling: import("typebox").TUnion<[import("typebox").TLiteral<"mean">, import("typebox").TLiteral<"cls">]>;
221
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
222
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
223
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
224
+ }>]>, import("typebox").TNull]>;
225
+ generations: import("typebox").TArray<import("typebox").TObject<{
226
+ provider: import("typebox").TUnion<[import("typebox").TLiteral<"local">, import("typebox").TLiteral<"openai">, import("typebox").TLiteral<"sarvam">, import("typebox").TLiteral<"gateway">, import("typebox").TLiteral<"openrouter">, import("typebox").TLiteral<"cloudflare">]>;
227
+ model: import("typebox").TString;
228
+ space: import("typebox").TUnion<[import("typebox").TObject<{
229
+ provider: import("typebox").TLiteral<"local">;
230
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
231
+ revision: import("typebox").TString;
232
+ quantization: import("typebox").TLiteral<"Q8_0">;
233
+ runtime: import("typebox").TString;
234
+ dimensions: import("typebox").TLiteral<768>;
235
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
236
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
237
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
238
+ }>, import("typebox").TObject<{
239
+ provider: import("typebox").TLiteral<"openai">;
240
+ model: import("typebox").TLiteral<"text-embedding-3-small">;
241
+ revision: import("typebox").TNull;
242
+ quantization: import("typebox").TNull;
243
+ runtime: import("typebox").TNull;
244
+ dimensions: import("typebox").TLiteral<1536>;
245
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
246
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
247
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
248
+ }>, import("typebox").TObject<{
249
+ provider: import("typebox").TLiteral<"sarvam">;
250
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
251
+ revision: import("typebox").TNull;
252
+ quantization: import("typebox").TNull;
253
+ runtime: import("typebox").TLiteral<"sarvam-v2">;
254
+ dimensions: import("typebox").TLiteral<768>;
255
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
256
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
257
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
258
+ }>, import("typebox").TObject<{
259
+ provider: import("typebox").TLiteral<"cloudflare">;
260
+ model: import("typebox").TLiteral<"@cf/baai/bge-base-en-v1.5">;
261
+ revision: import("typebox").TNull;
262
+ quantization: import("typebox").TNull;
263
+ runtime: import("typebox").TLiteral<"cloudflare-workers-ai">;
264
+ dimensions: import("typebox").TLiteral<768>;
265
+ pooling: import("typebox").TUnion<[import("typebox").TLiteral<"mean">, import("typebox").TLiteral<"cls">]>;
266
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
267
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
268
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
269
+ }>]>;
270
+ }>>;
271
+ outcomes: import("typebox").TArray<import("typebox").TUnion<[import("typebox").TObject<{
272
+ status: import("typebox").TLiteral<"success">;
273
+ index: import("typebox").TInteger;
274
+ vector: import("typebox").TArray<import("typebox").TNumber>;
275
+ route: import("typebox").TUnion<[import("typebox").TLiteral<"local">, import("typebox").TLiteral<"openai">, import("typebox").TLiteral<"sarvam">, import("typebox").TLiteral<"gateway">, import("typebox").TLiteral<"openrouter">, import("typebox").TLiteral<"cloudflare">]>;
276
+ model: import("typebox").TString;
277
+ space: import("typebox").TUnion<[import("typebox").TObject<{
278
+ provider: import("typebox").TLiteral<"local">;
279
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
280
+ revision: import("typebox").TString;
281
+ quantization: import("typebox").TLiteral<"Q8_0">;
282
+ runtime: import("typebox").TString;
283
+ dimensions: import("typebox").TLiteral<768>;
284
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
285
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
286
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
287
+ }>, import("typebox").TObject<{
288
+ provider: import("typebox").TLiteral<"openai">;
289
+ model: import("typebox").TLiteral<"text-embedding-3-small">;
290
+ revision: import("typebox").TNull;
291
+ quantization: import("typebox").TNull;
292
+ runtime: import("typebox").TNull;
293
+ dimensions: import("typebox").TLiteral<1536>;
294
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
295
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
296
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
297
+ }>, import("typebox").TObject<{
298
+ provider: import("typebox").TLiteral<"sarvam">;
299
+ model: import("typebox").TLiteral<"embeddinggemma-2">;
300
+ revision: import("typebox").TNull;
301
+ quantization: import("typebox").TNull;
302
+ runtime: import("typebox").TLiteral<"sarvam-v2">;
303
+ dimensions: import("typebox").TLiteral<768>;
304
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
305
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
306
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
307
+ }>, import("typebox").TObject<{
308
+ provider: import("typebox").TLiteral<"cloudflare">;
309
+ model: import("typebox").TLiteral<"@cf/baai/bge-base-en-v1.5">;
310
+ revision: import("typebox").TNull;
311
+ quantization: import("typebox").TNull;
312
+ runtime: import("typebox").TLiteral<"cloudflare-workers-ai">;
313
+ dimensions: import("typebox").TLiteral<768>;
314
+ pooling: import("typebox").TUnion<[import("typebox").TLiteral<"mean">, import("typebox").TLiteral<"cls">]>;
315
+ format: import("typebox").TLiteral<"host-display-attributes-v1">;
316
+ prefix: import("typebox").TLiteral<"title: none | text: ">;
317
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
120
318
  }>]>;
121
- attemptId: Type.TString;
122
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
123
- }>, Type.TObject<{
124
- status: Type.TLiteral<"error">;
125
- index: Type.TInteger;
126
- code: Type.TUnion<[Type.TLiteral<"configuration-invalid">, Type.TLiteral<"route-unconfigured">, Type.TLiteral<"missing-credentials">, Type.TLiteral<"http-auth">, Type.TLiteral<"http-not-found">, Type.TLiteral<"http-rate-limit">, Type.TLiteral<"http-forbidden">, Type.TLiteral<"http-bad-request">, Type.TLiteral<"http-server-error">, Type.TLiteral<"transport-failed">, Type.TLiteral<"provider-response-invalid">, Type.TLiteral<"provider-response-mismatch">, Type.TLiteral<"vector-invalid">, Type.TLiteral<"vector-zero">, Type.TLiteral<"input-empty">, Type.TLiteral<"input-too-long">, Type.TLiteral<"tokenizer-roundtrip-failed">, Type.TLiteral<"attribution-unavailable">, Type.TLiteral<"local-resources-unavailable">, Type.TLiteral<"local-model-mismatch">, Type.TLiteral<"local-runtime-mismatch">, Type.TLiteral<"local-startup-failed">, Type.TLiteral<"local-cpu-startup-invalid">, Type.TLiteral<"cancelled">, Type.TLiteral<"unstarted">]>;
127
- attemptId: Type.TUnion<[Type.TString, Type.TNull]>;
319
+ attemptId: import("typebox").TString;
320
+ normalization: import("typebox").TLiteral<"finite-nonzero-l2-v1">;
321
+ }>, import("typebox").TObject<{
322
+ status: import("typebox").TLiteral<"error">;
323
+ index: import("typebox").TInteger;
324
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"configuration-invalid">, import("typebox").TLiteral<"route-unconfigured">, import("typebox").TLiteral<"missing-credentials">, import("typebox").TLiteral<"http-auth">, import("typebox").TLiteral<"http-not-found">, import("typebox").TLiteral<"http-rate-limit">, import("typebox").TLiteral<"http-forbidden">, import("typebox").TLiteral<"http-bad-request">, import("typebox").TLiteral<"http-server-error">, import("typebox").TLiteral<"transport-failed">, import("typebox").TLiteral<"provider-response-invalid">, import("typebox").TLiteral<"provider-response-mismatch">, import("typebox").TLiteral<"vector-invalid">, import("typebox").TLiteral<"vector-zero">, import("typebox").TLiteral<"input-empty">, import("typebox").TLiteral<"input-too-long">, import("typebox").TLiteral<"tokenizer-roundtrip-failed">, import("typebox").TLiteral<"attribution-unavailable">, import("typebox").TLiteral<"local-resources-unavailable">, import("typebox").TLiteral<"local-model-mismatch">, import("typebox").TLiteral<"local-runtime-mismatch">, import("typebox").TLiteral<"local-startup-failed">, import("typebox").TLiteral<"local-cpu-startup-invalid">, import("typebox").TLiteral<"cancelled">, import("typebox").TLiteral<"unstarted">]>;
325
+ attemptId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
128
326
  }>]>>;
129
- attempts: Type.TArray<Type.TObject<{
130
- id: Type.TString;
131
- route: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
132
- model: Type.TString;
133
- routeIndex: Type.TInteger;
134
- status: Type.TUnion<[Type.TLiteral<"success">, Type.TLiteral<"error">, Type.TLiteral<"cancelled">]>;
135
- usage: Type.TUnion<[Type.TObject<{
136
- providerReportedInputTokens: Type.TUnion<[Type.TInteger, Type.TNull]>;
137
- preparedInputTokens: Type.TUnion<[Type.TInteger, Type.TNull]>;
138
- billedTokens: Type.TUnion<[Type.TInteger, Type.TNull]>;
139
- }>, Type.TNull]>;
140
- errorCode: Type.TOptional<Type.TUnion<[Type.TLiteral<"configuration-invalid">, Type.TLiteral<"route-unconfigured">, Type.TLiteral<"missing-credentials">, Type.TLiteral<"http-auth">, Type.TLiteral<"http-not-found">, Type.TLiteral<"http-rate-limit">, Type.TLiteral<"http-forbidden">, Type.TLiteral<"http-bad-request">, Type.TLiteral<"http-server-error">, Type.TLiteral<"transport-failed">, Type.TLiteral<"provider-response-invalid">, Type.TLiteral<"provider-response-mismatch">, Type.TLiteral<"vector-invalid">, Type.TLiteral<"vector-zero">, Type.TLiteral<"input-empty">, Type.TLiteral<"input-too-long">, Type.TLiteral<"tokenizer-roundtrip-failed">, Type.TLiteral<"attribution-unavailable">, Type.TLiteral<"local-resources-unavailable">, Type.TLiteral<"local-model-mismatch">, Type.TLiteral<"local-runtime-mismatch">, Type.TLiteral<"local-startup-failed">, Type.TLiteral<"local-cpu-startup-invalid">, Type.TLiteral<"cancelled">, Type.TLiteral<"unstarted">]>>;
327
+ attempts: import("typebox").TArray<import("typebox").TObject<{
328
+ id: import("typebox").TString;
329
+ route: import("typebox").TUnion<[import("typebox").TLiteral<"local">, import("typebox").TLiteral<"openai">, import("typebox").TLiteral<"sarvam">, import("typebox").TLiteral<"gateway">, import("typebox").TLiteral<"openrouter">, import("typebox").TLiteral<"cloudflare">]>;
330
+ model: import("typebox").TString;
331
+ routeIndex: import("typebox").TInteger;
332
+ status: import("typebox").TUnion<[import("typebox").TLiteral<"success">, import("typebox").TLiteral<"error">, import("typebox").TLiteral<"cancelled">]>;
333
+ usage: import("typebox").TUnion<[import("typebox").TObject<{
334
+ providerReportedInputTokens: import("typebox").TUnion<[import("typebox").TInteger, import("typebox").TNull]>;
335
+ preparedInputTokens: import("typebox").TUnion<[import("typebox").TInteger, import("typebox").TNull]>;
336
+ billedTokens: import("typebox").TUnion<[import("typebox").TInteger, import("typebox").TNull]>;
337
+ }>, import("typebox").TNull]>;
338
+ errorCode: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TLiteral<"configuration-invalid">, import("typebox").TLiteral<"route-unconfigured">, import("typebox").TLiteral<"missing-credentials">, import("typebox").TLiteral<"http-auth">, import("typebox").TLiteral<"http-not-found">, import("typebox").TLiteral<"http-rate-limit">, import("typebox").TLiteral<"http-forbidden">, import("typebox").TLiteral<"http-bad-request">, import("typebox").TLiteral<"http-server-error">, import("typebox").TLiteral<"transport-failed">, import("typebox").TLiteral<"provider-response-invalid">, import("typebox").TLiteral<"provider-response-mismatch">, import("typebox").TLiteral<"vector-invalid">, import("typebox").TLiteral<"vector-zero">, import("typebox").TLiteral<"input-empty">, import("typebox").TLiteral<"input-too-long">, import("typebox").TLiteral<"tokenizer-roundtrip-failed">, import("typebox").TLiteral<"attribution-unavailable">, import("typebox").TLiteral<"local-resources-unavailable">, import("typebox").TLiteral<"local-model-mismatch">, import("typebox").TLiteral<"local-runtime-mismatch">, import("typebox").TLiteral<"local-startup-failed">, import("typebox").TLiteral<"local-cpu-startup-invalid">, import("typebox").TLiteral<"cancelled">, import("typebox").TLiteral<"unstarted">]>>;
141
339
  }>>;
142
340
  }>;
143
341
  }>>;
144
342
  }>;
145
- export declare const embeddingsDescribeOutput: Type.TObject<{
146
- schemaVersion: Type.TLiteral<1>;
147
- ready: Type.TBoolean;
148
- selected: Type.TObject<{
149
- provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
150
- model: Type.TString;
151
- }>;
152
- space: Type.TUnion<[Type.TUnion<[Type.TObject<{
153
- provider: Type.TLiteral<"local">;
154
- model: Type.TLiteral<"embeddinggemma-2">;
155
- revision: Type.TString;
156
- quantization: Type.TLiteral<"Q8_0">;
157
- runtime: Type.TString;
158
- dimensions: Type.TLiteral<768>;
159
- format: Type.TLiteral<"host-display-attributes-v1">;
160
- prefix: Type.TLiteral<"title: none | text: ">;
161
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
162
- }>, Type.TObject<{
163
- provider: Type.TLiteral<"openai">;
164
- model: Type.TLiteral<"text-embedding-3-small">;
165
- revision: Type.TNull;
166
- quantization: Type.TNull;
167
- runtime: Type.TNull;
168
- dimensions: Type.TLiteral<1536>;
169
- format: Type.TLiteral<"host-display-attributes-v1">;
170
- prefix: Type.TLiteral<"title: none | text: ">;
171
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
172
- }>, Type.TObject<{
173
- provider: Type.TLiteral<"sarvam">;
174
- model: Type.TLiteral<"embeddinggemma-2">;
175
- revision: Type.TNull;
176
- quantization: Type.TNull;
177
- runtime: Type.TLiteral<"sarvam-v2">;
178
- dimensions: Type.TLiteral<768>;
179
- format: Type.TLiteral<"host-display-attributes-v1">;
180
- prefix: Type.TLiteral<"title: none | text: ">;
181
- normalization: Type.TLiteral<"finite-nonzero-l2-v1">;
182
- }>]>, Type.TNull]>;
183
- default: Type.TObject<{
184
- provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
185
- model: Type.TString;
186
- }>;
187
- fallback: Type.TArray<Type.TObject<{
188
- provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
189
- model: Type.TString;
190
- }>>;
191
- compare: Type.TArray<Type.TObject<{
192
- provider: Type.TUnion<[Type.TLiteral<"local">, Type.TLiteral<"openai">, Type.TLiteral<"sarvam">, Type.TLiteral<"gateway">]>;
193
- model: Type.TString;
194
- }>>;
195
- diagnostics: Type.TArray<Type.TObject<{
196
- code: Type.TString;
197
- severity: Type.TUnion<[Type.TLiteral<"error">, Type.TLiteral<"warning">, Type.TLiteral<"info">]>;
198
- }>>;
199
- }>;
200
- export declare const EMBEDDINGS_TOOL_NAMES: readonly ["embed", "embed_compare", "embeddings_describe"];
343
+ export declare const EMBEDDINGS_TOOL_NAMES: readonly ["embed", "embed_compare"];
@@ -1,19 +1,10 @@
1
- import { Type } from 'typebox';
2
- import { embeddingDescribeSchema, embeddingCompareResultSchema, embeddingRequestSchema, embeddingResultSchema, } from './schemas.js';
1
+ import { embeddingCompareResultSchema, embeddingRequestSchema, embeddingResultSchema, } from './schemas.js';
3
2
  export const EMBED_TOOL = 'embed';
4
3
  export const EMBED_COMPARE_TOOL = 'embed_compare';
5
- export const EMBEDDINGS_DESCRIBE_TOOL = 'embeddings_describe';
6
4
  export const EMBED_TOOL_DESCRIPTION = 'Embed one or more text inputs with the server-configured embedding route. Provider, model, fallback routes and credentials stay in trusted settings; this tool cannot override them. Returns vectors and their actual generating space as structured data. Full text is preserved; the package owns prefixing and provider batching. Use embed_compare only for an explicit comparison.';
7
5
  export const EMBED_COMPARE_TOOL_DESCRIPTION = 'Explicitly compare the same text inputs using exactly the configured compare routes. Every entry is a separate request and may incur charges. No implicit default, fallback, ranking or settings mutation.';
8
- export const EMBEDDINGS_DESCRIBE_TOOL_DESCRIPTION = 'Report the selected configured embedding route, generating space and provider-free readiness diagnostics without inference or credentials. Information is not a reservation or a caller storage policy.';
9
6
  export const embedParameters = embeddingRequestSchema;
10
7
  export const embedCompareParameters = embeddingRequestSchema;
11
- export const embeddingsDescribeParameters = Type.Object({}, { additionalProperties: false });
12
8
  export const embedOutput = embeddingResultSchema;
13
9
  export const embedCompareOutput = embeddingCompareResultSchema;
14
- export const embeddingsDescribeOutput = embeddingDescribeSchema;
15
- export const EMBEDDINGS_TOOL_NAMES = [
16
- EMBED_TOOL,
17
- EMBED_COMPARE_TOOL,
18
- EMBEDDINGS_DESCRIBE_TOOL,
19
- ];
10
+ export const EMBEDDINGS_TOOL_NAMES = [EMBED_TOOL, EMBED_COMPARE_TOOL];