@agentforge-io/sdk-server 4.17.0 → 4.19.0
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/client.d.ts +2 -0
- package/dist/client.js +2 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/resources/marketplace.d.ts +12 -0
- package/dist/resources/marketplace.js +21 -0
- package/dist/resources/templates.d.ts +5 -0
- package/dist/resources/templates.js +4 -0
- package/dist/types.d.ts +50 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { ProvisioningResource } from './resources/provisioning';
|
|
|
9
9
|
import { SecretsResource } from './resources/secrets';
|
|
10
10
|
import { TeamsResource } from './resources/teams';
|
|
11
11
|
import { TemplatesResource } from './resources/templates';
|
|
12
|
+
import { MarketplaceResource } from './resources/marketplace';
|
|
12
13
|
import { TenantConfigResource } from './resources/config';
|
|
13
14
|
import { CatalogResource } from './resources/catalog';
|
|
14
15
|
import { BusinessRolesResource } from './resources/business-roles';
|
|
@@ -91,6 +92,7 @@ export declare class AgentForgeClient {
|
|
|
91
92
|
readonly tools: ToolsResource;
|
|
92
93
|
readonly teams: TeamsResource;
|
|
93
94
|
readonly templates: TemplatesResource;
|
|
95
|
+
readonly marketplace: MarketplaceResource;
|
|
94
96
|
readonly config: TenantConfigResource;
|
|
95
97
|
readonly businessRoles: BusinessRolesResource;
|
|
96
98
|
readonly catalog: CatalogResource;
|
package/dist/client.js
CHANGED
|
@@ -31,6 +31,7 @@ const provisioning_1 = require("./resources/provisioning");
|
|
|
31
31
|
const secrets_1 = require("./resources/secrets");
|
|
32
32
|
const teams_1 = require("./resources/teams");
|
|
33
33
|
const templates_1 = require("./resources/templates");
|
|
34
|
+
const marketplace_1 = require("./resources/marketplace");
|
|
34
35
|
const config_1 = require("./resources/config");
|
|
35
36
|
const catalog_1 = require("./resources/catalog");
|
|
36
37
|
const business_roles_1 = require("./resources/business-roles");
|
|
@@ -73,6 +74,7 @@ class AgentForgeClient {
|
|
|
73
74
|
this.tools = new tools_1.ToolsResource(this);
|
|
74
75
|
this.teams = new teams_1.TeamsResource(this);
|
|
75
76
|
this.templates = new templates_1.TemplatesResource(this);
|
|
77
|
+
this.marketplace = new marketplace_1.MarketplaceResource(this);
|
|
76
78
|
this.config = new config_1.TenantConfigResource(this);
|
|
77
79
|
this.businessRoles = new business_roles_1.BusinessRolesResource(this);
|
|
78
80
|
this.catalog = new catalog_1.CatalogResource(this);
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { AgentForgeClient, INSTALLED_TENANT_HEADER } from './client';
|
|
|
2
2
|
export type { AgentForgeClientOptions, RequestOptions } from './client';
|
|
3
3
|
export { AgentForgeError, AgentForgeAuthError, AgentForgeNotFoundError, AgentForgeNetworkError, } from './errors';
|
|
4
4
|
export { TOOL_CALLBACK_HEADERS, ToolCallbackSignatureError, signToolCallbackPayload, verifyToolCallbackSignature, } from './webhooks';
|
|
5
|
-
export type { AgentMe, AgentSummary, AppUserConnectorStatus, ApprovalCopyBundle, ChannelContext, ChatStreamChunk, ChatStreamEvent, ChatTokenRecord, ConnectorDefaultsResult, ConnectorDefaultsSource, ConnectorResourceItem, ConnectorStatus, ConnectorToolInfo, ConversationHistory, ConversationStatus, CreateAgentInput, CreateClickupTaskInput, CreateClickupTaskResult, ExternalToolSummary, IssueChatTokenInput, ListAgentsResult, ListConnectorResourcesResult, McpServerConfig, MessageRecord, MessageRole, PublicAppBranding, PublicProfileBlock, PublicProfileTemplate, PublicTeamLanding, CreateTeamInput, UpdateTeamInput, TeamSummary, TeamDetail, TeamTheme, TeamBusinessHours, TeamWeekday, TeamProfileBlock, AppInstallation, TemplateConfigField, TemplateSummary, TemplateDetail, TemplateInstallResult, TenantConfigEntry, AppSelf, AppSelfConnector, AppSelfConnectors, AppSelfConnectorTools, AppSelfConnectorToolsResponse, RegisterToolInput, RegisterToolsInput, BusinessRoleEntry, Catalog, CatalogCheckoutCta, CatalogCategory, CatalogProduct, CatalogProductPhoto, CatalogProductKind, CatalogProductStatus, CatalogPriceKind, CatalogAvailability, CatalogLockableField, CatalogProductPage, UpsertCatalogInput, CreateCatalogCategoryInput, UpdateCatalogCategoryInput, CreateCatalogProductInput, UpdateCatalogProductInput, ListCatalogProductsInput, CatalogPhotoUploadTarget, SignCatalogPhotoUploadInput, AttachCatalogPhotoInput, CatalogImportItem, CatalogImportPreview, CatalogImportApplyResult, CatalogFileMapping, CatalogFilePlan, CatalogFilePreview, CatalogFileApplyResult, CatalogFileInput, CatalogFilePreviewInput, CatalogFileApplyInput, CatalogFileErrorCode, CatalogImportSourceStatus, CatalogImportColumnMapping, CatalogImportRunResult, CatalogImportSource, CreateCatalogImportSourceInput, UpdateCatalogImportSourceInput, PreviewCatalogImportSourceInput, CatalogImportSourcePreview, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, GoogleSheetsPickerInput, GoogleSheetsPickerSession, GoogleSheetsPickerErrorCode, GoogleSheetsPickerResult, RegisterToolsResult, ToolCallbackPayload, ToolCallRecord, ToolPermission, ToolPermissionMode, TokenUsage, TenantSecretEntry, UpdateAgentInput, InboxThreadMode, InboxMessageDirection, InboxMessageSource, InboxMessageType, InboxThreadCustomerProfileView, InboxThreadView, InboxMessageView, SupportKpiTotals, SupportKpiResponse, AgentAttentionLogRow, } from './types';
|
|
5
|
+
export type { AgentMe, AgentSummary, AppUserConnectorStatus, ApprovalCopyBundle, ChannelContext, ChatStreamChunk, ChatStreamEvent, ChatTokenRecord, ConnectorDefaultsResult, ConnectorDefaultsSource, ConnectorResourceItem, ConnectorStatus, ConnectorToolInfo, ConversationHistory, ConversationStatus, CreateAgentInput, CreateClickupTaskInput, CreateClickupTaskResult, ExternalToolSummary, IssueChatTokenInput, ListAgentsResult, ListConnectorResourcesResult, McpServerConfig, MessageRecord, MessageRole, PublicAppBranding, PublicProfileBlock, PublicProfileTemplate, PublicTeamLanding, CreateTeamInput, UpdateTeamInput, TeamSummary, TeamDetail, TeamTheme, TeamBusinessHours, TeamWeekday, TeamProfileBlock, AppInstallation, TemplateConfigField, TemplateSummary, TemplateDetail, TemplateCategoryRef, MarketplaceCategory, MarketplaceCategoryGroup, MarketplaceLocale, TemplateInstallResult, TenantConfigEntry, AppSelf, AppSelfConnector, AppSelfConnectors, AppSelfConnectorTools, AppSelfConnectorToolsResponse, RegisterToolInput, RegisterToolsInput, BusinessRoleEntry, Catalog, CatalogCheckoutCta, CatalogCategory, CatalogProduct, CatalogProductPhoto, CatalogProductKind, CatalogProductStatus, CatalogPriceKind, CatalogAvailability, CatalogLockableField, CatalogProductPage, UpsertCatalogInput, CreateCatalogCategoryInput, UpdateCatalogCategoryInput, CreateCatalogProductInput, UpdateCatalogProductInput, ListCatalogProductsInput, CatalogPhotoUploadTarget, SignCatalogPhotoUploadInput, AttachCatalogPhotoInput, CatalogImportItem, CatalogImportPreview, CatalogImportApplyResult, CatalogFileMapping, CatalogFilePlan, CatalogFilePreview, CatalogFileApplyResult, CatalogFileInput, CatalogFilePreviewInput, CatalogFileApplyInput, CatalogFileErrorCode, CatalogImportSourceStatus, CatalogImportColumnMapping, CatalogImportRunResult, CatalogImportSource, CreateCatalogImportSourceInput, UpdateCatalogImportSourceInput, PreviewCatalogImportSourceInput, CatalogImportSourcePreview, CatalogSheetTab, CatalogTemplateSheet, CreateCatalogTemplateSheetInput, GoogleSheetsPickerInput, GoogleSheetsPickerSession, GoogleSheetsPickerErrorCode, GoogleSheetsPickerResult, RegisterToolsResult, ToolCallbackPayload, ToolCallRecord, ToolPermission, ToolPermissionMode, TokenUsage, TenantSecretEntry, UpdateAgentInput, InboxThreadMode, InboxMessageDirection, InboxMessageSource, InboxMessageType, InboxThreadCustomerProfileView, InboxThreadView, InboxMessageView, SupportKpiTotals, SupportKpiResponse, AgentAttentionLogRow, } from './types';
|
|
6
6
|
export { AgentsResource } from './resources/agents';
|
|
7
7
|
export { AnalyticsResource } from './resources/analytics';
|
|
8
8
|
export type { GetSupportKpisInput, GetAgentAttentionLogInput, } from './resources/analytics';
|
|
@@ -16,6 +16,8 @@ export { InstallationsResource } from './resources/installations';
|
|
|
16
16
|
export type { InstallAppInput } from './resources/installations';
|
|
17
17
|
export { TemplatesResource } from './resources/templates';
|
|
18
18
|
export type { ListTemplatesInput } from './resources/templates';
|
|
19
|
+
export { MarketplaceResource } from './resources/marketplace';
|
|
20
|
+
export type { ListMarketplaceCategoriesInput } from './resources/marketplace';
|
|
19
21
|
export { TenantConfigResource } from './resources/config';
|
|
20
22
|
export { BusinessRolesResource } from './resources/business-roles';
|
|
21
23
|
export { CatalogResource, CatalogCategoriesResource, CatalogProductsResource, CatalogPhotosResource, CatalogImportResource, CatalogFileImportResource, CatalogSourcesResource, AgentForgeCatalogImportLimitError, CATALOG_IMPORT_MAX_ITEMS, } from './resources/catalog';
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
// const payload = af.tools.verifyCallback({ rawBody, signatureHeader, secretPlaintext });
|
|
29
29
|
// await af.tools.respondToCallback({ resultUrl: payload.resultUrl, tenantId: payload.tenantId, secret, result });
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.ToolsResource = exports.TeamsResource = exports.SecretsResource = exports.ProvisioningResource = exports.CATALOG_IMPORT_MAX_ITEMS = exports.AgentForgeCatalogImportLimitError = exports.CatalogSourcesResource = exports.CatalogFileImportResource = exports.CatalogImportResource = exports.CatalogPhotosResource = exports.CatalogProductsResource = exports.CatalogCategoriesResource = exports.CatalogResource = exports.BusinessRolesResource = exports.TenantConfigResource = exports.TemplatesResource = exports.InstallationsResource = exports.InboxResource = exports.parseGoogleSheetsPickerResult = exports.ConnectorsResource = exports.ChatResource = exports.AppsResource = exports.AnalyticsResource = exports.AgentsResource = exports.verifyToolCallbackSignature = exports.signToolCallbackPayload = exports.ToolCallbackSignatureError = exports.TOOL_CALLBACK_HEADERS = exports.AgentForgeNetworkError = exports.AgentForgeNotFoundError = exports.AgentForgeAuthError = exports.AgentForgeError = exports.INSTALLED_TENANT_HEADER = exports.AgentForgeClient = void 0;
|
|
31
|
+
exports.ToolsResource = exports.TeamsResource = exports.SecretsResource = exports.ProvisioningResource = exports.CATALOG_IMPORT_MAX_ITEMS = exports.AgentForgeCatalogImportLimitError = exports.CatalogSourcesResource = exports.CatalogFileImportResource = exports.CatalogImportResource = exports.CatalogPhotosResource = exports.CatalogProductsResource = exports.CatalogCategoriesResource = exports.CatalogResource = exports.BusinessRolesResource = exports.TenantConfigResource = exports.MarketplaceResource = exports.TemplatesResource = exports.InstallationsResource = exports.InboxResource = exports.parseGoogleSheetsPickerResult = exports.ConnectorsResource = exports.ChatResource = exports.AppsResource = exports.AnalyticsResource = exports.AgentsResource = exports.verifyToolCallbackSignature = exports.signToolCallbackPayload = exports.ToolCallbackSignatureError = exports.TOOL_CALLBACK_HEADERS = exports.AgentForgeNetworkError = exports.AgentForgeNotFoundError = exports.AgentForgeAuthError = exports.AgentForgeError = exports.INSTALLED_TENANT_HEADER = exports.AgentForgeClient = void 0;
|
|
32
32
|
var client_1 = require("./client");
|
|
33
33
|
Object.defineProperty(exports, "AgentForgeClient", { enumerable: true, get: function () { return client_1.AgentForgeClient; } });
|
|
34
34
|
Object.defineProperty(exports, "INSTALLED_TENANT_HEADER", { enumerable: true, get: function () { return client_1.INSTALLED_TENANT_HEADER; } });
|
|
@@ -59,6 +59,8 @@ var installations_1 = require("./resources/installations");
|
|
|
59
59
|
Object.defineProperty(exports, "InstallationsResource", { enumerable: true, get: function () { return installations_1.InstallationsResource; } });
|
|
60
60
|
var templates_1 = require("./resources/templates");
|
|
61
61
|
Object.defineProperty(exports, "TemplatesResource", { enumerable: true, get: function () { return templates_1.TemplatesResource; } });
|
|
62
|
+
var marketplace_1 = require("./resources/marketplace");
|
|
63
|
+
Object.defineProperty(exports, "MarketplaceResource", { enumerable: true, get: function () { return marketplace_1.MarketplaceResource; } });
|
|
62
64
|
var config_1 = require("./resources/config");
|
|
63
65
|
Object.defineProperty(exports, "TenantConfigResource", { enumerable: true, get: function () { return config_1.TenantConfigResource; } });
|
|
64
66
|
var business_roles_1 = require("./resources/business-roles");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AgentForgeClient } from '../client';
|
|
2
|
+
import type { MarketplaceCategory, MarketplaceCategoryGroup } from '../types';
|
|
3
|
+
export interface ListMarketplaceCategoriesInput {
|
|
4
|
+
/** Only this group; omit for both. */
|
|
5
|
+
group?: MarketplaceCategoryGroup;
|
|
6
|
+
}
|
|
7
|
+
export declare class MarketplaceResource {
|
|
8
|
+
private readonly client;
|
|
9
|
+
constructor(client: AgentForgeClient);
|
|
10
|
+
/** `GET /api/v1/marketplace/categories` — active categories, by sort order. */
|
|
11
|
+
categories(input?: ListMarketplaceCategoriesInput): Promise<MarketplaceCategory[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// marketplace resource — the platform's marketplace category list
|
|
3
|
+
// (AGF-MARKET-LISTING). A host App reads it to render category chips (label
|
|
4
|
+
// per locale + lucide icon name) and to filter `templates.list({ categories })`.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MarketplaceResource = void 0;
|
|
7
|
+
class MarketplaceResource {
|
|
8
|
+
constructor(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/** `GET /api/v1/marketplace/categories` — active categories, by sort order. */
|
|
12
|
+
async categories(input = {}) {
|
|
13
|
+
const qs = new URLSearchParams();
|
|
14
|
+
if (input.group)
|
|
15
|
+
qs.set('group', input.group);
|
|
16
|
+
const query = qs.toString();
|
|
17
|
+
const res = await this.client.request('GET', `/api/v1/marketplace/categories${query ? `?${query}` : ''}`);
|
|
18
|
+
return res.items;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.MarketplaceResource = MarketplaceResource;
|
|
@@ -12,6 +12,11 @@ export interface ListTemplatesInput {
|
|
|
12
12
|
scope?: 'own' | 'market';
|
|
13
13
|
/** Free-text search. */
|
|
14
14
|
q?: string;
|
|
15
|
+
/** AGF-MARKET-LISTING. Templates linked to ANY of these category slugs
|
|
16
|
+
* (sent as `categories=a,b`). */
|
|
17
|
+
categories?: string[];
|
|
18
|
+
/** Templates whose PRIMARY category is this slug. */
|
|
19
|
+
primaryCategory?: string;
|
|
15
20
|
/** 1–200. */
|
|
16
21
|
limit?: number;
|
|
17
22
|
}
|
|
@@ -31,6 +31,10 @@ class TemplatesResource {
|
|
|
31
31
|
qs.set('scope', input.scope);
|
|
32
32
|
if (input.q)
|
|
33
33
|
qs.set('q', input.q);
|
|
34
|
+
if (input.categories?.length)
|
|
35
|
+
qs.set('categories', input.categories.join(','));
|
|
36
|
+
if (input.primaryCategory)
|
|
37
|
+
qs.set('primaryCategory', input.primaryCategory);
|
|
34
38
|
if (input.limit !== undefined)
|
|
35
39
|
qs.set('limit', String(input.limit));
|
|
36
40
|
const query = qs.toString();
|
package/dist/types.d.ts
CHANGED
|
@@ -839,16 +839,35 @@ export interface TemplateSummary {
|
|
|
839
839
|
name: string;
|
|
840
840
|
description?: string;
|
|
841
841
|
icon?: string;
|
|
842
|
+
/** @deprecated Legacy free text; mirrors the primary category slug. Use `categories`. */
|
|
842
843
|
category?: string;
|
|
844
|
+
/** AGF-MARKET-LISTING. Listing images (platform storage URLs). */
|
|
845
|
+
logoUrl?: string;
|
|
846
|
+
coverUrl?: string;
|
|
847
|
+
/** Language the listing is written in. */
|
|
848
|
+
locale?: MarketplaceLocale;
|
|
849
|
+
/** Category chips; exactly one has `primary: true` when any are linked. */
|
|
850
|
+
categories: TemplateCategoryRef[];
|
|
851
|
+
/** Who published it: the workspace name, or 'AgentForge' for system rows. */
|
|
852
|
+
publisherName?: string;
|
|
843
853
|
tags?: string[];
|
|
844
854
|
visibility: 'system' | 'tenant' | 'public';
|
|
845
855
|
requiresConnectors?: string[];
|
|
846
856
|
requiresSecrets?: string[];
|
|
847
857
|
requiresConfig?: string[];
|
|
848
858
|
configSchema?: TemplateConfigField[];
|
|
859
|
+
/** AGF-TEMPLATE-CATALOG-FIELD. The template sells from the business
|
|
860
|
+
* catalog (`catalog_*` tools). Installing it provisions the destination
|
|
861
|
+
* workspace's catalog and points the catalog block at it; the host should
|
|
862
|
+
* ask the owner for products (`af.catalog`) instead of a product field.
|
|
863
|
+
* Absent on platforms older than the field: treat as `false`. */
|
|
864
|
+
usesCatalog?: boolean;
|
|
849
865
|
installsCount: number;
|
|
850
866
|
currentVersion: number;
|
|
867
|
+
/** One-time price in cents (USD). 0 / undefined = free. */
|
|
851
868
|
priceCents?: number;
|
|
869
|
+
/** Marketplace review state. */
|
|
870
|
+
marketplaceStatus?: 'none' | 'pending_review' | 'approved' | 'rejected';
|
|
852
871
|
createdAt: string;
|
|
853
872
|
updatedAt: string;
|
|
854
873
|
[field: string]: unknown;
|
|
@@ -856,6 +875,37 @@ export interface TemplateSummary {
|
|
|
856
875
|
/** `GET /api/v1/templates/:id` — summary + the snapshot it installs. */
|
|
857
876
|
export interface TemplateDetail extends TemplateSummary {
|
|
858
877
|
payload: Record<string, unknown>;
|
|
878
|
+
/** Template guide in Markdown (AGF-TEMPLATE-DETAIL). Detail only — never in
|
|
879
|
+
* lists. Raw HTML is refused on write; a YouTube/Vimeo URL on its own line
|
|
880
|
+
* is an embed; images are https URLs. */
|
|
881
|
+
guideMd?: string;
|
|
882
|
+
/** ISO timestamp of the last guide change. */
|
|
883
|
+
guideUpdatedAt?: string;
|
|
884
|
+
}
|
|
885
|
+
/** AGF-MARKET-LISTING. Languages a listing can be written in. */
|
|
886
|
+
export type MarketplaceLocale = 'es' | 'en';
|
|
887
|
+
/** `industry` = what the business is; `use_case` = what the template does. */
|
|
888
|
+
export type MarketplaceCategoryGroup = 'industry' | 'use_case';
|
|
889
|
+
/** A template's link to a category, as embedded in `TemplateSummary.categories`. */
|
|
890
|
+
export interface TemplateCategoryRef {
|
|
891
|
+
slug: string;
|
|
892
|
+
group: MarketplaceCategoryGroup;
|
|
893
|
+
primary: boolean;
|
|
894
|
+
/** False once an admin deactivated the category; the link stays. */
|
|
895
|
+
active: boolean;
|
|
896
|
+
/** Label per locale, e.g. `{ es: 'Comida', en: 'Food' }`. */
|
|
897
|
+
labels: Record<string, string>;
|
|
898
|
+
}
|
|
899
|
+
/** `GET /api/v1/marketplace/categories` item. */
|
|
900
|
+
export interface MarketplaceCategory {
|
|
901
|
+
id: string;
|
|
902
|
+
slug: string;
|
|
903
|
+
group: MarketplaceCategoryGroup;
|
|
904
|
+
labels: Record<string, string>;
|
|
905
|
+
/** lucide icon name (e.g. 'UtensilsCrossed'), or null. */
|
|
906
|
+
icon: string | null;
|
|
907
|
+
sortOrder: number;
|
|
908
|
+
active: boolean;
|
|
859
909
|
}
|
|
860
910
|
/** `POST /api/v1/templates/:id/install` result. */
|
|
861
911
|
export interface TemplateInstallResult {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge-io/sdk-server",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.0",
|
|
4
4
|
"description": "Server-side SDK for backend apps integrating with AgentForge platform. Auth via ChatToken, ak_live_ API key or App secret (sk_live_), with App installations across tenants.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|