@yadsh/dsh-qa-integrations 0.5.0 → 0.6.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 (191) hide show
  1. package/README.md +431 -18
  2. package/compatibility.json +1 -1
  3. package/lib/broker.js +456 -9
  4. package/lib/broker.js.map +1 -1
  5. package/lib/client/bitrix24.js +2 -1
  6. package/lib/client/bitrix24.js.map +1 -1
  7. package/lib/client/card.js +8 -1
  8. package/lib/client/card.js.map +1 -1
  9. package/lib/client/confluence.js +3 -2
  10. package/lib/client/confluence.js.map +1 -1
  11. package/lib/client/gitlab.js +40 -4
  12. package/lib/client/gitlab.js.map +1 -1
  13. package/lib/client/index.js +13 -11
  14. package/lib/client/index.js.map +1 -1
  15. package/lib/client/integrations.js +39 -2
  16. package/lib/client/integrations.js.map +1 -1
  17. package/lib/client/jira.js +3 -2
  18. package/lib/client/jira.js.map +1 -1
  19. package/lib/client/provider-card.js +138 -4
  20. package/lib/client/provider-card.js.map +1 -1
  21. package/lib/client/styles.js +8 -5
  22. package/lib/client/styles.js.map +1 -1
  23. package/lib/client/teamcity.js +31 -4
  24. package/lib/client/teamcity.js.map +1 -1
  25. package/lib/client/testit.js +65 -0
  26. package/lib/client/testit.js.map +1 -0
  27. package/lib/client/weblate.js +70 -0
  28. package/lib/client/weblate.js.map +1 -0
  29. package/lib/client.js +2600 -480
  30. package/lib/client.js.map +1 -1
  31. package/lib/coerce.js +16 -7
  32. package/lib/coerce.js.map +1 -1
  33. package/lib/config.js +12 -0
  34. package/lib/config.js.map +1 -1
  35. package/lib/errors.js.map +1 -1
  36. package/lib/index.js +274 -28
  37. package/lib/index.js.map +1 -1
  38. package/lib/providers/bitrix24/catalog.js +13 -0
  39. package/lib/providers/bitrix24/catalog.js.map +1 -1
  40. package/lib/providers/bitrix24/config.js +3 -0
  41. package/lib/providers/bitrix24/config.js.map +1 -1
  42. package/lib/providers/bitrix24/credential-help.js +24 -0
  43. package/lib/providers/bitrix24/credential-help.js.map +1 -0
  44. package/lib/providers/bitrix24/index.js +9 -0
  45. package/lib/providers/bitrix24/index.js.map +1 -1
  46. package/lib/providers/bitrix24/operations.js +60 -1
  47. package/lib/providers/bitrix24/operations.js.map +1 -1
  48. package/lib/providers/bitrix24/tools.js +95 -3
  49. package/lib/providers/bitrix24/tools.js.map +1 -1
  50. package/lib/providers/confluence/credential-help.js +29 -0
  51. package/lib/providers/confluence/credential-help.js.map +1 -0
  52. package/lib/providers/confluence/index.js +9 -0
  53. package/lib/providers/confluence/index.js.map +1 -1
  54. package/lib/providers/gitlab/catalog.js +108 -15
  55. package/lib/providers/gitlab/catalog.js.map +1 -1
  56. package/lib/providers/gitlab/config.js +11 -3
  57. package/lib/providers/gitlab/config.js.map +1 -1
  58. package/lib/providers/gitlab/credential-help.js +33 -0
  59. package/lib/providers/gitlab/credential-help.js.map +1 -0
  60. package/lib/providers/gitlab/index.js +337 -6
  61. package/lib/providers/gitlab/index.js.map +1 -1
  62. package/lib/providers/jira/credential-help.js +31 -0
  63. package/lib/providers/jira/credential-help.js.map +1 -0
  64. package/lib/providers/jira/index.js +9 -0
  65. package/lib/providers/jira/index.js.map +1 -1
  66. package/lib/providers/registry.js +4 -0
  67. package/lib/providers/registry.js.map +1 -1
  68. package/lib/providers/shared/credential-help.js +29 -0
  69. package/lib/providers/shared/credential-help.js.map +1 -0
  70. package/lib/providers/shared/service-boundary.js +44 -0
  71. package/lib/providers/shared/service-boundary.js.map +1 -0
  72. package/lib/providers/teamcity/catalog.js +56 -2
  73. package/lib/providers/teamcity/catalog.js.map +1 -1
  74. package/lib/providers/teamcity/credential-help.js +25 -0
  75. package/lib/providers/teamcity/credential-help.js.map +1 -0
  76. package/lib/providers/teamcity/index.js +254 -2
  77. package/lib/providers/teamcity/index.js.map +1 -1
  78. package/lib/providers/testit/attachments.js +131 -0
  79. package/lib/providers/testit/attachments.js.map +1 -0
  80. package/lib/providers/testit/catalog.js +225 -0
  81. package/lib/providers/testit/catalog.js.map +1 -0
  82. package/lib/providers/testit/config.js +175 -0
  83. package/lib/providers/testit/config.js.map +1 -0
  84. package/lib/providers/testit/credential-help.js +29 -0
  85. package/lib/providers/testit/credential-help.js.map +1 -0
  86. package/lib/providers/testit/index.js +184 -0
  87. package/lib/providers/testit/index.js.map +1 -0
  88. package/lib/providers/testit/operations.js +1070 -0
  89. package/lib/providers/testit/operations.js.map +1 -0
  90. package/lib/providers/testit/tools.js +717 -0
  91. package/lib/providers/testit/tools.js.map +1 -0
  92. package/lib/providers/testit/transport.js +158 -0
  93. package/lib/providers/testit/transport.js.map +1 -0
  94. package/lib/providers/weblate/catalog.js +185 -0
  95. package/lib/providers/weblate/catalog.js.map +1 -0
  96. package/lib/providers/weblate/config.js +147 -0
  97. package/lib/providers/weblate/config.js.map +1 -0
  98. package/lib/providers/weblate/credential-help.js +26 -0
  99. package/lib/providers/weblate/credential-help.js.map +1 -0
  100. package/lib/providers/weblate/index.js +181 -0
  101. package/lib/providers/weblate/index.js.map +1 -0
  102. package/lib/providers/weblate/operations.js +703 -0
  103. package/lib/providers/weblate/operations.js.map +1 -0
  104. package/lib/providers/weblate/query.js +80 -0
  105. package/lib/providers/weblate/query.js.map +1 -0
  106. package/lib/providers/weblate/tools.js +408 -0
  107. package/lib/providers/weblate/tools.js.map +1 -0
  108. package/lib/providers/weblate/transport.js +179 -0
  109. package/lib/providers/weblate/transport.js.map +1 -0
  110. package/lib/repository.js +197 -13
  111. package/lib/repository.js.map +1 -1
  112. package/lib/service-credentials/config.js +179 -0
  113. package/lib/service-credentials/config.js.map +1 -0
  114. package/lib/service-credentials/policy.js +92 -0
  115. package/lib/service-credentials/policy.js.map +1 -0
  116. package/lib/service-credentials/registry.js +142 -0
  117. package/lib/service-credentials/registry.js.map +1 -0
  118. package/lib/service-credentials/state.js +30 -0
  119. package/lib/service-credentials/state.js.map +1 -0
  120. package/lib/service-credentials/types.js +20 -0
  121. package/lib/service-credentials/types.js.map +1 -0
  122. package/lib/tools.js +27 -2
  123. package/lib/tools.js.map +1 -1
  124. package/lib/typert.host.js +1187 -39
  125. package/lib/typert.remote-client.d.ts +37 -5
  126. package/lib/typert.remote-client.js +1057 -33
  127. package/lib/types/broker.d.ts +70 -4
  128. package/lib/types/client/bitrix24.d.ts +1 -1
  129. package/lib/types/client/card.d.ts +3 -1
  130. package/lib/types/client/confluence.d.ts +2 -2
  131. package/lib/types/client/gitlab.d.ts +15 -2
  132. package/lib/types/client/index.d.ts +3 -2
  133. package/lib/types/client/integrations.d.ts +11 -2
  134. package/lib/types/client/jira.d.ts +2 -2
  135. package/lib/types/client/provider-card.d.ts +50 -8
  136. package/lib/types/client/styles.d.ts +4 -3
  137. package/lib/types/client/teamcity.d.ts +15 -2
  138. package/lib/types/client/testit.d.ts +15 -0
  139. package/lib/types/client/weblate.d.ts +15 -0
  140. package/lib/types/coerce.d.ts +2 -2
  141. package/lib/types/config.d.ts +21 -0
  142. package/lib/types/errors.d.ts +9 -1
  143. package/lib/types/index.d.ts +108 -11
  144. package/lib/types/providers/bitrix24/catalog.d.ts +1 -1
  145. package/lib/types/providers/bitrix24/config.d.ts +11 -1
  146. package/lib/types/providers/bitrix24/credential-help.d.ts +8 -0
  147. package/lib/types/providers/bitrix24/index.d.ts +5 -0
  148. package/lib/types/providers/bitrix24/tools.d.ts +4 -0
  149. package/lib/types/providers/confluence/credential-help.d.ts +9 -0
  150. package/lib/types/providers/confluence/index.d.ts +5 -0
  151. package/lib/types/providers/contract.d.ts +62 -1
  152. package/lib/types/providers/gitlab/catalog.d.ts +20 -5
  153. package/lib/types/providers/gitlab/config.d.ts +14 -3
  154. package/lib/types/providers/gitlab/credential-help.d.ts +9 -0
  155. package/lib/types/providers/gitlab/index.d.ts +51 -1
  156. package/lib/types/providers/jira/credential-help.d.ts +8 -0
  157. package/lib/types/providers/jira/index.d.ts +5 -0
  158. package/lib/types/providers/registry.d.ts +2 -0
  159. package/lib/types/providers/shared/credential-help.d.ts +17 -0
  160. package/lib/types/providers/shared/service-boundary.d.ts +25 -0
  161. package/lib/types/providers/teamcity/catalog.d.ts +18 -2
  162. package/lib/types/providers/teamcity/credential-help.d.ts +8 -0
  163. package/lib/types/providers/teamcity/index.d.ts +53 -2
  164. package/lib/types/providers/testit/attachments.d.ts +20 -0
  165. package/lib/types/providers/testit/catalog.d.ts +75 -0
  166. package/lib/types/providers/testit/config.d.ts +61 -0
  167. package/lib/types/providers/testit/credential-help.d.ts +8 -0
  168. package/lib/types/providers/testit/index.d.ts +60 -0
  169. package/lib/types/providers/testit/operations.d.ts +95 -0
  170. package/lib/types/providers/testit/tools.d.ts +15 -0
  171. package/lib/types/providers/testit/transport.d.ts +67 -0
  172. package/lib/types/providers/weblate/catalog.d.ts +43 -0
  173. package/lib/types/providers/weblate/config.d.ts +57 -0
  174. package/lib/types/providers/weblate/credential-help.d.ts +9 -0
  175. package/lib/types/providers/weblate/index.d.ts +50 -0
  176. package/lib/types/providers/weblate/operations.d.ts +77 -0
  177. package/lib/types/providers/weblate/query.d.ts +37 -0
  178. package/lib/types/providers/weblate/tools.d.ts +15 -0
  179. package/lib/types/providers/weblate/transport.d.ts +60 -0
  180. package/lib/types/repository.d.ts +38 -3
  181. package/lib/types/service-credentials/config.d.ts +73 -0
  182. package/lib/types/service-credentials/policy.d.ts +44 -0
  183. package/lib/types/service-credentials/registry.d.ts +43 -0
  184. package/lib/types/service-credentials/state.d.ts +14 -0
  185. package/lib/types/service-credentials/types.d.ts +97 -0
  186. package/lib/types/tools.d.ts +10 -1
  187. package/lib/types/types.d.ts +114 -10
  188. package/package.json +7 -7
  189. package/lib/shared/settings.js +0 -19
  190. package/lib/shared/settings.js.map +0 -1
  191. package/lib/types/shared/settings.d.ts +0 -19
@@ -1,13 +1,12 @@
1
1
  import type { Context } from "@deepseek-ai/cordis";
2
2
  import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
3
- import z from "@deepseek-ai/schemastery";
4
3
  import type { QaSurface } from "@yadsh/dsh-qa-surface";
5
4
  import { IntegrationBroker } from "./broker.js";
6
5
  import { type QaIntegrationsConfig } from "./config.js";
7
- import type { CredentialInput, IntegrationInstanceSummary, IntegrationProviderId, IntegrationProviderSummary, IntegrationSummary, PolicyPatch } from "./types.js";
6
+ import type { CredentialInput, CredentialSource, IntegrationInstanceSummary, ServiceCredentialHealth, IntegrationProviderId, IntegrationProviderSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "./types.js";
8
7
  export declare const name = "dsh-qa-integrations";
9
8
  export declare const inject: readonly ["qaSurface", "tools"];
10
- export declare const Config: z<QaIntegrationsConfig>;
9
+ export declare const Config: import("@deepseek-ai/schemastery").default<QaIntegrationsConfig>;
11
10
  type IntegrationsContext = Context & {
12
11
  readonly qaSurface: QaSurface;
13
12
  };
@@ -19,10 +18,15 @@ declare module "@deepseek-ai/cordis" {
19
18
  /** Host remote, broker owner, and registration point for read-only tools. */
20
19
  export declare class QaIntegrations extends TypertRemoteService {
21
20
  static inject: readonly ["qaSurface", "tools"];
22
- static Config: z<QaIntegrationsConfig>;
21
+ static Config: import("@deepseek-ai/schemastery").default<QaIntegrationsConfig>;
23
22
  readonly broker: IntegrationBroker;
24
23
  private readonly logger;
25
24
  private readonly enabled;
25
+ /** Providers by id; the service-credential registry resolves through them. */
26
+ private readonly providerRegistry;
27
+ /** Absent unless the deployment configured managed service credentials. */
28
+ private readonly serviceCredentials;
29
+ private readonly defaultForNewConnections;
26
30
  private readonly providerSummaries;
27
31
  private readonly configuredInstances;
28
32
  /** The Confluence sites this deployment dials, for the connect form. */
@@ -31,6 +35,10 @@ export declare class QaIntegrations extends TypertRemoteService {
31
35
  private readonly configuredJiraSites;
32
36
  /** The TeamCity server this deployment dials, or null when it mounts none. */
33
37
  private readonly configuredServer;
38
+ /** The Test IT installations this deployment allows, in config order. */
39
+ private readonly configuredTestitInstances;
40
+ /** The Weblate instances this deployment allows, in config order. */
41
+ private readonly configuredWeblateInstances;
34
42
  constructor(ctx: IntegrationsContext, rawConfig?: QaIntegrationsConfig);
35
43
  describe(): {
36
44
  readonly enabled: boolean;
@@ -53,6 +61,8 @@ export declare class QaIntegrations extends TypertRemoteService {
53
61
  putGitlabCredential(token: string, input: {
54
62
  readonly instanceId: string;
55
63
  readonly token: string;
64
+ /** Whether the connect form asked for the managed credential instead. */
65
+ readonly useServiceCredential?: boolean | undefined;
56
66
  }): Promise<IntegrationSummary>;
57
67
  testGitlab(token: string): Promise<IntegrationSummary>;
58
68
  patchGitlabPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
@@ -86,6 +96,8 @@ export declare class QaIntegrations extends TypertRemoteService {
86
96
  */
87
97
  putTeamcityCredential(token: string, input: {
88
98
  readonly token: string;
99
+ /** Whether the connect form asked for the managed credential instead. */
100
+ readonly useServiceCredential?: boolean | undefined;
89
101
  }): Promise<IntegrationSummary>;
90
102
  /**
91
103
  * The address the connect form shows next to the token field, or null when
@@ -113,21 +125,92 @@ export declare class QaIntegrations extends TypertRemoteService {
113
125
  testJira(token: string): Promise<IntegrationSummary>;
114
126
  patchJiraPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
115
127
  disconnectJira(token: string): boolean;
128
+ /**
129
+ * Installations this deployment allows. Like the GitLab instance list, the
130
+ * connect form picks from it and never takes a hostname: the Test IT address a
131
+ * token is spent against is operator configuration.
132
+ */
133
+ testitInstances(token: string): readonly IntegrationInstanceSummary[];
134
+ getTestit(token: string): IntegrationSummary;
135
+ putTestitCredential(token: string, input: {
136
+ readonly instanceId: string;
137
+ readonly token: string;
138
+ }): Promise<IntegrationSummary>;
139
+ testTestit(token: string): Promise<IntegrationSummary>;
140
+ patchTestitPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
141
+ disconnectTestit(token: string): boolean;
142
+ /**
143
+ * Instances this deployment allows. The connect form picks from this list and
144
+ * never takes a hostname, which is what keeps the broker from being pointed at
145
+ * an origin the operator did not configure.
146
+ */
147
+ weblateInstances(token: string): readonly IntegrationInstanceSummary[];
148
+ getWeblate(token: string): IntegrationSummary;
149
+ putWeblateCredential(token: string, input: {
150
+ readonly instanceId: string;
151
+ readonly token: string;
152
+ }): Promise<IntegrationSummary>;
153
+ testWeblate(token: string): Promise<IntegrationSummary>;
154
+ patchWeblatePolicy(token: string, patch: PolicyPatch): IntegrationSummary;
155
+ disconnectWeblate(token: string): boolean;
156
+ /**
157
+ * Whether this deployment offers managed service credentials at all, and
158
+ * whether a new connection starts on one. Token-gated like every other card
159
+ * call: the answer describes the deployment, not the caller.
160
+ */
161
+ managedServiceCredentials(token: string): {
162
+ readonly enabled: boolean;
163
+ readonly defaultForNewConnections: boolean;
164
+ };
165
+ /**
166
+ * Switch one provider of the calling principal between their own credential
167
+ * and the deployment's. The provider id is validated against the registry, and
168
+ * the profile is resolved server-side, so no caller can name a credential.
169
+ */
170
+ credentialSource(token: string, input: {
171
+ readonly provider: IntegrationProviderId;
172
+ readonly source: CredentialSource;
173
+ }): Promise<IntegrationSummary>;
174
+ /**
175
+ * Narrow what this connection may read inside the profile's allowlist. A
176
+ * selection outside that allowlist is dropped rather than stored, so this can
177
+ * only ever remove.
178
+ */
179
+ serviceBoundary(token: string, input: {
180
+ readonly provider: IntegrationProviderId;
181
+ readonly selection: IntegrationServiceBoundary | null;
182
+ }): IntegrationSummary;
183
+ /**
184
+ * Probe the managed credential of one provider instance. Answers a health
185
+ * status, never the secret and never the upstream identity it carries.
186
+ */
187
+ serviceHealth(token: string, input: {
188
+ readonly provider: IntegrationProviderId;
189
+ readonly instanceId: string;
190
+ }): Promise<ServiceCredentialHealth | null>;
191
+ /** The safe alias of the managed credential bound to one instance, if any. */
192
+ private serviceBinding;
116
193
  private requirePrincipal;
117
194
  private run;
118
195
  private runAsync;
119
196
  }
120
197
  export { IntegrationBroker } from "./broker.js";
121
198
  export { ConfigSchema, resolveConfig, type QaIntegrationsConfig, type ResolvedQaIntegrationsConfig, } from "./config.js";
199
+ export { MANAGED_SERVICE_CREDENTIALS_DEFAULTS, managedServiceCredentialsSchema, resolveManagedServiceCredentials, type ManagedServiceCredentialProfileConfig, type ManagedServiceCredentialProfileInput, type ManagedServiceCredentialsConfig, type ManagedServiceCredentialsInput, } from "./service-credentials/config.js";
200
+ export { evaluateServiceOperation, narrowBoundary, SERVICE_CEILING, type ServiceOperationQuery, type ServicePolicyDecision, } from "./service-credentials/policy.js";
201
+ export { ServiceCredentialRegistry } from "./service-credentials/registry.js";
202
+ export { operationCapabilityServiceState } from "./service-credentials/state.js";
203
+ export { profilePolicyRevision } from "./service-credentials/config.js";
204
+ export { CREDENTIAL_SOURCES, isCredentialSource, UNCLASSIFIED_OPERATION, type CredentialSource as ManagedCredentialSource, type DataSensitivity, type OperationEffect, type OperationSecurityMetadata, type OperationServiceDecision, type ResolvedCredentialContext, type ResolvedServiceCredential, type SafeExternalIdentity, type ServiceCredentialHealth, type ServiceCredentialProfile, type ServiceCredentialStatus, type ServiceResourceBoundary, } from "./service-credentials/types.js";
122
205
  export { IntegrationError } from "./errors.js";
123
206
  export { BITRIX_CAPABILITIES, BITRIX_OPERATIONS, BITRIX24_CAPABILITY_INFO, bitrix24OperationCapability, enabledCapabilities, type Bitrix24Capability, type Bitrix24CapabilityDefinition, type BitrixOperationDefinition, } from "./providers/bitrix24/catalog.js";
124
207
  export { BITRIX24_DEFAULTS, bitrix24ConfigSchema, resolveBitrix24Config, type Bitrix24Flags, } from "./providers/bitrix24/config.js";
125
208
  export { Bitrix24Provider, parseBitrixWebhook, } from "./providers/bitrix24/index.js";
126
209
  export { BITRIX_HANDLERS, BITRIX_PROJECTIONS, } from "./providers/bitrix24/operations.js";
127
210
  export { createBitrix24Tools, BITRIX24_TOOL_NAMES, } from "./providers/bitrix24/tools.js";
128
- export { GitlabProvider } from "./providers/gitlab/index.js";
129
- export { GITLAB_CAPABILITIES, GITLAB_CAPABILITY_INFO, GITLAB_OPERATIONS, capabilitiesForScopes, gitlabOperationCapability, type GitlabCapability, type GitlabCapabilityDefinition, type GitlabOperationDefinition, } from "./providers/gitlab/catalog.js";
130
- export { GITLAB_DEFAULTS, gitlabConfigSchema, resolveGitlabConfig, type GitlabFlags, type GitlabInstance, } from "./providers/gitlab/config.js";
211
+ export { GitlabProvider, groupAllowed as gitlabGroupAllowed, projectAllowed as gitlabProjectAllowed, } from "./providers/gitlab/index.js";
212
+ export { GITLAB_CAPABILITIES, GITLAB_CAPABILITY_INFO, GITLAB_CI_SPLIT_CAPABILITIES, GITLAB_LEGACY_CI_CAPABILITY, GITLAB_OPERATIONS, GITLAB_RESOURCE_KIND, capabilitiesForScopes, gitlabOperationCapability, gitlabOperationMetadata, type GitlabCapability, type GitlabCapabilityDefinition, type GitlabOperationDefinition, } from "./providers/gitlab/catalog.js";
213
+ export { GITLAB_DEFAULTS, gitlabConfigSchema, resolveGitlabConfig, type GitlabConfigInput, type GitlabFlags, type GitlabInstance, } from "./providers/gitlab/config.js";
131
214
  export { createGitlabTools, GITLAB_TOOL_NAMES, } from "./providers/gitlab/tools.js";
132
215
  export { GitlabTransport, credentialFromPlaintext as gitlabCredentialFromPlaintext, credentialInstance, type GitlabCredential, } from "./providers/gitlab/transport.js";
133
216
  export { GITLAB_HANDLERS, GITLAB_PROJECTIONS, } from "./providers/gitlab/operations.js";
@@ -139,8 +222,8 @@ export { buildCql, cqlLiteral, CONTENT_TYPES, ORDER_BY, type ConfluenceOrder, ty
139
222
  export { COMMENT_KINDS, CONFLUENCE_HANDLERS, CONFLUENCE_PROJECTIONS, DEFAULT_LIMIT, bodyLimit, commentChildrenPath, commentCollections, commentKind, commentPath, commentReplies, isNumericSpace, modifiedAfterDate, numericId, offsetCursor, pageLimit, plainExcerpt, spaceRef, upstreamCursor, type ConfluenceCommentKind, type ConfluenceProjection, type ConfluenceProjectionContext, type ConfluenceRequest, } from "./providers/confluence/operations.js";
140
223
  export { createConfluenceTools, CONFLUENCE_TOOL_NAMES, } from "./providers/confluence/tools.js";
141
224
  export { ConfluenceTransport, credentialFromPlaintext as confluenceCredentialFromPlaintext, credentialInstance as confluenceCredentialInstance, type ConfluenceCredential, } from "./providers/confluence/transport.js";
142
- export { TeamcityProvider } from "./providers/teamcity/index.js";
143
- export { TEAMCITY_CAPABILITIES, TEAMCITY_CAPABILITY_INFO, TEAMCITY_OPERATIONS, TEAMCITY_STREAM_OPERATIONS, enabledCapabilities as enabledTeamcityCapabilities, teamcityOperationCapability, type TeamCityCapability, type TeamCityCapabilityDefinition, type TeamCityOperationDefinition, } from "./providers/teamcity/catalog.js";
225
+ export { TeamcityProvider, buildTypeAllowed as teamcityBuildTypeAllowed, projectAllowed as teamcityProjectAllowed, } from "./providers/teamcity/index.js";
226
+ export { TEAMCITY_CAPABILITIES, TEAMCITY_CAPABILITY_INFO, TEAMCITY_INSTANCE_ID, TEAMCITY_OPERATIONS, TEAMCITY_RESOURCE_KIND, TEAMCITY_STREAM_OPERATIONS, enabledCapabilities as enabledTeamcityCapabilities, teamcityOperationCapability, teamcityOperationMetadata, type TeamCityCapability, type TeamCityCapabilityDefinition, type TeamCityOperationDefinition, } from "./providers/teamcity/catalog.js";
144
227
  export { TEAMCITY_DEFAULTS, DEFAULT_LOG_LINES, resolveTeamCityConfig, teamcityConfigSchema, type TeamCityConfigInput, type TeamCityFlags, } from "./providers/teamcity/config.js";
145
228
  export { artifactBinaryProblem, artifactByteLimit, artifactPath, textArtifact, type ArtifactPath, } from "./providers/teamcity/artifacts.js";
146
229
  export { LOG_MODES, logLines, logMode, sanitizeLog, selectLogWindow, trimToBytes, type LogMode, type LogWindow, } from "./providers/teamcity/logs.js";
@@ -157,13 +240,27 @@ export { buildJql, commentLimit, commentStart, issueKey as jiraIssueKey, jqlDate
157
240
  export { ISSUE_INCLUDES, JIRA_HANDLERS, JIRA_PROJECTIONS, SEARCH_FIELDS as JIRA_SEARCH_FIELDS, customFieldValue, issueFields, issueUrl, requestedIncludes, wantsFieldNames, type JiraProjection, } from "./providers/jira/operations.js";
158
241
  export { JiraTransport, basicAuthorization, credentialFromPlaintext as jiraCredentialFromPlaintext, credentialSite, type JiraCredential, } from "./providers/jira/transport.js";
159
242
  export { createJiraTools, JIRA_TOOL_NAMES } from "./providers/jira/tools.js";
243
+ export { TestitProvider } from "./providers/testit/index.js";
244
+ export { TESTIT_CAPABILITIES, TESTIT_CAPABILITY_INFO, TESTIT_OPERATIONS, enabledCapabilities as enabledTestitCapabilities, testitOperationCapability, type TestitCapability, type TestitCapabilityDefinition, type TestitListKind, type TestitOperationDefinition, } from "./providers/testit/catalog.js";
245
+ export { TESTIT_DEFAULTS, resolveTestitConfig, testitConfigSchema, testitInstance, type TestitFlags, type TestitInstance, } from "./providers/testit/config.js";
246
+ export { assertReadableSize, attachmentBinaryProblem, attachmentByteLimit, attachmentExtension, attachmentName, } from "./providers/testit/attachments.js";
247
+ export { RESULT_OUTCOMES, TESTIT_HANDLERS, TESTIT_LIMITS, TESTIT_PROJECTIONS, TEST_RUN_STATES, WORK_ITEM_ENTITY_TYPES, WORK_ITEM_PRIORITIES, WORK_ITEM_STATES, bounded as testitBounded, capped, contentBlock as testitContentBlock, listLimit as testitListLimit, listOffset as testitListOffset, paged, type TestitProjection, type TestitProjectionContext, type TestitRequest, } from "./providers/testit/operations.js";
248
+ export { TestitTransport, credentialFromPlaintext as testitCredentialFromPlaintext, credentialInstance as testitCredentialInstance, type TestitCredential, type TestitPage, } from "./providers/testit/transport.js";
249
+ export { createTestitTools, TESTIT_TOOL_NAMES, } from "./providers/testit/tools.js";
250
+ export { WeblateProvider } from "./providers/weblate/index.js";
251
+ export { WEBLATE_CAPABILITIES, WEBLATE_CAPABILITY_INFO, WEBLATE_OPERATIONS, enabledCapabilities as weblateEnabledCapabilities, weblateOperationCapability, type WeblateCapability, type WeblateCapabilityDefinition, type WeblateOperationDefinition, } from "./providers/weblate/catalog.js";
252
+ export { WEBLATE_DEFAULTS, resolveWeblateConfig, weblateConfigSchema, weblateInstance, type WeblateFlags, type WeblateInstance, } from "./providers/weblate/config.js";
253
+ export { WEBLATE_HANDLERS, WEBLATE_PROJECTIONS, WEBLATE_UNTRUSTED_OPERATIONS, accountFromUsers, componentRef, projectRef as weblateProjectRef, sameOriginUrl, translationRef as weblateTranslationRef, unitState as weblateUnitState, type WeblateProjection, type WeblateProjectionContext, } from "./providers/weblate/operations.js";
254
+ export { FAILING_CHECK_CLAUSE, UNIT_STATE_FILTERS, UNIT_TEXT_FIELDS, buildUnitQuery, exactClause as weblateExactClause, quoteQueryValue, stateClause as weblateStateClause, textClause as weblateTextClause, type UnitStateFilter, type UnitTextField, } from "./providers/weblate/query.js";
255
+ export { WeblateTransport, credentialFromPlaintext as weblateCredentialFromPlaintext, credentialInstance as weblateCredentialInstance, resultsOf, type WeblateCredential, } from "./providers/weblate/transport.js";
256
+ export { createWeblateTools, WEBLATE_TOOL_NAMES, } from "./providers/weblate/tools.js";
160
257
  export { IntegrationProviderRegistry } from "./providers/registry.js";
258
+ export { serviceBoundaryOf, serviceResourceDenied, } from "./providers/shared/service-boundary.js";
161
259
  export { IntegrationRepository } from "./repository.js";
162
260
  export { DockerSecretKeyProvider, MemoryKeyProvider, type KeyProvider, } from "./secrets/key-provider.js";
163
261
  export { SecretStore } from "./secrets/secret-store.js";
164
- export { QA_INTEGRATIONS_SETTINGS_NAMESPACE } from "./shared/settings.js";
165
262
  export { createToolKit, type ToolKitOptions } from "./tool-kit.js";
166
- export { createIntegrationTools, INTEGRATION_TOOL_NAMES } from "./tools.js";
263
+ export { createIntegrationTools, INTEGRATION_TOOL_NAMES, integrationToolNames, } from "./tools.js";
167
264
  export type * from "./types.js";
168
265
  export { BitrixTransport, credentialFromPlaintext, type BitrixCredential, } from "./providers/bitrix24/transport.js";
169
266
  export default QaIntegrations;
@@ -9,7 +9,7 @@ import type { Bitrix24Flags } from "./config.js";
9
9
  * Labels live here so the host, the Settings card, and package verification all
10
10
  * describe a capability the same way.
11
11
  */
12
- export type Bitrix24Capability = "crm.read" | "chat.read" | "openlines.read" | "user.read" | "department.read" | "tasks.read" | "calendar.read" | "disk.read";
12
+ export type Bitrix24Capability = "crm.read" | "crm.comment.write" | "chat.read" | "openlines.read" | "user.read" | "department.read" | "tasks.read" | "calendar.read" | "disk.read";
13
13
  export interface Bitrix24CapabilityDefinition {
14
14
  readonly capability: Bitrix24Capability;
15
15
  readonly flag: Exclude<keyof Bitrix24Flags, "enabled">;
@@ -3,11 +3,19 @@ import z from "@deepseek-ai/schemastery";
3
3
  * Deployment switches for the Bitrix24 provider. Every read scope is on by
4
4
  * default: a capability is offered to the agent only when the connected webhook
5
5
  * was actually granted the matching Bitrix24 scope, so these switches bound what
6
- * this deployment allows, they do not grant it.
6
+ * this deployment allows, they do not grant it. The write switch
7
+ * (`crmCommentWrite`) is off by default and rides the same `crm` scope the read
8
+ * switch uses — Bitrix24 has no read-only webhook scope.
7
9
  */
8
10
  export interface Bitrix24Flags {
9
11
  readonly enabled: boolean;
10
12
  readonly crmRead: boolean;
13
+ /**
14
+ * Mounts the provider's only write tool, the timeline comment. A `crm`-scoped
15
+ * webhook can write on its own, so this switch — not the scope probe — is
16
+ * what bounds the deployment; the capability also starts policy-denied.
17
+ */
18
+ readonly crmCommentWrite: boolean;
11
19
  readonly chatRead: boolean;
12
20
  readonly openlinesRead: boolean;
13
21
  readonly userRead: boolean;
@@ -21,6 +29,7 @@ export declare const BITRIX24_DEFAULTS: Bitrix24Flags;
21
29
  export declare const bitrix24ConfigSchema: z<Schemastery.ObjectS<{
22
30
  enabled: z<boolean, boolean>;
23
31
  crmRead: z<boolean, boolean>;
32
+ crmCommentWrite: z<boolean, boolean>;
24
33
  chatRead: z<boolean, boolean>;
25
34
  openlinesRead: z<boolean, boolean>;
26
35
  userRead: z<boolean, boolean>;
@@ -31,6 +40,7 @@ export declare const bitrix24ConfigSchema: z<Schemastery.ObjectS<{
31
40
  }>, Schemastery.ObjectT<{
32
41
  enabled: z<boolean, boolean>;
33
42
  crmRead: z<boolean, boolean>;
43
+ crmCommentWrite: z<boolean, boolean>;
34
44
  chatRead: z<boolean, boolean>;
35
45
  openlinesRead: z<boolean, boolean>;
36
46
  userRead: z<boolean, boolean>;
@@ -0,0 +1,8 @@
1
+ import type { CredentialHelp } from "@yadsh/dsh-plugin-kit";
2
+ /**
3
+ * How a Bitrix24 connection is obtained. There is no token page to link: the
4
+ * credential *is* the incoming webhook address of the user's own portal, so the
5
+ * help explains the mechanism and points at the vendor documentation.
6
+ */
7
+ export declare const BITRIX24_CREDENTIAL_HELP: CredentialHelp;
8
+ //# sourceMappingURL=credential-help.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { type CredentialHelp } from "@yadsh/dsh-plugin-kit";
1
2
  import type { ResolvedQaIntegrationsConfig } from "../../config.js";
2
3
  import type { IntegrationCapability, IntegrationCapabilityInfo, ProviderValidation } from "../../types.js";
3
4
  import type { IntegrationProvider, ProviderContext } from "../contract.js";
@@ -10,6 +11,10 @@ export declare class Bitrix24Provider implements IntegrationProvider {
10
11
  /** What this deployment allows; the webhook scope probe narrows it per user. */
11
12
  readonly capabilities: readonly IntegrationCapability[];
12
13
  readonly capabilityInfo: Readonly<Record<IntegrationCapability, IntegrationCapabilityInfo>>;
14
+ /** Where the settings card says this provider's credential comes from. */
15
+ readonly credentialHelp: CredentialHelp | null;
16
+ /** Overrides the deployment got wrong; reported once at startup, never fatal. */
17
+ readonly credentialHelpProblems: readonly string[];
13
18
  private readonly transport;
14
19
  constructor(config: ResolvedQaIntegrationsConfig, fetcher?: typeof fetch);
15
20
  /** Keep only the secret part of an operator-supplied webhook URL. */
@@ -2,8 +2,12 @@ import type { ToolDefinition } from "@deepseek-ai/dsh-tools";
2
2
  import type { IntegrationBroker } from "../../broker.js";
3
3
  import type { IntegrationPrincipal } from "../../types.js";
4
4
  export declare const BITRIX24_TOOL_NAMES: readonly ["bitrix_search_crm", "bitrix_get_crm_item", "bitrix_get_crm_fields", "bitrix_get_crm_funnels", "bitrix_get_crm_statuses", "bitrix_get_crm_activities", "bitrix_get_crm_activity", "bitrix_get_crm_timeline", "bitrix_get_crm_stage_history", "bitrix_get_crm_product_rows", "bitrix_find_crm_duplicates", "bitrix_get_crm_requisites", "bitrix_get_call_transcript", "bitrix_get_current_user", "bitrix_search_users", "bitrix_get_departments", "bitrix_get_user_fields", "bitrix_search_chats", "bitrix_get_chat_messages", "bitrix_search_chat_messages", "bitrix_get_recent_chats", "bitrix_search_chat_users", "bitrix_find_chat", "bitrix_get_chat_participants", "bitrix_get_chat_user_data", "bitrix_get_openline_dialog", "bitrix_get_openline_history", "bitrix_search_tasks", "bitrix_get_task", "bitrix_get_task_history", "bitrix_get_task_results", "bitrix_get_task_elapsed_time", "bitrix_get_calendar_events", "bitrix_get_calendar_accessibility", "bitrix_search_files", "bitrix_get_file", "bitrix_get_drives", "bitrix_get_storage_items", "bitrix_get_folder_items"];
5
+ /** The provider's single write tool; mounted only when the operator opts in. */
6
+ export declare const BITRIX24_COMMENT_TOOL_NAME: "bitrix_add_crm_timeline_comment";
5
7
  export declare function createBitrix24Tools(options: {
6
8
  readonly broker: IntegrationBroker;
7
9
  readonly principalForSession: (sessionId: string) => IntegrationPrincipal | undefined;
10
+ /** Mount the timeline-comment write tool; default stays read-only. */
11
+ readonly crmCommentWrite?: boolean;
8
12
  }): readonly ToolDefinition[];
9
13
  //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1,9 @@
1
+ import type { CredentialHelp } from "@yadsh/dsh-plugin-kit";
2
+ /**
3
+ * Confluence authenticates with an Atlassian API token next to the account
4
+ * e-mail, and the token is account-wide: the same one opens Jira and the other
5
+ * Atlassian Cloud products, so the scopes are about the account rather than
6
+ * about Confluence alone.
7
+ */
8
+ export declare const CONFLUENCE_CREDENTIAL_HELP: CredentialHelp;
9
+ //# sourceMappingURL=credential-help.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { type CredentialHelp } from "@yadsh/dsh-plugin-kit";
1
2
  import type { ResolvedQaIntegrationsConfig } from "../../config.js";
2
3
  import type { IntegrationCapability, IntegrationCapabilityInfo, ProviderValidation } from "../../types.js";
3
4
  import type { IntegrationProvider, ProviderContext } from "../contract.js";
@@ -15,6 +16,10 @@ export declare class ConfluenceProvider implements IntegrationProvider {
15
16
  */
16
17
  readonly capabilities: readonly IntegrationCapability[];
17
18
  readonly capabilityInfo: Readonly<Record<IntegrationCapability, IntegrationCapabilityInfo>>;
19
+ /** Where the settings card says this provider's credential comes from. */
20
+ readonly credentialHelp: CredentialHelp | null;
21
+ /** Overrides the deployment got wrong; reported once at startup, never fatal. */
22
+ readonly credentialHelpProblems: readonly string[];
18
23
  private readonly transport;
19
24
  constructor(config: ResolvedQaIntegrationsConfig, fetcher?: typeof fetch);
20
25
  /**
@@ -1,4 +1,6 @@
1
- import type { IntegrationCapability, IntegrationCapabilityInfo, IntegrationProviderId, ProviderValidation } from "../types.js";
1
+ import type { CredentialHelp } from "@yadsh/dsh-plugin-kit";
2
+ import type { ServiceCredentialHealth, ServiceResourceBoundary, CredentialSource, OperationSecurityMetadata } from "../service-credentials/types.js";
3
+ import type { CapabilityServiceState, IntegrationCapability, IntegrationCapabilityInfo, IntegrationProviderId, ProviderValidation } from "../types.js";
2
4
  export interface ProviderContext {
3
5
  readonly credential: string;
4
6
  /**
@@ -6,6 +8,20 @@ export interface ProviderContext {
6
8
  * Resolved server-side, never a model argument; it backs "mine" defaults.
7
9
  */
8
10
  readonly externalUserId?: string | undefined;
11
+ /**
12
+ * Which credential the broker resolved for this call. A provider that supports
13
+ * managed service credentials must treat `service` as a different upstream
14
+ * identity: answers may be attributed to the deployment, not to the user.
15
+ */
16
+ readonly credentialSource?: CredentialSource | undefined;
17
+ /**
18
+ * Boundary every resource this call touches has to stay inside. The broker
19
+ * sets it exactly when the call runs on a managed credential, and a provider
20
+ * that supports service mode fails closed rather than reading outside it —
21
+ * including when the operation is addressed by an opaque id that has to be
22
+ * mapped to a resource first.
23
+ */
24
+ readonly resourceBoundary?: ServiceResourceBoundary | undefined;
9
25
  }
10
26
  export interface IntegrationProvider {
11
27
  readonly id: IntegrationProviderId;
@@ -13,6 +29,17 @@ export interface IntegrationProvider {
13
29
  readonly capabilities: readonly IntegrationCapability[];
14
30
  /** Labels and hints for `capabilities`, so clients need no provider catalog. */
15
31
  readonly capabilityInfo: Readonly<Record<IntegrationCapability, IntegrationCapabilityInfo>>;
32
+ /**
33
+ * Where this provider's credential comes from, as it declares it and the
34
+ * deployment may have overridden it; `null` when the deployment hid the help.
35
+ * Metadata only — a credential value never travels in this shape.
36
+ */
37
+ readonly credentialHelp: CredentialHelp | null;
38
+ /**
39
+ * What the deployment got wrong while overriding the help. Non-fatal by
40
+ * design: a broken help address hides a link, it never disables a provider.
41
+ */
42
+ readonly credentialHelpProblems?: readonly string[];
16
43
  /** Capability a provider operation needs, or undefined when it is unknown. */
17
44
  operationCapability(operation: string): IntegrationCapability | undefined;
18
45
  /**
@@ -22,6 +49,10 @@ export interface IntegrationProvider {
22
49
  * `options` carries the non-secret choices the connect form made next to the
23
50
  * secret — today only which configured instance a token belongs to. It comes
24
51
  * from the operator-facing RPC, never from a model tool call.
52
+ *
53
+ * The same method turns a deployment-managed secret into this provider's
54
+ * credential shape, which is why a managed credential and a personal one can
55
+ * never be spent against an instance the other names.
25
56
  */
26
57
  parseCredential(raw: string, options?: Readonly<Record<string, string>>): {
27
58
  readonly credential: string;
@@ -29,5 +60,35 @@ export interface IntegrationProvider {
29
60
  };
30
61
  validate(context: ProviderContext): Promise<ProviderValidation>;
31
62
  execute(context: ProviderContext, operation: string, input: Readonly<Record<string, unknown>>): Promise<unknown>;
63
+ /**
64
+ * Security classification of one operation. Providers that omit it leave every
65
+ * operation unclassified, and an unclassified operation is unreachable through
66
+ * a managed credential — the default is deny, never guess.
67
+ */
68
+ operationMetadata?(operation: string): OperationSecurityMetadata | undefined;
69
+ /**
70
+ * How one capability behaves when the connection runs on the deployment's
71
+ * managed credential. A provider that omits this supports no managed
72
+ * credential at all, and nothing about the feature appears for it.
73
+ */
74
+ capabilityServiceState?(capability: IntegrationCapability): CapabilityServiceState | undefined;
75
+ /**
76
+ * Which kind of resource an operation reads, in the profile's vocabulary
77
+ * (`projects`, `groups`, …). Used to prove a boundary exists for the operation
78
+ * before it runs; a service-safe operation that declares none is refused.
79
+ */
80
+ resourceBoundaryKind?(operation: string): string | undefined;
81
+ /**
82
+ * Portal of one configured instance, so deployment configuration can name an
83
+ * instance the same way the connect form does and a typo fails at load.
84
+ */
85
+ instancePortal?(instanceId: string): string | undefined;
86
+ /**
87
+ * Probe a deployment-managed credential: is it accepted upstream, what
88
+ * identity does it carry, and is it narrower than read-only. No probe may
89
+ * change upstream state, so a write-capable credential is reported as
90
+ * `unsafe_scope` rather than exercised.
91
+ */
92
+ validateServiceCredential?(context: ProviderContext): Promise<ServiceCredentialHealth>;
32
93
  }
33
94
  //# sourceMappingURL=contract.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { OperationSecurityMetadata } from "../../service-credentials/types.js";
1
2
  import type { IntegrationCapability, IntegrationCapabilityInfo } from "../../types.js";
2
3
  import type { GitlabFlags } from "./config.js";
3
4
  /**
@@ -10,11 +11,15 @@ import type { GitlabFlags } from "./config.js";
10
11
  * intersects them with the scopes the connected token actually reports. A token
11
12
  * with `read_api` satisfies everything readable, `read_repository` adds nothing
12
13
  * on top of it, and `read_user` is enough only for the profile.
14
+ *
15
+ * CI is split in two because a job log is a different disclosure from a
16
+ * pipeline listing: the deployment-managed read-only credential may see which
17
+ * jobs ran and how they ended, never what they printed.
13
18
  */
14
- export type GitlabCapability = "identity.read" | "projects.read" | "repository.read" | "search.read" | "issues.read" | "merge_requests.read" | "ci.read";
19
+ export type GitlabCapability = "identity.read" | "projects.read" | "repository.read" | "search.read" | "issues.read" | "merge_requests.read" | "ci.metadata.read" | "ci.logs.read";
15
20
  export interface GitlabCapabilityDefinition {
16
21
  readonly capability: GitlabCapability;
17
- readonly flag: Exclude<keyof GitlabFlags, "instances" | "retries" | "enabled">;
22
+ readonly flag: Exclude<keyof GitlabFlags, "instances" | "retries" | "enabled" | "allowInsecureHttp">;
18
23
  readonly scopes: readonly string[];
19
24
  readonly label: string;
20
25
  readonly hint: string;
@@ -30,12 +35,16 @@ export interface GitlabOperationDefinition {
30
35
  readonly path: string;
31
36
  /** Set when the operation answers with one page of a collection. */
32
37
  readonly list?: boolean;
38
+ /** What this operation does, how sensitive it is, who may reach it. */
39
+ readonly security: OperationSecurityMetadata;
33
40
  }
41
+ /** The resource kind every project-scoped operation of this provider is bounded by. */
42
+ export declare const GITLAB_RESOURCE_KIND = "projects";
34
43
  /**
35
44
  * Every model-reachable operation. The provider refuses any operation that is
36
- * not listed here, so this table — together with `capability` — is the
37
- * permission surface. Only GET: the catalog carries no operation that could
38
- * change GitLab state, and the confirmation framework does not exist yet.
45
+ * not listed here, so this table — together with `capability` and `security` —
46
+ * is the permission surface. Only GET: the catalog carries no operation that
47
+ * could change GitLab state, and the confirmation framework does not exist yet.
39
48
  */
40
49
  export declare const GITLAB_OPERATIONS: Readonly<Record<string, GitlabOperationDefinition>>;
41
50
  /** Capabilities this deployment allows, in catalog order. */
@@ -44,6 +53,12 @@ export declare function enabledCapabilities(flags: GitlabFlags): readonly Gitlab
44
53
  export declare const GITLAB_CAPABILITY_INFO: Readonly<Record<GitlabCapability, IntegrationCapabilityInfo>>;
45
54
  /** Capability an operation needs, or undefined when the catalog has none. */
46
55
  export declare function gitlabOperationCapability(operation: string): IntegrationCapability | undefined;
56
+ /** Security classification of an operation, or undefined when it is unknown. */
57
+ export declare function gitlabOperationMetadata(operation: string): OperationSecurityMetadata | undefined;
47
58
  /** Capabilities satisfied by the scopes a GitLab token reports. */
48
59
  export declare function capabilitiesForScopes(scopes: readonly string[]): readonly GitlabCapability[];
60
+ /** Capability id this release split in two; kept for the store migration. */
61
+ export declare const GITLAB_LEGACY_CI_CAPABILITY = "ci.read";
62
+ /** The two capabilities that replaced it. */
63
+ export declare const GITLAB_CI_SPLIT_CAPABILITIES: readonly GitlabCapability[];
49
64
  //# sourceMappingURL=catalog.d.ts.map
@@ -27,7 +27,10 @@ export interface GitlabFlags {
27
27
  readonly searchRead: boolean;
28
28
  readonly issuesRead: boolean;
29
29
  readonly mergeRequestsRead: boolean;
30
- readonly ciRead: boolean;
30
+ /** Pipeline and job metadata; service-safe, unlike the job log below. */
31
+ readonly ciMetadataRead: boolean;
32
+ /** Job log contents: may carry secrets, never reachable by a service token. */
33
+ readonly ciLogsRead: boolean;
31
34
  /** Largest file body handed to the model, in bytes. */
32
35
  readonly maxFileBytes: number;
33
36
  /** Largest CI job log handed to the model, in bytes. */
@@ -38,13 +41,21 @@ export interface GitlabFlags {
38
41
  readonly retries: number;
39
42
  }
40
43
  export declare const GITLAB_DEFAULTS: GitlabFlags;
44
+ /**
45
+ * Operator input of this slice. `ciRead` is the single CI switch of earlier
46
+ * releases: deployments that set it are read as both halves of the split, so a
47
+ * deployment that had turned CI off does not silently get it back.
48
+ */
49
+ export type GitlabConfigInput = Partial<GitlabFlags> & {
50
+ readonly ciRead?: boolean;
51
+ };
41
52
  /**
42
53
  * Config slice of this provider, as it appears under `gitlab:` in YAML. The
43
54
  * instance list is validated and canonicalized by `resolveGitlabConfig`, which
44
55
  * is where a deployment typo fails loudly.
45
56
  */
46
- export declare const gitlabConfigSchema: z<Partial<GitlabFlags>>;
47
- export declare function resolveGitlabConfig(input?: Partial<GitlabFlags>): GitlabFlags;
57
+ export declare const gitlabConfigSchema: z<GitlabConfigInput>;
58
+ export declare function resolveGitlabConfig(input?: GitlabConfigInput): GitlabFlags;
48
59
  /** The configured instance a stored credential names, or a fail-closed error. */
49
60
  export declare function gitlabInstance(flags: GitlabFlags, instanceId: string): GitlabInstance | undefined;
50
61
  //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1,9 @@
1
+ import type { CredentialHelp } from "@yadsh/dsh-plugin-kit";
2
+ /**
3
+ * A GitLab personal access token is minted on the instance the connection
4
+ * belongs to. The declared help points at gitlab.com, which is right for a
5
+ * hosted user and wrong for every self-hosted deployment — those replace the
6
+ * address (and their own token page) through `credentialHelp.gitlab`.
7
+ */
8
+ export declare const GITLAB_CREDENTIAL_HELP: CredentialHelp;
9
+ //# sourceMappingURL=credential-help.d.ts.map
@@ -1,7 +1,19 @@
1
+ import { type CredentialHelp } from "@yadsh/dsh-plugin-kit";
1
2
  import type { ResolvedQaIntegrationsConfig } from "../../config.js";
2
- import type { IntegrationCapability, IntegrationCapabilityInfo, ProviderValidation } from "../../types.js";
3
+ import type { OperationSecurityMetadata, ServiceCredentialHealth, ServiceResourceBoundary } from "../../service-credentials/types.js";
4
+ import type { CapabilityServiceState, IntegrationCapability, IntegrationCapabilityInfo, ProviderValidation } from "../../types.js";
3
5
  import type { IntegrationProvider, ProviderContext } from "../contract.js";
4
6
  export { credentialFromPlaintext, credentialInstance, type GitlabCredential, } from "./transport.js";
7
+ /**
8
+ * Whether one caller-named project stays inside the deployment's boundary. A
9
+ * numeric reference is matched against the listed ids only: a group id cannot
10
+ * be expanded into project ids without another call, so it never widens a
11
+ * numeric read. A path reference matches an exact entry or sits under a listed
12
+ * group, which is how the same rule covers `group/subgroup/project`.
13
+ */
14
+ export declare function projectAllowed(boundary: ServiceResourceBoundary, ref: string): boolean;
15
+ /** Whether a caller-named group stays inside the boundary. */
16
+ export declare function groupAllowed(boundary: ServiceResourceBoundary, ref: string): boolean;
5
17
  /** GitLab provider: operator-configured instances over a personal access token. */
6
18
  export declare class GitlabProvider implements IntegrationProvider {
7
19
  private readonly config;
@@ -10,6 +22,10 @@ export declare class GitlabProvider implements IntegrationProvider {
10
22
  /** What this deployment allows; the token scope probe narrows it per user. */
11
23
  readonly capabilities: readonly IntegrationCapability[];
12
24
  readonly capabilityInfo: Readonly<Record<IntegrationCapability, IntegrationCapabilityInfo>>;
25
+ /** Where the settings card says this provider's credential comes from. */
26
+ readonly credentialHelp: CredentialHelp | null;
27
+ /** Overrides the deployment got wrong; reported once at startup, never fatal. */
28
+ readonly credentialHelpProblems: readonly string[];
13
29
  private readonly transport;
14
30
  constructor(config: ResolvedQaIntegrationsConfig, fetcher?: typeof fetch);
15
31
  /**
@@ -23,8 +39,42 @@ export declare class GitlabProvider implements IntegrationProvider {
23
39
  readonly portal: string;
24
40
  };
25
41
  operationCapability(operation: string): IntegrationCapability | undefined;
42
+ operationMetadata(operation: string): OperationSecurityMetadata | undefined;
43
+ /** Every project-scoped read may name a project id or a path under a group. */
44
+ resourceBoundaryKind(operation: string): string | undefined;
45
+ /**
46
+ * Portal of a configured instance. An empty id means "the only instance", the
47
+ * same rule `parseCredential` applies, so deployment configuration and the
48
+ * connect form name instances alike.
49
+ */
50
+ instancePortal(instanceId: string): string | undefined;
51
+ capabilityServiceState(capability: IntegrationCapability): CapabilityServiceState | undefined;
26
52
  validate(context: ProviderContext): Promise<ProviderValidation>;
53
+ /**
54
+ * Health of a deployment-managed token. The probe reads only the two
55
+ * self-inspection endpoints, so it never changes upstream state; a token that
56
+ * reaches beyond read-only scopes is reported as `unsafe_scope` and still
57
+ * bounded locally by the service ceiling.
58
+ */
59
+ validateServiceCredential(context: ProviderContext): Promise<ServiceCredentialHealth>;
27
60
  execute(context: ProviderContext, operation: string, input: Readonly<Record<string, unknown>>): Promise<unknown>;
61
+ /**
62
+ * Hold one call inside the deployment's boundary. Every service-safe
63
+ * operation of this provider reads one project (or one group), so the check is
64
+ * the same for all of them: name a resource that is inside the boundary, or
65
+ * nothing is read. A listing that names none is refused rather than answered
66
+ * with the service account's whole upstream view.
67
+ */
68
+ private assertInsideBoundary;
69
+ /**
70
+ * The bounded project listing. A service profile names the projects (and
71
+ * groups) it covers, so the listing is built from that list instead of from
72
+ * whatever the shared account can reach; a project the service token cannot
73
+ * see is reported as unavailable rather than silently dropped.
74
+ */
75
+ private listBoundedProjects;
76
+ /** Fail closed on an issue the shared account must not expose. */
77
+ private assertIssueNotConfidential;
28
78
  /**
29
79
  * A file read answers with metadata and content in one call. GitLab returns
30
80
  * the body base64-encoded inside that JSON, so a file bigger than the
@@ -0,0 +1,8 @@
1
+ import type { CredentialHelp } from "@yadsh/dsh-plugin-kit";
2
+ /**
3
+ * Jira authenticates with an Atlassian API token next to the account e-mail.
4
+ * Scoped tokens are the ones to recommend: an unscoped token is account-wide,
5
+ * while a scoped one can be limited to the Jira scopes the agent actually uses.
6
+ */
7
+ export declare const JIRA_CREDENTIAL_HELP: CredentialHelp;
8
+ //# sourceMappingURL=credential-help.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { type CredentialHelp } from "@yadsh/dsh-plugin-kit";
1
2
  import type { ResolvedQaIntegrationsConfig } from "../../config.js";
2
3
  import type { IntegrationCapability, IntegrationCapabilityInfo, ProviderValidation } from "../../types.js";
3
4
  import type { IntegrationProvider, ProviderContext } from "../contract.js";
@@ -16,6 +17,10 @@ export declare class JiraProvider implements IntegrationProvider {
16
17
  /** What this deployment allows; Jira's own permissions narrow it upstream. */
17
18
  readonly capabilities: readonly IntegrationCapability[];
18
19
  readonly capabilityInfo: Readonly<Record<IntegrationCapability, IntegrationCapabilityInfo>>;
20
+ /** Where the settings card says this provider's credential comes from. */
21
+ readonly credentialHelp: CredentialHelp | null;
22
+ /** Overrides the deployment got wrong; reported once at startup, never fatal. */
23
+ readonly credentialHelpProblems: readonly string[];
19
24
  private readonly transport;
20
25
  constructor(config: ResolvedQaIntegrationsConfig, fetcher?: typeof fetch);
21
26
  /**
@@ -3,6 +3,8 @@ import type { IntegrationProvider } from "./contract.js";
3
3
  export declare class IntegrationProviderRegistry {
4
4
  private readonly providers;
5
5
  register(provider: IntegrationProvider): void;
6
+ /** The provider, or undefined; used where absence is a configuration error. */
7
+ find(id: IntegrationProviderId): IntegrationProvider | undefined;
6
8
  get(id: IntegrationProviderId): IntegrationProvider;
7
9
  list(): readonly IntegrationProvider[];
8
10
  }