@lunora/client 1.0.0-alpha.24 → 1.0.0-alpha.26

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.mjs CHANGED
@@ -6,7 +6,7 @@ export { applyDelta, isMutationDelta } from './packem_shared/applyDelta-CRKZ1PBt
6
6
  export { CONFLICT_ERROR_CODE, getErrorCode, getRetryAfterMs, isConflictError, isForbiddenError, isRateLimitedError, isUnauthorizedError } from './packem_shared/CONFLICT_ERROR_CODE-B8gQ8tyU.mjs';
7
7
  export { httpStream } from './packem_shared/httpStream-DIdL8NEw.mjs';
8
8
  export { c as createLocalStore } from './packem_shared/local-store-DIq-UWfD.mjs';
9
- export { LunoraClient } from './packem_shared/LunoraClient-D3h4P7hg.mjs';
9
+ export { LunoraClient } from './packem_shared/LunoraClient-DKATLGHY.mjs';
10
10
  export { createMutationRunner } from './packem_shared/createMutationRunner-BqsavzvG.mjs';
11
11
  export { createMutatorRunner } from './packem_shared/createMutatorRunner-BETvCd0p.mjs';
12
12
  export { O as OfflineQueue } from './packem_shared/offline-queue-N-1JvYb4.mjs';
@@ -97,6 +97,7 @@ const GLOBAL_TABLE_PATH = "/_lunora/admin/global/table";
97
97
  const GLOBAL_FACET_PATH = "/_lunora/admin/global/facet";
98
98
  const VECTOR_INDEXES_PATH = "/_lunora/admin/vector/indexes";
99
99
  const VECTOR_QUERY_PATH = "/_lunora/admin/vector/query";
100
+ const LOG_ARCHIVE_PATH = "/_lunora/admin/logs/archive";
100
101
  const KV_NAMESPACES_PATH = "/_lunora/admin/kv/namespaces";
101
102
  const KV_KEYS_PATH = "/_lunora/admin/kv/keys";
102
103
  const KV_VALUE_PATH = "/_lunora/admin/kv/value";
@@ -1663,6 +1664,23 @@ class LunoraClient {
1663
1664
  const body = await this.adminFetch(VECTOR_QUERY_PATH, "POST", options);
1664
1665
  return body.matches ?? [];
1665
1666
  }
1667
+ /**
1668
+ * Read one keyset-paginated page of the durable `ctx.log` archive that
1669
+ * `pipelineLogSink` writes to R2. Server-side only — the worker holds the R2
1670
+ * SQL credentials and runs the reader; the browser only sees the decoded
1671
+ * `{ rows, nextCursor }`. Pass the previous page's `nextCursor` as
1672
+ * `query.cursor` to page. Admin-gated. When the operator hasn't wired the
1673
+ * archive, `adminFetch` throws a `LunoraClientError` with `.code ===
1674
+ * "LOG_ARCHIVE_NOT_CONFIGURED"`, so a caller can render a "not configured"
1675
+ * state rather than an error.
1676
+ */
1677
+ async queryLogArchive(query = {}) {
1678
+ if (this.closed) {
1679
+ throw new LunoraError("INTERNAL", "LunoraClient is closed");
1680
+ }
1681
+ const body = await this.adminFetch(LOG_ARCHIVE_PATH, "POST", query);
1682
+ return { nextCursor: body.nextCursor, rows: body.rows ?? [] };
1683
+ }
1666
1684
  // --- KV namespace admin -------------------------------------------------
1667
1685
  /**
1668
1686
  * List the worker's registered Workers KV namespaces (binding names). Hits
@@ -1,4 +1,4 @@
1
- import { LunoraClient } from './LunoraClient-D3h4P7hg.mjs';
1
+ import { LunoraClient } from './LunoraClient-DKATLGHY.mjs';
2
2
 
3
3
  const createServerClient = (options) => {
4
4
  const client = new LunoraClient({ fetch: options.fetch, url: options.url });