@hexabot-ai/api 3.2.2-alpha.9 → 3.2.2-beta.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/actions/actions.service.d.ts +1 -0
- package/dist/actions/actions.service.js +19 -1
- package/dist/actions/actions.service.js.map +1 -1
- package/dist/actions/types.d.ts +3 -1
- package/dist/app.controller.d.ts +1 -0
- package/dist/app.controller.js +1 -0
- package/dist/app.controller.js.map +1 -1
- package/dist/app.module.js +13 -1
- package/dist/app.module.js.map +1 -1
- package/dist/config/index.js +14 -2
- package/dist/config/index.js.map +1 -1
- package/dist/config/types.d.ts +9 -0
- package/dist/extensions/actions/ai/agent.action.d.ts +1 -1
- package/dist/extensions/actions/ai/agent.action.js +6 -3
- package/dist/extensions/actions/ai/agent.action.js.map +1 -1
- package/dist/extensions/actions/ai/ai-base.action.d.ts +1 -1
- package/dist/extensions/actions/ai/ai-base.action.js +18 -5
- package/dist/extensions/actions/ai/ai-base.action.js.map +1 -1
- package/dist/extensions/actions/ai/generate-object.base.action.d.ts +1 -1
- package/dist/extensions/actions/ai/generate-object.base.action.js +3 -2
- package/dist/extensions/actions/ai/generate-object.base.action.js.map +1 -1
- package/dist/extensions/actions/ai/generate-text.base.action.d.ts +1 -1
- package/dist/extensions/actions/ai/generate-text.base.action.js +3 -2
- package/dist/extensions/actions/ai/generate-text.base.action.js.map +1 -1
- package/dist/extensions/actions/ai/mcp.binding.js +2 -0
- package/dist/extensions/actions/ai/mcp.binding.js.map +1 -1
- package/dist/extensions/actions/ai/memory.binding.js +2 -0
- package/dist/extensions/actions/ai/memory.binding.js.map +1 -1
- package/dist/extensions/actions/ai/retrieve-content-rag.action.js +2 -0
- package/dist/extensions/actions/ai/retrieve-content-rag.action.js.map +1 -1
- package/dist/extensions/actions/messaging/list.action.d.ts +2 -2
- package/dist/extensions/actions/messaging/list.action.js +7 -0
- package/dist/extensions/actions/messaging/list.action.js.map +1 -1
- package/dist/extensions/actions/subscriber/update-labels.action.js +3 -0
- package/dist/extensions/actions/subscriber/update-labels.action.js.map +1 -1
- package/dist/extensions/actions/web/http-request.action.js +12 -1
- package/dist/extensions/actions/web/http-request.action.js.map +1 -1
- package/dist/extensions/actions/workflow/call-workflow.action.d.ts +19 -0
- package/dist/extensions/actions/workflow/call-workflow.action.js +83 -0
- package/dist/extensions/actions/workflow/call-workflow.action.js.map +1 -0
- package/dist/extensions/actions/workflow/i18n/en.translations.json +9 -0
- package/dist/extensions/actions/workflow/i18n/fr.translations.json +9 -0
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/index.js +1 -0
- package/dist/extensions/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/controllers/mcp-token.controller.d.ts +47 -0
- package/dist/mcp/controllers/mcp-token.controller.js +70 -0
- package/dist/mcp/controllers/mcp-token.controller.js.map +1 -0
- package/dist/mcp/decorators/mcp-permission.decorator.d.ts +8 -0
- package/dist/mcp/decorators/mcp-permission.decorator.js +11 -0
- package/dist/mcp/decorators/mcp-permission.decorator.js.map +1 -0
- package/dist/mcp/dto/mcp-token.dto.d.ts +17 -0
- package/dist/mcp/dto/mcp-token.dto.js +40 -0
- package/dist/mcp/dto/mcp-token.dto.js.map +1 -0
- package/dist/mcp/entities/mcp-token.entity.d.ts +111 -0
- package/dist/mcp/entities/mcp-token.entity.js +69 -0
- package/dist/mcp/entities/mcp-token.entity.js.map +1 -0
- package/dist/mcp/guards/hexabot-mcp-token.guard.d.ts +9 -0
- package/dist/mcp/guards/hexabot-mcp-token.guard.js +49 -0
- package/dist/mcp/guards/hexabot-mcp-token.guard.js.map +1 -0
- package/dist/mcp/guards/mcp-permission.guard.d.ts +9 -0
- package/dist/mcp/guards/mcp-permission.guard.js +47 -0
- package/dist/mcp/guards/mcp-permission.guard.js.map +1 -0
- package/dist/mcp/mcp-api.module.d.ts +2 -0
- package/dist/mcp/mcp-api.module.js +65 -0
- package/dist/mcp/mcp-api.module.js.map +1 -0
- package/dist/mcp/repositories/mcp-token.repository.d.ts +8 -0
- package/dist/mcp/repositories/mcp-token.repository.js +41 -0
- package/dist/mcp/repositories/mcp-token.repository.js.map +1 -0
- package/dist/mcp/services/mcp-token.service.d.ts +24 -0
- package/dist/mcp/services/mcp-token.service.js +106 -0
- package/dist/mcp/services/mcp-token.service.js.map +1 -0
- package/dist/mcp/tools/catalog-mcp.tools.d.ts +63 -0
- package/dist/mcp/tools/catalog-mcp.tools.js +135 -0
- package/dist/mcp/tools/catalog-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/cms-mcp.tools.d.ts +128 -0
- package/dist/mcp/tools/cms-mcp.tools.js +242 -0
- package/dist/mcp/tools/cms-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/credential-mcp.tools.d.ts +19 -0
- package/dist/mcp/tools/credential-mcp.tools.js +82 -0
- package/dist/mcp/tools/credential-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/hexabot-mcp-tool.base.d.ts +22 -0
- package/dist/mcp/tools/hexabot-mcp-tool.base.js +48 -0
- package/dist/mcp/tools/hexabot-mcp-tool.base.js.map +1 -0
- package/dist/mcp/tools/hexabot-mcp.schemas.d.ts +41 -0
- package/dist/mcp/tools/hexabot-mcp.schemas.js +36 -0
- package/dist/mcp/tools/hexabot-mcp.schemas.js.map +1 -0
- package/dist/mcp/tools/hexabot-mcp.tools.d.ts +1 -0
- package/dist/mcp/tools/hexabot-mcp.tools.js +18 -0
- package/dist/mcp/tools/hexabot-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/hexabot-mcp.utils.d.ts +2 -0
- package/dist/mcp/tools/hexabot-mcp.utils.js +21 -0
- package/dist/mcp/tools/hexabot-mcp.utils.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +22 -0
- package/dist/mcp/tools/index.js +50 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/mcp-server-mcp.tools.d.ts +77 -0
- package/dist/mcp/tools/mcp-server-mcp.tools.js +130 -0
- package/dist/mcp/tools/mcp-server-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/memory-definition-mcp.tools.d.ts +57 -0
- package/dist/mcp/tools/memory-definition-mcp.tools.js +128 -0
- package/dist/mcp/tools/memory-definition-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/workflow-mcp.helper.d.ts +156 -0
- package/dist/mcp/tools/workflow-mcp.helper.js +128 -0
- package/dist/mcp/tools/workflow-mcp.helper.js.map +1 -0
- package/dist/mcp/tools/workflow-mcp.tools.d.ts +790 -0
- package/dist/mcp/tools/workflow-mcp.tools.js +227 -0
- package/dist/mcp/tools/workflow-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/workflow-run-mcp.tools.d.ts +349 -0
- package/dist/mcp/tools/workflow-run-mcp.tools.js +242 -0
- package/dist/mcp/tools/workflow-run-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/workflow-version-mcp.tools.d.ts +238 -0
- package/dist/mcp/tools/workflow-version-mcp.tools.js +368 -0
- package/dist/mcp/tools/workflow-version-mcp.tools.js.map +1 -0
- package/dist/mcp/types.d.ts +7 -0
- package/dist/mcp/types.js +3 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/static/assets/{browser-ponyfill-Qk7qpw-i.js → browser-ponyfill-D1dKqhtP.js} +2 -2
- package/dist/static/assets/{cssMode-CdhvY6oD.js → cssMode-DplazEqd.js} +1 -1
- package/dist/static/assets/{freemarker2-BPoURZH1.js → freemarker2-oSA1bGAm.js} +1 -1
- package/dist/static/assets/{handlebars-C4oubER1.js → handlebars-CcC7EgN2.js} +1 -1
- package/dist/static/assets/{html-CDE5RgVN.js → html-CcFTB7eP.js} +1 -1
- package/dist/static/assets/{htmlMode-C8edIUUq.js → htmlMode-g5g2wCUD.js} +1 -1
- package/dist/static/assets/{index-C1NxBXuS.js → index-CMp45yDR.js} +2379 -2330
- package/dist/static/assets/{index-BI1BtkYv.css → index-D-b9KTZd.css} +1 -1
- package/dist/static/assets/{javascript-Wp5m7adK.js → javascript-Dv0J7ioP.js} +1 -1
- package/dist/static/assets/{jsonMode-0eww5Srr.js → jsonMode-CzBkKOe4.js} +1 -1
- package/dist/static/assets/{liquid-DTktXITv.js → liquid-CptRs_ZU.js} +1 -1
- package/dist/static/assets/{lspLanguageFeatures-BzIRlKhn.js → lspLanguageFeatures-DXNU_upS.js} +1 -1
- package/dist/static/assets/{mdx-D508emqD.js → mdx-af00eMTm.js} +1 -1
- package/dist/static/assets/{python-BfhIq2kX.js → python-CNcx7i3L.js} +1 -1
- package/dist/static/assets/{razor-C7F8fOds.js → razor-BL_MSmP7.js} +1 -1
- package/dist/static/assets/{tsMode-B8zPu6Wl.js → tsMode-BWD4nt2F.js} +1 -1
- package/dist/static/assets/{typescript-Dew3VavZ.js → typescript-BbKUic6G.js} +1 -1
- package/dist/static/assets/{xml-B_2tc6Mh.js → xml-DFx6l4N0.js} +1 -1
- package/dist/static/assets/{yaml-pHcw4KrS.js → yaml-BNuTzPxo.js} +1 -1
- package/dist/static/index.html +2 -2
- package/dist/static/locales/en/translation.json +89 -4
- package/dist/static/locales/fr/translation.json +90 -5
- package/dist/transfer/adapters/content-type-transfer.adapter.d.ts +14 -0
- package/dist/transfer/adapters/content-type-transfer.adapter.js +102 -0
- package/dist/transfer/adapters/content-type-transfer.adapter.js.map +1 -0
- package/dist/transfer/adapters/credential-transfer.adapter.d.ts +13 -0
- package/dist/transfer/adapters/credential-transfer.adapter.js +110 -0
- package/dist/transfer/adapters/credential-transfer.adapter.js.map +1 -0
- package/dist/transfer/adapters/label-transfer.adapter.d.ts +15 -0
- package/dist/transfer/adapters/label-transfer.adapter.js +189 -0
- package/dist/transfer/adapters/label-transfer.adapter.js.map +1 -0
- package/dist/transfer/adapters/mcp-server-transfer.adapter.d.ts +16 -0
- package/dist/transfer/adapters/mcp-server-transfer.adapter.js +169 -0
- package/dist/transfer/adapters/mcp-server-transfer.adapter.js.map +1 -0
- package/dist/transfer/adapters/memory-definition-transfer.adapter.d.ts +14 -0
- package/dist/transfer/adapters/memory-definition-transfer.adapter.js +111 -0
- package/dist/transfer/adapters/memory-definition-transfer.adapter.js.map +1 -0
- package/dist/transfer/index.d.ts +7 -0
- package/dist/transfer/index.js +24 -0
- package/dist/transfer/index.js.map +1 -0
- package/dist/transfer/workflow-transfer-adapter.registry.d.ts +27 -0
- package/dist/transfer/workflow-transfer-adapter.registry.js +164 -0
- package/dist/transfer/workflow-transfer-adapter.registry.js.map +1 -0
- package/dist/transfer/workflow-transfer-definition.service.d.ts +40 -0
- package/dist/transfer/workflow-transfer-definition.service.js +353 -0
- package/dist/transfer/workflow-transfer-definition.service.js.map +1 -0
- package/dist/transfer/workflow-transfer-resource-adapter.d.ts +33 -0
- package/dist/transfer/workflow-transfer-resource-adapter.js +81 -0
- package/dist/transfer/workflow-transfer-resource-adapter.js.map +1 -0
- package/dist/transfer/workflow-transfer.controller.d.ts +9 -0
- package/dist/transfer/workflow-transfer.controller.js +63 -0
- package/dist/transfer/workflow-transfer.controller.js.map +1 -0
- package/dist/transfer/workflow-transfer.module.d.ts +2 -0
- package/dist/transfer/workflow-transfer.module.js +47 -0
- package/dist/transfer/workflow-transfer.module.js.map +1 -0
- package/dist/transfer/workflow-transfer.service.d.ts +51 -0
- package/dist/transfer/workflow-transfer.service.js +509 -0
- package/dist/transfer/workflow-transfer.service.js.map +1 -0
- package/dist/transfer/workflow-transfer.types.d.ts +31 -0
- package/dist/transfer/workflow-transfer.types.js +35 -0
- package/dist/transfer/workflow-transfer.types.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/event-emitter.d.ts +12 -5
- package/dist/user/dto/user.dto.d.ts +1 -1
- package/dist/user/guards/ability.guard.js +12 -2
- package/dist/user/guards/ability.guard.js.map +1 -1
- package/dist/utils/test/fixtures/label-group.d.ts +1 -1
- package/dist/utils/test/fixtures/label.d.ts +1 -1
- package/dist/utils/test/fixtures/subscriber.d.ts +1 -1
- package/dist/utils/test/fixtures/workflow-run.js +4 -1
- package/dist/utils/test/fixtures/workflow-run.js.map +1 -1
- package/dist/utils/test/port.d.ts +8 -0
- package/dist/utils/test/port.js +34 -0
- package/dist/utils/test/port.js.map +1 -0
- package/dist/websocket/websocket.gateway.d.ts +2 -1
- package/dist/websocket/websocket.gateway.js.map +1 -1
- package/dist/workflow/contexts/workflow-runtime.context.d.ts +3 -1
- package/dist/workflow/contexts/workflow-runtime.context.js +5 -0
- package/dist/workflow/contexts/workflow-runtime.context.js.map +1 -1
- package/dist/workflow/controllers/workflow-run.controller.js +2 -0
- package/dist/workflow/controllers/workflow-run.controller.js.map +1 -1
- package/dist/workflow/dto/workflow-run.dto.d.ts +1 -0
- package/dist/workflow/dto/workflow-run.dto.js +11 -0
- package/dist/workflow/dto/workflow-run.dto.js.map +1 -1
- package/dist/workflow/entities/memory-record.entity.d.ts +2 -0
- package/dist/workflow/entities/workflow-run.entity.d.ts +62 -0
- package/dist/workflow/entities/workflow-run.entity.js +15 -1
- package/dist/workflow/entities/workflow-run.entity.js.map +1 -1
- package/dist/workflow/index.d.ts +7 -0
- package/dist/workflow/index.js +7 -0
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/repositories/workflow-run.repository.js +7 -1
- package/dist/workflow/repositories/workflow-run.repository.js.map +1 -1
- package/dist/workflow/resource-refs.d.ts +17 -0
- package/dist/workflow/resource-refs.js +15 -0
- package/dist/workflow/resource-refs.js.map +1 -0
- package/dist/workflow/services/agentic.service.d.ts +9 -2
- package/dist/workflow/services/agentic.service.js +142 -19
- package/dist/workflow/services/agentic.service.js.map +1 -1
- package/dist/workflow/services/workflow-run.service.d.ts +3 -0
- package/dist/workflow/services/workflow-run.service.js +75 -3
- package/dist/workflow/services/workflow-run.service.js.map +1 -1
- package/dist/workflow/services/workflow-version.service.d.ts +2 -0
- package/dist/workflow/services/workflow-version.service.js +19 -0
- package/dist/workflow/services/workflow-version.service.js.map +1 -1
- package/dist/workflow/services/workflow.service.d.ts +13 -9
- package/dist/workflow/services/workflow.service.js +64 -35
- package/dist/workflow/services/workflow.service.js.map +1 -1
- package/dist/workflow/types.d.ts +31 -0
- package/dist/workflow/types.js +2 -1
- package/dist/workflow/types.js.map +1 -1
- package/dist/workflow/workflow.module.js +3 -0
- package/dist/workflow/workflow.module.js.map +1 -1
- package/package.json +8 -6
- package/src/actions/actions.service.ts +34 -4
- package/src/actions/types.ts +6 -5
- package/src/app.controller.ts +1 -0
- package/src/app.module.ts +17 -1
- package/src/config/index.ts +17 -2
- package/src/config/types.ts +9 -0
- package/src/extensions/actions/ai/agent.action.ts +6 -1
- package/src/extensions/actions/ai/ai-base.action.ts +39 -5
- package/src/extensions/actions/ai/generate-object.base.action.ts +3 -0
- package/src/extensions/actions/ai/generate-text.base.action.ts +3 -0
- package/src/extensions/actions/ai/mcp.binding.ts +2 -0
- package/src/extensions/actions/ai/memory.binding.ts +2 -0
- package/src/extensions/actions/ai/retrieve-content-rag.action.ts +2 -0
- package/src/extensions/actions/messaging/list.action.ts +7 -0
- package/src/extensions/actions/subscriber/update-labels.action.ts +3 -0
- package/src/extensions/actions/web/http-request.action.ts +17 -1
- package/src/extensions/actions/workflow/call-workflow.action.ts +112 -0
- package/src/extensions/actions/workflow/i18n/en.translations.json +9 -0
- package/src/extensions/actions/workflow/i18n/fr.translations.json +9 -0
- package/src/extensions/index.ts +2 -0
- package/src/index.ts +2 -0
- package/src/mcp/README.md +277 -0
- package/src/mcp/controllers/mcp-token.controller.ts +64 -0
- package/src/mcp/decorators/mcp-permission.decorator.ts +23 -0
- package/src/mcp/dto/mcp-token.dto.ts +48 -0
- package/src/mcp/entities/mcp-token.entity.ts +60 -0
- package/src/mcp/guards/hexabot-mcp-token.guard.ts +55 -0
- package/src/mcp/guards/mcp-permission.guard.ts +61 -0
- package/src/mcp/mcp-api.module.ts +61 -0
- package/src/mcp/repositories/mcp-token.repository.ts +34 -0
- package/src/mcp/services/mcp-token.service.ts +138 -0
- package/src/mcp/tools/catalog-mcp.tools.ts +122 -0
- package/src/mcp/tools/cms-mcp.tools.ts +239 -0
- package/src/mcp/tools/credential-mcp.tools.ts +81 -0
- package/src/mcp/tools/hexabot-mcp-tool.base.ts +74 -0
- package/src/mcp/tools/hexabot-mcp.schemas.ts +55 -0
- package/src/mcp/tools/hexabot-mcp.tools.ts +7 -0
- package/src/mcp/tools/hexabot-mcp.utils.ts +29 -0
- package/src/mcp/tools/index.ts +51 -0
- package/src/mcp/tools/mcp-server-mcp.tools.ts +135 -0
- package/src/mcp/tools/memory-definition-mcp.tools.ts +125 -0
- package/src/mcp/tools/workflow-mcp.helper.ts +219 -0
- package/src/mcp/tools/workflow-mcp.tools.ts +271 -0
- package/src/mcp/tools/workflow-run-mcp.tools.ts +292 -0
- package/src/mcp/tools/workflow-version-mcp.tools.ts +459 -0
- package/src/mcp/types.ts +14 -0
- package/src/transfer/adapters/content-type-transfer.adapter.ts +154 -0
- package/src/transfer/adapters/credential-transfer.adapter.ts +158 -0
- package/src/transfer/adapters/label-transfer.adapter.ts +291 -0
- package/src/transfer/adapters/mcp-server-transfer.adapter.ts +255 -0
- package/src/transfer/adapters/memory-definition-transfer.adapter.ts +167 -0
- package/src/transfer/index.ts +19 -0
- package/src/transfer/workflow-transfer-adapter.registry.ts +250 -0
- package/src/transfer/workflow-transfer-definition.service.ts +587 -0
- package/src/transfer/workflow-transfer-resource-adapter.ts +132 -0
- package/src/transfer/workflow-transfer.controller.ts +86 -0
- package/src/transfer/workflow-transfer.module.ts +46 -0
- package/src/transfer/workflow-transfer.service.ts +858 -0
- package/src/transfer/workflow-transfer.types.ts +98 -0
- package/src/user/guards/ability.guard.ts +15 -3
- package/src/utils/test/fixtures/workflow-run.ts +4 -1
- package/src/utils/test/port.ts +48 -0
- package/src/websocket/websocket.gateway.ts +2 -1
- package/src/workflow/contexts/workflow-runtime.context.ts +12 -1
- package/src/workflow/controllers/workflow-run.controller.ts +2 -0
- package/src/workflow/dto/workflow-run.dto.ts +10 -0
- package/src/workflow/entities/workflow-run.entity.ts +22 -1
- package/src/workflow/index.ts +14 -0
- package/src/workflow/repositories/workflow-run.repository.ts +7 -1
- package/src/workflow/resource-refs.ts +44 -0
- package/src/workflow/services/agentic.service.ts +271 -30
- package/src/workflow/services/workflow-run.service.ts +120 -7
- package/src/workflow/services/workflow-version.service.ts +33 -0
- package/src/workflow/services/workflow.service.ts +86 -31
- package/src/workflow/types.ts +52 -0
- package/src/workflow/workflow.module.ts +3 -0
- package/types/event-emitter.d.ts +12 -5
package/src/config/types.ts
CHANGED
|
@@ -43,6 +43,14 @@ type TDatabaseConfig = {
|
|
|
43
43
|
schema?: string;
|
|
44
44
|
autoMigrate: boolean;
|
|
45
45
|
};
|
|
46
|
+
type TMcpConfig = {
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
serverName: string;
|
|
49
|
+
serverTitle: string;
|
|
50
|
+
serverVersion: string;
|
|
51
|
+
serverDescription: string;
|
|
52
|
+
serverInstructions: string;
|
|
53
|
+
};
|
|
46
54
|
type SocketCookie =
|
|
47
55
|
| {
|
|
48
56
|
maxAge?: number | undefined;
|
|
@@ -59,6 +67,7 @@ export type Config = {
|
|
|
59
67
|
apiBaseUrl: string;
|
|
60
68
|
uiBaseUrl: string;
|
|
61
69
|
ssoEnabled: boolean;
|
|
70
|
+
mcp: TMcpConfig;
|
|
62
71
|
security: {
|
|
63
72
|
httpsEnabled: boolean;
|
|
64
73
|
trustProxy: boolean;
|
|
@@ -47,6 +47,7 @@ export class AiAgentAction extends AiBaseAction<
|
|
|
47
47
|
settings,
|
|
48
48
|
context,
|
|
49
49
|
bindings,
|
|
50
|
+
signal,
|
|
50
51
|
}: ExecArgs<AiAgentInput, WorkflowRuntimeContext, AiAgentSettings>) {
|
|
51
52
|
const logger = context.services.logger;
|
|
52
53
|
const modelBinding = bindings.model;
|
|
@@ -77,6 +78,7 @@ export class AiAgentAction extends AiBaseAction<
|
|
|
77
78
|
bindings.tools,
|
|
78
79
|
bindings.mcp,
|
|
79
80
|
selectedMemorySlugs,
|
|
81
|
+
signal,
|
|
80
82
|
)) as ToolSet | undefined;
|
|
81
83
|
const toolNames = [
|
|
82
84
|
...Object.keys(bindings.tools ?? {}),
|
|
@@ -115,7 +117,10 @@ export class AiAgentAction extends AiBaseAction<
|
|
|
115
117
|
throw new Error('Prompt is required to call the agent.');
|
|
116
118
|
}
|
|
117
119
|
|
|
118
|
-
const result = await agent.generate({
|
|
120
|
+
const result = await agent.generate({
|
|
121
|
+
prompt: agentPrompt,
|
|
122
|
+
abortSignal: signal,
|
|
123
|
+
});
|
|
119
124
|
|
|
120
125
|
return {
|
|
121
126
|
text: result.text,
|
|
@@ -656,6 +656,7 @@ export abstract class AiBaseAction<
|
|
|
656
656
|
toolBindings?: RuntimeBindings['tools'],
|
|
657
657
|
mcpToolBindings?: RuntimeBindings['mcp'],
|
|
658
658
|
selectedMemorySlugs: string[] = [],
|
|
659
|
+
signal?: AbortSignal,
|
|
659
660
|
): Promise<ToolSet | undefined> {
|
|
660
661
|
const actionService = context.services.actions;
|
|
661
662
|
const logger = context.services.logger;
|
|
@@ -691,15 +692,36 @@ export abstract class AiBaseAction<
|
|
|
691
692
|
description: action.description,
|
|
692
693
|
inputSchema: action.inputSchema,
|
|
693
694
|
outputSchema: action.outputSchema,
|
|
694
|
-
execute: async (input) =>
|
|
695
|
-
|
|
695
|
+
execute: async (input, options) => {
|
|
696
|
+
const toolSignal = options?.abortSignal ?? signal;
|
|
697
|
+
|
|
698
|
+
if (nestedBindings) {
|
|
699
|
+
return toolSignal
|
|
700
|
+
? action.run(
|
|
701
|
+
input,
|
|
702
|
+
context,
|
|
703
|
+
toolDefinition.settings as any,
|
|
704
|
+
nestedBindings as RuntimeBindings,
|
|
705
|
+
toolSignal,
|
|
706
|
+
)
|
|
707
|
+
: action.run(
|
|
708
|
+
input,
|
|
709
|
+
context,
|
|
710
|
+
toolDefinition.settings as any,
|
|
711
|
+
nestedBindings as RuntimeBindings,
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
return toolSignal
|
|
696
716
|
? action.run(
|
|
697
717
|
input,
|
|
698
718
|
context,
|
|
699
719
|
toolDefinition.settings as any,
|
|
700
|
-
|
|
720
|
+
undefined,
|
|
721
|
+
toolSignal,
|
|
701
722
|
)
|
|
702
|
-
: action.run(input, context, toolDefinition.settings as any)
|
|
723
|
+
: action.run(input, context, toolDefinition.settings as any);
|
|
724
|
+
},
|
|
703
725
|
} as ToolSet[string];
|
|
704
726
|
}
|
|
705
727
|
}
|
|
@@ -746,7 +768,19 @@ export abstract class AiBaseAction<
|
|
|
746
768
|
description: updateMemoryAction.description,
|
|
747
769
|
inputSchema: memorySchema,
|
|
748
770
|
outputSchema: memorySchema,
|
|
749
|
-
execute: async (input) =>
|
|
771
|
+
execute: async (input, options) => {
|
|
772
|
+
const toolSignal = options?.abortSignal ?? signal;
|
|
773
|
+
|
|
774
|
+
return toolSignal
|
|
775
|
+
? updateMemoryAction.run(
|
|
776
|
+
input,
|
|
777
|
+
context,
|
|
778
|
+
undefined,
|
|
779
|
+
undefined,
|
|
780
|
+
toolSignal,
|
|
781
|
+
)
|
|
782
|
+
: updateMemoryAction.run(input, context);
|
|
783
|
+
},
|
|
750
784
|
} as ToolSet[string];
|
|
751
785
|
}
|
|
752
786
|
}
|
|
@@ -35,6 +35,7 @@ export abstract class AiGenerateObjectBaseAction<
|
|
|
35
35
|
settings,
|
|
36
36
|
context,
|
|
37
37
|
bindings,
|
|
38
|
+
signal,
|
|
38
39
|
}: ExecArgs<I, C, AiGenerateObjectSettings>) {
|
|
39
40
|
const logger = context.services.logger;
|
|
40
41
|
const modelBinding = bindings.model;
|
|
@@ -68,6 +69,7 @@ export abstract class AiGenerateObjectBaseAction<
|
|
|
68
69
|
bindings.tools,
|
|
69
70
|
bindings.mcp,
|
|
70
71
|
selectedMemorySlugs,
|
|
72
|
+
signal,
|
|
71
73
|
)) as ToolSet | undefined;
|
|
72
74
|
const toolNames = [
|
|
73
75
|
...Object.keys(bindings.tools ?? {}),
|
|
@@ -101,6 +103,7 @@ export abstract class AiGenerateObjectBaseAction<
|
|
|
101
103
|
...callSettingsWithoutStops,
|
|
102
104
|
model,
|
|
103
105
|
output,
|
|
106
|
+
abortSignal: signal,
|
|
104
107
|
...(tools ? { tools } : {}),
|
|
105
108
|
...(stopWhen ? { stopWhen } : {}),
|
|
106
109
|
});
|
|
@@ -31,6 +31,7 @@ export abstract class AiGenerateTextBaseAction<
|
|
|
31
31
|
settings,
|
|
32
32
|
context,
|
|
33
33
|
bindings,
|
|
34
|
+
signal,
|
|
34
35
|
}: ExecArgs<I, C, AiGenerateTextSettings>) {
|
|
35
36
|
const logger = context.services.logger;
|
|
36
37
|
const modelBinding = bindings.model;
|
|
@@ -61,6 +62,7 @@ export abstract class AiGenerateTextBaseAction<
|
|
|
61
62
|
bindings.tools,
|
|
62
63
|
bindings.mcp,
|
|
63
64
|
selectedMemorySlugs,
|
|
65
|
+
signal,
|
|
64
66
|
)) as ToolSet | undefined;
|
|
65
67
|
const toolNames = [
|
|
66
68
|
...Object.keys(bindings.tools ?? {}),
|
|
@@ -86,6 +88,7 @@ export abstract class AiGenerateTextBaseAction<
|
|
|
86
88
|
...promptPayload,
|
|
87
89
|
...callSettings,
|
|
88
90
|
model,
|
|
91
|
+
abortSignal: signal,
|
|
89
92
|
...(tools ? { tools } : {}),
|
|
90
93
|
...(stopWhen ? { stopWhen } : {}),
|
|
91
94
|
});
|
|
@@ -8,6 +8,7 @@ import { BindingKindDescriptor } from '@hexabot-ai/agentic';
|
|
|
8
8
|
import z from 'zod';
|
|
9
9
|
|
|
10
10
|
import { createBindingKind } from '@/bindings/create-binding-kind';
|
|
11
|
+
import { workflowResourceRef } from '@/workflow/resource-refs';
|
|
11
12
|
|
|
12
13
|
export const aiMcpToolBindingSchema = z.strictObject({
|
|
13
14
|
server_id: z.uuid().meta({
|
|
@@ -20,6 +21,7 @@ export const aiMcpToolBindingSchema = z.strictObject({
|
|
|
20
21
|
labelKey: 'name',
|
|
21
22
|
enableEntityAddButton: true,
|
|
22
23
|
},
|
|
24
|
+
...workflowResourceRef('mcpServer'),
|
|
23
25
|
}),
|
|
24
26
|
tool_names: z
|
|
25
27
|
.array(z.string().trim().min(1))
|
|
@@ -8,6 +8,7 @@ import { BindingKindDescriptor } from '@hexabot-ai/agentic';
|
|
|
8
8
|
import z from 'zod';
|
|
9
9
|
|
|
10
10
|
import { createBindingKind } from '@/bindings/create-binding-kind';
|
|
11
|
+
import { workflowResourceRef } from '@/workflow/resource-refs';
|
|
11
12
|
|
|
12
13
|
export const aiMemoryBindingSchema = z.strictObject({
|
|
13
14
|
definition_id: z.uuid().meta({
|
|
@@ -21,6 +22,7 @@ export const aiMemoryBindingSchema = z.strictObject({
|
|
|
21
22
|
labelKey: 'name',
|
|
22
23
|
enableEntityAddButton: true,
|
|
23
24
|
},
|
|
25
|
+
...workflowResourceRef('memoryDefinition'),
|
|
24
26
|
}),
|
|
25
27
|
});
|
|
26
28
|
|
|
@@ -9,6 +9,7 @@ import { z } from 'zod';
|
|
|
9
9
|
import { createAction } from '@/actions/create-action';
|
|
10
10
|
import { RagMode, RagQueryOptions } from '@/cms';
|
|
11
11
|
import { WorkflowRuntimeContext } from '@/workflow/contexts/workflow-runtime.context';
|
|
12
|
+
import { workflowResourceRef } from '@/workflow/resource-refs';
|
|
12
13
|
|
|
13
14
|
const contentRagModeSchema = z.enum(['embedding', 'lexical']);
|
|
14
15
|
const retrieveRagContentInputSchema = z.strictObject({
|
|
@@ -38,6 +39,7 @@ const retrieveRagContentSettingsSchema = z.strictObject({
|
|
|
38
39
|
valueKey: 'id',
|
|
39
40
|
labelKey: 'name',
|
|
40
41
|
},
|
|
42
|
+
...workflowResourceRef('contentType'),
|
|
41
43
|
}),
|
|
42
44
|
include_inactive: z.boolean().default(false).meta({
|
|
43
45
|
title: 'Include inactive',
|
|
@@ -17,6 +17,7 @@ import { ExecArgs } from '@/actions';
|
|
|
17
17
|
import { ActionService } from '@/actions/actions.service';
|
|
18
18
|
import { ContentTypeService } from '@/cms/services/content-type.service';
|
|
19
19
|
import { ConversationalWorkflowContext } from '@/workflow/contexts/conversational-workflow.context';
|
|
20
|
+
import { workflowResourceRef } from '@/workflow/resource-refs';
|
|
20
21
|
|
|
21
22
|
import {
|
|
22
23
|
MessageAction,
|
|
@@ -31,6 +32,12 @@ const listActionInputSchema = z
|
|
|
31
32
|
.extend({
|
|
32
33
|
content: contentOptionsSchema
|
|
33
34
|
.omit({ limit: true })
|
|
35
|
+
.extend({
|
|
36
|
+
contentType: contentOptionsSchema.shape.contentType.meta({
|
|
37
|
+
...contentOptionsSchema.shape.contentType.meta(),
|
|
38
|
+
...workflowResourceRef('contentType'),
|
|
39
|
+
}),
|
|
40
|
+
})
|
|
34
41
|
.default({
|
|
35
42
|
display: 'list',
|
|
36
43
|
buttons: [
|
|
@@ -8,6 +8,7 @@ import { z } from 'zod';
|
|
|
8
8
|
|
|
9
9
|
import { createAction } from '@/actions/create-action';
|
|
10
10
|
import { ConversationalWorkflowContext } from '@/workflow/contexts/conversational-workflow.context';
|
|
11
|
+
import { workflowResourceRef } from '@/workflow/resource-refs';
|
|
11
12
|
import { WorkflowType } from '@/workflow/types';
|
|
12
13
|
|
|
13
14
|
const subscriberUpdateLabelsInputSchema = z
|
|
@@ -24,6 +25,7 @@ const subscriberUpdateLabelsInputSchema = z
|
|
|
24
25
|
valueKey: 'id',
|
|
25
26
|
labelKey: 'title',
|
|
26
27
|
},
|
|
28
|
+
...workflowResourceRef('label'),
|
|
27
29
|
}),
|
|
28
30
|
labels_to_remove: z
|
|
29
31
|
.array(z.uuid())
|
|
@@ -37,6 +39,7 @@ const subscriberUpdateLabelsInputSchema = z
|
|
|
37
39
|
valueKey: 'id',
|
|
38
40
|
labelKey: 'title',
|
|
39
41
|
},
|
|
42
|
+
...workflowResourceRef('label'),
|
|
40
43
|
}),
|
|
41
44
|
})
|
|
42
45
|
.superRefine((input, ctx) => {
|
|
@@ -136,6 +136,17 @@ function resolveFinalUrl(response: {
|
|
|
136
136
|
return response.request?.res?.responseUrl ?? response.request?.responseUrl;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
function isAxiosCancellation(error: unknown) {
|
|
140
|
+
if (typeof axios.isCancel === 'function' && axios.isCancel(error)) {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return (
|
|
145
|
+
error instanceof Error &&
|
|
146
|
+
(error as Error & { code?: string }).code === 'ERR_CANCELED'
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
139
150
|
function parseRequestBody(
|
|
140
151
|
body: string,
|
|
141
152
|
): string | Record<string, unknown> | unknown[] {
|
|
@@ -171,7 +182,7 @@ export const HttpRequestAction = createAction<
|
|
|
171
182
|
inputSchema: httpRequestInputSchema,
|
|
172
183
|
outputSchema: httpRequestOutputSchema,
|
|
173
184
|
settingsSchema: httpRequestSettingsSchema,
|
|
174
|
-
async execute({ input, context, settings }) {
|
|
185
|
+
async execute({ input, context, settings, signal }) {
|
|
175
186
|
const logger = context.services.logger;
|
|
176
187
|
const timeoutMs = settings.timeout_ms ?? 10000;
|
|
177
188
|
const method = settings.method ?? 'GET';
|
|
@@ -192,6 +203,7 @@ export const HttpRequestAction = createAction<
|
|
|
192
203
|
method,
|
|
193
204
|
headers,
|
|
194
205
|
timeout: timeoutMs,
|
|
206
|
+
signal,
|
|
195
207
|
validateStatus: () => true,
|
|
196
208
|
...(requestData !== undefined ? { data: requestData } : {}),
|
|
197
209
|
});
|
|
@@ -240,6 +252,10 @@ export const HttpRequestAction = createAction<
|
|
|
240
252
|
truncated: false,
|
|
241
253
|
};
|
|
242
254
|
} catch (error) {
|
|
255
|
+
if (signal?.aborted || isAxiosCancellation(error)) {
|
|
256
|
+
throw error;
|
|
257
|
+
}
|
|
258
|
+
|
|
243
259
|
const message =
|
|
244
260
|
error instanceof Error ? error.message : 'Unknown network error';
|
|
245
261
|
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Hexabot — Fair Core License (FCL-1.0-ALv2)
|
|
3
|
+
* Copyright (c) 2025 Hexastack.
|
|
4
|
+
* Full terms: see LICENSE.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { JsonValueSchema } from '@hexabot-ai/agentic';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
|
|
10
|
+
import { createAction } from '@/actions/create-action';
|
|
11
|
+
import { WorkflowRuntimeContext } from '@/workflow/contexts/workflow-runtime.context';
|
|
12
|
+
import { workflowResourceRef } from '@/workflow/resource-refs';
|
|
13
|
+
import { CallWorkflowResult } from '@/workflow/types';
|
|
14
|
+
|
|
15
|
+
const callWorkflowInputSchema = z.object({
|
|
16
|
+
workflow_id: z.uuid().meta({
|
|
17
|
+
title: 'Workflow',
|
|
18
|
+
description: 'Workflow to call and wait for before continuing.',
|
|
19
|
+
'ui:widget': 'AutoCompleteWidget',
|
|
20
|
+
'ui:options': {
|
|
21
|
+
entity: 'Workflow',
|
|
22
|
+
valueKey: 'id',
|
|
23
|
+
labelKey: 'name',
|
|
24
|
+
},
|
|
25
|
+
...workflowResourceRef('workflow'),
|
|
26
|
+
}),
|
|
27
|
+
input: z.record(z.string(), JsonValueSchema).optional().meta({
|
|
28
|
+
title: 'Input',
|
|
29
|
+
description:
|
|
30
|
+
'Optional input payload for the called workflow. When omitted, the current trigger input is reused.',
|
|
31
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
const callWorkflowFinishedSchema = z.object({
|
|
34
|
+
status: z.literal('finished'),
|
|
35
|
+
workflow_id: z.uuid(),
|
|
36
|
+
workflow_run_id: z.uuid(),
|
|
37
|
+
output: z.record(z.string(), z.any()),
|
|
38
|
+
});
|
|
39
|
+
const callWorkflowResumeSchema = z.union([
|
|
40
|
+
callWorkflowFinishedSchema,
|
|
41
|
+
z.object({
|
|
42
|
+
status: z.literal('suspended'),
|
|
43
|
+
workflow_id: z.uuid(),
|
|
44
|
+
workflow_run_id: z.uuid(),
|
|
45
|
+
}),
|
|
46
|
+
z.object({
|
|
47
|
+
status: z.literal('failed'),
|
|
48
|
+
workflow_id: z.uuid(),
|
|
49
|
+
workflow_run_id: z.uuid(),
|
|
50
|
+
error: z.string(),
|
|
51
|
+
}),
|
|
52
|
+
]);
|
|
53
|
+
|
|
54
|
+
type CallWorkflowInput = z.infer<typeof callWorkflowInputSchema>;
|
|
55
|
+
type CallWorkflowOutput = z.infer<typeof callWorkflowFinishedSchema>;
|
|
56
|
+
|
|
57
|
+
const assertFinishedResult = (result: CallWorkflowResult) => {
|
|
58
|
+
if (result.status === 'finished') {
|
|
59
|
+
return result;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (result.status === 'failed') {
|
|
63
|
+
throw new Error(result.error);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
throw new Error(
|
|
67
|
+
`Workflow ${result.workflow_id} suspended but did not return a final result`,
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const CallWorkflowAction = createAction<
|
|
72
|
+
CallWorkflowInput,
|
|
73
|
+
CallWorkflowOutput,
|
|
74
|
+
WorkflowRuntimeContext
|
|
75
|
+
>({
|
|
76
|
+
name: 'call_workflow',
|
|
77
|
+
description: 'Calls another workflow and waits for its output.',
|
|
78
|
+
group: 'workflow',
|
|
79
|
+
icon: 'Workflow',
|
|
80
|
+
color: '#64748B',
|
|
81
|
+
inputSchema: callWorkflowInputSchema,
|
|
82
|
+
outputSchema: callWorkflowFinishedSchema,
|
|
83
|
+
async execute({ input, context }) {
|
|
84
|
+
// AgenticService owns workflow resolution and run creation because the
|
|
85
|
+
// target workflow is an API-persisted entity, not an agentic DSL primitive.
|
|
86
|
+
const result = await context.services.agentic.callWorkflow({
|
|
87
|
+
workflowId: input.workflow_id,
|
|
88
|
+
input: input.input,
|
|
89
|
+
parentContext: context,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
if (result.status !== 'suspended') {
|
|
93
|
+
return assertFinishedResult(result);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// If the child suspends, this action suspends the parent at the call site.
|
|
97
|
+
// A future event resumes the child leaf first; AgenticService then resumes
|
|
98
|
+
// this parent action with the final child payload.
|
|
99
|
+
const resumeData = await context.workflow.suspend<unknown>({
|
|
100
|
+
reason: 'awaiting_child_workflow',
|
|
101
|
+
data: {
|
|
102
|
+
workflow_id: result.workflow_id,
|
|
103
|
+
workflow_run_id: result.workflow_run_id,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
const parsed = callWorkflowResumeSchema.parse(resumeData);
|
|
107
|
+
|
|
108
|
+
return assertFinishedResult(parsed);
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export default CallWorkflowAction;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"call_workflow": {
|
|
3
|
+
"Calls another workflow and waits for its output.": "Calls another workflow and waits for its output.",
|
|
4
|
+
"Workflow": "Workflow",
|
|
5
|
+
"Workflow to call and wait for before continuing.": "Workflow to call and wait for before continuing.",
|
|
6
|
+
"Input": "Input",
|
|
7
|
+
"Optional input payload for the called workflow. When omitted, the current trigger input is reused.": "Optional input payload for the called workflow. When omitted, the current trigger input is reused."
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"call_workflow": {
|
|
3
|
+
"Calls another workflow and waits for its output.": "Appelle un autre workflow et attend sa sortie.",
|
|
4
|
+
"Workflow": "Workflow",
|
|
5
|
+
"Workflow to call and wait for before continuing.": "Workflow à appeler et à attendre avant de continuer.",
|
|
6
|
+
"Input": "Entrée",
|
|
7
|
+
"Optional input payload for the called workflow. When omitted, the current trigger input is reused.": "Payload d'entrée facultatif pour le workflow appelé. S'il est omis, l'entrée du déclencheur courant est réutilisée."
|
|
8
|
+
}
|
|
9
|
+
}
|
package/src/extensions/index.ts
CHANGED