@circus_sh/n8n-nodes-circus 1.3.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.
Files changed (55) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +84 -0
  3. package/dist/credentials/CircusAnthropicApi.credentials.d.ts +24 -0
  4. package/dist/credentials/CircusAnthropicApi.credentials.js +43 -0
  5. package/dist/credentials/CircusAnthropicApi.credentials.js.map +1 -0
  6. package/dist/credentials/CircusApi.credentials.d.ts +13 -0
  7. package/dist/credentials/CircusApi.credentials.js +50 -0
  8. package/dist/credentials/CircusApi.credentials.js.map +1 -0
  9. package/dist/credentials/CircusGoogleApi.credentials.d.ts +18 -0
  10. package/dist/credentials/CircusGoogleApi.credentials.js +33 -0
  11. package/dist/credentials/CircusGoogleApi.credentials.js.map +1 -0
  12. package/dist/credentials/CircusOpenaiApi.credentials.d.ts +21 -0
  13. package/dist/credentials/CircusOpenaiApi.credentials.js +36 -0
  14. package/dist/credentials/CircusOpenaiApi.credentials.js.map +1 -0
  15. package/dist/credentials/CircusXaiApi.credentials.d.ts +21 -0
  16. package/dist/credentials/CircusXaiApi.credentials.js +36 -0
  17. package/dist/credentials/CircusXaiApi.credentials.js.map +1 -0
  18. package/dist/credentials/icons/circus.dark.svg +5 -0
  19. package/dist/credentials/icons/circus.svg +5 -0
  20. package/dist/nodes/CircusAgent/CircusAgent.node.d.ts +5 -0
  21. package/dist/nodes/CircusAgent/CircusAgent.node.js +455 -0
  22. package/dist/nodes/CircusAgent/CircusAgent.node.js.map +1 -0
  23. package/dist/nodes/CircusAgent/CircusAgent.node.json +18 -0
  24. package/dist/nodes/CircusAgent/circusAgent.dark.svg +5 -0
  25. package/dist/nodes/CircusAgent/circusAgent.svg +5 -0
  26. package/dist/nodes/CircusComplete/CircusComplete.node.d.ts +5 -0
  27. package/dist/nodes/CircusComplete/CircusComplete.node.js +128 -0
  28. package/dist/nodes/CircusComplete/CircusComplete.node.js.map +1 -0
  29. package/dist/nodes/CircusComplete/CircusComplete.node.json +18 -0
  30. package/dist/nodes/CircusComplete/circusComplete.dark.svg +5 -0
  31. package/dist/nodes/CircusComplete/circusComplete.svg +5 -0
  32. package/dist/nodes/CircusInit/CircusInit.node.d.ts +5 -0
  33. package/dist/nodes/CircusInit/CircusInit.node.js +74 -0
  34. package/dist/nodes/CircusInit/CircusInit.node.js.map +1 -0
  35. package/dist/nodes/CircusInit/CircusInit.node.json +18 -0
  36. package/dist/nodes/CircusInit/circusInit.dark.svg +4 -0
  37. package/dist/nodes/CircusInit/circusInit.svg +4 -0
  38. package/dist/nodes/CircusLog/CircusLog.node.d.ts +5 -0
  39. package/dist/nodes/CircusLog/CircusLog.node.js +244 -0
  40. package/dist/nodes/CircusLog/CircusLog.node.js.map +1 -0
  41. package/dist/nodes/CircusLog/CircusLog.node.json +18 -0
  42. package/dist/nodes/CircusLog/circusLog.dark.svg +8 -0
  43. package/dist/nodes/CircusLog/circusLog.svg +8 -0
  44. package/dist/nodes/CircusTerminate/CircusTerminate.node.d.ts +5 -0
  45. package/dist/nodes/CircusTerminate/CircusTerminate.node.js +104 -0
  46. package/dist/nodes/CircusTerminate/CircusTerminate.node.js.map +1 -0
  47. package/dist/nodes/CircusTerminate/CircusTerminate.node.json +18 -0
  48. package/dist/nodes/CircusTerminate/circusTerminate.dark.svg +6 -0
  49. package/dist/nodes/CircusTerminate/circusTerminate.svg +6 -0
  50. package/dist/nodes/shared/circusContext.d.ts +10 -0
  51. package/dist/nodes/shared/circusContext.js +24 -0
  52. package/dist/nodes/shared/circusContext.js.map +1 -0
  53. package/dist/package.json +62 -0
  54. package/dist/tsconfig.tsbuildinfo +1 -0
  55. package/package.json +62 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 circus-sh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # n8n-nodes-circus
2
+
3
+ This is an n8n community node. It lets you use the [Circus AI Workflow Orchestration Platform](https://circus.sh) in your n8n workflows.
4
+
5
+ Circus is an AI workflow orchestration platform that enables operators to configure models, prompts, and agents through a central UI. These nodes let n8n workflow developers integrate with the Circus platform — executing AI agent calls, logging execution steps, tracking costs, and managing the execution lifecycle.
6
+
7
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
8
+
9
+ [Installation](#installation)
10
+ [Operations](#operations)
11
+ [Credentials](#credentials)
12
+ [Compatibility](#compatibility)
13
+ [Usage](#usage)
14
+ [Resources](#resources)
15
+ [Version history](#version-history)
16
+
17
+ ## Installation
18
+
19
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
20
+
21
+ ## Operations
22
+
23
+ This package provides five nodes:
24
+
25
+ - **Circus Init** — Initialize the Circus execution context. Place directly after the Webhook trigger node. Stores the webhook payload in n8n's execution data so all downstream Circus nodes can access configuration snapshots and execution IDs regardless of their position in the workflow.
26
+ - **Circus Agent** — Execute AI agent calls using operator-configured models and prompts. The agent configuration (model, prompt, parameters) is read from the workflow snapshot at runtime, allowing operators to change AI providers and prompts without editing the n8n workflow. Supports OpenAI, Anthropic, Google, and xAI providers.
27
+ - **Circus Log** — Create log entries on the Circus platform for workflow steps. Tracks execution data, checks cost and time thresholds, and can trigger workflow termination if thresholds are exceeded.
28
+ - **Circus Complete** — Mark a workflow execution as successfully completed and transmit result artifacts back to the Circus platform.
29
+ - **Circus Terminate** — Terminate a workflow execution on the Circus platform due to an error. Intended for use in error branches.
30
+
31
+ ## Credentials
32
+
33
+ ### Circus API
34
+
35
+ All nodes (except Circus Init) require the **Circus API** credential, which authenticates with the Circus platform:
36
+
37
+ - **API Key** — Circus Platform API Key (JWT token)
38
+ - **API URL** — Base URL of your Circus platform instance (e.g. `https://your-instance.circus.sh`)
39
+
40
+ ### AI Provider API Keys
41
+
42
+ The Agent node requires AI provider API keys configured as n8n credentials. The Agent node looks up the correct credential at runtime based on the model provider specified in the snapshot. Supported providers:
43
+
44
+ - **Circus OpenAI API** — for OpenAI models
45
+ - **Circus Anthropic API** — for Anthropic models
46
+ - **Circus Google AI API** — for Google AI models
47
+ - **Circus xAI API** — for xAI models
48
+
49
+ ## Compatibility
50
+
51
+ Tested with n8n version 2.25+. Requires `n8n-workflow` version 2.16.0 or later.
52
+
53
+ ## Usage
54
+
55
+ These nodes are designed to work with the Circus platform's webhook-triggered workflow pattern:
56
+
57
+ 1. A **Webhook** trigger node receives the execution payload from the Circus platform.
58
+ 2. A **Circus Init** node (placed directly after the Webhook) stores the payload in execution data.
59
+ 3. **Agent** nodes read their configuration from the stored snapshots — no hardcoded API URLs, models, or prompts in the n8n workflow.
60
+ 4. **Log** nodes record execution steps and check cost/time thresholds.
61
+ 5. The **Complete** node marks the execution as finished, or the **Terminate** node handles error cases.
62
+
63
+ All nodes automatically include the n8n execution ID (`external_execution_id`) in every platform API call, enabling the Circus platform to remotely manage the n8n execution if needed.
64
+
65
+ ### Error Handling
66
+
67
+ These nodes follow a consistent error handling pattern based on n8n's built-in "On Error" setting:
68
+
69
+ - **Stop Workflow + Retry On Fail**: The node throws an error to let n8n retry. It does not call the platform's terminate endpoint, allowing retries to succeed.
70
+ - **Stop Workflow + No Retry**: The node calls the platform's terminate endpoint and throws an error.
71
+ - **Continue (any variant)**: The node calls the platform's terminate endpoint to trigger remote termination, then throws an error. The platform will stop the n8n execution remotely.
72
+
73
+ It is recommended to set "On Error" to "Stop Workflow" for all Circus nodes.
74
+
75
+ ## Resources
76
+
77
+ * [n8n community nodes documentation](https://docs.n8n.io/integrations/#community-nodes)
78
+ * [Circus platform documentation](https://circus.sh/docs)
79
+
80
+ ## Version history
81
+
82
+ ### 0.1.0
83
+
84
+ Initial release with five nodes: Init, Agent, Log, Complete, and Terminate.
@@ -0,0 +1,24 @@
1
+ import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class CircusAnthropicApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ icon: {
7
+ readonly light: "file:icons/circus.svg";
8
+ readonly dark: "file:icons/circus.dark.svg";
9
+ };
10
+ properties: INodeProperties[];
11
+ test: {
12
+ request: {
13
+ baseURL: string;
14
+ url: string;
15
+ method: "POST";
16
+ headers: {
17
+ 'x-api-key': string;
18
+ 'anthropic-version': string;
19
+ 'Content-Type': string;
20
+ };
21
+ body: string;
22
+ };
23
+ };
24
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CircusAnthropicApi = void 0;
4
+ class CircusAnthropicApi {
5
+ constructor() {
6
+ this.name = 'circusAnthropicApi';
7
+ this.displayName = 'Circus Anthropic API';
8
+ this.documentationUrl = 'https://circus.sh/docs/n8n-nodes#ai-credentials';
9
+ this.icon = { light: 'file:icons/circus.svg', dark: 'file:icons/circus.dark.svg' };
10
+ this.properties = [
11
+ {
12
+ displayName: 'API Key',
13
+ name: 'apiKey',
14
+ type: 'string',
15
+ typeOptions: {
16
+ password: true,
17
+ },
18
+ required: true,
19
+ default: '',
20
+ description: 'Anthropic API Key',
21
+ },
22
+ ];
23
+ this.test = {
24
+ request: {
25
+ baseURL: 'https://api.anthropic.com',
26
+ url: '/v1/messages',
27
+ method: 'POST',
28
+ headers: {
29
+ 'x-api-key': '={{$credentials.apiKey}}',
30
+ 'anthropic-version': '2023-06-01',
31
+ 'Content-Type': 'application/json',
32
+ },
33
+ body: JSON.stringify({
34
+ model: 'claude-haiku-4-5-20251001',
35
+ max_tokens: 1,
36
+ messages: [{ role: 'user', content: 'hi' }],
37
+ }),
38
+ },
39
+ };
40
+ }
41
+ }
42
+ exports.CircusAnthropicApi = CircusAnthropicApi;
43
+ //# sourceMappingURL=CircusAnthropicApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircusAnthropicApi.credentials.js","sourceRoot":"","sources":["../../credentials/CircusAnthropicApi.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,kBAAkB;IAA/B;QACC,SAAI,GAAG,oBAAoB,CAAC;QAE5B,gBAAW,GAAG,sBAAsB,CAAC;QAErC,qBAAgB,GAAG,iDAAiD,CAAC;QAErE,SAAI,GAAG,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,4BAA4B,EAAW,CAAC;QAEvF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,mBAAmB;aAChC;SACD,CAAC;QAEF,SAAI,GAAG;YACN,OAAO,EAAE;gBACR,OAAO,EAAE,2BAA2B;gBACpC,GAAG,EAAE,cAAc;gBACnB,MAAM,EAAE,MAAe;gBACvB,OAAO,EAAE;oBACR,WAAW,EAAE,0BAA0B;oBACvC,mBAAmB,EAAE,YAAY;oBACjC,cAAc,EAAE,kBAAkB;iBAClC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACpB,KAAK,EAAE,2BAA2B;oBAClC,UAAU,EAAE,CAAC;oBACb,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iBAC3C,CAAC;aACF;SACD,CAAC;IACH,CAAC;CAAA;AAxCD,gDAwCC"}
@@ -0,0 +1,13 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class CircusApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ icon: {
7
+ readonly light: "file:icons/circus.svg";
8
+ readonly dark: "file:icons/circus.dark.svg";
9
+ };
10
+ properties: INodeProperties[];
11
+ authenticate: IAuthenticateGeneric;
12
+ test: ICredentialTestRequest;
13
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CircusApi = void 0;
4
+ class CircusApi {
5
+ constructor() {
6
+ this.name = 'circusApi';
7
+ this.displayName = 'Circus API';
8
+ this.documentationUrl = 'https://circus.sh/docs/n8n-nodes#credentials';
9
+ this.icon = { light: 'file:icons/circus.svg', dark: 'file:icons/circus.dark.svg' };
10
+ this.properties = [
11
+ {
12
+ displayName: 'API Key',
13
+ name: 'apiKey',
14
+ type: 'string',
15
+ typeOptions: {
16
+ password: true,
17
+ },
18
+ required: true,
19
+ default: '',
20
+ description: 'Circus Platform API Key',
21
+ },
22
+ {
23
+ displayName: 'API URL',
24
+ name: 'apiUrl',
25
+ type: 'string',
26
+ required: true,
27
+ default: '',
28
+ placeholder: 'https://your-circus-instance.com',
29
+ description: 'Base URL of your Circus platform instance',
30
+ },
31
+ ];
32
+ this.authenticate = {
33
+ type: 'generic',
34
+ properties: {
35
+ headers: {
36
+ Authorization: '=Bearer {{$credentials.apiKey}}',
37
+ },
38
+ },
39
+ };
40
+ this.test = {
41
+ request: {
42
+ baseURL: '={{$credentials.apiUrl}}',
43
+ url: '/api/machine/health',
44
+ method: 'POST',
45
+ },
46
+ };
47
+ }
48
+ }
49
+ exports.CircusApi = CircusApi;
50
+ //# sourceMappingURL=CircusApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircusApi.credentials.js","sourceRoot":"","sources":["../../credentials/CircusApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,SAAS;IAAtB;QACC,SAAI,GAAG,WAAW,CAAC;QAEnB,gBAAW,GAAG,YAAY,CAAC;QAE3B,qBAAgB,GAAG,8CAA8C,CAAC;QAElE,SAAI,GAAG,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,4BAA4B,EAAW,CAAC;QAEvF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,yBAAyB;aACtC;YACD;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,kCAAkC;gBAC/C,WAAW,EAAE,2CAA2C;aACxD;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,0BAA0B;gBACnC,GAAG,EAAE,qBAAqB;gBAC1B,MAAM,EAAE,MAAM;aACd;SACD,CAAC;IACH,CAAC;CAAA;AAhDD,8BAgDC"}
@@ -0,0 +1,18 @@
1
+ import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class CircusGoogleApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ icon: {
7
+ readonly light: "file:icons/circus.svg";
8
+ readonly dark: "file:icons/circus.dark.svg";
9
+ };
10
+ properties: INodeProperties[];
11
+ test: {
12
+ request: {
13
+ baseURL: string;
14
+ url: string;
15
+ method: "GET";
16
+ };
17
+ };
18
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CircusGoogleApi = void 0;
4
+ class CircusGoogleApi {
5
+ constructor() {
6
+ this.name = 'circusGoogleApi';
7
+ this.displayName = 'Circus Google AI API';
8
+ this.documentationUrl = 'https://circus.sh/docs/n8n-nodes#ai-credentials';
9
+ this.icon = { light: 'file:icons/circus.svg', dark: 'file:icons/circus.dark.svg' };
10
+ this.properties = [
11
+ {
12
+ displayName: 'API Key',
13
+ name: 'apiKey',
14
+ type: 'string',
15
+ typeOptions: {
16
+ password: true,
17
+ },
18
+ required: true,
19
+ default: '',
20
+ description: 'Google AI API Key',
21
+ },
22
+ ];
23
+ this.test = {
24
+ request: {
25
+ baseURL: 'https://generativelanguage.googleapis.com',
26
+ url: '=/v1beta/models?key={{$credentials.apiKey}}',
27
+ method: 'GET',
28
+ },
29
+ };
30
+ }
31
+ }
32
+ exports.CircusGoogleApi = CircusGoogleApi;
33
+ //# sourceMappingURL=CircusGoogleApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircusGoogleApi.credentials.js","sourceRoot":"","sources":["../../credentials/CircusGoogleApi.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,eAAe;IAA5B;QACC,SAAI,GAAG,iBAAiB,CAAC;QAEzB,gBAAW,GAAG,sBAAsB,CAAC;QAErC,qBAAgB,GAAG,iDAAiD,CAAC;QAErE,SAAI,GAAG,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,4BAA4B,EAAW,CAAC;QAEvF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,mBAAmB;aAChC;SACD,CAAC;QAEF,SAAI,GAAG;YACN,OAAO,EAAE;gBACR,OAAO,EAAE,2CAA2C;gBACpD,GAAG,EAAE,6CAA6C;gBAClD,MAAM,EAAE,KAAc;aACtB;SACD,CAAC;IACH,CAAC;CAAA;AA9BD,0CA8BC"}
@@ -0,0 +1,21 @@
1
+ import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class CircusOpenaiApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ icon: {
7
+ readonly light: "file:icons/circus.svg";
8
+ readonly dark: "file:icons/circus.dark.svg";
9
+ };
10
+ properties: INodeProperties[];
11
+ test: {
12
+ request: {
13
+ baseURL: string;
14
+ url: string;
15
+ method: "GET";
16
+ headers: {
17
+ Authorization: string;
18
+ };
19
+ };
20
+ };
21
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CircusOpenaiApi = void 0;
4
+ class CircusOpenaiApi {
5
+ constructor() {
6
+ this.name = 'circusOpenaiApi';
7
+ this.displayName = 'Circus OpenAI API';
8
+ this.documentationUrl = 'https://circus.sh/docs/n8n-nodes#ai-credentials';
9
+ this.icon = { light: 'file:icons/circus.svg', dark: 'file:icons/circus.dark.svg' };
10
+ this.properties = [
11
+ {
12
+ displayName: 'API Key',
13
+ name: 'apiKey',
14
+ type: 'string',
15
+ typeOptions: {
16
+ password: true,
17
+ },
18
+ required: true,
19
+ default: '',
20
+ description: 'OpenAI API Key',
21
+ },
22
+ ];
23
+ this.test = {
24
+ request: {
25
+ baseURL: 'https://api.openai.com',
26
+ url: '/v1/models',
27
+ method: 'GET',
28
+ headers: {
29
+ Authorization: '=Bearer {{$credentials.apiKey}}',
30
+ },
31
+ },
32
+ };
33
+ }
34
+ }
35
+ exports.CircusOpenaiApi = CircusOpenaiApi;
36
+ //# sourceMappingURL=CircusOpenaiApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircusOpenaiApi.credentials.js","sourceRoot":"","sources":["../../credentials/CircusOpenaiApi.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,eAAe;IAA5B;QACC,SAAI,GAAG,iBAAiB,CAAC;QAEzB,gBAAW,GAAG,mBAAmB,CAAC;QAElC,qBAAgB,GAAG,iDAAiD,CAAC;QAErE,SAAI,GAAG,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,4BAA4B,EAAW,CAAC;QAEvF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,gBAAgB;aAC7B;SACD,CAAC;QAEF,SAAI,GAAG;YACN,OAAO,EAAE;gBACR,OAAO,EAAE,wBAAwB;gBACjC,GAAG,EAAE,YAAY;gBACjB,MAAM,EAAE,KAAc;gBACtB,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAjCD,0CAiCC"}
@@ -0,0 +1,21 @@
1
+ import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class CircusXaiApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ icon: {
7
+ readonly light: "file:icons/circus.svg";
8
+ readonly dark: "file:icons/circus.dark.svg";
9
+ };
10
+ properties: INodeProperties[];
11
+ test: {
12
+ request: {
13
+ baseURL: string;
14
+ url: string;
15
+ method: "GET";
16
+ headers: {
17
+ Authorization: string;
18
+ };
19
+ };
20
+ };
21
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CircusXaiApi = void 0;
4
+ class CircusXaiApi {
5
+ constructor() {
6
+ this.name = 'circusXaiApi';
7
+ this.displayName = 'Circus xAI API';
8
+ this.documentationUrl = 'https://circus.sh/docs/n8n-nodes#ai-credentials';
9
+ this.icon = { light: 'file:icons/circus.svg', dark: 'file:icons/circus.dark.svg' };
10
+ this.properties = [
11
+ {
12
+ displayName: 'API Key',
13
+ name: 'apiKey',
14
+ type: 'string',
15
+ typeOptions: {
16
+ password: true,
17
+ },
18
+ required: true,
19
+ default: '',
20
+ description: 'xAI API Key',
21
+ },
22
+ ];
23
+ this.test = {
24
+ request: {
25
+ baseURL: 'https://api.x.ai',
26
+ url: '/v1/models',
27
+ method: 'GET',
28
+ headers: {
29
+ Authorization: '=Bearer {{$credentials.apiKey}}',
30
+ },
31
+ },
32
+ };
33
+ }
34
+ }
35
+ exports.CircusXaiApi = CircusXaiApi;
36
+ //# sourceMappingURL=CircusXaiApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircusXaiApi.credentials.js","sourceRoot":"","sources":["../../credentials/CircusXaiApi.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,YAAY;IAAzB;QACC,SAAI,GAAG,cAAc,CAAC;QAEtB,gBAAW,GAAG,gBAAgB,CAAC;QAE/B,qBAAgB,GAAG,iDAAiD,CAAC;QAErE,SAAI,GAAG,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,4BAA4B,EAAW,CAAC;QAEvF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,aAAa;aAC1B;SACD,CAAC;QAEF,SAAI,GAAG;YACN,OAAO,EAAE;gBACR,OAAO,EAAE,kBAAkB;gBAC3B,GAAG,EAAE,YAAY;gBACjB,MAAM,EAAE,KAAc;gBACtB,OAAO,EAAE;oBACR,aAAa,EAAE,iCAAiC;iBAChD;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAjCD,oCAiCC"}
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#7ab8ff"
2
+ stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3
+ <circle cx="12" cy="12" r="10"></circle>
4
+ <path d="M8 12l3 3 5-5"></path>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#4a90d9"
2
+ stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
3
+ <circle cx="12" cy="12" r="10"></circle>
4
+ <path d="M8 12l3 3 5-5"></path>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class CircusAgent implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }