@jini-ai/integrations 0.7.3-next.2 → 0.7.4

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 (189) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -0
  3. package/dist/api-connections/bundled-client-namespace.d.ts +24 -0
  4. package/dist/api-connections/bundled-client-namespace.js +22 -0
  5. package/dist/api-connections/connect.d.ts +2 -10
  6. package/dist/api-connections/connect.js +1 -1
  7. package/dist/api-connections/contribution.d.ts +71 -0
  8. package/dist/api-connections/contribution.js +69 -0
  9. package/dist/api-connections/form-delivery-connection.d.ts +68 -0
  10. package/dist/api-connections/form-delivery-connection.js +73 -0
  11. package/dist/api-connections/hosted-mcp/contracts.d.ts +4 -171
  12. package/dist/api-connections/hosted-mcp/index.d.ts +2 -0
  13. package/dist/api-connections/hosted-mcp/oauth-row-writes.d.ts +3 -1
  14. package/dist/api-connections/hosted-mcp/oauth-row-writes.js +6 -3
  15. package/dist/api-connections/hosted-mcp/shared-sign-in.d.ts +2 -1
  16. package/dist/api-connections/hosted-mcp/sign-in-configuration.js +1 -1
  17. package/dist/api-connections/hosted-mcp/sign-in-discovery.js +1 -1
  18. package/dist/api-connections/hosted-mcp/sign-in-flow.d.ts +9 -3
  19. package/dist/api-connections/hosted-mcp/sign-in-flow.js +6 -6
  20. package/dist/api-connections/hosted-mcp/sign-in-provider.d.ts +16 -4
  21. package/dist/api-connections/hosted-mcp/sign-in-provider.js +3 -3
  22. package/dist/api-connections/hosted-mcp/sign-in-status.d.ts +13 -2
  23. package/dist/api-connections/hosted-mcp/sign-in-status.js +17 -4
  24. package/dist/api-connections/hosted-mcp/sign-in.d.ts +1 -1
  25. package/dist/api-connections/hosted-mcp/sign-in.js +28 -30
  26. package/dist/api-connections/shared-api.d.ts +87 -0
  27. package/dist/api-connections/shared-api.js +135 -0
  28. package/dist/api-connections/shared-oauth-disconnect.d.ts +73 -0
  29. package/dist/api-connections/shared-oauth-disconnect.js +41 -0
  30. package/dist/api-connections/shared-owner.d.ts +107 -0
  31. package/dist/api-connections/shared-owner.js +79 -0
  32. package/dist/api-connections/vault-stores.d.ts +110 -0
  33. package/dist/api-connections/vault-stores.js +202 -0
  34. package/dist/credentialed-http/auth-schemes.d.ts +2 -9
  35. package/dist/credentialed-http/tools/index.d.ts +30 -0
  36. package/dist/credentialed-http/tools/index.js +19 -0
  37. package/dist/credentialed-http/tools/tool-registrations.js +0 -1
  38. package/dist/custom-credentials/agent-tools.d.ts +79 -0
  39. package/dist/custom-credentials/agent-tools.js +98 -0
  40. package/dist/custom-credentials/card-token.d.ts +15 -0
  41. package/dist/custom-credentials/card-token.js +35 -0
  42. package/dist/custom-credentials/credential-ports.d.ts +70 -0
  43. package/dist/custom-credentials/credential-ports.js +41 -0
  44. package/dist/custom-credentials/credential-recovery.d.ts +20 -0
  45. package/dist/custom-credentials/credential-recovery.js +22 -0
  46. package/dist/custom-credentials/credentialed-request.d.ts +83 -0
  47. package/dist/custom-credentials/credentialed-request.js +93 -0
  48. package/dist/custom-credentials/custom-credential-create-ui.d.ts +106 -0
  49. package/dist/custom-credentials/custom-credential-create-ui.js +136 -0
  50. package/dist/custom-credentials/custom-credential-set-token-ui.d.ts +84 -0
  51. package/dist/custom-credentials/custom-credential-set-token-ui.js +104 -0
  52. package/dist/custom-credentials/delete-request-confirmation-ui.d.ts +33 -0
  53. package/dist/custom-credentials/delete-request-confirmation-ui.js +35 -0
  54. package/dist/custom-credentials/provider-settings-card.d.ts +109 -0
  55. package/dist/custom-credentials/provider-settings-card.js +166 -0
  56. package/dist/custom-credentials/write-files-validation.d.ts +102 -0
  57. package/dist/custom-credentials/write-files-validation.js +202 -0
  58. package/dist/media-providers/catalog-projection.d.ts +29 -0
  59. package/dist/media-providers/catalog-projection.js +45 -0
  60. package/dist/media-providers/catalog.d.ts +6 -3
  61. package/dist/media-providers/catalog.js +4 -3
  62. package/dist/media-providers/configurable-catalog.d.ts +9 -0
  63. package/dist/media-providers/configurable-catalog.js +70 -0
  64. package/dist/media-providers/dispatch/builtin-vendors.js +0 -2
  65. package/dist/media-providers/dispatch/credentials.d.ts +4 -1
  66. package/dist/media-providers/dispatch/credentials.js +3 -2
  67. package/dist/media-providers/dispatch/engine.d.ts +1 -1
  68. package/dist/media-providers/dispatch/engine.js +17 -5
  69. package/dist/media-providers/dispatch/index.d.ts +3 -2
  70. package/dist/media-providers/dispatch/index.js +2 -2
  71. package/dist/media-providers/dispatch/media-provider-registry.d.ts +23 -4
  72. package/dist/media-providers/dispatch/media-provider-registry.js +26 -11
  73. package/dist/media-providers/dispatch/media-wire.d.ts +14 -0
  74. package/dist/media-providers/dispatch/media-wire.js +22 -0
  75. package/dist/media-providers/dispatch/node.d.ts +5 -0
  76. package/dist/media-providers/dispatch/node.js +5 -1
  77. package/dist/media-providers/dispatch/openai-compatible.d.ts +3 -1
  78. package/dist/media-providers/dispatch/openai-compatible.js +1 -1
  79. package/dist/media-providers/dispatch/operation-runtime.js +5 -4
  80. package/dist/media-providers/dispatch/outbound.d.ts +28 -3
  81. package/dist/media-providers/dispatch/outbound.js +10 -3
  82. package/dist/media-providers/dispatch/providers/custom-image.js +1 -1
  83. package/dist/media-providers/dispatch/providers/imagerouter.js +1 -1
  84. package/dist/media-providers/dispatch/providers/nanobanana.js +1 -1
  85. package/dist/media-providers/dispatch/providers/openrouter.js +1 -1
  86. package/dist/media-providers/dispatch/ssrf-guard.js +2 -2
  87. package/dist/media-providers/dispatch/types.d.ts +13 -4
  88. package/dist/media-providers/dispatch/vendor-adapter.js +2 -2
  89. package/dist/media-providers/index.d.ts +2 -0
  90. package/dist/media-providers/providers.d.ts +9 -5
  91. package/dist/media-providers/providers.js +9 -12
  92. package/dist/media-providers/sqlite-task-store.d.ts +4 -4
  93. package/dist/media-providers/task-store.d.ts +1 -1
  94. package/dist/media-providers/task-store.js +1 -1
  95. package/dist/media-providers/types.d.ts +0 -36
  96. package/dist/media-providers/ui-defaults.js +0 -4
  97. package/dist/react/admin-credentials/AdminByokKeyPanel.d.ts +130 -0
  98. package/dist/react/admin-credentials/AdminByokKeyPanel.js +115 -0
  99. package/dist/react/admin-credentials/byok-footer-status.d.ts +37 -0
  100. package/dist/react/admin-credentials/byok-footer-status.js +25 -0
  101. package/dist/react/credentials/OtherCredentialsSection.d.ts +36 -0
  102. package/dist/react/credentials/OtherCredentialsSection.hooks.d.ts +55 -0
  103. package/dist/react/credentials/OtherCredentialsSection.hooks.js +26 -0
  104. package/dist/react/credentials/OtherCredentialsSection.js +120 -0
  105. package/dist/react/credentials/access-token-forms.d.ts +219 -0
  106. package/dist/react/credentials/access-token-forms.js +114 -0
  107. package/dist/react/credentials/credential-copy.d.ts +17 -0
  108. package/dist/react/credentials/credential-copy.js +7 -0
  109. package/dist/react/credentials/other-credential-stores.d.ts +115 -0
  110. package/dist/react/credentials/other-credential-stores.js +76 -0
  111. package/dist/react/site-key/SiteKeyRecoveryCard.d.ts +16 -0
  112. package/dist/react/site-key/SiteKeyRecoveryCard.js +36 -0
  113. package/dist/react/site-key/SiteKeyTab.d.ts +100 -0
  114. package/dist/react/site-key/SiteKeyTab.js +127 -0
  115. package/dist/react/site-key/hooks/use-site-key-recovery.hooks.d.ts +77 -0
  116. package/dist/react/site-key/hooks/use-site-key-recovery.hooks.js +126 -0
  117. package/dist/react/site-key/hooks/use-site-key.hooks.d.ts +120 -0
  118. package/dist/react/site-key/hooks/use-site-key.hooks.js +95 -0
  119. package/dist/react/webhooks/IntegrationDeliveries.d.ts +41 -0
  120. package/dist/react/webhooks/IntegrationDeliveries.js +24 -0
  121. package/dist/react/webhooks/Integrations.d.ts +73 -0
  122. package/dist/react/webhooks/Integrations.js +97 -0
  123. package/dist/react/webhooks/hooks/use-integration-deliveries.hooks.d.ts +59 -0
  124. package/dist/react/webhooks/hooks/use-integration-deliveries.hooks.js +11 -0
  125. package/dist/react/webhooks/hooks/use-integrations.hooks.d.ts +119 -0
  126. package/dist/react/webhooks/hooks/use-integrations.hooks.js +129 -0
  127. package/dist/react/webhooks/rules.d.ts +118 -0
  128. package/dist/react/webhooks/rules.js +103 -0
  129. package/dist/saved-requests/execute.js +2 -3
  130. package/dist/saved-requests/types.d.ts +4 -1
  131. package/dist/secrets/index.d.ts +3 -0
  132. package/dist/secrets/index.js +3 -0
  133. package/dist/secrets/ports.d.ts +25 -0
  134. package/dist/secrets/ports.js +2 -0
  135. package/dist/secrets/types.d.ts +10 -0
  136. package/dist/secrets/types.js +2 -0
  137. package/dist/vendor-credentials/abort-guarded-repo.d.ts +14 -0
  138. package/dist/vendor-credentials/abort-guarded-repo.js +41 -0
  139. package/dist/vendor-credentials/project-scope.d.ts +43 -0
  140. package/dist/vendor-credentials/project-scope.js +32 -0
  141. package/dist/vendor-credentials/vault-adapter.d.ts +157 -0
  142. package/dist/vendor-credentials/vault-adapter.js +220 -0
  143. package/dist/web-screenshot/capture-files.d.ts +44 -0
  144. package/dist/web-screenshot/capture-files.js +62 -0
  145. package/dist/web-screenshot/capture-retention.d.ts +157 -0
  146. package/dist/web-screenshot/capture-retention.js +134 -0
  147. package/dist/web-screenshot/capture-root-file-lock.d.ts +20 -0
  148. package/dist/web-screenshot/capture-root-file-lock.js +15 -0
  149. package/dist/web-screenshot/desktop-page-capture.d.ts +37 -0
  150. package/dist/web-screenshot/desktop-page-capture.js +62 -0
  151. package/dist/web-screenshot/own-site-opener.d.ts +40 -0
  152. package/dist/web-screenshot/own-site-opener.js +27 -0
  153. package/dist/web-screenshot/screenshot-image.d.ts +11 -0
  154. package/dist/web-screenshot/screenshot-image.js +12 -0
  155. package/dist/web-screenshot/web-screenshot.d.ts +188 -0
  156. package/dist/web-screenshot/web-screenshot.js +329 -0
  157. package/dist/webhooks/delivery.d.ts +16 -0
  158. package/dist/webhooks/delivery.js +41 -1
  159. package/dist/webhooks/ports.d.ts +1 -29
  160. package/dist/webhooks/signing.keyring.d.ts +1 -1
  161. package/dist/webhooks/site/delivery.d.ts +60 -0
  162. package/dist/webhooks/site/delivery.js +45 -0
  163. package/dist/webhooks/site/http.memory.d.ts +51 -0
  164. package/dist/webhooks/site/http.memory.js +28 -0
  165. package/dist/webhooks/site/repo.memory.d.ts +136 -0
  166. package/dist/webhooks/site/repo.memory.js +215 -0
  167. package/dist/webhooks/site/seal-aad-invariant.d.ts +26 -0
  168. package/dist/webhooks/site/seal-aad-invariant.js +61 -0
  169. package/dist/webhooks/site/seal-aad-invariant.node.d.ts +42 -0
  170. package/dist/webhooks/site/seal-aad-invariant.node.js +52 -0
  171. package/dist/webhooks/site/signing.d.ts +28 -0
  172. package/dist/webhooks/site/signing.js +27 -0
  173. package/dist/webhooks/site/signing.keyring.d.ts +29 -0
  174. package/dist/webhooks/site/signing.keyring.js +30 -0
  175. package/dist/webhooks/site/subscriptions.d.ts +118 -0
  176. package/dist/webhooks/site/subscriptions.js +98 -0
  177. package/dist/webhooks/sql/index.d.ts +4 -0
  178. package/dist/webhooks/sql/index.js +2 -0
  179. package/dist/webhooks/sql/repo.rows.d.ts +47 -0
  180. package/dist/webhooks/sql/repo.rows.js +2 -0
  181. package/dist/webhooks/sql/webhook-repo.d.ts +152 -0
  182. package/dist/webhooks/sql/webhook-repo.js +308 -0
  183. package/dist/webhooks/subscriptions.d.ts +3 -1
  184. package/dist/webhooks/subscriptions.js +4 -1
  185. package/dist/webhooks/tools/tool-handlers.js +2 -1
  186. package/dist/webhooks/types.d.ts +6 -10
  187. package/package.json +517 -12
  188. package/dist/media-providers/dispatch/providers/grok.d.ts +0 -55
  189. package/dist/media-providers/dispatch/providers/grok.js +0 -116
@@ -1,4 +1,3 @@
1
- import { createHttpClient } from "@jini-ai/platform/http/guarded";
2
1
  import { CredentialedRequestValidationError } from "../contracts/credentialed-request-errors.js";
3
2
  import { prepareSavedRequestDefinition } from "./definition.js";
4
3
  import { projectSavedRequestResponse } from "./projection.js";
@@ -73,8 +72,8 @@ async function resolveCredential({ deps, workspaceId, definition }, _options = {
73
72
  }
74
73
  function boundedHttpClient({ deps, signal, onResponse }, _options = {}) {
75
74
  // Equivalent to SINGLE_HOP_HTTPS_EGRESS_POLICY: the product policy stays in host composition.
76
- // Construct the existing guard here so redirects/dev overrides cannot silently widen this grant.
77
- const client = createHttpClient({ dns: deps.dns, transport: deps.transport, clock: deps.clock, userAgent: deps.userAgent, policy: {
75
+ // Construct the host-bound guard here so redirects/dev overrides cannot silently widen this grant.
76
+ const client = deps.createHttpClient({ dns: deps.dns, transport: deps.transport, clock: deps.clock, userAgent: deps.userAgent, policy: {
78
77
  allowedSchemes: ["https"], denyPrivateAddresses: true, devHostAllowlist: [], maxRedirects: 0,
79
78
  connectTimeoutMs: 10_000, maxResponseBytes: 65_536, maxDecompressedBytes: 65_536,
80
79
  } });
@@ -1,6 +1,7 @@
1
1
  import type { CredentialedRequestAuditPort, makeCredentialedRequest } from "../credentialed-http/credentialed-request.js";
2
2
  import type { CredentialSchemeRegistryPort, ResolvedCredential } from "../credentialed-http/ports.js";
3
- import type { DnsResolver, GuardedClock, PinnedHttpTransport } from "@jini-ai/core/contracts/runtime";
3
+ import type { HttpClientPort } from "@jini-ai/core/primitives";
4
+ import type { DnsResolver, GuardedClock, GuardedHttpRequired, PinnedHttpTransport } from "@jini-ai/core/contracts/runtime";
4
5
  /** Persisted data only. Identity, policy, consent and quotas belong to the calling host. */
5
6
  export interface SavedRequestDefinition {
6
7
  readonly version: 1;
@@ -50,6 +51,8 @@ export interface SavedRequestDeps {
50
51
  readonly dns: DnsResolver;
51
52
  readonly transport: PinnedHttpTransport;
52
53
  readonly userAgent: string;
54
+ /** Composition binds the guarded HTTP client factory (the platform's `createHttpClient`); the interpreter passes the single-hop policy plus the ports above and never imports a client implementation. */
55
+ readonly createHttpClient: (required: GuardedHttpRequired) => HttpClientPort;
53
56
  /** Trusted composition supplies the site's public, admin, API and control origins. */
54
57
  readonly forbiddenOrigins: readonly string[];
55
58
  }
@@ -0,0 +1,3 @@
1
+ export * from "./types.js";
2
+ export * from "./ports.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from "./types.js";
2
+ export * from "./ports.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,25 @@
1
+ /** Secret custody ports: the host injects the keyring and sealer; integrations never import a root key. */
2
+ import type { KeyringPort as VaultKeyringPort } from "@jini-ai/core/contracts/vault";
3
+ import type { SealedSecret } from "./types.js";
4
+ export interface RootKeyHandle {
5
+ readonly keyId: string;
6
+ }
7
+ /**
8
+ * The keyring is owned by the vault contract (`@jini-ai/core/contracts/vault`), including its
9
+ * `activeKey({})` options argument: a host's one keyring object plugs into every integrations seam
10
+ * and back without an adapter. Never redeclare it here; a second shape split the two (XM-01/PK-02).
11
+ */
12
+ export type KeyringPort = VaultKeyringPort;
13
+ export interface SecretSealerPort {
14
+ seal(input: {
15
+ plaintext: string;
16
+ key: RootKeyHandle;
17
+ aad: string;
18
+ }): Promise<SealedSecret>;
19
+ open(input: {
20
+ sealed: SealedSecret;
21
+ }, optional?: {
22
+ aad?: string;
23
+ }): Promise<string>;
24
+ }
25
+ //# sourceMappingURL=ports.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ports.js.map
@@ -0,0 +1,10 @@
1
+ /** keyId identifies the wrapping-key generation so export adapters can rewrap or strip a secret
2
+ * explicitly instead of silently transporting it with ordinary content. Ciphertext/nonce are
3
+ * base64 AEAD data; alg identifies the authenticated cipher. */
4
+ export interface SealedSecret {
5
+ keyId: string;
6
+ ciphertext: string;
7
+ nonce: string;
8
+ alg: string;
9
+ }
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,14 @@
1
+ import type { VaultRepoPort } from "@jini-ai/core/contracts/vault";
2
+ /**
3
+ * Wraps the credential repo so every persistence write (insert/update and the vault's put/applyBatch)
4
+ * first refuses an aborted signal; reads, deletes and non-function vault members pass straight through.
5
+ * Extracted from `saveProposedCredential` so the guard is testable against a hand-written repo.
6
+ * @complexity O(1) wiring; each call costs what the wrapped repo's call costs.
7
+ */
8
+ export declare function abortGuardedCredentialRepo<T extends {
9
+ readonly vault?: VaultRepoPort;
10
+ }>({ store, signal }: {
11
+ store: T;
12
+ signal: AbortSignal;
13
+ }, _optional?: {}): T;
14
+ //# sourceMappingURL=abort-guarded-repo.d.ts.map
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Wraps the credential repo so every persistence write (insert/update and the vault's put/applyBatch)
3
+ * first refuses an aborted signal; reads, deletes and non-function vault members pass straight through.
4
+ * Extracted from `saveProposedCredential` so the guard is testable against a hand-written repo.
5
+ * @complexity O(1) wiring; each call costs what the wrapped repo's call costs.
6
+ */
7
+ export function abortGuardedCredentialRepo({ store, signal }, _optional = {}) {
8
+ // Since secrets_vault (9b20083b6) create/update write through repo.vault, both write surfaces
9
+ // must refuse cancellation after asynchronous sealing. Preserve each domain's own repo ABI.
10
+ const vault = store.vault && new Proxy(store.vault, { get(target, key) {
11
+ const value = Reflect.get(target, key);
12
+ if (typeof value !== 'function')
13
+ return value;
14
+ return (...args) => {
15
+ if (key === 'put' || key === 'applyBatch')
16
+ signal.throwIfAborted();
17
+ return value.apply(target, args);
18
+ };
19
+ } });
20
+ // A store's project half (`custom-credentials/types.ts`'s `repo.project`) writes too: guarded alike.
21
+ const project = store.project;
22
+ const guardedProject = project && { ...project, repo: abortGuardedCredentialRepo({ store: project.repo, signal }),
23
+ ...(project.createRepo ? { createRepo: abortGuardedCredentialRepo({ store: project.createRepo, signal }) } : {}),
24
+ ...(project.replaceRepo ? { replaceRepo: abortGuardedCredentialRepo({ store: project.replaceRepo, signal }) } : {}),
25
+ };
26
+ return new Proxy(store, { get(target, key) {
27
+ if (key === 'vault')
28
+ return vault;
29
+ if (key === 'project')
30
+ return guardedProject;
31
+ const value = Reflect.get(target, key);
32
+ if (typeof value !== 'function')
33
+ return value;
34
+ return (...args) => {
35
+ if (key === 'insert' || key === 'update')
36
+ signal.throwIfAborted();
37
+ return value.apply(target, args);
38
+ };
39
+ } });
40
+ }
41
+ //# sourceMappingURL=abort-guarded-repo.js.map
@@ -0,0 +1,43 @@
1
+ import type { CredentialScope, CredentialProjectHalf } from "@jini-ai/core/contracts/site/credential-project-half";
2
+ export type { CredentialScope, CredentialProjectHalf };
3
+ /**
4
+ * @file Shared scope policy for custom, publish and source-control credentials. Site-owned keys
5
+ * remain in place and take precedence; only explicitly granted owner rows are a fallback.
6
+ * New keys may be saved to the owner store through a create-only port, or explicitly to the site.
7
+ * Earlier boot adoption removed local overrides to prevent copied keys bypassing revoke. Adoption
8
+ * is retired: grants govern shared rows only, and existing local keys remain independently owned.
9
+ */
10
+ /** One store a site reads credentials from, with the deps (repo, sealer, keyring) that open its rows. */
11
+ export interface ScopedCredentialDeps<D> {
12
+ readonly deps: D;
13
+ readonly workspaceId: string;
14
+ readonly scope: CredentialScope;
15
+ }
16
+ type WithProject = {
17
+ readonly repo: {
18
+ readonly project?: CredentialProjectHalf<unknown>;
19
+ };
20
+ };
21
+ /**
22
+ * The stores a site reads: its own vault first, followed by its granted owner half.
23
+ * The host's composition root attaches that owner half (its `credentialProject` dep), if any.
24
+ * @complexity O(1).
25
+ */
26
+ export declare function credentialScopes<D extends WithProject>({ deps, workspaceId }: {
27
+ deps: D;
28
+ workspaceId: string;
29
+ }, _optional?: {}): ScopedCredentialDeps<D>[];
30
+ /**
31
+ * Where a new row is written: the configured owner store, or the site vault on remote hosts
32
+ * without an owner store. An explicit local save remains local even with an owner store configured.
33
+ * @throws The store's own validation error (`invalid`) when `scope` is neither omitted, `"site"` nor `"project"`.
34
+ */
35
+ export declare function credentialCreateTarget<D extends WithProject>({ deps, input, invalid }: {
36
+ deps: D;
37
+ input: {
38
+ workspaceId: string;
39
+ scope?: unknown;
40
+ };
41
+ invalid: (message: string) => Error;
42
+ }, _optional?: {}): ScopedCredentialDeps<D>;
43
+ //# sourceMappingURL=project-scope.d.ts.map
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The stores a site reads: its own vault first, followed by its granted owner half.
3
+ * The host's composition root attaches that owner half (its `credentialProject` dep), if any.
4
+ * @complexity O(1).
5
+ */
6
+ export function credentialScopes({ deps, workspaceId }, _optional = {}) {
7
+ const site = { deps, workspaceId, scope: "site" };
8
+ const project = deps.repo.project;
9
+ if (!project)
10
+ return [site];
11
+ return [site, { deps: { ...deps, repo: project.repo, sealer: project.sealer, keyring: project.keyring }, workspaceId: project.workspaceId, scope: "project" }];
12
+ }
13
+ /**
14
+ * Where a new row is written: the configured owner store, or the site vault on remote hosts
15
+ * without an owner store. An explicit local save remains local even with an owner store configured.
16
+ * @throws The store's own validation error (`invalid`) when `scope` is neither omitted, `"site"` nor `"project"`.
17
+ */
18
+ export function credentialCreateTarget({ deps, input, invalid }, _optional = {}) {
19
+ if (input.scope !== undefined && input.scope !== "site" && input.scope !== "project")
20
+ throw invalid('scope must be "site" or "project"');
21
+ const owner = deps.repo.project;
22
+ if (!owner || input.scope === "site")
23
+ return { deps, workspaceId: input.workspaceId, scope: "site" };
24
+ const project = credentialScopes({ deps, workspaceId: input.workspaceId })[1];
25
+ if (project === undefined)
26
+ throw new Error("Project credential store has no project scope");
27
+ // Human save adapters use the separate owner mutation port; runtime reads retain the site view.
28
+ if (!owner.createRepo)
29
+ return project;
30
+ return { ...project, deps: { ...project.deps, repo: owner.createRepo } };
31
+ }
32
+ //# sourceMappingURL=project-scope.js.map
@@ -0,0 +1,157 @@
1
+ import { type VaultRepoPort, type VaultRecord, type VaultSummary, type VaultMeta, type VaultMetaParsers, type VaultContext, type VaultIdentity, type VaultQuery, type KeyringPort, type SecretSealerPort, type SealedSecret } from "@jini-ai/core/contracts/vault";
2
+ import type { SecretsVaultService } from "@jini-ai/core/contracts/site/secrets-credential-sets";
3
+ import type { CredentialTokenHint } from "@jini-ai/core/contracts/site/secrets-credential-token";
4
+ import type { CredentialVaultBinding, SourceControlCredentialSetRecord } from "@jini-ai/core/contracts/site/source-control-credentials";
5
+ import type { VendorCredentialProjectScope, VendorCredentialSetRecord, VendorCredentialSetRepoPort } from "@jini-ai/core/contracts/site/vendor-credentials";
6
+ type CredentialSetRecord = SourceControlCredentialSetRecord | VendorCredentialSetRecord;
7
+ type Kind = "vendor" | "source-control";
8
+ export interface CredentialVaultServiceArgs {
9
+ repo: VaultRepoPort;
10
+ metaParsers: VaultMetaParsers;
11
+ authorize: (required: {
12
+ action: "put" | "get" | "list" | "rotate" | "delete";
13
+ context: VaultContext | VaultIdentity | VaultQuery;
14
+ }) => Promise<void>;
15
+ keyring: Pick<KeyringPort, "activeKey">;
16
+ sealer: SecretSealerPort;
17
+ now: (required: Record<string, never>) => string;
18
+ newId: (required: Record<string, never>) => string;
19
+ }
20
+ export interface CredentialVaultAdapterPolicy {
21
+ ownerKey: string;
22
+ acceptedKinds: readonly string[];
23
+ metaParsers: VaultMetaParsers;
24
+ openService: (required: CredentialVaultServiceArgs, optional?: Record<string, never>) => SecretsVaultService;
25
+ }
26
+ export declare function toVendorCredentialRecord({ row, meta, provider, sealed }: {
27
+ row: VaultRecord;
28
+ meta: VaultMeta;
29
+ provider: string;
30
+ sealed: SealedSecret;
31
+ }, _optional?: Record<string, never>): VendorCredentialSetRecord;
32
+ export declare function toSourceControlCredentialRecord({ row, meta, provider, sealed }: {
33
+ row: VaultRecord;
34
+ meta: VaultMeta;
35
+ provider: string;
36
+ sealed: SealedSecret;
37
+ }, _optional?: Record<string, never>): SourceControlCredentialSetRecord;
38
+ /** the host's historical DTOs retain their fields; vault revisions and hints are adapter details. */
39
+ export declare class CredentialSetVaultAdapter<R extends CredentialSetRecord> {
40
+ readonly vault: VaultRepoPort;
41
+ /** the host's vault/scope/hint policy, carried by every repo the composition root builds (site and project halves
42
+ * alike). `open` takes the repo it opens explicitly, never `this`: a wrapper (the abort guard around a save)
43
+ * passes itself, so its guarded vault is the one written. */
44
+ readonly credentialVault: CredentialVaultBinding;
45
+ constructor({ vault, kind, policy, projectRecord }: {
46
+ vault: VaultRepoPort;
47
+ kind: Kind;
48
+ policy: CredentialVaultAdapterPolicy;
49
+ projectRecord: (required: {
50
+ row: VaultRecord;
51
+ meta: VaultMeta;
52
+ provider: string;
53
+ sealed: SealedSecret;
54
+ }) => R;
55
+ }, _optional?: Record<string, never>);
56
+ private readonly kind;
57
+ private readonly policy;
58
+ private readonly projectRecord;
59
+ private scope;
60
+ private owns;
61
+ private record;
62
+ findById(input: {
63
+ workspaceId: string;
64
+ id: string;
65
+ }, _options?: {}): Promise<R | null>;
66
+ findDefaultByProvider(input: {
67
+ workspaceId: string;
68
+ providerId: string;
69
+ }, _options?: {}): Promise<R | null>;
70
+ listByProvider(input: {
71
+ workspaceId: string;
72
+ providerId: string;
73
+ }, _options?: {}): Promise<R[]>;
74
+ listByWorkspace(input: {
75
+ workspaceId: string;
76
+ }, _options?: {}): Promise<R[]>;
77
+ /** Compatibility for callers holding sealed DTOs; the Jini repo owns defaults and CAS. */
78
+ insert(record: R, _options?: {}): Promise<void>;
79
+ update(record: R, _options?: {}): Promise<void>;
80
+ private writeMeta;
81
+ private write;
82
+ delete(input: {
83
+ workspaceId: string;
84
+ id: string;
85
+ }, _options?: {}): Promise<void>;
86
+ /** Preserve the old missing/stale-probe no-op and updatedAt semantics. Jini's targeted JSON
87
+ * patch increments revision, so a rotation racing the probe cannot be overwritten. */
88
+ updateAccountLabel(input: {
89
+ workspaceId: string;
90
+ id: string;
91
+ accountLabel: string;
92
+ expectedSealed?: SealedSecret;
93
+ }, _options?: {}): Promise<void>;
94
+ /** Bind the patch to the probed revision all the way through the vault's atomic write. */
95
+ updateAccountLabelIfRevision(input: {
96
+ workspaceId: string;
97
+ id: string;
98
+ accountLabel: string;
99
+ expectedRevision: number;
100
+ }, _optional?: {}): Promise<{
101
+ id: string;
102
+ revision: number;
103
+ } | null>;
104
+ }
105
+ export declare function createCredentialVaultBinding({ policy }: {
106
+ policy: CredentialVaultAdapterPolicy;
107
+ }, _optional?: Record<string, never>): CredentialVaultBinding;
108
+ export declare function credentialScope({ workspaceId, kind, ownerKey, id }: {
109
+ workspaceId: string;
110
+ kind: Kind | "custom";
111
+ ownerKey: string;
112
+ id?: string;
113
+ }, _optional?: Record<string, never>): VaultContext & {
114
+ id?: string;
115
+ };
116
+ /** Safe read-model hints require no open and never hydrate summaries one credential at a time. */
117
+ export declare function credentialHint({ record }: {
118
+ record: Pick<VaultSummary, "tokenLength" | "last4">;
119
+ }, _optional?: Record<string, never>): CredentialTokenHint | null;
120
+ /** Vendor DTO mapping; default selection/promotion and persistence belong to Jini's vault. */
121
+ export declare class VendorCredentialSetVaultRepo extends CredentialSetVaultAdapter<VendorCredentialSetRecord> implements VendorCredentialSetRepoPort {
122
+ readonly project?: VendorCredentialProjectScope;
123
+ /** @param optional.project The project store this site's rows fall back to (`types.ts`). */
124
+ constructor(required: {
125
+ vault: VaultRepoPort;
126
+ policy: CredentialVaultAdapterPolicy;
127
+ }, optional?: {
128
+ project?: VendorCredentialProjectScope;
129
+ });
130
+ findDefaultByVendor(input: {
131
+ workspaceId: string;
132
+ vendorId: string;
133
+ }, _options?: {}): Promise<VendorCredentialSetRecord | null>;
134
+ listByVendor(input: {
135
+ workspaceId: string;
136
+ vendorId: string;
137
+ }, _options?: {}): Promise<VendorCredentialSetRecord[]>;
138
+ }
139
+ export declare function bindCredentialVaultAdapters({ policy }: {
140
+ policy: CredentialVaultAdapterPolicy;
141
+ }, _optional?: Record<string, never>): {
142
+ credentialVault: CredentialVaultBinding["open"];
143
+ credentialScope: CredentialVaultBinding["scope"];
144
+ SourceControlCredentialSetVaultAdapter: new (required: {
145
+ vault: VaultRepoPort;
146
+ kind: "source-control";
147
+ }, optional?: Record<string, never>) => CredentialSetVaultAdapter<SourceControlCredentialSetRecord>;
148
+ VendorCredentialSetVaultRepo: new (required: {
149
+ vault: VaultRepoPort;
150
+ kind?: Kind;
151
+ vendor?: boolean;
152
+ }, optional?: {
153
+ project?: VendorCredentialProjectScope;
154
+ }) => VendorCredentialSetVaultRepo;
155
+ };
156
+ export {};
157
+ //# sourceMappingURL=vault-adapter.d.ts.map
@@ -0,0 +1,220 @@
1
+ import { VaultError } from "@jini-ai/core/contracts/vault";
2
+ export function toVendorCredentialRecord({ row, meta, provider, sealed }, _optional = {}) {
3
+ return { workspaceId: row.workspaceId, id: row.id, label: row.label, sealed,
4
+ vendorId: provider, credentialType: "vendor", worksFor: meta.worksFor, tokenTail: credentialHint({ record: row })?.last4 ?? "",
5
+ isDefault: row.isDefault, accountLabel: (meta.accountLabel ?? null), createdAt: row.createdAt, updatedAt: row.updatedAt };
6
+ }
7
+ export function toSourceControlCredentialRecord({ row, meta, provider, sealed }, _optional = {}) {
8
+ return { workspaceId: row.workspaceId, id: row.id, label: row.label, sealed,
9
+ providerId: provider, isDefault: row.isDefault, accountLabel: (meta.accountLabel ?? null), createdAt: row.createdAt, updatedAt: row.updatedAt };
10
+ }
11
+ /** the host's historical DTOs retain their fields; vault revisions and hints are adapter details. */
12
+ export class CredentialSetVaultAdapter {
13
+ vault;
14
+ /** the host's vault/scope/hint policy, carried by every repo the composition root builds (site and project halves
15
+ * alike). `open` takes the repo it opens explicitly, never `this`: a wrapper (the abort guard around a save)
16
+ * passes itself, so its guarded vault is the one written. */
17
+ credentialVault;
18
+ constructor({ vault, kind, policy, projectRecord }, _optional = {}) {
19
+ this.vault = vault;
20
+ this.kind = kind;
21
+ this.policy = policy;
22
+ this.projectRecord = projectRecord;
23
+ this.credentialVault = createCredentialVaultBinding({ policy });
24
+ }
25
+ kind;
26
+ policy;
27
+ projectRecord;
28
+ scope(input, _options = {}) {
29
+ return { workspaceId: input.workspaceId, kind: this.kind, ownerKey: this.policy.ownerKey, principalId: null, binding: null,
30
+ ...(input.provider === undefined ? {} : { provider: input.provider }) };
31
+ }
32
+ owns({ row }, _options = {}) {
33
+ return row.kind === this.kind && row.ownerKey === this.policy.ownerKey && row.principalId === null && row.binding === null;
34
+ }
35
+ record({ row }, _options = {}) {
36
+ if (!row || !this.owns({ row }))
37
+ return null;
38
+ const meta = this.policy.metaParsers[this.kind]({ meta: row.meta, provider: row.provider });
39
+ if (this.kind === "vendor" && meta.credentialType !== "vendor")
40
+ return null;
41
+ if (!row.sealed || row.provider === null)
42
+ throw new VaultError({ code: "invalid-record" });
43
+ // Keep the hint out of sealed-row DTO enumeration; public store summaries opt in explicitly.
44
+ const record = this.projectRecord({ row, meta, provider: row.provider, sealed: row.sealed });
45
+ Object.defineProperty(record, "tokenHint", { value: credentialHint({ record: row }), enumerable: false });
46
+ return record;
47
+ }
48
+ async findById(input, _options = {}) {
49
+ return this.record({ row: await this.vault.find(input) });
50
+ }
51
+ async findDefaultByProvider(input, _options = {}) {
52
+ if (!this.vault.findDefault)
53
+ throw new VaultError({ code: "invalid-record" });
54
+ return this.record({ row: await this.vault.findDefault({ ...this.scope(input), provider: input.providerId }) });
55
+ }
56
+ async listByProvider(input, _options = {}) {
57
+ return (await this.vault.list(this.scope({ ...input, provider: input.providerId }))).flatMap(row => { const record = this.record({ row }); return record ? [record] : []; });
58
+ }
59
+ async listByWorkspace(input, _options = {}) {
60
+ return (await this.vault.list(this.scope(input))).flatMap(row => { const record = this.record({ row }); return record ? [record] : []; });
61
+ }
62
+ /** Compatibility for callers holding sealed DTOs; the Jini repo owns defaults and CAS. */
63
+ async insert(record, _options = {}) { await this.write({ record, expectedRevision: null }); }
64
+ async update(record, _options = {}) {
65
+ const existing = await this.vault.find(record);
66
+ if (!existing || !this.record({ row: existing }))
67
+ return;
68
+ await this.write({ record, expectedRevision: existing.revision, existing });
69
+ }
70
+ writeMeta({ record, existing, provider }, _options = {}) {
71
+ return this.policy.metaParsers[this.kind]({ meta: {
72
+ ...existing?.meta,
73
+ ...(this.kind === "vendor" ? { credentialType: "vendor", worksFor: ("worksFor" in record ? record.worksFor : undefined) ?? existing?.meta.worksFor ?? [provider] } : {}),
74
+ accountLabel: record.accountLabel,
75
+ } });
76
+ }
77
+ async write({ record, expectedRevision, existing }, _options = {}) {
78
+ const provider = "vendorId" in record ? record.vendorId : record.providerId;
79
+ const sameEnvelope = existing?.sealed?.ciphertext === record.sealed.ciphertext && existing.sealed.nonce === record.sealed.nonce;
80
+ await this.vault.put({ expectedRevision, record: { ...this.scope(record), id: record.id,
81
+ provider, label: record.label, sealed: record.sealed,
82
+ meta: this.writeMeta({ record, existing, provider }),
83
+ last4: sameEnvelope ? existing.last4 : null,
84
+ tokenLength: sameEnvelope ? existing.tokenLength : null,
85
+ isDefault: record.isDefault, revision: (expectedRevision ?? 0) + 1, createdAt: record.createdAt, updatedAt: record.updatedAt } });
86
+ }
87
+ async delete(input, _options = {}) {
88
+ const row = await this.vault.find(input);
89
+ if (row && this.record({ row }))
90
+ await this.vault.delete({ ...input, expectedRevision: row.revision });
91
+ }
92
+ /** Preserve the old missing/stale-probe no-op and updatedAt semantics. Jini's targeted JSON
93
+ * patch increments revision, so a rotation racing the probe cannot be overwritten. */
94
+ async updateAccountLabel(input, _options = {}) {
95
+ const row = await this.vault.find(input);
96
+ if (!row)
97
+ return;
98
+ const record = this.record({ row });
99
+ if (!record)
100
+ return;
101
+ const expectedSealed = input.expectedSealed;
102
+ if (expectedSealed && ["keyId", "ciphertext", "nonce", "alg"].some(key => record.sealed[key] !== expectedSealed[key]))
103
+ return;
104
+ const meta = this.policy.metaParsers[this.kind]({ meta: { ...row.meta, accountLabel: input.accountLabel }, provider: row.provider });
105
+ try {
106
+ if (meta.accountLabel == null)
107
+ throw new VaultError({ code: "invalid-meta" });
108
+ await this.vault.patchMeta({ ...input, expectedRevision: row.revision, patch: { accountLabel: meta.accountLabel }, updatedAt: row.updatedAt });
109
+ }
110
+ catch (error) {
111
+ if (!(error instanceof VaultError && error.code === "conflict"))
112
+ throw error;
113
+ // A deleted/rotated row is a completed stale probe, never an instruction to recreate it.
114
+ }
115
+ }
116
+ /** Bind the patch to the probed revision all the way through the vault's atomic write. */
117
+ async updateAccountLabelIfRevision(input, _optional = {}) {
118
+ const row = await this.vault.find(input);
119
+ if (!row || row.revision !== input.expectedRevision)
120
+ return null;
121
+ const record = this.record({ row });
122
+ if (!record)
123
+ return null;
124
+ const meta = this.policy.metaParsers[this.kind]({ meta: { ...row.meta, accountLabel: input.accountLabel }, provider: row.provider });
125
+ if (meta.accountLabel == null)
126
+ throw new VaultError({ code: "invalid-meta" });
127
+ if (record.accountLabel === meta.accountLabel)
128
+ return { id: row.id, revision: row.revision };
129
+ try {
130
+ const healed = await this.vault.patchMeta({ workspaceId: input.workspaceId, id: input.id,
131
+ expectedRevision: input.expectedRevision, patch: { accountLabel: meta.accountLabel }, updatedAt: row.updatedAt });
132
+ return { id: healed.id, revision: healed.revision };
133
+ }
134
+ catch (error) {
135
+ if (!(error instanceof VaultError && error.code === "conflict"))
136
+ throw error;
137
+ // Retrying with the latest revision would transfer the old account to a replacement key.
138
+ return null;
139
+ }
140
+ }
141
+ }
142
+ export function createCredentialVaultBinding({ policy }, _optional = {}) {
143
+ const open = (required, _options = {}) => {
144
+ if (!required.repo.vault)
145
+ throw new VaultError({ code: "invalid-record" });
146
+ const protect = async ({ operation }, _optional = {}) => {
147
+ try {
148
+ return await operation();
149
+ }
150
+ catch {
151
+ throw required.storageError();
152
+ }
153
+ };
154
+ return policy.openService({ repo: required.repo.vault, metaParsers: policy.metaParsers,
155
+ authorize: async ({ context }) => {
156
+ if (!policy.acceptedKinds.includes(context.kind) || context.ownerKey !== policy.ownerKey || context.principalId !== null)
157
+ throw new VaultError({ code: "context" });
158
+ },
159
+ keyring: { activeKey: (options) => protect({ operation: () => {
160
+ if (!required.keyring)
161
+ throw required.storageError();
162
+ return required.keyring.activeKey(options);
163
+ } }) },
164
+ sealer: { seal: input => protect({ operation: () => {
165
+ if (!required.sealer)
166
+ throw required.storageError();
167
+ return required.sealer.seal({ plaintext: input.plaintext, key: input.key, aad: input.aad });
168
+ } }), open: (input, options) => protect({ operation: () => {
169
+ if (!required.sealer)
170
+ throw required.storageError();
171
+ return required.sealer.open(input, options);
172
+ } }) },
173
+ now: () => new Date(required.clock?.nowMs() ?? 0).toISOString(),
174
+ newId: () => { if (!required.idGen) {
175
+ throw new VaultError({ code: "invalid-record" });
176
+ } return required.idGen.newId(); }, });
177
+ };
178
+ return { open, scope: required => credentialScope({ ...required, ownerKey: policy.ownerKey }), hint: credentialHint };
179
+ }
180
+ export function credentialScope({ workspaceId, kind, ownerKey, id }, _optional = {}) {
181
+ return { workspaceId, kind, ownerKey, principalId: null, binding: null, ...(id === undefined ? {} : { id }) };
182
+ }
183
+ /** Safe read-model hints require no open and never hydrate summaries one credential at a time. */
184
+ export function credentialHint({ record }, _optional = {}) {
185
+ return record.tokenLength === null ? null : { length: record.tokenLength, last4: record.tokenLength >= 12 ? record.last4 : null };
186
+ }
187
+ /** Vendor DTO mapping; default selection/promotion and persistence belong to Jini's vault. */
188
+ export class VendorCredentialSetVaultRepo extends CredentialSetVaultAdapter {
189
+ project;
190
+ /** @param optional.project The project store this site's rows fall back to (`types.ts`). */
191
+ constructor(required, optional = {}) {
192
+ super({ ...required, kind: "vendor", projectRecord: toVendorCredentialRecord });
193
+ if (optional.project)
194
+ this.project = optional.project;
195
+ }
196
+ async findDefaultByVendor(input, _options = {}) {
197
+ return this.findDefaultByProvider({ workspaceId: input.workspaceId, providerId: input.vendorId });
198
+ }
199
+ async listByVendor(input, _options = {}) {
200
+ return this.listByProvider({ workspaceId: input.workspaceId, providerId: input.vendorId });
201
+ }
202
+ }
203
+ export function bindCredentialVaultAdapters({ policy }, _optional = {}) {
204
+ const binding = createCredentialVaultBinding({ policy });
205
+ return {
206
+ credentialVault: binding.open,
207
+ credentialScope: binding.scope,
208
+ SourceControlCredentialSetVaultAdapter: class extends CredentialSetVaultAdapter {
209
+ constructor(required, _optional = {}) {
210
+ super({ vault: required.vault, kind: "source-control", policy, projectRecord: toSourceControlCredentialRecord });
211
+ }
212
+ },
213
+ VendorCredentialSetVaultRepo: class extends VendorCredentialSetVaultRepo {
214
+ constructor(required, optional = {}) {
215
+ super({ vault: required.vault, policy }, optional);
216
+ }
217
+ },
218
+ };
219
+ }
220
+ //# sourceMappingURL=vault-adapter.js.map
@@ -0,0 +1,44 @@
1
+ import type { SaveCaptureFiles } from "./web-screenshot.js";
2
+ /**
3
+ * @file Where `web_screenshot_page` keeps its captures: `<siteDir>/.captures/<UTC date>/<name>.jpg`
4
+ * (names from `captureRelativePaths`). Saved so a report can cite the exact picture later, e.g. the
5
+ * source-vs-theme rounds of the host theme skill's "match a reference site" loop (2026-10-08); before this the
6
+ * images existed only inside the chat turn.
7
+ *
8
+ * A dot-folder of its own rather than `ops/` (the site's runtime state: logs, journal, daemon file):
9
+ * these are agent artifacts a person opens. Neither site backup (each scope walks only its own
10
+ * subtree) nor publish/export reads it. No automatic retention: captures are a few hundred KB each and
11
+ * are the owner's to delete, through the preview + confirm cleanup in `capture-retention.ts`.
12
+ */
13
+ export declare const CAPTURES_DIR_NAME = ".captures";
14
+ /** The captures folder of a site folder. */
15
+ export declare function captureRootFor({ siteDir }: {
16
+ siteDir: string;
17
+ }): string;
18
+ /**
19
+ * The host's exclusion for one captures folder. The writer and the manual cleanup in
20
+ * `capture-retention.ts` both hold it keyed by the resolved root, so a cleanup never sees a capture
21
+ * halfway through publication and a writer never publishes into a name the cleanup is removing.
22
+ */
23
+ export interface CaptureRootLock {
24
+ withLock<T>(required: {
25
+ key: string;
26
+ run: () => Promise<T>;
27
+ }, optional?: Record<string, never>): Promise<T>;
28
+ }
29
+ /** The suffix a capture carries while it is being written; cleanup never touches such a file. */
30
+ export declare const CAPTURE_PARTIAL_SUFFIX = ".partial";
31
+ /**
32
+ * Writes each file under `rootDir`, creating folders as needed, and resolves to the absolute paths.
33
+ * Each capture is staged as `<name>.partial` (opened `wx`) and only then linked to its final name, all
34
+ * under `lock.withLock({ key: rootDir })`, so a reader never mistakes half a picture for a finished one.
35
+ * Never overwrites: publication uses `link`, which fails with `EEXIST` if the final name exists, so a
36
+ * name collision is a rejection, not a silently replaced capture. The staged file is removed either way.
37
+ * @throws Error when a `relPath` would land outside `rootDir` (checked for all files before any write).
38
+ * @complexity O(total bytes).
39
+ */
40
+ export declare function createCaptureFileWriter({ rootDir, lock }: {
41
+ rootDir: string;
42
+ lock: CaptureRootLock;
43
+ }, _optional?: Record<string, never>): SaveCaptureFiles;
44
+ //# sourceMappingURL=capture-files.d.ts.map