hikoutei 0.5.0 → 0.5.2

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 (73) hide show
  1. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.d.ts +5 -15
  2. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.d.ts.map +1 -1
  3. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.js +33 -945
  4. package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.js.map +1 -1
  5. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.d.ts +14 -20
  6. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.d.ts.map +1 -1
  7. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.js +16 -200
  8. package/dist/adapter/sheets/providers/google-sheets-api/model/planner.js.map +1 -1
  9. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerDeletion.d.ts +14 -0
  10. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerDeletion.d.ts.map +1 -0
  11. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerDeletion.js +37 -0
  12. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerDeletion.js.map +1 -0
  13. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerReceipt.d.ts +19 -0
  14. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerReceipt.d.ts.map +1 -0
  15. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerReceipt.js +76 -0
  16. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerReceipt.js.map +1 -0
  17. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerWorkingRow.d.ts +23 -0
  18. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerWorkingRow.d.ts.map +1 -0
  19. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerWorkingRow.js +122 -0
  20. package/dist/adapter/sheets/providers/google-sheets-api/model/plannerWorkingRow.js.map +1 -0
  21. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.d.ts +15 -222
  22. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.d.ts.map +1 -1
  23. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.js +14 -687
  24. package/dist/adapter/sheets/providers/google-sheets-api/model/preflight.js.map +1 -1
  25. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightContext.d.ts +125 -0
  26. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightContext.d.ts.map +1 -0
  27. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightContext.js +161 -0
  28. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightContext.js.map +1 -0
  29. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightFields.d.ts +67 -0
  30. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightFields.d.ts.map +1 -0
  31. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightFields.js +94 -0
  32. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightFields.js.map +1 -0
  33. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightHeaders.d.ts +24 -0
  34. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightHeaders.d.ts.map +1 -0
  35. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightHeaders.js +52 -0
  36. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightHeaders.js.map +1 -0
  37. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightParsing.d.ts +23 -0
  38. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightParsing.d.ts.map +1 -0
  39. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightParsing.js +239 -0
  40. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightParsing.js.map +1 -0
  41. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightRows.d.ts +53 -0
  42. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightRows.d.ts.map +1 -0
  43. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightRows.js +198 -0
  44. package/dist/adapter/sheets/providers/google-sheets-api/model/preflightRows.js.map +1 -0
  45. package/dist/adapter/sheets/providers/google-sheets-api/operations/anchors.d.ts +21 -0
  46. package/dist/adapter/sheets/providers/google-sheets-api/operations/anchors.d.ts.map +1 -0
  47. package/dist/adapter/sheets/providers/google-sheets-api/operations/anchors.js +57 -0
  48. package/dist/adapter/sheets/providers/google-sheets-api/operations/anchors.js.map +1 -0
  49. package/dist/adapter/sheets/providers/google-sheets-api/operations/applyEffects.d.ts +19 -0
  50. package/dist/adapter/sheets/providers/google-sheets-api/operations/applyEffects.d.ts.map +1 -0
  51. package/dist/adapter/sheets/providers/google-sheets-api/operations/applyEffects.js +188 -0
  52. package/dist/adapter/sheets/providers/google-sheets-api/operations/applyEffects.js.map +1 -0
  53. package/dist/adapter/sheets/providers/google-sheets-api/operations/fastAppend.d.ts +13 -0
  54. package/dist/adapter/sheets/providers/google-sheets-api/operations/fastAppend.d.ts.map +1 -0
  55. package/dist/adapter/sheets/providers/google-sheets-api/operations/fastAppend.js +229 -0
  56. package/dist/adapter/sheets/providers/google-sheets-api/operations/fastAppend.js.map +1 -0
  57. package/dist/adapter/sheets/providers/google-sheets-api/operations/preflightOp.d.ts +27 -0
  58. package/dist/adapter/sheets/providers/google-sheets-api/operations/preflightOp.d.ts.map +1 -0
  59. package/dist/adapter/sheets/providers/google-sheets-api/operations/preflightOp.js +54 -0
  60. package/dist/adapter/sheets/providers/google-sheets-api/operations/preflightOp.js.map +1 -0
  61. package/dist/adapter/sheets/providers/google-sheets-api/operations/provisioning.d.ts +28 -0
  62. package/dist/adapter/sheets/providers/google-sheets-api/operations/provisioning.d.ts.map +1 -0
  63. package/dist/adapter/sheets/providers/google-sheets-api/operations/provisioning.js +256 -0
  64. package/dist/adapter/sheets/providers/google-sheets-api/operations/provisioning.js.map +1 -0
  65. package/dist/adapter/sheets/providers/google-sheets-api/operations/readRows.d.ts +40 -0
  66. package/dist/adapter/sheets/providers/google-sheets-api/operations/readRows.d.ts.map +1 -0
  67. package/dist/adapter/sheets/providers/google-sheets-api/operations/readRows.js +186 -0
  68. package/dist/adapter/sheets/providers/google-sheets-api/operations/readRows.js.map +1 -0
  69. package/dist/adapter/sheets/providers/google-sheets-api/operations/shared.d.ts +57 -0
  70. package/dist/adapter/sheets/providers/google-sheets-api/operations/shared.d.ts.map +1 -0
  71. package/dist/adapter/sheets/providers/google-sheets-api/operations/shared.js +130 -0
  72. package/dist/adapter/sheets/providers/google-sheets-api/operations/shared.js.map +1 -0
  73. package/package.json +1 -1
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Receipt construction and result encoding for the effect planner.
3
+ *
4
+ * `makeReceipt` builds a receipt record exactly like the Apps Script
5
+ * `makeReceipt_`; the encoders translate planned outcomes into provider
6
+ * results exactly like the Apps Script `result_` helper, including the
7
+ * deferred-mode postcondition relabeling.
8
+ */
9
+ import { SYNC_EFFECT_RESULT_STATUSES, SYNC_POSTCONDITION_STATUSES } from "../../../../../application/sync/sheets/constants.js";
10
+ import { presentValue, absentValue } from "../../../../../shared/state/index.js";
11
+ /** Builds a receipt record exactly like `makeReceipt_`. */
12
+ export function makeReceipt(effect, visibleHash, visibleRevision) {
13
+ return {
14
+ effectId: effect.effectId,
15
+ payloadHash: effect.payloadHash,
16
+ status: "applied",
17
+ visibleHash,
18
+ visibleRevision,
19
+ };
20
+ }
21
+ /** Encodes a planned outcome as a provider result (Apps Script `result_`). */
22
+ export function encodeOutcomeResult(outcome) {
23
+ switch (outcome.kind) {
24
+ case "applied":
25
+ case "already_applied":
26
+ return {
27
+ effectId: outcome.effect.effectId,
28
+ payloadHash: outcome.effect.payloadHash,
29
+ status: outcome.kind === "applied"
30
+ ? SYNC_EFFECT_RESULT_STATUSES.APPLIED
31
+ : SYNC_EFFECT_RESULT_STATUSES.ALREADY_APPLIED,
32
+ visibleRevision: presentValue(outcome.receipt.visibleRevision),
33
+ visibleHash: presentValue(outcome.receipt.visibleHash),
34
+ snapshotHash: absentValue(),
35
+ reason: absentValue(),
36
+ postcondition: SYNC_POSTCONDITION_STATUSES.VERIFIED,
37
+ };
38
+ case "guard_mismatch":
39
+ case "repair_reobserve":
40
+ case "schema_error":
41
+ case "retryable_error":
42
+ return {
43
+ effectId: outcome.effect.effectId,
44
+ payloadHash: outcome.effect.payloadHash,
45
+ status: outcome.kind,
46
+ visibleRevision: absentValue(),
47
+ visibleHash: absentValue(),
48
+ snapshotHash: absentValue(),
49
+ reason: presentValue(outcome.reason),
50
+ postcondition: SYNC_POSTCONDITION_STATUSES.UNAVAILABLE,
51
+ };
52
+ }
53
+ }
54
+ /** Builds a schema_error result without any receipt-backed evidence. */
55
+ export function encodeSchemaErrorResult(effect, reason) {
56
+ return {
57
+ effectId: effect.effectId,
58
+ payloadHash: effect.payloadHash,
59
+ status: SYNC_EFFECT_RESULT_STATUSES.SCHEMA_ERROR,
60
+ visibleRevision: absentValue(),
61
+ visibleHash: absentValue(),
62
+ snapshotHash: absentValue(),
63
+ reason: presentValue(reason),
64
+ postcondition: SYNC_POSTCONDITION_STATUSES.UNAVAILABLE,
65
+ };
66
+ }
67
+ /** Applies the deferred-mode postcondition relabeling for applied results. */
68
+ export function withDeferredPostcondition(result) {
69
+ if ((result.status === SYNC_EFFECT_RESULT_STATUSES.APPLIED ||
70
+ result.status === SYNC_EFFECT_RESULT_STATUSES.ALREADY_APPLIED) &&
71
+ result.postcondition === SYNC_POSTCONDITION_STATUSES.VERIFIED) {
72
+ return { ...result, postcondition: SYNC_POSTCONDITION_STATUSES.ACKNOWLEDGED };
73
+ }
74
+ return result;
75
+ }
76
+ //# sourceMappingURL=plannerReceipt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plannerReceipt.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/model/plannerReceipt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,MAAM,qD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AC9B,WAAW,EAAE,WAAW,EAAE;gBAC1B,YAAY,EAAE,WAAW,EAAE;gBAC3B,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC;gBACpC,aAAa,EAAE,2BAA2B,CAAC,WAAW;aACvD,CAAC;IACN,CAAC;AACH,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,uBAAuB,CACrC,MAA4B,EAC5B,MAAc;IAEd,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,MAAM,EAAE,2BAA2B,CAAC,YAAY;QAChD,eAAe,EAAE,WAAW,EAAE;QAC9B,WAAW,EAAE,WAAW,EAAE;QAC1B,YAAY,EAAE,WAAW,EAAE;QAC3B,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC;QAC5B,aAAa,EAAE,2BAA2B,CAAC,WAAW;KACvD,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,yBAAyB,CACvC,MAAwB;IAExB,IACE,CAAC,MAAM,CAAC,MAAM,KAAK,2BAA2B,CAAC,OAAO;QACpD,MAAM,CAAC,MAAM,KAAK,2BAA2B,CAAC,eAAe,CAAC;QAChE,MAAM,CAAC,aAAa,KAAK,2BAA2B,CAAC,QAAQ,EAC7D,CAAC;QACD,OAAO,EAAE,GAAG,MAAM,EAAE,aAAa,EAAE,2BAA2B,CAAC,YAAY,EAAE,CAAC;IAChF,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Working-row lifecycle for the effect planner.
3
+ *
4
+ * Preflight rows are copied into mutable working rows the batch can mutate;
5
+ * created rows start at the next append position and are keyed by their full
6
+ * targetId. `planReceiptReplay` handles the receipt-replay branch (a receipt
7
+ * already exists for this effect ID), `currentHash` computes the visible hash
8
+ * restricted to the effect's fields, and `rejectionPlan` builds rejection
9
+ * plans with no mutation and no receipt.
10
+ */
11
+ import { type SyncProjectionEffect } from "../../../../../application/sync/sheets/syncSheets.js";
12
+ import type { PreflightContext, PreflightRow } from "./preflight.js";
13
+ import type { EffectPlan, PlannedReceipt, WorkingRow } from "./planner.js";
14
+ /** Receipt replay branch: a receipt already exists for this effect ID. */
15
+ export declare function planReceiptReplay(effect: SyncProjectionEffect, receipt: PlannedReceipt, context: PreflightContext, byAnchor: ReadonlyMap<string, WorkingRow>, byIdentity: ReadonlyMap<string, WorkingRow>): EffectPlan;
16
+ /** Computes the visible hash of a row restricted to the effect's fields. */
17
+ export declare function currentHash(row: WorkingRow | PreflightRow, fields: Readonly<Record<string, import("../../../../../domain/index.js").NormalizedCell>>): string;
18
+ /** Finds a row by anchor first, then visible identity, then the targetId tail. */
19
+ export declare function findWorkingRow(byAnchor: ReadonlyMap<string, WorkingRow>, byIdentity: ReadonlyMap<string, WorkingRow>, anchor: string, targetId: string): WorkingRow | undefined;
20
+ /** Converts one preflight row into a working row for planning/probing. */
21
+ export declare function toWorkingRow(row: PreflightRow): WorkingRow;
22
+ export declare function createWorkingRow(effect: SyncProjectionEffect, rowNumber: number): WorkingRow;
23
+ //# sourceMappingURL=plannerWorkingRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plannerWorkingRow.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/model/plannerWorkingRow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAA0B,KAAK,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAKzH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG3E,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,EACzC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,GAC1C,UAAU,CAwDZ;AAED,4EAA4E;AAC5E,wBAAgB,WAAW,CACzB,GAAG,EAAE,UAAU,GAAG,YAAY,EAC9B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,gCAAgC,EAAE,cAAc,CAAC,CAAC,GACxF,MAAM,CAMR;AAED,kFAAkF;AAClF,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,EACzC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,EAC3C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,UAAU,GAAG,SAAS,CAUxB;AAiBD,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,GAAG,EAAE,YAAY,GAAG,UAAU,CAU1D;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAiB5F"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * Working-row lifecycle for the effect planner.
3
+ *
4
+ * Preflight rows are copied into mutable working rows the batch can mutate;
5
+ * created rows start at the next append position and are keyed by their full
6
+ * targetId. `planReceiptReplay` handles the receipt-replay branch (a receipt
7
+ * already exists for this effect ID), `currentHash` computes the visible hash
8
+ * restricted to the effect's fields, and `rejectionPlan` builds rejection
9
+ * plans with no mutation and no receipt.
10
+ */
11
+ import { computeSyncVisibleHash } from "../../../../../application/sync/sheets/syncSheets.js";
12
+ import { EFFECT_KINDS } from "../../../../../domain/model/constants.js";
13
+ import { presentValue, absentValue } from "../../../../../shared/state/index.js";
14
+ import { GOOGLE_SHEETS_API_EFFECT_REASONS } from "../constants.js";
15
+ import { isDeletionEffect } from "./plannerDeletion.js";
16
+ /** Receipt replay branch: a receipt already exists for this effect ID. */
17
+ export function planReceiptReplay(effect, receipt, context, byAnchor, byIdentity) {
18
+ if (receipt.payloadHash !== effect.payloadHash) {
19
+ return rejectionPlan(effect, "schema_error", GOOGLE_SHEETS_API_EFFECT_REASONS.EFFECT_ID_REUSED_WITH_DIFFERENT_PAYLOAD);
20
+ }
21
+ const receiptRow = findWorkingRow(byAnchor, byIdentity, effect.payload.targetAnchor, effect.targetId);
22
+ if (isDeletionEffect(effect.effectKind)) {
23
+ if (receiptRow === undefined) {
24
+ return {
25
+ outcome: {
26
+ kind: "already_applied",
27
+ effect,
28
+ rowNumber: absentValue(),
29
+ receipt,
30
+ },
31
+ mutation: undefined,
32
+ receipt,
33
+ verify: false,
34
+ };
35
+ }
36
+ return rejectionPlan(effect, "guard_mismatch", GOOGLE_SHEETS_API_EFFECT_REASONS.RECEIPT_TARGET_REAPPEARED, presentValue(receiptRow.rowNumber));
37
+ }
38
+ if (receiptRow === undefined) {
39
+ const repair = effect.effectKind === EFFECT_KINDS.SYSTEM_REPAIR;
40
+ return rejectionPlan(effect, repair ? "repair_reobserve" : "guard_mismatch", GOOGLE_SHEETS_API_EFFECT_REASONS.RECEIPT_TARGET_MISSING);
41
+ }
42
+ const receiptCurrentHash = currentHash(receiptRow, effect.payload.fields);
43
+ if (receiptCurrentHash === effect.payload.targetVisibleHash) {
44
+ return {
45
+ outcome: {
46
+ kind: "already_applied",
47
+ effect,
48
+ rowNumber: presentValue(receiptRow.rowNumber),
49
+ receipt,
50
+ },
51
+ mutation: undefined,
52
+ receipt,
53
+ verify: false,
54
+ };
55
+ }
56
+ const repair = effect.effectKind === EFFECT_KINDS.SYSTEM_REPAIR;
57
+ return rejectionPlan(effect, repair ? "repair_reobserve" : "guard_mismatch", GOOGLE_SHEETS_API_EFFECT_REASONS.RECEIPT_POSTCONDITION_CHANGED, presentValue(receiptRow.rowNumber));
58
+ }
59
+ /** Computes the visible hash of a row restricted to the effect's fields. */
60
+ export function currentHash(row, fields) {
61
+ const values = {};
62
+ for (const fieldName of Object.keys(fields)) {
63
+ values[fieldName] = row.cells[fieldName] ?? null;
64
+ }
65
+ return computeSyncVisibleHash(values);
66
+ }
67
+ /** Finds a row by anchor first, then visible identity, then the targetId tail. */
68
+ export function findWorkingRow(byAnchor, byIdentity, anchor, targetId) {
69
+ const anchored = byAnchor.get(anchor);
70
+ if (anchored !== undefined)
71
+ return anchored;
72
+ const direct = byIdentity.get(targetId);
73
+ if (direct !== undefined)
74
+ return direct;
75
+ const separator = targetId.lastIndexOf(":");
76
+ if (separator < 0)
77
+ return undefined;
78
+ const visibleIdentity = targetId.slice(separator + 1);
79
+ if (visibleIdentity.length === 0)
80
+ return undefined;
81
+ return byIdentity.get(visibleIdentity);
82
+ }
83
+ /** Builds a rejection plan (no mutation, no receipt). */
84
+ function rejectionPlan(effect, kind, reason, rowNumber = absentValue()) {
85
+ return {
86
+ outcome: { kind, effect, rowNumber, reason },
87
+ mutation: undefined,
88
+ receipt: undefined,
89
+ verify: false,
90
+ };
91
+ }
92
+ /** Converts one preflight row into a working row for planning/probing. */
93
+ export function toWorkingRow(row) {
94
+ return {
95
+ rowNumber: row.rowNumber,
96
+ anchor: row.physicalAnchor,
97
+ cells: { ...row.cells },
98
+ identity: row.identity,
99
+ appended: false,
100
+ deleted: false,
101
+ writeFields: {},
102
+ };
103
+ }
104
+ export function createWorkingRow(effect, rowNumber) {
105
+ const cells = {};
106
+ return {
107
+ rowNumber,
108
+ anchor: presentValue(effect.payload.targetAnchor),
109
+ cells,
110
+ // Key the created row by its full targetId (Apps Script `createRow_`
111
+ // registers byIdentity[targetId] when targetId is non-empty) so a later
112
+ // effect in the same request that targets the same entity finds this row
113
+ // through findWorkingRow's direct targetId lookup instead of creating a
114
+ // second physical row. The caller registers it in byIdentity under
115
+ // effect.targetId via the identity value below.
116
+ identity: effect.targetId.length > 0 ? presentValue(effect.targetId) : absentValue(),
117
+ appended: true,
118
+ deleted: false,
119
+ writeFields: {},
120
+ };
121
+ }
122
+ //# sourceMappingURL=plannerWorkingRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plannerWorkingRow.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/model/plannerWorkingRow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,sBAAsB,EAA6B,MAAM,sDAAsD,CAAC;AACzH,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAExE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AAGnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,0EAA0E;AAC1E,MAAM,UAAU,iBAAiB,CAC/B,MAA4B,EAC5B,OAAuB,EACvB,OAAyB,EACzB,QAAyC,EACzC,UAA2C;IAE3C,IAAI,OAAO,CAAC,WAAW,KAAK,MAAM,CAAC,WAAW,EAAE,CAAC;QAC/C,OAAO,aAAa,CAAC,MAAM,EAAE,cAAc,EACzC,gCAAgC,CAAC,uCAAuC,CAAC,CAAC;IAC9E,CAAC;IACD,MAAM,UAAU,GAAG,cAAc,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtG,IAAI,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QACxC,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO;gBACL,OAAO,EAAE;oBACP,IAAI,EAAE,iBAAiB;oBACvB,MAAM;oBACN,SAAS,EAAE,WAAW,EAAE;oBACxB,OAAO;iBACR;gBACD,QAAQ,EAAE,SAAS;gBACnB,OAAO;gBACP,MAAM,EAAE,KAAK;aACd,CAAC;QACJ,CAAC;QACD,OAAO,aAAa,CAClB,MAAM,EACN,gBAAgB,EAChB,gCAAgC,CAAC,yBAAyB,EAC1D,YAAY,CAAC,UAA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AAG,CAAC,QAAQ;QACtB,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,EAAE;KAChB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAA4B,EAAE,SAAiB;IAC9E,MAAM,KAAK,GAA4E,EAAE,CAAC;IAC1F,OAAO;QACL,SAAS;QACT,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC;QACjD,KAAK;QACL,qEAAqE;QACrE,wEAAwE;QACxE,yEAAyE;QACzE,wEAAwE;QACxE,mEAAmE;QACnE,gDAAgD;QAChD,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;QACpF,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,EAAE;KAChB,CAAC;AACJ,CAAC"}
@@ -13,230 +13,23 @@
13
13
  * The enumeration and the data read are separate functions so the provider
14
14
  * can pace and report each transport request individually; the composite
15
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
16
  *
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).
17
+ * This module is a barrel over the focused preflight modules:
54
18
  *
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.
19
+ * - `preflightFields` — the `GOOGLE_SHEETS_API_*_FIELDS` field masks
20
+ * - `preflightParsing` — untrusted SDK response guards
21
+ * - `preflightHeaders` — registered header validation
22
+ * - `preflightRows` — row normalization, indexes, and sheet/grid lookup
23
+ * - `preflightContext` — typed context types and context assembly
230
24
  *
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.
25
+ * The barrel keeps the historical import surface (`./preflight.js`) intact;
26
+ * the additional exports of the split modules (parsing cell helpers, internal
27
+ * sheet/grid lookup) are intentionally not re-exported here.
234
28
  */
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 {};
29
+ export { GOOGLE_SHEETS_API_PREFLIGHT_FIELDS, GOOGLE_SHEETS_API_ENUMERATION_FIELDS, GOOGLE_SHEETS_API_PROVISION_ENUMERATION_FIELDS, GOOGLE_SHEETS_API_PROVISION_FIELDS, GOOGLE_SHEETS_API_VALUES_FIELDS, GOOGLE_SHEETS_API_OBSERVATION_FIELDS, GOOGLE_SHEETS_API_LIGHTWEIGHT_OBSERVATION_FIELDS, } from "./preflightFields.js";
30
+ export type { ParsedMergedCell, PreflightReceipt, PreflightRow, PreflightContext, PreflightRouteOptions, ParsedSheet, ParsedGridData, ParsedRowData, ParsedRowMetadata, ParsedCellNumberFormat, } from "./preflightContext.js";
31
+ export { enumerateSheetProperties, readPreflightContext, readPreflightData, readReceipts, } from "./preflightContext.js";
32
+ export { parseSpreadsheetDocument, parseSheetPropertiesDocument, } from "./preflightParsing.js";
33
+ export { requireGridDataByTitle, readAnchorIndex, gridRowCells, apiCellNumberFormat, } from "./preflightRows.js";
34
+ export { readRegisteredHeaders, gridHeaderCells, } from "./preflightHeaders.js";
242
35
  //# sourceMappingURL=preflight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../../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mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACL,kCAAkC,EAClC,oCAAoC,EACpC,8CAA8C,EAC9C,kCAAkC,EAClC,+BAA+B,EAC/B,oCAAoC,EACpC,gDAAgD,GACjD,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,eAAe,GAChB,MAAM,uBAAuB,CAAC"}