@lunora/server 1.0.0-alpha.96 → 1.0.0-alpha.97
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.mts +49 -8
- package/dist/types.d.ts +49 -8
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Validator, Infer, v, Id, ValidatorMap, InferValidatorMap, ColumnValidator } from '@lunora/values';
|
|
2
2
|
export { type ColumnValidator, type GeoPoint, type Id, type Infer, ValidationError, type Validator, type ValidatorKind, v } from '@lunora/values';
|
|
3
3
|
import { ArgsValidator, InferArgs, RegisteredAction, ExposeConfig, X402ProcedureConfig, ActionCtx, MutationCtx, RegisteredMutation, QueryCtx, RegisteredQuery, DurableStreamOptions, RegisteredStream, FunctionKind, TableDefinition, RegisteredFunction, VectorIndexDefinition, Schema, AggregateOp, GlobalBackend, RelationDefinition, OnDeleteAction, SearchLanguage, SearchStrategy, ExternalSourceDefinition, TriggerBuilder, TriggerDefinition, VectorEmbedder, VectorMetric, DurableObjectJurisdiction, AggregateIndexDefinition, RankIndexDefinition, Secrets, LifecycleEvent, ShardInitEvent, RegisteredLifecycleHook } from "./types.mjs";
|
|
4
|
-
export { type AnyApi, type AuthState, type CachePurge, type DatabaseReader, type DatabaseWriter, type FunctionVisibility, type GeoBoundingBox, type GeoFilterBuilder, type GeoIndexDefinition, type GeoPointInput, type IndexDefinition, type IndexRangeBuilder, type LifecycleEventKind, type LogFields, type LunoraLogMethod, type LunoraLogger, type LunoraMetrics, type LunoraTracer, type LunoraWideEvent, type MutationStorage, type PaginationOptions, type PaginationResult, type RankSortKey, type ReadOnlyStorage, type RestCacheConfig, type RunQueryOptions, type ScheduledFunctionDoc, type ScheduledJob, type Scheduler, type SearchFilterBuilder, type SearchIndexDefinition, type ShardMode, type SpanEvaluation, type SpanHandle, type SpanKind, type SpanLink, type SpanOptions, type Storage, type StorageMetadata, type StorageObjectBody, type StorageObjectHead, type StorageRange, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemTableName, type TableReader, type TableVectorIndex, type TriggerAggregateOptions, type TriggerCtx, type TriggerDatabase, type TriggerDeleteEvent, type TriggerEvent, type TriggerGroupByEntry, type TriggerGroupByOptions, type TriggerHandler, type TriggerInsertEvent, type TriggerOp, type TriggerQueryArgs, type TriggerQueryPage, type TriggerRankOptions, type TriggerRankPageOptions, type TriggerRankResult, type TriggerRow, type TriggerTiming, type TriggerUpdateEvent, type TtlDefinition, type VectorMatch, type VectorMatches, type VectorQueryInput, type VectorRecord, type VectorSearch, type VectorSearchReader, type VectorUpsertInput, type WorkflowCreateOptions, type WorkflowEventDefinition, type WorkflowHandle, type WorkflowInstance, type WorkflowInstanceStatus, type WorkflowStatusResult, type Workflows, anyApi } from "./types.mjs";
|
|
4
|
+
export { type AnyApi, type AuthState, type CachePurge, type DatabaseReader, type DatabaseWriter, type FunctionVisibility, type GeoBoundingBox, type GeoFilterBuilder, type GeoIndexDefinition, type GeoPointInput, type IndexDefinition, type IndexRangeBuilder, type LifecycleEventKind, type LogFields, type LunoraLogMethod, type LunoraLogger, type LunoraMetrics, type LunoraTracer, type LunoraWideEvent, type MutationStorage, type PaginationOptions, type PaginationResult, type RankSortKey, type ReadOnlyStorage, type RestCacheConfig, type RetryPolicy, type RunQueryOptions, type ScheduledFunctionDoc, type ScheduledJob, type Scheduler, type SearchFilterBuilder, type SearchIndexDefinition, type ShardMode, type SpanEvaluation, type SpanHandle, type SpanKind, type SpanLink, type SpanOptions, type Storage, type StorageMetadata, type StorageObjectBody, type StorageObjectHead, type StorageRange, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemTableName, type TableReader, type TableVectorIndex, type TriggerAggregateOptions, type TriggerCtx, type TriggerDatabase, type TriggerDeleteEvent, type TriggerEvent, type TriggerGroupByEntry, type TriggerGroupByOptions, type TriggerHandler, type TriggerInsertEvent, type TriggerOp, type TriggerQueryArgs, type TriggerQueryPage, type TriggerRankOptions, type TriggerRankPageOptions, type TriggerRankResult, type TriggerRow, type TriggerTiming, type TriggerUpdateEvent, type TtlDefinition, type VectorMatch, type VectorMatches, type VectorQueryInput, type VectorRecord, type VectorSearch, type VectorSearchReader, type VectorUpsertInput, type WorkflowCreateOptions, type WorkflowEventDefinition, type WorkflowHandle, type WorkflowInstance, type WorkflowInstanceStatus, type WorkflowStatusResult, type Workflows, anyApi } from "./types.mjs";
|
|
5
5
|
import { LunoraError } from '@lunora/errors';
|
|
6
6
|
export { LunoraError, type LunoraErrorCode } from '@lunora/errors';
|
|
7
7
|
import { Context, Hono } from 'hono';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Validator, Infer, v, Id, ValidatorMap, InferValidatorMap, ColumnValidator } from '@lunora/values';
|
|
2
2
|
export { type ColumnValidator, type GeoPoint, type Id, type Infer, ValidationError, type Validator, type ValidatorKind, v } from '@lunora/values';
|
|
3
3
|
import { ArgsValidator, InferArgs, RegisteredAction, ExposeConfig, X402ProcedureConfig, ActionCtx, MutationCtx, RegisteredMutation, QueryCtx, RegisteredQuery, DurableStreamOptions, RegisteredStream, FunctionKind, TableDefinition, RegisteredFunction, VectorIndexDefinition, Schema, AggregateOp, GlobalBackend, RelationDefinition, OnDeleteAction, SearchLanguage, SearchStrategy, ExternalSourceDefinition, TriggerBuilder, TriggerDefinition, VectorEmbedder, VectorMetric, DurableObjectJurisdiction, AggregateIndexDefinition, RankIndexDefinition, Secrets, LifecycleEvent, ShardInitEvent, RegisteredLifecycleHook } from "./types.js";
|
|
4
|
-
export { type AnyApi, type AuthState, type CachePurge, type DatabaseReader, type DatabaseWriter, type FunctionVisibility, type GeoBoundingBox, type GeoFilterBuilder, type GeoIndexDefinition, type GeoPointInput, type IndexDefinition, type IndexRangeBuilder, type LifecycleEventKind, type LogFields, type LunoraLogMethod, type LunoraLogger, type LunoraMetrics, type LunoraTracer, type LunoraWideEvent, type MutationStorage, type PaginationOptions, type PaginationResult, type RankSortKey, type ReadOnlyStorage, type RestCacheConfig, type RunQueryOptions, type ScheduledFunctionDoc, type ScheduledJob, type Scheduler, type SearchFilterBuilder, type SearchIndexDefinition, type ShardMode, type SpanEvaluation, type SpanHandle, type SpanKind, type SpanLink, type SpanOptions, type Storage, type StorageMetadata, type StorageObjectBody, type StorageObjectHead, type StorageRange, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemTableName, type TableReader, type TableVectorIndex, type TriggerAggregateOptions, type TriggerCtx, type TriggerDatabase, type TriggerDeleteEvent, type TriggerEvent, type TriggerGroupByEntry, type TriggerGroupByOptions, type TriggerHandler, type TriggerInsertEvent, type TriggerOp, type TriggerQueryArgs, type TriggerQueryPage, type TriggerRankOptions, type TriggerRankPageOptions, type TriggerRankResult, type TriggerRow, type TriggerTiming, type TriggerUpdateEvent, type TtlDefinition, type VectorMatch, type VectorMatches, type VectorQueryInput, type VectorRecord, type VectorSearch, type VectorSearchReader, type VectorUpsertInput, type WorkflowCreateOptions, type WorkflowEventDefinition, type WorkflowHandle, type WorkflowInstance, type WorkflowInstanceStatus, type WorkflowStatusResult, type Workflows, anyApi } from "./types.js";
|
|
4
|
+
export { type AnyApi, type AuthState, type CachePurge, type DatabaseReader, type DatabaseWriter, type FunctionVisibility, type GeoBoundingBox, type GeoFilterBuilder, type GeoIndexDefinition, type GeoPointInput, type IndexDefinition, type IndexRangeBuilder, type LifecycleEventKind, type LogFields, type LunoraLogMethod, type LunoraLogger, type LunoraMetrics, type LunoraTracer, type LunoraWideEvent, type MutationStorage, type PaginationOptions, type PaginationResult, type RankSortKey, type ReadOnlyStorage, type RestCacheConfig, type RetryPolicy, type RunQueryOptions, type ScheduledFunctionDoc, type ScheduledJob, type Scheduler, type SearchFilterBuilder, type SearchIndexDefinition, type ShardMode, type SpanEvaluation, type SpanHandle, type SpanKind, type SpanLink, type SpanOptions, type Storage, type StorageMetadata, type StorageObjectBody, type StorageObjectHead, type StorageRange, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemTableName, type TableReader, type TableVectorIndex, type TriggerAggregateOptions, type TriggerCtx, type TriggerDatabase, type TriggerDeleteEvent, type TriggerEvent, type TriggerGroupByEntry, type TriggerGroupByOptions, type TriggerHandler, type TriggerInsertEvent, type TriggerOp, type TriggerQueryArgs, type TriggerQueryPage, type TriggerRankOptions, type TriggerRankPageOptions, type TriggerRankResult, type TriggerRow, type TriggerTiming, type TriggerUpdateEvent, type TtlDefinition, type VectorMatch, type VectorMatches, type VectorQueryInput, type VectorRecord, type VectorSearch, type VectorSearchReader, type VectorUpsertInput, type WorkflowCreateOptions, type WorkflowEventDefinition, type WorkflowHandle, type WorkflowInstance, type WorkflowInstanceStatus, type WorkflowStatusResult, type Workflows, anyApi } from "./types.js";
|
|
5
5
|
import { LunoraError } from '@lunora/errors';
|
|
6
6
|
export { LunoraError, type LunoraErrorCode } from '@lunora/errors';
|
|
7
7
|
import { Context, Hono } from 'hono';
|
package/dist/types.d.mts
CHANGED
|
@@ -786,14 +786,26 @@ interface ScheduledFunctionDoc {
|
|
|
786
786
|
attempts?: number;
|
|
787
787
|
/** When the job was enqueued (epoch ms). */
|
|
788
788
|
enqueuedAt: number;
|
|
789
|
-
/**
|
|
790
|
-
|
|
789
|
+
/**
|
|
790
|
+
* Fully-qualified `ns:fn` path of the function to invoke. Absent when the job
|
|
791
|
+
* targets a durable workflow/agent instead — exactly one of `functionPath` /
|
|
792
|
+
* {@link ScheduledFunctionDoc.workflow} is set on any given row.
|
|
793
|
+
*/
|
|
794
|
+
functionPath?: string;
|
|
791
795
|
/** The job's id (the `_scheduled_functions` row id). */
|
|
792
796
|
id: string;
|
|
797
|
+
/** Logical workpool the job is concurrency-gated by, when any. */
|
|
798
|
+
pool?: string;
|
|
793
799
|
/** When the job is scheduled to fire (epoch ms). */
|
|
794
800
|
scheduledFor: number;
|
|
795
801
|
/** Routing hint forwarded so dispatch lands on the right shard. */
|
|
796
802
|
shardKey?: string;
|
|
803
|
+
/**
|
|
804
|
+
* The `WORKFLOW_*`/`AGENT_*` binding a fresh durable instance is started from
|
|
805
|
+
* on fire (the {@link ScheduledFunctionDoc.args} become its `params`). Set
|
|
806
|
+
* instead of {@link ScheduledFunctionDoc.functionPath}.
|
|
807
|
+
*/
|
|
808
|
+
workflow?: string;
|
|
797
809
|
}
|
|
798
810
|
/** Maps each system table name to the document shape its reads return. */
|
|
799
811
|
interface SystemDocMap {
|
|
@@ -1226,22 +1238,51 @@ interface AuthState {
|
|
|
1226
1238
|
}
|
|
1227
1239
|
/**
|
|
1228
1240
|
* A pending scheduled invocation as surfaced by {@link Scheduler.list} /
|
|
1229
|
-
* {@link Scheduler.get}. A clean public mirror of `@lunora/scheduler`'s
|
|
1230
|
-
* `ScheduleRecord
|
|
1231
|
-
*
|
|
1232
|
-
|
|
1241
|
+
* {@link Scheduler.get}. A clean public mirror of `@lunora/scheduler`'s
|
|
1242
|
+
* `ScheduleRecord`, re-declared so the public ctx surface names its own type
|
|
1243
|
+
* rather than re-exporting the scheduler's. It must stay field-for-field
|
|
1244
|
+
* identical: `__tests__/scheduler-mirror.test.ts` asserts mutual assignability
|
|
1245
|
+
* against the real `ScheduleRecord` and fails `lint:types` if either side moves.
|
|
1246
|
+
*/
|
|
1247
|
+
interface RetryPolicy {
|
|
1248
|
+
/** Backoff growth across attempts. Default `"exponential"`. */
|
|
1249
|
+
backoff?: "exponential" | "linear";
|
|
1250
|
+
/** Base delay in milliseconds for the first retry. Default `30_000`. */
|
|
1251
|
+
baseMs?: number;
|
|
1252
|
+
/** Maximum number of dispatch attempts before dead-lettering. Default `5`. */
|
|
1253
|
+
maxAttempts?: number;
|
|
1254
|
+
/** Optional ceiling clamping the computed backoff delay. */
|
|
1255
|
+
maxMs?: number;
|
|
1256
|
+
}
|
|
1233
1257
|
interface ScheduledJob {
|
|
1234
1258
|
args: Record<string, unknown>;
|
|
1235
1259
|
/** Number of dispatch attempts already made (absent until the first retry). */
|
|
1236
1260
|
attempts?: number;
|
|
1237
1261
|
/** When the job was enqueued (epoch ms). */
|
|
1238
1262
|
enqueuedAt: number;
|
|
1239
|
-
|
|
1263
|
+
/**
|
|
1264
|
+
* The `ns:fn` path of the function to dispatch on fire. Absent when the job
|
|
1265
|
+
* targets a durable workflow/agent instead — see {@link ScheduledJob.workflow}.
|
|
1266
|
+
* Exactly one of `functionPath` / `workflow` is set.
|
|
1267
|
+
*/
|
|
1268
|
+
functionPath?: string;
|
|
1240
1269
|
id: string;
|
|
1270
|
+
/** Scheduler/workpool instance the job was enqueued through. Absent for the default instance. */
|
|
1271
|
+
instanceName?: string;
|
|
1272
|
+
/** Logical workpool the job is concurrency-gated by. Absent for plain `runAfter`/`runAt` jobs. */
|
|
1273
|
+
pool?: string;
|
|
1274
|
+
/** Per-job retry policy; absent means the scheduler's built-in defaults. */
|
|
1275
|
+
retry?: RetryPolicy;
|
|
1241
1276
|
/** When the job is scheduled to fire (epoch ms). */
|
|
1242
1277
|
scheduledFor: number;
|
|
1243
1278
|
/** Routing hint forwarded so dispatch lands on the right shard. */
|
|
1244
1279
|
shardKey?: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* The `WORKFLOW_*`/`AGENT_*` binding name a fresh durable instance is started
|
|
1282
|
+
* from on fire (the {@link ScheduledJob.args} become its `params`). Set
|
|
1283
|
+
* instead of {@link ScheduledJob.functionPath}.
|
|
1284
|
+
*/
|
|
1285
|
+
workflow?: string;
|
|
1245
1286
|
}
|
|
1246
1287
|
/**
|
|
1247
1288
|
* A schedulable durable-workflow reference — the generated `workflows.<name>` /
|
|
@@ -2328,4 +2369,4 @@ interface ActionCtx {
|
|
|
2328
2369
|
*/
|
|
2329
2370
|
type AnyApi = Record<string, Record<string, RegisteredFunction<ArgsValidator, unknown, FunctionKind>>>;
|
|
2330
2371
|
declare const anyApi: AnyApi;
|
|
2331
|
-
export { type ActionCtx, type AggregateIndexDefinition, type AggregateOp, type AnyApi, type ArgsValidator, type AuthState, type CachePurge, type DatabaseReader, type DatabaseWriter, type DurableObjectJurisdiction, type DurableStreamOptions, type ExposeConfig, type ExternalSourceCursor, type ExternalSourceDefinition, type ExternalSourceMode, type ExternalSourceRefresh, type FunctionKind, type FunctionVisibility, type GeoBoundingBox, type GeoFilterBuilder, type GeoIndexDefinition, type GeoPointInput, type GlobalBackend, type IndexDefinition, type IndexRangeBuilder, type InferArgs, type LifecycleEvent, type LifecycleEventKind, type LogFields, type LunoraLogMethod, type LunoraLogger, type LunoraMetrics, type LunoraTracer, type LunoraWideEvent, type MutationCtx, type MutationStorage, type OnDeleteAction, type PaginationOptions, type PaginationResult, type QueryCtx, type RankIndexDefinition, type RankSortKey, type ReadOnlyStorage, type RegisteredAction, type RegisteredFunction, type RegisteredLifecycleHook, type RegisteredMutation, type RegisteredQuery, type RegisteredStream, type RelationDefinition, type RestCacheConfig, type RunQueryOptions, type ScheduledFunctionDoc, type ScheduledJob, type Scheduler, type Schema, type SearchFilterBuilder, type SearchIndexDefinition, type SearchLanguage, type SearchStrategy, type Secrets, type SecretsStoreSecretLike, type ShardInitEvent, type ShardMode, type SpanEvaluation, type SpanHandle, type SpanKind, type SpanLink, type SpanOptions, type Storage, type StorageMetadata, type StorageObjectBody, type StorageObjectHead, type StorageRange, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemTableName, type TableDefinition, type TableReader, type TableVectorIndex, type TriggerAggregateOptions, type TriggerBuilder, type TriggerCtx, type TriggerDatabase, type TriggerDefinition, type TriggerDeleteEvent, type TriggerEvent, type TriggerGroupByEntry, type TriggerGroupByOptions, type TriggerHandler, type TriggerInsertEvent, type TriggerOp, type TriggerQueryArgs, type TriggerQueryPage, type TriggerRankOptions, type TriggerRankPageOptions, type TriggerRankResult, type TriggerRow, type TriggerTiming, type TriggerUpdateEvent, type TtlDefinition, type VectorEmbedder, type VectorIndexDefinition, type VectorMatch, type VectorMatches, type VectorMetric, type VectorQueryInput, type VectorRecord, type VectorSearch, type VectorSearchReader, type VectorUpsertInput, type WorkflowCreateOptions, type WorkflowEventDefinition, type WorkflowHandle, type WorkflowInstance, type WorkflowInstanceStatus, type WorkflowStatusResult, type Workflows, type X402ProcedureConfig, anyApi };
|
|
2372
|
+
export { type ActionCtx, type AggregateIndexDefinition, type AggregateOp, type AnyApi, type ArgsValidator, type AuthState, type CachePurge, type DatabaseReader, type DatabaseWriter, type DurableObjectJurisdiction, type DurableStreamOptions, type ExposeConfig, type ExternalSourceCursor, type ExternalSourceDefinition, type ExternalSourceMode, type ExternalSourceRefresh, type FunctionKind, type FunctionVisibility, type GeoBoundingBox, type GeoFilterBuilder, type GeoIndexDefinition, type GeoPointInput, type GlobalBackend, type IndexDefinition, type IndexRangeBuilder, type InferArgs, type LifecycleEvent, type LifecycleEventKind, type LogFields, type LunoraLogMethod, type LunoraLogger, type LunoraMetrics, type LunoraTracer, type LunoraWideEvent, type MutationCtx, type MutationStorage, type OnDeleteAction, type PaginationOptions, type PaginationResult, type QueryCtx, type RankIndexDefinition, type RankSortKey, type ReadOnlyStorage, type RegisteredAction, type RegisteredFunction, type RegisteredLifecycleHook, type RegisteredMutation, type RegisteredQuery, type RegisteredStream, type RelationDefinition, type RestCacheConfig, type RetryPolicy, type RunQueryOptions, type ScheduledFunctionDoc, type ScheduledJob, type Scheduler, type Schema, type SearchFilterBuilder, type SearchIndexDefinition, type SearchLanguage, type SearchStrategy, type Secrets, type SecretsStoreSecretLike, type ShardInitEvent, type ShardMode, type SpanEvaluation, type SpanHandle, type SpanKind, type SpanLink, type SpanOptions, type Storage, type StorageMetadata, type StorageObjectBody, type StorageObjectHead, type StorageRange, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemTableName, type TableDefinition, type TableReader, type TableVectorIndex, type TriggerAggregateOptions, type TriggerBuilder, type TriggerCtx, type TriggerDatabase, type TriggerDefinition, type TriggerDeleteEvent, type TriggerEvent, type TriggerGroupByEntry, type TriggerGroupByOptions, type TriggerHandler, type TriggerInsertEvent, type TriggerOp, type TriggerQueryArgs, type TriggerQueryPage, type TriggerRankOptions, type TriggerRankPageOptions, type TriggerRankResult, type TriggerRow, type TriggerTiming, type TriggerUpdateEvent, type TtlDefinition, type VectorEmbedder, type VectorIndexDefinition, type VectorMatch, type VectorMatches, type VectorMetric, type VectorQueryInput, type VectorRecord, type VectorSearch, type VectorSearchReader, type VectorUpsertInput, type WorkflowCreateOptions, type WorkflowEventDefinition, type WorkflowHandle, type WorkflowInstance, type WorkflowInstanceStatus, type WorkflowStatusResult, type Workflows, type X402ProcedureConfig, anyApi };
|
package/dist/types.d.ts
CHANGED
|
@@ -786,14 +786,26 @@ interface ScheduledFunctionDoc {
|
|
|
786
786
|
attempts?: number;
|
|
787
787
|
/** When the job was enqueued (epoch ms). */
|
|
788
788
|
enqueuedAt: number;
|
|
789
|
-
/**
|
|
790
|
-
|
|
789
|
+
/**
|
|
790
|
+
* Fully-qualified `ns:fn` path of the function to invoke. Absent when the job
|
|
791
|
+
* targets a durable workflow/agent instead — exactly one of `functionPath` /
|
|
792
|
+
* {@link ScheduledFunctionDoc.workflow} is set on any given row.
|
|
793
|
+
*/
|
|
794
|
+
functionPath?: string;
|
|
791
795
|
/** The job's id (the `_scheduled_functions` row id). */
|
|
792
796
|
id: string;
|
|
797
|
+
/** Logical workpool the job is concurrency-gated by, when any. */
|
|
798
|
+
pool?: string;
|
|
793
799
|
/** When the job is scheduled to fire (epoch ms). */
|
|
794
800
|
scheduledFor: number;
|
|
795
801
|
/** Routing hint forwarded so dispatch lands on the right shard. */
|
|
796
802
|
shardKey?: string;
|
|
803
|
+
/**
|
|
804
|
+
* The `WORKFLOW_*`/`AGENT_*` binding a fresh durable instance is started from
|
|
805
|
+
* on fire (the {@link ScheduledFunctionDoc.args} become its `params`). Set
|
|
806
|
+
* instead of {@link ScheduledFunctionDoc.functionPath}.
|
|
807
|
+
*/
|
|
808
|
+
workflow?: string;
|
|
797
809
|
}
|
|
798
810
|
/** Maps each system table name to the document shape its reads return. */
|
|
799
811
|
interface SystemDocMap {
|
|
@@ -1226,22 +1238,51 @@ interface AuthState {
|
|
|
1226
1238
|
}
|
|
1227
1239
|
/**
|
|
1228
1240
|
* A pending scheduled invocation as surfaced by {@link Scheduler.list} /
|
|
1229
|
-
* {@link Scheduler.get}. A clean public mirror of `@lunora/scheduler`'s
|
|
1230
|
-
* `ScheduleRecord
|
|
1231
|
-
*
|
|
1232
|
-
|
|
1241
|
+
* {@link Scheduler.get}. A clean public mirror of `@lunora/scheduler`'s
|
|
1242
|
+
* `ScheduleRecord`, re-declared so the public ctx surface names its own type
|
|
1243
|
+
* rather than re-exporting the scheduler's. It must stay field-for-field
|
|
1244
|
+
* identical: `__tests__/scheduler-mirror.test.ts` asserts mutual assignability
|
|
1245
|
+
* against the real `ScheduleRecord` and fails `lint:types` if either side moves.
|
|
1246
|
+
*/
|
|
1247
|
+
interface RetryPolicy {
|
|
1248
|
+
/** Backoff growth across attempts. Default `"exponential"`. */
|
|
1249
|
+
backoff?: "exponential" | "linear";
|
|
1250
|
+
/** Base delay in milliseconds for the first retry. Default `30_000`. */
|
|
1251
|
+
baseMs?: number;
|
|
1252
|
+
/** Maximum number of dispatch attempts before dead-lettering. Default `5`. */
|
|
1253
|
+
maxAttempts?: number;
|
|
1254
|
+
/** Optional ceiling clamping the computed backoff delay. */
|
|
1255
|
+
maxMs?: number;
|
|
1256
|
+
}
|
|
1233
1257
|
interface ScheduledJob {
|
|
1234
1258
|
args: Record<string, unknown>;
|
|
1235
1259
|
/** Number of dispatch attempts already made (absent until the first retry). */
|
|
1236
1260
|
attempts?: number;
|
|
1237
1261
|
/** When the job was enqueued (epoch ms). */
|
|
1238
1262
|
enqueuedAt: number;
|
|
1239
|
-
|
|
1263
|
+
/**
|
|
1264
|
+
* The `ns:fn` path of the function to dispatch on fire. Absent when the job
|
|
1265
|
+
* targets a durable workflow/agent instead — see {@link ScheduledJob.workflow}.
|
|
1266
|
+
* Exactly one of `functionPath` / `workflow` is set.
|
|
1267
|
+
*/
|
|
1268
|
+
functionPath?: string;
|
|
1240
1269
|
id: string;
|
|
1270
|
+
/** Scheduler/workpool instance the job was enqueued through. Absent for the default instance. */
|
|
1271
|
+
instanceName?: string;
|
|
1272
|
+
/** Logical workpool the job is concurrency-gated by. Absent for plain `runAfter`/`runAt` jobs. */
|
|
1273
|
+
pool?: string;
|
|
1274
|
+
/** Per-job retry policy; absent means the scheduler's built-in defaults. */
|
|
1275
|
+
retry?: RetryPolicy;
|
|
1241
1276
|
/** When the job is scheduled to fire (epoch ms). */
|
|
1242
1277
|
scheduledFor: number;
|
|
1243
1278
|
/** Routing hint forwarded so dispatch lands on the right shard. */
|
|
1244
1279
|
shardKey?: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* The `WORKFLOW_*`/`AGENT_*` binding name a fresh durable instance is started
|
|
1282
|
+
* from on fire (the {@link ScheduledJob.args} become its `params`). Set
|
|
1283
|
+
* instead of {@link ScheduledJob.functionPath}.
|
|
1284
|
+
*/
|
|
1285
|
+
workflow?: string;
|
|
1245
1286
|
}
|
|
1246
1287
|
/**
|
|
1247
1288
|
* A schedulable durable-workflow reference — the generated `workflows.<name>` /
|
|
@@ -2328,4 +2369,4 @@ interface ActionCtx {
|
|
|
2328
2369
|
*/
|
|
2329
2370
|
type AnyApi = Record<string, Record<string, RegisteredFunction<ArgsValidator, unknown, FunctionKind>>>;
|
|
2330
2371
|
declare const anyApi: AnyApi;
|
|
2331
|
-
export { type ActionCtx, type AggregateIndexDefinition, type AggregateOp, type AnyApi, type ArgsValidator, type AuthState, type CachePurge, type DatabaseReader, type DatabaseWriter, type DurableObjectJurisdiction, type DurableStreamOptions, type ExposeConfig, type ExternalSourceCursor, type ExternalSourceDefinition, type ExternalSourceMode, type ExternalSourceRefresh, type FunctionKind, type FunctionVisibility, type GeoBoundingBox, type GeoFilterBuilder, type GeoIndexDefinition, type GeoPointInput, type GlobalBackend, type IndexDefinition, type IndexRangeBuilder, type InferArgs, type LifecycleEvent, type LifecycleEventKind, type LogFields, type LunoraLogMethod, type LunoraLogger, type LunoraMetrics, type LunoraTracer, type LunoraWideEvent, type MutationCtx, type MutationStorage, type OnDeleteAction, type PaginationOptions, type PaginationResult, type QueryCtx, type RankIndexDefinition, type RankSortKey, type ReadOnlyStorage, type RegisteredAction, type RegisteredFunction, type RegisteredLifecycleHook, type RegisteredMutation, type RegisteredQuery, type RegisteredStream, type RelationDefinition, type RestCacheConfig, type RunQueryOptions, type ScheduledFunctionDoc, type ScheduledJob, type Scheduler, type Schema, type SearchFilterBuilder, type SearchIndexDefinition, type SearchLanguage, type SearchStrategy, type Secrets, type SecretsStoreSecretLike, type ShardInitEvent, type ShardMode, type SpanEvaluation, type SpanHandle, type SpanKind, type SpanLink, type SpanOptions, type Storage, type StorageMetadata, type StorageObjectBody, type StorageObjectHead, type StorageRange, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemTableName, type TableDefinition, type TableReader, type TableVectorIndex, type TriggerAggregateOptions, type TriggerBuilder, type TriggerCtx, type TriggerDatabase, type TriggerDefinition, type TriggerDeleteEvent, type TriggerEvent, type TriggerGroupByEntry, type TriggerGroupByOptions, type TriggerHandler, type TriggerInsertEvent, type TriggerOp, type TriggerQueryArgs, type TriggerQueryPage, type TriggerRankOptions, type TriggerRankPageOptions, type TriggerRankResult, type TriggerRow, type TriggerTiming, type TriggerUpdateEvent, type TtlDefinition, type VectorEmbedder, type VectorIndexDefinition, type VectorMatch, type VectorMatches, type VectorMetric, type VectorQueryInput, type VectorRecord, type VectorSearch, type VectorSearchReader, type VectorUpsertInput, type WorkflowCreateOptions, type WorkflowEventDefinition, type WorkflowHandle, type WorkflowInstance, type WorkflowInstanceStatus, type WorkflowStatusResult, type Workflows, type X402ProcedureConfig, anyApi };
|
|
2372
|
+
export { type ActionCtx, type AggregateIndexDefinition, type AggregateOp, type AnyApi, type ArgsValidator, type AuthState, type CachePurge, type DatabaseReader, type DatabaseWriter, type DurableObjectJurisdiction, type DurableStreamOptions, type ExposeConfig, type ExternalSourceCursor, type ExternalSourceDefinition, type ExternalSourceMode, type ExternalSourceRefresh, type FunctionKind, type FunctionVisibility, type GeoBoundingBox, type GeoFilterBuilder, type GeoIndexDefinition, type GeoPointInput, type GlobalBackend, type IndexDefinition, type IndexRangeBuilder, type InferArgs, type LifecycleEvent, type LifecycleEventKind, type LogFields, type LunoraLogMethod, type LunoraLogger, type LunoraMetrics, type LunoraTracer, type LunoraWideEvent, type MutationCtx, type MutationStorage, type OnDeleteAction, type PaginationOptions, type PaginationResult, type QueryCtx, type RankIndexDefinition, type RankSortKey, type ReadOnlyStorage, type RegisteredAction, type RegisteredFunction, type RegisteredLifecycleHook, type RegisteredMutation, type RegisteredQuery, type RegisteredStream, type RelationDefinition, type RestCacheConfig, type RetryPolicy, type RunQueryOptions, type ScheduledFunctionDoc, type ScheduledJob, type Scheduler, type Schema, type SearchFilterBuilder, type SearchIndexDefinition, type SearchLanguage, type SearchStrategy, type Secrets, type SecretsStoreSecretLike, type ShardInitEvent, type ShardMode, type SpanEvaluation, type SpanHandle, type SpanKind, type SpanLink, type SpanOptions, type Storage, type StorageMetadata, type StorageObjectBody, type StorageObjectHead, type StorageRange, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemTableName, type TableDefinition, type TableReader, type TableVectorIndex, type TriggerAggregateOptions, type TriggerBuilder, type TriggerCtx, type TriggerDatabase, type TriggerDefinition, type TriggerDeleteEvent, type TriggerEvent, type TriggerGroupByEntry, type TriggerGroupByOptions, type TriggerHandler, type TriggerInsertEvent, type TriggerOp, type TriggerQueryArgs, type TriggerQueryPage, type TriggerRankOptions, type TriggerRankPageOptions, type TriggerRankResult, type TriggerRow, type TriggerTiming, type TriggerUpdateEvent, type TtlDefinition, type VectorEmbedder, type VectorIndexDefinition, type VectorMatch, type VectorMatches, type VectorMetric, type VectorQueryInput, type VectorRecord, type VectorSearch, type VectorSearchReader, type VectorUpsertInput, type WorkflowCreateOptions, type WorkflowEventDefinition, type WorkflowHandle, type WorkflowInstance, type WorkflowInstanceStatus, type WorkflowStatusResult, type Workflows, type X402ProcedureConfig, anyApi };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/server",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.97",
|
|
4
4
|
"description": "Server primitives for Lunora: defineSchema, defineTable, query, mutation, and action",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"backend",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@lunora/errors": "1.0.0-alpha.27",
|
|
70
|
-
"@lunora/scheduler": "1.0.0-alpha.
|
|
70
|
+
"@lunora/scheduler": "1.0.0-alpha.47",
|
|
71
71
|
"@lunora/values": "1.0.0-alpha.35",
|
|
72
72
|
"drizzle-orm": "^0.45.2",
|
|
73
73
|
"hono": "^4.13.1"
|