@stoneforge/quarry 1.12.0 → 1.13.0

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 (122) hide show
  1. package/README.md +2 -0
  2. package/dist/cli/commands/auto-link-helper.d.ts +33 -0
  3. package/dist/cli/commands/auto-link-helper.d.ts.map +1 -0
  4. package/dist/cli/commands/auto-link-helper.js +73 -0
  5. package/dist/cli/commands/auto-link-helper.js.map +1 -0
  6. package/dist/cli/commands/crud.d.ts +1 -0
  7. package/dist/cli/commands/crud.d.ts.map +1 -1
  8. package/dist/cli/commands/crud.js +44 -5
  9. package/dist/cli/commands/crud.js.map +1 -1
  10. package/dist/cli/commands/external-sync.d.ts +17 -0
  11. package/dist/cli/commands/external-sync.d.ts.map +1 -0
  12. package/dist/cli/commands/external-sync.js +1647 -0
  13. package/dist/cli/commands/external-sync.js.map +1 -0
  14. package/dist/cli/runner.d.ts.map +1 -1
  15. package/dist/cli/runner.js +3 -0
  16. package/dist/cli/runner.js.map +1 -1
  17. package/dist/config/config.d.ts.map +1 -1
  18. package/dist/config/config.js +28 -0
  19. package/dist/config/config.js.map +1 -1
  20. package/dist/config/defaults.d.ts +13 -1
  21. package/dist/config/defaults.d.ts.map +1 -1
  22. package/dist/config/defaults.js +21 -0
  23. package/dist/config/defaults.js.map +1 -1
  24. package/dist/config/file.d.ts.map +1 -1
  25. package/dist/config/file.js +61 -0
  26. package/dist/config/file.js.map +1 -1
  27. package/dist/config/index.d.ts +3 -3
  28. package/dist/config/index.d.ts.map +1 -1
  29. package/dist/config/index.js +2 -2
  30. package/dist/config/index.js.map +1 -1
  31. package/dist/config/merge.d.ts.map +1 -1
  32. package/dist/config/merge.js +46 -1
  33. package/dist/config/merge.js.map +1 -1
  34. package/dist/config/types.d.ts +63 -1
  35. package/dist/config/types.d.ts.map +1 -1
  36. package/dist/config/types.js +30 -0
  37. package/dist/config/types.js.map +1 -1
  38. package/dist/config/validation.d.ts.map +1 -1
  39. package/dist/config/validation.js +51 -1
  40. package/dist/config/validation.js.map +1 -1
  41. package/dist/external-sync/adapters/task-sync-adapter.d.ts +177 -0
  42. package/dist/external-sync/adapters/task-sync-adapter.d.ts.map +1 -0
  43. package/dist/external-sync/adapters/task-sync-adapter.js +353 -0
  44. package/dist/external-sync/adapters/task-sync-adapter.js.map +1 -0
  45. package/dist/external-sync/auto-link.d.ts +66 -0
  46. package/dist/external-sync/auto-link.d.ts.map +1 -0
  47. package/dist/external-sync/auto-link.js +98 -0
  48. package/dist/external-sync/auto-link.js.map +1 -0
  49. package/dist/external-sync/conflict-resolver.d.ts +170 -0
  50. package/dist/external-sync/conflict-resolver.d.ts.map +1 -0
  51. package/dist/external-sync/conflict-resolver.js +580 -0
  52. package/dist/external-sync/conflict-resolver.js.map +1 -0
  53. package/dist/external-sync/index.d.ts +20 -0
  54. package/dist/external-sync/index.d.ts.map +1 -0
  55. package/dist/external-sync/index.js +20 -0
  56. package/dist/external-sync/index.js.map +1 -0
  57. package/dist/external-sync/provider-registry.d.ts +109 -0
  58. package/dist/external-sync/provider-registry.d.ts.map +1 -0
  59. package/dist/external-sync/provider-registry.js +188 -0
  60. package/dist/external-sync/provider-registry.js.map +1 -0
  61. package/dist/external-sync/providers/github/github-api.d.ts +271 -0
  62. package/dist/external-sync/providers/github/github-api.d.ts.map +1 -0
  63. package/dist/external-sync/providers/github/github-api.js +366 -0
  64. package/dist/external-sync/providers/github/github-api.js.map +1 -0
  65. package/dist/external-sync/providers/github/github-field-map.d.ts +76 -0
  66. package/dist/external-sync/providers/github/github-field-map.d.ts.map +1 -0
  67. package/dist/external-sync/providers/github/github-field-map.js +157 -0
  68. package/dist/external-sync/providers/github/github-field-map.js.map +1 -0
  69. package/dist/external-sync/providers/github/github-provider.d.ts +36 -0
  70. package/dist/external-sync/providers/github/github-provider.d.ts.map +1 -0
  71. package/dist/external-sync/providers/github/github-provider.js +212 -0
  72. package/dist/external-sync/providers/github/github-provider.js.map +1 -0
  73. package/dist/external-sync/providers/github/github-task-adapter.d.ts +135 -0
  74. package/dist/external-sync/providers/github/github-task-adapter.d.ts.map +1 -0
  75. package/dist/external-sync/providers/github/github-task-adapter.js +374 -0
  76. package/dist/external-sync/providers/github/github-task-adapter.js.map +1 -0
  77. package/dist/external-sync/providers/github/index.d.ts +12 -0
  78. package/dist/external-sync/providers/github/index.d.ts.map +1 -0
  79. package/dist/external-sync/providers/github/index.js +15 -0
  80. package/dist/external-sync/providers/github/index.js.map +1 -0
  81. package/dist/external-sync/providers/index.d.ts +9 -0
  82. package/dist/external-sync/providers/index.d.ts.map +1 -0
  83. package/dist/external-sync/providers/index.js +10 -0
  84. package/dist/external-sync/providers/index.js.map +1 -0
  85. package/dist/external-sync/providers/linear/index.d.ts +19 -0
  86. package/dist/external-sync/providers/linear/index.d.ts.map +1 -0
  87. package/dist/external-sync/providers/linear/index.js +19 -0
  88. package/dist/external-sync/providers/linear/index.js.map +1 -0
  89. package/dist/external-sync/providers/linear/linear-api.d.ts +252 -0
  90. package/dist/external-sync/providers/linear/linear-api.d.ts.map +1 -0
  91. package/dist/external-sync/providers/linear/linear-api.js +522 -0
  92. package/dist/external-sync/providers/linear/linear-api.js.map +1 -0
  93. package/dist/external-sync/providers/linear/linear-field-map.d.ts +135 -0
  94. package/dist/external-sync/providers/linear/linear-field-map.d.ts.map +1 -0
  95. package/dist/external-sync/providers/linear/linear-field-map.js +338 -0
  96. package/dist/external-sync/providers/linear/linear-field-map.js.map +1 -0
  97. package/dist/external-sync/providers/linear/linear-provider.d.ts +52 -0
  98. package/dist/external-sync/providers/linear/linear-provider.d.ts.map +1 -0
  99. package/dist/external-sync/providers/linear/linear-provider.js +169 -0
  100. package/dist/external-sync/providers/linear/linear-provider.js.map +1 -0
  101. package/dist/external-sync/providers/linear/linear-task-adapter.d.ts +190 -0
  102. package/dist/external-sync/providers/linear/linear-task-adapter.d.ts.map +1 -0
  103. package/dist/external-sync/providers/linear/linear-task-adapter.js +521 -0
  104. package/dist/external-sync/providers/linear/linear-task-adapter.js.map +1 -0
  105. package/dist/external-sync/providers/linear/linear-types.d.ts +114 -0
  106. package/dist/external-sync/providers/linear/linear-types.d.ts.map +1 -0
  107. package/dist/external-sync/providers/linear/linear-types.js +10 -0
  108. package/dist/external-sync/providers/linear/linear-types.js.map +1 -0
  109. package/dist/external-sync/sync-engine.d.ts +298 -0
  110. package/dist/external-sync/sync-engine.d.ts.map +1 -0
  111. package/dist/external-sync/sync-engine.js +785 -0
  112. package/dist/external-sync/sync-engine.js.map +1 -0
  113. package/dist/index.d.ts +1 -0
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +2 -0
  116. package/dist/index.js.map +1 -1
  117. package/dist/services/inbox.js +1 -1
  118. package/dist/sync/hash.d.ts +5 -0
  119. package/dist/sync/hash.d.ts.map +1 -1
  120. package/dist/sync/hash.js +21 -2
  121. package/dist/sync/hash.js.map +1 -1
  122. package/package.json +11 -5
@@ -0,0 +1,298 @@
1
+ /**
2
+ * Sync Engine — orchestrates push/pull operations between Stoneforge and external services
3
+ *
4
+ * The sync engine coordinates bidirectional synchronization between Stoneforge elements
5
+ * and external services (GitHub, Linear, etc.) using the provider registry and adapters.
6
+ *
7
+ * Core operations:
8
+ * - push(): Push locally-changed linked elements to external services
9
+ * - pull(): Pull externally-changed items into Stoneforge
10
+ * - sync(): Bidirectional sync (push then pull)
11
+ *
12
+ * Change detection:
13
+ * - Push: Query events since lastPushedAt, filter to elements with _externalSync metadata,
14
+ * compare content hash against lastPushedHash
15
+ * - Pull: Call adapter.listIssuesSince() using global sync cursor from settings,
16
+ * compare against lastPulledHash
17
+ *
18
+ * Usage:
19
+ * ```typescript
20
+ * import { createSyncEngine } from '@stoneforge/quarry';
21
+ *
22
+ * const engine = createSyncEngine({ api, registry, settings });
23
+ * const result = await engine.push({ all: true });
24
+ * const result = await engine.pull();
25
+ * const result = await engine.sync({ dryRun: true });
26
+ * ```
27
+ */
28
+ import type { ExternalSyncResult, ExternalTask, ConflictStrategy, ProviderConfig } from '@stoneforge/core';
29
+ import type { Element, ElementId, Timestamp, EventFilter } from '@stoneforge/core';
30
+ import type { ProviderRegistry } from './provider-registry.js';
31
+ /**
32
+ * Options for sync operations (push, pull, sync)
33
+ */
34
+ export interface SyncOptions {
35
+ /** Report what would change without making changes */
36
+ readonly dryRun?: boolean;
37
+ /** Sync specific tasks only (by element ID) */
38
+ readonly taskIds?: readonly string[];
39
+ /** Sync all linked tasks */
40
+ readonly all?: boolean;
41
+ /** Force push all linked tasks, skipping hash comparison and event query guards */
42
+ readonly force?: boolean;
43
+ }
44
+ /**
45
+ * Minimal QuarryAPI interface — only the methods the sync engine needs.
46
+ * Avoids coupling to the full QuarryAPI type.
47
+ */
48
+ export interface SyncEngineAPI {
49
+ /** Get a single element by ID */
50
+ get<T extends Element>(id: ElementId): Promise<T | null>;
51
+ /** List elements matching a filter */
52
+ list<T extends Element>(filter?: Record<string, unknown>): Promise<T[]>;
53
+ /** Update an element */
54
+ update<T extends Element>(id: ElementId, updates: Partial<T>): Promise<T>;
55
+ /** Create a new element */
56
+ create<T extends Element>(input: Record<string, unknown>): Promise<T>;
57
+ /** List events matching a filter */
58
+ listEvents(filter?: EventFilter): Promise<Array<{
59
+ elementId: ElementId;
60
+ eventType: string;
61
+ createdAt: Timestamp;
62
+ }>>;
63
+ }
64
+ /**
65
+ * Minimal settings interface for sync cursor storage.
66
+ * Uses the generic getSetting/setSetting pattern.
67
+ */
68
+ export interface SyncEngineSettings {
69
+ /** Get a setting value by key */
70
+ getSetting(key: string): {
71
+ value: unknown;
72
+ } | undefined;
73
+ /** Set a setting value by key */
74
+ setSetting(key: string, value: unknown): {
75
+ value: unknown;
76
+ };
77
+ }
78
+ /**
79
+ * Conflict resolver interface — resolves conflicts when both local and remote changed.
80
+ * The actual implementation is in conflict-resolver.ts (separate task).
81
+ * The sync engine uses this interface to decouple from the resolver implementation.
82
+ */
83
+ export interface SyncConflictResolver {
84
+ /**
85
+ * Resolve a conflict between local and remote versions.
86
+ *
87
+ * @param localElement - The local Stoneforge element
88
+ * @param remoteItem - The external task/item
89
+ * @param strategy - The conflict strategy to apply
90
+ * @returns Resolution result indicating which side wins, or 'manual' for unresolved
91
+ */
92
+ resolve(localElement: Element, remoteItem: ExternalTask, strategy: ConflictStrategy): ConflictResolution;
93
+ }
94
+ /**
95
+ * Result of conflict resolution
96
+ */
97
+ export interface ConflictResolution {
98
+ /** Which side won ('local', 'remote', or 'manual' for unresolved) */
99
+ readonly winner: 'local' | 'remote' | 'manual';
100
+ /** Whether the conflict was auto-resolved */
101
+ readonly resolved: boolean;
102
+ }
103
+ /**
104
+ * Configuration for the sync engine
105
+ */
106
+ export interface SyncEngineConfig {
107
+ /** QuarryAPI instance for element CRUD + events */
108
+ readonly api: SyncEngineAPI;
109
+ /** Provider registry for looking up providers and adapters */
110
+ readonly registry: ProviderRegistry;
111
+ /** Settings service for sync cursor storage */
112
+ readonly settings?: SyncEngineSettings;
113
+ /** Conflict resolver (optional — defaults to last-write-wins) */
114
+ readonly conflictResolver?: SyncConflictResolver;
115
+ /** Default conflict strategy */
116
+ readonly defaultConflictStrategy?: ConflictStrategy;
117
+ /** Default provider config (for pull — specifies which provider/project to sync) */
118
+ readonly providerConfigs?: readonly ProviderConfig[];
119
+ }
120
+ /**
121
+ * Sync Engine — coordinates push/pull operations between Stoneforge and external services.
122
+ *
123
+ * The engine is stateless — all state is stored in element metadata (_externalSync)
124
+ * and settings (sync cursors). Each operation reads current state, computes changes,
125
+ * and writes updated state.
126
+ */
127
+ export declare class SyncEngine {
128
+ private readonly api;
129
+ private readonly registry;
130
+ private readonly settings;
131
+ private readonly conflictResolver;
132
+ private readonly defaultStrategy;
133
+ private readonly providerConfigs;
134
+ constructor(config: SyncEngineConfig);
135
+ /**
136
+ * Push locally-changed linked elements to external services.
137
+ *
138
+ * Algorithm:
139
+ * 1. Find elements with _externalSync metadata
140
+ * 2. For each element, query events since lastPushedAt
141
+ * 3. Compare current content hash against lastPushedHash
142
+ * 4. If hash differs, push changes to external service via adapter
143
+ * 5. Update _externalSync metadata with new timestamp and hash
144
+ *
145
+ * @param options - Push options (dryRun, taskIds, all)
146
+ * @returns Aggregated sync result across all providers
147
+ */
148
+ push(options?: SyncOptions): Promise<ExternalSyncResult>;
149
+ /**
150
+ * Push a single element to its external service.
151
+ *
152
+ * @returns 'pushed' if changes were sent, 'skipped' if no changes detected
153
+ */
154
+ private pushElement;
155
+ /**
156
+ * Pull externally-changed items into Stoneforge.
157
+ *
158
+ * Algorithm:
159
+ * 1. For each configured provider, get the sync cursor (last poll timestamp)
160
+ * 2. Call adapter.listIssuesSince(project, cursor) to find changed items
161
+ * 3. For each changed item:
162
+ * a. If linked to a local element, compare against lastPulledHash
163
+ * b. If unlinked and options.all is set, create a new Stoneforge task
164
+ * c. If both local and remote changed, use conflict resolver
165
+ * 4. Update sync cursors and element metadata
166
+ *
167
+ * @param options - Pull options (dryRun, taskIds, all)
168
+ * @returns Aggregated sync result
169
+ */
170
+ pull(options?: SyncOptions): Promise<ExternalSyncResult>;
171
+ /**
172
+ * Pull changes from a specific provider.
173
+ */
174
+ private pullFromProvider;
175
+ /**
176
+ * Pull a single external item into Stoneforge.
177
+ *
178
+ * @returns 'pulled' if local element was updated, 'skipped' if no changes,
179
+ * 'created' if a new task was created
180
+ */
181
+ private pullItem;
182
+ /**
183
+ * Bidirectional sync — push then pull.
184
+ *
185
+ * Runs push first to send local changes, then pull to receive remote changes.
186
+ * Results are merged from both operations.
187
+ *
188
+ * @param options - Sync options (dryRun, taskIds, all)
189
+ * @returns Merged sync result
190
+ */
191
+ sync(options?: SyncOptions): Promise<ExternalSyncResult>;
192
+ /**
193
+ * Find elements that are linked to external services and match the given options.
194
+ *
195
+ * - If taskIds is specified, returns only those tasks (that have _externalSync)
196
+ * - If all is true, returns all tasks with _externalSync metadata
197
+ * - Otherwise, returns tasks with _externalSync that have been updated
198
+ */
199
+ private findLinkedElements;
200
+ /**
201
+ * Find elements linked to a specific provider and project.
202
+ */
203
+ private findLinkedElementsForProvider;
204
+ /**
205
+ * Convert an ExternalTask to partial updates for applying to a local element.
206
+ *
207
+ * Delegates to externalTaskToTaskUpdates() from task-sync-adapter.ts, which
208
+ * uses the provider's TaskSyncFieldMapConfig for correct status, priority,
209
+ * taskType, and tag mapping. The provider is looked up from item.provider.
210
+ *
211
+ * @param item - The external task to convert
212
+ * @param existingTask - The existing local task (for diff mode), or undefined
213
+ * @returns Partial<Task> with the mapped fields
214
+ */
215
+ private externalItemToUpdates;
216
+ /**
217
+ * Create a new Stoneforge task from an unlinked external item.
218
+ */
219
+ private createTaskFromExternal;
220
+ /**
221
+ * Sync the description (body) from an external item to the local task's
222
+ * description document.
223
+ *
224
+ * - If the task already has a descriptionRef, compare the body against the
225
+ * existing document content and update only if changed.
226
+ * - If the task has no descriptionRef and the body is non-empty, create a
227
+ * new document and return the descriptionRef to link.
228
+ * - If the body is empty/undefined, skip (don't delete existing descriptions).
229
+ *
230
+ * @returns Partial update with descriptionRef if a new document was created,
231
+ * or empty object if no descriptionRef change is needed.
232
+ */
233
+ private syncDescriptionFromExternal;
234
+ /**
235
+ * Create a new description document for a task.
236
+ *
237
+ * Uses the same pattern as the server-side task creation:
238
+ * - contentType: 'markdown'
239
+ * - category: 'task-description' tag
240
+ * - createdBy: 'system'
241
+ *
242
+ * @param body - The description content
243
+ * @param taskTitle - The task title (used in the document title)
244
+ * @returns The DocumentId of the created document
245
+ */
246
+ private createDescriptionDocument;
247
+ /**
248
+ * Get the sync cursor for a provider+project+adapterType.
249
+ * Returns a timestamp indicating the last time we polled this combination.
250
+ */
251
+ private getSyncCursor;
252
+ /**
253
+ * Update the sync cursor for a provider+project+adapterType.
254
+ */
255
+ private setSyncCursor;
256
+ /**
257
+ * Get a TaskSyncAdapter for a given provider name.
258
+ */
259
+ private getTaskAdapter;
260
+ /**
261
+ * Get the ProviderConfig for a given provider name.
262
+ */
263
+ private getProviderConfig;
264
+ /**
265
+ * Get the primary provider name (for result reporting).
266
+ */
267
+ private getPrimaryProvider;
268
+ /**
269
+ * Get the primary project (for result reporting).
270
+ */
271
+ private getPrimaryProject;
272
+ }
273
+ /**
274
+ * Create a new SyncEngine instance.
275
+ *
276
+ * @param config - Sync engine configuration
277
+ * @returns A new SyncEngine instance
278
+ *
279
+ * @example
280
+ * ```typescript
281
+ * const engine = createSyncEngine({
282
+ * api: quarryApi,
283
+ * registry: providerRegistry,
284
+ * settings: settingsService,
285
+ * });
286
+ *
287
+ * // Push locally-changed tasks
288
+ * const pushResult = await engine.push({ all: true });
289
+ *
290
+ * // Pull externally-changed items
291
+ * const pullResult = await engine.pull();
292
+ *
293
+ * // Bidirectional sync
294
+ * const syncResult = await engine.sync({ dryRun: true });
295
+ * ```
296
+ */
297
+ export declare function createSyncEngine(config: SyncEngineConfig): SyncEngine;
298
+ //# sourceMappingURL=sync-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-engine.d.ts","sourceRoot":"","sources":["../../src/external-sync/sync-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAIlB,YAAY,EAEZ,gBAAgB,EAGhB,cAAc,EAGf,MAAM,kBAAkB,CAAC;AAK1B,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,SAAS,EAGT,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAO/D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,sDAAsD;IACtD,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,4BAA4B;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IACvB,mFAAmF;IACnF,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC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