mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-10 08:05:22 +02:00
feat: refactor node spec and add mcp tools (#244)
* refactor: carve out extraction panel * refactor: create spec versions for node types * refactor: create a GenericNode and remove custom nodes * feat: add python and typescript sdk * add dograh sdk * fix: fetch draft workflow definition over published one * fix: fix routes of SDKs to use code gen * chore: remove doclink dependency to reduce image size * chore: format files * chore: bump pipecat * feat: let mcp fetch archived workflows on demand * chore: fix tests * feat: add sdk documentation * chore: change banner and add badge
This commit is contained in:
parent
0a61ef295f
commit
00a1a22b74
162 changed files with 14355 additions and 3554 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1281,6 +1281,36 @@ export type DefaultConfigurationsResponse = {
|
|||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* DisplayOptions
|
||||
*
|
||||
* Conditional visibility rules.
|
||||
*
|
||||
* `show` keys are AND-combined: this property is visible only when EVERY
|
||||
* referenced field's value matches one of the listed values.
|
||||
*
|
||||
* `hide` keys are OR-combined: this property is hidden when ANY referenced
|
||||
* field's value matches one of the listed values.
|
||||
*
|
||||
* Example:
|
||||
* DisplayOptions(show={"extraction_enabled": [True]})
|
||||
* DisplayOptions(show={"greeting_type": ["audio"]})
|
||||
*/
|
||||
export type DisplayOptions = {
|
||||
/**
|
||||
* Show
|
||||
*/
|
||||
show?: {
|
||||
[key: string]: Array<unknown>;
|
||||
} | null;
|
||||
/**
|
||||
* Hide
|
||||
*/
|
||||
hide?: {
|
||||
[key: string]: Array<unknown>;
|
||||
} | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* DocumentListResponseSchema
|
||||
*
|
||||
|
|
@ -1675,6 +1705,30 @@ export type FileMetadataResponse = {
|
|||
} | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* GraphConstraints
|
||||
*
|
||||
* Per-node-type graph rules. WorkflowGraph enforces these at validation.
|
||||
*/
|
||||
export type GraphConstraints = {
|
||||
/**
|
||||
* Min Incoming
|
||||
*/
|
||||
min_incoming?: number | null;
|
||||
/**
|
||||
* Max Incoming
|
||||
*/
|
||||
max_incoming?: number | null;
|
||||
/**
|
||||
* Min Outgoing
|
||||
*/
|
||||
min_outgoing?: number | null;
|
||||
/**
|
||||
* Max Outgoing
|
||||
*/
|
||||
max_outgoing?: number | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* HTTPValidationError
|
||||
*/
|
||||
|
|
@ -2056,6 +2110,123 @@ export type MpsCreditsResponse = {
|
|||
total_quota: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* MigrationSpec
|
||||
*
|
||||
* Declared migration step (JSON-serializable view).
|
||||
*
|
||||
* The migrate callable is registered out-of-band via `register_migration()`
|
||||
* and never serialized — LLM and frontend consumers only see version
|
||||
* metadata and warn on mismatch.
|
||||
*/
|
||||
export type MigrationSpec = {
|
||||
/**
|
||||
* From Version
|
||||
*/
|
||||
from_version: string;
|
||||
/**
|
||||
* To Version
|
||||
*/
|
||||
to_version: string;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* NodeCategory
|
||||
*
|
||||
* Drives grouping in the AddNodePanel UI.
|
||||
*/
|
||||
export type NodeCategory = 'call_node' | 'global_node' | 'trigger' | 'integration';
|
||||
|
||||
/**
|
||||
* NodeExample
|
||||
*
|
||||
* A worked example LLMs can pattern-match. Keep small and realistic.
|
||||
*/
|
||||
export type NodeExample = {
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Data
|
||||
*/
|
||||
data: {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* NodeSpec
|
||||
*
|
||||
* Single source of truth for a node type.
|
||||
*/
|
||||
export type NodeSpec = {
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Display Name
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* Description
|
||||
*
|
||||
* Human-facing explanation shown in AddNodePanel.
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Llm Hint
|
||||
*
|
||||
* LLM-only guidance; omitted from the UI.
|
||||
*/
|
||||
llm_hint?: string | null;
|
||||
category: NodeCategory;
|
||||
/**
|
||||
* Icon
|
||||
*/
|
||||
icon: string;
|
||||
/**
|
||||
* Version
|
||||
*/
|
||||
version?: string;
|
||||
/**
|
||||
* Properties
|
||||
*/
|
||||
properties: Array<PropertySpec>;
|
||||
/**
|
||||
* Examples
|
||||
*/
|
||||
examples?: Array<NodeExample>;
|
||||
/**
|
||||
* Migrations
|
||||
*/
|
||||
migrations?: Array<MigrationSpec>;
|
||||
graph_constraints?: GraphConstraints | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* NodeTypesResponse
|
||||
*/
|
||||
export type NodeTypesResponse = {
|
||||
/**
|
||||
* Spec Version
|
||||
*/
|
||||
spec_version: string;
|
||||
/**
|
||||
* Node Types
|
||||
*/
|
||||
node_types: Array<NodeSpec>;
|
||||
};
|
||||
|
||||
/**
|
||||
* PresignedUploadUrlRequest
|
||||
*/
|
||||
|
|
@ -2124,6 +2295,125 @@ export type ProcessDocumentRequestSchema = {
|
|||
retrieval_mode?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* PropertyOption
|
||||
*
|
||||
* An option in an `options` or `multi_options` dropdown.
|
||||
*/
|
||||
export type PropertyOption = {
|
||||
/**
|
||||
* Value
|
||||
*/
|
||||
value: string | number | boolean | number;
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description?: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* PropertySpec
|
||||
*
|
||||
* Single field on a node.
|
||||
*
|
||||
* `description` is HUMAN-FACING — shown under the field in the edit
|
||||
* dialog. Keep it concise and explain what the field does.
|
||||
*
|
||||
* `llm_hint` is LLM-FACING — appears only in the `get_node_type` MCP
|
||||
* response and in SDK schema output. Use it for catalog tool references
|
||||
* (e.g., "Use `list_recordings`"), array shape, expected value idioms,
|
||||
* or anything that would be noise in the UI. Optional; omit when the
|
||||
* `description` already suffices for both audiences.
|
||||
*/
|
||||
export type PropertySpec = {
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name: string;
|
||||
type: PropertyType;
|
||||
/**
|
||||
* Display Name
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* Description
|
||||
*
|
||||
* Human-facing explanation shown in the UI.
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Llm Hint
|
||||
*
|
||||
* LLM-only guidance; omitted from the UI.
|
||||
*/
|
||||
llm_hint?: string | null;
|
||||
/**
|
||||
* Default
|
||||
*/
|
||||
default?: unknown;
|
||||
/**
|
||||
* Required
|
||||
*/
|
||||
required?: boolean;
|
||||
/**
|
||||
* Placeholder
|
||||
*/
|
||||
placeholder?: string | null;
|
||||
display_options?: DisplayOptions | null;
|
||||
/**
|
||||
* Options
|
||||
*/
|
||||
options?: Array<PropertyOption> | null;
|
||||
/**
|
||||
* Properties
|
||||
*/
|
||||
properties?: Array<PropertySpec> | null;
|
||||
/**
|
||||
* Min Value
|
||||
*/
|
||||
min_value?: number | null;
|
||||
/**
|
||||
* Max Value
|
||||
*/
|
||||
max_value?: number | null;
|
||||
/**
|
||||
* Min Length
|
||||
*/
|
||||
min_length?: number | null;
|
||||
/**
|
||||
* Max Length
|
||||
*/
|
||||
max_length?: number | null;
|
||||
/**
|
||||
* Pattern
|
||||
*/
|
||||
pattern?: string | null;
|
||||
/**
|
||||
* Editor
|
||||
*/
|
||||
editor?: string | null;
|
||||
/**
|
||||
* Extra
|
||||
*/
|
||||
extra?: {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* PropertyType
|
||||
*
|
||||
* Bounded vocabulary of property types the renderer dispatches on.
|
||||
*
|
||||
* Adding a value here requires a matching arm in the frontend
|
||||
* `<PropertyInput>` switch and (where relevant) the SDK codegen template.
|
||||
*/
|
||||
export type PropertyType = 'string' | 'number' | 'boolean' | 'options' | 'multi_options' | 'fixed_collection' | 'json' | 'tool_refs' | 'document_refs' | 'recording_ref' | 'credential_ref' | 'mention_textarea' | 'url';
|
||||
|
||||
/**
|
||||
* RecordingCreateRequestSchema
|
||||
*
|
||||
|
|
@ -9385,6 +9675,89 @@ export type GetCurrentUserApiV1AuthMeGetResponses = {
|
|||
|
||||
export type GetCurrentUserApiV1AuthMeGetResponse = GetCurrentUserApiV1AuthMeGetResponses[keyof GetCurrentUserApiV1AuthMeGetResponses];
|
||||
|
||||
export type ListNodeTypesApiV1NodeTypesGetData = {
|
||||
body?: never;
|
||||
headers?: {
|
||||
/**
|
||||
* Authorization
|
||||
*/
|
||||
authorization?: string | null;
|
||||
/**
|
||||
* X-Api-Key
|
||||
*/
|
||||
'X-API-Key'?: string | null;
|
||||
};
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/api/v1/node-types';
|
||||
};
|
||||
|
||||
export type ListNodeTypesApiV1NodeTypesGetErrors = {
|
||||
/**
|
||||
* Not found
|
||||
*/
|
||||
404: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type ListNodeTypesApiV1NodeTypesGetError = ListNodeTypesApiV1NodeTypesGetErrors[keyof ListNodeTypesApiV1NodeTypesGetErrors];
|
||||
|
||||
export type ListNodeTypesApiV1NodeTypesGetResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: NodeTypesResponse;
|
||||
};
|
||||
|
||||
export type ListNodeTypesApiV1NodeTypesGetResponse = ListNodeTypesApiV1NodeTypesGetResponses[keyof ListNodeTypesApiV1NodeTypesGetResponses];
|
||||
|
||||
export type GetNodeTypeApiV1NodeTypesNameGetData = {
|
||||
body?: never;
|
||||
headers?: {
|
||||
/**
|
||||
* Authorization
|
||||
*/
|
||||
authorization?: string | null;
|
||||
/**
|
||||
* X-Api-Key
|
||||
*/
|
||||
'X-API-Key'?: string | null;
|
||||
};
|
||||
path: {
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name: string;
|
||||
};
|
||||
query?: never;
|
||||
url: '/api/v1/node-types/{name}';
|
||||
};
|
||||
|
||||
export type GetNodeTypeApiV1NodeTypesNameGetErrors = {
|
||||
/**
|
||||
* Not found
|
||||
*/
|
||||
404: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type GetNodeTypeApiV1NodeTypesNameGetError = GetNodeTypeApiV1NodeTypesNameGetErrors[keyof GetNodeTypeApiV1NodeTypesNameGetErrors];
|
||||
|
||||
export type GetNodeTypeApiV1NodeTypesNameGetResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: NodeSpec;
|
||||
};
|
||||
|
||||
export type GetNodeTypeApiV1NodeTypesNameGetResponse = GetNodeTypeApiV1NodeTypesNameGetResponses[keyof GetNodeTypeApiV1NodeTypesNameGetResponses];
|
||||
|
||||
export type HealthApiV1HealthGetData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue