@xemahq/biomes-platform-gitlab 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,175 @@
1
+ Xema Business Source License 1.1
2
+
3
+ License text copyright (c) 2020 MariaDB Corporation Ab, All Rights Reserved.
4
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
5
+
6
+ -----------------------------------------------------------------------------
7
+
8
+ Parameters
9
+
10
+ Licensor: Neuralchowder Inc.
11
+
12
+ Licensed Work: Xema. The Licensed Work is (c) 2026 Neuralchowder Inc.
13
+
14
+ The Licensed Work includes, without limitation, Xema Core, Xema Runtime,
15
+ Xema Kernel, Xema control plane, Xema application runtime, Xema biome
16
+ runtime, Xema biome registry, Xema store services, Xema orchestration
17
+ services, Xema agents, Xema skills, Xema memory services, Xema APIs, Xema
18
+ user interfaces, Xema command-line tools, Xema deployment artifacts, Xema
19
+ templates, Xema specifications, Xema schemas, Xema manifests, Xema
20
+ documentation, Xema examples, and all source code, object code, binaries,
21
+ packages, modules, configuration files, manifests, schemas, examples,
22
+ templates, documentation, and derivative works included in or distributed
23
+ as part of the Xema software project.
24
+
25
+ The Licensed Work does not include any third-party software, libraries,
26
+ dependencies, packages, assets, or components that are distributed with the
27
+ Licensed Work but are governed by their own separate license terms. Such
28
+ third-party materials remain subject to their respective licenses.
29
+
30
+ A specific file, package, component, or directory may state that it is
31
+ governed by a different license. In that case, that specific file, package,
32
+ component, or directory is governed by the license expressly stated therein.
33
+
34
+ Additional Use Grant:
35
+
36
+ You may make production use of the Licensed Work, provided that your use
37
+ does not include offering, providing, making available, distributing,
38
+ hosting, managing, embedding, reselling, white-labeling, sublicensing,
39
+ commercializing, or otherwise making the Licensed Work, or any modified
40
+ version or derivative work of the Licensed Work, available to Third Parties
41
+ as part of a Competitive Offering.
42
+
43
+ The following definitions and clarifications form part of, and govern
44
+ the interpretation of, the Additional Use Grant set out above.
45
+
46
+ 1. "Production Use" means any use of the Licensed Work other than for
47
+ development, testing, evaluation, demonstration, experimentation,
48
+ benchmarking, or other non-production purposes.
49
+
50
+ 2. "Affiliate" means any entity that, directly or indirectly,
51
+ controls, is controlled by, or is under common control with you,
52
+ where "control" means ownership of more than fifty percent (50%) of
53
+ the voting interests of the entity, or the power to direct its
54
+ management.
55
+
56
+ 3. "Third Party" means any natural person or legal entity other than
57
+ you and your Affiliates.
58
+
59
+ 4. "Competitive Offering" means any product or service, made available
60
+ to one or more Third Parties for a fee or other consideration
61
+ (including without limitation on a paid, subscription,
62
+ advertising-supported, hosted, or managed-service basis), that is
63
+ offered or marketed as, or that competes with, a software platform,
64
+ runtime, orchestration system, agent or automation system,
65
+ extension or distribution marketplace, or other software system
66
+ that provides, in substantial part, the same or substantially
67
+ similar capabilities as those provided by the Licensed Work. A
68
+ product or service is a Competitive Offering whether the Licensed
69
+ Work is provided in whole or in part, alone or bundled with other
70
+ software, and whether modified or unmodified.
71
+
72
+ 5. Providing, hosting, or managing the Licensed Work for a Third Party,
73
+ or otherwise making the Licensed Work available to a Third Party as
74
+ a hosted or managed service such that the Third Party obtains the
75
+ principal value or functionality of the Licensed Work, is a
76
+ Competitive Offering and is not permitted by the Additional Use
77
+ Grant.
78
+
79
+ 6. Subject to the foregoing, the Additional Use Grant permits you to
80
+ make Production Use of the Licensed Work for your own internal
81
+ business purposes and to build, operate, and provide your own
82
+ products and services to Third Parties, provided that the Licensed
83
+ Work itself (whether modified or unmodified) is not the product or
84
+ service, and is not a Competitive Offering, made available to those
85
+ Third Parties.
86
+
87
+ 7. You may modify the Licensed Work and create derivative works for
88
+ any purpose permitted by this License. Any Production Use of such
89
+ modified or derivative works remains subject to the same
90
+ restrictions as the Licensed Work, including the prohibition on
91
+ Competitive Offerings.
92
+
93
+ 8. Use of the Licensed Work by your own employees, contractors, and
94
+ agents, acting on your behalf and for your benefit, is not by
95
+ itself making the Licensed Work available to a Third Party.
96
+
97
+ 9. Embedding or distributing the Licensed Work as a component of your
98
+ own product or service is permitted only where the Licensed Work
99
+ does not constitute the principal value of that product or service
100
+ and the product or service is not a Competitive Offering.
101
+
102
+ 10. Nothing in this Additional Use Grant grants any right to use any
103
+ name, trademark, service mark, or logo of the Licensor or its
104
+ Affiliates, except as reasonably required for customary
105
+ attribution.
106
+
107
+ 11. The rights stated in this Additional Use Grant are the maximum
108
+ rights granted for Production Use prior to the Change Date. Any
109
+ Production Use not expressly permitted requires a separate
110
+ commercial license from the Licensor.
111
+
112
+ 12. If any provision of this Additional Use Grant is held invalid or
113
+ unenforceable, that provision shall be limited or eliminated to
114
+ the minimum extent necessary so that the remainder of this
115
+ Additional Use Grant, and of this License, remains in full force
116
+ and effect. The Licensor reserves all rights not expressly granted
117
+ by this License.
118
+
119
+
120
+ Change Date: Four years from the date the specific version of the Licensed
121
+ Work is first publicly released by Licensor.
122
+
123
+ Change License: Mozilla Public License, Version 2.0
124
+
125
+ For information about alternative licensing arrangements, commercial
126
+ licensing, enterprise licensing, OEM licensing, appliance licensing, managed
127
+ service licensing, cloud provider licensing, or other commercial use of the
128
+ Licensed Work, please contact: licensing@neuralchowder.com
129
+
130
+ -----------------------------------------------------------------------------
131
+
132
+ Notice
133
+
134
+ Business Source License 1.1
135
+
136
+ Terms
137
+
138
+ The Licensor hereby grants you the right to copy, modify, create derivative
139
+ works, redistribute, and make non-production use of the Licensed Work. The
140
+ Licensor may make an Additional Use Grant, above, permitting limited
141
+ production use.
142
+
143
+ Effective on the Change Date, or the fourth anniversary of the first publicly
144
+ available distribution of a specific version of the Licensed Work under this
145
+ License, whichever comes first, the Licensor hereby grants you rights under
146
+ the terms of the Change License, and the rights granted in the paragraph above
147
+ terminate.
148
+
149
+ If your use of the Licensed Work does not comply with the requirements
150
+ currently in effect as described in this License, you must purchase a
151
+ commercial license from the Licensor, its affiliated entities, or authorized
152
+ resellers, or you must refrain from using the Licensed Work.
153
+
154
+ All copies of the original and modified Licensed Work, and derivative works of
155
+ the Licensed Work, are subject to this License. This License applies separately
156
+ for each version of the Licensed Work and the Change Date may vary for each
157
+ version of the Licensed Work released by Licensor.
158
+
159
+ You must conspicuously display this License on each original or modified copy
160
+ of the Licensed Work. If you receive the Licensed Work in original or modified
161
+ form from a third party, the terms and conditions set forth in this License
162
+ apply to your use of that work.
163
+
164
+ Any use of the Licensed Work in violation of this License will automatically
165
+ terminate your rights under this License for the current and all other
166
+ versions of the Licensed Work.
167
+
168
+ This License does not grant you any right in any trademark or logo of Licensor
169
+ or its affiliates, provided that you may use a trademark or logo of Licensor
170
+ as expressly required by this License.
171
+
172
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
173
+ "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS
174
+ OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS
175
+ FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
@@ -0,0 +1,51 @@
1
+ {
2
+ "kind": "connector-adapter",
3
+ "manifest": {
4
+ "provider": {
5
+ "providerKey": "gitlab",
6
+ "displayName": "GitLab",
7
+ "description": "External SCM + issue tracking connector for GitLab-hosted repositories.",
8
+ "iconName": "Globe",
9
+ "category": "Source control",
10
+ "appAuthKind": "oauth2",
11
+ "allowOrgOverride": true,
12
+ "appCredentialSchema": [
13
+ {
14
+ "key": "clientId",
15
+ "label": "OAuth application ID",
16
+ "type": "TEXT",
17
+ "required": true,
18
+ "isSecret": false,
19
+ "transform": "TRIM"
20
+ },
21
+ {
22
+ "key": "clientSecret",
23
+ "label": "OAuth application secret",
24
+ "type": "PASSWORD",
25
+ "required": true,
26
+ "isSecret": true,
27
+ "transform": "TRIM"
28
+ }
29
+ ],
30
+ "oauthEndpoints": {
31
+ "authorizationUrl": "https://gitlab.com/oauth/authorize",
32
+ "tokenUrl": "https://gitlab.com/oauth/token"
33
+ }
34
+ },
35
+ "connectors": [
36
+ {
37
+ "connectorKey": "GITLAB",
38
+ "displayName": "GitLab",
39
+ "description": "Ingest GitLab push, merge-request and issue events from GitLab-hosted repositories.",
40
+ "iconName": "Globe",
41
+ "providerKey": "gitlab",
42
+ "scopes": [
43
+ "read_api",
44
+ "read_repository"
45
+ ],
46
+ "connectionCredentialKind": "oauth_user",
47
+ "adapterKind": "scm"
48
+ }
49
+ ]
50
+ }
51
+ }
@@ -0,0 +1,8 @@
1
+ import { type ConnectorAdapterModule } from '@xemahq/biome-sdk/adapter';
2
+ import { type ConnectorDescriptor, type ProviderDescriptor } from '@xemahq/kernel-contracts/connector';
3
+ export declare const providerDescriptor: ProviderDescriptor;
4
+ export declare const connectorDescriptors: readonly ConnectorDescriptor[];
5
+ export declare const gitlabProvider: ConnectorAdapterModule;
6
+ declare const connectorAdapters: readonly ConnectorAdapterModule[];
7
+ export default connectorAdapters;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connector-adapters/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,sBAAsB,EAI5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EASL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAExB,MAAM,oCAAoC,CAAC;AAqmB5C,eAAO,MAAM,kBAAkB,EAAE,kBAmChC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,SAAS,mBAAmB,EAgB9D,CAAC;AAoEF,eAAO,MAAM,cAAc,EAAE,sBAa3B,CAAC;AAEH,QAAA,MAAM,iBAAiB,EAAE,SAAS,sBAAsB,EAAqB,CAAC;AAC9E,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,499 @@
1
+ import { createHash, timingSafeEqual } from 'node:crypto';
2
+ import { adapterError, defineConnectorAdapter, err, ok, } from '@xemahq/biome-sdk/adapter';
3
+ import { BuiltInAdapterKind, CredentialFieldTransform, CredentialFieldType, CredentialKind, ConnectorOnboardingKind, ProjectBindingAdapterKey, ProviderAppAuthKind, ProviderOrigin, } from '@xemahq/kernel-contracts/connector';
4
+ const ENTITY_KIND = {
5
+ PUSH: 'push',
6
+ CHANGE_REQUEST: 'change_request',
7
+ ITEM: 'item',
8
+ COMMENT: 'comment',
9
+ };
10
+ const SCM_EVENT = {
11
+ PUSH_RECEIVED: 'scm.push.received',
12
+ CHANGE_REQUEST_OPENED: 'scm.change_request.opened',
13
+ CHANGE_REQUEST_UPDATED: 'scm.change_request.updated',
14
+ CHANGE_REQUEST_MERGED: 'scm.change_request.merged',
15
+ CHANGE_REQUEST_CLOSED: 'scm.change_request.closed',
16
+ };
17
+ const TRACKER_EVENT = {
18
+ ITEM_CREATED: 'tracker.item.created',
19
+ ITEM_UPDATED: 'tracker.item.updated',
20
+ COMMENT_ADDED: 'tracker.comment.added',
21
+ };
22
+ var ScmChangeRequestState;
23
+ (function (ScmChangeRequestState) {
24
+ ScmChangeRequestState["OPEN"] = "open";
25
+ ScmChangeRequestState["MERGED"] = "merged";
26
+ ScmChangeRequestState["CLOSED"] = "closed";
27
+ ScmChangeRequestState["DRAFT"] = "draft";
28
+ })(ScmChangeRequestState || (ScmChangeRequestState = {}));
29
+ var TrackerItemType;
30
+ (function (TrackerItemType) {
31
+ TrackerItemType["EPIC"] = "epic";
32
+ TrackerItemType["STORY"] = "story";
33
+ TrackerItemType["TASK"] = "task";
34
+ TrackerItemType["BUG"] = "bug";
35
+ })(TrackerItemType || (TrackerItemType = {}));
36
+ var TrackerItemStatus;
37
+ (function (TrackerItemStatus) {
38
+ TrackerItemStatus["TODO"] = "todo";
39
+ TrackerItemStatus["IN_PROGRESS"] = "in_progress";
40
+ TrackerItemStatus["IN_REVIEW"] = "in_review";
41
+ TrackerItemStatus["DONE"] = "done";
42
+ TrackerItemStatus["BLOCKED"] = "blocked";
43
+ TrackerItemStatus["CANCELLED"] = "cancelled";
44
+ })(TrackerItemStatus || (TrackerItemStatus = {}));
45
+ var TrackerItemPriority;
46
+ (function (TrackerItemPriority) {
47
+ TrackerItemPriority["P0"] = "p0";
48
+ TrackerItemPriority["P1"] = "p1";
49
+ TrackerItemPriority["P2"] = "p2";
50
+ TrackerItemPriority["P3"] = "p3";
51
+ })(TrackerItemPriority || (TrackerItemPriority = {}));
52
+ var GitlabMrAction;
53
+ (function (GitlabMrAction) {
54
+ GitlabMrAction["OPEN"] = "open";
55
+ GitlabMrAction["CLOSE"] = "close";
56
+ GitlabMrAction["REOPEN"] = "reopen";
57
+ GitlabMrAction["UPDATE"] = "update";
58
+ GitlabMrAction["APPROVED"] = "approved";
59
+ GitlabMrAction["UNAPPROVED"] = "unapproved";
60
+ GitlabMrAction["MERGE"] = "merge";
61
+ })(GitlabMrAction || (GitlabMrAction = {}));
62
+ var GitlabMrState;
63
+ (function (GitlabMrState) {
64
+ GitlabMrState["OPENED"] = "opened";
65
+ GitlabMrState["CLOSED"] = "closed";
66
+ GitlabMrState["MERGED"] = "merged";
67
+ GitlabMrState["LOCKED"] = "locked";
68
+ })(GitlabMrState || (GitlabMrState = {}));
69
+ var GitlabIssueAction;
70
+ (function (GitlabIssueAction) {
71
+ GitlabIssueAction["OPEN"] = "open";
72
+ GitlabIssueAction["CLOSE"] = "close";
73
+ GitlabIssueAction["REOPEN"] = "reopen";
74
+ GitlabIssueAction["UPDATE"] = "update";
75
+ })(GitlabIssueAction || (GitlabIssueAction = {}));
76
+ var GitlabIssueState;
77
+ (function (GitlabIssueState) {
78
+ GitlabIssueState["OPENED"] = "opened";
79
+ GitlabIssueState["CLOSED"] = "closed";
80
+ GitlabIssueState["REOPENED"] = "reopened";
81
+ })(GitlabIssueState || (GitlabIssueState = {}));
82
+ const gitlabVerifier = {
83
+ signatureHeader: 'x-gitlab-token',
84
+ algorithm: 'none',
85
+ secretSource: 'org-connection-secret',
86
+ verify({ headers, secret }) {
87
+ const provided = headers['x-gitlab-token'];
88
+ if (typeof provided !== 'string' || provided.length === 0) {
89
+ return err(adapterError('verification-failed', 'missing x-gitlab-token header'));
90
+ }
91
+ if (provided.length !== secret.length) {
92
+ return err(adapterError('verification-failed', 'token length mismatch'));
93
+ }
94
+ let equal;
95
+ try {
96
+ equal = timingSafeEqual(Buffer.from(provided, 'utf8'), Buffer.from(secret, 'utf8'));
97
+ }
98
+ catch {
99
+ return err(adapterError('verification-failed', 'token decode failed'));
100
+ }
101
+ if (!equal) {
102
+ return err(adapterError('verification-failed', 'token mismatch'));
103
+ }
104
+ return ok(undefined);
105
+ },
106
+ };
107
+ const gitlabIdempotencyKeyExtractor = ({ rawBody, headers }) => {
108
+ const delivery = headers['x-gitlab-event-uuid'];
109
+ if (typeof delivery === 'string' && delivery.length > 0) {
110
+ return `gitlab:${delivery}`;
111
+ }
112
+ const canonical = typeof rawBody === 'string'
113
+ ? rawBody
114
+ : rawBody instanceof Uint8Array
115
+ ? Buffer.from(rawBody).toString('utf8')
116
+ : rawBody && typeof rawBody === 'object'
117
+ ? canonicalJson(rawBody)
118
+ : '';
119
+ if (canonical.length === 0) {
120
+ throw new Error('gitlab webhook: cannot derive a deterministic idempotency key (no X-Gitlab-Event-UUID header and empty body)');
121
+ }
122
+ return `gitlab:${createHash('sha256').update(canonical, 'utf8').digest('hex')}`;
123
+ };
124
+ const gitlabEventMapper = {
125
+ map({ rawEvent }) {
126
+ if (!rawEvent || typeof rawEvent !== 'object') {
127
+ return err(adapterError('malformed-payload', 'gitlab event body is not an object'));
128
+ }
129
+ const payload = rawEvent;
130
+ const objectKind = asString(payload['object_kind']);
131
+ switch (objectKind) {
132
+ case 'push':
133
+ return mapPush(payload);
134
+ case 'merge_request':
135
+ return mapMergeRequest(payload);
136
+ case 'issue':
137
+ return mapIssue(payload);
138
+ case 'note':
139
+ return mapNote(payload);
140
+ default:
141
+ return ok(null);
142
+ }
143
+ },
144
+ };
145
+ function mapPush(payload) {
146
+ const project = payload['project'];
147
+ if (!project || typeof project !== 'object') {
148
+ return err(adapterError('malformed-payload', 'gitlab push: missing .project'));
149
+ }
150
+ const proj = project;
151
+ const ref = asString(payload['ref']);
152
+ const cloneUrl = asString(proj['git_http_url']);
153
+ const fullName = asString(proj['path_with_namespace']) || asString(proj['name']);
154
+ const afterSha = asString(payload['after']);
155
+ if (!ref || !cloneUrl || !fullName || !afterSha) {
156
+ return err(adapterError('malformed-payload', 'gitlab push: ref, project.git_http_url, project.path_with_namespace|name, and after are required'));
157
+ }
158
+ const beforeSha = optString(payload['before']);
159
+ const branch = ref.startsWith('refs/heads/') ? ref.replace('refs/heads/', '') : '';
160
+ const commits = extractCommits(payload);
161
+ const pushPayload = {
162
+ repositoryCloneUrl: cloneUrl,
163
+ repositoryFullName: fullName,
164
+ ref,
165
+ branch,
166
+ afterSha,
167
+ commitCount: commits.length,
168
+ commits,
169
+ ...omitUndefined({ beforeSha }),
170
+ };
171
+ const envelope = {
172
+ entityKind: ENTITY_KIND.PUSH,
173
+ event: SCM_EVENT.PUSH_RECEIVED,
174
+ payload: pushPayload,
175
+ externalId: afterSha,
176
+ externalSpaceKey: fullName,
177
+ };
178
+ return ok(envelope);
179
+ }
180
+ function mapMergeRequest(payload) {
181
+ const attrs = payload['object_attributes'];
182
+ const project = payload['project'];
183
+ if (!attrs || typeof attrs !== 'object' || !project || typeof project !== 'object') {
184
+ return err(adapterError('malformed-payload', 'gitlab merge_request: object_attributes and project are required'));
185
+ }
186
+ const built = buildChangeRequestPayload(attrs, project, payload);
187
+ if (!built.ok) {
188
+ return built;
189
+ }
190
+ const { payload: crPayload, externalId } = built.value;
191
+ const action = asString(attrs['action']);
192
+ const canonicalEvent = mapMrEvent(action, crPayload.state);
193
+ const envelope = {
194
+ entityKind: ENTITY_KIND.CHANGE_REQUEST,
195
+ event: canonicalEvent,
196
+ payload: crPayload,
197
+ externalId,
198
+ externalSpaceKey: crPayload.repositoryFullName,
199
+ };
200
+ return ok(envelope);
201
+ }
202
+ function buildChangeRequestPayload(attrs, project, envelope) {
203
+ const cloneUrl = asString(project['git_http_url']);
204
+ const fullName = asString(project['path_with_namespace']) || asString(project['name']);
205
+ const title = asString(attrs['title']);
206
+ const sourceBranch = asString(attrs['source_branch']);
207
+ const targetBranch = asString(attrs['target_branch']);
208
+ if (!cloneUrl || !fullName || !title || !sourceBranch || !targetBranch) {
209
+ return err(adapterError('malformed-payload', 'gitlab merge_request: project.git_http_url, project.path_with_namespace|name, object_attributes.{title,source_branch,target_branch} are required'));
210
+ }
211
+ const externalId = asIdString(attrs['id']) || asIdString(attrs['iid']);
212
+ if (!externalId) {
213
+ return err(adapterError('malformed-payload', 'gitlab merge_request: object_attributes.id|iid required'));
214
+ }
215
+ const state = mapMrState(asString(attrs['state']));
216
+ const lastCommit = attrs['last_commit'];
217
+ const headSha = lastCommit && typeof lastCommit === 'object'
218
+ ? optString(lastCommit['id'])
219
+ : optString(attrs['sha']);
220
+ const mergeCommitSha = optString(attrs['merge_commit_sha']);
221
+ const description = optString(attrs['description']);
222
+ const user = envelope['user'] ?? undefined;
223
+ const authorExternalId = user
224
+ ? optString(user['username']) ?? optString(user['email'])
225
+ : undefined;
226
+ const payload = {
227
+ repositoryCloneUrl: cloneUrl,
228
+ repositoryFullName: fullName,
229
+ title,
230
+ state,
231
+ sourceBranch,
232
+ targetBranch,
233
+ ...omitUndefined({
234
+ description,
235
+ headSha,
236
+ mergeCommitSha: state === ScmChangeRequestState.MERGED ? mergeCommitSha : undefined,
237
+ authorExternalId,
238
+ }),
239
+ };
240
+ return ok({ payload, externalId });
241
+ }
242
+ function mapMrState(state) {
243
+ switch (state) {
244
+ case GitlabMrState.OPENED:
245
+ return ScmChangeRequestState.OPEN;
246
+ case GitlabMrState.CLOSED:
247
+ case GitlabMrState.LOCKED:
248
+ return ScmChangeRequestState.CLOSED;
249
+ case GitlabMrState.MERGED:
250
+ return ScmChangeRequestState.MERGED;
251
+ default:
252
+ return ScmChangeRequestState.OPEN;
253
+ }
254
+ }
255
+ function mapMrEvent(action, state) {
256
+ if (state === ScmChangeRequestState.MERGED) {
257
+ return SCM_EVENT.CHANGE_REQUEST_MERGED;
258
+ }
259
+ switch (action) {
260
+ case GitlabMrAction.OPEN:
261
+ return SCM_EVENT.CHANGE_REQUEST_OPENED;
262
+ case GitlabMrAction.CLOSE:
263
+ return SCM_EVENT.CHANGE_REQUEST_CLOSED;
264
+ case GitlabMrAction.MERGE:
265
+ return SCM_EVENT.CHANGE_REQUEST_MERGED;
266
+ default:
267
+ return SCM_EVENT.CHANGE_REQUEST_UPDATED;
268
+ }
269
+ }
270
+ function mapIssue(payload) {
271
+ const attrs = payload['object_attributes'];
272
+ if (!attrs || typeof attrs !== 'object') {
273
+ return err(adapterError('malformed-payload', 'gitlab issue: missing .object_attributes'));
274
+ }
275
+ const a = attrs;
276
+ const action = asString(a['action']);
277
+ const title = asString(a['title']);
278
+ const state = asString(a['state']);
279
+ const externalId = asIdString(a['id']);
280
+ if (!action || !title || !state || !externalId) {
281
+ return err(adapterError('malformed-payload', 'gitlab issue: object_attributes.{action,title,state,id} required'));
282
+ }
283
+ const description = optString(a['description']);
284
+ const labelsRaw = a['labels'];
285
+ const tags = Array.isArray(labelsRaw)
286
+ ? labelsRaw
287
+ .map((l) => l && typeof l === 'object'
288
+ ? optString(l['title'])
289
+ : undefined)
290
+ .filter((t) => t !== undefined)
291
+ : [];
292
+ const itemPayload = {
293
+ title,
294
+ type: TrackerItemType.TASK,
295
+ status: mapIssueStatus(state),
296
+ priority: TrackerItemPriority.P2,
297
+ tags,
298
+ ...omitUndefined({ description }),
299
+ };
300
+ const envelope = {
301
+ entityKind: ENTITY_KIND.ITEM,
302
+ event: mapIssueAction(action),
303
+ payload: itemPayload,
304
+ externalId,
305
+ adapterKindOverride: BuiltInAdapterKind.Tracker,
306
+ };
307
+ return ok(envelope);
308
+ }
309
+ function mapNote(payload) {
310
+ const attrs = payload['object_attributes'];
311
+ if (!attrs || typeof attrs !== 'object') {
312
+ return err(adapterError('malformed-payload', 'gitlab note: missing .object_attributes'));
313
+ }
314
+ const a = attrs;
315
+ const noteableType = asString(a['noteable_type']);
316
+ if (noteableType !== 'Issue') {
317
+ return ok(null);
318
+ }
319
+ const issue = payload['issue'];
320
+ if (!issue || typeof issue !== 'object') {
321
+ return err(adapterError('malformed-payload', 'gitlab note: missing .issue'));
322
+ }
323
+ const itemExternalId = asIdString(issue['id']);
324
+ const commentExternalId = asIdString(a['id']);
325
+ const content = asString(a['note']);
326
+ if (!itemExternalId || !commentExternalId || !content) {
327
+ return err(adapterError('malformed-payload', 'gitlab note: issue.id, object_attributes.id and object_attributes.note required'));
328
+ }
329
+ const authorId = asIdString(a['author_id']);
330
+ const commentPayload = {
331
+ itemExternalId,
332
+ content,
333
+ authorType: 'human',
334
+ ...omitUndefined({ authorId: authorId || undefined }),
335
+ };
336
+ const envelope = {
337
+ entityKind: ENTITY_KIND.COMMENT,
338
+ event: TRACKER_EVENT.COMMENT_ADDED,
339
+ payload: commentPayload,
340
+ externalId: commentExternalId,
341
+ adapterKindOverride: BuiltInAdapterKind.Tracker,
342
+ };
343
+ return ok(envelope);
344
+ }
345
+ function mapIssueAction(action) {
346
+ switch (action) {
347
+ case GitlabIssueAction.OPEN:
348
+ return TRACKER_EVENT.ITEM_CREATED;
349
+ case GitlabIssueAction.CLOSE:
350
+ case GitlabIssueAction.REOPEN:
351
+ case GitlabIssueAction.UPDATE:
352
+ return TRACKER_EVENT.ITEM_UPDATED;
353
+ default:
354
+ return TRACKER_EVENT.ITEM_UPDATED;
355
+ }
356
+ }
357
+ function mapIssueStatus(state) {
358
+ if (state === GitlabIssueState.CLOSED) {
359
+ return TrackerItemStatus.DONE;
360
+ }
361
+ return TrackerItemStatus.TODO;
362
+ }
363
+ function extractCommits(payload) {
364
+ const commitsRaw = Array.isArray(payload['commits']) ? payload['commits'] : [];
365
+ return commitsRaw.map((raw) => mapCommit(raw));
366
+ }
367
+ function mapCommit(raw) {
368
+ const sha = optString(raw['id']) ?? '';
369
+ const message = optString(raw['message']) ?? '';
370
+ const author = raw['author'] ?? undefined;
371
+ const authorExternalId = author
372
+ ? optString(author['email']) ?? optString(author['name'])
373
+ : undefined;
374
+ const committedAt = optString(raw['timestamp']);
375
+ return {
376
+ sha,
377
+ message,
378
+ ...omitUndefined({ authorExternalId, committedAt }),
379
+ };
380
+ }
381
+ const GITLAB_PROVIDER_KEY = 'gitlab';
382
+ const GITLAB_DISPLAY_NAME = 'GitLab';
383
+ const GITLAB_ICON_NAME = 'Globe';
384
+ const GITLAB_DESCRIPTION = 'External SCM + issue tracking connector for GitLab-hosted repositories.';
385
+ const gitlabOnboarding = {
386
+ provider: GITLAB_PROVIDER_KEY,
387
+ displayName: GITLAB_DISPLAY_NAME,
388
+ description: GITLAB_DESCRIPTION,
389
+ iconName: GITLAB_ICON_NAME,
390
+ kind: ConnectorOnboardingKind.APP_INSTALL,
391
+ supportedProjectBindingAdapterKinds: [
392
+ ProjectBindingAdapterKey.SCM,
393
+ ProjectBindingAdapterKey.TRACKER,
394
+ ],
395
+ launchLabel: `Connect ${GITLAB_DISPLAY_NAME}`,
396
+ launchHint: 'Opens GitLab to authorize Xema. Repository and issue read access is granted by the consent screen — no token to paste.',
397
+ };
398
+ const GITLAB_READ_SCOPES = ['read_api', 'read_repository'];
399
+ export const providerDescriptor = {
400
+ providerKey: GITLAB_PROVIDER_KEY,
401
+ displayName: GITLAB_DISPLAY_NAME,
402
+ description: GITLAB_DESCRIPTION,
403
+ iconName: GITLAB_ICON_NAME,
404
+ category: 'Source control',
405
+ appAuthKind: ProviderAppAuthKind.OAuth2,
406
+ origin: ProviderOrigin.Biome,
407
+ allowOrgOverride: true,
408
+ appCredentialSchema: [
409
+ {
410
+ key: 'clientId',
411
+ label: 'OAuth application ID',
412
+ type: CredentialFieldType.TEXT,
413
+ required: true,
414
+ isSecret: false,
415
+ transform: CredentialFieldTransform.TRIM,
416
+ },
417
+ {
418
+ key: 'clientSecret',
419
+ label: 'OAuth application secret',
420
+ type: CredentialFieldType.PASSWORD,
421
+ required: true,
422
+ isSecret: true,
423
+ transform: CredentialFieldTransform.TRIM,
424
+ },
425
+ ],
426
+ oauthEndpoints: {
427
+ authorizationUrl: 'https://gitlab.com/oauth/authorize',
428
+ tokenUrl: 'https://gitlab.com/oauth/token',
429
+ },
430
+ };
431
+ export const connectorDescriptors = [
432
+ {
433
+ connectorKey: 'GITLAB',
434
+ displayName: GITLAB_DISPLAY_NAME,
435
+ description: 'Ingest GitLab push, merge-request and issue events from GitLab-hosted repositories.',
436
+ iconName: GITLAB_ICON_NAME,
437
+ providerKey: GITLAB_PROVIDER_KEY,
438
+ scopes: GITLAB_READ_SCOPES,
439
+ connectionCredentialKind: CredentialKind.OAuthUser,
440
+ adapterKind: BuiltInAdapterKind.Scm,
441
+ },
442
+ ];
443
+ function asString(value) {
444
+ return typeof value === 'string' && value.length > 0 ? value : '';
445
+ }
446
+ function optString(value) {
447
+ return typeof value === 'string' && value.length > 0 ? value : undefined;
448
+ }
449
+ function asIdString(value) {
450
+ if (typeof value === 'string' && value.length > 0) {
451
+ return value;
452
+ }
453
+ if (typeof value === 'number' && Number.isFinite(value)) {
454
+ return String(value);
455
+ }
456
+ if (typeof value === 'bigint') {
457
+ return String(value);
458
+ }
459
+ return '';
460
+ }
461
+ function omitUndefined(obj) {
462
+ const out = {};
463
+ for (const [k, v] of Object.entries(obj)) {
464
+ if (v !== undefined) {
465
+ out[k] = v;
466
+ }
467
+ }
468
+ return out;
469
+ }
470
+ function canonicalJson(value) {
471
+ if (value === null || typeof value !== 'object') {
472
+ return JSON.stringify(value) ?? 'null';
473
+ }
474
+ if (Array.isArray(value)) {
475
+ return `[${value.map(canonicalJson).join(',')}]`;
476
+ }
477
+ const entries = Object.entries(value)
478
+ .filter(([, v]) => v !== undefined)
479
+ .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))
480
+ .map(([k, v]) => `${JSON.stringify(k)}:${canonicalJson(v)}`);
481
+ return `{${entries.join(',')}}`;
482
+ }
483
+ export const gitlabProvider = defineConnectorAdapter({
484
+ adapterKind: BuiltInAdapterKind.Scm,
485
+ provider: GITLAB_PROVIDER_KEY,
486
+ displayName: GITLAB_DISPLAY_NAME,
487
+ webhook: {
488
+ verifier: gitlabVerifier,
489
+ eventMapper: gitlabEventMapper,
490
+ idempotencyKeyExtractor: gitlabIdempotencyKeyExtractor,
491
+ },
492
+ credentialKind: CredentialKind.OAuthUser,
493
+ resources: {},
494
+ actions: {},
495
+ onboarding: gitlabOnboarding,
496
+ });
497
+ const connectorAdapters = [gitlabProvider];
498
+ export default connectorAdapters;
499
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connector-adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,GAAG,EACH,EAAE,GAOH,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,cAAc,GAIf,MAAM,oCAAoC,CAAC;AAgC5C,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,gBAAgB;IAChC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;CACV,CAAC;AAGX,MAAM,SAAS,GAAG;IAChB,aAAa,EAAE,mBAAmB;IAClC,qBAAqB,EAAE,2BAA2B;IAClD,sBAAsB,EAAE,4BAA4B;IACpD,qBAAqB,EAAE,2BAA2B;IAClD,qBAAqB,EAAE,2BAA2B;CAC1C,CAAC;AAGX,MAAM,aAAa,GAAG;IACpB,YAAY,EAAE,sBAAsB;IACpC,YAAY,EAAE,sBAAsB;IACpC,aAAa,EAAE,uBAAuB;CAC9B,CAAC;AAGX,IAAK,qBAKJ;AALD,WAAK,qBAAqB;IACxB,sCAAa,CAAA;IACb,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;IACjB,wCAAe,CAAA;AACjB,CA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AC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAChD,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAClC,CAAC;AAQD,MAAM,CAAC,MAAM,cAAc,GAA2B,sBAAsB,CAAC;IAC3E,WAAW,EAAE,kBAAkB,CAAC,GAAG;IACnC,QAAQ,EAAE,mBAAmB;IAC7B,WAAW,EAAE,mBAAmB;IAChC,OAAO,EAAE;QACP,QAAQ,EAAE,cAAc;QACxB,WAAW,EAAE,iBAAiB;QAC9B,uBAAuB,EAAE,6BAA6B;KACvD;IACD,cAAc,EAAE,cAAc,CAAC,SAAS;IACxC,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,gBAAgB;CAC7B,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAsC,CAAC,cAAc,CAAC,CAAC;AAC9E,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "connector-gitlab-install",
4
+ "title": "GitLab Connector Settings",
5
+ "type": "object",
6
+ "required": ["integration", "repositoryIds"],
7
+ "properties": {
8
+ "integration": {
9
+ "type": "string",
10
+ "title": "GitLab integration",
11
+ "description": "Which connected GitLab instance this installation uses.",
12
+ "x-widget": "scm-repository-picker",
13
+ "x-widget-config": { "provider": "gitlab" }
14
+ },
15
+ "repositoryIds": {
16
+ "type": "array",
17
+ "title": "Repositories",
18
+ "description": "GitLab projects whose push / merge-request / issue activity should fire workflows.",
19
+ "items": { "type": "string" },
20
+ "minItems": 1,
21
+ "x-widget": "scm-repository-picker",
22
+ "x-widget-config": { "provider": "gitlab", "type": "repository" }
23
+ }
24
+ }
25
+ }
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@xemahq/biomes-platform-gitlab",
3
+ "version": "0.1.0",
4
+ "license": "LicenseRef-Xema-BSL-1.1",
5
+ "type": "module",
6
+ "publishConfig": {
7
+ "registry": "https://registry.npmjs.org/",
8
+ "access": "public"
9
+ },
10
+ "main": "dist/connector-adapters/index.js",
11
+ "files": [
12
+ "dist",
13
+ "install-schema",
14
+ "xema-biome.json",
15
+ "contributions"
16
+ ],
17
+ "exports": {
18
+ "./connector-adapters": {
19
+ "types": "./dist/connector-adapters/index.d.ts",
20
+ "default": "./dist/connector-adapters/index.js"
21
+ },
22
+ "./package.json": "./package.json"
23
+ },
24
+ "dependencies": {
25
+ "@xemahq/biome-sdk": "^3.0.0",
26
+ "@xemahq/kernel-contracts": "^5.1.0"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "25.2.3",
30
+ "typescript": "5.9.3"
31
+ },
32
+ "scripts": {
33
+ "build": "tsc -p tsconfig.json",
34
+ "typecheck": "tsc --noEmit",
35
+ "test": "node --test ./tests/**/*.test.mjs"
36
+ }
37
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "name": "@xemahq/biomes-platform-gitlab",
3
+ "version": "0.1.0",
4
+ "xema": {
5
+ "id": "connector-gitlab",
6
+ "displayName": "GitLab Connector",
7
+ "display": {
8
+ "icon": "gitlab",
9
+ "category": "connect",
10
+ "summary": "GitLab connector — ingests repository push, merge-request, and issue/comment webhooks into Xema via the connector gateway."
11
+ },
12
+ "description": "First-party connector biome that ships the GitLab integration (webhook ingress: push + merge_request normalized to the canonical SCM push / change-request envelopes, and issue + note-on-issue normalized to the canonical tracker item / comment envelopes) as a contributed ConnectorAdapterModule. Terminates at the single connector-gateway ingress edge — contributes the provider module (static X-Gitlab-Token verifier, event mapper, deterministic idempotency, onboarding manifest), NOT its own webhook route.",
13
+ "scope": "platform",
14
+ "target": "server",
15
+ "bundleSource": {
16
+ "kind": "npm",
17
+ "name": "@xemahq/biomes-platform-gitlab",
18
+ "version": "0.1.0"
19
+ },
20
+ "trustTier": "first-party",
21
+ "connectorRequirements": [
22
+ {
23
+ "adapterKind": "scm",
24
+ "purpose": "GitLab repository push + merge-request activity for workflow automation",
25
+ "capabilities": [
26
+ "read.repository",
27
+ "read.change-request"
28
+ ]
29
+ },
30
+ {
31
+ "adapterKind": "tracker",
32
+ "purpose": "GitLab issue + comment activity for backlog synchronization",
33
+ "capabilities": [
34
+ "read.item",
35
+ "read.comment"
36
+ ]
37
+ }
38
+ ],
39
+ "components": [
40
+ {
41
+ "key": "connector-adapter",
42
+ "kind": "adapter",
43
+ "artifact": {
44
+ "kind": "host-module",
45
+ "path": "dist/connector-adapters/index.js"
46
+ },
47
+ "entrypoint": {
48
+ "kind": "module-export",
49
+ "module": "dist/connector-adapters/index.js",
50
+ "exportName": "default"
51
+ },
52
+ "protocol": {
53
+ "kind": "adapter",
54
+ "revision": "v1"
55
+ },
56
+ "hostAbi": {
57
+ "name": "xema-adapter-host",
58
+ "versionRange": "^1"
59
+ },
60
+ "executionModes": [
61
+ "shared-host",
62
+ "isolated"
63
+ ],
64
+ "requirements": {
65
+ "tenancy": {
66
+ "allowed": [
67
+ "org",
68
+ "project"
69
+ ],
70
+ "tenantContext": "verified"
71
+ },
72
+ "isolation": {
73
+ "minimum": "none"
74
+ },
75
+ "trust": {
76
+ "minimum": "verified"
77
+ },
78
+ "locality": {
79
+ "allowed": [
80
+ "cloud",
81
+ "customer-private"
82
+ ]
83
+ },
84
+ "state": {
85
+ "kind": "stateless"
86
+ },
87
+ "resources": {
88
+ "minimum": {
89
+ "cpu": "100m",
90
+ "memory": "64Mi",
91
+ "ephemeralStorage": "64Mi"
92
+ }
93
+ },
94
+ "runtime": {
95
+ "kind": "node",
96
+ "versionRange": ">=22 <25"
97
+ },
98
+ "io": {
99
+ "ingress": "webhook",
100
+ "egress": "internet",
101
+ "rawBody": true,
102
+ "devices": []
103
+ },
104
+ "scaling": {
105
+ "mode": "horizontal",
106
+ "concurrency": {
107
+ "handling": "parallel",
108
+ "maximumPerInstance": 16
109
+ },
110
+ "readiness": {
111
+ "kind": "protocol",
112
+ "initialDelaySeconds": 0
113
+ },
114
+ "drain": {
115
+ "kind": "graceful",
116
+ "maximumSeconds": 30
117
+ },
118
+ "hints": {
119
+ "cpu": "latency",
120
+ "memory": "steady",
121
+ "startup": "fast"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ ]
127
+ }
128
+ }