@codemation/core-nodes 0.13.0 → 0.14.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/CHANGELOG.md +13 -0
- package/dist/index.cjs +34 -433
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +95 -1312
- package/dist/index.d.ts +95 -1312
- package/dist/index.js +35 -435
- package/dist/index.js.map +1 -1
- package/dist/metadata.json +1 -1
- package/package.json +2 -2
- package/src/authoring/defineRestNode.types.ts +0 -84
- package/src/canvasIconName.ts +0 -7
- package/src/chatModels/CodemationChatModelConfig.ts +0 -10
- package/src/chatModels/CodemationChatModelFactory.ts +0 -7
- package/src/chatModels/ManagedHmacSignerFactory.types.ts +0 -35
- package/src/chatModels/OpenAIChatModelFactory.ts +0 -2
- package/src/chatModels/OpenAiChatModelPresetsFactory.ts +0 -5
- package/src/chatModels/OpenAiCredentialSession.ts +0 -1
- package/src/chatModels/OpenAiStrictJsonSchemaFactory.ts +0 -21
- package/src/credentials/ApiKeyCredentialType.ts +0 -3
- package/src/credentials/BasicAuthCredentialType.ts +0 -4
- package/src/credentials/BearerTokenCredentialType.ts +0 -4
- package/src/credentials/OAuth2ClientCredentialsTypeFactory.ts +0 -19
- package/src/credentials/OAuth2TokenExchangeFactory.ts +0 -7
- package/src/http/HttpBodyBuilder.ts +0 -16
- package/src/http/HttpRequestExecutor.ts +0 -35
- package/src/http/HttpUrlBuilder.ts +0 -4
- package/src/http/SSRFBlockedError.ts +0 -4
- package/src/http/SsrfGuard.ts +10 -50
- package/src/http/httpRequest.types.ts +0 -49
- package/src/index.ts +1 -0
- package/src/nodes/AIAgentConfig.ts +0 -44
- package/src/nodes/AIAgentExecutionHelpersFactory.ts +0 -37
- package/src/nodes/AIAgentNode.ts +0 -132
- package/src/nodes/AgentBinaryContentFactory.ts +0 -12
- package/src/nodes/AgentLoopCheckpoint.types.ts +0 -13
- package/src/nodes/AgentMessageFactory.ts +0 -18
- package/src/nodes/AgentStructuredOutputRunner.ts +0 -17
- package/src/nodes/AgentToolExecutionCoordinator.ts +0 -12
- package/src/nodes/AgentToolResultContentFactory.ts +0 -29
- package/src/nodes/AssertionNode.ts +0 -14
- package/src/nodes/BM25Index.ts +0 -14
- package/src/nodes/ConnectionCredentialExecutionContextFactory.ts +0 -5
- package/src/nodes/ConnectionCredentialNode.ts +0 -4
- package/src/nodes/CronTriggerFactory.ts +0 -9
- package/src/nodes/DeferredMetaToolStrategy.ts +0 -18
- package/src/nodes/DeferredMetaToolStrategyFactory.ts +0 -5
- package/src/nodes/HttpRequestNodeFactory.ts +0 -14
- package/src/nodes/InboxApprovalNode.types.ts +0 -16
- package/src/nodes/IsTestRunNode.ts +0 -8
- package/src/nodes/ManualTriggerFactory.ts +0 -3
- package/src/nodes/ManualTriggerNode.ts +0 -4
- package/src/nodes/MergeNode.ts +0 -1
- package/src/nodes/NodeBackedToolRuntime.ts +0 -14
- package/src/nodes/SubWorkflowNode.ts +0 -3
- package/src/nodes/SwitchNode.ts +0 -3
- package/src/nodes/TestTriggerNode.ts +0 -9
- package/src/nodes/aiAgentSupport.types.ts +0 -16
- package/src/nodes/assertion.ts +0 -10
- package/src/nodes/codemationDocumentScannerNode.ts +0 -18
- package/src/nodes/collections/collectionListNode.types.ts +0 -1
- package/src/nodes/httpRequest.ts +0 -68
- package/src/nodes/isTestRun.ts +0 -4
- package/src/nodes/mapData.ts +0 -1
- package/src/nodes/merge.ts +0 -4
- package/src/nodes/mergeExecutionUtils.types.ts +0 -3
- package/src/nodes/nodeOptions.types.ts +0 -8
- package/src/nodes/schedulePollingTrigger.ts +37 -0
- package/src/nodes/split.ts +0 -4
- package/src/nodes/testTrigger.ts +0 -21
- package/src/nodes/wait.ts +0 -1
- package/src/nodes/webhookTriggerNode.ts +0 -5
- package/src/register.types.ts +0 -10
- package/src/workflows/AIAgentConnectionWorkflowExpander.ts +0 -3
package/src/nodes/split.ts
CHANGED
|
@@ -13,10 +13,6 @@ export class Split<TIn = unknown, TElem = unknown> implements RunnableNodeConfig
|
|
|
13
13
|
readonly type: TypeToken<unknown> = SplitNode;
|
|
14
14
|
readonly execution = { hint: "local" } as const;
|
|
15
15
|
readonly keepBinaries = true as const;
|
|
16
|
-
/**
|
|
17
|
-
* When splitting yields zero items for a batch, downstream single-input nodes still run once with an empty batch.
|
|
18
|
-
* Mirrors {@link MapData}'s empty-output behavior.
|
|
19
|
-
*/
|
|
20
16
|
readonly continueWhenEmptyOutput = true as const;
|
|
21
17
|
readonly icon = "builtin:split-rows" as const;
|
|
22
18
|
readonly id?: string;
|
package/src/nodes/testTrigger.ts
CHANGED
|
@@ -13,34 +13,13 @@ export interface TestTriggerOptions<TOutputJson> {
|
|
|
13
13
|
readonly name?: string;
|
|
14
14
|
readonly id?: string;
|
|
15
15
|
readonly icon?: string;
|
|
16
|
-
/** Cap on simultaneous in-flight test cases for one suite run. Default: 4 (orchestrator). */
|
|
17
16
|
readonly concurrency?: number;
|
|
18
17
|
readonly credentialRequirements?: ReadonlyArray<CredentialRequirement>;
|
|
19
|
-
/**
|
|
20
|
-
* Free-form description of where the test cases come from. Shown in the node properties
|
|
21
|
-
* panel and the Tests-tab suite-detail header so authors revisiting the workflow six months
|
|
22
|
-
* later remember which mailbox / folder / fixture file the cases originate from.
|
|
23
|
-
*/
|
|
24
18
|
readonly description?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Author callback that yields one item per test case. Items are dispatched as separate
|
|
27
|
-
* workflow runs by the TestSuiteOrchestrator, with `executionOptions.testContext` set.
|
|
28
|
-
* The provided context exposes credential resolution and an AbortSignal for cancellation.
|
|
29
|
-
*/
|
|
30
19
|
generateItems(ctx: TestTriggerSetupContext<TestTrigger<TOutputJson>>): AsyncIterable<Item<TOutputJson>>;
|
|
31
|
-
/**
|
|
32
|
-
* Optional resolver: extract a human-readable label from a yielded item. The orchestrator
|
|
33
|
-
* persists this on the run, so the Tests-tab tree-table shows e.g. "RFQ for batch 14"
|
|
34
|
-
* instead of an opaque runId. Typical use: `(item) => item.json.subject` for mailbox tests.
|
|
35
|
-
*/
|
|
36
20
|
caseLabel?(item: Item<TOutputJson>): string | undefined;
|
|
37
21
|
}
|
|
38
22
|
|
|
39
|
-
/**
|
|
40
|
-
* Trigger config for a test fixture source. Drop one (or more) of these on the canvas alongside
|
|
41
|
-
* a workflow's live triggers; clicking "Run tests" on the Tests tab invokes
|
|
42
|
-
* {@link TestTriggerOptions.generateItems} via the TestSuiteOrchestrator.
|
|
43
|
-
*/
|
|
44
23
|
export class TestTrigger<TOutputJson = unknown> implements TestTriggerNodeConfig<TOutputJson> {
|
|
45
24
|
readonly kind = "trigger" as const;
|
|
46
25
|
readonly triggerKind = "test" as const;
|
package/src/nodes/wait.ts
CHANGED
|
@@ -7,7 +7,6 @@ export class Wait<TItemJson = unknown> implements RunnableNodeConfig<TItemJson,
|
|
|
7
7
|
readonly kind = "node" as const;
|
|
8
8
|
readonly type: TypeToken<unknown> = WaitNode;
|
|
9
9
|
readonly execution = { hint: "local" } as const;
|
|
10
|
-
/** Pass-through empty batches should still advance to downstream nodes. */
|
|
11
10
|
readonly continueWhenEmptyOutput = true as const;
|
|
12
11
|
readonly icon = "lucide:hourglass" as const;
|
|
13
12
|
readonly id?: string;
|
|
@@ -8,11 +8,6 @@ import type {
|
|
|
8
8
|
import { node } from "@codemation/core";
|
|
9
9
|
import { WebhookTrigger } from "./WebhookTriggerFactory";
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* HTTP webhooks are not registered in trigger setup. The host exposes a single catch-all route
|
|
13
|
-
* (e.g. `/api/webhooks/:endpointPath`); the engine's catalog-backed webhook matcher resolves the
|
|
14
|
-
* user-defined endpoint path to this workflow + node, then runs the workflow from this trigger.
|
|
15
|
-
*/
|
|
16
11
|
@node({ packageName: "@codemation/core-nodes" })
|
|
17
12
|
export class WebhookTriggerNode implements ExecutableTriggerNode<WebhookTrigger<any>> {
|
|
18
13
|
readonly kind = "trigger" as const;
|
package/src/register.types.ts
CHANGED
|
@@ -14,19 +14,9 @@ import { FilterNode } from "./nodes/filter";
|
|
|
14
14
|
import { SplitNode } from "./nodes/split";
|
|
15
15
|
import { SwitchNode } from "./nodes/switch";
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Registrar for built-in nodes. In a real project, this would use tsyringe's
|
|
19
|
-
* container.registerSingleton(...). For the skeleton we keep it token-based:
|
|
20
|
-
* the engine resolves node implementations by class token.
|
|
21
|
-
*/
|
|
22
17
|
export function registerCoreNodes(container: Container): void {
|
|
23
|
-
// With class tokens, resolving registers happen via the DI container setup.
|
|
24
|
-
// This function exists as the standardized extension point.
|
|
25
18
|
void container;
|
|
26
19
|
|
|
27
|
-
// Example: if using tsyringe, you'd do:
|
|
28
|
-
// tsyringeContainer.registerSingleton(IfNode, IfNode);
|
|
29
|
-
// ...
|
|
30
20
|
void IfNode;
|
|
31
21
|
void HttpRequestNode;
|
|
32
22
|
void CallbackNode;
|
|
@@ -5,9 +5,6 @@ import { AIAgentNode } from "../nodes/AIAgentNode";
|
|
|
5
5
|
import { ConnectionCredentialNode } from "../nodes/ConnectionCredentialNode";
|
|
6
6
|
import { ConnectionCredentialNodeConfigFactory } from "../nodes/ConnectionCredentialNodeConfigFactory";
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Materializes connection-owned child nodes and {@link WorkflowDefinition.connections} for AI agent nodes.
|
|
10
|
-
*/
|
|
11
8
|
export class AIAgentConnectionWorkflowExpander {
|
|
12
9
|
constructor(
|
|
13
10
|
private readonly connectionCredentialNodeConfigFactory: ConnectionCredentialNodeConfigFactory,
|