@dainprotocol/service-sdk 2.0.68 → 2.0.70
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/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './service';
|
|
2
2
|
export * as DAINServiceClient from "./client";
|
|
3
|
-
export { createTool, createService, createToolbox, CoreUtils, createWebhookTriggerRegistry, createSimpleTrigger, createTypedTrigger, WebhookTriggerRegistry, type WebhookTrigger, type WebhookTriggerDefinition, type WebhookProcessResult, forwardTriggerToAutomationCore, type TriggerForwardingConfig, type TriggerForwardResult, } from './service';
|
|
3
|
+
export { createTool, createService, createToolbox, CoreUtils, createWebhookTriggerRegistry, createSimpleTrigger, createTypedTrigger, WebhookTriggerRegistry, type WebhookTrigger, type WebhookTriggerDefinition, type WebhookProcessResult, forwardTriggerToAutomationCore, type TriggerForwardingConfig, type TriggerForwardResult, ActionableToolBaseSchema, ActionSchema, MetadataSchema, extendActionableSchema, buildActionableTool, validateActionableSchema, type ActionableToolInput, type Action, type AutomationMetadata, } from './service';
|
|
4
4
|
export * as DAINPlugins from "./plugins";
|
|
5
5
|
export * as DAINServicePayments from "./lib/payments";
|
|
6
6
|
export { jsonToZod, zodToJson, getZodTypeName, type SerializedSchema, } from "./lib/schemaConversion";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InMemoryStorageAdapter = exports.OAuth2Client = exports.createToolWithInterface = exports.ContentSchema = exports.CitationSchema = exports.TOOL_INTERFACES = exports.KnowledgeSearchInterface = exports.ToolInterfaceType = exports.getZodTypeName = exports.zodToJson = exports.jsonToZod = exports.DAINServicePayments = exports.DAINPlugins = exports.forwardTriggerToAutomationCore = exports.WebhookTriggerRegistry = exports.createTypedTrigger = exports.createSimpleTrigger = exports.createWebhookTriggerRegistry = exports.CoreUtils = exports.createToolbox = exports.createService = exports.createTool = exports.DAINServiceClient = void 0;
|
|
3
|
+
exports.InMemoryStorageAdapter = exports.OAuth2Client = exports.createToolWithInterface = exports.ContentSchema = exports.CitationSchema = exports.TOOL_INTERFACES = exports.KnowledgeSearchInterface = exports.ToolInterfaceType = exports.getZodTypeName = exports.zodToJson = exports.jsonToZod = exports.DAINServicePayments = exports.DAINPlugins = exports.validateActionableSchema = exports.buildActionableTool = exports.extendActionableSchema = exports.MetadataSchema = exports.ActionSchema = exports.ActionableToolBaseSchema = exports.forwardTriggerToAutomationCore = exports.WebhookTriggerRegistry = exports.createTypedTrigger = exports.createSimpleTrigger = exports.createWebhookTriggerRegistry = exports.CoreUtils = exports.createToolbox = exports.createService = exports.createTool = exports.DAINServiceClient = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
tslib_1.__exportStar(require("./service"), exports);
|
|
6
6
|
exports.DAINServiceClient = tslib_1.__importStar(require("./client"));
|
|
@@ -17,6 +17,13 @@ Object.defineProperty(exports, "createTypedTrigger", { enumerable: true, get: fu
|
|
|
17
17
|
Object.defineProperty(exports, "WebhookTriggerRegistry", { enumerable: true, get: function () { return service_1.WebhookTriggerRegistry; } });
|
|
18
18
|
// Trigger forwarding
|
|
19
19
|
Object.defineProperty(exports, "forwardTriggerToAutomationCore", { enumerable: true, get: function () { return service_1.forwardTriggerToAutomationCore; } });
|
|
20
|
+
// Actionable tools (standardized schema for tools with supportsUserActions)
|
|
21
|
+
Object.defineProperty(exports, "ActionableToolBaseSchema", { enumerable: true, get: function () { return service_1.ActionableToolBaseSchema; } });
|
|
22
|
+
Object.defineProperty(exports, "ActionSchema", { enumerable: true, get: function () { return service_1.ActionSchema; } });
|
|
23
|
+
Object.defineProperty(exports, "MetadataSchema", { enumerable: true, get: function () { return service_1.MetadataSchema; } });
|
|
24
|
+
Object.defineProperty(exports, "extendActionableSchema", { enumerable: true, get: function () { return service_1.extendActionableSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "buildActionableTool", { enumerable: true, get: function () { return service_1.buildActionableTool; } });
|
|
26
|
+
Object.defineProperty(exports, "validateActionableSchema", { enumerable: true, get: function () { return service_1.validateActionableSchema; } });
|
|
20
27
|
// Export plugins for easy access
|
|
21
28
|
exports.DAINPlugins = tslib_1.__importStar(require("./plugins"));
|
|
22
29
|
// If you want to keep the previous naming convention, you can do:
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA0B;AAC1B,sEAA8C;AAE9C,6CAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA0B;AAC1B,sEAA8C;AAE9C,6CAA6C;AAC7C,qCA2BmB;AA1BjB,qGAAA,UAAU,OAAA;AACV,wGAAA,aAAa,OAAA;AACb,wGAAA,aAAa,OAAA;AACb,oGAAA,SAAS,OAAA;AACT,mBAAmB;AACnB,uHAAA,4BAA4B,OAAA;AAC5B,8GAAA,mBAAmB,OAAA;AACnB,6GAAA,kBAAkB,OAAA;AAClB,iHAAA,sBAAsB,OAAA;AAItB,qBAAqB;AACrB,yHAAA,8BAA8B,OAAA;AAG9B,4EAA4E;AAC5E,mHAAA,wBAAwB,OAAA;AACxB,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,iHAAA,sBAAsB,OAAA;AACtB,8GAAA,mBAAmB,OAAA;AACnB,mHAAA,wBAAwB,OAAA;AAM1B,iCAAiC;AACjC,iEAAyC;AAEzC,kEAAkE;AAClE,4CAA4C;AAC5C,mFAAmF;AAEnF,8EAAsD;AAEtD,qCAAqC;AACrC,2DAKgC;AAJ9B,6GAAA,SAAS,OAAA;AACT,6GAAA,SAAS,OAAA;AACT,kHAAA,cAAc,OAAA;AAIhB,yBAAyB;AACzB,2CASsB;AARpB,+GAAA,iBAAiB,OAAA;AACjB,sHAAA,wBAAwB,OAAA;AACxB,6GAAA,eAAe,OAAA;AACf,4GAAA,cAAc,OAAA;AACd,2GAAA,aAAa,OAAA;AAMf,iCAAiC;AACjC,uCAAyD;AAAhD,+GAAA,uBAAuB,OAAA;AAEhC,6DAA6D;AAC7D,2EAa4C;AAZ1C,oHAAA,YAAY,OAAA;AAWZ,8HAAA,sBAAsB,OAAA"}
|
|
@@ -5,6 +5,7 @@ import { WebhookTriggerRegistry, createWebhookTriggerRegistry, createSimpleTrigg
|
|
|
5
5
|
import { HITLHandler, routeActionToService } from "./hitl";
|
|
6
6
|
import { forwardTriggerToAutomationCore, type TriggerForwardingConfig, type TriggerForwardResult } from "./trigger-forwarder";
|
|
7
7
|
import { SkillRegistry, createSkillRegistry, createGetSkillTool, type Skill } from "./skills";
|
|
8
|
+
import { ActionableToolBaseSchema, ActionSchema, MetadataSchema, extendActionableSchema, buildActionableTool, validateActionableSchema, type ActionableToolInput, type Action, type AutomationMetadata } from "./actionable-tools";
|
|
8
9
|
export declare function defineDAINService(config: DAINServiceConfig): DAINService;
|
|
9
|
-
export { createTool, createService, createToolbox, CoreUtils, createOAuth2Tool, createAgent, ProcessHandler, RedisProcessStore, MemoryProcessStore, WebhookTriggerRegistry, createWebhookTriggerRegistry, createSimpleTrigger, createTypedTrigger, type WebhookTrigger, type WebhookTriggerDefinition, type WebhookProcessResult, SkillRegistry, createSkillRegistry, createGetSkillTool, type Skill, HITLHandler, routeActionToService, forwardTriggerToAutomationCore, type TriggerForwardingConfig, type TriggerForwardResult, };
|
|
10
|
+
export { createTool, createService, createToolbox, CoreUtils, createOAuth2Tool, createAgent, ProcessHandler, RedisProcessStore, MemoryProcessStore, WebhookTriggerRegistry, createWebhookTriggerRegistry, createSimpleTrigger, createTypedTrigger, type WebhookTrigger, type WebhookTriggerDefinition, type WebhookProcessResult, SkillRegistry, createSkillRegistry, createGetSkillTool, type Skill, HITLHandler, routeActionToService, forwardTriggerToAutomationCore, type TriggerForwardingConfig, type TriggerForwardResult, ActionableToolBaseSchema, ActionSchema, MetadataSchema, extendActionableSchema, buildActionableTool, validateActionableSchema, type ActionableToolInput, type Action, type AutomationMetadata, };
|
|
10
11
|
export * from "./types";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.forwardTriggerToAutomationCore = exports.routeActionToService = exports.HITLHandler = exports.createGetSkillTool = exports.createSkillRegistry = exports.SkillRegistry = exports.createTypedTrigger = exports.createSimpleTrigger = exports.createWebhookTriggerRegistry = exports.WebhookTriggerRegistry = exports.MemoryProcessStore = exports.RedisProcessStore = exports.ProcessHandler = exports.createAgent = exports.createOAuth2Tool = exports.CoreUtils = exports.createToolbox = exports.createService = exports.createTool = void 0;
|
|
3
|
+
exports.validateActionableSchema = exports.buildActionableTool = exports.extendActionableSchema = exports.MetadataSchema = exports.ActionSchema = exports.ActionableToolBaseSchema = exports.forwardTriggerToAutomationCore = exports.routeActionToService = exports.HITLHandler = exports.createGetSkillTool = exports.createSkillRegistry = exports.SkillRegistry = exports.createTypedTrigger = exports.createSimpleTrigger = exports.createWebhookTriggerRegistry = exports.WebhookTriggerRegistry = exports.MemoryProcessStore = exports.RedisProcessStore = exports.ProcessHandler = exports.createAgent = exports.createOAuth2Tool = exports.CoreUtils = exports.createToolbox = exports.createService = exports.createTool = void 0;
|
|
4
4
|
exports.defineDAINService = defineDAINService;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const service_1 = require("./service");
|
|
@@ -29,6 +29,13 @@ const skills_1 = require("./skills");
|
|
|
29
29
|
Object.defineProperty(exports, "SkillRegistry", { enumerable: true, get: function () { return skills_1.SkillRegistry; } });
|
|
30
30
|
Object.defineProperty(exports, "createSkillRegistry", { enumerable: true, get: function () { return skills_1.createSkillRegistry; } });
|
|
31
31
|
Object.defineProperty(exports, "createGetSkillTool", { enumerable: true, get: function () { return skills_1.createGetSkillTool; } });
|
|
32
|
+
const actionable_tools_1 = require("./actionable-tools");
|
|
33
|
+
Object.defineProperty(exports, "ActionableToolBaseSchema", { enumerable: true, get: function () { return actionable_tools_1.ActionableToolBaseSchema; } });
|
|
34
|
+
Object.defineProperty(exports, "ActionSchema", { enumerable: true, get: function () { return actionable_tools_1.ActionSchema; } });
|
|
35
|
+
Object.defineProperty(exports, "MetadataSchema", { enumerable: true, get: function () { return actionable_tools_1.MetadataSchema; } });
|
|
36
|
+
Object.defineProperty(exports, "extendActionableSchema", { enumerable: true, get: function () { return actionable_tools_1.extendActionableSchema; } });
|
|
37
|
+
Object.defineProperty(exports, "buildActionableTool", { enumerable: true, get: function () { return actionable_tools_1.buildActionableTool; } });
|
|
38
|
+
Object.defineProperty(exports, "validateActionableSchema", { enumerable: true, get: function () { return actionable_tools_1.validateActionableSchema; } });
|
|
32
39
|
function defineDAINService(config) {
|
|
33
40
|
const baseService = (0, service_1.createBaseDAINService)(config);
|
|
34
41
|
const startNode = async (options = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeService.js","sourceRoot":"","sources":["../../src/service/nodeService.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"nodeService.js","sourceRoot":"","sources":["../../src/service/nodeService.ts"],"names":[],"mappings":";;;AA6CA,8CAuDC;;AAnGD,uCAAkD;AAClD,iCAOgB;AA8Fd,2FApGA,iBAAU,OAoGA;AACV,8FApGA,oBAAa,OAoGA;AACb,8FApGA,oBAAa,OAoGA;AACb,0FApGA,gBAAS,OAoGA;AACT,iGApGA,uBAAgB,OAoGA;AAChB,4FApGA,kBAAW,OAoGA;AAjGb,2CAAoF;AAkGlF,+FAlGO,0BAAc,OAkGP;AACd,kGAnGuB,6BAAiB,OAmGvB;AACjB,mGApG0C,8BAAkB,OAoG1C;AAnGpB,yCAQoB;AA6FlB,uGApGA,iCAAsB,OAoGA;AACtB,6GApGA,uCAA4B,OAoGA;AAC5B,oGApGA,8BAAmB,O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