@agentforge-io/core 3.3.0 → 3.3.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.
|
@@ -16,6 +16,19 @@ export interface ConnectorToolContext {
|
|
|
16
16
|
/** Returns a valid (non-expired) access token. Refreshes transparently
|
|
17
17
|
* if the cached one is within the refresh window. */
|
|
18
18
|
getAccessToken: () => Promise<string>;
|
|
19
|
+
/**
|
|
20
|
+
* Per-installation context captured at OAuth-time and persisted on
|
|
21
|
+
* `ConnectorAuth.metadata`. Today only used by Shopify (`metadata.shop`
|
|
22
|
+
* holds the per-store domain), but kept generic so future per-install
|
|
23
|
+
* providers (Atlassian cloudId, Intercom region) can read theirs
|
|
24
|
+
* without another field on the context.
|
|
25
|
+
*
|
|
26
|
+
* Undefined for connectors that didn't stamp anything (Google, HubSpot,
|
|
27
|
+
* etc.). Tools that need a key here must throw a clear error when
|
|
28
|
+
* absent so a missing-metadata regression surfaces at the tool call
|
|
29
|
+
* rather than mid-API-request.
|
|
30
|
+
*/
|
|
31
|
+
metadata?: Record<string, unknown>;
|
|
19
32
|
}
|
|
20
33
|
/**
|
|
21
34
|
* A connector tool is an AgentForge tool that needs an authenticated user
|
|
@@ -339,6 +339,7 @@ class ConnectorRegistryService {
|
|
|
339
339
|
userId: contextUserId,
|
|
340
340
|
connectorId: a.connectorId,
|
|
341
341
|
getAccessToken: () => this.getAccessToken(a),
|
|
342
|
+
metadata: a.metadata,
|
|
342
343
|
};
|
|
343
344
|
for (const factory of def.tools) {
|
|
344
345
|
tools.push({ ...factory.definition, execute: factory.build(ctx) });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/core",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
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",
|