@yadsh/dsh-qa-integrations 0.6.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 (83) hide show
  1. package/README.md +309 -288
  2. package/lib/broker.js +12 -0
  3. package/lib/broker.js.map +1 -1
  4. package/lib/client/bitrix24.js +66 -5
  5. package/lib/client/bitrix24.js.map +1 -1
  6. package/lib/client/confluence.js +97 -129
  7. package/lib/client/confluence.js.map +1 -1
  8. package/lib/client/gitlab.js +1 -1
  9. package/lib/client/gitlab.js.map +1 -1
  10. package/lib/client/index.js +25 -5
  11. package/lib/client/index.js.map +1 -1
  12. package/lib/client/integrations.js +1 -1
  13. package/lib/client/integrations.js.map +1 -1
  14. package/lib/client/jira.js +95 -127
  15. package/lib/client/jira.js.map +1 -1
  16. package/lib/client/operator-card.js +537 -0
  17. package/lib/client/operator-card.js.map +1 -0
  18. package/lib/client/operator-controls.js +232 -0
  19. package/lib/client/operator-controls.js.map +1 -0
  20. package/lib/client/styles.js +60 -0
  21. package/lib/client/styles.js.map +1 -1
  22. package/lib/client/testit.js +39 -3
  23. package/lib/client/testit.js.map +1 -1
  24. package/lib/client/weblate.js +38 -3
  25. package/lib/client/weblate.js.map +1 -1
  26. package/lib/client.js +2825 -785
  27. package/lib/client.js.map +1 -1
  28. package/lib/index.js +192 -51
  29. package/lib/index.js.map +1 -1
  30. package/lib/providers/bitrix24/catalog.js +138 -8
  31. package/lib/providers/bitrix24/catalog.js.map +1 -1
  32. package/lib/providers/bitrix24/config.js +85 -14
  33. package/lib/providers/bitrix24/config.js.map +1 -1
  34. package/lib/providers/bitrix24/index.js +113 -0
  35. package/lib/providers/bitrix24/index.js.map +1 -1
  36. package/lib/providers/confluence/catalog.js +51 -3
  37. package/lib/providers/confluence/catalog.js.map +1 -1
  38. package/lib/providers/confluence/index.js +293 -35
  39. package/lib/providers/confluence/index.js.map +1 -1
  40. package/lib/providers/confluence/operations.js +1 -1
  41. package/lib/providers/confluence/operations.js.map +1 -1
  42. package/lib/providers/jira/catalog.js +73 -3
  43. package/lib/providers/jira/catalog.js.map +1 -1
  44. package/lib/providers/jira/index.js +266 -12
  45. package/lib/providers/jira/index.js.map +1 -1
  46. package/lib/providers/testit/catalog.js +77 -0
  47. package/lib/providers/testit/catalog.js.map +1 -1
  48. package/lib/providers/testit/index.js +277 -3
  49. package/lib/providers/testit/index.js.map +1 -1
  50. package/lib/providers/weblate/catalog.js +103 -9
  51. package/lib/providers/weblate/catalog.js.map +1 -1
  52. package/lib/providers/weblate/index.js +243 -5
  53. package/lib/providers/weblate/index.js.map +1 -1
  54. package/lib/shared/settings.js +14 -0
  55. package/lib/shared/settings.js.map +1 -0
  56. package/lib/typert.host.js +148 -56
  57. package/lib/typert.remote-client.d.ts +13 -11
  58. package/lib/typert.remote-client.js +89 -50
  59. package/lib/types/broker.d.ts +11 -3
  60. package/lib/types/client/bitrix24.d.ts +24 -2
  61. package/lib/types/client/confluence.d.ts +19 -3
  62. package/lib/types/client/index.d.ts +7 -6
  63. package/lib/types/client/integrations.d.ts +2 -2
  64. package/lib/types/client/jira.d.ts +20 -3
  65. package/lib/types/client/operator-card.d.ts +22 -0
  66. package/lib/types/client/operator-controls.d.ts +135 -0
  67. package/lib/types/client/testit.d.ts +14 -1
  68. package/lib/types/client/weblate.d.ts +14 -1
  69. package/lib/types/index.d.ts +81 -13
  70. package/lib/types/providers/bitrix24/catalog.d.ts +8 -0
  71. package/lib/types/providers/bitrix24/config.d.ts +14 -23
  72. package/lib/types/providers/bitrix24/index.d.ts +36 -1
  73. package/lib/types/providers/confluence/catalog.d.ts +11 -3
  74. package/lib/types/providers/confluence/index.d.ts +61 -7
  75. package/lib/types/providers/confluence/operations.d.ts +2 -0
  76. package/lib/types/providers/jira/catalog.d.ts +13 -0
  77. package/lib/types/providers/jira/index.d.ts +48 -1
  78. package/lib/types/providers/testit/catalog.d.ts +12 -0
  79. package/lib/types/providers/testit/index.d.ts +61 -2
  80. package/lib/types/providers/weblate/catalog.d.ts +19 -2
  81. package/lib/types/providers/weblate/index.d.ts +43 -1
  82. package/lib/types/shared/settings.d.ts +14 -0
  83. package/package.json +4 -4
@@ -1,18 +1,40 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationSummary, PolicyPatch } from "../types.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
3
+ /**
4
+ * Top-level remotes the shared mounts read: what `describe` reports decides
5
+ * which provider cards render at all. The Bitrix24-specific calls live in
6
+ * `Bitrix24Remote`.
7
+ */
3
8
  export interface IntegrationsRemote {
4
9
  describe(): Promise<RemoteResult<{
5
10
  readonly enabled: boolean;
6
11
  /** Ids of the providers this deployment mounted, in card order. */
7
12
  readonly providers: readonly string[];
8
13
  }>>;
14
+ }
15
+ export interface Bitrix24Remote {
16
+ bitrix24Instances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
9
17
  getBitrix24(token: string): Promise<RemoteResult<IntegrationSummary>>;
10
18
  putBitrix24Credential(token: string, input: {
19
+ readonly instanceId: string;
11
20
  readonly token: string;
21
+ readonly useServiceCredential?: boolean;
12
22
  }): Promise<RemoteResult<IntegrationSummary>>;
13
23
  testBitrix24(token: string): Promise<RemoteResult<IntegrationSummary>>;
14
24
  patchBitrix24Policy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
15
25
  disconnectBitrix24(token: string): Promise<RemoteResult<boolean>>;
26
+ managedServiceCredentials(token: string): Promise<RemoteResult<{
27
+ readonly enabled: boolean;
28
+ readonly defaultForNewConnections: boolean;
29
+ }>>;
30
+ credentialSource(token: string, input: {
31
+ readonly provider: string;
32
+ readonly source: CredentialSource;
33
+ }): Promise<RemoteResult<IntegrationSummary>>;
34
+ serviceBoundary(token: string, input: {
35
+ readonly provider: string;
36
+ readonly selection: IntegrationServiceBoundary | null;
37
+ }): Promise<RemoteResult<IntegrationSummary>>;
16
38
  }
17
- export declare function createBitrix24Card(remote: IntegrationsRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
39
+ export declare function createBitrix24Card(remote: Bitrix24Remote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
18
40
  //# sourceMappingURL=bitrix24.d.ts.map
@@ -1,6 +1,5 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
3
- import type { ProviderCardProps } from "./provider-card.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
4
3
  export interface ConfluenceRemote {
5
4
  confluenceSites(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
6
5
  getConfluence(token: string): Promise<RemoteResult<IntegrationSummary>>;
@@ -8,10 +7,27 @@ export interface ConfluenceRemote {
8
7
  readonly instanceId: string;
9
8
  readonly email: string;
10
9
  readonly token: string;
10
+ readonly useServiceCredential?: boolean;
11
11
  }): Promise<RemoteResult<IntegrationSummary>>;
12
12
  testConfluence(token: string): Promise<RemoteResult<IntegrationSummary>>;
13
13
  patchConfluencePolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
14
14
  disconnectConfluence(token: string): Promise<RemoteResult<boolean>>;
15
+ /**
16
+ * Present on the host that mounts the shared managed-credential machinery.
17
+ * A caller without them gets a card that never offers service mode.
18
+ */
19
+ managedServiceCredentials?(token: string): Promise<RemoteResult<{
20
+ readonly enabled: boolean;
21
+ readonly defaultForNewConnections: boolean;
22
+ }>>;
23
+ credentialSource?(token: string, input: {
24
+ readonly provider: string;
25
+ readonly source: CredentialSource;
26
+ }): Promise<RemoteResult<IntegrationSummary>>;
27
+ serviceBoundary?(token: string, input: {
28
+ readonly provider: string;
29
+ readonly selection: IntegrationServiceBoundary | null;
30
+ }): Promise<RemoteResult<IntegrationSummary>>;
15
31
  }
16
- export declare function createConfluenceCard(remote: ConfluenceRemote): ({ token, help }: ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
32
+ export declare function createConfluenceCard(remote: ConfluenceRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
17
33
  //# sourceMappingURL=confluence.d.ts.map
@@ -1,13 +1,14 @@
1
1
  import type { Context } from "@deepseek-ai/cordis";
2
2
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
3
3
  import type { IntegrationSummary, PolicyPatch } from "../types.js";
4
- export declare const inject: readonly ["remote", "qaUserSettingsSections", "qaUserSession", "slots"];
4
+ export declare const inject: readonly ["remote", "qaUserSettingsSections", "qaUserSession", "settingsScope", "slots"];
5
5
  /**
6
- * Both mounts of the provider cards come from this one bundle: the page of the
7
- * signed-in user's QA settings dialog, where the account gate lives, and the
8
- * feature-owned tab in the host's Plugins settings, which reaches the same
9
- * account through the `qaUserSession` service without depending on the Host
10
- * settings directory.
6
+ * All three mounts of this one bundle: the operator card in the Host's
7
+ * "Plugin configuration" tab, which edits the plugin's settings namespace, the
8
+ * page of the signed-in user's QA settings dialog, where the account gate
9
+ * lives, and the feature-owned tab in the host's Plugins settings, which
10
+ * reaches the same account through the `qaUserSession` service without
11
+ * depending on the Host settings directory.
11
12
  */
12
13
  export declare function apply(ctx: Context): Promise<() => Promise<void>>;
13
14
  export type { IntegrationSummary, PolicyPatch, RemoteResult };
@@ -1,7 +1,7 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
2
  import type { QaUserSettingsSectionProps } from "@yadsh/dsh-qa-surface/client/settings";
3
3
  import type { IntegrationProviderSummary } from "../types.js";
4
- import { type IntegrationsRemote } from "./bitrix24.js";
4
+ import { type Bitrix24Remote, type IntegrationsRemote } from "./bitrix24.js";
5
5
  import { type ConfluenceRemote } from "./confluence.js";
6
6
  import { type GitlabRemote } from "./gitlab.js";
7
7
  import { type JiraRemote } from "./jira.js";
@@ -12,7 +12,7 @@ import { type WeblateRemote } from "./weblate.js";
12
12
  export interface CredentialHelpRemote {
13
13
  providers(token: string): Promise<RemoteResult<readonly IntegrationProviderSummary[]>>;
14
14
  }
15
- export type IntegrationsClientRemote = CredentialHelpRemote & IntegrationsRemote & ConfluenceRemote & GitlabRemote & TeamcityRemote & JiraRemote & TestitRemote & WeblateRemote;
15
+ export type IntegrationsClientRemote = CredentialHelpRemote & IntegrationsRemote & Bitrix24Remote & ConfluenceRemote & GitlabRemote & TeamcityRemote & JiraRemote & TestitRemote & WeblateRemote;
16
16
  /** What every mount of the provider cards needs. */
17
17
  export interface ProviderCardsProps {
18
18
  /** Current QA account token; transport authentication for the remotes. */
@@ -1,6 +1,5 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
3
- import type { ProviderCardProps } from "./provider-card.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
4
3
  export interface JiraRemote {
5
4
  jiraSites(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
6
5
  getJira(token: string): Promise<RemoteResult<IntegrationSummary>>;
@@ -8,10 +7,28 @@ export interface JiraRemote {
8
7
  readonly siteId: string;
9
8
  readonly email: string;
10
9
  readonly token: string;
10
+ readonly useServiceCredential?: boolean | undefined;
11
11
  }): Promise<RemoteResult<IntegrationSummary>>;
12
12
  testJira(token: string): Promise<RemoteResult<IntegrationSummary>>;
13
13
  patchJiraPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
14
14
  disconnectJira(token: string): Promise<RemoteResult<boolean>>;
15
+ /**
16
+ * The service remotes exist on the host for every provider; they stay
17
+ * optional here so a card also renders against a slice that offers none of
18
+ * them — the checkbox and the switches simply never appear.
19
+ */
20
+ managedServiceCredentials?(token: string): Promise<RemoteResult<{
21
+ readonly enabled: boolean;
22
+ readonly defaultForNewConnections: boolean;
23
+ }>>;
24
+ credentialSource?(token: string, input: {
25
+ readonly provider: string;
26
+ readonly source: CredentialSource;
27
+ }): Promise<RemoteResult<IntegrationSummary>>;
28
+ serviceBoundary?(token: string, input: {
29
+ readonly provider: string;
30
+ readonly selection: IntegrationServiceBoundary | null;
31
+ }): Promise<RemoteResult<IntegrationSummary>>;
15
32
  }
16
- export declare function createJiraCard(remote: JiraRemote): ({ token, help }: ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
33
+ export declare function createJiraCard(remote: JiraRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
17
34
  //# sourceMappingURL=jira.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The Integrations operator card.
3
+ *
4
+ * One source meets here: the `qa-integrations` settings namespace, which is
5
+ * the plugin's configuration source on the Host — the card edits it through
6
+ * path-addressed mutations and the running service re-applies on each commit.
7
+ * Every deployment knob the resolvers accept is reachable from this card; the
8
+ * connection store and its key are the exception, because connections and
9
+ * wrapped secrets belong to the boot path and re-open on a Host restart.
10
+ */
11
+ import type { SettingsScope } from "@deepseek-ai/dsh-client-ui-settings/client";
12
+ import type { InjectFace, PropsRuntime } from "@deepseek-ai/dsh-client-ui-slots";
13
+ import { type ReactElement } from "react";
14
+ import type { QaIntegrationsConfig } from "../config.js";
15
+ /** The face the slot entry injects into this card. */
16
+ export interface OperatorCardFace {
17
+ readonly scope: SettingsScope<QaIntegrationsConfig>;
18
+ }
19
+ type CardProps = PropsRuntime<"settings.plugin.item"> & InjectFace<OperatorCardFace>;
20
+ export declare function OperatorCard({ scope }: CardProps): ReactElement | null;
21
+ export {};
22
+ //# sourceMappingURL=operator-card.d.ts.map
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Shared controls of the operator card body.
3
+ *
4
+ * Every control edits the settings namespace through a path-addressed write,
5
+ * and text, number and list drafts commit on blur or Enter rather than per
6
+ * keystroke: a half-typed value is one the Host refuses, and a refusal
7
+ * mid-typing would clear the field the operator is still editing. Structured
8
+ * values (instance lists, records, credential profiles) commit as a whole at
9
+ * the parent path, because the Host stores the user layer per section path.
10
+ */
11
+ import { type ReactElement } from "react";
12
+ /** Path-addressed write into the plugin's settings namespace. */
13
+ export type ConfigWrite = (path: readonly string[], value: unknown) => void;
14
+ /** Path-addressed clear, so the field re-inherits the composition layer. */
15
+ export type ConfigUnset = (path: readonly string[]) => void;
16
+ /** Whether the raw user layer carries a path. */
17
+ export type OverrideCheck = (path: readonly string[]) => boolean;
18
+ /** What every control needs to reach the namespace. */
19
+ export interface ControlProps {
20
+ readonly disabled: boolean;
21
+ readonly write: ConfigWrite;
22
+ readonly unset: ConfigUnset;
23
+ readonly overridden: OverrideCheck;
24
+ }
25
+ /** Redrawn when the stored value moves under a draft, and to report refusals. */
26
+ export interface ValueProps<T> {
27
+ readonly path: readonly string[];
28
+ readonly value: T;
29
+ }
30
+ /** The control's DOM id, derived from its settings path: one per field. */
31
+ export declare function fieldId(path: readonly string[]): string;
32
+ /** Two-state control with a label and an explanatory hint. */
33
+ export declare function Toggle(props: {
34
+ label: string;
35
+ hint?: string;
36
+ path: readonly string[];
37
+ value: boolean;
38
+ disabled: boolean;
39
+ write: ConfigWrite;
40
+ overridden?: boolean;
41
+ }): ReactElement;
42
+ /** Whole-number control; the draft commits on blur and on Enter. */
43
+ export declare function NumberField(props: {
44
+ label: string;
45
+ hint?: string;
46
+ path: readonly string[];
47
+ value: number | undefined;
48
+ disabled: boolean;
49
+ write: ConfigWrite;
50
+ unset: ConfigUnset;
51
+ overridden: OverrideCheck;
52
+ }): ReactElement;
53
+ /** Free-text control; the draft commits on blur and on Enter. */
54
+ export declare function TextField(props: {
55
+ label: string;
56
+ hint?: string;
57
+ placeholder?: string;
58
+ path: readonly string[];
59
+ value: string | undefined;
60
+ disabled: boolean;
61
+ write: ConfigWrite;
62
+ unset: ConfigUnset;
63
+ overridden: OverrideCheck;
64
+ }): ReactElement;
65
+ /** Fixed-option control for the schema's string unions. */
66
+ export declare function SelectField(props: {
67
+ label: string;
68
+ hint?: string;
69
+ path: readonly string[];
70
+ value: string;
71
+ options: ReadonlyArray<{
72
+ value: string;
73
+ label: string;
74
+ }>;
75
+ disabled: boolean;
76
+ write: ConfigWrite;
77
+ overridden: OverrideCheck;
78
+ }): ReactElement;
79
+ /**
80
+ * List of strings; every committed value replaces the whole array at the
81
+ * parent path, which is the granularity the namespace stores.
82
+ */
83
+ export declare function StringListField(props: {
84
+ label: string;
85
+ hint?: string;
86
+ placeholder?: string;
87
+ path: readonly string[];
88
+ values: readonly string[];
89
+ disabled: boolean;
90
+ write: ConfigWrite;
91
+ unset: ConfigUnset;
92
+ overridden: OverrideCheck;
93
+ }): ReactElement;
94
+ /** One editable address row of an instance list. */
95
+ export interface InstanceDraft {
96
+ readonly id: string;
97
+ readonly label: string;
98
+ readonly baseUrl: string;
99
+ }
100
+ /**
101
+ * Deployment instances (GitLab, Confluence, Jira sites, Test IT, Weblate): a
102
+ * row edits id, label and address, and every committed edit writes the whole
103
+ * list, because a partially stored row would fail the resolvers anyway.
104
+ */
105
+ export declare function InstanceListField(props: {
106
+ label: string;
107
+ hint?: string;
108
+ path: readonly string[];
109
+ instances: readonly InstanceDraft[];
110
+ disabled: boolean;
111
+ write: ConfigWrite;
112
+ unset: ConfigUnset;
113
+ overridden: OverrideCheck;
114
+ }): ReactElement;
115
+ /**
116
+ * Mapping control for `fieldAliases`, credential resources and deny policy:
117
+ * rows of a key and its value, committed as one record at the parent path.
118
+ * A new entry is typed into the key (and value) inputs and lands in the
119
+ * record on «добавить»; an existing value commits on blur.
120
+ */
121
+ export declare function RecordField(props: {
122
+ label: string;
123
+ hint?: string;
124
+ path: readonly string[];
125
+ entries: ReadonlyArray<readonly [string, string]>;
126
+ keyPlaceholder: string;
127
+ valuePlaceholder: string;
128
+ /** Fixed value for entries whose schema admits one spelling ("deny"). */
129
+ fixedValue?: string;
130
+ disabled: boolean;
131
+ write: ConfigWrite;
132
+ unset: ConfigUnset;
133
+ overridden: OverrideCheck;
134
+ }): ReactElement;
135
+ //# sourceMappingURL=operator-controls.d.ts.map
@@ -1,15 +1,28 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
3
3
  export interface TestitRemote {
4
4
  testitInstances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
5
5
  getTestit(token: string): Promise<RemoteResult<IntegrationSummary>>;
6
6
  putTestitCredential(token: string, input: {
7
7
  readonly instanceId: string;
8
8
  readonly token: string;
9
+ readonly useServiceCredential?: boolean;
9
10
  }): Promise<RemoteResult<IntegrationSummary>>;
10
11
  testTestit(token: string): Promise<RemoteResult<IntegrationSummary>>;
11
12
  patchTestitPolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
12
13
  disconnectTestit(token: string): Promise<RemoteResult<boolean>>;
14
+ managedServiceCredentials(token: string): Promise<RemoteResult<{
15
+ readonly enabled: boolean;
16
+ readonly defaultForNewConnections: boolean;
17
+ }>>;
18
+ credentialSource(token: string, input: {
19
+ readonly provider: string;
20
+ readonly source: CredentialSource;
21
+ }): Promise<RemoteResult<IntegrationSummary>>;
22
+ serviceBoundary(token: string, input: {
23
+ readonly provider: string;
24
+ readonly selection: IntegrationServiceBoundary | null;
25
+ }): Promise<RemoteResult<IntegrationSummary>>;
13
26
  }
14
27
  export declare function createTestitCard(remote: TestitRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
15
28
  //# sourceMappingURL=testit.d.ts.map
@@ -1,15 +1,28 @@
1
1
  import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
2
- import type { IntegrationInstanceSummary, IntegrationSummary, PolicyPatch } from "../types.js";
2
+ import type { CredentialSource, IntegrationInstanceSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "../types.js";
3
3
  export interface WeblateRemote {
4
4
  weblateInstances(token: string): Promise<RemoteResult<readonly IntegrationInstanceSummary[]>>;
5
5
  getWeblate(token: string): Promise<RemoteResult<IntegrationSummary>>;
6
6
  putWeblateCredential(token: string, input: {
7
7
  readonly instanceId: string;
8
8
  readonly token: string;
9
+ readonly useServiceCredential?: boolean;
9
10
  }): Promise<RemoteResult<IntegrationSummary>>;
10
11
  testWeblate(token: string): Promise<RemoteResult<IntegrationSummary>>;
11
12
  patchWeblatePolicy(token: string, patch: PolicyPatch): Promise<RemoteResult<IntegrationSummary>>;
12
13
  disconnectWeblate(token: string): Promise<RemoteResult<boolean>>;
14
+ managedServiceCredentials(token: string): Promise<RemoteResult<{
15
+ readonly enabled: boolean;
16
+ readonly defaultForNewConnections: boolean;
17
+ }>>;
18
+ credentialSource(token: string, input: {
19
+ readonly provider: string;
20
+ readonly source: CredentialSource;
21
+ }): Promise<RemoteResult<IntegrationSummary>>;
22
+ serviceBoundary(token: string, input: {
23
+ readonly provider: string;
24
+ readonly selection: IntegrationServiceBoundary | null;
25
+ }): Promise<RemoteResult<IntegrationSummary>>;
13
26
  }
14
27
  export declare function createWeblateCard(remote: WeblateRemote): ({ token, help }: import("./provider-card.js").ProviderCardProps) => import("react/jsx-runtime").JSX.Element;
15
28
  //# sourceMappingURL=weblate.d.ts.map
@@ -3,7 +3,7 @@ import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
3
3
  import type { QaSurface } from "@yadsh/dsh-qa-surface";
4
4
  import { IntegrationBroker } from "./broker.js";
5
5
  import { type QaIntegrationsConfig } from "./config.js";
6
- import type { CredentialInput, CredentialSource, IntegrationInstanceSummary, ServiceCredentialHealth, IntegrationProviderId, IntegrationProviderSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "./types.js";
6
+ import type { CredentialSource, IntegrationInstanceSummary, ServiceCredentialHealth, IntegrationProviderId, IntegrationProviderSummary, IntegrationServiceBoundary, IntegrationSummary, PolicyPatch } from "./types.js";
7
7
  export declare const name = "dsh-qa-integrations";
8
8
  export declare const inject: readonly ["qaSurface", "tools"];
9
9
  export declare const Config: import("@deepseek-ai/schemastery").default<QaIntegrationsConfig>;
@@ -21,25 +21,79 @@ export declare class QaIntegrations extends TypertRemoteService {
21
21
  static Config: import("@deepseek-ai/schemastery").default<QaIntegrationsConfig>;
22
22
  readonly broker: IntegrationBroker;
23
23
  private readonly logger;
24
- private readonly enabled;
24
+ private readonly owner;
25
+ private enabled;
25
26
  /** Providers by id; the service-credential registry resolves through them. */
26
- private readonly providerRegistry;
27
+ private providerRegistry;
27
28
  /** Absent unless the deployment configured managed service credentials. */
28
- private readonly serviceCredentials;
29
- private readonly defaultForNewConnections;
30
- private readonly providerSummaries;
31
- private readonly configuredInstances;
29
+ private serviceCredentials;
30
+ private defaultForNewConnections;
31
+ private providerSummaries;
32
+ private configuredInstances;
32
33
  /** The Confluence sites this deployment dials, for the connect form. */
33
- private readonly configuredConfluenceSites;
34
+ private configuredConfluenceSites;
34
35
  /** The Jira Cloud sites this deployment allows, in config order. */
35
- private readonly configuredJiraSites;
36
+ private configuredJiraSites;
36
37
  /** The TeamCity server this deployment dials, or null when it mounts none. */
37
- private readonly configuredServer;
38
+ private configuredServer;
38
39
  /** The Test IT installations this deployment allows, in config order. */
39
- private readonly configuredTestitInstances;
40
+ private configuredTestitInstances;
40
41
  /** The Weblate instances this deployment allows, in config order. */
41
- private readonly configuredWeblateInstances;
42
+ private configuredWeblateInstances;
43
+ /** The Bitrix24 portals this deployment allows, in config order. */
44
+ private configuredBitrix24Portals;
45
+ /**
46
+ * The composition row the Host resolved at load. It stays the base of the
47
+ * settings section, and the configuration source until the namespace takes
48
+ * over, so a deployment without a settings provider keeps booting on it.
49
+ */
50
+ private readonly entryConfig;
51
+ /** Where the live configuration is read from; the settings namespace swaps this. */
52
+ private configSource;
53
+ /**
54
+ * The connection store and its key live for the whole process: connections
55
+ * and wrapped secrets belong to the boot path, and only derivations of the
56
+ * configuration re-apply while running.
57
+ */
58
+ private readonly repository;
59
+ private readonly secrets;
60
+ private readonly bootDataPath;
61
+ private readonly bootMasterKeyPath;
62
+ private readonly bootMasterKeyVersion;
63
+ /** Removers of the currently mounted admission and tool registrations. */
64
+ private toolRemovers;
65
+ /** The mounted tool-name list; an unchanged signature never re-registers. */
66
+ private toolsKey;
42
67
  constructor(ctx: IntegrationsContext, rawConfig?: QaIntegrationsConfig);
68
+ /**
69
+ * Rebuild every configuration-derived surface: the provider registry, the
70
+ * deployment instance lists, the service-credential registry and the tool
71
+ * mount. The store and its key do not travel here — connections and wrapped
72
+ * secrets belong to the boot path, and a card edit that re-points them is
73
+ * answered with a warning instead of a live reopen.
74
+ */
75
+ private applyConfig;
76
+ /**
77
+ * Mount the tools the configuration asks for. The mounted set changes only
78
+ * when the plugin or its one write capability flips, so an unrelated card
79
+ * edit never churns the Host tool registry.
80
+ */
81
+ private syncTools;
82
+ /**
83
+ * Attach the settings namespace. The installed section becomes the plugin's
84
+ * configuration source, so an operator card edit re-applies the running
85
+ * service instead of waiting for a restart; without a settings provider the
86
+ * composition entry stays authoritative. The read is structural and optional:
87
+ * a Host without a mounted settings provider keeps this plugin fully working.
88
+ */
89
+ private installSettings;
90
+ /**
91
+ * Re-resolve the source after a committed settings change and rebuild what
92
+ * derives from it. A source the resolvers refuse keeps the running state:
93
+ * the settings provider validates on write, so this only covers a value
94
+ * that arrived through another path.
95
+ */
96
+ private reapply;
43
97
  describe(): {
44
98
  readonly enabled: boolean;
45
99
  readonly providers: readonly IntegrationProviderId[];
@@ -47,7 +101,13 @@ export declare class QaIntegrations extends TypertRemoteService {
47
101
  providers(token: string): readonly IntegrationProviderSummary[];
48
102
  list(token: string): readonly IntegrationSummary[];
49
103
  getBitrix24(token: string): IntegrationSummary;
50
- putBitrix24Credential(token: string, input: CredentialInput): Promise<IntegrationSummary>;
104
+ putBitrix24Credential(token: string, input: {
105
+ readonly instanceId: string;
106
+ readonly token: string;
107
+ /** Whether the connect form asked for the managed credential instead. */
108
+ readonly useServiceCredential?: boolean | undefined;
109
+ }): Promise<IntegrationSummary>;
110
+ bitrix24Instances(token: string): readonly IntegrationInstanceSummary[];
51
111
  testBitrix24(token: string): Promise<IntegrationSummary>;
52
112
  patchBitrix24Policy(token: string, patch: PolicyPatch): IntegrationSummary;
53
113
  disconnectBitrix24(token: string): boolean;
@@ -83,6 +143,8 @@ export declare class QaIntegrations extends TypertRemoteService {
83
143
  readonly instanceId: string;
84
144
  readonly email: string;
85
145
  readonly token: string;
146
+ /** Whether the connect form asked for the managed credential instead. */
147
+ readonly useServiceCredential?: boolean | undefined;
86
148
  }): Promise<IntegrationSummary>;
87
149
  testConfluence(token: string): Promise<IntegrationSummary>;
88
150
  patchConfluencePolicy(token: string, patch: PolicyPatch): IntegrationSummary;
@@ -121,6 +183,8 @@ export declare class QaIntegrations extends TypertRemoteService {
121
183
  readonly siteId: string;
122
184
  readonly email: string;
123
185
  readonly token: string;
186
+ /** Whether the connect form asked for the managed credential instead. */
187
+ readonly useServiceCredential?: boolean | undefined;
124
188
  }): Promise<IntegrationSummary>;
125
189
  testJira(token: string): Promise<IntegrationSummary>;
126
190
  patchJiraPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
@@ -135,6 +199,8 @@ export declare class QaIntegrations extends TypertRemoteService {
135
199
  putTestitCredential(token: string, input: {
136
200
  readonly instanceId: string;
137
201
  readonly token: string;
202
+ /** Whether the connect form asked for the managed credential instead. */
203
+ readonly useServiceCredential?: boolean | undefined;
138
204
  }): Promise<IntegrationSummary>;
139
205
  testTestit(token: string): Promise<IntegrationSummary>;
140
206
  patchTestitPolicy(token: string, patch: PolicyPatch): IntegrationSummary;
@@ -149,6 +215,8 @@ export declare class QaIntegrations extends TypertRemoteService {
149
215
  putWeblateCredential(token: string, input: {
150
216
  readonly instanceId: string;
151
217
  readonly token: string;
218
+ /** Whether the connect form asked for the managed credential instead. */
219
+ readonly useServiceCredential?: boolean | undefined;
152
220
  }): Promise<IntegrationSummary>;
153
221
  testWeblate(token: string): Promise<IntegrationSummary>;
154
222
  patchWeblatePolicy(token: string, patch: PolicyPatch): IntegrationSummary;
@@ -1,4 +1,5 @@
1
1
  import type { IntegrationCapability, IntegrationCapabilityInfo } from "../../types.js";
2
+ import type { OperationSecurityMetadata } from "../../service-credentials/types.js";
2
3
  import type { Bitrix24Flags } from "./config.js";
3
4
  /**
4
5
  * Capabilities this provider can offer, one per Bitrix24 webhook scope. `scopes`
@@ -32,6 +33,13 @@ export interface BitrixOperationDefinition {
32
33
  /** REST method as called over the webhook, without the `.json` suffix. */
33
34
  readonly method: string;
34
35
  readonly list?: BitrixListShape;
36
+ /**
37
+ * Security classification for the managed service credential. Bitrix24 has
38
+ * no project tree, so the resource a service call has to stay inside is the
39
+ * portal itself: every boundary-required operation names the `"portals"`
40
+ * kind, and the profile's `resources.portals` has to name the portal host.
41
+ */
42
+ readonly security: OperationSecurityMetadata;
35
43
  }
36
44
  /**
37
45
  * Every model-reachable operation. The provider refuses any operation that is
@@ -1,4 +1,16 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
+ /**
3
+ * One operator-declared Bitrix24 portal. A personal connection names its
4
+ * portal implicitly, through the webhook URL; a managed service credential
5
+ * needs the portal named by the deployment, because the profile binds to it —
6
+ * the registry matches a profile to a connection by this host.
7
+ */
8
+ export interface Bitrix24Instance {
9
+ readonly id: string;
10
+ readonly label: string;
11
+ /** Portal hostname (lowercase, no scheme, no path), e.g. company.bitrix24.ru. */
12
+ readonly portal: string;
13
+ }
2
14
  /**
3
15
  * Deployment switches for the Bitrix24 provider. Every read scope is on by
4
16
  * default: a capability is offered to the agent only when the connected webhook
@@ -23,31 +35,10 @@ export interface Bitrix24Flags {
23
35
  readonly tasksRead: boolean;
24
36
  readonly calendarRead: boolean;
25
37
  readonly diskRead: boolean;
38
+ readonly instances: readonly Bitrix24Instance[];
26
39
  }
27
40
  export declare const BITRIX24_DEFAULTS: Bitrix24Flags;
28
41
  /** Config slice of this provider, as it appears under `bitrix24:` in YAML. */
29
- export declare const bitrix24ConfigSchema: z<Schemastery.ObjectS<{
30
- enabled: z<boolean, boolean>;
31
- crmRead: z<boolean, boolean>;
32
- crmCommentWrite: z<boolean, boolean>;
33
- chatRead: z<boolean, boolean>;
34
- openlinesRead: z<boolean, boolean>;
35
- userRead: z<boolean, boolean>;
36
- departmentRead: z<boolean, boolean>;
37
- tasksRead: z<boolean, boolean>;
38
- calendarRead: z<boolean, boolean>;
39
- diskRead: z<boolean, boolean>;
40
- }>, Schemastery.ObjectT<{
41
- enabled: z<boolean, boolean>;
42
- crmRead: z<boolean, boolean>;
43
- crmCommentWrite: z<boolean, boolean>;
44
- chatRead: z<boolean, boolean>;
45
- openlinesRead: z<boolean, boolean>;
46
- userRead: z<boolean, boolean>;
47
- departmentRead: z<boolean, boolean>;
48
- tasksRead: z<boolean, boolean>;
49
- calendarRead: z<boolean, boolean>;
50
- diskRead: z<boolean, boolean>;
51
- }>>;
42
+ export declare const bitrix24ConfigSchema: z<Partial<Bitrix24Flags>>;
52
43
  export declare function resolveBitrix24Config(input?: Partial<Bitrix24Flags>): Bitrix24Flags;
53
44
  //# sourceMappingURL=config.d.ts.map
@@ -1,6 +1,7 @@
1
1
  import { type CredentialHelp } from "@yadsh/dsh-plugin-kit";
2
2
  import type { ResolvedQaIntegrationsConfig } from "../../config.js";
3
- import type { IntegrationCapability, IntegrationCapabilityInfo, ProviderValidation } from "../../types.js";
3
+ import type { CapabilityServiceState, IntegrationCapability, IntegrationCapabilityInfo, ProviderValidation, ServiceCredentialHealth } from "../../types.js";
4
+ import type { OperationSecurityMetadata } from "../../service-credentials/types.js";
4
5
  import type { IntegrationProvider, ProviderContext } from "../contract.js";
5
6
  export { credentialFromPlaintext, parseBitrixWebhook, type BitrixCredential, } from "./transport.js";
6
7
  /** Bitrix24 provider: incoming-webhook credentials over the Bitrix24 REST API. */
@@ -23,7 +24,41 @@ export declare class Bitrix24Provider implements IntegrationProvider {
23
24
  readonly portal: string;
24
25
  };
25
26
  operationCapability(operation: string): IntegrationCapability | undefined;
27
+ /**
28
+ * Security classification of one operation, straight from the catalog: an
29
+ * operation the catalog does not list is unclassified and unreachable
30
+ * through the managed credential.
31
+ */
32
+ operationMetadata(operation: string): OperationSecurityMetadata | undefined;
33
+ /**
34
+ * How one capability behaves under the managed credential. A capability that
35
+ * mixes portal reads with personal-only reads (CRM: the call transcript and
36
+ * the duplicate lookup stay personal) reports `sensitive`, so the card says
37
+ * what the connection loses in service mode.
38
+ */
39
+ capabilityServiceState(capability: IntegrationCapability): CapabilityServiceState | undefined;
40
+ /**
41
+ * Bitrix24 scopes by portal, not by project, so `"portals"` is the one
42
+ * boundary kind: the profile names the portal hosts a service account may
43
+ * work inside, and every boundary-required call checks against them.
44
+ */
45
+ resourceBoundaryKind(operation: string): string | undefined;
46
+ /**
47
+ * Portal host of one configured instance, so deployment configuration can
48
+ * name an instance the same way the connect form does and a typo fails at
49
+ * load. The host — not the URL — is the form a stored portal carries.
50
+ */
51
+ instancePortal(instanceId: string): string | undefined;
26
52
  validate(context: ProviderContext): Promise<ProviderValidation>;
53
+ /**
54
+ * Health of a deployment-managed webhook. The probe reads only the identity
55
+ * and scope self-inspection methods, so it never changes upstream state.
56
+ * Bitrix24 webhook scopes are coarse — the `crm` scope reads and writes with
57
+ * one bit — so the probe cannot certify read-only the way GitLab scopes can;
58
+ * the answer says so, and the local service ceiling is what bounds the
59
+ * credential either way.
60
+ */
61
+ validateServiceCredential(context: ProviderContext): Promise<ServiceCredentialHealth>;
27
62
  execute(context: ProviderContext, operation: string, input: Readonly<Record<string, unknown>>): Promise<unknown>;
28
63
  /**
29
64
  * The scopes the connected webhook was actually granted. A portal that