@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.
- package/dist/discovery/index.cjs +428 -163
- package/dist/discovery/index.cjs.map +1 -1
- package/dist/discovery/index.d.cts +7 -7
- package/dist/discovery/index.d.ts +7 -7
- package/dist/discovery/index.mjs +428 -163
- package/dist/discovery/index.mjs.map +1 -1
- package/dist/index.cjs +580 -174
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +313 -30
- package/dist/index.d.ts +313 -30
- package/dist/index.global.js +574 -173
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +574 -173
- package/dist/index.mjs.map +1 -1
- package/dist/internal/cache/index.browser.cjs +424 -159
- package/dist/internal/cache/index.browser.cjs.map +1 -1
- package/dist/internal/cache/index.browser.mjs +1 -1
- package/dist/internal/cache/index.cjs +424 -159
- package/dist/internal/cache/index.cjs.map +1 -1
- package/dist/internal/cache/index.mjs +1 -1
- package/dist/internal/{chunk-IPC4XUYW.mjs → chunk-QDQSYUFW.mjs} +425 -160
- package/dist/internal/chunk-QDQSYUFW.mjs.map +1 -0
- package/dist/temporal/index.cjs +56 -4
- package/dist/temporal/index.cjs.map +1 -1
- package/dist/temporal/index.d.cts +24 -1
- package/dist/temporal/index.d.ts +24 -1
- package/dist/temporal/index.mjs +55 -4
- package/dist/temporal/index.mjs.map +1 -1
- package/dist/validator.cjs +694 -109
- package/dist/validator.cjs.map +1 -1
- package/dist/validator.mjs +694 -109
- package/dist/validator.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/internal/chunk-IPC4XUYW.mjs.map +0 -1
|
@@ -234,7 +234,7 @@ interface BuildSnapshotOptions {
|
|
|
234
234
|
*/
|
|
235
235
|
declare function buildSnapshot(opts: BuildSnapshotOptions): DataSnapshot;
|
|
236
236
|
|
|
237
|
-
interface
|
|
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
|
|
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?:
|
|
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
|
|
269
|
+
interface DataAvailabilityErrorOptions extends MostlyRightErrorOptions {
|
|
270
270
|
reason: DataAvailabilityReason;
|
|
271
271
|
hint: string;
|
|
272
272
|
}
|
|
273
|
-
declare class DataAvailabilityError extends
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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?:
|
|
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
|
|
269
|
+
interface DataAvailabilityErrorOptions extends MostlyRightErrorOptions {
|
|
270
270
|
reason: DataAvailabilityReason;
|
|
271
271
|
hint: string;
|
|
272
272
|
}
|
|
273
|
-
declare class DataAvailabilityError extends
|
|
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
|
|
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
|
|
305
|
+
declare class UnknownSchemaError extends MostlyRightError {
|
|
306
306
|
constructor(message: string);
|
|
307
307
|
static readonly defaultErrorCode = "UNKNOWN_SCHEMA";
|
|
308
308
|
}
|