@agentforge-io/core 2.0.17 → 2.0.18
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/connector.d.ts +31 -0
- package/package.json +1 -1
|
@@ -28,6 +28,24 @@ export interface ConnectorToolFactory {
|
|
|
28
28
|
definition: Omit<AgentToolDefinition, 'execute'>;
|
|
29
29
|
build: (ctx: ConnectorToolContext) => AgentToolDefinition['execute'];
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Recommended initial state for a single connector tool when the tenant
|
|
33
|
+
* has no override yet.
|
|
34
|
+
*
|
|
35
|
+
* Same shape as the platform's `ToolPermission` (which is the canonical
|
|
36
|
+
* type stored on `agent.tools` / `automation.tools` / `skill.tools`
|
|
37
|
+
* JSONB). We redeclare it here so `@agentforge-io/core` stays free of any
|
|
38
|
+
* dependency on the host's `platform/` module — connectors are core's
|
|
39
|
+
* concern, ToolPermission is the host's. The shape must stay in sync;
|
|
40
|
+
* platform-side `hydrateToolList` accepts either.
|
|
41
|
+
*/
|
|
42
|
+
export type ConnectorToolMode = 'allow' | 'approval' | 'blocked';
|
|
43
|
+
export interface ConnectorToolDefault {
|
|
44
|
+
/** Tool name as it appears in the connector's `tools[]` factory. */
|
|
45
|
+
name: string;
|
|
46
|
+
/** What the runtime should do by default when the LLM invokes this. */
|
|
47
|
+
mode: ConnectorToolMode;
|
|
48
|
+
}
|
|
31
49
|
/**
|
|
32
50
|
* UI hints for connectors that authenticate via a user-pasted API key
|
|
33
51
|
* instead of the OAuth2 dance (Granola — and any future provider whose
|
|
@@ -86,4 +104,17 @@ export interface ConnectorDefinition {
|
|
|
86
104
|
/** Tools this connector contributes to the agent's toolbelt once a user
|
|
87
105
|
* has authorized. */
|
|
88
106
|
tools: ConnectorToolFactory[];
|
|
107
|
+
/**
|
|
108
|
+
* Connector-author's recommended initial mode for each tool. The
|
|
109
|
+
* platform uses this as the fallback when the tenant has not saved a
|
|
110
|
+
* per-tool override yet (no row in `af_connector_tool_defaults`). It
|
|
111
|
+
* also seeds the `/connectors/:id` admin page on first visit.
|
|
112
|
+
*
|
|
113
|
+
* Tools not listed here are assumed `allow`. Tools listed that don't
|
|
114
|
+
* match any `tools[i].definition.name` are ignored by the resolver.
|
|
115
|
+
*
|
|
116
|
+
* Optional. When omitted, every tool defaults to `allow` (matches the
|
|
117
|
+
* historical whitelist semantics).
|
|
118
|
+
*/
|
|
119
|
+
defaultToolPermissions?: ConnectorToolDefault[];
|
|
89
120
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"description": "Framework-free AI runtime SDK. Owns: agent loop (Anthropic), conversations, tools, streaming, agent-job queue, SdkHooks. Identity, billing, infra (email/uploads/secrets) live in the host's modules — not here.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|