@yadsh/dsh-qa-integrations 0.5.0 → 0.7.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 (206) hide show
  1. package/README.md +636 -202
  2. package/compatibility.json +1 -1
  3. package/lib/broker.js +468 -9
  4. package/lib/broker.js.map +1 -1
  5. package/lib/client/bitrix24.js +67 -5
  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 +98 -129
  10. package/lib/client/confluence.js.map +1 -1
  11. package/lib/client/gitlab.js +41 -5
  12. package/lib/client/gitlab.js.map +1 -1
  13. package/lib/client/index.js +33 -11
  14. package/lib/client/index.js.map +1 -1
  15. package/lib/client/integrations.js +40 -3
  16. package/lib/client/integrations.js.map +1 -1
  17. package/lib/client/jira.js +96 -127
  18. package/lib/client/jira.js.map +1 -1
  19. package/lib/client/operator-card.js +537 -0
  20. package/lib/client/operator-card.js.map +1 -0
  21. package/lib/client/operator-controls.js +232 -0
  22. package/lib/client/operator-controls.js.map +1 -0
  23. package/lib/client/provider-card.js +138 -4
  24. package/lib/client/provider-card.js.map +1 -1
  25. package/lib/client/styles.js +68 -5
  26. package/lib/client/styles.js.map +1 -1
  27. package/lib/client/teamcity.js +31 -4
  28. package/lib/client/teamcity.js.map +1 -1
  29. package/lib/client/testit.js +101 -0
  30. package/lib/client/testit.js.map +1 -0
  31. package/lib/client/weblate.js +105 -0
  32. package/lib/client/weblate.js.map +1 -0
  33. package/lib/client.js +5214 -1054
  34. package/lib/client.js.map +1 -1
  35. package/lib/coerce.js +16 -7
  36. package/lib/coerce.js.map +1 -1
  37. package/lib/config.js +12 -0
  38. package/lib/config.js.map +1 -1
  39. package/lib/errors.js.map +1 -1
  40. package/lib/index.js +444 -57
  41. package/lib/index.js.map +1 -1
  42. package/lib/providers/bitrix24/catalog.js +151 -8
  43. package/lib/providers/bitrix24/catalog.js.map +1 -1
  44. package/lib/providers/bitrix24/config.js +87 -13
  45. package/lib/providers/bitrix24/config.js.map +1 -1
  46. package/lib/providers/bitrix24/credential-help.js +24 -0
  47. package/lib/providers/bitrix24/credential-help.js.map +1 -0
  48. package/lib/providers/bitrix24/index.js +122 -0
  49. package/lib/providers/bitrix24/index.js.map +1 -1
  50. package/lib/providers/bitrix24/operations.js +60 -1
  51. package/lib/providers/bitrix24/operations.js.map +1 -1
  52. package/lib/providers/bitrix24/tools.js +95 -3
  53. package/lib/providers/bitrix24/tools.js.map +1 -1
  54. package/lib/providers/confluence/catalog.js +51 -3
  55. package/lib/providers/confluence/catalog.js.map +1 -1
  56. package/lib/providers/confluence/credential-help.js +29 -0
  57. package/lib/providers/confluence/credential-help.js.map +1 -0
  58. package/lib/providers/confluence/index.js +302 -35
  59. package/lib/providers/confluence/index.js.map +1 -1
  60. package/lib/providers/confluence/operations.js +1 -1
  61. package/lib/providers/confluence/operations.js.map +1 -1
  62. package/lib/providers/gitlab/catalog.js +108 -15
  63. package/lib/providers/gitlab/catalog.js.map +1 -1
  64. package/lib/providers/gitlab/config.js +11 -3
  65. package/lib/providers/gitlab/config.js.map +1 -1
  66. package/lib/providers/gitlab/credential-help.js +33 -0
  67. package/lib/providers/gitlab/credential-help.js.map +1 -0
  68. package/lib/providers/gitlab/index.js +337 -6
  69. package/lib/providers/gitlab/index.js.map +1 -1
  70. package/lib/providers/jira/catalog.js +73 -3
  71. package/lib/providers/jira/catalog.js.map +1 -1
  72. package/lib/providers/jira/credential-help.js +31 -0
  73. package/lib/providers/jira/credential-help.js.map +1 -0
  74. package/lib/providers/jira/index.js +275 -12
  75. package/lib/providers/jira/index.js.map +1 -1
  76. package/lib/providers/registry.js +4 -0
  77. package/lib/providers/registry.js.map +1 -1
  78. package/lib/providers/shared/credential-help.js +29 -0
  79. package/lib/providers/shared/credential-help.js.map +1 -0
  80. package/lib/providers/shared/service-boundary.js +44 -0
  81. package/lib/providers/shared/service-boundary.js.map +1 -0
  82. package/lib/providers/teamcity/catalog.js +56 -2
  83. package/lib/providers/teamcity/catalog.js.map +1 -1
  84. package/lib/providers/teamcity/credential-help.js +25 -0
  85. package/lib/providers/teamcity/credential-help.js.map +1 -0
  86. package/lib/providers/teamcity/index.js +254 -2
  87. package/lib/providers/teamcity/index.js.map +1 -1
  88. package/lib/providers/testit/attachments.js +131 -0
  89. package/lib/providers/testit/attachments.js.map +1 -0
  90. package/lib/providers/testit/catalog.js +302 -0
  91. package/lib/providers/testit/catalog.js.map +1 -0
  92. package/lib/providers/testit/config.js +175 -0
  93. package/lib/providers/testit/config.js.map +1 -0
  94. package/lib/providers/testit/credential-help.js +29 -0
  95. package/lib/providers/testit/credential-help.js.map +1 -0
  96. package/lib/providers/testit/index.js +458 -0
  97. package/lib/providers/testit/index.js.map +1 -0
  98. package/lib/providers/testit/operations.js +1070 -0
  99. package/lib/providers/testit/operations.js.map +1 -0
  100. package/lib/providers/testit/tools.js +717 -0
  101. package/lib/providers/testit/tools.js.map +1 -0
  102. package/lib/providers/testit/transport.js +158 -0
  103. package/lib/providers/testit/transport.js.map +1 -0
  104. package/lib/providers/weblate/catalog.js +279 -0
  105. package/lib/providers/weblate/catalog.js.map +1 -0
  106. package/lib/providers/weblate/config.js +147 -0
  107. package/lib/providers/weblate/config.js.map +1 -0
  108. package/lib/providers/weblate/credential-help.js +26 -0
  109. package/lib/providers/weblate/credential-help.js.map +1 -0
  110. package/lib/providers/weblate/index.js +419 -0
  111. package/lib/providers/weblate/index.js.map +1 -0
  112. package/lib/providers/weblate/operations.js +703 -0
  113. package/lib/providers/weblate/operations.js.map +1 -0
  114. package/lib/providers/weblate/query.js +80 -0
  115. package/lib/providers/weblate/query.js.map +1 -0
  116. package/lib/providers/weblate/tools.js +408 -0
  117. package/lib/providers/weblate/tools.js.map +1 -0
  118. package/lib/providers/weblate/transport.js +179 -0
  119. package/lib/providers/weblate/transport.js.map +1 -0
  120. package/lib/repository.js +197 -13
  121. package/lib/repository.js.map +1 -1
  122. package/lib/service-credentials/config.js +179 -0
  123. package/lib/service-credentials/config.js.map +1 -0
  124. package/lib/service-credentials/policy.js +92 -0
  125. package/lib/service-credentials/policy.js.map +1 -0
  126. package/lib/service-credentials/registry.js +142 -0
  127. package/lib/service-credentials/registry.js.map +1 -0
  128. package/lib/service-credentials/state.js +30 -0
  129. package/lib/service-credentials/state.js.map +1 -0
  130. package/lib/service-credentials/types.js +20 -0
  131. package/lib/service-credentials/types.js.map +1 -0
  132. package/lib/shared/settings.js +8 -13
  133. package/lib/shared/settings.js.map +1 -1
  134. package/lib/tools.js +27 -2
  135. package/lib/tools.js.map +1 -1
  136. package/lib/typert.host.js +1340 -100
  137. package/lib/typert.remote-client.d.ts +45 -11
  138. package/lib/typert.remote-client.js +1101 -38
  139. package/lib/types/broker.d.ts +79 -5
  140. package/lib/types/client/bitrix24.d.ts +24 -2
  141. package/lib/types/client/card.d.ts +3 -1
  142. package/lib/types/client/confluence.d.ts +19 -3
  143. package/lib/types/client/gitlab.d.ts +15 -2
  144. package/lib/types/client/index.d.ts +7 -5
  145. package/lib/types/client/integrations.d.ts +12 -3
  146. package/lib/types/client/jira.d.ts +20 -3
  147. package/lib/types/client/operator-card.d.ts +22 -0
  148. package/lib/types/client/operator-controls.d.ts +135 -0
  149. package/lib/types/client/provider-card.d.ts +50 -8
  150. package/lib/types/client/styles.d.ts +4 -3
  151. package/lib/types/client/teamcity.d.ts +15 -2
  152. package/lib/types/client/testit.d.ts +28 -0
  153. package/lib/types/client/weblate.d.ts +28 -0
  154. package/lib/types/coerce.d.ts +2 -2
  155. package/lib/types/config.d.ts +21 -0
  156. package/lib/types/errors.d.ts +9 -1
  157. package/lib/types/index.d.ts +183 -18
  158. package/lib/types/providers/bitrix24/catalog.d.ts +9 -1
  159. package/lib/types/providers/bitrix24/config.d.ts +23 -22
  160. package/lib/types/providers/bitrix24/credential-help.d.ts +8 -0
  161. package/lib/types/providers/bitrix24/index.d.ts +41 -1
  162. package/lib/types/providers/bitrix24/tools.d.ts +4 -0
  163. package/lib/types/providers/confluence/catalog.d.ts +11 -3
  164. package/lib/types/providers/confluence/credential-help.d.ts +9 -0
  165. package/lib/types/providers/confluence/index.d.ts +66 -7
  166. package/lib/types/providers/confluence/operations.d.ts +2 -0
  167. package/lib/types/providers/contract.d.ts +62 -1
  168. package/lib/types/providers/gitlab/catalog.d.ts +20 -5
  169. package/lib/types/providers/gitlab/config.d.ts +14 -3
  170. package/lib/types/providers/gitlab/credential-help.d.ts +9 -0
  171. package/lib/types/providers/gitlab/index.d.ts +51 -1
  172. package/lib/types/providers/jira/catalog.d.ts +13 -0
  173. package/lib/types/providers/jira/credential-help.d.ts +8 -0
  174. package/lib/types/providers/jira/index.d.ts +53 -1
  175. package/lib/types/providers/registry.d.ts +2 -0
  176. package/lib/types/providers/shared/credential-help.d.ts +17 -0
  177. package/lib/types/providers/shared/service-boundary.d.ts +25 -0
  178. package/lib/types/providers/teamcity/catalog.d.ts +18 -2
  179. package/lib/types/providers/teamcity/credential-help.d.ts +8 -0
  180. package/lib/types/providers/teamcity/index.d.ts +53 -2
  181. package/lib/types/providers/testit/attachments.d.ts +20 -0
  182. package/lib/types/providers/testit/catalog.d.ts +87 -0
  183. package/lib/types/providers/testit/config.d.ts +61 -0
  184. package/lib/types/providers/testit/credential-help.d.ts +8 -0
  185. package/lib/types/providers/testit/index.d.ts +119 -0
  186. package/lib/types/providers/testit/operations.d.ts +95 -0
  187. package/lib/types/providers/testit/tools.d.ts +15 -0
  188. package/lib/types/providers/testit/transport.d.ts +67 -0
  189. package/lib/types/providers/weblate/catalog.d.ts +60 -0
  190. package/lib/types/providers/weblate/config.d.ts +57 -0
  191. package/lib/types/providers/weblate/credential-help.d.ts +9 -0
  192. package/lib/types/providers/weblate/index.d.ts +92 -0
  193. package/lib/types/providers/weblate/operations.d.ts +77 -0
  194. package/lib/types/providers/weblate/query.d.ts +37 -0
  195. package/lib/types/providers/weblate/tools.d.ts +15 -0
  196. package/lib/types/providers/weblate/transport.d.ts +60 -0
  197. package/lib/types/repository.d.ts +38 -3
  198. package/lib/types/service-credentials/config.d.ts +73 -0
  199. package/lib/types/service-credentials/policy.d.ts +44 -0
  200. package/lib/types/service-credentials/registry.d.ts +43 -0
  201. package/lib/types/service-credentials/state.d.ts +14 -0
  202. package/lib/types/service-credentials/types.d.ts +97 -0
  203. package/lib/types/shared/settings.d.ts +8 -13
  204. package/lib/types/tools.d.ts +10 -1
  205. package/lib/types/types.d.ts +114 -10
  206. package/package.json +7 -7
@@ -0,0 +1,97 @@
1
+ import type { IntegrationProviderId, IntegrationServiceBoundary, ServiceCredentialHealth, ServiceCredentialStatus, SafeExternalIdentity } from "../types.js";
2
+ export type { ServiceCredentialHealth, ServiceCredentialStatus, SafeExternalIdentity, };
3
+ /**
4
+ * Which credential a binding spends on an upstream call. The mode is explicit
5
+ * and exhaustive: there is no `auto`, no `default` and no fallback, because a
6
+ * silent substitution between two upstream identities is exactly the failure
7
+ * this feature exists to prevent.
8
+ */
9
+ export type CredentialSource = "personal" | "service";
10
+ export declare const CREDENTIAL_SOURCES: readonly CredentialSource[];
11
+ export declare function isCredentialSource(value: unknown): value is CredentialSource;
12
+ /** What an operation does upstream; only `read` can ever be service-reachable. */
13
+ export type OperationEffect = "read" | "write" | "admin";
14
+ /** How much an answer may reveal; sensitive and secret answers stay personal. */
15
+ export type DataSensitivity = "normal" | "sensitive" | "secret";
16
+ /** Whether the deployment's managed credential may reach one operation. */
17
+ export type OperationServiceDecision = "allow" | "deny";
18
+ /**
19
+ * Security classification of one provider operation. The three fields are
20
+ * independent on purpose: a read can still be sensitive (CI job logs), and a
21
+ * normal-sensitivity read can still be outside the service ceiling.
22
+ */
23
+ export interface OperationSecurityMetadata {
24
+ readonly effect: OperationEffect;
25
+ readonly sensitivity: DataSensitivity;
26
+ readonly serviceCredential: OperationServiceDecision;
27
+ /**
28
+ * Set when the operation either names a resource or reads a collection of
29
+ * them: in service mode the call must then stay inside the profile's
30
+ * administrator-defined resource boundary.
31
+ */
32
+ readonly requiresResourceBoundary?: boolean;
33
+ }
34
+ /**
35
+ * Classification of an operation its provider does not classify. Deliberately
36
+ * the most restrictive values in every field, so an operation added by a
37
+ * provider update is unreachable through the managed credential until someone
38
+ * classifies it on purpose. This is a release-blocking invariant.
39
+ */
40
+ export declare const UNCLASSIFIED_OPERATION: OperationSecurityMetadata;
41
+ /**
42
+ * Resources a managed credential may see. One type, declared with the public
43
+ * contract because it crosses the remote boundary as well.
44
+ */
45
+ export type ServiceResourceBoundary = IntegrationServiceBoundary;
46
+ /**
47
+ * One administrator-managed credential. It belongs to the deployment, not to a
48
+ * user: a user cannot create one, cannot change its secret, cannot move its
49
+ * upstream identity and cannot pick one by id.
50
+ */
51
+ export interface ServiceCredentialProfile {
52
+ readonly id: string;
53
+ readonly provider: IntegrationProviderId;
54
+ /** Operator-facing instance id of the provider slice this profile binds to. */
55
+ readonly instance: string;
56
+ /** Portal the bound instance answers on; the value a binding is matched by. */
57
+ readonly portal: string;
58
+ /** Safe alias shown to users; never the secret and never its prefix. */
59
+ readonly label: string;
60
+ readonly authType: string;
61
+ /** Where the secret is read from, as `file:<path>` or `env:<NAME>`. */
62
+ readonly secretRef: string;
63
+ /** Set to false to retire a profile without deleting its configuration. */
64
+ readonly enabled: boolean;
65
+ readonly resources: ServiceResourceBoundary;
66
+ /** Administrator narrowing of the service ceiling; only ever removes. */
67
+ readonly policy: Readonly<Record<string, "deny">>;
68
+ /** Hash of the policy-relevant configuration of this profile. */
69
+ readonly policyRevision: string;
70
+ }
71
+ /** A profile plus the secret an upstream call needs, produced inside the broker. */
72
+ export interface ResolvedServiceCredential {
73
+ readonly profile: ServiceCredentialProfile;
74
+ readonly secret: string;
75
+ /** Content hash of the secret: rotation changes it without reconnecting. */
76
+ readonly credentialRevision: string;
77
+ }
78
+ /**
79
+ * What the broker hands a provider after it has resolved and checked the
80
+ * binding. Provider tool arguments do not change, and the model never receives
81
+ * any of these identifiers.
82
+ */
83
+ export interface ResolvedCredentialContext {
84
+ readonly source: CredentialSource;
85
+ readonly credentialRevision: string;
86
+ readonly personal?: {
87
+ readonly accountId: string;
88
+ readonly externalIdentityId: string;
89
+ };
90
+ readonly service?: {
91
+ readonly profileId: string;
92
+ readonly externalIdentityId: string;
93
+ readonly policyRevision: string;
94
+ readonly resourceBoundary: ServiceResourceBoundary;
95
+ };
96
+ }
97
+ //# sourceMappingURL=types.d.ts.map
@@ -1,19 +1,14 @@
1
1
  /**
2
- * The one place that names the settings namespace. The Host serves the section
3
- * and the browser card keys on it, so both halves must agree without importing
4
- * each other (the host entry pulls Node code into the bundle, the card pulls
5
- * DOM code into the Host).
6
- * @module shared/settings
2
+ * Identity shared by the Host plugin and its operator card.
3
+ *
4
+ * This module must stay dependency-free: the card bundle inlines it, and a
5
+ * browser build must not pull the Host config surface (schemastery) into the
6
+ * page just to learn the namespace name.
7
7
  */
8
8
  /**
9
- * Settings namespace of the Integrations card.
10
- *
11
- * The Plugins tab dispatches a card by the namespace its Host serves, so the
12
- * deployment mounts this section to give the browser half a key. It carries no
13
- * editable value on purpose: the provider switches, the address policy and the
14
- * vault path are composition-time decisions (`cordis.patch.yml`) that the
15
- * runtime resolves once at boot, and a settings field the runtime only honored
16
- * after a restart would read as a save that applied.
9
+ * Settings namespace the plugin owns and its operator card binds to. The
10
+ * namespace carries the deployment configuration the card edits; the profile
11
+ * composition row stays the base layer an override reverts to.
17
12
  */
18
13
  export declare const QA_INTEGRATIONS_SETTINGS_NAMESPACE = "qa-integrations";
19
14
  //# sourceMappingURL=settings.d.ts.map
@@ -4,13 +4,22 @@ import type { IntegrationPrincipal } from "./types.js";
4
4
  export interface IntegrationToolOptions {
5
5
  readonly broker: IntegrationBroker;
6
6
  readonly principalForSession: (sessionId: string) => IntegrationPrincipal | undefined;
7
+ /** Mount the Bitrix24 timeline-comment tool; default stays read-only. */
8
+ readonly bitrix24CrmCommentWrite?: boolean;
7
9
  }
8
10
  /**
9
11
  * Model-facing tool names of every enabled provider, in registration order. The
10
12
  * QA surface admits exactly these names as principal-scoped, so this list is the
11
13
  * single place where the tool surface is declared.
12
14
  */
13
- export declare const INTEGRATION_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", "confluence_connection_get", "confluence_search", "confluence_get_page", "confluence_get_page_comments", "confluence_get_page_attachments", "confluence_get_page_versions", "confluence_get_space", "confluence_list_spaces", "gitlab_connection_get", "gitlab_projects_list", "gitlab_project_get", "gitlab_repository_tree", "gitlab_repository_file_get", "gitlab_commits_list", "gitlab_commit_get", "gitlab_compare", "gitlab_search", "gitlab_issues_list", "gitlab_issue_get", "gitlab_issue_notes_list", "gitlab_merge_requests_list", "gitlab_merge_request_get", "gitlab_merge_request_changes_get", "gitlab_merge_request_discussions_list", "gitlab_merge_request_approvals_get", "gitlab_merge_request_pipelines_list", "gitlab_pipelines_list", "gitlab_pipeline_get", "gitlab_pipeline_jobs_list", "gitlab_job_get", "gitlab_job_log_get", "teamcity_connection_get", "teamcity_projects", "teamcity_build_configs", "teamcity_builds", "teamcity_build", "teamcity_build_changes", "teamcity_build_failures", "teamcity_build_log", "teamcity_queue", "teamcity_investigations", "teamcity_agents", "teamcity_artifacts", "teamcity_artifact_text", "jira_get_current_user", "jira_search_issues", "jira_get_issue", "jira_get_issue_comments", "jira_get_issue_attachments", "jira_get_available_transitions", "jira_get_project", "jira_get_fields"];
15
+ export declare const INTEGRATION_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", "confluence_connection_get", "confluence_search", "confluence_get_page", "confluence_get_page_comments", "confluence_get_page_attachments", "confluence_get_page_versions", "confluence_get_space", "confluence_list_spaces", "gitlab_connection_get", "gitlab_projects_list", "gitlab_project_get", "gitlab_repository_tree", "gitlab_repository_file_get", "gitlab_commits_list", "gitlab_commit_get", "gitlab_compare", "gitlab_search", "gitlab_issues_list", "gitlab_issue_get", "gitlab_issue_notes_list", "gitlab_merge_requests_list", "gitlab_merge_request_get", "gitlab_merge_request_changes_get", "gitlab_merge_request_discussions_list", "gitlab_merge_request_approvals_get", "gitlab_merge_request_pipelines_list", "gitlab_pipelines_list", "gitlab_pipeline_get", "gitlab_pipeline_jobs_list", "gitlab_job_get", "gitlab_job_log_get", "teamcity_connection_get", "teamcity_projects", "teamcity_build_configs", "teamcity_builds", "teamcity_build", "teamcity_build_changes", "teamcity_build_failures", "teamcity_build_log", "teamcity_queue", "teamcity_investigations", "teamcity_agents", "teamcity_artifacts", "teamcity_artifact_text", "jira_get_current_user", "jira_search_issues", "jira_get_issue", "jira_get_issue_comments", "jira_get_issue_attachments", "jira_get_available_transitions", "jira_get_project", "jira_get_fields", "testit_connection_get", "testit_projects", "testit_project_get", "testit_sections", "testit_work_items", "testit_work_item_get", "testit_work_item_history", "testit_work_item_comments", "testit_work_item_test_results", "testit_test_plans", "testit_test_plan_get", "testit_test_plan_summary", "testit_test_runs", "testit_test_run_get", "testit_test_run_results", "testit_test_result_get", "testit_test_result_attachments", "testit_attachment_metadata", "testit_attachment_text", "testit_auto_tests", "testit_auto_test_get", "testit_configurations", "weblate_connection_get", "weblate_projects_list", "weblate_project_get", "weblate_project_statistics_get", "weblate_components_list", "weblate_component_get", "weblate_component_statistics_get", "weblate_translations_list", "weblate_translation_get", "weblate_translation_statistics_get", "weblate_units_search", "weblate_units_find", "weblate_unit_get", "weblate_unit_comments_list", "weblate_unit_suggestions_list", "weblate_failing_units_list", "weblate_changes_list", "weblate_screenshots_list", "weblate_screenshot_get"];
16
+ /**
17
+ * The names to admit and mount for one deployment: the read-only catalog plus,
18
+ * only when the operator switched it on, the Bitrix24 timeline comment. The
19
+ * mount and the admission list must always be derived through this function so
20
+ * the two cannot drift apart.
21
+ */
22
+ export declare function integrationToolNames(options?: Pick<IntegrationToolOptions, "bitrix24CrmCommentWrite">): readonly string[];
14
23
  /** Provider tool modules, composed into one registration list. */
15
24
  export declare function createIntegrationTools(options: IntegrationToolOptions): readonly ToolDefinition[];
16
25
  //# sourceMappingURL=tools.d.ts.map
@@ -1,7 +1,26 @@
1
+ import type { CredentialHelp } from "@yadsh/dsh-plugin-kit";
1
2
  export type IntegrationProviderId = string;
2
3
  export type IntegrationAuthKind = "token" | "oauth" | "mcp_token";
3
4
  export type IntegrationStatus = "pending" | "connected" | "error" | "revoked";
4
5
  export type IntegrationPolicyMode = "allow" | "confirm" | "deny";
6
+ /**
7
+ * Which credential the broker spends for one binding. Declared here rather than
8
+ * next to the service-credential machinery because it is part of the stored
9
+ * connection and of every summary a client renders.
10
+ */
11
+ export type CredentialSource = "personal" | "service";
12
+ /**
13
+ * How one capability behaves when the connection runs on the deployment's
14
+ * managed credential. Derived from the provider's operation classifications, so
15
+ * a client can explain a switched-off row instead of showing a bare deny.
16
+ */
17
+ export type CapabilityServiceState =
18
+ /** Every operation of this capability is service-safe. */
19
+ "available"
20
+ /** At least one operation returns sensitive data: needs a personal account. */
21
+ | "sensitive"
22
+ /** At least one operation is a write, an admin action or explicitly denied. */
23
+ | "unavailable";
5
24
  /**
6
25
  * Capability id, free-form on purpose: every provider declares its own set in
7
26
  * its own catalog (`providers/<id>/catalog.ts`) and this framework only moves
@@ -23,6 +42,68 @@ export interface IntegrationPolicyEntry {
23
42
  export interface IntegrationPrincipal {
24
43
  readonly userId: string;
25
44
  }
45
+ /**
46
+ * The managed-credential side of one provider for one principal: whether the
47
+ * deployment offers a service credential for the connected instance, what it
48
+ * may read, and what it can never read. Safe to render and to log — it carries
49
+ * an administrator-chosen alias, never a secret.
50
+ */
51
+ export interface IntegrationServiceSummary {
52
+ /** A profile exists for this provider instance and is not disabled. */
53
+ readonly available: boolean;
54
+ /** Safe alias of the profile, such as "QA Read-only". */
55
+ readonly label: string | null;
56
+ /** Administrator allowlist, so a user can narrow their own access. */
57
+ readonly resources: IntegrationServiceBoundary | null;
58
+ /** What this connection narrowed that allowlist to, or null for all of it. */
59
+ readonly selection: IntegrationServiceBoundary | null;
60
+ /** Service-mode behaviour of every capability the provider declares. */
61
+ readonly capabilities: Readonly<Record<IntegrationCapability, CapabilityServiceState>>;
62
+ }
63
+ /**
64
+ * Resource allowlist of a managed credential, keyed by provider vocabulary
65
+ * (`projects`, `groups`, …). Values are the identifiers the provider itself
66
+ * accepts in a call, so a boundary entry and a tool argument are compared as
67
+ * strings and never through a display name.
68
+ */
69
+ export type IntegrationServiceBoundary = Readonly<Record<string, readonly string[]>>;
70
+ /** Identity upstream reports for a managed credential, safe to show and log. */
71
+ export interface SafeExternalIdentity {
72
+ readonly id: string;
73
+ readonly label: string;
74
+ }
75
+ export type ServiceCredentialStatus =
76
+ /** Reachable and, as far as the provider can tell, free of mutable scopes. */
77
+ "healthy"
78
+ /** Expired upstream; nothing is served and the operator must rotate. */
79
+ | "expired"
80
+ /** Rejected upstream; nothing is served. */
81
+ | "revoked"
82
+ /** Reachable, but wider than read-only; the local ceiling still applies. */
83
+ | "unsafe_scope"
84
+ /** The service could not be reached, or the secret could not be read. */
85
+ | "unreachable";
86
+ /**
87
+ * What a probe of a managed credential found. Declared here because it crosses
88
+ * the remote boundary: it carries a status and operator warnings, never a secret
89
+ * and never the upstream identity the credential holds.
90
+ */
91
+ export interface ServiceCredentialHealth {
92
+ readonly status: ServiceCredentialStatus;
93
+ readonly upstreamIdentity?: SafeExternalIdentity | undefined;
94
+ readonly grantedScopes?: readonly string[] | undefined;
95
+ readonly warnings?: readonly string[] | undefined;
96
+ }
97
+ /** One configured instance, and whether a service credential covers it. */
98
+ export interface IntegrationInstanceSummary {
99
+ readonly id: string;
100
+ readonly label: string;
101
+ readonly baseUrl: string;
102
+ /** Safe alias of the managed credential bound to this instance, if any. */
103
+ readonly service: {
104
+ readonly label: string;
105
+ } | null;
106
+ }
26
107
  export interface IntegrationSummary {
27
108
  readonly provider: IntegrationProviderId;
28
109
  readonly displayName: string;
@@ -44,6 +125,10 @@ export interface IntegrationSummary {
44
125
  readonly policy: readonly IntegrationPolicyEntry[];
45
126
  readonly lastValidatedAt: string | null;
46
127
  readonly errorCode: string | null;
128
+ /** Which credential the next call will spend. */
129
+ readonly credentialSource: CredentialSource;
130
+ /** Effective managed-credential state, or null when the provider has none. */
131
+ readonly service: IntegrationServiceSummary | null;
47
132
  }
48
133
  export interface IntegrationProviderSummary {
49
134
  readonly id: IntegrationProviderId;
@@ -51,16 +136,12 @@ export interface IntegrationProviderSummary {
51
136
  readonly enabled: boolean;
52
137
  readonly authModes: readonly IntegrationAuthKind[];
53
138
  readonly capabilities: readonly IntegrationCapability[];
54
- }
55
- /**
56
- * One external service instance the operator configured, as shown in the
57
- * connect form. It carries no secret and no endpoint the user picked: the
58
- * client offers this list and the host resolves the address from its own config.
59
- */
60
- export interface IntegrationInstanceSummary {
61
- readonly id: string;
62
- readonly label: string;
63
- readonly baseUrl: string;
139
+ /**
140
+ * Where the credential for this provider comes from, as the provider declares
141
+ * it and the deployment may have overridden it. Metadata only: it never
142
+ * carries a credential value, and `null` means the card shows the plain field.
143
+ */
144
+ readonly credentialHelp: CredentialHelp | null;
64
145
  }
65
146
  export interface CredentialInput {
66
147
  /** Write-only credential; never appears in a response. */
@@ -85,7 +166,21 @@ export interface StoredIntegration {
85
166
  readonly externalUserId: string | null;
86
167
  readonly displayName: string | null;
87
168
  readonly capabilities: readonly IntegrationCapability[];
169
+ /** Personal credential, kept while the binding runs in service mode. */
88
170
  readonly secretRef: string | null;
171
+ /** Which credential this binding spends; `personal` unless switched. */
172
+ readonly credentialSource: CredentialSource;
173
+ /** Managed profile this binding resolves to, when it runs in service mode. */
174
+ readonly serviceProfileId: string | null;
175
+ /**
176
+ * Incremented on every credential-mode switch. Cache keys, cursors and pending
177
+ * actions are bound to it, so switching modes invalidates them all at once.
178
+ */
179
+ readonly bindingRevision: number;
180
+ /** What this binding narrows the profile's allowlist to, if anything. */
181
+ readonly serviceSelection: IntegrationServiceBoundary | null;
182
+ /** Policy revision of the profile the binding was last resolved against. */
183
+ readonly servicePolicyRevision: string | null;
89
184
  readonly createdAt: string;
90
185
  readonly updatedAt: string;
91
186
  readonly lastValidatedAt: string | null;
@@ -107,9 +202,18 @@ export interface EncryptedSecretRecord {
107
202
  }
108
203
  export interface IntegrationAuditEntry {
109
204
  readonly id: string;
205
+ /**
206
+ * The authenticated QA user the call belongs to. In service mode upstream
207
+ * only ever sees the deployment's account, so this column is what answers
208
+ * "which real user did this".
209
+ */
110
210
  readonly ownerUserId: string;
111
211
  readonly provider: IntegrationProviderId;
112
212
  readonly operation: string;
213
+ /** Which credential the call was attributed to. */
214
+ readonly credentialSource: CredentialSource;
215
+ /** Safe profile id, never a secret; null for a personal call. */
216
+ readonly serviceProfileId: string | null;
113
217
  readonly result: "success" | "denied" | "error";
114
218
  readonly sourceSessionId: string | null;
115
219
  readonly createdAt: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yadsh/dsh-qa-integrations",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Principal-scoped, encrypted user integrations for DSH QA Surface",
5
5
  "repository": {
6
6
  "type": "git",
@@ -78,6 +78,8 @@
78
78
  "gitlab",
79
79
  "teamcity",
80
80
  "jira",
81
+ "testit",
82
+ "weblate",
81
83
  "credentials"
82
84
  ],
83
85
  "engines": {
@@ -85,15 +87,14 @@
85
87
  },
86
88
  "dependencies": {
87
89
  "zod": "^4.4.3",
90
+ "@yadsh/dsh-plugin-kit": "^0.3.0",
88
91
  "@yadsh/dsh-plugin-log": "^0.4.0",
89
- "@yadsh/dsh-qa-surface": "^0.8.0",
90
- "@yadsh/dsh-plugin-kit": "^0.2.0"
92
+ "@yadsh/dsh-qa-surface": "^0.10.0"
91
93
  },
92
94
  "peerDependencies": {
93
95
  "@deepseek-ai/cordis": "^4.0.2",
94
96
  "@deepseek-ai/dsh-client-ui-settings": ">=0.1.5-rc.2 <0.2.0",
95
97
  "@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.1.5-rc.2 <0.2.0",
96
- "@deepseek-ai/dsh-settings": ">=0.1.5-rc.2 <0.2.0",
97
98
  "@deepseek-ai/dsh-tools": ">=0.1.5-rc.2 <0.2.0",
98
99
  "@deepseek-ai/dsh-typert-protocol": ">=0.1.5-rc.2 <0.2.0",
99
100
  "@deepseek-ai/schemastery": "^3.18.2",
@@ -106,7 +107,6 @@
106
107
  "@deepseek-ai/dsh-client-ui-settings": "0.1.5-rc.2",
107
108
  "@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.5-rc.2",
108
109
  "@deepseek-ai/dsh-client-ui-slots": "0.1.5-rc.2",
109
- "@deepseek-ai/dsh-settings": "0.1.5-rc.2",
110
110
  "@deepseek-ai/dsh-tools": "0.1.5-rc.2",
111
111
  "@deepseek-ai/dsh-typert-generator": "0.1.5-rc.2",
112
112
  "@deepseek-ai/dsh-typert-protocol": "0.1.5-rc.2",
@@ -122,9 +122,9 @@
122
122
  "tsdown": "^0.22.14",
123
123
  "typescript": "^7.0.2",
124
124
  "vitest": "^4.1.11",
125
- "@yadsh/dsh-plugin-scripts": "^0.0.0",
125
+ "@yadsh/dsh-config": "^0.0.0",
126
126
  "@yadsh/dsh-test-kit": "^0.1.0",
127
- "@yadsh/dsh-config": "^0.0.0"
127
+ "@yadsh/dsh-plugin-scripts": "^0.0.0"
128
128
  },
129
129
  "publishConfig": {
130
130
  "access": "public",