@thinkingai/ae-cli 6.0.57 → 6.0.60
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/README.md +10 -5
- package/README.zh.md +10 -5
- package/bin/ai-monitor.js +2 -0
- package/dist/ai-monitor-FCXSLHAP.js +32 -0
- package/dist/ai-monitor.js +135 -0
- package/dist/{auth-YEIJLBFY.js → auth-ATK2SLEV.js} +12 -11
- package/dist/{automation-NAR5DDGL.js → automation-FLCPFMN4.js} +5 -5
- package/dist/{capability-P7DD4Q73.js → capability-6KTSOI7L.js} +32 -36
- package/dist/{chunk-JCWM2TYP.js → chunk-2ETRY2CU.js} +16 -16
- package/dist/{chunk-IN7KKL6K.js → chunk-2F64AZYH.js} +1 -1
- package/dist/{chunk-JNVVJ273.js → chunk-4PSTYEG5.js} +5 -10
- package/dist/{chunk-QEMQKVHW.js → chunk-5E7MTTFN.js} +3 -3
- package/dist/{chunk-RJHGDWSC.js → chunk-5M5LBRR3.js} +2 -2
- package/dist/chunk-6M7ZEDT2.js +182 -0
- package/dist/{chunk-KPQY44JQ.js → chunk-AWW2T2WL.js} +3 -0
- package/dist/chunk-AXTO4FTM.js +1285 -0
- package/dist/{chunk-TKVVACEJ.js → chunk-BEYLCUZX.js} +17 -12
- package/dist/chunk-CF6JTT2U.js +64 -0
- package/dist/{chunk-N6XBLRB7.js → chunk-F2VFZUGG.js} +2 -2
- package/dist/{chunk-ZGIYG473.js → chunk-HSZAIPUX.js} +48 -13
- package/dist/{chunk-H3K5UGYC.js → chunk-HTZ2MLYA.js} +48 -22
- package/dist/{chunk-QZUVLFNR.js → chunk-HVMCPKOZ.js} +1 -1
- package/dist/{chunk-7JAVT5TK.js → chunk-KTJXD27G.js} +2 -2
- package/dist/{chunk-TULINOLS.js → chunk-LOR4IA26.js} +565 -315
- package/dist/{chunk-YVG6QD3V.js → chunk-P7QDCWJ6.js} +98 -7
- package/dist/{chunk-7ABK2PEJ.js → chunk-SDKW6LYE.js} +88 -36
- package/dist/{chunk-752BSLZC.js → chunk-VJUXKVRE.js} +1 -1
- package/dist/chunk-VRMGHQKE.js +556 -0
- package/dist/{compat-check-PMEGUPZU.js → compat-check-XD2U7PZ2.js} +3 -3
- package/dist/{config-VWVPR4WW.js → config-U3GDWU6E.js} +26 -13
- package/dist/{context-F6FCGTF3.js → context-YAQG6YQC.js} +3 -3
- package/dist/{data-integration-6UAZO4GG.js → data-integration-QE37EQ3A.js} +1 -1
- package/dist/{evaluation-4LO2O4AF.js → evaluation-2JSF4V47.js} +13 -158
- package/dist/index.js +87 -582
- package/dist/{memory-HHPX3NF2.js → memory-WEB27VI6.js} +8 -8
- package/dist/{metadata-HEQQEEG3.js → metadata-7FYE4234.js} +8 -8
- package/dist/{model-7UHGWYVR.js → model-T7H7Q6BG.js} +3 -3
- package/dist/{personal-semantic-preference-V4L6ZWR2.js → personal-semantic-preference-O6VXM74A.js} +7 -7
- package/dist/{project-semantic-NKHKJX6M.js → project-semantic-2GGFJWW6.js} +16 -14
- package/dist/{sync-ZJMXCRIN.js → sync-ULBB7WO5.js} +5 -5
- package/dist/{te-agent-WBKIFEQD.js → te-agent-6RMF7LUV.js} +6 -6
- package/dist/{te-analysis-ADX7RKO4.js → te-analysis-HSYC7GNV.js} +383 -194
- package/dist/{te-community-PREDRXG3.js → te-community-FLKZGQKB.js} +10 -10
- package/dist/{te-dataops-ITWJHO2U.js → te-dataops-OQQGTCUA.js} +5 -5
- package/dist/{te-engage-VE2NUH5V.js → te-engage-RIEBHL5T.js} +10 -10
- package/dist/{te-kb-WSMOW7WS.js → te-kb-4HG2FMHJ.js} +19 -10
- package/dist/{te-system-YM657FKO.js → te-system-AL4B4XZL.js} +3 -3
- package/dist/{te-team-T2WRLOOD.js → te-team-5O4UVUWE.js} +6 -6
- package/dist/{things-6QOMFXOG.js → things-TSJ64GBT.js} +6 -6
- package/dist/{update-I4MOUYOX.js → update-Q5LURAWV.js} +4 -4
- package/dist/{workspace-LYDAP647.js → workspace-FF2HXJGR.js} +5 -5
- package/package.json +8 -6
- package/skills/ae-ai-monitor/SKILL.md +179 -0
- package/skills/ae-ai-monitor/references/read-commands.md +866 -0
- package/skills/ae-analysis/SKILL.md +10 -4
- package/skills/ae-analysis/references/adhoc_export.md +3 -1
- package/skills/ae-analysis/references/ai_models.md +1 -0
- package/skills/ae-analysis/references/analysis_gateway_assets.md +2 -0
- package/skills/ae-analysis/references/asset_search.md +1 -1
- package/skills/ae-analysis/references/bad_case_begin.md +12 -0
- package/skills/ae-analysis/references/bad_case_get.md +12 -0
- package/skills/ae-analysis/references/bad_case_history.md +12 -0
- package/skills/ae-analysis/references/bad_case_list.md +12 -0
- package/skills/ae-analysis/references/bad_case_review.md +51 -0
- package/skills/ae-analysis/references/bad_case_run.md +12 -0
- package/skills/ae-analysis/references/bad_case_submit.md +12 -0
- package/skills/ae-analysis/references/bad_case_submit_to_page.md +12 -0
- package/skills/ae-analysis/references/bad_case_sync_evaluation.md +11 -0
- package/skills/ae-analysis/references/bi_panel_list.md +1 -1
- package/skills/ae-analysis/references/bi_panel_share.md +3 -1
- package/skills/ae-analysis/references/catalog_list.md +2 -0
- package/skills/ae-analysis/references/command_index.md +38 -29
- package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
- package/skills/ae-analysis/references/dashboard_handover.md +3 -1
- package/skills/ae-analysis/references/dashboard_list.md +3 -3
- package/skills/ae-analysis/references/dashboard_report_data_export.md +1 -1
- package/skills/ae-analysis/references/dashboard_share.md +3 -1
- package/skills/ae-analysis/references/dashboard_update.md +3 -2
- package/skills/ae-analysis/references/filter_value_list.md +2 -0
- package/skills/ae-analysis/references/folder_share.md +8 -2
- package/skills/ae-analysis/references/governance_recommendation_run_update.md +3 -1
- package/skills/ae-analysis/references/project_data_power_upsert.md +3 -1
- package/skills/ae-analysis/references/project_mark_time_create.md +2 -0
- package/skills/ae-analysis/references/project_mark_time_update.md +2 -0
- package/skills/ae-analysis/references/project_member_add.md +3 -1
- package/skills/ae-analysis/references/project_member_batch_update.md +3 -1
- package/skills/ae-analysis/references/project_member_handover_run.md +3 -1
- package/skills/ae-analysis/references/project_member_update.md +3 -1
- package/skills/ae-analysis/references/project_owner_update.md +3 -1
- package/skills/ae-analysis/references/project_role_upsert.md +5 -3
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +16 -1
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +14 -1
- package/skills/ae-analysis/references/project_space_share.md +8 -2
- package/skills/ae-analysis/references/property_get.md +2 -0
- package/skills/ae-analysis/references/public_link_list.md +3 -1
- package/skills/ae-analysis/references/query_cancel.md +4 -1
- package/skills/ae-analysis/references/report_data_run.md +1 -1
- package/skills/ae-analysis/references/report_list.md +3 -3
- package/skills/ae-analysis/references/scenario_append.md +2 -2
- package/skills/ae-analysis/references/scenario_collect.md +15 -4
- package/skills/ae-analysis/references/scenario_list.md +2 -1
- package/skills/ae-analysis/references/system_oauth2_update.md +3 -1
- package/skills/ae-analysis/references/system_third_party_login_upsert.md +4 -2
- package/skills/ae-analysis/references/user_tag_create.md +4 -1
- package/skills/ae-analysis/references/user_tag_get.md +2 -0
- package/skills/ae-analysis/references/user_tag_models.md +8 -2
- package/skills/ae-analysis/references/user_tag_update.md +5 -2
- package/skills/ae-analysis/references/virtual_property_create.md +12 -1
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +10 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +55 -13
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +2 -2
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +2 -2
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +7 -1
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/wait-compile-run.mjs +79 -0
- package/skills/ae-automation/SKILL.md +4 -2
- package/skills/ae-capability/SKILL.md +9 -5
- package/skills/ae-community/SKILL.md +1 -0
- package/skills/ae-dataops/SKILL.md +1 -0
- package/skills/ae-engage/SKILL.md +1 -0
- package/skills/ae-evaluation/SKILL.md +17 -2
- package/skills/ae-generate-tracking-plan/SKILL.md +5 -0
- package/skills/ae-kb/SKILL.md +9 -5
- package/skills/ae-kb/references/analysis-workflow.md +11 -2
- package/skills/ae-kb/references/query-workflow.md +9 -6
- package/skills/ae-kb/references/versions.md +1 -1
- package/skills/ae-kb-discovery/SKILL.md +15 -6
- package/skills/ae-metadata/SKILL.md +1 -0
- package/skills/ae-migrate-tracking-code/SKILL.md +2 -1
- package/skills/ae-team/SKILL.md +1 -1
- package/skills/ae-tracking-matrix/SKILL.md +170 -0
- package/skills/ae-tracking-matrix/assets//345/237/213/347/202/271/346/250/241/347/211/210.xlsx +0 -0
- package/skills/ae-tracking-matrix/i18n.yaml +12 -0
- package/skills/ae-tracking-matrix/references/ae-capabilities.md +93 -0
- package/skills/ae-tracking-matrix/references/business-semantic-checks.md +30 -0
- package/skills/ae-tracking-matrix/references/categories/acquaintance_social_tracking_plan_template.md +256 -0
- package/skills/ae-tracking-matrix/references/categories/blockchain_game_tracking_plan_template.md +213 -0
- package/skills/ae-tracking-matrix/references/categories/card_game_tracking_plan_template.md +407 -0
- package/skills/ae-tracking-matrix/references/categories/casual_game_tracking_plan_template.md +218 -0
- package/skills/ae-tracking-matrix/references/categories/casual_music.md +112 -0
- package/skills/ae-tracking-matrix/references/categories/chess_cards_tracking_plan_template.md +301 -0
- package/skills/ae-tracking-matrix/references/categories/ecommerce_tracking_plan_template.md +356 -0
- package/skills/ae-tracking-matrix/references/categories/fishing.md +775 -0
- package/skills/ae-tracking-matrix/references/categories/game_basic_module_tracking_plan.md +89 -0
- package/skills/ae-tracking-matrix/references/categories/idle_card.md +27 -0
- package/skills/ae-tracking-matrix/references/categories/idle_game_tracking_plan_template.md +415 -0
- package/skills/ae-tracking-matrix/references/categories/interactive_video.md +133 -0
- package/skills/ae-tracking-matrix/references/categories/merge.md +639 -0
- package/skills/ae-tracking-matrix/references/categories/mmo_mobile_tracking_plan_template.md +406 -0
- package/skills/ae-tracking-matrix/references/categories/mmo_web.md +230 -0
- package/skills/ae-tracking-matrix/references/categories/music.md +137 -0
- package/skills/ae-tracking-matrix/references/categories/online_education_tracking_plan_template.md +414 -0
- package/skills/ae-tracking-matrix/references/categories/qipai_mj.md +199 -0
- package/skills/ae-tracking-matrix/references/categories/reading_tracking_plan_template.md +158 -0
- package/skills/ae-tracking-matrix/references/categories/roguelike_tracking_plan_template.md +546 -0
- package/skills/ae-tracking-matrix/references/categories/rpg.md +195 -0
- package/skills/ae-tracking-matrix/references/categories/short_drama_tracking_plan_template.md +115 -0
- package/skills/ae-tracking-matrix/references/categories/simulation_business_tracking_plan_template.md +151 -0
- package/skills/ae-tracking-matrix/references/categories/slg_tracking_plan_template.md +260 -0
- package/skills/ae-tracking-matrix/references/categories/slots_tracking_plan_template.md +232 -0
- package/skills/ae-tracking-matrix/references/categories/stranger_social_tracking_plan_template.md +359 -0
- package/skills/ae-tracking-matrix/references/categories/tower_defense.md +365 -0
- package/skills/ae-tracking-matrix/references/categories/video_editor_tracking_plan_template.md +211 -0
- package/skills/ae-tracking-matrix/references/categories/wechat_minigame.md +132 -0
- package/skills/ae-tracking-matrix/references/category-registry.md +77 -0
- package/skills/ae-tracking-matrix/references/data-verification/diagnosis_kb.md +230 -0
- package/skills/ae-tracking-matrix/references/data-verification/sql_checks.md +406 -0
- package/skills/ae-tracking-matrix/references/data-verification/tracking_plan_comparison.md +128 -0
- package/skills/ae-tracking-matrix/references/eval-cases.md +74 -0
- package/skills/ae-tracking-matrix/references/naming-dict.md +238 -0
- package/skills/ae-tracking-matrix/references/optimization-checklist.md +85 -0
- package/skills/ae-tracking-matrix/references/plan-generation/export-schema.md +142 -0
- package/skills/ae-tracking-matrix/references/plan-generation/module-baseline.md +47 -0
- package/skills/ae-tracking-matrix/references/plan-generation/reference.md +794 -0
- package/skills/ae-tracking-matrix/references/plan-generation/template-catalog.md +94 -0
- package/skills/ae-tracking-matrix/references/scene-routing.md +80 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/android.md +3787 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/c.md +827 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-lua.md +655 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-x.md +953 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocoscreator.md +1128 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/corona.md +714 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/egret.md +1268 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/flutter.md +776 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/h5-and-app-sdk-integration.md +182 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/ios.md +2755 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/javascript.md +1182 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/layaair.md +1300 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/macos.md +1369 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/mini-program-mini-game.md +1692 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/openharmony.md +902 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/react-native.md +763 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/uni-app.md +1107 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/unity.md +1532 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/unreal.md +845 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/android_sdk_faq.md +228 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/ios_sdk_faq.md +149 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/java_sdk_faq.md +407 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/javascript_sdk_faq.md +163 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/minigame_sdk_faq.md +149 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/miniprogram_sdk_faq.md +153 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/python_sdk_faq.md +232 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/sdk_log_guide.md +314 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/sdk_usage_notes.md +117 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/unity_sdk_faq.md +148 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/filebeat-logstash-guide.md +645 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_guide.md +307 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_parser_plugin.md +347 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/restful_api_notes.md +72 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/ta-datax-writer-guide.md +264 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/c.md +566 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/erlang.md +409 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/golang.md +446 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/java.md +557 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/lua.md +457 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/nodejs.md +490 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/php.md +523 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/python.md +484 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/ruby.md +442 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/data-rules.md +391 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/first-event-validation.md +91 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/preset-properties-system-fields.md +635 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/updatable-events.md +113 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/user-identification-rules.md +466 -0
- package/skills/ae-tracking-matrix/references/standard-base/README.md +22 -0
- package/skills/ae-tracking-matrix/references/standard-base/basic_event_data.md +174 -0
- package/skills/ae-tracking-matrix/references/standard-base/common_event_properties.md +20 -0
- package/skills/ae-tracking-matrix/references/standard-base/common_event_properties_setup.md +7 -0
- package/skills/ae-tracking-matrix/references/standard-base/data_type_design_principles.md +14 -0
- package/skills/ae-tracking-matrix/references/standard-base/gameplay_event_data.md +370 -0
- package/skills/ae-tracking-matrix/references/standard-base/id_system_faq.md +47 -0
- package/skills/ae-tracking-matrix/references/standard-base/integration_must_know.md +37 -0
- package/skills/ae-tracking-matrix/references/standard-base/multi_platform_integration_notes.md +27 -0
- package/skills/ae-tracking-matrix/references/standard-base/multi_user_id_system_recommendations.md +23 -0
- package/skills/ae-tracking-matrix/references/standard-base/tracking_notes.md +14 -0
- package/skills/ae-tracking-matrix/references/standard-base/user_data.md +46 -0
- package/skills/ae-tracking-matrix/references/standard-base/user_id_system.md +13 -0
- package/skills/ae-tracking-matrix/references/system-fields.md +297 -0
- package/skills/ae-tracking-matrix/references/te-field-translations.md +1791 -0
- package/skills/ae-tracking-matrix/references/workflows/data-verification.md +232 -0
- package/skills/ae-tracking-matrix/references/workflows/feasibility-analysis.md +829 -0
- package/skills/ae-tracking-matrix/references/workflows/integration-qna.md +355 -0
- package/skills/ae-tracking-matrix/references/workflows/plan-generation.md +283 -0
- package/skills/ae-tracking-matrix/references/workflows/plan-lint.md +168 -0
- package/skills/ae-tracking-matrix/references/workflows/plan-review-optimize.md +205 -0
- package/skills/ae-tracking-matrix/references/workflows/prd-to-suggestions.md +75 -0
- package/skills/ae-tracking-matrix/references/workflows/troubleshooting.md +36 -0
- package/skills/ae-tracking-matrix/references/workflows/validated-upload.md +107 -0
- package/skills/ae-tracking-matrix/scripts/build_template_catalog.py +114 -0
- package/skills/ae-tracking-matrix/scripts/export_tracking_plan.py +53 -0
- package/skills/ae-tracking-matrix/scripts/finalize_plan.py +166 -0
- package/skills/ae-tracking-matrix/scripts/lint_tracking_plan.py +674 -0
- package/skills/ae-tracking-matrix/scripts/plan_contract.py +200 -0
- package/skills/ae-tracking-matrix/scripts/plan_types.py +60 -0
- package/skills/ae-tracking-matrix/scripts/prepare_delivery.py +169 -0
- package/skills/ae-tracking-matrix/scripts/sync_plan.py +296 -0
- package/skills/ae-tracking-matrix/scripts/upload_plan.py +340 -0
- package/dist/chunk-AMBFK2K3.js +0 -28
|
@@ -31,6 +31,64 @@ function resolveEvaluationHost(host) {
|
|
|
31
31
|
return endpoint.toString().replace(/\/+$/, "").replace(/\/agent$/, "");
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
// src/core/eval-onboarding.ts
|
|
35
|
+
function evaluationResponseStatus(httpStatus, contentType, body, source = "api") {
|
|
36
|
+
const error = body && typeof body === "object" ? body.error : void 0;
|
|
37
|
+
const code = error && typeof error === "object" ? error.code : void 0;
|
|
38
|
+
const businessError = typeof code === "string" && /^[A-Z][A-Z0-9_]{0,127}$/.test(code);
|
|
39
|
+
const html = contentType?.toLowerCase().includes("text/html");
|
|
40
|
+
if (httpStatus === 403) return "access_not_granted";
|
|
41
|
+
if (httpStatus === 404 && !businessError) {
|
|
42
|
+
return source === "session" ? "availability_unknown" : "module_not_detected";
|
|
43
|
+
}
|
|
44
|
+
if (httpStatus >= 500) return "availability_unknown";
|
|
45
|
+
if (html && httpStatus >= 200 && httpStatus < 300) {
|
|
46
|
+
return source === "session" ? "availability_unknown" : "module_not_detected";
|
|
47
|
+
}
|
|
48
|
+
return void 0;
|
|
49
|
+
}
|
|
50
|
+
function buildEvaluationOnboardingPayload(status, host) {
|
|
51
|
+
const nextSteps = {
|
|
52
|
+
module_not_detected: [
|
|
53
|
+
"The evaluation API was not detected. This optional module may be absent, or its route may be misconfigured; installation is not confirmed.",
|
|
54
|
+
"Contact your ThinkingData service representative (Customer Success Manager or Technical Support) to verify deployment and routing, install AI Evaluation Center if needed, and enable access.",
|
|
55
|
+
"After activation, open AI Evaluation Center from the app launcher and ask an administrator to assign the required project role."
|
|
56
|
+
],
|
|
57
|
+
access_not_granted: [
|
|
58
|
+
"This request was denied. The denial may come from the gateway, module access policy, or the selected project; it does not establish cluster-wide installation or access.",
|
|
59
|
+
"Ask your system administrator or ThinkingData support to check the denied request and grant the required module access or target project role (READER / EDITOR / ADMIN).",
|
|
60
|
+
"Stop only the denied operation; independent authorized operations may continue. Stop a whole project or module only when that access scope is confirmed. Do not reinstall the module or refresh credentials solely because of HTTP 403."
|
|
61
|
+
],
|
|
62
|
+
token_missing: [
|
|
63
|
+
"AE_EVAL_ACCESS_TOKEN is unset. No evaluation request was sent; module availability and service health have not been checked.",
|
|
64
|
+
"If AI Evaluation Center is available in the app launcher, obtain a session token through its web console or POST /agenteval/api/v1/auth/session and set AE_EVAL_ACCESS_TOKEN securely.",
|
|
65
|
+
"If the module entry is unavailable, contact your administrator or ThinkingData support to verify deployment and enable module access and the required project role."
|
|
66
|
+
],
|
|
67
|
+
availability_unknown: [
|
|
68
|
+
"Evaluation availability could not be confirmed. A gateway outage, missing sandbox session route, login page, or invalid response does not prove the module is uninstalled.",
|
|
69
|
+
"Check the selected --host and network path; ask your administrator or ThinkingData support to verify evaluation service health and gateway/session routing.",
|
|
70
|
+
"A failed write response leaves the write result unconfirmed; the server may already have accepted it. Do not resubmit the write blindly. Once connectivity is restored, use authorized read-only status checks to reconcile the result before deciding whether to retry.",
|
|
71
|
+
"Do not rotate credentials or request installation based only on this response."
|
|
72
|
+
]
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
status,
|
|
76
|
+
host: resolveEvaluationHost(host),
|
|
77
|
+
module_name: "AI Evaluation Center (Agent Evaluation Platform)",
|
|
78
|
+
tagline: "Repeatable, traceable, reusable Agent quality evaluation before release and during iteration.",
|
|
79
|
+
highlights: [
|
|
80
|
+
{ pillar: "Datasets", summary: "Manage single/multi-turn cases and immutable versions; import CSV/JSON or convert AI Monitor traces into datasets." },
|
|
81
|
+
{ pillar: "Evaluators", summary: "Use scoring templates or custom LLM judges, calibrate against human labels, and optimize evaluator prompts." },
|
|
82
|
+
{ pillar: "Evaluation Runs", summary: "Test live Agents or score preset outputs, schedule regression runs, export low-score cases, and inspect execution traces." }
|
|
83
|
+
],
|
|
84
|
+
next_steps: nextSteps[status],
|
|
85
|
+
agent_instruction: [
|
|
86
|
+
status === "access_not_granted" ? "Stop only the denied operation. Independent authorized operations may continue. Do not probe other commands to bypass the denial; stop a whole project or module only when that access scope is confirmed." : status === "availability_unknown" ? "Stop blind retries of the failed operation and alternate flags. For a write, report that its result is unconfirmed: the server may already have accepted it. Do not resubmit blindly. Once connectivity is restored, use authorized read-only status checks to reconcile the result before deciding whether to retry." : "Stop evaluation commands for the affected host until the reported condition changes. Do not try alternate commands or flags.",
|
|
87
|
+
"Continue independent local work; save generated CSV/JSON and confirm its actual path before saying it is saved. Explain the evidence and uncertainty in the user's language, briefly relate the three capabilities to their task, and present the relevant next steps. Never ask the user to paste a token into chat."
|
|
88
|
+
].join(" ")
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
34
92
|
// src/core/eval-client.ts
|
|
35
93
|
import { open, unlink } from "fs/promises";
|
|
36
94
|
import { resolve } from "path";
|
|
@@ -40,6 +98,7 @@ var EvalApiError = class extends Error {
|
|
|
40
98
|
httpStatus;
|
|
41
99
|
hint;
|
|
42
100
|
details;
|
|
101
|
+
onboarding;
|
|
43
102
|
constructor(message, options) {
|
|
44
103
|
const redact = evaluationErrorRedactor([
|
|
45
104
|
...options.sensitiveValues ?? [],
|
|
@@ -51,6 +110,7 @@ var EvalApiError = class extends Error {
|
|
|
51
110
|
this.httpStatus = options.httpStatus;
|
|
52
111
|
this.hint = options.hint === void 0 ? void 0 : redact(options.hint);
|
|
53
112
|
this.details = options.details === void 0 ? void 0 : redact(options.details);
|
|
113
|
+
this.onboarding = options.onboarding === void 0 ? void 0 : redact(options.onboarding);
|
|
54
114
|
}
|
|
55
115
|
};
|
|
56
116
|
function evaluationErrorRedactor(secrets) {
|
|
@@ -100,7 +160,7 @@ async function evalRequest(options) {
|
|
|
100
160
|
redirect: "error",
|
|
101
161
|
signal: controller.signal
|
|
102
162
|
});
|
|
103
|
-
if (response.ok && options.responseType === "bytes") {
|
|
163
|
+
if (response.ok && options.responseType === "bytes" && !response.headers.get("content-type")?.toLowerCase().includes("text/html")) {
|
|
104
164
|
bytes = new Uint8Array(await response.arrayBuffer());
|
|
105
165
|
} else {
|
|
106
166
|
responseText = await response.text();
|
|
@@ -112,20 +172,41 @@ async function evalRequest(options) {
|
|
|
112
172
|
throw new EvalApiError(`Evaluation API request timed out after ${timeoutMs} ms.`, {
|
|
113
173
|
code: "EVAL_API_TIMEOUT",
|
|
114
174
|
httpStatus: 0,
|
|
115
|
-
hint: "Verify the evaluation platform is reachable at the configured endpoint."
|
|
175
|
+
hint: "Verify the evaluation platform is reachable at the configured endpoint.",
|
|
176
|
+
onboarding: buildEvaluationOnboardingPayload("availability_unknown", options.baseUrl)
|
|
116
177
|
});
|
|
117
178
|
}
|
|
118
179
|
throw new EvalApiError("Evaluation API request failed before a response was received.", {
|
|
119
180
|
code: "EVAL_API_NETWORK_ERROR",
|
|
120
181
|
httpStatus: 0,
|
|
121
|
-
hint: "Verify the --
|
|
182
|
+
hint: "Verify the --host URL and network path.",
|
|
183
|
+
onboarding: buildEvaluationOnboardingPayload("availability_unknown", options.baseUrl)
|
|
122
184
|
});
|
|
123
185
|
} finally {
|
|
124
186
|
clearTimeout(timeout);
|
|
125
187
|
}
|
|
126
188
|
logEvalRequest(options.method, url, response.status);
|
|
127
189
|
if (bytes !== void 0) return bytes;
|
|
128
|
-
|
|
190
|
+
let responseBody;
|
|
191
|
+
try {
|
|
192
|
+
if (response.headers.get("content-type")?.toLowerCase().includes("text/html")) {
|
|
193
|
+
throw new EvalApiError("Evaluation API returned an HTML response instead of the requested API data.", {
|
|
194
|
+
code: "EVAL_API_INVALID_RESPONSE",
|
|
195
|
+
httpStatus: response.status
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
responseBody = parseEvalResponseBody(responseText, response.status);
|
|
199
|
+
} catch (error) {
|
|
200
|
+
if (!(error instanceof EvalApiError)) throw error;
|
|
201
|
+
const status = evaluationResponseStatus(response.status, response.headers.get("content-type"), void 0);
|
|
202
|
+
throw new EvalApiError(error.message, {
|
|
203
|
+
code: error.code,
|
|
204
|
+
httpStatus: error.httpStatus,
|
|
205
|
+
hint: error.hint,
|
|
206
|
+
sensitiveValues: Object.values(options.headers).flatMap((value) => [value, value.replace(/^Bearer\s+/i, "")]),
|
|
207
|
+
onboarding: buildEvaluationOnboardingPayload(status ?? "availability_unknown", options.baseUrl)
|
|
208
|
+
});
|
|
209
|
+
}
|
|
129
210
|
if (!response.ok) {
|
|
130
211
|
const sensitiveValues = Object.values(options.headers).flatMap((value) => [value, value.replace(/^Bearer\s+/i, "")]);
|
|
131
212
|
if (isRecord(options.body)) {
|
|
@@ -133,7 +214,13 @@ async function evalRequest(options) {
|
|
|
133
214
|
if (typeof options.body[key] === "string") sensitiveValues.push(options.body[key]);
|
|
134
215
|
}
|
|
135
216
|
}
|
|
136
|
-
|
|
217
|
+
const status = evaluationResponseStatus(response.status, response.headers.get("content-type"), responseBody);
|
|
218
|
+
throw evalErrorFromBody(
|
|
219
|
+
responseBody,
|
|
220
|
+
response.status,
|
|
221
|
+
sensitiveValues,
|
|
222
|
+
status ? buildEvaluationOnboardingPayload(status, options.baseUrl) : void 0
|
|
223
|
+
);
|
|
137
224
|
}
|
|
138
225
|
return responseBody;
|
|
139
226
|
}
|
|
@@ -189,7 +276,7 @@ function parseEvalResponseBody(text, httpStatus) {
|
|
|
189
276
|
});
|
|
190
277
|
}
|
|
191
278
|
}
|
|
192
|
-
function evalErrorFromBody(body, httpStatus, sensitiveValues) {
|
|
279
|
+
function evalErrorFromBody(body, httpStatus, sensitiveValues, onboarding) {
|
|
193
280
|
const error = body?.error;
|
|
194
281
|
if (isRecord(error) && typeof error.message === "string" && error.message.trim()) {
|
|
195
282
|
return new EvalApiError(error.message.trim(), {
|
|
@@ -197,12 +284,14 @@ function evalErrorFromBody(body, httpStatus, sensitiveValues) {
|
|
|
197
284
|
httpStatus,
|
|
198
285
|
hint: typeof error.details === "string" ? error.details : void 0,
|
|
199
286
|
details: isRecord(error.details) ? error.details : void 0,
|
|
200
|
-
sensitiveValues
|
|
287
|
+
sensitiveValues,
|
|
288
|
+
onboarding
|
|
201
289
|
});
|
|
202
290
|
}
|
|
203
291
|
return new EvalApiError(`Evaluation API returned HTTP ${httpStatus}.`, {
|
|
204
292
|
code: `EVAL_API_HTTP_${httpStatus}`,
|
|
205
293
|
httpStatus,
|
|
294
|
+
onboarding,
|
|
206
295
|
hint: httpStatus >= 500 ? "The server response was suppressed. Check the evaluation platform logs; the CLI did not retry." : void 0
|
|
207
296
|
});
|
|
208
297
|
}
|
|
@@ -227,6 +316,8 @@ function redactEvalLogUrl(url) {
|
|
|
227
316
|
|
|
228
317
|
export {
|
|
229
318
|
resolveEvaluationHost,
|
|
319
|
+
evaluationResponseStatus,
|
|
320
|
+
buildEvaluationOnboardingPayload,
|
|
230
321
|
EvalApiError,
|
|
231
322
|
evalRequest,
|
|
232
323
|
evalDownloadFile
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveGatewayDomain
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
CapabilityGatewayError,
|
|
7
|
-
fetchCapabilityGateway,
|
|
8
|
-
requestCapabilityGateway
|
|
9
|
-
} from "./chunk-JCWM2TYP.js";
|
|
4
|
+
} from "./chunk-AWW2T2WL.js";
|
|
10
5
|
import {
|
|
11
6
|
readOutputMetadata,
|
|
12
7
|
unwrapOutputData,
|
|
13
8
|
withOutputMetadata
|
|
14
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VJUXKVRE.js";
|
|
10
|
+
import {
|
|
11
|
+
CapabilityGatewayError,
|
|
12
|
+
fetchCapabilityGateway,
|
|
13
|
+
requestCapabilityGateway
|
|
14
|
+
} from "./chunk-2ETRY2CU.js";
|
|
15
15
|
import {
|
|
16
16
|
PermissionError
|
|
17
17
|
} from "./chunk-Z3Q2AEIN.js";
|
|
@@ -141,16 +141,59 @@ async function waitForAnalysisRun(host, runId, options = {}) {
|
|
|
141
141
|
let lastState = "";
|
|
142
142
|
let materializationStartedAt;
|
|
143
143
|
let descriptor = options.initialDescriptor;
|
|
144
|
+
let lastDescriptor = descriptor;
|
|
145
|
+
const lifecycleDeadline = () => materializationStartedAt === void 0 ? deadline : Math.min(deadline, materializationStartedAt + MATERIALIZATION_GRACE_MS);
|
|
146
|
+
const checkWaitBoundary = () => {
|
|
147
|
+
throwIfAborted(options.signal, runId);
|
|
148
|
+
if (now() < Math.min(clientDeadline, lifecycleDeadline())) return;
|
|
149
|
+
if (clientDeadline <= lifecycleDeadline()) {
|
|
150
|
+
throw waitError(
|
|
151
|
+
`Stopped waiting after ${waitTimeoutSeconds} seconds for run ${runId}. The remote run was not canceled.`,
|
|
152
|
+
"ASYNC_WAIT_TIMEOUT",
|
|
153
|
+
runId,
|
|
154
|
+
void 0,
|
|
155
|
+
lastDescriptor,
|
|
156
|
+
{ wait_timeout_seconds: waitTimeoutSeconds }
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
throw waitError(
|
|
160
|
+
`Stopped waiting because the server-declared deadline for run ${runId} was reached. The remote run was not canceled.`,
|
|
161
|
+
"ASYNC_WAIT_DEADLINE_REACHED",
|
|
162
|
+
runId,
|
|
163
|
+
void 0,
|
|
164
|
+
lastDescriptor
|
|
165
|
+
);
|
|
166
|
+
};
|
|
144
167
|
while (true) {
|
|
145
168
|
throwIfAborted(options.signal, runId);
|
|
146
169
|
if (descriptor !== void 0 && descriptorRunStatus(descriptor) === void 0) {
|
|
147
170
|
descriptor = void 0;
|
|
148
171
|
}
|
|
149
172
|
if (descriptor === void 0) {
|
|
173
|
+
checkWaitBoundary();
|
|
174
|
+
const controller = new AbortController();
|
|
175
|
+
const onAbort = () => controller.abort(options.signal?.reason);
|
|
176
|
+
options.signal?.addEventListener("abort", onAbort, { once: true });
|
|
177
|
+
if (options.signal?.aborted) onAbort();
|
|
178
|
+
const signal = controller.signal;
|
|
179
|
+
const timer = setTimeout(() => controller.abort(), Math.max(1, Math.ceil(Math.min(clientDeadline, lifecycleDeadline()) - now())));
|
|
150
180
|
try {
|
|
151
|
-
descriptor = asDescriptor(await inspect(host, runId));
|
|
181
|
+
descriptor = asDescriptor(await abortableRequest(inspect(host, runId, signal), signal));
|
|
182
|
+
checkWaitBoundary();
|
|
183
|
+
lastDescriptor = descriptor;
|
|
152
184
|
transientFailures = 0;
|
|
153
185
|
} catch (error) {
|
|
186
|
+
checkWaitBoundary();
|
|
187
|
+
if (controller.signal.aborted) {
|
|
188
|
+
throw waitError(
|
|
189
|
+
"The local inspect wait ended. The remote run was not canceled.",
|
|
190
|
+
clientDeadline <= lifecycleDeadline() ? "ASYNC_WAIT_TIMEOUT" : "ASYNC_WAIT_DEADLINE_REACHED",
|
|
191
|
+
runId,
|
|
192
|
+
error,
|
|
193
|
+
lastDescriptor,
|
|
194
|
+
clientDeadline <= lifecycleDeadline() ? { wait_timeout_seconds: waitTimeoutSeconds } : {}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
154
197
|
if (error instanceof PermissionError) throw error;
|
|
155
198
|
if (error instanceof CapabilityGatewayError && error.httpStatus === 404) {
|
|
156
199
|
throw new CapabilityGatewayError(
|
|
@@ -169,9 +212,13 @@ async function waitForAnalysisRun(host, runId, options = {}) {
|
|
|
169
212
|
error
|
|
170
213
|
);
|
|
171
214
|
}
|
|
172
|
-
await sleep(delayMs, options.signal);
|
|
215
|
+
await sleep(Math.min(delayMs, Math.max(0, Math.min(clientDeadline, lifecycleDeadline()) - now())), options.signal);
|
|
216
|
+
checkWaitBoundary();
|
|
173
217
|
delayMs = nextDelay(delayMs);
|
|
174
218
|
continue;
|
|
219
|
+
} finally {
|
|
220
|
+
clearTimeout(timer);
|
|
221
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
175
222
|
}
|
|
176
223
|
}
|
|
177
224
|
deadline = Math.min(deadline, deriveDeadline(descriptor, startedAt));
|
|
@@ -217,27 +264,8 @@ async function waitForAnalysisRun(host, runId, options = {}) {
|
|
|
217
264
|
if (runStatus === "SUCCEEDED" && materializationStartedAt === void 0) {
|
|
218
265
|
materializationStartedAt = now();
|
|
219
266
|
}
|
|
220
|
-
|
|
221
|
-
const effectiveDeadline = Math.min(clientDeadline, lifecycleDeadline);
|
|
222
|
-
if (now() >= effectiveDeadline) {
|
|
223
|
-
if (clientDeadline <= lifecycleDeadline) {
|
|
224
|
-
throw waitError(
|
|
225
|
-
`Stopped waiting after ${waitTimeoutSeconds} seconds for run ${runId}. The remote run was not canceled.`,
|
|
226
|
-
"ASYNC_WAIT_TIMEOUT",
|
|
227
|
-
runId,
|
|
228
|
-
void 0,
|
|
229
|
-
descriptor,
|
|
230
|
-
{ wait_timeout_seconds: waitTimeoutSeconds }
|
|
231
|
-
);
|
|
232
|
-
}
|
|
233
|
-
throw waitError(
|
|
234
|
-
`Stopped waiting because the server-declared deadline for run ${runId} was reached. The remote run was not canceled.`,
|
|
235
|
-
"ASYNC_WAIT_DEADLINE_REACHED",
|
|
236
|
-
runId,
|
|
237
|
-
void 0,
|
|
238
|
-
descriptor
|
|
239
|
-
);
|
|
240
|
-
}
|
|
267
|
+
checkWaitBoundary();
|
|
268
|
+
const effectiveDeadline = Math.min(clientDeadline, lifecycleDeadline());
|
|
241
269
|
await sleep(Math.min(delayMs, Math.max(0, effectiveDeadline - now())), options.signal);
|
|
242
270
|
delayMs = nextDelay(delayMs);
|
|
243
271
|
descriptor = void 0;
|
|
@@ -247,7 +275,13 @@ async function downloadAnalysisArtifact(host, runId, artifactId, output, options
|
|
|
247
275
|
const outputPath = resolve(output);
|
|
248
276
|
await assertOutputPathAvailable(outputPath, options.force, { run_id: runId, artifact_id: artifactId });
|
|
249
277
|
if (options.ensureReady !== false) {
|
|
250
|
-
|
|
278
|
+
let descriptor;
|
|
279
|
+
try {
|
|
280
|
+
descriptor = await abortableRequest(inspectAnalysisRun(host, runId, options.signal), options.signal);
|
|
281
|
+
} catch (error) {
|
|
282
|
+
throwIfAborted(options.signal, runId);
|
|
283
|
+
throw error;
|
|
284
|
+
}
|
|
251
285
|
ensureCompletedDescriptor(descriptor, runId, artifactId);
|
|
252
286
|
}
|
|
253
287
|
await mkdir(dirname(outputPath), { recursive: true });
|
|
@@ -258,7 +292,7 @@ async function downloadAnalysisArtifact(host, runId, artifactId, output, options
|
|
|
258
292
|
let tempPresent = false;
|
|
259
293
|
try {
|
|
260
294
|
throwIfAborted(options.signal, runId);
|
|
261
|
-
const response = await fetchArtifact(host, runId, artifactId);
|
|
295
|
+
const response = await abortableRequest(fetchArtifact(host, runId, artifactId, options.signal), options.signal);
|
|
262
296
|
if (!response.body) {
|
|
263
297
|
throw protocolError("Artifact download response has no body.", runId);
|
|
264
298
|
}
|
|
@@ -363,11 +397,14 @@ async function withInterruptSignal(operation, runId) {
|
|
|
363
397
|
process.removeListener("SIGINT", onInterrupt);
|
|
364
398
|
}
|
|
365
399
|
}
|
|
366
|
-
async function inspectAnalysisRun(host, runId) {
|
|
400
|
+
async function inspectAnalysisRun(host, runId, signal) {
|
|
367
401
|
return asDescriptor(await requestCapabilityGateway(
|
|
368
402
|
host,
|
|
369
403
|
resolveGatewayDomain("analysis"),
|
|
370
|
-
`runs/${encodeURIComponent(runId)}
|
|
404
|
+
`runs/${encodeURIComponent(runId)}`,
|
|
405
|
+
"GET",
|
|
406
|
+
void 0,
|
|
407
|
+
{ signal }
|
|
371
408
|
));
|
|
372
409
|
}
|
|
373
410
|
function ensureCompletedDescriptor(descriptor, runId, artifactId) {
|
|
@@ -508,6 +545,20 @@ function isTransientPollError(error) {
|
|
|
508
545
|
function throwIfAborted(signal, runId) {
|
|
509
546
|
if (signal?.aborted) throw interruptedError(runId);
|
|
510
547
|
}
|
|
548
|
+
async function abortableRequest(request, signal) {
|
|
549
|
+
if (!signal) return request;
|
|
550
|
+
let onAbort = () => void 0;
|
|
551
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
552
|
+
onAbort = () => reject(signal.reason ?? new DOMException("The operation was aborted", "AbortError"));
|
|
553
|
+
if (signal.aborted) onAbort();
|
|
554
|
+
else signal.addEventListener("abort", onAbort, { once: true });
|
|
555
|
+
});
|
|
556
|
+
try {
|
|
557
|
+
return await Promise.race([request, aborted]);
|
|
558
|
+
} finally {
|
|
559
|
+
signal.removeEventListener("abort", onAbort);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
511
562
|
async function abortableSleep(milliseconds, signal) {
|
|
512
563
|
if (milliseconds <= 0) return;
|
|
513
564
|
await new Promise((resolveSleep, reject) => {
|
|
@@ -538,14 +589,15 @@ async function pathExists(path) {
|
|
|
538
589
|
function artifactPath(runId, artifactId) {
|
|
539
590
|
return `runs/${encodeURIComponent(runId)}/artifacts/${encodeURIComponent(artifactId)}/download`;
|
|
540
591
|
}
|
|
541
|
-
function fetchArtifact(host, runId, artifactId) {
|
|
592
|
+
function fetchArtifact(host, runId, artifactId, signal) {
|
|
542
593
|
return fetchCapabilityGateway(
|
|
543
594
|
host,
|
|
544
595
|
resolveGatewayDomain("analysis"),
|
|
545
596
|
artifactPath(runId, artifactId),
|
|
546
597
|
"GET",
|
|
547
598
|
void 0,
|
|
548
|
-
"application/octet-stream"
|
|
599
|
+
"application/octet-stream",
|
|
600
|
+
{ signal }
|
|
549
601
|
);
|
|
550
602
|
}
|
|
551
603
|
|