@yadsh/dsh-qa-integrations 0.8.3 → 0.10.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 (188) hide show
  1. package/README.md +44 -27
  2. package/compatibility.json +7 -3
  3. package/lib/broker.js +225 -18
  4. package/lib/broker.js.map +1 -1
  5. package/lib/client/bitrix24.js +8 -6
  6. package/lib/client/bitrix24.js.map +1 -1
  7. package/lib/client/card.js +14 -13
  8. package/lib/client/card.js.map +1 -1
  9. package/lib/client/confluence.js +11 -7
  10. package/lib/client/confluence.js.map +1 -1
  11. package/lib/client/credential-help-note.js +51 -0
  12. package/lib/client/credential-help-note.js.map +1 -0
  13. package/lib/client/gitlab.js +8 -6
  14. package/lib/client/gitlab.js.map +1 -1
  15. package/lib/client/index.js +38 -32
  16. package/lib/client/index.js.map +1 -1
  17. package/lib/client/integrations.js +31 -18
  18. package/lib/client/integrations.js.map +1 -1
  19. package/lib/client/jira.js +10 -8
  20. package/lib/client/jira.js.map +1 -1
  21. package/lib/client/operator-card.js +93 -534
  22. package/lib/client/operator-card.js.map +1 -1
  23. package/lib/client/operator-controls.js +72 -23
  24. package/lib/client/operator-controls.js.map +1 -1
  25. package/lib/client/operator-sections/bitrix24.js +22 -0
  26. package/lib/client/operator-sections/bitrix24.js.map +1 -0
  27. package/lib/client/operator-sections/confluence.js +27 -0
  28. package/lib/client/operator-sections/confluence.js.map +1 -0
  29. package/lib/client/operator-sections/credential-help.js +15 -0
  30. package/lib/client/operator-sections/credential-help.js.map +1 -0
  31. package/lib/client/operator-sections/general.js +8 -0
  32. package/lib/client/operator-sections/general.js.map +1 -0
  33. package/lib/client/operator-sections/gitlab.js +41 -0
  34. package/lib/client/operator-sections/gitlab.js.map +1 -0
  35. package/lib/client/operator-sections/jira.js +25 -0
  36. package/lib/client/operator-sections/jira.js.map +1 -0
  37. package/lib/client/operator-sections/provider-section.js +21 -0
  38. package/lib/client/operator-sections/provider-section.js.map +1 -0
  39. package/lib/client/operator-sections/service-profiles.js +178 -0
  40. package/lib/client/operator-sections/service-profiles.js.map +1 -0
  41. package/lib/client/operator-sections/shared.js +192 -0
  42. package/lib/client/operator-sections/shared.js.map +1 -0
  43. package/lib/client/operator-sections/teamcity.js +42 -0
  44. package/lib/client/operator-sections/teamcity.js.map +1 -0
  45. package/lib/client/operator-sections/testit.js +35 -0
  46. package/lib/client/operator-sections/testit.js.map +1 -0
  47. package/lib/client/operator-sections/weblate.js +32 -0
  48. package/lib/client/operator-sections/weblate.js.map +1 -0
  49. package/lib/client/operator-service-reach.js +98 -0
  50. package/lib/client/operator-service-reach.js.map +1 -0
  51. package/lib/client/provider-card.js +32 -19
  52. package/lib/client/provider-card.js.map +1 -1
  53. package/lib/client/styles.js +52 -15
  54. package/lib/client/styles.js.map +1 -1
  55. package/lib/client/teamcity.js +7 -5
  56. package/lib/client/teamcity.js.map +1 -1
  57. package/lib/client/testit.js +8 -6
  58. package/lib/client/testit.js.map +1 -1
  59. package/lib/client/weblate.js +8 -6
  60. package/lib/client/weblate.js.map +1 -1
  61. package/lib/client.js +2838 -1923
  62. package/lib/client.js.map +1 -1
  63. package/lib/config.js +64 -17
  64. package/lib/config.js.map +1 -1
  65. package/lib/index.js +177 -223
  66. package/lib/index.js.map +1 -1
  67. package/lib/providers/bitrix24/tools.js +7 -2
  68. package/lib/providers/bitrix24/tools.js.map +1 -1
  69. package/lib/providers/bitrix24/transport.js +16 -6
  70. package/lib/providers/bitrix24/transport.js.map +1 -1
  71. package/lib/providers/confluence/config.js +14 -55
  72. package/lib/providers/confluence/config.js.map +1 -1
  73. package/lib/providers/confluence/tools.js +7 -2
  74. package/lib/providers/confluence/tools.js.map +1 -1
  75. package/lib/providers/confluence/transport.js +42 -78
  76. package/lib/providers/confluence/transport.js.map +1 -1
  77. package/lib/providers/gitlab/config.js +11 -55
  78. package/lib/providers/gitlab/config.js.map +1 -1
  79. package/lib/providers/gitlab/operations.js +3 -3
  80. package/lib/providers/gitlab/operations.js.map +1 -1
  81. package/lib/providers/gitlab/tools.js +7 -2
  82. package/lib/providers/gitlab/tools.js.map +1 -1
  83. package/lib/providers/gitlab/transport.js +33 -65
  84. package/lib/providers/gitlab/transport.js.map +1 -1
  85. package/lib/providers/jira/config.js +18 -58
  86. package/lib/providers/jira/config.js.map +1 -1
  87. package/lib/providers/jira/jql.js +105 -1
  88. package/lib/providers/jira/jql.js.map +1 -1
  89. package/lib/providers/jira/tools.js +68 -2
  90. package/lib/providers/jira/tools.js.map +1 -1
  91. package/lib/providers/jira/transport.js +44 -110
  92. package/lib/providers/jira/transport.js.map +1 -1
  93. package/lib/providers/kernel/address.js +90 -0
  94. package/lib/providers/kernel/address.js.map +1 -0
  95. package/lib/providers/kernel/errors.js +42 -0
  96. package/lib/providers/kernel/errors.js.map +1 -0
  97. package/lib/providers/kernel/read-policy.js +250 -0
  98. package/lib/providers/kernel/read-policy.js.map +1 -0
  99. package/lib/providers/kernel/token.js +45 -0
  100. package/lib/providers/kernel/token.js.map +1 -0
  101. package/lib/providers/shared/service-boundary.js +31 -3
  102. package/lib/providers/shared/service-boundary.js.map +1 -1
  103. package/lib/providers/teamcity/tools.js +8 -3
  104. package/lib/providers/teamcity/tools.js.map +1 -1
  105. package/lib/providers/teamcity/transport.js +6 -8
  106. package/lib/providers/teamcity/transport.js.map +1 -1
  107. package/lib/providers/testit/config.js +12 -57
  108. package/lib/providers/testit/config.js.map +1 -1
  109. package/lib/providers/testit/tools.js +7 -2
  110. package/lib/providers/testit/tools.js.map +1 -1
  111. package/lib/providers/testit/transport.js +12 -12
  112. package/lib/providers/testit/transport.js.map +1 -1
  113. package/lib/providers/weblate/config.js +12 -55
  114. package/lib/providers/weblate/config.js.map +1 -1
  115. package/lib/providers/weblate/tools.js +7 -2
  116. package/lib/providers/weblate/tools.js.map +1 -1
  117. package/lib/providers/weblate/transport.js +21 -20
  118. package/lib/providers/weblate/transport.js.map +1 -1
  119. package/lib/public-api.js +79 -0
  120. package/lib/public-api.js.map +1 -0
  121. package/lib/repository.js +96 -16
  122. package/lib/repository.js.map +1 -1
  123. package/lib/service-credentials/config.js +61 -0
  124. package/lib/service-credentials/config.js.map +1 -1
  125. package/lib/service-credentials/policy.js +14 -1
  126. package/lib/service-credentials/policy.js.map +1 -1
  127. package/lib/service-credentials/rate-limit.js +136 -0
  128. package/lib/service-credentials/rate-limit.js.map +1 -0
  129. package/lib/tool-kit.js +15 -7
  130. package/lib/tool-kit.js.map +1 -1
  131. package/lib/tools.js +49 -24
  132. package/lib/tools.js.map +1 -1
  133. package/lib/typert.host.js +460 -352
  134. package/lib/typert.remote-client.js +450 -336
  135. package/lib/types/broker.d.ts +77 -3
  136. package/lib/types/client/card.d.ts +13 -4
  137. package/lib/types/client/credential-help-note.d.ts +26 -0
  138. package/lib/types/client/index.d.ts +15 -7
  139. package/lib/types/client/integrations.d.ts +5 -4
  140. package/lib/types/client/operator-card.d.ts +56 -4
  141. package/lib/types/client/operator-controls.d.ts +31 -0
  142. package/lib/types/client/operator-sections/bitrix24.d.ts +12 -0
  143. package/lib/types/client/operator-sections/confluence.d.ts +10 -0
  144. package/lib/types/client/operator-sections/credential-help.d.ts +17 -0
  145. package/lib/types/client/operator-sections/general.d.ts +11 -0
  146. package/lib/types/client/operator-sections/gitlab.d.ts +13 -0
  147. package/lib/types/client/operator-sections/jira.d.ts +11 -0
  148. package/lib/types/client/operator-sections/provider-section.d.ts +58 -0
  149. package/lib/types/client/operator-sections/service-profiles.d.ts +13 -0
  150. package/lib/types/client/operator-sections/shared.d.ts +123 -0
  151. package/lib/types/client/operator-sections/teamcity.d.ts +11 -0
  152. package/lib/types/client/operator-sections/testit.d.ts +10 -0
  153. package/lib/types/client/operator-sections/weblate.d.ts +10 -0
  154. package/lib/types/client/operator-service-reach.d.ts +76 -0
  155. package/lib/types/client/provider-card.d.ts +14 -3
  156. package/lib/types/client/styles.d.ts +28 -4
  157. package/lib/types/config.d.ts +49 -2
  158. package/lib/types/index.d.ts +54 -117
  159. package/lib/types/providers/bitrix24/tools.d.ts +2 -5
  160. package/lib/types/providers/confluence/tools.d.ts +2 -6
  161. package/lib/types/providers/confluence/transport.d.ts +0 -6
  162. package/lib/types/providers/gitlab/config.d.ts +1 -1
  163. package/lib/types/providers/gitlab/tools.d.ts +2 -6
  164. package/lib/types/providers/gitlab/transport.d.ts +3 -5
  165. package/lib/types/providers/jira/tools.d.ts +2 -6
  166. package/lib/types/providers/jira/transport.d.ts +2 -11
  167. package/lib/types/providers/kernel/address.d.ts +57 -0
  168. package/lib/types/providers/kernel/errors.d.ts +34 -0
  169. package/lib/types/providers/kernel/read-policy.d.ts +107 -0
  170. package/lib/types/providers/kernel/token.d.ts +25 -0
  171. package/lib/types/providers/shared/service-boundary.d.ts +15 -0
  172. package/lib/types/providers/teamcity/tools.d.ts +2 -6
  173. package/lib/types/providers/teamcity/transport.d.ts +1 -1
  174. package/lib/types/providers/testit/tools.d.ts +2 -6
  175. package/lib/types/providers/testit/transport.d.ts +1 -1
  176. package/lib/types/providers/weblate/tools.d.ts +2 -6
  177. package/lib/types/public-api.d.ts +80 -0
  178. package/lib/types/repository.d.ts +64 -2
  179. package/lib/types/service-credentials/config.d.ts +22 -0
  180. package/lib/types/service-credentials/rate-limit.d.ts +66 -0
  181. package/lib/types/service-credentials/types.d.ts +18 -0
  182. package/lib/types/tool-kit.d.ts +27 -1
  183. package/lib/types/tools.d.ts +26 -9
  184. package/lib/types/types.d.ts +17 -3
  185. package/package.json +23 -21
  186. package/lib/providers/shared/http.js +0 -168
  187. package/lib/providers/shared/http.js.map +0 -1
  188. package/lib/types/providers/shared/http.d.ts +0 -60
@@ -0,0 +1,136 @@
1
+ import { IntegrationError } from "../errors.js";
2
+ const MINUTE_MS = 60_000;
3
+ /**
4
+ * Buckets are only kept while a limit bites, so this is a safety valve for a
5
+ * deployment with far more principals than expected rather than a working set
6
+ * size. An entry whose balance is full again costs nothing to forget.
7
+ */
8
+ const MAX_TRACKED_KEYS = 4096;
9
+ /** Refill is float arithmetic; a balance is "full" within this much. */
10
+ const REFILL_EPSILON = 1e-9;
11
+ export class ServiceRateLimitError extends IntegrationError {
12
+ reason;
13
+ constructor(reason) {
14
+ super("RateLimited", "Too many requests through the service credential. Try again later.");
15
+ this.reason = reason;
16
+ this.name = "IntegrationError";
17
+ }
18
+ }
19
+ /**
20
+ * Refill-on-read limiting of service-mode calls.
21
+ *
22
+ * A managed credential is one upstream identity shared by every user of the
23
+ * deployment, so the ceiling that protects it has to be two-sided at once: one
24
+ * principal must not exhaust the shared quota, and the shared quota must not be
25
+ * multiplied per principal. Both buckets are therefore read before either is
26
+ * written — a call refused by the shared ceiling leaves the individual balance
27
+ * untouched and one refused by the individual ceiling leaves the shared balance
28
+ * untouched. Otherwise a noisy user would pay for the bottleneck they create
29
+ * with everybody else's allowance.
30
+ *
31
+ * A bucket holds `requestsPerMinute` tokens and refills at that rate, so the
32
+ * allowance is spent continuously rather than reset on a wall-clock minute: a
33
+ * burst may take a full minute of requests and is then throttled to the steady
34
+ * rate. A rate of `0` disables that dimension.
35
+ *
36
+ * State lives in this process only, which is where the only path to a managed
37
+ * credential lives.
38
+ */
39
+ export class ServiceRateLimiter {
40
+ now;
41
+ principals = new Map();
42
+ credentials = new Map();
43
+ inflight = new Map();
44
+ maxTrackedKeys;
45
+ config;
46
+ constructor(config, now = () => Date.now(), options = {}) {
47
+ this.now = now;
48
+ this.config = config;
49
+ this.maxTrackedKeys = options.maxTrackedKeys ?? MAX_TRACKED_KEYS;
50
+ }
51
+ /**
52
+ * Take in new operator values. Balances survive: re-tuning a limit must not
53
+ * hand a fresh minute of requests to everyone at once.
54
+ */
55
+ configure(config) {
56
+ this.config = config;
57
+ }
58
+ /**
59
+ * Spend one request or refuse it. The returned function gives the concurrency
60
+ * slot back and is safe to call more than once, because the caller releases it
61
+ * from a `finally` that may have run already.
62
+ */
63
+ acquire(keys) {
64
+ const { perPrincipal, perCredential } = this.config;
65
+ const now = this.now();
66
+ const principalKey = `${keys.provider}\u0000${keys.principal}`;
67
+ const principal = available(this.principals.get(principalKey), perPrincipal.requestsPerMinute, now);
68
+ const credential = available(this.credentials.get(keys.profileId), perCredential.requestsPerMinute, now);
69
+ const active = this.inflight.get(keys.profileId) ?? 0;
70
+ const ceiling = perCredential.maxConcurrent;
71
+ if (principal < 1)
72
+ throw new ServiceRateLimitError("principal");
73
+ if (active >= ceiling && ceiling > 0) {
74
+ throw new ServiceRateLimitError("concurrency");
75
+ }
76
+ if (credential < 1)
77
+ throw new ServiceRateLimitError("credential");
78
+ this.spend(this.principals, principalKey, perPrincipal.requestsPerMinute, now, principal);
79
+ this.spend(this.credentials, keys.profileId, perCredential.requestsPerMinute, now, credential);
80
+ this.inflight.set(keys.profileId, active + 1);
81
+ let released = false;
82
+ return () => {
83
+ if (released)
84
+ return;
85
+ released = true;
86
+ const left = (this.inflight.get(keys.profileId) ?? 1) - 1;
87
+ if (left <= 0)
88
+ this.inflight.delete(keys.profileId);
89
+ else
90
+ this.inflight.set(keys.profileId, left);
91
+ };
92
+ }
93
+ spend(map, key, rate, now, from) {
94
+ if (rate <= 0)
95
+ return;
96
+ if (!map.has(key) && map.size >= this.maxTrackedKeys) {
97
+ this.retire(map, rate, now);
98
+ }
99
+ map.set(key, { tokens: from - 1, at: now });
100
+ }
101
+ /**
102
+ * Free room for a new principal. A stored balance only refills when it is
103
+ * read, so "idle" is measured against now rather than against what is in the
104
+ * entry: a bucket that has earned its whole allowance back is equivalent to
105
+ * an absent one, and forgetting it costs nobody anything. If every entry is
106
+ * still spending, the longest untouched one goes.
107
+ */
108
+ retire(map, rate, now) {
109
+ for (const [key, balance] of map) {
110
+ if (available(balance, rate, now) >= rate - REFILL_EPSILON) {
111
+ map.delete(key);
112
+ }
113
+ }
114
+ if (map.size < this.maxTrackedKeys)
115
+ return;
116
+ let oldest;
117
+ let at = Number.POSITIVE_INFINITY;
118
+ for (const [key, balance] of map) {
119
+ if (balance.at < at) {
120
+ at = balance.at;
121
+ oldest = key;
122
+ }
123
+ }
124
+ if (oldest !== undefined)
125
+ map.delete(oldest);
126
+ }
127
+ }
128
+ function available(bucket, rate, now) {
129
+ if (rate <= 0)
130
+ return Number.POSITIVE_INFINITY;
131
+ if (bucket === undefined)
132
+ return rate;
133
+ const elapsed = Math.max(0, now - bucket.at);
134
+ return Math.min(rate, bucket.tokens + (elapsed * rate) / MINUTE_MS);
135
+ }
136
+ //# sourceMappingURL=rate-limit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rate-limit.js","sourceRoot":"","sources":["../../src/service-credentials/rate-limit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,wEAAwE;AACxE,MAAM,cAAc,GAAG,IAAI,CAAC;AAmB5B,MAAM,OAAO,qBAAsB,SAAQ,gBAAgB;IACpC,MAAM;IAA3B,YAAqB,MAA8B;QACjD,KAAK,CACH,aAAa,EACb,oEAAoE,CACrE,CAAC;sBAJiB,MAAM;QAKzB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,kBAAkB;IASV,GAAG;IARL,UAAU,GAAG,IAAI,GAAG,EAAmB,CAAC;IACxC,WAAW,GAAG,IAAI,GAAG,EAAmB,CAAC;IACzC,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IACrC,cAAc,CAAS;IAChC,MAAM,CAAyB;IAEvC,YACE,MAA8B,EACb,GAAG,GAAiB,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,EACrD,OAAO,GAAyC,EAAE;mBADjC,GAAG;QAGpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,gBAAgB,CAAC;IACnE,CAA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,EAAE,CAAC;YACjC,IAAI,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,GAAG,cAAc,EAAE,CAAC;gBAC3D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QACD,IAAI,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,cAAc;YAAE,OAAO;QAC3C,IAAI,MAA0B,CAAC;QAC/B,IAAI,EAAE,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAClC,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC;YACjC,IAAI,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;gBACpB,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;gBAChB,MAAM,GAAG,GAAG,CAAC;YACf,CAAC;QACH,CAAC;QACD,IAAI,MAAM,KAAK,SAAS;YAAE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;CACF;AAED,SAAS,SAAS,CAChB,MAA2B,EAC3B,IAAY,EACZ,GAAW;IAEX,IAAI,IAAI,IAAI,CAAC;QAAE,OAAO,MAAM,CAAC,iBAAiB,CAAC;IAC/C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;AACtE,CAAC"}
package/lib/tool-kit.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { defineTool, } from "@deepseek-ai/dsh-tools";
2
2
  import { IntegrationError } from "./errors.js";
3
+ import { SERVICE_CEILING_NOTICE, serviceCeilingRefusedReading, } from "./providers/shared/service-boundary.js";
3
4
  const OUTPUT = {
4
5
  schema: {
5
6
  type: "object",
@@ -43,13 +44,20 @@ export function createToolKit(options) {
43
44
  * One tool = one catalog operation with a validated, read-only argument set.
44
45
  * No tool may accept a user, credential, integration or tenant selector.
45
46
  */
46
- const tool = (definition) => defineTool({
47
- name: definition.name,
48
- description: definition.description,
49
- parameters: definition.parameters,
50
- output: OUTPUT,
51
- execute: (args, exec) => run(exec, definition.operation, definition.input(args)),
52
- });
47
+ const tool = (definition) => {
48
+ const security = options.operations[definition.operation]?.security;
49
+ const warns = options.managedServiceCredentialsEnabled &&
50
+ serviceCeilingRefusedReading(security);
51
+ return defineTool({
52
+ name: definition.name,
53
+ description: warns
54
+ ? `${definition.description} ${SERVICE_CEILING_NOTICE}`
55
+ : definition.description,
56
+ parameters: definition.parameters,
57
+ output: OUTPUT,
58
+ execute: (args, exec) => run(exec, definition.operation, definition.input(args)),
59
+ });
60
+ };
53
61
  return { tool, run };
54
62
  }
55
63
  //# sourceMappingURL=tool-kit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-kit.js","sourceRoot":"","sources":["../src/tool-kit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,GAIX,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAK/C,MAAM,MAAM,GAAG;IACb,MAAM,EAAE;QACN,IAAI,EAAE,QAAiB;QACvB,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE;YACrD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE;YACtD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAiB;gBACvB,QAAQ,EAAE,IAAI;gBACd,oBAAoB,EAAE,IAAI;aAC3B;SACF;KACF;IACD,MAAM,EAAE,CACN,KAAc,EACd,KAA4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AAC,CAAC;IAEF,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACvB,CAAC"}
package/lib/tools.js CHANGED
@@ -6,9 +6,10 @@ import { createTestitTools, TESTIT_TOOL_NAMES, } from "./providers/testit/tools.
6
6
  import { createTeamcityTools, TEAMCITY_TOOL_NAMES, } from "./providers/teamcity/tools.js";
7
7
  import { createWeblateTools, WEBLATE_TOOL_NAMES, } from "./providers/weblate/tools.js";
8
8
  /**
9
- * Model-facing tool names of every enabled provider, in registration order. The
10
- * QA surface admits exactly these names as principal-scoped, so this list is the
11
- * single place where the tool surface is declared.
9
+ * Model-facing tool names of every provider the code knows about, in
10
+ * registration order. The QA surface admits exactly these names as
11
+ * principal-scoped, so this list is the single place where the tool surface is
12
+ * declared; `integrationToolNames` is what narrows it to one deployment.
12
13
  */
13
14
  export const INTEGRATION_TOOL_NAMES = [
14
15
  ...BITRIX24_TOOL_NAMES,
@@ -19,35 +20,59 @@ export const INTEGRATION_TOOL_NAMES = [
19
20
  ...TESTIT_TOOL_NAMES,
20
21
  ...WEBLATE_TOOL_NAMES,
21
22
  ];
23
+ /** The providers in mount order, each with the tool names it contributes. */
24
+ const TOOL_NAMES_BY_PROVIDER = [
25
+ ["bitrix24", BITRIX24_TOOL_NAMES],
26
+ ["confluence", CONFLUENCE_TOOL_NAMES],
27
+ ["gitlab", GITLAB_TOOL_NAMES],
28
+ ["teamcity", TEAMCITY_TOOL_NAMES],
29
+ ["jira", JIRA_TOOL_NAMES],
30
+ ["testit", TESTIT_TOOL_NAMES],
31
+ ["weblate", WEBLATE_TOOL_NAMES],
32
+ ];
22
33
  /**
23
- * The names to admit and mount for one deployment: the read-only catalog plus,
24
- * only when the operator switched it on, the Bitrix24 timeline comment. The
25
- * mount and the admission list must always be derived through this function so
26
- * the two cannot drift apart.
34
+ * The names to admit and mount for one deployment: the read-only catalog of the
35
+ * providers it enables plus, only when the operator switched it on, the Bitrix24
36
+ * timeline comment. The mount and the admission list must always be derived
37
+ * through this function so the two cannot drift apart.
27
38
  */
28
39
  export function integrationToolNames(options = {}) {
29
- if (options.bitrix24CrmCommentWrite !== true)
30
- return INTEGRATION_TOOL_NAMES;
31
- // The mounted list carries the comment tool at the end of the Bitrix24
32
- // block, where the provider module mounts it.
33
- const names = [...INTEGRATION_TOOL_NAMES];
34
- names.splice(BITRIX24_TOOL_NAMES.length, 0, BITRIX24_COMMENT_TOOL_NAME);
40
+ const enabled = options.enabledProviders;
41
+ const names = [];
42
+ for (const [providerId, providerNames] of TOOL_NAMES_BY_PROVIDER) {
43
+ if (enabled !== undefined && !enabled.includes(providerId))
44
+ continue;
45
+ names.push(...providerNames);
46
+ // The comment tool rides at the end of the Bitrix24 block, where the
47
+ // provider module mounts it.
48
+ if (providerId === "bitrix24" && options.bitrix24CrmCommentWrite === true) {
49
+ names.push(BITRIX24_COMMENT_TOOL_NAME);
50
+ }
51
+ }
35
52
  return names;
36
53
  }
37
54
  /** Provider tool modules, composed into one registration list. */
38
55
  export function createIntegrationTools(options) {
56
+ const enabled = options.enabledProviders;
57
+ const mounted = (providerId) => enabled === undefined || enabled.includes(providerId);
58
+ const shared = {
59
+ broker: options.broker,
60
+ principalForSession: options.principalForSession,
61
+ managedServiceCredentialsEnabled: options.managedServiceCredentialsEnabled === true,
62
+ };
39
63
  return [
40
- ...createBitrix24Tools({
41
- broker: options.broker,
42
- principalForSession: options.principalForSession,
43
- crmCommentWrite: options.bitrix24CrmCommentWrite === true,
44
- }),
45
- ...createConfluenceTools(options),
46
- ...createGitlabTools(options),
47
- ...createTeamcityTools(options),
48
- ...createJiraTools(options),
49
- ...createTestitTools(options),
50
- ...createWeblateTools(options),
64
+ ...(mounted("bitrix24")
65
+ ? createBitrix24Tools({
66
+ ...shared,
67
+ crmCommentWrite: options.bitrix24CrmCommentWrite === true,
68
+ })
69
+ : []),
70
+ ...(mounted("confluence") ? createConfluenceTools(shared) : []),
71
+ ...(mounted("gitlab") ? createGitlabTools(shared) : []),
72
+ ...(mounted("teamcity") ? createTeamcityTools(shared) : []),
73
+ ...(mounted("jira") ? createJiraTools(shared) : []),
74
+ ...(mounted("testit") ? createTestitTools(shared) : []),
75
+ ...(mounted("weblate") ? createWeblateTools(shared) : []),
51
76
  ];
52
77
  }
53
78
  //# sourceMappingURL=tools.js.map
package/lib/tools.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAWtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,GAAG,mBAAmB;IACtB,GAAG,qBAAqB;IACxB,GAAG,iBAAiB;IACpB,GAAG,mBAAmB;IACtB,GAAG,eAAe;IAClB,GAAG,iBAAiB;IACpB,GAAG,kBAAkB;CACb,CAAC;AAEX;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAO,GAA4D,EAAE;IAErE,IAAI,OAAO,CAAC,uBAAuB,KAAK,IAAI;QAAE,OAAO,sBAAsB,CAAC;IAC5E,uEAAuE;IACvE,8CAA8C;IAC9C,MAAM,KAAK,GAAa,CAAC,GAAG,sBAAsB,CAAC,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,mBAAmB,CAAC,M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