@opengeni/core 4.3.3-canary.39786771332001 → 4.4.1
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/dist/domain/capabilities.d.ts +12 -1
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/domain/capabilities.ts +37 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Settings } from "@opengeni/config";
|
|
2
|
-
import { CapabilityCatalogItem, OPENGENI_BROWSER_EXTENSION_URL, type AccessGrant, type CapabilityCatalogResponse, type CapabilityInstallation, type CreateCapabilityCatalogItemRequest, type EnableCapabilityRequest, type McpPersonalConnectionDelegation } from "@opengeni/contracts";
|
|
2
|
+
import { CapabilityCatalogItem, OPENGENI_BROWSER_EXTENSION_URL, type AccessGrant, type CapabilityCatalogResponse, type CapabilityInstallation, type CreateCapabilityCatalogItemRequest, type EnableCapabilityRequest, type McpPersonalConnectionDelegation, ToolAuthNeededPayload, type UserSetupBlocker } from "@opengeni/contracts";
|
|
3
3
|
import { type SubscriptionCoreCodexAppsRequestAuth, type CodexCutoverDisposition, type Database, type ApiIntegrationRuntime, type EnabledMcpCapabilityServer } from "@opengeni/db";
|
|
4
4
|
declare const officialMcpRegistryUrl = "https://registry.modelcontextprotocol.io";
|
|
5
5
|
export declare function buildCapabilityCatalog(input: {
|
|
@@ -196,6 +196,17 @@ export { OPENGENI_BROWSER_EXTENSION_URL };
|
|
|
196
196
|
export declare function nativeConnectionCapabilityRecommendations(options?: {
|
|
197
197
|
connectedMachines?: boolean;
|
|
198
198
|
}): CapabilityCatalogItem[];
|
|
199
|
+
/**
|
|
200
|
+
* The `tool.auth_needed` payload of the setup card that fixes a person-fixable
|
|
201
|
+
* tool refusal (see USER_SETUP_BLOCKERS). Every tool and route that hits such a
|
|
202
|
+
* refusal posts this same card in the calling turn, so the person sees the fix
|
|
203
|
+
* on the first attempt. Null when the blocker's capability is not a native
|
|
204
|
+
* card this deployment can show.
|
|
205
|
+
*/
|
|
206
|
+
export declare function userSetupCardPayload(blocker: UserSetupBlocker, options: {
|
|
207
|
+
toolName: string;
|
|
208
|
+
requestedSandboxId?: string | null;
|
|
209
|
+
}): ToolAuthNeededPayload | null;
|
|
199
210
|
export declare function applyCapabilityEnablement(item: CapabilityCatalogItem, installation: CapabilityInstallation | undefined): CapabilityCatalogItem;
|
|
200
211
|
export type CapabilityCatalogSearchMatch = {
|
|
201
212
|
item: CapabilityCatalogItem;
|
package/dist/index.js
CHANGED
|
@@ -1068,7 +1068,8 @@ import {
|
|
|
1068
1068
|
FIKEN_PROVIDER_DOMAIN as FIKEN_PROVIDER_DOMAIN2,
|
|
1069
1069
|
FIRST_PARTY_MCP_TOOL_NAMES,
|
|
1070
1070
|
OPENGENI_BROWSER_EXTENSION_URL,
|
|
1071
|
-
assertOrganizationIntegrationAllowed
|
|
1071
|
+
assertOrganizationIntegrationAllowed,
|
|
1072
|
+
ToolAuthNeededPayload
|
|
1072
1073
|
} from "@opengeni/contracts";
|
|
1073
1074
|
import {
|
|
1074
1075
|
CODEX_APPS_MCP_SERVER_ID,
|
|
@@ -2795,6 +2796,30 @@ function nativeConnectionCapabilityRecommendations(options = {}) {
|
|
|
2795
2796
|
}
|
|
2796
2797
|
return items;
|
|
2797
2798
|
}
|
|
2799
|
+
function userSetupCardPayload(blocker, options) {
|
|
2800
|
+
const item = nativeConnectionCapabilityRecommendations({ connectedMachines: true }).find(
|
|
2801
|
+
(candidate) => candidate.id === blocker.capabilityId
|
|
2802
|
+
);
|
|
2803
|
+
if (!item) return null;
|
|
2804
|
+
return ToolAuthNeededPayload.parse({
|
|
2805
|
+
serverId: "opengeni",
|
|
2806
|
+
toolName: options.toolName,
|
|
2807
|
+
// Built-in capabilities are Opengeni's own; a blank domain must not fail the card.
|
|
2808
|
+
providerDomain: item.providerDomain?.trim() || "opengeni.local",
|
|
2809
|
+
reason: "missing_connection",
|
|
2810
|
+
capability: {
|
|
2811
|
+
id: item.id,
|
|
2812
|
+
name: item.name,
|
|
2813
|
+
kind: item.kind,
|
|
2814
|
+
source: item.source,
|
|
2815
|
+
action: "connect",
|
|
2816
|
+
rationale: blocker.rationale,
|
|
2817
|
+
requiredVariables: []
|
|
2818
|
+
},
|
|
2819
|
+
...options.requestedSandboxId ? { requestedSandboxId: options.requestedSandboxId } : {},
|
|
2820
|
+
...blocker.purpose ? { purpose: blocker.purpose } : {}
|
|
2821
|
+
});
|
|
2822
|
+
}
|
|
2798
2823
|
function socialConnectionCounts(connections, provider) {
|
|
2799
2824
|
const matching = connections.filter((connection) => connection.provider === provider);
|
|
2800
2825
|
return {
|
|
@@ -31352,6 +31377,7 @@ export {
|
|
|
31352
31377
|
updateSessionSkills,
|
|
31353
31378
|
updateSessionTitle,
|
|
31354
31379
|
updateSessionToolPolicy,
|
|
31380
|
+
userSetupCardPayload,
|
|
31355
31381
|
validateEditableArtifactActor,
|
|
31356
31382
|
validateEditableArtifactMaterializationJob,
|
|
31357
31383
|
validateEditableArtifactPinnedVersion,
|