@forgezero/providers 0.1.13 → 0.1.14

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/README.md CHANGED
@@ -59,17 +59,59 @@ bun test
59
59
  <a id="forgezero-providers"></a>
60
60
  ## @forgezero/providers
61
61
 
62
- The registry: priority, health, and a terminal-versus-retryable verdict per failure. Named value imports: ProviderError, STRIKES_TO_OFFLINE, VERSION, chainCredentials, chainScopedCredentials, createRegistry, createService, defineProvider, defineProviderMethod, defineService, defineSingleMethodProvider, envCredentials, nextHealth, scopeCredentials, serviceMethod, staticConfig. Named type imports: AnyProviderMethod, Attempt, CallOptions, CallResult, ConfigSource, CredentialSource, DirectAttempt, DirectCallResult, DirectServiceAttachment, DirectServiceConfig, DirectServiceOptions, EmailBatch, EmailBatchItemResult, EmailBatchResult, EmailMessage, FailureKind, InvokeContext, ProviderDefinition, ProviderHealth, ProviderInstanceConfig, ProviderMethodSpec, ProviderMethods, RegistryOptions, ScopedCredentialSource, ServiceDefinition, ServiceMethodAttachment, ServiceMethodContract, ServiceMethods, StaticRegistryConfig. Import only the names used by this file.
62
+ The registry: priority, health, and a terminal-versus-retryable verdict per failure. This entry exposes 16 named value exports and 29 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
63
63
 
64
64
  ```text
65
- import { ProviderError, STRIKES_TO_OFFLINE, VERSION, chainCredentials, chainScopedCredentials, createRegistry } from '@forgezero/providers';
66
- import { createService, defineProvider, defineProviderMethod, defineService, defineSingleMethodProvider, envCredentials } from '@forgezero/providers';
67
- import { nextHealth, scopeCredentials, serviceMethod, staticConfig } from '@forgezero/providers';
68
- import type { AnyProviderMethod, Attempt, CallOptions, CallResult, ConfigSource, CredentialSource } from '@forgezero/providers';
69
- import type { DirectAttempt, DirectCallResult, DirectServiceAttachment, DirectServiceConfig, DirectServiceOptions, EmailBatch } from '@forgezero/providers';
70
- import type { EmailBatchItemResult, EmailBatchResult, EmailMessage, FailureKind, InvokeContext, ProviderDefinition } from '@forgezero/providers';
71
- import type { ProviderHealth, ProviderInstanceConfig, ProviderMethodSpec, ProviderMethods, RegistryOptions, ScopedCredentialSource } from '@forgezero/providers';
72
- import type { ServiceDefinition, ServiceMethodAttachment, ServiceMethodContract, ServiceMethods, StaticRegistryConfig } from '@forgezero/providers';
65
+ import {
66
+ ProviderError,
67
+ STRIKES_TO_OFFLINE,
68
+ VERSION,
69
+ chainCredentials,
70
+ chainScopedCredentials,
71
+ createRegistry,
72
+ createService,
73
+ defineProvider,
74
+ defineProviderMethod,
75
+ defineService,
76
+ defineSingleMethodProvider,
77
+ envCredentials,
78
+ nextHealth,
79
+ scopeCredentials,
80
+ serviceMethod,
81
+ staticConfig,
82
+ } from '@forgezero/providers';
83
+
84
+ import type {
85
+ AnyProviderMethod,
86
+ Attempt,
87
+ CallOptions,
88
+ CallResult,
89
+ ConfigSource,
90
+ CredentialSource,
91
+ DirectAttempt,
92
+ DirectCallResult,
93
+ DirectServiceAttachment,
94
+ DirectServiceConfig,
95
+ DirectServiceOptions,
96
+ EmailBatch,
97
+ EmailBatchItemResult,
98
+ EmailBatchResult,
99
+ EmailMessage,
100
+ FailureKind,
101
+ InvokeContext,
102
+ ProviderDefinition,
103
+ ProviderHealth,
104
+ ProviderInstanceConfig,
105
+ ProviderMethodSpec,
106
+ ProviderMethods,
107
+ RegistryOptions,
108
+ ScopedCredentialSource,
109
+ ServiceDefinition,
110
+ ServiceMethodAttachment,
111
+ ServiceMethodContract,
112
+ ServiceMethods,
113
+ StaticRegistryConfig,
114
+ } from '@forgezero/providers';
73
115
  ```
74
116
 
75
117
  ## @forgezero/providers — Extend with a custom provider and service
@@ -77,9 +119,18 @@ import type { ServiceDefinition, ServiceMethodAttachment, ServiceMethodContract,
77
119
  Public consumers define provider capabilities and application services independently, then attach them with the same ordered-array API.
78
120
 
79
121
  ```text
80
- import { createService, defineService, defineSingleMethodProvider, serviceMethod } from '@forgezero/providers';
81
- import { createVault } from '@forgezero/vault';
82
- import { vaultCredentials } from '@forgezero/vault/providers';
122
+ import {
123
+ createService,
124
+ defineService,
125
+ defineSingleMethodProvider,
126
+ serviceMethod,
127
+ } from '@forgezero/providers';
128
+ import {
129
+ createVault,
130
+ } from '@forgezero/vault';
131
+ import {
132
+ vaultCredentials,
133
+ } from '@forgezero/vault/providers';
83
134
 
84
135
  type Notice = { text: string };
85
136
  type Receipt = { id: string };
@@ -111,9 +162,17 @@ const service = createService(notifications, {
111
162
  Bootstrap tries the scoped Vault entry first and the identically named systemd credential second. If neither exists, the provider call fails.
112
163
 
113
164
  ```text
114
- import { chainScopedCredentials, scopeCredentials } from '@forgezero/providers';
115
- import { createVault, systemdCredentials } from '@forgezero/vault';
116
- import { vaultCredentials } from '@forgezero/vault/providers';
165
+ import {
166
+ chainScopedCredentials,
167
+ scopeCredentials,
168
+ } from '@forgezero/providers';
169
+ import {
170
+ createVault,
171
+ systemdCredentials,
172
+ } from '@forgezero/vault';
173
+ import {
174
+ vaultCredentials,
175
+ } from '@forgezero/vault/providers';
117
176
 
118
177
  const vault = createVault({ project: 'my-project', environment: 'production' });
119
178
  const credentials = chainScopedCredentials(
@@ -127,11 +186,20 @@ const credentials = chainScopedCredentials(
127
186
  <a id="forgezero-providers-email"></a>
128
187
  ## @forgezero/providers/email
129
188
 
130
- JetEmail (`send`, `sendBatch`), SMTP (`send` only), and the typed email service contract; SMTP transport is injected. Named value imports: emailProviders, emailService, jetemail, smtp. Named type imports: JetEmailConfig, SmtpTransport. Import only the names used by this file.
189
+ JetEmail (`send`, `sendBatch`), SMTP (`send` only), and the typed email service contract; SMTP transport is injected. This entry exposes 4 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
131
190
 
132
191
  ```text
133
- import { emailProviders, emailService, jetemail, smtp } from '@forgezero/providers/email';
134
- import type { JetEmailConfig, SmtpTransport } from '@forgezero/providers/email';
192
+ import {
193
+ emailProviders,
194
+ emailService,
195
+ jetemail,
196
+ smtp,
197
+ } from '@forgezero/providers/email';
198
+
199
+ import type {
200
+ JetEmailConfig,
201
+ SmtpTransport,
202
+ } from '@forgezero/providers/email';
135
203
  ```
136
204
 
137
205
  ## @forgezero/providers/email — Email with ordered provider fallback
@@ -139,10 +207,22 @@ import type { JetEmailConfig, SmtpTransport } from '@forgezero/providers/email';
139
207
  The service owns send/sendBatch. Attach provider methods directly in priority arrays; SMTP is never presented as batch-capable.
140
208
 
141
209
  ```text
142
- import { createService, type EmailMessage } from '@forgezero/providers';
143
- import { emailService, jetemail, smtp, type SmtpTransport } from '@forgezero/providers/email';
144
- import { createVault } from '@forgezero/vault';
145
- import { vaultCredentials } from '@forgezero/vault/providers';
210
+ import {
211
+ createService,
212
+ type EmailMessage,
213
+ } from '@forgezero/providers';
214
+ import {
215
+ emailService,
216
+ jetemail,
217
+ smtp,
218
+ type SmtpTransport,
219
+ } from '@forgezero/providers/email';
220
+ import {
221
+ createVault,
222
+ } from '@forgezero/vault';
223
+ import {
224
+ vaultCredentials,
225
+ } from '@forgezero/vault/providers';
146
226
 
147
227
  // Adapt Nodemailer, Bun, or an HTTP SMTP relay once at the host boundary.
148
228
  declare const transport: SmtpTransport;
@@ -167,86 +247,177 @@ console.log(outcome.result, outcome.attempts);
167
247
  <a id="forgezero-providers-database"></a>
168
248
  ## @forgezero/providers/database
169
249
 
170
- ArangoDB in the registry for credential rotation and health — with failover off by default. Named value imports: ARANGO_COMMUNITY_VERSION, ARANGO_SERVER_MODE_PATH, MAX_ARANGO_COORDINATORS, arangoCoordinatorUrls, arangodb, databaseProviders, resetPools. Named type imports: ArangoConfig, ArangoConnectOptions, ArangoCoordinatorMember, ArangoLike, ArangoMembershipSnapshot, ArangoMembershipVerifier, Query. Import only the names used by this file.
250
+ ArangoDB in the registry for credential rotation and health — with failover off by default. This entry exposes 7 named value exports and 7 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
171
251
 
172
252
  ```text
173
- import { ARANGO_COMMUNITY_VERSION, ARANGO_SERVER_MODE_PATH, MAX_ARANGO_COORDINATORS, arangoCoordinatorUrls, arangodb, databaseProviders } from '@forgezero/providers/database';
174
- import { resetPools } from '@forgezero/providers/database';
175
- import type { ArangoConfig, ArangoConnectOptions, ArangoCoordinatorMember, ArangoLike, ArangoMembershipSnapshot, ArangoMembershipVerifier } from '@forgezero/providers/database';
176
- import type { Query } from '@forgezero/providers/database';
253
+ import {
254
+ ARANGO_COMMUNITY_VERSION,
255
+ ARANGO_SERVER_MODE_PATH,
256
+ MAX_ARANGO_COORDINATORS,
257
+ arangoCoordinatorUrls,
258
+ arangodb,
259
+ databaseProviders,
260
+ resetPools,
261
+ } from '@forgezero/providers/database';
262
+
263
+ import type {
264
+ ArangoConfig,
265
+ ArangoConnectOptions,
266
+ ArangoCoordinatorMember,
267
+ ArangoLike,
268
+ ArangoMembershipSnapshot,
269
+ ArangoMembershipVerifier,
270
+ Query,
271
+ } from '@forgezero/providers/database';
177
272
  ```
178
273
 
179
274
  <a id="forgezero-providers-http"></a>
180
275
  ## @forgezero/providers/http
181
276
 
182
- Outbound HTTP with a per-host weight budget reserved before the call and settled from the response. Named value imports: BudgetExhausted, binanceWeight, budgetState, createHttpClient, http, httpProviders, resetBudgets, settle, spend. Named type imports: HostBudget, HttpClient, HttpConfig, HttpRequest, HttpResponse. Import only the names used by this file.
277
+ Outbound HTTP with a per-host weight budget reserved before the call and settled from the response. This entry exposes 9 named value exports and 5 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
183
278
 
184
279
  ```text
185
- import { BudgetExhausted, binanceWeight, budgetState, createHttpClient, http, httpProviders } from '@forgezero/providers/http';
186
- import { resetBudgets, settle, spend } from '@forgezero/providers/http';
187
- import type { HostBudget, HttpClient, HttpConfig, HttpRequest, HttpResponse } from '@forgezero/providers/http';
280
+ import {
281
+ BudgetExhausted,
282
+ binanceWeight,
283
+ budgetState,
284
+ createHttpClient,
285
+ http,
286
+ httpProviders,
287
+ resetBudgets,
288
+ settle,
289
+ spend,
290
+ } from '@forgezero/providers/http';
291
+
292
+ import type {
293
+ HostBudget,
294
+ HttpClient,
295
+ HttpConfig,
296
+ HttpRequest,
297
+ HttpResponse,
298
+ } from '@forgezero/providers/http';
188
299
  ```
189
300
 
190
301
  <a id="forgezero-providers-pool"></a>
191
302
  ## @forgezero/providers/pool
192
303
 
193
- Which outbound address a request leaves by, sticky per key, over the same budget as everything else. Named value imports: PoolEmpty, PoolExhausted, createAddressPool. Named type imports: AddressPool, Lease, PoolAddress, PoolOptions. Import only the names used by this file.
304
+ Which outbound address a request leaves by, sticky per key, over the same budget as everything else. This entry exposes 3 named value exports and 4 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
194
305
 
195
306
  ```text
196
- import { PoolEmpty, PoolExhausted, createAddressPool } from '@forgezero/providers/pool';
197
- import type { AddressPool, Lease, PoolAddress, PoolOptions } from '@forgezero/providers/pool';
307
+ import {
308
+ PoolEmpty,
309
+ PoolExhausted,
310
+ createAddressPool,
311
+ } from '@forgezero/providers/pool';
312
+
313
+ import type {
314
+ AddressPool,
315
+ Lease,
316
+ PoolAddress,
317
+ PoolOptions,
318
+ } from '@forgezero/providers/pool';
198
319
  ```
199
320
 
200
321
  <a id="forgezero-providers-chain"></a>
201
322
  ## @forgezero/providers/chain
202
323
 
203
- An EVM node behind the same failover as any other service: read logs, broadcast, and never stop scanning because one endpoint rate-limited. Named value imports: evmRpc. Named type imports: ChainCall, ChainLog, ChainReceipt, ChainResult. Import only the names used by this file.
324
+ An EVM node behind the same failover as any other service: read logs, broadcast, and never stop scanning because one endpoint rate-limited. This entry exposes 1 named value export and 4 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
204
325
 
205
326
  ```text
206
- import { evmRpc } from '@forgezero/providers/chain';
207
- import type { ChainCall, ChainLog, ChainReceipt, ChainResult } from '@forgezero/providers/chain';
327
+ import {
328
+ evmRpc,
329
+ } from '@forgezero/providers/chain';
330
+
331
+ import type {
332
+ ChainCall,
333
+ ChainLog,
334
+ ChainReceipt,
335
+ ChainResult,
336
+ } from '@forgezero/providers/chain';
208
337
  ```
209
338
 
210
339
  <a id="forgezero-providers-binance"></a>
211
340
  ## @forgezero/providers/binance
212
341
 
213
- Binance behind the venue adapter: three hosts, one weight budget, signed over the exact string that is sent. Named value imports: binanceSymbol, createBinanceAdapter, readBinanceError, toOrderStatus. Named type imports: BinanceCredentials, BinanceOptions. Import only the names used by this file.
342
+ Binance behind the venue adapter: three hosts, one weight budget, signed over the exact string that is sent. This entry exposes 4 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
214
343
 
215
344
  ```text
216
- import { binanceSymbol, createBinanceAdapter, readBinanceError, toOrderStatus } from '@forgezero/providers/binance';
217
- import type { BinanceCredentials, BinanceOptions } from '@forgezero/providers/binance';
345
+ import {
346
+ binanceSymbol,
347
+ createBinanceAdapter,
348
+ readBinanceError,
349
+ toOrderStatus,
350
+ } from '@forgezero/providers/binance';
351
+
352
+ import type {
353
+ BinanceCredentials,
354
+ BinanceOptions,
355
+ } from '@forgezero/providers/binance';
218
356
  ```
219
357
 
220
358
  <a id="forgezero-providers-storage"></a>
221
359
  ## @forgezero/providers/storage
222
360
 
223
- S3-compatible object storage, SigV4 signed with Web Crypto and no vendor SDK. Named value imports: MAX_SINGLE_PUT_BYTES, StorageError, amzDate, createS3Client, encodeSegment, parseListXml, s3, signRequest, storageProviders. Named type imports: ObjectSummary, PutObjectArgs, S3Client, S3Config, S3Credentials, SignedRequest, StorageRequest. Import only the names used by this file.
361
+ S3-compatible object storage, SigV4 signed with Web Crypto and no vendor SDK. This entry exposes 9 named value exports and 7 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
224
362
 
225
363
  ```text
226
- import { MAX_SINGLE_PUT_BYTES, StorageError, amzDate, createS3Client, encodeSegment, parseListXml } from '@forgezero/providers/storage';
227
- import { s3, signRequest, storageProviders } from '@forgezero/providers/storage';
228
- import type { ObjectSummary, PutObjectArgs, S3Client, S3Config, S3Credentials, SignedRequest } from '@forgezero/providers/storage';
229
- import type { StorageRequest } from '@forgezero/providers/storage';
364
+ import {
365
+ MAX_SINGLE_PUT_BYTES,
366
+ StorageError,
367
+ amzDate,
368
+ createS3Client,
369
+ encodeSegment,
370
+ parseListXml,
371
+ s3,
372
+ signRequest,
373
+ storageProviders,
374
+ } from '@forgezero/providers/storage';
375
+
376
+ import type {
377
+ ObjectSummary,
378
+ PutObjectArgs,
379
+ S3Client,
380
+ S3Config,
381
+ S3Credentials,
382
+ SignedRequest,
383
+ StorageRequest,
384
+ } from '@forgezero/providers/storage';
230
385
  ```
231
386
 
232
387
  <a id="forgezero-providers-translation"></a>
233
388
  ## @forgezero/providers/translation
234
389
 
235
- Google AI Studio translation with strict batch alignment and classified quota failures. Named value imports: TranslationError, googleAiStudio, parseStrings, translationProviders. Named type imports: TranslateRequest, TranslateResult, TranslationProvider. Import only the names used by this file.
390
+ Google AI Studio translation with strict batch alignment and classified quota failures. This entry exposes 4 named value exports and 3 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
236
391
 
237
392
  ```text
238
- import { TranslationError, googleAiStudio, parseStrings, translationProviders } from '@forgezero/providers/translation';
239
- import type { TranslateRequest, TranslateResult, TranslationProvider } from '@forgezero/providers/translation';
393
+ import {
394
+ TranslationError,
395
+ googleAiStudio,
396
+ parseStrings,
397
+ translationProviders,
398
+ } from '@forgezero/providers/translation';
399
+
400
+ import type {
401
+ TranslateRequest,
402
+ TranslateResult,
403
+ TranslationProvider,
404
+ } from '@forgezero/providers/translation';
240
405
  ```
241
406
 
242
407
  <a id="forgezero-providers-realtime"></a>
243
408
  ## @forgezero/providers/realtime
244
409
 
245
- Cloudflare KV node-directory and Durable Object fan-out clients for project-defined realtime services. Named value imports: RealtimeProviderError, cloudflareRealtime. Named type imports: RealtimeProviderOptions. Import only the names used by this file.
410
+ Cloudflare KV node-directory and Durable Object fan-out clients for project-defined realtime services. This entry exposes 2 named value exports and 1 named type export. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
246
411
 
247
412
  ```text
248
- import { RealtimeProviderError, cloudflareRealtime } from '@forgezero/providers/realtime';
249
- import type { RealtimeProviderOptions } from '@forgezero/providers/realtime';
413
+ import {
414
+ RealtimeProviderError,
415
+ cloudflareRealtime,
416
+ } from '@forgezero/providers/realtime';
417
+
418
+ import type {
419
+ RealtimeProviderOptions,
420
+ } from '@forgezero/providers/realtime';
250
421
  ```
251
422
 
252
423
  ## Built-in provider capabilities
package/dist/binance.js CHANGED
@@ -298,7 +298,7 @@ function createService(definition, methods, options = {}) {
298
298
  }
299
299
  };
300
300
  }
301
- var VERSION = "0.1.13";
301
+ var VERSION = "0.1.14";
302
302
 
303
303
  // src/http.ts
304
304
  class BudgetExhausted extends ProviderError {
package/dist/chain.js CHANGED
@@ -298,7 +298,7 @@ function createService(definition, methods, options = {}) {
298
298
  }
299
299
  };
300
300
  }
301
- var VERSION = "0.1.13";
301
+ var VERSION = "0.1.14";
302
302
 
303
303
  // src/chain.ts
304
304
  var hexToNumber = (value) => Number(BigInt(value));
package/dist/database.js CHANGED
@@ -298,7 +298,7 @@ function createService(definition, methods, options = {}) {
298
298
  }
299
299
  };
300
300
  }
301
- var VERSION = "0.1.13";
301
+ var VERSION = "0.1.14";
302
302
 
303
303
  // src/database.ts
304
304
  var pools = new Map;
package/dist/email.js CHANGED
@@ -298,7 +298,7 @@ function createService(definition, methods, options = {}) {
298
298
  }
299
299
  };
300
300
  }
301
- var VERSION = "0.1.13";
301
+ var VERSION = "0.1.14";
302
302
 
303
303
  // src/email.ts
304
304
  var recipients = (to) => Array.isArray(to) ? [...to] : [to];
package/dist/http.js CHANGED
@@ -298,7 +298,7 @@ function createService(definition, methods, options = {}) {
298
298
  }
299
299
  };
300
300
  }
301
- var VERSION = "0.1.13";
301
+ var VERSION = "0.1.14";
302
302
 
303
303
  // src/http.ts
304
304
  class BudgetExhausted extends ProviderError {
package/dist/index.d.ts CHANGED
@@ -285,5 +285,5 @@ export interface EmailBatchResult {
285
285
  };
286
286
  results: readonly EmailBatchItemResult[];
287
287
  }
288
- export declare const VERSION = "0.1.13";
288
+ export declare const VERSION = "0.1.14";
289
289
  export {};
package/dist/index.js CHANGED
@@ -298,7 +298,7 @@ function createService(definition, methods, options = {}) {
298
298
  }
299
299
  };
300
300
  }
301
- var VERSION = "0.1.13";
301
+ var VERSION = "0.1.14";
302
302
  export {
303
303
  staticConfig,
304
304
  serviceMethod,
package/dist/pool.js CHANGED
@@ -298,7 +298,7 @@ function createService(definition, methods, options = {}) {
298
298
  }
299
299
  };
300
300
  }
301
- var VERSION = "0.1.13";
301
+ var VERSION = "0.1.14";
302
302
 
303
303
  // src/http.ts
304
304
  class BudgetExhausted extends ProviderError {
package/dist/storage.js CHANGED
@@ -298,7 +298,7 @@ function createService(definition, methods, options = {}) {
298
298
  }
299
299
  };
300
300
  }
301
- var VERSION = "0.1.13";
301
+ var VERSION = "0.1.14";
302
302
 
303
303
  // src/storage.ts
304
304
  var encoder = new TextEncoder;
@@ -298,7 +298,7 @@ function createService(definition, methods, options = {}) {
298
298
  }
299
299
  };
300
300
  }
301
- var VERSION = "0.1.13";
301
+ var VERSION = "0.1.14";
302
302
 
303
303
  // src/translation.ts
304
304
  var GOOGLE_ENDPOINT = "https://generativelanguage.googleapis.com/v1beta/models";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgezero/providers",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -85,6 +85,6 @@
85
85
  "LICENSE"
86
86
  ],
87
87
  "dependencies": {
88
- "@forgezero/runtime": "^0.1.8"
88
+ "@forgezero/runtime": "^0.1.9"
89
89
  }
90
90
  }