hikoutei 0.3.3 → 0.3.5

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 (130) hide show
  1. package/README.md +88 -15
  2. package/apps-script/gateway/appsscript.json +17 -0
  3. package/dist/adapter/sheets/providers/apps-script-gateway/index.d.ts +9 -1
  4. package/dist/adapter/sheets/providers/apps-script-gateway/index.d.ts.map +1 -1
  5. package/dist/adapter/sheets/providers/apps-script-gateway/index.js +9 -1
  6. package/dist/adapter/sheets/providers/apps-script-gateway/index.js.map +1 -1
  7. package/dist/adapter/sheets/providers/apps-script-gateway/operations/effect/effectOperationScript.js +1 -1
  8. package/dist/adapter/sheets/providers/apps-script-gateway/operations/observation/observationOperation.js +1 -1
  9. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/batchAppendOperation.d.ts +18 -10
  10. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/batchAppendOperation.d.ts.map +1 -1
  11. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/batchAppendOperation.js +157 -27
  12. package/dist/adapter/sheets/providers/apps-script-gateway/operations/write/batchAppendOperation.js.map +1 -1
  13. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.d.ts +4 -2
  14. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.d.ts.map +1 -1
  15. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.js +4 -2
  16. package/dist/adapter/sheets/providers/apps-script-gateway/transport/operationSyncGateway.js.map +1 -1
  17. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiEffectGateway.d.ts +27 -0
  18. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiEffectGateway.d.ts.map +1 -0
  19. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiEffectGateway.js +14 -0
  20. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiEffectGateway.js.map +1 -0
  21. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.d.ts +156 -0
  22. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.d.ts.map +1 -0
  23. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.js +1138 -0
  24. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.js.map +1 -0
  25. package/dist/adapter/sheets/providers/google-sheets-api/constants.d.ts +87 -0
  26. package/dist/adapter/sheets/providers/google-sheets-api/constants.d.ts.map +1 -0
  27. package/dist/adapter/sheets/providers/google-sheets-api/constants.js +97 -0
  28. package/dist/adapter/sheets/providers/google-sheets-api/constants.js.map +1 -0
  29. package/dist/adapter/sheets/providers/google-sheets-api/errors.d.ts +53 -0
  30. package/dist/adapter/sheets/providers/google-sheets-api/errors.d.ts.map +1 -0
  31. package/dist/adapter/sheets/providers/google-sheets-api/errors.js +61 -0
  32. package/dist/adapter/sheets/providers/google-sheets-api/errors.js.map +1 -0
  33. package/dist/adapter/sheets/providers/google-sheets-api/index.d.ts +18 -0
  34. package/dist/adapter/sheets/providers/google-sheets-api/index.d.ts.map +1 -0
  35. package/dist/adapter/sheets/providers/google-sheets-api/index.js +14 -0
  36. package/dist/adapter/sheets/providers/google-sheets-api/index.js.map +1 -0
  37. package/dist/adapter/sheets/providers/google-sheets-api/model/batchBuilder.d.ts +83 -0
  38. package/dist/adapter/sheets/providers/google-sheets-api/model/batchBuilder.d.ts.map +1 -0
  39. package/dist/adapter/sheets/providers/google-sheets-api/model/batchBuilder.js +413 -0
  40. package/dist/adapter/sheets/providers/google-sheets-api/model/batchBuilder.js.map +1 -0
  41. package/dist/adapter/sheets/providers/google-sheets-api/model/observation.d.ts +86 -0
  42. package/dist/adapter/sheets/providers/google-sheets-api/model/observation.d.ts.map +1 -0
  43. package/dist/adapter/sheets/providers/google-sheets-api/model/observation.js +439 -0
  44. package/dist/adapter/sheets/providers/google-sheets-api/model/observation.js.map +1 -0
  45. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.d.ts +115 -0
  46. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.d.ts.map +1 -0
  47. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.js +522 -0
  48. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.js.map +1 -0
  49. package/dist/adapter/sheets/providers/google-sheets-api/model/postcondition.d.ts +17 -0
  50. package/dist/adapter/sheets/providers/google-sheets-api/model/postcondition.d.ts.map +1 -0
  51. package/dist/adapter/sheets/providers/google-sheets-api/model/postcondition.js +99 -0
  52. package/dist/adapter/sheets/providers/google-sheets-api/model/postcondition.js.map +1 -0
  53. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.d.ts +242 -0
  54. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.d.ts.map +1 -0
  55. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.js +707 -0
  56. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.js.map +1 -0
  57. package/dist/adapter/sheets/providers/google-sheets-api/model/sheetIdAllocator.d.ts +16 -0
  58. package/dist/adapter/sheets/providers/google-sheets-api/model/sheetIdAllocator.d.ts.map +1 -0
  59. package/dist/adapter/sheets/providers/google-sheets-api/model/sheetIdAllocator.js +29 -0
  60. package/dist/adapter/sheets/providers/google-sheets-api/model/sheetIdAllocator.js.map +1 -0
  61. package/dist/adapter/sheets/providers/google-sheets-api/model/tableRead.d.ts +26 -0
  62. package/dist/adapter/sheets/providers/google-sheets-api/model/tableRead.d.ts.map +1 -0
  63. package/dist/adapter/sheets/providers/google-sheets-api/model/tableRead.js +57 -0
  64. package/dist/adapter/sheets/providers/google-sheets-api/model/tableRead.js.map +1 -0
  65. package/dist/adapter/sheets/providers/google-sheets-api/model/valueNormalization.d.ts +102 -0
  66. package/dist/adapter/sheets/providers/google-sheets-api/model/valueNormalization.d.ts.map +1 -0
  67. package/dist/adapter/sheets/providers/google-sheets-api/model/valueNormalization.js +375 -0
  68. package/dist/adapter/sheets/providers/google-sheets-api/model/valueNormalization.js.map +1 -0
  69. package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.d.ts +168 -0
  70. package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.d.ts.map +1 -0
  71. package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.js +247 -0
  72. package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.js.map +1 -0
  73. package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.d.ts +47 -0
  74. package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.d.ts.map +1 -0
  75. package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.js +60 -0
  76. package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.js.map +1 -0
  77. package/dist/application/sync/gateway/RoutedSyncGateway.d.ts +59 -0
  78. package/dist/application/sync/gateway/RoutedSyncGateway.d.ts.map +1 -0
  79. package/dist/application/sync/gateway/RoutedSyncGateway.js +86 -0
  80. package/dist/application/sync/gateway/RoutedSyncGateway.js.map +1 -0
  81. package/dist/application/sync/gateway/transportClassification.d.ts +12 -0
  82. package/dist/application/sync/gateway/transportClassification.d.ts.map +1 -1
  83. package/dist/application/sync/gateway/transportClassification.js +37 -0
  84. package/dist/application/sync/gateway/transportClassification.js.map +1 -1
  85. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.d.ts +16 -0
  86. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.d.ts.map +1 -1
  87. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.js +26 -0
  88. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.js.map +1 -1
  89. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.d.ts.map +1 -1
  90. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js +23 -3
  91. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js.map +1 -1
  92. package/dist/application/sync/outbound/effects/SyncEffectWorker.d.ts +15 -0
  93. package/dist/application/sync/outbound/effects/SyncEffectWorker.d.ts.map +1 -1
  94. package/dist/application/sync/outbound/effects/SyncEffectWorker.js +61 -8
  95. package/dist/application/sync/outbound/effects/SyncEffectWorker.js.map +1 -1
  96. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts +15 -0
  97. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts.map +1 -1
  98. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js +15 -0
  99. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js.map +1 -1
  100. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.d.ts +4 -0
  101. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.d.ts.map +1 -1
  102. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js +16 -0
  103. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js.map +1 -1
  104. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.d.ts +8 -0
  105. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.d.ts.map +1 -1
  106. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js +22 -2
  107. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js.map +1 -1
  108. package/dist/application/sync/service/SyncServiceBootstrap.d.ts +23 -1
  109. package/dist/application/sync/service/SyncServiceBootstrap.d.ts.map +1 -1
  110. package/dist/application/sync/service/SyncServiceBootstrap.js +162 -8
  111. package/dist/application/sync/service/SyncServiceBootstrap.js.map +1 -1
  112. package/dist/infrastructure/storage/index.d.ts +1 -1
  113. package/dist/infrastructure/storage/index.d.ts.map +1 -1
  114. package/dist/infrastructure/storage/index.js +1 -1
  115. package/dist/infrastructure/storage/index.js.map +1 -1
  116. package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts +12 -0
  117. package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts.map +1 -1
  118. package/dist/infrastructure/storage/sync/outbound/effectOutbox.js +22 -1
  119. package/dist/infrastructure/storage/sync/outbound/effectOutbox.js.map +1 -1
  120. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts +10 -0
  121. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts.map +1 -1
  122. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js +38 -0
  123. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js.map +1 -1
  124. package/docs/architecture.md +57 -13
  125. package/docs/ci.md +47 -23
  126. package/docs/development.md +35 -5
  127. package/docs/quick-start.md +43 -11
  128. package/docs/sync-bulk-write-benchmark.md +561 -0
  129. package/docs/write-and-synchronization-flow.md +70 -14
  130. package/package.json +6 -3
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Response-loss postcondition classifier (Apps Script `classifyPostcondition_`).
3
+ *
4
+ * Recovery probes classify one effect against a fresh target+receipt read.
5
+ * The classifier never assumes success: a receipt proves the effect reached
6
+ * the sheet, a matching visible hash proves the target content, and anything
7
+ * else is `unapplied`, `changed`, or `unavailable` so the worker redrives,
8
+ * fails, or keeps probing instead of closing the outbox on weak evidence.
9
+ */
10
+ import { PRESENCE_KINDS } from "../../../../../shared/state/index.js";
11
+ import { presentValue, absentValue } from "../../../../../shared/state/index.js";
12
+ import { currentHash, findWorkingRow, isDeletionEffect, requireGatewayEffect, toWorkingRow, } from "./planner.js";
13
+ /**
14
+ * Classifies one effect's delivery state. `context` must come from the same
15
+ * read pass as `receipts` so the classification is a single consistent view.
16
+ */
17
+ export function classifyPostcondition(context, effect, receipts) {
18
+ const request = {
19
+ physicalSheetId: effect.physicalSheetId,
20
+ sheetName: effect.payload.sheetName,
21
+ registeredRange: effect.payload.registeredRange,
22
+ projection: effect.projection,
23
+ schemaVersion: effect.payload.schemaVersion,
24
+ effects: [effect],
25
+ };
26
+ requireGatewayEffect(effect, request, context);
27
+ const receipt = receipts.get(effect.effectId);
28
+ if (receipt !== undefined && receipt.payloadHash !== effect.payloadHash) {
29
+ return postcondition("changed", absentValue(), absentValue());
30
+ }
31
+ const row = findProbeRow(context, effect);
32
+ if (isDeletionEffect(effect.effectKind)) {
33
+ if (receipt !== undefined && row === undefined) {
34
+ return postcondition("applied", presentValue(receipt.visibleRevision), presentValue(receipt.visibleHash));
35
+ }
36
+ if (row === undefined) {
37
+ // An absent row without this effect's receipt could be a manual
38
+ // deletion; never let that absence close an outbox effect.
39
+ return postcondition("unavailable", absentValue(), absentValue());
40
+ }
41
+ const deleteHash = currentHash(row, effect.payload.fields);
42
+ if (receipt !== undefined) {
43
+ return postcondition("changed", absentValue(), presentValue(deleteHash));
44
+ }
45
+ return deleteHash === effect.expectedVisibleHash
46
+ ? postcondition("unapplied", presentValue(effect.expectedVisibleRevision), presentValue(deleteHash))
47
+ : postcondition("changed", absentValue(), presentValue(deleteHash));
48
+ }
49
+ // A receipt alone cannot prove that a non-delete row still exists; a manual
50
+ // deletion must remain observable instead of closing the outbox.
51
+ if (row === undefined) {
52
+ return postcondition(receipt !== undefined || !effect.payload.createIfMissing ? "changed" : "unapplied", absentValue(), absentValue(), receipt === undefined ? undefined : "receipt_target_missing");
53
+ }
54
+ const current = currentHash(row, effect.payload.fields);
55
+ if (current === effect.payload.targetVisibleHash) {
56
+ if (receipt === undefined) {
57
+ // The row already carries the target content, but without a receipt
58
+ // there is no durable proof that this effect was applied by the
59
+ // provider: the two-batch inline path can crash between the target-row
60
+ // write and the receipt write and leave exactly this orphan. Closing
61
+ // the outbox on row-hash evidence alone would turn that crash into a
62
+ // false success, so stay fail-closed.
63
+ return postcondition("unavailable", absentValue(), presentValue(current), "receipt_missing");
64
+ }
65
+ return postcondition("applied", presentValue(receipt.visibleRevision), presentValue(current));
66
+ }
67
+ const repairGuard = effect.repairGuardHash;
68
+ if (current === effect.expectedVisibleHash ||
69
+ (repairGuard.kind === PRESENCE_KINDS.PRESENT && current === repairGuard.value)) {
70
+ return postcondition("unapplied", presentValue(effect.expectedVisibleRevision), presentValue(current));
71
+ }
72
+ return postcondition("changed", absentValue(), presentValue(current));
73
+ }
74
+ function findProbeRow(context, effect) {
75
+ const byAnchor = new Map();
76
+ const byIdentity = new Map();
77
+ for (const row of context.rows) {
78
+ const working = toWorkingRow(row);
79
+ if (working.anchor.kind === PRESENCE_KINDS.PRESENT) {
80
+ byAnchor.set(working.anchor.value, working);
81
+ }
82
+ if (working.identity.kind === PRESENCE_KINDS.PRESENT) {
83
+ byIdentity.set(working.identity.value, working);
84
+ }
85
+ }
86
+ return findWorkingRow(byAnchor, byIdentity, effect.payload.targetAnchor, effect.targetId);
87
+ }
88
+ function postcondition(disposition, visibleRevision, visibleHash, reason) {
89
+ const result = {
90
+ disposition,
91
+ visibleRevision,
92
+ visibleHash,
93
+ // The direct provider never computes a snapshot hash; recovery does not
94
+ // need it and the Apps Script gateway also returns null here.
95
+ snapshotHash: absentValue(),
96
+ };
97
+ return reason === undefined ? result : { ...result, reason };
98
+ }
99
+ //# sourceMappingURL=postcondition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postcondition.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/model/postcondition.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEjF,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,GAEb,MAAM,cAAc,CAAC;AAEtB;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAyB,EACzB,MAAyB,EACzB,QAA+C;IAE/C,MAAM,OAAO,GAAG;QACd,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS;QACnC,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,eAAe;QAC/C,UAAU,EAAE,MAAM,CAAC,UAAU;Q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AK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,242 @@
1
+ /**
2
+ * Bulk preflight: a sheet enumeration call plus one bounded data read of the
3
+ * target tab and receipt tab.
4
+ *
5
+ * The provider first enumerates every tab (no ranges, so hidden sheets are
6
+ * returned), then reads the target grid (values, date formats, row-level
7
+ * developer-metadata anchors) and the hidden receipt tab through the narrow
8
+ * transport. Every untrusted SDK payload is validated with runtime guards
9
+ * and promoted into a typed context the planner can mutate. Any drift —
10
+ * header changes, duplicate anchors or identities, malformed receipts,
11
+ * invalid cells — fails closed before a single mutation request is built.
12
+ *
13
+ * The enumeration and the data read are separate functions so the provider
14
+ * can pace and report each transport request individually; the composite
15
+ * `readPreflightContext` keeps the two-call sequence for non-pacing callers.
16
+ */
17
+ import type { NormalizedCell } from "../../../../../domain/index.js";
18
+ import type { Presence } from "../../../../../shared/state/index.js";
19
+ import type { GoogleSheetsApiTransport } from "../transport/googleSheetsApiTransport.js";
20
+ /**
21
+ * Preflight field mask: sheet identity plus grid values, formats, anchors.
22
+ *
23
+ * GridData has no `sheetId` of its own; the parent sheet's
24
+ * `sheets.properties.sheetId` identifies the grid, and developer metadata
25
+ * uses the REST `metadataKey`/`metadataValue` field names.
26
+ */
27
+ export declare const GOOGLE_SHEETS_API_PREFLIGHT_FIELDS: string;
28
+ /**
29
+ * Enumeration field mask: sheet identity only.
30
+ *
31
+ * The enumeration call requests no ranges because a ranged
32
+ * `spreadsheets.get` response only carries sheets intersecting the requested
33
+ * ranges (hidden tabs included only when no ranges are given); the receipt
34
+ * tab can therefore never be discovered from the ranged data call alone.
35
+ */
36
+ export declare const GOOGLE_SHEETS_API_ENUMERATION_FIELDS = "sheets.properties(sheetId,title,hidden)";
37
+ /**
38
+ * Provisioning enumeration mask: sheet identity plus grid dimensions.
39
+ *
40
+ * The grid dimensions let provisioning request the full used grid of an
41
+ * existing tab (up to the sheet's actual last column) so "truly empty" is
42
+ * judged against the whole tab, not just the registered range.
43
+ */
44
+ export declare const GOOGLE_SHEETS_API_PROVISION_ENUMERATION_FIELDS = "sheets.properties(sheetId,title,hidden,gridProperties(rowCount,columnCount))";
45
+ /**
46
+ * Provisioning data mask: values plus number formats for header checks.
47
+ *
48
+ * Anchors, merged ranges, and computed values are not needed to decide
49
+ * whether an existing tab is empty or whether its header row matches.
50
+ */
51
+ export declare const GOOGLE_SHEETS_API_PROVISION_FIELDS: string;
52
+ /**
53
+ * Values-only table-read mask (getValues semantics).
54
+ *
55
+ * Includes computed values, formatted error strings, number formats, and
56
+ * data-validation rules so formula cells resolve to their computed value,
57
+ * error cells to their display string, and checkbox columns to their
58
+ * blank/false rule.
59
+ */
60
+ export declare const GOOGLE_SHEETS_API_VALUES_FIELDS: string;
61
+ /**
62
+ * Full observation mask: values, computed values, merged ranges, anchors.
63
+ *
64
+ * This is the metadata-preserving read used by snapshots and anchor
65
+ * assignment. Merged regions live on the SHEET object as `sheets.merges`
66
+ * (GridRange entries), NOT on GridData, and `rowMetadata.developerMetadata`
67
+ * returns the row anchor evidence under the REST `metadataKey`/
68
+ * `metadataValue` names.
69
+ */
70
+ export declare const GOOGLE_SHEETS_API_OBSERVATION_FIELDS: string;
71
+ /**
72
+ * Lightweight observation mask: values and computed values only.
73
+ *
74
+ * Used by user_input polling reads, which never consult merged regions (the
75
+ * lightweight branch has no merged map) or data-validation rules (the
76
+ * checkbox-false blank rule comes from the checkboxHeaders config, not from
77
+ * dataValidation). Keeping `sheets.merges` and `dataValidation` out of the
78
+ * request makes the polling read cheaper.
79
+ */
80
+ export declare const GOOGLE_SHEETS_API_LIGHTWEIGHT_OBSERVATION_FIELDS: string;
81
+ /** One validated merged-cell region (a GridRange) from a sheet payload. */
82
+ export interface ParsedMergedCell {
83
+ readonly sheetId?: number;
84
+ readonly startRowIndex: number;
85
+ readonly endRowIndex: number;
86
+ readonly startColumnIndex: number;
87
+ readonly endColumnIndex: number;
88
+ }
89
+ /** One validated receipt row read from the hidden receipt tab. */
90
+ export interface PreflightReceipt {
91
+ readonly effectId: string;
92
+ readonly payloadHash: string;
93
+ readonly status: "applied";
94
+ readonly visibleHash: string;
95
+ readonly visibleRevision: number;
96
+ }
97
+ /** One nonblank target row normalized from the grid read. */
98
+ export interface PreflightRow {
99
+ readonly rowNumber: number;
100
+ readonly physicalAnchor: Presence<string>;
101
+ readonly cells: Readonly<Record<string, NormalizedCell>>;
102
+ readonly identity: Presence<string>;
103
+ }
104
+ /** Typed preflight context consumed by the planner and batch builder. */
105
+ export interface PreflightContext {
106
+ readonly sheetId: number;
107
+ readonly title: string;
108
+ /** 1-based absolute start column of the registered range in the grid. */
109
+ readonly startColumn: number;
110
+ readonly headers: readonly string[];
111
+ /** header -> 0-based column offset inside the registered range. */
112
+ readonly positions: ReadonlyMap<string, number>;
113
+ readonly rows: readonly PreflightRow[];
114
+ readonly byAnchor: ReadonlyMap<string, PreflightRow>;
115
+ readonly byIdentity: ReadonlyMap<string, PreflightRow>;
116
+ /** First free row (1-based) for appends: max(lastContentRow + 1, 2). */
117
+ readonly nextAppendRow: number;
118
+ readonly identityField: Presence<string>;
119
+ readonly checkboxHeaders: readonly string[];
120
+ readonly receiptSheetId: Presence<number>;
121
+ /** Receipt tab last content row; 0 when the tab is absent. */
122
+ readonly receiptLastRow: number;
123
+ readonly receipts: ReadonlyMap<string, PreflightReceipt>;
124
+ /** Sheet ids of every tab seen by the enumeration (id allocator input). */
125
+ readonly existingSheetIds: readonly number[];
126
+ }
127
+ /** Route-level inputs every preflight needs from the registered definition. */
128
+ export interface PreflightRouteOptions {
129
+ readonly spreadsheetId: string;
130
+ readonly sheetName: string;
131
+ readonly registeredRange: string;
132
+ readonly headers: readonly string[];
133
+ readonly identityField: Presence<string>;
134
+ readonly checkboxHeaders: readonly string[];
135
+ }
136
+ /**
137
+ * Enumerates every tab of the spreadsheet (no ranges, so hidden tabs are
138
+ * returned). The enumeration supplies the sheetIds the data call's grid
139
+ * data is keyed by and the receipt tab's presence.
140
+ */
141
+ export declare function enumerateSheetProperties(transport: GoogleSheetsApiTransport, spreadsheetId: string, timeoutMs?: number): Promise<readonly ParsedSheet[]>;
142
+ /** Reads and validates the target and receipt tabs for one route. */
143
+ export declare function readPreflightContext(transport: GoogleSheetsApiTransport, route: PreflightRouteOptions, timeoutMs?: number): Promise<PreflightContext>;
144
+ /**
145
+ * Reads the bounded target/receipt grid data for one route, given the sheet
146
+ * enumeration. The target range starts at A1 and extends to the registered
147
+ * range's end column (whole-column ranges can legitimately exceed ZZ),
148
+ * keeping the 1,048,576-row limit of the grid.
149
+ */
150
+ export declare function readPreflightData(transport: GoogleSheetsApiTransport, route: PreflightRouteOptions, sheets: readonly ParsedSheet[], timeoutMs?: number): Promise<PreflightContext>;
151
+ export interface ParsedSheet {
152
+ readonly sheetId: number;
153
+ readonly title: string;
154
+ readonly hidden: boolean;
155
+ /** Grid dimensions when the requesting mask included gridProperties. */
156
+ readonly gridProperties?: {
157
+ readonly rowCount: number;
158
+ readonly columnCount: number;
159
+ };
160
+ /** Merged ranges when the requesting mask included sheets.merges. */
161
+ readonly merges?: readonly ParsedMergedCell[];
162
+ }
163
+ export interface ParsedGridData {
164
+ readonly startRow: number;
165
+ readonly startColumn: number;
166
+ readonly rowData: readonly ParsedRowData[];
167
+ readonly rowMetadata: readonly ParsedRowMetadata[];
168
+ }
169
+ export interface ParsedRowData {
170
+ readonly values: readonly unknown[];
171
+ }
172
+ export interface ParsedRowMetadata {
173
+ readonly developerMetadata: readonly {
174
+ readonly metadataKey: string;
175
+ readonly metadataValue: string;
176
+ }[];
177
+ }
178
+ /** One validated REST `CellFormat.numberFormat` object from an SDK cell. */
179
+ export interface ParsedCellNumberFormat {
180
+ readonly type: string;
181
+ readonly pattern: string | undefined;
182
+ }
183
+ interface ParsedSpreadsheetDocument {
184
+ readonly sheets: readonly ParsedSheet[];
185
+ readonly grids: ReadonlyMap<number, ParsedGridData>;
186
+ }
187
+ /** Promotes an untrusted `spreadsheets.get` body with runtime guards. */
188
+ export declare function parseSpreadsheetDocument(value: unknown, label: string): ParsedSpreadsheetDocument;
189
+ /**
190
+ * Promotes an enumeration-only `spreadsheets.get` body (sheet properties,
191
+ * no grid data) with runtime guards.
192
+ */
193
+ export declare function parseSheetPropertiesDocument(value: unknown, label: string): readonly ParsedSheet[];
194
+ /** Returns the parsed grid for one sheet by title, failing closed when absent. */
195
+ export declare function requireGridDataByTitle(document: ParsedSpreadsheetDocument, sheets: readonly ParsedSheet[], title: string): {
196
+ readonly sheet: ParsedSheet;
197
+ readonly grid: ParsedGridData;
198
+ };
199
+ /**
200
+ * Validates the header row against the registered definition and layout:
201
+ * every cell must be a non-empty string, duplicates fail closed, and the
202
+ * row must match the expected headers exactly.
203
+ */
204
+ export declare function readRegisteredHeaders(data: ParsedGridData, range: {
205
+ readonly startColumn: number;
206
+ readonly columnCount: number;
207
+ }, expectedHeaders: readonly string[]): readonly string[];
208
+ /** Returns the header cells of one grid as raw API values (no validation). */
209
+ export declare function gridHeaderCells(data: ParsedGridData, range: {
210
+ readonly startColumn: number;
211
+ readonly columnCount: number;
212
+ }): readonly unknown[];
213
+ /**
214
+ * Builds the row -> anchor-list index from one grid's row metadata.
215
+ *
216
+ * Row metadata is index-aligned with rowData; only the shared anchor key
217
+ * counts, and a row may legitimately carry several metadata entries (the
218
+ * caller decides whether multiple anchors are an error).
219
+ */
220
+ export declare function readAnchorIndex(data: ParsedGridData): ReadonlyMap<number, readonly string[]>;
221
+ /**
222
+ * Reads the visible cells of one 1-based row over the registered range.
223
+ *
224
+ * `null` entries mark blank cells, matching the sparse values arrays the API
225
+ * returns (a row's values array may be narrower than the requested range).
226
+ */
227
+ export declare function gridRowCells(data: ParsedGridData, rowNumber: number, startColumn: number, columnCount: number): readonly unknown[];
228
+ /**
229
+ * Extracts the number format of one API cell, if any.
230
+ *
231
+ * The REST API models `CellFormat.numberFormat` as a `{ type, pattern }`
232
+ * object, never a bare string; the user-entered format wins over the
233
+ * effective format when both are present.
234
+ */
235
+ export declare function apiCellNumberFormat(value: unknown): ParsedCellNumberFormat | undefined;
236
+ /** Parses and validates the hidden receipt tab grid. */
237
+ export declare function readReceipts(data: ParsedGridData): {
238
+ readonly receipts: ReadonlyMap<string, PreflightReceipt>;
239
+ readonly lastRow: number;
240
+ };
241
+ export {};
242
+ //# sourceMappingURL=preflight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/model/preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAQrE,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,0CAA0C,CAAC;AAUlD;;;;;;GAMG;AACH,eAAO,MAAM,kCAAkC,QAKrC,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC,4CACN,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,8CAA8C,iFACqB,CAAC;AAEjF;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,QAIrC,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,QAKlC,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,oCAAoC,QAOvC,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,gDAAgD,QAMnD,CAAC;AAEX,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,c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