@adaptic/utils 0.0.1014 → 0.0.1016
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.cjs +2823 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2783 -25
- package/dist/index.mjs.map +1 -1
- package/dist/types/__tests__/llm/client/support/rejections.d.ts +21 -0
- package/dist/types/__tests__/llm/client/support/rejections.d.ts.map +1 -0
- package/dist/types/__tests__/llm/client/support/routes.d.ts +67 -0
- package/dist/types/__tests__/llm/client/support/routes.d.ts.map +1 -0
- package/dist/types/__tests__/llm/client/support/streams.d.ts +74 -0
- package/dist/types/__tests__/llm/client/support/streams.d.ts.map +1 -0
- package/dist/types/__tests__/llm/client/support/transports.d.ts +105 -0
- package/dist/types/__tests__/llm/client/support/transports.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/llm/alias-client.d.ts +64 -0
- package/dist/types/llm/alias-client.d.ts.map +1 -0
- package/dist/types/llm/circuit-breaker.d.ts +124 -0
- package/dist/types/llm/circuit-breaker.d.ts.map +1 -0
- package/dist/types/llm/eval/comparators.d.ts +127 -0
- package/dist/types/llm/eval/comparators.d.ts.map +1 -0
- package/dist/types/llm/eval/coverage.d.ts +44 -0
- package/dist/types/llm/eval/coverage.d.ts.map +1 -0
- package/dist/types/llm/eval/golden-set.d.ts +47 -0
- package/dist/types/llm/eval/golden-set.d.ts.map +1 -0
- package/dist/types/llm/eval/index.d.ts +25 -0
- package/dist/types/llm/eval/index.d.ts.map +1 -0
- package/dist/types/llm/eval/json-shape.d.ts +74 -0
- package/dist/types/llm/eval/json-shape.d.ts.map +1 -0
- package/dist/types/llm/eval/judge.d.ts +131 -0
- package/dist/types/llm/eval/judge.d.ts.map +1 -0
- package/dist/types/llm/eval/metrics.d.ts +51 -0
- package/dist/types/llm/eval/metrics.d.ts.map +1 -0
- package/dist/types/llm/eval/run.d.ts +97 -0
- package/dist/types/llm/eval/run.d.ts.map +1 -0
- package/dist/types/llm/eval/types.d.ts +242 -0
- package/dist/types/llm/eval/types.d.ts.map +1 -0
- package/dist/types/llm/fallback-chain.d.ts +97 -0
- package/dist/types/llm/fallback-chain.d.ts.map +1 -0
- package/dist/types/llm/index.d.ts +30 -0
- package/dist/types/llm/index.d.ts.map +1 -0
- package/dist/types/llm/param-matrix.d.ts +65 -0
- package/dist/types/llm/param-matrix.d.ts.map +1 -0
- package/dist/types/llm/rate-guard.d.ts +119 -0
- package/dist/types/llm/rate-guard.d.ts.map +1 -0
- package/dist/types/llm/route-table.d.ts +155 -0
- package/dist/types/llm/route-table.d.ts.map +1 -0
- package/dist/types/llm/schema-retry.d.ts +80 -0
- package/dist/types/llm/schema-retry.d.ts.map +1 -0
- package/dist/types/llm/streaming.d.ts +93 -0
- package/dist/types/llm/streaming.d.ts.map +1 -0
- package/dist/types/llm/transports/direct.d.ts +92 -0
- package/dist/types/llm/transports/direct.d.ts.map +1 -0
- package/dist/types/llm/transports/gateway.d.ts +73 -0
- package/dist/types/llm/transports/gateway.d.ts.map +1 -0
- package/dist/types/llm/types.d.ts +292 -0
- package/dist/types/llm/types.d.ts.map +1 -0
- package/dist/types/schemas/alpaca-schemas.d.ts +6 -6
- package/package.json +2 -2
- package/dist/types/__tests__/alpaca-broker-error-preservation.test.d.ts +0 -2
- package/dist/types/__tests__/alpaca-broker-error-preservation.test.d.ts.map +0 -1
- package/dist/types/__tests__/alpaca-client-order-id.test.d.ts +0 -2
- package/dist/types/__tests__/alpaca-client-order-id.test.d.ts.map +0 -1
- package/dist/types/__tests__/alpaca-functions.test.d.ts +0 -2
- package/dist/types/__tests__/alpaca-functions.test.d.ts.map +0 -1
- package/dist/types/__tests__/alpaca-market-data-retry.test.d.ts +0 -2
- package/dist/types/__tests__/alpaca-market-data-retry.test.d.ts.map +0 -1
- package/dist/types/__tests__/alpaca-order-idempotency.test.d.ts +0 -2
- package/dist/types/__tests__/alpaca-order-idempotency.test.d.ts.map +0 -1
- package/dist/types/__tests__/alpaca-trading-api.test.d.ts +0 -2
- package/dist/types/__tests__/alpaca-trading-api.test.d.ts.map +0 -1
- package/dist/types/__tests__/api-endpoints.test.d.ts +0 -2
- package/dist/types/__tests__/api-endpoints.test.d.ts.map +0 -1
- package/dist/types/__tests__/asset-allocation.test.d.ts +0 -2
- package/dist/types/__tests__/asset-allocation.test.d.ts.map +0 -1
- package/dist/types/__tests__/atr.test.d.ts +0 -2
- package/dist/types/__tests__/atr.test.d.ts.map +0 -1
- package/dist/types/__tests__/auth-validator.test.d.ts +0 -2
- package/dist/types/__tests__/auth-validator.test.d.ts.map +0 -1
- package/dist/types/__tests__/broker-factory.test.d.ts +0 -2
- package/dist/types/__tests__/broker-factory.test.d.ts.map +0 -1
- package/dist/types/__tests__/broker-types.test.d.ts +0 -2
- package/dist/types/__tests__/broker-types.test.d.ts.map +0 -1
- package/dist/types/__tests__/cache.test.d.ts +0 -2
- package/dist/types/__tests__/cache.test.d.ts.map +0 -1
- package/dist/types/__tests__/errors.test.d.ts +0 -2
- package/dist/types/__tests__/errors.test.d.ts.map +0 -1
- package/dist/types/__tests__/financial-regression.test.d.ts +0 -2
- package/dist/types/__tests__/financial-regression.test.d.ts.map +0 -1
- package/dist/types/__tests__/format-tools.test.d.ts +0 -2
- package/dist/types/__tests__/format-tools.test.d.ts.map +0 -1
- package/dist/types/__tests__/http-keep-alive.test.d.ts +0 -2
- package/dist/types/__tests__/http-keep-alive.test.d.ts.map +0 -1
- package/dist/types/__tests__/http-timeout.test.d.ts +0 -2
- package/dist/types/__tests__/http-timeout.test.d.ts.map +0 -1
- package/dist/types/__tests__/index.test.d.ts +0 -2
- package/dist/types/__tests__/index.test.d.ts.map +0 -1
- package/dist/types/__tests__/legacy-auth.test.d.ts +0 -2
- package/dist/types/__tests__/legacy-auth.test.d.ts.map +0 -1
- package/dist/types/__tests__/logger.test.d.ts +0 -2
- package/dist/types/__tests__/logger.test.d.ts.map +0 -1
- package/dist/types/__tests__/logging.test.d.ts +0 -2
- package/dist/types/__tests__/logging.test.d.ts.map +0 -1
- package/dist/types/__tests__/market-time.test.d.ts +0 -2
- package/dist/types/__tests__/market-time.test.d.ts.map +0 -1
- package/dist/types/__tests__/massive.test.d.ts +0 -2
- package/dist/types/__tests__/massive.test.d.ts.map +0 -1
- package/dist/types/__tests__/metrics-calcs-direction.test.d.ts +0 -2
- package/dist/types/__tests__/metrics-calcs-direction.test.d.ts.map +0 -1
- package/dist/types/__tests__/misc-utils.test.d.ts +0 -2
- package/dist/types/__tests__/misc-utils.test.d.ts.map +0 -1
- package/dist/types/__tests__/paginator.test.d.ts +0 -2
- package/dist/types/__tests__/paginator.test.d.ts.map +0 -1
- package/dist/types/__tests__/performance-metrics-fees.test.d.ts +0 -2
- package/dist/types/__tests__/performance-metrics-fees.test.d.ts.map +0 -1
- package/dist/types/__tests__/performance-metrics.test.d.ts +0 -2
- package/dist/types/__tests__/performance-metrics.test.d.ts.map +0 -1
- package/dist/types/__tests__/price-utils-fees.test.d.ts +0 -2
- package/dist/types/__tests__/price-utils-fees.test.d.ts.map +0 -1
- package/dist/types/__tests__/price-utils.test.d.ts +0 -2
- package/dist/types/__tests__/price-utils.test.d.ts.map +0 -1
- package/dist/types/__tests__/property-based-financial.test.d.ts +0 -2
- package/dist/types/__tests__/property-based-financial.test.d.ts.map +0 -1
- package/dist/types/__tests__/protective-order-sides.test.d.ts +0 -2
- package/dist/types/__tests__/protective-order-sides.test.d.ts.map +0 -1
- package/dist/types/__tests__/rate-limiter.test.d.ts +0 -2
- package/dist/types/__tests__/rate-limiter.test.d.ts.map +0 -1
- package/dist/types/__tests__/retry-classification.test.d.ts +0 -2
- package/dist/types/__tests__/retry-classification.test.d.ts.map +0 -1
- package/dist/types/__tests__/retry.test.d.ts +0 -2
- package/dist/types/__tests__/retry.test.d.ts.map +0 -1
- package/dist/types/__tests__/risk-free-rate.test.d.ts +0 -2
- package/dist/types/__tests__/risk-free-rate.test.d.ts.map +0 -1
- package/dist/types/__tests__/risk-metrics.test.d.ts +0 -2
- package/dist/types/__tests__/risk-metrics.test.d.ts.map +0 -1
- package/dist/types/__tests__/schema-validation.test.d.ts +0 -2
- package/dist/types/__tests__/schema-validation.test.d.ts.map +0 -1
- package/dist/types/__tests__/stampede-load-timeout.test.d.ts +0 -2
- package/dist/types/__tests__/stampede-load-timeout.test.d.ts.map +0 -1
- package/dist/types/__tests__/strategy-metrics.test.d.ts +0 -2
- package/dist/types/__tests__/strategy-metrics.test.d.ts.map +0 -1
- package/dist/types/__tests__/technical-analysis-totality.test.d.ts +0 -2
- package/dist/types/__tests__/technical-analysis-totality.test.d.ts.map +0 -1
- package/dist/types/__tests__/technical-analysis.test.d.ts +0 -2
- package/dist/types/__tests__/technical-analysis.test.d.ts.map +0 -1
- package/dist/types/__tests__/time-utils.test.d.ts +0 -2
- package/dist/types/__tests__/time-utils.test.d.ts.map +0 -1
- package/dist/types/__tests__/trading-policy-schemas.test.d.ts +0 -2
- package/dist/types/__tests__/trading-policy-schemas.test.d.ts.map +0 -1
- package/dist/types/__tests__/trailing-stops-portfolio.test.d.ts +0 -2
- package/dist/types/__tests__/trailing-stops-portfolio.test.d.ts.map +0 -1
- package/dist/types/__tests__/volatility.test.d.ts +0 -2
- package/dist/types/__tests__/volatility.test.d.ts.map +0 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the alias-resolving LLM client.
|
|
3
|
+
*
|
|
4
|
+
* Application code names a semantic alias and never a vendor model string, so
|
|
5
|
+
* these types deliberately give a caller no way to express "use this model".
|
|
6
|
+
* That is the whole point of the layer: a model swap has to be a change to the
|
|
7
|
+
* route table, and a type that accepted a model id would let a call site opt
|
|
8
|
+
* out of the routing policy without anyone noticing.
|
|
9
|
+
*
|
|
10
|
+
* @module llm/types
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The semantic aliases application code may name.
|
|
14
|
+
*
|
|
15
|
+
* A union rather than a bare string, so a call site that names an alias the
|
|
16
|
+
* route table does not define fails to compile instead of failing at runtime
|
|
17
|
+
* against whichever provider the gateway happened to have configured.
|
|
18
|
+
*/
|
|
19
|
+
export type LlmAlias = "llm.reason" | "llm.agentic" | "llm.fast" | "llm.extract" | "llm.judge";
|
|
20
|
+
/** How urgently a caller needs an answer, which fixes the per-leg timeout budget. */
|
|
21
|
+
export type LlmLatencyClass = "hot-path" | "background" | "batch";
|
|
22
|
+
/** What a call is for, which fixes how conservatively a failure is handled. */
|
|
23
|
+
export type LlmCriticality = "trading-adjacent" | "ops" | "internal";
|
|
24
|
+
/** Position of a route in its alias's fallback chain. */
|
|
25
|
+
export type LlmRouteRole = "primary" | "secondary" | "closed_incumbent";
|
|
26
|
+
/** Whether a provider is an open-weight host, a retained closed vendor, or an aggregator. */
|
|
27
|
+
export type LlmProviderTier = "open" | "closed" | "aggregator";
|
|
28
|
+
/** Whether a provider account is usable today. */
|
|
29
|
+
export type LlmAccountStatus = "live" | "pending-onboarding" | "not-in-scope";
|
|
30
|
+
/** Whether a vendor model id was transcribed from a source or is still unknown. */
|
|
31
|
+
export type LlmModelIdStatus = "confirmed" | "pending-provider-confirmation";
|
|
32
|
+
/** Response shape a caller asks for, mirroring the incumbent client's vocabulary. */
|
|
33
|
+
export type LlmResponseFormat = "text" | "json" | {
|
|
34
|
+
readonly type: "json_schema";
|
|
35
|
+
readonly schema: {
|
|
36
|
+
readonly type: "object";
|
|
37
|
+
readonly properties: Record<string, unknown>;
|
|
38
|
+
readonly required?: readonly string[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
/** Capability and sampling declarations for one route. */
|
|
42
|
+
export interface LlmRouteParams {
|
|
43
|
+
readonly temperature?: number | null;
|
|
44
|
+
readonly max_output_tokens?: number | null;
|
|
45
|
+
readonly reasoning_effort?: "low" | "medium" | "high" | null;
|
|
46
|
+
readonly supports_temperature?: boolean;
|
|
47
|
+
readonly supports_json_schema?: boolean;
|
|
48
|
+
readonly supports_tools?: boolean;
|
|
49
|
+
readonly supports_cache_control?: boolean;
|
|
50
|
+
readonly supports_vision?: boolean;
|
|
51
|
+
readonly context_window?: number;
|
|
52
|
+
}
|
|
53
|
+
/** A dated price anchor for one route, used to project spend against a budget. */
|
|
54
|
+
export interface LlmPriceAnchor {
|
|
55
|
+
readonly input: number;
|
|
56
|
+
readonly output: number;
|
|
57
|
+
readonly as_of: string;
|
|
58
|
+
readonly source?: string;
|
|
59
|
+
}
|
|
60
|
+
/** One leg of an alias's fallback chain. */
|
|
61
|
+
export interface LlmRoute {
|
|
62
|
+
readonly role: LlmRouteRole;
|
|
63
|
+
readonly provider: string;
|
|
64
|
+
readonly model_id: string | null;
|
|
65
|
+
readonly model_id_status: LlmModelIdStatus;
|
|
66
|
+
readonly model_id_source?: string | null;
|
|
67
|
+
readonly model_family: string;
|
|
68
|
+
readonly lumic_model?: string | null;
|
|
69
|
+
readonly params?: LlmRouteParams;
|
|
70
|
+
readonly price_per_mtok?: LlmPriceAnchor;
|
|
71
|
+
readonly shadow_only?: boolean;
|
|
72
|
+
readonly notes?: string;
|
|
73
|
+
}
|
|
74
|
+
/** A provider account the chain can reach. */
|
|
75
|
+
export interface LlmProvider {
|
|
76
|
+
readonly display_name: string;
|
|
77
|
+
readonly tier: LlmProviderTier;
|
|
78
|
+
readonly api_style: "openai-compatible" | "anthropic";
|
|
79
|
+
readonly base_url: string | null;
|
|
80
|
+
readonly base_url_env: string | null;
|
|
81
|
+
readonly api_key_env: string;
|
|
82
|
+
readonly secret_path: string;
|
|
83
|
+
readonly account_status: LlmAccountStatus;
|
|
84
|
+
readonly lumic_provider?: string | null;
|
|
85
|
+
readonly published_rpm?: number | null;
|
|
86
|
+
readonly published_tpm?: number | null;
|
|
87
|
+
readonly limits_source?: string | null;
|
|
88
|
+
readonly docs_url: string;
|
|
89
|
+
readonly notes?: string;
|
|
90
|
+
}
|
|
91
|
+
/** Spend bound for one alias at the gateway layer. */
|
|
92
|
+
export interface LlmAliasBudget {
|
|
93
|
+
readonly basis: "provisional-pre-baseline" | "measured";
|
|
94
|
+
readonly monthly_usd: number;
|
|
95
|
+
readonly alert_pct: readonly number[];
|
|
96
|
+
}
|
|
97
|
+
/** One alias's complete routing definition. */
|
|
98
|
+
export interface LlmAliasDefinition {
|
|
99
|
+
readonly workload: string;
|
|
100
|
+
readonly latency_class: LlmLatencyClass;
|
|
101
|
+
readonly criticality: LlmCriticality;
|
|
102
|
+
readonly isolation_capable: boolean;
|
|
103
|
+
readonly pinned?: boolean;
|
|
104
|
+
readonly eval_gate: "structured-output" | "free-text-judge" | "tool-call" | "none-pinned-judge";
|
|
105
|
+
readonly policy_note?: string;
|
|
106
|
+
readonly budget: LlmAliasBudget;
|
|
107
|
+
readonly routes: readonly LlmRoute[];
|
|
108
|
+
}
|
|
109
|
+
/** Circuit-breaker tuning shared by every route. */
|
|
110
|
+
export interface LlmBreakerDefaults {
|
|
111
|
+
readonly failure_threshold: number;
|
|
112
|
+
readonly cooldown_ms: number;
|
|
113
|
+
readonly half_open_probes: number;
|
|
114
|
+
}
|
|
115
|
+
/** Defaults every alias inherits. */
|
|
116
|
+
export interface LlmRouteDefaults {
|
|
117
|
+
readonly request_timeout_ms: Readonly<Record<LlmLatencyClass, number>>;
|
|
118
|
+
readonly retries_per_leg: number;
|
|
119
|
+
readonly circuit_breaker: LlmBreakerDefaults;
|
|
120
|
+
}
|
|
121
|
+
/** A routing question the table cannot settle on its own authority. */
|
|
122
|
+
export interface LlmOpenItem {
|
|
123
|
+
readonly id: string;
|
|
124
|
+
readonly question: string;
|
|
125
|
+
readonly blocks: string;
|
|
126
|
+
readonly owner: string;
|
|
127
|
+
}
|
|
128
|
+
/** The canonical alias route table. */
|
|
129
|
+
export interface LlmRouteTable {
|
|
130
|
+
readonly schema_version: number;
|
|
131
|
+
readonly policy_source: string;
|
|
132
|
+
readonly revised?: string;
|
|
133
|
+
readonly defaults: LlmRouteDefaults;
|
|
134
|
+
readonly providers: Readonly<Record<string, LlmProvider>>;
|
|
135
|
+
readonly aliases: Readonly<Record<string, LlmAliasDefinition>>;
|
|
136
|
+
readonly open_items?: readonly LlmOpenItem[];
|
|
137
|
+
}
|
|
138
|
+
/** A route resolved for execution, with its provider and effective budget attached. */
|
|
139
|
+
export interface ResolvedRoute {
|
|
140
|
+
readonly alias: LlmAlias;
|
|
141
|
+
readonly isolated: boolean;
|
|
142
|
+
readonly role: LlmRouteRole;
|
|
143
|
+
readonly providerName: string;
|
|
144
|
+
readonly provider: LlmProvider;
|
|
145
|
+
readonly modelId: string;
|
|
146
|
+
readonly lumicModel: string | null;
|
|
147
|
+
readonly params: LlmRouteParams;
|
|
148
|
+
/** Stable identity of this leg, used to key its circuit breaker and its metrics. */
|
|
149
|
+
readonly routeKey: string;
|
|
150
|
+
readonly timeoutMs: number;
|
|
151
|
+
readonly retriesPerLeg: number;
|
|
152
|
+
}
|
|
153
|
+
/** Token accounting for one attempt, mirroring the incumbent client's shape. */
|
|
154
|
+
export interface LlmUsageRecord {
|
|
155
|
+
readonly prompt_tokens: number;
|
|
156
|
+
readonly completion_tokens: number;
|
|
157
|
+
readonly reasoning_tokens?: number;
|
|
158
|
+
readonly cached_tokens?: number;
|
|
159
|
+
readonly provider: string;
|
|
160
|
+
readonly model: string;
|
|
161
|
+
readonly cost: number;
|
|
162
|
+
}
|
|
163
|
+
/** A tool call the model asked for. */
|
|
164
|
+
export interface LlmToolCall {
|
|
165
|
+
readonly id: string;
|
|
166
|
+
readonly type: "function";
|
|
167
|
+
readonly function: {
|
|
168
|
+
readonly name: string;
|
|
169
|
+
readonly arguments: string;
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/** The envelope a transport returns. */
|
|
173
|
+
export interface LlmTransportResponse<T> {
|
|
174
|
+
readonly response: T;
|
|
175
|
+
readonly usage: LlmUsageRecord;
|
|
176
|
+
readonly tool_calls?: readonly LlmToolCall[];
|
|
177
|
+
}
|
|
178
|
+
/** What the caller receives, with the routing decision attached for attribution. */
|
|
179
|
+
export interface AliasCallResult<T> extends LlmTransportResponse<T> {
|
|
180
|
+
/** The leg that produced the answer. */
|
|
181
|
+
readonly servedBy: ResolvedRoute;
|
|
182
|
+
/** Legs tried and rejected before this one, in order, with the reason each failed. */
|
|
183
|
+
readonly attempts: readonly AliasAttemptRecord[];
|
|
184
|
+
/** Whether the answer came from the degraded direct transport rather than the gateway. */
|
|
185
|
+
readonly degraded: boolean;
|
|
186
|
+
/** Usage summed across every attempt, so budget accounting counts what was actually spent. */
|
|
187
|
+
readonly totalUsage: LlmUsageRecord;
|
|
188
|
+
}
|
|
189
|
+
/** One attempt against one leg. */
|
|
190
|
+
export interface AliasAttemptRecord {
|
|
191
|
+
readonly routeKey: string;
|
|
192
|
+
readonly role: LlmRouteRole;
|
|
193
|
+
readonly provider: string;
|
|
194
|
+
readonly modelId: string;
|
|
195
|
+
readonly outcome: "ok" | "error" | "timeout" | "breaker-open" | "skipped";
|
|
196
|
+
readonly durationMs: number;
|
|
197
|
+
readonly reason?: string;
|
|
198
|
+
readonly usage?: LlmUsageRecord;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Outcome of validating a structured payload.
|
|
202
|
+
*
|
|
203
|
+
* A discriminated union rather than a boolean plus an out-parameter, so a
|
|
204
|
+
* validator cannot report success while leaving the value unnarrowed — the type
|
|
205
|
+
* system carries the rescued payload only on the branch that earned it.
|
|
206
|
+
*/
|
|
207
|
+
export type LlmValidationOutcome<T> = {
|
|
208
|
+
readonly ok: true;
|
|
209
|
+
readonly value: T;
|
|
210
|
+
} | {
|
|
211
|
+
readonly ok: false;
|
|
212
|
+
readonly reason: string;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Options a caller passes alongside the prompt.
|
|
216
|
+
*
|
|
217
|
+
* Generic in the validated payload so a caller's validator and the call's
|
|
218
|
+
* result type are the same `T` by construction. Without the parameter the
|
|
219
|
+
* client would need a cast to connect them, and a cast at that seam is exactly
|
|
220
|
+
* where a validator could silently be applied to the wrong shape.
|
|
221
|
+
*/
|
|
222
|
+
export interface AliasCallOptions<T = unknown> {
|
|
223
|
+
/** The semantic alias to serve this call. Required; there is no model option by design. */
|
|
224
|
+
readonly alias: LlmAlias;
|
|
225
|
+
/**
|
|
226
|
+
* Route through the alias's research-isolated variant (PD-9).
|
|
227
|
+
*
|
|
228
|
+
* Isolation is requested explicitly rather than inferred, because a boundary
|
|
229
|
+
* that depends on a caller being correctly classified elsewhere is a boundary
|
|
230
|
+
* that breaks quietly when the classification drifts.
|
|
231
|
+
*/
|
|
232
|
+
readonly isolated?: boolean;
|
|
233
|
+
readonly temperature?: number;
|
|
234
|
+
readonly maxOutputTokens?: number;
|
|
235
|
+
readonly reasoningEffort?: "low" | "medium" | "high";
|
|
236
|
+
readonly tools?: readonly unknown[];
|
|
237
|
+
readonly developerPrompt?: string;
|
|
238
|
+
readonly context?: readonly unknown[];
|
|
239
|
+
readonly metadata?: Readonly<Record<string, string>>;
|
|
240
|
+
/** Overrides the latency class's per-leg budget. Never widens the caller's own deadline. */
|
|
241
|
+
readonly timeoutMs?: number;
|
|
242
|
+
readonly signal?: AbortSignal;
|
|
243
|
+
/**
|
|
244
|
+
* Validator for a structured payload. Supplying it enables the single
|
|
245
|
+
* feedback retry before the chain advances.
|
|
246
|
+
*/
|
|
247
|
+
readonly validate?: (raw: unknown) => LlmValidationOutcome<T>;
|
|
248
|
+
/** Correlation id carried into transport metadata for cross-system tracing. */
|
|
249
|
+
readonly correlationId?: string;
|
|
250
|
+
}
|
|
251
|
+
/** A transport that can execute one resolved route. */
|
|
252
|
+
export interface LlmTransport {
|
|
253
|
+
readonly name: string;
|
|
254
|
+
/**
|
|
255
|
+
* Execute one leg.
|
|
256
|
+
*
|
|
257
|
+
* @param request Everything the leg needs, already normalised for its provider.
|
|
258
|
+
* @returns The provider's answer.
|
|
259
|
+
*/
|
|
260
|
+
execute<T>(request: LlmTransportRequest): Promise<LlmTransportResponse<T>>;
|
|
261
|
+
}
|
|
262
|
+
/** A single normalised leg execution. */
|
|
263
|
+
export interface LlmTransportRequest {
|
|
264
|
+
readonly route: ResolvedRoute;
|
|
265
|
+
readonly content: string | readonly unknown[];
|
|
266
|
+
readonly responseFormat: LlmResponseFormat;
|
|
267
|
+
/** Provider-normalised parameters. A transport sends these verbatim. */
|
|
268
|
+
readonly params: Readonly<Record<string, unknown>>;
|
|
269
|
+
readonly signal: AbortSignal;
|
|
270
|
+
readonly correlationId?: string;
|
|
271
|
+
}
|
|
272
|
+
/** Runtime wiring for the client. */
|
|
273
|
+
export interface LlmClientConfig {
|
|
274
|
+
/** Base URL of the gateway. Absent means the gateway leg is unavailable. */
|
|
275
|
+
readonly gatewayBaseUrl?: string;
|
|
276
|
+
/** Env-var NAME holding the gateway key. Never the key itself. */
|
|
277
|
+
readonly gatewayApiKeyEnv?: string;
|
|
278
|
+
/** Transport used while the gateway is reachable. */
|
|
279
|
+
readonly gatewayTransport?: LlmTransport;
|
|
280
|
+
/**
|
|
281
|
+
* Transport used when the gateway itself is unreachable.
|
|
282
|
+
*
|
|
283
|
+
* Kept injectable so the client has no load-time dependency on a provider
|
|
284
|
+
* SDK. A gateway that is a single point of failure would trade one outage
|
|
285
|
+
* mode for a worse one, so this path exists; restricting it to closed-tier
|
|
286
|
+
* legs is what keeps it a safety net rather than a second routing policy.
|
|
287
|
+
*/
|
|
288
|
+
readonly directTransport?: LlmTransport;
|
|
289
|
+
/** Clock, injected so timeout and breaker behaviour is testable without waiting. */
|
|
290
|
+
readonly now?: () => number;
|
|
291
|
+
}
|
|
292
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/llm/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAChB,YAAY,GACZ,aAAa,GACb,UAAU,GACV,aAAa,GACb,WAAW,CAAC;AAEhB,qFAAqF;AACrF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CAAC,cAAc,EAAE,iBAAiB,CAAC;IAC3C,wEAAwE;IACxE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,kEAAkE;IAClE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,qDAAqD;IACrD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,YAAY,CAAC;IACzC;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC;IACxC,oFAAoF;IACpF,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CAC7B"}
|
|
@@ -578,11 +578,11 @@ export declare const AlpacaNewsArticleSchema: z.ZodObject<{
|
|
|
578
578
|
id: number;
|
|
579
579
|
source: string;
|
|
580
580
|
symbols: string[];
|
|
581
|
+
content: string;
|
|
581
582
|
created_at: string;
|
|
582
583
|
updated_at: string;
|
|
583
584
|
url: string;
|
|
584
585
|
author: string;
|
|
585
|
-
content: string;
|
|
586
586
|
headline: string;
|
|
587
587
|
summary: string;
|
|
588
588
|
images: {
|
|
@@ -593,11 +593,11 @@ export declare const AlpacaNewsArticleSchema: z.ZodObject<{
|
|
|
593
593
|
id: number;
|
|
594
594
|
source: string;
|
|
595
595
|
symbols: string[];
|
|
596
|
+
content: string;
|
|
596
597
|
created_at: string;
|
|
597
598
|
updated_at: string;
|
|
598
599
|
url: string;
|
|
599
600
|
author: string;
|
|
600
|
-
content: string;
|
|
601
601
|
headline: string;
|
|
602
602
|
summary: string;
|
|
603
603
|
images: {
|
|
@@ -632,11 +632,11 @@ export declare const AlpacaNewsResponseSchema: z.ZodObject<{
|
|
|
632
632
|
id: number;
|
|
633
633
|
source: string;
|
|
634
634
|
symbols: string[];
|
|
635
|
+
content: string;
|
|
635
636
|
created_at: string;
|
|
636
637
|
updated_at: string;
|
|
637
638
|
url: string;
|
|
638
639
|
author: string;
|
|
639
|
-
content: string;
|
|
640
640
|
headline: string;
|
|
641
641
|
summary: string;
|
|
642
642
|
images: {
|
|
@@ -647,11 +647,11 @@ export declare const AlpacaNewsResponseSchema: z.ZodObject<{
|
|
|
647
647
|
id: number;
|
|
648
648
|
source: string;
|
|
649
649
|
symbols: string[];
|
|
650
|
+
content: string;
|
|
650
651
|
created_at: string;
|
|
651
652
|
updated_at: string;
|
|
652
653
|
url: string;
|
|
653
654
|
author: string;
|
|
654
|
-
content: string;
|
|
655
655
|
headline: string;
|
|
656
656
|
summary: string;
|
|
657
657
|
images: {
|
|
@@ -665,11 +665,11 @@ export declare const AlpacaNewsResponseSchema: z.ZodObject<{
|
|
|
665
665
|
id: number;
|
|
666
666
|
source: string;
|
|
667
667
|
symbols: string[];
|
|
668
|
+
content: string;
|
|
668
669
|
created_at: string;
|
|
669
670
|
updated_at: string;
|
|
670
671
|
url: string;
|
|
671
672
|
author: string;
|
|
672
|
-
content: string;
|
|
673
673
|
headline: string;
|
|
674
674
|
summary: string;
|
|
675
675
|
images: {
|
|
@@ -683,11 +683,11 @@ export declare const AlpacaNewsResponseSchema: z.ZodObject<{
|
|
|
683
683
|
id: number;
|
|
684
684
|
source: string;
|
|
685
685
|
symbols: string[];
|
|
686
|
+
content: string;
|
|
686
687
|
created_at: string;
|
|
687
688
|
updated_at: string;
|
|
688
689
|
url: string;
|
|
689
690
|
author: string;
|
|
690
|
-
content: string;
|
|
691
691
|
headline: string;
|
|
692
692
|
summary: string;
|
|
693
693
|
images: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptic/utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1016",
|
|
4
4
|
"author": "Adaptic.ai",
|
|
5
5
|
"description": "Utility functions used in Adaptic app and Lambda functions",
|
|
6
6
|
"always-build-npm": true,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@adaptic/backend-legacy": "0.0.
|
|
41
|
+
"@adaptic/backend-legacy": "0.0.1017",
|
|
42
42
|
"@alpacahq/alpaca-trade-api": "^3.1.3",
|
|
43
43
|
"@apollo/client": "^3.13.8",
|
|
44
44
|
"chalk": "^5.4.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alpaca-broker-error-preservation.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/alpaca-broker-error-preservation.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alpaca-client-order-id.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/alpaca-client-order-id.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alpaca-functions.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/alpaca-functions.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alpaca-market-data-retry.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/alpaca-market-data-retry.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alpaca-order-idempotency.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/alpaca-order-idempotency.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alpaca-trading-api.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/alpaca-trading-api.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-endpoints.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/api-endpoints.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asset-allocation.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/asset-allocation.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"atr.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/atr.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-validator.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/auth-validator.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"broker-factory.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/broker-factory.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"broker-types.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/broker-types.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/cache.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/errors.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"financial-regression.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/financial-regression.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-tools.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/format-tools.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-keep-alive.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/http-keep-alive.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http-timeout.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/http-timeout.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/index.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-auth.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/legacy-auth.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/logger.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logging.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/logging.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"market-time.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/market-time.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"massive.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/massive.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metrics-calcs-direction.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/metrics-calcs-direction.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"misc-utils.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/misc-utils.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paginator.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/paginator.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"performance-metrics-fees.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/performance-metrics-fees.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"performance-metrics.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/performance-metrics.test.ts"],"names":[],"mappings":""}
|