@jini-ai/integrations 0.7.3-next.3 → 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.4
4
+
5
+ ### Changes
6
+
7
+ - Add reusable webhook delivery and external MCP connection services with shared keyring and page-capture contracts.
8
+ - Keep settled webhook deliveries closed during lease reclaim and close own-site servers when their origins are invalid.
9
+
3
10
  ## 0.7.2
4
11
 
5
12
  ### Patch Changes
@@ -1,7 +1,7 @@
1
1
  import { ApiConnectionError } from './errors.js';
2
2
  import { createApiConnectionGenerationReader, deriveApiConnectionKey } from './keys.js';
3
3
  import { waitForHostedSignIn } from './hosted-sign-in.js';
4
- import { ToolInputError } from "@jini-ai/core";
4
+ import { ToolInputError } from "@jini-ai/core/tool-input-errors";
5
5
  /** API-connection refusals carry safe, actionable messages; surface them as caller-facing input errors. */
6
6
  function asToolError({ error, messages }) {
7
7
  if (error instanceof ApiConnectionError)
@@ -91,6 +91,16 @@ export declare class CredentialSetVaultAdapter<R extends CredentialSetRecord> {
91
91
  accountLabel: string;
92
92
  expectedSealed?: SealedSecret;
93
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>;
94
104
  }
95
105
  export declare function createCredentialVaultBinding({ policy }: {
96
106
  policy: CredentialVaultAdapterPolicy;
@@ -113,6 +113,31 @@ export class CredentialSetVaultAdapter {
113
113
  // A deleted/rotated row is a completed stale probe, never an instruction to recreate it.
114
114
  }
115
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
+ }
116
141
  }
117
142
  export function createCredentialVaultBinding({ policy }, _optional = {}) {
118
143
  const open = (required, _options = {}) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jini-ai/integrations",
3
- "version": "0.7.3-next.3",
3
+ "version": "0.7.4",
4
4
  "description": "Third-party vendor integrations and outbound services, each independently importable: media generation, credentialed HTTP and webhooks.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -85,7 +85,7 @@
85
85
  "@cfworker/json-schema": "opt-in: json schema validation; import @jini-ai/integrations/saved-requests — JSON Schema validation could not load @cfworker/json-schema. Install @cfworker/json-schema to enable this feature, or check its installed version and native binaries.",
86
86
  "kysely": "opt-in: sql storage adapters; import @jini-ai/integrations/webhooks/sql — SQL storage adapters could not load kysely. Install kysely to enable this feature, or check its installed version and native binaries.",
87
87
  "typescript": "opt-in: typescript source analysis; import @jini-ai/integrations/webhooks/site/seal-aad-invariant — TypeScript source analysis could not load typescript. Install typescript to enable this feature, or check its installed version and native binaries.",
88
- "react": "opt-in: react browser bindings; import @jini-ai/integrations/react/credentials/credential-copy — React browser bindings could not load react. Install react to enable this feature, or check its installed version.",
88
+ "react": "opt-in: react browser bindings; import @jini-ai/integrations/react/site-key/SiteKeyTab — React browser bindings could not load react. Install react to enable this feature, or check its installed version.",
89
89
  "react-dom": "opt-in: react browser bindings; import @jini-ai/integrations/react/credentials/credential-copy — React browser bindings could not load react-dom. Install react-dom to enable this feature, or check its installed version."
90
90
  },
91
91
  "isolation": {
@@ -620,11 +620,11 @@
620
620
  "registry": "https://registry.npmjs.org"
621
621
  },
622
622
  "dependencies": {
623
- "@jini-ai/core": "^0.7.3-next.3"
623
+ "@jini-ai/core": "^0.7.4"
624
624
  },
625
625
  "peerDependencies": {
626
626
  "better-sqlite3": "^13.0.0",
627
- "@jini-ai/platform": "^0.7.3-next.3",
627
+ "@jini-ai/platform": "^0.7.4",
628
628
  "@cfworker/json-schema": "^4.1.1",
629
629
  "kysely": "^0.29.6",
630
630
  "typescript": "^5.6.0",
@@ -645,10 +645,10 @@
645
645
  "@types/react-dom": "^19.2.0",
646
646
  "@testing-library/react": "^16.3.0",
647
647
  "jsdom": "^26.1.0",
648
- "@jini-ai/core": "0.7.3-next.3",
649
- "@jini-ai/platform": "0.7.3-next.3",
650
- "@jini-ai/oauth": "0.7.3-next.3",
651
- "@jini-ai/db": "0.7.3-next.3"
648
+ "@jini-ai/core": "0.7.4",
649
+ "@jini-ai/platform": "0.7.4",
650
+ "@jini-ai/oauth": "0.7.4",
651
+ "@jini-ai/db": "0.7.4"
652
652
  },
653
653
  "peerDependenciesMeta": {
654
654
  "better-sqlite3": {