Connector calls, semantic rules, and DuckDB memory keep long runs stable, and stream retry stops chats from stalling. Co-authored-by: Cursor <cursoragent@cursor.com>
93 lines
3.1 KiB
JSON
93 lines
3.1 KiB
JSON
{
|
|
"schema_version": "1.0",
|
|
"provider": "didar",
|
|
"default_user_calendar": "jalali",
|
|
"default_business_timezone": "Asia/Tehran",
|
|
"api_timestamp_timezone": "UTC",
|
|
"range_semantics": "[start, end)",
|
|
"parser_requirements": {
|
|
"accept_persian_digits": true,
|
|
"accept_latin_digits": true,
|
|
"accept_persian_month_names": true,
|
|
"accept_relative_periods": [
|
|
"امروز",
|
|
"دیروز",
|
|
"این هفته",
|
|
"هفته قبل",
|
|
"این ماه",
|
|
"ماه قبل",
|
|
"امسال",
|
|
"سال قبل",
|
|
"سه ماه اخیر",
|
|
"شش ماه اخیر"
|
|
]
|
|
},
|
|
"jalali_months": {
|
|
"فروردین": 1,
|
|
"اردیبهشت": 2,
|
|
"خرداد": 3,
|
|
"تیر": 4,
|
|
"مرداد": 5,
|
|
"شهریور": 6,
|
|
"مهر": 7,
|
|
"آبان": 8,
|
|
"آذر": 9,
|
|
"دی": 10,
|
|
"بهمن": 11,
|
|
"اسفند": 12
|
|
},
|
|
"period_resolution": {
|
|
"year_omitted": "Use the current Jalali year in the conversation/business timezone unless context clearly names another year.",
|
|
"month_period": "Start at 00:00:00 local time on day 1; end at 00:00:00 local time on day 1 of the next Jalali month.",
|
|
"utc_conversion": "Convert local start/end to UTC before calling Didar.",
|
|
"output_metadata": [
|
|
"input_text",
|
|
"calendar",
|
|
"timezone",
|
|
"start_local",
|
|
"end_local_exclusive",
|
|
"start_utc",
|
|
"end_utc_exclusive"
|
|
]
|
|
},
|
|
"deal_date_basis": {
|
|
"sales": "won_at",
|
|
"won_deals": "won_at",
|
|
"lost_deals": "lost_at",
|
|
"deals_created": "created_at",
|
|
"pending_pipeline_snapshot": "current_snapshot"
|
|
},
|
|
"didar_search_deals_strategy": {
|
|
"created_at": {
|
|
"Sort": 0,
|
|
"SearchFromTime": "start_utc",
|
|
"SearchToTime": "end_utc_exclusive",
|
|
"confidence": "documented"
|
|
},
|
|
"won_at": {
|
|
"Sort": 9,
|
|
"SearchFromTime": "start_utc",
|
|
"SearchToTime": "end_utc_exclusive",
|
|
"confidence": "needs_real_account_reconciliation",
|
|
"verification": [
|
|
"Every returned row used for a won-period report must have Status == Won.",
|
|
"Every returned row used for a won-period report must have ChangeToWonTime inside [start_utc, end_utc_exclusive).",
|
|
"If returned rows violate the period basis, do not silently report the aggregate as exact."
|
|
],
|
|
"fallback": {
|
|
"mode": "exact_local_filter_when_feasible",
|
|
"description": "Fetch Won deals in controlled pages and post-filter by ChangeToWonTime when the server date-filter semantics are not reconciled.",
|
|
"max_records": 5000,
|
|
"over_cap": "Return an accuracy_guard error rather than an unverified exact number."
|
|
}
|
|
},
|
|
"lost_at": {
|
|
"confidence": "not_verified_by_public_contract",
|
|
"fallback": "Use Status=Lost and locally filter ChangeToLossTime after controlled pagination until a real-account contract test establishes server-side date behavior."
|
|
}
|
|
},
|
|
"implementation": {
|
|
"recommended_python_dependency": "jdatetime or another tested Jalali conversion library",
|
|
"rule": "Pin the chosen Jalali library version and cover Esfand/leap-year/month-boundary behavior with tests."
|
|
}
|
|
} |