chore: improve upon mcp prompts (#494)

* chore: improve upon mcp prompts

* Update api/mcp_server/instructions.py

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
Abhishek 2026-07-03 18:14:03 +05:30 committed by GitHub
parent 88f4477edb
commit 79a4a3c9f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 3890 additions and 4744 deletions

View file

@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: dograh-openapi-XXXXXX.json.mFeCVL0pIi
# timestamp: 2026-06-30T08:46:04+00:00
# filename: dograh-openapi-XXXXXX.json.5rayRuwwwc
# timestamp: 2026-07-03T07:27:55+00:00
from __future__ import annotations
@ -331,6 +331,20 @@ class NodeExample(BaseModel):
data: Annotated[dict[str, Any], Field(title='Data')]
class NumberInputOptions(BaseModel):
"""
Renderer hints for numeric inputs.
"""
model_config = ConfigDict(
extra='forbid',
)
fractional: Annotated[bool | None, Field(title='Fractional')] = False
"""
Allow arbitrary fractional values via step='any'.
"""
class Type(Enum):
"""
JSON type for the resolved value.
@ -366,6 +380,27 @@ class PresetToolParameter(BaseModel):
"""
class ColumnSpan(RootModel[int]):
root: Annotated[int, Field(ge=1, le=12, title='Column Span')]
"""
Number of columns to occupy in the editor's 12-column grid.
"""
class PropertyLayoutOptions(BaseModel):
"""
Renderer layout hints for a property in the node editor.
"""
model_config = ConfigDict(
extra='forbid',
)
column_span: Annotated[ColumnSpan | None, Field(title='Column Span')] = None
"""
Number of columns to occupy in the editor's 12-column grid.
"""
class PropertyOption(BaseModel):
"""
An option in an `options` or `multi_options` dropdown.
@ -379,6 +414,20 @@ class PropertyOption(BaseModel):
description: Annotated[str | None, Field(title='Description')] = None
class PropertyRendererOptions(BaseModel):
"""
Typed renderer metadata for node properties.
Add new renderer behavior here instead of using free-form property metadata.
"""
model_config = ConfigDict(
extra='forbid',
)
layout: PropertyLayoutOptions | None = None
number_input: NumberInputOptions | None = None
class PropertyType(Enum):
"""
Bounded vocabulary of property types the renderer dispatches on.
@ -494,7 +543,7 @@ class TransferCallConfig(BaseModel):
destination: Annotated[str, Field(title='Destination')]
"""
Phone number or SIP endpoint to transfer the call to, e.g. +1234567890 or PJSIP/1234.
Phone number, SIP endpoint, or template to transfer the call to, e.g. +1234567890, PJSIP/1234, or {{initial_context.transfer_destination}}.
"""
messageType: Annotated[MessageType1 | None, Field(title='Messagetype')] = 'none'
"""
@ -717,7 +766,7 @@ class PropertySpec(BaseModel):
max_length: Annotated[int | None, Field(title='Max Length')] = None
pattern: Annotated[str | None, Field(title='Pattern')] = None
editor: Annotated[str | None, Field(title='Editor')] = None
extra: Annotated[dict[str, Any] | None, Field(title='Extra')] = None
renderer_options: PropertyRendererOptions | None = None
class RecordingListResponseSchema(BaseModel):

View file

@ -48,3 +48,39 @@ class Tuner(TypedNode):
When false, Dograh skips exporting this call to Tuner.
"""
cost_calculation_enabled: bool = False
"""
Send a per-call cost to Tuner, computed from your own provider rates
(BYOK). All rates below are optional.
"""
cost_llm_input_rate: Optional[float] = None
"""
USD per 1M tokens
"""
cost_llm_cached_input_rate: Optional[float] = None
"""
USD per 1M cached tokens
"""
cost_llm_output_rate: Optional[float] = None
"""
USD per 1M tokens
"""
cost_tts_rate: Optional[float] = None
"""
USD per 1K characters
"""
cost_stt_rate: Optional[float] = None
"""
USD per minute
"""
cost_telephony_rate: Optional[float] = None
"""
USD per minute
"""

View file

@ -764,6 +764,18 @@ export interface components {
/** Node Types */
node_types: components["schemas"]["NodeSpec"][];
};
/**
* NumberInputOptions
* @description Renderer hints for numeric inputs.
*/
NumberInputOptions: {
/**
* Fractional
* @description Allow arbitrary fractional values via step='any'.
* @default false
*/
fractional: boolean;
};
/**
* PresetToolParameter
* @description A parameter injected by Dograh at runtime.
@ -792,6 +804,17 @@ export interface components {
*/
required: boolean;
};
/**
* PropertyLayoutOptions
* @description Renderer layout hints for a property in the node editor.
*/
PropertyLayoutOptions: {
/**
* Column Span
* @description Number of columns to occupy in the editor's 12-column grid.
*/
column_span?: number | null;
};
/**
* PropertyOption
* @description An option in an `options` or `multi_options` dropdown.
@ -804,6 +827,16 @@ export interface components {
/** Description */
description?: string | null;
};
/**
* PropertyRendererOptions
* @description Typed renderer metadata for node properties.
*
* Add new renderer behavior here instead of using free-form property metadata.
*/
PropertyRendererOptions: {
layout?: components["schemas"]["PropertyLayoutOptions"] | null;
number_input?: components["schemas"]["NumberInputOptions"] | null;
};
/**
* PropertySpec
* @description Single field on a node.
@ -859,10 +892,7 @@ export interface components {
pattern?: string | null;
/** Editor */
editor?: string | null;
/** Extra */
extra?: {
[key: string]: unknown;
};
renderer_options?: components["schemas"]["PropertyRendererOptions"] | null;
};
/**
* PropertyType
@ -991,7 +1021,7 @@ export interface components {
TransferCallConfig: {
/**
* Destination
* @description Phone number or SIP endpoint to transfer the call to, e.g. +1234567890 or PJSIP/1234.
* @description Phone number, SIP endpoint, or template to transfer the call to, e.g. +1234567890, PJSIP/1234, or {{initial_context.transfer_destination}}.
*/
destination: string;
/**
@ -1156,8 +1186,11 @@ export type NodeCategory = components['schemas']['NodeCategory'];
export type NodeExample = components['schemas']['NodeExample'];
export type NodeSpec = components['schemas']['NodeSpec'];
export type NodeTypesResponse = components['schemas']['NodeTypesResponse'];
export type NumberInputOptions = components['schemas']['NumberInputOptions'];
export type PresetToolParameter = components['schemas']['PresetToolParameter'];
export type PropertyLayoutOptions = components['schemas']['PropertyLayoutOptions'];
export type PropertyOption = components['schemas']['PropertyOption'];
export type PropertyRendererOptions = components['schemas']['PropertyRendererOptions'];
export type PropertySpec = components['schemas']['PropertySpec'];
export type PropertyType = components['schemas']['PropertyType'];
export type RecordingListResponseSchema = components['schemas']['RecordingListResponseSchema'];

View file

@ -32,6 +32,34 @@ export interface Tuner {
* Bearer token used when posting completed calls to Tuner.
*/
tuner_api_key: string;
/**
* Send a per-call cost to Tuner, computed from your own provider rates (BYOK). All rates below are optional.
*/
cost_calculation_enabled?: boolean;
/**
* USD per 1M tokens
*/
cost_llm_input_rate?: number;
/**
* USD per 1M cached tokens
*/
cost_llm_cached_input_rate?: number;
/**
* USD per 1M tokens
*/
cost_llm_output_rate?: number;
/**
* USD per 1K characters
*/
cost_tts_rate?: number;
/**
* USD per minute
*/
cost_stt_rate?: number;
/**
* USD per minute
*/
cost_telephony_rate?: number;
}
/** Factory — sets `type` for you so you don't repeat the discriminator. */