@jini-ai/integrations 0.6.19 → 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 (66) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/api-connections/access-token.js +4 -14
  3. package/dist/api-connections/account-actions.d.ts +6 -1
  4. package/dist/api-connections/attempt-state.d.ts +2 -2
  5. package/dist/api-connections/attempt-state.js +10 -11
  6. package/dist/api-connections/authorization.js +13 -20
  7. package/dist/api-connections/budgets.d.ts +91 -0
  8. package/dist/api-connections/budgets.js +87 -0
  9. package/dist/api-connections/byo-client.d.ts +38 -0
  10. package/dist/api-connections/byo-client.js +28 -0
  11. package/dist/api-connections/connect.d.ts +87 -0
  12. package/dist/api-connections/connect.js +143 -0
  13. package/dist/api-connections/declarations.d.ts +68 -0
  14. package/dist/api-connections/declarations.js +178 -0
  15. package/dist/api-connections/deps.d.ts +4 -1
  16. package/dist/api-connections/descriptor.d.ts +15 -0
  17. package/dist/api-connections/descriptor.js +1 -5
  18. package/dist/api-connections/finish-authorization.d.ts +1 -1
  19. package/dist/api-connections/hook-http.d.ts +20 -0
  20. package/dist/api-connections/hook-http.js +27 -0
  21. package/dist/api-connections/host-ports.d.ts +244 -0
  22. package/dist/api-connections/host-ports.js +2 -0
  23. package/dist/api-connections/host.d.ts +81 -0
  24. package/dist/api-connections/host.js +320 -0
  25. package/dist/api-connections/hosted-mcp/contracts.d.ts +291 -0
  26. package/dist/api-connections/hosted-mcp/contracts.js +2 -0
  27. package/dist/api-connections/hosted-mcp/index.d.ts +5 -0
  28. package/dist/api-connections/hosted-mcp/index.js +3 -0
  29. package/dist/api-connections/hosted-mcp/shared-sign-in.d.ts +167 -0
  30. package/dist/api-connections/hosted-mcp/shared-sign-in.js +293 -0
  31. package/dist/api-connections/hosted-mcp/sign-in.d.ts +25 -0
  32. package/dist/api-connections/hosted-mcp/sign-in.js +889 -0
  33. package/dist/api-connections/hosted-sign-in.d.ts +48 -0
  34. package/dist/api-connections/hosted-sign-in.js +51 -0
  35. package/dist/api-connections/index.d.ts +23 -1
  36. package/dist/api-connections/index.js +15 -0
  37. package/dist/api-connections/install-credential.d.ts +1 -1
  38. package/dist/api-connections/oauth-capabilities.d.ts +63 -0
  39. package/dist/api-connections/oauth-capabilities.js +2 -0
  40. package/dist/api-connections/ports.d.ts +1 -1
  41. package/dist/api-connections/request-checks.d.ts +11 -1
  42. package/dist/api-connections/request-checks.js +2 -3
  43. package/dist/api-connections/shared.d.ts +79 -0
  44. package/dist/api-connections/shared.js +106 -0
  45. package/dist/api-connections/token-store/record.d.ts +2 -2
  46. package/dist/api-connections/token-store/vault-token-store.d.ts +30 -4
  47. package/dist/api-connections/token-store/vault-token-store.js +1 -4
  48. package/dist/credentialed-http/sets/host.d.ts +146 -0
  49. package/dist/credentialed-http/sets/host.js +2 -0
  50. package/dist/credentialed-http/sets/index.d.ts +24 -0
  51. package/dist/credentialed-http/sets/index.js +24 -0
  52. package/dist/credentialed-http/sets/store.d.ts +193 -0
  53. package/dist/credentialed-http/sets/store.js +489 -0
  54. package/dist/credentialed-http/sets/vault-repo.d.ts +81 -0
  55. package/dist/credentialed-http/sets/vault-repo.js +147 -0
  56. package/dist/credentialed-http/tools/credential-copy-tool.d.ts +34 -0
  57. package/dist/credentialed-http/tools/credential-copy-tool.js +132 -0
  58. package/dist/credentialed-http/tools/credential-tool-host.d.ts +152 -0
  59. package/dist/credentialed-http/tools/credential-tool-host.js +2 -0
  60. package/dist/credentialed-http/tools/credential-tool-operations.d.ts +370 -0
  61. package/dist/credentialed-http/tools/credential-tool-operations.js +2 -0
  62. package/dist/credentialed-http/tools/index.d.ts +7 -0
  63. package/dist/credentialed-http/tools/index.js +4 -0
  64. package/dist/credentialed-http/tools/tool-registrations.d.ts +55 -0
  65. package/dist/credentialed-http/tools/tool-registrations.js +729 -0
  66. package/package.json +34 -11
@@ -0,0 +1,146 @@
1
+ import type { CredentialSetKeyringPort, CredentialSetProjectScope, CredentialSetRepoPort, CredentialSetScope } from "@jini-ai/core/contracts/credentials";
2
+ import type { SecretSealerPort, VaultContext, VaultErrorCode, VaultIdentity, VaultMeta, VaultPutRecord, VaultSummary } from "@jini-ai/core/contracts/vault";
3
+ /**
4
+ * @file Host-input contracts for the credential-set store and vault adapter. Every product value
5
+ * (owner key, metadata policy, categories, scope policy, error factories, wording) is a REQUIRED
6
+ * host input; this module has no default for any of them. Types only.
7
+ * Provenance: moved unchanged (EXTRACT-S8 C1 move) from the first host's credential-set seam file
8
+ * `sets/host.ts` at its commit 43a0e5d4; earlier history lives in that host's repository.
9
+ */
10
+ /**
11
+ * @agent-note Canonical vault errors. `create` MUST return the host's canonical vault error
12
+ * (the same class its vault service throws) so callers keep one identity per code; `codeOf` MUST
13
+ * recognize exactly those errors and return `undefined` for anything else.
14
+ */
15
+ export interface CredentialSetVaultErrors {
16
+ create(required: {
17
+ code: VaultErrorCode;
18
+ }, optionalArgs?: Record<string, never>): Error;
19
+ codeOf(error: unknown): VaultErrorCode | undefined;
20
+ }
21
+ /**
22
+ * @agent-note Trusted row policy, fixed by the host's composition root and never taken from model
23
+ * or request input. Rows are accepted only with this `ownerKey`, a null principal, binding and
24
+ * provider, and kind `vendor` (with `meta.credentialType === "custom"`) or legacy kind `custom`.
25
+ * The legacy kind is a read bridge, not a rewrite: the stored kind authenticates old envelopes (AAD),
26
+ * so writes keep it. `parseMeta` must be the same complete-shape parser the host's vault service
27
+ * uses for that kind; frozen stored metadata must keep parsing unchanged. `labelConflict` is the
28
+ * host's historical raw UNIQUE error for a label collision detected as a vault CAS conflict.
29
+ */
30
+ export interface CredentialSetVaultPolicy {
31
+ readonly ownerKey: string;
32
+ parseMeta(input: {
33
+ kind: "vendor" | "custom";
34
+ meta: unknown;
35
+ provider?: string | null;
36
+ }): VaultMeta;
37
+ compareLabels(a: {
38
+ label: string;
39
+ }, b: {
40
+ label: string;
41
+ }): number;
42
+ readonly vaultErrors: CredentialSetVaultErrors;
43
+ labelConflict(required: Record<string, never>): Error;
44
+ }
45
+ /** @agent-note Indexed, authorization-preserving label lookup over the SAME vault the repo holds. */
46
+ export type CredentialSetRowByLabel = (input: {
47
+ workspaceId: string;
48
+ label: string;
49
+ }) => Promise<VaultPutRecord | null>;
50
+ /** The deps object a scope carries: at least a repo (with an optional project half). */
51
+ export interface CredentialSetScopeCarrier {
52
+ readonly repo: {
53
+ readonly project?: CredentialSetProjectScope<string>;
54
+ };
55
+ }
56
+ /** One store a site reads credentials from, with the deps that open its rows. */
57
+ export interface CredentialSetScoped<D> {
58
+ readonly deps: D;
59
+ readonly workspaceId: string;
60
+ readonly scope: CredentialSetScope;
61
+ }
62
+ /** @agent-note The host's vault service, already constrained to one owner/kind. Must authorize the full
63
+ * expected context before sealing/opening and map only crypto failures to the host storage error. */
64
+ export interface CredentialSetVaultService {
65
+ prepare(input: CredentialSetPrepareInput): Promise<VaultPutRecord>;
66
+ get(input: VaultIdentity): Promise<{
67
+ summary: VaultSummary;
68
+ payload: VaultMeta | null;
69
+ } | null>;
70
+ }
71
+ /** One validated create/replace: full expected context, CAS revision, metadata and optional new token. */
72
+ export type CredentialSetPrepareInput = VaultContext & {
73
+ id: string;
74
+ expectedRevision: number | null;
75
+ provider: null;
76
+ label: string;
77
+ meta: VaultMeta;
78
+ payload?: {
79
+ token: string;
80
+ };
81
+ hintToken?: string;
82
+ };
83
+ /** Deps the vault opener receives: the repo the row lives in and the store's own crypto ports. */
84
+ export interface CredentialSetOpenDeps<C extends string> {
85
+ repo: CredentialSetRepoPort<C>;
86
+ sealer: SecretSealerPort;
87
+ keyring?: CredentialSetKeyringPort;
88
+ clock?: {
89
+ nowMs(): number;
90
+ };
91
+ }
92
+ /**
93
+ * @agent-note Everything product-specific the credential-set store needs. Scope policy order is
94
+ * site first, then the granted project half; `createTarget` writes to the project store unless the
95
+ * caller asked for the site. Token policy (normalization, secret-free field checks, including any
96
+ * host secret detectors) runs in the same order as before and its input errors are re-thrown as the
97
+ * store's validation error with the same message. All `messages` are host wording returned verbatim.
98
+ */
99
+ export interface CredentialSetStoreHost<C extends string> {
100
+ readonly vault: CredentialSetVaultPolicy;
101
+ openVault(required: {
102
+ deps: CredentialSetOpenDeps<C>;
103
+ kind: "vendor" | "custom";
104
+ }): CredentialSetVaultService;
105
+ scopes<D extends CredentialSetScopeCarrier>(deps: D, workspaceId: string): CredentialSetScoped<D>[];
106
+ createTarget<D extends CredentialSetScopeCarrier>(deps: D, input: {
107
+ workspaceId: string;
108
+ scope?: unknown;
109
+ }, invalid: (message: string) => Error): CredentialSetScoped<D>;
110
+ isUniqueViolation(error: unknown): boolean;
111
+ /** The host's own "create port refused this label/identity" error; its message is kept. */
112
+ isCreateConflict(error: unknown): error is Error;
113
+ readonly token: {
114
+ normalize(required: {
115
+ value: unknown;
116
+ }): string;
117
+ assertFreeField(required: {
118
+ value: string;
119
+ field: string;
120
+ }): void;
121
+ isInputError(error: unknown): error is Error;
122
+ };
123
+ /** Canonical provider-id parser; throws the host's canonical vault error on invalid input. */
124
+ normalizeWorksFor(required: {
125
+ value: unknown;
126
+ }): string[];
127
+ readonly categories: readonly C[];
128
+ readonly messages: CredentialSetStoreMessages;
129
+ }
130
+ /** @agent-note Host wording, verbatim. Product names, codes and help text belong here, never in this module. */
131
+ export interface CredentialSetStoreMessages {
132
+ readonly storage: string;
133
+ readonly worksForInvalid: string;
134
+ readonly sharedReplacementReadOnly: string;
135
+ readonly sharedDeleteReadOnly: string;
136
+ duplicateLabel(required: {
137
+ label: string;
138
+ }): string;
139
+ projectDuplicateLabel(required: {
140
+ label: string;
141
+ }): string;
142
+ notFound(required: {
143
+ id: string;
144
+ }): string;
145
+ }
146
+ //# sourceMappingURL=host.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=host.js.map
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @file Public entry `@jini-ai/integrations/credentialed-http/sets`: credential-set validation and
3
+ * CRUD over a host-supplied vault, plus the host-input contracts it needs.
4
+ *
5
+ * @agent-note A second host wires this entry by supplying EVERY product value; none has a default:
6
+ * - `CredentialSetVaultPolicy`: the trusted owner key (rows carry null principal/binding), the
7
+ * complete-shape metadata parser its vault service uses, the label order, the raw label-conflict
8
+ * error its storage raises, and `vaultErrors` returning/recognizing the host's ONE canonical vault
9
+ * error class per code (never a new class here).
10
+ * - `CredentialSetStoreHost`: categories (stored `category` strings are kept byte-for-byte), scope
11
+ * policy (site first, then a granted project half), create target, UNIQUE/create-conflict
12
+ * classifiers, token normalization + secret-free field checks, works-for normalization, the vault
13
+ * opener (authorizes the full expected context before any seal/open), and all wording verbatim.
14
+ * - Metadata reads never decrypt; resolve opens only the selected, authorized row with the metadata
15
+ * read in the same pass. Writes are compare-and-swap on the stored revision inside the host's
16
+ * transaction, preserve the stored kind (legacy `custom` envelopes keep authenticating) and never
17
+ * serialize the private vault context. `allowSharedKeyReplacement` is trusted host input, never
18
+ * model input. The error classes exported here are the canonical ones; a host shim must re-export
19
+ * these same objects rather than subclass or copy them.
20
+ */
21
+ export * from "./host.js";
22
+ export * from "./vault-repo.js";
23
+ export * from "./store.js";
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @file Public entry `@jini-ai/integrations/credentialed-http/sets`: credential-set validation and
3
+ * CRUD over a host-supplied vault, plus the host-input contracts it needs.
4
+ *
5
+ * @agent-note A second host wires this entry by supplying EVERY product value; none has a default:
6
+ * - `CredentialSetVaultPolicy`: the trusted owner key (rows carry null principal/binding), the
7
+ * complete-shape metadata parser its vault service uses, the label order, the raw label-conflict
8
+ * error its storage raises, and `vaultErrors` returning/recognizing the host's ONE canonical vault
9
+ * error class per code (never a new class here).
10
+ * - `CredentialSetStoreHost`: categories (stored `category` strings are kept byte-for-byte), scope
11
+ * policy (site first, then a granted project half), create target, UNIQUE/create-conflict
12
+ * classifiers, token normalization + secret-free field checks, works-for normalization, the vault
13
+ * opener (authorizes the full expected context before any seal/open), and all wording verbatim.
14
+ * - Metadata reads never decrypt; resolve opens only the selected, authorized row with the metadata
15
+ * read in the same pass. Writes are compare-and-swap on the stored revision inside the host's
16
+ * transaction, preserve the stored kind (legacy `custom` envelopes keep authenticating) and never
17
+ * serialize the private vault context. `allowSharedKeyReplacement` is trusted host input, never
18
+ * model input. The error classes exported here are the canonical ones; a host shim must re-export
19
+ * these same objects rather than subclass or copy them.
20
+ */
21
+ export * from "./host.js";
22
+ export * from "./vault-repo.js";
23
+ export * from "./store.js";
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,193 @@
1
+ import type { CredentialSetConnectionInput, CredentialSetKeyringPort, CredentialSetRepoPort, CredentialSetSummary } from "@jini-ai/core/contracts/credentials";
2
+ import type { SecretSealerPort } from "@jini-ai/core/contracts/vault";
3
+ import type { Clock as ClockPort, UUID } from "@jini-ai/core/primitives";
4
+ import type { CredentialSetStoreHost } from "./host.js";
5
+ /** Shorthand for the required host input every operation below receives. */
6
+ type Host<C extends string> = CredentialSetStoreHost<C>;
7
+ export declare class CustomCredentialValidationError extends Error {
8
+ }
9
+ /** A `(workspaceId, label)` collision — the route maps this to `409 DUPLICATE_LABEL`. */
10
+ export declare class CustomCredentialDuplicateLabelError extends Error {
11
+ }
12
+ /** A share copied an older revision; the concurrently changed site row remains intact. */
13
+ export declare class CustomCredentialConcurrentModificationError extends Error {
14
+ }
15
+ /** Thrown when `sealer.seal()`/`keyring.activeKey()` fails while writing a connection — the
16
+ * realistic cause is a missing store key (a host environment setting), same fail-closed
17
+ * contract every sibling credential table's store documents. */
18
+ export declare class CustomCredentialSecretStoreUnconfiguredError extends Error {
19
+ }
20
+ export declare class CustomCredentialNotFoundError extends Error {
21
+ }
22
+ /** Presence inventory never needs a sealer or write ports. */
23
+ export interface CredentialSetInventoryDeps<C extends string = string> {
24
+ repo: Pick<CredentialSetRepoPort<C>, "listByWorkspace" | "project">;
25
+ }
26
+ export interface CredentialSetReadDeps<C extends string = string> {
27
+ repo: CredentialSetRepoPort<C>;
28
+ sealer?: SecretSealerPort;
29
+ }
30
+ /** Every exported operation's required input: the host policy, the store deps, and the request. */
31
+ export interface CredentialSetCall<C extends string, D, I> {
32
+ host: Host<C>;
33
+ deps: D;
34
+ input: I;
35
+ }
36
+ /**
37
+ * The read model for ONE credential set. Pure DB read — no sealer, no keyring, cannot fail on a
38
+ * misconfigured site key. Returns `null` if no row exists for `(workspaceId, id)` (not an
39
+ * error — the caller decides whether that is a 404).
40
+ *
41
+ * @agent-note Metadata only: never opens an envelope.
42
+ * @complexity O(1) — one `findById` lookup.
43
+ */
44
+ export declare function describeCredentialSet<C extends string>({ host, deps, input }: CredentialSetCall<C, CredentialSetReadDeps<C>, {
45
+ workspaceId: UUID;
46
+ id: UUID;
47
+ }>, _optional?: {}): Promise<CredentialSetSummary<C> | null>;
48
+ /**
49
+ * The non-decrypting sibling of {@link resolveCredentialSetByLabel}: finds a credential by its
50
+ * exact label and returns its read model — `baseUrl`/`additionalHosts` included, since both are
51
+ * plaintext metadata — WITHOUT ever touching `sealer`/`keyring`. Exists so a caller that only needs
52
+ * to validate a request's target origin or render a confirmation dialog never has to decrypt just to
53
+ * read two plaintext fields — the same "never touches the sealer" contract
54
+ * {@link describeCredentialSet} already documents, applied to a label lookup instead of an id lookup.
55
+ *
56
+ * @agent-note Metadata only: never opens an envelope.
57
+ * @complexity O(n) in the workspace's own (small) credential-set count, or one indexed read where
58
+ * the repo supplies `findByLabel`.
59
+ */
60
+ export declare function describeCredentialSetByLabel<C extends string>({ host, deps, input }: CredentialSetCall<C, CredentialSetReadDeps<C>, {
61
+ workspaceId: UUID;
62
+ label: string;
63
+ }>, _optional?: {}): Promise<CredentialSetSummary<C> | null>;
64
+ /**
65
+ * The effective credential sets this workspace uses. The admin inventory has its own unfiltered
66
+ * read model below. Same "never decrypts" contract as {@link describeCredentialSet}.
67
+ *
68
+ * @complexity O(n) in the workspace's own (small) credential-set count. One repo read, one array
69
+ * map, no per-row I/O.
70
+ */
71
+ export declare function listCredentialSets<C extends string>({ host, deps, input }: CredentialSetCall<C, CredentialSetInventoryDeps<C>, {
72
+ workspaceId: UUID;
73
+ }>, _optional?: {}): Promise<CredentialSetSummary<C>[]>;
74
+ /** Admin inventory includes unattached project keys and same-label site overrides. The existing
75
+ * guarded metadata repo exposes those rows without changing runtime credential resolution.
76
+ * @param required Host policy, metadata repositories and the current site's workspace id.
77
+ * @returns Safe summaries only; never opens an envelope.
78
+ * @throws Repository or metadata-validation errors propagate to the admin adapter.
79
+ * @complexity O(n log n) time and O(n) space for n saved keys; at most two store reads, no per-key I/O.
80
+ * @example await listCredentialSetInventory({ host, deps, workspaceId });
81
+ */
82
+ export declare function listCredentialSetInventory<C extends string>({ host, deps, workspaceId }: {
83
+ host: Host<C>;
84
+ deps: CredentialSetInventoryDeps<C>;
85
+ workspaceId: UUID;
86
+ }, _optional?: {}): Promise<CredentialSetSummary<C>[]>;
87
+ export interface CredentialSetWriteDeps<C extends string = string> extends CredentialSetReadDeps<C> {
88
+ /** @agent-note Trusted owner session after human submission; never populated from tool, model or
89
+ * request input. */
90
+ allowSharedKeyReplacement?: boolean;
91
+ sealer: SecretSealerPort;
92
+ keyring: CredentialSetKeyringPort;
93
+ clock: ClockPort;
94
+ idGen: {
95
+ newId(): string;
96
+ };
97
+ }
98
+ export interface CreateCredentialSetInput {
99
+ workspaceId: UUID;
100
+ label: unknown;
101
+ category: unknown;
102
+ baseUrl: unknown;
103
+ connection: unknown;
104
+ /** Omitted = no extra hosts beyond `baseUrl`. See `validateAdditionalHosts`'s own doc. */
105
+ additionalHosts?: unknown;
106
+ worksFor?: unknown;
107
+ /** `"site"` = a site-owned key. Omitted (or `"project"`) = the project store when one is
108
+ * attached, visible to attached sites only; this site's vault otherwise. */
109
+ scope?: unknown;
110
+ }
111
+ /**
112
+ * Validates, seals, and inserts a new credential set. `id` is minted here (`deps.idGen`), not
113
+ * caller-supplied.
114
+ *
115
+ * @agent-note Validation order is label, category, baseUrl, additionalHosts, connection, then scope;
116
+ * one seal (via `host.openVault(...).prepare`) and one insert follow. Ownership comes from the
117
+ * trusted host policy, never from input.
118
+ * @throws {CustomCredentialValidationError} `label`/`category`/`baseUrl`/`connection` fails shape
119
+ * validation.
120
+ * @throws {CustomCredentialDuplicateLabelError} `(workspaceId, label)` already exists.
121
+ * @throws {CustomCredentialSecretStoreUnconfiguredError} The store key is unavailable.
122
+ * @complexity O(1) plus one keyring derivation, one seal, and one insert (which may itself throw on
123
+ * the UNIQUE index, translated here rather than propagated raw).
124
+ */
125
+ export declare function createCredentialSet<C extends string>({ host, deps, input }: CredentialSetCall<C, CredentialSetWriteDeps<C>, CreateCredentialSetInput>, _optional?: {}): Promise<CredentialSetSummary<C>>;
126
+ export interface UpdateCredentialSetInput {
127
+ workspaceId: UUID;
128
+ id: UUID;
129
+ /** Omitted = leave the label unchanged. */
130
+ label?: unknown;
131
+ /** Omitted = leave the category unchanged. */
132
+ category?: unknown;
133
+ /** Omitted = leave the base URL unchanged. */
134
+ baseUrl?: unknown;
135
+ /** Omitted = leave the additional hosts unchanged. Supplying a value REPLACES the whole list
136
+ * (never merges). */
137
+ additionalHosts?: unknown;
138
+ worksFor?: unknown;
139
+ /** Omitted = leave the stored connection untouched — same "omitting `connection` keeps the
140
+ * secret" contract every sibling credential route documents. */
141
+ connection?: unknown;
142
+ /**
143
+ * Independent, top-level control over the plaintext `username` metadata, so an operator can fix a
144
+ * saved credential's username WITHOUT retyping the token.
145
+ *
146
+ * Three states, validated by {@link validateUsernamePatch}: omitted (`undefined`) leaves the column
147
+ * exactly as `connection` (if supplied) would otherwise have set it; `null` explicitly clears it;
148
+ * any other value must be a non-empty string. See `updateCredentialSet`'s own doc for the
149
+ * precedence rule when this field AND `connection` are both supplied in the same call.
150
+ */
151
+ username?: unknown;
152
+ }
153
+ /** Partial update: blank/omitted connection preserves the envelope, replacing a connection resets
154
+ * its username, and a supplied top-level username wins (null clears). Username is metadata only;
155
+ * removing the old ciphertext fallback makes clear impossible to resurrect, without opening it.
156
+ * @agent-note The row keeps its stored kind (legacy `custom` stays `custom`) so its AAD still
157
+ * authenticates; the write is CAS on the revision read here, through the store that holds the row.
158
+ * @complexity Constant queries/seals plus metadata size; CAS rejects a concurrent replacement.
159
+ */
160
+ export declare function updateCredentialSet<C extends string>({ host, deps, input }: CredentialSetCall<C, CredentialSetWriteDeps<C>, UpdateCredentialSetInput>, _optional?: {}): Promise<CredentialSetSummary<C>>;
161
+ /**
162
+ * Deletes a credential set. No-op (not an error) if no row exists for `(workspaceId, id)` — matches
163
+ * `CredentialSetRepoPort.delete`'s own idempotent contract.
164
+ *
165
+ * @complexity O(1).
166
+ */
167
+ export declare function deleteCredentialSet<C extends string>({ host, deps, input }: CredentialSetCall<C, CredentialSetReadDeps<C>, {
168
+ workspaceId: UUID;
169
+ id: UUID;
170
+ }>, _optional?: {}): Promise<void>;
171
+ export interface CredentialSetResolveDeps<C extends string = string> {
172
+ repo: CredentialSetRepoPort<C>;
173
+ sealer: SecretSealerPort;
174
+ }
175
+ /** Select by saved label without opening, then open only that row under its expected ownership.
176
+ * Saved metadata is the authoritative source of allowed origins and username, including clears.
177
+ * @agent-note Exactly one envelope is opened: the selected, authorized row, with the store that
178
+ * holds it. Origins and username come from the SAME read as the token.
179
+ * @throws CustomCredentialSecretStoreUnconfiguredError on crypto failure.
180
+ * @complexity O(n) metadata selection, n workspace rows, plus one selected envelope open.
181
+ */
182
+ export declare function resolveCredentialSetByLabel<C extends string>({ host, deps, input }: CredentialSetCall<C, CredentialSetResolveDeps<C>, {
183
+ workspaceId: UUID;
184
+ label: string;
185
+ }>, _optional?: {}): Promise<{
186
+ id: UUID;
187
+ category: C;
188
+ baseUrl: string;
189
+ additionalHosts: readonly string[];
190
+ connection: CredentialSetConnectionInput;
191
+ } | null>;
192
+ export {};
193
+ //# sourceMappingURL=store.d.ts.map