@claudian-collab/protocol 1.0.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 (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -0
  3. package/dist/CollabCloudBinding.d.ts +106 -0
  4. package/dist/CollabCloudBinding.js +431 -0
  5. package/dist/CollabCloudProjectEvent.d.ts +41 -0
  6. package/dist/CollabCloudProjectEvent.js +133 -0
  7. package/dist/CollabCloudProjectSnapshot.d.ts +42 -0
  8. package/dist/CollabCloudProjectSnapshot.js +281 -0
  9. package/dist/CollabConstants.d.ts +32 -0
  10. package/dist/CollabConstants.js +34 -0
  11. package/dist/CollabControlOperationCodecs.d.ts +28 -0
  12. package/dist/CollabControlOperationCodecs.js +63 -0
  13. package/dist/CollabError.d.ts +27 -0
  14. package/dist/CollabError.js +165 -0
  15. package/dist/CollabMarkdownProse.d.ts +1 -0
  16. package/dist/CollabMarkdownProse.js +57 -0
  17. package/dist/CollabMemberMentionParser.d.ts +6 -0
  18. package/dist/CollabMemberMentionParser.js +51 -0
  19. package/dist/CollabProtocol.d.ts +144 -0
  20. package/dist/CollabProtocol.js +67 -0
  21. package/dist/CollabRequestTicketRequestCodecs.d.ts +5 -0
  22. package/dist/CollabRequestTicketRequestCodecs.js +266 -0
  23. package/dist/CollabRequestTicketResponseCodecs.d.ts +15 -0
  24. package/dist/CollabRequestTicketResponseCodecs.js +368 -0
  25. package/dist/CollabTicketReferenceParser.d.ts +24 -0
  26. package/dist/CollabTicketReferenceParser.js +56 -0
  27. package/dist/CollabValidation.d.ts +5 -0
  28. package/dist/CollabValidation.js +26 -0
  29. package/dist/DevelopmentBootstrap.d.ts +199 -0
  30. package/dist/DevelopmentBootstrap.js +544 -0
  31. package/dist/index.d.ts +24 -0
  32. package/dist/index.js +67 -0
  33. package/dist/types.d.ts +138 -0
  34. package/dist/types.js +11 -0
  35. package/package.json +66 -0
@@ -0,0 +1,544 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEVELOPMENT_BOOTSTRAP_OPERATION_CODECS = exports.DEVELOPMENT_BOOTSTRAP_OPERATIONS = exports.DEVELOPMENT_BOOTSTRAP_CANCELLATION_PHASES = exports.DEVELOPMENT_BOOTSTRAP_ACTIVATION_PHASES = exports.DEVELOPMENT_BOOTSTRAP_ATTEMPT_STATES = exports.DEVELOPMENT_BOOTSTRAP_MANIFEST_SCHEMA_VERSION = void 0;
4
+ exports.decodeDevelopmentBootstrapManifest = decodeDevelopmentBootstrapManifest;
5
+ exports.encodeDevelopmentBootstrapManifestCanonicalJson = encodeDevelopmentBootstrapManifestCanonicalJson;
6
+ exports.decodeDevelopmentBootstrapReport = decodeDevelopmentBootstrapReport;
7
+ exports.developmentBootstrapOperationCodec = developmentBootstrapOperationCodec;
8
+ const CollabConstants_1 = require("./CollabConstants");
9
+ const CollabCloudBinding_1 = require("./CollabCloudBinding");
10
+ const CollabError_1 = require("./CollabError");
11
+ const types_1 = require("./types");
12
+ const CollabValidation_1 = require("./CollabValidation");
13
+ exports.DEVELOPMENT_BOOTSTRAP_MANIFEST_SCHEMA_VERSION = 1;
14
+ exports.DEVELOPMENT_BOOTSTRAP_ATTEMPT_STATES = Object.freeze([
15
+ 'collecting',
16
+ 'validating',
17
+ 'ready',
18
+ 'activating',
19
+ 'rejected',
20
+ 'cancelled',
21
+ 'recovery-required',
22
+ 'activated',
23
+ ]);
24
+ exports.DEVELOPMENT_BOOTSTRAP_ACTIVATION_PHASES = Object.freeze([
25
+ 'publish-intent',
26
+ 'repository-published',
27
+ 'activated',
28
+ 'completed',
29
+ ]);
30
+ exports.DEVELOPMENT_BOOTSTRAP_CANCELLATION_PHASES = Object.freeze([
31
+ 'cancel-intent',
32
+ 'cancelled',
33
+ 'recovery-required',
34
+ ]);
35
+ exports.DEVELOPMENT_BOOTSTRAP_OPERATIONS = Object.freeze([
36
+ 'beginDevelopmentBootstrap',
37
+ 'submitDevelopmentBootstrapReport',
38
+ 'getDevelopmentBootstrap',
39
+ 'activateDevelopmentBootstrap',
40
+ 'cancelDevelopmentBootstrap',
41
+ 'putDevelopmentBootstrapGitBundle',
42
+ ]);
43
+ const ATTEMPT_STATE_SET = new Set(exports.DEVELOPMENT_BOOTSTRAP_ATTEMPT_STATES);
44
+ const ACTIVATION_PHASE_SET = new Set(exports.DEVELOPMENT_BOOTSTRAP_ACTIVATION_PHASES);
45
+ const CANCELLATION_PHASE_SET = new Set(exports.DEVELOPMENT_BOOTSTRAP_CANCELLATION_PHASES);
46
+ const SHA256_PATTERN = /^[0-9a-f]{64}$/u;
47
+ function invalidPayload(field) {
48
+ return new CollabError_1.CollabError({
49
+ code: 'protocol-payload-invalid',
50
+ safeContext: { field },
51
+ });
52
+ }
53
+ function record(value, field) {
54
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
55
+ throw invalidPayload(field);
56
+ }
57
+ return value;
58
+ }
59
+ function exactRecord(value, field, keys) {
60
+ const source = record(value, field);
61
+ const expected = new Set(keys);
62
+ if (!keys.every(key => Object.hasOwn(source, key))
63
+ || Object.keys(source).some(key => !expected.has(key)))
64
+ throw invalidPayload(field);
65
+ return source;
66
+ }
67
+ function exactRecordWithOptional(value, field, required, optional) {
68
+ const source = record(value, field);
69
+ const allowed = new Set([...required, ...optional]);
70
+ if (!required.every(key => Object.hasOwn(source, key))
71
+ || Object.keys(source).some(key => !allowed.has(key)))
72
+ throw invalidPayload(field);
73
+ return source;
74
+ }
75
+ function stringField(source, field, maximum, validate) {
76
+ const value = source[field];
77
+ if (typeof value !== 'string'
78
+ || value.length === 0
79
+ || value.length > maximum
80
+ || (validate && !validate(value)))
81
+ throw invalidPayload(field);
82
+ return value;
83
+ }
84
+ function timestamp(source, field) {
85
+ const value = stringField(source, field, 64);
86
+ if (Number.isNaN(Date.parse(value)) || new Date(value).toISOString() !== value) {
87
+ throw invalidPayload(field);
88
+ }
89
+ return value;
90
+ }
91
+ function nonNegativeInteger(source, field) {
92
+ const value = source[field];
93
+ if (typeof value !== 'number' || !Number.isSafeInteger(value) || value < 0) {
94
+ throw invalidPayload(field);
95
+ }
96
+ return value;
97
+ }
98
+ function positiveInteger(source, field, maximum) {
99
+ const value = nonNegativeInteger(source, field);
100
+ if (value < 1 || (maximum !== undefined && value > maximum)) {
101
+ throw invalidPayload(field);
102
+ }
103
+ return value;
104
+ }
105
+ function exactTrue(source, field) {
106
+ if (source[field] !== true)
107
+ throw invalidPayload(field);
108
+ return true;
109
+ }
110
+ function sha256(source, field) {
111
+ return stringField(source, field, 64, value => SHA256_PATTERN.test(value));
112
+ }
113
+ function assertSerializedLimit(value, maximum, field) {
114
+ let serialized;
115
+ try {
116
+ serialized = JSON.stringify(value);
117
+ }
118
+ catch {
119
+ throw invalidPayload(field);
120
+ }
121
+ if (!(0, CollabValidation_1.hasUtf8ByteLengthAtMost)(serialized, maximum))
122
+ throw invalidPayload(field);
123
+ }
124
+ function decodeComparisonMember(value) {
125
+ const source = exactRecord(value, 'comparison.members', [
126
+ 'activatedAt',
127
+ 'createdAt',
128
+ 'displayName',
129
+ 'memberId',
130
+ 'personalRef',
131
+ 'role',
132
+ 'status',
133
+ ]);
134
+ const memberId = stringField(source, 'memberId', 64, CollabValidation_1.isCollabMemberId);
135
+ const role = source.role;
136
+ if (role !== 'manager' && role !== 'member')
137
+ throw invalidPayload('role');
138
+ if (source.status !== 'active')
139
+ throw invalidPayload('status');
140
+ const personalRef = stringField(source, 'personalRef', CollabConstants_1.COLLAB_LIMITS.maxRepositoryPathUtf16);
141
+ if (personalRef !== (0, types_1.collabMemberRef)(memberId))
142
+ throw invalidPayload('personalRef');
143
+ return {
144
+ activatedAt: timestamp(source, 'activatedAt'),
145
+ createdAt: timestamp(source, 'createdAt'),
146
+ displayName: stringField(source, 'displayName', CollabConstants_1.COLLAB_LIMITS.maxMemberDisplayNameUtf16),
147
+ memberId,
148
+ personalRef,
149
+ role,
150
+ status: 'active',
151
+ };
152
+ }
153
+ function decodeComparison(value) {
154
+ const source = exactRecord(value, 'comparison', [
155
+ 'mainOid',
156
+ 'mainRef',
157
+ 'managerSetGeneration',
158
+ 'members',
159
+ 'projectCreatedAt',
160
+ 'projectId',
161
+ 'projectName',
162
+ 'sourceCaFingerprint',
163
+ 'sourceEventSequence',
164
+ 'sourceHostMemberId',
165
+ ]);
166
+ if (!Array.isArray(source.members) || source.members.length !== 2) {
167
+ throw invalidPayload('members');
168
+ }
169
+ const members = source.members.map(decodeComparisonMember);
170
+ if (members[0].memberId.localeCompare(members[1].memberId, 'en-US') >= 0
171
+ || !members.some(member => member.role === 'manager'))
172
+ throw invalidPayload('members');
173
+ const sourceHostMemberId = stringField(source, 'sourceHostMemberId', 64, CollabValidation_1.isCollabMemberId);
174
+ if (!members.some(member => member.memberId === sourceHostMemberId)) {
175
+ throw invalidPayload('sourceHostMemberId');
176
+ }
177
+ if (source.mainRef !== CollabConstants_1.COLLAB_MAIN_REF)
178
+ throw invalidPayload('mainRef');
179
+ return {
180
+ mainOid: stringField(source, 'mainOid', 64, CollabValidation_1.isCollabGitOid),
181
+ mainRef: CollabConstants_1.COLLAB_MAIN_REF,
182
+ managerSetGeneration: nonNegativeInteger(source, 'managerSetGeneration'),
183
+ members,
184
+ projectCreatedAt: timestamp(source, 'projectCreatedAt'),
185
+ projectId: stringField(source, 'projectId', 64, CollabValidation_1.isCollabProjectId),
186
+ projectName: stringField(source, 'projectName', CollabConstants_1.COLLAB_LIMITS.maxProjectNameUtf16),
187
+ sourceCaFingerprint: stringField(source, 'sourceCaFingerprint', 64, candidate => SHA256_PATTERN.test(candidate)),
188
+ sourceEventSequence: nonNegativeInteger(source, 'sourceEventSequence'),
189
+ sourceHostMemberId,
190
+ };
191
+ }
192
+ function decodeSourceEligibility(value) {
193
+ const keys = [
194
+ 'liveInvitations',
195
+ 'nonActiveMemberships',
196
+ 'nonterminalAcceptOperations',
197
+ 'nonterminalHostTransfers',
198
+ 'nonterminalManagerOffers',
199
+ 'requestComments',
200
+ 'requests',
201
+ 'terminalProjectTransitions',
202
+ 'ticketComments',
203
+ 'ticketMentions',
204
+ 'ticketRelations',
205
+ 'tickets',
206
+ ];
207
+ const source = exactRecord(value, 'sourceEligibility', keys);
208
+ if (keys.some(key => source[key] !== 0))
209
+ throw invalidPayload('sourceEligibility');
210
+ return {
211
+ liveInvitations: 0,
212
+ nonActiveMemberships: 0,
213
+ nonterminalAcceptOperations: 0,
214
+ nonterminalHostTransfers: 0,
215
+ nonterminalManagerOffers: 0,
216
+ requestComments: 0,
217
+ requests: 0,
218
+ terminalProjectTransitions: 0,
219
+ ticketComments: 0,
220
+ ticketMentions: 0,
221
+ ticketRelations: 0,
222
+ tickets: 0,
223
+ };
224
+ }
225
+ function decodeGit(value, comparison) {
226
+ const source = exactRecord(value, 'git', ['bundle', 'objectFormat', 'refs']);
227
+ if (source.objectFormat !== 'sha1' && source.objectFormat !== 'sha256') {
228
+ throw invalidPayload('objectFormat');
229
+ }
230
+ const objectFormat = source.objectFormat;
231
+ const bundleSource = exactRecord(source.bundle, 'bundle', ['byteCount', 'sha256']);
232
+ if (!Array.isArray(source.refs) || source.refs.length !== 3)
233
+ throw invalidPayload('refs');
234
+ const refs = source.refs.map((item) => {
235
+ const ref = exactRecord(item, 'refs', ['name', 'oid']);
236
+ const oid = stringField(ref, 'oid', 64, CollabValidation_1.isCollabGitOid);
237
+ if (oid.length !== (objectFormat === 'sha1' ? 40 : 64))
238
+ throw invalidPayload('oid');
239
+ return {
240
+ name: stringField(ref, 'name', CollabConstants_1.COLLAB_LIMITS.maxRepositoryPathUtf16),
241
+ oid,
242
+ };
243
+ });
244
+ if (refs.some((item, index) => (index > 0 && refs[index - 1].name.localeCompare(item.name, 'en-US') >= 0)))
245
+ throw invalidPayload('refs');
246
+ const expectedNames = [
247
+ CollabConstants_1.COLLAB_MAIN_REF,
248
+ ...comparison.members.map(member => member.personalRef),
249
+ ].sort((left, right) => left.localeCompare(right, 'en-US'));
250
+ if (refs.some((item, index) => item.name !== expectedNames[index])
251
+ || refs.find(item => item.name === CollabConstants_1.COLLAB_MAIN_REF)?.oid !== comparison.mainOid)
252
+ throw invalidPayload('refs');
253
+ return {
254
+ bundle: {
255
+ byteCount: positiveInteger(bundleSource, 'byteCount', CollabCloudBinding_1.COLLAB_CLOUD_BINDING_LIMITS.maxDevelopmentBootstrapGitBundleBytes),
256
+ sha256: sha256(bundleSource, 'sha256'),
257
+ },
258
+ objectFormat,
259
+ refs,
260
+ };
261
+ }
262
+ function decodeDevelopmentBootstrapManifest(value) {
263
+ assertSerializedLimit(value, CollabCloudBinding_1.COLLAB_CLOUD_BINDING_LIMITS.maxDevelopmentBootstrapManifestUtf8Bytes, 'manifest');
264
+ const source = exactRecord(value, 'manifest', [
265
+ 'attemptId',
266
+ 'comparison',
267
+ 'createdAt',
268
+ 'git',
269
+ 'manifestSchemaVersion',
270
+ 'protocolVersion',
271
+ 'sourceEligibility',
272
+ ]);
273
+ if (source.manifestSchemaVersion !== exports.DEVELOPMENT_BOOTSTRAP_MANIFEST_SCHEMA_VERSION
274
+ || source.protocolVersion !== CollabConstants_1.COLLAB_PROTOCOL_VERSION)
275
+ throw invalidPayload('manifestVersion');
276
+ const comparison = decodeComparison(source.comparison);
277
+ return {
278
+ attemptId: stringField(source, 'attemptId', 128, CollabValidation_1.isCollabOpaqueId),
279
+ comparison,
280
+ createdAt: timestamp(source, 'createdAt'),
281
+ git: decodeGit(source.git, comparison),
282
+ manifestSchemaVersion: exports.DEVELOPMENT_BOOTSTRAP_MANIFEST_SCHEMA_VERSION,
283
+ protocolVersion: CollabConstants_1.COLLAB_PROTOCOL_VERSION,
284
+ sourceEligibility: decodeSourceEligibility(source.sourceEligibility),
285
+ };
286
+ }
287
+ function encodeDevelopmentBootstrapManifestCanonicalJson(value) {
288
+ return JSON.stringify(decodeDevelopmentBootstrapManifest(value));
289
+ }
290
+ function decodeClientReadiness(value) {
291
+ const keys = [
292
+ 'cleanupSettled',
293
+ 'collabGitChildrenDrained',
294
+ 'conflictRecoverySettled',
295
+ 'hostTransferSettled',
296
+ 'joinSettled',
297
+ 'leaveSettled',
298
+ 'managerResponsibilitySettled',
299
+ 'projectOperationQueueDrained',
300
+ 'projectSetupSettled',
301
+ 'projectWorkSessionClosed',
302
+ 'publishSettled',
303
+ 'reconciliationSettled',
304
+ 'reconnectSettled',
305
+ 'repositoryIdentityExact',
306
+ 'retirementSettled',
307
+ ];
308
+ const source = exactRecord(value, 'clientReadiness', keys);
309
+ const result = Object.fromEntries(keys.map(key => [key, exactTrue(source, key)]));
310
+ return result;
311
+ }
312
+ function decodeHostStopAttestation(value, attemptId, projectId) {
313
+ const source = exactRecord(value, 'hostStopAttestation', [
314
+ 'attemptId',
315
+ 'autoStartDisabled',
316
+ 'fenceDurable',
317
+ 'fenceId',
318
+ 'hostStopped',
319
+ 'manifestSha256',
320
+ 'projectId',
321
+ 'resourcesDrained',
322
+ 'routeUnregistered',
323
+ 'stoppedAt',
324
+ ]);
325
+ const decodedAttemptId = stringField(source, 'attemptId', 128, CollabValidation_1.isCollabOpaqueId);
326
+ const decodedProjectId = stringField(source, 'projectId', 64, CollabValidation_1.isCollabProjectId);
327
+ if (decodedAttemptId !== attemptId || decodedProjectId !== projectId) {
328
+ throw invalidPayload('hostStopAttestation');
329
+ }
330
+ return {
331
+ attemptId: decodedAttemptId,
332
+ autoStartDisabled: exactTrue(source, 'autoStartDisabled'),
333
+ fenceDurable: exactTrue(source, 'fenceDurable'),
334
+ fenceId: stringField(source, 'fenceId', 128, CollabValidation_1.isCollabOpaqueId),
335
+ hostStopped: exactTrue(source, 'hostStopped'),
336
+ manifestSha256: sha256(source, 'manifestSha256'),
337
+ projectId: decodedProjectId,
338
+ resourcesDrained: exactTrue(source, 'resourcesDrained'),
339
+ routeUnregistered: exactTrue(source, 'routeUnregistered'),
340
+ stoppedAt: timestamp(source, 'stoppedAt'),
341
+ };
342
+ }
343
+ function decodeDevelopmentBootstrapReport(value) {
344
+ assertSerializedLimit(value, CollabCloudBinding_1.COLLAB_CLOUD_BINDING_LIMITS.maxDevelopmentBootstrapReportUtf8Bytes, 'report');
345
+ const source = exactRecordWithOptional(value, 'report', [
346
+ 'attemptId',
347
+ 'capturedAt',
348
+ 'clientReadiness',
349
+ 'comparison',
350
+ 'observedPersonalRefOid',
351
+ 'reporterMemberId',
352
+ ], ['hostStopAttestation']);
353
+ const attemptId = stringField(source, 'attemptId', 128, CollabValidation_1.isCollabOpaqueId);
354
+ const comparison = decodeComparison(source.comparison);
355
+ const reporterMemberId = stringField(source, 'reporterMemberId', 64, CollabValidation_1.isCollabMemberId);
356
+ if (!comparison.members.some(member => member.memberId === reporterMemberId)) {
357
+ throw invalidPayload('reporterMemberId');
358
+ }
359
+ const isHost = reporterMemberId === comparison.sourceHostMemberId;
360
+ if (isHost !== Object.hasOwn(source, 'hostStopAttestation')) {
361
+ throw invalidPayload('hostStopAttestation');
362
+ }
363
+ const hostStopAttestation = isHost
364
+ ? decodeHostStopAttestation(source.hostStopAttestation, attemptId, comparison.projectId)
365
+ : undefined;
366
+ return {
367
+ attemptId,
368
+ capturedAt: timestamp(source, 'capturedAt'),
369
+ clientReadiness: decodeClientReadiness(source.clientReadiness),
370
+ comparison,
371
+ ...(hostStopAttestation ? { hostStopAttestation } : {}),
372
+ observedPersonalRefOid: stringField(source, 'observedPersonalRefOid', 64, CollabValidation_1.isCollabGitOid),
373
+ reporterMemberId,
374
+ };
375
+ }
376
+ function decodeActivationResult(value) {
377
+ const source = exactRecord(value, 'activationResult', [
378
+ 'activatedAt',
379
+ 'activationOperationId',
380
+ 'placementGeneration',
381
+ 'projectId',
382
+ ]);
383
+ return {
384
+ activatedAt: timestamp(source, 'activatedAt'),
385
+ activationOperationId: stringField(source, 'activationOperationId', 128, CollabValidation_1.isCollabOpaqueId),
386
+ placementGeneration: positiveInteger(source, 'placementGeneration'),
387
+ projectId: stringField(source, 'projectId', 64, CollabValidation_1.isCollabProjectId),
388
+ };
389
+ }
390
+ function decodeAttemptStatus(value) {
391
+ const source = exactRecordWithOptional(value, 'attempt', [
392
+ 'attemptId',
393
+ 'bundleState',
394
+ 'createdAt',
395
+ 'expiresAt',
396
+ 'manifestSha256',
397
+ 'projectId',
398
+ 'reporterMemberIds',
399
+ 'state',
400
+ ], ['activationPhase', 'activationResult', 'cancellationPhase']);
401
+ if (typeof source.state !== 'string' || !ATTEMPT_STATE_SET.has(source.state)) {
402
+ throw invalidPayload('state');
403
+ }
404
+ if (source.bundleState !== 'missing'
405
+ && source.bundleState !== 'uploaded'
406
+ && source.bundleState !== 'validated')
407
+ throw invalidPayload('bundleState');
408
+ if (!Array.isArray(source.reporterMemberIds) || source.reporterMemberIds.length > 2) {
409
+ throw invalidPayload('reporterMemberIds');
410
+ }
411
+ const reporterMemberIds = source.reporterMemberIds.map((item) => {
412
+ if (!(0, CollabValidation_1.isCollabMemberId)(item))
413
+ throw invalidPayload('reporterMemberIds');
414
+ return item;
415
+ });
416
+ if (reporterMemberIds.some((item, index) => (index > 0 && reporterMemberIds[index - 1].localeCompare(item, 'en-US') >= 0)))
417
+ throw invalidPayload('reporterMemberIds');
418
+ const activationPhase = source.activationPhase;
419
+ const cancellationPhase = source.cancellationPhase;
420
+ if (activationPhase !== undefined
421
+ && (typeof activationPhase !== 'string' || !ACTIVATION_PHASE_SET.has(activationPhase)))
422
+ throw invalidPayload('activationPhase');
423
+ if (cancellationPhase !== undefined
424
+ && (typeof cancellationPhase !== 'string' || !CANCELLATION_PHASE_SET.has(cancellationPhase)))
425
+ throw invalidPayload('cancellationPhase');
426
+ const activationResult = source.activationResult === undefined
427
+ ? undefined
428
+ : decodeActivationResult(source.activationResult);
429
+ const projectId = stringField(source, 'projectId', 64, CollabValidation_1.isCollabProjectId);
430
+ if (source.state === 'activated'
431
+ && ((activationPhase !== 'activated' && activationPhase !== 'completed')
432
+ || activationResult === undefined))
433
+ throw invalidPayload('activationResult');
434
+ if (source.state !== 'activated'
435
+ && activationResult !== undefined)
436
+ throw invalidPayload('activationResult');
437
+ if (activationPhase !== undefined && cancellationPhase !== undefined) {
438
+ throw invalidPayload('attemptPhase');
439
+ }
440
+ if (activationResult !== undefined && activationResult.projectId !== projectId) {
441
+ throw invalidPayload('activationResult');
442
+ }
443
+ return {
444
+ ...(activationPhase
445
+ ? { activationPhase: activationPhase }
446
+ : {}),
447
+ ...(activationResult ? { activationResult } : {}),
448
+ attemptId: stringField(source, 'attemptId', 128, CollabValidation_1.isCollabOpaqueId),
449
+ bundleState: source.bundleState,
450
+ ...(cancellationPhase
451
+ ? { cancellationPhase: cancellationPhase }
452
+ : {}),
453
+ createdAt: timestamp(source, 'createdAt'),
454
+ expiresAt: timestamp(source, 'expiresAt'),
455
+ manifestSha256: sha256(source, 'manifestSha256'),
456
+ projectId,
457
+ reporterMemberIds,
458
+ state: source.state,
459
+ };
460
+ }
461
+ function decodeAttemptOnlyRequest(value) {
462
+ const source = exactRecord(value, 'request', ['attemptId']);
463
+ return { attemptId: stringField(source, 'attemptId', 128, CollabValidation_1.isCollabOpaqueId) };
464
+ }
465
+ function decodeOperationRequest(operation, value) {
466
+ switch (operation) {
467
+ case 'beginDevelopmentBootstrap': {
468
+ const source = exactRecord(value, 'request', ['manifest']);
469
+ return { manifest: decodeDevelopmentBootstrapManifest(source.manifest) };
470
+ }
471
+ case 'submitDevelopmentBootstrapReport': {
472
+ const source = exactRecord(value, 'request', ['attemptId', 'report']);
473
+ const attemptId = stringField(source, 'attemptId', 128, CollabValidation_1.isCollabOpaqueId);
474
+ const report = decodeDevelopmentBootstrapReport(source.report);
475
+ if (report.attemptId !== attemptId)
476
+ throw invalidPayload('attemptId');
477
+ return { attemptId, report };
478
+ }
479
+ case 'getDevelopmentBootstrap':
480
+ case 'cancelDevelopmentBootstrap':
481
+ return decodeAttemptOnlyRequest(value);
482
+ case 'activateDevelopmentBootstrap': {
483
+ const source = exactRecord(value, 'request', ['attemptId', 'manifestSha256']);
484
+ return {
485
+ attemptId: stringField(source, 'attemptId', 128, CollabValidation_1.isCollabOpaqueId),
486
+ manifestSha256: sha256(source, 'manifestSha256'),
487
+ };
488
+ }
489
+ case 'putDevelopmentBootstrapGitBundle': {
490
+ const source = exactRecord(value, 'request', [
491
+ 'attemptId',
492
+ 'byteCount',
493
+ 'contentEncoding',
494
+ 'contentType',
495
+ 'sha256',
496
+ ]);
497
+ if (source.contentEncoding !== 'identity'
498
+ || source.contentType !== 'application/x-git-bundle')
499
+ throw invalidPayload('contentType');
500
+ return {
501
+ attemptId: stringField(source, 'attemptId', 128, CollabValidation_1.isCollabOpaqueId),
502
+ byteCount: positiveInteger(source, 'byteCount', CollabCloudBinding_1.COLLAB_CLOUD_BINDING_LIMITS.maxDevelopmentBootstrapGitBundleBytes),
503
+ contentEncoding: 'identity',
504
+ contentType: 'application/x-git-bundle',
505
+ sha256: sha256(source, 'sha256'),
506
+ };
507
+ }
508
+ }
509
+ }
510
+ function decodeRequestResult(operation, value) {
511
+ try {
512
+ return { status: 'ok', value: decodeOperationRequest(operation, value) };
513
+ }
514
+ catch (error) {
515
+ return {
516
+ status: 'invalid',
517
+ error: error instanceof CollabError_1.CollabError ? error : invalidPayload('request'),
518
+ };
519
+ }
520
+ }
521
+ function codec(operation) {
522
+ return Object.freeze({
523
+ decodeRequest: (value) => decodeRequestResult(operation, value),
524
+ decodeResponse: decodeAttemptStatus,
525
+ });
526
+ }
527
+ exports.DEVELOPMENT_BOOTSTRAP_OPERATION_CODECS = Object.freeze({
528
+ beginDevelopmentBootstrap: codec('beginDevelopmentBootstrap'),
529
+ submitDevelopmentBootstrapReport: codec('submitDevelopmentBootstrapReport'),
530
+ getDevelopmentBootstrap: codec('getDevelopmentBootstrap'),
531
+ activateDevelopmentBootstrap: codec('activateDevelopmentBootstrap'),
532
+ cancelDevelopmentBootstrap: codec('cancelDevelopmentBootstrap'),
533
+ putDevelopmentBootstrapGitBundle: codec('putDevelopmentBootstrapGitBundle'),
534
+ });
535
+ function developmentBootstrapOperationCodec(operation) {
536
+ const selected = exports.DEVELOPMENT_BOOTSTRAP_OPERATION_CODECS[operation];
537
+ if (!selected) {
538
+ throw new CollabError_1.CollabError({
539
+ code: 'operation-failed',
540
+ safeContext: { reason: 'bootstrap-operation-codec-missing' },
541
+ });
542
+ }
543
+ return selected;
544
+ }
@@ -0,0 +1,24 @@
1
+ export { COLLAB_LIMITS, COLLAB_MAIN_REF, COLLAB_MEMBER_REF_PREFIX, COLLAB_PROTOCOL_VERSION, } from './CollabConstants';
2
+ export type { CollabProtocolVersion } from './CollabConstants';
3
+ export { COLLAB_CLOUD_BINDING_LIMITS, COLLAB_CLOUD_BINDING_VERSION, COLLAB_CLOUD_CAPABILITIES, COLLAB_CLOUD_CAPABILITY_DOCUMENT_SCHEMA_VERSION, COLLAB_CLOUD_JSON_OPERATIONS, collabCloudCapabilityDocument, collabCloudCapabilitySupported, collabCloudCapabilitiesRoute, collabCloudErrorEnvelope, collabCloudGitRoute, collabCloudProjectEventsRoute, collabCloudProjectOperationRoute, collabCloudSuccessEnvelope, collabDevelopmentBootstrapRoute, decodeCollabCloudCapabilityDocument, decodeCollabCloudErrorEnvelope, decodeCollabCloudSuccessEnvelope, matchCollabCloudRoute, } from './CollabCloudBinding';
4
+ export type { CollabCloudCapability, CollabCloudCapabilityDocument, CollabCloudCapabilityLimits, CollabCloudErrorEnvelope, CollabCloudGitService, CollabCloudJsonOperation, CollabCloudRoute, CollabCloudRouteMatch, CollabCloudSuccessEnvelope, CollabCloudWireError, DevelopmentBootstrapOperation, } from './CollabCloudBinding';
5
+ export { DEVELOPMENT_BOOTSTRAP_ACTIVATION_PHASES, DEVELOPMENT_BOOTSTRAP_ATTEMPT_STATES, DEVELOPMENT_BOOTSTRAP_CANCELLATION_PHASES, DEVELOPMENT_BOOTSTRAP_MANIFEST_SCHEMA_VERSION, DEVELOPMENT_BOOTSTRAP_OPERATIONS, DEVELOPMENT_BOOTSTRAP_OPERATION_CODECS, decodeDevelopmentBootstrapManifest, decodeDevelopmentBootstrapReport, developmentBootstrapOperationCodec, encodeDevelopmentBootstrapManifestCanonicalJson, } from './DevelopmentBootstrap';
6
+ export type { ActivateDevelopmentBootstrapRequest, BeginDevelopmentBootstrapRequest, CancelDevelopmentBootstrapRequest, DevelopmentBootstrapActivationPhase, DevelopmentBootstrapActivationResult, DevelopmentBootstrapAttemptState, DevelopmentBootstrapAttemptStatus, DevelopmentBootstrapBundleState, DevelopmentBootstrapCancellationPhase, DevelopmentBootstrapClientReadiness, DevelopmentBootstrapComparison, DevelopmentBootstrapComparisonMember, DevelopmentBootstrapGitRef, DevelopmentBootstrapManifest, DevelopmentBootstrapObjectFormat, DevelopmentBootstrapOperationCodec, DevelopmentBootstrapOperationMap, DevelopmentBootstrapReport, DevelopmentBootstrapSourceEligibility, DevelopmentHostStopAttestation, GetDevelopmentBootstrapRequest, PutDevelopmentBootstrapGitBundleRequest, SubmitDevelopmentBootstrapReportRequest, } from './DevelopmentBootstrap';
7
+ export { COLLAB_CLOUD_PROJECT_SNAPSHOT_CODEC, decodeCollabCloudProjectSnapshot, } from './CollabCloudProjectSnapshot';
8
+ export type { CollabCloudProjectMember, CollabCloudProjectSnapshot, CollabCloudProjectSnapshotCodec, CollabCloudProjectSummary, GetCollabCloudProjectSnapshotRequest, } from './CollabCloudProjectSnapshot';
9
+ export { COLLAB_CLOUD_EVENT_KINDS, decodeCollabCloudProjectEventMessage, } from './CollabCloudProjectEvent';
10
+ export type { CollabCloudEventKind, CollabCloudEventPayloadMap, CollabCloudProjectEvent, CollabCloudProjectEventMessage, CollabCloudSnapshotRequired, } from './CollabCloudProjectEvent';
11
+ export { COLLAB_CONTROL_OPERATION_CODECS, collabControlOperationCodec, } from './CollabControlOperationCodecs';
12
+ export type { CollabControlOperation, CollabControlOperationCodec, } from './CollabControlOperationCodecs';
13
+ export { COLLAB_ERROR_CODES, CollabError, collabErrorGroup, sanitizeCollabDiagnosticContext, } from './CollabError';
14
+ export type { CollabDiagnosticContext, CollabDiagnosticValue, CollabErrorCode, CollabErrorGroup, CollabErrorOptions, CollabRecoveryAction, } from './CollabError';
15
+ export { parseCollabMemberMentions } from './CollabMemberMentionParser';
16
+ export type { CollabMemberMentionTarget } from './CollabMemberMentionParser';
17
+ export { decodeCollabProtocolEnvelope } from './CollabProtocol';
18
+ export type { AcceptRequest, AcceptResponse, ChangeTicketStatusRequest, CollabControlOperationDefinition, CollabControlOperationMap, CollabDecodeFailure, CollabDecodeResult, CollabMutationContext, CollabProtocolEnvelope, CreateCommentRequest, CreateCommentResponse, CreateTicketCommentRequest, CreateTicketCommentResponse, CreateTicketRequest, CreateTicketResponse, EnsureMyRequestRequest, EnsureMyRequestResponse, GetRequestRequest, GetTicketRequest, ListRequestCommentsRequest, ListTicketAcceptedRelationsRequest, ListTicketCommentsRequest, ListTicketsRequest, TicketMutationResponse, UpdateMyRequestMetadataRequest, UpdateMyRequestMetadataResponse, UpdateTicketContentRequest, } from './CollabProtocol';
19
+ export { parseCollabTicketReferences, scanCollabTicketReferences, } from './CollabTicketReferenceParser';
20
+ export type { CollabTicketReferenceParseFailureReason, CollabTicketReferenceParseResult, CollabTicketReferenceScanResult, CollabTicketReferenceToken, } from './CollabTicketReferenceParser';
21
+ export type { CollabRequestTicketOperation } from './CollabRequestTicketRequestCodecs';
22
+ export { isCollabGitOid, isCollabMemberId, isCollabOpaqueId, isCollabProjectId, } from './CollabValidation';
23
+ export { collabMemberRef } from './types';
24
+ export type { CollabChangedFile, CollabChangeRequest, CollabComment, CollabCommentId, CollabCommentPage, CollabFileChangeKind, CollabGitOid, CollabIdempotencyKey, CollabIsoTimestamp, CollabMember, CollabMemberId, CollabMemberStatus, CollabOperationId, CollabParsedTicketReference, CollabProjectId, CollabRelativePath, CollabRequestDetail, CollabRequestId, CollabRequestStatus, CollabRequestTicketRelation, CollabResolvingTicketExpectation, CollabReviewCondition, CollabRole, CollabTicketAcceptedRelation, CollabTicketAcceptedRelationPage, CollabTicketComment, CollabTicketCommentId, CollabTicketCommentPage, CollabTicketCommitRelationKind, CollabTicketDetail, CollabTicketId, CollabTicketPage, CollabTicketRelationId, CollabTicketStatus, CollabTicketSummary, } from './types';
package/dist/index.js ADDED
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isCollabProjectId = exports.isCollabOpaqueId = exports.isCollabMemberId = exports.isCollabGitOid = exports.scanCollabTicketReferences = exports.parseCollabTicketReferences = exports.decodeCollabProtocolEnvelope = exports.parseCollabMemberMentions = exports.sanitizeCollabDiagnosticContext = exports.collabErrorGroup = exports.CollabError = exports.COLLAB_ERROR_CODES = exports.collabControlOperationCodec = exports.COLLAB_CONTROL_OPERATION_CODECS = exports.decodeCollabCloudProjectEventMessage = exports.COLLAB_CLOUD_EVENT_KINDS = exports.decodeCollabCloudProjectSnapshot = exports.COLLAB_CLOUD_PROJECT_SNAPSHOT_CODEC = exports.encodeDevelopmentBootstrapManifestCanonicalJson = exports.developmentBootstrapOperationCodec = exports.decodeDevelopmentBootstrapReport = exports.decodeDevelopmentBootstrapManifest = exports.DEVELOPMENT_BOOTSTRAP_OPERATION_CODECS = exports.DEVELOPMENT_BOOTSTRAP_OPERATIONS = exports.DEVELOPMENT_BOOTSTRAP_MANIFEST_SCHEMA_VERSION = exports.DEVELOPMENT_BOOTSTRAP_CANCELLATION_PHASES = exports.DEVELOPMENT_BOOTSTRAP_ATTEMPT_STATES = exports.DEVELOPMENT_BOOTSTRAP_ACTIVATION_PHASES = exports.matchCollabCloudRoute = exports.decodeCollabCloudSuccessEnvelope = exports.decodeCollabCloudErrorEnvelope = exports.decodeCollabCloudCapabilityDocument = exports.collabDevelopmentBootstrapRoute = exports.collabCloudSuccessEnvelope = exports.collabCloudProjectOperationRoute = exports.collabCloudProjectEventsRoute = exports.collabCloudGitRoute = exports.collabCloudErrorEnvelope = exports.collabCloudCapabilitiesRoute = exports.collabCloudCapabilitySupported = exports.collabCloudCapabilityDocument = exports.COLLAB_CLOUD_JSON_OPERATIONS = exports.COLLAB_CLOUD_CAPABILITY_DOCUMENT_SCHEMA_VERSION = exports.COLLAB_CLOUD_CAPABILITIES = exports.COLLAB_CLOUD_BINDING_VERSION = exports.COLLAB_CLOUD_BINDING_LIMITS = exports.COLLAB_PROTOCOL_VERSION = exports.COLLAB_MEMBER_REF_PREFIX = exports.COLLAB_MAIN_REF = exports.COLLAB_LIMITS = void 0;
4
+ exports.collabMemberRef = void 0;
5
+ var CollabConstants_1 = require("./CollabConstants");
6
+ Object.defineProperty(exports, "COLLAB_LIMITS", { enumerable: true, get: function () { return CollabConstants_1.COLLAB_LIMITS; } });
7
+ Object.defineProperty(exports, "COLLAB_MAIN_REF", { enumerable: true, get: function () { return CollabConstants_1.COLLAB_MAIN_REF; } });
8
+ Object.defineProperty(exports, "COLLAB_MEMBER_REF_PREFIX", { enumerable: true, get: function () { return CollabConstants_1.COLLAB_MEMBER_REF_PREFIX; } });
9
+ Object.defineProperty(exports, "COLLAB_PROTOCOL_VERSION", { enumerable: true, get: function () { return CollabConstants_1.COLLAB_PROTOCOL_VERSION; } });
10
+ var CollabCloudBinding_1 = require("./CollabCloudBinding");
11
+ Object.defineProperty(exports, "COLLAB_CLOUD_BINDING_LIMITS", { enumerable: true, get: function () { return CollabCloudBinding_1.COLLAB_CLOUD_BINDING_LIMITS; } });
12
+ Object.defineProperty(exports, "COLLAB_CLOUD_BINDING_VERSION", { enumerable: true, get: function () { return CollabCloudBinding_1.COLLAB_CLOUD_BINDING_VERSION; } });
13
+ Object.defineProperty(exports, "COLLAB_CLOUD_CAPABILITIES", { enumerable: true, get: function () { return CollabCloudBinding_1.COLLAB_CLOUD_CAPABILITIES; } });
14
+ Object.defineProperty(exports, "COLLAB_CLOUD_CAPABILITY_DOCUMENT_SCHEMA_VERSION", { enumerable: true, get: function () { return CollabCloudBinding_1.COLLAB_CLOUD_CAPABILITY_DOCUMENT_SCHEMA_VERSION; } });
15
+ Object.defineProperty(exports, "COLLAB_CLOUD_JSON_OPERATIONS", { enumerable: true, get: function () { return CollabCloudBinding_1.COLLAB_CLOUD_JSON_OPERATIONS; } });
16
+ Object.defineProperty(exports, "collabCloudCapabilityDocument", { enumerable: true, get: function () { return CollabCloudBinding_1.collabCloudCapabilityDocument; } });
17
+ Object.defineProperty(exports, "collabCloudCapabilitySupported", { enumerable: true, get: function () { return CollabCloudBinding_1.collabCloudCapabilitySupported; } });
18
+ Object.defineProperty(exports, "collabCloudCapabilitiesRoute", { enumerable: true, get: function () { return CollabCloudBinding_1.collabCloudCapabilitiesRoute; } });
19
+ Object.defineProperty(exports, "collabCloudErrorEnvelope", { enumerable: true, get: function () { return CollabCloudBinding_1.collabCloudErrorEnvelope; } });
20
+ Object.defineProperty(exports, "collabCloudGitRoute", { enumerable: true, get: function () { return CollabCloudBinding_1.collabCloudGitRoute; } });
21
+ Object.defineProperty(exports, "collabCloudProjectEventsRoute", { enumerable: true, get: function () { return CollabCloudBinding_1.collabCloudProjectEventsRoute; } });
22
+ Object.defineProperty(exports, "collabCloudProjectOperationRoute", { enumerable: true, get: function () { return CollabCloudBinding_1.collabCloudProjectOperationRoute; } });
23
+ Object.defineProperty(exports, "collabCloudSuccessEnvelope", { enumerable: true, get: function () { return CollabCloudBinding_1.collabCloudSuccessEnvelope; } });
24
+ Object.defineProperty(exports, "collabDevelopmentBootstrapRoute", { enumerable: true, get: function () { return CollabCloudBinding_1.collabDevelopmentBootstrapRoute; } });
25
+ Object.defineProperty(exports, "decodeCollabCloudCapabilityDocument", { enumerable: true, get: function () { return CollabCloudBinding_1.decodeCollabCloudCapabilityDocument; } });
26
+ Object.defineProperty(exports, "decodeCollabCloudErrorEnvelope", { enumerable: true, get: function () { return CollabCloudBinding_1.decodeCollabCloudErrorEnvelope; } });
27
+ Object.defineProperty(exports, "decodeCollabCloudSuccessEnvelope", { enumerable: true, get: function () { return CollabCloudBinding_1.decodeCollabCloudSuccessEnvelope; } });
28
+ Object.defineProperty(exports, "matchCollabCloudRoute", { enumerable: true, get: function () { return CollabCloudBinding_1.matchCollabCloudRoute; } });
29
+ var DevelopmentBootstrap_1 = require("./DevelopmentBootstrap");
30
+ Object.defineProperty(exports, "DEVELOPMENT_BOOTSTRAP_ACTIVATION_PHASES", { enumerable: true, get: function () { return DevelopmentBootstrap_1.DEVELOPMENT_BOOTSTRAP_ACTIVATION_PHASES; } });
31
+ Object.defineProperty(exports, "DEVELOPMENT_BOOTSTRAP_ATTEMPT_STATES", { enumerable: true, get: function () { return DevelopmentBootstrap_1.DEVELOPMENT_BOOTSTRAP_ATTEMPT_STATES; } });
32
+ Object.defineProperty(exports, "DEVELOPMENT_BOOTSTRAP_CANCELLATION_PHASES", { enumerable: true, get: function () { return DevelopmentBootstrap_1.DEVELOPMENT_BOOTSTRAP_CANCELLATION_PHASES; } });
33
+ Object.defineProperty(exports, "DEVELOPMENT_BOOTSTRAP_MANIFEST_SCHEMA_VERSION", { enumerable: true, get: function () { return DevelopmentBootstrap_1.DEVELOPMENT_BOOTSTRAP_MANIFEST_SCHEMA_VERSION; } });
34
+ Object.defineProperty(exports, "DEVELOPMENT_BOOTSTRAP_OPERATIONS", { enumerable: true, get: function () { return DevelopmentBootstrap_1.DEVELOPMENT_BOOTSTRAP_OPERATIONS; } });
35
+ Object.defineProperty(exports, "DEVELOPMENT_BOOTSTRAP_OPERATION_CODECS", { enumerable: true, get: function () { return DevelopmentBootstrap_1.DEVELOPMENT_BOOTSTRAP_OPERATION_CODECS; } });
36
+ Object.defineProperty(exports, "decodeDevelopmentBootstrapManifest", { enumerable: true, get: function () { return DevelopmentBootstrap_1.decodeDevelopmentBootstrapManifest; } });
37
+ Object.defineProperty(exports, "decodeDevelopmentBootstrapReport", { enumerable: true, get: function () { return DevelopmentBootstrap_1.decodeDevelopmentBootstrapReport; } });
38
+ Object.defineProperty(exports, "developmentBootstrapOperationCodec", { enumerable: true, get: function () { return DevelopmentBootstrap_1.developmentBootstrapOperationCodec; } });
39
+ Object.defineProperty(exports, "encodeDevelopmentBootstrapManifestCanonicalJson", { enumerable: true, get: function () { return DevelopmentBootstrap_1.encodeDevelopmentBootstrapManifestCanonicalJson; } });
40
+ var CollabCloudProjectSnapshot_1 = require("./CollabCloudProjectSnapshot");
41
+ Object.defineProperty(exports, "COLLAB_CLOUD_PROJECT_SNAPSHOT_CODEC", { enumerable: true, get: function () { return CollabCloudProjectSnapshot_1.COLLAB_CLOUD_PROJECT_SNAPSHOT_CODEC; } });
42
+ Object.defineProperty(exports, "decodeCollabCloudProjectSnapshot", { enumerable: true, get: function () { return CollabCloudProjectSnapshot_1.decodeCollabCloudProjectSnapshot; } });
43
+ var CollabCloudProjectEvent_1 = require("./CollabCloudProjectEvent");
44
+ Object.defineProperty(exports, "COLLAB_CLOUD_EVENT_KINDS", { enumerable: true, get: function () { return CollabCloudProjectEvent_1.COLLAB_CLOUD_EVENT_KINDS; } });
45
+ Object.defineProperty(exports, "decodeCollabCloudProjectEventMessage", { enumerable: true, get: function () { return CollabCloudProjectEvent_1.decodeCollabCloudProjectEventMessage; } });
46
+ var CollabControlOperationCodecs_1 = require("./CollabControlOperationCodecs");
47
+ Object.defineProperty(exports, "COLLAB_CONTROL_OPERATION_CODECS", { enumerable: true, get: function () { return CollabControlOperationCodecs_1.COLLAB_CONTROL_OPERATION_CODECS; } });
48
+ Object.defineProperty(exports, "collabControlOperationCodec", { enumerable: true, get: function () { return CollabControlOperationCodecs_1.collabControlOperationCodec; } });
49
+ var CollabError_1 = require("./CollabError");
50
+ Object.defineProperty(exports, "COLLAB_ERROR_CODES", { enumerable: true, get: function () { return CollabError_1.COLLAB_ERROR_CODES; } });
51
+ Object.defineProperty(exports, "CollabError", { enumerable: true, get: function () { return CollabError_1.CollabError; } });
52
+ Object.defineProperty(exports, "collabErrorGroup", { enumerable: true, get: function () { return CollabError_1.collabErrorGroup; } });
53
+ Object.defineProperty(exports, "sanitizeCollabDiagnosticContext", { enumerable: true, get: function () { return CollabError_1.sanitizeCollabDiagnosticContext; } });
54
+ var CollabMemberMentionParser_1 = require("./CollabMemberMentionParser");
55
+ Object.defineProperty(exports, "parseCollabMemberMentions", { enumerable: true, get: function () { return CollabMemberMentionParser_1.parseCollabMemberMentions; } });
56
+ var CollabProtocol_1 = require("./CollabProtocol");
57
+ Object.defineProperty(exports, "decodeCollabProtocolEnvelope", { enumerable: true, get: function () { return CollabProtocol_1.decodeCollabProtocolEnvelope; } });
58
+ var CollabTicketReferenceParser_1 = require("./CollabTicketReferenceParser");
59
+ Object.defineProperty(exports, "parseCollabTicketReferences", { enumerable: true, get: function () { return CollabTicketReferenceParser_1.parseCollabTicketReferences; } });
60
+ Object.defineProperty(exports, "scanCollabTicketReferences", { enumerable: true, get: function () { return CollabTicketReferenceParser_1.scanCollabTicketReferences; } });
61
+ var CollabValidation_1 = require("./CollabValidation");
62
+ Object.defineProperty(exports, "isCollabGitOid", { enumerable: true, get: function () { return CollabValidation_1.isCollabGitOid; } });
63
+ Object.defineProperty(exports, "isCollabMemberId", { enumerable: true, get: function () { return CollabValidation_1.isCollabMemberId; } });
64
+ Object.defineProperty(exports, "isCollabOpaqueId", { enumerable: true, get: function () { return CollabValidation_1.isCollabOpaqueId; } });
65
+ Object.defineProperty(exports, "isCollabProjectId", { enumerable: true, get: function () { return CollabValidation_1.isCollabProjectId; } });
66
+ var types_1 = require("./types");
67
+ Object.defineProperty(exports, "collabMemberRef", { enumerable: true, get: function () { return types_1.collabMemberRef; } });