@honua/app-platform 0.1.11-beta.0 → 0.1.13

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.
Files changed (236) hide show
  1. package/columnar/apache-arrow.d.ts +17 -0
  2. package/columnar/apache-arrow.d.ts.map +1 -0
  3. package/columnar/apache-arrow.js +1036 -0
  4. package/columnar/batch-cache-conformance.d.ts +66 -0
  5. package/columnar/batch-cache-conformance.d.ts.map +1 -0
  6. package/columnar/batch-cache-conformance.js +317 -0
  7. package/columnar/batch-cache-indexeddb.d.ts +31 -0
  8. package/columnar/batch-cache-indexeddb.d.ts.map +1 -0
  9. package/columnar/batch-cache-indexeddb.js +148 -0
  10. package/columnar/batch-cache.d.ts +298 -0
  11. package/columnar/batch-cache.d.ts.map +1 -0
  12. package/columnar/batch-cache.js +757 -0
  13. package/columnar/geoarrow-aggregate.d.ts +178 -0
  14. package/columnar/geoarrow-aggregate.d.ts.map +1 -0
  15. package/columnar/geoarrow-aggregate.js +976 -0
  16. package/columnar/geoarrow-patch.d.ts +382 -0
  17. package/columnar/geoarrow-patch.d.ts.map +1 -0
  18. package/columnar/geoarrow-patch.js +1656 -0
  19. package/columnar/geoarrow-reproject.d.ts +22 -0
  20. package/columnar/geoarrow-reproject.d.ts.map +1 -0
  21. package/columnar/geoarrow-reproject.js +119 -0
  22. package/columnar/geoarrow-serialization.d.ts +68 -0
  23. package/columnar/geoarrow-serialization.d.ts.map +1 -0
  24. package/columnar/geoarrow-serialization.js +331 -0
  25. package/columnar/geoarrow-types.d.ts +271 -0
  26. package/columnar/geoarrow-types.d.ts.map +1 -0
  27. package/columnar/geoarrow-types.js +15 -0
  28. package/columnar/geoarrow.d.ts +52 -0
  29. package/columnar/geoarrow.d.ts.map +1 -0
  30. package/columnar/geoarrow.js +1469 -0
  31. package/columnar/index.d.ts +43 -0
  32. package/columnar/index.d.ts.map +1 -0
  33. package/columnar/index.js +29 -0
  34. package/columnar/operators.d.ts +70 -0
  35. package/columnar/operators.d.ts.map +1 -0
  36. package/columnar/operators.js +307 -0
  37. package/columnar/result.d.ts +369 -0
  38. package/columnar/result.d.ts.map +1 -0
  39. package/columnar/result.js +815 -0
  40. package/columnar/telemetry.d.ts +152 -0
  41. package/columnar/telemetry.d.ts.map +1 -0
  42. package/columnar/telemetry.js +265 -0
  43. package/columnar/transfer.d.ts +28 -0
  44. package/columnar/transfer.d.ts.map +1 -0
  45. package/columnar/transfer.js +669 -0
  46. package/columnar/types.d.ts +175 -0
  47. package/columnar/types.d.ts.map +1 -0
  48. package/columnar/types.js +22 -0
  49. package/columnar/worker.d.ts +157 -0
  50. package/columnar/worker.d.ts.map +1 -0
  51. package/columnar/worker.js +1059 -0
  52. package/contract/pmtiles.d.ts +6 -5
  53. package/contract/pmtiles.d.ts.map +1 -1
  54. package/contract/pmtiles.js +30 -5
  55. package/control-plane/generated/admin-operations.d.ts +3 -3
  56. package/control-plane/generated/admin-operations.d.ts.map +1 -1
  57. package/control-plane/generated/admin-operations.js +3 -3
  58. package/controls/catalog.d.ts.map +1 -1
  59. package/controls/catalog.js +110 -0
  60. package/controls/index.d.ts +1 -1
  61. package/controls/index.js +1 -1
  62. package/controls/types.d.ts +1 -1
  63. package/controls/types.js +1 -1
  64. package/core/client.d.ts.map +1 -1
  65. package/core/client.js +87 -19
  66. package/core/deprecation-notice.d.ts +28 -0
  67. package/core/deprecation-notice.d.ts.map +1 -0
  68. package/core/deprecation-notice.js +22 -0
  69. package/core/esri-geojson.d.ts.map +1 -1
  70. package/core/esri-geojson.js +10 -6
  71. package/core/optional-grpc-peer.d.ts +15 -0
  72. package/core/optional-grpc-peer.d.ts.map +1 -0
  73. package/core/optional-grpc-peer.js +60 -0
  74. package/esri-compat/basemap-gallery.d.ts +2 -0
  75. package/esri-compat/basemap-gallery.d.ts.map +1 -1
  76. package/esri-compat/basemap-gallery.js +12 -0
  77. package/esri-compat/basemap.d.ts +4 -0
  78. package/esri-compat/basemap.d.ts.map +1 -1
  79. package/esri-compat/basemap.js +70 -0
  80. package/esri-compat/bookmarks.d.ts +2 -0
  81. package/esri-compat/bookmarks.d.ts.map +1 -1
  82. package/esri-compat/bookmarks.js +12 -0
  83. package/esri-compat/controls.d.ts +18 -0
  84. package/esri-compat/controls.d.ts.map +1 -1
  85. package/esri-compat/controls.js +120 -57
  86. package/esri-compat/directions.d.ts +4 -0
  87. package/esri-compat/directions.d.ts.map +1 -1
  88. package/esri-compat/directions.js +30 -20
  89. package/esri-compat/editor.d.ts +4 -0
  90. package/esri-compat/editor.d.ts.map +1 -1
  91. package/esri-compat/editor.js +16 -0
  92. package/esri-compat/esri-config.d.ts +2 -1
  93. package/esri-compat/esri-config.d.ts.map +1 -1
  94. package/esri-compat/feature-effect.d.ts +23 -0
  95. package/esri-compat/feature-effect.d.ts.map +1 -0
  96. package/esri-compat/feature-effect.js +12 -0
  97. package/esri-compat/feature-form.d.ts +6 -0
  98. package/esri-compat/feature-form.d.ts.map +1 -1
  99. package/esri-compat/feature-form.js +63 -0
  100. package/esri-compat/feature-layer.d.ts +21 -2
  101. package/esri-compat/feature-layer.d.ts.map +1 -1
  102. package/esri-compat/feature-layer.js +172 -1
  103. package/esri-compat/feature-table.d.ts +5 -0
  104. package/esri-compat/feature-table.d.ts.map +1 -1
  105. package/esri-compat/feature-table.js +23 -0
  106. package/esri-compat/identity-manager.d.ts +1 -1
  107. package/esri-compat/identity-manager.js +1 -1
  108. package/esri-compat/legend.d.ts +2 -0
  109. package/esri-compat/legend.d.ts.map +1 -1
  110. package/esri-compat/legend.js +98 -0
  111. package/esri-compat/locator.d.ts +1 -1
  112. package/esri-compat/locator.js +1 -1
  113. package/esri-compat/map-view-mount.d.ts +1 -0
  114. package/esri-compat/map-view-mount.d.ts.map +1 -1
  115. package/esri-compat/map-view-mount.js +46 -25
  116. package/esri-compat/map-view.d.ts +13 -0
  117. package/esri-compat/map-view.d.ts.map +1 -1
  118. package/esri-compat/map-view.js +94 -8
  119. package/esri-compat/map.d.ts +5 -1
  120. package/esri-compat/map.d.ts.map +1 -1
  121. package/esri-compat/map.js +10 -0
  122. package/esri-compat/measurement.d.ts +2 -0
  123. package/esri-compat/measurement.d.ts.map +1 -1
  124. package/esri-compat/measurement.js +14 -0
  125. package/esri-compat/point.d.ts +7 -0
  126. package/esri-compat/point.d.ts.map +1 -1
  127. package/esri-compat/point.js +33 -3
  128. package/esri-compat/popup.d.ts +2 -0
  129. package/esri-compat/popup.d.ts.map +1 -1
  130. package/esri-compat/popup.js +12 -0
  131. package/esri-compat/portal.d.ts +1 -1
  132. package/esri-compat/portal.js +1 -1
  133. package/esri-compat/print.d.ts +3 -0
  134. package/esri-compat/print.d.ts.map +1 -1
  135. package/esri-compat/print.js +15 -0
  136. package/esri-compat/search.d.ts +4 -0
  137. package/esri-compat/search.d.ts.map +1 -1
  138. package/esri-compat/search.js +25 -28
  139. package/esri-compat/sketch.d.ts +2 -0
  140. package/esri-compat/sketch.d.ts.map +1 -1
  141. package/esri-compat/sketch.js +12 -0
  142. package/esri-compat/widget-host.d.ts +46 -17
  143. package/esri-compat/widget-host.d.ts.map +1 -1
  144. package/esri-compat/widget-host.js +84 -20
  145. package/esri-compat/widget-shell-hosts.d.ts +61 -0
  146. package/esri-compat/widget-shell-hosts.d.ts.map +1 -0
  147. package/esri-compat/widget-shell-hosts.js +76 -0
  148. package/kernel/renderer.d.ts +82 -0
  149. package/kernel/renderer.js +1 -0
  150. package/offline/conflict-resolution.d.ts +183 -0
  151. package/offline/conflict-resolution.d.ts.map +1 -0
  152. package/offline/conflict-resolution.js +286 -0
  153. package/offline/credential-screen.d.ts +34 -0
  154. package/offline/credential-screen.d.ts.map +1 -0
  155. package/offline/credential-screen.js +78 -0
  156. package/offline/digest.d.ts +15 -0
  157. package/offline/digest.d.ts.map +1 -0
  158. package/offline/digest.js +58 -0
  159. package/offline/edit-queue.d.ts +403 -0
  160. package/offline/edit-queue.d.ts.map +1 -0
  161. package/offline/edit-queue.js +1807 -0
  162. package/offline/edit-replay.d.ts +116 -0
  163. package/offline/edit-replay.d.ts.map +1 -0
  164. package/offline/edit-replay.js +392 -0
  165. package/offline/fetch-handler.d.ts +12 -0
  166. package/offline/fetch-handler.d.ts.map +1 -0
  167. package/offline/fetch-handler.js +65 -0
  168. package/offline/index.d.ts +52 -0
  169. package/offline/index.d.ts.map +1 -0
  170. package/offline/index.js +34 -0
  171. package/offline/indexeddb.d.ts +135 -0
  172. package/offline/indexeddb.d.ts.map +1 -0
  173. package/offline/indexeddb.js +888 -0
  174. package/offline/memory-store.d.ts +17 -0
  175. package/offline/memory-store.d.ts.map +1 -0
  176. package/offline/memory-store.js +183 -0
  177. package/offline/quota.d.ts +161 -0
  178. package/offline/quota.d.ts.map +1 -0
  179. package/offline/quota.js +370 -0
  180. package/offline/read-gate.d.ts +175 -0
  181. package/offline/read-gate.d.ts.map +1 -0
  182. package/offline/read-gate.js +252 -0
  183. package/offline/read-resource.d.ts +99 -0
  184. package/offline/read-resource.d.ts.map +1 -0
  185. package/offline/read-resource.js +156 -0
  186. package/offline/read.d.ts +50 -0
  187. package/offline/read.d.ts.map +1 -0
  188. package/offline/read.js +65 -0
  189. package/offline/region.d.ts +29 -0
  190. package/offline/region.d.ts.map +1 -0
  191. package/offline/region.js +1007 -0
  192. package/offline/replay-conflict.d.ts +183 -0
  193. package/offline/replay-conflict.d.ts.map +1 -0
  194. package/offline/replay-conflict.js +482 -0
  195. package/offline/selection.d.ts +140 -0
  196. package/offline/selection.d.ts.map +1 -0
  197. package/offline/selection.js +391 -0
  198. package/offline/snapshot.d.ts +132 -0
  199. package/offline/snapshot.d.ts.map +1 -0
  200. package/offline/snapshot.js +312 -0
  201. package/offline/status.d.ts +136 -0
  202. package/offline/status.d.ts.map +1 -0
  203. package/offline/status.js +479 -0
  204. package/offline/store-conformance.d.ts +48 -0
  205. package/offline/store-conformance.d.ts.map +1 -0
  206. package/offline/store-conformance.js +233 -0
  207. package/offline/tile-protocol.d.ts +81 -0
  208. package/offline/tile-protocol.d.ts.map +1 -0
  209. package/offline/tile-protocol.js +119 -0
  210. package/offline/types.d.ts +349 -0
  211. package/offline/types.d.ts.map +1 -0
  212. package/offline/types.js +75 -0
  213. package/package.json +14 -2
  214. package/scene-workspace/index.d.ts +2 -2
  215. package/scene-workspace/index.d.ts.map +1 -1
  216. package/scene-workspace/index.js +1 -1
  217. package/scene-workspace/scene-discovery.d.ts +111 -91
  218. package/scene-workspace/scene-discovery.d.ts.map +1 -1
  219. package/scene-workspace/scene-discovery.js +340 -92
  220. package/scene-workspace/scene-view.d.ts +6 -6
  221. package/scene-workspace/scene-view.d.ts.map +1 -1
  222. package/scene-workspace/scene-view.js +32 -6
  223. package/web-components/elements.d.ts +34 -0
  224. package/web-components/elements.d.ts.map +1 -1
  225. package/web-components/elements.js +82 -8
  226. package/web-components/index.d.ts +2 -0
  227. package/web-components/index.d.ts.map +1 -1
  228. package/web-components/index.js +3 -1
  229. package/web-components/map-chrome.d.ts +103 -0
  230. package/web-components/map-chrome.d.ts.map +1 -0
  231. package/web-components/map-chrome.js +325 -0
  232. package/web-components/widget-shell.d.ts +68 -0
  233. package/web-components/widget-shell.d.ts.map +1 -0
  234. package/web-components/widget-shell.js +224 -0
  235. package/widget-capabilities.d.ts +67 -0
  236. package/widget-capabilities.js +152 -0
@@ -0,0 +1,58 @@
1
+ import { HonuaOfflineRegionError } from "./types.js";
2
+ /**
3
+ * Deterministic identity primitives shared by every offline module.
4
+ *
5
+ * Manifest identity, snapshot resource identity, and the read path all have to
6
+ * agree byte-for-byte on what "the same selection" means, so the canonical
7
+ * serialization and the digest live in one module rather than being reimplemented
8
+ * per layer. Nothing here reads storage or accepts a request URL.
9
+ */
10
+ const encoder = new TextEncoder();
11
+ /** Code-unit ordering, the deterministic sort used by every persisted identity. */
12
+ export function compareCodeUnits(left, right) {
13
+ return left < right ? -1 : left > right ? 1 : 0;
14
+ }
15
+ /**
16
+ * Serialize `value` with sorted own keys and no `undefined` members.
17
+ *
18
+ * The output is the digest pre-image for region and resource identity, so it is
19
+ * deliberately strict: an `undefined` anywhere would silently disappear from the
20
+ * identity and let two different selections collide.
21
+ */
22
+ export function canonicalJson(value) {
23
+ if (value === null || typeof value !== "object") {
24
+ const encoded = JSON.stringify(value);
25
+ if (encoded === undefined) {
26
+ throw new HonuaOfflineRegionError("invalid-manifest", "Offline identity cannot contain undefined values.", {
27
+ path: "identity",
28
+ });
29
+ }
30
+ return encoded;
31
+ }
32
+ if (Array.isArray(value))
33
+ return `[${value.map(canonicalJson).join(",")}]`;
34
+ const entries = [];
35
+ for (const key in value) {
36
+ if (Object.hasOwn(value, key))
37
+ entries.push([key, value[key]]);
38
+ }
39
+ entries.sort(([left], [right]) => compareCodeUnits(left, right));
40
+ return `{${entries.map(([key, child]) => `${JSON.stringify(key)}:${canonicalJson(child)}`).join(",")}}`;
41
+ }
42
+ /** Portable Web Crypto SHA-256 over UTF-8 text or raw bytes. */
43
+ export async function sha256(value) {
44
+ const subtle = globalThis.crypto?.subtle;
45
+ if (!subtle) {
46
+ throw new HonuaOfflineRegionError("invalid-manifest", "Offline region identity and integrity require Web Crypto SHA-256.", { path: "crypto" });
47
+ }
48
+ const bytes = typeof value === "string" ? encoder.encode(value) : value;
49
+ const digestInput = bytes.buffer instanceof ArrayBuffer
50
+ ? bytes
51
+ : Uint8Array.from(bytes);
52
+ const digest = await subtle.digest("SHA-256", digestInput);
53
+ return `sha256:${Array.from(new Uint8Array(digest), (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
54
+ }
55
+ /** Domain-separated digest of a canonical identity object. */
56
+ export async function identityDigest(namespace, value) {
57
+ return sha256(`${namespace}:v1:${canonicalJson(value)}`);
58
+ }
@@ -0,0 +1,403 @@
1
+ import { HonuaSdkError } from "../core/error-envelope.js";
2
+ export declare const HONUA_OFFLINE_EDIT_QUEUE_VERSION: "1.0";
3
+ export declare const DEFAULT_OFFLINE_EDIT_QUEUE_MAX_EDITS = 10000;
4
+ export declare const DEFAULT_OFFLINE_EDIT_QUEUE_MAX_PAYLOAD_BYTES: number;
5
+ export declare const DEFAULT_OFFLINE_EDIT_QUEUE_MAX_AUDIT_EVENTS = 128;
6
+ export declare const DEFAULT_OFFLINE_EDIT_QUEUE_MAX_DEPENDENCIES = 256;
7
+ export declare const MAX_OFFLINE_EDIT_LEASE_DURATION_MS: number;
8
+ export type OfflineEditJsonValue = null | boolean | number | string | readonly OfflineEditJsonValue[] | {
9
+ readonly [key: string]: OfflineEditJsonValue;
10
+ };
11
+ export type OfflineEditOperation = "add" | "update" | "delete";
12
+ export type OfflineQueuedEditState = "pending" | "leased" | "retryable" | "applied" | "conflicted" | "cancelled";
13
+ export interface OfflineFeatureEdit {
14
+ readonly operation: OfflineEditOperation;
15
+ readonly featureId?: string | number;
16
+ readonly attributes?: Readonly<Record<string, OfflineEditJsonValue>>;
17
+ readonly geometry?: OfflineEditJsonValue;
18
+ }
19
+ export interface EnqueueOfflineEditInput {
20
+ /** Precomputed authorization partition digest. Raw credentials are not accepted. */
21
+ readonly authorizationScopeDigest: `sha256:${string}`;
22
+ readonly sourceId: string;
23
+ /** Opaque non-secret identity sent unchanged to the replay transport. */
24
+ readonly idempotencyKey: string;
25
+ readonly edit: OfflineFeatureEdit;
26
+ /** Queue edit IDs returned by earlier enqueue operations. */
27
+ readonly dependencyIds?: readonly `sha256:${string}`[];
28
+ }
29
+ export interface OfflineEditLease {
30
+ readonly token: string;
31
+ readonly workerId: string;
32
+ readonly expiresAt: string;
33
+ }
34
+ export interface OfflineEditRetry {
35
+ readonly retryAt: string;
36
+ readonly reasonCode: string;
37
+ }
38
+ export interface OfflineEditAppliedOutcome {
39
+ readonly appliedAt: string;
40
+ readonly serverOperationId?: string;
41
+ readonly serverGeneration?: string;
42
+ }
43
+ export interface OfflineEditConflictOutcome {
44
+ readonly conflictId: string;
45
+ readonly detectedAt: string;
46
+ readonly serverGeneration?: string;
47
+ }
48
+ export interface OfflineEditCancellationOutcome {
49
+ readonly cancelledAt: string;
50
+ readonly reasonCode: string;
51
+ }
52
+ /**
53
+ * How a reviewer closed a conflict, in the queue's own spelling.
54
+ *
55
+ * The three members are exactly the members of the shipped
56
+ * `ConflictResolutionChoice` the queue can act on without a server. `merge` is
57
+ * absent on purpose: a merged value would have to replace the edit's payload,
58
+ * and the edit's identity is a digest of that payload, so recording a merge
59
+ * here would silently rewrite an idempotency identity the transport has
60
+ * already used. The offline conflict-resolution surface refuses `merge` rather
61
+ * than accepting one it cannot honour.
62
+ */
63
+ export type OfflineEditConflictResolutionChoice = "accept-client" | "accept-server" | "discard";
64
+ /** What the resolution did to the durable edit. */
65
+ export type OfflineEditConflictResolutionDisposition =
66
+ /** The local edit stands and returns to `pending` for another delivery attempt. */
67
+ "requeued"
68
+ /** The local edit is abandoned; the record is terminal. */
69
+ | "discarded";
70
+ /**
71
+ * Delivery status of a locally recorded resolution.
72
+ *
73
+ * The single member is the honest one: a resolution recorded through this queue
74
+ * is durable *local* state, and only a server can acknowledge it. No code path
75
+ * in this build produces any other value, and none may until a transport exists
76
+ * that can carry a resolution to a server and read its answer back.
77
+ */
78
+ export type OfflineEditConflictResolutionAcknowledgement = "unacknowledged-by-server";
79
+ /**
80
+ * The closure of one conflict, recorded against the edit that raised it.
81
+ *
82
+ * It carries the closed conflict's identity and timing — `conflictId`,
83
+ * `detectedAt`, `serverGeneration` — because the `conflict` outcome itself is
84
+ * cleared by the transition: a record must not claim to be both conflicted and
85
+ * resolved. The audit history keeps the ordered account; this member is the
86
+ * current outcome slot, exactly as `applied` and `cancellation` are.
87
+ */
88
+ export interface OfflineEditConflictResolutionOutcome {
89
+ readonly conflictId: string;
90
+ /** Carried from the conflict this resolution closed. */
91
+ readonly detectedAt: string;
92
+ /** Carried from the conflict this resolution closed, when it named one. */
93
+ readonly serverGeneration?: string;
94
+ readonly choice: OfflineEditConflictResolutionChoice;
95
+ readonly disposition: OfflineEditConflictResolutionDisposition;
96
+ readonly acknowledgement: OfflineEditConflictResolutionAcknowledgement;
97
+ readonly resolvedAt: string;
98
+ /** Opaque non-secret reviewer identity; screened before it is persisted. */
99
+ readonly resolvedBy?: string;
100
+ /** Reviewer note; screened before it is persisted. */
101
+ readonly note?: string;
102
+ }
103
+ export type OfflineEditAuditEventKind = "enqueued" | "claimed" | "lease-reclaimed" | "retry-scheduled" | "applied" | "conflicted" | "conflict-resolved" | "cancelled";
104
+ export interface OfflineEditAuditEvent {
105
+ readonly sequence: number;
106
+ readonly kind: OfflineEditAuditEventKind;
107
+ readonly at: string;
108
+ readonly attempt: number;
109
+ readonly workerId?: string;
110
+ readonly reasonCode?: string;
111
+ readonly conflictId?: string;
112
+ readonly serverOperationId?: string;
113
+ readonly serverGeneration?: string;
114
+ /** Present on `conflict-resolved`: how the reviewer closed the conflict. */
115
+ readonly resolutionChoice?: OfflineEditConflictResolutionChoice;
116
+ }
117
+ export interface OfflineQueuedEdit {
118
+ readonly version: typeof HONUA_OFFLINE_EDIT_QUEUE_VERSION;
119
+ readonly id: `sha256:${string}`;
120
+ readonly requestFingerprint: `sha256:${string}`;
121
+ readonly authorizationScopeDigest: `sha256:${string}`;
122
+ readonly sourceId: string;
123
+ readonly idempotencyKey: string;
124
+ readonly edit: OfflineFeatureEdit;
125
+ readonly dependencyIds: readonly `sha256:${string}`[];
126
+ readonly state: OfflineQueuedEditState;
127
+ readonly createdAt: string;
128
+ readonly updatedAt: string;
129
+ readonly attemptCount: number;
130
+ readonly lease?: OfflineEditLease;
131
+ readonly retry?: OfflineEditRetry;
132
+ readonly applied?: OfflineEditAppliedOutcome;
133
+ readonly conflict?: OfflineEditConflictOutcome;
134
+ /**
135
+ * The closure of the record's most recent conflict. Never present together
136
+ * with `conflict`: opening a new conflict clears it, and closing a conflict
137
+ * clears `conflict`, so the record always says exactly one of "conflicted"
138
+ * and "resolved". The ordered account of both lives in `audit`.
139
+ */
140
+ readonly conflictResolution?: OfflineEditConflictResolutionOutcome;
141
+ readonly cancellation?: OfflineEditCancellationOutcome;
142
+ readonly audit: readonly OfflineEditAuditEvent[];
143
+ }
144
+ export interface OfflineEditEnqueueResult {
145
+ readonly status: "enqueued" | "duplicate";
146
+ readonly edit: OfflineQueuedEdit;
147
+ }
148
+ export interface OfflineEditQueuePartition {
149
+ readonly authorizationScopeDigest: `sha256:${string}`;
150
+ readonly sourceId: string;
151
+ }
152
+ /** Complete, unbounded partition totals for every queue state. */
153
+ export type OfflineEditQueueStateCounts = Readonly<Record<OfflineQueuedEditState, number>>;
154
+ export interface ClaimOfflineEditsOptions extends OfflineEditQueuePartition {
155
+ readonly workerId: string;
156
+ readonly limit: number;
157
+ readonly leaseDurationMs: number;
158
+ }
159
+ export interface ListOfflineEditsOptions extends OfflineEditQueuePartition {
160
+ /** Defaults to 100 and cannot exceed 100. */
161
+ readonly limit?: number;
162
+ }
163
+ export interface PruneTerminalOfflineEditsOptions extends OfflineEditQueuePartition {
164
+ /** Remove terminal records updated at or before this normalized timestamp. */
165
+ readonly terminalBefore: string;
166
+ /** Defaults to 100 and cannot exceed 100. */
167
+ readonly limit?: number;
168
+ }
169
+ export interface MarkOfflineEditAppliedInput {
170
+ readonly serverOperationId?: string;
171
+ readonly serverGeneration?: string;
172
+ }
173
+ export interface MarkOfflineEditRetryInput {
174
+ readonly retryAt: string;
175
+ readonly reasonCode: string;
176
+ }
177
+ export interface MarkOfflineEditConflictedInput {
178
+ readonly conflictId: string;
179
+ readonly serverGeneration?: string;
180
+ }
181
+ export interface CancelOfflineEditInput {
182
+ readonly reasonCode: string;
183
+ }
184
+ export interface ResolveOfflineEditConflictInput {
185
+ /**
186
+ * The conflict being closed. It must equal the conflict the record actually
187
+ * carries, so a stale review cannot close a conflict the queue has since
188
+ * replaced with a newer one.
189
+ */
190
+ readonly conflictId: string;
191
+ readonly choice: OfflineEditConflictResolutionChoice;
192
+ /** Opaque non-secret reviewer identity. Screened before it is persisted. */
193
+ readonly resolvedBy?: string;
194
+ /** Reviewer note. Screened before it is persisted. */
195
+ readonly note?: string;
196
+ }
197
+ export interface OfflineEditQueue {
198
+ enqueue(input: EnqueueOfflineEditInput): Promise<OfflineEditEnqueueResult>;
199
+ get(editId: string, partition: OfflineEditQueuePartition): Promise<OfflineQueuedEdit | undefined>;
200
+ list(options: ListOfflineEditsOptions): Promise<readonly OfflineQueuedEdit[]>;
201
+ /**
202
+ * Exact partition totals for every state. `list` is bounded to 100 records
203
+ * and has no cursor, so it cannot be counted; anything that must be truthful
204
+ * about how much work exists has to read these totals instead.
205
+ */
206
+ countByState(partition: OfflineEditQueuePartition): Promise<OfflineEditQueueStateCounts>;
207
+ claimReady(options: ClaimOfflineEditsOptions): Promise<readonly OfflineQueuedEdit[]>;
208
+ markApplied(editId: string, leaseToken: string, outcome?: MarkOfflineEditAppliedInput): Promise<OfflineQueuedEdit>;
209
+ markRetry(editId: string, leaseToken: string, outcome: MarkOfflineEditRetryInput): Promise<OfflineQueuedEdit>;
210
+ markConflicted(editId: string, leaseToken: string, outcome: MarkOfflineEditConflictedInput): Promise<OfflineQueuedEdit>;
211
+ /** Retire unleased work that cannot proceed, such as a dependent of a conflicted edit. */
212
+ cancel(editId: string, partition: OfflineEditQueuePartition, outcome: CancelOfflineEditInput): Promise<OfflineQueuedEdit>;
213
+ /**
214
+ * Close a conflicted edit's conflict with a reviewed choice.
215
+ *
216
+ * Unleased, like `cancel`: the conflict transition already released the
217
+ * lease, and the reviewer is not the replay worker. `accept-client` requeues
218
+ * the edit as `pending`; `accept-server` and `discard` abandon it as
219
+ * `cancelled`. Either way the conflict leaves the record, so no later pass
220
+ * re-surfaces it, and the resolution is recorded as unacknowledged by any
221
+ * server.
222
+ */
223
+ resolveConflict(editId: string, partition: OfflineEditQueuePartition, resolution: ResolveOfflineEditConflictInput): Promise<OfflineQueuedEdit>;
224
+ pruneTerminal(options: PruneTerminalOfflineEditsOptions): Promise<readonly `sha256:${string}`[]>;
225
+ }
226
+ export type OfflineEditQueueErrorCode = "invalid-edit" | "idempotency-conflict" | "edit-pruned" | "dependency-not-found" | "edit-not-found" | "invalid-transition" | "lease-mismatch" | "lease-expired" | "queue-limit-exceeded"
227
+ /** A persisted record failed validation on read and was not trusted into a replay. */
228
+ | "record-unreadable" | "store-failed";
229
+ export declare class HonuaOfflineEditQueueError extends HonuaSdkError {
230
+ readonly code: OfflineEditQueueErrorCode;
231
+ readonly name = "HonuaOfflineEditQueueError";
232
+ constructor(code: OfflineEditQueueErrorCode, message: string, options?: {
233
+ readonly cause?: unknown;
234
+ readonly editId?: string;
235
+ readonly path?: string;
236
+ });
237
+ readonly editId?: string;
238
+ readonly path?: string;
239
+ }
240
+ /** Stable discriminator and version for edit-queue recovery reports. */
241
+ export declare const HONUA_OFFLINE_EDIT_QUEUE_RECOVERY_KIND: "honua.offline-edit-queue-recovery";
242
+ export declare const HONUA_OFFLINE_EDIT_QUEUE_RECOVERY_VERSION: 1;
243
+ /** Ceilings on one recovery pass. Callers may tighten them, never raise them. */
244
+ export declare const DEFAULT_OFFLINE_EDIT_QUEUE_MAX_RECOVERY_RECORDS = 100000;
245
+ export declare const DEFAULT_OFFLINE_EDIT_QUEUE_MAX_RECOVERY_BYTES: number;
246
+ /**
247
+ * Why a persisted record was refused. `foreign-version` is a record this build
248
+ * cannot interpret; `corrupt-record` is one whose identity, state, or timing
249
+ * fields do not hold together; `credential-screened` is one whose persisted
250
+ * partition identity is shaped like a secret or a request reference;
251
+ * `orphaned-metadata` is an index row whose edit no longer exists.
252
+ */
253
+ export type OfflineEditQueueDiscardReason = "foreign-version" | "corrupt-record" | "credential-screened" | "orphaned-metadata";
254
+ /** A record that was repaired rather than lost. */
255
+ export type OfflineEditQueueRepairReason = "restored-metadata";
256
+ /**
257
+ * Structured, payload-free account of one recovery pass.
258
+ *
259
+ * Counts and reason codes only: identities are digests, and no `edit.attributes`
260
+ * or `edit.geometry` value is read, copied, or reported. `error` carries the
261
+ * same envelope every other queue failure uses, so a host routes a discard
262
+ * through its existing offline error path.
263
+ */
264
+ export interface OfflineEditQueueRecoveryV1 {
265
+ readonly kind: typeof HONUA_OFFLINE_EDIT_QUEUE_RECOVERY_KIND;
266
+ readonly version: typeof HONUA_OFFLINE_EDIT_QUEUE_RECOVERY_VERSION;
267
+ /** `open` is the startup pass; `read` is a record refused between passes. */
268
+ readonly operation: "open" | "read";
269
+ readonly inspectedRecords: number;
270
+ readonly discardedRecords: number;
271
+ readonly repairedRecords: number;
272
+ readonly discardedByReason: Readonly<Record<OfflineEditQueueDiscardReason, number>>;
273
+ readonly repairedByReason: Readonly<Record<OfflineEditQueueRepairReason, number>>;
274
+ readonly error: HonuaOfflineEditQueueError;
275
+ }
276
+ /** One persisted row paired with the key it is stored under. */
277
+ export interface OfflineEditQueueStoredRecord {
278
+ readonly key: string;
279
+ readonly value: unknown;
280
+ }
281
+ export interface OfflineEditQueueRecoveryRowsV1 {
282
+ readonly edits: readonly OfflineEditQueueStoredRecord[];
283
+ readonly metadata: readonly OfflineEditQueueStoredRecord[];
284
+ readonly tombstones: readonly OfflineEditQueueStoredRecord[];
285
+ }
286
+ export interface OfflineEditQueueRecoveryLimits {
287
+ readonly maxRecords?: number;
288
+ readonly maxBytes?: number;
289
+ }
290
+ /** Deterministic mutation set a recovery pass applies in one transaction. */
291
+ export interface OfflineEditQueueRecoveryPlanV1 {
292
+ readonly report: OfflineEditQueueRecoveryV1;
293
+ readonly deleteEditKeys: readonly string[];
294
+ readonly deleteMetadataKeys: readonly string[];
295
+ readonly deleteTombstoneKeys: readonly string[];
296
+ readonly putMetadata: readonly OfflineEditQueueMetadata[];
297
+ }
298
+ /** Result of validating one persisted row before it is trusted. */
299
+ export type OfflineEditQueueInspection<T> = {
300
+ readonly status: "valid";
301
+ readonly record: T;
302
+ } | {
303
+ readonly status: "invalid";
304
+ readonly reason: OfflineEditQueueDiscardReason;
305
+ };
306
+ export interface OfflineEditQueueOptions {
307
+ readonly now?: () => Date;
308
+ readonly createLeaseToken?: () => string;
309
+ readonly maxEdits?: number;
310
+ readonly maxPayloadBytes?: number;
311
+ readonly maxAuditEvents?: number;
312
+ readonly maxDependencies?: number;
313
+ }
314
+ export interface IndexedDbOfflineEditQueueOptions extends OfflineEditQueueOptions {
315
+ /** Defaults to `honua-offline-edit-queue`. Names are origin-scoped. */
316
+ readonly name?: string;
317
+ readonly indexedDB?: IDBFactory;
318
+ /** Ceilings on the startup recovery pass. */
319
+ readonly recovery?: OfflineEditQueueRecoveryLimits;
320
+ /** Receives every discard and repair. Must not throw. */
321
+ readonly onRecovery?: (report: OfflineEditQueueRecoveryV1) => void;
322
+ }
323
+ /** Compact index row projected from an edit; carries no payload. */
324
+ export interface OfflineEditQueueMetadata extends OfflineEditQueuePartition {
325
+ readonly id: `sha256:${string}`;
326
+ readonly state: OfflineQueuedEditState;
327
+ readonly createdAt: string;
328
+ readonly updatedAt: string;
329
+ readonly dependencyIds: readonly `sha256:${string}`[];
330
+ readonly retryAt?: string;
331
+ readonly leaseExpiresAt?: string;
332
+ }
333
+ /** Identity-only record of a pruned edit; exists so it cannot be re-enqueued. */
334
+ export interface OfflineEditQueueTombstone extends OfflineEditQueuePartition {
335
+ readonly id: `sha256:${string}`;
336
+ readonly requestFingerprint: `sha256:${string}`;
337
+ readonly prunedAt: string;
338
+ readonly terminalState: "applied" | "conflicted" | "cancelled";
339
+ }
340
+ /** Deterministic in-memory implementation for tests and non-persistent hosts. */
341
+ export declare class MemoryOfflineEditQueue implements OfflineEditQueue {
342
+ #private;
343
+ constructor(options?: OfflineEditQueueOptions);
344
+ enqueue(input: EnqueueOfflineEditInput): Promise<OfflineEditEnqueueResult>;
345
+ get(editId: string, partition: OfflineEditQueuePartition): Promise<OfflineQueuedEdit | undefined>;
346
+ list(options: ListOfflineEditsOptions): Promise<readonly OfflineQueuedEdit[]>;
347
+ countByState(partition: OfflineEditQueuePartition): Promise<OfflineEditQueueStateCounts>;
348
+ claimReady(options: ClaimOfflineEditsOptions): Promise<readonly OfflineQueuedEdit[]>;
349
+ markApplied(editId: string, leaseToken: string, outcome?: MarkOfflineEditAppliedInput): Promise<OfflineQueuedEdit>;
350
+ markRetry(editId: string, leaseToken: string, outcome: MarkOfflineEditRetryInput): Promise<OfflineQueuedEdit>;
351
+ markConflicted(editId: string, leaseToken: string, outcome: MarkOfflineEditConflictedInput): Promise<OfflineQueuedEdit>;
352
+ cancel(editId: string, partition: OfflineEditQueuePartition, outcome: CancelOfflineEditInput): Promise<OfflineQueuedEdit>;
353
+ resolveConflict(editId: string, partition: OfflineEditQueuePartition, resolution: ResolveOfflineEditConflictInput): Promise<OfflineQueuedEdit>;
354
+ pruneTerminal(options: PruneTerminalOfflineEditsOptions): Promise<readonly `sha256:${string}`[]>;
355
+ }
356
+ /** Persistent browser implementation with atomic IndexedDB claims and transitions. */
357
+ export declare class IndexedDbOfflineEditQueue implements OfflineEditQueue {
358
+ #private;
359
+ constructor(options?: IndexedDbOfflineEditQueueOptions);
360
+ enqueue(input: EnqueueOfflineEditInput): Promise<OfflineEditEnqueueResult>;
361
+ get(editId: string, partition: OfflineEditQueuePartition): Promise<OfflineQueuedEdit | undefined>;
362
+ list(options: ListOfflineEditsOptions): Promise<readonly OfflineQueuedEdit[]>;
363
+ countByState(partition: OfflineEditQueuePartition): Promise<OfflineEditQueueStateCounts>;
364
+ claimReady(options: ClaimOfflineEditsOptions): Promise<readonly OfflineQueuedEdit[]>;
365
+ markApplied(editId: string, leaseToken: string, outcome?: MarkOfflineEditAppliedInput): Promise<OfflineQueuedEdit>;
366
+ markRetry(editId: string, leaseToken: string, outcome: MarkOfflineEditRetryInput): Promise<OfflineQueuedEdit>;
367
+ markConflicted(editId: string, leaseToken: string, outcome: MarkOfflineEditConflictedInput): Promise<OfflineQueuedEdit>;
368
+ cancel(editId: string, partition: OfflineEditQueuePartition, outcome: CancelOfflineEditInput): Promise<OfflineQueuedEdit>;
369
+ resolveConflict(editId: string, partition: OfflineEditQueuePartition, resolution: ResolveOfflineEditConflictInput): Promise<OfflineQueuedEdit>;
370
+ pruneTerminal(options: PruneTerminalOfflineEditsOptions): Promise<readonly `sha256:${string}`[]>;
371
+ }
372
+ export declare function createMemoryOfflineEditQueue(options?: OfflineEditQueueOptions): MemoryOfflineEditQueue;
373
+ export declare function createIndexedDbOfflineEditQueue(options?: IndexedDbOfflineEditQueueOptions): IndexedDbOfflineEditQueue;
374
+ /**
375
+ * Validate one persisted edit record before anything may act on it.
376
+ *
377
+ * The version gate runs first: a record written by another SDK build is
378
+ * `foreign-version` and is never returned as though it were current, because a
379
+ * field this build reads may mean something else in the layout that wrote it.
380
+ */
381
+ export declare function inspectStoredOfflineEdit(value: unknown): OfflineEditQueueInspection<OfflineQueuedEdit>;
382
+ /** Validate one persisted metadata index row. */
383
+ export declare function inspectStoredOfflineEditMetadata(value: unknown): OfflineEditQueueInspection<OfflineEditQueueMetadata>;
384
+ /**
385
+ * Validate one persisted tombstone.
386
+ *
387
+ * Tombstones exist precisely so a pruned identity cannot be re-enqueued, so a
388
+ * valid one is always preserved by recovery rather than treated as an orphan.
389
+ */
390
+ export declare function inspectStoredOfflineEditTombstone(value: unknown): OfflineEditQueueInspection<OfflineEditQueueTombstone>;
391
+ /**
392
+ * Plan one bounded recovery pass over every persisted row.
393
+ *
394
+ * Pure and deterministic, so the same rows always produce the same mutation
395
+ * set, and so a healthy database plans nothing at all. The edit/metadata
396
+ * relationship is repaired rather than abandoned in both directions: a metadata
397
+ * row whose edit is gone is deleted, and an edit whose metadata row is missing
398
+ * or disagrees has its index row re-derived from the edit itself. That is what
399
+ * keeps a claim from throwing `Offline edit metadata references missing edit`
400
+ * halfway through a replay pass.
401
+ */
402
+ export declare function planOfflineEditQueueRecovery(rows: OfflineEditQueueRecoveryRowsV1, limits?: OfflineEditQueueRecoveryLimits): OfflineEditQueueRecoveryPlanV1;
403
+ //# sourceMappingURL=edit-queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-queue.d.ts","sourceRoot":"","sources":["../../../src/offline/edit-queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/E,eAAO,MAAM,gCAAgC,EAAG,KAAc,C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