@mostlyrightmd/core 1.2.0 → 1.4.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.
@@ -234,7 +234,7 @@ interface BuildSnapshotOptions {
234
234
  */
235
235
  declare function buildSnapshot(opts: BuildSnapshotOptions): DataSnapshot;
236
236
 
237
- interface TradewindsErrorOptions {
237
+ interface MostlyRightErrorOptions {
238
238
  errorCode?: string;
239
239
  source?: string | null;
240
240
  requestId?: string | null;
@@ -247,13 +247,13 @@ interface TradewindsErrorOptions {
247
247
  * involved (e.g. "iem.archive") when applicable, and `requestId` correlates a
248
248
  * JSON-RPC / MCP request id when applicable.
249
249
  */
250
- declare class TradewindsError extends Error {
250
+ declare class MostlyRightError extends Error {
251
251
  /** Subclass override — the stable string enum surfaced via `errorCode`. */
252
252
  static defaultErrorCode: string;
253
253
  readonly errorCode: string;
254
254
  readonly source: string | null;
255
255
  readonly requestId: string | null;
256
- constructor(message?: string, options?: TradewindsErrorOptions);
256
+ constructor(message?: string, options?: MostlyRightErrorOptions);
257
257
  /**
258
258
  * Subclass hook returning the structured attributes for `toDict`.
259
259
  * Values are passed through `toJsonSafe` by `toDict()`, so subclasses
@@ -266,11 +266,11 @@ declare class TradewindsError extends Error {
266
266
  /** Shared reason enum — MUST match Python EXACTLY (Phase 21 D-04). */
267
267
  declare const DATA_AVAILABILITY_REASONS: readonly ["model_unavailable", "out_of_window", "cache_miss", "source_404", "source_5xx", "rate_limited"];
268
268
  type DataAvailabilityReason = (typeof DATA_AVAILABILITY_REASONS)[number];
269
- interface DataAvailabilityErrorOptions extends TradewindsErrorOptions {
269
+ interface DataAvailabilityErrorOptions extends MostlyRightErrorOptions {
270
270
  reason: DataAvailabilityReason;
271
271
  hint: string;
272
272
  }
273
- declare class DataAvailabilityError extends TradewindsError {
273
+ declare class DataAvailabilityError extends MostlyRightError {
274
274
  static defaultErrorCode: string;
275
275
  readonly reason: DataAvailabilityReason;
276
276
  readonly hint: string;
@@ -297,12 +297,12 @@ declare function registerSchema(info: SchemaInfo): void;
297
297
  /**
298
298
  * Return a multi-line description of a registered schema.
299
299
  *
300
- * @throws TradewindsError if `schemaId` is not registered. The error code is
300
+ * @throws MostlyRightError if `schemaId` is not registered. The error code is
301
301
  * `UNKNOWN_SCHEMA` so callers can distinguish from validation/IO errors.
302
302
  */
303
303
  declare function describe(schemaId: string): string;
304
304
  /** Thrown by `describe` when `schemaId` is not registered. */
305
- declare class UnknownSchemaError extends TradewindsError {
305
+ declare class UnknownSchemaError extends MostlyRightError {
306
306
  constructor(message: string);
307
307
  static readonly defaultErrorCode = "UNKNOWN_SCHEMA";
308
308
  }
@@ -234,7 +234,7 @@ interface BuildSnapshotOptions {
234
234
  */
235
235
  declare function buildSnapshot(opts: BuildSnapshotOptions): DataSnapshot;
236
236
 
237
- interface TradewindsErrorOptions {
237
+ interface MostlyRightErrorOptions {
238
238
  errorCode?: string;
239
239
  source?: string | null;
240
240
  requestId?: string | null;
@@ -247,13 +247,13 @@ interface TradewindsErrorOptions {
247
247
  * involved (e.g. "iem.archive") when applicable, and `requestId` correlates a
248
248
  * JSON-RPC / MCP request id when applicable.
249
249
  */
250
- declare class TradewindsError extends Error {
250
+ declare class MostlyRightError extends Error {
251
251
  /** Subclass override — the stable string enum surfaced via `errorCode`. */
252
252
  static defaultErrorCode: string;
253
253
  readonly errorCode: string;
254
254
  readonly source: string | null;
255
255
  readonly requestId: string | null;
256
- constructor(message?: string, options?: TradewindsErrorOptions);
256
+ constructor(message?: string, options?: MostlyRightErrorOptions);
257
257
  /**
258
258
  * Subclass hook returning the structured attributes for `toDict`.
259
259
  * Values are passed through `toJsonSafe` by `toDict()`, so subclasses
@@ -266,11 +266,11 @@ declare class TradewindsError extends Error {
266
266
  /** Shared reason enum — MUST match Python EXACTLY (Phase 21 D-04). */
267
267
  declare const DATA_AVAILABILITY_REASONS: readonly ["model_unavailable", "out_of_window", "cache_miss", "source_404", "source_5xx", "rate_limited"];
268
268
  type DataAvailabilityReason = (typeof DATA_AVAILABILITY_REASONS)[number];
269
- interface DataAvailabilityErrorOptions extends TradewindsErrorOptions {
269
+ interface DataAvailabilityErrorOptions extends MostlyRightErrorOptions {
270
270
  reason: DataAvailabilityReason;
271
271
  hint: string;
272
272
  }
273
- declare class DataAvailabilityError extends TradewindsError {
273
+ declare class DataAvailabilityError extends MostlyRightError {
274
274
  static defaultErrorCode: string;
275
275
  readonly reason: DataAvailabilityReason;
276
276
  readonly hint: string;
@@ -297,12 +297,12 @@ declare function registerSchema(info: SchemaInfo): void;
297
297
  /**
298
298
  * Return a multi-line description of a registered schema.
299
299
  *
300
- * @throws TradewindsError if `schemaId` is not registered. The error code is
300
+ * @throws MostlyRightError if `schemaId` is not registered. The error code is
301
301
  * `UNKNOWN_SCHEMA` so callers can distinguish from validation/IO errors.
302
302
  */
303
303
  declare function describe(schemaId: string): string;
304
304
  /** Thrown by `describe` when `schemaId` is not registered. */
305
- declare class UnknownSchemaError extends TradewindsError {
305
+ declare class UnknownSchemaError extends MostlyRightError {
306
306
  constructor(message: string);
307
307
  static readonly defaultErrorCode = "UNKNOWN_SCHEMA";
308
308
  }