@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
|
@@ -7,16 +7,26 @@ import {
|
|
|
7
7
|
waitForAnalysisRun,
|
|
8
8
|
withAsyncArtifactLifecycle,
|
|
9
9
|
withInterruptSignal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SDKW6LYE.js";
|
|
11
|
+
import {
|
|
12
|
+
evalApi
|
|
13
|
+
} from "./chunk-6M7ZEDT2.js";
|
|
14
|
+
import {
|
|
15
|
+
EvalApiError
|
|
16
|
+
} from "./chunk-P7QDCWJ6.js";
|
|
11
17
|
import {
|
|
12
18
|
createCapabilityCommand,
|
|
13
19
|
definitionIntentSnapshotFlag,
|
|
14
20
|
modelDefinitionIntentSnapshotFlag
|
|
15
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BEYLCUZX.js";
|
|
16
22
|
import {
|
|
17
23
|
registerCapabilityGatewayRoute,
|
|
18
24
|
resolveGatewayDomain
|
|
19
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-AWW2T2WL.js";
|
|
26
|
+
import {
|
|
27
|
+
unwrapOutputData,
|
|
28
|
+
withOutputMetadata
|
|
29
|
+
} from "./chunk-VJUXKVRE.js";
|
|
20
30
|
import {
|
|
21
31
|
CapabilityGatewayError,
|
|
22
32
|
buildCapabilityGatewayUrl,
|
|
@@ -30,16 +40,13 @@ import {
|
|
|
30
40
|
uploadInputFile,
|
|
31
41
|
validateCapability,
|
|
32
42
|
validateCapabilityWithEnvelope
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import {
|
|
35
|
-
withOutputMetadata
|
|
36
|
-
} from "./chunk-752BSLZC.js";
|
|
43
|
+
} from "./chunk-2ETRY2CU.js";
|
|
37
44
|
import "./chunk-Y74WTIKJ.js";
|
|
38
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-LOR4IA26.js";
|
|
39
46
|
import {
|
|
40
47
|
getCliToken
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-HTZ2MLYA.js";
|
|
49
|
+
import "./chunk-4PSTYEG5.js";
|
|
43
50
|
import {
|
|
44
51
|
CliValidationError
|
|
45
52
|
} from "./chunk-Z3Q2AEIN.js";
|
|
@@ -51,12 +58,12 @@ var analysisDataExportRoutingHelp = "Routing: use export for full, unknown-size,
|
|
|
51
58
|
function createAnalysisCapabilityCommand(config) {
|
|
52
59
|
const cliPath = resolveAnalysisGatewayCliPath(config);
|
|
53
60
|
const { asyncArtifact, ...coreConfig } = config;
|
|
54
|
-
const
|
|
61
|
+
const command2 = createCapabilityCommand({
|
|
55
62
|
...coreConfig,
|
|
56
63
|
...cliPath,
|
|
57
64
|
gatewayDomain: "analysis"
|
|
58
65
|
});
|
|
59
|
-
return asyncArtifact ? withAsyncArtifactLifecycle(
|
|
66
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command2, typeof asyncArtifact === "object" ? asyncArtifact : void 0) : command2;
|
|
60
67
|
}
|
|
61
68
|
function resolveAnalysisGatewayCliPath(config) {
|
|
62
69
|
const [capabilityService, capabilityResource, capabilityAction, ...extraSegments] = config.capabilityId.split(".");
|
|
@@ -73,32 +80,32 @@ function resolveAnalysisGatewayCliPath(config) {
|
|
|
73
80
|
);
|
|
74
81
|
}
|
|
75
82
|
const resource = capabilityResource.replaceAll("_", "-");
|
|
76
|
-
const
|
|
83
|
+
const command2 = capabilityAction.replaceAll("_", "-");
|
|
77
84
|
const expectedLegacyResource = `${capabilityService} ${resource}`;
|
|
78
|
-
if (config.resource !== expectedLegacyResource || config.command !==
|
|
85
|
+
if (config.resource !== expectedLegacyResource || config.command !== command2) {
|
|
79
86
|
throw new Error(
|
|
80
|
-
`Capability '${config.capabilityId}' must map to ae-cli ${capabilityService} ${resource} ${
|
|
87
|
+
`Capability '${config.capabilityId}' must map to ae-cli ${capabilityService} ${resource} ${command2}.`
|
|
81
88
|
);
|
|
82
89
|
}
|
|
83
|
-
return { cliService: capabilityService, resource, command };
|
|
90
|
+
return { cliService: capabilityService, resource, command: command2 };
|
|
84
91
|
}
|
|
85
92
|
function createAnalysisMetaCapabilityCommand(config) {
|
|
86
93
|
const { asyncArtifact, ...coreConfig } = config;
|
|
87
|
-
const
|
|
94
|
+
const command2 = createCapabilityCommand({
|
|
88
95
|
...coreConfig,
|
|
89
96
|
cliService: "analysis-meta",
|
|
90
97
|
gatewayDomain: "analysis"
|
|
91
98
|
});
|
|
92
|
-
return asyncArtifact ? withAsyncArtifactLifecycle(
|
|
99
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command2, typeof asyncArtifact === "object" ? asyncArtifact : void 0) : command2;
|
|
93
100
|
}
|
|
94
101
|
function createAnalysisGovernanceCapabilityCommand(config) {
|
|
95
102
|
const { asyncArtifact, ...coreConfig } = config;
|
|
96
|
-
const
|
|
103
|
+
const command2 = createCapabilityCommand({
|
|
97
104
|
...coreConfig,
|
|
98
105
|
cliService: "analysis-governance",
|
|
99
106
|
gatewayDomain: "analysis"
|
|
100
107
|
});
|
|
101
|
-
return asyncArtifact ? withAsyncArtifactLifecycle(
|
|
108
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command2, typeof asyncArtifact === "object" ? asyncArtifact : void 0) : command2;
|
|
102
109
|
}
|
|
103
110
|
var projectIdFlag = {
|
|
104
111
|
name: "project-id",
|
|
@@ -184,6 +191,12 @@ var directoryOffsetFlag = {
|
|
|
184
191
|
alias: "o",
|
|
185
192
|
min: 0
|
|
186
193
|
};
|
|
194
|
+
var manageableOnlyFlag = {
|
|
195
|
+
name: "manageable-only",
|
|
196
|
+
type: "boolean",
|
|
197
|
+
required: false,
|
|
198
|
+
desc: "Restrict the list to assets the current user can edit or manage. Defaults to all readable assets."
|
|
199
|
+
};
|
|
187
200
|
var certificationScopeFlag = {
|
|
188
201
|
name: "certification-scope",
|
|
189
202
|
type: "string",
|
|
@@ -281,6 +294,7 @@ function reportListInput(ctx) {
|
|
|
281
294
|
return compactInput({
|
|
282
295
|
...listInput(ctx),
|
|
283
296
|
model_types: optionalJson(ctx, "model-types"),
|
|
297
|
+
manageable_only: optionalBoolean(ctx, "manageable-only"),
|
|
284
298
|
certification_scope: certificationScopeInput(ctx)
|
|
285
299
|
});
|
|
286
300
|
}
|
|
@@ -816,7 +830,7 @@ var metadataEventUpdate = createAnalysisMetaCapabilityCommand({
|
|
|
816
830
|
{ name: "remark", type: "string", required: false, desc: "Event remark." }
|
|
817
831
|
],
|
|
818
832
|
risk: "write",
|
|
819
|
-
buildInput: (ctx) => compactInput({ ...projectInput(ctx), event_name: ctx.str("event-name"), event_desc: optionalString(ctx, "event-desc"), remark:
|
|
833
|
+
buildInput: (ctx) => compactInput({ ...projectInput(ctx), event_name: ctx.str("event-name"), event_desc: optionalString(ctx, "event-desc"), remark: optionalStringPreserveEmpty(ctx, "remark") })
|
|
820
834
|
});
|
|
821
835
|
|
|
822
836
|
// src/commands/te-analysis/meta/event/relation-update.ts
|
|
@@ -1015,7 +1029,7 @@ var metadataPropertyUpdate = createAnalysisMetaCapabilityCommand({
|
|
|
1015
1029
|
{ name: "prop-remark", type: "string", required: false, desc: "Property remark." }
|
|
1016
1030
|
],
|
|
1017
1031
|
risk: "write",
|
|
1018
|
-
buildInput: (ctx) => compactInput({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name"), prop_desc: optionalString(ctx, "prop-desc"), prop_remark:
|
|
1032
|
+
buildInput: (ctx) => compactInput({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name"), prop_desc: optionalString(ctx, "prop-desc"), prop_remark: optionalStringPreserveEmpty(ctx, "prop-remark") })
|
|
1019
1033
|
});
|
|
1020
1034
|
|
|
1021
1035
|
// src/commands/te-analysis/meta/property/relation-update.ts
|
|
@@ -1223,7 +1237,7 @@ var metadataVirtualPropertyCreate = createAnalysisMetaCapabilityCommand({
|
|
|
1223
1237
|
{ name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
|
|
1224
1238
|
{ name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
|
|
1225
1239
|
{ name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
|
|
1226
|
-
{ name: "tag-date-policies", type: "json", required: false, desc: "
|
|
1240
|
+
{ name: "tag-date-policies", type: "json", required: false, desc: "Event SQL tag policies: [{tag_name,cluster_date_policy,specified_cluster_date?}]. LATEST or AUTO omit the date; SPECIFIED requires yyyy-MM-dd." },
|
|
1227
1241
|
{ name: "replace-remark", type: "string", required: false, desc: "Replacement remark." },
|
|
1228
1242
|
{ name: "replace-suggestion", type: "string", required: false, desc: "Replacement suggestion." }
|
|
1229
1243
|
],
|
|
@@ -1275,7 +1289,7 @@ var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
|
|
|
1275
1289
|
{ name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
|
|
1276
1290
|
{ name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
|
|
1277
1291
|
{ name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
|
|
1278
|
-
{ name: "tag-date-policies", type: "json", required: false, desc: "
|
|
1292
|
+
{ name: "tag-date-policies", type: "json", required: false, desc: "Event SQL tag policies: [{tag_name,cluster_date_policy,specified_cluster_date?}]. LATEST or AUTO omit the date; SPECIFIED requires yyyy-MM-dd." },
|
|
1279
1293
|
{ name: "replace-remark", type: "string", required: false, desc: "Replacement remark." },
|
|
1280
1294
|
{ name: "replace-suggestion", type: "string", required: false, desc: "Replacement suggestion." }
|
|
1281
1295
|
],
|
|
@@ -1462,7 +1476,7 @@ var metadataMetricUpdate = createAnalysisMetaCapabilityCommand({
|
|
|
1462
1476
|
metric_id: ctx.num("metric-id"),
|
|
1463
1477
|
metric_name: optionalString(ctx, "metric-name"),
|
|
1464
1478
|
metric_desc: optionalString(ctx, "metric-desc"),
|
|
1465
|
-
metric_remark:
|
|
1479
|
+
metric_remark: optionalStringPreserveEmpty(ctx, "metric-remark"),
|
|
1466
1480
|
metric_mode: optionalMetricMode(ctx),
|
|
1467
1481
|
metric_events: optionalJson(ctx, "metric-events"),
|
|
1468
1482
|
metric_params: optionalJson(ctx, "metric-params")
|
|
@@ -2459,12 +2473,12 @@ async function planBoundedExpansion(ctx, input) {
|
|
|
2459
2473
|
let finalExport = {};
|
|
2460
2474
|
let finalLimit = DEFAULT_LIMIT;
|
|
2461
2475
|
let stopReason = "top_100_inspected";
|
|
2462
|
-
for (const
|
|
2463
|
-
const exported = await exportRecommendationMaterial(ctx, input,
|
|
2476
|
+
for (const limit2 of EXPANSION_LIMITS) {
|
|
2477
|
+
const exported = await exportRecommendationMaterial(ctx, input, limit2);
|
|
2464
2478
|
finalExport = exported.data;
|
|
2465
|
-
const summary = summarizeExport(exported.data,
|
|
2479
|
+
const summary = summarizeExport(exported.data, limit2);
|
|
2466
2480
|
attempts.push(summary);
|
|
2467
|
-
finalLimit =
|
|
2481
|
+
finalLimit = limit2;
|
|
2468
2482
|
const pendingAssets = numberValue(summary.pending_asset_candidates);
|
|
2469
2483
|
const pendingWorkUnits = numberValue(summary.pending_work_units);
|
|
2470
2484
|
const hasMore = summary.has_more === true;
|
|
@@ -2492,12 +2506,12 @@ async function planBoundedExpansion(ctx, input) {
|
|
|
2492
2506
|
finalExport
|
|
2493
2507
|
};
|
|
2494
2508
|
}
|
|
2495
|
-
function exportRecommendationMaterial(ctx, input,
|
|
2509
|
+
function exportRecommendationMaterial(ctx, input, limit2) {
|
|
2496
2510
|
return executeCapabilityWithEnvelope(
|
|
2497
2511
|
ctx.host(),
|
|
2498
2512
|
gatewayDomain(),
|
|
2499
2513
|
EXPORT_CAPABILITY_ID,
|
|
2500
|
-
compactInput({ ...input, limit, include_completed: false })
|
|
2514
|
+
compactInput({ ...input, limit: limit2, include_completed: false })
|
|
2501
2515
|
);
|
|
2502
2516
|
}
|
|
2503
2517
|
function summarizeExport(result, requestedLimit) {
|
|
@@ -2520,12 +2534,12 @@ function countPendingAssetCandidates(workUnits) {
|
|
|
2520
2534
|
const seen = /* @__PURE__ */ new Set();
|
|
2521
2535
|
for (const unit of workUnits) {
|
|
2522
2536
|
for (const candidate of array(record(unit).asset_candidates)) {
|
|
2523
|
-
const
|
|
2524
|
-
if (
|
|
2537
|
+
const item2 = record(candidate);
|
|
2538
|
+
if (item2.actionable !== true || item2.action_state !== "PENDING") {
|
|
2525
2539
|
continue;
|
|
2526
2540
|
}
|
|
2527
|
-
const type = stringValue(
|
|
2528
|
-
const key = stringValue(
|
|
2541
|
+
const type = stringValue(item2.resource_type);
|
|
2542
|
+
const key = stringValue(item2.resource_key);
|
|
2529
2543
|
if (type && key) {
|
|
2530
2544
|
seen.add(`${type}|${key}`);
|
|
2531
2545
|
}
|
|
@@ -2629,13 +2643,13 @@ function autoReviewReason(reason) {
|
|
|
2629
2643
|
}
|
|
2630
2644
|
function autoReviewItemsWithDisplayReason(items) {
|
|
2631
2645
|
return array(items).map((value) => {
|
|
2632
|
-
const
|
|
2646
|
+
const item2 = record(value);
|
|
2633
2647
|
const copy = {
|
|
2634
|
-
...
|
|
2635
|
-
semantic_duplicate_targets: semanticDuplicateTargetsFromReason(stringValue(
|
|
2648
|
+
...item2,
|
|
2649
|
+
semantic_duplicate_targets: semanticDuplicateTargetsFromReason(stringValue(item2.reason) ?? "")
|
|
2636
2650
|
};
|
|
2637
|
-
if (
|
|
2638
|
-
copy.display_reason = autoReviewDisplayReason(
|
|
2651
|
+
if (item2.decision !== "APPROVE") {
|
|
2652
|
+
copy.display_reason = autoReviewDisplayReason(item2);
|
|
2639
2653
|
}
|
|
2640
2654
|
return copy;
|
|
2641
2655
|
});
|
|
@@ -2754,7 +2768,7 @@ function semanticDuplicateTargetsFromReason(reason) {
|
|
|
2754
2768
|
return array(decodeReasonPayload(encoded).targets);
|
|
2755
2769
|
}
|
|
2756
2770
|
function listIncludes(value, expected) {
|
|
2757
|
-
return array(value).some((
|
|
2771
|
+
return array(value).some((item2) => item2 === expected);
|
|
2758
2772
|
}
|
|
2759
2773
|
function buildManualReviewHandoff(autoReviewResult, exportResult) {
|
|
2760
2774
|
const result = record(autoReviewResult);
|
|
@@ -2800,7 +2814,7 @@ function buildManualReviewHandoff(autoReviewResult, exportResult) {
|
|
|
2800
2814
|
});
|
|
2801
2815
|
}
|
|
2802
2816
|
const pageReviewItems = buildPageReviewItems(handoffItems, candidates, relations, decisions);
|
|
2803
|
-
const pageReviewIds = new Set(pageReviewItems.map((
|
|
2817
|
+
const pageReviewIds = new Set(pageReviewItems.map((item2) => stringValue(item2.client_item_id)).filter(Boolean));
|
|
2804
2818
|
return {
|
|
2805
2819
|
schema_version: "1.0",
|
|
2806
2820
|
handoff_type: "auto_review_uncertified_assets_to_page_review",
|
|
@@ -2816,10 +2830,10 @@ function buildManualReviewHandoff(autoReviewResult, exportResult) {
|
|
|
2816
2830
|
skipped: result.skipped,
|
|
2817
2831
|
overflow: result.overflow,
|
|
2818
2832
|
approved_items: autoCertifiedItems,
|
|
2819
|
-
skipped_items: handoffItems.map((
|
|
2820
|
-
target_ref: record(
|
|
2821
|
-
display_name:
|
|
2822
|
-
manual_review_reason:
|
|
2833
|
+
skipped_items: handoffItems.map((item2) => ({
|
|
2834
|
+
target_ref: record(item2.target_ref),
|
|
2835
|
+
display_name: item2.display_name,
|
|
2836
|
+
manual_review_reason: item2.manual_review_reason
|
|
2823
2837
|
}))
|
|
2824
2838
|
},
|
|
2825
2839
|
auto_certified_items: autoCertifiedItems,
|
|
@@ -2848,8 +2862,8 @@ function buildPageReviewItems(handoffItems, candidates, relations, decisions) {
|
|
|
2848
2862
|
const id = stringValue(candidate.client_item_id);
|
|
2849
2863
|
if (id) byId.set(id, candidate);
|
|
2850
2864
|
}
|
|
2851
|
-
for (const
|
|
2852
|
-
const id = stringValue(
|
|
2865
|
+
for (const item2 of handoffItems) {
|
|
2866
|
+
const id = stringValue(item2.client_item_id);
|
|
2853
2867
|
if (id) requiredIds.add(id);
|
|
2854
2868
|
}
|
|
2855
2869
|
let changed = true;
|
|
@@ -2864,7 +2878,7 @@ function buildPageReviewItems(handoffItems, candidates, relations, decisions) {
|
|
|
2864
2878
|
}
|
|
2865
2879
|
}
|
|
2866
2880
|
}
|
|
2867
|
-
const handoffById = new Map(handoffItems.map((
|
|
2881
|
+
const handoffById = new Map(handoffItems.map((item2) => [stringValue(item2.client_item_id), item2]).filter((entry) => !!entry[0]));
|
|
2868
2882
|
return candidates.map(record).filter((candidate) => {
|
|
2869
2883
|
const id = stringValue(candidate.client_item_id);
|
|
2870
2884
|
return id !== void 0 && requiredIds.has(id);
|
|
@@ -2880,15 +2894,15 @@ function buildPageReviewItems(handoffItems, candidates, relations, decisions) {
|
|
|
2880
2894
|
});
|
|
2881
2895
|
}
|
|
2882
2896
|
function markContextCandidate(candidate, decision) {
|
|
2883
|
-
const
|
|
2884
|
-
|
|
2885
|
-
|
|
2897
|
+
const item2 = { ...candidate };
|
|
2898
|
+
item2.manual_review_context = true;
|
|
2899
|
+
item2.manual_review_reason = "\u8BE5\u8D44\u4EA7\u7528\u4E8E\u4FDD\u7559\u81EA\u52A8\u53D1\u73B0\u9875\u9762\u7684\u7236\u5B50\u5C42\u7EA7\u548C\u6765\u6E90\u4E0A\u4E0B\u6587\uFF0C\u4E0D\u4F5C\u4E3A\u672C\u6B21\u4EBA\u5DE5\u5BA1\u6838\u5BF9\u8C61\u3002";
|
|
2886
2900
|
if (decision?.decision === "APPROVE" && decision.landing_status === "APPLIED") {
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2901
|
+
item2.auto_review_decision = decision.raw;
|
|
2902
|
+
item2.auto_review_context_reason = autoReviewDisplayReason(decision.raw, candidate);
|
|
2903
|
+
item2.evidence_snapshot = markEvidenceAuthenticated(record(candidate.evidence_snapshot));
|
|
2890
2904
|
}
|
|
2891
|
-
return
|
|
2905
|
+
return item2;
|
|
2892
2906
|
}
|
|
2893
2907
|
function markEvidenceAuthenticated(evidence) {
|
|
2894
2908
|
const snapshot = { ...evidence };
|
|
@@ -2901,21 +2915,21 @@ function markEvidenceAuthenticated(evidence) {
|
|
|
2901
2915
|
function decisionsByAsset(value) {
|
|
2902
2916
|
const result = /* @__PURE__ */ new Map();
|
|
2903
2917
|
for (const itemValue of array(value)) {
|
|
2904
|
-
const
|
|
2905
|
-
if (
|
|
2918
|
+
const item2 = record(itemValue);
|
|
2919
|
+
if (item2.item_type !== "asset") {
|
|
2906
2920
|
continue;
|
|
2907
2921
|
}
|
|
2908
|
-
const type = stringValue(
|
|
2909
|
-
const key = stringValue(
|
|
2922
|
+
const type = stringValue(item2.resource_type);
|
|
2923
|
+
const key = stringValue(item2.resource_key);
|
|
2910
2924
|
if (!type || !key) {
|
|
2911
2925
|
continue;
|
|
2912
2926
|
}
|
|
2913
2927
|
const assetKey = `${type}|${key}`;
|
|
2914
2928
|
result.set(assetKey, {
|
|
2915
2929
|
assetKey,
|
|
2916
|
-
decision: stringValue(
|
|
2917
|
-
landing_status: stringValue(
|
|
2918
|
-
raw:
|
|
2930
|
+
decision: stringValue(item2.decision) ?? "",
|
|
2931
|
+
landing_status: stringValue(item2.landing_status) ?? "",
|
|
2932
|
+
raw: item2
|
|
2919
2933
|
});
|
|
2920
2934
|
}
|
|
2921
2935
|
return result;
|
|
@@ -3253,8 +3267,8 @@ var agentReviewSubmitToPage = createAnalysisMetaCapabilityCommand({
|
|
|
3253
3267
|
});
|
|
3254
3268
|
function validateInput(input) {
|
|
3255
3269
|
const items = array2(input.items, "items").map((value) => {
|
|
3256
|
-
const
|
|
3257
|
-
fields(
|
|
3270
|
+
const item2 = object(value, "items[]");
|
|
3271
|
+
fields(item2, [
|
|
3258
3272
|
"client_item_id",
|
|
3259
3273
|
"target_ref",
|
|
3260
3274
|
"action_type",
|
|
@@ -3264,10 +3278,10 @@ function validateInput(input) {
|
|
|
3264
3278
|
"source_link",
|
|
3265
3279
|
"evidence_links"
|
|
3266
3280
|
], "items[]");
|
|
3267
|
-
if (typeof
|
|
3281
|
+
if (typeof item2.client_item_id !== "string" || !item2.client_item_id.trim()) {
|
|
3268
3282
|
throw new Error("items[].client_item_id must be a nonempty string.");
|
|
3269
3283
|
}
|
|
3270
|
-
const target = object(
|
|
3284
|
+
const target = object(item2.target_ref, "items[].target_ref");
|
|
3271
3285
|
const targetType = typeof target.type === "string" ? target.type.trim() : "";
|
|
3272
3286
|
const targetKey = typeof target.key === "string" ? target.key.trim() : "";
|
|
3273
3287
|
if (!targetType || !targetKey) {
|
|
@@ -3276,21 +3290,21 @@ function validateInput(input) {
|
|
|
3276
3290
|
if (!supportedTargetTypes.has(targetType)) {
|
|
3277
3291
|
throw new Error("items[].target_ref.type must be one of dashboard, report, event, event_prop, user_prop, user_tag, user_cluster, metric.");
|
|
3278
3292
|
}
|
|
3279
|
-
const proposal = object(
|
|
3293
|
+
const proposal = object(item2.proposal_payload, "items[].proposal_payload");
|
|
3280
3294
|
fields(proposal, ["authentication_status"], "items[].proposal_payload");
|
|
3281
|
-
if (
|
|
3295
|
+
if (item2.action_type !== "CERTIFY" || proposal.authentication_status !== 1) {
|
|
3282
3296
|
throw new Error("Only CERTIFY with authentication_status=1 is supported by the review page.");
|
|
3283
3297
|
}
|
|
3284
|
-
const aiSummary = object(
|
|
3285
|
-
const evidenceSnapshot = object(
|
|
3286
|
-
validateItemAiSummary(aiSummary, `items[${String(
|
|
3298
|
+
const aiSummary = object(item2.ai_summary, "items[].ai_summary");
|
|
3299
|
+
const evidenceSnapshot = object(item2.evidence_snapshot, "items[].evidence_snapshot");
|
|
3300
|
+
validateItemAiSummary(aiSummary, `items[${String(item2.client_item_id)}].ai_summary`);
|
|
3287
3301
|
if (targetType === "report") {
|
|
3288
|
-
validateReportAnalysis(aiSummary, evidenceSnapshot, `items[${String(
|
|
3302
|
+
validateReportAnalysis(aiSummary, evidenceSnapshot, `items[${String(item2.client_item_id)}]`);
|
|
3289
3303
|
}
|
|
3290
|
-
validateEvidenceLinks(
|
|
3291
|
-
return
|
|
3304
|
+
validateEvidenceLinks(item2);
|
|
3305
|
+
return item2;
|
|
3292
3306
|
});
|
|
3293
|
-
unique(items.map((
|
|
3307
|
+
unique(items.map((item2) => item2.client_item_id), "client_item_id");
|
|
3294
3308
|
fields(input, [
|
|
3295
3309
|
"project_id",
|
|
3296
3310
|
"review_type",
|
|
@@ -3305,7 +3319,7 @@ function validateInput(input) {
|
|
|
3305
3319
|
"items"
|
|
3306
3320
|
], "submit-to-page input");
|
|
3307
3321
|
object(input.ai_summary, "ai_summary");
|
|
3308
|
-
validatePresentation(object(input.presentation_snapshot, "presentation_snapshot"), new Set(items.map((
|
|
3322
|
+
validatePresentation(object(input.presentation_snapshot, "presentation_snapshot"), new Set(items.map((item2) => item2.client_item_id)));
|
|
3309
3323
|
if (input.review_type !== "ASSET_GOVERNANCE" || input.schema_version !== "1.0") {
|
|
3310
3324
|
throw new Error("submit-to-page input requires review_type=ASSET_GOVERNANCE and schema_version=1.0.");
|
|
3311
3325
|
}
|
|
@@ -3365,11 +3379,11 @@ function resolvesAnalysisPath(analysis, path) {
|
|
|
3365
3379
|
}
|
|
3366
3380
|
return index === suffix.length;
|
|
3367
3381
|
}
|
|
3368
|
-
function validateEvidenceLinks(
|
|
3369
|
-
const sourceLink = typeof
|
|
3382
|
+
function validateEvidenceLinks(item2) {
|
|
3383
|
+
const sourceLink = typeof item2.source_link === "string" && item2.source_link.trim();
|
|
3370
3384
|
let evidenceLink = false;
|
|
3371
|
-
if ("evidence_links" in
|
|
3372
|
-
evidenceLink = array2(
|
|
3385
|
+
if ("evidence_links" in item2) {
|
|
3386
|
+
evidenceLink = array2(item2.evidence_links, "items[].evidence_links").some((value) => {
|
|
3373
3387
|
const link = object(value, "items[].evidence_links[]");
|
|
3374
3388
|
return typeof link.url === "string" && !!link.url.trim();
|
|
3375
3389
|
});
|
|
@@ -3393,16 +3407,16 @@ function validatePresentation(presentation, itemIds) {
|
|
|
3393
3407
|
throw new Error("presentation_snapshot.topics[].groups[] requires nonempty string id and name.");
|
|
3394
3408
|
}
|
|
3395
3409
|
for (const itemValue of array2(group.items, "presentation_snapshot.topics[].groups[].items")) {
|
|
3396
|
-
const
|
|
3397
|
-
if (typeof
|
|
3410
|
+
const item2 = object(itemValue, "presentation_snapshot.topics[].groups[].items[]");
|
|
3411
|
+
if (typeof item2.id !== "string" || !item2.id.trim()) {
|
|
3398
3412
|
throw new Error("presentation_snapshot display items require nonempty string id.");
|
|
3399
3413
|
}
|
|
3400
|
-
if (!itemIds.has(
|
|
3414
|
+
if (!itemIds.has(item2.id)) {
|
|
3401
3415
|
throw new Error("presentation_snapshot references an unknown client_item_id.");
|
|
3402
3416
|
}
|
|
3403
|
-
displayed.add(
|
|
3404
|
-
topicItemIds.add(
|
|
3405
|
-
groupItemIds.add(
|
|
3417
|
+
displayed.add(item2.id);
|
|
3418
|
+
topicItemIds.add(item2.id);
|
|
3419
|
+
groupItemIds.add(item2.id);
|
|
3406
3420
|
}
|
|
3407
3421
|
if (group.semantic_basis !== void 0) {
|
|
3408
3422
|
const basis = object(group.semantic_basis, "presentation_snapshot.topics[].groups[].semantic_basis");
|
|
@@ -3538,9 +3552,9 @@ var agentReviewList = createAnalysisMetaCapabilityCommand({
|
|
|
3538
3552
|
risk: "read",
|
|
3539
3553
|
flags: [projectFlag, { name: "limit", type: "number", min: 1, max: 500, default: 20, desc: "Maximum recent batches, from 1 to 500. Default: 20." }],
|
|
3540
3554
|
buildInput: (ctx) => {
|
|
3541
|
-
const
|
|
3542
|
-
if (!Number.isInteger(
|
|
3543
|
-
return { ...projectInput2(ctx), limit };
|
|
3555
|
+
const limit2 = ctx.str("limit") === "" ? 20 : ctx.num("limit");
|
|
3556
|
+
if (!Number.isInteger(limit2) || limit2 < 1 || limit2 > 500) throw new Error("--limit must be an integer from 1 to 500.");
|
|
3557
|
+
return { ...projectInput2(ctx), limit: limit2 };
|
|
3544
3558
|
}
|
|
3545
3559
|
});
|
|
3546
3560
|
var agentReviewDetail = createAnalysisMetaCapabilityCommand({
|
|
@@ -4048,7 +4062,7 @@ function normalizeRef(value, index) {
|
|
|
4048
4062
|
function validateStringArray(ctx, name, allowed) {
|
|
4049
4063
|
const value = optionalJson(ctx, name);
|
|
4050
4064
|
if (value === void 0) return;
|
|
4051
|
-
if (!Array.isArray(value) || value.length === 0 || value.some((
|
|
4065
|
+
if (!Array.isArray(value) || value.length === 0 || value.some((item2) => typeof item2 !== "string" || !allowed.has(item2))) {
|
|
4052
4066
|
throw new CliValidationError(`--${name} must be a non-empty JSON array of supported values`);
|
|
4053
4067
|
}
|
|
4054
4068
|
}
|
|
@@ -4179,10 +4193,11 @@ var reportList = createAnalysisCapabilityCommand({
|
|
|
4179
4193
|
resource: "report",
|
|
4180
4194
|
command: "list",
|
|
4181
4195
|
capabilityId: "analysis.report.list",
|
|
4182
|
-
description: "List
|
|
4196
|
+
description: "List readable reports. For management workflows use --manageable-only. Use analysis asset search for asset discovery.",
|
|
4183
4197
|
flags: [
|
|
4184
4198
|
projectIdFlag,
|
|
4185
4199
|
queriesFlag,
|
|
4200
|
+
manageableOnlyFlag,
|
|
4186
4201
|
fieldsFlag,
|
|
4187
4202
|
reportModelTypesFlag,
|
|
4188
4203
|
reportListLimitFlag,
|
|
@@ -4258,7 +4273,7 @@ var REPORT_WRITE_MODEL_TYPE_VALUES = [
|
|
|
4258
4273
|
"tag"
|
|
4259
4274
|
];
|
|
4260
4275
|
var REPORT_WRITE_MODEL_DESCRIPTION = `${AI_MODEL_DESCRIPTION} Report create/update also supports tag for saved tag report data; use tag as the AI-facing spelling.`;
|
|
4261
|
-
var AI_DEFINITION_DESCRIPTION = 'Event metrics: omit optional display_name unless the target command schema explicitly supports it. Funnel step filters use event_property_name (not field) and string-array values, including "true"/"false" for boolean properties. For tag/cluster filters, cluster_date_policy accepts LATEST (default), AUTO (match the computed result for each analysis date), or SPECIFIED (requires specified_cluster_date in yyyy-MM-dd format). AI-facing model definition JSON. Do not pass raw QP, events, event_view, visual_view, or analysis_query. Distribution filters must be attached to the corresponding distribution_metrics[].filters; do not use top-level filters or relation. For path definitions, global filters support user_property, cluster, and tag only; event_property is not supported. session_unit accepts second (1..999), minute (1..999), or hour (1..24). Do not use day; express one day as session_interval=24 and session_unit=hour. For SQL, a simple query is {"sql":"select ..."}; raw variables use ${name}, while typed params use ${Text:name}, ${Selector:name}, or ${PartDate:name}. PartDate expands to a complete predicate, so write WHERE ${PartDate:d}, not a column followed by the placeholder. A part_date parameter may set boolean use_timezone; it defaults to false and controls whether that parameter uses the query effective timezone. Selector value must match one options[].value. Trino identifiers containing #, $, @, spaces, punctuation, or a reserved word must be delimited with double quotes, for example SELECT "#user_id", "$part_event", "end" FROM ...; single quotes are string literals. For multiline SQL JSON, the decoded sql value must contain a real line break; do not submit a literal \\n sequence outside quoted SQL text. Queries against an event table must include a date-partition predicate on the quoted "$part_date" column, for example WHERE "$part_date" BETWEEN \'2026-07-01\' AND \'2026-07-07\'; the backend rejects event-table SQL without it. The CLI preserves SQL text and never auto-quotes identifiers.';
|
|
4276
|
+
var AI_DEFINITION_DESCRIPTION = 'Event metrics: omit optional display_name unless the target command schema explicitly supports it. Funnel step filters use event_property_name (not field) and string-array values, including "true"/"false" for boolean properties. For tag/cluster filters and groups, put the policy beside field. For tags, AUTO and SPECIFIED require has_history_versions=true from analysis-meta catalog list. Only local SPECIFIED dates must match user-tag get --include-history-dates true. cluster_date_policy accepts LATEST (default), AUTO (match the computed result for each analysis date), or SPECIFIED (requires specified_cluster_date in yyyy-MM-dd format). AI-facing model definition JSON. Do not pass raw QP, events, event_view, visual_view, or analysis_query. Distribution filters must be attached to the corresponding distribution_metrics[].filters; do not use top-level filters or relation. For path definitions, global filters support user_property, cluster, and tag only; event_property is not supported. session_unit accepts second (1..999), minute (1..999), or hour (1..24). Do not use day; express one day as session_interval=24 and session_unit=hour. For SQL, a simple query is {"sql":"select ..."}; raw variables use ${name}, while typed params use ${Text:name}, ${Selector:name}, or ${PartDate:name}. PartDate expands to a complete predicate, so write WHERE ${PartDate:d}, not a column followed by the placeholder. A part_date parameter may set boolean use_timezone; it defaults to false and controls whether that parameter uses the query effective timezone. Selector value must match one options[].value. Trino identifiers containing #, $, @, spaces, punctuation, or a reserved word must be delimited with double quotes, for example SELECT "#user_id", "$part_event", "end" FROM ...; single quotes are string literals. For multiline SQL JSON, the decoded sql value must contain a real line break; do not submit a literal \\n sequence outside quoted SQL text. Queries against an event table must include a date-partition predicate on the quoted "$part_date" column, for example WHERE "$part_date" BETWEEN \'2026-07-01\' AND \'2026-07-07\'; the backend rejects event-table SQL without it. The CLI preserves SQL text and never auto-quotes identifiers.';
|
|
4262
4277
|
var REPORT_WRITE_DEFINITION_DESCRIPTION = `${AI_DEFINITION_DESCRIPTION} Saved funnel definitions may set optional funnel.steps[].display_name; report get returns it and report create/update preserves it. Saved-report filters may contain one compound group level only; every item inside that group must be a leaf without another items array. Historical deeper trees remain readable but cannot be written back as a definition. For model_type=tag, pass a tag report intent such as {"tag":{"tag_name":"vip_users","time_range":{"mode":"recent","unit":"day","value":7}}}. Tags are supported for report create/update and report data, not ad-hoc analysis.`;
|
|
4263
4278
|
function aiModelTypeFlag(required) {
|
|
4264
4279
|
return {
|
|
@@ -4285,7 +4300,7 @@ function validateFunnelStepFilters(modelType, definition) {
|
|
|
4285
4300
|
if (!Array.isArray(filter.items) || filter.items.length === 0) {
|
|
4286
4301
|
errors.push(`${location}.items: use a non-empty array of event-property filters or nested groups.`);
|
|
4287
4302
|
} else {
|
|
4288
|
-
filter.items.forEach((
|
|
4303
|
+
filter.items.forEach((item2, index) => visit(item2, `${location}.items[${index}]`));
|
|
4289
4304
|
}
|
|
4290
4305
|
return;
|
|
4291
4306
|
}
|
|
@@ -4385,12 +4400,12 @@ function validateReportPresentation(ctx) {
|
|
|
4385
4400
|
function validateSeries(value) {
|
|
4386
4401
|
if (!Array.isArray(value)) throw new Error("--presentation.series must be an array; [] resets all series.");
|
|
4387
4402
|
const indexes = /* @__PURE__ */ new Set();
|
|
4388
|
-
for (const [position,
|
|
4403
|
+
for (const [position, item2] of value.entries()) {
|
|
4389
4404
|
const path = `--presentation.series[${position}]`;
|
|
4390
|
-
if (!
|
|
4405
|
+
if (!item2 || typeof item2 !== "object" || Array.isArray(item2) || Object.keys(item2).length !== 3 || Object.keys(item2).some((key) => !["metric_index", "type", "axis"].includes(key))) {
|
|
4391
4406
|
throw new Error(`${path} requires only metric_index, type, and axis, all three required.`);
|
|
4392
4407
|
}
|
|
4393
|
-
const series =
|
|
4408
|
+
const series = item2;
|
|
4394
4409
|
if (typeof series.metric_index !== "number" || !Number.isInteger(series.metric_index) || series.metric_index < 1) {
|
|
4395
4410
|
throw new Error(`${path}.metric_index must be a positive 1-based integer position in definition.metrics.`);
|
|
4396
4411
|
}
|
|
@@ -4548,12 +4563,12 @@ async function withSqlSelectorRuntimeErrorHint(operation) {
|
|
|
4548
4563
|
throw enrichSqlSelectorRuntimeError(error);
|
|
4549
4564
|
}
|
|
4550
4565
|
}
|
|
4551
|
-
function withSqlSelectorRuntimeDiagnostics(
|
|
4552
|
-
const validateInput2 =
|
|
4553
|
-
const dryRun =
|
|
4554
|
-
const execute =
|
|
4566
|
+
function withSqlSelectorRuntimeDiagnostics(command2) {
|
|
4567
|
+
const validateInput2 = command2.validateInput;
|
|
4568
|
+
const dryRun = command2.dryRun;
|
|
4569
|
+
const execute = command2.execute;
|
|
4555
4570
|
return {
|
|
4556
|
-
...
|
|
4571
|
+
...command2,
|
|
4557
4572
|
...validateInput2 ? { validateInput: (ctx) => withSqlSelectorRuntimeErrorHint(() => validateInput2(ctx)) } : {},
|
|
4558
4573
|
...dryRun ? { dryRun: (ctx) => withSqlSelectorRuntimeErrorHint(() => dryRun(ctx)) } : {},
|
|
4559
4574
|
execute: (ctx) => withSqlSelectorRuntimeErrorHint(() => execute(ctx))
|
|
@@ -4739,10 +4754,11 @@ var dashboardList = createAnalysisCapabilityCommand({
|
|
|
4739
4754
|
resource: "dashboard",
|
|
4740
4755
|
command: "list",
|
|
4741
4756
|
capabilityId: "analysis.dashboard.list",
|
|
4742
|
-
description: "List dashboards
|
|
4757
|
+
description: "List readable dashboards. For management workflows use --manageable-only. Use analysis asset search for asset discovery.",
|
|
4743
4758
|
flags: [
|
|
4744
4759
|
projectIdFlag,
|
|
4745
4760
|
queriesFlag,
|
|
4761
|
+
manageableOnlyFlag,
|
|
4746
4762
|
{
|
|
4747
4763
|
name: "fields",
|
|
4748
4764
|
type: "json",
|
|
@@ -4758,6 +4774,7 @@ var dashboardList = createAnalysisCapabilityCommand({
|
|
|
4758
4774
|
validate: validateQueriesFlag,
|
|
4759
4775
|
buildInput: (ctx) => compactInput({
|
|
4760
4776
|
...listInput(ctx),
|
|
4777
|
+
manageable_only: optionalBoolean(ctx, "manageable-only"),
|
|
4761
4778
|
certification_scope: certificationScopeInput(ctx)
|
|
4762
4779
|
})
|
|
4763
4780
|
});
|
|
@@ -4824,7 +4841,7 @@ var dashboardUpdate = createAnalysisCapabilityCommand({
|
|
|
4824
4841
|
{ name: "note-id", type: "number", required: false, desc: "Dashboard note ID. Omit to create a new note attached to the dashboard." },
|
|
4825
4842
|
{ name: "note-title", type: "string", required: false, desc: "Dashboard note title. Defaults to empty on create; omitted values are preserved on update." },
|
|
4826
4843
|
{ name: "description", type: "string", required: false, desc: "Dashboard note description. Defaults to empty on create; omitted values are preserved on update." },
|
|
4827
|
-
{ name: "ui-config", type: "string", required: false, desc: "
|
|
4844
|
+
{ name: "ui-config", type: "string", required: false, desc: "Note UI config string. Omitted note style is preserved on update. Retained as a deprecated no-op for settings." },
|
|
4828
4845
|
{ name: "filter-name", type: "string", required: false, desc: "Saved filter name. Required with --operation default-filter or personal-default-filter." },
|
|
4829
4846
|
{ name: "filter", type: "json", required: false, desc: 'Saved filter in snake_case QP form: root junction_kind (and/or) and ta_filters array; SIMPLE conditions use filter_type="SIMPLE", column_name, table_type ("0" event, "1" user, "2" cluster/tag), select_type, calcu_symbol (C00 equals), and ftv. Do not use metadata table names or property_name/values. Common validates the QP format; ae-cli forwards it without local QP validation. Required with --operation default-filter, personal-default-filter, or business-filter. Pass {"junction_kind":"and","ta_filters":[]} to clear a business filter.' },
|
|
4830
4847
|
payloadFlag
|
|
@@ -4875,7 +4892,7 @@ var dashboardShare = createAnalysisCapabilityCommand({
|
|
|
4875
4892
|
{ name: "member-authorities", type: "json", required: false, desc: 'Complete user authority map: {"<numeric_user_id>":"READ|EDIT|CREATOR|MAINTAIN"}. An empty object removes all directly shared users.' },
|
|
4876
4893
|
payloadFlag
|
|
4877
4894
|
],
|
|
4878
|
-
risk: "write",
|
|
4895
|
+
risk: "high-risk-write",
|
|
4879
4896
|
buildInput: (ctx) => compactInput({
|
|
4880
4897
|
...projectInput(ctx),
|
|
4881
4898
|
dashboard_id: ctx.num("dashboard-id"),
|
|
@@ -4909,7 +4926,7 @@ var dashboardHandover = createAnalysisCapabilityCommand({
|
|
|
4909
4926
|
{ name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." },
|
|
4910
4927
|
{ name: "to-user-id", type: "number", required: true, desc: "Target user ID." }
|
|
4911
4928
|
],
|
|
4912
|
-
risk: "write",
|
|
4929
|
+
risk: "high-risk-write",
|
|
4913
4930
|
buildInput: (ctx) => ({
|
|
4914
4931
|
...projectInput(ctx),
|
|
4915
4932
|
dashboard_ids: jsonArray(ctx, "dashboard-ids"),
|
|
@@ -5211,13 +5228,14 @@ var dashboardReportDataExport = createAnalysisCapabilityCommand({
|
|
|
5211
5228
|
clusterQueryScopeFlag,
|
|
5212
5229
|
slaveClusterIdFlag,
|
|
5213
5230
|
{ name: "zone-offset", type: "number", required: false, desc: reportDataZoneOffsetDescription },
|
|
5231
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Deprecated compatibility no-op. Exports always bypass query cache; true and false are accepted without changing execution." },
|
|
5214
5232
|
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
5215
5233
|
asyncTimeoutSecondsFlag,
|
|
5216
5234
|
{ name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
|
|
5217
5235
|
],
|
|
5218
5236
|
risk: "read",
|
|
5219
5237
|
validate: validateClusterQueryRouting,
|
|
5220
|
-
buildInput:
|
|
5238
|
+
buildInput: dashboardReportDataInput
|
|
5221
5239
|
});
|
|
5222
5240
|
|
|
5223
5241
|
// src/commands/te-analysis/dashboard-report-data/index.ts
|
|
@@ -5237,7 +5255,7 @@ var queryCancel = createAnalysisCapabilityCommand({
|
|
|
5237
5255
|
{ name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
|
|
5238
5256
|
{ name: "reason", type: "string", required: false, desc: "Optional cancellation reason." }
|
|
5239
5257
|
],
|
|
5240
|
-
risk: "write",
|
|
5258
|
+
risk: "high-risk-write",
|
|
5241
5259
|
buildInput: (ctx) => compactInput({
|
|
5242
5260
|
run_id: ctx.str("run-id"),
|
|
5243
5261
|
reason: optionalString(ctx, "reason")
|
|
@@ -5572,7 +5590,7 @@ var adhocRunFlags = [
|
|
|
5572
5590
|
analysisModelPreviewRowsFlag
|
|
5573
5591
|
];
|
|
5574
5592
|
var adhocExportFlags = [
|
|
5575
|
-
...adhocBaseFlags,
|
|
5593
|
+
...adhocBaseFlags.map((flag) => flag.name === "use-cache" ? { ...flag, desc: "Deprecated compatibility no-op. Exports always bypass query cache; true and false are accepted without changing execution." } : flag),
|
|
5576
5594
|
artifactFormatFlag,
|
|
5577
5595
|
asyncTimeoutSecondsFlag
|
|
5578
5596
|
];
|
|
@@ -5758,7 +5776,7 @@ function dailyReportUpdateFlags() {
|
|
|
5758
5776
|
{ name: "enable-slack", type: "boolean", required: false, desc: "Whether scheduled Slack delivery is enabled." },
|
|
5759
5777
|
...destinationFlags,
|
|
5760
5778
|
{ name: "send-date", type: "string", required: false, desc: "Scheduled weekdays, comma-separated 1..7." },
|
|
5761
|
-
{ name: "send-time", type: "string", required: false, desc: "Scheduled
|
|
5779
|
+
{ name: "send-time", type: "string", required: false, desc: "Scheduled whole hours: hour or HH:00, optionally comma-separated, for example 9 or 09:00,18:00." },
|
|
5762
5780
|
{ name: "enable-send", type: "boolean", required: false, desc: "Whether scheduled sending is enabled." }
|
|
5763
5781
|
];
|
|
5764
5782
|
}
|
|
@@ -5957,7 +5975,7 @@ var biPanelShare = createAnalysisCapabilityCommand({
|
|
|
5957
5975
|
capabilityId: "analysis.bi_panel.share",
|
|
5958
5976
|
description: "Modify BI panel sharing members.",
|
|
5959
5977
|
flags: [projectIdFlag, { name: "panel-id", type: "number", required: true, desc: "BI panel ID." }, payloadFlag],
|
|
5960
|
-
risk: "write",
|
|
5978
|
+
risk: "high-risk-write",
|
|
5961
5979
|
buildInput: (ctx) => compactInput({
|
|
5962
5980
|
...projectInput(ctx),
|
|
5963
5981
|
panel_id: ctx.num("panel-id"),
|
|
@@ -6933,6 +6951,12 @@ var autoRefreshCronFlag = {
|
|
|
6933
6951
|
desc: "Optional Quartz cron expression for an existing enabled auto-refresh schedule. This does not enable auto refresh."
|
|
6934
6952
|
};
|
|
6935
6953
|
var tagAutoRefreshFlags = [
|
|
6954
|
+
{
|
|
6955
|
+
name: "enable-history-tag-backup",
|
|
6956
|
+
type: "boolean",
|
|
6957
|
+
required: false,
|
|
6958
|
+
desc: "Save historical tag versions during scheduled refresh. Enabling requires periodic refresh. Omit on update to preserve the setting."
|
|
6959
|
+
},
|
|
6936
6960
|
{
|
|
6937
6961
|
name: "enable-auto-refresh",
|
|
6938
6962
|
type: "boolean",
|
|
@@ -7053,10 +7077,10 @@ var groupColFlag = {
|
|
|
7053
7077
|
required: true,
|
|
7054
7078
|
desc: "Exact statistic value or bucket from history-tag-data results to drill down into."
|
|
7055
7079
|
};
|
|
7056
|
-
function capability(resource,
|
|
7080
|
+
function capability(resource, command2, capabilityId, description, flags, risk, buildInput2, options = {}) {
|
|
7057
7081
|
return createAnalysisCapabilityCommand({
|
|
7058
7082
|
resource,
|
|
7059
|
-
command,
|
|
7083
|
+
command: command2,
|
|
7060
7084
|
capabilityId,
|
|
7061
7085
|
description,
|
|
7062
7086
|
flags,
|
|
@@ -7065,14 +7089,14 @@ function capability(resource, command, capabilityId, description, flags, risk, b
|
|
|
7065
7089
|
...options
|
|
7066
7090
|
});
|
|
7067
7091
|
}
|
|
7068
|
-
function idImportCapability(
|
|
7069
|
-
const originalValidate =
|
|
7070
|
-
const originalValidateInput =
|
|
7071
|
-
const originalDryRun =
|
|
7072
|
-
const originalExecute =
|
|
7092
|
+
function idImportCapability(command2) {
|
|
7093
|
+
const originalValidate = command2.validate;
|
|
7094
|
+
const originalValidateInput = command2.validateInput;
|
|
7095
|
+
const originalDryRun = command2.dryRun;
|
|
7096
|
+
const originalExecute = command2.execute;
|
|
7073
7097
|
return {
|
|
7074
|
-
...
|
|
7075
|
-
flags:
|
|
7098
|
+
...command2,
|
|
7099
|
+
flags: command2.flags.flatMap((flag) => flag.name === "input-file-id" ? [inputFileFlag, flag] : [flag]),
|
|
7076
7100
|
validate: (ctx) => {
|
|
7077
7101
|
originalValidate?.(ctx);
|
|
7078
7102
|
const sources = ["input-file", "input-file-id", "file-content"].filter((name) => ctx.str(name).trim() !== "");
|
|
@@ -7103,7 +7127,7 @@ function idImportCapability(command) {
|
|
|
7103
7127
|
},
|
|
7104
7128
|
{
|
|
7105
7129
|
method: "POST",
|
|
7106
|
-
url:
|
|
7130
|
+
url: buildCapabilityGatewayUrl(ctx.host(), resolveGatewayDomain("analysis"), `capabilities/${command2.capabilityId}/dry-run`),
|
|
7107
7131
|
body: {
|
|
7108
7132
|
input_file_id: "<input_file_id returned by upload step>",
|
|
7109
7133
|
note: "The remaining command flags are sent unchanged after upload."
|
|
@@ -7198,6 +7222,7 @@ function clusterWriteInput(ctx, create) {
|
|
|
7198
7222
|
function tagWriteInput(ctx, create) {
|
|
7199
7223
|
const definitionRequest = optionalJson(ctx, "definition-request");
|
|
7200
7224
|
validateDefinitionRequest(create, definitionRequest);
|
|
7225
|
+
const backup = optionalBoolean(ctx, "enable-history-tag-backup");
|
|
7201
7226
|
const enabled = optionalBoolean(ctx, "enable-auto-refresh");
|
|
7202
7227
|
const cron = optionalString(ctx, "auto-refresh-cron");
|
|
7203
7228
|
const schedule = optionalJson(ctx, "auto-refresh-schedule");
|
|
@@ -7207,6 +7232,9 @@ function tagWriteInput(ctx, create) {
|
|
|
7207
7232
|
if (enabled === false && (cron !== void 0 || schedule !== void 0)) {
|
|
7208
7233
|
throw new Error("Cannot set a schedule with --enable-auto-refresh false");
|
|
7209
7234
|
}
|
|
7235
|
+
if (backup === true && (enabled === false || create && schedule === void 0 && cron === void 0)) {
|
|
7236
|
+
throw new Error("Enabling history tag backup requires periodic refresh with a schedule");
|
|
7237
|
+
}
|
|
7210
7238
|
if (create && enabled === true && cron === void 0 && schedule === void 0) {
|
|
7211
7239
|
throw new Error("Enabling auto refresh on create requires --auto-refresh-schedule or --auto-refresh-cron");
|
|
7212
7240
|
}
|
|
@@ -7219,6 +7247,7 @@ function tagWriteInput(ctx, create) {
|
|
|
7219
7247
|
remark: create ? void 0 : optionalString(ctx, "remark"),
|
|
7220
7248
|
zone_offset: optionalNumber(ctx, "zone-offset"),
|
|
7221
7249
|
enable_auto_refresh: enabled,
|
|
7250
|
+
enable_history_tag_backup: backup,
|
|
7222
7251
|
auto_refresh_cron: cron,
|
|
7223
7252
|
auto_refresh_schedule: schedule,
|
|
7224
7253
|
entity_id: create ? optionalNumber(ctx, "entity-id") : void 0
|
|
@@ -7461,10 +7490,12 @@ var commands41 = [
|
|
|
7461
7490
|
),
|
|
7462
7491
|
capability("user-tag", "get", "analysis.user_tag.get", "Get user tag details by exact tag_name values.", [
|
|
7463
7492
|
projectIdFlag,
|
|
7493
|
+
{ name: "include-history-dates", type: "boolean", desc: "Include selectable local dates. Cross-source dates are not enumerated." },
|
|
7464
7494
|
{ name: "tag-names", type: "json", required: true, desc: "JSON array of exact tag_name values." }
|
|
7465
7495
|
], "read", (ctx) => ({
|
|
7466
7496
|
project_id: ctx.num("project-id"),
|
|
7467
|
-
tag_names: ctx.json("tag-names")
|
|
7497
|
+
tag_names: ctx.json("tag-names"),
|
|
7498
|
+
...compactInput({ include_history_dates: optionalBoolean(ctx, "include-history-dates") })
|
|
7468
7499
|
})),
|
|
7469
7500
|
capability("user-tag-member", "list", "analysis.user_tag_member.list", `Run a bounded user tag member query. ${memberDataRunRoutingHelp}`, [
|
|
7470
7501
|
tagNameFlag,
|
|
@@ -7483,7 +7514,10 @@ var commands41 = [
|
|
|
7483
7514
|
tagDefinitionRequestFlag,
|
|
7484
7515
|
authenticatedOnlyFlag,
|
|
7485
7516
|
zoneOffsetFlag2,
|
|
7486
|
-
|
|
7517
|
+
{
|
|
7518
|
+
...entityIdFlag,
|
|
7519
|
+
desc: "For SQL tags, explicitly pass the project entity that receives the tag. Resolve it with project entity list/get and verify the first SQL column identifies that entity. Matching SQL types alone are insufficient."
|
|
7520
|
+
},
|
|
7487
7521
|
...tagAutoRefreshFlags
|
|
7488
7522
|
], "write", (ctx) => tagWriteInput(ctx, true)),
|
|
7489
7523
|
capability("user-tag", "update", "analysis.user_tag.update", "Update a user tag. Pass only fields that should change.", [
|
|
@@ -7698,7 +7732,7 @@ var inputFileInspect = {
|
|
|
7698
7732
|
risk: "read",
|
|
7699
7733
|
dryRun: (ctx) => ({
|
|
7700
7734
|
method: "GET",
|
|
7701
|
-
url:
|
|
7735
|
+
url: buildCapabilityGatewayUrl(ctx.host(), resolveGatewayDomain("analysis"), `input-files/${ctx.str("input-file-id")}`)
|
|
7702
7736
|
}),
|
|
7703
7737
|
execute: async (ctx) => {
|
|
7704
7738
|
const inputFileId = ctx.str("input-file-id");
|
|
@@ -7709,7 +7743,7 @@ var inputFileInspect = {
|
|
|
7709
7743
|
);
|
|
7710
7744
|
return {
|
|
7711
7745
|
...result,
|
|
7712
|
-
inspect_path:
|
|
7746
|
+
inspect_path: new URL(buildCapabilityGatewayUrl(ctx.host(), resolveGatewayDomain("analysis"), `input-files/${inputFileId}`)).pathname,
|
|
7713
7747
|
inspect_command: `ae-cli analysis input-file inspect --input-file-id ${inputFileId}`
|
|
7714
7748
|
};
|
|
7715
7749
|
}
|
|
@@ -7760,7 +7794,7 @@ var inputFileUpload = {
|
|
|
7760
7794
|
const inputFileId = result?.input_file_id ?? result?.inputFileId;
|
|
7761
7795
|
return {
|
|
7762
7796
|
...result,
|
|
7763
|
-
inspect_path: typeof inputFileId === "string" ?
|
|
7797
|
+
inspect_path: typeof inputFileId === "string" ? new URL(buildCapabilityGatewayUrl(ctx.host(), resolveGatewayDomain("analysis"), `input-files/${inputFileId}`)).pathname : result?.inspect_path,
|
|
7764
7798
|
inspect_command: typeof inputFileId === "string" ? `ae-cli analysis input-file inspect --input-file-id ${inputFileId}` : void 0
|
|
7765
7799
|
};
|
|
7766
7800
|
}
|
|
@@ -7853,7 +7887,7 @@ var projectDataPowerUpsert = createAnalysisCapabilityCommand({
|
|
|
7853
7887
|
projectIdFlag,
|
|
7854
7888
|
requiredPayloadFlag
|
|
7855
7889
|
],
|
|
7856
|
-
risk: "write",
|
|
7890
|
+
risk: "high-risk-write",
|
|
7857
7891
|
buildInput: (ctx) => compactInput({
|
|
7858
7892
|
project_id: ctx.num("project-id"),
|
|
7859
7893
|
payload: ctx.json("payload")
|
|
@@ -8144,8 +8178,8 @@ var projectMarkTimeCreate = createAnalysisCapabilityCommand({
|
|
|
8144
8178
|
flags: [
|
|
8145
8179
|
projectIdFlag,
|
|
8146
8180
|
{ name: "marked-at", type: "string", required: true, desc: "Marker timestamp, for example yyyy-MM-dd HH:mm." },
|
|
8147
|
-
{ name: "zone-offset", type: "number", required: false, desc: "Marker time zone offset." },
|
|
8148
|
-
{ name: "content", type: "string", required: true, desc: "Marker content." },
|
|
8181
|
+
{ name: "zone-offset", type: "number", required: false, desc: "Marker time zone offset. When project time zones are enabled, fixed offsets are -12..14 and 99 preserves stored local time. Omit for the project default." },
|
|
8182
|
+
{ name: "content", type: "string", required: true, desc: "Marker content, at most 200 characters." },
|
|
8149
8183
|
{ name: "is-visible", type: "number", required: false, desc: "Whether the marker is visible. 1 visible, 0 hidden." }
|
|
8150
8184
|
],
|
|
8151
8185
|
risk: "write",
|
|
@@ -8211,8 +8245,8 @@ var projectMarkTimeUpdate = createAnalysisCapabilityCommand({
|
|
|
8211
8245
|
projectIdFlag,
|
|
8212
8246
|
{ name: "mark-time-id", type: "number", required: true, desc: "Date marker ID." },
|
|
8213
8247
|
{ name: "marked-at", type: "string", required: true, desc: "Marker timestamp, for example yyyy-MM-dd HH:mm." },
|
|
8214
|
-
{ name: "zone-offset", type: "number", required: false, desc: "Marker time zone offset." },
|
|
8215
|
-
{ name: "content", type: "string", required: true, desc: "Marker content." },
|
|
8248
|
+
{ name: "zone-offset", type: "number", required: false, desc: "Marker time zone offset. When project time zones are enabled, fixed offsets are -12..14 and 99 preserves stored local time. Omit for the project default." },
|
|
8249
|
+
{ name: "content", type: "string", required: true, desc: "Marker content, at most 200 characters." },
|
|
8216
8250
|
{ name: "is-visible", type: "number", required: false, desc: "Whether the marker is visible. 1 visible, 0 hidden." }
|
|
8217
8251
|
],
|
|
8218
8252
|
risk: "write",
|
|
@@ -8251,7 +8285,7 @@ var projectMemberAdd = createAnalysisCapabilityCommand({
|
|
|
8251
8285
|
desc: "Member add type: 0 creates a company member from project management; 1 adds an existing company member. Type 0 may be disabled by company configuration."
|
|
8252
8286
|
}
|
|
8253
8287
|
],
|
|
8254
|
-
risk: "write",
|
|
8288
|
+
risk: "high-risk-write",
|
|
8255
8289
|
buildInput: (ctx) => compactInput({
|
|
8256
8290
|
project_id: ctx.num("project-id"),
|
|
8257
8291
|
payload: ctx.json("payload"),
|
|
@@ -8269,7 +8303,7 @@ var projectMemberBatchUpdate = createAnalysisCapabilityCommand({
|
|
|
8269
8303
|
projectIdFlag,
|
|
8270
8304
|
requiredPayloadFlag
|
|
8271
8305
|
],
|
|
8272
|
-
risk: "write",
|
|
8306
|
+
risk: "high-risk-write",
|
|
8273
8307
|
buildInput: (ctx) => compactInput({
|
|
8274
8308
|
project_id: ctx.num("project-id"),
|
|
8275
8309
|
payload: ctx.json("payload")
|
|
@@ -8340,7 +8374,7 @@ var projectMemberUpdate = createAnalysisCapabilityCommand({
|
|
|
8340
8374
|
requiredPayloadFlag,
|
|
8341
8375
|
{ name: "target-user-id", type: "number", required: true, desc: "Target user ID." }
|
|
8342
8376
|
],
|
|
8343
|
-
risk: "write",
|
|
8377
|
+
risk: "high-risk-write",
|
|
8344
8378
|
buildInput: (ctx) => compactInput({
|
|
8345
8379
|
project_id: ctx.num("project-id"),
|
|
8346
8380
|
payload: ctx.json("payload"),
|
|
@@ -8584,7 +8618,7 @@ var projectMemberHandoverRun = createAnalysisCapabilityCommand({
|
|
|
8584
8618
|
projectIdFlag,
|
|
8585
8619
|
requiredPayloadFlag
|
|
8586
8620
|
],
|
|
8587
|
-
risk: "write",
|
|
8621
|
+
risk: "high-risk-write",
|
|
8588
8622
|
buildInput: (ctx) => compactInput({
|
|
8589
8623
|
project_id: ctx.num("project-id"),
|
|
8590
8624
|
payload: ctx.json("payload")
|
|
@@ -8632,7 +8666,7 @@ var projectOwnerUpdate = createAnalysisCapabilityCommand({
|
|
|
8632
8666
|
{ name: "project-name", type: "string", required: false, desc: "Optional project name update." },
|
|
8633
8667
|
{ name: "project-remark", type: "string", required: false, desc: "Optional project remark update." }
|
|
8634
8668
|
],
|
|
8635
|
-
risk: "write",
|
|
8669
|
+
risk: "high-risk-write",
|
|
8636
8670
|
buildInput: (ctx) => compactInput({
|
|
8637
8671
|
project_id: ctx.num("project-id"),
|
|
8638
8672
|
company_id: ctx.num("company-id"),
|
|
@@ -8779,7 +8813,7 @@ var projectRoleUpsert = createAnalysisCapabilityCommand({
|
|
|
8779
8813
|
desc: "Role payload with role_func_list object items containing function_name and has_power (0 or 1)."
|
|
8780
8814
|
}
|
|
8781
8815
|
],
|
|
8782
|
-
risk: "write",
|
|
8816
|
+
risk: "high-risk-write",
|
|
8783
8817
|
buildInput: (ctx) => compactInput({
|
|
8784
8818
|
project_id: ctx.num("project-id"),
|
|
8785
8819
|
payload: ctx.json("payload")
|
|
@@ -8900,78 +8934,78 @@ var projectTimezoneUpdate = createAnalysisCapabilityCommand({
|
|
|
8900
8934
|
],
|
|
8901
8935
|
risk: "write",
|
|
8902
8936
|
buildInput: (ctx) => {
|
|
8903
|
-
const
|
|
8937
|
+
const item2 = ctx.str("item").toLowerCase();
|
|
8904
8938
|
const payload = ctx.json("payload");
|
|
8905
|
-
validateTimezonePayload(
|
|
8939
|
+
validateTimezonePayload(item2, payload);
|
|
8906
8940
|
return compactInput({
|
|
8907
8941
|
project_id: ctx.num("project-id"),
|
|
8908
8942
|
payload,
|
|
8909
|
-
item
|
|
8943
|
+
item: item2
|
|
8910
8944
|
});
|
|
8911
8945
|
}
|
|
8912
8946
|
});
|
|
8913
|
-
function validateTimezonePayload(
|
|
8914
|
-
if (!TIMEZONE_ITEMS.includes(
|
|
8947
|
+
function validateTimezonePayload(item2, payload) {
|
|
8948
|
+
if (!TIMEZONE_ITEMS.includes(item2)) {
|
|
8915
8949
|
throw new CliValidationError(
|
|
8916
8950
|
"--item must be timezone_toggle, zone_offset, user_timezone, or project_timezone_display.",
|
|
8917
8951
|
{ code: "INVALID_TIMEZONE_ITEM" }
|
|
8918
8952
|
);
|
|
8919
8953
|
}
|
|
8920
8954
|
if (!isObject(payload)) {
|
|
8921
|
-
throw invalidPayload(
|
|
8955
|
+
throw invalidPayload(item2, "must be a JSON object");
|
|
8922
8956
|
}
|
|
8923
|
-
switch (
|
|
8957
|
+
switch (item2) {
|
|
8924
8958
|
case "timezone_toggle":
|
|
8925
8959
|
if (typeof payload.toggle !== "boolean") {
|
|
8926
|
-
throw invalidPayload(
|
|
8960
|
+
throw invalidPayload(item2, "requires boolean field toggle", '{"toggle":true}');
|
|
8927
8961
|
}
|
|
8928
|
-
allowOnly(payload,
|
|
8962
|
+
allowOnly(payload, item2, ["toggle"]);
|
|
8929
8963
|
return;
|
|
8930
8964
|
case "zone_offset":
|
|
8931
8965
|
if (typeof payload.column_name !== "string") {
|
|
8932
|
-
throw invalidPayload(
|
|
8966
|
+
throw invalidPayload(item2, "requires string field column_name", '{"column_name":"#zone_offset"}');
|
|
8933
8967
|
}
|
|
8934
|
-
allowOnly(payload,
|
|
8968
|
+
allowOnly(payload, item2, ["column_name"]);
|
|
8935
8969
|
return;
|
|
8936
8970
|
case "user_timezone":
|
|
8937
8971
|
if (typeof payload.column_name !== "string" || payload.column_name.length === 0) {
|
|
8938
|
-
throw invalidPayload(
|
|
8972
|
+
throw invalidPayload(item2, "requires non-empty string field column_name", '{"column_name":"user_timezone"}');
|
|
8939
8973
|
}
|
|
8940
8974
|
if (payload.codetable !== void 0 && typeof payload.codetable !== "string") {
|
|
8941
|
-
throw invalidPayload(
|
|
8975
|
+
throw invalidPayload(item2, "optional field codetable must be a string", '{"column_name":"user_timezone","codetable":"timezone_code_table"}');
|
|
8942
8976
|
}
|
|
8943
|
-
allowOnly(payload,
|
|
8977
|
+
allowOnly(payload, item2, ["column_name", "codetable"]);
|
|
8944
8978
|
return;
|
|
8945
8979
|
case "project_timezone_display":
|
|
8946
|
-
validateDisplayTimezones(payload.display_timezones,
|
|
8947
|
-
allowOnly(payload,
|
|
8980
|
+
validateDisplayTimezones(payload.display_timezones, item2);
|
|
8981
|
+
allowOnly(payload, item2, ["display_timezones"]);
|
|
8948
8982
|
}
|
|
8949
8983
|
}
|
|
8950
|
-
function validateDisplayTimezones(value,
|
|
8984
|
+
function validateDisplayTimezones(value, item2) {
|
|
8951
8985
|
if (!Array.isArray(value) || value.length === 0) {
|
|
8952
|
-
throw invalidPayload(
|
|
8986
|
+
throw invalidPayload(item2, "requires non-empty array field display_timezones", '{"display_timezones":[{"timezone":8,"is_default":true}]}');
|
|
8953
8987
|
}
|
|
8954
8988
|
for (const entry of value) {
|
|
8955
8989
|
if (!isObject(entry)) {
|
|
8956
|
-
throw invalidPayload(
|
|
8990
|
+
throw invalidPayload(item2, "display_timezones entries must be objects", '{"display_timezones":[{"timezone":8,"is_default":true}]}');
|
|
8957
8991
|
}
|
|
8958
|
-
allowOnly(entry,
|
|
8992
|
+
allowOnly(entry, item2, ["timezone", "is_default"]);
|
|
8959
8993
|
if (!Number.isInteger(entry.timezone) || !(entry.timezone >= -12 && entry.timezone <= 14 || entry.timezone === 99)) {
|
|
8960
|
-
throw invalidPayload(
|
|
8994
|
+
throw invalidPayload(item2, "display_timezones[].timezone must be an integer from -12 through 14, or 99 for no fixed display timezone");
|
|
8961
8995
|
}
|
|
8962
8996
|
if (entry.is_default !== void 0 && typeof entry.is_default !== "boolean") {
|
|
8963
|
-
throw invalidPayload(
|
|
8997
|
+
throw invalidPayload(item2, "display_timezones[].is_default must be a boolean when provided");
|
|
8964
8998
|
}
|
|
8965
8999
|
}
|
|
8966
9000
|
}
|
|
8967
|
-
function allowOnly(payload,
|
|
9001
|
+
function allowOnly(payload, item2, fields2) {
|
|
8968
9002
|
if (Object.keys(payload).some((field) => !fields2.includes(field))) {
|
|
8969
|
-
throw invalidPayload(
|
|
9003
|
+
throw invalidPayload(item2, `supports only fields ${fields2.join(", ")}`);
|
|
8970
9004
|
}
|
|
8971
9005
|
}
|
|
8972
|
-
function invalidPayload(
|
|
9006
|
+
function invalidPayload(item2, reason, example) {
|
|
8973
9007
|
return new CliValidationError(
|
|
8974
|
-
`--payload for --item ${
|
|
9008
|
+
`--payload for --item ${item2} ${reason}.`,
|
|
8975
9009
|
{
|
|
8976
9010
|
code: "INVALID_TIMEZONE_PAYLOAD",
|
|
8977
9011
|
hint: example === void 0 ? void 0 : `Use: --payload '${example}'`
|
|
@@ -9041,12 +9075,12 @@ var project_default = commands66;
|
|
|
9041
9075
|
// src/commands/te-analysis/tracking/shared.ts
|
|
9042
9076
|
function createTrackingCapabilityCommand(config) {
|
|
9043
9077
|
const { asyncArtifact, ...coreConfig } = config;
|
|
9044
|
-
const
|
|
9078
|
+
const command2 = createCapabilityCommand({
|
|
9045
9079
|
...coreConfig,
|
|
9046
9080
|
cliService: "tracking",
|
|
9047
9081
|
gatewayDomain: "analysis"
|
|
9048
9082
|
});
|
|
9049
|
-
return asyncArtifact ? withAsyncArtifactLifecycle(
|
|
9083
|
+
return asyncArtifact ? withAsyncArtifactLifecycle(command2) : command2;
|
|
9050
9084
|
}
|
|
9051
9085
|
var eventsFlag = {
|
|
9052
9086
|
name: "events",
|
|
@@ -9510,20 +9544,20 @@ function definitions(candidates, kind) {
|
|
|
9510
9544
|
function existingDefinitions(value, nameField, displayNameField) {
|
|
9511
9545
|
if (!Array.isArray(value)) return [];
|
|
9512
9546
|
const rows = [];
|
|
9513
|
-
for (const
|
|
9514
|
-
if (!isRecord2(
|
|
9515
|
-
const name = nonEmptyString(
|
|
9547
|
+
for (const item2 of value) {
|
|
9548
|
+
if (!isRecord2(item2)) continue;
|
|
9549
|
+
const name = nonEmptyString(item2[nameField]);
|
|
9516
9550
|
if (!name) continue;
|
|
9517
9551
|
rows.push({
|
|
9518
9552
|
name,
|
|
9519
|
-
displayName: nonEmptyString(
|
|
9553
|
+
displayName: nonEmptyString(item2[displayNameField])
|
|
9520
9554
|
});
|
|
9521
9555
|
}
|
|
9522
9556
|
return rows;
|
|
9523
9557
|
}
|
|
9524
9558
|
function buildGroup(type, source, existing) {
|
|
9525
9559
|
const existingByName = new Map(
|
|
9526
|
-
existing.map((
|
|
9560
|
+
existing.map((item2) => [item2.name, item2.displayName])
|
|
9527
9561
|
);
|
|
9528
9562
|
const items = [];
|
|
9529
9563
|
const skippedExisting = [];
|
|
@@ -10312,6 +10346,26 @@ var alert_notice_config_default = commands81;
|
|
|
10312
10346
|
// src/commands/te-analysis/system/shared.ts
|
|
10313
10347
|
import { readFileSync as readFileSync3, statSync as statSync3 } from "fs";
|
|
10314
10348
|
var secretValues = /* @__PURE__ */ new WeakMap();
|
|
10349
|
+
var backendConfirmationCapabilities = /* @__PURE__ */ new Set([
|
|
10350
|
+
"system.member_status.update",
|
|
10351
|
+
"system.member_project.batch_update",
|
|
10352
|
+
"system.member_password.reset",
|
|
10353
|
+
"system.member.delete",
|
|
10354
|
+
"system.role.upsert",
|
|
10355
|
+
"system.role.delete",
|
|
10356
|
+
"system.admin.upsert",
|
|
10357
|
+
"system.admin_function.update",
|
|
10358
|
+
"system.admin.remove",
|
|
10359
|
+
"system.seat.update",
|
|
10360
|
+
"system.mfa.update",
|
|
10361
|
+
"system.member_mfa.unbind",
|
|
10362
|
+
"system.query_task.cancel",
|
|
10363
|
+
"system.query_alert_rule.update",
|
|
10364
|
+
"system.ops_alert_contact.delete",
|
|
10365
|
+
"system.smtp.delete",
|
|
10366
|
+
"system.receiver_address.delete",
|
|
10367
|
+
"system.third_party_login.disable"
|
|
10368
|
+
]);
|
|
10315
10369
|
var companyIdField = {
|
|
10316
10370
|
flag: "company-id",
|
|
10317
10371
|
input: "company_id",
|
|
@@ -10360,7 +10414,7 @@ function defineSystemCommand(spec) {
|
|
|
10360
10414
|
risk: spec.risk,
|
|
10361
10415
|
validate: (ctx) => {
|
|
10362
10416
|
validateSecretSources(ctx, secrets);
|
|
10363
|
-
const input = buildSystemInput(ctx, fields2, [], spec.
|
|
10417
|
+
const input = buildSystemInput(ctx, fields2, [], spec.capabilityId);
|
|
10364
10418
|
for (const secret of secrets) {
|
|
10365
10419
|
if (ctx.str(`${secret.flag}-file`) || ctx.bool(`${secret.flag}-stdin`)) {
|
|
10366
10420
|
input[secret.input] = "<provided>";
|
|
@@ -10370,7 +10424,7 @@ function defineSystemCommand(spec) {
|
|
|
10370
10424
|
spec.validate?.(ctx, input);
|
|
10371
10425
|
},
|
|
10372
10426
|
buildInput: (ctx) => {
|
|
10373
|
-
const input = buildSystemInput(ctx, fields2, secrets, spec.
|
|
10427
|
+
const input = buildSystemInput(ctx, fields2, secrets, spec.capabilityId);
|
|
10374
10428
|
validateFields(fields2, input);
|
|
10375
10429
|
validateSecretSources(ctx, secrets);
|
|
10376
10430
|
spec.validate?.(ctx, input);
|
|
@@ -10407,7 +10461,7 @@ function secretFlags(secret) {
|
|
|
10407
10461
|
}
|
|
10408
10462
|
];
|
|
10409
10463
|
}
|
|
10410
|
-
function buildSystemInput(ctx, fields2, secrets,
|
|
10464
|
+
function buildSystemInput(ctx, fields2, secrets, capabilityId) {
|
|
10411
10465
|
const input = {};
|
|
10412
10466
|
for (const field of fields2) {
|
|
10413
10467
|
const value = fieldValue(ctx, field);
|
|
@@ -10417,7 +10471,7 @@ function buildSystemInput(ctx, fields2, secrets, risk) {
|
|
|
10417
10471
|
const value = secretValue(ctx, secret);
|
|
10418
10472
|
if (value !== void 0) input[secret.input] = secret.transform ? secret.transform(value) : value;
|
|
10419
10473
|
}
|
|
10420
|
-
if (
|
|
10474
|
+
if (backendConfirmationCapabilities.has(capabilityId)) input.yes = true;
|
|
10421
10475
|
return compactInput(input);
|
|
10422
10476
|
}
|
|
10423
10477
|
function fieldValue(ctx, field) {
|
|
@@ -10501,12 +10555,12 @@ function requireArrayObjects(input, name, requiredKeys) {
|
|
|
10501
10555
|
const value = input[name];
|
|
10502
10556
|
if (value === void 0) return;
|
|
10503
10557
|
if (!Array.isArray(value)) throw validation(`${snakeToFlag(name)} must be a JSON array.`);
|
|
10504
|
-
value.forEach((
|
|
10505
|
-
if (!
|
|
10558
|
+
value.forEach((item2, index) => {
|
|
10559
|
+
if (!item2 || typeof item2 !== "object" || Array.isArray(item2)) {
|
|
10506
10560
|
throw validation(`${snakeToFlag(name)} item ${index + 1} must be an object.`);
|
|
10507
10561
|
}
|
|
10508
10562
|
for (const key of requiredKeys) {
|
|
10509
|
-
if (!(key in
|
|
10563
|
+
if (!(key in item2)) {
|
|
10510
10564
|
throw validation(`${snakeToFlag(name)} item ${index + 1} is missing ${key}.`);
|
|
10511
10565
|
}
|
|
10512
10566
|
}
|
|
@@ -10693,7 +10747,7 @@ var systemConfigurationCommands = [
|
|
|
10693
10747
|
command: "upsert",
|
|
10694
10748
|
capabilityId: "system.third_party_login.upsert",
|
|
10695
10749
|
description: "Create or update a third-party login configuration using protected secret sources.",
|
|
10696
|
-
risk: "write",
|
|
10750
|
+
risk: "high-risk-write",
|
|
10697
10751
|
fields: [
|
|
10698
10752
|
loginType,
|
|
10699
10753
|
{ flag: "app-id", type: "string", required: true, desc: "Provider application ID." },
|
|
@@ -10730,7 +10784,7 @@ var systemConfigurationCommands = [
|
|
|
10730
10784
|
command: "update",
|
|
10731
10785
|
capabilityId: "system.oauth2.update",
|
|
10732
10786
|
description: "Enable or disable company OAuth2 login.",
|
|
10733
|
-
risk: "write",
|
|
10787
|
+
risk: "high-risk-write",
|
|
10734
10788
|
fields: [
|
|
10735
10789
|
{ flag: "enable-oauth2", type: "boolean", required: true, desc: "Target OAuth2 login state." }
|
|
10736
10790
|
]
|
|
@@ -11148,17 +11202,17 @@ var systemMonitoringCommands = [
|
|
|
11148
11202
|
throw validation("--delete-ids must contain positive integers.");
|
|
11149
11203
|
}
|
|
11150
11204
|
const upserts = input.upserts;
|
|
11151
|
-
for (const [index,
|
|
11152
|
-
const metric = Number(
|
|
11153
|
-
const wheelMinutes = Number(
|
|
11154
|
-
const wheelInterval = Number(
|
|
11155
|
-
const threshold = Number(
|
|
11205
|
+
for (const [index, item2] of (upserts ?? []).entries()) {
|
|
11206
|
+
const metric = Number(item2.metric_content);
|
|
11207
|
+
const wheelMinutes = Number(item2.wheel_minutes);
|
|
11208
|
+
const wheelInterval = Number(item2.wheel_interval);
|
|
11209
|
+
const threshold = Number(item2.threshold);
|
|
11156
11210
|
if (![1, 2, 3].includes(metric) || !Number.isInteger(wheelMinutes) || wheelMinutes < 1 || wheelMinutes > 1440 || !Number.isInteger(wheelInterval) || wheelInterval < 1 || wheelInterval > 1e3 || !Number.isFinite(threshold) || threshold < 0) {
|
|
11157
11211
|
throw validation(`--upserts item ${index + 1} contains an invalid metric/window/threshold.`);
|
|
11158
11212
|
}
|
|
11159
11213
|
}
|
|
11160
11214
|
const deleted = new Set((deleteIds ?? []).map(Number));
|
|
11161
|
-
if ((upserts ?? []).some((
|
|
11215
|
+
if ((upserts ?? []).some((item2) => item2.rule_id !== void 0 && deleted.has(Number(item2.rule_id)))) {
|
|
11162
11216
|
throw validation("The same rule_id cannot appear in both --upserts and --delete-ids.");
|
|
11163
11217
|
}
|
|
11164
11218
|
}
|
|
@@ -11194,7 +11248,7 @@ var systemMonitoringCommands = [
|
|
|
11194
11248
|
if (input.on_status === void 0) throw validation("--on-status is required when creating a contact.");
|
|
11195
11249
|
requireAtLeastOne(
|
|
11196
11250
|
input,
|
|
11197
|
-
["mail_address", "mobile", ...contactWebhookSecrets.map((
|
|
11251
|
+
["mail_address", "mobile", ...contactWebhookSecrets.map((item2) => item2.input)],
|
|
11198
11252
|
"Provide at least one delivery target when creating a contact."
|
|
11199
11253
|
);
|
|
11200
11254
|
}
|
|
@@ -11553,11 +11607,11 @@ var commonFlags2 = [
|
|
|
11553
11607
|
{ name: "query-path", type: "json", desc: "1..64 ordered references: [{capability_id,invocation_id?,client_request_id?,purpose?}]. Prefer only returned meta.invocation_id; fallback to returned gateway meta.client_request_id, never business request_id. One analysis data-query step required. Inputs/status/timing come from existing call telemetry. Never include query results." },
|
|
11554
11608
|
{ name: "project-id", type: "number", desc: "Source analysis project. Collection is skipped if omitted or the project has not explicitly enabled scenario samples." }
|
|
11555
11609
|
];
|
|
11556
|
-
function withProjectCollectionPolicy(
|
|
11610
|
+
function withProjectCollectionPolicy(command2) {
|
|
11557
11611
|
return {
|
|
11558
|
-
...
|
|
11612
|
+
...command2,
|
|
11559
11613
|
execute: async (ctx) => {
|
|
11560
|
-
const input = scenarioInput(ctx,
|
|
11614
|
+
const input = scenarioInput(ctx, command2.command === "append");
|
|
11561
11615
|
const skipped = (reason) => withOutputMetadata({
|
|
11562
11616
|
accepted: false,
|
|
11563
11617
|
skipped: true,
|
|
@@ -11566,9 +11620,9 @@ function withProjectCollectionPolicy(command) {
|
|
|
11566
11620
|
...input.answer_id ? { answer_id: input.answer_id } : {},
|
|
11567
11621
|
...input.entry_id ? { entry_id: input.entry_id } : {},
|
|
11568
11622
|
...input.target_answer_id ? { target_answer_id: input.target_answer_id } : {},
|
|
11569
|
-
event_name:
|
|
11623
|
+
event_name: command2.command === "append" ? "cli_analysis_scenario_entry" : "cli_analysis_scenario",
|
|
11570
11624
|
delivery: "best_effort"
|
|
11571
|
-
}, { capability_id:
|
|
11625
|
+
}, { capability_id: command2.capabilityId });
|
|
11572
11626
|
if (input.project_id === void 0) return skipped("PROJECT_REQUIRED");
|
|
11573
11627
|
try {
|
|
11574
11628
|
const policy = await executeCapabilityWithEnvelope(ctx.host(), "analysis", "project.info.get", {
|
|
@@ -11580,7 +11634,7 @@ function withProjectCollectionPolicy(command) {
|
|
|
11580
11634
|
} catch {
|
|
11581
11635
|
return skipped("PROJECT_COLLECTION_CONFIG_UNAVAILABLE");
|
|
11582
11636
|
}
|
|
11583
|
-
return
|
|
11637
|
+
return command2.execute(ctx);
|
|
11584
11638
|
}
|
|
11585
11639
|
};
|
|
11586
11640
|
}
|
|
@@ -11669,7 +11723,7 @@ var scenarioList = createAnalysisCapabilityCommand({
|
|
|
11669
11723
|
buildInput: scenarioListInput
|
|
11670
11724
|
});
|
|
11671
11725
|
function scenarioGetInput(ctx) {
|
|
11672
|
-
const { limit, offset, ...input } = scenarioListInput(ctx);
|
|
11726
|
+
const { limit: limit2, offset, ...input } = scenarioListInput(ctx);
|
|
11673
11727
|
for (const key of ["open-id", "agent-session-id", "question-id"]) {
|
|
11674
11728
|
input[key.replaceAll("-", "_")] = text2(ctx.str(key), key, 191);
|
|
11675
11729
|
}
|
|
@@ -11691,6 +11745,140 @@ var scenarioGet = createAnalysisCapabilityCommand({
|
|
|
11691
11745
|
});
|
|
11692
11746
|
var scenario_default = [scenarioBegin, scenarioCollect, scenarioAppend, scenarioList, scenarioGet];
|
|
11693
11747
|
|
|
11748
|
+
// src/commands/te-analysis/bad-case/evaluation-sync.ts
|
|
11749
|
+
async function syncBadCaseEvaluation(ctx, projectId, value) {
|
|
11750
|
+
const item2 = value;
|
|
11751
|
+
if (!item2?.evaluation || !["PENDING", "ERROR"].includes(item2.evaluation.state)) return value;
|
|
11752
|
+
const common = (action, input = {}) => executeCapability(ctx.host(), "analysis", `analysis.bad_case.${action}`, { project_id: projectId, ...input });
|
|
11753
|
+
let report;
|
|
11754
|
+
try {
|
|
11755
|
+
const config = await common("evaluation_config");
|
|
11756
|
+
if (!config?.initialized || config.te_project_id !== String(projectId) || !config.dataset_id)
|
|
11757
|
+
throw new EvalApiError("Initialize this project evaluation configuration first.", { code: "NOT_INITIALIZED", httpStatus: 0 });
|
|
11758
|
+
const version = Number(item2.version);
|
|
11759
|
+
if (!Number.isSafeInteger(version) || version <= 0)
|
|
11760
|
+
throw new EvalApiError("Invalid source version.", { code: "INVALID_RESPONSE", httpStatus: 0 });
|
|
11761
|
+
const active = item2.review_state === "APPROVED";
|
|
11762
|
+
const result = await evalApi(
|
|
11763
|
+
ctx,
|
|
11764
|
+
"PUT",
|
|
11765
|
+
`/semantic-evaluation/datasets/${encodeURIComponent(config.dataset_id)}/cases/${encodeURIComponent(item2.id)}`,
|
|
11766
|
+
void 0,
|
|
11767
|
+
{
|
|
11768
|
+
version,
|
|
11769
|
+
active,
|
|
11770
|
+
question: item2.evidence_snapshot.question,
|
|
11771
|
+
answer: item2.evidence_snapshot.answer,
|
|
11772
|
+
reason: item2.ai_summary.reason,
|
|
11773
|
+
supplement: item2.review?.supplement || ""
|
|
11774
|
+
},
|
|
11775
|
+
{ teProjectId: String(projectId) }
|
|
11776
|
+
);
|
|
11777
|
+
if (result?.source_version !== version || typeof result.case_id !== "string" || (active ? !/^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$/.test(result.case_id) : result.case_id !== ""))
|
|
11778
|
+
throw new EvalApiError("Invalid synchronization response.", { code: "INVALID_RESPONSE", httpStatus: 0 });
|
|
11779
|
+
report = { state: "SYNCED", case_id: result.case_id };
|
|
11780
|
+
} catch (error) {
|
|
11781
|
+
const code = error instanceof EvalApiError ? error.code : "";
|
|
11782
|
+
report = { state: "ERROR", error_code: ["NOT_INITIALIZED", "INVALID_RESPONSE"].includes(code) ? code : error instanceof EvalApiError && error.httpStatus === 403 ? "FORBIDDEN" : error instanceof EvalApiError && (error.httpStatus === 401 || code === "EVAL_ACCESS_TOKEN_MISSING") ? "UNAUTHORIZED" : "AE_SYNC_FAILED" };
|
|
11783
|
+
}
|
|
11784
|
+
try {
|
|
11785
|
+
return await common("evaluation_result", { item_id: item2.id, version: item2.version, ...report });
|
|
11786
|
+
} catch {
|
|
11787
|
+
try {
|
|
11788
|
+
return await common("get", { item_id: item2.id });
|
|
11789
|
+
} catch {
|
|
11790
|
+
return { ...item2, evaluation: { state: "PENDING" } };
|
|
11791
|
+
}
|
|
11792
|
+
}
|
|
11793
|
+
}
|
|
11794
|
+
|
|
11795
|
+
// src/commands/te-analysis/bad-case/index.ts
|
|
11796
|
+
import { readFileSync as readFileSync4 } from "fs";
|
|
11797
|
+
var project = { name: "project-id", type: "number", required: true, desc: "Project owner or administrator access is required." };
|
|
11798
|
+
var request = { name: "client-request-id", type: "string", required: true, desc: "Stable request ID; preserve on retries." };
|
|
11799
|
+
var item = { name: "item-id", type: "string", required: true, desc: "Bad Case item ID as a decimal string." };
|
|
11800
|
+
var batch = { name: "batch-id", type: "string", required: true, desc: "Discovery batch ID returned by begin." };
|
|
11801
|
+
var limit = { name: "limit", type: "number", desc: "Page size, 1..100. Follow pagination until complete." };
|
|
11802
|
+
function badCaseInput(action, flags, ctx) {
|
|
11803
|
+
const input = {};
|
|
11804
|
+
for (const flag of flags) {
|
|
11805
|
+
if (flag.name === "input-file") continue;
|
|
11806
|
+
const value = ctx.str(flag.name);
|
|
11807
|
+
if (!value && !flag.required) continue;
|
|
11808
|
+
if (!value && flag.required) throw new CliValidationError(`${flag.name} is required.`);
|
|
11809
|
+
if (flag.type === "number") {
|
|
11810
|
+
const number = Number(value);
|
|
11811
|
+
const minimum = flag.name === "offset" ? 0 : 1;
|
|
11812
|
+
const maximum = flag.name === "limit" ? 100 : 2147483647;
|
|
11813
|
+
if (!Number.isInteger(number) || number < minimum || number > maximum) throw new CliValidationError(`${flag.name} must be an integer between ${minimum} and ${maximum}.`);
|
|
11814
|
+
input[flag.name.replaceAll("-", "_")] = number;
|
|
11815
|
+
} else if (flag.type === "boolean") {
|
|
11816
|
+
if (!["true", "false"].includes(value)) throw new CliValidationError(`${flag.name} must be true or false.`);
|
|
11817
|
+
input[flag.name.replaceAll("-", "_")] = value === "true";
|
|
11818
|
+
} else {
|
|
11819
|
+
if (["item-id", "batch-id", "after-id", "version"].includes(flag.name) && (!/^\d+$/.test(value) || BigInt(value) > 9223372036854775807n)) throw new CliValidationError(`${flag.name} must be a nonnegative 64-bit integer string.`);
|
|
11820
|
+
input[flag.name.replaceAll("-", "_")] = value;
|
|
11821
|
+
}
|
|
11822
|
+
}
|
|
11823
|
+
if (action === "review" && !["APPROVE", "REJECT", "REVOKE"].includes(String(input.decision))) throw new CliValidationError("decision must be APPROVE, REJECT or REVOKE.");
|
|
11824
|
+
if (action === "run" && !["HEARTBEAT", "FAILED"].includes(String(input.action))) throw new CliValidationError("action must be HEARTBEAT or FAILED.");
|
|
11825
|
+
if (action === "submit") {
|
|
11826
|
+
let packet;
|
|
11827
|
+
try {
|
|
11828
|
+
packet = JSON.parse(readFileSync4(ctx.str("input-file"), "utf8"));
|
|
11829
|
+
} catch {
|
|
11830
|
+
throw new CliValidationError("input-file must be a readable JSON file.");
|
|
11831
|
+
}
|
|
11832
|
+
if (!packet || typeof packet !== "object" || Array.isArray(packet) || Object.keys(packet).some((key) => key !== "candidates") || !("candidates" in packet) || !Array.isArray(packet.candidates) || packet.candidates.length > 200) {
|
|
11833
|
+
throw new CliValidationError("The file must contain only candidates: an array of at most 200 occurrences. Empty batches are allowed.");
|
|
11834
|
+
}
|
|
11835
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11836
|
+
const roots = /* @__PURE__ */ new Set();
|
|
11837
|
+
for (const candidate of packet.candidates) {
|
|
11838
|
+
if (!candidate || typeof candidate !== "object" || !candidate.candidate_id || seen.has(candidate.candidate_id)) throw new CliValidationError("Every occurrence needs a unique candidate_id.");
|
|
11839
|
+
seen.add(candidate.candidate_id);
|
|
11840
|
+
if (candidate.duplicate_of) {
|
|
11841
|
+
if (candidate.duplicate_item_id || !roots.has(candidate.duplicate_of) || !candidate.dedup_reason) throw new CliValidationError("duplicate_of needs an earlier canonical candidate and dedup_reason.");
|
|
11842
|
+
} else {
|
|
11843
|
+
roots.add(candidate.candidate_id);
|
|
11844
|
+
if (candidate.duplicate_item_id ? !candidate.dedup_reason : !["INCORRECT", "INCOMPLETE"].includes(candidate.issue_type) || !candidate.reason) throw new CliValidationError("Provide a supported issue_type and reason, or a historical duplicate_item_id and dedup_reason.");
|
|
11845
|
+
}
|
|
11846
|
+
if (!candidate.source || ["open_id", "agent_session_id", "question_id", "answer_id", "days", "end_time"].some((key) => !candidate.source[key])) throw new CliValidationError("Each source must preserve the exact scenario identity and scan window.");
|
|
11847
|
+
}
|
|
11848
|
+
input.candidates = packet.candidates;
|
|
11849
|
+
}
|
|
11850
|
+
return input;
|
|
11851
|
+
}
|
|
11852
|
+
function command(action, description, flags, read = false) {
|
|
11853
|
+
return createAnalysisCapabilityCommand({
|
|
11854
|
+
resource: "bad-case",
|
|
11855
|
+
command: action,
|
|
11856
|
+
capabilityId: `analysis.bad_case.${action.replaceAll("-", "_")}`,
|
|
11857
|
+
description,
|
|
11858
|
+
risk: read ? "read" : "write",
|
|
11859
|
+
flags: [project, ...flags],
|
|
11860
|
+
buildInput: (ctx) => badCaseInput(action, [project, ...flags], ctx),
|
|
11861
|
+
...action === "review" ? { postProcess: (result, input, ctx) => syncBadCaseEvaluation(ctx, Number(input.project_id), result) } : {}
|
|
11862
|
+
});
|
|
11863
|
+
}
|
|
11864
|
+
var badCaseBegin = command("begin", "Begin a project-serialized discovery batch. Renew its 15-minute lease every minute; preserve request ID on retry.", [request, { name: "source-task-id", type: "string", desc: "Actual scheduled task ID, if known." }]);
|
|
11865
|
+
var badCaseRun = command("run", "Heartbeat or fail the current discovery. Failure never deletes earlier cases.", [batch, { name: "action", type: "string", required: true, desc: "HEARTBEAT or FAILED." }]);
|
|
11866
|
+
var badCaseHistory = command("history", "Read all historical cases for Agent semantic deduplication, including pending, approved, rejected and CLI-only cases.", [limit, { name: "after-id", type: "string", desc: "Follow next_after_id until has_more=false. Default 0." }], true);
|
|
11867
|
+
var badCaseSubmit = command("submit", "Submit Agent-assessed and semantically deduplicated occurrences from a JSON file. Saves a batch even when all occurrences are duplicates. Never approves.", [batch, { name: "input-file", type: "string", required: true, desc: "JSON file containing {candidates:[...]}; follow bad_case_review.md for new and duplicate occurrence shapes." }, { name: "submit-to-page", type: "boolean", desc: "Explicitly publish new and reused pending cases for page review. Default false for the CLI-only workflow." }]);
|
|
11868
|
+
var badCaseList = command("list", "List saved Bad Cases across all batches, including CLI-only cases.", [limit, { name: "offset", type: "number", desc: "Zero-based offset; default 0." }, { name: "query", type: "string", desc: "Search question or discovery reason." }, { name: "state", type: "string", desc: "PENDING, APPROVED or REJECTED; omit for all." }], true);
|
|
11869
|
+
var badCaseGet = command("get", "Read the reviewed question, answer, CLI calls and optional human supplement.", [item], true);
|
|
11870
|
+
var badCaseReview = command("review", "Record an explicit human decision, then synchronize the saved case directly with AE. A saved review remains successful if synchronization fails; inspect evaluation.state and retry with sync-evaluation.", [item, request, { name: "version", type: "string", required: true, desc: "Exact version returned by get." }, { name: "decision", type: "string", required: true, desc: "APPROVE or REJECT a pending case; REVOKE an approved or rejected case to PENDING. Only as explicitly directed by the human." }, { name: "supplement", type: "string", sensitive: true, desc: "Optional correct answer, evidence or caveats. Omit when revoking rejection to preserve its supplement." }]);
|
|
11871
|
+
var badCaseSubmitToPage = command("submit-to-page", "Publish an existing pending case for page review without copying it or changing its review state.", [item, request]);
|
|
11872
|
+
var badCaseSyncEvaluation = {
|
|
11873
|
+
...badCaseGet,
|
|
11874
|
+
command: "sync-evaluation",
|
|
11875
|
+
capabilityId: void 0,
|
|
11876
|
+
risk: "write",
|
|
11877
|
+
description: "Retry AE synchronization using the latest saved review. Does not change the review decision; reports synchronization state.",
|
|
11878
|
+
execute: async (ctx) => syncBadCaseEvaluation(ctx, Number(ctx.str("project-id")), unwrapOutputData(await badCaseGet.execute(ctx)))
|
|
11879
|
+
};
|
|
11880
|
+
var bad_case_default = [badCaseBegin, badCaseRun, badCaseHistory, badCaseSubmit, badCaseList, badCaseGet, badCaseReview, badCaseSubmitToPage, badCaseSyncEvaluation];
|
|
11881
|
+
|
|
11694
11882
|
// src/commands/te-analysis/index.ts
|
|
11695
11883
|
registerCapabilityGatewayRoute("analysis", { gatewayDomain: "analysis" });
|
|
11696
11884
|
registerCapabilityGatewayRoute("project", { gatewayDomain: "analysis" });
|
|
@@ -11739,7 +11927,8 @@ var baseCommands = [
|
|
|
11739
11927
|
...alert_notice_config_default,
|
|
11740
11928
|
...system_default,
|
|
11741
11929
|
...feedback_default,
|
|
11742
|
-
...scenario_default
|
|
11930
|
+
...scenario_default,
|
|
11931
|
+
...bad_case_default
|
|
11743
11932
|
];
|
|
11744
11933
|
var commands83 = [...baseCommands];
|
|
11745
11934
|
var te_analysis_default = commands83;
|